@codefast/ui 0.0.12 → 0.0.14

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 (153) hide show
  1. package/dist/accordion.js +3 -9
  2. package/dist/accordion.js.map +1 -1
  3. package/dist/accordion.mjs +3 -9
  4. package/dist/accordion.mjs.map +1 -1
  5. package/dist/alert-dialog.js +6 -19
  6. package/dist/alert-dialog.js.map +1 -1
  7. package/dist/alert-dialog.mjs +4 -17
  8. package/dist/alert-dialog.mjs.map +1 -1
  9. package/dist/breadcrumb.js +1 -2
  10. package/dist/breadcrumb.js.map +1 -1
  11. package/dist/breadcrumb.mjs +1 -2
  12. package/dist/breadcrumb.mjs.map +1 -1
  13. package/dist/button.js +3 -3
  14. package/dist/button.mjs +2 -2
  15. package/dist/calendar.js +4 -4
  16. package/dist/calendar.mjs +2 -2
  17. package/dist/carousel.js +4 -4
  18. package/dist/carousel.mjs +2 -2
  19. package/dist/checkbox-cards.js +2 -6
  20. package/dist/checkbox-cards.js.map +1 -1
  21. package/dist/checkbox-cards.mjs +2 -6
  22. package/dist/checkbox-cards.mjs.map +1 -1
  23. package/dist/checkbox-group.js +1 -5
  24. package/dist/checkbox-group.js.map +1 -1
  25. package/dist/checkbox-group.mjs +1 -5
  26. package/dist/checkbox-group.mjs.map +1 -1
  27. package/dist/checkbox.js +1 -5
  28. package/dist/checkbox.js.map +1 -1
  29. package/dist/checkbox.mjs +1 -5
  30. package/dist/checkbox.mjs.map +1 -1
  31. package/dist/{chunk-V2254PQL.mjs → chunk-73S45XV3.mjs} +2 -5
  32. package/dist/chunk-73S45XV3.mjs.map +1 -0
  33. package/dist/{chunk-7S4DOWLB.js → chunk-AOIW2XNK.js} +2 -8
  34. package/dist/chunk-AOIW2XNK.js.map +1 -0
  35. package/dist/{chunk-6J6VPUBP.mjs → chunk-AUQEMOIM.mjs} +2 -8
  36. package/dist/chunk-AUQEMOIM.mjs.map +1 -0
  37. package/dist/{chunk-OK63Q6EJ.mjs → chunk-BBQXHKST.mjs} +2 -3
  38. package/dist/chunk-BBQXHKST.mjs.map +1 -0
  39. package/dist/{chunk-LNSEYAPJ.js → chunk-OSFYUOPN.js} +2 -3
  40. package/dist/chunk-OSFYUOPN.js.map +1 -0
  41. package/dist/{chunk-BWCO2ZQQ.js → chunk-TFYKPLNV.js} +4 -8
  42. package/dist/chunk-TFYKPLNV.js.map +1 -0
  43. package/dist/{chunk-IXEJO7ZP.js → chunk-TH24V27M.js} +7 -26
  44. package/dist/chunk-TH24V27M.js.map +1 -0
  45. package/dist/{chunk-XCKLBP2V.mjs → chunk-TXRIFICH.mjs} +7 -26
  46. package/dist/chunk-TXRIFICH.mjs.map +1 -0
  47. package/dist/{chunk-WFXEFJRB.mjs → chunk-U6VR5RJ5.mjs} +3 -7
  48. package/dist/chunk-U6VR5RJ5.mjs.map +1 -0
  49. package/dist/{chunk-MDSPK3M6.js → chunk-Y3DZHPJ5.js} +2 -5
  50. package/dist/chunk-Y3DZHPJ5.js.map +1 -0
  51. package/dist/command.d.mts +2 -2
  52. package/dist/command.d.ts +2 -2
  53. package/dist/command.js +2 -2
  54. package/dist/command.mjs +1 -1
  55. package/dist/data-table.js +12 -12
  56. package/dist/data-table.mjs +3 -3
  57. package/dist/dialog.js +2 -2
  58. package/dist/dialog.mjs +1 -1
  59. package/dist/input-otp.js +1 -1
  60. package/dist/input-otp.js.map +1 -1
  61. package/dist/input-otp.mjs +1 -1
  62. package/dist/input-otp.mjs.map +1 -1
  63. package/dist/input.js +1 -7
  64. package/dist/input.js.map +1 -1
  65. package/dist/input.mjs +1 -7
  66. package/dist/input.mjs.map +1 -1
  67. package/dist/navigation-menu.js +2 -3
  68. package/dist/navigation-menu.js.map +1 -1
  69. package/dist/navigation-menu.mjs +2 -3
  70. package/dist/navigation-menu.mjs.map +1 -1
  71. package/dist/pagination.js +3 -3
  72. package/dist/pagination.mjs +2 -2
  73. package/dist/radio-cards.js +1 -5
  74. package/dist/radio-cards.js.map +1 -1
  75. package/dist/radio-cards.mjs +1 -5
  76. package/dist/radio-cards.mjs.map +1 -1
  77. package/dist/radio-group.js +2 -10
  78. package/dist/radio-group.js.map +1 -1
  79. package/dist/radio-group.mjs +2 -10
  80. package/dist/radio-group.mjs.map +1 -1
  81. package/dist/radio.js +1 -7
  82. package/dist/radio.js.map +1 -1
  83. package/dist/radio.mjs +1 -7
  84. package/dist/radio.mjs.map +1 -1
  85. package/dist/resizable.js +1 -2
  86. package/dist/resizable.js.map +1 -1
  87. package/dist/resizable.mjs +1 -2
  88. package/dist/resizable.mjs.map +1 -1
  89. package/dist/select.js +2 -2
  90. package/dist/select.mjs +1 -1
  91. package/dist/sheet.js +6 -22
  92. package/dist/sheet.js.map +1 -1
  93. package/dist/sheet.mjs +6 -22
  94. package/dist/sheet.mjs.map +1 -1
  95. package/dist/slider.js +7 -8
  96. package/dist/slider.js.map +1 -1
  97. package/dist/slider.mjs +6 -7
  98. package/dist/slider.mjs.map +1 -1
  99. package/dist/spinner.js +2 -2
  100. package/dist/spinner.mjs +1 -1
  101. package/dist/styles.css +1 -1
  102. package/dist/styles.css.map +1 -1
  103. package/dist/switch.js +1 -2
  104. package/dist/switch.js.map +1 -1
  105. package/dist/switch.mjs +1 -2
  106. package/dist/switch.mjs.map +1 -1
  107. package/dist/tabs.js +2 -4
  108. package/dist/tabs.js.map +1 -1
  109. package/dist/tabs.mjs +2 -4
  110. package/dist/tabs.mjs.map +1 -1
  111. package/dist/textarea.js +1 -2
  112. package/dist/textarea.js.map +1 -1
  113. package/dist/textarea.mjs +1 -2
  114. package/dist/textarea.mjs.map +1 -1
  115. package/dist/toggle-group.js +2 -2
  116. package/dist/toggle-group.mjs +1 -1
  117. package/dist/toggle.js +2 -2
  118. package/dist/toggle.mjs +1 -1
  119. package/package.json +3 -6
  120. package/src/accordion.tsx +3 -9
  121. package/src/alert-dialog.tsx +2 -12
  122. package/src/breadcrumb.tsx +1 -2
  123. package/src/button.tsx +1 -5
  124. package/src/checkbox-cards.tsx +2 -6
  125. package/src/checkbox-group.tsx +1 -5
  126. package/src/checkbox.tsx +1 -5
  127. package/src/dialog.tsx +3 -15
  128. package/src/input-otp.tsx +1 -1
  129. package/src/input.tsx +1 -7
  130. package/src/navigation-menu.tsx +3 -3
  131. package/src/radio-cards.tsx +1 -5
  132. package/src/radio-group.tsx +2 -7
  133. package/src/radio.tsx +1 -7
  134. package/src/resizable.tsx +1 -2
  135. package/src/select.tsx +1 -2
  136. package/src/sheet.tsx +3 -12
  137. package/src/slider.tsx +9 -6
  138. package/src/spinner.tsx +1 -4
  139. package/src/switch.tsx +1 -2
  140. package/src/tabs.tsx +2 -4
  141. package/src/textarea.tsx +1 -2
  142. package/src/toggle.tsx +1 -7
  143. package/tailwind.config.ts +4 -1
  144. package/dist/chunk-6J6VPUBP.mjs.map +0 -1
  145. package/dist/chunk-7S4DOWLB.js.map +0 -1
  146. package/dist/chunk-BWCO2ZQQ.js.map +0 -1
  147. package/dist/chunk-IXEJO7ZP.js.map +0 -1
  148. package/dist/chunk-LNSEYAPJ.js.map +0 -1
  149. package/dist/chunk-MDSPK3M6.js.map +0 -1
  150. package/dist/chunk-OK63Q6EJ.mjs.map +0 -1
  151. package/dist/chunk-V2254PQL.mjs.map +0 -1
  152. package/dist/chunk-WFXEFJRB.mjs.map +0 -1
  153. package/dist/chunk-XCKLBP2V.mjs.map +0 -1
