@machinerd/js-module 0.8.1 → 0.10.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.
Files changed (101) hide show
  1. package/dist/api-client-B-kwZogn.mjs +1 -0
  2. package/dist/api-client-BH5tW3p8.cjs +1 -0
  3. package/dist/common-BQEGjmFn.cjs +1 -0
  4. package/dist/{common-Df03Ovdm.mjs → common-CCtD91nO.mjs} +1 -1
  5. package/dist/{common-Bn0Ko6B7.cjs → common-D4sUwkFd.cjs} +1 -1
  6. package/dist/common-L3y7_eAy.mjs +1 -0
  7. package/dist/hooks/common/index.cjs +1 -0
  8. package/dist/hooks/common/index.d.cts +71 -0
  9. package/dist/hooks/common/index.d.mts +71 -0
  10. package/dist/hooks/common/index.mjs +1 -0
  11. package/dist/hooks/use-snackbar.cjs +1 -0
  12. package/dist/hooks/use-snackbar.d.cts +10 -0
  13. package/dist/hooks/use-snackbar.d.mts +10 -0
  14. package/dist/hooks/use-snackbar.mjs +1 -0
  15. package/dist/{index-B3fFA21M.d.mts → index-CFOJBfVt.d.mts} +4 -0
  16. package/dist/{index-CeiAF-WU.d.cts → index-ChiDX5zW.d.cts} +4 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.cts +1 -1
  19. package/dist/index.d.mts +1 -1
  20. package/dist/index.mjs +1 -1
  21. package/dist/providers/api-client/index.cjs +1 -0
  22. package/dist/providers/{index.d.cts → api-client/index.d.cts} +3 -3
  23. package/dist/providers/{index.d.mts → api-client/index.d.mts} +1 -1
  24. package/dist/providers/api-client/index.mjs +1 -0
  25. package/dist/providers/noti-stack/index.cjs +1 -0
  26. package/dist/providers/noti-stack/index.d.cts +11 -0
  27. package/dist/providers/noti-stack/index.d.mts +11 -0
  28. package/dist/providers/noti-stack/index.mjs +1 -0
  29. package/dist/{skeleton-DtV9S1QK.cjs → skeleton-BCdxpynL.cjs} +1 -1
  30. package/dist/{skeleton-B6_oBhkl.mjs → skeleton-azZrk5-3.mjs} +1 -1
  31. package/dist/src-6KfzqI9Z.cjs +1 -0
  32. package/dist/src-Ce2i3Lkj.mjs +1 -0
  33. package/dist/styles/index.css +120 -0
  34. package/dist/ui/carousel/index.cjs +1 -1
  35. package/dist/ui/carousel/index.d.cts +9 -9
  36. package/dist/ui/carousel/index.d.mts +9 -9
  37. package/dist/ui/carousel/index.mjs +1 -1
  38. package/dist/ui/dialog/index.cjs +1 -1
  39. package/dist/ui/dialog/index.d.cts +2 -2
  40. package/dist/ui/dialog/index.d.mts +4 -4
  41. package/dist/ui/dialog/index.mjs +1 -1
  42. package/dist/ui/dnd/index.cjs +1 -0
  43. package/dist/ui/dnd/index.d.cts +17 -0
  44. package/dist/ui/dnd/index.d.mts +17 -0
  45. package/dist/ui/dnd/index.mjs +1 -0
  46. package/dist/ui/image/index.cjs +1 -1
  47. package/dist/ui/image/index.d.cts +8 -8
  48. package/dist/ui/image/index.d.mts +6 -6
  49. package/dist/ui/image/index.mjs +1 -1
  50. package/dist/ui/index.cjs +1 -1
  51. package/dist/ui/index.d.cts +19 -19
  52. package/dist/ui/index.d.mts +23 -23
  53. package/dist/ui/index.mjs +1 -1
  54. package/dist/ui/motion-dialog/index.cjs +1 -0
  55. package/dist/ui/motion-dialog/index.d.cts +34 -0
  56. package/dist/ui/motion-dialog/index.d.mts +34 -0
  57. package/dist/ui/motion-dialog/index.mjs +1 -0
  58. package/dist/ui/sheet/index.cjs +1 -1
  59. package/dist/ui/sheet/index.d.cts +2 -2
  60. package/dist/ui/sheet/index.d.mts +2 -2
  61. package/dist/ui/sheet/index.mjs +1 -1
  62. package/dist/ui/switch/index.cjs +1 -0
  63. package/dist/ui/switch/index.d.cts +16 -0
  64. package/dist/ui/switch/index.d.mts +16 -0
  65. package/dist/ui/switch/index.mjs +1 -0
  66. package/dist/ui/tooltip/index.cjs +1 -1
  67. package/dist/ui/tooltip/index.d.cts +2 -2
  68. package/dist/ui/tooltip/index.mjs +1 -1
  69. package/dist/use-dialog-stack-DmBRPhe2.cjs +1 -0
  70. package/dist/use-dialog-stack-STwnhvBB.mjs +1 -0
  71. package/dist/use-subset-image-CTy5mCLo.cjs +1 -0
  72. package/dist/use-subset-image-Ck1Gk5Qk.d.mts +601 -0
  73. package/dist/use-subset-image-LQWsE5P4.mjs +1 -0
  74. package/dist/use-subset-image-oZAiC9VK.d.cts +601 -0
  75. package/dist/util/common.cjs +1 -1
  76. package/dist/util/common.d.cts +8 -1
  77. package/dist/util/common.d.mts +8 -1
  78. package/dist/util/common.mjs +1 -1
  79. package/dist/util/fetcher.cjs +1 -0
  80. package/dist/util/fetcher.d.cts +15 -0
  81. package/dist/util/fetcher.d.mts +15 -0
  82. package/dist/util/fetcher.mjs +1 -0
  83. package/dist/util/file.mjs +1 -1
  84. package/package.json +66 -33
  85. package/dist/hooks/index.cjs +0 -1
  86. package/dist/hooks/index.d.cts +0 -2
  87. package/dist/hooks/index.d.mts +0 -2
  88. package/dist/hooks/index.mjs +0 -1
  89. package/dist/hooks-CUj2xuzU.cjs +0 -1
  90. package/dist/hooks-gbU5dqVF.mjs +0 -1
  91. package/dist/index-BFHrNSKP.d.mts +0 -655
  92. package/dist/index-DiRj3rRA.d.cts +0 -655
  93. package/dist/providers/index.cjs +0 -1
  94. package/dist/providers/index.mjs +0 -1
  95. package/dist/providers-CkXkdYcB.cjs +0 -1
  96. package/dist/providers-zftmvT1z.mjs +0 -1
  97. package/dist/src-CjpmdVyv.cjs +0 -1
  98. package/dist/src-CukOR3K2.mjs +0 -1
  99. package/dist/use-subset-image-D8ssrZhj.mjs +0 -1
  100. package/dist/use-subset-image-DC86cg6O.cjs +0 -1
  101. /package/dist/{file-DShNxIW4.mjs → file-CjW1pMb_.mjs} +0 -0
