New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jamsr-ui/button

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jamsr-ui/button - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

2

dist/index.js
"use client"
"use strict";var v=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var S=(s,o)=>{for(var e in o)v(s,e,{get:o[e],enumerable:!0})},q=(s,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of j(o))!F.call(s,a)&&a!==e&&v(s,a,{get:()=>o[a],enumerable:!(r=k(o,a))||r.enumerable});return s};var E=s=>q(v({},"__esModule",{value:!0}),s);var H={};S(H,{Button:()=>h});module.exports=E(H);var O=require("@jamsr-ui/progress"),A=require("@jamsr-ui/ripple"),G=require("@jamsr-ui/utils");var n=require("react");var t=require("@jamsr-ui/utils"),U=(0,t.tv)({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-none","select-none","whitespace-nowrap","min-w-max","font-medium","tap-highlight-color","subpixel-antialiased","transition-transform","disabled:opacity-50","focus-visible:ring-2 focus-visible:ring-primary"],variants:{color:{default:"",primary:"",secondary:"",success:"",warning:"",error:""},variant:{solid:"",outline:"border-2 bg-transparent",shadow:"",light:"hover:bg-action-hover",link:""},fullWidth:{true:"w-full"},size:{xs:"rounded-md",sm:"h-8 min-w-16 gap-1 rounded-lg px-3 text-xs",md:"h-10 min-w-20 gap-2 rounded-xl px-4 text-sm",lg:"h-12 min-w-40 gap-2 rounded-2xl px-6 text-base font-medium"},rounded:{true:"rounded-full"},isIconOnly:{true:"!px-0"},disableAnimation:{true:"!transition-none",false:"data-[pressed=true]:scale-[0.97]"}},compoundVariants:[{disableAnimation:!1,size:"lg",class:"data-[pressed=true]:scale-[0.98]"},{variant:"solid",color:"default",class:t.colorVariants.solid.default},{variant:"solid",color:"primary",class:t.colorVariants.solid.primary},{variant:"solid",color:"secondary",class:t.colorVariants.solid.secondary},{variant:"solid",color:"success",class:t.colorVariants.solid.success},{variant:"solid",color:"warning",class:t.colorVariants.solid.warning},{variant:"solid",color:"error",class:t.colorVariants.solid.error},{variant:"light",color:"default"},{variant:"light",color:"primary",class:"text-primary"},{variant:"light",color:"secondary",class:"text-secondary"},{variant:"light",color:"success",class:"text-success"},{variant:"light",color:"warning",class:"text-warning"},{variant:"light",color:"error",class:"text-error"},{variant:"shadow",color:"default",class:t.colorVariants.shadow.default},{variant:"shadow",color:"primary",class:t.colorVariants.shadow.primary},{variant:"shadow",color:"secondary",class:t.colorVariants.shadow.secondary},{variant:"shadow",color:"success",class:t.colorVariants.shadow.success},{variant:"shadow",color:"warning",class:t.colorVariants.shadow.warning},{variant:"shadow",color:"error",class:t.colorVariants.shadow.error},{variant:"outline",color:"default",class:t.colorVariants.outline.default},{variant:"outline",color:"primary",class:t.colorVariants.outline.primary},{variant:"outline",color:"secondary",class:t.colorVariants.outline.secondary},{variant:"outline",color:"success",class:t.colorVariants.outline.success},{variant:"outline",color:"warning",class:t.colorVariants.outline.warning},{variant:"outline",color:"error",class:t.colorVariants.outline.error},{isIconOnly:!0,size:"xs",class:"size-6 min-w-6 [&>svg]:size-5"},{isIconOnly:!0,size:"sm",class:"size-8 min-w-8 [&>svg]:size-6"},{isIconOnly:!0,size:"md",class:"size-10 min-w-10 [&>svg]:size-6"},{isIconOnly:!0,size:"lg",class:"size-12 min-w-12 [&>svg]:size-8"}],defaultVariants:{variant:"solid",color:"default",size:"md",disableAnimation:!1}}),K=(0,t.tv)({base:"inline-flex h-auto items-center justify-center",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var R=s=>{let[o,e]=(0,n.useState)(!1),r=()=>e(!0),a=()=>e(!1),{as:m,children:d,startContent:f,endContent:i,autoFocus:w,className:u,isLoading:p=!1,disabled:y=!1,color:l,size:x,isIconOnly:g,spinnerPlacement:M="start",fullWidth:P,rounded:B,variant:z,type:V="button",disableRipple:N,disableAnimation:I=!1,...C}=s,D=m??"button",b=p||y,W=(0,n.useMemo)(()=>U({size:x,color:l,className:u,isIconOnly:g,fullWidth:P,rounded:B,variant:z,disableAnimation:I}),[x,l,u,g,P,B,z,I]),L=(0,n.useCallback)(()=>({...C,disabled:b,"data-pressed":o,type:V,onMouseDown:r,onMouseUp:a}),[b,o,C,V]);return{Component:D,children:d,styles:W,startContent:f,endContent:i,isLoading:p,isIconOnly:g,spinnerPlacement:M,isDisabled:b,disableRipple:N,getButtonProps:L}};var c=require("react/jsx-runtime"),h=(0,G.forwardRefUI)((s,o)=>{let{Component:e,children:r,endContent:a,getButtonProps:m,spinnerPlacement:d,isIconOnly:f,isLoading:i,startContent:w,styles:u,isDisabled:p,disableRipple:y}=R({...s}),l=(0,c.jsx)(O.CircularProgress,{});return(0,c.jsxs)(e,{ref:o,"data-component":"button","data-slot":"base",className:u,...m(),children:[i&&d==="start"?l:w,i&&f?null:r,i&&d==="end"?l:a,!p&&!y&&(0,c.jsx)(A.Ripple,{})]})});h.displayName="UI.Button";0&&(module.exports={Button});
"use strict";"use client";var v=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var F=Object.prototype.hasOwnProperty;var S=(s,o)=>{for(var e in o)v(s,e,{get:o[e],enumerable:!0})},q=(s,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of j(o))!F.call(s,a)&&a!==e&&v(s,a,{get:()=>o[a],enumerable:!(r=k(o,a))||r.enumerable});return s};var E=s=>q(v({},"__esModule",{value:!0}),s);var H={};S(H,{Button:()=>h});module.exports=E(H);var O=require("@jamsr-ui/progress"),A=require("@jamsr-ui/ripple"),G=require("@jamsr-ui/utils");var n=require("react");var t=require("@jamsr-ui/utils"),U=(0,t.tv)({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-none","select-none","whitespace-nowrap","min-w-max","font-medium","tap-highlight-color","subpixel-antialiased","transition-transform","disabled:opacity-50","focus-visible:ring-2 focus-visible:ring-primary"],variants:{color:{default:"",primary:"",secondary:"",success:"",warning:"",error:""},variant:{solid:"",outline:"border-2 bg-transparent",shadow:"",light:"hover:bg-action-hover",link:""},fullWidth:{true:"w-full"},size:{xs:"rounded-md",sm:"h-8 min-w-16 gap-1 rounded-lg px-3 text-xs",md:"h-10 min-w-20 gap-2 rounded-xl px-4 text-sm",lg:"h-12 min-w-40 gap-2 rounded-2xl px-6 text-base font-medium"},rounded:{true:"rounded-full"},isIconOnly:{true:"!px-0"},disableAnimation:{true:"!transition-none",false:"data-[pressed=true]:scale-[0.97]"}},compoundVariants:[{disableAnimation:!1,size:"lg",class:"data-[pressed=true]:scale-[0.98]"},{variant:"solid",color:"default",class:t.colorVariants.solid.default},{variant:"solid",color:"primary",class:t.colorVariants.solid.primary},{variant:"solid",color:"secondary",class:t.colorVariants.solid.secondary},{variant:"solid",color:"success",class:t.colorVariants.solid.success},{variant:"solid",color:"warning",class:t.colorVariants.solid.warning},{variant:"solid",color:"error",class:t.colorVariants.solid.error},{variant:"light",color:"default"},{variant:"light",color:"primary",class:"text-primary"},{variant:"light",color:"secondary",class:"text-secondary"},{variant:"light",color:"success",class:"text-success"},{variant:"light",color:"warning",class:"text-warning"},{variant:"light",color:"error",class:"text-error"},{variant:"shadow",color:"default",class:t.colorVariants.shadow.default},{variant:"shadow",color:"primary",class:t.colorVariants.shadow.primary},{variant:"shadow",color:"secondary",class:t.colorVariants.shadow.secondary},{variant:"shadow",color:"success",class:t.colorVariants.shadow.success},{variant:"shadow",color:"warning",class:t.colorVariants.shadow.warning},{variant:"shadow",color:"error",class:t.colorVariants.shadow.error},{variant:"outline",color:"default",class:t.colorVariants.outline.default},{variant:"outline",color:"primary",class:t.colorVariants.outline.primary},{variant:"outline",color:"secondary",class:t.colorVariants.outline.secondary},{variant:"outline",color:"success",class:t.colorVariants.outline.success},{variant:"outline",color:"warning",class:t.colorVariants.outline.warning},{variant:"outline",color:"error",class:t.colorVariants.outline.error},{isIconOnly:!0,size:"xs",class:"size-6 min-w-6 [&>svg]:size-5"},{isIconOnly:!0,size:"sm",class:"size-8 min-w-8 [&>svg]:size-6"},{isIconOnly:!0,size:"md",class:"size-10 min-w-10 [&>svg]:size-6"},{isIconOnly:!0,size:"lg",class:"size-12 min-w-12 [&>svg]:size-8"}],defaultVariants:{variant:"solid",color:"default",size:"md",disableAnimation:!1}}),K=(0,t.tv)({base:"inline-flex h-auto items-center justify-center",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var R=s=>{let[o,e]=(0,n.useState)(!1),r=()=>e(!0),a=()=>e(!1),{as:m,children:u,startContent:f,endContent:i,autoFocus:w,className:d,isLoading:p=!1,disabled:y=!1,color:l,size:x,isIconOnly:g,spinnerPlacement:M="start",fullWidth:P,rounded:B,variant:z,type:V="button",disableRipple:N,disableAnimation:I=!1,...C}=s,D=m??"button",b=p||y,W=(0,n.useMemo)(()=>U({size:x,color:l,className:d,isIconOnly:g,fullWidth:P,rounded:B,variant:z,disableAnimation:I}),[x,l,d,g,P,B,z,I]),L=(0,n.useCallback)(()=>({...C,disabled:b,"data-pressed":o,type:V,onMouseDown:r,onMouseUp:a}),[b,o,C,V]);return{Component:D,children:u,styles:W,startContent:f,endContent:i,isLoading:p,isIconOnly:g,spinnerPlacement:M,isDisabled:b,disableRipple:N,getButtonProps:L}};var c=require("react/jsx-runtime"),h=(0,G.forwardRefUI)((s,o)=>{let{Component:e,children:r,endContent:a,getButtonProps:m,spinnerPlacement:u,isIconOnly:f,isLoading:i,startContent:w,styles:d,isDisabled:p,disableRipple:y}=R({...s}),l=(0,c.jsx)(O.CircularProgress,{});return(0,c.jsxs)(e,{ref:o,"data-component":"button","data-slot":"base",className:d,...m(),children:[i&&u==="start"?l:w,i&&f?null:r,i&&u==="end"?l:a,!p&&!y&&(0,c.jsx)(A.Ripple,{})]})});h.displayName="UI.Button";0&&(module.exports={Button});
{
"name": "@jamsr-ui/button",
"version": "0.0.19",
"version": "0.0.20",
"description": "",

@@ -24,5 +24,5 @@ "main": "./dist/index.mjs",

"dependencies": {
"@jamsr-ui/progress": "^0.0.19",
"@jamsr-ui/utils": "^0.0.17",
"@jamsr-ui/ripple": "^0.0.19"
"@jamsr-ui/progress": "^0.0.20",
"@jamsr-ui/utils": "^0.0.18",
"@jamsr-ui/ripple": "^0.0.20"
},

@@ -29,0 +29,0 @@ "module": "dist/index.mjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc