@health-samurai/react-components 0.0.0-alpha.1 → 0.0.0-alpha.2

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 (217) hide show
  1. package/dist/bundle.css +100 -7
  2. package/dist/src/components/code-editor/index.js +53 -29
  3. package/dist/src/components/code-editor/index.js.map +1 -1
  4. package/dist/src/components/code-editor.stories.js +22 -7
  5. package/dist/src/components/code-editor.stories.js.map +1 -1
  6. package/dist/src/components/copy-icon.js +11 -4
  7. package/dist/src/components/copy-icon.js.map +1 -1
  8. package/dist/src/components/request-line-editor.js +56 -14
  9. package/dist/src/components/request-line-editor.js.map +1 -1
  10. package/dist/src/components/request-line-editor.stories.js +71 -22
  11. package/dist/src/components/request-line-editor.stories.js.map +1 -1
  12. package/dist/src/global.d.js +2 -0
  13. package/dist/src/global.d.js.map +1 -0
  14. package/dist/src/index.css +6 -0
  15. package/dist/src/index.d.ts +1 -0
  16. package/dist/src/index.d.ts.map +1 -1
  17. package/dist/src/index.js +52 -50
  18. package/dist/src/index.js.map +1 -1
  19. package/dist/src/index.stories.js +8 -5
  20. package/dist/src/index.stories.js.map +1 -1
  21. package/dist/src/shadcn/components/ui/accordion.js +34 -5
  22. package/dist/src/shadcn/components/ui/accordion.js.map +1 -1
  23. package/dist/src/shadcn/components/ui/accordion.stories.js +68 -3
  24. package/dist/src/shadcn/components/ui/accordion.stories.js.map +1 -1
  25. package/dist/src/shadcn/components/ui/alert-dialog.js +61 -14
  26. package/dist/src/shadcn/components/ui/alert-dialog.js.map +1 -1
  27. package/dist/src/shadcn/components/ui/alert-dialog.stories.js +39 -4
  28. package/dist/src/shadcn/components/ui/alert-dialog.stories.js.map +1 -1
  29. package/dist/src/shadcn/components/ui/alert.js +24 -8
  30. package/dist/src/shadcn/components/ui/alert.js.map +1 -1
  31. package/dist/src/shadcn/components/ui/alert.stories.js +57 -3
  32. package/dist/src/shadcn/components/ui/alert.stories.js.map +1 -1
  33. package/dist/src/shadcn/components/ui/aspect-ratio.js +5 -1
  34. package/dist/src/shadcn/components/ui/aspect-ratio.js.map +1 -1
  35. package/dist/src/shadcn/components/ui/aspect-ratio.stories.js +12 -3
  36. package/dist/src/shadcn/components/ui/aspect-ratio.stories.js.map +1 -1
  37. package/dist/src/shadcn/components/ui/avatar.js +17 -4
  38. package/dist/src/shadcn/components/ui/avatar.js.map +1 -1
  39. package/dist/src/shadcn/components/ui/avatar.stories.js +69 -3
  40. package/dist/src/shadcn/components/ui/avatar.stories.js.map +1 -1
  41. package/dist/src/shadcn/components/ui/badge.js +13 -6
  42. package/dist/src/shadcn/components/ui/badge.js.map +1 -1
  43. package/dist/src/shadcn/components/ui/badge.stories.js +55 -3
  44. package/dist/src/shadcn/components/ui/badge.stories.js.map +1 -1
  45. package/dist/src/shadcn/components/ui/breadcrumb.js +56 -11
  46. package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -1
  47. package/dist/src/shadcn/components/ui/breadcrumb.stories.js +69 -4
  48. package/dist/src/shadcn/components/ui/breadcrumb.stories.js.map +1 -1
  49. package/dist/src/shadcn/components/ui/button.js +23 -13
  50. package/dist/src/shadcn/components/ui/button.js.map +1 -1
  51. package/dist/src/shadcn/components/ui/button.stories.js +190 -10
  52. package/dist/src/shadcn/components/ui/button.stories.js.map +1 -1
  53. package/dist/src/shadcn/components/ui/calendar.js +75 -33
  54. package/dist/src/shadcn/components/ui/calendar.js.map +1 -1
  55. package/dist/src/shadcn/components/ui/calendar.stories.js +12 -5
  56. package/dist/src/shadcn/components/ui/calendar.stories.js.map +1 -1
  57. package/dist/src/shadcn/components/ui/card.js +38 -9
  58. package/dist/src/shadcn/components/ui/card.js.map +1 -1
  59. package/dist/src/shadcn/components/ui/card.stories.js +91 -6
  60. package/dist/src/shadcn/components/ui/card.stories.js.map +1 -1
  61. package/dist/src/shadcn/components/ui/carousel.js +99 -39
  62. package/dist/src/shadcn/components/ui/carousel.js.map +1 -1
  63. package/dist/src/shadcn/components/ui/carousel.stories.js +30 -6
  64. package/dist/src/shadcn/components/ui/carousel.stories.js.map +1 -1
  65. package/dist/src/shadcn/components/ui/chart.js +118 -55
  66. package/dist/src/shadcn/components/ui/chart.js.map +1 -1
  67. package/dist/src/shadcn/components/ui/chart.stories.js +72 -12
  68. package/dist/src/shadcn/components/ui/chart.stories.js.map +1 -1
  69. package/dist/src/shadcn/components/ui/checkbox.js +14 -2
  70. package/dist/src/shadcn/components/ui/checkbox.js.map +1 -1
  71. package/dist/src/shadcn/components/ui/checkbox.stories.js +79 -4
  72. package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -1
  73. package/dist/src/shadcn/components/ui/collapsible.js +13 -3
  74. package/dist/src/shadcn/components/ui/collapsible.js.map +1 -1
  75. package/dist/src/shadcn/components/ui/collapsible.stories.js +54 -6
  76. package/dist/src/shadcn/components/ui/collapsible.stories.js.map +1 -1
  77. package/dist/src/shadcn/components/ui/command.js +77 -12
  78. package/dist/src/shadcn/components/ui/command.js.map +1 -1
  79. package/dist/src/shadcn/components/ui/command.stories.js +88 -4
  80. package/dist/src/shadcn/components/ui/command.stories.js.map +1 -1
  81. package/dist/src/shadcn/components/ui/context-menu.js +106 -17
  82. package/dist/src/shadcn/components/ui/context-menu.js.map +1 -1
  83. package/dist/src/shadcn/components/ui/context-menu.stories.js +101 -3
  84. package/dist/src/shadcn/components/ui/context-menu.stories.js.map +1 -1
  85. package/dist/src/shadcn/components/ui/dialog.js +69 -12
  86. package/dist/src/shadcn/components/ui/dialog.js.map +1 -1
  87. package/dist/src/shadcn/components/ui/dialog.stories.js +82 -6
  88. package/dist/src/shadcn/components/ui/dialog.stories.js.map +1 -1
  89. package/dist/src/shadcn/components/ui/drawer.js +61 -12
  90. package/dist/src/shadcn/components/ui/drawer.js.map +1 -1
  91. package/dist/src/shadcn/components/ui/drawer.stories.js +154 -21
  92. package/dist/src/shadcn/components/ui/drawer.stories.js.map +1 -1
  93. package/dist/src/shadcn/components/ui/dropdown-menu.js +107 -17
  94. package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -1
  95. package/dist/src/shadcn/components/ui/dropdown-menu.stories.js +119 -4
  96. package/dist/src/shadcn/components/ui/dropdown-menu.stories.js.map +1 -1
  97. package/dist/src/shadcn/components/ui/form.js +58 -18
  98. package/dist/src/shadcn/components/ui/form.js.map +1 -1
  99. package/dist/src/shadcn/components/ui/form.stories.js +45 -11
  100. package/dist/src/shadcn/components/ui/form.stories.js.map +1 -1
  101. package/dist/src/shadcn/components/ui/hover-card.js +20 -4
  102. package/dist/src/shadcn/components/ui/hover-card.js.map +1 -1
  103. package/dist/src/shadcn/components/ui/hover-card.stories.js +51 -5
  104. package/dist/src/shadcn/components/ui/hover-card.stories.js.map +1 -1
  105. package/dist/src/shadcn/components/ui/input-otp.js +35 -7
  106. package/dist/src/shadcn/components/ui/input-otp.js.map +1 -1
  107. package/dist/src/shadcn/components/ui/input-otp.stories.js +35 -3
  108. package/dist/src/shadcn/components/ui/input-otp.stories.js.map +1 -1
  109. package/dist/src/shadcn/components/ui/input.js +59 -40
  110. package/dist/src/shadcn/components/ui/input.js.map +1 -1
  111. package/dist/src/shadcn/components/ui/input.stories.js +391 -23
  112. package/dist/src/shadcn/components/ui/input.stories.js.map +1 -1
  113. package/dist/src/shadcn/components/ui/label.js +7 -2
  114. package/dist/src/shadcn/components/ui/label.js.map +1 -1
  115. package/dist/src/shadcn/components/ui/label.stories.js +18 -4
  116. package/dist/src/shadcn/components/ui/label.stories.js.map +1 -1
  117. package/dist/src/shadcn/components/ui/menubar.js +116 -19
  118. package/dist/src/shadcn/components/ui/menubar.js.map +1 -1
  119. package/dist/src/shadcn/components/ui/menubar.stories.js +216 -3
  120. package/dist/src/shadcn/components/ui/menubar.stories.js.map +1 -1
  121. package/dist/src/shadcn/components/ui/navigation-menu.js +62 -10
  122. package/dist/src/shadcn/components/ui/navigation-menu.js.map +1 -1
  123. package/dist/src/shadcn/components/ui/navigation-menu.stories.js +263 -11
  124. package/dist/src/shadcn/components/ui/navigation-menu.stories.js.map +1 -1
  125. package/dist/src/shadcn/components/ui/pagination.js +73 -16
  126. package/dist/src/shadcn/components/ui/pagination.js.map +1 -1
  127. package/dist/src/shadcn/components/ui/pagination.stories.js +41 -3
  128. package/dist/src/shadcn/components/ui/pagination.stories.js.map +1 -1
  129. package/dist/src/shadcn/components/ui/popover.js +23 -5
  130. package/dist/src/shadcn/components/ui/popover.js.map +1 -1
  131. package/dist/src/shadcn/components/ui/popover.stories.js +99 -6
  132. package/dist/src/shadcn/components/ui/popover.stories.js.map +1 -1
  133. package/dist/src/shadcn/components/ui/progress.js +14 -2
  134. package/dist/src/shadcn/components/ui/progress.js.map +1 -1
  135. package/dist/src/shadcn/components/ui/progress.stories.js +12 -8
  136. package/dist/src/shadcn/components/ui/progress.stories.js.map +1 -1
  137. package/dist/src/shadcn/components/ui/radio-group.js +19 -3
  138. package/dist/src/shadcn/components/ui/radio-group.js.map +1 -1
  139. package/dist/src/shadcn/components/ui/radio-group.stories.js +48 -4
  140. package/dist/src/shadcn/components/ui/radio-group.stories.js.map +1 -1
  141. package/dist/src/shadcn/components/ui/resizable.js +22 -4
  142. package/dist/src/shadcn/components/ui/resizable.js.map +1 -1
  143. package/dist/src/shadcn/components/ui/resizable.stories.js +49 -3
  144. package/dist/src/shadcn/components/ui/resizable.stories.js.map +1 -1
  145. package/dist/src/shadcn/components/ui/scroll-area.js +26 -5
  146. package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -1
  147. package/dist/src/shadcn/components/ui/scroll-area.stories.js +30 -5
  148. package/dist/src/shadcn/components/ui/scroll-area.stories.js.map +1 -1
  149. package/dist/src/shadcn/components/ui/select.js +98 -19
  150. package/dist/src/shadcn/components/ui/select.js.map +1 -1
  151. package/dist/src/shadcn/components/ui/select.stories.js +84 -5
  152. package/dist/src/shadcn/components/ui/select.stories.js.map +1 -1
  153. package/dist/src/shadcn/components/ui/separator.js +9 -2
  154. package/dist/src/shadcn/components/ui/separator.js.map +1 -1
  155. package/dist/src/shadcn/components/ui/separator.stories.js +43 -3
  156. package/dist/src/shadcn/components/ui/separator.stories.js.map +1 -1
  157. package/dist/src/shadcn/components/ui/sheet.js +69 -16
  158. package/dist/src/shadcn/components/ui/sheet.js.map +1 -1
  159. package/dist/src/shadcn/components/ui/sheet.stories.js +77 -6
  160. package/dist/src/shadcn/components/ui/sheet.stories.js.map +1 -1
  161. package/dist/src/shadcn/components/ui/sidebar.js +304 -79
  162. package/dist/src/shadcn/components/ui/sidebar.js.map +1 -1
  163. package/dist/src/shadcn/components/ui/sidebar.stories.js +321 -59
  164. package/dist/src/shadcn/components/ui/sidebar.stories.js.map +1 -1
  165. package/dist/src/shadcn/components/ui/skeleton.js +7 -2
  166. package/dist/src/shadcn/components/ui/skeleton.js.map +1 -1
  167. package/dist/src/shadcn/components/ui/skeleton.stories.js +22 -3
  168. package/dist/src/shadcn/components/ui/skeleton.stories.js.map +1 -1
  169. package/dist/src/shadcn/components/ui/slider.js +40 -7
  170. package/dist/src/shadcn/components/ui/slider.js.map +1 -1
  171. package/dist/src/shadcn/components/ui/slider.stories.js +11 -3
  172. package/dist/src/shadcn/components/ui/slider.stories.js.map +1 -1
  173. package/dist/src/shadcn/components/ui/sonner.js +10 -4
  174. package/dist/src/shadcn/components/ui/sonner.js.map +1 -1
  175. package/dist/src/shadcn/components/ui/sonner.stories.js +14 -9
  176. package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -1
  177. package/dist/src/shadcn/components/ui/switch.js +11 -2
  178. package/dist/src/shadcn/components/ui/switch.js.map +1 -1
  179. package/dist/src/shadcn/components/ui/switch.stories.js +16 -4
  180. package/dist/src/shadcn/components/ui/switch.stories.js.map +1 -1
  181. package/dist/src/shadcn/components/ui/table.js +47 -10
  182. package/dist/src/shadcn/components/ui/table.js.map +1 -1
  183. package/dist/src/shadcn/components/ui/table.stories.js +72 -11
  184. package/dist/src/shadcn/components/ui/table.stories.js.map +1 -1
  185. package/dist/src/shadcn/components/ui/tabs.d.ts +9 -5
  186. package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -1
  187. package/dist/src/shadcn/components/ui/tabs.js +75 -18
  188. package/dist/src/shadcn/components/ui/tabs.js.map +1 -1
  189. package/dist/src/shadcn/components/ui/tabs.stories.d.ts +6 -0
  190. package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +1 -1
  191. package/dist/src/shadcn/components/ui/tabs.stories.js +221 -10
  192. package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -1
  193. package/dist/src/shadcn/components/ui/textarea.js +7 -2
  194. package/dist/src/shadcn/components/ui/textarea.js.map +1 -1
  195. package/dist/src/shadcn/components/ui/textarea.stories.js +6 -3
  196. package/dist/src/shadcn/components/ui/textarea.stories.js.map +1 -1
  197. package/dist/src/shadcn/components/ui/toggle-group.js +29 -8
  198. package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -1
  199. package/dist/src/shadcn/components/ui/toggle-group.stories.js +30 -3
  200. package/dist/src/shadcn/components/ui/toggle-group.stories.js.map +1 -1
  201. package/dist/src/shadcn/components/ui/toggle.js +16 -7
  202. package/dist/src/shadcn/components/ui/toggle.js.map +1 -1
  203. package/dist/src/shadcn/components/ui/toggle.stories.js +9 -3
  204. package/dist/src/shadcn/components/ui/toggle.stories.js.map +1 -1
  205. package/dist/src/shadcn/components/ui/tooltip.js +26 -5
  206. package/dist/src/shadcn/components/ui/tooltip.js.map +1 -1
  207. package/dist/src/shadcn/components/ui/tooltip.stories.js +20 -4
  208. package/dist/src/shadcn/components/ui/tooltip.stories.js.map +1 -1
  209. package/dist/src/shadcn/hooks/use-mobile.js +4 -3
  210. package/dist/src/shadcn/hooks/use-mobile.js.map +1 -1
  211. package/dist/src/shadcn/lib/utils.js +1 -0
  212. package/dist/src/shadcn/lib/utils.js.map +1 -1
  213. package/package.json +8 -4
  214. package/src/index.css +6 -0
  215. package/src/index.tsx +1 -0
  216. package/src/shadcn/components/ui/tabs.stories.tsx +57 -0
  217. package/src/shadcn/components/ui/tabs.tsx +76 -26
