@helpwave/hightide 0.1.17 → 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 (261) hide show
  1. package/dist/components/branding/HelpwaveBadge.js +7 -7
  2. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  3. package/dist/components/branding/HelpwaveBadge.mjs +7 -7
  4. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  5. package/dist/components/date/DatePicker.js +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 -10
  60. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  61. package/dist/components/layout-and-navigation/Pagination.mjs +79 -7
  62. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  63. package/dist/components/layout-and-navigation/SearchableList.js +127 -26
  64. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
  65. package/dist/components/layout-and-navigation/SearchableList.mjs +126 -25
  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 -29
  106. package/dist/components/modals/InputModal.js.map +1 -1
  107. package/dist/components/modals/InputModal.mjs +18 -15
  108. package/dist/components/modals/InputModal.mjs.map +1 -1
  109. package/dist/components/modals/LanguageModal.js +728 -435
  110. package/dist/components/modals/LanguageModal.js.map +1 -1
  111. package/dist/components/modals/LanguageModal.mjs +728 -431
  112. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  113. package/dist/components/modals/ThemeModal.js +732 -439
  114. package/dist/components/modals/ThemeModal.js.map +1 -1
  115. package/dist/components/modals/ThemeModal.mjs +731 -434
  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 -42
  122. package/dist/components/properties/DateProperty.js.map +1 -1
  123. package/dist/components/properties/DateProperty.mjs +114 -38
  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 -464
  128. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  129. package/dist/components/properties/MultiSelectProperty.mjs +920 -465
  130. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  131. package/dist/components/properties/NumberProperty.js +101 -19
  132. package/dist/components/properties/NumberProperty.js.map +1 -1
  133. package/dist/components/properties/NumberProperty.mjs +101 -19
  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 -244
  142. package/dist/components/properties/SelectProperty.js.map +1 -1
  143. package/dist/components/properties/SelectProperty.mjs +686 -244
  144. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  145. package/dist/components/properties/TextProperty.js +133 -47
  146. package/dist/components/properties/TextProperty.js.map +1 -1
  147. package/dist/components/properties/TextProperty.mjs +133 -47
  148. package/dist/components/properties/TextProperty.mjs.map +1 -1
  149. package/dist/components/table/Table.js +285 -186
  150. package/dist/components/table/Table.js.map +1 -1
  151. package/dist/components/table/Table.mjs +270 -167
  152. package/dist/components/table/Table.mjs.map +1 -1
  153. package/dist/components/table/TableFilterButton.js +179 -79
  154. package/dist/components/table/TableFilterButton.js.map +1 -1
  155. package/dist/components/table/TableFilterButton.mjs +160 -56
  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/Input.js +0 -1
  180. package/dist/components/user-action/Input.js.map +1 -1
  181. package/dist/components/user-action/Input.mjs +0 -1
  182. package/dist/components/user-action/Input.mjs.map +1 -1
  183. package/dist/components/user-action/Menu.d.mts +11 -6
  184. package/dist/components/user-action/Menu.d.ts +11 -6
  185. package/dist/components/user-action/Menu.js +128 -31
  186. package/dist/components/user-action/Menu.js.map +1 -1
  187. package/dist/components/user-action/Menu.mjs +134 -33
  188. package/dist/components/user-action/Menu.mjs.map +1 -1
  189. package/dist/components/user-action/MultiSelect.d.mts +17 -7
  190. package/dist/components/user-action/MultiSelect.d.ts +17 -7
  191. package/dist/components/user-action/MultiSelect.js +796 -376
  192. package/dist/components/user-action/MultiSelect.js.map +1 -1
  193. package/dist/components/user-action/MultiSelect.mjs +781 -357
  194. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  195. package/dist/components/user-action/ScrollPicker.js +2 -2
  196. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  197. package/dist/components/user-action/ScrollPicker.mjs +2 -2
  198. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  199. package/dist/components/user-action/SearchBar.d.mts +14 -0
  200. package/dist/components/user-action/SearchBar.d.ts +14 -0
  201. package/dist/components/user-action/SearchBar.js +673 -0
  202. package/dist/components/user-action/SearchBar.js.map +1 -0
  203. package/dist/components/user-action/SearchBar.mjs +637 -0
  204. package/dist/components/user-action/SearchBar.mjs.map +1 -0
  205. package/dist/components/user-action/Select.d.mts +18 -5
  206. package/dist/components/user-action/Select.d.ts +18 -5
  207. package/dist/components/user-action/Select.js +764 -356
  208. package/dist/components/user-action/Select.js.map +1 -1
  209. package/dist/components/user-action/Select.mjs +761 -350
  210. package/dist/components/user-action/Select.mjs.map +1 -1
  211. package/dist/components/user-action/Textarea.d.mts +1 -1
  212. package/dist/components/user-action/Textarea.d.ts +1 -1
  213. package/dist/components/user-action/Textarea.js +13 -4
  214. package/dist/components/user-action/Textarea.js.map +1 -1
  215. package/dist/components/user-action/Textarea.mjs +13 -4
  216. package/dist/components/user-action/Textarea.mjs.map +1 -1
  217. package/dist/components/user-action/ToggleableInput.js +2 -3
  218. package/dist/components/user-action/ToggleableInput.js.map +1 -1
  219. package/dist/components/user-action/ToggleableInput.mjs +2 -3
  220. package/dist/components/user-action/ToggleableInput.mjs.map +1 -1
  221. package/dist/css/globals.css +251 -113
  222. package/dist/css/uncompiled/globals.css +19 -13
  223. package/dist/css/uncompiled/theme/colors-component.css +12 -3
  224. package/dist/css/uncompiled/theme/colors-semantic.css +10 -7
  225. package/dist/css/uncompiled/utitlity/animation.css +70 -1
  226. package/dist/css/uncompiled/utitlity/general.css +16 -0
  227. package/dist/hooks/useDelay.js +0 -1
  228. package/dist/hooks/useDelay.js.map +1 -1
  229. package/dist/hooks/useDelay.mjs +0 -1
  230. package/dist/hooks/useDelay.mjs.map +1 -1
  231. package/dist/hooks/usePopoverPosition.d.mts +15 -0
  232. package/dist/hooks/usePopoverPosition.d.ts +15 -0
  233. package/dist/hooks/usePopoverPosition.js +81 -0
  234. package/dist/hooks/usePopoverPosition.js.map +1 -0
  235. package/dist/hooks/usePopoverPosition.mjs +57 -0
  236. package/dist/hooks/usePopoverPosition.mjs.map +1 -0
  237. package/dist/hooks/useSearch.d.mts +7 -2
  238. package/dist/hooks/useSearch.d.ts +7 -2
  239. package/dist/hooks/useSearch.js +44 -15
  240. package/dist/hooks/useSearch.js.map +1 -1
  241. package/dist/hooks/useSearch.mjs +45 -16
  242. package/dist/hooks/useSearch.mjs.map +1 -1
  243. package/dist/index.d.mts +6 -4
  244. package/dist/index.d.ts +6 -4
  245. package/dist/index.js +1102 -820
  246. package/dist/index.js.map +1 -1
  247. package/dist/index.mjs +1001 -719
  248. package/dist/index.mjs.map +1 -1
  249. package/dist/localization/defaults/form.d.mts +2 -0
  250. package/dist/localization/defaults/form.d.ts +2 -0
  251. package/dist/localization/defaults/form.js +4 -0
  252. package/dist/localization/defaults/form.js.map +1 -1
  253. package/dist/localization/defaults/form.mjs +4 -0
  254. package/dist/localization/defaults/form.mjs.map +1 -1
  255. package/dist/util/simpleSearch.d.mts +1 -1
  256. package/dist/util/simpleSearch.d.ts +1 -1
  257. package/dist/util/simpleSearch.js +4 -1
  258. package/dist/util/simpleSearch.js.map +1 -1
  259. package/dist/util/simpleSearch.mjs +4 -1
  260. package/dist/util/simpleSearch.mjs.map +1 -1
  261. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2894,7 +2894,7 @@ var Tile = ({
2894
2894
  description,
2895
2895
  onClick,
2896
2896
  isSelected = false,
2897
- isDisabled = false,
2897
+ disabled = false,
2898
2898
  prefix,
2899
2899
  suffix,
2900
2900
  normalClassName = "hover:bg-primary/40 cursor-pointer",
@@ -2906,18 +2906,18 @@ var Tile = ({
2906
2906
  "div",
2907
2907
  {
2908
2908
  className: clsx(
2909
- "row gap-x-2 w-full items-center",
2909
+ "flex-row-2 w-full items-center",
2910
2910
  {
2911
- [normalClassName]: !!onClick && !isDisabled,
2912
- [selectedClassName]: isSelected && !isDisabled,
2913
- [disabledClassName]: isDisabled
2911
+ [normalClassName]: !!onClick && !disabled,
2912
+ [selectedClassName]: isSelected && !disabled,
2913
+ [disabledClassName]: disabled
2914
2914
  },
2915
2915
  className
2916
2916
  ),
2917
- onClick: isDisabled ? void 0 : onClick,
2917
+ onClick: disabled ? void 0 : onClick,
2918
2918
  children: [
2919
2919
  prefix,
2920
- /* @__PURE__ */ jsxs("div", { className: "col gap-y-0 w-full", children: [
2920
+ /* @__PURE__ */ jsxs("div", { className: "flex-col-0 w-full", children: [
2921
2921
  /* @__PURE__ */ jsx("h4", { className: clsx(title.className ?? "textstyle-title-normal"), children: title.value }),
2922
2922
  !!description && /* @__PURE__ */ jsx("span", { className: clsx(description.className ?? "textstyle-description"), children: description.value })
2923
2923
  ] }),
@@ -3454,6 +3454,7 @@ var getWeeksForCalenderMonth = (date, weekStart, weeks = 6) => {
3454
3454
  import clsx8 from "clsx";
3455
3455
 
3456
3456
  // src/components/user-action/Button.tsx
3457
+ import { forwardRef } from "react";
3457
3458
  import clsx4 from "clsx";
3458
3459
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
3459
3460
  var ButtonColorUtil = {
@@ -3479,7 +3480,7 @@ var ButtonUtil = {
3479
3480
  paddingMapping,
3480
3481
  iconPaddingMapping
3481
3482
  };
3482
- var SolidButton = ({
3483
+ var SolidButton = forwardRef(function SolidButton2({
3483
3484
  children,
3484
3485
  disabled = false,
3485
3486
  color = "primary",
@@ -3489,7 +3490,7 @@ var SolidButton = ({
3489
3490
  onClick,
3490
3491
  className,
3491
3492
  ...restProps
3492
- }) => {
3493
+ }, ref) {
3493
3494
  const colorClasses = {
3494
3495
  primary: "bg-button-solid-primary-background text-button-solid-primary-text",
3495
3496
  secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
@@ -3511,8 +3512,9 @@ var SolidButton = ({
3511
3512
  return /* @__PURE__ */ jsxs3(
3512
3513
  "button",
3513
3514
  {
3514
- onClick: disabled ? void 0 : onClick,
3515
- disabled: disabled || onClick === void 0,
3515
+ ref,
3516
+ onClick,
3517
+ disabled,
3516
3518
  className: clsx4(
3517
3519
  {
3518
3520
  "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
@@ -3547,7 +3549,7 @@ var SolidButton = ({
3547
3549
  ]
3548
3550
  }
3549
3551
  );
3550
- };
3552
+ });
3551
3553
  var OutlineButton = ({
3552
3554
  children,
3553
3555
  disabled = false,
@@ -3568,8 +3570,8 @@ var OutlineButton = ({
3568
3570
  return /* @__PURE__ */ jsxs3(
3569
3571
  "button",
3570
3572
  {
3571
- onClick: disabled ? void 0 : onClick,
3572
- disabled: disabled || onClick === void 0,
3573
+ onClick,
3574
+ disabled,
3573
3575
  className: clsx4(
3574
3576
  {
3575
3577
  "text-disabled-text border-disabled-outline cursor-not-allowed": disabled,
@@ -3629,8 +3631,8 @@ var TextButton = ({
3629
3631
  return /* @__PURE__ */ jsxs3(
3630
3632
  "button",
3631
3633
  {
3632
- onClick: disabled ? void 0 : onClick,
3633
- disabled: disabled || onClick === void 0,
3634
+ onClick,
3635
+ disabled,
3634
3636
  className: clsx4(
3635
3637
  {
3636
3638
  "text-disabled-text cursor-not-allowed": disabled,
@@ -3671,7 +3673,6 @@ var IconButton = ({
3671
3673
  disabled = false,
3672
3674
  color = "primary",
3673
3675
  size = "medium",
3674
- onClick,
3675
3676
  className,
3676
3677
  ...restProps
3677
3678
  }) => {
@@ -3688,8 +3689,7 @@ var IconButton = ({
3688
3689
  return /* @__PURE__ */ jsx5(
3689
3690
  "button",
3690
3691
  {
3691
- onClick: disabled ? void 0 : onClick,
3692
- disabled: disabled || onClick === void 0,
3692
+ disabled,
3693
3693
  className: clsx4(
3694
3694
  {
3695
3695
  "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
@@ -3712,12 +3712,23 @@ import { Scrollbars } from "react-custom-scrollbars-2";
3712
3712
  import clsx6 from "clsx";
3713
3713
 
3714
3714
  // src/components/layout-and-navigation/Expandable.tsx
3715
- import { forwardRef, useEffect as useEffect3, useState as useState3 } from "react";
3716
- import { ChevronDown, ChevronUp } from "lucide-react";
3715
+ import { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect3, useState as useState3 } from "react";
3716
+ import { ChevronDown } from "lucide-react";
3717
3717
  import clsx5 from "clsx";
3718
3718
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
3719
- var DefaultIcon = (expanded) => expanded ? /* @__PURE__ */ jsx6(ChevronUp, { className: "min-w-4 w-4" }) : /* @__PURE__ */ jsx6(ChevronDown, { className: "min-w-4 w-4" });
3720
- var Expandable = forwardRef(function Expandable2({
3719
+ var ExpansionIcon = ({ isExpanded, className }) => {
3720
+ return /* @__PURE__ */ jsx6(
3721
+ ChevronDown,
3722
+ {
3723
+ className: clsx5(
3724
+ "min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
3725
+ { "rotate-180": isExpanded },
3726
+ className
3727
+ )
3728
+ }
3729
+ );
3730
+ };
3731
+ var Expandable = forwardRef2(function Expandable2({
3721
3732
  children,
3722
3733
  label,
3723
3734
  icon,
@@ -3729,22 +3740,23 @@ var Expandable = forwardRef(function Expandable2({
3729
3740
  headerClassName,
3730
3741
  contentClassName
3731
3742
  }, ref) {
3732
- icon ??= DefaultIcon;
3743
+ const defaultIcon = useCallback2((expanded) => /* @__PURE__ */ jsx6(ExpansionIcon, { isExpanded: expanded }), []);
3744
+ icon ??= defaultIcon;
3733
3745
  return /* @__PURE__ */ jsxs4(
3734
3746
  "div",
3735
3747
  {
3736
3748
  ref,
3737
- className: clsx5("col gap-y-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
3749
+ className: clsx5("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
3738
3750
  onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
3739
3751
  children: [
3740
3752
  /* @__PURE__ */ jsxs4(
3741
3753
  "div",
3742
3754
  {
3743
3755
  className: clsx5(
3744
- "row py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
3756
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
3745
3757
  {
3746
- "group-hover:brightness-95": !isExpanded,
3747
- "hover:brightness-95": isExpanded && !disabled,
3758
+ "group-hover:brightness-97": !isExpanded,
3759
+ "hover:brightness-97": isExpanded && !disabled,
3748
3760
  "cursor-pointer": clickOnlyOnHeader && !disabled
3749
3761
  },
3750
3762
  headerClassName
@@ -3756,12 +3768,25 @@ var Expandable = forwardRef(function Expandable2({
3756
3768
  ]
3757
3769
  }
3758
3770
  ),
3759
- isExpanded && /* @__PURE__ */ jsx6("div", { className: clsx5("col px-4 pb-2", contentClassName), children })
3771
+ /* @__PURE__ */ jsx6(
3772
+ "div",
3773
+ {
3774
+ className: clsx5(
3775
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
3776
+ {
3777
+ "max-h-96 opacity-100 pb-2": isExpanded,
3778
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
3779
+ },
3780
+ contentClassName
3781
+ ),
3782
+ children
3783
+ }
3784
+ )
3760
3785
  ]
3761
3786
  }
3762
3787
  );
3763
3788
  });
3764
- var ExpandableUncontrolled = forwardRef(function ExpandableUncontrolled2({
3789
+ var ExpandableUncontrolled = forwardRef2(function ExpandableUncontrolled2({
3765
3790
  isExpanded,
3766
3791
  onChange = noop,
3767
3792
  ...props
@@ -3813,7 +3838,7 @@ var YearMonthPicker = ({
3813
3838
  return null;
3814
3839
  }
3815
3840
  const years = range([start.getFullYear(), end.getFullYear()], { exclusiveEnd: false });
3816
- return /* @__PURE__ */ jsx7("div", { className: clsx6("col select-none", className), children: /* @__PURE__ */ jsx7(Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx7("div", { className: "col gap-y-1 mr-3", children: years.map((year) => {
3841
+ return /* @__PURE__ */ jsx7("div", { className: clsx6("flex-col-0 select-none", className), children: /* @__PURE__ */ jsx7(Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx7("div", { className: "flex-col-1 mr-3", children: years.map((year) => {
3817
3842
  const selectedYear = displayedYearMonth.getFullYear() === year;
3818
3843
  return /* @__PURE__ */ jsx7(
3819
3844
  ExpandableUncontrolled,
@@ -3822,7 +3847,7 @@ var YearMonthPicker = ({
3822
3847
  label: /* @__PURE__ */ jsx7("span", { className: clsx6({ "text-primary font-bold": selectedYear }), children: year }),
3823
3848
  isExpanded: showValueOpen && selectedYear,
3824
3849
  contentClassName: "gap-y-1",
3825
- children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx7("div", { className: "row gap-x-1", children: monthList.map((month) => {
3850
+ children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx7("div", { className: "flex-row-1", children: monthList.map((month) => {
3826
3851
  const monthIndex = monthsList.indexOf(month);
3827
3852
  const newDate = new Date(year, monthIndex);
3828
3853
  const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
@@ -3888,9 +3913,9 @@ var DayPicker = ({
3888
3913
  const locale = useLocale();
3889
3914
  const month = displayedMonth.getMonth();
3890
3915
  const weeks = getWeeksForCalenderMonth(displayedMonth, weekStart);
3891
- return /* @__PURE__ */ jsxs5("div", { className: clsx7("col gap-y-1 min-w-[220px] select-none", className), children: [
3892
- /* @__PURE__ */ jsx8("div", { className: "row text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx8("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
3893
- weeks.map((week, index) => /* @__PURE__ */ jsx8("div", { className: "row text-center", children: week.map((date) => {
3916
+ return /* @__PURE__ */ jsxs5("div", { className: clsx7("flex-col-1 min-w-[220px] select-none", className), children: [
3917
+ /* @__PURE__ */ jsx8("div", { className: "flex-row-2 text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx8("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
3918
+ weeks.map((week, index) => /* @__PURE__ */ jsx8("div", { className: "flex-row-2 text-center", children: week.map((date) => {
3894
3919
  const isSelected = !!selected && equalDate(selected, date);
3895
3920
  const isToday = equalDate(/* @__PURE__ */ new Date(), date);
3896
3921
  const isSameMonth = date.getMonth() === month;
@@ -4038,12 +4063,12 @@ var DatePicker = ({
4038
4063
  useEffect6(() => {
4039
4064
  setDisplayedMonth(value);
4040
4065
  }, [value]);
4041
- return /* @__PURE__ */ jsxs6("div", { className: clsx8("col gap-y-4", className), children: [
4042
- /* @__PURE__ */ jsxs6("div", { className: "row items-center justify-between h-7", children: [
4066
+ return /* @__PURE__ */ jsxs6("div", { className: clsx8("flex-col-4", className), children: [
4067
+ /* @__PURE__ */ jsxs6("div", { className: "flex-row-2 items-center justify-between h-7", children: [
4043
4068
  /* @__PURE__ */ jsxs6(
4044
4069
  TextButton,
4045
4070
  {
4046
- className: clsx8("row gap-x-1 items-center cursor-pointer select-none", {
4071
+ className: clsx8("flex-row-1 items-center cursor-pointer select-none", {
4047
4072
  "text-disabled-text": displayMode !== "day"
4048
4073
  }),
4049
4074
  onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
@@ -4053,7 +4078,7 @@ var DatePicker = ({
4053
4078
  ]
4054
4079
  }
4055
4080
  ),
4056
- displayMode === "day" && /* @__PURE__ */ jsxs6("div", { className: "row justify-end", children: [
4081
+ displayMode === "day" && /* @__PURE__ */ jsxs6("div", { className: "flex-row-2 justify-end", children: [
4057
4082
  /* @__PURE__ */ jsx9(
4058
4083
  SolidButton,
4059
4084
  {
@@ -4267,8 +4292,8 @@ var TimePicker = ({
4267
4292
  transformer(newDate);
4268
4293
  onChange(newDate);
4269
4294
  };
4270
- return /* @__PURE__ */ jsxs7("div", { className: clsx9("row gap-x-2 w-fit min-w-[150px] select-none", className), children: [
4271
- /* @__PURE__ */ jsx11(Scrollbars2, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx11("div", { className: "col gap-y-1 h-full", children: hours.map((hour) => {
4295
+ return /* @__PURE__ */ jsxs7("div", { className: clsx9("flex-row-2 w-fit min-w-[150px] select-none", className), children: [
4296
+ /* @__PURE__ */ jsx11(Scrollbars2, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx11("div", { className: "flex-col-1 h-full", children: hours.map((hour) => {
4272
4297
  const currentHour = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
4273
4298
  return /* @__PURE__ */ jsx11(
4274
4299
  "button",
@@ -4281,7 +4306,7 @@ var TimePicker = ({
4281
4306
  hour
4282
4307
  );
4283
4308
  }) }) }),
4284
- /* @__PURE__ */ jsx11(Scrollbars2, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx11("div", { className: "col gap-y-1 h-full", children: minutes.map((minute) => {
4309
+ /* @__PURE__ */ jsx11(Scrollbars2, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx11("div", { className: "flex-col-1 h-full", children: minutes.map((minute) => {
4285
4310
  const currentMinute = minute === closestMinute;
4286
4311
  return /* @__PURE__ */ jsx11(
4287
4312
  "button",
@@ -4294,7 +4319,7 @@ var TimePicker = ({
4294
4319
  minute + minuteIncrement
4295
4320
  );
4296
4321
  }) }) }),
4297
- !is24HourFormat && /* @__PURE__ */ jsxs7("div", { className: "col gap-y-1", children: [
4322
+ !is24HourFormat && /* @__PURE__ */ jsxs7("div", { className: "flex-col-1", children: [
4298
4323
  /* @__PURE__ */ jsx11(
4299
4324
  "button",
4300
4325
  {
@@ -4458,6 +4483,7 @@ import { X } from "lucide-react";
4458
4483
  // src/localization/defaults/form.ts
4459
4484
  var formTranslation = {
4460
4485
  en: {
4486
+ add: "Add",
4461
4487
  all: "All",
4462
4488
  apply: "Apply",
4463
4489
  back: "Back",
@@ -4470,6 +4496,7 @@ var formTranslation = {
4470
4496
  confirm: "Confirm",
4471
4497
  copy: "Copy",
4472
4498
  copied: "Copied",
4499
+ create: "Create",
4473
4500
  decline: "Decline",
4474
4501
  delete: "Delete",
4475
4502
  discard: "Discard",
@@ -4512,6 +4539,7 @@ var formTranslation = {
4512
4539
  yes: "Yes"
4513
4540
  },
4514
4541
  de: {
4542
+ add: "Hinzuf\xFCgen",
4515
4543
  all: "Alle",
4516
4544
  apply: "Anwenden",
4517
4545
  back: "Zur\xFCck",
@@ -4524,6 +4552,7 @@ var formTranslation = {
4524
4552
  confirm: "Best\xE4tigen",
4525
4553
  copy: "Kopieren",
4526
4554
  copied: "Kopiert",
4555
+ create: "Erstellen",
4527
4556
  decline: "Ablehnen",
4528
4557
  delete: "L\xF6schen",
4529
4558
  discard: "Verwerfen",
@@ -4585,7 +4614,7 @@ var Overlay = ({
4585
4614
  /* @__PURE__ */ jsx13(
4586
4615
  "div",
4587
4616
  {
4588
- className: clsx11("fixed inset-0 h-screen w-screen bg-black/30", backgroundClassName),
4617
+ className: clsx11("fixed inset-0 h-screen w-screen bg-overlay-shadow", backgroundClassName),
4589
4618
  onClick: onBackgroundClick
4590
4619
  }
4591
4620
  ),
@@ -4613,7 +4642,7 @@ var OverlayHeader = ({
4613
4642
  }) => {
4614
4643
  const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
4615
4644
  const hasTitleRow = !!title || !!titleText || !!onClose;
4616
- const titleRow = /* @__PURE__ */ jsxs9("div", { className: "row justify-between items-start gap-x-8", children: [
4645
+ const titleRow = /* @__PURE__ */ jsxs9("div", { className: "flex-row-8 justify-between items-start", children: [
4617
4646
  title ?? /* @__PURE__ */ jsx13(
4618
4647
  "h2",
4619
4648
  {
@@ -4625,7 +4654,7 @@ var OverlayHeader = ({
4625
4654
  ),
4626
4655
  !!onClose && /* @__PURE__ */ jsx13(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ jsx13(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ jsx13(X, { className: "w-full h-full" }) }) })
4627
4656
  ] });
4628
- return /* @__PURE__ */ jsxs9("div", { className: "col", children: [
4657
+ return /* @__PURE__ */ jsxs9("div", { className: "flex-col-2", children: [
4629
4658
  hasTitleRow && titleRow,
4630
4659
  description ?? (descriptionText && /* @__PURE__ */ jsx13("span", { className: "textstyle-description", children: descriptionText }))
4631
4660
  ] });
@@ -4688,7 +4717,7 @@ var Modal = ({
4688
4717
  ref,
4689
4718
  tabIndex: -1,
4690
4719
  className: clsx11(
4691
- "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",
4720
+ "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",
4692
4721
  className
4693
4722
  ),
4694
4723
  role: "dialog",
@@ -4757,7 +4786,7 @@ var Dialog = ({
4757
4786
  ref,
4758
4787
  tabIndex: -1,
4759
4788
  className: clsx11(
4760
- "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",
4789
+ "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",
4761
4790
  className
4762
4791
  ),
4763
4792
  role: "dialog",
@@ -4792,8 +4821,8 @@ var ConfirmDialog = ({
4792
4821
  primary: "primary"
4793
4822
  };
4794
4823
  return /* @__PURE__ */ jsxs10(Dialog, { ...restProps, className: clsx12("justify-between", className), children: [
4795
- /* @__PURE__ */ jsx14("div", { className: "col grow", children }),
4796
- /* @__PURE__ */ jsxs10("div", { className: "row mt-3 gap-x-4 justify-end", children: [
4824
+ /* @__PURE__ */ jsx14("div", { className: "flex-col-2 grow", children }),
4825
+ /* @__PURE__ */ jsxs10("div", { className: "flex-row-4 mt-3 justify-end", children: [
4797
4826
  onDecline && /* @__PURE__ */ jsx14(
4798
4827
  SolidButton,
4799
4828
  {
@@ -4868,7 +4897,7 @@ var AvatarGroup = ({
4868
4897
  const stackingOverlap = 0.5;
4869
4898
  const notDisplayedProfiles = avatars.length - maxShownProfiles;
4870
4899
  const avatarGroupWidth = diameter * (stackingOverlap * (displayedProfiles.length - 1) + 1);
4871
- return /* @__PURE__ */ jsxs11("div", { className: "row relative", style: { height: diameter + "px" }, children: [
4900
+ return /* @__PURE__ */ jsxs11("div", { className: "flex-row-2 relative", style: { height: diameter + "px" }, children: [
4872
4901
  /* @__PURE__ */ jsx15("div", { style: { width: avatarGroupWidth + "px" }, children: displayedProfiles.map((avatar, index) => /* @__PURE__ */ jsx15(
4873
4902
  "div",
4874
4903
  {
@@ -4881,7 +4910,7 @@ var AvatarGroup = ({
4881
4910
  notDisplayedProfiles > 0 && /* @__PURE__ */ jsx15(
4882
4911
  "div",
4883
4912
  {
4884
- className: "truncate row items-center",
4913
+ className: "flex-row-2 truncate items-center",
4885
4914
  style: { fontSize: diameter / 2 + "px", marginLeft: 1 + diameter / 16 + "px" },
4886
4915
  children: /* @__PURE__ */ jsxs11("span", { children: [
4887
4916
  "+ ",
@@ -4917,7 +4946,7 @@ var Circle = ({
4917
4946
  };
4918
4947
 
4919
4948
  // src/components/icons-and-geometry/Ring.tsx
4920
- import { useCallback as useCallback2, useEffect as useEffect10, useState as useState10 } from "react";
4949
+ import { useCallback as useCallback3, useEffect as useEffect10, useState as useState10 } from "react";
4921
4950
  import clsx15 from "clsx";
4922
4951
  import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
4923
4952
  var Ring = ({
@@ -4948,7 +4977,7 @@ var AnimatedRing = ({
4948
4977
  }) => {
4949
4978
  const [currentWidth, setCurrentWidth] = useState10(0);
4950
4979
  const milliseconds = 1e3 * fillAnimationDuration;
4951
- const animate = useCallback2((timestamp, startTime) => {
4980
+ const animate = useCallback3((timestamp, startTime) => {
4952
4981
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
4953
4982
  const newWidth = Math.min(width * progress, width);
4954
4983
  setCurrentWidth(newWidth);
@@ -4970,7 +4999,7 @@ var AnimatedRing = ({
4970
4999
  return /* @__PURE__ */ jsx17(
4971
5000
  "div",
4972
5001
  {
4973
- className: "row items-center justify-center",
5002
+ className: "flex-row-2 items-center justify-center",
4974
5003
  style: {
4975
5004
  width: `${innerSize + 2 * width}px`,
4976
5005
  height: `${innerSize + 2 * width}px`,
@@ -5000,7 +5029,7 @@ var RingWave = ({
5000
5029
  const [currentInnerSize, setCurrentInnerSize] = useState10(startInnerSize);
5001
5030
  const distance = endInnerSize - startInnerSize;
5002
5031
  const milliseconds = 1e3 * fillAnimationDuration;
5003
- const animate = useCallback2((timestamp, startTime) => {
5032
+ const animate = useCallback3((timestamp, startTime) => {
5004
5033
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
5005
5034
  const newInnerSize = Math.min(
5006
5035
  startInnerSize + distance * progress,
@@ -5025,7 +5054,7 @@ var RingWave = ({
5025
5054
  return /* @__PURE__ */ jsx17(
5026
5055
  "div",
5027
5056
  {
5028
- className: "row items-center justify-center",
5057
+ className: "flex-row-2 items-center justify-center",
5029
5058
  style: {
5030
5059
  width: `${endInnerSize + 2 * width}px`,
5031
5060
  height: `${endInnerSize + 2 * width}px`,
@@ -5205,7 +5234,7 @@ import clsx16 from "clsx";
5205
5234
  import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
5206
5235
  var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
5207
5236
  const color = "text-description";
5208
- return /* @__PURE__ */ jsx19("div", { className: clsx16("row gap-x-0", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ jsxs13("div", { children: [
5237
+ return /* @__PURE__ */ jsx19("div", { className: clsx16("flex-row-0", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ jsxs13("div", { children: [
5209
5238
  /* @__PURE__ */ jsx19(
5210
5239
  import_link.default,
5211
5240
  {
@@ -5219,7 +5248,7 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
5219
5248
  };
5220
5249
 
5221
5250
  // src/components/layout-and-navigation/Carousel.tsx
5222
- import { useCallback as useCallback3, useEffect as useEffect11, useMemo, useRef as useRef4, useState as useState11 } from "react";
5251
+ import { useCallback as useCallback4, useEffect as useEffect11, useMemo, useRef as useRef4, useState as useState11 } from "react";
5223
5252
  import clsx17 from "clsx";
5224
5253
  import { ChevronLeft, ChevronRight } from "lucide-react";
5225
5254
 
@@ -5367,7 +5396,7 @@ var Carousel = ({
5367
5396
  const baseOffset = -50 + (index - currentPosition) * 100;
5368
5397
  return `${baseOffset}%`;
5369
5398
  };
5370
- const animation = useCallback3((time) => {
5399
+ const animation = useCallback4((time) => {
5371
5400
  let keepAnimating = true;
5372
5401
  setCarouselInformation((state) => {
5373
5402
  const {
@@ -5566,7 +5595,7 @@ var Carousel = ({
5566
5595
  onTouchEnd: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width),
5567
5596
  onTouchCancel: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width)
5568
5597
  };
5569
- return /* @__PURE__ */ jsxs14("div", { className: "col items-center w-full gap-y-2", children: [
5598
+ return /* @__PURE__ */ jsxs14("div", { className: "flex-col-2 items-center w-full", children: [
5570
5599
  /* @__PURE__ */ jsxs14("div", { className: clsx17(`relative w-full overflow-hidden`, heightClassName, className), children: [
5571
5600
  arrows && /* @__PURE__ */ jsxs14(Fragment, { children: [
5572
5601
  /* @__PURE__ */ jsx20(
@@ -5590,8 +5619,8 @@ var Carousel = ({
5590
5619
  }
5591
5620
  )
5592
5621
  ] }),
5593
- hintNext ? /* @__PURE__ */ jsxs14("div", { className: clsx17(`relative row h-full`, heightClassName), children: [
5594
- /* @__PURE__ */ jsx20("div", { className: "relative row h-full w-full px-2 overflow-hidden", children: items.map(({
5622
+ hintNext ? /* @__PURE__ */ jsxs14("div", { className: clsx17(`flex-row-2 relative h-full`, heightClassName), children: [
5623
+ /* @__PURE__ */ jsx20("div", { className: "flex-row-2 relative h-full w-full px-2 overflow-hidden", children: items.map(({
5595
5624
  item,
5596
5625
  index
5597
5626
  }, listIndex) => /* @__PURE__ */ jsx20(
@@ -5622,7 +5651,7 @@ var Carousel = ({
5622
5651
  dots && /* @__PURE__ */ jsx20(
5623
5652
  "div",
5624
5653
  {
5625
- className: "row items-center justify-center w-full my-2",
5654
+ className: "flex-row-2 items-center justify-center w-full my-2",
5626
5655
  children: range(length).map((index) => /* @__PURE__ */ jsx20(
5627
5656
  "button",
5628
5657
  {
@@ -5692,7 +5721,7 @@ var ChipList = ({
5692
5721
  list,
5693
5722
  className = ""
5694
5723
  }) => {
5695
- return /* @__PURE__ */ jsx21("div", { className: clsx18("flex flex-wrap gap-x-4 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ jsx21(
5724
+ return /* @__PURE__ */ jsx21("div", { className: clsx18("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ jsx21(
5696
5725
  Chip,
5697
5726
  {
5698
5727
  ...value,
@@ -5728,7 +5757,6 @@ var DividerInserter = ({
5728
5757
 
5729
5758
  // src/components/layout-and-navigation/FAQSection.tsx
5730
5759
  import clsx20 from "clsx";
5731
- import { ChevronDown as ChevronDown3, ChevronUp as ChevronUp2 } from "lucide-react";
5732
5760
 
5733
5761
  // src/components/layout-and-navigation/MarkdownInterpreter.tsx
5734
5762
  import { Fragment as Fragment2, jsx as jsx23 } from "react/jsx-runtime";
@@ -5967,14 +5995,13 @@ var FAQSection = ({
5967
5995
  entries,
5968
5996
  expandableClassName
5969
5997
  }) => {
5970
- const chevronSize = 28;
5971
- return /* @__PURE__ */ jsx24("div", { className: "col gap-y-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ jsx24(
5998
+ return /* @__PURE__ */ jsx24("div", { className: "flex-col-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ jsx24(
5972
5999
  ExpandableUncontrolled,
5973
6000
  {
5974
6001
  ...restProps,
5975
6002
  label: /* @__PURE__ */ jsx24("h3", { id, className: "textstyle-title-md", children: title }),
5976
6003
  clickOnlyOnHeader: false,
5977
- icon: (expanded) => expanded ? /* @__PURE__ */ jsx24(ChevronUp2, { size: chevronSize, className: "text-primary", style: { minWidth: `${chevronSize}px` } }) : /* @__PURE__ */ jsx24(ChevronDown3, { size: chevronSize, className: "text-primary" }),
6004
+ icon: (expanded) => /* @__PURE__ */ jsx24(ExpansionIcon, { isExpanded: expanded, className: "text-primary" }),
5978
6005
  className: clsx20("rounded-xl", expandableClassName),
5979
6006
  children: /* @__PURE__ */ jsx24("div", { className: "mt-2", children: content.type === "markdown" ? /* @__PURE__ */ jsx24(MarkdownInterpreter, { text: content.value }) : content.value })
5980
6007
  },
@@ -5987,7 +6014,7 @@ import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as
5987
6014
  import clsx23 from "clsx";
5988
6015
 
5989
6016
  // src/components/user-action/Input.tsx
5990
- import { forwardRef as forwardRef2, useEffect as useEffect14, useImperativeHandle, useRef as useRef5, useState as useState13 } from "react";
6017
+ import { forwardRef as forwardRef3, useEffect as useEffect14, useImperativeHandle, useRef as useRef5, useState as useState13 } from "react";
5991
6018
  import clsx22 from "clsx";
5992
6019
 
5993
6020
  // src/hooks/useDelay.ts
@@ -6027,7 +6054,6 @@ function useDelay(options) {
6027
6054
  setTimer(void 0);
6028
6055
  }
6029
6056
  }, [disabled, timer]);
6030
- console.log(timer);
6031
6057
  return { restartTimer, clearTimer, hasActiveTimer: !!timer };
6032
6058
  }
6033
6059
 
@@ -6050,9 +6076,9 @@ var Label = ({
6050
6076
  };
6051
6077
 
6052
6078
  // src/hooks/useFocusManagement.ts
6053
- import { useCallback as useCallback4 } from "react";
6079
+ import { useCallback as useCallback5 } from "react";
6054
6080
  function useFocusManagement() {
6055
- const getFocusableElements = useCallback4(() => {
6081
+ const getFocusableElements = useCallback5(() => {
6056
6082
  return Array.from(
6057
6083
  document.querySelectorAll(
6058
6084
  'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
@@ -6061,7 +6087,7 @@ function useFocusManagement() {
6061
6087
  (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
6062
6088
  );
6063
6089
  }, []);
6064
- const getNextFocusElement = useCallback4(() => {
6090
+ const getNextFocusElement = useCallback5(() => {
6065
6091
  const elements = getFocusableElements();
6066
6092
  if (elements.length === 0) {
6067
6093
  return void 0;
@@ -6073,11 +6099,11 @@ function useFocusManagement() {
6073
6099
  }
6074
6100
  return nextElement;
6075
6101
  }, [getFocusableElements]);
6076
- const focusNext = useCallback4(() => {
6102
+ const focusNext = useCallback5(() => {
6077
6103
  const nextElement = getNextFocusElement();
6078
6104
  nextElement?.focus();
6079
6105
  }, [getNextFocusElement]);
6080
- const getPreviousFocusElement = useCallback4(() => {
6106
+ const getPreviousFocusElement = useCallback5(() => {
6081
6107
  const elements = getFocusableElements();
6082
6108
  if (elements.length === 0) {
6083
6109
  return void 0;
@@ -6093,7 +6119,7 @@ function useFocusManagement() {
6093
6119
  }
6094
6120
  return previousElement;
6095
6121
  }, [getFocusableElements]);
6096
- const focusPrevious = useCallback4(() => {
6122
+ const focusPrevious = useCallback5(() => {
6097
6123
  const previousElement = getPreviousFocusElement();
6098
6124
  if (previousElement) previousElement.focus();
6099
6125
  }, [getPreviousFocusElement]);
@@ -6146,7 +6172,7 @@ var defaultEditCompleteOptions = {
6146
6172
  afterDelay: true,
6147
6173
  delay: 2500
6148
6174
  };
6149
- var Input = forwardRef2(function Input2({
6175
+ var Input = forwardRef3(function Input2({
6150
6176
  id,
6151
6177
  type = "text",
6152
6178
  value,
@@ -6242,7 +6268,7 @@ var InputUncontrolled = ({
6242
6268
  }
6243
6269
  );
6244
6270
  };
6245
- var FormInput = forwardRef2(function FormInput2({
6271
+ var FormInput = forwardRef3(function FormInput2({
6246
6272
  id,
6247
6273
  labelText,
6248
6274
  errorText,
@@ -6303,10 +6329,10 @@ var Pagination = ({
6303
6329
  const changePage = (page) => {
6304
6330
  onPageChanged(page);
6305
6331
  };
6306
- return /* @__PURE__ */ jsxs17("div", { className: clsx23("row gap-x-1", className), style, children: [
6332
+ return /* @__PURE__ */ jsxs17("div", { className: clsx23("flex-row-1", className), style, children: [
6307
6333
  /* @__PURE__ */ jsx27(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx27(ChevronFirst, {}) }),
6308
6334
  /* @__PURE__ */ jsx27(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx27(ChevronLeft2, {}) }),
6309
- /* @__PURE__ */ jsxs17("div", { className: "row min-w-56 gap-x-2 items-center justify-center mx-2 text-center", children: [
6335
+ /* @__PURE__ */ jsxs17("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
6310
6336
  /* @__PURE__ */ jsx27(
6311
6337
  Input,
6312
6338
  {
@@ -6336,7 +6362,7 @@ var Pagination = ({
6336
6362
  /* @__PURE__ */ jsx27(
6337
6363
  "span",
6338
6364
  {
6339
- className: "row flex-1 items-center justify-center select-none h-10 bg-surface text-on-surface rounded-md font-bold",
6365
+ className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-surface text-on-surface rounded-md font-bold",
6340
6366
  children: pageCount
6341
6367
  }
6342
6368
  )
@@ -6351,12 +6377,15 @@ import { Search } from "lucide-react";
6351
6377
  import clsx24 from "clsx";
6352
6378
 
6353
6379
  // src/hooks/useSearch.ts
6354
- import { useEffect as useEffect16, useMemo as useMemo2, useState as useState15 } from "react";
6380
+ import { useCallback as useCallback6, useEffect as useEffect16, useMemo as useMemo2, useState as useState15 } from "react";
6355
6381
 
6356
6382
  // src/util/simpleSearch.ts
6357
6383
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
6358
6384
  return objects.filter((object) => {
6359
- const mappedSearchKeywords = mapping(object).map((value) => value ? value.toLowerCase().trim() : void 0);
6385
+ const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
6386
+ if (!mappedSearchKeywords) {
6387
+ return true;
6388
+ }
6360
6389
  return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
6361
6390
  });
6362
6391
  };
@@ -6380,22 +6409,51 @@ var SimpleSearch = (search, objects) => {
6380
6409
  var useSearch = ({
6381
6410
  list,
6382
6411
  initialSearch,
6383
- searchMapping
6412
+ searchMapping,
6413
+ additionalSearchTags,
6414
+ isSearchInstant = true,
6415
+ sortingFunction,
6416
+ filter,
6417
+ disabled = false
6384
6418
  }) => {
6385
- const [items, setItems] = useState15(list);
6386
- const [search, setSearch] = useState15(initialSearch);
6419
+ const [search, setSearch] = useState15(initialSearch ?? "");
6420
+ const [result, setResult] = useState15(list);
6421
+ const searchTags = useMemo2(() => additionalSearchTags ?? [], [additionalSearchTags]);
6422
+ const updateSearch = useCallback6((newSearch) => {
6423
+ const usedSearch = newSearch ?? search;
6424
+ if (newSearch) {
6425
+ setSearch(search);
6426
+ }
6427
+ setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
6428
+ }, [searchTags, list, search, searchMapping]);
6387
6429
  useEffect16(() => {
6388
- setItems(list);
6389
- }, [list]);
6390
- const result = useMemo2(
6391
- () => MultiSearchWithMapping(search, items, searchMapping),
6392
- [search, items, searchMapping]
6393
- );
6430
+ if (isSearchInstant) {
6431
+ setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
6432
+ }
6433
+ }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
6434
+ const filteredResult = useMemo2(() => {
6435
+ if (!filter) {
6436
+ return result;
6437
+ }
6438
+ return result.filter(filter);
6439
+ }, [result, filter]);
6440
+ const sortedAndFilteredResult = useMemo2(() => {
6441
+ if (!sortingFunction) {
6442
+ return filteredResult;
6443
+ }
6444
+ return filteredResult.sort(sortingFunction);
6445
+ }, [filteredResult, sortingFunction]);
6446
+ const usedResult = useMemo2(() => {
6447
+ if (!disabled) {
6448
+ return sortedAndFilteredResult;
6449
+ }
6450
+ return list;
6451
+ }, [disabled, list, sortedAndFilteredResult]);
6394
6452
  return {
6395
- result,
6396
- hasResult: result.length > 0,
6397
- allItems: items,
6398
- setItems,
6453
+ result: usedResult,
6454
+ hasResult: usedResult.length > 0,
6455
+ allItems: list,
6456
+ updateSearch,
6399
6457
  search,
6400
6458
  setSearch
6401
6459
  };
@@ -6423,9 +6481,9 @@ var SearchableList = ({
6423
6481
  resultListClassName
6424
6482
  }) => {
6425
6483
  const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
6426
- const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
6427
- return /* @__PURE__ */ jsxs18("div", { className: clsx24("col gap-y-2", className), children: [
6428
- list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-4 items-center", children: [
6484
+ const { result, hasResult, search, setSearch, updateSearch } = useSearch({ list, initialSearch, searchMapping });
6485
+ return /* @__PURE__ */ jsxs18("div", { className: clsx24("flex-col-2", className), children: [
6486
+ list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs18("div", { className: "flex-row-2 justify-between items-center", children: [
6429
6487
  /* @__PURE__ */ jsx28(
6430
6488
  Input,
6431
6489
  {
@@ -6436,9 +6494,9 @@ var SearchableList = ({
6436
6494
  className: "w-full"
6437
6495
  }
6438
6496
  ),
6439
- /* @__PURE__ */ jsx28(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx28(Search, { className: "w-full h-full" }) })
6497
+ /* @__PURE__ */ jsx28(IconButton, { color: "neutral", onClick: () => updateSearch(), children: /* @__PURE__ */ jsx28(Search, { className: "w-full h-full" }) })
6440
6498
  ] }),
6441
- hasResult ? /* @__PURE__ */ jsx28("div", { className: clsx24("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ jsx28("div", { className: "row text-description py-2 px-2", children: translation("nothingFound") })
6499
+ hasResult ? /* @__PURE__ */ jsx28("div", { className: clsx24("flex-col-1 overflow-y-auto", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ jsx28("div", { className: "flex-row-2 text-description py-2 px-2", children: translation("nothingFound") })
6442
6500
  ] });
6443
6501
  };
6444
6502
 
@@ -6472,23 +6530,23 @@ var StepperBar = ({
6472
6530
  return /* @__PURE__ */ jsxs19(
6473
6531
  "div",
6474
6532
  {
6475
- className: clsx25("row justify-between", className),
6533
+ className: clsx25("flex-row-2 justify-between", className),
6476
6534
  children: [
6477
- /* @__PURE__ */ jsx29("div", { className: "row flex-[2] justify-start", children: /* @__PURE__ */ jsxs19(
6535
+ /* @__PURE__ */ jsx29("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ jsxs19(
6478
6536
  SolidButton,
6479
6537
  {
6480
6538
  disabled: currentStep === 0 || disabledSteps.has(currentStep),
6481
6539
  onClick: () => {
6482
6540
  update(currentStep - 1);
6483
6541
  },
6484
- className: "row gap-x-1 items-center justify-center",
6542
+ className: "flex-row-1 items-center justify-center",
6485
6543
  children: [
6486
6544
  /* @__PURE__ */ jsx29(ChevronLeft3, { size: 14 }),
6487
6545
  translation("back")
6488
6546
  ]
6489
6547
  }
6490
6548
  ) }),
6491
- /* @__PURE__ */ jsx29("div", { className: "row flex-[5] gap-x-2 justify-center items-center", children: showDots && dots.map((value, index) => {
6549
+ /* @__PURE__ */ jsx29("div", { className: "flex-row-2 flex-[5] justify-center items-center", children: showDots && dots.map((value, index) => {
6492
6550
  const seen = seenSteps.has(index);
6493
6551
  return /* @__PURE__ */ jsx29(
6494
6552
  "div",
@@ -6510,11 +6568,11 @@ var StepperBar = ({
6510
6568
  index
6511
6569
  );
6512
6570
  }) }),
6513
- currentStep !== numberOfSteps && /* @__PURE__ */ jsx29("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ jsxs19(
6571
+ currentStep !== numberOfSteps && /* @__PURE__ */ jsx29("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs19(
6514
6572
  SolidButton,
6515
6573
  {
6516
6574
  onClick: () => update(currentStep + 1),
6517
- className: "row gap-x-1 items-center justify-center",
6575
+ className: "flex-row-1 items-center justify-center",
6518
6576
  disabled: disabledSteps.has(currentStep),
6519
6577
  children: [
6520
6578
  translation("next"),
@@ -6522,12 +6580,12 @@ var StepperBar = ({
6522
6580
  ]
6523
6581
  }
6524
6582
  ) }),
6525
- currentStep === numberOfSteps && /* @__PURE__ */ jsx29("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ jsxs19(
6583
+ currentStep === numberOfSteps && /* @__PURE__ */ jsx29("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs19(
6526
6584
  SolidButton,
6527
6585
  {
6528
6586
  disabled: disabledSteps.has(currentStep),
6529
6587
  onClick: onFinish,
6530
- className: "row gap-x-1 items-center justify-center",
6588
+ className: "flex-row-1 items-center justify-center",
6531
6589
  children: [
6532
6590
  /* @__PURE__ */ jsx29(Check2, { size: 14 }),
6533
6591
  finishText ?? translation("confirm")
@@ -6592,14 +6650,14 @@ var TextImage = ({
6592
6650
  children: /* @__PURE__ */ jsxs20(
6593
6651
  "div",
6594
6652
  {
6595
- className: clsx26(`col px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
6653
+ className: clsx26(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
6596
6654
  children: [
6597
6655
  badge && /* @__PURE__ */ jsx30("div", { className: clsx26(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ jsx30("span", { className: "text-lg font-bold", children: badge }) }),
6598
- /* @__PURE__ */ jsxs20("div", { className: "col gap-y-1 overflow-hidden", children: [
6656
+ /* @__PURE__ */ jsxs20("div", { className: "flex-col-1 overflow-hidden", children: [
6599
6657
  /* @__PURE__ */ jsx30("span", { className: "textstyle-title-xl", children: title }),
6600
6658
  /* @__PURE__ */ jsx30("span", { className: "text-ellipsis overflow-hidden", children: description })
6601
6659
  ] }),
6602
- onShowMoreClicked && /* @__PURE__ */ jsx30("div", { className: "row mt-2 underline", children: /* @__PURE__ */ jsx30("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
6660
+ onShowMoreClicked && /* @__PURE__ */ jsx30("div", { className: "flex-row-2 mt-2 underline", children: /* @__PURE__ */ jsx30("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
6603
6661
  ]
6604
6662
  }
6605
6663
  )
@@ -6678,7 +6736,7 @@ var ErrorComponent = ({
6678
6736
  classname
6679
6737
  }) => {
6680
6738
  const translation = useTranslation([defaultErrorComponentTranslation], overwriteTranslation);
6681
- return /* @__PURE__ */ jsxs22("div", { className: clsx27("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
6739
+ return /* @__PURE__ */ jsxs22("div", { className: clsx27("flex-col-4 items-center justify-center w-full h-24", classname), children: [
6682
6740
  /* @__PURE__ */ jsx32(AlertOctagon, { size: 64, className: "text-warning" }),
6683
6741
  errorText ?? `${translation("errorOccurred")} :(`
6684
6742
  ] });
@@ -6696,7 +6754,7 @@ var LoadingAnimation = ({
6696
6754
  classname
6697
6755
  }) => {
6698
6756
  const translation = useTranslation([formTranslation], overwriteTranslation);
6699
- return /* @__PURE__ */ jsxs23("div", { className: clsx28("col items-center justify-center w-full h-24", classname), children: [
6757
+ return /* @__PURE__ */ jsxs23("div", { className: clsx28("flex-col-2 items-center justify-center w-full h-24", classname), children: [
6700
6758
  /* @__PURE__ */ jsx33(Helpwave, { animate: "loading" }),
6701
6759
  loadingText ?? `${translation("loading")}...`
6702
6760
  ] });
@@ -6736,7 +6794,7 @@ import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
6736
6794
  var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
6737
6795
  const paddingClass = ButtonUtil.paddingMapping[size];
6738
6796
  return /* @__PURE__ */ jsxs24("div", { className: "inline-block relative", children: [
6739
- isLoading && /* @__PURE__ */ jsx35("div", { className: clsx29("absolute inset-0 row items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ jsx35(Helpwave, { animate: "loading", className: "text-white" }) }),
6797
+ isLoading && /* @__PURE__ */ jsx35("div", { className: clsx29("flex-row-2 absolute inset-0 items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ jsx35(Helpwave, { animate: "loading", className: "text-white" }) }),
6740
6798
  /* @__PURE__ */ jsx35(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
6741
6799
  ] });
6742
6800
  };
@@ -6819,8 +6877,8 @@ var ConfirmModal = ({
6819
6877
  primary: "primary"
6820
6878
  };
6821
6879
  return /* @__PURE__ */ jsxs26(Modal, { ...restProps, onClose: onCancel, className: clsx30("justify-between", className), children: [
6822
- /* @__PURE__ */ jsx37("div", { className: "col grow", children }),
6823
- /* @__PURE__ */ jsxs26("div", { className: "row mt-3 gap-x-4 justify-end", children: [
6880
+ /* @__PURE__ */ jsx37("div", { className: "flex-col-2 grow", children }),
6881
+ /* @__PURE__ */ jsxs26("div", { className: "flex-row-4 mt-3 justify-end", children: [
6824
6882
  onCancel && /* @__PURE__ */ jsx37(
6825
6883
  SolidButton,
6826
6884
  {
@@ -6901,8 +6959,16 @@ var InputModal = ({
6901
6959
  };
6902
6960
 
6903
6961
  // src/components/user-action/Select.tsx
6904
- import { ChevronDown as ChevronDown4, ChevronUp as ChevronUp3 } from "lucide-react";
6905
- import { useEffect as useEffect19, useRef as useRef6, useState as useState18 } from "react";
6962
+ import { useCallback as useCallback7 } from "react";
6963
+ import { useEffect as useEffect20, useState as useState19 } from "react";
6964
+ import clsx33 from "clsx";
6965
+
6966
+ // src/components/user-action/Menu.tsx
6967
+ import {
6968
+ useEffect as useEffect19,
6969
+ useRef as useRef6,
6970
+ useState as useState18
6971
+ } from "react";
6906
6972
  import clsx31 from "clsx";
6907
6973
 
6908
6974
  // src/hooks/useOutsideClick.ts
@@ -6925,83 +6991,305 @@ var useOutsideClick = (refs, handler) => {
6925
6991
  }, [refs, handler]);
6926
6992
  };
6927
6993
 
6994
+ // src/util/PropsWithFunctionChildren.ts
6995
+ var resolve = (children, bag) => {
6996
+ if (typeof children === "function") {
6997
+ return children(bag);
6998
+ }
6999
+ return children ?? void 0;
7000
+ };
7001
+ var BagFunctionUtil = {
7002
+ resolve
7003
+ };
7004
+
7005
+ // src/hooks/usePopoverPosition.ts
7006
+ var defaultPopoverPositionOptions = {
7007
+ edgePadding: 16,
7008
+ outerGap: 4,
7009
+ horizontalAlignment: "leftInside",
7010
+ verticalAlignment: "bottomOutside",
7011
+ disabled: false
7012
+ };
7013
+ var usePopoverPosition = (trigger, options) => {
7014
+ const {
7015
+ edgePadding,
7016
+ outerGap,
7017
+ verticalAlignment,
7018
+ horizontalAlignment,
7019
+ disabled
7020
+ } = { ...defaultPopoverPositionOptions, ...options };
7021
+ if (disabled || !trigger) {
7022
+ return {};
7023
+ }
7024
+ const left = {
7025
+ leftOutside: trigger.left - outerGap,
7026
+ leftInside: trigger.left,
7027
+ rightOutside: trigger.right + outerGap,
7028
+ rightInside: trigger.right,
7029
+ center: trigger.left + trigger.width / 2
7030
+ }[horizontalAlignment];
7031
+ const top = {
7032
+ topOutside: trigger.top - outerGap,
7033
+ topInside: trigger.top,
7034
+ bottomOutside: trigger.bottom + outerGap,
7035
+ bottomInside: trigger.bottom,
7036
+ center: trigger.top + trigger.height / 2
7037
+ }[verticalAlignment];
7038
+ const translateX = {
7039
+ leftOutside: "-100%",
7040
+ leftInside: void 0,
7041
+ rightOutside: void 0,
7042
+ rightInside: "-100%",
7043
+ center: "-50%"
7044
+ }[horizontalAlignment];
7045
+ const translateY = {
7046
+ topOutside: "-100%",
7047
+ topInside: void 0,
7048
+ bottomOutside: void 0,
7049
+ bottomInside: "-100%",
7050
+ center: "-50%"
7051
+ }[verticalAlignment];
7052
+ return {
7053
+ left: Math.max(left, edgePadding),
7054
+ top: Math.max(top, edgePadding),
7055
+ translate: [translateX ?? "0", translateY ?? "0"].join(" ")
7056
+ };
7057
+ };
7058
+
7059
+ // src/components/user-action/Menu.tsx
7060
+ import { createPortal } from "react-dom";
7061
+ import { Fragment as Fragment3, jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
7062
+ var MenuItem = ({
7063
+ children,
7064
+ onClick,
7065
+ alignment = "left",
7066
+ isDisabled = false,
7067
+ className
7068
+ }) => /* @__PURE__ */ jsx40(
7069
+ "div",
7070
+ {
7071
+ className: clsx31("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold", {
7072
+ "text-right": alignment === "right",
7073
+ "text-left": alignment === "left",
7074
+ "text-disabled-text cursor-not-allowed": isDisabled,
7075
+ "text-menu-text hover:bg-primary/20": !isDisabled,
7076
+ "cursor-pointer": !!onClick
7077
+ }, className),
7078
+ onClick,
7079
+ children
7080
+ }
7081
+ );
7082
+ function getScrollableParents(element) {
7083
+ const scrollables = [];
7084
+ let parent = element.parentElement;
7085
+ while (parent) {
7086
+ scrollables.push(parent);
7087
+ parent = parent.parentElement;
7088
+ }
7089
+ return scrollables;
7090
+ }
7091
+ var Menu = ({
7092
+ trigger,
7093
+ children,
7094
+ alignmentHorizontal = "leftInside",
7095
+ alignmentVertical = "bottomOutside",
7096
+ showOnHover = false,
7097
+ disabled = false,
7098
+ menuClassName = ""
7099
+ }) => {
7100
+ const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
7101
+ const triggerRef = useRef6(null);
7102
+ const menuRef = useRef6(null);
7103
+ useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7104
+ const [isHidden, setIsHidden] = useState18(true);
7105
+ const bag = {
7106
+ isOpen,
7107
+ close: () => setIsOpen(false),
7108
+ toggleOpen: () => setIsOpen((prevState) => !prevState),
7109
+ disabled
7110
+ };
7111
+ const menuPosition = usePopoverPosition(
7112
+ triggerRef.current?.getBoundingClientRect(),
7113
+ { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
7114
+ );
7115
+ useEffect19(() => {
7116
+ if (!isOpen) return;
7117
+ const triggerEl = triggerRef.current;
7118
+ if (!triggerEl) return;
7119
+ const scrollableParents = getScrollableParents(triggerEl);
7120
+ const close = () => setIsOpen(false);
7121
+ scrollableParents.forEach((parent) => {
7122
+ parent.addEventListener("scroll", close);
7123
+ });
7124
+ window.addEventListener("resize", close);
7125
+ return () => {
7126
+ scrollableParents.forEach((parent) => {
7127
+ parent.removeEventListener("scroll", close);
7128
+ });
7129
+ window.removeEventListener("resize", close);
7130
+ };
7131
+ }, [isOpen, setIsOpen]);
7132
+ useEffect19(() => {
7133
+ if (isOpen) {
7134
+ setIsHidden(false);
7135
+ }
7136
+ }, [isOpen]);
7137
+ return /* @__PURE__ */ jsxs27(Fragment3, { children: [
7138
+ trigger(bag, triggerRef),
7139
+ createPortal(/* @__PURE__ */ jsx40(
7140
+ "div",
7141
+ {
7142
+ ref: menuRef,
7143
+ onClick: (e) => e.stopPropagation(),
7144
+ className: clsx31(
7145
+ "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-10",
7146
+ {
7147
+ "animate-pop-in": isOpen,
7148
+ "animate-pop-out": !isOpen,
7149
+ "hidden": isHidden
7150
+ },
7151
+ menuClassName
7152
+ ),
7153
+ onAnimationEnd: () => {
7154
+ if (!isOpen) {
7155
+ setIsHidden(true);
7156
+ }
7157
+ },
7158
+ style: {
7159
+ ...menuPosition
7160
+ },
7161
+ children: BagFunctionUtil.resolve(children, bag)
7162
+ }
7163
+ ), document.body)
7164
+ ] });
7165
+ };
7166
+
7167
+ // src/components/user-action/SearchBar.tsx
7168
+ import { Search as Search2 } from "lucide-react";
7169
+ import { clsx as clsx32 } from "clsx";
7170
+ import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
7171
+ var SearchBar = ({
7172
+ placeholder,
7173
+ onSearch,
7174
+ disableOnSearch,
7175
+ containerClassName,
7176
+ ...inputProps
7177
+ }) => {
7178
+ const translation = useTranslation([formTranslation]);
7179
+ return /* @__PURE__ */ jsxs28("div", { className: clsx32("flex-row-2 justify-between items-center", containerClassName), children: [
7180
+ /* @__PURE__ */ jsx41(
7181
+ Input,
7182
+ {
7183
+ ...inputProps,
7184
+ placeholder: placeholder ?? translation("search")
7185
+ }
7186
+ ),
7187
+ onSearch && /* @__PURE__ */ jsx41(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ jsx41(Search2, { className: "w-full h-full" }) })
7188
+ ] });
7189
+ };
7190
+
6928
7191
  // src/components/user-action/Select.tsx
6929
- import { jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
7192
+ import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
7193
+ var SelectTile = ({
7194
+ className,
7195
+ disabledClassName,
7196
+ title,
7197
+ ...restProps
7198
+ }) => {
7199
+ return /* @__PURE__ */ jsx42(
7200
+ Tile,
7201
+ {
7202
+ ...restProps,
7203
+ className: clsx33("px-2 py-1 rounded-md", className),
7204
+ disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
7205
+ title: { ...title, className: title.className ?? "font-semibold" }
7206
+ }
7207
+ );
7208
+ };
6930
7209
  var Select = ({
6931
7210
  value,
6932
7211
  label,
6933
7212
  options,
6934
7213
  onChange,
6935
7214
  hintText = "",
6936
- isDisabled,
6937
- isSearchEnabled = false,
7215
+ selectedDisplayOverwrite,
7216
+ searchOptions,
7217
+ additionalItems,
6938
7218
  className,
6939
- selectedDisplayOverwrite
7219
+ triggerClassName,
7220
+ hintTextClassName,
7221
+ ...menuProps
6940
7222
  }) => {
6941
- const triggerRef = useRef6(null);
6942
- const menuRef = useRef6(null);
6943
- const [isOpen, setIsOpen] = useState18(false);
6944
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
6945
7223
  const selectedOption = options.find((option) => option.value === value);
6946
7224
  if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
6947
7225
  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");
6948
7226
  }
6949
7227
  const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
6950
- return /* @__PURE__ */ jsxs27("div", { className: clsx31(className), children: [
6951
- label && /* @__PURE__ */ jsx40(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx31("mb-1", label.className) }),
6952
- /* @__PURE__ */ jsxs27("div", { className: "relative", children: [
6953
- /* @__PURE__ */ jsxs27(
6954
- "button",
6955
- {
6956
- ref: triggerRef,
6957
- className: clsx31(
6958
- "btn-md justify-between w-full border-2",
6959
- {
6960
- "rounded-b-lg": !open,
6961
- "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
6962
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
6963
- }
6964
- ),
6965
- onClick: () => setIsOpen(!isOpen),
6966
- disabled: isDisabled,
6967
- children: [
6968
- !isShowingHint && /* @__PURE__ */ jsx40("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? selectedOption?.label }),
6969
- isShowingHint && /* @__PURE__ */ jsx40("span", { className: "textstyle-description", children: hintText }),
6970
- isOpen ? /* @__PURE__ */ jsx40(ChevronUp3, {}) : /* @__PURE__ */ jsx40(ChevronDown4, {})
6971
- ]
6972
- }
6973
- ),
6974
- isOpen && /* @__PURE__ */ jsx40(
6975
- "div",
6976
- {
6977
- ref: menuRef,
6978
- 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",
6979
- children: /* @__PURE__ */ jsx40(
6980
- SearchableList,
6981
- {
6982
- list: options,
6983
- minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
6984
- searchMapping: (item) => item.searchTags,
6985
- itemMapper: (option, index) => /* @__PURE__ */ jsx40(
6986
- Tile,
7228
+ const { result, search, setSearch } = useSearch({
7229
+ list: options,
7230
+ searchMapping: useCallback7((item) => item.searchTags, []),
7231
+ ...searchOptions
7232
+ });
7233
+ return /* @__PURE__ */ jsxs29("div", { className: clsx33(className), children: [
7234
+ label && /* @__PURE__ */ jsx42(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx33("mb-1", label.className) }),
7235
+ /* @__PURE__ */ jsx42(
7236
+ Menu,
7237
+ {
7238
+ ...menuProps,
7239
+ trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ jsxs29(
7240
+ "button",
7241
+ {
7242
+ ref,
7243
+ className: clsx33(
7244
+ "btn-md justify-between w-full border-2",
7245
+ {
7246
+ "rounded-b-lg": !open,
7247
+ "bg-menu-background text-menu-text border-menu-border hover:border-primary": !disabled,
7248
+ "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
7249
+ },
7250
+ triggerClassName
7251
+ ),
7252
+ onClick: toggleOpen,
7253
+ disabled,
7254
+ children: [
7255
+ !isShowingHint && /* @__PURE__ */ jsx42("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
7256
+ isShowingHint && /* @__PURE__ */ jsx42("span", { className: clsx33("textstyle-description", hintTextClassName), children: hintText }),
7257
+ /* @__PURE__ */ jsx42(ExpansionIcon, { isExpanded: isOpen })
7258
+ ]
7259
+ }
7260
+ ),
7261
+ menuClassName: clsx33("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
7262
+ children: (bag) => {
7263
+ const { close } = bag;
7264
+ return /* @__PURE__ */ jsxs29(Fragment4, { children: [
7265
+ !searchOptions?.disabled && /* @__PURE__ */ jsx42(
7266
+ SearchBar,
7267
+ {
7268
+ value: search,
7269
+ onChangeText: setSearch,
7270
+ autoFocus: true
7271
+ }
7272
+ ),
7273
+ /* @__PURE__ */ jsxs29("div", { className: "flex-col-2 overflow-y-auto", children: [
7274
+ result.map((option, index) => /* @__PURE__ */ jsx42(
7275
+ SelectTile,
6987
7276
  {
6988
- isSelected: selectedOption?.value === option.value,
6989
- className: "px-2 py-1 rounded-md",
6990
- disabledClassName: "text-disabled-text cursor-not-allowed",
6991
- title: { value: option.label, className: "font-semibold" },
7277
+ isSelected: option === selectedOption,
7278
+ title: { value: option.label },
6992
7279
  onClick: () => {
6993
7280
  onChange(option.value);
6994
- setIsOpen(false);
7281
+ close();
6995
7282
  },
6996
- isDisabled: option.disabled
7283
+ disabled: option.disabled
6997
7284
  },
6998
7285
  index
6999
- )
7000
- }
7001
- )
7286
+ )),
7287
+ additionalItems && additionalItems({ ...bag, search, selected: value })
7288
+ ] })
7289
+ ] });
7002
7290
  }
7003
- )
7004
- ] })
7291
+ }
7292
+ )
7005
7293
  ] });
7006
7294
  };
7007
7295
  var SelectUncontrolled = ({
@@ -7011,13 +7299,13 @@ var SelectUncontrolled = ({
7011
7299
  hintText,
7012
7300
  ...props
7013
7301
  }) => {
7014
- const [selected, setSelected] = useState18(value);
7015
- useEffect19(() => {
7302
+ const [selected, setSelected] = useState19(value);
7303
+ useEffect20(() => {
7016
7304
  if (options.find((options2) => options2.value === value)) {
7017
7305
  setSelected(value);
7018
7306
  }
7019
7307
  }, [options, value]);
7020
- return /* @__PURE__ */ jsx40(
7308
+ return /* @__PURE__ */ jsx42(
7021
7309
  Select,
7022
7310
  {
7023
7311
  value: selected,
@@ -7033,7 +7321,7 @@ var SelectUncontrolled = ({
7033
7321
  };
7034
7322
 
7035
7323
  // src/components/modals/LanguageModal.tsx
7036
- import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
7324
+ import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
7037
7325
  var defaultLanguageModalTranslation = {
7038
7326
  en: {
7039
7327
  language: "Language",
@@ -7056,7 +7344,7 @@ var LanguageModal = ({
7056
7344
  }) => {
7057
7345
  const { language, setLanguage } = useLanguage();
7058
7346
  const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
7059
- return /* @__PURE__ */ jsx41(
7347
+ return /* @__PURE__ */ jsx43(
7060
7348
  Modal,
7061
7349
  {
7062
7350
  headerProps: {
@@ -7066,8 +7354,8 @@ var LanguageModal = ({
7066
7354
  },
7067
7355
  onClose,
7068
7356
  ...modalProps,
7069
- children: /* @__PURE__ */ jsxs28("div", { className: "w-64", children: [
7070
- /* @__PURE__ */ jsx41(
7357
+ children: /* @__PURE__ */ jsxs30("div", { className: "w-64", children: [
7358
+ /* @__PURE__ */ jsx43(
7071
7359
  Select,
7072
7360
  {
7073
7361
  className: "mt-2",
@@ -7076,15 +7364,15 @@ var LanguageModal = ({
7076
7364
  onChange: (language2) => setLanguage(language2)
7077
7365
  }
7078
7366
  ),
7079
- /* @__PURE__ */ jsx41("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx41(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7367
+ /* @__PURE__ */ jsx43("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx43(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7080
7368
  ] })
7081
7369
  }
7082
7370
  );
7083
7371
  };
7084
7372
 
7085
7373
  // src/theming/useTheme.tsx
7086
- import { createContext as createContext2, useContext as useContext2, useEffect as useEffect20, useState as useState19 } from "react";
7087
- import { jsx as jsx42 } from "react/jsx-runtime";
7374
+ import { createContext as createContext2, useContext as useContext2, useEffect as useEffect21, useState as useState20 } from "react";
7375
+ import { jsx as jsx44 } from "react/jsx-runtime";
7088
7376
  var themes = ["light", "dark"];
7089
7377
  var defaultThemeTypeTranslation = {
7090
7378
  en: {
@@ -7113,22 +7401,22 @@ var ThemeContext = createContext2({
7113
7401
  setTheme: noop
7114
7402
  });
7115
7403
  var ThemeProvider = ({ children, initialTheme = "light" }) => {
7116
- const [theme, setTheme] = useState19(initialTheme);
7117
- useEffect20(() => {
7404
+ const [theme, setTheme] = useState20(initialTheme);
7405
+ useEffect21(() => {
7118
7406
  if (theme !== initialTheme) {
7119
7407
  console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
7120
7408
  setTheme(initialTheme);
7121
7409
  }
7122
7410
  }, [initialTheme]);
7123
- useEffect20(() => {
7411
+ useEffect21(() => {
7124
7412
  document.documentElement.setAttribute("data-theme", theme);
7125
7413
  }, [theme]);
7126
- return /* @__PURE__ */ jsx42(ThemeContext.Provider, { value: { theme, setTheme }, children });
7414
+ return /* @__PURE__ */ jsx44(ThemeContext.Provider, { value: { theme, setTheme }, children });
7127
7415
  };
7128
7416
  var useTheme = () => useContext2(ThemeContext);
7129
7417
 
7130
7418
  // src/components/modals/ThemeModal.tsx
7131
- import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
7419
+ import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
7132
7420
  var defaultConfirmDialogTranslation = {
7133
7421
  en: {
7134
7422
  chooseTheme: "Choose your preferred theme"
@@ -7145,7 +7433,7 @@ var ThemeModal = ({
7145
7433
  }) => {
7146
7434
  const { theme, setTheme } = useTheme();
7147
7435
  const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
7148
- return /* @__PURE__ */ jsx43(
7436
+ return /* @__PURE__ */ jsx45(
7149
7437
  Modal,
7150
7438
  {
7151
7439
  headerProps: {
@@ -7155,8 +7443,8 @@ var ThemeModal = ({
7155
7443
  },
7156
7444
  onClose,
7157
7445
  ...modalProps,
7158
- children: /* @__PURE__ */ jsxs29("div", { className: "w-64", children: [
7159
- /* @__PURE__ */ jsx43(
7446
+ children: /* @__PURE__ */ jsxs31("div", { className: "w-64", children: [
7447
+ /* @__PURE__ */ jsx45(
7160
7448
  Select,
7161
7449
  {
7162
7450
  className: "mt-2",
@@ -7165,7 +7453,7 @@ var ThemeModal = ({
7165
7453
  onChange: (theme2) => setTheme(theme2)
7166
7454
  }
7167
7455
  ),
7168
- /* @__PURE__ */ jsx43("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx43(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7456
+ /* @__PURE__ */ jsx45("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx45(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
7169
7457
  ] })
7170
7458
  }
7171
7459
  );
@@ -7175,18 +7463,18 @@ var ThemeModal = ({
7175
7463
  import { Check as Check4 } from "lucide-react";
7176
7464
 
7177
7465
  // src/components/user-action/Checkbox.tsx
7178
- import { useState as useState20 } from "react";
7466
+ import { useState as useState21 } from "react";
7179
7467
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
7180
7468
  import { Check as Check3, Minus } from "lucide-react";
7181
- import clsx32 from "clsx";
7182
- import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
7469
+ import clsx34 from "clsx";
7470
+ import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
7183
7471
  var checkboxSizeMapping = {
7184
- small: "size-4",
7472
+ small: "size-5",
7185
7473
  medium: "size-6",
7186
7474
  large: "size-8"
7187
7475
  };
7188
7476
  var checkboxIconSizeMapping = {
7189
- small: "size-3",
7477
+ small: "size-4",
7190
7478
  medium: "size-5",
7191
7479
  large: "size-7"
7192
7480
  };
@@ -7215,36 +7503,27 @@ var Checkbox = ({
7215
7503
  const newValue = checked === "indeterminate" ? false : !checked;
7216
7504
  propagateChange(newValue);
7217
7505
  };
7218
- return /* @__PURE__ */ jsxs30("div", { className: clsx32("row justify-center items-center", containerClassName), children: [
7219
- /* @__PURE__ */ jsx44(
7506
+ return /* @__PURE__ */ jsxs32("div", { className: clsx34("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
7507
+ /* @__PURE__ */ jsx46(
7220
7508
  CheckboxPrimitive.Root,
7221
7509
  {
7222
7510
  onCheckedChange: propagateChange,
7223
7511
  checked,
7224
7512
  disabled,
7225
7513
  id,
7226
- className: clsx32(usedSizeClass, `items-center border-2 rounded outline-none `, {
7514
+ className: clsx34(usedSizeClass, `items-center border-2 rounded outline-none `, {
7227
7515
  "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
7228
- "focus:border-primary": !disabled,
7516
+ "focus:border-primary group-hover:border-primary ": !disabled,
7229
7517
  "bg-surface": !disabled && !checked,
7230
- "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate",
7231
- "hover:border-primary focus:hover:border-primary": !disabled && !checked
7518
+ "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
7232
7519
  }, className),
7233
- children: /* @__PURE__ */ jsxs30(CheckboxPrimitive.Indicator, { children: [
7234
- checked === true && /* @__PURE__ */ jsx44(Check3, { className: innerIconSize }),
7235
- checked === "indeterminate" && /* @__PURE__ */ jsx44(Minus, { className: innerIconSize })
7520
+ children: /* @__PURE__ */ jsxs32(CheckboxPrimitive.Indicator, { children: [
7521
+ checked === true && /* @__PURE__ */ jsx46(Check3, { className: innerIconSize }),
7522
+ checked === "indeterminate" && /* @__PURE__ */ jsx46(Minus, { className: innerIconSize })
7236
7523
  ] })
7237
7524
  }
7238
7525
  ),
7239
- label && /* @__PURE__ */ jsx44(
7240
- Label,
7241
- {
7242
- ...label,
7243
- className: clsx32("cursor-pointer", label.className),
7244
- htmlFor: id,
7245
- onClick: changeValue
7246
- }
7247
- )
7526
+ label && /* @__PURE__ */ jsx46(Label, { ...label, className: clsx34(label.className), htmlFor: id })
7248
7527
  ] });
7249
7528
  };
7250
7529
  var CheckboxUncontrolled = ({
@@ -7253,7 +7532,7 @@ var CheckboxUncontrolled = ({
7253
7532
  defaultValue = false,
7254
7533
  ...props
7255
7534
  }) => {
7256
- const [checked, setChecked] = useState20(defaultValue);
7535
+ const [checked, setChecked] = useState21(defaultValue);
7257
7536
  const handleChange = (checked2) => {
7258
7537
  if (onChangeTristate) {
7259
7538
  onChangeTristate(checked2);
@@ -7263,7 +7542,7 @@ var CheckboxUncontrolled = ({
7263
7542
  }
7264
7543
  setChecked(checked2);
7265
7544
  };
7266
- return /* @__PURE__ */ jsx44(
7545
+ return /* @__PURE__ */ jsx46(
7267
7546
  Checkbox,
7268
7547
  {
7269
7548
  ...props,
@@ -7275,8 +7554,8 @@ var CheckboxUncontrolled = ({
7275
7554
 
7276
7555
  // src/components/properties/PropertyBase.tsx
7277
7556
  import { AlertTriangle } from "lucide-react";
7278
- import clsx33 from "clsx";
7279
- import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
7557
+ import clsx35 from "clsx";
7558
+ import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
7280
7559
  var PropertyBase = ({
7281
7560
  overwriteTranslation,
7282
7561
  name,
@@ -7290,36 +7569,44 @@ var PropertyBase = ({
7290
7569
  }) => {
7291
7570
  const translation = useTranslation([formTranslation], overwriteTranslation);
7292
7571
  const requiredAndNoValue = softRequired && !hasValue;
7293
- return /* @__PURE__ */ jsxs31("div", { className: clsx33("row gap-x-0 group", className), children: [
7294
- /* @__PURE__ */ jsxs31(
7572
+ return /* @__PURE__ */ jsxs33("div", { className: clsx35("flex-row-0 group", className), children: [
7573
+ /* @__PURE__ */ jsxs33(
7295
7574
  "div",
7296
7575
  {
7297
- className: clsx33("row gap-x-2 !w-[200px] px-4 py-2 items-center rounded-l-xl border-2 border-r-0", {
7298
- "bg-property-title-background property-title-text group-hover:border-primary": !requiredAndNoValue,
7299
- "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7300
- }, className),
7576
+ className: clsx35(
7577
+ "flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
7578
+ {
7579
+ "bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
7580
+ "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7581
+ },
7582
+ className
7583
+ ),
7301
7584
  children: [
7302
- icon,
7303
- name
7585
+ /* @__PURE__ */ jsx47("div", { className: "max-w-6 min-w-6 text-text-default", children: icon }),
7586
+ /* @__PURE__ */ jsx47("span", { className: "font-semibold", children: name })
7304
7587
  ]
7305
7588
  }
7306
7589
  ),
7307
- /* @__PURE__ */ jsxs31(
7590
+ /* @__PURE__ */ jsxs33(
7308
7591
  "div",
7309
7592
  {
7310
- className: clsx33("row gap-x-0 grow justify-between items-center rounded-r-xl border-2 border-l-0", {
7311
- "bg-surface group-hover:border-primary": !requiredAndNoValue,
7312
- "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7313
- }, className),
7593
+ className: clsx35(
7594
+ "flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
7595
+ {
7596
+ "bg-surface group-hover:border-primary": !requiredAndNoValue,
7597
+ "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7598
+ },
7599
+ className
7600
+ ),
7314
7601
  children: [
7315
7602
  input({ softRequired, hasValue }),
7316
- requiredAndNoValue && /* @__PURE__ */ jsx45("div", { className: "text-warning pr-4", children: /* @__PURE__ */ jsx45(AlertTriangle, { size: 24 }) }),
7317
- onRemove && /* @__PURE__ */ jsx45(
7603
+ requiredAndNoValue && /* @__PURE__ */ jsx47("div", { className: "text-warning", children: /* @__PURE__ */ jsx47(AlertTriangle, { size: 24 }) }),
7604
+ onRemove && hasValue && /* @__PURE__ */ jsx47(
7318
7605
  TextButton,
7319
7606
  {
7320
7607
  onClick: onRemove,
7321
7608
  color: "negative",
7322
- className: clsx33("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
7609
+ className: clsx35("items-center", { "!text-transparent": !hasValue || readOnly }),
7323
7610
  disabled: !hasValue || readOnly,
7324
7611
  children: translation("remove")
7325
7612
  }
@@ -7331,7 +7618,7 @@ var PropertyBase = ({
7331
7618
  };
7332
7619
 
7333
7620
  // src/components/properties/CheckboxProperty.tsx
7334
- import { jsx as jsx46 } from "react/jsx-runtime";
7621
+ import { jsx as jsx48 } from "react/jsx-runtime";
7335
7622
  var CheckboxProperty = ({
7336
7623
  overwriteTranslation,
7337
7624
  value,
@@ -7340,30 +7627,31 @@ var CheckboxProperty = ({
7340
7627
  ...baseProps
7341
7628
  }) => {
7342
7629
  const translation = useTranslation([formTranslation], overwriteTranslation);
7343
- return /* @__PURE__ */ jsx46(
7630
+ return /* @__PURE__ */ jsx48(
7344
7631
  PropertyBase,
7345
7632
  {
7346
7633
  ...baseProps,
7347
7634
  hasValue: true,
7348
7635
  readOnly,
7349
- icon: /* @__PURE__ */ jsx46(Check4, { size: 16 }),
7350
- input: () => /* @__PURE__ */ jsx46("div", { className: "row py-2 px-4 items-center", children: /* @__PURE__ */ jsx46(
7636
+ icon: /* @__PURE__ */ jsx48(Check4, { size: 24 }),
7637
+ input: () => /* @__PURE__ */ jsx48(
7351
7638
  Checkbox,
7352
7639
  {
7353
7640
  checked: value ?? true,
7354
7641
  disabled: readOnly,
7355
7642
  onChange,
7356
- label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" }
7643
+ label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" },
7644
+ containerClassName: "w-full"
7357
7645
  }
7358
- ) })
7646
+ )
7359
7647
  }
7360
7648
  );
7361
7649
  };
7362
7650
 
7363
7651
  // src/components/properties/DateProperty.tsx
7364
7652
  import { CalendarDays } from "lucide-react";
7365
- import clsx34 from "clsx";
7366
- import { jsx as jsx47 } from "react/jsx-runtime";
7653
+ import clsx36 from "clsx";
7654
+ import { jsx as jsx49 } from "react/jsx-runtime";
7367
7655
  var DateProperty = ({
7368
7656
  value,
7369
7657
  onChange = noop,
@@ -7374,35 +7662,29 @@ var DateProperty = ({
7374
7662
  }) => {
7375
7663
  const hasValue = !!value;
7376
7664
  const dateText = value ? type === "dateTime" ? formatDateTime(value) : formatDate(value) : "";
7377
- return /* @__PURE__ */ jsx47(
7665
+ return /* @__PURE__ */ jsx49(
7378
7666
  PropertyBase,
7379
7667
  {
7380
7668
  ...baseProps,
7381
7669
  hasValue,
7382
- icon: /* @__PURE__ */ jsx47(CalendarDays, { size: 16 }),
7383
- input: ({ softRequired }) => /* @__PURE__ */ jsx47(
7384
- "div",
7670
+ icon: /* @__PURE__ */ jsx49(CalendarDays, { size: 24 }),
7671
+ input: ({ softRequired }) => /* @__PURE__ */ jsx49(
7672
+ Input,
7385
7673
  {
7386
- className: clsx34("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7387
- children: /* @__PURE__ */ jsx47(
7388
- Input,
7389
- {
7390
- className: clsx34("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
7391
- value: dateText,
7392
- type: type === "dateTime" ? "datetime-local" : "date",
7393
- readOnly,
7394
- onChange: (event) => {
7395
- const value2 = event.target.value;
7396
- if (!value2) {
7397
- event.preventDefault();
7398
- return;
7399
- }
7400
- const dueDate = new Date(value2);
7401
- onChange(dueDate);
7402
- },
7403
- onEditCompleted: (value2) => onEditComplete(new Date(value2))
7674
+ className: clsx36("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
7675
+ value: dateText,
7676
+ type: type === "dateTime" ? "datetime-local" : "date",
7677
+ readOnly,
7678
+ onChange: (event) => {
7679
+ const value2 = event.target.value;
7680
+ if (!value2) {
7681
+ event.preventDefault();
7682
+ return;
7404
7683
  }
7405
- )
7684
+ const dueDate = new Date(value2);
7685
+ onChange(dueDate);
7686
+ },
7687
+ onEditCompleted: (value2) => onEditComplete(new Date(value2))
7406
7688
  }
7407
7689
  )
7408
7690
  }
@@ -7410,14 +7692,15 @@ var DateProperty = ({
7410
7692
  };
7411
7693
 
7412
7694
  // src/components/properties/MultiSelectProperty.tsx
7413
- import { List } from "lucide-react";
7414
- import clsx36 from "clsx";
7695
+ import { List, Plus as Plus2 } from "lucide-react";
7696
+ import clsx38 from "clsx";
7415
7697
 
7416
7698
  // src/components/user-action/MultiSelect.tsx
7417
- import { useEffect as useEffect21, useRef as useRef7, useState as useState21 } from "react";
7418
- import { ChevronDown as ChevronDown5, ChevronUp as ChevronUp4 } from "lucide-react";
7419
- import clsx35 from "clsx";
7420
- import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
7699
+ import { useCallback as useCallback8 } from "react";
7700
+ import { useEffect as useEffect22, useState as useState22 } from "react";
7701
+ import clsx37 from "clsx";
7702
+ import { Plus } from "lucide-react";
7703
+ import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
7421
7704
  var defaultMultiSelectTranslation = {
7422
7705
  en: {
7423
7706
  selected: `{{amount}} selected`
@@ -7428,89 +7711,107 @@ var defaultMultiSelectTranslation = {
7428
7711
  };
7429
7712
  var MultiSelect = ({
7430
7713
  overwriteTranslation,
7431
- options,
7432
7714
  label,
7715
+ options,
7433
7716
  onChange,
7434
7717
  hintText,
7435
- isDisabled = false,
7436
- isSearchEnabled = false,
7437
7718
  selectedDisplayOverwrite,
7719
+ searchOptions,
7720
+ additionalItems,
7438
7721
  useChipDisplay = false,
7439
- className = ""
7722
+ className,
7723
+ triggerClassName,
7724
+ hintTextClassName,
7725
+ ...menuProps
7440
7726
  }) => {
7441
7727
  const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
7442
- const triggerRef = useRef7(null);
7443
- const menuRef = useRef7(null);
7444
- const [isOpen, setIsOpen] = useState21(false);
7445
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7728
+ const { result, search, setSearch } = useSearch({
7729
+ list: options,
7730
+ searchMapping: useCallback8((item) => item.searchTags, []),
7731
+ ...searchOptions
7732
+ });
7446
7733
  const selectedItems = options.filter((value) => value.selected);
7447
7734
  const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
7448
- return /* @__PURE__ */ jsxs32("div", { className: clsx35(className), children: [
7449
- label && /* @__PURE__ */ jsx48(
7735
+ return /* @__PURE__ */ jsxs34("div", { className: clsx37(className), children: [
7736
+ label && /* @__PURE__ */ jsx50(
7450
7737
  Label,
7451
7738
  {
7452
7739
  ...label,
7453
7740
  htmlFor: label.name,
7454
- className: clsx35(" mb-1", label.className),
7741
+ className: clsx37(" mb-1", label.className),
7455
7742
  labelType: label.labelType ?? "labelBig"
7456
7743
  }
7457
7744
  ),
7458
- /* @__PURE__ */ jsxs32("div", { className: "relative", children: [
7459
- /* @__PURE__ */ jsxs32(
7460
- "button",
7461
- {
7462
- ref: triggerRef,
7463
- className: clsx35(
7464
- "btn-md justify-between w-full border-2 h-auto",
7465
- {
7466
- "rounded-b-lg": !open,
7467
- "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
7468
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
7469
- }
7470
- ),
7471
- onClick: () => setIsOpen(!isOpen),
7472
- disabled: isDisabled,
7473
- children: [
7474
- !isShowingHint && /* @__PURE__ */ jsx48("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? (useChipDisplay && selectedItems ? /* @__PURE__ */ jsx48(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) : translation("selected", { replacements: { amount: selectedItems.length.toString() } })) }),
7475
- isShowingHint && /* @__PURE__ */ jsx48("span", { className: "textstyle-description", children: hintText ?? translation("select") }),
7476
- isOpen ? /* @__PURE__ */ jsx48(ChevronUp4, { size: 24, className: "min-w-6" }) : /* @__PURE__ */ jsx48(ChevronDown5, { className: "min-w-6" })
7477
- ]
7478
- }
7479
- ),
7480
- isOpen && /* @__PURE__ */ jsxs32(
7481
- "div",
7482
- {
7483
- ref: menuRef,
7484
- 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",
7485
- children: [
7486
- /* @__PURE__ */ jsx48(
7487
- SearchableList,
7745
+ /* @__PURE__ */ jsx50(
7746
+ Menu,
7747
+ {
7748
+ ...menuProps,
7749
+ trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ jsx50(
7750
+ "button",
7751
+ {
7752
+ ref,
7753
+ className: clsx37(
7754
+ "btn-md justify-between w-full border-2 h-auto",
7488
7755
  {
7489
- list: options,
7490
- minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
7491
- searchMapping: (item) => item.searchTags,
7492
- itemMapper: (option, index) => /* @__PURE__ */ jsx48(
7493
- Tile,
7756
+ "min-h-14": useChipDisplay,
7757
+ "bg-menu-background text-menu-text border-menu-border hover:border-primary": !disabled,
7758
+ "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
7759
+ },
7760
+ triggerClassName
7761
+ ),
7762
+ onClick: toggleOpen,
7763
+ disabled,
7764
+ children: useChipDisplay ? /* @__PURE__ */ jsx50(Fragment5, { children: isShowingHint ? /* @__PURE__ */ jsx50(IconButton, { disabled, size: "small", color: "neutral", children: /* @__PURE__ */ jsx50(Plus, {}) }) : /* @__PURE__ */ jsx50(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ jsxs34(Fragment5, { children: [
7765
+ !isShowingHint && /* @__PURE__ */ jsx50("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
7766
+ isShowingHint && /* @__PURE__ */ jsx50("span", { className: clsx37("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
7767
+ /* @__PURE__ */ jsx50(ExpansionIcon, { isExpanded: isOpen })
7768
+ ] })
7769
+ }
7770
+ ),
7771
+ menuClassName: clsx37("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
7772
+ children: (bag) => {
7773
+ const { close } = bag;
7774
+ return /* @__PURE__ */ jsxs34(Fragment5, { children: [
7775
+ !searchOptions?.disabled && /* @__PURE__ */ jsx50(
7776
+ SearchBar,
7777
+ {
7778
+ value: search,
7779
+ onChangeText: setSearch,
7780
+ autoFocus: true
7781
+ }
7782
+ ),
7783
+ /* @__PURE__ */ jsxs34("div", { className: "flex-col-2 overflow-y-auto", children: [
7784
+ result.map((option, index) => {
7785
+ const update = () => {
7786
+ onChange(options.map((value) => value.value === option.value ? {
7787
+ ...option,
7788
+ selected: !value.selected
7789
+ } : value));
7790
+ };
7791
+ return /* @__PURE__ */ jsx50(
7792
+ SelectTile,
7494
7793
  {
7495
- isSelected: option.selected,
7496
- className: "px-2 py-1 rounded-md",
7497
- disabledClassName: "text-disabled-text cursor-not-allowed",
7498
- title: { value: option.label, className: "font-semibold" },
7499
- onClick: () => {
7500
- onChange(options.map((value) => value.value === option.value ? {
7501
- ...option,
7502
- selected: !value.selected
7503
- } : value));
7504
- },
7505
- isDisabled: option.disabled
7794
+ prefix: /* @__PURE__ */ jsx50(
7795
+ Checkbox,
7796
+ {
7797
+ checked: option.selected,
7798
+ onChange: update,
7799
+ size: "small",
7800
+ disabled: option.disabled
7801
+ }
7802
+ ),
7803
+ title: { value: option.label },
7804
+ onClick: update,
7805
+ disabled: option.disabled
7506
7806
  },
7507
7807
  index
7508
- )
7509
- }
7510
- ),
7511
- /* @__PURE__ */ jsxs32("div", { className: "row justify-between mt-2", children: [
7512
- /* @__PURE__ */ jsxs32("div", { className: "row gap-x-2", children: [
7513
- /* @__PURE__ */ jsx48(
7808
+ );
7809
+ }),
7810
+ additionalItems && additionalItems({ ...bag, search })
7811
+ ] }),
7812
+ /* @__PURE__ */ jsxs34("div", { className: "flex-row-2 justify-between", children: [
7813
+ /* @__PURE__ */ jsxs34("div", { className: "flex-row-2", children: [
7814
+ /* @__PURE__ */ jsx50(
7514
7815
  SolidButton,
7515
7816
  {
7516
7817
  color: "neutral",
@@ -7525,7 +7826,7 @@ var MultiSelect = ({
7525
7826
  children: translation("all")
7526
7827
  }
7527
7828
  ),
7528
- /* @__PURE__ */ jsx48(
7829
+ /* @__PURE__ */ jsx50(
7529
7830
  SolidButton,
7530
7831
  {
7531
7832
  color: "neutral",
@@ -7540,12 +7841,12 @@ var MultiSelect = ({
7540
7841
  }
7541
7842
  )
7542
7843
  ] }),
7543
- /* @__PURE__ */ jsx48(SolidButton, { size: "small", onClick: () => setIsOpen(false), children: "Done" })
7844
+ /* @__PURE__ */ jsx50(SolidButton, { size: "small", onClick: close, children: "Done" })
7544
7845
  ] })
7545
- ]
7846
+ ] });
7546
7847
  }
7547
- )
7548
- ] })
7848
+ }
7849
+ )
7549
7850
  ] });
7550
7851
  };
7551
7852
  var MultiSelectUncontrolled = ({
@@ -7553,11 +7854,11 @@ var MultiSelectUncontrolled = ({
7553
7854
  onChange,
7554
7855
  ...props
7555
7856
  }) => {
7556
- const [usedOptions, setUsedOptions] = useState21(options);
7557
- useEffect21(() => {
7857
+ const [usedOptions, setUsedOptions] = useState22(options);
7858
+ useEffect22(() => {
7558
7859
  setUsedOptions(options);
7559
7860
  }, [options]);
7560
- return /* @__PURE__ */ jsx48(
7861
+ return /* @__PURE__ */ jsx50(
7561
7862
  MultiSelect,
7562
7863
  {
7563
7864
  ...props,
@@ -7571,7 +7872,7 @@ var MultiSelectUncontrolled = ({
7571
7872
  };
7572
7873
 
7573
7874
  // src/components/properties/MultiSelectProperty.tsx
7574
- import { jsx as jsx49 } from "react/jsx-runtime";
7875
+ import { jsx as jsx51 } from "react/jsx-runtime";
7575
7876
  var MultiSelectProperty = ({
7576
7877
  overwriteTranslation,
7577
7878
  options,
@@ -7579,11 +7880,12 @@ var MultiSelectProperty = ({
7579
7880
  readOnly = false,
7580
7881
  softRequired,
7581
7882
  onRemove,
7883
+ onAddNew,
7582
7884
  ...multiSelectProps
7583
7885
  }) => {
7584
7886
  const translation = useTranslation([formTranslation], overwriteTranslation);
7585
7887
  const hasValue = options.some((value) => value.selected);
7586
- return /* @__PURE__ */ jsx49(
7888
+ return /* @__PURE__ */ jsx51(
7587
7889
  PropertyBase,
7588
7890
  {
7589
7891
  name,
@@ -7591,20 +7893,42 @@ var MultiSelectProperty = ({
7591
7893
  readOnly,
7592
7894
  softRequired,
7593
7895
  hasValue,
7594
- icon: /* @__PURE__ */ jsx49(List, { size: 16 }),
7595
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx49(
7596
- "div",
7896
+ icon: /* @__PURE__ */ jsx51(List, { size: 24 }),
7897
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx51(
7898
+ MultiSelect,
7597
7899
  {
7598
- className: clsx36("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7599
- children: /* @__PURE__ */ jsx49(
7600
- MultiSelect,
7900
+ ...multiSelectProps,
7901
+ className: clsx38("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7902
+ options,
7903
+ disabled: readOnly,
7904
+ useChipDisplay: true,
7905
+ hintText: `${translation("select")}...`,
7906
+ searchOptions: {
7907
+ sortingFunction: (a, b) => a.value.localeCompare(b.value),
7908
+ ...multiSelectProps?.searchOptions
7909
+ },
7910
+ additionalItems: ({ close, search }) => {
7911
+ if (!onAddNew && !search.trim()) {
7912
+ return void 0;
7913
+ }
7914
+ return /* @__PURE__ */ jsx51(
7915
+ SelectTile,
7916
+ {
7917
+ prefix: /* @__PURE__ */ jsx51(Plus2, {}),
7918
+ title: { value: `${translation("add")} ${search.trim()}` },
7919
+ onClick: () => {
7920
+ onAddNew(search);
7921
+ close();
7922
+ },
7923
+ disabled: options.some((value) => value.value === search.trim())
7924
+ }
7925
+ );
7926
+ },
7927
+ triggerClassName: clsx38(
7928
+ "!border-none !p-0 !min-h-10",
7601
7929
  {
7602
- ...multiSelectProps,
7603
- className: clsx36("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7604
- options,
7605
- isDisabled: readOnly,
7606
- useChipDisplay: true,
7607
- hintText: `${translation("select")}...`
7930
+ "!bg-warning !text-surface-warning": softRequired2 && !hasValue,
7931
+ "": !softRequired2 || hasValue
7608
7932
  }
7609
7933
  )
7610
7934
  }
@@ -7615,8 +7939,8 @@ var MultiSelectProperty = ({
7615
7939
 
7616
7940
  // src/components/properties/NumberProperty.tsx
7617
7941
  import { Binary } from "lucide-react";
7618
- import clsx37 from "clsx";
7619
- import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
7942
+ import clsx39 from "clsx";
7943
+ import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
7620
7944
  var defaultNumberPropertyTranslation = {
7621
7945
  en: {
7622
7946
  value: "Value"
@@ -7637,23 +7961,23 @@ var NumberProperty = ({
7637
7961
  }) => {
7638
7962
  const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
7639
7963
  const hasValue = value !== void 0;
7640
- return /* @__PURE__ */ jsx50(
7964
+ return /* @__PURE__ */ jsx52(
7641
7965
  PropertyBase,
7642
7966
  {
7643
7967
  ...baseProps,
7644
7968
  onRemove,
7645
7969
  hasValue,
7646
- icon: /* @__PURE__ */ jsx50(Binary, { size: 16 }),
7647
- input: ({ softRequired }) => /* @__PURE__ */ jsxs33(
7970
+ icon: /* @__PURE__ */ jsx52(Binary, { size: 24 }),
7971
+ input: ({ softRequired }) => /* @__PURE__ */ jsxs35(
7648
7972
  "div",
7649
7973
  {
7650
- className: clsx37("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7974
+ className: clsx39("flex-row-2 grow", { "text-warning": softRequired && !hasValue }),
7651
7975
  children: [
7652
- /* @__PURE__ */ jsx50(
7976
+ /* @__PURE__ */ jsx52(
7653
7977
  Input,
7654
7978
  {
7655
7979
  expanded: false,
7656
- className: clsx37("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7980
+ className: clsx39("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7657
7981
  value: value?.toString() ?? "",
7658
7982
  type: "number",
7659
7983
  readOnly,
@@ -7676,7 +8000,7 @@ var NumberProperty = ({
7676
8000
  }
7677
8001
  }
7678
8002
  ),
7679
- suffix && /* @__PURE__ */ jsx50("span", { className: clsx37("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
8003
+ suffix && /* @__PURE__ */ jsx52("span", { className: clsx39("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
7680
8004
  ]
7681
8005
  }
7682
8006
  )
@@ -7685,9 +8009,9 @@ var NumberProperty = ({
7685
8009
  };
7686
8010
 
7687
8011
  // src/components/properties/SelectProperty.tsx
7688
- import { List as List2 } from "lucide-react";
7689
- import clsx38 from "clsx";
7690
- import { jsx as jsx51 } from "react/jsx-runtime";
8012
+ import { List as List2, Plus as Plus3 } from "lucide-react";
8013
+ import clsx40 from "clsx";
8014
+ import { jsx as jsx53 } from "react/jsx-runtime";
7691
8015
  var SingleSelectProperty = ({
7692
8016
  overwriteTranslation,
7693
8017
  value,
@@ -7696,11 +8020,12 @@ var SingleSelectProperty = ({
7696
8020
  readOnly = false,
7697
8021
  softRequired,
7698
8022
  onRemove,
8023
+ onAddNew,
7699
8024
  ...selectProps
7700
8025
  }) => {
7701
8026
  const translation = useTranslation([formTranslation], overwriteTranslation);
7702
8027
  const hasValue = value !== void 0;
7703
- return /* @__PURE__ */ jsx51(
8028
+ return /* @__PURE__ */ jsx53(
7704
8029
  PropertyBase,
7705
8030
  {
7706
8031
  name,
@@ -7708,22 +8033,45 @@ var SingleSelectProperty = ({
7708
8033
  readOnly,
7709
8034
  softRequired,
7710
8035
  hasValue,
7711
- icon: /* @__PURE__ */ jsx51(List2, { size: 16 }),
7712
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx51(
7713
- "div",
8036
+ icon: /* @__PURE__ */ jsx53(List2, { size: 24 }),
8037
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx53(
8038
+ Select,
7714
8039
  {
7715
- className: clsx38("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7716
- children: /* @__PURE__ */ jsx51(
7717
- Select,
8040
+ ...selectProps,
8041
+ value,
8042
+ options,
8043
+ disabled: readOnly,
8044
+ className: clsx40("w-full"),
8045
+ hintText: `${translation("select")}...`,
8046
+ searchOptions: {
8047
+ sortingFunction: (a, b) => a.value.localeCompare(b.value),
8048
+ ...selectProps?.searchOptions
8049
+ },
8050
+ additionalItems: ({ close, search }) => {
8051
+ if (!onAddNew && !search.trim()) {
8052
+ return void 0;
8053
+ }
8054
+ return /* @__PURE__ */ jsx53(
8055
+ SelectTile,
8056
+ {
8057
+ prefix: /* @__PURE__ */ jsx53(Plus3, {}),
8058
+ title: { value: `${translation("add")} ${search.trim()}` },
8059
+ onClick: () => {
8060
+ onAddNew(search);
8061
+ close();
8062
+ },
8063
+ disabled: options.some((value2) => value2.value === search.trim())
8064
+ }
8065
+ );
8066
+ },
8067
+ triggerClassName: clsx40(
8068
+ "!border-none",
7718
8069
  {
7719
- ...selectProps,
7720
- value,
7721
- options,
7722
- isDisabled: readOnly,
7723
- className: clsx38("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7724
- hintText: `${translation("select")}...`
8070
+ "!bg-warning !text-surface-warning": softRequired2 && !hasValue,
8071
+ "!bg-property-title-background": !softRequired2 || hasValue
7725
8072
  }
7726
- )
8073
+ ),
8074
+ hintTextClassName: softRequired2 && !hasValue ? "text-surface-warning" : void 0
7727
8075
  }
7728
8076
  )
7729
8077
  }
@@ -7732,12 +8080,12 @@ var SingleSelectProperty = ({
7732
8080
 
7733
8081
  // src/components/properties/TextProperty.tsx
7734
8082
  import { Text } from "lucide-react";
7735
- import clsx40 from "clsx";
8083
+ import clsx42 from "clsx";
7736
8084
 
7737
8085
  // src/components/user-action/Textarea.tsx
7738
- import { useEffect as useEffect22, useState as useState22 } from "react";
7739
- import clsx39 from "clsx";
7740
- import { jsx as jsx52, jsxs as jsxs34 } from "react/jsx-runtime";
8086
+ import { useEffect as useEffect23, useState as useState23 } from "react";
8087
+ import clsx41 from "clsx";
8088
+ import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
7741
8089
  var Textarea = ({
7742
8090
  label,
7743
8091
  headline,
@@ -7750,39 +8098,48 @@ var Textarea = ({
7750
8098
  onEditCompleted = noop,
7751
8099
  saveDelayOptions,
7752
8100
  defaultStyle = true,
8101
+ disabled = false,
7753
8102
  className,
7754
8103
  ...props
7755
8104
  }) => {
7756
- const [hasFocus, setHasFocus] = useState22(false);
8105
+ const [hasFocus, setHasFocus] = useState23(false);
7757
8106
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
7758
8107
  const onEditCompletedWrapper = (text) => {
7759
8108
  onEditCompleted(text);
7760
8109
  clearTimer();
7761
8110
  };
7762
- return /* @__PURE__ */ jsxs34("div", { className: "w-full", children: [
7763
- label && /* @__PURE__ */ jsx52(
8111
+ return /* @__PURE__ */ jsxs36("div", { className: "w-full", children: [
8112
+ label && /* @__PURE__ */ jsx54(
7764
8113
  Label,
7765
8114
  {
7766
8115
  ...label,
7767
8116
  htmlFor: id,
7768
- className: clsx39("mb-1", label.className),
8117
+ className: clsx41("mb-1", label.className),
7769
8118
  labelType: label.labelType ?? "labelSmall"
7770
8119
  }
7771
8120
  ),
7772
- /* @__PURE__ */ jsxs34(
8121
+ /* @__PURE__ */ jsxs36(
7773
8122
  "div",
7774
8123
  {
7775
- className: `${clsx39(" bg-surface text-on-surface focus-within:border-primary relative", { "shadow border-2 hover:border-primary rounded-lg": defaultStyle })}`,
8124
+ className: clsx41(
8125
+ "bg-surface text-on-surface relative",
8126
+ {
8127
+ "shadow border-2 rounded-lg": defaultStyle,
8128
+ "hover:border-primary focus-within:border-primary": defaultStyle && !disabled,
8129
+ "border-disabled-border cursor-not-allowed": defaultStyle && !disabled
8130
+ }
8131
+ ),
7776
8132
  children: [
7777
- headline && /* @__PURE__ */ jsx52("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
7778
- /* @__PURE__ */ jsx52(
8133
+ headline && /* @__PURE__ */ jsx54("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
8134
+ /* @__PURE__ */ jsx54(
7779
8135
  "textarea",
7780
8136
  {
7781
8137
  id,
7782
- className: clsx39("pt-0 px-3 border-transparent focus:border-transparent focus:ring-0 appearance-none border w-full leading-tight focus:outline-none", {
8138
+ className: clsx41("pt-0 px-3 border-transparent appearance-none w-full leading-tight focus:ring-0 focus:outline-none", {
7783
8139
  "resize-none": !resizable,
7784
8140
  "h-32": defaultStyle,
7785
- "mt-3": !headline
8141
+ "mt-3": !headline,
8142
+ "text-disabled-text": disabled
7786
8143
  }, className),
7787
8144
  onChange: (event) => {
7788
8145
  const value = event.target.value;
@@ -7800,13 +8157,14 @@ var Textarea = ({
7800
8157
  onEditCompletedWrapper(event.target.value);
7801
8158
  setHasFocus(false);
7802
8159
  },
8160
+ disabled,
7803
8161
  ...props
7804
8162
  }
7805
8163
  )
7806
8164
  ]
7807
8165
  }
7808
8166
  ),
7809
- hasFocus && disclaimer && /* @__PURE__ */ jsx52("label", { className: "text-negative", children: disclaimer })
8167
+ hasFocus && disclaimer && /* @__PURE__ */ jsx54("label", { className: "text-negative", children: disclaimer })
7810
8168
  ] });
7811
8169
  };
7812
8170
  var TextareaUncontrolled = ({
@@ -7814,11 +8172,11 @@ var TextareaUncontrolled = ({
7814
8172
  onChangeText = noop,
7815
8173
  ...props
7816
8174
  }) => {
7817
- const [text, setText] = useState22(value);
7818
- useEffect22(() => {
8175
+ const [text, setText] = useState23(value);
8176
+ useEffect23(() => {
7819
8177
  setText(value);
7820
8178
  }, [value]);
7821
- return /* @__PURE__ */ jsx52(
8179
+ return /* @__PURE__ */ jsx54(
7822
8180
  Textarea,
7823
8181
  {
7824
8182
  ...props,
@@ -7832,7 +8190,7 @@ var TextareaUncontrolled = ({
7832
8190
  };
7833
8191
 
7834
8192
  // src/components/properties/TextProperty.tsx
7835
- import { jsx as jsx53 } from "react/jsx-runtime";
8193
+ import { jsx as jsx55 } from "react/jsx-runtime";
7836
8194
  var defaultTextPropertyTranslation = {
7837
8195
  en: {
7838
8196
  text: "Text"
@@ -7852,42 +8210,36 @@ var TextProperty = ({
7852
8210
  }) => {
7853
8211
  const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
7854
8212
  const hasValue = value !== void 0;
7855
- return /* @__PURE__ */ jsx53(
8213
+ return /* @__PURE__ */ jsx55(
7856
8214
  PropertyBase,
7857
8215
  {
7858
8216
  ...baseProps,
7859
8217
  onRemove,
7860
8218
  hasValue,
7861
- icon: /* @__PURE__ */ jsx53(Text, { size: 16 }),
7862
- input: ({ softRequired }) => /* @__PURE__ */ jsx53(
7863
- "div",
8219
+ icon: /* @__PURE__ */ jsx55(Text, { size: 24 }),
8220
+ input: ({ softRequired }) => /* @__PURE__ */ jsx55(
8221
+ Textarea,
7864
8222
  {
7865
- className: clsx40("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7866
- children: /* @__PURE__ */ jsx53(
7867
- Textarea,
7868
- {
7869
- className: clsx40("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7870
- rows: 5,
7871
- defaultStyle: false,
7872
- value: value ?? "",
7873
- readOnly,
7874
- placeholder: `${translation("text")}...`,
7875
- onChangeText: (value2) => {
7876
- if (!value2) {
7877
- onRemove();
7878
- } else {
7879
- onChange(value2);
7880
- }
7881
- },
7882
- onEditCompleted: (value2) => {
7883
- if (!value2) {
7884
- onRemove();
7885
- } else {
7886
- onEditComplete(value2);
7887
- }
7888
- }
8223
+ className: clsx42("ring-0 border-0 outline-0 !px-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
8224
+ rows: 5,
8225
+ defaultStyle: false,
8226
+ value: value ?? "",
8227
+ readOnly,
8228
+ placeholder: `${translation("text")}...`,
8229
+ onChangeText: (value2) => {
8230
+ if (!value2) {
8231
+ onRemove();
8232
+ } else {
8233
+ onChange(value2);
7889
8234
  }
7890
- )
8235
+ },
8236
+ onEditCompleted: (value2) => {
8237
+ if (!value2) {
8238
+ onRemove();
8239
+ } else {
8240
+ onEditComplete(value2);
8241
+ }
8242
+ }
7891
8243
  }
7892
8244
  )
7893
8245
  }
@@ -7895,12 +8247,12 @@ var TextProperty = ({
7895
8247
  };
7896
8248
 
7897
8249
  // src/components/table/FillerRowElement.tsx
7898
- import { clsx as clsx41 } from "clsx";
7899
- import { jsx as jsx54 } from "react/jsx-runtime";
8250
+ import { clsx as clsx43 } from "clsx";
8251
+ import { jsx as jsx56 } from "react/jsx-runtime";
7900
8252
  var FillerRowElement = ({
7901
8253
  className
7902
8254
  }) => {
7903
- return /* @__PURE__ */ jsx54("div", { className: clsx41("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
8255
+ return /* @__PURE__ */ jsx56("div", { className: clsx43("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
7904
8256
  };
7905
8257
 
7906
8258
  // src/components/table/Filter.ts
@@ -7918,8 +8270,8 @@ var TableFilters = {
7918
8270
  };
7919
8271
 
7920
8272
  // src/components/table/Table.tsx
7921
- import { useCallback as useCallback5, useEffect as useEffect25, useMemo as useMemo3, useRef as useRef9, useState as useState24 } from "react";
7922
- import clsx45 from "clsx";
8273
+ import { useCallback as useCallback9, useEffect as useEffect26, useMemo as useMemo3, useRef as useRef7, useState as useState25 } from "react";
8274
+ import clsx46 from "clsx";
7923
8275
  import {
7924
8276
  flexRender,
7925
8277
  getCoreRowModel,
@@ -7932,90 +8284,8 @@ import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
7932
8284
 
7933
8285
  // src/components/table/TableFilterButton.tsx
7934
8286
  import { FilterIcon } from "lucide-react";
7935
-
7936
- // src/components/user-action/Menu.tsx
7937
- import { useRef as useRef8 } from "react";
7938
- import clsx42 from "clsx";
7939
-
7940
- // src/util/PropsWithFunctionChildren.ts
7941
- var resolve = (children, bag) => {
7942
- if (typeof children === "function") {
7943
- return children(bag);
7944
- }
7945
- return children ?? void 0;
7946
- };
7947
- var BagFunctionUtil = {
7948
- resolve
7949
- };
7950
-
7951
- // src/components/user-action/Menu.tsx
7952
- import { jsx as jsx55, jsxs as jsxs35 } from "react/jsx-runtime";
7953
- var MenuItem = ({
7954
- children,
7955
- onClick,
7956
- alignment = "left",
7957
- isDisabled = false,
7958
- className
7959
- }) => /* @__PURE__ */ jsx55(
7960
- "div",
7961
- {
7962
- className: clsx42("block px-3 py-1.5 bg-menu-background first:rounded-t-lg last:rounded-b-lg text-sm font-semibold", {
7963
- "text-right": alignment === "right",
7964
- "text-left": alignment === "left",
7965
- "text-disabled-text cursor-not-allowed": isDisabled,
7966
- "text-menu-text hover:bg-primary/20": !isDisabled,
7967
- "cursor-pointer": !!onClick
7968
- }, className),
7969
- onClick,
7970
- children
7971
- }
7972
- );
7973
- var Menu = ({
7974
- trigger,
7975
- children,
7976
- alignment = "tl",
7977
- showOnHover = false,
7978
- menuClassName = ""
7979
- }) => {
7980
- const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
7981
- const triggerRef = useRef8(null);
7982
- const menuRef = useRef8(null);
7983
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7984
- const bag = { isOpen, close: () => setIsOpen(false) };
7985
- return /* @__PURE__ */ jsxs35(
7986
- "div",
7987
- {
7988
- className: "relative",
7989
- ...handlers,
7990
- children: [
7991
- trigger(() => setIsOpen(!isOpen), triggerRef),
7992
- /* @__PURE__ */ jsx55(
7993
- "div",
7994
- {
7995
- ref: menuRef,
7996
- onClick: (e) => e.stopPropagation(),
7997
- className: clsx42(
7998
- "absolute top-full mt-1 min-w-40 rounded-lg bg-menu-background text-menu-text shadow-around-lg z-10",
7999
- {
8000
- "top-0": alignment[0] === "t",
8001
- "bottom-0": alignment[0] === "b",
8002
- "left-0": alignment[1] === "l",
8003
- "right-0": alignment[1] === "r",
8004
- "hidden": !isOpen
8005
- },
8006
- menuClassName
8007
- ),
8008
- children: BagFunctionUtil.resolve(children, bag)
8009
- }
8010
- )
8011
- ]
8012
- }
8013
- );
8014
- };
8015
-
8016
- // src/components/table/TableFilterButton.tsx
8017
- import { useEffect as useEffect23, useState as useState23 } from "react";
8018
- import { Fragment as Fragment3, jsx as jsx56, jsxs as jsxs36 } from "react/jsx-runtime";
8287
+ import { useEffect as useEffect24, useState as useState24 } from "react";
8288
+ import { Fragment as Fragment6, jsx as jsx57, jsxs as jsxs37 } from "react/jsx-runtime";
8019
8289
  var defaultTableFilterTranslation = {
8020
8290
  en: {
8021
8291
  filter: "Filter",
@@ -8040,17 +8310,17 @@ var TableFilterButton = ({
8040
8310
  }) => {
8041
8311
  const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
8042
8312
  const columnFilterValue = column.getFilterValue();
8043
- const [filterValue, setFilterValue] = useState23(columnFilterValue);
8313
+ const [filterValue, setFilterValue] = useState24(columnFilterValue);
8044
8314
  const hasFilter = !!filterValue;
8045
- useEffect23(() => {
8315
+ useEffect24(() => {
8046
8316
  setFilterValue(columnFilterValue);
8047
8317
  }, [columnFilterValue]);
8048
- return /* @__PURE__ */ jsx56(
8318
+ return /* @__PURE__ */ jsx57(
8049
8319
  Menu,
8050
8320
  {
8051
- trigger: (onClick, ref) => /* @__PURE__ */ jsxs36("div", { ref, className: "relative", children: [
8052
- /* @__PURE__ */ jsx56(IconButton, { color: "neutral", size: "tiny", onClick, children: /* @__PURE__ */ jsx56(FilterIcon, {}) }),
8053
- hasFilter && /* @__PURE__ */ jsx56(
8321
+ trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs37("div", { ref, className: "relative", children: [
8322
+ /* @__PURE__ */ jsx57(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ jsx57(FilterIcon, {}) }),
8323
+ hasFilter && /* @__PURE__ */ jsx57(
8054
8324
  "div",
8055
8325
  {
8056
8326
  className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
@@ -8058,9 +8328,9 @@ var TableFilterButton = ({
8058
8328
  }
8059
8329
  )
8060
8330
  ] }),
8061
- children: ({ close }) => /* @__PURE__ */ jsxs36("div", { className: "col gap-y-1 p-2 items-start font-normal text-menu-text", children: [
8062
- /* @__PURE__ */ jsx56("h4", { className: "textstyle-title-sm", children: translation("filter") }),
8063
- filterType === "text" && /* @__PURE__ */ jsx56(
8331
+ children: ({ close }) => /* @__PURE__ */ jsxs37("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
8332
+ /* @__PURE__ */ jsx57("h4", { className: "textstyle-title-sm", children: translation("filter") }),
8333
+ filterType === "text" && /* @__PURE__ */ jsx57(
8064
8334
  Input,
8065
8335
  {
8066
8336
  value: filterValue ?? "",
@@ -8070,8 +8340,8 @@ var TableFilterButton = ({
8070
8340
  className: "h-10"
8071
8341
  }
8072
8342
  ),
8073
- filterType === "range" && /* @__PURE__ */ jsxs36("div", { className: "row gap-x-2 items-center", children: [
8074
- /* @__PURE__ */ jsx56(
8343
+ filterType === "range" && /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 items-center", children: [
8344
+ /* @__PURE__ */ jsx57(
8075
8345
  Input,
8076
8346
  {
8077
8347
  value: filterValue?.[0] ?? "",
@@ -8084,8 +8354,8 @@ var TableFilterButton = ({
8084
8354
  className: "h-10 input-indicator-hidden w-40"
8085
8355
  }
8086
8356
  ),
8087
- /* @__PURE__ */ jsx56("span", { className: "font-bold", children: "-" }),
8088
- /* @__PURE__ */ jsx56(
8357
+ /* @__PURE__ */ jsx57("span", { className: "font-bold", children: "-" }),
8358
+ /* @__PURE__ */ jsx57(
8089
8359
  Input,
8090
8360
  {
8091
8361
  value: filterValue?.[1] ?? "",
@@ -8099,8 +8369,8 @@ var TableFilterButton = ({
8099
8369
  }
8100
8370
  )
8101
8371
  ] }),
8102
- filterType === "dateRange" && /* @__PURE__ */ jsxs36(Fragment3, { children: [
8103
- /* @__PURE__ */ jsx56(
8372
+ filterType === "dateRange" && /* @__PURE__ */ jsxs37(Fragment6, { children: [
8373
+ /* @__PURE__ */ jsx57(
8104
8374
  Input,
8105
8375
  {
8106
8376
  value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
@@ -8113,7 +8383,7 @@ var TableFilterButton = ({
8113
8383
  className: "h-10 w-50"
8114
8384
  }
8115
8385
  ),
8116
- /* @__PURE__ */ jsx56(
8386
+ /* @__PURE__ */ jsx57(
8117
8387
  Input,
8118
8388
  {
8119
8389
  value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
@@ -8127,12 +8397,12 @@ var TableFilterButton = ({
8127
8397
  }
8128
8398
  )
8129
8399
  ] }),
8130
- /* @__PURE__ */ jsxs36("div", { className: "row justify-end w-full", children: [
8131
- hasFilter && /* @__PURE__ */ jsx56(SolidButton, { color: "negative", size: "small", onClick: () => {
8400
+ /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 justify-end w-full", children: [
8401
+ hasFilter && /* @__PURE__ */ jsx57(SolidButton, { color: "negative", size: "small", onClick: () => {
8132
8402
  column.setFilterValue(void 0);
8133
8403
  close();
8134
8404
  }, children: translation("remove") }),
8135
- /* @__PURE__ */ jsx56(SolidButton, { size: "small", onClick: () => {
8405
+ /* @__PURE__ */ jsx57(SolidButton, { size: "small", onClick: () => {
8136
8406
  column.setFilterValue(filterValue);
8137
8407
  close();
8138
8408
  }, children: translation("apply") })
@@ -8143,9 +8413,9 @@ var TableFilterButton = ({
8143
8413
  };
8144
8414
 
8145
8415
  // src/components/table/TableSortButton.tsx
8146
- import { ChevronDown as ChevronDown6, ChevronsUpDown, ChevronUp as ChevronUp5 } from "lucide-react";
8147
- import clsx43 from "clsx";
8148
- import { jsx as jsx57 } from "react/jsx-runtime";
8416
+ import { ChevronDown as ChevronDown3, ChevronsUpDown, ChevronUp } from "lucide-react";
8417
+ import clsx44 from "clsx";
8418
+ import { jsx as jsx58 } from "react/jsx-runtime";
8149
8419
  var TableSortButton = ({
8150
8420
  sortDirection,
8151
8421
  invert = false,
@@ -8153,20 +8423,20 @@ var TableSortButton = ({
8153
8423
  className,
8154
8424
  ...buttonProps
8155
8425
  }) => {
8156
- let icon = /* @__PURE__ */ jsx57(ChevronsUpDown, { className: "w-full h-full" });
8426
+ let icon = /* @__PURE__ */ jsx58(ChevronsUpDown, { className: "w-full h-full" });
8157
8427
  if (sortDirection) {
8158
8428
  let usedSortDirection = sortDirection;
8159
8429
  if (invert) {
8160
8430
  usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
8161
8431
  }
8162
- icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx57(ChevronUp5, { className: "w-full h-full" }) : /* @__PURE__ */ jsx57(ChevronDown6, { className: "w-full h-full" });
8432
+ icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx58(ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ jsx58(ChevronDown3, { className: "w-full h-full" });
8163
8433
  }
8164
- return /* @__PURE__ */ jsx57(
8434
+ return /* @__PURE__ */ jsx58(
8165
8435
  IconButton,
8166
8436
  {
8167
8437
  size: "tiny",
8168
8438
  color,
8169
- className: clsx43(className),
8439
+ className: clsx44(className),
8170
8440
  ...buttonProps,
8171
8441
  children: icon
8172
8442
  }
@@ -8174,9 +8444,9 @@ var TableSortButton = ({
8174
8444
  };
8175
8445
 
8176
8446
  // src/hooks/useResizeCallbackWrapper.ts
8177
- import { useEffect as useEffect24 } from "react";
8447
+ import { useEffect as useEffect25 } from "react";
8178
8448
  var useResizeCallbackWrapper = (callback) => {
8179
- useEffect24(() => {
8449
+ useEffect25(() => {
8180
8450
  window.addEventListener("resize", callback);
8181
8451
  return () => {
8182
8452
  window.removeEventListener("resize", callback);
@@ -8185,17 +8455,17 @@ var useResizeCallbackWrapper = (callback) => {
8185
8455
  };
8186
8456
 
8187
8457
  // src/components/table/TableCell.tsx
8188
- import { clsx as clsx44 } from "clsx";
8189
- import { jsx as jsx58 } from "react/jsx-runtime";
8458
+ import { clsx as clsx45 } from "clsx";
8459
+ import { jsx as jsx59 } from "react/jsx-runtime";
8190
8460
  var TableCell = ({
8191
8461
  children,
8192
8462
  className
8193
8463
  }) => {
8194
- return /* @__PURE__ */ jsx58("span", { className: clsx44("block max-w-full overflow-ellipsis truncate", className), children });
8464
+ return /* @__PURE__ */ jsx59("span", { className: clsx45("block max-w-full overflow-ellipsis truncate", className), children });
8195
8465
  };
8196
8466
 
8197
8467
  // src/components/table/Table.tsx
8198
- import { jsx as jsx59, jsxs as jsxs37 } from "react/jsx-runtime";
8468
+ import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
8199
8469
  var Table = ({
8200
8470
  data,
8201
8471
  fillerRow,
@@ -8208,21 +8478,21 @@ var Table = ({
8208
8478
  columns,
8209
8479
  ...tableOptions
8210
8480
  }) => {
8211
- const ref = useRef9(null);
8212
- const tableRef = useRef9(null);
8213
- const [columnSizing, setColumnSizing] = useState24(columns.reduce((previousValue, currentValue) => {
8481
+ const ref = useRef7(null);
8482
+ const tableRef = useRef7(null);
8483
+ const [columnSizing, setColumnSizing] = useState25(columns.reduce((previousValue, currentValue) => {
8214
8484
  return {
8215
8485
  ...previousValue,
8216
8486
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
8217
8487
  };
8218
8488
  }, {}));
8219
- const [columnSizingInfo, setColumnSizingInfo] = useState24();
8220
- const [pagination, setPagination] = useState24({
8489
+ const [columnSizingInfo, setColumnSizingInfo] = useState25();
8490
+ const [pagination, setPagination] = useState25({
8221
8491
  pageSize: 10,
8222
8492
  pageIndex: 0,
8223
8493
  ...initialState?.pagination
8224
8494
  });
8225
- const [columnFilters, setColumnFilters] = useState24(initialState?.columnFilters);
8495
+ const [columnFilters, setColumnFilters] = useState25(initialState?.columnFilters);
8226
8496
  const computedColumnMinWidths = useMemo3(() => {
8227
8497
  return columns.reduce((previousValue, column) => {
8228
8498
  return {
@@ -8314,7 +8584,7 @@ var Table = ({
8314
8584
  minSize: 60,
8315
8585
  maxSize: 700,
8316
8586
  cell: ({ cell }) => {
8317
- return /* @__PURE__ */ jsx59(TableCell, { children: cell.getValue() });
8587
+ return /* @__PURE__ */ jsx60(TableCell, { children: cell.getValue() });
8318
8588
  },
8319
8589
  ...defaultColumn
8320
8590
  },
@@ -8362,18 +8632,18 @@ var Table = ({
8362
8632
  columnResizeMode: "onChange",
8363
8633
  ...tableOptions
8364
8634
  });
8365
- const [hasInitializedSizing, setHasInitializedSizing] = useState24(false);
8366
- useEffect25(() => {
8635
+ const [hasInitializedSizing, setHasInitializedSizing] = useState25(false);
8636
+ useEffect26(() => {
8367
8637
  if (!hasInitializedSizing && ref.current) {
8368
8638
  setHasInitializedSizing(true);
8369
8639
  table.setColumnSizing(updateColumnSizes(columnSizing));
8370
8640
  }
8371
8641
  }, [columnSizing, hasInitializedSizing]);
8372
- useResizeCallbackWrapper(useCallback5(() => {
8642
+ useResizeCallbackWrapper(useCallback9(() => {
8373
8643
  table.setColumnSizing(updateColumnSizes);
8374
8644
  }, [updateColumnSizes]));
8375
8645
  const pageCount = table.getPageCount();
8376
- useEffect25(() => {
8646
+ useEffect26(() => {
8377
8647
  const totalPages = pageCount;
8378
8648
  if (totalPages === 0) {
8379
8649
  if (pagination.pageIndex !== 0) {
@@ -8394,98 +8664,106 @@ var Table = ({
8394
8664
  const colSizes = {};
8395
8665
  for (let i = 0; i < headers.length; i++) {
8396
8666
  const header = headers[i];
8397
- colSizes[`--header-${header.id}-size`] = header.getSize();
8398
- colSizes[`--col-${header.column.id}-size`] = header.column.getSize();
8667
+ colSizes[`--header-${header.id}-size`] = Math.floor(header.getSize());
8668
+ colSizes[`--col-${header.column.id}-size`] = Math.floor(header.column.getSize());
8399
8669
  }
8400
8670
  return colSizes;
8401
8671
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
8402
- return /* @__PURE__ */ jsxs37("div", { ref, className: clsx45("col gap-y-4", className), children: [
8403
- /* @__PURE__ */ jsx59(Scrollbars3, { autoHeight: true, autoHeightMax: tableRef.current?.offsetHeight, autoHide: true, children: /* @__PURE__ */ jsxs37(
8404
- "table",
8672
+ return /* @__PURE__ */ jsxs38("div", { ref, className: clsx46("flex-col-4", className), children: [
8673
+ /* @__PURE__ */ jsx60(
8674
+ Scrollbars3,
8405
8675
  {
8406
- ref: tableRef,
8407
- className: clsx45(tableClassName),
8408
- style: {
8409
- ...columnSizeVars,
8410
- width: Math.max(table.getTotalSize(), ref.current?.offsetWidth ?? table.getTotalSize())
8411
- },
8412
- children: [
8413
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx59(
8414
- "col",
8415
- {
8416
- style: {
8417
- width: `calc(var(--header-${header?.id}-size) * 1px)`,
8418
- minWidth: header.column.columnDef.minSize,
8419
- maxWidth: header.column.columnDef.maxSize
8420
- }
8676
+ autoHeight: true,
8677
+ autoHeightMax: tableRef.current?.offsetHeight + 2,
8678
+ autoHide: true,
8679
+ children: /* @__PURE__ */ jsxs38(
8680
+ "table",
8681
+ {
8682
+ ref: tableRef,
8683
+ className: clsx46(tableClassName),
8684
+ style: {
8685
+ ...columnSizeVars,
8686
+ width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
8421
8687
  },
8422
- header.id
8423
- )) }, headerGroup.id)),
8424
- /* @__PURE__ */ jsx59("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
8425
- return /* @__PURE__ */ jsxs37(
8426
- "th",
8427
- {
8428
- colSpan: header.colSpan,
8429
- className: clsx45("relative group", header.column.columnDef.meta?.className),
8430
- children: [
8431
- /* @__PURE__ */ jsx59("div", { className: "row w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs37("div", { className: "row gap-x-1 items-center", children: [
8432
- header.column.getCanSort() && /* @__PURE__ */ jsx59(
8433
- TableSortButton,
8434
- {
8435
- sortDirection: header.column.getIsSorted(),
8436
- onClick: () => header.column.toggleSorting()
8437
- }
8438
- ),
8439
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx59(
8440
- TableFilterButton,
8441
- {
8442
- column: header.column,
8443
- filterType: header.column.columnDef.meta.filterType
8444
- }
8445
- ) : null,
8446
- flexRender(
8447
- header.column.columnDef.header,
8448
- header.getContext()
8449
- )
8450
- ] }) }),
8451
- header.column.getCanResize() && /* @__PURE__ */ jsx59(
8452
- "div",
8453
- {
8454
- onMouseDown: header.getResizeHandler(),
8455
- onTouchStart: header.getResizeHandler(),
8456
- onDoubleClick: () => {
8457
- header.column.resetSize();
8458
- },
8459
- className: "table-resize-indicator w-2 rounded bg-primary cursor-col-resize select-none touch-none opacity-0 group-hover:opacity-100 transition-opacity",
8460
- style: {
8461
- opacity: !columnSizingInfo?.columnSizingStart ? void 0 : columnSizingInfo?.columnSizingStart?.findIndex(([id, _]) => id === header.column.id) !== -1 ? 1 : columnSizingInfo?.columnSizingStart?.length !== 0 ? 0 : void 0
8462
- }
8463
- }
8464
- )
8465
- ]
8466
- },
8467
- header.id
8468
- );
8469
- }) }, headerGroup.id)) }),
8470
- /* @__PURE__ */ jsxs37("tbody", { children: [
8471
- table.getRowModel().rows.map((row) => {
8472
- return /* @__PURE__ */ jsx59("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
8473
- return /* @__PURE__ */ jsx59("td", { children: flexRender(
8474
- cell.column.columnDef.cell,
8475
- cell.getContext()
8476
- ) }, cell.id);
8477
- }) }, row.id);
8478
- }),
8479
- range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
8480
- return /* @__PURE__ */ jsx59("tr", { children: columns.map((column) => {
8481
- return /* @__PURE__ */ jsx59("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx59(FillerRowElement, {}) }, column.id);
8482
- }) }, "filler-row-" + index);
8483
- })
8484
- ] })
8485
- ]
8688
+ children: [
8689
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx60("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx60(
8690
+ "col",
8691
+ {
8692
+ style: {
8693
+ width: `calc(var(--header-${header?.id}-size) * 1px)`,
8694
+ minWidth: header.column.columnDef.minSize,
8695
+ maxWidth: header.column.columnDef.maxSize
8696
+ }
8697
+ },
8698
+ header.id
8699
+ )) }, headerGroup.id)),
8700
+ /* @__PURE__ */ jsx60("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx60("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
8701
+ return /* @__PURE__ */ jsxs38(
8702
+ "th",
8703
+ {
8704
+ colSpan: header.colSpan,
8705
+ className: clsx46("relative group", header.column.columnDef.meta?.className),
8706
+ children: [
8707
+ /* @__PURE__ */ jsx60("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs38("div", { className: "flex-row-1 items-center", children: [
8708
+ header.column.getCanSort() && /* @__PURE__ */ jsx60(
8709
+ TableSortButton,
8710
+ {
8711
+ sortDirection: header.column.getIsSorted(),
8712
+ onClick: () => header.column.toggleSorting()
8713
+ }
8714
+ ),
8715
+ header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx60(
8716
+ TableFilterButton,
8717
+ {
8718
+ column: header.column,
8719
+ filterType: header.column.columnDef.meta.filterType
8720
+ }
8721
+ ) : null,
8722
+ flexRender(
8723
+ header.column.columnDef.header,
8724
+ header.getContext()
8725
+ )
8726
+ ] }) }),
8727
+ header.column.getCanResize() && /* @__PURE__ */ jsx60(
8728
+ "div",
8729
+ {
8730
+ onMouseDown: header.getResizeHandler(),
8731
+ onTouchStart: header.getResizeHandler(),
8732
+ onDoubleClick: () => {
8733
+ header.column.resetSize();
8734
+ },
8735
+ className: "table-resize-indicator w-2 rounded bg-primary cursor-col-resize select-none touch-none opacity-0 group-hover:opacity-100 transition-opacity",
8736
+ style: {
8737
+ opacity: !columnSizingInfo?.columnSizingStart ? void 0 : columnSizingInfo?.columnSizingStart?.findIndex(([id, _]) => id === header.column.id) !== -1 ? 1 : columnSizingInfo?.columnSizingStart?.length !== 0 ? 0 : void 0
8738
+ }
8739
+ }
8740
+ )
8741
+ ]
8742
+ },
8743
+ header.id
8744
+ );
8745
+ }) }, headerGroup.id)) }),
8746
+ /* @__PURE__ */ jsxs38("tbody", { children: [
8747
+ table.getRowModel().rows.map((row) => {
8748
+ return /* @__PURE__ */ jsx60("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
8749
+ return /* @__PURE__ */ jsx60("td", { children: flexRender(
8750
+ cell.column.columnDef.cell,
8751
+ cell.getContext()
8752
+ ) }, cell.id);
8753
+ }) }, row.id);
8754
+ }),
8755
+ range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
8756
+ return /* @__PURE__ */ jsx60("tr", { children: columns.map((column) => {
8757
+ return /* @__PURE__ */ jsx60("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx60(FillerRowElement, {}) }, column.id);
8758
+ }) }, "filler-row-" + index);
8759
+ })
8760
+ ] })
8761
+ ]
8762
+ }
8763
+ )
8486
8764
  }
8487
- ) }),
8488
- /* @__PURE__ */ jsx59("div", { className: "row justify-center", children: /* @__PURE__ */ jsx59(
8765
+ ),
8766
+ /* @__PURE__ */ jsx60("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx60(
8489
8767
  Pagination,
8490
8768
  {
8491
8769
  pageIndex: table.getState().pagination.pageIndex,
@@ -8496,11 +8774,11 @@ var Table = ({
8496
8774
  ] });
8497
8775
  };
8498
8776
  var TableUncontrolled = ({ data, ...props }) => {
8499
- const [usedDate, setUsedData] = useState24(data);
8500
- useEffect25(() => {
8777
+ const [usedDate, setUsedData] = useState25(data);
8778
+ useEffect26(() => {
8501
8779
  setUsedData(data);
8502
8780
  }, [data]);
8503
- return /* @__PURE__ */ jsx59(
8781
+ return /* @__PURE__ */ jsx60(
8504
8782
  Table,
8505
8783
  {
8506
8784
  ...props,
@@ -8524,7 +8802,7 @@ var TableWithSelection = ({
8524
8802
  {
8525
8803
  id: selectionRowId,
8526
8804
  header: ({ table }) => {
8527
- return /* @__PURE__ */ jsx59(
8805
+ return /* @__PURE__ */ jsx60(
8528
8806
  Checkbox,
8529
8807
  {
8530
8808
  checked: table.getIsSomeRowsSelected() ? "indeterminate" : table.getIsAllRowsSelected(),
@@ -8537,7 +8815,7 @@ var TableWithSelection = ({
8537
8815
  );
8538
8816
  },
8539
8817
  cell: ({ row }) => {
8540
- return /* @__PURE__ */ jsx59(
8818
+ return /* @__PURE__ */ jsx60(
8541
8819
  Checkbox,
8542
8820
  {
8543
8821
  disabled: !row.getCanSelect(),
@@ -8556,15 +8834,15 @@ var TableWithSelection = ({
8556
8834
  ...columns
8557
8835
  ];
8558
8836
  }, [columns, selectionRowId]);
8559
- return /* @__PURE__ */ jsx59(
8837
+ return /* @__PURE__ */ jsx60(
8560
8838
  Table,
8561
8839
  {
8562
8840
  columns: columnsWithSelection,
8563
8841
  fillerRow: (columnId, table) => {
8564
8842
  if (columnId === selectionRowId) {
8565
- return /* @__PURE__ */ jsx59(Checkbox, { checked: false, disabled: true, containerClassName: "max-w-6" });
8843
+ return /* @__PURE__ */ jsx60(Checkbox, { checked: false, disabled: true, containerClassName: "max-w-6" });
8566
8844
  }
8567
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx59(FillerRowElement, {});
8845
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx60(FillerRowElement, {});
8568
8846
  },
8569
8847
  state: {
8570
8848
  rowSelection,
@@ -8578,7 +8856,7 @@ var TableWithSelection = ({
8578
8856
  },
8579
8857
  meta: {
8580
8858
  ...meta,
8581
- bodyRowClassName: clsx45(
8859
+ bodyRowClassName: clsx46(
8582
8860
  { "cursor-pointer": !disableClickRowClickSelection },
8583
8861
  meta?.bodyRowClassName
8584
8862
  )
@@ -8589,8 +8867,8 @@ var TableWithSelection = ({
8589
8867
  };
8590
8868
 
8591
8869
  // src/components/user-action/CopyToClipboardWrapper.tsx
8592
- import { useState as useState25 } from "react";
8593
- import { clsx as clsx46 } from "clsx";
8870
+ import { useState as useState26 } from "react";
8871
+ import { clsx as clsx47 } from "clsx";
8594
8872
 
8595
8873
  // src/util/writeToClipboard.ts
8596
8874
  var writeToClipboard = (text) => {
@@ -8599,7 +8877,7 @@ var writeToClipboard = (text) => {
8599
8877
 
8600
8878
  // src/components/user-action/CopyToClipboardWrapper.tsx
8601
8879
  import { CheckIcon, Copy } from "lucide-react";
8602
- import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
8880
+ import { jsx as jsx61, jsxs as jsxs39 } from "react/jsx-runtime";
8603
8881
  var CopyToClipboardWrapper = ({
8604
8882
  children,
8605
8883
  textToCopy,
@@ -8609,8 +8887,8 @@ var CopyToClipboardWrapper = ({
8609
8887
  zIndex = 10
8610
8888
  }) => {
8611
8889
  const translation = useTranslation([formTranslation]);
8612
- const [isShowingIndication, setIsShowingIndication] = useState25(false);
8613
- const [isShowingConfirmation, setIsShowingConfirmation] = useState25(false);
8890
+ const [isShowingIndication, setIsShowingIndication] = useState26(false);
8891
+ const [isShowingConfirmation, setIsShowingConfirmation] = useState26(false);
8614
8892
  const positionClasses = {
8615
8893
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
8616
8894
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -8630,10 +8908,10 @@ var CopyToClipboardWrapper = ({
8630
8908
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
8631
8909
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
8632
8910
  };
8633
- return /* @__PURE__ */ jsxs38(
8911
+ return /* @__PURE__ */ jsxs39(
8634
8912
  "div",
8635
8913
  {
8636
- className: clsx46("relative inline-block cursor-copy", containerClassName),
8914
+ className: clsx47("relative inline-block cursor-copy", containerClassName),
8637
8915
  onMouseEnter: () => {
8638
8916
  setIsShowingIndication(true);
8639
8917
  },
@@ -8648,10 +8926,10 @@ var CopyToClipboardWrapper = ({
8648
8926
  },
8649
8927
  children: [
8650
8928
  children,
8651
- /* @__PURE__ */ jsxs38(
8929
+ /* @__PURE__ */ jsxs39(
8652
8930
  "div",
8653
8931
  {
8654
- className: clsx46(
8932
+ className: clsx47(
8655
8933
  `absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
8656
8934
  shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
8657
8935
  "transition-opacity duration-200",
@@ -8663,18 +8941,18 @@ var CopyToClipboardWrapper = ({
8663
8941
  opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
8664
8942
  },
8665
8943
  children: [
8666
- isShowingConfirmation && /* @__PURE__ */ jsxs38("div", { className: "row gap-x-1", children: [
8667
- /* @__PURE__ */ jsx60(CheckIcon, { size: 16, className: "text-positive" }),
8944
+ isShowingConfirmation && /* @__PURE__ */ jsxs39("div", { className: "flex-row-1", children: [
8945
+ /* @__PURE__ */ jsx61(CheckIcon, { size: 16, className: "text-positive" }),
8668
8946
  translation("copied")
8669
8947
  ] }),
8670
- isShowingIndication && /* @__PURE__ */ jsxs38("div", { className: "row gap-x-1 text-description", children: [
8671
- /* @__PURE__ */ jsx60(Copy, { size: 16 }),
8948
+ isShowingIndication && /* @__PURE__ */ jsxs39("div", { className: "flex-row-1 text-description", children: [
8949
+ /* @__PURE__ */ jsx61(Copy, { size: 16 }),
8672
8950
  translation("clickToCopy")
8673
8951
  ] }),
8674
- /* @__PURE__ */ jsx60(
8952
+ /* @__PURE__ */ jsx61(
8675
8953
  "div",
8676
8954
  {
8677
- className: clsx46(`absolute w-0 h-0`, triangleClasses[position]),
8955
+ className: clsx47(`absolute w-0 h-0`, triangleClasses[position]),
8678
8956
  style: { ...triangleStyle[position], zIndex: zIndex + 1 }
8679
8957
  }
8680
8958
  )
@@ -8687,8 +8965,8 @@ var CopyToClipboardWrapper = ({
8687
8965
  };
8688
8966
 
8689
8967
  // src/components/user-action/DateAndTimePicker.tsx
8690
- import clsx47 from "clsx";
8691
- import { jsx as jsx61, jsxs as jsxs39 } from "react/jsx-runtime";
8968
+ import clsx48 from "clsx";
8969
+ import { jsx as jsx62, jsxs as jsxs40 } from "react/jsx-runtime";
8692
8970
  var DateTimePicker = ({
8693
8971
  overwriteTranslation,
8694
8972
  value = /* @__PURE__ */ new Date(),
@@ -8707,7 +8985,7 @@ var DateTimePicker = ({
8707
8985
  let dateDisplay;
8708
8986
  let timeDisplay;
8709
8987
  if (useDate) {
8710
- dateDisplay = /* @__PURE__ */ jsx61(
8988
+ dateDisplay = /* @__PURE__ */ jsx62(
8711
8989
  DatePicker,
8712
8990
  {
8713
8991
  ...datePickerProps,
@@ -8721,25 +8999,25 @@ var DateTimePicker = ({
8721
8999
  );
8722
9000
  }
8723
9001
  if (useTime) {
8724
- timeDisplay = /* @__PURE__ */ jsx61(
9002
+ timeDisplay = /* @__PURE__ */ jsx62(
8725
9003
  TimePicker,
8726
9004
  {
8727
9005
  ...timePickerProps,
8728
- className: clsx47("h-full", { "justify-between w-full": mode === "time" }),
9006
+ className: clsx48("h-full", { "justify-between w-full": mode === "time" }),
8729
9007
  maxHeight: 250,
8730
9008
  time: value,
8731
9009
  onChange
8732
9010
  }
8733
9011
  );
8734
9012
  }
8735
- return /* @__PURE__ */ jsxs39("div", { className: "col w-fit", children: [
8736
- /* @__PURE__ */ jsxs39("div", { className: "row gap-x-4", children: [
9013
+ return /* @__PURE__ */ jsxs40("div", { className: "flex-col-2 w-fit", children: [
9014
+ /* @__PURE__ */ jsxs40("div", { className: "flex-row-4", children: [
8737
9015
  dateDisplay,
8738
9016
  timeDisplay
8739
9017
  ] }),
8740
- /* @__PURE__ */ jsx61("div", { className: "row justify-end", children: /* @__PURE__ */ jsxs39("div", { className: "row gap-x-2 mt-1", children: [
8741
- /* @__PURE__ */ jsx61(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
8742
- /* @__PURE__ */ jsx61(
9018
+ /* @__PURE__ */ jsx62("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ jsxs40("div", { className: "flex-row-2 mt-1", children: [
9019
+ /* @__PURE__ */ jsx62(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
9020
+ /* @__PURE__ */ jsx62(
8743
9021
  SolidButton,
8744
9022
  {
8745
9023
  size: "medium",
@@ -8752,9 +9030,9 @@ var DateTimePicker = ({
8752
9030
  };
8753
9031
 
8754
9032
  // src/components/user-action/ScrollPicker.tsx
8755
- import { useCallback as useCallback6, useEffect as useEffect26, useState as useState26 } from "react";
8756
- import clsx48 from "clsx";
8757
- import { jsx as jsx62, jsxs as jsxs40 } from "react/jsx-runtime";
9033
+ import { useCallback as useCallback10, useEffect as useEffect27, useState as useState27 } from "react";
9034
+ import clsx49 from "clsx";
9035
+ import { jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
8758
9036
  var up = 1;
8759
9037
  var down = -1;
8760
9038
  var ScrollPicker = ({
@@ -8773,7 +9051,7 @@ var ScrollPicker = ({
8773
9051
  transition,
8774
9052
  items,
8775
9053
  lastTimeStamp
8776
- }, setAnimation] = useState26({
9054
+ }, setAnimation] = useState27({
8777
9055
  targetIndex: selectedIndex,
8778
9056
  currentIndex: disabled ? selectedIndex : 0,
8779
9057
  velocity: 0,
@@ -8789,7 +9067,7 @@ var ScrollPicker = ({
8789
9067
  const itemHeight = 40;
8790
9068
  const distance = 8;
8791
9069
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
8792
- const getDirection = useCallback6((targetIndex, currentIndex2, transition2, length) => {
9070
+ const getDirection = useCallback10((targetIndex, currentIndex2, transition2, length) => {
8793
9071
  if (targetIndex === currentIndex2) {
8794
9072
  return transition2 > 0 ? up : down;
8795
9073
  }
@@ -8799,7 +9077,7 @@ var ScrollPicker = ({
8799
9077
  }
8800
9078
  return distanceForward >= length / 2 ? down : up;
8801
9079
  }, []);
8802
- const animate = useCallback6((timestamp, startTime) => {
9080
+ const animate = useCallback10((timestamp, startTime) => {
8803
9081
  setAnimation((prevState) => {
8804
9082
  const {
8805
9083
  targetIndex,
@@ -8872,7 +9150,7 @@ var ScrollPicker = ({
8872
9150
  };
8873
9151
  });
8874
9152
  }, [disabled, getDirection, onChange]);
8875
- useEffect26(() => {
9153
+ useEffect27(() => {
8876
9154
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
8877
9155
  });
8878
9156
  const opacity = (transition2, index, itemsCount) => {
@@ -8893,7 +9171,7 @@ var ScrollPicker = ({
8893
9171
  }
8894
9172
  return clamp(1 - opacityValue / max);
8895
9173
  };
8896
- return /* @__PURE__ */ jsx62(
9174
+ return /* @__PURE__ */ jsx63(
8897
9175
  "div",
8898
9176
  {
8899
9177
  className: "relative overflow-hidden",
@@ -8903,27 +9181,27 @@ var ScrollPicker = ({
8903
9181
  setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + event.deltaY }));
8904
9182
  }
8905
9183
  },
8906
- children: /* @__PURE__ */ jsxs40("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
8907
- /* @__PURE__ */ jsx62(
9184
+ children: /* @__PURE__ */ jsxs41("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
9185
+ /* @__PURE__ */ jsx63(
8908
9186
  "div",
8909
9187
  {
8910
9188
  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 ",
8911
9189
  style: { height: `${itemHeight}px` }
8912
9190
  }
8913
9191
  ),
8914
- /* @__PURE__ */ jsx62(
9192
+ /* @__PURE__ */ jsx63(
8915
9193
  "div",
8916
9194
  {
8917
- className: "col select-none",
9195
+ className: "flex-col-2 select-none",
8918
9196
  style: {
8919
9197
  transform: `translateY(${-transition * (distance + itemHeight)}px)`,
8920
9198
  columnGap: `${distance}px`
8921
9199
  },
8922
- children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx62(
9200
+ children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx63(
8923
9201
  "div",
8924
9202
  {
8925
- className: clsx48(
8926
- `col items-center justify-center rounded-md`,
9203
+ className: clsx49(
9204
+ `flex-col-2 items-center justify-center rounded-md`,
8927
9205
  {
8928
9206
  "text-primary font-bold": currentIndex === index,
8929
9207
  "text-on-background": currentIndex === index,
@@ -8949,10 +9227,10 @@ var ScrollPicker = ({
8949
9227
  };
8950
9228
 
8951
9229
  // src/components/user-action/ToggleableInput.tsx
8952
- import { useEffect as useEffect27, useRef as useRef10, useState as useState27 } from "react";
9230
+ import { useEffect as useEffect28, useRef as useRef8, useState as useState28 } from "react";
8953
9231
  import { Pencil } from "lucide-react";
8954
- import clsx49 from "clsx";
8955
- import { jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
9232
+ import clsx50 from "clsx";
9233
+ import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
8956
9234
  var ToggleableInput = ({
8957
9235
  type = "text",
8958
9236
  value,
@@ -8967,26 +9245,26 @@ var ToggleableInput = ({
8967
9245
  saveDelayOptions,
8968
9246
  ...restProps
8969
9247
  }) => {
8970
- const [isEditing, setIsEditing] = useState27(initialState !== "display");
9248
+ const [isEditing, setIsEditing] = useState28(initialState !== "display");
8971
9249
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
8972
- const ref = useRef10(null);
9250
+ const ref = useRef8(null);
8973
9251
  const onEditCompletedWrapper = (text) => {
8974
9252
  onEditCompleted(text);
8975
9253
  clearTimer();
8976
9254
  };
8977
- useEffect27(() => {
9255
+ useEffect28(() => {
8978
9256
  if (isEditing) {
8979
9257
  ref.current?.focus();
8980
9258
  }
8981
9259
  }, [isEditing]);
8982
- return /* @__PURE__ */ jsxs41("div", { children: [
8983
- /* @__PURE__ */ jsxs41(
9260
+ return /* @__PURE__ */ jsxs42("div", { children: [
9261
+ /* @__PURE__ */ jsxs42(
8984
9262
  "div",
8985
9263
  {
8986
- className: clsx49("row items-center w-full gap-x-2 overflow-hidden", { "cursor-pointer": !isEditing }),
9264
+ className: clsx50("flex-row-2 items-center w-full overflow-hidden", { "cursor-pointer": !isEditing }),
8987
9265
  onClick: () => !isEditing ? setIsEditing(!isEditing) : void 0,
8988
9266
  children: [
8989
- /* @__PURE__ */ jsx63("div", { className: clsx49("row overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ jsx63(
9267
+ /* @__PURE__ */ jsx64("div", { className: clsx50("flex-row-2 overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ jsx64(
8990
9268
  "input",
8991
9269
  {
8992
9270
  ref,
@@ -9014,16 +9292,16 @@ var ToggleableInput = ({
9014
9292
  onEditCompletedWrapper(value);
9015
9293
  }
9016
9294
  },
9017
- className: clsx49(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
9295
+ className: clsx50(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
9018
9296
  underline: isEditing
9019
9297
  }, labelClassName),
9020
9298
  onFocus: (event) => event.target.select()
9021
9299
  }
9022
- ) : /* @__PURE__ */ jsx63("span", { className: clsx49("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
9023
- /* @__PURE__ */ jsx63(
9300
+ ) : /* @__PURE__ */ jsx64("span", { className: clsx50("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
9301
+ /* @__PURE__ */ jsx64(
9024
9302
  Pencil,
9025
9303
  {
9026
- className: clsx49(`cursor-pointer`, { "text-transparent": isEditing }),
9304
+ className: clsx50(`cursor-pointer`, { "text-transparent": isEditing }),
9027
9305
  size,
9028
9306
  style: { minWidth: `${size}px` }
9029
9307
  }
@@ -9031,7 +9309,7 @@ var ToggleableInput = ({
9031
9309
  ]
9032
9310
  }
9033
9311
  ),
9034
- isEditing && disclaimer && /* @__PURE__ */ jsx63("label", { className: "text-negative", children: disclaimer })
9312
+ isEditing && disclaimer && /* @__PURE__ */ jsx64("label", { className: "text-negative", children: disclaimer })
9035
9313
  ] });
9036
9314
  };
9037
9315
  var ToggleableInputUncontrolled = ({
@@ -9039,11 +9317,11 @@ var ToggleableInputUncontrolled = ({
9039
9317
  onChangeText = noop,
9040
9318
  ...restProps
9041
9319
  }) => {
9042
- const [value, setValue] = useState27(initialValue);
9043
- useEffect27(() => {
9320
+ const [value, setValue] = useState28(initialValue);
9321
+ useEffect28(() => {
9044
9322
  setValue(initialValue);
9045
9323
  }, [initialValue]);
9046
- return /* @__PURE__ */ jsx63(
9324
+ return /* @__PURE__ */ jsx64(
9047
9325
  ToggleableInput,
9048
9326
  {
9049
9327
  value,
@@ -9138,6 +9416,7 @@ export {
9138
9416
  ErrorComponent,
9139
9417
  Expandable,
9140
9418
  ExpandableUncontrolled,
9419
+ ExpansionIcon,
9141
9420
  FAQSection,
9142
9421
  FillerRowElement,
9143
9422
  FormInput,
@@ -9178,8 +9457,10 @@ export {
9178
9457
  Ring,
9179
9458
  RingWave,
9180
9459
  ScrollPicker,
9460
+ SearchBar,
9181
9461
  SearchableList,
9182
9462
  Select,
9463
+ SelectTile,
9183
9464
  SelectUncontrolled,
9184
9465
  SessionStorageService,
9185
9466
  SimpleSearch,
@@ -9256,6 +9537,7 @@ export {
9256
9537
  useLocalStorage,
9257
9538
  useLocale,
9258
9539
  useOutsideClick,
9540
+ usePopoverPosition,
9259
9541
  useRerender,
9260
9542
  useResizeCallbackWrapper,
9261
9543
  useSearch,