@@ -1 +1 @@
1
- "use client";import"../../src-CukOR3K2.mjs";import"../../common-Df03Ovdm.mjs";import"../../file-DShNxIW4.mjs";import{t as e}from"../../skeleton-B6_oBhkl.mjs";import"../../providers-zftmvT1z.mjs";import{n as t}from"../../use-subset-image-D8ssrZhj.mjs";import n from"clsx";import{forwardRef as r}from"react";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";const c=s(``,{variants:{fill:{true:`komc:w-full komc:h-full komc:absolute komc:inset-0`,false:``}},defaultVariants:{fill:!1}}),l=r(({...e},n)=>{let{ref:r,imageProps:i}=t({ref:n,...e});return a(`img`,{ref:r,...i})}),u=r(({skeleton:r=!0,layout:s=`stretch`,fallbackSrc:l,className:u,emptyNode:f,emptyNodeClassName:p,skeletonClassName:m,...h},g)=>{let{ref:_,isLoad:v,isError:y,imageProps:b}=t({ref:g,fallbackSrc:l,forceLoad:!r,...h}),x=!h.fill&&s===`intrinsic`?{width:`${h.width}px`,height:`${h.height}px`}:void 0,S=n(`komc:flex komc:justify-center komc:items-center komc:relative komc:min-h-0`,!h.fill&&s===`stretch`&&`komc:w-full komc:h-full`);return!l&&y&&f?h.fill?a(d,{className:p,children:f}):a(`div`,{"data-komc":!0,style:x,className:S,children:a(d,{className:p,children:f})}):h.fill?o(i,{children:[a(`img`,{ref:_,...b,className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:invisible`:`komc:visible`,u)}),a(`div`,{"data-komc":!0,className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:block`:`komc:hidden`),children:a(e,{size:`full`,className:m})})]}):o(`div`,{"data-komc":!0,style:x,className:S,children:[a(`img`,{ref:_,...b,className:n(c({fill:h.fill,className:u}),r&&!v?`komc:invisible`:`komc:visible`)}),a(`div`,{className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:block`:`komc:hidden`),children:a(e,{size:`full`,className:m})})]})}),d=({children:e,className:t})=>a(`div`,{"data-komc":!0,role:`alert`,className:n(`komc:flex komc:justify-center komc:items-center komc:w-full komc:h-full komc:bg-gray-100 komc:absolute komc:inset-0 komc:p-1`,t),children:e});var f=u;export{l as BaseImage,d as EmptyNode,f as Image};
1
+ "use client";import"../../src-Ce2i3Lkj.mjs";import"../../common-CCtD91nO.mjs";import"../../file-CjW1pMb_.mjs";import{t as e}from"../../skeleton-azZrk5-3.mjs";import"../../api-client-B-kwZogn.mjs";import{n as t}from"../../use-subset-image-LQWsE5P4.mjs";import n from"clsx";import{forwardRef as r}from"react";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";const c=s(``,{variants:{fill:{true:`komc:w-full komc:h-full komc:absolute komc:inset-0`,false:``}},defaultVariants:{fill:!1}}),l=r(({...e},n)=>{let{ref:r,imageProps:i}=t({ref:n,...e});return a(`img`,{ref:r,...i})}),u=r(({skeleton:r=!0,layout:s=`stretch`,fallbackSrc:l,className:u,emptyNode:f,emptyNodeClassName:p,skeletonClassName:m,...h},g)=>{let{ref:_,isLoad:v,isError:y,imageProps:b}=t({ref:g,fallbackSrc:l,forceLoad:!r,...h}),x=!h.fill&&s===`intrinsic`?{width:`${h.width}px`,height:`${h.height}px`}:void 0,S=n(`komc:flex komc:justify-center komc:items-center komc:relative komc:min-h-0`,!h.fill&&s===`stretch`&&`komc:w-full komc:h-full`);return!l&&y&&f?h.fill?a(d,{className:p,children:f}):a(`div`,{"data-komc":!0,style:x,className:S,children:a(d,{className:p,children:f})}):h.fill?o(i,{children:[a(`img`,{ref:_,...b,className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:invisible`:`komc:visible`,u)}),a(`div`,{"data-komc":!0,className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:block`:`komc:hidden`),children:a(e,{size:`full`,className:m})})]}):o(`div`,{"data-komc":!0,style:x,className:S,children:[a(`img`,{ref:_,...b,className:n(c({fill:h.fill,className:u}),r&&!v?`komc:invisible`:`komc:visible`)}),a(`div`,{className:n(`komc:w-full komc:h-full komc:absolute komc:inset-0`,r&&!v?`komc:block`:`komc:hidden`),children:a(e,{size:`full`,className:m})})]})}),d=({children:e,className:t})=>a(`div`,{"data-komc":!0,role:`alert`,className:n(`komc:flex komc:justify-center komc:items-center komc:w-full komc:h-full komc:bg-gray-100 komc:absolute komc:inset-0 komc:p-1`,t),children:e});var f=u;export{l as BaseImage,d as EmptyNode,f as Image};
package/dist/ui/index.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../common-Bn0Ko6B7.cjs`),n=require(`../skeleton-DtV9S1QK.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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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}function p({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const m=(0,o.cva)(t.n(`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`}}}),h=(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:m({size:n,gap:r,outline:i,rounded:o,className:s}),children:[e,(0,a.jsx)(`input`,{ref:l,type:`text`,...c}),t]}));var g=h;function _({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.ConditionalEitherWrapper=p,exports.ConditionalWrapper=f,exports.Input=g,exports.Skeleton=n.t,exports.StableText=_;
1
+ const e=require(`../chunk-Bmb41Sf3.cjs`),t=require(`../common-D4sUwkFd.cjs`),n=require(`../skeleton-BCdxpynL.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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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.n(`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,"data-komc":!0,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}function p({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const m=(0,o.cva)(t.n(`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`}}}),h=(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:m({size:n,gap:r,outline:i,rounded:o,className:s}),children:[e,(0,a.jsx)(`input`,{ref:l,type:`text`,...c}),t]}));var g=h;function _({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.ConditionalEitherWrapper=p,exports.ConditionalWrapper=f,exports.Input=g,exports.Skeleton=n.t,exports.StableText=_;
@@ -1,6 +1,6 @@
1
- import * as react11 from "react";
1
+ import * as react13 from "react";
2
2
  import React$1, { ComponentProps, HTMLAttributes } from "react";
3
- import * as react_jsx_runtime11 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
4
4
  import * as class_variance_authority_types2 from "class-variance-authority/types";
5
5
  import { VariantProps } from "class-variance-authority";
6
6
 
@@ -18,12 +18,12 @@ declare function BottomAppBar<T>({
18
18
  //#endregion
19
19
  //#region src/ui/button/button.d.ts
20
20
  declare const classes$2: (props?: ({
21
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "3xl" | "xxs" | "4xl" | null | undefined;
22
- shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
21
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xxs" | "xs" | "3xl" | "4xl" | null | undefined;
22
+ shadow?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | null | undefined;
23
23
  outline?: "line" | "solid" | "clear" | null | undefined;
24
24
  variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
25
- px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
26
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
25
+ px?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "xs" | "3xl" | "4xl" | null | undefined;
26
+ rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | null | undefined;
27
27
  } & class_variance_authority_types2.ClassProp) | undefined) => string;
28
28
  interface VariantMap {
29
29
  line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
@@ -43,22 +43,22 @@ type ButtonProps = ComponentProps<'button'> & BaseProps & ({
43
43
  }) & {
44
44
  asChild?: boolean;
45
45
  };
46
- declare const Button: react11.ForwardRefExoticComponent<(Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
46
+ declare const Button: react13.ForwardRefExoticComponent<(Omit<react13.ClassAttributes<HTMLButtonElement> & react13.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
47
47
  outline?: "line";
48
48
  variant?: VariantMap["line"];
49
49
  } & {
50
50
  asChild?: boolean;
51
- }, "ref"> | Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
51
+ }, "ref"> | Omit<react13.ClassAttributes<HTMLButtonElement> & react13.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
52
52
  outline: "solid";
53
53
  variant?: VariantMap["solid"];
54
54
  } & {
55
55
  asChild?: boolean;
56
- }, "ref"> | Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
56
+ }, "ref"> | Omit<react13.ClassAttributes<HTMLButtonElement> & react13.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
57
57
  outline: "clear";
58
58
  variant?: VariantMap["clear"];
59
59
  } & {
60
60
  asChild?: boolean;
61
- }, "ref">) & react11.RefAttributes<HTMLButtonElement>>;
61
+ }, "ref">) & react13.RefAttributes<HTMLButtonElement>>;
62
62
  //#endregion
