@helpwave/hightide 0.1.46 → 0.1.48

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 (785) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.mts +2014 -0
  3. package/dist/index.d.ts +2014 -113
  4. package/dist/index.js +1619 -1359
  5. package/dist/index.js.map +1 -1
  6. package/dist/{components/index.js → index.mjs} +1216 -410
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/style/globals.css +24 -0
  9. package/package.json +3 -5
  10. package/dist/coloring/index.cjs +0 -85
  11. package/dist/coloring/index.cjs.map +0 -1
  12. package/dist/coloring/index.d.cts +0 -2
  13. package/dist/coloring/index.d.ts +0 -2
  14. package/dist/coloring/index.js +0 -48
  15. package/dist/coloring/index.js.map +0 -1
  16. package/dist/coloring/shading.cjs +0 -81
  17. package/dist/coloring/shading.cjs.map +0 -1
  18. package/dist/coloring/shading.d.cts +0 -5
  19. package/dist/coloring/shading.d.ts +0 -5
  20. package/dist/coloring/shading.js +0 -47
  21. package/dist/coloring/shading.js.map +0 -1
  22. package/dist/coloring/types.cjs +0 -30
  23. package/dist/coloring/types.cjs.map +0 -1
  24. package/dist/coloring/types.d.cts +0 -13
  25. package/dist/coloring/types.d.ts +0 -13
  26. package/dist/coloring/types.js +0 -6
  27. package/dist/coloring/types.js.map +0 -1
  28. package/dist/components/branding/HelpwaveBadge.cjs +0 -140
  29. package/dist/components/branding/HelpwaveBadge.cjs.map +0 -1
  30. package/dist/components/branding/HelpwaveBadge.d.cts +0 -13
  31. package/dist/components/branding/HelpwaveBadge.d.ts +0 -13
  32. package/dist/components/branding/HelpwaveBadge.js +0 -104
  33. package/dist/components/branding/HelpwaveBadge.js.map +0 -1
  34. package/dist/components/branding/index.cjs +0 -140
  35. package/dist/components/branding/index.cjs.map +0 -1
  36. package/dist/components/branding/index.d.cts +0 -3
  37. package/dist/components/branding/index.d.ts +0 -3
  38. package/dist/components/branding/index.js +0 -104
  39. package/dist/components/branding/index.js.map +0 -1
  40. package/dist/components/date/DatePicker.cjs +0 -1318
  41. package/dist/components/date/DatePicker.cjs.map +0 -1
  42. package/dist/components/date/DatePicker.d.cts +0 -26
  43. package/dist/components/date/DatePicker.d.ts +0 -26
  44. package/dist/components/date/DatePicker.js +0 -1283
  45. package/dist/components/date/DatePicker.js.map +0 -1
  46. package/dist/components/date/DayPicker.cjs +0 -261
  47. package/dist/components/date/DayPicker.cjs.map +0 -1
  48. package/dist/components/date/DayPicker.d.cts +0 -20
  49. package/dist/components/date/DayPicker.d.ts +0 -20
  50. package/dist/components/date/DayPicker.js +0 -224
  51. package/dist/components/date/DayPicker.js.map +0 -1
  52. package/dist/components/date/TimeDisplay.cjs +0 -638
  53. package/dist/components/date/TimeDisplay.cjs.map +0 -1
  54. package/dist/components/date/TimeDisplay.d.cts +0 -13
  55. package/dist/components/date/TimeDisplay.d.ts +0 -13
  56. package/dist/components/date/TimeDisplay.js +0 -612
  57. package/dist/components/date/TimeDisplay.js.map +0 -1
  58. package/dist/components/date/TimePicker.cjs +0 -237
  59. package/dist/components/date/TimePicker.cjs.map +0 -1
  60. package/dist/components/date/TimePicker.d.cts +0 -15
  61. package/dist/components/date/TimePicker.d.ts +0 -15
  62. package/dist/components/date/TimePicker.js +0 -202
  63. package/dist/components/date/TimePicker.js.map +0 -1
  64. package/dist/components/date/YearMonthPicker.cjs +0 -536
  65. package/dist/components/date/YearMonthPicker.cjs.map +0 -1
  66. package/dist/components/date/YearMonthPicker.d.cts +0 -15
  67. package/dist/components/date/YearMonthPicker.d.ts +0 -15
  68. package/dist/components/date/YearMonthPicker.js +0 -501
  69. package/dist/components/date/YearMonthPicker.js.map +0 -1
  70. package/dist/components/date/index.cjs +0 -1556
  71. package/dist/components/date/index.cjs.map +0 -1
  72. package/dist/components/date/index.d.cts +0 -7
  73. package/dist/components/date/index.d.ts +0 -7
  74. package/dist/components/date/index.js +0 -1512
  75. package/dist/components/date/index.js.map +0 -1
  76. package/dist/components/dialog/ConfirmDialog.cjs +0 -1165
  77. package/dist/components/dialog/ConfirmDialog.cjs.map +0 -1
  78. package/dist/components/dialog/ConfirmDialog.d.cts +0 -29
  79. package/dist/components/dialog/ConfirmDialog.d.ts +0 -29
  80. package/dist/components/dialog/ConfirmDialog.js +0 -1129
  81. package/dist/components/dialog/ConfirmDialog.js.map +0 -1
  82. package/dist/components/dialog/Dialog.cjs +0 -1108
  83. package/dist/components/dialog/Dialog.cjs.map +0 -1
  84. package/dist/components/dialog/Dialog.d.cts +0 -27
  85. package/dist/components/dialog/Dialog.d.ts +0 -27
  86. package/dist/components/dialog/Dialog.js +0 -1075
  87. package/dist/components/dialog/Dialog.js.map +0 -1
  88. package/dist/components/dialog/DiscardChangesDialog.cjs +0 -1192
  89. package/dist/components/dialog/DiscardChangesDialog.cjs.map +0 -1
  90. package/dist/components/dialog/DiscardChangesDialog.d.cts +0 -18
  91. package/dist/components/dialog/DiscardChangesDialog.d.ts +0 -18
  92. package/dist/components/dialog/DiscardChangesDialog.js +0 -1156
  93. package/dist/components/dialog/DiscardChangesDialog.js.map +0 -1
  94. package/dist/components/dialog/InputDialog.cjs +0 -1369
  95. package/dist/components/dialog/InputDialog.cjs.map +0 -1
  96. package/dist/components/dialog/InputDialog.d.cts +0 -17
  97. package/dist/components/dialog/InputDialog.d.ts +0 -17
  98. package/dist/components/dialog/InputDialog.js +0 -1333
  99. package/dist/components/dialog/InputDialog.js.map +0 -1
  100. package/dist/components/dialog/LanguageDialog.cjs +0 -2149
  101. package/dist/components/dialog/LanguageDialog.cjs.map +0 -1
  102. package/dist/components/dialog/LanguageDialog.d.cts +0 -16
  103. package/dist/components/dialog/LanguageDialog.d.ts +0 -16
  104. package/dist/components/dialog/LanguageDialog.js +0 -2124
  105. package/dist/components/dialog/LanguageDialog.js.map +0 -1
  106. package/dist/components/dialog/ThemeDialog.cjs +0 -2188
  107. package/dist/components/dialog/ThemeDialog.cjs.map +0 -1
  108. package/dist/components/dialog/ThemeDialog.d.cts +0 -16
  109. package/dist/components/dialog/ThemeDialog.d.ts +0 -16
  110. package/dist/components/dialog/ThemeDialog.js +0 -2163
  111. package/dist/components/dialog/ThemeDialog.js.map +0 -1
  112. package/dist/components/dialog/index.cjs +0 -2516
  113. package/dist/components/dialog/index.cjs.map +0 -1
  114. package/dist/components/dialog/index.d.cts +0 -11
  115. package/dist/components/dialog/index.d.ts +0 -11
  116. package/dist/components/dialog/index.js +0 -2486
  117. package/dist/components/dialog/index.js.map +0 -1
  118. package/dist/components/form/FormElementWrapper.cjs +0 -167
  119. package/dist/components/form/FormElementWrapper.cjs.map +0 -1
  120. package/dist/components/form/FormElementWrapper.d.cts +0 -35
  121. package/dist/components/form/FormElementWrapper.d.ts +0 -35
  122. package/dist/components/form/FormElementWrapper.js +0 -133
  123. package/dist/components/form/FormElementWrapper.js.map +0 -1
  124. package/dist/components/form/index.cjs +0 -169
  125. package/dist/components/form/index.cjs.map +0 -1
  126. package/dist/components/form/index.d.cts +0 -5
  127. package/dist/components/form/index.d.ts +0 -5
  128. package/dist/components/form/index.js +0 -133
  129. package/dist/components/form/index.js.map +0 -1
  130. package/dist/components/icons-and-geometry/Avatar.cjs +0 -670
  131. package/dist/components/icons-and-geometry/Avatar.cjs.map +0 -1
  132. package/dist/components/icons-and-geometry/Avatar.d.cts +0 -36
  133. package/dist/components/icons-and-geometry/Avatar.d.ts +0 -36
  134. package/dist/components/icons-and-geometry/Avatar.js +0 -663
  135. package/dist/components/icons-and-geometry/Avatar.js.map +0 -1
  136. package/dist/components/icons-and-geometry/Circle.cjs +0 -61
  137. package/dist/components/icons-and-geometry/Circle.cjs.map +0 -1
  138. package/dist/components/icons-and-geometry/Circle.d.cts +0 -10
  139. package/dist/components/icons-and-geometry/Circle.d.ts +0 -10
  140. package/dist/components/icons-and-geometry/Circle.js +0 -27
  141. package/dist/components/icons-and-geometry/Circle.js.map +0 -1
  142. package/dist/components/icons-and-geometry/HelpwaveLogo.cjs +0 -98
  143. package/dist/components/icons-and-geometry/HelpwaveLogo.cjs.map +0 -1
  144. package/dist/components/icons-and-geometry/HelpwaveLogo.d.cts +0 -14
  145. package/dist/components/icons-and-geometry/HelpwaveLogo.d.ts +0 -14
  146. package/dist/components/icons-and-geometry/HelpwaveLogo.js +0 -74
  147. package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +0 -1
  148. package/dist/components/icons-and-geometry/Ring.cjs +0 -333
  149. package/dist/components/icons-and-geometry/Ring.cjs.map +0 -1
  150. package/dist/components/icons-and-geometry/Ring.d.cts +0 -35
  151. package/dist/components/icons-and-geometry/Ring.d.ts +0 -35
  152. package/dist/components/icons-and-geometry/Ring.js +0 -296
  153. package/dist/components/icons-and-geometry/Ring.js.map +0 -1
  154. package/dist/components/icons-and-geometry/Tag.cjs +0 -2945
  155. package/dist/components/icons-and-geometry/Tag.cjs.map +0 -1
  156. package/dist/components/icons-and-geometry/Tag.d.cts +0 -16
  157. package/dist/components/icons-and-geometry/Tag.d.ts +0 -16
  158. package/dist/components/icons-and-geometry/Tag.js +0 -2940
  159. package/dist/components/icons-and-geometry/Tag.js.map +0 -1
  160. package/dist/components/icons-and-geometry/index.cjs +0 -3950
  161. package/dist/components/icons-and-geometry/index.cjs.map +0 -1
  162. package/dist/components/icons-and-geometry/index.d.cts +0 -7
  163. package/dist/components/icons-and-geometry/index.d.ts +0 -7
  164. package/dist/components/icons-and-geometry/index.js +0 -3934
  165. package/dist/components/icons-and-geometry/index.js.map +0 -1
  166. package/dist/components/index.cjs +0 -15692
  167. package/dist/components/index.cjs.map +0 -1
  168. package/dist/components/index.d.cts +0 -78
  169. package/dist/components/index.d.ts +0 -78
  170. package/dist/components/index.js.map +0 -1
  171. package/dist/components/layout/Carousel.cjs +0 -1128
  172. package/dist/components/layout/Carousel.cjs.map +0 -1
  173. package/dist/components/layout/Carousel.d.cts +0 -35
  174. package/dist/components/layout/Carousel.d.ts +0 -35
  175. package/dist/components/layout/Carousel.js +0 -1103
  176. package/dist/components/layout/Carousel.js.map +0 -1
  177. package/dist/components/layout/Chip.cjs +0 -123
  178. package/dist/components/layout/Chip.cjs.map +0 -1
  179. package/dist/components/layout/Chip.d.cts +0 -31
  180. package/dist/components/layout/Chip.d.ts +0 -31
  181. package/dist/components/layout/Chip.js +0 -87
  182. package/dist/components/layout/Chip.js.map +0 -1
  183. package/dist/components/layout/DividerInserter.cjs +0 -59
  184. package/dist/components/layout/DividerInserter.cjs.map +0 -1
  185. package/dist/components/layout/DividerInserter.d.cts +0 -15
  186. package/dist/components/layout/DividerInserter.d.ts +0 -15
  187. package/dist/components/layout/DividerInserter.js +0 -25
  188. package/dist/components/layout/DividerInserter.js.map +0 -1
  189. package/dist/components/layout/Expandable.cjs +0 -171
  190. package/dist/components/layout/Expandable.cjs.map +0 -1
  191. package/dist/components/layout/Expandable.d.cts +0 -67
  192. package/dist/components/layout/Expandable.d.ts +0 -67
  193. package/dist/components/layout/Expandable.js +0 -135
  194. package/dist/components/layout/Expandable.js.map +0 -1
  195. package/dist/components/layout/FAQSection.cjs +0 -421
  196. package/dist/components/layout/FAQSection.cjs.map +0 -1
  197. package/dist/components/layout/FAQSection.d.cts +0 -26
  198. package/dist/components/layout/FAQSection.d.ts +0 -26
  199. package/dist/components/layout/FAQSection.js +0 -387
  200. package/dist/components/layout/FAQSection.js.map +0 -1
  201. package/dist/components/layout/FloatingContainer.cjs +0 -220
  202. package/dist/components/layout/FloatingContainer.cjs.map +0 -1
  203. package/dist/components/layout/FloatingContainer.d.cts +0 -38
  204. package/dist/components/layout/FloatingContainer.d.ts +0 -38
  205. package/dist/components/layout/FloatingContainer.js +0 -196
  206. package/dist/components/layout/FloatingContainer.js.map +0 -1
  207. package/dist/components/layout/ListBox.cjs +0 -339
  208. package/dist/components/layout/ListBox.cjs.map +0 -1
  209. package/dist/components/layout/ListBox.d.cts +0 -44
  210. package/dist/components/layout/ListBox.d.ts +0 -44
  211. package/dist/components/layout/ListBox.js +0 -300
  212. package/dist/components/layout/ListBox.js.map +0 -1
  213. package/dist/components/layout/MarkdownInterpreter.cjs +0 -260
  214. package/dist/components/layout/MarkdownInterpreter.cjs.map +0 -1
  215. package/dist/components/layout/MarkdownInterpreter.d.cts +0 -28
  216. package/dist/components/layout/MarkdownInterpreter.d.ts +0 -28
  217. package/dist/components/layout/MarkdownInterpreter.js +0 -235
  218. package/dist/components/layout/MarkdownInterpreter.js.map +0 -1
  219. package/dist/components/layout/ScrollArea.cjs +0 -1252
  220. package/dist/components/layout/ScrollArea.cjs.map +0 -1
  221. package/dist/components/layout/ScrollArea.d.cts +0 -15
  222. package/dist/components/layout/ScrollArea.d.ts +0 -15
  223. package/dist/components/layout/ScrollArea.js +0 -1216
  224. package/dist/components/layout/ScrollArea.js.map +0 -1
  225. package/dist/components/layout/TextImage.cjs +0 -657
  226. package/dist/components/layout/TextImage.cjs.map +0 -1
  227. package/dist/components/layout/TextImage.d.cts +0 -19
  228. package/dist/components/layout/TextImage.d.ts +0 -19
  229. package/dist/components/layout/TextImage.js +0 -623
  230. package/dist/components/layout/TextImage.js.map +0 -1
  231. package/dist/components/layout/VerticalDivider.cjs +0 -80
  232. package/dist/components/layout/VerticalDivider.cjs.map +0 -1
  233. package/dist/components/layout/VerticalDivider.d.cts +0 -15
  234. package/dist/components/layout/VerticalDivider.d.ts +0 -15
  235. package/dist/components/layout/VerticalDivider.js +0 -56
  236. package/dist/components/layout/VerticalDivider.js.map +0 -1
  237. package/dist/components/layout/index.cjs +0 -3434
  238. package/dist/components/layout/index.cjs.map +0 -1
  239. package/dist/components/layout/index.d.cts +0 -15
  240. package/dist/components/layout/index.d.ts +0 -15
  241. package/dist/components/layout/index.js +0 -3387
  242. package/dist/components/layout/index.js.map +0 -1
  243. package/dist/components/loading-states/ErrorComponent.cjs +0 -622
  244. package/dist/components/loading-states/ErrorComponent.cjs.map +0 -1
  245. package/dist/components/loading-states/ErrorComponent.d.cts +0 -12
  246. package/dist/components/loading-states/ErrorComponent.d.ts +0 -12
  247. package/dist/components/loading-states/ErrorComponent.js +0 -588
  248. package/dist/components/loading-states/ErrorComponent.js.map +0 -1
  249. package/dist/components/loading-states/LoadingAndErrorComponent.cjs +0 -67
  250. package/dist/components/loading-states/LoadingAndErrorComponent.cjs.map +0 -1
  251. package/dist/components/loading-states/LoadingAndErrorComponent.d.cts +0 -20
  252. package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +0 -20
  253. package/dist/components/loading-states/LoadingAndErrorComponent.js +0 -43
  254. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +0 -1
  255. package/dist/components/loading-states/LoadingAnimation.cjs +0 -694
  256. package/dist/components/loading-states/LoadingAnimation.cjs.map +0 -1
  257. package/dist/components/loading-states/LoadingAnimation.d.cts +0 -12
  258. package/dist/components/loading-states/LoadingAnimation.d.ts +0 -12
  259. package/dist/components/loading-states/LoadingAnimation.js +0 -658
  260. package/dist/components/loading-states/LoadingAnimation.js.map +0 -1
  261. package/dist/components/loading-states/LoadingButton.cjs +0 -257
  262. package/dist/components/loading-states/LoadingButton.cjs.map +0 -1
  263. package/dist/components/loading-states/LoadingButton.d.cts +0 -10
  264. package/dist/components/loading-states/LoadingButton.d.ts +0 -10
  265. package/dist/components/loading-states/LoadingButton.js +0 -223
  266. package/dist/components/loading-states/LoadingButton.js.map +0 -1
  267. package/dist/components/loading-states/LoadingContainer.cjs +0 -34
  268. package/dist/components/loading-states/LoadingContainer.cjs.map +0 -1
  269. package/dist/components/loading-states/LoadingContainer.d.cts +0 -8
  270. package/dist/components/loading-states/LoadingContainer.d.ts +0 -8
  271. package/dist/components/loading-states/LoadingContainer.js +0 -10
  272. package/dist/components/loading-states/LoadingContainer.js.map +0 -1
  273. package/dist/components/loading-states/ProgressIndicator.cjs +0 -83
  274. package/dist/components/loading-states/ProgressIndicator.cjs.map +0 -1
  275. package/dist/components/loading-states/ProgressIndicator.d.cts +0 -24
  276. package/dist/components/loading-states/ProgressIndicator.d.ts +0 -24
  277. package/dist/components/loading-states/ProgressIndicator.js +0 -59
  278. package/dist/components/loading-states/ProgressIndicator.js.map +0 -1
  279. package/dist/components/loading-states/index.cjs +0 -966
  280. package/dist/components/loading-states/index.cjs.map +0 -1
  281. package/dist/components/loading-states/index.d.cts +0 -9
  282. package/dist/components/loading-states/index.d.ts +0 -9
  283. package/dist/components/loading-states/index.js +0 -925
  284. package/dist/components/loading-states/index.js.map +0 -1
  285. package/dist/components/navigation/BreadCrumb.cjs +0 -3516
  286. package/dist/components/navigation/BreadCrumb.cjs.map +0 -1
  287. package/dist/components/navigation/BreadCrumb.d.cts +0 -20
  288. package/dist/components/navigation/BreadCrumb.d.ts +0 -20
  289. package/dist/components/navigation/BreadCrumb.js +0 -3511
  290. package/dist/components/navigation/BreadCrumb.js.map +0 -1
  291. package/dist/components/navigation/Navigation.cjs +0 -4041
  292. package/dist/components/navigation/Navigation.cjs.map +0 -1
  293. package/dist/components/navigation/Navigation.d.cts +0 -21
  294. package/dist/components/navigation/Navigation.d.ts +0 -21
  295. package/dist/components/navigation/Navigation.js +0 -4035
  296. package/dist/components/navigation/Navigation.js.map +0 -1
  297. package/dist/components/navigation/Pagination.cjs +0 -1007
  298. package/dist/components/navigation/Pagination.cjs.map +0 -1
  299. package/dist/components/navigation/Pagination.d.cts +0 -16
  300. package/dist/components/navigation/Pagination.d.ts +0 -16
  301. package/dist/components/navigation/Pagination.js +0 -973
  302. package/dist/components/navigation/Pagination.js.map +0 -1
  303. package/dist/components/navigation/StepperBar.cjs +0 -903
  304. package/dist/components/navigation/StepperBar.cjs.map +0 -1
  305. package/dist/components/navigation/StepperBar.d.cts +0 -23
  306. package/dist/components/navigation/StepperBar.d.ts +0 -23
  307. package/dist/components/navigation/StepperBar.js +0 -868
  308. package/dist/components/navigation/StepperBar.js.map +0 -1
  309. package/dist/components/navigation/index.cjs +0 -5035
  310. package/dist/components/navigation/index.cjs.map +0 -1
  311. package/dist/components/navigation/index.d.cts +0 -6
  312. package/dist/components/navigation/index.d.ts +0 -6
  313. package/dist/components/navigation/index.js +0 -5023
  314. package/dist/components/navigation/index.js.map +0 -1
  315. package/dist/components/properties/CheckboxProperty.cjs +0 -1736
  316. package/dist/components/properties/CheckboxProperty.cjs.map +0 -1
  317. package/dist/components/properties/CheckboxProperty.d.cts +0 -14
  318. package/dist/components/properties/CheckboxProperty.d.ts +0 -14
  319. package/dist/components/properties/CheckboxProperty.js +0 -1702
  320. package/dist/components/properties/CheckboxProperty.js.map +0 -1
  321. package/dist/components/properties/DateProperty.cjs +0 -1119
  322. package/dist/components/properties/DateProperty.cjs.map +0 -1
  323. package/dist/components/properties/DateProperty.d.cts +0 -16
  324. package/dist/components/properties/DateProperty.d.ts +0 -16
  325. package/dist/components/properties/DateProperty.js +0 -1085
  326. package/dist/components/properties/DateProperty.js.map +0 -1
  327. package/dist/components/properties/MultiSelectProperty.cjs +0 -2058
  328. package/dist/components/properties/MultiSelectProperty.cjs.map +0 -1
  329. package/dist/components/properties/MultiSelectProperty.d.cts +0 -14
  330. package/dist/components/properties/MultiSelectProperty.d.ts +0 -14
  331. package/dist/components/properties/MultiSelectProperty.js +0 -2035
  332. package/dist/components/properties/MultiSelectProperty.js.map +0 -1
  333. package/dist/components/properties/NumberProperty.cjs +0 -1125
  334. package/dist/components/properties/NumberProperty.cjs.map +0 -1
  335. package/dist/components/properties/NumberProperty.d.cts +0 -16
  336. package/dist/components/properties/NumberProperty.d.ts +0 -16
  337. package/dist/components/properties/NumberProperty.js +0 -1091
  338. package/dist/components/properties/NumberProperty.js.map +0 -1
  339. package/dist/components/properties/PropertyBase.cjs +0 -875
  340. package/dist/components/properties/PropertyBase.cjs.map +0 -1
  341. package/dist/components/properties/PropertyBase.d.cts +0 -22
  342. package/dist/components/properties/PropertyBase.d.ts +0 -22
  343. package/dist/components/properties/PropertyBase.js +0 -841
  344. package/dist/components/properties/PropertyBase.js.map +0 -1
  345. package/dist/components/properties/SelectProperty.cjs +0 -2058
  346. package/dist/components/properties/SelectProperty.cjs.map +0 -1
  347. package/dist/components/properties/SelectProperty.d.cts +0 -16
  348. package/dist/components/properties/SelectProperty.d.ts +0 -16
  349. package/dist/components/properties/SelectProperty.js +0 -2035
  350. package/dist/components/properties/SelectProperty.js.map +0 -1
  351. package/dist/components/properties/TextProperty.cjs +0 -1033
  352. package/dist/components/properties/TextProperty.cjs.map +0 -1
  353. package/dist/components/properties/TextProperty.d.cts +0 -15
  354. package/dist/components/properties/TextProperty.d.ts +0 -15
  355. package/dist/components/properties/TextProperty.js +0 -999
  356. package/dist/components/properties/TextProperty.js.map +0 -1
  357. package/dist/components/properties/index.cjs +0 -3383
  358. package/dist/components/properties/index.cjs.map +0 -1
  359. package/dist/components/properties/index.d.cts +0 -9
  360. package/dist/components/properties/index.d.ts +0 -9
  361. package/dist/components/properties/index.js +0 -3352
  362. package/dist/components/properties/index.js.map +0 -1
  363. package/dist/components/table/FillerRowElement.cjs +0 -36
  364. package/dist/components/table/FillerRowElement.cjs.map +0 -1
  365. package/dist/components/table/FillerRowElement.d.cts +0 -8
  366. package/dist/components/table/FillerRowElement.d.ts +0 -8
  367. package/dist/components/table/FillerRowElement.js +0 -12
  368. package/dist/components/table/FillerRowElement.js.map +0 -1
  369. package/dist/components/table/Filter.cjs +0 -41
  370. package/dist/components/table/Filter.cjs.map +0 -1
  371. package/dist/components/table/Filter.d.cts +0 -5
  372. package/dist/components/table/Filter.d.ts +0 -5
  373. package/dist/components/table/Filter.js +0 -17
  374. package/dist/components/table/Filter.js.map +0 -1
  375. package/dist/components/table/Table.cjs +0 -2678
  376. package/dist/components/table/Table.cjs.map +0 -1
  377. package/dist/components/table/Table.d.cts +0 -42
  378. package/dist/components/table/Table.d.ts +0 -42
  379. package/dist/components/table/Table.js +0 -2649
  380. package/dist/components/table/Table.js.map +0 -1
  381. package/dist/components/table/TableCell.cjs +0 -37
  382. package/dist/components/table/TableCell.cjs.map +0 -1
  383. package/dist/components/table/TableCell.d.cts +0 -9
  384. package/dist/components/table/TableCell.d.ts +0 -9
  385. package/dist/components/table/TableCell.js +0 -13
  386. package/dist/components/table/TableCell.js.map +0 -1
  387. package/dist/components/table/TableFilterButton.cjs +0 -1269
  388. package/dist/components/table/TableFilterButton.cjs.map +0 -1
  389. package/dist/components/table/TableFilterButton.d.cts +0 -11
  390. package/dist/components/table/TableFilterButton.d.ts +0 -11
  391. package/dist/components/table/TableFilterButton.js +0 -1233
  392. package/dist/components/table/TableFilterButton.js.map +0 -1
  393. package/dist/components/table/TableSortButton.cjs +0 -206
  394. package/dist/components/table/TableSortButton.cjs.map +0 -1
  395. package/dist/components/table/TableSortButton.d.cts +0 -15
  396. package/dist/components/table/TableSortButton.d.ts +0 -15
  397. package/dist/components/table/TableSortButton.js +0 -172
  398. package/dist/components/table/TableSortButton.js.map +0 -1
  399. package/dist/components/table/index.cjs +0 -2690
  400. package/dist/components/table/index.cjs.map +0 -1
  401. package/dist/components/table/index.d.cts +0 -10
  402. package/dist/components/table/index.d.ts +0 -10
  403. package/dist/components/table/index.js +0 -2654
  404. package/dist/components/table/index.js.map +0 -1
  405. package/dist/components/user-action/Button.cjs +0 -308
  406. package/dist/components/user-action/Button.cjs.map +0 -1
  407. package/dist/components/user-action/Button.d.cts +0 -104
  408. package/dist/components/user-action/Button.d.ts +0 -104
  409. package/dist/components/user-action/Button.js +0 -268
  410. package/dist/components/user-action/Button.js.map +0 -1
  411. package/dist/components/user-action/Checkbox.cjs +0 -878
  412. package/dist/components/user-action/Checkbox.cjs.map +0 -1
  413. package/dist/components/user-action/Checkbox.d.cts +0 -25
  414. package/dist/components/user-action/Checkbox.d.ts +0 -25
  415. package/dist/components/user-action/Checkbox.js +0 -843
  416. package/dist/components/user-action/Checkbox.js.map +0 -1
  417. package/dist/components/user-action/CopyToClipboardWrapper.cjs +0 -695
  418. package/dist/components/user-action/CopyToClipboardWrapper.cjs.map +0 -1
  419. package/dist/components/user-action/CopyToClipboardWrapper.d.cts +0 -30
  420. package/dist/components/user-action/CopyToClipboardWrapper.d.ts +0 -30
  421. package/dist/components/user-action/CopyToClipboardWrapper.js +0 -671
  422. package/dist/components/user-action/CopyToClipboardWrapper.js.map +0 -1
  423. package/dist/components/user-action/DateAndTimePicker.cjs +0 -1492
  424. package/dist/components/user-action/DateAndTimePicker.cjs.map +0 -1
  425. package/dist/components/user-action/DateAndTimePicker.d.cts +0 -25
  426. package/dist/components/user-action/DateAndTimePicker.d.ts +0 -25
  427. package/dist/components/user-action/DateAndTimePicker.js +0 -1458
  428. package/dist/components/user-action/DateAndTimePicker.js.map +0 -1
  429. package/dist/components/user-action/Label.cjs +0 -53
  430. package/dist/components/user-action/Label.cjs.map +0 -1
  431. package/dist/components/user-action/Label.d.cts +0 -14
  432. package/dist/components/user-action/Label.d.ts +0 -14
  433. package/dist/components/user-action/Label.js +0 -19
  434. package/dist/components/user-action/Label.js.map +0 -1
  435. package/dist/components/user-action/Menu.cjs +0 -282
  436. package/dist/components/user-action/Menu.cjs.map +0 -1
  437. package/dist/components/user-action/Menu.d.cts +0 -35
  438. package/dist/components/user-action/Menu.d.ts +0 -35
  439. package/dist/components/user-action/Menu.js +0 -247
  440. package/dist/components/user-action/Menu.js.map +0 -1
  441. package/dist/components/user-action/ScrollPicker.cjs +0 -301
  442. package/dist/components/user-action/ScrollPicker.cjs.map +0 -1
  443. package/dist/components/user-action/ScrollPicker.d.cts +0 -15
  444. package/dist/components/user-action/ScrollPicker.d.ts +0 -15
  445. package/dist/components/user-action/ScrollPicker.js +0 -267
  446. package/dist/components/user-action/ScrollPicker.js.map +0 -1
  447. package/dist/components/user-action/SearchBar.cjs +0 -956
  448. package/dist/components/user-action/SearchBar.cjs.map +0 -1
  449. package/dist/components/user-action/SearchBar.d.cts +0 -13
  450. package/dist/components/user-action/SearchBar.d.ts +0 -13
  451. package/dist/components/user-action/SearchBar.js +0 -920
  452. package/dist/components/user-action/SearchBar.js.map +0 -1
  453. package/dist/components/user-action/Textarea.cjs +0 -231
  454. package/dist/components/user-action/Textarea.cjs.map +0 -1
  455. package/dist/components/user-action/Textarea.d.cts +0 -41
  456. package/dist/components/user-action/Textarea.d.ts +0 -41
  457. package/dist/components/user-action/Textarea.js +0 -195
  458. package/dist/components/user-action/Textarea.js.map +0 -1
  459. package/dist/components/user-action/Tooltip.cjs +0 -139
  460. package/dist/components/user-action/Tooltip.cjs.map +0 -1
  461. package/dist/components/user-action/Tooltip.d.cts +0 -37
  462. package/dist/components/user-action/Tooltip.d.ts +0 -37
  463. package/dist/components/user-action/Tooltip.js +0 -113
  464. package/dist/components/user-action/Tooltip.js.map +0 -1
  465. package/dist/components/user-action/index.cjs +0 -4564
  466. package/dist/components/user-action/index.cjs.map +0 -1
  467. package/dist/components/user-action/index.d.cts +0 -26
  468. package/dist/components/user-action/index.d.ts +0 -26
  469. package/dist/components/user-action/index.js +0 -4503
  470. package/dist/components/user-action/index.js.map +0 -1
  471. package/dist/components/user-action/input/Input.cjs +0 -260
  472. package/dist/components/user-action/input/Input.cjs.map +0 -1
  473. package/dist/components/user-action/input/Input.d.cts +0 -37
  474. package/dist/components/user-action/input/Input.d.ts +0 -37
  475. package/dist/components/user-action/input/Input.js +0 -225
  476. package/dist/components/user-action/input/Input.js.map +0 -1
  477. package/dist/components/user-action/input/InsideLabelInput.cjs +0 -312
  478. package/dist/components/user-action/input/InsideLabelInput.cjs.map +0 -1
  479. package/dist/components/user-action/input/InsideLabelInput.d.cts +0 -20
  480. package/dist/components/user-action/input/InsideLabelInput.d.ts +0 -20
  481. package/dist/components/user-action/input/InsideLabelInput.js +0 -277
  482. package/dist/components/user-action/input/InsideLabelInput.js.map +0 -1
  483. package/dist/components/user-action/input/ToggleableInput.cjs +0 -315
  484. package/dist/components/user-action/input/ToggleableInput.cjs.map +0 -1
  485. package/dist/components/user-action/input/ToggleableInput.d.cts +0 -22
  486. package/dist/components/user-action/input/ToggleableInput.d.ts +0 -22
  487. package/dist/components/user-action/input/ToggleableInput.js +0 -280
  488. package/dist/components/user-action/input/ToggleableInput.js.map +0 -1
  489. package/dist/components/user-action/input/index.cjs +0 -403
  490. package/dist/components/user-action/input/index.cjs.map +0 -1
  491. package/dist/components/user-action/input/index.d.cts +0 -6
  492. package/dist/components/user-action/input/index.d.ts +0 -6
  493. package/dist/components/user-action/input/index.js +0 -362
  494. package/dist/components/user-action/input/index.js.map +0 -1
  495. package/dist/components/user-action/select/Select.cjs +0 -1970
  496. package/dist/components/user-action/select/Select.cjs.map +0 -1
  497. package/dist/components/user-action/select/Select.d.cts +0 -104
  498. package/dist/components/user-action/select/Select.d.ts +0 -104
  499. package/dist/components/user-action/select/Select.js +0 -1937
  500. package/dist/components/user-action/select/Select.js.map +0 -1
  501. package/dist/components/user-action/select/index.cjs +0 -1972
  502. package/dist/components/user-action/select/index.cjs.map +0 -1
  503. package/dist/components/user-action/select/index.d.cts +0 -4
  504. package/dist/components/user-action/select/index.d.ts +0 -4
  505. package/dist/components/user-action/select/index.js +0 -1937
  506. package/dist/components/user-action/select/index.js.map +0 -1
  507. package/dist/components/utils/FocusTrap.cjs +0 -252
  508. package/dist/components/utils/FocusTrap.cjs.map +0 -1
  509. package/dist/components/utils/FocusTrap.d.cts +0 -28
  510. package/dist/components/utils/FocusTrap.d.ts +0 -28
  511. package/dist/components/utils/FocusTrap.js +0 -229
  512. package/dist/components/utils/FocusTrap.js.map +0 -1
  513. package/dist/components/utils/Transition.cjs +0 -74
  514. package/dist/components/utils/Transition.cjs.map +0 -1
  515. package/dist/components/utils/Transition.d.cts +0 -26
  516. package/dist/components/utils/Transition.d.ts +0 -26
  517. package/dist/components/utils/Transition.js +0 -50
  518. package/dist/components/utils/Transition.js.map +0 -1
  519. package/dist/components/utils/index.cjs +0 -302
  520. package/dist/components/utils/index.cjs.map +0 -1
  521. package/dist/components/utils/index.d.cts +0 -4
  522. package/dist/components/utils/index.d.ts +0 -4
  523. package/dist/components/utils/index.js +0 -275
  524. package/dist/components/utils/index.js.map +0 -1
  525. package/dist/hooks/focus/index.cjs +0 -379
  526. package/dist/hooks/focus/index.cjs.map +0 -1
  527. package/dist/hooks/focus/index.d.cts +0 -6
  528. package/dist/hooks/focus/index.d.ts +0 -6
  529. package/dist/hooks/focus/index.js +0 -339
  530. package/dist/hooks/focus/index.js.map +0 -1
  531. package/dist/hooks/focus/useFocusGuards.cjs +0 -74
  532. package/dist/hooks/focus/useFocusGuards.cjs.map +0 -1
  533. package/dist/hooks/focus/useFocusGuards.d.cts +0 -3
  534. package/dist/hooks/focus/useFocusGuards.d.ts +0 -3
  535. package/dist/hooks/focus/useFocusGuards.js +0 -50
  536. package/dist/hooks/focus/useFocusGuards.js.map +0 -1
  537. package/dist/hooks/focus/useFocusManagement.cjs +0 -84
  538. package/dist/hooks/focus/useFocusManagement.cjs.map +0 -1
  539. package/dist/hooks/focus/useFocusManagement.d.cts +0 -9
  540. package/dist/hooks/focus/useFocusManagement.d.ts +0 -9
  541. package/dist/hooks/focus/useFocusManagement.js +0 -60
  542. package/dist/hooks/focus/useFocusManagement.js.map +0 -1
  543. package/dist/hooks/focus/useFocusOnceVisible.cjs +0 -60
  544. package/dist/hooks/focus/useFocusOnceVisible.cjs.map +0 -1
  545. package/dist/hooks/focus/useFocusOnceVisible.d.cts +0 -5
  546. package/dist/hooks/focus/useFocusOnceVisible.d.ts +0 -5
  547. package/dist/hooks/focus/useFocusOnceVisible.js +0 -26
  548. package/dist/hooks/focus/useFocusOnceVisible.js.map +0 -1
  549. package/dist/hooks/focus/useFocusTrap.cjs +0 -233
  550. package/dist/hooks/focus/useFocusTrap.cjs.map +0 -1
  551. package/dist/hooks/focus/useFocusTrap.d.cts +0 -16
  552. package/dist/hooks/focus/useFocusTrap.d.ts +0 -16
  553. package/dist/hooks/focus/useFocusTrap.js +0 -210
  554. package/dist/hooks/focus/useFocusTrap.js.map +0 -1
  555. package/dist/hooks/focus/useIsMounted.cjs +0 -43
  556. package/dist/hooks/focus/useIsMounted.cjs.map +0 -1
  557. package/dist/hooks/focus/useIsMounted.d.cts +0 -3
  558. package/dist/hooks/focus/useIsMounted.d.ts +0 -3
  559. package/dist/hooks/focus/useIsMounted.js +0 -20
  560. package/dist/hooks/focus/useIsMounted.js.map +0 -1
  561. package/dist/hooks/index.cjs +0 -1530
  562. package/dist/hooks/index.cjs.map +0 -1
  563. package/dist/hooks/index.d.cts +0 -18
  564. package/dist/hooks/index.d.ts +0 -18
  565. package/dist/hooks/index.js +0 -1477
  566. package/dist/hooks/index.js.map +0 -1
  567. package/dist/hooks/useDelay.cjs +0 -67
  568. package/dist/hooks/useDelay.cjs.map +0 -1
  569. package/dist/hooks/useDelay.d.cts +0 -12
  570. package/dist/hooks/useDelay.d.ts +0 -12
  571. package/dist/hooks/useDelay.js +0 -43
  572. package/dist/hooks/useDelay.js.map +0 -1
  573. package/dist/hooks/useFloatingElement.cjs +0 -162
  574. package/dist/hooks/useFloatingElement.cjs.map +0 -1
  575. package/dist/hooks/useFloatingElement.d.cts +0 -22
  576. package/dist/hooks/useFloatingElement.d.ts +0 -22
  577. package/dist/hooks/useFloatingElement.js +0 -139
  578. package/dist/hooks/useFloatingElement.js.map +0 -1
  579. package/dist/hooks/useHoverState.cjs +0 -71
  580. package/dist/hooks/useHoverState.cjs.map +0 -1
  581. package/dist/hooks/useHoverState.d.cts +0 -42
  582. package/dist/hooks/useHoverState.d.ts +0 -42
  583. package/dist/hooks/useHoverState.js +0 -47
  584. package/dist/hooks/useHoverState.js.map +0 -1
  585. package/dist/hooks/useLocalStorage.cjs +0 -97
  586. package/dist/hooks/useLocalStorage.cjs.map +0 -1
  587. package/dist/hooks/useLocalStorage.d.cts +0 -17
  588. package/dist/hooks/useLocalStorage.d.ts +0 -17
  589. package/dist/hooks/useLocalStorage.js +0 -74
  590. package/dist/hooks/useLocalStorage.js.map +0 -1
  591. package/dist/hooks/useLogOnce.cjs +0 -53
  592. package/dist/hooks/useLogOnce.cjs.map +0 -1
  593. package/dist/hooks/useLogOnce.d.cts +0 -7
  594. package/dist/hooks/useLogOnce.d.ts +0 -7
  595. package/dist/hooks/useLogOnce.js +0 -29
  596. package/dist/hooks/useLogOnce.js.map +0 -1
  597. package/dist/hooks/useOutsideClick.cjs +0 -47
  598. package/dist/hooks/useOutsideClick.cjs.map +0 -1
  599. package/dist/hooks/useOutsideClick.d.cts +0 -5
  600. package/dist/hooks/useOutsideClick.d.ts +0 -5
  601. package/dist/hooks/useOutsideClick.js +0 -23
  602. package/dist/hooks/useOutsideClick.js.map +0 -1
  603. package/dist/hooks/useOverwritableState.cjs +0 -49
  604. package/dist/hooks/useOverwritableState.cjs.map +0 -1
  605. package/dist/hooks/useOverwritableState.d.cts +0 -5
  606. package/dist/hooks/useOverwritableState.d.ts +0 -5
  607. package/dist/hooks/useOverwritableState.js +0 -25
  608. package/dist/hooks/useOverwritableState.js.map +0 -1
  609. package/dist/hooks/usePopoverPosition.cjs +0 -81
  610. package/dist/hooks/usePopoverPosition.cjs.map +0 -1
  611. package/dist/hooks/usePopoverPosition.d.cts +0 -15
  612. package/dist/hooks/usePopoverPosition.d.ts +0 -15
  613. package/dist/hooks/usePopoverPosition.js +0 -57
  614. package/dist/hooks/usePopoverPosition.js.map +0 -1
  615. package/dist/hooks/useRerender.cjs +0 -33
  616. package/dist/hooks/useRerender.cjs.map +0 -1
  617. package/dist/hooks/useRerender.d.cts +0 -5
  618. package/dist/hooks/useRerender.d.ts +0 -5
  619. package/dist/hooks/useRerender.js +0 -9
  620. package/dist/hooks/useRerender.js.map +0 -1
  621. package/dist/hooks/useResizeCallbackWrapper.cjs +0 -38
  622. package/dist/hooks/useResizeCallbackWrapper.cjs.map +0 -1
  623. package/dist/hooks/useResizeCallbackWrapper.d.cts +0 -11
  624. package/dist/hooks/useResizeCallbackWrapper.d.ts +0 -11
  625. package/dist/hooks/useResizeCallbackWrapper.js +0 -14
  626. package/dist/hooks/useResizeCallbackWrapper.js.map +0 -1
  627. package/dist/hooks/useSearch.cjs +0 -95
  628. package/dist/hooks/useSearch.cjs.map +0 -1
  629. package/dist/hooks/useSearch.d.cts +0 -22
  630. package/dist/hooks/useSearch.d.ts +0 -22
  631. package/dist/hooks/useSearch.js +0 -71
  632. package/dist/hooks/useSearch.js.map +0 -1
  633. package/dist/hooks/useValidators.cjs +0 -687
  634. package/dist/hooks/useValidators.cjs.map +0 -1
  635. package/dist/hooks/useValidators.d.cts +0 -16
  636. package/dist/hooks/useValidators.d.ts +0 -16
  637. package/dist/hooks/useValidators.js +0 -660
  638. package/dist/hooks/useValidators.js.map +0 -1
  639. package/dist/i18n/LocaleProvider.cjs +0 -202
  640. package/dist/i18n/LocaleProvider.cjs.map +0 -1
  641. package/dist/i18n/LocaleProvider.d.cts +0 -23
  642. package/dist/i18n/LocaleProvider.d.ts +0 -23
  643. package/dist/i18n/LocaleProvider.js +0 -175
  644. package/dist/i18n/LocaleProvider.js.map +0 -1
  645. package/dist/i18n/index.cjs +0 -761
  646. package/dist/i18n/index.cjs.map +0 -1
  647. package/dist/i18n/index.d.cts +0 -8
  648. package/dist/i18n/index.d.ts +0 -8
  649. package/dist/i18n/index.js +0 -727
  650. package/dist/i18n/index.js.map +0 -1
  651. package/dist/i18n/translations.cjs +0 -507
  652. package/dist/i18n/translations.cjs.map +0 -1
  653. package/dist/i18n/translations.d.cts +0 -189
  654. package/dist/i18n/translations.d.ts +0 -189
  655. package/dist/i18n/translations.js +0 -482
  656. package/dist/i18n/translations.js.map +0 -1
  657. package/dist/i18n/useHightideTranslation.cjs +0 -618
  658. package/dist/i18n/useHightideTranslation.cjs.map +0 -1
  659. package/dist/i18n/useHightideTranslation.d.cts +0 -21
  660. package/dist/i18n/useHightideTranslation.d.ts +0 -21
  661. package/dist/i18n/useHightideTranslation.js +0 -591
  662. package/dist/i18n/useHightideTranslation.js.map +0 -1
  663. package/dist/i18n/util.cjs +0 -49
  664. package/dist/i18n/util.cjs.map +0 -1
  665. package/dist/i18n/util.d.cts +0 -15
  666. package/dist/i18n/util.d.ts +0 -15
  667. package/dist/i18n/util.js +0 -23
  668. package/dist/i18n/util.js.map +0 -1
  669. package/dist/index.cjs +0 -16470
  670. package/dist/index.cjs.map +0 -1
  671. package/dist/index.d.cts +0 -113
  672. package/dist/storybook/helper.cjs +0 -61
  673. package/dist/storybook/helper.cjs.map +0 -1
  674. package/dist/storybook/helper.d.cts +0 -17
  675. package/dist/storybook/helper.d.ts +0 -17
  676. package/dist/storybook/helper.js +0 -37
  677. package/dist/storybook/helper.js.map +0 -1
  678. package/dist/theming/index.cjs +0 -190
  679. package/dist/theming/index.cjs.map +0 -1
  680. package/dist/theming/index.d.cts +0 -3
  681. package/dist/theming/index.d.ts +0 -3
  682. package/dist/theming/index.js +0 -161
  683. package/dist/theming/index.js.map +0 -1
  684. package/dist/theming/useTheme.cjs +0 -188
  685. package/dist/theming/useTheme.cjs.map +0 -1
  686. package/dist/theming/useTheme.d.cts +0 -26
  687. package/dist/theming/useTheme.d.ts +0 -26
  688. package/dist/theming/useTheme.js +0 -161
  689. package/dist/theming/useTheme.js.map +0 -1
  690. package/dist/utils/array.cjs +0 -172
  691. package/dist/utils/array.cjs.map +0 -1
  692. package/dist/utils/array.d.cts +0 -34
  693. package/dist/utils/array.d.ts +0 -34
  694. package/dist/utils/array.js +0 -142
  695. package/dist/utils/array.js.map +0 -1
  696. package/dist/utils/bagFunctions.cjs +0 -38
  697. package/dist/utils/bagFunctions.cjs.map +0 -1
  698. package/dist/utils/bagFunctions.d.cts +0 -15
  699. package/dist/utils/bagFunctions.d.ts +0 -15
  700. package/dist/utils/bagFunctions.js +0 -14
  701. package/dist/utils/bagFunctions.js.map +0 -1
  702. package/dist/utils/builder.cjs +0 -33
  703. package/dist/utils/builder.cjs.map +0 -1
  704. package/dist/utils/builder.d.cts +0 -8
  705. package/dist/utils/builder.d.ts +0 -8
  706. package/dist/utils/builder.js +0 -9
  707. package/dist/utils/builder.js.map +0 -1
  708. package/dist/utils/date.cjs +0 -193
  709. package/dist/utils/date.cjs.map +0 -1
  710. package/dist/utils/date.d.cts +0 -30
  711. package/dist/utils/date.d.ts +0 -30
  712. package/dist/utils/date.js +0 -156
  713. package/dist/utils/date.js.map +0 -1
  714. package/dist/utils/easeFunctions.cjs +0 -63
  715. package/dist/utils/easeFunctions.cjs.map +0 -1
  716. package/dist/utils/easeFunctions.d.cts +0 -11
  717. package/dist/utils/easeFunctions.d.ts +0 -11
  718. package/dist/utils/easeFunctions.js +0 -37
  719. package/dist/utils/easeFunctions.js.map +0 -1
  720. package/dist/utils/emailValidation.cjs +0 -32
  721. package/dist/utils/emailValidation.cjs.map +0 -1
  722. package/dist/utils/emailValidation.d.cts +0 -3
  723. package/dist/utils/emailValidation.d.ts +0 -3
  724. package/dist/utils/emailValidation.js +0 -8
  725. package/dist/utils/emailValidation.js.map +0 -1
  726. package/dist/utils/index.cjs +0 -562
  727. package/dist/utils/index.cjs.map +0 -1
  728. package/dist/utils/index.d.cts +0 -16
  729. package/dist/utils/index.d.ts +0 -16
  730. package/dist/utils/index.js +0 -502
  731. package/dist/utils/index.js.map +0 -1
  732. package/dist/utils/loopingArray.cjs +0 -96
  733. package/dist/utils/loopingArray.cjs.map +0 -1
  734. package/dist/utils/loopingArray.d.cts +0 -25
  735. package/dist/utils/loopingArray.d.ts +0 -25
  736. package/dist/utils/loopingArray.js +0 -72
  737. package/dist/utils/loopingArray.js.map +0 -1
  738. package/dist/utils/match.cjs +0 -32
  739. package/dist/utils/match.cjs.map +0 -1
  740. package/dist/utils/match.d.cts +0 -3
  741. package/dist/utils/match.d.ts +0 -3
  742. package/dist/utils/match.js +0 -8
  743. package/dist/utils/match.js.map +0 -1
  744. package/dist/utils/math.cjs +0 -33
  745. package/dist/utils/math.cjs.map +0 -1
  746. package/dist/utils/math.d.cts +0 -3
  747. package/dist/utils/math.d.ts +0 -3
  748. package/dist/utils/math.js +0 -9
  749. package/dist/utils/math.js.map +0 -1
  750. package/dist/utils/noop.cjs +0 -30
  751. package/dist/utils/noop.cjs.map +0 -1
  752. package/dist/utils/noop.d.cts +0 -3
  753. package/dist/utils/noop.d.ts +0 -3
  754. package/dist/utils/noop.js +0 -6
  755. package/dist/utils/noop.js.map +0 -1
  756. package/dist/utils/resolveSetState.cjs +0 -32
  757. package/dist/utils/resolveSetState.cjs.map +0 -1
  758. package/dist/utils/resolveSetState.d.cts +0 -5
  759. package/dist/utils/resolveSetState.d.ts +0 -5
  760. package/dist/utils/resolveSetState.js +0 -8
  761. package/dist/utils/resolveSetState.js.map +0 -1
  762. package/dist/utils/simpleSearch.cjs +0 -59
  763. package/dist/utils/simpleSearch.cjs.map +0 -1
  764. package/dist/utils/simpleSearch.d.cts +0 -50
  765. package/dist/utils/simpleSearch.d.ts +0 -50
  766. package/dist/utils/simpleSearch.js +0 -32
  767. package/dist/utils/simpleSearch.js.map +0 -1
  768. package/dist/utils/storage.cjs +0 -63
  769. package/dist/utils/storage.cjs.map +0 -1
  770. package/dist/utils/storage.d.cts +0 -16
  771. package/dist/utils/storage.d.ts +0 -16
  772. package/dist/utils/storage.js +0 -38
  773. package/dist/utils/storage.js.map +0 -1
  774. package/dist/utils/typing.cjs +0 -18
  775. package/dist/utils/typing.cjs.map +0 -1
  776. package/dist/utils/typing.d.cts +0 -8
  777. package/dist/utils/typing.d.ts +0 -8
  778. package/dist/utils/typing.js +0 -1
  779. package/dist/utils/typing.js.map +0 -1
  780. package/dist/utils/writeToClipboard.cjs +0 -33
  781. package/dist/utils/writeToClipboard.cjs.map +0 -1
  782. package/dist/utils/writeToClipboard.d.cts +0 -3
  783. package/dist/utils/writeToClipboard.d.ts +0 -3
  784. package/dist/utils/writeToClipboard.js +0 -10
  785. package/dist/utils/writeToClipboard.js.map +0 -1