@@ -1,17 +1,35 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3
- import { cn } from "#shadcn/lib/utils";
3
+ import { cn } from "../../lib/utils.js";
4
4
  function Popover({ ...props }) {
5
- return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
5
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Root, {
6
+ "data-slot": "popover",
7
+ ...props
8
+ });
6
9
  }
7
10
  function PopoverTrigger({ ...props }) {
8
- return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
11
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Trigger, {
12
+ "data-slot": "popover-trigger",
13
+ ...props
14
+ });
9
15
  }
10
16
  function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
11
- return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className), ...props }) }));
17
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Portal, {
18
+ children: /*#__PURE__*/ _jsx(PopoverPrimitive.Content, {
19
+ "data-slot": "popover-content",
20
+ align: align,
21
+ sideOffset: sideOffset,
22
+ className: cn("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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
23
+ ...props
24
+ })
25
+ });
12
26
  }
13
27
  function PopoverAnchor({ ...props }) {
14
- return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
28
+ return /*#__PURE__*/ _jsx(PopoverPrimitive.Anchor, {
29
+ "data-slot": "popover-anchor",
30
+ ...props
31
+ });
15
32
  }
16
33
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
34
+
17
35
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAG5D,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,SAAS,OAAO,CAAC,EAChB,GAAG,KAAK,EAC4C;IACpD,OAAO,KAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,KAAK,KAAK,GAAI,CAAC;AACjE,CAAC;AAED,SAAS,cAAc,CAAC,EACvB,GAAG,KAAK,EAC+C;IACvD,OAAO,KAAC,gBAAgB,CAAC,OAAO,iBAAW,iBAAiB,KAAK,KAAK,GAAI,CAAC;AAC5E,CAAC;AAED,SAAS,cAAc,CAAC,EACvB,SAAS,EACT,KAAK,GAAG,QAAQ,EAChB,UAAU,GAAG,CAAC,EACd,GAAG,KAAK,EAC+C;IACvD,OAAO,CACN,KAAC,gBAAgB,CAAC,MAAM,cACvB,KAAC,gBAAgB,CAAC,OAAO,iBACd,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACZ,geAAge,EAChe,SAAS,CACT,KACG,KAAK,GACR,GACuB,CAC1B,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,EACtB,GAAG,KAAK,EAC8C;IACtD,OAAO,KAAC,gBAAgB,CAAC,MAAM,iBAAW,gBAAgB,KAAK,KAAK,GAAI,CAAC;AAC1E,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/popover.tsx"],"sourcesContent":["import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction Popover({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = \"center\",\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverAnchor({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["PopoverPrimitive","cn","Popover","props","Root","data-slot","PopoverTrigger","Trigger","PopoverContent","className","align","sideOffset","Portal","Content","PopoverAnchor","Anchor"],"mappings":";AAAA,YAAYA,sBAAsB,0BAA0B;AAG5D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,SAASC,QAAQ,EAChB,GAAGC,OACiD;IACpD,qBAAO,KAACH,iBAAiBI,IAAI;QAACC,aAAU;QAAW,GAAGF,KAAK;;AAC5D;AAEA,SAASG,eAAe,EACvB,GAAGH,OACoD;IACvD,qBAAO,KAACH,iBAAiBO,OAAO;QAACF,aAAU;QAAmB,GAAGF,KAAK;;AACvE;AAEA,SAASK,eAAe,EACvBC,SAAS,EACTC,QAAQ,QAAQ,EAChBC,aAAa,CAAC,EACd,GAAGR,OACoD;IACvD,qBACC,KAACH,iBAAiBY,MAAM;kBACvB,cAAA,KAACZ,iBAAiBa,OAAO;YACxBR,aAAU;YACVK,OAAOA;YACPC,YAAYA;YACZF,WAAWR,GACV,keACAQ;YAEA,GAAGN,KAAK;;;AAIb;AAEA,SAASW,cAAc,EACtB,GAAGX,OACmD;IACtD,qBAAO,KAACH,iBAAiBe,MAAM;QAACV,aAAU;QAAkB,GAAGF,KAAK;;AACrE;AAEA,SAASD,OAAO,EAAEI,cAAc,EAAEE,cAAc,EAAEM,aAAa,GAAG"}
@@ -1,13 +1,106 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button } from "#shadcn/components/ui/button";
3
- import { Input } from "#shadcn/components/ui/input";
4
- import { Label } from "#shadcn/components/ui/label";
5
- import { Popover, PopoverContent, PopoverTrigger, } from "#shadcn/components/ui/popover";
2
+ import { Button } from "./button.js";
3
+ import { Input } from "./input.js";
4
+ import { Label } from "./label.js";
5
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
6
6
  const meta = {
7
- title: "Component/Popover",
7
+ title: "Component/Popover"
8
8
  };
9
9
  export default meta;
10
10
  export const Demo = {
11
- render: () => (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(Button, { variant: "secondary", children: "Open popover" }) }), _jsx(PopoverContent, { className: "w-80", children: _jsxs("div", { className: "grid gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("h4", { className: "leading-none font-medium", children: "Dimensions" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Set the dimensions for the layer." })] }), _jsxs("div", { className: "grid gap-2", children: [_jsxs("div", { className: "grid grid-cols-3 items-center gap-4", children: [_jsx(Label, { htmlFor: "width", children: "Width" }), _jsx(Input, { id: "width", defaultValue: "100%", className: "col-span-2 h-8" })] }), _jsxs("div", { className: "grid grid-cols-3 items-center gap-4", children: [_jsx(Label, { htmlFor: "maxWidth", children: "Max. width" }), _jsx(Input, { id: "maxWidth", defaultValue: "300px", className: "col-span-2 h-8" })] }), _jsxs("div", { className: "grid grid-cols-3 items-center gap-4", children: [_jsx(Label, { htmlFor: "height", children: "Height" }), _jsx(Input, { id: "height", defaultValue: "25px", className: "col-span-2 h-8" })] }), _jsxs("div", { className: "grid grid-cols-3 items-center gap-4", children: [_jsx(Label, { htmlFor: "maxHeight", children: "Max. height" }), _jsx(Input, { id: "maxHeight", defaultValue: "none", className: "col-span-2 h-8" })] })] })] }) })] })),
11
+ render: ()=>/*#__PURE__*/ _jsxs(Popover, {
12
+ children: [
13
+ /*#__PURE__*/ _jsx(PopoverTrigger, {
14
+ asChild: true,
15
+ children: /*#__PURE__*/ _jsx(Button, {
16
+ variant: "secondary",
17
+ children: "Open popover"
18
+ })
19
+ }),
20
+ /*#__PURE__*/ _jsx(PopoverContent, {
21
+ className: "w-80",
22
+ children: /*#__PURE__*/ _jsxs("div", {
23
+ className: "grid gap-4",
24
+ children: [
25
+ /*#__PURE__*/ _jsxs("div", {
26
+ className: "space-y-2",
27
+ children: [
28
+ /*#__PURE__*/ _jsx("h4", {
29
+ className: "leading-none font-medium",
30
+ children: "Dimensions"
31
+ }),
32
+ /*#__PURE__*/ _jsx("p", {
33
+ className: "text-muted-foreground text-sm",
34
+ children: "Set the dimensions for the layer."
35
+ })
36
+ ]
37
+ }),
38
+ /*#__PURE__*/ _jsxs("div", {
39
+ className: "grid gap-2",
40
+ children: [
41
+ /*#__PURE__*/ _jsxs("div", {
42
+ className: "grid grid-cols-3 items-center gap-4",
43
+ children: [
44
+ /*#__PURE__*/ _jsx(Label, {
45
+ htmlFor: "width",
46
+ children: "Width"
47
+ }),
48
+ /*#__PURE__*/ _jsx(Input, {
49
+ id: "width",
50
+ defaultValue: "100%",
51
+ className: "col-span-2 h-8"
52
+ })
53
+ ]
54
+ }),
55
+ /*#__PURE__*/ _jsxs("div", {
56
+ className: "grid grid-cols-3 items-center gap-4",
57
+ children: [
58
+ /*#__PURE__*/ _jsx(Label, {
59
+ htmlFor: "maxWidth",
60
+ children: "Max. width"
61
+ }),
62
+ /*#__PURE__*/ _jsx(Input, {
63
+ id: "maxWidth",
64
+ defaultValue: "300px",
65
+ className: "col-span-2 h-8"
66
+ })
67
+ ]
68
+ }),
69
+ /*#__PURE__*/ _jsxs("div", {
70
+ className: "grid grid-cols-3 items-center gap-4",
71
+ children: [
72
+ /*#__PURE__*/ _jsx(Label, {
73
+ htmlFor: "height",
74
+ children: "Height"
75
+ }),
76
+ /*#__PURE__*/ _jsx(Input, {
77
+ id: "height",
78
+ defaultValue: "25px",
79
+ className: "col-span-2 h-8"
80
+ })
81
+ ]
82
+ }),
83
+ /*#__PURE__*/ _jsxs("div", {
84
+ className: "grid grid-cols-3 items-center gap-4",
85
+ children: [
86
+ /*#__PURE__*/ _jsx(Label, {
87
+ htmlFor: "maxHeight",
88
+ children: "Max. height"
89
+ }),
90
+ /*#__PURE__*/ _jsx(Input, {
91
+ id: "maxHeight",
92
+ defaultValue: "none",
93
+ className: "col-span-2 h-8"
94
+ })
95
+ ]
96
+ })
97
+ ]
98
+ })
99
+ ]
100
+ })
101
+ })
102
+ ]
103
+ })
12
104
  };