63
63
  //#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
64
64
  interface ConditionalWrapperProps {
@@ -70,7 +70,7 @@ declare function ConditionalWrapper({
70
70
  condition,
71
71
  wrapper,
72
72
  children
73
- }: ConditionalWrapperProps): react11.ReactNode;
73
+ }: ConditionalWrapperProps): react13.ReactNode;
74
74
  //#endregion
75
75
  //#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
76
76
  interface ConditionalEitherWrapperProps {
@@ -84,14 +84,14 @@ declare function ConditionalEitherWrapper({
84
84
  trueWrapper,
85
85
  falseWrapper,
86
86
  children
87
- }: ConditionalEitherWrapperProps): react11.ReactNode;
87
+ }: ConditionalEitherWrapperProps): react13.ReactNode;
88
88
  //#endregion
89
89
  //#region src/ui/input/input.d.ts
90
90
  declare const classes$1: (props?: ({
91
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "base" | "3xl" | null | undefined;
92
- gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
91
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "base" | "xs" | "3xl" | null | undefined;
92
+ gap?: "sm" | "md" | "lg" | "xl" | "none" | "xs" | null | undefined;
93
93
  outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
94
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
94
+ rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | null | undefined;
95
95
  } & class_variance_authority_types2.ClassProp) | undefined) => string;
96
96
  interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
97
97
  size?: VariantProps<typeof classes$1>['size'];
@@ -101,12 +101,12 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
101
101
  prefix?: React.ReactNode;
102
102
  surffix?: React.ReactNode;
103
103
  }
104
- declare const Input: react11.ForwardRefExoticComponent<InputProps & react11.RefAttributes<HTMLInputElement>>;
104
+ declare const Input: react13.ForwardRefExoticComponent<InputProps & react13.RefAttributes<HTMLInputElement>>;
105
105
  //#endregion
106
106
  //#region src/ui/skeleton/skeleton.d.ts
107
107
  declare const classes: (props?: ({
108
108
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
109
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
109
+ rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | null | undefined;
110
110
  } & class_variance_authority_types2.ClassProp) | undefined) => string;
111
111
  interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
112
112
  width?: string | number;
@@ -121,7 +121,7 @@ declare function Skeleton({
121
121
  height,
122
122
  className,
123
123
  ...props
124
- }: SkeletonProps): react_jsx_runtime11.JSX.Element;
124
+ }: SkeletonProps): react_jsx_runtime13.JSX.Element;
125
125
  //#endregion
126
126
  //#region src/ui/stable-text/stable-text.d.ts
127
127
  declare function StableText({
@@ -130,6 +130,6 @@ declare function StableText({
130
130
  ...props
131
131
  }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
132
132
  children: string | number;
133
- }): react_jsx_runtime11.JSX.Element;
133
+ }): react_jsx_runtime13.JSX.Element;
134
134
  //#endregion
135
135
  export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalEitherWrapper, type ConditionalEitherWrapperProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
@@ -1,8 +1,8 @@
1
- import * as react11 from "react";
1
+ import * as react9 from "react";
2
2
  import React$1, { ComponentProps, HTMLAttributes } from "react";
3
- import * as react_jsx_runtime12 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
4
4
  import { VariantProps } from "class-variance-authority";
5
- import * as class_variance_authority_types2 from "class-variance-authority/types";
5
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
6
6
 
7
7
  //#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
8
8
  interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
@@ -18,13 +18,13 @@ declare function BottomAppBar<T>({
18
18
  //#endregion
19
19
  //#region src/ui/button/button.d.ts
20
20
  declare const classes$2: (props?: ({
21
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "3xl" | "xxs" | "4xl" | null | undefined;
22
- shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
21
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xxs" | "xs" | "3xl" | "4xl" | null | undefined;
22
+ shadow?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | null | undefined;
23
23
  outline?: "line" | "solid" | "clear" | null | undefined;
24
24
  variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
25
- px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
26
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
27
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
25
+ px?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "xs" | "3xl" | "4xl" | null | undefined;
26
+ rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | null | undefined;
27
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
28
28
  interface VariantMap {
29
29
  line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
30
30
  solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
@@ -43,22 +43,22 @@ type ButtonProps = ComponentProps<'button'> & BaseProps & ({
43
43
  }) & {
44
44
  asChild?: boolean;
45
45
  };
46
- declare const Button: react11.ForwardRefExoticComponent<(Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
46
+ declare const Button: react9.ForwardRefExoticComponent<(Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
47
47
  outline?: "line";
48
48
  variant?: VariantMap["line"];
49
49
  } & {
50
50
  asChild?: boolean;
51
- }, "ref"> | Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
51
+ }, "ref"> | Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
52
52
  outline: "solid";
53
53
  variant?: VariantMap["solid"];
54
54
  } & {
55
55
  asChild?: boolean;
56
- }, "ref"> | Omit<react11.ClassAttributes<HTMLButtonElement> & react11.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
56
+ }, "ref"> | Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
57
57
  outline: "clear";
58
58
  variant?: VariantMap["clear"];
59
59
  } & {
60
60
  asChild?: boolean;
61
- }, "ref">) & react11.RefAttributes<HTMLButtonElement>>;
61
+ }, "ref">) & react9.RefAttributes<HTMLButtonElement>>;
62
62
  //#endregion
63
63
  //#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
64
64
  interface ConditionalWrapperProps {
@@ -70,7 +70,7 @@ declare function ConditionalWrapper({
70
70
  condition,
71
71
  wrapper,
72
72
  children
73
- }: ConditionalWrapperProps): react11.ReactNode;
73
+ }: ConditionalWrapperProps): react9.ReactNode;
74
74
  //#endregion
75
75
  //#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
