linkedunion-design-kit 1.11.6 → 1.11.8

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 (258) hide show
  1. package/dist/app/layout.d.ts +1 -1
  2. package/dist/app/{layout.js → layout.jsx} +3 -2
  3. package/dist/app/page.d.ts +1 -1
  4. package/dist/app/page.jsx +5 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +3 -0
  7. package/dist/src/components/Accordion/Accordion.stories.jsx +33 -0
  8. package/dist/src/components/Accordion/accordion.d.ts +4 -4
  9. package/dist/src/components/Accordion/{accordion.js → accordion.jsx} +11 -16
  10. package/dist/src/components/Alerts/Alert/alert.d.ts +7 -7
  11. package/dist/src/components/Alerts/Alert/{alert.js → alert.jsx} +21 -25
  12. package/dist/src/components/Alerts/Alert/alert.stories.d.ts +8 -8
  13. package/dist/src/components/Alerts/Alert/alert.stories.jsx +344 -0
  14. package/dist/src/components/Alerts/AlertDialog/alert-dialog.d.ts +11 -11
  15. package/dist/src/components/Alerts/AlertDialog/{alert-dialog.js → alert-dialog.jsx} +26 -24
  16. package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.d.ts +10 -10
  17. package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.jsx +552 -0
  18. package/dist/src/components/AppIcons/AndroidIcon.jsx +24 -0
  19. package/dist/src/components/AppIcons/{AppIcon.js → AppIcon.jsx} +4 -15
  20. package/dist/src/components/AppIcons/AppleIcon.jsx +31 -0
  21. package/dist/src/components/AppIcons/PlayStoreIcon.jsx +29 -0
  22. package/dist/src/components/Avatar/Avatar/{Avatar.js → Avatar.jsx} +13 -18
  23. package/dist/src/components/Avatar/Avatar/Avatar.stories.d.ts +7 -7
  24. package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +95 -0
  25. package/dist/src/components/Avatar/Avatar/{Avatar.test.js → Avatar.test.jsx} +1 -2
  26. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.d.ts +1 -1
  27. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.jsx +17 -0
  28. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.jsx +32 -0
  29. package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.jsx +20 -0
  30. package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.stories.d.ts +2 -2
  31. package/dist/src/components/Avatar/StatusIndicator/{StatusIndicator.stories.js → StatusIndicator.stories.jsx} +12 -3
  32. package/dist/src/components/Badge/Badge.d.ts +1 -1
  33. package/dist/src/components/Badge/{Badge.js → Badge.jsx} +8 -13
  34. package/dist/src/components/Badge/Badge.stories.d.ts +10 -10
  35. package/dist/src/components/Badge/Badge.stories.jsx +201 -0
  36. package/dist/src/components/Button/Button/Button.d.ts +3 -2
  37. package/dist/src/components/Button/Button/{Button.js → Button.jsx} +24 -8
  38. package/dist/src/components/Button/Button/Button.stories.d.ts +5 -3
  39. package/dist/src/components/Button/Button/{Button.stories.js → Button.stories.jsx} +1 -13
  40. package/dist/src/components/Button/Button/Button.test.jsx +73 -0
  41. package/dist/src/components/Button/IconButton/IconButton.d.ts +1 -1
  42. package/dist/src/components/Button/IconButton/{IconButton.js → IconButton.jsx} +4 -13
  43. package/dist/src/components/Button/IconButton/IconButton.stories.d.ts +1 -1
  44. package/dist/src/components/Button/IconButton/{IconButton.stories.js → IconButton.stories.jsx} +1 -13
  45. package/dist/src/components/Button/IconButton/{IconButton.test.js → IconButton.test.jsx} +5 -6
  46. package/dist/src/components/Button/index.d.ts +1 -0
  47. package/dist/src/components/Button/index.js +3 -2
  48. package/dist/src/components/Card/MultipleNews/MultiNews.d.ts +1 -1
  49. package/dist/src/components/Card/MultipleNews/MultiNews.jsx +71 -0
  50. package/dist/src/components/Card/MultipleNews/{MultiNews.stories.js → MultiNews.stories.jsx} +1 -2
  51. package/dist/src/components/Card/PostByCategory/PostByCategory.d.ts +1 -1
  52. package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +57 -0
  53. package/dist/src/components/Card/PostByCategory/{PostByCategory.stories.js → PostByCategory.stories.jsx} +1 -2
  54. package/dist/src/components/Card/SinglePost/SinglePost.d.ts +1 -1
  55. package/dist/src/components/Card/SinglePost/SinglePost.jsx +26 -0
  56. package/dist/src/components/Card/card.d.ts +2 -1
  57. package/dist/src/components/Card/{card.js → card.jsx} +2 -13
  58. package/dist/src/components/Card/contactProfile/ContactProfile.d.ts +1 -1
  59. package/dist/src/components/Card/contactProfile/ContactProfile.jsx +76 -0
  60. package/dist/src/components/Card/contactProfile/{ContactProfile.stories.js → ContactProfile.stories.jsx} +1 -2
  61. package/dist/src/components/Card/photoAlbum/PhotoAlbum.d.ts +1 -1
  62. package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +41 -0
  63. package/dist/src/components/Card/photoAlbum/{PhotoAlbum.stories.js → PhotoAlbum.stories.jsx} +1 -13
  64. package/dist/src/components/Card/photoGallery/PhotoGallery.d.ts +1 -1
  65. package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +17 -0
  66. package/dist/src/components/Card/photoGallery/{PhotoGallery.stories.js → PhotoGallery.stories.jsx} +1 -13
  67. package/dist/src/components/Checkbox/checkbox.d.ts +1 -1
  68. package/dist/src/components/Checkbox/{checkbox.js → checkbox.jsx} +6 -13
  69. package/dist/src/components/Checkbox/checkbox.stories.jsx +113 -0
  70. package/dist/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  71. package/dist/src/components/ColorPicker/{ColorPicker.js → ColorPicker.jsx} +6 -13
  72. package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +5 -5
  73. package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +138 -0
  74. package/dist/src/components/Colors/color.d.ts +1 -1
  75. package/dist/src/components/Colors/{color.js → color.jsx} +1 -2
  76. package/dist/src/components/Colors/color.stories.jsx +20 -0
  77. package/dist/src/components/Colors/{color.test.js → color.test.jsx} +3 -4
  78. package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
  79. package/dist/src/components/DatePicker/DatePicker.jsx +67 -0
  80. package/dist/src/components/DatePicker/DatePicker.stories.d.ts +9 -9
  81. package/dist/src/components/DatePicker/DatePicker.stories.jsx +291 -0
  82. package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  83. package/dist/src/components/DateRangePicker/{DateRangePicker.js → DateRangePicker.jsx} +92 -44
  84. package/dist/src/components/DateRangePicker/DateRangePicker.stories.d.ts +19 -19
  85. package/dist/src/components/DateRangePicker/DateRangePicker.stories.jsx +582 -0
  86. package/dist/src/components/Dropdown/Combobox/Combobox.d.ts +1 -1
  87. package/dist/src/components/Dropdown/Combobox/{Combobox.js → Combobox.jsx} +67 -29
  88. package/dist/src/components/Dropdown/Combobox/Combobox.stories.d.ts +8 -8
  89. package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +289 -0
  90. package/dist/src/components/Dropdown/Combobox/dialog.d.ts +10 -10
  91. package/dist/src/components/Dropdown/Combobox/dialog.jsx +66 -0
  92. package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +7 -0
  93. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.d.ts +7 -3
  94. package/dist/src/components/Dropdown/DropdownMenu/{DropdownMenu.js → DropdownMenu.jsx} +29 -22
  95. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.d.ts +19 -12
  96. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +552 -0
  97. package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +19 -0
  98. package/dist/src/components/Dropdown/DropdownMenu/index.d.ts +5 -0
  99. package/dist/src/components/Dropdown/DropdownMenu/index.js +5 -0
  100. package/dist/src/components/Dropdown/Select.stories.d.ts +7 -6
  101. package/dist/src/components/Dropdown/{Select.stories.js → Select.stories.jsx} +71 -8
  102. package/dist/src/components/Dropdown/select.d.ts +10 -10
  103. package/dist/src/components/Dropdown/select.jsx +94 -0
  104. package/dist/src/components/Icons/LUIcon.d.ts +1 -1
  105. package/dist/src/components/Icons/{LUIcon.js → LUIcon.jsx} +10 -13
  106. package/dist/src/components/Icons/stories/IconDropdown.jsx +67 -0
  107. package/dist/src/components/Icons/stories/IconGallery.jsx +77 -0
  108. package/dist/src/components/Icons/stories/InteractiveIconSelector.jsx +86 -0
  109. package/dist/src/components/Icons/stories/LUIcon.stories.d.ts +5 -5
  110. package/dist/src/components/Icons/stories/{LUIcon.stories.js → LUIcon.stories.jsx} +23 -8
  111. package/dist/src/components/ImageUploader/imageUploader.d.ts +1 -1
  112. package/dist/src/components/ImageUploader/{imageUploader.js → imageUploader.jsx} +28 -13
  113. package/dist/src/components/Images/LuImage.d.ts +1 -1
  114. package/dist/src/components/Images/{LuImage.js → LuImage.jsx} +1 -13
  115. package/dist/src/components/Images/{LuImage.stories.js → LuImage.stories.jsx} +1 -13
  116. package/dist/src/components/Images/{LuImage.test.js → LuImage.test.jsx} +6 -18
  117. package/dist/src/components/Input/Input.stories.d.ts +9 -8
  118. package/dist/src/components/Input/Input.stories.jsx +250 -0
  119. package/dist/src/components/Input/input.d.ts +1 -1
  120. package/dist/src/components/Input/{input.js → input.jsx} +10 -13
  121. package/dist/src/components/Label/Label.d.ts +1 -1
  122. package/dist/src/components/Label/{Label.js → Label.jsx} +2 -13
  123. package/dist/src/components/Label/{Label.stories.js → Label.stories.jsx} +1 -13
  124. package/dist/src/components/Modal/Modal.d.ts +3 -3
  125. package/dist/src/components/Modal/{Modal.js → Modal.jsx} +20 -19
  126. package/dist/src/components/Modal/Modal.stories.d.ts +15 -15
  127. package/dist/src/components/Modal/Modal.stories.jsx +487 -0
  128. package/dist/src/components/Pagination/pagination.d.ts +5 -5
  129. package/dist/src/components/Pagination/{pagination.js → pagination.jsx} +18 -21
  130. package/dist/src/components/Pagination/pagination.stories.d.ts +6 -6
  131. package/dist/src/components/Pagination/pagination.stories.jsx +301 -0
  132. package/dist/src/components/RadioGroup/{RadioGroup.stories.js → RadioGroup.stories.jsx} +52 -22
  133. package/dist/src/components/RadioGroup/radio-group.d.ts +1 -1
  134. package/dist/src/components/RadioGroup/{radio-group.js → radio-group.jsx} +6 -14
  135. package/dist/src/components/Separator/Separator.stories.d.ts +15 -0
  136. package/dist/src/components/Separator/Separator.stories.jsx +94 -0
  137. package/dist/src/components/Separator/index.d.ts +1 -0
  138. package/dist/src/components/Separator/index.js +1 -0
  139. package/dist/src/components/Separator/separator.d.ts +4 -0
  140. package/dist/src/components/Separator/separator.jsx +20 -0
  141. package/dist/src/components/Sheet/index.d.ts +1 -0
  142. package/dist/src/components/Sheet/index.js +1 -0
  143. package/dist/src/components/Sheet/sheet.d.ts +25 -0
  144. package/dist/src/components/Sheet/sheet.jsx +73 -0
  145. package/dist/src/components/Sheet/sheet.stories.d.ts +4 -0
  146. package/dist/src/components/Sheet/sheet.stories.jsx +34 -0
  147. package/dist/src/components/Skeleton/skeleton.d.ts +14 -14
  148. package/dist/src/components/Skeleton/{skeleton.js → skeleton.jsx} +23 -27
  149. package/dist/src/components/Skeleton/skeleton.stories.d.ts +14 -14
  150. package/dist/src/components/Skeleton/skeleton.stories.jsx +734 -0
  151. package/dist/src/components/Slider/slider.d.ts +1 -1
  152. package/dist/src/components/Slider/slider.jsx +31 -0
  153. package/dist/src/components/SweetAlert/SweetAlert.d.ts +9 -9
  154. package/dist/src/components/SweetAlert/{SweetAlert.js → SweetAlert.jsx} +18 -21
  155. package/dist/src/components/SweetAlert/SweetAlert.stories.d.ts +7 -7
  156. package/dist/src/components/SweetAlert/{SweetAlert.stories.js → SweetAlert.stories.jsx} +215 -15
  157. package/dist/src/components/Switch/{Switch.stories.js → Switch.stories.jsx} +1 -13
  158. package/dist/src/components/Switch/switch.d.ts +1 -1
  159. package/dist/src/components/Switch/{switch.js → switch.jsx} +4 -13
  160. package/dist/src/components/Table/{Table.js → Table.jsx} +111 -58
  161. package/dist/src/components/Table/Table.stories.d.ts +13 -13
  162. package/dist/src/components/Table/{Table.stories.js → Table.stories.jsx} +299 -45
  163. package/dist/src/components/Table/{Table.test.js → Table.test.jsx} +39 -7
  164. package/dist/src/components/Tabs/{Tabs.stories.js → Tabs.stories.jsx} +10 -3
  165. package/dist/src/components/Tabs/tabs.d.ts +4 -4
  166. package/dist/src/components/Tabs/tabs.jsx +32 -0
  167. package/dist/src/components/TimePicker/TimePicker.d.ts +1 -1
  168. package/dist/src/components/TimePicker/{TimePicker.js → TimePicker.jsx} +54 -30
  169. package/dist/src/components/TimePicker/TimePicker.stories.d.ts +10 -10
  170. package/dist/src/components/TimePicker/TimePicker.stories.jsx +298 -0
  171. package/dist/src/components/Title/Title.d.ts +1 -1
  172. package/dist/src/components/Title/{Title.js → Title.jsx} +2 -2
  173. package/dist/src/components/Title/{Title.stories.js → Title.stories.jsx} +1 -13
  174. package/dist/src/components/Title/{Title.test.js → Title.test.jsx} +4 -5
  175. package/dist/src/components/ToolTip/Tooltip.d.ts +1 -1
  176. package/dist/src/components/ToolTip/Tooltip.jsx +18 -0
  177. package/dist/src/components/ToolTip/{Tooltip.stories.js → Tooltip.stories.jsx} +2 -14
  178. package/dist/src/components/Typography/Body/{Body.stories.js → Body.stories.jsx} +1 -13
  179. package/dist/src/components/Typography/Body/body.d.ts +1 -1
  180. package/dist/src/components/Typography/Body/{body.js → body.jsx} +4 -13
  181. package/dist/src/components/Typography/Caption/{Caption.stories.js → Caption.stories.jsx} +1 -13
  182. package/dist/src/components/Typography/Caption/caption.d.ts +1 -1
  183. package/dist/src/components/Typography/Caption/{caption.js → caption.jsx} +4 -13
  184. package/dist/src/components/Typography/Display/{Display.stories.js → Display.stories.jsx} +1 -13
  185. package/dist/src/components/Typography/Display/display.d.ts +1 -1
  186. package/dist/src/components/Typography/Display/{display.js → display.jsx} +4 -13
  187. package/dist/src/components/Typography/Heading/Heading.stories.d.ts +6 -6
  188. package/dist/src/components/Typography/Heading/Heading.stories.jsx +85 -0
  189. package/dist/src/components/Typography/Heading/{heading.js → heading.jsx} +5 -14
  190. package/dist/src/components/VerticalTabs/{VerticalTabs.js → VerticalTabs.jsx} +9 -17
  191. package/dist/src/components/VerticalTabs/VerticalTabs.stories.jsx +154 -0
  192. package/dist/src/components/VerticalTabs/VerticalTabs.test.jsx +97 -0
  193. package/dist/src/components/ui/calendar.d.ts +2 -2
  194. package/dist/src/components/ui/{calendar.js → calendar.jsx} +36 -22
  195. package/dist/src/components/ui/command.d.ts +9 -9
  196. package/dist/src/components/ui/command.jsx +67 -0
  197. package/dist/src/components/ui/popover.d.ts +4 -4
  198. package/dist/src/components/ui/popover.jsx +33 -0
  199. package/dist/src/components/ui/tooltip.d.ts +4 -4
  200. package/dist/src/components/ui/tooltip.jsx +38 -0
  201. package/dist/src/components/ui/typography.d.ts +1 -1
  202. package/dist/src/components/ui/{typography.js → typography.jsx} +4 -13
  203. package/dist/styles/global.css +107 -5
  204. package/package.json +4 -3
  205. package/dist/app/page.js +0 -4
  206. package/dist/src/components/Accordion/Accordion.stories.js +0 -32
  207. package/dist/src/components/Alerts/Alert/alert.stories.js +0 -166
  208. package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.js +0 -213
  209. package/dist/src/components/AppIcons/AndroidIcon.js +0 -28
  210. package/dist/src/components/AppIcons/AppleIcon.js +0 -28
  211. package/dist/src/components/AppIcons/PlayStoreIcon.js +0 -28
  212. package/dist/src/components/Avatar/Avatar/Avatar.stories.js +0 -69
  213. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.js +0 -8
  214. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.js +0 -14
  215. package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.js +0 -18
  216. package/dist/src/components/Badge/Badge.stories.js +0 -145
  217. package/dist/src/components/Button/Button/Button.test.js +0 -10
  218. package/dist/src/components/Card/MultipleNews/MultiNews.js +0 -46
  219. package/dist/src/components/Card/PostByCategory/PostByCategory.js +0 -37
  220. package/dist/src/components/Card/SinglePost/SinglePost.js +0 -10
  221. package/dist/src/components/Card/contactProfile/ContactProfile.js +0 -39
  222. package/dist/src/components/Card/photoAlbum/PhotoAlbum.js +0 -16
  223. package/dist/src/components/Card/photoGallery/PhotoGallery.js +0 -8
  224. package/dist/src/components/Checkbox/checkbox.stories.js +0 -78
  225. package/dist/src/components/ColorPicker/ColorPicker.stories.js +0 -77
  226. package/dist/src/components/Colors/color.stories.js +0 -32
  227. package/dist/src/components/DatePicker/DatePicker.js +0 -64
  228. package/dist/src/components/DatePicker/DatePicker.stories.js +0 -171
  229. package/dist/src/components/DateRangePicker/DateRangePicker.stories.js +0 -318
  230. package/dist/src/components/Dropdown/Combobox/Combobox.stories.js +0 -225
  231. package/dist/src/components/Dropdown/Combobox/dialog.js +0 -68
  232. package/dist/src/components/Dropdown/Combobox/utils/renderBadge.js +0 -5
  233. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.js +0 -253
  234. package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.js +0 -9
  235. package/dist/src/components/Dropdown/select.js +0 -87
  236. package/dist/src/components/Icons/stories/IconDropdown.js +0 -38
  237. package/dist/src/components/Icons/stories/IconGallery.js +0 -31
  238. package/dist/src/components/Icons/stories/InteractiveIconSelector.js +0 -26
  239. package/dist/src/components/Input/Input.stories.js +0 -133
  240. package/dist/src/components/Modal/Modal.stories.js +0 -115
  241. package/dist/src/components/Pagination/pagination.stories.js +0 -168
  242. package/dist/src/components/Skeleton/skeleton.stories.js +0 -414
  243. package/dist/src/components/Slider/slider.js +0 -38
  244. package/dist/src/components/Tabs/tabs.js +0 -43
  245. package/dist/src/components/TimePicker/TimePicker.stories.js +0 -176
  246. package/dist/src/components/ToolTip/Tooltip.js +0 -8
  247. package/dist/src/components/Typography/Heading/Heading.stories.js +0 -67
  248. package/dist/src/components/VerticalTabs/VerticalTabs.stories.js +0 -100
  249. package/dist/src/components/VerticalTabs/VerticalTabs.test.js +0 -48
  250. package/dist/src/components/ui/command.js +0 -65
  251. package/dist/src/components/ui/popover.js +0 -42
  252. package/dist/src/components/ui/tooltip.js +0 -42
  253. /package/dist/src/components/AppIcons/{AppIcon.stories.js → AppIcon.stories.jsx} +0 -0
  254. /package/dist/src/components/Card/SinglePost/{SinglePost.stories.js → SinglePost.stories.jsx} +0 -0
  255. /package/dist/src/components/Icons/{LUIcon.test.js → LUIcon.test.jsx} +0 -0
  256. /package/dist/src/components/ImageUploader/{ImageUploader.stories.js → ImageUploader.stories.jsx} +0 -0
  257. /package/dist/src/components/Slider/{Slider.stories.js → Slider.stories.jsx} +0 -0
  258. /package/dist/src/components/ui/{collapsible.js → collapsible.jsx} +0 -0
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  import * as SliderPrimitive from "@radix-ui/react-slider";
3
- declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): React.JSX.Element;
4
4
  export { Slider };
