@helpwave/hightide 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/components/branding/HelpwaveBadge.js +7 -7
  2. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  3. package/dist/components/branding/HelpwaveBadge.mjs +7 -7
  4. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  5. package/dist/components/date/DatePicker.js +65 -38
  6. package/dist/components/date/DatePicker.js.map +1 -1
  7. package/dist/components/date/DatePicker.mjs +54 -27
  8. package/dist/components/date/DatePicker.mjs.map +1 -1
  9. package/dist/components/date/DayPicker.js +3 -3
  10. package/dist/components/date/DayPicker.js.map +1 -1
  11. package/dist/components/date/DayPicker.mjs +3 -3
  12. package/dist/components/date/DayPicker.mjs.map +1 -1
  13. package/dist/components/date/TimePicker.js +4 -4
  14. package/dist/components/date/TimePicker.js.map +1 -1
  15. package/dist/components/date/TimePicker.mjs +4 -4
  16. package/dist/components/date/TimePicker.mjs.map +1 -1
  17. package/dist/components/date/YearMonthPicker.js +46 -19
  18. package/dist/components/date/YearMonthPicker.js.map +1 -1
  19. package/dist/components/date/YearMonthPicker.mjs +44 -17
  20. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  21. package/dist/components/dialogs/ConfirmDialog.js +32 -28
  22. package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
  23. package/dist/components/dialogs/ConfirmDialog.mjs +18 -14
  24. package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
  25. package/dist/components/icons-and-geometry/Avatar.js +2 -2
  26. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  27. package/dist/components/icons-and-geometry/Avatar.mjs +2 -2
  28. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  29. package/dist/components/icons-and-geometry/Ring.js +2 -2
  30. package/dist/components/icons-and-geometry/Ring.js.map +1 -1
  31. package/dist/components/icons-and-geometry/Ring.mjs +2 -2
  32. package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
  33. package/dist/components/layout-and-navigation/BreadCrumb.js +1 -1
  34. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  35. package/dist/components/layout-and-navigation/BreadCrumb.mjs +1 -1
  36. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
  37. package/dist/components/layout-and-navigation/Carousel.js +84 -15
  38. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  39. package/dist/components/layout-and-navigation/Carousel.mjs +76 -7
  40. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  41. package/dist/components/layout-and-navigation/Chip.js +1 -1
  42. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  43. package/dist/components/layout-and-navigation/Chip.mjs +1 -1
  44. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  45. package/dist/components/layout-and-navigation/Expandable.d.mts +7 -1
  46. package/dist/components/layout-and-navigation/Expandable.d.ts +7 -1
  47. package/dist/components/layout-and-navigation/Expandable.js +36 -9
  48. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  49. package/dist/components/layout-and-navigation/Expandable.mjs +36 -10
  50. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  51. package/dist/components/layout-and-navigation/FAQSection.js +34 -11
  52. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  53. package/dist/components/layout-and-navigation/FAQSection.mjs +36 -13
  54. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  55. package/dist/components/layout-and-navigation/Overlay.js +92 -19
  56. package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
  57. package/dist/components/layout-and-navigation/Overlay.mjs +81 -8
  58. package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
  59. package/dist/components/layout-and-navigation/Pagination.js +82 -9
  60. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  61. package/dist/components/layout-and-navigation/Pagination.mjs +79 -6
  62. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  63. package/dist/components/layout-and-navigation/SearchableList.js +127 -25
  64. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
  65. package/dist/components/layout-and-navigation/SearchableList.mjs +126 -24
  66. package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
  67. package/dist/components/layout-and-navigation/StepperBar.js +22 -16
  68. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  69. package/dist/components/layout-and-navigation/StepperBar.mjs +19 -13
  70. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  71. package/dist/components/layout-and-navigation/TextImage.js +7 -3
  72. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  73. package/dist/components/layout-and-navigation/TextImage.mjs +7 -3
  74. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  75. package/dist/components/layout-and-navigation/Tile.d.mts +2 -2
  76. package/dist/components/layout-and-navigation/Tile.d.ts +2 -2
  77. package/dist/components/layout-and-navigation/Tile.js +7 -7
  78. package/dist/components/layout-and-navigation/Tile.js.map +1 -1
  79. package/dist/components/layout-and-navigation/Tile.mjs +7 -7
  80. package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
  81. package/dist/components/loading-states/ErrorComponent.js +1 -1
  82. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  83. package/dist/components/loading-states/ErrorComponent.mjs +1 -1
  84. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  85. package/dist/components/loading-states/LoadingAndErrorComponent.js +6 -2
  86. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
  87. package/dist/components/loading-states/LoadingAndErrorComponent.mjs +6 -2
  88. package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
  89. package/dist/components/loading-states/LoadingAnimation.js +5 -1
  90. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  91. package/dist/components/loading-states/LoadingAnimation.mjs +5 -1
  92. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  93. package/dist/components/loading-states/LoadingButton.js +8 -6
  94. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  95. package/dist/components/loading-states/LoadingButton.mjs +8 -6
  96. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  97. package/dist/components/modals/ConfirmModal.js +32 -28
  98. package/dist/components/modals/ConfirmModal.js.map +1 -1
  99. package/dist/components/modals/ConfirmModal.mjs +18 -14
  100. package/dist/components/modals/ConfirmModal.mjs.map +1 -1
  101. package/dist/components/modals/DiscardChangesModal.js +28 -24
  102. package/dist/components/modals/DiscardChangesModal.js.map +1 -1
  103. package/dist/components/modals/DiscardChangesModal.mjs +18 -14
  104. package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
  105. package/dist/components/modals/InputModal.js +32 -28
  106. package/dist/components/modals/InputModal.js.map +1 -1
  107. package/dist/components/modals/InputModal.mjs +18 -14
  108. package/dist/components/modals/InputModal.mjs.map +1 -1
  109. package/dist/components/modals/LanguageModal.js +728 -434
  110. package/dist/components/modals/LanguageModal.js.map +1 -1
  111. package/dist/components/modals/LanguageModal.mjs +728 -430
  112. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  113. package/dist/components/modals/ThemeModal.js +732 -438
  114. package/dist/components/modals/ThemeModal.js.map +1 -1
  115. package/dist/components/modals/ThemeModal.mjs +731 -433
  116. package/dist/components/modals/ThemeModal.mjs.map +1 -1
  117. package/dist/components/properties/CheckboxProperty.js +110 -35
  118. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  119. package/dist/components/properties/CheckboxProperty.mjs +110 -35
  120. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  121. package/dist/components/properties/DateProperty.js +118 -41
  122. package/dist/components/properties/DateProperty.js.map +1 -1
  123. package/dist/components/properties/DateProperty.mjs +114 -37
  124. package/dist/components/properties/DateProperty.mjs.map +1 -1
  125. package/dist/components/properties/MultiSelectProperty.d.mts +10 -3
  126. package/dist/components/properties/MultiSelectProperty.d.ts +10 -3
  127. package/dist/components/properties/MultiSelectProperty.js +915 -463
  128. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  129. package/dist/components/properties/MultiSelectProperty.mjs +920 -464
  130. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  131. package/dist/components/properties/NumberProperty.js +101 -18
  132. package/dist/components/properties/NumberProperty.js.map +1 -1
  133. package/dist/components/properties/NumberProperty.mjs +101 -18
  134. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  135. package/dist/components/properties/PropertyBase.js +103 -20
  136. package/dist/components/properties/PropertyBase.js.map +1 -1
  137. package/dist/components/properties/PropertyBase.mjs +99 -16
  138. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  139. package/dist/components/properties/SelectProperty.d.mts +9 -2
  140. package/dist/components/properties/SelectProperty.d.ts +9 -2
  141. package/dist/components/properties/SelectProperty.js +682 -243
  142. package/dist/components/properties/SelectProperty.js.map +1 -1
  143. package/dist/components/properties/SelectProperty.mjs +686 -243
  144. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  145. package/dist/components/properties/TextProperty.js +133 -46
  146. package/dist/components/properties/TextProperty.js.map +1 -1
  147. package/dist/components/properties/TextProperty.mjs +133 -46
  148. package/dist/components/properties/TextProperty.mjs.map +1 -1
  149. package/dist/components/table/Table.js +285 -185
  150. package/dist/components/table/Table.js.map +1 -1
  151. package/dist/components/table/Table.mjs +270 -166
  152. package/dist/components/table/Table.mjs.map +1 -1
  153. package/dist/components/table/TableFilterButton.js +179 -78
  154. package/dist/components/table/TableFilterButton.js.map +1 -1
  155. package/dist/components/table/TableFilterButton.mjs +160 -55
  156. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  157. package/dist/components/table/TableSortButton.js +72 -3
  158. package/dist/components/table/TableSortButton.js.map +1 -1
  159. package/dist/components/table/TableSortButton.mjs +72 -3
  160. package/dist/components/table/TableSortButton.mjs.map +1 -1
  161. package/dist/components/user-action/Button.d.mts +15 -2
  162. package/dist/components/user-action/Button.d.ts +15 -2
  163. package/dist/components/user-action/Button.js +12 -12
  164. package/dist/components/user-action/Button.js.map +1 -1
  165. package/dist/components/user-action/Button.mjs +12 -12
  166. package/dist/components/user-action/Button.mjs.map +1 -1
  167. package/dist/components/user-action/Checkbox.js +6 -15
  168. package/dist/components/user-action/Checkbox.js.map +1 -1
  169. package/dist/components/user-action/Checkbox.mjs +6 -15
  170. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  171. package/dist/components/user-action/CopyToClipboardWrapper.js +6 -2
  172. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  173. package/dist/components/user-action/CopyToClipboardWrapper.mjs +6 -2
  174. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  175. package/dist/components/user-action/DateAndTimePicker.js +79 -48
  176. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  177. package/dist/components/user-action/DateAndTimePicker.mjs +65 -34
  178. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  179. package/dist/components/user-action/Menu.d.mts +11 -6
  180. package/dist/components/user-action/Menu.d.ts +11 -6
  181. package/dist/components/user-action/Menu.js +128 -31
  182. package/dist/components/user-action/Menu.js.map +1 -1
  183. package/dist/components/user-action/Menu.mjs +134 -33
  184. package/dist/components/user-action/Menu.mjs.map +1 -1
  185. package/dist/components/user-action/MultiSelect.d.mts +17 -7
  186. package/dist/components/user-action/MultiSelect.d.ts +17 -7
  187. package/dist/components/user-action/MultiSelect.js +796 -375
  188. package/dist/components/user-action/MultiSelect.js.map +1 -1
  189. package/dist/components/user-action/MultiSelect.mjs +781 -356
  190. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  191. package/dist/components/user-action/ScrollPicker.js +2 -2
  192. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  193. package/dist/components/user-action/ScrollPicker.mjs +2 -2
  194. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  195. package/dist/components/user-action/SearchBar.d.mts +14 -0
  196. package/dist/components/user-action/SearchBar.d.ts +14 -0
  197. package/dist/components/user-action/SearchBar.js +673 -0
  198. package/dist/components/user-action/SearchBar.js.map +1 -0
  199. package/dist/components/user-action/SearchBar.mjs +637 -0
  200. package/dist/components/user-action/SearchBar.mjs.map +1 -0
  201. package/dist/components/user-action/Select.d.mts +18 -5
  202. package/dist/components/user-action/Select.d.ts +18 -5
  203. package/dist/components/user-action/Select.js +764 -355
  204. package/dist/components/user-action/Select.js.map +1 -1
  205. package/dist/components/user-action/Select.mjs +761 -349
  206. package/dist/components/user-action/Select.mjs.map +1 -1
  207. package/dist/components/user-action/Textarea.d.mts +1 -1
  208. package/dist/components/user-action/Textarea.d.ts +1 -1
  209. package/dist/components/user-action/Textarea.js +13 -3
  210. package/dist/components/user-action/Textarea.js.map +1 -1
  211. package/dist/components/user-action/Textarea.mjs +13 -3
  212. package/dist/components/user-action/Textarea.mjs.map +1 -1
  213. package/dist/components/user-action/ToggleableInput.js +2 -2
  214. package/dist/components/user-action/ToggleableInput.js.map +1 -1
  215. package/dist/components/user-action/ToggleableInput.mjs +2 -2
  216. package/dist/components/user-action/ToggleableInput.mjs.map +1 -1
  217. package/dist/css/globals.css +251 -113
  218. package/dist/css/uncompiled/globals.css +19 -13
  219. package/dist/css/uncompiled/theme/colors-component.css +12 -3
  220. package/dist/css/uncompiled/theme/colors-semantic.css +10 -7
  221. package/dist/css/uncompiled/utitlity/animation.css +70 -1
  222. package/dist/css/uncompiled/utitlity/general.css +16 -0
  223. package/dist/hooks/usePopoverPosition.d.mts +15 -0
  224. package/dist/hooks/usePopoverPosition.d.ts +15 -0
  225. package/dist/hooks/usePopoverPosition.js +81 -0
  226. package/dist/hooks/usePopoverPosition.js.map +1 -0
  227. package/dist/hooks/usePopoverPosition.mjs +57 -0
  228. package/dist/hooks/usePopoverPosition.mjs.map +1 -0
  229. package/dist/hooks/useSearch.d.mts +7 -2
  230. package/dist/hooks/useSearch.d.ts +7 -2
  231. package/dist/hooks/useSearch.js +44 -15
  232. package/dist/hooks/useSearch.js.map +1 -1
  233. package/dist/hooks/useSearch.mjs +45 -16
  234. package/dist/hooks/useSearch.mjs.map +1 -1
  235. package/dist/index.d.mts +6 -4
  236. package/dist/index.d.ts +6 -4
  237. package/dist/index.js +1102 -819
  238. package/dist/index.js.map +1 -1
  239. package/dist/index.mjs +1001 -718
  240. package/dist/index.mjs.map +1 -1
  241. package/dist/localization/defaults/form.d.mts +2 -0
  242. package/dist/localization/defaults/form.d.ts +2 -0
  243. package/dist/localization/defaults/form.js +4 -0
  244. package/dist/localization/defaults/form.js.map +1 -1
  245. package/dist/localization/defaults/form.mjs +4 -0
  246. package/dist/localization/defaults/form.mjs.map +1 -1
  247. package/dist/util/simpleSearch.d.mts +1 -1
  248. package/dist/util/simpleSearch.d.ts +1 -1
  249. package/dist/util/simpleSearch.js +4 -1
  250. package/dist/util/simpleSearch.js.map +1 -1
  251. package/dist/util/simpleSearch.mjs +4 -1
  252. package/dist/util/simpleSearch.mjs.map +1 -1
  253. package/package.json +1 -1