105
+
13
106
  //# sourceMappingURL=popover.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.stories.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/popover.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EACN,OAAO,EACP,cAAc,EACd,cAAc,GACd,MAAM,+BAA+B,CAAC;AAEvC,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,mBAAmB;CACX,CAAC;AACjB,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,IAAI,GAAG;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC,CACb,MAAC,OAAO,eACP,KAAC,cAAc,IAAC,OAAO,kBACtB,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,6BAAsB,GACjC,EACjB,KAAC,cAAc,IAAC,SAAS,EAAC,MAAM,YAC/B,eAAK,SAAS,EAAC,YAAY,aAC1B,eAAK,SAAS,EAAC,WAAW,aACzB,aAAI,SAAS,EAAC,0BAA0B,2BAAgB,EACxD,YAAG,SAAS,EAAC,+BAA+B,kDAExC,IACC,EACN,eAAK,SAAS,EAAC,YAAY,aAC1B,eAAK,SAAS,EAAC,qCAAqC,aACnD,KAAC,KAAK,IAAC,OAAO,EAAC,OAAO,sBAAc,EACpC,KAAC,KAAK,IACL,EAAE,EAAC,OAAO,EACV,YAAY,EAAC,MAAM,EACnB,SAAS,EAAC,gBAAgB,GACzB,IACG,EACN,eAAK,SAAS,EAAC,qCAAqC,aACnD,KAAC,KAAK,IAAC,OAAO,EAAC,UAAU,2BAAmB,EAC5C,KAAC,KAAK,IACL,EAAE,EAAC,UAAU,EACb,YAAY,EAAC,OAAO,EACpB,SAAS,EAAC,gBAAgB,GACzB,IACG,EACN,eAAK,SAAS,EAAC,qCAAqC,aACnD,KAAC,KAAK,IAAC,OAAO,EAAC,QAAQ,uBAAe,EACtC,KAAC,KAAK,IACL,EAAE,EAAC,QAAQ,EACX,YAAY,EAAC,MAAM,EACnB,SAAS,EAAC,gBAAgB,GACzB,IACG,EACN,eAAK,SAAS,EAAC,qCAAqC,aACnD,KAAC,KAAK,IAAC,OAAO,EAAC,WAAW,4BAAoB,EAC9C,KAAC,KAAK,IACL,EAAE,EAAC,WAAW,EACd,YAAY,EAAC,MAAM,EACnB,SAAS,EAAC,gBAAgB,GACzB,IACG,IACD,IACD,GACU,IACR,CACV;CACe,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/popover.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { Button } from \"#shadcn/components/ui/button\";\nimport { Input } from \"#shadcn/components/ui/input\";\nimport { Label } from \"#shadcn/components/ui/label\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"#shadcn/components/ui/popover\";\n\nconst meta = {\n\ttitle: \"Component/Popover\",\n} satisfies Meta;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Demo = {\n\trender: () => (\n\t\t<Popover>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button variant=\"secondary\">Open popover</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className=\"w-80\">\n\t\t\t\t<div className=\"grid gap-4\">\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t<h4 className=\"leading-none font-medium\">Dimensions</h4>\n\t\t\t\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\tSet the dimensions for the layer.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"grid gap-2\">\n\t\t\t\t\t\t<div className=\"grid grid-cols-3 items-center gap-4\">\n\t\t\t\t\t\t\t<Label htmlFor=\"width\">Width</Label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"width\"\n\t\t\t\t\t\t\t\tdefaultValue=\"100%\"\n\t\t\t\t\t\t\t\tclassName=\"col-span-2 h-8\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"grid grid-cols-3 items-center gap-4\">\n\t\t\t\t\t\t\t<Label htmlFor=\"maxWidth\">Max. width</Label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"maxWidth\"\n\t\t\t\t\t\t\t\tdefaultValue=\"300px\"\n\t\t\t\t\t\t\t\tclassName=\"col-span-2 h-8\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"grid grid-cols-3 items-center gap-4\">\n\t\t\t\t\t\t\t<Label htmlFor=\"height\">Height</Label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"height\"\n\t\t\t\t\t\t\t\tdefaultValue=\"25px\"\n\t\t\t\t\t\t\t\tclassName=\"col-span-2 h-8\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"grid grid-cols-3 items-center gap-4\">\n\t\t\t\t\t\t\t<Label htmlFor=\"maxHeight\">Max. height</Label>\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid=\"maxHeight\"\n\t\t\t\t\t\t\t\tdefaultValue=\"none\"\n\t\t\t\t\t\t\t\tclassName=\"col-span-2 h-8\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t),\n} satisfies Story;\n"],"names":["Button","Input","Label","Popover","PopoverContent","PopoverTrigger","meta","title","Demo","render","asChild","variant","className","div","h4","p","htmlFor","id","defaultValue"],"mappings":";AACA,SAASA,MAAM,QAAQ,cAA+B;AACtD,SAASC,KAAK,QAAQ,aAA8B;AACpD,SAASC,KAAK,QAAQ,aAA8B;AACpD,SACCC,OAAO,EACPC,cAAc,EACdC,cAAc,QACR,eAAgC;AAEvC,MAAMC,OAAO;IACZC,OAAO;AACR;AACA,eAAeD,KAAK;AAIpB,OAAO,MAAME,OAAO;IACnBC,QAAQ,kBACP,MAACN;;8BACA,KAACE;oBAAeK,OAAO;8BACtB,cAAA,KAACV;wBAAOW,SAAQ;kCAAY;;;8BAE7B,KAACP;oBAAeQ,WAAU;8BACzB,cAAA,MAACC;wBAAID,WAAU;;0CACd,MAACC;gCAAID,WAAU;;kDACd,KAACE;wCAAGF,WAAU;kDAA2B;;kDACzC,KAACG;wCAAEH,WAAU;kDAAgC;;;;0CAI9C,MAACC;gCAAID,WAAU;;kDACd,MAACC;wCAAID,WAAU;;0DACd,KAACV;gDAAMc,SAAQ;0DAAQ;;0DACvB,KAACf;gDACAgB,IAAG;gDACHC,cAAa;gDACbN,WAAU;;;;kDAGZ,MAACC;wCAAID,WAAU;;0DACd,KAACV;gDAAMc,SAAQ;0DAAW;;0DAC1B,KAACf;gDACAgB,IAAG;gDACHC,cAAa;gDACbN,WAAU;;;;kDAGZ,MAACC;wCAAID,WAAU;;0DACd,KAACV;gDAAMc,SAAQ;0DAAS;;0DACxB,KAACf;gDACAgB,IAAG;gDACHC,cAAa;gDACbN,WAAU;;;;kDAGZ,MAACC;wCAAID,WAAU;;0DACd,KAACV;gDAAMc,SAAQ;0DAAY;;0DAC3B,KAACf;gDACAgB,IAAG;gDACHC,cAAa;gDACbN,WAAU;;;;;;;;;;;AAQlB,EAAkB"}