76
76
  interface ConditionalEitherWrapperProps {
@@ -84,15 +84,15 @@ declare function ConditionalEitherWrapper({
84
84
  trueWrapper,
85
85
  falseWrapper,
86
86
  children
87
- }: ConditionalEitherWrapperProps): react11.ReactNode;
87
+ }: ConditionalEitherWrapperProps): react9.ReactNode;
88
88
  //#endregion
89
89
  //#region src/ui/input/input.d.ts
90
90
  declare const classes$1: (props?: ({
91
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xs" | "base" | "3xl" | null | undefined;
92
- gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
91
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "base" | "xs" | "3xl" | null | undefined;
92
+ gap?: "sm" | "md" | "lg" | "xl" | "none" | "xs" | null | undefined;
93
93
  outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
94
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
95
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
94
+ rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | null | undefined;
95
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
96
96
  interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
97
97
  size?: VariantProps<typeof classes$1>['size'];
98
98
  gap?: VariantProps<typeof classes$1>['gap'];
@@ -101,13 +101,13 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
101
101
  prefix?: React.ReactNode;
102
102
  surffix?: React.ReactNode;
103
103
  }
104
- declare const Input: react11.ForwardRefExoticComponent<InputProps & react11.RefAttributes<HTMLInputElement>>;
104
+ declare const Input: react9.ForwardRefExoticComponent<InputProps & react9.RefAttributes<HTMLInputElement>>;
105
105
  //#endregion
106
106
  //#region src/ui/skeleton/skeleton.d.ts
107
107
  declare const classes: (props?: ({
108
108
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
109
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
110
- } & class_variance_authority_types2.ClassProp) | undefined) => string;
109
+ rounded?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "none" | "3xl" | null | undefined;
110
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
111
111
  interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
112
112
  width?: string | number;
113
113
  height?: string | number;
@@ -121,7 +121,7 @@ declare function Skeleton({
121
121
  height,
122
122
  className,
123
123
  ...props
124
- }: SkeletonProps): react_jsx_runtime12.JSX.Element;
124
+ }: SkeletonProps): react_jsx_runtime13.JSX.Element;
125
125
  //#endregion
126
126
  //#region src/ui/stable-text/stable-text.d.ts
127
127
  declare function StableText({
@@ -130,6 +130,6 @@ declare function StableText({
130
130
  ...props
131
131
  }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
132
132
  children: string | number;
133
- }): react_jsx_runtime12.JSX.Element;
133
+ }): react_jsx_runtime13.JSX.Element;
134
134
  //#endregion
135
135
  export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalEitherWrapper, type ConditionalEitherWrapperProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
