lizaui 8.2.9 → 8.3.9

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 (99) hide show
  1. package/dist/button/index.cjs.js +1 -1
  2. package/dist/button/index.es.js +1 -1
  3. package/dist/calendar/index.cjs.js +2 -2
  4. package/dist/calendar/index.cjs.js.map +1 -1
  5. package/dist/calendar/index.es.js +9 -9
  6. package/dist/checkbox/index.cjs.js +1 -1
  7. package/dist/checkbox/index.es.js +1 -1
  8. package/dist/chip/index.cjs.js +1 -1
  9. package/dist/chip/index.cjs.js.map +1 -1
  10. package/dist/chip/index.es.js +2 -2
  11. package/dist/chunks/bundle-mjs-2oQ8XDAz.js +2748 -0
  12. package/dist/chunks/bundle-mjs-2oQ8XDAz.js.map +1 -0
  13. package/dist/chunks/bundle-mjs-8z5d_e-8.js +2 -0
  14. package/dist/chunks/bundle-mjs-8z5d_e-8.js.map +1 -0
  15. package/dist/chunks/{button-CSuKvE1x.js → button-DJYse8Dw.js} +3 -3
  16. package/dist/chunks/{button-CSuKvE1x.js.map → button-DJYse8Dw.js.map} +1 -1
  17. package/dist/chunks/button-DaAJ3J_i.js +2 -0
  18. package/dist/chunks/{button-OdZ6El_t.js.map → button-DaAJ3J_i.js.map} +1 -1
  19. package/dist/chunks/{checkbox-BhW9i0pm.js → checkbox-BvvZL9H4.js} +3 -3
  20. package/dist/chunks/{checkbox-BhW9i0pm.js.map → checkbox-BvvZL9H4.js.map} +1 -1
  21. package/dist/chunks/checkbox-w969v4lK.js +2 -0
  22. package/dist/chunks/{checkbox-CWDPVAn2.js.map → checkbox-w969v4lK.js.map} +1 -1
  23. package/dist/chunks/clsx-C11secjj.js +2 -0
  24. package/dist/chunks/clsx-C11secjj.js.map +1 -0
  25. package/dist/chunks/clsx-OuTLNxxd.js +17 -0
  26. package/dist/chunks/clsx-OuTLNxxd.js.map +1 -0
  27. package/dist/chunks/{index-BOQuZ0gG.js → index-D29mdTf5.js} +2 -2
  28. package/dist/chunks/{index-BOQuZ0gG.js.map → index-D29mdTf5.js.map} +1 -1
  29. package/dist/chunks/index-nwdlcB7h.js +2 -0
  30. package/dist/chunks/{index-BxK4T-v8.js.map → index-nwdlcB7h.js.map} +1 -1
  31. package/dist/chunks/label-error-B8Rq-HGY.js +2 -0
  32. package/dist/chunks/{label-error-Ax74Uy3M.js.map → label-error-B8Rq-HGY.js.map} +1 -1
  33. package/dist/chunks/label-error-BOE4Qj5S.js +10 -0
  34. package/dist/chunks/{label-error-DGQqDKTV.js.map → label-error-BOE4Qj5S.js.map} +1 -1
  35. package/dist/chunks/{scroll-area-zt_z9PRo.js → scroll-area-1okMO4N6.js} +3 -3
  36. package/dist/chunks/{scroll-area-zt_z9PRo.js.map → scroll-area-1okMO4N6.js.map} +1 -1
  37. package/dist/chunks/{scroll-area-C8l3z7wv.js → scroll-area-BwqigcJy.js} +2 -2
  38. package/dist/chunks/{scroll-area-C8l3z7wv.js.map → scroll-area-BwqigcJy.js.map} +1 -1
  39. package/dist/chunks/{select-qaP_vaF3.js → select-B6a8A7js.js} +3 -3
  40. package/dist/chunks/{select-qaP_vaF3.js.map → select-B6a8A7js.js.map} +1 -1
  41. package/dist/chunks/{select-CC7ump6t.js → select-CFefk2Xz.js} +2 -2
  42. package/dist/chunks/{select-CC7ump6t.js.map → select-CFefk2Xz.js.map} +1 -1
  43. package/dist/chunks/{textarea-BIy5pTb5.js → textarea-BPsle-xc.js} +8 -8
  44. package/dist/chunks/{textarea-BIy5pTb5.js.map → textarea-BPsle-xc.js.map} +1 -1
  45. package/dist/chunks/{textarea-Cklud2kp.js → textarea-C2i9A3jn.js} +3 -3
  46. package/dist/chunks/{textarea-Cklud2kp.js.map → textarea-C2i9A3jn.js.map} +1 -1
  47. package/dist/chunks/tooltip-BPp8Maa7.js +2 -0
  48. package/dist/chunks/{tooltip-DGFz59KW.js.map → tooltip-BPp8Maa7.js.map} +1 -1
  49. package/dist/chunks/{tooltip-B-5G3VVC.js → tooltip-Bf9DqrJk.js} +3 -3
  50. package/dist/chunks/{tooltip-B-5G3VVC.js.map → tooltip-Bf9DqrJk.js.map} +1 -1
  51. package/dist/chunks/tv-CGkrzbji.js +2 -0
  52. package/dist/chunks/tv-CGkrzbji.js.map +1 -0
  53. package/dist/chunks/tv-DQO4decF.js +268 -0
  54. package/dist/chunks/tv-DQO4decF.js.map +1 -0
  55. package/dist/chunks/utils-CvyT6Z0O.js +9 -0
  56. package/dist/chunks/{utils-B6yFEsav.js.map → utils-CvyT6Z0O.js.map} +1 -1
  57. package/dist/chunks/utils-CxdrMFeI.js +2 -0
  58. package/dist/chunks/{utils-IjLH3w2e.js.map → utils-CxdrMFeI.js.map} +1 -1
  59. package/dist/chunks/v4-BysszJq8.js +31 -0
  60. package/dist/chunks/v4-BysszJq8.js.map +1 -0
  61. package/dist/chunks/v4-CqdK_b8Y.js +2 -0
  62. package/dist/chunks/v4-CqdK_b8Y.js.map +1 -0
  63. package/dist/divider/index.cjs.js +1 -1
  64. package/dist/divider/index.es.js +1 -1
  65. package/dist/modal/index.cjs.js +1 -1
  66. package/dist/modal/index.es.js +3 -3
  67. package/dist/pagination/index.cjs.js +1 -1
  68. package/dist/pagination/index.cjs.js.map +1 -1
  69. package/dist/pagination/index.es.js +18 -18
  70. package/dist/phone-input/index.cjs.js +1 -1
  71. package/dist/phone-input/index.cjs.js.map +1 -1
  72. package/dist/phone-input/index.es.js +56 -57
  73. package/dist/phone-input/index.es.js.map +1 -1
  74. package/dist/select-input/index.cjs.js +2 -2
  75. package/dist/select-input/index.cjs.js.map +1 -1
  76. package/dist/select-input/index.es.js +5 -5
  77. package/dist/table/index.cjs.js +1 -1
  78. package/dist/table/index.cjs.js.map +1 -1
  79. package/dist/table/index.es.js +9 -9
  80. package/dist/time-input/index.cjs.js +2 -2
  81. package/dist/time-input/index.cjs.js.map +1 -1
  82. package/dist/time-input/index.es.js +5 -5
  83. package/dist/tooltip/index.cjs.js +1 -1
  84. package/dist/tooltip/index.es.js +1 -1
  85. package/dist/ui/index.cjs.js +1 -1
  86. package/dist/ui/index.es.js +10 -10
  87. package/package.json +1 -1
  88. package/dist/chunks/button-OdZ6El_t.js +0 -2
  89. package/dist/chunks/checkbox-CWDPVAn2.js +0 -2
  90. package/dist/chunks/index-BxK4T-v8.js +0 -2
  91. package/dist/chunks/label-error-Ax74Uy3M.js +0 -2
  92. package/dist/chunks/label-error-DGQqDKTV.js +0 -10
  93. package/dist/chunks/tooltip-DGFz59KW.js +0 -2
  94. package/dist/chunks/tv-3Bk5oRI_.js +0 -39
  95. package/dist/chunks/tv-3Bk5oRI_.js.map +0 -1
  96. package/dist/chunks/tv-CLzaSzqw.js +0 -2
  97. package/dist/chunks/tv-CLzaSzqw.js.map +0 -1
  98. package/dist/chunks/utils-B6yFEsav.js +0 -9
  99. package/dist/chunks/utils-IjLH3w2e.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"button-OdZ6El_t.js","sources":["../../src/theme/color/button.ts","../../src/components/button/use-button.ts","../../src/components/button/spinner.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import { tv } from \"@/lib/tv\";\nimport type { VariantProps } from \"tailwind-variants\";\nimport { collapseAdjacentVariantBorders, dataFocusVisibleClasses } from \"../classes\";\nimport { colorVariants } from \"../variants\";\n\n/**\n * Button wrapper **Tailwind Variants** component\n *\n * const classNames = button({...})\n *\n * @example\n * <button\n * className={classNames())}\n * data-pressed={true/false}\n * data-hover={true/false}\n * data-focus={true/false}\n * data-focus-visible={true/false}\n * >\n * Button\n * </button>\n */\nconst button = tv({\n\tbase: [\n\t\t\"z-0\",\n \"cursor-pointer\",\n\t\t\"group\",\n\t\t\"relative\",\n\t\t\"inline-flex\",\n\t\t\"items-center\",\n\t\t\"justify-center\",\n\t\t\"box-border\",\n\t\t\"appearance-none\",\n\t\t\"outline-none\",\n\t\t\"select-none\",\n\t\t\"whitespace-nowrap\",\n\t\t\"min-w-max\",\n\t\t\"font-medium\",\n\t\t\"subpixel-antialiased\",\n\t\t\"overflow-hidden\",\n\t\t\"tap-highlight-transparent\",\n\t\t\"transform-gpu data-[pressed=true]:scale-[0.97]\",\n\t\t// focus ring\n\t\t...dataFocusVisibleClasses,\n\t],\n\tvariants: {\n\t\tvariant: {\n\t\t\tsolid: \"\",\n\t\t\tbordered: \"border-[2px] bg-transparent\",\n\t\t\tlight: \"bg-transparent\",\n\t\t\tflat: \"\",\n\t\t\tfaded: \"border-[2px]\",\n\t\t\tshadow: \"\",\n\t\t\tghost: \"border-[2px] bg-transparent\",\n\t\t},\n\t\tsize: {\n\t\t\tsm: \"px-3 min-w-16 h-8 text-tiny gap-2 rounded-sm\",\n\t\t\tmd: \"px-4 min-w-20 h-10 text-sm gap-2 rounded-md\",\n\t\t\tlg: \"px-6 min-w-24 h-12 text-md gap-3 rounded-lg\",\n\t\t},\n\t\tcolor: {\n\t\t\tdefault: \"\",\n\t\t\tprimary: \"\",\n\t\t\tsecondary: \"\",\n\t\t\tsuccess: \"\",\n\t\t\twarning: \"\",\n\t\t\tdanger: \"\",\n\t\t},\n\t\tradius: {\n\t\t\tnone: \"rounded-none\",\n\t\t\tsm: \"rounded-sm\",\n\t\t\tmd: \"rounded-md\",\n\t\t\tlg: \"rounded-lg\",\n\t\t\tfull: \"rounded-full\",\n\t\t},\n\t\tfullWidth: {\n\t\t\ttrue: \"w-full\",\n\t\t},\n\t\tisDisabled: {\n\t\t\ttrue: \"opacity-80 pointer-events-none\",\n\t\t},\n\t\tisInGroup: {\n\t\t\ttrue: \"[&:not(:first-child):not(:last-child)]:rounded-none\",\n\t\t},\n\t\tisIconOnly: {\n\t\t\ttrue: \"px-0 !gap-0\",\n\t\t\tfalse: \"[&>svg]:max-w-[theme(spacing.8)]\",\n\t\t},\n\t\tdisableAnimation: {\n\t\t\ttrue: \"!transition-none data-[pressed=true]:scale-100\",\n\t\t\tfalse: \"transition-transform-colors-opacity motion-reduce:transition-none\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t\tvariant: \"solid\",\n\t\tcolor: \"default\",\n\t\tfullWidth: false,\n\t\tisDisabled: false,\n\t\tisInGroup: false,\n\t},\n\tcompoundVariants: [\n\t\t// solid / color\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.solid.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.solid.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.solid.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.solid.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.solid.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.solid.danger,\n\t\t},\n\t\t// shadow / color\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.shadow.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.shadow.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.shadow.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.shadow.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.shadow.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.shadow.danger,\n\t\t},\n\t\t// bordered / color\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.bordered.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.bordered.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.bordered.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.bordered.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.bordered.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.bordered.danger,\n\t\t},\n\t\t// flat / color\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.flat.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.flat.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.flat.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.flat.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.flat.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.flat.danger,\n\t\t},\n\t\t// faded / color\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.faded.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.faded.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.faded.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.faded.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.faded.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.faded.danger,\n\t\t},\n\t\t// light / color\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: [colorVariants.light.default, \"data-[hover=true]:bg-default/40\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: [colorVariants.light.primary, \"data-[hover=true]:bg-primary/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: [colorVariants.light.secondary, \"data-[hover=true]:bg-secondary/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: [colorVariants.light.success, \"data-[hover=true]:bg-success/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: [colorVariants.light.warning, \"data-[hover=true]:bg-warning/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: [colorVariants.light.danger, \"data-[hover=true]:bg-danger/20\"],\n\t\t},\n\t\t// ghost / color\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: [colorVariants.ghost.default, \"data-[hover=true]:!bg-default\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: [colorVariants.ghost.primary, \"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: [colorVariants.ghost.secondary, \"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: [colorVariants.ghost.success, \"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: [colorVariants.ghost.warning, \"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: [colorVariants.ghost.danger, \"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground\"],\n\t\t},\n\t\t// isInGroup / radius / size <-- radius not provided\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tclass: \"rounded-none first:rounded-s-medium last:rounded-e-medium\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tsize: \"sm\",\n\t\t\tclass: \"rounded-none first:rounded-s-small last:rounded-e-small\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tsize: \"md\",\n\t\t\tclass: \"rounded-none first:rounded-s-medium last:rounded-e-medium\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tsize: \"lg\",\n\t\t\tclass: \"rounded-none first:rounded-s-large last:rounded-e-large\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tisRounded: true,\n\t\t\tclass: \"rounded-none first:rounded-s-full last:rounded-e-full\",\n\t\t},\n\t\t// isInGroup / radius <-- radius provided\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"none\",\n\t\t\tclass: \"rounded-none first:rounded-s-none last:rounded-e-none\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"sm\",\n\t\t\tclass: \"rounded-none first:rounded-s-small last:rounded-e-small\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"md\",\n\t\t\tclass: \"rounded-none first:rounded-s-medium last:rounded-e-medium\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"lg\",\n\t\t\tclass: \"rounded-none first:rounded-s-large last:rounded-e-large\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"full\",\n\t\t\tclass: \"rounded-none first:rounded-s-full last:rounded-e-full\",\n\t\t},\n\t\t// isInGroup / bordered / ghost\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"default\",\n\t\t\tclassName: collapseAdjacentVariantBorders.default,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"primary\",\n\t\t\tclassName: collapseAdjacentVariantBorders.primary,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"secondary\",\n\t\t\tclassName: collapseAdjacentVariantBorders.secondary,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"success\",\n\t\t\tclassName: collapseAdjacentVariantBorders.success,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"warning\",\n\t\t\tclassName: collapseAdjacentVariantBorders.warning,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"danger\",\n\t\t\tclassName: collapseAdjacentVariantBorders.danger,\n\t\t},\n\t\t{\n\t\t\tisIconOnly: true,\n\t\t\tsize: \"sm\",\n\t\t\tclass: \"min-w-8 w-8 h-8\",\n\t\t},\n\t\t{\n\t\t\tisIconOnly: true,\n\t\t\tsize: \"md\",\n\t\t\tclass: \"min-w-10 w-10 h-10\",\n\t\t},\n\t\t{\n\t\t\tisIconOnly: true,\n\t\t\tsize: \"lg\",\n\t\t\tclass: \"min-w-12 w-12 h-12\",\n\t\t},\n\t\t// variant / hover\n\t\t{\n\t\t\tvariant: [\"solid\", \"faded\", \"flat\", \"bordered\", \"shadow\"],\n\t\t\tclass: \"hover:opacity-80\",\n\t\t},\n\t],\n});\n\nexport type ButtonVariantProps = VariantProps<typeof button>;\n\nexport { button };\n","import { dataAttr, useDOMRef, type ReactRef } from \"@/functions\";\nimport { button, type ButtonVariantProps } from \"@/theme/color/button\";\nimport type { SlotsToClasses } from \"@/types\";\nimport clsx from \"clsx\";\nimport { isValidElement, cloneElement, useMemo, useCallback, useId } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { ReactNode, MouseEventHandler, HTMLAttributes } from \"react\";\nimport type { RippleProps } from \"../ripple/ripple\";\nimport { useRipple } from \"../ripple/use-ripple\";\n\nexport interface UseButtonProps extends ButtonVariantProps, Omit<HTMLAttributes<HTMLElement>, keyof ButtonVariantProps> {\n\tref?: ReactRef<HTMLButtonElement | null>;\n\tid?: string;\n\tclassNames?: SlotsToClasses<ReturnType<typeof button>>;\n\tclassName?: string;\n\tasChild?: boolean;\n\tchildren?: ReactNode;\n\tisIconOnly?: boolean;\n\tisLoading?: boolean;\n\tdisabled?: boolean;\n\tstartContent?: ReactNode;\n\tendContent?: ReactNode;\n\tspinner?: ReactNode;\n\tspinnerPlacement?: \"start\" | \"end\";\n type?: \"button\" | \"submit\" | \"reset\";\n}\n\nexport function useButton(props: UseButtonProps) {\n\tconst {\n\t\tid,\n\t\tclassNames,\n\t\tclassName,\n\t\tasChild,\n\t\tchildren,\n\t\tisLoading = false,\n\t\tdisabled = false,\n\t\tisIconOnly = false,\n\t\tonClick,\n\t\tstartContent: startContentProp,\n\t\tendContent: endContentProp,\n\t\tspinner = null,\n\t\tspinnerPlacement = \"start\",\n type = \"button\",\n\t\t...rest\n\t} = props;\n\n\tconst domRef = useDOMRef(props.ref);\n\tconst buttonId = useId();\n\tconst resolvedId = id || buttonId;\n\n\tconst { onPress: onRipplePressHandler, onClear: onClearRipple, ripples } = useRipple();\n\n\tconst styles = useMemo(\n\t\t() =>\n\t\t\tbutton({\n\t\t\t\tsize: props.size,\n\t\t\t\tcolor: props.color,\n\t\t\t\tvariant: props.variant,\n\t\t\t\tradius: props.radius,\n\t\t\t\tfullWidth: props.fullWidth,\n\t\t\t\tisDisabled: disabled || isLoading,\n\t\t\t\tdisableAnimation: props.disableAnimation,\n\t\t\t\tisIconOnly: isIconOnly,\n\t\t\t\tisInGroup: props.isInGroup,\n\t\t\t\tclassName,\n\t\t\t}),\n\t\t[props, className, disabled, isLoading, isIconOnly],\n\t);\n\n\tconst handleClick: MouseEventHandler<HTMLElement> = useCallback(\n\t\t(e) => {\n\t\t\tif (disabled) {\n\t\t\t\te.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonClick?.(e);\n\t\t},\n\t\t[onClick, disabled],\n\t);\n\n\tconst getIconClone = (icon: ReactNode) =>\n\t\tisValidElement(icon)\n\t\t\t? cloneElement(icon, {\n\t\t\t\t\t// \"aria-hidden\": true,\n\t\t\t\t\t// \"focusable\": false,\n\t\t\t })\n\t\t\t: null;\n\n\tconst startContent = getIconClone(startContentProp);\n\tconst endContent = getIconClone(endContentProp);\n\n\tconst handlePointerDown = (e: React.PointerEvent<HTMLButtonElement>) => {\n\t\tconst rect = e.currentTarget.getBoundingClientRect();\n\t\tconst customEvent = {\n\t\t\ttarget: e.currentTarget,\n\t\t\tx: e.clientX - rect.left,\n\t\t\ty: e.clientY - rect.top,\n\t\t};\n\n\t\tonRipplePressHandler(customEvent);\n\t};\n\n\tconst getButtonProps = () => ({\n\t\t\"className\": clsx(styles, classNames?.base),\n\t\t\"data-disabled\": dataAttr(disabled),\n\t\t\"data-loading\": dataAttr(isLoading),\n\t\t\"onClick\": handleClick,\n\t\t\"onPointerDown\": handlePointerDown,\n\t\t\"data-slot\": \"button\",\n\t\t\"aria-disabled\": disabled,\n\t\t\"id\": resolvedId,\n \"type\": type,\n\t\t...rest,\n\t});\n\n\tconst getRippleProps = useCallback<() => RippleProps>(() => ({ ripples, onClear: onClearRipple }), [ripples, onClearRipple]);\n\n\tconst Component = asChild ? Slot : \"button\";\n\n\treturn {\n\t\tdomRef,\n\t\tisIconOnly,\n\t\tComponent,\n\t\tchildren,\n\t\tisLoading,\n\t\tspinner,\n\t\tspinnerPlacement,\n\t\tstartContent,\n\t\tendContent,\n\t\tgetButtonProps,\n\t\tgetRippleProps,\n\t};\n}\n\nexport type UseButtonReturn = ReturnType<typeof useButton>;\n","const Spinner = () => {\n\treturn (\n\t\t<div aria-label=\"Loading\" className=\"relative inline-flex flex-col gap-2 items-center justify-center\">\n\t\t\t<div className=\"relative flex w-5 h-5\">\n\t\t\t\t<i className=\"absolute w-full h-full rounded-full border-2 border-b-current animate-spinner-ease-spin border-solid border-t-transparent border-l-transparent border-r-transparent\" />\n\t\t\t\t<i className=\"absolute w-full h-full rounded-full border-2 border-b-current opacity-75 animate-spinner-linear-spin border-dotted border-t-transparent border-l-transparent border-r-transparent\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default Spinner;\n","import { forwardRef, useMemo } from \"react\";\nimport { useButton, type UseButtonProps } from \"./use-button\";\nimport Ripple from \"../ripple/ripple\";\nimport Spinner from \"./spinner\";\n\nexport interface ButtonProps extends UseButtonProps {}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n\tconst {\n\t\tComponent,\n\t\tdomRef,\n\t\tchildren,\n\t\tisIconOnly,\n\t\tisLoading,\n\t\tspinner,\n\t\tspinnerPlacement,\n\t\tstartContent,\n\t\tendContent,\n\t\tgetButtonProps,\n\t\tgetRippleProps,\n\t} = useButton({\n\t\t...props,\n\t\tref,\n\t});\n\n\tconst fallbackSpinner = useMemo(() => <Spinner />, []);\n\tconst finalSpinner = spinner ?? fallbackSpinner;\n\n\treturn (\n\t\t<Component {...getButtonProps()} ref={domRef}>\n\t\t\t{startContent}\n\t\t\t{isLoading && spinnerPlacement === \"start\" && finalSpinner}\n\t\t\t{isLoading && isIconOnly ? null : children}\n\t\t\t{isLoading && spinnerPlacement === \"end\" && finalSpinner}\n\t\t\t{endContent}\n\t\t\t<Ripple {...getRippleProps()} />\n\t\t</Component>\n\t);\n});\n\nButton.displayName = \"Custom.Button\";\n\nexport default Button;\n"],"names":["button","tv","dataFocusVisibleClasses","colorVariants","collapseAdjacentVariantBorders","useButton","props","id","classNames","className","asChild","children","isLoading","disabled","isIconOnly","onClick","startContentProp","endContentProp","spinner","spinnerPlacement","type","rest","domRef","useDOMRef","buttonId","useId","resolvedId","onRipplePressHandler","onClearRipple","ripples","useRipple","styles","useMemo","handleClick","useCallback","e","getIconClone","icon","isValidElement","cloneElement","startContent","endContent","handlePointerDown","rect","customEvent","getButtonProps","clsx","dataAttr","getRippleProps","Component","Slot","Spinner","jsx","jsxs","Button","forwardRef","ref","fallbackSpinner","finalSpinner","Ripple"],"mappings":"4UAqBMA,EAASC,EAAAA,GAAG,CACjB,KAAM,CACL,MACM,iBACN,QACA,WACA,cACA,eACA,iBACA,aACA,kBACA,eACA,cACA,oBACA,YACA,cACA,uBACA,kBACA,4BACA,iDAEA,GAAGC,EAAAA,uBAAA,EAEJ,SAAU,CACT,QAAS,CACR,MAAO,GACP,SAAU,8BACV,MAAO,iBACP,KAAM,GACN,MAAO,eACP,OAAQ,GACR,MAAO,6BAAA,EAER,KAAM,CACL,GAAI,+CACJ,GAAI,8CACJ,GAAI,6CAAA,EAEL,MAAO,CACN,QAAS,GACT,QAAS,GACT,UAAW,GACX,QAAS,GACT,QAAS,GACT,OAAQ,EAAA,EA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C,EAAUwC,EAAAA,KAAO,SAEnC,MAAO,CACN,OAAA5B,EACA,WAAAR,EACA,UAAAmC,EACA,SAAAtC,EACA,UAAAC,EACA,QAAAM,EACA,iBAAAC,EACA,aAAAqB,EACA,WAAAC,EACA,eAAAI,EACA,eAAAG,CAAA,CAEF,CCrIA,MAAMG,EAAU,IAEdC,EAAAA,kBAAAA,IAAC,OAAI,aAAW,UAAU,UAAU,kEACnC,SAAAC,EAAAA,kBAAAA,KAAC,MAAA,CAAI,UAAU,wBACd,SAAA,CAAAD,EAAAA,kBAAAA,IAAC,IAAA,CAAE,UAAU,qKAAA,CAAsK,EACnLA,EAAAA,kBAAAA,IAAC,IAAA,CAAE,UAAU,mLAAA,CAAoL,CAAA,CAAA,CAClM,CAAA,CACD,ECAIE,EAASC,EAAAA,WAA2C,CAACjD,EAAOkD,IAAQ,CACzE,KAAM,CACL,UAAAP,EACA,OAAA3B,EACA,SAAAX,EACA,WAAAG,EACA,UAAAF,EACA,QAAAM,EACA,iBAAAC,EACA,aAAAqB,EACA,WAAAC,EACA,eAAAI,EACA,eAAAG,CAAA,EACG3C,EAAU,CACb,GAAGC,EACH,IAAAkD,CAAA,CACA,EAEKC,EAAkBzB,EAAAA,QAAQ,4BAAOmB,EAAA,CAAA,CAAQ,EAAI,EAAE,EAC/CO,EAAexC,GAAWuC,EAEhC,gCACER,EAAA,CAAW,GAAGJ,EAAA,EAAkB,IAAKvB,EACpC,SAAA,CAAAkB,EACA5B,GAAaO,IAAqB,SAAWuC,EAC7C9C,GAAaE,EAAa,KAAOH,EACjCC,GAAaO,IAAqB,OAASuC,EAC3CjB,EACDW,EAAAA,kBAAAA,IAACO,EAAAA,OAAA,CAAQ,GAAGX,GAAe,CAAG,CAAA,EAC/B,CAEF,CAAC,EAEDM,EAAO,YAAc"}
