@helpwave/hightide 0.1.26 → 0.1.28

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 (336) hide show
  1. package/dist/coloring/index.d.mts +2 -0
  2. package/dist/coloring/index.d.ts +2 -0
  3. package/dist/coloring/index.js +85 -0
  4. package/dist/coloring/index.js.map +1 -0
  5. package/dist/coloring/index.mjs +48 -0
  6. package/dist/coloring/index.mjs.map +1 -0
  7. package/dist/components/branding/index.d.mts +3 -0
  8. package/dist/components/branding/index.d.ts +3 -0
  9. package/dist/components/branding/index.js +140 -0
  10. package/dist/components/branding/index.js.map +1 -0
  11. package/dist/components/branding/index.mjs +104 -0
  12. package/dist/components/branding/index.mjs.map +1 -0
  13. package/dist/components/date/DatePicker.js +1 -1
  14. package/dist/components/date/DatePicker.js.map +1 -1
  15. package/dist/components/date/DatePicker.mjs +1 -1
  16. package/dist/components/date/DatePicker.mjs.map +1 -1
  17. package/dist/components/date/YearMonthPicker.js +1 -1
  18. package/dist/components/date/YearMonthPicker.js.map +1 -1
  19. package/dist/components/date/YearMonthPicker.mjs +1 -1
  20. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  21. package/dist/components/date/index.d.mts +10 -0
  22. package/dist/components/date/index.d.ts +10 -0
  23. package/dist/components/date/index.js +1168 -0
  24. package/dist/components/date/index.js.map +1 -0
  25. package/dist/components/date/index.mjs +1124 -0
  26. package/dist/components/date/index.mjs.map +1 -0
  27. package/dist/components/dialog/ConfirmDialog.d.mts +1 -1
  28. package/dist/components/dialog/ConfirmDialog.d.ts +1 -1
  29. package/dist/components/dialog/ConfirmDialog.js +2 -2
  30. package/dist/components/dialog/ConfirmDialog.js.map +1 -1
  31. package/dist/components/dialog/ConfirmDialog.mjs +2 -2
  32. package/dist/components/dialog/ConfirmDialog.mjs.map +1 -1
  33. package/dist/components/dialog/Dialog.d.mts +1 -1
  34. package/dist/components/dialog/Dialog.d.ts +1 -1
  35. package/dist/components/dialog/Dialog.js +2 -2
  36. package/dist/components/dialog/Dialog.js.map +1 -1
  37. package/dist/components/dialog/Dialog.mjs +2 -2
  38. package/dist/components/dialog/Dialog.mjs.map +1 -1
  39. package/dist/components/dialog/DiscardChangesDialog.d.mts +1 -1
  40. package/dist/components/dialog/DiscardChangesDialog.d.ts +1 -1
  41. package/dist/components/dialog/DiscardChangesDialog.js +2 -2
  42. package/dist/components/dialog/DiscardChangesDialog.js.map +1 -1
  43. package/dist/components/dialog/DiscardChangesDialog.mjs +2 -2
  44. package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -1
  45. package/dist/components/dialog/InputDialog.d.mts +1 -1
  46. package/dist/components/dialog/InputDialog.d.ts +1 -1
  47. package/dist/components/dialog/InputDialog.js +2 -2
  48. package/dist/components/dialog/InputDialog.js.map +1 -1
  49. package/dist/components/dialog/InputDialog.mjs +2 -2
  50. package/dist/components/dialog/InputDialog.mjs.map +1 -1
  51. package/dist/components/dialog/LanguageDialog.d.mts +1 -1
  52. package/dist/components/dialog/LanguageDialog.d.ts +1 -1
  53. package/dist/components/dialog/LanguageDialog.js +28 -15
  54. package/dist/components/dialog/LanguageDialog.js.map +1 -1
  55. package/dist/components/dialog/LanguageDialog.mjs +28 -15
  56. package/dist/components/dialog/LanguageDialog.mjs.map +1 -1
  57. package/dist/components/dialog/ThemeDialog.d.mts +1 -1
  58. package/dist/components/dialog/ThemeDialog.d.ts +1 -1
  59. package/dist/components/dialog/ThemeDialog.js +69 -33
  60. package/dist/components/dialog/ThemeDialog.js.map +1 -1
  61. package/dist/components/dialog/ThemeDialog.mjs +60 -24
  62. package/dist/components/dialog/ThemeDialog.mjs.map +1 -1
  63. package/dist/components/dialog/index.d.mts +1 -1
  64. package/dist/components/dialog/index.d.ts +1 -1
  65. package/dist/components/dialog/index.js +61 -25
  66. package/dist/components/dialog/index.js.map +1 -1
  67. package/dist/components/dialog/index.mjs +61 -25
  68. package/dist/components/dialog/index.mjs.map +1 -1
  69. package/dist/components/form/index.d.mts +5 -0
  70. package/dist/components/form/index.d.ts +5 -0
  71. package/dist/components/form/index.js +100 -0
  72. package/dist/components/form/index.js.map +1 -0
  73. package/dist/components/form/index.mjs +64 -0
  74. package/dist/components/form/index.mjs.map +1 -0
  75. package/dist/components/icons-and-geometry/index.d.mts +7 -0
  76. package/dist/components/icons-and-geometry/index.d.ts +7 -0
  77. package/dist/components/icons-and-geometry/index.js +3955 -0
  78. package/dist/components/icons-and-geometry/index.js.map +1 -0
  79. package/dist/components/icons-and-geometry/index.mjs +3939 -0
  80. package/dist/components/icons-and-geometry/index.mjs.map +1 -0
  81. package/dist/components/index.d.mts +83 -0
  82. package/dist/components/index.d.ts +83 -0
  83. package/dist/components/index.js +15471 -0
  84. package/dist/components/index.js.map +1 -0
  85. package/dist/components/index.mjs +15377 -0
  86. package/dist/components/index.mjs.map +1 -0
  87. package/dist/components/layout/Carousel.d.mts +33 -0
  88. package/dist/components/layout/Carousel.d.ts +33 -0
  89. package/dist/components/layout/Carousel.js +684 -0
  90. package/dist/components/layout/Carousel.js.map +1 -0
  91. package/dist/components/layout/Carousel.mjs +659 -0
  92. package/dist/components/layout/Carousel.mjs.map +1 -0
  93. package/dist/components/{layout-and-navigation → layout}/Chip.js +1 -1
  94. package/dist/components/layout/Chip.js.map +1 -0
  95. package/dist/components/{layout-and-navigation → layout}/Chip.mjs +1 -1
  96. package/dist/components/layout/Chip.mjs.map +1 -0
  97. package/dist/components/{layout-and-navigation → layout}/DividerInserter.js +1 -1
  98. package/dist/components/layout/DividerInserter.js.map +1 -0
  99. package/dist/components/{layout-and-navigation → layout}/DividerInserter.mjs +1 -1
  100. package/dist/components/layout/DividerInserter.mjs.map +1 -0
  101. package/dist/components/{layout-and-navigation → layout}/Expandable.js +2 -2
  102. package/dist/components/layout/Expandable.js.map +1 -0
  103. package/dist/components/{layout-and-navigation → layout}/Expandable.mjs +2 -2
  104. package/dist/components/layout/Expandable.mjs.map +1 -0
  105. package/dist/components/{layout-and-navigation → layout}/FAQSection.js +5 -5
  106. package/dist/components/layout/FAQSection.js.map +1 -0
  107. package/dist/components/{layout-and-navigation → layout}/FAQSection.mjs +5 -5
  108. package/dist/components/layout/FAQSection.mjs.map +1 -0
  109. package/dist/components/{layout-and-navigation → layout}/FloatingContainer.js +2 -2
  110. package/dist/components/layout/FloatingContainer.js.map +1 -0
  111. package/dist/components/{layout-and-navigation → layout}/FloatingContainer.mjs +2 -2
  112. package/dist/components/layout/FloatingContainer.mjs.map +1 -0
  113. package/dist/components/{layout-and-navigation → layout}/ListBox.js +2 -2
  114. package/dist/components/layout/ListBox.js.map +1 -0
  115. package/dist/components/{layout-and-navigation → layout}/ListBox.mjs +2 -2
  116. package/dist/components/layout/ListBox.mjs.map +1 -0
  117. package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.js +1 -1
  118. package/dist/components/layout/MarkdownInterpreter.js.map +1 -0
  119. package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.mjs +1 -1
  120. package/dist/components/layout/MarkdownInterpreter.mjs.map +1 -0
  121. package/dist/components/{layout-and-navigation → layout}/ScrollArea.js +2 -2
  122. package/dist/components/layout/ScrollArea.js.map +1 -0
  123. package/dist/components/{layout-and-navigation → layout}/ScrollArea.mjs +1 -1
  124. package/dist/components/layout/ScrollArea.mjs.map +1 -0
  125. package/dist/components/{layout-and-navigation → layout}/TextImage.js +3 -3
  126. package/dist/components/layout/TextImage.js.map +1 -0
  127. package/dist/components/{layout-and-navigation → layout}/TextImage.mjs +2 -2
  128. package/dist/components/layout/TextImage.mjs.map +1 -0
  129. package/dist/components/{layout-and-navigation → layout}/VerticalDivider.js +1 -1
  130. package/dist/components/layout/VerticalDivider.js.map +1 -0
  131. package/dist/components/{layout-and-navigation → layout}/VerticalDivider.mjs +1 -1
  132. package/dist/components/layout/VerticalDivider.mjs.map +1 -0
  133. package/dist/components/layout/index.d.mts +18 -0
  134. package/dist/components/layout/index.d.ts +18 -0
  135. package/dist/components/layout/index.js +3111 -0
  136. package/dist/components/layout/index.js.map +1 -0
  137. package/dist/components/layout/index.mjs +3064 -0
  138. package/dist/components/layout/index.mjs.map +1 -0
  139. package/dist/components/loading-states/index.d.mts +12 -0
  140. package/dist/components/loading-states/index.d.ts +12 -0
  141. package/dist/components/loading-states/index.js +614 -0
  142. package/dist/components/loading-states/index.js.map +1 -0
  143. package/dist/components/loading-states/index.mjs +573 -0
  144. package/dist/components/loading-states/index.mjs.map +1 -0
  145. package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.js +1 -1
  146. package/dist/components/navigation/BreadCrumb.js.map +1 -0
  147. package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.mjs +1 -1
  148. package/dist/components/navigation/BreadCrumb.mjs.map +1 -0
  149. package/dist/components/navigation/Navigation.d.mts +21 -0
  150. package/dist/components/navigation/Navigation.d.ts +21 -0
  151. package/dist/components/navigation/Navigation.js +4018 -0
  152. package/dist/components/navigation/Navigation.js.map +1 -0
  153. package/dist/components/navigation/Navigation.mjs +4012 -0
  154. package/dist/components/navigation/Navigation.mjs.map +1 -0
  155. package/dist/components/{layout-and-navigation → navigation}/Pagination.js +3 -3
  156. package/dist/components/navigation/Pagination.js.map +1 -0
  157. package/dist/components/{layout-and-navigation → navigation}/Pagination.mjs +3 -3
  158. package/dist/components/navigation/Pagination.mjs.map +1 -0
  159. package/dist/components/{layout-and-navigation → navigation}/StepperBar.js +3 -3
  160. package/dist/components/navigation/StepperBar.js.map +1 -0
  161. package/dist/components/{layout-and-navigation → navigation}/StepperBar.mjs +3 -3
  162. package/dist/components/navigation/StepperBar.mjs.map +1 -0
  163. package/dist/components/navigation/index.d.mts +9 -0
  164. package/dist/components/navigation/index.d.ts +9 -0
  165. package/dist/components/navigation/index.js +4660 -0
  166. package/dist/components/navigation/index.js.map +1 -0
  167. package/dist/components/navigation/index.mjs +4648 -0
  168. package/dist/components/navigation/index.mjs.map +1 -0
  169. package/dist/components/properties/MultiSelectProperty.js +27 -14
  170. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  171. package/dist/components/properties/MultiSelectProperty.mjs +27 -14
  172. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  173. package/dist/components/properties/SelectProperty.js +27 -14
  174. package/dist/components/properties/SelectProperty.js.map +1 -1
  175. package/dist/components/properties/SelectProperty.mjs +27 -14
  176. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  177. package/dist/components/properties/index.d.mts +12 -0
  178. package/dist/components/properties/index.d.ts +12 -0
  179. package/dist/components/properties/index.js +2983 -0
  180. package/dist/components/properties/index.js.map +1 -0
  181. package/dist/components/properties/index.mjs +2951 -0
  182. package/dist/components/properties/index.mjs.map +1 -0
  183. package/dist/components/table/Table.js +1 -1
  184. package/dist/components/table/Table.js.map +1 -1
  185. package/dist/components/table/Table.mjs +1 -1
  186. package/dist/components/table/Table.mjs.map +1 -1
  187. package/dist/components/table/index.d.mts +10 -0
  188. package/dist/components/table/index.d.ts +10 -0
  189. package/dist/components/table/index.js +2329 -0
  190. package/dist/components/table/index.js.map +1 -0
  191. package/dist/components/table/index.mjs +2293 -0
  192. package/dist/components/table/index.mjs.map +1 -0
  193. package/dist/components/user-action/DateAndTimePicker.js +1 -1
  194. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  195. package/dist/components/user-action/DateAndTimePicker.mjs +1 -1
  196. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  197. package/dist/components/user-action/index.d.mts +30 -0
  198. package/dist/components/user-action/index.d.ts +30 -0
  199. package/dist/components/user-action/index.js +4257 -0
  200. package/dist/components/user-action/index.js.map +1 -0
  201. package/dist/components/user-action/index.mjs +4195 -0
  202. package/dist/components/user-action/index.mjs.map +1 -0
  203. package/dist/components/user-action/input/index.d.mts +6 -0
  204. package/dist/components/user-action/input/index.d.ts +6 -0
  205. package/dist/components/user-action/input/index.js +398 -0
  206. package/dist/components/user-action/input/index.js.map +1 -0
  207. package/dist/components/user-action/input/index.mjs +357 -0
  208. package/dist/components/user-action/input/index.mjs.map +1 -0
  209. package/dist/components/user-action/select/Select.d.mts +5 -1
  210. package/dist/components/user-action/select/Select.d.ts +5 -1
  211. package/dist/components/user-action/select/Select.js +27 -14
  212. package/dist/components/user-action/select/Select.js.map +1 -1
  213. package/dist/components/user-action/select/Select.mjs +27 -14
  214. package/dist/components/user-action/select/Select.mjs.map +1 -1
  215. package/dist/components/user-action/select/index.d.mts +4 -0
  216. package/dist/components/user-action/select/index.d.ts +4 -0
  217. package/dist/components/user-action/select/index.js +1369 -0
  218. package/dist/components/user-action/select/index.js.map +1 -0
  219. package/dist/components/user-action/select/index.mjs +1333 -0
  220. package/dist/components/user-action/select/index.mjs.map +1 -0
  221. package/dist/components/utils/index.d.mts +4 -0
  222. package/dist/components/utils/index.d.ts +4 -0
  223. package/dist/components/utils/index.js +302 -0
  224. package/dist/components/utils/index.js.map +1 -0
  225. package/dist/components/utils/index.mjs +275 -0
  226. package/dist/components/utils/index.mjs.map +1 -0
  227. package/dist/hooks/focus/index.d.mts +6 -0
  228. package/dist/hooks/focus/index.d.ts +6 -0
  229. package/dist/hooks/focus/index.js +379 -0
  230. package/dist/hooks/focus/index.js.map +1 -0
  231. package/dist/hooks/focus/index.mjs +339 -0
  232. package/dist/hooks/focus/index.mjs.map +1 -0
  233. package/dist/hooks/index.d.mts +16 -0
  234. package/dist/hooks/index.d.ts +16 -0
  235. package/dist/hooks/index.js +844 -0
  236. package/dist/hooks/index.js.map +1 -0
  237. package/dist/hooks/index.mjs +794 -0
  238. package/dist/hooks/index.mjs.map +1 -0
  239. package/dist/index.d.mts +110 -0
  240. package/dist/index.d.ts +110 -0
  241. package/dist/index.js +16101 -0
  242. package/dist/index.js.map +1 -0
  243. package/dist/index.mjs +15941 -0
  244. package/dist/index.mjs.map +1 -0
  245. package/dist/localization/defaults/index.d.mts +4 -0
  246. package/dist/localization/defaults/index.d.ts +4 -0
  247. package/dist/localization/defaults/index.js +223 -0
  248. package/dist/localization/defaults/index.js.map +1 -0
  249. package/dist/localization/defaults/index.mjs +195 -0
  250. package/dist/localization/defaults/index.mjs.map +1 -0
  251. package/dist/localization/index.d.mts +7 -0
  252. package/dist/localization/index.d.ts +7 -0
  253. package/dist/localization/index.js +415 -0
  254. package/dist/localization/index.js.map +1 -0
  255. package/dist/localization/index.mjs +380 -0
  256. package/dist/localization/index.mjs.map +1 -0
  257. package/dist/style/globals.css +63 -10
  258. package/dist/style/uncompiled/globals.css +5 -4
  259. package/dist/style/uncompiled/utitlity/shadow.css +4 -0
  260. package/dist/theming/index.d.mts +5 -0
  261. package/dist/theming/index.d.ts +5 -0
  262. package/dist/theming/index.js +174 -0
  263. package/dist/theming/index.js.map +1 -0
  264. package/dist/theming/index.mjs +145 -0
  265. package/dist/theming/index.mjs.map +1 -0
  266. package/dist/theming/useTheme.d.mts +3 -1
  267. package/dist/theming/useTheme.d.ts +3 -1
  268. package/dist/theming/useTheme.js +40 -17
  269. package/dist/theming/useTheme.js.map +1 -1
  270. package/dist/theming/useTheme.mjs +38 -15
  271. package/dist/theming/useTheme.mjs.map +1 -1
  272. package/dist/utils/index.d.mts +15 -0
  273. package/dist/utils/index.d.ts +15 -0
  274. package/dist/utils/index.js +553 -0
  275. package/dist/utils/index.js.map +1 -0
  276. package/dist/utils/index.mjs +493 -0
  277. package/dist/utils/index.mjs.map +1 -0
  278. package/package.json +25 -24
  279. package/dist/components/layout-and-navigation/BreadCrumb.js.map +0 -1
  280. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +0 -1
  281. package/dist/components/layout-and-navigation/Carousel.d.mts +0 -25
  282. package/dist/components/layout-and-navigation/Carousel.d.ts +0 -25
  283. package/dist/components/layout-and-navigation/Carousel.js +0 -643
  284. package/dist/components/layout-and-navigation/Carousel.js.map +0 -1
  285. package/dist/components/layout-and-navigation/Carousel.mjs +0 -609
  286. package/dist/components/layout-and-navigation/Carousel.mjs.map +0 -1
  287. package/dist/components/layout-and-navigation/Chip.js.map +0 -1
  288. package/dist/components/layout-and-navigation/Chip.mjs.map +0 -1
  289. package/dist/components/layout-and-navigation/DividerInserter.js.map +0 -1
  290. package/dist/components/layout-and-navigation/DividerInserter.mjs.map +0 -1
  291. package/dist/components/layout-and-navigation/Expandable.js.map +0 -1
  292. package/dist/components/layout-and-navigation/Expandable.mjs.map +0 -1
  293. package/dist/components/layout-and-navigation/FAQSection.js.map +0 -1
  294. package/dist/components/layout-and-navigation/FAQSection.mjs.map +0 -1
  295. package/dist/components/layout-and-navigation/FloatingContainer.js.map +0 -1
  296. package/dist/components/layout-and-navigation/FloatingContainer.mjs.map +0 -1
  297. package/dist/components/layout-and-navigation/ListBox.js.map +0 -1
  298. package/dist/components/layout-and-navigation/ListBox.mjs.map +0 -1
  299. package/dist/components/layout-and-navigation/MarkdownInterpreter.js.map +0 -1
  300. package/dist/components/layout-and-navigation/MarkdownInterpreter.mjs.map +0 -1
  301. package/dist/components/layout-and-navigation/Pagination.js.map +0 -1
  302. package/dist/components/layout-and-navigation/Pagination.mjs.map +0 -1
  303. package/dist/components/layout-and-navigation/ScrollArea.js.map +0 -1
  304. package/dist/components/layout-and-navigation/ScrollArea.mjs.map +0 -1
  305. package/dist/components/layout-and-navigation/StepperBar.js.map +0 -1
  306. package/dist/components/layout-and-navigation/StepperBar.mjs.map +0 -1
  307. package/dist/components/layout-and-navigation/TextImage.js.map +0 -1
  308. package/dist/components/layout-and-navigation/TextImage.mjs.map +0 -1
  309. package/dist/components/layout-and-navigation/VerticalDivider.js.map +0 -1
  310. package/dist/components/layout-and-navigation/VerticalDivider.mjs.map +0 -1
  311. /package/dist/components/{layout-and-navigation → layout}/Chip.d.mts +0 -0
  312. /package/dist/components/{layout-and-navigation → layout}/Chip.d.ts +0 -0
  313. /package/dist/components/{layout-and-navigation → layout}/DividerInserter.d.mts +0 -0
  314. /package/dist/components/{layout-and-navigation → layout}/DividerInserter.d.ts +0 -0
  315. /package/dist/components/{layout-and-navigation → layout}/Expandable.d.mts +0 -0
  316. /package/dist/components/{layout-and-navigation → layout}/Expandable.d.ts +0 -0
  317. /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.mts +0 -0
  318. /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.ts +0 -0
  319. /package/dist/components/{layout-and-navigation → layout}/FloatingContainer.d.mts +0 -0
  320. /package/dist/components/{layout-and-navigation → layout}/FloatingContainer.d.ts +0 -0
  321. /package/dist/components/{layout-and-navigation → layout}/ListBox.d.mts +0 -0
  322. /package/dist/components/{layout-and-navigation → layout}/ListBox.d.ts +0 -0
  323. /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.mts +0 -0
  324. /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.ts +0 -0
  325. /package/dist/components/{layout-and-navigation → layout}/ScrollArea.d.mts +0 -0
  326. /package/dist/components/{layout-and-navigation → layout}/ScrollArea.d.ts +0 -0
  327. /package/dist/components/{layout-and-navigation → layout}/TextImage.d.mts +0 -0
  328. /package/dist/components/{layout-and-navigation → layout}/TextImage.d.ts +0 -0
  329. /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.mts +0 -0
  330. /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.ts +0 -0
  331. /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.mts +0 -0
  332. /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.ts +0 -0
  333. /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.mts +0 -0
  334. /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.ts +0 -0
  335. /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.mts +0 -0
  336. /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.ts +0 -0
