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