@wheelhouse/ui 0.1.6 → 0.2.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 (535) hide show
  1. package/dist/blocks/index.d.ts +2 -0
  2. package/dist/blocks/index.d.ts.map +1 -0
  3. package/dist/blocks/index.js +1 -0
  4. package/dist/blocks/navigation/index.d.ts +2 -0
  5. package/dist/blocks/navigation/index.d.ts.map +1 -0
  6. package/dist/blocks/navigation/index.js +1 -0
  7. package/dist/blocks/navigation/pattern-1/index.d.ts +3 -0
  8. package/dist/blocks/navigation/pattern-1/index.d.ts.map +1 -0
  9. package/dist/blocks/navigation/pattern-1/index.js +1 -0
  10. package/dist/blocks/navigation/pattern-1/pattern-1.config.d.ts +47 -0
  11. package/dist/blocks/navigation/pattern-1/pattern-1.config.d.ts.map +1 -0
  12. package/dist/blocks/navigation/pattern-1/pattern-1.config.js +55 -0
  13. package/dist/blocks/navigation/pattern-1/pattern-1.d.ts +7 -0
  14. package/dist/blocks/navigation/pattern-1/pattern-1.d.ts.map +1 -0
  15. package/dist/blocks/navigation/pattern-1/pattern-1.js +50 -0
  16. package/dist/blocks/navigation/pattern-1/pattern-1.stories.d.ts +16 -0
  17. package/dist/blocks/navigation/pattern-1/pattern-1.stories.d.ts.map +1 -0
  18. package/dist/blocks/navigation/pattern-1/pattern-1.stories.js +20 -0
  19. package/dist/components/accordion/accordion.d.ts +15 -0
  20. package/dist/components/accordion/accordion.d.ts.map +1 -0
  21. package/dist/components/accordion/accordion.js +18 -0
  22. package/dist/components/accordion/accordion.stories.d.ts +7 -0
  23. package/dist/components/accordion/accordion.stories.d.ts.map +1 -0
  24. package/dist/components/accordion/accordion.stories.js +17 -0
  25. package/dist/components/accordion/index.d.ts +3 -0
  26. package/dist/components/accordion/index.d.ts.map +1 -0
  27. package/dist/components/accordion/index.js +1 -0
  28. package/dist/components/alert/alert.d.ts +11 -0
  29. package/dist/components/alert/alert.d.ts.map +1 -0
  30. package/dist/components/alert/alert.js +28 -0
  31. package/dist/components/alert/alert.stories.d.ts +11 -0
  32. package/dist/components/alert/alert.stories.d.ts.map +1 -0
  33. package/dist/components/alert/alert.stories.js +35 -0
  34. package/dist/components/alert/index.d.ts +2 -0
  35. package/dist/components/alert/index.d.ts.map +1 -0
  36. package/dist/components/alert/index.js +1 -0
  37. package/dist/components/alert-dialog/alert-dialog.d.ts +44 -0
  38. package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
  39. package/dist/components/alert-dialog/alert-dialog.js +43 -0
  40. package/dist/components/alert-dialog/alert-dialog.stories.d.ts +9 -0
  41. package/dist/components/alert-dialog/alert-dialog.stories.d.ts.map +1 -0
  42. package/dist/components/alert-dialog/alert-dialog.stories.js +22 -0
  43. package/dist/components/alert-dialog/index.d.ts +3 -0
  44. package/dist/components/alert-dialog/index.d.ts.map +1 -0
  45. package/dist/components/alert-dialog/index.js +1 -0
  46. package/dist/components/aspect-ratio/aspect-ratio.d.ts +11 -0
  47. package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
  48. package/dist/components/aspect-ratio/aspect-ratio.js +9 -0
  49. package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts +8 -0
  50. package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts.map +1 -0
  51. package/dist/components/aspect-ratio/aspect-ratio.stories.js +26 -0
  52. package/dist/components/aspect-ratio/index.d.ts +3 -0
  53. package/dist/components/aspect-ratio/index.d.ts.map +1 -0
  54. package/dist/components/aspect-ratio/index.js +1 -0
  55. package/dist/components/avatar/avatar.d.ts +29 -0
  56. package/dist/components/avatar/avatar.d.ts.map +1 -0
  57. package/dist/components/avatar/avatar.js +24 -0
  58. package/dist/components/avatar/avatar.stories.d.ts +20 -0
  59. package/dist/components/avatar/avatar.stories.d.ts.map +1 -0
  60. package/dist/components/avatar/avatar.stories.js +40 -0
  61. package/dist/components/avatar/index.d.ts +2 -0
  62. package/dist/components/avatar/index.d.ts.map +1 -0
  63. package/dist/components/avatar/index.js +1 -0
  64. package/dist/components/badge/badge.d.ts +5 -4
  65. package/dist/components/badge/badge.d.ts.map +1 -1
  66. package/dist/components/badge/badge.js +3 -3
  67. package/dist/components/breadcrumb/breadcrumb.d.ts +25 -0
  68. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
  69. package/dist/components/breadcrumb/breadcrumb.js +38 -0
  70. package/dist/components/breadcrumb/breadcrumb.stories.d.ts +16 -0
  71. package/dist/components/breadcrumb/breadcrumb.stories.d.ts.map +1 -0
  72. package/dist/components/breadcrumb/breadcrumb.stories.js +21 -0
  73. package/dist/components/breadcrumb/index.d.ts +2 -0
  74. package/dist/components/breadcrumb/index.d.ts.map +1 -0
  75. package/dist/components/breadcrumb/index.js +1 -0
  76. package/dist/components/button/button.d.ts +9 -6
  77. package/dist/components/button/button.d.ts.map +1 -1
  78. package/dist/components/button/button.js +3 -3
  79. package/dist/components/button-group/button-group.d.ts +3 -1
  80. package/dist/components/button-group/button-group.d.ts.map +1 -1
  81. package/dist/components/button-group/button-group.js +1 -1
  82. package/dist/components/button-group/button-group.stories.d.ts +1 -0
  83. package/dist/components/button-group/button-group.stories.d.ts.map +1 -1
  84. package/dist/components/button-group/button-group.stories.js +4 -0
  85. package/dist/components/button-group/index.d.ts +1 -0
  86. package/dist/components/button-group/index.d.ts.map +1 -1
  87. package/dist/components/calendar/calendar.d.ts +34 -0
  88. package/dist/components/calendar/calendar.d.ts.map +1 -0
  89. package/dist/components/calendar/calendar.js +82 -0
  90. package/dist/components/calendar/calendar.stories.d.ts +16 -0
  91. package/dist/components/calendar/calendar.stories.d.ts.map +1 -0
  92. package/dist/components/calendar/calendar.stories.js +33 -0
  93. package/dist/components/calendar/index.d.ts +3 -0
  94. package/dist/components/calendar/index.d.ts.map +1 -0
  95. package/dist/components/calendar/index.js +1 -0
  96. package/dist/components/card/card.d.ts +28 -0
  97. package/dist/components/card/card.d.ts.map +1 -0
  98. package/dist/components/card/card.js +25 -0
  99. package/dist/components/card/card.stories.d.ts +10 -0
  100. package/dist/components/card/card.stories.d.ts.map +1 -0
  101. package/dist/components/card/card.stories.js +30 -0
  102. package/dist/components/card/index.d.ts +2 -0
  103. package/dist/components/card/index.d.ts.map +1 -0
  104. package/dist/components/card/index.js +1 -0
  105. package/dist/components/checkbox/checkbox.d.ts +9 -0
  106. package/dist/components/checkbox/checkbox.d.ts.map +1 -0
  107. package/dist/components/checkbox/checkbox.js +9 -0
  108. package/dist/components/checkbox/checkbox.stories.d.ts +19 -0
  109. package/dist/components/checkbox/checkbox.stories.d.ts.map +1 -0
  110. package/dist/components/checkbox/checkbox.stories.js +31 -0
  111. package/dist/components/checkbox/index.d.ts +2 -0
  112. package/dist/components/checkbox/index.d.ts.map +1 -0
  113. package/dist/components/checkbox/index.js +1 -0
  114. package/dist/components/collapsible/collapsible.d.ts +17 -0
  115. package/dist/components/collapsible/collapsible.d.ts.map +1 -0
  116. package/dist/components/collapsible/collapsible.js +17 -0
  117. package/dist/components/collapsible/collapsible.stories.d.ts +16 -0
  118. package/dist/components/collapsible/collapsible.stories.d.ts.map +1 -0
  119. package/dist/components/collapsible/collapsible.stories.js +24 -0
  120. package/dist/components/collapsible/index.d.ts +3 -0
  121. package/dist/components/collapsible/index.d.ts.map +1 -0
  122. package/dist/components/collapsible/index.js +1 -0
  123. package/dist/components/combobox/combobox.d.ts +38 -0
  124. package/dist/components/combobox/combobox.d.ts.map +1 -0
  125. package/dist/components/combobox/combobox.js +63 -0
  126. package/dist/components/combobox/combobox.stories.d.ts +18 -0
  127. package/dist/components/combobox/combobox.stories.d.ts.map +1 -0
  128. package/dist/components/combobox/combobox.stories.js +46 -0
  129. package/dist/components/combobox/index.d.ts +3 -0
  130. package/dist/components/combobox/index.d.ts.map +1 -0
  131. package/dist/components/combobox/index.js +1 -0
  132. package/dist/components/command/command.d.ts +31 -0
  133. package/dist/components/command/command.d.ts.map +1 -0
  134. package/dist/components/command/command.js +36 -0
  135. package/dist/components/command/command.stories.d.ts +16 -0
  136. package/dist/components/command/command.stories.d.ts.map +1 -0
  137. package/dist/components/command/command.stories.js +26 -0
  138. package/dist/components/command/index.d.ts +2 -0
  139. package/dist/components/command/index.d.ts.map +1 -0
  140. package/dist/components/command/index.js +1 -0
  141. package/dist/components/context-menu/context-menu.d.ts +62 -0
  142. package/dist/components/context-menu/context-menu.d.ts.map +1 -0
  143. package/dist/components/context-menu/context-menu.js +52 -0
  144. package/dist/components/context-menu/context-menu.stories.d.ts +17 -0
  145. package/dist/components/context-menu/context-menu.stories.d.ts.map +1 -0
  146. package/dist/components/context-menu/context-menu.stories.js +27 -0
  147. package/dist/components/context-menu/index.d.ts +2 -0
  148. package/dist/components/context-menu/index.d.ts.map +1 -0
  149. package/dist/components/context-menu/index.js +1 -0
  150. package/dist/components/date-selector/date-selector-context.d.ts +6 -0
  151. package/dist/components/date-selector/date-selector-context.d.ts.map +1 -0
  152. package/dist/components/date-selector/date-selector-context.js +11 -0
  153. package/dist/components/date-selector/date-selector-parts.d.ts +68 -0
  154. package/dist/components/date-selector/date-selector-parts.d.ts.map +1 -0
  155. package/dist/components/date-selector/date-selector-parts.js +131 -0
  156. package/dist/components/date-selector/date-selector-types.d.ts +118 -0
  157. package/dist/components/date-selector/date-selector-types.d.ts.map +1 -0
  158. package/dist/components/date-selector/date-selector-types.js +32 -0
  159. package/dist/components/date-selector/date-selector-value.d.ts +47 -0
  160. package/dist/components/date-selector/date-selector-value.d.ts.map +1 -0
  161. package/dist/components/date-selector/date-selector-value.js +183 -0
  162. package/dist/components/date-selector/date-selector.d.ts +6 -0
  163. package/dist/components/date-selector/date-selector.d.ts.map +1 -0
  164. package/dist/components/date-selector/date-selector.js +144 -0
  165. package/dist/components/date-selector/date-selector.stories.d.ts +135 -0
  166. package/dist/components/date-selector/date-selector.stories.d.ts.map +1 -0
  167. package/dist/components/date-selector/date-selector.stories.js +144 -0
  168. package/dist/components/date-selector/index.d.ts +7 -0
  169. package/dist/components/date-selector/index.d.ts.map +1 -0
  170. package/dist/components/date-selector/index.js +5 -0
  171. package/dist/components/date-selector/use-date-selector.d.ts +50 -0
  172. package/dist/components/date-selector/use-date-selector.d.ts.map +1 -0
  173. package/dist/components/date-selector/use-date-selector.js +305 -0
  174. package/dist/components/dialog/dialog.d.ts +40 -0
  175. package/dist/components/dialog/dialog.d.ts.map +1 -0
  176. package/dist/components/dialog/dialog.js +38 -0
  177. package/dist/components/dialog/dialog.stories.d.ts +9 -0
  178. package/dist/components/dialog/dialog.stories.d.ts.map +1 -0
  179. package/dist/components/dialog/dialog.stories.js +22 -0
  180. package/dist/components/dialog/index.d.ts +3 -0
  181. package/dist/components/dialog/index.d.ts.map +1 -0
  182. package/dist/components/dialog/index.js +1 -0
  183. package/dist/components/direction/direction.d.ts +7 -0
  184. package/dist/components/direction/direction.d.ts.map +1 -0
  185. package/dist/components/direction/direction.js +5 -0
  186. package/dist/components/direction/direction.stories.d.ts +8 -0
  187. package/dist/components/direction/direction.stories.d.ts.map +1 -0
  188. package/dist/components/direction/direction.stories.js +23 -0
  189. package/dist/components/direction/index.d.ts +2 -0
  190. package/dist/components/direction/index.d.ts.map +1 -0
  191. package/dist/components/direction/index.js +1 -0
  192. package/dist/components/drawer/drawer.d.ts +25 -0
  193. package/dist/components/drawer/drawer.d.ts.map +1 -0
  194. package/dist/components/drawer/drawer.js +36 -0
  195. package/dist/components/drawer/drawer.stories.d.ts +7 -0
  196. package/dist/components/drawer/drawer.stories.d.ts.map +1 -0
  197. package/dist/components/drawer/drawer.stories.js +17 -0
  198. package/dist/components/drawer/index.d.ts +2 -0
  199. package/dist/components/drawer/index.d.ts.map +1 -0
  200. package/dist/components/drawer/index.js +1 -0
  201. package/dist/components/dropdown-menu/dropdown-menu.d.ts +65 -0
  202. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
  203. package/dist/components/dropdown-menu/dropdown-menu.js +52 -0
  204. package/dist/components/dropdown-menu/dropdown-menu.stories.d.ts +18 -0
  205. package/dist/components/dropdown-menu/dropdown-menu.stories.d.ts.map +1 -0
  206. package/dist/components/dropdown-menu/dropdown-menu.stories.js +31 -0
  207. package/dist/components/dropdown-menu/index.d.ts +3 -0
  208. package/dist/components/dropdown-menu/index.d.ts.map +1 -0
  209. package/dist/components/dropdown-menu/index.js +1 -0
  210. package/dist/components/empty/empty.d.ts +25 -0
  211. package/dist/components/empty/empty.d.ts.map +1 -0
  212. package/dist/components/empty/empty.js +34 -0
  213. package/dist/components/empty/empty.stories.d.ts +7 -0
  214. package/dist/components/empty/empty.stories.d.ts.map +1 -0
  215. package/dist/components/empty/empty.stories.js +19 -0
  216. package/dist/components/empty/index.d.ts +3 -0
  217. package/dist/components/empty/index.d.ts.map +1 -0
  218. package/dist/components/empty/index.js +1 -0
  219. package/dist/components/field/field.d.ts +22 -0
  220. package/dist/components/field/field.d.ts.map +1 -0
  221. package/dist/components/field/field.js +34 -0
  222. package/dist/components/field/field.stories.d.ts +16 -0
  223. package/dist/components/field/field.stories.d.ts.map +1 -0
  224. package/dist/components/field/field.stories.js +26 -0
  225. package/dist/components/field/index.d.ts +2 -0
  226. package/dist/components/field/index.d.ts.map +1 -0
  227. package/dist/components/field/index.js +1 -0
  228. package/dist/components/filters/filters-defaults.d.ts +5 -0
  229. package/dist/components/filters/filters-defaults.d.ts.map +1 -0
  230. package/dist/components/filters/filters-defaults.js +97 -0
  231. package/dist/components/filters/filters-types.d.ts +135 -0
  232. package/dist/components/filters/filters-types.d.ts.map +1 -0
  233. package/dist/components/filters/filters-types.js +1 -0
  234. package/dist/components/filters/filters-utils.d.ts +4 -0
  235. package/dist/components/filters/filters-utils.d.ts.map +1 -0
  236. package/dist/components/filters/filters-utils.js +12 -0
  237. package/dist/components/filters/filters.d.ts +29 -0
  238. package/dist/components/filters/filters.d.ts.map +1 -0
  239. package/dist/components/filters/filters.js +733 -0
  240. package/dist/components/filters/filters.stories.d.ts +8 -0
  241. package/dist/components/filters/filters.stories.d.ts.map +1 -0
  242. package/dist/components/filters/filters.stories.js +48 -0
  243. package/dist/components/filters/index.d.ts +5 -0
  244. package/dist/components/filters/index.d.ts.map +1 -0
  245. package/dist/components/filters/index.js +4 -0
  246. package/dist/components/frame/frame.d.ts +65 -0
  247. package/dist/components/frame/frame.d.ts.map +1 -0
  248. package/dist/components/frame/frame.js +108 -0
  249. package/dist/components/frame/frame.stories.d.ts +14 -0
  250. package/dist/components/frame/frame.stories.d.ts.map +1 -0
  251. package/dist/components/frame/frame.stories.js +50 -0
  252. package/dist/components/frame/index.d.ts +3 -0
  253. package/dist/components/frame/index.d.ts.map +1 -0
  254. package/dist/components/frame/index.js +1 -0
  255. package/dist/components/hover-card/hover-card.d.ts +16 -0
  256. package/dist/components/hover-card/hover-card.d.ts.map +1 -0
  257. package/dist/components/hover-card/hover-card.js +14 -0
  258. package/dist/components/hover-card/hover-card.stories.d.ts +7 -0
  259. package/dist/components/hover-card/hover-card.stories.d.ts.map +1 -0
  260. package/dist/components/hover-card/hover-card.stories.js +15 -0
  261. package/dist/components/hover-card/index.d.ts +3 -0
  262. package/dist/components/hover-card/index.d.ts.map +1 -0
  263. package/dist/components/hover-card/index.js +1 -0
  264. package/dist/components/index.d.ts +51 -0
  265. package/dist/components/index.d.ts.map +1 -1
  266. package/dist/components/index.js +51 -0
  267. package/dist/components/input/index.d.ts +2 -0
  268. package/dist/components/input/index.d.ts.map +1 -0
  269. package/dist/components/input/index.js +1 -0
  270. package/dist/components/input/input.d.ts +16 -0
  271. package/dist/components/input/input.d.ts.map +1 -0
  272. package/dist/components/input/input.js +22 -0
  273. package/dist/components/input/input.stories.d.ts +28 -0
  274. package/dist/components/input/input.stories.d.ts.map +1 -0
  275. package/dist/components/input/input.stories.js +33 -0
  276. package/dist/components/input-group/index.d.ts +3 -0
  277. package/dist/components/input-group/index.d.ts.map +1 -0
  278. package/dist/components/input-group/index.js +1 -0
  279. package/dist/components/input-group/input-group.d.ts +44 -0
  280. package/dist/components/input-group/input-group.d.ts.map +1 -0
  281. package/dist/components/input-group/input-group.js +72 -0
  282. package/dist/components/input-group/input-group.stories.d.ts +18 -0
  283. package/dist/components/input-group/input-group.stories.d.ts.map +1 -0
  284. package/dist/components/input-group/input-group.stories.js +29 -0
  285. package/dist/components/item/index.d.ts +3 -0
  286. package/dist/components/item/index.d.ts.map +1 -0
  287. package/dist/components/item/index.js +1 -0
  288. package/dist/components/item/item.d.ts +60 -0
  289. package/dist/components/item/item.d.ts.map +1 -0
  290. package/dist/components/item/item.js +95 -0
  291. package/dist/components/item/item.stories.d.ts +34 -0
  292. package/dist/components/item/item.stories.d.ts.map +1 -0
  293. package/dist/components/item/item.stories.js +40 -0
  294. package/dist/components/kbd/index.d.ts +3 -0
  295. package/dist/components/kbd/index.d.ts.map +1 -0
  296. package/dist/components/kbd/index.js +1 -0
  297. package/dist/components/kbd/kbd.d.ts +15 -0
  298. package/dist/components/kbd/kbd.d.ts.map +1 -0
  299. package/dist/components/kbd/kbd.js +16 -0
  300. package/dist/components/kbd/kbd.stories.d.ts +17 -0
  301. package/dist/components/kbd/kbd.stories.d.ts.map +1 -0
  302. package/dist/components/kbd/kbd.stories.js +25 -0
  303. package/dist/components/label/index.d.ts +2 -0
  304. package/dist/components/label/index.d.ts.map +1 -0
  305. package/dist/components/label/index.js +1 -0
  306. package/dist/components/label/label.d.ts +6 -0
  307. package/dist/components/label/label.d.ts.map +1 -0
  308. package/dist/components/label/label.js +10 -0
  309. package/dist/components/label/label.stories.d.ts +18 -0
  310. package/dist/components/label/label.stories.d.ts.map +1 -0
  311. package/dist/components/label/label.stories.js +29 -0
  312. package/dist/components/menubar/index.d.ts +3 -0
  313. package/dist/components/menubar/index.d.ts.map +1 -0
  314. package/dist/components/menubar/index.js +1 -0
  315. package/dist/components/menubar/menubar.d.ts +64 -0
  316. package/dist/components/menubar/menubar.d.ts.map +1 -0
  317. package/dist/components/menubar/menubar.js +56 -0
  318. package/dist/components/menubar/menubar.stories.d.ts +15 -0
  319. package/dist/components/menubar/menubar.stories.d.ts.map +1 -0
  320. package/dist/components/menubar/menubar.stories.js +18 -0
  321. package/dist/components/native-select/index.d.ts +2 -0
  322. package/dist/components/native-select/index.d.ts.map +1 -0
  323. package/dist/components/native-select/index.js +1 -0
  324. package/dist/components/native-select/native-select.d.ts +12 -0
  325. package/dist/components/native-select/native-select.d.ts.map +1 -0
  326. package/dist/components/native-select/native-select.js +14 -0
  327. package/dist/components/native-select/native-select.stories.d.ts +8 -0
  328. package/dist/components/native-select/native-select.stories.d.ts.map +1 -0
  329. package/dist/components/native-select/native-select.stories.js +19 -0
  330. package/dist/components/navigation-menu/index.d.ts +3 -0
  331. package/dist/components/navigation-menu/index.d.ts.map +1 -0
  332. package/dist/components/navigation-menu/index.js +1 -0
  333. package/dist/components/navigation-menu/navigation-menu.d.ts +33 -0
  334. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
  335. package/dist/components/navigation-menu/navigation-menu.js +33 -0
  336. package/dist/components/navigation-menu/navigation-menu.stories.d.ts +14 -0
  337. package/dist/components/navigation-menu/navigation-menu.stories.d.ts.map +1 -0
  338. package/dist/components/navigation-menu/navigation-menu.stories.js +14 -0
  339. package/dist/components/pagination/index.d.ts +3 -0
  340. package/dist/components/pagination/index.d.ts.map +1 -0
  341. package/dist/components/pagination/index.js +1 -0
  342. package/dist/components/pagination/pagination.d.ts +31 -0
  343. package/dist/components/pagination/pagination.d.ts.map +1 -0
  344. package/dist/components/pagination/pagination.js +29 -0
  345. package/dist/components/pagination/pagination.stories.d.ts +14 -0
  346. package/dist/components/pagination/pagination.stories.d.ts.map +1 -0
  347. package/dist/components/pagination/pagination.stories.js +14 -0
  348. package/dist/components/popover/index.d.ts +2 -0
  349. package/dist/components/popover/index.d.ts.map +1 -0
  350. package/dist/components/popover/index.js +1 -0
  351. package/dist/components/popover/popover.d.ts +20 -0
  352. package/dist/components/popover/popover.d.ts.map +1 -0
  353. package/dist/components/popover/popover.js +24 -0
  354. package/dist/components/popover/popover.stories.d.ts +7 -0
  355. package/dist/components/popover/popover.stories.d.ts.map +1 -0
  356. package/dist/components/popover/popover.stories.js +17 -0
  357. package/dist/components/progress/index.d.ts +3 -0
  358. package/dist/components/progress/index.d.ts.map +1 -0
  359. package/dist/components/progress/index.js +1 -0
  360. package/dist/components/progress/progress.d.ts +18 -0
  361. package/dist/components/progress/progress.d.ts.map +1 -0
  362. package/dist/components/progress/progress.js +20 -0
  363. package/dist/components/progress/progress.stories.d.ts +9 -0
  364. package/dist/components/progress/progress.stories.d.ts.map +1 -0
  365. package/dist/components/progress/progress.stories.js +29 -0
  366. package/dist/components/radio-group/index.d.ts +3 -0
  367. package/dist/components/radio-group/index.d.ts.map +1 -0
  368. package/dist/components/radio-group/index.js +1 -0
  369. package/dist/components/radio-group/radio-group.d.ts +13 -0
  370. package/dist/components/radio-group/radio-group.d.ts.map +1 -0
  371. package/dist/components/radio-group/radio-group.js +12 -0
  372. package/dist/components/radio-group/radio-group.stories.d.ts +7 -0
  373. package/dist/components/radio-group/radio-group.stories.d.ts.map +1 -0
  374. package/dist/components/radio-group/radio-group.stories.js +18 -0
  375. package/dist/components/resizable/index.d.ts +2 -0
  376. package/dist/components/resizable/index.d.ts.map +1 -0
  377. package/dist/components/resizable/index.js +1 -0
  378. package/dist/components/resizable/resizable.d.ts +12 -0
  379. package/dist/components/resizable/resizable.d.ts.map +1 -0
  380. package/dist/components/resizable/resizable.js +14 -0
  381. package/dist/components/resizable/resizable.stories.d.ts +7 -0
  382. package/dist/components/resizable/resizable.stories.d.ts.map +1 -0
  383. package/dist/components/resizable/resizable.stories.js +16 -0
  384. package/dist/components/scroll-area/index.d.ts +2 -0
  385. package/dist/components/scroll-area/index.d.ts.map +1 -0
  386. package/dist/components/scroll-area/index.js +1 -0
  387. package/dist/components/scroll-area/scroll-area.d.ts +7 -0
  388. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
  389. package/dist/components/scroll-area/scroll-area.js +11 -0
  390. package/dist/components/scroll-area/scroll-area.stories.d.ts +6 -0
  391. package/dist/components/scroll-area/scroll-area.stories.d.ts.map +1 -0
  392. package/dist/components/scroll-area/scroll-area.stories.js +13 -0
  393. package/dist/components/select/index.d.ts +3 -0
  394. package/dist/components/select/index.d.ts.map +1 -0
  395. package/dist/components/select/index.js +1 -0
  396. package/dist/components/select/select.d.ts +49 -0
  397. package/dist/components/select/select.d.ts.map +1 -0
  398. package/dist/components/select/select.js +50 -0
  399. package/dist/components/select/select.stories.d.ts +9 -0
  400. package/dist/components/select/select.stories.d.ts.map +1 -0
  401. package/dist/components/select/select.stories.js +20 -0
  402. package/dist/components/separator/index.d.ts +1 -0
  403. package/dist/components/separator/index.d.ts.map +1 -1
  404. package/dist/components/separator/separator.d.ts +3 -1
  405. package/dist/components/separator/separator.d.ts.map +1 -1
  406. package/dist/components/sheet/index.d.ts +2 -0
  407. package/dist/components/sheet/index.d.ts.map +1 -0
  408. package/dist/components/sheet/index.js +1 -0
  409. package/dist/components/sheet/sheet.d.ts +34 -0
  410. package/dist/components/sheet/sheet.d.ts.map +1 -0
  411. package/dist/components/sheet/sheet.js +38 -0
  412. package/dist/components/sheet/sheet.stories.d.ts +9 -0
  413. package/dist/components/sheet/sheet.stories.d.ts.map +1 -0
  414. package/dist/components/sheet/sheet.stories.js +21 -0
  415. package/dist/components/slider/index.d.ts +3 -0
  416. package/dist/components/slider/index.d.ts.map +1 -0
  417. package/dist/components/slider/index.js +1 -0
  418. package/dist/components/slider/slider.d.ts +15 -0
  419. package/dist/components/slider/slider.d.ts.map +1 -0
  420. package/dist/components/slider/slider.js +20 -0
  421. package/dist/components/slider/slider.stories.d.ts +11 -0
  422. package/dist/components/slider/slider.stories.d.ts.map +1 -0
  423. package/dist/components/slider/slider.stories.js +36 -0
  424. package/dist/components/sonner/index.d.ts +4 -0
  425. package/dist/components/sonner/index.d.ts.map +1 -0
  426. package/dist/components/sonner/index.js +2 -0
  427. package/dist/components/sonner/sonner.d.ts +12 -0
  428. package/dist/components/sonner/sonner.d.ts.map +1 -0
  429. package/dist/components/sonner/sonner.js +32 -0
  430. package/dist/components/sonner/sonner.stories.d.ts +8 -0
  431. package/dist/components/sonner/sonner.stories.d.ts.map +1 -0
  432. package/dist/components/sonner/sonner.stories.js +25 -0
  433. package/dist/components/sonner/toast.d.ts +2 -0
  434. package/dist/components/sonner/toast.d.ts.map +1 -0
  435. package/dist/components/sonner/toast.js +1 -0
  436. package/dist/components/sortable/index.d.ts +3 -0
  437. package/dist/components/sortable/index.d.ts.map +1 -0
  438. package/dist/components/sortable/index.js +1 -0
  439. package/dist/components/sortable/sortable.d.ts +94 -0
  440. package/dist/components/sortable/sortable.d.ts.map +1 -0
  441. package/dist/components/sortable/sortable.js +210 -0
  442. package/dist/components/sortable/sortable.stories.d.ts +14 -0
  443. package/dist/components/sortable/sortable.stories.d.ts.map +1 -0
  444. package/dist/components/sortable/sortable.stories.js +38 -0
  445. package/dist/components/spinner/index.d.ts +3 -0
  446. package/dist/components/spinner/index.d.ts.map +1 -0
  447. package/dist/components/spinner/index.js +1 -0
  448. package/dist/components/spinner/spinner.d.ts +13 -0
  449. package/dist/components/spinner/spinner.d.ts.map +1 -0
  450. package/dist/components/spinner/spinner.js +12 -0
  451. package/dist/components/spinner/spinner.stories.d.ts +9 -0
  452. package/dist/components/spinner/spinner.stories.d.ts.map +1 -0
  453. package/dist/components/spinner/spinner.stories.js +20 -0
  454. package/dist/components/status-indicator/index.d.ts +3 -0
  455. package/dist/components/status-indicator/index.d.ts.map +1 -0
  456. package/dist/components/status-indicator/index.js +1 -0
  457. package/dist/components/status-indicator/status-indicator.d.ts +51 -0
  458. package/dist/components/status-indicator/status-indicator.d.ts.map +1 -0
  459. package/dist/components/status-indicator/status-indicator.js +48 -0
  460. package/dist/components/status-indicator/status-indicator.stories.d.ts +20 -0
  461. package/dist/components/status-indicator/status-indicator.stories.d.ts.map +1 -0
  462. package/dist/components/status-indicator/status-indicator.stories.js +97 -0
  463. package/dist/components/switch/index.d.ts +2 -0
  464. package/dist/components/switch/index.d.ts.map +1 -0
  465. package/dist/components/switch/index.js +1 -0
  466. package/dist/components/switch/switch.d.ts +13 -0
  467. package/dist/components/switch/switch.d.ts.map +1 -0
  468. package/dist/components/switch/switch.js +8 -0
  469. package/dist/components/switch/switch.stories.d.ts +20 -0
  470. package/dist/components/switch/switch.stories.d.ts.map +1 -0
  471. package/dist/components/switch/switch.stories.js +46 -0
  472. package/dist/components/tabs/index.d.ts +3 -0
  473. package/dist/components/tabs/index.d.ts.map +1 -0
  474. package/dist/components/tabs/index.js +1 -0
  475. package/dist/components/tabs/tabs.d.ts +35 -0
  476. package/dist/components/tabs/tabs.d.ts.map +1 -0
  477. package/dist/components/tabs/tabs.js +34 -0
  478. package/dist/components/tabs/tabs.stories.d.ts +10 -0
  479. package/dist/components/tabs/tabs.stories.d.ts.map +1 -0
  480. package/dist/components/tabs/tabs.stories.js +29 -0
  481. package/dist/components/text/index.d.ts +3 -0
  482. package/dist/components/text/index.d.ts.map +1 -0
  483. package/dist/components/text/index.js +1 -0
  484. package/dist/components/text/text.d.ts +47 -0
  485. package/dist/components/text/text.d.ts.map +1 -0
  486. package/dist/components/text/text.js +53 -0
  487. package/dist/components/text/text.stories.d.ts +11 -0
  488. package/dist/components/text/text.stories.d.ts.map +1 -0
  489. package/dist/components/text/text.stories.js +84 -0
  490. package/dist/components/textarea/index.d.ts +2 -0
  491. package/dist/components/textarea/index.d.ts.map +1 -0
  492. package/dist/components/textarea/index.js +1 -0
  493. package/dist/components/textarea/textarea.d.ts +11 -0
  494. package/dist/components/textarea/textarea.d.ts.map +1 -0
  495. package/dist/components/textarea/textarea.js +10 -0
  496. package/dist/components/textarea/textarea.stories.d.ts +24 -0
  497. package/dist/components/textarea/textarea.stories.d.ts.map +1 -0
  498. package/dist/components/textarea/textarea.stories.js +32 -0
  499. package/dist/components/toggle/index.d.ts +3 -0
  500. package/dist/components/toggle/index.d.ts.map +1 -0
  501. package/dist/components/toggle/index.js +1 -0
  502. package/dist/components/toggle/toggle.d.ts +31 -0
  503. package/dist/components/toggle/toggle.d.ts.map +1 -0
  504. package/dist/components/toggle/toggle.js +33 -0
  505. package/dist/components/toggle/toggle.stories.d.ts +11 -0
  506. package/dist/components/toggle/toggle.stories.d.ts.map +1 -0
  507. package/dist/components/toggle/toggle.stories.js +60 -0
  508. package/dist/components/toggle-group/index.d.ts +3 -0
  509. package/dist/components/toggle-group/index.d.ts.map +1 -0
  510. package/dist/components/toggle-group/index.js +1 -0
  511. package/dist/components/toggle-group/toggle-group.d.ts +32 -0
  512. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
  513. package/dist/components/toggle-group/toggle-group.js +33 -0
  514. package/dist/components/toggle-group/toggle-group.stories.d.ts +10 -0
  515. package/dist/components/toggle-group/toggle-group.stories.d.ts.map +1 -0
  516. package/dist/components/toggle-group/toggle-group.stories.js +28 -0
  517. package/dist/components/tooltip/index.d.ts +3 -0
  518. package/dist/components/tooltip/index.d.ts.map +1 -0
  519. package/dist/components/tooltip/index.js +1 -0
  520. package/dist/components/tooltip/tooltip.d.ts +22 -0
  521. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  522. package/dist/components/tooltip/tooltip.js +21 -0
  523. package/dist/components/tooltip/tooltip.stories.d.ts +11 -0
  524. package/dist/components/tooltip/tooltip.stories.d.ts.map +1 -0
  525. package/dist/components/tooltip/tooltip.stories.js +33 -0
  526. package/dist/hooks/use-mobile.d.ts +2 -0
  527. package/dist/hooks/use-mobile.d.ts.map +1 -0
  528. package/dist/hooks/use-mobile.js +15 -0
  529. package/dist/index.d.ts +1 -0
  530. package/dist/index.d.ts.map +1 -1
  531. package/dist/index.js +1 -0
  532. package/dist/tsconfig.tsbuildinfo +1 -1
  533. package/llms.txt +21 -19
  534. package/package.json +17 -9
  535. package/src/styles/globals.css +6 -11
