@adam-milo/ui 1.0.83 → 1.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index4.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),o=require("./index55.cjs"),a=require("@adam-milo/icons"),r=require("./index53.cjs"),n=require("./index60.cjs"),i={sm:"sm",md:"md",lg:"lg"},s={sm:"sm",md:"md",lg:"lg"},l=t.forwardRef(({size:l="md",variant:d="default",icon:c,children:u,disabled:b,loading:m=!1,iconColor:y,iconStrokeWidth:v,"aria-label":g,"data-testid":x,"data-cy":p,...S},j)=>{const[w,f]=t.useState(!1),[h,q]=t.useState(!1),M=o.cn(n.baseStyles,n.variantStyles[d],n.sizeStyles[l]),z=b||m,B=(()=>{if(!m&&!z)return"rainbow-overlay"===d?h?"var(--overlay-rainbow-50)":w?"var(--overlay-rainbow-40)":"var(--overlay-rainbow-15)":"outlined-green"===d?h?"var(--overlay-green-blue-15)":w?"var(--overlay-green-blue-10)":void 0:void 0})(),I=m?`${g||"Button"} - Loading`:g;return e.jsxs("button",{ref:j,type:"button",disabled:z,className:M,style:{...B&&{backgroundImage:B},...S.style},onMouseEnter:()=>!m&&f(!0),onMouseLeave:()=>f(!1),onMouseDown:()=>!m&&q(!0),onMouseUp:()=>q(!1),"aria-label":u?void 0:I,"aria-busy":m,"data-testid":x||"icon-button","data-cy":p||"icon-button",...S,children:[m?e.jsx(r.Spinner,{size:s[l],color:"teal",label:`${g||"Button"} loading`,"data-cy":"icon-button-spinner"}):e.jsx(a.Icon,{name:c,size:i[l],decorative:!!u,customColor:y,customStrokeWidth:v}),u&&e.jsx("span",{className:"text-[var(--color-system-text)] font-normal whitespace-nowrap","data-cy":"icon-button-text",children:u})]})});l.displayName="IconButton",exports.IconButton=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),t=require("./index55.cjs"),i=require("@adam-milo/icons"),o=require("./index53.cjs"),n=require("./index60.cjs"),r={sm:"sm",md:"md",lg:"lg"},s={sm:"sm",md:"md",lg:"lg"},l=a.forwardRef(({size:l="md",variant:c="default",icon:d,children:u,disabled:v,loading:b=!1,iconColor:m,iconStrokeWidth:y,"aria-label":g,"data-testid":x,"data-cy":f,...w},p)=>{const[_,h]=a.useState(!1),[j,S]=a.useState(!1),q=t.cn(n.baseStyles,n.variantStyles[c],n.sizeStyles[l]),k=v||b,z=(()=>{if(!b&&!k)return"rainbow-overlay"===c?j?"var(--overlay-rainbow-50)":_?"var(--overlay-rainbow-40)":"var(--overlay-rainbow-15)":"outlined-green"===c?j?"var(--overlay-green-blue-15)":_?"var(--overlay-green-blue-10)":void 0:void 0})(),I=b?`${g||"Button"} - Loading`:g;return e.jsxs("button",{ref:p,type:"button",disabled:k,className:q,style:{...z&&{backgroundImage:z},...w.style},onMouseEnter:()=>!b&&h(!0),onMouseLeave:()=>h(!1),onMouseDown:()=>!b&&S(!0),onMouseUp:()=>S(!1),"aria-label":u?void 0:I,"aria-busy":b,"data-testid":x||"icon-button","data-cy":f||"icon-button",...w,children:[b?e.jsx(o.Spinner,{size:s[l],color:"teal",label:`${g||"Button"} loading`,"data-cy":"icon-button-spinner"}):m||y?e.jsx("span",{style:{...m&&{"--icon-fill":m},...y&&{"--icon-sw":y}},className:t.cn("inline-flex",m&&"[&_svg_path]:![fill:var(--icon-fill)] [&_svg_circle]:![fill:var(--icon-fill)] [&_svg_rect]:![fill:var(--icon-fill)]",y&&"[&_svg_path]:![stroke-width:var(--icon-sw)] [&_svg_circle]:![stroke-width:var(--icon-sw)] [&_svg_line]:![stroke-width:var(--icon-sw)]"),children:e.jsx(i.Icon,{name:d,size:r[l],decorative:!!u})}):e.jsx(i.Icon,{name:d,size:r[l],decorative:!!u}),u&&e.jsx("span",{className:"text-[var(--color-system-text)] font-normal whitespace-nowrap","data-cy":"icon-button-text",children:u})]})});l.displayName="IconButton",exports.IconButton=l;
package/dist/index4.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsxs as o,jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as a}from"react";import{cn as r}from"./index55.js";import{Icon as n}from"@adam-milo/icons";import{Spinner as i}from"./index53.js";import{sizeStyles as l,variantStyles as d,baseStyles as s}from"./index60.js";const m={sm:"sm",md:"md",lg:"lg"},c={sm:"sm",md:"md",lg:"lg"},u=t(({size:t="md",variant:u="default",icon:b,children:v,disabled:y,loading:p=!1,iconColor:g,iconStrokeWidth:f,"aria-label":x,"data-testid":w,"data-cy":h,...j},M)=>{const[k,z]=a(!1),[B,N]=a(!1),C=r(s,d[u],l[t]),I=y||p,L=(()=>{if(!p&&!I)return"rainbow-overlay"===u?B?"var(--overlay-rainbow-50)":k?"var(--overlay-rainbow-40)":"var(--overlay-rainbow-15)":"outlined-green"===u?B?"var(--overlay-green-blue-15)":k?"var(--overlay-green-blue-10)":void 0:void 0})(),S=p?`${x||"Button"} - Loading`:x;/* @__PURE__ */
2
- return o("button",{ref:M,type:"button",disabled:I,className:C,style:{...L&&{backgroundImage:L},...j.style},onMouseEnter:()=>!p&&z(!0),onMouseLeave:()=>z(!1),onMouseDown:()=>!p&&N(!0),onMouseUp:()=>N(!1),"aria-label":v?void 0:S,"aria-busy":p,"data-testid":w||"icon-button","data-cy":h||"icon-button",...j,children:[p?/* @__PURE__ */e(i,{size:c[t],color:"teal",label:`${x||"Button"} loading`,"data-cy":"icon-button-spinner"}):/* @__PURE__ */e(n,{name:b,size:m[t],decorative:!!v,customColor:g,customStrokeWidth:f}),v&&/* @__PURE__ */e("span",{className:"text-[var(--color-system-text)] font-normal whitespace-nowrap","data-cy":"icon-button-text",children:v})]})});u.displayName="IconButton";export{u as IconButton};
1
+ import{jsxs as o,jsx as e}from"react/jsx-runtime";import{forwardRef as a,useState as i}from"react";import{cn as t}from"./index55.js";import{Icon as r}from"@adam-milo/icons";import{Spinner as n}from"./index53.js";import{sizeStyles as l,variantStyles as s,baseStyles as c}from"./index60.js";const d={sm:"sm",md:"md",lg:"lg"},m={sm:"sm",md:"md",lg:"lg"},v=a(({size:a="md",variant:v="default",icon:u,children:b,disabled:f,loading:g=!1,iconColor:p,iconStrokeWidth:y,"aria-label":w,"data-testid":_,"data-cy":h,...x},k)=>{const[j,z]=i(!1),[M,N]=i(!1),B=t(c,s[v],l[a]),I=f||g,L=(()=>{if(!g&&!I)return"rainbow-overlay"===v?M?"var(--overlay-rainbow-50)":j?"var(--overlay-rainbow-40)":"var(--overlay-rainbow-15)":"outlined-green"===v?M?"var(--overlay-green-blue-15)":j?"var(--overlay-green-blue-10)":void 0:void 0})(),$=g?`${w||"Button"} - Loading`:w;/* @__PURE__ */
2
+ return o("button",{ref:k,type:"button",disabled:I,className:B,style:{...L&&{backgroundImage:L},...x.style},onMouseEnter:()=>!g&&z(!0),onMouseLeave:()=>z(!1),onMouseDown:()=>!g&&N(!0),onMouseUp:()=>N(!1),"aria-label":b?void 0:$,"aria-busy":g,"data-testid":_||"icon-button","data-cy":h||"icon-button",...x,children:[g?/* @__PURE__ */e(n,{size:m[a],color:"teal",label:`${w||"Button"} loading`,"data-cy":"icon-button-spinner"}):p||y?/* @__PURE__ */e("span",{style:{...p&&{"--icon-fill":p},...y&&{"--icon-sw":y}},className:t("inline-flex",p&&"[&_svg_path]:![fill:var(--icon-fill)] [&_svg_circle]:![fill:var(--icon-fill)] [&_svg_rect]:![fill:var(--icon-fill)]",y&&"[&_svg_path]:![stroke-width:var(--icon-sw)] [&_svg_circle]:![stroke-width:var(--icon-sw)] [&_svg_line]:![stroke-width:var(--icon-sw)]"),children:/* @__PURE__ */e(r,{name:u,size:d[a],decorative:!!b})}):/* @__PURE__ */e(r,{name:u,size:d[a],decorative:!!b}),b&&/* @__PURE__ */e("span",{className:"text-[var(--color-system-text)] font-normal whitespace-nowrap","data-cy":"icon-button-text",children:b})]})});v.displayName="IconButton";export{v as IconButton};
package/dist/index60.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=["m-0 font-inherit","inline-flex items-center justify-center","gap-2 flex-shrink-0","text-[var(--color-text)]","rounded-[0.75rem]","cursor-pointer select-none touch-manipulation","transition-all duration-200 ease-in-out","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-text)]","disabled:cursor-not-allowed disabled:pointer-events-none"].join(" "),o={"rainbow-overlay":["border-none","disabled:bg-[var(--color-bg-secondary)]"].join(" "),"outlined-green":["border border-solid border-[var(--color-green-accent)]","bg-transparent","disabled:bg-[var(--color-bg-secondary)] disabled:border-[var(--color-border)]"].join(" "),default:["border-none bg-transparent","hover:bg-[var(--color-bg-secondary)]","active:bg-[var(--color-overlay-black-10)]","disabled:opacity-40"].join(" ")};exports.baseStyles=e,exports.sizeStyles={sm:"p-1.5 text-sm max-md:min-w-11 max-md:min-h-11",md:"p-2 text-base",lg:"p-3 text-lg w-[2.5rem] h-[2.5rem]"},exports.variantStyles=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=["m-0 font-inherit","inline-flex items-center justify-center","gap-2 flex-shrink-0","text-[var(--color-text)]","rounded-[0.75rem]","cursor-pointer select-none touch-manipulation","transition-all duration-200 ease-in-out","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-text)]","disabled:cursor-not-allowed disabled:pointer-events-none"].join(" "),o={"rainbow-overlay":["border-none","disabled:bg-[var(--color-bg-secondary)]"].join(" "),"outlined-green":["border border-solid border-[var(--color-green-accent)]","bg-transparent","hover:bg-[var(--color-bg-secondary)]","active:bg-[var(--color-overlay-black-10)]","disabled:bg-[var(--color-bg-secondary)] disabled:border-[var(--color-border)]"].join(" "),default:["border-none bg-transparent","hover:bg-[var(--color-bg-secondary)]","active:bg-[var(--color-bg-secondary)]","disabled:opacity-40"].join(" ")};exports.baseStyles=e,exports.sizeStyles={sm:"p-1.5 text-sm max-md:min-w-11 max-md:min-h-11",md:"p-2 text-base",lg:"p-3 text-lg w-[2.5rem] h-[2.5rem]"},exports.variantStyles=o;
package/dist/index60.js CHANGED
@@ -1 +1 @@
1
- const e=["m-0 font-inherit","inline-flex items-center justify-center","gap-2 flex-shrink-0","text-[var(--color-text)]","rounded-[0.75rem]","cursor-pointer select-none touch-manipulation","transition-all duration-200 ease-in-out","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-text)]","disabled:cursor-not-allowed disabled:pointer-events-none"].join(" "),o={"rainbow-overlay":["border-none","disabled:bg-[var(--color-bg-secondary)]"].join(" "),"outlined-green":["border border-solid border-[var(--color-green-accent)]","bg-transparent","disabled:bg-[var(--color-bg-secondary)] disabled:border-[var(--color-border)]"].join(" "),default:["border-none bg-transparent","hover:bg-[var(--color-bg-secondary)]","active:bg-[var(--color-overlay-black-10)]","disabled:opacity-40"].join(" ")},r={sm:"p-1.5 text-sm max-md:min-w-11 max-md:min-h-11",md:"p-2 text-base",lg:"p-3 text-lg w-[2.5rem] h-[2.5rem]"};export{e as baseStyles,r as sizeStyles,o as variantStyles};
1
+ const e=["m-0 font-inherit","inline-flex items-center justify-center","gap-2 flex-shrink-0","text-[var(--color-text)]","rounded-[0.75rem]","cursor-pointer select-none touch-manipulation","transition-all duration-200 ease-in-out","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-text)]","disabled:cursor-not-allowed disabled:pointer-events-none"].join(" "),o={"rainbow-overlay":["border-none","disabled:bg-[var(--color-bg-secondary)]"].join(" "),"outlined-green":["border border-solid border-[var(--color-green-accent)]","bg-transparent","hover:bg-[var(--color-bg-secondary)]","active:bg-[var(--color-overlay-black-10)]","disabled:bg-[var(--color-bg-secondary)] disabled:border-[var(--color-border)]"].join(" "),default:["border-none bg-transparent","hover:bg-[var(--color-bg-secondary)]","active:bg-[var(--color-bg-secondary)]","disabled:opacity-40"].join(" ")},r={sm:"p-1.5 text-sm max-md:min-w-11 max-md:min-h-11",md:"p-2 text-base",lg:"p-3 text-lg w-[2.5rem] h-[2.5rem]"};export{e as baseStyles,r as sizeStyles,o as variantStyles};
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/icon-button/IconButton.component.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAc1D,eAAO,MAAM,UAAU,+GAgGtB,CAAC"}
1
+ {"version":3,"file":"IconButton.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/icon-button/IconButton.component.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAc1D,eAAO,MAAM,UAAU,+GA0GtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/icon-button/IconButton.styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAUZ,CAAC;AAEZ,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,EAAE,MAAM,CAa1F,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,CAIzD,CAAC"}
1
+ {"version":3,"file":"IconButton.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/core/icon-button/IconButton.styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAUZ,CAAC;AAEZ,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,EAAE,MAAM,CAe1F,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,CAIzD,CAAC"}