@szum-tech/design-system 3.17.0 → 3.18.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 (299) hide show
  1. package/dist/chunk-D5PAWOAZ.cjs +1 -0
  2. package/dist/chunk-JUNHRB4B.js +1 -0
  3. package/dist/chunk-P7BFOJLM.cjs +3 -0
  4. package/dist/chunk-ZYG2KYKK.js +3 -0
  5. package/dist/components/index.cjs +1 -924
  6. package/dist/components/index.d.cts +1650 -56
  7. package/dist/components/index.d.ts +1650 -56
  8. package/dist/components/index.js +1 -43
  9. package/dist/hooks/index.cjs +1 -35
  10. package/dist/hooks/index.js +1 -2
  11. package/dist/icons/index.cjs +2 -93
  12. package/dist/icons/index.js +2 -88
  13. package/dist/utils/index.cjs +1 -10
  14. package/dist/utils/index.js +1 -1
  15. package/package.json +30 -38
  16. package/dist/chunk-2WQJ36RD.cjs +0 -78
  17. package/dist/chunk-2Y2ZCPNV.cjs +0 -61
  18. package/dist/chunk-35H6T7OQ.cjs +0 -2912
  19. package/dist/chunk-375QAB65.cjs +0 -145
  20. package/dist/chunk-3DP3VMPN.js +0 -173
  21. package/dist/chunk-3GNVQFCK.cjs +0 -50
  22. package/dist/chunk-3RK5PCIC.js +0 -86
  23. package/dist/chunk-3WSQRFUY.cjs +0 -11
  24. package/dist/chunk-4LNGZHF2.cjs +0 -33
  25. package/dist/chunk-4TRADSTP.js +0 -34
  26. package/dist/chunk-5B37TQYT.cjs +0 -18
  27. package/dist/chunk-5F2Y65JH.js +0 -32
  28. package/dist/chunk-5MJPZUTO.js +0 -38
  29. package/dist/chunk-5MV54MWS.js +0 -46
  30. package/dist/chunk-6BSR3O2J.js +0 -53
  31. package/dist/chunk-6HX7ETL3.cjs +0 -183
  32. package/dist/chunk-7OD2NBSV.cjs +0 -50
  33. package/dist/chunk-A72LE53B.js +0 -21
  34. package/dist/chunk-A7SBXO2Y.cjs +0 -40
  35. package/dist/chunk-AAPMLWYK.js +0 -2831
  36. package/dist/chunk-B4M7Q5KX.cjs +0 -25
  37. package/dist/chunk-B7RHEMZH.js +0 -48
  38. package/dist/chunk-BTSHACKG.js +0 -123
  39. package/dist/chunk-BUJO4FB6.js +0 -252
  40. package/dist/chunk-CL2C6STG.cjs +0 -278
  41. package/dist/chunk-CXHDWIGF.cjs +0 -89
  42. package/dist/chunk-DGWBE2Y3.cjs +0 -205
  43. package/dist/chunk-DUAM4RTP.cjs +0 -23
  44. package/dist/chunk-EOTQVIA5.js +0 -993
  45. package/dist/chunk-EUH466AL.cjs +0 -179
  46. package/dist/chunk-F7NFSDOD.cjs +0 -91
  47. package/dist/chunk-G24PWQKG.js +0 -20
  48. package/dist/chunk-GEDBA3JU.cjs +0 -49
  49. package/dist/chunk-GYXQUTWZ.cjs +0 -59
  50. package/dist/chunk-H2BWO3SI.cjs +0 -11
  51. package/dist/chunk-H5NHGMSQ.js +0 -136
  52. package/dist/chunk-HCHVDUI6.cjs +0 -34
  53. package/dist/chunk-HNRVLRMN.js +0 -82
  54. package/dist/chunk-HPICKLBZ.cjs +0 -204
  55. package/dist/chunk-I3E75OQX.js +0 -16
  56. package/dist/chunk-I3RSTJP6.js +0 -20
  57. package/dist/chunk-IWF52DDE.js +0 -55
  58. package/dist/chunk-IZU3KULT.js +0 -41
  59. package/dist/chunk-K5AURCK5.js +0 -183
  60. package/dist/chunk-KTAIBRTH.cjs +0 -10
  61. package/dist/chunk-L2TRMQNN.js +0 -130
  62. package/dist/chunk-M7NIRB3U.js +0 -43
  63. package/dist/chunk-MNDQXDV4.cjs +0 -607
  64. package/dist/chunk-N4TYSZSU.cjs +0 -44
  65. package/dist/chunk-NU5UQPBX.cjs +0 -25
  66. package/dist/chunk-NXEZE7LG.js +0 -15
  67. package/dist/chunk-OCOCENE6.js +0 -42
  68. package/dist/chunk-OQCNPNPS.js +0 -23
  69. package/dist/chunk-OXZQGDTR.js +0 -208
  70. package/dist/chunk-OZSNSRLV.cjs +0 -1027
  71. package/dist/chunk-P4IL77YC.js +0 -66
  72. package/dist/chunk-P4JIMFSL.js +0 -51
  73. package/dist/chunk-P5IUC7HJ.js +0 -9
  74. package/dist/chunk-PBEZZMAB.js +0 -25
  75. package/dist/chunk-RKFU4DS3.cjs +0 -1064
  76. package/dist/chunk-S3ANEJJ7.cjs +0 -22
  77. package/dist/chunk-S3ZUFD6U.js +0 -23
  78. package/dist/chunk-SHPJGB2L.cjs +0 -19
  79. package/dist/chunk-TH44JYXB.cjs +0 -27
  80. package/dist/chunk-TMXVL5CV.cjs +0 -48
  81. package/dist/chunk-U3QKV7I4.js +0 -54
  82. package/dist/chunk-U7XZJQ4O.js +0 -36
  83. package/dist/chunk-UJX74PFK.cjs +0 -46
  84. package/dist/chunk-ULEEQ723.cjs +0 -108
  85. package/dist/chunk-UNOMGKAZ.cjs +0 -141
  86. package/dist/chunk-USIW3VT5.cjs +0 -73
  87. package/dist/chunk-VK2FJ65F.js +0 -575
  88. package/dist/chunk-VK5EX3OG.cjs +0 -132
  89. package/dist/chunk-WCQ5WKCQ.js +0 -1042
  90. package/dist/chunk-WMGJCB7O.js +0 -157
  91. package/dist/chunk-X3ZT3KGX.cjs +0 -53
  92. package/dist/chunk-X5O7GP4S.js +0 -48
  93. package/dist/chunk-X7WREEFD.js +0 -8
  94. package/dist/chunk-XENOUBSI.cjs +0 -37
  95. package/dist/chunk-XKCLVPUC.js +0 -176
  96. package/dist/chunk-XTKD76O5.js +0 -29
  97. package/dist/chunk-YBFG2IRJ.cjs +0 -225
  98. package/dist/chunk-YEFLGE3L.cjs +0 -47
  99. package/dist/chunk-YUMKV5TH.js +0 -56
  100. package/dist/chunk-ZD2QRAOX.js +0 -9
  101. package/dist/chunk-ZVF7J4EI.cjs +0 -58
  102. package/dist/color-picker.types-GI7dq2Ig.d.cts +0 -42
  103. package/dist/color-picker.types-GI7dq2Ig.d.ts +0 -42
  104. package/dist/components/accordion/index.cjs +0 -23
  105. package/dist/components/accordion/index.d.cts +0 -17
  106. package/dist/components/accordion/index.d.ts +0 -17
  107. package/dist/components/accordion/index.js +0 -2
  108. package/dist/components/alert/index.cjs +0 -19
  109. package/dist/components/alert/index.d.cts +0 -24
  110. package/dist/components/alert/index.d.ts +0 -24
  111. package/dist/components/alert/index.js +0 -2
  112. package/dist/components/alert-dialog/index.cjs +0 -43
  113. package/dist/components/alert-dialog/index.d.cts +0 -32
  114. package/dist/components/alert-dialog/index.d.ts +0 -32
  115. package/dist/components/alert-dialog/index.js +0 -2
  116. package/dist/components/avatar/index.cjs +0 -19
  117. package/dist/components/avatar/index.d.cts +0 -14
  118. package/dist/components/avatar/index.d.ts +0 -14
  119. package/dist/components/avatar/index.js +0 -2
  120. package/dist/components/badge/index.cjs +0 -19
  121. package/dist/components/badge/index.d.cts +0 -28
  122. package/dist/components/badge/index.d.ts +0 -28
  123. package/dist/components/badge/index.js +0 -2
  124. package/dist/components/badge-overflow/index.cjs +0 -183
  125. package/dist/components/badge-overflow/index.d.cts +0 -21
  126. package/dist/components/badge-overflow/index.d.ts +0 -21
  127. package/dist/components/badge-overflow/index.js +0 -161
  128. package/dist/components/breadcrump/index.cjs +0 -80
  129. package/dist/components/breadcrump/index.d.cts +0 -21
  130. package/dist/components/breadcrump/index.d.ts +0 -21
  131. package/dist/components/breadcrump/index.js +0 -72
  132. package/dist/components/button/index.cjs +0 -52
  133. package/dist/components/button/index.d.cts +0 -58
  134. package/dist/components/button/index.d.ts +0 -58
  135. package/dist/components/button/index.js +0 -43
  136. package/dist/components/card/index.cjs +0 -35
  137. package/dist/components/card/index.d.cts +0 -25
  138. package/dist/components/card/index.d.ts +0 -25
  139. package/dist/components/card/index.js +0 -2
  140. package/dist/components/carousel/index.cjs +0 -269
  141. package/dist/components/carousel/index.d.cts +0 -48
  142. package/dist/components/carousel/index.d.ts +0 -48
  143. package/dist/components/carousel/index.js +0 -238
  144. package/dist/components/checkbox/index.cjs +0 -11
  145. package/dist/components/checkbox/index.d.cts +0 -8
  146. package/dist/components/checkbox/index.d.ts +0 -8
  147. package/dist/components/checkbox/index.js +0 -2
  148. package/dist/components/collapsible/index.cjs +0 -18
  149. package/dist/components/collapsible/index.d.cts +0 -12
  150. package/dist/components/collapsible/index.d.ts +0 -12
  151. package/dist/components/collapsible/index.js +0 -1
  152. package/dist/components/color-picker/index.cjs +0 -92
  153. package/dist/components/color-picker/index.d.cts +0 -71
  154. package/dist/components/color-picker/index.d.ts +0 -71
  155. package/dist/components/color-picker/index.js +0 -43
  156. package/dist/components/color-swatch/index.cjs +0 -11
  157. package/dist/components/color-swatch/index.d.cts +0 -22
  158. package/dist/components/color-swatch/index.d.ts +0 -22
  159. package/dist/components/color-swatch/index.js +0 -2
  160. package/dist/components/counting-number/index.cjs +0 -11
  161. package/dist/components/counting-number/index.d.cts +0 -57
  162. package/dist/components/counting-number/index.d.ts +0 -57
  163. package/dist/components/counting-number/index.js +0 -2
  164. package/dist/components/dialog/index.cjs +0 -39
  165. package/dist/components/dialog/index.d.cts +0 -42
  166. package/dist/components/dialog/index.d.ts +0 -42
  167. package/dist/components/dialog/index.js +0 -2
  168. package/dist/components/dropdown-menu/index.cjs +0 -71
  169. package/dist/components/dropdown-menu/index.d.cts +0 -67
  170. package/dist/components/dropdown-menu/index.d.ts +0 -67
  171. package/dist/components/dropdown-menu/index.js +0 -2
  172. package/dist/components/empty/index.cjs +0 -31
  173. package/dist/components/empty/index.d.cts +0 -29
  174. package/dist/components/empty/index.d.ts +0 -29
  175. package/dist/components/empty/index.js +0 -2
  176. package/dist/components/field/index.cjs +0 -49
  177. package/dist/components/field/index.d.cts +0 -50
  178. package/dist/components/field/index.d.ts +0 -50
  179. package/dist/components/field/index.js +0 -4
  180. package/dist/components/file-upload/index.cjs +0 -60
  181. package/dist/components/file-upload/index.d.cts +0 -131
  182. package/dist/components/file-upload/index.d.ts +0 -131
  183. package/dist/components/file-upload/index.js +0 -3
  184. package/dist/components/header/index.cjs +0 -11
  185. package/dist/components/header/index.d.cts +0 -18
  186. package/dist/components/header/index.d.ts +0 -18
  187. package/dist/components/header/index.js +0 -2
  188. package/dist/components/input/index.cjs +0 -11
  189. package/dist/components/input/index.d.cts +0 -9
  190. package/dist/components/input/index.d.ts +0 -9
  191. package/dist/components/input/index.js +0 -2
  192. package/dist/components/item/index.cjs +0 -48
  193. package/dist/components/item/index.d.cts +0 -61
  194. package/dist/components/item/index.d.ts +0 -61
  195. package/dist/components/item/index.js +0 -3
  196. package/dist/components/label/index.cjs +0 -11
  197. package/dist/components/label/index.d.cts +0 -8
  198. package/dist/components/label/index.d.ts +0 -8
  199. package/dist/components/label/index.js +0 -2
  200. package/dist/components/marquee/index.cjs +0 -11
  201. package/dist/components/marquee/index.d.cts +0 -48
  202. package/dist/components/marquee/index.d.ts +0 -48
  203. package/dist/components/marquee/index.js +0 -2
  204. package/dist/components/masonry/index.cjs +0 -16
  205. package/dist/components/masonry/index.d.cts +0 -181
  206. package/dist/components/masonry/index.d.ts +0 -181
  207. package/dist/components/masonry/index.js +0 -3
  208. package/dist/components/popover/index.cjs +0 -35
  209. package/dist/components/popover/index.d.cts +0 -18
  210. package/dist/components/popover/index.d.ts +0 -18
  211. package/dist/components/popover/index.js +0 -2
  212. package/dist/components/progress/index.cjs +0 -11
  213. package/dist/components/progress/index.d.cts +0 -8
  214. package/dist/components/progress/index.d.ts +0 -8
  215. package/dist/components/progress/index.js +0 -2
  216. package/dist/components/radio-group/index.cjs +0 -15
  217. package/dist/components/radio-group/index.d.cts +0 -22
  218. package/dist/components/radio-group/index.d.ts +0 -22
  219. package/dist/components/radio-group/index.js +0 -2
  220. package/dist/components/scroll-area/index.cjs +0 -15
  221. package/dist/components/scroll-area/index.d.cts +0 -11
  222. package/dist/components/scroll-area/index.d.ts +0 -11
  223. package/dist/components/scroll-area/index.js +0 -2
  224. package/dist/components/select/index.cjs +0 -31
  225. package/dist/components/select/index.d.cts +0 -22
  226. package/dist/components/select/index.d.ts +0 -22
  227. package/dist/components/select/index.js +0 -2
  228. package/dist/components/separator/index.cjs +0 -11
  229. package/dist/components/separator/index.d.cts +0 -8
  230. package/dist/components/separator/index.d.ts +0 -8
  231. package/dist/components/separator/index.js +0 -2
  232. package/dist/components/sheet/index.cjs +0 -39
  233. package/dist/components/sheet/index.d.cts +0 -42
  234. package/dist/components/sheet/index.d.ts +0 -42
  235. package/dist/components/sheet/index.js +0 -2
  236. package/dist/components/sidebar/index.cjs +0 -148
  237. package/dist/components/sidebar/index.d.cts +0 -135
  238. package/dist/components/sidebar/index.d.ts +0 -135
  239. package/dist/components/sidebar/index.js +0 -43
  240. package/dist/components/skeleton/index.cjs +0 -11
  241. package/dist/components/skeleton/index.d.cts +0 -7
  242. package/dist/components/skeleton/index.d.ts +0 -7
  243. package/dist/components/skeleton/index.js +0 -2
  244. package/dist/components/sortable/index.cjs +0 -27
  245. package/dist/components/sortable/index.d.cts +0 -50
  246. package/dist/components/sortable/index.d.ts +0 -50
  247. package/dist/components/sortable/index.js +0 -2
  248. package/dist/components/spinner/index.cjs +0 -11
  249. package/dist/components/spinner/index.d.cts +0 -7
  250. package/dist/components/spinner/index.d.ts +0 -7
  251. package/dist/components/spinner/index.js +0 -2
  252. package/dist/components/status/index.cjs +0 -19
  253. package/dist/components/status/index.d.cts +0 -25
  254. package/dist/components/status/index.d.ts +0 -25
  255. package/dist/components/status/index.js +0 -2
  256. package/dist/components/stepper/index.cjs +0 -124
  257. package/dist/components/stepper/index.d.cts +0 -164
  258. package/dist/components/stepper/index.d.ts +0 -164
  259. package/dist/components/stepper/index.js +0 -43
  260. package/dist/components/switch/index.cjs +0 -11
  261. package/dist/components/switch/index.d.cts +0 -19
  262. package/dist/components/switch/index.d.ts +0 -19
  263. package/dist/components/switch/index.js +0 -2
  264. package/dist/components/tabs/index.cjs +0 -23
  265. package/dist/components/tabs/index.d.cts +0 -17
  266. package/dist/components/tabs/index.d.ts +0 -17
  267. package/dist/components/tabs/index.js +0 -2
  268. package/dist/components/textarea/index.cjs +0 -11
  269. package/dist/components/textarea/index.d.cts +0 -9
  270. package/dist/components/textarea/index.d.ts +0 -9
  271. package/dist/components/textarea/index.js +0 -2
  272. package/dist/components/timeline/index.cjs +0 -45
  273. package/dist/components/timeline/index.d.cts +0 -63
  274. package/dist/components/timeline/index.d.ts +0 -63
  275. package/dist/components/timeline/index.js +0 -4
  276. package/dist/components/toaster/index.cjs +0 -56
  277. package/dist/components/toaster/index.d.cts +0 -8
  278. package/dist/components/toaster/index.d.ts +0 -8
  279. package/dist/components/toaster/index.js +0 -43
  280. package/dist/components/tooltip/index.cjs +0 -19
  281. package/dist/components/tooltip/index.d.cts +0 -12
  282. package/dist/components/tooltip/index.d.ts +0 -12
  283. package/dist/components/tooltip/index.js +0 -2
  284. package/dist/components/typing-text/index.cjs +0 -11
  285. package/dist/components/typing-text/index.d.cts +0 -41
  286. package/dist/components/typing-text/index.d.ts +0 -41
  287. package/dist/components/typing-text/index.js +0 -2
  288. package/dist/components/word-rotate/index.cjs +0 -11
  289. package/dist/components/word-rotate/index.d.cts +0 -30
  290. package/dist/components/word-rotate/index.d.ts +0 -30
  291. package/dist/components/word-rotate/index.js +0 -2
  292. package/dist/direction-CUOPDLCj.d.cts +0 -7
  293. package/dist/direction-CUOPDLCj.d.ts +0 -7
  294. package/dist/popover-trigger-Cf4PPj0z.d.cts +0 -14
  295. package/dist/popover-trigger-Cf4PPj0z.d.ts +0 -14
  296. package/dist/select-Bf6XQtt-.d.cts +0 -12
  297. package/dist/select-Bf6XQtt-.d.ts +0 -12
  298. package/dist/tooltip-content-DqtogPBq.d.cts +0 -8
  299. package/dist/tooltip-content-DqtogPBq.d.ts +0 -8
