@helpwave/hightide 0.1.36 → 0.1.38

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 (148) hide show
  1. package/dist/components/date/DatePicker.js.map +1 -1
  2. package/dist/components/date/DatePicker.mjs.map +1 -1
  3. package/dist/components/date/DayPicker.js.map +1 -1
  4. package/dist/components/date/DayPicker.mjs.map +1 -1
  5. package/dist/components/date/TimeDisplay.js.map +1 -1
  6. package/dist/components/date/TimeDisplay.mjs.map +1 -1
  7. package/dist/components/date/YearMonthPicker.js.map +1 -1
  8. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  9. package/dist/components/date/index.js.map +1 -1
  10. package/dist/components/date/index.mjs.map +1 -1
  11. package/dist/components/dialog/ConfirmDialog.js +15 -9
  12. package/dist/components/dialog/ConfirmDialog.js.map +1 -1
  13. package/dist/components/dialog/ConfirmDialog.mjs +16 -10
  14. package/dist/components/dialog/ConfirmDialog.mjs.map +1 -1
  15. package/dist/components/dialog/Dialog.d.mts +4 -5
  16. package/dist/components/dialog/Dialog.d.ts +4 -5
  17. package/dist/components/dialog/Dialog.js +16 -9
  18. package/dist/components/dialog/Dialog.js.map +1 -1
  19. package/dist/components/dialog/Dialog.mjs +18 -10
  20. package/dist/components/dialog/Dialog.mjs.map +1 -1
  21. package/dist/components/dialog/DiscardChangesDialog.js +15 -9
  22. package/dist/components/dialog/DiscardChangesDialog.js.map +1 -1
  23. package/dist/components/dialog/DiscardChangesDialog.mjs +16 -10
  24. package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -1
  25. package/dist/components/dialog/InputDialog.js +15 -9
  26. package/dist/components/dialog/InputDialog.js.map +1 -1
  27. package/dist/components/dialog/InputDialog.mjs +16 -10
  28. package/dist/components/dialog/InputDialog.mjs.map +1 -1
  29. package/dist/components/dialog/LanguageDialog.js +188 -154
  30. package/dist/components/dialog/LanguageDialog.js.map +1 -1
  31. package/dist/components/dialog/LanguageDialog.mjs +151 -116
  32. package/dist/components/dialog/LanguageDialog.mjs.map +1 -1
  33. package/dist/components/dialog/ThemeDialog.js +191 -157
  34. package/dist/components/dialog/ThemeDialog.js.map +1 -1
  35. package/dist/components/dialog/ThemeDialog.mjs +151 -116
  36. package/dist/components/dialog/ThemeDialog.mjs.map +1 -1
  37. package/dist/components/dialog/index.js +205 -171
  38. package/dist/components/dialog/index.js.map +1 -1
  39. package/dist/components/dialog/index.mjs +152 -117
  40. package/dist/components/dialog/index.mjs.map +1 -1
  41. package/dist/components/index.d.mts +1 -1
  42. package/dist/components/index.d.ts +1 -1
  43. package/dist/components/index.js +333 -299
  44. package/dist/components/index.js.map +1 -1
  45. package/dist/components/index.mjs +194 -159
  46. package/dist/components/index.mjs.map +1 -1
  47. package/dist/components/layout/Carousel.js.map +1 -1
  48. package/dist/components/layout/Carousel.mjs.map +1 -1
  49. package/dist/components/layout/TextImage.js.map +1 -1
  50. package/dist/components/layout/TextImage.mjs.map +1 -1
  51. package/dist/components/layout/index.js.map +1 -1
  52. package/dist/components/layout/index.mjs.map +1 -1
  53. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  54. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  55. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  56. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  57. package/dist/components/loading-states/index.js.map +1 -1
  58. package/dist/components/loading-states/index.mjs.map +1 -1
  59. package/dist/components/navigation/Navigation.d.mts +4 -4
  60. package/dist/components/navigation/Navigation.d.ts +4 -4
  61. package/dist/components/navigation/Navigation.js.map +1 -1
  62. package/dist/components/navigation/Navigation.mjs.map +1 -1
  63. package/dist/components/navigation/Pagination.js.map +1 -1
  64. package/dist/components/navigation/Pagination.mjs.map +1 -1
  65. package/dist/components/navigation/StepperBar.js.map +1 -1
  66. package/dist/components/navigation/StepperBar.mjs.map +1 -1
  67. package/dist/components/navigation/index.d.mts +1 -1
  68. package/dist/components/navigation/index.d.ts +1 -1
  69. package/dist/components/navigation/index.js.map +1 -1
  70. package/dist/components/navigation/index.mjs.map +1 -1
  71. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  72. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  73. package/dist/components/properties/DateProperty.js.map +1 -1
  74. package/dist/components/properties/DateProperty.mjs.map +1 -1
  75. package/dist/components/properties/MultiSelectProperty.js +129 -101
  76. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  77. package/dist/components/properties/MultiSelectProperty.mjs +131 -102
  78. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  79. package/dist/components/properties/NumberProperty.js.map +1 -1
  80. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  81. package/dist/components/properties/PropertyBase.js.map +1 -1
  82. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  83. package/dist/components/properties/SelectProperty.js +129 -101
  84. package/dist/components/properties/SelectProperty.js.map +1 -1
  85. package/dist/components/properties/SelectProperty.mjs +131 -102
  86. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  87. package/dist/components/properties/TextProperty.js.map +1 -1
  88. package/dist/components/properties/TextProperty.mjs.map +1 -1
  89. package/dist/components/properties/index.js +129 -101
  90. package/dist/components/properties/index.js.map +1 -1
  91. package/dist/components/properties/index.mjs +131 -102
  92. package/dist/components/properties/index.mjs.map +1 -1
  93. package/dist/components/table/Table.js.map +1 -1
  94. package/dist/components/table/Table.mjs.map +1 -1
  95. package/dist/components/table/TableFilterButton.js.map +1 -1
  96. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  97. package/dist/components/table/index.js.map +1 -1
  98. package/dist/components/table/index.mjs.map +1 -1
  99. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  100. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  101. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  102. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  103. package/dist/components/user-action/SearchBar.js.map +1 -1
  104. package/dist/components/user-action/SearchBar.mjs.map +1 -1
  105. package/dist/components/user-action/index.js +129 -101
  106. package/dist/components/user-action/index.js.map +1 -1
  107. package/dist/components/user-action/index.mjs +131 -102
  108. package/dist/components/user-action/index.mjs.map +1 -1
  109. package/dist/components/user-action/select/Select.d.mts +2 -0
  110. package/dist/components/user-action/select/Select.d.ts +2 -0
  111. package/dist/components/user-action/select/Select.js +129 -101
  112. package/dist/components/user-action/select/Select.js.map +1 -1
  113. package/dist/components/user-action/select/Select.mjs +131 -102
  114. package/dist/components/user-action/select/Select.mjs.map +1 -1
  115. package/dist/components/user-action/select/index.js +129 -101
  116. package/dist/components/user-action/select/index.js.map +1 -1
  117. package/dist/components/user-action/select/index.mjs +131 -102
  118. package/dist/components/user-action/select/index.mjs.map +1 -1
  119. package/dist/hooks/index.js.map +1 -1
  120. package/dist/hooks/index.mjs.map +1 -1
  121. package/dist/hooks/useValidators.js.map +1 -1
  122. package/dist/hooks/useValidators.mjs.map +1 -1
  123. package/dist/index.d.mts +1 -1
  124. package/dist/index.d.ts +1 -1
  125. package/dist/index.js +358 -324
  126. package/dist/index.js.map +1 -1
  127. package/dist/index.mjs +202 -167
  128. package/dist/index.mjs.map +1 -1
  129. package/dist/localization/LanguageProvider.js +1 -1
  130. package/dist/localization/LanguageProvider.js.map +1 -1
  131. package/dist/localization/LanguageProvider.mjs +1 -1
  132. package/dist/localization/LanguageProvider.mjs.map +1 -1
  133. package/dist/localization/index.js +1 -1
  134. package/dist/localization/index.js.map +1 -1
  135. package/dist/localization/index.mjs +1 -1
  136. package/dist/localization/index.mjs.map +1 -1
  137. package/dist/localization/useTranslation.js.map +1 -1
  138. package/dist/localization/useTranslation.mjs.map +1 -1
  139. package/dist/style/globals.css +0 -3
  140. package/dist/theming/index.js +1 -1
  141. package/dist/theming/index.js.map +1 -1
  142. package/dist/theming/index.mjs +1 -1
  143. package/dist/theming/index.mjs.map +1 -1
  144. package/dist/theming/useTheme.js +1 -1
  145. package/dist/theming/useTheme.js.map +1 -1
  146. package/dist/theming/useTheme.mjs +1 -1
  147. package/dist/theming/useTheme.mjs.map +1 -1
  148. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7194,7 +7194,7 @@ var LanguageProvider = ({ children, language }) => {
7194
7194
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LanguageContext.Provider, { value: {
7195
7195
  language: resolvedLanguage,
7196
7196
  setLanguage: (newLanguage) => {
7197
- if (language) {
7197
+ if (language !== "system") {
7198
7198
  console.warn("LanguageProvider: Attempting to change the language while setting a fixed language won't have any effect. Change the language provided to the LanguageProvider instead.");
7199
7199
  }
7200
7200
  setStoredLanguage(newLanguage);
@@ -8118,7 +8118,6 @@ var import_clsx10 = __toESM(require("clsx"));
8118
8118
  // src/components/dialog/Dialog.tsx
8119
8119
  var import_react13 = require("react");
8120
8120
  var import_react14 = require("react");
8121
- var import_react15 = require("react");
8122
8121
  var import_clsx9 = __toESM(require("clsx"));
8123
8122
  var import_lucide_react3 = require("lucide-react");
8124
8123
 
@@ -8481,15 +8480,18 @@ var Dialog = ({
8481
8480
  description,
8482
8481
  isModal = true,
8483
8482
  onClose,
8484
- className,
8485
8483
  backgroundClassName,
8486
8484
  position = "center",
8487
- isAnimated = true
8485
+ isAnimated = true,
8486
+ containerClassName,
8487
+ ...props
8488
8488
  }) => {
8489
8489
  const translation = useTranslation([formTranslation]);
8490
8490
  const [visible, setVisible] = (0, import_react14.useState)(isOpen);
8491
- const ref = (0, import_react15.useRef)(null);
8492
- (0, import_react13.useEffect)(() => {
8491
+ const generatedId = (0, import_react13.useId)();
8492
+ const id = props.id ?? generatedId;
8493
+ const ref = (0, import_react14.useRef)(null);
8494
+ (0, import_react14.useEffect)(() => {
8493
8495
  if (isOpen) {
8494
8496
  setVisible(true);
8495
8497
  } else {
@@ -8514,14 +8516,16 @@ var Dialog = ({
8514
8516
  none: ""
8515
8517
  };
8516
8518
  const positionStyle = positionMap[position];
8519
+ if (!visible) return;
8517
8520
  return (0, import_react_dom.createPortal)(
8518
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
8521
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { id: `dialog-container-${id}`, className: (0, import_clsx9.default)("fixed inset-0 h-screen w-screen", containerClassName), children: [
8519
8522
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8520
8523
  "div",
8521
8524
  {
8525
+ id: `dialog-background-${id}`,
8522
8526
  hidden: !visible,
8523
8527
  className: (0, import_clsx9.default)(
8524
- "fixed inset-0 h-screen w-screen bg-overlay-shadow z-100",
8528
+ "fixed inset-0 h-screen w-screen bg-overlay-shadow",
8525
8529
  {
8526
8530
  "motion-safe:animate-fade-in": isOpen,
8527
8531
  "motion-safe:animate-fade-out": !isOpen
@@ -8540,6 +8544,8 @@ var Dialog = ({
8540
8544
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
8541
8545
  "div",
8542
8546
  {
8547
+ ...props,
8548
+ id: `dialog-${id}`,
8543
8549
  ref,
8544
8550
  hidden: !visible,
8545
8551
  onKeyDown: (event) => {
@@ -8553,13 +8559,13 @@ var Dialog = ({
8553
8559
  }
8554
8560
  },
8555
8561
  className: (0, import_clsx9.default)(
8556
- "flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom max-w-[calc(100vw_-_2rem)] max-h-[calc(100vh_-_2rem)] z-100",
8562
+ "flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom max-w-[calc(100vw_-_2rem)] max-h-[calc(100vh_-_2rem)]",
8557
8563
  {
8558
8564
  "motion-safe:animate-pop-in": isOpen,
8559
8565
  "motion-safe:animate-pop-out": !isOpen
8560
8566
  },
8561
8567
  positionStyle,
8562
- className
8568
+ props.className
8563
8569
  ),
8564
8570
  children: [
8565
8571
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "typography-title-lg mr-8", children: titleElement }),
@@ -8676,17 +8682,17 @@ var DiscardChangesDialog = ({
8676
8682
  };
8677
8683
 
8678
8684
  // src/components/user-action/input/Input.tsx
8679
- var import_react18 = require("react");
8685
+ var import_react17 = require("react");
8680
8686
  var import_clsx11 = __toESM(require("clsx"));
8681
8687
 
8682
8688
  // src/hooks/useDelay.ts
8683
- var import_react16 = require("react");
8689
+ var import_react15 = require("react");
8684
8690
  var defaultOptions2 = {
8685
8691
  delay: 3e3,
8686
8692
  disabled: false
8687
8693
  };
8688
8694
  function useDelay(options) {
8689
- const [timer, setTimer] = (0, import_react16.useState)(void 0);
8695
+ const [timer, setTimer] = (0, import_react15.useState)(void 0);
8690
8696
  const { delay, disabled } = {
8691
8697
  ...defaultOptions2,
8692
8698
  ...options
@@ -8705,12 +8711,12 @@ function useDelay(options) {
8705
8711
  setTimer(void 0);
8706
8712
  }, delay));
8707
8713
  };
8708
- (0, import_react16.useEffect)(() => {
8714
+ (0, import_react15.useEffect)(() => {
8709
8715
  return () => {
8710
8716
  clearTimeout(timer);
8711
8717
  };
8712
8718
  }, [timer]);
8713
- (0, import_react16.useEffect)(() => {
8719
+ (0, import_react15.useEffect)(() => {
8714
8720
  if (disabled) {
8715
8721
  clearTimeout(timer);
8716
8722
  setTimer(void 0);
@@ -8720,9 +8726,9 @@ function useDelay(options) {
8720
8726
  }
8721
8727
 
8722
8728
  // src/hooks/focus/useFocusManagement.ts
8723
- var import_react17 = require("react");
8729
+ var import_react16 = require("react");
8724
8730
  function useFocusManagement() {
8725
- const getFocusableElements = (0, import_react17.useCallback)(() => {
8731
+ const getFocusableElements = (0, import_react16.useCallback)(() => {
8726
8732
  return Array.from(
8727
8733
  document.querySelectorAll(
8728
8734
  'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
@@ -8731,7 +8737,7 @@ function useFocusManagement() {
8731
8737
  (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
8732
8738
  );
8733
8739
  }, []);
8734
- const getNextFocusElement = (0, import_react17.useCallback)(() => {
8740
+ const getNextFocusElement = (0, import_react16.useCallback)(() => {
8735
8741
  const elements = getFocusableElements();
8736
8742
  if (elements.length === 0) {
8737
8743
  return void 0;
@@ -8743,11 +8749,11 @@ function useFocusManagement() {
8743
8749
  }
8744
8750
  return nextElement;
8745
8751
  }, [getFocusableElements]);
8746
- const focusNext = (0, import_react17.useCallback)(() => {
8752
+ const focusNext = (0, import_react16.useCallback)(() => {
8747
8753
  const nextElement = getNextFocusElement();
8748
8754
  nextElement?.focus();
8749
8755
  }, [getNextFocusElement]);
8750
- const getPreviousFocusElement = (0, import_react17.useCallback)(() => {
8756
+ const getPreviousFocusElement = (0, import_react16.useCallback)(() => {
8751
8757
  const elements = getFocusableElements();
8752
8758
  if (elements.length === 0) {
8753
8759
  return void 0;
@@ -8763,7 +8769,7 @@ function useFocusManagement() {
8763
8769
  }
8764
8770
  return previousElement;
8765
8771
  }, [getFocusableElements]);
8766
- const focusPrevious = (0, import_react17.useCallback)(() => {
8772
+ const focusPrevious = (0, import_react16.useCallback)(() => {
8767
8773
  const previousElement = getPreviousFocusElement();
8768
8774
  if (previousElement) previousElement.focus();
8769
8775
  }, [getPreviousFocusElement]);
@@ -8784,7 +8790,7 @@ var defaultEditCompleteOptions = {
8784
8790
  afterDelay: true,
8785
8791
  delay: 2500
8786
8792
  };
8787
- var Input = (0, import_react18.forwardRef)(function Input2({
8793
+ var Input = (0, import_react17.forwardRef)(function Input2({
8788
8794
  value,
8789
8795
  onChange,
8790
8796
  onChangeText,
@@ -8806,8 +8812,8 @@ var Input = (0, import_react18.forwardRef)(function Input2({
8806
8812
  restartTimer,
8807
8813
  clearTimer
8808
8814
  } = useDelay({ delay, disabled: !afterDelay });
8809
- const innerRef = (0, import_react18.useRef)(null);
8810
- (0, import_react18.useImperativeHandle)(forwardedRef, () => innerRef.current);
8815
+ const innerRef = (0, import_react17.useRef)(null);
8816
+ (0, import_react17.useImperativeHandle)(forwardedRef, () => innerRef.current);
8811
8817
  const { focusNext } = useFocusManagement();
8812
8818
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8813
8819
  "input",
@@ -8892,7 +8898,7 @@ var InputDialog = ({
8892
8898
  };
8893
8899
 
8894
8900
  // src/components/user-action/select/Select.tsx
8895
- var import_react20 = require("react");
8901
+ var import_react19 = require("react");
8896
8902
  var import_clsx13 = __toESM(require("clsx"));
8897
8903
 
8898
8904
  // src/utils/match.ts
@@ -8986,7 +8992,7 @@ var ChipList = ({
8986
8992
  };
8987
8993
 
8988
8994
  // src/hooks/useFloatingElement.ts
8989
- var import_react19 = require("react");
8995
+ var import_react18 = require("react");
8990
8996
 
8991
8997
  // src/utils/math.ts
8992
8998
  var clamp = (value, range2 = [0, 1]) => {
@@ -9049,9 +9055,9 @@ function useFloatingElement({
9049
9055
  screenPadding = 16,
9050
9056
  gap = 4
9051
9057
  }) {
9052
- const [style, setStyle] = (0, import_react19.useState)();
9058
+ const [style, setStyle] = (0, import_react18.useState)();
9053
9059
  const isMounted = useIsMounted();
9054
- const calculate = (0, import_react19.useCallback)(() => {
9060
+ const calculate = (0, import_react18.useCallback)(() => {
9055
9061
  const containerRect = containerRef.current.getBoundingClientRect();
9056
9062
  const windowRect = windowRef?.current.getBoundingClientRect() ?? {
9057
9063
  top: 0,
@@ -9081,14 +9087,14 @@ function useFloatingElement({
9081
9087
  }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
9082
9088
  const height = containerRef.current?.getBoundingClientRect().height;
9083
9089
  const width = containerRef.current?.getBoundingClientRect().width;
9084
- (0, import_react19.useEffect)(() => {
9090
+ (0, import_react18.useEffect)(() => {
9085
9091
  if (active && isMounted) {
9086
9092
  calculate();
9087
9093
  } else {
9088
9094
  setStyle(void 0);
9089
9095
  }
9090
9096
  }, [calculate, active, isMounted, height, width]);
9091
- (0, import_react19.useEffect)(() => {
9097
+ (0, import_react18.useEffect)(() => {
9092
9098
  window.addEventListener("resize", calculate);
9093
9099
  let timeout;
9094
9100
  if (isPolling) {
@@ -9108,11 +9114,11 @@ function useFloatingElement({
9108
9114
  var import_react_dom2 = require("react-dom");
9109
9115
  var import_jsx_runtime17 = require("react/jsx-runtime");
9110
9116
  var defaultToggleOpenOptions = {
9111
- highlightStartPosition: "first"
9117
+ highlightStartPositionBehavior: "first"
9112
9118
  };
9113
- var SelectContext = (0, import_react20.createContext)(null);
9119
+ var SelectContext = (0, import_react19.createContext)(null);
9114
9120
  function useSelectContext() {
9115
- const ctx = (0, import_react20.useContext)(SelectContext);
9121
+ const ctx = (0, import_react19.useContext)(SelectContext);
9116
9122
  if (!ctx) {
9117
9123
  throw new Error("SelectContext must be used within a ListBoxPrimitive");
9118
9124
  }
@@ -9131,47 +9137,62 @@ var SelectRoot = ({
9131
9137
  isMultiSelect = false,
9132
9138
  iconAppearance = "left"
9133
9139
  }) => {
9134
- const [options, setOptions] = (0, import_react20.useState)([]);
9135
- const triggerRef = (0, import_react20.useRef)(null);
9136
- const generatedId = (0, import_react20.useId)();
9140
+ const triggerRef = (0, import_react19.useRef)(null);
9141
+ const generatedId = (0, import_react19.useId)();
9137
9142
  const usedId = id ?? generatedId;
9138
- const [internalState, setInternalState] = (0, import_react20.useState)({
9139
- isOpen
9143
+ const [internalState, setInternalState] = (0, import_react19.useState)({
9144
+ isOpen,
9145
+ options: []
9140
9146
  });
9141
- const selectedValues = isMultiSelect ? values ?? [] : [value].filter(Boolean);
9147
+ const selectedValues = (0, import_react19.useMemo)(
9148
+ () => isMultiSelect ? values ?? [] : [value].filter(Boolean),
9149
+ [isMultiSelect, value, values]
9150
+ );
9151
+ const selectedOptions = (0, import_react19.useMemo)(
9152
+ () => selectedValues.map((value2) => internalState.options.find((option) => value2 === option.value)).filter(Boolean),
9153
+ [selectedValues, internalState.options]
9154
+ );
9142
9155
  const state = {
9143
9156
  ...internalState,
9144
9157
  id: usedId,
9145
9158
  disabled,
9146
9159
  invalid,
9147
9160
  value: selectedValues,
9148
- options,
9149
- selectedOptions: selectedValues.map((value2) => options.find((option) => value2 === option.value)).filter(Boolean)
9161
+ selectedOptions
9150
9162
  };
9151
9163
  const config = {
9152
9164
  isMultiSelect,
9153
9165
  iconAppearance
9154
9166
  };
9155
- const registerItem = (0, import_react20.useCallback)((item) => {
9156
- setOptions((prev) => {
9157
- const updated = [...prev, item];
9158
- updated.sort((a, b) => {
9167
+ const registerItem = (0, import_react19.useCallback)((item) => {
9168
+ setInternalState((prev) => {
9169
+ const updatedOptions = [...prev.options, item];
9170
+ updatedOptions.sort((a, b) => {
9159
9171
  const aEl = a.ref.current;
9160
9172
  const bEl = b.ref.current;
9161
9173
  if (!aEl || !bEl) return 0;
9162
9174
  return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
9163
9175
  });
9164
- return updated;
9176
+ return {
9177
+ ...prev,
9178
+ options: updatedOptions
9179
+ };
9165
9180
  });
9166
9181
  }, []);
9167
- const unregisterItem = (0, import_react20.useCallback)((value2) => {
9168
- setOptions((prev) => prev.filter((i) => i.value !== value2));
9182
+ const unregisterItem = (0, import_react19.useCallback)((value2) => {
9183
+ setInternalState((prev) => {
9184
+ const updatedOptions = prev.options.filter((i) => i.value !== value2);
9185
+ return {
9186
+ ...prev,
9187
+ options: updatedOptions
9188
+ };
9189
+ });
9169
9190
  }, []);
9170
9191
  const toggleSelection = (value2, isSelected) => {
9171
9192
  if (disabled) {
9172
9193
  return;
9173
9194
  }
9174
- const option = options.find((i) => i.value === value2);
9195
+ const option = state.options.find((i) => i.value === value2);
9175
9196
  if (!option) {
9176
9197
  console.error(`SelectOption with value: ${value2} not found`);
9177
9198
  return;
@@ -9207,42 +9228,47 @@ var SelectRoot = ({
9207
9228
  highlightedValue: value2
9208
9229
  }));
9209
9230
  };
9210
- const registerTrigger = (0, import_react20.useCallback)((ref) => {
9231
+ const registerTrigger = (0, import_react19.useCallback)((ref) => {
9211
9232
  triggerRef.current = ref.current;
9212
9233
  }, []);
9213
- const unregisterTrigger = (0, import_react20.useCallback)(() => {
9234
+ const unregisterTrigger = (0, import_react19.useCallback)(() => {
9214
9235
  triggerRef.current = null;
9215
9236
  }, []);
9216
9237
  const toggleOpen = (isOpen2, toggleOpenOptions) => {
9217
- const { highlightStartPosition } = { ...defaultToggleOpenOptions, ...toggleOpenOptions };
9218
- let highlightedIndex;
9219
- if (highlightStartPosition === "first") {
9220
- highlightedIndex = options.findIndex((option) => !option.disabled);
9221
- } else {
9222
- highlightedIndex = options.length - 1 - [...options].reverse().findIndex((option) => !option.disabled);
9223
- }
9224
- if (highlightedIndex === -1 || highlightedIndex === options.length) {
9225
- highlightedIndex = 0;
9238
+ const { highlightStartPositionBehavior } = { ...defaultToggleOpenOptions, ...toggleOpenOptions };
9239
+ let firstSelectedValue;
9240
+ let firstEnabledValue;
9241
+ for (let i = 0; i < state.options.length; i++) {
9242
+ const currentOption = state.options[highlightStartPositionBehavior === "first" ? i : state.options.length - i - 1];
9243
+ if (!currentOption.disabled) {
9244
+ if (!firstEnabledValue) {
9245
+ firstEnabledValue = currentOption.value;
9246
+ }
9247
+ if (selectedValues.includes(currentOption.value)) {
9248
+ firstSelectedValue = currentOption.value;
9249
+ break;
9250
+ }
9251
+ }
9226
9252
  }
9227
9253
  setInternalState((prevState) => ({
9228
9254
  ...prevState,
9229
9255
  isOpen: isOpen2 ?? !prevState.isOpen,
9230
- highlightedValue: options[highlightedIndex].value
9256
+ highlightedValue: firstSelectedValue ?? firstEnabledValue
9231
9257
  }));
9232
9258
  };
9233
9259
  const moveHighlightedIndex = (delta) => {
9234
- let highlightedIndex = options.findIndex((value2) => value2.value === internalState.highlightedValue);
9260
+ let highlightedIndex = state.options.findIndex((value2) => value2.value === internalState.highlightedValue);
9235
9261
  if (highlightedIndex === -1) {
9236
9262
  highlightedIndex = 0;
9237
9263
  }
9238
- const optionLength = options.length;
9264
+ const optionLength = state.options.length;
9239
9265
  const startIndex = (highlightedIndex + delta % optionLength + optionLength) % optionLength;
9240
9266
  const isForward = delta >= 0;
9241
- let highlightedValue = options[startIndex].value;
9242
- for (let i = 0; i < options.length; i++) {
9267
+ let highlightedValue = state.options[startIndex].value;
9268
+ for (let i = 0; i < state.options.length; i++) {
9243
9269
  const index = (startIndex + (isForward ? i : -i) + optionLength) % optionLength;
9244
- if (!options[index].disabled) {
9245
- highlightedValue = options[index].value;
9270
+ if (!state.options[index].disabled) {
9271
+ highlightedValue = state.options[index].value;
9246
9272
  break;
9247
9273
  }
9248
9274
  }
@@ -9251,11 +9277,11 @@ var SelectRoot = ({
9251
9277
  highlightedValue
9252
9278
  }));
9253
9279
  };
9254
- (0, import_react20.useEffect)(() => {
9280
+ (0, import_react19.useEffect)(() => {
9255
9281
  if (!internalState.highlightedValue) return;
9256
- const highlighted = options.find((value2) => value2.value === internalState.highlightedValue);
9282
+ const highlighted = internalState.options.find((value2) => value2.value === internalState.highlightedValue);
9257
9283
  if (highlighted) {
9258
- highlighted.ref.current.scrollIntoView({ behavior: "instant", block: "nearest" });
9284
+ highlighted.ref.current?.scrollIntoView({ behavior: "instant", block: "nearest" });
9259
9285
  } else {
9260
9286
  console.error(`SelectRoot: Could not find highlighted value (${internalState.highlightedValue})`);
9261
9287
  }
@@ -9279,14 +9305,14 @@ var SelectRoot = ({
9279
9305
  };
9280
9306
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContext.Provider, { value: contextValue, children });
9281
9307
  };
9282
- var SelectOption = (0, import_react20.forwardRef)(
9308
+ var SelectOption = (0, import_react19.forwardRef)(
9283
9309
  function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
9284
9310
  const { state, config, item, trigger } = useSelectContext();
9285
9311
  const { register, unregister, toggleSelection, highlightItem } = item;
9286
- const itemRef = (0, import_react20.useRef)(null);
9312
+ const itemRef = (0, import_react19.useRef)(null);
9287
9313
  iconAppearance ??= config.iconAppearance;
9288
9314
  const label = children ?? value;
9289
- (0, import_react20.useEffect)(() => {
9315
+ (0, import_react19.useEffect)(() => {
9290
9316
  register({
9291
9317
  value,
9292
9318
  label,
@@ -9364,13 +9390,13 @@ var defaultSelectButtonTranslation = {
9364
9390
  clickToSelect: "Zum ausw\xE4hlen dr\xFCcken"
9365
9391
  }
9366
9392
  };
9367
- var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
9393
+ var SelectButton = (0, import_react19.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
9368
9394
  const translation = useTranslation([defaultSelectButtonTranslation]);
9369
9395
  const { state, trigger } = useSelectContext();
9370
9396
  const { register, unregister, toggleOpen } = trigger;
9371
- const innerRef = (0, import_react20.useRef)(null);
9372
- (0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
9373
- (0, import_react20.useEffect)(() => {
9397
+ const innerRef = (0, import_react19.useRef)(null);
9398
+ (0, import_react19.useImperativeHandle)(ref, () => innerRef.current);
9399
+ (0, import_react19.useEffect)(() => {
9374
9400
  register(innerRef);
9375
9401
  return () => unregister();
9376
9402
  }, [register, unregister]);
@@ -9392,12 +9418,12 @@ var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ place
9392
9418
  props.onKeyDown?.(event);
9393
9419
  switch (event.key) {
9394
9420
  case "ArrowDown":
9395
- toggleOpen(true, { highlightStartPosition: "first" });
9421
+ toggleOpen(true, { highlightStartPositionBehavior: "first" });
9396
9422
  event.preventDefault();
9397
9423
  event.stopPropagation();
9398
9424
  break;
9399
9425
  case "ArrowUp":
9400
- toggleOpen(true, { highlightStartPosition: "last" });
9426
+ toggleOpen(true, { highlightStartPositionBehavior: "last" });
9401
9427
  event.preventDefault();
9402
9428
  event.stopPropagation();
9403
9429
  break;
@@ -9443,12 +9469,12 @@ var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ place
9443
9469
  }
9444
9470
  );
9445
9471
  });
9446
- var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
9472
+ var SelectChipDisplay = (0, import_react19.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
9447
9473
  const { state, trigger, item } = useSelectContext();
9448
9474
  const { register, unregister, toggleOpen } = trigger;
9449
- const innerRef = (0, import_react20.useRef)(null);
9450
- (0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
9451
- (0, import_react20.useEffect)(() => {
9475
+ const innerRef = (0, import_react19.useRef)(null);
9476
+ (0, import_react19.useImperativeHandle)(ref, () => innerRef.current);
9477
+ (0, import_react19.useEffect)(() => {
9452
9478
  register(innerRef);
9453
9479
  return () => unregister();
9454
9480
  }, [register, unregister]);
@@ -9491,10 +9517,10 @@ var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDispla
9491
9517
  onKeyDown: (event) => {
9492
9518
  switch (event.key) {
9493
9519
  case "ArrowDown":
9494
- toggleOpen(true, { highlightStartPosition: "first" });
9520
+ toggleOpen(true, { highlightStartPositionBehavior: "first" });
9495
9521
  break;
9496
9522
  case "ArrowUp":
9497
- toggleOpen(true, { highlightStartPosition: "last" });
9523
+ toggleOpen(true, { highlightStartPositionBehavior: "last" });
9498
9524
  }
9499
9525
  },
9500
9526
  size: "small",
@@ -9511,14 +9537,15 @@ var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDispla
9511
9537
  }
9512
9538
  );
9513
9539
  });
9514
- var SelectContent = (0, import_react20.forwardRef)(
9540
+ var SelectContent = (0, import_react19.forwardRef)(
9515
9541
  function SelectContent2({
9516
9542
  alignment,
9517
9543
  orientation = "vertical",
9544
+ containerClassName,
9518
9545
  ...props
9519
9546
  }, ref) {
9520
- const innerRef = (0, import_react20.useRef)(null);
9521
- (0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
9547
+ const innerRef = (0, import_react19.useRef)(null);
9548
+ (0, import_react19.useImperativeHandle)(ref, () => innerRef.current);
9522
9549
  const { trigger, state, config, item } = useSelectContext();
9523
9550
  const position = useFloatingElement({
9524
9551
  active: state.isOpen,
@@ -9531,81 +9558,88 @@ var SelectContent = (0, import_react20.forwardRef)(
9531
9558
  active: state.isOpen && !!position
9532
9559
  });
9533
9560
  return (0, import_react_dom2.createPortal)(
9534
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
9535
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9536
- "div",
9537
- {
9538
- hidden: !state.isOpen,
9539
- onClick: () => trigger.toggleOpen(false),
9540
- className: (0, import_clsx13.default)("fixed w-screen h-screen inset-0")
9541
- }
9542
- ),
9543
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9544
- "ul",
9545
- {
9546
- ...props,
9547
- id: `${state.id}-listbox`,
9548
- ref: innerRef,
9549
- hidden: !state.isOpen,
9550
- onKeyDown: (event) => {
9551
- switch (event.key) {
9552
- case "Escape":
9553
- trigger.toggleOpen(false);
9554
- event.preventDefault();
9555
- event.stopPropagation();
9556
- break;
9557
- case match(orientation, {
9558
- vertical: "ArrowDown",
9559
- horizontal: "ArrowUp"
9560
- }):
9561
- item.moveHighlightedIndex(1);
9562
- event.preventDefault();
9563
- break;
9564
- case match(orientation, {
9565
- vertical: "ArrowUp",
9566
- horizontal: "ArrowDown"
9567
- }):
9568
- item.moveHighlightedIndex(-1);
9569
- event.preventDefault();
9570
- break;
9571
- case "Home":
9572
- event.preventDefault();
9573
- break;
9574
- case "End":
9575
- event.preventDefault();
9576
- break;
9577
- case "Enter":
9578
- // Fall through
9579
- case " ":
9580
- if (state.highlightedValue) {
9581
- item.toggleSelection(state.highlightedValue);
9582
- if (!config.isMultiSelect) {
9561
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
9562
+ "div",
9563
+ {
9564
+ id: `select-container-${state.id}`,
9565
+ className: (0, import_clsx13.default)("fixed inset-0 w-screen h-screen", containerClassName),
9566
+ hidden: !state.isOpen,
9567
+ children: [
9568
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9569
+ "div",
9570
+ {
9571
+ id: `select-background-${state.id}`,
9572
+ onClick: () => trigger.toggleOpen(false),
9573
+ className: (0, import_clsx13.default)("fixed inset-0 w-screen h-screen")
9574
+ }
9575
+ ),
9576
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9577
+ "ul",
9578
+ {
9579
+ ...props,
9580
+ id: `${state.id}-listbox`,
9581
+ ref: innerRef,
9582
+ onKeyDown: (event) => {
9583
+ switch (event.key) {
9584
+ case "Escape":
9583
9585
  trigger.toggleOpen(false);
9584
- }
9585
- event.preventDefault();
9586
+ event.preventDefault();
9587
+ event.stopPropagation();
9588
+ break;
9589
+ case match(orientation, {
9590
+ vertical: "ArrowDown",
9591
+ horizontal: "ArrowUp"
9592
+ }):
9593
+ item.moveHighlightedIndex(1);
9594
+ event.preventDefault();
9595
+ break;
9596
+ case match(orientation, {
9597
+ vertical: "ArrowUp",
9598
+ horizontal: "ArrowDown"
9599
+ }):
9600
+ item.moveHighlightedIndex(-1);
9601
+ event.preventDefault();
9602
+ break;
9603
+ case "Home":
9604
+ event.preventDefault();
9605
+ break;
9606
+ case "End":
9607
+ event.preventDefault();
9608
+ break;
9609
+ case "Enter":
9610
+ // Fall through
9611
+ case " ":
9612
+ if (state.highlightedValue) {
9613
+ item.toggleSelection(state.highlightedValue);
9614
+ if (!config.isMultiSelect) {
9615
+ trigger.toggleOpen(false);
9616
+ }
9617
+ event.preventDefault();
9618
+ }
9619
+ break;
9586
9620
  }
9587
- break;
9621
+ },
9622
+ className: (0, import_clsx13.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
9623
+ style: {
9624
+ opacity: position ? void 0 : 0,
9625
+ position: "fixed",
9626
+ ...position
9627
+ },
9628
+ role: "listbox",
9629
+ "aria-multiselectable": config.isMultiSelect,
9630
+ "aria-orientation": orientation,
9631
+ tabIndex: position ? 0 : void 0,
9632
+ children: props.children
9588
9633
  }
9589
- },
9590
- className: (0, import_clsx13.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
9591
- style: {
9592
- opacity: position ? void 0 : 0,
9593
- position: "fixed",
9594
- ...position
9595
- },
9596
- role: "listbox",
9597
- "aria-multiselectable": config.isMultiSelect,
9598
- "aria-orientation": orientation,
9599
- tabIndex: position ? 0 : void 0,
9600
- children: props.children
9601
- }
9602
- )
9603
- ] }),
9634
+ )
9635
+ ]
9636
+ }
9637
+ ),
9604
9638
  document.body
9605
9639
  );
9606
9640
  }
9607
9641
  );
9608
- var Select = (0, import_react20.forwardRef)(function Select2({
9642
+ var Select = (0, import_react19.forwardRef)(function Select2({
9609
9643
  children,
9610
9644
  contentPanelProps,
9611
9645
  buttonProps,
@@ -9627,7 +9661,7 @@ var Select = (0, import_react20.forwardRef)(function Select2({
9627
9661
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
9628
9662
  ] });
9629
9663
  });
9630
- var SelectUncontrolled = (0, import_react20.forwardRef)(function SelectUncontrolled2({
9664
+ var SelectUncontrolled = (0, import_react19.forwardRef)(function SelectUncontrolled2({
9631
9665
  value: initialValue,
9632
9666
  onValueChanged,
9633
9667
  ...props
@@ -9643,7 +9677,7 @@ var SelectUncontrolled = (0, import_react20.forwardRef)(function SelectUncontrol
9643
9677
  }
9644
9678
  );
9645
9679
  });
9646
- var MultiSelect = (0, import_react20.forwardRef)(function MultiSelect2({
9680
+ var MultiSelect = (0, import_react19.forwardRef)(function MultiSelect2({
9647
9681
  children,
9648
9682
  contentPanelProps,
9649
9683
  buttonProps,
@@ -9654,7 +9688,7 @@ var MultiSelect = (0, import_react20.forwardRef)(function MultiSelect2({
9654
9688
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
9655
9689
  ] });
9656
9690
  });
9657
- var MultiSelectUncontrolled = (0, import_react20.forwardRef)(function MultiSelectUncontrolled2({
9691
+ var MultiSelectUncontrolled = (0, import_react19.forwardRef)(function MultiSelectUncontrolled2({
9658
9692
  values: initialValues,
9659
9693
  onValuesChanged,
9660
9694
  ...props
@@ -9670,7 +9704,7 @@ var MultiSelectUncontrolled = (0, import_react20.forwardRef)(function MultiSelec
9670
9704
  }
9671
9705
  );
9672
9706
  });
9673
- var MultiSelectChipDisplay = (0, import_react20.forwardRef)(function MultiSelectChipDisplay2({
9707
+ var MultiSelectChipDisplay = (0, import_react19.forwardRef)(function MultiSelectChipDisplay2({
9674
9708
  children,
9675
9709
  contentPanelProps,
9676
9710
  chipDisplayProps,
@@ -9681,7 +9715,7 @@ var MultiSelectChipDisplay = (0, import_react20.forwardRef)(function MultiSelect
9681
9715
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
9682
9716
  ] });
9683
9717
  });
9684
- var MultiSelectChipDisplayUncontrolled = (0, import_react20.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
9718
+ var MultiSelectChipDisplayUncontrolled = (0, import_react19.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
9685
9719
  values: initialValues,
9686
9720
  onValuesChanged,
9687
9721
  ...props
@@ -9754,7 +9788,7 @@ var import_lucide_react5 = require("lucide-react");
9754
9788
  var import_clsx14 = __toESM(require("clsx"));
9755
9789
 
9756
9790
  // src/theming/useTheme.tsx
9757
- var import_react21 = require("react");
9791
+ var import_react20 = require("react");
9758
9792
  var import_jsx_runtime19 = require("react/jsx-runtime");
9759
9793
  var themes = ["light", "dark", "system"];
9760
9794
  var defaultThemeTypeTranslation = {
@@ -9781,15 +9815,15 @@ var ThemeUtil = {
9781
9815
  themes,
9782
9816
  translation: defaultThemeTypeTranslation
9783
9817
  };
9784
- var ThemeContext = (0, import_react21.createContext)(null);
9818
+ var ThemeContext = (0, import_react20.createContext)(null);
9785
9819
  var ThemeProvider = ({ children, theme }) => {
9786
9820
  const {
9787
9821
  value: storedTheme,
9788
9822
  setValue: setStoredTheme,
9789
9823
  deleteValue: deleteStoredTheme
9790
9824
  } = useLocalStorage("theme", "system");
9791
- const [themePreference, setThemePreference] = (0, import_react21.useState)("system");
9792
- const resolvedTheme = (0, import_react21.useMemo)(() => {
9825
+ const [themePreference, setThemePreference] = (0, import_react20.useState)("system");
9826
+ const resolvedTheme = (0, import_react20.useMemo)(() => {
9793
9827
  if (theme && theme !== "system") {
9794
9828
  return theme;
9795
9829
  }
@@ -9801,7 +9835,7 @@ var ThemeProvider = ({ children, theme }) => {
9801
9835
  }
9802
9836
  return "light";
9803
9837
  }, [storedTheme, theme, themePreference]);
9804
- (0, import_react21.useEffect)(() => {
9838
+ (0, import_react20.useEffect)(() => {
9805
9839
  if (!theme) return;
9806
9840
  if (theme === "system") {
9807
9841
  deleteStoredTheme();
@@ -9809,18 +9843,18 @@ var ThemeProvider = ({ children, theme }) => {
9809
9843
  setStoredTheme(theme);
9810
9844
  }
9811
9845
  }, [theme]);
9812
- (0, import_react21.useEffect)(() => {
9846
+ (0, import_react20.useEffect)(() => {
9813
9847
  document.documentElement.setAttribute("data-theme", resolvedTheme);
9814
9848
  }, [resolvedTheme]);
9815
- const getPreference = (0, import_react21.useCallback)(() => {
9849
+ const getPreference = (0, import_react20.useCallback)(() => {
9816
9850
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
9817
9851
  const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
9818
9852
  setThemePreference(prefersDark ? "dark" : prefersLight ? "light" : "system");
9819
9853
  }, []);
9820
- (0, import_react21.useEffect)(() => {
9854
+ (0, import_react20.useEffect)(() => {
9821
9855
  getPreference();
9822
9856
  }, [getPreference]);
9823
- (0, import_react21.useEffect)(() => {
9857
+ (0, import_react20.useEffect)(() => {
9824
9858
  const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
9825
9859
  const lightQuery = window.matchMedia("(prefers-color-scheme: light)");
9826
9860
  const noPrefQuery = window.matchMedia("(prefers-color-scheme: no-preference)");
@@ -9840,7 +9874,7 @@ var ThemeProvider = ({ children, theme }) => {
9840
9874
  theme: storedTheme,
9841
9875
  resolvedTheme,
9842
9876
  setTheme: (newTheme) => {
9843
- if (theme) {
9877
+ if (theme && theme !== "system") {
9844
9878
  console.warn("ThemeProvider: Attempting to change the theme while setting a fixed theme won't have any effect. Change the theme provided to the ThemeProvider instead.");
9845
9879
  }
9846
9880
  setStoredTheme(newTheme);
@@ -9851,7 +9885,7 @@ var ThemeProvider = ({ children, theme }) => {
9851
9885
  );
9852
9886
  };
9853
9887
  var useTheme = () => {
9854
- const context = (0, import_react21.useContext)(ThemeContext);
9888
+ const context = (0, import_react20.useContext)(ThemeContext);
9855
9889
  if (!context) {
9856
9890
  throw new Error("useTheme must be used within ThemeContext. Try adding a ThemeProvider around your app.");
9857
9891
  }
@@ -9923,7 +9957,7 @@ var ThemeDialog = ({
9923
9957
  };
9924
9958
 
9925
9959
  // src/components/form/FormElementWrapper.tsx
9926
- var import_react22 = require("react");
9960
+ var import_react21 = require("react");
9927
9961
  var import_clsx16 = require("clsx");
9928
9962
 
9929
9963
  // src/components/user-action/Label.tsx
@@ -9961,7 +9995,7 @@ var FormElementWrapper = ({
9961
9995
  containerClassName
9962
9996
  }) => {
9963
9997
  const [touched, setTouched] = useOverwritableState(initialIsShowingError, onIsShowingError);
9964
- const generatedId = (0, import_react22.useId)();
9998
+ const generatedId = (0, import_react21.useId)();
9965
9999
  const usedId = id ?? generatedId;
9966
10000
  const errorId = `${usedId}-description`;
9967
10001
  const labelId = `${usedId}-label`;
@@ -10032,7 +10066,7 @@ var FormElementWrapper = ({
10032
10066
 
10033
10067
  // src/components/icons-and-geometry/Avatar.tsx
10034
10068
  var import_clsx17 = __toESM(require("clsx"));
10035
- var import_react23 = require("react");
10069
+ var import_react22 = require("react");
10036
10070
  var import_lucide_react6 = require("lucide-react");
10037
10071
 
10038
10072
  // node_modules/@radix-ui/react-avatar/dist/index.mjs
@@ -10431,7 +10465,7 @@ var Avatar2 = ({ image, name, size = "md", fullyRounded, className = "" }) => {
10431
10465
  maxHeight: pixels
10432
10466
  };
10433
10467
  const textClassName = textClassNameMapping[size];
10434
- const displayName = (0, import_react23.useMemo)(() => {
10468
+ const displayName = (0, import_react22.useMemo)(() => {
10435
10469
  const maxLetters = size === "sm" ? 1 : 2;
10436
10470
  return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
10437
10471
  }, [name, size]);
@@ -10531,7 +10565,7 @@ var Circle = ({
10531
10565
  };
10532
10566
 
10533
10567
  // src/components/icons-and-geometry/Ring.tsx
10534
- var import_react24 = require("react");
10568
+ var import_react23 = require("react");
10535
10569
  var import_clsx19 = __toESM(require("clsx"));
10536
10570
  var import_jsx_runtime29 = require("react/jsx-runtime");
10537
10571
  var Ring = ({
@@ -10560,9 +10594,9 @@ var AnimatedRing = ({
10560
10594
  onAnimationFinished,
10561
10595
  style
10562
10596
  }) => {
10563
- const [currentWidth, setCurrentWidth] = (0, import_react24.useState)(0);
10597
+ const [currentWidth, setCurrentWidth] = (0, import_react23.useState)(0);
10564
10598
  const milliseconds = 1e3 * fillAnimationDuration;
10565
- const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
10599
+ const animate = (0, import_react23.useCallback)((timestamp, startTime) => {
10566
10600
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
10567
10601
  const newWidth = Math.min(width * progress, width);
10568
10602
  setCurrentWidth(newWidth);
@@ -10576,7 +10610,7 @@ var AnimatedRing = ({
10576
10610
  }
10577
10611
  }
10578
10612
  }, [milliseconds, onAnimationFinished, repeating, width]);
10579
- (0, import_react24.useEffect)(() => {
10613
+ (0, import_react23.useEffect)(() => {
10580
10614
  if (currentWidth < width) {
10581
10615
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
10582
10616
  }
@@ -10611,10 +10645,10 @@ var RingWave = ({
10611
10645
  onAnimationFinished,
10612
10646
  style
10613
10647
  }) => {
10614
- const [currentInnerSize, setCurrentInnerSize] = (0, import_react24.useState)(startInnerSize);
10648
+ const [currentInnerSize, setCurrentInnerSize] = (0, import_react23.useState)(startInnerSize);
10615
10649
  const distance = endInnerSize - startInnerSize;
10616
10650
  const milliseconds = 1e3 * fillAnimationDuration;
10617
- const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
10651
+ const animate = (0, import_react23.useCallback)((timestamp, startTime) => {
10618
10652
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
10619
10653
  const newInnerSize = Math.min(
10620
10654
  startInnerSize + distance * progress,
@@ -10631,7 +10665,7 @@ var RingWave = ({
10631
10665
  }
10632
10666
  }
10633
10667
  }, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
10634
- (0, import_react24.useEffect)(() => {
10668
+ (0, import_react23.useEffect)(() => {
10635
10669
  if (currentInnerSize < endInnerSize) {
10636
10670
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
10637
10671
  }
@@ -10666,7 +10700,7 @@ var RadialRings = ({
10666
10700
  sizeCircle2 = 200,
10667
10701
  sizeCircle3 = 300
10668
10702
  }) => {
10669
- const [currentRing, setCurrentRing] = (0, import_react24.useState)(0);
10703
+ const [currentRing, setCurrentRing] = (0, import_react23.useState)(0);
10670
10704
  const size = sizeCircle3;
10671
10705
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
10672
10706
  "div",
@@ -10815,13 +10849,13 @@ var TagIcon = ({
10815
10849
  };
10816
10850
 
10817
10851
  // src/components/layout/Carousel.tsx
10818
- var import_react25 = require("react");
10852
+ var import_react24 = require("react");
10819
10853
  var import_clsx20 = __toESM(require("clsx"));
10820
10854
  var import_lucide_react7 = require("lucide-react");
10821
10855
  var import_jsx_runtime31 = require("react/jsx-runtime");
10822
- var CarouselContext = (0, import_react25.createContext)(null);
10856
+ var CarouselContext = (0, import_react24.createContext)(null);
10823
10857
  var useCarouselContext = () => {
10824
- const context = (0, import_react25.useContext)(CarouselContext);
10858
+ const context = (0, import_react24.useContext)(CarouselContext);
10825
10859
  if (!context) {
10826
10860
  console.error("useCarouselContext must be used within CarouselContext");
10827
10861
  }
@@ -10844,7 +10878,7 @@ function CarouselTabs({
10844
10878
  defaultCarouselTabTranslationType
10845
10879
  ]);
10846
10880
  const { id, slideCount, currentIndex, isLooping } = useCarouselContext();
10847
- const tabRefs = (0, import_react25.useRef)([]);
10881
+ const tabRefs = (0, import_react24.useRef)([]);
10848
10882
  const handleKeyDown = (event, index) => {
10849
10883
  let newIndex = index;
10850
10884
  if (event.key === "ArrowRight") {
@@ -10904,7 +10938,7 @@ var defaultCarouselSlideTranslationType = {
10904
10938
  slideOf: `Slide {{index}} von {{length}} slides`
10905
10939
  }
10906
10940
  };
10907
- var CarouselSlide = (0, import_react25.forwardRef)(
10941
+ var CarouselSlide = (0, import_react24.forwardRef)(
10908
10942
  function CarouselSlide2({
10909
10943
  index,
10910
10944
  ...props
@@ -10964,17 +10998,17 @@ var Carousel = ({
10964
10998
  ...props
10965
10999
  }) => {
10966
11000
  const translation = useTranslation([defaultCarouselTranslationType]);
10967
- const slideRefs = (0, import_react25.useRef)([]);
10968
- const [currentIndex, setCurrentIndex] = (0, import_react25.useState)(0);
10969
- const [hasFocus, setHasFocus] = (0, import_react25.useState)(false);
10970
- const [dragState, setDragState] = (0, import_react25.useState)();
11001
+ const slideRefs = (0, import_react24.useRef)([]);
11002
+ const [currentIndex, setCurrentIndex] = (0, import_react24.useState)(0);
11003
+ const [hasFocus, setHasFocus] = (0, import_react24.useState)(false);
11004
+ const [dragState, setDragState] = (0, import_react24.useState)();
10971
11005
  const isPaused = hasFocus;
10972
- const carouselContainerRef = (0, import_react25.useRef)(null);
10973
- const [disableClick, setDisableClick] = (0, import_react25.useState)(false);
10974
- const timeOut = (0, import_react25.useRef)(void 0);
10975
- const length = (0, import_react25.useMemo)(() => children.length, [children]);
11006
+ const carouselContainerRef = (0, import_react24.useRef)(null);
11007
+ const [disableClick, setDisableClick] = (0, import_react24.useState)(false);
11008
+ const timeOut = (0, import_react24.useRef)(void 0);
11009
+ const length = (0, import_react24.useMemo)(() => children.length, [children]);
10976
11010
  const paddingItemCount = 3;
10977
- const generatedId = "carousel" + (0, import_react25.useId)();
11011
+ const generatedId = "carousel" + (0, import_react24.useId)();
10978
11012
  const id = props.id ?? generatedId;
10979
11013
  if (isAutoPlaying && !isLooping) {
10980
11014
  console.error("When isAutoLooping is true, isLooping should also be true");
@@ -10983,7 +11017,7 @@ var Carousel = ({
10983
11017
  autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
10984
11018
  animationTime = Math.max(100, animationTime);
10985
11019
  autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
10986
- (0, import_react25.useEffect)(() => {
11020
+ (0, import_react24.useEffect)(() => {
10987
11021
  const carousel = carouselContainerRef.current;
10988
11022
  if (carousel) {
10989
11023
  let onFocus = function() {
@@ -11006,7 +11040,7 @@ var Carousel = ({
11006
11040
  const canGoLeft = () => {
11007
11041
  return isLooping || currentIndex !== 0;
11008
11042
  };
11009
- const canGoRight = (0, import_react25.useCallback)(() => {
11043
+ const canGoRight = (0, import_react24.useCallback)(() => {
11010
11044
  return isLooping || currentIndex !== length - 1;
11011
11045
  }, [currentIndex, isLooping, length]);
11012
11046
  const left = () => {
@@ -11014,12 +11048,12 @@ var Carousel = ({
11014
11048
  setCurrentIndex(currentIndex - 1);
11015
11049
  }
11016
11050
  };
11017
- const right = (0, import_react25.useCallback)(() => {
11051
+ const right = (0, import_react24.useCallback)(() => {
11018
11052
  if (canGoRight()) {
11019
11053
  setCurrentIndex((currentIndex + length + 1) % length);
11020
11054
  }
11021
11055
  }, [canGoRight, currentIndex, length]);
11022
- (0, import_react25.useEffect)(() => {
11056
+ (0, import_react24.useEffect)(() => {
11023
11057
  if (!timeOut.current && !isPaused) {
11024
11058
  if (autoLoopingTimeOut > 0) {
11025
11059
  timeOut.current = setTimeout(() => {
@@ -11071,7 +11105,7 @@ var Carousel = ({
11071
11105
  }
11072
11106
  setDragState(void 0);
11073
11107
  };
11074
- (0, import_react25.useEffect)(() => {
11108
+ (0, import_react24.useEffect)(() => {
11075
11109
  setDisableClick(!dragState);
11076
11110
  }, [dragState]);
11077
11111
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
@@ -11462,11 +11496,11 @@ var FAQSection = ({
11462
11496
  };
11463
11497
 
11464
11498
  // src/components/layout/FloatingContainer.tsx
11465
- var import_react26 = require("react");
11499
+ var import_react25 = require("react");
11466
11500
  var import_react_dom3 = require("react-dom");
11467
11501
  var import_clsx23 = require("clsx");
11468
11502
  var import_jsx_runtime35 = require("react/jsx-runtime");
11469
- var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContainer2({
11503
+ var FloatingContainer = (0, import_react25.forwardRef)(function FloatingContainer2({
11470
11504
  children,
11471
11505
  backgroundOverlay,
11472
11506
  anchor,
@@ -11478,8 +11512,8 @@ var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContaine
11478
11512
  gap = 4,
11479
11513
  ...props
11480
11514
  }, forwardRef17) {
11481
- const innerRef = (0, import_react26.useRef)(null);
11482
- (0, import_react26.useImperativeHandle)(forwardRef17, () => innerRef.current);
11515
+ const innerRef = (0, import_react25.useRef)(null);
11516
+ (0, import_react25.useImperativeHandle)(forwardRef17, () => innerRef.current);
11483
11517
  const position = useFloatingElement({
11484
11518
  active: !props.hidden,
11485
11519
  containerRef: innerRef,
@@ -11519,18 +11553,18 @@ var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContaine
11519
11553
  });
11520
11554
 
11521
11555
  // src/components/layout/ListBox.tsx
11522
- var import_react27 = __toESM(require("react"));
11556
+ var import_react26 = __toESM(require("react"));
11523
11557
  var import_clsx24 = require("clsx");
11524
11558
  var import_jsx_runtime36 = require("react/jsx-runtime");
11525
- var ListBoxContext = (0, import_react27.createContext)(null);
11559
+ var ListBoxContext = (0, import_react26.createContext)(null);
11526
11560
  function useListBoxContext() {
11527
- const ctx = (0, import_react27.useContext)(ListBoxContext);
11561
+ const ctx = (0, import_react26.useContext)(ListBoxContext);
11528
11562
  if (!ctx) {
11529
11563
  throw new Error("ListBoxItem must be used within a ListBoxPrimitive");
11530
11564
  }
11531
11565
  return ctx;
11532
11566
  }
11533
- var ListBoxItem = (0, import_react27.forwardRef)(
11567
+ var ListBoxItem = (0, import_react26.forwardRef)(
11534
11568
  function ListBoxItem2({ value, disabled = false, children, className, ...rest }, ref) {
11535
11569
  const {
11536
11570
  registerItem,
@@ -11540,9 +11574,9 @@ var ListBoxItem = (0, import_react27.forwardRef)(
11540
11574
  onItemClick,
11541
11575
  isSelected
11542
11576
  } = useListBoxContext();
11543
- const itemRef = (0, import_react27.useRef)(null);
11544
- const id = import_react27.default.useId();
11545
- (0, import_react27.useEffect)(() => {
11577
+ const itemRef = (0, import_react26.useRef)(null);
11578
+ const id = import_react26.default.useId();
11579
+ (0, import_react26.useEffect)(() => {
11546
11580
  registerItem({ id, value, disabled, ref: itemRef });
11547
11581
  return () => unregisterItem(id);
11548
11582
  }, [id, value, disabled, registerItem, unregisterItem]);
@@ -11584,7 +11618,7 @@ var ListBoxItem = (0, import_react27.forwardRef)(
11584
11618
  );
11585
11619
  }
11586
11620
  );
11587
- var ListBoxPrimitive = (0, import_react27.forwardRef)(
11621
+ var ListBoxPrimitive = (0, import_react26.forwardRef)(
11588
11622
  function ListBoxPrimitive2({
11589
11623
  value,
11590
11624
  onSelectionChanged,
@@ -11594,9 +11628,9 @@ var ListBoxPrimitive = (0, import_react27.forwardRef)(
11594
11628
  orientation = "vertical",
11595
11629
  ...props
11596
11630
  }, ref) {
11597
- const itemsRef = (0, import_react27.useRef)([]);
11598
- const [highlightedIndex, setHighlightedIndex] = (0, import_react27.useState)(void 0);
11599
- const registerItem = (0, import_react27.useCallback)((item) => {
11631
+ const itemsRef = (0, import_react26.useRef)([]);
11632
+ const [highlightedIndex, setHighlightedIndex] = (0, import_react26.useState)(void 0);
11633
+ const registerItem = (0, import_react26.useCallback)((item) => {
11600
11634
  itemsRef.current.push(item);
11601
11635
  itemsRef.current.sort((a, b) => {
11602
11636
  const aEl = a.ref.current;
@@ -11605,14 +11639,14 @@ var ListBoxPrimitive = (0, import_react27.forwardRef)(
11605
11639
  return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
11606
11640
  });
11607
11641
  }, []);
11608
- const unregisterItem = (0, import_react27.useCallback)((id) => {
11642
+ const unregisterItem = (0, import_react26.useCallback)((id) => {
11609
11643
  itemsRef.current = itemsRef.current.filter((i) => i.id !== id);
11610
11644
  }, []);
11611
- const isSelected = (0, import_react27.useCallback)(
11645
+ const isSelected = (0, import_react26.useCallback)(
11612
11646
  (val) => (value ?? []).includes(val),
11613
11647
  [value]
11614
11648
  );
11615
- const onItemClickedHandler = (0, import_react27.useCallback)(
11649
+ const onItemClickedHandler = (0, import_react26.useCallback)(
11616
11650
  (id) => {
11617
11651
  const index = itemsRef.current.findIndex((i) => i.id === id);
11618
11652
  if (index === -1) {
@@ -11636,13 +11670,13 @@ var ListBoxPrimitive = (0, import_react27.forwardRef)(
11636
11670
  },
11637
11671
  [onItemClicked, isSelection, isMultiple, onSelectionChanged, isSelected, value]
11638
11672
  );
11639
- const setHighlightedId = (0, import_react27.useCallback)((id) => {
11673
+ const setHighlightedId = (0, import_react26.useCallback)((id) => {
11640
11674
  const index = itemsRef.current.findIndex((i) => i.id === id);
11641
11675
  if (index !== -1) {
11642
11676
  setHighlightedIndex(index);
11643
11677
  }
11644
11678
  }, []);
11645
- (0, import_react27.useEffect)(() => {
11679
+ (0, import_react26.useEffect)(() => {
11646
11680
  if (highlightedIndex !== void 0) {
11647
11681
  itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
11648
11682
  }
@@ -11747,7 +11781,7 @@ var ListBoxMultipleUncontrolled = ({
11747
11781
  }
11748
11782
  );
11749
11783
  };
11750
- var ListBox = (0, import_react27.forwardRef)(function ListBox2({
11784
+ var ListBox = (0, import_react26.forwardRef)(function ListBox2({
11751
11785
  value,
11752
11786
  onSelectionChanged,
11753
11787
  ...props
@@ -12881,7 +12915,7 @@ var ErrorComponent = ({
12881
12915
  };
12882
12916
 
12883
12917
  // src/components/loading-states/LoadingAndErrorComponent.tsx
12884
- var import_react28 = require("react");
12918
+ var import_react27 = require("react");
12885
12919
 
12886
12920
  // src/components/loading-states/LoadingContainer.tsx
12887
12921
  var import_clsx28 = require("clsx");
@@ -12902,8 +12936,8 @@ var LoadingAndErrorComponent = ({
12902
12936
  minimumLoadingDuration = 200,
12903
12937
  className
12904
12938
  }) => {
12905
- const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react28.useState)(false);
12906
- const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react28.useState)(false);
12939
+ const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react27.useState)(false);
12940
+ const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react27.useState)(false);
12907
12941
  if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
12908
12942
  setIsInMinimumLoading(true);
12909
12943
  setTimeout(() => {
@@ -13005,13 +13039,13 @@ var ProgressIndicator = ({
13005
13039
  // src/components/navigation/BreadCrumb.tsx
13006
13040
  var import_link = __toESM(require_link2());
13007
13041
  var import_clsx32 = __toESM(require("clsx"));
13008
- var import_react29 = require("react");
13042
+ var import_react28 = require("react");
13009
13043
  var import_jsx_runtime48 = require("react/jsx-runtime");
13010
13044
  var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
13011
13045
  const color = "text-description";
13012
13046
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: (0, import_clsx32.default)("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
13013
13047
  const isLast = index === crumbs.length - 1;
13014
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react29.Fragment, { children: [
13048
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react28.Fragment, { children: [
13015
13049
  /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
13016
13050
  import_link.default,
13017
13051
  {
@@ -13027,8 +13061,8 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
13027
13061
 
13028
13062
  // src/components/navigation/Navigation.tsx
13029
13063
  var import_lucide_react9 = require("lucide-react");
13064
+ var import_react29 = require("react");
13030
13065
  var import_react30 = require("react");
13031
- var import_react31 = require("react");
13032
13066
  var import_link2 = __toESM(require_link2());
13033
13067
  var import_clsx33 = __toESM(require("clsx"));
13034
13068
  var import_jsx_runtime49 = require("react/jsx-runtime");
@@ -13041,10 +13075,10 @@ var NavigationItemWithSubItem = ({
13041
13075
  horizontalAlignment = "center",
13042
13076
  ...options
13043
13077
  }) => {
13044
- const [isOpen, setOpen] = (0, import_react31.useState)(false);
13045
- const containerRef = (0, import_react31.useRef)();
13046
- const triggerRef = (0, import_react31.useRef)(null);
13047
- const id = (0, import_react31.useId)();
13078
+ const [isOpen, setOpen] = (0, import_react30.useState)(false);
13079
+ const containerRef = (0, import_react30.useRef)();
13080
+ const triggerRef = (0, import_react30.useRef)(null);
13081
+ const id = (0, import_react30.useId)();
13048
13082
  const style = useFloatingElement({
13049
13083
  active: isOpen,
13050
13084
  containerRef,
@@ -13052,7 +13086,7 @@ var NavigationItemWithSubItem = ({
13052
13086
  horizontalAlignment,
13053
13087
  ...options
13054
13088
  });
13055
- const onBlur = (0, import_react31.useCallback)((event) => {
13089
+ const onBlur = (0, import_react30.useCallback)((event) => {
13056
13090
  const nextFocus = event.relatedTarget;
13057
13091
  if (!containerRef.current?.contains(nextFocus) && !triggerRef.current?.contains(nextFocus)) {
13058
13092
  setOpen(false);
@@ -13106,10 +13140,10 @@ var NavigationItemList = ({ items, ...restProps }) => {
13106
13140
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("nav", { ...restProps, className: (0, import_clsx33.default)("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("li", { children: isSubItem(item) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
13107
13141
  };
13108
13142
  var Navigation = ({ ...props }) => {
13109
- const [isMobileOpen, setIsMobileOpen] = (0, import_react31.useState)(false);
13110
- const id = (0, import_react31.useId)();
13111
- const menuRef = (0, import_react31.useRef)(null);
13112
- (0, import_react30.useEffect)(() => {
13143
+ const [isMobileOpen, setIsMobileOpen] = (0, import_react30.useState)(false);
13144
+ const id = (0, import_react30.useId)();
13145
+ const menuRef = (0, import_react30.useRef)(null);
13146
+ (0, import_react29.useEffect)(() => {
13113
13147
  menuRef.current?.focus();
13114
13148
  }, [isMobileOpen]);
13115
13149
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
@@ -13164,7 +13198,7 @@ var Navigation = ({ ...props }) => {
13164
13198
  // src/components/navigation/Pagination.tsx
13165
13199
  var import_lucide_react10 = require("lucide-react");
13166
13200
  var import_clsx34 = __toESM(require("clsx"));
13167
- var import_react32 = require("react");
13201
+ var import_react31 = require("react");
13168
13202
  var import_jsx_runtime50 = require("react/jsx-runtime");
13169
13203
  var Pagination = ({
13170
13204
  overwriteTranslation,
@@ -13175,11 +13209,11 @@ var Pagination = ({
13175
13209
  style
13176
13210
  }) => {
13177
13211
  const translation = useTranslation([formTranslation], overwriteTranslation);
13178
- const [value, setValue] = (0, import_react32.useState)((pageIndex + 1).toString());
13212
+ const [value, setValue] = (0, import_react31.useState)((pageIndex + 1).toString());
13179
13213
  const noPages = pageCount === 0;
13180
13214
  const onFirstPage = pageIndex === 0 && !noPages;
13181
13215
  const onLastPage = pageIndex === pageCount - 1;
13182
- (0, import_react32.useEffect)(() => {
13216
+ (0, import_react31.useEffect)(() => {
13183
13217
  if (noPages) {
13184
13218
  setValue("0");
13185
13219
  } else {
@@ -13858,7 +13892,7 @@ var PropertyBase = ({
13858
13892
  };
13859
13893
 
13860
13894
  // src/components/properties/CheckboxProperty.tsx
13861
- var import_react33 = require("react");
13895
+ var import_react32 = require("react");
13862
13896
  var import_jsx_runtime55 = require("react/jsx-runtime");
13863
13897
  var CheckboxProperty = ({
13864
13898
  overwriteTranslation,
@@ -13868,7 +13902,7 @@ var CheckboxProperty = ({
13868
13902
  ...baseProps
13869
13903
  }) => {
13870
13904
  const translation = useTranslation([formTranslation], overwriteTranslation);
13871
- const id = (0, import_react33.useId)();
13905
+ const id = (0, import_react32.useId)();
13872
13906
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
13873
13907
  PropertyBase,
13874
13908
  {
@@ -14091,10 +14125,10 @@ var import_lucide_react19 = require("lucide-react");
14091
14125
  var import_clsx43 = __toESM(require("clsx"));
14092
14126
 
14093
14127
  // src/components/user-action/Textarea.tsx
14094
- var import_react34 = require("react");
14128
+ var import_react33 = require("react");
14095
14129
  var import_clsx42 = __toESM(require("clsx"));
14096
14130
  var import_jsx_runtime60 = require("react/jsx-runtime");
14097
- var Textarea = (0, import_react34.forwardRef)(function Textarea2({
14131
+ var Textarea = (0, import_react33.forwardRef)(function Textarea2({
14098
14132
  id,
14099
14133
  onChange,
14100
14134
  onChangeText,
@@ -14168,7 +14202,7 @@ var TextareaWithHeadline = ({
14168
14202
  containerClassName,
14169
14203
  ...props
14170
14204
  }) => {
14171
- const genId = (0, import_react34.useId)();
14205
+ const genId = (0, import_react33.useId)();
14172
14206
  const usedId = id ?? genId;
14173
14207
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
14174
14208
  "div",
@@ -14283,7 +14317,7 @@ var TableFilters = {
14283
14317
  };
14284
14318
 
14285
14319
  // src/components/table/Table.tsx
14286
- var import_react40 = require("react");
14320
+ var import_react39 = require("react");
14287
14321
  var import_clsx48 = __toESM(require("clsx"));
14288
14322
  var import_react_table = require("@tanstack/react-table");
14289
14323
  var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
@@ -14299,9 +14333,9 @@ var TableCell = ({
14299
14333
  };
14300
14334
 
14301
14335
  // src/hooks/useResizeCallbackWrapper.ts
14302
- var import_react35 = require("react");
14336
+ var import_react34 = require("react");
14303
14337
  var useResizeCallbackWrapper = (callback) => {
14304
- (0, import_react35.useEffect)(() => {
14338
+ (0, import_react34.useEffect)(() => {
14305
14339
  window.addEventListener("resize", callback);
14306
14340
  return () => {
14307
14341
  window.removeEventListener("resize", callback);
@@ -14344,7 +14378,7 @@ var TableSortButton = ({
14344
14378
  var import_lucide_react21 = require("lucide-react");
14345
14379
 
14346
14380
  // src/components/user-action/Menu.tsx
14347
- var import_react38 = require("react");
14381
+ var import_react37 = require("react");
14348
14382
  var import_clsx47 = __toESM(require("clsx"));
14349
14383
 
14350
14384
  // src/utils/bagFunctions.ts
@@ -14416,15 +14450,15 @@ var usePopoverPosition = (trigger, options) => {
14416
14450
  };
14417
14451
 
14418
14452
  // src/hooks/useHoverState.ts
14419
- var import_react36 = require("react");
14453
+ var import_react35 = require("react");
14420
14454
  var defaultUseHoverStateProps = {
14421
14455
  closingDelay: 200,
14422
14456
  isDisabled: false
14423
14457
  };
14424
14458
  var useHoverState = (props = void 0) => {
14425
14459
  const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
14426
- const [isHovered, setIsHovered] = (0, import_react36.useState)(false);
14427
- const [timer, setTimer] = (0, import_react36.useState)();
14460
+ const [isHovered, setIsHovered] = (0, import_react35.useState)(false);
14461
+ const [timer, setTimer] = (0, import_react35.useState)();
14428
14462
  const onMouseEnter = () => {
14429
14463
  if (isDisabled) {
14430
14464
  return;
@@ -14440,14 +14474,14 @@ var useHoverState = (props = void 0) => {
14440
14474
  setIsHovered(false);
14441
14475
  }, closingDelay));
14442
14476
  };
14443
- (0, import_react36.useEffect)(() => {
14477
+ (0, import_react35.useEffect)(() => {
14444
14478
  if (timer) {
14445
14479
  return () => {
14446
14480
  clearTimeout(timer);
14447
14481
  };
14448
14482
  }
14449
14483
  });
14450
- (0, import_react36.useEffect)(() => {
14484
+ (0, import_react35.useEffect)(() => {
14451
14485
  if (timer) {
14452
14486
  clearTimeout(timer);
14453
14487
  }
@@ -14460,9 +14494,9 @@ var useHoverState = (props = void 0) => {
14460
14494
  };
14461
14495
 
14462
14496
  // src/hooks/useOutsideClick.ts
14463
- var import_react37 = require("react");
14497
+ var import_react36 = require("react");
14464
14498
  var useOutsideClick = (refs, handler) => {
14465
- (0, import_react37.useEffect)(() => {
14499
+ (0, import_react36.useEffect)(() => {
14466
14500
  const listener = (event) => {
14467
14501
  if (event.target === null) return;
14468
14502
  if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
@@ -14520,10 +14554,10 @@ var Menu = ({
14520
14554
  menuClassName = ""
14521
14555
  }) => {
14522
14556
  const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
14523
- const triggerRef = (0, import_react38.useRef)(null);
14524
- const menuRef = (0, import_react38.useRef)(null);
14557
+ const triggerRef = (0, import_react37.useRef)(null);
14558
+ const menuRef = (0, import_react37.useRef)(null);
14525
14559
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
14526
- const [isHidden, setIsHidden] = (0, import_react38.useState)(true);
14560
+ const [isHidden, setIsHidden] = (0, import_react37.useState)(true);
14527
14561
  const bag = {
14528
14562
  isOpen,
14529
14563
  close: () => setIsOpen(false),
@@ -14534,7 +14568,7 @@ var Menu = ({
14534
14568
  triggerRef.current?.getBoundingClientRect(),
14535
14569
  { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
14536
14570
  );
14537
- (0, import_react38.useEffect)(() => {
14571
+ (0, import_react37.useEffect)(() => {
14538
14572
  if (!isOpen) return;
14539
14573
  const triggerEl = triggerRef.current;
14540
14574
  if (!triggerEl) return;
@@ -14551,7 +14585,7 @@ var Menu = ({
14551
14585
  window.removeEventListener("resize", close);
14552
14586
  };
14553
14587
  }, [isOpen, setIsOpen]);
14554
- (0, import_react38.useEffect)(() => {
14588
+ (0, import_react37.useEffect)(() => {
14555
14589
  if (isOpen) {
14556
14590
  setIsHidden(false);
14557
14591
  }
@@ -14587,7 +14621,7 @@ var Menu = ({
14587
14621
  };
14588
14622
 
14589
14623
  // src/components/table/TableFilterButton.tsx
14590
- var import_react39 = require("react");
14624
+ var import_react38 = require("react");
14591
14625
  var import_jsx_runtime66 = require("react/jsx-runtime");
14592
14626
  var defaultTableFilterTranslation = {
14593
14627
  en: {
@@ -14613,9 +14647,9 @@ var TableFilterButton = ({
14613
14647
  }) => {
14614
14648
  const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
14615
14649
  const columnFilterValue = column.getFilterValue();
14616
- const [filterValue, setFilterValue] = (0, import_react39.useState)(columnFilterValue);
14650
+ const [filterValue, setFilterValue] = (0, import_react38.useState)(columnFilterValue);
14617
14651
  const hasFilter = !!filterValue;
14618
- (0, import_react39.useEffect)(() => {
14652
+ (0, import_react38.useEffect)(() => {
14619
14653
  setFilterValue(columnFilterValue);
14620
14654
  }, [columnFilterValue]);
14621
14655
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
@@ -14729,22 +14763,22 @@ var Table = ({
14729
14763
  columns,
14730
14764
  ...tableOptions
14731
14765
  }) => {
14732
- const ref = (0, import_react40.useRef)(null);
14733
- const tableRef = (0, import_react40.useRef)(null);
14734
- const [columnSizing, setColumnSizing] = (0, import_react40.useState)(columns.reduce((previousValue, currentValue) => {
14766
+ const ref = (0, import_react39.useRef)(null);
14767
+ const tableRef = (0, import_react39.useRef)(null);
14768
+ const [columnSizing, setColumnSizing] = (0, import_react39.useState)(columns.reduce((previousValue, currentValue) => {
14735
14769
  return {
14736
14770
  ...previousValue,
14737
14771
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
14738
14772
  };
14739
14773
  }, {}));
14740
- const [columnSizingInfo, setColumnSizingInfo] = (0, import_react40.useState)();
14741
- const [pagination, setPagination] = (0, import_react40.useState)({
14774
+ const [columnSizingInfo, setColumnSizingInfo] = (0, import_react39.useState)();
14775
+ const [pagination, setPagination] = (0, import_react39.useState)({
14742
14776
  pageSize: 10,
14743
14777
  pageIndex: 0,
14744
14778
  ...initialState?.pagination
14745
14779
  });
14746
- const [columnFilters, setColumnFilters] = (0, import_react40.useState)(initialState?.columnFilters);
14747
- const computedColumnMinWidths = (0, import_react40.useMemo)(() => {
14780
+ const [columnFilters, setColumnFilters] = (0, import_react39.useState)(initialState?.columnFilters);
14781
+ const computedColumnMinWidths = (0, import_react39.useMemo)(() => {
14748
14782
  return columns.reduce((previousValue, column) => {
14749
14783
  return {
14750
14784
  ...previousValue,
@@ -14753,7 +14787,7 @@ var Table = ({
14753
14787
  };
14754
14788
  }, {});
14755
14789
  }, [columns, defaultColumn]);
14756
- const computedColumnMaxWidths = (0, import_react40.useMemo)(() => {
14790
+ const computedColumnMaxWidths = (0, import_react39.useMemo)(() => {
14757
14791
  return columns.reduce((previousValue, column) => {
14758
14792
  return {
14759
14793
  ...previousValue,
@@ -14761,12 +14795,12 @@ var Table = ({
14761
14795
  };
14762
14796
  }, {});
14763
14797
  }, [columns, defaultColumn]);
14764
- const tableMinWidth = (0, import_react40.useMemo)(() => {
14798
+ const tableMinWidth = (0, import_react39.useMemo)(() => {
14765
14799
  return columns.reduce((sum, column) => {
14766
14800
  return sum + computedColumnMinWidths[column.id];
14767
14801
  }, 0);
14768
14802
  }, [columns, computedColumnMinWidths]);
14769
- const updateColumnSizes = (0, import_react40.useMemo)(() => {
14803
+ const updateColumnSizes = (0, import_react39.useMemo)(() => {
14770
14804
  return (previous) => {
14771
14805
  const updateSizing = {
14772
14806
  ...columnSizing,
@@ -14883,18 +14917,18 @@ var Table = ({
14883
14917
  columnResizeMode: "onChange",
14884
14918
  ...tableOptions
14885
14919
  });
14886
- const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react40.useState)(false);
14887
- (0, import_react40.useEffect)(() => {
14920
+ const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react39.useState)(false);
14921
+ (0, import_react39.useEffect)(() => {
14888
14922
  if (!hasInitializedSizing && ref.current) {
14889
14923
  setHasInitializedSizing(true);
14890
14924
  table.setColumnSizing(updateColumnSizes(columnSizing));
14891
14925
  }
14892
14926
  }, [columnSizing, hasInitializedSizing]);
14893
- useResizeCallbackWrapper((0, import_react40.useCallback)(() => {
14927
+ useResizeCallbackWrapper((0, import_react39.useCallback)(() => {
14894
14928
  table.setColumnSizing(updateColumnSizes);
14895
14929
  }, [updateColumnSizes]));
14896
14930
  const pageCount = table.getPageCount();
14897
- (0, import_react40.useEffect)(() => {
14931
+ (0, import_react39.useEffect)(() => {
14898
14932
  const totalPages = pageCount;
14899
14933
  if (totalPages === 0) {
14900
14934
  if (pagination.pageIndex !== 0) {
@@ -14910,7 +14944,7 @@ var Table = ({
14910
14944
  }));
14911
14945
  }
14912
14946
  }, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
14913
- const columnSizeVars = (0, import_react40.useMemo)(() => {
14947
+ const columnSizeVars = (0, import_react39.useMemo)(() => {
14914
14948
  const headers = table.getFlatHeaders();
14915
14949
  const colSizes = {};
14916
14950
  for (let i = 0; i < headers.length; i++) {
@@ -15045,7 +15079,7 @@ var TableWithSelection = ({
15045
15079
  meta,
15046
15080
  ...props
15047
15081
  }) => {
15048
- const columnsWithSelection = (0, import_react40.useMemo)(() => {
15082
+ const columnsWithSelection = (0, import_react39.useMemo)(() => {
15049
15083
  return [
15050
15084
  {
15051
15085
  id: selectionRowId,
@@ -15114,7 +15148,7 @@ var TableWithSelection = ({
15114
15148
  };
15115
15149
 
15116
15150
  // src/components/user-action/CopyToClipboardWrapper.tsx
15117
- var import_react41 = require("react");
15151
+ var import_react40 = require("react");
15118
15152
  var import_clsx49 = require("clsx");
15119
15153
 
15120
15154
  // src/utils/writeToClipboard.ts
@@ -15134,8 +15168,8 @@ var CopyToClipboardWrapper = ({
15134
15168
  zIndex = 10
15135
15169
  }) => {
15136
15170
  const translation = useTranslation([formTranslation]);
15137
- const [isShowingIndication, setIsShowingIndication] = (0, import_react41.useState)(false);
15138
- const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react41.useState)(false);
15171
+ const [isShowingIndication, setIsShowingIndication] = (0, import_react40.useState)(false);
15172
+ const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react40.useState)(false);
15139
15173
  const positionClasses = {
15140
15174
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
15141
15175
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -15277,7 +15311,7 @@ var DateTimePicker = ({
15277
15311
  };
15278
15312
 
15279
15313
  // src/components/user-action/ScrollPicker.tsx
15280
- var import_react42 = require("react");
15314
+ var import_react41 = require("react");
15281
15315
  var import_clsx51 = __toESM(require("clsx"));
15282
15316
  var import_jsx_runtime70 = require("react/jsx-runtime");
15283
15317
  var up = 1;
@@ -15298,7 +15332,7 @@ var ScrollPicker = ({
15298
15332
  transition,
15299
15333
  items,
15300
15334
  lastTimeStamp
15301
- }, setAnimation] = (0, import_react42.useState)({
15335
+ }, setAnimation] = (0, import_react41.useState)({
15302
15336
  targetIndex: selectedIndex,
15303
15337
  currentIndex: disabled ? selectedIndex : 0,
15304
15338
  velocity: 0,
@@ -15314,7 +15348,7 @@ var ScrollPicker = ({
15314
15348
  const itemHeight = 40;
15315
15349
  const distance = 8;
15316
15350
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
15317
- const getDirection = (0, import_react42.useCallback)((targetIndex, currentIndex2, transition2, length) => {
15351
+ const getDirection = (0, import_react41.useCallback)((targetIndex, currentIndex2, transition2, length) => {
15318
15352
  if (targetIndex === currentIndex2) {
15319
15353
  return transition2 > 0 ? up : down;
15320
15354
  }
@@ -15324,7 +15358,7 @@ var ScrollPicker = ({
15324
15358
  }
15325
15359
  return distanceForward >= length / 2 ? down : up;
15326
15360
  }, []);
15327
- const animate = (0, import_react42.useCallback)((timestamp, startTime) => {
15361
+ const animate = (0, import_react41.useCallback)((timestamp, startTime) => {
15328
15362
  setAnimation((prevState) => {
15329
15363
  const {
15330
15364
  targetIndex,
@@ -15397,7 +15431,7 @@ var ScrollPicker = ({
15397
15431
  };
15398
15432
  });
15399
15433
  }, [disabled, getDirection, onChange]);
15400
- (0, import_react42.useEffect)(() => {
15434
+ (0, import_react41.useEffect)(() => {
15401
15435
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
15402
15436
  });
15403
15437
  const opacity = (transition2, index, itemsCount) => {
@@ -15565,18 +15599,18 @@ var Tooltip = ({
15565
15599
  };
15566
15600
 
15567
15601
  // src/components/user-action/input/InsideLabelInput.tsx
15602
+ var import_react42 = require("react");
15568
15603
  var import_react43 = require("react");
15569
- var import_react44 = require("react");
15570
15604
  var import_clsx54 = __toESM(require("clsx"));
15571
15605
  var import_jsx_runtime73 = require("react/jsx-runtime");
15572
- var InsideLabelInput = (0, import_react44.forwardRef)(function InsideLabelInput2({
15606
+ var InsideLabelInput = (0, import_react43.forwardRef)(function InsideLabelInput2({
15573
15607
  id: customId,
15574
15608
  label,
15575
15609
  ...props
15576
15610
  }, forwardedRef) {
15577
15611
  const { value } = props;
15578
- const [isFocused, setIsFocused] = (0, import_react44.useState)(false);
15579
- const generatedId = (0, import_react43.useId)();
15612
+ const [isFocused, setIsFocused] = (0, import_react43.useState)(false);
15613
+ const generatedId = (0, import_react42.useId)();
15580
15614
  const id = customId ?? generatedId;
15581
15615
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: (0, import_clsx54.default)("relative"), children: [
15582
15616
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
@@ -15629,20 +15663,20 @@ var InsideLabelInputUncontrolled = ({
15629
15663
  };
15630
15664
 
15631
15665
  // src/components/user-action/input/ToggleableInput.tsx
15632
- var import_react45 = require("react");
15666
+ var import_react44 = require("react");
15633
15667
  var import_lucide_react24 = require("lucide-react");
15634
15668
  var import_clsx55 = __toESM(require("clsx"));
15635
15669
  var import_jsx_runtime74 = require("react/jsx-runtime");
15636
- var ToggleableInput = (0, import_react45.forwardRef)(function ToggleableInput2({
15670
+ var ToggleableInput = (0, import_react44.forwardRef)(function ToggleableInput2({
15637
15671
  value,
15638
15672
  initialState = "display",
15639
15673
  editCompleteOptions,
15640
15674
  ...props
15641
15675
  }, forwardedRef) {
15642
- const [isEditing, setIsEditing] = (0, import_react45.useState)(initialState !== "display");
15643
- const innerRef = (0, import_react45.useRef)(null);
15644
- (0, import_react45.useImperativeHandle)(forwardedRef, () => innerRef.current);
15645
- (0, import_react45.useEffect)(() => {
15676
+ const [isEditing, setIsEditing] = (0, import_react44.useState)(initialState !== "display");
15677
+ const innerRef = (0, import_react44.useRef)(null);
15678
+ (0, import_react44.useImperativeHandle)(forwardedRef, () => innerRef.current);
15679
+ (0, import_react44.useEffect)(() => {
15646
15680
  if (isEditing) {
15647
15681
  innerRef.current?.focus();
15648
15682
  }
@@ -15697,33 +15731,33 @@ var ToggleableInputUncontrolled = ({
15697
15731
  };
15698
15732
 
15699
15733
  // src/components/utils/FocusTrap.tsx
15734
+ var import_react45 = require("react");
15700
15735
  var import_react46 = require("react");
15701
15736
  var import_react47 = require("react");
15702
- var import_react48 = require("react");
15703
15737
  var import_jsx_runtime75 = require("react/jsx-runtime");
15704
- var FocusTrap = (0, import_react48.forwardRef)(function FocusTrap2({
15738
+ var FocusTrap = (0, import_react47.forwardRef)(function FocusTrap2({
15705
15739
  active = true,
15706
15740
  initialFocus,
15707
15741
  focusFirst = false,
15708
15742
  ...props
15709
15743
  }, forwardedRef) {
15710
- const innerRef = (0, import_react46.useRef)(null);
15711
- (0, import_react47.useImperativeHandle)(forwardedRef, () => innerRef.current);
15744
+ const innerRef = (0, import_react45.useRef)(null);
15745
+ (0, import_react46.useImperativeHandle)(forwardedRef, () => innerRef.current);
15712
15746
  useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
15713
15747
  return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { ref: innerRef, ...props });
15714
15748
  });
15715
15749
 
15716
15750
  // src/components/utils/Transition.tsx
15717
- var import_react49 = require("react");
15751
+ var import_react48 = require("react");
15718
15752
  function Transition({
15719
15753
  children,
15720
15754
  show,
15721
15755
  includeAnimation = true
15722
15756
  }) {
15723
- const [isOpen, setIsOpen] = (0, import_react49.useState)(show);
15724
- const [isTransitioning, setIsTransitioning] = (0, import_react49.useState)(!isOpen);
15757
+ const [isOpen, setIsOpen] = (0, import_react48.useState)(show);
15758
+ const [isTransitioning, setIsTransitioning] = (0, import_react48.useState)(!isOpen);
15725
15759
  const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
15726
- (0, import_react49.useEffect)(() => {
15760
+ (0, import_react48.useEffect)(() => {
15727
15761
  setIsOpen(show);
15728
15762
  setIsTransitioning(true);
15729
15763
  }, [show]);
@@ -15748,7 +15782,7 @@ function Transition({
15748
15782
  }
15749
15783
 
15750
15784
  // src/hooks/focus/useFocusGuards.ts
15751
- var import_react50 = require("react");
15785
+ var import_react49 = require("react");
15752
15786
  var selectorName = "data-hw-focus-guard";
15753
15787
  function FocusGuard() {
15754
15788
  const element = document.createElement("div");
@@ -15786,7 +15820,7 @@ var FocusGuardsService = class _FocusGuardsService {
15786
15820
  }
15787
15821
  };
15788
15822
  var useFocusGuards = () => {
15789
- (0, import_react50.useEffect)(() => {
15823
+ (0, import_react49.useEffect)(() => {
15790
15824
  FocusGuardsService.getInstance().add();
15791
15825
  return () => {
15792
15826
  FocusGuardsService.getInstance().remove();
@@ -15795,10 +15829,10 @@ var useFocusGuards = () => {
15795
15829
  };
15796
15830
 
15797
15831
  // src/hooks/focus/useFocusOnceVisible.ts
15798
- var import_react51 = __toESM(require("react"));
15832
+ var import_react50 = __toESM(require("react"));
15799
15833
  var useFocusOnceVisible = (ref, disable = false) => {
15800
- const [hasUsedFocus, setHasUsedFocus] = import_react51.default.useState(false);
15801
- (0, import_react51.useEffect)(() => {
15834
+ const [hasUsedFocus, setHasUsedFocus] = import_react50.default.useState(false);
15835
+ (0, import_react50.useEffect)(() => {
15802
15836
  if (disable || hasUsedFocus) {
15803
15837
  return;
15804
15838
  }
@@ -15818,13 +15852,13 @@ var useFocusOnceVisible = (ref, disable = false) => {
15818
15852
  };
15819
15853
 
15820
15854
  // src/hooks/useRerender.ts
15821
- var import_react52 = require("react");
15855
+ var import_react51 = require("react");
15822
15856
  var useRerender = () => {
15823
- return (0, import_react52.useReducer)(() => ({}), {})[1];
15857
+ return (0, import_react51.useReducer)(() => ({}), {})[1];
15824
15858
  };
15825
15859
 
15826
15860
  // src/hooks/useSearch.ts
15827
- var import_react53 = require("react");
15861
+ var import_react52 = require("react");
15828
15862
 
15829
15863
  // src/utils/simpleSearch.ts
15830
15864
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -15863,34 +15897,34 @@ var useSearch = ({
15863
15897
  filter,
15864
15898
  disabled = false
15865
15899
  }) => {
15866
- const [search, setSearch] = (0, import_react53.useState)(initialSearch ?? "");
15867
- const [result, setResult] = (0, import_react53.useState)(list);
15868
- const searchTags = (0, import_react53.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
15869
- const updateSearch = (0, import_react53.useCallback)((newSearch) => {
15900
+ const [search, setSearch] = (0, import_react52.useState)(initialSearch ?? "");
15901
+ const [result, setResult] = (0, import_react52.useState)(list);
15902
+ const searchTags = (0, import_react52.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
15903
+ const updateSearch = (0, import_react52.useCallback)((newSearch) => {
15870
15904
  const usedSearch = newSearch ?? search;
15871
15905
  if (newSearch) {
15872
15906
  setSearch(search);
15873
15907
  }
15874
15908
  setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
15875
15909
  }, [searchTags, list, search, searchMapping]);
15876
- (0, import_react53.useEffect)(() => {
15910
+ (0, import_react52.useEffect)(() => {
15877
15911
  if (isSearchInstant) {
15878
15912
  setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
15879
15913
  }
15880
15914
  }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
15881
- const filteredResult = (0, import_react53.useMemo)(() => {
15915
+ const filteredResult = (0, import_react52.useMemo)(() => {
15882
15916
  if (!filter) {
15883
15917
  return result;
15884
15918
  }
15885
15919
  return result.filter(filter);
15886
15920
  }, [result, filter]);
15887
- const sortedAndFilteredResult = (0, import_react53.useMemo)(() => {
15921
+ const sortedAndFilteredResult = (0, import_react52.useMemo)(() => {
15888
15922
  if (!sortingFunction) {
15889
15923
  return filteredResult;
15890
15924
  }
15891
15925
  return filteredResult.sort(sortingFunction);
15892
15926
  }, [filteredResult, sortingFunction]);
15893
- const usedResult = (0, import_react53.useMemo)(() => {
15927
+ const usedResult = (0, import_react52.useMemo)(() => {
15894
15928
  if (!disabled) {
15895
15929
  return sortedAndFilteredResult;
15896
15930
  }