1
+ {"version":3,"file":"button-DaAJ3J_i.js","sources":["../../src/theme/color/button.ts","../../src/components/button/use-button.ts","../../src/components/button/spinner.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import { tv } from \"@/lib/tv\";\nimport type { VariantProps } from \"tailwind-variants\";\nimport { collapseAdjacentVariantBorders, dataFocusVisibleClasses } from \"../classes\";\nimport { colorVariants } from \"../variants\";\n\n/**\n * Button wrapper **Tailwind Variants** component\n *\n * const classNames = button({...})\n *\n * @example\n * <button\n * className={classNames())}\n * data-pressed={true/false}\n * data-hover={true/false}\n * data-focus={true/false}\n * data-focus-visible={true/false}\n * >\n * Button\n * </button>\n */\nconst button = tv({\n\tbase: [\n\t\t\"z-0\",\n \"cursor-pointer\",\n\t\t\"group\",\n\t\t\"relative\",\n\t\t\"inline-flex\",\n\t\t\"items-center\",\n\t\t\"justify-center\",\n\t\t\"box-border\",\n\t\t\"appearance-none\",\n\t\t\"outline-none\",\n\t\t\"select-none\",\n\t\t\"whitespace-nowrap\",\n\t\t\"min-w-max\",\n\t\t\"font-medium\",\n\t\t\"subpixel-antialiased\",\n\t\t\"overflow-hidden\",\n\t\t\"tap-highlight-transparent\",\n\t\t\"transform-gpu data-[pressed=true]:scale-[0.97]\",\n\t\t// focus ring\n\t\t...dataFocusVisibleClasses,\n\t],\n\tvariants: {\n\t\tvariant: {\n\t\t\tsolid: \"\",\n\t\t\tbordered: \"border-[2px] bg-transparent\",\n\t\t\tlight: \"bg-transparent\",\n\t\t\tflat: \"\",\n\t\t\tfaded: \"border-[2px]\",\n\t\t\tshadow: \"\",\n\t\t\tghost: \"border-[2px] bg-transparent\",\n\t\t},\n\t\tsize: {\n\t\t\tsm: \"px-3 min-w-16 h-8 text-tiny gap-2 rounded-sm\",\n\t\t\tmd: \"px-4 min-w-20 h-10 text-sm gap-2 rounded-md\",\n\t\t\tlg: \"px-6 min-w-24 h-12 text-md gap-3 rounded-lg\",\n\t\t},\n\t\tcolor: {\n\t\t\tdefault: \"\",\n\t\t\tprimary: \"\",\n\t\t\tsecondary: \"\",\n\t\t\tsuccess: \"\",\n\t\t\twarning: \"\",\n\t\t\tdanger: \"\",\n\t\t},\n\t\tradius: {\n\t\t\tnone: \"rounded-none\",\n\t\t\tsm: \"rounded-sm\",\n\t\t\tmd: \"rounded-md\",\n\t\t\tlg: \"rounded-lg\",\n\t\t\tfull: \"rounded-full\",\n\t\t},\n\t\tfullWidth: {\n\t\t\ttrue: \"w-full\",\n\t\t},\n\t\tisDisabled: {\n\t\t\ttrue: \"opacity-80 pointer-events-none\",\n\t\t},\n\t\tisInGroup: {\n\t\t\ttrue: \"[&:not(:first-child):not(:last-child)]:rounded-none\",\n\t\t},\n\t\tisIconOnly: {\n\t\t\ttrue: \"px-0 !gap-0\",\n\t\t\tfalse: \"[&>svg]:max-w-[theme(spacing.8)]\",\n\t\t},\n\t\tdisableAnimation: {\n\t\t\ttrue: \"!transition-none data-[pressed=true]:scale-100\",\n\t\t\tfalse: \"transition-transform-colors-opacity motion-reduce:transition-none\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t\tvariant: \"solid\",\n\t\tcolor: \"default\",\n\t\tfullWidth: false,\n\t\tisDisabled: false,\n\t\tisInGroup: false,\n\t},\n\tcompoundVariants: [\n\t\t// solid / color\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.solid.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.solid.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.solid.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.solid.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.solid.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"solid\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.solid.danger,\n\t\t},\n\t\t// shadow / color\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.shadow.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.shadow.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.shadow.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.shadow.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.shadow.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"shadow\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.shadow.danger,\n\t\t},\n\t\t// bordered / color\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.bordered.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.bordered.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.bordered.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.bordered.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.bordered.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"bordered\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.bordered.danger,\n\t\t},\n\t\t// flat / color\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.flat.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.flat.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.flat.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.flat.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.flat.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"flat\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.flat.danger,\n\t\t},\n\t\t// faded / color\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: colorVariants.faded.default,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: colorVariants.faded.primary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: colorVariants.faded.secondary,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: colorVariants.faded.success,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: colorVariants.faded.warning,\n\t\t},\n\t\t{\n\t\t\tvariant: \"faded\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: colorVariants.faded.danger,\n\t\t},\n\t\t// light / color\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: [colorVariants.light.default, \"data-[hover=true]:bg-default/40\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: [colorVariants.light.primary, \"data-[hover=true]:bg-primary/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: [colorVariants.light.secondary, \"data-[hover=true]:bg-secondary/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: [colorVariants.light.success, \"data-[hover=true]:bg-success/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: [colorVariants.light.warning, \"data-[hover=true]:bg-warning/20\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"light\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: [colorVariants.light.danger, \"data-[hover=true]:bg-danger/20\"],\n\t\t},\n\t\t// ghost / color\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"default\",\n\t\t\tclass: [colorVariants.ghost.default, \"data-[hover=true]:!bg-default\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"primary\",\n\t\t\tclass: [colorVariants.ghost.primary, \"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"secondary\",\n\t\t\tclass: [colorVariants.ghost.secondary, \"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"success\",\n\t\t\tclass: [colorVariants.ghost.success, \"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"warning\",\n\t\t\tclass: [colorVariants.ghost.warning, \"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground\"],\n\t\t},\n\t\t{\n\t\t\tvariant: \"ghost\",\n\t\t\tcolor: \"danger\",\n\t\t\tclass: [colorVariants.ghost.danger, \"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground\"],\n\t\t},\n\t\t// isInGroup / radius / size <-- radius not provided\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tclass: \"rounded-none first:rounded-s-medium last:rounded-e-medium\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tsize: \"sm\",\n\t\t\tclass: \"rounded-none first:rounded-s-small last:rounded-e-small\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tsize: \"md\",\n\t\t\tclass: \"rounded-none first:rounded-s-medium last:rounded-e-medium\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tsize: \"lg\",\n\t\t\tclass: \"rounded-none first:rounded-s-large last:rounded-e-large\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tisRounded: true,\n\t\t\tclass: \"rounded-none first:rounded-s-full last:rounded-e-full\",\n\t\t},\n\t\t// isInGroup / radius <-- radius provided\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"none\",\n\t\t\tclass: \"rounded-none first:rounded-s-none last:rounded-e-none\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"sm\",\n\t\t\tclass: \"rounded-none first:rounded-s-small last:rounded-e-small\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"md\",\n\t\t\tclass: \"rounded-none first:rounded-s-medium last:rounded-e-medium\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"lg\",\n\t\t\tclass: \"rounded-none first:rounded-s-large last:rounded-e-large\",\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tradius: \"full\",\n\t\t\tclass: \"rounded-none first:rounded-s-full last:rounded-e-full\",\n\t\t},\n\t\t// isInGroup / bordered / ghost\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"default\",\n\t\t\tclassName: collapseAdjacentVariantBorders.default,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"primary\",\n\t\t\tclassName: collapseAdjacentVariantBorders.primary,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"secondary\",\n\t\t\tclassName: collapseAdjacentVariantBorders.secondary,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"success\",\n\t\t\tclassName: collapseAdjacentVariantBorders.success,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"warning\",\n\t\t\tclassName: collapseAdjacentVariantBorders.warning,\n\t\t},\n\t\t{\n\t\t\tisInGroup: true,\n\t\t\tvariant: [\"ghost\", \"bordered\"],\n\t\t\tcolor: \"danger\",\n\t\t\tclassName: collapseAdjacentVariantBorders.danger,\n\t\t},\n\t\t{\n\t\t\tisIconOnly: true,\n\t\t\tsize: \"sm\",\n\t\t\tclass: \"min-w-8 w-8 h-8\",\n\t\t},\n\t\t{\n\t\t\tisIconOnly: true,\n\t\t\tsize: \"md\",\n\t\t\tclass: \"min-w-10 w-10 h-10\",\n\t\t},\n\t\t{\n\t\t\tisIconOnly: true,\n\t\t\tsize: \"lg\",\n\t\t\tclass: \"min-w-12 w-12 h-12\",\n\t\t},\n\t\t// variant / hover\n\t\t{\n\t\t\tvariant: [\"solid\", \"faded\", \"flat\", \"bordered\", \"shadow\"],\n\t\t\tclass: \"hover:opacity-80\",\n\t\t},\n\t],\n});\n\nexport type ButtonVariantProps = VariantProps<typeof button>;\n\nexport { button };\n","import { dataAttr, useDOMRef, type ReactRef } from \"@/functions\";\nimport { button, type ButtonVariantProps } from \"@/theme/color/button\";\nimport type { SlotsToClasses } from \"@/types\";\nimport clsx from \"clsx\";\nimport { isValidElement, cloneElement, useMemo, useCallback, useId } from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { ReactNode, MouseEventHandler, HTMLAttributes } from \"react\";\nimport type { RippleProps } from \"../ripple/ripple\";\nimport { useRipple } from \"../ripple/use-ripple\";\n\nexport interface UseButtonProps extends ButtonVariantProps, Omit<HTMLAttributes<HTMLElement>, keyof ButtonVariantProps> {\n\tref?: ReactRef<HTMLButtonElement | null>;\n\tid?: string;\n\tclassNames?: SlotsToClasses<ReturnType<typeof button>>;\n\tclassName?: string;\n\tasChild?: boolean;\n\tchildren?: ReactNode;\n\tisIconOnly?: boolean;\n\tisLoading?: boolean;\n\tdisabled?: boolean;\n\tstartContent?: ReactNode;\n\tendContent?: ReactNode;\n\tspinner?: ReactNode;\n\tspinnerPlacement?: \"start\" | \"end\";\n type?: \"button\" | \"submit\" | \"reset\";\n}\n\nexport function useButton(props: UseButtonProps) {\n\tconst {\n\t\tid,\n\t\tclassNames,\n\t\tclassName,\n\t\tasChild,\n\t\tchildren,\n\t\tisLoading = false,\n\t\tdisabled = false,\n\t\tisIconOnly = false,\n\t\tonClick,\n\t\tstartContent: startContentProp,\n\t\tendContent: endContentProp,\n\t\tspinner = null,\n\t\tspinnerPlacement = \"start\",\n type = \"button\",\n\t\t...rest\n\t} = props;\n\n\tconst domRef = useDOMRef(props.ref);\n\tconst buttonId = useId();\n\tconst resolvedId = id || buttonId;\n\n\tconst { onPress: onRipplePressHandler, onClear: onClearRipple, ripples } = useRipple();\n\n\tconst styles = useMemo(\n\t\t() =>\n\t\t\tbutton({\n\t\t\t\tsize: props.size,\n\t\t\t\tcolor: props.color,\n\t\t\t\tvariant: props.variant,\n\t\t\t\tradius: props.radius,\n\t\t\t\tfullWidth: props.fullWidth,\n\t\t\t\tisDisabled: disabled || isLoading,\n\t\t\t\tdisableAnimation: props.disableAnimation,\n\t\t\t\tisIconOnly: isIconOnly,\n\t\t\t\tisInGroup: props.isInGroup,\n\t\t\t\tclassName,\n\t\t\t}),\n\t\t[props, className, disabled, isLoading, isIconOnly],\n\t);\n\n\tconst handleClick: MouseEventHandler<HTMLElement> = useCallback(\n\t\t(e) => {\n\t\t\tif (disabled) {\n\t\t\t\te.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonClick?.(e);\n\t\t},\n\t\t[onClick, disabled],\n\t);\n\n\tconst getIconClone = (icon: ReactNode) =>\n\t\tisValidElement(icon)\n\t\t\t? cloneElement(icon, {\n\t\t\t\t\t// \"aria-hidden\": true,\n\t\t\t\t\t// \"focusable\": false,\n\t\t\t })\n\t\t\t: null;\n\n\tconst startContent = getIconClone(startContentProp);\n\tconst endContent = getIconClone(endContentProp);\n\n\tconst handlePointerDown = (e: React.PointerEvent<HTMLButtonElement>) => {\n\t\tconst rect = e.currentTarget.getBoundingClientRect();\n\t\tconst customEvent = {\n\t\t\ttarget: e.currentTarget,\n\t\t\tx: e.clientX - rect.left,\n\t\t\ty: e.clientY - rect.top,\n\t\t};\n\n\t\tonRipplePressHandler(customEvent);\n\t};\n\n\tconst getButtonProps = () => ({\n\t\t\"className\": clsx(styles, classNames?.base),\n\t\t\"data-disabled\": dataAttr(disabled),\n\t\t\"data-loading\": dataAttr(isLoading),\n\t\t\"onClick\": handleClick,\n\t\t\"onPointerDown\": handlePointerDown,\n\t\t\"data-slot\": \"button\",\n\t\t\"aria-disabled\": disabled,\n\t\t\"id\": resolvedId,\n \"type\": type,\n\t\t...rest,\n\t});\n\n\tconst getRippleProps = useCallback<() => RippleProps>(() => ({ ripples, onClear: onClearRipple }), [ripples, onClearRipple]);\n\n\tconst Component = asChild ? Slot : \"button\";\n\n\treturn {\n\t\tdomRef,\n\t\tisIconOnly,\n\t\tComponent,\n\t\tchildren,\n\t\tisLoading,\n\t\tspinner,\n\t\tspinnerPlacement,\n\t\tstartContent,\n\t\tendContent,\n\t\tgetButtonProps,\n\t\tgetRippleProps,\n\t};\n}\n\nexport type UseButtonReturn = ReturnType<typeof useButton>;\n","const Spinner = () => {\n\treturn (\n\t\t<div aria-label=\"Loading\" className=\"relative inline-flex flex-col gap-2 items-center justify-center\">\n\t\t\t<div className=\"relative flex w-5 h-5\">\n\t\t\t\t<i className=\"absolute w-full h-full rounded-full border-2 border-b-current animate-spinner-ease-spin border-solid border-t-transparent border-l-transparent border-r-transparent\" />\n\t\t\t\t<i className=\"absolute w-full h-full rounded-full border-2 border-b-current opacity-75 animate-spinner-linear-spin border-dotted border-t-transparent border-l-transparent border-r-transparent\" />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default Spinner;\n","import { forwardRef, useMemo } from \"react\";\nimport { useButton, type UseButtonProps } from \"./use-button\";\nimport Ripple from \"../ripple/ripple\";\nimport Spinner from \"./spinner\";\n\nexport interface ButtonProps extends UseButtonProps {}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {\n\tconst {\n\t\tComponent,\n\t\tdomRef,\n\t\tchildren,\n\t\tisIconOnly,\n\t\tisLoading,\n\t\tspinner,\n\t\tspinnerPlacement,\n\t\tstartContent,\n\t\tendContent,\n\t\tgetButtonProps,\n\t\tgetRippleProps,\n\t} = useButton({\n\t\t...props,\n\t\tref,\n\t});\n\n\tconst fallbackSpinner = useMemo(() => <Spinner />, []);\n\tconst finalSpinner = spinner ?? fallbackSpinner;\n\n\treturn (\n\t\t<Component {...getButtonProps()} ref={domRef}>\n\t\t\t{startContent}\n\t\t\t{isLoading && spinnerPlacement === \"start\" && finalSpinner}\n\t\t\t{isLoading && isIconOnly ? null : children}\n\t\t\t{isLoading && spinnerPlacement === \"end\" && finalSpinner}\n\t\t\t{endContent}\n\t\t\t<Ripple {...getRippleProps()} />\n\t\t</Component>\n\t);\n});\n\nButton.displayName = \"Custom.Button\";\n\nexport default Button;\n"],"names":["button","tv","dataFocusVisibleClasses","colorVariants","collapseAdjacentVariantBorders","useButton","props","id","classNames","className","asChild","children","isLoading","disabled","isIconOnly","onClick","startContentProp","endContentProp","spinner","spinnerPlacement","type","rest","domRef","useDOMRef","buttonId","useId","resolvedId","onRipplePressHandler","onClearRipple","ripples","useRipple","styles","useMemo","handleClick","useCallback","e","getIconClone","icon","isValidElement","cloneElement","startContent","endContent","handlePointerDown","rect","customEvent","getButtonProps","clsx","dataAttr","getRippleProps","Component","Slot","Spinner","jsx","jsxs","Button","forwardRef","ref","fallbackSpinner","finalSpinner","Ripple"],"mappings":"0VAqBMA,EAASC,EAAAA,GAAG,CACjB,KAAM,CACL,MACM,iBACN,QACA,WACA,cACA,eACA,iBACA,aACA,kBACA,eACA,cACA,oBACA,YACA,cACA,uBACA,kBACA,4BACA,iDAEA,GAAGC,EAAAA,uBAAA,EAEJ,SAAU,CACT,QAAS,CACR,MAAO,GACP,SAAU,8BACV,MAAO,iBACP,KAAM,GACN,MAAO,eACP,OAAQ,GACR,MAAO,6BAAA,EAER,KAAM,CACL,GAAI,+CACJ,GAAI,8CACJ,GAAI,6CAAA,EAEL,MAAO,CACN,QAAS,GACT,QAAS,GACT,UAAW,GACX,QAAS,GACT,QAAS,GACT,OAAQ,EAAA,EAET,OAAQ,CACP,KAAM,eACN,GAAI,aACJ,GAAI,aACJ,GAAI,aACJ,KAAM,cAAA,EAEP,UAAW,CACV,KAAM,QAAA,EAEP,WAAY,CACX,KAAM,gCAAA,EAEP,UAAW,CACV,KAAM,qDAAA,EAEP,WAAY,CACX,KAAM,cACN,MAAO,kCAAA,EAER,iBAAkB,CACjB,KAAM,iDACN,MAAO,mEAAA,CACR,EAED,gBAAiB,CAChB,KAAM,KACN,QAAS,QACT,MAAO,UACP,UAAW,GACX,WAAY,GACZ,UAAW,EAAA,EAEZ,iBAAkB,CAEjB,CACC,QAAS,QACT,MAAO,UACP,MAAOC,EAAAA,cAAc,MAAM,OAAA,EAE5B,CACC,QAAS,QACT,MAAO,UACP,MAAOA,EAAAA,cAAc,MAAM,OAAA,EAE5B,CACC,QAAS,QACT,MAAO,YACP,MAAOA,EAAAA,cAAc,MAAM,SAAA,EAE5B,CACC,QAAS,QACT,MAAO,UACP,MAAOA,EAAAA,cAAc,MAAM,OAAA,EAE5B,CACC,QAAS,QACT,MAAO,UACP,MAAOA,EAA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,eAAAI,EACA,eAAAG,CAAA,EACG3C,EAAU,CACb,GAAGC,EACH,IAAAkD,CAAA,CACA,EAEKC,EAAkBzB,EAAAA,QAAQ,4BAAOmB,EAAA,CAAA,CAAQ,EAAI,EAAE,EAC/CO,EAAexC,GAAWuC,EAEhC,gCACER,EAAA,CAAW,GAAGJ,EAAA,EAAkB,IAAKvB,EACpC,SAAA,CAAAkB,EACA5B,GAAaO,IAAqB,SAAWuC,EAC7C9C,GAAaE,EAAa,KAAOH,EACjCC,GAAaO,IAAqB,OAASuC,EAC3CjB,EACDW,EAAAA,kBAAAA,IAACO,EAAAA,OAAA,CAAQ,GAAGX,GAAe,CAAG,CAAA,EAC/B,CAEF,CAAC,EAEDM,EAAO,YAAc"}
@@ -1,11 +1,11 @@
1
1
  import { j as a } from "./jsx-runtime-Cl_4eDuT.js";
2
2
  import { useRef as C, useId as P, useMemo as I, useCallback as j, forwardRef as A, cloneElement as N } from "react";
3
3
  import { S as B } from "./index-Do-g2tEs.js";
4
- import { t as W } from "./tv-3Bk5oRI_.js";
4
+ import { t as W } from "./tv-DQO4decF.js";
5
5
  import { h as z, g as L } from "./classes-7MXTIFwM.js";
6
6
  import { d as x } from "./assertion-CrT8p68K.js";
7
7
  import { m as S } from "./refs-DAOksVs3.js";
8
- import D from "clsx";
8
+ import { c as D } from "./clsx-OuTLNxxd.js";
9
9
  const T = W({
10
10
  slots: {
11
11
  base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",
@@ -310,4 +310,4 @@ export {
310
310
  M as C,
311
311
  q as a
312
312
  };
313
- //# sourceMappingURL=checkbox-BhW9i0pm.js.map
313
+ //# sourceMappingURL=checkbox-BvvZL9H4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-BhW9i0pm.js","sources":["../../src/theme/color/checkbox.ts","../../src/components/checkbox/use-checkbox.ts","../../src/components/checkbox/checkbox-icon.tsx","../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { tv } from \"@/lib/tv\";\nimport type { VariantProps } from \"tailwind-variants\";\nimport { groupDataFocusVisibleClasses, hiddenInputClasses } from \"../classes\";\n\n/**\n * Checkbox wrapper **Tailwind Variants** component\n *\n * const {base, wrapper, icon, label} = checkbox({...})\n *\n * @example\n * <label className={base())}>\n * // hidden input\n * <span className={wrapper()} aria-hidden=\"true\" data-selected={selected}>\n * <svg className={icon()}>\n * // check icon\n * </svg>\n * </span>\n * <span className={label()}>Label</span>\n * </label>\n */\nconst checkbox = tv({\n\tslots: {\n\t\tbase: \"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none\",\n\t\twrapper: [\n\t\t\t\"relative\",\n\t\t\t\"inline-flex\",\n\t\t\t\"items-center\",\n\t\t\t\"justify-center\",\n\t\t\t\"flex-shrink-0\",\n\t\t\t\"overflow-hidden\",\n\t\t\t// before\n\t\t\t\"before:content-['']\",\n\t\t\t\"before:absolute\",\n\t\t\t\"before:inset-0\",\n\t\t\t\"before:border-solid\",\n\t\t\t\"before:border-2\",\n\t\t\t\"before:box-border\",\n\t\t\t\"before:border-default\",\n\t\t\t// after\n\t\t\t\"after:content-['']\",\n\t\t\t\"after:absolute\",\n\t\t\t\"after:inset-0\",\n\t\t\t\"after:scale-50\",\n\t\t\t\"after:opacity-0\",\n\t\t\t\"after:origin-center\",\n\t\t\t\"group-data-[selected=true]:after:scale-100\",\n\t\t\t\"group-data-[selected=true]:after:opacity-100\",\n\t\t\t// hover\n\t\t\t\"group-data-[hover=true]:before:bg-default-100\",\n\t\t\t// focus ring\n\t\t\t...groupDataFocusVisibleClasses,\n\t\t],\n\t\thiddenInput: hiddenInputClasses,\n\t\ticon: \"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none\",\n\t\tlabel: \"relative text-foreground select-none\",\n\t},\n\tvariants: {\n\t\tcolor: {\n\t\t\tdefault: {\n\t\t\t\twrapper: \"after:bg-default after:text-default-foreground text-default-foreground\",\n\t\t\t},\n\t\t\tprimary: {\n\t\t\t\twrapper: \"after:bg-primary after:text-primary-foreground text-primary-foreground\",\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\twrapper: \"after:bg-secondary after:text-secondary-foreground text-secondary-foreground\",\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\twrapper: \"after:bg-success after:text-success-foreground text-success-foreground\",\n\t\t\t},\n\t\t\twarning: {\n\t\t\t\twrapper: \"after:bg-warning after:text-warning-foreground text-warning-foreground\",\n\t\t\t},\n\t\t\tdanger: {\n\t\t\t\twrapper: \"after:bg-danger after:text-danger-foreground text-danger-foreground\",\n\t\t\t},\n\t\t},\n\t\tsize: {\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-4 h-4 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-small\",\n\t\t\t\ticon: \"w-3 h-2\",\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-5 h-5 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-medium\",\n\t\t\t\ticon: \"w-4 h-3\",\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-6 h-6 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-large\",\n\t\t\t\ticon: \"w-5 h-4\",\n\t\t\t},\n\t\t},\n\t\tradius: {\n\t\t\tnone: {\n\t\t\t\twrapper: \"rounded-none before:rounded-none after:rounded-none\",\n\t\t\t},\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tfull: {\n\t\t\t\twrapper: \"rounded-full before:rounded-full after:rounded-full\",\n\t\t\t},\n\t\t},\n\t\tlineThrough: {\n\t\t\ttrue: {\n\t\t\t\tlabel: [\n\t\t\t\t\t\"inline-flex\",\n\t\t\t\t\t\"items-center\",\n\t\t\t\t\t\"justify-center\",\n\t\t\t\t\t\"before:content-['']\",\n\t\t\t\t\t\"before:absolute\",\n\t\t\t\t\t\"before:bg-foreground\",\n\t\t\t\t\t\"before:w-0\",\n\t\t\t\t\t\"before:h-0.5\",\n\t\t\t\t\t\"group-data-[selected=true]:opacity-60\",\n\t\t\t\t\t\"group-data-[selected=true]:before:w-full\",\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: {\n\t\t\t\tbase: \"opacity-80 pointer-events-none\",\n\t\t\t},\n\t\t},\n\t\tisInvalid: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"before:border-danger\",\n\t\t\t\tlabel: \"text-danger\",\n\t\t\t},\n\t\t},\n\t\tdisableAnimation: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"transition-none\",\n\t\t\t\ticon: \"transition-none\",\n\t\t\t\tlabel: \"transition-none\",\n\t\t\t},\n\t\t\tfalse: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"before:transition-colors\",\n\t\t\t\t\t\"group-data-[pressed=true]:scale-95\",\n\t\t\t\t\t\"transition-transform\",\n\t\t\t\t\t\"after:transition-transform-opacity\",\n\t\t\t\t\t\"after:!ease-linear\",\n\t\t\t\t\t\"after:!duration-200\",\n\t\t\t\t\t\"motion-reduce:transition-none\",\n\t\t\t\t],\n\t\t\t\ticon: \"transition-opacity motion-reduce:transition-none\",\n\t\t\t\tlabel: \"transition-colors-opacity before:transition-width motion-reduce:transition-none\",\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tcolor: \"primary\",\n\t\tsize: \"md\",\n\t\tdisabled: false,\n\t\tlineThrough: false,\n\t},\n});\n\nexport type CheckboxVariantProps = VariantProps<typeof checkbox>;\nexport type CheckboxSlots = keyof ReturnType<typeof checkbox>;\n\nexport { checkbox };\n","import { useCallback, useId, useMemo, useRef, type ChangeEvent } from \"react\";\r\n\r\nimport { checkbox, type CheckboxSlots, type CheckboxVariantProps } from \"@/theme/color/checkbox\";\r\nimport type { SlotsToClasses } from \"@/types\";\r\nimport { dataAttr, mergeRefs } from \"@/functions\";\r\nimport clsx from \"clsx\";\r\n\r\nexport interface UseCheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof CheckboxVariantProps>, CheckboxVariantProps {\r\n\tclassNames?: SlotsToClasses<CheckboxSlots>;\r\n\tclassName?: string;\r\n\ticon?: React.ReactNode | ((props: CheckboxIconProps) => React.ReactNode);\r\n\tchildren?: React.ReactNode;\r\n\tisIndeterminate?: boolean;\r\n\tref?: React.Ref<HTMLInputElement>;\r\n\terror?: string;\r\n\ttouched?: boolean;\r\n\trequired?: boolean;\r\n}\r\n\r\nexport interface CheckboxIconProps {\r\n\tid?: string;\r\n\tisSelected: boolean;\r\n\tisIndeterminate?: boolean;\r\n\tdisableAnimation?: boolean;\r\n\tclassName?: string;\r\n}\r\n\r\nexport function useCheckbox(props: UseCheckboxProps) {\r\n\tconst {\r\n\t\tid,\r\n\t\tclassNames,\r\n\t\tclassName,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tdefaultChecked,\r\n\t\tchecked,\r\n\t\terror,\r\n\t\ttouched,\r\n\t\tonChange,\r\n\t\tisIndeterminate = false,\r\n\t} = props;\r\n\r\n\tconst internalRef = useRef<HTMLInputElement>(null);\r\n\tconst inputId = useId();\r\n\tconst resolvedId = id || inputId;\r\n\r\n\tconst [isSelected] = useMemo(() => {\r\n\t\treturn [typeof checked === \"boolean\" ? checked : defaultChecked || false, () => {}];\r\n\t}, [checked, defaultChecked]);\r\n\r\n\tconst handleChange = useCallback(\r\n\t\t(e: ChangeEvent<HTMLInputElement>) => {\r\n\t\t\tif (readOnly || disabled) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tonChange?.(e);\r\n\t\t},\r\n\t\t[onChange, readOnly, disabled],\r\n\t);\r\n\r\n\tconst slots = useMemo(\r\n\t\t() =>\r\n\t\t\tcheckbox({\r\n\t\t\t\tcolor: props.color,\r\n\t\t\t\tsize: props.size,\r\n\t\t\t\tradius: props.radius,\r\n\t\t\t\tlineThrough: props.lineThrough,\r\n\t\t\t\tdisabled: disabled,\r\n\t\t\t\tisInvalid: !!error && touched,\r\n\t\t\t\tdisableAnimation: props.disableAnimation,\r\n\t\t\t}),\r\n\t\t[props, disabled, error, touched],\r\n\t);\r\n\r\n\tconst getBaseProps = () => ({\r\n\t\t\"className\": slots.base({ class: clsx(classNames?.base, className) }),\r\n\t\t\"data-disabled\": dataAttr(disabled),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getWrapperProps = () => ({\r\n\t\t\"aria-hidden\": true,\r\n\t\t\"className\": slots.wrapper({ class: classNames?.wrapper }),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getInputProps = () => ({\r\n\t\tref: mergeRefs(internalRef, props.ref),\r\n\t\ttype: \"checkbox\",\r\n\t\tid: resolvedId,\r\n\t\tdefaultChecked: checked === undefined ? defaultChecked : undefined,\r\n\t\tchecked: checked !== undefined ? checked : undefined,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tonChange: handleChange,\r\n\t\tclassName: slots.hiddenInput({ class: classNames?.hiddenInput }),\r\n\t});\r\n\r\n\tconst getLabelProps = () => ({\r\n\t\thtmlFor: resolvedId,\r\n\t\tclassName: slots.label({ class: classNames?.label }),\r\n\t});\r\n\r\n\tconst getIconProps = (): CheckboxIconProps => ({\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tdisableAnimation: props.disableAnimation,\r\n\t\tclassName: slots.icon({ class: classNames?.icon }),\r\n\t});\r\n\r\n\tconst Component = \"label\";\r\n\r\n\treturn {\r\n\t\tComponent,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetLabelProps,\r\n\t\tgetIconProps,\r\n\t};\r\n}\r\n\r\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>;\r\n","import type { UseCheckboxReturn } from \"./use-checkbox\";\n\ntype CheckboxIconProps = Partial<ReturnType<UseCheckboxReturn[\"getIconProps\"]>>;\n\nfunction CheckIcon(props: CheckboxIconProps) {\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg\n\t\t\taria-hidden=\"true\"\n\t\t\tfill=\"none\"\n\t\t\trole=\"presentation\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeDasharray={22}\n\t\t\tstrokeDashoffset={isSelected ? 44 : 66}\n\t\t\tstrokeLinecap=\"round\"\n\t\t\tstrokeLinejoin=\"round\"\n\t\t\tstrokeWidth={2}\n\t\t\tstyle={\n\t\t\t\t!disableAnimation && isSelected\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ttransition: \"stroke-dashoffset 250ms linear 0.2s\",\n\t\t\t\t\t }\n\t\t\t\t\t: {}\n\t\t\t}\n\t\t\tviewBox=\"0 0 17 18\"\n\t\t\t{...otherProps}\n\t\t>\n\t\t\t<polyline points=\"1 9 7 14 15 4\" />\n\t\t</svg>\n\t);\n}\n\nfunction IndeterminateIcon(props: CheckboxIconProps) {\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg stroke=\"currentColor\" strokeWidth={3} viewBox=\"0 0 24 24\" {...otherProps}>\n\t\t\t<line x1=\"21\" x2=\"3\" y1=\"12\" y2=\"12\" />\n\t\t</svg>\n\t);\n}\n\n/**\n * CheckboxIcon is used to visually indicate the checked or indeterminate\n * state of a checkbox.\n */\nexport function CheckboxIcon(props: CheckboxIconProps) {\n\tconst { isIndeterminate, ...otherProps } = props;\n\tconst BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;\n\n\treturn <BaseIcon {...otherProps} />;\n}\n","// checkbox.tsx\r\nimport { forwardRef } from \"react\";\r\nimport { cloneElement, type ReactElement } from \"react\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\n\r\nimport { useCheckbox, type UseCheckboxProps } from \"./use-checkbox\";\r\nimport { CheckboxIcon } from \"./checkbox-icon\";\r\n\r\nexport interface CheckboxProps extends UseCheckboxProps {\r\n\tasChild?: boolean;\r\n}\r\n\r\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\r\n\tconst { asChild = false, ...restProps } = props;\r\n\tconst {\r\n\t\tComponent,\r\n\t\tchildren,\r\n\t\ticon = <CheckboxIcon />,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetIconProps,\r\n\t\tgetLabelProps,\r\n\t} = useCheckbox({ ...restProps, ref });\r\n\r\n\tconst clonedIcon = typeof icon === \"function\" ? icon(getIconProps()) : cloneElement(icon as ReactElement, getIconProps());\r\n\r\n\tconst Wrapper = asChild ? Slot : Component;\r\n\r\n\treturn (\r\n\t\t<Wrapper {...getBaseProps()}>\r\n\t\t\t<input {...getInputProps()} ref={ref} />\r\n\t\t\t<span {...getWrapperProps()}>{clonedIcon}</span>\r\n\t\t\t{children && <span {...getLabelProps()}>{children}</span>}\r\n\t\t</Wrapper>\r\n\t);\r\n});\r\n\r\nCheckbox.displayName = \"Custom.Checkbox\";\r\n\r\nexport default Checkbox;\r\n"],"names":["checkbox","tv","groupDataFocusVisibleClasses","hiddenInputClasses","useCheckbox","props","id","classNames","className","icon","children","disabled","required","readOnly","defaultChecked","checked","error","touched","onChange","isIndeterminate","internalRef","useRef","inputId","useId","resolvedId","isSelected","useMemo","handleChange","useCallback","e","slots","clsx","dataAttr","mergeRefs","CheckIcon","disableAnimation","otherProps","jsx","IndeterminateIcon","CheckboxIcon","BaseIcon","Checkbox","forwardRef","ref","asChild","restProps","Component","getBaseProps","getWrapperProps","getInputProps","getIconProps","getLabelProps","clonedIcon","cloneElement","Wrapper","Slot","jsxs"],"mappings":";;;;;;;;AAoBA,MAAMA,IAAWC,EAAG;AAAA,EACnB,OAAO;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,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AA,EAAA,GACnD;AAEF,CAAC;AAED+B,EAAS,cAAc;"}
1
+ {"version":3,"file":"checkbox-BvvZL9H4.js","sources":["../../src/theme/color/checkbox.ts","../../src/components/checkbox/use-checkbox.ts","../../src/components/checkbox/checkbox-icon.tsx","../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { tv } from \"@/lib/tv\";\nimport type { VariantProps } from \"tailwind-variants\";\nimport { groupDataFocusVisibleClasses, hiddenInputClasses } from \"../classes\";\n\n/**\n * Checkbox wrapper **Tailwind Variants** component\n *\n * const {base, wrapper, icon, label} = checkbox({...})\n *\n * @example\n * <label className={base())}>\n * // hidden input\n * <span className={wrapper()} aria-hidden=\"true\" data-selected={selected}>\n * <svg className={icon()}>\n * // check icon\n * </svg>\n * </span>\n * <span className={label()}>Label</span>\n * </label>\n */\nconst checkbox = tv({\n\tslots: {\n\t\tbase: \"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none\",\n\t\twrapper: [\n\t\t\t\"relative\",\n\t\t\t\"inline-flex\",\n\t\t\t\"items-center\",\n\t\t\t\"justify-center\",\n\t\t\t\"flex-shrink-0\",\n\t\t\t\"overflow-hidden\",\n\t\t\t// before\n\t\t\t\"before:content-['']\",\n\t\t\t\"before:absolute\",\n\t\t\t\"before:inset-0\",\n\t\t\t\"before:border-solid\",\n\t\t\t\"before:border-2\",\n\t\t\t\"before:box-border\",\n\t\t\t\"before:border-default\",\n\t\t\t// after\n\t\t\t\"after:content-['']\",\n\t\t\t\"after:absolute\",\n\t\t\t\"after:inset-0\",\n\t\t\t\"after:scale-50\",\n\t\t\t\"after:opacity-0\",\n\t\t\t\"after:origin-center\",\n\t\t\t\"group-data-[selected=true]:after:scale-100\",\n\t\t\t\"group-data-[selected=true]:after:opacity-100\",\n\t\t\t// hover\n\t\t\t\"group-data-[hover=true]:before:bg-default-100\",\n\t\t\t// focus ring\n\t\t\t...groupDataFocusVisibleClasses,\n\t\t],\n\t\thiddenInput: hiddenInputClasses,\n\t\ticon: \"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none\",\n\t\tlabel: \"relative text-foreground select-none\",\n\t},\n\tvariants: {\n\t\tcolor: {\n\t\t\tdefault: {\n\t\t\t\twrapper: \"after:bg-default after:text-default-foreground text-default-foreground\",\n\t\t\t},\n\t\t\tprimary: {\n\t\t\t\twrapper: \"after:bg-primary after:text-primary-foreground text-primary-foreground\",\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\twrapper: \"after:bg-secondary after:text-secondary-foreground text-secondary-foreground\",\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\twrapper: \"after:bg-success after:text-success-foreground text-success-foreground\",\n\t\t\t},\n\t\t\twarning: {\n\t\t\t\twrapper: \"after:bg-warning after:text-warning-foreground text-warning-foreground\",\n\t\t\t},\n\t\t\tdanger: {\n\t\t\t\twrapper: \"after:bg-danger after:text-danger-foreground text-danger-foreground\",\n\t\t\t},\n\t\t},\n\t\tsize: {\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-4 h-4 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-small\",\n\t\t\t\ticon: \"w-3 h-2\",\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-5 h-5 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-medium\",\n\t\t\t\ticon: \"w-4 h-3\",\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-6 h-6 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-large\",\n\t\t\t\ticon: \"w-5 h-4\",\n\t\t\t},\n\t\t},\n\t\tradius: {\n\t\t\tnone: {\n\t\t\t\twrapper: \"rounded-none before:rounded-none after:rounded-none\",\n\t\t\t},\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tfull: {\n\t\t\t\twrapper: \"rounded-full before:rounded-full after:rounded-full\",\n\t\t\t},\n\t\t},\n\t\tlineThrough: {\n\t\t\ttrue: {\n\t\t\t\tlabel: [\n\t\t\t\t\t\"inline-flex\",\n\t\t\t\t\t\"items-center\",\n\t\t\t\t\t\"justify-center\",\n\t\t\t\t\t\"before:content-['']\",\n\t\t\t\t\t\"before:absolute\",\n\t\t\t\t\t\"before:bg-foreground\",\n\t\t\t\t\t\"before:w-0\",\n\t\t\t\t\t\"before:h-0.5\",\n\t\t\t\t\t\"group-data-[selected=true]:opacity-60\",\n\t\t\t\t\t\"group-data-[selected=true]:before:w-full\",\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: {\n\t\t\t\tbase: \"opacity-80 pointer-events-none\",\n\t\t\t},\n\t\t},\n\t\tisInvalid: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"before:border-danger\",\n\t\t\t\tlabel: \"text-danger\",\n\t\t\t},\n\t\t},\n\t\tdisableAnimation: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"transition-none\",\n\t\t\t\ticon: \"transition-none\",\n\t\t\t\tlabel: \"transition-none\",\n\t\t\t},\n\t\t\tfalse: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"before:transition-colors\",\n\t\t\t\t\t\"group-data-[pressed=true]:scale-95\",\n\t\t\t\t\t\"transition-transform\",\n\t\t\t\t\t\"after:transition-transform-opacity\",\n\t\t\t\t\t\"after:!ease-linear\",\n\t\t\t\t\t\"after:!duration-200\",\n\t\t\t\t\t\"motion-reduce:transition-none\",\n\t\t\t\t],\n\t\t\t\ticon: \"transition-opacity motion-reduce:transition-none\",\n\t\t\t\tlabel: \"transition-colors-opacity before:transition-width motion-reduce:transition-none\",\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tcolor: \"primary\",\n\t\tsize: \"md\",\n\t\tdisabled: false,\n\t\tlineThrough: false,\n\t},\n});\n\nexport type CheckboxVariantProps = VariantProps<typeof checkbox>;\nexport type CheckboxSlots = keyof ReturnType<typeof checkbox>;\n\nexport { checkbox };\n","import { useCallback, useId, useMemo, useRef, type ChangeEvent } from \"react\";\r\n\r\nimport { checkbox, type CheckboxSlots, type CheckboxVariantProps } from \"@/theme/color/checkbox\";\r\nimport type { SlotsToClasses } from \"@/types\";\r\nimport { dataAttr, mergeRefs } from \"@/functions\";\r\nimport clsx from \"clsx\";\r\n\r\nexport interface UseCheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof CheckboxVariantProps>, CheckboxVariantProps {\r\n\tclassNames?: SlotsToClasses<CheckboxSlots>;\r\n\tclassName?: string;\r\n\ticon?: React.ReactNode | ((props: CheckboxIconProps) => React.ReactNode);\r\n\tchildren?: React.ReactNode;\r\n\tisIndeterminate?: boolean;\r\n\tref?: React.Ref<HTMLInputElement>;\r\n\terror?: string;\r\n\ttouched?: boolean;\r\n\trequired?: boolean;\r\n}\r\n\r\nexport interface CheckboxIconProps {\r\n\tid?: string;\r\n\tisSelected: boolean;\r\n\tisIndeterminate?: boolean;\r\n\tdisableAnimation?: boolean;\r\n\tclassName?: string;\r\n}\r\n\r\nexport function useCheckbox(props: UseCheckboxProps) {\r\n\tconst {\r\n\t\tid,\r\n\t\tclassNames,\r\n\t\tclassName,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tdefaultChecked,\r\n\t\tchecked,\r\n\t\terror,\r\n\t\ttouched,\r\n\t\tonChange,\r\n\t\tisIndeterminate = false,\r\n\t} = props;\r\n\r\n\tconst internalRef = useRef<HTMLInputElement>(null);\r\n\tconst inputId = useId();\r\n\tconst resolvedId = id || inputId;\r\n\r\n\tconst [isSelected] = useMemo(() => {\r\n\t\treturn [typeof checked === \"boolean\" ? checked : defaultChecked || false, () => {}];\r\n\t}, [checked, defaultChecked]);\r\n\r\n\tconst handleChange = useCallback(\r\n\t\t(e: ChangeEvent<HTMLInputElement>) => {\r\n\t\t\tif (readOnly || disabled) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tonChange?.(e);\r\n\t\t},\r\n\t\t[onChange, readOnly, disabled],\r\n\t);\r\n\r\n\tconst slots = useMemo(\r\n\t\t() =>\r\n\t\t\tcheckbox({\r\n\t\t\t\tcolor: props.color,\r\n\t\t\t\tsize: props.size,\r\n\t\t\t\tradius: props.radius,\r\n\t\t\t\tlineThrough: props.lineThrough,\r\n\t\t\t\tdisabled: disabled,\r\n\t\t\t\tisInvalid: !!error && touched,\r\n\t\t\t\tdisableAnimation: props.disableAnimation,\r\n\t\t\t}),\r\n\t\t[props, disabled, error, touched],\r\n\t);\r\n\r\n\tconst getBaseProps = () => ({\r\n\t\t\"className\": slots.base({ class: clsx(classNames?.base, className) }),\r\n\t\t\"data-disabled\": dataAttr(disabled),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getWrapperProps = () => ({\r\n\t\t\"aria-hidden\": true,\r\n\t\t\"className\": slots.wrapper({ class: classNames?.wrapper }),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getInputProps = () => ({\r\n\t\tref: mergeRefs(internalRef, props.ref),\r\n\t\ttype: \"checkbox\",\r\n\t\tid: resolvedId,\r\n\t\tdefaultChecked: checked === undefined ? defaultChecked : undefined,\r\n\t\tchecked: checked !== undefined ? checked : undefined,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tonChange: handleChange,\r\n\t\tclassName: slots.hiddenInput({ class: classNames?.hiddenInput }),\r\n\t});\r\n\r\n\tconst getLabelProps = () => ({\r\n\t\thtmlFor: resolvedId,\r\n\t\tclassName: slots.label({ class: classNames?.label }),\r\n\t});\r\n\r\n\tconst getIconProps = (): CheckboxIconProps => ({\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tdisableAnimation: props.disableAnimation,\r\n\t\tclassName: slots.icon({ class: classNames?.icon }),\r\n\t});\r\n\r\n\tconst Component = \"label\";\r\n\r\n\treturn {\r\n\t\tComponent,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetLabelProps,\r\n\t\tgetIconProps,\r\n\t};\r\n}\r\n\r\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>;\r\n","import type { UseCheckboxReturn } from \"./use-checkbox\";\n\ntype CheckboxIconProps = Partial<ReturnType<UseCheckboxReturn[\"getIconProps\"]>>;\n\nfunction CheckIcon(props: CheckboxIconProps) {\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg\n\t\t\taria-hidden=\"true\"\n\t\t\tfill=\"none\"\n\t\t\trole=\"presentation\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeDasharray={22}\n\t\t\tstrokeDashoffset={isSelected ? 44 : 66}\n\t\t\tstrokeLinecap=\"round\"\n\t\t\tstrokeLinejoin=\"round\"\n\t\t\tstrokeWidth={2}\n\t\t\tstyle={\n\t\t\t\t!disableAnimation && isSelected\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ttransition: \"stroke-dashoffset 250ms linear 0.2s\",\n\t\t\t\t\t }\n\t\t\t\t\t: {}\n\t\t\t}\n\t\t\tviewBox=\"0 0 17 18\"\n\t\t\t{...otherProps}\n\t\t>\n\t\t\t<polyline points=\"1 9 7 14 15 4\" />\n\t\t</svg>\n\t);\n}\n\nfunction IndeterminateIcon(props: CheckboxIconProps) {\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg stroke=\"currentColor\" strokeWidth={3} viewBox=\"0 0 24 24\" {...otherProps}>\n\t\t\t<line x1=\"21\" x2=\"3\" y1=\"12\" y2=\"12\" />\n\t\t</svg>\n\t);\n}\n\n/**\n * CheckboxIcon is used to visually indicate the checked or indeterminate\n * state of a checkbox.\n */\nexport function CheckboxIcon(props: CheckboxIconProps) {\n\tconst { isIndeterminate, ...otherProps } = props;\n\tconst BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;\n\n\treturn <BaseIcon {...otherProps} />;\n}\n","// checkbox.tsx\r\nimport { forwardRef } from \"react\";\r\nimport { cloneElement, type ReactElement } from \"react\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\n\r\nimport { useCheckbox, type UseCheckboxProps } from \"./use-checkbox\";\r\nimport { CheckboxIcon } from \"./checkbox-icon\";\r\n\r\nexport interface CheckboxProps extends UseCheckboxProps {\r\n\tasChild?: boolean;\r\n}\r\n\r\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\r\n\tconst { asChild = false, ...restProps } = props;\r\n\tconst {\r\n\t\tComponent,\r\n\t\tchildren,\r\n\t\ticon = <CheckboxIcon />,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetIconProps,\r\n\t\tgetLabelProps,\r\n\t} = useCheckbox({ ...restProps, ref });\r\n\r\n\tconst clonedIcon = typeof icon === \"function\" ? icon(getIconProps()) : cloneElement(icon as ReactElement, getIconProps());\r\n\r\n\tconst Wrapper = asChild ? Slot : Component;\r\n\r\n\treturn (\r\n\t\t<Wrapper {...getBaseProps()}>\r\n\t\t\t<input {...getInputProps()} ref={ref} />\r\n\t\t\t<span {...getWrapperProps()}>{clonedIcon}</span>\r\n\t\t\t{children && <span {...getLabelProps()}>{children}</span>}\r\n\t\t</Wrapper>\r\n\t);\r\n});\r\n\r\nCheckbox.displayName = \"Custom.Checkbox\";\r\n\r\nexport default Checkbox;\r\n"],"names":["checkbox","tv","groupDataFocusVisibleClasses","hiddenInputClasses","useCheckbox","props","id","classNames","className","icon","children","disabled","required","readOnly","defaultChecked","checked","error","touched","onChange","isIndeterminate","internalRef","useRef","inputId","useId","resolvedId","isSelected","useMemo","handleChange","useCallback","e","slots","clsx","dataAttr","mergeRefs","CheckIcon","disableAnimation","otherProps","jsx","IndeterminateIcon","CheckboxIcon","BaseIcon","Checkbox","forwardRef","ref","asChild","restProps","Component","getBaseProps","getWrapperProps","getInputProps","getIconProps","getLabelProps","clonedIcon","cloneElement","Wrapper","Slot","jsxs"],"mappings":";;;;;;;;AAoBA,MAAMA,IAAWC,EAAG;AAAA,EACnB,OAAO;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,IAEJ,aAAaC;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAER,UAAU;AAAA,IACT,OAAO;AAAA,MACN,SAAS;AAAA,QACR,SAAS;AAAA,MAAA;AAAA,MAEV,SAAS;AAAA,QACR,SAAS;AAAA,MAAA;AAAA,MAEV,WAAW;AAAA,QACV,SAAS;AAAA,MAAA;AAAA,MAEV,SAAS;AAAA,QACR,SAAS;AAAA,MAAA;AAAA,MAEV,SAAS;AAAA,QACR,SAAS;AAAA,MAAA;AAAA,MAEV,QAAQ;AAAA,QACP,SAAS;AAAA,MAAA;AAAA,IACV;AAAA,IAED,MAAM;AAAA,MACL,IAAI;AAAA,QACH,SAAS;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAED,OAAO;AAAA,QACP,MAAM;AAAA,MAAA;AAAA,MAEP,IAAI;AAAA,QACH,SAAS;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAED,OAAO;AAAA,QACP,MAAM;AAAA,MAAA;AAAA,MAEP,IAAI;AAAA,QACH,SAAS;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,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AAN,EAAA,CAAU;AAAA,IACtCN,gBAAAA,EAAAA,IAAC,QAAA,EAAM,GAAGW,EAAA,GAAoB,UAAAI,GAAW;AAAA,IACxC1C,KAAY2B,gBAAAA,EAAAA,IAAC,QAAA,EAAM,GAAGc,EAAA,GAAkB,UAAAzC,EAAA,CAAS;AAAA,EAAA,GACnD;AAEF,CAAC;AAED+B,EAAS,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const n=require("./jsx-runtime-BjzqJBtL.js"),d=require("react"),E=require("./index-6ER8bShj.js"),A=require("./tv-CGkrzbji.js"),j=require("./classes-P14wj2Ze.js"),w=require("./assertion-C7nbUE-q.js"),q=require("./refs-pI64b4UC.js"),N=require("./clsx-C11secjj.js"),B=A.tv({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",wrapper:["relative","inline-flex","items-center","justify-center","flex-shrink-0","overflow-hidden","before:content-['']","before:absolute","before:inset-0","before:border-solid","before:border-2","before:box-border","before:border-default","after:content-['']","after:absolute","after:inset-0","after:scale-50","after:opacity-0","after:origin-center","group-data-[selected=true]:after:scale-100","group-data-[selected=true]:after:opacity-100","group-data-[hover=true]:before:bg-default-100",...j.groupDataFocusVisibleClasses],hiddenInput:j.hiddenInputClasses,icon:"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none",label:"relative text-foreground select-none"},variants:{color:{default:{wrapper:"after:bg-default after:text-default-foreground text-default-foreground"},primary:{wrapper:"after:bg-primary after:text-primary-foreground text-primary-foreground"},secondary:{wrapper:"after:bg-secondary after:text-secondary-foreground text-secondary-foreground"},success:{wrapper:"after:bg-success after:text-success-foreground text-success-foreground"},warning:{wrapper:"after:bg-warning after:text-warning-foreground text-warning-foreground"},danger:{wrapper:"after:bg-danger after:text-danger-foreground text-danger-foreground"}},size:{sm:{wrapper:["w-4 h-4 me-2","rounded-[calc(theme(borderRadius.medium)*0.5)]","before:rounded-[calc(theme(borderRadius.medium)*0.5)]","after:rounded-[calc(theme(borderRadius.medium)*0.5)]"],label:"text-small",icon:"w-3 h-2"},md:{wrapper:["w-5 h-5 me-2","rounded-[calc(theme(borderRadius.medium)*0.6)]","before:rounded-[calc(theme(borderRadius.medium)*0.6)]","after:rounded-[calc(theme(borderRadius.medium)*0.6)]"],label:"text-medium",icon:"w-4 h-3"},lg:{wrapper:["w-6 h-6 me-2","rounded-[calc(theme(borderRadius.medium)*0.7)]","before:rounded-[calc(theme(borderRadius.medium)*0.7)]","after:rounded-[calc(theme(borderRadius.medium)*0.7)]"],label:"text-large",icon:"w-5 h-4"}},radius:{none:{wrapper:"rounded-none before:rounded-none after:rounded-none"},sm:{wrapper:["rounded-[calc(theme(borderRadius.medium)*0.5)]","before:rounded-[calc(theme(borderRadius.medium)*0.5)]","after:rounded-[calc(theme(borderRadius.medium)*0.5)]"]},md:{wrapper:["rounded-[calc(theme(borderRadius.medium)*0.6)]","before:rounded-[calc(theme(borderRadius.medium)*0.6)]","after:rounded-[calc(theme(borderRadius.medium)*0.6)]"]},lg:{wrapper:["rounded-[calc(theme(borderRadius.medium)*0.7)]","before:rounded-[calc(theme(borderRadius.medium)*0.7)]","after:rounded-[calc(theme(borderRadius.medium)*0.7)]"]},full:{wrapper:"rounded-full before:rounded-full after:rounded-full"}},lineThrough:{true:{label:["inline-flex","items-center","justify-center","before:content-['']","before:absolute","before:bg-foreground","before:w-0","before:h-0.5","group-data-[selected=true]:opacity-60","group-data-[selected=true]:before:w-full"]}},disabled:{true:{base:"opacity-80 pointer-events-none"}},isInvalid:{true:{wrapper:"before:border-danger",label:"text-danger"}},disableAnimation:{true:{wrapper:"transition-none",icon:"transition-none",label:"transition-none"},false:{wrapper:["before:transition-colors","group-data-[pressed=true]:scale-95","transition-transform","after:transition-transform-opacity","after:!ease-linear","after:!duration-200","motion-reduce:transition-none"],icon:"transition-opacity motion-reduce:transition-none",label:"transition-colors-opacity before:transition-width motion-reduce:transition-none"}}},defaultVariants:{color:"primary",size:"md",disabled:!1,lineThrough:!1}});function W(e){const{id:t,classNames:r,className:a,icon:g,children:l,disabled:o,required:x,readOnly:i,defaultChecked:c,checked:s,error:f,touched:m,onChange:p,isIndeterminate:b=!1}=e,v=d.useRef(null),C=d.useId(),R=t||C,[h]=d.useMemo(()=>[typeof s=="boolean"?s:c||!1,()=>{}],[s,c]),P=d.useCallback(y=>{if(i||o){y.preventDefault();return}p?.(y)},[p,i,o]),u=d.useMemo(()=>B({color:e.color,size:e.size,radius:e.radius,lineThrough:e.lineThrough,disabled:o,isInvalid:!!f&&m,disableAnimation:e.disableAnimation}),[e,o,f,m]);return{Component:"label",icon:g,children:l,isSelected:h,isIndeterminate:b,getBaseProps:()=>({className:u.base({class:N.clsx(r?.base,a)}),"data-disabled":w.dataAttr(o),"data-selected":w.dataAttr(h||b)}),getWrapperProps:()=>({"aria-hidden":!0,className:u.wrapper({class:r?.wrapper}),"data-selected":w.dataAttr(h||b)}),getInputProps:()=>({ref:q.mergeRefs(v,e.ref),type:"checkbox",id:R,defaultChecked:s===void 0?c:void 0,checked:s!==void 0?s:void 0,disabled:o,required:x,readOnly:i,onChange:P,className:u.hiddenInput({class:r?.hiddenInput})}),getLabelProps:()=>({htmlFor:R,className:u.label({class:r?.label})}),getIconProps:()=>({isSelected:h,isIndeterminate:b,disableAnimation:e.disableAnimation,className:u.icon({class:r?.icon})})}}function z(e){const{isSelected:t,disableAnimation:r,...a}=e;return n.jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:t?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,style:!r&&t?{transition:"stroke-dashoffset 250ms linear 0.2s"}:{},viewBox:"0 0 17 18",...a,children:n.jsxRuntimeExports.jsx("polyline",{points:"1 9 7 14 15 4"})})}function L(e){const{isSelected:t,disableAnimation:r,...a}=e;return n.jsxRuntimeExports.jsx("svg",{stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",...a,children:n.jsxRuntimeExports.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function k(e){const{isIndeterminate:t,...r}=e,a=t?L:z;return n.jsxRuntimeExports.jsx(a,{...r})}const I=d.forwardRef((e,t)=>{const{asChild:r=!1,...a}=e,{Component:g,children:l,icon:o=n.jsxRuntimeExports.jsx(k,{}),getBaseProps:x,getWrapperProps:i,getInputProps:c,getIconProps:s,getLabelProps:f}=W({...a,ref:t}),m=typeof o=="function"?o(s()):d.cloneElement(o,s()),p=r?E.Slot:g;return n.jsxRuntimeExports.jsxs(p,{...x(),children:[n.jsxRuntimeExports.jsx("input",{...c(),ref:t}),n.jsxRuntimeExports.jsx("span",{...i(),children:m}),l&&n.jsxRuntimeExports.jsx("span",{...f(),children:l})]})});I.displayName="Custom.Checkbox";exports.Checkbox=I;exports.CheckboxIcon=k;
2
+ //# sourceMappingURL=checkbox-w969v4lK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-CWDPVAn2.js","sources":["../../src/theme/color/checkbox.ts","../../src/components/checkbox/use-checkbox.ts","../../src/components/checkbox/checkbox-icon.tsx","../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { tv } from \"@/lib/tv\";\nimport type { VariantProps } from \"tailwind-variants\";\nimport { groupDataFocusVisibleClasses, hiddenInputClasses } from \"../classes\";\n\n/**\n * Checkbox wrapper **Tailwind Variants** component\n *\n * const {base, wrapper, icon, label} = checkbox({...})\n *\n * @example\n * <label className={base())}>\n * // hidden input\n * <span className={wrapper()} aria-hidden=\"true\" data-selected={selected}>\n * <svg className={icon()}>\n * // check icon\n * </svg>\n * </span>\n * <span className={label()}>Label</span>\n * </label>\n */\nconst checkbox = tv({\n\tslots: {\n\t\tbase: \"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none\",\n\t\twrapper: [\n\t\t\t\"relative\",\n\t\t\t\"inline-flex\",\n\t\t\t\"items-center\",\n\t\t\t\"justify-center\",\n\t\t\t\"flex-shrink-0\",\n\t\t\t\"overflow-hidden\",\n\t\t\t// before\n\t\t\t\"before:content-['']\",\n\t\t\t\"before:absolute\",\n\t\t\t\"before:inset-0\",\n\t\t\t\"before:border-solid\",\n\t\t\t\"before:border-2\",\n\t\t\t\"before:box-border\",\n\t\t\t\"before:border-default\",\n\t\t\t// after\n\t\t\t\"after:content-['']\",\n\t\t\t\"after:absolute\",\n\t\t\t\"after:inset-0\",\n\t\t\t\"after:scale-50\",\n\t\t\t\"after:opacity-0\",\n\t\t\t\"after:origin-center\",\n\t\t\t\"group-data-[selected=true]:after:scale-100\",\n\t\t\t\"group-data-[selected=true]:after:opacity-100\",\n\t\t\t// hover\n\t\t\t\"group-data-[hover=true]:before:bg-default-100\",\n\t\t\t// focus ring\n\t\t\t...groupDataFocusVisibleClasses,\n\t\t],\n\t\thiddenInput: hiddenInputClasses,\n\t\ticon: \"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none\",\n\t\tlabel: \"relative text-foreground select-none\",\n\t},\n\tvariants: {\n\t\tcolor: {\n\t\t\tdefault: {\n\t\t\t\twrapper: \"after:bg-default after:text-default-foreground text-default-foreground\",\n\t\t\t},\n\t\t\tprimary: {\n\t\t\t\twrapper: \"after:bg-primary after:text-primary-foreground text-primary-foreground\",\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\twrapper: \"after:bg-secondary after:text-secondary-foreground text-secondary-foreground\",\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\twrapper: \"after:bg-success after:text-success-foreground text-success-foreground\",\n\t\t\t},\n\t\t\twarning: {\n\t\t\t\twrapper: \"after:bg-warning after:text-warning-foreground text-warning-foreground\",\n\t\t\t},\n\t\t\tdanger: {\n\t\t\t\twrapper: \"after:bg-danger after:text-danger-foreground text-danger-foreground\",\n\t\t\t},\n\t\t},\n\t\tsize: {\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-4 h-4 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-small\",\n\t\t\t\ticon: \"w-3 h-2\",\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-5 h-5 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-medium\",\n\t\t\t\ticon: \"w-4 h-3\",\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-6 h-6 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-large\",\n\t\t\t\ticon: \"w-5 h-4\",\n\t\t\t},\n\t\t},\n\t\tradius: {\n\t\t\tnone: {\n\t\t\t\twrapper: \"rounded-none before:rounded-none after:rounded-none\",\n\t\t\t},\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tfull: {\n\t\t\t\twrapper: \"rounded-full before:rounded-full after:rounded-full\",\n\t\t\t},\n\t\t},\n\t\tlineThrough: {\n\t\t\ttrue: {\n\t\t\t\tlabel: [\n\t\t\t\t\t\"inline-flex\",\n\t\t\t\t\t\"items-center\",\n\t\t\t\t\t\"justify-center\",\n\t\t\t\t\t\"before:content-['']\",\n\t\t\t\t\t\"before:absolute\",\n\t\t\t\t\t\"before:bg-foreground\",\n\t\t\t\t\t\"before:w-0\",\n\t\t\t\t\t\"before:h-0.5\",\n\t\t\t\t\t\"group-data-[selected=true]:opacity-60\",\n\t\t\t\t\t\"group-data-[selected=true]:before:w-full\",\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: {\n\t\t\t\tbase: \"opacity-80 pointer-events-none\",\n\t\t\t},\n\t\t},\n\t\tisInvalid: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"before:border-danger\",\n\t\t\t\tlabel: \"text-danger\",\n\t\t\t},\n\t\t},\n\t\tdisableAnimation: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"transition-none\",\n\t\t\t\ticon: \"transition-none\",\n\t\t\t\tlabel: \"transition-none\",\n\t\t\t},\n\t\t\tfalse: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"before:transition-colors\",\n\t\t\t\t\t\"group-data-[pressed=true]:scale-95\",\n\t\t\t\t\t\"transition-transform\",\n\t\t\t\t\t\"after:transition-transform-opacity\",\n\t\t\t\t\t\"after:!ease-linear\",\n\t\t\t\t\t\"after:!duration-200\",\n\t\t\t\t\t\"motion-reduce:transition-none\",\n\t\t\t\t],\n\t\t\t\ticon: \"transition-opacity motion-reduce:transition-none\",\n\t\t\t\tlabel: \"transition-colors-opacity before:transition-width motion-reduce:transition-none\",\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tcolor: \"primary\",\n\t\tsize: \"md\",\n\t\tdisabled: false,\n\t\tlineThrough: false,\n\t},\n});\n\nexport type CheckboxVariantProps = VariantProps<typeof checkbox>;\nexport type CheckboxSlots = keyof ReturnType<typeof checkbox>;\n\nexport { checkbox };\n","import { useCallback, useId, useMemo, useRef, type ChangeEvent } from \"react\";\r\n\r\nimport { checkbox, type CheckboxSlots, type CheckboxVariantProps } from \"@/theme/color/checkbox\";\r\nimport type { SlotsToClasses } from \"@/types\";\r\nimport { dataAttr, mergeRefs } from \"@/functions\";\r\nimport clsx from \"clsx\";\r\n\r\nexport interface UseCheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof CheckboxVariantProps>, CheckboxVariantProps {\r\n\tclassNames?: SlotsToClasses<CheckboxSlots>;\r\n\tclassName?: string;\r\n\ticon?: React.ReactNode | ((props: CheckboxIconProps) => React.ReactNode);\r\n\tchildren?: React.ReactNode;\r\n\tisIndeterminate?: boolean;\r\n\tref?: React.Ref<HTMLInputElement>;\r\n\terror?: string;\r\n\ttouched?: boolean;\r\n\trequired?: boolean;\r\n}\r\n\r\nexport interface CheckboxIconProps {\r\n\tid?: string;\r\n\tisSelected: boolean;\r\n\tisIndeterminate?: boolean;\r\n\tdisableAnimation?: boolean;\r\n\tclassName?: string;\r\n}\r\n\r\nexport function useCheckbox(props: UseCheckboxProps) {\r\n\tconst {\r\n\t\tid,\r\n\t\tclassNames,\r\n\t\tclassName,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tdefaultChecked,\r\n\t\tchecked,\r\n\t\terror,\r\n\t\ttouched,\r\n\t\tonChange,\r\n\t\tisIndeterminate = false,\r\n\t} = props;\r\n\r\n\tconst internalRef = useRef<HTMLInputElement>(null);\r\n\tconst inputId = useId();\r\n\tconst resolvedId = id || inputId;\r\n\r\n\tconst [isSelected] = useMemo(() => {\r\n\t\treturn [typeof checked === \"boolean\" ? checked : defaultChecked || false, () => {}];\r\n\t}, [checked, defaultChecked]);\r\n\r\n\tconst handleChange = useCallback(\r\n\t\t(e: ChangeEvent<HTMLInputElement>) => {\r\n\t\t\tif (readOnly || disabled) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tonChange?.(e);\r\n\t\t},\r\n\t\t[onChange, readOnly, disabled],\r\n\t);\r\n\r\n\tconst slots = useMemo(\r\n\t\t() =>\r\n\t\t\tcheckbox({\r\n\t\t\t\tcolor: props.color,\r\n\t\t\t\tsize: props.size,\r\n\t\t\t\tradius: props.radius,\r\n\t\t\t\tlineThrough: props.lineThrough,\r\n\t\t\t\tdisabled: disabled,\r\n\t\t\t\tisInvalid: !!error && touched,\r\n\t\t\t\tdisableAnimation: props.disableAnimation,\r\n\t\t\t}),\r\n\t\t[props, disabled, error, touched],\r\n\t);\r\n\r\n\tconst getBaseProps = () => ({\r\n\t\t\"className\": slots.base({ class: clsx(classNames?.base, className) }),\r\n\t\t\"data-disabled\": dataAttr(disabled),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getWrapperProps = () => ({\r\n\t\t\"aria-hidden\": true,\r\n\t\t\"className\": slots.wrapper({ class: classNames?.wrapper }),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getInputProps = () => ({\r\n\t\tref: mergeRefs(internalRef, props.ref),\r\n\t\ttype: \"checkbox\",\r\n\t\tid: resolvedId,\r\n\t\tdefaultChecked: checked === undefined ? defaultChecked : undefined,\r\n\t\tchecked: checked !== undefined ? checked : undefined,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tonChange: handleChange,\r\n\t\tclassName: slots.hiddenInput({ class: classNames?.hiddenInput }),\r\n\t});\r\n\r\n\tconst getLabelProps = () => ({\r\n\t\thtmlFor: resolvedId,\r\n\t\tclassName: slots.label({ class: classNames?.label }),\r\n\t});\r\n\r\n\tconst getIconProps = (): CheckboxIconProps => ({\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tdisableAnimation: props.disableAnimation,\r\n\t\tclassName: slots.icon({ class: classNames?.icon }),\r\n\t});\r\n\r\n\tconst Component = \"label\";\r\n\r\n\treturn {\r\n\t\tComponent,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetLabelProps,\r\n\t\tgetIconProps,\r\n\t};\r\n}\r\n\r\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>;\r\n","import type { UseCheckboxReturn } from \"./use-checkbox\";\n\ntype CheckboxIconProps = Partial<ReturnType<UseCheckboxReturn[\"getIconProps\"]>>;\n\nfunction CheckIcon(props: CheckboxIconProps) {\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg\n\t\t\taria-hidden=\"true\"\n\t\t\tfill=\"none\"\n\t\t\trole=\"presentation\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeDasharray={22}\n\t\t\tstrokeDashoffset={isSelected ? 44 : 66}\n\t\t\tstrokeLinecap=\"round\"\n\t\t\tstrokeLinejoin=\"round\"\n\t\t\tstrokeWidth={2}\n\t\t\tstyle={\n\t\t\t\t!disableAnimation && isSelected\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ttransition: \"stroke-dashoffset 250ms linear 0.2s\",\n\t\t\t\t\t }\n\t\t\t\t\t: {}\n\t\t\t}\n\t\t\tviewBox=\"0 0 17 18\"\n\t\t\t{...otherProps}\n\t\t>\n\t\t\t<polyline points=\"1 9 7 14 15 4\" />\n\t\t</svg>\n\t);\n}\n\nfunction IndeterminateIcon(props: CheckboxIconProps) {\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg stroke=\"currentColor\" strokeWidth={3} viewBox=\"0 0 24 24\" {...otherProps}>\n\t\t\t<line x1=\"21\" x2=\"3\" y1=\"12\" y2=\"12\" />\n\t\t</svg>\n\t);\n}\n\n/**\n * CheckboxIcon is used to visually indicate the checked or indeterminate\n * state of a checkbox.\n */\nexport function CheckboxIcon(props: CheckboxIconProps) {\n\tconst { isIndeterminate, ...otherProps } = props;\n\tconst BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;\n\n\treturn <BaseIcon {...otherProps} />;\n}\n","// checkbox.tsx\r\nimport { forwardRef } from \"react\";\r\nimport { cloneElement, type ReactElement } from \"react\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\n\r\nimport { useCheckbox, type UseCheckboxProps } from \"./use-checkbox\";\r\nimport { CheckboxIcon } from \"./checkbox-icon\";\r\n\r\nexport interface CheckboxProps extends UseCheckboxProps {\r\n\tasChild?: boolean;\r\n}\r\n\r\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\r\n\tconst { asChild = false, ...restProps } = props;\r\n\tconst {\r\n\t\tComponent,\r\n\t\tchildren,\r\n\t\ticon = <CheckboxIcon />,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetIconProps,\r\n\t\tgetLabelProps,\r\n\t} = useCheckbox({ ...restProps, ref });\r\n\r\n\tconst clonedIcon = typeof icon === \"function\" ? icon(getIconProps()) : cloneElement(icon as ReactElement, getIconProps());\r\n\r\n\tconst Wrapper = asChild ? Slot : Component;\r\n\r\n\treturn (\r\n\t\t<Wrapper {...getBaseProps()}>\r\n\t\t\t<input {...getInputProps()} ref={ref} />\r\n\t\t\t<span {...getWrapperProps()}>{clonedIcon}</span>\r\n\t\t\t{children && <span {...getLabelProps()}>{children}</span>}\r\n\t\t</Wrapper>\r\n\t);\r\n});\r\n\r\nCheckbox.displayName = \"Custom.Checkbox\";\r\n\r\nexport default Checkbox;\r\n"],"names":["checkbox","tv","groupDataFocusVisibleClasses","hiddenInputClasses","useCheckbox","props","id","classNames","className","icon","children","disabled","required","readOnly","defaultChecked","checked","error","touched","onChange","isIndeterminate","internalRef","useRef","inputId","useId","resolvedId","isSelected","useMemo","handleChange","useCallback","e","slots","clsx","dataAttr","mergeRefs","CheckIcon","disableAnimation","otherProps","jsx","IndeterminateIcon","CheckboxIcon","BaseIcon","Checkbox","forwardRef","ref","asChild","restProps","Component","getBaseProps","getWrapperProps","getInputProps","getIconProps","getLabelProps","clonedIcon","cloneElement","Wrapper","Slot","jsxs"],"mappings":"sQAoBMA,EAAWC,EAAAA,GAAG,CACnB,MAAO,CACN,KAAM,gIACN,QAAS,CACR,WACA,cACA,eACA,iBACA,gBACA,kBAEA,sBACA,kBACA,iBACA,sBACA,kBACA,oBACA,wBAEA,qBACA,iBACA,gBACA,iBACA,kBACA,sBACA,6CACA,+CAEA,gDAEA,GAAGC,EAAAA,4BAAA,EAEJ,YAAaC,EAAAA,mBACb,KAAM,oFACN,MAAO,sCAAA,EAER,SAAU,CACT,MAAO,CACN,QAAS,CACR,QAAS,wEAAA,EAEV,QAAS,CACR,QAAS,wEAAA,EAEV,UAAW,CACV,QAAS,8EAAA,EAEV,QAAS,CACR,QAAS,wEAAA,EAEV,QAAS,CACR,QAAS,wEAAA,EAEV,OAAQ,CACP,QAAS,qEAAA,CACV,EAED,KAAM,CACL,GAAI,CACH,QAAS,CACR,eACA,iDACA,wDACA,sDAAA,EAED,MAAO,aACP,KAAM,SAAA,EAEP,GAAI,CACH,QAAS,CACR,eACA,iDACA,wDACA,sD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AAGyC,EAAW,IAAAF,EAAK,EAE/BS,EAAa,OAAO3C,GAAS,WAAaA,EAAKyC,EAAA,CAAc,EAAIG,EAAAA,aAAa5C,EAAsByC,GAAc,EAElHI,EAAUV,EAAUW,EAAAA,KAAOT,EAEjC,OACCU,EAAAA,kBAAAA,KAACF,EAAA,CAAS,GAAGP,EAAA,EACZ,SAAA,CAAAV,EAAAA,kBAAAA,IAAC,QAAA,CAAO,GAAGY,EAAA,EAAiB,IAAAN,CAAA,CAAU,EACtCN,EAAAA,kBAAAA,IAAC,OAAA,CAAM,GAAGW,EAAA,EAAoB,SAAAI,EAAW,EACxC1C,GAAY2B,EAAAA,kBAAAA,IAAC,OAAA,CAAM,GAAGc,EAAA,EAAkB,SAAAzC,CAAA,CAAS,CAAA,EACnD,CAEF,CAAC,EAED+B,EAAS,YAAc"}
1
+ {"version":3,"file":"checkbox-w969v4lK.js","sources":["../../src/theme/color/checkbox.ts","../../src/components/checkbox/use-checkbox.ts","../../src/components/checkbox/checkbox-icon.tsx","../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { tv } from \"@/lib/tv\";\nimport type { VariantProps } from \"tailwind-variants\";\nimport { groupDataFocusVisibleClasses, hiddenInputClasses } from \"../classes\";\n\n/**\n * Checkbox wrapper **Tailwind Variants** component\n *\n * const {base, wrapper, icon, label} = checkbox({...})\n *\n * @example\n * <label className={base())}>\n * // hidden input\n * <span className={wrapper()} aria-hidden=\"true\" data-selected={selected}>\n * <svg className={icon()}>\n * // check icon\n * </svg>\n * </span>\n * <span className={label()}>Label</span>\n * </label>\n */\nconst checkbox = tv({\n\tslots: {\n\t\tbase: \"group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none\",\n\t\twrapper: [\n\t\t\t\"relative\",\n\t\t\t\"inline-flex\",\n\t\t\t\"items-center\",\n\t\t\t\"justify-center\",\n\t\t\t\"flex-shrink-0\",\n\t\t\t\"overflow-hidden\",\n\t\t\t// before\n\t\t\t\"before:content-['']\",\n\t\t\t\"before:absolute\",\n\t\t\t\"before:inset-0\",\n\t\t\t\"before:border-solid\",\n\t\t\t\"before:border-2\",\n\t\t\t\"before:box-border\",\n\t\t\t\"before:border-default\",\n\t\t\t// after\n\t\t\t\"after:content-['']\",\n\t\t\t\"after:absolute\",\n\t\t\t\"after:inset-0\",\n\t\t\t\"after:scale-50\",\n\t\t\t\"after:opacity-0\",\n\t\t\t\"after:origin-center\",\n\t\t\t\"group-data-[selected=true]:after:scale-100\",\n\t\t\t\"group-data-[selected=true]:after:opacity-100\",\n\t\t\t// hover\n\t\t\t\"group-data-[hover=true]:before:bg-default-100\",\n\t\t\t// focus ring\n\t\t\t...groupDataFocusVisibleClasses,\n\t\t],\n\t\thiddenInput: hiddenInputClasses,\n\t\ticon: \"z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100 pointer-events-none\",\n\t\tlabel: \"relative text-foreground select-none\",\n\t},\n\tvariants: {\n\t\tcolor: {\n\t\t\tdefault: {\n\t\t\t\twrapper: \"after:bg-default after:text-default-foreground text-default-foreground\",\n\t\t\t},\n\t\t\tprimary: {\n\t\t\t\twrapper: \"after:bg-primary after:text-primary-foreground text-primary-foreground\",\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\twrapper: \"after:bg-secondary after:text-secondary-foreground text-secondary-foreground\",\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\twrapper: \"after:bg-success after:text-success-foreground text-success-foreground\",\n\t\t\t},\n\t\t\twarning: {\n\t\t\t\twrapper: \"after:bg-warning after:text-warning-foreground text-warning-foreground\",\n\t\t\t},\n\t\t\tdanger: {\n\t\t\t\twrapper: \"after:bg-danger after:text-danger-foreground text-danger-foreground\",\n\t\t\t},\n\t\t},\n\t\tsize: {\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-4 h-4 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-small\",\n\t\t\t\ticon: \"w-3 h-2\",\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-5 h-5 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-medium\",\n\t\t\t\ticon: \"w-4 h-3\",\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"w-6 h-6 me-2\",\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t\tlabel: \"text-large\",\n\t\t\t\ticon: \"w-5 h-4\",\n\t\t\t},\n\t\t},\n\t\tradius: {\n\t\t\tnone: {\n\t\t\t\twrapper: \"rounded-none before:rounded-none after:rounded-none\",\n\t\t\t},\n\t\t\tsm: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.5)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tmd: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.6)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tlg: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"before:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t\t\"after:rounded-[calc(theme(borderRadius.medium)*0.7)]\",\n\t\t\t\t],\n\t\t\t},\n\t\t\tfull: {\n\t\t\t\twrapper: \"rounded-full before:rounded-full after:rounded-full\",\n\t\t\t},\n\t\t},\n\t\tlineThrough: {\n\t\t\ttrue: {\n\t\t\t\tlabel: [\n\t\t\t\t\t\"inline-flex\",\n\t\t\t\t\t\"items-center\",\n\t\t\t\t\t\"justify-center\",\n\t\t\t\t\t\"before:content-['']\",\n\t\t\t\t\t\"before:absolute\",\n\t\t\t\t\t\"before:bg-foreground\",\n\t\t\t\t\t\"before:w-0\",\n\t\t\t\t\t\"before:h-0.5\",\n\t\t\t\t\t\"group-data-[selected=true]:opacity-60\",\n\t\t\t\t\t\"group-data-[selected=true]:before:w-full\",\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: {\n\t\t\t\tbase: \"opacity-80 pointer-events-none\",\n\t\t\t},\n\t\t},\n\t\tisInvalid: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"before:border-danger\",\n\t\t\t\tlabel: \"text-danger\",\n\t\t\t},\n\t\t},\n\t\tdisableAnimation: {\n\t\t\ttrue: {\n\t\t\t\twrapper: \"transition-none\",\n\t\t\t\ticon: \"transition-none\",\n\t\t\t\tlabel: \"transition-none\",\n\t\t\t},\n\t\t\tfalse: {\n\t\t\t\twrapper: [\n\t\t\t\t\t\"before:transition-colors\",\n\t\t\t\t\t\"group-data-[pressed=true]:scale-95\",\n\t\t\t\t\t\"transition-transform\",\n\t\t\t\t\t\"after:transition-transform-opacity\",\n\t\t\t\t\t\"after:!ease-linear\",\n\t\t\t\t\t\"after:!duration-200\",\n\t\t\t\t\t\"motion-reduce:transition-none\",\n\t\t\t\t],\n\t\t\t\ticon: \"transition-opacity motion-reduce:transition-none\",\n\t\t\t\tlabel: \"transition-colors-opacity before:transition-width motion-reduce:transition-none\",\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tcolor: \"primary\",\n\t\tsize: \"md\",\n\t\tdisabled: false,\n\t\tlineThrough: false,\n\t},\n});\n\nexport type CheckboxVariantProps = VariantProps<typeof checkbox>;\nexport type CheckboxSlots = keyof ReturnType<typeof checkbox>;\n\nexport { checkbox };\n","import { useCallback, useId, useMemo, useRef, type ChangeEvent } from \"react\";\r\n\r\nimport { checkbox, type CheckboxSlots, type CheckboxVariantProps } from \"@/theme/color/checkbox\";\r\nimport type { SlotsToClasses } from \"@/types\";\r\nimport { dataAttr, mergeRefs } from \"@/functions\";\r\nimport clsx from \"clsx\";\r\n\r\nexport interface UseCheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof CheckboxVariantProps>, CheckboxVariantProps {\r\n\tclassNames?: SlotsToClasses<CheckboxSlots>;\r\n\tclassName?: string;\r\n\ticon?: React.ReactNode | ((props: CheckboxIconProps) => React.ReactNode);\r\n\tchildren?: React.ReactNode;\r\n\tisIndeterminate?: boolean;\r\n\tref?: React.Ref<HTMLInputElement>;\r\n\terror?: string;\r\n\ttouched?: boolean;\r\n\trequired?: boolean;\r\n}\r\n\r\nexport interface CheckboxIconProps {\r\n\tid?: string;\r\n\tisSelected: boolean;\r\n\tisIndeterminate?: boolean;\r\n\tdisableAnimation?: boolean;\r\n\tclassName?: string;\r\n}\r\n\r\nexport function useCheckbox(props: UseCheckboxProps) {\r\n\tconst {\r\n\t\tid,\r\n\t\tclassNames,\r\n\t\tclassName,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tdefaultChecked,\r\n\t\tchecked,\r\n\t\terror,\r\n\t\ttouched,\r\n\t\tonChange,\r\n\t\tisIndeterminate = false,\r\n\t} = props;\r\n\r\n\tconst internalRef = useRef<HTMLInputElement>(null);\r\n\tconst inputId = useId();\r\n\tconst resolvedId = id || inputId;\r\n\r\n\tconst [isSelected] = useMemo(() => {\r\n\t\treturn [typeof checked === \"boolean\" ? checked : defaultChecked || false, () => {}];\r\n\t}, [checked, defaultChecked]);\r\n\r\n\tconst handleChange = useCallback(\r\n\t\t(e: ChangeEvent<HTMLInputElement>) => {\r\n\t\t\tif (readOnly || disabled) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tonChange?.(e);\r\n\t\t},\r\n\t\t[onChange, readOnly, disabled],\r\n\t);\r\n\r\n\tconst slots = useMemo(\r\n\t\t() =>\r\n\t\t\tcheckbox({\r\n\t\t\t\tcolor: props.color,\r\n\t\t\t\tsize: props.size,\r\n\t\t\t\tradius: props.radius,\r\n\t\t\t\tlineThrough: props.lineThrough,\r\n\t\t\t\tdisabled: disabled,\r\n\t\t\t\tisInvalid: !!error && touched,\r\n\t\t\t\tdisableAnimation: props.disableAnimation,\r\n\t\t\t}),\r\n\t\t[props, disabled, error, touched],\r\n\t);\r\n\r\n\tconst getBaseProps = () => ({\r\n\t\t\"className\": slots.base({ class: clsx(classNames?.base, className) }),\r\n\t\t\"data-disabled\": dataAttr(disabled),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getWrapperProps = () => ({\r\n\t\t\"aria-hidden\": true,\r\n\t\t\"className\": slots.wrapper({ class: classNames?.wrapper }),\r\n\t\t\"data-selected\": dataAttr(isSelected || isIndeterminate),\r\n\t});\r\n\r\n\tconst getInputProps = () => ({\r\n\t\tref: mergeRefs(internalRef, props.ref),\r\n\t\ttype: \"checkbox\",\r\n\t\tid: resolvedId,\r\n\t\tdefaultChecked: checked === undefined ? defaultChecked : undefined,\r\n\t\tchecked: checked !== undefined ? checked : undefined,\r\n\t\tdisabled,\r\n\t\trequired,\r\n\t\treadOnly,\r\n\t\tonChange: handleChange,\r\n\t\tclassName: slots.hiddenInput({ class: classNames?.hiddenInput }),\r\n\t});\r\n\r\n\tconst getLabelProps = () => ({\r\n\t\thtmlFor: resolvedId,\r\n\t\tclassName: slots.label({ class: classNames?.label }),\r\n\t});\r\n\r\n\tconst getIconProps = (): CheckboxIconProps => ({\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tdisableAnimation: props.disableAnimation,\r\n\t\tclassName: slots.icon({ class: classNames?.icon }),\r\n\t});\r\n\r\n\tconst Component = \"label\";\r\n\r\n\treturn {\r\n\t\tComponent,\r\n\t\ticon,\r\n\t\tchildren,\r\n\t\tisSelected,\r\n\t\tisIndeterminate,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetLabelProps,\r\n\t\tgetIconProps,\r\n\t};\r\n}\r\n\r\nexport type UseCheckboxReturn = ReturnType<typeof useCheckbox>;\r\n","import type { UseCheckboxReturn } from \"./use-checkbox\";\n\ntype CheckboxIconProps = Partial<ReturnType<UseCheckboxReturn[\"getIconProps\"]>>;\n\nfunction CheckIcon(props: CheckboxIconProps) {\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg\n\t\t\taria-hidden=\"true\"\n\t\t\tfill=\"none\"\n\t\t\trole=\"presentation\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeDasharray={22}\n\t\t\tstrokeDashoffset={isSelected ? 44 : 66}\n\t\t\tstrokeLinecap=\"round\"\n\t\t\tstrokeLinejoin=\"round\"\n\t\t\tstrokeWidth={2}\n\t\t\tstyle={\n\t\t\t\t!disableAnimation && isSelected\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ttransition: \"stroke-dashoffset 250ms linear 0.2s\",\n\t\t\t\t\t }\n\t\t\t\t\t: {}\n\t\t\t}\n\t\t\tviewBox=\"0 0 17 18\"\n\t\t\t{...otherProps}\n\t\t>\n\t\t\t<polyline points=\"1 9 7 14 15 4\" />\n\t\t</svg>\n\t);\n}\n\nfunction IndeterminateIcon(props: CheckboxIconProps) {\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tconst { isSelected, disableAnimation, ...otherProps } = props;\n\n\treturn (\n\t\t<svg stroke=\"currentColor\" strokeWidth={3} viewBox=\"0 0 24 24\" {...otherProps}>\n\t\t\t<line x1=\"21\" x2=\"3\" y1=\"12\" y2=\"12\" />\n\t\t</svg>\n\t);\n}\n\n/**\n * CheckboxIcon is used to visually indicate the checked or indeterminate\n * state of a checkbox.\n */\nexport function CheckboxIcon(props: CheckboxIconProps) {\n\tconst { isIndeterminate, ...otherProps } = props;\n\tconst BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;\n\n\treturn <BaseIcon {...otherProps} />;\n}\n","// checkbox.tsx\r\nimport { forwardRef } from \"react\";\r\nimport { cloneElement, type ReactElement } from \"react\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\n\r\nimport { useCheckbox, type UseCheckboxProps } from \"./use-checkbox\";\r\nimport { CheckboxIcon } from \"./checkbox-icon\";\r\n\r\nexport interface CheckboxProps extends UseCheckboxProps {\r\n\tasChild?: boolean;\r\n}\r\n\r\nconst Checkbox = forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\r\n\tconst { asChild = false, ...restProps } = props;\r\n\tconst {\r\n\t\tComponent,\r\n\t\tchildren,\r\n\t\ticon = <CheckboxIcon />,\r\n\t\tgetBaseProps,\r\n\t\tgetWrapperProps,\r\n\t\tgetInputProps,\r\n\t\tgetIconProps,\r\n\t\tgetLabelProps,\r\n\t} = useCheckbox({ ...restProps, ref });\r\n\r\n\tconst clonedIcon = typeof icon === \"function\" ? icon(getIconProps()) : cloneElement(icon as ReactElement, getIconProps());\r\n\r\n\tconst Wrapper = asChild ? Slot : Component;\r\n\r\n\treturn (\r\n\t\t<Wrapper {...getBaseProps()}>\r\n\t\t\t<input {...getInputProps()} ref={ref} />\r\n\t\t\t<span {...getWrapperProps()}>{clonedIcon}</span>\r\n\t\t\t{children && <span {...getLabelProps()}>{children}</span>}\r\n\t\t</Wrapper>\r\n\t);\r\n});\r\n\r\nCheckbox.displayName = \"Custom.Checkbox\";\r\n\r\nexport default Checkbox;\r\n"],"names":["checkbox","tv","groupDataFocusVisibleClasses","hiddenInputClasses","useCheckbox","props","id","classNames","className","icon","children","disabled","required","readOnly","defaultChecked","checked","error","touched","onChange","isIndeterminate","internalRef","useRef","inputId","useId","resolvedId","isSelected","useMemo","handleChange","useCallback","e","slots","clsx","dataAttr","mergeRefs","CheckIcon","disableAnimation","otherProps","jsx","IndeterminateIcon","CheckboxIcon","BaseIcon","Checkbox","forwardRef","ref","asChild","restProps","Component","getBaseProps","getWrapperProps","getInputProps","getIconProps","getLabelProps","clonedIcon","cloneElement","Wrapper","Slot","jsxs"],"mappings":"oRAoBMA,EAAWC,EAAAA,GAAG,CACnB,MAAO,CACN,KAAM,gIACN,QAAS,CACR,WACA,cACA,eACA,iBACA,gBACA,kBAEA,sBACA,kBACA,iBACA,sBACA,kBACA,oBACA,wBAEA,qBACA,iBACA,gBACA,iBACA,kBACA,sBACA,6CACA,+CAEA,gDAEA,GAAGC,EAAAA,4BAAA,EAEJ,YAAaC,EAAAA,mBACb,KAAM,oFACN,MAAO,sCAAA,EAER,SAAU,CACT,MAAO,CACN,QAAS,CACR,QAAS,wEAAA,EAEV,QAAS,CACR,QAAS,wEAAA,EAEV,UAAW,CACV,QAAS,8EAAA,EAEV,QAAS,CACR,QAAS,wEAAA,EAEV,QAAS,CACR,QAAS,wEAAA,EAEV,OAAQ,CACP,QAAS,qEAAA,CACV,EAED,KAAM,CACL,GAAI,CACH,QAAS,CACR,eACA,iDACA,wDACA,sDAAA,EAED,MAAO,aACP,KAAM,SAAA,EAEP,GAAI,CACH,QAAS,CACR,eACA,iDACA,wDACA,sDAAA,EAED,MAAO,cACP,KAAM,SAAA,EAEP,GAAI,CACH,QAAS,CACR,eACA,iDACA,w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AKyC,EAAA,CAAc,EAAIG,EAAAA,aAAa5C,EAAsByC,GAAc,EAElHI,EAAUV,EAAUW,EAAAA,KAAOT,EAEjC,OACCU,EAAAA,kBAAAA,KAACF,EAAA,CAAS,GAAGP,EAAA,EACZ,SAAA,CAAAV,EAAAA,kBAAAA,IAAC,QAAA,CAAO,GAAGY,EAAA,EAAiB,IAAAN,CAAA,CAAU,EACtCN,EAAAA,kBAAAA,IAAC,OAAA,CAAM,GAAGW,EAAA,EAAoB,SAAAI,EAAW,EACxC1C,GAAY2B,EAAAA,kBAAAA,IAAC,OAAA,CAAM,GAAGc,EAAA,EAAkB,SAAAzC,CAAA,CAAS,CAAA,EACnD,CAEF,CAAC,EAED+B,EAAS,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";function i(r){var f,n,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var s=r.length;for(f=0;f<s;f++)r[f]&&(n=i(r[f]))&&(t&&(t+=" "),t+=n)}else for(n in r)r[n]&&(t&&(t+=" "),t+=n);return t}function o(){for(var r,f,n=0,t="",s=arguments.length;n<s;n++)(r=arguments[n])&&(f=i(r))&&(t&&(t+=" "),t+=f);return t}exports.clsx=o;
2
+ //# sourceMappingURL=clsx-C11secjj.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clsx-C11secjj.js","sources":["../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":["r","e","t","f","n","o","clsx"],"mappings":"aAAA,SAASA,EAAEC,EAAE,CAAC,IAAIC,EAAEC,EAAEC,EAAE,GAAG,GAAa,OAAOH,GAAjB,UAA8B,OAAOA,GAAjB,SAAmBG,GAAGH,UAAoB,OAAOA,GAAjB,SAAmB,GAAG,MAAM,QAAQA,CAAC,EAAE,CAAC,IAAII,EAAEJ,EAAE,OAAO,IAAIC,EAAE,EAAEA,EAAEG,EAAEH,IAAID,EAAEC,CAAC,IAAIC,EAAEH,EAAEC,EAAEC,CAAC,CAAC,KAAKE,IAAIA,GAAG,KAAKA,GAAGD,EAAE,KAAM,KAAIA,KAAKF,EAAEA,EAAEE,CAAC,IAAIC,IAAIA,GAAG,KAAKA,GAAGD,GAAG,OAAOC,CAAC,CAAQ,SAASE,GAAM,CAAC,QAAQL,EAAEC,EAAEC,EAAE,EAAEC,EAAE,GAAGC,EAAE,UAAU,OAAOF,EAAEE,EAAEF,KAAKF,EAAE,UAAUE,CAAC,KAAKD,EAAEF,EAAEC,CAAC,KAAKG,IAAIA,GAAG,KAAKA,GAAGF,GAAG,OAAOE,CAAC","x_google_ignoreList":[0]}
@@ -0,0 +1,17 @@
1
+ function a(r) {
2
+ var f, n, t = "";
3
+ if (typeof r == "string" || typeof r == "number") t += r;
4
+ else if (typeof r == "object") if (Array.isArray(r)) {
5
+ var o = r.length;
6
+ for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
7
+ } else for (n in r) r[n] && (t && (t += " "), t += n);
8
+ return t;
9
+ }
10
+ function i() {
11
+ for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
12
+ return t;
13
+ }
14
+ export {
15
+ i as c
16
+ };
17
+ //# sourceMappingURL=clsx-OuTLNxxd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clsx-OuTLNxxd.js","sources":["../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":["r","e","t","f","n","clsx"],"mappings":"AAAA,SAASA,EAAEC,GAAE;AAAC,MAAIC,GAAEC,GAAEC,IAAE;AAAG,MAAa,OAAOH,KAAjB,YAA8B,OAAOA,KAAjB,SAAmB,CAAAG,KAAGH;AAAA,WAAoB,OAAOA,KAAjB,SAAmB,KAAG,MAAM,QAAQA,CAAC,GAAE;AAAC,QAAI,IAAEA,EAAE;AAAO,SAAIC,IAAE,GAAEA,IAAE,GAAEA,IAAI,CAAAD,EAAEC,CAAC,MAAIC,IAAEH,EAAEC,EAAEC,CAAC,CAAC,OAAKE,MAAIA,KAAG,MAAKA,KAAGD;AAAA,EAAE,MAAM,MAAIA,KAAKF,EAAE,CAAAA,EAAEE,CAAC,MAAIC,MAAIA,KAAG,MAAKA,KAAGD;AAAG,SAAOC;AAAC;AAAQ,SAASC,IAAM;AAAC,WAAQJ,GAAEC,GAAEC,IAAE,GAAEC,IAAE,IAAG,IAAE,UAAU,QAAOD,IAAE,GAAEA,IAAI,EAACF,IAAE,UAAUE,CAAC,OAAKD,IAAEF,EAAEC,CAAC,OAAKG,MAAIA,KAAG,MAAKA,KAAGF;AAAG,SAAOE;AAAC;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { clsx as O } from "clsx";
1
+ import { c as O } from "./clsx-OuTLNxxd.js";
2
2
  const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
3
  var u;
4
4
  if (l?.variants == null) return y(e, n?.class, n?.className);
@@ -32,4 +32,4 @@ const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j =
32
32
  export {
33
33
  j as c
34
34
  };
35
- //# sourceMappingURL=index-BOQuZ0gG.js.map
35
+ //# sourceMappingURL=index-D29mdTf5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BOQuZ0gG.js","sources":["../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions"],"mappings":";AAeA,MAAMA,IAAgB,CAACC,MAAQ,OAAOA,KAAU,YAAY,GAAGA,CAAK,KAAKA,MAAU,IAAI,MAAMA,GAChFC,IAAKC,GACLC,IAAM,CAACC,GAAMC,MAAS,CAACC,MAAQ;AACpC,MAAIC;AACJ,MAAqDF,GAAO,YAAa,KAAM,QAAOJ,EAAGG,GAAoDE,GAAM,OAAqDA,GAAM,SAAS;AACvN,QAAM,EAAE,UAAAE,GAAU,iBAAAC,EAAe,IAAKJ,GAChCK,IAAuB,OAAO,KAAKF,CAAQ,EAAE,IAAI,CAACG,MAAU;AAC9D,UAAMC,IAA4DN,IAAMK,CAAO,GACzEE,IAAuFJ,IAAgBE,CAAO;AACpH,QAAIC,MAAgB,KAAM,QAAO;AACjC,UAAME,IAAaf,EAAca,CAAW,KAAKb,EAAcc,CAAkB;AACjF,WAAOL,EAASG,CAAO,EAAEG,CAAU;AAAA,EACvC,CAAC,GACKC,IAAwBT,KAAS,OAAO,QAAQA,CAAK,EAAE,OAAO,CAACU,GAAKC,MAAQ;AAC9E,QAAI,CAACC,GAAKlB,CAAK,IAAIiB;AACnB,WAAIjB,MAAU,WAGdgB,EAAIE,CAAG,IAAIlB,IACJgB;AAAA,EACX,GAAG,CAAA,CAAE,GACCG,IAA+Bd,KAAW,SAAsCE,IAA2BF,EAAO,sBAAsB,QAAQE,MAA6B,SAAvG,SAAyHA,EAAyB,OAAO,CAACS,GAAKC,MAAQ;AAC/O,QAAI,EAAE,OAAOG,GAAS,WAAWC,GAAa,GAAGC,EAAsB,IAAKL;AAC5E,WAAO,OAAO,QAAQK,CAAsB,EAAE,MAAM,CAACL,MAAQ;AACzD,UAAI,CAACC,GAAKlB,CAAK,IAAIiB;AACnB,aAAO,MAAM,QAAQjB,CAAK,IAAIA,EAAM,SAAS;AAAA,QACzC,GAAGS;AAAA,QACH,GAAGM;AAAA,MACvB,EAAkBG,CAAG,CAAC,IAAK;AAAA,QACP,GAAGT;AAAA,QACH,GAAGM;AAAA,MACvB,EAAmBG,CAAG,MAAMlB;AAAA,IAChB,CAAC,IAAI;AAAA,MACD,GAAGgB;AAAA,MACHI;AAAA,MACAC;AAAA,IAChB,IAAgBL;AAAA,EACR,GAAG,CAAA,CAAE;AACL,SAAOf,EAAGG,GAAMM,GAAsBS,GAA4Eb,GAAM,OAAqDA,GAAM,SAAS;AAChM;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index-D29mdTf5.js","sources":["../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions"],"mappings":";AAeA,MAAMA,IAAgB,CAACC,MAAQ,OAAOA,KAAU,YAAY,GAAGA,CAAK,KAAK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MACHI;AAAA,MACAC;AAAA,IAChB,IAAgBL;AAAA,EACR,GAAG,CAAA,CAAE;AACL,SAAOf,EAAGG,GAAMM,GAAsBS,GAA4Eb,GAAM,OAAqDA,GAAM,SAAS;AAChM;","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";const O=require("./clsx-C11secjj.js"),m=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,y=O.clsx,b=(e,l)=>n=>{var d;if(l?.variants==null)return y(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=l,V=Object.keys(o).map(t=>{const a=n?.[t],u=s?.[t];if(a===null)return null;const i=m(a)||m(u);return o[t][i]}),v=n&&Object.entries(n).reduce((t,a)=>{let[u,i]=a;return i===void 0||(t[u]=i),t},{}),N=l==null||(d=l.compoundVariants)===null||d===void 0?void 0:d.reduce((t,a)=>{let{class:u,className:i,...C}=a;return Object.entries(C).every(f=>{let[c,r]=f;return Array.isArray(r)?r.includes({...s,...v}[c]):{...s,...v}[c]===r})?[...t,u,i]:t},[]);return y(e,V,N,n?.class,n?.className)};exports.cva=b;
2
+ //# sourceMappingURL=index-nwdlcB7h.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BxK4T-v8.js","sources":["../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions"],"mappings":"qCAeMA,EAAiBC,GAAQ,OAAOA,GAAU,UAAY,GAAGA,CAAK,GAAKA,IAAU,EAAI,IAAMA,EAChFC,EAAKC,EAAAA,KACLC,EAAM,CAACC,EAAMC,IAAUC,GAAQ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3,"file":"index-nwdlcB7h.js","sources":["../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs"],"sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions"],"mappings":"mDAeMA,EAAiBC,GAAQ,OAAOA,GAAU,UAAY,GAAGA,CAAK,GAAKA,IAAU,EAAI,IAAMA,EAChFC,EAAKC,EAAAA,KACLC,EAAM,CAACC,EAAMC,IAAUC,GAAQ,CACpC,IAAIC,EACJ,GAAqDF,GAAO,UAAa,KAAM,OAAOJ,EAAGG,EAAoDE,GAAM,MAAqDA,GAAM,SAAS,EACvN,KAAM,CAAE,SAAAE,EAAU,gBAAAC,CAAe,EAAKJ,EAChCK,EAAuB,OAAO,KAAKF,CAAQ,EAAE,IAAKG,GAAU,CAC9D,MAAMC,EAA4DN,IAAMK,CAAO,EACzEE,EAAuFJ,IAAgBE,CAAO,EACpH,GAAIC,IAAgB,KAAM,OAAO,KACjC,MAAME,EAAaf,EAAca,CAAW,GAAKb,EAAcc,CAAkB,EACjF,OAAOL,EAASG,CAAO,EAAEG,CAAU,CACvC,CAAC,EACKC,EAAwBT,GAAS,OAAO,QAAQA,CAAK,EAAE,OAAO,CAACU,EAAKC,IAAQ,CAC9E,GAAI,CAACC,EAAKlB,CAAK,EAAIiB,EACnB,OAAIjB,IAAU,SAGdgB,EAAIE,CAAG,EAAIlB,GACJgB,CACX,EAAG,CAAA,CAAE,EACCG,EAA+Bd,GAAW,OAAsCE,EAA2BF,EAAO,oBAAsB,MAAQE,IAA6B,OAAvG,OAAyHA,EAAyB,OAAO,CAACS,EAAKC,IAAQ,CAC/O,GAAI,CAAE,MAAOG,EAAS,UAAWC,EAAa,GAAGC,CAAsB,EAAKL,EAC5E,OAAO,OAAO,QAAQK,CAAsB,EAAE,MAAOL,GAAQ,CACzD,GAAI,CAACC,EAAKlB,CAAK,EAAIiB,EACnB,OAAO,MAAM,QAAQjB,CAAK,EAAIA,EAAM,SAAS,CACzC,GAAGS,EACH,GAAGM,CACvB,EAAkBG,CAAG,CAAC,EAAK,CACP,GAAGT,EACH,GAAGM,CACvB,EAAmBG,CAAG,IAAMlB,CAChB,CAAC,EAAI,CACD,GAAGgB,EACHI,EACAC,CAChB,EAAgBL,CACR,EAAG,CAAA,CAAE,EACL,OAAOf,EAAGG,EAAMM,EAAsBS,EAA4Eb,GAAM,MAAqDA,GAAM,SAAS,CAChM","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ "use strict";const t=require("./jsx-runtime-BjzqJBtL.js"),n=require("./bundle-mjs-8z5d_e-8.js"),a=({text:e,className:r})=>{const s=n.twMerge("text-danger font-normal text-xs mt-1 leading-none",r);return t.jsxRuntimeExports.jsx("span",{className:s,children:e})};exports.LabelError=a;
2
+ //# sourceMappingURL=label-error-B8Rq-HGY.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-error-Ax74Uy3M.js","sources":["../../src/components/ui/label-error.tsx"],"sourcesContent":["import { twMerge } from \"tailwind-merge\";\nexport type LabelErrorType = {\n\t/**\n\t * @description\n\t * Propiedad para colocar el texto.\n\t * @type\n\t * Puede recibir **string**\n\t */\n\ttext: string;\n\t/**\n\t * @description\n\t * Propiedad para brindar clases personalizadas al componente, este se situa en el container del label.\n\t */\n\tclassName?: string;\n};\n\nexport const LabelError = ({ text, className }: LabelErrorType) => {\n\tconst classLabel = twMerge(\"text-danger font-normal text-xs mt-1 leading-none\", className);\n\n\treturn <span className={classLabel}>{text}</span>;\n};\n"],"names":["LabelError","text","className","classLabel","twMerge","jsx"],"mappings":"sFAgBaA,EAAa,CAAC,CAAE,KAAAC,EAAM,UAAAC,KAAgC,CAClE,MAAMC,EAAaC,EAAAA,QAAQ,oDAAqDF,CAAS,EAEzF,OAAOG,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAWF,EAAa,SAAAF,EAAK,CAC3C"}
1
+ {"version":3,"file":"label-error-B8Rq-HGY.js","sources":["../../src/components/ui/label-error.tsx"],"sourcesContent":["import { twMerge } from \"tailwind-merge\";\nexport type LabelErrorType = {\n\t/**\n\t * @description\n\t * Propiedad para colocar el texto.\n\t * @type\n\t * Puede recibir **string**\n\t */\n\ttext: string;\n\t/**\n\t * @description\n\t * Propiedad para brindar clases personalizadas al componente, este se situa en el container del label.\n\t */\n\tclassName?: string;\n};\n\nexport const LabelError = ({ text, className }: LabelErrorType) => {\n\tconst classLabel = twMerge(\"text-danger font-normal text-xs mt-1 leading-none\", className);\n\n\treturn <span className={classLabel}>{text}</span>;\n};\n"],"names":["LabelError","text","className","classLabel","twMerge","jsx"],"mappings":"gGAgBaA,EAAa,CAAC,CAAE,KAAAC,EAAM,UAAAC,KAAgC,CAClE,MAAMC,EAAaC,EAAAA,QAAQ,oDAAqDF,CAAS,EAEzF,OAAOG,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAWF,EAAa,SAAAF,EAAK,CAC3C"}
@@ -0,0 +1,10 @@
1
+ import { j as s } from "./jsx-runtime-Cl_4eDuT.js";
2
+ import { t as a } from "./bundle-mjs-2oQ8XDAz.js";
3
+ const m = ({ text: t, className: r }) => {
4
+ const e = a("text-danger font-normal text-xs mt-1 leading-none", r);
5
+ return /* @__PURE__ */ s.jsx("span", { className: e, children: t });
6
+ };
7
+ export {
8
+ m as L
9
+ };
10
+ //# sourceMappingURL=label-error-BOE4Qj5S.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-error-DGQqDKTV.js","sources":["../../src/components/ui/label-error.tsx"],"sourcesContent":["import { twMerge } from \"tailwind-merge\";\nexport type LabelErrorType = {\n\t/**\n\t * @description\n\t * Propiedad para colocar el texto.\n\t * @type\n\t * Puede recibir **string**\n\t */\n\ttext: string;\n\t/**\n\t * @description\n\t * Propiedad para brindar clases personalizadas al componente, este se situa en el container del label.\n\t */\n\tclassName?: string;\n};\n\nexport const LabelError = ({ text, className }: LabelErrorType) => {\n\tconst classLabel = twMerge(\"text-danger font-normal text-xs mt-1 leading-none\", className);\n\n\treturn <span className={classLabel}>{text}</span>;\n};\n"],"names":["LabelError","text","className","classLabel","twMerge","jsx"],"mappings":";;AAgBO,MAAMA,IAAa,CAAC,EAAE,MAAAC,GAAM,WAAAC,QAAgC;AAClE,QAAMC,IAAaC,EAAQ,qDAAqDF,CAAS;AAEzF,SAAOG,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAWF,GAAa,UAAAF,GAAK;AAC3C;"}
1
+ {"version":3,"file":"label-error-BOE4Qj5S.js","sources":["../../src/components/ui/label-error.tsx"],"sourcesContent":["import { twMerge } from \"tailwind-merge\";\nexport type LabelErrorType = {\n\t/**\n\t * @description\n\t * Propiedad para colocar el texto.\n\t * @type\n\t * Puede recibir **string**\n\t */\n\ttext: string;\n\t/**\n\t * @description\n\t * Propiedad para brindar clases personalizadas al componente, este se situa en el container del label.\n\t */\n\tclassName?: string;\n};\n\nexport const LabelError = ({ text, className }: LabelErrorType) => {\n\tconst classLabel = twMerge(\"text-danger font-normal text-xs mt-1 leading-none\", className);\n\n\treturn <span className={classLabel}>{text}</span>;\n};\n"],"names":["LabelError","text","className","classLabel","twMerge","jsx"],"mappings":";;AAgBO,MAAMA,IAAa,CAAC,EAAE,MAAAC,GAAM,WAAAC,QAAgC;AAClE,QAAMC,IAAaC,EAAQ,qDAAqDF,CAAS;AAEzF,SAAOG,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAWF,GAAa,UAAAF,GAAK;AAC3C;"}
@@ -1,9 +1,9 @@
1
1
  import { c as ce, u as se, b as ae } from "./index-VJ2Qvmen.js";
2
2
  import { j as f } from "./jsx-runtime-Cl_4eDuT.js";
3
3
  import * as c from "react";
4
- import { c as ie, P as _, a as O, b as C, u as P, d as de } from "./textarea-BIy5pTb5.js";
4
+ import { c as ie, P as _, a as O, b as C, u as P, d as de } from "./textarea-BPsle-xc.js";
5
5
  import { u as A } from "./index-Do-g2tEs.js";
6
- import { c as F } from "./utils-B6yFEsav.js";
6
+ import { c as F } from "./utils-CvyT6Z0O.js";
7
7
  const ue = [
8
8
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
9
9
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
@@ -553,4 +553,4 @@ export {
553
553
  He as a,
554
554
  Ae as b
555
555
  };
556
- //# sourceMappingURL=scroll-area-zt_z9PRo.js.map
556
+ //# sourceMappingURL=scroll-area-1okMO4N6.js.map