@helpwave/hightide 0.1.7 → 0.1.8

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 (175) hide show
  1. package/dist/components/branding/HelpwaveBadge.js +30 -8
  2. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  3. package/dist/components/branding/HelpwaveBadge.mjs +30 -8
  4. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  5. package/dist/components/date/DatePicker.js +18 -20
  6. package/dist/components/date/DatePicker.js.map +1 -1
  7. package/dist/components/date/DatePicker.mjs +18 -20
  8. package/dist/components/date/DatePicker.mjs.map +1 -1
  9. package/dist/components/date/DayPicker.d.mts +1 -1
  10. package/dist/components/date/DayPicker.d.ts +1 -1
  11. package/dist/components/date/DayPicker.js +23 -11
  12. package/dist/components/date/DayPicker.js.map +1 -1
  13. package/dist/components/date/DayPicker.mjs +23 -11
  14. package/dist/components/date/DayPicker.mjs.map +1 -1
  15. package/dist/components/date/YearMonthPicker.js +106 -22
  16. package/dist/components/date/YearMonthPicker.js.map +1 -1
  17. package/dist/components/date/YearMonthPicker.mjs +106 -22
  18. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  19. package/dist/components/dialogs/ConfirmDialog.js +2 -2
  20. package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
  21. package/dist/components/dialogs/ConfirmDialog.mjs +2 -2
  22. package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
  23. package/dist/components/icons-and-geometry/Avatar.js +2 -2
  24. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  25. package/dist/components/icons-and-geometry/Avatar.mjs +2 -2
  26. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  27. package/dist/components/layout-and-navigation/Carousel.d.mts +1 -1
  28. package/dist/components/layout-and-navigation/Carousel.d.ts +1 -1
  29. package/dist/components/layout-and-navigation/Carousel.js +86 -28
  30. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  31. package/dist/components/layout-and-navigation/Carousel.mjs +86 -28
  32. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  33. package/dist/components/layout-and-navigation/Expandable.d.mts +3 -0
  34. package/dist/components/layout-and-navigation/Expandable.d.ts +3 -0
  35. package/dist/components/layout-and-navigation/Expandable.js +4 -3
  36. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  37. package/dist/components/layout-and-navigation/Expandable.mjs +4 -3
  38. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  39. package/dist/components/layout-and-navigation/FAQSection.js +4 -3
  40. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  41. package/dist/components/layout-and-navigation/FAQSection.mjs +4 -3
  42. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  43. package/dist/components/layout-and-navigation/Overlay.js +2 -2
  44. package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
  45. package/dist/components/layout-and-navigation/Overlay.mjs +2 -2
  46. package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
  47. package/dist/components/layout-and-navigation/SearchableList.d.mts +7 -6
  48. package/dist/components/layout-and-navigation/SearchableList.d.ts +7 -6
  49. package/dist/components/layout-and-navigation/SearchableList.js +114 -21
  50. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
  51. package/dist/components/layout-and-navigation/SearchableList.mjs +114 -21
  52. package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
  53. package/dist/components/layout-and-navigation/StepperBar.js +6 -6
  54. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  55. package/dist/components/layout-and-navigation/StepperBar.mjs +6 -6
  56. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  57. package/dist/components/layout-and-navigation/Table.js +1 -1
  58. package/dist/components/layout-and-navigation/Table.js.map +1 -1
  59. package/dist/components/layout-and-navigation/Table.mjs +1 -1
  60. package/dist/components/layout-and-navigation/Table.mjs.map +1 -1
  61. package/dist/components/layout-and-navigation/Tile.d.mts +10 -15
  62. package/dist/components/layout-and-navigation/Tile.d.ts +10 -15
  63. package/dist/components/layout-and-navigation/Tile.js +30 -8
  64. package/dist/components/layout-and-navigation/Tile.js.map +1 -1
  65. package/dist/components/layout-and-navigation/Tile.mjs +30 -8
  66. package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
  67. package/dist/components/loading-states/ProgressIndicator.js +2 -2
  68. package/dist/components/loading-states/ProgressIndicator.js.map +1 -1
  69. package/dist/components/loading-states/ProgressIndicator.mjs +2 -2
  70. package/dist/components/loading-states/ProgressIndicator.mjs.map +1 -1
  71. package/dist/components/modals/ConfirmModal.js +2 -2
  72. package/dist/components/modals/ConfirmModal.js.map +1 -1
  73. package/dist/components/modals/ConfirmModal.mjs +2 -2
  74. package/dist/components/modals/ConfirmModal.mjs.map +1 -1
  75. package/dist/components/modals/DiscardChangesModal.js +2 -2
  76. package/dist/components/modals/DiscardChangesModal.js.map +1 -1
  77. package/dist/components/modals/DiscardChangesModal.mjs +2 -2
  78. package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
  79. package/dist/components/modals/InputModal.js +2 -2
  80. package/dist/components/modals/InputModal.js.map +1 -1
  81. package/dist/components/modals/InputModal.mjs +2 -2
  82. package/dist/components/modals/InputModal.mjs.map +1 -1
  83. package/dist/components/modals/LanguageModal.js +384 -150
  84. package/dist/components/modals/LanguageModal.js.map +1 -1
  85. package/dist/components/modals/LanguageModal.mjs +383 -149
  86. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  87. package/dist/components/modals/ThemeModal.js +385 -154
  88. package/dist/components/modals/ThemeModal.js.map +1 -1
  89. package/dist/components/modals/ThemeModal.mjs +382 -151
  90. package/dist/components/modals/ThemeModal.mjs.map +1 -1
  91. package/dist/components/properties/CheckboxProperty.js +1 -1
  92. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  93. package/dist/components/properties/CheckboxProperty.mjs +1 -1
  94. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  95. package/dist/components/properties/DateProperty.js +1 -1
  96. package/dist/components/properties/DateProperty.js.map +1 -1
  97. package/dist/components/properties/DateProperty.mjs +1 -1
  98. package/dist/components/properties/DateProperty.mjs.map +1 -1
  99. package/dist/components/properties/MultiSelectProperty.d.mts +1 -0
  100. package/dist/components/properties/MultiSelectProperty.d.ts +1 -0
  101. package/dist/components/properties/MultiSelectProperty.js +482 -430
  102. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  103. package/dist/components/properties/MultiSelectProperty.mjs +478 -426
  104. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  105. package/dist/components/properties/NumberProperty.js +1 -1
  106. package/dist/components/properties/NumberProperty.js.map +1 -1
  107. package/dist/components/properties/NumberProperty.mjs +1 -1
  108. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  109. package/dist/components/properties/PropertyBase.js +1 -1
  110. package/dist/components/properties/PropertyBase.js.map +1 -1
  111. package/dist/components/properties/PropertyBase.mjs +1 -1
  112. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  113. package/dist/components/properties/SelectProperty.d.mts +3 -3
  114. package/dist/components/properties/SelectProperty.d.ts +3 -3
  115. package/dist/components/properties/SelectProperty.js +404 -263
  116. package/dist/components/properties/SelectProperty.js.map +1 -1
  117. package/dist/components/properties/SelectProperty.mjs +404 -263
  118. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  119. package/dist/components/properties/TextProperty.js +1 -1
  120. package/dist/components/properties/TextProperty.js.map +1 -1
  121. package/dist/components/properties/TextProperty.mjs +1 -1
  122. package/dist/components/properties/TextProperty.mjs.map +1 -1
  123. package/dist/components/user-action/DateAndTimePicker.js +18 -20
  124. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  125. package/dist/components/user-action/DateAndTimePicker.mjs +18 -20
  126. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  127. package/dist/components/user-action/Menu.d.mts +14 -8
  128. package/dist/components/user-action/Menu.d.ts +14 -8
  129. package/dist/components/user-action/Menu.js +32 -11
  130. package/dist/components/user-action/Menu.js.map +1 -1
  131. package/dist/components/user-action/Menu.mjs +32 -11
  132. package/dist/components/user-action/Menu.mjs.map +1 -1
  133. package/dist/components/user-action/MultiSelect.d.mts +10 -16
  134. package/dist/components/user-action/MultiSelect.d.ts +10 -16
  135. package/dist/components/user-action/MultiSelect.js +485 -312
  136. package/dist/components/user-action/MultiSelect.js.map +1 -1
  137. package/dist/components/user-action/MultiSelect.mjs +482 -310
  138. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  139. package/dist/components/user-action/Select.d.mts +5 -18
  140. package/dist/components/user-action/Select.d.ts +5 -18
  141. package/dist/components/user-action/Select.js +309 -113
  142. package/dist/components/user-action/Select.js.map +1 -1
  143. package/dist/components/user-action/Select.mjs +304 -107
  144. package/dist/components/user-action/Select.mjs.map +1 -1
  145. package/dist/components/user-action/Tooltip.js +2 -2
  146. package/dist/components/user-action/Tooltip.js.map +1 -1
  147. package/dist/components/user-action/Tooltip.mjs +2 -2
  148. package/dist/components/user-action/Tooltip.mjs.map +1 -1
  149. package/dist/css/globals.css +213 -205
  150. package/dist/css/uncompiled/globals.css +136 -72
  151. package/dist/hooks/useSearch.d.mts +17 -0
  152. package/dist/hooks/useSearch.d.ts +17 -0
  153. package/dist/hooks/useSearch.js +66 -0
  154. package/dist/hooks/useSearch.js.map +1 -0
  155. package/dist/hooks/useSearch.mjs +42 -0
  156. package/dist/hooks/useSearch.mjs.map +1 -0
  157. package/dist/index.d.mts +7 -5
  158. package/dist/index.d.ts +7 -5
  159. package/dist/index.js +555 -463
  160. package/dist/index.js.map +1 -1
  161. package/dist/index.mjs +517 -427
  162. package/dist/index.mjs.map +1 -1
  163. package/dist/util/PropsWithFunctionChildren.d.mts +14 -0
  164. package/dist/util/PropsWithFunctionChildren.d.ts +14 -0
  165. package/dist/util/PropsWithFunctionChildren.js +38 -0
  166. package/dist/util/PropsWithFunctionChildren.js.map +1 -0
  167. package/dist/util/PropsWithFunctionChildren.mjs +14 -0
  168. package/dist/util/PropsWithFunctionChildren.mjs.map +1 -0
  169. package/dist/util/simpleSearch.d.mts +2 -2
  170. package/dist/util/simpleSearch.d.ts +2 -2
  171. package/dist/util/simpleSearch.js +4 -1
  172. package/dist/util/simpleSearch.js.map +1 -1
  173. package/dist/util/simpleSearch.mjs +4 -1
  174. package/dist/util/simpleSearch.mjs.map +1 -1
  175. package/package.json +1 -2
