@helpwave/hightide 0.0.13 → 0.0.16

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 (539) hide show
  1. package/dist/coloring/shading.d.mts +5 -0
  2. package/dist/coloring/shading.d.ts +5 -2
  3. package/dist/coloring/shading.js +80 -38
  4. package/dist/coloring/shading.js.map +1 -0
  5. package/dist/coloring/shading.mjs +47 -0
  6. package/dist/coloring/shading.mjs.map +1 -0
  7. package/dist/coloring/types.d.mts +13 -0
  8. package/dist/coloring/types.d.ts +8 -6
  9. package/dist/coloring/types.js +31 -1
  10. package/dist/coloring/types.js.map +1 -0
  11. package/dist/coloring/types.mjs +6 -0
  12. package/dist/coloring/types.mjs.map +1 -0
  13. package/dist/components/Avatar.d.mts +17 -0
  14. package/dist/components/Avatar.d.ts +9 -6
  15. package/dist/components/Avatar.js +79 -29
  16. package/dist/components/Avatar.js.map +1 -0
  17. package/dist/components/Avatar.mjs +48 -0
  18. package/dist/components/Avatar.mjs.map +1 -0
  19. package/dist/components/AvatarGroup.d.mts +14 -0
  20. package/dist/components/AvatarGroup.d.ts +7 -3
  21. package/dist/components/AvatarGroup.js +117 -12
  22. package/dist/components/AvatarGroup.js.map +1 -0
  23. package/dist/components/AvatarGroup.mjs +81 -0
  24. package/dist/components/AvatarGroup.mjs.map +1 -0
  25. package/dist/components/BreadCrumb.d.mts +19 -0
  26. package/dist/components/BreadCrumb.d.ts +6 -3
  27. package/dist/components/BreadCrumb.js +49 -11
  28. package/dist/components/BreadCrumb.js.map +1 -0
  29. package/dist/components/BreadCrumb.mjs +15 -0
  30. package/dist/components/BreadCrumb.mjs.map +1 -0
  31. package/dist/components/Button.d.mts +44 -0
  32. package/dist/components/Button.d.ts +16 -13
  33. package/dist/components/Button.js +232 -80
  34. package/dist/components/Button.js.map +1 -0
  35. package/dist/components/Button.mjs +198 -0
  36. package/dist/components/Button.mjs.map +1 -0
  37. package/dist/components/ChipList.d.mts +24 -0
  38. package/dist/components/ChipList.d.ts +10 -7
  39. package/dist/components/ChipList.js +103 -36
  40. package/dist/components/ChipList.js.map +1 -0
  41. package/dist/components/ChipList.mjs +69 -0
  42. package/dist/components/ChipList.mjs.map +1 -0
  43. package/dist/components/Circle.d.mts +10 -0
  44. package/dist/components/Circle.d.ts +7 -3
  45. package/dist/components/Circle.js +61 -9
  46. package/dist/components/Circle.js.map +1 -0
  47. package/dist/components/Circle.mjs +27 -0
  48. package/dist/components/Circle.mjs.map +1 -0
  49. package/dist/components/ErrorComponent.d.mts +18 -0
  50. package/dist/components/ErrorComponent.d.ts +9 -4
  51. package/dist/components/ErrorComponent.js +86 -17
  52. package/dist/components/ErrorComponent.js.map +1 -0
  53. package/dist/components/ErrorComponent.mjs +53 -0
  54. package/dist/components/ErrorComponent.mjs.map +1 -0
  55. package/dist/components/Expandable.d.mts +33 -0
  56. package/dist/components/Expandable.d.ts +8 -5
  57. package/dist/components/Expandable.js +79 -15
  58. package/dist/components/Expandable.js.map +1 -0
  59. package/dist/components/Expandable.mjs +45 -0
  60. package/dist/components/Expandable.mjs.map +1 -0
  61. package/dist/components/HelpwaveBadge.d.mts +14 -0
  62. package/dist/components/HelpwaveBadge.d.ts +6 -3
  63. package/dist/components/HelpwaveBadge.js +125 -13
  64. package/dist/components/HelpwaveBadge.js.map +1 -0
  65. package/dist/components/HelpwaveBadge.mjs +91 -0
  66. package/dist/components/HelpwaveBadge.mjs.map +1 -0
  67. package/dist/components/HideableContentSection.d.mts +14 -0
  68. package/dist/components/HideableContentSection.d.ts +7 -3
  69. package/dist/components/HideableContentSection.js +69 -14
  70. package/dist/components/HideableContentSection.js.map +1 -0
  71. package/dist/components/HideableContentSection.mjs +35 -0
  72. package/dist/components/HideableContentSection.mjs.map +1 -0
  73. package/dist/components/InputGroup.d.mts +17 -0
  74. package/dist/components/InputGroup.d.ts +7 -3
  75. package/dist/components/InputGroup.js +96 -32
  76. package/dist/components/InputGroup.js.map +1 -0
  77. package/dist/components/InputGroup.mjs +62 -0
  78. package/dist/components/InputGroup.mjs.map +1 -0
  79. package/dist/components/LoadingAndErrorComponent.d.mts +24 -0
  80. package/dist/components/LoadingAndErrorComponent.d.ts +12 -5
  81. package/dist/components/LoadingAndErrorComponent.js +178 -23
  82. package/dist/components/LoadingAndErrorComponent.js.map +1 -0
  83. package/dist/components/LoadingAndErrorComponent.mjs +145 -0
  84. package/dist/components/LoadingAndErrorComponent.mjs.map +1 -0
  85. package/dist/components/LoadingAnimation.d.mts +18 -0
  86. package/dist/components/LoadingAnimation.d.ts +9 -4
  87. package/dist/components/LoadingAnimation.js +124 -16
  88. package/dist/components/LoadingAnimation.js.map +1 -0
  89. package/dist/components/LoadingAnimation.mjs +90 -0
  90. package/dist/components/LoadingAnimation.mjs.map +1 -0
  91. package/dist/components/LoadingButton.d.mts +10 -0
  92. package/dist/components/LoadingButton.d.ts +7 -3
  93. package/dist/components/LoadingButton.js +169 -9
  94. package/dist/components/LoadingButton.js.map +1 -0
  95. package/dist/components/LoadingButton.mjs +135 -0
  96. package/dist/components/LoadingButton.mjs.map +1 -0
  97. package/dist/components/MarkdownInterpreter.d.mts +28 -0
  98. package/dist/components/MarkdownInterpreter.d.ts +8 -5
  99. package/dist/components/MarkdownInterpreter.js +246 -175
  100. package/dist/components/MarkdownInterpreter.js.map +1 -0
  101. package/dist/components/MarkdownInterpreter.mjs +235 -0
  102. package/dist/components/MarkdownInterpreter.mjs.map +1 -0
  103. package/dist/components/Pagination.d.mts +19 -0
  104. package/dist/components/Pagination.d.ts +9 -4
  105. package/dist/components/Pagination.js +100 -23
  106. package/dist/components/Pagination.js.map +1 -0
  107. package/dist/components/Pagination.mjs +67 -0
  108. package/dist/components/Pagination.mjs.map +1 -0
  109. package/dist/components/Profile.d.mts +31 -0
  110. package/dist/components/Profile.d.ts +8 -5
  111. package/dist/components/Profile.js +194 -42
  112. package/dist/components/Profile.js.map +1 -0
  113. package/dist/components/Profile.mjs +162 -0
  114. package/dist/components/Profile.mjs.map +1 -0
  115. package/dist/components/ProgressIndicator.d.mts +24 -0
  116. package/dist/components/ProgressIndicator.d.ts +6 -3
  117. package/dist/components/ProgressIndicator.js +82 -22
  118. package/dist/components/ProgressIndicator.js.map +1 -0
  119. package/dist/components/ProgressIndicator.mjs +59 -0
  120. package/dist/components/ProgressIndicator.mjs.map +1 -0
  121. package/dist/components/Ring.d.mts +35 -0
  122. package/dist/components/Ring.d.ts +13 -9
  123. package/dist/components/Ring.js +331 -107
  124. package/dist/components/Ring.js.map +1 -0
  125. package/dist/components/Ring.mjs +299 -0
  126. package/dist/components/Ring.mjs.map +1 -0
  127. package/dist/components/SearchableList.d.mts +22 -0
  128. package/dist/components/SearchableList.d.ts +9 -5
  129. package/dist/components/SearchableList.js +268 -24
  130. package/dist/components/SearchableList.js.map +1 -0
  131. package/dist/components/SearchableList.mjs +241 -0
  132. package/dist/components/SearchableList.mjs.map +1 -0
  133. package/dist/components/SortButton.d.mts +15 -0
  134. package/dist/components/SortButton.d.ts +9 -4
  135. package/dist/components/SortButton.js +131 -8
  136. package/dist/components/SortButton.js.map +1 -0
  137. package/dist/components/SortButton.mjs +97 -0
  138. package/dist/components/SortButton.mjs.map +1 -0
  139. package/dist/components/StepperBar.d.mts +28 -0
  140. package/dist/components/StepperBar.d.ts +10 -5
  141. package/dist/components/StepperBar.js +248 -44
  142. package/dist/components/StepperBar.js.map +1 -0
  143. package/dist/components/StepperBar.mjs +216 -0
  144. package/dist/components/StepperBar.mjs.map +1 -0
  145. package/dist/components/Table.d.mts +90 -0
  146. package/dist/components/Table.d.ts +20 -17
  147. package/dist/components/Table.js +396 -170
  148. package/dist/components/Table.js.map +1 -0
  149. package/dist/components/Table.mjs +370 -0
  150. package/dist/components/Table.mjs.map +1 -0
  151. package/dist/components/TechRadar.d.mts +39 -0
  152. package/dist/components/TechRadar.d.ts +5 -2
  153. package/dist/components/TechRadar.js +241 -189
  154. package/dist/components/TechRadar.js.map +1 -0
  155. package/dist/components/TechRadar.mjs +208 -0
  156. package/dist/components/TechRadar.mjs.map +1 -0
  157. package/dist/components/TextImage.d.mts +25 -0
  158. package/dist/components/TextImage.d.ts +9 -4
  159. package/dist/components/TextImage.js +121 -29
  160. package/dist/components/TextImage.js.map +1 -0
  161. package/dist/components/TextImage.mjs +86 -0
  162. package/dist/components/TextImage.mjs.map +1 -0
  163. package/dist/components/TimeDisplay.d.mts +35 -0
  164. package/dist/components/TimeDisplay.d.ts +8 -3
  165. package/dist/components/TimeDisplay.js +134 -81
  166. package/dist/components/TimeDisplay.js.map +1 -0
  167. package/dist/components/TimeDisplay.mjs +109 -0
  168. package/dist/components/TimeDisplay.mjs.map +1 -0
  169. package/dist/components/Tooltip.d.mts +37 -0
  170. package/dist/components/Tooltip.d.ts +7 -4
  171. package/dist/components/Tooltip.js +135 -37
  172. package/dist/components/Tooltip.js.map +1 -0
  173. package/dist/components/Tooltip.mjs +109 -0
  174. package/dist/components/Tooltip.mjs.map +1 -0
  175. package/dist/components/VerticalDivider.d.mts +15 -0
  176. package/dist/components/VerticalDivider.d.ts +6 -2
  177. package/dist/components/VerticalDivider.js +80 -6
  178. package/dist/components/VerticalDivider.js.map +1 -0
  179. package/dist/components/VerticalDivider.mjs +56 -0
  180. package/dist/components/VerticalDivider.mjs.map +1 -0
  181. package/dist/components/date/DatePicker.d.mts +32 -0
  182. package/dist/components/date/DatePicker.d.ts +13 -7
  183. package/dist/components/date/DatePicker.js +624 -55
  184. package/dist/components/date/DatePicker.js.map +1 -0
  185. package/dist/components/date/DatePicker.mjs +591 -0
  186. package/dist/components/date/DatePicker.mjs.map +1 -0
  187. package/dist/components/date/DayPicker.d.mts +20 -0
  188. package/dist/components/date/DayPicker.d.ts +8 -4
  189. package/dist/components/date/DayPicker.js +232 -36
  190. package/dist/components/date/DayPicker.js.map +1 -0
  191. package/dist/components/date/DayPicker.mjs +195 -0
  192. package/dist/components/date/DayPicker.mjs.map +1 -0
  193. package/dist/components/date/TimePicker.d.mts +15 -0
  194. package/dist/components/date/TimePicker.d.ts +7 -4
  195. package/dist/components/date/TimePicker.js +196 -75
  196. package/dist/components/date/TimePicker.js.map +1 -0
  197. package/dist/components/date/TimePicker.mjs +164 -0
  198. package/dist/components/date/TimePicker.mjs.map +1 -0
  199. package/dist/components/date/YearMonthPicker.d.mts +15 -0
  200. package/dist/components/date/YearMonthPicker.d.ts +7 -3
  201. package/dist/components/date/YearMonthPicker.js +281 -57
  202. package/dist/components/date/YearMonthPicker.js.map +1 -0
  203. package/dist/components/date/YearMonthPicker.mjs +247 -0
  204. package/dist/components/date/YearMonthPicker.mjs.map +1 -0
  205. package/dist/components/icons/Helpwave.d.mts +14 -0
  206. package/dist/components/icons/Helpwave.d.ts +7 -3
  207. package/dist/components/icons/Helpwave.js +66 -18
  208. package/dist/components/icons/Helpwave.js.map +1 -0
  209. package/dist/components/icons/Helpwave.mjs +43 -0
  210. package/dist/components/icons/Helpwave.mjs.map +1 -0
  211. package/dist/components/icons/Tag.d.mts +14 -0
  212. package/dist/components/icons/Tag.d.ts +7 -3
  213. package/dist/components/icons/Tag.js +59 -11
  214. package/dist/components/icons/Tag.js.map +1 -0
  215. package/dist/components/icons/Tag.mjs +25 -0
  216. package/dist/components/icons/Tag.mjs.map +1 -0
  217. package/dist/components/layout/Carousel.d.mts +25 -0
  218. package/dist/components/layout/Carousel.d.ts +6 -3
  219. package/dist/components/layout/Carousel.js +477 -226
  220. package/dist/components/layout/Carousel.js.map +1 -0
  221. package/dist/components/layout/Carousel.mjs +449 -0
  222. package/dist/components/layout/Carousel.mjs.map +1 -0
  223. package/dist/components/layout/DividerInserter.d.mts +15 -0
  224. package/dist/components/layout/DividerInserter.d.ts +7 -3
  225. package/dist/components/layout/DividerInserter.js +58 -18
  226. package/dist/components/layout/DividerInserter.js.map +1 -0
  227. package/dist/components/layout/DividerInserter.mjs +25 -0
  228. package/dist/components/layout/DividerInserter.mjs.map +1 -0
  229. package/dist/components/layout/FAQSection.d.mts +26 -0
  230. package/dist/components/layout/FAQSection.d.ts +9 -6
  231. package/dist/components/layout/FAQSection.js +336 -13
  232. package/dist/components/layout/FAQSection.js.map +1 -0
  233. package/dist/components/layout/FAQSection.mjs +302 -0
  234. package/dist/components/layout/FAQSection.mjs.map +1 -0
  235. package/dist/components/layout/Tile.d.mts +37 -0
  236. package/dist/components/layout/Tile.d.ts +9 -6
  237. package/dist/components/layout/Tile.js +76 -16
  238. package/dist/components/layout/Tile.js.map +1 -0
  239. package/dist/components/layout/Tile.mjs +42 -0
  240. package/dist/components/layout/Tile.mjs.map +1 -0
  241. package/dist/components/modals/ConfirmDialog.d.mts +38 -0
  242. package/dist/components/modals/ConfirmDialog.d.ts +13 -9
  243. package/dist/components/modals/ConfirmDialog.js +422 -28
  244. package/dist/components/modals/ConfirmDialog.js.map +1 -0
  245. package/dist/components/modals/ConfirmDialog.mjs +388 -0
  246. package/dist/components/modals/ConfirmDialog.mjs.map +1 -0
  247. package/dist/components/modals/DiscardChangesDialog.d.mts +23 -0
  248. package/dist/components/modals/DiscardChangesDialog.d.ts +9 -5
  249. package/dist/components/modals/DiscardChangesDialog.js +406 -23
  250. package/dist/components/modals/DiscardChangesDialog.js.map +1 -0
  251. package/dist/components/modals/DiscardChangesDialog.mjs +370 -0
  252. package/dist/components/modals/DiscardChangesDialog.mjs.map +1 -0
  253. package/dist/components/modals/InputModal.d.mts +19 -0
  254. package/dist/components/modals/InputModal.d.ts +14 -4
  255. package/dist/components/modals/InputModal.js +598 -8
  256. package/dist/components/modals/InputModal.js.map +1 -0
  257. package/dist/components/modals/InputModal.mjs +567 -0
  258. package/dist/components/modals/InputModal.mjs.map +1 -0
  259. package/dist/components/modals/LanguageModal.d.mts +21 -0
  260. package/dist/components/modals/LanguageModal.d.ts +9 -5
  261. package/dist/components/modals/LanguageModal.js +524 -33
  262. package/dist/components/modals/LanguageModal.js.map +1 -0
  263. package/dist/components/modals/LanguageModal.mjs +489 -0
  264. package/dist/components/modals/LanguageModal.mjs.map +1 -0
  265. package/dist/components/modals/Modal.d.mts +43 -0
  266. package/dist/components/modals/Modal.d.ts +13 -8
  267. package/dist/components/modals/Modal.js +280 -51
  268. package/dist/components/modals/Modal.js.map +1 -0
  269. package/dist/components/modals/Modal.mjs +249 -0
  270. package/dist/components/modals/Modal.mjs.map +1 -0
  271. package/dist/components/modals/ModalRegister.d.mts +16 -0
  272. package/dist/components/modals/ModalRegister.d.ts +9 -4
  273. package/dist/components/modals/ModalRegister.js +61 -26
  274. package/dist/components/modals/ModalRegister.js.map +1 -0
  275. package/dist/components/modals/ModalRegister.mjs +37 -0
  276. package/dist/components/modals/ModalRegister.mjs.map +1 -0
  277. package/dist/components/properties/CheckboxProperty.d.mts +20 -0
  278. package/dist/components/properties/CheckboxProperty.d.ts +10 -5
  279. package/dist/components/properties/CheckboxProperty.js +323 -24
  280. package/dist/components/properties/CheckboxProperty.js.map +1 -0
  281. package/dist/components/properties/CheckboxProperty.mjs +291 -0
  282. package/dist/components/properties/CheckboxProperty.mjs.map +1 -0
  283. package/dist/components/properties/DateProperty.d.mts +18 -0
  284. package/dist/components/properties/DateProperty.d.ts +10 -3
  285. package/dist/components/properties/DateProperty.js +422 -21
  286. package/dist/components/properties/DateProperty.js.map +1 -0
  287. package/dist/components/properties/DateProperty.mjs +393 -0
  288. package/dist/components/properties/DateProperty.mjs.map +1 -0
  289. package/dist/components/properties/MultiSelectProperty.d.mts +18 -0
  290. package/dist/components/properties/MultiSelectProperty.d.ts +12 -6
  291. package/dist/components/properties/MultiSelectProperty.js +815 -31
  292. package/dist/components/properties/MultiSelectProperty.js.map +1 -0
  293. package/dist/components/properties/MultiSelectProperty.mjs +787 -0
  294. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -0
  295. package/dist/components/properties/NumberProperty.d.mts +21 -0
  296. package/dist/components/properties/NumberProperty.d.ts +10 -5
  297. package/dist/components/properties/NumberProperty.js +429 -39
  298. package/dist/components/properties/NumberProperty.js.map +1 -0
  299. package/dist/components/properties/NumberProperty.mjs +402 -0
  300. package/dist/components/properties/NumberProperty.mjs.map +1 -0
  301. package/dist/components/properties/PropertyBase.d.mts +27 -0
  302. package/dist/components/properties/PropertyBase.d.ts +9 -5
  303. package/dist/components/properties/PropertyBase.js +194 -24
  304. package/dist/components/properties/PropertyBase.js.map +1 -0
  305. package/dist/components/properties/PropertyBase.mjs +162 -0
  306. package/dist/components/properties/PropertyBase.mjs.map +1 -0
  307. package/dist/components/properties/SelectProperty.d.mts +19 -0
  308. package/dist/components/properties/SelectProperty.d.ts +13 -6
  309. package/dist/components/properties/SelectProperty.js +547 -19
  310. package/dist/components/properties/SelectProperty.js.map +1 -0
  311. package/dist/components/properties/SelectProperty.mjs +520 -0
  312. package/dist/components/properties/SelectProperty.mjs.map +1 -0
  313. package/dist/components/properties/TextProperty.d.mts +20 -0
  314. package/dist/components/properties/TextProperty.d.ts +10 -5
  315. package/dist/components/properties/TextProperty.js +378 -34
  316. package/dist/components/properties/TextProperty.js.map +1 -0
  317. package/dist/components/properties/TextProperty.mjs +346 -0
  318. package/dist/components/properties/TextProperty.mjs.map +1 -0
  319. package/dist/components/user-input/Checkbox.d.mts +41 -0
  320. package/dist/components/user-input/Checkbox.d.ts +9 -5
  321. package/dist/components/user-input/Checkbox.js +148 -63
  322. package/dist/components/user-input/Checkbox.js.map +1 -0
  323. package/dist/components/user-input/Checkbox.mjs +112 -0
  324. package/dist/components/user-input/Checkbox.mjs.map +1 -0
  325. package/dist/components/user-input/DateAndTimePicker.d.mts +47 -0
  326. package/dist/components/user-input/DateAndTimePicker.d.ts +15 -7
  327. package/dist/components/user-input/DateAndTimePicker.js +831 -60
  328. package/dist/components/user-input/DateAndTimePicker.js.map +1 -0
  329. package/dist/components/user-input/DateAndTimePicker.mjs +801 -0
  330. package/dist/components/user-input/DateAndTimePicker.mjs.map +1 -0
  331. package/dist/components/user-input/Input.d.mts +64 -0
  332. package/dist/components/user-input/Input.d.ts +12 -9
  333. package/dist/components/user-input/Input.js +219 -57
  334. package/dist/components/user-input/Input.js.map +1 -0
  335. package/dist/components/user-input/Input.mjs +191 -0
  336. package/dist/components/user-input/Input.mjs.map +1 -0
  337. package/dist/components/user-input/Label.d.mts +16 -0
  338. package/dist/components/user-input/Label.d.ts +8 -4
  339. package/dist/components/user-input/Label.js +43 -11
  340. package/dist/components/user-input/Label.js.map +1 -0
  341. package/dist/components/user-input/Label.mjs +19 -0
  342. package/dist/components/user-input/Label.mjs.map +1 -0
  343. package/dist/components/user-input/Menu.d.mts +24 -0
  344. package/dist/components/user-input/Menu.d.ts +8 -5
  345. package/dist/components/user-input/Menu.js +162 -25
  346. package/dist/components/user-input/Menu.js.map +1 -0
  347. package/dist/components/user-input/Menu.mjs +127 -0
  348. package/dist/components/user-input/Menu.mjs.map +1 -0
  349. package/dist/components/user-input/MultiSelect.d.mts +43 -0
  350. package/dist/components/user-input/MultiSelect.d.ts +12 -8
  351. package/dist/components/user-input/MultiSelect.js +545 -56
  352. package/dist/components/user-input/MultiSelect.js.map +1 -0
  353. package/dist/components/user-input/MultiSelect.mjs +516 -0
  354. package/dist/components/user-input/MultiSelect.mjs.map +1 -0
  355. package/dist/components/user-input/ScrollPicker.d.mts +15 -0
  356. package/dist/components/user-input/ScrollPicker.d.ts +6 -2
  357. package/dist/components/user-input/ScrollPicker.js +276 -145
  358. package/dist/components/user-input/ScrollPicker.js.map +1 -0
  359. package/dist/components/user-input/ScrollPicker.mjs +247 -0
  360. package/dist/components/user-input/ScrollPicker.mjs.map +1 -0
  361. package/dist/components/user-input/SearchableSelect.d.mts +14 -0
  362. package/dist/components/user-input/SearchableSelect.d.ts +9 -3
  363. package/dist/components/user-input/SearchableSelect.js +334 -13
  364. package/dist/components/user-input/SearchableSelect.js.map +1 -0
  365. package/dist/components/user-input/SearchableSelect.mjs +305 -0
  366. package/dist/components/user-input/SearchableSelect.mjs.map +1 -0
  367. package/dist/components/user-input/Select.d.mts +36 -0
  368. package/dist/components/user-input/Select.d.ts +9 -5
  369. package/dist/components/user-input/Select.js +152 -47
  370. package/dist/components/user-input/Select.js.map +1 -0
  371. package/dist/components/user-input/Select.mjs +118 -0
  372. package/dist/components/user-input/Select.mjs.map +1 -0
  373. package/dist/components/user-input/Textarea.d.mts +24 -0
  374. package/dist/components/user-input/Textarea.d.ts +8 -4
  375. package/dist/components/user-input/Textarea.js +153 -31
  376. package/dist/components/user-input/Textarea.js.map +1 -0
  377. package/dist/components/user-input/Textarea.mjs +120 -0
  378. package/dist/components/user-input/Textarea.mjs.map +1 -0
  379. package/dist/components/user-input/ToggleableInput.d.mts +35 -0
  380. package/dist/components/user-input/ToggleableInput.d.ts +6 -3
  381. package/dist/components/user-input/ToggleableInput.js +161 -38
  382. package/dist/components/user-input/ToggleableInput.js.map +1 -0
  383. package/dist/components/user-input/ToggleableInput.mjs +128 -0
  384. package/dist/components/user-input/ToggleableInput.mjs.map +1 -0
  385. package/dist/hooks/useHoverState.d.mts +42 -0
  386. package/dist/hooks/useHoverState.d.ts +5 -3
  387. package/dist/hooks/useHoverState.js +69 -43
  388. package/dist/hooks/useHoverState.js.map +1 -0
  389. package/dist/hooks/useHoverState.mjs +47 -0
  390. package/dist/hooks/useHoverState.mjs.map +1 -0
  391. package/dist/hooks/useLanguage.d.mts +21 -0
  392. package/dist/hooks/useLanguage.d.ts +15 -11
  393. package/dist/hooks/useLanguage.js +145 -50
  394. package/dist/hooks/useLanguage.js.map +1 -0
  395. package/dist/hooks/useLanguage.mjs +115 -0
  396. package/dist/hooks/useLanguage.mjs.map +1 -0
  397. package/dist/hooks/useLocalStorage.d.mts +6 -0
  398. package/dist/hooks/useLocalStorage.d.ts +4 -2
  399. package/dist/hooks/useLocalStorage.js +79 -23
  400. package/dist/hooks/useLocalStorage.js.map +1 -0
  401. package/dist/hooks/useLocalStorage.mjs +59 -0
  402. package/dist/hooks/useLocalStorage.mjs.map +1 -0
  403. package/dist/hooks/useOutsideClick.d.mts +5 -0
  404. package/dist/hooks/useOutsideClick.d.ts +5 -2
  405. package/dist/hooks/useOutsideClick.js +47 -21
  406. package/dist/hooks/useOutsideClick.js.map +1 -0
  407. package/dist/hooks/useOutsideClick.mjs +23 -0
  408. package/dist/hooks/useOutsideClick.mjs.map +1 -0
  409. package/dist/hooks/useSaveDelay.d.mts +6 -0
  410. package/dist/hooks/useSaveDelay.d.ts +2 -1
  411. package/dist/hooks/useSaveDelay.js +62 -38
  412. package/dist/hooks/useSaveDelay.js.map +1 -0
  413. package/dist/hooks/useSaveDelay.mjs +44 -0
  414. package/dist/hooks/useSaveDelay.mjs.map +1 -0
  415. package/dist/hooks/useTheme.d.mts +21 -0
  416. package/dist/hooks/useTheme.d.ts +14 -9
  417. package/dist/hooks/useTheme.js +65 -29
  418. package/dist/hooks/useTheme.js.map +1 -0
  419. package/dist/hooks/useTheme.mjs +40 -0
  420. package/dist/hooks/useTheme.mjs.map +1 -0
  421. package/dist/hooks/useTranslation.d.mts +28 -0
  422. package/dist/hooks/useTranslation.d.ts +9 -5
  423. package/dist/hooks/useTranslation.js +53 -10
  424. package/dist/hooks/useTranslation.js.map +1 -0
  425. package/dist/hooks/useTranslation.mjs +27 -0
  426. package/dist/hooks/useTranslation.mjs.map +1 -0
  427. package/dist/index.d.mts +86 -0
  428. package/dist/index.d.ts +86 -0
  429. package/dist/index.js +5716 -0
  430. package/dist/index.js.map +1 -0
  431. package/dist/index.mjs +5542 -0
  432. package/dist/index.mjs.map +1 -0
  433. package/dist/util/array.d.mts +25 -0
  434. package/dist/util/array.d.ts +9 -7
  435. package/dist/util/array.js +119 -92
  436. package/dist/util/array.js.map +1 -0
  437. package/dist/util/array.mjs +99 -0
  438. package/dist/util/array.mjs.map +1 -0
  439. package/dist/util/builder.d.mts +8 -0
  440. package/dist/util/builder.d.ts +3 -1
  441. package/dist/util/builder.js +33 -8
  442. package/dist/util/builder.js.map +1 -0
  443. package/dist/util/builder.mjs +9 -0
  444. package/dist/util/builder.mjs.map +1 -0
  445. package/dist/util/date.d.mts +30 -0
  446. package/dist/util/date.d.ts +17 -15
  447. package/dist/util/date.js +184 -123
  448. package/dist/util/date.js.map +1 -0
  449. package/dist/util/date.mjs +156 -0
  450. package/dist/util/date.mjs.map +1 -0
  451. package/dist/util/easeFunctions.d.mts +11 -0
  452. package/dist/util/easeFunctions.d.ts +4 -2
  453. package/dist/util/easeFunctions.js +63 -30
  454. package/dist/util/easeFunctions.js.map +1 -0
  455. package/dist/util/easeFunctions.mjs +36 -0
  456. package/dist/util/easeFunctions.mjs.map +1 -0
  457. package/dist/util/emailValidation.d.mts +3 -0
  458. package/dist/util/emailValidation.d.ts +3 -1
  459. package/dist/util/emailValidation.js +32 -2
  460. package/dist/util/emailValidation.js.map +1 -0
  461. package/dist/util/emailValidation.mjs +8 -0
  462. package/dist/util/emailValidation.mjs.map +1 -0
  463. package/dist/util/loopingArray.d.mts +25 -0
  464. package/dist/util/loopingArray.d.ts +4 -2
  465. package/dist/util/loopingArray.js +89 -59
  466. package/dist/util/loopingArray.js.map +1 -0
  467. package/dist/util/loopingArray.mjs +72 -0
  468. package/dist/util/loopingArray.mjs.map +1 -0
  469. package/dist/util/math.d.mts +3 -0
  470. package/dist/util/math.d.ts +3 -1
  471. package/dist/util/math.js +32 -2
  472. package/dist/util/math.js.map +1 -0
  473. package/dist/util/math.mjs +8 -0
  474. package/dist/util/math.mjs.map +1 -0
  475. package/dist/util/news.d.mts +103 -0
  476. package/dist/util/news.d.ts +12 -7
  477. package/dist/util/news.js +73 -24
  478. package/dist/util/news.js.map +1 -0
  479. package/dist/util/news.mjs +48 -0
  480. package/dist/util/news.mjs.map +1 -0
  481. package/dist/util/noop.d.mts +3 -0
  482. package/dist/util/noop.d.ts +3 -1
  483. package/dist/util/noop.js +31 -1
  484. package/dist/util/noop.js.map +1 -0
  485. package/dist/util/noop.mjs +6 -0
  486. package/dist/util/noop.mjs.map +1 -0
  487. package/dist/util/simpleSearch.d.mts +50 -0
  488. package/dist/util/simpleSearch.d.ts +6 -4
  489. package/dist/util/simpleSearch.js +50 -58
  490. package/dist/util/simpleSearch.js.map +1 -0
  491. package/dist/util/simpleSearch.mjs +26 -0
  492. package/dist/util/simpleSearch.mjs.map +1 -0
  493. package/dist/util/storage.d.mts +16 -0
  494. package/dist/util/storage.d.ts +4 -3
  495. package/dist/util/storage.js +63 -31
  496. package/dist/util/storage.js.map +1 -0
  497. package/dist/util/storage.mjs +38 -0
  498. package/dist/util/storage.mjs.map +1 -0
  499. package/dist/util/types.d.mts +3 -0
  500. package/dist/util/types.d.ts +3 -1
  501. package/dist/util/types.js +19 -1
  502. package/dist/util/types.js.map +1 -0
  503. package/dist/util/types.mjs +1 -0
  504. package/dist/util/types.mjs.map +1 -0
  505. package/package.json +20 -9
  506. package/dist/components/Span.d.ts +0 -0
  507. package/dist/components/Span.js +0 -1
  508. package/dist/components/examples/InputGroupExample.d.ts +0 -6
  509. package/dist/components/examples/InputGroupExample.js +0 -21
  510. package/dist/components/examples/MultiSelectExample.d.ts +0 -7
  511. package/dist/components/examples/MultiSelectExample.js +0 -27
  512. package/dist/components/examples/SearchableSelectExample.d.ts +0 -6
  513. package/dist/components/examples/SearchableSelectExample.js +0 -17
  514. package/dist/components/examples/SelectExample.d.ts +0 -4
  515. package/dist/components/examples/SelectExample.js +0 -15
  516. package/dist/components/examples/StackingModals.d.ts +0 -4
  517. package/dist/components/examples/StackingModals.js +0 -15
  518. package/dist/components/examples/TableExample.d.ts +0 -9
  519. package/dist/components/examples/TableExample.js +0 -92
  520. package/dist/components/examples/TextareaExample.d.ts +0 -6
  521. package/dist/components/examples/TextareaExample.js +0 -10
  522. package/dist/components/examples/TileExample.d.ts +0 -9
  523. package/dist/components/examples/TileExample.js +0 -9
  524. package/dist/components/examples/Title.d.ts +0 -0
  525. package/dist/components/examples/Title.js +0 -1
  526. package/dist/components/examples/date/DateTimePickerExample.d.ts +0 -10
  527. package/dist/components/examples/date/DateTimePickerExample.js +0 -21
  528. package/dist/components/examples/properties/CheckboxPropertyExample.d.ts +0 -8
  529. package/dist/components/examples/properties/CheckboxPropertyExample.js +0 -13
  530. package/dist/components/examples/properties/DatePropertyExample.d.ts +0 -8
  531. package/dist/components/examples/properties/DatePropertyExample.js +0 -23
  532. package/dist/components/examples/properties/MultiSelectPropertyExample.d.ts +0 -8
  533. package/dist/components/examples/properties/MultiSelectPropertyExample.js +0 -16
  534. package/dist/components/examples/properties/NumberPropertyExample.d.ts +0 -6
  535. package/dist/components/examples/properties/NumberPropertyExample.js +0 -13
  536. package/dist/components/examples/properties/SelectPropertyExample.d.ts +0 -6
  537. package/dist/components/examples/properties/SelectPropertyExample.js +0 -18
  538. package/dist/components/examples/properties/TextPropertyExample.d.ts +0 -8
  539. package/dist/components/examples/properties/TextPropertyExample.js +0 -13