@@ -23,11 +23,7 @@ var CheckboxGroupItem = React.forwardRef(
23
23
  {
24
24
  ref,
25
25
  className: _chunkG3NP7M2Njs.cn.call(void 0,
26
- "border-compound/70 peer size-4 shrink-0 rounded-sm border shadow",
27
- "hover:border-compound",
28
- "aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground",
29
- "disabled:cursor-not-allowed disabled:opacity-50",
30
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
26
+ "border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
31
27
  className
32
28
  ),
33
29
  ...props,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/checkbox-group.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAYjB;AADT,IAAM,gBAAsB,iBAAqD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACjH,SAAO,oBAAwB,MAAvB,EAA4B,KAAU,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO;AACnG,CAAC;AAED,cAAc,cAAc;AAS5B,IAAM,oBAA0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,WACE;AAAA,MAAwB;AAAA,MAAvB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEJ,8BAAwB,wBAAvB,EAA8C,WAAU,2DACvD,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as CheckboxGroupPrimitive from \"./checkbox-group.primitive\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(({ className, ...props }, ref) => {\n return <CheckboxGroupPrimitive.Root ref={ref} className={cn(\"grid gap-2\", className)} {...props} />;\n});\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"border-compound/70 peer size-4 shrink-0 rounded-sm border shadow\",\n \"hover:border-compound\",\n \"aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2\",\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = \"CheckboxGroupItem\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"]}
1
+ {"version":3,"sources":["../src/checkbox-group.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAYjB;AADT,IAAM,gBAAsB,iBAAqD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACjH,SAAO,oBAAwB,MAAvB,EAA4B,KAAU,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO;AACnG,CAAC;AAED,cAAc,cAAc;AAS5B,IAAM,oBAA0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,WACE;AAAA,MAAwB;AAAA,MAAvB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEJ,8BAAwB,wBAAvB,EAA8C,WAAU,2DACvD,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as CheckboxGroupPrimitive from \"./checkbox-group.primitive\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(({ className, ...props }, ref) => {\n return <CheckboxGroupPrimitive.Root ref={ref} className={cn(\"grid gap-2\", className)} {...props} />;\n});\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = \"CheckboxGroupItem\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"]}
@@ -23,11 +23,7 @@ var CheckboxGroupItem = React.forwardRef(
23
23
  {
24
24
  ref,
25
25
  className: cn(
26
- "border-compound/70 peer size-4 shrink-0 rounded-sm border shadow",
27
- "hover:border-compound",
28
- "aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground",
29
- "disabled:cursor-not-allowed disabled:opacity-50",
30
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
26
+ "border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
31
27
  className
32
28
  ),
33
29
  ...props,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/checkbox-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as CheckboxGroupPrimitive from \"./checkbox-group.primitive\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(({ className, ...props }, ref) => {\n return <CheckboxGroupPrimitive.Root ref={ref} className={cn(\"grid gap-2\", className)} {...props} />;\n});\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"border-compound/70 peer size-4 shrink-0 rounded-sm border shadow\",\n \"hover:border-compound\",\n \"aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2\",\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = \"CheckboxGroupItem\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"],"mappings":";;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAYjB;AADT,IAAM,gBAAsB,iBAAqD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACjH,SAAO,oBAAwB,MAAvB,EAA4B,KAAU,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO;AACnG,CAAC;AAED,cAAc,cAAc;AAS5B,IAAM,oBAA0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,WACE;AAAA,MAAwB;AAAA,MAAvB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEJ,8BAAwB,wBAAvB,EAA8C,WAAU,2DACvD,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/checkbox-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as CheckboxGroupPrimitive from \"./checkbox-group.primitive\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(({ className, ...props }, ref) => {\n return <CheckboxGroupPrimitive.Root ref={ref} className={cn(\"grid gap-2\", className)} {...props} />;\n});\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = \"CheckboxGroupItem\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"],"mappings":";;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAYjB;AADT,IAAM,gBAAsB,iBAAqD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AACjH,SAAO,oBAAwB,MAAvB,EAA4B,KAAU,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO;AACnG,CAAC;AAED,cAAc,cAAc;AAS5B,IAAM,oBAA0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,WACE;AAAA,MAAwB;AAAA,MAAvB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEJ,8BAAwB,wBAAvB,EAA8C,WAAU,2DACvD,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;","names":[]}
package/dist/checkbox.js CHANGED
@@ -13,11 +13,7 @@ var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
13
13
  {
14
14
  ref,
15
15
  className: _chunkG3NP7M2Njs.cn.call(void 0,
16
- "border-compound/70 peer size-4 shrink-0 rounded-sm border shadow",
17
- "hover:border-compound",
18
- "aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground",
19
- "disabled:cursor-not-allowed disabled:opacity-50",
20
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
16
+ "border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
21
17
  className
22
18
  ),
23
19
  ...props,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/checkbox.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,iBAAiB;AAwBpB;AAdN,IAAM,WAAiB,iBAA2C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1F;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAmB,6BAAlB,EAA4B,WAAU,2DACrC,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AACF,CACD;AAED,SAAS,cAAgC,uBAAK","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Checkbox\n * -------------------------------------------------------------------------- */\n\ntype CheckboxElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\n\nconst Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"border-compound/70 peer size-4 shrink-0 rounded-sm border shadow\",\n \"hover:border-compound\",\n \"aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\n\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Checkbox, type CheckboxProps };\n"]}
