@devalok/shilp-sutra 0.1.0

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 (488) hide show
  1. package/dist/composed/avatar-group.d.ts +17 -0
  2. package/dist/composed/avatar-group.d.ts.map +1 -0
  3. package/dist/composed/avatar-group.js +103 -0
  4. package/dist/composed/command-palette.d.ts +29 -0
  5. package/dist/composed/command-palette.d.ts.map +1 -0
  6. package/dist/composed/command-palette.js +215 -0
  7. package/dist/composed/content-card.d.ts +15 -0
  8. package/dist/composed/content-card.d.ts.map +1 -0
  9. package/dist/composed/content-card.js +108 -0
  10. package/dist/composed/date-picker/calendar-grid.d.ts +21 -0
  11. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -0
  12. package/dist/composed/date-picker/calendar-grid.js +173 -0
  13. package/dist/composed/date-picker/date-picker.d.ts +14 -0
  14. package/dist/composed/date-picker/date-picker.d.ts.map +1 -0
  15. package/dist/composed/date-picker/date-picker.js +123 -0
  16. package/dist/composed/date-picker/date-range-picker.d.ts +23 -0
  17. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -0
  18. package/dist/composed/date-picker/date-range-picker.js +166 -0
  19. package/dist/composed/date-picker/date-time-picker.d.ts +24 -0
  20. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -0
  21. package/dist/composed/date-picker/date-time-picker.js +192 -0
  22. package/dist/composed/date-picker/index.d.ts +18 -0
  23. package/dist/composed/date-picker/index.d.ts.map +1 -0
  24. package/dist/composed/date-picker/month-picker.d.ts +10 -0
  25. package/dist/composed/date-picker/month-picker.d.ts.map +1 -0
  26. package/dist/composed/date-picker/month-picker.js +52 -0
  27. package/dist/composed/date-picker/presets.d.ts +9 -0
  28. package/dist/composed/date-picker/presets.d.ts.map +1 -0
  29. package/dist/composed/date-picker/presets.js +83 -0
  30. package/dist/composed/date-picker/time-picker.d.ts +24 -0
  31. package/dist/composed/date-picker/time-picker.d.ts.map +1 -0
  32. package/dist/composed/date-picker/time-picker.js +180 -0
  33. package/dist/composed/date-picker/use-calendar.d.ts +9 -0
  34. package/dist/composed/date-picker/use-calendar.d.ts.map +1 -0
  35. package/dist/composed/date-picker/use-calendar.js +16 -0
  36. package/dist/composed/date-picker/year-picker.d.ts +10 -0
  37. package/dist/composed/date-picker/year-picker.d.ts.map +1 -0
  38. package/dist/composed/date-picker/year-picker.js +44 -0
  39. package/dist/composed/empty-state.d.ts +12 -0
  40. package/dist/composed/empty-state.d.ts.map +1 -0
  41. package/dist/composed/empty-state.js +74 -0
  42. package/dist/composed/error-boundary.d.ts +8 -0
  43. package/dist/composed/error-boundary.d.ts.map +1 -0
  44. package/dist/composed/error-boundary.js +114 -0
  45. package/dist/composed/global-loading.d.ts +7 -0
  46. package/dist/composed/global-loading.d.ts.map +1 -0
  47. package/dist/composed/global-loading.js +43 -0
  48. package/dist/composed/index.d.ts +28 -0
  49. package/dist/composed/index.d.ts.map +1 -0
  50. package/dist/composed/index.js +54 -0
  51. package/dist/composed/lib/string-utils.d.ts +6 -0
  52. package/dist/composed/lib/string-utils.d.ts.map +1 -0
  53. package/dist/composed/lib/string-utils.js +7 -0
  54. package/dist/composed/loading-skeleton.d.ts +22 -0
  55. package/dist/composed/loading-skeleton.d.ts.map +1 -0
  56. package/dist/composed/loading-skeleton.js +164 -0
  57. package/dist/composed/member-picker.d.ts +17 -0
  58. package/dist/composed/member-picker.d.ts.map +1 -0
  59. package/dist/composed/member-picker.js +81 -0
  60. package/dist/composed/page-header.d.ts +15 -0
  61. package/dist/composed/page-header.d.ts.map +1 -0
  62. package/dist/composed/page-header.js +65 -0
  63. package/dist/composed/page-skeletons.d.ts +6 -0
  64. package/dist/composed/page-skeletons.d.ts.map +1 -0
  65. package/dist/composed/page-skeletons.js +128 -0
  66. package/dist/composed/priority-indicator.d.ts +12 -0
  67. package/dist/composed/priority-indicator.d.ts.map +1 -0
  68. package/dist/composed/priority-indicator.js +86 -0
  69. package/dist/composed/rich-text-editor.d.ts +16 -0
  70. package/dist/composed/rich-text-editor.d.ts.map +1 -0
  71. package/dist/composed/rich-text-editor.js +222 -0
  72. package/dist/composed/status-badge.d.ts +13 -0
  73. package/dist/composed/status-badge.d.ts.map +1 -0
  74. package/dist/composed/status-badge.js +69 -0
  75. package/dist/hooks/index.d.ts +4 -0
  76. package/dist/hooks/index.d.ts.map +1 -0
  77. package/dist/hooks/use-color-mode.d.ts +7 -0
  78. package/dist/hooks/use-color-mode.d.ts.map +1 -0
  79. package/dist/hooks/use-color-mode.js +23 -0
  80. package/dist/hooks/use-mobile.d.ts +2 -0
  81. package/dist/hooks/use-mobile.d.ts.map +1 -0
  82. package/dist/hooks/use-mobile.js +14 -0
  83. package/dist/hooks/use-toast.d.ts +46 -0
  84. package/dist/hooks/use-toast.d.ts.map +1 -0
  85. package/dist/hooks/use-toast.js +97 -0
  86. package/dist/primitives/_internal/number.d.ts +7 -0
  87. package/dist/primitives/_internal/number.d.ts.map +1 -0
  88. package/dist/primitives/_internal/number.js +6 -0
  89. package/dist/primitives/_internal/primitive.d.ts +17 -0
  90. package/dist/primitives/_internal/primitive.d.ts.map +1 -0
  91. package/dist/primitives/_internal/primitive.js +9 -0
  92. package/dist/primitives/_internal/react-arrow.d.ts +14 -0
  93. package/dist/primitives/_internal/react-arrow.d.ts.map +1 -0
  94. package/dist/primitives/_internal/react-arrow.js +24 -0
  95. package/dist/primitives/_internal/react-collection.d.ts +22 -0
  96. package/dist/primitives/_internal/react-collection.d.ts.map +1 -0
  97. package/dist/primitives/_internal/react-collection.js +48 -0
  98. package/dist/primitives/_internal/react-compose-refs.d.ts +10 -0
  99. package/dist/primitives/_internal/react-compose-refs.d.ts.map +1 -0
  100. package/dist/primitives/_internal/react-compose-refs.js +29 -0
  101. package/dist/primitives/_internal/react-context.d.ts +25 -0
  102. package/dist/primitives/_internal/react-context.d.ts.map +1 -0
  103. package/dist/primitives/_internal/react-context.js +74 -0
  104. package/dist/primitives/_internal/react-direction.d.ts +16 -0
  105. package/dist/primitives/_internal/react-direction.d.ts.map +1 -0
  106. package/dist/primitives/_internal/react-direction.js +10 -0
  107. package/dist/primitives/_internal/react-dismissable-layer.d.ts +30 -0
  108. package/dist/primitives/_internal/react-dismissable-layer.d.ts.map +1 -0
  109. package/dist/primitives/_internal/react-dismissable-layer.js +131 -0
  110. package/dist/primitives/_internal/react-focus-guards.d.ts +12 -0
  111. package/dist/primitives/_internal/react-focus-guards.d.ts.map +1 -0
  112. package/dist/primitives/_internal/react-focus-guards.js +17 -0
  113. package/dist/primitives/_internal/react-focus-scope.d.ts +18 -0
  114. package/dist/primitives/_internal/react-focus-scope.d.ts.map +1 -0
  115. package/dist/primitives/_internal/react-focus-scope.js +137 -0
  116. package/dist/primitives/_internal/react-id.d.ts +7 -0
  117. package/dist/primitives/_internal/react-id.d.ts.map +1 -0
  118. package/dist/primitives/_internal/react-id.js +14 -0
  119. package/dist/primitives/_internal/react-popper.d.ts +50 -0
  120. package/dist/primitives/_internal/react-popper.d.ts.map +1 -0
  121. package/dist/primitives/_internal/react-popper.js +199 -0
  122. package/dist/primitives/_internal/react-portal.d.ts +15 -0
  123. package/dist/primitives/_internal/react-portal.d.ts.map +1 -0
  124. package/dist/primitives/_internal/react-portal.js +16 -0
  125. package/dist/primitives/_internal/react-presence.d.ts +16 -0
  126. package/dist/primitives/_internal/react-presence.d.ts.map +1 -0
  127. package/dist/primitives/_internal/react-presence.js +71 -0
  128. package/dist/primitives/_internal/react-primitive.d.ts +20 -0
  129. package/dist/primitives/_internal/react-primitive.d.ts.map +1 -0
  130. package/dist/primitives/_internal/react-primitive.js +36 -0
  131. package/dist/primitives/_internal/react-use-callback-ref.d.ts +7 -0
  132. package/dist/primitives/_internal/react-use-callback-ref.d.ts.map +1 -0
  133. package/dist/primitives/_internal/react-use-callback-ref.js +13 -0
  134. package/dist/primitives/_internal/react-use-controllable-state.d.ts +16 -0
  135. package/dist/primitives/_internal/react-use-controllable-state.d.ts.map +1 -0
  136. package/dist/primitives/_internal/react-use-controllable-state.js +44 -0
  137. package/dist/primitives/_internal/react-use-effect-event.d.ts +8 -0
  138. package/dist/primitives/_internal/react-use-effect-event.d.ts.map +1 -0
  139. package/dist/primitives/_internal/react-use-escape-keydown.d.ts +7 -0
  140. package/dist/primitives/_internal/react-use-escape-keydown.d.ts.map +1 -0
  141. package/dist/primitives/_internal/react-use-escape-keydown.js +14 -0
  142. package/dist/primitives/_internal/react-use-is-hydrated.d.ts +7 -0
  143. package/dist/primitives/_internal/react-use-is-hydrated.d.ts.map +1 -0
  144. package/dist/primitives/_internal/react-use-is-hydrated.js +15 -0
  145. package/dist/primitives/_internal/react-use-layout-effect.d.ts +8 -0
  146. package/dist/primitives/_internal/react-use-layout-effect.d.ts.map +1 -0
  147. package/dist/primitives/_internal/react-use-layout-effect.js +6 -0
  148. package/dist/primitives/_internal/react-use-previous.d.ts +7 -0
  149. package/dist/primitives/_internal/react-use-previous.d.ts.map +1 -0
  150. package/dist/primitives/_internal/react-use-previous.js +8 -0
  151. package/dist/primitives/_internal/react-use-rect.d.ts +4 -0
  152. package/dist/primitives/_internal/react-use-rect.d.ts.map +1 -0
  153. package/dist/primitives/_internal/react-use-size.d.ts +10 -0
  154. package/dist/primitives/_internal/react-use-size.d.ts.map +1 -0
  155. package/dist/primitives/_internal/react-use-size.js +27 -0
  156. package/dist/primitives/_internal/rect.d.ts +12 -0
  157. package/dist/primitives/_internal/rect.d.ts.map +1 -0
  158. package/dist/primitives/react-accordion.js +239 -0
  159. package/dist/primitives/react-alert-dialog.js +127 -0
  160. package/dist/primitives/react-aspect-ratio.js +43 -0
  161. package/dist/primitives/react-avatar.js +75 -0
  162. package/dist/primitives/react-checkbox.js +251 -0
  163. package/dist/primitives/react-collapsible.js +120 -0
  164. package/dist/primitives/react-context-menu.js +240 -0
  165. package/dist/primitives/react-dialog.js +262 -0
  166. package/dist/primitives/react-dropdown-menu.js +227 -0
  167. package/dist/primitives/react-hover-card.js +187 -0
  168. package/dist/primitives/react-label.js +20 -0
  169. package/dist/primitives/react-menu.js +652 -0
  170. package/dist/primitives/react-menubar.js +355 -0
  171. package/dist/primitives/react-navigation-menu.js +607 -0
  172. package/dist/primitives/react-popover.js +243 -0
  173. package/dist/primitives/react-progress.js +84 -0
  174. package/dist/primitives/react-radio-group.js +238 -0
  175. package/dist/primitives/react-roving-focus.js +183 -0
  176. package/dist/primitives/react-select.js +862 -0
  177. package/dist/primitives/react-separator.js +24 -0
  178. package/dist/primitives/react-slider.js +437 -0
  179. package/dist/primitives/react-slot.d.ts +27 -0
  180. package/dist/primitives/react-slot.d.ts.map +1 -0
  181. package/dist/primitives/react-slot.js +70 -0
  182. package/dist/primitives/react-switch.js +132 -0
  183. package/dist/primitives/react-tabs.js +163 -0
  184. package/dist/primitives/react-toast.js +446 -0
  185. package/dist/primitives/react-toggle-group.js +137 -0
  186. package/dist/primitives/react-toggle.js +33 -0
  187. package/dist/primitives/react-tooltip.js +338 -0
  188. package/dist/primitives/react-visually-hidden.js +32 -0
  189. package/dist/shell/app-command-palette.d.ts +35 -0
  190. package/dist/shell/app-command-palette.d.ts.map +1 -0
  191. package/dist/shell/app-command-palette.js +196 -0
  192. package/dist/shell/bottom-navbar.d.ts +35 -0
  193. package/dist/shell/bottom-navbar.d.ts.map +1 -0
  194. package/dist/shell/bottom-navbar.js +160 -0
  195. package/dist/shell/index.d.ts +7 -0
  196. package/dist/shell/index.d.ts.map +1 -0
  197. package/dist/shell/index.js +14 -0
  198. package/dist/shell/notification-center.d.ts +50 -0
  199. package/dist/shell/notification-center.d.ts.map +1 -0
  200. package/dist/shell/notification-center.js +221 -0
  201. package/dist/shell/notification-preferences.d.ts +41 -0
  202. package/dist/shell/notification-preferences.d.ts.map +1 -0
  203. package/dist/shell/notification-preferences.js +183 -0
  204. package/dist/shell/sidebar.d.ts +51 -0
  205. package/dist/shell/sidebar.d.ts.map +1 -0
  206. package/dist/shell/sidebar.js +101 -0
  207. package/dist/shell/top-bar.d.ts +33 -0
  208. package/dist/shell/top-bar.d.ts.map +1 -0
  209. package/dist/shell/top-bar.js +140 -0
  210. package/dist/tailwind/index.d.ts +2 -0
  211. package/dist/tailwind/index.d.ts.map +1 -0
  212. package/dist/tailwind/index.js +4 -0
  213. package/dist/tailwind/preset.d.ts +4 -0
  214. package/dist/tailwind/preset.d.ts.map +1 -0
  215. package/dist/tailwind/preset.js +310 -0
  216. package/dist/tokens/index.css +3 -0
  217. package/dist/tokens/primitives.css +189 -0
  218. package/dist/tokens/semantic.css +426 -0
  219. package/dist/tokens/typography-semantic.css +100 -0
  220. package/dist/tokens/typography.css +393 -0
  221. package/dist/ui/accordion.d.ts +53 -0
  222. package/dist/ui/accordion.d.ts.map +1 -0
  223. package/dist/ui/accordion.js +46 -0
  224. package/dist/ui/alert-dialog.d.ts +21 -0
  225. package/dist/ui/alert-dialog.d.ts.map +1 -0
  226. package/dist/ui/alert-dialog.js +117 -0
  227. package/dist/ui/alert.d.ts +47 -0
  228. package/dist/ui/alert.d.ts.map +1 -0
  229. package/dist/ui/alert.js +52 -0
  230. package/dist/ui/aspect-ratio.d.ts +4 -0
  231. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  232. package/dist/ui/aspect-ratio.js +6 -0
  233. package/dist/ui/autocomplete.d.ts +49 -0
  234. package/dist/ui/autocomplete.d.ts.map +1 -0
  235. package/dist/ui/autocomplete.js +124 -0
  236. package/dist/ui/avatar.d.ts +51 -0
  237. package/dist/ui/avatar.d.ts.map +1 -0
  238. package/dist/ui/avatar.js +91 -0
  239. package/dist/ui/badge.d.ts +43 -0
  240. package/dist/ui/badge.d.ts.map +1 -0
  241. package/dist/ui/badge.js +64 -0
  242. package/dist/ui/banner.d.ts +43 -0
  243. package/dist/ui/banner.d.ts.map +1 -0
  244. package/dist/ui/banner.js +50 -0
  245. package/dist/ui/breadcrumb.d.ts +20 -0
  246. package/dist/ui/breadcrumb.d.ts.map +1 -0
  247. package/dist/ui/breadcrumb.js +83 -0
  248. package/dist/ui/button-group.d.ts +51 -0
  249. package/dist/ui/button-group.d.ts.map +1 -0
  250. package/dist/ui/button-group.js +41 -0
  251. package/dist/ui/button.d.ts +63 -0
  252. package/dist/ui/button.d.ts.map +1 -0
  253. package/dist/ui/button.js +105 -0
  254. package/dist/ui/card.d.ts +64 -0
  255. package/dist/ui/card.d.ts.map +1 -0
  256. package/dist/ui/card.js +79 -0
  257. package/dist/ui/charts/_internal/animation.d.ts +5 -0
  258. package/dist/ui/charts/_internal/animation.d.ts.map +1 -0
  259. package/dist/ui/charts/_internal/animation.js +17 -0
  260. package/dist/ui/charts/_internal/axes.d.ts +17 -0
  261. package/dist/ui/charts/_internal/axes.d.ts.map +1 -0
  262. package/dist/ui/charts/_internal/axes.js +41 -0
  263. package/dist/ui/charts/_internal/colors.d.ts +8 -0
  264. package/dist/ui/charts/_internal/colors.d.ts.map +1 -0
  265. package/dist/ui/charts/_internal/colors.js +20 -0
  266. package/dist/ui/charts/_internal/grid-lines.d.ts +16 -0
  267. package/dist/ui/charts/_internal/grid-lines.d.ts.map +1 -0
  268. package/dist/ui/charts/_internal/grid-lines.js +42 -0
  269. package/dist/ui/charts/_internal/legend.d.ts +15 -0
  270. package/dist/ui/charts/_internal/legend.d.ts.map +1 -0
  271. package/dist/ui/charts/_internal/legend.js +28 -0
  272. package/dist/ui/charts/_internal/scales.d.ts +5 -0
  273. package/dist/ui/charts/_internal/scales.d.ts.map +1 -0
  274. package/dist/ui/charts/_internal/tooltip.d.ts +23 -0
  275. package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -0
  276. package/dist/ui/charts/_internal/tooltip.js +38 -0
  277. package/dist/ui/charts/_internal/types.d.ts +17 -0
  278. package/dist/ui/charts/_internal/types.d.ts.map +1 -0
  279. package/dist/ui/charts/_internal/types.js +9 -0
  280. package/dist/ui/charts/area-chart.d.ts +39 -0
  281. package/dist/ui/charts/area-chart.d.ts.map +1 -0
  282. package/dist/ui/charts/area-chart.js +244 -0
  283. package/dist/ui/charts/bar-chart.d.ts +41 -0
  284. package/dist/ui/charts/bar-chart.d.ts.map +1 -0
  285. package/dist/ui/charts/bar-chart.js +152 -0
  286. package/dist/ui/charts/chart-container.d.ts +20 -0
  287. package/dist/ui/charts/chart-container.d.ts.map +1 -0
  288. package/dist/ui/charts/chart-container.js +26 -0
  289. package/dist/ui/charts/gauge-chart.d.ts +32 -0
  290. package/dist/ui/charts/gauge-chart.d.ts.map +1 -0
  291. package/dist/ui/charts/gauge-chart.js +71 -0
  292. package/dist/ui/charts/index.d.ts +10 -0
  293. package/dist/ui/charts/index.d.ts.map +1 -0
  294. package/dist/ui/charts/line-chart.d.ts +37 -0
  295. package/dist/ui/charts/line-chart.d.ts.map +1 -0
  296. package/dist/ui/charts/line-chart.js +162 -0
  297. package/dist/ui/charts/pie-chart.d.ts +37 -0
  298. package/dist/ui/charts/pie-chart.d.ts.map +1 -0
  299. package/dist/ui/charts/pie-chart.js +131 -0
  300. package/dist/ui/charts/radar-chart.d.ts +34 -0
  301. package/dist/ui/charts/radar-chart.d.ts.map +1 -0
  302. package/dist/ui/charts/radar-chart.js +222 -0
  303. package/dist/ui/charts/sparkline.d.ts +22 -0
  304. package/dist/ui/charts/sparkline.d.ts.map +1 -0
  305. package/dist/ui/charts/sparkline.js +123 -0
  306. package/dist/ui/checkbox.d.ts +36 -0
  307. package/dist/ui/checkbox.d.ts.map +1 -0
  308. package/dist/ui/checkbox.js +33 -0
  309. package/dist/ui/chip.d.ts +66 -0
  310. package/dist/ui/chip.d.ts.map +1 -0
  311. package/dist/ui/chip.js +105 -0
  312. package/dist/ui/code.d.ts +30 -0
  313. package/dist/ui/code.d.ts.map +1 -0
  314. package/dist/ui/code.js +32 -0
  315. package/dist/ui/collapsible.d.ts +7 -0
  316. package/dist/ui/collapsible.d.ts.map +1 -0
  317. package/dist/ui/collapsible.js +21 -0
  318. package/dist/ui/combobox.d.ts +76 -0
  319. package/dist/ui/combobox.d.ts.map +1 -0
  320. package/dist/ui/combobox.js +286 -0
  321. package/dist/ui/container.d.ts +10 -0
  322. package/dist/ui/container.d.ts.map +1 -0
  323. package/dist/ui/container.js +24 -0
  324. package/dist/ui/context-menu.d.ts +28 -0
  325. package/dist/ui/context-menu.d.ts.map +1 -0
  326. package/dist/ui/context-menu.js +145 -0
  327. package/dist/ui/data-table-toolbar.d.ts +16 -0
  328. package/dist/ui/data-table-toolbar.d.ts.map +1 -0
  329. package/dist/ui/data-table-toolbar.js +136 -0
  330. package/dist/ui/data-table.d.ts +111 -0
  331. package/dist/ui/data-table.d.ts.map +1 -0
  332. package/dist/ui/data-table.js +491 -0
  333. package/dist/ui/dialog.d.ts +74 -0
  334. package/dist/ui/dialog.d.ts.map +1 -0
  335. package/dist/ui/dialog.js +110 -0
  336. package/dist/ui/dropdown-menu.d.ts +88 -0
  337. package/dist/ui/dropdown-menu.d.ts.map +1 -0
  338. package/dist/ui/dropdown-menu.js +144 -0
  339. package/dist/ui/file-upload.d.ts +67 -0
  340. package/dist/ui/file-upload.d.ts.map +1 -0
  341. package/dist/ui/file-upload.js +226 -0
  342. package/dist/ui/form.d.ts +56 -0
  343. package/dist/ui/form.d.ts.map +1 -0
  344. package/dist/ui/form.js +46 -0
  345. package/dist/ui/hover-card.d.ts +7 -0
  346. package/dist/ui/hover-card.d.ts.map +1 -0
  347. package/dist/ui/hover-card.js +23 -0
  348. package/dist/ui/icon-button.d.ts +46 -0
  349. package/dist/ui/icon-button.d.ts.map +1 -0
  350. package/dist/ui/icon-button.js +26 -0
  351. package/dist/ui/index.d.ts +68 -0
  352. package/dist/ui/index.d.ts.map +1 -0
  353. package/dist/ui/index.js +344 -0
  354. package/dist/ui/input-otp.d.ts +35 -0
  355. package/dist/ui/input-otp.d.ts.map +1 -0
  356. package/dist/ui/input-otp.js +48 -0
  357. package/dist/ui/input.d.ts +44 -0
  358. package/dist/ui/input.d.ts.map +1 -0
  359. package/dist/ui/input.js +58 -0
  360. package/dist/ui/label.d.ts +8 -0
  361. package/dist/ui/label.d.ts.map +1 -0
  362. package/dist/ui/label.js +23 -0
  363. package/dist/ui/lib/motion.d.ts +10 -0
  364. package/dist/ui/lib/motion.d.ts.map +1 -0
  365. package/dist/ui/lib/motion.js +32 -0
  366. package/dist/ui/lib/slot.d.ts +8 -0
  367. package/dist/ui/lib/slot.d.ts.map +1 -0
  368. package/dist/ui/lib/use-reduced-motion.d.ts +3 -0
  369. package/dist/ui/lib/use-reduced-motion.d.ts.map +1 -0
  370. package/dist/ui/lib/use-reduced-motion.js +14 -0
  371. package/dist/ui/lib/use-ripple.d.ts +13 -0
  372. package/dist/ui/lib/use-ripple.d.ts.map +1 -0
  373. package/dist/ui/lib/use-ripple.js +13 -0
  374. package/dist/ui/lib/utils.d.ts +3 -0
  375. package/dist/ui/lib/utils.d.ts.map +1 -0
  376. package/dist/ui/lib/utils.js +15 -0
  377. package/dist/ui/link.d.ts +8 -0
  378. package/dist/ui/link.d.ts.map +1 -0
  379. package/dist/ui/link.js +24 -0
  380. package/dist/ui/menubar.d.ts +29 -0
  381. package/dist/ui/menubar.d.ts.map +1 -0
  382. package/dist/ui/menubar.js +176 -0
  383. package/dist/ui/navigation-menu.d.ts +12 -0
  384. package/dist/ui/navigation-menu.d.ts.map +1 -0
  385. package/dist/ui/navigation-menu.js +103 -0
  386. package/dist/ui/number-input.d.ts +40 -0
  387. package/dist/ui/number-input.d.ts.map +1 -0
  388. package/dist/ui/number-input.js +80 -0
  389. package/dist/ui/pagination.d.ts +74 -0
  390. package/dist/ui/pagination.d.ts.map +1 -0
  391. package/dist/ui/pagination.js +159 -0
  392. package/dist/ui/popover.d.ts +8 -0
  393. package/dist/ui/popover.d.ts.map +1 -0
  394. package/dist/ui/popover.js +24 -0
  395. package/dist/ui/progress.d.ts +49 -0
  396. package/dist/ui/progress.d.ts.map +1 -0
  397. package/dist/ui/progress.js +75 -0
  398. package/dist/ui/radio.d.ts +6 -0
  399. package/dist/ui/radio.d.ts.map +1 -0
  400. package/dist/ui/radio.js +29 -0
  401. package/dist/ui/search-input.d.ts +44 -0
  402. package/dist/ui/search-input.d.ts.map +1 -0
  403. package/dist/ui/search-input.js +63 -0
  404. package/dist/ui/segmented-control.d.ts +122 -0
  405. package/dist/ui/segmented-control.d.ts.map +1 -0
  406. package/dist/ui/segmented-control.js +270 -0
  407. package/dist/ui/select.d.ts +49 -0
  408. package/dist/ui/select.d.ts.map +1 -0
  409. package/dist/ui/select.js +132 -0
  410. package/dist/ui/separator.d.ts +5 -0
  411. package/dist/ui/separator.d.ts.map +1 -0
  412. package/dist/ui/separator.js +24 -0
  413. package/dist/ui/sheet.d.ts +108 -0
  414. package/dist/ui/sheet.d.ts.map +1 -0
  415. package/dist/ui/sheet.js +110 -0
  416. package/dist/ui/sidebar.d.ts +67 -0
  417. package/dist/ui/sidebar.d.ts.map +1 -0
  418. package/dist/ui/sidebar.js +562 -0
  419. package/dist/ui/skeleton.d.ts +40 -0
  420. package/dist/ui/skeleton.d.ts.map +1 -0
  421. package/dist/ui/skeleton.js +36 -0
  422. package/dist/ui/slider.d.ts +5 -0
  423. package/dist/ui/slider.d.ts.map +1 -0
  424. package/dist/ui/slider.js +29 -0
  425. package/dist/ui/spinner.d.ts +38 -0
  426. package/dist/ui/spinner.d.ts.map +1 -0
  427. package/dist/ui/spinner.js +47 -0
  428. package/dist/ui/stack.d.ts +15 -0
  429. package/dist/ui/stack.d.ts.map +1 -0
  430. package/dist/ui/stack.js +41 -0
  431. package/dist/ui/stat-card.d.ts +54 -0
  432. package/dist/ui/stat-card.d.ts.map +1 -0
  433. package/dist/ui/stat-card.js +52 -0
  434. package/dist/ui/stepper.d.ts +57 -0
  435. package/dist/ui/stepper.d.ts.map +1 -0
  436. package/dist/ui/stepper.js +90 -0
  437. package/dist/ui/switch.d.ts +5 -0
  438. package/dist/ui/switch.d.ts.map +1 -0
  439. package/dist/ui/switch.js +27 -0
  440. package/dist/ui/table.d.ts +11 -0
  441. package/dist/ui/table.d.ts.map +1 -0
  442. package/dist/ui/table.js +91 -0
  443. package/dist/ui/tabs.d.ts +81 -0
  444. package/dist/ui/tabs.d.ts.map +1 -0
  445. package/dist/ui/tabs.js +74 -0
  446. package/dist/ui/text.d.ts +47 -0
  447. package/dist/ui/text.d.ts.map +1 -0
  448. package/dist/ui/text.js +59 -0
  449. package/dist/ui/textarea.d.ts +40 -0
  450. package/dist/ui/textarea.d.ts.map +1 -0
  451. package/dist/ui/textarea.js +47 -0
  452. package/dist/ui/toast.d.ts +32 -0
  453. package/dist/ui/toast.d.ts.map +1 -0
  454. package/dist/ui/toast.js +98 -0
  455. package/dist/ui/toaster.d.ts +42 -0
  456. package/dist/ui/toaster.d.ts.map +1 -0
  457. package/dist/ui/toaster.js +23 -0
  458. package/dist/ui/toggle-group.d.ts +13 -0
  459. package/dist/ui/toggle-group.d.ts.map +1 -0
  460. package/dist/ui/toggle-group.js +40 -0
  461. package/dist/ui/toggle.d.ts +13 -0
  462. package/dist/ui/toggle.d.ts.map +1 -0
  463. package/dist/ui/toggle.js +37 -0
  464. package/dist/ui/tooltip.d.ts +8 -0
  465. package/dist/ui/tooltip.d.ts.map +1 -0
  466. package/dist/ui/tooltip.js +23 -0
  467. package/dist/ui/transitions.d.ts +16 -0
  468. package/dist/ui/transitions.d.ts.map +1 -0
  469. package/dist/ui/transitions.js +100 -0
  470. package/dist/ui/tree-view/index.d.ts +4 -0
  471. package/dist/ui/tree-view/index.d.ts.map +1 -0
  472. package/dist/ui/tree-view/tree-item.d.ts +22 -0
  473. package/dist/ui/tree-view/tree-item.d.ts.map +1 -0
  474. package/dist/ui/tree-view/tree-item.js +136 -0
  475. package/dist/ui/tree-view/tree-view.d.ts +29 -0
  476. package/dist/ui/tree-view/tree-view.d.ts.map +1 -0
  477. package/dist/ui/tree-view/tree-view.js +139 -0
  478. package/dist/ui/tree-view/use-tree.d.ts +26 -0
  479. package/dist/ui/tree-view/use-tree.d.ts.map +1 -0
  480. package/dist/ui/tree-view/use-tree.js +37 -0
  481. package/dist/ui/visually-hidden.d.ts +6 -0
  482. package/dist/ui/visually-hidden.d.ts.map +1 -0
  483. package/dist/ui/visually-hidden.js +10 -0
  484. package/fonts/GoogleSans-Italic-Variable.ttf +0 -0
  485. package/fonts/GoogleSans-Variable.ttf +0 -0
  486. package/fonts/Ranade-Variable.ttf +0 -0
  487. package/fonts/Ranade-VariableItalic.ttf +0 -0
  488. package/package.json +83 -0
