@helpwave/hightide 0.1.45 → 0.1.47

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 (784) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.mts +1990 -0
  3. package/dist/index.d.ts +1990 -113
  4. package/dist/index.js +1514 -1353
  5. package/dist/index.js.map +1 -1
  6. package/dist/{components/index.js → index.mjs} +728 -18
  7. package/dist/index.mjs.map +1 -0
  8. package/package.json +5 -12
  9. package/dist/coloring/index.cjs +0 -85
  10. package/dist/coloring/index.cjs.map +0 -1
  11. package/dist/coloring/index.d.cts +0 -2
  12. package/dist/coloring/index.d.ts +0 -2
  13. package/dist/coloring/index.js +0 -48
  14. package/dist/coloring/index.js.map +0 -1
  15. package/dist/coloring/shading.cjs +0 -81
  16. package/dist/coloring/shading.cjs.map +0 -1
  17. package/dist/coloring/shading.d.cts +0 -5
  18. package/dist/coloring/shading.d.ts +0 -5
  19. package/dist/coloring/shading.js +0 -47
  20. package/dist/coloring/shading.js.map +0 -1
  21. package/dist/coloring/types.cjs +0 -30
  22. package/dist/coloring/types.cjs.map +0 -1
  23. package/dist/coloring/types.d.cts +0 -13
  24. package/dist/coloring/types.d.ts +0 -13
  25. package/dist/coloring/types.js +0 -6
  26. package/dist/coloring/types.js.map +0 -1
  27. package/dist/components/branding/HelpwaveBadge.cjs +0 -140
  28. package/dist/components/branding/HelpwaveBadge.cjs.map +0 -1
  29. package/dist/components/branding/HelpwaveBadge.d.cts +0 -13
  30. package/dist/components/branding/HelpwaveBadge.d.ts +0 -13
  31. package/dist/components/branding/HelpwaveBadge.js +0 -104
  32. package/dist/components/branding/HelpwaveBadge.js.map +0 -1
  33. package/dist/components/branding/index.cjs +0 -140
  34. package/dist/components/branding/index.cjs.map +0 -1
  35. package/dist/components/branding/index.d.cts +0 -3
  36. package/dist/components/branding/index.d.ts +0 -3
  37. package/dist/components/branding/index.js +0 -104
  38. package/dist/components/branding/index.js.map +0 -1
  39. package/dist/components/date/DatePicker.cjs +0 -1318
  40. package/dist/components/date/DatePicker.cjs.map +0 -1
  41. package/dist/components/date/DatePicker.d.cts +0 -26
  42. package/dist/components/date/DatePicker.d.ts +0 -26
  43. package/dist/components/date/DatePicker.js +0 -1283
  44. package/dist/components/date/DatePicker.js.map +0 -1
  45. package/dist/components/date/DayPicker.cjs +0 -261
  46. package/dist/components/date/DayPicker.cjs.map +0 -1
  47. package/dist/components/date/DayPicker.d.cts +0 -20
  48. package/dist/components/date/DayPicker.d.ts +0 -20
  49. package/dist/components/date/DayPicker.js +0 -224
  50. package/dist/components/date/DayPicker.js.map +0 -1
  51. package/dist/components/date/TimeDisplay.cjs +0 -638
  52. package/dist/components/date/TimeDisplay.cjs.map +0 -1
  53. package/dist/components/date/TimeDisplay.d.cts +0 -13
  54. package/dist/components/date/TimeDisplay.d.ts +0 -13
  55. package/dist/components/date/TimeDisplay.js +0 -612
  56. package/dist/components/date/TimeDisplay.js.map +0 -1
  57. package/dist/components/date/TimePicker.cjs +0 -237
  58. package/dist/components/date/TimePicker.cjs.map +0 -1
  59. package/dist/components/date/TimePicker.d.cts +0 -15
  60. package/dist/components/date/TimePicker.d.ts +0 -15
  61. package/dist/components/date/TimePicker.js +0 -202
  62. package/dist/components/date/TimePicker.js.map +0 -1
  63. package/dist/components/date/YearMonthPicker.cjs +0 -536
  64. package/dist/components/date/YearMonthPicker.cjs.map +0 -1
  65. package/dist/components/date/YearMonthPicker.d.cts +0 -15
  66. package/dist/components/date/YearMonthPicker.d.ts +0 -15
  67. package/dist/components/date/YearMonthPicker.js +0 -501
  68. package/dist/components/date/YearMonthPicker.js.map +0 -1
  69. package/dist/components/date/index.cjs +0 -1556
  70. package/dist/components/date/index.cjs.map +0 -1
  71. package/dist/components/date/index.d.cts +0 -7
  72. package/dist/components/date/index.d.ts +0 -7
  73. package/dist/components/date/index.js +0 -1512
  74. package/dist/components/date/index.js.map +0 -1
  75. package/dist/components/dialog/ConfirmDialog.cjs +0 -1165
  76. package/dist/components/dialog/ConfirmDialog.cjs.map +0 -1
  77. package/dist/components/dialog/ConfirmDialog.d.cts +0 -29
  78. package/dist/components/dialog/ConfirmDialog.d.ts +0 -29
  79. package/dist/components/dialog/ConfirmDialog.js +0 -1129
  80. package/dist/components/dialog/ConfirmDialog.js.map +0 -1
  81. package/dist/components/dialog/Dialog.cjs +0 -1108
  82. package/dist/components/dialog/Dialog.cjs.map +0 -1
  83. package/dist/components/dialog/Dialog.d.cts +0 -27
  84. package/dist/components/dialog/Dialog.d.ts +0 -27
  85. package/dist/components/dialog/Dialog.js +0 -1075
  86. package/dist/components/dialog/Dialog.js.map +0 -1
  87. package/dist/components/dialog/DiscardChangesDialog.cjs +0 -1192
  88. package/dist/components/dialog/DiscardChangesDialog.cjs.map +0 -1
  89. package/dist/components/dialog/DiscardChangesDialog.d.cts +0 -18
  90. package/dist/components/dialog/DiscardChangesDialog.d.ts +0 -18
  91. package/dist/components/dialog/DiscardChangesDialog.js +0 -1156
  92. package/dist/components/dialog/DiscardChangesDialog.js.map +0 -1
  93. package/dist/components/dialog/InputDialog.cjs +0 -1369
  94. package/dist/components/dialog/InputDialog.cjs.map +0 -1
  95. package/dist/components/dialog/InputDialog.d.cts +0 -17
  96. package/dist/components/dialog/InputDialog.d.ts +0 -17
  97. package/dist/components/dialog/InputDialog.js +0 -1333
  98. package/dist/components/dialog/InputDialog.js.map +0 -1
  99. package/dist/components/dialog/LanguageDialog.cjs +0 -2149
  100. package/dist/components/dialog/LanguageDialog.cjs.map +0 -1
  101. package/dist/components/dialog/LanguageDialog.d.cts +0 -16
  102. package/dist/components/dialog/LanguageDialog.d.ts +0 -16
  103. package/dist/components/dialog/LanguageDialog.js +0 -2124
  104. package/dist/components/dialog/LanguageDialog.js.map +0 -1
  105. package/dist/components/dialog/ThemeDialog.cjs +0 -2188
  106. package/dist/components/dialog/ThemeDialog.cjs.map +0 -1
  107. package/dist/components/dialog/ThemeDialog.d.cts +0 -16
  108. package/dist/components/dialog/ThemeDialog.d.ts +0 -16
  109. package/dist/components/dialog/ThemeDialog.js +0 -2163
  110. package/dist/components/dialog/ThemeDialog.js.map +0 -1
  111. package/dist/components/dialog/index.cjs +0 -2516
  112. package/dist/components/dialog/index.cjs.map +0 -1
  113. package/dist/components/dialog/index.d.cts +0 -11
  114. package/dist/components/dialog/index.d.ts +0 -11
  115. package/dist/components/dialog/index.js +0 -2486
  116. package/dist/components/dialog/index.js.map +0 -1
  117. package/dist/components/form/FormElementWrapper.cjs +0 -167
  118. package/dist/components/form/FormElementWrapper.cjs.map +0 -1
  119. package/dist/components/form/FormElementWrapper.d.cts +0 -35
  120. package/dist/components/form/FormElementWrapper.d.ts +0 -35
  121. package/dist/components/form/FormElementWrapper.js +0 -133
  122. package/dist/components/form/FormElementWrapper.js.map +0 -1
  123. package/dist/components/form/index.cjs +0 -169
  124. package/dist/components/form/index.cjs.map +0 -1
  125. package/dist/components/form/index.d.cts +0 -5
  126. package/dist/components/form/index.d.ts +0 -5
  127. package/dist/components/form/index.js +0 -133
  128. package/dist/components/form/index.js.map +0 -1
  129. package/dist/components/icons-and-geometry/Avatar.cjs +0 -670
  130. package/dist/components/icons-and-geometry/Avatar.cjs.map +0 -1
  131. package/dist/components/icons-and-geometry/Avatar.d.cts +0 -36
  132. package/dist/components/icons-and-geometry/Avatar.d.ts +0 -36
  133. package/dist/components/icons-and-geometry/Avatar.js +0 -663
  134. package/dist/components/icons-and-geometry/Avatar.js.map +0 -1
  135. package/dist/components/icons-and-geometry/Circle.cjs +0 -61
  136. package/dist/components/icons-and-geometry/Circle.cjs.map +0 -1
  137. package/dist/components/icons-and-geometry/Circle.d.cts +0 -10
  138. package/dist/components/icons-and-geometry/Circle.d.ts +0 -10
  139. package/dist/components/icons-and-geometry/Circle.js +0 -27
  140. package/dist/components/icons-and-geometry/Circle.js.map +0 -1
  141. package/dist/components/icons-and-geometry/HelpwaveLogo.cjs +0 -98
  142. package/dist/components/icons-and-geometry/HelpwaveLogo.cjs.map +0 -1
  143. package/dist/components/icons-and-geometry/HelpwaveLogo.d.cts +0 -14
  144. package/dist/components/icons-and-geometry/HelpwaveLogo.d.ts +0 -14
  145. package/dist/components/icons-and-geometry/HelpwaveLogo.js +0 -74
  146. package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +0 -1
  147. package/dist/components/icons-and-geometry/Ring.cjs +0 -333
  148. package/dist/components/icons-and-geometry/Ring.cjs.map +0 -1
  149. package/dist/components/icons-and-geometry/Ring.d.cts +0 -35
  150. package/dist/components/icons-and-geometry/Ring.d.ts +0 -35
  151. package/dist/components/icons-and-geometry/Ring.js +0 -296
  152. package/dist/components/icons-and-geometry/Ring.js.map +0 -1
  153. package/dist/components/icons-and-geometry/Tag.cjs +0 -2945
  154. package/dist/components/icons-and-geometry/Tag.cjs.map +0 -1
  155. package/dist/components/icons-and-geometry/Tag.d.cts +0 -16
  156. package/dist/components/icons-and-geometry/Tag.d.ts +0 -16
  157. package/dist/components/icons-and-geometry/Tag.js +0 -2940
  158. package/dist/components/icons-and-geometry/Tag.js.map +0 -1
  159. package/dist/components/icons-and-geometry/index.cjs +0 -3950
  160. package/dist/components/icons-and-geometry/index.cjs.map +0 -1
  161. package/dist/components/icons-and-geometry/index.d.cts +0 -7
  162. package/dist/components/icons-and-geometry/index.d.ts +0 -7
  163. package/dist/components/icons-and-geometry/index.js +0 -3934
  164. package/dist/components/icons-and-geometry/index.js.map +0 -1
  165. package/dist/components/index.cjs +0 -15692
  166. package/dist/components/index.cjs.map +0 -1
  167. package/dist/components/index.d.cts +0 -78
  168. package/dist/components/index.d.ts +0 -78
  169. package/dist/components/index.js.map +0 -1
  170. package/dist/components/layout/Carousel.cjs +0 -1128
  171. package/dist/components/layout/Carousel.cjs.map +0 -1
  172. package/dist/components/layout/Carousel.d.cts +0 -35
  173. package/dist/components/layout/Carousel.d.ts +0 -35
  174. package/dist/components/layout/Carousel.js +0 -1103
  175. package/dist/components/layout/Carousel.js.map +0 -1
  176. package/dist/components/layout/Chip.cjs +0 -123
  177. package/dist/components/layout/Chip.cjs.map +0 -1
  178. package/dist/components/layout/Chip.d.cts +0 -31
  179. package/dist/components/layout/Chip.d.ts +0 -31
  180. package/dist/components/layout/Chip.js +0 -87
  181. package/dist/components/layout/Chip.js.map +0 -1
  182. package/dist/components/layout/DividerInserter.cjs +0 -59
  183. package/dist/components/layout/DividerInserter.cjs.map +0 -1
  184. package/dist/components/layout/DividerInserter.d.cts +0 -15
  185. package/dist/components/layout/DividerInserter.d.ts +0 -15
  186. package/dist/components/layout/DividerInserter.js +0 -25
  187. package/dist/components/layout/DividerInserter.js.map +0 -1
  188. package/dist/components/layout/Expandable.cjs +0 -171
  189. package/dist/components/layout/Expandable.cjs.map +0 -1
  190. package/dist/components/layout/Expandable.d.cts +0 -67
  191. package/dist/components/layout/Expandable.d.ts +0 -67
  192. package/dist/components/layout/Expandable.js +0 -135
  193. package/dist/components/layout/Expandable.js.map +0 -1
  194. package/dist/components/layout/FAQSection.cjs +0 -421
  195. package/dist/components/layout/FAQSection.cjs.map +0 -1
  196. package/dist/components/layout/FAQSection.d.cts +0 -26
  197. package/dist/components/layout/FAQSection.d.ts +0 -26
  198. package/dist/components/layout/FAQSection.js +0 -387
  199. package/dist/components/layout/FAQSection.js.map +0 -1
  200. package/dist/components/layout/FloatingContainer.cjs +0 -220
  201. package/dist/components/layout/FloatingContainer.cjs.map +0 -1
  202. package/dist/components/layout/FloatingContainer.d.cts +0 -38
  203. package/dist/components/layout/FloatingContainer.d.ts +0 -38
  204. package/dist/components/layout/FloatingContainer.js +0 -196
  205. package/dist/components/layout/FloatingContainer.js.map +0 -1
  206. package/dist/components/layout/ListBox.cjs +0 -339
  207. package/dist/components/layout/ListBox.cjs.map +0 -1
  208. package/dist/components/layout/ListBox.d.cts +0 -44
  209. package/dist/components/layout/ListBox.d.ts +0 -44
  210. package/dist/components/layout/ListBox.js +0 -300
  211. package/dist/components/layout/ListBox.js.map +0 -1
  212. package/dist/components/layout/MarkdownInterpreter.cjs +0 -260
  213. package/dist/components/layout/MarkdownInterpreter.cjs.map +0 -1
  214. package/dist/components/layout/MarkdownInterpreter.d.cts +0 -28
  215. package/dist/components/layout/MarkdownInterpreter.d.ts +0 -28
  216. package/dist/components/layout/MarkdownInterpreter.js +0 -235
  217. package/dist/components/layout/MarkdownInterpreter.js.map +0 -1
  218. package/dist/components/layout/ScrollArea.cjs +0 -1252
  219. package/dist/components/layout/ScrollArea.cjs.map +0 -1
  220. package/dist/components/layout/ScrollArea.d.cts +0 -15
  221. package/dist/components/layout/ScrollArea.d.ts +0 -15
  222. package/dist/components/layout/ScrollArea.js +0 -1216
  223. package/dist/components/layout/ScrollArea.js.map +0 -1
  224. package/dist/components/layout/TextImage.cjs +0 -657
  225. package/dist/components/layout/TextImage.cjs.map +0 -1
  226. package/dist/components/layout/TextImage.d.cts +0 -19
  227. package/dist/components/layout/TextImage.d.ts +0 -19
  228. package/dist/components/layout/TextImage.js +0 -623
  229. package/dist/components/layout/TextImage.js.map +0 -1
  230. package/dist/components/layout/VerticalDivider.cjs +0 -80
  231. package/dist/components/layout/VerticalDivider.cjs.map +0 -1
  232. package/dist/components/layout/VerticalDivider.d.cts +0 -15
  233. package/dist/components/layout/VerticalDivider.d.ts +0 -15
  234. package/dist/components/layout/VerticalDivider.js +0 -56
  235. package/dist/components/layout/VerticalDivider.js.map +0 -1
  236. package/dist/components/layout/index.cjs +0 -3434
  237. package/dist/components/layout/index.cjs.map +0 -1
  238. package/dist/components/layout/index.d.cts +0 -15
  239. package/dist/components/layout/index.d.ts +0 -15
  240. package/dist/components/layout/index.js +0 -3387
  241. package/dist/components/layout/index.js.map +0 -1
  242. package/dist/components/loading-states/ErrorComponent.cjs +0 -622
  243. package/dist/components/loading-states/ErrorComponent.cjs.map +0 -1
  244. package/dist/components/loading-states/ErrorComponent.d.cts +0 -12
  245. package/dist/components/loading-states/ErrorComponent.d.ts +0 -12
  246. package/dist/components/loading-states/ErrorComponent.js +0 -588
  247. package/dist/components/loading-states/ErrorComponent.js.map +0 -1
  248. package/dist/components/loading-states/LoadingAndErrorComponent.cjs +0 -67
  249. package/dist/components/loading-states/LoadingAndErrorComponent.cjs.map +0 -1
  250. package/dist/components/loading-states/LoadingAndErrorComponent.d.cts +0 -20
  251. package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +0 -20
  252. package/dist/components/loading-states/LoadingAndErrorComponent.js +0 -43
  253. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +0 -1
  254. package/dist/components/loading-states/LoadingAnimation.cjs +0 -694
  255. package/dist/components/loading-states/LoadingAnimation.cjs.map +0 -1
  256. package/dist/components/loading-states/LoadingAnimation.d.cts +0 -12
  257. package/dist/components/loading-states/LoadingAnimation.d.ts +0 -12
  258. package/dist/components/loading-states/LoadingAnimation.js +0 -658
  259. package/dist/components/loading-states/LoadingAnimation.js.map +0 -1
  260. package/dist/components/loading-states/LoadingButton.cjs +0 -257
  261. package/dist/components/loading-states/LoadingButton.cjs.map +0 -1
  262. package/dist/components/loading-states/LoadingButton.d.cts +0 -10
  263. package/dist/components/loading-states/LoadingButton.d.ts +0 -10
  264. package/dist/components/loading-states/LoadingButton.js +0 -223
  265. package/dist/components/loading-states/LoadingButton.js.map +0 -1
  266. package/dist/components/loading-states/LoadingContainer.cjs +0 -34
  267. package/dist/components/loading-states/LoadingContainer.cjs.map +0 -1
  268. package/dist/components/loading-states/LoadingContainer.d.cts +0 -8
  269. package/dist/components/loading-states/LoadingContainer.d.ts +0 -8
  270. package/dist/components/loading-states/LoadingContainer.js +0 -10
  271. package/dist/components/loading-states/LoadingContainer.js.map +0 -1
  272. package/dist/components/loading-states/ProgressIndicator.cjs +0 -83
  273. package/dist/components/loading-states/ProgressIndicator.cjs.map +0 -1
  274. package/dist/components/loading-states/ProgressIndicator.d.cts +0 -24
  275. package/dist/components/loading-states/ProgressIndicator.d.ts +0 -24
  276. package/dist/components/loading-states/ProgressIndicator.js +0 -59
  277. package/dist/components/loading-states/ProgressIndicator.js.map +0 -1
  278. package/dist/components/loading-states/index.cjs +0 -966
  279. package/dist/components/loading-states/index.cjs.map +0 -1
  280. package/dist/components/loading-states/index.d.cts +0 -9
  281. package/dist/components/loading-states/index.d.ts +0 -9
  282. package/dist/components/loading-states/index.js +0 -925
  283. package/dist/components/loading-states/index.js.map +0 -1
  284. package/dist/components/navigation/BreadCrumb.cjs +0 -3516
  285. package/dist/components/navigation/BreadCrumb.cjs.map +0 -1
  286. package/dist/components/navigation/BreadCrumb.d.cts +0 -20
  287. package/dist/components/navigation/BreadCrumb.d.ts +0 -20
  288. package/dist/components/navigation/BreadCrumb.js +0 -3511
  289. package/dist/components/navigation/BreadCrumb.js.map +0 -1
  290. package/dist/components/navigation/Navigation.cjs +0 -4041
  291. package/dist/components/navigation/Navigation.cjs.map +0 -1
  292. package/dist/components/navigation/Navigation.d.cts +0 -21
  293. package/dist/components/navigation/Navigation.d.ts +0 -21
  294. package/dist/components/navigation/Navigation.js +0 -4035
  295. package/dist/components/navigation/Navigation.js.map +0 -1
  296. package/dist/components/navigation/Pagination.cjs +0 -1007
  297. package/dist/components/navigation/Pagination.cjs.map +0 -1
  298. package/dist/components/navigation/Pagination.d.cts +0 -16
  299. package/dist/components/navigation/Pagination.d.ts +0 -16
  300. package/dist/components/navigation/Pagination.js +0 -973
  301. package/dist/components/navigation/Pagination.js.map +0 -1
  302. package/dist/components/navigation/StepperBar.cjs +0 -903
  303. package/dist/components/navigation/StepperBar.cjs.map +0 -1
  304. package/dist/components/navigation/StepperBar.d.cts +0 -23
  305. package/dist/components/navigation/StepperBar.d.ts +0 -23
  306. package/dist/components/navigation/StepperBar.js +0 -868
  307. package/dist/components/navigation/StepperBar.js.map +0 -1
  308. package/dist/components/navigation/index.cjs +0 -5035
  309. package/dist/components/navigation/index.cjs.map +0 -1
  310. package/dist/components/navigation/index.d.cts +0 -6
  311. package/dist/components/navigation/index.d.ts +0 -6
  312. package/dist/components/navigation/index.js +0 -5023
  313. package/dist/components/navigation/index.js.map +0 -1
  314. package/dist/components/properties/CheckboxProperty.cjs +0 -1736
  315. package/dist/components/properties/CheckboxProperty.cjs.map +0 -1
  316. package/dist/components/properties/CheckboxProperty.d.cts +0 -14
  317. package/dist/components/properties/CheckboxProperty.d.ts +0 -14
  318. package/dist/components/properties/CheckboxProperty.js +0 -1702
  319. package/dist/components/properties/CheckboxProperty.js.map +0 -1
  320. package/dist/components/properties/DateProperty.cjs +0 -1119
  321. package/dist/components/properties/DateProperty.cjs.map +0 -1
  322. package/dist/components/properties/DateProperty.d.cts +0 -16
  323. package/dist/components/properties/DateProperty.d.ts +0 -16
  324. package/dist/components/properties/DateProperty.js +0 -1085
  325. package/dist/components/properties/DateProperty.js.map +0 -1
  326. package/dist/components/properties/MultiSelectProperty.cjs +0 -2058
  327. package/dist/components/properties/MultiSelectProperty.cjs.map +0 -1
  328. package/dist/components/properties/MultiSelectProperty.d.cts +0 -14
  329. package/dist/components/properties/MultiSelectProperty.d.ts +0 -14
  330. package/dist/components/properties/MultiSelectProperty.js +0 -2035
  331. package/dist/components/properties/MultiSelectProperty.js.map +0 -1
  332. package/dist/components/properties/NumberProperty.cjs +0 -1125
  333. package/dist/components/properties/NumberProperty.cjs.map +0 -1
  334. package/dist/components/properties/NumberProperty.d.cts +0 -16
  335. package/dist/components/properties/NumberProperty.d.ts +0 -16
  336. package/dist/components/properties/NumberProperty.js +0 -1091
  337. package/dist/components/properties/NumberProperty.js.map +0 -1
  338. package/dist/components/properties/PropertyBase.cjs +0 -875
  339. package/dist/components/properties/PropertyBase.cjs.map +0 -1
  340. package/dist/components/properties/PropertyBase.d.cts +0 -22
  341. package/dist/components/properties/PropertyBase.d.ts +0 -22
  342. package/dist/components/properties/PropertyBase.js +0 -841
  343. package/dist/components/properties/PropertyBase.js.map +0 -1
  344. package/dist/components/properties/SelectProperty.cjs +0 -2058
  345. package/dist/components/properties/SelectProperty.cjs.map +0 -1
  346. package/dist/components/properties/SelectProperty.d.cts +0 -16
  347. package/dist/components/properties/SelectProperty.d.ts +0 -16
  348. package/dist/components/properties/SelectProperty.js +0 -2035
  349. package/dist/components/properties/SelectProperty.js.map +0 -1
  350. package/dist/components/properties/TextProperty.cjs +0 -1033
  351. package/dist/components/properties/TextProperty.cjs.map +0 -1
  352. package/dist/components/properties/TextProperty.d.cts +0 -15
  353. package/dist/components/properties/TextProperty.d.ts +0 -15
  354. package/dist/components/properties/TextProperty.js +0 -999
  355. package/dist/components/properties/TextProperty.js.map +0 -1
  356. package/dist/components/properties/index.cjs +0 -3383
  357. package/dist/components/properties/index.cjs.map +0 -1
  358. package/dist/components/properties/index.d.cts +0 -9
  359. package/dist/components/properties/index.d.ts +0 -9
  360. package/dist/components/properties/index.js +0 -3352
  361. package/dist/components/properties/index.js.map +0 -1
  362. package/dist/components/table/FillerRowElement.cjs +0 -36
  363. package/dist/components/table/FillerRowElement.cjs.map +0 -1
  364. package/dist/components/table/FillerRowElement.d.cts +0 -8
  365. package/dist/components/table/FillerRowElement.d.ts +0 -8
  366. package/dist/components/table/FillerRowElement.js +0 -12
  367. package/dist/components/table/FillerRowElement.js.map +0 -1
  368. package/dist/components/table/Filter.cjs +0 -41
  369. package/dist/components/table/Filter.cjs.map +0 -1
  370. package/dist/components/table/Filter.d.cts +0 -5
  371. package/dist/components/table/Filter.d.ts +0 -5
  372. package/dist/components/table/Filter.js +0 -17
  373. package/dist/components/table/Filter.js.map +0 -1
  374. package/dist/components/table/Table.cjs +0 -2678
  375. package/dist/components/table/Table.cjs.map +0 -1
  376. package/dist/components/table/Table.d.cts +0 -42
  377. package/dist/components/table/Table.d.ts +0 -42
  378. package/dist/components/table/Table.js +0 -2649
  379. package/dist/components/table/Table.js.map +0 -1
  380. package/dist/components/table/TableCell.cjs +0 -37
  381. package/dist/components/table/TableCell.cjs.map +0 -1
  382. package/dist/components/table/TableCell.d.cts +0 -9
  383. package/dist/components/table/TableCell.d.ts +0 -9
  384. package/dist/components/table/TableCell.js +0 -13
  385. package/dist/components/table/TableCell.js.map +0 -1
  386. package/dist/components/table/TableFilterButton.cjs +0 -1269
  387. package/dist/components/table/TableFilterButton.cjs.map +0 -1
  388. package/dist/components/table/TableFilterButton.d.cts +0 -11
  389. package/dist/components/table/TableFilterButton.d.ts +0 -11
  390. package/dist/components/table/TableFilterButton.js +0 -1233
  391. package/dist/components/table/TableFilterButton.js.map +0 -1
  392. package/dist/components/table/TableSortButton.cjs +0 -206
  393. package/dist/components/table/TableSortButton.cjs.map +0 -1
  394. package/dist/components/table/TableSortButton.d.cts +0 -15
  395. package/dist/components/table/TableSortButton.d.ts +0 -15
  396. package/dist/components/table/TableSortButton.js +0 -172
  397. package/dist/components/table/TableSortButton.js.map +0 -1
  398. package/dist/components/table/index.cjs +0 -2690
  399. package/dist/components/table/index.cjs.map +0 -1
  400. package/dist/components/table/index.d.cts +0 -10
  401. package/dist/components/table/index.d.ts +0 -10
  402. package/dist/components/table/index.js +0 -2654
  403. package/dist/components/table/index.js.map +0 -1
  404. package/dist/components/user-action/Button.cjs +0 -308
  405. package/dist/components/user-action/Button.cjs.map +0 -1
  406. package/dist/components/user-action/Button.d.cts +0 -104
  407. package/dist/components/user-action/Button.d.ts +0 -104
  408. package/dist/components/user-action/Button.js +0 -268
  409. package/dist/components/user-action/Button.js.map +0 -1
  410. package/dist/components/user-action/Checkbox.cjs +0 -878
  411. package/dist/components/user-action/Checkbox.cjs.map +0 -1
  412. package/dist/components/user-action/Checkbox.d.cts +0 -25
  413. package/dist/components/user-action/Checkbox.d.ts +0 -25
  414. package/dist/components/user-action/Checkbox.js +0 -843
  415. package/dist/components/user-action/Checkbox.js.map +0 -1
  416. package/dist/components/user-action/CopyToClipboardWrapper.cjs +0 -695
  417. package/dist/components/user-action/CopyToClipboardWrapper.cjs.map +0 -1
  418. package/dist/components/user-action/CopyToClipboardWrapper.d.cts +0 -30
  419. package/dist/components/user-action/CopyToClipboardWrapper.d.ts +0 -30
  420. package/dist/components/user-action/CopyToClipboardWrapper.js +0 -671
  421. package/dist/components/user-action/CopyToClipboardWrapper.js.map +0 -1
  422. package/dist/components/user-action/DateAndTimePicker.cjs +0 -1492
  423. package/dist/components/user-action/DateAndTimePicker.cjs.map +0 -1
  424. package/dist/components/user-action/DateAndTimePicker.d.cts +0 -25
  425. package/dist/components/user-action/DateAndTimePicker.d.ts +0 -25
  426. package/dist/components/user-action/DateAndTimePicker.js +0 -1458
  427. package/dist/components/user-action/DateAndTimePicker.js.map +0 -1
  428. package/dist/components/user-action/Label.cjs +0 -53
  429. package/dist/components/user-action/Label.cjs.map +0 -1
  430. package/dist/components/user-action/Label.d.cts +0 -14
  431. package/dist/components/user-action/Label.d.ts +0 -14
  432. package/dist/components/user-action/Label.js +0 -19
  433. package/dist/components/user-action/Label.js.map +0 -1
  434. package/dist/components/user-action/Menu.cjs +0 -282
  435. package/dist/components/user-action/Menu.cjs.map +0 -1
  436. package/dist/components/user-action/Menu.d.cts +0 -35
  437. package/dist/components/user-action/Menu.d.ts +0 -35
  438. package/dist/components/user-action/Menu.js +0 -247
  439. package/dist/components/user-action/Menu.js.map +0 -1
  440. package/dist/components/user-action/ScrollPicker.cjs +0 -301
  441. package/dist/components/user-action/ScrollPicker.cjs.map +0 -1
  442. package/dist/components/user-action/ScrollPicker.d.cts +0 -15
  443. package/dist/components/user-action/ScrollPicker.d.ts +0 -15
  444. package/dist/components/user-action/ScrollPicker.js +0 -267
  445. package/dist/components/user-action/ScrollPicker.js.map +0 -1
  446. package/dist/components/user-action/SearchBar.cjs +0 -956
  447. package/dist/components/user-action/SearchBar.cjs.map +0 -1
  448. package/dist/components/user-action/SearchBar.d.cts +0 -13
  449. package/dist/components/user-action/SearchBar.d.ts +0 -13
  450. package/dist/components/user-action/SearchBar.js +0 -920
  451. package/dist/components/user-action/SearchBar.js.map +0 -1
  452. package/dist/components/user-action/Textarea.cjs +0 -231
  453. package/dist/components/user-action/Textarea.cjs.map +0 -1
  454. package/dist/components/user-action/Textarea.d.cts +0 -41
  455. package/dist/components/user-action/Textarea.d.ts +0 -41
  456. package/dist/components/user-action/Textarea.js +0 -195
  457. package/dist/components/user-action/Textarea.js.map +0 -1
  458. package/dist/components/user-action/Tooltip.cjs +0 -139
  459. package/dist/components/user-action/Tooltip.cjs.map +0 -1
  460. package/dist/components/user-action/Tooltip.d.cts +0 -37
  461. package/dist/components/user-action/Tooltip.d.ts +0 -37
  462. package/dist/components/user-action/Tooltip.js +0 -113
  463. package/dist/components/user-action/Tooltip.js.map +0 -1
  464. package/dist/components/user-action/index.cjs +0 -4564
  465. package/dist/components/user-action/index.cjs.map +0 -1
  466. package/dist/components/user-action/index.d.cts +0 -26
  467. package/dist/components/user-action/index.d.ts +0 -26
  468. package/dist/components/user-action/index.js +0 -4503
  469. package/dist/components/user-action/index.js.map +0 -1
  470. package/dist/components/user-action/input/Input.cjs +0 -260
  471. package/dist/components/user-action/input/Input.cjs.map +0 -1
  472. package/dist/components/user-action/input/Input.d.cts +0 -37
  473. package/dist/components/user-action/input/Input.d.ts +0 -37
  474. package/dist/components/user-action/input/Input.js +0 -225
  475. package/dist/components/user-action/input/Input.js.map +0 -1
  476. package/dist/components/user-action/input/InsideLabelInput.cjs +0 -312
  477. package/dist/components/user-action/input/InsideLabelInput.cjs.map +0 -1
  478. package/dist/components/user-action/input/InsideLabelInput.d.cts +0 -20
  479. package/dist/components/user-action/input/InsideLabelInput.d.ts +0 -20
  480. package/dist/components/user-action/input/InsideLabelInput.js +0 -277
  481. package/dist/components/user-action/input/InsideLabelInput.js.map +0 -1
  482. package/dist/components/user-action/input/ToggleableInput.cjs +0 -315
  483. package/dist/components/user-action/input/ToggleableInput.cjs.map +0 -1
  484. package/dist/components/user-action/input/ToggleableInput.d.cts +0 -22
  485. package/dist/components/user-action/input/ToggleableInput.d.ts +0 -22
  486. package/dist/components/user-action/input/ToggleableInput.js +0 -280
  487. package/dist/components/user-action/input/ToggleableInput.js.map +0 -1
  488. package/dist/components/user-action/input/index.cjs +0 -403
  489. package/dist/components/user-action/input/index.cjs.map +0 -1
  490. package/dist/components/user-action/input/index.d.cts +0 -6
  491. package/dist/components/user-action/input/index.d.ts +0 -6
  492. package/dist/components/user-action/input/index.js +0 -362
  493. package/dist/components/user-action/input/index.js.map +0 -1
  494. package/dist/components/user-action/select/Select.cjs +0 -1970
  495. package/dist/components/user-action/select/Select.cjs.map +0 -1
  496. package/dist/components/user-action/select/Select.d.cts +0 -104
  497. package/dist/components/user-action/select/Select.d.ts +0 -104
  498. package/dist/components/user-action/select/Select.js +0 -1937
  499. package/dist/components/user-action/select/Select.js.map +0 -1
  500. package/dist/components/user-action/select/index.cjs +0 -1972
  501. package/dist/components/user-action/select/index.cjs.map +0 -1
  502. package/dist/components/user-action/select/index.d.cts +0 -4
  503. package/dist/components/user-action/select/index.d.ts +0 -4
  504. package/dist/components/user-action/select/index.js +0 -1937
  505. package/dist/components/user-action/select/index.js.map +0 -1
  506. package/dist/components/utils/FocusTrap.cjs +0 -252
  507. package/dist/components/utils/FocusTrap.cjs.map +0 -1
  508. package/dist/components/utils/FocusTrap.d.cts +0 -28
  509. package/dist/components/utils/FocusTrap.d.ts +0 -28
  510. package/dist/components/utils/FocusTrap.js +0 -229
  511. package/dist/components/utils/FocusTrap.js.map +0 -1
  512. package/dist/components/utils/Transition.cjs +0 -74
  513. package/dist/components/utils/Transition.cjs.map +0 -1
  514. package/dist/components/utils/Transition.d.cts +0 -26
  515. package/dist/components/utils/Transition.d.ts +0 -26
  516. package/dist/components/utils/Transition.js +0 -50
  517. package/dist/components/utils/Transition.js.map +0 -1
  518. package/dist/components/utils/index.cjs +0 -302
  519. package/dist/components/utils/index.cjs.map +0 -1
  520. package/dist/components/utils/index.d.cts +0 -4
  521. package/dist/components/utils/index.d.ts +0 -4
  522. package/dist/components/utils/index.js +0 -275
  523. package/dist/components/utils/index.js.map +0 -1
  524. package/dist/hooks/focus/index.cjs +0 -379
  525. package/dist/hooks/focus/index.cjs.map +0 -1
  526. package/dist/hooks/focus/index.d.cts +0 -6
  527. package/dist/hooks/focus/index.d.ts +0 -6
  528. package/dist/hooks/focus/index.js +0 -339
  529. package/dist/hooks/focus/index.js.map +0 -1
  530. package/dist/hooks/focus/useFocusGuards.cjs +0 -74
  531. package/dist/hooks/focus/useFocusGuards.cjs.map +0 -1
  532. package/dist/hooks/focus/useFocusGuards.d.cts +0 -3
  533. package/dist/hooks/focus/useFocusGuards.d.ts +0 -3
  534. package/dist/hooks/focus/useFocusGuards.js +0 -50
  535. package/dist/hooks/focus/useFocusGuards.js.map +0 -1
  536. package/dist/hooks/focus/useFocusManagement.cjs +0 -84
  537. package/dist/hooks/focus/useFocusManagement.cjs.map +0 -1
  538. package/dist/hooks/focus/useFocusManagement.d.cts +0 -9
  539. package/dist/hooks/focus/useFocusManagement.d.ts +0 -9
  540. package/dist/hooks/focus/useFocusManagement.js +0 -60
  541. package/dist/hooks/focus/useFocusManagement.js.map +0 -1
  542. package/dist/hooks/focus/useFocusOnceVisible.cjs +0 -60
  543. package/dist/hooks/focus/useFocusOnceVisible.cjs.map +0 -1
  544. package/dist/hooks/focus/useFocusOnceVisible.d.cts +0 -5
  545. package/dist/hooks/focus/useFocusOnceVisible.d.ts +0 -5
  546. package/dist/hooks/focus/useFocusOnceVisible.js +0 -26
  547. package/dist/hooks/focus/useFocusOnceVisible.js.map +0 -1
  548. package/dist/hooks/focus/useFocusTrap.cjs +0 -233
  549. package/dist/hooks/focus/useFocusTrap.cjs.map +0 -1
  550. package/dist/hooks/focus/useFocusTrap.d.cts +0 -16
  551. package/dist/hooks/focus/useFocusTrap.d.ts +0 -16
  552. package/dist/hooks/focus/useFocusTrap.js +0 -210
  553. package/dist/hooks/focus/useFocusTrap.js.map +0 -1
  554. package/dist/hooks/focus/useIsMounted.cjs +0 -43
  555. package/dist/hooks/focus/useIsMounted.cjs.map +0 -1
  556. package/dist/hooks/focus/useIsMounted.d.cts +0 -3
  557. package/dist/hooks/focus/useIsMounted.d.ts +0 -3
  558. package/dist/hooks/focus/useIsMounted.js +0 -20
  559. package/dist/hooks/focus/useIsMounted.js.map +0 -1
  560. package/dist/hooks/index.cjs +0 -1530
  561. package/dist/hooks/index.cjs.map +0 -1
  562. package/dist/hooks/index.d.cts +0 -18
  563. package/dist/hooks/index.d.ts +0 -18
  564. package/dist/hooks/index.js +0 -1477
  565. package/dist/hooks/index.js.map +0 -1
  566. package/dist/hooks/useDelay.cjs +0 -67
  567. package/dist/hooks/useDelay.cjs.map +0 -1
  568. package/dist/hooks/useDelay.d.cts +0 -12
  569. package/dist/hooks/useDelay.d.ts +0 -12
  570. package/dist/hooks/useDelay.js +0 -43
  571. package/dist/hooks/useDelay.js.map +0 -1
  572. package/dist/hooks/useFloatingElement.cjs +0 -162
  573. package/dist/hooks/useFloatingElement.cjs.map +0 -1
  574. package/dist/hooks/useFloatingElement.d.cts +0 -22
  575. package/dist/hooks/useFloatingElement.d.ts +0 -22
  576. package/dist/hooks/useFloatingElement.js +0 -139
  577. package/dist/hooks/useFloatingElement.js.map +0 -1
  578. package/dist/hooks/useHoverState.cjs +0 -71
  579. package/dist/hooks/useHoverState.cjs.map +0 -1
  580. package/dist/hooks/useHoverState.d.cts +0 -42
  581. package/dist/hooks/useHoverState.d.ts +0 -42
  582. package/dist/hooks/useHoverState.js +0 -47
  583. package/dist/hooks/useHoverState.js.map +0 -1
  584. package/dist/hooks/useLocalStorage.cjs +0 -97
  585. package/dist/hooks/useLocalStorage.cjs.map +0 -1
  586. package/dist/hooks/useLocalStorage.d.cts +0 -17
  587. package/dist/hooks/useLocalStorage.d.ts +0 -17
  588. package/dist/hooks/useLocalStorage.js +0 -74
  589. package/dist/hooks/useLocalStorage.js.map +0 -1
  590. package/dist/hooks/useLogOnce.cjs +0 -53
  591. package/dist/hooks/useLogOnce.cjs.map +0 -1
  592. package/dist/hooks/useLogOnce.d.cts +0 -7
  593. package/dist/hooks/useLogOnce.d.ts +0 -7
  594. package/dist/hooks/useLogOnce.js +0 -29
  595. package/dist/hooks/useLogOnce.js.map +0 -1
  596. package/dist/hooks/useOutsideClick.cjs +0 -47
  597. package/dist/hooks/useOutsideClick.cjs.map +0 -1
  598. package/dist/hooks/useOutsideClick.d.cts +0 -5
  599. package/dist/hooks/useOutsideClick.d.ts +0 -5
  600. package/dist/hooks/useOutsideClick.js +0 -23
  601. package/dist/hooks/useOutsideClick.js.map +0 -1
  602. package/dist/hooks/useOverwritableState.cjs +0 -49
  603. package/dist/hooks/useOverwritableState.cjs.map +0 -1
  604. package/dist/hooks/useOverwritableState.d.cts +0 -5
  605. package/dist/hooks/useOverwritableState.d.ts +0 -5
  606. package/dist/hooks/useOverwritableState.js +0 -25
  607. package/dist/hooks/useOverwritableState.js.map +0 -1
  608. package/dist/hooks/usePopoverPosition.cjs +0 -81
  609. package/dist/hooks/usePopoverPosition.cjs.map +0 -1
  610. package/dist/hooks/usePopoverPosition.d.cts +0 -15
  611. package/dist/hooks/usePopoverPosition.d.ts +0 -15
  612. package/dist/hooks/usePopoverPosition.js +0 -57
  613. package/dist/hooks/usePopoverPosition.js.map +0 -1
  614. package/dist/hooks/useRerender.cjs +0 -33
  615. package/dist/hooks/useRerender.cjs.map +0 -1
  616. package/dist/hooks/useRerender.d.cts +0 -5
  617. package/dist/hooks/useRerender.d.ts +0 -5
  618. package/dist/hooks/useRerender.js +0 -9
  619. package/dist/hooks/useRerender.js.map +0 -1
  620. package/dist/hooks/useResizeCallbackWrapper.cjs +0 -38
  621. package/dist/hooks/useResizeCallbackWrapper.cjs.map +0 -1
  622. package/dist/hooks/useResizeCallbackWrapper.d.cts +0 -11
  623. package/dist/hooks/useResizeCallbackWrapper.d.ts +0 -11
  624. package/dist/hooks/useResizeCallbackWrapper.js +0 -14
  625. package/dist/hooks/useResizeCallbackWrapper.js.map +0 -1
  626. package/dist/hooks/useSearch.cjs +0 -95
  627. package/dist/hooks/useSearch.cjs.map +0 -1
  628. package/dist/hooks/useSearch.d.cts +0 -22
  629. package/dist/hooks/useSearch.d.ts +0 -22
  630. package/dist/hooks/useSearch.js +0 -71
  631. package/dist/hooks/useSearch.js.map +0 -1
  632. package/dist/hooks/useValidators.cjs +0 -687
  633. package/dist/hooks/useValidators.cjs.map +0 -1
  634. package/dist/hooks/useValidators.d.cts +0 -16
  635. package/dist/hooks/useValidators.d.ts +0 -16
  636. package/dist/hooks/useValidators.js +0 -660
  637. package/dist/hooks/useValidators.js.map +0 -1
  638. package/dist/i18n/LocaleProvider.cjs +0 -202
  639. package/dist/i18n/LocaleProvider.cjs.map +0 -1
  640. package/dist/i18n/LocaleProvider.d.cts +0 -23
  641. package/dist/i18n/LocaleProvider.d.ts +0 -23
  642. package/dist/i18n/LocaleProvider.js +0 -175
  643. package/dist/i18n/LocaleProvider.js.map +0 -1
  644. package/dist/i18n/index.cjs +0 -761
  645. package/dist/i18n/index.cjs.map +0 -1
  646. package/dist/i18n/index.d.cts +0 -8
  647. package/dist/i18n/index.d.ts +0 -8
  648. package/dist/i18n/index.js +0 -727
  649. package/dist/i18n/index.js.map +0 -1
  650. package/dist/i18n/translations.cjs +0 -507
  651. package/dist/i18n/translations.cjs.map +0 -1
  652. package/dist/i18n/translations.d.cts +0 -189
  653. package/dist/i18n/translations.d.ts +0 -189
  654. package/dist/i18n/translations.js +0 -482
  655. package/dist/i18n/translations.js.map +0 -1
  656. package/dist/i18n/useHightideTranslation.cjs +0 -618
  657. package/dist/i18n/useHightideTranslation.cjs.map +0 -1
  658. package/dist/i18n/useHightideTranslation.d.cts +0 -21
  659. package/dist/i18n/useHightideTranslation.d.ts +0 -21
  660. package/dist/i18n/useHightideTranslation.js +0 -591
  661. package/dist/i18n/useHightideTranslation.js.map +0 -1
  662. package/dist/i18n/util.cjs +0 -49
  663. package/dist/i18n/util.cjs.map +0 -1
  664. package/dist/i18n/util.d.cts +0 -15
  665. package/dist/i18n/util.d.ts +0 -15
  666. package/dist/i18n/util.js +0 -23
  667. package/dist/i18n/util.js.map +0 -1
  668. package/dist/index.cjs +0 -16470
  669. package/dist/index.cjs.map +0 -1
  670. package/dist/index.d.cts +0 -113
  671. package/dist/storybook/helper.cjs +0 -61
  672. package/dist/storybook/helper.cjs.map +0 -1
  673. package/dist/storybook/helper.d.cts +0 -17
  674. package/dist/storybook/helper.d.ts +0 -17
  675. package/dist/storybook/helper.js +0 -37
  676. package/dist/storybook/helper.js.map +0 -1
  677. package/dist/theming/index.cjs +0 -190
  678. package/dist/theming/index.cjs.map +0 -1
  679. package/dist/theming/index.d.cts +0 -3
  680. package/dist/theming/index.d.ts +0 -3
  681. package/dist/theming/index.js +0 -161
  682. package/dist/theming/index.js.map +0 -1
  683. package/dist/theming/useTheme.cjs +0 -188
  684. package/dist/theming/useTheme.cjs.map +0 -1
  685. package/dist/theming/useTheme.d.cts +0 -26
  686. package/dist/theming/useTheme.d.ts +0 -26
  687. package/dist/theming/useTheme.js +0 -161
  688. package/dist/theming/useTheme.js.map +0 -1
  689. package/dist/utils/array.cjs +0 -172
  690. package/dist/utils/array.cjs.map +0 -1
  691. package/dist/utils/array.d.cts +0 -34
  692. package/dist/utils/array.d.ts +0 -34
  693. package/dist/utils/array.js +0 -142
  694. package/dist/utils/array.js.map +0 -1
  695. package/dist/utils/bagFunctions.cjs +0 -38
  696. package/dist/utils/bagFunctions.cjs.map +0 -1
  697. package/dist/utils/bagFunctions.d.cts +0 -15
  698. package/dist/utils/bagFunctions.d.ts +0 -15
  699. package/dist/utils/bagFunctions.js +0 -14
  700. package/dist/utils/bagFunctions.js.map +0 -1
  701. package/dist/utils/builder.cjs +0 -33
  702. package/dist/utils/builder.cjs.map +0 -1
  703. package/dist/utils/builder.d.cts +0 -8
  704. package/dist/utils/builder.d.ts +0 -8
  705. package/dist/utils/builder.js +0 -9
  706. package/dist/utils/builder.js.map +0 -1
  707. package/dist/utils/date.cjs +0 -193
  708. package/dist/utils/date.cjs.map +0 -1
  709. package/dist/utils/date.d.cts +0 -30
  710. package/dist/utils/date.d.ts +0 -30
  711. package/dist/utils/date.js +0 -156
  712. package/dist/utils/date.js.map +0 -1
  713. package/dist/utils/easeFunctions.cjs +0 -63
  714. package/dist/utils/easeFunctions.cjs.map +0 -1
  715. package/dist/utils/easeFunctions.d.cts +0 -11
  716. package/dist/utils/easeFunctions.d.ts +0 -11
  717. package/dist/utils/easeFunctions.js +0 -37
  718. package/dist/utils/easeFunctions.js.map +0 -1
  719. package/dist/utils/emailValidation.cjs +0 -32
  720. package/dist/utils/emailValidation.cjs.map +0 -1
  721. package/dist/utils/emailValidation.d.cts +0 -3
  722. package/dist/utils/emailValidation.d.ts +0 -3
  723. package/dist/utils/emailValidation.js +0 -8
  724. package/dist/utils/emailValidation.js.map +0 -1
  725. package/dist/utils/index.cjs +0 -562
  726. package/dist/utils/index.cjs.map +0 -1
  727. package/dist/utils/index.d.cts +0 -16
  728. package/dist/utils/index.d.ts +0 -16
  729. package/dist/utils/index.js +0 -502
  730. package/dist/utils/index.js.map +0 -1
  731. package/dist/utils/loopingArray.cjs +0 -96
  732. package/dist/utils/loopingArray.cjs.map +0 -1
  733. package/dist/utils/loopingArray.d.cts +0 -25
  734. package/dist/utils/loopingArray.d.ts +0 -25
  735. package/dist/utils/loopingArray.js +0 -72
  736. package/dist/utils/loopingArray.js.map +0 -1
  737. package/dist/utils/match.cjs +0 -32
  738. package/dist/utils/match.cjs.map +0 -1
  739. package/dist/utils/match.d.cts +0 -3
  740. package/dist/utils/match.d.ts +0 -3
  741. package/dist/utils/match.js +0 -8
  742. package/dist/utils/match.js.map +0 -1
  743. package/dist/utils/math.cjs +0 -33
  744. package/dist/utils/math.cjs.map +0 -1
  745. package/dist/utils/math.d.cts +0 -3
  746. package/dist/utils/math.d.ts +0 -3
  747. package/dist/utils/math.js +0 -9
  748. package/dist/utils/math.js.map +0 -1
  749. package/dist/utils/noop.cjs +0 -30
  750. package/dist/utils/noop.cjs.map +0 -1
  751. package/dist/utils/noop.d.cts +0 -3
  752. package/dist/utils/noop.d.ts +0 -3
  753. package/dist/utils/noop.js +0 -6
  754. package/dist/utils/noop.js.map +0 -1
  755. package/dist/utils/resolveSetState.cjs +0 -32
  756. package/dist/utils/resolveSetState.cjs.map +0 -1
  757. package/dist/utils/resolveSetState.d.cts +0 -5
  758. package/dist/utils/resolveSetState.d.ts +0 -5
  759. package/dist/utils/resolveSetState.js +0 -8
  760. package/dist/utils/resolveSetState.js.map +0 -1
  761. package/dist/utils/simpleSearch.cjs +0 -59
  762. package/dist/utils/simpleSearch.cjs.map +0 -1
  763. package/dist/utils/simpleSearch.d.cts +0 -50
  764. package/dist/utils/simpleSearch.d.ts +0 -50
  765. package/dist/utils/simpleSearch.js +0 -32
  766. package/dist/utils/simpleSearch.js.map +0 -1
  767. package/dist/utils/storage.cjs +0 -63
  768. package/dist/utils/storage.cjs.map +0 -1
  769. package/dist/utils/storage.d.cts +0 -16
  770. package/dist/utils/storage.d.ts +0 -16
  771. package/dist/utils/storage.js +0 -38
  772. package/dist/utils/storage.js.map +0 -1
  773. package/dist/utils/typing.cjs +0 -18
  774. package/dist/utils/typing.cjs.map +0 -1
  775. package/dist/utils/typing.d.cts +0 -8
  776. package/dist/utils/typing.d.ts +0 -8
  777. package/dist/utils/typing.js +0 -1
  778. package/dist/utils/typing.js.map +0 -1
  779. package/dist/utils/writeToClipboard.cjs +0 -33
  780. package/dist/utils/writeToClipboard.cjs.map +0 -1
  781. package/dist/utils/writeToClipboard.d.cts +0 -3
  782. package/dist/utils/writeToClipboard.d.ts +0 -3
  783. package/dist/utils/writeToClipboard.js +0 -10
  784. package/dist/utils/writeToClipboard.js.map +0 -1