@@ -0,0 +1,1168 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/date/index.ts
30
+ var date_exports = {};
31
+ __export(date_exports, {
32
+ DatePicker: () => DatePicker,
33
+ DatePickerUncontrolled: () => DatePickerUncontrolled,
34
+ DayPicker: () => DayPicker,
35
+ DayPickerUncontrolled: () => DayPickerUncontrolled,
36
+ TimeDisplay: () => TimeDisplay,
37
+ TimePicker: () => TimePicker,
38
+ TimePickerUncontrolled: () => TimePickerUncontrolled,
39
+ YearMonthPicker: () => YearMonthPicker,
40
+ YearMonthPickerUncontrolled: () => YearMonthPickerUncontrolled
41
+ });
42
+ module.exports = __toCommonJS(date_exports);
43
+
44
+ // src/components/date/DatePicker.tsx
45
+ var import_react7 = require("react");
46
+ var import_lucide_react2 = require("lucide-react");
47
+
48
+ // src/localization/LanguageProvider.tsx
49
+ var import_react2 = require("react");
50
+
51
+ // src/hooks/useLocalStorage.ts
52
+ var import_react = require("react");
53
+
54
+ // src/localization/util.ts
55
+ var languages = ["en", "de"];
56
+ var languagesLocalNames = {
57
+ en: "English",
58
+ de: "Deutsch"
59
+ };
60
+ var DEFAULT_LANGUAGE = "en";
61
+ var LanguageUtil = {
62
+ languages,
63
+ DEFAULT_LANGUAGE,
64
+ languagesLocalNames
65
+ };
66
+
67
+ // src/localization/LanguageProvider.tsx
68
+ var import_jsx_runtime = require("react/jsx-runtime");
69
+ var LanguageContext = (0, import_react2.createContext)({
70
+ language: LanguageUtil.DEFAULT_LANGUAGE,
71
+ setLanguage: (v) => v
72
+ });
73
+ var useLanguage = () => (0, import_react2.useContext)(LanguageContext);
74
+ var useLocale = (overWriteLanguage) => {
75
+ const { language } = useLanguage();
76
+ const mapping = {
77
+ en: "en-US",
78
+ de: "de-DE"
79
+ };
80
+ return mapping[overWriteLanguage ?? language];
81
+ };
82
+
83
+ // src/localization/useTranslation.ts
84
+ var TranslationPluralCount = {
85
+ zero: 0,
86
+ one: 1,
87
+ two: 2,
88
+ few: 3,
89
+ many: 11,
90
+ other: -1
91
+ };
92
+ var useTranslation = (translations, overwriteTranslation = {}) => {
93
+ const { language: languageProp, translation: overwrite } = overwriteTranslation;
94
+ const { language: inferredLanguage } = useLanguage();
95
+ const usedLanguage = languageProp ?? inferredLanguage;
96
+ const usedTranslations = [...translations];
97
+ if (overwrite) {
98
+ usedTranslations.push(overwrite);
99
+ }
100
+ return (key, options) => {
101
+ const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
102
+ try {
103
+ for (let i = translations.length - 1; i >= 0; i--) {
104
+ const translation = translations[i];
105
+ const localizedTranslation = translation[usedLanguage];
106
+ if (!localizedTranslation) {
107
+ continue;
108
+ }
109
+ const value = localizedTranslation[key];
110
+ if (!value) {
111
+ continue;
112
+ }
113
+ let forProcessing;
114
+ if (typeof value !== "string") {
115
+ if (count === TranslationPluralCount.zero && value?.zero) {
116
+ forProcessing = value.zero;
117
+ } else if (count === TranslationPluralCount.one && value?.one) {
118
+ forProcessing = value.one;
119
+ } else if (count === TranslationPluralCount.two && value?.two) {
120
+ forProcessing = value.two;
121
+ } else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
122
+ forProcessing = value.few;
123
+ } else if (count > TranslationPluralCount.many && value?.many) {
124
+ forProcessing = value.many;
125
+ } else {
126
+ forProcessing = value.other;
127
+ }
128
+ } else {
129
+ forProcessing = value;
130
+ }
131
+ forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
132
+ return replacements[placeholder] ?? `{{key:${placeholder}}}`;
133
+ });
134
+ return forProcessing;
135
+ }
136
+ } catch (e) {
137
+ console.error(e);
138
+ }
139
+ return `{{${usedLanguage}:${key}}}`;
140
+ };
141
+ };
142
+
143
+ // src/utils/noop.ts
144
+ var noop = () => void 0;
145
+
146
+ // src/utils/array.ts
147
+ var equalSizeGroups = (array, groupSize) => {
148
+ if (groupSize <= 0) {
149
+ console.warn(`group size should be greater than 0: groupSize = ${groupSize}`);
150
+ return [[...array]];
151
+ }
152
+ const groups = [];
153
+ for (let i = 0; i < array.length; i += groupSize) {
154
+ groups.push(array.slice(i, Math.min(i + groupSize, array.length)));
155
+ }
156
+ return groups;
157
+ };
158
+ var defaultRangeOptions = {
159
+ allowEmptyRange: false,
160
+ stepSize: 1,
161
+ exclusiveStart: false,
162
+ exclusiveEnd: true
163
+ };
164
+ var range = (endOrRange, options) => {
165
+ const { allowEmptyRange, stepSize, exclusiveStart, exclusiveEnd } = { ...defaultRangeOptions, ...options };
166
+ let start = 0;
167
+ let end;
168
+ if (typeof endOrRange === "number") {
169
+ end = endOrRange;
170
+ } else {
171
+ start = endOrRange[0];
172
+ end = endOrRange[1];
173
+ }
174
+ if (!exclusiveEnd) {
175
+ end -= 1;
176
+ }
177
+ if (exclusiveStart) {
178
+ start += 1;
179
+ }
180
+ if (end - 1 < start) {
181
+ if (!allowEmptyRange) {
182
+ console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set options.allowEmptyRange to true`);
183
+ }
184
+ return [];
185
+ }
186
+ return Array.from({ length: end - start }, (_, index) => index * stepSize + start);
187
+ };
188
+ var closestMatch = (list, firstCloser) => {
189
+ return list.reduce((item1, item2) => {
190
+ return firstCloser(item1, item2) ? item1 : item2;
191
+ });
192
+ };
193
+
194
+ // src/utils/date.ts
195
+ var monthsList = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"];
196
+ var weekDayList = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
197
+ var changeDuration = (date, duration, isAdding) => {
198
+ const {
199
+ years = 0,
200
+ months = 0,
201
+ days = 0,
202
+ hours = 0,
203
+ minutes = 0,
204
+ seconds = 0,
205
+ milliseconds = 0
206
+ } = duration;
207
+ if (years < 0) {
208
+ console.error(`Range error years must be greater than 0: received ${years}`);
209
+ return new Date(date);
210
+ }
211
+ if (months < 0 || months > 11) {
212
+ console.error(`Range error month must be 0 <= month <= 11: received ${months}`);
213
+ return new Date(date);
214
+ }
215
+ if (days < 0) {
216
+ console.error(`Range error days must be greater than 0: received ${days}`);
217
+ return new Date(date);
218
+ }
219
+ if (hours < 0 || hours > 23) {
220
+ console.error(`Range error hours must be 0 <= hours <= 23: received ${hours}`);
221
+ return new Date(date);
222
+ }
223
+ if (minutes < 0 || minutes > 59) {
224
+ console.error(`Range error minutes must be 0 <= minutes <= 59: received ${minutes}`);
225
+ return new Date(date);
226
+ }
227
+ if (seconds < 0 || seconds > 59) {
228
+ console.error(`Range error seconds must be 0 <= seconds <= 59: received ${seconds}`);
229
+ return new Date(date);
230
+ }
231
+ if (milliseconds < 0) {
232
+ console.error(`Range error seconds must be greater than 0: received ${milliseconds}`);
233
+ return new Date(date);
234
+ }
235
+ const multiplier = isAdding ? 1 : -1;
236
+ const newDate = new Date(date);
237
+ newDate.setFullYear(newDate.getFullYear() + multiplier * years);
238
+ newDate.setMonth(newDate.getMonth() + multiplier * months);
239
+ newDate.setDate(newDate.getDate() + multiplier * days);
240
+ newDate.setHours(newDate.getHours() + multiplier * hours);
241
+ newDate.setMinutes(newDate.getMinutes() + multiplier * minutes);
242
+ newDate.setSeconds(newDate.getSeconds() + multiplier * seconds);
243
+ newDate.setMilliseconds(newDate.getMilliseconds() + multiplier * milliseconds);
244
+ return newDate;
245
+ };
246
+ var addDuration = (date, duration) => {
247
+ return changeDuration(date, duration, true);
248
+ };
249
+ var subtractDuration = (date, duration) => {
250
+ return changeDuration(date, duration, false);
251
+ };
252
+ var isInTimeSpan = (value, startDate, endDate) => {
253
+ if (startDate && endDate) {
254
+ console.assert(startDate <= endDate);
255
+ return startDate <= value && value <= endDate;
256
+ } else if (startDate) {
257
+ return startDate <= value;
258
+ } else if (endDate) {
259
+ return endDate >= value;
260
+ } else {
261
+ return true;
262
+ }
263
+ };
264
+ var equalDate = (date1, date2) => {
265
+ return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();
266
+ };
267
+ var getWeeksForCalenderMonth = (date, weekStart, weeks = 6) => {
268
+ const month = date.getMonth();
269
+ const year = date.getFullYear();
270
+ const dayList = [];
271
+ let currentDate = new Date(year, month, 1);
272
+ const weekStartIndex = weekDayList.indexOf(weekStart);
273
+ while (currentDate.getDay() !== weekStartIndex) {
274
+ currentDate = subtractDuration(currentDate, { days: 1 });
275
+ }
276
+ while (dayList.length < 7 * weeks) {
277
+ const date2 = new Date(currentDate);
278
+ date2.setHours(date2.getHours(), date2.getMinutes());
279
+ dayList.push(date2);
280
+ currentDate = addDuration(currentDate, { days: 1 });
281
+ }
282
+ return equalSizeGroups(dayList, 7);
283
+ };
284
+
285
+ // src/components/date/DatePicker.tsx
286
+ var import_clsx5 = __toESM(require("clsx"));
287
+
288
+ // src/components/user-action/Button.tsx
289
+ var import_react3 = require("react");
290
+ var import_clsx = __toESM(require("clsx"));
291
+ var import_jsx_runtime2 = require("react/jsx-runtime");
292
+ var ButtonColorUtil = {
293
+ solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
294
+ text: ["primary", "negative", "neutral"],
295
+ outline: ["primary"]
296
+ };
297
+ var IconButtonUtil = {
298
+ icon: [...ButtonColorUtil.solid, "transparent"]
299
+ };
300
+ var paddingMapping = {
301
+ small: "btn-sm",
302
+ medium: "btn-md",
303
+ large: "btn-lg"
304
+ };
305
+ var iconPaddingMapping = {
306
+ tiny: "icon-btn-xs",
307
+ small: "icon-btn-sm",
308
+ medium: "icon-btn-md",
309
+ large: "icon-btn-lg"
310
+ };
311
+ var ButtonUtil = {
312
+ paddingMapping,
313
+ iconPaddingMapping
314
+ };
315
+ var SolidButton = (0, import_react3.forwardRef)(function SolidButton2({
316
+ children,
317
+ color = "primary",
318
+ size = "medium",
319
+ startIcon,
320
+ endIcon,
321
+ onClick,
322
+ className,
323
+ ...restProps
324
+ }, ref) {
325
+ const colorClasses = {
326
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
327
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
328
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
329
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
330
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
331
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
332
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
333
+ }[color];
334
+ const iconColorClasses = {
335
+ primary: "not-group-disabled:text-button-solid-primary-icon",
336
+ secondary: "not-group-disabled:text-button-solid-secondary-icon",
337
+ tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
338
+ positive: "not-group-disabled:text-button-solid-positive-icon",
339
+ warning: "not-group-disabled:text-button-solid-warning-icon",
340
+ negative: "not-group-disabled:text-button-solid-negative-icon",
341
+ neutral: "not-group-disabled:text-button-solid-neutral-icon"
342
+ }[color];
343
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
344
+ "button",
345
+ {
346
+ ref,
347
+ onClick,
348
+ className: (0, import_clsx.default)(
349
+ "group font-semibold",
350
+ colorClasses,
351
+ "not-disabled:hover:brightness-90",
352
+ "disabled:text-disabled-text disabled:bg-disabled-background",
353
+ ButtonUtil.paddingMapping[size],
354
+ className
355
+ ),
356
+ ...restProps,
357
+ children: [
358
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
359
+ "span",
360
+ {
361
+ className: (0, import_clsx.default)(
362
+ iconColorClasses,
363
+ "group-disabled:text-disabled-icon"
364
+ ),
365
+ children: startIcon
366
+ }
367
+ ),
368
+ children,
369
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
370
+ "span",
371
+ {
372
+ className: (0, import_clsx.default)(
373
+ iconColorClasses,
374
+ "group-disabled:text-disabled-icon"
375
+ ),
376
+ children: endIcon
377
+ }
378
+ )
379
+ ]
380
+ }
381
+ );
382
+ });
383
+ var TextButton = ({
384
+ children,
385
+ color = "neutral",
386
+ size = "medium",
387
+ startIcon,
388
+ endIcon,
389
+ onClick,
390
+ coloredHoverBackground = true,
391
+ className,
392
+ ...restProps
393
+ }) => {
394
+ const colorClasses = {
395
+ primary: "not-disabled:bg-transparent not-disabled:text-button-text-primary-text focus-style-none focus-visible:ring-2 not-disabled:focus-visible:ring-button-text-primary-text",
396
+ negative: "not-disabled:bg-transparent not-disabled:text-button-text-negative-text focus-style-none focus-visible:ring-2 not-disabled:focus-visible:ring-button-text-negative-text",
397
+ neutral: "not-disabled:bg-transparent not-disabled:text-button-text-neutral-text focus-style-none focus-visible:ring-2 not-disabled:focus-visible:ring-button-text-neutral-text"
398
+ }[color];
399
+ const backgroundColor = {
400
+ primary: "not-disabled:hover:bg-button-text-primary-text/20 not-disabled:focus-visible:bg-button-text-primary-text/20",
401
+ negative: "not-disabled:hover:bg-button-text-negative-text/20 not-disabled:focus-visible:bg-button-text-negative-text/20",
402
+ neutral: "not-disabled:hover:bg-button-text-neutral-text/20 not-disabled:focus-visible:bg-button-text-neutral-text/20"
403
+ }[color];
404
+ const iconColorClasses = {
405
+ primary: "not-group-disabled:text-button-text-primary-icon",
406
+ negative: "not-group-disabled:text-button-text-negative-icon",
407
+ neutral: "not-group-disabled:text-button-text-neutral-icon"
408
+ }[color];
409
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
410
+ "button",
411
+ {
412
+ onClick,
413
+ className: (0, import_clsx.default)(
414
+ "group font-semibold",
415
+ "disabled:text-disabled-text",
416
+ colorClasses,
417
+ {
418
+ [backgroundColor]: coloredHoverBackground,
419
+ "not-disabled:hover:bg-button-text-hover-background": !coloredHoverBackground
420
+ },
421
+ ButtonUtil.paddingMapping[size],
422
+ className
423
+ ),
424
+ ...restProps,
425
+ children: [
426
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
427
+ "span",
428
+ {
429
+ className: (0, import_clsx.default)(
430
+ iconColorClasses,
431
+ "group-disabled:text-disabled-icon"
432
+ ),
433
+ children: startIcon
434
+ }
435
+ ),
436
+ children,
437
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
438
+ "span",
439
+ {
440
+ className: (0, import_clsx.default)(
441
+ iconColorClasses,
442
+ "group-disabled:text-disabled-icon"
443
+ ),
444
+ children: endIcon
445
+ }
446
+ )
447
+ ]
448
+ }
449
+ );
450
+ };
451
+ var IconButton = (0, import_react3.forwardRef)(function IconButton2({
452
+ children,
453
+ color = "primary",
454
+ size = "medium",
455
+ className,
456
+ ...restProps
457
+ }, ref) {
458
+ const colorClasses = {
459
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
460
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
461
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
462
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
463
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
464
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
465
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
466
+ transparent: "not-disabled:bg-transparent"
467
+ }[color];
468
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
469
+ "button",
470
+ {
471
+ ref,
472
+ className: (0, import_clsx.default)(
473
+ colorClasses,
474
+ "not-disabled:hover:brightness-90",
475
+ "disabled:text-disabled-text",
476
+ {
477
+ "disabled:bg-disabled-background": color !== "transparent",
478
+ "disabled:opacity-70": color === "transparent",
479
+ "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
480
+ },
481
+ ButtonUtil.iconPaddingMapping[size],
482
+ className
483
+ ),
484
+ ...restProps,
485
+ children
486
+ }
487
+ );
488
+ });
489
+
490
+ // src/components/date/YearMonthPicker.tsx
491
+ var import_react5 = require("react");
492
+ var import_react_custom_scrollbars_2 = require("react-custom-scrollbars-2");
493
+ var import_clsx3 = __toESM(require("clsx"));
494
+
495
+ // src/components/layout/Expandable.tsx
496
+ var import_react4 = require("react");
497
+ var import_lucide_react = require("lucide-react");
498
+ var import_clsx2 = __toESM(require("clsx"));
499
+ var import_jsx_runtime3 = require("react/jsx-runtime");
500
+ var ExpansionIcon = ({ isExpanded, className }) => {
501
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
502
+ import_lucide_react.ChevronDown,
503
+ {
504
+ "aria-hidden": true,
505
+ className: (0, import_clsx2.default)(
506
+ "min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
507
+ { "rotate-180": isExpanded },
508
+ className
509
+ )
510
+ }
511
+ );
512
+ };
513
+ var Expandable = (0, import_react4.forwardRef)(function Expandable2({
514
+ children,
515
+ id: providedId,
516
+ label,
517
+ icon,
518
+ isExpanded = false,
519
+ onChange = noop,
520
+ clickOnlyOnHeader = true,
521
+ disabled = false,
522
+ className,
523
+ headerClassName,
524
+ contentClassName,
525
+ contentExpandedClassName
526
+ }, ref) {
527
+ const defaultIcon = (0, import_react4.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
528
+ icon ??= defaultIcon;
529
+ const generatedId = (0, import_react4.useId)();
530
+ const id = providedId ?? generatedId;
531
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
532
+ "div",
533
+ {
534
+ ref,
535
+ onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
536
+ className: (0, import_clsx2.default)(
537
+ "flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
538
+ { "cursor-pointer": !clickOnlyOnHeader && !disabled },
539
+ className
540
+ ),
541
+ children: [
542
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
543
+ "button",
544
+ {
545
+ onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
546
+ className: (0, import_clsx2.default)(
547
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
548
+ {
549
+ "group-hover:brightness-97": !isExpanded,
550
+ "hover:brightness-97": isExpanded && !disabled,
551
+ "cursor-pointer": clickOnlyOnHeader && !disabled
552
+ },
553
+ headerClassName
554
+ ),
555
+ "aria-expanded": isExpanded,
556
+ "aria-controls": `${id}-content`,
557
+ "aria-disabled": disabled ?? void 0,
558
+ children: [
559
+ label,
560
+ icon(isExpanded)
561
+ ]
562
+ }
563
+ ),
564
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
565
+ "div",
566
+ {
567
+ id: `${id}-content`,
568
+ className: (0, import_clsx2.default)(
569
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
570
+ {
571
+ [(0, import_clsx2.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
572
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
573
+ },
574
+ contentClassName
575
+ ),
576
+ role: "region",
577
+ children
578
+ }
579
+ )
580
+ ]
581
+ }
582
+ );
583
+ });
584
+ var ExpandableUncontrolled = (0, import_react4.forwardRef)(function ExpandableUncontrolled2({
585
+ isExpanded,
586
+ onChange = noop,
587
+ ...props
588
+ }, ref) {
589
+ const [usedIsExpanded, setUsedIsExpanded] = (0, import_react4.useState)(isExpanded);
590
+ (0, import_react4.useEffect)(() => {
591
+ setUsedIsExpanded(isExpanded);
592
+ }, [isExpanded]);
593
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
594
+ Expandable,
595
+ {
596
+ ...props,
597
+ ref,
598
+ isExpanded: usedIsExpanded,
599
+ onChange: (value) => {
600
+ onChange(value);
601
+ setUsedIsExpanded(value);
602
+ }
603
+ }
604
+ );
605
+ });
606
+
607
+ // src/components/date/YearMonthPicker.tsx
608
+ var import_jsx_runtime4 = require("react/jsx-runtime");
609
+ var YearMonthPicker = ({
610
+ displayedYearMonth = /* @__PURE__ */ new Date(),
611
+ start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
612
+ end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
613
+ onChange = noop,
614
+ className = "",
615
+ maxHeight = 300,
616
+ showValueOpen = true
617
+ }) => {
618
+ const locale = useLocale();
619
+ const ref = (0, import_react5.useRef)(null);
620
+ (0, import_react5.useEffect)(() => {
621
+ const scrollToItem = () => {
622
+ if (ref.current) {
623
+ ref.current.scrollIntoView({
624
+ behavior: "instant",
625
+ block: "center"
626
+ });
627
+ }
628
+ };
629
+ scrollToItem();
630
+ }, [ref]);
631
+ if (end < start) {
632
+ console.error(`startYear: (${start}) less than endYear: (${end})`);
633
+ return null;
634
+ }
635
+ const years = range([start.getFullYear(), end.getFullYear()], { exclusiveEnd: false });
636
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_clsx3.default)("flex-col-0 select-none", className), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_custom_scrollbars_2.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-col-1 mr-3", children: years.map((year) => {
637
+ const selectedYear = displayedYearMonth.getFullYear() === year;
638
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
639
+ ExpandableUncontrolled,
640
+ {
641
+ ref: (displayedYearMonth.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()) === year ? ref : void 0,
642
+ label: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: (0, import_clsx3.default)({ "text-primary font-bold": selectedYear }), children: year }),
643
+ isExpanded: showValueOpen && selectedYear,
644
+ contentClassName: "gap-y-1",
645
+ children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-row-1", children: monthList.map((month) => {
646
+ const monthIndex = monthsList.indexOf(month);
647
+ const newDate = new Date(year, monthIndex);
648
+ const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
649
+ const firstOfMonth = new Date(year, monthIndex, 1);
650
+ const lastOfMonth = new Date(year, monthIndex, 1);
651
+ const isAfterStart = start === void 0 || start <= addDuration(subtractDuration(lastOfMonth, { days: 1 }), { months: 1 });
652
+ const isBeforeEnd = end === void 0 || firstOfMonth <= end;
653
+ const isValid = isAfterStart && isBeforeEnd;
654
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
655
+ SolidButton,
656
+ {
657
+ disabled: !isValid,
658
+ color: selectedMonth && isValid ? "primary" : "neutral",
659
+ className: "flex-1",
660
+ size: "small",
661
+ onClick: () => {
662
+ onChange(newDate);
663
+ },
664
+ children: new Intl.DateTimeFormat(locale, { month: "short" }).format(newDate)
665
+ },
666
+ month
667
+ );
668
+ }) }, index))
669
+ },
670
+ year
671
+ );
672
+ }) }) }) });
673
+ };
674
+ var YearMonthPickerUncontrolled = ({
675
+ displayedYearMonth,
676
+ onChange = noop,
677
+ ...props
678
+ }) => {
679
+ const [yearMonth, setYearMonth] = (0, import_react5.useState)(displayedYearMonth ?? /* @__PURE__ */ new Date());
680
+ (0, import_react5.useEffect)(() => setYearMonth(displayedYearMonth), [displayedYearMonth]);
681
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
682
+ YearMonthPicker,
683
+ {
684
+ displayedYearMonth: yearMonth,
685
+ onChange: (date) => {
686
+ setYearMonth(date);
687
+ onChange(date);
688
+ },
689
+ ...props
690
+ }
691
+ );
692
+ };
693
+
694
+ // src/components/date/DayPicker.tsx
695
+ var import_clsx4 = __toESM(require("clsx"));
696
+ var import_react6 = require("react");
697
+ var import_jsx_runtime5 = require("react/jsx-runtime");
698
+ var DayPicker = ({
699
+ displayedMonth,
700
+ selected,
701
+ start,
702
+ end,
703
+ onChange = noop,
704
+ weekStart = "monday",
705
+ markToday = true,
706
+ className = ""
707
+ }) => {
708
+ const locale = useLocale();
709
+ const month = displayedMonth.getMonth();
710
+ const weeks = getWeeksForCalenderMonth(displayedMonth, weekStart);
711
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx4.default)("flex-col-1 min-w-[220px] select-none", className), children: [
712
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-row-2 text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
713
+ weeks.map((week, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-row-2 text-center", children: week.map((date) => {
714
+ const isSelected = !!selected && equalDate(selected, date);
715
+ const isToday = equalDate(/* @__PURE__ */ new Date(), date);
716
+ const isSameMonth = date.getMonth() === month;
717
+ const isDayValid = isInTimeSpan(date, start, end);
718
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
719
+ "button",
720
+ {
721
+ disabled: !isDayValid,
722
+ className: (0, import_clsx4.default)(
723
+ "flex-1 rounded-full border-2",
724
+ {
725
+ "text-description": !isSameMonth && !isSelected && isDayValid,
726
+ "text-button-solid-neutral-text bg-button-solid-neutral-background": !isSelected && isSameMonth && isDayValid,
727
+ "text-button-solid-primary-text bg-button-solid-primary-background": isSelected && isDayValid,
728
+ "hover:brightness-90 hover:bg-button-solid-primary-background hover:text-button-solid-primary-text": isDayValid,
729
+ "text-disabled-text bg-disabled-background cursor-not-allowed": !isDayValid,
730
+ "border-secondary": isToday && markToday,
731
+ "border-transparent": !isToday || !markToday
732
+ }
733
+ ),
734
+ onClick: () => onChange(date),
735
+ children: date.getDate()
736
+ },
737
+ date.getDate()
738
+ );
739
+ }) }, index))
740
+ ] });
741
+ };
742
+ var DayPickerUncontrolled = ({
743
+ displayedMonth,
744
+ selected,
745
+ onChange = noop,
746
+ ...restProps
747
+ }) => {
748
+ const [date, setDate] = (0, import_react6.useState)(selected);
749
+ const [usedDisplayedMonth, setUsedDDisplayedMonth] = (0, import_react6.useState)(displayedMonth);
750
+ (0, import_react6.useEffect)(() => {
751
+ setDate(selected);
752
+ setUsedDDisplayedMonth(selected);
753
+ }, [selected]);
754
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
755
+ DayPicker,
756
+ {
757
+ displayedMonth: usedDisplayedMonth,
758
+ selected: date,
759
+ onChange: (newDate) => {
760
+ setDate(newDate);
761
+ setUsedDDisplayedMonth(newDate);
762
+ onChange(newDate);
763
+ },
764
+ ...restProps
765
+ }
766
+ );
767
+ };
768
+
769
+ // src/localization/defaults/time.ts
770
+ var monthTranslation = {
771
+ en: {
772
+ january: "January",
773
+ february: "Febuary",
774
+ march: "March",
775
+ april: "April",
776
+ may: "May",
777
+ june: "June",
778
+ july: "July",
779
+ august: "August",
780
+ september: "September",
781
+ october: "October",
782
+ november: "November",
783
+ december: "December"
784
+ },
785
+ de: {
786
+ january: "Januar",
787
+ february: "Febuar",
788
+ march: "M\xE4rz",
789
+ april: "April",
790
+ may: "Mai",
791
+ june: "Juni",
792
+ july: "Juli",
793
+ august: "August",
794
+ september: "September",
795
+ october: "October",
796
+ november: "November",
797
+ december: "December"
798
+ }
799
+ };
800
+ var timeTranslation = {
801
+ en: {
802
+ ...monthTranslation.en,
803
+ century: { one: "Century", other: "Centuries" },
804
+ decade: { one: "Decade", other: "Decades" },
805
+ year: { one: "Year", other: "Years" },
806
+ month: { one: "Month", other: "Months" },
807
+ day: { one: "Day", other: "Days" },
808
+ hour: { one: "Hour", other: "Hours" },
809
+ minute: { one: "Minute", other: "Minutes" },
810
+ second: { one: "Second", other: "Seconds" },
811
+ millisecond: { one: "Millisecond", other: "Milliseconds" },
812
+ microsecond: { one: "Microsecond", other: "Microseconds" },
813
+ nanosecond: { one: "Nanosecond", other: "Nanoseconds" },
814
+ yesterday: "Yesterday",
815
+ today: "Today",
816
+ tomorrow: "Tomorrow",
817
+ in: "in",
818
+ ago: "ago"
819
+ },
820
+ de: {
821
+ ...monthTranslation.de,
822
+ century: { one: "Jahrhundert", other: "Jahrhunderte" },
823
+ decade: { one: "Jahrzehnt", other: "Jahrzehnte" },
824
+ year: { one: "Jahr", other: "Jahre" },
825
+ month: { one: "Monat", other: "Monate" },
826
+ day: { one: "Tag", other: "Tage" },
827
+ hour: { one: "Stunde", other: "Stunden" },
828
+ minute: { one: "Minute", other: "Minuten" },
829
+ second: { one: "Sekunde", other: "Sekunden" },
830
+ millisecond: { one: "Millisekunde", other: "Millisekunden" },
831
+ microsecond: { one: "Mikrosekunde", other: "Mikrosekunden" },
832
+ nanosecond: { one: "Nanosekunde", other: "Nanosekunden" },
833
+ yesterday: "Gestern",
834
+ today: "Heute",
835
+ tomorrow: "Morgen",
836
+ in: "in",
837
+ ago: "vor"
838
+ }
839
+ };
840
+
841
+ // src/components/date/DatePicker.tsx
842
+ var import_jsx_runtime6 = require("react/jsx-runtime");
843
+ var DatePicker = ({
844
+ overwriteTranslation,
845
+ value = /* @__PURE__ */ new Date(),
846
+ start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
847
+ end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
848
+ initialDisplay = "day",
849
+ onChange = noop,
850
+ yearMonthPickerProps,
851
+ dayPickerProps,
852
+ className = ""
853
+ }) => {
854
+ const locale = useLocale();
855
+ const translation = useTranslation([timeTranslation], overwriteTranslation);
856
+ const [displayedMonth, setDisplayedMonth] = (0, import_react7.useState)(value);
857
+ const [displayMode, setDisplayMode] = (0, import_react7.useState)(initialDisplay);
858
+ (0, import_react7.useEffect)(() => {
859
+ setDisplayedMonth(value);
860
+ }, [value]);
861
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx5.default)("flex-col-4", className), children: [
862
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-row-2 items-center justify-between h-7", children: [
863
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
864
+ TextButton,
865
+ {
866
+ className: (0, import_clsx5.default)("flex-row-1 items-center cursor-pointer select-none", {
867
+ "text-disabled-text": displayMode !== "day"
868
+ }),
869
+ onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
870
+ children: [
871
+ `${new Intl.DateTimeFormat(locale, { month: "long" }).format(displayedMonth)} ${displayedMonth.getFullYear()}`,
872
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronDown, { size: 16 })
873
+ ]
874
+ }
875
+ ),
876
+ displayMode === "day" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-row-2 justify-end", children: [
877
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
878
+ SolidButton,
879
+ {
880
+ size: "small",
881
+ color: "primary",
882
+ disabled: !isInTimeSpan(subtractDuration(displayedMonth, { months: 1 }), start, end),
883
+ onClick: () => {
884
+ setDisplayedMonth(subtractDuration(displayedMonth, { months: 1 }));
885
+ },
886
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ArrowUp, { size: 20 })
887
+ }
888
+ ),
889
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
890
+ SolidButton,
891
+ {
892
+ size: "small",
893
+ color: "primary",
894
+ disabled: !isInTimeSpan(addDuration(displayedMonth, { months: 1 }), start, end),
895
+ onClick: () => {
896
+ setDisplayedMonth(addDuration(displayedMonth, { months: 1 }));
897
+ },
898
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ArrowDown, { size: 20 })
899
+ }
900
+ )
901
+ ] })
902
+ ] }),
903
+ displayMode === "yearMonth" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
904
+ YearMonthPicker,
905
+ {
906
+ ...yearMonthPickerProps,
907
+ displayedYearMonth: value,
908
+ start,
909
+ end,
910
+ onChange: (newDate) => {
911
+ setDisplayedMonth(newDate);
912
+ setDisplayMode("day");
913
+ }
914
+ }
915
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
916
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
917
+ DayPicker,
918
+ {
919
+ ...dayPickerProps,
920
+ displayedMonth,
921
+ start,
922
+ end,
923
+ selected: value,
924
+ onChange: (date) => {
925
+ onChange(date);
926
+ }
927
+ }
928
+ ),
929
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
930
+ TextButton,
931
+ {
932
+ color: "primary",
933
+ onClick: () => {
934
+ const newDate = /* @__PURE__ */ new Date();
935
+ newDate.setHours(value.getHours(), value.getMinutes());
936
+ onChange(newDate);
937
+ },
938
+ children: translation("today")
939
+ }
940
+ ) })
941
+ ] })
942
+ ] });
943
+ };
944
+ var DatePickerUncontrolled = ({
945
+ value = /* @__PURE__ */ new Date(),
946
+ onChange = noop,
947
+ ...props
948
+ }) => {
949
+ const [date, setDate] = (0, import_react7.useState)(value);
950
+ (0, import_react7.useEffect)(() => setDate(value), [value]);
951
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
952
+ DatePicker,
953
+ {
954
+ ...props,
955
+ value: date,
956
+ onChange: (date1) => {
957
+ setDate(date1);
958
+ onChange(date1);
959
+ }
960
+ }
961
+ );
962
+ };
963
+
964
+ // src/components/date/TimeDisplay.tsx
965
+ var import_jsx_runtime7 = require("react/jsx-runtime");
966
+ var defaultTimeDisplayTranslations = {
967
+ en: {
968
+ ...timeTranslation.en,
969
+ inDays: `in {{days}} days`,
970
+ agoDays: `{{days}} days ago`
971
+ },
972
+ de: {
973
+ ...timeTranslation.de,
974
+ inDays: `in {{days}} Tagen`,
975
+ agoDays: `vor {{days}} Tagen`
976
+ }
977
+ };
978
+ var TimeDisplay = ({
979
+ overwriteTranslation,
980
+ date,
981
+ mode = "daysFromToday"
982
+ }) => {
983
+ const translation = useTranslation([defaultTimeDisplayTranslations], overwriteTranslation);
984
+ const difference = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0).valueOf() - new Date(date).setHours(0, 0, 0, 0).valueOf();
985
+ const isBefore = difference > 0;
986
+ const differenceInDays = Math.floor(Math.abs(difference) / (1e3 * 3600 * 24));
987
+ let displayString;
988
+ if (differenceInDays === 0) {
989
+ displayString = translation("today");
990
+ } else if (differenceInDays === 1) {
991
+ displayString = isBefore ? translation("yesterday") : translation("tomorrow");
992
+ } else {
993
+ displayString = isBefore ? translation("agoDays", { replacements: { days: differenceInDays.toString() } }) : translation("inDays", { replacements: { days: differenceInDays.toString() } });
994
+ }
995
+ const monthToTranslation = {
996
+ 0: translation("january"),
997
+ 1: translation("february"),
998
+ 2: translation("march"),
999
+ 3: translation("april"),
1000
+ 4: translation("may"),
1001
+ 5: translation("june"),
1002
+ 6: translation("july"),
1003
+ 7: translation("august"),
1004
+ 8: translation("september"),
1005
+ 9: translation("october"),
1006
+ 10: translation("november"),
1007
+ 11: translation("december")
1008
+ };
1009
+ let fullString;
1010
+ if (mode === "daysFromToday") {
1011
+ fullString = `${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")} - ${displayString}`;
1012
+ } else {
1013
+ fullString = `${date.getDate()}. ${monthToTranslation[date.getMonth()]} ${date.getFullYear()}`;
1014
+ }
1015
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: fullString });
1016
+ };
1017
+
1018
+ // src/components/date/TimePicker.tsx
1019
+ var import_react8 = require("react");
1020
+ var import_react_custom_scrollbars_22 = require("react-custom-scrollbars-2");
1021
+ var import_clsx6 = __toESM(require("clsx"));
1022
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1023
+ var TimePicker = ({
1024
+ time = /* @__PURE__ */ new Date(),
1025
+ onChange = noop,
1026
+ is24HourFormat = true,
1027
+ minuteIncrement = "5min",
1028
+ maxHeight = 300,
1029
+ className = ""
1030
+ }) => {
1031
+ const minuteRef = (0, import_react8.useRef)(null);
1032
+ const hourRef = (0, import_react8.useRef)(null);
1033
+ const isPM = time.getHours() >= 11;
1034
+ const hours = is24HourFormat ? range(24) : range([1, 12], { exclusiveEnd: false });
1035
+ let minutes = range(60);
1036
+ (0, import_react8.useEffect)(() => {
1037
+ const scrollToItem = () => {
1038
+ if (minuteRef.current) {
1039
+ const container = minuteRef.current.parentElement;
1040
+ const hasOverflow = container.scrollHeight > maxHeight;
1041
+ if (hasOverflow) {
1042
+ minuteRef.current.scrollIntoView({
1043
+ behavior: "instant",
1044
+ block: "nearest"
1045
+ });
1046
+ }
1047
+ }
1048
+ };
1049
+ scrollToItem();
1050
+ }, [minuteRef, minuteRef.current]);
1051
+ (0, import_react8.useEffect)(() => {
1052
+ const scrollToItem = () => {
1053
+ if (hourRef.current) {
1054
+ const container = hourRef.current.parentElement;
1055
+ const hasOverflow = container.scrollHeight > maxHeight;
1056
+ if (hasOverflow) {
1057
+ hourRef.current.scrollIntoView({
1058
+ behavior: "instant",
1059
+ block: "nearest"
1060
+ });
1061
+ }
1062
+ }
1063
+ };
1064
+ scrollToItem();
1065
+ }, [hourRef, hourRef.current]);
1066
+ switch (minuteIncrement) {
1067
+ case "5min":
1068
+ minutes = minutes.filter((value) => value % 5 === 0);
1069
+ break;
1070
+ case "10min":
1071
+ minutes = minutes.filter((value) => value % 10 === 0);
1072
+ break;
1073
+ case "15min":
1074
+ minutes = minutes.filter((value) => value % 15 === 0);
1075
+ break;
1076
+ case "30min":
1077
+ minutes = minutes.filter((value) => value % 30 === 0);
1078
+ break;
1079
+ }
1080
+ const closestMinute = closestMatch(minutes, (item1, item2) => Math.abs(item1 - time.getMinutes()) < Math.abs(item2 - time.getMinutes()));
1081
+ const style = (selected) => (0, import_clsx6.default)(
1082
+ "chip-full hover:brightness-90 hover:bg-primary hover:text-on-primary rounded-md mr-3",
1083
+ { "bg-primary text-on-primary": selected, "bg-white text-black": !selected }
1084
+ );
1085
+ const onChangeWrapper = (transformer) => {
1086
+ const newDate = new Date(time);
1087
+ transformer(newDate);
1088
+ onChange(newDate);
1089
+ };
1090
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx6.default)("flex-row-2 w-fit min-w-[150px] select-none", className), children: [
1091
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-col-1 h-full", children: hours.map((hour) => {
1092
+ const currentHour = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
1093
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1094
+ "button",
1095
+ {
1096
+ ref: currentHour ? hourRef : void 0,
1097
+ className: style(currentHour),
1098
+ onClick: () => onChangeWrapper((newDate) => newDate.setHours(hour + (!is24HourFormat && isPM ? 12 : 0))),
1099
+ children: hour.toString().padStart(2, "0")
1100
+ },
1101
+ hour
1102
+ );
1103
+ }) }) }),
1104
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-col-1 h-full", children: minutes.map((minute) => {
1105
+ const currentMinute = minute === closestMinute;
1106
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1107
+ "button",
1108
+ {
1109
+ ref: currentMinute ? minuteRef : void 0,
1110
+ className: style(currentMinute),
1111
+ onClick: () => onChangeWrapper((newDate) => newDate.setMinutes(minute)),
1112
+ children: minute.toString().padStart(2, "0")
1113
+ },
1114
+ minute + minuteIncrement
1115
+ );
1116
+ }) }) }),
1117
+ !is24HourFormat && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-col-1", children: [
1118
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1119
+ "button",
1120
+ {
1121
+ className: style(!isPM),
1122
+ onClick: () => onChangeWrapper((newDate) => isPM && newDate.setHours(newDate.getHours() - 12)),
1123
+ children: "AM"
1124
+ }
1125
+ ),
1126
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1127
+ "button",
1128
+ {
1129
+ className: style(isPM),
1130
+ onClick: () => onChangeWrapper((newDate) => !isPM && newDate.setHours(newDate.getHours() + 12)),
1131
+ children: "PM"
1132
+ }
1133
+ )
1134
+ ] })
1135
+ ] });
1136
+ };
1137
+ var TimePickerUncontrolled = ({
1138
+ time,
1139
+ onChange = noop,
1140
+ ...props
1141
+ }) => {
1142
+ const [value, setValue] = (0, import_react8.useState)(time);
1143
+ (0, import_react8.useEffect)(() => setValue(time), [time]);
1144
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1145
+ TimePicker,
1146
+ {
1147
+ ...props,
1148
+ time: value,
1149
+ onChange: (time1) => {
1150
+ setValue(time1);
1151
+ onChange(time1);
1152
+ }
1153
+ }
1154
+ );
1155
+ };
1156
+ // Annotate the CommonJS export names for ESM import in node:
1157
+ 0 && (module.exports = {
1158
+ DatePicker,
1159
+ DatePickerUncontrolled,
1160
+ DayPicker,
1161
+ DayPickerUncontrolled,
1162
+ TimeDisplay,
1163
+ TimePicker,
1164
+ TimePickerUncontrolled,
1165
+ YearMonthPicker,
1166
+ YearMonthPickerUncontrolled
1167
+ });
1168
+ //# sourceMappingURL=index.js.map