@@ -1,8 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as ProgressPrimitive from "@radix-ui/react-progress";
3
- import { cn } from "#shadcn/lib/utils";
3
+ import { cn } from "../../lib/utils.js";
4
4
  function Progress({ className, value, ...props }) {
5
- return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "bg-primary h-full w-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
5
+ return /*#__PURE__*/ _jsx(ProgressPrimitive.Root, {
6
+ "data-slot": "progress",
7
+ className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
8
+ ...props,
9
+ children: /*#__PURE__*/ _jsx(ProgressPrimitive.Indicator, {
10
+ "data-slot": "progress-indicator",
11
+ className: "bg-primary h-full w-full flex-1 transition-all",
12
+ style: {
13
+ transform: `translateX(-${100 - (value || 0)}%)`
14
+ }
15
+ })
16
+ });
6
17
  }
7
18
  export { Progress };
19
+
8
20
  //# sourceMappingURL=progress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/progress.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAG9D,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,SAAS,QAAQ,CAAC,EACjB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EAC6C;IACrD,OAAO,CACN,KAAC,iBAAiB,CAAC,IAAI,iBACZ,UAAU,EACpB,SAAS,EAAE,EAAE,CACZ,gEAAgE,EAChE,SAAS,CACT,KACG,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,iBACjB,oBAAoB,EAC9B,SAAS,EAAC,gDAAgD,EAC1D,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,GAC1D,GACsB,CACzB,CAAC;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/progress.tsx"],"sourcesContent":["import * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction Progress({\n\tclassName,\n\tvalue,\n\t...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n\treturn (\n\t\t<ProgressPrimitive.Root\n\t\t\tdata-slot=\"progress\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ProgressPrimitive.Indicator\n\t\t\t\tdata-slot=\"progress-indicator\"\n\t\t\t\tclassName=\"bg-primary h-full w-full flex-1 transition-all\"\n\t\t\t\tstyle={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n\t\t\t/>\n\t\t</ProgressPrimitive.Root>\n\t);\n}\n\nexport { Progress };\n"],"names":["ProgressPrimitive","cn","Progress","className","value","props","Root","data-slot","Indicator","style","transform"],"mappings":";AAAA,YAAYA,uBAAuB,2BAA2B;AAG9D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,SAASC,SAAS,EACjBC,SAAS,EACTC,KAAK,EACL,GAAGC,OACkD;IACrD,qBACC,KAACL,kBAAkBM,IAAI;QACtBC,aAAU;QACVJ,WAAWF,GACV,kEACAE;QAEA,GAAGE,KAAK;kBAET,cAAA,KAACL,kBAAkBQ,SAAS;YAC3BD,aAAU;YACVJ,WAAU;YACVM,OAAO;gBAAEC,WAAW,CAAC,YAAY,EAAE,MAAON,CAAAA,SAAS,CAAA,EAAG,EAAE,CAAC;YAAC;;;AAI9D;AAEA,SAASF,QAAQ,GAAG"}
