@helpwave/hightide 0.0.19 → 0.1.1

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 (665) hide show
  1. package/README.md +21 -2
  2. package/dist/coloring/shading.cjs +562 -0
  3. package/dist/coloring/shading.cjs.map +1 -0
  4. package/dist/coloring/{shading.d.mts → shading.d.cts} +1 -1
  5. package/dist/coloring/shading.js +482 -37
  6. package/dist/coloring/shading.js.map +1 -1
  7. package/dist/coloring/types.cjs +31 -0
  8. package/dist/coloring/{types.mjs.map → types.cjs.map} +1 -1
  9. package/dist/coloring/types.js +2 -27
  10. package/dist/coloring/types.js.map +1 -1
  11. package/dist/components/{HelpwaveBadge.js → branding/HelpwaveBadge.cjs} +65 -33
  12. package/dist/components/branding/HelpwaveBadge.cjs.map +1 -0
  13. package/dist/components/branding/HelpwaveBadge.js +123 -0
  14. package/dist/components/branding/HelpwaveBadge.js.map +1 -0
  15. package/dist/components/date/{DatePicker.mjs → DatePicker.cjs} +158 -94
  16. package/dist/components/date/DatePicker.cjs.map +1 -0
  17. package/dist/components/date/{DatePicker.d.mts → DatePicker.d.cts} +7 -8
  18. package/dist/components/date/DatePicker.d.ts +4 -5
  19. package/dist/components/date/DatePicker.js +121 -129
  20. package/dist/components/date/DatePicker.js.map +1 -1
  21. package/dist/components/date/{DayPicker.mjs → DayPicker.cjs} +77 -24
  22. package/dist/components/date/DayPicker.cjs.map +1 -0
  23. package/dist/components/date/{DayPicker.d.mts → DayPicker.d.cts} +3 -3
  24. package/dist/components/date/DayPicker.d.ts +2 -2
  25. package/dist/components/date/DayPicker.js +38 -61
  26. package/dist/components/date/DayPicker.js.map +1 -1
  27. package/dist/components/{TimeDisplay.js → date/TimeDisplay.cjs} +24 -9
  28. package/dist/components/date/TimeDisplay.cjs.map +1 -0
  29. package/dist/components/{TimeDisplay.d.mts → date/TimeDisplay.d.cts} +2 -3
  30. package/dist/components/{TimeDisplay.d.ts → date/TimeDisplay.d.ts} +2 -3
  31. package/dist/components/{TimeDisplay.mjs → date/TimeDisplay.js} +23 -8
  32. package/dist/components/date/TimeDisplay.js.map +1 -0
  33. package/dist/components/date/{TimePicker.mjs → TimePicker.cjs} +62 -26
  34. package/dist/components/date/TimePicker.cjs.map +1 -0
  35. package/dist/components/date/{TimePicker.d.mts → TimePicker.d.cts} +2 -2
  36. package/dist/components/date/TimePicker.d.ts +2 -2
  37. package/dist/components/date/TimePicker.js +25 -61
  38. package/dist/components/date/TimePicker.js.map +1 -1
  39. package/dist/components/date/{YearMonthPicker.mjs → YearMonthPicker.cjs} +93 -42
  40. package/dist/components/date/YearMonthPicker.cjs.map +1 -0
  41. package/dist/components/date/{YearMonthPicker.d.mts → YearMonthPicker.d.cts} +2 -2
  42. package/dist/components/date/YearMonthPicker.d.ts +2 -2
  43. package/dist/components/date/YearMonthPicker.js +56 -77
  44. package/dist/components/date/YearMonthPicker.js.map +1 -1
  45. package/dist/components/dialogs/ConfirmDialog.cjs +509 -0
  46. package/dist/components/dialogs/ConfirmDialog.cjs.map +1 -0
  47. package/dist/components/dialogs/ConfirmDialog.d.cts +37 -0
  48. package/dist/components/dialogs/ConfirmDialog.d.ts +37 -0
  49. package/dist/components/dialogs/ConfirmDialog.js +472 -0
  50. package/dist/components/dialogs/ConfirmDialog.js.map +1 -0
  51. package/dist/components/{AvatarGroup.js → icons-and-geometry/Avatar.cjs} +23 -19
  52. package/dist/components/icons-and-geometry/Avatar.cjs.map +1 -0
  53. package/dist/components/icons-and-geometry/Avatar.d.cts +30 -0
  54. package/dist/components/icons-and-geometry/Avatar.d.ts +30 -0
  55. package/dist/components/{AvatarGroup.mjs → icons-and-geometry/Avatar.js} +13 -10
  56. package/dist/components/icons-and-geometry/Avatar.js.map +1 -0
  57. package/dist/components/{Circle.js → icons-and-geometry/Circle.cjs} +3 -3
  58. package/dist/components/icons-and-geometry/Circle.cjs.map +1 -0
  59. package/dist/components/{Circle.mjs → icons-and-geometry/Circle.js} +2 -2
  60. package/dist/components/icons-and-geometry/Circle.js.map +1 -0
  61. package/dist/components/{icons/Helpwave.js → icons-and-geometry/Helpwave.cjs} +38 -6
  62. package/dist/components/icons-and-geometry/Helpwave.cjs.map +1 -0
  63. package/dist/components/icons-and-geometry/Helpwave.js +75 -0
  64. package/dist/components/icons-and-geometry/Helpwave.js.map +1 -0
  65. package/dist/components/{Ring.js → icons-and-geometry/Ring.cjs} +6 -6
  66. package/dist/components/icons-and-geometry/Ring.cjs.map +1 -0
  67. package/dist/components/{Ring.mjs → icons-and-geometry/Ring.js} +4 -4
  68. package/dist/components/icons-and-geometry/Ring.js.map +1 -0
  69. package/dist/components/{icons/Tag.js → icons-and-geometry/Tag.cjs} +3 -3
  70. package/dist/components/icons-and-geometry/Tag.cjs.map +1 -0
  71. package/dist/components/{icons/Tag.mjs → icons-and-geometry/Tag.js} +2 -2
  72. package/dist/components/icons-and-geometry/Tag.js.map +1 -0
  73. package/dist/components/{BreadCrumb.js → layout-and-navigation/BreadCrumb.cjs} +12 -5
  74. package/dist/components/layout-and-navigation/BreadCrumb.cjs.map +1 -0
  75. package/dist/components/{BreadCrumb.mjs → layout-and-navigation/BreadCrumb.js} +10 -3
  76. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -0
  77. package/dist/components/{layout/Carousel.js → layout-and-navigation/Carousel.cjs} +4 -4
  78. package/dist/components/layout-and-navigation/Carousel.cjs.map +1 -0
  79. package/dist/components/{layout/Carousel.mjs → layout-and-navigation/Carousel.js} +4 -4
  80. package/dist/components/layout-and-navigation/Carousel.js.map +1 -0
  81. package/dist/components/{ChipList.js → layout-and-navigation/Chip.cjs} +6 -6
  82. package/dist/components/layout-and-navigation/Chip.cjs.map +1 -0
  83. package/dist/components/{ChipList.mjs → layout-and-navigation/Chip.js} +2 -2
  84. package/dist/components/layout-and-navigation/Chip.js.map +1 -0
  85. package/dist/components/{layout/DividerInserter.js → layout-and-navigation/DividerInserter.cjs} +3 -3
  86. package/dist/components/layout-and-navigation/DividerInserter.cjs.map +1 -0
  87. package/dist/components/{layout/DividerInserter.mjs → layout-and-navigation/DividerInserter.js} +2 -2
  88. package/dist/components/layout-and-navigation/DividerInserter.js.map +1 -0
  89. package/dist/components/{Expandable.js → layout-and-navigation/Expandable.cjs} +3 -3
  90. package/dist/components/layout-and-navigation/Expandable.cjs.map +1 -0
  91. package/dist/components/{Expandable.mjs → layout-and-navigation/Expandable.js} +2 -2
  92. package/dist/components/layout-and-navigation/Expandable.js.map +1 -0
  93. package/dist/components/{layout/FAQSection.js → layout-and-navigation/FAQSection.cjs} +7 -7
  94. package/dist/components/layout-and-navigation/FAQSection.cjs.map +1 -0
  95. package/dist/components/{layout/FAQSection.d.mts → layout-and-navigation/FAQSection.d.cts} +1 -1
  96. package/dist/components/{layout → layout-and-navigation}/FAQSection.d.ts +1 -1
  97. package/dist/components/{layout/FAQSection.mjs → layout-and-navigation/FAQSection.js} +5 -5
  98. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -0
  99. package/dist/components/{MarkdownInterpreter.js → layout-and-navigation/MarkdownInterpreter.cjs} +2 -2
  100. package/dist/components/layout-and-navigation/MarkdownInterpreter.cjs.map +1 -0
  101. package/dist/components/{MarkdownInterpreter.mjs → layout-and-navigation/MarkdownInterpreter.js} +2 -2
  102. package/dist/components/layout-and-navigation/MarkdownInterpreter.js.map +1 -0
  103. package/dist/components/layout-and-navigation/Overlay.cjs +460 -0
  104. package/dist/components/layout-and-navigation/Overlay.cjs.map +1 -0
  105. package/dist/components/layout-and-navigation/Overlay.d.cts +68 -0
  106. package/dist/components/layout-and-navigation/Overlay.d.ts +68 -0
  107. package/dist/components/layout-and-navigation/Overlay.js +422 -0
  108. package/dist/components/layout-and-navigation/Overlay.js.map +1 -0
  109. package/dist/components/{Pagination.js → layout-and-navigation/Pagination.cjs} +25 -10
  110. package/dist/components/layout-and-navigation/Pagination.cjs.map +1 -0
  111. package/dist/components/{Pagination.d.mts → layout-and-navigation/Pagination.d.cts} +2 -3
  112. package/dist/components/{Pagination.d.ts → layout-and-navigation/Pagination.d.ts} +2 -3
  113. package/dist/components/{Pagination.mjs → layout-and-navigation/Pagination.js} +25 -10
  114. package/dist/components/layout-and-navigation/Pagination.js.map +1 -0
  115. package/dist/components/{SearchableList.js → layout-and-navigation/SearchableList.cjs} +51 -34
  116. package/dist/components/layout-and-navigation/SearchableList.cjs.map +1 -0
  117. package/dist/components/{SearchableList.d.mts → layout-and-navigation/SearchableList.d.cts} +2 -2
  118. package/dist/components/{SearchableList.d.ts → layout-and-navigation/SearchableList.d.ts} +2 -2
  119. package/dist/components/{SearchableList.mjs → layout-and-navigation/SearchableList.js} +52 -40
  120. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -0
  121. package/dist/components/{StepperBar.js → layout-and-navigation/StepperBar.cjs} +42 -16
  122. package/dist/components/layout-and-navigation/StepperBar.cjs.map +1 -0
  123. package/dist/components/{StepperBar.d.mts → layout-and-navigation/StepperBar.d.cts} +2 -3
  124. package/dist/components/{StepperBar.d.ts → layout-and-navigation/StepperBar.d.ts} +2 -3
  125. package/dist/components/{StepperBar.mjs → layout-and-navigation/StepperBar.js} +40 -14
  126. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -0
  127. package/dist/components/{Table.js → layout-and-navigation/Table.cjs} +176 -40
  128. package/dist/components/layout-and-navigation/Table.cjs.map +1 -0
  129. package/dist/components/{Table.d.mts → layout-and-navigation/Table.d.cts} +10 -1
  130. package/dist/components/{Table.d.ts → layout-and-navigation/Table.d.ts} +10 -1
  131. package/dist/components/{Table.mjs → layout-and-navigation/Table.js} +175 -40
  132. package/dist/components/layout-and-navigation/Table.js.map +1 -0
  133. package/dist/components/{TextImage.js → layout-and-navigation/TextImage.cjs} +25 -10
  134. package/dist/components/layout-and-navigation/TextImage.cjs.map +1 -0
  135. package/dist/components/{TextImage.d.mts → layout-and-navigation/TextImage.d.cts} +2 -3
  136. package/dist/components/{TextImage.d.ts → layout-and-navigation/TextImage.d.ts} +2 -3
  137. package/dist/components/{TextImage.mjs → layout-and-navigation/TextImage.js} +23 -8
  138. package/dist/components/layout-and-navigation/TextImage.js.map +1 -0
  139. package/dist/components/{layout/Tile.js → layout-and-navigation/Tile.cjs} +4 -4
  140. package/dist/components/layout-and-navigation/Tile.cjs.map +1 -0
  141. package/dist/components/{layout/Tile.mjs → layout-and-navigation/Tile.js} +2 -2
  142. package/dist/components/layout-and-navigation/Tile.js.map +1 -0
  143. package/dist/components/{VerticalDivider.js → layout-and-navigation/VerticalDivider.cjs} +2 -2
  144. package/dist/components/layout-and-navigation/VerticalDivider.cjs.map +1 -0
  145. package/dist/components/{VerticalDivider.mjs → layout-and-navigation/VerticalDivider.js} +2 -2
  146. package/dist/components/layout-and-navigation/VerticalDivider.js.map +1 -0
  147. package/dist/components/{ErrorComponent.js → loading-states/ErrorComponent.cjs} +25 -10
  148. package/dist/components/loading-states/ErrorComponent.cjs.map +1 -0
  149. package/dist/components/{ErrorComponent.d.mts → loading-states/ErrorComponent.d.cts} +2 -3
  150. package/dist/components/{ErrorComponent.d.ts → loading-states/ErrorComponent.d.ts} +2 -3
  151. package/dist/components/{ErrorComponent.mjs → loading-states/ErrorComponent.js} +24 -9
  152. package/dist/components/loading-states/ErrorComponent.js.map +1 -0
  153. package/dist/components/{LoadingAndErrorComponent.js → loading-states/LoadingAndErrorComponent.cjs} +67 -18
  154. package/dist/components/loading-states/LoadingAndErrorComponent.cjs.map +1 -0
  155. package/dist/components/{LoadingAndErrorComponent.d.mts → loading-states/LoadingAndErrorComponent.d.cts} +6 -6
  156. package/dist/components/{LoadingAndErrorComponent.d.ts → loading-states/LoadingAndErrorComponent.d.ts} +4 -4
  157. package/dist/components/{LoadingAndErrorComponent.mjs → loading-states/LoadingAndErrorComponent.js} +66 -17
  158. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -0
  159. package/dist/components/{LoadingAnimation.js → loading-states/LoadingAnimation.cjs} +64 -15
  160. package/dist/components/loading-states/LoadingAnimation.cjs.map +1 -0
  161. package/dist/components/{LoadingAnimation.d.mts → loading-states/LoadingAnimation.d.cts} +2 -3
  162. package/dist/components/{LoadingAnimation.d.ts → loading-states/LoadingAnimation.d.ts} +2 -3
  163. package/dist/components/{LoadingAnimation.mjs → loading-states/LoadingAnimation.js} +63 -14
  164. package/dist/components/loading-states/LoadingAnimation.js.map +1 -0
  165. package/dist/components/{LoadingButton.js → loading-states/LoadingButton.cjs} +101 -58
  166. package/dist/components/loading-states/LoadingButton.cjs.map +1 -0
  167. package/dist/components/{LoadingButton.d.mts → loading-states/LoadingButton.d.cts} +1 -1
  168. package/dist/components/{LoadingButton.d.ts → loading-states/LoadingButton.d.ts} +1 -1
  169. package/dist/components/{LoadingButton.mjs → loading-states/LoadingButton.js} +100 -57
  170. package/dist/components/loading-states/LoadingButton.js.map +1 -0
  171. package/dist/components/{ProgressIndicator.js → loading-states/ProgressIndicator.cjs} +2 -2
  172. package/dist/components/loading-states/ProgressIndicator.cjs.map +1 -0
  173. package/dist/components/{ProgressIndicator.mjs → loading-states/ProgressIndicator.js} +2 -2
  174. package/dist/components/loading-states/ProgressIndicator.js.map +1 -0
  175. package/dist/components/modals/{ConfirmDialog.js → ConfirmModal.cjs} +214 -117
  176. package/dist/components/modals/ConfirmModal.cjs.map +1 -0
  177. package/dist/components/modals/ConfirmModal.d.cts +36 -0
  178. package/dist/components/modals/ConfirmModal.d.ts +36 -0
  179. package/dist/components/modals/{ConfirmDialog.mjs → ConfirmModal.js} +203 -106
  180. package/dist/components/modals/ConfirmModal.js.map +1 -0
  181. package/dist/components/modals/DiscardChangesModal.cjs +570 -0
  182. package/dist/components/modals/DiscardChangesModal.cjs.map +1 -0
  183. package/dist/components/modals/DiscardChangesModal.d.cts +25 -0
  184. package/dist/components/modals/DiscardChangesModal.d.ts +25 -0
  185. package/dist/components/modals/DiscardChangesModal.js +533 -0
  186. package/dist/components/modals/DiscardChangesModal.js.map +1 -0
  187. package/dist/components/modals/InputModal.cjs +689 -0
  188. package/dist/components/modals/InputModal.cjs.map +1 -0
  189. package/dist/components/modals/{InputModal.d.mts → InputModal.d.cts} +7 -7
  190. package/dist/components/modals/InputModal.d.ts +7 -7
  191. package/dist/components/modals/InputModal.js +273 -221
  192. package/dist/components/modals/InputModal.js.map +1 -1
  193. package/dist/components/modals/LanguageModal.cjs +667 -0
  194. package/dist/components/modals/LanguageModal.cjs.map +1 -0
  195. package/dist/components/modals/LanguageModal.d.cts +20 -0
  196. package/dist/components/modals/LanguageModal.d.ts +7 -8
  197. package/dist/components/modals/LanguageModal.js +308 -206
  198. package/dist/components/modals/LanguageModal.js.map +1 -1
  199. package/dist/components/modals/ThemeModal.cjs +694 -0
  200. package/dist/components/modals/ThemeModal.cjs.map +1 -0
  201. package/dist/components/modals/ThemeModal.d.cts +21 -0
  202. package/dist/components/modals/ThemeModal.d.ts +21 -0
  203. package/dist/components/modals/ThemeModal.js +657 -0
  204. package/dist/components/modals/ThemeModal.js.map +1 -0
  205. package/dist/components/properties/CheckboxProperty.cjs +362 -0
  206. package/dist/components/properties/CheckboxProperty.cjs.map +1 -0
  207. package/dist/components/properties/{CheckboxProperty.d.mts → CheckboxProperty.d.cts} +3 -3
  208. package/dist/components/properties/CheckboxProperty.d.ts +2 -2
  209. package/dist/components/properties/CheckboxProperty.js +94 -93
  210. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  211. package/dist/components/properties/DateProperty.cjs +451 -0
  212. package/dist/components/properties/DateProperty.cjs.map +1 -0
  213. package/dist/components/properties/{DateProperty.d.mts → DateProperty.d.cts} +3 -3
  214. package/dist/components/properties/DateProperty.d.ts +2 -2
  215. package/dist/components/properties/DateProperty.js +110 -116
  216. package/dist/components/properties/DateProperty.js.map +1 -1
  217. package/dist/components/properties/{MultiSelectProperty.mjs → MultiSelectProperty.cjs} +216 -155
  218. package/dist/components/properties/MultiSelectProperty.cjs.map +1 -0
  219. package/dist/components/properties/{MultiSelectProperty.d.mts → MultiSelectProperty.d.cts} +5 -5
  220. package/dist/components/properties/MultiSelectProperty.d.ts +4 -4
  221. package/dist/components/properties/MultiSelectProperty.js +180 -184
  222. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  223. package/dist/components/properties/NumberProperty.cjs +459 -0
  224. package/dist/components/properties/NumberProperty.cjs.map +1 -0
  225. package/dist/components/properties/{NumberProperty.d.mts → NumberProperty.d.cts} +3 -3
  226. package/dist/components/properties/NumberProperty.d.ts +2 -2
  227. package/dist/components/properties/NumberProperty.js +109 -116
  228. package/dist/components/properties/NumberProperty.js.map +1 -1
  229. package/dist/components/properties/PropertyBase.cjs +223 -0
  230. package/dist/components/properties/PropertyBase.cjs.map +1 -0
  231. package/dist/components/properties/{PropertyBase.d.mts → PropertyBase.d.cts} +2 -2
  232. package/dist/components/properties/PropertyBase.d.ts +2 -2
  233. package/dist/components/properties/PropertyBase.js +60 -69
  234. package/dist/components/properties/PropertyBase.js.map +1 -1
  235. package/dist/components/properties/{SelectProperty.mjs → SelectProperty.cjs} +251 -199
  236. package/dist/components/properties/SelectProperty.cjs.map +1 -0
  237. package/dist/components/properties/{SelectProperty.d.mts → SelectProperty.d.cts} +5 -6
  238. package/dist/components/properties/SelectProperty.d.ts +4 -5
  239. package/dist/components/properties/SelectProperty.js +215 -228
  240. package/dist/components/properties/SelectProperty.js.map +1 -1
  241. package/dist/components/properties/TextProperty.cjs +428 -0
  242. package/dist/components/properties/TextProperty.cjs.map +1 -0
  243. package/dist/components/properties/{TextProperty.d.mts → TextProperty.d.cts} +3 -3
  244. package/dist/components/properties/TextProperty.d.ts +2 -2
  245. package/dist/components/properties/TextProperty.js +134 -121
  246. package/dist/components/properties/TextProperty.js.map +1 -1
  247. package/dist/components/{Button.js → user-action/Button.cjs} +70 -12
  248. package/dist/components/user-action/Button.cjs.map +1 -0
  249. package/dist/components/{Button.d.mts → user-action/Button.d.cts} +32 -5
  250. package/dist/components/{Button.d.ts → user-action/Button.d.ts} +32 -5
  251. package/dist/components/{Button.mjs → user-action/Button.js} +66 -10
  252. package/dist/components/user-action/Button.js.map +1 -0
  253. package/dist/components/{user-input/Checkbox.js → user-action/Checkbox.cjs} +26 -16
  254. package/dist/components/user-action/Checkbox.cjs.map +1 -0
  255. package/dist/components/{user-input/Checkbox.d.mts → user-action/Checkbox.d.cts} +5 -5
  256. package/dist/components/{user-input → user-action}/Checkbox.d.ts +4 -4
  257. package/dist/components/{user-input/Checkbox.mjs → user-action/Checkbox.js} +24 -14
  258. package/dist/components/user-action/Checkbox.js.map +1 -0
  259. package/dist/components/{user-input/DateAndTimePicker.js → user-action/DateAndTimePicker.cjs} +51 -23
  260. package/dist/components/user-action/DateAndTimePicker.cjs.map +1 -0
  261. package/dist/components/{user-input/DateAndTimePicker.d.mts → user-action/DateAndTimePicker.d.cts} +7 -8
  262. package/dist/components/{user-input → user-action}/DateAndTimePicker.d.ts +2 -3
  263. package/dist/components/{user-input/DateAndTimePicker.mjs → user-action/DateAndTimePicker.js} +44 -16
  264. package/dist/components/user-action/DateAndTimePicker.js.map +1 -0
  265. package/dist/components/{user-input/Input.js → user-action/Input.cjs} +35 -34
  266. package/dist/components/user-action/Input.cjs.map +1 -0
  267. package/dist/components/{user-input/Input.d.mts → user-action/Input.d.cts} +9 -16
  268. package/dist/components/{user-input → user-action}/Input.d.ts +8 -15
  269. package/dist/components/{user-input/Input.mjs → user-action/Input.js} +35 -39
  270. package/dist/components/user-action/Input.js.map +1 -0
  271. package/dist/components/{user-input/Label.js → user-action/Label.cjs} +15 -3
  272. package/dist/components/user-action/Label.cjs.map +1 -0
  273. package/dist/components/{user-input/Label.d.mts → user-action/Label.d.cts} +1 -1
  274. package/dist/components/{user-input → user-action}/Label.d.ts +1 -1
  275. package/dist/components/{user-input/Label.mjs → user-action/Label.js} +5 -3
  276. package/dist/components/user-action/Label.js.map +1 -0
  277. package/dist/components/{user-input/Menu.js → user-action/Menu.cjs} +4 -4
  278. package/dist/components/user-action/Menu.cjs.map +1 -0
  279. package/dist/components/{user-input/Menu.mjs → user-action/Menu.js} +3 -3
  280. package/dist/components/user-action/Menu.js.map +1 -0
  281. package/dist/components/{user-input/MultiSelect.js → user-action/MultiSelect.cjs} +76 -51
  282. package/dist/components/user-action/MultiSelect.cjs.map +1 -0
  283. package/dist/components/{user-input/MultiSelect.d.mts → user-action/MultiSelect.d.cts} +3 -3
  284. package/dist/components/{user-input → user-action}/MultiSelect.d.ts +2 -2
  285. package/dist/components/{user-input/MultiSelect.mjs → user-action/MultiSelect.js} +75 -55
  286. package/dist/components/user-action/MultiSelect.js.map +1 -0
  287. package/dist/components/{user-input/ScrollPicker.js → user-action/ScrollPicker.cjs} +4 -4
  288. package/dist/components/user-action/ScrollPicker.cjs.map +1 -0
  289. package/dist/components/{user-input/ScrollPicker.mjs → user-action/ScrollPicker.js} +3 -3
  290. package/dist/components/user-action/ScrollPicker.js.map +1 -0
  291. package/dist/components/{user-input/SearchableSelect.js → user-action/Select.cjs} +181 -152
  292. package/dist/components/user-action/Select.cjs.map +1 -0
  293. package/dist/components/user-action/Select.d.cts +49 -0
  294. package/dist/components/user-action/Select.d.ts +49 -0
  295. package/dist/components/{user-input/SearchableSelect.mjs → user-action/Select.js} +167 -145
  296. package/dist/components/user-action/Select.js.map +1 -0
  297. package/dist/components/{user-input/Textarea.js → user-action/Textarea.cjs} +80 -35
  298. package/dist/components/user-action/Textarea.cjs.map +1 -0
  299. package/dist/components/user-action/Textarea.d.cts +28 -0
  300. package/dist/components/{user-input → user-action}/Textarea.d.ts +9 -5
  301. package/dist/components/user-action/Textarea.js +163 -0
  302. package/dist/components/user-action/Textarea.js.map +1 -0
  303. package/dist/components/{user-input/ToggleableInput.js → user-action/ToggleableInput.cjs} +9 -15
  304. package/dist/components/user-action/ToggleableInput.cjs.map +1 -0
  305. package/dist/components/{user-input/ToggleableInput.mjs → user-action/ToggleableInput.js} +8 -14
  306. package/dist/components/user-action/ToggleableInput.js.map +1 -0
  307. package/dist/components/{Tooltip.js → user-action/Tooltip.cjs} +13 -9
  308. package/dist/components/user-action/Tooltip.cjs.map +1 -0
  309. package/dist/components/{Tooltip.d.mts → user-action/Tooltip.d.cts} +1 -1
  310. package/dist/components/{Tooltip.d.ts → user-action/Tooltip.d.ts} +1 -1
  311. package/dist/components/{Tooltip.mjs → user-action/Tooltip.js} +12 -8
  312. package/dist/components/user-action/Tooltip.js.map +1 -0
  313. package/dist/css/globals.css +185 -129
  314. package/dist/css/uncompiled/globals.css +71 -32
  315. package/dist/hooks/useHoverState.cjs +72 -0
  316. package/dist/hooks/{useHoverState.mjs.map → useHoverState.cjs.map} +1 -1
  317. package/dist/hooks/useHoverState.js +7 -32
  318. package/dist/hooks/useHoverState.js.map +1 -1
  319. package/dist/hooks/useLocalStorage.cjs +83 -0
  320. package/dist/hooks/useLocalStorage.cjs.map +1 -0
  321. package/dist/hooks/useLocalStorage.js +9 -34
  322. package/dist/hooks/useLocalStorage.js.map +1 -1
  323. package/dist/hooks/useOutsideClick.cjs +48 -0
  324. package/dist/hooks/{useOutsideClick.mjs.map → useOutsideClick.cjs.map} +1 -1
  325. package/dist/hooks/useOutsideClick.js +4 -29
  326. package/dist/hooks/useOutsideClick.js.map +1 -1
  327. package/dist/hooks/useSaveDelay.cjs +68 -0
  328. package/dist/hooks/{useSaveDelay.mjs.map → useSaveDelay.cjs.map} +1 -1
  329. package/dist/hooks/useSaveDelay.js +6 -31
  330. package/dist/hooks/useSaveDelay.js.map +1 -1
  331. package/dist/{index.mjs → index.cjs} +4042 -3867
  332. package/dist/index.cjs.map +1 -0
  333. package/dist/index.d.cts +83 -0
  334. package/dist/index.d.ts +51 -56
  335. package/dist/index.js +3858 -4041
  336. package/dist/index.js.map +1 -1
  337. package/dist/{hooks/useLanguage.js → localization/LanguageProvider.cjs} +30 -26
  338. package/dist/localization/LanguageProvider.cjs.map +1 -0
  339. package/dist/localization/LanguageProvider.d.cts +18 -0
  340. package/dist/localization/LanguageProvider.d.ts +18 -0
  341. package/dist/{hooks/useLanguage.mjs → localization/LanguageProvider.js} +26 -19
  342. package/dist/localization/LanguageProvider.js.map +1 -0
  343. package/dist/{hooks/useTranslation.js → localization/useTranslation.cjs} +23 -8
  344. package/dist/localization/useTranslation.cjs.map +1 -0
  345. package/dist/{hooks/useTranslation.d.mts → localization/useTranslation.d.cts} +5 -7
  346. package/dist/{hooks → localization}/useTranslation.d.ts +5 -7
  347. package/dist/{hooks/useTranslation.mjs → localization/useTranslation.js} +22 -7
  348. package/dist/localization/useTranslation.js.map +1 -0
  349. package/dist/localization/util.cjs +41 -0
  350. package/dist/localization/util.cjs.map +1 -0
  351. package/dist/localization/util.d.cts +18 -0
  352. package/dist/localization/util.d.ts +18 -0
  353. package/dist/localization/util.js +16 -0
  354. package/dist/localization/util.js.map +1 -0
  355. package/dist/{hooks/useTheme.js → theming/useTheme.cjs} +19 -11
  356. package/dist/theming/useTheme.cjs.map +1 -0
  357. package/dist/{hooks/useTheme.d.mts → theming/useTheme.d.cts} +9 -5
  358. package/dist/{hooks → theming}/useTheme.d.ts +9 -5
  359. package/dist/{hooks/useTheme.mjs → theming/useTheme.js} +15 -7
  360. package/dist/theming/useTheme.js.map +1 -0
  361. package/dist/util/{array.mjs → array.cjs} +34 -3
  362. package/dist/util/array.cjs.map +1 -0
  363. package/dist/util/array.js +2 -33
  364. package/dist/util/array.js.map +1 -1
  365. package/dist/util/builder.cjs +34 -0
  366. package/dist/util/{builder.mjs.map → builder.cjs.map} +1 -1
  367. package/dist/util/builder.js +2 -27
  368. package/dist/util/builder.js.map +1 -1
  369. package/dist/util/{date.mjs → date.cjs} +41 -3
  370. package/dist/util/date.cjs.map +1 -0
  371. package/dist/util/date.js +2 -40
  372. package/dist/util/date.js.map +1 -1
  373. package/dist/util/easeFunctions.cjs +63 -0
  374. package/dist/util/easeFunctions.cjs.map +1 -0
  375. package/dist/util/easeFunctions.js +2 -29
  376. package/dist/util/easeFunctions.js.map +1 -1
  377. package/dist/util/emailValidation.cjs +33 -0
  378. package/dist/util/{emailValidation.mjs.map → emailValidation.cjs.map} +1 -1
  379. package/dist/util/emailValidation.js +2 -27
  380. package/dist/util/emailValidation.js.map +1 -1
  381. package/dist/util/{loopingArray.mjs → loopingArray.cjs} +28 -3
  382. package/dist/util/{loopingArray.mjs.map → loopingArray.cjs.map} +1 -1
  383. package/dist/util/loopingArray.js +2 -27
  384. package/dist/util/loopingArray.js.map +1 -1
  385. package/dist/util/math.cjs +33 -0
  386. package/dist/util/{math.mjs.map → math.cjs.map} +1 -1
  387. package/dist/util/math.js +2 -27
  388. package/dist/util/math.js.map +1 -1
  389. package/dist/util/news.cjs +77 -0
  390. package/dist/util/news.cjs.map +1 -0
  391. package/dist/util/{news.d.mts → news.d.cts} +11 -13
  392. package/dist/util/news.d.ts +11 -13
  393. package/dist/util/news.js +22 -49
  394. package/dist/util/news.js.map +1 -1
  395. package/dist/util/noop.cjs +31 -0
  396. package/dist/util/noop.cjs.map +1 -0
  397. package/dist/util/noop.js +2 -27
  398. package/dist/util/noop.js.map +1 -1
  399. package/dist/util/simpleSearch.cjs +54 -0
  400. package/dist/util/simpleSearch.cjs.map +1 -0
  401. package/dist/util/simpleSearch.js +2 -30
  402. package/dist/util/simpleSearch.js.map +1 -1
  403. package/dist/util/storage.cjs +64 -0
  404. package/dist/util/storage.cjs.map +1 -0
  405. package/dist/util/storage.js +2 -28
  406. package/dist/util/storage.js.map +1 -1
  407. package/dist/util/types.cjs +19 -0
  408. package/dist/util/types.cjs.map +1 -0
  409. package/dist/util/types.js +0 -18
  410. package/dist/util/types.js.map +1 -1
  411. package/package.json +9 -12
  412. package/dist/coloring/shading.mjs +0 -47
  413. package/dist/coloring/shading.mjs.map +0 -1
  414. package/dist/coloring/types.mjs +0 -6
  415. package/dist/components/Avatar.d.mts +0 -17
  416. package/dist/components/Avatar.d.ts +0 -17
  417. package/dist/components/Avatar.js +0 -85
  418. package/dist/components/Avatar.js.map +0 -1
  419. package/dist/components/Avatar.mjs +0 -48
  420. package/dist/components/Avatar.mjs.map +0 -1
  421. package/dist/components/AvatarGroup.d.mts +0 -14
  422. package/dist/components/AvatarGroup.d.ts +0 -14
  423. package/dist/components/AvatarGroup.js.map +0 -1
  424. package/dist/components/AvatarGroup.mjs.map +0 -1
  425. package/dist/components/BreadCrumb.js.map +0 -1
  426. package/dist/components/BreadCrumb.mjs.map +0 -1
  427. package/dist/components/Button.js.map +0 -1
  428. package/dist/components/Button.mjs.map +0 -1
  429. package/dist/components/ChipList.js.map +0 -1
  430. package/dist/components/ChipList.mjs.map +0 -1
  431. package/dist/components/Circle.js.map +0 -1
  432. package/dist/components/Circle.mjs.map +0 -1
  433. package/dist/components/ErrorComponent.js.map +0 -1
  434. package/dist/components/ErrorComponent.mjs.map +0 -1
  435. package/dist/components/Expandable.js.map +0 -1
  436. package/dist/components/Expandable.mjs.map +0 -1
  437. package/dist/components/HelpwaveBadge.js.map +0 -1
  438. package/dist/components/HelpwaveBadge.mjs +0 -91
  439. package/dist/components/HelpwaveBadge.mjs.map +0 -1
  440. package/dist/components/HideableContentSection.d.mts +0 -14
  441. package/dist/components/HideableContentSection.d.ts +0 -14
  442. package/dist/components/HideableContentSection.js +0 -70
  443. package/dist/components/HideableContentSection.js.map +0 -1
  444. package/dist/components/HideableContentSection.mjs +0 -35
  445. package/dist/components/HideableContentSection.mjs.map +0 -1
  446. package/dist/components/InputGroup.d.mts +0 -17
  447. package/dist/components/InputGroup.d.ts +0 -17
  448. package/dist/components/InputGroup.js +0 -97
  449. package/dist/components/InputGroup.js.map +0 -1
  450. package/dist/components/InputGroup.mjs +0 -62
  451. package/dist/components/InputGroup.mjs.map +0 -1
  452. package/dist/components/LoadingAndErrorComponent.js.map +0 -1
  453. package/dist/components/LoadingAndErrorComponent.mjs.map +0 -1
  454. package/dist/components/LoadingAnimation.js.map +0 -1
  455. package/dist/components/LoadingAnimation.mjs.map +0 -1
  456. package/dist/components/LoadingButton.js.map +0 -1
  457. package/dist/components/LoadingButton.mjs.map +0 -1
  458. package/dist/components/MarkdownInterpreter.js.map +0 -1
  459. package/dist/components/MarkdownInterpreter.mjs.map +0 -1
  460. package/dist/components/Pagination.js.map +0 -1
  461. package/dist/components/Pagination.mjs.map +0 -1
  462. package/dist/components/Profile.d.mts +0 -31
  463. package/dist/components/Profile.d.ts +0 -31
  464. package/dist/components/Profile.js +0 -197
  465. package/dist/components/Profile.js.map +0 -1
  466. package/dist/components/Profile.mjs +0 -162
  467. package/dist/components/Profile.mjs.map +0 -1
  468. package/dist/components/ProgressIndicator.js.map +0 -1
  469. package/dist/components/ProgressIndicator.mjs.map +0 -1
  470. package/dist/components/Ring.js.map +0 -1
  471. package/dist/components/Ring.mjs.map +0 -1
  472. package/dist/components/SearchableList.js.map +0 -1
  473. package/dist/components/SearchableList.mjs.map +0 -1
  474. package/dist/components/SortButton.d.mts +0 -15
  475. package/dist/components/SortButton.d.ts +0 -15
  476. package/dist/components/SortButton.js +0 -132
  477. package/dist/components/SortButton.js.map +0 -1
  478. package/dist/components/SortButton.mjs +0 -97
  479. package/dist/components/SortButton.mjs.map +0 -1
  480. package/dist/components/StepperBar.js.map +0 -1
  481. package/dist/components/StepperBar.mjs.map +0 -1
  482. package/dist/components/Table.js.map +0 -1
  483. package/dist/components/Table.mjs.map +0 -1
  484. package/dist/components/TechRadar.d.mts +0 -39
  485. package/dist/components/TechRadar.d.ts +0 -39
  486. package/dist/components/TechRadar.js +0 -243
  487. package/dist/components/TechRadar.js.map +0 -1
  488. package/dist/components/TechRadar.mjs +0 -208
  489. package/dist/components/TechRadar.mjs.map +0 -1
  490. package/dist/components/TextImage.js.map +0 -1
  491. package/dist/components/TextImage.mjs.map +0 -1
  492. package/dist/components/TimeDisplay.js.map +0 -1
  493. package/dist/components/TimeDisplay.mjs.map +0 -1
  494. package/dist/components/Tooltip.js.map +0 -1
  495. package/dist/components/Tooltip.mjs.map +0 -1
  496. package/dist/components/VerticalDivider.js.map +0 -1
  497. package/dist/components/VerticalDivider.mjs.map +0 -1
  498. package/dist/components/date/DatePicker.mjs.map +0 -1
  499. package/dist/components/date/DayPicker.mjs.map +0 -1
  500. package/dist/components/date/TimePicker.mjs.map +0 -1
  501. package/dist/components/date/YearMonthPicker.mjs.map +0 -1
  502. package/dist/components/icons/Helpwave.js.map +0 -1
  503. package/dist/components/icons/Helpwave.mjs +0 -43
  504. package/dist/components/icons/Helpwave.mjs.map +0 -1
  505. package/dist/components/icons/Tag.js.map +0 -1
  506. package/dist/components/icons/Tag.mjs.map +0 -1
  507. package/dist/components/layout/Carousel.js.map +0 -1
  508. package/dist/components/layout/Carousel.mjs.map +0 -1
  509. package/dist/components/layout/DividerInserter.js.map +0 -1
  510. package/dist/components/layout/DividerInserter.mjs.map +0 -1
  511. package/dist/components/layout/FAQSection.js.map +0 -1
  512. package/dist/components/layout/FAQSection.mjs.map +0 -1
  513. package/dist/components/layout/Tile.js.map +0 -1
  514. package/dist/components/layout/Tile.mjs.map +0 -1
  515. package/dist/components/modals/ConfirmDialog.d.mts +0 -38
  516. package/dist/components/modals/ConfirmDialog.d.ts +0 -38
  517. package/dist/components/modals/ConfirmDialog.js.map +0 -1
  518. package/dist/components/modals/ConfirmDialog.mjs.map +0 -1
  519. package/dist/components/modals/DiscardChangesDialog.d.mts +0 -23
  520. package/dist/components/modals/DiscardChangesDialog.d.ts +0 -23
  521. package/dist/components/modals/DiscardChangesDialog.js +0 -409
  522. package/dist/components/modals/DiscardChangesDialog.js.map +0 -1
  523. package/dist/components/modals/DiscardChangesDialog.mjs +0 -372
  524. package/dist/components/modals/DiscardChangesDialog.mjs.map +0 -1
  525. package/dist/components/modals/InputModal.mjs +0 -568
  526. package/dist/components/modals/InputModal.mjs.map +0 -1
  527. package/dist/components/modals/LanguageModal.d.mts +0 -21
  528. package/dist/components/modals/LanguageModal.mjs +0 -491
  529. package/dist/components/modals/LanguageModal.mjs.map +0 -1
  530. package/dist/components/modals/Modal.d.mts +0 -43
  531. package/dist/components/modals/Modal.d.ts +0 -43
  532. package/dist/components/modals/Modal.js +0 -288
  533. package/dist/components/modals/Modal.js.map +0 -1
  534. package/dist/components/modals/Modal.mjs +0 -251
  535. package/dist/components/modals/Modal.mjs.map +0 -1
  536. package/dist/components/modals/ModalRegister.d.mts +0 -16
  537. package/dist/components/modals/ModalRegister.d.ts +0 -16
  538. package/dist/components/modals/ModalRegister.js +0 -63
  539. package/dist/components/modals/ModalRegister.js.map +0 -1
  540. package/dist/components/modals/ModalRegister.mjs +0 -37
  541. package/dist/components/modals/ModalRegister.mjs.map +0 -1
  542. package/dist/components/properties/CheckboxProperty.mjs +0 -291
  543. package/dist/components/properties/CheckboxProperty.mjs.map +0 -1
  544. package/dist/components/properties/DateProperty.mjs +0 -392
  545. package/dist/components/properties/DateProperty.mjs.map +0 -1
  546. package/dist/components/properties/MultiSelectProperty.mjs.map +0 -1
  547. package/dist/components/properties/NumberProperty.mjs +0 -401
  548. package/dist/components/properties/NumberProperty.mjs.map +0 -1
  549. package/dist/components/properties/PropertyBase.mjs +0 -162
  550. package/dist/components/properties/PropertyBase.mjs.map +0 -1
  551. package/dist/components/properties/SelectProperty.mjs.map +0 -1
  552. package/dist/components/properties/TextProperty.mjs +0 -345
  553. package/dist/components/properties/TextProperty.mjs.map +0 -1
  554. package/dist/components/user-input/Checkbox.js.map +0 -1
  555. package/dist/components/user-input/Checkbox.mjs.map +0 -1
  556. package/dist/components/user-input/DateAndTimePicker.js.map +0 -1
  557. package/dist/components/user-input/DateAndTimePicker.mjs.map +0 -1
  558. package/dist/components/user-input/Input.js.map +0 -1
  559. package/dist/components/user-input/Input.mjs.map +0 -1
  560. package/dist/components/user-input/Label.js.map +0 -1
  561. package/dist/components/user-input/Label.mjs.map +0 -1
  562. package/dist/components/user-input/Menu.js.map +0 -1
  563. package/dist/components/user-input/Menu.mjs.map +0 -1
  564. package/dist/components/user-input/MultiSelect.js.map +0 -1
  565. package/dist/components/user-input/MultiSelect.mjs.map +0 -1
  566. package/dist/components/user-input/ScrollPicker.js.map +0 -1
  567. package/dist/components/user-input/ScrollPicker.mjs.map +0 -1
  568. package/dist/components/user-input/SearchableSelect.d.mts +0 -14
  569. package/dist/components/user-input/SearchableSelect.d.ts +0 -14
  570. package/dist/components/user-input/SearchableSelect.js.map +0 -1
  571. package/dist/components/user-input/SearchableSelect.mjs.map +0 -1
  572. package/dist/components/user-input/Select.d.mts +0 -36
  573. package/dist/components/user-input/Select.d.ts +0 -36
  574. package/dist/components/user-input/Select.js +0 -153
  575. package/dist/components/user-input/Select.js.map +0 -1
  576. package/dist/components/user-input/Select.mjs +0 -118
  577. package/dist/components/user-input/Select.mjs.map +0 -1
  578. package/dist/components/user-input/Textarea.d.mts +0 -24
  579. package/dist/components/user-input/Textarea.js.map +0 -1
  580. package/dist/components/user-input/Textarea.mjs +0 -119
  581. package/dist/components/user-input/Textarea.mjs.map +0 -1
  582. package/dist/components/user-input/ToggleableInput.js.map +0 -1
  583. package/dist/components/user-input/ToggleableInput.mjs.map +0 -1
  584. package/dist/hooks/useHoverState.mjs +0 -47
  585. package/dist/hooks/useLanguage.d.mts +0 -21
  586. package/dist/hooks/useLanguage.d.ts +0 -21
  587. package/dist/hooks/useLanguage.js.map +0 -1
  588. package/dist/hooks/useLanguage.mjs.map +0 -1
  589. package/dist/hooks/useLocalStorage.mjs +0 -58
  590. package/dist/hooks/useLocalStorage.mjs.map +0 -1
  591. package/dist/hooks/useOutsideClick.mjs +0 -23
  592. package/dist/hooks/useSaveDelay.mjs +0 -43
  593. package/dist/hooks/useTheme.js.map +0 -1
  594. package/dist/hooks/useTheme.mjs.map +0 -1
  595. package/dist/hooks/useTranslation.js.map +0 -1
  596. package/dist/hooks/useTranslation.mjs.map +0 -1
  597. package/dist/index.d.mts +0 -88
  598. package/dist/index.mjs.map +0 -1
  599. package/dist/util/array.mjs.map +0 -1
  600. package/dist/util/builder.mjs +0 -9
  601. package/dist/util/date.mjs.map +0 -1
  602. package/dist/util/easeFunctions.mjs +0 -36
  603. package/dist/util/easeFunctions.mjs.map +0 -1
  604. package/dist/util/emailValidation.mjs +0 -8
  605. package/dist/util/math.mjs +0 -8
  606. package/dist/util/news.mjs +0 -48
  607. package/dist/util/news.mjs.map +0 -1
  608. package/dist/util/noop.mjs +0 -6
  609. package/dist/util/noop.mjs.map +0 -1
  610. package/dist/util/simpleSearch.mjs +0 -26
  611. package/dist/util/simpleSearch.mjs.map +0 -1
  612. package/dist/util/storage.mjs +0 -38
  613. package/dist/util/storage.mjs.map +0 -1
  614. package/dist/util/types.mjs +0 -1
  615. package/dist/util/types.mjs.map +0 -1
  616. /package/dist/coloring/{types.d.mts → types.d.cts} +0 -0
  617. /package/dist/components/{HelpwaveBadge.d.mts → branding/HelpwaveBadge.d.cts} +0 -0
  618. /package/dist/components/{HelpwaveBadge.d.ts → branding/HelpwaveBadge.d.ts} +0 -0
  619. /package/dist/components/{Circle.d.mts → icons-and-geometry/Circle.d.cts} +0 -0
  620. /package/dist/components/{Circle.d.ts → icons-and-geometry/Circle.d.ts} +0 -0
  621. /package/dist/components/{icons/Helpwave.d.mts → icons-and-geometry/Helpwave.d.cts} +0 -0
  622. /package/dist/components/{icons → icons-and-geometry}/Helpwave.d.ts +0 -0
  623. /package/dist/components/{Ring.d.mts → icons-and-geometry/Ring.d.cts} +0 -0
  624. /package/dist/components/{Ring.d.ts → icons-and-geometry/Ring.d.ts} +0 -0
  625. /package/dist/components/{icons/Tag.d.mts → icons-and-geometry/Tag.d.cts} +0 -0
  626. /package/dist/components/{icons → icons-and-geometry}/Tag.d.ts +0 -0
  627. /package/dist/components/{BreadCrumb.d.mts → layout-and-navigation/BreadCrumb.d.cts} +0 -0
  628. /package/dist/components/{BreadCrumb.d.ts → layout-and-navigation/BreadCrumb.d.ts} +0 -0
  629. /package/dist/components/{layout/Carousel.d.mts → layout-and-navigation/Carousel.d.cts} +0 -0
  630. /package/dist/components/{layout → layout-and-navigation}/Carousel.d.ts +0 -0
  631. /package/dist/components/{ChipList.d.mts → layout-and-navigation/Chip.d.cts} +0 -0
  632. /package/dist/components/{ChipList.d.ts → layout-and-navigation/Chip.d.ts} +0 -0
  633. /package/dist/components/{layout/DividerInserter.d.mts → layout-and-navigation/DividerInserter.d.cts} +0 -0
  634. /package/dist/components/{layout → layout-and-navigation}/DividerInserter.d.ts +0 -0
  635. /package/dist/components/{Expandable.d.mts → layout-and-navigation/Expandable.d.cts} +0 -0
  636. /package/dist/components/{Expandable.d.ts → layout-and-navigation/Expandable.d.ts} +0 -0
  637. /package/dist/components/{MarkdownInterpreter.d.mts → layout-and-navigation/MarkdownInterpreter.d.cts} +0 -0
  638. /package/dist/components/{MarkdownInterpreter.d.ts → layout-and-navigation/MarkdownInterpreter.d.ts} +0 -0
  639. /package/dist/components/{layout/Tile.d.mts → layout-and-navigation/Tile.d.cts} +0 -0
  640. /package/dist/components/{layout → layout-and-navigation}/Tile.d.ts +0 -0
  641. /package/dist/components/{VerticalDivider.d.mts → layout-and-navigation/VerticalDivider.d.cts} +0 -0
  642. /package/dist/components/{VerticalDivider.d.ts → layout-and-navigation/VerticalDivider.d.ts} +0 -0
  643. /package/dist/components/{ProgressIndicator.d.mts → loading-states/ProgressIndicator.d.cts} +0 -0
  644. /package/dist/components/{ProgressIndicator.d.ts → loading-states/ProgressIndicator.d.ts} +0 -0
  645. /package/dist/components/{user-input/Menu.d.mts → user-action/Menu.d.cts} +0 -0
  646. /package/dist/components/{user-input → user-action}/Menu.d.ts +0 -0
  647. /package/dist/components/{user-input/ScrollPicker.d.mts → user-action/ScrollPicker.d.cts} +0 -0
  648. /package/dist/components/{user-input → user-action}/ScrollPicker.d.ts +0 -0
  649. /package/dist/components/{user-input/ToggleableInput.d.mts → user-action/ToggleableInput.d.cts} +0 -0
  650. /package/dist/components/{user-input → user-action}/ToggleableInput.d.ts +0 -0
  651. /package/dist/hooks/{useHoverState.d.mts → useHoverState.d.cts} +0 -0
  652. /package/dist/hooks/{useLocalStorage.d.mts → useLocalStorage.d.cts} +0 -0
  653. /package/dist/hooks/{useOutsideClick.d.mts → useOutsideClick.d.cts} +0 -0
  654. /package/dist/hooks/{useSaveDelay.d.mts → useSaveDelay.d.cts} +0 -0
  655. /package/dist/util/{array.d.mts → array.d.cts} +0 -0
  656. /package/dist/util/{builder.d.mts → builder.d.cts} +0 -0
  657. /package/dist/util/{date.d.mts → date.d.cts} +0 -0
  658. /package/dist/util/{easeFunctions.d.mts → easeFunctions.d.cts} +0 -0
  659. /package/dist/util/{emailValidation.d.mts → emailValidation.d.cts} +0 -0
  660. /package/dist/util/{loopingArray.d.mts → loopingArray.d.cts} +0 -0
  661. /package/dist/util/{math.d.mts → math.d.cts} +0 -0
  662. /package/dist/util/{noop.d.mts → noop.d.cts} +0 -0
  663. /package/dist/util/{simpleSearch.d.mts → simpleSearch.d.cts} +0 -0
  664. /package/dist/util/{storage.d.mts → storage.d.cts} +0 -0
  665. /package/dist/util/{types.d.mts → types.d.cts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/layout/FAQSection.tsx","../../../src/components/Expandable.tsx","../../../src/components/MarkdownInterpreter.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport type { ExpandableProps } from '../Expandable'\nimport { Expandable } from '../Expandable'\nimport { MarkdownInterpreter } from '../MarkdownInterpreter'\n\ntype ContentType = {\n type: 'markdown',\n value: string,\n} | {\n type: 'custom',\n value: ReactNode,\n}\n\nexport type FAQItem = Pick<ExpandableProps, 'initialExpansion'| 'className'> & {\n id: string,\n title: string,\n content: ContentType,\n}\n\nexport type FAQSectionProps = {\n entries: FAQItem[],\n expandableClassName?: string,\n}\n\n/**\n * Description\n */\nexport const FAQSection = ({\n entries,\n expandableClassName\n}: FAQSectionProps) => {\n const chevronSize = 28\n return (\n <div className=\"col gap-y-4\">\n {entries.map(({ id, title, content, ...restProps }) => (\n <Expandable\n key={id}\n {...restProps}\n label={(<h3 id={id} className=\"textstyle-title-md\">{title}</h3>)}\n clickOnlyOnHeader={false}\n icon={(expanded) => expanded ?\n (<ChevronUp size={chevronSize} className=\"text-primary\" style={{ minWidth: `${chevronSize}px` }}/>) :\n (<ChevronDown size={chevronSize} className=\"text-primary\"/>)\n }\n className={clsx('rounded-xl', expandableClassName)}\n headerClassName=\"px-6 py-4\"\n >\n <div className=\"mt-2 px-6 pb-4\">\n {content.type === 'markdown' ? (<MarkdownInterpreter text={content.value}/>) : content.value}\n </div>\n </Expandable>\n ))}\n </div>\n )\n}\n","import type { PropsWithChildren, ReactNode } from 'react'\nimport { forwardRef, useState } from 'react'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport clsx from 'clsx'\n\ntype IconBuilder = (expanded: boolean) => ReactNode\n\nexport type ExpandableProps = PropsWithChildren<{\n label: ReactNode,\n icon?: IconBuilder,\n initialExpansion?: boolean,\n /**\n * Whether the expansion should only happen when the header is clicked or on the entire component\n */\n clickOnlyOnHeader?: boolean,\n className?: string,\n headerClassName?: string,\n}>\n\nconst DefaultIcon: IconBuilder = (expanded) => expanded ?\n (<ChevronUp size={16} className=\"min-w-[16px]\"/>)\n : (<ChevronDown size={16} className=\"min-w-[16px]\"/>)\n\n/**\n * A Component for showing and hiding content\n */\nexport const Expandable = forwardRef<HTMLDivElement, ExpandableProps>(({\n children,\n label,\n icon,\n initialExpansion = false,\n clickOnlyOnHeader = true,\n className = '',\n headerClassName = ''\n }, ref) => {\n const [isExpanded, setIsExpanded] = useState(initialExpansion)\n icon ??= DefaultIcon\n\n return (\n <div\n ref={ref}\n className={clsx('col bg-surface text-on-surface group rounded-lg shadow-sm', { 'cursor-pointer': !clickOnlyOnHeader }, className)}\n onClick={() => !clickOnlyOnHeader && setIsExpanded(!isExpanded)}\n >\n <button\n className={clsx('btn-md rounded-lg justify-between items-center bg-surface text-on-surface', { 'group-hover:brightness-95': !isExpanded }, headerClassName)}\n onClick={() => clickOnlyOnHeader && setIsExpanded(!isExpanded)}\n >\n {label}\n {icon(isExpanded)}\n </button>\n {isExpanded && (\n <div className=\"col\">\n {children}\n </div>\n )}\n </div>\n )\n})\n\nExpandable.displayName = 'Expandable'\n","type ASTNodeModifierType =\n 'none'\n | 'italic'\n | 'bold'\n | 'underline'\n | 'font-space'\n | 'primary'\n | 'secondary'\n | 'warn'\n | 'positive'\n | 'negative'\n\nconst astNodeInserterType = ['helpwave', 'newline'] as const\ntype ASTNodeInserterType = typeof astNodeInserterType[number]\ntype ASTNodeDefaultType = 'text'\n\ntype ASTNode = {\n type: ASTNodeModifierType,\n children: ASTNode[],\n} | {\n type: ASTNodeInserterType,\n} | {\n type: ASTNodeDefaultType,\n text: string,\n}\n\nexport type ASTNodeInterpreterProps = {\n node: ASTNode,\n isRoot?: boolean,\n className?: string,\n}\nexport const ASTNodeInterpreter = ({\n node,\n isRoot = false,\n className = '',\n }: ASTNodeInterpreterProps) => {\n switch (node.type) {\n case 'newline':\n return <br/>\n case 'text':\n return isRoot ? <span className={className}>{node.text}</span> : node.text\n case 'helpwave':\n return (<span className=\"font-bold font-space no-underline\">helpwave</span>)\n case 'none':\n return isRoot ? (\n<span className={className}>{node.children.map((value, index) => (\n<ASTNodeInterpreter key={index}\n node={value}/>\n))}</span>\n) :\n <>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</>\n case 'bold':\n return <b>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</b>\n case 'italic':\n return <i>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</i>\n case 'underline':\n return (<u>{node.children.map((value, index) => (<ASTNodeInterpreter key={index} node={value}/>))}</u>)\n case 'font-space':\n return (\n <span className=\"font-space\">{node.children.map((value, index) => (\n <ASTNodeInterpreter key={index}\n node={value}/>\n ))}</span>\n )\n case 'primary':\n return (\n <span className=\"text-primary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'secondary':\n return (\n <span className=\"text-secondary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'warn':\n return (\n <span className=\"text-warning\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'positive':\n return (\n <span className=\"text-positive\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'negative':\n return (\n <span className=\"text-negative\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n default:\n return null\n }\n}\n\nconst modifierIdentifierMapping = [\n { id: 'i', name: 'italic' },\n { id: 'b', name: 'bold' },\n { id: 'u', name: 'underline' },\n { id: 'space', name: 'font-space' },\n { id: 'primary', name: 'primary' },\n { id: 'secondary', name: 'secondary' },\n { id: 'warn', name: 'warn' },\n { id: 'positive', name: 'positive' },\n { id: 'negative', name: 'negative' },\n] as const\n\nconst inserterIdentifierMapping = [\n { id: 'helpwave', name: 'helpwave' },\n { id: 'newline', name: 'newline' }\n] as const\nconst parseMarkdown = (\n text: string,\n commandStart: string = '\\\\',\n open: string = '{',\n close: string = '}'\n): ASTNode => {\n let start = text.indexOf(commandStart)\n const children: ASTNode[] = []\n\n // parse the text step by step\n while (text !== '') {\n if (start === -1) {\n children.push({\n type: 'text',\n text\n })\n break\n }\n children.push(parseMarkdown(text.substring(0, start)))\n text = text.substring(start)\n if (text.length <= 1) {\n children.push({\n type: 'text',\n text\n })\n text = ''\n continue\n }\n const simpleReplace = [commandStart, open, close]\n if (simpleReplace.some(value => text[1] === value)) {\n children.push({\n type: 'text',\n text: simpleReplace.find(value => text[1] === value)!\n })\n text = text.substring(2)\n start = text.indexOf(commandStart)\n continue\n }\n const inserter = inserterIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (inserter) {\n children.push({\n type: inserter.name,\n })\n text = text.substring(inserter.id.length + 1)\n start = text.indexOf(commandStart)\n continue\n }\n const modifier = modifierIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (modifier) {\n // check brackets\n if (text[modifier.id.length + 1] !== open) {\n children.push({\n type: 'text',\n text: text.substring(0, modifier.id.length + 1)\n })\n text = text.substring(modifier.id.length + 2)\n start = text.indexOf(commandStart)\n continue\n }\n let closing = -1\n let index = modifier.id.length + 2\n let counter = 1\n let escaping = false\n while (index < text.length) {\n if (text[index] === open && !escaping) {\n counter++\n }\n if (text[index] === close && !escaping) {\n counter--\n if (counter === 0) {\n closing = index\n break\n }\n }\n escaping = text[index] === commandStart\n index++\n }\n\n if (closing !== -1) {\n children.push({\n type: modifier.name,\n children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]\n })\n text = text.substring(closing + 1)\n start = text.indexOf(commandStart)\n continue\n }\n }\n // nothing could be applied to command start\n children.push({\n type: 'text',\n text: text[0]!\n })\n text = text.substring(1)\n start = text.indexOf(commandStart)\n }\n\n return {\n type: 'none',\n children\n }\n}\n\nconst optimizeTree = (node: ASTNode) => {\n if (node.type === 'text') {\n return !node.text ? undefined : node\n }\n if (astNodeInserterType.some(value => value === node.type)) {\n return node\n }\n\n const currentNode = node as\n { type: ASTNodeModifierType, children: ASTNode[] }\n\n if (currentNode.children.length === 0) {\n return undefined\n }\n\n let children: ASTNode[] = []\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = optimizeTree(currentNode.children[i]!)\n if (!child) {\n continue\n }\n if (child.type === 'none') {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n currentNode.children = children\n children = []\n\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = currentNode.children[i]!\n if (child) {\n if (child.type === 'text' && children[children.length - 1]?.type === 'text') {\n (children[children.length - 1]! as { type: ASTNodeDefaultType, text: string }).text += child.text\n } else {\n children.push(child)\n }\n }\n }\n currentNode.children = children\n return currentNode\n}\n\nexport type MarkdownInterpreterProps = {\n text: string,\n className?: string,\n}\n\nexport const MarkdownInterpreter = ({ text, className }: MarkdownInterpreterProps) => {\n const tree = parseMarkdown(text)\n const optimizedTree = optimizeTree(tree)!\n return <ASTNodeInterpreter node={optimizedTree} isRoot={true} className={className}/>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;A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AY,MAAM,aAAa,WAAU,gBAAc;AAAA,MAE7D,eAAW,aAAAC,SAAK,cAAc,mBAAmB;AAAA,MACjD,iBAAgB;AAAA,MAEhB,uDAAC,SAAI,WAAU,kBACZ,kBAAQ,SAAS,aAAc,6CAAC,uBAAoB,MAAM,QAAQ,OAAM,IAAM,QAAQ,OACzF;AAAA;AAAA,IAbK;AAAA,EAcP,CACD,GACH;AAEJ;","names":["import_clsx","import_lucide_react","clsx","import_jsx_runtime","import_jsx_runtime","clsx"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/layout/FAQSection.tsx","../../../src/components/Expandable.tsx","../../../src/components/MarkdownInterpreter.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport type { ExpandableProps } from '../Expandable'\nimport { Expandable } from '../Expandable'\nimport { MarkdownInterpreter } from '../MarkdownInterpreter'\n\ntype ContentType = {\n type: 'markdown',\n value: string,\n} | {\n type: 'custom',\n value: ReactNode,\n}\n\nexport type FAQItem = Pick<ExpandableProps, 'initialExpansion'| 'className'> & {\n id: string,\n title: string,\n content: ContentType,\n}\n\nexport type FAQSectionProps = {\n entries: FAQItem[],\n expandableClassName?: string,\n}\n\n/**\n * Description\n */\nexport const FAQSection = ({\n entries,\n expandableClassName\n}: FAQSectionProps) => {\n const chevronSize = 28\n return (\n <div className=\"col gap-y-4\">\n {entries.map(({ id, title, content, ...restProps }) => (\n <Expandable\n key={id}\n {...restProps}\n label={(<h3 id={id} className=\"textstyle-title-md\">{title}</h3>)}\n clickOnlyOnHeader={false}\n icon={(expanded) => expanded ?\n (<ChevronUp size={chevronSize} className=\"text-primary\" style={{ minWidth: `${chevronSize}px` }}/>) :\n (<ChevronDown size={chevronSize} className=\"text-primary\"/>)\n }\n className={clsx('rounded-xl', expandableClassName)}\n headerClassName=\"px-6 py-4\"\n >\n <div className=\"mt-2 px-6 pb-4\">\n {content.type === 'markdown' ? (<MarkdownInterpreter text={content.value}/>) : content.value}\n </div>\n </Expandable>\n ))}\n </div>\n )\n}\n","import type { PropsWithChildren, ReactNode } from 'react'\nimport { forwardRef, useState } from 'react'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport clsx from 'clsx'\n\ntype IconBuilder = (expanded: boolean) => ReactNode\n\nexport type ExpandableProps = PropsWithChildren<{\n label: ReactNode,\n icon?: IconBuilder,\n initialExpansion?: boolean,\n /**\n * Whether the expansion should only happen when the header is clicked or on the entire component\n */\n clickOnlyOnHeader?: boolean,\n className?: string,\n headerClassName?: string,\n}>\n\nconst DefaultIcon: IconBuilder = (expanded) => expanded ?\n (<ChevronUp size={16} className=\"min-w-[16px]\"/>)\n : (<ChevronDown size={16} className=\"min-w-[16px]\"/>)\n\n/**\n * A Component for showing and hiding content\n */\nexport const Expandable = forwardRef<HTMLDivElement, ExpandableProps>(({\n children,\n label,\n icon,\n initialExpansion = false,\n clickOnlyOnHeader = true,\n className = '',\n headerClassName = ''\n }, ref) => {\n const [isExpanded, setIsExpanded] = useState(initialExpansion)\n icon ??= DefaultIcon\n\n return (\n <div\n ref={ref}\n className={clsx('col bg-surface text-on-surface group rounded-lg shadow-sm', { 'cursor-pointer': !clickOnlyOnHeader }, className)}\n onClick={() => !clickOnlyOnHeader && setIsExpanded(!isExpanded)}\n >\n <button\n className={clsx('btn-md rounded-lg justify-between items-center bg-surface text-on-surface', { 'group-hover:brightness-95': !isExpanded }, headerClassName)}\n onClick={() => clickOnlyOnHeader && setIsExpanded(!isExpanded)}\n >\n {label}\n {icon(isExpanded)}\n </button>\n {isExpanded && (\n <div className=\"col\">\n {children}\n </div>\n )}\n </div>\n )\n})\n\nExpandable.displayName = 'Expandable'\n","type ASTNodeModifierType =\n 'none'\n | 'italic'\n | 'bold'\n | 'underline'\n | 'font-space'\n | 'primary'\n | 'secondary'\n | 'warn'\n | 'positive'\n | 'negative'\n\nconst astNodeInserterType = ['helpwave', 'newline'] as const\ntype ASTNodeInserterType = typeof astNodeInserterType[number]\ntype ASTNodeDefaultType = 'text'\n\ntype ASTNode = {\n type: ASTNodeModifierType,\n children: ASTNode[],\n} | {\n type: ASTNodeInserterType,\n} | {\n type: ASTNodeDefaultType,\n text: string,\n}\n\nexport type ASTNodeInterpreterProps = {\n node: ASTNode,\n isRoot?: boolean,\n className?: string,\n}\nexport const ASTNodeInterpreter = ({\n node,\n isRoot = false,\n className = '',\n }: ASTNodeInterpreterProps) => {\n switch (node.type) {\n case 'newline':\n return <br/>\n case 'text':\n return isRoot ? <span className={className}>{node.text}</span> : node.text\n case 'helpwave':\n return (<span className=\"font-bold font-space no-underline\">helpwave</span>)\n case 'none':\n return isRoot ? (\n<span className={className}>{node.children.map((value, index) => (\n<ASTNodeInterpreter key={index}\n node={value}/>\n))}</span>\n) :\n <>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</>\n case 'bold':\n return <b>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</b>\n case 'italic':\n return <i>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</i>\n case 'underline':\n return (<u>{node.children.map((value, index) => (<ASTNodeInterpreter key={index} node={value}/>))}</u>)\n case 'font-space':\n return (\n <span className=\"font-space\">{node.children.map((value, index) => (\n <ASTNodeInterpreter key={index}\n node={value}/>\n ))}</span>\n )\n case 'primary':\n return (\n <span className=\"text-primary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'secondary':\n return (\n <span className=\"text-secondary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'warn':\n return (\n <span className=\"text-warning\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'positive':\n return (\n <span className=\"text-positive\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'negative':\n return (\n <span className=\"text-negative\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n default:\n return null\n }\n}\n\nconst modifierIdentifierMapping = [\n { id: 'i', name: 'italic' },\n { id: 'b', name: 'bold' },\n { id: 'u', name: 'underline' },\n { id: 'space', name: 'font-space' },\n { id: 'primary', name: 'primary' },\n { id: 'secondary', name: 'secondary' },\n { id: 'warn', name: 'warn' },\n { id: 'positive', name: 'positive' },\n { id: 'negative', name: 'negative' },\n] as const\n\nconst inserterIdentifierMapping = [\n { id: 'helpwave', name: 'helpwave' },\n { id: 'newline', name: 'newline' }\n] as const\nconst parseMarkdown = (\n text: string,\n commandStart: string = '\\\\',\n open: string = '{',\n close: string = '}'\n): ASTNode => {\n let start = text.indexOf(commandStart)\n const children: ASTNode[] = []\n\n // parse the text step by step\n while (text !== '') {\n if (start === -1) {\n children.push({\n type: 'text',\n text\n })\n break\n }\n children.push(parseMarkdown(text.substring(0, start)))\n text = text.substring(start)\n if (text.length <= 1) {\n children.push({\n type: 'text',\n text\n })\n text = ''\n continue\n }\n const simpleReplace = [commandStart, open, close]\n if (simpleReplace.some(value => text[1] === value)) {\n children.push({\n type: 'text',\n text: simpleReplace.find(value => text[1] === value)!\n })\n text = text.substring(2)\n start = text.indexOf(commandStart)\n continue\n }\n const inserter = inserterIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (inserter) {\n children.push({\n type: inserter.name,\n })\n text = text.substring(inserter.id.length + 1)\n start = text.indexOf(commandStart)\n continue\n }\n const modifier = modifierIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (modifier) {\n // check brackets\n if (text[modifier.id.length + 1] !== open) {\n children.push({\n type: 'text',\n text: text.substring(0, modifier.id.length + 1)\n })\n text = text.substring(modifier.id.length + 2)\n start = text.indexOf(commandStart)\n continue\n }\n let closing = -1\n let index = modifier.id.length + 2\n let counter = 1\n let escaping = false\n while (index < text.length) {\n if (text[index] === open && !escaping) {\n counter++\n }\n if (text[index] === close && !escaping) {\n counter--\n if (counter === 0) {\n closing = index\n break\n }\n }\n escaping = text[index] === commandStart\n index++\n }\n\n if (closing !== -1) {\n children.push({\n type: modifier.name,\n children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]\n })\n text = text.substring(closing + 1)\n start = text.indexOf(commandStart)\n continue\n }\n }\n // nothing could be applied to command start\n children.push({\n type: 'text',\n text: text[0]!\n })\n text = text.substring(1)\n start = text.indexOf(commandStart)\n }\n\n return {\n type: 'none',\n children\n }\n}\n\nconst optimizeTree = (node: ASTNode) => {\n if (node.type === 'text') {\n return !node.text ? undefined : node\n }\n if (astNodeInserterType.some(value => value === node.type)) {\n return node\n }\n\n const currentNode = node as\n { type: ASTNodeModifierType, children: ASTNode[] }\n\n if (currentNode.children.length === 0) {\n return undefined\n }\n\n let children: ASTNode[] = []\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = optimizeTree(currentNode.children[i]!)\n if (!child) {\n continue\n }\n if (child.type === 'none') {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n currentNode.children = children\n children = []\n\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = currentNode.children[i]!\n if (child) {\n if (child.type === 'text' && children[children.length - 1]?.type === 'text') {\n (children[children.length - 1]! as { type: ASTNodeDefaultType, text: string }).text += child.text\n } else {\n children.push(child)\n }\n }\n }\n currentNode.children = children\n return currentNode\n}\n\nexport type MarkdownInterpreterProps = {\n text: string,\n className?: string,\n}\n\nexport const MarkdownInterpreter = ({ text, className }: MarkdownInterpreterProps) => {\n const tree = parseMarkdown(text)\n const optimizedTree = optimizeTree(tree)!\n return <ASTNodeInterpreter node={optimizedTree} isRoot={true} className={className}/>\n}\n"],"mappings":";AACA,OAAOA,WAAU;AACjB,SAAS,eAAAC,cAAa,aAAAC,kBAAiB;;;ACDvC,SAAS,YAAY,gBAAgB;AACrC,SAAS,aAAa,iBAAiB;AACvC,OAAO,UAAU;AAiBd,cAwBG,YAxBH;AADH,IAAM,cAA2B,CAAC,aAAa,WA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Aa,WAAU,gBAAe,OAAO,EAAE,UAAU,GAAG,WAAW,KAAK,GAAE,IAC/F,gBAAAD,KAACE,cAAA,EAAY,MAAM,aAAa,WAAU,gBAAc;AAAA,MAE7D,WAAWC,MAAK,cAAc,mBAAmB;AAAA,MACjD,iBAAgB;AAAA,MAEhB,0BAAAH,KAAC,SAAI,WAAU,kBACZ,kBAAQ,SAAS,aAAc,gBAAAA,KAAC,uBAAoB,MAAM,QAAQ,OAAM,IAAM,QAAQ,OACzF;AAAA;AAAA,IAbK;AAAA,EAcP,CACD,GACH;AAEJ;","names":["clsx","ChevronDown","ChevronUp","jsx","jsx","ChevronUp","ChevronDown","clsx"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/layout/Tile.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport Image from 'next/image'\nimport clsx from 'clsx'\n\nexport type TileProps = {\n title: { value: string, className?: string },\n description?: { value: string, className?: string },\n prefix?: ReactNode,\n suffix?: ReactNode,\n className?: string,\n}\n\n/**\n * A component for creating a tile similar to the flutter ListTile\n */\nexport const Tile = ({\n title,\n description,\n prefix,\n suffix,\n className\n}: TileProps) => {\n return (\n <div className={clsx('row gap-x-4 w-full items-center', className)}>\n {prefix}\n <div className=\"col w-full\">\n <span className={clsx(title.className)}>{title.value}</span>\n {!!description &&\n <span className={clsx(description.className ?? 'textstyle-description')}>{description.value}</span>}\n </div>\n {suffix}\n </div>\n )\n}\n\ntype ImageLocation = 'prefix' | 'suffix'\ntype ImageSize = {\n width: number,\n height: number,\n}\n\nexport type TileWithImageProps = Omit<TileProps, 'suffix' | 'prefix'> & {\n url: string,\n imageLocation?: ImageLocation,\n imageSize?: ImageSize,\n imageClassName?: string,\n}\n\n/**\n * A Tile with an image as prefix or suffix\n */\nexport const TileWithImage = ({\n url,\n imageLocation = 'prefix',\n imageSize = { width: 24, height: 24 },\n imageClassName = '',\n ...tileProps\n}: TileWithImageProps) => {\n const image = <Image src={url} alt=\"\" {...imageSize} className={clsx(imageClassName)}/>\n return (\n <Tile\n {...tileProps}\n prefix={imageLocation === 'prefix' ? image : undefined}\n suffix={imageLocation === 'suffix' ? image : undefined}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkB;AAClB,kBAAiB;AAuBX;AAVC,IAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAiB;AACf,SACE,6CAAC,SAAI,eAAW,YAAAA,SAAK,mCAAmC,SAAS,GAC9D;AAAA;AAAA,IACD,6CAAC,SAAI,WAAU,cACb;AAAA,kDAAC,UAAK,eAAW,YAAAA,SAAK,MAAM,SAAS,GAAI,gBAAM,OAAM;AAAA,MACpD,CAAC,CAAC,eACD,4CAAC,UAAK,eAAW,YAAAA,SAAK,YAAY,aAAa,uBAAuB,GAAI,sBAAY,OAAM;AAAA,OAChG;AAAA,IACC;AAAA,KACH;AAEJ;AAkBO,IAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA,gBAAgB;AAAA,EAChB,YAAY,EAAE,OAAO,IAAI,QAAQ,GAAG;AAAA,EACpC,iBAAiB;AAAA,EACjB,GAAG;AACL,MAA0B;AACxB,QAAM,QAAQ,4CAAC,aAAAC,SAAA,EAAM,KAAK,KAAK,KAAI,IAAI,GAAG,WAAW,eAAW,YAAAD,SAAK,cAAc,GAAE;AACrF,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,QAAQ,kBAAkB,WAAW,QAAQ;AAAA,MAC7C,QAAQ,kBAAkB,WAAW,QAAQ;AAAA;AAAA,EAC/C;AAEJ;","names":["clsx","Image"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/layout/Tile.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport Image from 'next/image'\nimport clsx from 'clsx'\n\nexport type TileProps = {\n title: { value: string, className?: string },\n description?: { value: string, className?: string },\n prefix?: ReactNode,\n suffix?: ReactNode,\n className?: string,\n}\n\n/**\n * A component for creating a tile similar to the flutter ListTile\n */\nexport const Tile = ({\n title,\n description,\n prefix,\n suffix,\n className\n}: TileProps) => {\n return (\n <div className={clsx('row gap-x-4 w-full items-center', className)}>\n {prefix}\n <div className=\"col w-full\">\n <span className={clsx(title.className)}>{title.value}</span>\n {!!description &&\n <span className={clsx(description.className ?? 'textstyle-description')}>{description.value}</span>}\n </div>\n {suffix}\n </div>\n )\n}\n\ntype ImageLocation = 'prefix' | 'suffix'\ntype ImageSize = {\n width: number,\n height: number,\n}\n\nexport type TileWithImageProps = Omit<TileProps, 'suffix' | 'prefix'> & {\n url: string,\n imageLocation?: ImageLocation,\n imageSize?: ImageSize,\n imageClassName?: string,\n}\n\n/**\n * A Tile with an image as prefix or suffix\n */\nexport const TileWithImage = ({\n url,\n imageLocation = 'prefix',\n imageSize = { width: 24, height: 24 },\n imageClassName = '',\n ...tileProps\n}: TileWithImageProps) => {\n const image = <Image src={url} alt=\"\" {...imageSize} className={clsx(imageClassName)}/>\n return (\n <Tile\n {...tileProps}\n prefix={imageLocation === 'prefix' ? image : undefined}\n suffix={imageLocation === 'suffix' ? image : undefined}\n />\n )\n}\n"],"mappings":";AACA,OAAO,WAAW;AAClB,OAAO,UAAU;AAuBX,SACE,KADF;AAVC,IAAM,OAAO,CAAC;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAiB;AACf,SACE,qBAAC,SAAI,WAAW,KAAK,mCAAmC,SAAS,GAC9D;AAAA;AAAA,IACD,qBAAC,SAAI,WAAU,cACb;AAAA,0BAAC,UAAK,WAAW,KAAK,MAAM,SAAS,GAAI,gBAAM,OAAM;AAAA,MACpD,CAAC,CAAC,eACD,oBAAC,UAAK,WAAW,KAAK,YAAY,aAAa,uBAAuB,GAAI,sBAAY,OAAM;AAAA,OAChG;AAAA,IACC;AAAA,KACH;AAEJ;AAkBO,IAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA,gBAAgB;AAAA,EAChB,YAAY,EAAE,OAAO,IAAI,QAAQ,GAAG;AAAA,EACpC,iBAAiB;AAAA,EACjB,GAAG;AACL,MAA0B;AACxB,QAAM,QAAQ,oBAAC,SAAM,KAAK,KAAK,KAAI,IAAI,GAAG,WAAW,WAAW,KAAK,cAAc,GAAE;AACrF,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,QAAQ,kBAAkB,WAAW,QAAQ;AAAA,MAC7C,QAAQ,kBAAkB,WAAW,QAAQ;AAAA;AAAA,EAC/C;AAEJ;","names":[]}
@@ -1,38 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { PropsWithChildren } from 'react';
3
- import { SolidButtonColor } from '../Button.mjs';
4
- import { PropsForTranslation } from '../../hooks/useTranslation.mjs';
5
- import { ModalProps } from './Modal.mjs';
6
- import '../../hooks/useLanguage.mjs';
7
-
8
- type ConfirmDialogTranslation = {
9
- confirm: string;
10
- cancel: string;
11
- decline: string;
12
- };
13
- type ConfirmDialogType = 'positive' | 'negative' | 'neutral';
14
- type ButtonOverwriteType = {
15
- text?: string;
16
- color?: SolidButtonColor;
17
- disabled?: boolean;
18
- };
19
- type ConfirmDialogProps = ModalProps & {
20
- isShowingDecline?: boolean;
21
- requireAnswer?: boolean;
22
- onCancel?: () => void;
23
- onConfirm: () => void;
24
- onDecline?: () => void;
25
- confirmType?: ConfirmDialogType;
26
- /**
27
- * Order: Cancel, Decline, Confirm
28
- */
29
- buttonOverwrites?: [ButtonOverwriteType, ButtonOverwriteType, ButtonOverwriteType];
30
- };
31
- /**
32
- * A Dialog for asking the user for Confirmation
33
- *
34
- * To require an answer omit the onBackgroundClick
35
- */
36
- declare const ConfirmDialog: ({ overwriteTranslation, children, onCancel, onConfirm, onDecline, confirmType, buttonOverwrites, ...restProps }: PropsForTranslation<ConfirmDialogTranslation, PropsWithChildren<ConfirmDialogProps>>) => react_jsx_runtime.JSX.Element;
37
-
38
- export { type ButtonOverwriteType, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogType };
@@ -1,38 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { PropsWithChildren } from 'react';
3
- import { SolidButtonColor } from '../Button.js';
4
- import { PropsForTranslation } from '../../hooks/useTranslation.js';
5
- import { ModalProps } from './Modal.js';
6
- import '../../hooks/useLanguage.js';
7
-
8
- type ConfirmDialogTranslation = {
9
- confirm: string;
10
- cancel: string;
11
- decline: string;
12
- };
13
- type ConfirmDialogType = 'positive' | 'negative' | 'neutral';
14
- type ButtonOverwriteType = {
15
- text?: string;
16
- color?: SolidButtonColor;
17
- disabled?: boolean;
18
- };
19
- type ConfirmDialogProps = ModalProps & {
20
- isShowingDecline?: boolean;
21
- requireAnswer?: boolean;
22
- onCancel?: () => void;
23
- onConfirm: () => void;
24
- onDecline?: () => void;
25
- confirmType?: ConfirmDialogType;
26
- /**
27
- * Order: Cancel, Decline, Confirm
28
- */
29
- buttonOverwrites?: [ButtonOverwriteType, ButtonOverwriteType, ButtonOverwriteType];
30
- };
31
- /**
32
- * A Dialog for asking the user for Confirmation
33
- *
34
- * To require an answer omit the onBackgroundClick
35
- */
36
- declare const ConfirmDialog: ({ overwriteTranslation, children, onCancel, onConfirm, onDecline, confirmType, buttonOverwrites, ...restProps }: PropsForTranslation<ConfirmDialogTranslation, PropsWithChildren<ConfirmDialogProps>>) => react_jsx_runtime.JSX.Element;
37
-
38
- export { type ButtonOverwriteType, ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogType };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/modals/ConfirmDialog.tsx","../../../src/components/Button.tsx","../../../src/hooks/useLanguage.tsx","../../../src/hooks/useLocalStorage.tsx","../../../src/hooks/useTranslation.ts","../../../src/components/modals/Modal.tsx","../../../src/hooks/useHoverState.ts","../../../src/components/Tooltip.tsx","../../../src/components/modals/ModalRegister.tsx","../../../src/util/noop.ts"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport type { SolidButtonColor } from '../Button'\nimport { SolidButton } from '../Button'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { Modal, type ModalProps } from './Modal'\n\ntype ConfirmDialogTranslation = {\n confirm: string,\n cancel: string,\n decline: string,\n}\n\nexport type ConfirmDialogType = 'positive' | 'negative' | 'neutral'\n\nconst defaultConfirmDialogTranslation = {\n en: {\n confirm: 'Confirm',\n cancel: 'Cancel',\n decline: 'Decline'\n },\n de: {\n confirm: 'Bestätigen',\n cancel: 'Abbrechen',\n decline: 'Ablehnen'\n }\n}\n\nexport type ButtonOverwriteType = {\n text?: string,\n color?: SolidButtonColor,\n disabled?: boolean,\n}\n\nexport type ConfirmDialogProps = ModalProps & {\n isShowingDecline?: boolean,\n requireAnswer?: boolean,\n onCancel?: () => void,\n onConfirm: () => void,\n onDecline?: () => void,\n confirmType?: ConfirmDialogType,\n /**\n * Order: Cancel, Decline, Confirm\n */\n buttonOverwrites?: [ButtonOverwriteType, ButtonOverwriteType, ButtonOverwriteType],\n}\n\n/**\n * A Dialog for asking the user for Confirmation\n *\n * To require an answer omit the onBackgroundClick\n */\nexport const ConfirmDialog = ({\n overwriteTranslation,\n children,\n onCancel,\n onConfirm,\n onDecline,\n confirmType = 'positive',\n buttonOverwrites,\n ...restProps\n}: PropsForTranslation<ConfirmDialogTranslation, PropsWithChildren<ConfirmDialogProps>>) => {\n const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation)\n\n const mapping: Record<ConfirmDialogType, SolidButtonColor> = {\n neutral: 'primary',\n negative: 'negative',\n positive: 'positive'\n }\n\n return (\n <Modal {...restProps}>\n {children}\n <div className=\"row mt-3 gap-x-4 justify-end\">\n {onCancel && (\n <SolidButton\n color={buttonOverwrites?.[0].color ?? 'primary'}\n onClick={onCancel}\n disabled={buttonOverwrites?.[0].disabled ?? false}\n >\n {buttonOverwrites?.[0].text ?? translation.cancel}\n </SolidButton>\n )}\n {onDecline && (\n <SolidButton\n color={buttonOverwrites?.[1].color ?? 'negative'}\n onClick={onDecline}\n\n disabled={buttonOverwrites?.[1].disabled ?? false}\n >\n {buttonOverwrites?.[1].text ?? translation.decline}\n </SolidButton>\n )}\n <SolidButton\n autoFocus\n color={buttonOverwrites?.[2].color ?? mapping[confirmType]}\n onClick={onConfirm}\n disabled={buttonOverwrites?.[2].disabled ?? false}\n >\n {buttonOverwrites?.[2].text ?? translation.confirm}\n </SolidButton>\n </div>\n </Modal>\n )\n}\n","import type { PropsWithChildren, ButtonHTMLAttributes, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nexport type SolidButtonColor = 'primary' | 'secondary' | 'tertiary' | 'positive' | 'warning'| 'negative'\nexport type OutlineButtonColor = 'primary'\nexport type TextButtonColor = 'negative' | 'neutral'\n\ntype ButtonSizes = 'small' | 'medium' | 'large'\n\n/**\n * The shard properties between all button types\n */\nexport type ButtonProps = PropsWithChildren<{\n /**\n * @default 'medium'\n */\n size?: ButtonSizes,\n}> & ButtonHTMLAttributes<Element>\n\nexport const ButtonSizePaddings: Record<ButtonSizes, string> = {\n small: 'btn-sm',\n medium: 'btn-md',\n large: 'btn-lg'\n}\n\ntype ButtonWithIconsProps = ButtonProps & {\n startIcon?: ReactNode,\n endIcon?: ReactNode,\n}\n\nexport type SolidButtonProps = ButtonWithIconsProps & {\n color?: SolidButtonColor,\n}\n\nexport type OutlineButtonProps = ButtonWithIconsProps & {\n color?: OutlineButtonColor,\n}\n\nexport type TextButtonProps = ButtonWithIconsProps & {\n color?: TextButtonColor,\n}\n\n/**\n * A button with a solid background and different sizes\n */\nconst SolidButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: SolidButtonProps) => {\n const colorClasses = {\n primary: 'bg-button-solid-primary-background text-button-solid-primary-text',\n secondary: 'bg-button-solid-secondary-background text-button-solid-secondary-text',\n tertiary: 'bg-button-solid-tertiary-background text-button-solid-tertiary-text',\n positive: 'bg-button-solid-positive-background text-button-solid-positive-text',\n warning: 'bg-button-solid-warning-background text-button-solid-warning-text',\n negative: 'bg-button-solid-negative-background text-button-solid-negative-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-solid-primary-icon',\n secondary: 'text-button-solid-secondary-icon',\n tertiary: 'text-button-solid-tertiary-icon',\n positive: 'text-button-solid-positive-icon',\n warning: 'text-button-solid-warning-icon',\n negative: 'text-button-solid-negative-icon',\n }[color]\n\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className,\n {\n 'text-disabled-text bg-disabled-background': disabled,\n [clsx(colorClasses, 'hover:brightness-90')]: !disabled\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A button with an outline border and different sizes\n */\nconst OutlineButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: OutlineButtonProps) => {\n const colorClasses = {\n primary: 'bg-transparent border-2 border-button-outline-primary-text text-button-outline-primary-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-outline-primary-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text border-disabled-outline)': disabled,\n [clsx(colorClasses, 'hover:brightness-80')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A text that is a button that can have different sizes\n */\nconst TextButton = ({\n children,\n disabled = false,\n color = 'neutral',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: TextButtonProps) => {\n const colorClasses = {\n negative: 'bg-transparent text-button-text-negative-text',\n neutral: 'bg-transparent text-button-text-neutral-text',\n }[color]\n\n const iconColorClasses = {\n negative: 'text-button-text-negative-icon',\n neutral: 'text-button-text-neutral-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text': disabled,\n [clsx(colorClasses, 'hover:bg-button-text-hover-background rounded-full')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n// TODO Icon button\n\nexport { SolidButton, OutlineButton, TextButton }\n","import type { Dispatch, PropsWithChildren, SetStateAction } from 'react'\nimport { createContext, useContext, useEffect, useState } from 'react'\nimport { useLocalStorage } from './useLocalStorage'\n\nexport const languages = ['en', 'de'] as const\nexport type Languages = typeof languages[number]\nexport const languagesLocalNames: Record<Languages, string> = {\n en: 'English',\n de: 'Deutsch',\n}\n\nexport const DEFAULT_LANGUAGE = 'en'\n\nexport type LanguageContextValue = {\n language: Languages,\n setLanguage: Dispatch<SetStateAction<Languages>>,\n}\n\nexport const LanguageContext = createContext<LanguageContextValue>({ language: DEFAULT_LANGUAGE, setLanguage: (v) => v })\n\nexport const useLanguage = () => useContext(LanguageContext)\n\nexport const useLocale = (overWriteLanguage?: Languages) => {\n const { language } = useLanguage()\n const mapping: Record<Languages, string> = {\n en: 'en-US',\n de: 'de-DE'\n }\n return mapping[overWriteLanguage ?? language]\n}\n\ntype ProvideLanguageProps = {\n initialLanguage?: Languages,\n}\n\nexport const ProvideLanguage = ({ initialLanguage, children }: PropsWithChildren<ProvideLanguageProps>) => {\n const [language, setLanguage] = useState<Languages>(initialLanguage ?? DEFAULT_LANGUAGE)\n const [storedLanguage, setStoredLanguage] = useLocalStorage<Languages>('language', initialLanguage ?? DEFAULT_LANGUAGE)\n\n useEffect(() => {\n if(language !== initialLanguage && initialLanguage){\n console.warn('LanguageProvider initial state changed: Prefer using useLanguages\\'s setLanguage instead')\n setLanguage(initialLanguage)\n }\n }, [initialLanguage]) // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n // TODO set locale of html tag here as well\n setStoredLanguage(language)\n }, [language, setStoredLanguage])\n\n useEffect(() => {\n if (storedLanguage !== null) {\n setLanguage(storedLanguage)\n return\n }\n\n const languagesToTestAgainst = Object.values(languages)\n\n const matchingBrowserLanguages = window.navigator.languages\n .map(language => languagesToTestAgainst.find((test) => language === test || language.split('-')[0] === test))\n .filter(entry => entry !== undefined)\n\n if (matchingBrowserLanguages.length === 0) return\n\n const firstMatch = matchingBrowserLanguages[0] as Languages\n setLanguage(firstMatch)\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <LanguageContext.Provider value={{\n language,\n setLanguage\n }}>\n {children}\n </LanguageContext.Provider>\n )\n}\n","import type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport { LocalStorageService } from '../util/storage'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\nexport const useLocalStorage = <T, >(key: string, initValue: T): [T, SetValue<T>] => {\n const get = useCallback((): T => {\n if (typeof window === 'undefined') {\n return initValue\n }\n const storageService = new LocalStorageService()\n const value = storageService.get<T>(key)\n return value || initValue\n }, [initValue, key])\n\n const [storedValue, setStoredValue] = useState<T>(get)\n\n const setValue: SetValue<T> = useCallback(value => {\n const newValue = value instanceof Function ? value(storedValue) : value\n const storageService = new LocalStorageService()\n storageService.set(key, value)\n\n setStoredValue(newValue)\n }, [storedValue, setStoredValue, key])\n\n useEffect(() => {\n setStoredValue(get())\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return [storedValue, setValue]\n}","import type { Languages } from './useLanguage'\nimport { useLanguage } from './useLanguage'\n\nexport type Translation<T> = Record<Languages, T>\n\ntype OverwriteTranslationType<Translation extends Record<string, unknown>> = {\n language?: Languages,\n translation?: Partial<Record<Languages, Partial<Translation>>>,\n}\n\n/**\n * Adds the `language` prop to the component props.\n *\n * @param Translation the type of the translation object\n *\n * @param Props the type of the component props, defaults to `Record<string, never>`,\n * if you don't expect any other props other than `language` and get an\n * error when using your component (because it uses `forwardRef` etc.)\n * you can try out `Record<string, unknown>`, this might resolve your\n * problem as `SomeType & never` is still `never` but `SomeType & unknown`\n * is `SomeType` which means that adding back props (like `ref` etc.)\n * works properly\n */\nexport type PropsForTranslation<\n Translation extends Record<string, unknown>,\n Props = Record<string, never>\n> = Props & {\n overwriteTranslation?: OverwriteTranslationType<Translation>,\n};\n\nexport const useTranslation = <Translation extends Record<string, unknown>>(\n defaults: Record<Languages, Translation>,\n translationOverwrite: OverwriteTranslationType<Translation> = {}\n) : Translation => {\n const { language: languageProp, translation: overwrite } = translationOverwrite\n const { language: inferredLanguage } = useLanguage()\n const usedLanguage = languageProp ?? inferredLanguage\n let defaultValues: Translation = defaults[usedLanguage]\n if (overwrite && overwrite[usedLanguage]) {\n defaultValues = { ...defaultValues, ...overwrite[usedLanguage] }\n }\n return defaultValues\n}\n","import { useContext, useEffect, type MouseEventHandler, type PropsWithChildren, type ReactNode } from 'react'\nimport ReactDOM from 'react-dom'\nimport { X } from 'lucide-react'\nimport clsx from 'clsx'\nimport type { Languages } from '../../hooks/useLanguage'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { Tooltip } from '../Tooltip'\nimport { ModalContext } from './ModalRegister'\n\ntype ModalHeaderTranslation = {\n close: string,\n}\n\nconst defaultModalHeaderTranslation: Record<Languages, ModalHeaderTranslation> = {\n en: {\n close: 'Close'\n },\n de: {\n close: 'Schließen'\n }\n}\n\nexport type ModalHeaderProps = {\n onCloseClick?: () => void,\n /** The title of the Modal. If you want to only set the text use `titleText` instead */\n title?: ReactNode,\n /** The title text of the Modal. If you want to set a custom title use `title` instead */\n titleText?: string,\n /** The description of the Modal. If you want to only set the text use `descriptionText` instead */\n description?: ReactNode,\n /** The description text of the Modal. If you want to set a custom description use `description` instead */\n descriptionText?: string,\n}\n\n/**\n * A default Header to be used by modals to have a uniform design\n */\nexport const ModalHeader = ({\n overwriteTranslation,\n onCloseClick,\n title,\n titleText = '',\n description,\n descriptionText = ''\n }: PropsForTranslation<ModalHeaderTranslation, ModalHeaderProps>) => {\n const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation)\n const hasTitleRow = !!title || !!titleText || !!onCloseClick\n const titleRow = (\n <div className=\"row justify-between items-start gap-x-8\">\n {title ?? (\n <span className={clsx('textstyle-title-lg', {\n 'mb-1': description || descriptionText,\n })}>\n {titleText}\n </span>\n )}\n {!!onCloseClick && (\n <Tooltip tooltip={translation.close}>\n <button className=\"row bg-gray-200 hover:bg-gray-300 rounded-md p-1\" onClick={onCloseClick}>\n <X/>\n </button>\n </Tooltip>\n )}\n </div>\n )\n\n return (\n <div className=\"col\">\n {hasTitleRow && (titleRow)}\n {description ?? (descriptionText && (<span className=\"textstyle-description\">{descriptionText}</span>))}\n </div>\n )\n}\n\nexport const modalRootName = 'modal-root'\n\nexport type ModalProps = {\n id: string,\n isOpen: boolean,\n onBackgroundClick?: MouseEventHandler<HTMLDivElement>,\n backgroundClassName?: string,\n modalClassName?: string,\n containerClassName?: string,\n} & ModalHeaderProps\n\n/**\n * A Generic Modal Window\n *\n * The state needs to be managed by the parent of this component\n *\n * DO NOT Conditionally render this always use the isOpen to ensure that the ModalRegister is working properly\n */\nexport const Modal = ({\n children,\n id,\n isOpen,\n onBackgroundClick,\n backgroundClassName = '',\n modalClassName = '',\n containerClassName = '',\n ...modalHeaderProps\n }: PropsWithChildren<ModalProps>) => {\n const modalRoot = typeof window !== 'undefined' ? document.getElementById(modalRootName) : null\n const {\n register,\n addToRegister,\n removeFromRegister\n } = useContext(ModalContext)\n\n if (!id) {\n console.error('the id cannot be empty')\n }\n\n useEffect(() => {\n if (isOpen) {\n addToRegister(id)\n } else {\n removeFromRegister(id)\n }\n }, [addToRegister, id, removeFromRegister, isOpen])\n\n if (modalRoot === null || !isOpen) return null\n\n const isLast = register.length < 1 || register[register.length - 1] === id\n const isSecondLast = register.length < 2 || register[register.length - 2] === id\n\n return ReactDOM.createPortal(\n <div className={clsx('fixed inset-0 overflow-y-auto z-[99]', containerClassName)} id={id}>\n {isLast && (\n <div\n className={clsx('fixed inset-0 h-screen w-screen', backgroundClassName, {\n 'bg-black/70': isLast && register.length === 1,\n })}\n onClick={onBackgroundClick}\n />\n )}\n <div\n className={clsx('fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-white text-black rounded-xl shadow-xl', modalClassName)}>\n <ModalHeader {...modalHeaderProps} />\n {children}\n </div>\n {!isLast && (\n <div\n className={clsx('fixed inset-0 h-screen w-screen', backgroundClassName, {\n 'bg-black/70': isSecondLast && register.length > 1,\n })}\n />\n )}\n </div>,\n modalRoot,\n id\n )\n}\n","import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n","import type { CSSProperties, PropsWithChildren, ReactNode } from 'react'\nimport { useHoverState } from '../hooks/useHoverState'\nimport { clsx } from 'clsx'\n\ntype Position = 'top' | 'bottom' | 'left' | 'right'\n\nexport type TooltipProps = PropsWithChildren<{\n tooltip: string | ReactNode,\n /**\n * Number of milliseconds until the tooltip appears\n *\n * defaults to 1000ms\n */\n animationDelay?: number,\n /**\n * Class names of additional styling properties for the tooltip\n */\n tooltipClassName?: string,\n /**\n * Class names of additional styling properties for the container from which the tooltip will be created\n */\n containerClassName?: string,\n position?: Position,\n zIndex?: number,\n}>\n\n/**\n * A Component for showing a tooltip when hovering over Content\n * @param tooltip The tooltip to show can be a text or any ReactNode\n * @param children The Content for which the tooltip should be created\n * @param animationDelay The delay before the tooltip appears\n * @param tooltipClassName Additional ClassNames for the Container of the tooltip\n * @param containerClassName Additional ClassNames for the Container holding the content\n * @param position The direction of the tooltip relative to the Container\n * @param zIndex The z Index of the tooltip (you may require this when stacking modals)\n * @constructor\n */\nexport const Tooltip = ({\n tooltip,\n children,\n animationDelay = 650,\n tooltipClassName = '',\n containerClassName = '',\n position = 'bottom',\n zIndex = 10,\n }: TooltipProps) => {\n const { isHovered, handlers } = useHoverState()\n\n const positionClasses = {\n top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,\n bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,\n left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,\n right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`\n }\n\n const triangleSize = 6\n const triangleClasses = {\n top: `top-full left-1/2 -translate-x-1/2 border-t-gray-600 border-l-transparent border-r-transparent`,\n bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-gray-600 border-l-transparent border-r-transparent`,\n left: `left-full top-1/2 -translate-y-1/2 border-l-gray-600 border-t-transparent border-b-transparent`,\n right: `right-full top-1/2 -translate-y-1/2 border-r-gray-600 border-t-transparent border-b-transparent`\n }\n\n const triangleStyle: Record<Position, CSSProperties> = {\n top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },\n bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },\n left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },\n right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }\n }\n\n return (\n <div\n className={clsx('relative inline-block', containerClassName)}\n {...handlers}\n >\n {children}\n {isHovered && (\n <div\n className={clsx(`opacity-0 absolute text-black text-xs font-semibold text-gray-600 px-2 py-1 rounded whitespace-nowrap border-2 border-gray-600\n animate-tooltip-fade-in shadow-lg bg-gray-100`, positionClasses[position], tooltipClassName)}\n style={{ zIndex, animationDelay: animationDelay + 'ms' }}\n >\n {tooltip}\n <div\n className={clsx(`absolute w-0 h-0`, triangleClasses[position])}\n style={{ ...triangleStyle[position], zIndex }}\n />\n </div>\n )}\n </div>\n )\n}\n","import type { PropsWithChildren } from 'react'\nimport { createContext, useState } from 'react'\nimport { noop } from '../../util/noop'\n\nexport type ModalContextType = {\n register: string[],\n addToRegister: (id: string) => void,\n removeFromRegister: (id: string) => void,\n}\nexport const ModalContext = createContext<ModalContextType>({\n register: [],\n addToRegister: noop,\n removeFromRegister: noop,\n})\n\n/**\n * A Simple Wrapper for the context\n */\nexport const ModalRegister = ({\n children\n}: PropsWithChildren) => {\n const [register, setRegister] = useState<string[]>([])\n\n const inRegister = (id: string) => {\n return !!register.find(value => value === id)\n }\n\n const addToRegister = (id: string) => {\n if (!inRegister(id)) {\n setRegister([...register, id])\n }\n }\n\n const removeFromRegister = (id: string) => {\n if (inRegister(id)) {\n setRegister(register.filter(value => value !== id))\n }\n }\n\n return (\n <ModalContext.Provider value={{ register, addToRegister, removeFromRegister }}>\n {children}\n </ModalContext.Provider>\n )\n}\n","export const noop = () => undefined\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAAiB;AA0Eb;AAxDG,IAAM,qBAAkD;AAAA,EAC7D,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AAsBA,IAAM,cAAc,CAAC;AAAA,EACE;AAAA,EACA,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAwB;AAC3C,QAAM,eAAe;AAAA,IACnB,SAAS;AAAA,IACT,WAAW;AAAA,IACX,UAAU;AAAA,IACV,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,EACZ,EAAE,KAAK;AAEP,QAAM,mBAAmB;AAAA,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A,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,GAAG;AACL,MAA4F;AAC1F,QAAM,cAAc,eAAe,iCAAiC,oBAAoB;AAExF,QAAM,UAAuD;AAAA,IAC3D,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,EACZ;AAEA,SACE,8CAAC,SAAO,GAAG,WACR;AAAA;AAAA,IACD,8CAAC,SAAI,WAAU,gCACZ;AAAA,kBACC;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,mBAAmB,CAAC,EAAE,SAAS;AAAA,UACtC,SAAS;AAAA,UACT,UAAU,mBAAmB,CAAC,EAAE,YAAY;AAAA,UAE3C,6BAAmB,CAAC,EAAE,QAAQ,YAAY;AAAA;AAAA,MAC7C;AAAA,MAED,aACC;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,mBAAmB,CAAC,EAAE,SAAS;AAAA,UACtC,SAAS;AAAA,UAET,UAAU,mBAAmB,CAAC,EAAE,YAAY;AAAA,UAE3C,6BAAmB,CAAC,EAAE,QAAQ,YAAY;AAAA;AAAA,MAC7C;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UACC,WAAS;AAAA,UACT,OAAO,mBAAmB,CAAC,EAAE,SAAS,QAAQ,WAAW;AAAA,UACzD,SAAS;AAAA,UACT,UAAU,mBAAmB,CAAC,EAAE,YAAY;AAAA,UAE3C,6BAAmB,CAAC,EAAE,QAAQ,YAAY;AAAA;AAAA,MAC7C;AAAA,OACF;AAAA,KACF;AAEJ;","names":["clsx","import_react","import_jsx_runtime","import_react","import_clsx","import_react","import_clsx","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","clsx","ReactDOM","import_jsx_runtime"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Button.tsx","../../../src/hooks/useLanguage.tsx","../../../src/hooks/useLocalStorage.tsx","../../../src/hooks/useTranslation.ts","../../../src/components/modals/Modal.tsx","../../../src/hooks/useHoverState.ts","../../../src/components/Tooltip.tsx","../../../src/components/modals/ModalRegister.tsx","../../../src/util/noop.ts","../../../src/components/modals/ConfirmDialog.tsx"],"sourcesContent":["import type { PropsWithChildren, ButtonHTMLAttributes, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nexport type SolidButtonColor = 'primary' | 'secondary' | 'tertiary' | 'positive' | 'warning'| 'negative'\nexport type OutlineButtonColor = 'primary'\nexport type TextButtonColor = 'negative' | 'neutral'\n\ntype ButtonSizes = 'small' | 'medium' | 'large'\n\n/**\n * The shard properties between all button types\n */\nexport type ButtonProps = PropsWithChildren<{\n /**\n * @default 'medium'\n */\n size?: ButtonSizes,\n}> & ButtonHTMLAttributes<Element>\n\nexport const ButtonSizePaddings: Record<ButtonSizes, string> = {\n small: 'btn-sm',\n medium: 'btn-md',\n large: 'btn-lg'\n}\n\ntype ButtonWithIconsProps = ButtonProps & {\n startIcon?: ReactNode,\n endIcon?: ReactNode,\n}\n\nexport type SolidButtonProps = ButtonWithIconsProps & {\n color?: SolidButtonColor,\n}\n\nexport type OutlineButtonProps = ButtonWithIconsProps & {\n color?: OutlineButtonColor,\n}\n\nexport type TextButtonProps = ButtonWithIconsProps & {\n color?: TextButtonColor,\n}\n\n/**\n * A button with a solid background and different sizes\n */\nconst SolidButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: SolidButtonProps) => {\n const colorClasses = {\n primary: 'bg-button-solid-primary-background text-button-solid-primary-text',\n secondary: 'bg-button-solid-secondary-background text-button-solid-secondary-text',\n tertiary: 'bg-button-solid-tertiary-background text-button-solid-tertiary-text',\n positive: 'bg-button-solid-positive-background text-button-solid-positive-text',\n warning: 'bg-button-solid-warning-background text-button-solid-warning-text',\n negative: 'bg-button-solid-negative-background text-button-solid-negative-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-solid-primary-icon',\n secondary: 'text-button-solid-secondary-icon',\n tertiary: 'text-button-solid-tertiary-icon',\n positive: 'text-button-solid-positive-icon',\n warning: 'text-button-solid-warning-icon',\n negative: 'text-button-solid-negative-icon',\n }[color]\n\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className,\n {\n 'text-disabled-text bg-disabled-background': disabled,\n [clsx(colorClasses, 'hover:brightness-90')]: !disabled\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A button with an outline border and different sizes\n */\nconst OutlineButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: OutlineButtonProps) => {\n const colorClasses = {\n primary: 'bg-transparent border-2 border-button-outline-primary-text text-button-outline-primary-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-outline-primary-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text border-disabled-outline)': disabled,\n [clsx(colorClasses, 'hover:brightness-80')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A text that is a button that can have different sizes\n */\nconst TextButton = ({\n children,\n disabled = false,\n color = 'neutral',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: TextButtonProps) => {\n const colorClasses = {\n negative: 'bg-transparent text-button-text-negative-text',\n neutral: 'bg-transparent text-button-text-neutral-text',\n }[color]\n\n const iconColorClasses = {\n negative: 'text-button-text-negative-icon',\n neutral: 'text-button-text-neutral-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text': disabled,\n [clsx(colorClasses, 'hover:bg-button-text-hover-background rounded-full')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n// TODO Icon button\n\nexport { SolidButton, OutlineButton, TextButton }\n","import type { Dispatch, PropsWithChildren, SetStateAction } from 'react'\nimport { createContext, useContext, useEffect, useState } from 'react'\nimport { useLocalStorage } from './useLocalStorage'\n\nexport const languages = ['en', 'de'] as const\nexport type Languages = typeof languages[number]\nexport const languagesLocalNames: Record<Languages, string> = {\n en: 'English',\n de: 'Deutsch',\n}\n\nexport const DEFAULT_LANGUAGE = 'en'\n\nexport type LanguageContextValue = {\n language: Languages,\n setLanguage: Dispatch<SetStateAction<Languages>>,\n}\n\nexport const LanguageContext = createContext<LanguageContextValue>({ language: DEFAULT_LANGUAGE, setLanguage: (v) => v })\n\nexport const useLanguage = () => useContext(LanguageContext)\n\nexport const useLocale = (overWriteLanguage?: Languages) => {\n const { language } = useLanguage()\n const mapping: Record<Languages, string> = {\n en: 'en-US',\n de: 'de-DE'\n }\n return mapping[overWriteLanguage ?? language]\n}\n\ntype ProvideLanguageProps = {\n initialLanguage?: Languages,\n}\n\nexport const ProvideLanguage = ({ initialLanguage, children }: PropsWithChildren<ProvideLanguageProps>) => {\n const [language, setLanguage] = useState<Languages>(initialLanguage ?? DEFAULT_LANGUAGE)\n const [storedLanguage, setStoredLanguage] = useLocalStorage<Languages>('language', initialLanguage ?? DEFAULT_LANGUAGE)\n\n useEffect(() => {\n if(language !== initialLanguage && initialLanguage){\n console.warn('LanguageProvider initial state changed: Prefer using useLanguages\\'s setLanguage instead')\n setLanguage(initialLanguage)\n }\n }, [initialLanguage]) // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n // TODO set locale of html tag here as well\n setStoredLanguage(language)\n }, [language, setStoredLanguage])\n\n useEffect(() => {\n if (storedLanguage !== null) {\n setLanguage(storedLanguage)\n return\n }\n\n const languagesToTestAgainst = Object.values(languages)\n\n const matchingBrowserLanguages = window.navigator.languages\n .map(language => languagesToTestAgainst.find((test) => language === test || language.split('-')[0] === test))\n .filter(entry => entry !== undefined)\n\n if (matchingBrowserLanguages.length === 0) return\n\n const firstMatch = matchingBrowserLanguages[0] as Languages\n setLanguage(firstMatch)\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <LanguageContext.Provider value={{\n language,\n setLanguage\n }}>\n {children}\n </LanguageContext.Provider>\n )\n}\n","import type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport { LocalStorageService } from '../util/storage'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\nexport const useLocalStorage = <T, >(key: string, initValue: T): [T, SetValue<T>] => {\n const get = useCallback((): T => {\n if (typeof window === 'undefined') {\n return initValue\n }\n const storageService = new LocalStorageService()\n const value = storageService.get<T>(key)\n return value || initValue\n }, [initValue, key])\n\n const [storedValue, setStoredValue] = useState<T>(get)\n\n const setValue: SetValue<T> = useCallback(value => {\n const newValue = value instanceof Function ? value(storedValue) : value\n const storageService = new LocalStorageService()\n storageService.set(key, value)\n\n setStoredValue(newValue)\n }, [storedValue, setStoredValue, key])\n\n useEffect(() => {\n setStoredValue(get())\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return [storedValue, setValue]\n}","import type { Languages } from './useLanguage'\nimport { useLanguage } from './useLanguage'\n\nexport type Translation<T> = Record<Languages, T>\n\ntype OverwriteTranslationType<Translation extends Record<string, unknown>> = {\n language?: Languages,\n translation?: Partial<Record<Languages, Partial<Translation>>>,\n}\n\n/**\n * Adds the `language` prop to the component props.\n *\n * @param Translation the type of the translation object\n *\n * @param Props the type of the component props, defaults to `Record<string, never>`,\n * if you don't expect any other props other than `language` and get an\n * error when using your component (because it uses `forwardRef` etc.)\n * you can try out `Record<string, unknown>`, this might resolve your\n * problem as `SomeType & never` is still `never` but `SomeType & unknown`\n * is `SomeType` which means that adding back props (like `ref` etc.)\n * works properly\n */\nexport type PropsForTranslation<\n Translation extends Record<string, unknown>,\n Props = Record<string, never>\n> = Props & {\n overwriteTranslation?: OverwriteTranslationType<Translation>,\n};\n\nexport const useTranslation = <Translation extends Record<string, unknown>>(\n defaults: Record<Languages, Translation>,\n translationOverwrite: OverwriteTranslationType<Translation> = {}\n) : Translation => {\n const { language: languageProp, translation: overwrite } = translationOverwrite\n const { language: inferredLanguage } = useLanguage()\n const usedLanguage = languageProp ?? inferredLanguage\n let defaultValues: Translation = defaults[usedLanguage]\n if (overwrite && overwrite[usedLanguage]) {\n defaultValues = { ...defaultValues, ...overwrite[usedLanguage] }\n }\n return defaultValues\n}\n","import { useContext, useEffect, type MouseEventHandler, type PropsWithChildren, type ReactNode } from 'react'\nimport ReactDOM from 'react-dom'\nimport { X } from 'lucide-react'\nimport clsx from 'clsx'\nimport type { Languages } from '../../hooks/useLanguage'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { Tooltip } from '../Tooltip'\nimport { ModalContext } from './ModalRegister'\n\ntype ModalHeaderTranslation = {\n close: string,\n}\n\nconst defaultModalHeaderTranslation: Record<Languages, ModalHeaderTranslation> = {\n en: {\n close: 'Close'\n },\n de: {\n close: 'Schließen'\n }\n}\n\nexport type ModalHeaderProps = {\n onCloseClick?: () => void,\n /** The title of the Modal. If you want to only set the text use `titleText` instead */\n title?: ReactNode,\n /** The title text of the Modal. If you want to set a custom title use `title` instead */\n titleText?: string,\n /** The description of the Modal. If you want to only set the text use `descriptionText` instead */\n description?: ReactNode,\n /** The description text of the Modal. If you want to set a custom description use `description` instead */\n descriptionText?: string,\n}\n\n/**\n * A default Header to be used by modals to have a uniform design\n */\nexport const ModalHeader = ({\n overwriteTranslation,\n onCloseClick,\n title,\n titleText = '',\n description,\n descriptionText = ''\n }: PropsForTranslation<ModalHeaderTranslation, ModalHeaderProps>) => {\n const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation)\n const hasTitleRow = !!title || !!titleText || !!onCloseClick\n const titleRow = (\n <div className=\"row justify-between items-start gap-x-8\">\n {title ?? (\n <span className={clsx('textstyle-title-lg', {\n 'mb-1': description || descriptionText,\n })}>\n {titleText}\n </span>\n )}\n {!!onCloseClick && (\n <Tooltip tooltip={translation.close}>\n <button className=\"row bg-gray-200 hover:bg-gray-300 rounded-md p-1\" onClick={onCloseClick}>\n <X/>\n </button>\n </Tooltip>\n )}\n </div>\n )\n\n return (\n <div className=\"col\">\n {hasTitleRow && (titleRow)}\n {description ?? (descriptionText && (<span className=\"textstyle-description\">{descriptionText}</span>))}\n </div>\n )\n}\n\nexport const modalRootName = 'modal-root'\n\nexport type ModalProps = {\n id: string,\n isOpen: boolean,\n onBackgroundClick?: MouseEventHandler<HTMLDivElement>,\n backgroundClassName?: string,\n modalClassName?: string,\n containerClassName?: string,\n} & ModalHeaderProps\n\n/**\n * A Generic Modal Window\n *\n * The state needs to be managed by the parent of this component\n *\n * DO NOT Conditionally render this always use the isOpen to ensure that the ModalRegister is working properly\n */\nexport const Modal = ({\n children,\n id,\n isOpen,\n onBackgroundClick,\n backgroundClassName = '',\n modalClassName = '',\n containerClassName = '',\n ...modalHeaderProps\n }: PropsWithChildren<ModalProps>) => {\n const modalRoot = typeof window !== 'undefined' ? document.getElementById(modalRootName) : null\n const {\n register,\n addToRegister,\n removeFromRegister\n } = useContext(ModalContext)\n\n if (!id) {\n console.error('the id cannot be empty')\n }\n\n useEffect(() => {\n if (isOpen) {\n addToRegister(id)\n } else {\n removeFromRegister(id)\n }\n }, [addToRegister, id, removeFromRegister, isOpen])\n\n if (modalRoot === null || !isOpen) return null\n\n const isLast = register.length < 1 || register[register.length - 1] === id\n const isSecondLast = register.length < 2 || register[register.length - 2] === id\n\n return ReactDOM.createPortal(\n <div className={clsx('fixed inset-0 overflow-y-auto z-[99]', containerClassName)} id={id}>\n {isLast && (\n <div\n className={clsx('fixed inset-0 h-screen w-screen', backgroundClassName, {\n 'bg-black/70': isLast && register.length === 1,\n })}\n onClick={onBackgroundClick}\n />\n )}\n <div\n className={clsx('fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-white text-black rounded-xl shadow-xl', modalClassName)}>\n <ModalHeader {...modalHeaderProps} />\n {children}\n </div>\n {!isLast && (\n <div\n className={clsx('fixed inset-0 h-screen w-screen', backgroundClassName, {\n 'bg-black/70': isSecondLast && register.length > 1,\n })}\n />\n )}\n </div>,\n modalRoot,\n id\n )\n}\n","import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n","import type { CSSProperties, PropsWithChildren, ReactNode } from 'react'\nimport { useHoverState } from '../hooks/useHoverState'\nimport { clsx } from 'clsx'\n\ntype Position = 'top' | 'bottom' | 'left' | 'right'\n\nexport type TooltipProps = PropsWithChildren<{\n tooltip: string | ReactNode,\n /**\n * Number of milliseconds until the tooltip appears\n *\n * defaults to 1000ms\n */\n animationDelay?: number,\n /**\n * Class names of additional styling properties for the tooltip\n */\n tooltipClassName?: string,\n /**\n * Class names of additional styling properties for the container from which the tooltip will be created\n */\n containerClassName?: string,\n position?: Position,\n zIndex?: number,\n}>\n\n/**\n * A Component for showing a tooltip when hovering over Content\n * @param tooltip The tooltip to show can be a text or any ReactNode\n * @param children The Content for which the tooltip should be created\n * @param animationDelay The delay before the tooltip appears\n * @param tooltipClassName Additional ClassNames for the Container of the tooltip\n * @param containerClassName Additional ClassNames for the Container holding the content\n * @param position The direction of the tooltip relative to the Container\n * @param zIndex The z Index of the tooltip (you may require this when stacking modals)\n * @constructor\n */\nexport const Tooltip = ({\n tooltip,\n children,\n animationDelay = 650,\n tooltipClassName = '',\n containerClassName = '',\n position = 'bottom',\n zIndex = 10,\n }: TooltipProps) => {\n const { isHovered, handlers } = useHoverState()\n\n const positionClasses = {\n top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,\n bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,\n left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,\n right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`\n }\n\n const triangleSize = 6\n const triangleClasses = {\n top: `top-full left-1/2 -translate-x-1/2 border-t-gray-600 border-l-transparent border-r-transparent`,\n bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-gray-600 border-l-transparent border-r-transparent`,\n left: `left-full top-1/2 -translate-y-1/2 border-l-gray-600 border-t-transparent border-b-transparent`,\n right: `right-full top-1/2 -translate-y-1/2 border-r-gray-600 border-t-transparent border-b-transparent`\n }\n\n const triangleStyle: Record<Position, CSSProperties> = {\n top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },\n bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },\n left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },\n right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }\n }\n\n return (\n <div\n className={clsx('relative inline-block', containerClassName)}\n {...handlers}\n >\n {children}\n {isHovered && (\n <div\n className={clsx(`opacity-0 absolute text-black text-xs font-semibold text-gray-600 px-2 py-1 rounded whitespace-nowrap border-2 border-gray-600\n animate-tooltip-fade-in shadow-lg bg-gray-100`, positionClasses[position], tooltipClassName)}\n style={{ zIndex, animationDelay: animationDelay + 'ms' }}\n >\n {tooltip}\n <div\n className={clsx(`absolute w-0 h-0`, triangleClasses[position])}\n style={{ ...triangleStyle[position], zIndex }}\n />\n </div>\n )}\n </div>\n )\n}\n","import type { PropsWithChildren } from 'react'\nimport { createContext, useState } from 'react'\nimport { noop } from '../../util/noop'\n\nexport type ModalContextType = {\n register: string[],\n addToRegister: (id: string) => void,\n removeFromRegister: (id: string) => void,\n}\nexport const ModalContext = createContext<ModalContextType>({\n register: [],\n addToRegister: noop,\n removeFromRegister: noop,\n})\n\n/**\n * A Simple Wrapper for the context\n */\nexport const ModalRegister = ({\n children\n}: PropsWithChildren) => {\n const [register, setRegister] = useState<string[]>([])\n\n const inRegister = (id: string) => {\n return !!register.find(value => value === id)\n }\n\n const addToRegister = (id: string) => {\n if (!inRegister(id)) {\n setRegister([...register, id])\n }\n }\n\n const removeFromRegister = (id: string) => {\n if (inRegister(id)) {\n setRegister(register.filter(value => value !== id))\n }\n }\n\n return (\n <ModalContext.Provider value={{ register, addToRegister, removeFromRegister }}>\n {children}\n </ModalContext.Provider>\n )\n}\n","export const noop = () => undefined\n","import type { PropsWithChildren } from 'react'\nimport type { SolidButtonColor } from '../Button'\nimport { SolidButton } from '../Button'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { Modal, type ModalProps } from './Modal'\n\ntype ConfirmDialogTranslation = {\n confirm: string,\n cancel: string,\n decline: string,\n}\n\nexport type ConfirmDialogType = 'positive' | 'negative' | 'neutral'\n\nconst defaultConfirmDialogTranslation = {\n en: {\n confirm: 'Confirm',\n cancel: 'Cancel',\n decline: 'Decline'\n },\n de: {\n confirm: 'Bestätigen',\n cancel: 'Abbrechen',\n decline: 'Ablehnen'\n }\n}\n\nexport type ButtonOverwriteType = {\n text?: string,\n color?: SolidButtonColor,\n disabled?: boolean,\n}\n\nexport type ConfirmDialogProps = ModalProps & {\n isShowingDecline?: boolean,\n requireAnswer?: boolean,\n onCancel?: () => void,\n onConfirm: () => void,\n onDecline?: () => void,\n confirmType?: ConfirmDialogType,\n /**\n * Order: Cancel, Decline, Confirm\n */\n buttonOverwrites?: [ButtonOverwriteType, ButtonOverwriteType, ButtonOverwriteType],\n}\n\n/**\n * A Dialog for asking the user for Confirmation\n *\n * To require an answer omit the onBackgroundClick\n */\nexport const ConfirmDialog = ({\n overwriteTranslation,\n children,\n onCancel,\n onConfirm,\n onDecline,\n confirmType = 'positive',\n buttonOverwrites,\n ...restProps\n}: PropsForTranslation<ConfirmDialogTranslation, PropsWithChildren<ConfirmDialogProps>>) => {\n const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation)\n\n const mapping: Record<ConfirmDialogType, SolidButtonColor> = {\n neutral: 'primary',\n negative: 'negative',\n positive: 'positive'\n }\n\n return (\n <Modal {...restProps}>\n {children}\n <div className=\"row mt-3 gap-x-4 justify-end\">\n {onCancel && (\n <SolidButton\n color={buttonOverwrites?.[0].color ?? 'primary'}\n onClick={onCancel}\n disabled={buttonOverwrites?.[0].disabled ?? false}\n >\n {buttonOverwrites?.[0].text ?? translation.cancel}\n </SolidButton>\n )}\n {onDecline && (\n <SolidButton\n color={buttonOverwrites?.[1].color ?? 'negative'}\n onClick={onDecline}\n\n disabled={buttonOverwrites?.[1].disabled ?? false}\n >\n {buttonOverwrites?.[1].text ?? translation.decline}\n </SolidButton>\n )}\n <SolidButton\n autoFocus\n color={buttonOverwrites?.[2].color ?? mapping[confirmType]}\n onClick={onConfirm}\n disabled={buttonOverwrites?.[2].disabled ?? false}\n >\n {buttonOverwrites?.[2].text ?? translation.confirm}\n </SolidButton>\n </div>\n </Modal>\n )\n}\n"],"mappings":";AACA,OAAO,UAAU;AA0Eb,SAcI,KAdJ;AAxDG,IAAM,qBAAkD;AAAA,EAC7D,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AAsBA,IAAM,cAAc,CAAC;AAAA,EACE;AAAA,EACA,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAwB;AAC3C,QAAM,eAAe;AAAA,IACnB,SAAS;AAAA,IACT,WAAW;AAAA,IACX,UAAU;AAAA,IACV,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,EACZ,EAAE,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AAAA,MAC7C;AAAA,OACF;AAAA,KACF;AAEJ;","names":["useEffect","useState","jsx","useContext","useEffect","clsx","useEffect","useState","clsx","jsx","jsxs","createContext","useState","jsx","createContext","jsx","jsxs","clsx","useContext","useEffect","jsx","jsxs"]}
@@ -1,23 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { PropsWithChildren } from 'react';
3
- import { PropsForTranslation } from '../../hooks/useTranslation.mjs';
4
- import { ModalProps } from './Modal.mjs';
5
- import '../../hooks/useLanguage.mjs';
6
-
7
- type DiscardChangesDialogTranslation = {
8
- save: string;
9
- cancel: string;
10
- dontSave: string;
11
- title: string;
12
- description: string;
13
- };
14
- type DiscardChangesDialogProps = ModalProps & {
15
- isShowingDecline?: boolean;
16
- requireAnswer?: boolean;
17
- onCancel: () => void;
18
- onSave: () => void;
19
- onDontSave: () => void;
20
- };
21
- declare const DiscardChangesDialog: ({ overwriteTranslation, children, title, description, onCancel, onSave, onDontSave, ...modalProps }: PropsForTranslation<DiscardChangesDialogTranslation, PropsWithChildren<DiscardChangesDialogProps>>) => react_jsx_runtime.JSX.Element;
22
-
23
- export { DiscardChangesDialog };
@@ -1,23 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { PropsWithChildren } from 'react';
3
- import { PropsForTranslation } from '../../hooks/useTranslation.js';
4
- import { ModalProps } from './Modal.js';
5
- import '../../hooks/useLanguage.js';
6
-
7
- type DiscardChangesDialogTranslation = {
8
- save: string;
9
- cancel: string;
10
- dontSave: string;
11
- title: string;
12
- description: string;
13
- };
14
- type DiscardChangesDialogProps = ModalProps & {
15
- isShowingDecline?: boolean;
16
- requireAnswer?: boolean;
17
- onCancel: () => void;
18
- onSave: () => void;
19
- onDontSave: () => void;
20
- };
21
- declare const DiscardChangesDialog: ({ overwriteTranslation, children, title, description, onCancel, onSave, onDontSave, ...modalProps }: PropsForTranslation<DiscardChangesDialogTranslation, PropsWithChildren<DiscardChangesDialogProps>>) => react_jsx_runtime.JSX.Element;
22
-
23
- export { DiscardChangesDialog };