1
+ {"version":3,"sources":["../src/checkbox.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,iBAAiB;AAoBpB;AAVN,IAAM,WAAiB,iBAA2C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1F;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAmB,6BAAlB,EAA4B,WAAU,2DACrC,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AACF,CACD;AAED,SAAS,cAAgC,uBAAK","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Checkbox\n * -------------------------------------------------------------------------- */\n\ntype CheckboxElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\n\nconst Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\n\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Checkbox, type CheckboxProps };\n"]}
package/dist/checkbox.mjs CHANGED
@@ -13,11 +13,7 @@ var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
13
13
  {
14
14
  ref,
15
15
  className: cn(
16
- "border-compound/70 peer size-4 shrink-0 rounded-sm border shadow",
17
- "hover:border-compound",
18
- "aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground",
19
- "disabled:cursor-not-allowed disabled:opacity-50",
20
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
16
+ "border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
21
17
  className
22
18
  ),
23
19
  ...props,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Checkbox\n * -------------------------------------------------------------------------- */\n\ntype CheckboxElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\n\nconst Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"border-compound/70 peer size-4 shrink-0 rounded-sm border shadow\",\n \"hover:border-compound\",\n \"aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\n\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Checkbox, type CheckboxProps };\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,iBAAiB;AAwBpB;AAdN,IAAM,WAAiB,iBAA2C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1F;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAmB,6BAAlB,EAA4B,WAAU,2DACrC,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AACF,CACD;AAED,SAAS,cAAgC,uBAAK;","names":[]}