@@ -0,0 +1,31 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import * as React from "react";
13
+ import * as SliderPrimitive from "@radix-ui/react-slider";
14
+ import { cn } from "../../lib/utils";
15
+ function Slider(_a) {
16
+ var className = _a.className, defaultValue = _a.defaultValue, value = _a.value, _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, props = __rest(_a, ["className", "defaultValue", "value", "min", "max"]);
17
+ var _values = React.useMemo(function () {
18
+ return Array.isArray(value)
19
+ ? value
20
+ : Array.isArray(defaultValue)
21
+ ? defaultValue
22
+ : [min, max];
23
+ }, [value, defaultValue, min, max]);
24
+ return (<SliderPrimitive.Root data-slot="slider" defaultValue={defaultValue} value={value} min={min} max={max} className={cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className)} {...props}>
25
+ <SliderPrimitive.Track data-slot="slider-track" className={cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")}>
26
+ <SliderPrimitive.Range data-slot="slider-range" className={cn("bg-blue-600 absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")}/>
27
+ </SliderPrimitive.Track>
28
+ {Array.from({ length: _values.length }, function (_, index) { return (<SliderPrimitive.Thumb data-slot="slider-thumb" key={index} className="border-blue-600 bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"/>); })}
29
+ </SliderPrimitive.Root>);
30
+ }
31
+ export { Slider };
@@ -27,14 +27,14 @@ declare const sweetAlertContentVariants: (props?: ({
27
27
  variant?: "fill" | "outline" | "light" | null | undefined;
28
28
  color?: "blue" | "green" | "yellow" | "red" | "indigo" | "gray" | null | undefined;
29
29
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
30
- declare function SweetAlertRoot({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
31
- declare function SweetAlertTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
32
- declare function SweetAlertContent({ className, shadow, color, variant, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & VariantProps<typeof sweetAlertContentVariants>): import("react/jsx-runtime").JSX.Element;
33
- declare function SweetAlertFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
34
- declare function SweetAlertTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
35
- declare function SweetAlertDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
36
- declare function SweetAlertAction({ className, color: colorProp, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
37
- declare function SweetAlertCancel({ className, color: colorProp, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
38
- declare function SweetAlertIcon({ size, variant, color: colorProp, shape, ...props }: React.ComponentProps<typeof LUIcon>): import("react/jsx-runtime").JSX.Element;
30
+ declare function SweetAlertRoot({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
31
+ declare function SweetAlertTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
32
+ declare function SweetAlertContent({ className, shadow, color, variant, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & VariantProps<typeof sweetAlertContentVariants>): React.JSX.Element;
33
+ declare function SweetAlertFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
34
+ declare function SweetAlertTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
35
+ declare function SweetAlertDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
36
+ declare function SweetAlertAction({ className, color: colorProp, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & React.ComponentProps<typeof Button>): React.JSX.Element;
37
+ declare function SweetAlertCancel({ className, color: colorProp, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & React.ComponentProps<typeof Button>): React.JSX.Element;
38
+ declare function SweetAlertIcon({ size, variant, color: colorProp, shape, ...props }: React.ComponentProps<typeof LUIcon>): React.JSX.Element;
39
39
  export { SweetAlertRoot as SweetAlert, SweetAlertTrigger, SweetAlertContent, SweetAlertFooter, SweetAlertTitle, SweetAlertDescription, SweetAlertAction, SweetAlertCancel, SweetAlertIcon, };
40
40
  export default SweetAlertRoot;
@@ -1,14 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  var __rest = (this && this.__rest) || function (s, e) {
13
2
  var t = {};
14
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -20,7 +9,6 @@ var __rest = (this && this.__rest) || function (s, e) {
20
9
  }
21
10
  return t;
22
11
  };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
12
  import * as React from "react";
25
13
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
26
14
  import { cva } from "class-variance-authority";
@@ -94,11 +82,11 @@ var sweetAlertContentVariants = cva("data-[state=open]:animate-in data-[state=cl
94
82
  });
95
83
  function SweetAlertRoot(_a) {
96
84
  var props = __rest(_a, []);
97
- return _jsx(AlertDialogPrimitive.Root, __assign({ "data-slot": "sweet-alert" }, props));
85
+ return <AlertDialogPrimitive.Root data-slot="sweet-alert" {...props}/>;
98
86
  }
99
87
  function SweetAlertTrigger(_a) {
100
88
  var props = __rest(_a, []);
101
- return (_jsx(AlertDialogPrimitive.Trigger, __assign({ "data-slot": "sweet-alert-trigger" }, props)));
89
+ return (<AlertDialogPrimitive.Trigger data-slot="sweet-alert-trigger" {...props}/>);
102
90
  }
103
91
  function SweetAlertContent(_a) {
104
92
  var className = _a.className, shadow = _a.shadow, color = _a.color, variant = _a.variant, props = __rest(_a, ["className", "shadow", "color", "variant"]);
@@ -107,19 +95,24 @@ function SweetAlertContent(_a) {
107
95
  color: color || undefined,
108
96
  variant: variant || undefined,
109
97
  }); }, [color, variant]);
110
- return (_jsx(SweetAlertContext.Provider, { value: contextValue, children: _jsxs(AlertDialogPrimitive.Portal, { children: [_jsx(AlertDialogPrimitive.Overlay, { className: "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50" }), _jsx(AlertDialogPrimitive.Content, __assign({ "data-slot": "sweet-alert-content", className: cn(sweetAlertContentVariants({ shadow: shadow, color: color, variant: variant }), "flex flex-col items-center gap-4 text-center", className) }, props))] }) }));
98
+ return (<SweetAlertContext.Provider value={contextValue}>
99
+ <AlertDialogPrimitive.Portal>
100
+ <AlertDialogPrimitive.Overlay className="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50"/>
101
+ <AlertDialogPrimitive.Content data-slot="sweet-alert-content" className={cn(sweetAlertContentVariants({ shadow: shadow, color: color, variant: variant }), "flex flex-col items-center gap-4 text-center", className)} {...props}/>
102
+ </AlertDialogPrimitive.Portal>
103
+ </SweetAlertContext.Provider>);
111
104
  }
112
105
  function SweetAlertFooter(_a) {
113
106
  var className = _a.className, props = __rest(_a, ["className"]);
114
- return (_jsx("div", __assign({ "data-slot": "sweet-alert-footer", className: cn("flex flex-row justify-center text-lg gap-3 mt-6", className) }, props)));
107
+ return (<div data-slot="sweet-alert-footer" className={cn("flex flex-row justify-center text-lg gap-3 mt-6", className)} {...props}/>);
115
108
  }
116
109
  function SweetAlertTitle(_a) {
117
110
  var className = _a.className, props = __rest(_a, ["className"]);
118
- return (_jsx(AlertDialogPrimitive.Title, __assign({ "data-slot": "sweet-alert-title", className: cn("font-semibold text-2xl", className) }, props)));
111
+ return (<AlertDialogPrimitive.Title data-slot="sweet-alert-title" className={cn("font-semibold text-2xl", className)} {...props}/>);
119
112
  }
120
113
  function SweetAlertDescription(_a) {
121
114
  var className = _a.className, props = __rest(_a, ["className"]);
122
- return (_jsx(AlertDialogPrimitive.Description, __assign({ "data-slot": "sweet-alert-description", className: cn("text-lg", className) }, props)));
115
+ return (<AlertDialogPrimitive.Description data-slot="sweet-alert-description" className={cn("text-lg", className)} {...props}/>);
123
116
  }
124
117
  // Helper function to get color based on context and variant
125
118
  function getColorWithVariant(colorProp, contextColor, contextVariant) {
@@ -132,19 +125,23 @@ function SweetAlertAction(_a) {
132
125
  var className = _a.className, colorProp = _a.color, props = __rest(_a, ["className", "color"]);
133
126
  var _b = useAlertContext(), contextColor = _b.color, contextVariant = _b.variant;
134
127
  var color = getColorWithVariant(colorProp, contextColor, contextVariant);
135
- return (_jsx(AlertDialogPrimitive.Action, { asChild: true, children: _jsx(Button, __assign({ variant: "fill", color: color, "data-slot": "sweet-alert-action", className: cn(className) }, props)) }));
128
+ return (<AlertDialogPrimitive.Action asChild>
129
+ <Button variant="fill" color={color} data-slot="sweet-alert-action" className={cn(className)} {...props}/>
130
+ </AlertDialogPrimitive.Action>);
136
131
  }
137
132
  function SweetAlertCancel(_a) {
138
133
  var className = _a.className, colorProp = _a.color, props = __rest(_a, ["className", "color"]);
139
134
  var _b = useAlertContext(), contextColor = _b.color, contextVariant = _b.variant;
140
135
  var color = getColorWithVariant(colorProp, contextColor, contextVariant);
141
- return (_jsx(AlertDialogPrimitive.Cancel, { asChild: true, children: _jsx(Button, __assign({ variant: "outline", color: color, "data-slot": "sweet-alert-cancel", className: cn(className) }, props)) }));
136
+ return (<AlertDialogPrimitive.Cancel asChild>
137
+ <Button variant="outline" color={color} data-slot="sweet-alert-cancel" className={cn(className)} {...props}/>
138
+ </AlertDialogPrimitive.Cancel>);
142
139
  }
143
140
  function SweetAlertIcon(_a) {
144
141
  var _b = _a.size, size = _b === void 0 ? "12xl" : _b, _c = _a.variant, variant = _c === void 0 ? "padded" : _c, colorProp = _a.color, _d = _a.shape, shape = _d === void 0 ? "rounded" : _d, props = __rest(_a, ["size", "variant", "color", "shape"]);
145
142
  var _e = useAlertContext(), contextColor = _e.color, contextVariant = _e.variant;
146
143
  var color = getColorWithVariant(colorProp, contextColor, contextVariant);
147
- return (_jsx(LUIcon, __assign({ size: size, variant: variant, color: color, shape: shape }, props)));
144
+ return (<LUIcon size={size} variant={variant} color={color} shape={shape} {...props}/>);
148
145
  }
149
146
  export { SweetAlertRoot as SweetAlert, SweetAlertTrigger, SweetAlertContent, SweetAlertFooter, SweetAlertTitle, SweetAlertDescription, SweetAlertAction, SweetAlertCancel, SweetAlertIcon, };
150
147
  export default SweetAlertRoot;
@@ -15,7 +15,7 @@ declare const _default: Meta;
15
15
  export default _default;
16
16
  export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, SweetAlertStoryArgs>;
17
17
  export declare const Example: {
18
- (): import("react/jsx-runtime").JSX.Element;
18
+ (): import("react").JSX.Element;
19
19
  parameters: {
20
20
  docs: {
21
21
  description: {
@@ -25,7 +25,7 @@ export declare const Example: {
25
25
  };
26
26
  };
27
27
  export declare const BasicExample: {
28
- (): import("react/jsx-runtime").JSX.Element;
28
+ (): import("react").JSX.Element;
29
29
  parameters: {
30
30
  docs: {
31
31
  description: {
@@ -35,7 +35,7 @@ export declare const BasicExample: {
35
35
  };
36
36
  };
37
37
  export declare const AllColors: {
38
- (): import("react/jsx-runtime").JSX.Element;
38
+ (): import("react").JSX.Element;
39
39
  parameters: {
40
40
  docs: {
41
41
  source: {
@@ -45,7 +45,7 @@ export declare const AllColors: {
45
45
  };
46
46
  };
47
47
  export declare const ColorVariants: {
48
- (): import("react/jsx-runtime").JSX.Element;
48
+ (): import("react").JSX.Element;
49
49
  parameters: {
50
50
  docs: {
51
51
  source: {
@@ -55,7 +55,7 @@ export declare const ColorVariants: {
55
55
  };
56
56
  };
57
57
  export declare const RealWorldExamples: {
58
- (): import("react/jsx-runtime").JSX.Element;
58
+ (): import("react").JSX.Element;
59
59
  parameters: {
60
60
  docs: {
61
61
  source: {
@@ -65,7 +65,7 @@ export declare const RealWorldExamples: {
65
65
  };
66
66
  };
67
67
  export declare const ButtonVariants: {
68
- (): import("react/jsx-runtime").JSX.Element;
68
+ (): import("react").JSX.Element;
69
69
  parameters: {
70
70
  docs: {
71
71
  source: {
@@ -75,7 +75,7 @@ export declare const ButtonVariants: {
75
75
  };
76
76
  };
77
77
  export declare const CustomizeAlert: {
78
- (): import("react/jsx-runtime").JSX.Element;
78
+ (): import("react").JSX.Element;
79
79
  parameters: {
80
80
  docs: {
81
81
  description: {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { useState } from "react";
3
2
  import { SweetAlert, SweetAlertAction, SweetAlertCancel, SweetAlertContent, SweetAlertDescription, SweetAlertTitle, SweetAlertTrigger, SweetAlertFooter, SweetAlertIcon, sweetAlertVariants, } from "./SweetAlert";
4
3
  import { Button } from "../Button/Button/Button";
@@ -128,7 +127,22 @@ export default {
128
127
  // Reusable SweetAlert component
129
128
  var SweetAlertExample = function (_a) {
130
129
  var triggerText = _a.triggerText, triggerColor = _a.triggerColor, _b = _a.shadow, shadow = _b === void 0 ? "none" : _b, color = _a.color, _c = _a.variant, variant = _c === void 0 ? "outline" : _c, icon = _a.icon, title = _a.title, description = _a.description, cancelText = _a.cancelText, actionText = _a.actionText, _d = _a.showCancel, showCancel = _d === void 0 ? true : _d, _e = _a.showAction, showAction = _e === void 0 ? true : _e, _f = _a.className, className = _f === void 0 ? "" : _f;
131
- return (_jsxs(SweetAlert, { children: [_jsx(SweetAlertTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", color: triggerColor, className: className, children: triggerText }) }), _jsxs(SweetAlertContent, { shadow: shadow, color: color, variant: variant, children: [icon && _jsx(SweetAlertIcon, { icon: icon }), _jsx(SweetAlertTitle, { children: title }), _jsx(SweetAlertDescription, { children: description }), _jsxs(SweetAlertFooter, { children: [showCancel && (_jsx(SweetAlertCancel, { children: cancelText || "Cancel" })), showAction && (_jsx(SweetAlertAction, { children: actionText || "OK" }))] })] })] }));
130
+ return (<SweetAlert>
131
+ <SweetAlertTrigger asChild>
132
+ <Button variant="outline" color={triggerColor} className={className}>
133
+ {triggerText}
134
+ </Button>
135
+ </SweetAlertTrigger>
136
+ <SweetAlertContent shadow={shadow} color={color} variant={variant}>
137
+ {icon && <SweetAlertIcon icon={icon}/>}
138
+ <SweetAlertTitle>{title}</SweetAlertTitle>
139
+ <SweetAlertDescription>{description}</SweetAlertDescription>
140
+ <SweetAlertFooter>
141
+ {showCancel && (<SweetAlertCancel>{cancelText || "Cancel"}</SweetAlertCancel>)}
142
+ {showAction && (<SweetAlertAction>{actionText || "OK"}</SweetAlertAction>)}
143
+ </SweetAlertFooter>
144
+ </SweetAlertContent>
145
+ </SweetAlert>);
132
146
  };
133
147
  // Component with eye icon to show code
134
148
  var ColorVariantWithEyeIcon = function (_a) {
@@ -136,7 +150,30 @@ var ColorVariantWithEyeIcon = function (_a) {
136
150
  var _c = useState(false), showCode = _c[0], setShowCode = _c[1];
137
151
  var triggerText = color.charAt(0).toUpperCase() + color.slice(1).replace("-", " ");
138
152
  var sweetAlertCode = "<SweetAlert>\n <SweetAlertTrigger asChild>\n <Button variant=\"outline\" color=\"".concat(color, "\">\n ").concat(triggerText, "\n </Button>\n </SweetAlertTrigger>\n <SweetAlertContent color=\"").concat(color, "\" variant=\"").concat(variant, "\">\n <SweetAlertIcon icon=\"").concat(getIconForColor(color), "\" />\n <SweetAlertTitle>").concat(content.title, "</SweetAlertTitle>\n <SweetAlertDescription>\n ").concat(content.description, "\n </SweetAlertDescription>\n <SweetAlertFooter>\n <SweetAlertCancel>Cancel</SweetAlertCancel>\n <SweetAlertAction>").concat(content.button, "</SweetAlertAction>\n </SweetAlertFooter>\n </SweetAlertContent>\n</SweetAlert>");
139
- return (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "flex-1", children: _jsx(SweetAlertExample, { triggerText: triggerText, triggerColor: color, color: color, variant: variant, icon: getIconForColor(color), title: content.title, description: content.description, cancelText: "Cancel", actionText: content.button, className: "w-full" }) }), _jsx(Button, { onClick: function () { return setShowCode(!showCode); }, variant: "ghost", size: "sm", title: showCode ? "Hide Code" : "Show Code", className: "text-gray-600 hover:text-gray-800 hover:bg-gray-100", children: _jsx(LUIcon, { icon: showCode ? "eye-slash" : "eye" }) })] }), showCode && (_jsxs("div", { className: "p-3 bg-gray-50 border rounded-lg", children: [_jsxs("div", { className: "flex items-center justify-between mb-2", children: [_jsxs(Body, { variant: "body-sm", className: "font-semibold text-gray-700", children: [triggerText, " - SweetAlert Code"] }), _jsx(Button, { onClick: function () { return navigator.clipboard.writeText(sweetAlertCode); }, variant: "ghost", size: "sm", title: "Copy code to clipboard", className: "text-xs text-blue-700 hover:bg-blue-200 bg-blue-100", children: "Copy Code" })] }), _jsx("pre", { className: "text-xs bg-white p-3 rounded border overflow-x-auto", children: _jsx("code", { className: "text-gray-800", children: sweetAlertCode }) })] }))] }));
153
+ return (<div className="space-y-2">
154
+ <div className="flex items-center gap-2">
155
+ <div className="flex-1">
156
+ <SweetAlertExample triggerText={triggerText} triggerColor={color} color={color} variant={variant} icon={getIconForColor(color)} title={content.title} description={content.description} cancelText="Cancel" actionText={content.button} className="w-full"/>
157
+ </div>
158
+ <Button onClick={function () { return setShowCode(!showCode); }} variant="ghost" size="sm" title={showCode ? "Hide Code" : "Show Code"} className="text-gray-600 hover:text-gray-800 hover:bg-gray-100">
159
+ <LUIcon icon={showCode ? "eye-slash" : "eye"}/>
160
+ </Button>
161
+ </div>
162
+
163
+ {showCode && (<div className="p-3 bg-gray-50 border rounded-lg">
164
+ <div className="flex items-center justify-between mb-2">
165
+ <Body variant="body-sm" className="font-semibold text-gray-700">
166
+ {triggerText} - SweetAlert Code
167
+ </Body>
168
+ <Button onClick={function () { return navigator.clipboard.writeText(sweetAlertCode); }} variant="ghost" size="sm" title="Copy code to clipboard" className="text-xs text-blue-700 hover:bg-blue-200 bg-blue-100">
169
+ Copy Code
170
+ </Button>
171
+ </div>
172
+ <pre className="text-xs bg-white p-3 rounded border overflow-x-auto">
173
+ <code className="text-gray-800">{sweetAlertCode}</code>
174
+ </pre>
175
+ </div>)}
176
+ </div>);
140
177
  };
141
178
  // Component with eye icon to show code for all variants of a color
142
179
  var ColorVariantsWithEyeIcon = function (_a) {
@@ -152,10 +189,52 @@ var ColorVariantsWithEyeIcon = function (_a) {
152
189
  var allVariantsCode = variants
153
190
  .map(function (variant) { return generateVariantCode(variant); })
154
191
  .join("\n\n");
155
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Heading, { variant: "h4", className: "font-medium text-gray-700", children: colorName }), _jsx(Button, { onClick: function () { return setShowCode(!showCode); }, variant: "ghost", size: "sm", title: showCode ? "Hide Code" : "Show Code", className: "text-gray-600 hover:text-gray-800 hover:bg-gray-100", children: _jsx(LUIcon, { icon: showCode ? "eye-slash" : "eye" }) })] }), _jsx("div", { className: "flex flex-col gap-2", children: variants.map(function (variant) { return (_jsx(SweetAlertExample, { triggerText: "".concat(color, " - ").concat(variant.charAt(0).toUpperCase() + variant.slice(1)), triggerColor: color, color: color, variant: variant, icon: getIconForColor(color), title: "".concat(colorName, " Alert"), description: "This is a ".concat(color, " ").concat(variant, " variant alert."), showCancel: true, showAction: true, cancelText: "Cancel", actionText: "OK" }, variant)); }) }), showCode && (_jsxs("div", { className: "p-3 bg-gray-50 border rounded-lg", children: [_jsxs("div", { className: "flex items-center justify-between mb-2", children: [_jsxs(Body, { variant: "body-sm", className: "font-semibold text-gray-700", children: [colorName, " - All Variants Code"] }), _jsx(Button, { onClick: function () { return navigator.clipboard.writeText(allVariantsCode); }, variant: "ghost", size: "sm", title: "Copy code to clipboard", className: "text-xs text-blue-700 hover:bg-blue-200 bg-blue-100", children: "Copy Code" })] }), _jsx("pre", { className: "text-xs bg-white p-3 rounded border overflow-x-auto", children: _jsx("code", { className: "text-gray-800", children: allVariantsCode }) })] }))] }));
192
+ return (<div className="space-y-4">
193
+ <div className="flex items-center justify-between">
194
+ <Heading variant="h4" className="font-medium text-gray-700">
195
+ {colorName}
196
+ </Heading>
197
+ <Button onClick={function () { return setShowCode(!showCode); }} variant="ghost" size="sm" title={showCode ? "Hide Code" : "Show Code"} className="text-gray-600 hover:text-gray-800 hover:bg-gray-100">
198
+ <LUIcon icon={showCode ? "eye-slash" : "eye"}/>
199
+ </Button>
200
+ </div>
201
+
202
+ <div className="flex flex-col gap-2">
203
+ {variants.map(function (variant) { return (<SweetAlertExample key={variant} triggerText={"".concat(color, " - ").concat(variant.charAt(0).toUpperCase() + variant.slice(1))} triggerColor={color} color={color} variant={variant} icon={getIconForColor(color)} title={"".concat(colorName, " Alert")} description={"This is a ".concat(color, " ").concat(variant, " variant alert.")} showCancel={true} showAction={true} cancelText="Cancel" actionText="OK"/>); })}
204
+ </div>
205
+
206
+ {showCode && (<div className="p-3 bg-gray-50 border rounded-lg">
207
+ <div className="flex items-center justify-between mb-2">
208
+ <Body variant="body-sm" className="font-semibold text-gray-700">
209
+ {colorName} - All Variants Code
210
+ </Body>
211
+ <Button onClick={function () { return navigator.clipboard.writeText(allVariantsCode); }} variant="ghost" size="sm" title="Copy code to clipboard" className="text-xs text-blue-700 hover:bg-blue-200 bg-blue-100">
212
+ Copy Code
213
+ </Button>
214
+ </div>
215
+ <pre className="text-xs bg-white p-3 rounded border overflow-x-auto">
216
+ <code className="text-gray-800">{allVariantsCode}</code>
217
+ </pre>
218
+ </div>)}
219
+ </div>);
156
220
  };
157
221
  // Template for stories with args
158
- var Template = function (args) { return (_jsxs(SweetAlert, { children: [_jsx(SweetAlertTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", color: "blue", children: "Show Sweet Alert" }) }), _jsxs(SweetAlertContent, { shadow: args.shadow, color: args.color, variant: args.variant, children: [args.icon && _jsx(SweetAlertIcon, { icon: args.icon }), _jsx(SweetAlertTitle, { children: args.title }), _jsx(SweetAlertDescription, { children: args.description }), _jsxs(SweetAlertFooter, { children: [_jsx(SweetAlertCancel, { children: args.cancelText }), _jsx(SweetAlertAction, { children: args.actionText })] })] })] })); };
222
+ var Template = function (args) { return (<SweetAlert>
223
+ <SweetAlertTrigger asChild>
224
+ <Button variant="outline" color="blue">
225
+ Show Sweet Alert
226
+ </Button>
227
+ </SweetAlertTrigger>
228
+ <SweetAlertContent shadow={args.shadow} color={args.color} variant={args.variant}>
229
+ {args.icon && <SweetAlertIcon icon={args.icon}/>}
230
+ <SweetAlertTitle>{args.title}</SweetAlertTitle>
231
+ <SweetAlertDescription>{args.description}</SweetAlertDescription>
232
+ <SweetAlertFooter>
233
+ <SweetAlertCancel>{args.cancelText}</SweetAlertCancel>
234
+ <SweetAlertAction>{args.actionText}</SweetAlertAction>
235
+ </SweetAlertFooter>
236
+ </SweetAlertContent>
237
+ </SweetAlert>); };
159
238
  // Default story with all controls
160
239
  export var Default = Template.bind({});
161
240
  Default.args = {
@@ -241,7 +320,25 @@ Default.argTypes = {
241
320
  },
242
321
  };
243
322
  // Simple Example showing the exact code structure
244
- export var Example = function () { return (_jsxs(SweetAlert, { children: [_jsx(SweetAlertTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", color: "blue", children: "Show Sweet Alert" }) }), _jsxs(SweetAlertContent, { color: "blue", shadow: "none", children: [_jsx(SweetAlertIcon, { icon: "info" }), _jsx(SweetAlertTitle, { children: "Update Available" }), _jsx(SweetAlertDescription, { children: "A new version of the application is available. Would you like to update now? The update includes bug fixes and performance improvements." }), _jsxs(SweetAlertFooter, { children: [_jsx(SweetAlertCancel, { children: "Later" }), _jsx(SweetAlertAction, { children: "Update Now" })] })] })] })); };
323
+ export var Example = function () { return (<SweetAlert>
324
+ <SweetAlertTrigger asChild>
325
+ <Button variant="outline" color="blue">
326
+ Show Sweet Alert
327
+ </Button>
328
+ </SweetAlertTrigger>
329
+ <SweetAlertContent color="blue" shadow="none">
330
+ <SweetAlertIcon icon="info"/>
331
+ <SweetAlertTitle>Update Available</SweetAlertTitle>
332
+ <SweetAlertDescription>
333
+ A new version of the application is available. Would you like to update
334
+ now? The update includes bug fixes and performance improvements.
335
+ </SweetAlertDescription>
336
+ <SweetAlertFooter>
337
+ <SweetAlertCancel>Later</SweetAlertCancel>
338
+ <SweetAlertAction>Update Now</SweetAlertAction>
339
+ </SweetAlertFooter>
340
+ </SweetAlertContent>
341
+ </SweetAlert>); };
245
342
  Example.parameters = {
246
343
  docs: {
247
344
  description: {
@@ -250,7 +347,25 @@ Example.parameters = {
250
347
  },
251
348
  };
252
349
  // Basic Example - Shows the actual component code
253
- export var BasicExample = function () { return (_jsxs(SweetAlert, { children: [_jsx(SweetAlertTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", color: "blue", children: "Show Basic Alert" }) }), _jsxs(SweetAlertContent, { color: "blue", shadow: "none", children: [_jsx(SweetAlertIcon, { icon: "info" }), _jsx(SweetAlertTitle, { children: "Update Available" }), _jsx(SweetAlertDescription, { children: "A new version of the application is available. Would you like to update now? The update includes bug fixes and performance improvements." }), _jsxs(SweetAlertFooter, { children: [_jsx(SweetAlertCancel, { children: "Later" }), _jsx(SweetAlertAction, { children: "Update Now" })] })] })] })); };
350
+ export var BasicExample = function () { return (<SweetAlert>
351
+ <SweetAlertTrigger asChild>
352
+ <Button variant="outline" color="blue">
353
+ Show Basic Alert
354
+ </Button>
355
+ </SweetAlertTrigger>
356
+ <SweetAlertContent color="blue" shadow="none">
357
+ <SweetAlertIcon icon="info"/>
358
+ <SweetAlertTitle>Update Available</SweetAlertTitle>
359
+ <SweetAlertDescription>
360
+ A new version of the application is available. Would you like to update
361
+ now? The update includes bug fixes and performance improvements.
362
+ </SweetAlertDescription>
363
+ <SweetAlertFooter>
364
+ <SweetAlertCancel>Later</SweetAlertCancel>
365
+ <SweetAlertAction>Update Now</SweetAlertAction>
366
+ </SweetAlertFooter>
367
+ </SweetAlertContent>
368
+ </SweetAlert>); };
254
369
  BasicExample.parameters = {
255
370
  docs: {
256
371
  description: {
@@ -258,10 +373,20 @@ BasicExample.parameters = {
258
373
  },
259
374
  },
260
375
  };
261
- export var AllColors = function () { return (_jsxs("div", { className: "flex flex-col gap-8", children: [_jsx(Heading, { variant: "h3", className: "text-lg font-semibold", children: "All Color Variants" }), _jsx(Body, { variant: "body-sm", className: "text-gray-600", children: "Click the eye icon (\uD83D\uDC41\uFE0F) to view the code for each color variant" }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: colorOptions.map(function (color) {
262
- var content = getContentForColor(color);
263
- return (_jsx(ColorVariantWithEyeIcon, { color: color, content: content }, color));
264
- }) })] })); };
376
+ export var AllColors = function () { return (<div className="flex flex-col gap-8">
377
+ <Heading variant="h3" className="text-lg font-semibold">
378
+ All Color Variants
379
+ </Heading>
380
+ <Body variant="body-sm" className="text-gray-600">
381
+ Click the eye icon (👁️) to view the code for each color variant
382
+ </Body>
383
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
384
+ {colorOptions.map(function (color) {
385
+ var content = getContentForColor(color);
386
+ return (<ColorVariantWithEyeIcon key={color} color={color} content={content}/>);
387
+ })}
388
+ </div>
389
+ </div>); };
265
390
  AllColors.parameters = {
266
391
  docs: {
267
392
  source: {
@@ -269,7 +394,17 @@ AllColors.parameters = {
269
394
  },
270
395
  },
271
396
  };
272
- export var ColorVariants = function () { return (_jsxs("div", { className: "flex flex-col gap-8", children: [_jsx(Heading, { variant: "h3", className: "text-lg font-semibold", children: "Color Variant Examples" }), _jsx(Body, { variant: "body-sm", className: "text-gray-600", children: "Click the eye icon (\uD83D\uDC41\uFE0F) to view the code for each color variant" }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: colorOptions.map(function (color) { return (_jsx(ColorVariantsWithEyeIcon, { color: color }, color)); }) })] })); };
397
+ export var ColorVariants = function () { return (<div className="flex flex-col gap-8">
398
+ <Heading variant="h3" className="text-lg font-semibold">
399
+ Color Variant Examples
400
+ </Heading>
401
+ <Body variant="body-sm" className="text-gray-600">
402
+ Click the eye icon (👁️) to view the code for each color variant
403
+ </Body>
404
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
405
+ {colorOptions.map(function (color) { return (<ColorVariantsWithEyeIcon key={color} color={color}/>); })}
406
+ </div>
407
+ </div>); };
273
408
  ColorVariants.parameters = {
274
409
  docs: {
275
410
  source: {
@@ -277,7 +412,14 @@ ColorVariants.parameters = {
277
412
  },
278
413
  },
279
414
  };
280
- export var RealWorldExamples = function () { return (_jsxs("div", { className: "flex flex-col gap-8", children: [_jsx(Heading, { variant: "h3", className: "text-lg font-semibold", children: "Real-world Use Cases" }), _jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: realWorldExamples.map(function (example, index) { return (_jsx(SweetAlertExample, { triggerText: example.triggerText, triggerColor: example.triggerColor, shadow: example.shadow, color: example.color, variant: example.variant, icon: example.icon, title: example.title, description: example.description, cancelText: example.cancelText, actionText: example.actionText, className: "w-full" }, index)); }) })] })); };
415
+ export var RealWorldExamples = function () { return (<div className="flex flex-col gap-8">
416
+ <Heading variant="h3" className="text-lg font-semibold">
417
+ Real-world Use Cases
418
+ </Heading>
419
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
420
+ {realWorldExamples.map(function (example, index) { return (<SweetAlertExample key={index} triggerText={example.triggerText} triggerColor={example.triggerColor} shadow={example.shadow} color={example.color} variant={example.variant} icon={example.icon} title={example.title} description={example.description} cancelText={example.cancelText} actionText={example.actionText} className="w-full"/>); })}
421
+ </div>
422
+ </div>); };
281
423
  RealWorldExamples.parameters = {
282
424
  docs: {
283
425
  source: {
@@ -286,7 +428,39 @@ RealWorldExamples.parameters = {
286
428
  },
287
429
  };
288
430
  // Button Configuration Variants - Comprehensive Examples
289
- export var ButtonVariants = function () { return (_jsxs("div", { className: "flex flex-col gap-8", children: [_jsx(Heading, { variant: "h3", className: "text-lg font-semibold", children: "Button Configuration Variants" }), _jsxs("div", { className: "space-y-4", children: [_jsx(Heading, { variant: "h4", className: "font-medium text-gray-700", children: "Single Button (Action Only)" }), _jsxs("div", { className: "flex flex-wrap gap-4", children: [_jsx(SweetAlertExample, { triggerText: "Success Message", triggerColor: "light-green", color: "green", icon: "check", title: "Message Sent", description: "Your message has been delivered successfully to all recipients.", showCancel: false, actionText: "Close" }), _jsx(SweetAlertExample, { triggerText: "Error Alert", triggerColor: "light-red", shadow: "lg", color: "red", icon: "star", title: "Connection Failed", description: "Unable to connect to the server. Please check your internet connection and try again.", showCancel: false, actionText: "Retry" }), _jsx(SweetAlertExample, { triggerText: "Installation Complete", triggerColor: "blue", color: "green", icon: "check", title: "Installation Complete", description: "The application has been successfully installed on your device. You can now start using all the features.", showCancel: false, actionText: "Start Using App" })] })] }), _jsxs("div", { className: "space-y-4", children: [_jsx(Heading, { variant: "h4", className: "font-medium text-gray-700", children: "Both Buttons (Cancel + Action)" }), _jsxs("div", { className: "flex flex-wrap gap-4", children: [_jsx(SweetAlertExample, { triggerText: "Confirm Action", triggerColor: "blue", color: "blue", icon: "info", title: "Confirm Your Action", description: "Do you want to proceed with this action? This will update your settings and preferences.", cancelText: "No, Cancel", actionText: "Yes, Proceed" }), _jsx(SweetAlertExample, { triggerText: "Delete Confirmation", triggerColor: "light-red", color: "red", icon: "star", title: "Confirm Deletion", description: "Are you sure you want to delete this item? This action cannot be undone.", cancelText: "Cancel", actionText: "Delete" }), _jsx(SweetAlertExample, { triggerText: "Save Changes", triggerColor: "blue", color: "blue", title: "Save Draft", description: "You have unsaved changes in your document. Would you like to save them as a draft before leaving?", cancelText: "Discard Changes", actionText: "Save Draft" })] })] })] })); };
431
+ export var ButtonVariants = function () { return (<div className="flex flex-col gap-8">
432
+ <Heading variant="h3" className="text-lg font-semibold">
433
+ Button Configuration Variants
434
+ </Heading>
435
+
436
+ {/* Single Button Examples */}
437
+ <div className="space-y-4">
438
+ <Heading variant="h4" className="font-medium text-gray-700">
439
+ Single Button (Action Only)
440
+ </Heading>
441
+ <div className="flex flex-wrap gap-4">
442
+ <SweetAlertExample triggerText="Success Message" triggerColor="light-green" color="green" icon="check" title="Message Sent" description="Your message has been delivered successfully to all recipients." showCancel={false} actionText="Close"/>
443
+
444
+ <SweetAlertExample triggerText="Error Alert" triggerColor="light-red" shadow="lg" color="red" icon="star" title="Connection Failed" description="Unable to connect to the server. Please check your internet connection and try again." showCancel={false} actionText="Retry"/>
445
+
446
+ <SweetAlertExample triggerText="Installation Complete" triggerColor="blue" color="green" icon="check" title="Installation Complete" description="The application has been successfully installed on your device. You can now start using all the features." showCancel={false} actionText="Start Using App"/>
447
+ </div>
448
+ </div>
449
+
450
+ {/* Both Buttons Examples */}
451
+ <div className="space-y-4">
452
+ <Heading variant="h4" className="font-medium text-gray-700">
453
+ Both Buttons (Cancel + Action)
454
+ </Heading>
455
+ <div className="flex flex-wrap gap-4">
456
+ <SweetAlertExample triggerText="Confirm Action" triggerColor="blue" color="blue" icon="info" title="Confirm Your Action" description="Do you want to proceed with this action? This will update your settings and preferences." cancelText="No, Cancel" actionText="Yes, Proceed"/>
457
+
458
+ <SweetAlertExample triggerText="Delete Confirmation" triggerColor="light-red" color="red" icon="star" title="Confirm Deletion" description="Are you sure you want to delete this item? This action cannot be undone." cancelText="Cancel" actionText="Delete"/>
459
+
460
+ <SweetAlertExample triggerText="Save Changes" triggerColor="blue" color="blue" title="Save Draft" description="You have unsaved changes in your document. Would you like to save them as a draft before leaving?" cancelText="Discard Changes" actionText="Save Draft"/>
461
+ </div>
462
+ </div>
463
+ </div>); };
290
464
  ButtonVariants.parameters = {
291
465
  docs: {
292
466
  source: {
@@ -295,7 +469,33 @@ ButtonVariants.parameters = {
295
469
  },
296
470
  };
297
471
  // Story showing how to customize the SweetAlert
298
- export var CustomizeAlert = function () { return (_jsxs(SweetAlert, { children: [_jsx(SweetAlertTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", color: "blue", children: "Customize Alert" }) }), _jsxs(SweetAlertContent, { color: "red", shadow: "lg", variant: "fill", children: [_jsx(SweetAlertIcon, { icon: "info" }), _jsx(SweetAlertTitle, { children: _jsx(Heading, { variant: "h1-700", children: "Customize Alert Title" }) }), _jsx(SweetAlertDescription, { children: _jsx(Body, { variant: "body-xs", children: "This SweetAlert uses customized styling with a red background, large icon, and custom typography." }) }), _jsxs(SweetAlertFooter, { children: [_jsx(SweetAlertCancel, { variant: "fill", color: "light-indigo", children: "Close" }), _jsx(SweetAlertAction, { variant: "outline", color: "light-green", children: "OK" })] })] })] })); };
472
+ export var CustomizeAlert = function () { return (<SweetAlert>
473
+ <SweetAlertTrigger asChild>
474
+ <Button variant="outline" color="blue">
475
+ Customize Alert
476
+ </Button>
477
+ </SweetAlertTrigger>
478
+ <SweetAlertContent color="red" shadow="lg" variant="fill">
479
+ <SweetAlertIcon icon="info"/>
480
+ <SweetAlertTitle>
481
+ <Heading variant="h1-700">Customize Alert Title</Heading>
482
+ </SweetAlertTitle>
483
+ <SweetAlertDescription>
484
+ <Body variant="body-xs">
485
+ This SweetAlert uses customized styling with a red background, large
486
+ icon, and custom typography.
487
+ </Body>
488
+ </SweetAlertDescription>
489
+ <SweetAlertFooter>
490
+ <SweetAlertCancel variant="fill" color="light-indigo">
491
+ Close
492
+ </SweetAlertCancel>
493
+ <SweetAlertAction variant="outline" color="light-green">
494
+ OK
495
+ </SweetAlertAction>
496
+ </SweetAlertFooter>
497
+ </SweetAlertContent>
498
+ </SweetAlert>); };
299
499
  CustomizeAlert.parameters = {
300
500
  docs: {
301
501
  description: {
@@ -1,22 +1,10 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
1
  import { size, Switch, variant } from "./switch";
14
2
  export default {
15
3
  title: "Components/Switch",
16
4
  component: Switch,
17
5
  tags: ["autodocs"],
18
6
  };
19
- var Template = function (args) { return _jsx(Switch, __assign({}, args)); };
7
+ var Template = function (args) { return <Switch {...args}></Switch>; };
20
8
  export var _Switch = Template.bind({});
21
9
  _Switch.args = {
22
10
  size: "md",
@@ -18,5 +18,5 @@ declare const switchVariants: (props?: ({
18
18
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
19
19
  export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, VariantProps<typeof switchVariants> {
20
20
  }
21
- declare function Switch({ className, size, variant, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function Switch({ className, size, variant, ...props }: SwitchProps): React.JSX.Element;
22
22
  export { Switch };
@@ -1,14 +1,3 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  var __rest = (this && this.__rest) || function (s, e) {
13
2
  var t = {};
14
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -20,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
9
  }
21
10
  return t;
22
11
  };
23
- import { jsx as _jsx } from "react/jsx-runtime";
12
+ import * as React from "react";
24
13
  import * as SwitchPrimitive from "@radix-ui/react-switch";
25
14
  import { cva } from "class-variance-authority";
26
15
  import { cn } from "../../lib/utils";
@@ -65,6 +54,8 @@ var thumbTranslateVariants = {
65
54
  };
66
55
  function Switch(_a) {
67
56
  var className = _a.className, size = _a.size, variant = _a.variant, props = __rest(_a, ["className", "size", "variant"]);
68
- return (_jsx(SwitchPrimitive.Root, __assign({ "data-slot": "switch", className: cn(switchVariants({ size: size, variant: variant }), className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn(thumbVariants({ size: size }), size ? thumbTranslateVariants[size] : "", "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground") }) })));
57
+ return (<SwitchPrimitive.Root data-slot="switch" className={cn(switchVariants({ size: size, variant: variant }), className)} {...props}>
58
+ <SwitchPrimitive.Thumb data-slot="switch-thumb" className={cn(thumbVariants({ size: size }), size ? thumbTranslateVariants[size] : "", "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")}/>
59
+ </SwitchPrimitive.Root>);
69
60
  }
70
61
  export { Switch };