@sth87/shadcn-design-system 0.0.1

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 (760) hide show
  1. package/README.md +487 -0
  2. package/dist/cjs/_virtual/_commonjsHelpers.cjs +2 -0
  3. package/dist/cjs/_virtual/_commonjsHelpers.cjs.map +1 -0
  4. package/dist/cjs/_virtual/index.cjs +2 -0
  5. package/dist/cjs/_virtual/index.cjs.map +1 -0
  6. package/dist/cjs/_virtual/index2.cjs +2 -0
  7. package/dist/cjs/_virtual/index2.cjs.map +1 -0
  8. package/dist/cjs/components/Accordion/Accordion.cjs +2 -0
  9. package/dist/cjs/components/Accordion/Accordion.cjs.map +1 -0
  10. package/dist/cjs/components/Avatar/Avatar.cjs +2 -0
  11. package/dist/cjs/components/Avatar/Avatar.cjs.map +1 -0
  12. package/dist/cjs/components/Badge/Badge.cjs +2 -0
  13. package/dist/cjs/components/Badge/Badge.cjs.map +1 -0
  14. package/dist/cjs/components/Breadcrumb/Breadcrumb.cjs +2 -0
  15. package/dist/cjs/components/Breadcrumb/Breadcrumb.cjs.map +1 -0
  16. package/dist/cjs/components/Button/Button.cjs +2 -0
  17. package/dist/cjs/components/Button/Button.cjs.map +1 -0
  18. package/dist/cjs/components/Button/ButtonGroup.cjs +2 -0
  19. package/dist/cjs/components/Button/ButtonGroup.cjs.map +1 -0
  20. package/dist/cjs/components/Calendar/Calendar.cjs +2 -0
  21. package/dist/cjs/components/Calendar/Calendar.cjs.map +1 -0
  22. package/dist/cjs/components/Carousel/Carousel.cjs +2 -0
  23. package/dist/cjs/components/Carousel/Carousel.cjs.map +1 -0
  24. package/dist/cjs/components/Checkbox/Checkbox.cjs +2 -0
  25. package/dist/cjs/components/Checkbox/Checkbox.cjs.map +1 -0
  26. package/dist/cjs/components/Collapsible/Collapsible.cjs +2 -0
  27. package/dist/cjs/components/Collapsible/Collapsible.cjs.map +1 -0
  28. package/dist/cjs/components/Command/Command.cjs +2 -0
  29. package/dist/cjs/components/Command/Command.cjs.map +1 -0
  30. package/dist/cjs/components/Command/index.cjs +2 -0
  31. package/dist/cjs/components/Command/index.cjs.map +1 -0
  32. package/dist/cjs/components/ContextMenu/ContextMenu.cjs +2 -0
  33. package/dist/cjs/components/ContextMenu/ContextMenu.cjs.map +1 -0
  34. package/dist/cjs/components/ContextMenu/index.cjs +2 -0
  35. package/dist/cjs/components/ContextMenu/index.cjs.map +1 -0
  36. package/dist/cjs/components/Cropper/Cropper.cjs +2 -0
  37. package/dist/cjs/components/Cropper/Cropper.cjs.map +1 -0
  38. package/dist/cjs/components/Cropper/CropperTool.cjs +2 -0
  39. package/dist/cjs/components/Cropper/CropperTool.cjs.map +1 -0
  40. package/dist/cjs/components/Cropper/utils.cjs +2 -0
  41. package/dist/cjs/components/Cropper/utils.cjs.map +1 -0
  42. package/dist/cjs/components/DatePicker/DatePicker.cjs +2 -0
  43. package/dist/cjs/components/DatePicker/DatePicker.cjs.map +1 -0
  44. package/dist/cjs/components/DatePicker/RangePicker.cjs +2 -0
  45. package/dist/cjs/components/DatePicker/RangePicker.cjs.map +1 -0
  46. package/dist/cjs/components/DatePicker/TimePicker.cjs +2 -0
  47. package/dist/cjs/components/DatePicker/TimePicker.cjs.map +1 -0
  48. package/dist/cjs/components/Dialog/Dialog.cjs +2 -0
  49. package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -0
  50. package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs +2 -0
  51. package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -0
  52. package/dist/cjs/components/DropdownMenu/index.cjs +2 -0
  53. package/dist/cjs/components/DropdownMenu/index.cjs.map +1 -0
  54. package/dist/cjs/components/FloatLabel.cjs +2 -0
  55. package/dist/cjs/components/FloatLabel.cjs.map +1 -0
  56. package/dist/cjs/components/Glass/Glass.cjs +2 -0
  57. package/dist/cjs/components/Glass/Glass.cjs.map +1 -0
  58. package/dist/cjs/components/ImageViewer/ImageViewer.cjs +2 -0
  59. package/dist/cjs/components/ImageViewer/ImageViewer.cjs.map +1 -0
  60. package/dist/cjs/components/ImageViewer/ImageViewer.css +1 -0
  61. package/dist/cjs/components/Input/Input.cjs +2 -0
  62. package/dist/cjs/components/Input/Input.cjs.map +1 -0
  63. package/dist/cjs/components/InputOTP/InputOTP.cjs +2 -0
  64. package/dist/cjs/components/InputOTP/InputOTP.cjs.map +1 -0
  65. package/dist/cjs/components/Interactive/CursorFollow.cjs +2 -0
  66. package/dist/cjs/components/Interactive/CursorFollow.cjs.map +1 -0
  67. package/dist/cjs/components/Marquee/Marquee.cjs +2 -0
  68. package/dist/cjs/components/Marquee/Marquee.cjs.map +1 -0
  69. package/dist/cjs/components/Marquee/MarqueeWrapper.cjs +2 -0
  70. package/dist/cjs/components/Marquee/MarqueeWrapper.cjs.map +1 -0
  71. package/dist/cjs/components/Marquee/index.cjs +2 -0
  72. package/dist/cjs/components/Marquee/index.cjs.map +1 -0
  73. package/dist/cjs/components/Masonry/Masonry.cjs +2 -0
  74. package/dist/cjs/components/Masonry/Masonry.cjs.map +1 -0
  75. package/dist/cjs/components/Masonry/MasonryWrapper.cjs +2 -0
  76. package/dist/cjs/components/Masonry/MasonryWrapper.cjs.map +1 -0
  77. package/dist/cjs/components/Pagination/Pagination.cjs +2 -0
  78. package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -0
  79. package/dist/cjs/components/Pagination/index.cjs +2 -0
  80. package/dist/cjs/components/Pagination/index.cjs.map +1 -0
  81. package/dist/cjs/components/Popover/Popover.cjs +2 -0
  82. package/dist/cjs/components/Popover/Popover.cjs.map +1 -0
  83. package/dist/cjs/components/Popover/index.cjs +2 -0
  84. package/dist/cjs/components/Popover/index.cjs.map +1 -0
  85. package/dist/cjs/components/QrCode/QrCode.cjs +2 -0
  86. package/dist/cjs/components/QrCode/QrCode.cjs.map +1 -0
  87. package/dist/cjs/components/QrCode/index.cjs +2 -0
  88. package/dist/cjs/components/QrCode/index.cjs.map +1 -0
  89. package/dist/cjs/components/Radio/Radio.cjs +2 -0
  90. package/dist/cjs/components/Radio/Radio.cjs.map +1 -0
  91. package/dist/cjs/components/Rate/Rate.cjs +2 -0
  92. package/dist/cjs/components/Rate/Rate.cjs.map +1 -0
  93. package/dist/cjs/components/Resizable/Resizable.cjs +2 -0
  94. package/dist/cjs/components/Resizable/Resizable.cjs.map +1 -0
  95. package/dist/cjs/components/ScrollArea/ScrollArea.cjs +2 -0
  96. package/dist/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -0
  97. package/dist/cjs/components/Select/Select.cjs +2 -0
  98. package/dist/cjs/components/Select/Select.cjs.map +1 -0
  99. package/dist/cjs/components/Separator/Separator.cjs +2 -0
  100. package/dist/cjs/components/Separator/Separator.cjs.map +1 -0
  101. package/dist/cjs/components/Sheet/Sheet.cjs +6 -0
  102. package/dist/cjs/components/Sheet/Sheet.cjs.map +1 -0
  103. package/dist/cjs/components/Sidebar/Sidebar.cjs +2 -0
  104. package/dist/cjs/components/Sidebar/Sidebar.cjs.map +1 -0
  105. package/dist/cjs/components/Skeleton/Skeleton.cjs +2 -0
  106. package/dist/cjs/components/Skeleton/Skeleton.cjs.map +1 -0
  107. package/dist/cjs/components/Slider/Slider.cjs +2 -0
  108. package/dist/cjs/components/Slider/Slider.cjs.map +1 -0
  109. package/dist/cjs/components/Stepper/Stepper.cjs +2 -0
  110. package/dist/cjs/components/Stepper/Stepper.cjs.map +1 -0
  111. package/dist/cjs/components/Stepper/StepperWrapper.cjs +2 -0
  112. package/dist/cjs/components/Stepper/StepperWrapper.cjs.map +1 -0
  113. package/dist/cjs/components/Stepper/index.cjs +2 -0
  114. package/dist/cjs/components/Stepper/index.cjs.map +1 -0
  115. package/dist/cjs/components/Switch/Switch.cjs +2 -0
  116. package/dist/cjs/components/Switch/Switch.cjs.map +1 -0
  117. package/dist/cjs/components/Table/TableFilter/data-table-date-filter.cjs +2 -0
  118. package/dist/cjs/components/Table/TableFilter/data-table-date-filter.cjs.map +1 -0
  119. package/dist/cjs/components/Table/TableFilter/data-table-filter-popover.cjs +2 -0
  120. package/dist/cjs/components/Table/TableFilter/data-table-filter-popover.cjs.map +1 -0
  121. package/dist/cjs/components/Table/TableFilter/data-table-slider-filter.cjs +2 -0
  122. package/dist/cjs/components/Table/TableFilter/data-table-slider-filter.cjs.map +1 -0
  123. package/dist/cjs/components/Table/data-table-column-header.cjs +2 -0
  124. package/dist/cjs/components/Table/data-table-column-header.cjs.map +1 -0
  125. package/dist/cjs/components/Table/data-table-pagination.cjs +2 -0
  126. package/dist/cjs/components/Table/data-table-pagination.cjs.map +1 -0
  127. package/dist/cjs/components/Table/data-table.cjs +2 -0
  128. package/dist/cjs/components/Table/data-table.cjs.map +1 -0
  129. package/dist/cjs/components/Tabs/Tabs.cjs +2 -0
  130. package/dist/cjs/components/Tabs/Tabs.cjs.map +1 -0
  131. package/dist/cjs/components/Tabs/classes.cjs +2 -0
  132. package/dist/cjs/components/Tabs/classes.cjs.map +1 -0
  133. package/dist/cjs/components/Textarea/Textarea.cjs +2 -0
  134. package/dist/cjs/components/Textarea/Textarea.cjs.map +1 -0
  135. package/dist/cjs/components/TimeGridView.cjs +2 -0
  136. package/dist/cjs/components/TimeGridView.cjs.map +1 -0
  137. package/dist/cjs/components/Toast/Toast.cjs +2 -0
  138. package/dist/cjs/components/Toast/Toast.cjs.map +1 -0
  139. package/dist/cjs/components/Toggle/Toggle.cjs +2 -0
  140. package/dist/cjs/components/Toggle/Toggle.cjs.map +1 -0
  141. package/dist/cjs/components/Tooltip/Tooltip.cjs +2 -0
  142. package/dist/cjs/components/Tooltip/Tooltip.cjs.map +1 -0
  143. package/dist/cjs/components/Tour/Tour.cjs +2 -0
  144. package/dist/cjs/components/Tour/Tour.cjs.map +1 -0
  145. package/dist/cjs/components/Tour/TourWrapper.cjs +2 -0
  146. package/dist/cjs/components/Tour/TourWrapper.cjs.map +1 -0
  147. package/dist/cjs/components/Tour/index.cjs +2 -0
  148. package/dist/cjs/components/Tour/index.cjs.map +1 -0
  149. package/dist/cjs/components/Upload/Upload.cjs +4 -0
  150. package/dist/cjs/components/Upload/Upload.cjs.map +1 -0
  151. package/dist/cjs/components/WheelColumn.cjs +2 -0
  152. package/dist/cjs/components/WheelColumn.cjs.map +1 -0
  153. package/dist/cjs/constants/common.cjs +2 -0
  154. package/dist/cjs/constants/common.cjs.map +1 -0
  155. package/dist/cjs/favicon.ico +0 -0
  156. package/dist/cjs/hooks/use-callback-ref.cjs +2 -0
  157. package/dist/cjs/hooks/use-callback-ref.cjs.map +1 -0
  158. package/dist/cjs/hooks/use-debounced-callback.cjs +2 -0
  159. package/dist/cjs/hooks/use-debounced-callback.cjs.map +1 -0
  160. package/dist/cjs/hooks/use-debounced-value.cjs +2 -0
  161. package/dist/cjs/hooks/use-debounced-value.cjs.map +1 -0
  162. package/dist/cjs/hooks/use-event-listener.cjs +2 -0
  163. package/dist/cjs/hooks/use-event-listener.cjs.map +1 -0
  164. package/dist/cjs/hooks/use-intersection-observer.cjs +2 -0
  165. package/dist/cjs/hooks/use-intersection-observer.cjs.map +1 -0
  166. package/dist/cjs/hooks/use-isomorphic-layout-effect.cjs +2 -0
  167. package/dist/cjs/hooks/use-isomorphic-layout-effect.cjs.map +1 -0
  168. package/dist/cjs/hooks/use-media-query.cjs +2 -0
  169. package/dist/cjs/hooks/use-media-query.cjs.map +1 -0
  170. package/dist/cjs/hooks/use-on-click-outside.cjs +2 -0
  171. package/dist/cjs/hooks/use-on-click-outside.cjs.map +1 -0
  172. package/dist/cjs/hooks/use-script.cjs +2 -0
  173. package/dist/cjs/hooks/use-script.cjs.map +1 -0
  174. package/dist/cjs/hooks/use-scroll-lock.cjs +2 -0
  175. package/dist/cjs/hooks/use-scroll-lock.cjs.map +1 -0
  176. package/dist/cjs/image.png +0 -0
  177. package/dist/cjs/index.cjs +2 -0
  178. package/dist/cjs/index.cjs.map +1 -0
  179. package/dist/cjs/lib/TextAnimation/BlurText.cjs +2 -0
  180. package/dist/cjs/lib/TextAnimation/BlurText.cjs.map +1 -0
  181. package/dist/cjs/lib/TextAnimation/CircularText.cjs +2 -0
  182. package/dist/cjs/lib/TextAnimation/CircularText.cjs.map +1 -0
  183. package/dist/cjs/lib/TextAnimation/FlipWords.cjs +2 -0
  184. package/dist/cjs/lib/TextAnimation/FlipWords.cjs.map +1 -0
  185. package/dist/cjs/lib/TextAnimation/GradientText.cjs +2 -0
  186. package/dist/cjs/lib/TextAnimation/GradientText.cjs.map +1 -0
  187. package/dist/cjs/lib/TextAnimation/RollingText.cjs +2 -0
  188. package/dist/cjs/lib/TextAnimation/RollingText.cjs.map +1 -0
  189. package/dist/cjs/lib/TextAnimation/RotatingText.cjs +2 -0
  190. package/dist/cjs/lib/TextAnimation/RotatingText.cjs.map +1 -0
  191. package/dist/cjs/lib/TextAnimation/ShimmeringText.cjs +2 -0
  192. package/dist/cjs/lib/TextAnimation/ShimmeringText.cjs.map +1 -0
  193. package/dist/cjs/lib/TextAnimation/SplittingText.cjs +2 -0
  194. package/dist/cjs/lib/TextAnimation/SplittingText.cjs.map +1 -0
  195. package/dist/cjs/lib/TextAnimation/TextGenerateEffect.cjs +2 -0
  196. package/dist/cjs/lib/TextAnimation/TextGenerateEffect.cjs.map +1 -0
  197. package/dist/cjs/lib/TextAnimation/TextHoverEffect.cjs +2 -0
  198. package/dist/cjs/lib/TextAnimation/TextHoverEffect.cjs.map +1 -0
  199. package/dist/cjs/lib/TextAnimation/TextPressureEffect.cjs +22 -0
  200. package/dist/cjs/lib/TextAnimation/TextPressureEffect.cjs.map +1 -0
  201. package/dist/cjs/lib/TextAnimation/TypingText.cjs +2 -0
  202. package/dist/cjs/lib/TextAnimation/TypingText.cjs.map +1 -0
  203. package/dist/cjs/lib/TextAnimation/WritingText.cjs +2 -0
  204. package/dist/cjs/lib/TextAnimation/WritingText.cjs.map +1 -0
  205. package/dist/cjs/node_modules/.pnpm/react-viewer@3.2.2/node_modules/react-viewer/dist/index.cjs +253 -0
  206. package/dist/cjs/node_modules/.pnpm/react-viewer@3.2.2/node_modules/react-viewer/dist/index.cjs.map +1 -0
  207. package/dist/cjs/node_modules/.pnpm/viewerjs@1.11.7/node_modules/viewerjs/dist/viewer.css +1 -0
  208. package/dist/cjs/styles/animation.css +1 -0
  209. package/dist/cjs/styles/index.css +1 -0
  210. package/dist/cjs/styles/theme.css +1 -0
  211. package/dist/cjs/utils/animations.cjs +2 -0
  212. package/dist/cjs/utils/animations.cjs.map +1 -0
  213. package/dist/cjs/utils/css.cjs +2 -0
  214. package/dist/cjs/utils/css.cjs.map +1 -0
  215. package/dist/cjs/utils/data-table.cjs +2 -0
  216. package/dist/cjs/utils/data-table.cjs.map +1 -0
  217. package/dist/cjs/utils/datetime.cjs +2 -0
  218. package/dist/cjs/utils/datetime.cjs.map +1 -0
  219. package/dist/cjs/vite.svg +1 -0
  220. package/dist/cjs/wave.png +0 -0
  221. package/dist/esm/_virtual/_commonjsHelpers.js +7 -0
  222. package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -0
  223. package/dist/esm/_virtual/index.js +8 -0
  224. package/dist/esm/_virtual/index.js.map +1 -0
  225. package/dist/esm/_virtual/index2.js +5 -0
  226. package/dist/esm/_virtual/index2.js.map +1 -0
  227. package/dist/esm/components/Accordion/Accordion.js +190 -0
  228. package/dist/esm/components/Accordion/Accordion.js.map +1 -0
  229. package/dist/esm/components/Avatar/Avatar.js +93 -0
  230. package/dist/esm/components/Avatar/Avatar.js.map +1 -0
  231. package/dist/esm/components/Badge/Badge.js +35 -0
  232. package/dist/esm/components/Badge/Badge.js.map +1 -0
  233. package/dist/esm/components/Breadcrumb/Breadcrumb.js +102 -0
  234. package/dist/esm/components/Breadcrumb/Breadcrumb.js.map +1 -0
  235. package/dist/esm/components/Button/Button.js +53 -0
  236. package/dist/esm/components/Button/Button.js.map +1 -0
  237. package/dist/esm/components/Button/ButtonGroup.js +53 -0
  238. package/dist/esm/components/Button/ButtonGroup.js.map +1 -0
  239. package/dist/esm/components/Calendar/Calendar.js +40 -0
  240. package/dist/esm/components/Calendar/Calendar.js.map +1 -0
  241. package/dist/esm/components/Carousel/Carousel.js +510 -0
  242. package/dist/esm/components/Carousel/Carousel.js.map +1 -0
  243. package/dist/esm/components/Checkbox/Checkbox.js +79 -0
  244. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -0
  245. package/dist/esm/components/Collapsible/Collapsible.js +107 -0
  246. package/dist/esm/components/Collapsible/Collapsible.js.map +1 -0
  247. package/dist/esm/components/Command/Command.js +113 -0
  248. package/dist/esm/components/Command/Command.js.map +1 -0
  249. package/dist/esm/components/Command/index.js +16 -0
  250. package/dist/esm/components/Command/index.js.map +1 -0
  251. package/dist/esm/components/ContextMenu/ContextMenu.js +131 -0
  252. package/dist/esm/components/ContextMenu/ContextMenu.js.map +1 -0
  253. package/dist/esm/components/ContextMenu/index.js +24 -0
  254. package/dist/esm/components/ContextMenu/index.js.map +1 -0
  255. package/dist/esm/components/Cropper/Cropper.js +1014 -0
  256. package/dist/esm/components/Cropper/Cropper.js.map +1 -0
  257. package/dist/esm/components/Cropper/CropperTool.js +157 -0
  258. package/dist/esm/components/Cropper/CropperTool.js.map +1 -0
  259. package/dist/esm/components/Cropper/utils.js +108 -0
  260. package/dist/esm/components/Cropper/utils.js.map +1 -0
  261. package/dist/esm/components/DatePicker/DatePicker.js +263 -0
  262. package/dist/esm/components/DatePicker/DatePicker.js.map +1 -0
  263. package/dist/esm/components/DatePicker/RangePicker.js +456 -0
  264. package/dist/esm/components/DatePicker/RangePicker.js.map +1 -0
  265. package/dist/esm/components/DatePicker/TimePicker.js +444 -0
  266. package/dist/esm/components/DatePicker/TimePicker.js.map +1 -0
  267. package/dist/esm/components/Dialog/Dialog.js +223 -0
  268. package/dist/esm/components/Dialog/Dialog.js.map +1 -0
  269. package/dist/esm/components/DropdownMenu/DropdownMenu.js +196 -0
  270. package/dist/esm/components/DropdownMenu/DropdownMenu.js.map +1 -0
  271. package/dist/esm/components/DropdownMenu/index.js +24 -0
  272. package/dist/esm/components/DropdownMenu/index.js.map +1 -0
  273. package/dist/esm/components/FloatLabel.js +59 -0
  274. package/dist/esm/components/FloatLabel.js.map +1 -0
  275. package/dist/esm/components/Glass/Glass.js +93 -0
  276. package/dist/esm/components/Glass/Glass.js.map +1 -0
  277. package/dist/esm/components/ImageViewer/ImageViewer.css +1 -0
  278. package/dist/esm/components/ImageViewer/ImageViewer.js +273 -0
  279. package/dist/esm/components/ImageViewer/ImageViewer.js.map +1 -0
  280. package/dist/esm/components/Input/Input.js +267 -0
  281. package/dist/esm/components/Input/Input.js.map +1 -0
  282. package/dist/esm/components/InputOTP/InputOTP.js +70 -0
  283. package/dist/esm/components/InputOTP/InputOTP.js.map +1 -0
  284. package/dist/esm/components/Interactive/CursorFollow.js +257 -0
  285. package/dist/esm/components/Interactive/CursorFollow.js.map +1 -0
  286. package/dist/esm/components/Marquee/Marquee.js +419 -0
  287. package/dist/esm/components/Marquee/Marquee.js.map +1 -0
  288. package/dist/esm/components/Marquee/MarqueeWrapper.js +25 -0
  289. package/dist/esm/components/Marquee/MarqueeWrapper.js.map +1 -0
  290. package/dist/esm/components/Marquee/index.js +15 -0
  291. package/dist/esm/components/Marquee/index.js.map +1 -0
  292. package/dist/esm/components/Masonry/Masonry.js +840 -0
  293. package/dist/esm/components/Masonry/Masonry.js.map +1 -0
  294. package/dist/esm/components/Masonry/MasonryWrapper.js +19 -0
  295. package/dist/esm/components/Masonry/MasonryWrapper.js.map +1 -0
  296. package/dist/esm/components/Pagination/Pagination.js +209 -0
  297. package/dist/esm/components/Pagination/Pagination.js.map +1 -0
  298. package/dist/esm/components/Pagination/index.js +14 -0
  299. package/dist/esm/components/Pagination/index.js.map +1 -0
  300. package/dist/esm/components/Popover/Popover.js +51 -0
  301. package/dist/esm/components/Popover/Popover.js.map +1 -0
  302. package/dist/esm/components/Popover/index.js +9 -0
  303. package/dist/esm/components/Popover/index.js.map +1 -0
  304. package/dist/esm/components/QrCode/QrCode.js +300 -0
  305. package/dist/esm/components/QrCode/QrCode.js.map +1 -0
  306. package/dist/esm/components/QrCode/index.js +16 -0
  307. package/dist/esm/components/QrCode/index.js.map +1 -0
  308. package/dist/esm/components/Radio/Radio.js +74 -0
  309. package/dist/esm/components/Radio/Radio.js.map +1 -0
  310. package/dist/esm/components/Rate/Rate.js +191 -0
  311. package/dist/esm/components/Rate/Rate.js.map +1 -0
  312. package/dist/esm/components/Resizable/Resizable.js +89 -0
  313. package/dist/esm/components/Resizable/Resizable.js.map +1 -0
  314. package/dist/esm/components/ScrollArea/ScrollArea.js +45 -0
  315. package/dist/esm/components/ScrollArea/ScrollArea.js.map +1 -0
  316. package/dist/esm/components/Select/Select.js +199 -0
  317. package/dist/esm/components/Select/Select.js.map +1 -0
  318. package/dist/esm/components/Separator/Separator.js +7 -0
  319. package/dist/esm/components/Separator/Separator.js.map +1 -0
  320. package/dist/esm/components/Sheet/Sheet.js +141 -0
  321. package/dist/esm/components/Sheet/Sheet.js.map +1 -0
  322. package/dist/esm/components/Sidebar/Sidebar.js +30 -0
  323. package/dist/esm/components/Sidebar/Sidebar.js.map +1 -0
  324. package/dist/esm/components/Skeleton/Skeleton.js +12 -0
  325. package/dist/esm/components/Skeleton/Skeleton.js.map +1 -0
  326. package/dist/esm/components/Slider/Slider.js +420 -0
  327. package/dist/esm/components/Slider/Slider.js.map +1 -0
  328. package/dist/esm/components/Stepper/Stepper.js +886 -0
  329. package/dist/esm/components/Stepper/Stepper.js.map +1 -0
  330. package/dist/esm/components/Stepper/StepperWrapper.js +80 -0
  331. package/dist/esm/components/Stepper/StepperWrapper.js.map +1 -0
  332. package/dist/esm/components/Stepper/index.js +21 -0
  333. package/dist/esm/components/Stepper/index.js.map +1 -0
  334. package/dist/esm/components/Switch/Switch.js +126 -0
  335. package/dist/esm/components/Switch/Switch.js.map +1 -0
  336. package/dist/esm/components/Table/TableFilter/data-table-date-filter.js +126 -0
  337. package/dist/esm/components/Table/TableFilter/data-table-date-filter.js.map +1 -0
  338. package/dist/esm/components/Table/TableFilter/data-table-filter-popover.js +138 -0
  339. package/dist/esm/components/Table/TableFilter/data-table-filter-popover.js.map +1 -0
  340. package/dist/esm/components/Table/TableFilter/data-table-slider-filter.js +164 -0
  341. package/dist/esm/components/Table/TableFilter/data-table-slider-filter.js.map +1 -0
  342. package/dist/esm/components/Table/data-table-column-header.js +82 -0
  343. package/dist/esm/components/Table/data-table-column-header.js.map +1 -0
  344. package/dist/esm/components/Table/data-table-pagination.js +73 -0
  345. package/dist/esm/components/Table/data-table-pagination.js.map +1 -0
  346. package/dist/esm/components/Table/data-table.js +94 -0
  347. package/dist/esm/components/Table/data-table.js.map +1 -0
  348. package/dist/esm/components/Tabs/Tabs.js +540 -0
  349. package/dist/esm/components/Tabs/Tabs.js.map +1 -0
  350. package/dist/esm/components/Tabs/classes.js +345 -0
  351. package/dist/esm/components/Tabs/classes.js.map +1 -0
  352. package/dist/esm/components/Textarea/Textarea.js +132 -0
  353. package/dist/esm/components/Textarea/Textarea.js.map +1 -0
  354. package/dist/esm/components/TimeGridView.js +101 -0
  355. package/dist/esm/components/TimeGridView.js.map +1 -0
  356. package/dist/esm/components/Toast/Toast.js +80 -0
  357. package/dist/esm/components/Toast/Toast.js.map +1 -0
  358. package/dist/esm/components/Toggle/Toggle.js +23 -0
  359. package/dist/esm/components/Toggle/Toggle.js.map +1 -0
  360. package/dist/esm/components/Tooltip/Tooltip.js +120 -0
  361. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -0
  362. package/dist/esm/components/Tour/Tour.js +948 -0
  363. package/dist/esm/components/Tour/Tour.js.map +1 -0
  364. package/dist/esm/components/Tour/TourWrapper.js +67 -0
  365. package/dist/esm/components/Tour/TourWrapper.js.map +1 -0
  366. package/dist/esm/components/Tour/index.js +38 -0
  367. package/dist/esm/components/Tour/index.js.map +1 -0
  368. package/dist/esm/components/Upload/Upload.js +948 -0
  369. package/dist/esm/components/Upload/Upload.js.map +1 -0
  370. package/dist/esm/components/WheelColumn.js +127 -0
  371. package/dist/esm/components/WheelColumn.js.map +1 -0
  372. package/dist/esm/constants/common.js +5 -0
  373. package/dist/esm/constants/common.js.map +1 -0
  374. package/dist/esm/favicon.ico +0 -0
  375. package/dist/esm/hooks/use-callback-ref.js +14 -0
  376. package/dist/esm/hooks/use-callback-ref.js.map +1 -0
  377. package/dist/esm/hooks/use-debounced-callback.js +21 -0
  378. package/dist/esm/hooks/use-debounced-callback.js.map +1 -0
  379. package/dist/esm/hooks/use-debounced-value.js +12 -0
  380. package/dist/esm/hooks/use-debounced-value.js.map +1 -0
  381. package/dist/esm/hooks/use-event-listener.js +21 -0
  382. package/dist/esm/hooks/use-event-listener.js.map +1 -0
  383. package/dist/esm/hooks/use-intersection-observer.js +56 -0
  384. package/dist/esm/hooks/use-intersection-observer.js.map +1 -0
  385. package/dist/esm/hooks/use-isomorphic-layout-effect.js +6 -0
  386. package/dist/esm/hooks/use-isomorphic-layout-effect.js.map +1 -0
  387. package/dist/esm/hooks/use-media-query.js +22 -0
  388. package/dist/esm/hooks/use-media-query.js.map +1 -0
  389. package/dist/esm/hooks/use-on-click-outside.js +18 -0
  390. package/dist/esm/hooks/use-on-click-outside.js.map +1 -0
  391. package/dist/esm/hooks/use-script.js +46 -0
  392. package/dist/esm/hooks/use-script.js.map +1 -0
  393. package/dist/esm/hooks/use-scroll-lock.js +27 -0
  394. package/dist/esm/hooks/use-scroll-lock.js.map +1 -0
  395. package/dist/esm/image.png +0 -0
  396. package/dist/esm/index.js +223 -0
  397. package/dist/esm/index.js.map +1 -0
  398. package/dist/esm/lib/TextAnimation/BlurText.js +84 -0
  399. package/dist/esm/lib/TextAnimation/BlurText.js.map +1 -0
  400. package/dist/esm/lib/TextAnimation/CircularText.js +96 -0
  401. package/dist/esm/lib/TextAnimation/CircularText.js.map +1 -0
  402. package/dist/esm/lib/TextAnimation/FlipWords.js +103 -0
  403. package/dist/esm/lib/TextAnimation/FlipWords.js.map +1 -0
  404. package/dist/esm/lib/TextAnimation/GradientText.js +54 -0
  405. package/dist/esm/lib/TextAnimation/GradientText.js.map +1 -0
  406. package/dist/esm/lib/TextAnimation/RollingText.js +70 -0
  407. package/dist/esm/lib/TextAnimation/RollingText.js.map +1 -0
  408. package/dist/esm/lib/TextAnimation/RotatingText.js +38 -0
  409. package/dist/esm/lib/TextAnimation/RotatingText.js.map +1 -0
  410. package/dist/esm/lib/TextAnimation/ShimmeringText.js +64 -0
  411. package/dist/esm/lib/TextAnimation/ShimmeringText.js.map +1 -0
  412. package/dist/esm/lib/TextAnimation/SplittingText.js +86 -0
  413. package/dist/esm/lib/TextAnimation/SplittingText.js.map +1 -0
  414. package/dist/esm/lib/TextAnimation/TextGenerateEffect.js +59 -0
  415. package/dist/esm/lib/TextAnimation/TextGenerateEffect.js.map +1 -0
  416. package/dist/esm/lib/TextAnimation/TextHoverEffect.js +128 -0
  417. package/dist/esm/lib/TextAnimation/TextHoverEffect.js.map +1 -0
  418. package/dist/esm/lib/TextAnimation/TextPressureEffect.js +135 -0
  419. package/dist/esm/lib/TextAnimation/TextPressureEffect.js.map +1 -0
  420. package/dist/esm/lib/TextAnimation/TypingText.js +118 -0
  421. package/dist/esm/lib/TextAnimation/TypingText.js.map +1 -0
  422. package/dist/esm/lib/TextAnimation/WritingText.js +45 -0
  423. package/dist/esm/lib/TextAnimation/WritingText.js.map +1 -0
  424. package/dist/esm/node_modules/.pnpm/react-viewer@3.2.2/node_modules/react-viewer/dist/index.js +865 -0
  425. package/dist/esm/node_modules/.pnpm/react-viewer@3.2.2/node_modules/react-viewer/dist/index.js.map +1 -0
  426. package/dist/esm/node_modules/.pnpm/viewerjs@1.11.7/node_modules/viewerjs/dist/viewer.css +1 -0
  427. package/dist/esm/styles/animation.css +1 -0
  428. package/dist/esm/styles/index.css +1 -0
  429. package/dist/esm/styles/theme.css +1 -0
  430. package/dist/esm/utils/animations.js +189 -0
  431. package/dist/esm/utils/animations.js.map +1 -0
  432. package/dist/esm/utils/css.js +25 -0
  433. package/dist/esm/utils/css.js.map +1 -0
  434. package/dist/esm/utils/data-table.js +20 -0
  435. package/dist/esm/utils/data-table.js.map +1 -0
  436. package/dist/esm/utils/datetime.js +17 -0
  437. package/dist/esm/utils/datetime.js.map +1 -0
  438. package/dist/esm/vite.svg +1 -0
  439. package/dist/esm/wave.png +0 -0
  440. package/dist/types/components/Accordion/Accordion.d.ts +49 -0
  441. package/dist/types/components/Accordion/Accordion.d.ts.map +1 -0
  442. package/dist/types/components/Accordion/index.d.ts +3 -0
  443. package/dist/types/components/Accordion/index.d.ts.map +1 -0
  444. package/dist/types/components/Avatar/Avatar.d.ts +18 -0
  445. package/dist/types/components/Avatar/Avatar.d.ts.map +1 -0
  446. package/dist/types/components/Avatar/index.d.ts +3 -0
  447. package/dist/types/components/Avatar/index.d.ts.map +1 -0
  448. package/dist/types/components/Badge/Badge.d.ts +10 -0
  449. package/dist/types/components/Badge/Badge.d.ts.map +1 -0
  450. package/dist/types/components/Badge/index.d.ts +2 -0
  451. package/dist/types/components/Badge/index.d.ts.map +1 -0
  452. package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +23 -0
  453. package/dist/types/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
  454. package/dist/types/components/Breadcrumb/index.d.ts +2 -0
  455. package/dist/types/components/Breadcrumb/index.d.ts.map +1 -0
  456. package/dist/types/components/Button/Button.d.ts +10 -0
  457. package/dist/types/components/Button/Button.d.ts.map +1 -0
  458. package/dist/types/components/Button/ButtonGroup.d.ts +16 -0
  459. package/dist/types/components/Button/ButtonGroup.d.ts.map +1 -0
  460. package/dist/types/components/Button/index.d.ts +5 -0
  461. package/dist/types/components/Button/index.d.ts.map +1 -0
  462. package/dist/types/components/Calendar/Calendar.d.ts +15 -0
  463. package/dist/types/components/Calendar/Calendar.d.ts.map +1 -0
  464. package/dist/types/components/Calendar/index.d.ts +3 -0
  465. package/dist/types/components/Calendar/index.d.ts.map +1 -0
  466. package/dist/types/components/Carousel/Carousel.d.ts +79 -0
  467. package/dist/types/components/Carousel/Carousel.d.ts.map +1 -0
  468. package/dist/types/components/Carousel/index.d.ts +4 -0
  469. package/dist/types/components/Carousel/index.d.ts.map +1 -0
  470. package/dist/types/components/Checkbox/Checkbox.d.ts +15 -0
  471. package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -0
  472. package/dist/types/components/Checkbox/index.d.ts +2 -0
  473. package/dist/types/components/Checkbox/index.d.ts.map +1 -0
  474. package/dist/types/components/Collapsible/Collapsible.d.ts +17 -0
  475. package/dist/types/components/Collapsible/Collapsible.d.ts.map +1 -0
  476. package/dist/types/components/Collapsible/index.d.ts +2 -0
  477. package/dist/types/components/Collapsible/index.d.ts.map +1 -0
  478. package/dist/types/components/Command/Command.d.ts +39 -0
  479. package/dist/types/components/Command/Command.d.ts.map +1 -0
  480. package/dist/types/components/Command/index.d.ts +15 -0
  481. package/dist/types/components/Command/index.d.ts.map +1 -0
  482. package/dist/types/components/ContextMenu/ContextMenu.d.ts +64 -0
  483. package/dist/types/components/ContextMenu/ContextMenu.d.ts.map +1 -0
  484. package/dist/types/components/ContextMenu/index.d.ts +23 -0
  485. package/dist/types/components/ContextMenu/index.d.ts.map +1 -0
  486. package/dist/types/components/Cropper/Cropper.d.ts +86 -0
  487. package/dist/types/components/Cropper/Cropper.d.ts.map +1 -0
  488. package/dist/types/components/Cropper/CropperTool.d.ts +149 -0
  489. package/dist/types/components/Cropper/CropperTool.d.ts.map +1 -0
  490. package/dist/types/components/Cropper/index.d.ts +4 -0
  491. package/dist/types/components/Cropper/index.d.ts.map +1 -0
  492. package/dist/types/components/Cropper/utils.d.ts +130 -0
  493. package/dist/types/components/Cropper/utils.d.ts.map +1 -0
  494. package/dist/types/components/DatePicker/DatePicker.d.ts +56 -0
  495. package/dist/types/components/DatePicker/DatePicker.d.ts.map +1 -0
  496. package/dist/types/components/DatePicker/RangePicker.d.ts +42 -0
  497. package/dist/types/components/DatePicker/RangePicker.d.ts.map +1 -0
  498. package/dist/types/components/DatePicker/TimePicker.d.ts +43 -0
  499. package/dist/types/components/DatePicker/TimePicker.d.ts.map +1 -0
  500. package/dist/types/components/DatePicker/index.d.ts +7 -0
  501. package/dist/types/components/DatePicker/index.d.ts.map +1 -0
  502. package/dist/types/components/Dialog/Dialog.d.ts +45 -0
  503. package/dist/types/components/Dialog/Dialog.d.ts.map +1 -0
  504. package/dist/types/components/Dialog/index.d.ts +2 -0
  505. package/dist/types/components/Dialog/index.d.ts.map +1 -0
  506. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +65 -0
  507. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
  508. package/dist/types/components/DropdownMenu/index.d.ts +22 -0
  509. package/dist/types/components/DropdownMenu/index.d.ts.map +1 -0
  510. package/dist/types/components/FloatLabel.d.ts +8 -0
  511. package/dist/types/components/FloatLabel.d.ts.map +1 -0
  512. package/dist/types/components/Glass/Glass.d.ts +10 -0
  513. package/dist/types/components/Glass/Glass.d.ts.map +1 -0
  514. package/dist/types/components/Glass/index.d.ts +2 -0
  515. package/dist/types/components/Glass/index.d.ts.map +1 -0
  516. package/dist/types/components/ImageViewer/ImageViewer.d.ts +58 -0
  517. package/dist/types/components/ImageViewer/ImageViewer.d.ts.map +1 -0
  518. package/dist/types/components/ImageViewer/index.d.ts +4 -0
  519. package/dist/types/components/ImageViewer/index.d.ts.map +1 -0
  520. package/dist/types/components/Input/Input.d.ts +27 -0
  521. package/dist/types/components/Input/Input.d.ts.map +1 -0
  522. package/dist/types/components/Input/index.d.ts +2 -0
  523. package/dist/types/components/Input/index.d.ts.map +1 -0
  524. package/dist/types/components/InputOTP/InputOTP.d.ts +20 -0
  525. package/dist/types/components/InputOTP/InputOTP.d.ts.map +1 -0
  526. package/dist/types/components/InputOTP/index.d.ts +2 -0
  527. package/dist/types/components/InputOTP/index.d.ts.map +1 -0
  528. package/dist/types/components/Interactive/3DCard.d.ts +28 -0
  529. package/dist/types/components/Interactive/3DCard.d.ts.map +1 -0
  530. package/dist/types/components/Interactive/3DMarquee.d.ts +20 -0
  531. package/dist/types/components/Interactive/3DMarquee.d.ts.map +1 -0
  532. package/dist/types/components/Interactive/CursorFollow.d.ts +75 -0
  533. package/dist/types/components/Interactive/CursorFollow.d.ts.map +1 -0
  534. package/dist/types/components/Interactive/index.cursor.d.ts +7 -0
  535. package/dist/types/components/Interactive/index.cursor.d.ts.map +1 -0
  536. package/dist/types/components/Interactive/index.d.ts +2 -0
  537. package/dist/types/components/Interactive/index.d.ts.map +1 -0
  538. package/dist/types/components/Label/Label.d.ts +3 -0
  539. package/dist/types/components/Label/Label.d.ts.map +1 -0
  540. package/dist/types/components/Label/index.d.ts +2 -0
  541. package/dist/types/components/Label/index.d.ts.map +1 -0
  542. package/dist/types/components/Marquee/Marquee.d.ts +31 -0
  543. package/dist/types/components/Marquee/Marquee.d.ts.map +1 -0
  544. package/dist/types/components/Marquee/MarqueeWrapper.d.ts +10 -0
  545. package/dist/types/components/Marquee/MarqueeWrapper.d.ts.map +1 -0
  546. package/dist/types/components/Marquee/index.d.ts +13 -0
  547. package/dist/types/components/Marquee/index.d.ts.map +1 -0
  548. package/dist/types/components/Masonry/Masonry.d.ts +41 -0
  549. package/dist/types/components/Masonry/Masonry.d.ts.map +1 -0
  550. package/dist/types/components/Masonry/MasonryWrapper.d.ts +29 -0
  551. package/dist/types/components/Masonry/MasonryWrapper.d.ts.map +1 -0
  552. package/dist/types/components/Masonry/index.d.ts +5 -0
  553. package/dist/types/components/Masonry/index.d.ts.map +1 -0
  554. package/dist/types/components/Pagination/Pagination.d.ts +24 -0
  555. package/dist/types/components/Pagination/Pagination.d.ts.map +1 -0
  556. package/dist/types/components/Pagination/index.d.ts +11 -0
  557. package/dist/types/components/Pagination/index.d.ts.map +1 -0
  558. package/dist/types/components/Popover/Popover.d.ts +22 -0
  559. package/dist/types/components/Popover/Popover.d.ts.map +1 -0
  560. package/dist/types/components/Popover/index.d.ts +5 -0
  561. package/dist/types/components/Popover/index.d.ts.map +1 -0
  562. package/dist/types/components/QrCode/QrCode.d.ts +51 -0
  563. package/dist/types/components/QrCode/QrCode.d.ts.map +1 -0
  564. package/dist/types/components/QrCode/index.d.ts +13 -0
  565. package/dist/types/components/QrCode/index.d.ts.map +1 -0
  566. package/dist/types/components/Radio/Radio.d.ts +35 -0
  567. package/dist/types/components/Radio/Radio.d.ts.map +1 -0
  568. package/dist/types/components/Radio/index.d.ts +2 -0
  569. package/dist/types/components/Radio/index.d.ts.map +1 -0
  570. package/dist/types/components/Rate/Rate.d.ts +26 -0
  571. package/dist/types/components/Rate/Rate.d.ts.map +1 -0
  572. package/dist/types/components/Rate/index.d.ts +3 -0
  573. package/dist/types/components/Rate/index.d.ts.map +1 -0
  574. package/dist/types/components/Resizable/Resizable.d.ts +71 -0
  575. package/dist/types/components/Resizable/Resizable.d.ts.map +1 -0
  576. package/dist/types/components/Resizable/index.d.ts +4 -0
  577. package/dist/types/components/Resizable/index.d.ts.map +1 -0
  578. package/dist/types/components/ScrollArea/ScrollArea.d.ts +19 -0
  579. package/dist/types/components/ScrollArea/ScrollArea.d.ts.map +1 -0
  580. package/dist/types/components/ScrollArea/index.d.ts +2 -0
  581. package/dist/types/components/ScrollArea/index.d.ts.map +1 -0
  582. package/dist/types/components/Select/Select.d.ts +33 -0
  583. package/dist/types/components/Select/Select.d.ts.map +1 -0
  584. package/dist/types/components/Select/index.d.ts +2 -0
  585. package/dist/types/components/Select/index.d.ts.map +1 -0
  586. package/dist/types/components/Separator/Separator.d.ts +5 -0
  587. package/dist/types/components/Separator/Separator.d.ts.map +1 -0
  588. package/dist/types/components/Separator/index.d.ts +2 -0
  589. package/dist/types/components/Separator/index.d.ts.map +1 -0
  590. package/dist/types/components/Sheet/Sheet.d.ts +36 -0
  591. package/dist/types/components/Sheet/Sheet.d.ts.map +1 -0
  592. package/dist/types/components/Sheet/index.d.ts +2 -0
  593. package/dist/types/components/Sheet/index.d.ts.map +1 -0
  594. package/dist/types/components/Sidebar/Sidebar.d.ts +50 -0
  595. package/dist/types/components/Sidebar/Sidebar.d.ts.map +1 -0
  596. package/dist/types/components/Sidebar/index.d.ts +4 -0
  597. package/dist/types/components/Sidebar/index.d.ts.map +1 -0
  598. package/dist/types/components/Skeleton/Skeleton.d.ts +6 -0
  599. package/dist/types/components/Skeleton/Skeleton.d.ts.map +1 -0
  600. package/dist/types/components/Skeleton/index.d.ts +2 -0
  601. package/dist/types/components/Skeleton/index.d.ts.map +1 -0
  602. package/dist/types/components/Slider/Slider.d.ts +25 -0
  603. package/dist/types/components/Slider/Slider.d.ts.map +1 -0
  604. package/dist/types/components/Slider/index.d.ts +2 -0
  605. package/dist/types/components/Slider/index.d.ts.map +1 -0
  606. package/dist/types/components/Stepper/Stepper.d.ts +86 -0
  607. package/dist/types/components/Stepper/Stepper.d.ts.map +1 -0
  608. package/dist/types/components/Stepper/StepperWrapper.d.ts +25 -0
  609. package/dist/types/components/Stepper/StepperWrapper.d.ts.map +1 -0
  610. package/dist/types/components/Stepper/index.d.ts +18 -0
  611. package/dist/types/components/Stepper/index.d.ts.map +1 -0
  612. package/dist/types/components/Switch/Switch.d.ts +14 -0
  613. package/dist/types/components/Switch/Switch.d.ts.map +1 -0
  614. package/dist/types/components/Switch/index.d.ts +2 -0
  615. package/dist/types/components/Switch/index.d.ts.map +1 -0
  616. package/dist/types/components/Table/TableFilter/data-table-date-filter.d.ts +9 -0
  617. package/dist/types/components/Table/TableFilter/data-table-date-filter.d.ts.map +1 -0
  618. package/dist/types/components/Table/TableFilter/data-table-filter-popover.d.ts +11 -0
  619. package/dist/types/components/Table/TableFilter/data-table-filter-popover.d.ts.map +1 -0
  620. package/dist/types/components/Table/TableFilter/data-table-slider-filter.d.ts +8 -0
  621. package/dist/types/components/Table/TableFilter/data-table-slider-filter.d.ts.map +1 -0
  622. package/dist/types/components/Table/TableWrapper.d.ts +2 -0
  623. package/dist/types/components/Table/TableWrapper.d.ts.map +1 -0
  624. package/dist/types/components/Table/data-table-column-header.d.ts +9 -0
  625. package/dist/types/components/Table/data-table-column-header.d.ts.map +1 -0
  626. package/dist/types/components/Table/data-table-pagination.d.ts +12 -0
  627. package/dist/types/components/Table/data-table-pagination.d.ts.map +1 -0
  628. package/dist/types/components/Table/data-table-toolbar.d.ts +10 -0
  629. package/dist/types/components/Table/data-table-toolbar.d.ts.map +1 -0
  630. package/dist/types/components/Table/data-table-view-options.d.ts +9 -0
  631. package/dist/types/components/Table/data-table-view-options.d.ts.map +1 -0
  632. package/dist/types/components/Table/data-table.d.ts +18 -0
  633. package/dist/types/components/Table/data-table.d.ts.map +1 -0
  634. package/dist/types/components/Table/index.d.ts +2 -0
  635. package/dist/types/components/Table/index.d.ts.map +1 -0
  636. package/dist/types/components/Table/select-column.d.ts +5 -0
  637. package/dist/types/components/Table/select-column.d.ts.map +1 -0
  638. package/dist/types/components/Tabs/Tabs.d.ts +22 -0
  639. package/dist/types/components/Tabs/Tabs.d.ts.map +1 -0
  640. package/dist/types/components/Tabs/classes.d.ts +29 -0
  641. package/dist/types/components/Tabs/classes.d.ts.map +1 -0
  642. package/dist/types/components/Tabs/index.d.ts +4 -0
  643. package/dist/types/components/Tabs/index.d.ts.map +1 -0
  644. package/dist/types/components/Tabs/types.d.ts +15 -0
  645. package/dist/types/components/Tabs/types.d.ts.map +1 -0
  646. package/dist/types/components/Textarea/Textarea.d.ts +17 -0
  647. package/dist/types/components/Textarea/Textarea.d.ts.map +1 -0
  648. package/dist/types/components/Textarea/index.d.ts +2 -0
  649. package/dist/types/components/Textarea/index.d.ts.map +1 -0
  650. package/dist/types/components/Theme/ThemeShowcase.d.ts +3 -0
  651. package/dist/types/components/Theme/ThemeShowcase.d.ts.map +1 -0
  652. package/dist/types/components/TimeGridView.d.ts +15 -0
  653. package/dist/types/components/TimeGridView.d.ts.map +1 -0
  654. package/dist/types/components/Toast/Toast.d.ts +12 -0
  655. package/dist/types/components/Toast/Toast.d.ts.map +1 -0
  656. package/dist/types/components/Toast/index.d.ts +3 -0
  657. package/dist/types/components/Toast/index.d.ts.map +1 -0
  658. package/dist/types/components/Toggle/Toggle.d.ts +10 -0
  659. package/dist/types/components/Toggle/Toggle.d.ts.map +1 -0
  660. package/dist/types/components/Toggle/index.d.ts +2 -0
  661. package/dist/types/components/Toggle/index.d.ts.map +1 -0
  662. package/dist/types/components/Tooltip/Tooltip.d.ts +19 -0
  663. package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -0
  664. package/dist/types/components/Tooltip/index.d.ts +3 -0
  665. package/dist/types/components/Tooltip/index.d.ts.map +1 -0
  666. package/dist/types/components/Tour/Tour.d.ts +105 -0
  667. package/dist/types/components/Tour/Tour.d.ts.map +1 -0
  668. package/dist/types/components/Tour/TourWrapper.d.ts +46 -0
  669. package/dist/types/components/Tour/TourWrapper.d.ts.map +1 -0
  670. package/dist/types/components/Tour/index.d.ts +36 -0
  671. package/dist/types/components/Tour/index.d.ts.map +1 -0
  672. package/dist/types/components/TreeSelect/TreeSelect.d.ts +2 -0
  673. package/dist/types/components/TreeSelect/TreeSelect.d.ts.map +1 -0
  674. package/dist/types/components/TreeSelect/index.d.ts +2 -0
  675. package/dist/types/components/TreeSelect/index.d.ts.map +1 -0
  676. package/dist/types/components/Upload/Upload.d.ts +69 -0
  677. package/dist/types/components/Upload/Upload.d.ts.map +1 -0
  678. package/dist/types/components/Upload/index.d.ts +2 -0
  679. package/dist/types/components/Upload/index.d.ts.map +1 -0
  680. package/dist/types/components/WheelColumn.d.ts +15 -0
  681. package/dist/types/components/WheelColumn.d.ts.map +1 -0
  682. package/dist/types/config/data-table.d.ts +125 -0
  683. package/dist/types/config/data-table.d.ts.map +1 -0
  684. package/dist/types/constants/common.d.ts +4 -0
  685. package/dist/types/constants/common.d.ts.map +1 -0
  686. package/dist/types/constants/theme.d.ts +13 -0
  687. package/dist/types/constants/theme.d.ts.map +1 -0
  688. package/dist/types/hooks/index.d.ts +10 -0
  689. package/dist/types/hooks/index.d.ts.map +1 -0
  690. package/dist/types/hooks/use-callback-ref.d.ts +10 -0
  691. package/dist/types/hooks/use-callback-ref.d.ts.map +1 -0
  692. package/dist/types/hooks/use-data-table.d.ts +26 -0
  693. package/dist/types/hooks/use-data-table.d.ts.map +1 -0
  694. package/dist/types/hooks/use-debounced-callback.d.ts +2 -0
  695. package/dist/types/hooks/use-debounced-callback.d.ts.map +1 -0
  696. package/dist/types/hooks/use-debounced-value.d.ts +9 -0
  697. package/dist/types/hooks/use-debounced-value.d.ts.map +1 -0
  698. package/dist/types/hooks/use-event-listener.d.ts +7 -0
  699. package/dist/types/hooks/use-event-listener.d.ts.map +1 -0
  700. package/dist/types/hooks/use-intersection-observer.d.ts +20 -0
  701. package/dist/types/hooks/use-intersection-observer.d.ts.map +1 -0
  702. package/dist/types/hooks/use-isomorphic-layout-effect.d.ts +3 -0
  703. package/dist/types/hooks/use-isomorphic-layout-effect.d.ts.map +1 -0
  704. package/dist/types/hooks/use-media-query.d.ts +7 -0
  705. package/dist/types/hooks/use-media-query.d.ts.map +1 -0
  706. package/dist/types/hooks/use-mouse-position.d.ts +14 -0
  707. package/dist/types/hooks/use-mouse-position.d.ts.map +1 -0
  708. package/dist/types/hooks/use-on-click-outside.d.ts +5 -0
  709. package/dist/types/hooks/use-on-click-outside.d.ts.map +1 -0
  710. package/dist/types/hooks/use-script.d.ts +9 -0
  711. package/dist/types/hooks/use-script.d.ts.map +1 -0
  712. package/dist/types/hooks/use-scroll-lock.d.ts +13 -0
  713. package/dist/types/hooks/use-scroll-lock.d.ts.map +1 -0
  714. package/dist/types/index.d.ts +72 -0
  715. package/dist/types/index.d.ts.map +1 -0
  716. package/dist/types/lib/TextAnimation/BlurText.d.ts +18 -0
  717. package/dist/types/lib/TextAnimation/BlurText.d.ts.map +1 -0
  718. package/dist/types/lib/TextAnimation/CircularText.d.ts +10 -0
  719. package/dist/types/lib/TextAnimation/CircularText.d.ts.map +1 -0
  720. package/dist/types/lib/TextAnimation/FlipWords.d.ts +10 -0
  721. package/dist/types/lib/TextAnimation/FlipWords.d.ts.map +1 -0
  722. package/dist/types/lib/TextAnimation/GradientText.d.ts +11 -0
  723. package/dist/types/lib/TextAnimation/GradientText.d.ts.map +1 -0
  724. package/dist/types/lib/TextAnimation/RollingText.d.ts +12 -0
  725. package/dist/types/lib/TextAnimation/RollingText.d.ts.map +1 -0
  726. package/dist/types/lib/TextAnimation/RotatingText.d.ts +11 -0
  727. package/dist/types/lib/TextAnimation/RotatingText.d.ts.map +1 -0
  728. package/dist/types/lib/TextAnimation/ShimmeringText.d.ts +12 -0
  729. package/dist/types/lib/TextAnimation/ShimmeringText.d.ts.map +1 -0
  730. package/dist/types/lib/TextAnimation/SplittingText.d.ts +26 -0
  731. package/dist/types/lib/TextAnimation/SplittingText.d.ts.map +1 -0
  732. package/dist/types/lib/TextAnimation/TextGenerateEffect.d.ts +10 -0
  733. package/dist/types/lib/TextAnimation/TextGenerateEffect.d.ts.map +1 -0
  734. package/dist/types/lib/TextAnimation/TextHoverEffect.d.ts +6 -0
  735. package/dist/types/lib/TextAnimation/TextHoverEffect.d.ts.map +1 -0
  736. package/dist/types/lib/TextAnimation/TextPressureEffect.d.ts +20 -0
  737. package/dist/types/lib/TextAnimation/TextPressureEffect.d.ts.map +1 -0
  738. package/dist/types/lib/TextAnimation/TypingText.d.ts +27 -0
  739. package/dist/types/lib/TextAnimation/TypingText.d.ts.map +1 -0
  740. package/dist/types/lib/TextAnimation/WritingText.d.ts +13 -0
  741. package/dist/types/lib/TextAnimation/WritingText.d.ts.map +1 -0
  742. package/dist/types/lib/TextAnimation/index.d.ts +16 -0
  743. package/dist/types/lib/TextAnimation/index.d.ts.map +1 -0
  744. package/dist/types/types/data-table.d.ts +44 -0
  745. package/dist/types/types/data-table.d.ts.map +1 -0
  746. package/dist/types/types/theme.d.ts +11 -0
  747. package/dist/types/types/theme.d.ts.map +1 -0
  748. package/dist/types/types/variables.d.ts +6 -0
  749. package/dist/types/types/variables.d.ts.map +1 -0
  750. package/dist/types/utils/animations.d.ts +47 -0
  751. package/dist/types/utils/animations.d.ts.map +1 -0
  752. package/dist/types/utils/css.d.ts +4 -0
  753. package/dist/types/utils/css.d.ts.map +1 -0
  754. package/dist/types/utils/data-table.d.ts +13 -0
  755. package/dist/types/utils/data-table.d.ts.map +1 -0
  756. package/dist/types/utils/datetime.d.ts +2 -0
  757. package/dist/types/utils/datetime.d.ts.map +1 -0
  758. package/dist/types/utils/parsers.d.ts +38 -0
  759. package/dist/types/utils/parsers.d.ts.map +1 -0
  760. package/package.json +968 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stepper.js","sources":["../../../../src/components/Stepper/Stepper.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn, Slot, useComposedRefs } from \"@dsui/ui/index\";\nimport { Check } from \"lucide-react\";\nimport * as React from \"react\";\n\nconst ROOT_NAME = \"Stepper\";\nconst LIST_NAME = \"StepperList\";\nconst ITEM_NAME = \"StepperItem\";\nconst TRIGGER_NAME = \"StepperTrigger\";\nconst INDICATOR_NAME = \"StepperIndicator\";\nconst SEPARATOR_NAME = \"StepperSeparator\";\nconst TITLE_NAME = \"StepperTitle\";\nconst DESCRIPTION_NAME = \"StepperDescription\";\nconst CONTENT_NAME = \"StepperContent\";\nconst PREV_NAME = \"StepperPrev\";\nconst NEXT_NAME = \"StepperNext\";\n\nconst ENTRY_FOCUS = \"stepperFocusGroup.onEntryFocus\";\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\nconst ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\n\nconst stepperColorClasses: Record<\n StepperColor,\n {\n indicator: {\n active: string;\n completed: string;\n inactive: string;\n };\n separator: {\n active: string;\n completed: string;\n inactive: string;\n };\n }\n> = {\n primary: {\n indicator: {\n active:\n \"border-primary bg-primary text-primary-foreground data-[variant=dot]:bg-primary/30 data-[variant=dot]:border-primary/0\",\n completed:\n \"border-primary bg-primary text-primary-foreground data-[variant=dot]:bg-primary/30 data-[variant=dot]:border-primary/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-primary\",\n completed: \"bg-primary\",\n inactive: \"bg-border\",\n },\n },\n secondary: {\n indicator: {\n active:\n \"border-secondary bg-secondary text-secondary-foreground data-[variant=dot]:bg-secondary/30 data-[variant=dot]:border-secondary/0\",\n completed:\n \"border-secondary bg-secondary text-secondary-foreground data-[variant=dot]:bg-secondary/30 data-[variant=dot]:border-secondary/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-secondary\",\n completed: \"bg-secondary\",\n inactive: \"bg-border\",\n },\n },\n accent: {\n indicator: {\n active:\n \"border-accent bg-accent text-accent-foreground data-[variant=dot]:bg-accent/30 data-[variant=dot]:border-accent/0\",\n completed:\n \"border-accent bg-accent text-accent-foreground data-[variant=dot]:bg-accent/30 data-[variant=dot]:border-accent/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-accent\",\n completed: \"bg-accent\",\n inactive: \"bg-border\",\n },\n },\n destructive: {\n indicator: {\n active:\n \"border-destructive bg-destructive text-destructive-foreground data-[variant=dot]:bg-destructive/30 data-[variant=dot]:border-destructive/0\",\n completed:\n \"border-destructive bg-destructive text-destructive-foreground data-[variant=dot]:bg-destructive/30 data-[variant=dot]:border-destructive/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-destructive\",\n completed: \"bg-destructive\",\n inactive: \"bg-border\",\n },\n },\n muted: {\n indicator: {\n active:\n \"border-muted bg-muted text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n completed:\n \"border-muted bg-muted text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-muted\",\n completed: \"bg-muted\",\n inactive: \"bg-border\",\n },\n },\n success: {\n indicator: {\n active:\n \"border-success bg-success text-success-foreground data-[variant=dot]:bg-success/30 data-[variant=dot]:border-success/0\",\n completed:\n \"border-success bg-success text-success-foreground data-[variant=dot]:bg-success/30 data-[variant=dot]:border-success/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-success\",\n completed: \"bg-success\",\n inactive: \"bg-border\",\n },\n },\n error: {\n indicator: {\n active:\n \"border-error bg-error text-error-foreground data-[variant=dot]:bg-error/30 data-[variant=dot]:border-error/0\",\n completed:\n \"border-error bg-error text-error-foreground data-[variant=dot]:bg-error/30 data-[variant=dot]:border-error/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-error\",\n completed: \"bg-error\",\n inactive: \"bg-border\",\n },\n },\n warning: {\n indicator: {\n active:\n \"border-warning bg-warning text-warning-foreground data-[variant=dot]:bg-warning/30 data-[variant=dot]:border-warning/0\",\n completed:\n \"border-warning bg-warning text-warning-foreground data-[variant=dot]:bg-warning/30 data-[variant=dot]:border-warning/0\",\n inactive:\n \"border-muted bg-background text-muted-foreground data-[variant=dot]:bg-muted/30 data-[variant=dot]:border-muted/0\",\n },\n separator: {\n active: \"bg-warning\",\n completed: \"bg-warning\",\n inactive: \"bg-border\",\n },\n },\n};\n\nfunction getIndicatorColorClass(\n color: StepperColor | undefined,\n customColor: string | undefined,\n dataState: DataState,\n): string {\n if (customColor) {\n return \"\";\n }\n\n if (!color) {\n // Default primary color\n return stepperColorClasses.primary.indicator[dataState];\n }\n\n return stepperColorClasses[color].indicator[dataState];\n}\n\nfunction getSeparatorColorClass(\n color: StepperColor | undefined,\n customColor: string | undefined,\n dataState: DataState,\n): string {\n if (customColor) {\n return \"\";\n }\n\n if (!color) {\n // Default primary color\n return stepperColorClasses.primary.separator[dataState];\n }\n\n return stepperColorClasses[color].separator[dataState];\n}\n\nfunction getCustomColorStyle(\n customColor: string | undefined,\n dataState: DataState,\n isIndicator: boolean,\n): React.CSSProperties | undefined {\n if (!customColor) return undefined;\n\n if (isIndicator) {\n if (dataState === \"active\" || dataState === \"completed\") {\n return {\n borderColor: customColor,\n backgroundColor: customColor,\n color: \"white\",\n };\n }\n return {\n borderColor: \"hsl(var(--muted))\",\n backgroundColor: \"hsl(var(--background))\",\n color: \"hsl(var(--muted-foreground))\",\n };\n } else {\n // separator\n if (dataState === \"active\" || dataState === \"completed\") {\n return {\n backgroundColor: customColor,\n };\n }\n return {\n backgroundColor: \"hsl(var(--border))\",\n };\n }\n}\n\ntype Direction = \"ltr\" | \"rtl\";\ntype Orientation = \"horizontal\" | \"vertical\";\ntype NavigationDirection = \"next\" | \"prev\";\ntype ActivationMode = \"automatic\" | \"manual\";\ntype DataState = \"inactive\" | \"active\" | \"completed\";\ntype StepperColor =\n | \"primary\"\n | \"secondary\"\n | \"accent\"\n | \"destructive\"\n | \"muted\"\n | \"success\"\n | \"error\"\n | \"warning\";\ntype StepperVariant = \"normal\" | \"dot\";\ntype LabelPosition = \"top\" | \"bottom\" | \"left\" | \"right\";\n\ninterface DivProps extends React.ComponentProps<\"div\"> {\n asChild?: boolean;\n}\ninterface ButtonProps extends React.ComponentProps<\"button\"> {\n asChild?: boolean;\n}\n\ntype ListElement = React.ComponentRef<typeof StepperList>;\ntype TriggerElement = React.ComponentRef<typeof StepperTrigger>;\n\nfunction getId(\n id: string,\n variant: \"trigger\" | \"content\" | \"title\" | \"description\",\n value: string,\n) {\n return `${id}-${variant}-${value}`;\n}\n\ntype FocusIntent = \"first\" | \"last\" | \"prev\" | \"next\";\n\nconst MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\",\n};\n\nfunction getDirectionAwareKey(key: string, dir?: Direction) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\"\n ? \"ArrowRight\"\n : key === \"ArrowRight\"\n ? \"ArrowLeft\"\n : key;\n}\n\nfunction getFocusIntent(\n event: React.KeyboardEvent<TriggerElement>,\n dir?: Direction,\n orientation?: Orientation,\n) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key))\n return undefined;\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key))\n return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nfunction focusFirst(\n candidates: React.RefObject<TriggerElement | null>[],\n preventScroll = false,\n) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidateRef of candidates) {\n const candidate = candidateRef.current;\n if (!candidate) continue;\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\nfunction wrapArray<T>(array: T[], startIndex: number) {\n return array.map<T>(\n (_, index) => array[(startIndex + index) % array.length] as T,\n );\n}\n\nconst useIsomorphicLayoutEffect =\n typeof window === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\nfunction useAsRef<T>(props: T) {\n const ref = React.useRef<T>(props);\n\n useIsomorphicLayoutEffect(() => {\n ref.current = props;\n });\n\n return ref;\n}\n\nfunction useLazyRef<T>(fn: () => T) {\n const ref = React.useRef<T | null>(null);\n\n if (ref.current === null) {\n ref.current = fn();\n }\n\n return ref as React.RefObject<T>;\n}\n\nfunction getDataState(\n value: string | undefined,\n itemValue: string,\n stepState: StepState | undefined,\n steps: Map<string, StepState>,\n variant: \"item\" | \"separator\" = \"item\",\n): DataState {\n const stepKeys = Array.from(steps.keys());\n const currentIndex = stepKeys.indexOf(itemValue);\n\n if (stepState?.completed) return \"completed\";\n\n if (value === itemValue) {\n return variant === \"separator\" ? \"inactive\" : \"active\";\n }\n\n if (value) {\n const activeIndex = stepKeys.indexOf(value);\n\n if (activeIndex > currentIndex) return \"completed\";\n }\n\n return \"inactive\";\n}\n\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\nfunction useDirection(dirProp?: Direction): Direction {\n const contextDir = React.useContext(DirectionContext);\n return dirProp ?? contextDir ?? \"ltr\";\n}\n\ninterface StepState {\n value: string;\n completed: boolean;\n disabled: boolean;\n}\n\ninterface StoreState {\n steps: Map<string, StepState>;\n value: string;\n}\n\ninterface Store {\n subscribe: (callback: () => void) => () => void;\n getState: () => StoreState;\n setState: <K extends keyof StoreState>(key: K, value: StoreState[K]) => void;\n setStateWithValidation: (\n value: string,\n direction: NavigationDirection,\n ) => Promise<boolean>;\n hasValidation: () => boolean;\n notify: () => void;\n addStep: (value: string, completed: boolean, disabled: boolean) => void;\n removeStep: (value: string) => void;\n setStep: (value: string, completed: boolean, disabled: boolean) => void;\n}\n\nconst StoreContext = React.createContext<Store | null>(null);\n\nfunction useStoreContext(consumerName: string) {\n const context = React.useContext(StoreContext);\n if (!context) {\n throw new Error(`\\`${consumerName}\\` must be used within \\`${ROOT_NAME}\\``);\n }\n return context;\n}\n\nfunction useStore<T>(selector: (state: StoreState) => T): T {\n const store = useStoreContext(\"useStore\");\n\n const getSnapshot = React.useCallback(\n () => selector(store.getState()),\n [store, selector],\n );\n\n return React.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);\n}\n\ninterface ItemData {\n id: string;\n ref: React.RefObject<TriggerElement | null>;\n value: string;\n active: boolean;\n disabled: boolean;\n}\n\ninterface StepperContextValue {\n id: string;\n dir: Direction;\n orientation: Orientation;\n activationMode: ActivationMode;\n disabled: boolean;\n nonInteractive: boolean;\n loop: boolean;\n color?: StepperColor;\n customColor?: string;\n variant?: StepperVariant;\n labelPosition?: LabelPosition;\n}\n\nconst StepperContext = React.createContext<StepperContextValue | null>(null);\n\nfunction useStepperContext(consumerName: string) {\n const context = React.useContext(StepperContext);\n if (!context) {\n throw new Error(`\\`${consumerName}\\` must be used within \\`${ROOT_NAME}\\``);\n }\n return context;\n}\n\ninterface StepperRootProps extends DivProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n onValueComplete?: (value: string, completed: boolean) => void;\n onValueAdd?: (value: string) => void;\n onValueRemove?: (value: string) => void;\n onValidate?: (\n value: string,\n direction: NavigationDirection,\n ) => boolean | Promise<boolean>;\n activationMode?: ActivationMode;\n dir?: Direction;\n orientation?: Orientation;\n disabled?: boolean;\n loop?: boolean;\n nonInteractive?: boolean;\n color?: StepperColor;\n customColor?: string;\n variant?: StepperVariant;\n labelPosition?: LabelPosition;\n}\n\nfunction StepperRoot(props: StepperRootProps) {\n const {\n value,\n defaultValue,\n onValueChange,\n onValueComplete,\n onValueAdd,\n onValueRemove,\n onValidate,\n id: idProp,\n dir: dirProp,\n orientation = \"horizontal\",\n activationMode = \"automatic\",\n asChild,\n disabled = false,\n nonInteractive = false,\n loop = false,\n color,\n customColor,\n variant = \"normal\",\n labelPosition = \"right\",\n className,\n ...rootProps\n } = props;\n\n const listenersRef = useLazyRef(() => new Set<() => void>());\n const stateRef = useLazyRef<StoreState>(() => ({\n steps: new Map(),\n value: value ?? defaultValue ?? \"\",\n }));\n const propsRef = useAsRef({\n onValueChange,\n onValueComplete,\n onValueAdd,\n onValueRemove,\n onValidate,\n });\n\n const store: Store = React.useMemo(() => {\n return {\n subscribe: (cb) => {\n listenersRef.current.add(cb);\n return () => listenersRef.current.delete(cb);\n },\n getState: () => stateRef.current,\n setState: (key, value) => {\n if (Object.is(stateRef.current[key], value)) return;\n\n if (key === \"value\" && typeof value === \"string\") {\n stateRef.current.value = value;\n propsRef.current.onValueChange?.(value);\n } else {\n stateRef.current[key] = value;\n }\n\n store.notify();\n },\n setStateWithValidation: async (value, direction) => {\n if (!propsRef.current.onValidate) {\n store.setState(\"value\", value);\n return true;\n }\n\n try {\n const isValid = await propsRef.current.onValidate(value, direction);\n if (isValid) {\n store.setState(\"value\", value);\n }\n return isValid;\n } catch {\n return false;\n }\n },\n hasValidation: () => !!propsRef.current.onValidate,\n addStep: (value, completed, disabled) => {\n const newStep: StepState = { value, completed, disabled };\n stateRef.current.steps.set(value, newStep);\n propsRef.current.onValueAdd?.(value);\n store.notify();\n },\n removeStep: (value) => {\n stateRef.current.steps.delete(value);\n propsRef.current.onValueRemove?.(value);\n store.notify();\n },\n setStep: (value, completed, disabled) => {\n const step = stateRef.current.steps.get(value);\n if (step) {\n const updatedStep: StepState = { ...step, completed, disabled };\n stateRef.current.steps.set(value, updatedStep);\n\n if (completed !== step.completed) {\n propsRef.current.onValueComplete?.(value, completed);\n }\n\n store.notify();\n }\n },\n notify: () => {\n for (const cb of listenersRef.current) {\n cb();\n }\n },\n };\n }, [listenersRef, stateRef, propsRef]);\n\n useIsomorphicLayoutEffect(() => {\n if (value !== undefined) {\n store.setState(\"value\", value);\n }\n }, [value, store]);\n\n const dir = useDirection(dirProp);\n\n const id = React.useId();\n\n const rootId = idProp ?? id;\n\n const contextValue = React.useMemo<StepperContextValue>(\n () => ({\n id: rootId,\n dir,\n orientation,\n activationMode,\n disabled,\n nonInteractive,\n loop,\n color,\n customColor,\n variant,\n labelPosition,\n }),\n [\n rootId,\n dir,\n orientation,\n activationMode,\n disabled,\n nonInteractive,\n loop,\n color,\n customColor,\n variant,\n labelPosition,\n ],\n );\n\n const RootPrimitive = asChild ? Slot : \"div\";\n\n return (\n <StoreContext.Provider value={store}>\n <StepperContext.Provider value={contextValue}>\n <RootPrimitive\n id={rootId}\n data-disabled={disabled ? \"\" : undefined}\n data-orientation={orientation}\n data-slot=\"stepper\"\n dir={dir}\n {...rootProps}\n className={cn(\n \"flex gap-6\",\n orientation === \"horizontal\" ? \"w-full flex-col\" : \"flex-row\",\n className,\n )}\n />\n </StepperContext.Provider>\n </StoreContext.Provider>\n );\n}\n\ninterface FocusContextValue {\n tabStopId: string | null;\n onItemFocus: (tabStopId: string) => void;\n onItemShiftTab: () => void;\n onFocusableItemAdd: () => void;\n onFocusableItemRemove: () => void;\n onItemRegister: (item: ItemData) => void;\n onItemUnregister: (id: string) => void;\n getItems: () => ItemData[];\n}\n\nconst FocusContext = React.createContext<FocusContextValue | null>(null);\n\nfunction useFocusContext(consumerName: string) {\n const context = React.useContext(FocusContext);\n if (!context) {\n throw new Error(\n `\\`${consumerName}\\` must be used within \\`FocusProvider\\``,\n );\n }\n return context;\n}\n\ninterface StepperListProps extends DivProps {\n asChild?: boolean;\n}\n\nfunction StepperList(props: StepperListProps) {\n const { className, children, asChild, ref, ...listProps } = props;\n\n const context = useStepperContext(LIST_NAME);\n const orientation = context.orientation;\n const currentValue = useStore((state) => state.value);\n\n const [tabStopId, setTabStopId] = React.useState<string | null>(null);\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const [focusableItemCount, setFocusableItemCount] = React.useState(0);\n const isClickFocusRef = React.useRef(false);\n const itemsRef = React.useRef<Map<string, ItemData>>(new Map());\n const listRef = React.useRef<ListElement>(null);\n const composedRef = useComposedRefs(ref, listRef);\n\n const onItemFocus = React.useCallback((tabStopId: string) => {\n setTabStopId(tabStopId);\n }, []);\n\n const onItemShiftTab = React.useCallback(() => {\n setIsTabbingBackOut(true);\n }, []);\n\n const onFocusableItemAdd = React.useCallback(() => {\n setFocusableItemCount((prevCount) => prevCount + 1);\n }, []);\n\n const onFocusableItemRemove = React.useCallback(() => {\n setFocusableItemCount((prevCount) => prevCount - 1);\n }, []);\n\n const onItemRegister = React.useCallback((item: ItemData) => {\n itemsRef.current.set(item.id, item);\n }, []);\n\n const onItemUnregister = React.useCallback((id: string) => {\n itemsRef.current.delete(id);\n }, []);\n\n const getItems = React.useCallback(() => {\n return Array.from(itemsRef.current.values())\n .filter((item) => item.ref.current)\n .sort((a, b) => {\n const elementA = a.ref.current;\n const elementB = b.ref.current;\n if (!elementA || !elementB) return 0;\n const position = elementA.compareDocumentPosition(elementB);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n return 1;\n }\n return 0;\n });\n }, []);\n\n const onBlur = React.useCallback(\n (event: React.FocusEvent<ListElement>) => {\n listProps.onBlur?.(event);\n if (event.defaultPrevented) return;\n\n setIsTabbingBackOut(false);\n },\n [listProps.onBlur],\n );\n\n const onFocus = React.useCallback(\n (event: React.FocusEvent<ListElement>) => {\n listProps.onFocus?.(event);\n if (event.defaultPrevented) return;\n\n const isKeyboardFocus = !isClickFocusRef.current;\n if (\n event.target === event.currentTarget &&\n isKeyboardFocus &&\n !isTabbingBackOut\n ) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n\n if (!entryFocusEvent.defaultPrevented) {\n const items = Array.from(itemsRef.current.values()).filter(\n (item) => !item.disabled,\n );\n const selectedItem = currentValue\n ? items.find((item) => item.value === currentValue)\n : undefined;\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === tabStopId);\n\n const candidateItems = [\n selectedItem,\n activeItem,\n currentItem,\n ...items,\n ].filter(Boolean) as ItemData[];\n const candidateRefs = candidateItems.map((item) => item.ref);\n focusFirst(candidateRefs, false);\n }\n }\n isClickFocusRef.current = false;\n },\n [listProps.onFocus, isTabbingBackOut, currentValue, tabStopId],\n );\n\n const onMouseDown = React.useCallback(\n (event: React.MouseEvent<ListElement>) => {\n listProps.onMouseDown?.(event);\n\n if (event.defaultPrevented) return;\n\n isClickFocusRef.current = true;\n },\n [listProps.onMouseDown],\n );\n\n const focusContextValue = React.useMemo<FocusContextValue>(\n () => ({\n tabStopId,\n onItemFocus,\n onItemShiftTab,\n onFocusableItemAdd,\n onFocusableItemRemove,\n onItemRegister,\n onItemUnregister,\n getItems,\n }),\n [\n tabStopId,\n onItemFocus,\n onItemShiftTab,\n onFocusableItemAdd,\n onFocusableItemRemove,\n onItemRegister,\n onItemUnregister,\n getItems,\n ],\n );\n\n const ListPrimitive = asChild ? Slot : \"div\";\n\n return (\n <FocusContext.Provider value={focusContextValue}>\n <ListPrimitive\n role=\"tablist\"\n aria-orientation={orientation}\n data-orientation={orientation}\n data-slot=\"stepper-list\"\n dir={context.dir}\n tabIndex={isTabbingBackOut || focusableItemCount === 0 ? -1 : 0}\n {...listProps}\n ref={composedRef}\n className={cn(\n \"flex outline-none\",\n orientation === \"horizontal\"\n ? \"flex-row items-center\"\n : \"flex-col items-start\",\n className,\n )}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseDown={onMouseDown}\n >\n {children}\n </ListPrimitive>\n </FocusContext.Provider>\n );\n}\n\ninterface StepperItemContextValue {\n value: string;\n stepState: StepState | undefined;\n}\n\nconst StepperItemContext = React.createContext<StepperItemContextValue | null>(\n null,\n);\n\nfunction useStepperItemContext(consumerName: string) {\n const context = React.useContext(StepperItemContext);\n if (!context) {\n throw new Error(`\\`${consumerName}\\` must be used within \\`${ITEM_NAME}\\``);\n }\n return context;\n}\n\ninterface StepperItemProps extends DivProps {\n value: string;\n completed?: boolean;\n disabled?: boolean;\n}\n\nfunction StepperItem(props: StepperItemProps) {\n const {\n value: itemValue,\n completed = false,\n disabled = false,\n asChild,\n className,\n children,\n ref,\n ...itemProps\n } = props;\n\n const context = useStepperContext(ITEM_NAME);\n const store = useStoreContext(ITEM_NAME);\n const orientation = context.orientation;\n const labelPosition = context.labelPosition ?? \"right\";\n const value = useStore((state) => state.value);\n\n useIsomorphicLayoutEffect(() => {\n store.addStep(itemValue, completed, disabled);\n\n return () => {\n store.removeStep(itemValue);\n };\n }, [itemValue, completed, disabled]);\n\n useIsomorphicLayoutEffect(() => {\n store.setStep(itemValue, completed, disabled);\n }, [itemValue, completed, disabled]);\n\n const stepState = useStore((state) => state.steps.get(itemValue));\n const steps = useStore((state) => state.steps);\n const dataState = getDataState(value, itemValue, stepState, steps);\n\n const stepKeys = Array.from(steps.keys());\n const stepIndex = stepKeys.indexOf(itemValue);\n const isFirstStep = stepIndex === 0;\n const isLastStep = stepIndex === stepKeys.length - 1;\n\n const itemContextValue = React.useMemo<StepperItemContextValue>(\n () => ({\n value: itemValue,\n stepState,\n }),\n [itemValue, stepState],\n );\n\n // Determine item layout based on orientation and labelPosition\n const getItemClasses = () => {\n const baseClasses = \"relative flex\";\n\n if (orientation === \"horizontal\") {\n // Horizontal stepper\n if (labelPosition === \"top\" || labelPosition === \"bottom\") {\n // When labels are above/below, use flex-col to stack indicator row and label\n // Each item takes equal space\n return `${baseClasses} flex-col items-center flex-1 gap-2`;\n }\n // Default: labels left/right - flex-row\n return `${baseClasses} flex-row items-center not-last:flex-1`;\n } else {\n // Vertical stepper - always flex-col for vertical orientation\n return `${baseClasses} flex-col`;\n }\n };\n\n // Reorganize children for top/bottom label positions\n const processedChildren = React.useMemo(() => {\n if (\n orientation === \"horizontal\" &&\n (labelPosition === \"top\" || labelPosition === \"bottom\")\n ) {\n const childArray = React.Children.toArray(children);\n let trigger: React.ReactNode = null;\n let indicator: React.ReactNode = null;\n let separator: React.ReactNode = null;\n const others: React.ReactNode[] = [];\n\n childArray.forEach((child) => {\n if (React.isValidElement(child)) {\n const slot = (child.props as { \"data-slot\"?: string })[\"data-slot\"];\n if (slot === \"stepper-trigger\" || child.type === StepperTrigger) {\n trigger = child;\n // Extract indicator from trigger's children if it exists\n const triggerChildren = React.Children.toArray(\n (child as React.ReactElement<{ children?: React.ReactNode }>)\n .props.children,\n );\n triggerChildren.forEach((triggerChild) => {\n if (React.isValidElement(triggerChild)) {\n const triggerChildSlot = (\n triggerChild.props as { \"data-slot\"?: string }\n )[\"data-slot\"];\n if (\n triggerChildSlot === \"stepper-indicator\" ||\n triggerChild.type === StepperIndicator\n ) {\n indicator = triggerChild;\n }\n }\n });\n } else if (\n slot === \"stepper-separator\" ||\n child.type === StepperSeparator\n ) {\n separator = child;\n } else {\n others.push(child);\n }\n } else {\n others.push(child);\n }\n });\n\n // New structure: indicator row (with indicator + separator) then trigger\n // For proper centering, we need separators on both sides\n\n // Get the state for left separator (connects to previous step)\n // Left separator should be active if current step or any previous step is active\n const prevStepIndex = stepIndex - 1;\n const prevStepValue = prevStepIndex >= 0 ? stepKeys[prevStepIndex] : null;\n const leftSeparatorState = prevStepValue\n ? getDataState(\n value,\n prevStepValue,\n steps.get(prevStepValue),\n steps,\n \"separator\",\n )\n : \"inactive\";\n\n // Create left separator (even if separator element doesn't exist)\n let leftSeparator: React.ReactNode = null;\n if (!isFirstStep) {\n const color = context.color;\n const customColor = context.customColor;\n\n leftSeparator = (\n <div\n key=\"left-separator\"\n className={cn(\n \"h-px flex-1 transition-colors\",\n getSeparatorColorClass(color, customColor, leftSeparatorState),\n )}\n style={getCustomColorStyle(customColor, leftSeparatorState, false)}\n aria-hidden=\"true\"\n />\n );\n }\n\n const indicatorRow = (\n <div\n className=\"flex w-full items-center justify-center\"\n key=\"indicator-row\"\n >\n {/* Left separator - connects to previous step */}\n {leftSeparator}\n {/* Spacer if first step */}\n {isFirstStep && (\n <div className=\"h-px flex-1 bg-transparent\" aria-hidden=\"true\" />\n )}\n {indicator}\n {/* Right separator - connects to next step */}\n {!isLastStep && separator}\n {/* Spacer for last step to maintain centering */}\n {isLastStep && (\n <div className=\"h-px flex-1 bg-transparent\" aria-hidden=\"true\" />\n )}\n </div>\n );\n\n if (labelPosition === \"top\") {\n return [trigger, indicatorRow, ...others];\n } else {\n return [indicatorRow, trigger, ...others];\n }\n }\n\n return children;\n }, [\n children,\n orientation,\n labelPosition,\n isFirstStep,\n isLastStep,\n stepIndex,\n stepKeys,\n steps,\n value,\n context.color,\n context.customColor,\n ]);\n\n const ItemPrimitive = asChild ? Slot : \"div\";\n\n return (\n <StepperItemContext.Provider value={itemContextValue}>\n <ItemPrimitive\n data-disabled={stepState?.disabled ? \"\" : undefined}\n data-orientation={orientation}\n data-state={dataState}\n data-slot=\"stepper-item\"\n data-label-position={labelPosition}\n dir={context.dir}\n {...itemProps}\n ref={ref}\n className={cn(getItemClasses(), className)}\n >\n {processedChildren}\n </ItemPrimitive>\n </StepperItemContext.Provider>\n );\n}\n\nfunction StepperTrigger(props: ButtonProps) {\n const { asChild, disabled, className, ref, ...triggerProps } = props;\n\n const context = useStepperContext(TRIGGER_NAME);\n const itemContext = useStepperItemContext(TRIGGER_NAME);\n const store = useStoreContext(TRIGGER_NAME);\n const focusContext = useFocusContext(TRIGGER_NAME);\n const value = useStore((state) => state.value);\n const itemValue = itemContext.value;\n const stepState = useStore((state) => state.steps.get(itemValue));\n const activationMode = context.activationMode;\n const orientation = context.orientation;\n const loop = context.loop;\n const labelPosition = context.labelPosition ?? \"right\";\n\n const steps = useStore((state) => state.steps);\n const stepIndex = Array.from(steps.keys()).indexOf(itemValue);\n\n const stepPosition = stepIndex + 1;\n const stepCount = steps.size;\n\n const triggerId = getId(context.id, \"trigger\", itemValue);\n const contentId = getId(context.id, \"content\", itemValue);\n const titleId = getId(context.id, \"title\", itemValue);\n const descriptionId = getId(context.id, \"description\", itemValue);\n\n const isDisabled = context.disabled || stepState?.disabled || disabled;\n const isActive = value === itemValue;\n const isTabStop = focusContext.tabStopId === triggerId;\n const dataState = getDataState(value, itemValue, stepState, steps);\n\n const triggerRef = React.useRef<TriggerElement>(null);\n const composedRef = useComposedRefs(ref, triggerRef);\n const isArrowKeyPressedRef = React.useRef(false);\n const isMouseClickRef = React.useRef(false);\n\n React.useEffect(() => {\n function onKeyDown(event: KeyboardEvent) {\n if (ARROW_KEYS.includes(event.key)) {\n isArrowKeyPressedRef.current = true;\n }\n }\n function onKeyUp() {\n isArrowKeyPressedRef.current = false;\n }\n document.addEventListener(\"keydown\", onKeyDown);\n document.addEventListener(\"keyup\", onKeyUp);\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown);\n document.removeEventListener(\"keyup\", onKeyUp);\n };\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n focusContext.onItemRegister({\n id: triggerId,\n ref: triggerRef,\n value: itemValue,\n active: isTabStop,\n disabled: !!isDisabled,\n });\n\n if (!isDisabled) {\n focusContext.onFocusableItemAdd();\n }\n\n return () => {\n focusContext.onItemUnregister(triggerId);\n if (!isDisabled) {\n focusContext.onFocusableItemRemove();\n }\n };\n }, [focusContext, triggerId, itemValue, isTabStop, isDisabled]);\n\n const onClick = React.useCallback(\n async (event: React.MouseEvent<TriggerElement>) => {\n triggerProps.onClick?.(event);\n if (event.defaultPrevented) return;\n\n if (!isDisabled && !context.nonInteractive) {\n const currentStepIndex = Array.from(steps.keys()).indexOf(value ?? \"\");\n const targetStepIndex = Array.from(steps.keys()).indexOf(itemValue);\n const direction = targetStepIndex > currentStepIndex ? \"next\" : \"prev\";\n\n await store.setStateWithValidation(itemValue, direction);\n }\n },\n [\n isDisabled,\n context.nonInteractive,\n store,\n itemValue,\n value,\n steps,\n triggerProps.onClick,\n ],\n );\n\n const onFocus = React.useCallback(\n async (event: React.FocusEvent<TriggerElement>) => {\n triggerProps.onFocus?.(event);\n if (event.defaultPrevented) return;\n\n focusContext.onItemFocus(triggerId);\n\n const isKeyboardFocus = !isMouseClickRef.current;\n\n if (\n !isActive &&\n !isDisabled &&\n activationMode !== \"manual\" &&\n !context.nonInteractive &&\n isKeyboardFocus\n ) {\n const currentStepIndex = Array.from(steps.keys()).indexOf(value || \"\");\n const targetStepIndex = Array.from(steps.keys()).indexOf(itemValue);\n const direction = targetStepIndex > currentStepIndex ? \"next\" : \"prev\";\n\n await store.setStateWithValidation(itemValue, direction);\n }\n\n isMouseClickRef.current = false;\n },\n [\n focusContext,\n triggerId,\n activationMode,\n isActive,\n isDisabled,\n context.nonInteractive,\n store,\n itemValue,\n value,\n steps,\n triggerProps.onFocus,\n ],\n );\n\n const onKeyDown = React.useCallback(\n async (event: React.KeyboardEvent<TriggerElement>) => {\n triggerProps.onKeyDown?.(event);\n if (event.defaultPrevented) return;\n\n if (event.key === \"Enter\" && context.nonInteractive) {\n event.preventDefault();\n return;\n }\n\n if (\n (event.key === \"Enter\" || event.key === \" \") &&\n activationMode === \"manual\" &&\n !context.nonInteractive\n ) {\n event.preventDefault();\n if (!isDisabled && triggerRef.current) {\n triggerRef.current.click();\n }\n return;\n }\n\n if (event.key === \"Tab\" && event.shiftKey) {\n focusContext.onItemShiftTab();\n return;\n }\n\n if (event.target !== event.currentTarget) return;\n\n const focusIntent = getFocusIntent(event, context.dir, orientation);\n\n if (focusIntent !== undefined) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey)\n return;\n event.preventDefault();\n\n const items = focusContext.getItems().filter((item) => !item.disabled);\n let candidateRefs = items.map((item) => item.ref);\n\n if (focusIntent === \"last\") {\n candidateRefs.reverse();\n } else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateRefs.reverse();\n const currentIndex = candidateRefs.findIndex(\n (ref) => ref.current === event.currentTarget,\n );\n candidateRefs = loop\n ? wrapArray(candidateRefs, currentIndex + 1)\n : candidateRefs.slice(currentIndex + 1);\n }\n\n if (store.hasValidation() && candidateRefs.length > 0) {\n const nextRef = candidateRefs[0];\n const nextElement = nextRef?.current;\n const nextItem = items.find(\n (item) => item.ref.current === nextElement,\n );\n\n if (nextItem && nextItem.value !== itemValue) {\n const currentStepIndex = Array.from(steps.keys()).indexOf(\n value || \"\",\n );\n const targetStepIndex = Array.from(steps.keys()).indexOf(\n nextItem.value,\n );\n const direction: NavigationDirection =\n targetStepIndex > currentStepIndex ? \"next\" : \"prev\";\n\n if (direction === \"next\") {\n const isValid = await store.setStateWithValidation(\n nextItem.value,\n direction,\n );\n if (!isValid) return;\n } else {\n store.setState(\"value\", nextItem.value);\n }\n\n queueMicrotask(() => nextElement?.focus());\n return;\n }\n }\n\n queueMicrotask(() => focusFirst(candidateRefs));\n }\n },\n [\n focusContext,\n context.nonInteractive,\n context.dir,\n activationMode,\n orientation,\n loop,\n isDisabled,\n triggerProps.onKeyDown,\n store,\n itemValue,\n value,\n steps,\n ],\n );\n\n const onMouseDown = React.useCallback(\n (event: React.MouseEvent<TriggerElement>) => {\n triggerProps.onMouseDown?.(event);\n if (event.defaultPrevented) return;\n\n isMouseClickRef.current = true;\n\n if (isDisabled) {\n event.preventDefault();\n } else {\n focusContext.onItemFocus(triggerId);\n }\n },\n [focusContext, triggerId, isDisabled, triggerProps.onMouseDown],\n );\n\n // Determine flex direction based on labelPosition\n const getFlexDirection = () => {\n if (\n orientation === \"horizontal\" &&\n (labelPosition === \"top\" || labelPosition === \"bottom\")\n ) {\n // For horizontal with top/bottom labels, trigger only contains text\n // Indicator and separator will be siblings at item level\n return labelPosition === \"top\" ? \"flex-col-reverse\" : \"flex-col\";\n }\n\n if (labelPosition === \"top\") return \"flex-col-reverse\";\n if (labelPosition === \"bottom\") return \"flex-col\";\n if (labelPosition === \"left\") return \"flex-row-reverse\";\n return \"flex-row\"; // default is right\n };\n\n const shouldWrapIndicator =\n orientation === \"horizontal\" &&\n (labelPosition === \"top\" || labelPosition === \"bottom\");\n\n // Filter out Indicator from children when shouldWrapIndicator is true\n const processedChildren = React.useMemo(() => {\n if (!shouldWrapIndicator) return triggerProps.children;\n\n const childArray = React.Children.toArray(triggerProps.children);\n return childArray.filter((child) => {\n if (React.isValidElement(child)) {\n const slot = (child.props as { \"data-slot\"?: string })[\"data-slot\"];\n return !(\n slot === \"stepper-indicator\" || child.type === StepperIndicator\n );\n }\n return true;\n });\n }, [shouldWrapIndicator, triggerProps.children]);\n\n const TriggerPrimitive = asChild ? Slot : \"button\";\n\n return (\n <TriggerPrimitive\n id={triggerId}\n role=\"tab\"\n type=\"button\"\n aria-controls={contentId}\n aria-current={isActive ? \"step\" : undefined}\n aria-describedby={`${titleId} ${descriptionId}`}\n aria-posinset={stepPosition}\n aria-selected={isActive}\n aria-setsize={stepCount}\n data-disabled={isDisabled ? \"\" : undefined}\n data-state={dataState}\n data-slot=\"stepper-trigger\"\n data-wrap-indicator={shouldWrapIndicator ? \"\" : undefined}\n disabled={isDisabled}\n tabIndex={isTabStop ? 0 : -1}\n {...triggerProps}\n ref={composedRef}\n className={cn(\n \"inline-flex items-center justify-center gap-3 rounded-md text-left outline-none transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n \"not-has-data-[slot=description]:rounded-full not-has-data-[slot=title]:rounded-full\",\n shouldWrapIndicator ? \"\" : getFlexDirection(),\n className,\n )}\n onClick={onClick}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n onMouseDown={onMouseDown}\n >\n {processedChildren}\n </TriggerPrimitive>\n );\n}\n\ninterface StepperIndicatorProps extends Omit<DivProps, \"children\"> {\n children?: React.ReactNode | ((dataState: DataState) => React.ReactNode);\n color?: StepperColor;\n customColor?: string;\n variant?: StepperVariant;\n}\n\nfunction StepperIndicator(props: StepperIndicatorProps) {\n const {\n className,\n children,\n asChild,\n ref,\n color: colorProp,\n customColor: customColorProp,\n variant: variantProp,\n ...indicatorProps\n } = props;\n const context = useStepperContext(INDICATOR_NAME);\n const itemContext = useStepperItemContext(INDICATOR_NAME);\n const value = useStore((state) => state.value);\n const itemValue = itemContext.value;\n const stepState = useStore((state) => state.steps.get(itemValue));\n const steps = useStore((state) => state.steps);\n\n const stepPosition = Array.from(steps.keys()).indexOf(itemValue) + 1;\n\n const dataState = getDataState(value, itemValue, stepState, steps);\n\n const color = colorProp ?? context.color;\n const customColor = customColorProp ?? context.customColor;\n const variant = variantProp ?? context.variant ?? \"normal\";\n\n const colorClass = getIndicatorColorClass(color, customColor, dataState);\n const customStyle = getCustomColorStyle(customColor, dataState, true);\n\n const IndicatorPrimitive = asChild ? Slot : \"div\";\n\n const isDot = variant === \"dot\";\n\n return (\n <IndicatorPrimitive\n data-state={dataState}\n data-variant={variant}\n data-slot=\"stepper-indicator\"\n dir={context.dir}\n {...indicatorProps}\n ref={ref}\n style={{ ...indicatorProps.style, ...customStyle }}\n className={cn(\n \"flex shrink-0 items-center justify-center rounded-full border-2 font-medium text-sm transition-colors\",\n isDot ? \"size-7 data-[variant=dot]:size-2\" : \"size-7\",\n colorClass,\n className,\n )}\n >\n {!isDot &&\n (typeof children === \"function\" ? (\n children(dataState)\n ) : children ? (\n children\n ) : dataState === \"completed\" ? (\n <Check className=\"size-4\" />\n ) : (\n stepPosition\n ))}\n </IndicatorPrimitive>\n );\n}\n\ninterface StepperSeparatorProps extends DivProps {\n forceMount?: boolean;\n color?: StepperColor;\n customColor?: string;\n}\n\nfunction StepperSeparator(props: StepperSeparatorProps) {\n const {\n className,\n asChild,\n forceMount = false,\n ref,\n color: colorProp,\n customColor: customColorProp,\n ...separatorProps\n } = props;\n\n const context = useStepperContext(SEPARATOR_NAME);\n const itemContext = useStepperItemContext(SEPARATOR_NAME);\n const value = useStore((state) => state.value);\n const orientation = context.orientation;\n const labelPosition = context.labelPosition ?? \"right\";\n\n const steps = useStore((state) => state.steps);\n const stepIndex = Array.from(steps.keys()).indexOf(itemContext.value);\n\n const isLastStep = stepIndex === steps.size - 1;\n\n if (isLastStep && !forceMount) {\n return null;\n }\n\n const dataState = getDataState(\n value,\n itemContext.value,\n itemContext.stepState,\n steps,\n \"separator\",\n );\n\n const color = colorProp ?? context.color;\n const customColor = customColorProp ?? context.customColor;\n\n const colorClass = getSeparatorColorClass(color, customColor, dataState);\n const customStyle = getCustomColorStyle(customColor, dataState, false);\n\n const SeparatorPrimitive = asChild ? Slot : \"div\";\n\n // Determine separator positioning based on orientation and labelPosition\n const getSeparatorClasses = () => {\n if (orientation === \"horizontal\") {\n // Horizontal stepper\n if (labelPosition === \"top\" || labelPosition === \"bottom\") {\n // When labels are above/below, separator is at item level alongside indicator\n // It should be a horizontal line that takes remaining space\n return \"h-px flex-1\";\n }\n // Default: labels left/right - normal flex behavior\n return \"h-px flex-1\";\n } else {\n // Vertical stepper\n if (labelPosition === \"top\" || labelPosition === \"bottom\") {\n // When labels are above/below in vertical mode, separator connects vertically\n return \"w-px absolute left-1/2 -translate-x-1/2 top-full h-full -z-10\";\n } else if (labelPosition === \"left\") {\n // Label on left, separator on the right side\n return \"w-px absolute right-0 top-full h-full -z-10 translate-x-1/2\";\n } else {\n // Label on right (default), separator on the left side\n return \"w-px absolute left-0 top-full h-full -z-10 -translate-x-1/2\";\n }\n }\n };\n\n return (\n <SeparatorPrimitive\n role=\"separator\"\n aria-hidden=\"true\"\n aria-orientation={orientation}\n data-orientation={orientation}\n data-state={dataState}\n data-slot=\"stepper-separator\"\n dir={context.dir}\n {...separatorProps}\n ref={ref}\n style={{ ...separatorProps.style, ...customStyle }}\n className={cn(\n \"transition-colors\",\n getSeparatorClasses(),\n colorClass,\n className,\n )}\n />\n );\n}\n\ninterface StepperTitleProps extends React.ComponentProps<\"span\"> {\n asChild?: boolean;\n}\n\nfunction StepperTitle(props: StepperTitleProps) {\n const { className, asChild, ref, ...titleProps } = props;\n\n const context = useStepperContext(TITLE_NAME);\n const itemContext = useStepperItemContext(TITLE_NAME);\n\n const titleId = getId(context.id, \"title\", itemContext.value);\n\n const TitlePrimitive = asChild ? Slot : \"span\";\n\n return (\n <TitlePrimitive\n id={titleId}\n data-slot=\"title\"\n dir={context.dir}\n {...titleProps}\n ref={ref}\n className={cn(\"font-medium text-sm\", className)}\n />\n );\n}\n\ninterface StepperDescriptionProps extends React.ComponentProps<\"span\"> {\n asChild?: boolean;\n}\n\nfunction StepperDescription(props: StepperDescriptionProps) {\n const { className, asChild, ref, ...descriptionProps } = props;\n const context = useStepperContext(DESCRIPTION_NAME);\n const itemContext = useStepperItemContext(DESCRIPTION_NAME);\n\n const descriptionId = getId(context.id, \"description\", itemContext.value);\n\n const DescriptionPrimitive = asChild ? Slot : \"span\";\n\n return (\n <DescriptionPrimitive\n id={descriptionId}\n data-slot=\"description\"\n dir={context.dir}\n {...descriptionProps}\n ref={ref}\n className={cn(\"text-muted-foreground text-xs\", className)}\n />\n );\n}\n\ninterface StepperContentProps extends DivProps {\n value: string;\n forceMount?: boolean;\n}\n\nfunction StepperContent(props: StepperContentProps) {\n const {\n value: valueProp,\n asChild,\n forceMount = false,\n ref,\n className,\n ...contentProps\n } = props;\n\n const context = useStepperContext(CONTENT_NAME);\n const value = useStore((state) => state.value);\n\n const contentId = getId(context.id, \"content\", valueProp);\n const triggerId = getId(context.id, \"trigger\", valueProp);\n\n if (valueProp !== value && !forceMount) return null;\n\n const ContentPrimitive = asChild ? Slot : \"div\";\n\n return (\n <ContentPrimitive\n id={contentId}\n role=\"tabpanel\"\n aria-labelledby={triggerId}\n data-slot=\"stepper-content\"\n dir={context.dir}\n {...contentProps}\n ref={ref}\n className={cn(\"flex-1 outline-none\", className)}\n />\n );\n}\n\nfunction StepperPrev(props: ButtonProps) {\n const { asChild, disabled, ...prevProps } = props;\n\n const store = useStoreContext(PREV_NAME);\n const value = useStore((state) => state.value);\n const steps = useStore((state) => state.steps);\n\n const stepKeys = Array.from(steps.keys());\n const currentIndex = value ? stepKeys.indexOf(value) : -1;\n const isDisabled = disabled || currentIndex <= 0;\n\n const onClick = React.useCallback(\n async (event: React.MouseEvent<HTMLButtonElement>) => {\n prevProps.onClick?.(event);\n if (event.defaultPrevented || isDisabled) return;\n\n const prevIndex = Math.max(currentIndex - 1, 0);\n const prevStepValue = stepKeys[prevIndex];\n\n if (prevStepValue) {\n store.setState(\"value\", prevStepValue);\n }\n },\n [prevProps.onClick, isDisabled, currentIndex, stepKeys, store],\n );\n\n const PrevPrimitive = asChild ? Slot : \"button\";\n\n return (\n <PrevPrimitive\n type=\"button\"\n data-slot=\"stepper-prev\"\n disabled={isDisabled}\n {...prevProps}\n onClick={onClick}\n />\n );\n}\n\nfunction StepperNext(props: ButtonProps) {\n const { asChild, disabled, ...nextProps } = props;\n\n const store = useStoreContext(NEXT_NAME);\n const value = useStore((state) => state.value);\n const steps = useStore((state) => state.steps);\n\n const stepKeys = Array.from(steps.keys());\n const currentIndex = value ? stepKeys.indexOf(value) : -1;\n const isDisabled = disabled || currentIndex >= stepKeys.length - 1;\n\n const onClick = React.useCallback(\n async (event: React.MouseEvent<HTMLButtonElement>) => {\n nextProps.onClick?.(event);\n if (event.defaultPrevented || isDisabled) return;\n\n const nextIndex = Math.min(currentIndex + 1, stepKeys.length - 1);\n const nextStepValue = stepKeys[nextIndex];\n\n if (nextStepValue) {\n await store.setStateWithValidation(nextStepValue, \"next\");\n }\n },\n [nextProps.onClick, isDisabled, currentIndex, stepKeys, store],\n );\n\n const NextPrimitive = asChild ? Slot : \"button\";\n\n return (\n <NextPrimitive\n type=\"button\"\n data-slot=\"stepper-next\"\n disabled={isDisabled}\n {...nextProps}\n onClick={onClick}\n />\n );\n}\n\nexport {\n StepperRoot,\n StepperList,\n StepperItem,\n StepperTrigger,\n StepperIndicator,\n StepperSeparator,\n StepperTitle,\n StepperDescription,\n StepperContent,\n StepperPrev,\n StepperNext,\n //\n useStore as useStepper,\n //\n type StepperRootProps as StepperProps,\n};\n"],"names":["ROOT_NAME","LIST_NAME","ITEM_NAME","TRIGGER_NAME","INDICATOR_NAME","SEPARATOR_NAME","TITLE_NAME","DESCRIPTION_NAME","CONTENT_NAME","PREV_NAME","NEXT_NAME","ENTRY_FOCUS","EVENT_OPTIONS","ARROW_KEYS","stepperColorClasses","getIndicatorColorClass","color","customColor","dataState","getSeparatorColorClass","getCustomColorStyle","isIndicator","getId","id","variant","value","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","dir","getFocusIntent","event","orientation","focusFirst","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidateRef","candidate","wrapArray","array","startIndex","_","index","useIsomorphicLayoutEffect","React","useAsRef","props","ref","useLazyRef","fn","getDataState","itemValue","stepState","steps","stepKeys","currentIndex","DirectionContext","useDirection","dirProp","contextDir","StoreContext","useStoreContext","consumerName","context","useStore","selector","store","getSnapshot","StepperContext","useStepperContext","StepperRoot","defaultValue","onValueChange","onValueComplete","onValueAdd","onValueRemove","onValidate","idProp","activationMode","asChild","disabled","nonInteractive","loop","labelPosition","className","rootProps","listenersRef","stateRef","propsRef","cb","direction","isValid","completed","newStep","step","updatedStep","rootId","contextValue","RootPrimitive","Slot","jsx","cn","FocusContext","useFocusContext","StepperList","children","listProps","currentValue","state","tabStopId","setTabStopId","isTabbingBackOut","setIsTabbingBackOut","focusableItemCount","setFocusableItemCount","isClickFocusRef","itemsRef","listRef","composedRef","useComposedRefs","onItemFocus","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","onItemRegister","item","onItemUnregister","getItems","a","b","elementA","elementB","position","onBlur","onFocus","isKeyboardFocus","entryFocusEvent","items","selectedItem","activeItem","currentItem","candidateRefs","onMouseDown","focusContextValue","ListPrimitive","StepperItemContext","useStepperItemContext","StepperItem","itemProps","stepIndex","isFirstStep","isLastStep","itemContextValue","getItemClasses","baseClasses","processedChildren","childArray","trigger","indicator","separator","others","child","slot","StepperTrigger","triggerChild","StepperIndicator","StepperSeparator","prevStepIndex","prevStepValue","leftSeparatorState","leftSeparator","indicatorRow","jsxs","ItemPrimitive","triggerProps","itemContext","focusContext","stepPosition","stepCount","triggerId","contentId","titleId","descriptionId","isDisabled","isActive","isTabStop","triggerRef","isArrowKeyPressedRef","isMouseClickRef","onKeyDown","onKeyUp","onClick","currentStepIndex","focusIntent","nextElement","nextItem","getFlexDirection","shouldWrapIndicator","colorProp","customColorProp","variantProp","indicatorProps","colorClass","customStyle","IndicatorPrimitive","isDot","Check","forceMount","separatorProps","SeparatorPrimitive","getSeparatorClasses","StepperTitle","titleProps","StepperDescription","descriptionProps","StepperContent","valueProp","contentProps","StepperPrev","prevProps","prevIndex","StepperNext","nextProps","nextIndex","nextStepValue"],"mappings":";;;;AAMA,MAAMA,KAAY,WACZC,KAAY,eACZC,KAAY,eACZC,KAAe,kBACfC,KAAiB,oBACjBC,KAAiB,oBACjBC,KAAa,gBAC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Q9B,CAAK,IAAI,IACjDgK,IAAaxG,KAAYzB,KAAgBD,EAAS,SAAS,GAE3D0I,IAAUpJ,EAAM;AAAA,IACpB,OAAOd,MAA+C;AAEpD,UADAiM,EAAU,UAAUjM,CAAK,GACrBA,EAAM,oBAAoB0J,EAAY;AAE1C,YAAMwC,IAAY,KAAK,IAAIzK,IAAe,GAAGD,EAAS,SAAS,CAAC,GAC1D2K,IAAgB3K,EAAS0K,CAAS;AAExC,MAAIC,KACF,MAAM/J,EAAM,uBAAuB+J,GAAe,MAAM;AAAA,IAE5D;AAAA,IACA,CAACF,EAAU,SAASvC,GAAYjI,GAAcD,GAAUY,CAAK;AAAA,EAAA;AAK/D,SACE,gBAAAkC;AAAA,IAHoBrB,IAAUoB,IAAO;AAAA,IAGpC;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,UAAUqF;AAAA,MACT,GAAGuC;AAAA,MACJ,SAAA/B;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,80 @@