@@ -1,3387 +0,0 @@
1
- // src/components/layout/Carousel.tsx
2
- import {
3
- createContext as createContext2,
4
- forwardRef as forwardRef2,
5
- useCallback as useCallback2,
6
- useContext as useContext2,
7
- useEffect as useEffect2,
8
- useId,
9
- useMemo as useMemo2,
10
- useRef,
11
- useState as useState3
12
- } from "react";
13
- import clsx2 from "clsx";
14
- import { ChevronLeft, ChevronRight } from "lucide-react";
15
-
16
- // src/utils/array.ts
17
- var defaultRangeOptions = {
18
- allowEmptyRange: false,
19
- stepSize: 1,
20
- exclusiveStart: false,
21
- exclusiveEnd: true
22
- };
23
- var range = (endOrRange, options) => {
24
- const { allowEmptyRange, stepSize, exclusiveStart, exclusiveEnd } = { ...defaultRangeOptions, ...options };
25
- let start = 0;
26
- let end;
27
- if (typeof endOrRange === "number") {
28
- end = endOrRange;
29
- } else {
30
- start = endOrRange[0];
31
- end = endOrRange[1];
32
- }
33
- if (!exclusiveEnd) {
34
- end -= 1;
35
- }
36
- if (exclusiveStart) {
37
- start += 1;
38
- }
39
- if (end - 1 < start) {
40
- if (!allowEmptyRange) {
41
- console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set options.allowEmptyRange to true`);
42
- }
43
- return [];
44
- }
45
- return Array.from({ length: end - start }, (_, index) => index * stepSize + start);
46
- };
47
- var createLoopingListWithIndex = (list, startIndex = 0, length = 0, forwards = true) => {
48
- if (length < 0) {
49
- console.warn(`createLoopingList: length must be >= 0, given ${length}`);
50
- } else if (length === 0) {
51
- length = list.length;
52
- }
53
- const returnList = [];
54
- if (forwards) {
55
- for (let i = startIndex; returnList.length < length; i = (i + 1) % list.length) {
56
- returnList.push([i, list[i]]);
57
- }
58
- } else {
59
- for (let i = startIndex; returnList.length < length; i = i === 0 ? i = list.length - 1 : i - 1) {
60
- returnList.push([i, list[i]]);
61
- }
62
- }
63
- return returnList;
64
- };
65
- var moveItems = (list, move = 0) => {
66
- const result = [];
67
- let start = move;
68
- if (start < 0) {
69
- start = list.length - move;
70
- }
71
- start = start % list.length;
72
- for (let i = 0; i < list.length; i++) {
73
- result[i] = list[(i + start) % list.length];
74
- }
75
- return result;
76
- };
77
- function resolveSingleOrArray(value) {
78
- if (Array.isArray(value)) {
79
- return value;
80
- } else if (value) {
81
- return [value];
82
- }
83
- return [];
84
- }
85
- var ArrayUtil = {
86
- unique: (list) => {
87
- const seen = /* @__PURE__ */ new Set();
88
- return list.filter((item) => {
89
- if (seen.has(item)) {
90
- return false;
91
- }
92
- seen.add(item);
93
- return true;
94
- });
95
- },
96
- difference: (list, removeList) => {
97
- const remove = new Set(removeList);
98
- return list.filter((item) => !remove.has(item));
99
- },
100
- moveItems,
101
- resolveSingleOrArray
102
- };
103
-
104
- // src/components/user-action/Button.tsx
105
- import { forwardRef } from "react";
106
- import clsx from "clsx";
107
- import { jsx, jsxs } from "react/jsx-runtime";
108
- var ButtonColorUtil = {
109
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
110
- text: ["primary", "negative", "neutral"],
111
- outline: ["primary"]
112
- };
113
- var IconButtonUtil = {
114
- icon: [...ButtonColorUtil.solid, "transparent"]
115
- };
116
- var paddingMapping = {
117
- none: "",
118
- small: "btn-sm",
119
- medium: "btn-md",
120
- large: "btn-lg"
121
- };
122
- var iconPaddingMapping = {
123
- none: "",
124
- tiny: "icon-btn-xs",
125
- small: "icon-btn-sm",
126
- medium: "icon-btn-md",
127
- large: "icon-btn-lg"
128
- };
129
- var ButtonUtil = {
130
- paddingMapping,
131
- iconPaddingMapping
132
- };
133
- var SolidButton = forwardRef(function SolidButton2({
134
- children,
135
- color = "primary",
136
- size = "medium",
137
- startIcon,
138
- endIcon,
139
- onClick,
140
- className,
141
- ...restProps
142
- }, ref) {
143
- const colorClasses = {
144
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
145
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
146
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
147
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
148
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
149
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
150
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
151
- }[color];
152
- const iconColorClasses = {
153
- primary: "not-group-disabled:text-button-solid-primary-icon",
154
- secondary: "not-group-disabled:text-button-solid-secondary-icon",
155
- tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
156
- positive: "not-group-disabled:text-button-solid-positive-icon",
157
- warning: "not-group-disabled:text-button-solid-warning-icon",
158
- negative: "not-group-disabled:text-button-solid-negative-icon",
159
- neutral: "not-group-disabled:text-button-solid-neutral-icon"
160
- }[color];
161
- return /* @__PURE__ */ jsxs(
162
- "button",
163
- {
164
- ref,
165
- onClick,
166
- className: clsx(
167
- "group font-semibold",
168
- colorClasses,
169
- "not-disabled:hover:brightness-90",
170
- "disabled:text-disabled disabled:bg-disabled-background",
171
- ButtonUtil.paddingMapping[size],
172
- className
173
- ),
174
- ...restProps,
175
- children: [
176
- startIcon && /* @__PURE__ */ jsx(
177
- "span",
178
- {
179
- className: clsx(
180
- iconColorClasses,
181
- "group-disabled:text-disabled-icon"
182
- ),
183
- children: startIcon
184
- }
185
- ),
186
- children,
187
- endIcon && /* @__PURE__ */ jsx(
188
- "span",
189
- {
190
- className: clsx(
191
- iconColorClasses,
192
- "group-disabled:text-disabled-icon"
193
- ),
194
- children: endIcon
195
- }
196
- )
197
- ]
198
- }
199
- );
200
- });
201
- var IconButton = forwardRef(function IconButton2({
202
- children,
203
- color = "primary",
204
- size = "medium",
205
- className,
206
- ...restProps
207
- }, ref) {
208
- const colorClasses = {
209
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
210
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
211
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
212
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
213
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
214
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
215
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
216
- transparent: "not-disabled:bg-transparent"
217
- }[color];
218
- return /* @__PURE__ */ jsx(
219
- "button",
220
- {
221
- ref,
222
- className: clsx(
223
- colorClasses,
224
- "not-disabled:hover:brightness-90",
225
- "disabled:text-disabled",
226
- {
227
- "disabled:bg-disabled-background": color !== "transparent",
228
- "disabled:opacity-70": color === "transparent",
229
- "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
230
- },
231
- ButtonUtil.iconPaddingMapping[size],
232
- className
233
- ),
234
- ...restProps,
235
- children
236
- }
237
- );
238
- });
239
-
240
- // src/i18n/LocaleProvider.tsx
241
- import { createContext, useContext, useEffect, useMemo, useState as useState2 } from "react";
242
-
243
- // src/hooks/useLocalStorage.ts
244
- import { useCallback, useState } from "react";
245
-
246
- // src/utils/resolveSetState.ts
247
- function resolveSetState(action, prev) {
248
- return typeof action === "function" ? action(prev) : action;
249
- }
250
-
251
- // src/i18n/translations.ts
252
- import { TranslationGen } from "@helpwave/internationalization";
253
- var hightideTranslationLocales = ["de-DE", "en-US"];
254
- var hightideTranslation = {
255
- "de-DE": {
256
- "add": `Hinzuf\xFCgen`,
257
- "age": `Alter`,
258
- "all": `Alle`,
259
- "apply": `Anwenden`,
260
- "back": `Zur\xFCck`,
261
- "cancel": `Abbrechen`,
262
- "carousel": `Karussell`,
263
- "change": `\xC4ndern`,
264
- "chooseLanguage": `W\xE4hle deine bevorzugte Sprache`,
265
- "chooseSlide": `W\xE4hle die angezeigte Slide aus`,
266
- "chooseTheme": `W\xE4hle dein bevorzugtes Farbschema.`,
267
- "clear": `L\xF6schen`,
268
- "click": `Klicken`,
269
- "clickToCopy": `Zum kopieren klicken`,
270
- "clickToSelect": `Zum Ausw\xE4hlen dr\xFCcken`,
271
- "close": `Schlie\xDFen`,
272
- "confirm": `Best\xE4tigen`,
273
- "copied": `Kopiert`,
274
- "copy": `Kopieren`,
275
- "create": `Erstellen`,
276
- "decline": `Ablehnen`,
277
- "delete": `L\xF6schen`,
278
- "discard": `Verwerfen`,
279
- "discardChanges": `\xC4nderungen Verwerfen`,
280
- "done": `Fertig`,
281
- "edit": `Bearbeiten`,
282
- "endDate": `Ende`,
283
- "enterText": `Text hier eingeben`,
284
- "entryDate": `Eintragsdatum`,
285
- "error": `Fehler`,
286
- "errorOccurred": `Ein Fehler ist aufgetreten`,
287
- "exit": `Beenden`,
288
- "fieldRequiredError": `Dieses Feld ist erforderlich.`,
289
- "filter": `Filter`,
290
- "gender": ({ gender }) => {
291
- return TranslationGen.resolveSelect(gender, {
292
- "male": `M\xE4nnlich`,
293
- "female": `Weiblich`,
294
- "other": `Divers`
295
- });
296
- },
297
- "goodToSeeYou": `Sch\xF6n dich zu sehen`,
298
- "identifier": `Identifikator`,
299
- "invalidEmail": `Die E-Mail ist ung\xFCltig.`,
300
- "invalidEmailError": `Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.`,
301
- "language": `Sprache`,
302
- "less": `Weniger`,
303
- "loading": `L\xE4dt`,
304
- "locale": `Locale`,
305
- "max": `Max`,
306
- "maxLengthError": `Maximale L\xE4nge \xFCberschritten.`,
307
- "min": `Min`,
308
- "minLengthError": `Mindestl\xE4nge nicht erreicht.`,
309
- "more": `Mehr`,
310
- "name": `Name`,
311
- "next": `Weiter`,
312
- "no": `Nein`,
313
- "none": `Nichts`,
314
- "notEmpty": `Das Feld darf nicht leer sein.`,
315
- "nothingFound": `Nichts gefunden`,
316
- "of": `von`,
317
- "optional": `Optional`,
318
- "outOfRangeNumber": ({ min, max }) => {
319
- return `Der Wert muss zwischen ${min} und ${max} liegen.`;
320
- },
321
- "outOfRangeSelectionItems": ({ min, max }) => {
322
- return `Es m\xFCssen zwischen ${min} und ${max} Elemente ausgew\xE4hlt werden.`;
323
- },
324
- "outOfRangeString": ({ min, max }) => {
325
- return `Der Wert muss zwischen ${min} und ${max} Zeichen lang sein.`;
326
- },
327
- "pleaseWait": `Bitte warten...`,
328
- "previous": `Vorherige`,
329
- "remove": `Entfernen`,
330
- "required": `Erforderlich`,
331
- "reset": `Zur\xFCcksetzen`,
332
- "save": `Speichern`,
333
- "saved": `Gespeichert`,
334
- "search": `Suche`,
335
- "select": `Select`,
336
- "selectOption": `Option ausw\xE4hlen`,
337
- "show": `Anzeigen`,
338
- "showLess": `Weniger anzeigen`,
339
- "showMore": `Mehr anzeigen`,
340
- "showSlide": ({ index }) => {
341
- return `Zeige Slide ${index}`;
342
- },
343
- "slide": `Slide`,
344
- "slideNavigation": `Slide Navigation`,
345
- "slideOf": ({ index, length }) => {
346
- return `Slide ${index} von ${length} slides`;
347
- },
348
- "startDate": `Start`,
349
- "street": `Stra\xDFe`,
350
- "submit": `Abschicken`,
351
- "success": `Erfolg`,
352
- "text": `Text`,
353
- "themeMode": ({ theme }) => {
354
- return TranslationGen.resolveSelect(theme, {
355
- "dark": `Dunkel`,
356
- "light": `Hell`,
357
- "system": `System`
358
- });
359
- },
360
- "themes": ({ count }) => {
361
- return TranslationGen.resolveSelect(count, {
362
- "=1": `Farbschema`,
363
- "other": `Farbschemas`
364
- });
365
- },
366
- "time.ago": `vor`,
367
- "time.agoDays": ({ days }) => {
368
- return `var ${days} Tagen`;
369
- },
370
- "time.april": `April`,
371
- "time.august": `August`,
372
- "time.century": ({ count }) => {
373
- return TranslationGen.resolveSelect(count, {
374
- "=1": `Jahrhundert`,
375
- "other": `Jahrhunderte`
376
- });
377
- },
378
- "time.day": ({ count }) => {
379
- return TranslationGen.resolveSelect(count, {
380
- "=1": `Tag`,
381
- "other": `Tage`
382
- });
383
- },
384
- "time.decade": ({ count }) => {
385
- return TranslationGen.resolveSelect(count, {
386
- "=1": `Jahrzehnt`,
387
- "other": `Jahrzehnte`
388
- });
389
- },
390
- "time.december": `December`,
391
- "time.february": `Febuar`,
392
- "time.hour": ({ count }) => {
393
- return TranslationGen.resolveSelect(count, {
394
- "=1": `Stunde`,
395
- "other": `Stunden`
396
- });
397
- },
398
- "time.in": `in`,
399
- "time.inDays": ({ days }) => {
400
- return `in ${days} Tagen`;
401
- },
402
- "time.january": `Januar`,
403
- "time.july": `Juli`,
404
- "time.june": `Juni`,
405
- "time.march": `M\xE4rz`,
406
- "time.may": `Mai`,
407
- "time.microsecond": ({ count }) => {
408
- return TranslationGen.resolveSelect(count, {
409
- "=1": `Mikrosekunde`,
410
- "other": `Mikrosekunden`
411
- });
412
- },
413
- "time.millisecond": ({ count }) => {
414
- return TranslationGen.resolveSelect(count, {
415
- "=1": `Millisekunde`,
416
- "other": `Millisekunden`
417
- });
418
- },
419
- "time.minute": ({ count }) => {
420
- return TranslationGen.resolveSelect(count, {
421
- "=1": `Minute`,
422
- "other": `Minuten`
423
- });
424
- },
425
- "time.month": ({ count }) => {
426
- return TranslationGen.resolveSelect(count, {
427
- "=1": `Monat`,
428
- "other": `Monate`
429
- });
430
- },
431
- "time.monthName": ({ month }) => {
432
- return TranslationGen.resolveSelect(month, {
433
- "january": `Januar`,
434
- "february": `Februar`,
435
- "march": `M\xE4rz`,
436
- "april": `April`,
437
- "may": `Mai`,
438
- "june": `Juni`,
439
- "july": `Juli`,
440
- "august": `August`,
441
- "september": `September`,
442
- "october": `Oktober`,
443
- "november": `November`,
444
- "december": `Dezember`,
445
- "other": `Unbekannter Monat`
446
- });
447
- },
448
- "time.nanosecond": ({ count }) => {
449
- return TranslationGen.resolveSelect(count, {
450
- "=1": `Nanosekunde`,
451
- "other": `Nanosekunden`
452
- });
453
- },
454
- "time.november": `November`,
455
- "time.october": `October`,
456
- "time.second": ({ count }) => {
457
- return TranslationGen.resolveSelect(count, {
458
- "=1": `Sekunde`,
459
- "other": `Sekunden`
460
- });
461
- },
462
- "time.september": `September`,
463
- "time.today": `Heute`,
464
- "time.tomorrow": `Morgen`,
465
- "time.year": ({ count }) => {
466
- return TranslationGen.resolveSelect(count, {
467
- "=1": `Jahr`,
468
- "other": `Jahre`
469
- });
470
- },
471
- "time.yesterday": `Gestern`,
472
- "tooFewSelectionItems": ({ min }) => {
473
- return `Es m\xFCssen mindestens ${min} Elemente ausgew\xE4hlt werden.`;
474
- },
475
- "tooLong": ({ max }) => {
476
- return `Der Wert darf h\xF6chstens ${max} Zeichen enthalten.`;
477
- },
478
- "tooManySelectionItems": ({ max }) => {
479
- return `Es m\xFCssen maximal ${max} Elemente ausgew\xE4hlt werden.`;
480
- },
481
- "tooShort": ({ min }) => {
482
- return `Der Wert muss mindestens ${min} Zeichen enthalten.`;
483
- },
484
- "unsavedChanges": `Ungespeicherte \xC4nderungen`,
485
- "unsavedChangesSaveQuestion": `M\xF6chtest du die \xC4nderungen speichern?`,
486
- "update": `Update`,
487
- "value": `Wert`,
488
- "welcome": `Willkommen`,
489
- "yes": `Ja`
490
- },
491
- "en-US": {
492
- "add": `Add`,
493
- "age": `Age`,
494
- "all": `All`,
495
- "apply": `Apply`,
496
- "back": `Back`,
497
- "cancel": `Cancel`,
498
- "carousel": `Carousel`,
499
- "change": `Change`,
500
- "chooseLanguage": `Choose your language`,
501
- "chooseSlide": `Choose slide to display`,
502
- "chooseTheme": `Choose your preferred color theme.`,
503
- "clear": `Clear`,
504
- "click": `Click`,
505
- "clickToCopy": `Click to Copy`,
506
- "clickToSelect": `Click to select`,
507
- "close": `Close`,
508
- "confirm": `Confirm`,
509
- "copied": `Copied`,
510
- "copy": `Copy`,
511
- "create": `Create`,
512
- "decline": `Decline`,
513
- "delete": `Delete`,
514
- "discard": `Discard`,
515
- "discardChanges": `Discard Changes`,
516
- "done": `Done`,
517
- "edit": `Edit`,
518
- "endDate": `End`,
519
- "enterText": `Enter text here`,
520
- "entryDate": `Entry Date`,
521
- "error": `Error`,
522
- "errorOccurred": `An error occurred`,
523
- "exit": `Exit`,
524
- "fieldRequiredError": `This field is required.`,
525
- "filter": `Filter`,
526
- "gender": ({ gender }) => {
527
- return TranslationGen.resolveSelect(gender, {
528
- "male": `Male`,
529
- "female": `Female`,
530
- "other": `Other`
531
- });
532
- },
533
- "goodToSeeYou": `Good to see you`,
534
- "identifier": `Identifier`,
535
- "invalidEmail": `The email is not valid.`,
536
- "invalidEmailError": `Please enter a valid email address.`,
537
- "language": `Language`,
538
- "less": `Less`,
539
- "loading": `Loading`,
540
- "locale": `Locale`,
541
- "max": `Max`,
542
- "maxLengthError": `Maximum length exceeded.`,
543
- "min": `Min`,
544
- "minLengthError": `Minimum length not met.`,
545
- "more": `More`,
546
- "name": `Name`,
547
- "next": `Next`,
548
- "no": `No`,
549
- "none": `None`,
550
- "notEmpty": `The field cannot be empty.`,
551
- "nothingFound": `Nothing found`,
552
- "of": `of`,
553
- "optional": `Optional`,
554
- "outOfRangeNumber": ({ min, max }) => {
555
- return `The value must be between ${min} and ${max}.`;
556
- },
557
- "outOfRangeSelectionItems": ({ min, max }) => {
558
- return `Between ${min} and ${max} items must be selected.`;
559
- },
560
- "outOfRangeString": ({ min, max }) => {
561
- return `The value needs to have between ${min} and ${max} characters.`;
562
- },
563
- "pleaseWait": `Please wait...`,
564
- "previous": `Previous`,
565
- "remove": `Remove`,
566
- "required": `Required`,
567
- "reset": `Reset`,
568
- "save": `Save`,
569
- "saved": `Saved`,
570
- "search": `Search`,
571
- "select": `Select`,
572
- "selectOption": `Select an option`,
573
- "show": `Show`,
574
- "showLess": `Show less`,
575
- "showMore": `Show more`,
576
- "showSlide": ({ index }) => {
577
- return `Show Slide ${index}`;
578
- },
579
- "slide": `Slide`,
580
- "slideNavigation": `Slide navigation`,
581
- "slideOf": ({ index, length }) => {
582
- return `Slide ${index} of ${length} slides`;
583
- },
584
- "startDate": `Start`,
585
- "street": `Street`,
586
- "submit": `Submit`,
587
- "success": `Success`,
588
- "text": `Text`,
589
- "themeMode": ({ theme }) => {
590
- return TranslationGen.resolveSelect(theme, {
591
- "dark": `Dark`,
592
- "light": `Light`,
593
- "system": `System`
594
- });
595
- },
596
- "themes": ({ count }) => {
597
- return TranslationGen.resolveSelect(count, {
598
- "=1": `Theme`,
599
- "other": `Themes`
600
- });
601
- },
602
- "time.ago": `ago`,
603
- "time.agoDays": ({ days }) => {
604
- return `days ${days} ago`;
605
- },
606
- "time.april": `April`,
607
- "time.august": `August`,
608
- "time.century": ({ count }) => {
609
- return TranslationGen.resolveSelect(count, {
610
- "=1": `Century`,
611
- "other": `Centuries`
612
- });
613
- },
614
- "time.day": ({ count }) => {
615
- return TranslationGen.resolveSelect(count, {
616
- "=1": `Day`,
617
- "other": `Days`
618
- });
619
- },
620
- "time.decade": ({ count }) => {
621
- return TranslationGen.resolveSelect(count, {
622
- "=1": `Decade`,
623
- "other": `Decades`
624
- });
625
- },
626
- "time.december": `December`,
627
- "time.february": `Febuary`,
628
- "time.hour": ({ count }) => {
629
- return TranslationGen.resolveSelect(count, {
630
- "=1": `Hour`,
631
- "other": `Hours`
632
- });
633
- },
634
- "time.in": `in`,
635
- "time.inDays": ({ days }) => {
636
- return `in ${days} days`;
637
- },
638
- "time.january": `January`,
639
- "time.july": `July`,
640
- "time.june": `June`,
641
- "time.march": `March`,
642
- "time.may": `May`,
643
- "time.microsecond": ({ count }) => {
644
- return TranslationGen.resolveSelect(count, {
645
- "=1": `Microsecond`,
646
- "other": `Microseconds`
647
- });
648
- },
649
- "time.millisecond": ({ count }) => {
650
- return TranslationGen.resolveSelect(count, {
651
- "=1": `Millisecond`,
652
- "other": `Milliseconds`
653
- });
654
- },
655
- "time.minute": ({ count }) => {
656
- return TranslationGen.resolveSelect(count, {
657
- "=1": `Minute`,
658
- "other": `Minutes`
659
- });
660
- },
661
- "time.month": ({ count }) => {
662
- return TranslationGen.resolveSelect(count, {
663
- "=1": `Month`,
664
- "other": `Months`
665
- });
666
- },
667
- "time.monthName": ({ month }) => {
668
- return TranslationGen.resolveSelect(month, {
669
- "january": `January`,
670
- "february": `February`,
671
- "march": `March`,
672
- "april": `April`,
673
- "may": `May`,
674
- "june": `June`,
675
- "july": `July`,
676
- "august": `August`,
677
- "september": `September`,
678
- "october": `October`,
679
- "november": `November`,
680
- "december": `December`,
681
- "other": `Unknown Month`
682
- });
683
- },
684
- "time.nanosecond": ({ count }) => {
685
- return TranslationGen.resolveSelect(count, {
686
- "=1": `Nanosecond`,
687
- "other": `Nanoseconds`
688
- });
689
- },
690
- "time.november": `November`,
691
- "time.october": `October`,
692
- "time.second": ({ count }) => {
693
- return TranslationGen.resolveSelect(count, {
694
- "=1": `Second`,
695
- "other": `Seconds`
696
- });
697
- },
698
- "time.september": `September`,
699
- "time.today": `Today`,
700
- "time.tomorrow": `Tomorrow`,
701
- "time.year": ({ count }) => {
702
- return TranslationGen.resolveSelect(count, {
703
- "=1": `Year`,
704
- "other": `Years`
705
- });
706
- },
707
- "time.yesterday": `Yesterday`,
708
- "tooFewSelectionItems": ({ min }) => {
709
- return `Select at least ${min} items.`;
710
- },
711
- "tooLong": ({ max }) => {
712
- return `The value requires less than ${max} characters.`;
713
- },
714
- "tooManySelectionItems": ({ max }) => {
715
- return `Select at most ${max} items.`;
716
- },
717
- "tooShort": ({ min }) => {
718
- return `The value requires at least ${min} characters.`;
719
- },
720
- "unsavedChanges": `Unsaved Changes`,
721
- "unsavedChangesSaveQuestion": `Do you want to save your changes?`,
722
- "update": `Update`,
723
- "value": `Value`,
724
- "welcome": `Welcome`,
725
- "yes": `Yes`
726
- }
727
- };
728
-
729
- // src/i18n/util.ts
730
- var localsNames = {
731
- "en-US": "English (US)",
732
- "de-DE": "Deutsch"
733
- };
734
- var DEFAULT_LOCALE = "en-US";
735
- function localeToLanguage(locale) {
736
- return locale.split("-")[0];
737
- }
738
- var LocalizationUtil = {
739
- locals: hightideTranslationLocales,
740
- localToLanguage: localeToLanguage,
741
- DEFAULT_LOCALE,
742
- languagesLocalNames: localsNames
743
- };
744
-
745
- // src/i18n/LocaleProvider.tsx
746
- import { jsx as jsx2 } from "react/jsx-runtime";
747
- var LocaleContext = createContext({
748
- locale: LocalizationUtil.DEFAULT_LOCALE,
749
- setLocale: (v) => v
750
- });
751
- var useLocale = () => {
752
- const context = useContext(LocaleContext);
753
- if (!context) {
754
- throw new Error("useLocale must be used within LocaleContext. Try adding a LocaleProvider around your app.");
755
- }
756
- return context;
757
- };
758
-
759
- // src/i18n/useHightideTranslation.ts
760
- import { combineTranslation, ICUUtil } from "@helpwave/internationalization";
761
- function useHightideTranslation(extensions, overwrites) {
762
- const { locale: inferredLocale } = useLocale();
763
- const locale = overwrites?.locale ?? inferredLocale;
764
- const translationExtensions = ArrayUtil.resolveSingleOrArray(extensions);
765
- return combineTranslation([
766
- ...translationExtensions,
767
- hightideTranslation
768
- ], locale);
769
- }
770
-
771
- // src/components/layout/Carousel.tsx
772
- import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
773
- var CarouselContext = createContext2(null);
774
- var useCarouselContext = () => {
775
- const context = useContext2(CarouselContext);
776
- if (!context) {
777
- console.error("useCarouselContext must be used within CarouselContext");
778
- }
779
- return context;
780
- };
781
- function CarouselTabs({
782
- onChange
783
- }) {
784
- const translation = useHightideTranslation();
785
- const { id, slideCount, currentIndex, isLooping } = useCarouselContext();
786
- const tabRefs = useRef([]);
787
- const handleKeyDown = (event, index) => {
788
- let newIndex = index;
789
- if (event.key === "ArrowRight") {
790
- newIndex = isLooping ? (index + 1) % slideCount : Math.max(index + 1, slideCount - 1);
791
- } else if (event.key === "ArrowLeft") {
792
- newIndex = isLooping ? (index - 1 + slideCount) % slideCount : Math.max(index - 1, 0);
793
- } else {
794
- return;
795
- }
796
- event.preventDefault();
797
- onChange(newIndex);
798
- tabRefs.current[newIndex]?.focus();
799
- };
800
- return /* @__PURE__ */ jsx3(
801
- "div",
802
- {
803
- className: "flex-row-1 items-center justify-center w-full my-2",
804
- role: "tablist",
805
- "aria-label": translation("slideNavigation"),
806
- id: `${id}-tablist`,
807
- children: range(slideCount).map((index) => {
808
- const isSelected = currentIndex === index;
809
- return /* @__PURE__ */ jsx3(
810
- "button",
811
- {
812
- id: `${id}-tab-${index}`,
813
- ref: (el) => tabRefs.current[index] = el,
814
- onClick: () => onChange(index),
815
- onKeyDown: (e) => handleKeyDown(e, index),
816
- className: clsx2(
817
- "w-8 min-w-8 h-3 min-h-3 first:rounded-l-md last:rounded-r-md",
818
- {
819
- "bg-carousel-dot-disabled hover:bg-carousel-dot-active": currentIndex !== index,
820
- "bg-carousel-dot-active hover:brightness-90": currentIndex === index
821
- }
822
- ),
823
- role: "tab",
824
- tabIndex: isSelected ? 0 : -1,
825
- "aria-label": translation("showSlide", { index: index + 1 }),
826
- "aria-selected": isSelected,
827
- "aria-controls": `slide-${index}`,
828
- "aria-disabled": isSelected
829
- },
830
- index
831
- );
832
- })
833
- }
834
- );
835
- }
836
- var CarouselSlide = forwardRef2(
837
- function CarouselSlide2({
838
- index,
839
- isSelected,
840
- ...props
841
- }, ref) {
842
- const translation = useHightideTranslation();
843
- const { id, slideCount } = useCarouselContext();
844
- return /* @__PURE__ */ jsx3(
845
- "div",
846
- {
847
- ...props,
848
- ref,
849
- id: `${id}-slide-${index}`,
850
- className: clsx2("focus-style-none group/slide", props.className),
851
- tabIndex: isSelected ? 0 : void 0,
852
- role: "group",
853
- "aria-roledescription": translation("slide"),
854
- "aria-label": translation("slideOf", {
855
- index: index + 1,
856
- length: slideCount
857
- }),
858
- "aria-hidden": isSelected ? void 0 : true
859
- }
860
- );
861
- }
862
- );
863
- var Carousel = ({
864
- children,
865
- animationTime = 200,
866
- isLooping = false,
867
- isAutoPlaying = false,
868
- autoLoopingTimeOut = 5e3,
869
- autoLoopAnimationTime = 1e3,
870
- hintNext = false,
871
- arrows = false,
872
- dots = true,
873
- blurColor = "from-background",
874
- heightClassName = "h-96",
875
- slideClassName = "w-[70%] desktop:w-1/2",
876
- slideContainerProps,
877
- onSlideChanged,
878
- ...props
879
- }) => {
880
- const translation = useHightideTranslation();
881
- const slideRefs = useRef([]);
882
- const [currentIndex, setCurrentIndex] = useState3(0);
883
- const [hasFocus, setHasFocus] = useState3(false);
884
- const [dragState, setDragState] = useState3();
885
- const isPaused = hasFocus;
886
- const carouselContainerRef = useRef(null);
887
- const [disableClick, setDisableClick] = useState3(false);
888
- const timeOut = useRef(void 0);
889
- const length = useMemo2(() => children.length, [children]);
890
- const paddingItemCount = 3;
891
- const generatedId = "carousel" + useId();
892
- const id = props.id ?? generatedId;
893
- if (isAutoPlaying && !isLooping) {
894
- console.error("When isAutoLooping is true, isLooping should also be true");
895
- isLooping = true;
896
- }
897
- autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
898
- animationTime = Math.max(100, animationTime);
899
- autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
900
- useEffect2(() => {
901
- const carousel = carouselContainerRef.current;
902
- if (carousel) {
903
- let onFocus = function() {
904
- setHasFocus(true);
905
- }, onBlur = function() {
906
- setHasFocus(false);
907
- };
908
- carousel?.addEventListener("focusin", onFocus);
909
- carousel?.addEventListener("focusout", onBlur);
910
- return () => {
911
- carousel?.removeEventListener("focusin", onFocus);
912
- carousel?.removeEventListener("focusin", onFocus);
913
- };
914
- }
915
- }, []);
916
- const getStyleOffset = (index) => {
917
- const baseOffset = -50 + (index - currentIndex) * 100;
918
- return `${baseOffset}%`;
919
- };
920
- const canGoLeft = () => {
921
- return isLooping || currentIndex !== 0;
922
- };
923
- const canGoRight = useCallback2(() => {
924
- return isLooping || currentIndex !== length - 1;
925
- }, [currentIndex, isLooping, length]);
926
- const left = () => {
927
- if (canGoLeft()) {
928
- setCurrentIndex(currentIndex - 1);
929
- }
930
- };
931
- const right = useCallback2(() => {
932
- if (canGoRight()) {
933
- setCurrentIndex((currentIndex + length + 1) % length);
934
- }
935
- }, [canGoRight, currentIndex, length]);
936
- useEffect2(() => {
937
- if (!timeOut.current && !isPaused) {
938
- if (autoLoopingTimeOut > 0) {
939
- timeOut.current = setTimeout(() => {
940
- right();
941
- timeOut.current = void 0;
942
- }, autoLoopingTimeOut);
943
- } else {
944
- right();
945
- }
946
- }
947
- if ((isPaused || !!dragState) && timeOut.current) {
948
- clearTimeout(timeOut.current);
949
- timeOut.current = void 0;
950
- }
951
- }, [right, isPaused, autoLoopingTimeOut, dragState]);
952
- let items = children.map((item, index) => ({
953
- index,
954
- item
955
- }));
956
- let before = [];
957
- let after = [];
958
- if (isLooping) {
959
- before = createLoopingListWithIndex(children, length - 1, paddingItemCount, false).reverse().map(([index, item]) => ({
960
- index,
961
- item
962
- }));
963
- after = createLoopingListWithIndex(children, 0, paddingItemCount).map(([index, item]) => ({
964
- index,
965
- item
966
- }));
967
- items = [...before, ...items, ...after];
968
- }
969
- const handlePointerDown = (e) => {
970
- setDragState({
971
- dragOffsetX: 0,
972
- dragStartX: e.clientX
973
- });
974
- };
975
- const handlePointerMove = (e) => {
976
- if (!dragState) return;
977
- setDragState((prevState) => ({ dragStartX: prevState.dragStartX, dragOffsetX: e.clientX - prevState.dragStartX }));
978
- };
979
- const handlePointerUp = () => {
980
- if (!dragState) return;
981
- if (dragState.dragOffsetX > 50) {
982
- left();
983
- } else if (dragState.dragOffsetX < -50) {
984
- right();
985
- }
986
- setDragState(void 0);
987
- };
988
- useEffect2(() => {
989
- setDisableClick(!dragState);
990
- }, [dragState]);
991
- useEffect2(() => {
992
- onSlideChanged?.(currentIndex);
993
- }, [currentIndex]);
994
- return /* @__PURE__ */ jsx3(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ jsxs2(
995
- "div",
996
- {
997
- ref: carouselContainerRef,
998
- ...props,
999
- className: clsx2("flex-col-2 items-center w-full", props.className),
1000
- id,
1001
- role: "region",
1002
- "aria-roledescription": translation("slide"),
1003
- children: [
1004
- /* @__PURE__ */ jsxs2(
1005
- "div",
1006
- {
1007
- ...slideContainerProps,
1008
- className: clsx2(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
1009
- children: [
1010
- hintNext ? /* @__PURE__ */ jsxs2(
1011
- "div",
1012
- {
1013
- onPointerDown: handlePointerDown,
1014
- onPointerMove: handlePointerMove,
1015
- onPointerUp: handlePointerUp,
1016
- onPointerLeave: handlePointerUp,
1017
- className: clsx2(`flex-row-2 relative h-full`, heightClassName),
1018
- children: [
1019
- /* @__PURE__ */ jsx3("div", { className: "flex-row-2 relative h-full w-full px-2 overflow-hidden", children: items.map(({
1020
- item,
1021
- index
1022
- }, listIndex) => {
1023
- const isInItems = before.length <= listIndex && listIndex < items.length - after.length;
1024
- return /* @__PURE__ */ jsx3(
1025
- CarouselSlide,
1026
- {
1027
- ref: isInItems ? slideRefs[index] : void 0,
1028
- index,
1029
- isSelected: isInItems && currentIndex === index,
1030
- className: clsx2(
1031
- `absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
1032
- slideClassName
1033
- ),
1034
- onClick: () => !disableClick && setCurrentIndex(index),
1035
- style: {
1036
- translate: `calc(${getStyleOffset(listIndex - (isLooping ? paddingItemCount : 0))} + ${dragState ? dragState.dragOffsetX : 0}px)`,
1037
- transitionDuration: dragState ? "0ms" : (isAutoPlaying && !isPaused ? autoLoopAnimationTime : animationTime) + "ms"
1038
- },
1039
- children: item
1040
- },
1041
- listIndex
1042
- );
1043
- }) }),
1044
- /* @__PURE__ */ jsx3(
1045
- "div",
1046
- {
1047
- className: clsx2(`hidden desktop:block pointer-events-none absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
1048
- }
1049
- ),
1050
- /* @__PURE__ */ jsx3(
1051
- "div",
1052
- {
1053
- className: clsx2(`hidden desktop:block pointer-events-none absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
1054
- }
1055
- )
1056
- ]
1057
- }
1058
- ) : /* @__PURE__ */ jsx3(
1059
- "div",
1060
- {
1061
- ref: slideRefs[currentIndex],
1062
- className: clsx2("px-16 h-full"),
1063
- tabIndex: 0,
1064
- role: "group",
1065
- "aria-roledescription": translation("slide"),
1066
- "aria-label": translation("slideOf", {
1067
- index: currentIndex + 1,
1068
- length: items.length
1069
- }),
1070
- children: children[currentIndex]
1071
- }
1072
- ),
1073
- arrows && /* @__PURE__ */ jsxs2(Fragment, { children: [
1074
- /* @__PURE__ */ jsx3(
1075
- IconButton,
1076
- {
1077
- color: "neutral",
1078
- className: clsx2("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
1079
- disabled: !canGoLeft(),
1080
- onClick: () => left(),
1081
- children: /* @__PURE__ */ jsx3(ChevronLeft, { size: 24 })
1082
- }
1083
- ),
1084
- /* @__PURE__ */ jsx3(
1085
- IconButton,
1086
- {
1087
- color: "neutral",
1088
- className: clsx2("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
1089
- disabled: !canGoRight(),
1090
- onClick: () => right(),
1091
- children: /* @__PURE__ */ jsx3(ChevronRight, { size: 24 })
1092
- }
1093
- )
1094
- ] })
1095
- ]
1096
- }
1097
- ),
1098
- dots && /* @__PURE__ */ jsx3(CarouselTabs, { onChange: setCurrentIndex })
1099
- ]
1100
- }
1101
- ) });
1102
- };
1103
-
1104
- // src/components/layout/Chip.tsx
1105
- import clsx3 from "clsx";
1106
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1107
- var chipColors = ["default", "dark", "red", "yellow", "green", "blue", "pink", "orange"];
1108
- var ChipUtil = {
1109
- colors: chipColors
1110
- };
1111
- var Chip = ({
1112
- children,
1113
- trailingIcon,
1114
- color = "default",
1115
- size = "md",
1116
- icon = false,
1117
- variant = "normal",
1118
- className = "",
1119
- ...restProps
1120
- }) => {
1121
- const colorMapping = {
1122
- default: "text-tag-default-text bg-tag-default-background",
1123
- dark: "text-tag-dark-text bg-tag-dark-background",
1124
- red: "text-tag-red-text bg-tag-red-background",
1125
- yellow: "text-tag-yellow-text bg-tag-yellow-background",
1126
- green: "text-tag-green-text bg-tag-green-background",
1127
- blue: "text-tag-blue-text bg-tag-blue-background",
1128
- pink: "text-tag-pink-text bg-tag-pink-background",
1129
- orange: "text-tag-orange-text bg-tag-orange-background"
1130
- }[color];
1131
- const colorMappingIcon = {
1132
- default: "text-tag-default-icon",
1133
- dark: "text-tag-dark-icon",
1134
- red: "text-tag-red-icon",
1135
- yellow: "text-tag-yellow-icon",
1136
- green: "text-tag-green-icon",
1137
- blue: "text-tag-blue-icon",
1138
- pink: "text-tag-pink-icon",
1139
- orange: "text-tag-orange-icon"
1140
- }[color];
1141
- return /* @__PURE__ */ jsxs3(
1142
- "div",
1143
- {
1144
- ...restProps,
1145
- className: clsx3(
1146
- `flex-row-0 w-fit font-semibold`,
1147
- colorMapping,
1148
- !icon ? {
1149
- "px-1 py-0.5": size === "sm",
1150
- "px-2 py-1": size === "md",
1151
- "px-4 py-2": size === "lg"
1152
- } : {
1153
- "p-0.5": size === "sm",
1154
- "p-1": size === "md",
1155
- "p-2": size === "lg"
1156
- },
1157
- {
1158
- "rounded-md": variant === "normal",
1159
- "rounded-full": variant === "fullyRounded"
1160
- },
1161
- className
1162
- ),
1163
- children: [
1164
- children,
1165
- trailingIcon && /* @__PURE__ */ jsx4("span", { className: colorMappingIcon, children: trailingIcon })
1166
- ]
1167
- }
1168
- );
1169
- };
1170
- var ChipList = ({
1171
- list,
1172
- className = ""
1173
- }) => {
1174
- return /* @__PURE__ */ jsx4("div", { className: clsx3("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ jsx4(
1175
- Chip,
1176
- {
1177
- ...value,
1178
- color: value.color ?? "default",
1179
- variant: value.variant ?? "normal",
1180
- children: value.children
1181
- },
1182
- index
1183
- )) });
1184
- };
1185
-
1186
- // src/components/layout/DividerInserter.tsx
1187
- import clsx4 from "clsx";
1188
- import { jsx as jsx5 } from "react/jsx-runtime";
1189
- var DividerInserter = ({
1190
- children,
1191
- divider,
1192
- className,
1193
- ...restProps
1194
- }) => {
1195
- const nodes = [];
1196
- for (let index = 0; index < children.length; index++) {
1197
- const element = children[index];
1198
- if (element !== void 0) {
1199
- nodes.push(element);
1200
- if (index < children.length - 1) {
1201
- nodes.push(divider(index));
1202
- }
1203
- }
1204
- }
1205
- return /* @__PURE__ */ jsx5("div", { className: clsx4(className), ...restProps, children: nodes });
1206
- };
1207
-
1208
- // src/components/layout/Expandable.tsx
1209
- import { forwardRef as forwardRef3, useCallback as useCallback3, useId as useId2 } from "react";
1210
- import { ChevronDown } from "lucide-react";
1211
- import clsx5 from "clsx";
1212
-
1213
- // src/hooks/useOverwritableState.ts
1214
- import { useEffect as useEffect3, useState as useState4 } from "react";
1215
- var useOverwritableState = (initialValue, onChange) => {
1216
- const [state, setState] = useState4(initialValue);
1217
- useEffect3(() => {
1218
- setState(initialValue);
1219
- }, [initialValue]);
1220
- const onChangeWrapper = (action) => {
1221
- const resolved = resolveSetState(action, state);
1222
- setState(resolved);
1223
- onChange?.(state);
1224
- };
1225
- return [state, onChangeWrapper];
1226
- };
1227
-
1228
- // src/components/layout/Expandable.tsx
1229
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1230
- var ExpansionIcon = ({ isExpanded, className }) => {
1231
- return /* @__PURE__ */ jsx6(
1232
- ChevronDown,
1233
- {
1234
- "aria-hidden": true,
1235
- className: clsx5(
1236
- "min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
1237
- { "rotate-180": isExpanded },
1238
- className
1239
- )
1240
- }
1241
- );
1242
- };
1243
- var Expandable = forwardRef3(function Expandable2({
1244
- children,
1245
- id: providedId,
1246
- label,
1247
- icon,
1248
- isExpanded = false,
1249
- onChange,
1250
- clickOnlyOnHeader = true,
1251
- disabled = false,
1252
- className,
1253
- headerClassName,
1254
- contentClassName,
1255
- contentExpandedClassName
1256
- }, ref) {
1257
- const defaultIcon = useCallback3((expanded) => /* @__PURE__ */ jsx6(ExpansionIcon, { isExpanded: expanded }), []);
1258
- icon ??= defaultIcon;
1259
- const generatedId = useId2();
1260
- const id = providedId ?? generatedId;
1261
- return /* @__PURE__ */ jsxs4(
1262
- "div",
1263
- {
1264
- ref,
1265
- onClick: () => !clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
1266
- className: clsx5(
1267
- "flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
1268
- { "cursor-pointer": !clickOnlyOnHeader && !disabled },
1269
- className
1270
- ),
1271
- children: [
1272
- /* @__PURE__ */ jsxs4(
1273
- "button",
1274
- {
1275
- onClick: () => clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
1276
- className: clsx5(
1277
- "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
1278
- {
1279
- "group-hover:brightness-97": !isExpanded,
1280
- "hover:brightness-97": isExpanded && !disabled,
1281
- "cursor-pointer": clickOnlyOnHeader && !disabled
1282
- },
1283
- headerClassName
1284
- ),
1285
- "aria-expanded": isExpanded,
1286
- "aria-controls": `${id}-content`,
1287
- "aria-disabled": disabled ?? void 0,
1288
- children: [
1289
- label,
1290
- icon(isExpanded)
1291
- ]
1292
- }
1293
- ),
1294
- /* @__PURE__ */ jsx6(
1295
- "div",
1296
- {
1297
- id: `${id}-content`,
1298
- className: clsx5(
1299
- "flex-col-2 px-4 transition-all duration-300 ease-in-out",
1300
- {
1301
- [clsx5("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
1302
- "max-h-0 opacity-0 overflow-hidden": !isExpanded
1303
- },
1304
- contentClassName
1305
- ),
1306
- role: "region",
1307
- children
1308
- }
1309
- )
1310
- ]
1311
- }
1312
- );
1313
- });
1314
- var ExpandableUncontrolled = forwardRef3(function ExpandableUncontrolled2({
1315
- isExpanded,
1316
- onChange,
1317
- ...props
1318
- }, ref) {
1319
- const [usedIsExpanded, setUsedIsExpanded] = useOverwritableState(isExpanded, onChange);
1320
- return /* @__PURE__ */ jsx6(
1321
- Expandable,
1322
- {
1323
- ...props,
1324
- ref,
1325
- isExpanded: usedIsExpanded,
1326
- onChange: setUsedIsExpanded
1327
- }
1328
- );
1329
- });
1330
-
1331
- // src/components/layout/FAQSection.tsx
1332
- import clsx6 from "clsx";
1333
-
1334
- // src/components/layout/MarkdownInterpreter.tsx
1335
- import { Fragment as Fragment2, jsx as jsx7 } from "react/jsx-runtime";
1336
- var astNodeInserterType = ["helpwave", "newline"];
1337
- var ASTNodeInterpreter = ({
1338
- node,
1339
- isRoot = false,
1340
- className = ""
1341
- }) => {
1342
- switch (node.type) {
1343
- case "newline":
1344
- return /* @__PURE__ */ jsx7("br", {});
1345
- case "text":
1346
- return isRoot ? /* @__PURE__ */ jsx7("span", { className, children: node.text }) : node.text;
1347
- case "helpwave":
1348
- return /* @__PURE__ */ jsx7("span", { className: "font-bold font-space no-underline", children: "helpwave" });
1349
- case "none":
1350
- return isRoot ? /* @__PURE__ */ jsx7("span", { className, children: node.children.map((value, index) => /* @__PURE__ */ jsx7(
1351
- ASTNodeInterpreter,
1352
- {
1353
- node: value
1354
- },
1355
- index
1356
- )) }) : /* @__PURE__ */ jsx7(Fragment2, { children: node.children.map((value, index) => /* @__PURE__ */ jsx7(ASTNodeInterpreter, { node: value }, index)) });
1357
- case "bold":
1358
- return /* @__PURE__ */ jsx7("b", { children: node.children.map((value, index) => /* @__PURE__ */ jsx7(ASTNodeInterpreter, { node: value }, index)) });
1359
- case "italic":
1360
- return /* @__PURE__ */ jsx7("i", { children: node.children.map((value, index) => /* @__PURE__ */ jsx7(ASTNodeInterpreter, { node: value }, index)) });
1361
- case "underline":
1362
- return /* @__PURE__ */ jsx7("u", { children: node.children.map((value, index) => /* @__PURE__ */ jsx7(ASTNodeInterpreter, { node: value }, index)) });
1363
- case "font-space":
1364
- return /* @__PURE__ */ jsx7("span", { className: "font-space", children: node.children.map((value, index) => /* @__PURE__ */ jsx7(
1365
- ASTNodeInterpreter,
1366
- {
1367
- node: value
1368
- },
1369
- index
1370
- )) });
1371
- case "primary":
1372
- return /* @__PURE__ */ jsx7("span", { className: "text-primary", children: node.children.map((value, index) => /* @__PURE__ */ jsx7(
1373
- ASTNodeInterpreter,
1374
- {
1375
- node: value
1376
- },
1377
- index
1378
- )) });
1379
- case "secondary":
1380
- return /* @__PURE__ */ jsx7("span", { className: "text-secondary", children: node.children.map((value, index) => /* @__PURE__ */ jsx7(
1381
- ASTNodeInterpreter,
1382
- {
1383
- node: value
1384
- },
1385
- index
1386
- )) });
1387
- case "warn":
1388
- return /* @__PURE__ */ jsx7("span", { className: "text-warning", children: node.children.map((value, index) => /* @__PURE__ */ jsx7(
1389
- ASTNodeInterpreter,
1390
- {
1391
- node: value
1392
- },
1393
- index
1394
- )) });
1395
- case "positive":
1396
- return /* @__PURE__ */ jsx7("span", { className: "text-positive", children: node.children.map((value, index) => /* @__PURE__ */ jsx7(
1397
- ASTNodeInterpreter,
1398
- {
1399
- node: value
1400
- },
1401
- index
1402
- )) });
1403
- case "negative":
1404
- return /* @__PURE__ */ jsx7("span", { className: "text-negative", children: node.children.map((value, index) => /* @__PURE__ */ jsx7(
1405
- ASTNodeInterpreter,
1406
- {
1407
- node: value
1408
- },
1409
- index
1410
- )) });
1411
- default:
1412
- return null;
1413
- }
1414
- };
1415
- var modifierIdentifierMapping = [
1416
- { id: "i", name: "italic" },
1417
- { id: "b", name: "bold" },
1418
- { id: "u", name: "underline" },
1419
- { id: "space", name: "font-space" },
1420
- { id: "primary", name: "primary" },
1421
- { id: "secondary", name: "secondary" },
1422
- { id: "warn", name: "warn" },
1423
- { id: "positive", name: "positive" },
1424
- { id: "negative", name: "negative" }
1425
- ];
1426
- var inserterIdentifierMapping = [
1427
- { id: "helpwave", name: "helpwave" },
1428
- { id: "newline", name: "newline" }
1429
- ];
1430
- var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
1431
- let start = text.indexOf(commandStart);
1432
- const children = [];
1433
- while (text !== "") {
1434
- if (start === -1) {
1435
- children.push({
1436
- type: "text",
1437
- text
1438
- });
1439
- break;
1440
- }
1441
- children.push(parseMarkdown(text.substring(0, start)));
1442
- text = text.substring(start);
1443
- if (text.length <= 1) {
1444
- children.push({
1445
- type: "text",
1446
- text
1447
- });
1448
- text = "";
1449
- continue;
1450
- }
1451
- const simpleReplace = [commandStart, open, close];
1452
- if (simpleReplace.some((value) => text[1] === value)) {
1453
- children.push({
1454
- type: "text",
1455
- text: simpleReplace.find((value) => text[1] === value)
1456
- });
1457
- text = text.substring(2);
1458
- start = text.indexOf(commandStart);
1459
- continue;
1460
- }
1461
- const inserter = inserterIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
1462
- if (inserter) {
1463
- children.push({
1464
- type: inserter.name
1465
- });
1466
- text = text.substring(inserter.id.length + 1);
1467
- start = text.indexOf(commandStart);
1468
- continue;
1469
- }
1470
- const modifier = modifierIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
1471
- if (modifier) {
1472
- if (text[modifier.id.length + 1] !== open) {
1473
- children.push({
1474
- type: "text",
1475
- text: text.substring(0, modifier.id.length + 1)
1476
- });
1477
- text = text.substring(modifier.id.length + 2);
1478
- start = text.indexOf(commandStart);
1479
- continue;
1480
- }
1481
- let closing = -1;
1482
- let index = modifier.id.length + 2;
1483
- let counter = 1;
1484
- let escaping = false;
1485
- while (index < text.length) {
1486
- if (text[index] === open && !escaping) {
1487
- counter++;
1488
- }
1489
- if (text[index] === close && !escaping) {
1490
- counter--;
1491
- if (counter === 0) {
1492
- closing = index;
1493
- break;
1494
- }
1495
- }
1496
- escaping = text[index] === commandStart;
1497
- index++;
1498
- }
1499
- if (closing !== -1) {
1500
- children.push({
1501
- type: modifier.name,
1502
- children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]
1503
- });
1504
- text = text.substring(closing + 1);
1505
- start = text.indexOf(commandStart);
1506
- continue;
1507
- }
1508
- }
1509
- children.push({
1510
- type: "text",
1511
- text: text[0]
1512
- });
1513
- text = text.substring(1);
1514
- start = text.indexOf(commandStart);
1515
- }
1516
- return {
1517
- type: "none",
1518
- children
1519
- };
1520
- };
1521
- var optimizeTree = (node) => {
1522
- if (node.type === "text") {
1523
- return !node.text ? void 0 : node;
1524
- }
1525
- if (astNodeInserterType.some((value) => value === node.type)) {
1526
- return node;
1527
- }
1528
- const currentNode = node;
1529
- if (currentNode.children.length === 0) {
1530
- return void 0;
1531
- }
1532
- let children = [];
1533
- for (let i = 0; i < currentNode.children.length; i++) {
1534
- const child = optimizeTree(currentNode.children[i]);
1535
- if (!child) {
1536
- continue;
1537
- }
1538
- if (child.type === "none") {
1539
- children.push(...child.children);
1540
- } else {
1541
- children.push(child);
1542
- }
1543
- }
1544
- currentNode.children = children;
1545
- children = [];
1546
- for (let i = 0; i < currentNode.children.length; i++) {
1547
- const child = currentNode.children[i];
1548
- if (child) {
1549
- if (child.type === "text" && children[children.length - 1]?.type === "text") {
1550
- children[children.length - 1].text += child.text;
1551
- } else {
1552
- children.push(child);
1553
- }
1554
- }
1555
- }
1556
- currentNode.children = children;
1557
- return currentNode;
1558
- };
1559
- var MarkdownInterpreter = ({ text, className }) => {
1560
- const tree = parseMarkdown(text);
1561
- const optimizedTree = optimizeTree(tree);
1562
- return /* @__PURE__ */ jsx7(ASTNodeInterpreter, { node: optimizedTree, isRoot: true, className });
1563
- };
1564
-
1565
- // src/components/layout/FAQSection.tsx
1566
- import { jsx as jsx8 } from "react/jsx-runtime";
1567
- var FAQSection = ({
1568
- entries,
1569
- expandableClassName
1570
- }) => {
1571
- return /* @__PURE__ */ jsx8("ul", { className: "flex-col-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(
1572
- ExpandableUncontrolled,
1573
- {
1574
- ...restProps,
1575
- label: /* @__PURE__ */ jsx8("span", { id, className: "typography-title-md", children: title }),
1576
- clickOnlyOnHeader: false,
1577
- icon: (expanded) => /* @__PURE__ */ jsx8(ExpansionIcon, { isExpanded: expanded, className: "text-primary" }),
1578
- className: clsx6("rounded-xl", expandableClassName),
1579
- children: /* @__PURE__ */ jsx8("div", { className: "mt-2", children: content.type === "markdown" ? /* @__PURE__ */ jsx8(MarkdownInterpreter, { text: content.value }) : content.value })
1580
- },
1581
- id
1582
- ) }, id)) });
1583
- };
1584
-
1585
- // src/components/layout/FloatingContainer.tsx
1586
- import { forwardRef as forwardRef4, useImperativeHandle, useRef as useRef2 } from "react";
1587
- import { createPortal } from "react-dom";
1588
- import { clsx as clsx7 } from "clsx";
1589
-
1590
- // src/hooks/useFloatingElement.ts
1591
- import { useCallback as useCallback4, useEffect as useEffect5, useState as useState6 } from "react";
1592
-
1593
- // src/utils/math.ts
1594
- var clamp = (value, range2 = [0, 1]) => {
1595
- const [min, max] = range2;
1596
- return Math.min(Math.max(value, min), max);
1597
- };
1598
-
1599
- // src/hooks/focus/useIsMounted.ts
1600
- import { useEffect as useEffect4, useLayoutEffect, useState as useState5 } from "react";
1601
- var isClient = typeof window !== "undefined" && typeof document !== "undefined";
1602
- var useIsomorphicEffect = isClient ? useLayoutEffect : useEffect4;
1603
- var useIsMounted = () => {
1604
- const [isMounted, setIsMounted] = useState5(false);
1605
- useIsomorphicEffect(() => {
1606
- setIsMounted(true);
1607
- return () => {
1608
- setIsMounted(false);
1609
- };
1610
- }, []);
1611
- return isMounted;
1612
- };
1613
-
1614
- // src/hooks/useFloatingElement.ts
1615
- function calculatePosition({
1616
- windowRect,
1617
- containerRect,
1618
- anchorRect,
1619
- options
1620
- }) {
1621
- const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
1622
- const windowWidth = windowRect.width;
1623
- const windowHeight = windowRect.height;
1624
- const maxWidth = windowWidth - 2 * screenPadding;
1625
- const maxHeight = windowHeight - 2 * screenPadding;
1626
- const width = Math.min(containerRect.width, maxWidth);
1627
- const height = Math.min(containerRect.height, maxHeight);
1628
- const leftSuggestion = {
1629
- beforeStart: anchorRect.left - width - gap,
1630
- afterStart: anchorRect.left,
1631
- center: anchorRect.left + anchorRect.width / 2 - width / 2,
1632
- beforeEnd: anchorRect.right - width,
1633
- afterEnd: anchorRect.right + gap
1634
- }[horizontalAlignment];
1635
- const topSuggestion = {
1636
- beforeStart: anchorRect.top - height - gap,
1637
- afterStart: anchorRect.top,
1638
- center: anchorRect.top + anchorRect.height / 2 - height / 2,
1639
- beforeEnd: anchorRect.bottom - height,
1640
- afterEnd: anchorRect.bottom + gap
1641
- }[verticalAlignment];
1642
- const left = clamp(leftSuggestion, [
1643
- screenPadding,
1644
- windowWidth - screenPadding - width
1645
- ]);
1646
- const top = clamp(topSuggestion, [
1647
- screenPadding,
1648
- windowHeight - screenPadding - height
1649
- ]);
1650
- return {
1651
- left,
1652
- top,
1653
- maxWidth,
1654
- maxHeight
1655
- };
1656
- }
1657
- function useFloatingElement({
1658
- active = true,
1659
- windowRef,
1660
- anchorRef,
1661
- containerRef,
1662
- isPolling = false,
1663
- pollingInterval = 100,
1664
- verticalAlignment = "afterEnd",
1665
- horizontalAlignment = "afterStart",
1666
- screenPadding = 16,
1667
- gap = 4
1668
- }) {
1669
- const [style, setStyle] = useState6();
1670
- const isMounted = useIsMounted();
1671
- const calculate = useCallback4(() => {
1672
- const containerRect = containerRef.current.getBoundingClientRect();
1673
- const windowRect = windowRef?.current.getBoundingClientRect() ?? {
1674
- top: 0,
1675
- bottom: window.innerHeight,
1676
- left: 0,
1677
- right: window.innerWidth,
1678
- width: window.innerWidth,
1679
- height: window.innerHeight
1680
- };
1681
- const anchorElement = anchorRef?.current;
1682
- if (anchorRef && !anchorElement) {
1683
- console.warn("FloatingContainer anchor provided, but its value is undefined");
1684
- }
1685
- const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
1686
- const calculateProps = {
1687
- windowRect,
1688
- anchorRect,
1689
- containerRect,
1690
- options: {
1691
- horizontalAlignment,
1692
- verticalAlignment,
1693
- screenPadding,
1694
- gap
1695
- }
1696
- };
1697
- setStyle(calculatePosition(calculateProps));
1698
- }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
1699
- const height = containerRef.current?.getBoundingClientRect().height;
1700
- const width = containerRef.current?.getBoundingClientRect().width;
1701
- useEffect5(() => {
1702
- if (active && isMounted) {
1703
- calculate();
1704
- } else {
1705
- setStyle(void 0);
1706
- }
1707
- }, [calculate, active, isMounted, height, width]);
1708
- useEffect5(() => {
1709
- window.addEventListener("resize", calculate);
1710
- let timeout;
1711
- if (isPolling) {
1712
- timeout = setInterval(calculate, pollingInterval);
1713
- }
1714
- return () => {
1715
- window.removeEventListener("resize", calculate);
1716
- if (timeout) {
1717
- clearInterval(timeout);
1718
- }
1719
- };
1720
- }, [calculate, isPolling, pollingInterval]);
1721
- return style;
1722
- }
1723
-
1724
- // src/components/layout/FloatingContainer.tsx
1725
- import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
1726
- var FloatingContainer = forwardRef4(function FloatingContainer2({
1727
- children,
1728
- backgroundOverlay,
1729
- anchor,
1730
- isPolling = false,
1731
- pollingInterval = 100,
1732
- verticalAlignment = "afterEnd",
1733
- horizontalAlignment = "afterStart",
1734
- screenPadding = 16,
1735
- gap = 4,
1736
- ...props
1737
- }, forwardRef9) {
1738
- const innerRef = useRef2(null);
1739
- useImperativeHandle(forwardRef9, () => innerRef.current);
1740
- const position = useFloatingElement({
1741
- active: !props.hidden,
1742
- containerRef: innerRef,
1743
- anchorRef: anchor,
1744
- isPolling,
1745
- pollingInterval,
1746
- verticalAlignment,
1747
- horizontalAlignment,
1748
- gap,
1749
- screenPadding
1750
- });
1751
- return createPortal(
1752
- /* @__PURE__ */ jsxs5(Fragment3, { children: [
1753
- backgroundOverlay,
1754
- /* @__PURE__ */ jsx9(
1755
- "div",
1756
- {
1757
- ...props,
1758
- ref: innerRef,
1759
- "data-positioned": position && !props.hidden ? "" : void 0,
1760
- style: {
1761
- position: "fixed",
1762
- overflow: "hidden",
1763
- opacity: position ? void 0 : 0,
1764
- // hide when position calculation isn't done yet
1765
- transition: position ? `top ${pollingInterval}ms linear, left ${pollingInterval}ms linear` : void 0,
1766
- ...position,
1767
- ...props.style
1768
- },
1769
- className: clsx7("motion-safe:duration-100 motion-reduce:duration-0", props.className),
1770
- children
1771
- }
1772
- )
1773
- ] }),
1774
- document.body
1775
- );
1776
- });
1777
-
1778
- // src/components/layout/ListBox.tsx
1779
- import React2, { createContext as createContext3, forwardRef as forwardRef5, useCallback as useCallback5, useContext as useContext3, useEffect as useEffect6, useRef as useRef3, useState as useState7 } from "react";
1780
- import { clsx as clsx8 } from "clsx";
1781
-
1782
- // src/utils/match.ts
1783
- var match = (key, values) => {
1784
- return values[key];
1785
- };
1786
-
1787
- // src/components/layout/ListBox.tsx
1788
- import { jsx as jsx10 } from "react/jsx-runtime";
1789
- var ListBoxContext = createContext3(null);
1790
- function useListBoxContext() {
1791
- const ctx = useContext3(ListBoxContext);
1792
- if (!ctx) {
1793
- throw new Error("ListBoxItem must be used within a ListBoxPrimitive");
1794
- }
1795
- return ctx;
1796
- }
1797
- var ListBoxItem = forwardRef5(
1798
- function ListBoxItem2({ value, disabled = false, children, className, ...rest }, ref) {
1799
- const {
1800
- registerItem,
1801
- unregisterItem,
1802
- highlightedId,
1803
- setHighlightedId,
1804
- onItemClick,
1805
- isSelected
1806
- } = useListBoxContext();
1807
- const itemRef = useRef3(null);
1808
- const id = React2.useId();
1809
- useEffect6(() => {
1810
- registerItem({ id, value, disabled, ref: itemRef });
1811
- return () => unregisterItem(id);
1812
- }, [id, value, disabled, registerItem, unregisterItem]);
1813
- const isHighlighted = highlightedId === id;
1814
- const selected = isSelected(value);
1815
- return /* @__PURE__ */ jsx10(
1816
- "li",
1817
- {
1818
- ref: (node) => {
1819
- itemRef.current = node;
1820
- if (typeof ref === "function") ref(node);
1821
- else if (ref) ref.current = node;
1822
- },
1823
- id,
1824
- role: "option",
1825
- "aria-disabled": disabled,
1826
- "aria-selected": selected,
1827
- "data-highlighted": isHighlighted ? "" : void 0,
1828
- "data-selected": selected ? "" : void 0,
1829
- "data-disabled": disabled ? "" : void 0,
1830
- className: clsx8(
1831
- "flex-row-1 items-center px-2 py-1 rounded-md",
1832
- "data-highlighted:bg-primary/20",
1833
- "data-disabled:text-disabled data-disabled:cursor-not-allowed",
1834
- "not-data-disabled:cursor-pointer",
1835
- className
1836
- ),
1837
- onClick: () => {
1838
- if (!disabled) onItemClick(id);
1839
- },
1840
- onMouseEnter: () => {
1841
- if (!disabled) {
1842
- setHighlightedId(id);
1843
- }
1844
- },
1845
- ...rest,
1846
- children: children ?? value
1847
- }
1848
- );
1849
- }
1850
- );
1851
- var ListBoxPrimitive = forwardRef5(
1852
- function ListBoxPrimitive2({
1853
- value,
1854
- onSelectionChanged,
1855
- onItemClicked,
1856
- isSelection = false,
1857
- isMultiple = false,
1858
- orientation = "vertical",
1859
- ...props
1860
- }, ref) {
1861
- const itemsRef = useRef3([]);
1862
- const [highlightedIndex, setHighlightedIndex] = useState7(void 0);
1863
- const registerItem = useCallback5((item) => {
1864
- itemsRef.current.push(item);
1865
- itemsRef.current.sort((a, b) => {
1866
- const aEl = a.ref.current;
1867
- const bEl = b.ref.current;
1868
- if (!aEl || !bEl) return 0;
1869
- return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
1870
- });
1871
- }, []);
1872
- const unregisterItem = useCallback5((id) => {
1873
- itemsRef.current = itemsRef.current.filter((i) => i.id !== id);
1874
- }, []);
1875
- const isSelected = useCallback5(
1876
- (val) => (value ?? []).includes(val),
1877
- [value]
1878
- );
1879
- const onItemClickedHandler = useCallback5(
1880
- (id) => {
1881
- const index = itemsRef.current.findIndex((i) => i.id === id);
1882
- if (index === -1) {
1883
- console.error("ListBoxItem provided an invalid id");
1884
- return;
1885
- }
1886
- const item = itemsRef.current[index];
1887
- const val = item.value;
1888
- onItemClicked?.(val);
1889
- setHighlightedIndex(index);
1890
- if (!isSelection) return;
1891
- if (!isMultiple) {
1892
- onSelectionChanged?.([val]);
1893
- } else {
1894
- if (isSelected(val)) {
1895
- onSelectionChanged?.((value ?? []).filter((v) => v !== val));
1896
- } else {
1897
- onSelectionChanged?.([...value ?? [], val]);
1898
- }
1899
- }
1900
- },
1901
- [onItemClicked, isSelection, isMultiple, onSelectionChanged, isSelected, value]
1902
- );
1903
- const setHighlightedId = useCallback5((id) => {
1904
- const index = itemsRef.current.findIndex((i) => i.id === id);
1905
- if (index !== -1) {
1906
- setHighlightedIndex(index);
1907
- }
1908
- }, []);
1909
- useEffect6(() => {
1910
- if (highlightedIndex !== void 0) {
1911
- itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
1912
- }
1913
- }, [highlightedIndex]);
1914
- const highlightedItem = itemsRef.current[highlightedIndex];
1915
- const ctxValue = {
1916
- registerItem,
1917
- unregisterItem,
1918
- highlightedId: highlightedItem?.id,
1919
- setHighlightedId,
1920
- onItemClick: onItemClickedHandler,
1921
- isSelected
1922
- };
1923
- const moveHighlight = (delta) => {
1924
- if (itemsRef.current.length === 0) return;
1925
- let nextIndex = highlightedIndex ?? -1;
1926
- for (let i = 0; i < itemsRef.current.length; i++) {
1927
- nextIndex = (nextIndex + delta + itemsRef.current.length) % itemsRef.current.length;
1928
- if (!itemsRef.current[nextIndex].disabled) break;
1929
- }
1930
- setHighlightedIndex(nextIndex);
1931
- };
1932
- return /* @__PURE__ */ jsx10(ListBoxContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx10(
1933
- "ul",
1934
- {
1935
- ref,
1936
- ...props,
1937
- onFocus: (event) => {
1938
- if (highlightedIndex === void 0) {
1939
- const firstEnabled = itemsRef.current.findIndex((i) => !i.disabled);
1940
- setHighlightedIndex(firstEnabled !== -1 ? firstEnabled : void 0);
1941
- }
1942
- props.onFocus?.(event);
1943
- },
1944
- onBlur: (event) => {
1945
- setHighlightedIndex(void 0);
1946
- props.onBlur?.(event);
1947
- },
1948
- onKeyDown: (event) => {
1949
- switch (event.key) {
1950
- case match(orientation, {
1951
- vertical: "ArrowDown",
1952
- horizontal: "ArrowUp"
1953
- }):
1954
- moveHighlight(1);
1955
- event.preventDefault();
1956
- break;
1957
- case match(orientation, {
1958
- vertical: "ArrowUp",
1959
- horizontal: "ArrowDown"
1960
- }):
1961
- moveHighlight(-1);
1962
- event.preventDefault();
1963
- break;
1964
- case "Home":
1965
- setHighlightedIndex(itemsRef.current.findIndex((i) => !i.disabled));
1966
- event.preventDefault();
1967
- break;
1968
- case "End":
1969
- for (let i = itemsRef.current.length - 1; i >= 0; i--) {
1970
- if (!itemsRef.current[i].disabled) {
1971
- setHighlightedIndex(i);
1972
- break;
1973
- }
1974
- }
1975
- event.preventDefault();
1976
- break;
1977
- case "Enter":
1978
- case " ":
1979
- if (highlightedIndex !== void 0) {
1980
- event.preventDefault();
1981
- onItemClickedHandler(itemsRef.current[highlightedIndex].id);
1982
- }
1983
- break;
1984
- }
1985
- props.onKeyDown?.(event);
1986
- },
1987
- role: "listbox",
1988
- "aria-multiselectable": isSelection ? isMultiple : void 0,
1989
- "aria-orientation": orientation,
1990
- tabIndex: 0,
1991
- children: props.children
1992
- }
1993
- ) });
1994
- }
1995
- );
1996
- var ListBoxMultiple = ({ ...props }) => {
1997
- return /* @__PURE__ */ jsx10(ListBoxPrimitive, { ...props });
1998
- };
1999
- var ListBoxMultipleUncontrolled = ({
2000
- value: initialValue,
2001
- onSelectionChanged,
2002
- ...props
2003
- }) => {
2004
- const [value, setValue] = useOverwritableState(initialValue, onSelectionChanged);
2005
- return /* @__PURE__ */ jsx10(
2006
- ListBoxMultiple,
2007
- {
2008
- ...props,
2009
- value,
2010
- onSelectionChanged: setValue
2011
- }
2012
- );
2013
- };
2014
- var ListBox = forwardRef5(function ListBox2({
2015
- value,
2016
- onSelectionChanged,
2017
- ...props
2018
- }, ref) {
2019
- return /* @__PURE__ */ jsx10(
2020
- ListBoxPrimitive,
2021
- {
2022
- ref,
2023
- value: value !== void 0 ? [value] : void 0,
2024
- onSelectionChanged: (newValue) => {
2025
- onSelectionChanged(newValue[0] ?? value);
2026
- },
2027
- isMultiple: false,
2028
- ...props
2029
- }
2030
- );
2031
- });
2032
- var ListBoxUncontrolled = ({
2033
- value: initialValue,
2034
- onSelectionChanged,
2035
- ...props
2036
- }) => {
2037
- const [value, setValue] = useOverwritableState(initialValue, onSelectionChanged);
2038
- return /* @__PURE__ */ jsx10(
2039
- ListBox,
2040
- {
2041
- ...props,
2042
- value,
2043
- onSelectionChanged: setValue
2044
- }
2045
- );
2046
- };
2047
-
2048
- // node_modules/@radix-ui/react-scroll-area/dist/index.mjs
2049
- import * as React23 from "react";
2050
-
2051
- // node_modules/@radix-ui/react-primitive/dist/index.mjs
2052
- import * as React5 from "react";
2053
- import * as ReactDOM from "react-dom";
2054
-
2055
- // node_modules/@radix-ui/react-slot/dist/index.mjs
2056
- import * as React4 from "react";
2057
-
2058
- // node_modules/@radix-ui/react-compose-refs/dist/index.mjs
2059
- import * as React3 from "react";
2060
- function setRef(ref, value) {
2061
- if (typeof ref === "function") {
2062
- return ref(value);
2063
- } else if (ref !== null && ref !== void 0) {
2064
- ref.current = value;
2065
- }
2066
- }
2067
- function composeRefs(...refs) {
2068
- return (node) => {
2069
- let hasCleanup = false;
2070
- const cleanups = refs.map((ref) => {
2071
- const cleanup = setRef(ref, node);
2072
- if (!hasCleanup && typeof cleanup == "function") {
2073
- hasCleanup = true;
2074
- }
2075
- return cleanup;
2076
- });
2077
- if (hasCleanup) {
2078
- return () => {
2079
- for (let i = 0; i < cleanups.length; i++) {
2080
- const cleanup = cleanups[i];
2081
- if (typeof cleanup == "function") {
2082
- cleanup();
2083
- } else {
2084
- setRef(refs[i], null);
2085
- }
2086
- }
2087
- };
2088
- }
2089
- };
2090
- }
2091
- function useComposedRefs(...refs) {
2092
- return React3.useCallback(composeRefs(...refs), refs);
2093
- }
2094
-
2095
- // node_modules/@radix-ui/react-slot/dist/index.mjs
2096
- import { Fragment as Fragment22, jsx as jsx11 } from "react/jsx-runtime";
2097
- // @__NO_SIDE_EFFECTS__
2098
- function createSlot(ownerName) {
2099
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
2100
- const Slot2 = React4.forwardRef((props, forwardedRef) => {
2101
- const { children, ...slotProps } = props;
2102
- const childrenArray = React4.Children.toArray(children);
2103
- const slottable = childrenArray.find(isSlottable);
2104
- if (slottable) {
2105
- const newElement = slottable.props.children;
2106
- const newChildren = childrenArray.map((child) => {
2107
- if (child === slottable) {
2108
- if (React4.Children.count(newElement) > 1) return React4.Children.only(null);
2109
- return React4.isValidElement(newElement) ? newElement.props.children : null;
2110
- } else {
2111
- return child;
2112
- }
2113
- });
2114
- return /* @__PURE__ */ jsx11(SlotClone, { ...slotProps, ref: forwardedRef, children: React4.isValidElement(newElement) ? React4.cloneElement(newElement, void 0, newChildren) : null });
2115
- }
2116
- return /* @__PURE__ */ jsx11(SlotClone, { ...slotProps, ref: forwardedRef, children });
2117
- });
2118
- Slot2.displayName = `${ownerName}.Slot`;
2119
- return Slot2;
2120
- }
2121
- // @__NO_SIDE_EFFECTS__
2122
- function createSlotClone(ownerName) {
2123
- const SlotClone = React4.forwardRef((props, forwardedRef) => {
2124
- const { children, ...slotProps } = props;
2125
- if (React4.isValidElement(children)) {
2126
- const childrenRef = getElementRef(children);
2127
- const props2 = mergeProps(slotProps, children.props);
2128
- if (children.type !== React4.Fragment) {
2129
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
2130
- }
2131
- return React4.cloneElement(children, props2);
2132
- }
2133
- return React4.Children.count(children) > 1 ? React4.Children.only(null) : null;
2134
- });
2135
- SlotClone.displayName = `${ownerName}.SlotClone`;
2136
- return SlotClone;
2137
- }
2138
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
2139
- function isSlottable(child) {
2140
- return React4.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
2141
- }
2142
- function mergeProps(slotProps, childProps) {
2143
- const overrideProps = { ...childProps };
2144
- for (const propName in childProps) {
2145
- const slotPropValue = slotProps[propName];
2146
- const childPropValue = childProps[propName];
2147
- const isHandler = /^on[A-Z]/.test(propName);
2148
- if (isHandler) {
2149
- if (slotPropValue && childPropValue) {
2150
- overrideProps[propName] = (...args) => {
2151
- const result = childPropValue(...args);
2152
- slotPropValue(...args);
2153
- return result;
2154
- };
2155
- } else if (slotPropValue) {
2156
- overrideProps[propName] = slotPropValue;
2157
- }
2158
- } else if (propName === "style") {
2159
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
2160
- } else if (propName === "className") {
2161
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
2162
- }
2163
- }
2164
- return { ...slotProps, ...overrideProps };
2165
- }
2166
- function getElementRef(element) {
2167
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
2168
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2169
- if (mayWarn) {
2170
- return element.ref;
2171
- }
2172
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
2173
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2174
- if (mayWarn) {
2175
- return element.props.ref;
2176
- }
2177
- return element.props.ref || element.ref;
2178
- }
2179
-
2180
- // node_modules/@radix-ui/react-primitive/dist/index.mjs
2181
- import { jsx as jsx12 } from "react/jsx-runtime";
2182
- var NODES = [
2183
- "a",
2184
- "button",
2185
- "div",
2186
- "form",
2187
- "h2",
2188
- "h3",
2189
- "img",
2190
- "input",
2191
- "label",
2192
- "li",
2193
- "nav",
2194
- "ol",
2195
- "p",
2196
- "select",
2197
- "span",
2198
- "svg",
2199
- "ul"
2200
- ];
2201
- var Primitive = NODES.reduce((primitive, node) => {
2202
- const Slot = createSlot(`Primitive.${node}`);
2203
- const Node2 = React5.forwardRef((props, forwardedRef) => {
2204
- const { asChild, ...primitiveProps } = props;
2205
- const Comp = asChild ? Slot : node;
2206
- if (typeof window !== "undefined") {
2207
- window[Symbol.for("radix-ui")] = true;
2208
- }
2209
- return /* @__PURE__ */ jsx12(Comp, { ...primitiveProps, ref: forwardedRef });
2210
- });
2211
- Node2.displayName = `Primitive.${node}`;
2212
- return { ...primitive, [node]: Node2 };
2213
- }, {});
2214
-
2215
- // node_modules/@radix-ui/react-presence/dist/index.mjs
2216
- import * as React22 from "react";
2217
-
2218
- // node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
2219
- import * as React6 from "react";
2220
- var useLayoutEffect22 = globalThis?.document ? React6.useLayoutEffect : () => {
2221
- };
2222
-
2223
- // node_modules/@radix-ui/react-presence/dist/index.mjs
2224
- import * as React7 from "react";
2225
- function useStateMachine(initialState, machine) {
2226
- return React7.useReducer((state, event) => {
2227
- const nextState = machine[state][event];
2228
- return nextState ?? state;
2229
- }, initialState);
2230
- }
2231
- var Presence = (props) => {
2232
- const { present, children } = props;
2233
- const presence = usePresence(present);
2234
- const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
2235
- const ref = useComposedRefs(presence.ref, getElementRef2(child));
2236
- const forceMount = typeof children === "function";
2237
- return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
2238
- };
2239
- Presence.displayName = "Presence";
2240
- function usePresence(present) {
2241
- const [node, setNode] = React22.useState();
2242
- const stylesRef = React22.useRef(null);
2243
- const prevPresentRef = React22.useRef(present);
2244
- const prevAnimationNameRef = React22.useRef("none");
2245
- const initialState = present ? "mounted" : "unmounted";
2246
- const [state, send] = useStateMachine(initialState, {
2247
- mounted: {
2248
- UNMOUNT: "unmounted",
2249
- ANIMATION_OUT: "unmountSuspended"
2250
- },
2251
- unmountSuspended: {
2252
- MOUNT: "mounted",
2253
- ANIMATION_END: "unmounted"
2254
- },
2255
- unmounted: {
2256
- MOUNT: "mounted"
2257
- }
2258
- });
2259
- React22.useEffect(() => {
2260
- const currentAnimationName = getAnimationName(stylesRef.current);
2261
- prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
2262
- }, [state]);
2263
- useLayoutEffect22(() => {
2264
- const styles = stylesRef.current;
2265
- const wasPresent = prevPresentRef.current;
2266
- const hasPresentChanged = wasPresent !== present;
2267
- if (hasPresentChanged) {
2268
- const prevAnimationName = prevAnimationNameRef.current;
2269
- const currentAnimationName = getAnimationName(styles);
2270
- if (present) {
2271
- send("MOUNT");
2272
- } else if (currentAnimationName === "none" || styles?.display === "none") {
2273
- send("UNMOUNT");
2274
- } else {
2275
- const isAnimating = prevAnimationName !== currentAnimationName;
2276
- if (wasPresent && isAnimating) {
2277
- send("ANIMATION_OUT");
2278
- } else {
2279
- send("UNMOUNT");
2280
- }
2281
- }
2282
- prevPresentRef.current = present;
2283
- }
2284
- }, [present, send]);
2285
- useLayoutEffect22(() => {
2286
- if (node) {
2287
- let timeoutId;
2288
- const ownerWindow = node.ownerDocument.defaultView ?? window;
2289
- const handleAnimationEnd = (event) => {
2290
- const currentAnimationName = getAnimationName(stylesRef.current);
2291
- const isCurrentAnimation = currentAnimationName.includes(event.animationName);
2292
- if (event.target === node && isCurrentAnimation) {
2293
- send("ANIMATION_END");
2294
- if (!prevPresentRef.current) {
2295
- const currentFillMode = node.style.animationFillMode;
2296
- node.style.animationFillMode = "forwards";
2297
- timeoutId = ownerWindow.setTimeout(() => {
2298
- if (node.style.animationFillMode === "forwards") {
2299
- node.style.animationFillMode = currentFillMode;
2300
- }
2301
- });
2302
- }
2303
- }
2304
- };
2305
- const handleAnimationStart = (event) => {
2306
- if (event.target === node) {
2307
- prevAnimationNameRef.current = getAnimationName(stylesRef.current);
2308
- }
2309
- };
2310
- node.addEventListener("animationstart", handleAnimationStart);
2311
- node.addEventListener("animationcancel", handleAnimationEnd);
2312
- node.addEventListener("animationend", handleAnimationEnd);
2313
- return () => {
2314
- ownerWindow.clearTimeout(timeoutId);
2315
- node.removeEventListener("animationstart", handleAnimationStart);
2316
- node.removeEventListener("animationcancel", handleAnimationEnd);
2317
- node.removeEventListener("animationend", handleAnimationEnd);
2318
- };
2319
- } else {
2320
- send("ANIMATION_END");
2321
- }
2322
- }, [node, send]);
2323
- return {
2324
- isPresent: ["mounted", "unmountSuspended"].includes(state),
2325
- ref: React22.useCallback((node2) => {
2326
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
2327
- setNode(node2);
2328
- }, [])
2329
- };
2330
- }
2331
- function getAnimationName(styles) {
2332
- return styles?.animationName || "none";
2333
- }
2334
- function getElementRef2(element) {
2335
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
2336
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2337
- if (mayWarn) {
2338
- return element.ref;
2339
- }
2340
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
2341
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2342
- if (mayWarn) {
2343
- return element.props.ref;
2344
- }
2345
- return element.props.ref || element.ref;
2346
- }
2347
-
2348
- // node_modules/@radix-ui/react-context/dist/index.mjs
2349
- import * as React8 from "react";
2350
- import { jsx as jsx13 } from "react/jsx-runtime";
2351
- function createContextScope(scopeName, createContextScopeDeps = []) {
2352
- let defaultContexts = [];
2353
- function createContext32(rootComponentName, defaultContext) {
2354
- const BaseContext = React8.createContext(defaultContext);
2355
- const index = defaultContexts.length;
2356
- defaultContexts = [...defaultContexts, defaultContext];
2357
- const Provider = (props) => {
2358
- const { scope, children, ...context } = props;
2359
- const Context = scope?.[scopeName]?.[index] || BaseContext;
2360
- const value = React8.useMemo(() => context, Object.values(context));
2361
- return /* @__PURE__ */ jsx13(Context.Provider, { value, children });
2362
- };
2363
- Provider.displayName = rootComponentName + "Provider";
2364
- function useContext22(consumerName, scope) {
2365
- const Context = scope?.[scopeName]?.[index] || BaseContext;
2366
- const context = React8.useContext(Context);
2367
- if (context) return context;
2368
- if (defaultContext !== void 0) return defaultContext;
2369
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
2370
- }
2371
- return [Provider, useContext22];
2372
- }
2373
- const createScope = () => {
2374
- const scopeContexts = defaultContexts.map((defaultContext) => {
2375
- return React8.createContext(defaultContext);
2376
- });
2377
- return function useScope(scope) {
2378
- const contexts = scope?.[scopeName] || scopeContexts;
2379
- return React8.useMemo(
2380
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
2381
- [scope, contexts]
2382
- );
2383
- };
2384
- };
2385
- createScope.scopeName = scopeName;
2386
- return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
2387
- }
2388
- function composeContextScopes(...scopes) {
2389
- const baseScope = scopes[0];
2390
- if (scopes.length === 1) return baseScope;
2391
- const createScope = () => {
2392
- const scopeHooks = scopes.map((createScope2) => ({
2393
- useScope: createScope2(),
2394
- scopeName: createScope2.scopeName
2395
- }));
2396
- return function useComposedScopes(overrideScopes) {
2397
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
2398
- const scopeProps = useScope(overrideScopes);
2399
- const currentScope = scopeProps[`__scope${scopeName}`];
2400
- return { ...nextScopes2, ...currentScope };
2401
- }, {});
2402
- return React8.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
2403
- };
2404
- };
2405
- createScope.scopeName = baseScope.scopeName;
2406
- return createScope;
2407
- }
2408
-
2409
- // node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
2410
- import * as React9 from "react";
2411
- function useCallbackRef(callback) {
2412
- const callbackRef = React9.useRef(callback);
2413
- React9.useEffect(() => {
2414
- callbackRef.current = callback;
2415
- });
2416
- return React9.useMemo(() => (...args) => callbackRef.current?.(...args), []);
2417
- }
2418
-
2419
- // node_modules/@radix-ui/react-direction/dist/index.mjs
2420
- import * as React10 from "react";
2421
- import { jsx as jsx14 } from "react/jsx-runtime";
2422
- var DirectionContext = React10.createContext(void 0);
2423
- function useDirection(localDir) {
2424
- const globalDir = React10.useContext(DirectionContext);
2425
- return localDir || globalDir || "ltr";
2426
- }
2427
-
2428
- // node_modules/@radix-ui/number/dist/index.mjs
2429
- function clamp2(value, [min, max]) {
2430
- return Math.min(max, Math.max(min, value));
2431
- }
2432
-
2433
- // node_modules/@radix-ui/primitive/dist/index.mjs
2434
- function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
2435
- return function handleEvent(event) {
2436
- originalEventHandler?.(event);
2437
- if (checkForDefaultPrevented === false || !event.defaultPrevented) {
2438
- return ourEventHandler?.(event);
2439
- }
2440
- };
2441
- }
2442
-
2443
- // node_modules/@radix-ui/react-scroll-area/dist/index.mjs
2444
- import * as React11 from "react";
2445
- import { Fragment as Fragment5, jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
2446
- function useStateMachine2(initialState, machine) {
2447
- return React11.useReducer((state, event) => {
2448
- const nextState = machine[state][event];
2449
- return nextState ?? state;
2450
- }, initialState);
2451
- }
2452
- var SCROLL_AREA_NAME = "ScrollArea";
2453
- var [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);
2454
- var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
2455
- var ScrollArea = React23.forwardRef(
2456
- (props, forwardedRef) => {
2457
- const {
2458
- __scopeScrollArea,
2459
- type = "hover",
2460
- dir,
2461
- scrollHideDelay = 600,
2462
- ...scrollAreaProps
2463
- } = props;
2464
- const [scrollArea, setScrollArea] = React23.useState(null);
2465
- const [viewport, setViewport] = React23.useState(null);
2466
- const [content, setContent] = React23.useState(null);
2467
- const [scrollbarX, setScrollbarX] = React23.useState(null);
2468
- const [scrollbarY, setScrollbarY] = React23.useState(null);
2469
- const [cornerWidth, setCornerWidth] = React23.useState(0);
2470
- const [cornerHeight, setCornerHeight] = React23.useState(0);
2471
- const [scrollbarXEnabled, setScrollbarXEnabled] = React23.useState(false);
2472
- const [scrollbarYEnabled, setScrollbarYEnabled] = React23.useState(false);
2473
- const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));
2474
- const direction = useDirection(dir);
2475
- return /* @__PURE__ */ jsx15(
2476
- ScrollAreaProvider,
2477
- {
2478
- scope: __scopeScrollArea,
2479
- type,
2480
- dir: direction,
2481
- scrollHideDelay,
2482
- scrollArea,
2483
- viewport,
2484
- onViewportChange: setViewport,
2485
- content,
2486
- onContentChange: setContent,
2487
- scrollbarX,
2488
- onScrollbarXChange: setScrollbarX,
2489
- scrollbarXEnabled,
2490
- onScrollbarXEnabledChange: setScrollbarXEnabled,
2491
- scrollbarY,
2492
- onScrollbarYChange: setScrollbarY,
2493
- scrollbarYEnabled,
2494
- onScrollbarYEnabledChange: setScrollbarYEnabled,
2495
- onCornerWidthChange: setCornerWidth,
2496
- onCornerHeightChange: setCornerHeight,
2497
- children: /* @__PURE__ */ jsx15(
2498
- Primitive.div,
2499
- {
2500
- dir: direction,
2501
- ...scrollAreaProps,
2502
- ref: composedRefs,
2503
- style: {
2504
- position: "relative",
2505
- // Pass corner sizes as CSS vars to reduce re-renders of context consumers
2506
- ["--radix-scroll-area-corner-width"]: cornerWidth + "px",
2507
- ["--radix-scroll-area-corner-height"]: cornerHeight + "px",
2508
- ...props.style
2509
- }
2510
- }
2511
- )
2512
- }
2513
- );
2514
- }
2515
- );
2516
- ScrollArea.displayName = SCROLL_AREA_NAME;
2517
- var VIEWPORT_NAME = "ScrollAreaViewport";
2518
- var ScrollAreaViewport = React23.forwardRef(
2519
- (props, forwardedRef) => {
2520
- const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
2521
- const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
2522
- const ref = React23.useRef(null);
2523
- const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
2524
- return /* @__PURE__ */ jsxs6(Fragment5, { children: [
2525
- /* @__PURE__ */ jsx15(
2526
- "style",
2527
- {
2528
- dangerouslySetInnerHTML: {
2529
- __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`
2530
- },
2531
- nonce
2532
- }
2533
- ),
2534
- /* @__PURE__ */ jsx15(
2535
- Primitive.div,
2536
- {
2537
- "data-radix-scroll-area-viewport": "",
2538
- ...viewportProps,
2539
- ref: composedRefs,
2540
- style: {
2541
- /**
2542
- * We don't support `visible` because the intention is to have at least one scrollbar
2543
- * if this component is used and `visible` will behave like `auto` in that case
2544
- * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
2545
- *
2546
- * We don't handle `auto` because the intention is for the native implementation
2547
- * to be hidden if using this component. We just want to ensure the node is scrollable
2548
- * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
2549
- * the browser from having to work out whether to render native scrollbars or not,
2550
- * we tell it to with the intention of hiding them in CSS.
2551
- */
2552
- overflowX: context.scrollbarXEnabled ? "scroll" : "hidden",
2553
- overflowY: context.scrollbarYEnabled ? "scroll" : "hidden",
2554
- ...props.style
2555
- },
2556
- children: /* @__PURE__ */ jsx15("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children })
2557
- }
2558
- )
2559
- ] });
2560
- }
2561
- );
2562
- ScrollAreaViewport.displayName = VIEWPORT_NAME;
2563
- var SCROLLBAR_NAME = "ScrollAreaScrollbar";
2564
- var ScrollAreaScrollbar = React23.forwardRef(
2565
- (props, forwardedRef) => {
2566
- const { forceMount, ...scrollbarProps } = props;
2567
- const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
2568
- const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;
2569
- const isHorizontal = props.orientation === "horizontal";
2570
- React23.useEffect(() => {
2571
- isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);
2572
- return () => {
2573
- isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);
2574
- };
2575
- }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);
2576
- return context.type === "hover" ? /* @__PURE__ */ jsx15(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? /* @__PURE__ */ jsx15(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? /* @__PURE__ */ jsx15(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? /* @__PURE__ */ jsx15(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;
2577
- }
2578
- );
2579
- ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
2580
- var ScrollAreaScrollbarHover = React23.forwardRef((props, forwardedRef) => {
2581
- const { forceMount, ...scrollbarProps } = props;
2582
- const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
2583
- const [visible, setVisible] = React23.useState(false);
2584
- React23.useEffect(() => {
2585
- const scrollArea = context.scrollArea;
2586
- let hideTimer = 0;
2587
- if (scrollArea) {
2588
- const handlePointerEnter = () => {
2589
- window.clearTimeout(hideTimer);
2590
- setVisible(true);
2591
- };
2592
- const handlePointerLeave = () => {
2593
- hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);
2594
- };
2595
- scrollArea.addEventListener("pointerenter", handlePointerEnter);
2596
- scrollArea.addEventListener("pointerleave", handlePointerLeave);
2597
- return () => {
2598
- window.clearTimeout(hideTimer);
2599
- scrollArea.removeEventListener("pointerenter", handlePointerEnter);
2600
- scrollArea.removeEventListener("pointerleave", handlePointerLeave);
2601
- };
2602
- }
2603
- }, [context.scrollArea, context.scrollHideDelay]);
2604
- return /* @__PURE__ */ jsx15(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx15(
2605
- ScrollAreaScrollbarAuto,
2606
- {
2607
- "data-state": visible ? "visible" : "hidden",
2608
- ...scrollbarProps,
2609
- ref: forwardedRef
2610
- }
2611
- ) });
2612
- });
2613
- var ScrollAreaScrollbarScroll = React23.forwardRef((props, forwardedRef) => {
2614
- const { forceMount, ...scrollbarProps } = props;
2615
- const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
2616
- const isHorizontal = props.orientation === "horizontal";
2617
- const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100);
2618
- const [state, send] = useStateMachine2("hidden", {
2619
- hidden: {
2620
- SCROLL: "scrolling"
2621
- },
2622
- scrolling: {
2623
- SCROLL_END: "idle",
2624
- POINTER_ENTER: "interacting"
2625
- },
2626
- interacting: {
2627
- SCROLL: "interacting",
2628
- POINTER_LEAVE: "idle"
2629
- },
2630
- idle: {
2631
- HIDE: "hidden",
2632
- SCROLL: "scrolling",
2633
- POINTER_ENTER: "interacting"
2634
- }
2635
- });
2636
- React23.useEffect(() => {
2637
- if (state === "idle") {
2638
- const hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay);
2639
- return () => window.clearTimeout(hideTimer);
2640
- }
2641
- }, [state, context.scrollHideDelay, send]);
2642
- React23.useEffect(() => {
2643
- const viewport = context.viewport;
2644
- const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop";
2645
- if (viewport) {
2646
- let prevScrollPos = viewport[scrollDirection];
2647
- const handleScroll = () => {
2648
- const scrollPos = viewport[scrollDirection];
2649
- const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;
2650
- if (hasScrollInDirectionChanged) {
2651
- send("SCROLL");
2652
- debounceScrollEnd();
2653
- }
2654
- prevScrollPos = scrollPos;
2655
- };
2656
- viewport.addEventListener("scroll", handleScroll);
2657
- return () => viewport.removeEventListener("scroll", handleScroll);
2658
- }
2659
- }, [context.viewport, isHorizontal, send, debounceScrollEnd]);
2660
- return /* @__PURE__ */ jsx15(Presence, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsx15(
2661
- ScrollAreaScrollbarVisible,
2662
- {
2663
- "data-state": state === "hidden" ? "hidden" : "visible",
2664
- ...scrollbarProps,
2665
- ref: forwardedRef,
2666
- onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")),
2667
- onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE"))
2668
- }
2669
- ) });
2670
- });
2671
- var ScrollAreaScrollbarAuto = React23.forwardRef((props, forwardedRef) => {
2672
- const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
2673
- const { forceMount, ...scrollbarProps } = props;
2674
- const [visible, setVisible] = React23.useState(false);
2675
- const isHorizontal = props.orientation === "horizontal";
2676
- const handleResize = useDebounceCallback(() => {
2677
- if (context.viewport) {
2678
- const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;
2679
- const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;
2680
- setVisible(isHorizontal ? isOverflowX : isOverflowY);
2681
- }
2682
- }, 10);
2683
- useResizeObserver(context.viewport, handleResize);
2684
- useResizeObserver(context.content, handleResize);
2685
- return /* @__PURE__ */ jsx15(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx15(
2686
- ScrollAreaScrollbarVisible,
2687
- {
2688
- "data-state": visible ? "visible" : "hidden",
2689
- ...scrollbarProps,
2690
- ref: forwardedRef
2691
- }
2692
- ) });
2693
- });
2694
- var ScrollAreaScrollbarVisible = React23.forwardRef((props, forwardedRef) => {
2695
- const { orientation = "vertical", ...scrollbarProps } = props;
2696
- const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
2697
- const thumbRef = React23.useRef(null);
2698
- const pointerOffsetRef = React23.useRef(0);
2699
- const [sizes, setSizes] = React23.useState({
2700
- content: 0,
2701
- viewport: 0,
2702
- scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
2703
- });
2704
- const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);
2705
- const commonProps = {
2706
- ...scrollbarProps,
2707
- sizes,
2708
- onSizesChange: setSizes,
2709
- hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),
2710
- onThumbChange: (thumb) => thumbRef.current = thumb,
2711
- onThumbPointerUp: () => pointerOffsetRef.current = 0,
2712
- onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos
2713
- };
2714
- function getScrollPosition(pointerPos, dir) {
2715
- return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);
2716
- }
2717
- if (orientation === "horizontal") {
2718
- return /* @__PURE__ */ jsx15(
2719
- ScrollAreaScrollbarX,
2720
- {
2721
- ...commonProps,
2722
- ref: forwardedRef,
2723
- onThumbPositionChange: () => {
2724
- if (context.viewport && thumbRef.current) {
2725
- const scrollPos = context.viewport.scrollLeft;
2726
- const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);
2727
- thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;
2728
- }
2729
- },
2730
- onWheelScroll: (scrollPos) => {
2731
- if (context.viewport) context.viewport.scrollLeft = scrollPos;
2732
- },
2733
- onDragScroll: (pointerPos) => {
2734
- if (context.viewport) {
2735
- context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);
2736
- }
2737
- }
2738
- }
2739
- );
2740
- }
2741
- if (orientation === "vertical") {
2742
- return /* @__PURE__ */ jsx15(
2743
- ScrollAreaScrollbarY,
2744
- {
2745
- ...commonProps,
2746
- ref: forwardedRef,
2747
- onThumbPositionChange: () => {
2748
- if (context.viewport && thumbRef.current) {
2749
- const scrollPos = context.viewport.scrollTop;
2750
- const offset = getThumbOffsetFromScroll(scrollPos, sizes);
2751
- thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;
2752
- }
2753
- },
2754
- onWheelScroll: (scrollPos) => {
2755
- if (context.viewport) context.viewport.scrollTop = scrollPos;
2756
- },
2757
- onDragScroll: (pointerPos) => {
2758
- if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);
2759
- }
2760
- }
2761
- );
2762
- }
2763
- return null;
2764
- });
2765
- var ScrollAreaScrollbarX = React23.forwardRef((props, forwardedRef) => {
2766
- const { sizes, onSizesChange, ...scrollbarProps } = props;
2767
- const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
2768
- const [computedStyle, setComputedStyle] = React23.useState();
2769
- const ref = React23.useRef(null);
2770
- const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
2771
- React23.useEffect(() => {
2772
- if (ref.current) setComputedStyle(getComputedStyle(ref.current));
2773
- }, [ref]);
2774
- return /* @__PURE__ */ jsx15(
2775
- ScrollAreaScrollbarImpl,
2776
- {
2777
- "data-orientation": "horizontal",
2778
- ...scrollbarProps,
2779
- ref: composeRefs2,
2780
- sizes,
2781
- style: {
2782
- bottom: 0,
2783
- left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
2784
- right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
2785
- ["--radix-scroll-area-thumb-width"]: getThumbSize(sizes) + "px",
2786
- ...props.style
2787
- },
2788
- onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),
2789
- onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),
2790
- onWheelScroll: (event, maxScrollPos) => {
2791
- if (context.viewport) {
2792
- const scrollPos = context.viewport.scrollLeft + event.deltaX;
2793
- props.onWheelScroll(scrollPos);
2794
- if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
2795
- event.preventDefault();
2796
- }
2797
- }
2798
- },
2799
- onResize: () => {
2800
- if (ref.current && context.viewport && computedStyle) {
2801
- onSizesChange({
2802
- content: context.viewport.scrollWidth,
2803
- viewport: context.viewport.offsetWidth,
2804
- scrollbar: {
2805
- size: ref.current.clientWidth,
2806
- paddingStart: toInt(computedStyle.paddingLeft),
2807
- paddingEnd: toInt(computedStyle.paddingRight)
2808
- }
2809
- });
2810
- }
2811
- }
2812
- }
2813
- );
2814
- });
2815
- var ScrollAreaScrollbarY = React23.forwardRef((props, forwardedRef) => {
2816
- const { sizes, onSizesChange, ...scrollbarProps } = props;
2817
- const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
2818
- const [computedStyle, setComputedStyle] = React23.useState();
2819
- const ref = React23.useRef(null);
2820
- const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
2821
- React23.useEffect(() => {
2822
- if (ref.current) setComputedStyle(getComputedStyle(ref.current));
2823
- }, [ref]);
2824
- return /* @__PURE__ */ jsx15(
2825
- ScrollAreaScrollbarImpl,
2826
- {
2827
- "data-orientation": "vertical",
2828
- ...scrollbarProps,
2829
- ref: composeRefs2,
2830
- sizes,
2831
- style: {
2832
- top: 0,
2833
- right: context.dir === "ltr" ? 0 : void 0,
2834
- left: context.dir === "rtl" ? 0 : void 0,
2835
- bottom: "var(--radix-scroll-area-corner-height)",
2836
- ["--radix-scroll-area-thumb-height"]: getThumbSize(sizes) + "px",
2837
- ...props.style
2838
- },
2839
- onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),
2840
- onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),
2841
- onWheelScroll: (event, maxScrollPos) => {
2842
- if (context.viewport) {
2843
- const scrollPos = context.viewport.scrollTop + event.deltaY;
2844
- props.onWheelScroll(scrollPos);
2845
- if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
2846
- event.preventDefault();
2847
- }
2848
- }
2849
- },
2850
- onResize: () => {
2851
- if (ref.current && context.viewport && computedStyle) {
2852
- onSizesChange({
2853
- content: context.viewport.scrollHeight,
2854
- viewport: context.viewport.offsetHeight,
2855
- scrollbar: {
2856
- size: ref.current.clientHeight,
2857
- paddingStart: toInt(computedStyle.paddingTop),
2858
- paddingEnd: toInt(computedStyle.paddingBottom)
2859
- }
2860
- });
2861
- }
2862
- }
2863
- }
2864
- );
2865
- });
2866
- var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);
2867
- var ScrollAreaScrollbarImpl = React23.forwardRef((props, forwardedRef) => {
2868
- const {
2869
- __scopeScrollArea,
2870
- sizes,
2871
- hasThumb,
2872
- onThumbChange,
2873
- onThumbPointerUp,
2874
- onThumbPointerDown,
2875
- onThumbPositionChange,
2876
- onDragScroll,
2877
- onWheelScroll,
2878
- onResize,
2879
- ...scrollbarProps
2880
- } = props;
2881
- const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
2882
- const [scrollbar, setScrollbar] = React23.useState(null);
2883
- const composeRefs2 = useComposedRefs(forwardedRef, (node) => setScrollbar(node));
2884
- const rectRef = React23.useRef(null);
2885
- const prevWebkitUserSelectRef = React23.useRef("");
2886
- const viewport = context.viewport;
2887
- const maxScrollPos = sizes.content - sizes.viewport;
2888
- const handleWheelScroll = useCallbackRef(onWheelScroll);
2889
- const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);
2890
- const handleResize = useDebounceCallback(onResize, 10);
2891
- function handleDragScroll(event) {
2892
- if (rectRef.current) {
2893
- const x = event.clientX - rectRef.current.left;
2894
- const y = event.clientY - rectRef.current.top;
2895
- onDragScroll({ x, y });
2896
- }
2897
- }
2898
- React23.useEffect(() => {
2899
- const handleWheel = (event) => {
2900
- const element = event.target;
2901
- const isScrollbarWheel = scrollbar?.contains(element);
2902
- if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);
2903
- };
2904
- document.addEventListener("wheel", handleWheel, { passive: false });
2905
- return () => document.removeEventListener("wheel", handleWheel, { passive: false });
2906
- }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);
2907
- React23.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);
2908
- useResizeObserver(scrollbar, handleResize);
2909
- useResizeObserver(context.content, handleResize);
2910
- return /* @__PURE__ */ jsx15(
2911
- ScrollbarProvider,
2912
- {
2913
- scope: __scopeScrollArea,
2914
- scrollbar,
2915
- hasThumb,
2916
- onThumbChange: useCallbackRef(onThumbChange),
2917
- onThumbPointerUp: useCallbackRef(onThumbPointerUp),
2918
- onThumbPositionChange: handleThumbPositionChange,
2919
- onThumbPointerDown: useCallbackRef(onThumbPointerDown),
2920
- children: /* @__PURE__ */ jsx15(
2921
- Primitive.div,
2922
- {
2923
- ...scrollbarProps,
2924
- ref: composeRefs2,
2925
- style: { position: "absolute", ...scrollbarProps.style },
2926
- onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
2927
- const mainPointer = 0;
2928
- if (event.button === mainPointer) {
2929
- const element = event.target;
2930
- element.setPointerCapture(event.pointerId);
2931
- rectRef.current = scrollbar.getBoundingClientRect();
2932
- prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;
2933
- document.body.style.webkitUserSelect = "none";
2934
- if (context.viewport) context.viewport.style.scrollBehavior = "auto";
2935
- handleDragScroll(event);
2936
- }
2937
- }),
2938
- onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),
2939
- onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
2940
- const element = event.target;
2941
- if (element.hasPointerCapture(event.pointerId)) {
2942
- element.releasePointerCapture(event.pointerId);
2943
- }
2944
- document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
2945
- if (context.viewport) context.viewport.style.scrollBehavior = "";
2946
- rectRef.current = null;
2947
- })
2948
- }
2949
- )
2950
- }
2951
- );
2952
- });
2953
- var THUMB_NAME = "ScrollAreaThumb";
2954
- var ScrollAreaThumb = React23.forwardRef(
2955
- (props, forwardedRef) => {
2956
- const { forceMount, ...thumbProps } = props;
2957
- const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
2958
- return /* @__PURE__ */ jsx15(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx15(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
2959
- }
2960
- );
2961
- var ScrollAreaThumbImpl = React23.forwardRef(
2962
- (props, forwardedRef) => {
2963
- const { __scopeScrollArea, style, ...thumbProps } = props;
2964
- const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
2965
- const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
2966
- const { onThumbPositionChange } = scrollbarContext;
2967
- const composedRef = useComposedRefs(
2968
- forwardedRef,
2969
- (node) => scrollbarContext.onThumbChange(node)
2970
- );
2971
- const removeUnlinkedScrollListenerRef = React23.useRef(void 0);
2972
- const debounceScrollEnd = useDebounceCallback(() => {
2973
- if (removeUnlinkedScrollListenerRef.current) {
2974
- removeUnlinkedScrollListenerRef.current();
2975
- removeUnlinkedScrollListenerRef.current = void 0;
2976
- }
2977
- }, 100);
2978
- React23.useEffect(() => {
2979
- const viewport = scrollAreaContext.viewport;
2980
- if (viewport) {
2981
- const handleScroll = () => {
2982
- debounceScrollEnd();
2983
- if (!removeUnlinkedScrollListenerRef.current) {
2984
- const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);
2985
- removeUnlinkedScrollListenerRef.current = listener;
2986
- onThumbPositionChange();
2987
- }
2988
- };
2989
- onThumbPositionChange();
2990
- viewport.addEventListener("scroll", handleScroll);
2991
- return () => viewport.removeEventListener("scroll", handleScroll);
2992
- }
2993
- }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
2994
- return /* @__PURE__ */ jsx15(
2995
- Primitive.div,
2996
- {
2997
- "data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
2998
- ...thumbProps,
2999
- ref: composedRef,
3000
- style: {
3001
- width: "var(--radix-scroll-area-thumb-width)",
3002
- height: "var(--radix-scroll-area-thumb-height)",
3003
- ...style
3004
- },
3005
- onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {
3006
- const thumb = event.target;
3007
- const thumbRect = thumb.getBoundingClientRect();
3008
- const x = event.clientX - thumbRect.left;
3009
- const y = event.clientY - thumbRect.top;
3010
- scrollbarContext.onThumbPointerDown({ x, y });
3011
- }),
3012
- onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
3013
- }
3014
- );
3015
- }
3016
- );
3017
- ScrollAreaThumb.displayName = THUMB_NAME;
3018
- var CORNER_NAME = "ScrollAreaCorner";
3019
- var ScrollAreaCorner = React23.forwardRef(
3020
- (props, forwardedRef) => {
3021
- const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);
3022
- const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
3023
- const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
3024
- return hasCorner ? /* @__PURE__ */ jsx15(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;
3025
- }
3026
- );
3027
- ScrollAreaCorner.displayName = CORNER_NAME;
3028
- var ScrollAreaCornerImpl = React23.forwardRef((props, forwardedRef) => {
3029
- const { __scopeScrollArea, ...cornerProps } = props;
3030
- const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);
3031
- const [width, setWidth] = React23.useState(0);
3032
- const [height, setHeight] = React23.useState(0);
3033
- const hasSize = Boolean(width && height);
3034
- useResizeObserver(context.scrollbarX, () => {
3035
- const height2 = context.scrollbarX?.offsetHeight || 0;
3036
- context.onCornerHeightChange(height2);
3037
- setHeight(height2);
3038
- });
3039
- useResizeObserver(context.scrollbarY, () => {
3040
- const width2 = context.scrollbarY?.offsetWidth || 0;
3041
- context.onCornerWidthChange(width2);
3042
- setWidth(width2);
3043
- });
3044
- return hasSize ? /* @__PURE__ */ jsx15(
3045
- Primitive.div,
3046
- {
3047
- ...cornerProps,
3048
- ref: forwardedRef,
3049
- style: {
3050
- width,
3051
- height,
3052
- position: "absolute",
3053
- right: context.dir === "ltr" ? 0 : void 0,
3054
- left: context.dir === "rtl" ? 0 : void 0,
3055
- bottom: 0,
3056
- ...props.style
3057
- }
3058
- }
3059
- ) : null;
3060
- });
3061
- function toInt(value) {
3062
- return value ? parseInt(value, 10) : 0;
3063
- }
3064
- function getThumbRatio(viewportSize, contentSize) {
3065
- const ratio = viewportSize / contentSize;
3066
- return isNaN(ratio) ? 0 : ratio;
3067
- }
3068
- function getThumbSize(sizes) {
3069
- const ratio = getThumbRatio(sizes.viewport, sizes.content);
3070
- const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
3071
- const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;
3072
- return Math.max(thumbSize, 18);
3073
- }
3074
- function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") {
3075
- const thumbSizePx = getThumbSize(sizes);
3076
- const thumbCenter = thumbSizePx / 2;
3077
- const offset = pointerOffset || thumbCenter;
3078
- const thumbOffsetFromEnd = thumbSizePx - offset;
3079
- const minPointerPos = sizes.scrollbar.paddingStart + offset;
3080
- const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;
3081
- const maxScrollPos = sizes.content - sizes.viewport;
3082
- const scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
3083
- const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);
3084
- return interpolate(pointerPos);
3085
- }
3086
- function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
3087
- const thumbSizePx = getThumbSize(sizes);
3088
- const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
3089
- const scrollbar = sizes.scrollbar.size - scrollbarPadding;
3090
- const maxScrollPos = sizes.content - sizes.viewport;
3091
- const maxThumbPos = scrollbar - thumbSizePx;
3092
- const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
3093
- const scrollWithoutMomentum = clamp2(scrollPos, scrollClampRange);
3094
- const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);
3095
- return interpolate(scrollWithoutMomentum);
3096
- }
3097
- function linearScale(input, output) {
3098
- return (value) => {
3099
- if (input[0] === input[1] || output[0] === output[1]) return output[0];
3100
- const ratio = (output[1] - output[0]) / (input[1] - input[0]);
3101
- return output[0] + ratio * (value - input[0]);
3102
- };
3103
- }
3104
- function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {
3105
- return scrollPos > 0 && scrollPos < maxScrollPos;
3106
- }
3107
- var addUnlinkedScrollListener = (node, handler = () => {
3108
- }) => {
3109
- let prevPosition = { left: node.scrollLeft, top: node.scrollTop };
3110
- let rAF = 0;
3111
- (function loop() {
3112
- const position = { left: node.scrollLeft, top: node.scrollTop };
3113
- const isHorizontalScroll = prevPosition.left !== position.left;
3114
- const isVerticalScroll = prevPosition.top !== position.top;
3115
- if (isHorizontalScroll || isVerticalScroll) handler();
3116
- prevPosition = position;
3117
- rAF = window.requestAnimationFrame(loop);
3118
- })();
3119
- return () => window.cancelAnimationFrame(rAF);
3120
- };
3121
- function useDebounceCallback(callback, delay) {
3122
- const handleCallback = useCallbackRef(callback);
3123
- const debounceTimerRef = React23.useRef(0);
3124
- React23.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);
3125
- return React23.useCallback(() => {
3126
- window.clearTimeout(debounceTimerRef.current);
3127
- debounceTimerRef.current = window.setTimeout(handleCallback, delay);
3128
- }, [handleCallback, delay]);
3129
- }
3130
- function useResizeObserver(element, onResize) {
3131
- const handleResize = useCallbackRef(onResize);
3132
- useLayoutEffect22(() => {
3133
- let rAF = 0;
3134
- if (element) {
3135
- const resizeObserver = new ResizeObserver(() => {
3136
- cancelAnimationFrame(rAF);
3137
- rAF = window.requestAnimationFrame(handleResize);
3138
- });
3139
- resizeObserver.observe(element);
3140
- return () => {
3141
- window.cancelAnimationFrame(rAF);
3142
- resizeObserver.unobserve(element);
3143
- };
3144
- }
3145
- }, [element, handleResize]);
3146
- }
3147
- var Root = ScrollArea;
3148
- var Viewport = ScrollAreaViewport;
3149
- var Scrollbar = ScrollAreaScrollbar;
3150
- var Thumb = ScrollAreaThumb;
3151
- var Corner = ScrollAreaCorner;
3152
-
3153
- // src/components/layout/ScrollArea.tsx
3154
- import { clsx as clsx9 } from "clsx";
3155
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
3156
- var ScrollArea2 = ({
3157
- children,
3158
- scrollbarSize = "md",
3159
- scrollbarType = "auto",
3160
- scrollbarAxis = "both",
3161
- className,
3162
- ...props
3163
- }) => {
3164
- const scrollbarStyle = {
3165
- sm: { "--scrollbar-size": "calc(4px + var(--spacing))" },
3166
- md: { "--scrollbar-size": "calc(6px + var(--spacing))" }
3167
- }[scrollbarSize];
3168
- const hasHorizontalScrollBar = scrollbarAxis === "horizontal" || scrollbarAxis === "both";
3169
- const hasVerticalScrollBar = scrollbarAxis === "vertical" || scrollbarAxis === "both";
3170
- return /* @__PURE__ */ jsxs7(
3171
- Root,
3172
- {
3173
- ...props,
3174
- className: clsx9(
3175
- "overflow-hidden",
3176
- className
3177
- ),
3178
- style: {
3179
- ...scrollbarStyle,
3180
- ...props.style
3181
- },
3182
- type: scrollbarType,
3183
- children: [
3184
- hasHorizontalScrollBar && /* @__PURE__ */ jsx16(
3185
- Scrollbar,
3186
- {
3187
- orientation: "horizontal",
3188
- className: clsx9(
3189
- "peer/horizontal group/scrollbar flex-col-0 rounded-full select-none touch-none bg-scrollbar-track/50 hover:bg-scrollbar-track",
3190
- {
3191
- "h-[var(--scrollbar-size)]": scrollbarType === "always",
3192
- "data-[state=visible]:h-[var(--scrollbar-size)]": scrollbarType !== "always"
3193
- }
3194
- ),
3195
- children: /* @__PURE__ */ jsx16(
3196
- Thumb,
3197
- {
3198
- className: clsx9(
3199
- "flex relative rounded-full bg-scrollbar-thumb group-hover/scrollbar:bg-primary",
3200
- {
3201
- "min-h-[var(--scrollbar-size)]": scrollbarType === "always",
3202
- "data-[state=visible]:min-h-[var(--scrollbar-size)]": scrollbarType !== "always"
3203
- }
3204
- )
3205
- }
3206
- )
3207
- }
3208
- ),
3209
- hasVerticalScrollBar && /* @__PURE__ */ jsx16(
3210
- Scrollbar,
3211
- {
3212
- orientation: "vertical",
3213
- className: clsx9(
3214
- "peer/vertical group/scrollbar flex-col-0 rounded-full select-none touch-none bg-scrollbar-track/50 hover:bg-scrollbar-track",
3215
- {
3216
- "w-[var(--scrollbar-size)]": scrollbarType === "always",
3217
- "data-[state=visible]:w-[var(--scrollbar-size)]": scrollbarType !== "always"
3218
- }
3219
- ),
3220
- children: /* @__PURE__ */ jsx16(
3221
- Thumb,
3222
- {
3223
- className: clsx9(
3224
- "flex relative rounded-full bg-scrollbar-thumb group-hover/scrollbar:bg-primary",
3225
- {
3226
- "min-w-[var(--scrollbar-size)]": scrollbarType === "always",
3227
- "data-[state=visible]:min-w-[var(--scrollbar-size)]": scrollbarType !== "always"
3228
- }
3229
- )
3230
- }
3231
- )
3232
- }
3233
- ),
3234
- /* @__PURE__ */ jsx16(
3235
- Viewport,
3236
- {
3237
- className: clsx9(
3238
- "border-inherit",
3239
- {
3240
- "w-[calc(100%_-_var(--scrollbar-size))] h-[calc(100%_-_var(--scrollbar-size))]": scrollbarType === "always",
3241
- "w-full h-full": scrollbarType === "scroll" || scrollbarType === "hover" || scrollbarType === "auto",
3242
- "peer-[&:where([data-state=visible])]/horizontal:h-[calc(100%_-_var(--scrollbar-size))] peer-[&:where([data-state=visible])]/vertical:w-[calc(100%_-_var(--scrollbar-size))]": scrollbarType === "auto"
3243
- }
3244
- ),
3245
- children
3246
- }
3247
- ),
3248
- /* @__PURE__ */ jsx16(
3249
- Corner,
3250
- {
3251
- className: clsx9(
3252
- "bg-scrollbar-track rounded-full"
3253
- )
3254
- }
3255
- )
3256
- ]
3257
- }
3258
- );
3259
- };
3260
-
3261
- // src/components/layout/TextImage.tsx
3262
- import clsx10 from "clsx";
3263
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
3264
- var TextImage = ({
3265
- title,
3266
- description,
3267
- imageUrl,
3268
- onShowMoreClicked,
3269
- color = "primary",
3270
- badge,
3271
- contentClassName = "",
3272
- className = ""
3273
- }) => {
3274
- const translation = useHightideTranslation();
3275
- const chipColorMapping = {
3276
- primary: "text-text-image-primary-background bg-text-image-primary-text",
3277
- secondary: "text-text-image-secondary-background bg-text-image-secondary-text",
3278
- dark: "text-text-image-dark-background bg-text-image-dark-text"
3279
- };
3280
- const colorMapping = {
3281
- primary: "text-text-image-primary-text bg-linear-to-r from-30% from-text-image-primary-background to-text-image-primary-background/55",
3282
- secondary: "text-text-image-secondary-text bg-linear-to-r from-30% from-text-image-secondary-background to-text-image-secondary-background/55",
3283
- dark: "text-text-image-dark-text bg-linear-to-r from-30% from-text-image-dark-background to-text-image-dark-background/55"
3284
- };
3285
- return /* @__PURE__ */ jsx17(
3286
- "div",
3287
- {
3288
- className: clsx10("rounded-2xl w-full", className),
3289
- style: {
3290
- backgroundImage: `url(${imageUrl})`,
3291
- backgroundSize: "cover"
3292
- },
3293
- children: /* @__PURE__ */ jsxs8(
3294
- "div",
3295
- {
3296
- className: clsx10(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
3297
- children: [
3298
- badge && /* @__PURE__ */ jsx17("div", { className: clsx10(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ jsx17("span", { className: "text-lg font-bold", children: badge }) }),
3299
- /* @__PURE__ */ jsxs8("div", { className: "flex-col-1 overflow-hidden", children: [
3300
- /* @__PURE__ */ jsx17("span", { className: "typography-title-lg", children: title }),
3301
- /* @__PURE__ */ jsx17("span", { className: "text-ellipsis overflow-hidden", children: description })
3302
- ] }),
3303
- onShowMoreClicked && /* @__PURE__ */ jsx17("div", { className: "flex-row-2 mt-2 underline", children: /* @__PURE__ */ jsx17("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
3304
- ]
3305
- }
3306
- )
3307
- }
3308
- );
3309
- };
3310
-
3311
- // src/components/layout/VerticalDivider.tsx
3312
- import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
3313
- var VerticalDivider = ({
3314
- width = 1,
3315
- height = 100,
3316
- strokeWidth = 4,
3317
- dashGap = 4,
3318
- dashLength = 4
3319
- }) => {
3320
- return /* @__PURE__ */ jsx18("div", { style: { width: width + "px", height: height + "px" }, children: /* @__PURE__ */ jsxs9(
3321
- "svg",
3322
- {
3323
- width,
3324
- height,
3325
- viewBox: `0 0 ${width} ${height}`,
3326
- fill: "none",
3327
- xmlns: "http://www.w3.org/2000/svg",
3328
- children: [
3329
- /* @__PURE__ */ jsx18(
3330
- "line",
3331
- {
3332
- opacity: "0.5",
3333
- x1: width / 2,
3334
- y1: height,
3335
- x2: width / 2,
3336
- y2: "0",
3337
- stroke: "url(#paint_linear)",
3338
- strokeWidth,
3339
- strokeDasharray: `${dashLength} ${dashLength + dashGap}`,
3340
- strokeLinecap: "round"
3341
- }
3342
- ),
3343
- /* @__PURE__ */ jsx18("defs", { children: /* @__PURE__ */ jsxs9(
3344
- "linearGradient",
3345
- {
3346
- id: "paint_linear",
3347
- x1: width / 2,
3348
- y1: "0",
3349
- x2: width / 2,
3350
- y2: height,
3351
- gradientUnits: "userSpaceOnUse",
3352
- children: [
3353
- /* @__PURE__ */ jsx18("stop", { stopOpacity: "0", stopColor: "currentColor" }),
3354
- /* @__PURE__ */ jsx18("stop", { offset: "0.5", stopColor: "currentColor" }),
3355
- /* @__PURE__ */ jsx18("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
3356
- ]
3357
- }
3358
- ) })
3359
- ]
3360
- }
3361
- ) });
3362
- };
3363
- export {
3364
- ASTNodeInterpreter,
3365
- Carousel,
3366
- CarouselSlide,
3367
- Chip,
3368
- ChipList,
3369
- ChipUtil,
3370
- DividerInserter,
3371
- Expandable,
3372
- ExpandableUncontrolled,
3373
- ExpansionIcon,
3374
- FAQSection,
3375
- FloatingContainer,
3376
- ListBox,
3377
- ListBoxItem,
3378
- ListBoxMultiple,
3379
- ListBoxMultipleUncontrolled,
3380
- ListBoxPrimitive,
3381
- ListBoxUncontrolled,
3382
- MarkdownInterpreter,
3383
- ScrollArea2 as ScrollArea,
3384
- TextImage,
3385
- VerticalDivider
3386
- };
3387
- //# sourceMappingURL=index.js.map