@@ -1,18 +1,22 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { Progress } from "#shadcn/components/ui/progress";
3
+ import { Progress } from "./progress.js";
4
4
  const meta = {
5
- title: "Component/Progress",
5
+ title: "Component/Progress"
6
6
  };
7
7
  export default meta;
8
8
  export const Demo = {
9
- render: () => {
9
+ render: ()=>{
10
10
  const [progress, setProgress] = React.useState(13);
11
- React.useEffect(() => {
12
- const timer = setTimeout(() => setProgress(66), 500);
13
- return () => clearTimeout(timer);
11
+ React.useEffect(()=>{
12
+ const timer = setTimeout(()=>setProgress(66), 500);
13
+ return ()=>clearTimeout(timer);
14
14
  }, []);
15
- return _jsx(Progress, { value: progress, className: "w-[60%]" });
16
- },
15
+ return /*#__PURE__*/ _jsx(Progress, {
16
+ value: progress,
17
+ className: "w-[60%]"
18
+ });
19
+ }
17
20
  };
21
+
18
22
  //# sourceMappingURL=progress.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.stories.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/progress.stories.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,oBAAoB;CACZ,CAAC;AACjB,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,IAAI,GAAG;IACnB,MAAM,EAAE,GAAG,EAAE;QACZ,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACpB,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;YACrD,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAC,SAAS,GAAG,CAAC;IAC1D,CAAC;CACe,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/progress.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport * as React from \"react\";\nimport { Progress } from \"#shadcn/components/ui/progress\";\n\nconst meta = {\n\ttitle: \"Component/Progress\",\n} satisfies Meta;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Demo = {\n\trender: () => {\n\t\tconst [progress, setProgress] = React.useState(13);\n\n\t\tReact.useEffect(() => {\n\t\t\tconst timer = setTimeout(() => setProgress(66), 500);\n\t\t\treturn () => clearTimeout(timer);\n\t\t}, []);\n\n\t\treturn <Progress value={progress} className=\"w-[60%]\" />;\n\t},\n} satisfies Story;\n"],"names":["React","Progress","meta","title","Demo","render","progress","setProgress","useState","useEffect","timer","setTimeout","clearTimeout","value","className"],"mappings":";AACA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,QAAQ,QAAQ,gBAAiC;AAE1D,MAAMC,OAAO;IACZC,OAAO;AACR;AACA,eAAeD,KAAK;AAIpB,OAAO,MAAME,OAAO;IACnBC,QAAQ;QACP,MAAM,CAACC,UAAUC,YAAY,GAAGP,MAAMQ,QAAQ,CAAC;QAE/CR,MAAMS,SAAS,CAAC;YACf,MAAMC,QAAQC,WAAW,IAAMJ,YAAY,KAAK;YAChD,OAAO,IAAMK,aAAaF;QAC3B,GAAG,EAAE;QAEL,qBAAO,KAACT;YAASY,OAAOP;YAAUQ,WAAU;;IAC7C;AACD,EAAkB"}
@@ -1,12 +1,28 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
3
  import { CircleIcon } from "lucide-react";
4
- import { cn } from "#shadcn/lib/utils";
4
+ import { cn } from "../../lib/utils.js";
5
5
  function RadioGroup({ className, ...props }) {
6
- return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn("grid gap-3", className), ...props }));
6
+ return /*#__PURE__*/ _jsx(RadioGroupPrimitive.Root, {
7
+ "data-slot": "radio-group",
8
+ className: cn("grid gap-3", className),
9
+ ...props
10
+ });
7
11
  }
8
12
  function RadioGroupItem({ className, ...props }) {
9
- return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "radio-group-item", className: cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "relative flex items-center justify-center", children: _jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" }) }) }));
13
+ return /*#__PURE__*/ _jsx(RadioGroupPrimitive.Item, {
14
+ "data-slot": "radio-group-item",
15
+ className: cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
16
+ ...props,
17
+ children: /*#__PURE__*/ _jsx(RadioGroupPrimitive.Indicator, {
18
+ "data-slot": "radio-group-indicator",
19
+ className: "relative flex items-center justify-center",
20
+ children: /*#__PURE__*/ _jsx(CircleIcon, {
21
+ className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"
22
+ })
23
+ })
24
+ });
10
25
  }
11
26
  export { RadioGroup, RadioGroupItem };
27
+
12
28
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,SAAS,UAAU,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EAC+C;IACvD,OAAO,CACN,KAAC,mBAAmB,CAAC,IAAI,iBACd,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,KAClC,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EAC+C;IACvD,OAAO,CACN,KAAC,mBAAmB,CAAC,IAAI,iBACd,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CACZ,wXAAwX,EACxX,SAAS,CACT,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,SAAS,iBACnB,uBAAuB,EACjC,SAAS,EAAC,2CAA2C,YAErD,KAAC,UAAU,IAAC,SAAS,EAAC,iFAAiF,GAAG,GAC3E,GACN,CAC3B,CAAC;AACH,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/radio-group.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { CircleIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction RadioGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tdata-slot=\"radio-group\"\n\t\t\tclassName={cn(\"grid gap-3\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction RadioGroupItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tdata-slot=\"radio-group-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator\n\t\t\t\tdata-slot=\"radio-group-indicator\"\n\t\t\t\tclassName=\"relative flex items-center justify-center\"\n\t\t\t>\n\t\t\t\t<CircleIcon className=\"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n}\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroupPrimitive","CircleIcon","cn","RadioGroup","className","props","Root","data-slot","RadioGroupItem","Item","Indicator"],"mappings":";AAAA,YAAYA,yBAAyB,8BAA8B;AACnE,SAASC,UAAU,QAAQ,eAAe;AAG1C,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,SAASC,WAAW,EACnBC,SAAS,EACT,GAAGC,OACoD;IACvD,qBACC,KAACL,oBAAoBM,IAAI;QACxBC,aAAU;QACVH,WAAWF,GAAG,cAAcE;QAC3B,GAAGC,KAAK;;AAGZ;AAEA,SAASG,eAAe,EACvBJ,SAAS,EACT,GAAGC,OACoD;IACvD,qBACC,KAACL,oBAAoBS,IAAI;QACxBF,aAAU;QACVH,WAAWF,GACV,0XACAE;QAEA,GAAGC,KAAK;kBAET,cAAA,KAACL,oBAAoBU,SAAS;YAC7BH,aAAU;YACVH,WAAU;sBAEV,cAAA,KAACH;gBAAWG,WAAU;;;;AAI1B;AAEA,SAASD,UAAU,EAAEK,cAAc,GAAG"}
@@ -1,11 +1,55 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Label } from "#shadcn/components/ui/label";
3
- import { RadioGroup, RadioGroupItem } from "#shadcn/components/ui/radio-group";
2
+ import { Label } from "./label.js";
3
+ import { RadioGroup, RadioGroupItem } from "./radio-group.js";
4
4
  const meta = {
5
- title: "Component/Radio group",
5
+ title: "Component/Radio group"
6
6
  };
