@helpwave/hightide 0.1.35 → 0.1.37
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.
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/date/index.js.map +1 -1
- package/dist/components/date/index.mjs.map +1 -1
- package/dist/components/dialog/ConfirmDialog.js +30 -7
- package/dist/components/dialog/ConfirmDialog.js.map +1 -1
- package/dist/components/dialog/ConfirmDialog.mjs +29 -6
- package/dist/components/dialog/ConfirmDialog.mjs.map +1 -1
- package/dist/components/dialog/Dialog.d.mts +2 -1
- package/dist/components/dialog/Dialog.d.ts +2 -1
- package/dist/components/dialog/Dialog.js +31 -7
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/dialog/Dialog.mjs +31 -6
- package/dist/components/dialog/Dialog.mjs.map +1 -1
- package/dist/components/dialog/DiscardChangesDialog.js +30 -7
- package/dist/components/dialog/DiscardChangesDialog.js.map +1 -1
- package/dist/components/dialog/DiscardChangesDialog.mjs +29 -6
- package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -1
- package/dist/components/dialog/InputDialog.js +30 -7
- package/dist/components/dialog/InputDialog.js.map +1 -1
- package/dist/components/dialog/InputDialog.mjs +29 -6
- package/dist/components/dialog/InputDialog.mjs.map +1 -1
- package/dist/components/dialog/LanguageDialog.js +75 -52
- package/dist/components/dialog/LanguageDialog.js.map +1 -1
- package/dist/components/dialog/LanguageDialog.mjs +44 -21
- package/dist/components/dialog/LanguageDialog.mjs.map +1 -1
- package/dist/components/dialog/ThemeDialog.js +78 -55
- package/dist/components/dialog/ThemeDialog.js.map +1 -1
- package/dist/components/dialog/ThemeDialog.mjs +45 -22
- package/dist/components/dialog/ThemeDialog.mjs.map +1 -1
- package/dist/components/dialog/index.js +92 -69
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/dialog/index.mjs +49 -26
- package/dist/components/dialog/index.mjs.map +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +230 -207
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +122 -99
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/layout/Carousel.js.map +1 -1
- package/dist/components/layout/Carousel.mjs.map +1 -1
- package/dist/components/layout/TextImage.js.map +1 -1
- package/dist/components/layout/TextImage.mjs.map +1 -1
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/index.js.map +1 -1
- package/dist/components/loading-states/index.mjs.map +1 -1
- package/dist/components/navigation/Navigation.d.mts +4 -4
- package/dist/components/navigation/Navigation.d.ts +4 -4
- package/dist/components/navigation/Navigation.js.map +1 -1
- package/dist/components/navigation/Navigation.mjs.map +1 -1
- package/dist/components/navigation/Pagination.js.map +1 -1
- package/dist/components/navigation/Pagination.mjs.map +1 -1
- package/dist/components/navigation/StepperBar.js.map +1 -1
- package/dist/components/navigation/StepperBar.mjs.map +1 -1
- package/dist/components/navigation/index.d.mts +1 -1
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/components/navigation/index.js.map +1 -1
- package/dist/components/navigation/index.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/properties/index.js.map +1 -1
- package/dist/components/properties/index.mjs.map +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/index.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/index.js.map +1 -1
- package/dist/components/user-action/index.mjs.map +1 -1
- package/dist/components/user-action/select/Select.js.map +1 -1
- package/dist/components/user-action/select/Select.mjs.map +1 -1
- package/dist/components/user-action/select/index.js.map +1 -1
- package/dist/components/user-action/select/index.mjs.map +1 -1
- package/dist/hooks/index.js +9 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +9 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/useLocalStorage.js +9 -2
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +9 -2
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/hooks/useValidators.js.map +1 -1
- package/dist/hooks/useValidators.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +264 -232
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +146 -114
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +10 -2
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +10 -2
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/index.js +10 -2
- package/dist/localization/index.js.map +1 -1
- package/dist/localization/index.mjs +10 -2
- package/dist/localization/index.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/style/globals.css +1 -1
- package/dist/style/uncompiled/utitlity/animation.css +1 -1
- package/dist/theming/index.js +10 -2
- package/dist/theming/index.js.map +1 -1
- package/dist/theming/index.mjs +10 -2
- package/dist/theming/index.mjs.map +1 -1
- package/dist/theming/useTheme.js +10 -2
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +10 -2
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,12 +38,12 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
38
38
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
39
39
|
}
|
|
40
40
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var useState36 = React21.useState;
|
|
42
|
+
var useEffect39 = React21.useEffect;
|
|
43
43
|
var useLayoutEffect3 = React21.useLayoutEffect;
|
|
44
44
|
var useDebugValue = React21.useDebugValue;
|
|
45
45
|
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
46
|
-
var value = getSnapshot(), _useState =
|
|
46
|
+
var value = getSnapshot(), _useState = useState36({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
47
47
|
useLayoutEffect3(
|
|
48
48
|
function() {
|
|
49
49
|
inst.value = value;
|
|
@@ -52,7 +52,7 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
52
52
|
},
|
|
53
53
|
[subscribe2, value, getSnapshot]
|
|
54
54
|
);
|
|
55
|
-
|
|
55
|
+
useEffect39(
|
|
56
56
|
function() {
|
|
57
57
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
58
58
|
return subscribe2(function() {
|
|
@@ -101,7 +101,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
101
101
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
102
102
|
), didWarnUncachedGetSnapshot = true);
|
|
103
103
|
}
|
|
104
|
-
cachedValue =
|
|
104
|
+
cachedValue = useState36({
|
|
105
105
|
inst: { value, getSnapshot }
|
|
106
106
|
});
|
|
107
107
|
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
@@ -113,7 +113,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
113
113
|
},
|
|
114
114
|
[subscribe2, value, getSnapshot]
|
|
115
115
|
);
|
|
116
|
-
|
|
116
|
+
useEffect39(
|
|
117
117
|
function() {
|
|
118
118
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
119
119
|
return subscribe2(function() {
|
|
@@ -139,7 +139,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
139
139
|
return getSnapshot();
|
|
140
140
|
}
|
|
141
141
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
142
|
-
var React21 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
142
|
+
var React21 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState36 = React21.useState, useEffect39 = React21.useEffect, useLayoutEffect3 = React21.useLayoutEffect, useDebugValue = React21.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
143
143
|
exports2.useSyncExternalStore = void 0 !== React21.useSyncExternalStore ? React21.useSyncExternalStore : shim;
|
|
144
144
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
145
145
|
}();
|
|
@@ -7104,8 +7104,15 @@ var useLocalStorage = (key, backupValue) => {
|
|
|
7104
7104
|
return backupValue;
|
|
7105
7105
|
}
|
|
7106
7106
|
const storageService = new LocalStorageService();
|
|
7107
|
-
|
|
7108
|
-
|
|
7107
|
+
try {
|
|
7108
|
+
const value = storageService.get(key);
|
|
7109
|
+
return value || backupValue;
|
|
7110
|
+
} catch (_) {
|
|
7111
|
+
console.warn("useLocalStorage: Error while reading the stored value. Make sure your typing is correct.");
|
|
7112
|
+
storageService.delete(key);
|
|
7113
|
+
console.info(`useLocalStorage: deleted erroneous value for key: ${key}`);
|
|
7114
|
+
return backupValue;
|
|
7115
|
+
}
|
|
7109
7116
|
}, [backupValue, key]);
|
|
7110
7117
|
const [storedValue, setStoredValue] = (0, import_react2.useState)(get);
|
|
7111
7118
|
const setValue = (0, import_react2.useCallback)((action) => {
|
|
@@ -7161,6 +7168,7 @@ var LanguageProvider = ({ children, language }) => {
|
|
|
7161
7168
|
return LanguageUtil.DEFAULT_LANGUAGE;
|
|
7162
7169
|
}, [language, languagePreference, storedLanguage]);
|
|
7163
7170
|
(0, import_react3.useEffect)(() => {
|
|
7171
|
+
if (!language) return;
|
|
7164
7172
|
if (language === "system") {
|
|
7165
7173
|
deleteStoredLanguage();
|
|
7166
7174
|
} else {
|
|
@@ -8109,6 +8117,8 @@ var import_clsx10 = __toESM(require("clsx"));
|
|
|
8109
8117
|
|
|
8110
8118
|
// src/components/dialog/Dialog.tsx
|
|
8111
8119
|
var import_react13 = require("react");
|
|
8120
|
+
var import_react14 = require("react");
|
|
8121
|
+
var import_react15 = require("react");
|
|
8112
8122
|
var import_clsx9 = __toESM(require("clsx"));
|
|
8113
8123
|
var import_lucide_react3 = require("lucide-react");
|
|
8114
8124
|
|
|
@@ -8473,10 +8483,21 @@ var Dialog = ({
|
|
|
8473
8483
|
onClose,
|
|
8474
8484
|
className,
|
|
8475
8485
|
backgroundClassName,
|
|
8476
|
-
position = "center"
|
|
8486
|
+
position = "center",
|
|
8487
|
+
isAnimated = true
|
|
8477
8488
|
}) => {
|
|
8478
8489
|
const translation = useTranslation([formTranslation]);
|
|
8479
|
-
const
|
|
8490
|
+
const [visible, setVisible] = (0, import_react14.useState)(isOpen);
|
|
8491
|
+
const ref = (0, import_react15.useRef)(null);
|
|
8492
|
+
(0, import_react13.useEffect)(() => {
|
|
8493
|
+
if (isOpen) {
|
|
8494
|
+
setVisible(true);
|
|
8495
|
+
} else {
|
|
8496
|
+
if (!isAnimated) {
|
|
8497
|
+
setVisible(false);
|
|
8498
|
+
}
|
|
8499
|
+
}
|
|
8500
|
+
}, [isAnimated, isOpen]);
|
|
8480
8501
|
const onCloseWrapper = () => {
|
|
8481
8502
|
if (!isModal) return;
|
|
8482
8503
|
onClose?.();
|
|
@@ -8484,7 +8505,7 @@ var Dialog = ({
|
|
|
8484
8505
|
useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
|
|
8485
8506
|
useFocusTrap({
|
|
8486
8507
|
container: ref,
|
|
8487
|
-
active:
|
|
8508
|
+
active: visible,
|
|
8488
8509
|
focusFirst: true
|
|
8489
8510
|
});
|
|
8490
8511
|
const positionMap = {
|
|
@@ -8498,6 +8519,7 @@ var Dialog = ({
|
|
|
8498
8519
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
8499
8520
|
"div",
|
|
8500
8521
|
{
|
|
8522
|
+
hidden: !visible,
|
|
8501
8523
|
className: (0, import_clsx9.default)(
|
|
8502
8524
|
"fixed inset-0 h-screen w-screen bg-overlay-shadow z-100",
|
|
8503
8525
|
{
|
|
@@ -8506,21 +8528,30 @@ var Dialog = ({
|
|
|
8506
8528
|
},
|
|
8507
8529
|
backgroundClassName
|
|
8508
8530
|
),
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8531
|
+
onAnimationEnd: () => {
|
|
8532
|
+
if (!isOpen) {
|
|
8533
|
+
setVisible(false);
|
|
8534
|
+
}
|
|
8535
|
+
},
|
|
8536
|
+
onClick: onCloseWrapper,
|
|
8537
|
+
"aria-hidden": true
|
|
8512
8538
|
}
|
|
8513
8539
|
),
|
|
8514
8540
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
8515
8541
|
"div",
|
|
8516
8542
|
{
|
|
8517
8543
|
ref,
|
|
8518
|
-
hidden: !
|
|
8544
|
+
hidden: !visible,
|
|
8519
8545
|
onKeyDown: (event) => {
|
|
8520
8546
|
if (event.key === "Escape") {
|
|
8521
8547
|
onCloseWrapper();
|
|
8522
8548
|
}
|
|
8523
8549
|
},
|
|
8550
|
+
onAnimationEnd: () => {
|
|
8551
|
+
if (!isOpen) {
|
|
8552
|
+
setVisible(false);
|
|
8553
|
+
}
|
|
8554
|
+
},
|
|
8524
8555
|
className: (0, import_clsx9.default)(
|
|
8525
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",
|
|
8526
8557
|
{
|
|
@@ -8645,17 +8676,17 @@ var DiscardChangesDialog = ({
|
|
|
8645
8676
|
};
|
|
8646
8677
|
|
|
8647
8678
|
// src/components/user-action/input/Input.tsx
|
|
8648
|
-
var
|
|
8679
|
+
var import_react18 = require("react");
|
|
8649
8680
|
var import_clsx11 = __toESM(require("clsx"));
|
|
8650
8681
|
|
|
8651
8682
|
// src/hooks/useDelay.ts
|
|
8652
|
-
var
|
|
8683
|
+
var import_react16 = require("react");
|
|
8653
8684
|
var defaultOptions2 = {
|
|
8654
8685
|
delay: 3e3,
|
|
8655
8686
|
disabled: false
|
|
8656
8687
|
};
|
|
8657
8688
|
function useDelay(options) {
|
|
8658
|
-
const [timer, setTimer] = (0,
|
|
8689
|
+
const [timer, setTimer] = (0, import_react16.useState)(void 0);
|
|
8659
8690
|
const { delay, disabled } = {
|
|
8660
8691
|
...defaultOptions2,
|
|
8661
8692
|
...options
|
|
@@ -8674,12 +8705,12 @@ function useDelay(options) {
|
|
|
8674
8705
|
setTimer(void 0);
|
|
8675
8706
|
}, delay));
|
|
8676
8707
|
};
|
|
8677
|
-
(0,
|
|
8708
|
+
(0, import_react16.useEffect)(() => {
|
|
8678
8709
|
return () => {
|
|
8679
8710
|
clearTimeout(timer);
|
|
8680
8711
|
};
|
|
8681
8712
|
}, [timer]);
|
|
8682
|
-
(0,
|
|
8713
|
+
(0, import_react16.useEffect)(() => {
|
|
8683
8714
|
if (disabled) {
|
|
8684
8715
|
clearTimeout(timer);
|
|
8685
8716
|
setTimer(void 0);
|
|
@@ -8689,9 +8720,9 @@ function useDelay(options) {
|
|
|
8689
8720
|
}
|
|
8690
8721
|
|
|
8691
8722
|
// src/hooks/focus/useFocusManagement.ts
|
|
8692
|
-
var
|
|
8723
|
+
var import_react17 = require("react");
|
|
8693
8724
|
function useFocusManagement() {
|
|
8694
|
-
const getFocusableElements = (0,
|
|
8725
|
+
const getFocusableElements = (0, import_react17.useCallback)(() => {
|
|
8695
8726
|
return Array.from(
|
|
8696
8727
|
document.querySelectorAll(
|
|
8697
8728
|
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -8700,7 +8731,7 @@ function useFocusManagement() {
|
|
|
8700
8731
|
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
8701
8732
|
);
|
|
8702
8733
|
}, []);
|
|
8703
|
-
const getNextFocusElement = (0,
|
|
8734
|
+
const getNextFocusElement = (0, import_react17.useCallback)(() => {
|
|
8704
8735
|
const elements = getFocusableElements();
|
|
8705
8736
|
if (elements.length === 0) {
|
|
8706
8737
|
return void 0;
|
|
@@ -8712,11 +8743,11 @@ function useFocusManagement() {
|
|
|
8712
8743
|
}
|
|
8713
8744
|
return nextElement;
|
|
8714
8745
|
}, [getFocusableElements]);
|
|
8715
|
-
const focusNext = (0,
|
|
8746
|
+
const focusNext = (0, import_react17.useCallback)(() => {
|
|
8716
8747
|
const nextElement = getNextFocusElement();
|
|
8717
8748
|
nextElement?.focus();
|
|
8718
8749
|
}, [getNextFocusElement]);
|
|
8719
|
-
const getPreviousFocusElement = (0,
|
|
8750
|
+
const getPreviousFocusElement = (0, import_react17.useCallback)(() => {
|
|
8720
8751
|
const elements = getFocusableElements();
|
|
8721
8752
|
if (elements.length === 0) {
|
|
8722
8753
|
return void 0;
|
|
@@ -8732,7 +8763,7 @@ function useFocusManagement() {
|
|
|
8732
8763
|
}
|
|
8733
8764
|
return previousElement;
|
|
8734
8765
|
}, [getFocusableElements]);
|
|
8735
|
-
const focusPrevious = (0,
|
|
8766
|
+
const focusPrevious = (0, import_react17.useCallback)(() => {
|
|
8736
8767
|
const previousElement = getPreviousFocusElement();
|
|
8737
8768
|
if (previousElement) previousElement.focus();
|
|
8738
8769
|
}, [getPreviousFocusElement]);
|
|
@@ -8753,7 +8784,7 @@ var defaultEditCompleteOptions = {
|
|
|
8753
8784
|
afterDelay: true,
|
|
8754
8785
|
delay: 2500
|
|
8755
8786
|
};
|
|
8756
|
-
var Input = (0,
|
|
8787
|
+
var Input = (0, import_react18.forwardRef)(function Input2({
|
|
8757
8788
|
value,
|
|
8758
8789
|
onChange,
|
|
8759
8790
|
onChangeText,
|
|
@@ -8775,8 +8806,8 @@ var Input = (0, import_react16.forwardRef)(function Input2({
|
|
|
8775
8806
|
restartTimer,
|
|
8776
8807
|
clearTimer
|
|
8777
8808
|
} = useDelay({ delay, disabled: !afterDelay });
|
|
8778
|
-
const innerRef = (0,
|
|
8779
|
-
(0,
|
|
8809
|
+
const innerRef = (0, import_react18.useRef)(null);
|
|
8810
|
+
(0, import_react18.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
8780
8811
|
const { focusNext } = useFocusManagement();
|
|
8781
8812
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8782
8813
|
"input",
|
|
@@ -8861,7 +8892,7 @@ var InputDialog = ({
|
|
|
8861
8892
|
};
|
|
8862
8893
|
|
|
8863
8894
|
// src/components/user-action/select/Select.tsx
|
|
8864
|
-
var
|
|
8895
|
+
var import_react20 = require("react");
|
|
8865
8896
|
var import_clsx13 = __toESM(require("clsx"));
|
|
8866
8897
|
|
|
8867
8898
|
// src/utils/match.ts
|
|
@@ -8955,7 +8986,7 @@ var ChipList = ({
|
|
|
8955
8986
|
};
|
|
8956
8987
|
|
|
8957
8988
|
// src/hooks/useFloatingElement.ts
|
|
8958
|
-
var
|
|
8989
|
+
var import_react19 = require("react");
|
|
8959
8990
|
|
|
8960
8991
|
// src/utils/math.ts
|
|
8961
8992
|
var clamp = (value, range2 = [0, 1]) => {
|
|
@@ -9018,9 +9049,9 @@ function useFloatingElement({
|
|
|
9018
9049
|
screenPadding = 16,
|
|
9019
9050
|
gap = 4
|
|
9020
9051
|
}) {
|
|
9021
|
-
const [style, setStyle] = (0,
|
|
9052
|
+
const [style, setStyle] = (0, import_react19.useState)();
|
|
9022
9053
|
const isMounted = useIsMounted();
|
|
9023
|
-
const calculate = (0,
|
|
9054
|
+
const calculate = (0, import_react19.useCallback)(() => {
|
|
9024
9055
|
const containerRect = containerRef.current.getBoundingClientRect();
|
|
9025
9056
|
const windowRect = windowRef?.current.getBoundingClientRect() ?? {
|
|
9026
9057
|
top: 0,
|
|
@@ -9050,14 +9081,14 @@ function useFloatingElement({
|
|
|
9050
9081
|
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
9051
9082
|
const height = containerRef.current?.getBoundingClientRect().height;
|
|
9052
9083
|
const width = containerRef.current?.getBoundingClientRect().width;
|
|
9053
|
-
(0,
|
|
9084
|
+
(0, import_react19.useEffect)(() => {
|
|
9054
9085
|
if (active && isMounted) {
|
|
9055
9086
|
calculate();
|
|
9056
9087
|
} else {
|
|
9057
9088
|
setStyle(void 0);
|
|
9058
9089
|
}
|
|
9059
9090
|
}, [calculate, active, isMounted, height, width]);
|
|
9060
|
-
(0,
|
|
9091
|
+
(0, import_react19.useEffect)(() => {
|
|
9061
9092
|
window.addEventListener("resize", calculate);
|
|
9062
9093
|
let timeout;
|
|
9063
9094
|
if (isPolling) {
|
|
@@ -9079,9 +9110,9 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
|
9079
9110
|
var defaultToggleOpenOptions = {
|
|
9080
9111
|
highlightStartPosition: "first"
|
|
9081
9112
|
};
|
|
9082
|
-
var SelectContext = (0,
|
|
9113
|
+
var SelectContext = (0, import_react20.createContext)(null);
|
|
9083
9114
|
function useSelectContext() {
|
|
9084
|
-
const ctx = (0,
|
|
9115
|
+
const ctx = (0, import_react20.useContext)(SelectContext);
|
|
9085
9116
|
if (!ctx) {
|
|
9086
9117
|
throw new Error("SelectContext must be used within a ListBoxPrimitive");
|
|
9087
9118
|
}
|
|
@@ -9100,11 +9131,11 @@ var SelectRoot = ({
|
|
|
9100
9131
|
isMultiSelect = false,
|
|
9101
9132
|
iconAppearance = "left"
|
|
9102
9133
|
}) => {
|
|
9103
|
-
const [options, setOptions] = (0,
|
|
9104
|
-
const triggerRef = (0,
|
|
9105
|
-
const generatedId = (0,
|
|
9134
|
+
const [options, setOptions] = (0, import_react20.useState)([]);
|
|
9135
|
+
const triggerRef = (0, import_react20.useRef)(null);
|
|
9136
|
+
const generatedId = (0, import_react20.useId)();
|
|
9106
9137
|
const usedId = id ?? generatedId;
|
|
9107
|
-
const [internalState, setInternalState] = (0,
|
|
9138
|
+
const [internalState, setInternalState] = (0, import_react20.useState)({
|
|
9108
9139
|
isOpen
|
|
9109
9140
|
});
|
|
9110
9141
|
const selectedValues = isMultiSelect ? values ?? [] : [value].filter(Boolean);
|
|
@@ -9121,7 +9152,7 @@ var SelectRoot = ({
|
|
|
9121
9152
|
isMultiSelect,
|
|
9122
9153
|
iconAppearance
|
|
9123
9154
|
};
|
|
9124
|
-
const registerItem = (0,
|
|
9155
|
+
const registerItem = (0, import_react20.useCallback)((item) => {
|
|
9125
9156
|
setOptions((prev) => {
|
|
9126
9157
|
const updated = [...prev, item];
|
|
9127
9158
|
updated.sort((a, b) => {
|
|
@@ -9133,7 +9164,7 @@ var SelectRoot = ({
|
|
|
9133
9164
|
return updated;
|
|
9134
9165
|
});
|
|
9135
9166
|
}, []);
|
|
9136
|
-
const unregisterItem = (0,
|
|
9167
|
+
const unregisterItem = (0, import_react20.useCallback)((value2) => {
|
|
9137
9168
|
setOptions((prev) => prev.filter((i) => i.value !== value2));
|
|
9138
9169
|
}, []);
|
|
9139
9170
|
const toggleSelection = (value2, isSelected) => {
|
|
@@ -9176,10 +9207,10 @@ var SelectRoot = ({
|
|
|
9176
9207
|
highlightedValue: value2
|
|
9177
9208
|
}));
|
|
9178
9209
|
};
|
|
9179
|
-
const registerTrigger = (0,
|
|
9210
|
+
const registerTrigger = (0, import_react20.useCallback)((ref) => {
|
|
9180
9211
|
triggerRef.current = ref.current;
|
|
9181
9212
|
}, []);
|
|
9182
|
-
const unregisterTrigger = (0,
|
|
9213
|
+
const unregisterTrigger = (0, import_react20.useCallback)(() => {
|
|
9183
9214
|
triggerRef.current = null;
|
|
9184
9215
|
}, []);
|
|
9185
9216
|
const toggleOpen = (isOpen2, toggleOpenOptions) => {
|
|
@@ -9220,7 +9251,7 @@ var SelectRoot = ({
|
|
|
9220
9251
|
highlightedValue
|
|
9221
9252
|
}));
|
|
9222
9253
|
};
|
|
9223
|
-
(0,
|
|
9254
|
+
(0, import_react20.useEffect)(() => {
|
|
9224
9255
|
if (!internalState.highlightedValue) return;
|
|
9225
9256
|
const highlighted = options.find((value2) => value2.value === internalState.highlightedValue);
|
|
9226
9257
|
if (highlighted) {
|
|
@@ -9248,14 +9279,14 @@ var SelectRoot = ({
|
|
|
9248
9279
|
};
|
|
9249
9280
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContext.Provider, { value: contextValue, children });
|
|
9250
9281
|
};
|
|
9251
|
-
var SelectOption = (0,
|
|
9282
|
+
var SelectOption = (0, import_react20.forwardRef)(
|
|
9252
9283
|
function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
|
|
9253
9284
|
const { state, config, item, trigger } = useSelectContext();
|
|
9254
9285
|
const { register, unregister, toggleSelection, highlightItem } = item;
|
|
9255
|
-
const itemRef = (0,
|
|
9286
|
+
const itemRef = (0, import_react20.useRef)(null);
|
|
9256
9287
|
iconAppearance ??= config.iconAppearance;
|
|
9257
9288
|
const label = children ?? value;
|
|
9258
|
-
(0,
|
|
9289
|
+
(0, import_react20.useEffect)(() => {
|
|
9259
9290
|
register({
|
|
9260
9291
|
value,
|
|
9261
9292
|
label,
|
|
@@ -9333,13 +9364,13 @@ var defaultSelectButtonTranslation = {
|
|
|
9333
9364
|
clickToSelect: "Zum ausw\xE4hlen dr\xFCcken"
|
|
9334
9365
|
}
|
|
9335
9366
|
};
|
|
9336
|
-
var SelectButton = (0,
|
|
9367
|
+
var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
|
|
9337
9368
|
const translation = useTranslation([defaultSelectButtonTranslation]);
|
|
9338
9369
|
const { state, trigger } = useSelectContext();
|
|
9339
9370
|
const { register, unregister, toggleOpen } = trigger;
|
|
9340
|
-
const innerRef = (0,
|
|
9341
|
-
(0,
|
|
9342
|
-
(0,
|
|
9371
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
9372
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
|
|
9373
|
+
(0, import_react20.useEffect)(() => {
|
|
9343
9374
|
register(innerRef);
|
|
9344
9375
|
return () => unregister();
|
|
9345
9376
|
}, [register, unregister]);
|
|
@@ -9412,12 +9443,12 @@ var SelectButton = (0, import_react18.forwardRef)(function SelectButton2({ place
|
|
|
9412
9443
|
}
|
|
9413
9444
|
);
|
|
9414
9445
|
});
|
|
9415
|
-
var SelectChipDisplay = (0,
|
|
9446
|
+
var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
|
|
9416
9447
|
const { state, trigger, item } = useSelectContext();
|
|
9417
9448
|
const { register, unregister, toggleOpen } = trigger;
|
|
9418
|
-
const innerRef = (0,
|
|
9419
|
-
(0,
|
|
9420
|
-
(0,
|
|
9449
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
9450
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
|
|
9451
|
+
(0, import_react20.useEffect)(() => {
|
|
9421
9452
|
register(innerRef);
|
|
9422
9453
|
return () => unregister();
|
|
9423
9454
|
}, [register, unregister]);
|
|
@@ -9480,14 +9511,14 @@ var SelectChipDisplay = (0, import_react18.forwardRef)(function SelectChipDispla
|
|
|
9480
9511
|
}
|
|
9481
9512
|
);
|
|
9482
9513
|
});
|
|
9483
|
-
var SelectContent = (0,
|
|
9514
|
+
var SelectContent = (0, import_react20.forwardRef)(
|
|
9484
9515
|
function SelectContent2({
|
|
9485
9516
|
alignment,
|
|
9486
9517
|
orientation = "vertical",
|
|
9487
9518
|
...props
|
|
9488
9519
|
}, ref) {
|
|
9489
|
-
const innerRef = (0,
|
|
9490
|
-
(0,
|
|
9520
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
9521
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
|
|
9491
9522
|
const { trigger, state, config, item } = useSelectContext();
|
|
9492
9523
|
const position = useFloatingElement({
|
|
9493
9524
|
active: state.isOpen,
|
|
@@ -9574,7 +9605,7 @@ var SelectContent = (0, import_react18.forwardRef)(
|
|
|
9574
9605
|
);
|
|
9575
9606
|
}
|
|
9576
9607
|
);
|
|
9577
|
-
var Select = (0,
|
|
9608
|
+
var Select = (0, import_react20.forwardRef)(function Select2({
|
|
9578
9609
|
children,
|
|
9579
9610
|
contentPanelProps,
|
|
9580
9611
|
buttonProps,
|
|
@@ -9596,7 +9627,7 @@ var Select = (0, import_react18.forwardRef)(function Select2({
|
|
|
9596
9627
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
|
|
9597
9628
|
] });
|
|
9598
9629
|
});
|
|
9599
|
-
var SelectUncontrolled = (0,
|
|
9630
|
+
var SelectUncontrolled = (0, import_react20.forwardRef)(function SelectUncontrolled2({
|
|
9600
9631
|
value: initialValue,
|
|
9601
9632
|
onValueChanged,
|
|
9602
9633
|
...props
|
|
@@ -9612,7 +9643,7 @@ var SelectUncontrolled = (0, import_react18.forwardRef)(function SelectUncontrol
|
|
|
9612
9643
|
}
|
|
9613
9644
|
);
|
|
9614
9645
|
});
|
|
9615
|
-
var MultiSelect = (0,
|
|
9646
|
+
var MultiSelect = (0, import_react20.forwardRef)(function MultiSelect2({
|
|
9616
9647
|
children,
|
|
9617
9648
|
contentPanelProps,
|
|
9618
9649
|
buttonProps,
|
|
@@ -9623,7 +9654,7 @@ var MultiSelect = (0, import_react18.forwardRef)(function MultiSelect2({
|
|
|
9623
9654
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
|
|
9624
9655
|
] });
|
|
9625
9656
|
});
|
|
9626
|
-
var MultiSelectUncontrolled = (0,
|
|
9657
|
+
var MultiSelectUncontrolled = (0, import_react20.forwardRef)(function MultiSelectUncontrolled2({
|
|
9627
9658
|
values: initialValues,
|
|
9628
9659
|
onValuesChanged,
|
|
9629
9660
|
...props
|
|
@@ -9639,7 +9670,7 @@ var MultiSelectUncontrolled = (0, import_react18.forwardRef)(function MultiSelec
|
|
|
9639
9670
|
}
|
|
9640
9671
|
);
|
|
9641
9672
|
});
|
|
9642
|
-
var MultiSelectChipDisplay = (0,
|
|
9673
|
+
var MultiSelectChipDisplay = (0, import_react20.forwardRef)(function MultiSelectChipDisplay2({
|
|
9643
9674
|
children,
|
|
9644
9675
|
contentPanelProps,
|
|
9645
9676
|
chipDisplayProps,
|
|
@@ -9650,7 +9681,7 @@ var MultiSelectChipDisplay = (0, import_react18.forwardRef)(function MultiSelect
|
|
|
9650
9681
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
|
|
9651
9682
|
] });
|
|
9652
9683
|
});
|
|
9653
|
-
var MultiSelectChipDisplayUncontrolled = (0,
|
|
9684
|
+
var MultiSelectChipDisplayUncontrolled = (0, import_react20.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
|
|
9654
9685
|
values: initialValues,
|
|
9655
9686
|
onValuesChanged,
|
|
9656
9687
|
...props
|
|
@@ -9723,7 +9754,7 @@ var import_lucide_react5 = require("lucide-react");
|
|
|
9723
9754
|
var import_clsx14 = __toESM(require("clsx"));
|
|
9724
9755
|
|
|
9725
9756
|
// src/theming/useTheme.tsx
|
|
9726
|
-
var
|
|
9757
|
+
var import_react21 = require("react");
|
|
9727
9758
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
9728
9759
|
var themes = ["light", "dark", "system"];
|
|
9729
9760
|
var defaultThemeTypeTranslation = {
|
|
@@ -9750,15 +9781,15 @@ var ThemeUtil = {
|
|
|
9750
9781
|
themes,
|
|
9751
9782
|
translation: defaultThemeTypeTranslation
|
|
9752
9783
|
};
|
|
9753
|
-
var ThemeContext = (0,
|
|
9784
|
+
var ThemeContext = (0, import_react21.createContext)(null);
|
|
9754
9785
|
var ThemeProvider = ({ children, theme }) => {
|
|
9755
9786
|
const {
|
|
9756
9787
|
value: storedTheme,
|
|
9757
9788
|
setValue: setStoredTheme,
|
|
9758
9789
|
deleteValue: deleteStoredTheme
|
|
9759
9790
|
} = useLocalStorage("theme", "system");
|
|
9760
|
-
const [themePreference, setThemePreference] = (0,
|
|
9761
|
-
const resolvedTheme = (0,
|
|
9791
|
+
const [themePreference, setThemePreference] = (0, import_react21.useState)("system");
|
|
9792
|
+
const resolvedTheme = (0, import_react21.useMemo)(() => {
|
|
9762
9793
|
if (theme && theme !== "system") {
|
|
9763
9794
|
return theme;
|
|
9764
9795
|
}
|
|
@@ -9770,25 +9801,26 @@ var ThemeProvider = ({ children, theme }) => {
|
|
|
9770
9801
|
}
|
|
9771
9802
|
return "light";
|
|
9772
9803
|
}, [storedTheme, theme, themePreference]);
|
|
9773
|
-
(0,
|
|
9804
|
+
(0, import_react21.useEffect)(() => {
|
|
9805
|
+
if (!theme) return;
|
|
9774
9806
|
if (theme === "system") {
|
|
9775
9807
|
deleteStoredTheme();
|
|
9776
9808
|
} else {
|
|
9777
9809
|
setStoredTheme(theme);
|
|
9778
9810
|
}
|
|
9779
9811
|
}, [theme]);
|
|
9780
|
-
(0,
|
|
9812
|
+
(0, import_react21.useEffect)(() => {
|
|
9781
9813
|
document.documentElement.setAttribute("data-theme", resolvedTheme);
|
|
9782
9814
|
}, [resolvedTheme]);
|
|
9783
|
-
const getPreference = (0,
|
|
9815
|
+
const getPreference = (0, import_react21.useCallback)(() => {
|
|
9784
9816
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
9785
9817
|
const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
|
|
9786
9818
|
setThemePreference(prefersDark ? "dark" : prefersLight ? "light" : "system");
|
|
9787
9819
|
}, []);
|
|
9788
|
-
(0,
|
|
9820
|
+
(0, import_react21.useEffect)(() => {
|
|
9789
9821
|
getPreference();
|
|
9790
9822
|
}, [getPreference]);
|
|
9791
|
-
(0,
|
|
9823
|
+
(0, import_react21.useEffect)(() => {
|
|
9792
9824
|
const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
9793
9825
|
const lightQuery = window.matchMedia("(prefers-color-scheme: light)");
|
|
9794
9826
|
const noPrefQuery = window.matchMedia("(prefers-color-scheme: no-preference)");
|
|
@@ -9819,7 +9851,7 @@ var ThemeProvider = ({ children, theme }) => {
|
|
|
9819
9851
|
);
|
|
9820
9852
|
};
|
|
9821
9853
|
var useTheme = () => {
|
|
9822
|
-
const context = (0,
|
|
9854
|
+
const context = (0, import_react21.useContext)(ThemeContext);
|
|
9823
9855
|
if (!context) {
|
|
9824
9856
|
throw new Error("useTheme must be used within ThemeContext. Try adding a ThemeProvider around your app.");
|
|
9825
9857
|
}
|
|
@@ -9891,7 +9923,7 @@ var ThemeDialog = ({
|
|
|
9891
9923
|
};
|
|
9892
9924
|
|
|
9893
9925
|
// src/components/form/FormElementWrapper.tsx
|
|
9894
|
-
var
|
|
9926
|
+
var import_react22 = require("react");
|
|
9895
9927
|
var import_clsx16 = require("clsx");
|
|
9896
9928
|
|
|
9897
9929
|
// src/components/user-action/Label.tsx
|
|
@@ -9929,7 +9961,7 @@ var FormElementWrapper = ({
|
|
|
9929
9961
|
containerClassName
|
|
9930
9962
|
}) => {
|
|
9931
9963
|
const [touched, setTouched] = useOverwritableState(initialIsShowingError, onIsShowingError);
|
|
9932
|
-
const generatedId = (0,
|
|
9964
|
+
const generatedId = (0, import_react22.useId)();
|
|
9933
9965
|
const usedId = id ?? generatedId;
|
|
9934
9966
|
const errorId = `${usedId}-description`;
|
|
9935
9967
|
const labelId = `${usedId}-label`;
|
|
@@ -10000,7 +10032,7 @@ var FormElementWrapper = ({
|
|
|
10000
10032
|
|
|
10001
10033
|
// src/components/icons-and-geometry/Avatar.tsx
|
|
10002
10034
|
var import_clsx17 = __toESM(require("clsx"));
|
|
10003
|
-
var
|
|
10035
|
+
var import_react23 = require("react");
|
|
10004
10036
|
var import_lucide_react6 = require("lucide-react");
|
|
10005
10037
|
|
|
10006
10038
|
// node_modules/@radix-ui/react-avatar/dist/index.mjs
|
|
@@ -10399,7 +10431,7 @@ var Avatar2 = ({ image, name, size = "md", fullyRounded, className = "" }) => {
|
|
|
10399
10431
|
maxHeight: pixels
|
|
10400
10432
|
};
|
|
10401
10433
|
const textClassName = textClassNameMapping[size];
|
|
10402
|
-
const displayName = (0,
|
|
10434
|
+
const displayName = (0, import_react23.useMemo)(() => {
|
|
10403
10435
|
const maxLetters = size === "sm" ? 1 : 2;
|
|
10404
10436
|
return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
|
|
10405
10437
|
}, [name, size]);
|
|
@@ -10499,7 +10531,7 @@ var Circle = ({
|
|
|
10499
10531
|
};
|
|
10500
10532
|
|
|
10501
10533
|
// src/components/icons-and-geometry/Ring.tsx
|
|
10502
|
-
var
|
|
10534
|
+
var import_react24 = require("react");
|
|
10503
10535
|
var import_clsx19 = __toESM(require("clsx"));
|
|
10504
10536
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
10505
10537
|
var Ring = ({
|
|
@@ -10528,9 +10560,9 @@ var AnimatedRing = ({
|
|
|
10528
10560
|
onAnimationFinished,
|
|
10529
10561
|
style
|
|
10530
10562
|
}) => {
|
|
10531
|
-
const [currentWidth, setCurrentWidth] = (0,
|
|
10563
|
+
const [currentWidth, setCurrentWidth] = (0, import_react24.useState)(0);
|
|
10532
10564
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10533
|
-
const animate = (0,
|
|
10565
|
+
const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
|
|
10534
10566
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
10535
10567
|
const newWidth = Math.min(width * progress, width);
|
|
10536
10568
|
setCurrentWidth(newWidth);
|
|
@@ -10544,7 +10576,7 @@ var AnimatedRing = ({
|
|
|
10544
10576
|
}
|
|
10545
10577
|
}
|
|
10546
10578
|
}, [milliseconds, onAnimationFinished, repeating, width]);
|
|
10547
|
-
(0,
|
|
10579
|
+
(0, import_react24.useEffect)(() => {
|
|
10548
10580
|
if (currentWidth < width) {
|
|
10549
10581
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10550
10582
|
}
|
|
@@ -10579,10 +10611,10 @@ var RingWave = ({
|
|
|
10579
10611
|
onAnimationFinished,
|
|
10580
10612
|
style
|
|
10581
10613
|
}) => {
|
|
10582
|
-
const [currentInnerSize, setCurrentInnerSize] = (0,
|
|
10614
|
+
const [currentInnerSize, setCurrentInnerSize] = (0, import_react24.useState)(startInnerSize);
|
|
10583
10615
|
const distance = endInnerSize - startInnerSize;
|
|
10584
10616
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10585
|
-
const animate = (0,
|
|
10617
|
+
const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
|
|
10586
10618
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
10587
10619
|
const newInnerSize = Math.min(
|
|
10588
10620
|
startInnerSize + distance * progress,
|
|
@@ -10599,7 +10631,7 @@ var RingWave = ({
|
|
|
10599
10631
|
}
|
|
10600
10632
|
}
|
|
10601
10633
|
}, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
|
|
10602
|
-
(0,
|
|
10634
|
+
(0, import_react24.useEffect)(() => {
|
|
10603
10635
|
if (currentInnerSize < endInnerSize) {
|
|
10604
10636
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10605
10637
|
}
|
|
@@ -10634,7 +10666,7 @@ var RadialRings = ({
|
|
|
10634
10666
|
sizeCircle2 = 200,
|
|
10635
10667
|
sizeCircle3 = 300
|
|
10636
10668
|
}) => {
|
|
10637
|
-
const [currentRing, setCurrentRing] = (0,
|
|
10669
|
+
const [currentRing, setCurrentRing] = (0, import_react24.useState)(0);
|
|
10638
10670
|
const size = sizeCircle3;
|
|
10639
10671
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
10640
10672
|
"div",
|
|
@@ -10783,13 +10815,13 @@ var TagIcon = ({
|
|
|
10783
10815
|
};
|
|
10784
10816
|
|
|
10785
10817
|
// src/components/layout/Carousel.tsx
|
|
10786
|
-
var
|
|
10818
|
+
var import_react25 = require("react");
|
|
10787
10819
|
var import_clsx20 = __toESM(require("clsx"));
|
|
10788
10820
|
var import_lucide_react7 = require("lucide-react");
|
|
10789
10821
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
10790
|
-
var CarouselContext = (0,
|
|
10822
|
+
var CarouselContext = (0, import_react25.createContext)(null);
|
|
10791
10823
|
var useCarouselContext = () => {
|
|
10792
|
-
const context = (0,
|
|
10824
|
+
const context = (0, import_react25.useContext)(CarouselContext);
|
|
10793
10825
|
if (!context) {
|
|
10794
10826
|
console.error("useCarouselContext must be used within CarouselContext");
|
|
10795
10827
|
}
|
|
@@ -10812,7 +10844,7 @@ function CarouselTabs({
|
|
|
10812
10844
|
defaultCarouselTabTranslationType
|
|
10813
10845
|
]);
|
|
10814
10846
|
const { id, slideCount, currentIndex, isLooping } = useCarouselContext();
|
|
10815
|
-
const tabRefs = (0,
|
|
10847
|
+
const tabRefs = (0, import_react25.useRef)([]);
|
|
10816
10848
|
const handleKeyDown = (event, index) => {
|
|
10817
10849
|
let newIndex = index;
|
|
10818
10850
|
if (event.key === "ArrowRight") {
|
|
@@ -10872,7 +10904,7 @@ var defaultCarouselSlideTranslationType = {
|
|
|
10872
10904
|
slideOf: `Slide {{index}} von {{length}} slides`
|
|
10873
10905
|
}
|
|
10874
10906
|
};
|
|
10875
|
-
var CarouselSlide = (0,
|
|
10907
|
+
var CarouselSlide = (0, import_react25.forwardRef)(
|
|
10876
10908
|
function CarouselSlide2({
|
|
10877
10909
|
index,
|
|
10878
10910
|
...props
|
|
@@ -10932,17 +10964,17 @@ var Carousel = ({
|
|
|
10932
10964
|
...props
|
|
10933
10965
|
}) => {
|
|
10934
10966
|
const translation = useTranslation([defaultCarouselTranslationType]);
|
|
10935
|
-
const slideRefs = (0,
|
|
10936
|
-
const [currentIndex, setCurrentIndex] = (0,
|
|
10937
|
-
const [hasFocus, setHasFocus] = (0,
|
|
10938
|
-
const [dragState, setDragState] = (0,
|
|
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)();
|
|
10939
10971
|
const isPaused = hasFocus;
|
|
10940
|
-
const carouselContainerRef = (0,
|
|
10941
|
-
const [disableClick, setDisableClick] = (0,
|
|
10942
|
-
const timeOut = (0,
|
|
10943
|
-
const length = (0,
|
|
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]);
|
|
10944
10976
|
const paddingItemCount = 3;
|
|
10945
|
-
const generatedId = "carousel" + (0,
|
|
10977
|
+
const generatedId = "carousel" + (0, import_react25.useId)();
|
|
10946
10978
|
const id = props.id ?? generatedId;
|
|
10947
10979
|
if (isAutoPlaying && !isLooping) {
|
|
10948
10980
|
console.error("When isAutoLooping is true, isLooping should also be true");
|
|
@@ -10951,7 +10983,7 @@ var Carousel = ({
|
|
|
10951
10983
|
autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
|
|
10952
10984
|
animationTime = Math.max(100, animationTime);
|
|
10953
10985
|
autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
|
|
10954
|
-
(0,
|
|
10986
|
+
(0, import_react25.useEffect)(() => {
|
|
10955
10987
|
const carousel = carouselContainerRef.current;
|
|
10956
10988
|
if (carousel) {
|
|
10957
10989
|
let onFocus = function() {
|
|
@@ -10974,7 +11006,7 @@ var Carousel = ({
|
|
|
10974
11006
|
const canGoLeft = () => {
|
|
10975
11007
|
return isLooping || currentIndex !== 0;
|
|
10976
11008
|
};
|
|
10977
|
-
const canGoRight = (0,
|
|
11009
|
+
const canGoRight = (0, import_react25.useCallback)(() => {
|
|
10978
11010
|
return isLooping || currentIndex !== length - 1;
|
|
10979
11011
|
}, [currentIndex, isLooping, length]);
|
|
10980
11012
|
const left = () => {
|
|
@@ -10982,12 +11014,12 @@ var Carousel = ({
|
|
|
10982
11014
|
setCurrentIndex(currentIndex - 1);
|
|
10983
11015
|
}
|
|
10984
11016
|
};
|
|
10985
|
-
const right = (0,
|
|
11017
|
+
const right = (0, import_react25.useCallback)(() => {
|
|
10986
11018
|
if (canGoRight()) {
|
|
10987
11019
|
setCurrentIndex((currentIndex + length + 1) % length);
|
|
10988
11020
|
}
|
|
10989
11021
|
}, [canGoRight, currentIndex, length]);
|
|
10990
|
-
(0,
|
|
11022
|
+
(0, import_react25.useEffect)(() => {
|
|
10991
11023
|
if (!timeOut.current && !isPaused) {
|
|
10992
11024
|
if (autoLoopingTimeOut > 0) {
|
|
10993
11025
|
timeOut.current = setTimeout(() => {
|
|
@@ -11039,7 +11071,7 @@ var Carousel = ({
|
|
|
11039
11071
|
}
|
|
11040
11072
|
setDragState(void 0);
|
|
11041
11073
|
};
|
|
11042
|
-
(0,
|
|
11074
|
+
(0, import_react25.useEffect)(() => {
|
|
11043
11075
|
setDisableClick(!dragState);
|
|
11044
11076
|
}, [dragState]);
|
|
11045
11077
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
@@ -11430,11 +11462,11 @@ var FAQSection = ({
|
|
|
11430
11462
|
};
|
|
11431
11463
|
|
|
11432
11464
|
// src/components/layout/FloatingContainer.tsx
|
|
11433
|
-
var
|
|
11465
|
+
var import_react26 = require("react");
|
|
11434
11466
|
var import_react_dom3 = require("react-dom");
|
|
11435
11467
|
var import_clsx23 = require("clsx");
|
|
11436
11468
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
11437
|
-
var FloatingContainer = (0,
|
|
11469
|
+
var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContainer2({
|
|
11438
11470
|
children,
|
|
11439
11471
|
backgroundOverlay,
|
|
11440
11472
|
anchor,
|
|
@@ -11446,8 +11478,8 @@ var FloatingContainer = (0, import_react24.forwardRef)(function FloatingContaine
|
|
|
11446
11478
|
gap = 4,
|
|
11447
11479
|
...props
|
|
11448
11480
|
}, forwardRef17) {
|
|
11449
|
-
const innerRef = (0,
|
|
11450
|
-
(0,
|
|
11481
|
+
const innerRef = (0, import_react26.useRef)(null);
|
|
11482
|
+
(0, import_react26.useImperativeHandle)(forwardRef17, () => innerRef.current);
|
|
11451
11483
|
const position = useFloatingElement({
|
|
11452
11484
|
active: !props.hidden,
|
|
11453
11485
|
containerRef: innerRef,
|
|
@@ -11487,18 +11519,18 @@ var FloatingContainer = (0, import_react24.forwardRef)(function FloatingContaine
|
|
|
11487
11519
|
});
|
|
11488
11520
|
|
|
11489
11521
|
// src/components/layout/ListBox.tsx
|
|
11490
|
-
var
|
|
11522
|
+
var import_react27 = __toESM(require("react"));
|
|
11491
11523
|
var import_clsx24 = require("clsx");
|
|
11492
11524
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
11493
|
-
var ListBoxContext = (0,
|
|
11525
|
+
var ListBoxContext = (0, import_react27.createContext)(null);
|
|
11494
11526
|
function useListBoxContext() {
|
|
11495
|
-
const ctx = (0,
|
|
11527
|
+
const ctx = (0, import_react27.useContext)(ListBoxContext);
|
|
11496
11528
|
if (!ctx) {
|
|
11497
11529
|
throw new Error("ListBoxItem must be used within a ListBoxPrimitive");
|
|
11498
11530
|
}
|
|
11499
11531
|
return ctx;
|
|
11500
11532
|
}
|
|
11501
|
-
var ListBoxItem = (0,
|
|
11533
|
+
var ListBoxItem = (0, import_react27.forwardRef)(
|
|
11502
11534
|
function ListBoxItem2({ value, disabled = false, children, className, ...rest }, ref) {
|
|
11503
11535
|
const {
|
|
11504
11536
|
registerItem,
|
|
@@ -11508,9 +11540,9 @@ var ListBoxItem = (0, import_react25.forwardRef)(
|
|
|
11508
11540
|
onItemClick,
|
|
11509
11541
|
isSelected
|
|
11510
11542
|
} = useListBoxContext();
|
|
11511
|
-
const itemRef = (0,
|
|
11512
|
-
const id =
|
|
11513
|
-
(0,
|
|
11543
|
+
const itemRef = (0, import_react27.useRef)(null);
|
|
11544
|
+
const id = import_react27.default.useId();
|
|
11545
|
+
(0, import_react27.useEffect)(() => {
|
|
11514
11546
|
registerItem({ id, value, disabled, ref: itemRef });
|
|
11515
11547
|
return () => unregisterItem(id);
|
|
11516
11548
|
}, [id, value, disabled, registerItem, unregisterItem]);
|
|
@@ -11552,7 +11584,7 @@ var ListBoxItem = (0, import_react25.forwardRef)(
|
|
|
11552
11584
|
);
|
|
11553
11585
|
}
|
|
11554
11586
|
);
|
|
11555
|
-
var ListBoxPrimitive = (0,
|
|
11587
|
+
var ListBoxPrimitive = (0, import_react27.forwardRef)(
|
|
11556
11588
|
function ListBoxPrimitive2({
|
|
11557
11589
|
value,
|
|
11558
11590
|
onSelectionChanged,
|
|
@@ -11562,9 +11594,9 @@ var ListBoxPrimitive = (0, import_react25.forwardRef)(
|
|
|
11562
11594
|
orientation = "vertical",
|
|
11563
11595
|
...props
|
|
11564
11596
|
}, ref) {
|
|
11565
|
-
const itemsRef = (0,
|
|
11566
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
11567
|
-
const registerItem = (0,
|
|
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) => {
|
|
11568
11600
|
itemsRef.current.push(item);
|
|
11569
11601
|
itemsRef.current.sort((a, b) => {
|
|
11570
11602
|
const aEl = a.ref.current;
|
|
@@ -11573,14 +11605,14 @@ var ListBoxPrimitive = (0, import_react25.forwardRef)(
|
|
|
11573
11605
|
return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
11574
11606
|
});
|
|
11575
11607
|
}, []);
|
|
11576
|
-
const unregisterItem = (0,
|
|
11608
|
+
const unregisterItem = (0, import_react27.useCallback)((id) => {
|
|
11577
11609
|
itemsRef.current = itemsRef.current.filter((i) => i.id !== id);
|
|
11578
11610
|
}, []);
|
|
11579
|
-
const isSelected = (0,
|
|
11611
|
+
const isSelected = (0, import_react27.useCallback)(
|
|
11580
11612
|
(val) => (value ?? []).includes(val),
|
|
11581
11613
|
[value]
|
|
11582
11614
|
);
|
|
11583
|
-
const onItemClickedHandler = (0,
|
|
11615
|
+
const onItemClickedHandler = (0, import_react27.useCallback)(
|
|
11584
11616
|
(id) => {
|
|
11585
11617
|
const index = itemsRef.current.findIndex((i) => i.id === id);
|
|
11586
11618
|
if (index === -1) {
|
|
@@ -11604,13 +11636,13 @@ var ListBoxPrimitive = (0, import_react25.forwardRef)(
|
|
|
11604
11636
|
},
|
|
11605
11637
|
[onItemClicked, isSelection, isMultiple, onSelectionChanged, isSelected, value]
|
|
11606
11638
|
);
|
|
11607
|
-
const setHighlightedId = (0,
|
|
11639
|
+
const setHighlightedId = (0, import_react27.useCallback)((id) => {
|
|
11608
11640
|
const index = itemsRef.current.findIndex((i) => i.id === id);
|
|
11609
11641
|
if (index !== -1) {
|
|
11610
11642
|
setHighlightedIndex(index);
|
|
11611
11643
|
}
|
|
11612
11644
|
}, []);
|
|
11613
|
-
(0,
|
|
11645
|
+
(0, import_react27.useEffect)(() => {
|
|
11614
11646
|
if (highlightedIndex !== void 0) {
|
|
11615
11647
|
itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
|
|
11616
11648
|
}
|
|
@@ -11715,7 +11747,7 @@ var ListBoxMultipleUncontrolled = ({
|
|
|
11715
11747
|
}
|
|
11716
11748
|
);
|
|
11717
11749
|
};
|
|
11718
|
-
var ListBox = (0,
|
|
11750
|
+
var ListBox = (0, import_react27.forwardRef)(function ListBox2({
|
|
11719
11751
|
value,
|
|
11720
11752
|
onSelectionChanged,
|
|
11721
11753
|
...props
|
|
@@ -12849,7 +12881,7 @@ var ErrorComponent = ({
|
|
|
12849
12881
|
};
|
|
12850
12882
|
|
|
12851
12883
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
12852
|
-
var
|
|
12884
|
+
var import_react28 = require("react");
|
|
12853
12885
|
|
|
12854
12886
|
// src/components/loading-states/LoadingContainer.tsx
|
|
12855
12887
|
var import_clsx28 = require("clsx");
|
|
@@ -12870,8 +12902,8 @@ var LoadingAndErrorComponent = ({
|
|
|
12870
12902
|
minimumLoadingDuration = 200,
|
|
12871
12903
|
className
|
|
12872
12904
|
}) => {
|
|
12873
|
-
const [isInMinimumLoading, setIsInMinimumLoading] = (0,
|
|
12874
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0,
|
|
12905
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react28.useState)(false);
|
|
12906
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react28.useState)(false);
|
|
12875
12907
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
12876
12908
|
setIsInMinimumLoading(true);
|
|
12877
12909
|
setTimeout(() => {
|
|
@@ -12973,13 +13005,13 @@ var ProgressIndicator = ({
|
|
|
12973
13005
|
// src/components/navigation/BreadCrumb.tsx
|
|
12974
13006
|
var import_link = __toESM(require_link2());
|
|
12975
13007
|
var import_clsx32 = __toESM(require("clsx"));
|
|
12976
|
-
var
|
|
13008
|
+
var import_react29 = require("react");
|
|
12977
13009
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12978
13010
|
var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
12979
13011
|
const color = "text-description";
|
|
12980
13012
|
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) => {
|
|
12981
13013
|
const isLast = index === crumbs.length - 1;
|
|
12982
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
13014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react29.Fragment, { children: [
|
|
12983
13015
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12984
13016
|
import_link.default,
|
|
12985
13017
|
{
|
|
@@ -12995,8 +13027,8 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
12995
13027
|
|
|
12996
13028
|
// src/components/navigation/Navigation.tsx
|
|
12997
13029
|
var import_lucide_react9 = require("lucide-react");
|
|
12998
|
-
var
|
|
12999
|
-
var
|
|
13030
|
+
var import_react30 = require("react");
|
|
13031
|
+
var import_react31 = require("react");
|
|
13000
13032
|
var import_link2 = __toESM(require_link2());
|
|
13001
13033
|
var import_clsx33 = __toESM(require("clsx"));
|
|
13002
13034
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
@@ -13009,10 +13041,10 @@ var NavigationItemWithSubItem = ({
|
|
|
13009
13041
|
horizontalAlignment = "center",
|
|
13010
13042
|
...options
|
|
13011
13043
|
}) => {
|
|
13012
|
-
const [isOpen, setOpen] = (0,
|
|
13013
|
-
const containerRef = (0,
|
|
13014
|
-
const triggerRef = (0,
|
|
13015
|
-
const id = (0,
|
|
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)();
|
|
13016
13048
|
const style = useFloatingElement({
|
|
13017
13049
|
active: isOpen,
|
|
13018
13050
|
containerRef,
|
|
@@ -13020,7 +13052,7 @@ var NavigationItemWithSubItem = ({
|
|
|
13020
13052
|
horizontalAlignment,
|
|
13021
13053
|
...options
|
|
13022
13054
|
});
|
|
13023
|
-
const onBlur = (0,
|
|
13055
|
+
const onBlur = (0, import_react31.useCallback)((event) => {
|
|
13024
13056
|
const nextFocus = event.relatedTarget;
|
|
13025
13057
|
if (!containerRef.current?.contains(nextFocus) && !triggerRef.current?.contains(nextFocus)) {
|
|
13026
13058
|
setOpen(false);
|
|
@@ -13074,10 +13106,10 @@ var NavigationItemList = ({ items, ...restProps }) => {
|
|
|
13074
13106
|
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)) });
|
|
13075
13107
|
};
|
|
13076
13108
|
var Navigation = ({ ...props }) => {
|
|
13077
|
-
const [isMobileOpen, setIsMobileOpen] = (0,
|
|
13078
|
-
const id = (0,
|
|
13079
|
-
const menuRef = (0,
|
|
13080
|
-
(0,
|
|
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)(() => {
|
|
13081
13113
|
menuRef.current?.focus();
|
|
13082
13114
|
}, [isMobileOpen]);
|
|
13083
13115
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
@@ -13132,7 +13164,7 @@ var Navigation = ({ ...props }) => {
|
|
|
13132
13164
|
// src/components/navigation/Pagination.tsx
|
|
13133
13165
|
var import_lucide_react10 = require("lucide-react");
|
|
13134
13166
|
var import_clsx34 = __toESM(require("clsx"));
|
|
13135
|
-
var
|
|
13167
|
+
var import_react32 = require("react");
|
|
13136
13168
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
13137
13169
|
var Pagination = ({
|
|
13138
13170
|
overwriteTranslation,
|
|
@@ -13143,11 +13175,11 @@ var Pagination = ({
|
|
|
13143
13175
|
style
|
|
13144
13176
|
}) => {
|
|
13145
13177
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
13146
|
-
const [value, setValue] = (0,
|
|
13178
|
+
const [value, setValue] = (0, import_react32.useState)((pageIndex + 1).toString());
|
|
13147
13179
|
const noPages = pageCount === 0;
|
|
13148
13180
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
13149
13181
|
const onLastPage = pageIndex === pageCount - 1;
|
|
13150
|
-
(0,
|
|
13182
|
+
(0, import_react32.useEffect)(() => {
|
|
13151
13183
|
if (noPages) {
|
|
13152
13184
|
setValue("0");
|
|
13153
13185
|
} else {
|
|
@@ -13826,7 +13858,7 @@ var PropertyBase = ({
|
|
|
13826
13858
|
};
|
|
13827
13859
|
|
|
13828
13860
|
// src/components/properties/CheckboxProperty.tsx
|
|
13829
|
-
var
|
|
13861
|
+
var import_react33 = require("react");
|
|
13830
13862
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
13831
13863
|
var CheckboxProperty = ({
|
|
13832
13864
|
overwriteTranslation,
|
|
@@ -13836,7 +13868,7 @@ var CheckboxProperty = ({
|
|
|
13836
13868
|
...baseProps
|
|
13837
13869
|
}) => {
|
|
13838
13870
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
13839
|
-
const id = (0,
|
|
13871
|
+
const id = (0, import_react33.useId)();
|
|
13840
13872
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13841
13873
|
PropertyBase,
|
|
13842
13874
|
{
|
|
@@ -14059,10 +14091,10 @@ var import_lucide_react19 = require("lucide-react");
|
|
|
14059
14091
|
var import_clsx43 = __toESM(require("clsx"));
|
|
14060
14092
|
|
|
14061
14093
|
// src/components/user-action/Textarea.tsx
|
|
14062
|
-
var
|
|
14094
|
+
var import_react34 = require("react");
|
|
14063
14095
|
var import_clsx42 = __toESM(require("clsx"));
|
|
14064
14096
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
14065
|
-
var Textarea = (0,
|
|
14097
|
+
var Textarea = (0, import_react34.forwardRef)(function Textarea2({
|
|
14066
14098
|
id,
|
|
14067
14099
|
onChange,
|
|
14068
14100
|
onChangeText,
|
|
@@ -14136,7 +14168,7 @@ var TextareaWithHeadline = ({
|
|
|
14136
14168
|
containerClassName,
|
|
14137
14169
|
...props
|
|
14138
14170
|
}) => {
|
|
14139
|
-
const genId = (0,
|
|
14171
|
+
const genId = (0, import_react34.useId)();
|
|
14140
14172
|
const usedId = id ?? genId;
|
|
14141
14173
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
14142
14174
|
"div",
|
|
@@ -14251,7 +14283,7 @@ var TableFilters = {
|
|
|
14251
14283
|
};
|
|
14252
14284
|
|
|
14253
14285
|
// src/components/table/Table.tsx
|
|
14254
|
-
var
|
|
14286
|
+
var import_react40 = require("react");
|
|
14255
14287
|
var import_clsx48 = __toESM(require("clsx"));
|
|
14256
14288
|
var import_react_table = require("@tanstack/react-table");
|
|
14257
14289
|
var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
|
|
@@ -14267,9 +14299,9 @@ var TableCell = ({
|
|
|
14267
14299
|
};
|
|
14268
14300
|
|
|
14269
14301
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
14270
|
-
var
|
|
14302
|
+
var import_react35 = require("react");
|
|
14271
14303
|
var useResizeCallbackWrapper = (callback) => {
|
|
14272
|
-
(0,
|
|
14304
|
+
(0, import_react35.useEffect)(() => {
|
|
14273
14305
|
window.addEventListener("resize", callback);
|
|
14274
14306
|
return () => {
|
|
14275
14307
|
window.removeEventListener("resize", callback);
|
|
@@ -14312,7 +14344,7 @@ var TableSortButton = ({
|
|
|
14312
14344
|
var import_lucide_react21 = require("lucide-react");
|
|
14313
14345
|
|
|
14314
14346
|
// src/components/user-action/Menu.tsx
|
|
14315
|
-
var
|
|
14347
|
+
var import_react38 = require("react");
|
|
14316
14348
|
var import_clsx47 = __toESM(require("clsx"));
|
|
14317
14349
|
|
|
14318
14350
|
// src/utils/bagFunctions.ts
|
|
@@ -14384,15 +14416,15 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
14384
14416
|
};
|
|
14385
14417
|
|
|
14386
14418
|
// src/hooks/useHoverState.ts
|
|
14387
|
-
var
|
|
14419
|
+
var import_react36 = require("react");
|
|
14388
14420
|
var defaultUseHoverStateProps = {
|
|
14389
14421
|
closingDelay: 200,
|
|
14390
14422
|
isDisabled: false
|
|
14391
14423
|
};
|
|
14392
14424
|
var useHoverState = (props = void 0) => {
|
|
14393
14425
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
14394
|
-
const [isHovered, setIsHovered] = (0,
|
|
14395
|
-
const [timer, setTimer] = (0,
|
|
14426
|
+
const [isHovered, setIsHovered] = (0, import_react36.useState)(false);
|
|
14427
|
+
const [timer, setTimer] = (0, import_react36.useState)();
|
|
14396
14428
|
const onMouseEnter = () => {
|
|
14397
14429
|
if (isDisabled) {
|
|
14398
14430
|
return;
|
|
@@ -14408,14 +14440,14 @@ var useHoverState = (props = void 0) => {
|
|
|
14408
14440
|
setIsHovered(false);
|
|
14409
14441
|
}, closingDelay));
|
|
14410
14442
|
};
|
|
14411
|
-
(0,
|
|
14443
|
+
(0, import_react36.useEffect)(() => {
|
|
14412
14444
|
if (timer) {
|
|
14413
14445
|
return () => {
|
|
14414
14446
|
clearTimeout(timer);
|
|
14415
14447
|
};
|
|
14416
14448
|
}
|
|
14417
14449
|
});
|
|
14418
|
-
(0,
|
|
14450
|
+
(0, import_react36.useEffect)(() => {
|
|
14419
14451
|
if (timer) {
|
|
14420
14452
|
clearTimeout(timer);
|
|
14421
14453
|
}
|
|
@@ -14428,9 +14460,9 @@ var useHoverState = (props = void 0) => {
|
|
|
14428
14460
|
};
|
|
14429
14461
|
|
|
14430
14462
|
// src/hooks/useOutsideClick.ts
|
|
14431
|
-
var
|
|
14463
|
+
var import_react37 = require("react");
|
|
14432
14464
|
var useOutsideClick = (refs, handler) => {
|
|
14433
|
-
(0,
|
|
14465
|
+
(0, import_react37.useEffect)(() => {
|
|
14434
14466
|
const listener = (event) => {
|
|
14435
14467
|
if (event.target === null) return;
|
|
14436
14468
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -14488,10 +14520,10 @@ var Menu = ({
|
|
|
14488
14520
|
menuClassName = ""
|
|
14489
14521
|
}) => {
|
|
14490
14522
|
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
14491
|
-
const triggerRef = (0,
|
|
14492
|
-
const menuRef = (0,
|
|
14523
|
+
const triggerRef = (0, import_react38.useRef)(null);
|
|
14524
|
+
const menuRef = (0, import_react38.useRef)(null);
|
|
14493
14525
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
14494
|
-
const [isHidden, setIsHidden] = (0,
|
|
14526
|
+
const [isHidden, setIsHidden] = (0, import_react38.useState)(true);
|
|
14495
14527
|
const bag = {
|
|
14496
14528
|
isOpen,
|
|
14497
14529
|
close: () => setIsOpen(false),
|
|
@@ -14502,7 +14534,7 @@ var Menu = ({
|
|
|
14502
14534
|
triggerRef.current?.getBoundingClientRect(),
|
|
14503
14535
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
14504
14536
|
);
|
|
14505
|
-
(0,
|
|
14537
|
+
(0, import_react38.useEffect)(() => {
|
|
14506
14538
|
if (!isOpen) return;
|
|
14507
14539
|
const triggerEl = triggerRef.current;
|
|
14508
14540
|
if (!triggerEl) return;
|
|
@@ -14519,7 +14551,7 @@ var Menu = ({
|
|
|
14519
14551
|
window.removeEventListener("resize", close);
|
|
14520
14552
|
};
|
|
14521
14553
|
}, [isOpen, setIsOpen]);
|
|
14522
|
-
(0,
|
|
14554
|
+
(0, import_react38.useEffect)(() => {
|
|
14523
14555
|
if (isOpen) {
|
|
14524
14556
|
setIsHidden(false);
|
|
14525
14557
|
}
|
|
@@ -14555,7 +14587,7 @@ var Menu = ({
|
|
|
14555
14587
|
};
|
|
14556
14588
|
|
|
14557
14589
|
// src/components/table/TableFilterButton.tsx
|
|
14558
|
-
var
|
|
14590
|
+
var import_react39 = require("react");
|
|
14559
14591
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
14560
14592
|
var defaultTableFilterTranslation = {
|
|
14561
14593
|
en: {
|
|
@@ -14581,9 +14613,9 @@ var TableFilterButton = ({
|
|
|
14581
14613
|
}) => {
|
|
14582
14614
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
14583
14615
|
const columnFilterValue = column.getFilterValue();
|
|
14584
|
-
const [filterValue, setFilterValue] = (0,
|
|
14616
|
+
const [filterValue, setFilterValue] = (0, import_react39.useState)(columnFilterValue);
|
|
14585
14617
|
const hasFilter = !!filterValue;
|
|
14586
|
-
(0,
|
|
14618
|
+
(0, import_react39.useEffect)(() => {
|
|
14587
14619
|
setFilterValue(columnFilterValue);
|
|
14588
14620
|
}, [columnFilterValue]);
|
|
14589
14621
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
@@ -14697,22 +14729,22 @@ var Table = ({
|
|
|
14697
14729
|
columns,
|
|
14698
14730
|
...tableOptions
|
|
14699
14731
|
}) => {
|
|
14700
|
-
const ref = (0,
|
|
14701
|
-
const tableRef = (0,
|
|
14702
|
-
const [columnSizing, setColumnSizing] = (0,
|
|
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) => {
|
|
14703
14735
|
return {
|
|
14704
14736
|
...previousValue,
|
|
14705
14737
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
14706
14738
|
};
|
|
14707
14739
|
}, {}));
|
|
14708
|
-
const [columnSizingInfo, setColumnSizingInfo] = (0,
|
|
14709
|
-
const [pagination, setPagination] = (0,
|
|
14740
|
+
const [columnSizingInfo, setColumnSizingInfo] = (0, import_react40.useState)();
|
|
14741
|
+
const [pagination, setPagination] = (0, import_react40.useState)({
|
|
14710
14742
|
pageSize: 10,
|
|
14711
14743
|
pageIndex: 0,
|
|
14712
14744
|
...initialState?.pagination
|
|
14713
14745
|
});
|
|
14714
|
-
const [columnFilters, setColumnFilters] = (0,
|
|
14715
|
-
const computedColumnMinWidths = (0,
|
|
14746
|
+
const [columnFilters, setColumnFilters] = (0, import_react40.useState)(initialState?.columnFilters);
|
|
14747
|
+
const computedColumnMinWidths = (0, import_react40.useMemo)(() => {
|
|
14716
14748
|
return columns.reduce((previousValue, column) => {
|
|
14717
14749
|
return {
|
|
14718
14750
|
...previousValue,
|
|
@@ -14721,7 +14753,7 @@ var Table = ({
|
|
|
14721
14753
|
};
|
|
14722
14754
|
}, {});
|
|
14723
14755
|
}, [columns, defaultColumn]);
|
|
14724
|
-
const computedColumnMaxWidths = (0,
|
|
14756
|
+
const computedColumnMaxWidths = (0, import_react40.useMemo)(() => {
|
|
14725
14757
|
return columns.reduce((previousValue, column) => {
|
|
14726
14758
|
return {
|
|
14727
14759
|
...previousValue,
|
|
@@ -14729,12 +14761,12 @@ var Table = ({
|
|
|
14729
14761
|
};
|
|
14730
14762
|
}, {});
|
|
14731
14763
|
}, [columns, defaultColumn]);
|
|
14732
|
-
const tableMinWidth = (0,
|
|
14764
|
+
const tableMinWidth = (0, import_react40.useMemo)(() => {
|
|
14733
14765
|
return columns.reduce((sum, column) => {
|
|
14734
14766
|
return sum + computedColumnMinWidths[column.id];
|
|
14735
14767
|
}, 0);
|
|
14736
14768
|
}, [columns, computedColumnMinWidths]);
|
|
14737
|
-
const updateColumnSizes = (0,
|
|
14769
|
+
const updateColumnSizes = (0, import_react40.useMemo)(() => {
|
|
14738
14770
|
return (previous) => {
|
|
14739
14771
|
const updateSizing = {
|
|
14740
14772
|
...columnSizing,
|
|
@@ -14851,18 +14883,18 @@ var Table = ({
|
|
|
14851
14883
|
columnResizeMode: "onChange",
|
|
14852
14884
|
...tableOptions
|
|
14853
14885
|
});
|
|
14854
|
-
const [hasInitializedSizing, setHasInitializedSizing] = (0,
|
|
14855
|
-
(0,
|
|
14886
|
+
const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react40.useState)(false);
|
|
14887
|
+
(0, import_react40.useEffect)(() => {
|
|
14856
14888
|
if (!hasInitializedSizing && ref.current) {
|
|
14857
14889
|
setHasInitializedSizing(true);
|
|
14858
14890
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
14859
14891
|
}
|
|
14860
14892
|
}, [columnSizing, hasInitializedSizing]);
|
|
14861
|
-
useResizeCallbackWrapper((0,
|
|
14893
|
+
useResizeCallbackWrapper((0, import_react40.useCallback)(() => {
|
|
14862
14894
|
table.setColumnSizing(updateColumnSizes);
|
|
14863
14895
|
}, [updateColumnSizes]));
|
|
14864
14896
|
const pageCount = table.getPageCount();
|
|
14865
|
-
(0,
|
|
14897
|
+
(0, import_react40.useEffect)(() => {
|
|
14866
14898
|
const totalPages = pageCount;
|
|
14867
14899
|
if (totalPages === 0) {
|
|
14868
14900
|
if (pagination.pageIndex !== 0) {
|
|
@@ -14878,7 +14910,7 @@ var Table = ({
|
|
|
14878
14910
|
}));
|
|
14879
14911
|
}
|
|
14880
14912
|
}, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
|
|
14881
|
-
const columnSizeVars = (0,
|
|
14913
|
+
const columnSizeVars = (0, import_react40.useMemo)(() => {
|
|
14882
14914
|
const headers = table.getFlatHeaders();
|
|
14883
14915
|
const colSizes = {};
|
|
14884
14916
|
for (let i = 0; i < headers.length; i++) {
|
|
@@ -15013,7 +15045,7 @@ var TableWithSelection = ({
|
|
|
15013
15045
|
meta,
|
|
15014
15046
|
...props
|
|
15015
15047
|
}) => {
|
|
15016
|
-
const columnsWithSelection = (0,
|
|
15048
|
+
const columnsWithSelection = (0, import_react40.useMemo)(() => {
|
|
15017
15049
|
return [
|
|
15018
15050
|
{
|
|
15019
15051
|
id: selectionRowId,
|
|
@@ -15082,7 +15114,7 @@ var TableWithSelection = ({
|
|
|
15082
15114
|
};
|
|
15083
15115
|
|
|
15084
15116
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
15085
|
-
var
|
|
15117
|
+
var import_react41 = require("react");
|
|
15086
15118
|
var import_clsx49 = require("clsx");
|
|
15087
15119
|
|
|
15088
15120
|
// src/utils/writeToClipboard.ts
|
|
@@ -15102,8 +15134,8 @@ var CopyToClipboardWrapper = ({
|
|
|
15102
15134
|
zIndex = 10
|
|
15103
15135
|
}) => {
|
|
15104
15136
|
const translation = useTranslation([formTranslation]);
|
|
15105
|
-
const [isShowingIndication, setIsShowingIndication] = (0,
|
|
15106
|
-
const [isShowingConfirmation, setIsShowingConfirmation] = (0,
|
|
15137
|
+
const [isShowingIndication, setIsShowingIndication] = (0, import_react41.useState)(false);
|
|
15138
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react41.useState)(false);
|
|
15107
15139
|
const positionClasses = {
|
|
15108
15140
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
15109
15141
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -15245,7 +15277,7 @@ var DateTimePicker = ({
|
|
|
15245
15277
|
};
|
|
15246
15278
|
|
|
15247
15279
|
// src/components/user-action/ScrollPicker.tsx
|
|
15248
|
-
var
|
|
15280
|
+
var import_react42 = require("react");
|
|
15249
15281
|
var import_clsx51 = __toESM(require("clsx"));
|
|
15250
15282
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
15251
15283
|
var up = 1;
|
|
@@ -15266,7 +15298,7 @@ var ScrollPicker = ({
|
|
|
15266
15298
|
transition,
|
|
15267
15299
|
items,
|
|
15268
15300
|
lastTimeStamp
|
|
15269
|
-
}, setAnimation] = (0,
|
|
15301
|
+
}, setAnimation] = (0, import_react42.useState)({
|
|
15270
15302
|
targetIndex: selectedIndex,
|
|
15271
15303
|
currentIndex: disabled ? selectedIndex : 0,
|
|
15272
15304
|
velocity: 0,
|
|
@@ -15282,7 +15314,7 @@ var ScrollPicker = ({
|
|
|
15282
15314
|
const itemHeight = 40;
|
|
15283
15315
|
const distance = 8;
|
|
15284
15316
|
const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
|
|
15285
|
-
const getDirection = (0,
|
|
15317
|
+
const getDirection = (0, import_react42.useCallback)((targetIndex, currentIndex2, transition2, length) => {
|
|
15286
15318
|
if (targetIndex === currentIndex2) {
|
|
15287
15319
|
return transition2 > 0 ? up : down;
|
|
15288
15320
|
}
|
|
@@ -15292,7 +15324,7 @@ var ScrollPicker = ({
|
|
|
15292
15324
|
}
|
|
15293
15325
|
return distanceForward >= length / 2 ? down : up;
|
|
15294
15326
|
}, []);
|
|
15295
|
-
const animate = (0,
|
|
15327
|
+
const animate = (0, import_react42.useCallback)((timestamp, startTime) => {
|
|
15296
15328
|
setAnimation((prevState) => {
|
|
15297
15329
|
const {
|
|
15298
15330
|
targetIndex,
|
|
@@ -15365,7 +15397,7 @@ var ScrollPicker = ({
|
|
|
15365
15397
|
};
|
|
15366
15398
|
});
|
|
15367
15399
|
}, [disabled, getDirection, onChange]);
|
|
15368
|
-
(0,
|
|
15400
|
+
(0, import_react42.useEffect)(() => {
|
|
15369
15401
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
15370
15402
|
});
|
|
15371
15403
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -15533,18 +15565,18 @@ var Tooltip = ({
|
|
|
15533
15565
|
};
|
|
15534
15566
|
|
|
15535
15567
|
// src/components/user-action/input/InsideLabelInput.tsx
|
|
15536
|
-
var
|
|
15537
|
-
var
|
|
15568
|
+
var import_react43 = require("react");
|
|
15569
|
+
var import_react44 = require("react");
|
|
15538
15570
|
var import_clsx54 = __toESM(require("clsx"));
|
|
15539
15571
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
15540
|
-
var InsideLabelInput = (0,
|
|
15572
|
+
var InsideLabelInput = (0, import_react44.forwardRef)(function InsideLabelInput2({
|
|
15541
15573
|
id: customId,
|
|
15542
15574
|
label,
|
|
15543
15575
|
...props
|
|
15544
15576
|
}, forwardedRef) {
|
|
15545
15577
|
const { value } = props;
|
|
15546
|
-
const [isFocused, setIsFocused] = (0,
|
|
15547
|
-
const generatedId = (0,
|
|
15578
|
+
const [isFocused, setIsFocused] = (0, import_react44.useState)(false);
|
|
15579
|
+
const generatedId = (0, import_react43.useId)();
|
|
15548
15580
|
const id = customId ?? generatedId;
|
|
15549
15581
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: (0, import_clsx54.default)("relative"), children: [
|
|
15550
15582
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
@@ -15597,20 +15629,20 @@ var InsideLabelInputUncontrolled = ({
|
|
|
15597
15629
|
};
|
|
15598
15630
|
|
|
15599
15631
|
// src/components/user-action/input/ToggleableInput.tsx
|
|
15600
|
-
var
|
|
15632
|
+
var import_react45 = require("react");
|
|
15601
15633
|
var import_lucide_react24 = require("lucide-react");
|
|
15602
15634
|
var import_clsx55 = __toESM(require("clsx"));
|
|
15603
15635
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
15604
|
-
var ToggleableInput = (0,
|
|
15636
|
+
var ToggleableInput = (0, import_react45.forwardRef)(function ToggleableInput2({
|
|
15605
15637
|
value,
|
|
15606
15638
|
initialState = "display",
|
|
15607
15639
|
editCompleteOptions,
|
|
15608
15640
|
...props
|
|
15609
15641
|
}, forwardedRef) {
|
|
15610
|
-
const [isEditing, setIsEditing] = (0,
|
|
15611
|
-
const innerRef = (0,
|
|
15612
|
-
(0,
|
|
15613
|
-
(0,
|
|
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)(() => {
|
|
15614
15646
|
if (isEditing) {
|
|
15615
15647
|
innerRef.current?.focus();
|
|
15616
15648
|
}
|
|
@@ -15665,33 +15697,33 @@ var ToggleableInputUncontrolled = ({
|
|
|
15665
15697
|
};
|
|
15666
15698
|
|
|
15667
15699
|
// src/components/utils/FocusTrap.tsx
|
|
15668
|
-
var import_react44 = require("react");
|
|
15669
|
-
var import_react45 = require("react");
|
|
15670
15700
|
var import_react46 = require("react");
|
|
15701
|
+
var import_react47 = require("react");
|
|
15702
|
+
var import_react48 = require("react");
|
|
15671
15703
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
15672
|
-
var FocusTrap = (0,
|
|
15704
|
+
var FocusTrap = (0, import_react48.forwardRef)(function FocusTrap2({
|
|
15673
15705
|
active = true,
|
|
15674
15706
|
initialFocus,
|
|
15675
15707
|
focusFirst = false,
|
|
15676
15708
|
...props
|
|
15677
15709
|
}, forwardedRef) {
|
|
15678
|
-
const innerRef = (0,
|
|
15679
|
-
(0,
|
|
15710
|
+
const innerRef = (0, import_react46.useRef)(null);
|
|
15711
|
+
(0, import_react47.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
15680
15712
|
useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
|
|
15681
15713
|
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { ref: innerRef, ...props });
|
|
15682
15714
|
});
|
|
15683
15715
|
|
|
15684
15716
|
// src/components/utils/Transition.tsx
|
|
15685
|
-
var
|
|
15717
|
+
var import_react49 = require("react");
|
|
15686
15718
|
function Transition({
|
|
15687
15719
|
children,
|
|
15688
15720
|
show,
|
|
15689
15721
|
includeAnimation = true
|
|
15690
15722
|
}) {
|
|
15691
|
-
const [isOpen, setIsOpen] = (0,
|
|
15692
|
-
const [isTransitioning, setIsTransitioning] = (0,
|
|
15723
|
+
const [isOpen, setIsOpen] = (0, import_react49.useState)(show);
|
|
15724
|
+
const [isTransitioning, setIsTransitioning] = (0, import_react49.useState)(!isOpen);
|
|
15693
15725
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
15694
|
-
(0,
|
|
15726
|
+
(0, import_react49.useEffect)(() => {
|
|
15695
15727
|
setIsOpen(show);
|
|
15696
15728
|
setIsTransitioning(true);
|
|
15697
15729
|
}, [show]);
|
|
@@ -15716,7 +15748,7 @@ function Transition({
|
|
|
15716
15748
|
}
|
|
15717
15749
|
|
|
15718
15750
|
// src/hooks/focus/useFocusGuards.ts
|
|
15719
|
-
var
|
|
15751
|
+
var import_react50 = require("react");
|
|
15720
15752
|
var selectorName = "data-hw-focus-guard";
|
|
15721
15753
|
function FocusGuard() {
|
|
15722
15754
|
const element = document.createElement("div");
|
|
@@ -15754,7 +15786,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
15754
15786
|
}
|
|
15755
15787
|
};
|
|
15756
15788
|
var useFocusGuards = () => {
|
|
15757
|
-
(0,
|
|
15789
|
+
(0, import_react50.useEffect)(() => {
|
|
15758
15790
|
FocusGuardsService.getInstance().add();
|
|
15759
15791
|
return () => {
|
|
15760
15792
|
FocusGuardsService.getInstance().remove();
|
|
@@ -15763,10 +15795,10 @@ var useFocusGuards = () => {
|
|
|
15763
15795
|
};
|
|
15764
15796
|
|
|
15765
15797
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
15766
|
-
var
|
|
15798
|
+
var import_react51 = __toESM(require("react"));
|
|
15767
15799
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
15768
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
15769
|
-
(0,
|
|
15800
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react51.default.useState(false);
|
|
15801
|
+
(0, import_react51.useEffect)(() => {
|
|
15770
15802
|
if (disable || hasUsedFocus) {
|
|
15771
15803
|
return;
|
|
15772
15804
|
}
|
|
@@ -15786,13 +15818,13 @@ var useFocusOnceVisible = (ref, disable = false) => {
|
|
|
15786
15818
|
};
|
|
15787
15819
|
|
|
15788
15820
|
// src/hooks/useRerender.ts
|
|
15789
|
-
var
|
|
15821
|
+
var import_react52 = require("react");
|
|
15790
15822
|
var useRerender = () => {
|
|
15791
|
-
return (0,
|
|
15823
|
+
return (0, import_react52.useReducer)(() => ({}), {})[1];
|
|
15792
15824
|
};
|
|
15793
15825
|
|
|
15794
15826
|
// src/hooks/useSearch.ts
|
|
15795
|
-
var
|
|
15827
|
+
var import_react53 = require("react");
|
|
15796
15828
|
|
|
15797
15829
|
// src/utils/simpleSearch.ts
|
|
15798
15830
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -15831,34 +15863,34 @@ var useSearch = ({
|
|
|
15831
15863
|
filter,
|
|
15832
15864
|
disabled = false
|
|
15833
15865
|
}) => {
|
|
15834
|
-
const [search, setSearch] = (0,
|
|
15835
|
-
const [result, setResult] = (0,
|
|
15836
|
-
const searchTags = (0,
|
|
15837
|
-
const updateSearch = (0,
|
|
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) => {
|
|
15838
15870
|
const usedSearch = newSearch ?? search;
|
|
15839
15871
|
if (newSearch) {
|
|
15840
15872
|
setSearch(search);
|
|
15841
15873
|
}
|
|
15842
15874
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
15843
15875
|
}, [searchTags, list, search, searchMapping]);
|
|
15844
|
-
(0,
|
|
15876
|
+
(0, import_react53.useEffect)(() => {
|
|
15845
15877
|
if (isSearchInstant) {
|
|
15846
15878
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
15847
15879
|
}
|
|
15848
15880
|
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
15849
|
-
const filteredResult = (0,
|
|
15881
|
+
const filteredResult = (0, import_react53.useMemo)(() => {
|
|
15850
15882
|
if (!filter) {
|
|
15851
15883
|
return result;
|
|
15852
15884
|
}
|
|
15853
15885
|
return result.filter(filter);
|
|
15854
15886
|
}, [result, filter]);
|
|
15855
|
-
const sortedAndFilteredResult = (0,
|
|
15887
|
+
const sortedAndFilteredResult = (0, import_react53.useMemo)(() => {
|
|
15856
15888
|
if (!sortingFunction) {
|
|
15857
15889
|
return filteredResult;
|
|
15858
15890
|
}
|
|
15859
15891
|
return filteredResult.sort(sortingFunction);
|
|
15860
15892
|
}, [filteredResult, sortingFunction]);
|
|
15861
|
-
const usedResult = (0,
|
|
15893
|
+
const usedResult = (0, import_react53.useMemo)(() => {
|
|
15862
15894
|
if (!disabled) {
|
|
15863
15895
|
return sortedAndFilteredResult;
|
|
15864
15896
|
}
|