@machinerd/js-module 0.3.1 → 0.4.0
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/README.md +147 -21
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.cts +3 -18
- package/dist/hooks/index.d.mts +3 -18
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks-B6OJ8mCP.cjs +1 -0
- package/dist/hooks-Dr3L4nS9.mjs +1 -0
- package/dist/index-CWgr7lXX.d.cts +661 -0
- package/dist/index-CfKO4Lbp.d.mts +661 -0
- package/dist/index-DiZ4xS_f.d.mts +37 -0
- package/dist/index-OjfbEYpE.d.cts +37 -0
- package/dist/index.d.cts +1 -36
- package/dist/index.d.mts +1 -36
- package/dist/skeleton-BNKvM7GW.mjs +1 -0
- package/dist/skeleton-D80eauT0.cjs +1 -0
- package/dist/styles/index.css +331 -189
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.d.cts +40 -272
- package/dist/ui/index.d.mts +47 -279
- package/dist/ui/index.mjs +1 -1
- package/dist/ui-client/index.cjs +1 -0
- package/dist/ui-client/index.d.cts +158 -0
- package/dist/ui-client/index.d.mts +158 -0
- package/dist/ui-client/index.mjs +1 -0
- package/dist/util/index.cjs +1 -1
- package/dist/util/index.d.cts +31 -22
- package/dist/util/index.d.mts +30 -22
- package/dist/util/index.mjs +1 -1
- package/dist/util-BMnQ9hLK.cjs +1 -0
- package/dist/util-BNSPNLzy.mjs +1 -0
- package/package.json +17 -13
- package/dist/hooks-C9M3V-Pb.mjs +0 -1
- package/dist/hooks-DPYIex_y.cjs +0 -1
- package/dist/ui/client-only/index.cjs +0 -1
- package/dist/ui/client-only/index.d.cts +0 -136
- package/dist/ui/client-only/index.d.mts +0 -136
- package/dist/ui/client-only/index.mjs +0 -1
- package/dist/util-BrmjOcya.mjs +0 -1
- package/dist/util-CDkao6z3.cjs +0 -1
package/dist/ui/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../util-CDkao6z3.cjs`);let n=require(`clsx`);n=e.t(n);let r=require(`react`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`class-variance-authority`),o=require(`@radix-ui/react-slot`);function s({className:e,items:t,render:a,...o}){return(0,i.jsx)(`nav`,{"data-komc":!0,className:(0,n.default)(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:(0,i.jsx)(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>(0,i.jsx)(r.default.Fragment,{children:a(e)},t))})})}const c=(0,a.cva)(t.f(`komc:flex komc:justify-center komc:items-center komc:gap-x-2 komc:w-full`,`komc:transition-colors komc:duration-200 komc:relative`,`komc:[&_svg]:transition-colors komc:[&_svg]:duration-200`,`komc:cursor-pointer komc:disabled:cursor-default`),{variants:{size:{xxs:`komc:h-7.5`,xs:`komc:h-8`,sm:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`,"4xl":`komc:h-15`},shadow:{none:``,sm:`komc:drop-shadow-sm`,md:`komc:drop-shadow-md`,lg:`komc:drop-shadow-lg`,xl:`komc:drop-shadow-xl`,"2xl":`komc:drop-shadow-2xl`,"3xl":`komc:drop-shadow-3xl`},outline:{line:`komc:border`,solid:`komc:border komc:border-transparent`,clear:`komc:border-none`},variant:{blue:``,duo:``,white:``,gray:``,neutral:``,night:``,black:``,sky:``,"sky-blue":``,indigo:``},px:{none:`komc:px-0`,xs:`komc:px-0.5`,sm:`komc:px-1`,md:`komc:px-1.5`,lg:`komc:px-2`,xl:`komc:px-3`,"2xl":`komc:px-4`,"3xl":`komc:px-5`,"4xl":`komc:px-6`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},compoundVariants:[{outline:`line`,variant:`blue`,className:t.f(`komc:border-blue-500 komc:bg-white komc:text-blue-500`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`duo`,className:t.f(`komc:border-blue-500 komc:bg-white komc:text-brand-blck`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`white`,className:t.f(`komc:border-gray-600 komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200 komc:hover:text-brand-blck`,`komc:active:bg-gray-200 komc:active:text-brand-blck`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`gray`,className:t.f(`komc:border-white komc:bg-transparent komc:text-white`,`komc:hover:bg-[rgb(199,199,199)] komc:hover:text-white`,`komc:active:bg-[rgb(199,199,199)] komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`neutral`,className:t.f(`komc:border-gray-800 komc:bg-transparent komc:text-black`,`komc:hover:bg-gray-200 komc:hover:text-black`,`komc:active:bg-gray-200 komc:active:text-black`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky`,className:t.f(`komc:border-sky-750 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-750 komc:hover:text-white`,`komc:active:bg-sky-750 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky-blue`,className:t.f(`komc:border-sky-450 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-450 komc:hover:text-white`,`komc:active:bg-sky-450 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`solid`,variant:`white`,className:t.f(`komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200`,`komc:active:bg-gray-200`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`gray`,className:t.f(`komc:bg-gray-100 komc:text-blue-500`,`komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`blue`,className:t.f(`komc:bg-blue-500 komc:text-white`,`komc:hover:bg-night-700 komc:hover:text-white`,`komc:active:bg-night-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`night`,className:t.f(`komc:bg-night-700 komc:text-white`,`komc:hover:bg-night-800 komc:hover:text-white`,`komc:active:bg-night-800 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`black`,className:t.f(`komc:bg-[rgb(95,95,96)] komc:text-white`,`komc:hover:bg-[rgb(76,76,77)] komc:hover:text-white`,`komc:active:bg-[rgb(76,76,77)] komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`sky`,className:t.f(`komc:bg-sky-750 komc:text-white`,`komc:hover:bg-sky-950 komc:hover:text-white`,`komc:active:bg-sky-950 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`sky-blue`,className:t.f(`komc:bg-sky-450 komc:text-white`,`komc:hover:bg-sky-650 komc:hover:text-white`,`komc:active:bg-sky-650 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`indigo`,className:t.f(`komc:bg-indigo-600 komc:text-white`,`komc:hover:bg-indigo-700 komc:hover:text-white`,`komc:active:bg-indigo-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`clear`,variant:`sky`,className:t.f(`komc:bg-transparent komc:text-[#1890FF]`,`komc:hover:bg-transparent komc:hover:text-[#1890FF] komc:hover:underline`,`komc:active:bg-transparent komc:active:text-[#1890FF] komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`clear`,variant:`gray`,className:t.f(`komc:bg-transparent komc:text-gray-800`,`komc:hover:bg-transparent komc:hover:text-gray-800 komc:hover:underline`,`komc:active:bg-transparent komc:active:text-gray-800 komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)}],defaultVariants:{size:`md`,shadow:`none`,outline:`line`,variant:`blue`,px:`2xl`,rounded:`sm`}}),l=(0,r.forwardRef)(({type:e=`button`,className:t,id:n,size:r,shadow:a,outline:s,variant:l,px:u,rounded:d,asChild:f,...p},m)=>(0,i.jsx)(f?o.Slot:`button`,{ref:m,...p,type:e,id:n,className:c({size:r,shadow:a,outline:s,variant:l,px:u,rounded:d,className:t})}));var u=l;function d({condition:e,wrapper:t,children:n}){return e?t(n):n}const f=(0,a.cva)(`komc:flex komc:flex-col komc:w-full komc:mx-auto`,{variants:{maxWidth:{none:``,xs:`komc:max-w-xs`,sm:`komc:max-w-sm`,md:`komc:max-w-md`,lg:`komc:max-w-lg`,xl:`komc:max-w-xl`,"2xl":`komc:max-w-2xl`,"3xl":`komc:max-w-3xl`,"4xl":`komc:max-w-4xl`,"5xl":`komc:max-w-5xl`,"6xl":`komc:max-w-6xl`,"7xl":`komc:max-w-7xl`,full:`komc:max-w-full`}},defaultVariants:{maxWidth:`full`}});function p({className:e,children:t,maxWidth:r,...a}){return(0,i.jsx)(`footer`,{"data-komc":!0,className:(0,n.default)(`komc:block komc:w-full komc:h-full`,`komc:border-t komc:border-neutral-200`,e),...a,children:(0,i.jsx)(`div`,{className:f({maxWidth:r}),children:t})})}const m=(0,a.cva)(t.f(`komc:flex komc:items-center`,`komc:mx-auto komc:min-h-10`),{variants:{maxWidth:{none:``,sm:`komc:max-w-sm`,md:`komc:max-w-md`,lg:`komc:max-w-lg`,xl:`komc:max-w-xl`,"2xl":`komc:max-w-2xl`,"3xl":`komc:max-w-3xl`,"4xl":`komc:max-w-4xl`,"5xl":`komc:max-w-5xl`,"6xl":`komc:max-w-6xl`,"7xl":`komc:max-w-7xl`,"8xl":`komc:max-w-330`,full:`komc:max-w-full`},size:{sm:`komc:h-10`,md:`komc:h-12`,lg:`komc:h-14`,xl:`komc:h-16`,"2xl":`komc:h-18`,"3xl":`komc:h-20`,"4xl":`komc:h-22`,"4.25xl":`komc:h-22.5`,"5xl":`komc:h-24`,"6xl":`komc:h-26`,"7xl":`komc:h-28`,"8xl":`komc:h-30`,full:`komc:h-full`}},defaultVariants:{maxWidth:`full`,size:`xl`}});function h({children:e,maxWidth:t,size:r,className:a,...o}){return(0,i.jsx)(`header`,{"data-komc":!0,className:(0,n.default)(`komc:w-full komc:sticky komc:top-0 komc:z-1000`,`komc:transition-all komc:duration-200`,a),...o,children:(0,i.jsx)(`div`,{className:m({maxWidth:t,size:r}),children:e})})}const g=(0,a.cva)(t.f(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}}),_=(0,r.forwardRef)(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:a=`line`,rounded:o=`lg`,className:s,...c},l)=>(0,i.jsxs)(`div`,{"data-komc":!0,className:g({size:n,gap:r,outline:a,rounded:o,className:s}),children:[e,(0,i.jsx)(`input`,{ref:l,type:`text`,...c}),t]}));var v=_;const y=(0,a.cva)(t.f(`komc:w-full komc:animate-pulse komc:bg-gray-200`),{variants:{size:{xs:`komc:h-4`,sm:`komc:h-8`,md:`komc:h-12`,lg:`komc:h-16`,xl:`komc:h-20`,"2xl":`komc:h-24`,"3xl":`komc:h-28`,square:`komc:h-auto komc:aspect-square`,full:`komc:h-full`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},defaultVariants:{size:`sm`,rounded:`sm`}});function b({size:e,rounded:t,width:n,height:r,className:a,...o}){let s=n?typeof n==`string`?n:`${n}px`:void 0,c=r?typeof r==`string`?r:`${r}px`:void 0;return(0,i.jsx)(`div`,{"data-komc":!0,className:y({size:e,rounded:t,className:a}),style:{width:s,height:c},...o})}exports.BottomAppBar=s,exports.Button=u,exports.ConditionalWrapper=d,exports.Footer=p,exports.Header=h,exports.Input=v,exports.Skeleton=b;
|
|
1
|
+
const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../util-BMnQ9hLK.cjs`),n=require(`../skeleton-D80eauT0.cjs`);let r=require(`clsx`);r=e.t(r);let i=require(`react`);i=e.t(i);let a=require(`react/jsx-runtime`),o=require(`class-variance-authority`),s=require(`@radix-ui/react-slot`);function c({className:e,items:t,render:n,...o}){return(0,a.jsx)(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:(0,r.default)(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:(0,a.jsx)(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>(0,a.jsx)(i.default.Fragment,{children:n(e)},t))})})}const l=(0,o.cva)(t.y(`komc:flex komc:justify-center komc:items-center komc:gap-x-2 komc:w-full`,`komc:transition-colors komc:duration-200 komc:relative`,`komc:[&_svg]:transition-colors komc:[&_svg]:duration-200`,`komc:cursor-pointer komc:disabled:cursor-default`),{variants:{size:{xxs:`komc:h-7.5`,xs:`komc:h-8`,sm:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`,"4xl":`komc:h-15`},shadow:{none:``,sm:`komc:drop-shadow-sm`,md:`komc:drop-shadow-md`,lg:`komc:drop-shadow-lg`,xl:`komc:drop-shadow-xl`,"2xl":`komc:drop-shadow-2xl`,"3xl":`komc:drop-shadow-3xl`},outline:{line:`komc:border`,solid:`komc:border komc:border-transparent`,clear:`komc:border-none`},variant:{blue:``,duo:``,white:``,gray:``,neutral:``,night:``,black:``,sky:``,"sky-blue":``,indigo:``},px:{none:`komc:px-0`,xs:`komc:px-0.5`,sm:`komc:px-1`,md:`komc:px-1.5`,lg:`komc:px-2`,xl:`komc:px-3`,"2xl":`komc:px-4`,"3xl":`komc:px-5`,"4xl":`komc:px-6`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},compoundVariants:[{outline:`line`,variant:`blue`,className:t.y(`komc:border-blue-500 komc:bg-white komc:text-blue-500`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`duo`,className:t.y(`komc:border-blue-500 komc:bg-white komc:text-brand-blck`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`white`,className:t.y(`komc:border-gray-600 komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200 komc:hover:text-brand-blck`,`komc:active:bg-gray-200 komc:active:text-brand-blck`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`gray`,className:t.y(`komc:border-white komc:bg-transparent komc:text-white`,`komc:hover:bg-[rgb(199,199,199)] komc:hover:text-white`,`komc:active:bg-[rgb(199,199,199)] komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`neutral`,className:t.y(`komc:border-gray-800 komc:bg-transparent komc:text-black`,`komc:hover:bg-gray-200 komc:hover:text-black`,`komc:active:bg-gray-200 komc:active:text-black`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky`,className:t.y(`komc:border-sky-750 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-750 komc:hover:text-white`,`komc:active:bg-sky-750 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky-blue`,className:t.y(`komc:border-sky-450 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-450 komc:hover:text-white`,`komc:active:bg-sky-450 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`solid`,variant:`white`,className:t.y(`komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200`,`komc:active:bg-gray-200`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`gray`,className:t.y(`komc:bg-gray-100 komc:text-blue-500`,`komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`blue`,className:t.y(`komc:bg-blue-500 komc:text-white`,`komc:hover:bg-night-700 komc:hover:text-white`,`komc:active:bg-night-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`night`,className:t.y(`komc:bg-night-700 komc:text-white`,`komc:hover:bg-night-800 komc:hover:text-white`,`komc:active:bg-night-800 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`black`,className:t.y(`komc:bg-[rgb(95,95,96)] komc:text-white`,`komc:hover:bg-[rgb(76,76,77)] komc:hover:text-white`,`komc:active:bg-[rgb(76,76,77)] komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`sky`,className:t.y(`komc:bg-sky-750 komc:text-white`,`komc:hover:bg-sky-950 komc:hover:text-white`,`komc:active:bg-sky-950 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`sky-blue`,className:t.y(`komc:bg-sky-450 komc:text-white`,`komc:hover:bg-sky-650 komc:hover:text-white`,`komc:active:bg-sky-650 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`indigo`,className:t.y(`komc:bg-indigo-600 komc:text-white`,`komc:hover:bg-indigo-700 komc:hover:text-white`,`komc:active:bg-indigo-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`clear`,variant:`sky`,className:t.y(`komc:bg-transparent komc:text-[#1890FF]`,`komc:hover:bg-transparent komc:hover:text-[#1890FF] komc:hover:underline`,`komc:active:bg-transparent komc:active:text-[#1890FF] komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`clear`,variant:`gray`,className:t.y(`komc:bg-transparent komc:text-gray-800`,`komc:hover:bg-transparent komc:hover:text-gray-800 komc:hover:underline`,`komc:active:bg-transparent komc:active:text-gray-800 komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)}],defaultVariants:{size:`md`,shadow:`none`,outline:`line`,variant:`blue`,px:`2xl`,rounded:`sm`}}),u=(0,i.forwardRef)(({type:e=`button`,className:t,id:n,size:r,shadow:i,outline:o,variant:c,px:u,rounded:d,asChild:f,...p},m)=>(0,a.jsx)(f?s.Slot:`button`,{ref:m,...p,type:e,id:n,className:l({size:r,shadow:i,outline:o,variant:c,px:u,rounded:d,className:t})}));var d=u;function f({condition:e,wrapper:t,children:n}){return e?t(n):n}const p=(0,o.cva)(t.y(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}}),m=(0,i.forwardRef)(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:i=`line`,rounded:o=`lg`,className:s,...c},l)=>(0,a.jsxs)(`div`,{"data-komc":!0,className:p({size:n,gap:r,outline:i,rounded:o,className:s}),children:[e,(0,a.jsx)(`input`,{ref:l,type:`text`,...c}),t]}));var h=m;function g({children:e,className:t,...n}){return(0,a.jsx)(`span`,{...n,"data-komc":!0,"data-text":`${e}`,className:(0,r.default)(`komc:inline-flex komc:flex-col komc:justify-center komc:items-center`,`komc:after:content-[attr(data-text)] komc:after:font-bold`,`komc:after:h-0 komc:after:invisible komc:after:overflow-hidden`,`komc:after:select-none komc:after:pointer-events-none`,t),children:e})}exports.BottomAppBar=c,exports.Button=d,exports.ConditionalWrapper=f,exports.Input=h,exports.Skeleton=n.t,exports.StableText=g;
|
package/dist/ui/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react4 from "react";
|
|
2
|
-
import React$1, { HTMLAttributes } from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
2
|
+
import React$1, { ComponentProps, HTMLAttributes } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as class_variance_authority_types1 from "class-variance-authority/types";
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
|
|
7
7
|
//#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
|
|
@@ -9,10 +9,6 @@ interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
items: T[];
|
|
10
10
|
render: (item: T) => React$1.ReactNode;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* @param items - Items to render
|
|
14
|
-
* @param render - Render function
|
|
15
|
-
*/
|
|
16
12
|
declare function BottomAppBar<T>({
|
|
17
13
|
className,
|
|
18
14
|
items,
|
|
@@ -21,91 +17,32 @@ declare function BottomAppBar<T>({
|
|
|
21
17
|
}: BottomAppBarProps<T>): React$1.ReactNode;
|
|
22
18
|
//#endregion
|
|
23
19
|
//#region src/ui/button/button.d.ts
|
|
24
|
-
declare const classes$
|
|
25
|
-
size?: "
|
|
26
|
-
shadow?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" |
|
|
20
|
+
declare const classes$2: (props?: ({
|
|
21
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "3xl" | "xxs" | "4xl" | null | undefined;
|
|
22
|
+
shadow?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
27
23
|
outline?: "line" | "solid" | "clear" | null | undefined;
|
|
28
24
|
variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
|
|
29
|
-
px?: "
|
|
30
|
-
rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
31
|
-
} &
|
|
25
|
+
px?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
|
|
26
|
+
rounded?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
27
|
+
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
32
28
|
interface VariantMap {
|
|
33
29
|
line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
|
|
34
30
|
solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
|
|
35
31
|
clear: 'sky' | 'gray';
|
|
36
32
|
}
|
|
37
|
-
type BaseProps = Omit<VariantProps<typeof classes$
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* - white
|
|
51
|
-
* - gray
|
|
52
|
-
* - neutral
|
|
53
|
-
* - sky
|
|
54
|
-
* - sky-blue
|
|
55
|
-
* @property solid
|
|
56
|
-
* - white
|
|
57
|
-
* - gray
|
|
58
|
-
* - blue
|
|
59
|
-
* - night
|
|
60
|
-
* - black
|
|
61
|
-
* - sky
|
|
62
|
-
* - sky-blue
|
|
63
|
-
* - indigo
|
|
64
|
-
* @property clear
|
|
65
|
-
* - sky
|
|
66
|
-
* - gray
|
|
67
|
-
* @param px
|
|
68
|
-
* @property
|
|
69
|
-
* - none - px-0
|
|
70
|
-
* - xs - px-0.5
|
|
71
|
-
* - sm - px-1
|
|
72
|
-
* - md - px-1.5
|
|
73
|
-
* - lg - px-2
|
|
74
|
-
* - xl - px-3
|
|
75
|
-
* - 2xl - px-4
|
|
76
|
-
* - 3xl - px-5
|
|
77
|
-
* - 4xl - px-6
|
|
78
|
-
* @param rounded
|
|
79
|
-
* @property
|
|
80
|
-
* - none - rounded-none
|
|
81
|
-
* - sm - rounded-sm
|
|
82
|
-
* - md - rounded-md
|
|
83
|
-
* - lg - rounded-lg
|
|
84
|
-
* - xl - rounded-xl
|
|
85
|
-
* - 2xl - rounded-2xl
|
|
86
|
-
* - 3xl - rounded-3xl
|
|
87
|
-
* - full - rounded-full
|
|
88
|
-
* @param size
|
|
89
|
-
* @property
|
|
90
|
-
* - xxs - h-7.5
|
|
91
|
-
* - xs - h-8
|
|
92
|
-
* - sm - h-9
|
|
93
|
-
* - md - h-10
|
|
94
|
-
* - lg - h-11
|
|
95
|
-
* - xl - h-12
|
|
96
|
-
* - 2xl - h-13
|
|
97
|
-
* - 3xl - h-14
|
|
98
|
-
* - 4xl - h-15
|
|
99
|
-
* @param shadow
|
|
100
|
-
* @property
|
|
101
|
-
* - none
|
|
102
|
-
* - sm
|
|
103
|
-
* - md
|
|
104
|
-
* - lg
|
|
105
|
-
* - xl
|
|
106
|
-
* - 2xl
|
|
107
|
-
* - 3xl
|
|
108
|
-
*/
|
|
33
|
+
type BaseProps = Omit<VariantProps<typeof classes$2>, 'outline' | 'variant'>;
|
|
34
|
+
type ButtonProps = ComponentProps<'button'> & BaseProps & ({
|
|
35
|
+
outline?: 'line';
|
|
36
|
+
variant?: VariantMap['line'];
|
|
37
|
+
} | {
|
|
38
|
+
outline: 'solid';
|
|
39
|
+
variant?: VariantMap['solid'];
|
|
40
|
+
} | {
|
|
41
|
+
outline: 'clear';
|
|
42
|
+
variant?: VariantMap['clear'];
|
|
43
|
+
}) & {
|
|
44
|
+
asChild?: boolean;
|
|
45
|
+
};
|
|
109
46
|
declare const Button: react4.ForwardRefExoticComponent<(Omit<react4.ClassAttributes<HTMLButtonElement> & react4.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
|
|
110
47
|
outline?: "line";
|
|
111
48
|
variant?: VariantMap["line"];
|
|
@@ -129,218 +66,40 @@ interface ConditionalWrapperProps {
|
|
|
129
66
|
wrapper: (children: React.ReactNode) => React.ReactNode;
|
|
130
67
|
children: React.ReactNode;
|
|
131
68
|
}
|
|
132
|
-
/**
|
|
133
|
-
* @param condition - Condition to wrap the children
|
|
134
|
-
* @param wrapper - Wrapper function
|
|
135
|
-
* @param children - Children to wrap
|
|
136
|
-
*/
|
|
137
69
|
declare function ConditionalWrapper({
|
|
138
70
|
condition,
|
|
139
71
|
wrapper,
|
|
140
72
|
children
|
|
141
73
|
}: ConditionalWrapperProps): react4.ReactNode;
|
|
142
74
|
//#endregion
|
|
143
|
-
//#region src/ui/footer/footer.d.ts
|
|
144
|
-
declare const classes$3: (props?: ({
|
|
145
|
-
maxWidth?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | "none" | "4xl" | "5xl" | "6xl" | "7xl" | null | undefined;
|
|
146
|
-
} & class_variance_authority_types3.ClassProp) | undefined) => string;
|
|
147
|
-
interface FooterProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes$3> {
|
|
148
|
-
/**
|
|
149
|
-
* @param maxWidth - Maximum width of the footer
|
|
150
|
-
* @default full
|
|
151
|
-
* @property
|
|
152
|
-
* - none: 0
|
|
153
|
-
* - xs: 320px
|
|
154
|
-
* - sm: 384px
|
|
155
|
-
* - md: 448px
|
|
156
|
-
* - lg: 512px
|
|
157
|
-
* - xl: 576px
|
|
158
|
-
* - 2xl: 672px
|
|
159
|
-
* - 3xl: 768px
|
|
160
|
-
* - 4xl: 896px
|
|
161
|
-
* - 5xl: 1024px
|
|
162
|
-
* - 6xl: 1152px
|
|
163
|
-
* - 7xl: 1280px
|
|
164
|
-
* - full: 100%
|
|
165
|
-
*/
|
|
166
|
-
maxWidth?: VariantProps<typeof classes$3>['maxWidth'];
|
|
167
|
-
}
|
|
168
|
-
declare function Footer({
|
|
169
|
-
className,
|
|
170
|
-
children,
|
|
171
|
-
maxWidth,
|
|
172
|
-
...props
|
|
173
|
-
}: FooterProps): react_jsx_runtime5.JSX.Element;
|
|
174
|
-
//#endregion
|
|
175
|
-
//#region src/ui/header/header.d.ts
|
|
176
|
-
declare const classes$2: (props?: ({
|
|
177
|
-
maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | "none" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | null | undefined;
|
|
178
|
-
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "4.25xl" | null | undefined;
|
|
179
|
-
} & class_variance_authority_types3.ClassProp) | undefined) => string;
|
|
180
|
-
interface HeaderProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes$2> {
|
|
181
|
-
children?: React.ReactNode;
|
|
182
|
-
/**
|
|
183
|
-
* @param maxWidth - Maximum width of the header
|
|
184
|
-
* @default full
|
|
185
|
-
* @property
|
|
186
|
-
* - none: 0
|
|
187
|
-
* - xs: 320px
|
|
188
|
-
* - sm: 384px
|
|
189
|
-
* - md: 448px
|
|
190
|
-
* - lg: 512px
|
|
191
|
-
* - xl: 576px
|
|
192
|
-
* - 2xl: 672px
|
|
193
|
-
* - 3xl: 768px
|
|
194
|
-
* - 4xl: 896px
|
|
195
|
-
* - 5xl: 1024px
|
|
196
|
-
* - 6xl: 1152px
|
|
197
|
-
* - 7xl: 1280px
|
|
198
|
-
* - 8xl: 1320px
|
|
199
|
-
* - full: 100%
|
|
200
|
-
*/
|
|
201
|
-
maxWidth?: VariantProps<typeof classes$2>['maxWidth'];
|
|
202
|
-
/**
|
|
203
|
-
* @param size - Size of the header
|
|
204
|
-
* @default xl
|
|
205
|
-
* @property
|
|
206
|
-
* - sm: 40px
|
|
207
|
-
* - md: 48px
|
|
208
|
-
* - lg: 56px
|
|
209
|
-
* - xl: 64px
|
|
210
|
-
* - 2xl: 72px
|
|
211
|
-
* - 3xl: 88px
|
|
212
|
-
* - 4xl: 80px
|
|
213
|
-
* - 4.25xl: 90px
|
|
214
|
-
* - 5xl: 96px
|
|
215
|
-
* - 6xl: 104px
|
|
216
|
-
* - 7xl: 112px
|
|
217
|
-
* - 8xl: 120px
|
|
218
|
-
* - full: 100%
|
|
219
|
-
*/
|
|
220
|
-
size?: VariantProps<typeof classes$2>['size'];
|
|
221
|
-
}
|
|
222
|
-
declare function Header({
|
|
223
|
-
children,
|
|
224
|
-
maxWidth,
|
|
225
|
-
size,
|
|
226
|
-
className,
|
|
227
|
-
...props
|
|
228
|
-
}: HeaderProps): react_jsx_runtime5.JSX.Element;
|
|
229
|
-
//#endregion
|
|
230
75
|
//#region src/ui/input/input.d.ts
|
|
231
76
|
declare const classes$1: (props?: ({
|
|
232
|
-
size?: "
|
|
233
|
-
gap?: "
|
|
77
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "base" | "3xl" | null | undefined;
|
|
78
|
+
gap?: "none" | "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
234
79
|
outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
|
|
235
|
-
rounded?: "sm" | "md" | "lg" | "xl" | "2xl" |
|
|
236
|
-
} &
|
|
80
|
+
rounded?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
81
|
+
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
237
82
|
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
|
|
238
|
-
/**
|
|
239
|
-
* @param size - Height of the input
|
|
240
|
-
* @default lg - 44px
|
|
241
|
-
* @property
|
|
242
|
-
* - xs: 30px
|
|
243
|
-
* - sm: 32px
|
|
244
|
-
* - base: 36px
|
|
245
|
-
* - md: 40px
|
|
246
|
-
* - lg: 44px
|
|
247
|
-
* - xl: 48px
|
|
248
|
-
* - 2xl: 52px
|
|
249
|
-
* - 3xl: 56px
|
|
250
|
-
*/
|
|
251
83
|
size?: VariantProps<typeof classes$1>['size'];
|
|
252
|
-
/**
|
|
253
|
-
* @param gap - Gap between the input and the prefix/suffix
|
|
254
|
-
* @default xl - 20px
|
|
255
|
-
* @property
|
|
256
|
-
* - none: 0
|
|
257
|
-
* - xs: 4px
|
|
258
|
-
* - sm: 8px
|
|
259
|
-
* - md: 12px
|
|
260
|
-
* - lg: 16px
|
|
261
|
-
* - xl: 20px
|
|
262
|
-
*/
|
|
263
84
|
gap?: VariantProps<typeof classes$1>['gap'];
|
|
264
85
|
outline?: VariantProps<typeof classes$1>['outline'];
|
|
265
|
-
/**
|
|
266
|
-
* @param rounded - Border radius of the input
|
|
267
|
-
* @default lg
|
|
268
|
-
* @property
|
|
269
|
-
* - none: 0
|
|
270
|
-
* - sm: 2px
|
|
271
|
-
* - md: 6px
|
|
272
|
-
* - lg: 8px
|
|
273
|
-
* - xl: 12px
|
|
274
|
-
* - 2xl: 16px
|
|
275
|
-
*/
|
|
276
86
|
rounded?: VariantProps<typeof classes$1>['rounded'];
|
|
277
87
|
prefix?: React.ReactNode;
|
|
278
88
|
surffix?: React.ReactNode;
|
|
279
89
|
}
|
|
280
|
-
/**
|
|
281
|
-
* @param prefix - Prefix of the input
|
|
282
|
-
* @param surffix - Surffix of the input
|
|
283
|
-
* @param size - Size of the input
|
|
284
|
-
* @param gap - Gap between the input and the prefix/suffix
|
|
285
|
-
* @param outline - Outline of the input
|
|
286
|
-
* @param rounded - Border radius of the input
|
|
287
|
-
*/
|
|
288
90
|
declare const Input: react4.ForwardRefExoticComponent<InputProps & react4.RefAttributes<HTMLInputElement>>;
|
|
289
91
|
//#endregion
|
|
290
92
|
//#region src/ui/skeleton/skeleton.d.ts
|
|
291
93
|
declare const classes: (props?: ({
|
|
292
|
-
size?: "
|
|
293
|
-
rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
294
|
-
} &
|
|
94
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
|
|
95
|
+
rounded?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
|
|
96
|
+
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
295
97
|
interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
|
|
296
|
-
/**
|
|
297
|
-
* @param width - Width of the skeleton
|
|
298
|
-
* @description string or number, number unit is px
|
|
299
|
-
* @default 100
|
|
300
|
-
*/
|
|
301
98
|
width?: string | number;
|
|
302
|
-
/**
|
|
303
|
-
* @param height - Height of the skeleton
|
|
304
|
-
* @description string or number, number unit is px
|
|
305
|
-
* @default 100
|
|
306
|
-
*/
|
|
307
99
|
height?: string | number;
|
|
308
|
-
/**
|
|
309
|
-
* @param size - Size of the skeleton (height)
|
|
310
|
-
* @default sm
|
|
311
|
-
* @property
|
|
312
|
-
* - xs: 4px
|
|
313
|
-
* - sm: 8px
|
|
314
|
-
* - md: 12px
|
|
315
|
-
* - lg: 16px
|
|
316
|
-
* - xl: 20px
|
|
317
|
-
* - 2xl: 24px
|
|
318
|
-
* - 3xl: 28px
|
|
319
|
-
* - square: 100%
|
|
320
|
-
* - full: 100%
|
|
321
|
-
*/
|
|
322
100
|
size?: VariantProps<typeof classes>['size'];
|
|
323
|
-
/**
|
|
324
|
-
* @param rounded - Rounded of the skeleton
|
|
325
|
-
* @default sm
|
|
326
|
-
* @property
|
|
327
|
-
* - none: 0
|
|
328
|
-
* - sm: 2px
|
|
329
|
-
* - md: 6px
|
|
330
|
-
* - lg: 8px
|
|
331
|
-
* - xl: 12px
|
|
332
|
-
* - 2xl: 16px
|
|
333
|
-
* - 3xl: 20px
|
|
334
|
-
* - full: 100%
|
|
335
|
-
*/
|
|
336
101
|
rounded?: VariantProps<typeof classes>['rounded'];
|
|
337
102
|
}
|
|
338
|
-
/**
|
|
339
|
-
* @param size - Size of the skeleton (height)
|
|
340
|
-
* @param rounded - Rounded of the skeleton
|
|
341
|
-
* @param width - Width of the skeleton
|
|
342
|
-
* @param height - Height of the skeleton
|
|
343
|
-
*/
|
|
344
103
|
declare function Skeleton({
|
|
345
104
|
size,
|
|
346
105
|
rounded,
|
|
@@ -348,6 +107,15 @@ declare function Skeleton({
|
|
|
348
107
|
height,
|
|
349
108
|
className,
|
|
350
109
|
...props
|
|
351
|
-
}: SkeletonProps):
|
|
110
|
+
}: SkeletonProps): react_jsx_runtime0.JSX.Element;
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/ui/stable-text/stable-text.d.ts
|
|
113
|
+
declare function StableText({
|
|
114
|
+
children,
|
|
115
|
+
className,
|
|
116
|
+
...props
|
|
117
|
+
}: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
|
|
118
|
+
children: string | number;
|
|
119
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
352
120
|
//#endregion
|
|
353
|
-
export { BottomAppBar, type BottomAppBarProps, Button,
|
|
121
|
+
export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
|