@@ -1,2516 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/components/dialog/index.ts
30
- var dialog_exports = {};
31
- __export(dialog_exports, {
32
- ConfirmDialog: () => ConfirmDialog,
33
- Dialog: () => Dialog,
34
- DiscardChangesDialog: () => DiscardChangesDialog,
35
- InputDialog: () => InputDialog,
36
- LanguageDialog: () => LanguageDialog,
37
- ThemeDialog: () => ThemeDialog
38
- });
39
- module.exports = __toCommonJS(dialog_exports);
40
-
41
- // src/components/user-action/Button.tsx
42
- var import_react = require("react");
43
- var import_clsx = __toESM(require("clsx"), 1);
44
- var import_jsx_runtime = require("react/jsx-runtime");
45
- var ButtonColorUtil = {
46
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
47
- text: ["primary", "negative", "neutral"],
48
- outline: ["primary"]
49
- };
50
- var IconButtonUtil = {
51
- icon: [...ButtonColorUtil.solid, "transparent"]
52
- };
53
- var paddingMapping = {
54
- none: "",
55
- small: "btn-sm",
56
- medium: "btn-md",
57
- large: "btn-lg"
58
- };
59
- var iconPaddingMapping = {
60
- none: "",
61
- tiny: "icon-btn-xs",
62
- small: "icon-btn-sm",
63
- medium: "icon-btn-md",
64
- large: "icon-btn-lg"
65
- };
66
- var ButtonUtil = {
67
- paddingMapping,
68
- iconPaddingMapping
69
- };
70
- var SolidButton = (0, import_react.forwardRef)(function SolidButton2({
71
- children,
72
- color = "primary",
73
- size = "medium",
74
- startIcon,
75
- endIcon,
76
- onClick,
77
- className,
78
- ...restProps
79
- }, ref) {
80
- const colorClasses = {
81
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
82
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
83
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
84
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
85
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
86
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
87
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
88
- }[color];
89
- const iconColorClasses = {
90
- primary: "not-group-disabled:text-button-solid-primary-icon",
91
- secondary: "not-group-disabled:text-button-solid-secondary-icon",
92
- tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
93
- positive: "not-group-disabled:text-button-solid-positive-icon",
94
- warning: "not-group-disabled:text-button-solid-warning-icon",
95
- negative: "not-group-disabled:text-button-solid-negative-icon",
96
- neutral: "not-group-disabled:text-button-solid-neutral-icon"
97
- }[color];
98
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
99
- "button",
100
- {
101
- ref,
102
- onClick,
103
- className: (0, import_clsx.default)(
104
- "group font-semibold",
105
- colorClasses,
106
- "not-disabled:hover:brightness-90",
107
- "disabled:text-disabled disabled:bg-disabled-background",
108
- ButtonUtil.paddingMapping[size],
109
- className
110
- ),
111
- ...restProps,
112
- children: [
113
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
- "span",
115
- {
116
- className: (0, import_clsx.default)(
117
- iconColorClasses,
118
- "group-disabled:text-disabled-icon"
119
- ),
120
- children: startIcon
121
- }
122
- ),
123
- children,
124
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
- "span",
126
- {
127
- className: (0, import_clsx.default)(
128
- iconColorClasses,
129
- "group-disabled:text-disabled-icon"
130
- ),
131
- children: endIcon
132
- }
133
- )
134
- ]
135
- }
136
- );
137
- });
138
- var TextButton = ({
139
- children,
140
- color = "neutral",
141
- size = "medium",
142
- startIcon,
143
- endIcon,
144
- onClick,
145
- coloredHoverBackground = true,
146
- className,
147
- ...restProps
148
- }) => {
149
- const colorClasses = {
150
- primary: "not-disabled:bg-transparent not-disabled:text-button-text-primary-text not-disabled:focus-visible:outline-button-text-primary-text",
151
- negative: "not-disabled:bg-transparent not-disabled:text-button-text-negative-text not-disabled:focus-visible:outline-button-text-negative-text",
152
- neutral: "not-disabled:bg-transparent not-disabled:text-button-text-neutral-text not-disabled:focus-visible:outline-button-text-neutral-text"
153
- }[color];
154
- const backgroundColor = {
155
- primary: "not-disabled:hover:bg-button-text-primary-text/20 not-disabled:focus-visible:bg-button-text-primary-text/20",
156
- negative: "not-disabled:hover:bg-button-text-negative-text/20 not-disabled:focus-visible:bg-button-text-negative-text/20",
157
- neutral: "not-disabled:hover:bg-button-text-neutral-text/20 not-disabled:focus-visible:bg-button-text-neutral-text/20"
158
- }[color];
159
- const iconColorClasses = {
160
- primary: "not-group-disabled:text-button-text-primary-icon",
161
- negative: "not-group-disabled:text-button-text-negative-icon",
162
- neutral: "not-group-disabled:text-button-text-neutral-icon"
163
- }[color];
164
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
165
- "button",
166
- {
167
- onClick,
168
- className: (0, import_clsx.default)(
169
- "group font-semibold",
170
- "disabled:text-disabled",
171
- colorClasses,
172
- {
173
- [backgroundColor]: coloredHoverBackground,
174
- "not-disabled:hover:bg-button-text-hover-background": !coloredHoverBackground
175
- },
176
- ButtonUtil.paddingMapping[size],
177
- className
178
- ),
179
- ...restProps,
180
- children: [
181
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
182
- "span",
183
- {
184
- className: (0, import_clsx.default)(
185
- iconColorClasses,
186
- "group-disabled:text-disabled-icon"
187
- ),
188
- children: startIcon
189
- }
190
- ),
191
- children,
192
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
193
- "span",
194
- {
195
- className: (0, import_clsx.default)(
196
- iconColorClasses,
197
- "group-disabled:text-disabled-icon"
198
- ),
199
- children: endIcon
200
- }
201
- )
202
- ]
203
- }
204
- );
205
- };
206
- var IconButton = (0, import_react.forwardRef)(function IconButton2({
207
- children,
208
- color = "primary",
209
- size = "medium",
210
- className,
211
- ...restProps
212
- }, ref) {
213
- const colorClasses = {
214
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
215
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
216
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
217
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
218
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
219
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
220
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
221
- transparent: "not-disabled:bg-transparent"
222
- }[color];
223
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
224
- "button",
225
- {
226
- ref,
227
- className: (0, import_clsx.default)(
228
- colorClasses,
229
- "not-disabled:hover:brightness-90",
230
- "disabled:text-disabled",
231
- {
232
- "disabled:bg-disabled-background": color !== "transparent",
233
- "disabled:opacity-70": color === "transparent",
234
- "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
235
- },
236
- ButtonUtil.iconPaddingMapping[size],
237
- className
238
- ),
239
- ...restProps,
240
- children
241
- }
242
- );
243
- });
244
-
245
- // src/i18n/LocaleProvider.tsx
246
- var import_react3 = require("react");
247
-
248
- // src/hooks/useLocalStorage.ts
249
- var import_react2 = require("react");
250
-
251
- // src/utils/resolveSetState.ts
252
- function resolveSetState(action, prev) {
253
- return typeof action === "function" ? action(prev) : action;
254
- }
255
-
256
- // src/i18n/translations.ts
257
- var import_internationalization = require("@helpwave/internationalization");
258
- var hightideTranslationLocales = ["de-DE", "en-US"];
259
- var hightideTranslation = {
260
- "de-DE": {
261
- "add": `Hinzuf\xFCgen`,
262
- "age": `Alter`,
263
- "all": `Alle`,
264
- "apply": `Anwenden`,
265
- "back": `Zur\xFCck`,
266
- "cancel": `Abbrechen`,
267
- "carousel": `Karussell`,
268
- "change": `\xC4ndern`,
269
- "chooseLanguage": `W\xE4hle deine bevorzugte Sprache`,
270
- "chooseSlide": `W\xE4hle die angezeigte Slide aus`,
271
- "chooseTheme": `W\xE4hle dein bevorzugtes Farbschema.`,
272
- "clear": `L\xF6schen`,
273
- "click": `Klicken`,
274
- "clickToCopy": `Zum kopieren klicken`,
275
- "clickToSelect": `Zum Ausw\xE4hlen dr\xFCcken`,
276
- "close": `Schlie\xDFen`,
277
- "confirm": `Best\xE4tigen`,
278
- "copied": `Kopiert`,
279
- "copy": `Kopieren`,
280
- "create": `Erstellen`,
281
- "decline": `Ablehnen`,
282
- "delete": `L\xF6schen`,
283
- "discard": `Verwerfen`,
284
- "discardChanges": `\xC4nderungen Verwerfen`,
285
- "done": `Fertig`,
286
- "edit": `Bearbeiten`,
287
- "endDate": `Ende`,
288
- "enterText": `Text hier eingeben`,
289
- "entryDate": `Eintragsdatum`,
290
- "error": `Fehler`,
291
- "errorOccurred": `Ein Fehler ist aufgetreten`,
292
- "exit": `Beenden`,
293
- "fieldRequiredError": `Dieses Feld ist erforderlich.`,
294
- "filter": `Filter`,
295
- "gender": ({ gender }) => {
296
- return import_internationalization.TranslationGen.resolveSelect(gender, {
297
- "male": `M\xE4nnlich`,
298
- "female": `Weiblich`,
299
- "other": `Divers`
300
- });
301
- },
302
- "goodToSeeYou": `Sch\xF6n dich zu sehen`,
303
- "identifier": `Identifikator`,
304
- "invalidEmail": `Die E-Mail ist ung\xFCltig.`,
305
- "invalidEmailError": `Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.`,
306
- "language": `Sprache`,
307
- "less": `Weniger`,
308
- "loading": `L\xE4dt`,
309
- "locale": `Locale`,
310
- "max": `Max`,
311
- "maxLengthError": `Maximale L\xE4nge \xFCberschritten.`,
312
- "min": `Min`,
313
- "minLengthError": `Mindestl\xE4nge nicht erreicht.`,
314
- "more": `Mehr`,
315
- "name": `Name`,
316
- "next": `Weiter`,
317
- "no": `Nein`,
318
- "none": `Nichts`,
319
- "notEmpty": `Das Feld darf nicht leer sein.`,
320
- "nothingFound": `Nichts gefunden`,
321
- "of": `von`,
322
- "optional": `Optional`,
323
- "outOfRangeNumber": ({ min, max }) => {
324
- return `Der Wert muss zwischen ${min} und ${max} liegen.`;
325
- },
326
- "outOfRangeSelectionItems": ({ min, max }) => {
327
- return `Es m\xFCssen zwischen ${min} und ${max} Elemente ausgew\xE4hlt werden.`;
328
- },
329
- "outOfRangeString": ({ min, max }) => {
330
- return `Der Wert muss zwischen ${min} und ${max} Zeichen lang sein.`;
331
- },
332
- "pleaseWait": `Bitte warten...`,
333
- "previous": `Vorherige`,
334
- "remove": `Entfernen`,
335
- "required": `Erforderlich`,
336
- "reset": `Zur\xFCcksetzen`,
337
- "save": `Speichern`,
338
- "saved": `Gespeichert`,
339
- "search": `Suche`,
340
- "select": `Select`,
341
- "selectOption": `Option ausw\xE4hlen`,
342
- "show": `Anzeigen`,
343
- "showLess": `Weniger anzeigen`,
344
- "showMore": `Mehr anzeigen`,
345
- "showSlide": ({ index }) => {
346
- return `Zeige Slide ${index}`;
347
- },
348
- "slide": `Slide`,
349
- "slideNavigation": `Slide Navigation`,
350
- "slideOf": ({ index, length }) => {
351
- return `Slide ${index} von ${length} slides`;
352
- },
353
- "startDate": `Start`,
354
- "street": `Stra\xDFe`,
355
- "submit": `Abschicken`,
356
- "success": `Erfolg`,
357
- "text": `Text`,
358
- "themeMode": ({ theme }) => {
359
- return import_internationalization.TranslationGen.resolveSelect(theme, {
360
- "dark": `Dunkel`,
361
- "light": `Hell`,
362
- "system": `System`
363
- });
364
- },
365
- "themes": ({ count }) => {
366
- return import_internationalization.TranslationGen.resolveSelect(count, {
367
- "=1": `Farbschema`,
368
- "other": `Farbschemas`
369
- });
370
- },
371
- "time.ago": `vor`,
372
- "time.agoDays": ({ days }) => {
373
- return `var ${days} Tagen`;
374
- },
375
- "time.april": `April`,
376
- "time.august": `August`,
377
- "time.century": ({ count }) => {
378
- return import_internationalization.TranslationGen.resolveSelect(count, {
379
- "=1": `Jahrhundert`,
380
- "other": `Jahrhunderte`
381
- });
382
- },
383
- "time.day": ({ count }) => {
384
- return import_internationalization.TranslationGen.resolveSelect(count, {
385
- "=1": `Tag`,
386
- "other": `Tage`
387
- });
388
- },
389
- "time.decade": ({ count }) => {
390
- return import_internationalization.TranslationGen.resolveSelect(count, {
391
- "=1": `Jahrzehnt`,
392
- "other": `Jahrzehnte`
393
- });
394
- },
395
- "time.december": `December`,
396
- "time.february": `Febuar`,
397
- "time.hour": ({ count }) => {
398
- return import_internationalization.TranslationGen.resolveSelect(count, {
399
- "=1": `Stunde`,
400
- "other": `Stunden`
401
- });
402
- },
403
- "time.in": `in`,
404
- "time.inDays": ({ days }) => {
405
- return `in ${days} Tagen`;
406
- },
407
- "time.january": `Januar`,
408
- "time.july": `Juli`,
409
- "time.june": `Juni`,
410
- "time.march": `M\xE4rz`,
411
- "time.may": `Mai`,
412
- "time.microsecond": ({ count }) => {
413
- return import_internationalization.TranslationGen.resolveSelect(count, {
414
- "=1": `Mikrosekunde`,
415
- "other": `Mikrosekunden`
416
- });
417
- },
418
- "time.millisecond": ({ count }) => {
419
- return import_internationalization.TranslationGen.resolveSelect(count, {
420
- "=1": `Millisekunde`,
421
- "other": `Millisekunden`
422
- });
423
- },
424
- "time.minute": ({ count }) => {
425
- return import_internationalization.TranslationGen.resolveSelect(count, {
426
- "=1": `Minute`,
427
- "other": `Minuten`
428
- });
429
- },
430
- "time.month": ({ count }) => {
431
- return import_internationalization.TranslationGen.resolveSelect(count, {
432
- "=1": `Monat`,
433
- "other": `Monate`
434
- });
435
- },
436
- "time.monthName": ({ month }) => {
437
- return import_internationalization.TranslationGen.resolveSelect(month, {
438
- "january": `Januar`,
439
- "february": `Februar`,
440
- "march": `M\xE4rz`,
441
- "april": `April`,
442
- "may": `Mai`,
443
- "june": `Juni`,
444
- "july": `Juli`,
445
- "august": `August`,
446
- "september": `September`,
447
- "october": `Oktober`,
448
- "november": `November`,
449
- "december": `Dezember`,
450
- "other": `Unbekannter Monat`
451
- });
452
- },
453
- "time.nanosecond": ({ count }) => {
454
- return import_internationalization.TranslationGen.resolveSelect(count, {
455
- "=1": `Nanosekunde`,
456
- "other": `Nanosekunden`
457
- });
458
- },
459
- "time.november": `November`,
460
- "time.october": `October`,
461
- "time.second": ({ count }) => {
462
- return import_internationalization.TranslationGen.resolveSelect(count, {
463
- "=1": `Sekunde`,
464
- "other": `Sekunden`
465
- });
466
- },
467
- "time.september": `September`,
468
- "time.today": `Heute`,
469
- "time.tomorrow": `Morgen`,
470
- "time.year": ({ count }) => {
471
- return import_internationalization.TranslationGen.resolveSelect(count, {
472
- "=1": `Jahr`,
473
- "other": `Jahre`
474
- });
475
- },
476
- "time.yesterday": `Gestern`,
477
- "tooFewSelectionItems": ({ min }) => {
478
- return `Es m\xFCssen mindestens ${min} Elemente ausgew\xE4hlt werden.`;
479
- },
480
- "tooLong": ({ max }) => {
481
- return `Der Wert darf h\xF6chstens ${max} Zeichen enthalten.`;
482
- },
483
- "tooManySelectionItems": ({ max }) => {
484
- return `Es m\xFCssen maximal ${max} Elemente ausgew\xE4hlt werden.`;
485
- },
486
- "tooShort": ({ min }) => {
487
- return `Der Wert muss mindestens ${min} Zeichen enthalten.`;
488
- },
489
- "unsavedChanges": `Ungespeicherte \xC4nderungen`,
490
- "unsavedChangesSaveQuestion": `M\xF6chtest du die \xC4nderungen speichern?`,
491
- "update": `Update`,
492
- "value": `Wert`,
493
- "welcome": `Willkommen`,
494
- "yes": `Ja`
495
- },
496
- "en-US": {
497
- "add": `Add`,
498
- "age": `Age`,
499
- "all": `All`,
500
- "apply": `Apply`,
501
- "back": `Back`,
502
- "cancel": `Cancel`,
503
- "carousel": `Carousel`,
504
- "change": `Change`,
505
- "chooseLanguage": `Choose your language`,
506
- "chooseSlide": `Choose slide to display`,
507
- "chooseTheme": `Choose your preferred color theme.`,
508
- "clear": `Clear`,
509
- "click": `Click`,
510
- "clickToCopy": `Click to Copy`,
511
- "clickToSelect": `Click to select`,
512
- "close": `Close`,
513
- "confirm": `Confirm`,
514
- "copied": `Copied`,
515
- "copy": `Copy`,
516
- "create": `Create`,
517
- "decline": `Decline`,
518
- "delete": `Delete`,
519
- "discard": `Discard`,
520
- "discardChanges": `Discard Changes`,
521
- "done": `Done`,
522
- "edit": `Edit`,
523
- "endDate": `End`,
524
- "enterText": `Enter text here`,
525
- "entryDate": `Entry Date`,
526
- "error": `Error`,
527
- "errorOccurred": `An error occurred`,
528
- "exit": `Exit`,
529
- "fieldRequiredError": `This field is required.`,
530
- "filter": `Filter`,
531
- "gender": ({ gender }) => {
532
- return import_internationalization.TranslationGen.resolveSelect(gender, {
533
- "male": `Male`,
534
- "female": `Female`,
535
- "other": `Other`
536
- });
537
- },
538
- "goodToSeeYou": `Good to see you`,
539
- "identifier": `Identifier`,
540
- "invalidEmail": `The email is not valid.`,
541
- "invalidEmailError": `Please enter a valid email address.`,
542
- "language": `Language`,
543
- "less": `Less`,
544
- "loading": `Loading`,
545
- "locale": `Locale`,
546
- "max": `Max`,
547
- "maxLengthError": `Maximum length exceeded.`,
548
- "min": `Min`,
549
- "minLengthError": `Minimum length not met.`,
550
- "more": `More`,
551
- "name": `Name`,
552
- "next": `Next`,
553
- "no": `No`,
554
- "none": `None`,
555
- "notEmpty": `The field cannot be empty.`,
556
- "nothingFound": `Nothing found`,
557
- "of": `of`,
558
- "optional": `Optional`,
559
- "outOfRangeNumber": ({ min, max }) => {
560
- return `The value must be between ${min} and ${max}.`;
561
- },
562
- "outOfRangeSelectionItems": ({ min, max }) => {
563
- return `Between ${min} and ${max} items must be selected.`;
564
- },
565
- "outOfRangeString": ({ min, max }) => {
566
- return `The value needs to have between ${min} and ${max} characters.`;
567
- },
568
- "pleaseWait": `Please wait...`,
569
- "previous": `Previous`,
570
- "remove": `Remove`,
571
- "required": `Required`,
572
- "reset": `Reset`,
573
- "save": `Save`,
574
- "saved": `Saved`,
575
- "search": `Search`,
576
- "select": `Select`,
577
- "selectOption": `Select an option`,
578
- "show": `Show`,
579
- "showLess": `Show less`,
580
- "showMore": `Show more`,
581
- "showSlide": ({ index }) => {
582
- return `Show Slide ${index}`;
583
- },
584
- "slide": `Slide`,
585
- "slideNavigation": `Slide navigation`,
586
- "slideOf": ({ index, length }) => {
587
- return `Slide ${index} of ${length} slides`;
588
- },
589
- "startDate": `Start`,
590
- "street": `Street`,
591
- "submit": `Submit`,
592
- "success": `Success`,
593
- "text": `Text`,
594
- "themeMode": ({ theme }) => {
595
- return import_internationalization.TranslationGen.resolveSelect(theme, {
596
- "dark": `Dark`,
597
- "light": `Light`,
598
- "system": `System`
599
- });
600
- },
601
- "themes": ({ count }) => {
602
- return import_internationalization.TranslationGen.resolveSelect(count, {
603
- "=1": `Theme`,
604
- "other": `Themes`
605
- });
606
- },
607
- "time.ago": `ago`,
608
- "time.agoDays": ({ days }) => {
609
- return `days ${days} ago`;
610
- },
611
- "time.april": `April`,
612
- "time.august": `August`,
613
- "time.century": ({ count }) => {
614
- return import_internationalization.TranslationGen.resolveSelect(count, {
615
- "=1": `Century`,
616
- "other": `Centuries`
617
- });
618
- },
619
- "time.day": ({ count }) => {
620
- return import_internationalization.TranslationGen.resolveSelect(count, {
621
- "=1": `Day`,
622
- "other": `Days`
623
- });
624
- },
625
- "time.decade": ({ count }) => {
626
- return import_internationalization.TranslationGen.resolveSelect(count, {
627
- "=1": `Decade`,
628
- "other": `Decades`
629
- });
630
- },
631
- "time.december": `December`,
632
- "time.february": `Febuary`,
633
- "time.hour": ({ count }) => {
634
- return import_internationalization.TranslationGen.resolveSelect(count, {
635
- "=1": `Hour`,
636
- "other": `Hours`
637
- });
638
- },
639
- "time.in": `in`,
640
- "time.inDays": ({ days }) => {
641
- return `in ${days} days`;
642
- },
643
- "time.january": `January`,
644
- "time.july": `July`,
645
- "time.june": `June`,
646
- "time.march": `March`,
647
- "time.may": `May`,
648
- "time.microsecond": ({ count }) => {
649
- return import_internationalization.TranslationGen.resolveSelect(count, {
650
- "=1": `Microsecond`,
651
- "other": `Microseconds`
652
- });
653
- },
654
- "time.millisecond": ({ count }) => {
655
- return import_internationalization.TranslationGen.resolveSelect(count, {
656
- "=1": `Millisecond`,
657
- "other": `Milliseconds`
658
- });
659
- },
660
- "time.minute": ({ count }) => {
661
- return import_internationalization.TranslationGen.resolveSelect(count, {
662
- "=1": `Minute`,
663
- "other": `Minutes`
664
- });
665
- },
666
- "time.month": ({ count }) => {
667
- return import_internationalization.TranslationGen.resolveSelect(count, {
668
- "=1": `Month`,
669
- "other": `Months`
670
- });
671
- },
672
- "time.monthName": ({ month }) => {
673
- return import_internationalization.TranslationGen.resolveSelect(month, {
674
- "january": `January`,
675
- "february": `February`,
676
- "march": `March`,
677
- "april": `April`,
678
- "may": `May`,
679
- "june": `June`,
680
- "july": `July`,
681
- "august": `August`,
682
- "september": `September`,
683
- "october": `October`,
684
- "november": `November`,
685
- "december": `December`,
686
- "other": `Unknown Month`
687
- });
688
- },
689
- "time.nanosecond": ({ count }) => {
690
- return import_internationalization.TranslationGen.resolveSelect(count, {
691
- "=1": `Nanosecond`,
692
- "other": `Nanoseconds`
693
- });
694
- },
695
- "time.november": `November`,
696
- "time.october": `October`,
697
- "time.second": ({ count }) => {
698
- return import_internationalization.TranslationGen.resolveSelect(count, {
699
- "=1": `Second`,
700
- "other": `Seconds`
701
- });
702
- },
703
- "time.september": `September`,
704
- "time.today": `Today`,
705
- "time.tomorrow": `Tomorrow`,
706
- "time.year": ({ count }) => {
707
- return import_internationalization.TranslationGen.resolveSelect(count, {
708
- "=1": `Year`,
709
- "other": `Years`
710
- });
711
- },
712
- "time.yesterday": `Yesterday`,
713
- "tooFewSelectionItems": ({ min }) => {
714
- return `Select at least ${min} items.`;
715
- },
716
- "tooLong": ({ max }) => {
717
- return `The value requires less than ${max} characters.`;
718
- },
719
- "tooManySelectionItems": ({ max }) => {
720
- return `Select at most ${max} items.`;
721
- },
722
- "tooShort": ({ min }) => {
723
- return `The value requires at least ${min} characters.`;
724
- },
725
- "unsavedChanges": `Unsaved Changes`,
726
- "unsavedChangesSaveQuestion": `Do you want to save your changes?`,
727
- "update": `Update`,
728
- "value": `Value`,
729
- "welcome": `Welcome`,
730
- "yes": `Yes`
731
- }
732
- };
733
-
734
- // src/i18n/util.ts
735
- var localsNames = {
736
- "en-US": "English (US)",
737
- "de-DE": "Deutsch"
738
- };
739
- var DEFAULT_LOCALE = "en-US";
740
- function localeToLanguage(locale) {
741
- return locale.split("-")[0];
742
- }
743
- var LocalizationUtil = {
744
- locals: hightideTranslationLocales,
745
- localToLanguage: localeToLanguage,
746
- DEFAULT_LOCALE,
747
- languagesLocalNames: localsNames
748
- };
749
-
750
- // src/i18n/LocaleProvider.tsx
751
- var import_jsx_runtime2 = require("react/jsx-runtime");
752
- var LocaleContext = (0, import_react3.createContext)({
753
- locale: LocalizationUtil.DEFAULT_LOCALE,
754
- setLocale: (v) => v
755
- });
756
- var useLocale = () => {
757
- const context = (0, import_react3.useContext)(LocaleContext);
758
- if (!context) {
759
- throw new Error("useLocale must be used within LocaleContext. Try adding a LocaleProvider around your app.");
760
- }
761
- return context;
762
- };
763
-
764
- // src/i18n/useHightideTranslation.ts
765
- var import_internationalization2 = require("@helpwave/internationalization");
766
-
767
- // src/utils/array.ts
768
- var moveItems = (list, move = 0) => {
769
- const result = [];
770
- let start = move;
771
- if (start < 0) {
772
- start = list.length - move;
773
- }
774
- start = start % list.length;
775
- for (let i = 0; i < list.length; i++) {
776
- result[i] = list[(i + start) % list.length];
777
- }
778
- return result;
779
- };
780
- function resolveSingleOrArray(value) {
781
- if (Array.isArray(value)) {
782
- return value;
783
- } else if (value) {
784
- return [value];
785
- }
786
- return [];
787
- }
788
- var ArrayUtil = {
789
- unique: (list) => {
790
- const seen = /* @__PURE__ */ new Set();
791
- return list.filter((item) => {
792
- if (seen.has(item)) {
793
- return false;
794
- }
795
- seen.add(item);
796
- return true;
797
- });
798
- },
799
- difference: (list, removeList) => {
800
- const remove = new Set(removeList);
801
- return list.filter((item) => !remove.has(item));
802
- },
803
- moveItems,
804
- resolveSingleOrArray
805
- };
806
-
807
- // src/i18n/useHightideTranslation.ts
808
- function useHightideTranslation(extensions, overwrites) {
809
- const { locale: inferredLocale } = useLocale();
810
- const locale = overwrites?.locale ?? inferredLocale;
811
- const translationExtensions = ArrayUtil.resolveSingleOrArray(extensions);
812
- return (0, import_internationalization2.combineTranslation)([
813
- ...translationExtensions,
814
- hightideTranslation
815
- ], locale);
816
- }
817
-
818
- // src/components/dialog/ConfirmDialog.tsx
819
- var import_clsx3 = __toESM(require("clsx"), 1);
820
-
821
- // src/components/dialog/Dialog.tsx
822
- var import_react7 = require("react");
823
- var import_react8 = require("react");
824
- var import_clsx2 = __toESM(require("clsx"), 1);
825
- var import_lucide_react = require("lucide-react");
826
-
827
- // src/hooks/focus/useFocusTrap.ts
828
- var import_react5 = require("react");
829
-
830
- // src/hooks/focus/useIsMounted.ts
831
- var import_react4 = require("react");
832
- var isClient = typeof window !== "undefined" && typeof document !== "undefined";
833
- var useIsomorphicEffect = isClient ? import_react4.useLayoutEffect : import_react4.useEffect;
834
- var useIsMounted = () => {
835
- const [isMounted, setIsMounted] = (0, import_react4.useState)(false);
836
- useIsomorphicEffect(() => {
837
- setIsMounted(true);
838
- return () => {
839
- setIsMounted(false);
840
- };
841
- }, []);
842
- return isMounted;
843
- };
844
-
845
- // src/hooks/focus/useFocusTrap.ts
846
- var createFocusGuard = () => {
847
- const div = document.createElement("div");
848
- Object.assign(div.style, {
849
- opacity: "0",
850
- outline: "none",
851
- boxShadow: "none",
852
- position: "fixed",
853
- pointerEvents: "none",
854
- touchAction: "none"
855
- });
856
- div.tabIndex = 0;
857
- div.setAttribute("data-hw-focus-guard", "");
858
- document.body.appendChild(div);
859
- return div;
860
- };
861
- function getContainedFocusableElements(element) {
862
- return element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
863
- }
864
- var FocusTrapService = class {
865
- constructor() {
866
- // The last entry is always the active one
867
- this.listeners = [];
868
- this.onFocusIn = (event) => {
869
- const active = this.getActive();
870
- if (!active || !active.container.current) return;
871
- const { container } = active;
872
- if (!container.current.contains(event.target)) {
873
- this.focusElement();
874
- }
875
- };
876
- }
877
- getActive() {
878
- if (this.listeners.length === 0) return void 0;
879
- return this.listeners[this.listeners.length - 1];
880
- }
881
- focusElement() {
882
- const active = this.getActive();
883
- if (!active) return;
884
- const { container, initialFocusElement } = active;
885
- const containerElement = container.current;
886
- if (initialFocusElement?.current) {
887
- initialFocusElement.current.focus();
888
- } else {
889
- const elements = getContainedFocusableElements(containerElement);
890
- if (elements && elements.length > 0) {
891
- const first = elements.item(0);
892
- first.focus();
893
- } else {
894
- containerElement.focus();
895
- }
896
- }
897
- }
898
- removeGuards() {
899
- document.querySelectorAll("[data-hw-focus-guard]").forEach((node) => node.remove());
900
- }
901
- addGuards() {
902
- document.body.insertAdjacentElement("afterbegin", createFocusGuard());
903
- document.body.insertAdjacentElement("beforeend", createFocusGuard());
904
- }
905
- activate() {
906
- document.addEventListener("focusin", this.onFocusIn);
907
- this.addGuards();
908
- }
909
- deactivate() {
910
- document.removeEventListener("focusin", this.onFocusIn);
911
- this.removeGuards();
912
- }
913
- register(listener) {
914
- this.listeners.push(listener);
915
- if (this.listeners.length === 1) {
916
- this.activate();
917
- }
918
- const active = listener;
919
- this.listeners.forEach((listener2) => {
920
- const { focus, pause } = listener2;
921
- if (listener2 === active) {
922
- focus();
923
- } else {
924
- pause();
925
- }
926
- });
927
- }
928
- unregister(id) {
929
- const index = this.listeners.findIndex((trap) => trap.id === id);
930
- if (index !== -1) {
931
- const isActive = index === this.listeners.length - 1;
932
- const listener = this.listeners[index];
933
- this.listeners = this.listeners.filter((listener2) => listener2.id !== id);
934
- if (isActive) {
935
- this.deactivate();
936
- listener.focusLast();
937
- const active = this.getActive();
938
- this.listeners.forEach((listener2) => {
939
- const { pause, unpause } = listener2;
940
- if (listener2 === active) {
941
- unpause();
942
- } else {
943
- pause();
944
- }
945
- });
946
- if (this.listeners.length > 0) {
947
- this.activate();
948
- }
949
- }
950
- } else {
951
- console.warn(`Unable to unregister id ${id}: not found`);
952
- }
953
- }
954
- };
955
- var service = new FocusTrapService();
956
- var useFocusTrap = ({
957
- container,
958
- active = true,
959
- initialFocus,
960
- focusFirst = true
961
- }) => {
962
- const lastFocusRef = (0, import_react5.useRef)(null);
963
- const [paused, setPaused] = (0, import_react5.useState)(false);
964
- const isMounted = useIsMounted();
965
- const id = (0, import_react5.useId)();
966
- const focusElement = (0, import_react5.useCallback)(() => {
967
- const containerElement = container.current;
968
- if (initialFocus?.current) {
969
- initialFocus.current.focus();
970
- } else {
971
- const elements = getContainedFocusableElements(containerElement);
972
- if (elements && elements.length > 0) {
973
- const first = elements.item(0);
974
- first.focus();
975
- } else {
976
- containerElement.focus();
977
- }
978
- }
979
- }, [container, initialFocus]);
980
- (0, import_react5.useEffect)(() => {
981
- if (active && isMounted) {
982
- let pause = function() {
983
- setPaused(true);
984
- }, unpause = function() {
985
- setPaused(false);
986
- if (!container.current.contains(document.activeElement)) {
987
- focusElement();
988
- }
989
- }, focus = function() {
990
- focusElement();
991
- setPaused(false);
992
- }, focusLast = function() {
993
- lastFocusRef.current?.focus();
994
- };
995
- if (!lastFocusRef.current) {
996
- lastFocusRef.current = document.activeElement;
997
- }
998
- service.register({ id, pause, focus, focusLast, unpause, container, initialFocusElement: initialFocus });
999
- return () => {
1000
- service.unregister(id);
1001
- lastFocusRef.current = void 0;
1002
- };
1003
- }
1004
- }, [active, container, focusElement, id, initialFocus, isMounted]);
1005
- (0, import_react5.useEffect)(() => {
1006
- if (active && !paused && isMounted) {
1007
- let onKeyDown = function(event) {
1008
- const key = event.key;
1009
- const elements = getContainedFocusableElements(containerElement);
1010
- const active2 = document.activeElement;
1011
- const index = [...elements].findIndex((value) => value === active2);
1012
- if (index === -1 || event.altKey || event.ctrlKey || event.metaKey) {
1013
- return;
1014
- }
1015
- if (key === "Tab") {
1016
- const next = event.shiftKey ? -1 : 1;
1017
- const nextIndex = (index + next + elements.length) % elements.length;
1018
- const nextElement = elements[nextIndex];
1019
- nextElement.focus();
1020
- event.preventDefault();
1021
- }
1022
- };
1023
- const containerElement = container.current;
1024
- containerElement.addEventListener("keydown", onKeyDown);
1025
- return () => {
1026
- containerElement.removeEventListener("keydown", onKeyDown);
1027
- };
1028
- }
1029
- }, [active, paused, isMounted, container, initialFocus, focusFirst, focusElement]);
1030
- };
1031
-
1032
- // src/hooks/useLogOnce.ts
1033
- var import_react6 = require("react");
1034
- var defaultOptions = {
1035
- type: "warning"
1036
- };
1037
- var useLogOnce = (message, condition, options) => {
1038
- const [hasLogged, setHasLogged] = (0, import_react6.useState)(false);
1039
- const { type } = { ...defaultOptions, ...options };
1040
- (0, import_react6.useEffect)(() => {
1041
- if (!hasLogged && condition) {
1042
- switch (type) {
1043
- case "info":
1044
- console.info(message);
1045
- break;
1046
- case "error":
1047
- console.error(message);
1048
- break;
1049
- case "warning":
1050
- console.warn(message);
1051
- break;
1052
- }
1053
- setHasLogged(true);
1054
- }
1055
- }, [condition]);
1056
- };
1057
-
1058
- // src/components/dialog/Dialog.tsx
1059
- var import_react_dom = require("react-dom");
1060
- var import_jsx_runtime3 = require("react/jsx-runtime");
1061
- var Dialog = ({
1062
- children,
1063
- isOpen,
1064
- titleElement,
1065
- description,
1066
- isModal = true,
1067
- onClose,
1068
- backgroundClassName,
1069
- position = "center",
1070
- isAnimated = true,
1071
- containerClassName,
1072
- ...props
1073
- }) => {
1074
- const translation = useHightideTranslation();
1075
- const [visible, setVisible] = (0, import_react8.useState)(isOpen);
1076
- const generatedId = (0, import_react7.useId)();
1077
- const id = props.id ?? generatedId;
1078
- const ref = (0, import_react8.useRef)(null);
1079
- (0, import_react8.useEffect)(() => {
1080
- if (isOpen) {
1081
- setVisible(true);
1082
- } else {
1083
- if (!isAnimated) {
1084
- setVisible(false);
1085
- }
1086
- }
1087
- }, [isAnimated, isOpen]);
1088
- const onCloseWrapper = () => {
1089
- if (!isModal) return;
1090
- onClose?.();
1091
- };
1092
- useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
1093
- useFocusTrap({
1094
- container: ref,
1095
- active: visible,
1096
- focusFirst: true
1097
- });
1098
- const positionMap = {
1099
- top: "fixed top-8 left-1/2 -translate-x-1/2",
1100
- center: "fixed left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
1101
- none: ""
1102
- };
1103
- const positionStyle = positionMap[position];
1104
- if (!visible) return;
1105
- return (0, import_react_dom.createPortal)(
1106
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { id: `dialog-container-${id}`, className: (0, import_clsx2.default)("fixed inset-0 h-screen w-screen", containerClassName), children: [
1107
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1108
- "div",
1109
- {
1110
- id: `dialog-background-${id}`,
1111
- hidden: !visible,
1112
- className: (0, import_clsx2.default)(
1113
- "fixed inset-0 h-screen w-screen bg-overlay-shadow",
1114
- {
1115
- "motion-safe:animate-fade-in": isOpen,
1116
- "motion-safe:animate-fade-out": !isOpen
1117
- },
1118
- backgroundClassName
1119
- ),
1120
- onAnimationEnd: () => {
1121
- if (!isOpen) {
1122
- setVisible(false);
1123
- }
1124
- },
1125
- onClick: onCloseWrapper,
1126
- "aria-hidden": true
1127
- }
1128
- ),
1129
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1130
- "div",
1131
- {
1132
- ...props,
1133
- id: `dialog-${id}`,
1134
- ref,
1135
- hidden: !visible,
1136
- onKeyDown: (event) => {
1137
- if (event.key === "Escape") {
1138
- onCloseWrapper();
1139
- }
1140
- },
1141
- onAnimationEnd: () => {
1142
- if (!isOpen) {
1143
- setVisible(false);
1144
- }
1145
- },
1146
- className: (0, import_clsx2.default)(
1147
- "flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom max-w-[calc(100vw_-_2rem)] max-h-[calc(100vh_-_2rem)]",
1148
- {
1149
- "motion-safe:animate-pop-in": isOpen,
1150
- "motion-safe:animate-pop-out": !isOpen
1151
- },
1152
- positionStyle,
1153
- props.className
1154
- ),
1155
- children: [
1156
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "typography-title-lg mr-8", children: titleElement }),
1157
- description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-description", children: description }),
1158
- isModal && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1159
- "div",
1160
- {
1161
- className: "absolute top-0 right-0",
1162
- style: {
1163
- paddingTop: "inherit",
1164
- paddingRight: "inherit"
1165
- },
1166
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1167
- IconButton,
1168
- {
1169
- color: "neutral",
1170
- size: "tiny",
1171
- "aria-label": translation("close"),
1172
- onClick: onCloseWrapper,
1173
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.X, {})
1174
- }
1175
- )
1176
- }
1177
- ),
1178
- children
1179
- ]
1180
- }
1181
- )
1182
- ] }),
1183
- document.body
1184
- );
1185
- };
1186
-
1187
- // src/components/dialog/ConfirmDialog.tsx
1188
- var import_jsx_runtime4 = require("react/jsx-runtime");
1189
- var ConfirmDialog = ({
1190
- children,
1191
- onCancel,
1192
- onConfirm,
1193
- onDecline,
1194
- confirmType = "positive",
1195
- buttonOverwrites,
1196
- className,
1197
- ...restProps
1198
- }) => {
1199
- const translation = useHightideTranslation();
1200
- const mapping = {
1201
- neutral: "neutral",
1202
- negative: "negative",
1203
- positive: "positive",
1204
- primary: "primary"
1205
- };
1206
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Dialog, { ...restProps, onClose: onCancel, className: (0, import_clsx3.default)("justify-between", className), children: [
1207
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-col-2 grow", children }),
1208
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
1209
- onCancel && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1210
- SolidButton,
1211
- {
1212
- color: buttonOverwrites?.[0].color ?? "neutral",
1213
- onClick: onCancel,
1214
- disabled: buttonOverwrites?.[0].disabled ?? false,
1215
- children: buttonOverwrites?.[0].text ?? translation("cancel")
1216
- }
1217
- ),
1218
- onDecline && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1219
- SolidButton,
1220
- {
1221
- color: buttonOverwrites?.[1].color ?? "negative",
1222
- onClick: onDecline,
1223
- disabled: buttonOverwrites?.[1].disabled ?? false,
1224
- children: buttonOverwrites?.[1].text ?? translation("decline")
1225
- }
1226
- ),
1227
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1228
- SolidButton,
1229
- {
1230
- color: buttonOverwrites?.[2].color ?? mapping[confirmType],
1231
- onClick: onConfirm,
1232
- disabled: buttonOverwrites?.[2].disabled ?? false,
1233
- children: buttonOverwrites?.[2].text ?? translation("confirm")
1234
- }
1235
- )
1236
- ] })
1237
- ] });
1238
- };
1239
-
1240
- // src/components/dialog/DiscardChangesDialog.tsx
1241
- var import_jsx_runtime5 = require("react/jsx-runtime");
1242
- var DiscardChangesDialog = ({
1243
- children,
1244
- onCancel,
1245
- onSave,
1246
- onDontSave,
1247
- titleOverwrite,
1248
- descriptionOverwrite,
1249
- ...props
1250
- }) => {
1251
- const translation = useHightideTranslation();
1252
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1253
- ConfirmDialog,
1254
- {
1255
- ...props,
1256
- titleElement: titleOverwrite ?? translation("unsavedChanges"),
1257
- description: descriptionOverwrite ?? translation("unsavedChangesSaveQuestion"),
1258
- onConfirm: onSave,
1259
- onCancel,
1260
- onDecline: onDontSave,
1261
- buttonOverwrites: [{ text: translation("cancel") }, { text: translation("discardChanges") }, { text: translation("save") }],
1262
- children
1263
- }
1264
- );
1265
- };
1266
-
1267
- // src/components/user-action/input/Input.tsx
1268
- var import_react12 = require("react");
1269
- var import_clsx4 = __toESM(require("clsx"), 1);
1270
-
1271
- // src/hooks/useDelay.ts
1272
- var import_react9 = require("react");
1273
- var defaultOptions2 = {
1274
- delay: 3e3,
1275
- disabled: false
1276
- };
1277
- function useDelay(options) {
1278
- const [timer, setTimer] = (0, import_react9.useState)(void 0);
1279
- const { delay, disabled } = {
1280
- ...defaultOptions2,
1281
- ...options
1282
- };
1283
- const clearTimer = () => {
1284
- clearTimeout(timer);
1285
- setTimer(void 0);
1286
- };
1287
- const restartTimer = (onDelayFinish) => {
1288
- if (disabled) {
1289
- return;
1290
- }
1291
- clearTimeout(timer);
1292
- setTimer(setTimeout(() => {
1293
- onDelayFinish();
1294
- setTimer(void 0);
1295
- }, delay));
1296
- };
1297
- (0, import_react9.useEffect)(() => {
1298
- return () => {
1299
- clearTimeout(timer);
1300
- };
1301
- }, [timer]);
1302
- (0, import_react9.useEffect)(() => {
1303
- if (disabled) {
1304
- clearTimeout(timer);
1305
- setTimer(void 0);
1306
- }
1307
- }, [disabled, timer]);
1308
- return { restartTimer, clearTimer, hasActiveTimer: !!timer };
1309
- }
1310
-
1311
- // src/hooks/focus/useFocusManagement.ts
1312
- var import_react10 = require("react");
1313
- function useFocusManagement() {
1314
- const getFocusableElements = (0, import_react10.useCallback)(() => {
1315
- return Array.from(
1316
- document.querySelectorAll(
1317
- 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
1318
- )
1319
- ).filter(
1320
- (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
1321
- );
1322
- }, []);
1323
- const getNextFocusElement = (0, import_react10.useCallback)(() => {
1324
- const elements = getFocusableElements();
1325
- if (elements.length === 0) {
1326
- return void 0;
1327
- }
1328
- let nextElement = elements[0];
1329
- if (document.activeElement instanceof HTMLElement) {
1330
- const currentIndex = elements.indexOf(document.activeElement);
1331
- nextElement = elements[(currentIndex + 1) % elements.length];
1332
- }
1333
- return nextElement;
1334
- }, [getFocusableElements]);
1335
- const focusNext = (0, import_react10.useCallback)(() => {
1336
- const nextElement = getNextFocusElement();
1337
- nextElement?.focus();
1338
- }, [getNextFocusElement]);
1339
- const getPreviousFocusElement = (0, import_react10.useCallback)(() => {
1340
- const elements = getFocusableElements();
1341
- if (elements.length === 0) {
1342
- return void 0;
1343
- }
1344
- let previousElement = elements[0];
1345
- if (document.activeElement instanceof HTMLElement) {
1346
- const currentIndex = elements.indexOf(document.activeElement);
1347
- if (currentIndex === 0) {
1348
- previousElement = elements[elements.length - 1];
1349
- } else {
1350
- previousElement = elements[currentIndex - 1];
1351
- }
1352
- }
1353
- return previousElement;
1354
- }, [getFocusableElements]);
1355
- const focusPrevious = (0, import_react10.useCallback)(() => {
1356
- const previousElement = getPreviousFocusElement();
1357
- if (previousElement) previousElement.focus();
1358
- }, [getPreviousFocusElement]);
1359
- return {
1360
- getFocusableElements,
1361
- getNextFocusElement,
1362
- getPreviousFocusElement,
1363
- focusNext,
1364
- focusPrevious
1365
- };
1366
- }
1367
-
1368
- // src/hooks/useOverwritableState.ts
1369
- var import_react11 = require("react");
1370
- var useOverwritableState = (initialValue, onChange) => {
1371
- const [state, setState] = (0, import_react11.useState)(initialValue);
1372
- (0, import_react11.useEffect)(() => {
1373
- setState(initialValue);
1374
- }, [initialValue]);
1375
- const onChangeWrapper = (action) => {
1376
- const resolved = resolveSetState(action, state);
1377
- setState(resolved);
1378
- onChange?.(state);
1379
- };
1380
- return [state, onChangeWrapper];
1381
- };
1382
-
1383
- // src/components/user-action/input/Input.tsx
1384
- var import_jsx_runtime6 = require("react/jsx-runtime");
1385
- var defaultEditCompleteOptions = {
1386
- allowEnterComplete: false,
1387
- onBlur: true,
1388
- afterDelay: true,
1389
- delay: 2500
1390
- };
1391
- var Input = (0, import_react12.forwardRef)(function Input2({
1392
- value,
1393
- onChange,
1394
- onChangeText,
1395
- onEditCompleted,
1396
- editCompleteOptions,
1397
- disabled = false,
1398
- invalid = false,
1399
- defaultStyle = true,
1400
- className,
1401
- ...props
1402
- }, forwardedRef) {
1403
- const {
1404
- onBlur: allowEditCompleteOnBlur,
1405
- afterDelay,
1406
- delay,
1407
- allowEnterComplete
1408
- } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
1409
- const {
1410
- restartTimer,
1411
- clearTimer
1412
- } = useDelay({ delay, disabled: !afterDelay });
1413
- const innerRef = (0, import_react12.useRef)(null);
1414
- (0, import_react12.useImperativeHandle)(forwardedRef, () => innerRef.current);
1415
- const { focusNext } = useFocusManagement();
1416
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1417
- "input",
1418
- {
1419
- ...props,
1420
- ref: innerRef,
1421
- value,
1422
- disabled,
1423
- className: defaultStyle ? (0, import_clsx4.default)(
1424
- "px-3 py-2 rounded-md text-sm h-10 border-2 border-transparent focus-style-none",
1425
- {
1426
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
1427
- "bg-negative/20 text-negative hover:border-negative focus-visible:border-negative": !disabled && invalid,
1428
- "bg-disabled-background text-disabled border-disabled-border": disabled
1429
- },
1430
- className
1431
- ) : className,
1432
- onKeyDown: (event) => {
1433
- props.onKeyDown?.(event);
1434
- if (!allowEnterComplete) {
1435
- return;
1436
- }
1437
- if (event.key === "Enter" && !event.shiftKey) {
1438
- event.preventDefault();
1439
- innerRef.current?.blur();
1440
- onEditCompleted?.(event.target.value);
1441
- focusNext();
1442
- }
1443
- },
1444
- onBlur: (event) => {
1445
- props.onBlur?.(event);
1446
- if (allowEditCompleteOnBlur) {
1447
- onEditCompleted?.(event.target.value);
1448
- clearTimer();
1449
- }
1450
- },
1451
- onChange: (event) => {
1452
- onChange?.(event);
1453
- const value2 = event.target.value;
1454
- restartTimer(() => {
1455
- innerRef.current?.blur();
1456
- onEditCompleted?.(value2);
1457
- });
1458
- onChangeText?.(value2);
1459
- },
1460
- "aria-invalid": props["aria-invalid"] ?? invalid,
1461
- "aria-disabled": props["aria-disabled"] ?? disabled
1462
- }
1463
- );
1464
- });
1465
-
1466
- // src/components/dialog/InputDialog.tsx
1467
- var import_jsx_runtime7 = require("react/jsx-runtime");
1468
- var InputDialog = ({
1469
- inputs,
1470
- buttonOverwrites,
1471
- ...props
1472
- }) => {
1473
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1474
- ConfirmDialog,
1475
- {
1476
- buttonOverwrites,
1477
- ...props,
1478
- children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Input, { ...inputProps }, `input ${index}`))
1479
- }
1480
- );
1481
- };
1482
-
1483
- // src/components/user-action/select/Select.tsx
1484
- var import_react15 = require("react");
1485
- var import_clsx7 = __toESM(require("clsx"), 1);
1486
-
1487
- // src/components/layout/Expandable.tsx
1488
- var import_react13 = require("react");
1489
- var import_lucide_react2 = require("lucide-react");
1490
- var import_clsx5 = __toESM(require("clsx"), 1);
1491
- var import_jsx_runtime8 = require("react/jsx-runtime");
1492
- var ExpansionIcon = ({ isExpanded, className }) => {
1493
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1494
- import_lucide_react2.ChevronDown,
1495
- {
1496
- "aria-hidden": true,
1497
- className: (0, import_clsx5.default)(
1498
- "min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
1499
- { "rotate-180": isExpanded },
1500
- className
1501
- )
1502
- }
1503
- );
1504
- };
1505
- var Expandable = (0, import_react13.forwardRef)(function Expandable2({
1506
- children,
1507
- id: providedId,
1508
- label,
1509
- icon,
1510
- isExpanded = false,
1511
- onChange,
1512
- clickOnlyOnHeader = true,
1513
- disabled = false,
1514
- className,
1515
- headerClassName,
1516
- contentClassName,
1517
- contentExpandedClassName
1518
- }, ref) {
1519
- const defaultIcon = (0, import_react13.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
1520
- icon ??= defaultIcon;
1521
- const generatedId = (0, import_react13.useId)();
1522
- const id = providedId ?? generatedId;
1523
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1524
- "div",
1525
- {
1526
- ref,
1527
- onClick: () => !clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
1528
- className: (0, import_clsx5.default)(
1529
- "flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
1530
- { "cursor-pointer": !clickOnlyOnHeader && !disabled },
1531
- className
1532
- ),
1533
- children: [
1534
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1535
- "button",
1536
- {
1537
- onClick: () => clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
1538
- className: (0, import_clsx5.default)(
1539
- "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
1540
- {
1541
- "group-hover:brightness-97": !isExpanded,
1542
- "hover:brightness-97": isExpanded && !disabled,
1543
- "cursor-pointer": clickOnlyOnHeader && !disabled
1544
- },
1545
- headerClassName
1546
- ),
1547
- "aria-expanded": isExpanded,
1548
- "aria-controls": `${id}-content`,
1549
- "aria-disabled": disabled ?? void 0,
1550
- children: [
1551
- label,
1552
- icon(isExpanded)
1553
- ]
1554
- }
1555
- ),
1556
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1557
- "div",
1558
- {
1559
- id: `${id}-content`,
1560
- className: (0, import_clsx5.default)(
1561
- "flex-col-2 px-4 transition-all duration-300 ease-in-out",
1562
- {
1563
- [(0, import_clsx5.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
1564
- "max-h-0 opacity-0 overflow-hidden": !isExpanded
1565
- },
1566
- contentClassName
1567
- ),
1568
- role: "region",
1569
- children
1570
- }
1571
- )
1572
- ]
1573
- }
1574
- );
1575
- });
1576
- var ExpandableUncontrolled = (0, import_react13.forwardRef)(function ExpandableUncontrolled2({
1577
- isExpanded,
1578
- onChange,
1579
- ...props
1580
- }, ref) {
1581
- const [usedIsExpanded, setUsedIsExpanded] = useOverwritableState(isExpanded, onChange);
1582
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1583
- Expandable,
1584
- {
1585
- ...props,
1586
- ref,
1587
- isExpanded: usedIsExpanded,
1588
- onChange: setUsedIsExpanded
1589
- }
1590
- );
1591
- });
1592
-
1593
- // src/utils/match.ts
1594
- var match = (key, values) => {
1595
- return values[key];
1596
- };
1597
-
1598
- // src/components/user-action/select/Select.tsx
1599
- var import_lucide_react3 = require("lucide-react");
1600
-
1601
- // src/components/layout/Chip.tsx
1602
- var import_clsx6 = __toESM(require("clsx"), 1);
1603
- var import_jsx_runtime9 = require("react/jsx-runtime");
1604
- var Chip = ({
1605
- children,
1606
- trailingIcon,
1607
- color = "default",
1608
- size = "md",
1609
- icon = false,
1610
- variant = "normal",
1611
- className = "",
1612
- ...restProps
1613
- }) => {
1614
- const colorMapping = {
1615
- default: "text-tag-default-text bg-tag-default-background",
1616
- dark: "text-tag-dark-text bg-tag-dark-background",
1617
- red: "text-tag-red-text bg-tag-red-background",
1618
- yellow: "text-tag-yellow-text bg-tag-yellow-background",
1619
- green: "text-tag-green-text bg-tag-green-background",
1620
- blue: "text-tag-blue-text bg-tag-blue-background",
1621
- pink: "text-tag-pink-text bg-tag-pink-background",
1622
- orange: "text-tag-orange-text bg-tag-orange-background"
1623
- }[color];
1624
- const colorMappingIcon = {
1625
- default: "text-tag-default-icon",
1626
- dark: "text-tag-dark-icon",
1627
- red: "text-tag-red-icon",
1628
- yellow: "text-tag-yellow-icon",
1629
- green: "text-tag-green-icon",
1630
- blue: "text-tag-blue-icon",
1631
- pink: "text-tag-pink-icon",
1632
- orange: "text-tag-orange-icon"
1633
- }[color];
1634
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1635
- "div",
1636
- {
1637
- ...restProps,
1638
- className: (0, import_clsx6.default)(
1639
- `flex-row-0 w-fit font-semibold`,
1640
- colorMapping,
1641
- !icon ? {
1642
- "px-1 py-0.5": size === "sm",
1643
- "px-2 py-1": size === "md",
1644
- "px-4 py-2": size === "lg"
1645
- } : {
1646
- "p-0.5": size === "sm",
1647
- "p-1": size === "md",
1648
- "p-2": size === "lg"
1649
- },
1650
- {
1651
- "rounded-md": variant === "normal",
1652
- "rounded-full": variant === "fullyRounded"
1653
- },
1654
- className
1655
- ),
1656
- children: [
1657
- children,
1658
- trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
1659
- ]
1660
- }
1661
- );
1662
- };
1663
-
1664
- // src/hooks/useFloatingElement.ts
1665
- var import_react14 = require("react");
1666
-
1667
- // src/utils/math.ts
1668
- var clamp = (value, range = [0, 1]) => {
1669
- const [min, max] = range;
1670
- return Math.min(Math.max(value, min), max);
1671
- };
1672
-
1673
- // src/hooks/useFloatingElement.ts
1674
- function calculatePosition({
1675
- windowRect,
1676
- containerRect,
1677
- anchorRect,
1678
- options
1679
- }) {
1680
- const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
1681
- const windowWidth = windowRect.width;
1682
- const windowHeight = windowRect.height;
1683
- const maxWidth = windowWidth - 2 * screenPadding;
1684
- const maxHeight = windowHeight - 2 * screenPadding;
1685
- const width = Math.min(containerRect.width, maxWidth);
1686
- const height = Math.min(containerRect.height, maxHeight);
1687
- const leftSuggestion = {
1688
- beforeStart: anchorRect.left - width - gap,
1689
- afterStart: anchorRect.left,
1690
- center: anchorRect.left + anchorRect.width / 2 - width / 2,
1691
- beforeEnd: anchorRect.right - width,
1692
- afterEnd: anchorRect.right + gap
1693
- }[horizontalAlignment];
1694
- const topSuggestion = {
1695
- beforeStart: anchorRect.top - height - gap,
1696
- afterStart: anchorRect.top,
1697
- center: anchorRect.top + anchorRect.height / 2 - height / 2,
1698
- beforeEnd: anchorRect.bottom - height,
1699
- afterEnd: anchorRect.bottom + gap
1700
- }[verticalAlignment];
1701
- const left = clamp(leftSuggestion, [
1702
- screenPadding,
1703
- windowWidth - screenPadding - width
1704
- ]);
1705
- const top = clamp(topSuggestion, [
1706
- screenPadding,
1707
- windowHeight - screenPadding - height
1708
- ]);
1709
- return {
1710
- left,
1711
- top,
1712
- maxWidth,
1713
- maxHeight
1714
- };
1715
- }
1716
- function useFloatingElement({
1717
- active = true,
1718
- windowRef,
1719
- anchorRef,
1720
- containerRef,
1721
- isPolling = false,
1722
- pollingInterval = 100,
1723
- verticalAlignment = "afterEnd",
1724
- horizontalAlignment = "afterStart",
1725
- screenPadding = 16,
1726
- gap = 4
1727
- }) {
1728
- const [style, setStyle] = (0, import_react14.useState)();
1729
- const isMounted = useIsMounted();
1730
- const calculate = (0, import_react14.useCallback)(() => {
1731
- const containerRect = containerRef.current.getBoundingClientRect();
1732
- const windowRect = windowRef?.current.getBoundingClientRect() ?? {
1733
- top: 0,
1734
- bottom: window.innerHeight,
1735
- left: 0,
1736
- right: window.innerWidth,
1737
- width: window.innerWidth,
1738
- height: window.innerHeight
1739
- };
1740
- const anchorElement = anchorRef?.current;
1741
- if (anchorRef && !anchorElement) {
1742
- console.warn("FloatingContainer anchor provided, but its value is undefined");
1743
- }
1744
- const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
1745
- const calculateProps = {
1746
- windowRect,
1747
- anchorRect,
1748
- containerRect,
1749
- options: {
1750
- horizontalAlignment,
1751
- verticalAlignment,
1752
- screenPadding,
1753
- gap
1754
- }
1755
- };
1756
- setStyle(calculatePosition(calculateProps));
1757
- }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
1758
- const height = containerRef.current?.getBoundingClientRect().height;
1759
- const width = containerRef.current?.getBoundingClientRect().width;
1760
- (0, import_react14.useEffect)(() => {
1761
- if (active && isMounted) {
1762
- calculate();
1763
- } else {
1764
- setStyle(void 0);
1765
- }
1766
- }, [calculate, active, isMounted, height, width]);
1767
- (0, import_react14.useEffect)(() => {
1768
- window.addEventListener("resize", calculate);
1769
- let timeout;
1770
- if (isPolling) {
1771
- timeout = setInterval(calculate, pollingInterval);
1772
- }
1773
- return () => {
1774
- window.removeEventListener("resize", calculate);
1775
- if (timeout) {
1776
- clearInterval(timeout);
1777
- }
1778
- };
1779
- }, [calculate, isPolling, pollingInterval]);
1780
- return style;
1781
- }
1782
-
1783
- // src/components/user-action/select/Select.tsx
1784
- var import_react_dom2 = require("react-dom");
1785
- var import_jsx_runtime10 = require("react/jsx-runtime");
1786
- var defaultToggleOpenOptions = {
1787
- highlightStartPositionBehavior: "first"
1788
- };
1789
- var SelectContext = (0, import_react15.createContext)(null);
1790
- function useSelectContext() {
1791
- const ctx = (0, import_react15.useContext)(SelectContext);
1792
- if (!ctx) {
1793
- throw new Error("SelectContext must be used within a ListBoxPrimitive");
1794
- }
1795
- return ctx;
1796
- }
1797
- var SelectRoot = ({
1798
- children,
1799
- id,
1800
- value,
1801
- onValueChanged,
1802
- values,
1803
- onValuesChanged,
1804
- isOpen = false,
1805
- disabled = false,
1806
- invalid = false,
1807
- isMultiSelect = false,
1808
- iconAppearance = "left"
1809
- }) => {
1810
- const triggerRef = (0, import_react15.useRef)(null);
1811
- const generatedId = (0, import_react15.useId)();
1812
- const usedId = id ?? generatedId;
1813
- const [internalState, setInternalState] = (0, import_react15.useState)({
1814
- isOpen,
1815
- options: []
1816
- });
1817
- const selectedValues = (0, import_react15.useMemo)(
1818
- () => isMultiSelect ? values ?? [] : [value].filter(Boolean),
1819
- [isMultiSelect, value, values]
1820
- );
1821
- const selectedOptions = (0, import_react15.useMemo)(
1822
- () => selectedValues.map((value2) => internalState.options.find((option) => value2 === option.value)).filter(Boolean),
1823
- [selectedValues, internalState.options]
1824
- );
1825
- const state = {
1826
- ...internalState,
1827
- id: usedId,
1828
- disabled,
1829
- invalid,
1830
- value: selectedValues,
1831
- selectedOptions
1832
- };
1833
- const config = {
1834
- isMultiSelect,
1835
- iconAppearance
1836
- };
1837
- const registerItem = (0, import_react15.useCallback)((item) => {
1838
- setInternalState((prev) => {
1839
- const updatedOptions = [...prev.options, item];
1840
- updatedOptions.sort((a, b) => {
1841
- const aEl = a.ref.current;
1842
- const bEl = b.ref.current;
1843
- if (!aEl || !bEl) return 0;
1844
- return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
1845
- });
1846
- return {
1847
- ...prev,
1848
- options: updatedOptions
1849
- };
1850
- });
1851
- }, []);
1852
- const unregisterItem = (0, import_react15.useCallback)((value2) => {
1853
- setInternalState((prev) => {
1854
- const updatedOptions = prev.options.filter((i) => i.value !== value2);
1855
- return {
1856
- ...prev,
1857
- options: updatedOptions
1858
- };
1859
- });
1860
- }, []);
1861
- const toggleSelection = (value2, isSelected) => {
1862
- if (disabled) {
1863
- return;
1864
- }
1865
- const option = state.options.find((i) => i.value === value2);
1866
- if (!option) {
1867
- console.error(`SelectOption with value: ${value2} not found`);
1868
- return;
1869
- }
1870
- let newValue;
1871
- if (isMultiSelect) {
1872
- const isSelectedBefore = state.value.includes(value2);
1873
- const isSelectedAfter = isSelected ?? !isSelectedBefore;
1874
- if (!isSelectedAfter) {
1875
- newValue = state.value.filter((v) => v !== value2);
1876
- } else {
1877
- newValue = [...state.value, value2];
1878
- }
1879
- } else {
1880
- newValue = [value2];
1881
- }
1882
- if (!isMultiSelect) {
1883
- onValueChanged?.(newValue[0]);
1884
- } else {
1885
- onValuesChanged?.(newValue);
1886
- }
1887
- setInternalState((prevState) => ({
1888
- ...prevState,
1889
- highlightedValue: value2
1890
- }));
1891
- };
1892
- const highlightItem = (value2) => {
1893
- if (disabled) {
1894
- return;
1895
- }
1896
- setInternalState((prevState) => ({
1897
- ...prevState,
1898
- highlightedValue: value2
1899
- }));
1900
- };
1901
- const registerTrigger = (0, import_react15.useCallback)((ref) => {
1902
- triggerRef.current = ref.current;
1903
- }, []);
1904
- const unregisterTrigger = (0, import_react15.useCallback)(() => {
1905
- triggerRef.current = null;
1906
- }, []);
1907
- const toggleOpen = (isOpen2, toggleOpenOptions) => {
1908
- const { highlightStartPositionBehavior } = { ...defaultToggleOpenOptions, ...toggleOpenOptions };
1909
- let firstSelectedValue;
1910
- let firstEnabledValue;
1911
- for (let i = 0; i < state.options.length; i++) {
1912
- const currentOption = state.options[highlightStartPositionBehavior === "first" ? i : state.options.length - i - 1];
1913
- if (!currentOption.disabled) {
1914
- if (!firstEnabledValue) {
1915
- firstEnabledValue = currentOption.value;
1916
- }
1917
- if (selectedValues.includes(currentOption.value)) {
1918
- firstSelectedValue = currentOption.value;
1919
- break;
1920
- }
1921
- }
1922
- }
1923
- setInternalState((prevState) => ({
1924
- ...prevState,
1925
- isOpen: isOpen2 ?? !prevState.isOpen,
1926
- highlightedValue: firstSelectedValue ?? firstEnabledValue
1927
- }));
1928
- };
1929
- const moveHighlightedIndex = (delta) => {
1930
- let highlightedIndex = state.options.findIndex((value2) => value2.value === internalState.highlightedValue);
1931
- if (highlightedIndex === -1) {
1932
- highlightedIndex = 0;
1933
- }
1934
- const optionLength = state.options.length;
1935
- const startIndex = (highlightedIndex + delta % optionLength + optionLength) % optionLength;
1936
- const isForward = delta >= 0;
1937
- let highlightedValue = state.options[startIndex].value;
1938
- for (let i = 0; i < state.options.length; i++) {
1939
- const index = (startIndex + (isForward ? i : -i) + optionLength) % optionLength;
1940
- if (!state.options[index].disabled) {
1941
- highlightedValue = state.options[index].value;
1942
- break;
1943
- }
1944
- }
1945
- setInternalState((prevState) => ({
1946
- ...prevState,
1947
- highlightedValue
1948
- }));
1949
- };
1950
- (0, import_react15.useEffect)(() => {
1951
- if (!internalState.highlightedValue) return;
1952
- const highlighted = internalState.options.find((value2) => value2.value === internalState.highlightedValue);
1953
- if (highlighted) {
1954
- highlighted.ref.current?.scrollIntoView({ behavior: "instant", block: "nearest" });
1955
- } else {
1956
- console.error(`SelectRoot: Could not find highlighted value (${internalState.highlightedValue})`);
1957
- }
1958
- }, [internalState.highlightedValue]);
1959
- const contextValue = {
1960
- state,
1961
- config,
1962
- item: {
1963
- register: registerItem,
1964
- unregister: unregisterItem,
1965
- toggleSelection,
1966
- highlightItem,
1967
- moveHighlightedIndex
1968
- },
1969
- trigger: {
1970
- ref: triggerRef,
1971
- register: registerTrigger,
1972
- unregister: unregisterTrigger,
1973
- toggleOpen
1974
- }
1975
- };
1976
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectContext.Provider, { value: contextValue, children });
1977
- };
1978
- var SelectOption = (0, import_react15.forwardRef)(
1979
- function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
1980
- const { state, config, item, trigger } = useSelectContext();
1981
- const { register, unregister, toggleSelection, highlightItem } = item;
1982
- const itemRef = (0, import_react15.useRef)(null);
1983
- iconAppearance ??= config.iconAppearance;
1984
- const label = children ?? value;
1985
- (0, import_react15.useEffect)(() => {
1986
- register({
1987
- value,
1988
- label,
1989
- disabled,
1990
- ref: itemRef
1991
- });
1992
- return () => unregister(value);
1993
- }, [value, disabled, register, unregister, children, label]);
1994
- const isHighlighted = state.highlightedValue === value;
1995
- const isSelected = state.value.includes(value);
1996
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1997
- "li",
1998
- {
1999
- ...restProps,
2000
- ref: (node) => {
2001
- itemRef.current = node;
2002
- if (typeof ref === "function") ref(node);
2003
- else if (ref) ref.current = node;
2004
- },
2005
- id: value,
2006
- role: "option",
2007
- "aria-disabled": disabled,
2008
- "aria-selected": isSelected,
2009
- "data-highlighted": isHighlighted ? "" : void 0,
2010
- "data-selected": isSelected ? "" : void 0,
2011
- "data-disabled": disabled ? "" : void 0,
2012
- className: (0, import_clsx7.default)(
2013
- "flex-row-1 items-center px-2 py-1 rounded-md",
2014
- "data-highlighted:bg-primary/20",
2015
- "data-disabled:text-disabled data-disabled:cursor-not-allowed",
2016
- "not-data-disabled:cursor-pointer",
2017
- className
2018
- ),
2019
- onClick: (event) => {
2020
- if (!disabled) {
2021
- toggleSelection(value);
2022
- if (!config.isMultiSelect) {
2023
- trigger.toggleOpen(false);
2024
- }
2025
- restProps.onClick?.(event);
2026
- }
2027
- },
2028
- onMouseEnter: (event) => {
2029
- if (!disabled) {
2030
- highlightItem(value);
2031
- restProps.onMouseEnter?.(event);
2032
- }
2033
- },
2034
- children: [
2035
- iconAppearance === "left" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2036
- import_lucide_react3.CheckIcon,
2037
- {
2038
- className: (0, import_clsx7.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
2039
- "aria-hidden": true
2040
- }
2041
- ),
2042
- label,
2043
- iconAppearance === "right" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2044
- import_lucide_react3.CheckIcon,
2045
- {
2046
- className: (0, import_clsx7.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
2047
- "aria-hidden": true
2048
- }
2049
- )
2050
- ]
2051
- }
2052
- );
2053
- }
2054
- );
2055
- var SelectButton = (0, import_react15.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
2056
- const translation = useHightideTranslation();
2057
- const { state, trigger } = useSelectContext();
2058
- const { register, unregister, toggleOpen } = trigger;
2059
- const innerRef = (0, import_react15.useRef)(null);
2060
- (0, import_react15.useImperativeHandle)(ref, () => innerRef.current);
2061
- (0, import_react15.useEffect)(() => {
2062
- register(innerRef);
2063
- return () => unregister();
2064
- }, [register, unregister]);
2065
- const disabled = !!props?.disabled || !!state.disabled;
2066
- const invalid = state.invalid;
2067
- const hasValue = state.value.length > 0;
2068
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2069
- "button",
2070
- {
2071
- ...props,
2072
- ref: innerRef,
2073
- id: state.id,
2074
- disabled,
2075
- onClick: (event) => {
2076
- props.onClick?.(event);
2077
- toggleOpen(!state.isOpen);
2078
- },
2079
- onKeyDown: (event) => {
2080
- props.onKeyDown?.(event);
2081
- switch (event.key) {
2082
- case "ArrowDown":
2083
- toggleOpen(true, { highlightStartPositionBehavior: "first" });
2084
- event.preventDefault();
2085
- event.stopPropagation();
2086
- break;
2087
- case "ArrowUp":
2088
- toggleOpen(true, { highlightStartPositionBehavior: "last" });
2089
- event.preventDefault();
2090
- event.stopPropagation();
2091
- break;
2092
- }
2093
- },
2094
- className: (0, import_clsx7.default)(
2095
- "flex-row-2 items-center justify-between rounded-md px-3 py-2",
2096
- {
2097
- "bg-input-background text-placeholder": !hasValue && !disabled && !invalid,
2098
- "bg-input-background text-input-text": hasValue && !disabled && !invalid,
2099
- "bg-negative/20": !disabled && invalid,
2100
- "text-placeholder": !hasValue && !disabled,
2101
- "text-negative": hasValue && !disabled && invalid,
2102
- "bg-disabled-background text-disabled": disabled
2103
- },
2104
- props.className
2105
- ),
2106
- "data-placeholder": !hasValue ? "" : void 0,
2107
- "data-disabled": disabled ? "" : void 0,
2108
- "data-invalid": invalid ? "" : void 0,
2109
- "aria-invalid": invalid,
2110
- "aria-disabled": disabled,
2111
- "aria-haspopup": "listbox",
2112
- "aria-expanded": state.isOpen,
2113
- "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
2114
- children: [
2115
- hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_clsx7.default)("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "flex-row-0", children: [
2116
- label,
2117
- index < state.value.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "," })
2118
- ] }, value)) }) : placeholder ?? translation("clickToSelect"),
2119
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2120
- ExpansionIcon,
2121
- {
2122
- isExpanded: state.isOpen,
2123
- className: (0, import_clsx7.default)({
2124
- "text-input-text": !disabled && !invalid,
2125
- "text-negative": !disabled && invalid,
2126
- "text-disabled": disabled
2127
- })
2128
- }
2129
- )
2130
- ]
2131
- }
2132
- );
2133
- });
2134
- var SelectChipDisplay = (0, import_react15.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
2135
- const { state, trigger, item } = useSelectContext();
2136
- const { register, unregister, toggleOpen } = trigger;
2137
- const innerRef = (0, import_react15.useRef)(null);
2138
- (0, import_react15.useImperativeHandle)(ref, () => innerRef.current);
2139
- (0, import_react15.useEffect)(() => {
2140
- register(innerRef);
2141
- return () => unregister();
2142
- }, [register, unregister]);
2143
- const disabled = !!props?.disabled || !!state.disabled;
2144
- const invalid = state.invalid;
2145
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2146
- "div",
2147
- {
2148
- ...props,
2149
- ref: innerRef,
2150
- className: (0, import_clsx7.default)(
2151
- "flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
2152
- props.className
2153
- ),
2154
- "data-disabled": disabled ? "" : void 0,
2155
- "data-invalid": invalid ? "" : void 0,
2156
- "aria-invalid": invalid,
2157
- "aria-disabled": disabled,
2158
- children: [
2159
- state.selectedOptions.map(({ value, label }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Chip, { className: "gap-x-2", children: [
2160
- label,
2161
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2162
- TextButton,
2163
- {
2164
- onClick: () => {
2165
- item.toggleSelection(value, false);
2166
- },
2167
- size: "none",
2168
- color: "negative",
2169
- className: "flex-row-0 items-center px-0.5 py-0.5 w-6 h-6 rounded",
2170
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react3.XIcon, { className: "w-5 h-5" })
2171
- }
2172
- )
2173
- ] }, value)),
2174
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2175
- IconButton,
2176
- {
2177
- id: state.id,
2178
- onClick: () => toggleOpen(),
2179
- onKeyDown: (event) => {
2180
- switch (event.key) {
2181
- case "ArrowDown":
2182
- toggleOpen(true, { highlightStartPositionBehavior: "first" });
2183
- break;
2184
- case "ArrowUp":
2185
- toggleOpen(true, { highlightStartPositionBehavior: "last" });
2186
- }
2187
- },
2188
- size: "small",
2189
- color: "neutral",
2190
- "aria-invalid": invalid,
2191
- "aria-disabled": disabled,
2192
- "aria-haspopup": "listbox",
2193
- "aria-expanded": state.isOpen,
2194
- "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
2195
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react3.Plus, {})
2196
- }
2197
- )
2198
- ]
2199
- }
2200
- );
2201
- });
2202
- var SelectContent = (0, import_react15.forwardRef)(
2203
- function SelectContent2({
2204
- alignment,
2205
- orientation = "vertical",
2206
- containerClassName,
2207
- ...props
2208
- }, ref) {
2209
- const innerRef = (0, import_react15.useRef)(null);
2210
- (0, import_react15.useImperativeHandle)(ref, () => innerRef.current);
2211
- const { trigger, state, config, item } = useSelectContext();
2212
- const position = useFloatingElement({
2213
- active: state.isOpen,
2214
- anchorRef: trigger.ref,
2215
- containerRef: innerRef,
2216
- ...alignment
2217
- });
2218
- useFocusTrap({
2219
- container: innerRef,
2220
- active: state.isOpen && !!position
2221
- });
2222
- return (0, import_react_dom2.createPortal)(
2223
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2224
- "div",
2225
- {
2226
- id: `select-container-${state.id}`,
2227
- className: (0, import_clsx7.default)("fixed inset-0 w-screen h-screen", containerClassName),
2228
- hidden: !state.isOpen,
2229
- children: [
2230
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2231
- "div",
2232
- {
2233
- id: `select-background-${state.id}`,
2234
- onClick: () => trigger.toggleOpen(false),
2235
- className: (0, import_clsx7.default)("fixed inset-0 w-screen h-screen")
2236
- }
2237
- ),
2238
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2239
- "ul",
2240
- {
2241
- ...props,
2242
- id: `${state.id}-listbox`,
2243
- ref: innerRef,
2244
- onKeyDown: (event) => {
2245
- switch (event.key) {
2246
- case "Escape":
2247
- trigger.toggleOpen(false);
2248
- event.preventDefault();
2249
- event.stopPropagation();
2250
- break;
2251
- case match(orientation, {
2252
- vertical: "ArrowDown",
2253
- horizontal: "ArrowUp"
2254
- }):
2255
- item.moveHighlightedIndex(1);
2256
- event.preventDefault();
2257
- break;
2258
- case match(orientation, {
2259
- vertical: "ArrowUp",
2260
- horizontal: "ArrowDown"
2261
- }):
2262
- item.moveHighlightedIndex(-1);
2263
- event.preventDefault();
2264
- break;
2265
- case "Home":
2266
- event.preventDefault();
2267
- break;
2268
- case "End":
2269
- event.preventDefault();
2270
- break;
2271
- case "Enter":
2272
- // Fall through
2273
- case " ":
2274
- if (state.highlightedValue) {
2275
- item.toggleSelection(state.highlightedValue);
2276
- if (!config.isMultiSelect) {
2277
- trigger.toggleOpen(false);
2278
- }
2279
- event.preventDefault();
2280
- }
2281
- break;
2282
- }
2283
- },
2284
- className: (0, import_clsx7.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
2285
- style: {
2286
- opacity: position ? void 0 : 0,
2287
- position: "fixed",
2288
- ...position
2289
- },
2290
- role: "listbox",
2291
- "aria-multiselectable": config.isMultiSelect,
2292
- "aria-orientation": orientation,
2293
- tabIndex: position ? 0 : void 0,
2294
- children: props.children
2295
- }
2296
- )
2297
- ]
2298
- }
2299
- ),
2300
- document.body
2301
- );
2302
- }
2303
- );
2304
- var Select = (0, import_react15.forwardRef)(function Select2({
2305
- children,
2306
- contentPanelProps,
2307
- buttonProps,
2308
- ...props
2309
- }, ref) {
2310
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(SelectRoot, { ...props, isMultiSelect: false, children: [
2311
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2312
- SelectButton,
2313
- {
2314
- ref,
2315
- ...buttonProps,
2316
- selectedDisplay: (values) => {
2317
- const value = values[0];
2318
- if (!buttonProps?.selectedDisplay) return void 0;
2319
- return buttonProps.selectedDisplay(value);
2320
- }
2321
- }
2322
- ),
2323
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectContent, { ...contentPanelProps, children })
2324
- ] });
2325
- });
2326
- var SelectUncontrolled = (0, import_react15.forwardRef)(function SelectUncontrolled2({
2327
- value: initialValue,
2328
- onValueChanged,
2329
- ...props
2330
- }, ref) {
2331
- const [value, setValue] = useOverwritableState(initialValue, onValueChanged);
2332
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2333
- Select,
2334
- {
2335
- ...props,
2336
- ref,
2337
- value,
2338
- onValueChanged: setValue
2339
- }
2340
- );
2341
- });
2342
- var MultiSelect = (0, import_react15.forwardRef)(function MultiSelect2({
2343
- children,
2344
- contentPanelProps,
2345
- buttonProps,
2346
- ...props
2347
- }, ref) {
2348
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(SelectRoot, { ...props, isMultiSelect: true, children: [
2349
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectButton, { ref, ...buttonProps }),
2350
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectContent, { ...contentPanelProps, children })
2351
- ] });
2352
- });
2353
- var MultiSelectUncontrolled = (0, import_react15.forwardRef)(function MultiSelectUncontrolled2({
2354
- values: initialValues,
2355
- onValuesChanged,
2356
- ...props
2357
- }, ref) {
2358
- const [values, setValues] = useOverwritableState(initialValues, onValuesChanged);
2359
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2360
- MultiSelect,
2361
- {
2362
- ...props,
2363
- ref,
2364
- values,
2365
- onValuesChanged: setValues
2366
- }
2367
- );
2368
- });
2369
- var MultiSelectChipDisplay = (0, import_react15.forwardRef)(function MultiSelectChipDisplay2({
2370
- children,
2371
- contentPanelProps,
2372
- chipDisplayProps,
2373
- ...props
2374
- }, ref) {
2375
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(SelectRoot, { ...props, isMultiSelect: true, children: [
2376
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectChipDisplay, { ref, ...chipDisplayProps }),
2377
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectContent, { ...contentPanelProps, children })
2378
- ] });
2379
- });
2380
- var MultiSelectChipDisplayUncontrolled = (0, import_react15.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
2381
- values: initialValues,
2382
- onValuesChanged,
2383
- ...props
2384
- }, ref) {
2385
- const [values, setValues] = useOverwritableState(initialValues, onValuesChanged);
2386
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2387
- MultiSelectChipDisplay,
2388
- {
2389
- ...props,
2390
- ref,
2391
- values,
2392
- onValuesChanged: setValues
2393
- }
2394
- );
2395
- });
2396
-
2397
- // src/components/dialog/LanguageDialog.tsx
2398
- var import_jsx_runtime11 = require("react/jsx-runtime");
2399
- var LanguageDialog = ({
2400
- onClose,
2401
- titleOverwrite,
2402
- descriptionOverwrite,
2403
- ...props
2404
- }) => {
2405
- const { locale, setLocale } = useLocale();
2406
- const translation = useHightideTranslation();
2407
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2408
- Dialog,
2409
- {
2410
- titleElement: titleOverwrite ?? translation("language"),
2411
- description: descriptionOverwrite ?? translation("chooseLanguage"),
2412
- onClose,
2413
- ...props,
2414
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w-64", children: [
2415
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2416
- Select,
2417
- {
2418
- value: locale,
2419
- onValueChanged: (language) => setLocale(language),
2420
- contentPanelProps: { containerClassName: "z-200" },
2421
- buttonProps: {
2422
- selectedDisplay: (locale2) => LocalizationUtil.languagesLocalNames[locale2]
2423
- },
2424
- children: LocalizationUtil.locals.map((local) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectOption, { value: local, children: LocalizationUtil.languagesLocalNames[local] }, local))
2425
- }
2426
- ),
2427
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SolidButton, { color: "positive", onClick: onClose, children: translation("done") }) })
2428
- ] })
2429
- }
2430
- );
2431
- };
2432
-
2433
- // src/components/dialog/ThemeDialog.tsx
2434
- var import_lucide_react4 = require("lucide-react");
2435
- var import_clsx8 = __toESM(require("clsx"), 1);
2436
-
2437
- // src/theming/useTheme.tsx
2438
- var import_react16 = require("react");
2439
- var import_jsx_runtime12 = require("react/jsx-runtime");
2440
- var themes = ["light", "dark", "system"];
2441
- var ThemeUtil = {
2442
- themes
2443
- };
2444
- var ThemeContext = (0, import_react16.createContext)(null);
2445
- var useTheme = () => {
2446
- const context = (0, import_react16.useContext)(ThemeContext);
2447
- if (!context) {
2448
- throw new Error("useTheme must be used within ThemeContext. Try adding a ThemeProvider around your app.");
2449
- }
2450
- return context;
2451
- };
2452
-
2453
- // src/components/dialog/ThemeDialog.tsx
2454
- var import_jsx_runtime13 = require("react/jsx-runtime");
2455
- var ThemeIcon = ({ theme, className }) => {
2456
- if (theme === "dark") {
2457
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react4.MoonIcon, { className: (0, import_clsx8.default)("w-4 h-4", className) });
2458
- } else if (theme === "light") {
2459
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react4.SunIcon, { className: (0, import_clsx8.default)("w-4 h-4", className) });
2460
- } else {
2461
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react4.MonitorCog, { className: (0, import_clsx8.default)("w-4 h-4", className) });
2462
- }
2463
- };
2464
- var ThemeDialog = ({
2465
- onClose,
2466
- titleOverwrite,
2467
- descriptionOverwrite,
2468
- ...props
2469
- }) => {
2470
- const { theme, setTheme } = useTheme();
2471
- const translation = useHightideTranslation();
2472
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2473
- Dialog,
2474
- {
2475
- titleElement: titleOverwrite ?? translation("themes", { count: 1 }),
2476
- description: descriptionOverwrite ?? translation("chooseTheme"),
2477
- onClose,
2478
- ...props,
2479
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w-64", children: [
2480
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2481
- Select,
2482
- {
2483
- value: theme,
2484
- onValueChanged: (theme2) => setTheme(theme2),
2485
- iconAppearance: "right",
2486
- contentPanelProps: {
2487
- containerClassName: "z-200"
2488
- },
2489
- buttonProps: {
2490
- selectedDisplay: (value) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex-row-2 items-center", children: [
2491
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ThemeIcon, { theme }),
2492
- translation("themeMode", { theme: value })
2493
- ] }),
2494
- className: "min-w-32"
2495
- },
2496
- children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectOption, { value: theme2, className: "gap-x-6 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex-row-2 items-center", children: [
2497
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ThemeIcon, { theme: theme2 }),
2498
- translation("themeMode", { theme: theme2 })
2499
- ] }) }, theme2))
2500
- }
2501
- ),
2502
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
2503
- ] })
2504
- }
2505
- );
2506
- };
2507
- // Annotate the CommonJS export names for ESM import in node:
2508
- 0 && (module.exports = {
2509
- ConfirmDialog,
2510
- Dialog,
2511
- DiscardChangesDialog,
2512
- InputDialog,
2513
- LanguageDialog,
2514
- ThemeDialog
2515
- });
2516
- //# sourceMappingURL=index.cjs.map