@@ -0,0 +1,192 @@
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { format as U, setHours as y, setMinutes as k, setMonth as W, setYear as X } from "date-fns";
4
+ import { IconCalendarClock as Z } from "@tabler/icons-react";
5
+ import { cn as A } from "../../ui/lib/utils.js";
6
+ import { Popover as _, PopoverTrigger as F, PopoverContent as v } from "../../ui/popover.js";
7
+ import { CalendarGrid as C } from "./calendar-grid.js";
8
+ import { YearPicker as ee } from "./year-picker.js";
9
+ import { MonthPicker as te } from "./month-picker.js";
10
+ function Y(u) {
11
+ return u.toString().padStart(2, "0");
12
+ }
13
+ function w(u, e, s) {
14
+ const l = [];
15
+ for (let c = u; c <= e; c += s)
16
+ l.push(c);
17
+ return l;
18
+ }
19
+ const re = m.forwardRef(
20
+ function({
21
+ value: e,
22
+ onChange: s,
23
+ minDate: l,
24
+ maxDate: c,
25
+ disabledDates: T,
26
+ timeFormat: i = "12h",
27
+ minuteStep: D = 1,
28
+ placeholder: P = "Pick date & time",
29
+ className: R
30
+ }, O) {
31
+ const [b, j] = m.useState(!1), [M, g] = m.useState(e ?? /* @__PURE__ */ new Date()), [N, f] = m.useState("days");
32
+ m.useEffect(() => {
33
+ b || f("days");
34
+ }, [b]);
35
+ const d = e ? e.getHours() : 0, H = e ? e.getMinutes() : 0, S = d >= 12 ? "PM" : "AM", V = d === 0 ? 12 : d > 12 ? d - 12 : d, B = i === "12h" ? w(1, 12, 1) : w(0, 23, 1), E = w(0, 59, D), G = i === "12h" ? V : d, I = (t) => {
36
+ let o = y(t, e ? e.getHours() : d);
37
+ o = k(o, e ? e.getMinutes() : H), s == null || s(o);
38
+ }, $ = () => {
39
+ f((t) => t === "days" ? "months" : "years");
40
+ }, q = (t) => {
41
+ g((o) => W(o, t)), f("days");
42
+ }, z = (t) => {
43
+ g((o) => X(o, t)), f("months");
44
+ }, J = (t) => {
45
+ const o = e ? new Date(e) : /* @__PURE__ */ new Date();
46
+ let n = t;
47
+ i === "12h" && ((e ? S : "AM") === "AM" ? n = t === 12 ? 0 : t : n = t === 12 ? 12 : t + 12);
48
+ const p = y(o, n);
49
+ s == null || s(p);
50
+ }, K = (t) => {
51
+ const o = e ? new Date(e) : /* @__PURE__ */ new Date(), n = k(o, t);
52
+ s == null || s(n);
53
+ }, L = (t) => {
54
+ const o = e ? new Date(e) : /* @__PURE__ */ new Date(), n = o.getHours();
55
+ let p;
56
+ t === "AM" ? p = n >= 12 ? n - 12 : n : p = n < 12 ? n + 12 : n, s == null || s(y(o, p));
57
+ }, h = m.useMemo(() => e ? U(e, i === "12h" ? "MMM d, yyyy h:mm a" : "MMM d, yyyy HH:mm") : null, [e, i]), Q = () => {
58
+ switch (N) {
59
+ case "years":
60
+ return /* @__PURE__ */ r(
61
+ ee,
62
+ {
63
+ currentYear: M.getFullYear(),
64
+ selectedYear: e == null ? void 0 : e.getFullYear(),
65
+ onYearSelect: z,
66
+ minDate: l,
67
+ maxDate: c
68
+ }
69
+ );
70
+ case "months":
71
+ return /* @__PURE__ */ r(
72
+ te,
73
+ {
74
+ currentYear: M.getFullYear(),
75
+ selectedMonth: e == null ? void 0 : e.getMonth(),
76
+ onMonthSelect: q,
77
+ minDate: l,
78
+ maxDate: c
79
+ }
80
+ );
81
+ default:
82
+ return /* @__PURE__ */ r(
83
+ C,
84
+ {
85
+ currentMonth: M,
86
+ selected: e,
87
+ onSelect: I,
88
+ onMonthChange: g,
89
+ onHeaderClick: $,
90
+ disabledDates: T,
91
+ minDate: l,
92
+ maxDate: c
93
+ }
94
+ );
95
+ }
96
+ }, x = "h-ds-sm rounded-ds-md border border-border bg-layer-01 px-ds-02 text-ds-md text-text-primary transition-colors duration-fast-01 ease-productive-standard hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus cursor-pointer appearance-none";
97
+ return /* @__PURE__ */ a(_, { open: b, onOpenChange: j, children: [
98
+ /* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ a(
99
+ "button",
100
+ {
101
+ ref: O,
102
+ type: "button",
103
+ className: A(
104
+ "inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-border bg-layer-01 px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
105
+ "hover:border-border-strong",
106
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2",
107
+ R
108
+ ),
109
+ "aria-label": h ? `Selected: ${h}` : P,
110
+ children: [
111
+ /* @__PURE__ */ r(
112
+ Z,
113
+ {
114
+ className: "h-ico-sm w-ico-sm text-text-placeholder",
115
+ stroke: 1.5
116
+ }
117
+ ),
118
+ /* @__PURE__ */ r(
119
+ "span",
120
+ {
121
+ className: A(
122
+ "text-ds-md",
123
+ h ? "text-text-primary" : "text-text-placeholder"
124
+ ),
125
+ children: h ?? P
126
+ }
127
+ )
128
+ ]
129
+ }
130
+ ) }),
131
+ /* @__PURE__ */ r(
132
+ v,
133
+ {
134
+ className: "w-auto border-border bg-layer-01 p-ds-04",
135
+ align: "start",
136
+ sideOffset: 4,
137
+ children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-04", children: [
138
+ Q(),
139
+ N === "days" && /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02 border-t border-border pt-ds-04", children: [
140
+ /* @__PURE__ */ r("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "Time" }),
141
+ /* @__PURE__ */ a(
142
+ "select",
143
+ {
144
+ value: G ?? "",
145
+ onChange: (t) => J(Number(t.target.value)),
146
+ className: x,
147
+ "aria-label": "Hour",
148
+ children: [
149
+ !e && /* @__PURE__ */ r("option", { value: "", children: "--" }),
150
+ B.map((t) => /* @__PURE__ */ r("option", { value: t, children: i === "24h" ? Y(t) : t }, t))
151
+ ]
152
+ }
153
+ ),
154
+ /* @__PURE__ */ r("span", { className: "text-ds-md font-semibold text-text-placeholder", children: ":" }),
155
+ /* @__PURE__ */ a(
156
+ "select",
157
+ {
158
+ value: e ? H : "",
159
+ onChange: (t) => K(Number(t.target.value)),
160
+ className: x,
161
+ "aria-label": "Minute",
162
+ children: [
163
+ !e && /* @__PURE__ */ r("option", { value: "", children: "--" }),
164
+ E.map((t) => /* @__PURE__ */ r("option", { value: t, children: Y(t) }, t))
165
+ ]
166
+ }
167
+ ),
168
+ i === "12h" && /* @__PURE__ */ a(
169
+ "select",
170
+ {
171
+ value: e ? S : "",
172
+ onChange: (t) => L(t.target.value),
173
+ className: x,
174
+ "aria-label": "AM or PM",
175
+ children: [
176
+ !e && /* @__PURE__ */ r("option", { value: "", children: "--" }),
177
+ /* @__PURE__ */ r("option", { value: "AM", children: "AM" }),
178
+ /* @__PURE__ */ r("option", { value: "PM", children: "PM" })
179
+ ]
180
+ }
181
+ )
182
+ ] })
183
+ ] })
184
+ }
185
+ )
186
+ ] });
187
+ }
188
+ );
189
+ re.displayName = "DateTimePicker";
190
+ export {
191
+ re as DateTimePicker
192
+ };
@@ -0,0 +1,18 @@
1
+ export { CalendarGrid } from './calendar-grid';
2
+ export type { CalendarGridProps } from './calendar-grid';
3
+ export { DatePicker } from './date-picker';
4
+ export type { DatePickerProps } from './date-picker';
5
+ export { DateRangePicker } from './date-range-picker';
6
+ export type { DateRangePickerProps } from './date-range-picker';
7
+ export { YearPicker } from './year-picker';
8
+ export type { YearPickerProps } from './year-picker';
9
+ export { MonthPicker } from './month-picker';
10
+ export type { MonthPickerProps } from './month-picker';
11
+ export { TimePicker } from './time-picker';
12
+ export type { TimePickerProps } from './time-picker';
13
+ export { DateTimePicker } from './date-time-picker';
14
+ export type { DateTimePickerProps } from './date-time-picker';
15
+ export { useCalendar } from './use-calendar';
16
+ export { Presets } from './presets';
17
+ export type { PresetsProps, PresetKey } from './presets';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACrD,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface MonthPickerProps {
3
+ currentYear: number;
4
+ selectedMonth?: number;
5
+ onMonthSelect: (month: number) => void;
6
+ minDate?: Date;
7
+ maxDate?: Date;
8
+ }
9
+ export declare const MonthPicker: React.ForwardRefExoticComponent<MonthPickerProps & React.RefAttributes<HTMLDivElement>>;
10
+ //# sourceMappingURL=month-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"month-picker.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/month-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;CACf;AAED,eAAO,MAAM,WAAW,yFAkDvB,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { cn as u } from "../../ui/lib/utils.js";
4
+ const g = [
5
+ "Jan",
6
+ "Feb",
7
+ "Mar",
8
+ "Apr",
9
+ "May",
10
+ "Jun",
11
+ "Jul",
12
+ "Aug",
13
+ "Sep",
14
+ "Oct",
15
+ "Nov",
16
+ "Dec"
17
+ ], h = m.forwardRef(
18
+ function({
19
+ currentYear: t,
20
+ selectedMonth: i,
21
+ onMonthSelect: c,
22
+ minDate: e,
23
+ maxDate: o
24
+ }, a) {
25
+ return /* @__PURE__ */ p("div", { ref: a, className: "w-[252px]", children: [
26
+ /* @__PURE__ */ r("div", { className: "text-center pb-ds-04 text-ds-md font-semibold text-text-primary", children: t }),
27
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-ds-02", children: g.map((n, s) => {
28
+ const d = s === i, l = e != null && (t < e.getFullYear() || t === e.getFullYear() && s < e.getMonth()) || o != null && (t > o.getFullYear() || t === o.getFullYear() && s > o.getMonth());
29
+ return /* @__PURE__ */ r(
30
+ "button",
31
+ {
32
+ type: "button",
33
+ disabled: l || !1,
34
+ onClick: () => !l && c(s),
35
+ className: u(
36
+ "h-ds-sm-plus rounded-ds-md text-ds-md transition-colors",
37
+ l && "opacity-[0.38] pointer-events-none cursor-not-allowed",
38
+ d && "bg-interactive text-text-on-color",
39
+ !d && !l && "hover:bg-field text-text-primary"
40
+ ),
41
+ children: n
42
+ },
43
+ n
44
+ );
45
+ }) })
46
+ ] });
47
+ }
48
+ );
49
+ h.displayName = "MonthPicker";
50
+ export {
51
+ h as MonthPicker
52
+ };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export type PresetKey = 'today' | 'yesterday' | 'last7days' | 'last30days' | 'thisMonth' | 'lastMonth' | 'thisYear';
3
+ export interface PresetsProps {
4
+ presets: PresetKey[];
5
+ onSelect: (start: Date, end: Date) => void;
6
+ className?: string;
7
+ }
8
+ export declare const Presets: React.ForwardRefExoticComponent<PresetsProps & React.RefAttributes<HTMLDivElement>>;
9
+ //# sourceMappingURL=presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/presets.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,MAAM,MAAM,SAAS,GACjB,OAAO,GACP,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,WAAW,GACX,UAAU,CAAA;AAEd,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,CAAA;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4DD,eAAO,MAAM,OAAO,qFA6BnB,CAAA"}
@@ -0,0 +1,83 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import * as b from "react";
3
+ import { endOfDay as e, startOfYear as w, subMonths as h, endOfMonth as d, startOfMonth as i, startOfDay as s, subDays as r } from "date-fns";
4
+ import { cn as c } from "../../ui/lib/utils.js";
5
+ const p = {
6
+ today: {
7
+ label: "Today",
8
+ getRange: () => {
9
+ const t = /* @__PURE__ */ new Date();
10
+ return { start: s(t), end: e(t) };
11
+ }
12
+ },
13
+ yesterday: {
14
+ label: "Yesterday",
15
+ getRange: () => {
16
+ const t = r(/* @__PURE__ */ new Date(), 1);
17
+ return { start: s(t), end: e(t) };
18
+ }
19
+ },
20
+ last7days: {
21
+ label: "Last 7 days",
22
+ getRange: () => {
23
+ const t = /* @__PURE__ */ new Date();
24
+ return { start: s(r(t, 6)), end: e(t) };
25
+ }
26
+ },
27
+ last30days: {
28
+ label: "Last 30 days",
29
+ getRange: () => {
30
+ const t = /* @__PURE__ */ new Date();
31
+ return { start: s(r(t, 29)), end: e(t) };
32
+ }
33
+ },
34
+ thisMonth: {
35
+ label: "This month",
36
+ getRange: () => {
37
+ const t = /* @__PURE__ */ new Date();
38
+ return { start: i(t), end: d(t) };
39
+ }
40
+ },
41
+ lastMonth: {
42
+ label: "Last month",
43
+ getRange: () => {
44
+ const n = h(/* @__PURE__ */ new Date(), 1);
45
+ return { start: i(n), end: d(n) };
46
+ }
47
+ },
48
+ thisYear: {
49
+ label: "This year",
50
+ getRange: () => {
51
+ const t = /* @__PURE__ */ new Date();
52
+ return { start: w(t), end: e(t) };
53
+ }
54
+ }
55
+ }, R = b.forwardRef(
56
+ function({ presets: n, onSelect: u, className: f }, g) {
57
+ return /* @__PURE__ */ l("div", { ref: g, className: c("flex flex-col gap-ds-01", f), children: n.map((o) => {
58
+ const a = p[o];
59
+ return a ? /* @__PURE__ */ l(
60
+ "button",
61
+ {
62
+ type: "button",
63
+ onClick: () => {
64
+ const { start: m, end: y } = a.getRange();
65
+ u(m, y);
66
+ },
67
+ className: c(
68
+ "h-ds-sm w-full rounded-ds-md px-ds-03 text-left text-ds-sm",
69
+ "text-text-primary transition-colors",
70
+ "hover:bg-field",
71
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus"
72
+ ),
73
+ children: a.label
74
+ },
75
+ o
76
+ ) : null;
77
+ }) });
78
+ }
79
+ );
80
+ R.displayName = "Presets";
81
+ export {
82
+ R as Presets
83
+ };
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ export interface TimePickerProps {
3
+ /** The currently selected time (as a Date object). */
4
+ value?: Date | null;
5
+ /** Callback fired when the time changes. */
6
+ onChange?: (date: Date) => void;
7
+ /** Display format: 12-hour with AM/PM or 24-hour. */
8
+ format?: '12h' | '24h';
9
+ /** Step interval for minutes column. */
10
+ minuteStep?: number;
11
+ /** Step interval for seconds column. */
12
+ secondStep?: number;
13
+ /** Whether to show the seconds column. */
14
+ showSeconds?: boolean;
15
+ /** Placeholder text when no value is set. */
16
+ placeholder?: string;
17
+ /** Additional class names for the trigger button. */
18
+ className?: string;
19
+ /** Whether the picker is disabled. */
20
+ disabled?: boolean;
21
+ }
22
+ declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLButtonElement>>;
23
+ export { TimePicker };
24
+ //# sourceMappingURL=time-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/time-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,MAAM,WAAW,eAAe;IAC9B,sDAAsD;IACtD,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACnB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAC/B,qDAAqD;IACrD,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACtB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAcD,QAAA,MAAM,UAAU,2FA4Qf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,180 @@
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ import * as P from "react";
3
+ import { format as O, setHours as S, setMinutes as $, setSeconds as j } from "date-fns";
4
+ import { IconClock as X } from "@tabler/icons-react";
5
+ import { cn as i } from "../../ui/lib/utils.js";
6
+ import { Popover as Y, PopoverTrigger as Z, PopoverContent as _ } from "../../ui/popover.js";
7
+ function w(f, s, c) {
8
+ const l = [];
9
+ for (let m = f; m <= s; m += c)
10
+ l.push(m);
11
+ return l;
12
+ }
13
+ function p(f) {
14
+ return f.toString().padStart(2, "0");
15
+ }
16
+ const F = P.forwardRef(
17
+ function({
18
+ value: s,
19
+ onChange: c,
20
+ format: l = "12h",
21
+ minuteStep: m = 1,
22
+ secondStep: B = 1,
23
+ showSeconds: x = !1,
24
+ placeholder: A = "Pick a time",
25
+ className: I,
26
+ disabled: T = !1
27
+ }, U) {
28
+ const [q, z] = P.useState(!1), o = s ? s.getHours() : null, v = s ? s.getMinutes() : null, D = s ? s.getSeconds() : null, k = o !== null ? o >= 12 ? "PM" : "AM" : null, E = o !== null ? o === 0 ? 12 : o > 12 ? o - 12 : o : null, G = l === "12h" ? w(1, 12, 1) : w(0, 23, 1), J = w(0, 59, m), K = w(0, 59, B), y = (e) => {
29
+ const t = s ? new Date(s) : /* @__PURE__ */ new Date();
30
+ let a = e.hours ?? t.getHours();
31
+ const H = e.minutes ?? t.getMinutes(), n = e.seconds ?? t.getSeconds();
32
+ l === "12h" && e.hours !== void 0 && ((e.ampm ?? k ?? "AM") === "AM" ? a = e.hours === 12 ? 0 : e.hours : a = e.hours === 12 ? 12 : e.hours + 12);
33
+ let u = S(t, a);
34
+ return u = $(u, H), u = j(u, n), u;
35
+ }, L = (e) => {
36
+ const t = y({ hours: e });
37
+ c == null || c(t);
38
+ }, Q = (e) => {
39
+ const t = y({ minutes: e });
40
+ c == null || c(t);
41
+ }, V = (e) => {
42
+ const t = y({ seconds: e });
43
+ c == null || c(t);
44
+ }, W = (e) => {
45
+ if (!s) {
46
+ const H = e === "AM" ? 0 : 12;
47
+ let n = /* @__PURE__ */ new Date();
48
+ n = S(n, H), n = $(n, 0), n = j(n, 0), c == null || c(n);
49
+ return;
50
+ }
51
+ const t = s.getHours();
52
+ let a;
53
+ e === "AM" ? a = t >= 12 ? t - 12 : t : a = t < 12 ? t + 12 : t, c == null || c(S(new Date(s), a));
54
+ }, b = P.useMemo(() => s ? l === "12h" ? O(s, x ? "h:mm:ss a" : "h:mm a") : O(s, x ? "HH:mm:ss" : "HH:mm") : null, [s, l, x]), R = l === "12h" ? E : o, M = "flex flex-col gap-ds-01 overflow-y-auto max-h-[200px] px-ds-01 scrollbar-thin", h = "flex h-ds-sm w-full items-center justify-center rounded-ds-md text-ds-md transition-colors duration-fast-01 ease-productive-standard cursor-pointer", N = "bg-interactive text-text-on-color", g = "text-text-primary hover:bg-field";
55
+ return /* @__PURE__ */ d(Y, { open: q, onOpenChange: z, children: [
56
+ /* @__PURE__ */ r(Z, { asChild: !0, children: /* @__PURE__ */ d(
57
+ "button",
58
+ {
59
+ ref: U,
60
+ type: "button",
61
+ disabled: T,
62
+ className: i(
63
+ "inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-border bg-layer-01 px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard",
64
+ "hover:border-border-strong",
65
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2",
66
+ T && "opacity-[0.38] pointer-events-none",
67
+ I
68
+ ),
69
+ "aria-label": b ? `Selected time: ${b}` : A,
70
+ children: [
71
+ /* @__PURE__ */ r(
72
+ X,
73
+ {
74
+ className: "h-ico-sm w-ico-sm text-text-placeholder",
75
+ stroke: 1.5
76
+ }
77
+ ),
78
+ /* @__PURE__ */ r(
79
+ "span",
80
+ {
81
+ className: i(
82
+ "text-ds-md",
83
+ b ? "text-text-primary" : "text-text-placeholder"
84
+ ),
85
+ children: b ?? A
86
+ }
87
+ )
88
+ ]
89
+ }
90
+ ) }),
91
+ /* @__PURE__ */ r(
92
+ _,
93
+ {
94
+ className: "w-auto border-border bg-layer-01 p-ds-04",
95
+ align: "start",
96
+ sideOffset: 4,
97
+ children: /* @__PURE__ */ d("div", { className: "flex gap-ds-03", role: "group", "aria-label": "Time picker", children: [
98
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-ds-02", children: [
99
+ /* @__PURE__ */ r("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "Hr" }),
100
+ /* @__PURE__ */ r("div", { className: i(M, "min-w-[48px]"), children: G.map((e) => /* @__PURE__ */ r(
101
+ "button",
102
+ {
103
+ type: "button",
104
+ onClick: () => L(e),
105
+ className: i(
106
+ h,
107
+ R === e ? N : g
108
+ ),
109
+ "aria-label": `${e} hours`,
110
+ "aria-selected": R === e || void 0,
111
+ children: l === "24h" ? p(e) : e
112
+ },
113
+ e
114
+ )) })
115
+ ] }),
116
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-ds-02", children: [
117
+ /* @__PURE__ */ r("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "Min" }),
118
+ /* @__PURE__ */ r("div", { className: i(M, "min-w-[48px]"), children: J.map((e) => /* @__PURE__ */ r(
119
+ "button",
120
+ {
121
+ type: "button",
122
+ onClick: () => Q(e),
123
+ className: i(
124
+ h,
125
+ v === e ? N : g
126
+ ),
127
+ "aria-label": `${p(e)} minutes`,
128
+ "aria-selected": v === e || void 0,
129
+ children: p(e)
130
+ },
131
+ e
132
+ )) })
133
+ ] }),
134
+ x && /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-ds-02", children: [
135
+ /* @__PURE__ */ r("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "Sec" }),
136
+ /* @__PURE__ */ r("div", { className: i(M, "min-w-[48px]"), children: K.map((e) => /* @__PURE__ */ r(
137
+ "button",
138
+ {
139
+ type: "button",
140
+ onClick: () => V(e),
141
+ className: i(
142
+ h,
143
+ D === e ? N : g
144
+ ),
145
+ "aria-label": `${p(e)} seconds`,
146
+ "aria-selected": D === e || void 0,
147
+ children: p(e)
148
+ },
149
+ e
150
+ )) })
151
+ ] }),
152
+ l === "12h" && /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-ds-02", children: [
153
+ /* @__PURE__ */ r("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: " " }),
154
+ /* @__PURE__ */ r("div", { className: "flex flex-col gap-ds-01 px-ds-01", children: ["AM", "PM"].map((e) => /* @__PURE__ */ r(
155
+ "button",
156
+ {
157
+ type: "button",
158
+ onClick: () => W(e),
159
+ className: i(
160
+ h,
161
+ "min-w-[44px] font-semibold",
162
+ k === e ? N : g
163
+ ),
164
+ "aria-label": e,
165
+ "aria-selected": k === e || void 0,
166
+ children: e
167
+ },
168
+ e
169
+ )) })
170
+ ] })
171
+ ] })
172
+ }
173
+ )
174
+ ] });
175
+ }
176
+ );
177
+ F.displayName = "TimePicker";
178
+ export {
179
+ F as TimePicker
180
+ };
@@ -0,0 +1,9 @@
1
+ export declare function useCalendar(initialMonth?: Date): {
2
+ currentMonth: Date;
3
+ setCurrentMonth: import('react').Dispatch<import('react').SetStateAction<Date>>;
4
+ goToPreviousMonth: () => void;
5
+ goToNextMonth: () => void;
6
+ goToMonth: (month: number) => void;
7
+ goToYear: (year: number) => void;
8
+ };
9
+ //# sourceMappingURL=use-calendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-calendar.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/use-calendar.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,YAAY,CAAC,EAAE,IAAI;;;;;uBAKnB,MAAM;qBAER,MAAM;EAW/B"}
@@ -0,0 +1,16 @@
1
+ import { useState as s } from "react";
2
+ import { setYear as h, setMonth as M, addMonths as u, subMonths as a } from "date-fns";
3
+ function f(e) {
4
+ const [r, t] = s(e ?? /* @__PURE__ */ new Date());
5
+ return {
6
+ currentMonth: r,
7
+ setCurrentMonth: t,
8
+ goToPreviousMonth: () => t((o) => a(o, 1)),
9
+ goToNextMonth: () => t((o) => u(o, 1)),
10
+ goToMonth: (o) => t((n) => M(n, o)),
11
+ goToYear: (o) => t((n) => h(n, o))
12
+ };
13
+ }
14
+ export {
15
+ f as useCalendar
16
+ };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface YearPickerProps {
3
+ currentYear: number;
4
+ selectedYear?: number;
5
+ onYearSelect: (year: number) => void;
6
+ minDate?: Date;
7
+ maxDate?: Date;
8
+ }
9
+ export declare const YearPicker: React.ForwardRefExoticComponent<YearPickerProps & React.RefAttributes<HTMLDivElement>>;
10
+ //# sourceMappingURL=year-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"year-picker.d.ts","sourceRoot":"","sources":["../../../src/composed/date-picker/year-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;CACf;AAED,eAAO,MAAM,UAAU,wFA+CtB,CAAA"}