1
+ {"version":3,"sources":["../src/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Checkbox\n * -------------------------------------------------------------------------- */\n\ntype CheckboxElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\n\nconst Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"border-compound/70 hover:border-compound aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground focus-visible:ring-ring peer size-4 shrink-0 rounded-sm border shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\n\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Checkbox, type CheckboxProps };\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,iBAAiB;AAoBpB;AAVN,IAAM,WAAiB,iBAA2C,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1F;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAmB,6BAAlB,EAA4B,WAAU,2DACrC,8BAAC,aAAU,WAAU,YAAW,GAClC;AAAA;AACF,CACD;AAED,SAAS,cAAgC,uBAAK;","names":[]}
@@ -21,10 +21,7 @@ var Spinner = React.forwardRef(
21
21
  children: Array.from({ length: spinnerCount }, (_, i) => /* @__PURE__ */ jsx(
22
22
  "span",
23
23
  {
24
- className: cn(
25
- "absolute h-full rotate-[var(--spinner-rotate)]",
26
- "before:fade-out-25 before:animate-out before:repeat-infinite before:block before:h-1/3 before:w-full before:rounded-full before:bg-current before:[animation-delay:var(--spinner-delay)] before:[animation-duration:var(--spinner-duration)]"
27
- ),
24
+ className: "before:fade-out-25 before:animate-out before:animation-repeat-infinite before:animation-delay-[var(--spinner-delay)] before:animation-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current",
28
25
  style: {
29
26
  width: `${(100 / spinnerCount).toString()}%`,
30
27
  "--spinner-delay": `-${((spinnerCount - i) * 100).toString()}ms`,
@@ -51,4 +48,4 @@ Spinner.displayName = "Spinner";
51
48
  export {
52
49
  Spinner
53
50
  };
54
- //# sourceMappingURL=chunk-V2254PQL.mjs.map
51
+ //# sourceMappingURL=chunk-73S45XV3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/spinner.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Spinner\n * -------------------------------------------------------------------------- */\n\nconst spinnerCount = 8;\n\ntype SpinnerElement = HTMLSpanElement;\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n loading?: boolean;\n}\n\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(\n ({ className, loading = true, children, ...props }, ref) => {\n if (!loading) {\n return children;\n }\n\n const spinner = (\n <span\n ref={ref}\n className={cn(\"relative flex size-4 items-center justify-center opacity-60\", className)}\n {...props}\n >\n {Array.from({ length: spinnerCount }, (_, i) => (\n <span\n key={i}\n className=\"before:fade-out-25 before:animate-out before:animation-repeat-infinite before:animation-delay-[var(--spinner-delay)] before:animation-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current\"\n style={\n {\n width: `${(100 / spinnerCount).toString()}%`,\n \"--spinner-delay\": `-${((spinnerCount - i) * 100).toString()}ms`,\n \"--spinner-rotate\": `${((360 / spinnerCount) * i).toString()}deg`,\n \"--spinner-duration\": `${(spinnerCount * 100).toString()}ms`,\n } as React.CSSProperties\n }\n />\n ))}\n </span>\n );\n\n if (children === undefined) {\n return spinner;\n }\n\n return (\n <span className=\"relative\">\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">{spinner}</span>\n </span>\n );\n },\n);\n\nSpinner.displayName = \"Spinner\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Spinner, type SpinnerProps };\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,sBAAsB;AA4BrB,cAqBJ,YArBI;AArBV,IAAM,eAAe;AAQrB,IAAM,UAAgB;AAAA,EACpB,CAAC,EAAE,WAAW,UAAU,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC1D,QAAI,CAAC,SAAS;AACZ,aAAO;AAAA,IACT;AAEA,UAAM,UACJ;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,+DAA+D,SAAS;AAAA,QACrF,GAAG;AAAA,QAEH,gBAAM,KAAK,EAAE,QAAQ,aAAa,GAAG,CAAC,GAAG,MACxC;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,OACE;AAAA,cACE,OAAO,IAAI,MAAM,cAAc,SAAS,CAAC;AAAA,cACzC,mBAAmB,MAAM,eAAe,KAAK,KAAK,SAAS,CAAC;AAAA,cAC5D,oBAAoB,IAAK,MAAM,eAAgB,GAAG,SAAS,CAAC;AAAA,cAC5D,sBAAsB,IAAI,eAAe,KAAK,SAAS,CAAC;AAAA,YAC1D;AAAA;AAAA,UARG;AAAA,QAUP,CACD;AAAA;AAAA,IACH;AAGF,QAAI,aAAa,QAAW;AAC1B,aAAO;AAAA,IACT;AAEA,WACE,qBAAC,UAAK,WAAU,YACd;AAAA,0BAAC,UAAK,eAAW,MAAC,WAAU,sBACzB,UACH;AAAA,MACA,oBAAC,kBAAgB,UAAS;AAAA,MAC1B,oBAAC,UAAK,WAAU,qDAAqD,mBAAQ;AAAA,OAC/E;AAAA,EAEJ;AACF;AAEA,QAAQ,cAAc;","names":[]}
@@ -7,13 +7,7 @@ var _react = require('react'); var React = _interopRequireWildcard(_react);
7
7
  var _reacttoggle = require('@radix-ui/react-toggle'); var TogglePrimitive = _interopRequireWildcard(_reacttoggle);
8
8
  var _jsxruntime = require('react/jsx-runtime');
9
9
  var toggleVariants = _chunkG3NP7M2Njs.cva.call(void 0, {
10
- base: [
11
- "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
12
- "hover:bg-muted hover:text-muted-foreground",
13
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
14
- "data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
15
- "disabled:pointer-events-none disabled:opacity-50"
16
- ],
10
+ base: "hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
17
11
  variants: {
18
12
  variant: {
19
13
  default: "bg-transparent",
@@ -37,4 +31,4 @@ Toggle.displayName = TogglePrimitive.Root.displayName;
37
31
 
38
32
 
39
33
  exports.toggleVariants = toggleVariants; exports.Toggle = Toggle;
40
- //# sourceMappingURL=chunk-7S4DOWLB.js.map
34
+ //# sourceMappingURL=chunk-AOIW2XNK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/toggle.tsx"],"names":[],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;AAqC/B;AA7BF,IAAM,iBAAiB,IAAI;AAAA,EACzB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACF,CAAC;AAWD,IAAM,SAAe,iBAAuC,CAAC,EAAE,WAAW,SAAS,MAAM,GAAG,MAAM,GAAG,QACnG,oBAAiB,sBAAhB,EAAqB,KAAU,WAAW,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC,GAAI,GAAG,OAAO,CACrG;AAED,OAAO,cAA8B,qBAAK","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { type VariantProps } from \"cva\";\nimport { cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Toggle\n * -------------------------------------------------------------------------- */\n\nconst toggleVariants = cva({\n base: \"hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-sm\",\n },\n size: {\n default: \"h-10 px-3\",\n sm: \"h-9 px-2.5\",\n lg: \"h-11 px-5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n});\n\ntype ToggleVariantsProps = VariantProps<typeof toggleVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Toggle\n * -------------------------------------------------------------------------- */\n\ntype ToggleElement = React.ElementRef<typeof TogglePrimitive.Root>;\ntype ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & ToggleVariantsProps;\n\nconst Toggle = React.forwardRef<ToggleElement, ToggleProps>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root ref={ref} className={toggleVariants({ variant, size, className })} {...props} />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\nexport { Toggle, toggleVariants, type ToggleProps, type ToggleVariantsProps };\n"]}
@@ -7,13 +7,7 @@ import * as React from "react";
7
7
  import * as TogglePrimitive from "@radix-ui/react-toggle";
8
8
  import { jsx } from "react/jsx-runtime";
9
9
  var toggleVariants = cva({
10
- base: [
11
- "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
12
- "hover:bg-muted hover:text-muted-foreground",
13
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
14
- "data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
15
- "disabled:pointer-events-none disabled:opacity-50"
16
- ],
10
+ base: "hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
17
11
  variants: {
18
12
  variant: {
19
13
  default: "bg-transparent",
@@ -37,4 +31,4 @@ export {
37
31
  toggleVariants,
38
32
  Toggle
39
33
  };
40
- //# sourceMappingURL=chunk-6J6VPUBP.mjs.map
34
+ //# sourceMappingURL=chunk-AUQEMOIM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { type VariantProps } from \"cva\";\nimport { cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Toggle\n * -------------------------------------------------------------------------- */\n\nconst toggleVariants = cva({\n base: \"hover:bg-muted hover:text-muted-foreground focus-visible:ring-ring data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-sm\",\n },\n size: {\n default: \"h-10 px-3\",\n sm: \"h-9 px-2.5\",\n lg: \"h-11 px-5\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n});\n\ntype ToggleVariantsProps = VariantProps<typeof toggleVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Toggle\n * -------------------------------------------------------------------------- */\n\ntype ToggleElement = React.ElementRef<typeof TogglePrimitive.Root>;\ntype ToggleProps = React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & ToggleVariantsProps;\n\nconst Toggle = React.forwardRef<ToggleElement, ToggleProps>(({ className, variant, size, ...props }, ref) => (\n <TogglePrimitive.Root ref={ref} className={toggleVariants({ variant, size, className })} {...props} />\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\nexport { Toggle, toggleVariants, type ToggleProps, type ToggleVariantsProps };\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;AAqC/B;AA7BF,IAAM,iBAAiB,IAAI;AAAA,EACzB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACF,CAAC;AAWD,IAAM,SAAe,iBAAuC,CAAC,EAAE,WAAW,SAAS,MAAM,GAAG,MAAM,GAAG,QACnG,oBAAiB,sBAAhB,EAAqB,KAAU,WAAW,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC,GAAI,GAAG,OAAO,CACrG;AAED,OAAO,cAA8B,qBAAK;","names":[]}
@@ -16,8 +16,7 @@ var SelectTrigger = React.forwardRef(
16
16
  {
17
17
  ref,
18
18
  className: cn(
19
- "border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
20
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
19
+ "border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
21
20
  className
22
21
  ),
23
22
  ...props,
@@ -118,4 +117,4 @@ export {
118
117
  SelectItem,
119
118
  SelectSeparator
120
119
  };
121
- //# sourceMappingURL=chunk-OK63Q6EJ.mjs.map
120
+ //# sourceMappingURL=chunk-BBQXHKST.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/select.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Select\n * -------------------------------------------------------------------------- */\n\ntype SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>;\nconst Select = SelectPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectGroup\n * -------------------------------------------------------------------------- */\n\ntype SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\nconst SelectGroup = SelectPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectValue\n * -------------------------------------------------------------------------- */\n\ntype SelectValueProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>;\nconst SelectValue = SelectPrimitive.Value;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectTrigger\n * -------------------------------------------------------------------------- */\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>;\n\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n ({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretSortIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\n\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollUpButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollUpButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollUpButton>;\ntype SelectScrollUpButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>;\n\nconst SelectScrollUpButton = React.forwardRef<SelectScrollUpButtonElement, SelectScrollUpButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n ),\n);\n\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollDownButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollDownButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollDownButton>;\ntype SelectScrollDownButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>;\n\nconst SelectScrollDownButton = React.forwardRef<SelectScrollDownButtonElement, SelectScrollDownButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n ),\n);\n\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectContent\n * -------------------------------------------------------------------------- */\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;\n\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n ({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectLabel\n * -------------------------------------------------------------------------- */\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ntype SelectLabelProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>;\n\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)} {...props} />\n));\n\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectItem\n * -------------------------------------------------------------------------- */\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ntype SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>;\n\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\n\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectSeparator\n * -------------------------------------------------------------------------- */\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ntype SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>;\n\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn(\"bg-muted -mx-1 my-1 h-px\", className)} {...props} />\n ),\n);\n\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n type SelectProps,\n type SelectGroupProps,\n type SelectValueProps,\n type SelectTriggerProps,\n type SelectContentProps,\n type SelectLabelProps,\n type SelectItemProps,\n type SelectSeparatorProps,\n type SelectScrollUpButtonProps,\n type SelectScrollDownButtonProps,\n};\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,SAAS,eAAe,WAAW,iBAAiB,qBAAqB;AACzE,YAAY,qBAAqB;AAiC7B,SAUI,KAVJ;AAzBJ,IAAM,SAAyB;AAO/B,IAAM,cAA8B;AAOpC,IAAM,cAA8B;AASpC,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACD,oBAAiB,sBAAhB,EAAqB,SAAO,MAC3B,8BAAC,iBAAc,WAAU,qBAAoB,GAC/C;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,cAAc,cAA8B,wBAAQ;AASpD,IAAM,uBAA6B;AAAA,EACjC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,wDAAwD,SAAS;AAAA,MAC9E,GAAG;AAAA,MAEJ,8BAAC,iBAAc;AAAA;AAAA,EACjB;AAEJ;AAEA,qBAAqB,cAA8B,+BAAe;AASlE,IAAM,yBAA+B;AAAA,EACnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,wDAAwD,SAAS;AAAA,MAC9E,GAAG;AAAA,MAEJ,8BAAC,mBAAgB;AAAA;AAAA,EACnB;AAEJ;AAEA,uBAAuB,cAA8B,iCAAiB;AAStE,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,WAAW,UAAU,GAAG,MAAM,GAAG,QACvD,oBAAiB,wBAAhB,EACC;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,aAAa,YACX;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,wBAAqB;AAAA,QACtB;AAAA,UAAiB;AAAA,UAAhB;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,aAAa,YACX;AAAA,YACJ;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QACA,oBAAC,0BAAuB;AAAA;AAAA;AAAA,EAC1B,GACF;AAEJ;AAEA,cAAc,cAA8B,wBAAQ;AASpD,IAAM,cAAoB,iBAAiD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACnG,oBAAiB,uBAAhB,EAAsB,KAAU,WAAW,GAAG,qCAAqC,SAAS,GAAI,GAAG,OAAO,CAC5G;AAED,YAAY,cAA8B,sBAAM;AAShD,IAAM,aAAmB,iBAA+C,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAC1G;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,8DACd,8BAAiB,+BAAhB,EACC,8BAAC,aAAU,WAAU,UAAS,GAChC,GACF;AAAA,MACA,oBAAiB,0BAAhB,EAA0B,UAAS;AAAA;AAAA;AACtC,CACD;AAED,WAAW,cAA8B,qBAAK;AAS9C,IAAM,kBAAwB;AAAA,EAC5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAiB,2BAAhB,EAA0B,KAAU,WAAW,GAAG,4BAA4B,SAAS,GAAI,GAAG,OAAO;AAE1G;AAEA,gBAAgB,cAA8B,0BAAU;","names":[]}
@@ -16,8 +16,7 @@ var SelectTrigger = React.forwardRef(
16
16
  {
17
17
  ref,
18
18
  className: _chunkG3NP7M2Njs.cn.call(void 0,
19
- "border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
20
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
19
+ "border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
21
20
  className
22
21
  ),
23
22
  ...props,
@@ -118,4 +117,4 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
118
117
 
119
118
 
120
119
  exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator;
121
- //# sourceMappingURL=chunk-LNSEYAPJ.js.map
120
+ //# sourceMappingURL=chunk-OSFYUOPN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/select.tsx"],"names":[],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,SAAS,eAAe,WAAW,iBAAiB,qBAAqB;AACzE,YAAY,qBAAqB;AAiC7B,SAUI,KAVJ;AAzBJ,IAAM,SAAyB;AAO/B,IAAM,cAA8B;AAOpC,IAAM,cAA8B;AASpC,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACD,oBAAiB,sBAAhB,EAAqB,SAAO,MAC3B,8BAAC,iBAAc,WAAU,qBAAoB,GAC/C;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,cAAc,cAA8B,wBAAQ;AASpD,IAAM,uBAA6B;AAAA,EACjC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,wDAAwD,SAAS;AAAA,MAC9E,GAAG;AAAA,MAEJ,8BAAC,iBAAc;AAAA;AAAA,EACjB;AAEJ;AAEA,qBAAqB,cAA8B,+BAAe;AASlE,IAAM,yBAA+B;AAAA,EACnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW,GAAG,wDAAwD,SAAS;AAAA,MAC9E,GAAG;AAAA,MAEJ,8BAAC,mBAAgB;AAAA;AAAA,EACnB;AAEJ;AAEA,uBAAuB,cAA8B,iCAAiB;AAStE,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,WAAW,UAAU,GAAG,MAAM,GAAG,QACvD,oBAAiB,wBAAhB,EACC;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,aAAa,YACX;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,wBAAqB;AAAA,QACtB;AAAA,UAAiB;AAAA,UAAhB;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,aAAa,YACX;AAAA,YACJ;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QACA,oBAAC,0BAAuB;AAAA;AAAA;AAAA,EAC1B,GACF;AAEJ;AAEA,cAAc,cAA8B,wBAAQ;AASpD,IAAM,cAAoB,iBAAiD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACnG,oBAAiB,uBAAhB,EAAsB,KAAU,WAAW,GAAG,qCAAqC,SAAS,GAAI,GAAG,OAAO,CAC5G;AAED,YAAY,cAA8B,sBAAM;AAShD,IAAM,aAAmB,iBAA+C,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAC1G;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,8DACd,8BAAiB,+BAAhB,EACC,8BAAC,aAAU,WAAU,UAAS,GAChC,GACF;AAAA,MACA,oBAAiB,0BAAhB,EAA0B,UAAS;AAAA;AAAA;AACtC,CACD;AAED,WAAW,cAA8B,qBAAK;AAS9C,IAAM,kBAAwB;AAAA,EAC5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAiB,2BAAhB,EAA0B,KAAU,WAAW,GAAG,4BAA4B,SAAS,GAAI,GAAG,OAAO;AAE1G;AAEA,gBAAgB,cAA8B,0BAAU","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Select\n * -------------------------------------------------------------------------- */\n\ntype SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>;\nconst Select = SelectPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectGroup\n * -------------------------------------------------------------------------- */\n\ntype SelectGroupProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>;\nconst SelectGroup = SelectPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectValue\n * -------------------------------------------------------------------------- */\n\ntype SelectValueProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>;\nconst SelectValue = SelectPrimitive.Value;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectTrigger\n * -------------------------------------------------------------------------- */\n\ntype SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;\ntype SelectTriggerProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>;\n\nconst SelectTrigger = React.forwardRef<SelectTriggerElement, SelectTriggerProps>(\n ({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretSortIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\n\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollUpButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollUpButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollUpButton>;\ntype SelectScrollUpButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>;\n\nconst SelectScrollUpButton = React.forwardRef<SelectScrollUpButtonElement, SelectScrollUpButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n ),\n);\n\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectScrollDownButton\n * -------------------------------------------------------------------------- */\n\ntype SelectScrollDownButtonElement = React.ElementRef<typeof SelectPrimitive.ScrollDownButton>;\ntype SelectScrollDownButtonProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>;\n\nconst SelectScrollDownButton = React.forwardRef<SelectScrollDownButtonElement, SelectScrollDownButtonProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n ),\n);\n\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectContent\n * -------------------------------------------------------------------------- */\n\ntype SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;\ntype SelectContentProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>;\n\nconst SelectContent = React.forwardRef<SelectContentElement, SelectContentProps>(\n ({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n ),\n);\n\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectLabel\n * -------------------------------------------------------------------------- */\n\ntype SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;\ntype SelectLabelProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>;\n\nconst SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label ref={ref} className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)} {...props} />\n));\n\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectItem\n * -------------------------------------------------------------------------- */\n\ntype SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;\ntype SelectItemProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>;\n\nconst SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\n\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SelectSeparator\n * -------------------------------------------------------------------------- */\n\ntype SelectSeparatorElement = React.ElementRef<typeof SelectPrimitive.Separator>;\ntype SelectSeparatorProps = React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>;\n\nconst SelectSeparator = React.forwardRef<SelectSeparatorElement, SelectSeparatorProps>(\n ({ className, ...props }, ref) => (\n <SelectPrimitive.Separator ref={ref} className={cn(\"bg-muted -mx-1 my-1 h-px\", className)} {...props} />\n ),\n);\n\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n type SelectProps,\n type SelectGroupProps,\n type SelectValueProps,\n type SelectTriggerProps,\n type SelectContentProps,\n type SelectLabelProps,\n type SelectItemProps,\n type SelectSeparatorProps,\n type SelectScrollUpButtonProps,\n type SelectScrollDownButtonProps,\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
2
2
 
3
- var _chunkMDSPK3M6js = require('./chunk-MDSPK3M6.js');
3
+ var _chunkY3DZHPJ5js = require('./chunk-Y3DZHPJ5.js');
4
4
 
5
5
 
6
6
  var _chunkG3NP7M2Njs = require('./chunk-G3NP7M2N.js');
@@ -12,11 +12,7 @@ var _reactslot = require('@radix-ui/react-slot');
12
12
  var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');
13
13
  var _jsxruntime = require('react/jsx-runtime');
14
14
  var buttonVariants = _chunkG3NP7M2Njs.cva.call(void 0, {
15
- base: [
16
- "inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors",
17
- "disabled:pointer-events-none disabled:opacity-50",
18
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
19
- ],
15
+ base: "focus-visible:ring-ring inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
20
16
  variants: {
21
17
  variant: {
22
18
  default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow",
@@ -62,7 +58,7 @@ var Button = React.forwardRef(
62
58
  children: loading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ComponentLoading, { children: [
63
59
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "aria-hidden": true, className: "invisible contents", children }),
64
60
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden, { children }),
65
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMDSPK3M6js.Spinner, {}) })
61
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY3DZHPJ5js.Spinner, {}) })
66
62
  ] }) : children
67
63
  }
68
64
  );
@@ -74,4 +70,4 @@ Button.displayName = "Button";
74
70
 
75
71
 
76
72
  exports.buttonVariants = buttonVariants; exports.Button = Button;
77
- //# sourceMappingURL=chunk-BWCO2ZQQ.js.map
73
+ //# sourceMappingURL=chunk-TFYKPLNV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/button.tsx"],"names":[],"mappings":";;;;;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAErB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAmErB,SACE,KADF;AA3DV,IAAM,iBAAiB,IAAI;AAAA,EACzB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,aAAa;AAAA,MACb,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAcD,IAAM,SAAe;AAAA,EACnB,CAAC,EAAE,UAAU,WAAW,SAAS,MAAM,UAAU,OAAO,UAAU,OAAO,GAAG,MAAM,GAAG,QAAQ;AAC3F,UAAM,YAAY,UAAU,OAAO;AACnC,UAAM,mBAAmB,UAAU,SAAS;AAC5C,UAAM,WAAW,WAAW,MAAM;AAElC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAM,UAAU,SAAY;AAAA,QAC5B,WAAW,eAAe,EAAE,SAAS,MAAM,SAAS,UAAU,CAAC;AAAA,QAC9D,GAAG;AAAA,QACJ;AAAA,QAEC,oBACC,qBAAC,oBACC;AAAA,8BAAC,UAAK,eAAW,MAAC,WAAU,sBACzB,UACH;AAAA,UACA,oBAAC,kBAAgB,UAAS;AAAA,UAC1B,oBAAC,UAAK,WAAU,qDACd,8BAAC,WAAQ,GACX;AAAA,WACF,IAEA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc","sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps } from \"cva\";\nimport { Fragment } from \"react\";\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { Spinner } from \"./spinner\";\nimport { cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = cva({\n base: \"focus-visible:ring-ring inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90 shadow\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n outline: \"border-input bg-background hover:bg-accent hover:text-accent-foreground border shadow-sm\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm\",\n },\n size: {\n default: \"h-10 px-4\",\n xs: \"h-8 px-2\",\n sm: \"h-9 px-3\",\n lg: \"h-11 px-8\",\n icon: \"size-10\",\n \"icon-xs\": \"size-8\",\n \"icon-sm\": \"size-9\",\n \"icon-lg\": \"size-11\",\n },\n loading: {\n true: \"relative\",\n },\n },\n defaultVariants: {\n size: \"default\",\n variant: \"default\",\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n ({ children, className, variant, size, loading = false, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : \"button\";\n const ComponentLoading = asChild ? \"span\" : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n type={asChild ? undefined : \"button\"}\n className={buttonVariants({ variant, size, loading, className })}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = \"Button\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"]}
@@ -12,41 +12,22 @@ var DialogTrigger = DialogPrimitive.Trigger;
12
12
  var DialogClose = DialogPrimitive.Close;
13
13
  var DialogContent = React.forwardRef(
14
14
  ({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogPrimitive.Portal, { children: [
15
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16
- DialogPrimitive.Overlay,
17
- {
18
- className: _chunkG3NP7M2Njs.cn.call(void 0,
19
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80"
20
- )
21
- }
22
- ),
15
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogPrimitive.Overlay, { className: "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80" }),
23
16
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
24
17
  DialogPrimitive.Content,
25
18
  {
26
19
  ref,
27
20
  className: _chunkG3NP7M2Njs.cn.call(void 0,
28
- "bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/3 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/3 fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 focus:outline-none sm:rounded-lg",
21
+ "bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/3 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/3 animation-duration-200 fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 focus:outline-none sm:rounded-lg",
29
22
  className
30
23
  ),
31
24
  ...props,
32
25
  children: [
33
26
  children,
34
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
35
- DialogPrimitive.Close,
36
- {
37
- className: _chunkG3NP7M2Njs.cn.call(void 0,
38
- "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity",
39
- "hover:opacity-100",
40
- "disabled:pointer-events-none",
41
- "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
42
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
43
- ),
44
- children: [
45
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon, { className: "size-4" }),
46
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Close" })
47
- ]
48
- }
49
- )
27
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogPrimitive.Close, { className: "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground focus-visible:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none", children: [
28
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon, { className: "size-4" }),
29
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Close" })
30
+ ] })
50
31
  ]
51
32
  }
52
33
  )
@@ -83,4 +64,4 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
83
64
 
84
65
 
85
66
  exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogClose = DialogClose; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription;
86
- //# sourceMappingURL=chunk-IXEJO7ZP.js.map
67
+ //# sourceMappingURL=chunk-TH24V27M.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dialog.tsx"],"names":[],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SAAS,kBAAkB;AAkCrB,cAUE,YAVF;AA1BN,IAAM,SAAyB;AAO/B,IAAM,gBAAgC;AAOtC,IAAM,cAA8B;AASpC,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC,qBAAiB,wBAAhB,EACC;AAAA,wBAAiB,yBAAhB,EAAwB,WAAU,0JAAyJ;AAAA,IAC5L;AAAA,MAAiB;AAAA,MAAhB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,UACD,qBAAiB,uBAAhB,EAAsB,WAAU,0RAC/B;AAAA,gCAAC,cAAW,WAAU,UAAS;AAAA,YAC/B,oBAAC,UAAK,WAAU,WAAU,mBAAK;AAAA,aACjC;AAAA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,cAAc,cAA8B,wBAAQ;AAQpD,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AACnF,SAAO,oBAAC,SAAI,WAAW,GAAG,sDAAsD,SAAS,GAAI,GAAG,OAAO;AACzG;AAQA,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AACnF,SAAO,oBAAC,SAAI,WAAW,GAAG,iEAAiE,SAAS,GAAI,GAAG,OAAO;AACpH;AASA,IAAM,cAAoB,iBAAiD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACnG;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS;AAAA,IAC3E,GAAG;AAAA;AACN,CACD;AAED,YAAY,cAA8B,sBAAM;AAShD,IAAM,oBAA0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAiB,6BAAhB,EAA4B,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AAEjH;AAEA,kBAAkB,cAA8B,4BAAY","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross2Icon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;\nconst Dialog = DialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\nconst DialogClose = DialogPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ className, children, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className=\"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80\" />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/3 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/3 animation-duration-200 fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 focus:outline-none sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground focus-visible:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n ),\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\ntype DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element {\n return <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\ntype DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return <div className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\ntype DialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\ntype DialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n type DialogProps,\n type DialogTriggerProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogHeaderProps,\n type DialogFooterProps,\n type DialogTitleProps,\n type DialogDescriptionProps,\n};\n"]}
@@ -12,41 +12,22 @@ var DialogTrigger = DialogPrimitive.Trigger;
12
12
  var DialogClose = DialogPrimitive.Close;
13
13
  var DialogContent = React.forwardRef(
14
14
  ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
15
- /* @__PURE__ */ jsx(
16
- DialogPrimitive.Overlay,
17
- {
18
- className: cn(
19
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80"
20
- )
21
- }
22
- ),
15
+ /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80" }),
23
16
  /* @__PURE__ */ jsxs(
24
17
  DialogPrimitive.Content,
25
18
  {
26
19
  ref,
27
20
  className: cn(
28
- "bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/3 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/3 fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 focus:outline-none sm:rounded-lg",
21
+ "bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/3 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/3 animation-duration-200 fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 focus:outline-none sm:rounded-lg",
29
22
  className
30
23
  ),
31
24
  ...props,
32
25
  children: [
33
26
  children,
34
- /* @__PURE__ */ jsxs(
35
- DialogPrimitive.Close,
36
- {
37
- className: cn(
38
- "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity",
39
- "hover:opacity-100",
40
- "disabled:pointer-events-none",
41
- "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
42
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
43
- ),
44
- children: [
45
- /* @__PURE__ */ jsx(Cross2Icon, { className: "size-4" }),
46
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
47
- ]
48
- }
49
- )
27
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground focus-visible:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none", children: [
28
+ /* @__PURE__ */ jsx(Cross2Icon, { className: "size-4" }),
29
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
30
+ ] })
50
31
  ]
51
32
  }
52
33
  )
@@ -83,4 +64,4 @@ export {
83
64
  DialogTitle,
84
65
  DialogDescription
85
66
  };
86
- //# sourceMappingURL=chunk-XCKLBP2V.mjs.map
67
+ //# sourceMappingURL=chunk-TXRIFICH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { Cross2Icon } from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Dialog\n * -------------------------------------------------------------------------- */\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;\nconst Dialog = DialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\nconst DialogTrigger = DialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogClose\n * -------------------------------------------------------------------------- */\n\ntype DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;\nconst DialogClose = DialogPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogContent\n * -------------------------------------------------------------------------- */\n\ntype DialogContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ntype DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;\n\nconst DialogContent = React.forwardRef<DialogContentElement, DialogContentProps>(\n ({ className, children, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className=\"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80\" />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/3 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/3 animation-duration-200 fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 focus:outline-none sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground focus-visible:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n ),\n);\n\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogHeader\n * -------------------------------------------------------------------------- */\n\ntype DialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogHeader({ className, ...props }: DialogHeaderProps): React.JSX.Element {\n return <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogFooter\n * -------------------------------------------------------------------------- */\n\ntype DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DialogFooter({ className, ...props }: DialogFooterProps): React.JSX.Element {\n return <div className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogTitle\n * -------------------------------------------------------------------------- */\n\ntype DialogTitleElement = React.ElementRef<typeof DialogPrimitive.Title>;\ntype DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst DialogTitle = React.forwardRef<DialogTitleElement, DialogTitleProps>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\n\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DialogDescription\n * -------------------------------------------------------------------------- */\n\ntype DialogDescriptionElement = React.ElementRef<typeof DialogPrimitive.Description>;\ntype DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;\n\nconst DialogDescription = React.forwardRef<DialogDescriptionElement, DialogDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n ),\n);\n\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Dialog,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n type DialogProps,\n type DialogTriggerProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogHeaderProps,\n type DialogFooterProps,\n type DialogTitleProps,\n type DialogDescriptionProps,\n};\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SAAS,kBAAkB;AAkCrB,cAUE,YAVF;AA1BN,IAAM,SAAyB;AAO/B,IAAM,gBAAgC;AAOtC,IAAM,cAA8B;AASpC,IAAM,gBAAsB;AAAA,EAC1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAClC,qBAAiB,wBAAhB,EACC;AAAA,wBAAiB,yBAAhB,EAAwB,WAAU,0JAAyJ;AAAA,IAC5L;AAAA,MAAiB;AAAA,MAAhB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,UACD,qBAAiB,uBAAhB,EAAsB,WAAU,0RAC/B;AAAA,gCAAC,cAAW,WAAU,UAAS;AAAA,YAC/B,oBAAC,UAAK,WAAU,WAAU,mBAAK;AAAA,aACjC;AAAA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAEA,cAAc,cAA8B,wBAAQ;AAQpD,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AACnF,SAAO,oBAAC,SAAI,WAAW,GAAG,sDAAsD,SAAS,GAAI,GAAG,OAAO;AACzG;AAQA,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AACnF,SAAO,oBAAC,SAAI,WAAW,GAAG,iEAAiE,SAAS,GAAI,GAAG,OAAO;AACpH;AASA,IAAM,cAAoB,iBAAiD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACnG;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS;AAAA,IAC3E,GAAG;AAAA;AACN,CACD;AAED,YAAY,cAA8B,sBAAM;AAShD,IAAM,oBAA0B;AAAA,EAC9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAiB,6BAAhB,EAA4B,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AAEjH;AAEA,kBAAkB,cAA8B,4BAAY;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Spinner
3
- } from "./chunk-V2254PQL.mjs";
3
+ } from "./chunk-73S45XV3.mjs";
4
4
  import {
5
5
  cva
6
6
  } from "./chunk-UG3URV2Z.mjs";
@@ -12,11 +12,7 @@ import { Fragment } from "react";
12
12
  import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  var buttonVariants = cva({
15
- base: [
16
- "inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors",
17
- "disabled:pointer-events-none disabled:opacity-50",
18
- "focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
19
- ],
15
+ base: "focus-visible:ring-ring inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
20
16
  variants: {
21
17
  variant: {
22
18
  default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow",
@@ -74,4 +70,4 @@ export {
74
70
  buttonVariants,
75
71
  Button
76
72
  };
77
- //# sourceMappingURL=chunk-WFXEFJRB.mjs.map
73
+ //# sourceMappingURL=chunk-U6VR5RJ5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/button.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps } from \"cva\";\nimport { Fragment } from \"react\";\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { Spinner } from \"./spinner\";\nimport { cva } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Variant: Button\n * -------------------------------------------------------------------------- */\n\nconst buttonVariants = cva({\n base: \"focus-visible:ring-ring inline-flex select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90 shadow\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n outline: \"border-input bg-background hover:bg-accent hover:text-accent-foreground border shadow-sm\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm\",\n },\n size: {\n default: \"h-10 px-4\",\n xs: \"h-8 px-2\",\n sm: \"h-9 px-3\",\n lg: \"h-11 px-8\",\n icon: \"size-10\",\n \"icon-xs\": \"size-8\",\n \"icon-sm\": \"size-9\",\n \"icon-lg\": \"size-11\",\n },\n loading: {\n true: \"relative\",\n },\n },\n defaultVariants: {\n size: \"default\",\n variant: \"default\",\n loading: false,\n },\n});\n\ntype ButtonVariantsProps = VariantProps<typeof buttonVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Button\n * -------------------------------------------------------------------------- */\n\ntype ButtonElement = HTMLButtonElement;\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantsProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<ButtonElement, ButtonProps>(\n ({ children, className, variant, size, loading = false, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : \"button\";\n const ComponentLoading = asChild ? \"span\" : Fragment;\n const disabled = loading || props.disabled;\n\n return (\n <Component\n ref={ref}\n type={asChild ? undefined : \"button\"}\n className={buttonVariants({ variant, size, loading, className })}\n {...props}\n disabled={disabled}\n >\n {loading ? (\n <ComponentLoading>\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Spinner />\n </span>\n </ComponentLoading>\n ) : (\n children\n )}\n </Component>\n );\n },\n);\n\nButton.displayName = \"Button\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Button, buttonVariants, type ButtonProps, type ButtonVariantsProps };\n"],"mappings":";;;;;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AAErB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAmErB,SACE,KADF;AA3DV,IAAM,iBAAiB,IAAI;AAAA,EACzB,MAAM;AAAA,EACN,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,aAAa;AAAA,MACb,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW;AAAA,IACb;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAcD,IAAM,SAAe;AAAA,EACnB,CAAC,EAAE,UAAU,WAAW,SAAS,MAAM,UAAU,OAAO,UAAU,OAAO,GAAG,MAAM,GAAG,QAAQ;AAC3F,UAAM,YAAY,UAAU,OAAO;AACnC,UAAM,mBAAmB,UAAU,SAAS;AAC5C,UAAM,WAAW,WAAW,MAAM;AAElC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAM,UAAU,SAAY;AAAA,QAC5B,WAAW,eAAe,EAAE,SAAS,MAAM,SAAS,UAAU,CAAC;AAAA,QAC9D,GAAG;AAAA,QACJ;AAAA,QAEC,oBACC,qBAAC,oBACC;AAAA,8BAAC,UAAK,eAAW,MAAC,WAAU,sBACzB,UACH;AAAA,UACA,oBAAC,kBAAgB,UAAS;AAAA,UAC1B,oBAAC,UAAK,WAAU,qDACd,8BAAC,WAAQ,GACX;AAAA,WACF,IAEA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":[]}
@@ -21,10 +21,7 @@ var Spinner = React.forwardRef(
21
21
  children: Array.from({ length: spinnerCount }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
22
22
  "span",
23
23
  {
24
- className: _chunkG3NP7M2Njs.cn.call(void 0,
25
- "absolute h-full rotate-[var(--spinner-rotate)]",
26
- "before:fade-out-25 before:animate-out before:repeat-infinite before:block before:h-1/3 before:w-full before:rounded-full before:bg-current before:[animation-delay:var(--spinner-delay)] before:[animation-duration:var(--spinner-duration)]"
27
- ),
24
+ className: "before:fade-out-25 before:animate-out before:animation-repeat-infinite before:animation-delay-[var(--spinner-delay)] before:animation-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current",
28
25
  style: {
29
26
  width: `${(100 / spinnerCount).toString()}%`,
30
27
  "--spinner-delay": `-${((spinnerCount - i) * 100).toString()}ms`,
@@ -51,4 +48,4 @@ Spinner.displayName = "Spinner";
51
48
 
52
49
 
53
50
  exports.Spinner = Spinner;
54
- //# sourceMappingURL=chunk-MDSPK3M6.js.map
51
+ //# sourceMappingURL=chunk-Y3DZHPJ5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/spinner.tsx"],"names":[],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,sBAAsB;AA4BrB,cAqBJ,YArBI;AArBV,IAAM,eAAe;AAQrB,IAAM,UAAgB;AAAA,EACpB,CAAC,EAAE,WAAW,UAAU,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC1D,QAAI,CAAC,SAAS;AACZ,aAAO;AAAA,IACT;AAEA,UAAM,UACJ;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,+DAA+D,SAAS;AAAA,QACrF,GAAG;AAAA,QAEH,gBAAM,KAAK,EAAE,QAAQ,aAAa,GAAG,CAAC,GAAG,MACxC;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,OACE;AAAA,cACE,OAAO,IAAI,MAAM,cAAc,SAAS,CAAC;AAAA,cACzC,mBAAmB,MAAM,eAAe,KAAK,KAAK,SAAS,CAAC;AAAA,cAC5D,oBAAoB,IAAK,MAAM,eAAgB,GAAG,SAAS,CAAC;AAAA,cAC5D,sBAAsB,IAAI,eAAe,KAAK,SAAS,CAAC;AAAA,YAC1D;AAAA;AAAA,UARG;AAAA,QAUP,CACD;AAAA;AAAA,IACH;AAGF,QAAI,aAAa,QAAW;AAC1B,aAAO;AAAA,IACT;AAEA,WACE,qBAAC,UAAK,WAAU,YACd;AAAA,0BAAC,UAAK,eAAW,MAAC,WAAU,sBACzB,UACH;AAAA,MACA,oBAAC,kBAAgB,UAAS;AAAA,MAC1B,oBAAC,UAAK,WAAU,qDAAqD,mBAAQ;AAAA,OAC/E;AAAA,EAEJ;AACF;AAEA,QAAQ,cAAc","sourcesContent":["import * as React from \"react\";\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Spinner\n * -------------------------------------------------------------------------- */\n\nconst spinnerCount = 8;\n\ntype SpinnerElement = HTMLSpanElement;\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n loading?: boolean;\n}\n\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(\n ({ className, loading = true, children, ...props }, ref) => {\n if (!loading) {\n return children;\n }\n\n const spinner = (\n <span\n ref={ref}\n className={cn(\"relative flex size-4 items-center justify-center opacity-60\", className)}\n {...props}\n >\n {Array.from({ length: spinnerCount }, (_, i) => (\n <span\n key={i}\n className=\"before:fade-out-25 before:animate-out before:animation-repeat-infinite before:animation-delay-[var(--spinner-delay)] before:animation-duration-[var(--spinner-duration)] absolute h-full rotate-[var(--spinner-rotate)] before:block before:h-1/3 before:w-full before:rounded-full before:bg-current\"\n style={\n {\n width: `${(100 / spinnerCount).toString()}%`,\n \"--spinner-delay\": `-${((spinnerCount - i) * 100).toString()}ms`,\n \"--spinner-rotate\": `${((360 / spinnerCount) * i).toString()}deg`,\n \"--spinner-duration\": `${(spinnerCount * 100).toString()}ms`,\n } as React.CSSProperties\n }\n />\n ))}\n </span>\n );\n\n if (children === undefined) {\n return spinner;\n }\n\n return (\n <span className=\"relative\">\n <span aria-hidden className=\"invisible contents\">\n {children}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n <span className=\"absolute inset-0 flex items-center justify-center\">{spinner}</span>\n </span>\n );\n },\n);\n\nSpinner.displayName = \"Spinner\";\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Spinner, type SpinnerProps };\n"]}