@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
@@ -1,979 +0,0 @@
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/modals/InputModal.tsx
30
- var InputModal_exports = {};
31
- __export(InputModal_exports, {
32
- InputModal: () => InputModal
33
- });
34
- module.exports = __toCommonJS(InputModal_exports);
35
-
36
- // src/components/user-action/Input.tsx
37
- var import_react4 = require("react");
38
- var import_clsx2 = __toESM(require("clsx"));
39
-
40
- // src/hooks/useDelay.ts
41
- var import_react = require("react");
42
- var defaultOptions = {
43
- delay: 3e3,
44
- disabled: false
45
- };
46
- function useDelay(options) {
47
- const [timer, setTimer] = (0, import_react.useState)(void 0);
48
- const { delay, disabled } = {
49
- ...defaultOptions,
50
- ...options
51
- };
52
- const clearTimer = () => {
53
- clearTimeout(timer);
54
- setTimer(void 0);
55
- };
56
- const restartTimer = (onDelayFinish) => {
57
- if (disabled) {
58
- return;
59
- }
60
- clearTimeout(timer);
61
- setTimer(setTimeout(() => {
62
- onDelayFinish();
63
- setTimer(void 0);
64
- }, delay));
65
- };
66
- (0, import_react.useEffect)(() => {
67
- return () => {
68
- clearTimeout(timer);
69
- };
70
- }, [timer]);
71
- (0, import_react.useEffect)(() => {
72
- if (disabled) {
73
- clearTimeout(timer);
74
- setTimer(void 0);
75
- }
76
- }, [disabled, timer]);
77
- return { restartTimer, clearTimer, hasActiveTimer: !!timer };
78
- }
79
-
80
- // src/util/noop.ts
81
- var noop = () => void 0;
82
-
83
- // src/components/user-action/Label.tsx
84
- var import_clsx = __toESM(require("clsx"));
85
- var import_jsx_runtime = require("react/jsx-runtime");
86
- var styleMapping = {
87
- labelSmall: "textstyle-label-sm",
88
- labelMedium: "textstyle-label-md",
89
- labelBig: "textstyle-label-lg"
90
- };
91
- var Label = ({
92
- children,
93
- name,
94
- labelType = "labelSmall",
95
- className,
96
- ...props
97
- }) => {
98
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...props, className: (0, import_clsx.default)(styleMapping[labelType], className), children: children ? children : name });
99
- };
100
-
101
- // src/hooks/useFocusManagement.ts
102
- var import_react2 = require("react");
103
- function useFocusManagement() {
104
- const getFocusableElements = (0, import_react2.useCallback)(() => {
105
- return Array.from(
106
- document.querySelectorAll(
107
- 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
108
- )
109
- ).filter(
110
- (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
111
- );
112
- }, []);
113
- const getNextFocusElement = (0, import_react2.useCallback)(() => {
114
- const elements = getFocusableElements();
115
- if (elements.length === 0) {
116
- return void 0;
117
- }
118
- let nextElement = elements[0];
119
- if (document.activeElement instanceof HTMLElement) {
120
- const currentIndex = elements.indexOf(document.activeElement);
121
- nextElement = elements[(currentIndex + 1) % elements.length];
122
- }
123
- return nextElement;
124
- }, [getFocusableElements]);
125
- const focusNext = (0, import_react2.useCallback)(() => {
126
- const nextElement = getNextFocusElement();
127
- nextElement?.focus();
128
- }, [getNextFocusElement]);
129
- const getPreviousFocusElement = (0, import_react2.useCallback)(() => {
130
- const elements = getFocusableElements();
131
- if (elements.length === 0) {
132
- return void 0;
133
- }
134
- let previousElement = elements[0];
135
- if (document.activeElement instanceof HTMLElement) {
136
- const currentIndex = elements.indexOf(document.activeElement);
137
- if (currentIndex === 0) {
138
- previousElement = elements[elements.length - 1];
139
- } else {
140
- previousElement = elements[currentIndex - 1];
141
- }
142
- }
143
- return previousElement;
144
- }, [getFocusableElements]);
145
- const focusPrevious = (0, import_react2.useCallback)(() => {
146
- const previousElement = getPreviousFocusElement();
147
- if (previousElement) previousElement.focus();
148
- }, [getPreviousFocusElement]);
149
- return {
150
- getFocusableElements,
151
- getNextFocusElement,
152
- getPreviousFocusElement,
153
- focusNext,
154
- focusPrevious
155
- };
156
- }
157
-
158
- // src/hooks/useFocusOnceVisible.ts
159
- var import_react3 = __toESM(require("react"));
160
- var useFocusOnceVisible = (ref, disable = false) => {
161
- const [hasUsedFocus, setHasUsedFocus] = import_react3.default.useState(false);
162
- (0, import_react3.useEffect)(() => {
163
- if (disable || hasUsedFocus) {
164
- return;
165
- }
166
- const observer = new IntersectionObserver(([entry]) => {
167
- if (entry.isIntersecting && !hasUsedFocus) {
168
- ref.current?.focus();
169
- setHasUsedFocus(hasUsedFocus);
170
- }
171
- }, {
172
- threshold: 0.1
173
- });
174
- if (ref.current) {
175
- observer.observe(ref.current);
176
- }
177
- return () => observer.disconnect();
178
- }, [disable, hasUsedFocus, ref]);
179
- };
180
-
181
- // src/components/user-action/Input.tsx
182
- var import_jsx_runtime2 = require("react/jsx-runtime");
183
- var getInputClassName = ({ disabled = false, hasError = false }) => {
184
- return (0, import_clsx2.default)(
185
- "px-2 py-1.5 rounded-md border-2",
186
- {
187
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
188
- "bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
189
- "bg-disabled-background text-disabled-text border-disabled-border": disabled
190
- }
191
- );
192
- };
193
- var defaultEditCompleteOptions = {
194
- onBlur: true,
195
- afterDelay: true,
196
- delay: 2500
197
- };
198
- var Input = (0, import_react4.forwardRef)(function Input2({
199
- id,
200
- type = "text",
201
- value,
202
- label,
203
- onChange = noop,
204
- onChangeText = noop,
205
- onEditCompleted,
206
- className = "",
207
- allowEnterComplete = true,
208
- expanded = true,
209
- autoFocus = false,
210
- onBlur,
211
- editCompleteOptions,
212
- containerClassName,
213
- disabled,
214
- ...restProps
215
- }, forwardedRef) {
216
- const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
217
- const {
218
- restartTimer,
219
- clearTimer
220
- } = useDelay({ delay, disabled: !afterDelay });
221
- const innerRef = (0, import_react4.useRef)(null);
222
- const { focusNext } = useFocusManagement();
223
- useFocusOnceVisible(innerRef, !autoFocus);
224
- (0, import_react4.useImperativeHandle)(forwardedRef, () => innerRef.current);
225
- const handleKeyDown = (e) => {
226
- if (e.key === "Enter" && !e.shiftKey) {
227
- e.preventDefault();
228
- innerRef.current?.blur();
229
- focusNext();
230
- }
231
- };
232
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: (0, import_clsx2.default)({ "w-full": expanded }, containerClassName), children: [
233
- label && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx2.default)("mb-1", label.className) }),
234
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
235
- "input",
236
- {
237
- ...restProps,
238
- ref: innerRef,
239
- value,
240
- id,
241
- type,
242
- disabled,
243
- className: (0, import_clsx2.default)(getInputClassName({ disabled }), className),
244
- onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
245
- onBlur: (event) => {
246
- onBlur?.(event);
247
- if (onEditCompleted && allowEditCompleteOnBlur) {
248
- onEditCompleted(event.target.value);
249
- clearTimer();
250
- }
251
- },
252
- onChange: (e) => {
253
- const value2 = e.target.value;
254
- if (onEditCompleted) {
255
- restartTimer(() => {
256
- if (innerRef.current) {
257
- innerRef.current.blur();
258
- if (!allowEditCompleteOnBlur) {
259
- onEditCompleted(value2);
260
- }
261
- } else {
262
- onEditCompleted(value2);
263
- }
264
- });
265
- }
266
- onChange(e);
267
- onChangeText(value2);
268
- }
269
- }
270
- )
271
- ] });
272
- });
273
- var FormInput = (0, import_react4.forwardRef)(function FormInput2({
274
- id,
275
- labelText,
276
- errorText,
277
- className,
278
- labelClassName,
279
- errorClassName,
280
- containerClassName,
281
- required,
282
- disabled,
283
- ...restProps
284
- }, ref) {
285
- const input = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
286
- "input",
287
- {
288
- ...restProps,
289
- ref,
290
- id,
291
- disabled,
292
- className: (0, import_clsx2.default)(
293
- getInputClassName({ disabled, hasError: !!errorText }),
294
- className
295
- )
296
- }
297
- );
298
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: (0, import_clsx2.default)("flex flex-col gap-y-1", containerClassName), children: [
299
- labelText && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("label", { htmlFor: id, className: (0, import_clsx2.default)("textstyle-label-md", labelClassName), children: [
300
- labelText,
301
- required && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-primary font-bold", children: "*" })
302
- ] }),
303
- input,
304
- errorText && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { htmlFor: id, className: (0, import_clsx2.default)("text-negative", errorClassName), children: errorText })
305
- ] });
306
- });
307
-
308
- // src/components/user-action/Button.tsx
309
- var import_react5 = require("react");
310
- var import_clsx3 = __toESM(require("clsx"));
311
- var import_jsx_runtime3 = require("react/jsx-runtime");
312
- var ButtonColorUtil = {
313
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
314
- text: ["primary", "negative", "neutral"],
315
- outline: ["primary"]
316
- };
317
- var IconButtonUtil = {
318
- icon: [...ButtonColorUtil.solid, "transparent"]
319
- };
320
- var paddingMapping = {
321
- small: "btn-sm",
322
- medium: "btn-md",
323
- large: "btn-lg"
324
- };
325
- var iconPaddingMapping = {
326
- tiny: "icon-btn-xs",
327
- small: "icon-btn-sm",
328
- medium: "icon-btn-md",
329
- large: "icon-btn-lg"
330
- };
331
- var ButtonUtil = {
332
- paddingMapping,
333
- iconPaddingMapping
334
- };
335
- var SolidButton = (0, import_react5.forwardRef)(function SolidButton2({
336
- children,
337
- disabled = false,
338
- color = "primary",
339
- size = "medium",
340
- startIcon,
341
- endIcon,
342
- onClick,
343
- className,
344
- ...restProps
345
- }, ref) {
346
- const colorClasses = {
347
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
348
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
349
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
350
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
351
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
352
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
353
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
354
- }[color];
355
- const iconColorClasses = {
356
- primary: "text-button-solid-primary-icon",
357
- secondary: "text-button-solid-secondary-icon",
358
- tertiary: "text-button-solid-tertiary-icon",
359
- positive: "text-button-solid-positive-icon",
360
- warning: "text-button-solid-warning-icon",
361
- negative: "text-button-solid-negative-icon",
362
- neutral: "text-button-solid-neutral-icon"
363
- }[color];
364
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
365
- "button",
366
- {
367
- ref,
368
- onClick,
369
- disabled,
370
- className: (0, import_clsx3.default)(
371
- "font-semibold",
372
- {
373
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
374
- [(0, import_clsx3.default)(colorClasses, "hover:brightness-90")]: !disabled
375
- },
376
- ButtonUtil.paddingMapping[size],
377
- className
378
- ),
379
- ...restProps,
380
- children: [
381
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
382
- "span",
383
- {
384
- className: (0, import_clsx3.default)({
385
- [iconColorClasses]: !disabled,
386
- [`text-disabled-icon`]: disabled
387
- }),
388
- children: startIcon
389
- }
390
- ),
391
- children,
392
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
393
- "span",
394
- {
395
- className: (0, import_clsx3.default)({
396
- [iconColorClasses]: !disabled,
397
- [`text-disabled-icon`]: disabled
398
- }),
399
- children: endIcon
400
- }
401
- )
402
- ]
403
- }
404
- );
405
- });
406
- var IconButton = ({
407
- children,
408
- disabled = false,
409
- color = "primary",
410
- size = "medium",
411
- className,
412
- ...restProps
413
- }) => {
414
- const colorClasses = {
415
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
416
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
417
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
418
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
419
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
420
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
421
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
422
- transparent: "bg-transparent"
423
- }[color];
424
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
425
- "button",
426
- {
427
- disabled,
428
- className: (0, import_clsx3.default)(
429
- {
430
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
431
- "text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
432
- "hover:bg-button-text-hover-background": !disabled && color === "transparent",
433
- [(0, import_clsx3.default)(colorClasses, "hover:brightness-90")]: !disabled
434
- },
435
- ButtonUtil.iconPaddingMapping[size],
436
- className
437
- ),
438
- ...restProps,
439
- children
440
- }
441
- );
442
- };
443
-
444
- // src/localization/LanguageProvider.tsx
445
- var import_react7 = require("react");
446
-
447
- // src/hooks/useLocalStorage.ts
448
- var import_react6 = require("react");
449
-
450
- // src/localization/util.ts
451
- var languages = ["en", "de"];
452
- var languagesLocalNames = {
453
- en: "English",
454
- de: "Deutsch"
455
- };
456
- var DEFAULT_LANGUAGE = "en";
457
- var LanguageUtil = {
458
- languages,
459
- DEFAULT_LANGUAGE,
460
- languagesLocalNames
461
- };
462
-
463
- // src/localization/LanguageProvider.tsx
464
- var import_jsx_runtime4 = require("react/jsx-runtime");
465
- var LanguageContext = (0, import_react7.createContext)({
466
- language: LanguageUtil.DEFAULT_LANGUAGE,
467
- setLanguage: (v) => v
468
- });
469
- var useLanguage = () => (0, import_react7.useContext)(LanguageContext);
470
-
471
- // src/localization/useTranslation.ts
472
- var TranslationPluralCount = {
473
- zero: 0,
474
- one: 1,
475
- two: 2,
476
- few: 3,
477
- many: 11,
478
- other: -1
479
- };
480
- var useTranslation = (translations, overwriteTranslation = {}) => {
481
- const { language: languageProp, translation: overwrite } = overwriteTranslation;
482
- const { language: inferredLanguage } = useLanguage();
483
- const usedLanguage = languageProp ?? inferredLanguage;
484
- const usedTranslations = [...translations];
485
- if (overwrite) {
486
- usedTranslations.push(overwrite);
487
- }
488
- return (key, options) => {
489
- const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
490
- try {
491
- for (let i = translations.length - 1; i >= 0; i--) {
492
- const translation = translations[i];
493
- const localizedTranslation = translation[usedLanguage];
494
- if (!localizedTranslation) {
495
- continue;
496
- }
497
- const value = localizedTranslation[key];
498
- if (!value) {
499
- continue;
500
- }
501
- let forProcessing;
502
- if (typeof value !== "string") {
503
- if (count === TranslationPluralCount.zero && value?.zero) {
504
- forProcessing = value.zero;
505
- } else if (count === TranslationPluralCount.one && value?.one) {
506
- forProcessing = value.one;
507
- } else if (count === TranslationPluralCount.two && value?.two) {
508
- forProcessing = value.two;
509
- } else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
510
- forProcessing = value.few;
511
- } else if (count > TranslationPluralCount.many && value?.many) {
512
- forProcessing = value.many;
513
- } else {
514
- forProcessing = value.other;
515
- }
516
- } else {
517
- forProcessing = value;
518
- }
519
- forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
520
- return replacements[placeholder] ?? `{{key:${placeholder}}}`;
521
- });
522
- return forProcessing;
523
- }
524
- } catch (e) {
525
- console.error(e);
526
- }
527
- return `{{${usedLanguage}:${key}}}`;
528
- };
529
- };
530
-
531
- // src/components/modals/ConfirmModal.tsx
532
- var import_clsx6 = __toESM(require("clsx"));
533
-
534
- // src/components/layout-and-navigation/Overlay.tsx
535
- var import_react9 = require("react");
536
- var import_react_dom = __toESM(require("react-dom"));
537
- var import_clsx5 = __toESM(require("clsx"));
538
-
539
- // src/hooks/useHoverState.ts
540
- var import_react8 = require("react");
541
- var defaultUseHoverStateProps = {
542
- closingDelay: 200,
543
- isDisabled: false
544
- };
545
- var useHoverState = (props = void 0) => {
546
- const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
547
- const [isHovered, setIsHovered] = (0, import_react8.useState)(false);
548
- const [timer, setTimer] = (0, import_react8.useState)();
549
- const onMouseEnter = () => {
550
- if (isDisabled) {
551
- return;
552
- }
553
- clearTimeout(timer);
554
- setIsHovered(true);
555
- };
556
- const onMouseLeave = () => {
557
- if (isDisabled) {
558
- return;
559
- }
560
- setTimer(setTimeout(() => {
561
- setIsHovered(false);
562
- }, closingDelay));
563
- };
564
- (0, import_react8.useEffect)(() => {
565
- if (timer) {
566
- return () => {
567
- clearTimeout(timer);
568
- };
569
- }
570
- });
571
- (0, import_react8.useEffect)(() => {
572
- if (timer) {
573
- clearTimeout(timer);
574
- }
575
- }, [isDisabled]);
576
- return {
577
- isHovered,
578
- setIsHovered,
579
- handlers: { onMouseEnter, onMouseLeave }
580
- };
581
- };
582
-
583
- // src/components/user-action/Tooltip.tsx
584
- var import_clsx4 = require("clsx");
585
- var import_jsx_runtime5 = require("react/jsx-runtime");
586
- var Tooltip = ({
587
- tooltip,
588
- children,
589
- animationDelay = 650,
590
- tooltipClassName = "",
591
- containerClassName = "",
592
- position = "bottom",
593
- zIndex = 10
594
- }) => {
595
- const { isHovered, handlers } = useHoverState();
596
- const positionClasses = {
597
- top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
598
- bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
599
- left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,
600
- right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`
601
- };
602
- const triangleSize = 6;
603
- const triangleClasses = {
604
- top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,
605
- bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,
606
- left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,
607
- right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`
608
- };
609
- const triangleStyle = {
610
- top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },
611
- bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },
612
- left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
613
- right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
614
- };
615
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
616
- "div",
617
- {
618
- className: (0, import_clsx4.clsx)("relative inline-block", containerClassName),
619
- ...handlers,
620
- children: [
621
- children,
622
- isHovered && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
623
- "div",
624
- {
625
- className: (0, import_clsx4.clsx)(
626
- `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
627
- animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
628
- positionClasses[position],
629
- tooltipClassName
630
- ),
631
- style: { zIndex, animationDelay: animationDelay + "ms" },
632
- children: [
633
- tooltip,
634
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
635
- "div",
636
- {
637
- className: (0, import_clsx4.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
638
- style: { ...triangleStyle[position], zIndex: zIndex + 1 }
639
- }
640
- )
641
- ]
642
- }
643
- )
644
- ]
645
- }
646
- );
647
- };
648
-
649
- // src/components/layout-and-navigation/Overlay.tsx
650
- var import_lucide_react = require("lucide-react");
651
-
652
- // src/localization/defaults/form.ts
653
- var formTranslation = {
654
- en: {
655
- add: "Add",
656
- all: "All",
657
- apply: "Apply",
658
- back: "Back",
659
- cancel: "Cancel",
660
- change: "Change",
661
- clear: "Clear",
662
- click: "Click",
663
- clickToCopy: "Click to Copy",
664
- close: "Close",
665
- confirm: "Confirm",
666
- copy: "Copy",
667
- copied: "Copied",
668
- create: "Create",
669
- decline: "Decline",
670
- delete: "Delete",
671
- discard: "Discard",
672
- discardChanges: "Discard Changes",
673
- done: "Done",
674
- edit: "Edit",
675
- enterText: "Enter text here",
676
- error: "Error",
677
- exit: "Exit",
678
- fieldRequiredError: "This field is required.",
679
- invalidEmailError: "Please enter a valid email address.",
680
- less: "Less",
681
- loading: "Loading",
682
- maxLengthError: "Maximum length exceeded.",
683
- minLengthError: "Minimum length not met.",
684
- more: "More",
685
- next: "Next",
686
- no: "No",
687
- none: "None",
688
- of: "of",
689
- optional: "Optional",
690
- pleaseWait: "Please wait...",
691
- previous: "Previous",
692
- remove: "Remove",
693
- required: "Required",
694
- reset: "Reset",
695
- save: "Save",
696
- saved: "Saved",
697
- search: "Search",
698
- select: "Select",
699
- selectOption: "Select an option",
700
- show: "Show",
701
- showMore: "Show more",
702
- showLess: "Show less",
703
- submit: "Submit",
704
- success: "Success",
705
- update: "Update",
706
- unsavedChanges: "Unsaved Changes",
707
- unsavedChangesSaveQuestion: "Do you want to save your changes?",
708
- yes: "Yes"
709
- },
710
- de: {
711
- add: "Hinzuf\xFCgen",
712
- all: "Alle",
713
- apply: "Anwenden",
714
- back: "Zur\xFCck",
715
- cancel: "Abbrechen",
716
- change: "\xC4ndern",
717
- clear: "L\xF6schen",
718
- click: "Klicken",
719
- clickToCopy: "Zum kopieren klicken",
720
- close: "Schlie\xDFen",
721
- confirm: "Best\xE4tigen",
722
- copy: "Kopieren",
723
- copied: "Kopiert",
724
- create: "Erstellen",
725
- decline: "Ablehnen",
726
- delete: "L\xF6schen",
727
- discard: "Verwerfen",
728
- discardChanges: "\xC4nderungen Verwerfen",
729
- done: "Fertig",
730
- edit: "Bearbeiten",
731
- enterText: "Text hier eingeben",
732
- error: "Fehler",
733
- exit: "Beenden",
734
- fieldRequiredError: "Dieses Feld ist erforderlich.",
735
- invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
736
- less: "Weniger",
737
- loading: "L\xE4dt",
738
- maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
739
- minLengthError: "Mindestl\xE4nge nicht erreicht.",
740
- more: "Mehr",
741
- next: "Weiter",
742
- no: "Nein",
743
- none: "Nichts",
744
- of: "von",
745
- optional: "Optional",
746
- pleaseWait: "Bitte warten...",
747
- previous: "Vorherige",
748
- remove: "Entfernen",
749
- required: "Erforderlich",
750
- reset: "Zur\xFCcksetzen",
751
- save: "Speichern",
752
- saved: "Gespeichert",
753
- search: "Suche",
754
- select: "Select",
755
- selectOption: "Option ausw\xE4hlen",
756
- show: "Anzeigen",
757
- showMore: "Mehr anzeigen",
758
- showLess: "Weniger anzeigen",
759
- submit: "Abschicken",
760
- success: "Erfolg",
761
- update: "Update",
762
- unsavedChanges: "Ungespeicherte \xC4nderungen",
763
- unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
764
- yes: "Ja"
765
- }
766
- };
767
-
768
- // src/components/layout-and-navigation/Overlay.tsx
769
- var import_jsx_runtime6 = require("react/jsx-runtime");
770
- var Overlay = ({
771
- children,
772
- isOpen,
773
- onBackgroundClick,
774
- backgroundClassName
775
- }) => {
776
- const [root, setRoot] = (0, import_react9.useState)();
777
- (0, import_react9.useEffect)(() => {
778
- setRoot(document.body);
779
- }, []);
780
- if (!root || !isOpen) return null;
781
- return import_react_dom.default.createPortal(
782
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx5.default)("fixed inset-0 z-[200]"), children: [
783
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
784
- "div",
785
- {
786
- className: (0, import_clsx5.default)("fixed inset-0 h-screen w-screen bg-overlay-shadow", backgroundClassName),
787
- onClick: onBackgroundClick
788
- }
789
- ),
790
- children
791
- ] }),
792
- root
793
- );
794
- };
795
- var overlayStack = [];
796
- var defaultModalHeaderTranslation = {
797
- en: {
798
- ...formTranslation.en
799
- },
800
- de: {
801
- ...formTranslation.de
802
- }
803
- };
804
- var OverlayHeader = ({
805
- overwriteTranslation,
806
- onClose,
807
- title,
808
- titleText = "",
809
- description,
810
- descriptionText = ""
811
- }) => {
812
- const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
813
- const hasTitleRow = !!title || !!titleText || !!onClose;
814
- const titleRow = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-row-8 justify-between items-start", children: [
815
- title ?? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
816
- "h2",
817
- {
818
- className: (0, import_clsx5.default)("textstyle-title-lg", {
819
- "mb-1": description || descriptionText
820
- }),
821
- children: titleText
822
- }
823
- ),
824
- !!onClose && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.X, { className: "w-full h-full" }) }) })
825
- ] });
826
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-col-2", children: [
827
- hasTitleRow && titleRow,
828
- description ?? (descriptionText && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "textstyle-description", children: descriptionText }))
829
- ] });
830
- };
831
- var Modal = ({
832
- children,
833
- isOpen,
834
- onClose,
835
- className,
836
- backgroundClassName,
837
- headerProps
838
- }) => {
839
- const ref = (0, import_react9.useRef)(null);
840
- (0, import_react9.useEffect)(() => {
841
- if (!isOpen) return;
842
- const modal = ref.current;
843
- if (!modal) {
844
- console.error("modal open, but no ref found");
845
- return;
846
- }
847
- overlayStack.push(modal);
848
- const focusable = modal?.querySelectorAll(
849
- 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
850
- );
851
- const first = focusable[0];
852
- const last = focusable[focusable.length - 1];
853
- const handleKeyDown = (e) => {
854
- const isTopmost = overlayStack[overlayStack.length - 1] === modal;
855
- if (!isTopmost) return;
856
- if (e.key === "Escape") {
857
- e.stopPropagation();
858
- onClose();
859
- } else if (e.key === "Tab") {
860
- if (focusable.length === 0) return;
861
- if (e.shiftKey && document.activeElement === first) {
862
- e.preventDefault();
863
- last.focus();
864
- } else if (!e.shiftKey && document.activeElement === last) {
865
- e.preventDefault();
866
- first.focus();
867
- }
868
- }
869
- };
870
- modal.focus();
871
- document.addEventListener("keydown", handleKeyDown);
872
- return () => {
873
- document.removeEventListener("keydown", handleKeyDown);
874
- overlayStack = overlayStack.filter((m) => m !== modal);
875
- };
876
- }, [isOpen, onClose]);
877
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
878
- Overlay,
879
- {
880
- isOpen,
881
- onBackgroundClick: onClose,
882
- backgroundClassName,
883
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
884
- "div",
885
- {
886
- ref,
887
- tabIndex: -1,
888
- className: (0, import_clsx5.default)(
889
- "flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-around-lg shadow-strong animate-pop-in",
890
- className
891
- ),
892
- role: "dialog",
893
- "aria-modal": true,
894
- children: [
895
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(OverlayHeader, { ...headerProps, onClose }),
896
- children
897
- ]
898
- }
899
- )
900
- }
901
- );
902
- };
903
-
904
- // src/components/modals/ConfirmModal.tsx
905
- var import_jsx_runtime7 = require("react/jsx-runtime");
906
- var ConfirmModal = ({
907
- overwriteTranslation,
908
- children,
909
- onCancel,
910
- onConfirm,
911
- onDecline,
912
- confirmType = "positive",
913
- buttonOverwrites,
914
- className,
915
- ...restProps
916
- }) => {
917
- const translation = useTranslation([formTranslation], overwriteTranslation);
918
- const mapping = {
919
- neutral: "neutral",
920
- negative: "negative",
921
- positive: "positive",
922
- primary: "primary"
923
- };
924
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Modal, { ...restProps, onClose: onCancel, className: (0, import_clsx6.default)("justify-between", className), children: [
925
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-col-2 grow", children }),
926
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
927
- onCancel && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
928
- SolidButton,
929
- {
930
- color: buttonOverwrites?.[0].color ?? "neutral",
931
- onClick: onCancel,
932
- disabled: buttonOverwrites?.[0].disabled ?? false,
933
- children: buttonOverwrites?.[0].text ?? translation("cancel")
934
- }
935
- ),
936
- onDecline && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
937
- SolidButton,
938
- {
939
- color: buttonOverwrites?.[1].color ?? "negative",
940
- onClick: onDecline,
941
- disabled: buttonOverwrites?.[1].disabled ?? false,
942
- children: buttonOverwrites?.[1].text ?? translation("decline")
943
- }
944
- ),
945
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
946
- SolidButton,
947
- {
948
- autoFocus: true,
949
- color: buttonOverwrites?.[2].color ?? mapping[confirmType],
950
- onClick: onConfirm,
951
- disabled: buttonOverwrites?.[2].disabled ?? false,
952
- children: buttonOverwrites?.[2].text ?? translation("confirm")
953
- }
954
- )
955
- ] })
956
- ] });
957
- };
958
-
959
- // src/components/modals/InputModal.tsx
960
- var import_jsx_runtime8 = require("react/jsx-runtime");
961
- var InputModal = ({
962
- inputs,
963
- buttonOverwrites,
964
- ...restProps
965
- }) => {
966
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
967
- ConfirmModal,
968
- {
969
- buttonOverwrites,
970
- ...restProps,
971
- children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Input, { ...inputProps }, `input ${index}`))
972
- }
973
- );
974
- };
975
- // Annotate the CommonJS export names for ESM import in node:
976
- 0 && (module.exports = {
977
- InputModal
978
- });
979
- //# sourceMappingURL=InputModal.js.map