1
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
+ import "react";
3
+ import { StepperRoot as S, StepperList as g, StepperItem as v, StepperTrigger as x, StepperIndicator as z, StepperTitle as y, StepperDescription as C, StepperSeparator as N, StepperContent as j } from "./Stepper.js";
4
+ import { cn as c } from "@dsui/ui/index";
5
+ function D({
6
+ steps: t,
7
+ children: i,
8
+ color: p,
9
+ customColor: h,
10
+ variant: d = "normal",
11
+ labelPosition: r = "right",
12
+ ...a
13
+ }) {
14
+ const m = t && t.some((e) => e.content), u = (e, l) => {
15
+ if (e >= l - 1) return "";
16
+ const { orientation: f = "horizontal" } = a;
17
+ return f === "vertical" ? r === "top" || r === "bottom" ? "-order-1 -z-10 absolute inset-y-0 top-7 left-1/2 -translate-x-1/2 h-full" : r === "left" ? "-order-1 -z-10 absolute inset-y-0 top-7 right-0 translate-x-1/2 h-full" : "-order-1 -z-10 absolute inset-y-0 top-7 left-3.5 -translate-x-1/2 h-full" : "";
18
+ };
19
+ return /* @__PURE__ */ o(
20
+ S,
21
+ {
22
+ ...a,
23
+ color: p,
24
+ customColor: h,
25
+ variant: d,
26
+ labelPosition: r,
27
+ children: [
28
+ t && t.length > 0 && /* @__PURE__ */ n(g, { children: t.map((e, l) => /* @__PURE__ */ o(
29
+ v,
30
+ {
31
+ value: e.value,
32
+ completed: e.completed,
33
+ disabled: e.disabled,
34
+ children: [
35
+ /* @__PURE__ */ o(
36
+ x,
37
+ {
38
+ className: c({
39
+ "not-last:pb-6": l < t.length - 1 && a.orientation === "vertical"
40
+ }),
41
+ children: [
42
+ /* @__PURE__ */ n(z, {}),
43
+ /* @__PURE__ */ o(
44
+ "div",
45
+ {
46
+ className: c("flex flex-col gap-1", {
47
+ "text-center": r === "top" || r === "bottom",
48
+ "text-left": r === "right",
49
+ "text-right": r === "left"
50
+ }),
51
+ children: [
52
+ /* @__PURE__ */ n(y, { children: e.title }),
53
+ e.description && /* @__PURE__ */ n(C, { children: e.description })
54
+ ]
55
+ }
56
+ )
57
+ ]
58
+ }
59
+ ),
60
+ l < t.length - 1 && /* @__PURE__ */ n(
61
+ N,
62
+ {
63
+ className: u(l, t.length)
64
+ }
65
+ )
66
+ ]
67
+ },
68
+ e.value
69
+ )) }),
70
+ m ? t?.map(
71
+ (e) => e.content && /* @__PURE__ */ n(j, { value: e.value, children: e.content }, e.value)
72
+ ) : i
73
+ ]
74
+ }
75
+ );
76
+ }
77
+ export {
78
+ D as StepperWrapper
79
+ };
80
+ //# sourceMappingURL=StepperWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepperWrapper.js","sources":["../../../../src/components/Stepper/StepperWrapper.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n StepperContent,\n StepperDescription,\n StepperIndicator,\n StepperItem,\n StepperList,\n StepperRoot,\n StepperSeparator,\n StepperTitle,\n StepperTrigger,\n type StepperProps,\n} from \"./Stepper\";\nimport { cn } from \"@dsui/ui/index\";\n\ntype StepperColor =\n | \"primary\"\n | \"secondary\"\n | \"accent\"\n | \"destructive\"\n | \"muted\"\n | \"success\"\n | \"error\"\n | \"warning\";\ntype StepperVariant = \"normal\" | \"dot\";\ntype LabelPosition = \"top\" | \"bottom\" | \"left\" | \"right\";\n\ninterface Step {\n value: string;\n title: string;\n description?: string;\n completed?: boolean;\n disabled?: boolean;\n content?: React.ReactNode;\n}\n\ninterface StepperWrapperProps extends StepperProps {\n steps?: Step[];\n children?: React.ReactNode;\n color?: StepperColor;\n customColor?: string;\n variant?: StepperVariant;\n labelPosition?: LabelPosition;\n}\n\nfunction StepperWrapper({\n steps,\n children,\n color,\n customColor,\n variant = \"normal\",\n labelPosition = \"right\",\n ...props\n}: StepperWrapperProps) {\n const hasStepContent = steps && steps.some((step) => step.content);\n\n // Determine separator classes based on orientation and labelPosition\n const getSeparatorClasses = (index: number, totalSteps: number) => {\n if (index >= totalSteps - 1) return \"\";\n\n const { orientation = \"horizontal\" } = props;\n\n if (orientation === \"vertical\") {\n // Vertical stepper - separator positioning\n if (labelPosition === \"top\" || labelPosition === \"bottom\") {\n return \"-order-1 -z-10 absolute inset-y-0 top-7 left-1/2 -translate-x-1/2 h-full\";\n } else if (labelPosition === \"left\") {\n return \"-order-1 -z-10 absolute inset-y-0 top-7 right-0 translate-x-1/2 h-full\";\n } else {\n // right (default)\n return \"-order-1 -z-10 absolute inset-y-0 top-7 left-3.5 -translate-x-1/2 h-full\";\n }\n }\n\n // Horizontal stepper - separator is handled by the Separator component itself\n return \"\";\n };\n\n return (\n <StepperRoot\n {...props}\n color={color}\n customColor={customColor}\n variant={variant}\n labelPosition={labelPosition}\n >\n {steps && steps.length > 0 && (\n <StepperList>\n {steps.map((step, index) => (\n <StepperItem\n key={step.value}\n value={step.value}\n completed={step.completed}\n disabled={step.disabled}\n >\n <StepperTrigger\n className={cn({\n \"not-last:pb-6\":\n index < steps.length - 1 &&\n props.orientation === \"vertical\",\n })}\n >\n <StepperIndicator />\n <div\n className={cn(\"flex flex-col gap-1\", {\n \"text-center\":\n labelPosition === \"top\" || labelPosition === \"bottom\",\n \"text-left\": labelPosition === \"right\",\n \"text-right\": labelPosition === \"left\",\n })}\n >\n <StepperTitle>{step.title}</StepperTitle>\n {step.description && (\n <StepperDescription>{step.description}</StepperDescription>\n )}\n </div>\n </StepperTrigger>\n {index < steps.length - 1 && (\n <StepperSeparator\n className={getSeparatorClasses(index, steps.length)}\n />\n )}\n </StepperItem>\n ))}\n </StepperList>\n )}\n {hasStepContent\n ? steps?.map(\n (step) =>\n step.content && (\n <StepperContent key={step.value} value={step.value}>\n {step.content}\n </StepperContent>\n ),\n )\n : children}\n </StepperRoot>\n );\n}\n\nexport { StepperWrapper };\nexport type { StepperWrapperProps, Step };\n"],"names":["StepperWrapper","steps","children","color","customColor","variant","labelPosition","props","hasStepContent","step","getSeparatorClasses","index","totalSteps","orientation","jsxs","StepperRoot","jsx","StepperList","StepperItem","StepperTrigger","cn","StepperIndicator","StepperTitle","StepperDescription","StepperSeparator","StepperContent"],"mappings":";;;;AA+CA,SAASA,EAAe;AAAA,EACtB,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,GAAwB;AACtB,QAAMC,IAAiBP,KAASA,EAAM,KAAK,CAACQ,MAASA,EAAK,OAAO,GAG3DC,IAAsB,CAACC,GAAeC,MAAuB;AACjE,QAAID,KAASC,IAAa,EAAG,QAAO;AAEpC,UAAM,EAAE,aAAAC,IAAc,aAAA,IAAiBN;AAEvC,WAAIM,MAAgB,aAEdP,MAAkB,SAASA,MAAkB,WACxC,6EACEA,MAAkB,SACpB,2EAGA,6EAKJ;AAAA,EACT;AAEA,SACE,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGR;AAAA,MACJ,OAAAJ;AAAA,MACA,aAAAC;AAAA,MACA,SAAAC;AAAA,MAC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,GADaA,EAAK,KAE1B;AAAA,QAAA,IAGNP;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -0,0 +1,21 @@
1
+ import { StepperNext as e, StepperPrev as t, StepperContent as p, StepperDescription as r, StepperTitle as o, StepperSeparator as S, StepperIndicator as i, StepperTrigger as n, StepperItem as a, StepperList as s, StepperRoot as m } from "./Stepper.js";
2
+ import { useStepper as d } from "./Stepper.js";
3
+ import { StepperWrapper as c } from "./StepperWrapper.js";
4
+ const I = Object.assign(c, {
5
+ Root: m,
6
+ List: s,
7
+ Item: a,
8
+ Trigger: n,
9
+ Indicator: i,
10
+ Separator: S,
11
+ Title: o,
12
+ Description: r,
13
+ Content: p,
14
+ Prev: t,
15
+ Next: e
16
+ });
17
+ export {
18
+ I as Stepper,
19
+ d as useStepper
20
+ };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Stepper/index.ts"],"sourcesContent":["import {\n StepperRoot,\n StepperList,\n StepperItem,\n StepperTrigger,\n StepperIndicator,\n StepperSeparator,\n StepperTitle,\n StepperDescription,\n StepperContent,\n StepperPrev,\n StepperNext,\n //\n useStepper,\n //\n type StepperProps,\n} from \"./Stepper\";\nimport { StepperWrapper } from \"./StepperWrapper\";\n\nconst Stepper = Object.assign(StepperWrapper, {\n Root: StepperRoot,\n List: StepperList,\n Item: StepperItem,\n Trigger: StepperTrigger,\n Indicator: StepperIndicator,\n Separator: StepperSeparator,\n Title: StepperTitle,\n Description: StepperDescription,\n Content: StepperContent,\n Prev: StepperPrev,\n Next: StepperNext,\n});\n\nexport { Stepper, useStepper };\nexport type { StepperProps };\n"],"names":["Stepper","StepperWrapper","StepperRoot","StepperList","StepperItem","StepperTrigger","StepperIndicator","StepperSeparator","StepperTitle","StepperDescription","StepperContent","StepperPrev","StepperNext"],"mappings":";;;AAmBA,MAAMA,IAAU,OAAO,OAAOC,GAAgB;AAAA,EAC5C,MAAMC;AAAA,EACN,MAAMC;AAAA,EACN,MAAMC;AAAA,EACN,SAASC;AAAA,EACT,WAAWC;AAAA,EACX,WAAWC;AAAA,EACX,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASC;AAAA,EACT,MAAMC;AAAA,EACN,MAAMC;AACR,CAAC;"}
@@ -0,0 +1,126 @@
1
+ import { jsxs as w, jsx as e } from "react/jsx-runtime";
2
+ import n, { useMemo as F } from "react";
3
+ import { switchVariants as S, Switch as G } from "@dsui/ui/components/switch";
4
+ import { cn as v } from "@dsui/ui/lib/utils";
5
+ import { animationEffect as I } from "../../utils/animations.js";
6
+ import L from "../Glass/Glass.js";
7
+ const V = n.forwardRef(
8
+ (z, E) => {
9
+ const {
10
+ animation: s,
11
+ label: p,
12
+ labelPosition: d = "right",
13
+ offLabel: r,
14
+ onLabel: i,
15
+ showLabels: N = "none",
16
+ checked: x = !1,
17
+ onCheckedChange: j,
18
+ className: b,
19
+ variant: c = "default",
20
+ size: m = "normal",
21
+ color: u,
22
+ ...C
23
+ } = z, k = n.useId(), [_, y] = n.useState(x);
24
+ n.useEffect(() => {
25
+ y(x);
26
+ }, [x]);
27
+ const g = (t) => {
28
+ y(t), j?.(t);
29
+ }, a = F(() => s ? s === "glass" ? {
30
+ className: "!bg-transparent !shadow-none !border-none",
31
+ isGlass: !0,
32
+ // Custom flag for glass effect
33
+ variant: "default"
34
+ } : I({
35
+ animation: s,
36
+ children: null,
37
+ className: b,
38
+ rootClassName: S({
39
+ variant: c,
40
+ size: m,
41
+ color: u
42
+ }),
43
+ variantType: c
44
+ }) : null, [s, b, c, m, u]), h = (t) => {
45
+ const l = /* @__PURE__ */ e(
46
+ G,
47
+ {
48
+ ref: E,
49
+ id: k,
50
+ checked: _,
51
+ onCheckedChange: g,
52
+ className: v(b, t, a?.className),
53
+ variant: c,
54
+ size: m,
55
+ color: u,
56
+ style: { ...C.style || {}, ...a?.style || {} },
57
+ ...C
58
+ }
59
+ );
60
+ if (s === "glass" && a?.isGlass) {
61
+ const o = S({
62
+ variant: c,
63
+ size: m,
64
+ color: u
65
+ })?.match(/((?:!)?rounded-\S+)/g), f = o ? o[o.length - 1] : "rounded-full";
66
+ return /* @__PURE__ */ e(
67
+ L,
68
+ {
69
+ className: v("hover:scale-110 [&_span]:opacity-80", f),
70
+ children: l
71
+ }
72
+ );
73
+ }
74
+ return a?.children && n.isValidElement(a.children) ? n.cloneElement(a.children, l) : l;
75
+ };
76
+ if (N === "inside" && (r || i))
77
+ return /* @__PURE__ */ w("div", { className: "relative inline-grid h-7 w-fit grid-cols-[1fr_1fr] items-center text-sm font-medium", children: [
78
+ h(
79
+ "peer data-[state=unchecked]:bg-input/50 absolute inset-0 h-[inherit] w-14 [&_span]:z-10 [&_span]:size-6.5 [&_span]:transition-transform [&_span]:duration-300 [&_span]:ease-[cubic-bezier(0.16,1,0.3,1)] [&_span]:data-[state=checked]:translate-x-7 [&_span]:data-[state=checked]:rtl:-translate-x-7"
80
+ ),
81
+ /* @__PURE__ */ e("span", { className: "pointer-events-none relative ml-0.5 flex min-w-8 items-center justify-center text-center transition-transform duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] peer-data-[state=checked]:invisible peer-data-[state=unchecked]:translate-x-6 peer-data-[state=unchecked]:rtl:-translate-x-6", children: r }),
82
+ /* @__PURE__ */ e("span", { className: "peer-data-[state=checked]:text-background pointer-events-none relative flex min-w-8 items-center justify-center text-center transition-transform duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] peer-data-[state=checked]:-translate-x-full peer-data-[state=unchecked]:invisible peer-data-[state=checked]:rtl:translate-x-full", children: i })
83
+ ] });
84
+ if (N === "outside" && (r || i))
85
+ return /* @__PURE__ */ w(
86
+ "div",
87
+ {
88
+ className: "group inline-flex items-center gap-2",
89
+ "data-state": _ ? "checked" : "unchecked",
90
+ children: [
91
+ r && /* @__PURE__ */ e(
92
+ "span",
93
+ {
94
+ className: "flex-1 cursor-pointer text-sm font-medium group-data-[state=checked]:text-muted-foreground/70",
95
+ onClick: () => g(!1),
96
+ children: r
97
+ }
98
+ ),
99
+ h(),
100
+ i && /* @__PURE__ */ e(
101
+ "span",
102
+ {
103
+ className: "flex-1 cursor-pointer text-sm font-medium group-data-[state=unchecked]:text-muted-foreground/70",
104
+ onClick: () => g(!0),
105
+ children: i
106
+ }
107
+ )
108
+ ]
109
+ }
110
+ );
111
+ if (p) {
112
+ const t = d === "top" || d === "bottom", l = t ? "flex-col" : "flex-row", o = t ? "items-start" : "items-center", f = d === "left" || d === "top";
113
+ return /* @__PURE__ */ w("div", { className: v("flex gap-2", l, o), children: [
114
+ f && /* @__PURE__ */ e("label", { htmlFor: k, children: p }),
115
+ h(),
116
+ !f && /* @__PURE__ */ e("label", { htmlFor: k, children: p })
117
+ ] });
118
+ }
119
+ return h();
120
+ }
121
+ );
122
+ V.displayName = "Switch";
123
+ export {
124
+ V as default
125
+ };
126
+ //# sourceMappingURL=Switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.js","sources":["../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport {\n Switch as SSwitch,\n switchVariants,\n type SwitchVariant,\n} from \"@dsui/ui/components/switch\";\nimport { cn } from \"@dsui/ui/lib/utils\";\nimport type { SwitchAnimation } from \"@/types/variables\";\nimport { animationEffect } from \"@/utils/animations\";\nimport Glass from \"../Glass/Glass\";\n\nexport type SwitchProps = React.ComponentProps<typeof SSwitch> & {\n animation?: SwitchAnimation;\n label?: React.ReactNode;\n labelPosition?: \"left\" | \"right\" | \"top\" | \"bottom\";\n offLabel?: React.ReactNode;\n onLabel?: React.ReactNode;\n showLabels?: \"outside\" | \"inside\" | \"none\";\n};\n\ntype AnimResult = {\n className?: string;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n variant?: SwitchVariant[\"variant\"];\n isGlass?: boolean; // Flag for glass effect\n};\n\nconst Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(\n (props, ref) => {\n const {\n animation,\n label,\n labelPosition = \"right\",\n offLabel,\n onLabel,\n showLabels = \"none\",\n checked = false,\n onCheckedChange,\n className,\n variant = \"default\",\n size = \"normal\",\n color,\n ...rest\n } = props;\n const id = React.useId();\n\n const [isChecked, setIsChecked] = React.useState(checked);\n\n React.useEffect(() => {\n setIsChecked(checked as boolean);\n }, [checked]);\n\n const handleCheckedChange = (newChecked: boolean) => {\n setIsChecked(newChecked);\n onCheckedChange?.(newChecked);\n };\n\n const switchAnimation = useMemo<AnimResult | null>(() => {\n if (!animation) return null;\n\n // Handle glass animation separately for Switch (don't affect other components)\n if (animation === \"glass\") {\n return {\n className: \"!bg-transparent !shadow-none !border-none\",\n isGlass: true, // Custom flag for glass effect\n variant: \"default\",\n };\n }\n\n return animationEffect<SwitchAnimation, SwitchVariant[\"variant\"]>({\n animation,\n children: null,\n className,\n rootClassName: switchVariants({\n variant: variant,\n size: size,\n color: color,\n }),\n variantType: variant,\n });\n }, [animation, className, variant, size, color]);\n\n const switchElement = (switchClassName?: string) => {\n const baseSwitchElement = (\n <SSwitch\n ref={ref}\n id={id}\n checked={isChecked}\n onCheckedChange={handleCheckedChange}\n className={cn(className, switchClassName, switchAnimation?.className)}\n variant={variant}\n size={size}\n color={color}\n style={{ ...(rest.style || {}), ...(switchAnimation?.style || {}) }}\n {...rest}\n />\n );\n\n // If animation is glass effect, wrap the switch in Glass component\n if (animation === \"glass\" && switchAnimation?.isGlass) {\n const roundedMatches = switchVariants({\n variant: variant,\n size: size,\n color: color,\n })?.match(/((?:!)?rounded-\\S+)/g);\n const roundedClass = roundedMatches\n ? roundedMatches[roundedMatches.length - 1]\n : \"rounded-full\";\n\n return (\n <Glass\n className={cn(\"hover:scale-110 [&_span]:opacity-80\", roundedClass)}\n >\n {baseSwitchElement}\n </Glass>\n );\n }\n\n // If animation returns children wrapper, use it\n if (\n switchAnimation?.children &&\n React.isValidElement(switchAnimation.children)\n ) {\n return React.cloneElement(switchAnimation.children, baseSwitchElement);\n }\n\n return baseSwitchElement;\n };\n\n // Render with inside labels (icons inside thumb position)\n if (showLabels === \"inside\" && (offLabel || onLabel)) {\n return (\n <div className=\"relative inline-grid h-7 w-fit grid-cols-[1fr_1fr] items-center text-sm font-medium\">\n {switchElement(\n \"peer data-[state=unchecked]:bg-input/50 absolute inset-0 h-[inherit] w-14 [&_span]:z-10 [&_span]:size-6.5 [&_span]:transition-transform [&_span]:duration-300 [&_span]:ease-[cubic-bezier(0.16,1,0.3,1)] [&_span]:data-[state=checked]:translate-x-7 [&_span]:data-[state=checked]:rtl:-translate-x-7\",\n )}\n <span className=\"pointer-events-none relative ml-0.5 flex min-w-8 items-center justify-center text-center transition-transform duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] peer-data-[state=checked]:invisible peer-data-[state=unchecked]:translate-x-6 peer-data-[state=unchecked]:rtl:-translate-x-6\">\n {offLabel}\n </span>\n <span className=\"peer-data-[state=checked]:text-background pointer-events-none relative flex min-w-8 items-center justify-center text-center transition-transform duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] peer-data-[state=checked]:-translate-x-full peer-data-[state=unchecked]:invisible peer-data-[state=checked]:rtl:translate-x-full\">\n {onLabel}\n </span>\n </div>\n );\n }\n\n // Render with outside labels\n if (showLabels === \"outside\" && (offLabel || onLabel)) {\n return (\n <div\n className=\"group inline-flex items-center gap-2\"\n data-state={isChecked ? \"checked\" : \"unchecked\"}\n >\n {offLabel && (\n <span\n className=\"flex-1 cursor-pointer text-sm font-medium group-data-[state=checked]:text-muted-foreground/70\"\n onClick={() => handleCheckedChange(false)}\n >\n {offLabel}\n </span>\n )}\n {switchElement()}\n {onLabel && (\n <span\n className=\"flex-1 cursor-pointer text-sm font-medium group-data-[state=unchecked]:text-muted-foreground/70\"\n onClick={() => handleCheckedChange(true)}\n >\n {onLabel}\n </span>\n )}\n </div>\n );\n }\n\n // Render with label (outside wrap)\n if (label) {\n const isVertical = labelPosition === \"top\" || labelPosition === \"bottom\";\n const flexDirection = isVertical ? \"flex-col\" : \"flex-row\";\n const alignItems = isVertical ? \"items-start\" : \"items-center\";\n const labelFirst = labelPosition === \"left\" || labelPosition === \"top\";\n\n return (\n <div className={cn(\"flex gap-2\", flexDirection, alignItems)}>\n {labelFirst && <label htmlFor={id}>{label}</label>}\n {switchElement()}\n {!labelFirst && <label htmlFor={id}>{label}</label>}\n </div>\n );\n }\n\n // Default render\n return switchElement();\n },\n);\n\nSwitch.displayName = \"Switch\";\nexport default Switch;\n"],"names":["Switch","React","props","ref","animation","label","labelPosition","offLabel","onLabel","showLabels","checked","onCheckedChange","className","variant","size","color","rest","id","isChecked","setIsChecked","handleCheckedChange","newChecked","switchAnimation","useMemo","animationEffect","switchVariants","switchElement","switchClassName","baseSwitchElement","jsx","SSwitch","cn","roundedMatches","roundedClass","Glass","jsxs","isVertical","flexDirection","alignItems","labelFirst"],"mappings":";;;;;;AA4BA,MAAMA,IAASC,EAAM;AAAA,EACnB,CAACC,GAAOC,MAAQ;AACd,UAAM;AAAA,MACJ,WAAAC;AAAA,MACA,OAAAC;AAAA,MACA,eAAAC,IAAgB;AAAA,MAChB,UAAAC;AAAA,MACA,SAAAC;AAAA,MACA,YAAAC,IAAa;AAAA,MACb,SAAAC,IAAU;AAAA,MACV,iBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,SAAAC,IAAU;AAAA,MACV,MAAAC,IAAO;AAAA,MACP,OAAAC;AAAA,MACA,GAAGC;AAAA,IAAA,IACDd,GACEe,IAAKhB,EAAM,MAAA,GAEX,CAACiB,GAAWC,CAAY,IAAIlB,EAAM,SAASS,CAAO;AAExDT,IAAAA,EAAM,UAAU,MAAM;AACpB,MAAAkB,EAAaT,CAAkB;AAAA,IACjC,GAAG,CAACA,CAAO,CAAC;AAEZ,UAAMU,IAAsB,CAACC,MAAwB;AACnD,MAAAF,EAAaE,CAAU,GACvBV,IAAkBU,CAAU;AAAA,IAC9B,GAEMC,IAAkBC,EAA2B,MAC5CnB,IAGDA,MAAc,UACT;AAAA,MACL,WAAW;AAAA,MACX,SAAS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"}
@@ -0,0 +1,126 @@
1
+ import { jsxs as f, jsx as n, Fragment as g } from "react/jsx-runtime";
2
+ import { formatDate as m } from "../../../utils/datetime.js";
3
+ import { XCircle as T, CalendarIcon as V } from "lucide-react";
4
+ import * as c from "react";
5
+ import { Popover as A } from "../../Popover/index.js";
6
+ import b from "../../Separator/Separator.js";
7
+ import { Calendar as y } from "../../Calendar/Calendar.js";
8
+ import S from "../../Button/Button.js";
9
+ function l(e) {
10
+ return e && typeof e == "object" && !Array.isArray(e);
11
+ }
12
+ function u(e) {
13
+ if (!e) return;
14
+ const i = typeof e == "string" ? Number(e) : e, o = new Date(i);
15
+ return Number.isNaN(o.getTime()) ? void 0 : o;
16
+ }
17
+ function v(e) {
18
+ return e == null ? [] : Array.isArray(e) ? e.map((i) => {
19
+ if (typeof i == "number" || typeof i == "string")
20
+ return i;
21
+ }) : typeof e == "string" || typeof e == "number" ? [e] : [];
22
+ }
23
+ function $({
24
+ column: e,
25
+ title: i,
26
+ multiple: o
27
+ }) {
28
+ const d = e.getFilterValue(), r = c.useMemo(() => {
29
+ if (!d)
30
+ return o ? { from: void 0, to: void 0 } : [];
31
+ if (o) {
32
+ const a = v(d);
33
+ return {
34
+ from: u(a[0]),
35
+ to: u(a[1])
36
+ };
37
+ }
38
+ const t = v(d), s = u(t[0]);
39
+ return s ? [s] : [];
40
+ }, [d, o]), p = c.useCallback(
41
+ (t) => {
42
+ if (!t) {
43
+ e.setFilterValue(void 0);
44
+ return;
45
+ }
46
+ if (o && !("getTime" in t)) {
47
+ const s = t.from?.getTime(), a = t.to?.getTime();
48
+ e.setFilterValue(s || a ? [s, a] : void 0);
49
+ } else !o && "getTime" in t && e.setFilterValue(t.getTime());
50
+ },
51
+ [e, o]
52
+ ), N = c.useCallback(
53
+ (t) => {
54
+ t.stopPropagation(), e.setFilterValue(void 0);
55
+ },
56
+ [e]
57
+ ), x = c.useMemo(() => o ? l(r) ? r.from || r.to : !1 : Array.isArray(r) ? r.length > 0 : !1, [o, r]), h = c.useCallback((t) => !t.from && !t.to ? "" : t.from && t.to ? `${m(t.from)} - ${m(t.to)}` : m(t.from ?? t.to), []), C = c.useMemo(() => {
58
+ if (o) {
59
+ if (!l(r)) return null;
60
+ const a = r.from || r.to, F = a ? h(r) : "Select date range";
61
+ return /* @__PURE__ */ f("span", { className: "flex items-center gap-2", children: [
62
+ /* @__PURE__ */ n("span", { children: i }),
63
+ a && /* @__PURE__ */ f(g, { children: [
64
+ /* @__PURE__ */ n(
65
+ b,
66
+ {
67
+ orientation: "vertical",
68
+ className: "mx-0.5 data-[orientation=vertical]:h-4"
69
+ }
70
+ ),
71
+ /* @__PURE__ */ n("span", { children: F })
72
+ ] })
73
+ ] });
74
+ }
75
+ if (l(r)) return null;
76
+ const t = r.length > 0, s = t ? m(r[0]) : "Select date";
77
+ return /* @__PURE__ */ f("span", { className: "flex items-center gap-2", children: [
78
+ /* @__PURE__ */ n("span", { children: i }),
79
+ t && /* @__PURE__ */ f(g, { children: [
80
+ /* @__PURE__ */ n(
81
+ b,
82
+ {
83
+ orientation: "vertical",
84
+ className: "mx-0.5 data-[orientation=vertical]:h-4"
85
+ }
86
+ ),
87
+ /* @__PURE__ */ n("span", { children: s })
88
+ ] })
89
+ ] });
90
+ }, [r, o, h, i]), D = /* @__PURE__ */ n("div", { className: "w-auto p-0", children: o ? /* @__PURE__ */ n(
91
+ y,
92
+ {
93
+ autoFocus: !0,
94
+ captionLayout: "dropdown",
95
+ mode: "range",
96
+ selected: l(r) ? r : { from: void 0, to: void 0 },
97
+ onSelect: p
98
+ }
99
+ ) : /* @__PURE__ */ n(
100
+ y,
101
+ {
102
+ captionLayout: "dropdown",
103
+ mode: "single",
104
+ selected: l(r) ? void 0 : r[0],
105
+ onSelect: p
106
+ }
107
+ ) });
108
+ return /* @__PURE__ */ n(A, { content: D, children: /* @__PURE__ */ f(S, { variant: "outline", size: "sm", className: "border-dashed font-normal", children: [
109
+ x ? /* @__PURE__ */ n(
110
+ "div",
111
+ {
112
+ role: "button",
113
+ "aria-label": `Clear ${i} filter`,
114
+ tabIndex: 0,
115
+ onClick: N,
116
+ className: "rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
117
+ children: /* @__PURE__ */ n(T, {})
118
+ }
119
+ ) : /* @__PURE__ */ n(V, {}),
120
+ C
121
+ ] }) });
122
+ }
123
+ export {
124
+ $ as DataTableDateFilter
125
+ };
126
+ //# sourceMappingURL=data-table-date-filter.js.map