7
7
  export default meta;
8
8
  export const Demo = {
9
- render: () => (_jsxs(RadioGroup, { defaultValue: "comfortable", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(RadioGroupItem, { value: "default", id: "r1" }), _jsx(Label, { htmlFor: "r1", children: "Default" })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(RadioGroupItem, { value: "comfortable", id: "r2" }), _jsx(Label, { htmlFor: "r2", children: "Comfortable" })] }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(RadioGroupItem, { value: "compact", id: "r3" }), _jsx(Label, { htmlFor: "r3", children: "Compact" })] })] })),
9
+ render: ()=>/*#__PURE__*/ _jsxs(RadioGroup, {
10
+ defaultValue: "comfortable",
11
+ children: [
12
+ /*#__PURE__*/ _jsxs("div", {
13
+ className: "flex items-center gap-3",
14
+ children: [
15
+ /*#__PURE__*/ _jsx(RadioGroupItem, {
16
+ value: "default",
17
+ id: "r1"
18
+ }),
19
+ /*#__PURE__*/ _jsx(Label, {
20
+ htmlFor: "r1",
21
+ children: "Default"
22
+ })
23
+ ]
24
+ }),
25
+ /*#__PURE__*/ _jsxs("div", {
26
+ className: "flex items-center gap-3",
27
+ children: [
28
+ /*#__PURE__*/ _jsx(RadioGroupItem, {
29
+ value: "comfortable",
30
+ id: "r2"
31
+ }),
32
+ /*#__PURE__*/ _jsx(Label, {
33
+ htmlFor: "r2",
34
+ children: "Comfortable"
35
+ })
36
+ ]
37
+ }),
38
+ /*#__PURE__*/ _jsxs("div", {
39
+ className: "flex items-center gap-3",
40
+ children: [
41
+ /*#__PURE__*/ _jsx(RadioGroupItem, {
42
+ value: "compact",
43
+ id: "r3"
44
+ }),
45
+ /*#__PURE__*/ _jsx(Label, {
46
+ htmlFor: "r3",
47
+ children: "Compact"
48
+ })
49
+ ]
50
+ })
51
+ ]
52
+ })
10
53
  };
54
+
11
55
  //# sourceMappingURL=radio-group.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.stories.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/radio-group.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAE/E,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,uBAAuB;CACf,CAAC;AACjB,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,IAAI,GAAG;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC,CACb,MAAC,UAAU,IAAC,YAAY,EAAC,aAAa,aACrC,eAAK,SAAS,EAAC,yBAAyB,aACvC,KAAC,cAAc,IAAC,KAAK,EAAC,SAAS,EAAC,EAAE,EAAC,IAAI,GAAG,EAC1C,KAAC,KAAK,IAAC,OAAO,EAAC,IAAI,wBAAgB,IAC9B,EACN,eAAK,SAAS,EAAC,yBAAyB,aACvC,KAAC,cAAc,IAAC,KAAK,EAAC,aAAa,EAAC,EAAE,EAAC,IAAI,GAAG,EAC9C,KAAC,KAAK,IAAC,OAAO,EAAC,IAAI,4BAAoB,IAClC,EACN,eAAK,SAAS,EAAC,yBAAyB,aACvC,KAAC,cAAc,IAAC,KAAK,EAAC,SAAS,EAAC,EAAE,EAAC,IAAI,GAAG,EAC1C,KAAC,KAAK,IAAC,OAAO,EAAC,IAAI,wBAAgB,IAC9B,IACM,CACb;CACe,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/radio-group.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport { Label } from \"#shadcn/components/ui/label\";\nimport { RadioGroup, RadioGroupItem } from \"#shadcn/components/ui/radio-group\";\n\nconst meta = {\n\ttitle: \"Component/Radio group\",\n} satisfies Meta;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Demo = {\n\trender: () => (\n\t\t<RadioGroup defaultValue=\"comfortable\">\n\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t<RadioGroupItem value=\"default\" id=\"r1\" />\n\t\t\t\t<Label htmlFor=\"r1\">Default</Label>\n\t\t\t</div>\n\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t<RadioGroupItem value=\"comfortable\" id=\"r2\" />\n\t\t\t\t<Label htmlFor=\"r2\">Comfortable</Label>\n\t\t\t</div>\n\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t<RadioGroupItem value=\"compact\" id=\"r3\" />\n\t\t\t\t<Label htmlFor=\"r3\">Compact</Label>\n\t\t\t</div>\n\t\t</RadioGroup>\n\t),\n} satisfies Story;\n"],"names":["Label","RadioGroup","RadioGroupItem","meta","title","Demo","render","defaultValue","div","className","value","id","htmlFor"],"mappings":";AACA,SAASA,KAAK,QAAQ,aAA8B;AACpD,SAASC,UAAU,EAAEC,cAAc,QAAQ,mBAAoC;AAE/E,MAAMC,OAAO;IACZC,OAAO;AACR;AACA,eAAeD,KAAK;AAIpB,OAAO,MAAME,OAAO;IACnBC,QAAQ,kBACP,MAACL;YAAWM,cAAa;;8BACxB,MAACC;oBAAIC,WAAU;;sCACd,KAACP;4BAAeQ,OAAM;4BAAUC,IAAG;;sCACnC,KAACX;4BAAMY,SAAQ;sCAAK;;;;8BAErB,MAACJ;oBAAIC,WAAU;;sCACd,KAACP;4BAAeQ,OAAM;4BAAcC,IAAG;;sCACvC,KAACX;4BAAMY,SAAQ;sCAAK;;;;8BAErB,MAACJ;oBAAIC,WAAU;;sCACd,KAACP;4BAAeQ,OAAM;4BAAUC,IAAG;;sCACnC,KAACX;4BAAMY,SAAQ;sCAAK;;;;;;AAIxB,EAAkB"}
@@ -1,15 +1,33 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { GripVerticalIcon } from "lucide-react";
3
3
  import * as ResizablePrimitive from "react-resizable-panels";
4
- import { cn } from "#shadcn/lib/utils";
4
+ import { cn } from "../../lib/utils.js";
5
5
  function ResizablePanelGroup({ className, ...props }) {
6
- return (_jsx(ResizablePrimitive.PanelGroup, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className), ...props }));
6
+ return /*#__PURE__*/ _jsx(ResizablePrimitive.PanelGroup, {
7
+ "data-slot": "resizable-panel-group",
8
+ className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
9
+ ...props
10
+ });
7
11
  }
8
12
  function ResizablePanel({ ...props }) {
9
- return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
13
+ return /*#__PURE__*/ _jsx(ResizablePrimitive.Panel, {
14
+ "data-slot": "resizable-panel",
15
+ ...props
16
+ });
10
17
  }
