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