@helpwave/hightide 0.1.18 → 0.1.20

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 (261) hide show
  1. package/dist/components/branding/HelpwaveBadge.js +7 -7
  2. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  3. package/dist/components/branding/HelpwaveBadge.mjs +7 -7
  4. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  5. package/dist/components/date/DatePicker.js +67 -39
  6. package/dist/components/date/DatePicker.js.map +1 -1
  7. package/dist/components/date/DatePicker.mjs +56 -28
  8. package/dist/components/date/DatePicker.mjs.map +1 -1
  9. package/dist/components/date/DayPicker.js +3 -3
  10. package/dist/components/date/DayPicker.js.map +1 -1
  11. package/dist/components/date/DayPicker.mjs +3 -3
  12. package/dist/components/date/DayPicker.mjs.map +1 -1
  13. package/dist/components/date/TimePicker.js +4 -4
  14. package/dist/components/date/TimePicker.js.map +1 -1
  15. package/dist/components/date/TimePicker.mjs +4 -4
  16. package/dist/components/date/TimePicker.mjs.map +1 -1
  17. package/dist/components/date/YearMonthPicker.js +48 -20
  18. package/dist/components/date/YearMonthPicker.js.map +1 -1
  19. package/dist/components/date/YearMonthPicker.mjs +46 -18
  20. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  21. package/dist/components/dialogs/ConfirmDialog.js +32 -28
  22. package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
  23. package/dist/components/dialogs/ConfirmDialog.mjs +18 -14
  24. package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
  25. package/dist/components/icons-and-geometry/Avatar.js +2 -2
  26. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  27. package/dist/components/icons-and-geometry/Avatar.mjs +2 -2
  28. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  29. package/dist/components/icons-and-geometry/Ring.js +2 -2
  30. package/dist/components/icons-and-geometry/Ring.js.map +1 -1
  31. package/dist/components/icons-and-geometry/Ring.mjs +2 -2
  32. package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
  33. package/dist/components/layout-and-navigation/BreadCrumb.js +1 -1
  34. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  35. package/dist/components/layout-and-navigation/BreadCrumb.mjs +1 -1
  36. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
  37. package/dist/components/layout-and-navigation/Carousel.js +84 -15
  38. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  39. package/dist/components/layout-and-navigation/Carousel.mjs +76 -7
  40. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  41. package/dist/components/layout-and-navigation/Chip.js +1 -1
  42. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  43. package/dist/components/layout-and-navigation/Chip.mjs +1 -1
  44. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  45. package/dist/components/layout-and-navigation/Expandable.d.mts +10 -1
  46. package/dist/components/layout-and-navigation/Expandable.d.ts +10 -1
  47. package/dist/components/layout-and-navigation/Expandable.js +38 -10
  48. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  49. package/dist/components/layout-and-navigation/Expandable.mjs +38 -11
  50. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  51. package/dist/components/layout-and-navigation/FAQSection.js +36 -12
  52. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  53. package/dist/components/layout-and-navigation/FAQSection.mjs +38 -14
  54. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  55. package/dist/components/layout-and-navigation/Overlay.js +92 -19
  56. package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
  57. package/dist/components/layout-and-navigation/Overlay.mjs +81 -8
  58. package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
  59. package/dist/components/layout-and-navigation/Pagination.js +82 -9
  60. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  61. package/dist/components/layout-and-navigation/Pagination.mjs +79 -6
  62. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  63. package/dist/components/layout-and-navigation/SearchableList.js +127 -25
  64. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
  65. package/dist/components/layout-and-navigation/SearchableList.mjs +126 -24
  66. package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
  67. package/dist/components/layout-and-navigation/StepperBar.js +22 -16
  68. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  69. package/dist/components/layout-and-navigation/StepperBar.mjs +19 -13
  70. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  71. package/dist/components/layout-and-navigation/TextImage.js +7 -3
  72. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  73. package/dist/components/layout-and-navigation/TextImage.mjs +7 -3
  74. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  75. package/dist/components/layout-and-navigation/Tile.d.mts +2 -2
  76. package/dist/components/layout-and-navigation/Tile.d.ts +2 -2
  77. package/dist/components/layout-and-navigation/Tile.js +7 -7
  78. package/dist/components/layout-and-navigation/Tile.js.map +1 -1
  79. package/dist/components/layout-and-navigation/Tile.mjs +7 -7
  80. package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
  81. package/dist/components/loading-states/ErrorComponent.js +1 -1
  82. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  83. package/dist/components/loading-states/ErrorComponent.mjs +1 -1
  84. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  85. package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +5 -10
  86. package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +5 -10
  87. package/dist/components/loading-states/LoadingAndErrorComponent.js +14 -327
  88. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
  89. package/dist/components/loading-states/LoadingAndErrorComponent.mjs +15 -318
  90. package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
  91. package/dist/components/loading-states/LoadingAnimation.js +5 -1
  92. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  93. package/dist/components/loading-states/LoadingAnimation.mjs +5 -1
  94. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  95. package/dist/components/loading-states/LoadingButton.js +8 -6
  96. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  97. package/dist/components/loading-states/LoadingButton.mjs +8 -6
  98. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  99. package/dist/components/loading-states/LoadingContainer.d.mts +8 -0
  100. package/dist/components/loading-states/LoadingContainer.d.ts +8 -0
  101. package/dist/components/loading-states/LoadingContainer.js +34 -0
  102. package/dist/components/loading-states/LoadingContainer.js.map +1 -0
  103. package/dist/components/loading-states/LoadingContainer.mjs +10 -0
  104. package/dist/components/loading-states/LoadingContainer.mjs.map +1 -0
  105. package/dist/components/modals/ConfirmModal.js +32 -28
  106. package/dist/components/modals/ConfirmModal.js.map +1 -1
  107. package/dist/components/modals/ConfirmModal.mjs +18 -14
  108. package/dist/components/modals/ConfirmModal.mjs.map +1 -1
  109. package/dist/components/modals/DiscardChangesModal.js +28 -24
  110. package/dist/components/modals/DiscardChangesModal.js.map +1 -1
  111. package/dist/components/modals/DiscardChangesModal.mjs +18 -14
  112. package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
  113. package/dist/components/modals/InputModal.js +32 -28
  114. package/dist/components/modals/InputModal.js.map +1 -1
  115. package/dist/components/modals/InputModal.mjs +18 -14
  116. package/dist/components/modals/InputModal.mjs.map +1 -1
  117. package/dist/components/modals/LanguageModal.js +729 -434
  118. package/dist/components/modals/LanguageModal.js.map +1 -1
  119. package/dist/components/modals/LanguageModal.mjs +729 -430
  120. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  121. package/dist/components/modals/ThemeModal.js +733 -438
  122. package/dist/components/modals/ThemeModal.js.map +1 -1
  123. package/dist/components/modals/ThemeModal.mjs +732 -433
  124. package/dist/components/modals/ThemeModal.mjs.map +1 -1
  125. package/dist/components/properties/CheckboxProperty.js +110 -35
  126. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  127. package/dist/components/properties/CheckboxProperty.mjs +110 -35
  128. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  129. package/dist/components/properties/DateProperty.js +118 -41
  130. package/dist/components/properties/DateProperty.js.map +1 -1
  131. package/dist/components/properties/DateProperty.mjs +114 -37
  132. package/dist/components/properties/DateProperty.mjs.map +1 -1
  133. package/dist/components/properties/MultiSelectProperty.d.mts +10 -3
  134. package/dist/components/properties/MultiSelectProperty.d.ts +10 -3
  135. package/dist/components/properties/MultiSelectProperty.js +916 -463
  136. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  137. package/dist/components/properties/MultiSelectProperty.mjs +921 -464
  138. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  139. package/dist/components/properties/NumberProperty.js +101 -18
  140. package/dist/components/properties/NumberProperty.js.map +1 -1
  141. package/dist/components/properties/NumberProperty.mjs +101 -18
  142. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  143. package/dist/components/properties/PropertyBase.js +103 -20
  144. package/dist/components/properties/PropertyBase.js.map +1 -1
  145. package/dist/components/properties/PropertyBase.mjs +99 -16
  146. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  147. package/dist/components/properties/SelectProperty.d.mts +9 -2
  148. package/dist/components/properties/SelectProperty.d.ts +9 -2
  149. package/dist/components/properties/SelectProperty.js +683 -243
  150. package/dist/components/properties/SelectProperty.js.map +1 -1
  151. package/dist/components/properties/SelectProperty.mjs +687 -243
  152. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  153. package/dist/components/properties/TextProperty.js +133 -46
  154. package/dist/components/properties/TextProperty.js.map +1 -1
  155. package/dist/components/properties/TextProperty.mjs +133 -46
  156. package/dist/components/properties/TextProperty.mjs.map +1 -1
  157. package/dist/components/table/Table.js +285 -185
  158. package/dist/components/table/Table.js.map +1 -1
  159. package/dist/components/table/Table.mjs +270 -166
  160. package/dist/components/table/Table.mjs.map +1 -1
  161. package/dist/components/table/TableFilterButton.js +179 -78
  162. package/dist/components/table/TableFilterButton.js.map +1 -1
  163. package/dist/components/table/TableFilterButton.mjs +160 -55
  164. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  165. package/dist/components/table/TableSortButton.js +72 -3
  166. package/dist/components/table/TableSortButton.js.map +1 -1
  167. package/dist/components/table/TableSortButton.mjs +72 -3
  168. package/dist/components/table/TableSortButton.mjs.map +1 -1
  169. package/dist/components/user-action/Button.d.mts +15 -2
  170. package/dist/components/user-action/Button.d.ts +15 -2
  171. package/dist/components/user-action/Button.js +12 -12
  172. package/dist/components/user-action/Button.js.map +1 -1
  173. package/dist/components/user-action/Button.mjs +12 -12
  174. package/dist/components/user-action/Button.mjs.map +1 -1
  175. package/dist/components/user-action/Checkbox.js +6 -15
  176. package/dist/components/user-action/Checkbox.js.map +1 -1
  177. package/dist/components/user-action/Checkbox.mjs +6 -15
  178. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  179. package/dist/components/user-action/CopyToClipboardWrapper.js +6 -2
  180. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  181. package/dist/components/user-action/CopyToClipboardWrapper.mjs +6 -2
  182. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  183. package/dist/components/user-action/DateAndTimePicker.js +81 -49
  184. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  185. package/dist/components/user-action/DateAndTimePicker.mjs +67 -35
  186. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  187. package/dist/components/user-action/Menu.d.mts +11 -6
  188. package/dist/components/user-action/Menu.d.ts +11 -6
  189. package/dist/components/user-action/Menu.js +128 -31
  190. package/dist/components/user-action/Menu.js.map +1 -1
  191. package/dist/components/user-action/Menu.mjs +134 -33
  192. package/dist/components/user-action/Menu.mjs.map +1 -1
  193. package/dist/components/user-action/MultiSelect.d.mts +17 -7
  194. package/dist/components/user-action/MultiSelect.d.ts +17 -7
  195. package/dist/components/user-action/MultiSelect.js +797 -375
  196. package/dist/components/user-action/MultiSelect.js.map +1 -1
  197. package/dist/components/user-action/MultiSelect.mjs +782 -356
  198. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  199. package/dist/components/user-action/ScrollPicker.js +2 -2
  200. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  201. package/dist/components/user-action/ScrollPicker.mjs +2 -2
  202. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  203. package/dist/components/user-action/SearchBar.d.mts +14 -0
  204. package/dist/components/user-action/SearchBar.d.ts +14 -0
  205. package/dist/components/user-action/SearchBar.js +673 -0
  206. package/dist/components/user-action/SearchBar.js.map +1 -0
  207. package/dist/components/user-action/SearchBar.mjs +637 -0
  208. package/dist/components/user-action/SearchBar.mjs.map +1 -0
  209. package/dist/components/user-action/Select.d.mts +18 -5
  210. package/dist/components/user-action/Select.d.ts +18 -5
  211. package/dist/components/user-action/Select.js +765 -355
  212. package/dist/components/user-action/Select.js.map +1 -1
  213. package/dist/components/user-action/Select.mjs +762 -349
  214. package/dist/components/user-action/Select.mjs.map +1 -1
  215. package/dist/components/user-action/Textarea.d.mts +1 -1
  216. package/dist/components/user-action/Textarea.d.ts +1 -1
  217. package/dist/components/user-action/Textarea.js +13 -3
  218. package/dist/components/user-action/Textarea.js.map +1 -1
  219. package/dist/components/user-action/Textarea.mjs +13 -3
  220. package/dist/components/user-action/Textarea.mjs.map +1 -1
  221. package/dist/components/user-action/ToggleableInput.js +2 -2
  222. package/dist/components/user-action/ToggleableInput.js.map +1 -1
  223. package/dist/components/user-action/ToggleableInput.mjs +2 -2
  224. package/dist/components/user-action/ToggleableInput.mjs.map +1 -1
  225. package/dist/css/globals.css +284 -113
  226. package/dist/css/uncompiled/globals.css +19 -13
  227. package/dist/css/uncompiled/theme/colors-component.css +12 -3
  228. package/dist/css/uncompiled/theme/colors-semantic.css +10 -7
  229. package/dist/css/uncompiled/utitlity/animation.css +96 -1
  230. package/dist/css/uncompiled/utitlity/general.css +16 -0
  231. package/dist/hooks/usePopoverPosition.d.mts +15 -0
  232. package/dist/hooks/usePopoverPosition.d.ts +15 -0
  233. package/dist/hooks/usePopoverPosition.js +81 -0
  234. package/dist/hooks/usePopoverPosition.js.map +1 -0
  235. package/dist/hooks/usePopoverPosition.mjs +57 -0
  236. package/dist/hooks/usePopoverPosition.mjs.map +1 -0
  237. package/dist/hooks/useSearch.d.mts +7 -2
  238. package/dist/hooks/useSearch.d.ts +7 -2
  239. package/dist/hooks/useSearch.js +44 -15
  240. package/dist/hooks/useSearch.js.map +1 -1
  241. package/dist/hooks/useSearch.mjs +45 -16
  242. package/dist/hooks/useSearch.mjs.map +1 -1
  243. package/dist/index.d.mts +7 -4
  244. package/dist/index.d.ts +7 -4
  245. package/dist/index.js +1197 -902
  246. package/dist/index.js.map +1 -1
  247. package/dist/index.mjs +1048 -754
  248. package/dist/index.mjs.map +1 -1
  249. package/dist/localization/defaults/form.d.mts +2 -0
  250. package/dist/localization/defaults/form.d.ts +2 -0
  251. package/dist/localization/defaults/form.js +4 -0
  252. package/dist/localization/defaults/form.js.map +1 -1
  253. package/dist/localization/defaults/form.mjs +4 -0
  254. package/dist/localization/defaults/form.mjs.map +1 -1
  255. package/dist/util/simpleSearch.d.mts +1 -1
  256. package/dist/util/simpleSearch.d.ts +1 -1
  257. package/dist/util/simpleSearch.js +4 -1
  258. package/dist/util/simpleSearch.js.map +1 -1
  259. package/dist/util/simpleSearch.mjs +4 -1
  260. package/dist/util/simpleSearch.mjs.map +1 -1
  261. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2872,6 +2872,7 @@ __export(index_exports, {
2872
2872
  ErrorComponent: () => ErrorComponent,
2873
2873
  Expandable: () => Expandable,
2874
2874
  ExpandableUncontrolled: () => ExpandableUncontrolled,
2875
+ ExpansionIcon: () => ExpansionIcon,
2875
2876
  FAQSection: () => FAQSection,
2876
2877
  FillerRowElement: () => FillerRowElement,
2877
2878
  FormInput: () => FormInput,
@@ -2890,6 +2891,7 @@ __export(index_exports, {
2890
2891
  LoadingAndErrorComponent: () => LoadingAndErrorComponent,
2891
2892
  LoadingAnimation: () => LoadingAnimation,
2892
2893
  LoadingButton: () => LoadingButton,
2894
+ LoadingContainer: () => LoadingContainer,
2893
2895
  LocalStorageService: () => LocalStorageService,
2894
2896
  LoopingArrayCalculator: () => LoopingArrayCalculator,
2895
2897
  MarkdownInterpreter: () => MarkdownInterpreter,
@@ -2912,8 +2914,10 @@ __export(index_exports, {
2912
2914
  Ring: () => Ring,
2913
2915
  RingWave: () => RingWave,
2914
2916
  ScrollPicker: () => ScrollPicker,
2917
+ SearchBar: () => SearchBar,
2915
2918
  SearchableList: () => SearchableList,
2916
2919
  Select: () => Select,
2920
+ SelectTile: () => SelectTile,
2917
2921
  SelectUncontrolled: () => SelectUncontrolled,
2918
2922
  SessionStorageService: () => SessionStorageService,
2919
2923
  SimpleSearch: () => SimpleSearch,
@@ -2990,6 +2994,7 @@ __export(index_exports, {
2990
2994
  useLocalStorage: () => useLocalStorage,
2991
2995
  useLocale: () => useLocale,
2992
2996
  useOutsideClick: () => useOutsideClick,
2997
+ usePopoverPosition: () => usePopoverPosition,
2993
2998
  useRerender: () => useRerender,
2994
2999
  useResizeCallbackWrapper: () => useResizeCallbackWrapper,
2995
3000
  useSearch: () => useSearch,
@@ -3057,7 +3062,7 @@ var Tile = ({
3057
3062
  description,
3058
3063
  onClick,
3059
3064
  isSelected = false,
3060
- isDisabled = false,
3065
+ disabled = false,
3061
3066
  prefix,
3062
3067
  suffix,
3063
3068
  normalClassName = "hover:bg-primary/40 cursor-pointer",
@@ -3069,18 +3074,18 @@ var Tile = ({
3069
3074
  "div",
3070
3075
  {
3071
3076
  className: (0, import_clsx.default)(
3072
- "row gap-x-2 w-full items-center",
3077
+ "flex-row-2 w-full items-center",
3073
3078
  {
3074
- [normalClassName]: !!onClick && !isDisabled,
3075
- [selectedClassName]: isSelected && !isDisabled,
3076
- [disabledClassName]: isDisabled
3079
+ [normalClassName]: !!onClick && !disabled,
3080
+ [selectedClassName]: isSelected && !disabled,
3081
+ [disabledClassName]: disabled
3077
3082
  },
3078
3083
  className
3079
3084
  ),
3080
- onClick: isDisabled ? void 0 : onClick,
3085
+ onClick: disabled ? void 0 : onClick,
3081
3086
  children: [
3082
3087
  prefix,
3083
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "col gap-y-0 w-full", children: [
3088
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-col-0 w-full", children: [
3084
3089
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { className: (0, import_clsx.default)(title.className ?? "textstyle-title-normal"), children: title.value }),
3085
3090
  !!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(description.className ?? "textstyle-description"), children: description.value })
3086
3091
  ] }),
@@ -3187,7 +3192,7 @@ var HelpwaveBadge = ({
3187
3192
  };
3188
3193
 
3189
3194
  // src/components/date/DatePicker.tsx
3190
- var import_react6 = require("react");
3195
+ var import_react7 = require("react");
3191
3196
  var import_lucide_react3 = require("lucide-react");
3192
3197
 
3193
3198
  // src/localization/LanguageProvider.tsx
@@ -3617,6 +3622,7 @@ var getWeeksForCalenderMonth = (date, weekStart, weeks = 6) => {
3617
3622
  var import_clsx8 = __toESM(require("clsx"));
3618
3623
 
3619
3624
  // src/components/user-action/Button.tsx
3625
+ var import_react3 = require("react");
3620
3626
  var import_clsx4 = __toESM(require("clsx"));
3621
3627
  var import_jsx_runtime5 = require("react/jsx-runtime");
3622
3628
  var ButtonColorUtil = {
@@ -3642,7 +3648,7 @@ var ButtonUtil = {
3642
3648
  paddingMapping,
3643
3649
  iconPaddingMapping
3644
3650
  };
3645
- var SolidButton = ({
3651
+ var SolidButton = (0, import_react3.forwardRef)(function SolidButton2({
3646
3652
  children,
3647
3653
  disabled = false,
3648
3654
  color = "primary",
@@ -3652,7 +3658,7 @@ var SolidButton = ({
3652
3658
  onClick,
3653
3659
  className,
3654
3660
  ...restProps
3655
- }) => {
3661
+ }, ref) {
3656
3662
  const colorClasses = {
3657
3663
  primary: "bg-button-solid-primary-background text-button-solid-primary-text",
3658
3664
  secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
@@ -3674,8 +3680,9 @@ var SolidButton = ({
3674
3680
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3675
3681
  "button",
3676
3682
  {
3677
- onClick: disabled ? void 0 : onClick,
3678
- disabled: disabled || onClick === void 0,
3683
+ ref,
3684
+ onClick,
3685
+ disabled,
3679
3686
  className: (0, import_clsx4.default)(
3680
3687
  {
3681
3688
  "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
@@ -3710,7 +3717,7 @@ var SolidButton = ({
3710
3717
  ]
3711
3718
  }
3712
3719
  );
3713
- };
3720
+ });
3714
3721
  var OutlineButton = ({
3715
3722
  children,
3716
3723
  disabled = false,
@@ -3731,8 +3738,8 @@ var OutlineButton = ({
3731
3738
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3732
3739
  "button",
3733
3740
  {
3734
- onClick: disabled ? void 0 : onClick,
3735
- disabled: disabled || onClick === void 0,
3741
+ onClick,
3742
+ disabled,
3736
3743
  className: (0, import_clsx4.default)(
3737
3744
  {
3738
3745
  "text-disabled-text border-disabled-outline cursor-not-allowed": disabled,
@@ -3792,8 +3799,8 @@ var TextButton = ({
3792
3799
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3793
3800
  "button",
3794
3801
  {
3795
- onClick: disabled ? void 0 : onClick,
3796
- disabled: disabled || onClick === void 0,
3802
+ onClick,
3803
+ disabled,
3797
3804
  className: (0, import_clsx4.default)(
3798
3805
  {
3799
3806
  "text-disabled-text cursor-not-allowed": disabled,
@@ -3834,7 +3841,6 @@ var IconButton = ({
3834
3841
  disabled = false,
3835
3842
  color = "primary",
3836
3843
  size = "medium",
3837
- onClick,
3838
3844
  className,
3839
3845
  ...restProps
3840
3846
  }) => {
@@ -3851,8 +3857,7 @@ var IconButton = ({
3851
3857
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3852
3858
  "button",
3853
3859
  {
3854
- onClick: disabled ? void 0 : onClick,
3855
- disabled: disabled || onClick === void 0,
3860
+ disabled,
3856
3861
  className: (0, import_clsx4.default)(
3857
3862
  {
3858
3863
  "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
@@ -3870,17 +3875,28 @@ var IconButton = ({
3870
3875
  };
3871
3876
 
3872
3877
  // src/components/date/YearMonthPicker.tsx
3873
- var import_react4 = require("react");
3878
+ var import_react5 = require("react");
3874
3879
  var import_react_custom_scrollbars_2 = require("react-custom-scrollbars-2");
3875
3880
  var import_clsx6 = __toESM(require("clsx"));
3876
3881
 
3877
3882
  // src/components/layout-and-navigation/Expandable.tsx
3878
- var import_react3 = require("react");
3883
+ var import_react4 = require("react");
3879
3884
  var import_lucide_react2 = require("lucide-react");
3880
3885
  var import_clsx5 = __toESM(require("clsx"));
3881
3886
  var import_jsx_runtime6 = require("react/jsx-runtime");
3882
- var DefaultIcon = (expanded) => expanded ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronUp, { className: "min-w-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronDown, { className: "min-w-4 w-4" });
3883
- var Expandable = (0, import_react3.forwardRef)(function Expandable2({
3887
+ var ExpansionIcon = ({ isExpanded, className }) => {
3888
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3889
+ import_lucide_react2.ChevronDown,
3890
+ {
3891
+ className: (0, import_clsx5.default)(
3892
+ "min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
3893
+ { "rotate-180": isExpanded },
3894
+ className
3895
+ )
3896
+ }
3897
+ );
3898
+ };
3899
+ var Expandable = (0, import_react4.forwardRef)(function Expandable2({
3884
3900
  children,
3885
3901
  label,
3886
3902
  icon,
@@ -3890,24 +3906,26 @@ var Expandable = (0, import_react3.forwardRef)(function Expandable2({
3890
3906
  disabled = false,
3891
3907
  className,
3892
3908
  headerClassName,
3893
- contentClassName
3909
+ contentClassName,
3910
+ contentExpandedClassName
3894
3911
  }, ref) {
3895
- icon ??= DefaultIcon;
3912
+ const defaultIcon = (0, import_react4.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
3913
+ icon ??= defaultIcon;
3896
3914
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3897
3915
  "div",
3898
3916
  {
3899
3917
  ref,
3900
- className: (0, import_clsx5.default)("col gap-y-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
3918
+ className: (0, import_clsx5.default)("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
3901
3919
  onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
3902
3920
  children: [
3903
3921
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3904
3922
  "div",
3905
3923
  {
3906
3924
  className: (0, import_clsx5.default)(
3907
- "row py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
3925
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
3908
3926
  {
3909
- "group-hover:brightness-95": !isExpanded,
3910
- "hover:brightness-95": isExpanded && !disabled,
3927
+ "group-hover:brightness-97": !isExpanded,
3928
+ "hover:brightness-97": isExpanded && !disabled,
3911
3929
  "cursor-pointer": clickOnlyOnHeader && !disabled
3912
3930
  },
3913
3931
  headerClassName
@@ -3919,18 +3937,31 @@ var Expandable = (0, import_react3.forwardRef)(function Expandable2({
3919
3937
  ]
3920
3938
  }
3921
3939
  ),
3922
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_clsx5.default)("col px-4 pb-2", contentClassName), children })
3940
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3941
+ "div",
3942
+ {
3943
+ className: (0, import_clsx5.default)(
3944
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
3945
+ {
3946
+ [(0, import_clsx5.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
3947
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
3948
+ },
3949
+ contentClassName
3950
+ ),
3951
+ children
3952
+ }
3953
+ )
3923
3954
  ]
3924
3955
  }
3925
3956
  );
3926
3957
  });
3927
- var ExpandableUncontrolled = (0, import_react3.forwardRef)(function ExpandableUncontrolled2({
3958
+ var ExpandableUncontrolled = (0, import_react4.forwardRef)(function ExpandableUncontrolled2({
3928
3959
  isExpanded,
3929
3960
  onChange = noop,
3930
3961
  ...props
3931
3962
  }, ref) {
3932
- const [usedIsExpanded, setUsedIsExpanded] = (0, import_react3.useState)(isExpanded);
3933
- (0, import_react3.useEffect)(() => {
3963
+ const [usedIsExpanded, setUsedIsExpanded] = (0, import_react4.useState)(isExpanded);
3964
+ (0, import_react4.useEffect)(() => {
3934
3965
  setUsedIsExpanded(isExpanded);
3935
3966
  }, [isExpanded]);
3936
3967
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
@@ -3959,8 +3990,8 @@ var YearMonthPicker = ({
3959
3990
  showValueOpen = true
3960
3991
  }) => {
3961
3992
  const locale = useLocale();
3962
- const ref = (0, import_react4.useRef)(null);
3963
- (0, import_react4.useEffect)(() => {
3993
+ const ref = (0, import_react5.useRef)(null);
3994
+ (0, import_react5.useEffect)(() => {
3964
3995
  const scrollToItem = () => {
3965
3996
  if (ref.current) {
3966
3997
  ref.current.scrollIntoView({
@@ -3976,7 +4007,7 @@ var YearMonthPicker = ({
3976
4007
  return null;
3977
4008
  }
3978
4009
  const years = range([start.getFullYear(), end.getFullYear()], { exclusiveEnd: false });
3979
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_clsx6.default)("col select-none", className), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_custom_scrollbars_2.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "col gap-y-1 mr-3", children: years.map((year) => {
4010
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_clsx6.default)("flex-col-0 select-none", className), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_custom_scrollbars_2.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-col-1 mr-3", children: years.map((year) => {
3980
4011
  const selectedYear = displayedYearMonth.getFullYear() === year;
3981
4012
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
3982
4013
  ExpandableUncontrolled,
@@ -3985,7 +4016,7 @@ var YearMonthPicker = ({
3985
4016
  label: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: (0, import_clsx6.default)({ "text-primary font-bold": selectedYear }), children: year }),
3986
4017
  isExpanded: showValueOpen && selectedYear,
3987
4018
  contentClassName: "gap-y-1",
3988
- children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "row gap-x-1", children: monthList.map((month) => {
4019
+ children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-row-1", children: monthList.map((month) => {
3989
4020
  const monthIndex = monthsList.indexOf(month);
3990
4021
  const newDate = new Date(year, monthIndex);
3991
4022
  const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
@@ -4019,8 +4050,8 @@ var YearMonthPickerUncontrolled = ({
4019
4050
  onChange = noop,
4020
4051
  ...props
4021
4052
  }) => {
4022
- const [yearMonth, setYearMonth] = (0, import_react4.useState)(displayedYearMonth ?? /* @__PURE__ */ new Date());
4023
- (0, import_react4.useEffect)(() => setYearMonth(displayedYearMonth), [displayedYearMonth]);
4053
+ const [yearMonth, setYearMonth] = (0, import_react5.useState)(displayedYearMonth ?? /* @__PURE__ */ new Date());
4054
+ (0, import_react5.useEffect)(() => setYearMonth(displayedYearMonth), [displayedYearMonth]);
4024
4055
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4025
4056
  YearMonthPicker,
4026
4057
  {
@@ -4036,7 +4067,7 @@ var YearMonthPickerUncontrolled = ({
4036
4067
 
4037
4068
  // src/components/date/DayPicker.tsx
4038
4069
  var import_clsx7 = __toESM(require("clsx"));
4039
- var import_react5 = require("react");
4070
+ var import_react6 = require("react");
4040
4071
  var import_jsx_runtime8 = require("react/jsx-runtime");
4041
4072
  var DayPicker = ({
4042
4073
  displayedMonth,
@@ -4051,9 +4082,9 @@ var DayPicker = ({
4051
4082
  const locale = useLocale();
4052
4083
  const month = displayedMonth.getMonth();
4053
4084
  const weeks = getWeeksForCalenderMonth(displayedMonth, weekStart);
4054
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx7.default)("col gap-y-1 min-w-[220px] select-none", className), children: [
4055
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "row text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
4056
- weeks.map((week, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "row text-center", children: week.map((date) => {
4085
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx7.default)("flex-col-1 min-w-[220px] select-none", className), children: [
4086
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-row-2 text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
4087
+ weeks.map((week, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-row-2 text-center", children: week.map((date) => {
4057
4088
  const isSelected = !!selected && equalDate(selected, date);
4058
4089
  const isToday = equalDate(/* @__PURE__ */ new Date(), date);
4059
4090
  const isSameMonth = date.getMonth() === month;
@@ -4088,9 +4119,9 @@ var DayPickerUncontrolled = ({
4088
4119
  onChange = noop,
4089
4120
  ...restProps
4090
4121
  }) => {
4091
- const [date, setDate] = (0, import_react5.useState)(selected);
4092
- const [usedDisplayedMonth, setUsedDDisplayedMonth] = (0, import_react5.useState)(displayedMonth);
4093
- (0, import_react5.useEffect)(() => {
4122
+ const [date, setDate] = (0, import_react6.useState)(selected);
4123
+ const [usedDisplayedMonth, setUsedDDisplayedMonth] = (0, import_react6.useState)(displayedMonth);
4124
+ (0, import_react6.useEffect)(() => {
4094
4125
  setDate(selected);
4095
4126
  setUsedDDisplayedMonth(selected);
4096
4127
  }, [selected]);
@@ -4196,17 +4227,17 @@ var DatePicker = ({
4196
4227
  }) => {
4197
4228
  const locale = useLocale();
4198
4229
  const translation = useTranslation([timeTranslation], overwriteTranslation);
4199
- const [displayedMonth, setDisplayedMonth] = (0, import_react6.useState)(value);
4200
- const [displayMode, setDisplayMode] = (0, import_react6.useState)(initialDisplay);
4201
- (0, import_react6.useEffect)(() => {
4230
+ const [displayedMonth, setDisplayedMonth] = (0, import_react7.useState)(value);
4231
+ const [displayMode, setDisplayMode] = (0, import_react7.useState)(initialDisplay);
4232
+ (0, import_react7.useEffect)(() => {
4202
4233
  setDisplayedMonth(value);
4203
4234
  }, [value]);
4204
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_clsx8.default)("col gap-y-4", className), children: [
4205
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "row items-center justify-between h-7", children: [
4235
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_clsx8.default)("flex-col-4", className), children: [
4236
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-row-2 items-center justify-between h-7", children: [
4206
4237
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4207
4238
  TextButton,
4208
4239
  {
4209
- className: (0, import_clsx8.default)("row gap-x-1 items-center cursor-pointer select-none", {
4240
+ className: (0, import_clsx8.default)("flex-row-1 items-center cursor-pointer select-none", {
4210
4241
  "text-disabled-text": displayMode !== "day"
4211
4242
  }),
4212
4243
  onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
@@ -4216,7 +4247,7 @@ var DatePicker = ({
4216
4247
  ]
4217
4248
  }
4218
4249
  ),
4219
- displayMode === "day" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "row justify-end", children: [
4250
+ displayMode === "day" && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-row-2 justify-end", children: [
4220
4251
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4221
4252
  SolidButton,
4222
4253
  {
@@ -4289,8 +4320,8 @@ var DatePickerUncontrolled = ({
4289
4320
  onChange = noop,
4290
4321
  ...props
4291
4322
  }) => {
4292
- const [date, setDate] = (0, import_react6.useState)(value);
4293
- (0, import_react6.useEffect)(() => setDate(value), [value]);
4323
+ const [date, setDate] = (0, import_react7.useState)(value);
4324
+ (0, import_react7.useEffect)(() => setDate(value), [value]);
4294
4325
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
4295
4326
  DatePicker,
4296
4327
  {
@@ -4359,7 +4390,7 @@ var TimeDisplay = ({
4359
4390
  };
4360
4391
 
4361
4392
  // src/components/date/TimePicker.tsx
4362
- var import_react7 = require("react");
4393
+ var import_react8 = require("react");
4363
4394
  var import_react_custom_scrollbars_22 = require("react-custom-scrollbars-2");
4364
4395
  var import_clsx9 = __toESM(require("clsx"));
4365
4396
  var import_jsx_runtime11 = require("react/jsx-runtime");
@@ -4371,12 +4402,12 @@ var TimePicker = ({
4371
4402
  maxHeight = 300,
4372
4403
  className = ""
4373
4404
  }) => {
4374
- const minuteRef = (0, import_react7.useRef)(null);
4375
- const hourRef = (0, import_react7.useRef)(null);
4405
+ const minuteRef = (0, import_react8.useRef)(null);
4406
+ const hourRef = (0, import_react8.useRef)(null);
4376
4407
  const isPM = time.getHours() >= 11;
4377
4408
  const hours = is24HourFormat ? range(24) : range([1, 12], { exclusiveEnd: false });
4378
4409
  let minutes = range(60);
4379
- (0, import_react7.useEffect)(() => {
4410
+ (0, import_react8.useEffect)(() => {
4380
4411
  const scrollToItem = () => {
4381
4412
  if (minuteRef.current) {
4382
4413
  const container = minuteRef.current.parentElement;
@@ -4391,7 +4422,7 @@ var TimePicker = ({
4391
4422
  };
4392
4423
  scrollToItem();
4393
4424
  }, [minuteRef, minuteRef.current]);
4394
- (0, import_react7.useEffect)(() => {
4425
+ (0, import_react8.useEffect)(() => {
4395
4426
  const scrollToItem = () => {
4396
4427
  if (hourRef.current) {
4397
4428
  const container = hourRef.current.parentElement;
@@ -4430,8 +4461,8 @@ var TimePicker = ({
4430
4461
  transformer(newDate);
4431
4462
  onChange(newDate);
4432
4463
  };
4433
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_clsx9.default)("row gap-x-2 w-fit min-w-[150px] select-none", className), children: [
4434
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "col gap-y-1 h-full", children: hours.map((hour) => {
4464
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_clsx9.default)("flex-row-2 w-fit min-w-[150px] select-none", className), children: [
4465
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex-col-1 h-full", children: hours.map((hour) => {
4435
4466
  const currentHour = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
4436
4467
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4437
4468
  "button",
@@ -4444,7 +4475,7 @@ var TimePicker = ({
4444
4475
  hour
4445
4476
  );
4446
4477
  }) }) }),
4447
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "col gap-y-1 h-full", children: minutes.map((minute) => {
4478
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex-col-1 h-full", children: minutes.map((minute) => {
4448
4479
  const currentMinute = minute === closestMinute;
4449
4480
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4450
4481
  "button",
@@ -4457,7 +4488,7 @@ var TimePicker = ({
4457
4488
  minute + minuteIncrement
4458
4489
  );
4459
4490
  }) }) }),
4460
- !is24HourFormat && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "col gap-y-1", children: [
4491
+ !is24HourFormat && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-col-1", children: [
4461
4492
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4462
4493
  "button",
4463
4494
  {
@@ -4482,8 +4513,8 @@ var TimePickerUncontrolled = ({
4482
4513
  onChange = noop,
4483
4514
  ...props
4484
4515
  }) => {
4485
- const [value, setValue] = (0, import_react7.useState)(time);
4486
- (0, import_react7.useEffect)(() => setValue(time), [time]);
4516
+ const [value, setValue] = (0, import_react8.useState)(time);
4517
+ (0, import_react8.useEffect)(() => setValue(time), [time]);
4487
4518
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4488
4519
  TimePicker,
4489
4520
  {
@@ -4501,20 +4532,20 @@ var TimePickerUncontrolled = ({
4501
4532
  var import_clsx12 = __toESM(require("clsx"));
4502
4533
 
4503
4534
  // src/components/layout-and-navigation/Overlay.tsx
4504
- var import_react9 = require("react");
4535
+ var import_react10 = require("react");
4505
4536
  var import_react_dom = __toESM(require("react-dom"));
4506
4537
  var import_clsx11 = __toESM(require("clsx"));
4507
4538
 
4508
4539
  // src/hooks/useHoverState.ts
4509
- var import_react8 = require("react");
4540
+ var import_react9 = require("react");
4510
4541
  var defaultUseHoverStateProps = {
4511
4542
  closingDelay: 200,
4512
4543
  isDisabled: false
4513
4544
  };
4514
4545
  var useHoverState = (props = void 0) => {
4515
4546
  const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
4516
- const [isHovered, setIsHovered] = (0, import_react8.useState)(false);
4517
- const [timer, setTimer] = (0, import_react8.useState)();
4547
+ const [isHovered, setIsHovered] = (0, import_react9.useState)(false);
4548
+ const [timer, setTimer] = (0, import_react9.useState)();
4518
4549
  const onMouseEnter = () => {
4519
4550
  if (isDisabled) {
4520
4551
  return;
@@ -4530,14 +4561,14 @@ var useHoverState = (props = void 0) => {
4530
4561
  setIsHovered(false);
4531
4562
  }, closingDelay));
4532
4563
  };
4533
- (0, import_react8.useEffect)(() => {
4564
+ (0, import_react9.useEffect)(() => {
4534
4565
  if (timer) {
4535
4566
  return () => {
4536
4567
  clearTimeout(timer);
4537
4568
  };
4538
4569
  }
4539
4570
  });
4540
- (0, import_react8.useEffect)(() => {
4571
+ (0, import_react9.useEffect)(() => {
4541
4572
  if (timer) {
4542
4573
  clearTimeout(timer);
4543
4574
  }
@@ -4621,6 +4652,7 @@ var import_lucide_react4 = require("lucide-react");
4621
4652
  // src/localization/defaults/form.ts
4622
4653
  var formTranslation = {
4623
4654
  en: {
4655
+ add: "Add",
4624
4656
  all: "All",
4625
4657
  apply: "Apply",
4626
4658
  back: "Back",
@@ -4633,6 +4665,7 @@ var formTranslation = {
4633
4665
  confirm: "Confirm",
4634
4666
  copy: "Copy",
4635
4667
  copied: "Copied",
4668
+ create: "Create",
4636
4669
  decline: "Decline",
4637
4670
  delete: "Delete",
4638
4671
  discard: "Discard",
@@ -4675,6 +4708,7 @@ var formTranslation = {
4675
4708
  yes: "Yes"
4676
4709
  },
4677
4710
  de: {
4711
+ add: "Hinzuf\xFCgen",
4678
4712
  all: "Alle",
4679
4713
  apply: "Anwenden",
4680
4714
  back: "Zur\xFCck",
@@ -4687,6 +4721,7 @@ var formTranslation = {
4687
4721
  confirm: "Best\xE4tigen",
4688
4722
  copy: "Kopieren",
4689
4723
  copied: "Kopiert",
4724
+ create: "Erstellen",
4690
4725
  decline: "Ablehnen",
4691
4726
  delete: "L\xF6schen",
4692
4727
  discard: "Verwerfen",
@@ -4738,8 +4773,8 @@ var Overlay = ({
4738
4773
  onBackgroundClick,
4739
4774
  backgroundClassName
4740
4775
  }) => {
4741
- const [root, setRoot] = (0, import_react9.useState)();
4742
- (0, import_react9.useEffect)(() => {
4776
+ const [root, setRoot] = (0, import_react10.useState)();
4777
+ (0, import_react10.useEffect)(() => {
4743
4778
  setRoot(document.body);
4744
4779
  }, []);
4745
4780
  if (!root || !isOpen) return null;
@@ -4748,7 +4783,7 @@ var Overlay = ({
4748
4783
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4749
4784
  "div",
4750
4785
  {
4751
- className: (0, import_clsx11.default)("fixed inset-0 h-screen w-screen bg-black/30", backgroundClassName),
4786
+ className: (0, import_clsx11.default)("fixed inset-0 h-screen w-screen bg-overlay-shadow", backgroundClassName),
4752
4787
  onClick: onBackgroundClick
4753
4788
  }
4754
4789
  ),
@@ -4776,7 +4811,7 @@ var OverlayHeader = ({
4776
4811
  }) => {
4777
4812
  const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
4778
4813
  const hasTitleRow = !!title || !!titleText || !!onClose;
4779
- const titleRow = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "row justify-between items-start gap-x-8", children: [
4814
+ const titleRow = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex-row-8 justify-between items-start", children: [
4780
4815
  title ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4781
4816
  "h2",
4782
4817
  {
@@ -4788,7 +4823,7 @@ var OverlayHeader = ({
4788
4823
  ),
4789
4824
  !!onClose && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react4.X, { className: "w-full h-full" }) }) })
4790
4825
  ] });
4791
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "col", children: [
4826
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex-col-2", children: [
4792
4827
  hasTitleRow && titleRow,
4793
4828
  description ?? (descriptionText && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "textstyle-description", children: descriptionText }))
4794
4829
  ] });
@@ -4801,8 +4836,8 @@ var Modal = ({
4801
4836
  backgroundClassName,
4802
4837
  headerProps
4803
4838
  }) => {
4804
- const ref = (0, import_react9.useRef)(null);
4805
- (0, import_react9.useEffect)(() => {
4839
+ const ref = (0, import_react10.useRef)(null);
4840
+ (0, import_react10.useEffect)(() => {
4806
4841
  if (!isOpen) return;
4807
4842
  const modal = ref.current;
4808
4843
  if (!modal) {
@@ -4851,7 +4886,7 @@ var Modal = ({
4851
4886
  ref,
4852
4887
  tabIndex: -1,
4853
4888
  className: (0, import_clsx11.default)(
4854
- "fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
4889
+ "flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl animate-pop-in",
4855
4890
  className
4856
4891
  ),
4857
4892
  role: "dialog",
@@ -4872,8 +4907,8 @@ var Dialog = ({
4872
4907
  backgroundClassName,
4873
4908
  headerProps
4874
4909
  }) => {
4875
- const ref = (0, import_react9.useRef)(null);
4876
- (0, import_react9.useEffect)(() => {
4910
+ const ref = (0, import_react10.useRef)(null);
4911
+ (0, import_react10.useEffect)(() => {
4877
4912
  if (!isOpen) return;
4878
4913
  const dialog = ref.current;
4879
4914
  if (!dialog) {
@@ -4920,7 +4955,7 @@ var Dialog = ({
4920
4955
  ref,
4921
4956
  tabIndex: -1,
4922
4957
  className: (0, import_clsx11.default)(
4923
- "fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
4958
+ "flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl animate-pop-in",
4924
4959
  className
4925
4960
  ),
4926
4961
  role: "dialog",
@@ -4955,8 +4990,8 @@ var ConfirmDialog = ({
4955
4990
  primary: "primary"
4956
4991
  };
4957
4992
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Dialog, { ...restProps, className: (0, import_clsx12.default)("justify-between", className), children: [
4958
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "col grow", children }),
4959
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "row mt-3 gap-x-4 justify-end", children: [
4993
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-col-2 grow", children }),
4994
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
4960
4995
  onDecline && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
4961
4996
  SolidButton,
4962
4997
  {
@@ -5031,7 +5066,7 @@ var AvatarGroup = ({
5031
5066
  const stackingOverlap = 0.5;
5032
5067
  const notDisplayedProfiles = avatars.length - maxShownProfiles;
5033
5068
  const avatarGroupWidth = diameter * (stackingOverlap * (displayedProfiles.length - 1) + 1);
5034
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "row relative", style: { height: diameter + "px" }, children: [
5069
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex-row-2 relative", style: { height: diameter + "px" }, children: [
5035
5070
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { width: avatarGroupWidth + "px" }, children: displayedProfiles.map((avatar, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5036
5071
  "div",
5037
5072
  {
@@ -5044,7 +5079,7 @@ var AvatarGroup = ({
5044
5079
  notDisplayedProfiles > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5045
5080
  "div",
5046
5081
  {
5047
- className: "truncate row items-center",
5082
+ className: "flex-row-2 truncate items-center",
5048
5083
  style: { fontSize: diameter / 2 + "px", marginLeft: 1 + diameter / 16 + "px" },
5049
5084
  children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
5050
5085
  "+ ",
@@ -5080,7 +5115,7 @@ var Circle = ({
5080
5115
  };
5081
5116
 
5082
5117
  // src/components/icons-and-geometry/Ring.tsx
5083
- var import_react10 = require("react");
5118
+ var import_react11 = require("react");
5084
5119
  var import_clsx15 = __toESM(require("clsx"));
5085
5120
  var import_jsx_runtime17 = require("react/jsx-runtime");
5086
5121
  var Ring = ({
@@ -5109,9 +5144,9 @@ var AnimatedRing = ({
5109
5144
  onAnimationFinished = noop,
5110
5145
  style
5111
5146
  }) => {
5112
- const [currentWidth, setCurrentWidth] = (0, import_react10.useState)(0);
5147
+ const [currentWidth, setCurrentWidth] = (0, import_react11.useState)(0);
5113
5148
  const milliseconds = 1e3 * fillAnimationDuration;
5114
- const animate = (0, import_react10.useCallback)((timestamp, startTime) => {
5149
+ const animate = (0, import_react11.useCallback)((timestamp, startTime) => {
5115
5150
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
5116
5151
  const newWidth = Math.min(width * progress, width);
5117
5152
  setCurrentWidth(newWidth);
@@ -5125,7 +5160,7 @@ var AnimatedRing = ({
5125
5160
  }
5126
5161
  }
5127
5162
  }, [milliseconds, onAnimationFinished, repeating, width]);
5128
- (0, import_react10.useEffect)(() => {
5163
+ (0, import_react11.useEffect)(() => {
5129
5164
  if (currentWidth < width) {
5130
5165
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
5131
5166
  }
@@ -5133,7 +5168,7 @@ var AnimatedRing = ({
5133
5168
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5134
5169
  "div",
5135
5170
  {
5136
- className: "row items-center justify-center",
5171
+ className: "flex-row-2 items-center justify-center",
5137
5172
  style: {
5138
5173
  width: `${innerSize + 2 * width}px`,
5139
5174
  height: `${innerSize + 2 * width}px`,
@@ -5160,10 +5195,10 @@ var RingWave = ({
5160
5195
  onAnimationFinished = noop,
5161
5196
  style
5162
5197
  }) => {
5163
- const [currentInnerSize, setCurrentInnerSize] = (0, import_react10.useState)(startInnerSize);
5198
+ const [currentInnerSize, setCurrentInnerSize] = (0, import_react11.useState)(startInnerSize);
5164
5199
  const distance = endInnerSize - startInnerSize;
5165
5200
  const milliseconds = 1e3 * fillAnimationDuration;
5166
- const animate = (0, import_react10.useCallback)((timestamp, startTime) => {
5201
+ const animate = (0, import_react11.useCallback)((timestamp, startTime) => {
5167
5202
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
5168
5203
  const newInnerSize = Math.min(
5169
5204
  startInnerSize + distance * progress,
@@ -5180,7 +5215,7 @@ var RingWave = ({
5180
5215
  }
5181
5216
  }
5182
5217
  }, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
5183
- (0, import_react10.useEffect)(() => {
5218
+ (0, import_react11.useEffect)(() => {
5184
5219
  if (currentInnerSize < endInnerSize) {
5185
5220
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
5186
5221
  }
@@ -5188,7 +5223,7 @@ var RingWave = ({
5188
5223
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5189
5224
  "div",
5190
5225
  {
5191
- className: "row items-center justify-center",
5226
+ className: "flex-row-2 items-center justify-center",
5192
5227
  style: {
5193
5228
  width: `${endInnerSize + 2 * width}px`,
5194
5229
  height: `${endInnerSize + 2 * width}px`,
@@ -5215,7 +5250,7 @@ var RadialRings = ({
5215
5250
  sizeCircle2 = 200,
5216
5251
  sizeCircle3 = 300
5217
5252
  }) => {
5218
- const [currentRing, setCurrentRing] = (0, import_react10.useState)(0);
5253
+ const [currentRing, setCurrentRing] = (0, import_react11.useState)(0);
5219
5254
  const size = sizeCircle3;
5220
5255
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5221
5256
  "div",
@@ -5368,7 +5403,7 @@ var import_clsx16 = __toESM(require("clsx"));
5368
5403
  var import_jsx_runtime19 = require("react/jsx-runtime");
5369
5404
  var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
5370
5405
  const color = "text-description";
5371
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx16.default)("row gap-x-0", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
5406
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx16.default)("flex-row-0", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
5372
5407
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
5373
5408
  import_link.default,
5374
5409
  {
@@ -5382,7 +5417,7 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
5382
5417
  };
5383
5418
 
5384
5419
  // src/components/layout-and-navigation/Carousel.tsx
5385
- var import_react11 = require("react");
5420
+ var import_react12 = require("react");
5386
5421
  var import_clsx17 = __toESM(require("clsx"));
5387
5422
  var import_lucide_react5 = require("lucide-react");
5388
5423
 
@@ -5514,15 +5549,15 @@ var Carousel = ({
5514
5549
  currentPosition,
5515
5550
  dragState,
5516
5551
  animationState
5517
- }, setCarouselInformation] = (0, import_react11.useState)({
5552
+ }, setCarouselInformation] = (0, import_react12.useState)({
5518
5553
  currentPosition: 0
5519
5554
  });
5520
- const animationId = (0, import_react11.useRef)(void 0);
5521
- const timeOut = (0, import_react11.useRef)(void 0);
5555
+ const animationId = (0, import_react12.useRef)(void 0);
5556
+ const timeOut = (0, import_react12.useRef)(void 0);
5522
5557
  autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
5523
5558
  const length = children.length;
5524
5559
  const paddingItemCount = 3;
5525
- const util = (0, import_react11.useMemo)(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
5560
+ const util = (0, import_react12.useMemo)(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
5526
5561
  const currentIndex = util.getCorrectedPosition(LoopingArrayCalculator.withoutOffset(currentPosition));
5527
5562
  animationTime = Math.max(200, animationTime);
5528
5563
  autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
@@ -5530,7 +5565,7 @@ var Carousel = ({
5530
5565
  const baseOffset = -50 + (index - currentPosition) * 100;
5531
5566
  return `${baseOffset}%`;
5532
5567
  };
5533
- const animation = (0, import_react11.useCallback)((time) => {
5568
+ const animation = (0, import_react12.useCallback)((time) => {
5534
5569
  let keepAnimating = true;
5535
5570
  setCarouselInformation((state) => {
5536
5571
  const {
@@ -5575,7 +5610,7 @@ var Carousel = ({
5575
5610
  animationId.current = requestAnimationFrame((time1) => animation(time1));
5576
5611
  }
5577
5612
  }, [animationTime, autoLoopAnimationTime, util]);
5578
- (0, import_react11.useEffect)(() => {
5613
+ (0, import_react12.useEffect)(() => {
5579
5614
  if (animationState) {
5580
5615
  animationId.current = requestAnimationFrame(animation);
5581
5616
  }
@@ -5597,7 +5632,7 @@ var Carousel = ({
5597
5632
  isAutoLooping: true
5598
5633
  }
5599
5634
  }));
5600
- (0, import_react11.useEffect)(() => {
5635
+ (0, import_react12.useEffect)(() => {
5601
5636
  if (!animationId.current && !animationState && !dragState && !timeOut.current) {
5602
5637
  if (autoLoopingTimeOut > 0) {
5603
5638
  timeOut.current = setTimeout(() => {
@@ -5729,7 +5764,7 @@ var Carousel = ({
5729
5764
  onTouchEnd: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width),
5730
5765
  onTouchCancel: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width)
5731
5766
  };
5732
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "col items-center w-full gap-y-2", children: [
5767
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex-col-2 items-center w-full", children: [
5733
5768
  /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_clsx17.default)(`relative w-full overflow-hidden`, heightClassName, className), children: [
5734
5769
  arrows && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
5735
5770
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
@@ -5753,8 +5788,8 @@ var Carousel = ({
5753
5788
  }
5754
5789
  )
5755
5790
  ] }),
5756
- hintNext ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_clsx17.default)(`relative row h-full`, heightClassName), children: [
5757
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative row h-full w-full px-2 overflow-hidden", children: items.map(({
5791
+ hintNext ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_clsx17.default)(`flex-row-2 relative h-full`, heightClassName), children: [
5792
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex-row-2 relative h-full w-full px-2 overflow-hidden", children: items.map(({
5758
5793
  item,
5759
5794
  index
5760
5795
  }, listIndex) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
@@ -5785,7 +5820,7 @@ var Carousel = ({
5785
5820
  dots && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5786
5821
  "div",
5787
5822
  {
5788
- className: "row items-center justify-center w-full my-2",
5823
+ className: "flex-row-2 items-center justify-center w-full my-2",
5789
5824
  children: range(length).map((index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
5790
5825
  "button",
5791
5826
  {
@@ -5855,7 +5890,7 @@ var ChipList = ({
5855
5890
  list,
5856
5891
  className = ""
5857
5892
  }) => {
5858
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_clsx18.default)("flex flex-wrap gap-x-4 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5893
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_clsx18.default)("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5859
5894
  Chip,
5860
5895
  {
5861
5896
  ...value,
@@ -5891,7 +5926,6 @@ var DividerInserter = ({
5891
5926
 
5892
5927
  // src/components/layout-and-navigation/FAQSection.tsx
5893
5928
  var import_clsx20 = __toESM(require("clsx"));
5894
- var import_lucide_react6 = require("lucide-react");
5895
5929
 
5896
5930
  // src/components/layout-and-navigation/MarkdownInterpreter.tsx
5897
5931
  var import_jsx_runtime23 = require("react/jsx-runtime");
@@ -6130,14 +6164,13 @@ var FAQSection = ({
6130
6164
  entries,
6131
6165
  expandableClassName
6132
6166
  }) => {
6133
- const chevronSize = 28;
6134
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "col gap-y-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6167
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex-col-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
6135
6168
  ExpandableUncontrolled,
6136
6169
  {
6137
6170
  ...restProps,
6138
6171
  label: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { id, className: "textstyle-title-md", children: title }),
6139
6172
  clickOnlyOnHeader: false,
6140
- icon: (expanded) => expanded ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react6.ChevronUp, { size: chevronSize, className: "text-primary", style: { minWidth: `${chevronSize}px` } }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react6.ChevronDown, { size: chevronSize, className: "text-primary" }),
6173
+ icon: (expanded) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ExpansionIcon, { isExpanded: expanded, className: "text-primary" }),
6141
6174
  className: (0, import_clsx20.default)("rounded-xl", expandableClassName),
6142
6175
  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mt-2", children: content.type === "markdown" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MarkdownInterpreter, { text: content.value }) : content.value })
6143
6176
  },
@@ -6146,21 +6179,21 @@ var FAQSection = ({
6146
6179
  };
6147
6180
 
6148
6181
  // src/components/layout-and-navigation/Pagination.tsx
6149
- var import_lucide_react7 = require("lucide-react");
6182
+ var import_lucide_react6 = require("lucide-react");
6150
6183
  var import_clsx23 = __toESM(require("clsx"));
6151
6184
 
6152
6185
  // src/components/user-action/Input.tsx
6153
- var import_react15 = require("react");
6186
+ var import_react16 = require("react");
6154
6187
  var import_clsx22 = __toESM(require("clsx"));
6155
6188
 
6156
6189
  // src/hooks/useDelay.ts
6157
- var import_react12 = require("react");
6190
+ var import_react13 = require("react");
6158
6191
  var defaultOptions = {
6159
6192
  delay: 3e3,
6160
6193
  disabled: false
6161
6194
  };
6162
6195
  function useDelay(options) {
6163
- const [timer, setTimer] = (0, import_react12.useState)(void 0);
6196
+ const [timer, setTimer] = (0, import_react13.useState)(void 0);
6164
6197
  const { delay, disabled } = {
6165
6198
  ...defaultOptions,
6166
6199
  ...options
@@ -6179,12 +6212,12 @@ function useDelay(options) {
6179
6212
  setTimer(void 0);
6180
6213
  }, delay));
6181
6214
  };
6182
- (0, import_react12.useEffect)(() => {
6215
+ (0, import_react13.useEffect)(() => {
6183
6216
  return () => {
6184
6217
  clearTimeout(timer);
6185
6218
  };
6186
6219
  }, [timer]);
6187
- (0, import_react12.useEffect)(() => {
6220
+ (0, import_react13.useEffect)(() => {
6188
6221
  if (disabled) {
6189
6222
  clearTimeout(timer);
6190
6223
  setTimer(void 0);
@@ -6212,9 +6245,9 @@ var Label = ({
6212
6245
  };
6213
6246
 
6214
6247
  // src/hooks/useFocusManagement.ts
6215
- var import_react13 = require("react");
6248
+ var import_react14 = require("react");
6216
6249
  function useFocusManagement() {
6217
- const getFocusableElements = (0, import_react13.useCallback)(() => {
6250
+ const getFocusableElements = (0, import_react14.useCallback)(() => {
6218
6251
  return Array.from(
6219
6252
  document.querySelectorAll(
6220
6253
  'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
@@ -6223,7 +6256,7 @@ function useFocusManagement() {
6223
6256
  (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
6224
6257
  );
6225
6258
  }, []);
6226
- const getNextFocusElement = (0, import_react13.useCallback)(() => {
6259
+ const getNextFocusElement = (0, import_react14.useCallback)(() => {
6227
6260
  const elements = getFocusableElements();
6228
6261
  if (elements.length === 0) {
6229
6262
  return void 0;
@@ -6235,11 +6268,11 @@ function useFocusManagement() {
6235
6268
  }
6236
6269
  return nextElement;
6237
6270
  }, [getFocusableElements]);
6238
- const focusNext = (0, import_react13.useCallback)(() => {
6271
+ const focusNext = (0, import_react14.useCallback)(() => {
6239
6272
  const nextElement = getNextFocusElement();
6240
6273
  nextElement?.focus();
6241
6274
  }, [getNextFocusElement]);
6242
- const getPreviousFocusElement = (0, import_react13.useCallback)(() => {
6275
+ const getPreviousFocusElement = (0, import_react14.useCallback)(() => {
6243
6276
  const elements = getFocusableElements();
6244
6277
  if (elements.length === 0) {
6245
6278
  return void 0;
@@ -6255,7 +6288,7 @@ function useFocusManagement() {
6255
6288
  }
6256
6289
  return previousElement;
6257
6290
  }, [getFocusableElements]);
6258
- const focusPrevious = (0, import_react13.useCallback)(() => {
6291
+ const focusPrevious = (0, import_react14.useCallback)(() => {
6259
6292
  const previousElement = getPreviousFocusElement();
6260
6293
  if (previousElement) previousElement.focus();
6261
6294
  }, [getPreviousFocusElement]);
@@ -6269,10 +6302,10 @@ function useFocusManagement() {
6269
6302
  }
6270
6303
 
6271
6304
  // src/hooks/useFocusOnceVisible.ts
6272
- var import_react14 = __toESM(require("react"));
6305
+ var import_react15 = __toESM(require("react"));
6273
6306
  var useFocusOnceVisible = (ref, disable = false) => {
6274
- const [hasUsedFocus, setHasUsedFocus] = import_react14.default.useState(false);
6275
- (0, import_react14.useEffect)(() => {
6307
+ const [hasUsedFocus, setHasUsedFocus] = import_react15.default.useState(false);
6308
+ (0, import_react15.useEffect)(() => {
6276
6309
  if (disable || hasUsedFocus) {
6277
6310
  return;
6278
6311
  }
@@ -6308,7 +6341,7 @@ var defaultEditCompleteOptions = {
6308
6341
  afterDelay: true,
6309
6342
  delay: 2500
6310
6343
  };
6311
- var Input = (0, import_react15.forwardRef)(function Input2({
6344
+ var Input = (0, import_react16.forwardRef)(function Input2({
6312
6345
  id,
6313
6346
  type = "text",
6314
6347
  value,
@@ -6331,10 +6364,10 @@ var Input = (0, import_react15.forwardRef)(function Input2({
6331
6364
  restartTimer,
6332
6365
  clearTimer
6333
6366
  } = useDelay({ delay, disabled: !afterDelay });
6334
- const innerRef = (0, import_react15.useRef)(null);
6367
+ const innerRef = (0, import_react16.useRef)(null);
6335
6368
  const { focusNext } = useFocusManagement();
6336
6369
  useFocusOnceVisible(innerRef, !autoFocus);
6337
- (0, import_react15.useImperativeHandle)(forwardedRef, () => innerRef.current);
6370
+ (0, import_react16.useImperativeHandle)(forwardedRef, () => innerRef.current);
6338
6371
  const handleKeyDown = (e) => {
6339
6372
  if (e.key === "Enter" && !e.shiftKey) {
6340
6373
  e.preventDefault();
@@ -6388,8 +6421,8 @@ var InputUncontrolled = ({
6388
6421
  onChangeText = noop,
6389
6422
  ...props
6390
6423
  }) => {
6391
- const [usedValue, setUsedValue] = (0, import_react15.useState)(value);
6392
- (0, import_react15.useEffect)(() => {
6424
+ const [usedValue, setUsedValue] = (0, import_react16.useState)(value);
6425
+ (0, import_react16.useEffect)(() => {
6393
6426
  setUsedValue(value);
6394
6427
  }, [value]);
6395
6428
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
@@ -6404,7 +6437,7 @@ var InputUncontrolled = ({
6404
6437
  }
6405
6438
  );
6406
6439
  };
6407
- var FormInput = (0, import_react15.forwardRef)(function FormInput2({
6440
+ var FormInput = (0, import_react16.forwardRef)(function FormInput2({
6408
6441
  id,
6409
6442
  labelText,
6410
6443
  errorText,
@@ -6440,7 +6473,7 @@ var FormInput = (0, import_react15.forwardRef)(function FormInput2({
6440
6473
  });
6441
6474
 
6442
6475
  // src/components/layout-and-navigation/Pagination.tsx
6443
- var import_react16 = require("react");
6476
+ var import_react17 = require("react");
6444
6477
  var import_jsx_runtime27 = require("react/jsx-runtime");
6445
6478
  var Pagination = ({
6446
6479
  overwriteTranslation,
@@ -6451,11 +6484,11 @@ var Pagination = ({
6451
6484
  style
6452
6485
  }) => {
6453
6486
  const translation = useTranslation([formTranslation], overwriteTranslation);
6454
- const [value, setValue] = (0, import_react16.useState)((pageIndex + 1).toString());
6487
+ const [value, setValue] = (0, import_react17.useState)((pageIndex + 1).toString());
6455
6488
  const noPages = pageCount === 0;
6456
6489
  const onFirstPage = pageIndex === 0 && !noPages;
6457
6490
  const onLastPage = pageIndex === pageCount - 1;
6458
- (0, import_react16.useEffect)(() => {
6491
+ (0, import_react17.useEffect)(() => {
6459
6492
  if (noPages) {
6460
6493
  setValue("0");
6461
6494
  } else {
@@ -6465,10 +6498,10 @@ var Pagination = ({
6465
6498
  const changePage = (page) => {
6466
6499
  onPageChanged(page);
6467
6500
  };
6468
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_clsx23.default)("row gap-x-1", className), style, children: [
6469
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronFirst, {}) }),
6470
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronLeft, {}) }),
6471
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "row min-w-56 gap-x-2 items-center justify-center mx-2 text-center", children: [
6501
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_clsx23.default)("flex-row-1", className), style, children: [
6502
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react6.ChevronFirst, {}) }),
6503
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react6.ChevronLeft, {}) }),
6504
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
6472
6505
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6473
6506
  Input,
6474
6507
  {
@@ -6498,27 +6531,30 @@ var Pagination = ({
6498
6531
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6499
6532
  "span",
6500
6533
  {
6501
- className: "row flex-1 items-center justify-center select-none h-10 bg-surface text-on-surface rounded-md font-bold",
6534
+ className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-surface text-on-surface rounded-md font-bold",
6502
6535
  children: pageCount
6503
6536
  }
6504
6537
  )
6505
6538
  ] }),
6506
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronRight, {}) }),
6507
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronLast, {}) })
6539
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react6.ChevronRight, {}) }),
6540
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react6.ChevronLast, {}) })
6508
6541
  ] });
6509
6542
  };
6510
6543
 
6511
6544
  // src/components/layout-and-navigation/SearchableList.tsx
6512
- var import_lucide_react8 = require("lucide-react");
6545
+ var import_lucide_react7 = require("lucide-react");
6513
6546
  var import_clsx24 = __toESM(require("clsx"));
6514
6547
 
6515
6548
  // src/hooks/useSearch.ts
6516
- var import_react17 = require("react");
6549
+ var import_react18 = require("react");
6517
6550
 
6518
6551
  // src/util/simpleSearch.ts
6519
6552
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
6520
6553
  return objects.filter((object) => {
6521
- const mappedSearchKeywords = mapping(object).map((value) => value ? value.toLowerCase().trim() : void 0);
6554
+ const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
6555
+ if (!mappedSearchKeywords) {
6556
+ return true;
6557
+ }
6522
6558
  return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
6523
6559
  });
6524
6560
  };
@@ -6542,22 +6578,51 @@ var SimpleSearch = (search, objects) => {
6542
6578
  var useSearch = ({
6543
6579
  list,
6544
6580
  initialSearch,
6545
- searchMapping
6581
+ searchMapping,
6582
+ additionalSearchTags,
6583
+ isSearchInstant = true,
6584
+ sortingFunction,
6585
+ filter,
6586
+ disabled = false
6546
6587
  }) => {
6547
- const [items, setItems] = (0, import_react17.useState)(list);
6548
- const [search, setSearch] = (0, import_react17.useState)(initialSearch);
6549
- (0, import_react17.useEffect)(() => {
6550
- setItems(list);
6551
- }, [list]);
6552
- const result = (0, import_react17.useMemo)(
6553
- () => MultiSearchWithMapping(search, items, searchMapping),
6554
- [search, items, searchMapping]
6555
- );
6588
+ const [search, setSearch] = (0, import_react18.useState)(initialSearch ?? "");
6589
+ const [result, setResult] = (0, import_react18.useState)(list);
6590
+ const searchTags = (0, import_react18.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
6591
+ const updateSearch = (0, import_react18.useCallback)((newSearch) => {
6592
+ const usedSearch = newSearch ?? search;
6593
+ if (newSearch) {
6594
+ setSearch(search);
6595
+ }
6596
+ setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
6597
+ }, [searchTags, list, search, searchMapping]);
6598
+ (0, import_react18.useEffect)(() => {
6599
+ if (isSearchInstant) {
6600
+ setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
6601
+ }
6602
+ }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
6603
+ const filteredResult = (0, import_react18.useMemo)(() => {
6604
+ if (!filter) {
6605
+ return result;
6606
+ }
6607
+ return result.filter(filter);
6608
+ }, [result, filter]);
6609
+ const sortedAndFilteredResult = (0, import_react18.useMemo)(() => {
6610
+ if (!sortingFunction) {
6611
+ return filteredResult;
6612
+ }
6613
+ return filteredResult.sort(sortingFunction);
6614
+ }, [filteredResult, sortingFunction]);
6615
+ const usedResult = (0, import_react18.useMemo)(() => {
6616
+ if (!disabled) {
6617
+ return sortedAndFilteredResult;
6618
+ }
6619
+ return list;
6620
+ }, [disabled, list, sortedAndFilteredResult]);
6556
6621
  return {
6557
- result,
6558
- hasResult: result.length > 0,
6559
- allItems: items,
6560
- setItems,
6622
+ result: usedResult,
6623
+ hasResult: usedResult.length > 0,
6624
+ allItems: list,
6625
+ updateSearch,
6561
6626
  search,
6562
6627
  setSearch
6563
6628
  };
@@ -6585,9 +6650,9 @@ var SearchableList = ({
6585
6650
  resultListClassName
6586
6651
  }) => {
6587
6652
  const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
6588
- const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
6589
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_clsx24.default)("col gap-y-2", className), children: [
6590
- list.length > minimumItemsForSearch && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "row justify-between gap-x-4 items-center", children: [
6653
+ const { result, hasResult, search, setSearch, updateSearch } = useSearch({ list, initialSearch, searchMapping });
6654
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_clsx24.default)("flex-col-2", className), children: [
6655
+ list.length > minimumItemsForSearch && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex-row-2 justify-between items-center", children: [
6591
6656
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6592
6657
  Input,
6593
6658
  {
@@ -6598,16 +6663,16 @@ var SearchableList = ({
6598
6663
  className: "w-full"
6599
6664
  }
6600
6665
  ),
6601
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react8.Search, { className: "w-full h-full" }) })
6666
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconButton, { color: "neutral", onClick: () => updateSearch(), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react7.Search, { className: "w-full h-full" }) })
6602
6667
  ] }),
6603
- hasResult ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx24.default)("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "row text-description py-2 px-2", children: translation("nothingFound") })
6668
+ hasResult ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx24.default)("flex-col-1 overflow-y-auto", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-row-2 text-description py-2 px-2", children: translation("nothingFound") })
6604
6669
  ] });
6605
6670
  };
6606
6671
 
6607
6672
  // src/components/layout-and-navigation/StepperBar.tsx
6608
- var import_lucide_react9 = require("lucide-react");
6673
+ var import_lucide_react8 = require("lucide-react");
6609
6674
  var import_clsx25 = __toESM(require("clsx"));
6610
- var import_react18 = require("react");
6675
+ var import_react19 = require("react");
6611
6676
  var import_jsx_runtime29 = require("react/jsx-runtime");
6612
6677
  var defaultState = {
6613
6678
  currentStep: 0,
@@ -6634,23 +6699,23 @@ var StepperBar = ({
6634
6699
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6635
6700
  "div",
6636
6701
  {
6637
- className: (0, import_clsx25.default)("row justify-between", className),
6702
+ className: (0, import_clsx25.default)("flex-row-2 justify-between", className),
6638
6703
  children: [
6639
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6704
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6640
6705
  SolidButton,
6641
6706
  {
6642
6707
  disabled: currentStep === 0 || disabledSteps.has(currentStep),
6643
6708
  onClick: () => {
6644
6709
  update(currentStep - 1);
6645
6710
  },
6646
- className: "row gap-x-1 items-center justify-center",
6711
+ className: "flex-row-1 items-center justify-center",
6647
6712
  children: [
6648
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.ChevronLeft, { size: 14 }),
6713
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.ChevronLeft, { size: 14 }),
6649
6714
  translation("back")
6650
6715
  ]
6651
6716
  }
6652
6717
  ) }),
6653
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[5] gap-x-2 justify-center items-center", children: showDots && dots.map((value, index) => {
6718
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-row-2 flex-[5] justify-center items-center", children: showDots && dots.map((value, index) => {
6654
6719
  const seen = seenSteps.has(index);
6655
6720
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6656
6721
  "div",
@@ -6672,26 +6737,26 @@ var StepperBar = ({
6672
6737
  index
6673
6738
  );
6674
6739
  }) }),
6675
- currentStep !== numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6740
+ currentStep !== numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6676
6741
  SolidButton,
6677
6742
  {
6678
6743
  onClick: () => update(currentStep + 1),
6679
- className: "row gap-x-1 items-center justify-center",
6744
+ className: "flex-row-1 items-center justify-center",
6680
6745
  disabled: disabledSteps.has(currentStep),
6681
6746
  children: [
6682
6747
  translation("next"),
6683
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.ChevronRight, { size: 14 })
6748
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.ChevronRight, { size: 14 })
6684
6749
  ]
6685
6750
  }
6686
6751
  ) }),
6687
- currentStep === numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6752
+ currentStep === numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
6688
6753
  SolidButton,
6689
6754
  {
6690
6755
  disabled: disabledSteps.has(currentStep),
6691
6756
  onClick: onFinish,
6692
- className: "row gap-x-1 items-center justify-center",
6757
+ className: "flex-row-1 items-center justify-center",
6693
6758
  children: [
6694
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.Check, { size: 14 }),
6759
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.Check, { size: 14 }),
6695
6760
  finishText ?? translation("confirm")
6696
6761
  ]
6697
6762
  }
@@ -6701,8 +6766,8 @@ var StepperBar = ({
6701
6766
  );
6702
6767
  };
6703
6768
  var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
6704
- const [usedState, setUsedState] = (0, import_react18.useState)(state ?? defaultState);
6705
- (0, import_react18.useEffect)(() => {
6769
+ const [usedState, setUsedState] = (0, import_react19.useState)(state ?? defaultState);
6770
+ (0, import_react19.useEffect)(() => {
6706
6771
  setUsedState(state ?? defaultState);
6707
6772
  }, [state]);
6708
6773
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
@@ -6754,14 +6819,14 @@ var TextImage = ({
6754
6819
  children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
6755
6820
  "div",
6756
6821
  {
6757
- className: (0, import_clsx26.default)(`col px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
6822
+ className: (0, import_clsx26.default)(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
6758
6823
  children: [
6759
6824
  badge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: (0, import_clsx26.default)(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-lg font-bold", children: badge }) }),
6760
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "col gap-y-1 overflow-hidden", children: [
6825
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex-col-1 overflow-hidden", children: [
6761
6826
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "textstyle-title-xl", children: title }),
6762
6827
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-ellipsis overflow-hidden", children: description })
6763
6828
  ] }),
6764
- onShowMoreClicked && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "row mt-2 underline", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
6829
+ onShowMoreClicked && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex-row-2 mt-2 underline", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
6765
6830
  ]
6766
6831
  }
6767
6832
  )
@@ -6823,7 +6888,7 @@ var VerticalDivider = ({
6823
6888
  };
6824
6889
 
6825
6890
  // src/components/loading-states/ErrorComponent.tsx
6826
- var import_lucide_react10 = require("lucide-react");
6891
+ var import_lucide_react9 = require("lucide-react");
6827
6892
  var import_clsx27 = __toESM(require("clsx"));
6828
6893
  var import_jsx_runtime32 = require("react/jsx-runtime");
6829
6894
  var defaultErrorComponentTranslation = {
@@ -6840,42 +6905,36 @@ var ErrorComponent = ({
6840
6905
  classname
6841
6906
  }) => {
6842
6907
  const translation = useTranslation([defaultErrorComponentTranslation], overwriteTranslation);
6843
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: (0, import_clsx27.default)("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
6844
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react10.AlertOctagon, { size: 64, className: "text-warning" }),
6908
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: (0, import_clsx27.default)("flex-col-4 items-center justify-center w-full h-24", classname), children: [
6909
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.AlertOctagon, { size: 64, className: "text-warning" }),
6845
6910
  errorText ?? `${translation("errorOccurred")} :(`
6846
6911
  ] });
6847
6912
  };
6848
6913
 
6849
6914
  // src/components/loading-states/LoadingAndErrorComponent.tsx
6850
- var import_react19 = require("react");
6915
+ var import_react20 = require("react");
6851
6916
 
6852
- // src/components/loading-states/LoadingAnimation.tsx
6853
- var import_clsx28 = __toESM(require("clsx"));
6917
+ // src/components/loading-states/LoadingContainer.tsx
6918
+ var import_clsx28 = require("clsx");
6854
6919
  var import_jsx_runtime33 = require("react/jsx-runtime");
6855
- var LoadingAnimation = ({
6856
- overwriteTranslation,
6857
- loadingText,
6858
- classname
6859
- }) => {
6860
- const translation = useTranslation([formTranslation], overwriteTranslation);
6861
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0, import_clsx28.default)("col items-center justify-center w-full h-24", classname), children: [
6862
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Helpwave, { animate: "loading" }),
6863
- loadingText ?? `${translation("loading")}...`
6864
- ] });
6920
+ var LoadingContainer = ({ className }) => {
6921
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: (0, import_clsx28.clsx)("relative overflow-hidden shimmer bg-disabled-background rounded-md", className) });
6865
6922
  };
6866
6923
 
6867
6924
  // src/components/loading-states/LoadingAndErrorComponent.tsx
6925
+ var import_clsx29 = require("clsx");
6868
6926
  var import_jsx_runtime34 = require("react/jsx-runtime");
6869
6927
  var LoadingAndErrorComponent = ({
6870
6928
  children,
6871
6929
  isLoading = false,
6872
6930
  hasError = false,
6873
- errorProps,
6874
- loadingProps,
6875
- minimumLoadingDuration
6931
+ loadingComponent,
6932
+ errorComponent,
6933
+ minimumLoadingDuration,
6934
+ className
6876
6935
  }) => {
6877
- const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react19.useState)(false);
6878
- const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react19.useState)(false);
6936
+ const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react20.useState)(false);
6937
+ const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react20.useState)(false);
6879
6938
  if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
6880
6939
  setIsInMinimumLoading(true);
6881
6940
  setTimeout(() => {
@@ -6884,27 +6943,42 @@ var LoadingAndErrorComponent = ({
6884
6943
  }, minimumLoadingDuration);
6885
6944
  }
6886
6945
  if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
6887
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadingAnimation, { ...loadingProps });
6946
+ return loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)(className) });
6888
6947
  }
6889
6948
  if (hasError) {
6890
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ErrorComponent, { ...errorProps });
6949
+ return errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)("bg-negative", className) });
6891
6950
  }
6892
6951
  return children;
6893
6952
  };
6894
6953
 
6895
- // src/components/loading-states/LoadingButton.tsx
6896
- var import_clsx29 = __toESM(require("clsx"));
6954
+ // src/components/loading-states/LoadingAnimation.tsx
6955
+ var import_clsx30 = __toESM(require("clsx"));
6897
6956
  var import_jsx_runtime35 = require("react/jsx-runtime");
6957
+ var LoadingAnimation = ({
6958
+ overwriteTranslation,
6959
+ loadingText,
6960
+ classname
6961
+ }) => {
6962
+ const translation = useTranslation([formTranslation], overwriteTranslation);
6963
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: (0, import_clsx30.default)("flex-col-2 items-center justify-center w-full h-24", classname), children: [
6964
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Helpwave, { animate: "loading" }),
6965
+ loadingText ?? `${translation("loading")}...`
6966
+ ] });
6967
+ };
6968
+
6969
+ // src/components/loading-states/LoadingButton.tsx
6970
+ var import_clsx31 = __toESM(require("clsx"));
6971
+ var import_jsx_runtime36 = require("react/jsx-runtime");
6898
6972
  var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
6899
6973
  const paddingClass = ButtonUtil.paddingMapping[size];
6900
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "inline-block relative", children: [
6901
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: (0, import_clsx29.default)("absolute inset-0 row items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Helpwave, { animate: "loading", className: "text-white" }) }),
6902
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
6974
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "inline-block relative", children: [
6975
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: (0, import_clsx31.default)("flex-row-2 absolute inset-0 items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Helpwave, { animate: "loading", className: "text-white" }) }),
6976
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
6903
6977
  ] });
6904
6978
  };
6905
6979
 
6906
6980
  // src/components/loading-states/ProgressIndicator.tsx
6907
- var import_jsx_runtime36 = require("react/jsx-runtime");
6981
+ var import_jsx_runtime37 = require("react/jsx-runtime");
6908
6982
  var sizeMapping = { small: 16, medium: 24, big: 48 };
6909
6983
  var ProgressIndicator = ({
6910
6984
  progress,
@@ -6921,7 +6995,7 @@ var ProgressIndicator = ({
6921
6995
  if (direction === "clockwise") {
6922
6996
  rotation += 360 * progress;
6923
6997
  }
6924
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
6998
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
6925
6999
  "svg",
6926
7000
  {
6927
7001
  style: {
@@ -6930,7 +7004,7 @@ var ProgressIndicator = ({
6930
7004
  transform: `rotate(${rotation}deg)`
6931
7005
  },
6932
7006
  children: [
6933
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7007
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6934
7008
  "circle",
6935
7009
  {
6936
7010
  cx: center,
@@ -6941,7 +7015,7 @@ var ProgressIndicator = ({
6941
7015
  className: "stroke-progress-indicator-fill"
6942
7016
  }
6943
7017
  ),
6944
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7018
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6945
7019
  "circle",
6946
7020
  {
6947
7021
  cx: center,
@@ -6960,8 +7034,8 @@ var ProgressIndicator = ({
6960
7034
  };
6961
7035
 
6962
7036
  // src/components/modals/ConfirmModal.tsx
6963
- var import_clsx30 = __toESM(require("clsx"));
6964
- var import_jsx_runtime37 = require("react/jsx-runtime");
7037
+ var import_clsx32 = __toESM(require("clsx"));
7038
+ var import_jsx_runtime38 = require("react/jsx-runtime");
6965
7039
  var ConfirmModal = ({
6966
7040
  overwriteTranslation,
6967
7041
  children,
@@ -6980,10 +7054,10 @@ var ConfirmModal = ({
6980
7054
  positive: "positive",
6981
7055
  primary: "primary"
6982
7056
  };
6983
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Modal, { ...restProps, onClose: onCancel, className: (0, import_clsx30.default)("justify-between", className), children: [
6984
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "col grow", children }),
6985
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "row mt-3 gap-x-4 justify-end", children: [
6986
- onCancel && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7057
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Modal, { ...restProps, onClose: onCancel, className: (0, import_clsx32.default)("justify-between", className), children: [
7058
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex-col-2 grow", children }),
7059
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
7060
+ onCancel && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
6987
7061
  SolidButton,
6988
7062
  {
6989
7063
  color: buttonOverwrites?.[0].color ?? "neutral",
@@ -6992,7 +7066,7 @@ var ConfirmModal = ({
6992
7066
  children: buttonOverwrites?.[0].text ?? translation("cancel")
6993
7067
  }
6994
7068
  ),
6995
- onDecline && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7069
+ onDecline && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
6996
7070
  SolidButton,
6997
7071
  {
6998
7072
  color: buttonOverwrites?.[1].color ?? "negative",
@@ -7001,7 +7075,7 @@ var ConfirmModal = ({
7001
7075
  children: buttonOverwrites?.[1].text ?? translation("decline")
7002
7076
  }
7003
7077
  ),
7004
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
7078
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7005
7079
  SolidButton,
7006
7080
  {
7007
7081
  autoFocus: true,
@@ -7016,7 +7090,7 @@ var ConfirmModal = ({
7016
7090
  };
7017
7091
 
7018
7092
  // src/components/modals/DiscardChangesModal.tsx
7019
- var import_jsx_runtime38 = require("react/jsx-runtime");
7093
+ var import_jsx_runtime39 = require("react/jsx-runtime");
7020
7094
  var DiscardChangesModal = ({
7021
7095
  overwriteTranslation,
7022
7096
  children,
@@ -7027,7 +7101,7 @@ var DiscardChangesModal = ({
7027
7101
  ...modalProps
7028
7102
  }) => {
7029
7103
  const translation = useTranslation([formTranslation], overwriteTranslation);
7030
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7104
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7031
7105
  ConfirmModal,
7032
7106
  {
7033
7107
  headerProps: {
@@ -7046,31 +7120,35 @@ var DiscardChangesModal = ({
7046
7120
  };
7047
7121
 
7048
7122
  // src/components/modals/InputModal.tsx
7049
- var import_jsx_runtime39 = require("react/jsx-runtime");
7123
+ var import_jsx_runtime40 = require("react/jsx-runtime");
7050
7124
  var InputModal = ({
7051
7125
  inputs,
7052
7126
  buttonOverwrites,
7053
7127
  ...restProps
7054
7128
  }) => {
7055
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7129
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7056
7130
  ConfirmModal,
7057
7131
  {
7058
7132
  buttonOverwrites,
7059
7133
  ...restProps,
7060
- children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Input, { ...inputProps }, `input ${index}`))
7134
+ children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Input, { ...inputProps }, `input ${index}`))
7061
7135
  }
7062
7136
  );
7063
7137
  };
7064
7138
 
7065
7139
  // src/components/user-action/Select.tsx
7066
- var import_lucide_react11 = require("lucide-react");
7067
- var import_react21 = require("react");
7068
- var import_clsx31 = __toESM(require("clsx"));
7140
+ var import_react23 = require("react");
7141
+ var import_react24 = require("react");
7142
+ var import_clsx35 = __toESM(require("clsx"));
7143
+
7144
+ // src/components/user-action/Menu.tsx
7145
+ var import_react22 = require("react");
7146
+ var import_clsx33 = __toESM(require("clsx"));
7069
7147
 
7070
7148
  // src/hooks/useOutsideClick.ts
7071
- var import_react20 = require("react");
7149
+ var import_react21 = require("react");
7072
7150
  var useOutsideClick = (refs, handler) => {
7073
- (0, import_react20.useEffect)(() => {
7151
+ (0, import_react21.useEffect)(() => {
7074
7152
  const listener = (event) => {
7075
7153
  if (event.target === null) return;
7076
7154
  if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
@@ -7087,117 +7165,339 @@ var useOutsideClick = (refs, handler) => {
7087
7165
  }, [refs, handler]);
7088
7166
  };
7089
7167
 
7090
- // src/components/user-action/Select.tsx
7091
- var import_jsx_runtime40 = require("react/jsx-runtime");
7092
- var Select = ({
7093
- value,
7094
- label,
7095
- options,
7096
- onChange,
7097
- hintText = "",
7098
- isDisabled,
7099
- isSearchEnabled = false,
7100
- className,
7101
- selectedDisplayOverwrite
7102
- }) => {
7103
- const triggerRef = (0, import_react21.useRef)(null);
7104
- const menuRef = (0, import_react21.useRef)(null);
7105
- const [isOpen, setIsOpen] = (0, import_react21.useState)(false);
7106
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7107
- const selectedOption = options.find((option) => option.value === value);
7108
- if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
7109
- console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
7168
+ // src/util/PropsWithFunctionChildren.ts
7169
+ var resolve = (children, bag) => {
7170
+ if (typeof children === "function") {
7171
+ return children(bag);
7110
7172
  }
7111
- const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
7112
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: (0, import_clsx31.default)(className), children: [
7113
- label && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx31.default)("mb-1", label.className) }),
7114
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative", children: [
7115
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
7116
- "button",
7117
- {
7118
- ref: triggerRef,
7119
- className: (0, import_clsx31.default)(
7120
- "btn-md justify-between w-full border-2",
7121
- {
7122
- "rounded-b-lg": !open,
7123
- "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
7124
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
7125
- }
7126
- ),
7127
- onClick: () => setIsOpen(!isOpen),
7128
- disabled: isDisabled,
7129
- children: [
7130
- !isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? selectedOption?.label }),
7131
- isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "textstyle-description", children: hintText }),
7132
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react11.ChevronUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react11.ChevronDown, {})
7133
- ]
7134
- }
7135
- ),
7136
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7137
- "div",
7138
- {
7139
- ref: menuRef,
7140
- className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-lg max-h-[500px] overflow-y-auto p-2",
7141
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7142
- SearchableList,
7143
- {
7144
- list: options,
7145
- minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
7146
- searchMapping: (item) => item.searchTags,
7147
- itemMapper: (option, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7148
- Tile,
7149
- {
7150
- isSelected: selectedOption?.value === option.value,
7151
- className: "px-2 py-1 rounded-md",
7152
- disabledClassName: "text-disabled-text cursor-not-allowed",
7153
- title: { value: option.label, className: "font-semibold" },
7154
- onClick: () => {
7155
- onChange(option.value);
7156
- setIsOpen(false);
7157
- },
7158
- isDisabled: option.disabled
7159
- },
7160
- index
7161
- )
7162
- }
7163
- )
7164
- }
7165
- )
7166
- ] })
7167
- ] });
7173
+ return children ?? void 0;
7168
7174
  };
7169
- var SelectUncontrolled = ({
7170
- options,
7171
- onChange,
7172
- value,
7173
- hintText,
7174
- ...props
7175
- }) => {
7176
- const [selected, setSelected] = (0, import_react21.useState)(value);
7177
- (0, import_react21.useEffect)(() => {
7178
- if (options.find((options2) => options2.value === value)) {
7179
- setSelected(value);
7180
- }
7181
- }, [options, value]);
7182
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7183
- Select,
7184
- {
7185
- value: selected,
7186
- options,
7187
- onChange: (value2) => {
7188
- setSelected(value2);
7189
- onChange(value2);
7190
- },
7191
- hintText,
7192
- ...props
7193
- }
7194
- );
7175
+ var BagFunctionUtil = {
7176
+ resolve
7195
7177
  };
7196
7178
 
7197
- // src/components/modals/LanguageModal.tsx
7179
+ // src/hooks/usePopoverPosition.ts
7180
+ var defaultPopoverPositionOptions = {
7181
+ edgePadding: 16,
7182
+ outerGap: 4,
7183
+ horizontalAlignment: "leftInside",
7184
+ verticalAlignment: "bottomOutside",
7185
+ disabled: false
7186
+ };
7187
+ var usePopoverPosition = (trigger, options) => {
7188
+ const {
7189
+ edgePadding,
7190
+ outerGap,
7191
+ verticalAlignment,
7192
+ horizontalAlignment,
7193
+ disabled
7194
+ } = { ...defaultPopoverPositionOptions, ...options };
7195
+ if (disabled || !trigger) {
7196
+ return {};
7197
+ }
7198
+ const left = {
7199
+ leftOutside: trigger.left - outerGap,
7200
+ leftInside: trigger.left,
7201
+ rightOutside: trigger.right + outerGap,
7202
+ rightInside: trigger.right,
7203
+ center: trigger.left + trigger.width / 2
7204
+ }[horizontalAlignment];
7205
+ const top = {
7206
+ topOutside: trigger.top - outerGap,
7207
+ topInside: trigger.top,
7208
+ bottomOutside: trigger.bottom + outerGap,
7209
+ bottomInside: trigger.bottom,
7210
+ center: trigger.top + trigger.height / 2
7211
+ }[verticalAlignment];
7212
+ const translateX = {
7213
+ leftOutside: "-100%",
7214
+ leftInside: void 0,
7215
+ rightOutside: void 0,
7216
+ rightInside: "-100%",
7217
+ center: "-50%"
7218
+ }[horizontalAlignment];
7219
+ const translateY = {
7220
+ topOutside: "-100%",
7221
+ topInside: void 0,
7222
+ bottomOutside: void 0,
7223
+ bottomInside: "-100%",
7224
+ center: "-50%"
7225
+ }[verticalAlignment];
7226
+ return {
7227
+ left: Math.max(left, edgePadding),
7228
+ top: Math.max(top, edgePadding),
7229
+ translate: [translateX ?? "0", translateY ?? "0"].join(" ")
7230
+ };
7231
+ };
7232
+
7233
+ // src/components/user-action/Menu.tsx
7234
+ var import_react_dom2 = require("react-dom");
7198
7235
  var import_jsx_runtime41 = require("react/jsx-runtime");
7199
- var defaultLanguageModalTranslation = {
7200
- en: {
7236
+ var MenuItem = ({
7237
+ children,
7238
+ onClick,
7239
+ alignment = "left",
7240
+ isDisabled = false,
7241
+ className
7242
+ }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7243
+ "div",
7244
+ {
7245
+ className: (0, import_clsx33.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold", {
7246
+ "text-right": alignment === "right",
7247
+ "text-left": alignment === "left",
7248
+ "text-disabled-text cursor-not-allowed": isDisabled,
7249
+ "text-menu-text hover:bg-primary/20": !isDisabled,
7250
+ "cursor-pointer": !!onClick
7251
+ }, className),
7252
+ onClick,
7253
+ children
7254
+ }
7255
+ );
7256
+ function getScrollableParents(element) {
7257
+ const scrollables = [];
7258
+ let parent = element.parentElement;
7259
+ while (parent) {
7260
+ scrollables.push(parent);
7261
+ parent = parent.parentElement;
7262
+ }
7263
+ return scrollables;
7264
+ }
7265
+ var Menu = ({
7266
+ trigger,
7267
+ children,
7268
+ alignmentHorizontal = "leftInside",
7269
+ alignmentVertical = "bottomOutside",
7270
+ showOnHover = false,
7271
+ disabled = false,
7272
+ menuClassName = ""
7273
+ }) => {
7274
+ const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
7275
+ const triggerRef = (0, import_react22.useRef)(null);
7276
+ const menuRef = (0, import_react22.useRef)(null);
7277
+ useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7278
+ const [isHidden, setIsHidden] = (0, import_react22.useState)(true);
7279
+ const bag = {
7280
+ isOpen,
7281
+ close: () => setIsOpen(false),
7282
+ toggleOpen: () => setIsOpen((prevState) => !prevState),
7283
+ disabled
7284
+ };
7285
+ const menuPosition = usePopoverPosition(
7286
+ triggerRef.current?.getBoundingClientRect(),
7287
+ { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
7288
+ );
7289
+ (0, import_react22.useEffect)(() => {
7290
+ if (!isOpen) return;
7291
+ const triggerEl = triggerRef.current;
7292
+ if (!triggerEl) return;
7293
+ const scrollableParents = getScrollableParents(triggerEl);
7294
+ const close = () => setIsOpen(false);
7295
+ scrollableParents.forEach((parent) => {
7296
+ parent.addEventListener("scroll", close);
7297
+ });
7298
+ window.addEventListener("resize", close);
7299
+ return () => {
7300
+ scrollableParents.forEach((parent) => {
7301
+ parent.removeEventListener("scroll", close);
7302
+ });
7303
+ window.removeEventListener("resize", close);
7304
+ };
7305
+ }, [isOpen, setIsOpen]);
7306
+ (0, import_react22.useEffect)(() => {
7307
+ if (isOpen) {
7308
+ setIsHidden(false);
7309
+ }
7310
+ }, [isOpen]);
7311
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
7312
+ trigger(bag, triggerRef),
7313
+ (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7314
+ "div",
7315
+ {
7316
+ ref: menuRef,
7317
+ onClick: (e) => e.stopPropagation(),
7318
+ className: (0, import_clsx33.default)(
7319
+ "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-10",
7320
+ {
7321
+ "animate-pop-in": isOpen,
7322
+ "animate-pop-out": !isOpen,
7323
+ "hidden": isHidden
7324
+ },
7325
+ menuClassName
7326
+ ),
7327
+ onAnimationEnd: () => {
7328
+ if (!isOpen) {
7329
+ setIsHidden(true);
7330
+ }
7331
+ },
7332
+ style: {
7333
+ ...menuPosition
7334
+ },
7335
+ children: BagFunctionUtil.resolve(children, bag)
7336
+ }
7337
+ ), document.body)
7338
+ ] });
7339
+ };
7340
+
7341
+ // src/components/user-action/SearchBar.tsx
7342
+ var import_lucide_react10 = require("lucide-react");
7343
+ var import_clsx34 = require("clsx");
7344
+ var import_jsx_runtime42 = require("react/jsx-runtime");
7345
+ var SearchBar = ({
7346
+ placeholder,
7347
+ onSearch,
7348
+ disableOnSearch,
7349
+ containerClassName,
7350
+ ...inputProps
7351
+ }) => {
7352
+ const translation = useTranslation([formTranslation]);
7353
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: (0, import_clsx34.clsx)("flex-row-2 justify-between items-center", containerClassName), children: [
7354
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7355
+ Input,
7356
+ {
7357
+ ...inputProps,
7358
+ placeholder: placeholder ?? translation("search")
7359
+ }
7360
+ ),
7361
+ onSearch && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react10.Search, { className: "w-full h-full" }) })
7362
+ ] });
7363
+ };
7364
+
7365
+ // src/components/user-action/Select.tsx
7366
+ var import_jsx_runtime43 = require("react/jsx-runtime");
7367
+ var SelectTile = ({
7368
+ className,
7369
+ disabledClassName,
7370
+ title,
7371
+ ...restProps
7372
+ }) => {
7373
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7374
+ Tile,
7375
+ {
7376
+ ...restProps,
7377
+ className: (0, import_clsx35.default)("px-2 py-1 rounded-md", className),
7378
+ disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
7379
+ title: { ...title, className: title.className ?? "font-semibold" }
7380
+ }
7381
+ );
7382
+ };
7383
+ var Select = ({
7384
+ value,
7385
+ label,
7386
+ options,
7387
+ onChange,
7388
+ hintText = "",
7389
+ selectedDisplayOverwrite,
7390
+ searchOptions,
7391
+ additionalItems,
7392
+ className,
7393
+ triggerClassName,
7394
+ hintTextClassName,
7395
+ ...menuProps
7396
+ }) => {
7397
+ const selectedOption = options.find((option) => option.value === value);
7398
+ if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
7399
+ console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
7400
+ }
7401
+ const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
7402
+ const { result, search, setSearch } = useSearch({
7403
+ list: options,
7404
+ searchMapping: (0, import_react23.useCallback)((item) => item.searchTags, []),
7405
+ ...searchOptions
7406
+ });
7407
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: (0, import_clsx35.default)(className), children: [
7408
+ label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx35.default)("mb-1", label.className) }),
7409
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7410
+ Menu,
7411
+ {
7412
+ ...menuProps,
7413
+ trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7414
+ "button",
7415
+ {
7416
+ ref,
7417
+ className: (0, import_clsx35.default)(
7418
+ "btn-md justify-between w-full border-2",
7419
+ {
7420
+ "rounded-b-lg": !open,
7421
+ "bg-menu-background text-menu-text border-menu-border hover:border-primary": !disabled,
7422
+ "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
7423
+ },
7424
+ triggerClassName
7425
+ ),
7426
+ onClick: toggleOpen,
7427
+ disabled,
7428
+ children: [
7429
+ !isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
7430
+ isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: (0, import_clsx35.default)("textstyle-description", hintTextClassName), children: hintText }),
7431
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ExpansionIcon, { isExpanded: isOpen })
7432
+ ]
7433
+ }
7434
+ ),
7435
+ menuClassName: (0, import_clsx35.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
7436
+ children: (bag) => {
7437
+ const { close } = bag;
7438
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
7439
+ !searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7440
+ SearchBar,
7441
+ {
7442
+ value: search,
7443
+ onChangeText: setSearch,
7444
+ autoFocus: true
7445
+ }
7446
+ ),
7447
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
7448
+ result.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7449
+ SelectTile,
7450
+ {
7451
+ isSelected: option === selectedOption,
7452
+ title: { value: option.label },
7453
+ onClick: () => {
7454
+ onChange(option.value);
7455
+ close();
7456
+ },
7457
+ disabled: option.disabled
7458
+ },
7459
+ index
7460
+ )),
7461
+ additionalItems && additionalItems({ ...bag, search, selected: value })
7462
+ ] })
7463
+ ] });
7464
+ }
7465
+ }
7466
+ )
7467
+ ] });
7468
+ };
7469
+ var SelectUncontrolled = ({
7470
+ options,
7471
+ onChange,
7472
+ value,
7473
+ hintText,
7474
+ ...props
7475
+ }) => {
7476
+ const [selected, setSelected] = (0, import_react24.useState)(value);
7477
+ (0, import_react24.useEffect)(() => {
7478
+ if (options.find((options2) => options2.value === value)) {
7479
+ setSelected(value);
7480
+ }
7481
+ }, [options, value]);
7482
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7483
+ Select,
7484
+ {
7485
+ value: selected,
7486
+ options,
7487
+ onChange: (value2) => {
7488
+ setSelected(value2);
7489
+ onChange(value2);
7490
+ },
7491
+ hintText,
7492
+ ...props
7493
+ }
7494
+ );
7495
+ };
7496
+
7497
+ // src/components/modals/LanguageModal.tsx
7498
+ var import_jsx_runtime44 = require("react/jsx-runtime");
7499
+ var defaultLanguageModalTranslation = {
7500
+ en: {
7201
7501
  language: "Language",
7202
7502
  chooseLanguage: "Choose your language",
7203
7503
  done: "Done",
@@ -7218,7 +7518,7 @@ var LanguageModal = ({
7218
7518
  }) => {
7219
7519
  const { language, setLanguage } = useLanguage();
7220
7520
  const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
7221
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7521
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7222
7522
  Modal,
7223
7523
  {
7224
7524
  headerProps: {
@@ -7228,8 +7528,8 @@ var LanguageModal = ({
7228
7528
  },
7229
7529
  onClose,
7230
7530
  ...modalProps,
7231
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-64", children: [
7232
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7531
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "w-64", children: [
7532
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7233
7533
  Select,
7234
7534
  {
7235
7535
  className: "mt-2",
@@ -7238,15 +7538,15 @@ var LanguageModal = ({
7238
7538
  onChange: (language2) => setLanguage(language2)
7239
7539
  }
7240
7540
  ),
7241
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7541
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7242
7542
  ] })
7243
7543
  }
7244
7544
  );
7245
7545
  };
7246
7546
 
7247
7547
  // src/theming/useTheme.tsx
7248
- var import_react22 = require("react");
7249
- var import_jsx_runtime42 = require("react/jsx-runtime");
7548
+ var import_react25 = require("react");
7549
+ var import_jsx_runtime45 = require("react/jsx-runtime");
7250
7550
  var themes = ["light", "dark"];
7251
7551
  var defaultThemeTypeTranslation = {
7252
7552
  en: {
@@ -7270,27 +7570,27 @@ var ThemeUtil = {
7270
7570
  themes,
7271
7571
  translation: defaultThemeTypeTranslation
7272
7572
  };
7273
- var ThemeContext = (0, import_react22.createContext)({
7573
+ var ThemeContext = (0, import_react25.createContext)({
7274
7574
  theme: "light",
7275
7575
  setTheme: noop
7276
7576
  });
7277
7577
  var ThemeProvider = ({ children, initialTheme = "light" }) => {
7278
- const [theme, setTheme] = (0, import_react22.useState)(initialTheme);
7279
- (0, import_react22.useEffect)(() => {
7578
+ const [theme, setTheme] = (0, import_react25.useState)(initialTheme);
7579
+ (0, import_react25.useEffect)(() => {
7280
7580
  if (theme !== initialTheme) {
7281
7581
  console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
7282
7582
  setTheme(initialTheme);
7283
7583
  }
7284
7584
  }, [initialTheme]);
7285
- (0, import_react22.useEffect)(() => {
7585
+ (0, import_react25.useEffect)(() => {
7286
7586
  document.documentElement.setAttribute("data-theme", theme);
7287
7587
  }, [theme]);
7288
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ThemeContext.Provider, { value: { theme, setTheme }, children });
7588
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThemeContext.Provider, { value: { theme, setTheme }, children });
7289
7589
  };
7290
- var useTheme = () => (0, import_react22.useContext)(ThemeContext);
7590
+ var useTheme = () => (0, import_react25.useContext)(ThemeContext);
7291
7591
 
7292
7592
  // src/components/modals/ThemeModal.tsx
7293
- var import_jsx_runtime43 = require("react/jsx-runtime");
7593
+ var import_jsx_runtime46 = require("react/jsx-runtime");
7294
7594
  var defaultConfirmDialogTranslation = {
7295
7595
  en: {
7296
7596
  chooseTheme: "Choose your preferred theme"
@@ -7307,7 +7607,7 @@ var ThemeModal = ({
7307
7607
  }) => {
7308
7608
  const { theme, setTheme } = useTheme();
7309
7609
  const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
7310
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7610
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7311
7611
  Modal,
7312
7612
  {
7313
7613
  headerProps: {
@@ -7317,8 +7617,8 @@ var ThemeModal = ({
7317
7617
  },
7318
7618
  onClose,
7319
7619
  ...modalProps,
7320
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "w-64", children: [
7321
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7620
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "w-64", children: [
7621
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7322
7622
  Select,
7323
7623
  {
7324
7624
  className: "mt-2",
@@ -7327,28 +7627,28 @@ var ThemeModal = ({
7327
7627
  onChange: (theme2) => setTheme(theme2)
7328
7628
  }
7329
7629
  ),
7330
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7630
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7331
7631
  ] })
7332
7632
  }
7333
7633
  );
7334
7634
  };
7335
7635
 
7336
7636
  // src/components/properties/CheckboxProperty.tsx
7337
- var import_lucide_react14 = require("lucide-react");
7637
+ var import_lucide_react13 = require("lucide-react");
7338
7638
 
7339
7639
  // src/components/user-action/Checkbox.tsx
7340
- var import_react23 = require("react");
7640
+ var import_react26 = require("react");
7341
7641
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
7342
- var import_lucide_react12 = require("lucide-react");
7343
- var import_clsx32 = __toESM(require("clsx"));
7344
- var import_jsx_runtime44 = require("react/jsx-runtime");
7642
+ var import_lucide_react11 = require("lucide-react");
7643
+ var import_clsx36 = __toESM(require("clsx"));
7644
+ var import_jsx_runtime47 = require("react/jsx-runtime");
7345
7645
  var checkboxSizeMapping = {
7346
- small: "size-4",
7646
+ small: "size-5",
7347
7647
  medium: "size-6",
7348
7648
  large: "size-8"
7349
7649
  };
7350
7650
  var checkboxIconSizeMapping = {
7351
- small: "size-3",
7651
+ small: "size-4",
7352
7652
  medium: "size-5",
7353
7653
  large: "size-7"
7354
7654
  };
@@ -7377,36 +7677,27 @@ var Checkbox = ({
7377
7677
  const newValue = checked === "indeterminate" ? false : !checked;
7378
7678
  propagateChange(newValue);
7379
7679
  };
7380
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: (0, import_clsx32.default)("row justify-center items-center", containerClassName), children: [
7381
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7680
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: (0, import_clsx36.default)("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
7681
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7382
7682
  CheckboxPrimitive.Root,
7383
7683
  {
7384
7684
  onCheckedChange: propagateChange,
7385
7685
  checked,
7386
7686
  disabled,
7387
7687
  id,
7388
- className: (0, import_clsx32.default)(usedSizeClass, `items-center border-2 rounded outline-none `, {
7688
+ className: (0, import_clsx36.default)(usedSizeClass, `items-center border-2 rounded outline-none `, {
7389
7689
  "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
7390
- "focus:border-primary": !disabled,
7690
+ "focus:border-primary group-hover:border-primary ": !disabled,
7391
7691
  "bg-surface": !disabled && !checked,
7392
- "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate",
7393
- "hover:border-primary focus:hover:border-primary": !disabled && !checked
7692
+ "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
7394
7693
  }, className),
7395
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(CheckboxPrimitive.Indicator, { children: [
7396
- checked === true && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react12.Check, { className: innerIconSize }),
7397
- checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react12.Minus, { className: innerIconSize })
7694
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(CheckboxPrimitive.Indicator, { children: [
7695
+ checked === true && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react11.Check, { className: innerIconSize }),
7696
+ checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react11.Minus, { className: innerIconSize })
7398
7697
  ] })
7399
7698
  }
7400
7699
  ),
7401
- label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7402
- Label,
7403
- {
7404
- ...label,
7405
- className: (0, import_clsx32.default)("cursor-pointer", label.className),
7406
- htmlFor: id,
7407
- onClick: changeValue
7408
- }
7409
- )
7700
+ label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Label, { ...label, className: (0, import_clsx36.default)(label.className), htmlFor: id })
7410
7701
  ] });
7411
7702
  };
7412
7703
  var CheckboxUncontrolled = ({
@@ -7415,7 +7706,7 @@ var CheckboxUncontrolled = ({
7415
7706
  defaultValue = false,
7416
7707
  ...props
7417
7708
  }) => {
7418
- const [checked, setChecked] = (0, import_react23.useState)(defaultValue);
7709
+ const [checked, setChecked] = (0, import_react26.useState)(defaultValue);
7419
7710
  const handleChange = (checked2) => {
7420
7711
  if (onChangeTristate) {
7421
7712
  onChangeTristate(checked2);
@@ -7425,7 +7716,7 @@ var CheckboxUncontrolled = ({
7425
7716
  }
7426
7717
  setChecked(checked2);
7427
7718
  };
7428
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7719
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7429
7720
  Checkbox,
7430
7721
  {
7431
7722
  ...props,
@@ -7436,9 +7727,9 @@ var CheckboxUncontrolled = ({
7436
7727
  };
7437
7728
 
7438
7729
  // src/components/properties/PropertyBase.tsx
7439
- var import_lucide_react13 = require("lucide-react");
7440
- var import_clsx33 = __toESM(require("clsx"));
7441
- var import_jsx_runtime45 = require("react/jsx-runtime");
7730
+ var import_lucide_react12 = require("lucide-react");
7731
+ var import_clsx37 = __toESM(require("clsx"));
7732
+ var import_jsx_runtime48 = require("react/jsx-runtime");
7442
7733
  var PropertyBase = ({
7443
7734
  overwriteTranslation,
7444
7735
  name,
@@ -7452,36 +7743,44 @@ var PropertyBase = ({
7452
7743
  }) => {
7453
7744
  const translation = useTranslation([formTranslation], overwriteTranslation);
7454
7745
  const requiredAndNoValue = softRequired && !hasValue;
7455
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: (0, import_clsx33.default)("row gap-x-0 group", className), children: [
7456
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
7746
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: (0, import_clsx37.default)("flex-row-0 group", className), children: [
7747
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7457
7748
  "div",
7458
7749
  {
7459
- className: (0, import_clsx33.default)("row gap-x-2 !w-[200px] px-4 py-2 items-center rounded-l-xl border-2 border-r-0", {
7460
- "bg-property-title-background property-title-text group-hover:border-primary": !requiredAndNoValue,
7461
- "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7462
- }, className),
7750
+ className: (0, import_clsx37.default)(
7751
+ "flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
7752
+ {
7753
+ "bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
7754
+ "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7755
+ },
7756
+ className
7757
+ ),
7463
7758
  children: [
7464
- icon,
7465
- name
7759
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "max-w-6 min-w-6 text-text-default", children: icon }),
7760
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-semibold", children: name })
7466
7761
  ]
7467
7762
  }
7468
7763
  ),
7469
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
7764
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7470
7765
  "div",
7471
7766
  {
7472
- className: (0, import_clsx33.default)("row gap-x-0 grow justify-between items-center rounded-r-xl border-2 border-l-0", {
7473
- "bg-surface group-hover:border-primary": !requiredAndNoValue,
7474
- "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7475
- }, className),
7767
+ className: (0, import_clsx37.default)(
7768
+ "flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
7769
+ {
7770
+ "bg-surface group-hover:border-primary": !requiredAndNoValue,
7771
+ "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7772
+ },
7773
+ className
7774
+ ),
7476
7775
  children: [
7477
7776
  input({ softRequired, hasValue }),
7478
- requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-warning pr-4", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.AlertTriangle, { size: 24 }) }),
7479
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7777
+ requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "text-warning", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react12.AlertTriangle, { size: 24 }) }),
7778
+ onRemove && hasValue && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7480
7779
  TextButton,
7481
7780
  {
7482
7781
  onClick: onRemove,
7483
7782
  color: "negative",
7484
- className: (0, import_clsx33.default)("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
7783
+ className: (0, import_clsx37.default)("items-center", { "!text-transparent": !hasValue || readOnly }),
7485
7784
  disabled: !hasValue || readOnly,
7486
7785
  children: translation("remove")
7487
7786
  }
@@ -7493,7 +7792,7 @@ var PropertyBase = ({
7493
7792
  };
7494
7793
 
7495
7794
  // src/components/properties/CheckboxProperty.tsx
7496
- var import_jsx_runtime46 = require("react/jsx-runtime");
7795
+ var import_jsx_runtime49 = require("react/jsx-runtime");
7497
7796
  var CheckboxProperty = ({
7498
7797
  overwriteTranslation,
7499
7798
  value,
@@ -7502,30 +7801,31 @@ var CheckboxProperty = ({
7502
7801
  ...baseProps
7503
7802
  }) => {
7504
7803
  const translation = useTranslation([formTranslation], overwriteTranslation);
7505
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7804
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7506
7805
  PropertyBase,
7507
7806
  {
7508
7807
  ...baseProps,
7509
7808
  hasValue: true,
7510
7809
  readOnly,
7511
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Check, { size: 16 }),
7512
- input: () => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "row py-2 px-4 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7810
+ icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react13.Check, { size: 24 }),
7811
+ input: () => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7513
7812
  Checkbox,
7514
7813
  {
7515
7814
  checked: value ?? true,
7516
7815
  disabled: readOnly,
7517
7816
  onChange,
7518
- label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" }
7817
+ label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" },
7818
+ containerClassName: "w-full"
7519
7819
  }
7520
- ) })
7820
+ )
7521
7821
  }
7522
7822
  );
7523
7823
  };
7524
7824
 
7525
7825
  // src/components/properties/DateProperty.tsx
7526
- var import_lucide_react15 = require("lucide-react");
7527
- var import_clsx34 = __toESM(require("clsx"));
7528
- var import_jsx_runtime47 = require("react/jsx-runtime");
7826
+ var import_lucide_react14 = require("lucide-react");
7827
+ var import_clsx38 = __toESM(require("clsx"));
7828
+ var import_jsx_runtime50 = require("react/jsx-runtime");
7529
7829
  var DateProperty = ({
7530
7830
  value,
7531
7831
  onChange = noop,
@@ -7536,35 +7836,29 @@ var DateProperty = ({
7536
7836
  }) => {
7537
7837
  const hasValue = !!value;
7538
7838
  const dateText = value ? type === "dateTime" ? formatDateTime(value) : formatDate(value) : "";
7539
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7839
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
7540
7840
  PropertyBase,
7541
7841
  {
7542
7842
  ...baseProps,
7543
7843
  hasValue,
7544
- icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.CalendarDays, { size: 16 }),
7545
- input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7546
- "div",
7844
+ icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react14.CalendarDays, { size: 24 }),
7845
+ input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
7846
+ Input,
7547
7847
  {
7548
- className: (0, import_clsx34.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7549
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7550
- Input,
7551
- {
7552
- className: (0, import_clsx34.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
7553
- value: dateText,
7554
- type: type === "dateTime" ? "datetime-local" : "date",
7555
- readOnly,
7556
- onChange: (event) => {
7557
- const value2 = event.target.value;
7558
- if (!value2) {
7559
- event.preventDefault();
7560
- return;
7561
- }
7562
- const dueDate = new Date(value2);
7563
- onChange(dueDate);
7564
- },
7565
- onEditCompleted: (value2) => onEditComplete(new Date(value2))
7848
+ className: (0, import_clsx38.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
7849
+ value: dateText,
7850
+ type: type === "dateTime" ? "datetime-local" : "date",
7851
+ readOnly,
7852
+ onChange: (event) => {
7853
+ const value2 = event.target.value;
7854
+ if (!value2) {
7855
+ event.preventDefault();
7856
+ return;
7566
7857
  }
7567
- )
7858
+ const dueDate = new Date(value2);
7859
+ onChange(dueDate);
7860
+ },
7861
+ onEditCompleted: (value2) => onEditComplete(new Date(value2))
7568
7862
  }
7569
7863
  )
7570
7864
  }
@@ -7572,14 +7866,15 @@ var DateProperty = ({
7572
7866
  };
7573
7867
 
7574
7868
  // src/components/properties/MultiSelectProperty.tsx
7575
- var import_lucide_react17 = require("lucide-react");
7576
- var import_clsx36 = __toESM(require("clsx"));
7869
+ var import_lucide_react16 = require("lucide-react");
7870
+ var import_clsx40 = __toESM(require("clsx"));
7577
7871
 
7578
7872
  // src/components/user-action/MultiSelect.tsx
7579
- var import_react24 = require("react");
7580
- var import_lucide_react16 = require("lucide-react");
7581
- var import_clsx35 = __toESM(require("clsx"));
7582
- var import_jsx_runtime48 = require("react/jsx-runtime");
7873
+ var import_react27 = require("react");
7874
+ var import_react28 = require("react");
7875
+ var import_clsx39 = __toESM(require("clsx"));
7876
+ var import_lucide_react15 = require("lucide-react");
7877
+ var import_jsx_runtime51 = require("react/jsx-runtime");
7583
7878
  var defaultMultiSelectTranslation = {
7584
7879
  en: {
7585
7880
  selected: `{{amount}} selected`
@@ -7590,89 +7885,107 @@ var defaultMultiSelectTranslation = {
7590
7885
  };
7591
7886
  var MultiSelect = ({
7592
7887
  overwriteTranslation,
7593
- options,
7594
7888
  label,
7889
+ options,
7595
7890
  onChange,
7596
7891
  hintText,
7597
- isDisabled = false,
7598
- isSearchEnabled = false,
7599
7892
  selectedDisplayOverwrite,
7893
+ searchOptions,
7894
+ additionalItems,
7600
7895
  useChipDisplay = false,
7601
- className = ""
7896
+ className,
7897
+ triggerClassName,
7898
+ hintTextClassName,
7899
+ ...menuProps
7602
7900
  }) => {
7603
7901
  const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
7604
- const triggerRef = (0, import_react24.useRef)(null);
7605
- const menuRef = (0, import_react24.useRef)(null);
7606
- const [isOpen, setIsOpen] = (0, import_react24.useState)(false);
7607
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7902
+ const { result, search, setSearch } = useSearch({
7903
+ list: options,
7904
+ searchMapping: (0, import_react27.useCallback)((item) => item.searchTags, []),
7905
+ ...searchOptions
7906
+ });
7608
7907
  const selectedItems = options.filter((value) => value.selected);
7609
7908
  const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
7610
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: (0, import_clsx35.default)(className), children: [
7611
- label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7909
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: (0, import_clsx39.default)(className), children: [
7910
+ label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7612
7911
  Label,
7613
7912
  {
7614
7913
  ...label,
7615
7914
  htmlFor: label.name,
7616
- className: (0, import_clsx35.default)(" mb-1", label.className),
7915
+ className: (0, import_clsx39.default)(" mb-1", label.className),
7617
7916
  labelType: label.labelType ?? "labelBig"
7618
7917
  }
7619
7918
  ),
7620
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative", children: [
7621
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7622
- "button",
7623
- {
7624
- ref: triggerRef,
7625
- className: (0, import_clsx35.default)(
7626
- "btn-md justify-between w-full border-2 h-auto",
7627
- {
7628
- "rounded-b-lg": !open,
7629
- "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
7630
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
7631
- }
7632
- ),
7633
- onClick: () => setIsOpen(!isOpen),
7634
- disabled: isDisabled,
7635
- children: [
7636
- !isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? (useChipDisplay && selectedItems ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) : translation("selected", { replacements: { amount: selectedItems.length.toString() } })) }),
7637
- isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "textstyle-description", children: hintText ?? translation("select") }),
7638
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react16.ChevronUp, { size: 24, className: "min-w-6" }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react16.ChevronDown, { className: "min-w-6" })
7639
- ]
7640
- }
7641
- ),
7642
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
7643
- "div",
7644
- {
7645
- ref: menuRef,
7646
- className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-lg max-h-[500px] overflow-y-auto p-2",
7647
- children: [
7648
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7649
- SearchableList,
7919
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7920
+ Menu,
7921
+ {
7922
+ ...menuProps,
7923
+ trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7924
+ "button",
7925
+ {
7926
+ ref,
7927
+ className: (0, import_clsx39.default)(
7928
+ "btn-md justify-between w-full border-2 h-auto",
7929
+ {
7930
+ "min-h-14": useChipDisplay,
7931
+ "bg-menu-background text-menu-text border-menu-border hover:border-primary": !disabled,
7932
+ "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
7933
+ },
7934
+ triggerClassName
7935
+ ),
7936
+ onClick: toggleOpen,
7937
+ disabled,
7938
+ children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(IconButton, { disabled, size: "small", color: "neutral", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react15.Plus, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
7939
+ !isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
7940
+ isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: (0, import_clsx39.default)("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
7941
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ExpansionIcon, { isExpanded: isOpen })
7942
+ ] })
7943
+ }
7944
+ ),
7945
+ menuClassName: (0, import_clsx39.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
7946
+ children: (bag) => {
7947
+ const { close } = bag;
7948
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
7949
+ !searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7950
+ SearchBar,
7650
7951
  {
7651
- list: options,
7652
- minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
7653
- searchMapping: (item) => item.searchTags,
7654
- itemMapper: (option, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7655
- Tile,
7952
+ value: search,
7953
+ onChangeText: setSearch,
7954
+ autoFocus: true
7955
+ }
7956
+ ),
7957
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
7958
+ result.map((option, index) => {
7959
+ const update = () => {
7960
+ onChange(options.map((value) => value.value === option.value ? {
7961
+ ...option,
7962
+ selected: !value.selected
7963
+ } : value));
7964
+ };
7965
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7966
+ SelectTile,
7656
7967
  {
7657
- isSelected: option.selected,
7658
- className: "px-2 py-1 rounded-md",
7659
- disabledClassName: "text-disabled-text cursor-not-allowed",
7660
- title: { value: option.label, className: "font-semibold" },
7661
- onClick: () => {
7662
- onChange(options.map((value) => value.value === option.value ? {
7663
- ...option,
7664
- selected: !value.selected
7665
- } : value));
7666
- },
7667
- isDisabled: option.disabled
7968
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7969
+ Checkbox,
7970
+ {
7971
+ checked: option.selected,
7972
+ onChange: update,
7973
+ size: "small",
7974
+ disabled: option.disabled
7975
+ }
7976
+ ),
7977
+ title: { value: option.label },
7978
+ onClick: update,
7979
+ disabled: option.disabled
7668
7980
  },
7669
7981
  index
7670
- )
7671
- }
7672
- ),
7673
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "row justify-between mt-2", children: [
7674
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "row gap-x-2", children: [
7675
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
7982
+ );
7983
+ }),
7984
+ additionalItems && additionalItems({ ...bag, search })
7985
+ ] }),
7986
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-row-2 justify-between", children: [
7987
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-row-2", children: [
7988
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7676
7989
  SolidButton,
7677
7990
  {
7678
7991
  color: "neutral",
@@ -7687,7 +8000,7 @@ var MultiSelect = ({
7687
8000
  children: translation("all")
7688
8001
  }
7689
8002
  ),
7690
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8003
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7691
8004
  SolidButton,
7692
8005
  {
7693
8006
  color: "neutral",
@@ -7702,12 +8015,12 @@ var MultiSelect = ({
7702
8015
  }
7703
8016
  )
7704
8017
  ] }),
7705
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SolidButton, { size: "small", onClick: () => setIsOpen(false), children: "Done" })
8018
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SolidButton, { size: "small", onClick: close, children: "Done" })
7706
8019
  ] })
7707
- ]
8020
+ ] });
7708
8021
  }
7709
- )
7710
- ] })
8022
+ }
8023
+ )
7711
8024
  ] });
7712
8025
  };
7713
8026
  var MultiSelectUncontrolled = ({
@@ -7715,11 +8028,11 @@ var MultiSelectUncontrolled = ({
7715
8028
  onChange,
7716
8029
  ...props
7717
8030
  }) => {
7718
- const [usedOptions, setUsedOptions] = (0, import_react24.useState)(options);
7719
- (0, import_react24.useEffect)(() => {
8031
+ const [usedOptions, setUsedOptions] = (0, import_react28.useState)(options);
8032
+ (0, import_react28.useEffect)(() => {
7720
8033
  setUsedOptions(options);
7721
8034
  }, [options]);
7722
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
8035
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7723
8036
  MultiSelect,
7724
8037
  {
7725
8038
  ...props,
@@ -7733,7 +8046,7 @@ var MultiSelectUncontrolled = ({
7733
8046
  };
7734
8047
 
7735
8048
  // src/components/properties/MultiSelectProperty.tsx
7736
- var import_jsx_runtime49 = require("react/jsx-runtime");
8049
+ var import_jsx_runtime52 = require("react/jsx-runtime");
7737
8050
  var MultiSelectProperty = ({
7738
8051
  overwriteTranslation,
7739
8052
  options,
@@ -7741,11 +8054,12 @@ var MultiSelectProperty = ({
7741
8054
  readOnly = false,
7742
8055
  softRequired,
7743
8056
  onRemove,
8057
+ onAddNew,
7744
8058
  ...multiSelectProps
7745
8059
  }) => {
7746
8060
  const translation = useTranslation([formTranslation], overwriteTranslation);
7747
8061
  const hasValue = options.some((value) => value.selected);
7748
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8062
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7749
8063
  PropertyBase,
7750
8064
  {
7751
8065
  name,
@@ -7753,20 +8067,42 @@ var MultiSelectProperty = ({
7753
8067
  readOnly,
7754
8068
  softRequired,
7755
8069
  hasValue,
7756
- icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react17.List, { size: 16 }),
7757
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7758
- "div",
8070
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react16.List, { size: 24 }),
8071
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
8072
+ MultiSelect,
7759
8073
  {
7760
- className: (0, import_clsx36.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7761
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7762
- MultiSelect,
8074
+ ...multiSelectProps,
8075
+ className: (0, import_clsx40.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
8076
+ options,
8077
+ disabled: readOnly,
8078
+ useChipDisplay: true,
8079
+ hintText: `${translation("select")}...`,
8080
+ searchOptions: {
8081
+ sortingFunction: (a, b) => a.value.localeCompare(b.value),
8082
+ ...multiSelectProps?.searchOptions
8083
+ },
8084
+ additionalItems: ({ close, search }) => {
8085
+ if (!onAddNew && !search.trim()) {
8086
+ return void 0;
8087
+ }
8088
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
8089
+ SelectTile,
8090
+ {
8091
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react16.Plus, {}),
8092
+ title: { value: `${translation("add")} ${search.trim()}` },
8093
+ onClick: () => {
8094
+ onAddNew(search);
8095
+ close();
8096
+ },
8097
+ disabled: options.some((value) => value.value === search.trim())
8098
+ }
8099
+ );
8100
+ },
8101
+ triggerClassName: (0, import_clsx40.default)(
8102
+ "!border-none !p-0 !min-h-10",
7763
8103
  {
7764
- ...multiSelectProps,
7765
- className: (0, import_clsx36.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7766
- options,
7767
- isDisabled: readOnly,
7768
- useChipDisplay: true,
7769
- hintText: `${translation("select")}...`
8104
+ "!bg-warning !text-surface-warning": softRequired2 && !hasValue,
8105
+ "": !softRequired2 || hasValue
7770
8106
  }
7771
8107
  )
7772
8108
  }
@@ -7776,9 +8112,9 @@ var MultiSelectProperty = ({
7776
8112
  };
7777
8113
 
7778
8114
  // src/components/properties/NumberProperty.tsx
7779
- var import_lucide_react18 = require("lucide-react");
7780
- var import_clsx37 = __toESM(require("clsx"));
7781
- var import_jsx_runtime50 = require("react/jsx-runtime");
8115
+ var import_lucide_react17 = require("lucide-react");
8116
+ var import_clsx41 = __toESM(require("clsx"));
8117
+ var import_jsx_runtime53 = require("react/jsx-runtime");
7782
8118
  var defaultNumberPropertyTranslation = {
7783
8119
  en: {
7784
8120
  value: "Value"
@@ -7799,23 +8135,23 @@ var NumberProperty = ({
7799
8135
  }) => {
7800
8136
  const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
7801
8137
  const hasValue = value !== void 0;
7802
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
8138
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
7803
8139
  PropertyBase,
7804
8140
  {
7805
8141
  ...baseProps,
7806
8142
  onRemove,
7807
8143
  hasValue,
7808
- icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react18.Binary, { size: 16 }),
7809
- input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
8144
+ icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react17.Binary, { size: 24 }),
8145
+ input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
7810
8146
  "div",
7811
8147
  {
7812
- className: (0, import_clsx37.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
8148
+ className: (0, import_clsx41.default)("flex-row-2 grow", { "text-warning": softRequired && !hasValue }),
7813
8149
  children: [
7814
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
8150
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
7815
8151
  Input,
7816
8152
  {
7817
8153
  expanded: false,
7818
- className: (0, import_clsx37.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
8154
+ className: (0, import_clsx41.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7819
8155
  value: value?.toString() ?? "",
7820
8156
  type: "number",
7821
8157
  readOnly,
@@ -7838,7 +8174,7 @@ var NumberProperty = ({
7838
8174
  }
7839
8175
  }
7840
8176
  ),
7841
- suffix && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: (0, import_clsx37.default)("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
8177
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: (0, import_clsx41.default)("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
7842
8178
  ]
7843
8179
  }
7844
8180
  )
@@ -7847,9 +8183,9 @@ var NumberProperty = ({
7847
8183
  };
7848
8184
 
7849
8185
  // src/components/properties/SelectProperty.tsx
7850
- var import_lucide_react19 = require("lucide-react");
7851
- var import_clsx38 = __toESM(require("clsx"));
7852
- var import_jsx_runtime51 = require("react/jsx-runtime");
8186
+ var import_lucide_react18 = require("lucide-react");
8187
+ var import_clsx42 = __toESM(require("clsx"));
8188
+ var import_jsx_runtime54 = require("react/jsx-runtime");
7853
8189
  var SingleSelectProperty = ({
7854
8190
  overwriteTranslation,
7855
8191
  value,
@@ -7858,11 +8194,12 @@ var SingleSelectProperty = ({
7858
8194
  readOnly = false,
7859
8195
  softRequired,
7860
8196
  onRemove,
8197
+ onAddNew,
7861
8198
  ...selectProps
7862
8199
  }) => {
7863
8200
  const translation = useTranslation([formTranslation], overwriteTranslation);
7864
8201
  const hasValue = value !== void 0;
7865
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
8202
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
7866
8203
  PropertyBase,
7867
8204
  {
7868
8205
  name,
@@ -7870,22 +8207,45 @@ var SingleSelectProperty = ({
7870
8207
  readOnly,
7871
8208
  softRequired,
7872
8209
  hasValue,
7873
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react19.List, { size: 16 }),
7874
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7875
- "div",
8210
+ icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react18.List, { size: 24 }),
8211
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8212
+ Select,
7876
8213
  {
7877
- className: (0, import_clsx38.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7878
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7879
- Select,
8214
+ ...selectProps,
8215
+ value,
8216
+ options,
8217
+ disabled: readOnly,
8218
+ className: (0, import_clsx42.default)("w-full"),
8219
+ hintText: `${translation("select")}...`,
8220
+ searchOptions: {
8221
+ sortingFunction: (a, b) => a.value.localeCompare(b.value),
8222
+ ...selectProps?.searchOptions
8223
+ },
8224
+ additionalItems: ({ close, search }) => {
8225
+ if (!onAddNew && !search.trim()) {
8226
+ return void 0;
8227
+ }
8228
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
8229
+ SelectTile,
8230
+ {
8231
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react18.Plus, {}),
8232
+ title: { value: `${translation("add")} ${search.trim()}` },
8233
+ onClick: () => {
8234
+ onAddNew(search);
8235
+ close();
8236
+ },
8237
+ disabled: options.some((value2) => value2.value === search.trim())
8238
+ }
8239
+ );
8240
+ },
8241
+ triggerClassName: (0, import_clsx42.default)(
8242
+ "!border-none",
7880
8243
  {
7881
- ...selectProps,
7882
- value,
7883
- options,
7884
- isDisabled: readOnly,
7885
- className: (0, import_clsx38.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7886
- hintText: `${translation("select")}...`
8244
+ "!bg-warning !text-surface-warning": softRequired2 && !hasValue,
8245
+ "!bg-property-title-background": !softRequired2 || hasValue
7887
8246
  }
7888
- )
8247
+ ),
8248
+ hintTextClassName: softRequired2 && !hasValue ? "text-surface-warning" : void 0
7889
8249
  }
7890
8250
  )
7891
8251
  }
@@ -7893,13 +8253,13 @@ var SingleSelectProperty = ({
7893
8253
  };
7894
8254
 
7895
8255
  // src/components/properties/TextProperty.tsx
7896
- var import_lucide_react20 = require("lucide-react");
7897
- var import_clsx40 = __toESM(require("clsx"));
8256
+ var import_lucide_react19 = require("lucide-react");
8257
+ var import_clsx44 = __toESM(require("clsx"));
7898
8258
 
7899
8259
  // src/components/user-action/Textarea.tsx
7900
- var import_react25 = require("react");
7901
- var import_clsx39 = __toESM(require("clsx"));
7902
- var import_jsx_runtime52 = require("react/jsx-runtime");
8260
+ var import_react29 = require("react");
8261
+ var import_clsx43 = __toESM(require("clsx"));
8262
+ var import_jsx_runtime55 = require("react/jsx-runtime");
7903
8263
  var Textarea = ({
7904
8264
  label,
7905
8265
  headline,
@@ -7912,39 +8272,48 @@ var Textarea = ({
7912
8272
  onEditCompleted = noop,
7913
8273
  saveDelayOptions,
7914
8274
  defaultStyle = true,
8275
+ disabled = false,
7915
8276
  className,
7916
8277
  ...props
7917
8278
  }) => {
7918
- const [hasFocus, setHasFocus] = (0, import_react25.useState)(false);
8279
+ const [hasFocus, setHasFocus] = (0, import_react29.useState)(false);
7919
8280
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
7920
8281
  const onEditCompletedWrapper = (text) => {
7921
8282
  onEditCompleted(text);
7922
8283
  clearTimer();
7923
8284
  };
7924
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "w-full", children: [
7925
- label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
8285
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "w-full", children: [
8286
+ label && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7926
8287
  Label,
7927
8288
  {
7928
8289
  ...label,
7929
8290
  htmlFor: id,
7930
- className: (0, import_clsx39.default)("mb-1", label.className),
8291
+ className: (0, import_clsx43.default)("mb-1", label.className),
7931
8292
  labelType: label.labelType ?? "labelSmall"
7932
8293
  }
7933
8294
  ),
7934
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
8295
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
7935
8296
  "div",
7936
8297
  {
7937
- className: `${(0, import_clsx39.default)(" bg-surface text-on-surface focus-within:border-primary relative", { "shadow border-2 hover:border-primary rounded-lg": defaultStyle })}`,
8298
+ className: (0, import_clsx43.default)(
8299
+ "bg-surface text-on-surface relative",
8300
+ {
8301
+ "shadow border-2 rounded-lg": defaultStyle,
8302
+ "hover:border-primary focus-within:border-primary": defaultStyle && !disabled,
8303
+ "border-disabled-border cursor-not-allowed": defaultStyle && !disabled
8304
+ }
8305
+ ),
7938
8306
  children: [
7939
- headline && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
7940
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
8307
+ headline && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
8308
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7941
8309
  "textarea",
7942
8310
  {
7943
8311
  id,
7944
- className: (0, import_clsx39.default)("pt-0 px-3 border-transparent focus:border-transparent focus:ring-0 appearance-none border w-full leading-tight focus:outline-none", {
8312
+ className: (0, import_clsx43.default)("pt-0 px-3 border-transparent appearance-none w-full leading-tight focus:ring-0 focus:outline-none", {
7945
8313
  "resize-none": !resizable,
7946
8314
  "h-32": defaultStyle,
7947
- "mt-3": !headline
8315
+ "mt-3": !headline,
8316
+ "text-disabled-text": disabled
7948
8317
  }, className),
7949
8318
  onChange: (event) => {
7950
8319
  const value = event.target.value;
@@ -7962,13 +8331,14 @@ var Textarea = ({
7962
8331
  onEditCompletedWrapper(event.target.value);
7963
8332
  setHasFocus(false);
7964
8333
  },
8334
+ disabled,
7965
8335
  ...props
7966
8336
  }
7967
8337
  )
7968
8338
  ]
7969
8339
  }
7970
8340
  ),
7971
- hasFocus && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { className: "text-negative", children: disclaimer })
8341
+ hasFocus && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("label", { className: "text-negative", children: disclaimer })
7972
8342
  ] });
7973
8343
  };
7974
8344
  var TextareaUncontrolled = ({
@@ -7976,11 +8346,11 @@ var TextareaUncontrolled = ({
7976
8346
  onChangeText = noop,
7977
8347
  ...props
7978
8348
  }) => {
7979
- const [text, setText] = (0, import_react25.useState)(value);
7980
- (0, import_react25.useEffect)(() => {
8349
+ const [text, setText] = (0, import_react29.useState)(value);
8350
+ (0, import_react29.useEffect)(() => {
7981
8351
  setText(value);
7982
8352
  }, [value]);
7983
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
8353
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7984
8354
  Textarea,
7985
8355
  {
7986
8356
  ...props,
@@ -7994,7 +8364,7 @@ var TextareaUncontrolled = ({
7994
8364
  };
7995
8365
 
7996
8366
  // src/components/properties/TextProperty.tsx
7997
- var import_jsx_runtime53 = require("react/jsx-runtime");
8367
+ var import_jsx_runtime56 = require("react/jsx-runtime");
7998
8368
  var defaultTextPropertyTranslation = {
7999
8369
  en: {
8000
8370
  text: "Text"
@@ -8014,42 +8384,36 @@ var TextProperty = ({
8014
8384
  }) => {
8015
8385
  const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
8016
8386
  const hasValue = value !== void 0;
8017
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
8387
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8018
8388
  PropertyBase,
8019
8389
  {
8020
8390
  ...baseProps,
8021
8391
  onRemove,
8022
8392
  hasValue,
8023
- icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react20.Text, { size: 16 }),
8024
- input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
8025
- "div",
8393
+ icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react19.Text, { size: 24 }),
8394
+ input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8395
+ Textarea,
8026
8396
  {
8027
- className: (0, import_clsx40.default)("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
8028
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
8029
- Textarea,
8030
- {
8031
- className: (0, import_clsx40.default)("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
8032
- rows: 5,
8033
- defaultStyle: false,
8034
- value: value ?? "",
8035
- readOnly,
8036
- placeholder: `${translation("text")}...`,
8037
- onChangeText: (value2) => {
8038
- if (!value2) {
8039
- onRemove();
8040
- } else {
8041
- onChange(value2);
8042
- }
8043
- },
8044
- onEditCompleted: (value2) => {
8045
- if (!value2) {
8046
- onRemove();
8047
- } else {
8048
- onEditComplete(value2);
8049
- }
8050
- }
8397
+ className: (0, import_clsx44.default)("ring-0 border-0 outline-0 !px-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
8398
+ rows: 5,
8399
+ defaultStyle: false,
8400
+ value: value ?? "",
8401
+ readOnly,
8402
+ placeholder: `${translation("text")}...`,
8403
+ onChangeText: (value2) => {
8404
+ if (!value2) {
8405
+ onRemove();
8406
+ } else {
8407
+ onChange(value2);
8051
8408
  }
8052
- )
8409
+ },
8410
+ onEditCompleted: (value2) => {
8411
+ if (!value2) {
8412
+ onRemove();
8413
+ } else {
8414
+ onEditComplete(value2);
8415
+ }
8416
+ }
8053
8417
  }
8054
8418
  )
8055
8419
  }
@@ -8057,12 +8421,12 @@ var TextProperty = ({
8057
8421
  };
8058
8422
 
8059
8423
  // src/components/table/FillerRowElement.tsx
8060
- var import_clsx41 = require("clsx");
8061
- var import_jsx_runtime54 = require("react/jsx-runtime");
8424
+ var import_clsx45 = require("clsx");
8425
+ var import_jsx_runtime57 = require("react/jsx-runtime");
8062
8426
  var FillerRowElement = ({
8063
8427
  className
8064
8428
  }) => {
8065
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: (0, import_clsx41.clsx)("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
8429
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: (0, import_clsx45.clsx)("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
8066
8430
  };
8067
8431
 
8068
8432
  // src/components/table/Filter.ts
@@ -8080,97 +8444,15 @@ var TableFilters = {
8080
8444
  };
8081
8445
 
8082
8446
  // src/components/table/Table.tsx
8083
- var import_react29 = require("react");
8084
- var import_clsx45 = __toESM(require("clsx"));
8447
+ var import_react32 = require("react");
8448
+ var import_clsx48 = __toESM(require("clsx"));
8085
8449
  var import_react_table = require("@tanstack/react-table");
8086
8450
  var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
8087
8451
 
8088
8452
  // src/components/table/TableFilterButton.tsx
8089
- var import_lucide_react21 = require("lucide-react");
8090
-
8091
- // src/components/user-action/Menu.tsx
8092
- var import_react26 = require("react");
8093
- var import_clsx42 = __toESM(require("clsx"));
8094
-
8095
- // src/util/PropsWithFunctionChildren.ts
8096
- var resolve = (children, bag) => {
8097
- if (typeof children === "function") {
8098
- return children(bag);
8099
- }
8100
- return children ?? void 0;
8101
- };
8102
- var BagFunctionUtil = {
8103
- resolve
8104
- };
8105
-
8106
- // src/components/user-action/Menu.tsx
8107
- var import_jsx_runtime55 = require("react/jsx-runtime");
8108
- var MenuItem = ({
8109
- children,
8110
- onClick,
8111
- alignment = "left",
8112
- isDisabled = false,
8113
- className
8114
- }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
8115
- "div",
8116
- {
8117
- className: (0, import_clsx42.default)("block px-3 py-1.5 bg-menu-background first:rounded-t-lg last:rounded-b-lg text-sm font-semibold", {
8118
- "text-right": alignment === "right",
8119
- "text-left": alignment === "left",
8120
- "text-disabled-text cursor-not-allowed": isDisabled,
8121
- "text-menu-text hover:bg-primary/20": !isDisabled,
8122
- "cursor-pointer": !!onClick
8123
- }, className),
8124
- onClick,
8125
- children
8126
- }
8127
- );
8128
- var Menu = ({
8129
- trigger,
8130
- children,
8131
- alignment = "tl",
8132
- showOnHover = false,
8133
- menuClassName = ""
8134
- }) => {
8135
- const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
8136
- const triggerRef = (0, import_react26.useRef)(null);
8137
- const menuRef = (0, import_react26.useRef)(null);
8138
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
8139
- const bag = { isOpen, close: () => setIsOpen(false) };
8140
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
8141
- "div",
8142
- {
8143
- className: "relative",
8144
- ...handlers,
8145
- children: [
8146
- trigger(() => setIsOpen(!isOpen), triggerRef),
8147
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
8148
- "div",
8149
- {
8150
- ref: menuRef,
8151
- onClick: (e) => e.stopPropagation(),
8152
- className: (0, import_clsx42.default)(
8153
- "absolute top-full mt-1 min-w-40 rounded-lg bg-menu-background text-menu-text shadow-around-lg z-10",
8154
- {
8155
- "top-0": alignment[0] === "t",
8156
- "bottom-0": alignment[0] === "b",
8157
- "left-0": alignment[1] === "l",
8158
- "right-0": alignment[1] === "r",
8159
- "hidden": !isOpen
8160
- },
8161
- menuClassName
8162
- ),
8163
- children: BagFunctionUtil.resolve(children, bag)
8164
- }
8165
- )
8166
- ]
8167
- }
8168
- );
8169
- };
8170
-
8171
- // src/components/table/TableFilterButton.tsx
8172
- var import_react27 = require("react");
8173
- var import_jsx_runtime56 = require("react/jsx-runtime");
8453
+ var import_lucide_react20 = require("lucide-react");
8454
+ var import_react30 = require("react");
8455
+ var import_jsx_runtime58 = require("react/jsx-runtime");
8174
8456
  var defaultTableFilterTranslation = {
8175
8457
  en: {
8176
8458
  filter: "Filter",
@@ -8195,17 +8477,17 @@ var TableFilterButton = ({
8195
8477
  }) => {
8196
8478
  const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
8197
8479
  const columnFilterValue = column.getFilterValue();
8198
- const [filterValue, setFilterValue] = (0, import_react27.useState)(columnFilterValue);
8480
+ const [filterValue, setFilterValue] = (0, import_react30.useState)(columnFilterValue);
8199
8481
  const hasFilter = !!filterValue;
8200
- (0, import_react27.useEffect)(() => {
8482
+ (0, import_react30.useEffect)(() => {
8201
8483
  setFilterValue(columnFilterValue);
8202
8484
  }, [columnFilterValue]);
8203
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8485
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
8204
8486
  Menu,
8205
8487
  {
8206
- trigger: (onClick, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { ref, className: "relative", children: [
8207
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(IconButton, { color: "neutral", size: "tiny", onClick, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react21.FilterIcon, {}) }),
8208
- hasFilter && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8488
+ trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { ref, className: "relative", children: [
8489
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react20.FilterIcon, {}) }),
8490
+ hasFilter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
8209
8491
  "div",
8210
8492
  {
8211
8493
  className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
@@ -8213,9 +8495,9 @@ var TableFilterButton = ({
8213
8495
  }
8214
8496
  )
8215
8497
  ] }),
8216
- children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "col gap-y-1 p-2 items-start font-normal text-menu-text", children: [
8217
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h4", { className: "textstyle-title-sm", children: translation("filter") }),
8218
- filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8498
+ children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
8499
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "textstyle-title-sm", children: translation("filter") }),
8500
+ filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
8219
8501
  Input,
8220
8502
  {
8221
8503
  value: filterValue ?? "",
@@ -8225,8 +8507,8 @@ var TableFilterButton = ({
8225
8507
  className: "h-10"
8226
8508
  }
8227
8509
  ),
8228
- filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "row gap-x-2 items-center", children: [
8229
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8510
+ filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-row-2 items-center", children: [
8511
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
8230
8512
  Input,
8231
8513
  {
8232
8514
  value: filterValue?.[0] ?? "",
@@ -8239,8 +8521,8 @@ var TableFilterButton = ({
8239
8521
  className: "h-10 input-indicator-hidden w-40"
8240
8522
  }
8241
8523
  ),
8242
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "font-bold", children: "-" }),
8243
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8524
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-bold", children: "-" }),
8525
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
8244
8526
  Input,
8245
8527
  {
8246
8528
  value: filterValue?.[1] ?? "",
@@ -8254,8 +8536,8 @@ var TableFilterButton = ({
8254
8536
  }
8255
8537
  )
8256
8538
  ] }),
8257
- filterType === "dateRange" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
8258
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8539
+ filterType === "dateRange" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
8540
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
8259
8541
  Input,
8260
8542
  {
8261
8543
  value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
@@ -8268,7 +8550,7 @@ var TableFilterButton = ({
8268
8550
  className: "h-10 w-50"
8269
8551
  }
8270
8552
  ),
8271
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
8553
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
8272
8554
  Input,
8273
8555
  {
8274
8556
  value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
@@ -8282,12 +8564,12 @@ var TableFilterButton = ({
8282
8564
  }
8283
8565
  )
8284
8566
  ] }),
8285
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "row justify-end w-full", children: [
8286
- hasFilter && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SolidButton, { color: "negative", size: "small", onClick: () => {
8567
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
8568
+ hasFilter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SolidButton, { color: "negative", size: "small", onClick: () => {
8287
8569
  column.setFilterValue(void 0);
8288
8570
  close();
8289
8571
  }, children: translation("remove") }),
8290
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SolidButton, { size: "small", onClick: () => {
8572
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SolidButton, { size: "small", onClick: () => {
8291
8573
  column.setFilterValue(filterValue);
8292
8574
  close();
8293
8575
  }, children: translation("apply") })
@@ -8298,9 +8580,9 @@ var TableFilterButton = ({
8298
8580
  };
8299
8581
 
8300
8582
  // src/components/table/TableSortButton.tsx
8301
- var import_lucide_react22 = require("lucide-react");
8302
- var import_clsx43 = __toESM(require("clsx"));
8303
- var import_jsx_runtime57 = require("react/jsx-runtime");
8583
+ var import_lucide_react21 = require("lucide-react");
8584
+ var import_clsx46 = __toESM(require("clsx"));
8585
+ var import_jsx_runtime59 = require("react/jsx-runtime");
8304
8586
  var TableSortButton = ({
8305
8587
  sortDirection,
8306
8588
  invert = false,
@@ -8308,20 +8590,20 @@ var TableSortButton = ({
8308
8590
  className,
8309
8591
  ...buttonProps
8310
8592
  }) => {
8311
- let icon = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.ChevronsUpDown, { className: "w-full h-full" });
8593
+ let icon = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.ChevronsUpDown, { className: "w-full h-full" });
8312
8594
  if (sortDirection) {
8313
8595
  let usedSortDirection = sortDirection;
8314
8596
  if (invert) {
8315
8597
  usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
8316
8598
  }
8317
- icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react22.ChevronDown, { className: "w-full h-full" });
8599
+ icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.ChevronDown, { className: "w-full h-full" });
8318
8600
  }
8319
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
8601
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8320
8602
  IconButton,
8321
8603
  {
8322
8604
  size: "tiny",
8323
8605
  color,
8324
- className: (0, import_clsx43.default)(className),
8606
+ className: (0, import_clsx46.default)(className),
8325
8607
  ...buttonProps,
8326
8608
  children: icon
8327
8609
  }
@@ -8329,9 +8611,9 @@ var TableSortButton = ({
8329
8611
  };
8330
8612
 
8331
8613
  // src/hooks/useResizeCallbackWrapper.ts
8332
- var import_react28 = require("react");
8614
+ var import_react31 = require("react");
8333
8615
  var useResizeCallbackWrapper = (callback) => {
8334
- (0, import_react28.useEffect)(() => {
8616
+ (0, import_react31.useEffect)(() => {
8335
8617
  window.addEventListener("resize", callback);
8336
8618
  return () => {
8337
8619
  window.removeEventListener("resize", callback);
@@ -8340,17 +8622,17 @@ var useResizeCallbackWrapper = (callback) => {
8340
8622
  };
8341
8623
 
8342
8624
  // src/components/table/TableCell.tsx
8343
- var import_clsx44 = require("clsx");
8344
- var import_jsx_runtime58 = require("react/jsx-runtime");
8625
+ var import_clsx47 = require("clsx");
8626
+ var import_jsx_runtime60 = require("react/jsx-runtime");
8345
8627
  var TableCell = ({
8346
8628
  children,
8347
8629
  className
8348
8630
  }) => {
8349
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: (0, import_clsx44.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
8631
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: (0, import_clsx47.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
8350
8632
  };
8351
8633
 
8352
8634
  // src/components/table/Table.tsx
8353
- var import_jsx_runtime59 = require("react/jsx-runtime");
8635
+ var import_jsx_runtime61 = require("react/jsx-runtime");
8354
8636
  var Table = ({
8355
8637
  data,
8356
8638
  fillerRow,
@@ -8363,22 +8645,22 @@ var Table = ({
8363
8645
  columns,
8364
8646
  ...tableOptions
8365
8647
  }) => {
8366
- const ref = (0, import_react29.useRef)(null);
8367
- const tableRef = (0, import_react29.useRef)(null);
8368
- const [columnSizing, setColumnSizing] = (0, import_react29.useState)(columns.reduce((previousValue, currentValue) => {
8648
+ const ref = (0, import_react32.useRef)(null);
8649
+ const tableRef = (0, import_react32.useRef)(null);
8650
+ const [columnSizing, setColumnSizing] = (0, import_react32.useState)(columns.reduce((previousValue, currentValue) => {
8369
8651
  return {
8370
8652
  ...previousValue,
8371
8653
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
8372
8654
  };
8373
8655
  }, {}));
8374
- const [columnSizingInfo, setColumnSizingInfo] = (0, import_react29.useState)();
8375
- const [pagination, setPagination] = (0, import_react29.useState)({
8656
+ const [columnSizingInfo, setColumnSizingInfo] = (0, import_react32.useState)();
8657
+ const [pagination, setPagination] = (0, import_react32.useState)({
8376
8658
  pageSize: 10,
8377
8659
  pageIndex: 0,
8378
8660
  ...initialState?.pagination
8379
8661
  });
8380
- const [columnFilters, setColumnFilters] = (0, import_react29.useState)(initialState?.columnFilters);
8381
- const computedColumnMinWidths = (0, import_react29.useMemo)(() => {
8662
+ const [columnFilters, setColumnFilters] = (0, import_react32.useState)(initialState?.columnFilters);
8663
+ const computedColumnMinWidths = (0, import_react32.useMemo)(() => {
8382
8664
  return columns.reduce((previousValue, column) => {
8383
8665
  return {
8384
8666
  ...previousValue,
@@ -8387,7 +8669,7 @@ var Table = ({
8387
8669
  };
8388
8670
  }, {});
8389
8671
  }, [columns, defaultColumn]);
8390
- const computedColumnMaxWidths = (0, import_react29.useMemo)(() => {
8672
+ const computedColumnMaxWidths = (0, import_react32.useMemo)(() => {
8391
8673
  return columns.reduce((previousValue, column) => {
8392
8674
  return {
8393
8675
  ...previousValue,
@@ -8395,12 +8677,12 @@ var Table = ({
8395
8677
  };
8396
8678
  }, {});
8397
8679
  }, [columns, defaultColumn]);
8398
- const tableMinWidth = (0, import_react29.useMemo)(() => {
8680
+ const tableMinWidth = (0, import_react32.useMemo)(() => {
8399
8681
  return columns.reduce((sum, column) => {
8400
8682
  return sum + computedColumnMinWidths[column.id];
8401
8683
  }, 0);
8402
8684
  }, [columns, computedColumnMinWidths]);
8403
- const updateColumnSizes = (0, import_react29.useMemo)(() => {
8685
+ const updateColumnSizes = (0, import_react32.useMemo)(() => {
8404
8686
  return (previous) => {
8405
8687
  const updateSizing = {
8406
8688
  ...columnSizing,
@@ -8469,7 +8751,7 @@ var Table = ({
8469
8751
  minSize: 60,
8470
8752
  maxSize: 700,
8471
8753
  cell: ({ cell }) => {
8472
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableCell, { children: cell.getValue() });
8754
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TableCell, { children: cell.getValue() });
8473
8755
  },
8474
8756
  ...defaultColumn
8475
8757
  },
@@ -8517,18 +8799,18 @@ var Table = ({
8517
8799
  columnResizeMode: "onChange",
8518
8800
  ...tableOptions
8519
8801
  });
8520
- const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react29.useState)(false);
8521
- (0, import_react29.useEffect)(() => {
8802
+ const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react32.useState)(false);
8803
+ (0, import_react32.useEffect)(() => {
8522
8804
  if (!hasInitializedSizing && ref.current) {
8523
8805
  setHasInitializedSizing(true);
8524
8806
  table.setColumnSizing(updateColumnSizes(columnSizing));
8525
8807
  }
8526
8808
  }, [columnSizing, hasInitializedSizing]);
8527
- useResizeCallbackWrapper((0, import_react29.useCallback)(() => {
8809
+ useResizeCallbackWrapper((0, import_react32.useCallback)(() => {
8528
8810
  table.setColumnSizing(updateColumnSizes);
8529
8811
  }, [updateColumnSizes]));
8530
8812
  const pageCount = table.getPageCount();
8531
- (0, import_react29.useEffect)(() => {
8813
+ (0, import_react32.useEffect)(() => {
8532
8814
  const totalPages = pageCount;
8533
8815
  if (totalPages === 0) {
8534
8816
  if (pagination.pageIndex !== 0) {
@@ -8544,103 +8826,111 @@ var Table = ({
8544
8826
  }));
8545
8827
  }
8546
8828
  }, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
8547
- const columnSizeVars = (0, import_react29.useMemo)(() => {
8829
+ const columnSizeVars = (0, import_react32.useMemo)(() => {
8548
8830
  const headers = table.getFlatHeaders();
8549
8831
  const colSizes = {};
8550
8832
  for (let i = 0; i < headers.length; i++) {
8551
8833
  const header = headers[i];
8552
- colSizes[`--header-${header.id}-size`] = header.getSize();
8553
- colSizes[`--col-${header.column.id}-size`] = header.column.getSize();
8834
+ colSizes[`--header-${header.id}-size`] = Math.floor(header.getSize());
8835
+ colSizes[`--col-${header.column.id}-size`] = Math.floor(header.column.getSize());
8554
8836
  }
8555
8837
  return colSizes;
8556
8838
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
8557
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { ref, className: (0, import_clsx45.default)("col gap-y-4", className), children: [
8558
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_custom_scrollbars_23.Scrollbars, { autoHeight: true, autoHeightMax: tableRef.current?.offsetHeight, autoHide: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
8559
- "table",
8839
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { ref, className: (0, import_clsx48.default)("flex-col-4", className), children: [
8840
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8841
+ import_react_custom_scrollbars_23.Scrollbars,
8560
8842
  {
8561
- ref: tableRef,
8562
- className: (0, import_clsx45.default)(tableClassName),
8563
- style: {
8564
- ...columnSizeVars,
8565
- width: Math.max(table.getTotalSize(), ref.current?.offsetWidth ?? table.getTotalSize())
8566
- },
8567
- children: [
8568
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8569
- "col",
8570
- {
8571
- style: {
8572
- width: `calc(var(--header-${header?.id}-size) * 1px)`,
8573
- minWidth: header.column.columnDef.minSize,
8574
- maxWidth: header.column.columnDef.maxSize
8575
- }
8843
+ autoHeight: true,
8844
+ autoHeightMax: tableRef.current?.offsetHeight + 2,
8845
+ autoHide: true,
8846
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
8847
+ "table",
8848
+ {
8849
+ ref: tableRef,
8850
+ className: (0, import_clsx48.default)(tableClassName),
8851
+ style: {
8852
+ ...columnSizeVars,
8853
+ width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
8576
8854
  },
8577
- header.id
8578
- )) }, headerGroup.id)),
8579
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
8580
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
8581
- "th",
8582
- {
8583
- colSpan: header.colSpan,
8584
- className: (0, import_clsx45.default)("relative group", header.column.columnDef.meta?.className),
8585
- children: [
8586
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "row w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "row gap-x-1 items-center", children: [
8587
- header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8588
- TableSortButton,
8589
- {
8590
- sortDirection: header.column.getIsSorted(),
8591
- onClick: () => header.column.toggleSorting()
8592
- }
8593
- ),
8594
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8595
- TableFilterButton,
8596
- {
8597
- column: header.column,
8598
- filterType: header.column.columnDef.meta.filterType
8599
- }
8600
- ) : null,
8601
- (0, import_react_table.flexRender)(
8602
- header.column.columnDef.header,
8603
- header.getContext()
8604
- )
8605
- ] }) }),
8606
- header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8607
- "div",
8608
- {
8609
- onMouseDown: header.getResizeHandler(),
8610
- onTouchStart: header.getResizeHandler(),
8611
- onDoubleClick: () => {
8612
- header.column.resetSize();
8613
- },
8614
- className: "table-resize-indicator w-2 rounded bg-primary cursor-col-resize select-none touch-none opacity-0 group-hover:opacity-100 transition-opacity",
8615
- style: {
8616
- opacity: !columnSizingInfo?.columnSizingStart ? void 0 : columnSizingInfo?.columnSizingStart?.findIndex(([id, _]) => id === header.column.id) !== -1 ? 1 : columnSizingInfo?.columnSizingStart?.length !== 0 ? 0 : void 0
8617
- }
8618
- }
8619
- )
8620
- ]
8621
- },
8622
- header.id
8623
- );
8624
- }) }, headerGroup.id)) }),
8625
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("tbody", { children: [
8626
- table.getRowModel().rows.map((row) => {
8627
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
8628
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("td", { children: (0, import_react_table.flexRender)(
8629
- cell.column.columnDef.cell,
8630
- cell.getContext()
8631
- ) }, cell.id);
8632
- }) }, row.id);
8633
- }),
8634
- range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
8635
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("tr", { children: columns.map((column) => {
8636
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FillerRowElement, {}) }, column.id);
8637
- }) }, "filler-row-" + index);
8638
- })
8639
- ] })
8640
- ]
8855
+ children: [
8856
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8857
+ "col",
8858
+ {
8859
+ style: {
8860
+ width: `calc(var(--header-${header?.id}-size) * 1px)`,
8861
+ minWidth: header.column.columnDef.minSize,
8862
+ maxWidth: header.column.columnDef.maxSize
8863
+ }
8864
+ },
8865
+ header.id
8866
+ )) }, headerGroup.id)),
8867
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
8868
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
8869
+ "th",
8870
+ {
8871
+ colSpan: header.colSpan,
8872
+ className: (0, import_clsx48.default)("relative group", header.column.columnDef.meta?.className),
8873
+ children: [
8874
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-1 items-center", children: [
8875
+ header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8876
+ TableSortButton,
8877
+ {
8878
+ sortDirection: header.column.getIsSorted(),
8879
+ onClick: () => header.column.toggleSorting()
8880
+ }
8881
+ ),
8882
+ header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8883
+ TableFilterButton,
8884
+ {
8885
+ column: header.column,
8886
+ filterType: header.column.columnDef.meta.filterType
8887
+ }
8888
+ ) : null,
8889
+ (0, import_react_table.flexRender)(
8890
+ header.column.columnDef.header,
8891
+ header.getContext()
8892
+ )
8893
+ ] }) }),
8894
+ header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8895
+ "div",
8896
+ {
8897
+ onMouseDown: header.getResizeHandler(),
8898
+ onTouchStart: header.getResizeHandler(),
8899
+ onDoubleClick: () => {
8900
+ header.column.resetSize();
8901
+ },
8902
+ className: "table-resize-indicator w-2 rounded bg-primary cursor-col-resize select-none touch-none opacity-0 group-hover:opacity-100 transition-opacity",
8903
+ style: {
8904
+ opacity: !columnSizingInfo?.columnSizingStart ? void 0 : columnSizingInfo?.columnSizingStart?.findIndex(([id, _]) => id === header.column.id) !== -1 ? 1 : columnSizingInfo?.columnSizingStart?.length !== 0 ? 0 : void 0
8905
+ }
8906
+ }
8907
+ )
8908
+ ]
8909
+ },
8910
+ header.id
8911
+ );
8912
+ }) }, headerGroup.id)) }),
8913
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("tbody", { children: [
8914
+ table.getRowModel().rows.map((row) => {
8915
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
8916
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { children: (0, import_react_table.flexRender)(
8917
+ cell.column.columnDef.cell,
8918
+ cell.getContext()
8919
+ ) }, cell.id);
8920
+ }) }, row.id);
8921
+ }),
8922
+ range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
8923
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { children: columns.map((column) => {
8924
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FillerRowElement, {}) }, column.id);
8925
+ }) }, "filler-row-" + index);
8926
+ })
8927
+ ] })
8928
+ ]
8929
+ }
8930
+ )
8641
8931
  }
8642
- ) }),
8643
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "row justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8932
+ ),
8933
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8644
8934
  Pagination,
8645
8935
  {
8646
8936
  pageIndex: table.getState().pagination.pageIndex,
@@ -8651,11 +8941,11 @@ var Table = ({
8651
8941
  ] });
8652
8942
  };
8653
8943
  var TableUncontrolled = ({ data, ...props }) => {
8654
- const [usedDate, setUsedData] = (0, import_react29.useState)(data);
8655
- (0, import_react29.useEffect)(() => {
8944
+ const [usedDate, setUsedData] = (0, import_react32.useState)(data);
8945
+ (0, import_react32.useEffect)(() => {
8656
8946
  setUsedData(data);
8657
8947
  }, [data]);
8658
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8948
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8659
8949
  Table,
8660
8950
  {
8661
8951
  ...props,
@@ -8674,12 +8964,12 @@ var TableWithSelection = ({
8674
8964
  meta,
8675
8965
  ...props
8676
8966
  }) => {
8677
- const columnsWithSelection = (0, import_react29.useMemo)(() => {
8967
+ const columnsWithSelection = (0, import_react32.useMemo)(() => {
8678
8968
  return [
8679
8969
  {
8680
8970
  id: selectionRowId,
8681
8971
  header: ({ table }) => {
8682
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8972
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8683
8973
  Checkbox,
8684
8974
  {
8685
8975
  checked: table.getIsSomeRowsSelected() ? "indeterminate" : table.getIsAllRowsSelected(),
@@ -8692,7 +8982,7 @@ var TableWithSelection = ({
8692
8982
  );
8693
8983
  },
8694
8984
  cell: ({ row }) => {
8695
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
8985
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8696
8986
  Checkbox,
8697
8987
  {
8698
8988
  disabled: !row.getCanSelect(),
@@ -8711,15 +9001,15 @@ var TableWithSelection = ({
8711
9001
  ...columns
8712
9002
  ];
8713
9003
  }, [columns, selectionRowId]);
8714
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
9004
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
8715
9005
  Table,
8716
9006
  {
8717
9007
  columns: columnsWithSelection,
8718
9008
  fillerRow: (columnId, table) => {
8719
9009
  if (columnId === selectionRowId) {
8720
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Checkbox, { checked: false, disabled: true, containerClassName: "max-w-6" });
9010
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Checkbox, { checked: false, disabled: true, containerClassName: "max-w-6" });
8721
9011
  }
8722
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FillerRowElement, {});
9012
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FillerRowElement, {});
8723
9013
  },
8724
9014
  state: {
8725
9015
  rowSelection,
@@ -8733,7 +9023,7 @@ var TableWithSelection = ({
8733
9023
  },
8734
9024
  meta: {
8735
9025
  ...meta,
8736
- bodyRowClassName: (0, import_clsx45.default)(
9026
+ bodyRowClassName: (0, import_clsx48.default)(
8737
9027
  { "cursor-pointer": !disableClickRowClickSelection },
8738
9028
  meta?.bodyRowClassName
8739
9029
  )
@@ -8744,8 +9034,8 @@ var TableWithSelection = ({
8744
9034
  };
8745
9035
 
8746
9036
  // src/components/user-action/CopyToClipboardWrapper.tsx
8747
- var import_react30 = require("react");
8748
- var import_clsx46 = require("clsx");
9037
+ var import_react33 = require("react");
9038
+ var import_clsx49 = require("clsx");
8749
9039
 
8750
9040
  // src/util/writeToClipboard.ts
8751
9041
  var writeToClipboard = (text) => {
@@ -8753,8 +9043,8 @@ var writeToClipboard = (text) => {
8753
9043
  };
8754
9044
 
8755
9045
  // src/components/user-action/CopyToClipboardWrapper.tsx
8756
- var import_lucide_react23 = require("lucide-react");
8757
- var import_jsx_runtime60 = require("react/jsx-runtime");
9046
+ var import_lucide_react22 = require("lucide-react");
9047
+ var import_jsx_runtime62 = require("react/jsx-runtime");
8758
9048
  var CopyToClipboardWrapper = ({
8759
9049
  children,
8760
9050
  textToCopy,
@@ -8764,8 +9054,8 @@ var CopyToClipboardWrapper = ({
8764
9054
  zIndex = 10
8765
9055
  }) => {
8766
9056
  const translation = useTranslation([formTranslation]);
8767
- const [isShowingIndication, setIsShowingIndication] = (0, import_react30.useState)(false);
8768
- const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react30.useState)(false);
9057
+ const [isShowingIndication, setIsShowingIndication] = (0, import_react33.useState)(false);
9058
+ const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react33.useState)(false);
8769
9059
  const positionClasses = {
8770
9060
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
8771
9061
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -8785,10 +9075,10 @@ var CopyToClipboardWrapper = ({
8785
9075
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
8786
9076
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
8787
9077
  };
8788
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
9078
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
8789
9079
  "div",
8790
9080
  {
8791
- className: (0, import_clsx46.clsx)("relative inline-block cursor-copy", containerClassName),
9081
+ className: (0, import_clsx49.clsx)("relative inline-block cursor-copy", containerClassName),
8792
9082
  onMouseEnter: () => {
8793
9083
  setIsShowingIndication(true);
8794
9084
  },
@@ -8803,10 +9093,10 @@ var CopyToClipboardWrapper = ({
8803
9093
  },
8804
9094
  children: [
8805
9095
  children,
8806
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
9096
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
8807
9097
  "div",
8808
9098
  {
8809
- className: (0, import_clsx46.clsx)(
9099
+ className: (0, import_clsx49.clsx)(
8810
9100
  `absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
8811
9101
  shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
8812
9102
  "transition-opacity duration-200",
@@ -8818,18 +9108,18 @@ var CopyToClipboardWrapper = ({
8818
9108
  opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
8819
9109
  },
8820
9110
  children: [
8821
- isShowingConfirmation && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "row gap-x-1", children: [
8822
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react23.CheckIcon, { size: 16, className: "text-positive" }),
9111
+ isShowingConfirmation && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1", children: [
9112
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.CheckIcon, { size: 16, className: "text-positive" }),
8823
9113
  translation("copied")
8824
9114
  ] }),
8825
- isShowingIndication && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "row gap-x-1 text-description", children: [
8826
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react23.Copy, { size: 16 }),
9115
+ isShowingIndication && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1 text-description", children: [
9116
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.Copy, { size: 16 }),
8827
9117
  translation("clickToCopy")
8828
9118
  ] }),
8829
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
9119
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
8830
9120
  "div",
8831
9121
  {
8832
- className: (0, import_clsx46.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
9122
+ className: (0, import_clsx49.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
8833
9123
  style: { ...triangleStyle[position], zIndex: zIndex + 1 }
8834
9124
  }
8835
9125
  )
@@ -8842,8 +9132,8 @@ var CopyToClipboardWrapper = ({
8842
9132
  };
8843
9133
 
8844
9134
  // src/components/user-action/DateAndTimePicker.tsx
8845
- var import_clsx47 = __toESM(require("clsx"));
8846
- var import_jsx_runtime61 = require("react/jsx-runtime");
9135
+ var import_clsx50 = __toESM(require("clsx"));
9136
+ var import_jsx_runtime63 = require("react/jsx-runtime");
8847
9137
  var DateTimePicker = ({
8848
9138
  overwriteTranslation,
8849
9139
  value = /* @__PURE__ */ new Date(),
@@ -8862,7 +9152,7 @@ var DateTimePicker = ({
8862
9152
  let dateDisplay;
8863
9153
  let timeDisplay;
8864
9154
  if (useDate) {
8865
- dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9155
+ dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8866
9156
  DatePicker,
8867
9157
  {
8868
9158
  ...datePickerProps,
@@ -8876,25 +9166,25 @@ var DateTimePicker = ({
8876
9166
  );
8877
9167
  }
8878
9168
  if (useTime) {
8879
- timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9169
+ timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8880
9170
  TimePicker,
8881
9171
  {
8882
9172
  ...timePickerProps,
8883
- className: (0, import_clsx47.default)("h-full", { "justify-between w-full": mode === "time" }),
9173
+ className: (0, import_clsx50.default)("h-full", { "justify-between w-full": mode === "time" }),
8884
9174
  maxHeight: 250,
8885
9175
  time: value,
8886
9176
  onChange
8887
9177
  }
8888
9178
  );
8889
9179
  }
8890
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "col w-fit", children: [
8891
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "row gap-x-4", children: [
9180
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-col-2 w-fit", children: [
9181
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-row-4", children: [
8892
9182
  dateDisplay,
8893
9183
  timeDisplay
8894
9184
  ] }),
8895
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "row justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "row gap-x-2 mt-1", children: [
8896
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
8897
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
9185
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-row-2 mt-1", children: [
9186
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
9187
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
8898
9188
  SolidButton,
8899
9189
  {
8900
9190
  size: "medium",
@@ -8907,9 +9197,9 @@ var DateTimePicker = ({
8907
9197
  };
8908
9198
 
8909
9199
  // src/components/user-action/ScrollPicker.tsx
8910
- var import_react31 = require("react");
8911
- var import_clsx48 = __toESM(require("clsx"));
8912
- var import_jsx_runtime62 = require("react/jsx-runtime");
9200
+ var import_react34 = require("react");
9201
+ var import_clsx51 = __toESM(require("clsx"));
9202
+ var import_jsx_runtime64 = require("react/jsx-runtime");
8913
9203
  var up = 1;
8914
9204
  var down = -1;
8915
9205
  var ScrollPicker = ({
@@ -8928,7 +9218,7 @@ var ScrollPicker = ({
8928
9218
  transition,
8929
9219
  items,
8930
9220
  lastTimeStamp
8931
- }, setAnimation] = (0, import_react31.useState)({
9221
+ }, setAnimation] = (0, import_react34.useState)({
8932
9222
  targetIndex: selectedIndex,
8933
9223
  currentIndex: disabled ? selectedIndex : 0,
8934
9224
  velocity: 0,
@@ -8944,7 +9234,7 @@ var ScrollPicker = ({
8944
9234
  const itemHeight = 40;
8945
9235
  const distance = 8;
8946
9236
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
8947
- const getDirection = (0, import_react31.useCallback)((targetIndex, currentIndex2, transition2, length) => {
9237
+ const getDirection = (0, import_react34.useCallback)((targetIndex, currentIndex2, transition2, length) => {
8948
9238
  if (targetIndex === currentIndex2) {
8949
9239
  return transition2 > 0 ? up : down;
8950
9240
  }
@@ -8954,7 +9244,7 @@ var ScrollPicker = ({
8954
9244
  }
8955
9245
  return distanceForward >= length / 2 ? down : up;
8956
9246
  }, []);
8957
- const animate = (0, import_react31.useCallback)((timestamp, startTime) => {
9247
+ const animate = (0, import_react34.useCallback)((timestamp, startTime) => {
8958
9248
  setAnimation((prevState) => {
8959
9249
  const {
8960
9250
  targetIndex,
@@ -9027,7 +9317,7 @@ var ScrollPicker = ({
9027
9317
  };
9028
9318
  });
9029
9319
  }, [disabled, getDirection, onChange]);
9030
- (0, import_react31.useEffect)(() => {
9320
+ (0, import_react34.useEffect)(() => {
9031
9321
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
9032
9322
  });
9033
9323
  const opacity = (transition2, index, itemsCount) => {
@@ -9048,7 +9338,7 @@ var ScrollPicker = ({
9048
9338
  }
9049
9339
  return clamp(1 - opacityValue / max);
9050
9340
  };
9051
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9341
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
9052
9342
  "div",
9053
9343
  {
9054
9344
  className: "relative overflow-hidden",
@@ -9058,27 +9348,27 @@ var ScrollPicker = ({
9058
9348
  setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + event.deltaY }));
9059
9349
  }
9060
9350
  },
9061
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
9062
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9351
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
9352
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
9063
9353
  "div",
9064
9354
  {
9065
9355
  className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/30 border-y-2 border-x-0 ",
9066
9356
  style: { height: `${itemHeight}px` }
9067
9357
  }
9068
9358
  ),
9069
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9359
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
9070
9360
  "div",
9071
9361
  {
9072
- className: "col select-none",
9362
+ className: "flex-col-2 select-none",
9073
9363
  style: {
9074
9364
  transform: `translateY(${-transition * (distance + itemHeight)}px)`,
9075
9365
  columnGap: `${distance}px`
9076
9366
  },
9077
- children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
9367
+ children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
9078
9368
  "div",
9079
9369
  {
9080
- className: (0, import_clsx48.default)(
9081
- `col items-center justify-center rounded-md`,
9370
+ className: (0, import_clsx51.default)(
9371
+ `flex-col-2 items-center justify-center rounded-md`,
9082
9372
  {
9083
9373
  "text-primary font-bold": currentIndex === index,
9084
9374
  "text-on-background": currentIndex === index,
@@ -9104,10 +9394,10 @@ var ScrollPicker = ({
9104
9394
  };
9105
9395
 
9106
9396
  // src/components/user-action/ToggleableInput.tsx
9107
- var import_react32 = require("react");
9108
- var import_lucide_react24 = require("lucide-react");
9109
- var import_clsx49 = __toESM(require("clsx"));
9110
- var import_jsx_runtime63 = require("react/jsx-runtime");
9397
+ var import_react35 = require("react");
9398
+ var import_lucide_react23 = require("lucide-react");
9399
+ var import_clsx52 = __toESM(require("clsx"));
9400
+ var import_jsx_runtime65 = require("react/jsx-runtime");
9111
9401
  var ToggleableInput = ({
9112
9402
  type = "text",
9113
9403
  value,
@@ -9122,26 +9412,26 @@ var ToggleableInput = ({
9122
9412
  saveDelayOptions,
9123
9413
  ...restProps
9124
9414
  }) => {
9125
- const [isEditing, setIsEditing] = (0, import_react32.useState)(initialState !== "display");
9415
+ const [isEditing, setIsEditing] = (0, import_react35.useState)(initialState !== "display");
9126
9416
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
9127
- const ref = (0, import_react32.useRef)(null);
9417
+ const ref = (0, import_react35.useRef)(null);
9128
9418
  const onEditCompletedWrapper = (text) => {
9129
9419
  onEditCompleted(text);
9130
9420
  clearTimer();
9131
9421
  };
9132
- (0, import_react32.useEffect)(() => {
9422
+ (0, import_react35.useEffect)(() => {
9133
9423
  if (isEditing) {
9134
9424
  ref.current?.focus();
9135
9425
  }
9136
9426
  }, [isEditing]);
9137
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { children: [
9138
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
9427
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { children: [
9428
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
9139
9429
  "div",
9140
9430
  {
9141
- className: (0, import_clsx49.default)("row items-center w-full gap-x-2 overflow-hidden", { "cursor-pointer": !isEditing }),
9431
+ className: (0, import_clsx52.default)("flex-row-2 items-center w-full overflow-hidden", { "cursor-pointer": !isEditing }),
9142
9432
  onClick: () => !isEditing ? setIsEditing(!isEditing) : void 0,
9143
9433
  children: [
9144
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0, import_clsx49.default)("row overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9434
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: (0, import_clsx52.default)("flex-row-2 overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
9145
9435
  "input",
9146
9436
  {
9147
9437
  ref,
@@ -9169,16 +9459,16 @@ var ToggleableInput = ({
9169
9459
  onEditCompletedWrapper(value);
9170
9460
  }
9171
9461
  },
9172
- className: (0, import_clsx49.default)(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
9462
+ className: (0, import_clsx52.default)(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
9173
9463
  underline: isEditing
9174
9464
  }, labelClassName),
9175
9465
  onFocus: (event) => event.target.select()
9176
9466
  }
9177
- ) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: (0, import_clsx49.default)("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
9178
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9179
- import_lucide_react24.Pencil,
9467
+ ) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: (0, import_clsx52.default)("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
9468
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
9469
+ import_lucide_react23.Pencil,
9180
9470
  {
9181
- className: (0, import_clsx49.default)(`cursor-pointer`, { "text-transparent": isEditing }),
9471
+ className: (0, import_clsx52.default)(`cursor-pointer`, { "text-transparent": isEditing }),
9182
9472
  size,
9183
9473
  style: { minWidth: `${size}px` }
9184
9474
  }
@@ -9186,7 +9476,7 @@ var ToggleableInput = ({
9186
9476
  ]
9187
9477
  }
9188
9478
  ),
9189
- isEditing && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("label", { className: "text-negative", children: disclaimer })
9479
+ isEditing && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("label", { className: "text-negative", children: disclaimer })
9190
9480
  ] });
9191
9481
  };
9192
9482
  var ToggleableInputUncontrolled = ({
@@ -9194,11 +9484,11 @@ var ToggleableInputUncontrolled = ({
9194
9484
  onChangeText = noop,
9195
9485
  ...restProps
9196
9486
  }) => {
9197
- const [value, setValue] = (0, import_react32.useState)(initialValue);
9198
- (0, import_react32.useEffect)(() => {
9487
+ const [value, setValue] = (0, import_react35.useState)(initialValue);
9488
+ (0, import_react35.useEffect)(() => {
9199
9489
  setValue(initialValue);
9200
9490
  }, [initialValue]);
9201
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
9491
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
9202
9492
  ToggleableInput,
9203
9493
  {
9204
9494
  value,
@@ -9212,9 +9502,9 @@ var ToggleableInputUncontrolled = ({
9212
9502
  };
9213
9503
 
9214
9504
  // src/hooks/useRerender.ts
9215
- var import_react33 = require("react");
9505
+ var import_react36 = require("react");
9216
9506
  var useRerender = () => {
9217
- return (0, import_react33.useReducer)(() => ({}), {})[1];
9507
+ return (0, import_react36.useReducer)(() => ({}), {})[1];
9218
9508
  };
9219
9509
 
9220
9510
  // src/util/builder.ts
@@ -9294,6 +9584,7 @@ function resolveSetState(action, prev) {
9294
9584
  ErrorComponent,
9295
9585
  Expandable,
9296
9586
  ExpandableUncontrolled,
9587
+ ExpansionIcon,
9297
9588
  FAQSection,
9298
9589
  FillerRowElement,
9299
9590
  FormInput,
@@ -9312,6 +9603,7 @@ function resolveSetState(action, prev) {
9312
9603
  LoadingAndErrorComponent,
9313
9604
  LoadingAnimation,
9314
9605
  LoadingButton,
9606
+ LoadingContainer,
9315
9607
  LocalStorageService,
9316
9608
  LoopingArrayCalculator,
9317
9609
  MarkdownInterpreter,
@@ -9334,8 +9626,10 @@ function resolveSetState(action, prev) {
9334
9626
  Ring,
9335
9627
  RingWave,
9336
9628
  ScrollPicker,
9629
+ SearchBar,
9337
9630
  SearchableList,
9338
9631
  Select,
9632
+ SelectTile,
9339
9633
  SelectUncontrolled,
9340
9634
  SessionStorageService,
9341
9635
  SimpleSearch,
@@ -9412,6 +9706,7 @@ function resolveSetState(action, prev) {
9412
9706
  useLocalStorage,
9413
9707
  useLocale,
9414
9708
  useOutsideClick,
9709
+ usePopoverPosition,
9415
9710
  useRerender,
9416
9711
  useResizeCallbackWrapper,
9417
9712
  useSearch,