package/dist/index.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
@@ -6049,9 +6076,9 @@ var Label = ({
6049
6076
  };
6050
6077
 
6051
6078
  // src/hooks/useFocusManagement.ts
6052
- import { useCallback as useCallback4 } from "react";
6079
+ import { useCallback as useCallback5 } from "react";
6053
6080
  function useFocusManagement() {
6054
- const getFocusableElements = useCallback4(() => {
6081
+ const getFocusableElements = useCallback5(() => {
6055
6082
  return Array.from(
6056
6083
  document.querySelectorAll(
6057
6084
  'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
@@ -6060,7 +6087,7 @@ function useFocusManagement() {
6060
6087
  (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
6061
6088
  );
6062
6089
  }, []);
6063
- const getNextFocusElement = useCallback4(() => {
6090
+ const getNextFocusElement = useCallback5(() => {
6064
6091
  const elements = getFocusableElements();
6065
6092
  if (elements.length === 0) {
6066
6093
  return void 0;
@@ -6072,11 +6099,11 @@ function useFocusManagement() {
6072
6099
  }
6073
6100
  return nextElement;
6074
6101
  }, [getFocusableElements]);
6075
- const focusNext = useCallback4(() => {
6102
+ const focusNext = useCallback5(() => {
6076
6103
  const nextElement = getNextFocusElement();
6077
6104
  nextElement?.focus();
6078
6105
  }, [getNextFocusElement]);
6079
- const getPreviousFocusElement = useCallback4(() => {
6106
+ const getPreviousFocusElement = useCallback5(() => {
6080
6107
  const elements = getFocusableElements();
6081
6108
  if (elements.length === 0) {
6082
6109
  return void 0;
@@ -6092,7 +6119,7 @@ function useFocusManagement() {
6092
6119
  }
6093
6120
  return previousElement;
6094
6121
  }, [getFocusableElements]);
6095
- const focusPrevious = useCallback4(() => {
6122
+ const focusPrevious = useCallback5(() => {
6096
6123
  const previousElement = getPreviousFocusElement();
6097
6124
  if (previousElement) previousElement.focus();
6098
6125
  }, [getPreviousFocusElement]);
@@ -6145,7 +6172,7 @@ var defaultEditCompleteOptions = {
6145
6172
  afterDelay: true,
6146
6173
  delay: 2500
6147
6174
  };
6148
- var Input = forwardRef2(function Input2({
6175
+ var Input = forwardRef3(function Input2({
6149
6176
  id,
6150
6177
  type = "text",
6151
6178
  value,
@@ -6241,7 +6268,7 @@ var InputUncontrolled = ({
6241
6268
  }
6242
6269
  );
6243
6270
  };
6244
- var FormInput = forwardRef2(function FormInput2({
6271
+ var FormInput = forwardRef3(function FormInput2({
6245
6272
  id,
6246
6273
  labelText,
6247
6274
  errorText,
@@ -6302,10 +6329,10 @@ var Pagination = ({
6302
6329
  const changePage = (page) => {
6303
6330
  onPageChanged(page);
6304
6331
  };
6305
- 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: [
6306
6333
  /* @__PURE__ */ jsx27(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx27(ChevronFirst, {}) }),
6307
6334
  /* @__PURE__ */ jsx27(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx27(ChevronLeft2, {}) }),
6308
- /* @__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: [
6309
6336
  /* @__PURE__ */ jsx27(
6310
6337
  Input,
6311
6338
  {
@@ -6335,7 +6362,7 @@ var Pagination = ({
6335
6362
  /* @__PURE__ */ jsx27(
6336
6363
  "span",
6337
6364
  {
6338
- 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",
6339
6366
  children: pageCount
6340
6367
  }
6341
6368
  )
@@ -6350,12 +6377,15 @@ import { Search } from "lucide-react";
6350
6377
  import clsx24 from "clsx";
6351
6378
 
6352
6379
  // src/hooks/useSearch.ts
6353
- 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";
6354
6381
 
6355
6382
  // src/util/simpleSearch.ts
6356
6383
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
6357
6384
  return objects.filter((object) => {
6358
- 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
+ }
6359
6389
  return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
6360
6390
  });
6361
6391
  };
@@ -6379,22 +6409,51 @@ var SimpleSearch = (search, objects) => {
6379
6409
  var useSearch = ({
6380
6410
  list,
6381
6411
  initialSearch,
6382
- searchMapping
6412
+ searchMapping,
6413
+ additionalSearchTags,
6414
+ isSearchInstant = true,
6415
+ sortingFunction,
6416
+ filter,
6417
+ disabled = false
6383
6418
  }) => {
6384
- const [items, setItems] = useState15(list);
6385
- 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]);
6386
6429
  useEffect16(() => {
6387
- setItems(list);
6388
- }, [list]);
6389
- const result = useMemo2(
6390
- () => MultiSearchWithMapping(search, items, searchMapping),
6391
- [search, items, searchMapping]
6392
- );
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]);
6393
6452
  return {
6394
- result,
6395
- hasResult: result.length > 0,
6396
- allItems: items,
6397
- setItems,
6453
+ result: usedResult,
6454
+ hasResult: usedResult.length > 0,
6455
+ allItems: list,
6456
+ updateSearch,
6398
6457
  search,
6399
6458
  setSearch
6400
6459
  };
@@ -6422,9 +6481,9 @@ var SearchableList = ({
6422
6481
  resultListClassName
6423
6482
  }) => {
6424
6483
  const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
6425
- const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
6426
- return /* @__PURE__ */ jsxs18("div", { className: clsx24("col gap-y-2", className), children: [
6427
- 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: [
6428
6487
  /* @__PURE__ */ jsx28(
6429
6488
  Input,
6430
6489
  {
@@ -6435,9 +6494,9 @@ var SearchableList = ({
6435
6494
  className: "w-full"
6436
6495
  }
6437
6496
  ),
6438
- /* @__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" }) })
6439
6498
  ] }),
6440
- 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") })
6441
6500
  ] });
6442
6501
  };
6443
6502
 
@@ -6471,23 +6530,23 @@ var StepperBar = ({
6471
6530
  return /* @__PURE__ */ jsxs19(
6472
6531
  "div",
6473
6532
  {
6474
- className: clsx25("row justify-between", className),
6533
+ className: clsx25("flex-row-2 justify-between", className),
6475
6534
  children: [
6476
- /* @__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(
6477
6536
  SolidButton,
6478
6537
  {
6479
6538
  disabled: currentStep === 0 || disabledSteps.has(currentStep),
6480
6539
  onClick: () => {
6481
6540
  update(currentStep - 1);
6482
6541
  },
6483
- className: "row gap-x-1 items-center justify-center",
6542
+ className: "flex-row-1 items-center justify-center",
6484
6543
  children: [
6485
6544
  /* @__PURE__ */ jsx29(ChevronLeft3, { size: 14 }),
6486
6545
  translation("back")
6487
6546
  ]
6488
6547
  }
6489
6548
  ) }),
6490
- /* @__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) => {
6491
6550
  const seen = seenSteps.has(index);
6492
6551
  return /* @__PURE__ */ jsx29(
6493
6552
  "div",
@@ -6509,11 +6568,11 @@ var StepperBar = ({
6509
6568
  index
6510
6569
  );
6511
6570
  }) }),
6512
- 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(
6513
6572
  SolidButton,
6514
6573
  {
6515
6574
  onClick: () => update(currentStep + 1),
6516
- className: "row gap-x-1 items-center justify-center",
6575
+ className: "flex-row-1 items-center justify-center",
6517
6576
  disabled: disabledSteps.has(currentStep),
6518
6577
  children: [
6519
6578
  translation("next"),
@@ -6521,12 +6580,12 @@ var StepperBar = ({
6521
6580
  ]
6522
6581
  }
6523
6582
  ) }),
6524
- 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(
6525
6584
  SolidButton,
6526
6585
  {
6527
6586
  disabled: disabledSteps.has(currentStep),
6528
6587
  onClick: onFinish,
6529
- className: "row gap-x-1 items-center justify-center",
6588
+ className: "flex-row-1 items-center justify-center",
6530
6589
  children: [
6531
6590
  /* @__PURE__ */ jsx29(Check2, { size: 14 }),
6532
6591
  finishText ?? translation("confirm")
@@ -6591,14 +6650,14 @@ var TextImage = ({
6591
6650
  children: /* @__PURE__ */ jsxs20(
6592
6651
  "div",
6593
6652
  {
6594
- 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),
6595
6654
  children: [
6596
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 }) }),
6597
- /* @__PURE__ */ jsxs20("div", { className: "col gap-y-1 overflow-hidden", children: [
6656
+ /* @__PURE__ */ jsxs20("div", { className: "flex-col-1 overflow-hidden", children: [
6598
6657
  /* @__PURE__ */ jsx30("span", { className: "textstyle-title-xl", children: title }),
6599
6658
  /* @__PURE__ */ jsx30("span", { className: "text-ellipsis overflow-hidden", children: description })
6600
6659
  ] }),
6601
- 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") }) })
6602
6661
  ]
6603
6662
  }
6604
6663
  )
@@ -6677,7 +6736,7 @@ var ErrorComponent = ({
6677
6736
  classname
6678
6737
  }) => {
6679
6738
  const translation = useTranslation([defaultErrorComponentTranslation], overwriteTranslation);
6680
- 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: [
6681
6740
  /* @__PURE__ */ jsx32(AlertOctagon, { size: 64, className: "text-warning" }),
6682
6741
  errorText ?? `${translation("errorOccurred")} :(`
6683
6742
  ] });
@@ -6695,7 +6754,7 @@ var LoadingAnimation = ({
6695
6754
  classname
6696
6755
  }) => {
6697
6756
  const translation = useTranslation([formTranslation], overwriteTranslation);
6698
- 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: [
6699
6758
  /* @__PURE__ */ jsx33(Helpwave, { animate: "loading" }),
6700
6759
  loadingText ?? `${translation("loading")}...`
6701
6760
  ] });
@@ -6735,7 +6794,7 @@ import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
6735
6794
  var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
6736
6795
  const paddingClass = ButtonUtil.paddingMapping[size];
6737
6796
  return /* @__PURE__ */ jsxs24("div", { className: "inline-block relative", children: [
6738
- 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" }) }),
6739
6798
  /* @__PURE__ */ jsx35(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
6740
6799
  ] });
6741
6800
  };
@@ -6818,8 +6877,8 @@ var ConfirmModal = ({
6818
6877
  primary: "primary"
6819
6878
  };
6820
6879
  return /* @__PURE__ */ jsxs26(Modal, { ...restProps, onClose: onCancel, className: clsx30("justify-between", className), children: [
6821
- /* @__PURE__ */ jsx37("div", { className: "col grow", children }),
6822
- /* @__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: [
6823
6882
  onCancel && /* @__PURE__ */ jsx37(
6824
6883
  SolidButton,
6825
6884
  {
@@ -6900,8 +6959,16 @@ var InputModal = ({
6900
6959
  };
6901
6960
 
6902
6961
  // src/components/user-action/Select.tsx
6903
- import { ChevronDown as ChevronDown4, ChevronUp as ChevronUp3 } from "lucide-react";
6904
- 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";
6905
6972
  import clsx31 from "clsx";
6906
6973
 
6907
6974
  // src/hooks/useOutsideClick.ts
@@ -6924,83 +6991,305 @@ var useOutsideClick = (refs, handler) => {
6924
6991
  }, [refs, handler]);
6925
6992
  };
6926
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
+
6927
7191
  // src/components/user-action/Select.tsx
6928
- 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
+ };
6929
7209
  var Select = ({
6930
7210
  value,
6931
7211
  label,
6932
7212
  options,
6933
7213
  onChange,
6934
7214
  hintText = "",
6935
- isDisabled,
6936
- isSearchEnabled = false,
7215
+ selectedDisplayOverwrite,
7216
+ searchOptions,
7217
+ additionalItems,
6937
7218
  className,
6938
- selectedDisplayOverwrite
7219
+ triggerClassName,
7220
+ hintTextClassName,
7221
+ ...menuProps
6939
7222
  }) => {
6940
- const triggerRef = useRef6(null);
6941
- const menuRef = useRef6(null);
6942
- const [isOpen, setIsOpen] = useState18(false);
6943
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
6944
7223
  const selectedOption = options.find((option) => option.value === value);
6945
7224
  if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
6946
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");
6947
7226
  }
6948
7227
  const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
6949
- return /* @__PURE__ */ jsxs27("div", { className: clsx31(className), children: [
6950
- label && /* @__PURE__ */ jsx40(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx31("mb-1", label.className) }),
6951
- /* @__PURE__ */ jsxs27("div", { className: "relative", children: [
6952
- /* @__PURE__ */ jsxs27(
6953
- "button",
6954
- {
6955
- ref: triggerRef,
6956
- className: clsx31(
6957
- "btn-md justify-between w-full border-2",
6958
- {
6959
- "rounded-b-lg": !open,
6960
- "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
6961
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
6962
- }
6963
- ),
6964
- onClick: () => setIsOpen(!isOpen),
6965
- disabled: isDisabled,
6966
- children: [
6967
- !isShowingHint && /* @__PURE__ */ jsx40("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? selectedOption?.label }),
6968
- isShowingHint && /* @__PURE__ */ jsx40("span", { className: "textstyle-description", children: hintText }),
6969
- isOpen ? /* @__PURE__ */ jsx40(ChevronUp3, {}) : /* @__PURE__ */ jsx40(ChevronDown4, {})
6970
- ]
6971
- }
6972
- ),
6973
- isOpen && /* @__PURE__ */ jsx40(
6974
- "div",
6975
- {
6976
- ref: menuRef,
6977
- 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",
6978
- children: /* @__PURE__ */ jsx40(
6979
- SearchableList,
6980
- {
6981
- list: options,
6982
- minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
6983
- searchMapping: (item) => item.searchTags,
6984
- itemMapper: (option, index) => /* @__PURE__ */ jsx40(
6985
- 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,
6986
7276
  {
6987
- isSelected: selectedOption?.value === option.value,
6988
- className: "px-2 py-1 rounded-md",
6989
- disabledClassName: "text-disabled-text cursor-not-allowed",
6990
- title: { value: option.label, className: "font-semibold" },
7277
+ isSelected: option === selectedOption,
7278
+ title: { value: option.label },
6991
7279
  onClick: () => {
6992
7280
  onChange(option.value);
6993
- setIsOpen(false);
7281
+ close();
6994
7282
  },
6995
- isDisabled: option.disabled
7283
+ disabled: option.disabled
6996
7284
  },
6997
7285
  index
6998
- )
6999
- }
7000
- )
7286
+ )),
7287
+ additionalItems && additionalItems({ ...bag, search, selected: value })
7288
+ ] })
7289
+ ] });
7001
7290
  }
7002
- )
7003
- ] })
7291
+ }
7292
+ )
7004
7293
  ] });
7005
7294
  };
7006
7295
  var SelectUncontrolled = ({
@@ -7010,13 +7299,13 @@ var SelectUncontrolled = ({
7010
7299
  hintText,
7011
7300
  ...props
7012
7301
  }) => {
7013
- const [selected, setSelected] = useState18(value);
7014
- useEffect19(() => {
7302
+ const [selected, setSelected] = useState19(value);
7303
+ useEffect20(() => {
7015
7304
  if (options.find((options2) => options2.value === value)) {
7016
7305
  setSelected(value);
7017
7306
  }
7018
7307
  }, [options, value]);
7019
- return /* @__PURE__ */ jsx40(
7308
+ return /* @__PURE__ */ jsx42(
7020
7309
  Select,
7021
7310
  {
7022
7311
  value: selected,
@@ -7032,7 +7321,7 @@ var SelectUncontrolled = ({
7032
7321
  };
7033
7322
 
7034
7323
  // src/components/modals/LanguageModal.tsx
7035
- import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
7324
+ import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
7036
7325
  var defaultLanguageModalTranslation = {
7037
7326
  en: {
7038
7327
  language: "Language",
@@ -7055,7 +7344,7 @@ var LanguageModal = ({
7055
7344
  }) => {
7056
7345
  const { language, setLanguage } = useLanguage();
7057
7346
  const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
7058
- return /* @__PURE__ */ jsx41(
7347
+ return /* @__PURE__ */ jsx43(
7059
7348
  Modal,
7060
7349
  {
7061
7350
  headerProps: {
@@ -7065,8 +7354,8 @@ var LanguageModal = ({
7065
7354
  },
7066
7355
  onClose,
7067
7356
  ...modalProps,
7068
- children: /* @__PURE__ */ jsxs28("div", { className: "w-64", children: [
7069
- /* @__PURE__ */ jsx41(
7357
+ children: /* @__PURE__ */ jsxs30("div", { className: "w-64", children: [
7358
+ /* @__PURE__ */ jsx43(
7070
7359
  Select,
7071
7360
  {
7072
7361
  className: "mt-2",
@@ -7075,15 +7364,15 @@ var LanguageModal = ({
7075
7364
  onChange: (language2) => setLanguage(language2)
7076
7365
  }
7077
7366
  ),
7078
- /* @__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") }) })
7079
7368
  ] })
7080
7369
  }
7081
7370
  );
7082
7371
  };
7083
7372
 
7084
7373
  // src/theming/useTheme.tsx
7085
- import { createContext as createContext2, useContext as useContext2, useEffect as useEffect20, useState as useState19 } from "react";
7086
- 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";
7087
7376
  var themes = ["light", "dark"];
7088
7377
  var defaultThemeTypeTranslation = {
7089
7378
  en: {
@@ -7112,22 +7401,22 @@ var ThemeContext = createContext2({
7112
7401
  setTheme: noop
7113
7402
  });
7114
7403
  var ThemeProvider = ({ children, initialTheme = "light" }) => {
7115
- const [theme, setTheme] = useState19(initialTheme);
7116
- useEffect20(() => {
7404
+ const [theme, setTheme] = useState20(initialTheme);
7405
+ useEffect21(() => {
7117
7406
  if (theme !== initialTheme) {
7118
7407
  console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
7119
7408
  setTheme(initialTheme);
7120
7409
  }
7121
7410
  }, [initialTheme]);
7122
- useEffect20(() => {
7411
+ useEffect21(() => {
7123
7412
  document.documentElement.setAttribute("data-theme", theme);
7124
7413
  }, [theme]);
7125
- return /* @__PURE__ */ jsx42(ThemeContext.Provider, { value: { theme, setTheme }, children });
7414
+ return /* @__PURE__ */ jsx44(ThemeContext.Provider, { value: { theme, setTheme }, children });
7126
7415
  };
7127
7416
  var useTheme = () => useContext2(ThemeContext);
7128
7417
 
7129
7418
  // src/components/modals/ThemeModal.tsx
7130
- import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
7419
+ import { jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
7131
7420
  var defaultConfirmDialogTranslation = {
7132
7421
  en: {
7133
7422
  chooseTheme: "Choose your preferred theme"
@@ -7144,7 +7433,7 @@ var ThemeModal = ({
7144
7433
  }) => {
7145
7434
  const { theme, setTheme } = useTheme();
7146
7435
  const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
7147
- return /* @__PURE__ */ jsx43(
7436
+ return /* @__PURE__ */ jsx45(
7148
7437
  Modal,
7149
7438
  {
7150
7439
  headerProps: {
@@ -7154,8 +7443,8 @@ var ThemeModal = ({
7154
7443
  },
7155
7444
  onClose,
7156
7445
  ...modalProps,
7157
- children: /* @__PURE__ */ jsxs29("div", { className: "w-64", children: [
7158
- /* @__PURE__ */ jsx43(
7446
+ children: /* @__PURE__ */ jsxs31("div", { className: "w-64", children: [
7447
+ /* @__PURE__ */ jsx45(
7159
7448
  Select,
7160
7449
  {
7161
7450
  className: "mt-2",
@@ -7164,7 +7453,7 @@ var ThemeModal = ({
7164
7453
  onChange: (theme2) => setTheme(theme2)
7165
7454
  }
7166
7455
  ),
7167
- /* @__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") }) })
7168
7457
  ] })
7169
7458
  }
7170
7459
  );
@@ -7174,18 +7463,18 @@ var ThemeModal = ({
7174
7463
  import { Check as Check4 } from "lucide-react";
7175
7464
 
7176
7465
  // src/components/user-action/Checkbox.tsx
7177
- import { useState as useState20 } from "react";
7466
+ import { useState as useState21 } from "react";
7178
7467
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
7179
7468
  import { Check as Check3, Minus } from "lucide-react";
7180
- import clsx32 from "clsx";
7181
- 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";
7182
7471
  var checkboxSizeMapping = {
7183
- small: "size-4",
7472
+ small: "size-5",
7184
7473
  medium: "size-6",
7185
7474
  large: "size-8"
7186
7475
  };
7187
7476
  var checkboxIconSizeMapping = {
7188
- small: "size-3",
7477
+ small: "size-4",
7189
7478
  medium: "size-5",
7190
7479
  large: "size-7"
7191
7480
  };
@@ -7214,36 +7503,27 @@ var Checkbox = ({
7214
7503
  const newValue = checked === "indeterminate" ? false : !checked;
7215
7504
  propagateChange(newValue);
7216
7505
  };
7217
- return /* @__PURE__ */ jsxs30("div", { className: clsx32("row justify-center items-center", containerClassName), children: [
7218
- /* @__PURE__ */ jsx44(
7506
+ return /* @__PURE__ */ jsxs32("div", { className: clsx34("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
7507
+ /* @__PURE__ */ jsx46(
7219
7508
  CheckboxPrimitive.Root,
7220
7509
  {
7221
7510
  onCheckedChange: propagateChange,
7222
7511
  checked,
7223
7512
  disabled,
7224
7513
  id,
7225
- className: clsx32(usedSizeClass, `items-center border-2 rounded outline-none `, {
7514
+ className: clsx34(usedSizeClass, `items-center border-2 rounded outline-none `, {
7226
7515
  "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
7227
- "focus:border-primary": !disabled,
7516
+ "focus:border-primary group-hover:border-primary ": !disabled,
7228
7517
  "bg-surface": !disabled && !checked,
7229
- "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate",
7230
- "hover:border-primary focus:hover:border-primary": !disabled && !checked
7518
+ "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
7231
7519
  }, className),
7232
- children: /* @__PURE__ */ jsxs30(CheckboxPrimitive.Indicator, { children: [
7233
- checked === true && /* @__PURE__ */ jsx44(Check3, { className: innerIconSize }),
7234
- 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 })
7235
7523
  ] })
7236
7524
  }
7237
7525
  ),
7238
- label && /* @__PURE__ */ jsx44(
7239
- Label,
7240
- {
7241
- ...label,
7242
- className: clsx32("cursor-pointer", label.className),
7243
- htmlFor: id,
7244
- onClick: changeValue
7245
- }
7246
- )
7526
+ label && /* @__PURE__ */ jsx46(Label, { ...label, className: clsx34(label.className), htmlFor: id })
7247
7527
  ] });
7248
7528
  };
7249
7529
  var CheckboxUncontrolled = ({
@@ -7252,7 +7532,7 @@ var CheckboxUncontrolled = ({
7252
7532
  defaultValue = false,
7253
7533
  ...props
7254
7534
  }) => {
7255
- const [checked, setChecked] = useState20(defaultValue);
7535
+ const [checked, setChecked] = useState21(defaultValue);
7256
7536
  const handleChange = (checked2) => {
7257
7537
  if (onChangeTristate) {
7258
7538
  onChangeTristate(checked2);
@@ -7262,7 +7542,7 @@ var CheckboxUncontrolled = ({
7262
7542
  }
7263
7543
  setChecked(checked2);
7264
7544
  };
7265
- return /* @__PURE__ */ jsx44(
7545
+ return /* @__PURE__ */ jsx46(
7266
7546
  Checkbox,
7267
7547
  {
7268
7548
  ...props,
@@ -7274,8 +7554,8 @@ var CheckboxUncontrolled = ({
7274
7554
 
7275
7555
  // src/components/properties/PropertyBase.tsx
7276
7556
  import { AlertTriangle } from "lucide-react";
7277
- import clsx33 from "clsx";
7278
- 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";
7279
7559
  var PropertyBase = ({
7280
7560
  overwriteTranslation,
7281
7561
  name,
@@ -7289,36 +7569,44 @@ var PropertyBase = ({
7289
7569
  }) => {
7290
7570
  const translation = useTranslation([formTranslation], overwriteTranslation);
7291
7571
  const requiredAndNoValue = softRequired && !hasValue;
7292
- return /* @__PURE__ */ jsxs31("div", { className: clsx33("row gap-x-0 group", className), children: [
7293
- /* @__PURE__ */ jsxs31(
7572
+ return /* @__PURE__ */ jsxs33("div", { className: clsx35("flex-row-0 group", className), children: [
7573
+ /* @__PURE__ */ jsxs33(
7294
7574
  "div",
7295
7575
  {
7296
- className: clsx33("row gap-x-2 !w-[200px] px-4 py-2 items-center rounded-l-xl border-2 border-r-0", {
7297
- "bg-property-title-background property-title-text group-hover:border-primary": !requiredAndNoValue,
7298
- "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7299
- }, 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
+ ),
7300
7584
  children: [
7301
- icon,
7302
- 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 })
7303
7587
  ]
7304
7588
  }
7305
7589
  ),
7306
- /* @__PURE__ */ jsxs31(
7590
+ /* @__PURE__ */ jsxs33(
7307
7591
  "div",
7308
7592
  {
7309
- className: clsx33("row gap-x-0 grow justify-between items-center rounded-r-xl border-2 border-l-0", {
7310
- "bg-surface group-hover:border-primary": !requiredAndNoValue,
7311
- "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7312
- }, 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
+ ),
7313
7601
  children: [
7314
7602
  input({ softRequired, hasValue }),
7315
- requiredAndNoValue && /* @__PURE__ */ jsx45("div", { className: "text-warning pr-4", children: /* @__PURE__ */ jsx45(AlertTriangle, { size: 24 }) }),
7316
- onRemove && /* @__PURE__ */ jsx45(
7603
+ requiredAndNoValue && /* @__PURE__ */ jsx47("div", { className: "text-warning", children: /* @__PURE__ */ jsx47(AlertTriangle, { size: 24 }) }),
7604
+ onRemove && hasValue && /* @__PURE__ */ jsx47(
7317
7605
  TextButton,
7318
7606
  {
7319
7607
  onClick: onRemove,
7320
7608
  color: "negative",
7321
- className: clsx33("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
7609
+ className: clsx35("items-center", { "!text-transparent": !hasValue || readOnly }),
7322
7610
  disabled: !hasValue || readOnly,
7323
7611
  children: translation("remove")
7324
7612
  }
@@ -7330,7 +7618,7 @@ var PropertyBase = ({
7330
7618
  };
7331
7619
 
7332
7620
  // src/components/properties/CheckboxProperty.tsx
7333
- import { jsx as jsx46 } from "react/jsx-runtime";
7621
+ import { jsx as jsx48 } from "react/jsx-runtime";
7334
7622
  var CheckboxProperty = ({
7335
7623
  overwriteTranslation,
7336
7624
  value,
@@ -7339,30 +7627,31 @@ var CheckboxProperty = ({
7339
7627
  ...baseProps
7340
7628
  }) => {
7341
7629
  const translation = useTranslation([formTranslation], overwriteTranslation);
7342
- return /* @__PURE__ */ jsx46(
7630
+ return /* @__PURE__ */ jsx48(
7343
7631
  PropertyBase,
7344
7632
  {
7345
7633
  ...baseProps,
7346
7634
  hasValue: true,
7347
7635
  readOnly,
7348
- icon: /* @__PURE__ */ jsx46(Check4, { size: 16 }),
7349
- 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(
7350
7638
  Checkbox,
7351
7639
  {
7352
7640
  checked: value ?? true,
7353
7641
  disabled: readOnly,
7354
7642
  onChange,
7355
- label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" }
7643
+ label: { name: `${translation("yes")}/${translation("no")}`, labelType: "labelMedium" },
7644
+ containerClassName: "w-full"
7356
7645
  }
7357
- ) })
7646
+ )
7358
7647
  }
7359
7648
  );
7360
7649
  };
7361
7650
 
7362
7651
  // src/components/properties/DateProperty.tsx
7363
7652
  import { CalendarDays } from "lucide-react";
7364
- import clsx34 from "clsx";
7365
- import { jsx as jsx47 } from "react/jsx-runtime";
7653
+ import clsx36 from "clsx";
7654
+ import { jsx as jsx49 } from "react/jsx-runtime";
7366
7655
  var DateProperty = ({
7367
7656
  value,
7368
7657
  onChange = noop,
@@ -7373,35 +7662,29 @@ var DateProperty = ({
7373
7662
  }) => {
7374
7663
  const hasValue = !!value;
7375
7664
  const dateText = value ? type === "dateTime" ? formatDateTime(value) : formatDate(value) : "";
7376
- return /* @__PURE__ */ jsx47(
7665
+ return /* @__PURE__ */ jsx49(
7377
7666
  PropertyBase,
7378
7667
  {
7379
7668
  ...baseProps,
7380
7669
  hasValue,
7381
- icon: /* @__PURE__ */ jsx47(CalendarDays, { size: 16 }),
7382
- input: ({ softRequired }) => /* @__PURE__ */ jsx47(
7383
- "div",
7670
+ icon: /* @__PURE__ */ jsx49(CalendarDays, { size: 24 }),
7671
+ input: ({ softRequired }) => /* @__PURE__ */ jsx49(
7672
+ Input,
7384
7673
  {
7385
- className: clsx34("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7386
- children: /* @__PURE__ */ jsx47(
7387
- Input,
7388
- {
7389
- className: clsx34("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
7390
- value: dateText,
7391
- type: type === "dateTime" ? "datetime-local" : "date",
7392
- readOnly,
7393
- onChange: (event) => {
7394
- const value2 = event.target.value;
7395
- if (!value2) {
7396
- event.preventDefault();
7397
- return;
7398
- }
7399
- const dueDate = new Date(value2);
7400
- onChange(dueDate);
7401
- },
7402
- 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;
7403
7683
  }
7404
- )
7684
+ const dueDate = new Date(value2);
7685
+ onChange(dueDate);
7686
+ },
7687
+ onEditCompleted: (value2) => onEditComplete(new Date(value2))
7405
7688
  }
7406
7689
  )
7407
7690
  }
@@ -7409,14 +7692,15 @@ var DateProperty = ({
7409
7692
  };
7410
7693
 
7411
7694
  // src/components/properties/MultiSelectProperty.tsx
7412
- import { List } from "lucide-react";
7413
- import clsx36 from "clsx";
7695
+ import { List, Plus as Plus2 } from "lucide-react";
7696
+ import clsx38 from "clsx";
7414
7697
 
7415
7698
  // src/components/user-action/MultiSelect.tsx
7416
- import { useEffect as useEffect21, useRef as useRef7, useState as useState21 } from "react";
7417
- import { ChevronDown as ChevronDown5, ChevronUp as ChevronUp4 } from "lucide-react";
7418
- import clsx35 from "clsx";
7419
- 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";
7420
7704
  var defaultMultiSelectTranslation = {
7421
7705
  en: {
7422
7706
  selected: `{{amount}} selected`
@@ -7427,89 +7711,107 @@ var defaultMultiSelectTranslation = {
7427
7711
  };
7428
7712
  var MultiSelect = ({
7429
7713
  overwriteTranslation,
7430
- options,
7431
7714
  label,
7715
+ options,
7432
7716
  onChange,
7433
7717
  hintText,
7434
- isDisabled = false,
7435
- isSearchEnabled = false,
7436
7718
  selectedDisplayOverwrite,
7719
+ searchOptions,
7720
+ additionalItems,
7437
7721
  useChipDisplay = false,
7438
- className = ""
7722
+ className,
7723
+ triggerClassName,
7724
+ hintTextClassName,
7725
+ ...menuProps
7439
7726
  }) => {
7440
7727
  const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
7441
- const triggerRef = useRef7(null);
7442
- const menuRef = useRef7(null);
7443
- const [isOpen, setIsOpen] = useState21(false);
7444
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7728
+ const { result, search, setSearch } = useSearch({
7729
+ list: options,
7730
+ searchMapping: useCallback8((item) => item.searchTags, []),
7731
+ ...searchOptions
7732
+ });
7445
7733
  const selectedItems = options.filter((value) => value.selected);
7446
7734
  const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
7447
- return /* @__PURE__ */ jsxs32("div", { className: clsx35(className), children: [
7448
- label && /* @__PURE__ */ jsx48(
7735
+ return /* @__PURE__ */ jsxs34("div", { className: clsx37(className), children: [
7736
+ label && /* @__PURE__ */ jsx50(
7449
7737
  Label,
7450
7738
  {
7451
7739
  ...label,
7452
7740
  htmlFor: label.name,
7453
- className: clsx35(" mb-1", label.className),
7741
+ className: clsx37(" mb-1", label.className),
7454
7742
  labelType: label.labelType ?? "labelBig"
7455
7743
  }
7456
7744
  ),
7457
- /* @__PURE__ */ jsxs32("div", { className: "relative", children: [
7458
- /* @__PURE__ */ jsxs32(
7459
- "button",
7460
- {
7461
- ref: triggerRef,
7462
- className: clsx35(
7463
- "btn-md justify-between w-full border-2 h-auto",
7464
- {
7465
- "rounded-b-lg": !open,
7466
- "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
7467
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
7468
- }
7469
- ),
7470
- onClick: () => setIsOpen(!isOpen),
7471
- disabled: isDisabled,
7472
- children: [
7473
- !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() } })) }),
7474
- isShowingHint && /* @__PURE__ */ jsx48("span", { className: "textstyle-description", children: hintText ?? translation("select") }),
7475
- isOpen ? /* @__PURE__ */ jsx48(ChevronUp4, { size: 24, className: "min-w-6" }) : /* @__PURE__ */ jsx48(ChevronDown5, { className: "min-w-6" })
7476
- ]
7477
- }
7478
- ),
7479
- isOpen && /* @__PURE__ */ jsxs32(
7480
- "div",
7481
- {
7482
- ref: menuRef,
7483
- 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",
7484
- children: [
7485
- /* @__PURE__ */ jsx48(
7486
- 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",
7487
7755
  {
7488
- list: options,
7489
- minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
7490
- searchMapping: (item) => item.searchTags,
7491
- itemMapper: (option, index) => /* @__PURE__ */ jsx48(
7492
- 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,
7493
7793
  {
7494
- isSelected: option.selected,
7495
- className: "px-2 py-1 rounded-md",
7496
- disabledClassName: "text-disabled-text cursor-not-allowed",
7497
- title: { value: option.label, className: "font-semibold" },
7498
- onClick: () => {
7499
- onChange(options.map((value) => value.value === option.value ? {
7500
- ...option,
7501
- selected: !value.selected
7502
- } : value));
7503
- },
7504
- 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
7505
7806
  },
7506
7807
  index
7507
- )
7508
- }
7509
- ),
7510
- /* @__PURE__ */ jsxs32("div", { className: "row justify-between mt-2", children: [
7511
- /* @__PURE__ */ jsxs32("div", { className: "row gap-x-2", children: [
7512
- /* @__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(
7513
7815
  SolidButton,
7514
7816
  {
7515
7817
  color: "neutral",
@@ -7524,7 +7826,7 @@ var MultiSelect = ({
7524
7826
  children: translation("all")
7525
7827
  }
7526
7828
  ),
7527
- /* @__PURE__ */ jsx48(
7829
+ /* @__PURE__ */ jsx50(
7528
7830
  SolidButton,
7529
7831
  {
7530
7832
  color: "neutral",
@@ -7539,12 +7841,12 @@ var MultiSelect = ({
7539
7841
  }
7540
7842
  )
7541
7843
  ] }),
7542
- /* @__PURE__ */ jsx48(SolidButton, { size: "small", onClick: () => setIsOpen(false), children: "Done" })
7844
+ /* @__PURE__ */ jsx50(SolidButton, { size: "small", onClick: close, children: "Done" })
7543
7845
  ] })
7544
- ]
7846
+ ] });
7545
7847
  }
7546
- )
7547
- ] })
7848
+ }
7849
+ )
7548
7850
  ] });
7549
7851
  };
7550
7852
  var MultiSelectUncontrolled = ({
@@ -7552,11 +7854,11 @@ var MultiSelectUncontrolled = ({
7552
7854
  onChange,
7553
7855
  ...props
7554
7856
  }) => {
7555
- const [usedOptions, setUsedOptions] = useState21(options);
7556
- useEffect21(() => {
7857
+ const [usedOptions, setUsedOptions] = useState22(options);
7858
+ useEffect22(() => {
7557
7859
  setUsedOptions(options);
7558
7860
  }, [options]);
7559
- return /* @__PURE__ */ jsx48(
7861
+ return /* @__PURE__ */ jsx50(
7560
7862
  MultiSelect,
7561
7863
  {
7562
7864
  ...props,
@@ -7570,7 +7872,7 @@ var MultiSelectUncontrolled = ({
7570
7872
  };
7571
7873
 
7572
7874
  // src/components/properties/MultiSelectProperty.tsx
7573
- import { jsx as jsx49 } from "react/jsx-runtime";
7875
+ import { jsx as jsx51 } from "react/jsx-runtime";
7574
7876
  var MultiSelectProperty = ({
7575
7877
  overwriteTranslation,
7576
7878
  options,
@@ -7578,11 +7880,12 @@ var MultiSelectProperty = ({
7578
7880
  readOnly = false,
7579
7881
  softRequired,
7580
7882
  onRemove,
7883
+ onAddNew,
7581
7884
  ...multiSelectProps
7582
7885
  }) => {
7583
7886
  const translation = useTranslation([formTranslation], overwriteTranslation);
7584
7887
  const hasValue = options.some((value) => value.selected);
7585
- return /* @__PURE__ */ jsx49(
7888
+ return /* @__PURE__ */ jsx51(
7586
7889
  PropertyBase,
7587
7890
  {
7588
7891
  name,
@@ -7590,20 +7893,42 @@ var MultiSelectProperty = ({
7590
7893
  readOnly,
7591
7894
  softRequired,
7592
7895
  hasValue,
7593
- icon: /* @__PURE__ */ jsx49(List, { size: 16 }),
7594
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx49(
7595
- "div",
7896
+ icon: /* @__PURE__ */ jsx51(List, { size: 24 }),
7897
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx51(
7898
+ MultiSelect,
7596
7899
  {
7597
- className: clsx36("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7598
- children: /* @__PURE__ */ jsx49(
7599
- 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",
7600
7929
  {
7601
- ...multiSelectProps,
7602
- className: clsx36("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7603
- options,
7604
- isDisabled: readOnly,
7605
- useChipDisplay: true,
7606
- hintText: `${translation("select")}...`
7930
+ "!bg-warning !text-surface-warning": softRequired2 && !hasValue,
7931
+ "": !softRequired2 || hasValue
7607
7932
  }
7608
7933
  )
7609
7934
  }
@@ -7614,8 +7939,8 @@ var MultiSelectProperty = ({
7614
7939
 
7615
7940
  // src/components/properties/NumberProperty.tsx
7616
7941
  import { Binary } from "lucide-react";
7617
- import clsx37 from "clsx";
7618
- 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";
7619
7944
  var defaultNumberPropertyTranslation = {
7620
7945
  en: {
7621
7946
  value: "Value"
@@ -7636,23 +7961,23 @@ var NumberProperty = ({
7636
7961
  }) => {
7637
7962
  const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
7638
7963
  const hasValue = value !== void 0;
7639
- return /* @__PURE__ */ jsx50(
7964
+ return /* @__PURE__ */ jsx52(
7640
7965
  PropertyBase,
7641
7966
  {
7642
7967
  ...baseProps,
7643
7968
  onRemove,
7644
7969
  hasValue,
7645
- icon: /* @__PURE__ */ jsx50(Binary, { size: 16 }),
7646
- input: ({ softRequired }) => /* @__PURE__ */ jsxs33(
7970
+ icon: /* @__PURE__ */ jsx52(Binary, { size: 24 }),
7971
+ input: ({ softRequired }) => /* @__PURE__ */ jsxs35(
7647
7972
  "div",
7648
7973
  {
7649
- 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 }),
7650
7975
  children: [
7651
- /* @__PURE__ */ jsx50(
7976
+ /* @__PURE__ */ jsx52(
7652
7977
  Input,
7653
7978
  {
7654
7979
  expanded: false,
7655
- 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 }),
7656
7981
  value: value?.toString() ?? "",
7657
7982
  type: "number",
7658
7983
  readOnly,
@@ -7675,7 +8000,7 @@ var NumberProperty = ({
7675
8000
  }
7676
8001
  }
7677
8002
  ),
7678
- 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 })
7679
8004
  ]
7680
8005
  }
7681
8006
  )
@@ -7684,9 +8009,9 @@ var NumberProperty = ({
7684
8009
  };
7685
8010
 
7686
8011
  // src/components/properties/SelectProperty.tsx
7687
- import { List as List2 } from "lucide-react";
7688
- import clsx38 from "clsx";
7689
- 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";
7690
8015
  var SingleSelectProperty = ({
7691
8016
  overwriteTranslation,
7692
8017
  value,
@@ -7695,11 +8020,12 @@ var SingleSelectProperty = ({
7695
8020
  readOnly = false,
7696
8021
  softRequired,
7697
8022
  onRemove,
8023
+ onAddNew,
7698
8024
  ...selectProps
7699
8025
  }) => {
7700
8026
  const translation = useTranslation([formTranslation], overwriteTranslation);
7701
8027
  const hasValue = value !== void 0;
7702
- return /* @__PURE__ */ jsx51(
8028
+ return /* @__PURE__ */ jsx53(
7703
8029
  PropertyBase,
7704
8030
  {
7705
8031
  name,
@@ -7707,22 +8033,45 @@ var SingleSelectProperty = ({
7707
8033
  readOnly,
7708
8034
  softRequired,
7709
8035
  hasValue,
7710
- icon: /* @__PURE__ */ jsx51(List2, { size: 16 }),
7711
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx51(
7712
- "div",
8036
+ icon: /* @__PURE__ */ jsx53(List2, { size: 24 }),
8037
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx53(
8038
+ Select,
7713
8039
  {
7714
- className: clsx38("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7715
- children: /* @__PURE__ */ jsx51(
7716
- 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",
7717
8069
  {
7718
- ...selectProps,
7719
- value,
7720
- options,
7721
- isDisabled: readOnly,
7722
- className: clsx38("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7723
- hintText: `${translation("select")}...`
8070
+ "!bg-warning !text-surface-warning": softRequired2 && !hasValue,
8071
+ "!bg-property-title-background": !softRequired2 || hasValue
7724
8072
  }
7725
- )
8073
+ ),
8074
+ hintTextClassName: softRequired2 && !hasValue ? "text-surface-warning" : void 0
7726
8075
  }
7727
8076
  )
7728
8077
  }
@@ -7731,12 +8080,12 @@ var SingleSelectProperty = ({
7731
8080
 
7732
8081
  // src/components/properties/TextProperty.tsx
7733
8082
  import { Text } from "lucide-react";
7734
- import clsx40 from "clsx";
8083
+ import clsx42 from "clsx";
7735
8084
 
7736
8085
  // src/components/user-action/Textarea.tsx
7737
- import { useEffect as useEffect22, useState as useState22 } from "react";
7738
- import clsx39 from "clsx";
7739
- 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";
7740
8089
  var Textarea = ({
7741
8090
  label,
7742
8091
  headline,
@@ -7749,39 +8098,48 @@ var Textarea = ({
7749
8098
  onEditCompleted = noop,
7750
8099
  saveDelayOptions,
7751
8100
  defaultStyle = true,
8101
+ disabled = false,
7752
8102
  className,
7753
8103
  ...props
7754
8104
  }) => {
7755
- const [hasFocus, setHasFocus] = useState22(false);
8105
+ const [hasFocus, setHasFocus] = useState23(false);
7756
8106
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
7757
8107
  const onEditCompletedWrapper = (text) => {
7758
8108
  onEditCompleted(text);
7759
8109
  clearTimer();
7760
8110
  };
7761
- return /* @__PURE__ */ jsxs34("div", { className: "w-full", children: [
7762
- label && /* @__PURE__ */ jsx52(
8111
+ return /* @__PURE__ */ jsxs36("div", { className: "w-full", children: [
8112
+ label && /* @__PURE__ */ jsx54(
7763
8113
  Label,
7764
8114
  {
7765
8115
  ...label,
7766
8116
  htmlFor: id,
7767
- className: clsx39("mb-1", label.className),
8117
+ className: clsx41("mb-1", label.className),
7768
8118
  labelType: label.labelType ?? "labelSmall"
7769
8119
  }
7770
8120
  ),
7771
- /* @__PURE__ */ jsxs34(
8121
+ /* @__PURE__ */ jsxs36(
7772
8122
  "div",
7773
8123
  {
7774
- 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
+ ),
7775
8132
  children: [
7776
- headline && /* @__PURE__ */ jsx52("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
7777
- /* @__PURE__ */ jsx52(
8133
+ headline && /* @__PURE__ */ jsx54("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
8134
+ /* @__PURE__ */ jsx54(
7778
8135
  "textarea",
7779
8136
  {
7780
8137
  id,
7781
- 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", {
7782
8139
  "resize-none": !resizable,
7783
8140
  "h-32": defaultStyle,
7784
- "mt-3": !headline
8141
+ "mt-3": !headline,
8142
+ "text-disabled-text": disabled
7785
8143
  }, className),
7786
8144
  onChange: (event) => {
7787
8145
  const value = event.target.value;
@@ -7799,13 +8157,14 @@ var Textarea = ({
7799
8157
  onEditCompletedWrapper(event.target.value);
7800
8158
  setHasFocus(false);
7801
8159
  },
8160
+ disabled,
7802
8161
  ...props
7803
8162
  }
7804
8163
  )
7805
8164
  ]
7806
8165
  }
7807
8166
  ),
7808
- hasFocus && disclaimer && /* @__PURE__ */ jsx52("label", { className: "text-negative", children: disclaimer })
8167
+ hasFocus && disclaimer && /* @__PURE__ */ jsx54("label", { className: "text-negative", children: disclaimer })
7809
8168
  ] });
7810
8169
  };
7811
8170
  var TextareaUncontrolled = ({
@@ -7813,11 +8172,11 @@ var TextareaUncontrolled = ({
7813
8172
  onChangeText = noop,
7814
8173
  ...props
7815
8174
  }) => {
7816
- const [text, setText] = useState22(value);
7817
- useEffect22(() => {
8175
+ const [text, setText] = useState23(value);
8176
+ useEffect23(() => {
7818
8177
  setText(value);
7819
8178
  }, [value]);
7820
- return /* @__PURE__ */ jsx52(
8179
+ return /* @__PURE__ */ jsx54(
7821
8180
  Textarea,
7822
8181
  {
7823
8182
  ...props,
@@ -7831,7 +8190,7 @@ var TextareaUncontrolled = ({
7831
8190
  };
7832
8191
 
7833
8192
  // src/components/properties/TextProperty.tsx
7834
- import { jsx as jsx53 } from "react/jsx-runtime";
8193
+ import { jsx as jsx55 } from "react/jsx-runtime";
7835
8194
  var defaultTextPropertyTranslation = {
7836
8195
  en: {
7837
8196
  text: "Text"
@@ -7851,42 +8210,36 @@ var TextProperty = ({
7851
8210
  }) => {
7852
8211
  const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
7853
8212
  const hasValue = value !== void 0;
7854
- return /* @__PURE__ */ jsx53(
8213
+ return /* @__PURE__ */ jsx55(
7855
8214
  PropertyBase,
7856
8215
  {
7857
8216
  ...baseProps,
7858
8217
  onRemove,
7859
8218
  hasValue,
7860
- icon: /* @__PURE__ */ jsx53(Text, { size: 16 }),
7861
- input: ({ softRequired }) => /* @__PURE__ */ jsx53(
7862
- "div",
8219
+ icon: /* @__PURE__ */ jsx55(Text, { size: 24 }),
8220
+ input: ({ softRequired }) => /* @__PURE__ */ jsx55(
8221
+ Textarea,
7863
8222
  {
7864
- className: clsx40("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7865
- children: /* @__PURE__ */ jsx53(
7866
- Textarea,
7867
- {
7868
- className: clsx40("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7869
- rows: 5,
7870
- defaultStyle: false,
7871
- value: value ?? "",
7872
- readOnly,
7873
- placeholder: `${translation("text")}...`,
7874
- onChangeText: (value2) => {
7875
- if (!value2) {
7876
- onRemove();
7877
- } else {
7878
- onChange(value2);
7879
- }
7880
- },
7881
- onEditCompleted: (value2) => {
7882
- if (!value2) {
7883
- onRemove();
7884
- } else {
7885
- onEditComplete(value2);
7886
- }
7887
- }
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);
7888
8234
  }
7889
- )
8235
+ },
8236
+ onEditCompleted: (value2) => {
8237
+ if (!value2) {
8238
+ onRemove();
8239
+ } else {
8240
+ onEditComplete(value2);
8241
+ }
8242
+ }
7890
8243
  }
7891
8244
  )
7892
8245
  }
@@ -7894,12 +8247,12 @@ var TextProperty = ({
7894
8247
  };
7895
8248
 
7896
8249
  // src/components/table/FillerRowElement.tsx
7897
- import { clsx as clsx41 } from "clsx";
7898
- import { jsx as jsx54 } from "react/jsx-runtime";
8250
+ import { clsx as clsx43 } from "clsx";
8251
+ import { jsx as jsx56 } from "react/jsx-runtime";
7899
8252
  var FillerRowElement = ({
7900
8253
  className
7901
8254
  }) => {
7902
- 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: "-" });
7903
8256
  };
7904
8257
 
7905
8258
  // src/components/table/Filter.ts
@@ -7917,8 +8270,8 @@ var TableFilters = {
7917
8270
  };
7918
8271
 
7919
8272
  // src/components/table/Table.tsx
7920
- import { useCallback as useCallback5, useEffect as useEffect25, useMemo as useMemo3, useRef as useRef9, useState as useState24 } from "react";
7921
- 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";
7922
8275
  import {
7923
8276
  flexRender,
7924
8277
  getCoreRowModel,
@@ -7931,90 +8284,8 @@ import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
7931
8284
 
7932
8285
  // src/components/table/TableFilterButton.tsx
7933
8286
  import { FilterIcon } from "lucide-react";
7934
-
7935
- // src/components/user-action/Menu.tsx
7936
- import { useRef as useRef8 } from "react";
7937
- import clsx42 from "clsx";
7938
-
7939
- // src/util/PropsWithFunctionChildren.ts
7940
- var resolve = (children, bag) => {
7941
- if (typeof children === "function") {
7942
- return children(bag);
7943
- }
7944
- return children ?? void 0;
7945
- };
7946
- var BagFunctionUtil = {
7947
- resolve
7948
- };
7949
-
7950
- // src/components/user-action/Menu.tsx
7951
- import { jsx as jsx55, jsxs as jsxs35 } from "react/jsx-runtime";
7952
- var MenuItem = ({
7953
- children,
7954
- onClick,
7955
- alignment = "left",
7956
- isDisabled = false,
7957
- className
7958
- }) => /* @__PURE__ */ jsx55(
7959
- "div",
7960
- {
7961
- className: clsx42("block px-3 py-1.5 bg-menu-background first:rounded-t-lg last:rounded-b-lg text-sm font-semibold", {
7962
- "text-right": alignment === "right",
7963
- "text-left": alignment === "left",
7964
- "text-disabled-text cursor-not-allowed": isDisabled,
7965
- "text-menu-text hover:bg-primary/20": !isDisabled,
7966
- "cursor-pointer": !!onClick
7967
- }, className),
7968
- onClick,
7969
- children
7970
- }
7971
- );
7972
- var Menu = ({
7973
- trigger,
7974
- children,
7975
- alignment = "tl",
7976
- showOnHover = false,
7977
- menuClassName = ""
7978
- }) => {
7979
- const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
7980
- const triggerRef = useRef8(null);
7981
- const menuRef = useRef8(null);
7982
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7983
- const bag = { isOpen, close: () => setIsOpen(false) };
7984
- return /* @__PURE__ */ jsxs35(
7985
- "div",
7986
- {
7987
- className: "relative",
7988
- ...handlers,
7989
- children: [
7990
- trigger(() => setIsOpen(!isOpen), triggerRef),
7991
- /* @__PURE__ */ jsx55(
7992
- "div",
7993
- {
7994
- ref: menuRef,
7995
- onClick: (e) => e.stopPropagation(),
7996
- className: clsx42(
7997
- "absolute top-full mt-1 min-w-40 rounded-lg bg-menu-background text-menu-text shadow-around-lg z-10",
7998
- {
7999
- "top-0": alignment[0] === "t",
8000
- "bottom-0": alignment[0] === "b",
8001
- "left-0": alignment[1] === "l",
8002
- "right-0": alignment[1] === "r",
8003
- "hidden": !isOpen
8004
- },
8005
- menuClassName
8006
- ),
8007
- children: BagFunctionUtil.resolve(children, bag)
8008
- }
8009
- )
8010
- ]
8011
- }
8012
- );
8013
- };
8014
-
8015
- // src/components/table/TableFilterButton.tsx
8016
- import { useEffect as useEffect23, useState as useState23 } from "react";
8017
- 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";
8018
8289
  var defaultTableFilterTranslation = {
8019
8290
  en: {
8020
8291
  filter: "Filter",
@@ -8039,17 +8310,17 @@ var TableFilterButton = ({
8039
8310
  }) => {
8040
8311
  const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
8041
8312
  const columnFilterValue = column.getFilterValue();
8042
- const [filterValue, setFilterValue] = useState23(columnFilterValue);
8313
+ const [filterValue, setFilterValue] = useState24(columnFilterValue);
8043
8314
  const hasFilter = !!filterValue;
8044
- useEffect23(() => {
8315
+ useEffect24(() => {
8045
8316
  setFilterValue(columnFilterValue);
8046
8317
  }, [columnFilterValue]);
8047
- return /* @__PURE__ */ jsx56(
8318
+ return /* @__PURE__ */ jsx57(
8048
8319
  Menu,
8049
8320
  {
8050
- trigger: (onClick, ref) => /* @__PURE__ */ jsxs36("div", { ref, className: "relative", children: [
8051
- /* @__PURE__ */ jsx56(IconButton, { color: "neutral", size: "tiny", onClick, children: /* @__PURE__ */ jsx56(FilterIcon, {}) }),
8052
- 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(
8053
8324
  "div",
8054
8325
  {
8055
8326
  className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
@@ -8057,9 +8328,9 @@ var TableFilterButton = ({
8057
8328
  }
8058
8329
  )
8059
8330
  ] }),
8060
- children: ({ close }) => /* @__PURE__ */ jsxs36("div", { className: "col gap-y-1 p-2 items-start font-normal text-menu-text", children: [
8061
- /* @__PURE__ */ jsx56("h4", { className: "textstyle-title-sm", children: translation("filter") }),
8062
- 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(
8063
8334
  Input,
8064
8335
  {
8065
8336
  value: filterValue ?? "",
@@ -8069,8 +8340,8 @@ var TableFilterButton = ({
8069
8340
  className: "h-10"
8070
8341
  }
8071
8342
  ),
8072
- filterType === "range" && /* @__PURE__ */ jsxs36("div", { className: "row gap-x-2 items-center", children: [
8073
- /* @__PURE__ */ jsx56(
8343
+ filterType === "range" && /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 items-center", children: [
8344
+ /* @__PURE__ */ jsx57(
8074
8345
  Input,
8075
8346
  {
8076
8347
  value: filterValue?.[0] ?? "",
@@ -8083,8 +8354,8 @@ var TableFilterButton = ({
8083
8354
  className: "h-10 input-indicator-hidden w-40"
8084
8355
  }
8085
8356
  ),
8086
- /* @__PURE__ */ jsx56("span", { className: "font-bold", children: "-" }),
8087
- /* @__PURE__ */ jsx56(
8357
+ /* @__PURE__ */ jsx57("span", { className: "font-bold", children: "-" }),
8358
+ /* @__PURE__ */ jsx57(
8088
8359
  Input,
8089
8360
  {
8090
8361
  value: filterValue?.[1] ?? "",
@@ -8098,8 +8369,8 @@ var TableFilterButton = ({
8098
8369
  }
8099
8370
  )
8100
8371
  ] }),
8101
- filterType === "dateRange" && /* @__PURE__ */ jsxs36(Fragment3, { children: [
8102
- /* @__PURE__ */ jsx56(
8372
+ filterType === "dateRange" && /* @__PURE__ */ jsxs37(Fragment6, { children: [
8373
+ /* @__PURE__ */ jsx57(
8103
8374
  Input,
8104
8375
  {
8105
8376
  value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
@@ -8112,7 +8383,7 @@ var TableFilterButton = ({
8112
8383
  className: "h-10 w-50"
8113
8384
  }
8114
8385
  ),
8115
- /* @__PURE__ */ jsx56(
8386
+ /* @__PURE__ */ jsx57(
8116
8387
  Input,
8117
8388
  {
8118
8389
  value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
@@ -8126,12 +8397,12 @@ var TableFilterButton = ({
8126
8397
  }
8127
8398
  )
8128
8399
  ] }),
8129
- /* @__PURE__ */ jsxs36("div", { className: "row justify-end w-full", children: [
8130
- 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: () => {
8131
8402
  column.setFilterValue(void 0);
8132
8403
  close();
8133
8404
  }, children: translation("remove") }),
8134
- /* @__PURE__ */ jsx56(SolidButton, { size: "small", onClick: () => {
8405
+ /* @__PURE__ */ jsx57(SolidButton, { size: "small", onClick: () => {
8135
8406
  column.setFilterValue(filterValue);
8136
8407
  close();
8137
8408
  }, children: translation("apply") })
@@ -8142,9 +8413,9 @@ var TableFilterButton = ({
8142
8413
  };
8143
8414
 
8144
8415
  // src/components/table/TableSortButton.tsx
8145
- import { ChevronDown as ChevronDown6, ChevronsUpDown, ChevronUp as ChevronUp5 } from "lucide-react";
8146
- import clsx43 from "clsx";
8147
- 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";
8148
8419
  var TableSortButton = ({
8149
8420
  sortDirection,
8150
8421
  invert = false,
@@ -8152,20 +8423,20 @@ var TableSortButton = ({
8152
8423
  className,
8153
8424
  ...buttonProps
8154
8425
  }) => {
8155
- let icon = /* @__PURE__ */ jsx57(ChevronsUpDown, { className: "w-full h-full" });
8426
+ let icon = /* @__PURE__ */ jsx58(ChevronsUpDown, { className: "w-full h-full" });
8156
8427
  if (sortDirection) {
8157
8428
  let usedSortDirection = sortDirection;
8158
8429
  if (invert) {
8159
8430
  usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
8160
8431
  }
8161
- 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" });
8162
8433
  }
8163
- return /* @__PURE__ */ jsx57(
8434
+ return /* @__PURE__ */ jsx58(
8164
8435
  IconButton,
8165
8436
  {
8166
8437
  size: "tiny",
8167
8438
  color,
8168
- className: clsx43(className),
8439
+ className: clsx44(className),
8169
8440
  ...buttonProps,
8170
8441
  children: icon
8171
8442
  }
@@ -8173,9 +8444,9 @@ var TableSortButton = ({
8173
8444
  };
8174
8445
 
8175
8446
  // src/hooks/useResizeCallbackWrapper.ts
8176
- import { useEffect as useEffect24 } from "react";
8447
+ import { useEffect as useEffect25 } from "react";
8177
8448
  var useResizeCallbackWrapper = (callback) => {
8178
- useEffect24(() => {
8449
+ useEffect25(() => {
8179
8450
  window.addEventListener("resize", callback);
8180
8451
  return () => {
8181
8452
  window.removeEventListener("resize", callback);
@@ -8184,17 +8455,17 @@ var useResizeCallbackWrapper = (callback) => {
8184
8455
  };
8185
8456
 
8186
8457
  // src/components/table/TableCell.tsx
8187
- import { clsx as clsx44 } from "clsx";
8188
- import { jsx as jsx58 } from "react/jsx-runtime";
8458
+ import { clsx as clsx45 } from "clsx";
8459
+ import { jsx as jsx59 } from "react/jsx-runtime";
8189
8460
  var TableCell = ({
8190
8461
  children,
8191
8462
  className
8192
8463
  }) => {
8193
- 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 });
8194
8465
  };
8195
8466
 
8196
8467
  // src/components/table/Table.tsx
8197
- import { jsx as jsx59, jsxs as jsxs37 } from "react/jsx-runtime";
8468
+ import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
8198
8469
  var Table = ({
8199
8470
  data,
8200
8471
  fillerRow,
@@ -8207,21 +8478,21 @@ var Table = ({
8207
8478
  columns,
8208
8479
  ...tableOptions
8209
8480
  }) => {
8210
- const ref = useRef9(null);
8211
- const tableRef = useRef9(null);
8212
- 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) => {
8213
8484
  return {
8214
8485
  ...previousValue,
8215
8486
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
8216
8487
  };
8217
8488
  }, {}));
8218
- const [columnSizingInfo, setColumnSizingInfo] = useState24();
8219
- const [pagination, setPagination] = useState24({
8489
+ const [columnSizingInfo, setColumnSizingInfo] = useState25();
8490
+ const [pagination, setPagination] = useState25({
8220
8491
  pageSize: 10,
8221
8492
  pageIndex: 0,
8222
8493
  ...initialState?.pagination
8223
8494
  });
8224
- const [columnFilters, setColumnFilters] = useState24(initialState?.columnFilters);
8495
+ const [columnFilters, setColumnFilters] = useState25(initialState?.columnFilters);
8225
8496
  const computedColumnMinWidths = useMemo3(() => {
8226
8497
  return columns.reduce((previousValue, column) => {
8227
8498
  return {
@@ -8313,7 +8584,7 @@ var Table = ({
8313
8584
  minSize: 60,
8314
8585
  maxSize: 700,
8315
8586
  cell: ({ cell }) => {
8316
- return /* @__PURE__ */ jsx59(TableCell, { children: cell.getValue() });
8587
+ return /* @__PURE__ */ jsx60(TableCell, { children: cell.getValue() });
8317
8588
  },
8318
8589
  ...defaultColumn
8319
8590
  },
@@ -8361,18 +8632,18 @@ var Table = ({
8361
8632
  columnResizeMode: "onChange",
8362
8633
  ...tableOptions
8363
8634
  });
8364
- const [hasInitializedSizing, setHasInitializedSizing] = useState24(false);
8365
- useEffect25(() => {
8635
+ const [hasInitializedSizing, setHasInitializedSizing] = useState25(false);
8636
+ useEffect26(() => {
8366
8637
  if (!hasInitializedSizing && ref.current) {
8367
8638
  setHasInitializedSizing(true);
8368
8639
  table.setColumnSizing(updateColumnSizes(columnSizing));
8369
8640
  }
8370
8641
  }, [columnSizing, hasInitializedSizing]);
8371
- useResizeCallbackWrapper(useCallback5(() => {
8642
+ useResizeCallbackWrapper(useCallback9(() => {
8372
8643
  table.setColumnSizing(updateColumnSizes);
8373
8644
  }, [updateColumnSizes]));
8374
8645
  const pageCount = table.getPageCount();
8375
- useEffect25(() => {
8646
+ useEffect26(() => {
8376
8647
  const totalPages = pageCount;
8377
8648
  if (totalPages === 0) {
8378
8649
  if (pagination.pageIndex !== 0) {
@@ -8393,98 +8664,106 @@ var Table = ({
8393
8664
  const colSizes = {};
8394
8665
  for (let i = 0; i < headers.length; i++) {
8395
8666
  const header = headers[i];
8396
- colSizes[`--header-${header.id}-size`] = header.getSize();
8397
- 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());
8398
8669
  }
8399
8670
  return colSizes;
8400
8671
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
8401
- return /* @__PURE__ */ jsxs37("div", { ref, className: clsx45("col gap-y-4", className), children: [
8402
- /* @__PURE__ */ jsx59(Scrollbars3, { autoHeight: true, autoHeightMax: tableRef.current?.offsetHeight, autoHide: true, children: /* @__PURE__ */ jsxs37(
8403
- "table",
8672
+ return /* @__PURE__ */ jsxs38("div", { ref, className: clsx46("flex-col-4", className), children: [
8673
+ /* @__PURE__ */ jsx60(
8674
+ Scrollbars3,
8404
8675
  {
8405
- ref: tableRef,
8406
- className: clsx45(tableClassName),
8407
- style: {
8408
- ...columnSizeVars,
8409
- width: Math.max(table.getTotalSize(), ref.current?.offsetWidth ?? table.getTotalSize())
8410
- },
8411
- children: [
8412
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx59(
8413
- "col",
8414
- {
8415
- style: {
8416
- width: `calc(var(--header-${header?.id}-size) * 1px)`,
8417
- minWidth: header.column.columnDef.minSize,
8418
- maxWidth: header.column.columnDef.maxSize
8419
- }
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()))
8420
8687
  },
8421
- header.id
8422
- )) }, headerGroup.id)),
8423
- /* @__PURE__ */ jsx59("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
8424
- return /* @__PURE__ */ jsxs37(
8425
- "th",
8426
- {
8427
- colSpan: header.colSpan,
8428
- className: clsx45("relative group", header.column.columnDef.meta?.className),
8429
- children: [
8430
- /* @__PURE__ */ jsx59("div", { className: "row w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs37("div", { className: "row gap-x-1 items-center", children: [
8431
- header.column.getCanSort() && /* @__PURE__ */ jsx59(
8432
- TableSortButton,
8433
- {
8434
- sortDirection: header.column.getIsSorted(),
8435
- onClick: () => header.column.toggleSorting()
8436
- }
8437
- ),
8438
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx59(
8439
- TableFilterButton,
8440
- {
8441
- column: header.column,
8442
- filterType: header.column.columnDef.meta.filterType
8443
- }
8444
- ) : null,
8445
- flexRender(
8446
- header.column.columnDef.header,
8447
- header.getContext()
8448
- )
8449
- ] }) }),
8450
- header.column.getCanResize() && /* @__PURE__ */ jsx59(
8451
- "div",
8452
- {
8453
- onMouseDown: header.getResizeHandler(),
8454
- onTouchStart: header.getResizeHandler(),
8455
- onDoubleClick: () => {
8456
- header.column.resetSize();
8457
- },
8458
- className: "table-resize-indicator w-2 rounded bg-primary cursor-col-resize select-none touch-none opacity-0 group-hover:opacity-100 transition-opacity",
8459
- style: {
8460
- opacity: !columnSizingInfo?.columnSizingStart ? void 0 : columnSizingInfo?.columnSizingStart?.findIndex(([id, _]) => id === header.column.id) !== -1 ? 1 : columnSizingInfo?.columnSizingStart?.length !== 0 ? 0 : void 0
8461
- }
8462
- }
8463
- )
8464
- ]
8465
- },
8466
- header.id
8467
- );
8468
- }) }, headerGroup.id)) }),
8469
- /* @__PURE__ */ jsxs37("tbody", { children: [
8470
- table.getRowModel().rows.map((row) => {
8471
- return /* @__PURE__ */ jsx59("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
8472
- return /* @__PURE__ */ jsx59("td", { children: flexRender(
8473
- cell.column.columnDef.cell,
8474
- cell.getContext()
8475
- ) }, cell.id);
8476
- }) }, row.id);
8477
- }),
8478
- range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
8479
- return /* @__PURE__ */ jsx59("tr", { children: columns.map((column) => {
8480
- return /* @__PURE__ */ jsx59("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx59(FillerRowElement, {}) }, column.id);
8481
- }) }, "filler-row-" + index);
8482
- })
8483
- ] })
8484
- ]
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
+ )
8485
8764
  }
8486
- ) }),
8487
- /* @__PURE__ */ jsx59("div", { className: "row justify-center", children: /* @__PURE__ */ jsx59(
8765
+ ),
8766
+ /* @__PURE__ */ jsx60("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx60(
8488
8767
  Pagination,
8489
8768
  {
8490
8769
  pageIndex: table.getState().pagination.pageIndex,
@@ -8495,11 +8774,11 @@ var Table = ({
8495
8774
  ] });
8496
8775
  };
8497
8776
  var TableUncontrolled = ({ data, ...props }) => {
8498
- const [usedDate, setUsedData] = useState24(data);
8499
- useEffect25(() => {
8777
+ const [usedDate, setUsedData] = useState25(data);
8778
+ useEffect26(() => {
8500
8779
  setUsedData(data);
8501
8780
  }, [data]);
8502
- return /* @__PURE__ */ jsx59(
8781
+ return /* @__PURE__ */ jsx60(
8503
8782
  Table,
8504
8783
  {
8505
8784
  ...props,
@@ -8523,7 +8802,7 @@ var TableWithSelection = ({
8523
8802
  {
8524
8803
  id: selectionRowId,
8525
8804
  header: ({ table }) => {
8526
- return /* @__PURE__ */ jsx59(
8805
+ return /* @__PURE__ */ jsx60(
8527
8806
  Checkbox,
8528
8807
  {
8529
8808
  checked: table.getIsSomeRowsSelected() ? "indeterminate" : table.getIsAllRowsSelected(),
@@ -8536,7 +8815,7 @@ var TableWithSelection = ({
8536
8815
  );
8537
8816
  },
8538
8817
  cell: ({ row }) => {
8539
- return /* @__PURE__ */ jsx59(
8818
+ return /* @__PURE__ */ jsx60(
8540
8819
  Checkbox,
8541
8820
  {
8542
8821
  disabled: !row.getCanSelect(),
@@ -8555,15 +8834,15 @@ var TableWithSelection = ({
8555
8834
  ...columns
8556
8835
  ];
8557
8836
  }, [columns, selectionRowId]);
8558
- return /* @__PURE__ */ jsx59(
8837
+ return /* @__PURE__ */ jsx60(
8559
8838
  Table,
8560
8839
  {
8561
8840
  columns: columnsWithSelection,
8562
8841
  fillerRow: (columnId, table) => {
8563
8842
  if (columnId === selectionRowId) {
8564
- 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" });
8565
8844
  }
8566
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx59(FillerRowElement, {});
8845
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx60(FillerRowElement, {});
8567
8846
  },
8568
8847
  state: {
8569
8848
  rowSelection,
@@ -8577,7 +8856,7 @@ var TableWithSelection = ({
8577
8856
  },
8578
8857
  meta: {
8579
8858
  ...meta,
8580
- bodyRowClassName: clsx45(
8859
+ bodyRowClassName: clsx46(
8581
8860
  { "cursor-pointer": !disableClickRowClickSelection },
8582
8861
  meta?.bodyRowClassName
8583
8862
  )
@@ -8588,8 +8867,8 @@ var TableWithSelection = ({
8588
8867
  };
8589
8868
 
8590
8869
  // src/components/user-action/CopyToClipboardWrapper.tsx
8591
- import { useState as useState25 } from "react";
8592
- import { clsx as clsx46 } from "clsx";
8870
+ import { useState as useState26 } from "react";
8871
+ import { clsx as clsx47 } from "clsx";
8593
8872
 
8594
8873
  // src/util/writeToClipboard.ts
8595
8874
  var writeToClipboard = (text) => {
@@ -8598,7 +8877,7 @@ var writeToClipboard = (text) => {
8598
8877
 
8599
8878
  // src/components/user-action/CopyToClipboardWrapper.tsx
8600
8879
  import { CheckIcon, Copy } from "lucide-react";
8601
- import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
8880
+ import { jsx as jsx61, jsxs as jsxs39 } from "react/jsx-runtime";
8602
8881
  var CopyToClipboardWrapper = ({
8603
8882
  children,
8604
8883
  textToCopy,
@@ -8608,8 +8887,8 @@ var CopyToClipboardWrapper = ({
8608
8887
  zIndex = 10
8609
8888
  }) => {
8610
8889
  const translation = useTranslation([formTranslation]);
8611
- const [isShowingIndication, setIsShowingIndication] = useState25(false);
8612
- const [isShowingConfirmation, setIsShowingConfirmation] = useState25(false);
8890
+ const [isShowingIndication, setIsShowingIndication] = useState26(false);
8891
+ const [isShowingConfirmation, setIsShowingConfirmation] = useState26(false);
8613
8892
  const positionClasses = {
8614
8893
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
8615
8894
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -8629,10 +8908,10 @@ var CopyToClipboardWrapper = ({
8629
8908
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
8630
8909
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
8631
8910
  };
8632
- return /* @__PURE__ */ jsxs38(
8911
+ return /* @__PURE__ */ jsxs39(
8633
8912
  "div",
8634
8913
  {
8635
- className: clsx46("relative inline-block cursor-copy", containerClassName),
8914
+ className: clsx47("relative inline-block cursor-copy", containerClassName),
8636
8915
  onMouseEnter: () => {
8637
8916
  setIsShowingIndication(true);
8638
8917
  },
@@ -8647,10 +8926,10 @@ var CopyToClipboardWrapper = ({
8647
8926
  },
8648
8927
  children: [
8649
8928
  children,
8650
- /* @__PURE__ */ jsxs38(
8929
+ /* @__PURE__ */ jsxs39(
8651
8930
  "div",
8652
8931
  {
8653
- className: clsx46(
8932
+ className: clsx47(
8654
8933
  `absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
8655
8934
  shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
8656
8935
  "transition-opacity duration-200",
@@ -8662,18 +8941,18 @@ var CopyToClipboardWrapper = ({
8662
8941
  opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
8663
8942
  },
8664
8943
  children: [
8665
- isShowingConfirmation && /* @__PURE__ */ jsxs38("div", { className: "row gap-x-1", children: [
8666
- /* @__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" }),
8667
8946
  translation("copied")
8668
8947
  ] }),
8669
- isShowingIndication && /* @__PURE__ */ jsxs38("div", { className: "row gap-x-1 text-description", children: [
8670
- /* @__PURE__ */ jsx60(Copy, { size: 16 }),
8948
+ isShowingIndication && /* @__PURE__ */ jsxs39("div", { className: "flex-row-1 text-description", children: [
8949
+ /* @__PURE__ */ jsx61(Copy, { size: 16 }),
8671
8950
  translation("clickToCopy")
8672
8951
  ] }),
8673
- /* @__PURE__ */ jsx60(
8952
+ /* @__PURE__ */ jsx61(
8674
8953
  "div",
8675
8954
  {
8676
- className: clsx46(`absolute w-0 h-0`, triangleClasses[position]),
8955
+ className: clsx47(`absolute w-0 h-0`, triangleClasses[position]),
8677
8956
  style: { ...triangleStyle[position], zIndex: zIndex + 1 }
8678
8957
  }
8679
8958
  )
@@ -8686,8 +8965,8 @@ var CopyToClipboardWrapper = ({
8686
8965
  };
8687
8966
 
8688
8967
  // src/components/user-action/DateAndTimePicker.tsx
8689
- import clsx47 from "clsx";
8690
- 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";
8691
8970
  var DateTimePicker = ({
8692
8971
  overwriteTranslation,
8693
8972
  value = /* @__PURE__ */ new Date(),
@@ -8706,7 +8985,7 @@ var DateTimePicker = ({
8706
8985
  let dateDisplay;
8707
8986
  let timeDisplay;
8708
8987
  if (useDate) {
8709
- dateDisplay = /* @__PURE__ */ jsx61(
8988
+ dateDisplay = /* @__PURE__ */ jsx62(
8710
8989
  DatePicker,
8711
8990
  {
8712
8991
  ...datePickerProps,
@@ -8720,25 +8999,25 @@ var DateTimePicker = ({
8720
8999
  );
8721
9000
  }
8722
9001
  if (useTime) {
8723
- timeDisplay = /* @__PURE__ */ jsx61(
9002
+ timeDisplay = /* @__PURE__ */ jsx62(
8724
9003
  TimePicker,
8725
9004
  {
8726
9005
  ...timePickerProps,
8727
- className: clsx47("h-full", { "justify-between w-full": mode === "time" }),
9006
+ className: clsx48("h-full", { "justify-between w-full": mode === "time" }),
8728
9007
  maxHeight: 250,
8729
9008
  time: value,
8730
9009
  onChange
8731
9010
  }
8732
9011
  );
8733
9012
  }
8734
- return /* @__PURE__ */ jsxs39("div", { className: "col w-fit", children: [
8735
- /* @__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: [
8736
9015
  dateDisplay,
8737
9016
  timeDisplay
8738
9017
  ] }),
8739
- /* @__PURE__ */ jsx61("div", { className: "row justify-end", children: /* @__PURE__ */ jsxs39("div", { className: "row gap-x-2 mt-1", children: [
8740
- /* @__PURE__ */ jsx61(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
8741
- /* @__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(
8742
9021
  SolidButton,
8743
9022
  {
8744
9023
  size: "medium",
@@ -8751,9 +9030,9 @@ var DateTimePicker = ({
8751
9030
  };
8752
9031
 
8753
9032
  // src/components/user-action/ScrollPicker.tsx
8754
- import { useCallback as useCallback6, useEffect as useEffect26, useState as useState26 } from "react";
8755
- import clsx48 from "clsx";
8756
- 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";
8757
9036
  var up = 1;
8758
9037
  var down = -1;
8759
9038
  var ScrollPicker = ({
@@ -8772,7 +9051,7 @@ var ScrollPicker = ({
8772
9051
  transition,
8773
9052
  items,
8774
9053
  lastTimeStamp
8775
- }, setAnimation] = useState26({
9054
+ }, setAnimation] = useState27({
8776
9055
  targetIndex: selectedIndex,
8777
9056
  currentIndex: disabled ? selectedIndex : 0,
8778
9057
  velocity: 0,
@@ -8788,7 +9067,7 @@ var ScrollPicker = ({
8788
9067
  const itemHeight = 40;
8789
9068
  const distance = 8;
8790
9069
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
8791
- const getDirection = useCallback6((targetIndex, currentIndex2, transition2, length) => {
9070
+ const getDirection = useCallback10((targetIndex, currentIndex2, transition2, length) => {
8792
9071
  if (targetIndex === currentIndex2) {
8793
9072
  return transition2 > 0 ? up : down;
8794
9073
  }
@@ -8798,7 +9077,7 @@ var ScrollPicker = ({
8798
9077
  }
8799
9078
  return distanceForward >= length / 2 ? down : up;
8800
9079
  }, []);
8801
- const animate = useCallback6((timestamp, startTime) => {
9080
+ const animate = useCallback10((timestamp, startTime) => {
8802
9081
  setAnimation((prevState) => {
8803
9082
  const {
8804
9083
  targetIndex,
@@ -8871,7 +9150,7 @@ var ScrollPicker = ({
8871
9150
  };
8872
9151
  });
8873
9152
  }, [disabled, getDirection, onChange]);
8874
- useEffect26(() => {
9153
+ useEffect27(() => {
8875
9154
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
8876
9155
  });
8877
9156
  const opacity = (transition2, index, itemsCount) => {
@@ -8892,7 +9171,7 @@ var ScrollPicker = ({
8892
9171
  }
8893
9172
  return clamp(1 - opacityValue / max);
8894
9173
  };
8895
- return /* @__PURE__ */ jsx62(
9174
+ return /* @__PURE__ */ jsx63(
8896
9175
  "div",
8897
9176
  {
8898
9177
  className: "relative overflow-hidden",
@@ -8902,27 +9181,27 @@ var ScrollPicker = ({
8902
9181
  setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + event.deltaY }));
8903
9182
  }
8904
9183
  },
8905
- children: /* @__PURE__ */ jsxs40("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
8906
- /* @__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(
8907
9186
  "div",
8908
9187
  {
8909
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 ",
8910
9189
  style: { height: `${itemHeight}px` }
8911
9190
  }
8912
9191
  ),
8913
- /* @__PURE__ */ jsx62(
9192
+ /* @__PURE__ */ jsx63(
8914
9193
  "div",
8915
9194
  {
8916
- className: "col select-none",
9195
+ className: "flex-col-2 select-none",
8917
9196
  style: {
8918
9197
  transform: `translateY(${-transition * (distance + itemHeight)}px)`,
8919
9198
  columnGap: `${distance}px`
8920
9199
  },
8921
- children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx62(
9200
+ children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx63(
8922
9201
  "div",
8923
9202
  {
8924
- className: clsx48(
8925
- `col items-center justify-center rounded-md`,
9203
+ className: clsx49(
9204
+ `flex-col-2 items-center justify-center rounded-md`,
8926
9205
  {
8927
9206
  "text-primary font-bold": currentIndex === index,
8928
9207
  "text-on-background": currentIndex === index,
@@ -8948,10 +9227,10 @@ var ScrollPicker = ({
8948
9227
  };
8949
9228
 
8950
9229
  // src/components/user-action/ToggleableInput.tsx
8951
- 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";
8952
9231
  import { Pencil } from "lucide-react";
8953
- import clsx49 from "clsx";
8954
- 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";
8955
9234
  var ToggleableInput = ({
8956
9235
  type = "text",
8957
9236
  value,
@@ -8966,26 +9245,26 @@ var ToggleableInput = ({
8966
9245
  saveDelayOptions,
8967
9246
  ...restProps
8968
9247
  }) => {
8969
- const [isEditing, setIsEditing] = useState27(initialState !== "display");
9248
+ const [isEditing, setIsEditing] = useState28(initialState !== "display");
8970
9249
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
8971
- const ref = useRef10(null);
9250
+ const ref = useRef8(null);
8972
9251
  const onEditCompletedWrapper = (text) => {
8973
9252
  onEditCompleted(text);
8974
9253
  clearTimer();
8975
9254
  };
8976
- useEffect27(() => {
9255
+ useEffect28(() => {
8977
9256
  if (isEditing) {
8978
9257
  ref.current?.focus();
8979
9258
  }
8980
9259
  }, [isEditing]);
8981
- return /* @__PURE__ */ jsxs41("div", { children: [
8982
- /* @__PURE__ */ jsxs41(
9260
+ return /* @__PURE__ */ jsxs42("div", { children: [
9261
+ /* @__PURE__ */ jsxs42(
8983
9262
  "div",
8984
9263
  {
8985
- 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 }),
8986
9265
  onClick: () => !isEditing ? setIsEditing(!isEditing) : void 0,
8987
9266
  children: [
8988
- /* @__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(
8989
9268
  "input",
8990
9269
  {
8991
9270
  ref,
@@ -9013,16 +9292,16 @@ var ToggleableInput = ({
9013
9292
  onEditCompletedWrapper(value);
9014
9293
  }
9015
9294
  },
9016
- 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`, {
9017
9296
  underline: isEditing
9018
9297
  }, labelClassName),
9019
9298
  onFocus: (event) => event.target.select()
9020
9299
  }
9021
- ) : /* @__PURE__ */ jsx63("span", { className: clsx49("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
9022
- /* @__PURE__ */ jsx63(
9300
+ ) : /* @__PURE__ */ jsx64("span", { className: clsx50("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
9301
+ /* @__PURE__ */ jsx64(
9023
9302
  Pencil,
9024
9303
  {
9025
- className: clsx49(`cursor-pointer`, { "text-transparent": isEditing }),
9304
+ className: clsx50(`cursor-pointer`, { "text-transparent": isEditing }),
9026
9305
  size,
9027
9306
  style: { minWidth: `${size}px` }
9028
9307
  }
@@ -9030,7 +9309,7 @@ var ToggleableInput = ({
9030
9309
  ]
9031
9310
  }
9032
9311
  ),
9033
- isEditing && disclaimer && /* @__PURE__ */ jsx63("label", { className: "text-negative", children: disclaimer })
9312
+ isEditing && disclaimer && /* @__PURE__ */ jsx64("label", { className: "text-negative", children: disclaimer })
9034
9313
  ] });
9035
9314
  };
9036
9315
  var ToggleableInputUncontrolled = ({
@@ -9038,11 +9317,11 @@ var ToggleableInputUncontrolled = ({
9038
9317
  onChangeText = noop,
9039
9318
  ...restProps
9040
9319
  }) => {
9041
- const [value, setValue] = useState27(initialValue);
9042
- useEffect27(() => {
9320
+ const [value, setValue] = useState28(initialValue);
9321
+ useEffect28(() => {
9043
9322
  setValue(initialValue);
9044
9323
  }, [initialValue]);
9045
- return /* @__PURE__ */ jsx63(
9324
+ return /* @__PURE__ */ jsx64(
9046
9325
  ToggleableInput,
9047
9326
  {
9048
9327
  value,
@@ -9137,6 +9416,7 @@ export {
9137
9416
  ErrorComponent,
9138
9417
  Expandable,
9139
9418
  ExpandableUncontrolled,
9419
+ ExpansionIcon,
9140
9420
  FAQSection,
9141
9421
  FillerRowElement,
9142
9422
  FormInput,
@@ -9177,8 +9457,10 @@ export {
9177
9457
  Ring,
9178
9458
  RingWave,
9179
9459
  ScrollPicker,
9460
+ SearchBar,
9180
9461
  SearchableList,
9181
9462
  Select,
9463
+ SelectTile,
9182
9464
  SelectUncontrolled,
9183
9465
  SessionStorageService,
9184
9466
  SimpleSearch,
@@ -9255,6 +9537,7 @@ export {
9255
9537
  useLocalStorage,
9256
9538
  useLocale,
9257
9539
  useOutsideClick,
9540
+ usePopoverPosition,
9258
9541
  useRerender,
9259
9542
  useResizeCallbackWrapper,
9260
9543
  useSearch,