@@ -0,0 +1,801 @@
1
+ // src/components/user-input/DateAndTimePicker.tsx
2
+ import clsx7 from "clsx";
3
+
4
+ // src/hooks/useLanguage.tsx
5
+ import { createContext, useContext, useEffect as useEffect2, useState as useState2 } from "react";
6
+
7
+ // src/hooks/useLocalStorage.tsx
8
+ import { useCallback, useEffect, useState } from "react";
9
+
10
+ // src/hooks/useLanguage.tsx
11
+ import { jsx } from "react/jsx-runtime";
12
+ var DEFAULT_LANGUAGE = "en";
13
+ var LanguageContext = createContext({ language: DEFAULT_LANGUAGE, setLanguage: (v) => v });
14
+ var useLanguage = () => useContext(LanguageContext);
15
+ var useLocale = (overWriteLanguage) => {
16
+ const { language } = useLanguage();
17
+ const mapping = {
18
+ en: "en-US",
19
+ de: "de-DE"
20
+ };
21
+ return mapping[overWriteLanguage ?? language];
22
+ };
23
+
24
+ // src/hooks/useTranslation.ts
25
+ var useTranslation = (defaults, translationOverwrite = {}) => {
26
+ const { language: languageProp, translation: overwrite } = translationOverwrite;
27
+ const { language: inferredLanguage } = useLanguage();
28
+ const usedLanguage = languageProp ?? inferredLanguage;
29
+ let defaultValues = defaults[usedLanguage];
30
+ if (overwrite && overwrite[usedLanguage]) {
31
+ defaultValues = { ...defaultValues, ...overwrite[usedLanguage] };
32
+ }
33
+ return defaultValues;
34
+ };
35
+
36
+ // src/util/noop.ts
37
+ var noop = () => void 0;
38
+
39
+ // src/util/array.ts
40
+ var equalSizeGroups = (array, groupSize) => {
41
+ if (groupSize <= 0) {
42
+ console.warn(`group size should be greater than 0: groupSize = ${groupSize}`);
43
+ return [[...array]];
44
+ }
45
+ const groups = [];
46
+ for (let i = 0; i < array.length; i += groupSize) {
47
+ groups.push(array.slice(i, Math.min(i + groupSize, array.length)));
48
+ }
49
+ return groups;
50
+ };
51
+ var range = (start, end, allowEmptyRange = false) => {
52
+ if (end < start) {
53
+ if (!allowEmptyRange) {
54
+ console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set allowEmptyRange to true`);
55
+ }
56
+ return [];
57
+ }
58
+ return Array.from({ length: end - start + 1 }, (_, index) => index + start);
59
+ };
60
+ var closestMatch = (list, firstCloser) => {
61
+ return list.reduce((item1, item2) => {
62
+ return firstCloser(item1, item2) ? item1 : item2;
63
+ });
64
+ };
65
+
66
+ // src/util/date.ts
67
+ var monthsList = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"];
68
+ var weekDayList = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
69
+ var changeDuration = (date, duration, isAdding) => {
70
+ const {
71
+ years = 0,
72
+ months = 0,
73
+ days = 0,
74
+ hours = 0,
75
+ minutes = 0,
76
+ seconds = 0,
77
+ milliseconds = 0
78
+ } = duration;
79
+ if (years < 0) {
80
+ console.error(`Range error years must be greater than 0: received ${years}`);
81
+ return new Date(date);
82
+ }
83
+ if (months < 0 || months > 11) {
84
+ console.error(`Range error month must be 0 <= month <= 11: received ${months}`);
85
+ return new Date(date);
86
+ }
87
+ if (days < 0) {
88
+ console.error(`Range error days must be greater than 0: received ${days}`);
89
+ return new Date(date);
90
+ }
91
+ if (hours < 0 || hours > 23) {
92
+ console.error(`Range error hours must be 0 <= hours <= 23: received ${hours}`);
93
+ return new Date(date);
94
+ }
95
+ if (minutes < 0 || minutes > 59) {
96
+ console.error(`Range error minutes must be 0 <= minutes <= 59: received ${minutes}`);
97
+ return new Date(date);
98
+ }
99
+ if (seconds < 0 || seconds > 59) {
100
+ console.error(`Range error seconds must be 0 <= seconds <= 59: received ${seconds}`);
101
+ return new Date(date);
102
+ }
103
+ if (milliseconds < 0) {
104
+ console.error(`Range error seconds must be greater than 0: received ${milliseconds}`);
105
+ return new Date(date);
106
+ }
107
+ const multiplier = isAdding ? 1 : -1;
108
+ const newDate = new Date(date);
109
+ newDate.setFullYear(newDate.getFullYear() + multiplier * years);
110
+ newDate.setMonth(newDate.getMonth() + multiplier * months);
111
+ newDate.setDate(newDate.getDate() + multiplier * days);
112
+ newDate.setHours(newDate.getHours() + multiplier * hours);
113
+ newDate.setMinutes(newDate.getMinutes() + multiplier * minutes);
114
+ newDate.setSeconds(newDate.getSeconds() + multiplier * seconds);
115
+ newDate.setMilliseconds(newDate.getMilliseconds() + multiplier * milliseconds);
116
+ return newDate;
117
+ };
118
+ var addDuration = (date, duration) => {
119
+ return changeDuration(date, duration, true);
120
+ };
121
+ var subtractDuration = (date, duration) => {
122
+ return changeDuration(date, duration, false);
123
+ };
124
+ var isInTimeSpan = (value, startDate, endDate) => {
125
+ if (startDate && endDate) {
126
+ console.assert(startDate <= endDate);
127
+ return startDate <= value && value <= endDate;
128
+ } else if (startDate) {
129
+ return startDate <= value;
130
+ } else if (endDate) {
131
+ return endDate >= value;
132
+ } else {
133
+ return true;
134
+ }
135
+ };
136
+ var equalDate = (date1, date2) => {
137
+ return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();
138
+ };
139
+ var getWeeksForCalenderMonth = (date, weekStart, weeks = 6) => {
140
+ const month = date.getMonth();
141
+ const year = date.getFullYear();
142
+ const dayList = [];
143
+ let currentDate = new Date(year, month, 1);
144
+ const weekStartIndex = weekDayList.indexOf(weekStart);
145
+ while (currentDate.getDay() !== weekStartIndex) {
146
+ currentDate = subtractDuration(currentDate, { days: 1 });
147
+ }
148
+ while (dayList.length < 7 * weeks) {
149
+ const date2 = new Date(currentDate);
150
+ date2.setHours(date2.getHours(), date2.getMinutes());
151
+ dayList.push(date2);
152
+ currentDate = addDuration(currentDate, { days: 1 });
153
+ }
154
+ return equalSizeGroups(dayList, 7);
155
+ };
156
+
157
+ // src/components/Button.tsx
158
+ import clsx from "clsx";
159
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
160
+ var ButtonSizePaddings = {
161
+ small: "btn-sm",
162
+ medium: "btn-md",
163
+ large: "btn-lg"
164
+ };
165
+ var SolidButton = ({
166
+ children,
167
+ disabled = false,
168
+ color = "primary",
169
+ size = "medium",
170
+ startIcon,
171
+ endIcon,
172
+ onClick,
173
+ className,
174
+ ...restProps
175
+ }) => {
176
+ const colorClasses = {
177
+ primary: "bg-button-solid-primary-background text-button-solid-primary-text",
178
+ secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
179
+ tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
180
+ positive: "bg-button-solid-positive-background text-button-solid-positive-text",
181
+ warning: "bg-button-solid-warning-background text-button-solid-warning-text",
182
+ negative: "bg-button-solid-negative-background text-button-solid-negative-text"
183
+ }[color];
184
+ const iconColorClasses = {
185
+ primary: "text-button-solid-primary-icon",
186
+ secondary: "text-button-solid-secondary-icon",
187
+ tertiary: "text-button-solid-tertiary-icon",
188
+ positive: "text-button-solid-positive-icon",
189
+ warning: "text-button-solid-warning-icon",
190
+ negative: "text-button-solid-negative-icon"
191
+ }[color];
192
+ return /* @__PURE__ */ jsxs(
193
+ "button",
194
+ {
195
+ onClick: disabled ? void 0 : onClick,
196
+ disabled: disabled || onClick === void 0,
197
+ className: clsx(
198
+ className,
199
+ {
200
+ "text-disabled-text bg-disabled-background": disabled,
201
+ [clsx(colorClasses, "hover:brightness-90")]: !disabled
202
+ },
203
+ ButtonSizePaddings[size]
204
+ ),
205
+ ...restProps,
206
+ children: [
207
+ startIcon && /* @__PURE__ */ jsx2(
208
+ "span",
209
+ {
210
+ className: clsx({
211
+ [iconColorClasses]: !disabled,
212
+ [`text-disabled-icon`]: disabled
213
+ }),
214
+ children: startIcon
215
+ }
216
+ ),
217
+ children,
218
+ endIcon && /* @__PURE__ */ jsx2(
219
+ "span",
220
+ {
221
+ className: clsx({
222
+ [iconColorClasses]: !disabled,
223
+ [`text-disabled-icon`]: disabled
224
+ }),
225
+ children: endIcon
226
+ }
227
+ )
228
+ ]
229
+ }
230
+ );
231
+ };
232
+ var TextButton = ({
233
+ children,
234
+ disabled = false,
235
+ color = "neutral",
236
+ size = "medium",
237
+ startIcon,
238
+ endIcon,
239
+ onClick,
240
+ className,
241
+ ...restProps
242
+ }) => {
243
+ const colorClasses = {
244
+ negative: "bg-transparent text-button-text-negative-text",
245
+ neutral: "bg-transparent text-button-text-neutral-text"
246
+ }[color];
247
+ const iconColorClasses = {
248
+ negative: "text-button-text-negative-icon",
249
+ neutral: "text-button-text-neutral-icon"
250
+ }[color];
251
+ return /* @__PURE__ */ jsxs(
252
+ "button",
253
+ {
254
+ onClick: disabled ? void 0 : onClick,
255
+ disabled: disabled || onClick === void 0,
256
+ className: clsx(
257
+ className,
258
+ {
259
+ "text-disabled-text": disabled,
260
+ [clsx(colorClasses, "hover:bg-button-text-hover-background rounded-full")]: !disabled
261
+ },
262
+ ButtonSizePaddings[size]
263
+ ),
264
+ ...restProps,
265
+ children: [
266
+ startIcon && /* @__PURE__ */ jsx2(
267
+ "span",
268
+ {
269
+ className: clsx({
270
+ [iconColorClasses]: !disabled,
271
+ [`text-disabled-icon`]: disabled
272
+ }),
273
+ children: startIcon
274
+ }
275
+ ),
276
+ children,
277
+ endIcon && /* @__PURE__ */ jsx2(
278
+ "span",
279
+ {
280
+ className: clsx({
281
+ [iconColorClasses]: !disabled,
282
+ [`text-disabled-icon`]: disabled
283
+ }),
284
+ children: endIcon
285
+ }
286
+ )
287
+ ]
288
+ }
289
+ );
290
+ };
291
+
292
+ // src/components/date/TimePicker.tsx
293
+ import { useEffect as useEffect3, useRef, useState as useState3 } from "react";
294
+ import { Scrollbars } from "react-custom-scrollbars-2";
295
+ import clsx2 from "clsx";
296
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
297
+ var TimePicker = ({
298
+ time = /* @__PURE__ */ new Date(),
299
+ onChange = noop,
300
+ is24HourFormat = true,
301
+ minuteIncrement = "5min",
302
+ maxHeight = 300,
303
+ className = ""
304
+ }) => {
305
+ const minuteRef = useRef(null);
306
+ const hourRef = useRef(null);
307
+ const isPM = time.getHours() >= 11;
308
+ const hours = is24HourFormat ? range(0, 23) : range(1, 12);
309
+ let minutes = range(0, 59);
310
+ useEffect3(() => {
311
+ const scrollToItem = () => {
312
+ if (minuteRef.current) {
313
+ const container = minuteRef.current.parentElement;
314
+ const hasOverflow = container.scrollHeight > maxHeight;
315
+ if (hasOverflow) {
316
+ minuteRef.current.scrollIntoView({
317
+ behavior: "instant",
318
+ block: "nearest"
319
+ });
320
+ }
321
+ }
322
+ };
323
+ scrollToItem();
324
+ }, [minuteRef, minuteRef.current]);
325
+ useEffect3(() => {
326
+ const scrollToItem = () => {
327
+ if (hourRef.current) {
328
+ const container = hourRef.current.parentElement;
329
+ const hasOverflow = container.scrollHeight > maxHeight;
330
+ if (hasOverflow) {
331
+ hourRef.current.scrollIntoView({
332
+ behavior: "instant",
333
+ block: "nearest"
334
+ });
335
+ }
336
+ }
337
+ };
338
+ scrollToItem();
339
+ }, [hourRef, hourRef.current]);
340
+ switch (minuteIncrement) {
341
+ case "5min":
342
+ minutes = minutes.filter((value) => value % 5 === 0);
343
+ break;
344
+ case "10min":
345
+ minutes = minutes.filter((value) => value % 10 === 0);
346
+ break;
347
+ case "15min":
348
+ minutes = minutes.filter((value) => value % 15 === 0);
349
+ break;
350
+ case "30min":
351
+ minutes = minutes.filter((value) => value % 30 === 0);
352
+ break;
353
+ }
354
+ const closestMinute = closestMatch(minutes, (item1, item2) => Math.abs(item1 - time.getMinutes()) < Math.abs(item2 - time.getMinutes()));
355
+ const style = (selected) => clsx2(
356
+ "chip-full hover:brightness-90 hover:bg-primary hover:text-on-primary rounded-md mr-3",
357
+ { "bg-primary text-on-primary": selected, "bg-white text-black": !selected }
358
+ );
359
+ const onChangeWrapper = (transformer) => {
360
+ const newDate = new Date(time);
361
+ transformer(newDate);
362
+ onChange(newDate);
363
+ };
364
+ return /* @__PURE__ */ jsxs2("div", { className: clsx2("row gap-x-2 w-fit min-w-[150px] select-none", className), children: [
365
+ /* @__PURE__ */ jsx3(Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx3("div", { className: "col gap-y-1 h-full", children: hours.map((hour) => {
366
+ const currentHour = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
367
+ return /* @__PURE__ */ jsx3(
368
+ "button",
369
+ {
370
+ ref: currentHour ? hourRef : void 0,
371
+ className: style(currentHour),
372
+ onClick: () => onChangeWrapper((newDate) => newDate.setHours(hour + (!is24HourFormat && isPM ? 12 : 0))),
373
+ children: hour.toString().padStart(2, "0")
374
+ },
375
+ hour
376
+ );
377
+ }) }) }),
378
+ /* @__PURE__ */ jsx3(Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx3("div", { className: "col gap-y-1 h-full", children: minutes.map((minute) => {
379
+ const currentMinute = minute === closestMinute;
380
+ return /* @__PURE__ */ jsx3(
381
+ "button",
382
+ {
383
+ ref: currentMinute ? minuteRef : void 0,
384
+ className: style(currentMinute),
385
+ onClick: () => onChangeWrapper((newDate) => newDate.setMinutes(minute)),
386
+ children: minute.toString().padStart(2, "0")
387
+ },
388
+ minute + minuteIncrement
389
+ );
390
+ }) }) }),
391
+ !is24HourFormat && /* @__PURE__ */ jsxs2("div", { className: "col gap-y-1", children: [
392
+ /* @__PURE__ */ jsx3(
393
+ "button",
394
+ {
395
+ className: style(!isPM),
396
+ onClick: () => onChangeWrapper((newDate) => isPM && newDate.setHours(newDate.getHours() - 12)),
397
+ children: "AM"
398
+ }
399
+ ),
400
+ /* @__PURE__ */ jsx3(
401
+ "button",
402
+ {
403
+ className: style(isPM),
404
+ onClick: () => onChangeWrapper((newDate) => !isPM && newDate.setHours(newDate.getHours() + 12)),
405
+ children: "PM"
406
+ }
407
+ )
408
+ ] })
409
+ ] });
410
+ };
411
+
412
+ // src/components/date/DatePicker.tsx
413
+ import { useEffect as useEffect6, useState as useState7 } from "react";
414
+ import { ArrowDown, ArrowUp, ChevronDown as ChevronDown2 } from "lucide-react";
415
+ import clsx6 from "clsx";
416
+
417
+ // src/components/date/YearMonthPicker.tsx
418
+ import { useEffect as useEffect4, useRef as useRef2, useState as useState5 } from "react";
419
+ import { Scrollbars as Scrollbars2 } from "react-custom-scrollbars-2";
420
+ import clsx4 from "clsx";
421
+
422
+ // src/components/Expandable.tsx
423
+ import { forwardRef, useState as useState4 } from "react";
424
+ import { ChevronDown, ChevronUp } from "lucide-react";
425
+ import clsx3 from "clsx";
426
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
427
+ var DefaultIcon = (expanded) => expanded ? /* @__PURE__ */ jsx4(ChevronUp, { size: 16, className: "min-w-[16px]" }) : /* @__PURE__ */ jsx4(ChevronDown, { size: 16, className: "min-w-[16px]" });
428
+ var Expandable = forwardRef(({
429
+ children,
430
+ label,
431
+ icon,
432
+ initialExpansion = false,
433
+ clickOnlyOnHeader = true,
434
+ className = "",
435
+ headerClassName = ""
436
+ }, ref) => {
437
+ const [isExpanded, setIsExpanded] = useState4(initialExpansion);
438
+ icon ??= DefaultIcon;
439
+ return /* @__PURE__ */ jsxs3(
440
+ "div",
441
+ {
442
+ ref,
443
+ className: clsx3("col bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader }, className),
444
+ onClick: () => !clickOnlyOnHeader && setIsExpanded(!isExpanded),
445
+ children: [
446
+ /* @__PURE__ */ jsxs3(
447
+ "button",
448
+ {
449
+ className: clsx3("btn-md rounded-lg justify-between items-center bg-surface text-on-surface", { "group-hover:brightness-95": !isExpanded }, headerClassName),
450
+ onClick: () => clickOnlyOnHeader && setIsExpanded(!isExpanded),
451
+ children: [
452
+ label,
453
+ icon(isExpanded)
454
+ ]
455
+ }
456
+ ),
457
+ isExpanded && /* @__PURE__ */ jsx4("div", { className: "col", children })
458
+ ]
459
+ }
460
+ );
461
+ });
462
+ Expandable.displayName = "Expandable";
463
+
464
+ // src/components/date/YearMonthPicker.tsx
465
+ import { jsx as jsx5 } from "react/jsx-runtime";
466
+ var YearMonthPicker = ({
467
+ displayedYearMonth = /* @__PURE__ */ new Date(),
468
+ start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
469
+ end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
470
+ onChange = noop,
471
+ className = "",
472
+ maxHeight = 300,
473
+ showValueOpen = true
474
+ }) => {
475
+ const locale = useLocale();
476
+ const ref = useRef2(null);
477
+ useEffect4(() => {
478
+ const scrollToItem = () => {
479
+ if (ref.current) {
480
+ ref.current.scrollIntoView({
481
+ behavior: "instant",
482
+ block: "center"
483
+ });
484
+ }
485
+ };
486
+ scrollToItem();
487
+ }, [ref]);
488
+ if (end < start) {
489
+ console.error(`startYear: (${start}) less than endYear: (${end})`);
490
+ return null;
491
+ }
492
+ const years = range(start.getFullYear(), end.getFullYear());
493
+ return /* @__PURE__ */ jsx5("div", { className: clsx4("col select-none", className), children: /* @__PURE__ */ jsx5(Scrollbars2, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx5("div", { className: "col gap-y-1 mr-3", children: years.map((year) => {
494
+ const selectedYear = displayedYearMonth.getFullYear() === year;
495
+ return /* @__PURE__ */ jsx5(
496
+ Expandable,
497
+ {
498
+ ref: (displayedYearMonth.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()) === year ? ref : void 0,
499
+ label: /* @__PURE__ */ jsx5("span", { className: clsx4({ "text-primary font-bold": selectedYear }), children: year }),
500
+ initialExpansion: showValueOpen && selectedYear,
501
+ children: /* @__PURE__ */ jsx5("div", { className: "col gap-y-1 px-2 pb-2", children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx5("div", { className: "row", children: monthList.map((month) => {
502
+ const monthIndex = monthsList.indexOf(month);
503
+ const newDate = new Date(year, monthIndex);
504
+ const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
505
+ const firstOfMonth = new Date(year, monthIndex, 1);
506
+ const lastOfMonth = new Date(year, monthIndex, 1);
507
+ const isAfterStart = start === void 0 || start <= addDuration(subtractDuration(lastOfMonth, { days: 1 }), { months: 1 });
508
+ const isBeforeEnd = end === void 0 || firstOfMonth <= end;
509
+ const isValid = isAfterStart && isBeforeEnd;
510
+ return /* @__PURE__ */ jsx5(
511
+ "button",
512
+ {
513
+ disabled: !isValid,
514
+ className: clsx4(
515
+ "chip hover:brightness-95 flex-1",
516
+ {
517
+ "bg-gray-50 text-black": !selectedMonth && isValid,
518
+ "bg-primary text-on-primary": selectedMonth && isValid,
519
+ "bg-disabled-background text-disabled-text": !isValid
520
+ }
521
+ ),
522
+ onClick: () => {
523
+ onChange(newDate);
524
+ },
525
+ children: new Intl.DateTimeFormat(locale, { month: "short" }).format(newDate)
526
+ },
527
+ month
528
+ );
529
+ }) }, index)) })
530
+ },
531
+ year
532
+ );
533
+ }) }) }) });
534
+ };
535
+
536
+ // src/components/date/DayPicker.tsx
537
+ import clsx5 from "clsx";
538
+ import { useEffect as useEffect5, useState as useState6 } from "react";
539
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
540
+ var DayPicker = ({
541
+ displayedMonth,
542
+ selected,
543
+ start,
544
+ end,
545
+ onChange = noop,
546
+ weekStart = "monday",
547
+ markToday = true,
548
+ className = ""
549
+ }) => {
550
+ const locale = useLocale();
551
+ const month = displayedMonth.getMonth();
552
+ const weeks = getWeeksForCalenderMonth(displayedMonth, weekStart);
553
+ return /* @__PURE__ */ jsxs4("div", { className: clsx5("col gap-y-1 min-w-[220px] select-none", className), children: [
554
+ /* @__PURE__ */ jsx6("div", { className: "row text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx6("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
555
+ weeks.map((week, index) => /* @__PURE__ */ jsx6("div", { className: "row text-center", children: week.map((date) => {
556
+ const isSelected = !!selected && equalDate(selected, date);
557
+ const isToday = equalDate(/* @__PURE__ */ new Date(), date);
558
+ const isSameMonth = date.getMonth() === month;
559
+ const isDayValid = isInTimeSpan(date, start, end);
560
+ return /* @__PURE__ */ jsx6(
561
+ "button",
562
+ {
563
+ disabled: !isDayValid,
564
+ className: clsx5(
565
+ "flex-1 rounded-full border-2 border-transparent shadow-sm",
566
+ {
567
+ "text-gray-700 bg-gray-100": !isSameMonth && isDayValid,
568
+ "text-black bg-white": !isSelected && isSameMonth && isDayValid,
569
+ "text-on-primary bg-primary": isSelected,
570
+ "border-black": isToday && markToday,
571
+ "hover:brightness-90 hover:bg-primary hover:text-on-primary": isDayValid,
572
+ "text-disabled-text bg-disabled-background": !isDayValid
573
+ }
574
+ ),
575
+ onClick: () => onChange(date),
576
+ children: date.getDate()
577
+ },
578
+ date.getDate()
579
+ );
580
+ }) }, index))
581
+ ] });
582
+ };
583
+
584
+ // src/components/date/DatePicker.tsx
585
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
586
+ var defaultDatePickerTranslation = {
587
+ en: {
588
+ today: "Today"
589
+ },
590
+ de: {
591
+ today: "Heute"
592
+ }
593
+ };
594
+ var DatePicker = ({
595
+ overwriteTranslation,
596
+ value = /* @__PURE__ */ new Date(),
597
+ start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
598
+ end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
599
+ initialDisplay = "day",
600
+ onChange = noop,
601
+ yearMonthPickerProps,
602
+ dayPickerProps,
603
+ className = ""
604
+ }) => {
605
+ const locale = useLocale();
606
+ const translation = useTranslation(defaultDatePickerTranslation, overwriteTranslation);
607
+ const [displayedMonth, setDisplayedMonth] = useState7(value);
608
+ const [displayMode, setDisplayMode] = useState7(initialDisplay);
609
+ useEffect6(() => {
610
+ setDisplayedMonth(value);
611
+ }, [value]);
612
+ return /* @__PURE__ */ jsxs5("div", { className: clsx6("col gap-y-4", className), children: [
613
+ /* @__PURE__ */ jsxs5("div", { className: "row items-center justify-between h-7", children: [
614
+ /* @__PURE__ */ jsxs5(
615
+ TextButton,
616
+ {
617
+ className: clsx6("row gap-x-1 items-center cursor-pointer select-none", {
618
+ "text-disabled-text": displayMode !== "day"
619
+ }),
620
+ onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
621
+ children: [
622
+ `${new Intl.DateTimeFormat(locale, { month: "long" }).format(displayedMonth)} ${displayedMonth.getFullYear()}`,
623
+ /* @__PURE__ */ jsx7(ChevronDown2, { size: 16 })
624
+ ]
625
+ }
626
+ ),
627
+ displayMode === "day" && /* @__PURE__ */ jsxs5("div", { className: "row justify-end", children: [
628
+ /* @__PURE__ */ jsx7(
629
+ SolidButton,
630
+ {
631
+ size: "small",
632
+ color: "primary",
633
+ disabled: !isInTimeSpan(subtractDuration(displayedMonth, { months: 1 }), start, end),
634
+ onClick: () => {
635
+ setDisplayedMonth(subtractDuration(displayedMonth, { months: 1 }));
636
+ },
637
+ children: /* @__PURE__ */ jsx7(ArrowUp, { size: 20 })
638
+ }
639
+ ),
640
+ /* @__PURE__ */ jsx7(
641
+ SolidButton,
642
+ {
643
+ size: "small",
644
+ color: "primary",
645
+ disabled: !isInTimeSpan(addDuration(displayedMonth, { months: 1 }), start, end),
646
+ onClick: () => {
647
+ setDisplayedMonth(addDuration(displayedMonth, { months: 1 }));
648
+ },
649
+ children: /* @__PURE__ */ jsx7(ArrowDown, { size: 20 })
650
+ }
651
+ )
652
+ ] })
653
+ ] }),
654
+ displayMode === "yearMonth" ? /* @__PURE__ */ jsx7(
655
+ YearMonthPicker,
656
+ {
657
+ ...yearMonthPickerProps,
658
+ displayedYearMonth: value,
659
+ start,
660
+ end,
661
+ onChange: (newDate) => {
662
+ setDisplayedMonth(newDate);
663
+ setDisplayMode("day");
664
+ }
665
+ }
666
+ ) : /* @__PURE__ */ jsxs5("div", { children: [
667
+ /* @__PURE__ */ jsx7(
668
+ DayPicker,
669
+ {
670
+ ...dayPickerProps,
671
+ displayedMonth,
672
+ start,
673
+ end,
674
+ selected: value,
675
+ onChange: (date) => {
676
+ onChange(date);
677
+ }
678
+ }
679
+ ),
680
+ /* @__PURE__ */ jsx7("div", { className: "mt-2", children: /* @__PURE__ */ jsx7(
681
+ TextButton,
682
+ {
683
+ onClick: () => {
684
+ const newDate = /* @__PURE__ */ new Date();
685
+ newDate.setHours(value.getHours(), value.getMinutes());
686
+ onChange(newDate);
687
+ },
688
+ children: translation.today
689
+ }
690
+ ) })
691
+ ] })
692
+ ] });
693
+ };
694
+
695
+ // src/components/user-input/DateAndTimePicker.tsx
696
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
697
+ var defaultTimeTranslation = {
698
+ en: {
699
+ clear: "Clear",
700
+ change: "Change",
701
+ year: "Year",
702
+ month: "Month",
703
+ day: "Day",
704
+ january: "January",
705
+ february: "Febuary",
706
+ march: "March",
707
+ april: "April",
708
+ may: "May",
709
+ june: "June",
710
+ july: "July",
711
+ august: "August",
712
+ september: "September",
713
+ october: "October",
714
+ november: "November",
715
+ december: "December"
716
+ },
717
+ de: {
718
+ clear: "Entfernen",
719
+ change: "\xC4ndern",
720
+ year: "Jahr",
721
+ month: "Monat",
722
+ day: "Tag",
723
+ january: "Januar",
724
+ february: "Febuar",
725
+ march: "M\xE4rz",
726
+ april: "April",
727
+ may: "Mai",
728
+ june: "Juni",
729
+ july: "Juli",
730
+ august: "August",
731
+ september: "September",
732
+ october: "October",
733
+ november: "November",
734
+ december: "December"
735
+ }
736
+ };
737
+ var DateTimePicker = ({
738
+ overwriteTranslation,
739
+ value = /* @__PURE__ */ new Date(),
740
+ start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
741
+ end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
742
+ mode = "dateTime",
743
+ onFinish = noop,
744
+ onChange = noop,
745
+ onRemove = noop,
746
+ timePickerProps,
747
+ datePickerProps
748
+ }) => {
749
+ const translation = useTranslation(defaultTimeTranslation, overwriteTranslation);
750
+ const useDate = mode === "dateTime" || mode === "date";
751
+ const useTime = mode === "dateTime" || mode === "time";
752
+ let dateDisplay;
753
+ let timeDisplay;
754
+ if (useDate) {
755
+ dateDisplay = /* @__PURE__ */ jsx8(
756
+ DatePicker,
757
+ {
758
+ ...datePickerProps,
759
+ className: "min-w-[320px] min-h-[250px]",
760
+ yearMonthPickerProps: { maxHeight: 218 },
761
+ value,
762
+ start,
763
+ end,
764
+ onChange
765
+ }
766
+ );
767
+ }
768
+ if (useTime) {
769
+ timeDisplay = /* @__PURE__ */ jsx8(
770
+ TimePicker,
771
+ {
772
+ ...timePickerProps,
773
+ className: clsx7("h-full", { "justify-between w-full": mode === "time" }),
774
+ maxHeight: 250,
775
+ time: value,
776
+ onChange
777
+ }
778
+ );
779
+ }
780
+ return /* @__PURE__ */ jsxs6("div", { className: "col w-fit", children: [
781
+ /* @__PURE__ */ jsxs6("div", { className: "row gap-x-4", children: [
782
+ dateDisplay,
783
+ timeDisplay
784
+ ] }),
785
+ /* @__PURE__ */ jsx8("div", { className: "row justify-end", children: /* @__PURE__ */ jsxs6("div", { className: "row gap-x-2 mt-1", children: [
786
+ /* @__PURE__ */ jsx8(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation.clear }),
787
+ /* @__PURE__ */ jsx8(
788
+ SolidButton,
789
+ {
790
+ size: "medium",
791
+ onClick: () => onFinish(value),
792
+ children: translation.change
793
+ }
794
+ )
795
+ ] }) })
796
+ ] });
797
+ };
798
+ export {
799
+ DateTimePicker
800
+ };
801
+ //# sourceMappingURL=DateAndTimePicker.mjs.map