package/dist/index.mjs CHANGED
@@ -2887,22 +2887,44 @@ import clsx3 from "clsx";
2887
2887
 
2888
2888
  // src/components/layout-and-navigation/Tile.tsx
2889
2889
  import clsx from "clsx";
2890
+ import { Check } from "lucide-react";
2890
2891
  import { jsx, jsxs } from "react/jsx-runtime";
2891
2892
  var Tile = ({
2892
2893
  title,
2893
2894
  description,
2895
+ onClick,
2896
+ isSelected = false,
2897
+ isDisabled = false,
2894
2898
  prefix,
2895
2899
  suffix,
2900
+ normalClassName = "hover:bg-primary/40 cursor-pointer",
2901
+ selectedClassName = " bg-primary/20",
2902
+ disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
2896
2903
  className
2897
2904
  }) => {
2898
- return /* @__PURE__ */ jsxs("div", { className: clsx("row gap-x-4 w-full items-center", className), children: [
2899
- prefix,
2900
- /* @__PURE__ */ jsxs("div", { className: "col gap-y-0 w-full", children: [
2901
- /* @__PURE__ */ jsx("h4", { className: clsx(title.className ?? "textstyle-title-normal"), children: title.value }),
2902
- !!description && /* @__PURE__ */ jsx("span", { className: clsx(description.className ?? "textstyle-description"), children: description.value })
2903
- ] }),
2904
- suffix
2905
- ] });
2905
+ return /* @__PURE__ */ jsxs(
2906
+ "div",
2907
+ {
2908
+ className: clsx(
2909
+ "row gap-x-2 w-full items-center",
2910
+ {
2911
+ [normalClassName]: !!onClick && !isDisabled,
2912
+ [selectedClassName]: isSelected && !isDisabled,
2913
+ [disabledClassName]: isDisabled
2914
+ },
2915
+ className
2916
+ ),
2917
+ onClick: isDisabled ? void 0 : onClick,
2918
+ children: [
2919
+ prefix ?? (isSelected ? /* @__PURE__ */ jsx(Check, { size: 24 }) : void 0),
2920
+ /* @__PURE__ */ jsxs("div", { className: "col gap-y-0 w-full", children: [
2921
+ /* @__PURE__ */ jsx("h4", { className: clsx(title.className ?? "textstyle-title-normal"), children: title.value }),
2922
+ !!description && /* @__PURE__ */ jsx("span", { className: clsx(description.className ?? "textstyle-description"), children: description.value })
2923
+ ] }),
2924
+ suffix
2925
+ ]
2926
+ }
2927
+ );
2906
2928
  };
2907
2929
 
2908
2930
  // src/components/icons-and-geometry/Helpwave.tsx
@@ -3627,8 +3649,9 @@ var Expandable = forwardRef(function Expandable2({
3627
3649
  onChange = noop,
3628
3650
  clickOnlyOnHeader = true,
3629
3651
  disabled = false,
3630
- className = "",
3631
- headerClassName = ""
3652
+ className,
3653
+ headerClassName,
3654
+ contentClassName
3632
3655
  }, ref) {
3633
3656
  icon ??= DefaultIcon;
3634
3657
  return /* @__PURE__ */ jsxs4(
@@ -3657,7 +3680,7 @@ var Expandable = forwardRef(function Expandable2({
3657
3680
  ]
3658
3681
  }
3659
3682
  ),
3660
- isExpanded && /* @__PURE__ */ jsx6("div", { className: "col px-4 pb-2", children })
3683
+ isExpanded && /* @__PURE__ */ jsx6("div", { className: clsx5("col px-4 pb-2", contentClassName), children })
3661
3684
  ]
3662
3685
  }
3663
3686
  );