@@ -0,0 +1,210 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Drag-and-drop sortable lists and grids built on [dnd-kit](https://dndkit.com/).
5
+ *
6
+ * Compose **`Sortable`** (root) with **`SortableItem`** rows and an optional **`SortableItemHandle`**
7
+ * for the drag affordance. The root renders a **`DragOverlay`** portal while dragging; use
8
+ * **`SortableOverlay`** only when you need a fully custom overlay.
9
+ *
10
+ * @packageDocumentation
11
+ */
12
+ import * as React from 'react';
13
+ import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useMemo, useState, useSyncExternalStore, } from 'react';
14
+ import { mergeProps } from '@base-ui/react/merge-props';
15
+ import { useRender } from '@base-ui/react/use-render';
16
+ import { defaultDropAnimationSideEffects, DndContext, DragOverlay, KeyboardSensor, MeasuringStrategy, MouseSensor, TouchSensor, useSensor, useSensors, } from '@dnd-kit/core';
17
+ import { arrayMove, defaultAnimateLayoutChanges, rectSortingStrategy, SortableContext, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy, } from '@dnd-kit/sortable';
18
+ import { CSS } from '@dnd-kit/utilities';
19
+ import { createPortal } from 'react-dom';
20
+ import { cn } from '../../lib/utils';
21
+ // Sortable Item Context
22
+ const SortableItemContext = createContext({
23
+ listeners: undefined,
24
+ isDragging: false,
25
+ disabled: false,
26
+ });
27
+ const IsOverlayContext = createContext(false);
28
+ const SortableInternalContext = createContext({
29
+ activeId: null,
30
+ modifiers: undefined,
31
+ });
32
+ const animateLayoutChanges = (args) => defaultAnimateLayoutChanges({ ...args, wasDragging: true });
33
+ const dropAnimationConfig = {
34
+ sideEffects: defaultDropAnimationSideEffects({
35
+ styles: {
36
+ active: {
37
+ opacity: '0.4',
38
+ },
39
+ },
40
+ }),
41
+ };
42
+ const emptySubscribe = () => () => { };
43
+ function useIsClient() {
44
+ return useSyncExternalStore(emptySubscribe, () => true, () => false);
45
+ }
46
+ /**
47
+ * Root for a sortable region. Wires `DndContext`, `SortableContext`, sensors, and a `DragOverlay` portal on the client.
48
+ *
49
+ * Renders the default element as a `div` with `data-slot="sortable"` (see Base UI `useRender` / `render` prop).
50
+ */
51
+ function Sortable({ value, onValueChange, getItemValue, className, render, onMove, strategy = 'vertical', onDragStart, onDragEnd, modifiers, children, ...props }) {
52
+ const [activeId, setActiveId] = useState(null);
53
+ const isClient = useIsClient();
54
+ const sensors = useSensors(useSensor(MouseSensor, {
55
+ activationConstraint: {
56
+ distance: 10,
57
+ },
58
+ }), useSensor(TouchSensor, {
59
+ activationConstraint: {
60
+ delay: 250,
61
+ tolerance: 5,
62
+ },
63
+ }), useSensor(KeyboardSensor, {
64
+ coordinateGetter: sortableKeyboardCoordinates,
65
+ }));
66
+ const handleDragStart = useCallback((event) => {
67
+ setActiveId(event.active.id);
68
+ onDragStart?.(event);
69
+ }, [onDragStart]);
70
+ const handleDragEnd = useCallback((event) => {
71
+ const { active, over } = event;
72
+ setActiveId(null);
73
+ onDragEnd?.(event);
74
+ if (!over)
75
+ return;
76
+ // Handle item reordering
77
+ const activeIndex = value.findIndex((item) => getItemValue(item) === active.id);
78
+ const overIndex = value.findIndex((item) => getItemValue(item) === over.id);
79
+ if (activeIndex !== overIndex) {
80
+ if (onMove) {
81
+ onMove({ event, activeIndex, overIndex });
82
+ }
83
+ else {
84
+ const newValue = arrayMove(value, activeIndex, overIndex);
85
+ onValueChange(newValue);
86
+ }
87
+ }
88
+ }, [value, getItemValue, onValueChange, onMove, onDragEnd]);
89
+ const handleDragCancel = useCallback(() => {
90
+ setActiveId(null);
91
+ }, []);
92
+ const getStrategy = () => {
93
+ switch (strategy) {
94
+ case 'horizontal':
95
+ return rectSortingStrategy;
96
+ case 'grid':
97
+ return rectSortingStrategy;
98
+ case 'vertical':
99
+ default:
100
+ return verticalListSortingStrategy;
101
+ }
102
+ };
103
+ const itemIds = useMemo(() => value.map(getItemValue), [value, getItemValue]);
104
+ const contextValue = useMemo(() => ({ activeId, modifiers }), [activeId, modifiers]);
105
+ const defaultProps = {
106
+ 'data-slot': 'sortable',
107
+ 'data-dragging': activeId !== null,
108
+ className: cn(activeId !== null && 'cursor-grabbing!', className),
109
+ children,
110
+ };
111
+ // Find the active child for the overlay
112
+ const overlayContent = useMemo(() => {
113
+ if (!activeId)
114
+ return null;
115
+ let result = null;
116
+ Children.forEach(children, (child) => {
117
+ if (!isValidElement(child))
118
+ return;
119
+ if (child.props.value !== activeId)
120
+ return;
121
+ result = cloneElement(child, {
122
+ ...child.props,
123
+ className: cn(child.props.className, 'z-50'),
124
+ });
125
+ });
126
+ return result;
127
+ }, [activeId, children]);
128
+ return (_jsx(SortableInternalContext.Provider, { value: contextValue, children: _jsxs(DndContext, { sensors: sensors, modifiers: modifiers, measuring: {
129
+ droppable: {
130
+ strategy: MeasuringStrategy.Always,
131
+ },
132
+ }, onDragStart: handleDragStart, onDragEnd: handleDragEnd, onDragCancel: handleDragCancel, children: [_jsx(SortableContext, { items: itemIds, strategy: getStrategy(), children: useRender({
133
+ defaultTagName: 'div',
134
+ render,
135
+ props: mergeProps(defaultProps, props),
136
+ }) }), isClient &&
137
+ createPortal(_jsx(DragOverlay, { dropAnimation: dropAnimationConfig, modifiers: modifiers, className: cn('z-50', activeId && 'cursor-grabbing'), children: _jsx(IsOverlayContext.Provider, { value: true, children: overlayContent }) }), document.body)] }) }));
138
+ }
139
+ /**
140
+ * One row in a sortable list. Provides `data-slot="sortable-item"` and sortable transforms unless rendered inside a drag overlay clone.
141
+ */
142
+ function SortableItem({ value, className, render, disabled, ...props }) {
143
+ const isOverlay = useContext(IsOverlayContext);
144
+ const { setNodeRef, transform, transition, attributes, listeners, isDragging: isSortableDragging, } = useSortable({
145
+ id: value,
146
+ disabled: disabled || isOverlay,
147
+ animateLayoutChanges,
148
+ });
149
+ const defaultProps = isOverlay
150
+ ? {
151
+ 'data-slot': 'sortable-item',
152
+ 'data-value': value,
153
+ 'data-dragging': true,
154
+ className: cn(className),
155
+ children: props.children,
156
+ }
157
+ : {
158
+ 'data-slot': 'sortable-item',
159
+ 'data-value': value,
160
+ 'data-dragging': isSortableDragging,
161
+ 'data-disabled': disabled,
162
+ ref: setNodeRef,
163
+ style: {
164
+ transition,
165
+ transform: CSS.Transform.toString(transform),
166
+ },
167
+ ...attributes,
168
+ className: cn(isSortableDragging && 'z-50 opacity-50', disabled && 'opacity-50', className),
169
+ children: props.children,
170
+ };
171
+ const itemContextValue = isOverlay ? { listeners: undefined, isDragging: true, disabled: false } : { listeners, isDragging: isSortableDragging, disabled };
172
+ const rendered = useRender({
173
+ defaultTagName: 'div',
174
+ render,
175
+ props: mergeProps(defaultProps, props),
176
+ });
177
+ return _jsx(SortableItemContext.Provider, { value: itemContextValue, children: rendered });
178
+ }
179
+ /**
180
+ * Drag handle for a `SortableItem`. Must be nested under `SortableItem` so listeners and drag state apply.
181
+ */
182
+ function SortableItemHandle({ className, render, cursor = true, ...props }) {
183
+ const { listeners, isDragging, disabled } = useContext(SortableItemContext);
184
+ const defaultProps = {
185
+ 'data-slot': 'sortable-item-handle',
186
+ 'data-dragging': isDragging,
187
+ 'data-disabled': disabled,
188
+ ...listeners,
189
+ className: cn(cursor && (isDragging ? 'cursor-grabbing!' : 'cursor-grab!'), className),
190
+ children: props.children,
191
+ };
192
+ return useRender({
193
+ defaultTagName: 'div',
194
+ render,
195
+ props: mergeProps(defaultProps, props),
196
+ });
197
+ }
198
+ /**
199
+ * Alternate overlay entry: renders `DragOverlay` in a portal with shared modifiers/animation from `Sortable` context.
200
+ * Prefer the built-in overlay on `Sortable` unless you need this API.
201
+ */
202
+ function SortableOverlay({ children, className, ...props }) {
203
+ const { activeId, modifiers } = useContext(SortableInternalContext);
204
+ const isClient = useIsClient();
205
+ const content = activeId && children ? (typeof children === 'function' ? children({ value: activeId }) : children) : null;
206
+ if (!isClient)
207
+ return null;
208
+ return createPortal(_jsx(DragOverlay, { dropAnimation: dropAnimationConfig, modifiers: modifiers, className: cn('z-50', activeId && 'cursor-grabbing', className), ...props, children: _jsx(IsOverlayContext.Provider, { value: true, children: content }) }), document.body);
209
+ }
210
+ export { Sortable, SortableItem, SortableItemHandle, SortableOverlay };
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const Vertical: Story;
12
+ export declare const Horizontal: Story;
13
+ export declare const Grid: Story;
14
+ //# sourceMappingURL=sortable.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/sortable/sortable.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAcvD,QAAA,MAAM,IAAI;;;;;;CAMM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAiEnC,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { GripVertical } from 'lucide-react';
3
+ import { useState } from 'react';
4
+ import { Sortable, SortableItem, SortableItemHandle } from '.';
5
+ const initialItems = [
6
+ { id: 'a', title: 'First item' },
7
+ { id: 'b', title: 'Second item' },
8
+ { id: 'c', title: 'Third item' },
9
+ ];
10
+ const meta = {
11
+ title: 'UI/Sortable',
12
+ tags: ['autodocs'],
13
+ parameters: {
14
+ layout: 'padded',
15
+ },
16
+ };
17
+ export default meta;
18
+ function VerticalListStory() {
19
+ const [items, setItems] = useState(initialItems);
20
+ return (_jsx("div", { className: "w-full max-w-md", children: _jsx(Sortable, { value: items, onValueChange: setItems, getItemValue: (item) => item.id, className: "flex flex-col gap-2", children: items.map((item) => (_jsxs(SortableItem, { value: item.id, className: "flex items-center gap-3 rounded-md border bg-card px-3 py-2 shadow-sm", children: [_jsx(SortableItemHandle, { className: "text-muted-foreground hover:text-foreground", "aria-label": `Drag ${item.title}`, children: _jsx(GripVertical, { className: "size-5", strokeWidth: 2.5 }) }), _jsx("span", { className: "text-sm font-medium", children: item.title })] }, item.id))) }) }));
21
+ }
22
+ function HorizontalListStory() {
23
+ const [items, setItems] = useState(initialItems);
24
+ return (_jsx("div", { className: "w-full max-w-3xl", children: _jsx(Sortable, { value: items, onValueChange: setItems, getItemValue: (item) => item.id, strategy: "horizontal", className: "flex flex-row flex-wrap gap-2", children: items.map((item) => (_jsxs(SortableItem, { value: item.id, className: "flex min-w-[10rem] items-center gap-2 rounded-md border bg-card px-3 py-2 shadow-sm", children: [_jsx(SortableItemHandle, { className: "text-muted-foreground hover:text-foreground", "aria-label": `Drag ${item.title}`, children: _jsx(GripVertical, { className: "size-5", strokeWidth: 2.5 }) }), _jsx("span", { className: "text-sm font-medium", children: item.title })] }, item.id))) }) }));
25
+ }
26
+ function GridStory() {
27
+ const [items, setItems] = useState(initialItems);
28
+ return (_jsx("div", { className: "w-full max-w-lg", children: _jsx(Sortable, { value: items, onValueChange: setItems, getItemValue: (item) => item.id, strategy: "grid", className: "grid grid-cols-2 gap-2", children: items.map((item) => (_jsxs(SortableItem, { value: item.id, className: "flex items-center gap-2 rounded-md border bg-card px-3 py-4 shadow-sm", children: [_jsx(SortableItemHandle, { className: "text-muted-foreground hover:text-foreground", "aria-label": `Drag ${item.title}`, children: _jsx(GripVertical, { className: "size-5", strokeWidth: 2.5 }) }), _jsx("span", { className: "text-sm font-medium", children: item.title })] }, item.id))) }) }));
29
+ }
30
+ export const Vertical = {
31
+ render: () => _jsx(VerticalListStory, {}),
32
+ };
33
+ export const Horizontal = {
34
+ render: () => _jsx(HorizontalListStory, {}),
35
+ };
36
+ export const Grid = {
37
+ render: () => _jsx(GridStory, {}),
38
+ };
@@ -0,0 +1,3 @@
1
+ export { Spinner } from './spinner';
2
+ export type { SpinnerProps } from './spinner';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export { Spinner } from './spinner';
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { Loader2 } from 'lucide-react';
3
+ /**
4
+ * Props for `Spinner`. Accepts standard SVG attributes (via Lucide’s `Loader2`).
5
+ */
6
+ export type SpinnerProps = React.ComponentPropsWithoutRef<typeof Loader2>;
7
+ /**
8
+ * A compact loading indicator: spinning icon with `role="status"` and default `aria-label="Loading"`.
9
+ * Pass `aria-label`, `aria-hidden`, or `role` through props to override (spread is applied last).
10
+ */
11
+ declare function Spinner({ className, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
12
+ export { Spinner };
13
+ //# sourceMappingURL=spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,OAAO,CAAC,CAAC;AAE1E;;;GAGG;AACH,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAErD;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { Loader2 } from 'lucide-react';
4
+ import { cn } from '../../lib/utils';
5
+ /**
6
+ * A compact loading indicator: spinning icon with `role="status"` and default `aria-label="Loading"`.
7
+ * Pass `aria-label`, `aria-hidden`, or `role` through props to override (spread is applied last).
8
+ */
9
+ function Spinner({ className, ...props }) {
10
+ return _jsx(Loader2, { "data-slot": "spinner", className: cn('size-4 animate-spin', className), role: "status", "aria-label": "Loading", ...props });
11
+ }
12
+ export { Spinner };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Spinner } from './spinner';
3
+ declare const meta: Meta<typeof Spinner>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Muted: Story;
8
+ export declare const Large: Story;
9
+ //# sourceMappingURL=spinner.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.stories.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAO9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Spinner } from './spinner';
3
+ const meta = {
4
+ title: 'UI/Spinner',
5
+ component: Spinner,
6
+ tags: ['autodocs'],
7
+ parameters: {
8
+ layout: 'centered',
9
+ },
10
+ };
11
+ export default meta;
12
+ export const Default = {
13
+ render: () => _jsx(Spinner, {}),
14
+ };
15
+ export const Muted = {
16
+ render: () => _jsx(Spinner, { className: "size-5 text-muted-foreground" }),
17
+ };
18
+ export const Large = {
19
+ render: () => _jsx(Spinner, { className: "size-8" }),
20
+ };
@@ -0,0 +1,3 @@
1
+ export { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel } from './status-indicator';
2
+ export type { StatusIndicatorDotProps, StatusIndicatorLabelProps, StatusIndicatorProps, StatusIndicatorState } from './status-indicator';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/status-indicator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/F,YAAY,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel } from './status-indicator';
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Operational status: compound **`StatusIndicator`** (row shell), **`StatusIndicatorDot`** (ping + dot),
3
+ * and **`StatusIndicatorLabel`** (muted text). Colors use Wheelhouse semantic tokens.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ import type { ComponentPropsWithoutRef } from 'react';
8
+ /** Semantic states for {@link StatusIndicatorDot}. */
9
+ export type StatusIndicatorState = 'active' | 'down' | 'fixing' | 'idle';
10
+ /**
11
+ * Props for {@link StatusIndicatorDot}.
12
+ */
13
+ export interface StatusIndicatorDotProps {
14
+ /**
15
+ * Visual state: **`active`**, **`down`**, **`fixing`**, **`idle`**.
16
+ * Active, down, and fixing show a ping animation; idle is a static dot.
17
+ */
18
+ state?: StatusIndicatorState;
19
+ /**
20
+ * Dot and ping diameter (defaults to **`sm`**).
21
+ */
22
+ size?: 'sm' | 'md' | 'lg';
23
+ /**
24
+ * Optional Tailwind class(es) merged onto the solid dot **after** semantic colors.
25
+ */
26
+ color?: string;
27
+ /** Classes on the dot wrapper (`data-slot="status-indicator-dot"`). */
28
+ className?: string;
29
+ }
30
+ /**
31
+ * Props for {@link StatusIndicatorLabel}.
32
+ */
33
+ export type StatusIndicatorLabelProps = ComponentPropsWithoutRef<'span'>;
34
+ /**
35
+ * Props for {@link StatusIndicator} — a flex row shell; compose with {@link StatusIndicatorDot} and {@link StatusIndicatorLabel}.
36
+ */
37
+ export type StatusIndicatorProps = ComponentPropsWithoutRef<'div'>;
38
+ /**
39
+ * Ping + solid dot only. Use inside {@link StatusIndicator} or alone when no label is needed.
40
+ */
41
+ declare function StatusIndicatorDot({ state, size, color, className }: StatusIndicatorDotProps): import("react/jsx-runtime").JSX.Element;
42
+ /**
43
+ * Muted label text beside the dot. Typically placed after {@link StatusIndicatorDot} inside {@link StatusIndicator}.
44
+ */
45
+ declare function StatusIndicatorLabel({ className, ...props }: StatusIndicatorLabelProps): import("react/jsx-runtime").JSX.Element;
46
+ /**
47
+ * Flex row container (`gap-2`, `items-center`). Compose with {@link StatusIndicatorDot} and optionally {@link StatusIndicatorLabel}.
48
+ */
49
+ declare function StatusIndicator({ className, ...props }: StatusIndicatorProps): import("react/jsx-runtime").JSX.Element;
50
+ export { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel };
51
+ //# sourceMappingURL=status-indicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-indicator.d.ts","sourceRoot":"","sources":["../../../src/components/status-indicator/status-indicator.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,sDAAsD;AACtD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC;;;OAGG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AA4BnE;;GAEG;AACH,iBAAS,kBAAkB,CAAC,EAAE,KAAc,EAAE,IAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,uBAAuB,2CAWrG;AAED;;GAEG;AACH,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,2CAE/E;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,2CAErE;AAED,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from '../../lib/utils';
3
+ const getStateColors = (state) => {
4
+ switch (state) {
5
+ case 'active':
6
+ return { dot: 'bg-success', ping: 'bg-success/50' };
7
+ case 'down':
8
+ return { dot: 'bg-destructive-foreground', ping: 'bg-destructive-foreground/45' };
9
+ case 'fixing':
10
+ return { dot: 'bg-warning', ping: 'bg-warning/50' };
11
+ case 'idle':
12
+ default:
13
+ return { dot: 'bg-muted-foreground', ping: 'bg-muted-foreground/40' };
14
+ }
15
+ };
16
+ const getSizeClasses = (size) => {
17
+ switch (size) {
18
+ case 'md':
19
+ return { dot: 'h-3 w-3', ping: 'h-3 w-3' };
20
+ case 'lg':
21
+ return { dot: 'h-4 w-4', ping: 'h-4 w-4' };
22
+ case 'sm':
23
+ default:
24
+ return { dot: 'h-2 w-2', ping: 'h-2 w-2' };
25
+ }
26
+ };
27
+ /**
28
+ * Ping + solid dot only. Use inside {@link StatusIndicator} or alone when no label is needed.
29
+ */
30
+ function StatusIndicatorDot({ state = 'idle', size = 'sm', color, className }) {
31
+ const shouldAnimate = state === 'active' || state === 'fixing' || state === 'down';
32
+ const colors = getStateColors(state);
33
+ const sizeClasses = getSizeClasses(size);
34
+ return (_jsxs("div", { "data-slot": "status-indicator-dot", className: cn('relative flex items-center', className), children: [shouldAnimate && _jsx("span", { className: cn('absolute inline-flex animate-ping rounded-full opacity-75', sizeClasses.ping, colors.ping) }), _jsx("span", { className: cn('relative inline-flex rounded-full', sizeClasses.dot, colors.dot, color) })] }));
35
+ }
36
+ /**
37
+ * Muted label text beside the dot. Typically placed after {@link StatusIndicatorDot} inside {@link StatusIndicator}.
38
+ */
39
+ function StatusIndicatorLabel({ className, ...props }) {
40
+ return _jsx("span", { "data-slot": "status-indicator-label", className: cn('text-sm text-muted-foreground', className), ...props });
41
+ }
42
+ /**
43
+ * Flex row container (`gap-2`, `items-center`). Compose with {@link StatusIndicatorDot} and optionally {@link StatusIndicatorLabel}.
44
+ */
45
+ function StatusIndicator({ className, ...props }) {
46
+ return _jsx("div", { "data-slot": "status-indicator", className: cn('flex items-center gap-2', className), ...props });
47
+ }
48
+ export { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel };
@@ -0,0 +1,20 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ parameters: {
6
+ layout: string;
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof meta>;
16
+ export declare const Default: Story;
17
+ export declare const AllStates: Story;
18
+ export declare const Sizes: Story;
19
+ export declare const DotOnly: Story;
20
+ //# sourceMappingURL=status-indicator.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-indicator.stories.d.ts","sourceRoot":"","sources":["../../../src/components/status-indicator/status-indicator.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,QAAA,MAAM,IAAI;;;;;;;;;;;CAYM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAmBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA+CvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAuCnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC"}
@@ -0,0 +1,97 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel } from './status-indicator';
3
+ const meta = {
4
+ title: 'UI/StatusIndicator',
5
+ tags: ['autodocs'],
6
+ parameters: {
7
+ layout: 'centered',
8
+ docs: {
9
+ description: {
10
+ component: 'Compose **StatusIndicator** (flex row) with **StatusIndicatorDot** (ping + dot) and optionally **StatusIndicatorLabel** (muted text). Use the dot alone when no label is needed.',
11
+ },
12
+ },
13
+ },
14
+ };
15
+ export default meta;
16
+ export const Default = {
17
+ parameters: {
18
+ docs: {
19
+ source: {
20
+ code: `import { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel } from '@wheelhouse/ui';
21
+
22
+ <StatusIndicator>
23
+ <StatusIndicatorDot state="idle" />
24
+ <StatusIndicatorLabel>Status</StatusIndicatorLabel>
25
+ </StatusIndicator>`,
26
+ },
27
+ },
28
+ },
29
+ render: () => (_jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "idle" }), _jsx(StatusIndicatorLabel, { children: "Status" })] })),
30
+ };
31
+ export const AllStates = {
32
+ parameters: {
33
+ docs: {
34
+ source: {
35
+ code: `import { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel } from '@wheelhouse/ui';
36
+
37
+ <div className="flex flex-col gap-4">
38
+ <StatusIndicator>
39
+ <StatusIndicatorDot state="active" />
40
+ <StatusIndicatorLabel>Active</StatusIndicatorLabel>
41
+ </StatusIndicator>
42
+ <StatusIndicator>
43
+ <StatusIndicatorDot state="fixing" />
44
+ <StatusIndicatorLabel>Fixing</StatusIndicatorLabel>
45
+ </StatusIndicator>
46
+ <StatusIndicator>
47
+ <StatusIndicatorDot state="down" />
48
+ <StatusIndicatorLabel>Down</StatusIndicatorLabel>
49
+ </StatusIndicator>
50
+ <StatusIndicator>
51
+ <StatusIndicatorDot state="idle" />
52
+ <StatusIndicatorLabel>Idle</StatusIndicatorLabel>
53
+ </StatusIndicator>
54
+ </div>`,
55
+ },
56
+ },
57
+ },
58
+ render: () => (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "active" }), _jsx(StatusIndicatorLabel, { children: "Active" })] }), _jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "fixing" }), _jsx(StatusIndicatorLabel, { children: "Fixing" })] }), _jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "down" }), _jsx(StatusIndicatorLabel, { children: "Down" })] }), _jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "idle" }), _jsx(StatusIndicatorLabel, { children: "Idle" })] })] })),
59
+ };
60
+ export const Sizes = {
61
+ parameters: {
62
+ docs: {
63
+ source: {
64
+ code: `import { StatusIndicator, StatusIndicatorDot, StatusIndicatorLabel } from '@wheelhouse/ui';
65
+
66
+ <div className="flex items-end gap-6">
67
+ <StatusIndicator>
68
+ <StatusIndicatorDot state="active" size="sm" />
69
+ <StatusIndicatorLabel>Small</StatusIndicatorLabel>
70
+ </StatusIndicator>
71
+ <StatusIndicator>
72
+ <StatusIndicatorDot state="active" size="md" />
73
+ <StatusIndicatorLabel>Medium</StatusIndicatorLabel>
74
+ </StatusIndicator>
75
+ <StatusIndicator>
76
+ <StatusIndicatorDot state="active" size="lg" />
77
+ <StatusIndicatorLabel>Large</StatusIndicatorLabel>
78
+ </StatusIndicator>
79
+ </div>`,
80
+ },
81
+ },
82
+ },
83
+ render: () => (_jsxs("div", { className: "flex items-end gap-6", children: [_jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "active", size: "sm" }), _jsx(StatusIndicatorLabel, { children: "Small" })] }), _jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "active", size: "md" }), _jsx(StatusIndicatorLabel, { children: "Medium" })] }), _jsxs(StatusIndicator, { children: [_jsx(StatusIndicatorDot, { state: "active", size: "lg" }), _jsx(StatusIndicatorLabel, { children: "Large" })] })] })),
84
+ };
85
+ export const DotOnly = {
86
+ parameters: {
87
+ docs: {
88
+ description: { story: 'Use **StatusIndicatorDot** without the shell when the dot sits inside another control (e.g. button, table cell).' },
89
+ source: {
90
+ code: `import { StatusIndicatorDot } from '@wheelhouse/ui';
91
+
92
+ <StatusIndicatorDot state="active" />`,
93
+ },
94
+ },
95
+ },
96
+ render: () => _jsx(StatusIndicatorDot, { state: "active" }),
97
+ };
@@ -0,0 +1,2 @@
1
+ export { Switch } from './switch';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ export { Switch } from './switch';
@@ -0,0 +1,13 @@
1
+ import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
2
+ /**
3
+ * Props for `Switch`. Inherits additional behavior from
4
+ * [Base UI Switch](https://base-ui.com/react/components/switch).
5
+ */
6
+ export type SwitchProps = SwitchPrimitive.Root.Props & {
7
+ size?: 'sm' | 'default';
8
+ };
9
+ declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & {
10
+ size?: 'sm' | 'default';
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export { Switch };
13
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIlE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CAAE,CAAC;AAEnF,iBAAS,MAAM,CAAC,EACZ,SAAS,EACT,IAAW,EACX,GAAG,KAAK,EACX,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,GAAG;IAC5B,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC3B,2CAiBA;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
4
+ import { cn } from '../../lib/utils';
5
+ function Switch({ className, size = 'sm', ...props }) {
6
+ return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-size": size, className: cn('peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50', className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground" }) }));
7
+ }
8
+ export { Switch };