11
18
  function ResizableHandle({ withHandle, className, ...props }) {
12
- return (_jsx(ResizablePrimitive.PanelResizeHandle, { "data-slot": "resizable-handle", className: cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90", className), ...props, children: withHandle && (_jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: _jsx(GripVerticalIcon, { className: "size-2.5" }) })) }));
19
+ return /*#__PURE__*/ _jsx(ResizablePrimitive.PanelResizeHandle, {
20
+ "data-slot": "resizable-handle",
21
+ className: cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90", className),
22
+ ...props,
23
+ children: withHandle && /*#__PURE__*/ _jsx("div", {
24
+ className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
25
+ children: /*#__PURE__*/ _jsx(GripVerticalIcon, {
26
+ className: "size-2.5"
27
+ })
28
+ })
29
+ });
13
30
  }
14
31
  export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
32
+
15
33
  //# sourceMappingURL=resizable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/resizable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,SAAS,mBAAmB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACoD;IAC5D,OAAO,CACN,KAAC,kBAAkB,CAAC,UAAU,iBACnB,uBAAuB,EACjC,SAAS,EAAE,EAAE,CACZ,mEAAmE,EACnE,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,EACvB,GAAG,KAAK,EAC+C;IACvD,OAAO,KAAC,kBAAkB,CAAC,KAAK,iBAAW,iBAAiB,KAAK,KAAK,GAAI,CAAC;AAC5E,CAAC;AAED,SAAS,eAAe,CAAC,EACxB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EAGR;IACA,OAAO,CACN,KAAC,kBAAkB,CAAC,iBAAiB,iBAC1B,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CACZ,2oBAA2oB,EAC3oB,SAAS,CACT,KACG,KAAK,YAER,UAAU,IAAI,CACd,cAAK,SAAS,EAAC,2EAA2E,YACzF,KAAC,gBAAgB,IAAC,SAAS,EAAC,UAAU,GAAG,GACpC,CACN,GACqC,CACvC,CAAC;AACH,CAAC;AAED,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/resizable.tsx"],"sourcesContent":["import { GripVerticalIcon } from \"lucide-react\";\nimport type * as React from \"react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction ResizablePanelGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n\treturn (\n\t\t<ResizablePrimitive.PanelGroup\n\t\t\tdata-slot=\"resizable-panel-group\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ResizablePanel({\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n\treturn <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) {\n\treturn (\n\t\t<ResizablePrimitive.PanelResizeHandle\n\t\t\tdata-slot=\"resizable-handle\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{withHandle && (\n\t\t\t\t<div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border\">\n\t\t\t\t\t<GripVerticalIcon className=\"size-2.5\" />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</ResizablePrimitive.PanelResizeHandle>\n\t);\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"],"names":["GripVerticalIcon","ResizablePrimitive","cn","ResizablePanelGroup","className","props","PanelGroup","data-slot","ResizablePanel","Panel","ResizableHandle","withHandle","PanelResizeHandle","div"],"mappings":";AAAA,SAASA,gBAAgB,QAAQ,eAAe;AAEhD,YAAYC,wBAAwB,yBAAyB;AAE7D,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,SAASC,oBAAoB,EAC5BC,SAAS,EACT,GAAGC,OACyD;IAC5D,qBACC,KAACJ,mBAAmBK,UAAU;QAC7BC,aAAU;QACVH,WAAWF,GACV,qEACAE;QAEA,GAAGC,KAAK;;AAGZ;AAEA,SAASG,eAAe,EACvB,GAAGH,OACoD;IACvD,qBAAO,KAACJ,mBAAmBQ,KAAK;QAACF,aAAU;QAAmB,GAAGF,KAAK;;AACvE;AAEA,SAASK,gBAAgB,EACxBC,UAAU,EACVP,SAAS,EACT,GAAGC,OAGH;IACA,qBACC,KAACJ,mBAAmBW,iBAAiB;QACpCL,aAAU;QACVH,WAAWF,GACV,6oBACAE;QAEA,GAAGC,KAAK;kBAERM,4BACA,KAACE;YAAIT,WAAU;sBACd,cAAA,KAACJ;gBAAiBI,WAAU;;;;AAKjC;AAEA,SAASD,mBAAmB,EAAEK,cAAc,EAAEE,eAAe,GAAG"}
@@ -1,10 +1,56 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "#shadcn/components/ui/resizable";
2
+ import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./resizable.js";
3
3
  const meta = {
4
- title: "Component/Resizable",
4
+ title: "Component/Resizable"
5
5
  };
6
6
  export default meta;
7
7
  export const Demo = {
8
- render: () => (_jsxs(ResizablePanelGroup, { direction: "horizontal", className: "max-w-md rounded-lg border md:min-w-[450px]", children: [_jsx(ResizablePanel, { defaultSize: 50, children: _jsx("div", { className: "flex h-[200px] items-center justify-center p-6", children: _jsx("span", { className: "font-semibold", children: "One" }) }) }), _jsx(ResizableHandle, {}), _jsx(ResizablePanel, { defaultSize: 50, children: _jsxs(ResizablePanelGroup, { direction: "vertical", children: [_jsx(ResizablePanel, { defaultSize: 25, children: _jsx("div", { className: "flex h-full items-center justify-center p-6", children: _jsx("span", { className: "font-semibold", children: "Two" }) }) }), _jsx(ResizableHandle, {}), _jsx(ResizablePanel, { defaultSize: 75, children: _jsx("div", { className: "flex h-full items-center justify-center p-6", children: _jsx("span", { className: "font-semibold", children: "Three" }) }) })] }) })] })),
8
+ render: ()=>/*#__PURE__*/ _jsxs(ResizablePanelGroup, {
9
+ direction: "horizontal",
10
+ className: "max-w-md rounded-lg border md:min-w-[450px]",
11
+ children: [
12
+ /*#__PURE__*/ _jsx(ResizablePanel, {
13
+ defaultSize: 50,
14
+ children: /*#__PURE__*/ _jsx("div", {
15
+ className: "flex h-[200px] items-center justify-center p-6",
16
+ children: /*#__PURE__*/ _jsx("span", {
17
+ className: "font-semibold",
18
+ children: "One"
19
+ })
20
+ })
21
+ }),
22
+ /*#__PURE__*/ _jsx(ResizableHandle, {}),
23
+ /*#__PURE__*/ _jsx(ResizablePanel, {
24
+ defaultSize: 50,
25
+ children: /*#__PURE__*/ _jsxs(ResizablePanelGroup, {
26
+ direction: "vertical",
27
+ children: [
28
+ /*#__PURE__*/ _jsx(ResizablePanel, {
29
+ defaultSize: 25,
30
+ children: /*#__PURE__*/ _jsx("div", {
31
+ className: "flex h-full items-center justify-center p-6",
32
+ children: /*#__PURE__*/ _jsx("span", {
33
+ className: "font-semibold",
34
+ children: "Two"
35
+ })
36
+ })
37
+ }),
38
+ /*#__PURE__*/ _jsx(ResizableHandle, {}),
39
+ /*#__PURE__*/ _jsx(ResizablePanel, {
40
+ defaultSize: 75,
41
+ children: /*#__PURE__*/ _jsx("div", {
42
+ className: "flex h-full items-center justify-center p-6",
43
+ children: /*#__PURE__*/ _jsx("span", {
44
+ className: "font-semibold",
45
+ children: "Three"
46
+ })
47
+ })
48
+ })
49
+ ]
50
+ })
51
+ })
52
+ ]
53
+ })
9
54
  };
55
+
10
56
  //# sourceMappingURL=resizable.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.stories.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/resizable.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACN,eAAe,EACf,cAAc,EACd,mBAAmB,GACnB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,IAAI,GAAG;IACZ,KAAK,EAAE,qBAAqB;CACb,CAAC;AACjB,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,IAAI,GAAG;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC,CACb,MAAC,mBAAmB,IACnB,SAAS,EAAC,YAAY,EACtB,SAAS,EAAC,6CAA6C,aAEvD,KAAC,cAAc,IAAC,WAAW,EAAE,EAAE,YAC9B,cAAK,SAAS,EAAC,gDAAgD,YAC9D,eAAM,SAAS,EAAC,eAAe,oBAAW,GACrC,GACU,EACjB,KAAC,eAAe,KAAG,EACnB,KAAC,cAAc,IAAC,WAAW,EAAE,EAAE,YAC9B,MAAC,mBAAmB,IAAC,SAAS,EAAC,UAAU,aACxC,KAAC,cAAc,IAAC,WAAW,EAAE,EAAE,YAC9B,cAAK,SAAS,EAAC,6CAA6C,YAC3D,eAAM,SAAS,EAAC,eAAe,oBAAW,GACrC,GACU,EACjB,KAAC,eAAe,KAAG,EACnB,KAAC,cAAc,IAAC,WAAW,EAAE,EAAE,YAC9B,cAAK,SAAS,EAAC,6CAA6C,YAC3D,eAAM,SAAS,EAAC,eAAe,sBAAa,GACvC,GACU,IACI,GACN,IACI,CACtB;CACe,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/resizable.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react-vite\";\nimport {\n\tResizableHandle,\n\tResizablePanel,\n\tResizablePanelGroup,\n} from \"#shadcn/components/ui/resizable\";\n\nconst meta = {\n\ttitle: \"Component/Resizable\",\n} satisfies Meta;\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Demo = {\n\trender: () => (\n\t\t<ResizablePanelGroup\n\t\t\tdirection=\"horizontal\"\n\t\t\tclassName=\"max-w-md rounded-lg border md:min-w-[450px]\"\n\t\t>\n\t\t\t<ResizablePanel defaultSize={50}>\n\t\t\t\t<div className=\"flex h-[200px] items-center justify-center p-6\">\n\t\t\t\t\t<span className=\"font-semibold\">One</span>\n\t\t\t\t</div>\n\t\t\t</ResizablePanel>\n\t\t\t<ResizableHandle />\n\t\t\t<ResizablePanel defaultSize={50}>\n\t\t\t\t<ResizablePanelGroup direction=\"vertical\">\n\t\t\t\t\t<ResizablePanel defaultSize={25}>\n\t\t\t\t\t\t<div className=\"flex h-full items-center justify-center p-6\">\n\t\t\t\t\t\t\t<span className=\"font-semibold\">Two</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ResizablePanel>\n\t\t\t\t\t<ResizableHandle />\n\t\t\t\t\t<ResizablePanel defaultSize={75}>\n\t\t\t\t\t\t<div className=\"flex h-full items-center justify-center p-6\">\n\t\t\t\t\t\t\t<span className=\"font-semibold\">Three</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</ResizablePanel>\n\t\t\t\t</ResizablePanelGroup>\n\t\t\t</ResizablePanel>\n\t\t</ResizablePanelGroup>\n\t),\n} satisfies Story;\n"],"names":["ResizableHandle","ResizablePanel","ResizablePanelGroup","meta","title","Demo","render","direction","className","defaultSize","div","span"],"mappings":";AACA,SACCA,eAAe,EACfC,cAAc,EACdC,mBAAmB,QACb,iBAAkC;AAEzC,MAAMC,OAAO;IACZC,OAAO;AACR;AACA,eAAeD,KAAK;AAIpB,OAAO,MAAME,OAAO;IACnBC,QAAQ,kBACP,MAACJ;YACAK,WAAU;YACVC,WAAU;;8BAEV,KAACP;oBAAeQ,aAAa;8BAC5B,cAAA,KAACC;wBAAIF,WAAU;kCACd,cAAA,KAACG;4BAAKH,WAAU;sCAAgB;;;;8BAGlC,KAACR;8BACD,KAACC;oBAAeQ,aAAa;8BAC5B,cAAA,MAACP;wBAAoBK,WAAU;;0CAC9B,KAACN;gCAAeQ,aAAa;0CAC5B,cAAA,KAACC;oCAAIF,WAAU;8CACd,cAAA,KAACG;wCAAKH,WAAU;kDAAgB;;;;0CAGlC,KAACR;0CACD,KAACC;gCAAeQ,aAAa;0CAC5B,cAAA,KAACC;oCAAIF,WAAU;8CACd,cAAA,KAACG;wCAAKH,WAAU;kDAAgB;;;;;;;;;AAOvC,EAAkB"}
@@ -1,13 +1,34 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
3
- import { cn } from "#shadcn/lib/utils";
3
+ import { cn } from "../../lib/utils.js";
4
4
  function ScrollArea({ className, children, ...props }) {
5
- return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
5
+ return /*#__PURE__*/ _jsxs(ScrollAreaPrimitive.Root, {
6
+ "data-slot": "scroll-area",
7
+ className: cn("relative", className),
8
+ ...props,
9
+ children: [
10
+ /*#__PURE__*/ _jsx(ScrollAreaPrimitive.Viewport, {
11
+ "data-slot": "scroll-area-viewport",
12
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
13
+ children: children
14
+ }),
15
+ /*#__PURE__*/ _jsx(ScrollBar, {}),
16
+ /*#__PURE__*/ _jsx(ScrollAreaPrimitive.Corner, {})
17
+ ]
18
+ });
6
19
  }
7
20
  function ScrollBar({ className, orientation = "vertical", ...props }) {
8
- return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" &&
9
- "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" &&
10
- "h-2.5 flex-col border-t border-t-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" }) }));
21
+ return /*#__PURE__*/ _jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, {
22
+ "data-slot": "scroll-area-scrollbar",
23
+ orientation: orientation,
24
+ className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className),
25
+ ...props,
26
+ children: /*#__PURE__*/ _jsx(ScrollAreaPrimitive.ScrollAreaThumb, {
27
+ "data-slot": "scroll-area-thumb",
28
+ className: "bg-border relative flex-1 rounded-full"
29
+ })
30
+ });
11
31
  }