@@ -1,575 +0,0 @@
1
- import { useLazyRef, useIsomorphicLayoutEffect } from './chunk-G24PWQKG.js';
2
- import { cn } from './chunk-ZD2QRAOX.js';
3
- import * as React2 from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
- import { Slot } from '@radix-ui/react-slot';
6
- import { cva } from 'class-variance-authority';
7
-
8
- var DirectionContext = React2.createContext(void 0);
9
- function useDirection(localDir) {
10
- const globalDir = React2.useContext(DirectionContext);
11
- return localDir || globalDir || "ltr";
12
- }
13
-
14
- // src/components/timeline/timeline.constants.ts
15
- var TIMELINE_ROOT_NAME = "Timeline";
16
- var TIMELINE_ITEM_NAME = "TimelineItem";
17
- var TIMELINE_CONTENT_NAME = "TimelineContent";
18
- var TIMELINE_CONNECTOR_NAME = "TimelineConnector";
19
- var TIMELINE_DOT_NAME = "TimelineDot";
20
-
21
- // src/components/timeline/timeline.store.tsx
22
- var TimelineStoreContext = React2.createContext(null);
23
- function useTimelineStore(selector) {
24
- const store = React2.useContext(TimelineStoreContext);
25
- if (!store) {
26
- throw new Error(`\`useTimelineStore\` must be used within \`${TIMELINE_ROOT_NAME}\``);
27
- }
28
- const getSnapshot = React2.useCallback(() => selector(store), [store, selector]);
29
- return React2.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
30
- }
31
- function useTimelineStoreContext(consumerName) {
32
- const context = React2.useContext(TimelineStoreContext);
33
- if (!context) {
34
- throw new Error(`\`${consumerName}\` must be used within \`${TIMELINE_ROOT_NAME}\``);
35
- }
36
- return context;
37
- }
38
-
39
- // src/components/timeline/timeline.utils.ts
40
- function getItemStatus(itemIndex, activeIndex) {
41
- if (activeIndex === void 0) return "pending";
42
- if (itemIndex < activeIndex) return "completed";
43
- if (itemIndex === activeIndex) return "active";
44
- return "pending";
45
- }
46
- function getSortedEntries(entries) {
47
- return entries.sort((a, b) => {
48
- const elementA = a[1].current;
49
- const elementB = b[1].current;
50
- if (!elementA || !elementB) return 0;
51
- const position = elementA.compareDocumentPosition(elementB);
52
- if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
53
- if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
54
- return 0;
55
- });
56
- }
57
- var TimelineContext = React2.createContext(null);
58
- function useTimelineContext(consumerName) {
59
- const context = React2.useContext(TimelineContext);
60
- if (!context) {
61
- throw new Error(`\`${consumerName}\` must be used within \`${TIMELINE_ROOT_NAME}\``);
62
- }
63
- return context;
64
- }
65
- var timelineVariants = cva(
66
- "relative flex [--timeline-connector-thickness:0.125rem] [--timeline-dot-size:0.875rem]",
67
- {
68
- variants: {
69
- orientation: {
70
- vertical: "flex-col",
71
- horizontal: "flex-row items-start"
72
- },
73
- variant: {
74
- default: "",
75
- alternate: ""
76
- }
77
- },
78
- compoundVariants: [
79
- {
80
- orientation: "vertical",
81
- variant: "default",
82
- class: "gap-6"
83
- },
84
- {
85
- orientation: "horizontal",
86
- variant: "default",
87
- class: "gap-8"
88
- },
89
- {
90
- orientation: "vertical",
91
- variant: "alternate",
92
- class: "relative w-full gap-3"
93
- },
94
- {
95
- orientation: "horizontal",
96
- variant: "alternate",
97
- class: "items-center gap-4"
98
- }
99
- ],
100
- defaultVariants: {
101
- orientation: "vertical",
102
- variant: "default"
103
- }
104
- }
105
- );
106
- var timelineItemVariants = cva("relative flex", {
107
- variants: {
108
- orientation: {
109
- vertical: "",
110
- horizontal: ""
111
- },
112
- variant: {
113
- default: "",
114
- alternate: ""
115
- },
116
- isAlternateRight: {
117
- true: "",
118
- false: ""
119
- }
120
- },
121
- compoundVariants: [
122
- {
123
- orientation: "vertical",
124
- variant: "default",
125
- class: "gap-3 pb-8 last:pb-0"
126
- },
127
- {
128
- orientation: "horizontal",
129
- variant: "default",
130
- class: "flex-col gap-3"
131
- },
132
- {
133
- orientation: "vertical",
134
- variant: "alternate",
135
- isAlternateRight: false,
136
- class: "w-1/2 gap-3 pr-6 pb-12 last:pb-0"
137
- },
138
- {
139
- orientation: "vertical",
140
- variant: "alternate",
141
- isAlternateRight: true,
142
- class: "ml-auto w-1/2 flex-row-reverse gap-3 pb-12 pl-6 last:pb-0"
143
- },
144
- {
145
- orientation: "horizontal",
146
- variant: "alternate",
147
- class: "grid min-w-0 grid-rows-[1fr_auto_1fr] gap-3"
148
- }
149
- ],
150
- defaultVariants: {
151
- orientation: "vertical",
152
- variant: "default",
153
- isAlternateRight: false
154
- }
155
- });
156
- var timelineContentVariants = cva("flex-1", {
157
- variants: {
158
- orientation: {
159
- vertical: "",
160
- horizontal: ""
161
- },
162
- variant: {
163
- default: "",
164
- alternate: ""
165
- },
166
- isAlternateRight: {
167
- true: "",
168
- false: ""
169
- }
170
- },
171
- compoundVariants: [
172
- {
173
- variant: "alternate",
174
- orientation: "vertical",
175
- isAlternateRight: false,
176
- class: "text-right"
177
- },
178
- {
179
- variant: "alternate",
180
- orientation: "horizontal",
181
- isAlternateRight: false,
182
- class: "row-start-3 pt-2"
183
- },
184
- {
185
- variant: "alternate",
186
- orientation: "horizontal",
187
- isAlternateRight: true,
188
- class: "row-start-1 pb-2"
189
- }
190
- ],
191
- defaultVariants: {
192
- orientation: "vertical",
193
- variant: "default",
194
- isAlternateRight: false
195
- }
196
- });
197
- var timelineDotVariants = cva(
198
- "relative z-10 flex size-(--timeline-dot-size) shrink-0 items-center justify-center rounded-full border-2 bg-background",
199
- {
200
- variants: {
201
- status: {
202
- completed: "border-primary",
203
- active: "border-primary",
204
- pending: "border-border"
205
- },
206
- orientation: {
207
- vertical: "",
208
- horizontal: ""
209
- },
210
- variant: {
211
- default: "",
212
- alternate: ""
213
- },
214
- isAlternateRight: {
215
- true: "",
216
- false: ""
217
- }
218
- },
219
- compoundVariants: [
220
- {
221
- variant: "alternate",
222
- orientation: "vertical",
223
- isAlternateRight: false,
224
- class: "absolute -right-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)] bg-background"
225
- },
226
- {
227
- variant: "alternate",
228
- orientation: "vertical",
229
- isAlternateRight: true,
230
- class: "absolute -left-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)] bg-background"
231
- },
232
- {
233
- variant: "alternate",
234
- orientation: "horizontal",
235
- class: "row-start-2 bg-background"
236
- },
237
- {
238
- variant: "alternate",
239
- status: "completed",
240
- class: "bg-background"
241
- },
242
- {
243
- variant: "alternate",
244
- status: "active",
245
- class: "bg-background"
246
- }
247
- ],
248
- defaultVariants: {
249
- status: "pending",
250
- orientation: "vertical",
251
- variant: "default",
252
- isAlternateRight: false
253
- }
254
- }
255
- );
256
- var timelineConnectorVariants = cva("absolute z-0", {
257
- variants: {
258
- isCompleted: {
259
- true: "bg-primary",
260
- false: "bg-border"
261
- },
262
- orientation: {
263
- vertical: "",
264
- horizontal: ""
265
- },
266
- variant: {
267
- default: "",
268
- alternate: ""
269
- },
270
- isAlternateRight: {
271
- true: "",
272
- false: ""
273
- }
274
- },
275
- compoundVariants: [
276
- {
277
- orientation: "vertical",
278
- variant: "default",
279
- class: "start-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)] top-3 h-[calc(100%+0.5rem)] w-(--timeline-connector-thickness)"
280
- },
281
- {
282
- orientation: "horizontal",
283
- variant: "default",
284
- class: "start-3 top-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)] h-(--timeline-connector-thickness) w-[calc(100%+0.5rem)]"
285
- },
286
- {
287
- orientation: "vertical",
288
- variant: "alternate",
289
- isAlternateRight: false,
290
- class: "top-2 -right-[calc(var(--timeline-connector-thickness)/2)] h-full w-(--timeline-connector-thickness)"
291
- },
292
- {
293
- orientation: "vertical",
294
- variant: "alternate",
295
- isAlternateRight: true,
296
- class: "top-2 -left-[calc(var(--timeline-connector-thickness)/2)] h-full w-(--timeline-connector-thickness)"
297
- },
298
- {
299
- orientation: "horizontal",
300
- variant: "alternate",
301
- class: "top-[calc(var(--timeline-dot-size)/2-var(--timeline-connector-thickness)/2)] left-3 row-start-2 h-(--timeline-connector-thickness) w-[calc(100%+0.5rem)]"
302
- }
303
- ],
304
- defaultVariants: {
305
- isCompleted: false,
306
- orientation: "vertical",
307
- variant: "default",
308
- isAlternateRight: false
309
- }
310
- });
311
- function Timeline({
312
- orientation = "vertical",
313
- variant = "default",
314
- dir: dirProp,
315
- activeIndex,
316
- asChild = false,
317
- className,
318
- ...props
319
- }) {
320
- const dir = useDirection(dirProp);
321
- const listenersRef = useLazyRef(() => /* @__PURE__ */ new Set());
322
- const stateRef = useLazyRef(() => ({
323
- items: /* @__PURE__ */ new Map()
324
- }));
325
- const store = React2.useMemo(() => {
326
- return {
327
- subscribe: (cb) => {
328
- listenersRef.current.add(cb);
329
- return () => listenersRef.current.delete(cb);
330
- },
331
- getState: () => stateRef.current,
332
- notify: () => {
333
- for (const cb of listenersRef.current) {
334
- cb();
335
- }
336
- },
337
- onItemRegister: (id, ref) => {
338
- stateRef.current.items.set(id, ref);
339
- store.notify();
340
- },
341
- onItemUnregister: (id) => {
342
- stateRef.current.items.delete(id);
343
- store.notify();
344
- },
345
- getNextItemStatus: (id, activeIndex2) => {
346
- const entries = Array.from(stateRef.current.items.entries());
347
- const sortedEntries = getSortedEntries(entries);
348
- const currentIndex = sortedEntries.findIndex(([key]) => key === id);
349
- if (currentIndex === -1 || currentIndex === sortedEntries.length - 1) {
350
- return void 0;
351
- }
352
- const nextItemIndex = currentIndex + 1;
353
- return getItemStatus(nextItemIndex, activeIndex2);
354
- },
355
- getItemIndex: (id) => {
356
- const entries = Array.from(stateRef.current.items.entries());
357
- const sortedEntries = getSortedEntries(entries);
358
- return sortedEntries.findIndex(([key]) => key === id);
359
- }
360
- };
361
- }, [listenersRef, stateRef]);
362
- const contextValue = React2.useMemo(
363
- () => ({
364
- dir,
365
- orientation,
366
- variant,
367
- activeIndex
368
- }),
369
- [dir, orientation, variant, activeIndex]
370
- );
371
- const RootPrimitive = asChild ? Slot : "div";
372
- return /* @__PURE__ */ jsx(TimelineStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsx(TimelineContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
373
- RootPrimitive,
374
- {
375
- role: "list",
376
- "aria-orientation": orientation,
377
- "data-slot": "timeline",
378
- "data-orientation": orientation,
379
- "data-variant": variant,
380
- dir,
381
- ...props,
382
- className: cn(timelineVariants({ orientation, variant, className }))
383
- }
384
- ) }) });
385
- }
386
- function setRef(ref, value) {
387
- if (typeof ref === "function") {
388
- return ref(value);
389
- } else if (ref !== null && ref !== void 0) {
390
- ref.current = value;
391
- }
392
- }
393
- function composeRefs(...refs) {
394
- return (node) => {
395
- let hasCleanup = false;
396
- const cleanups = refs.map((ref) => {
397
- const cleanup = setRef(ref, node);
398
- if (!hasCleanup && typeof cleanup == "function") {
399
- hasCleanup = true;
400
- }
401
- return cleanup;
402
- });
403
- if (hasCleanup) {
404
- return () => {
405
- for (let i = 0; i < cleanups.length; i++) {
406
- const cleanup = cleanups[i];
407
- if (typeof cleanup == "function") {
408
- cleanup();
409
- } else {
410
- setRef(refs[i], null);
411
- }
412
- }
413
- };
414
- }
415
- };
416
- }
417
- function useComposedRefs(...refs) {
418
- return React2.useCallback(composeRefs(...refs), refs);
419
- }
420
- var TimelineItemContext = React2.createContext(null);
421
- function useTimelineItemContext(consumerName) {
422
- const context = React2.useContext(TimelineItemContext);
423
- if (!context) {
424
- throw new Error(`\`${consumerName}\` must be used within \`${TIMELINE_ITEM_NAME}\``);
425
- }
426
- return context;
427
- }
428
- function TimelineItem({ asChild = false, className, id, ref, ...props }) {
429
- const { dir, orientation, variant, activeIndex } = useTimelineContext(TIMELINE_ITEM_NAME);
430
- const store = useTimelineStoreContext(TIMELINE_ITEM_NAME);
431
- const instanceId = React2.useId();
432
- const itemId = id ?? instanceId;
433
- const itemRef = React2.useRef(null);
434
- const composedRef = useComposedRefs(ref, itemRef);
435
- const itemIndex = useTimelineStore((state) => state.getItemIndex(itemId));
436
- const status = React2.useMemo(
437
- function() {
438
- return itemIndex < 0 ? "pending" : getItemStatus(itemIndex, activeIndex);
439
- },
440
- [activeIndex, itemIndex]
441
- );
442
- useIsomorphicLayoutEffect(() => {
443
- store.onItemRegister(itemId, itemRef);
444
- return () => {
445
- store.onItemUnregister(itemId);
446
- };
447
- }, [id, store]);
448
- const isAlternateRight = variant === "alternate" && itemIndex % 2 === 1;
449
- const itemContextValue = React2.useMemo(
450
- () => ({ id: itemId, status, isAlternateRight }),
451
- [itemId, status, isAlternateRight]
452
- );
453
- const ItemPrimitive = asChild ? Slot : "div";
454
- return /* @__PURE__ */ jsx(TimelineItemContext.Provider, { value: itemContextValue, children: /* @__PURE__ */ jsx(
455
- ItemPrimitive,
456
- {
457
- role: "listitem",
458
- "aria-current": status === "active" ? "step" : void 0,
459
- "data-slot": "timeline-item",
460
- "data-status": status,
461
- "data-orientation": orientation,
462
- "data-alternate-right": isAlternateRight ? "" : void 0,
463
- id: itemId,
464
- dir,
465
- ...props,
466
- ref: composedRef,
467
- className: cn(
468
- timelineItemVariants({
469
- orientation,
470
- variant,
471
- isAlternateRight,
472
- className
473
- })
474
- )
475
- }
476
- ) });
477
- }
478
- function TimelineContent({ asChild = false, className, ...props }) {
479
- const { variant, orientation } = useTimelineContext(TIMELINE_CONTENT_NAME);
480
- const { status, isAlternateRight } = useTimelineItemContext(TIMELINE_CONTENT_NAME);
481
- const ContentPrimitive = asChild ? Slot : "div";
482
- return /* @__PURE__ */ jsx(
483
- ContentPrimitive,
484
- {
485
- "data-slot": "timeline-content",
486
- "data-status": status,
487
- ...props,
488
- className: cn(
489
- timelineContentVariants({
490
- orientation,
491
- variant,
492
- isAlternateRight,
493
- className
494
- })
495
- )
496
- }
497
- );
498
- }
499
- function TimelineDot({ asChild = false, className, ...props }) {
500
- const { orientation, variant } = useTimelineContext(TIMELINE_DOT_NAME);
501
- const { status, isAlternateRight } = useTimelineItemContext(TIMELINE_DOT_NAME);
502
- const DotPrimitive = asChild ? Slot : "div";
503
- return /* @__PURE__ */ jsx(
504
- DotPrimitive,
505
- {
506
- "data-slot": "timeline-dot",
507
- "data-status": status,
508
- "data-orientation": orientation,
509
- ...props,
510
- className: cn(
511
- timelineDotVariants({
512
- status,
513
- orientation,
514
- variant,
515
- isAlternateRight,
516
- className
517
- })
518
- )
519
- }
520
- );
521
- }
522
- function TimelineConnector({ asChild = false, forceMount, className, ...props }) {
523
- const { orientation, variant, activeIndex } = useTimelineContext(TIMELINE_CONNECTOR_NAME);
524
- const { id, status, isAlternateRight } = useTimelineItemContext(TIMELINE_CONNECTOR_NAME);
525
- const nextItemStatus = useTimelineStore((state) => state.getNextItemStatus(id, activeIndex));
526
- const isLastItem = nextItemStatus === void 0;
527
- if (!forceMount && isLastItem) return null;
528
- const isConnectorCompleted = nextItemStatus === "completed" || nextItemStatus === "active";
529
- const ConnectorPrimitive = asChild ? Slot : "div";
530
- return /* @__PURE__ */ jsx(
531
- ConnectorPrimitive,
532
- {
533
- "aria-hidden": "true",
534
- "data-slot": "timeline-connector",
535
- "data-completed": isConnectorCompleted ? "" : void 0,
536
- "data-status": status,
537
- "data-orientation": orientation,
538
- ...props,
539
- className: cn(
540
- timelineConnectorVariants({
541
- isCompleted: isConnectorCompleted,
542
- orientation,
543
- variant,
544
- isAlternateRight,
545
- className
546
- })
547
- )
548
- }
549
- );
550
- }
551
- function TimelineHeader({ asChild, className, ...props }) {
552
- const HeaderPrimitive = asChild ? Slot : "div";
553
- return /* @__PURE__ */ jsx(HeaderPrimitive, { "data-slot": "timeline-header", className: cn("flex flex-col gap-1", className), ...props });
554
- }
555
- function TimelineTitle({ asChild = false, className, ...props }) {
556
- const TitlePrimitive = asChild ? Slot : "div";
557
- return /* @__PURE__ */ jsx(TitlePrimitive, { "data-slot": "timeline-title", className: cn("leading-none font-semibold", className), ...props });
558
- }
559
- function TimelineDescription({ asChild = false, className, ...props }) {
560
- const DescriptionPrimitive = asChild ? Slot : "div";
561
- return /* @__PURE__ */ jsx(
562
- DescriptionPrimitive,
563
- {
564
- "data-slot": "timeline-description",
565
- ...props,
566
- className: cn("text-muted-foreground text-sm", className)
567
- }
568
- );
569
- }
570
- function TimelineTime({ asChild = false, className, ...props }) {
571
- const TimePrimitive = asChild ? Slot : "time";
572
- return /* @__PURE__ */ jsx(TimePrimitive, { "data-slot": "timeline-time", className: cn("text-muted-foreground text-xs", className), ...props });
573
- }
574
-
575
- export { Timeline, TimelineConnector, TimelineContent, TimelineDescription, TimelineDot, TimelineHeader, TimelineItem, TimelineTime, TimelineTitle, useComposedRefs, useDirection };
@@ -1,132 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
- var radixUi = require('radix-ui');
5
- var jsxRuntime = require('react/jsx-runtime');
6
- var lucideReact = require('lucide-react');
7
- var tailwindMerge = require('tailwind-merge');
8
- var classVarianceAuthority = require('class-variance-authority');
9
-
10
- function Dialog(props) {
11
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Root, { "data-slot": "dialog", ...props });
12
- }
13
- function DialogClose(props) {
14
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { "data-slot": "dialog-close", ...props });
15
- }
16
- var dialogContentVariants = classVarianceAuthority.cva(
17
- [
18
- "bg-background border-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded border p-6 shadow-lg duration-200",
19
- "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 "
20
- ],
21
- {
22
- variants: {
23
- width: {
24
- xs: "w-xs",
25
- sm: "w-sm",
26
- md: "w-md",
27
- lg: "w-lg",
28
- xl: "w-xl",
29
- "2xl": "w-2xl",
30
- "3xl": "w-3xl",
31
- "4xl": "w-4xl",
32
- "5xl": "w-5xl",
33
- "6xl": "w-6xl",
34
- full: "w-full"
35
- }
36
- },
37
- defaultVariants: {
38
- width: "md"
39
- }
40
- }
41
- );
42
- function DialogContent({
43
- className,
44
- children,
45
- width = "md",
46
- showCloseButton = false,
47
- ...props
48
- }) {
49
- return /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Portal, { "data-slot": "dialog-portal", children: [
50
- /* @__PURE__ */ jsxRuntime.jsx(
51
- radixUi.Dialog.Overlay,
52
- {
53
- "data-slot": "dialog-overlay",
54
- className: "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-background/80 fixed inset-0 z-50 backdrop-blur-xs"
55
- }
56
- ),
57
- /* @__PURE__ */ jsxRuntime.jsxs(
58
- radixUi.Dialog.Content,
59
- {
60
- "data-slot": "dialog-content",
61
- className: tailwindMerge.twMerge(dialogContentVariants({ width }), className),
62
- ...props,
63
- children: [
64
- children,
65
- showCloseButton ? /* @__PURE__ */ jsxRuntime.jsxs(
66
- radixUi.Dialog.Close,
67
- {
68
- "data-slot": "dialog-close",
69
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
70
- children: [
71
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
72
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
73
- ]
74
- }
75
- ) : null
76
- ]
77
- }
78
- )
79
- ] });
80
- }
81
- function DialogTrigger({ ...props }) {
82
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
83
- }
84
- function DialogHeader({ className, ...props }) {
85
- return /* @__PURE__ */ jsxRuntime.jsx(
86
- "div",
87
- {
88
- "data-slot": "dialog-header",
89
- className: chunkH2BWO3SI_cjs.cn("flex flex-col gap-2 text-center sm:text-left", className),
90
- ...props
91
- }
92
- );
93
- }
94
- function DialogFooter({ className, ...props }) {
95
- return /* @__PURE__ */ jsxRuntime.jsx(
96
- "div",
97
- {
98
- "data-slot": "dialog-footer",
99
- className: chunkH2BWO3SI_cjs.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
100
- ...props
101
- }
102
- );
103
- }
104
- function DialogTitle({ className, ...props }) {
105
- return /* @__PURE__ */ jsxRuntime.jsx(
106
- radixUi.Dialog.Title,
107
- {
108
- "data-slot": "dialog-title",
109
- className: chunkH2BWO3SI_cjs.cn("text-lg leading-none font-semibold", className),
110
- ...props
111
- }
112
- );
113
- }
114
- function DialogDescription({ className, ...props }) {
115
- return /* @__PURE__ */ jsxRuntime.jsx(
116
- radixUi.Dialog.Description,
117
- {
118
- "data-slot": "dialog-description",
119
- className: chunkH2BWO3SI_cjs.cn("text-muted-foreground text-sm", className),
120
- ...props
121
- }
122
- );
123
- }
124
-
125
- exports.Dialog = Dialog;
126
- exports.DialogClose = DialogClose;
127
- exports.DialogContent = DialogContent;
128
- exports.DialogDescription = DialogDescription;
129
- exports.DialogFooter = DialogFooter;
130
- exports.DialogHeader = DialogHeader;
131
- exports.DialogTitle = DialogTitle;
132
- exports.DialogTrigger = DialogTrigger;