@helpwave/hightide 0.1.24 → 0.1.26

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 (602) hide show
  1. package/README.md +1 -1
  2. package/dist/components/branding/HelpwaveBadge.d.mts +4 -5
  3. package/dist/components/branding/HelpwaveBadge.d.ts +4 -5
  4. package/dist/components/branding/HelpwaveBadge.js +46 -87
  5. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  6. package/dist/components/branding/HelpwaveBadge.mjs +46 -89
  7. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  8. package/dist/components/date/DatePicker.d.mts +1 -1
  9. package/dist/components/date/DatePicker.d.ts +1 -1
  10. package/dist/components/date/DatePicker.js +106 -60
  11. package/dist/components/date/DatePicker.js.map +1 -1
  12. package/dist/components/date/DatePicker.mjs +107 -61
  13. package/dist/components/date/DatePicker.mjs.map +1 -1
  14. package/dist/components/date/DayPicker.d.mts +1 -1
  15. package/dist/components/date/DayPicker.d.ts +1 -1
  16. package/dist/components/date/DayPicker.js +3 -3
  17. package/dist/components/date/DayPicker.js.map +1 -1
  18. package/dist/components/date/DayPicker.mjs +3 -3
  19. package/dist/components/date/DayPicker.mjs.map +1 -1
  20. package/dist/components/date/TimeDisplay.js.map +1 -1
  21. package/dist/components/date/TimeDisplay.mjs.map +1 -1
  22. package/dist/components/date/TimePicker.js +2 -2
  23. package/dist/components/date/TimePicker.js.map +1 -1
  24. package/dist/components/date/TimePicker.mjs +2 -2
  25. package/dist/components/date/TimePicker.mjs.map +1 -1
  26. package/dist/components/date/YearMonthPicker.js +84 -36
  27. package/dist/components/date/YearMonthPicker.js.map +1 -1
  28. package/dist/components/date/YearMonthPicker.mjs +85 -37
  29. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  30. package/dist/components/{dialogs → dialog}/ConfirmDialog.d.mts +9 -8
  31. package/dist/components/{dialogs → dialog}/ConfirmDialog.d.ts +9 -8
  32. package/dist/components/dialog/ConfirmDialog.js +938 -0
  33. package/dist/components/dialog/ConfirmDialog.js.map +1 -0
  34. package/dist/components/dialog/ConfirmDialog.mjs +902 -0
  35. package/dist/components/dialog/ConfirmDialog.mjs.map +1 -0
  36. package/dist/components/dialog/Dialog.d.mts +27 -0
  37. package/dist/components/dialog/Dialog.d.ts +27 -0
  38. package/dist/components/dialog/Dialog.js +879 -0
  39. package/dist/components/dialog/Dialog.js.map +1 -0
  40. package/dist/components/dialog/Dialog.mjs +845 -0
  41. package/dist/components/dialog/Dialog.mjs.map +1 -0
  42. package/dist/components/dialog/DiscardChangesDialog.d.mts +24 -0
  43. package/dist/components/dialog/DiscardChangesDialog.d.ts +24 -0
  44. package/dist/components/dialog/DiscardChangesDialog.js +966 -0
  45. package/dist/components/dialog/DiscardChangesDialog.js.map +1 -0
  46. package/dist/components/dialog/DiscardChangesDialog.mjs +930 -0
  47. package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -0
  48. package/dist/components/dialog/InputDialog.d.mts +22 -0
  49. package/dist/components/dialog/InputDialog.d.ts +22 -0
  50. package/dist/components/dialog/InputDialog.js +1139 -0
  51. package/dist/components/dialog/InputDialog.js.map +1 -0
  52. package/dist/components/dialog/InputDialog.mjs +1103 -0
  53. package/dist/components/dialog/InputDialog.mjs.map +1 -0
  54. package/dist/components/dialog/LanguageDialog.d.mts +25 -0
  55. package/dist/components/dialog/LanguageDialog.d.ts +25 -0
  56. package/dist/components/dialog/LanguageDialog.js +1684 -0
  57. package/dist/components/dialog/LanguageDialog.js.map +1 -0
  58. package/dist/components/dialog/LanguageDialog.mjs +1658 -0
  59. package/dist/components/dialog/LanguageDialog.mjs.map +1 -0
  60. package/dist/components/dialog/ThemeDialog.d.mts +26 -0
  61. package/dist/components/dialog/ThemeDialog.d.ts +26 -0
  62. package/dist/components/dialog/ThemeDialog.js +1715 -0
  63. package/dist/components/dialog/ThemeDialog.js.map +1 -0
  64. package/dist/components/dialog/ThemeDialog.mjs +1689 -0
  65. package/dist/components/dialog/ThemeDialog.mjs.map +1 -0
  66. package/dist/components/dialog/index.d.mts +17 -0
  67. package/dist/components/dialog/index.d.ts +17 -0
  68. package/dist/components/dialog/index.js +2062 -0
  69. package/dist/components/dialog/index.js.map +1 -0
  70. package/dist/components/dialog/index.mjs +2031 -0
  71. package/dist/components/dialog/index.mjs.map +1 -0
  72. package/dist/components/form/FormElementWrapper.d.mts +29 -0
  73. package/dist/components/form/FormElementWrapper.d.ts +29 -0
  74. package/dist/components/form/FormElementWrapper.js +98 -0
  75. package/dist/components/form/FormElementWrapper.js.map +1 -0
  76. package/dist/components/form/FormElementWrapper.mjs +64 -0
  77. package/dist/components/form/FormElementWrapper.mjs.map +1 -0
  78. package/dist/components/icons-and-geometry/Avatar.js +498 -2886
  79. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  80. package/dist/components/icons-and-geometry/Avatar.mjs +490 -2878
  81. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  82. package/dist/components/icons-and-geometry/{Helpwave.d.mts → HelpwaveLogo.d.mts} +3 -3
  83. package/dist/components/icons-and-geometry/{Helpwave.d.ts → HelpwaveLogo.d.ts} +3 -3
  84. package/dist/components/icons-and-geometry/{Helpwave.js → HelpwaveLogo.js} +21 -22
  85. package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +1 -0
  86. package/dist/components/icons-and-geometry/{Helpwave.mjs → HelpwaveLogo.mjs} +17 -18
  87. package/dist/components/icons-and-geometry/HelpwaveLogo.mjs.map +1 -0
  88. package/dist/components/icons-and-geometry/Ring.js +1 -1
  89. package/dist/components/icons-and-geometry/Ring.js.map +1 -1
  90. package/dist/components/icons-and-geometry/Ring.mjs +1 -1
  91. package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
  92. package/dist/components/icons-and-geometry/Tag.js +8 -20
  93. package/dist/components/icons-and-geometry/Tag.js.map +1 -1
  94. package/dist/components/icons-and-geometry/Tag.mjs +8 -20
  95. package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
  96. package/dist/components/layout-and-navigation/BreadCrumb.js +667 -22
  97. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  98. package/dist/components/layout-and-navigation/BreadCrumb.mjs +667 -22
  99. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
  100. package/dist/components/layout-and-navigation/Carousel.js +52 -53
  101. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  102. package/dist/components/layout-and-navigation/Carousel.mjs +52 -53
  103. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  104. package/dist/components/layout-and-navigation/Chip.d.mts +8 -5
  105. package/dist/components/layout-and-navigation/Chip.d.ts +8 -5
  106. package/dist/components/layout-and-navigation/Chip.js +17 -4
  107. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  108. package/dist/components/layout-and-navigation/Chip.mjs +17 -4
  109. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  110. package/dist/components/layout-and-navigation/Expandable.d.mts +13 -10
  111. package/dist/components/layout-and-navigation/Expandable.d.ts +13 -10
  112. package/dist/components/layout-and-navigation/Expandable.js +18 -5
  113. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  114. package/dist/components/layout-and-navigation/Expandable.mjs +19 -6
  115. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  116. package/dist/components/layout-and-navigation/FAQSection.js +21 -8
  117. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  118. package/dist/components/layout-and-navigation/FAQSection.mjs +22 -9
  119. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  120. package/dist/components/layout-and-navigation/FloatingContainer.d.mts +38 -0
  121. package/dist/components/layout-and-navigation/FloatingContainer.d.ts +38 -0
  122. package/dist/components/layout-and-navigation/FloatingContainer.js +219 -0
  123. package/dist/components/layout-and-navigation/FloatingContainer.js.map +1 -0
  124. package/dist/components/layout-and-navigation/FloatingContainer.mjs +195 -0
  125. package/dist/components/layout-and-navigation/FloatingContainer.mjs.map +1 -0
  126. package/dist/components/layout-and-navigation/ListBox.d.mts +44 -0
  127. package/dist/components/layout-and-navigation/ListBox.d.ts +44 -0
  128. package/dist/components/layout-and-navigation/ListBox.js +329 -0
  129. package/dist/components/layout-and-navigation/ListBox.js.map +1 -0
  130. package/dist/components/layout-and-navigation/ListBox.mjs +290 -0
  131. package/dist/components/layout-and-navigation/ListBox.mjs.map +1 -0
  132. package/dist/components/layout-and-navigation/Pagination.js +142 -230
  133. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  134. package/dist/components/layout-and-navigation/Pagination.mjs +137 -225
  135. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  136. package/dist/components/layout-and-navigation/ScrollArea.d.mts +15 -0
  137. package/dist/components/layout-and-navigation/ScrollArea.d.ts +15 -0
  138. package/dist/components/layout-and-navigation/ScrollArea.js +1252 -0
  139. package/dist/components/layout-and-navigation/ScrollArea.js.map +1 -0
  140. package/dist/components/layout-and-navigation/ScrollArea.mjs +1216 -0
  141. package/dist/components/layout-and-navigation/ScrollArea.mjs.map +1 -0
  142. package/dist/components/layout-and-navigation/StepperBar.js +67 -30
  143. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  144. package/dist/components/layout-and-navigation/StepperBar.mjs +67 -30
  145. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  146. package/dist/components/layout-and-navigation/TextImage.js +3 -1
  147. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  148. package/dist/components/layout-and-navigation/TextImage.mjs +3 -1
  149. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  150. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  151. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  152. package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +1 -1
  153. package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +1 -1
  154. package/dist/components/loading-states/LoadingAnimation.js +18 -17
  155. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  156. package/dist/components/loading-states/LoadingAnimation.mjs +18 -17
  157. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  158. package/dist/components/loading-states/LoadingButton.js +81 -47
  159. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  160. package/dist/components/loading-states/LoadingButton.mjs +81 -47
  161. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  162. package/dist/components/properties/CheckboxProperty.js +929 -153
  163. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  164. package/dist/components/properties/CheckboxProperty.mjs +936 -160
  165. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  166. package/dist/components/properties/DateProperty.js +191 -241
  167. package/dist/components/properties/DateProperty.js.map +1 -1
  168. package/dist/components/properties/DateProperty.mjs +184 -234
  169. package/dist/components/properties/DateProperty.mjs.map +1 -1
  170. package/dist/components/properties/MultiSelectProperty.d.mts +5 -10
  171. package/dist/components/properties/MultiSelectProperty.d.ts +5 -10
  172. package/dist/components/properties/MultiSelectProperty.js +1193 -1189
  173. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  174. package/dist/components/properties/MultiSelectProperty.mjs +1207 -1193
  175. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  176. package/dist/components/properties/NumberProperty.js +193 -244
  177. package/dist/components/properties/NumberProperty.js.map +1 -1
  178. package/dist/components/properties/NumberProperty.mjs +186 -237
  179. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  180. package/dist/components/properties/PropertyBase.js +91 -56
  181. package/dist/components/properties/PropertyBase.js.map +1 -1
  182. package/dist/components/properties/PropertyBase.mjs +91 -56
  183. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  184. package/dist/components/properties/SelectProperty.d.mts +5 -8
  185. package/dist/components/properties/SelectProperty.d.ts +5 -8
  186. package/dist/components/properties/SelectProperty.js +1102 -897
  187. package/dist/components/properties/SelectProperty.js.map +1 -1
  188. package/dist/components/properties/SelectProperty.mjs +1107 -892
  189. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  190. package/dist/components/properties/TextProperty.js +139 -147
  191. package/dist/components/properties/TextProperty.js.map +1 -1
  192. package/dist/components/properties/TextProperty.mjs +142 -150
  193. package/dist/components/properties/TextProperty.mjs.map +1 -1
  194. package/dist/components/table/Table.js +1639 -991
  195. package/dist/components/table/Table.js.map +1 -1
  196. package/dist/components/table/Table.mjs +1645 -997
  197. package/dist/components/table/Table.mjs.map +1 -1
  198. package/dist/components/table/TableFilterButton.js +156 -244
  199. package/dist/components/table/TableFilterButton.js.map +1 -1
  200. package/dist/components/table/TableFilterButton.mjs +145 -233
  201. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  202. package/dist/components/table/TableSortButton.js +44 -46
  203. package/dist/components/table/TableSortButton.js.map +1 -1
  204. package/dist/components/table/TableSortButton.mjs +44 -46
  205. package/dist/components/table/TableSortButton.mjs.map +1 -1
  206. package/dist/components/user-action/Button.d.mts +17 -13
  207. package/dist/components/user-action/Button.d.ts +17 -13
  208. package/dist/components/user-action/Button.js +80 -87
  209. package/dist/components/user-action/Button.js.map +1 -1
  210. package/dist/components/user-action/Button.mjs +80 -87
  211. package/dist/components/user-action/Button.mjs.map +1 -1
  212. package/dist/components/user-action/Checkbox.d.mts +9 -25
  213. package/dist/components/user-action/Checkbox.d.ts +9 -25
  214. package/dist/components/user-action/Checkbox.js +794 -78
  215. package/dist/components/user-action/Checkbox.js.map +1 -1
  216. package/dist/components/user-action/Checkbox.mjs +795 -79
  217. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  218. package/dist/components/user-action/CopyToClipboardWrapper.js +3 -1
  219. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  220. package/dist/components/user-action/CopyToClipboardWrapper.mjs +3 -1
  221. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  222. package/dist/components/user-action/DateAndTimePicker.d.mts +1 -1
  223. package/dist/components/user-action/DateAndTimePicker.d.ts +1 -1
  224. package/dist/components/user-action/DateAndTimePicker.js +108 -60
  225. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  226. package/dist/components/user-action/DateAndTimePicker.mjs +109 -61
  227. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  228. package/dist/components/user-action/Label.d.mts +6 -8
  229. package/dist/components/user-action/Label.d.ts +6 -8
  230. package/dist/components/user-action/Label.js +4 -6
  231. package/dist/components/user-action/Label.js.map +1 -1
  232. package/dist/components/user-action/Label.mjs +4 -6
  233. package/dist/components/user-action/Label.mjs.map +1 -1
  234. package/dist/components/user-action/Menu.d.mts +2 -2
  235. package/dist/components/user-action/Menu.d.ts +2 -2
  236. package/dist/components/user-action/Menu.js +1 -1
  237. package/dist/components/user-action/Menu.js.map +1 -1
  238. package/dist/components/user-action/Menu.mjs +1 -1
  239. package/dist/components/user-action/Menu.mjs.map +1 -1
  240. package/dist/components/user-action/ScrollPicker.js +8 -6
  241. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  242. package/dist/components/user-action/ScrollPicker.mjs +8 -6
  243. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  244. package/dist/components/user-action/SearchBar.d.mts +1 -2
  245. package/dist/components/user-action/SearchBar.d.ts +1 -2
  246. package/dist/components/user-action/SearchBar.js +131 -219
  247. package/dist/components/user-action/SearchBar.js.map +1 -1
  248. package/dist/components/user-action/SearchBar.mjs +124 -212
  249. package/dist/components/user-action/SearchBar.mjs.map +1 -1
  250. package/dist/components/user-action/Textarea.d.mts +22 -11
  251. package/dist/components/user-action/Textarea.d.ts +22 -11
  252. package/dist/components/user-action/Textarea.js +101 -92
  253. package/dist/components/user-action/Textarea.js.map +1 -1
  254. package/dist/components/user-action/Textarea.mjs +100 -92
  255. package/dist/components/user-action/Textarea.mjs.map +1 -1
  256. package/dist/components/user-action/input/Input.d.mts +37 -0
  257. package/dist/components/user-action/input/Input.d.ts +37 -0
  258. package/dist/components/user-action/input/Input.js +244 -0
  259. package/dist/components/user-action/input/Input.js.map +1 -0
  260. package/dist/components/user-action/input/Input.mjs +209 -0
  261. package/dist/components/user-action/input/Input.mjs.map +1 -0
  262. package/dist/components/user-action/input/InsideLabelInput.d.mts +20 -0
  263. package/dist/components/user-action/input/InsideLabelInput.d.ts +20 -0
  264. package/dist/components/user-action/input/InsideLabelInput.js +295 -0
  265. package/dist/components/user-action/input/InsideLabelInput.js.map +1 -0
  266. package/dist/components/user-action/input/InsideLabelInput.mjs +260 -0
  267. package/dist/components/user-action/input/InsideLabelInput.mjs.map +1 -0
  268. package/dist/components/user-action/input/ToggleableInput.d.mts +22 -0
  269. package/dist/components/user-action/input/ToggleableInput.d.ts +22 -0
  270. package/dist/components/user-action/{Input.js → input/ToggleableInput.js} +136 -171
  271. package/dist/components/user-action/input/ToggleableInput.js.map +1 -0
  272. package/dist/components/user-action/input/ToggleableInput.mjs +264 -0
  273. package/dist/components/user-action/input/ToggleableInput.mjs.map +1 -0
  274. package/dist/components/user-action/select/Select.d.mts +98 -0
  275. package/dist/components/user-action/select/Select.d.ts +98 -0
  276. package/dist/components/user-action/select/Select.js +1354 -0
  277. package/dist/components/user-action/select/Select.js.map +1 -0
  278. package/dist/components/user-action/select/Select.mjs +1320 -0
  279. package/dist/components/user-action/select/Select.mjs.map +1 -0
  280. package/dist/components/utils/FocusTrap.d.mts +28 -0
  281. package/dist/components/utils/FocusTrap.d.ts +28 -0
  282. package/dist/components/utils/FocusTrap.js +252 -0
  283. package/dist/components/utils/FocusTrap.js.map +1 -0
  284. package/dist/components/utils/FocusTrap.mjs +229 -0
  285. package/dist/components/utils/FocusTrap.mjs.map +1 -0
  286. package/dist/components/utils/Transition.d.mts +26 -0
  287. package/dist/components/utils/Transition.d.ts +26 -0
  288. package/dist/components/utils/Transition.js +74 -0
  289. package/dist/components/utils/Transition.js.map +1 -0
  290. package/dist/components/utils/Transition.mjs +50 -0
  291. package/dist/components/utils/Transition.mjs.map +1 -0
  292. package/dist/hooks/focus/useFocusGuards.d.mts +3 -0
  293. package/dist/hooks/focus/useFocusGuards.d.ts +3 -0
  294. package/dist/hooks/focus/useFocusGuards.js +74 -0
  295. package/dist/hooks/focus/useFocusGuards.js.map +1 -0
  296. package/dist/hooks/focus/useFocusGuards.mjs +50 -0
  297. package/dist/hooks/focus/useFocusGuards.mjs.map +1 -0
  298. package/dist/hooks/{useFocusManagement.js → focus/useFocusManagement.js} +1 -1
  299. package/dist/hooks/focus/useFocusManagement.js.map +1 -0
  300. package/dist/hooks/{useFocusManagement.mjs → focus/useFocusManagement.mjs} +1 -1
  301. package/dist/hooks/focus/useFocusManagement.mjs.map +1 -0
  302. package/dist/hooks/{useFocusOnceVisible.js → focus/useFocusOnceVisible.js} +1 -1
  303. package/dist/hooks/focus/useFocusOnceVisible.js.map +1 -0
  304. package/dist/hooks/{useFocusOnceVisible.mjs → focus/useFocusOnceVisible.mjs} +1 -1
  305. package/dist/hooks/focus/useFocusOnceVisible.mjs.map +1 -0
  306. package/dist/hooks/focus/useFocusTrap.d.mts +16 -0
  307. package/dist/hooks/focus/useFocusTrap.d.ts +16 -0
  308. package/dist/hooks/focus/useFocusTrap.js +233 -0
  309. package/dist/hooks/focus/useFocusTrap.js.map +1 -0
  310. package/dist/hooks/focus/useFocusTrap.mjs +210 -0
  311. package/dist/hooks/focus/useFocusTrap.mjs.map +1 -0
  312. package/dist/hooks/focus/useIsMounted.d.mts +3 -0
  313. package/dist/hooks/focus/useIsMounted.d.ts +3 -0
  314. package/dist/hooks/focus/useIsMounted.js +43 -0
  315. package/dist/hooks/focus/useIsMounted.js.map +1 -0
  316. package/dist/hooks/focus/useIsMounted.mjs +20 -0
  317. package/dist/hooks/focus/useIsMounted.mjs.map +1 -0
  318. package/dist/hooks/useFloatingElement.d.mts +22 -0
  319. package/dist/hooks/useFloatingElement.d.ts +22 -0
  320. package/dist/hooks/useFloatingElement.js +162 -0
  321. package/dist/hooks/useFloatingElement.js.map +1 -0
  322. package/dist/hooks/useFloatingElement.mjs +139 -0
  323. package/dist/hooks/useFloatingElement.mjs.map +1 -0
  324. package/dist/hooks/useLocalStorage.js +2 -2
  325. package/dist/hooks/useLocalStorage.js.map +1 -1
  326. package/dist/hooks/useLocalStorage.mjs +2 -2
  327. package/dist/hooks/useLocalStorage.mjs.map +1 -1
  328. package/dist/hooks/useLogOnce.d.mts +3 -4
  329. package/dist/hooks/useLogOnce.d.ts +3 -4
  330. package/dist/hooks/useLogOnce.js +5 -5
  331. package/dist/hooks/useLogOnce.js.map +1 -1
  332. package/dist/hooks/useLogOnce.mjs +5 -5
  333. package/dist/hooks/useLogOnce.mjs.map +1 -1
  334. package/dist/hooks/useRerender.d.mts +2 -2
  335. package/dist/hooks/useRerender.d.ts +2 -2
  336. package/dist/hooks/useSearch.d.mts +2 -2
  337. package/dist/hooks/useSearch.d.ts +2 -2
  338. package/dist/hooks/useSearch.js +1 -1
  339. package/dist/hooks/useSearch.js.map +1 -1
  340. package/dist/hooks/useSearch.mjs +1 -1
  341. package/dist/hooks/useSearch.mjs.map +1 -1
  342. package/dist/localization/LanguageProvider.d.mts +2 -2
  343. package/dist/localization/LanguageProvider.d.ts +2 -2
  344. package/dist/localization/LanguageProvider.js +2 -2
  345. package/dist/localization/LanguageProvider.js.map +1 -1
  346. package/dist/localization/LanguageProvider.mjs +2 -2
  347. package/dist/localization/LanguageProvider.mjs.map +1 -1
  348. package/dist/localization/defaults/form.d.mts +1 -0
  349. package/dist/localization/defaults/form.d.ts +1 -0
  350. package/dist/localization/defaults/form.js +2 -0
  351. package/dist/localization/defaults/form.js.map +1 -1
  352. package/dist/localization/defaults/form.mjs +2 -0
  353. package/dist/localization/defaults/form.mjs.map +1 -1
  354. package/dist/localization/useTranslation.js.map +1 -1
  355. package/dist/localization/useTranslation.mjs.map +1 -1
  356. package/dist/storybook/helper.d.mts +17 -0
  357. package/dist/storybook/helper.d.ts +17 -0
  358. package/dist/storybook/helper.js +61 -0
  359. package/dist/storybook/helper.js.map +1 -0
  360. package/dist/storybook/helper.mjs +37 -0
  361. package/dist/storybook/helper.mjs.map +1 -0
  362. package/dist/{css → style}/globals.css +994 -456
  363. package/dist/{css → style}/uncompiled/globals.css +75 -13
  364. package/dist/{css → style}/uncompiled/theme/colors-component.css +18 -4
  365. package/dist/{css → style}/uncompiled/theme/colors-semantic.css +2 -9
  366. package/dist/style/uncompiled/typography.css +171 -0
  367. package/dist/{css → style}/uncompiled/utitlity/animation.css +54 -42
  368. package/dist/{css → style}/uncompiled/utitlity/index.css +2 -1
  369. package/dist/{css → style}/uncompiled/utitlity/shadow.css +5 -1
  370. package/dist/style/uncompiled/utitlity/sizing.css +29 -0
  371. package/dist/theming/useTheme.d.mts +2 -2
  372. package/dist/theming/useTheme.d.ts +2 -2
  373. package/dist/theming/useTheme.js +4 -4
  374. package/dist/theming/useTheme.js.map +1 -1
  375. package/dist/theming/useTheme.mjs +4 -4
  376. package/dist/theming/useTheme.mjs.map +1 -1
  377. package/dist/{util → utils}/array.d.mts +1 -0
  378. package/dist/{util → utils}/array.d.ts +1 -0
  379. package/dist/{util → utils}/array.js +15 -2
  380. package/dist/utils/array.js.map +1 -0
  381. package/dist/{util → utils}/array.mjs +15 -2
  382. package/dist/utils/array.mjs.map +1 -0
  383. package/dist/utils/bagFunctions.d.mts +15 -0
  384. package/dist/utils/bagFunctions.d.ts +15 -0
  385. package/dist/{util/PropsWithFunctionChildren.js → utils/bagFunctions.js} +5 -5
  386. package/dist/utils/bagFunctions.js.map +1 -0
  387. package/dist/{util/PropsWithFunctionChildren.mjs → utils/bagFunctions.mjs} +2 -2
  388. package/dist/utils/bagFunctions.mjs.map +1 -0
  389. package/dist/{util → utils}/builder.js +1 -1
  390. package/dist/utils/builder.js.map +1 -0
  391. package/dist/{util → utils}/builder.mjs +1 -1
  392. package/dist/utils/builder.mjs.map +1 -0
  393. package/dist/{util → utils}/date.js +3 -3
  394. package/dist/utils/date.js.map +1 -0
  395. package/dist/{util → utils}/date.mjs +2 -2
  396. package/dist/utils/date.mjs.map +1 -0
  397. package/dist/{util → utils}/easeFunctions.js +5 -4
  398. package/dist/utils/easeFunctions.js.map +1 -0
  399. package/dist/{util → utils}/easeFunctions.mjs +4 -3
  400. package/dist/utils/easeFunctions.mjs.map +1 -0
  401. package/dist/{util → utils}/emailValidation.js +1 -1
  402. package/dist/utils/emailValidation.js.map +1 -0
  403. package/dist/{util → utils}/emailValidation.mjs +1 -1
  404. package/dist/utils/emailValidation.mjs.map +1 -0
  405. package/dist/{util → utils}/loopingArray.js +1 -1
  406. package/dist/utils/loopingArray.js.map +1 -0
  407. package/dist/{util → utils}/loopingArray.mjs +1 -1
  408. package/dist/utils/loopingArray.mjs.map +1 -0
  409. package/dist/utils/match.d.mts +3 -0
  410. package/dist/utils/match.d.ts +3 -0
  411. package/dist/utils/match.js +32 -0
  412. package/dist/utils/match.js.map +1 -0
  413. package/dist/utils/match.mjs +8 -0
  414. package/dist/utils/match.mjs.map +1 -0
  415. package/dist/utils/math.d.mts +3 -0
  416. package/dist/utils/math.d.ts +3 -0
  417. package/dist/{util → utils}/math.js +3 -2
  418. package/dist/utils/math.js.map +1 -0
  419. package/dist/utils/math.mjs +9 -0
  420. package/dist/utils/math.mjs.map +1 -0
  421. package/dist/{util → utils}/noop.js +1 -1
  422. package/dist/utils/noop.js.map +1 -0
  423. package/dist/utils/noop.mjs +6 -0
  424. package/dist/utils/noop.mjs.map +1 -0
  425. package/dist/{util → utils}/resolveSetState.js +1 -1
  426. package/dist/utils/resolveSetState.js.map +1 -0
  427. package/dist/{util → utils}/resolveSetState.mjs +1 -1
  428. package/dist/utils/resolveSetState.mjs.map +1 -0
  429. package/dist/{util → utils}/simpleSearch.js +1 -1
  430. package/dist/utils/simpleSearch.js.map +1 -0
  431. package/dist/{util → utils}/simpleSearch.mjs +1 -1
  432. package/dist/utils/simpleSearch.mjs.map +1 -0
  433. package/dist/{util → utils}/storage.js +1 -1
  434. package/dist/utils/storage.js.map +1 -0
  435. package/dist/{util → utils}/storage.mjs +1 -1
  436. package/dist/utils/storage.mjs.map +1 -0
  437. package/dist/{util → utils}/writeToClipboard.js +2 -1
  438. package/dist/utils/writeToClipboard.js.map +1 -0
  439. package/dist/{util → utils}/writeToClipboard.mjs +3 -1
  440. package/dist/utils/writeToClipboard.mjs.map +1 -0
  441. package/package.json +8 -8
  442. package/dist/components/dialogs/ConfirmDialog.js +0 -677
  443. package/dist/components/dialogs/ConfirmDialog.js.map +0 -1
  444. package/dist/components/dialogs/ConfirmDialog.mjs +0 -641
  445. package/dist/components/dialogs/ConfirmDialog.mjs.map +0 -1
  446. package/dist/components/icons-and-geometry/Helpwave.js.map +0 -1
  447. package/dist/components/icons-and-geometry/Helpwave.mjs.map +0 -1
  448. package/dist/components/layout-and-navigation/Overlay.d.mts +0 -67
  449. package/dist/components/layout-and-navigation/Overlay.d.ts +0 -67
  450. package/dist/components/layout-and-navigation/Overlay.js +0 -705
  451. package/dist/components/layout-and-navigation/Overlay.js.map +0 -1
  452. package/dist/components/layout-and-navigation/Overlay.mjs +0 -668
  453. package/dist/components/layout-and-navigation/Overlay.mjs.map +0 -1
  454. package/dist/components/layout-and-navigation/SearchableList.d.mts +0 -24
  455. package/dist/components/layout-and-navigation/SearchableList.d.ts +0 -24
  456. package/dist/components/layout-and-navigation/SearchableList.js +0 -761
  457. package/dist/components/layout-and-navigation/SearchableList.js.map +0 -1
  458. package/dist/components/layout-and-navigation/SearchableList.mjs +0 -727
  459. package/dist/components/layout-and-navigation/SearchableList.mjs.map +0 -1
  460. package/dist/components/layout-and-navigation/Tile.d.mts +0 -27
  461. package/dist/components/layout-and-navigation/Tile.d.ts +0 -27
  462. package/dist/components/layout-and-navigation/Tile.js +0 -96
  463. package/dist/components/layout-and-navigation/Tile.js.map +0 -1
  464. package/dist/components/layout-and-navigation/Tile.mjs +0 -61
  465. package/dist/components/layout-and-navigation/Tile.mjs.map +0 -1
  466. package/dist/components/modals/ConfirmModal.d.mts +0 -33
  467. package/dist/components/modals/ConfirmModal.d.ts +0 -33
  468. package/dist/components/modals/ConfirmModal.js +0 -690
  469. package/dist/components/modals/ConfirmModal.js.map +0 -1
  470. package/dist/components/modals/ConfirmModal.mjs +0 -654
  471. package/dist/components/modals/ConfirmModal.mjs.map +0 -1
  472. package/dist/components/modals/DiscardChangesModal.d.mts +0 -20
  473. package/dist/components/modals/DiscardChangesModal.d.ts +0 -20
  474. package/dist/components/modals/DiscardChangesModal.js +0 -720
  475. package/dist/components/modals/DiscardChangesModal.js.map +0 -1
  476. package/dist/components/modals/DiscardChangesModal.mjs +0 -684
  477. package/dist/components/modals/DiscardChangesModal.mjs.map +0 -1
  478. package/dist/components/modals/InputModal.d.mts +0 -21
  479. package/dist/components/modals/InputModal.d.ts +0 -21
  480. package/dist/components/modals/InputModal.js +0 -979
  481. package/dist/components/modals/InputModal.js.map +0 -1
  482. package/dist/components/modals/InputModal.mjs +0 -943
  483. package/dist/components/modals/InputModal.mjs.map +0 -1
  484. package/dist/components/modals/LanguageModal.d.mts +0 -21
  485. package/dist/components/modals/LanguageModal.d.ts +0 -21
  486. package/dist/components/modals/LanguageModal.js +0 -1474
  487. package/dist/components/modals/LanguageModal.js.map +0 -1
  488. package/dist/components/modals/LanguageModal.mjs +0 -1438
  489. package/dist/components/modals/LanguageModal.mjs.map +0 -1
  490. package/dist/components/modals/ThemeModal.d.mts +0 -21
  491. package/dist/components/modals/ThemeModal.d.ts +0 -21
  492. package/dist/components/modals/ThemeModal.js +0 -1503
  493. package/dist/components/modals/ThemeModal.js.map +0 -1
  494. package/dist/components/modals/ThemeModal.mjs +0 -1467
  495. package/dist/components/modals/ThemeModal.mjs.map +0 -1
  496. package/dist/components/user-action/Input.d.mts +0 -77
  497. package/dist/components/user-action/Input.d.ts +0 -77
  498. package/dist/components/user-action/Input.js.map +0 -1
  499. package/dist/components/user-action/Input.mjs +0 -298
  500. package/dist/components/user-action/Input.mjs.map +0 -1
  501. package/dist/components/user-action/MultiSelect.d.mts +0 -42
  502. package/dist/components/user-action/MultiSelect.d.ts +0 -42
  503. package/dist/components/user-action/MultiSelect.js +0 -1445
  504. package/dist/components/user-action/MultiSelect.js.map +0 -1
  505. package/dist/components/user-action/MultiSelect.mjs +0 -1410
  506. package/dist/components/user-action/MultiSelect.mjs.map +0 -1
  507. package/dist/components/user-action/Select.d.mts +0 -41
  508. package/dist/components/user-action/Select.d.ts +0 -41
  509. package/dist/components/user-action/Select.js +0 -1242
  510. package/dist/components/user-action/Select.js.map +0 -1
  511. package/dist/components/user-action/Select.mjs +0 -1207
  512. package/dist/components/user-action/Select.mjs.map +0 -1
  513. package/dist/components/user-action/ToggleableInput.d.mts +0 -37
  514. package/dist/components/user-action/ToggleableInput.d.ts +0 -37
  515. package/dist/components/user-action/ToggleableInput.js +0 -192
  516. package/dist/components/user-action/ToggleableInput.js.map +0 -1
  517. package/dist/components/user-action/ToggleableInput.mjs +0 -157
  518. package/dist/components/user-action/ToggleableInput.mjs.map +0 -1
  519. package/dist/css/uncompiled/textstyles.css +0 -69
  520. package/dist/hooks/useFocusManagement.js.map +0 -1
  521. package/dist/hooks/useFocusManagement.mjs.map +0 -1
  522. package/dist/hooks/useFocusOnceVisible.js.map +0 -1
  523. package/dist/hooks/useFocusOnceVisible.mjs.map +0 -1
  524. package/dist/index.d.mts +0 -103
  525. package/dist/index.d.ts +0 -103
  526. package/dist/index.js +0 -12595
  527. package/dist/index.js.map +0 -1
  528. package/dist/index.mjs +0 -12432
  529. package/dist/index.mjs.map +0 -1
  530. package/dist/util/PropsWithFunctionChildren.d.mts +0 -14
  531. package/dist/util/PropsWithFunctionChildren.d.ts +0 -14
  532. package/dist/util/PropsWithFunctionChildren.js.map +0 -1
  533. package/dist/util/PropsWithFunctionChildren.mjs.map +0 -1
  534. package/dist/util/array.js.map +0 -1
  535. package/dist/util/array.mjs.map +0 -1
  536. package/dist/util/builder.js.map +0 -1
  537. package/dist/util/builder.mjs.map +0 -1
  538. package/dist/util/date.js.map +0 -1
  539. package/dist/util/date.mjs.map +0 -1
  540. package/dist/util/easeFunctions.js.map +0 -1
  541. package/dist/util/easeFunctions.mjs.map +0 -1
  542. package/dist/util/emailValidation.js.map +0 -1
  543. package/dist/util/emailValidation.mjs.map +0 -1
  544. package/dist/util/loopingArray.js.map +0 -1
  545. package/dist/util/loopingArray.mjs.map +0 -1
  546. package/dist/util/math.d.mts +0 -3
  547. package/dist/util/math.d.ts +0 -3
  548. package/dist/util/math.js.map +0 -1
  549. package/dist/util/math.mjs +0 -8
  550. package/dist/util/math.mjs.map +0 -1
  551. package/dist/util/news.d.mts +0 -101
  552. package/dist/util/news.d.ts +0 -101
  553. package/dist/util/news.js +0 -76
  554. package/dist/util/news.js.map +0 -1
  555. package/dist/util/news.mjs +0 -49
  556. package/dist/util/news.mjs.map +0 -1
  557. package/dist/util/noop.js.map +0 -1
  558. package/dist/util/noop.mjs +0 -6
  559. package/dist/util/noop.mjs.map +0 -1
  560. package/dist/util/resolveSetState.js.map +0 -1
  561. package/dist/util/resolveSetState.mjs.map +0 -1
  562. package/dist/util/simpleSearch.js.map +0 -1
  563. package/dist/util/simpleSearch.mjs.map +0 -1
  564. package/dist/util/storage.js.map +0 -1
  565. package/dist/util/storage.mjs.map +0 -1
  566. package/dist/util/types.d.mts +0 -3
  567. package/dist/util/types.d.ts +0 -3
  568. package/dist/util/types.js +0 -18
  569. package/dist/util/types.js.map +0 -1
  570. package/dist/util/types.mjs +0 -1
  571. package/dist/util/types.mjs.map +0 -1
  572. package/dist/util/writeToClipboard.js.map +0 -1
  573. package/dist/util/writeToClipboard.mjs.map +0 -1
  574. /package/dist/hooks/{useFocusManagement.d.mts → focus/useFocusManagement.d.mts} +0 -0
  575. /package/dist/hooks/{useFocusManagement.d.ts → focus/useFocusManagement.d.ts} +0 -0
  576. /package/dist/hooks/{useFocusOnceVisible.d.mts → focus/useFocusOnceVisible.d.mts} +0 -0
  577. /package/dist/hooks/{useFocusOnceVisible.d.ts → focus/useFocusOnceVisible.d.ts} +0 -0
  578. /package/dist/{css → style}/uncompiled/theme/colors-basic.css +0 -0
  579. /package/dist/{css → style}/uncompiled/theme/index.css +0 -0
  580. /package/dist/{css → style}/uncompiled/theme/variants.css +0 -0
  581. /package/dist/{css → style}/uncompiled/utitlity/borderradius.css +0 -0
  582. /package/dist/{css → style}/uncompiled/utitlity/general.css +0 -0
  583. /package/dist/{util → utils}/builder.d.mts +0 -0
  584. /package/dist/{util → utils}/builder.d.ts +0 -0
  585. /package/dist/{util → utils}/date.d.mts +0 -0
  586. /package/dist/{util → utils}/date.d.ts +0 -0
  587. /package/dist/{util → utils}/easeFunctions.d.mts +0 -0
  588. /package/dist/{util → utils}/easeFunctions.d.ts +0 -0
  589. /package/dist/{util → utils}/emailValidation.d.mts +0 -0
  590. /package/dist/{util → utils}/emailValidation.d.ts +0 -0
  591. /package/dist/{util → utils}/loopingArray.d.mts +0 -0
  592. /package/dist/{util → utils}/loopingArray.d.ts +0 -0
  593. /package/dist/{util → utils}/noop.d.mts +0 -0
  594. /package/dist/{util → utils}/noop.d.ts +0 -0
  595. /package/dist/{util → utils}/resolveSetState.d.mts +0 -0
  596. /package/dist/{util → utils}/resolveSetState.d.ts +0 -0
  597. /package/dist/{util → utils}/simpleSearch.d.mts +0 -0
  598. /package/dist/{util → utils}/simpleSearch.d.ts +0 -0
  599. /package/dist/{util → utils}/storage.d.mts +0 -0
  600. /package/dist/{util → utils}/storage.d.ts +0 -0
  601. /package/dist/{util → utils}/writeToClipboard.d.mts +0 -0
  602. /package/dist/{util → utils}/writeToClipboard.d.ts +0 -0