12
32
  export { ScrollArea, ScrollBar };
33
+
13
34
  //# sourceMappingURL=scroll-area.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area.js","sourceRoot":"","sources":["../../../../../src/shadcn/components/ui/scroll-area.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC,SAAS,UAAU,CAAC,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAC+C;IACvD,OAAO,CACN,MAAC,mBAAmB,CAAC,IAAI,iBACd,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,KAChC,KAAK,aAET,KAAC,mBAAmB,CAAC,QAAQ,iBAClB,sBAAsB,EAChC,SAAS,EAAC,oJAAoJ,YAE7J,QAAQ,GACqB,EAC/B,KAAC,SAAS,KAAG,EACb,KAAC,mBAAmB,CAAC,MAAM,KAAG,IACJ,CAC3B,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAClB,SAAS,EACT,WAAW,GAAG,UAAU,EACxB,GAAG,KAAK,EAC8D;IACtE,OAAO,CACN,KAAC,mBAAmB,CAAC,mBAAmB,iBAC7B,uBAAuB,EACjC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACZ,oDAAoD,EACpD,WAAW,KAAK,UAAU;YACzB,4CAA4C,EAC7C,WAAW,KAAK,YAAY;YAC3B,8CAA8C,EAC/C,SAAS,CACT,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,eAAe,iBACzB,mBAAmB,EAC7B,SAAS,EAAC,wCAAwC,GACjD,GACuC,CAC1C,CAAC;AACH,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"sources":["../../../../../src/shadcn/components/ui/scroll-area.tsx"],"sourcesContent":["import * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\nimport type * as React from \"react\";\n\nimport { cn } from \"#shadcn/lib/utils\";\n\nfunction ScrollArea({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n\treturn (\n\t\t<ScrollAreaPrimitive.Root\n\t\t\tdata-slot=\"scroll-area\"\n\t\t\tclassName={cn(\"relative\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.Viewport\n\t\t\t\tdata-slot=\"scroll-area-viewport\"\n\t\t\t\tclassName=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\"\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</ScrollAreaPrimitive.Viewport>\n\t\t\t<ScrollBar />\n\t\t\t<ScrollAreaPrimitive.Corner />\n\t\t</ScrollAreaPrimitive.Root>\n\t);\n}\n\nfunction ScrollBar({\n\tclassName,\n\torientation = \"vertical\",\n\t...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n\treturn (\n\t\t<ScrollAreaPrimitive.ScrollAreaScrollbar\n\t\t\tdata-slot=\"scroll-area-scrollbar\"\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex touch-none p-px transition-colors select-none\",\n\t\t\t\torientation === \"vertical\" &&\n\t\t\t\t\t\"h-full w-2.5 border-l border-l-transparent\",\n\t\t\t\torientation === \"horizontal\" &&\n\t\t\t\t\t\"h-2.5 flex-col border-t border-t-transparent\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.ScrollAreaThumb\n\t\t\t\tdata-slot=\"scroll-area-thumb\"\n\t\t\t\tclassName=\"bg-border relative flex-1 rounded-full\"\n\t\t\t/>\n\t\t</ScrollAreaPrimitive.ScrollAreaScrollbar>\n\t);\n}\n\nexport { ScrollArea, ScrollBar };\n"],"names":["ScrollAreaPrimitive","cn","ScrollArea","className","children","props","Root","data-slot","Viewport","ScrollBar","Corner","orientation","ScrollAreaScrollbar","ScrollAreaThumb"],"mappings":";AAAA,YAAYA,yBAAyB,8BAA8B;AAGnE,SAASC,EAAE,QAAQ,qBAAoB;AAEvC,SAASC,WAAW,EACnBC,SAAS,EACTC,QAAQ,EACR,GAAGC,OACoD;IACvD,qBACC,MAACL,oBAAoBM,IAAI;QACxBC,aAAU;QACVJ,WAAWF,GAAG,YAAYE;QACzB,GAAGE,KAAK;;0BAET,KAACL,oBAAoBQ,QAAQ;gBAC5BD,aAAU;gBACVJ,WAAU;0BAETC;;0BAEF,KAACK;0BACD,KAACT,oBAAoBU,MAAM;;;AAG9B;AAEA,SAASD,UAAU,EAClBN,SAAS,EACTQ,cAAc,UAAU,EACxB,GAAGN,OACmE;IACtE,qBACC,KAACL,oBAAoBY,mBAAmB;QACvCL,aAAU;QACVI,aAAaA;QACbR,WAAWF,GACV,sDACAU,gBAAgB,cACf,8CACDA,gBAAgB,gBACf,gDACDR;QAEA,GAAGE,KAAK;kBAET,cAAA,KAACL,oBAAoBa,eAAe;YACnCN,aAAU;YACVJ,WAAU;;;AAId;AAEA,SAASD,UAAU,EAAEO,SAAS,GAAG"}