package/dist/ui/index.mjs CHANGED
@@ -1 +1 @@
1
- import{n as e}from"../common-Df03Ovdm.mjs";import{t}from"../skeleton-B6_oBhkl.mjs";import n from"clsx";import r,{forwardRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{Slot as c}from"@radix-ui/react-slot";function l({className:e,items:t,render:i,...o}){return a(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:n(`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:a(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>a(r.Fragment,{children:i(e)},t))})})}const u=s(e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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`}});var d=i(({type:e=`button`,className:t,id:n,size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,asChild:f,...p},m)=>a(f?c:`button`,{ref:m,...p,type:e,id:n,className:u({size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,className:t})}));function f({condition:e,wrapper:t,children:n}){return e?t(n):n}function p({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const m=s(e(`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`}}});var h=i(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:i=`line`,rounded:s=`lg`,className:c,...l},u)=>o(`div`,{"data-komc":!0,className:m({size:n,gap:r,outline:i,rounded:s,className:c}),children:[e,a(`input`,{ref:u,type:`text`,...l}),t]}));function g({children:e,className:t,...r}){return a(`span`,{...r,"data-komc":!0,"data-text":`${e}`,className:n(`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})}export{l as BottomAppBar,d as Button,p as ConditionalEitherWrapper,f as ConditionalWrapper,h as Input,t as Skeleton,g as StableText};
1
+ import{n as e}from"../common-CCtD91nO.mjs";import{t}from"../skeleton-azZrk5-3.mjs";import n from"clsx";import r,{forwardRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{Slot as c}from"@radix-ui/react-slot";function l({className:e,items:t,render:i,...o}){return a(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:n(`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:a(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>a(r.Fragment,{children:i(e)},t))})})}const u=s(e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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:e(`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`}});var d=i(({type:e=`button`,className:t,id:n,size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,asChild:f,...p},m)=>a(f?c:`button`,{ref:m,...p,"data-komc":!0,type:e,id:n,className:u({size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,className:t})}));function f({condition:e,wrapper:t,children:n}){return e?t(n):n}function p({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const m=s(e(`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`}}});var h=i(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:i=`line`,rounded:s=`lg`,className:c,...l},u)=>o(`div`,{"data-komc":!0,className:m({size:n,gap:r,outline:i,rounded:s,className:c}),children:[e,a(`input`,{ref:u,type:`text`,...l}),t]}));function g({children:e,className:t,...r}){return a(`span`,{...r,"data-komc":!0,"data-text":`${e}`,className:n(`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})}export{l as BottomAppBar,d as Button,p as ConditionalEitherWrapper,f as ConditionalWrapper,h as Input,t as Skeleton,g as StableText};
@@ -0,0 +1 @@
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../common-D4sUwkFd.cjs`),n=require(`../../use-dialog-stack-DmBRPhe2.cjs`);let r=require(`react`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`class-variance-authority`),o=require(`motion/react`),s=require(`react-dom`);const c={sm:`komc:max-w-md`,md:`komc:max-w-lg`,lg:`komc:max-w-2xl`,xl:`komc:max-w-4xl`,"2xl":`komc:max-w-6xl`,full:`komc:max-w-full komc:mx-4`},l={scale:{hidden:{opacity:0,scale:.8,y:20},visible:{opacity:1,scale:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},slide:{hidden:{opacity:0,x:300},visible:{opacity:1,x:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,x:300,transition:{duration:.3}}},fade:{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2}}},"slide-up":{hidden:{opacity:0,y:100},visible:{opacity:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,y:100,transition:{duration:.3}}}},u={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},d=(0,a.cva)(`komc:flex komc:items-center komc:justify-between`,{variants:{padding:{none:void 0,sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`},border:{none:``,default:`komc:border-b komc:border-gray-200`},closeButtonPosition:{none:void 0,fixed:`komc:[&>button]:absolute komc:[&>button]:right-6 komc:[&>button]:top-10`}},defaultVariants:{padding:`lg`,border:`default`,closeButtonPosition:`none`}}),f=(0,r.forwardRef)(({isOpen:e,onClose:a,children:f,title:p,footer:m,size:h=`md`,animation:g=`scale`,showCloseButton:_=!0,closeOnBackdropClick:v=!0,className:y=``,showBackdrop:b=!0,isScrollableContent:x=!1,zIndex:S=1e4,customAnimation:C,headerClassName:w,onExitComplete:T},E)=>{let D=(0,r.useId)(),[O,k]=(0,r.useState)(!1);n.t(e,a),(0,r.useEffect)(()=>{k(!0)},[]);let A=()=>{v&&a()},j=C||l[g];return O?(0,s.createPortal)((0,i.jsx)(o.AnimatePresence,{mode:`wait`,onExitComplete:T,children:e&&(0,i.jsxs)(o.motion.div,{"data-komc":!0,"data-komc-dialog":``,className:`komc:fixed komc:inset-0 komc:flex komc:items-center komc:justify-center komc:p-4`,style:{zIndex:S},variants:u,initial:`hidden`,animate:`visible`,exit:`exit`,children:[b&&(0,i.jsx)(o.motion.div,{className:`komc:absolute komc:bg-black/50`,style:{zIndex:-1,top:`50%`,left:`50%`,width:`100vw`,height:`100vh`,transform:`translate(-50%, -50%)`},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:A}),(0,i.jsxs)(o.motion.div,{ref:E,id:D,className:t.n(`komc:relative komc:bg-white komc:rounded-lg komc:shadow-xl komc:pointer-events-auto`,h===`full`?`komc:w-full komc:h-full`:t.n(c[h],`komc:w-full`),y),variants:j,initial:`hidden`,animate:`visible`,exit:`exit`,layout:!0,children:[(p||_)&&(0,i.jsxs)(o.motion.div,{className:d({padding:w?.padding,border:w?.border,closeButtonPosition:w?.closeButtonPosition}),initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1},children:[p&&(typeof p==`string`?(0,i.jsx)(`h2`,{className:`komc:text-lg komc:font-semibold komc:text-gray-900`,children:p}):p),_&&(0,i.jsx)(o.motion.button,{onClick:a,className:`komc:p-1 komc:rounded-full komc:hover:bg-gray-100 komc:transition-colors`,"aria-label":`Close dialog`,whileHover:{scale:1.1},whileTap:{scale:.9},children:(0,i.jsx)(`svg`,{className:`komc:w-5 komc:h-5 komc:text-neutral-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),(0,i.jsx)(o.motion.div,{className:t.n(`komc:@container/dialog-content`,`komc:p-6`,x&&`komc:overflow-y-auto komc:h-(--dialog-content-height)`),initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:f}),m&&(0,i.jsx)(o.motion.div,{className:`komc:flex komc:items-center komc:justify-between komc:p-6 komc:border-t komc:border-gray-200`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:m})]})]})}),document.body):null});var p=f;exports.MotionDialog=p;
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ import { Variants } from "motion/react";
3
+
4
+ //#region src/ui/motion-dialog/motion-dialog.d.ts
5
+ type HeaderPadding = 'none' | 'sm' | 'md' | 'lg';
6
+ type HeaderBorder = 'none' | 'default';
7
+ type CloseButtonPosition = 'none' | 'fixed';
8
+ interface HeaderStyles {
9
+ padding?: HeaderPadding;
10
+ border?: HeaderBorder;
11
+ closeButtonPosition: CloseButtonPosition;
12
+ }
13
+ type CustomAnimation = 'scale' | 'slide' | 'fade' | 'slide-up';
14
+ interface MotionDialogProps {
15
+ isOpen: boolean;
16
+ onClose: () => void;
17
+ children: React.ReactNode;
18
+ title?: string | React.ReactNode;
19
+ footer?: React.ReactNode;
20
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
21
+ animation?: CustomAnimation;
22
+ showCloseButton?: boolean;
23
+ closeOnBackdropClick?: boolean;
24
+ className?: string;
25
+ showBackdrop?: boolean;
26
+ isScrollableContent?: boolean;
27
+ zIndex?: number;
28
+ customAnimation?: Variants;
29
+ headerClassName?: HeaderStyles;
30
+ onExitComplete?: () => void;
31
+ }
32
+ declare const MotionDialog: React.ForwardRefExoticComponent<MotionDialogProps & React.RefAttributes<HTMLDivElement>>;
33
+ //#endregion
34
+ export { MotionDialog, type MotionDialogProps };
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ import { Variants } from "motion/react";
3
+
4
+ //#region src/ui/motion-dialog/motion-dialog.d.ts
5
+ type HeaderPadding = 'none' | 'sm' | 'md' | 'lg';
6
+ type HeaderBorder = 'none' | 'default';
7
+ type CloseButtonPosition = 'none' | 'fixed';
8
+ interface HeaderStyles {
9
+ padding?: HeaderPadding;
10
+ border?: HeaderBorder;
11
+ closeButtonPosition: CloseButtonPosition;
12
+ }
13
+ type CustomAnimation = 'scale' | 'slide' | 'fade' | 'slide-up';
14
+ interface MotionDialogProps {
15
+ isOpen: boolean;
16
+ onClose: () => void;
17
+ children: React.ReactNode;
18
+ title?: string | React.ReactNode;
19
+ footer?: React.ReactNode;
20
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
21
+ animation?: CustomAnimation;
22
+ showCloseButton?: boolean;
23
+ closeOnBackdropClick?: boolean;
24
+ className?: string;
25
+ showBackdrop?: boolean;
26
+ isScrollableContent?: boolean;
27
+ zIndex?: number;
28
+ customAnimation?: Variants;
29
+ headerClassName?: HeaderStyles;
30
+ onExitComplete?: () => void;
31
+ }
32
+ declare const MotionDialog: React.ForwardRefExoticComponent<MotionDialogProps & React.RefAttributes<HTMLDivElement>>;
33
+ //#endregion
34
+ export { MotionDialog, type MotionDialogProps };
@@ -0,0 +1 @@
1
+ "use client";import{n as e}from"../../common-CCtD91nO.mjs";import{t}from"../../use-dialog-stack-STwnhvBB.mjs";import n,{forwardRef as r,useEffect as i,useId as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{AnimatePresence as u,motion as d}from"motion/react";import{createPortal as f}from"react-dom";const p={sm:`komc:max-w-md`,md:`komc:max-w-lg`,lg:`komc:max-w-2xl`,xl:`komc:max-w-4xl`,"2xl":`komc:max-w-6xl`,full:`komc:max-w-full komc:mx-4`},m={scale:{hidden:{opacity:0,scale:.8,y:20},visible:{opacity:1,scale:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},slide:{hidden:{opacity:0,x:300},visible:{opacity:1,x:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,x:300,transition:{duration:.3}}},fade:{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2}}},"slide-up":{hidden:{opacity:0,y:100},visible:{opacity:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,y:100,transition:{duration:.3}}}},h={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},g=l(`komc:flex komc:items-center komc:justify-between`,{variants:{padding:{none:void 0,sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`},border:{none:``,default:`komc:border-b komc:border-gray-200`},closeButtonPosition:{none:void 0,fixed:`komc:[&>button]:absolute komc:[&>button]:right-6 komc:[&>button]:top-10`}},defaultVariants:{padding:`lg`,border:`default`,closeButtonPosition:`none`}});var _=r(({isOpen:n,onClose:r,children:l,title:_,footer:v,size:y=`md`,animation:b=`scale`,showCloseButton:x=!0,closeOnBackdropClick:S=!0,className:C=``,showBackdrop:w=!0,isScrollableContent:T=!1,zIndex:E=1e4,customAnimation:D,headerClassName:O,onExitComplete:k},A)=>{let j=a(),[M,N]=o(!1);t(n,r),i(()=>{N(!0)},[]);let P=()=>{S&&r()},F=D||m[b];return M?f(s(u,{mode:`wait`,onExitComplete:k,children:n&&c(d.div,{"data-komc":!0,"data-komc-dialog":``,className:`komc:fixed komc:inset-0 komc:flex komc:items-center komc:justify-center komc:p-4`,style:{zIndex:E},variants:h,initial:`hidden`,animate:`visible`,exit:`exit`,children:[w&&s(d.div,{className:`komc:absolute komc:bg-black/50`,style:{zIndex:-1,top:`50%`,left:`50%`,width:`100vw`,height:`100vh`,transform:`translate(-50%, -50%)`},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:P}),c(d.div,{ref:A,id:j,className:e(`komc:relative komc:bg-white komc:rounded-lg komc:shadow-xl komc:pointer-events-auto`,y===`full`?`komc:w-full komc:h-full`:e(p[y],`komc:w-full`),C),variants:F,initial:`hidden`,animate:`visible`,exit:`exit`,layout:!0,children:[(_||x)&&c(d.div,{className:g({padding:O?.padding,border:O?.border,closeButtonPosition:O?.closeButtonPosition}),initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1},children:[_&&(typeof _==`string`?s(`h2`,{className:`komc:text-lg komc:font-semibold komc:text-gray-900`,children:_}):_),x&&s(d.button,{onClick:r,className:`komc:p-1 komc:rounded-full komc:hover:bg-gray-100 komc:transition-colors`,"aria-label":`Close dialog`,whileHover:{scale:1.1},whileTap:{scale:.9},children:s(`svg`,{className:`komc:w-5 komc:h-5 komc:text-neutral-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:s(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),s(d.div,{className:e(`komc:@container/dialog-content`,`komc:p-6`,T&&`komc:overflow-y-auto komc:h-(--dialog-content-height)`),initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:l}),v&&s(d.div,{className:`komc:flex komc:items-center komc:justify-between komc:p-6 komc:border-t komc:border-gray-200`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:v})]})]})}),document.body):null});export{_ as MotionDialog};
@@ -1 +1 @@
1
- "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../hooks-CUj2xuzU.cjs`);require(`../../providers-CkXkdYcB.cjs`),require(`../../use-subset-image-DC86cg6O.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`);const o=(0,a.cva)((0,n.default)(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),s=(0,a.cva)(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function c({isOpen:e,onClose:a,direction:c=`bottom`,size:l=`full`,children:u,className:d,closeOnBackdropClick:f=!0,zIndex:p=1001}){let m=t.o(e,300),[h,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e&&m){let e=setTimeout(()=>g(!0),10);return()=>clearTimeout(e)}else e||g(!1)},[e,m]);let _=(0,r.useCallback)(e=>{e.key===`Escape`&&a()},[a]),v=(0,r.useCallback)(()=>{f&&a()},[f,a]);return(0,r.useEffect)(()=>(e?(document.addEventListener(`keydown`,_),document.body.style.overflow=`hidden`):document.body.style.overflow=`unset`,()=>{document.removeEventListener(`keydown`,_),document.body.style.overflow=`unset`}),[e,_]),m?(0,i.jsxs)(`div`,{className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:p},children:[(0,i.jsx)(`button`,{type:`button`,"data-state":h?`open`:`closed`,className:(0,n.default)(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:v,"aria-label":`close sheet`}),(0,i.jsx)(`div`,{"data-state":h?`open`:`closed`,className:(0,n.default)(o({direction:c,className:d}),s({direction:c,size:l})),role:`dialog`,"aria-modal":`true`,children:u})]}):null}exports.Sheet=c;
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../common-BQEGjmFn.cjs`),n=require(`../../use-dialog-stack-DmBRPhe2.cjs`);require(`../../api-client-BH5tW3p8.cjs`),require(`../../use-subset-image-CTy5mCLo.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`);const s=(0,o.cva)((0,r.default)(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),c=(0,o.cva)(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function l({isOpen:e,onClose:o,direction:l=`bottom`,size:u=`full`,children:d,className:f,closeOnBackdropClick:p=!0,zIndex:m=1001}){let h=t.l(e,300),[g,_]=(0,i.useState)(!1);n.t(e,o),(0,i.useEffect)(()=>{if(e&&h){let e=setTimeout(()=>_(!0),10);return()=>clearTimeout(e)}else e||_(!1)},[e,h]);let v=(0,i.useCallback)(()=>{p&&o()},[p,o]);return h?(0,a.jsxs)(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:m},children:[(0,a.jsx)(`button`,{type:`button`,"data-state":g?`open`:`closed`,className:(0,r.default)(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:v,"aria-label":`close sheet`}),(0,a.jsx)(`div`,{"data-state":g?`open`:`closed`,className:(0,r.default)(s({direction:l,className:f}),c({direction:l,size:u})),role:`dialog`,"aria-modal":`true`,children:d})]}):null}exports.Sheet=l;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime8 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ui/sheet/sheet.d.ts
5
5
  type Direction = 'top' | 'bottom' | 'left' | 'right';
@@ -23,6 +23,6 @@ declare function Sheet({
23
23
  className,
24
24
  closeOnBackdropClick,
25
25
  zIndex
26
- }: SheetProps): react_jsx_runtime8.JSX.Element | null;
26
+ }: SheetProps): react_jsx_runtime2.JSX.Element | null;
27
27
  //#endregion
28
28
  export { Sheet, type SheetProps };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ui/sheet/sheet.d.ts
5
5
  type Direction = 'top' | 'bottom' | 'left' | 'right';
@@ -23,6 +23,6 @@ declare function Sheet({
23
23
  className,
24
24
  closeOnBackdropClick,
25
25
  zIndex
26
- }: SheetProps): react_jsx_runtime0.JSX.Element | null;
26
+ }: SheetProps): react_jsx_runtime11.JSX.Element | null;
27
27
  //#endregion
28
28
  export { Sheet, type SheetProps };
@@ -1 +1 @@
1
- "use client";import"../../src-CukOR3K2.mjs";import"../../file-DShNxIW4.mjs";import{o as e}from"../../hooks-gbU5dqVF.mjs";import"../../providers-zftmvT1z.mjs";import"../../use-subset-image-D8ssrZhj.mjs";import t from"clsx";import n,{useCallback as r,useEffect as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{cva as c}from"class-variance-authority";const l=c(t(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),u=c(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function d({isOpen:n,onClose:c,direction:d=`bottom`,size:f=`full`,children:p,className:m,closeOnBackdropClick:h=!0,zIndex:g=1001}){let _=e(n,300),[v,y]=a(!1);i(()=>{if(n&&_){let e=setTimeout(()=>y(!0),10);return()=>clearTimeout(e)}else n||y(!1)},[n,_]);let b=r(e=>{e.key===`Escape`&&c()},[c]),x=r(()=>{h&&c()},[h,c]);return i(()=>(n?(document.addEventListener(`keydown`,b),document.body.style.overflow=`hidden`):document.body.style.overflow=`unset`,()=>{document.removeEventListener(`keydown`,b),document.body.style.overflow=`unset`}),[n,b]),_?s(`div`,{className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:g},children:[o(`button`,{type:`button`,"data-state":v?`open`:`closed`,className:t(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:x,"aria-label":`close sheet`}),o(`div`,{"data-state":v?`open`:`closed`,className:t(l({direction:d,className:m}),u({direction:d,size:f})),role:`dialog`,"aria-modal":`true`,children:p})]}):null}export{d as Sheet};
1
+ "use client";import"../../src-Ce2i3Lkj.mjs";import"../../file-CjW1pMb_.mjs";import{l as e}from"../../common-L3y7_eAy.mjs";import{t}from"../../use-dialog-stack-STwnhvBB.mjs";import"../../api-client-B-kwZogn.mjs";import"../../use-subset-image-LQWsE5P4.mjs";import n from"clsx";import r,{useCallback as i,useEffect as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";const u=l(n(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),d=l(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function f({isOpen:r,onClose:l,direction:f=`bottom`,size:p=`full`,children:m,className:h,closeOnBackdropClick:g=!0,zIndex:_=1001}){let v=e(r,300),[y,b]=o(!1);t(r,l),a(()=>{if(r&&v){let e=setTimeout(()=>b(!0),10);return()=>clearTimeout(e)}else r||b(!1)},[r,v]);let x=i(()=>{g&&l()},[g,l]);return v?c(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:_},children:[s(`button`,{type:`button`,"data-state":y?`open`:`closed`,className:n(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:x,"aria-label":`close sheet`}),s(`div`,{"data-state":y?`open`:`closed`,className:n(u({direction:f,className:h}),d({direction:f,size:p})),role:`dialog`,"aria-modal":`true`,children:m})]}):null}export{f as Sheet};
@@ -0,0 +1 @@
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`clsx`);t=e.t(t);let n=require(`react`);n=e.t(n);let r=require(`react/jsx-runtime`),i=require(`class-variance-authority`);const a=(0,i.cva)((0,t.default)(`komc:inline-flex komc:items-center`),{variants:{placement:{top:`komc:flex-col-reverse komc:gap-y-2.5`,bottom:`komc:flex-col komc:gap-y-2.5`,start:`komc:flex-row-reverse komc:gap-x-2`,end:`komc:flex-row komc:gap-x-2`},disabled:{false:`komc:cursor-pointer`,true:`komc:cursor-default komc:opacity-50`},checked:{false:`komc:[&>button]:bg-gray-300 komc:[&_span]:translate-x-0.5`,true:`komc:[&>button]:bg-blue-500 komc:[&_span]:translate-x-4.5`}},defaultVariants:{placement:`end`,disabled:!1,checked:!1}}),o=n.default.forwardRef(({label:e,placement:i=`end`,checked:o=!1,disabled:s=!1,onChange:c},l)=>{let u=(0,n.useId)(),d=()=>{s||c?.(!o)};return(0,r.jsxs)(`div`,{"data-komc":!0,className:(0,t.default)(a({placement:i,disabled:s,checked:o})),children:[(0,r.jsx)(`button`,{ref:l,id:u,type:`button`,role:`switch`,disabled:s,className:`komc:flex komc:items-center komc:rounded-full komc:transition komc:w-10 komc:h-6 komc:cursor-pointer komc:disabled:cursor-default`,"aria-checked":o,onClick:d,children:(0,r.jsx)(`span`,{className:`komc:size-5 komc:rounded-full komc:bg-white komc:transition komc:shadow-xs`})}),e?(0,r.jsx)(`label`,{htmlFor:u,className:`komc:text-xs komc:font-medium komc:text-neutral-500`,children:e}):null]})});exports.Switch=o;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+
3
+ //#region src/ui/switch/switch.d.ts
4
+ type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
5
+ interface SwitchProps {
6
+ label?: string;
7
+ placement?: LabelPlacement;
8
+ checked?: boolean;
9
+ disabled?: boolean;
10
+ onChange?(checked: boolean): void;
11
+ }
12
+ /** @deprecated Use `SwitchProps`. */
13
+ type SwtichProps = SwitchProps;
14
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
15
+ //#endregion
16
+ export { LabelPlacement, Switch, SwitchProps, SwtichProps };
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+
3
+ //#region src/ui/switch/switch.d.ts
4
+ type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
5
+ interface SwitchProps {
6
+ label?: string;
7
+ placement?: LabelPlacement;
8
+ checked?: boolean;
9
+ disabled?: boolean;
10
+ onChange?(checked: boolean): void;
11
+ }
12
+ /** @deprecated Use `SwitchProps`. */
13
+ type SwtichProps = SwitchProps;
14
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
15
+ //#endregion
16
+ export { LabelPlacement, Switch, SwitchProps, SwtichProps };
@@ -0,0 +1 @@
1
+ "use client";import e from"clsx";import t,{useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";const o=a(e(`komc:inline-flex komc:items-center`),{variants:{placement:{top:`komc:flex-col-reverse komc:gap-y-2.5`,bottom:`komc:flex-col komc:gap-y-2.5`,start:`komc:flex-row-reverse komc:gap-x-2`,end:`komc:flex-row komc:gap-x-2`},disabled:{false:`komc:cursor-pointer`,true:`komc:cursor-default komc:opacity-50`},checked:{false:`komc:[&>button]:bg-gray-300 komc:[&_span]:translate-x-0.5`,true:`komc:[&>button]:bg-blue-500 komc:[&_span]:translate-x-4.5`}},defaultVariants:{placement:`end`,disabled:!1,checked:!1}}),s=t.forwardRef(({label:t,placement:a=`end`,checked:s=!1,disabled:c=!1,onChange:l},u)=>{let d=n(),f=()=>{c||l?.(!s)};return i(`div`,{"data-komc":!0,className:e(o({placement:a,disabled:c,checked:s})),children:[r(`button`,{ref:u,id:d,type:`button`,role:`switch`,disabled:c,className:`komc:flex komc:items-center komc:rounded-full komc:transition komc:w-10 komc:h-6 komc:cursor-pointer komc:disabled:cursor-default`,"aria-checked":s,onClick:f,children:r(`span`,{className:`komc:size-5 komc:rounded-full komc:bg-white komc:transition komc:shadow-xs`})}),t?r(`label`,{htmlFor:d,className:`komc:text-xs komc:font-medium komc:text-neutral-500`,children:t}):null]})});export{s as Switch};
@@ -1 +1 @@
1
- "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`);const t=require(`../../common-Bn0Ko6B7.cjs`);require(`../../file-5mweNdAM.cjs`);const n=require(`../../hooks-CUj2xuzU.cjs`);require(`../../providers-CkXkdYcB.cjs`),require(`../../use-subset-image-DC86cg6O.cjs`);let r=require(`clsx`);r=e.t(r);let i=require(`react`),a=require(`react/jsx-runtime`),o=require(`class-variance-authority`),s=require(`react-dom`);function c({children:e,setOpen:t}){return(0,a.jsx)(`div`,{"data-komc":!0,className:(0,r.default)(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const l=(0,o.cva)(t.n(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}}),u=(0,i.forwardRef)(({portal:e,children:t,className:n,placement:r,...i},o)=>(0,a.jsx)(`div`,{ref:o,"data-komc":!0,role:`tooltip`,className:l({portal:e,placement:r,className:n}),...i,children:t}));var d=u;const f=(0,o.cva)(t.n(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:t.n(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:t.n(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":t.n(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":t.n(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":t.n(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":t.n(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}}),p=({placement:e,className:t,offset:n,...r})=>{let o=(0,i.useMemo)(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return(0,a.jsx)(`div`,{className:f({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${o}`},...r})};var m=p;const h=24,g=2,_=180,v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:n,open:o,hiddenRef:c,containerRef:l}){let[u,f]=(0,i.useState)(!1),[p,h]=(0,i.useState)(e),[g,_]=(0,i.useState)({top:0,left:0}),[y,b]=(0,i.useState)({x:0,y:0});(0,i.useEffect)(()=>{f(!0)},[]);let x=(0,i.useCallback)(()=>{let t=l.current,n=c.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[o]=a.split(`-`),s=r.top,u=window.innerHeight-r.bottom;o===`bottom`&&u<i.height&&s>=i.height?a=v(a,`top`):o===`top`&&s<i.height&&u>=i.height&&(a=v(a,`bottom`)),h(a);let[d,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(d){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let g=m,y=window.innerWidth;g+i.width>y-4&&(g=y-i.width-4),g<4&&(g=4),_({top:p,left:g}),b({x:m-g,y:0})},[e,l,c]);return(0,i.useEffect)(()=>{if(!u||!o)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;x();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||x(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let a=0,s=0,c=``,d=()=>{if(e||a>=180)return;let t=l.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,x())}s<2&&(a+=1,n=requestAnimationFrame(d))};return n=requestAnimationFrame(d),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[u,o,x,l]),u?(0,s.createPortal)((0,a.jsxs)(d,{portal:!0,"data-komc":!0,placement:p,className:(0,r.default)(t,o?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...g},children:[(0,a.jsx)(`span`,{children:n}),(0,a.jsx)(m,{placement:p,offset:y})]}),document.body):null}const b=(0,i.forwardRef)(({children:e,content:t,defaultOpen:o=!1,className:s,placement:l=`top`})=>{let[u,f]=(0,i.useState)(o),p=(0,i.useRef)(null),m=(0,i.useRef)(null);return n.i({ref:p,setOpen:f}),(0,a.jsxs)(`div`,{ref:p,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[(0,a.jsx)(c,{setOpen:f,children:e}),(0,a.jsx)(y,{placement:l,className:s,open:u,content:t,hiddenRef:m,containerRef:p}),(0,a.jsx)(d,{ref:m,role:`presentation`,"aria-hidden":`true`,placement:l,className:(0,r.default)(`komc:opacity-0 komc:invisible`,s),children:(0,a.jsx)(`span`,{children:t})})]})});var x=b;exports.Tooltip=x;
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`);const t=require(`../../common-D4sUwkFd.cjs`);require(`../../file-5mweNdAM.cjs`);const n=require(`../../common-BQEGjmFn.cjs`);require(`../../use-dialog-stack-DmBRPhe2.cjs`),require(`../../api-client-BH5tW3p8.cjs`),require(`../../use-subset-image-CTy5mCLo.cjs`);let r=require(`clsx`);r=e.t(r);let i=require(`react`),a=require(`react/jsx-runtime`),o=require(`class-variance-authority`),s=require(`react-dom`);function c({children:e,setOpen:t}){return(0,a.jsx)(`div`,{"data-komc":!0,className:(0,r.default)(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const l=(0,o.cva)(t.n(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}}),u=(0,i.forwardRef)(({portal:e,children:t,className:n,placement:r,...i},o)=>(0,a.jsx)(`div`,{ref:o,"data-komc":!0,role:`tooltip`,className:l({portal:e,placement:r,className:n}),...i,children:t}));var d=u;const f=(0,o.cva)(t.n(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:t.n(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:t.n(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":t.n(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":t.n(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":t.n(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":t.n(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}}),p=({placement:e,className:t,offset:n,...r})=>{let o=(0,i.useMemo)(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return(0,a.jsx)(`div`,{className:f({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${o}`},...r})};var m=p;const h=24,g=2,_=180,v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:n,open:o,hiddenRef:c,containerRef:l}){let[u,f]=(0,i.useState)(!1),[p,h]=(0,i.useState)(e),[g,_]=(0,i.useState)({top:0,left:0}),[y,b]=(0,i.useState)({x:0,y:0});(0,i.useEffect)(()=>{f(!0)},[]);let x=(0,i.useCallback)(()=>{let t=l.current,n=c.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[o]=a.split(`-`),s=r.top,u=window.innerHeight-r.bottom;o===`bottom`&&u<i.height&&s>=i.height?a=v(a,`top`):o===`top`&&s<i.height&&u>=i.height&&(a=v(a,`bottom`)),h(a);let[d,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(d){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let g=m,y=window.innerWidth;g+i.width>y-4&&(g=y-i.width-4),g<4&&(g=4),_({top:p,left:g}),b({x:m-g,y:0})},[e,l,c]);return(0,i.useEffect)(()=>{if(!u||!o)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;x();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||x(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let a=0,s=0,c=``,d=()=>{if(e||a>=180)return;let t=l.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,x())}s<2&&(a+=1,n=requestAnimationFrame(d))};return n=requestAnimationFrame(d),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[u,o,x,l]),u?(0,s.createPortal)((0,a.jsxs)(d,{portal:!0,"data-komc":!0,placement:p,className:(0,r.default)(t,o?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...g},children:[(0,a.jsx)(`span`,{children:n}),(0,a.jsx)(m,{placement:p,offset:y})]}),document.body):null}const b=(0,i.forwardRef)(({children:e,content:t,defaultOpen:o=!1,className:s,placement:l=`top`})=>{let[u,f]=(0,i.useState)(o),p=(0,i.useRef)(null),m=(0,i.useRef)(null);return n.a({ref:p,setOpen:f}),(0,a.jsxs)(`div`,{ref:p,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[(0,a.jsx)(c,{setOpen:f,children:e}),(0,a.jsx)(y,{placement:l,className:s,open:u,content:t,hiddenRef:m,containerRef:p}),(0,a.jsx)(d,{ref:m,role:`presentation`,"aria-hidden":`true`,placement:l,className:(0,r.default)(`komc:opacity-0 komc:invisible`,s),children:(0,a.jsx)(`span`,{children:t})})]})});var x=b;exports.Tooltip=x;
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react7 from "react";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/ui/tooltip/tooltip-container.d.ts
@@ -11,6 +11,6 @@ interface TooltipContainerProps extends HTMLAttributes<HTMLDivElement> {
11
11
  placement?: TooltipPlacement;
12
12
  defaultOpen?: boolean;
13
13
  }
14
- declare const TooltipContainer: react0.ForwardRefExoticComponent<TooltipContainerProps & react0.RefAttributes<HTMLDivElement>>;
14
+ declare const TooltipContainer: react7.ForwardRefExoticComponent<TooltipContainerProps & react7.RefAttributes<HTMLDivElement>>;
15
15
  //#endregion
16
16
  export { TooltipContainer as Tooltip, type TooltipContainerProps as TooltipProps };