@helpwave/hightide 0.1.18 → 0.1.19

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