@aic-kits/react 0.15.2 → 0.15.3

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.
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { ButtonProps } from './types';
3
- export declare const Button: ({ disabled, icon, color, textColor, loading, onClick, rightIcon, corner, variant, size, style, "data-testid": testId, text, ...rest }: ButtonProps) => React.ReactElement;
3
+ export declare const Button: ({ disabled, icon, color, textColor, loading, onClick, rightIcon, corner, variant, size, style, "data-testid": testId, text, ...boxProps }: ButtonProps) => React.ReactElement;
4
4
  export * from './utils';
@@ -1,6 +1,7 @@
1
1
  import { Icon } from '@phosphor-icons/react';
2
2
  import { ButtonCorner, ButtonSize, ButtonVariant, Color } from '../../theme';
3
- export interface ButtonProps {
3
+ import { BoxProps } from '../Box';
4
+ export interface ButtonProps extends BoxProps {
4
5
  /**
5
6
  * Disable state of button.
6
7
  */
package/dist/index.cjs CHANGED
@@ -215,7 +215,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[gi]+=1);const Os=n=>({none:0,
215
215
  ${n==="text"?`color: ${o.colors.primary};`:""}
216
216
  `}
217
217
  }
218
- `,Cs=({disabled:n=!1,icon:o,color:i,textColor:a,loading:l=!1,onClick:d,rightIcon:p,corner:y="circle",variant:m="solid",size:w="md",style:C,"data-testid":S,text:A,...T})=>{var lt;const L=oe(),$=L.__hd__.button,B=$.defaultColor||"primary",P=i||B,F=((lt=$.variants)==null?void 0:lt[m])||{},j=$.sizes[w],W=n||l,H=h.useMemo(()=>W&&m==="solid"?"disabled":m==="solid"?P:F.bgColor||"transparent",[P,W,m,F.bgColor]),Z=h.useMemo(()=>ki(L,P,a,m,W),[L,P,a,m,W]),D=It=>{n||l||d==null||d(It)},se=m==="text"?"none":j.paddingHorizontal,ne=m==="text"?"none":j.paddingVertical,fe=j.fontSize,xe=j.iconSize,Xe=$.iconSpacing||"xs",Le=b.jsxs(k,{display:"flex",alignItems:"center",gap:Xe,children:[o&&b.jsx(iu,{$themePosition:"left",$iconSpacing:Xe,children:b.jsx(ou,{$themeColor:P,$themeTextColor:a,$variant:m,$disabled:W,$iconSize:xe,type:"icon",art:o,weight:j.iconWeight,size:xe})}),b.jsx(Kx,{$themeColor:P,$themeTextColor:a,$themeFontSize:fe,$themeFontWeight:j.fontWeight,$disabled:W,$variant:m,as:"span",children:A}),p&&b.jsx(iu,{$themePosition:"right",$iconSpacing:Xe,children:b.jsx(ou,{$themeColor:P,$themeTextColor:a,$variant:m,$disabled:W,$iconSize:xe,weight:j.iconWeight,type:"icon",art:p,size:xe})})]});return b.jsx(_t,{onClick:D,style:C,"data-testid":S,flex:T.flex,children:b.jsx(Hs,{$backgroundColor:H,$paddingHorizontal:se,$paddingVertical:ne,$borderRadius:$.squircleBorderRadii[y],$borderWidth:j.borderWidth,$disabled:W,$variant:m,$color:P,$size:w,children:b.jsx(Dd,{size:"small",color:Z,loading:l,display:"flex",alignItems:"center",justifyContent:"center",children:Le})})})},qx=de(k)`
218
+ `,Cs=({disabled:n=!1,icon:o,color:i,textColor:a,loading:l=!1,onClick:d,rightIcon:p,corner:y="circle",variant:m="solid",size:w="md",style:C,"data-testid":S,text:A,...T})=>{var lt;const L=oe(),$=L.__hd__.button,B=$.defaultColor||"primary",P=i||B,F=((lt=$.variants)==null?void 0:lt[m])||{},j=$.sizes[w],W=n||l,H=h.useMemo(()=>W&&m==="solid"?"disabled":m==="solid"?P:F.bgColor||"transparent",[P,W,m,F.bgColor]),Z=h.useMemo(()=>ki(L,P,a,m,W),[L,P,a,m,W]),D=It=>{n||l||d==null||d(It)},se=m==="text"?"none":j.paddingHorizontal,ne=m==="text"?"none":j.paddingVertical,fe=j.fontSize,xe=j.iconSize,Xe=$.iconSpacing||"xs",Le=b.jsxs(k,{display:"flex",alignItems:"center",gap:Xe,children:[o&&b.jsx(iu,{$themePosition:"left",$iconSpacing:Xe,children:b.jsx(ou,{$themeColor:P,$themeTextColor:a,$variant:m,$disabled:W,$iconSize:xe,type:"icon",art:o,weight:j.iconWeight,size:xe})}),b.jsx(Kx,{$themeColor:P,$themeTextColor:a,$themeFontSize:fe,$themeFontWeight:j.fontWeight,$disabled:W,$variant:m,as:"span",children:A}),p&&b.jsx(iu,{$themePosition:"right",$iconSpacing:Xe,children:b.jsx(ou,{$themeColor:P,$themeTextColor:a,$variant:m,$disabled:W,$iconSize:xe,weight:j.iconWeight,type:"icon",art:p,size:xe})})]});return b.jsx(_t,{onClick:D,style:C,"data-testid":S,...T,children:b.jsx(Hs,{$backgroundColor:H,$paddingHorizontal:se,$paddingVertical:ne,$borderRadius:$.squircleBorderRadii[y],$borderWidth:j.borderWidth,$disabled:W,$variant:m,$color:P,$size:w,children:b.jsx(Dd,{size:"small",color:Z,loading:l,display:"flex",alignItems:"center",justifyContent:"center",children:Le})})})},qx=de(k)`
219
219
  background-color: ${({theme:n,$color:o})=>n.colors[o]};
220
220
  ${({$orientation:n,$thickness:o})=>n==="horizontal"?`
221
221
  height: ${o}px;
package/dist/index.js CHANGED
@@ -7453,7 +7453,7 @@ const Qv = (n = "xl") => {
7453
7453
  onClick: D,
7454
7454
  style: C,
7455
7455
  "data-testid": w,
7456
- flex: T.flex,
7456
+ ...T,
7457
7457
  children: /* @__PURE__ */ S(
7458
7458
  Na,
7459
7459
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aic-kits/react",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -46,5 +46,5 @@
46
46
  "vite-plugin-dts": "^4.3.0",
47
47
  "vitest": "^2.1.8"
48
48
  },
49
- "gitHead": "9af6ca7083d16e62b97d62dfd0b06480fcf624ca"
49
+ "gitHead": "43783d549819ab43b1a0e52f9f069dbc6b977f90"
50
50
  }