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