@@ -3722,7 +3745,8 @@ var YearMonthPicker = ({
3722
3745
  ref: (displayedYearMonth.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()) === year ? ref : void 0,
3723
3746
  label: /* @__PURE__ */ jsx7("span", { className: clsx6({ "text-primary font-bold": selectedYear }), children: year }),
3724
3747
  isExpanded: showValueOpen && selectedYear,
3725
- children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx7("div", { className: "row", children: monthList.map((month) => {
3748
+ contentClassName: "gap-y-1",
3749
+ children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx7("div", { className: "row gap-x-1", children: monthList.map((month) => {
3726
3750
  const monthIndex = monthsList.indexOf(month);
3727
3751
  const newDate = new Date(year, monthIndex);
3728
3752
  const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
@@ -3732,17 +3756,12 @@ var YearMonthPicker = ({
3732
3756
  const isBeforeEnd = end === void 0 || firstOfMonth <= end;
3733
3757
  const isValid = isAfterStart && isBeforeEnd;
3734
3758
  return /* @__PURE__ */ jsx7(
3735
- "button",
3759
+ SolidButton,
3736
3760
  {
3737
3761
  disabled: !isValid,
3738
- className: clsx6(
3739
- "chip hover:brightness-95 flex-1",
3740
- {
3741
- "bg-gray-50 text-black": !selectedMonth && isValid,
3742
- "bg-primary text-on-primary": selectedMonth && isValid,
3743
- "bg-disabled-background text-disabled-text": !isValid
3744
- }
3745
- ),
3762
+ color: selectedMonth && isValid ? "primary" : "neutral",
3763
+ className: "flex-1",
3764
+ size: "small",
3746
3765
  onClick: () => {
3747
3766
  onChange(newDate);
3748
3767
  },
@@ -3757,11 +3776,11 @@ var YearMonthPicker = ({
3757
3776
  }) }) }) });
3758
3777
  };
3759
3778
  var YearMonthPickerUncontrolled = ({
3760
- displayedYearMonth = /* @__PURE__ */ new Date(),
3779
+ displayedYearMonth,
3761
3780
  onChange = noop,
3762
3781
  ...props
3763
3782
  }) => {
3764
- const [yearMonth, setYearMonth] = useState4(displayedYearMonth);
3783
+ const [yearMonth, setYearMonth] = useState4(displayedYearMonth ?? /* @__PURE__ */ new Date());
3765
3784
  useEffect4(() => setYearMonth(displayedYearMonth), [displayedYearMonth]);
3766
3785
  return /* @__PURE__ */ jsx7(
3767
3786
  YearMonthPicker,
@@ -3805,14 +3824,15 @@ var DayPicker = ({
3805
3824
  {
3806
3825
  disabled: !isDayValid,
3807
3826
  className: clsx7(
3808
- "flex-1 rounded-full border-2 border-transparent shadow-sm",
3827
+ "flex-1 rounded-full border-2",
3809
3828
  {
3810
- "text-gray-700 bg-gray-100": !isSameMonth && isDayValid,
3811
- "text-black bg-white": !isSelected && isSameMonth && isDayValid,
3812
- "text-on-primary bg-primary": isSelected,
3813
- "border-black": isToday && markToday,
3814
- "hover:brightness-90 hover:bg-primary hover:text-on-primary": isDayValid,
3815
- "text-disabled-text bg-disabled-background": !isDayValid
3829
+ "text-description": !isSameMonth && !isSelected && isDayValid,
3830
+ "text-button-solid-neutral-text bg-button-solid-neutral-background": !isSelected && isSameMonth && isDayValid,
3831
+ "text-button-solid-primary-text bg-button-solid-primary-background": isSelected && isDayValid,
3832
+ "hover:brightness-90 hover:bg-button-solid-primary-background hover:text-button-solid-primary-text": isDayValid,
3833
+ "text-disabled-text bg-disabled-background cursor-not-allowed": !isDayValid,
3834
+ "border-secondary": isToday && markToday,
3835
+ "border-transparent": !isToday || !markToday
3816
3836
  }
3817
3837
  ),
3818
3838
  onClick: () => onChange(date),
@@ -3823,15 +3843,26 @@ var DayPicker = ({
3823
3843
  }) }, index))
3824
3844
  ] });
3825
3845
  };
3826
- var DayPickerUncontrolled = ({ displayedMonth, onChange = noop, ...restProps }) => {
3827
- const [date, setDate] = useState5(displayedMonth);
3828
- useEffect5(() => setDate(displayedMonth), [displayedMonth]);
3846
+ var DayPickerUncontrolled = ({
3847
+ displayedMonth,
3848
+ selected,
3849
+ onChange = noop,
3850
+ ...restProps
3851
+ }) => {
3852
+ const [date, setDate] = useState5(selected);
3853
+ const [usedDisplayedMonth, setUsedDDisplayedMonth] = useState5(displayedMonth);
3854
+ useEffect5(() => {
3855
+ setDate(selected);
3856
+ setUsedDDisplayedMonth(selected);
3857
+ }, [selected]);
3829
3858
  return /* @__PURE__ */ jsx8(
3830
3859
  DayPicker,
3831
3860
  {
3832
- displayedMonth: date,
3861
+ displayedMonth: usedDisplayedMonth,
3862
+ selected: date,
3833
3863
  onChange: (newDate) => {
3834
3864
  setDate(newDate);
3865
+ setUsedDDisplayedMonth(newDate);
3835
3866
  onChange(newDate);
3836
3867
  },
3837
3868
  ...restProps
@@ -4287,7 +4318,7 @@ var Tooltip = ({
4287
4318
  {
4288
4319
  className: clsx10(
4289
4320
  `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
4290
- animate-tooltip-fade-in shadow-lg bg-tooltip-background`,
4321
+ animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
4291
4322
  positionClasses[position],
4292
4323
  tooltipClassName
4293
4324
  ),
@@ -4298,7 +4329,7 @@ var Tooltip = ({
4298
4329
  "div",
4299
4330
  {
4300
4331
  className: clsx10(`absolute w-0 h-0`, triangleClasses[position]),
4301
- style: { ...triangleStyle[position], zIndex }
4332
+ style: { ...triangleStyle[position], zIndex: zIndex + 1 }
4302
4333
  }
4303
4334
  )
4304
4335
  ]
@@ -4598,10 +4629,10 @@ var Avatar = ({ avatarUrl, alt, size = "medium", className = "" }) => {
4598
4629
  };
4599
4630
  return (
4600
4631
  // TODO transparent or white background later
4601
- /* @__PURE__ */ jsx15("div", { className: clsx13(`rounded-full bg-primary`, className), style, children: /* @__PURE__ */ jsx15(
4632
+ /* @__PURE__ */ jsx15("div", { className: clsx13(`rounded-full bg-primary shadow`, className), style, children: /* @__PURE__ */ jsx15(
4602
4633
  "img",
4603
4634
  {
4604
- className: "rounded-full border border-gray-200",
4635
+ className: "rounded-full",
4605
4636
  style,
4606
4637
  src: avatarUrl,
4607
4638
  alt,
@@ -5091,7 +5122,7 @@ var Carousel = ({
5091
5122
  arrows = false,
5092
5123
  dots = true,
5093
5124
  overScrollThreshold = 0.1,
5094
- blurColor = "from-white",
5125
+ blurColor = "from-background",
5095
5126
  className = "",
5096
5127
  heightClassName = "h-[24rem]",
5097
5128
  widthClassName = "w-[70%] desktop:w-1/2"
@@ -5323,19 +5354,23 @@ var Carousel = ({
5323
5354
  /* @__PURE__ */ jsxs14("div", { className: clsx17(`relative w-full overflow-hidden`, heightClassName, className), children: [
5324
5355
  arrows && /* @__PURE__ */ jsxs14(Fragment, { children: [
5325
5356
  /* @__PURE__ */ jsx20(
5326
- "div",
5357
+ IconButton,
5327
5358
  {
5328
- className: clsx17("absolute z-10 left-0 top-1/2 -translate-y-1/2 bg-gray-200 hover:bg-gray-300 rounded-lg cursor-pointer border-black border-2", { hidden: !canGoLeft() }),
5359
+ color: "neutral",
5360
+ className: clsx17("absolute z-10 left-0 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
5361
+ disabled: !canGoLeft(),
5329
5362
  onClick: () => left(),
5330
- children: /* @__PURE__ */ jsx20(ChevronLeft, { size: 32 })
5363
+ children: /* @__PURE__ */ jsx20(ChevronLeft, { size: 24 })
5331
5364
  }
5332
5365
  ),
5333
5366
  /* @__PURE__ */ jsx20(
5334
- "div",
5367
+ IconButton,
5335
5368
  {
5336
- className: clsx17("absolute z-10 right-0 top-1/2 -translate-y-1/2 bg-gray-200 hover:bg-gray-300 rounded-lg cursor-pointer border-black border-2", { hidden: !canGoRight() }),
5369
+ color: "neutral",
5370
+ className: clsx17("absolute z-10 right-0 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
5371
+ disabled: !canGoRight(),
5337
5372
  onClick: () => right(),
5338
- children: /* @__PURE__ */ jsx20(ChevronRight, { size: 32 })
5373
+ children: /* @__PURE__ */ jsx20(ChevronRight, { size: 24 })
5339
5374
  }
5340
5375
  )
5341
5376
  ] }),
@@ -5375,9 +5410,9 @@ var Carousel = ({
5375
5410
  children: range(0, length - 1).map((index) => /* @__PURE__ */ jsx20(
5376
5411
  "button",
5377
5412
  {
5378
- className: clsx17("w-[2rem] min-w-[2rem] h-[0.75rem] min-h-[0.75rem] hover:bg-primary hover:brightness-90 first:rounded-l-md last:rounded-r-md", {
5379
- "bg-gray-200": currentIndex !== index,
5380
- "bg-primary": currentIndex === index
5413
+ className: clsx17("w-[2rem] min-w-[2rem] h-[0.75rem] min-h-[0.75rem] first:rounded-l-md last:rounded-r-md", {
5414
+ "bg-carousel-dot-disabled hover:bg-carousel-dot-active": currentIndex !== index,
5415
+ "bg-carousel-dot-active hover:brightness-90": currentIndex === index
5381
5416
  }),
5382
5417
  onClick: () => startAnimation(index)
5383
5418
  },
@@ -5575,7 +5610,7 @@ var inserterIdentifierMapping = [
5575
5610
  { id: "helpwave", name: "helpwave" },
5576
5611
  { id: "newline", name: "newline" }
5577
5612
  ];
5578
- var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
5613
+ var parseMarkdown = (text, commandStart = "\\", open2 = "{", close = "}") => {
5579
5614
  let start = text.indexOf(commandStart);
5580
5615
  const children = [];
5581
5616
  while (text !== "") {
@@ -5596,7 +5631,7 @@ var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
5596
5631
  text = "";
5597
5632
  continue;
5598
5633
  }
5599
- const simpleReplace = [commandStart, open, close];
5634
+ const simpleReplace = [commandStart, open2, close];
5600
5635
  if (simpleReplace.some((value) => text[1] === value)) {
5601
5636
  children.push({
5602
5637
  type: "text",
@@ -5617,7 +5652,7 @@ var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
5617
5652
  }
5618
5653
  const modifier = modifierIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
5619
5654
  if (modifier) {
5620
- if (text[modifier.id.length + 1] !== open) {
5655
+ if (text[modifier.id.length + 1] !== open2) {
5621
5656
  children.push({
5622
5657
  type: "text",
5623
5658
  text: text.substring(0, modifier.id.length + 1)
@@ -5631,7 +5666,7 @@ var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
5631
5666
  let counter = 1;
5632
5667
  let escaping = false;
5633
5668
  while (index < text.length) {
5634
- if (text[index] === open && !escaping) {
5669
+ if (text[index] === open2 && !escaping) {
5635
5670
  counter++;
5636
5671
  }
5637
5672
  if (text[index] === close && !escaping) {
@@ -5770,30 +5805,9 @@ var Pagination = ({
5770
5805
  };
5771
5806
 
5772
5807
  // src/components/layout-and-navigation/SearchableList.tsx
5773
- import { useEffect as useEffect14, useMemo as useMemo2, useState as useState14 } from "react";
5774
5808
  import { Search } from "lucide-react";
5775
5809
  import clsx24 from "clsx";
5776
5810
 
5777
- // src/util/simpleSearch.ts
5778
- var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
5779
- return objects.filter((object) => {
5780
- const mappedSearchKeywords = mapping(object).map((value) => value ? value.toLowerCase().trim() : void 0);
5781
- return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
5782
- });
5783
- };
5784
- var MultiSearchWithMapping = (search, objects, mapping) => {
5785
- return objects.filter((object) => {
5786
- const mappedSearchKeywords = mapping(object).map((value) => value.toLowerCase().trim());
5787
- return !!mappedSearchKeywords.find((value) => value.includes(search.toLowerCase().trim()));
5788
- });
5789
- };
5790
- var SimpleSearchWithMapping = (search, objects, mapping) => {
5791
- return MultiSearchWithMapping(search, objects, (value) => [mapping(value)]);
5792
- };
5793
- var SimpleSearch = (search, objects) => {
5794
- return SimpleSearchWithMapping(search, objects, (value) => value);
5795
- };
5796
-
5797
5811
  // src/components/user-action/Input.tsx
5798
5812
  import { forwardRef as forwardRef2, useEffect as useEffect13, useRef as useRef5, useState as useState13 } from "react";
5799
5813
  import clsx23 from "clsx";
@@ -5972,6 +5986,57 @@ var FormInput = forwardRef2(function FormInput2({
5972
5986
  ] });
5973
5987
  });
5974
5988
 
5989
+ // src/hooks/useSearch.ts
5990
+ import { useEffect as useEffect14, useMemo as useMemo2, useState as useState14 } from "react";
5991
+
5992
+ // src/util/simpleSearch.ts
5993
+ var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
5994
+ return objects.filter((object) => {
5995
+ const mappedSearchKeywords = mapping(object).map((value) => value ? value.toLowerCase().trim() : void 0);
5996
+ return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
5997
+ });
5998
+ };
5999
+ var MultiSearchWithMapping = (search, objects, mapping) => {
6000
+ return objects.filter((object) => {
6001
+ const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
6002
+ if (!mappedSearchKeywords) {
6003
+ return true;
6004
+ }
6005
+ return !!mappedSearchKeywords.find((value) => value.includes(search.toLowerCase().trim()));
6006
+ });
6007
+ };
6008
+ var SimpleSearchWithMapping = (search, objects, mapping) => {
6009
+ return MultiSearchWithMapping(search, objects, (value) => [mapping(value)]);
6010
+ };
6011
+ var SimpleSearch = (search, objects) => {
6012
+ return SimpleSearchWithMapping(search, objects, (value) => value);
6013
+ };
6014
+
6015
+ // src/hooks/useSearch.ts
6016
+ var useSearch = ({
6017
+ list,
6018
+ initialSearch,
6019
+ searchMapping
6020
+ }) => {
6021
+ const [items, setItems] = useState14(list);
6022
+ const [search, setSearch] = useState14(initialSearch);
6023
+ useEffect14(() => {
6024
+ setItems(list);
6025
+ }, [list]);
6026
+ const result = useMemo2(
6027
+ () => MultiSearchWithMapping(search, items, searchMapping),
6028
+ [search, items, searchMapping]
6029
+ );
6030
+ return {
6031
+ result,
6032
+ hasResult: result.length > 0,
6033
+ allItems: items,
6034
+ setItems,
6035
+ search,
6036
+ setSearch
6037
+ };
6038
+ };
6039
+
5975
6040
  // src/components/layout-and-navigation/SearchableList.tsx
5976
6041
  import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
5977
6042
  var defaultSearchableListTranslation = {
@@ -5989,38 +6054,47 @@ var SearchableList = ({
5989
6054
  list,
5990
6055
  initialSearch = "",
5991
6056
  searchMapping,
6057
+ autoFocus,
6058
+ minimumItemsForSearch = 6,
5992
6059
  itemMapper,
5993
- className
6060
+ className,
6061
+ resultListClassName
5994
6062
  }) => {
5995
6063
  const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
5996
- const [search, setSearch] = useState14(initialSearch);
5997
- useEffect14(() => setSearch(initialSearch), [initialSearch]);
5998
- const filteredEntries = useMemo2(() => MultiSearchWithMapping(search, list, searchMapping), [search, list, searchMapping]);
6064
+ const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
5999
6065
  return /* @__PURE__ */ jsxs18("div", { className: clsx24("col gap-y-2", className), children: [
6000
- /* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-2 items-center", children: [
6001
- /* @__PURE__ */ jsx28("div", { className: "flex-1", children: /* @__PURE__ */ jsx28(Input, { value: search, onChangeText: setSearch, placeholder: translation.search }) }),
6002
- /* @__PURE__ */ jsx28(Search, { size: 20 })
6066
+ list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-4 items-center", children: [
6067
+ /* @__PURE__ */ jsx28(
6068
+ Input,
6069
+ {
6070
+ value: search,
6071
+ onChangeText: setSearch,
6072
+ placeholder: translation.search,
6073
+ autoFocus,
6074
+ className: "w-full"
6075
+ }
6076
+ ),
6077
+ /* @__PURE__ */ jsx28(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx28(Search, { className: "w-full h-full" }) })
6003
6078
  ] }),
6004
- filteredEntries.length > 0 && /* @__PURE__ */ jsx28("div", { className: "col gap-y-1", children: filteredEntries.map(itemMapper) }),
6005
- !filteredEntries.length && /* @__PURE__ */ jsx28("div", { className: "row justify-center", children: translation.nothingFound })
6079
+ 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 })
6006
6080
  ] });
6007
6081
  };
6008
6082
 
6009
6083
  // src/components/layout-and-navigation/StepperBar.tsx
6010
- import { Check, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
6084
+ import { Check as Check2, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
6011
6085
  import clsx25 from "clsx";
6012
6086
  import { useEffect as useEffect15, useState as useState15 } from "react";
6013
6087
  import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
6014
6088
  var defaultStepperBarTranslation = {
6015
6089
  en: {
6016
6090
  back: "Back",
6017
- next: "Next Step",
6091
+ next: "Next",
6018
6092
  confirm: "Create"
6019
6093
  },
6020
6094
  de: {
6021
6095
  back: "Zur\xFCck",
6022
- next: "N\xE4chster Schritt",
6023
- confirm: "Erstellen"
6096
+ next: "N\xE4chster",
6097
+ confirm: "Fertig"
6024
6098
  }
6025
6099
  };
6026
6100
  var defaultState = {
@@ -6073,9 +6147,9 @@ var StepperBar = ({
6073
6147
  className: clsx25(
6074
6148
  "rounded-full w-4 h-4",
6075
6149
  {
6076
- "bg-primary hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
6077
- "bg-primary/40 hover:bg-primary": index !== currentStep && seen && !disabledSteps.has(currentStep),
6078
- "bg-gray-200 outline-transparent": !seen || disabledSteps.has(currentStep)
6150
+ "bg-stepperbar-dot-active hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
6151
+ "bg-stepperbar-dot-normal hover:bg-stepperbar-dot-active": index !== currentStep && seen && !disabledSteps.has(currentStep),
6152
+ "bg-stepperbar-dot-disabled": !seen || disabledSteps.has(currentStep)
6079
6153
  },
6080
6154
  {
6081
6155
  "cursor-pointer": seen,
@@ -6105,7 +6179,7 @@ var StepperBar = ({
6105
6179
  onClick: onFinish,
6106
6180
  className: "row gap-x-1 items-center justify-center",
6107
6181
  children: [
6108
- /* @__PURE__ */ jsx29(Check, { size: 14 }),
6182
+ /* @__PURE__ */ jsx29(Check2, { size: 14 }),
6109
6183
  finishText ?? translation.confirm
6110
6184
  ]
6111
6185
  }
@@ -6139,7 +6213,7 @@ import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
6139
6213
  // src/components/user-action/Checkbox.tsx
6140
6214
  import { useState as useState16 } from "react";
6141
6215
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
6142
- import { Check as Check2, Minus } from "lucide-react";
6216
+ import { Check as Check3, Minus } from "lucide-react";
6143
6217
  import clsx26 from "clsx";
6144
6218
  import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
6145
6219
  var checkboxSizeMapping = {
@@ -6192,7 +6266,7 @@ var Checkbox = ({
6192
6266
  "hover:border-primary focus:hover:border-primary": !checked
6193
6267
  }, className),
6194
6268
  children: /* @__PURE__ */ jsxs20(CheckboxPrimitive.Indicator, { children: [
6195
- checked === true && /* @__PURE__ */ jsx30(Check2, { className: innerIconSize }),
6269
+ checked === true && /* @__PURE__ */ jsx30(Check3, { className: innerIconSize }),
6196
6270
  checked === "indeterminate" && /* @__PURE__ */ jsx30(Minus, { className: innerIconSize })
6197
6271
  ] })
6198
6272
  }
@@ -6385,7 +6459,7 @@ var Table = ({
6385
6459
  } else {
6386
6460
  currentPage = 0;
6387
6461
  }
6388
- const headerRow = "border-b-2 border-gray-300";
6462
+ const headerRow = "border-b-2";
6389
6463
  const headerPaddingHead = "pb-2";
6390
6464
  const headerPaddingBody = "pt-2";
6391
6465
  const cellPadding = "py-1 px-2";
@@ -6703,7 +6777,7 @@ var ProgressIndicator = ({
6703
6777
  r: radius,
6704
6778
  fill: "transparent",
6705
6779
  strokeWidth,
6706
- className: "stroke-primary"
6780
+ className: "stroke-progress-indicator-fill"
6707
6781
  }
6708
6782
  ),
6709
6783
  /* @__PURE__ */ jsx38(
@@ -6716,7 +6790,7 @@ var ProgressIndicator = ({
6716
6790
  strokeWidth,
6717
6791
  strokeDasharray: arcLength,
6718
6792
  strokeDashoffset: arcOffset,
6719
- className: "stroke-gray-300"
6793
+ className: "stroke-progress-indicator-background"
6720
6794
  }
6721
6795
  )
6722
6796
  ]
@@ -6856,99 +6930,107 @@ var InputModal = ({
6856
6930
  };
6857
6931
 
6858
6932
  // src/components/user-action/Select.tsx
6859
- import { Menu } from "@headlessui/react";
6860
- import { ChevronDown as ChevronDown5, ChevronUp as ChevronUp4, Search as Search2 } from "lucide-react";
6861
- import { useEffect as useEffect17, useState as useState19 } from "react";
6933
+ import { ChevronDown as ChevronDown5, ChevronUp as ChevronUp4 } from "lucide-react";
6934
+ import { useEffect as useEffect18, useRef as useRef7, useState as useState19 } from "react";
6862
6935
  import clsx33 from "clsx";
6863
- import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
6936
+
6937
+ // src/hooks/useOutsideClick.ts
6938
+ import { useEffect as useEffect17 } from "react";
6939
+ var useOutsideClick = (refs, handler) => {
6940
+ useEffect17(() => {
6941
+ const listener = (event) => {
6942
+ if (event.target === null) return;
6943
+ if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
6944
+ return;
6945
+ }
6946
+ handler();
6947
+ };
6948
+ document.addEventListener("mousedown", listener);
6949
+ document.addEventListener("touchstart", listener);
6950
+ return () => {
6951
+ document.removeEventListener("mousedown", listener);
6952
+ document.removeEventListener("touchstart", listener);
6953
+ };
6954
+ }, [refs, handler]);
6955
+ };
6956
+
6957
+ // src/components/user-action/Select.tsx
6958
+ import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
6864
6959
  var Select = ({
6865
6960
  value,
6866
6961
  label,
6867
6962
  options,
6868
6963
  onChange,
6869
- isHidingCurrentValue = true,
6870
6964
  hintText = "",
6871
- showDisabledOptions = true,
6872
6965
  isDisabled,
6966
+ isSearchEnabled = false,
6873
6967
  className,
6874
- textColor = "text-menu-text",
6875
- additionalItems,
6876
6968
  selectedDisplayOverwrite
6877
6969
  }) => {
6878
- let filteredOptions = isHidingCurrentValue ? options.filter((option) => option.value !== value) : options;
6879
- if (!showDisabledOptions) {
6880
- filteredOptions = filteredOptions.filter((value2) => !value2.disabled);
6881
- }
6970
+ const triggerRef = useRef7(null);
6971
+ const menuRef = useRef7(null);
6972
+ const [isOpen, setIsOpen] = useState19(false);
6973
+ useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
6882
6974
  const selectedOption = options.find((option) => option.value === value);
6883
6975
  if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
6884
6976
  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");
6885
6977
  }
6886
- const borderColor = "border-menu-border";
6978
+ const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
6887
6979
  return /* @__PURE__ */ jsxs29("div", { className: clsx33(className), children: [
6888
6980
  label && /* @__PURE__ */ jsx42(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx33("mb-1", label.className) }),
6889
- /* @__PURE__ */ jsx42(Menu, { as: "div", className: "relative text-menu-text", children: ({ open }) => /* @__PURE__ */ jsxs29(Fragment3, { children: [
6981
+ /* @__PURE__ */ jsxs29("div", { className: "relative", children: [
6890
6982
  /* @__PURE__ */ jsxs29(
6891
- Menu.Button,
6983
+ "button",
6892
6984
  {
6985
+ ref: triggerRef,
6893
6986
  className: clsx33(
6894
- "inline-flex w-full justify-between items-center rounded-t-lg border-2 px-4 py-2 font-medium bg-menu-background text-menu-text",
6895
- textColor,
6896
- borderColor,
6987
+ "btn-md justify-between w-full border-2",
6897
6988
  {
6898
6989
  "rounded-b-lg": !open,
6899
- "hover:border-primary": !isDisabled,
6900
- "bg-disabled-background cursor-not-allowed text-disabled": isDisabled
6990
+ "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
6991
+ "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
6901
6992
  }
6902
6993
  ),
6994
+ onClick: () => setIsOpen(!isOpen),
6903
6995
  disabled: isDisabled,
6904
6996
  children: [
6905
- /* @__PURE__ */ jsx42("span", { children: selectedDisplayOverwrite ?? selectedOption?.label ?? hintText }),
6906
- open ? /* @__PURE__ */ jsx42(ChevronUp4, {}) : /* @__PURE__ */ jsx42(ChevronDown5, {})
6997
+ !isShowingHint && /* @__PURE__ */ jsx42("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? selectedOption?.label }),
6998
+ isShowingHint && /* @__PURE__ */ jsx42("span", { className: "textstyle-description", children: hintText }),
6999
+ isOpen ? /* @__PURE__ */ jsx42(ChevronUp4, {}) : /* @__PURE__ */ jsx42(ChevronDown5, {})
6907
7000
  ]
6908
7001
  }
6909
7002
  ),
6910
- /* @__PURE__ */ jsxs29(
6911
- Menu.Items,
7003
+ isOpen && /* @__PURE__ */ jsx42(
7004
+ "div",
6912
7005
  {
6913
- className: "absolute w-full z-10 rounded-b-lg bg-menu-background text-menu-text shadow-lg max-h-[500px] overflow-y-auto",
6914
- children: [
6915
- (additionalItems ?? []).map((item, index) => /* @__PURE__ */ jsx42(
6916
- "div",
6917
- {
6918
- className: clsx33(borderColor, "px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0", {
6919
- "border-b-0 rounded-b-lg": filteredOptions.length === 0 && index === (additionalItems?.length ?? 1) - 1
6920
- }),
6921
- children: item
6922
- },
6923
- `additionalItems${index}`
6924
- )),
6925
- filteredOptions.map((option, index) => /* @__PURE__ */ jsx42(Menu.Item, { children: /* @__PURE__ */ jsx42(
6926
- "div",
6927
- {
6928
- className: clsx33(
6929
- "px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0 cursor-pointer",
6930
- option.className,
6931
- borderColor,
6932
- {
6933
- "brightness-90": option.value === value,
6934
- "brightness-95": index % 2 === 1,
6935
- "text-disabled bg-disabled-background cursor-not-allowed": !!option.disabled,
6936
- "bg-menu-background text-menu-text hover:brightness-90 cursor-pointer": !option.disabled,
6937
- "rounded-b-lg": index === filteredOptions.length - 1
6938
- }
6939
- ),
6940
- onClick: () => {
6941
- if (!option.disabled) {
7006
+ ref: menuRef,
7007
+ className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-md max-h-[500px] overflow-y-auto p-2",
7008
+ children: /* @__PURE__ */ jsx42(
7009
+ SearchableList,
7010
+ {
7011
+ list: options,
7012
+ minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
7013
+ searchMapping: (item) => item.searchTags,
7014
+ itemMapper: (option, index) => /* @__PURE__ */ jsx42(
7015
+ Tile,
7016
+ {
7017
+ isSelected: selectedOption?.value === option.value,
7018
+ className: "px-2 py-1 rounded-md",
7019
+ disabledClassName: "text-disabled-text cursor-not-allowed",
7020
+ title: { value: option.label, className: "font-semibold" },
7021
+ onClick: () => {
6942
7022
  onChange(option.value);
6943
- }
7023
+ setIsOpen(false);
7024
+ },
7025
+ isDisabled: option.disabled
6944
7026
  },
6945
- children: option.label
6946
- }
6947
- ) }, `item${index}`))
6948
- ]
7027
+ index
7028
+ )
7029
+ }
7030
+ )
6949
7031
  }
6950
7032
  )
6951
- ] }) })
7033
+ ] })
6952
7034
  ] });
6953
7035
  };
6954
7036
  var SelectUncontrolled = ({
@@ -6959,7 +7041,7 @@ var SelectUncontrolled = ({
6959
7041
  ...props
6960
7042
  }) => {
6961
7043
  const [selected, setSelected] = useState19(value);
6962
- useEffect17(() => {
7044
+ useEffect18(() => {
6963
7045
  if (options.find((options2) => options2.value === value)) {
6964
7046
  setSelected(value);
6965
7047
  }
@@ -6978,27 +7060,6 @@ var SelectUncontrolled = ({
6978
7060
  }
6979
7061
  );
6980
7062
  };
6981
- var SearchableSelect = ({
6982
- value,
6983
- options,
6984
- searchMapping,
6985
- ...selectProps
6986
- }) => {
6987
- const [search, setSearch] = useState19("");
6988
- const filteredOptions = MultiSearchWithMapping(search, options, searchMapping);
6989
- return /* @__PURE__ */ jsx42(
6990
- Select,
6991
- {
6992
- value,
6993
- options: filteredOptions,
6994
- additionalItems: [/* @__PURE__ */ jsxs29("div", { className: "row gap-x-2 items-center", children: [
6995
- /* @__PURE__ */ jsx42(Input, { autoFocus: true, value: search, onChangeText: setSearch, className: "w-full" }),
6996
- /* @__PURE__ */ jsx42(Search2, { className: "min-w-[1.5rem] min-h-[1.5rem]" })
6997
- ] }, "selectSearch")],
6998
- ...selectProps
6999
- }
7000
- );
7001
- };
7002
7063
 
7003
7064
  // src/components/modals/LanguageModal.tsx
7004
7065
  import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
@@ -7051,7 +7112,7 @@ var LanguageModal = ({
7051
7112
  };
7052
7113
 
7053
7114
  // src/theming/useTheme.tsx
7054
- import { createContext as createContext2, useContext as useContext2, useEffect as useEffect18, useState as useState20 } from "react";
7115
+ import { createContext as createContext2, useContext as useContext2, useEffect as useEffect19, useState as useState20 } from "react";
7055
7116
  import { jsx as jsx44 } from "react/jsx-runtime";
7056
7117
  var themes = ["light", "dark"];
7057
7118
  var defaultThemeTypeTranslation = {
@@ -7074,13 +7135,13 @@ var ThemeContext = createContext2({
7074
7135
  });
7075
7136
  var ThemeProvider = ({ children, initialTheme = "light" }) => {
7076
7137
  const [theme, setTheme] = useState20(initialTheme);
7077
- useEffect18(() => {
7138
+ useEffect19(() => {
7078
7139
  if (theme !== initialTheme) {
7079
7140
  console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
7080
7141
  setTheme(initialTheme);
7081
7142
  }
7082
7143
  }, [initialTheme]);
7083
- useEffect18(() => {
7144
+ useEffect19(() => {
7084
7145
  document.documentElement.setAttribute("data-theme", theme);
7085
7146
  }, [theme]);
7086
7147
  return /* @__PURE__ */ jsx44(ThemeContext.Provider, { value: { theme, setTheme }, children });
@@ -7138,7 +7199,7 @@ var ThemeModal = ({
7138
7199
  };
7139
7200
 
7140
7201
  // src/components/properties/CheckboxProperty.tsx
7141
- import { Check as Check3 } from "lucide-react";
7202
+ import { Check as Check4 } from "lucide-react";
7142
7203
 
7143
7204
  // src/components/properties/PropertyBase.tsx
7144
7205
  import { AlertTriangle } from "lucide-react";
@@ -7182,7 +7243,7 @@ var PropertyBase = ({
7182
7243
  /* @__PURE__ */ jsxs32(
7183
7244
  "div",
7184
7245
  {
7185
- className: clsx34("row grow justify-between items-center rounded-r-xl border-2 border-l-0", {
7246
+ className: clsx34("row gap-x-0 grow justify-between items-center rounded-r-xl border-2 border-l-0", {
7186
7247
  "bg-surface group-hover:border-primary": !requiredAndNoValue,
7187
7248
  "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7188
7249
  }, className),
@@ -7231,7 +7292,7 @@ var CheckboxProperty = ({
7231
7292
  ...baseProps,
7232
7293
  hasValue: true,
7233
7294
  readOnly,
7234
- icon: /* @__PURE__ */ jsx47(Check3, { size: 16 }),
7295
+ icon: /* @__PURE__ */ jsx47(Check4, { size: 16 }),
7235
7296
  input: () => /* @__PURE__ */ jsx47("div", { className: "row py-2 px-4 items-center", children: /* @__PURE__ */ jsx47(
7236
7297
  Checkbox,
7237
7298
  {
@@ -7296,94 +7357,13 @@ var DateProperty = ({
7296
7357
 
7297
7358
  // src/components/properties/MultiSelectProperty.tsx
7298
7359
  import { List } from "lucide-react";
7299
- import clsx38 from "clsx";
7300
-
7301
- // src/components/user-action/MultiSelect.tsx
7302
- import { useState as useState21 } from "react";
7303
- import { Search as Search3 } from "lucide-react";
7304
7360
  import clsx37 from "clsx";
7305
7361
 
7306
- // src/components/user-action/Menu.tsx
7307
- import { useRef as useRef7 } from "react";
7362
+ // src/components/user-action/MultiSelect.tsx
7363
+ import { useEffect as useEffect20, useRef as useRef8, useState as useState21 } from "react";
7364
+ import { ChevronDown as ChevronDown6, ChevronUp as ChevronUp5 } from "lucide-react";
7308
7365
  import clsx36 from "clsx";
7309
-
7310
- // src/hooks/useOutsideClick.ts
7311
- import { useEffect as useEffect19 } from "react";
7312
- var useOutsideClick = (refs, handler) => {
7313
- useEffect19(() => {
7314
- const listener = (event) => {
7315
- if (event.target === null) return;
7316
- if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
7317
- return;
7318
- }
7319
- handler();
7320
- };
7321
- document.addEventListener("mousedown", listener);
7322
- document.addEventListener("touchstart", listener);
7323
- return () => {
7324
- document.removeEventListener("mousedown", listener);
7325
- document.removeEventListener("touchstart", listener);
7326
- };
7327
- }, [refs, handler]);
7328
- };
7329
-
7330
- // src/components/user-action/Menu.tsx
7331
7366
  import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
7332
- var MenuItem = ({
7333
- children,
7334
- onClick,
7335
- alignment = "left",
7336
- className
7337
- }) => /* @__PURE__ */ jsx49(
7338
- "div",
7339
- {
7340
- className: clsx36("block px-3 py-1 bg-menu-background text-menu-text hover:brightness-90", {
7341
- "text-right": alignment === "right",
7342
- "text-left": alignment === "left"
7343
- }, className),
7344
- onClick,
7345
- children
7346
- }
7347
- );
7348
- var Menu2 = ({
7349
- trigger,
7350
- children,
7351
- alignment = "tl",
7352
- showOnHover = false,
7353
- menuClassName = ""
7354
- }) => {
7355
- const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
7356
- const triggerRef = useRef7(null);
7357
- const menuRef = useRef7(null);
7358
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7359
- return /* @__PURE__ */ jsxs33(
7360
- "div",
7361
- {
7362
- className: "relative",
7363
- ...handlers,
7364
- children: [
7365
- trigger(() => setIsOpen(!isOpen), triggerRef),
7366
- isOpen ? /* @__PURE__ */ jsx49(
7367
- "div",
7368
- {
7369
- ref: menuRef,
7370
- onClick: (e) => e.stopPropagation(),
7371
- className: clsx36("absolute top-full mt-1 py-2 w-60 rounded-lg bg-menu-background text-menu-text ring-1 ring-slate-900/5 text-sm leading-6 font-semibold shadow-md z-[1]", {
7372
- " top-[8px]": alignment[0] === "t",
7373
- " bottom-[8px]": alignment[0] === "b",
7374
- " left-[-8px]": alignment[1] === "l",
7375
- " right-[-8px]": alignment[1] === "r"
7376
- }, menuClassName),
7377
- children
7378
- }
7379
- ) : null
7380
- ]
7381
- }
7382
- );
7383
- };
7384
-
7385
- // src/components/user-action/MultiSelect.tsx
7386
- import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
7387
7367
  var defaultMultiSelectTranslation = {
7388
7368
  en: {
7389
7369
  select: "Select",
@@ -7399,110 +7379,149 @@ var defaultMultiSelectTranslation = {
7399
7379
  var MultiSelect = ({
7400
7380
  overwriteTranslation,
7401
7381
  options,
7402
- onChange,
7403
- search,
7404
- disabled = false,
7405
- selectedDisplay,
7406
7382
  label,
7383
+ onChange,
7407
7384
  hintText,
7408
- showDisabledOptions = true,
7409
- className = "",
7410
- triggerClassName = ""
7385
+ isDisabled = false,
7386
+ isSearchEnabled = false,
7387
+ selectedDisplayOverwrite,
7388
+ useChipDisplay = false,
7389
+ className = ""
7411
7390
  }) => {
7412
7391
  const translation = useTranslation(defaultMultiSelectTranslation, overwriteTranslation);
7413
- const [searchText, setSearchText] = useState21(search?.initialSearch ?? "");
7414
- let filteredOptions = options;
7415
- const enableSearch = !!search;
7416
- if (enableSearch && !!searchText) {
7417
- filteredOptions = MultiSearchWithMapping(
7418
- searchText,
7419
- filteredOptions,
7420
- (value) => search.searchMapping(value)
7421
- );
7422
- }
7423
- if (!showDisabledOptions) {
7424
- filteredOptions = filteredOptions.filter((value) => !value.disabled);
7425
- }
7392
+ const triggerRef = useRef8(null);
7393
+ const menuRef = useRef8(null);
7394
+ const [isOpen, setIsOpen] = useState21(false);
7395
+ useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7426
7396
  const selectedItems = options.filter((value) => value.selected);
7427
- const menuButtonText = selectedItems.length === 0 ? hintText ?? translation.select : /* @__PURE__ */ jsx50("span", { children: `${selectedItems.length} ${translation.selected}` });
7428
- const borderColor = "border-menu-border";
7429
- return /* @__PURE__ */ jsxs34("div", { className: clsx37(className), children: [
7430
- label && /* @__PURE__ */ jsx50(
7397
+ const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
7398
+ return /* @__PURE__ */ jsxs33("div", { className: clsx36(className), children: [
7399
+ label && /* @__PURE__ */ jsx49(
7431
7400
  Label,
7432
7401
  {
7433
7402
  ...label,
7434
7403
  htmlFor: label.name,
7435
- className: clsx37(" mb-1", label.className),
7404
+ className: clsx36(" mb-1", label.className),
7436
7405
  labelType: label.labelType ?? "labelBig"
7437
7406
  }
7438
7407
  ),
7439
- /* @__PURE__ */ jsxs34(
7440
- Menu2,
7441
- {
7442
- alignment: "t_",
7443
- trigger: (onClick, ref) => /* @__PURE__ */ jsx50(
7444
- "div",
7445
- {
7446
- ref,
7447
- onClick: disabled ? void 0 : onClick,
7448
- className: clsx37(
7449
- borderColor,
7450
- "bg-menu-background text-menu-text inline-w-full justify-between items-center rounded-lg border-2 px-4 py-2 font-medium",
7451
- {
7452
- "hover:border-primary cursor-pointer": !disabled,
7453
- "bg-disabled-background text-disabled cursor-not-allowed": disabled
7454
- },
7455
- triggerClassName
7456
- ),
7457
- children: selectedDisplay ? selectedDisplay({ items: options, disabled }) : menuButtonText
7458
- }
7459
- ),
7460
- menuClassName: clsx37(
7461
- "!rounded-lg !shadow-lg !max-h-[500px] !min-w-[400px] !max-w-[70vh] !overflow-y-auto !border !border-2",
7462
- borderColor,
7463
- { "!py-0": !enableSearch, "!pb-0": enableSearch }
7464
- ),
7465
- children: [
7466
- enableSearch && /* @__PURE__ */ jsxs34("div", { className: "row gap-x-2 items-center px-2 py-2", children: [
7467
- /* @__PURE__ */ jsx50(Input, { autoFocus: true, className: "w-full", value: searchText, onChangeText: setSearchText }),
7468
- /* @__PURE__ */ jsx50(Search3, {})
7469
- ] }, "selectSearch"),
7470
- filteredOptions.map((option, index) => /* @__PURE__ */ jsx50(
7471
- MenuItem,
7408
+ /* @__PURE__ */ jsxs33("div", { className: "relative", children: [
7409
+ /* @__PURE__ */ jsxs33(
7410
+ "button",
7411
+ {
7412
+ ref: triggerRef,
7413
+ className: clsx36(
7414
+ "btn-md justify-between w-full border-2 h-auto",
7472
7415
  {
7473
- className: clsx37({
7474
- "cursor-not-allowed !bg-disabled-background !text-disabled-text hover:brightness-100": !!option.disabled,
7475
- "cursor-pointer": !option.disabled
7476
- }),
7477
- children: /* @__PURE__ */ jsxs34(
7478
- "div",
7479
- {
7480
- className: clsx37("overflow-hidden whitespace-nowrap text-ellipsis row items-center gap-x-2", option.className),
7481
- onClick: () => {
7482
- if (!option.disabled) {
7416
+ "rounded-b-lg": !open,
7417
+ "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
7418
+ "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
7419
+ }
7420
+ ),
7421
+ onClick: () => setIsOpen(!isOpen),
7422
+ disabled: isDisabled,
7423
+ children: [
7424
+ !isShowingHint && /* @__PURE__ */ jsx49("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? (useChipDisplay && selectedItems ? /* @__PURE__ */ jsx49(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) : `${selectedItems.length} ${translation.selected}`) }),
7425
+ isShowingHint && /* @__PURE__ */ jsx49("span", { className: "textstyle-description", children: hintText ?? translation.select }),
7426
+ isOpen ? /* @__PURE__ */ jsx49(ChevronUp5, { size: 24, className: "min-w-6" }) : /* @__PURE__ */ jsx49(ChevronDown6, { className: "min-w-6" })
7427
+ ]
7428
+ }
7429
+ ),
7430
+ isOpen && /* @__PURE__ */ jsxs33(
7431
+ "div",
7432
+ {
7433
+ ref: menuRef,
7434
+ className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-md max-h-[500px] overflow-y-auto p-2",
7435
+ children: [
7436
+ /* @__PURE__ */ jsx49(
7437
+ SearchableList,
7438
+ {
7439
+ list: options,
7440
+ minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
7441
+ searchMapping: (item) => item.searchTags,
7442
+ itemMapper: (option, index) => /* @__PURE__ */ jsx49(
7443
+ Tile,
7444
+ {
7445
+ isSelected: option.selected,
7446
+ className: "px-2 py-1 rounded-md",
7447
+ disabledClassName: "text-disabled-text cursor-not-allowed",
7448
+ title: { value: option.label, className: "font-semibold" },
7449
+ onClick: () => {
7483
7450
  onChange(options.map((value) => value.value === option.value ? {
7484
7451
  ...option,
7485
7452
  selected: !value.selected
7486
7453
  } : value));
7487
- }
7454
+ },
7455
+ isDisabled: option.disabled
7488
7456
  },
7489
- children: [
7490
- /* @__PURE__ */ jsx50(Checkbox, { checked: option.selected, disabled: option.disabled, size: "small" }),
7491
- option.label
7492
- ]
7493
- }
7494
- )
7495
- },
7496
- `item${index}`
7497
- ))
7498
- ]
7499
- }
7500
- )
7457
+ index
7458
+ )
7459
+ }
7460
+ ),
7461
+ /* @__PURE__ */ jsxs33("div", { className: "row justify-between mt-2", children: [
7462
+ /* @__PURE__ */ jsxs33("div", { className: "row gap-x-2", children: [
7463
+ /* @__PURE__ */ jsx49(
7464
+ SolidButton,
7465
+ {
7466
+ color: "neutral",
7467
+ size: "small",
7468
+ onClick: () => {
7469
+ onChange(options.map((option) => ({
7470
+ ...option,
7471
+ selected: !option.disabled
7472
+ })));
7473
+ },
7474
+ disabled: options.every((value) => value.selected || value.disabled),
7475
+ children: "All"
7476
+ }
7477
+ ),
7478
+ /* @__PURE__ */ jsx49(
7479
+ SolidButton,
7480
+ {
7481
+ color: "neutral",
7482
+ size: "small",
7483
+ onClick: () => {
7484
+ onChange(options.map((option) => ({
7485
+ ...option,
7486
+ selected: false
7487
+ })));
7488
+ },
7489
+ children: "None"
7490
+ }
7491
+ )
7492
+ ] }),
7493
+ /* @__PURE__ */ jsx49(SolidButton, { size: "small", onClick: () => setIsOpen(false), children: "Done" })
7494
+ ] })
7495
+ ]
7496
+ }
7497
+ )
7498
+ ] })
7501
7499
  ] });
7502
7500
  };
7501
+ var MultiSelectUncontrolled = ({
7502
+ options,
7503
+ onChange,
7504
+ ...props
7505
+ }) => {
7506
+ const [usedOptions, setUsedOptions] = useState21(options);
7507
+ useEffect20(() => {
7508
+ setUsedOptions(options);
7509
+ }, [options]);
7510
+ return /* @__PURE__ */ jsx49(
7511
+ MultiSelect,
7512
+ {
7513
+ ...props,
7514
+ options: usedOptions,
7515
+ onChange: (options2) => {
7516
+ setUsedOptions(options2);
7517
+ onChange(options2);
7518
+ }
7519
+ }
7520
+ );
7521
+ };
7503
7522
 
7504
7523
  // src/components/properties/MultiSelectProperty.tsx
7505
- import { jsx as jsx51 } from "react/jsx-runtime";
7524
+ import { jsx as jsx50 } from "react/jsx-runtime";
7506
7525
  var defaultMultiSelectPropertyTranslation = {
7507
7526
  en: {
7508
7527
  select: "Select"
@@ -7522,11 +7541,7 @@ var MultiSelectProperty = ({
7522
7541
  }) => {
7523
7542
  const translation = useTranslation(defaultMultiSelectPropertyTranslation, overwriteTranslation);
7524
7543
  const hasValue = options.some((value) => value.selected);
7525
- let triggerClassName;
7526
- if (softRequired && !hasValue) {
7527
- triggerClassName = "border-warning hover:brightness-90";
7528
- }
7529
- return /* @__PURE__ */ jsx51(
7544
+ return /* @__PURE__ */ jsx50(
7530
7545
  PropertyBase,
7531
7546
  {
7532
7547
  name,
@@ -7534,26 +7549,19 @@ var MultiSelectProperty = ({
7534
7549
  readOnly,
7535
7550
  softRequired,
7536
7551
  hasValue,
7537
- icon: /* @__PURE__ */ jsx51(List, { size: 16 }),
7538
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx51(
7552
+ icon: /* @__PURE__ */ jsx50(List, { size: 16 }),
7553
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx50(
7539
7554
  "div",
7540
7555
  {
7541
- className: clsx38("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7542
- children: /* @__PURE__ */ jsx51(
7556
+ className: clsx37("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7557
+ children: /* @__PURE__ */ jsx50(
7543
7558
  MultiSelect,
7544
7559
  {
7545
7560
  ...multiSelectProps,
7546
- className: clsx38("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7547
- triggerClassName,
7548
- selectedDisplay: ({ items }) => {
7549
- const selected = items.filter((value) => value.selected);
7550
- if (selected.length === 0) {
7551
- return /* @__PURE__ */ jsx51("span", { children: "Select" });
7552
- }
7553
- return /* @__PURE__ */ jsx51(ChipList, { list: selected.map((value) => ({ children: value.label })) });
7554
- },
7561
+ className: clsx37("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7555
7562
  options,
7556
- disabled: readOnly,
7563
+ isDisabled: readOnly,
7564
+ useChipDisplay: true,
7557
7565
  hintText: `${translation.select}...`
7558
7566
  }
7559
7567
  )
@@ -7565,8 +7573,8 @@ var MultiSelectProperty = ({
7565
7573
 
7566
7574
  // src/components/properties/NumberProperty.tsx
7567
7575
  import { Binary } from "lucide-react";
7568
- import clsx39 from "clsx";
7569
- import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
7576
+ import clsx38 from "clsx";
7577
+ import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
7570
7578
  var defaultNumberPropertyTranslation = {
7571
7579
  en: {
7572
7580
  value: "Value"
@@ -7587,23 +7595,23 @@ var NumberProperty = ({
7587
7595
  }) => {
7588
7596
  const translation = useTranslation(defaultNumberPropertyTranslation, overwriteTranslation);
7589
7597
  const hasValue = value !== void 0;
7590
- return /* @__PURE__ */ jsx52(
7598
+ return /* @__PURE__ */ jsx51(
7591
7599
  PropertyBase,
7592
7600
  {
7593
7601
  ...baseProps,
7594
7602
  onRemove,
7595
7603
  hasValue,
7596
- icon: /* @__PURE__ */ jsx52(Binary, { size: 16 }),
7597
- input: ({ softRequired }) => /* @__PURE__ */ jsxs35(
7604
+ icon: /* @__PURE__ */ jsx51(Binary, { size: 16 }),
7605
+ input: ({ softRequired }) => /* @__PURE__ */ jsxs34(
7598
7606
  "div",
7599
7607
  {
7600
- className: clsx39("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7608
+ className: clsx38("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7601
7609
  children: [
7602
- /* @__PURE__ */ jsx52(
7610
+ /* @__PURE__ */ jsx51(
7603
7611
  Input,
7604
7612
  {
7605
7613
  expanded: false,
7606
- 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 }),
7614
+ className: clsx38("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7607
7615
  value: value?.toString() ?? "",
7608
7616
  type: "number",
7609
7617
  readOnly,
@@ -7626,7 +7634,7 @@ var NumberProperty = ({
7626
7634
  }
7627
7635
  }
7628
7636
  ),
7629
- suffix && /* @__PURE__ */ jsx52("span", { className: clsx39("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
7637
+ suffix && /* @__PURE__ */ jsx51("span", { className: clsx38("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
7630
7638
  ]
7631
7639
  }
7632
7640
  )
@@ -7636,8 +7644,8 @@ var NumberProperty = ({
7636
7644
 
7637
7645
  // src/components/properties/SelectProperty.tsx
7638
7646
  import { List as List2 } from "lucide-react";
7639
- import clsx40 from "clsx";
7640
- import { jsx as jsx53 } from "react/jsx-runtime";
7647
+ import clsx39 from "clsx";
7648
+ import { jsx as jsx52 } from "react/jsx-runtime";
7641
7649
  var defaultSingleSelectPropertyTranslation = {
7642
7650
  en: {
7643
7651
  select: "Select"
@@ -7654,11 +7662,11 @@ var SingleSelectProperty = ({
7654
7662
  readOnly = false,
7655
7663
  softRequired,
7656
7664
  onRemove,
7657
- ...multiSelectProps
7665
+ ...selectProps
7658
7666
  }) => {
7659
7667
  const translation = useTranslation(defaultSingleSelectPropertyTranslation, overwriteTranslation);
7660
7668
  const hasValue = value !== void 0;
7661
- return /* @__PURE__ */ jsx53(
7669
+ return /* @__PURE__ */ jsx52(
7662
7670
  PropertyBase,
7663
7671
  {
7664
7672
  name,
@@ -7666,19 +7674,19 @@ var SingleSelectProperty = ({
7666
7674
  readOnly,
7667
7675
  softRequired,
7668
7676
  hasValue,
7669
- icon: /* @__PURE__ */ jsx53(List2, { size: 16 }),
7670
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx53(
7677
+ icon: /* @__PURE__ */ jsx52(List2, { size: 16 }),
7678
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx52(
7671
7679
  "div",
7672
7680
  {
7673
- className: clsx40("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7674
- children: /* @__PURE__ */ jsx53(
7675
- SearchableSelect,
7681
+ className: clsx39("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
7682
+ children: /* @__PURE__ */ jsx52(
7683
+ Select,
7676
7684
  {
7677
- ...multiSelectProps,
7685
+ ...selectProps,
7678
7686
  value,
7679
7687
  options,
7680
7688
  isDisabled: readOnly,
7681
- className: clsx40("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7689
+ className: clsx39("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
7682
7690
  hintText: `${translation.select}...`
7683
7691
  }
7684
7692
  )
@@ -7690,12 +7698,12 @@ var SingleSelectProperty = ({
7690
7698
 
7691
7699
  // src/components/properties/TextProperty.tsx
7692
7700
  import { Text } from "lucide-react";
7693
- import clsx42 from "clsx";
7701
+ import clsx41 from "clsx";
7694
7702
 
7695
7703
  // src/components/user-action/Textarea.tsx
7696
- import { useEffect as useEffect20, useState as useState22 } from "react";
7697
- import clsx41 from "clsx";
7698
- import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
7704
+ import { useEffect as useEffect21, useState as useState22 } from "react";
7705
+ import clsx40 from "clsx";
7706
+ import { jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
7699
7707
  var Textarea = ({
7700
7708
  label,
7701
7709
  headline,
@@ -7716,27 +7724,27 @@ var Textarea = ({
7716
7724
  onEditCompleted(text);
7717
7725
  clearUpdateTimer();
7718
7726
  };
7719
- return /* @__PURE__ */ jsxs36("div", { className: "w-full", children: [
7720
- label && /* @__PURE__ */ jsx54(
7727
+ return /* @__PURE__ */ jsxs35("div", { className: "w-full", children: [
7728
+ label && /* @__PURE__ */ jsx53(
7721
7729
  Label,
7722
7730
  {
7723
7731
  ...label,
7724
7732
  htmlFor: id,
7725
- className: clsx41("mb-1", label.className),
7733
+ className: clsx40("mb-1", label.className),
7726
7734
  labelType: label.labelType ?? "labelSmall"
7727
7735
  }
7728
7736
  ),
7729
- /* @__PURE__ */ jsxs36(
7737
+ /* @__PURE__ */ jsxs35(
7730
7738
  "div",
7731
7739
  {
7732
- className: `${clsx41(" bg-surface text-on-surface focus-within:border-primary relative", { "shadow border-2 hover:border-primary rounded-lg": defaultStyle })}`,
7740
+ className: `${clsx40(" bg-surface text-on-surface focus-within:border-primary relative", { "shadow border-2 hover:border-primary rounded-lg": defaultStyle })}`,
7733
7741
  children: [
7734
- headline && /* @__PURE__ */ jsx54("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
7735
- /* @__PURE__ */ jsx54(
7742
+ headline && /* @__PURE__ */ jsx53("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
7743
+ /* @__PURE__ */ jsx53(
7736
7744
  "textarea",
7737
7745
  {
7738
7746
  id,
7739
- className: clsx41("pt-0 px-3 border-transparent focus:border-transparent focus:ring-0 appearance-none border w-full leading-tight focus:outline-none", {
7747
+ className: clsx40("pt-0 px-3 border-transparent focus:border-transparent focus:ring-0 appearance-none border w-full leading-tight focus:outline-none", {
7740
7748
  "resize-none": !resizable,
7741
7749
  "h-32": defaultStyle,
7742
7750
  "mt-3": !headline
@@ -7763,7 +7771,7 @@ var Textarea = ({
7763
7771
  ]
7764
7772
  }
7765
7773
  ),
7766
- hasFocus && disclaimer && /* @__PURE__ */ jsx54("label", { className: "text-negative", children: disclaimer })
7774
+ hasFocus && disclaimer && /* @__PURE__ */ jsx53("label", { className: "text-negative", children: disclaimer })
7767
7775
  ] });
7768
7776
  };
7769
7777
  var TextareaUncontrolled = ({
@@ -7772,10 +7780,10 @@ var TextareaUncontrolled = ({
7772
7780
  ...props
7773
7781
  }) => {
7774
7782
  const [text, setText] = useState22(value);
7775
- useEffect20(() => {
7783
+ useEffect21(() => {
7776
7784
  setText(value);
7777
7785
  }, [value]);
7778
- return /* @__PURE__ */ jsx54(
7786
+ return /* @__PURE__ */ jsx53(
7779
7787
  Textarea,
7780
7788
  {
7781
7789
  ...props,
@@ -7789,7 +7797,7 @@ var TextareaUncontrolled = ({
7789
7797
  };
7790
7798
 
7791
7799
  // src/components/properties/TextProperty.tsx
7792
- import { jsx as jsx55 } from "react/jsx-runtime";
7800
+ import { jsx as jsx54 } from "react/jsx-runtime";
7793
7801
  var defaultTextPropertyTranslation = {
7794
7802
  en: {
7795
7803
  value: "Text"
@@ -7809,21 +7817,21 @@ var TextProperty = ({
7809
7817
  }) => {
7810
7818
  const translation = useTranslation(defaultTextPropertyTranslation, overwriteTranslation);
7811
7819
  const hasValue = value !== void 0;
7812
- return /* @__PURE__ */ jsx55(
7820
+ return /* @__PURE__ */ jsx54(
7813
7821
  PropertyBase,
7814
7822
  {
7815
7823
  ...baseProps,
7816
7824
  onRemove,
7817
7825
  hasValue,
7818
- icon: /* @__PURE__ */ jsx55(Text, { size: 16 }),
7819
- input: ({ softRequired }) => /* @__PURE__ */ jsx55(
7826
+ icon: /* @__PURE__ */ jsx54(Text, { size: 16 }),
7827
+ input: ({ softRequired }) => /* @__PURE__ */ jsx54(
7820
7828
  "div",
7821
7829
  {
7822
- className: clsx42("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7823
- children: /* @__PURE__ */ jsx55(
7830
+ className: clsx41("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
7831
+ children: /* @__PURE__ */ jsx54(
7824
7832
  Textarea,
7825
7833
  {
7826
- className: clsx42("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7834
+ className: clsx41("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
7827
7835
  rows: 5,
7828
7836
  defaultStyle: false,
7829
7837
  value: value ?? "",
@@ -7852,8 +7860,8 @@ var TextProperty = ({
7852
7860
  };
7853
7861
 
7854
7862
  // src/components/user-action/DateAndTimePicker.tsx
7855
- import clsx43 from "clsx";
7856
- import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
7863
+ import clsx42 from "clsx";
7864
+ import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
7857
7865
  var defaultTimeTranslation = {
7858
7866
  en: {
7859
7867
  clear: "Clear",
@@ -7912,7 +7920,7 @@ var DateTimePicker = ({
7912
7920
  let dateDisplay;
7913
7921
  let timeDisplay;
7914
7922
  if (useDate) {
7915
- dateDisplay = /* @__PURE__ */ jsx56(
7923
+ dateDisplay = /* @__PURE__ */ jsx55(
7916
7924
  DatePicker,
7917
7925
  {
7918
7926
  ...datePickerProps,
@@ -7926,25 +7934,25 @@ var DateTimePicker = ({
7926
7934
  );
7927
7935
  }
7928
7936
  if (useTime) {
7929
- timeDisplay = /* @__PURE__ */ jsx56(
7937
+ timeDisplay = /* @__PURE__ */ jsx55(
7930
7938
  TimePicker,
7931
7939
  {
7932
7940
  ...timePickerProps,
7933
- className: clsx43("h-full", { "justify-between w-full": mode === "time" }),
7941
+ className: clsx42("h-full", { "justify-between w-full": mode === "time" }),
7934
7942
  maxHeight: 250,
7935
7943
  time: value,
7936
7944
  onChange
7937
7945
  }
7938
7946
  );
7939
7947
  }
7940
- return /* @__PURE__ */ jsxs37("div", { className: "col w-fit", children: [
7941
- /* @__PURE__ */ jsxs37("div", { className: "row gap-x-4", children: [
7948
+ return /* @__PURE__ */ jsxs36("div", { className: "col w-fit", children: [
7949
+ /* @__PURE__ */ jsxs36("div", { className: "row gap-x-4", children: [
7942
7950
  dateDisplay,
7943
7951
  timeDisplay
7944
7952
  ] }),
7945
- /* @__PURE__ */ jsx56("div", { className: "row justify-end", children: /* @__PURE__ */ jsxs37("div", { className: "row gap-x-2 mt-1", children: [
7946
- /* @__PURE__ */ jsx56(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation.clear }),
7947
- /* @__PURE__ */ jsx56(
7953
+ /* @__PURE__ */ jsx55("div", { className: "row justify-end", children: /* @__PURE__ */ jsxs36("div", { className: "row gap-x-2 mt-1", children: [
7954
+ /* @__PURE__ */ jsx55(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation.clear }),
7955
+ /* @__PURE__ */ jsx55(
7948
7956
  SolidButton,
7949
7957
  {
7950
7958
  size: "medium",
@@ -7956,8 +7964,88 @@ var DateTimePicker = ({
7956
7964
  ] });
7957
7965
  };
7958
7966
 
7967
+ // src/components/user-action/Menu.tsx
7968
+ import { useRef as useRef9 } from "react";
7969
+ import clsx43 from "clsx";
7970
+
7971
+ // src/util/PropsWithFunctionChildren.ts
7972
+ var resolve = (children, bag) => {
7973
+ if (typeof children === "function") {
7974
+ return children(bag);
7975
+ }
7976
+ return children ?? void 0;
7977
+ };
7978
+ var BagFunctionUtil = {
7979
+ resolve
7980
+ };
7981
+
7982
+ // src/components/user-action/Menu.tsx
7983
+ import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
7984
+ var MenuItem = ({
7985
+ children,
7986
+ onClick,
7987
+ alignment = "left",
7988
+ isDisabled = false,
7989
+ className
7990
+ }) => /* @__PURE__ */ jsx56(
7991
+ "div",
7992
+ {
7993
+ className: clsx43("block px-3 py-1.5 bg-menu-background first:rounded-t-lg last:rounded-b-lg text-sm font-semibold", {
7994
+ "text-right": alignment === "right",
7995
+ "text-left": alignment === "left",
7996
+ "text-disabled-text cursor-not-allowed": isDisabled,
7997
+ "text-menu-text hover:bg-primary/20": !isDisabled,
7998
+ "cursor-pointer": !!onClick
7999
+ }, className),
8000
+ onClick,
8001
+ children
8002
+ }
8003
+ );
8004
+ var Menu = ({
8005
+ trigger,
8006
+ children,
8007
+ alignment = "tl",
8008
+ showOnHover = false,
8009
+ menuClassName = ""
8010
+ }) => {
8011
+ const { isHovered: isOpen, setIsHovered: setIsOpen, handlers } = useHoverState({ isDisabled: !showOnHover });
8012
+ const triggerRef = useRef9(null);
8013
+ const menuRef = useRef9(null);
8014
+ useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
8015
+ const bag = { isOpen, close: () => setIsOpen(false) };
8016
+ return /* @__PURE__ */ jsxs37(
8017
+ "div",
8018
+ {
8019
+ className: "relative",
8020
+ ...handlers,
8021
+ children: [
8022
+ trigger(() => setIsOpen(!isOpen), triggerRef),
8023
+ /* @__PURE__ */ jsx56(
8024
+ "div",
8025
+ {
8026
+ ref: menuRef,
8027
+ onClick: (e) => e.stopPropagation(),
8028
+ className: clsx43(
8029
+ "absolute top-full mt-1 min-w-40 rounded-lg bg-menu-background text-menu-text shadow-around-md z-10",
8030
+ {
8031
+ "top-0": alignment[0] === "t",
8032
+ "bottom-0": alignment[0] === "b",
8033
+ "left-0": alignment[1] === "l",
8034
+ "right-0": alignment[1] === "r",
8035
+ "hidden": !isOpen
8036
+ },
8037
+ menuClassName
8038
+ ),
8039
+ children: BagFunctionUtil.resolve(children, bag)
8040
+ }
8041
+ )
8042
+ ]
8043
+ }
8044
+ );
8045
+ };
8046
+
7959
8047
  // src/components/user-action/ScrollPicker.tsx
7960
- import { useCallback as useCallback4, useEffect as useEffect21, useState as useState23 } from "react";
8048
+ import { useCallback as useCallback4, useEffect as useEffect22, useState as useState23 } from "react";
7961
8049
  import clsx44 from "clsx";
7962
8050
  import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
7963
8051
  var up = 1;
@@ -8077,7 +8165,7 @@ var ScrollPicker = ({
8077
8165
  };
8078
8166
  });
8079
8167
  }, [disabled, getDirection, onChange]);
8080
- useEffect21(() => {
8168
+ useEffect22(() => {
8081
8169
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
8082
8170
  });
8083
8171
  const opacity = (transition2, index, itemsCount) => {
@@ -8154,7 +8242,7 @@ var ScrollPicker = ({
8154
8242
  };
8155
8243
 
8156
8244
  // src/components/user-action/ToggleableInput.tsx
8157
- import { useEffect as useEffect22, useRef as useRef8, useState as useState24 } from "react";
8245
+ import { useEffect as useEffect23, useRef as useRef10, useState as useState24 } from "react";
8158
8246
  import { Pencil } from "lucide-react";
8159
8247
  import clsx45 from "clsx";
8160
8248
  import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -8173,12 +8261,12 @@ var ToggleableInput = ({
8173
8261
  }) => {
8174
8262
  const [isEditing, setIsEditing] = useState24(initialState !== "display");
8175
8263
  const { restartTimer, clearUpdateTimer } = useSaveDelay(() => void 0, 3e3);
8176
- const ref = useRef8(null);
8264
+ const ref = useRef10(null);
8177
8265
  const onEditCompletedWrapper = (text) => {
8178
8266
  onEditCompleted(text);
8179
8267
  clearUpdateTimer();
8180
8268
  };
8181
- useEffect22(() => {
8269
+ useEffect23(() => {
8182
8270
  if (isEditing) {
8183
8271
  ref.current?.focus();
8184
8272
  }
@@ -8244,7 +8332,7 @@ var ToggleableInputUncontrolled = ({
8244
8332
  ...restProps
8245
8333
  }) => {
8246
8334
  const [value, setValue] = useState24(initialValue);
8247
- useEffect22(() => {
8335
+ useEffect23(() => {
8248
8336
  setValue(initialValue);
8249
8337
  }, [initialValue]);
8250
8338
  return /* @__PURE__ */ jsx58(
@@ -8304,6 +8392,7 @@ export {
8304
8392
  ArrayUtil,
8305
8393
  Avatar,
8306
8394
  AvatarGroup,
8395
+ BagFunctionUtil,
8307
8396
  BreadCrumb,
8308
8397
  ButtonColorUtil,
8309
8398
  ButtonUtil,
@@ -8348,12 +8437,13 @@ export {
8348
8437
  LocalStorageService,
8349
8438
  LoopingArrayCalculator,
8350
8439
  MarkdownInterpreter,
8351
- Menu2 as Menu,
8440
+ Menu,
8352
8441
  MenuItem,
8353
8442
  Modal,
8354
8443
  MultiSearchWithMapping,
8355
8444
  MultiSelect,
8356
8445
  MultiSelectProperty,
8446
+ MultiSelectUncontrolled,
8357
8447
  MultiSubjectSearchWithMapping,
8358
8448
  NumberProperty,
8359
8449
  OutlineButton,
@@ -8367,7 +8457,6 @@ export {
8367
8457
  RingWave,
8368
8458
  ScrollPicker,
8369
8459
  SearchableList,
8370
- SearchableSelect,
8371
8460
  Select,
8372
8461
  SelectUncontrolled,
8373
8462
  SessionStorageService,
@@ -8441,6 +8530,7 @@ export {
8441
8530
  useLocale,
8442
8531
  useOutsideClick,
8443
8532
  useSaveDelay,
8533
+ useSearch,
8444
8534
  useTheme,
8445
8535
  useTranslation,
8446
8536
  validateEmail,