@helpwave/hightide 0.1.46 → 0.1.48

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