@@ -0,0 +1,1715 @@
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/dialog/ThemeDialog.tsx
30
+ var ThemeDialog_exports = {};
31
+ __export(ThemeDialog_exports, {
32
+ ThemeDialog: () => ThemeDialog
33
+ });
34
+ module.exports = __toCommonJS(ThemeDialog_exports);
35
+
36
+ // src/localization/LanguageProvider.tsx
37
+ var import_react2 = require("react");
38
+
39
+ // src/hooks/useLocalStorage.ts
40
+ var import_react = require("react");
41
+
42
+ // src/localization/util.ts
43
+ var languages = ["en", "de"];
44
+ var languagesLocalNames = {
45
+ en: "English",
46
+ de: "Deutsch"
47
+ };
48
+ var DEFAULT_LANGUAGE = "en";
49
+ var LanguageUtil = {
50
+ languages,
51
+ DEFAULT_LANGUAGE,
52
+ languagesLocalNames
53
+ };
54
+
55
+ // src/localization/LanguageProvider.tsx
56
+ var import_jsx_runtime = require("react/jsx-runtime");
57
+ var LanguageContext = (0, import_react2.createContext)({
58
+ language: LanguageUtil.DEFAULT_LANGUAGE,
59
+ setLanguage: (v) => v
60
+ });
61
+ var useLanguage = () => (0, import_react2.useContext)(LanguageContext);
62
+
63
+ // src/localization/useTranslation.ts
64
+ var TranslationPluralCount = {
65
+ zero: 0,
66
+ one: 1,
67
+ two: 2,
68
+ few: 3,
69
+ many: 11,
70
+ other: -1
71
+ };
72
+ var useTranslation = (translations, overwriteTranslation = {}) => {
73
+ const { language: languageProp, translation: overwrite } = overwriteTranslation;
74
+ const { language: inferredLanguage } = useLanguage();
75
+ const usedLanguage = languageProp ?? inferredLanguage;
76
+ const usedTranslations = [...translations];
77
+ if (overwrite) {
78
+ usedTranslations.push(overwrite);
79
+ }
80
+ return (key, options) => {
81
+ const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
82
+ try {
83
+ for (let i = translations.length - 1; i >= 0; i--) {
84
+ const translation = translations[i];
85
+ const localizedTranslation = translation[usedLanguage];
86
+ if (!localizedTranslation) {
87
+ continue;
88
+ }
89
+ const value = localizedTranslation[key];
90
+ if (!value) {
91
+ continue;
92
+ }
93
+ let forProcessing;
94
+ if (typeof value !== "string") {
95
+ if (count === TranslationPluralCount.zero && value?.zero) {
96
+ forProcessing = value.zero;
97
+ } else if (count === TranslationPluralCount.one && value?.one) {
98
+ forProcessing = value.one;
99
+ } else if (count === TranslationPluralCount.two && value?.two) {
100
+ forProcessing = value.two;
101
+ } else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
102
+ forProcessing = value.few;
103
+ } else if (count > TranslationPluralCount.many && value?.many) {
104
+ forProcessing = value.many;
105
+ } else {
106
+ forProcessing = value.other;
107
+ }
108
+ } else {
109
+ forProcessing = value;
110
+ }
111
+ forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
112
+ return replacements[placeholder] ?? `{{key:${placeholder}}}`;
113
+ });
114
+ return forProcessing;
115
+ }
116
+ } catch (e) {
117
+ console.error(e);
118
+ }
119
+ return `{{${usedLanguage}:${key}}}`;
120
+ };
121
+ };
122
+
123
+ // src/components/user-action/select/Select.tsx
124
+ var import_react8 = require("react");
125
+ var import_clsx4 = __toESM(require("clsx"));
126
+
127
+ // src/components/layout-and-navigation/Expandable.tsx
128
+ var import_react3 = require("react");
129
+ var import_lucide_react = require("lucide-react");
130
+ var import_clsx = __toESM(require("clsx"));
131
+
132
+ // src/utils/noop.ts
133
+ var noop = () => void 0;
134
+
135
+ // src/components/layout-and-navigation/Expandable.tsx
136
+ var import_jsx_runtime2 = require("react/jsx-runtime");
137
+ var ExpansionIcon = ({ isExpanded, className }) => {
138
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
139
+ import_lucide_react.ChevronDown,
140
+ {
141
+ "aria-hidden": true,
142
+ className: (0, import_clsx.default)(
143
+ "min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
144
+ { "rotate-180": isExpanded },
145
+ className
146
+ )
147
+ }
148
+ );
149
+ };
150
+ var Expandable = (0, import_react3.forwardRef)(function Expandable2({
151
+ children,
152
+ id: providedId,
153
+ label,
154
+ icon,
155
+ isExpanded = false,
156
+ onChange = noop,
157
+ clickOnlyOnHeader = true,
158
+ disabled = false,
159
+ className,
160
+ headerClassName,
161
+ contentClassName,
162
+ contentExpandedClassName
163
+ }, ref) {
164
+ const defaultIcon = (0, import_react3.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
165
+ icon ??= defaultIcon;
166
+ const generatedId = (0, import_react3.useId)();
167
+ const id = providedId ?? generatedId;
168
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
169
+ "div",
170
+ {
171
+ ref,
172
+ onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
173
+ className: (0, import_clsx.default)(
174
+ "flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
175
+ { "cursor-pointer": !clickOnlyOnHeader && !disabled },
176
+ className
177
+ ),
178
+ children: [
179
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
180
+ "button",
181
+ {
182
+ onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
183
+ className: (0, import_clsx.default)(
184
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
185
+ {
186
+ "group-hover:brightness-97": !isExpanded,
187
+ "hover:brightness-97": isExpanded && !disabled,
188
+ "cursor-pointer": clickOnlyOnHeader && !disabled
189
+ },
190
+ headerClassName
191
+ ),
192
+ "aria-expanded": isExpanded,
193
+ "aria-controls": `${id}-content`,
194
+ "aria-disabled": disabled ?? void 0,
195
+ children: [
196
+ label,
197
+ icon(isExpanded)
198
+ ]
199
+ }
200
+ ),
201
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
202
+ "div",
203
+ {
204
+ id: `${id}-content`,
205
+ className: (0, import_clsx.default)(
206
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
207
+ {
208
+ [(0, import_clsx.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
209
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
210
+ },
211
+ contentClassName
212
+ ),
213
+ role: "region",
214
+ children
215
+ }
216
+ )
217
+ ]
218
+ }
219
+ );
220
+ });
221
+ var ExpandableUncontrolled = (0, import_react3.forwardRef)(function ExpandableUncontrolled2({
222
+ isExpanded,
223
+ onChange = noop,
224
+ ...props
225
+ }, ref) {
226
+ const [usedIsExpanded, setUsedIsExpanded] = (0, import_react3.useState)(isExpanded);
227
+ (0, import_react3.useEffect)(() => {
228
+ setUsedIsExpanded(isExpanded);
229
+ }, [isExpanded]);
230
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
231
+ Expandable,
232
+ {
233
+ ...props,
234
+ ref,
235
+ isExpanded: usedIsExpanded,
236
+ onChange: (value) => {
237
+ onChange(value);
238
+ setUsedIsExpanded(value);
239
+ }
240
+ }
241
+ );
242
+ });
243
+
244
+ // src/hooks/focus/useFocusTrap.ts
245
+ var import_react5 = require("react");
246
+
247
+ // src/hooks/focus/useIsMounted.ts
248
+ var import_react4 = require("react");
249
+ var isClient = typeof window !== "undefined" && typeof document !== "undefined";
250
+ var useIsomorphicEffect = isClient ? import_react4.useLayoutEffect : import_react4.useEffect;
251
+ var useIsMounted = () => {
252
+ const [isMounted, setIsMounted] = (0, import_react4.useState)(false);
253
+ useIsomorphicEffect(() => {
254
+ setIsMounted(true);
255
+ return () => {
256
+ setIsMounted(false);
257
+ };
258
+ }, []);
259
+ return isMounted;
260
+ };
261
+
262
+ // src/hooks/focus/useFocusTrap.ts
263
+ var createFocusGuard = () => {
264
+ const div = document.createElement("div");
265
+ Object.assign(div.style, {
266
+ opacity: "0",
267
+ outline: "none",
268
+ boxShadow: "none",
269
+ position: "fixed",
270
+ pointerEvents: "none",
271
+ touchAction: "none"
272
+ });
273
+ div.tabIndex = 0;
274
+ div.setAttribute("data-hw-focus-guard", "");
275
+ document.body.appendChild(div);
276
+ return div;
277
+ };
278
+ function getContainedFocusableElements(element) {
279
+ return element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
280
+ }
281
+ var FocusTrapService = class {
282
+ constructor() {
283
+ // The last entry is always the active one
284
+ this.listeners = [];
285
+ this.onFocusIn = (event) => {
286
+ const active = this.getActive();
287
+ if (!active || !active.container.current) return;
288
+ const { container } = active;
289
+ if (!container.current.contains(event.target)) {
290
+ this.focusElement();
291
+ }
292
+ };
293
+ }
294
+ getActive() {
295
+ if (this.listeners.length === 0) return void 0;
296
+ return this.listeners[this.listeners.length - 1];
297
+ }
298
+ focusElement() {
299
+ const active = this.getActive();
300
+ if (!active) return;
301
+ const { container, initialFocusElement } = active;
302
+ const containerElement = container.current;
303
+ if (initialFocusElement?.current) {
304
+ initialFocusElement.current.focus();
305
+ } else {
306
+ const elements = getContainedFocusableElements(containerElement);
307
+ if (elements && elements.length > 0) {
308
+ const first = elements.item(0);
309
+ first.focus();
310
+ } else {
311
+ containerElement.focus();
312
+ }
313
+ }
314
+ }
315
+ removeGuards() {
316
+ document.querySelectorAll("[data-hw-focus-guard]").forEach((node) => node.remove());
317
+ }
318
+ addGuards() {
319
+ document.body.insertAdjacentElement("afterbegin", createFocusGuard());
320
+ document.body.insertAdjacentElement("beforeend", createFocusGuard());
321
+ }
322
+ activate() {
323
+ document.addEventListener("focusin", this.onFocusIn);
324
+ this.addGuards();
325
+ }
326
+ deactivate() {
327
+ document.removeEventListener("focusin", this.onFocusIn);
328
+ this.removeGuards();
329
+ }
330
+ register(listener) {
331
+ this.listeners.push(listener);
332
+ if (this.listeners.length === 1) {
333
+ this.activate();
334
+ }
335
+ const active = listener;
336
+ this.listeners.forEach((listener2) => {
337
+ const { focus, pause } = listener2;
338
+ if (listener2 === active) {
339
+ focus();
340
+ } else {
341
+ pause();
342
+ }
343
+ });
344
+ }
345
+ unregister(id) {
346
+ const index = this.listeners.findIndex((trap) => trap.id === id);
347
+ if (index !== -1) {
348
+ const isActive = index === this.listeners.length - 1;
349
+ const listener = this.listeners[index];
350
+ this.listeners = this.listeners.filter((listener2) => listener2.id !== id);
351
+ if (isActive) {
352
+ this.deactivate();
353
+ listener.focusLast();
354
+ const active = this.getActive();
355
+ this.listeners.forEach((listener2) => {
356
+ const { pause, unpause } = listener2;
357
+ if (listener2 === active) {
358
+ unpause();
359
+ } else {
360
+ pause();
361
+ }
362
+ });
363
+ if (this.listeners.length > 0) {
364
+ this.activate();
365
+ }
366
+ }
367
+ } else {
368
+ console.warn(`Unable to unregister id ${id}: not found`);
369
+ }
370
+ }
371
+ };
372
+ var service = new FocusTrapService();
373
+ var useFocusTrap = ({
374
+ container,
375
+ active = true,
376
+ initialFocus,
377
+ focusFirst = true
378
+ }) => {
379
+ const lastFocusRef = (0, import_react5.useRef)(null);
380
+ const [paused, setPaused] = (0, import_react5.useState)(false);
381
+ const isMounted = useIsMounted();
382
+ const id = (0, import_react5.useId)();
383
+ const focusElement = (0, import_react5.useCallback)(() => {
384
+ const containerElement = container.current;
385
+ if (initialFocus?.current) {
386
+ initialFocus.current.focus();
387
+ } else {
388
+ const elements = getContainedFocusableElements(containerElement);
389
+ if (elements && elements.length > 0) {
390
+ const first = elements.item(0);
391
+ first.focus();
392
+ } else {
393
+ containerElement.focus();
394
+ }
395
+ }
396
+ }, [container, initialFocus]);
397
+ (0, import_react5.useEffect)(() => {
398
+ if (active && isMounted) {
399
+ let pause = function() {
400
+ setPaused(true);
401
+ }, unpause = function() {
402
+ setPaused(false);
403
+ if (!container.current.contains(document.activeElement)) {
404
+ focusElement();
405
+ }
406
+ }, focus = function() {
407
+ focusElement();
408
+ setPaused(false);
409
+ }, focusLast = function() {
410
+ lastFocusRef.current?.focus();
411
+ };
412
+ if (!lastFocusRef.current) {
413
+ lastFocusRef.current = document.activeElement;
414
+ }
415
+ service.register({ id, pause, focus, focusLast, unpause, container, initialFocusElement: initialFocus });
416
+ return () => {
417
+ service.unregister(id);
418
+ lastFocusRef.current = void 0;
419
+ };
420
+ }
421
+ }, [active, container, focusElement, id, initialFocus, isMounted]);
422
+ (0, import_react5.useEffect)(() => {
423
+ if (active && !paused && isMounted) {
424
+ let onKeyDown = function(event) {
425
+ const key = event.key;
426
+ const elements = getContainedFocusableElements(containerElement);
427
+ const active2 = document.activeElement;
428
+ const index = [...elements].findIndex((value) => value === active2);
429
+ if (index === -1 || event.altKey || event.ctrlKey || event.metaKey) {
430
+ return;
431
+ }
432
+ if (key === "Tab") {
433
+ const next = event.shiftKey ? -1 : 1;
434
+ const nextIndex = (index + next + elements.length) % elements.length;
435
+ const nextElement = elements[nextIndex];
436
+ nextElement.focus();
437
+ event.preventDefault();
438
+ }
439
+ };
440
+ const containerElement = container.current;
441
+ containerElement.addEventListener("keydown", onKeyDown);
442
+ return () => {
443
+ containerElement.removeEventListener("keydown", onKeyDown);
444
+ };
445
+ }
446
+ }, [active, paused, isMounted, container, initialFocus, focusFirst, focusElement]);
447
+ };
448
+
449
+ // src/utils/match.ts
450
+ var match = (key, values) => {
451
+ return values[key];
452
+ };
453
+
454
+ // src/components/user-action/select/Select.tsx
455
+ var import_lucide_react2 = require("lucide-react");
456
+
457
+ // src/components/layout-and-navigation/Chip.tsx
458
+ var import_clsx2 = __toESM(require("clsx"));
459
+ var import_jsx_runtime3 = require("react/jsx-runtime");
460
+ var Chip = ({
461
+ children,
462
+ trailingIcon,
463
+ color = "default",
464
+ size = "md",
465
+ icon = false,
466
+ variant = "normal",
467
+ className = "",
468
+ ...restProps
469
+ }) => {
470
+ const colorMapping = {
471
+ default: "text-tag-default-text bg-tag-default-background",
472
+ dark: "text-tag-dark-text bg-tag-dark-background",
473
+ red: "text-tag-red-text bg-tag-red-background",
474
+ yellow: "text-tag-yellow-text bg-tag-yellow-background",
475
+ green: "text-tag-green-text bg-tag-green-background",
476
+ blue: "text-tag-blue-text bg-tag-blue-background",
477
+ pink: "text-tag-pink-text bg-tag-pink-background",
478
+ orange: "text-tag-orange-text bg-tag-orange-background"
479
+ }[color];
480
+ const colorMappingIcon = {
481
+ default: "text-tag-default-icon",
482
+ dark: "text-tag-dark-icon",
483
+ red: "text-tag-red-icon",
484
+ yellow: "text-tag-yellow-icon",
485
+ green: "text-tag-green-icon",
486
+ blue: "text-tag-blue-icon",
487
+ pink: "text-tag-pink-icon",
488
+ orange: "text-tag-orange-icon"
489
+ }[color];
490
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
491
+ "div",
492
+ {
493
+ ...restProps,
494
+ className: (0, import_clsx2.default)(
495
+ `flex-row-0 w-fit font-semibold`,
496
+ colorMapping,
497
+ !icon ? {
498
+ "px-1 py-0.5": size === "sm",
499
+ "px-2 py-1": size === "md",
500
+ "px-4 py-2": size === "lg"
501
+ } : {
502
+ "p-0.5": size === "sm",
503
+ "p-1": size === "md",
504
+ "p-2": size === "lg"
505
+ },
506
+ {
507
+ "rounded-md": variant === "normal",
508
+ "rounded-full": variant === "fullyRounded"
509
+ },
510
+ className
511
+ ),
512
+ children: [
513
+ children,
514
+ trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
515
+ ]
516
+ }
517
+ );
518
+ };
519
+
520
+ // src/components/user-action/Button.tsx
521
+ var import_react6 = require("react");
522
+ var import_clsx3 = __toESM(require("clsx"));
523
+ var import_jsx_runtime4 = require("react/jsx-runtime");
524
+ var ButtonColorUtil = {
525
+ solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
526
+ text: ["primary", "negative", "neutral"],
527
+ outline: ["primary"]
528
+ };
529
+ var IconButtonUtil = {
530
+ icon: [...ButtonColorUtil.solid, "transparent"]
531
+ };
532
+ var paddingMapping = {
533
+ small: "btn-sm",
534
+ medium: "btn-md",
535
+ large: "btn-lg"
536
+ };
537
+ var iconPaddingMapping = {
538
+ tiny: "icon-btn-xs",
539
+ small: "icon-btn-sm",
540
+ medium: "icon-btn-md",
541
+ large: "icon-btn-lg"
542
+ };
543
+ var ButtonUtil = {
544
+ paddingMapping,
545
+ iconPaddingMapping
546
+ };
547
+ var SolidButton = (0, import_react6.forwardRef)(function SolidButton2({
548
+ children,
549
+ color = "primary",
550
+ size = "medium",
551
+ startIcon,
552
+ endIcon,
553
+ onClick,
554
+ className,
555
+ ...restProps
556
+ }, ref) {
557
+ const colorClasses = {
558
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
559
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
560
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
561
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
562
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
563
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
564
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
565
+ }[color];
566
+ const iconColorClasses = {
567
+ primary: "not-group-disabled:text-button-solid-primary-icon",
568
+ secondary: "not-group-disabled:text-button-solid-secondary-icon",
569
+ tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
570
+ positive: "not-group-disabled:text-button-solid-positive-icon",
571
+ warning: "not-group-disabled:text-button-solid-warning-icon",
572
+ negative: "not-group-disabled:text-button-solid-negative-icon",
573
+ neutral: "not-group-disabled:text-button-solid-neutral-icon"
574
+ }[color];
575
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
576
+ "button",
577
+ {
578
+ ref,
579
+ onClick,
580
+ className: (0, import_clsx3.default)(
581
+ "group font-semibold",
582
+ colorClasses,
583
+ "not-disabled:hover:brightness-90",
584
+ "disabled:text-disabled-text disabled:bg-disabled-background",
585
+ ButtonUtil.paddingMapping[size],
586
+ className
587
+ ),
588
+ ...restProps,
589
+ children: [
590
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
591
+ "span",
592
+ {
593
+ className: (0, import_clsx3.default)(
594
+ iconColorClasses,
595
+ "group-disabled:text-disabled-icon"
596
+ ),
597
+ children: startIcon
598
+ }
599
+ ),
600
+ children,
601
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
602
+ "span",
603
+ {
604
+ className: (0, import_clsx3.default)(
605
+ iconColorClasses,
606
+ "group-disabled:text-disabled-icon"
607
+ ),
608
+ children: endIcon
609
+ }
610
+ )
611
+ ]
612
+ }
613
+ );
614
+ });
615
+ var IconButton = (0, import_react6.forwardRef)(function IconButton2({
616
+ children,
617
+ color = "primary",
618
+ size = "medium",
619
+ className,
620
+ ...restProps
621
+ }, ref) {
622
+ const colorClasses = {
623
+ primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
624
+ secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
625
+ tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
626
+ positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
627
+ warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
628
+ negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
629
+ neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
630
+ transparent: "not-disabled:bg-transparent"
631
+ }[color];
632
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
633
+ "button",
634
+ {
635
+ ref,
636
+ className: (0, import_clsx3.default)(
637
+ colorClasses,
638
+ "not-disabled:hover:brightness-90",
639
+ "disabled:text-disabled-text",
640
+ {
641
+ "disabled:bg-disabled-background": color !== "transparent",
642
+ "disabled:opacity-70": color === "transparent",
643
+ "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
644
+ },
645
+ ButtonUtil.iconPaddingMapping[size],
646
+ className
647
+ ),
648
+ ...restProps,
649
+ children
650
+ }
651
+ );
652
+ });
653
+
654
+ // src/hooks/useFloatingElement.ts
655
+ var import_react7 = require("react");
656
+
657
+ // src/utils/math.ts
658
+ var clamp = (value, range = [0, 1]) => {
659
+ const [min, max] = range;
660
+ return Math.min(Math.max(value, min), max);
661
+ };
662
+
663
+ // src/hooks/useFloatingElement.ts
664
+ function calculatePosition({
665
+ windowRect,
666
+ containerRect,
667
+ anchorRect,
668
+ options
669
+ }) {
670
+ const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
671
+ const windowWidth = windowRect.width;
672
+ const windowHeight = windowRect.height;
673
+ const maxWidth = windowWidth - 2 * screenPadding;
674
+ const maxHeight = windowHeight - 2 * screenPadding;
675
+ const width = Math.min(containerRect.width, maxWidth);
676
+ const height = Math.min(containerRect.height, maxHeight);
677
+ const leftSuggestion = {
678
+ beforeStart: anchorRect.left - width - gap,
679
+ afterStart: anchorRect.left,
680
+ center: anchorRect.left + anchorRect.width / 2 - width / 2,
681
+ beforeEnd: anchorRect.right - width,
682
+ afterEnd: anchorRect.right + gap
683
+ }[horizontalAlignment];
684
+ const topSuggestion = {
685
+ beforeStart: anchorRect.top - height - gap,
686
+ afterStart: anchorRect.top,
687
+ center: anchorRect.top + anchorRect.height / 2 - height / 2,
688
+ beforeEnd: anchorRect.bottom - height,
689
+ afterEnd: anchorRect.bottom + gap
690
+ }[verticalAlignment];
691
+ const left = clamp(leftSuggestion, [
692
+ screenPadding,
693
+ windowWidth - screenPadding - width
694
+ ]);
695
+ const top = clamp(topSuggestion, [
696
+ screenPadding,
697
+ windowHeight - screenPadding - height
698
+ ]);
699
+ return {
700
+ left,
701
+ top,
702
+ maxWidth,
703
+ maxHeight
704
+ };
705
+ }
706
+ function useFloatingElement({
707
+ active = true,
708
+ windowRef,
709
+ anchorRef,
710
+ containerRef,
711
+ isPolling = false,
712
+ pollingInterval = 100,
713
+ verticalAlignment = "afterEnd",
714
+ horizontalAlignment = "afterStart",
715
+ screenPadding = 16,
716
+ gap = 4
717
+ }) {
718
+ const [style, setStyle] = (0, import_react7.useState)();
719
+ const isMounted = useIsMounted();
720
+ const calculate = (0, import_react7.useCallback)(() => {
721
+ const containerRect = containerRef.current.getBoundingClientRect();
722
+ const windowRect = windowRef?.current.getBoundingClientRect() ?? {
723
+ top: 0,
724
+ bottom: window.innerHeight,
725
+ left: 0,
726
+ right: window.innerWidth,
727
+ width: window.innerWidth,
728
+ height: window.innerHeight
729
+ };
730
+ const anchorElement = anchorRef?.current;
731
+ if (anchorRef && !anchorElement) {
732
+ console.warn("FloatingContainer anchor provided, but its value is undefined");
733
+ }
734
+ const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
735
+ const calculateProps = {
736
+ windowRect,
737
+ anchorRect,
738
+ containerRect,
739
+ options: {
740
+ horizontalAlignment,
741
+ verticalAlignment,
742
+ screenPadding,
743
+ gap
744
+ }
745
+ };
746
+ setStyle(calculatePosition(calculateProps));
747
+ }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
748
+ const height = containerRef.current?.getBoundingClientRect().height;
749
+ const width = containerRef.current?.getBoundingClientRect().width;
750
+ (0, import_react7.useEffect)(() => {
751
+ if (active && isMounted) {
752
+ calculate();
753
+ } else {
754
+ setStyle(void 0);
755
+ }
756
+ }, [calculate, active, isMounted, height, width]);
757
+ (0, import_react7.useEffect)(() => {
758
+ window.addEventListener("resize", calculate);
759
+ let timeout;
760
+ if (isPolling) {
761
+ timeout = setInterval(calculate, pollingInterval);
762
+ }
763
+ return () => {
764
+ window.removeEventListener("resize", calculate);
765
+ if (timeout) {
766
+ clearInterval(timeout);
767
+ }
768
+ };
769
+ }, [calculate, isPolling, pollingInterval]);
770
+ return style;
771
+ }
772
+
773
+ // src/components/user-action/select/Select.tsx
774
+ var import_react_dom = require("react-dom");
775
+ var import_jsx_runtime5 = require("react/jsx-runtime");
776
+ var defaultToggleOpenOptions = {
777
+ highlightStartPosition: "first"
778
+ };
779
+ var SelectContext = (0, import_react8.createContext)(null);
780
+ function useSelectContext() {
781
+ const ctx = (0, import_react8.useContext)(SelectContext);
782
+ if (!ctx) {
783
+ throw new Error("SelectContext must be used within a ListBoxPrimitive");
784
+ }
785
+ return ctx;
786
+ }
787
+ var SelectRoot = ({
788
+ children,
789
+ id,
790
+ value,
791
+ onValueChanged,
792
+ values,
793
+ onValuesChanged,
794
+ isOpen = false,
795
+ disabled = false,
796
+ invalid = false,
797
+ isMultiSelect = false
798
+ }) => {
799
+ const optionsRef = (0, import_react8.useRef)([]);
800
+ const triggerRef = (0, import_react8.useRef)(null);
801
+ const generatedId = (0, import_react8.useId)();
802
+ const usedId = id ?? generatedId;
803
+ const [internalState, setInternalState] = (0, import_react8.useState)({
804
+ isOpen
805
+ });
806
+ const state = {
807
+ ...internalState,
808
+ id: usedId,
809
+ disabled,
810
+ invalid,
811
+ value: isMultiSelect ? values ?? [] : [value].filter(Boolean),
812
+ isMultiSelect
813
+ };
814
+ const registerItem = (0, import_react8.useCallback)((item) => {
815
+ optionsRef.current.push(item);
816
+ optionsRef.current.sort((a, b) => {
817
+ const aEl = a.ref.current;
818
+ const bEl = b.ref.current;
819
+ if (!aEl || !bEl) return 0;
820
+ return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
821
+ });
822
+ }, []);
823
+ const unregisterItem = (0, import_react8.useCallback)((value2) => {
824
+ optionsRef.current = optionsRef.current.filter((i) => i.value !== value2);
825
+ }, []);
826
+ const toggleSelection = (value2, isSelected) => {
827
+ if (disabled) {
828
+ return;
829
+ }
830
+ const option = optionsRef.current.find((i) => i.value === value2);
831
+ if (!option) {
832
+ console.error(`SelectOption with value: ${value2} not found`);
833
+ return;
834
+ }
835
+ let newValue;
836
+ if (isMultiSelect) {
837
+ const isSelectedBefore = state.value.includes(value2);
838
+ const isSelectedAfter = isSelected ?? !isSelectedBefore;
839
+ if (!isSelectedAfter) {
840
+ newValue = state.value.filter((v) => v !== value2);
841
+ } else {
842
+ newValue = [...state.value, value2];
843
+ }
844
+ } else {
845
+ newValue = [value2];
846
+ }
847
+ if (!isMultiSelect) {
848
+ onValueChanged?.(newValue[0]);
849
+ } else {
850
+ onValuesChanged?.(newValue);
851
+ }
852
+ setInternalState((prevState) => ({
853
+ ...prevState,
854
+ highlightedValue: value2
855
+ }));
856
+ };
857
+ const highlightItem = (value2) => {
858
+ if (disabled) {
859
+ return;
860
+ }
861
+ setInternalState((prevState) => ({
862
+ ...prevState,
863
+ highlightedValue: value2
864
+ }));
865
+ };
866
+ const registerTrigger = (0, import_react8.useCallback)((ref) => {
867
+ triggerRef.current = ref.current;
868
+ }, []);
869
+ const unregisterTrigger = (0, import_react8.useCallback)(() => {
870
+ triggerRef.current = null;
871
+ }, []);
872
+ const toggleOpen = (isOpen2, options) => {
873
+ const { highlightStartPosition } = { ...defaultToggleOpenOptions, ...options };
874
+ let highlightedIndex;
875
+ if (highlightStartPosition === "first") {
876
+ highlightedIndex = optionsRef.current.findIndex((option) => !option.disabled);
877
+ } else {
878
+ highlightedIndex = optionsRef.current.length - 1 - [...optionsRef.current].reverse().findIndex((option) => !option.disabled);
879
+ }
880
+ if (highlightedIndex === -1 || highlightedIndex === optionsRef.current.length) {
881
+ highlightedIndex = 0;
882
+ }
883
+ setInternalState((prevState) => ({
884
+ ...prevState,
885
+ isOpen: isOpen2 ?? !prevState.isOpen,
886
+ highlightedValue: optionsRef.current[highlightedIndex].value
887
+ }));
888
+ };
889
+ const moveHighlightedIndex = (delta) => {
890
+ let highlightedIndex = optionsRef.current.findIndex((value2) => value2.value === internalState.highlightedValue);
891
+ if (highlightedIndex === -1) {
892
+ highlightedIndex = 0;
893
+ }
894
+ const optionLength = optionsRef.current.length;
895
+ const startIndex = (highlightedIndex + delta % optionLength + optionLength) % optionLength;
896
+ const isForward = delta >= 0;
897
+ let highlightedValue = optionsRef.current[startIndex].value;
898
+ for (let i = 0; i < optionsRef.current.length; i++) {
899
+ const index = (startIndex + (isForward ? i : -i) + optionLength) % optionLength;
900
+ if (!optionsRef.current[index].disabled) {
901
+ highlightedValue = optionsRef.current[index].value;
902
+ break;
903
+ }
904
+ }
905
+ setInternalState((prevState) => ({
906
+ ...prevState,
907
+ highlightedValue
908
+ }));
909
+ };
910
+ (0, import_react8.useEffect)(() => {
911
+ if (!internalState.highlightedValue) return;
912
+ const highlighted = optionsRef.current.find((value2) => value2.value === internalState.highlightedValue);
913
+ if (highlighted) {
914
+ highlighted.ref.current.scrollIntoView({ behavior: "instant", block: "nearest" });
915
+ } else {
916
+ console.error(`SelectRoot: Could not find highlighted value (${internalState.highlightedValue})`);
917
+ }
918
+ }, [internalState.highlightedValue]);
919
+ const contextValue = {
920
+ state,
921
+ item: {
922
+ register: registerItem,
923
+ unregister: unregisterItem,
924
+ toggleSelection,
925
+ highlightItem,
926
+ moveHighlightedIndex
927
+ },
928
+ trigger: {
929
+ ref: triggerRef,
930
+ register: registerTrigger,
931
+ unregister: unregisterTrigger,
932
+ toggleOpen
933
+ }
934
+ };
935
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectContext.Provider, { value: contextValue, children });
936
+ };
937
+ var SelectOption = (0, import_react8.forwardRef)(
938
+ function SelectOption2({ value, disabled = false, children, className, ...restProps }, ref) {
939
+ const { state, item, trigger } = useSelectContext();
940
+ const { register, unregister, toggleSelection, highlightItem } = item;
941
+ const itemRef = (0, import_react8.useRef)(null);
942
+ (0, import_react8.useEffect)(() => {
943
+ register({
944
+ value,
945
+ disabled,
946
+ ref: itemRef
947
+ });
948
+ return () => unregister(value);
949
+ }, [value, disabled, register, unregister, children]);
950
+ const isHighlighted = state.highlightedValue === value;
951
+ const isSelected = state.value.includes(value);
952
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
953
+ "li",
954
+ {
955
+ ...restProps,
956
+ ref: (node) => {
957
+ itemRef.current = node;
958
+ if (typeof ref === "function") ref(node);
959
+ else if (ref) ref.current = node;
960
+ },
961
+ id: value,
962
+ role: "option",
963
+ "aria-disabled": disabled,
964
+ "aria-selected": isSelected,
965
+ "data-highlighted": isHighlighted ? "" : void 0,
966
+ "data-selected": isSelected ? "" : void 0,
967
+ "data-disabled": disabled ? "" : void 0,
968
+ className: (0, import_clsx4.default)(
969
+ "flex-row-1 items-center px-2 py-1 rounded-md",
970
+ "data-highlighted:bg-primary/20",
971
+ "data-disabled:text-disabled data-disabled:cursor-not-allowed",
972
+ "not-data-disabled:cursor-pointer",
973
+ className
974
+ ),
975
+ onClick: (event) => {
976
+ if (!disabled) {
977
+ toggleSelection(value);
978
+ if (!state.isMultiSelect) {
979
+ trigger.toggleOpen(false);
980
+ }
981
+ restProps.onClick?.(event);
982
+ }
983
+ },
984
+ onMouseEnter: (event) => {
985
+ if (!disabled) {
986
+ highlightItem(value);
987
+ restProps.onMouseEnter?.(event);
988
+ }
989
+ },
990
+ children: [
991
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
992
+ import_lucide_react2.CheckIcon,
993
+ {
994
+ className: (0, import_clsx4.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
995
+ "aria-hidden": true
996
+ }
997
+ ),
998
+ children ?? value
999
+ ]
1000
+ }
1001
+ );
1002
+ }
1003
+ );
1004
+ var defaultSelectButtonTranslation = {
1005
+ en: {
1006
+ clickToSelect: "Click to select"
1007
+ },
1008
+ de: {
1009
+ clickToSelect: "Zum ausw\xE4hlen dr\xFCcken"
1010
+ }
1011
+ };
1012
+ var SelectButton = (0, import_react8.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
1013
+ const translation = useTranslation([defaultSelectButtonTranslation]);
1014
+ const { state, trigger } = useSelectContext();
1015
+ const { register, unregister, toggleOpen } = trigger;
1016
+ const innerRef = (0, import_react8.useRef)(null);
1017
+ (0, import_react8.useImperativeHandle)(ref, () => innerRef.current);
1018
+ (0, import_react8.useEffect)(() => {
1019
+ register(innerRef);
1020
+ return () => unregister();
1021
+ }, [register, unregister]);
1022
+ const disabled = !!props?.disabled || !!state.disabled;
1023
+ const invalid = state.invalid;
1024
+ const hasValue = state.value.length > 0;
1025
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1026
+ "button",
1027
+ {
1028
+ ...props,
1029
+ ref: innerRef,
1030
+ id: state.id,
1031
+ className: (0, import_clsx4.default)(
1032
+ "flex-row-2 items-center justify-between bg-input-background text-input-text rounded-md px-2.5 py-2.5",
1033
+ "data-placeholder:text-description",
1034
+ props.className
1035
+ ),
1036
+ onClick: () => toggleOpen(!state.isOpen),
1037
+ onKeyDown: (event) => {
1038
+ switch (event.key) {
1039
+ case "ArrowDown":
1040
+ toggleOpen(true, { highlightStartPosition: "first" });
1041
+ break;
1042
+ case "ArrowUp":
1043
+ toggleOpen(true, { highlightStartPosition: "last" });
1044
+ break;
1045
+ }
1046
+ },
1047
+ "data-placeholder": !hasValue ? "" : void 0,
1048
+ "data-disabled": disabled ? "" : void 0,
1049
+ "data-invalid": invalid ? "" : void 0,
1050
+ "aria-invalid": invalid,
1051
+ "aria-disabled": disabled,
1052
+ "aria-haspopup": "listbox",
1053
+ "aria-expanded": state.isOpen,
1054
+ "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
1055
+ children: [
1056
+ hasValue ? selectedDisplay?.(state.value) ?? state.value.join(", ") : placeholder ?? translation("clickToSelect"),
1057
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ExpansionIcon, { isExpanded: state.isOpen })
1058
+ ]
1059
+ }
1060
+ );
1061
+ });
1062
+ var SelectChipDisplay = (0, import_react8.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
1063
+ const { state, trigger, item } = useSelectContext();
1064
+ const { register, unregister, toggleOpen } = trigger;
1065
+ const innerRef = (0, import_react8.useRef)(null);
1066
+ (0, import_react8.useImperativeHandle)(ref, () => innerRef.current);
1067
+ (0, import_react8.useEffect)(() => {
1068
+ register(innerRef);
1069
+ return () => unregister();
1070
+ }, [register, unregister]);
1071
+ const disabled = !!props?.disabled || !!state.disabled;
1072
+ const invalid = state.invalid;
1073
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1074
+ "div",
1075
+ {
1076
+ ...props,
1077
+ ref: innerRef,
1078
+ className: (0, import_clsx4.default)(
1079
+ "flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
1080
+ props.className
1081
+ ),
1082
+ "data-disabled": disabled ? "" : void 0,
1083
+ "data-invalid": invalid ? "" : void 0,
1084
+ "aria-invalid": invalid,
1085
+ "aria-disabled": disabled,
1086
+ children: [
1087
+ state.value.map((value) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Chip, { className: "gap-x-2", children: [
1088
+ value,
1089
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1090
+ "button",
1091
+ {
1092
+ onClick: () => {
1093
+ item.toggleSelection(value, false);
1094
+ },
1095
+ className: "focus-within:text-negative hover:bg-negative/20 hover:text-negative rounded-md focus-style-none focus-visible:ring-2 focus-visible:ring-negative focus-visible:bg-negative/20",
1096
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.XIcon, {})
1097
+ }
1098
+ )
1099
+ ] }, value)),
1100
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1101
+ IconButton,
1102
+ {
1103
+ id: state.id,
1104
+ onClick: () => toggleOpen(),
1105
+ onKeyDown: (event) => {
1106
+ switch (event.key) {
1107
+ case "ArrowDown":
1108
+ toggleOpen(true, { highlightStartPosition: "first" });
1109
+ break;
1110
+ case "ArrowUp":
1111
+ toggleOpen(true, { highlightStartPosition: "last" });
1112
+ }
1113
+ },
1114
+ size: "small",
1115
+ color: "neutral",
1116
+ "aria-invalid": invalid,
1117
+ "aria-disabled": disabled,
1118
+ "aria-haspopup": "listbox",
1119
+ "aria-expanded": state.isOpen,
1120
+ "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
1121
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.Plus, {})
1122
+ }
1123
+ )
1124
+ ]
1125
+ }
1126
+ );
1127
+ });
1128
+ var SelectContent = (0, import_react8.forwardRef)(
1129
+ function SelectContent2({
1130
+ alignment,
1131
+ orientation = "vertical",
1132
+ ...props
1133
+ }, ref) {
1134
+ const innerRef = (0, import_react8.useRef)(null);
1135
+ (0, import_react8.useImperativeHandle)(ref, () => innerRef.current);
1136
+ const { trigger, state, item } = useSelectContext();
1137
+ const position = useFloatingElement({
1138
+ active: state.isOpen,
1139
+ anchorRef: trigger.ref,
1140
+ containerRef: innerRef,
1141
+ ...alignment
1142
+ });
1143
+ useFocusTrap({
1144
+ container: innerRef,
1145
+ active: state.isOpen && !!position
1146
+ });
1147
+ return (0, import_react_dom.createPortal)(
1148
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
1149
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1150
+ "div",
1151
+ {
1152
+ hidden: !state.isOpen,
1153
+ onClick: () => trigger.toggleOpen(false),
1154
+ className: (0, import_clsx4.default)("fixed w-screen h-screen inset-0")
1155
+ }
1156
+ ),
1157
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1158
+ "ul",
1159
+ {
1160
+ ...props,
1161
+ id: `${state.id}-listbox`,
1162
+ ref: innerRef,
1163
+ hidden: !state.isOpen,
1164
+ onKeyDown: (event) => {
1165
+ switch (event.key) {
1166
+ case "Escape":
1167
+ trigger.toggleOpen(false);
1168
+ event.preventDefault();
1169
+ event.stopPropagation();
1170
+ break;
1171
+ case match(orientation, {
1172
+ vertical: "ArrowDown",
1173
+ horizontal: "ArrowUp"
1174
+ }):
1175
+ item.moveHighlightedIndex(1);
1176
+ event.preventDefault();
1177
+ break;
1178
+ case match(orientation, {
1179
+ vertical: "ArrowUp",
1180
+ horizontal: "ArrowDown"
1181
+ }):
1182
+ item.moveHighlightedIndex(-1);
1183
+ event.preventDefault();
1184
+ break;
1185
+ case "Home":
1186
+ event.preventDefault();
1187
+ break;
1188
+ case "End":
1189
+ event.preventDefault();
1190
+ break;
1191
+ case "Enter":
1192
+ // Fall through
1193
+ case " ":
1194
+ if (state.highlightedValue) {
1195
+ item.toggleSelection(state.highlightedValue);
1196
+ if (!state.isMultiSelect) {
1197
+ trigger.toggleOpen(false);
1198
+ }
1199
+ event.preventDefault();
1200
+ }
1201
+ break;
1202
+ }
1203
+ },
1204
+ className: (0, import_clsx4.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
1205
+ style: {
1206
+ opacity: position ? void 0 : 0,
1207
+ position: "fixed",
1208
+ ...position
1209
+ },
1210
+ role: "listbox",
1211
+ "aria-multiselectable": state.isMultiSelect,
1212
+ "aria-orientation": orientation,
1213
+ tabIndex: position ? 0 : void 0,
1214
+ children: props.children
1215
+ }
1216
+ )
1217
+ ] }),
1218
+ document.body
1219
+ );
1220
+ }
1221
+ );
1222
+ var Select = (0, import_react8.forwardRef)(function Select2({
1223
+ children,
1224
+ contentPanelProps,
1225
+ buttonProps,
1226
+ ...props
1227
+ }, ref) {
1228
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(SelectRoot, { ...props, isMultiSelect: false, children: [
1229
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1230
+ SelectButton,
1231
+ {
1232
+ ref,
1233
+ ...buttonProps,
1234
+ selectedDisplay: (values) => {
1235
+ const value = values[0];
1236
+ if (!buttonProps?.selectedDisplay) return void 0;
1237
+ return buttonProps.selectedDisplay(value);
1238
+ }
1239
+ }
1240
+ ),
1241
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectContent, { ...contentPanelProps, children })
1242
+ ] });
1243
+ });
1244
+ var SelectUncontrolled = (0, import_react8.forwardRef)(function SelectUncontrolled2({
1245
+ value: initialValue,
1246
+ onValueChanged,
1247
+ ...props
1248
+ }, ref) {
1249
+ const [value, setValue] = (0, import_react8.useState)(initialValue);
1250
+ (0, import_react8.useEffect)(() => {
1251
+ setValue(initialValue);
1252
+ }, [initialValue]);
1253
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1254
+ Select,
1255
+ {
1256
+ ...props,
1257
+ ref,
1258
+ value,
1259
+ onValueChanged: (value2) => {
1260
+ setValue(value2);
1261
+ onValueChanged?.(value2);
1262
+ }
1263
+ }
1264
+ );
1265
+ });
1266
+ var MultiSelect = (0, import_react8.forwardRef)(function MultiSelect2({
1267
+ children,
1268
+ contentPanelProps,
1269
+ buttonProps,
1270
+ ...props
1271
+ }, ref) {
1272
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(SelectRoot, { ...props, isMultiSelect: true, children: [
1273
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectButton, { ref, ...buttonProps }),
1274
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectContent, { ...contentPanelProps, children })
1275
+ ] });
1276
+ });
1277
+ var MultiSelectUncontrolled = (0, import_react8.forwardRef)(function MultiSelectUncontrolled2({
1278
+ values: initialValues,
1279
+ onValuesChanged,
1280
+ ...props
1281
+ }, ref) {
1282
+ const [values, setValues] = (0, import_react8.useState)(initialValues);
1283
+ (0, import_react8.useEffect)(() => {
1284
+ setValues(initialValues);
1285
+ }, [initialValues]);
1286
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1287
+ MultiSelect,
1288
+ {
1289
+ ...props,
1290
+ ref,
1291
+ values,
1292
+ onValuesChanged: (value) => {
1293
+ setValues(value);
1294
+ onValuesChanged?.(value);
1295
+ }
1296
+ }
1297
+ );
1298
+ });
1299
+ var MultiSelectChipDisplay = (0, import_react8.forwardRef)(function MultiSelectChipDisplay2({
1300
+ children,
1301
+ contentPanelProps,
1302
+ chipDisplayProps,
1303
+ ...props
1304
+ }, ref) {
1305
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(SelectRoot, { ...props, isMultiSelect: true, children: [
1306
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectChipDisplay, { ref, ...chipDisplayProps }),
1307
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectContent, { ...contentPanelProps, children })
1308
+ ] });
1309
+ });
1310
+ var MultiSelectChipDisplayUncontrolled = (0, import_react8.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
1311
+ values: initialValues,
1312
+ onValuesChanged,
1313
+ ...props
1314
+ }, ref) {
1315
+ const [values, setValues] = (0, import_react8.useState)(initialValues);
1316
+ (0, import_react8.useEffect)(() => {
1317
+ setValues(initialValues);
1318
+ }, [initialValues]);
1319
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1320
+ MultiSelectChipDisplay,
1321
+ {
1322
+ ...props,
1323
+ ref,
1324
+ values,
1325
+ onValuesChanged: (value) => {
1326
+ setValues(value);
1327
+ onValuesChanged?.(value);
1328
+ }
1329
+ }
1330
+ );
1331
+ });
1332
+
1333
+ // src/theming/useTheme.tsx
1334
+ var import_react9 = require("react");
1335
+ var import_react10 = require("react");
1336
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1337
+ var themes = ["light", "dark", "system"];
1338
+ var defaultThemeTypeTranslation = {
1339
+ en: {
1340
+ dark: "Dark",
1341
+ light: "Light",
1342
+ system: "System",
1343
+ theme: {
1344
+ one: "Theme",
1345
+ other: "Themes"
1346
+ }
1347
+ },
1348
+ de: {
1349
+ dark: "Dunkel",
1350
+ light: "Hell",
1351
+ system: "System",
1352
+ theme: {
1353
+ one: "Farbschema",
1354
+ other: "Farbschemas"
1355
+ }
1356
+ }
1357
+ };
1358
+ var ThemeUtil = {
1359
+ themes,
1360
+ translation: defaultThemeTypeTranslation
1361
+ };
1362
+ var ThemeContext = (0, import_react10.createContext)({
1363
+ theme: "light",
1364
+ setTheme: noop
1365
+ });
1366
+ var useTheme = () => (0, import_react10.useContext)(ThemeContext);
1367
+
1368
+ // src/localization/defaults/form.ts
1369
+ var formTranslation = {
1370
+ en: {
1371
+ add: "Add",
1372
+ all: "All",
1373
+ apply: "Apply",
1374
+ back: "Back",
1375
+ cancel: "Cancel",
1376
+ change: "Change",
1377
+ clear: "Clear",
1378
+ click: "Click",
1379
+ clickToCopy: "Click to Copy",
1380
+ close: "Close",
1381
+ confirm: "Confirm",
1382
+ copy: "Copy",
1383
+ copied: "Copied",
1384
+ create: "Create",
1385
+ decline: "Decline",
1386
+ delete: "Delete",
1387
+ discard: "Discard",
1388
+ discardChanges: "Discard Changes",
1389
+ done: "Done",
1390
+ edit: "Edit",
1391
+ enterText: "Enter text here",
1392
+ error: "Error",
1393
+ exit: "Exit",
1394
+ fieldRequiredError: "This field is required.",
1395
+ invalidEmailError: "Please enter a valid email address.",
1396
+ less: "Less",
1397
+ loading: "Loading",
1398
+ maxLengthError: "Maximum length exceeded.",
1399
+ minLengthError: "Minimum length not met.",
1400
+ more: "More",
1401
+ next: "Next",
1402
+ no: "No",
1403
+ none: "None",
1404
+ nothingFound: "Nothing found",
1405
+ of: "of",
1406
+ optional: "Optional",
1407
+ pleaseWait: "Please wait...",
1408
+ previous: "Previous",
1409
+ remove: "Remove",
1410
+ required: "Required",
1411
+ reset: "Reset",
1412
+ save: "Save",
1413
+ saved: "Saved",
1414
+ search: "Search",
1415
+ select: "Select",
1416
+ selectOption: "Select an option",
1417
+ show: "Show",
1418
+ showMore: "Show more",
1419
+ showLess: "Show less",
1420
+ submit: "Submit",
1421
+ success: "Success",
1422
+ update: "Update",
1423
+ unsavedChanges: "Unsaved Changes",
1424
+ unsavedChangesSaveQuestion: "Do you want to save your changes?",
1425
+ yes: "Yes"
1426
+ },
1427
+ de: {
1428
+ add: "Hinzuf\xFCgen",
1429
+ all: "Alle",
1430
+ apply: "Anwenden",
1431
+ back: "Zur\xFCck",
1432
+ cancel: "Abbrechen",
1433
+ change: "\xC4ndern",
1434
+ clear: "L\xF6schen",
1435
+ click: "Klicken",
1436
+ clickToCopy: "Zum kopieren klicken",
1437
+ close: "Schlie\xDFen",
1438
+ confirm: "Best\xE4tigen",
1439
+ copy: "Kopieren",
1440
+ copied: "Kopiert",
1441
+ create: "Erstellen",
1442
+ decline: "Ablehnen",
1443
+ delete: "L\xF6schen",
1444
+ discard: "Verwerfen",
1445
+ discardChanges: "\xC4nderungen Verwerfen",
1446
+ done: "Fertig",
1447
+ edit: "Bearbeiten",
1448
+ enterText: "Text hier eingeben",
1449
+ error: "Fehler",
1450
+ exit: "Beenden",
1451
+ fieldRequiredError: "Dieses Feld ist erforderlich.",
1452
+ invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
1453
+ less: "Weniger",
1454
+ loading: "L\xE4dt",
1455
+ maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
1456
+ minLengthError: "Mindestl\xE4nge nicht erreicht.",
1457
+ more: "Mehr",
1458
+ next: "Weiter",
1459
+ no: "Nein",
1460
+ none: "Nichts",
1461
+ nothingFound: "Nichts gefunden",
1462
+ of: "von",
1463
+ optional: "Optional",
1464
+ pleaseWait: "Bitte warten...",
1465
+ previous: "Vorherige",
1466
+ remove: "Entfernen",
1467
+ required: "Erforderlich",
1468
+ reset: "Zur\xFCcksetzen",
1469
+ save: "Speichern",
1470
+ saved: "Gespeichert",
1471
+ search: "Suche",
1472
+ select: "Select",
1473
+ selectOption: "Option ausw\xE4hlen",
1474
+ show: "Anzeigen",
1475
+ showMore: "Mehr anzeigen",
1476
+ showLess: "Weniger anzeigen",
1477
+ submit: "Abschicken",
1478
+ success: "Erfolg",
1479
+ update: "Update",
1480
+ unsavedChanges: "Ungespeicherte \xC4nderungen",
1481
+ unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
1482
+ yes: "Ja"
1483
+ }
1484
+ };
1485
+
1486
+ // src/components/dialog/Dialog.tsx
1487
+ var import_react13 = require("react");
1488
+ var import_clsx6 = __toESM(require("clsx"));
1489
+ var import_lucide_react3 = require("lucide-react");
1490
+
1491
+ // src/components/layout-and-navigation/FloatingContainer.tsx
1492
+ var import_react11 = require("react");
1493
+ var import_react_dom2 = require("react-dom");
1494
+ var import_clsx5 = require("clsx");
1495
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1496
+ var FloatingContainer = (0, import_react11.forwardRef)(function FloatingContainer2({
1497
+ children,
1498
+ backgroundOverlay,
1499
+ anchor,
1500
+ isPolling = false,
1501
+ pollingInterval = 100,
1502
+ verticalAlignment = "afterEnd",
1503
+ horizontalAlignment = "afterStart",
1504
+ screenPadding = 16,
1505
+ gap = 4,
1506
+ ...props
1507
+ }, forwardRef5) {
1508
+ const innerRef = (0, import_react11.useRef)(null);
1509
+ (0, import_react11.useImperativeHandle)(forwardRef5, () => innerRef.current);
1510
+ const position = useFloatingElement({
1511
+ active: !props.hidden,
1512
+ containerRef: innerRef,
1513
+ anchorRef: anchor,
1514
+ isPolling,
1515
+ pollingInterval,
1516
+ verticalAlignment,
1517
+ horizontalAlignment,
1518
+ gap,
1519
+ screenPadding
1520
+ });
1521
+ return (0, import_react_dom2.createPortal)(
1522
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1523
+ backgroundOverlay,
1524
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1525
+ "div",
1526
+ {
1527
+ ...props,
1528
+ ref: innerRef,
1529
+ style: {
1530
+ position: "fixed",
1531
+ overflow: "hidden",
1532
+ opacity: position ? void 0 : 0,
1533
+ // hide when position calculation isn't done yet
1534
+ transition: position ? `top ${pollingInterval}ms linear, left ${pollingInterval}ms linear` : void 0,
1535
+ ...position,
1536
+ ...props.style
1537
+ },
1538
+ className: (0, import_clsx5.clsx)("motion-safe:duration-100 motion-reduce:duration-0", props.className),
1539
+ children
1540
+ }
1541
+ )
1542
+ ] }),
1543
+ document.body
1544
+ );
1545
+ });
1546
+
1547
+ // src/hooks/useLogOnce.ts
1548
+ var import_react12 = require("react");
1549
+ var defaultOptions = {
1550
+ type: "warning"
1551
+ };
1552
+ var useLogOnce = (message, condition, options) => {
1553
+ const [hasLogged, setHasLogged] = (0, import_react12.useState)(false);
1554
+ const { type } = { ...defaultOptions, ...options };
1555
+ (0, import_react12.useEffect)(() => {
1556
+ if (!hasLogged && condition) {
1557
+ switch (type) {
1558
+ case "info":
1559
+ console.info(message);
1560
+ break;
1561
+ case "error":
1562
+ console.error(message);
1563
+ break;
1564
+ case "warning":
1565
+ console.warn(message);
1566
+ break;
1567
+ }
1568
+ setHasLogged(true);
1569
+ }
1570
+ }, [condition]);
1571
+ };
1572
+
1573
+ // src/components/dialog/Dialog.tsx
1574
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1575
+ var Dialog = ({
1576
+ children,
1577
+ isOpen,
1578
+ titleElement,
1579
+ description,
1580
+ isModal = true,
1581
+ onClose,
1582
+ horizontalAlignment = "center",
1583
+ verticalAlignment = "center",
1584
+ className,
1585
+ backgroundClassName
1586
+ }) => {
1587
+ const translation = useTranslation([formTranslation]);
1588
+ const ref = (0, import_react13.useRef)(null);
1589
+ const onCloseWrapper = () => {
1590
+ if (!isModal) return;
1591
+ onClose?.();
1592
+ };
1593
+ useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
1594
+ useFocusTrap({
1595
+ container: ref,
1596
+ active: isOpen,
1597
+ focusFirst: true
1598
+ });
1599
+ if (!isOpen) return void 0;
1600
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1601
+ FloatingContainer,
1602
+ {
1603
+ ref,
1604
+ hidden: !isOpen,
1605
+ onKeyDown: (event) => {
1606
+ if (event.key === "Escape") {
1607
+ onCloseWrapper();
1608
+ }
1609
+ },
1610
+ horizontalAlignment,
1611
+ verticalAlignment,
1612
+ backgroundOverlay: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1613
+ "div",
1614
+ {
1615
+ className: (0, import_clsx6.default)(
1616
+ "fixed inset-0 h-screen w-screen bg-overlay-shadow",
1617
+ {
1618
+ "motion-safe:animate-fade-in animation-delay-3000": isOpen,
1619
+ "motion-safe:animate-fade-out": !isOpen
1620
+ },
1621
+ backgroundClassName
1622
+ ),
1623
+ hidden: !isOpen,
1624
+ "aria-hidden": true,
1625
+ onClick: onCloseWrapper
1626
+ }
1627
+ ),
1628
+ className: (0, import_clsx6.default)(
1629
+ "flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom",
1630
+ {
1631
+ "motion-safe:animate-pop-in": isOpen,
1632
+ "motion-safe:animate-pop-out": !isOpen
1633
+ },
1634
+ className
1635
+ ),
1636
+ children: [
1637
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "typography-title-lg-semibold mr-8", children: titleElement }),
1638
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-description", children: description }),
1639
+ isModal && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1640
+ "div",
1641
+ {
1642
+ className: "absolute top-0 right-0",
1643
+ style: {
1644
+ paddingTop: "inherit",
1645
+ paddingRight: "inherit"
1646
+ },
1647
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1648
+ IconButton,
1649
+ {
1650
+ color: "neutral",
1651
+ size: "tiny",
1652
+ "aria-label": translation("close"),
1653
+ onClick: onCloseWrapper,
1654
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.X, {})
1655
+ }
1656
+ )
1657
+ }
1658
+ ),
1659
+ children
1660
+ ]
1661
+ }
1662
+ );
1663
+ };
1664
+
1665
+ // src/components/dialog/ThemeDialog.tsx
1666
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1667
+ var defaultConfirmDialogTranslation = {
1668
+ en: {
1669
+ chooseTheme: "Choose your preferred theme"
1670
+ },
1671
+ de: {
1672
+ chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
1673
+ }
1674
+ };
1675
+ var ThemeDialog = ({
1676
+ overwriteTranslation,
1677
+ onClose,
1678
+ titleOverwrite,
1679
+ descriptionOverwrite,
1680
+ ...props
1681
+ }) => {
1682
+ const { theme, setTheme } = useTheme();
1683
+ const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
1684
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1685
+ Dialog,
1686
+ {
1687
+ titleElement: titleOverwrite ?? translation("theme"),
1688
+ description: descriptionOverwrite ?? translation("chooseTheme"),
1689
+ onClose,
1690
+ ...props,
1691
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "w-64", children: [
1692
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1693
+ Select,
1694
+ {
1695
+ value: theme,
1696
+ onValueChanged: (theme2) => setTheme(theme2),
1697
+ contentPanelProps: {
1698
+ className: "z-100"
1699
+ },
1700
+ buttonProps: {
1701
+ selectedDisplay: (value) => translation(value)
1702
+ },
1703
+ children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectOption, { value: theme2, children: translation(theme2) }, theme2))
1704
+ }
1705
+ ),
1706
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
1707
+ ] })
1708
+ }
1709
+ );
1710
+ };
1711
+ // Annotate the CommonJS export names for ESM import in node:
1712
+ 0 && (module.exports = {
1713
+ ThemeDialog
1714
+ });
1715
+ //# sourceMappingURL=ThemeDialog.js.map