@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/components/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 useState35 = React20.useState;
|
|
42
|
+
var useEffect36 = React20.useEffect;
|
|
43
43
|
var useLayoutEffect3 = React20.useLayoutEffect;
|
|
44
44
|
var useDebugValue = React20.useDebugValue;
|
|
45
45
|
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
46
|
-
var value = getSnapshot(), _useState =
|
|
46
|
+
var value = getSnapshot(), _useState = useState35({ 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
|
+
useEffect36(
|
|
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 = useState35({
|
|
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
|
+
useEffect36(
|
|
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 React20 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
142
|
+
var React20 = require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState35 = React20.useState, useEffect36 = React20.useEffect, useLayoutEffect3 = React20.useLayoutEffect, useDebugValue = React20.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 !== React20.useSyncExternalStore ? React20.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
|
}();
|
|
@@ -7826,6 +7826,8 @@ var import_clsx10 = __toESM(require("clsx"));
|
|
|
7826
7826
|
|
|
7827
7827
|
// src/components/dialog/Dialog.tsx
|
|
7828
7828
|
var import_react13 = require("react");
|
|
7829
|
+
var import_react14 = require("react");
|
|
7830
|
+
var import_react15 = require("react");
|
|
7829
7831
|
var import_clsx9 = __toESM(require("clsx"));
|
|
7830
7832
|
var import_lucide_react3 = require("lucide-react");
|
|
7831
7833
|
|
|
@@ -8190,10 +8192,21 @@ var Dialog = ({
|
|
|
8190
8192
|
onClose,
|
|
8191
8193
|
className,
|
|
8192
8194
|
backgroundClassName,
|
|
8193
|
-
position = "center"
|
|
8195
|
+
position = "center",
|
|
8196
|
+
isAnimated = true
|
|
8194
8197
|
}) => {
|
|
8195
8198
|
const translation = useTranslation([formTranslation]);
|
|
8196
|
-
const
|
|
8199
|
+
const [visible, setVisible] = (0, import_react14.useState)(isOpen);
|
|
8200
|
+
const ref = (0, import_react15.useRef)(null);
|
|
8201
|
+
(0, import_react13.useEffect)(() => {
|
|
8202
|
+
if (isOpen) {
|
|
8203
|
+
setVisible(true);
|
|
8204
|
+
} else {
|
|
8205
|
+
if (!isAnimated) {
|
|
8206
|
+
setVisible(false);
|
|
8207
|
+
}
|
|
8208
|
+
}
|
|
8209
|
+
}, [isAnimated, isOpen]);
|
|
8197
8210
|
const onCloseWrapper = () => {
|
|
8198
8211
|
if (!isModal) return;
|
|
8199
8212
|
onClose?.();
|
|
@@ -8201,7 +8214,7 @@ var Dialog = ({
|
|
|
8201
8214
|
useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
|
|
8202
8215
|
useFocusTrap({
|
|
8203
8216
|
container: ref,
|
|
8204
|
-
active:
|
|
8217
|
+
active: visible,
|
|
8205
8218
|
focusFirst: true
|
|
8206
8219
|
});
|
|
8207
8220
|
const positionMap = {
|
|
@@ -8215,6 +8228,7 @@ var Dialog = ({
|
|
|
8215
8228
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
8216
8229
|
"div",
|
|
8217
8230
|
{
|
|
8231
|
+
hidden: !visible,
|
|
8218
8232
|
className: (0, import_clsx9.default)(
|
|
8219
8233
|
"fixed inset-0 h-screen w-screen bg-overlay-shadow z-100",
|
|
8220
8234
|
{
|
|
@@ -8223,21 +8237,30 @@ var Dialog = ({
|
|
|
8223
8237
|
},
|
|
8224
8238
|
backgroundClassName
|
|
8225
8239
|
),
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8240
|
+
onAnimationEnd: () => {
|
|
8241
|
+
if (!isOpen) {
|
|
8242
|
+
setVisible(false);
|
|
8243
|
+
}
|
|
8244
|
+
},
|
|
8245
|
+
onClick: onCloseWrapper,
|
|
8246
|
+
"aria-hidden": true
|
|
8229
8247
|
}
|
|
8230
8248
|
),
|
|
8231
8249
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
8232
8250
|
"div",
|
|
8233
8251
|
{
|
|
8234
8252
|
ref,
|
|
8235
|
-
hidden: !
|
|
8253
|
+
hidden: !visible,
|
|
8236
8254
|
onKeyDown: (event) => {
|
|
8237
8255
|
if (event.key === "Escape") {
|
|
8238
8256
|
onCloseWrapper();
|
|
8239
8257
|
}
|
|
8240
8258
|
},
|
|
8259
|
+
onAnimationEnd: () => {
|
|
8260
|
+
if (!isOpen) {
|
|
8261
|
+
setVisible(false);
|
|
8262
|
+
}
|
|
8263
|
+
},
|
|
8241
8264
|
className: (0, import_clsx9.default)(
|
|
8242
8265
|
"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",
|
|
8243
8266
|
{
|
|
@@ -8362,17 +8385,17 @@ var DiscardChangesDialog = ({
|
|
|
8362
8385
|
};
|
|
8363
8386
|
|
|
8364
8387
|
// src/components/user-action/input/Input.tsx
|
|
8365
|
-
var
|
|
8388
|
+
var import_react18 = require("react");
|
|
8366
8389
|
var import_clsx11 = __toESM(require("clsx"));
|
|
8367
8390
|
|
|
8368
8391
|
// src/hooks/useDelay.ts
|
|
8369
|
-
var
|
|
8392
|
+
var import_react16 = require("react");
|
|
8370
8393
|
var defaultOptions2 = {
|
|
8371
8394
|
delay: 3e3,
|
|
8372
8395
|
disabled: false
|
|
8373
8396
|
};
|
|
8374
8397
|
function useDelay(options) {
|
|
8375
|
-
const [timer, setTimer] = (0,
|
|
8398
|
+
const [timer, setTimer] = (0, import_react16.useState)(void 0);
|
|
8376
8399
|
const { delay, disabled } = {
|
|
8377
8400
|
...defaultOptions2,
|
|
8378
8401
|
...options
|
|
@@ -8391,12 +8414,12 @@ function useDelay(options) {
|
|
|
8391
8414
|
setTimer(void 0);
|
|
8392
8415
|
}, delay));
|
|
8393
8416
|
};
|
|
8394
|
-
(0,
|
|
8417
|
+
(0, import_react16.useEffect)(() => {
|
|
8395
8418
|
return () => {
|
|
8396
8419
|
clearTimeout(timer);
|
|
8397
8420
|
};
|
|
8398
8421
|
}, [timer]);
|
|
8399
|
-
(0,
|
|
8422
|
+
(0, import_react16.useEffect)(() => {
|
|
8400
8423
|
if (disabled) {
|
|
8401
8424
|
clearTimeout(timer);
|
|
8402
8425
|
setTimer(void 0);
|
|
@@ -8406,9 +8429,9 @@ function useDelay(options) {
|
|
|
8406
8429
|
}
|
|
8407
8430
|
|
|
8408
8431
|
// src/hooks/focus/useFocusManagement.ts
|
|
8409
|
-
var
|
|
8432
|
+
var import_react17 = require("react");
|
|
8410
8433
|
function useFocusManagement() {
|
|
8411
|
-
const getFocusableElements = (0,
|
|
8434
|
+
const getFocusableElements = (0, import_react17.useCallback)(() => {
|
|
8412
8435
|
return Array.from(
|
|
8413
8436
|
document.querySelectorAll(
|
|
8414
8437
|
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -8417,7 +8440,7 @@ function useFocusManagement() {
|
|
|
8417
8440
|
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
8418
8441
|
);
|
|
8419
8442
|
}, []);
|
|
8420
|
-
const getNextFocusElement = (0,
|
|
8443
|
+
const getNextFocusElement = (0, import_react17.useCallback)(() => {
|
|
8421
8444
|
const elements = getFocusableElements();
|
|
8422
8445
|
if (elements.length === 0) {
|
|
8423
8446
|
return void 0;
|
|
@@ -8429,11 +8452,11 @@ function useFocusManagement() {
|
|
|
8429
8452
|
}
|
|
8430
8453
|
return nextElement;
|
|
8431
8454
|
}, [getFocusableElements]);
|
|
8432
|
-
const focusNext = (0,
|
|
8455
|
+
const focusNext = (0, import_react17.useCallback)(() => {
|
|
8433
8456
|
const nextElement = getNextFocusElement();
|
|
8434
8457
|
nextElement?.focus();
|
|
8435
8458
|
}, [getNextFocusElement]);
|
|
8436
|
-
const getPreviousFocusElement = (0,
|
|
8459
|
+
const getPreviousFocusElement = (0, import_react17.useCallback)(() => {
|
|
8437
8460
|
const elements = getFocusableElements();
|
|
8438
8461
|
if (elements.length === 0) {
|
|
8439
8462
|
return void 0;
|
|
@@ -8449,7 +8472,7 @@ function useFocusManagement() {
|
|
|
8449
8472
|
}
|
|
8450
8473
|
return previousElement;
|
|
8451
8474
|
}, [getFocusableElements]);
|
|
8452
|
-
const focusPrevious = (0,
|
|
8475
|
+
const focusPrevious = (0, import_react17.useCallback)(() => {
|
|
8453
8476
|
const previousElement = getPreviousFocusElement();
|
|
8454
8477
|
if (previousElement) previousElement.focus();
|
|
8455
8478
|
}, [getPreviousFocusElement]);
|
|
@@ -8470,7 +8493,7 @@ var defaultEditCompleteOptions = {
|
|
|
8470
8493
|
afterDelay: true,
|
|
8471
8494
|
delay: 2500
|
|
8472
8495
|
};
|
|
8473
|
-
var Input = (0,
|
|
8496
|
+
var Input = (0, import_react18.forwardRef)(function Input2({
|
|
8474
8497
|
value,
|
|
8475
8498
|
onChange,
|
|
8476
8499
|
onChangeText,
|
|
@@ -8492,8 +8515,8 @@ var Input = (0, import_react16.forwardRef)(function Input2({
|
|
|
8492
8515
|
restartTimer,
|
|
8493
8516
|
clearTimer
|
|
8494
8517
|
} = useDelay({ delay, disabled: !afterDelay });
|
|
8495
|
-
const innerRef = (0,
|
|
8496
|
-
(0,
|
|
8518
|
+
const innerRef = (0, import_react18.useRef)(null);
|
|
8519
|
+
(0, import_react18.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
8497
8520
|
const { focusNext } = useFocusManagement();
|
|
8498
8521
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8499
8522
|
"input",
|
|
@@ -8578,7 +8601,7 @@ var InputDialog = ({
|
|
|
8578
8601
|
};
|
|
8579
8602
|
|
|
8580
8603
|
// src/components/user-action/select/Select.tsx
|
|
8581
|
-
var
|
|
8604
|
+
var import_react20 = require("react");
|
|
8582
8605
|
var import_clsx13 = __toESM(require("clsx"));
|
|
8583
8606
|
|
|
8584
8607
|
// src/utils/match.ts
|
|
@@ -8672,7 +8695,7 @@ var ChipList = ({
|
|
|
8672
8695
|
};
|
|
8673
8696
|
|
|
8674
8697
|
// src/hooks/useFloatingElement.ts
|
|
8675
|
-
var
|
|
8698
|
+
var import_react19 = require("react");
|
|
8676
8699
|
|
|
8677
8700
|
// src/utils/math.ts
|
|
8678
8701
|
var clamp = (value, range2 = [0, 1]) => {
|
|
@@ -8735,9 +8758,9 @@ function useFloatingElement({
|
|
|
8735
8758
|
screenPadding = 16,
|
|
8736
8759
|
gap = 4
|
|
8737
8760
|
}) {
|
|
8738
|
-
const [style, setStyle] = (0,
|
|
8761
|
+
const [style, setStyle] = (0, import_react19.useState)();
|
|
8739
8762
|
const isMounted = useIsMounted();
|
|
8740
|
-
const calculate = (0,
|
|
8763
|
+
const calculate = (0, import_react19.useCallback)(() => {
|
|
8741
8764
|
const containerRect = containerRef.current.getBoundingClientRect();
|
|
8742
8765
|
const windowRect = windowRef?.current.getBoundingClientRect() ?? {
|
|
8743
8766
|
top: 0,
|
|
@@ -8767,14 +8790,14 @@ function useFloatingElement({
|
|
|
8767
8790
|
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
8768
8791
|
const height = containerRef.current?.getBoundingClientRect().height;
|
|
8769
8792
|
const width = containerRef.current?.getBoundingClientRect().width;
|
|
8770
|
-
(0,
|
|
8793
|
+
(0, import_react19.useEffect)(() => {
|
|
8771
8794
|
if (active && isMounted) {
|
|
8772
8795
|
calculate();
|
|
8773
8796
|
} else {
|
|
8774
8797
|
setStyle(void 0);
|
|
8775
8798
|
}
|
|
8776
8799
|
}, [calculate, active, isMounted, height, width]);
|
|
8777
|
-
(0,
|
|
8800
|
+
(0, import_react19.useEffect)(() => {
|
|
8778
8801
|
window.addEventListener("resize", calculate);
|
|
8779
8802
|
let timeout;
|
|
8780
8803
|
if (isPolling) {
|
|
@@ -8796,9 +8819,9 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
|
8796
8819
|
var defaultToggleOpenOptions = {
|
|
8797
8820
|
highlightStartPosition: "first"
|
|
8798
8821
|
};
|
|
8799
|
-
var SelectContext = (0,
|
|
8822
|
+
var SelectContext = (0, import_react20.createContext)(null);
|
|
8800
8823
|
function useSelectContext() {
|
|
8801
|
-
const ctx = (0,
|
|
8824
|
+
const ctx = (0, import_react20.useContext)(SelectContext);
|
|
8802
8825
|
if (!ctx) {
|
|
8803
8826
|
throw new Error("SelectContext must be used within a ListBoxPrimitive");
|
|
8804
8827
|
}
|
|
@@ -8817,11 +8840,11 @@ var SelectRoot = ({
|
|
|
8817
8840
|
isMultiSelect = false,
|
|
8818
8841
|
iconAppearance = "left"
|
|
8819
8842
|
}) => {
|
|
8820
|
-
const [options, setOptions] = (0,
|
|
8821
|
-
const triggerRef = (0,
|
|
8822
|
-
const generatedId = (0,
|
|
8843
|
+
const [options, setOptions] = (0, import_react20.useState)([]);
|
|
8844
|
+
const triggerRef = (0, import_react20.useRef)(null);
|
|
8845
|
+
const generatedId = (0, import_react20.useId)();
|
|
8823
8846
|
const usedId = id ?? generatedId;
|
|
8824
|
-
const [internalState, setInternalState] = (0,
|
|
8847
|
+
const [internalState, setInternalState] = (0, import_react20.useState)({
|
|
8825
8848
|
isOpen
|
|
8826
8849
|
});
|
|
8827
8850
|
const selectedValues = isMultiSelect ? values ?? [] : [value].filter(Boolean);
|
|
@@ -8838,7 +8861,7 @@ var SelectRoot = ({
|
|
|
8838
8861
|
isMultiSelect,
|
|
8839
8862
|
iconAppearance
|
|
8840
8863
|
};
|
|
8841
|
-
const registerItem = (0,
|
|
8864
|
+
const registerItem = (0, import_react20.useCallback)((item) => {
|
|
8842
8865
|
setOptions((prev) => {
|
|
8843
8866
|
const updated = [...prev, item];
|
|
8844
8867
|
updated.sort((a, b) => {
|
|
@@ -8850,7 +8873,7 @@ var SelectRoot = ({
|
|
|
8850
8873
|
return updated;
|
|
8851
8874
|
});
|
|
8852
8875
|
}, []);
|
|
8853
|
-
const unregisterItem = (0,
|
|
8876
|
+
const unregisterItem = (0, import_react20.useCallback)((value2) => {
|
|
8854
8877
|
setOptions((prev) => prev.filter((i) => i.value !== value2));
|
|
8855
8878
|
}, []);
|
|
8856
8879
|
const toggleSelection = (value2, isSelected) => {
|
|
@@ -8893,10 +8916,10 @@ var SelectRoot = ({
|
|
|
8893
8916
|
highlightedValue: value2
|
|
8894
8917
|
}));
|
|
8895
8918
|
};
|
|
8896
|
-
const registerTrigger = (0,
|
|
8919
|
+
const registerTrigger = (0, import_react20.useCallback)((ref) => {
|
|
8897
8920
|
triggerRef.current = ref.current;
|
|
8898
8921
|
}, []);
|
|
8899
|
-
const unregisterTrigger = (0,
|
|
8922
|
+
const unregisterTrigger = (0, import_react20.useCallback)(() => {
|
|
8900
8923
|
triggerRef.current = null;
|
|
8901
8924
|
}, []);
|
|
8902
8925
|
const toggleOpen = (isOpen2, toggleOpenOptions) => {
|
|
@@ -8937,7 +8960,7 @@ var SelectRoot = ({
|
|
|
8937
8960
|
highlightedValue
|
|
8938
8961
|
}));
|
|
8939
8962
|
};
|
|
8940
|
-
(0,
|
|
8963
|
+
(0, import_react20.useEffect)(() => {
|
|
8941
8964
|
if (!internalState.highlightedValue) return;
|
|
8942
8965
|
const highlighted = options.find((value2) => value2.value === internalState.highlightedValue);
|
|
8943
8966
|
if (highlighted) {
|
|
@@ -8965,14 +8988,14 @@ var SelectRoot = ({
|
|
|
8965
8988
|
};
|
|
8966
8989
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContext.Provider, { value: contextValue, children });
|
|
8967
8990
|
};
|
|
8968
|
-
var SelectOption = (0,
|
|
8991
|
+
var SelectOption = (0, import_react20.forwardRef)(
|
|
8969
8992
|
function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
|
|
8970
8993
|
const { state, config, item, trigger } = useSelectContext();
|
|
8971
8994
|
const { register, unregister, toggleSelection, highlightItem } = item;
|
|
8972
|
-
const itemRef = (0,
|
|
8995
|
+
const itemRef = (0, import_react20.useRef)(null);
|
|
8973
8996
|
iconAppearance ??= config.iconAppearance;
|
|
8974
8997
|
const label = children ?? value;
|
|
8975
|
-
(0,
|
|
8998
|
+
(0, import_react20.useEffect)(() => {
|
|
8976
8999
|
register({
|
|
8977
9000
|
value,
|
|
8978
9001
|
label,
|
|
@@ -9050,13 +9073,13 @@ var defaultSelectButtonTranslation = {
|
|
|
9050
9073
|
clickToSelect: "Zum ausw\xE4hlen dr\xFCcken"
|
|
9051
9074
|
}
|
|
9052
9075
|
};
|
|
9053
|
-
var SelectButton = (0,
|
|
9076
|
+
var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
|
|
9054
9077
|
const translation = useTranslation([defaultSelectButtonTranslation]);
|
|
9055
9078
|
const { state, trigger } = useSelectContext();
|
|
9056
9079
|
const { register, unregister, toggleOpen } = trigger;
|
|
9057
|
-
const innerRef = (0,
|
|
9058
|
-
(0,
|
|
9059
|
-
(0,
|
|
9080
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
9081
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
|
|
9082
|
+
(0, import_react20.useEffect)(() => {
|
|
9060
9083
|
register(innerRef);
|
|
9061
9084
|
return () => unregister();
|
|
9062
9085
|
}, [register, unregister]);
|
|
@@ -9129,12 +9152,12 @@ var SelectButton = (0, import_react18.forwardRef)(function SelectButton2({ place
|
|
|
9129
9152
|
}
|
|
9130
9153
|
);
|
|
9131
9154
|
});
|
|
9132
|
-
var SelectChipDisplay = (0,
|
|
9155
|
+
var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
|
|
9133
9156
|
const { state, trigger, item } = useSelectContext();
|
|
9134
9157
|
const { register, unregister, toggleOpen } = trigger;
|
|
9135
|
-
const innerRef = (0,
|
|
9136
|
-
(0,
|
|
9137
|
-
(0,
|
|
9158
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
9159
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
|
|
9160
|
+
(0, import_react20.useEffect)(() => {
|
|
9138
9161
|
register(innerRef);
|
|
9139
9162
|
return () => unregister();
|
|
9140
9163
|
}, [register, unregister]);
|
|
@@ -9197,14 +9220,14 @@ var SelectChipDisplay = (0, import_react18.forwardRef)(function SelectChipDispla
|
|
|
9197
9220
|
}
|
|
9198
9221
|
);
|
|
9199
9222
|
});
|
|
9200
|
-
var SelectContent = (0,
|
|
9223
|
+
var SelectContent = (0, import_react20.forwardRef)(
|
|
9201
9224
|
function SelectContent2({
|
|
9202
9225
|
alignment,
|
|
9203
9226
|
orientation = "vertical",
|
|
9204
9227
|
...props
|
|
9205
9228
|
}, ref) {
|
|
9206
|
-
const innerRef = (0,
|
|
9207
|
-
(0,
|
|
9229
|
+
const innerRef = (0, import_react20.useRef)(null);
|
|
9230
|
+
(0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
|
|
9208
9231
|
const { trigger, state, config, item } = useSelectContext();
|
|
9209
9232
|
const position = useFloatingElement({
|
|
9210
9233
|
active: state.isOpen,
|
|
@@ -9291,7 +9314,7 @@ var SelectContent = (0, import_react18.forwardRef)(
|
|
|
9291
9314
|
);
|
|
9292
9315
|
}
|
|
9293
9316
|
);
|
|
9294
|
-
var Select = (0,
|
|
9317
|
+
var Select = (0, import_react20.forwardRef)(function Select2({
|
|
9295
9318
|
children,
|
|
9296
9319
|
contentPanelProps,
|
|
9297
9320
|
buttonProps,
|
|
@@ -9313,7 +9336,7 @@ var Select = (0, import_react18.forwardRef)(function Select2({
|
|
|
9313
9336
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
|
|
9314
9337
|
] });
|
|
9315
9338
|
});
|
|
9316
|
-
var SelectUncontrolled = (0,
|
|
9339
|
+
var SelectUncontrolled = (0, import_react20.forwardRef)(function SelectUncontrolled2({
|
|
9317
9340
|
value: initialValue,
|
|
9318
9341
|
onValueChanged,
|
|
9319
9342
|
...props
|
|
@@ -9329,7 +9352,7 @@ var SelectUncontrolled = (0, import_react18.forwardRef)(function SelectUncontrol
|
|
|
9329
9352
|
}
|
|
9330
9353
|
);
|
|
9331
9354
|
});
|
|
9332
|
-
var MultiSelect = (0,
|
|
9355
|
+
var MultiSelect = (0, import_react20.forwardRef)(function MultiSelect2({
|
|
9333
9356
|
children,
|
|
9334
9357
|
contentPanelProps,
|
|
9335
9358
|
buttonProps,
|
|
@@ -9340,7 +9363,7 @@ var MultiSelect = (0, import_react18.forwardRef)(function MultiSelect2({
|
|
|
9340
9363
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
|
|
9341
9364
|
] });
|
|
9342
9365
|
});
|
|
9343
|
-
var MultiSelectUncontrolled = (0,
|
|
9366
|
+
var MultiSelectUncontrolled = (0, import_react20.forwardRef)(function MultiSelectUncontrolled2({
|
|
9344
9367
|
values: initialValues,
|
|
9345
9368
|
onValuesChanged,
|
|
9346
9369
|
...props
|
|
@@ -9356,7 +9379,7 @@ var MultiSelectUncontrolled = (0, import_react18.forwardRef)(function MultiSelec
|
|
|
9356
9379
|
}
|
|
9357
9380
|
);
|
|
9358
9381
|
});
|
|
9359
|
-
var MultiSelectChipDisplay = (0,
|
|
9382
|
+
var MultiSelectChipDisplay = (0, import_react20.forwardRef)(function MultiSelectChipDisplay2({
|
|
9360
9383
|
children,
|
|
9361
9384
|
contentPanelProps,
|
|
9362
9385
|
chipDisplayProps,
|
|
@@ -9367,7 +9390,7 @@ var MultiSelectChipDisplay = (0, import_react18.forwardRef)(function MultiSelect
|
|
|
9367
9390
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
|
|
9368
9391
|
] });
|
|
9369
9392
|
});
|
|
9370
|
-
var MultiSelectChipDisplayUncontrolled = (0,
|
|
9393
|
+
var MultiSelectChipDisplayUncontrolled = (0, import_react20.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
|
|
9371
9394
|
values: initialValues,
|
|
9372
9395
|
onValuesChanged,
|
|
9373
9396
|
...props
|
|
@@ -9440,7 +9463,7 @@ var import_lucide_react5 = require("lucide-react");
|
|
|
9440
9463
|
var import_clsx14 = __toESM(require("clsx"));
|
|
9441
9464
|
|
|
9442
9465
|
// src/theming/useTheme.tsx
|
|
9443
|
-
var
|
|
9466
|
+
var import_react21 = require("react");
|
|
9444
9467
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
9445
9468
|
var themes = ["light", "dark", "system"];
|
|
9446
9469
|
var defaultThemeTypeTranslation = {
|
|
@@ -9467,9 +9490,9 @@ var ThemeUtil = {
|
|
|
9467
9490
|
themes,
|
|
9468
9491
|
translation: defaultThemeTypeTranslation
|
|
9469
9492
|
};
|
|
9470
|
-
var ThemeContext = (0,
|
|
9493
|
+
var ThemeContext = (0, import_react21.createContext)(null);
|
|
9471
9494
|
var useTheme = () => {
|
|
9472
|
-
const context = (0,
|
|
9495
|
+
const context = (0, import_react21.useContext)(ThemeContext);
|
|
9473
9496
|
if (!context) {
|
|
9474
9497
|
throw new Error("useTheme must be used within ThemeContext. Try adding a ThemeProvider around your app.");
|
|
9475
9498
|
}
|
|
@@ -9541,7 +9564,7 @@ var ThemeDialog = ({
|
|
|
9541
9564
|
};
|
|
9542
9565
|
|
|
9543
9566
|
// src/components/form/FormElementWrapper.tsx
|
|
9544
|
-
var
|
|
9567
|
+
var import_react22 = require("react");
|
|
9545
9568
|
var import_clsx16 = require("clsx");
|
|
9546
9569
|
|
|
9547
9570
|
// src/components/user-action/Label.tsx
|
|
@@ -9579,7 +9602,7 @@ var FormElementWrapper = ({
|
|
|
9579
9602
|
containerClassName
|
|
9580
9603
|
}) => {
|
|
9581
9604
|
const [touched, setTouched] = useOverwritableState(initialIsShowingError, onIsShowingError);
|
|
9582
|
-
const generatedId = (0,
|
|
9605
|
+
const generatedId = (0, import_react22.useId)();
|
|
9583
9606
|
const usedId = id ?? generatedId;
|
|
9584
9607
|
const errorId = `${usedId}-description`;
|
|
9585
9608
|
const labelId = `${usedId}-label`;
|
|
@@ -9650,7 +9673,7 @@ var FormElementWrapper = ({
|
|
|
9650
9673
|
|
|
9651
9674
|
// src/components/icons-and-geometry/Avatar.tsx
|
|
9652
9675
|
var import_clsx17 = __toESM(require("clsx"));
|
|
9653
|
-
var
|
|
9676
|
+
var import_react23 = require("react");
|
|
9654
9677
|
var import_lucide_react6 = require("lucide-react");
|
|
9655
9678
|
|
|
9656
9679
|
// node_modules/@radix-ui/react-avatar/dist/index.mjs
|
|
@@ -10049,7 +10072,7 @@ var Avatar2 = ({ image, name, size = "md", fullyRounded, className = "" }) => {
|
|
|
10049
10072
|
maxHeight: pixels
|
|
10050
10073
|
};
|
|
10051
10074
|
const textClassName = textClassNameMapping[size];
|
|
10052
|
-
const displayName = (0,
|
|
10075
|
+
const displayName = (0, import_react23.useMemo)(() => {
|
|
10053
10076
|
const maxLetters = size === "sm" ? 1 : 2;
|
|
10054
10077
|
return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
|
|
10055
10078
|
}, [name, size]);
|
|
@@ -10149,7 +10172,7 @@ var Circle = ({
|
|
|
10149
10172
|
};
|
|
10150
10173
|
|
|
10151
10174
|
// src/components/icons-and-geometry/Ring.tsx
|
|
10152
|
-
var
|
|
10175
|
+
var import_react24 = require("react");
|
|
10153
10176
|
var import_clsx19 = __toESM(require("clsx"));
|
|
10154
10177
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
10155
10178
|
var Ring = ({
|
|
@@ -10178,9 +10201,9 @@ var AnimatedRing = ({
|
|
|
10178
10201
|
onAnimationFinished,
|
|
10179
10202
|
style
|
|
10180
10203
|
}) => {
|
|
10181
|
-
const [currentWidth, setCurrentWidth] = (0,
|
|
10204
|
+
const [currentWidth, setCurrentWidth] = (0, import_react24.useState)(0);
|
|
10182
10205
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10183
|
-
const animate = (0,
|
|
10206
|
+
const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
|
|
10184
10207
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
10185
10208
|
const newWidth = Math.min(width * progress, width);
|
|
10186
10209
|
setCurrentWidth(newWidth);
|
|
@@ -10194,7 +10217,7 @@ var AnimatedRing = ({
|
|
|
10194
10217
|
}
|
|
10195
10218
|
}
|
|
10196
10219
|
}, [milliseconds, onAnimationFinished, repeating, width]);
|
|
10197
|
-
(0,
|
|
10220
|
+
(0, import_react24.useEffect)(() => {
|
|
10198
10221
|
if (currentWidth < width) {
|
|
10199
10222
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10200
10223
|
}
|
|
@@ -10229,10 +10252,10 @@ var RingWave = ({
|
|
|
10229
10252
|
onAnimationFinished,
|
|
10230
10253
|
style
|
|
10231
10254
|
}) => {
|
|
10232
|
-
const [currentInnerSize, setCurrentInnerSize] = (0,
|
|
10255
|
+
const [currentInnerSize, setCurrentInnerSize] = (0, import_react24.useState)(startInnerSize);
|
|
10233
10256
|
const distance = endInnerSize - startInnerSize;
|
|
10234
10257
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10235
|
-
const animate = (0,
|
|
10258
|
+
const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
|
|
10236
10259
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
10237
10260
|
const newInnerSize = Math.min(
|
|
10238
10261
|
startInnerSize + distance * progress,
|
|
@@ -10249,7 +10272,7 @@ var RingWave = ({
|
|
|
10249
10272
|
}
|
|
10250
10273
|
}
|
|
10251
10274
|
}, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
|
|
10252
|
-
(0,
|
|
10275
|
+
(0, import_react24.useEffect)(() => {
|
|
10253
10276
|
if (currentInnerSize < endInnerSize) {
|
|
10254
10277
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10255
10278
|
}
|
|
@@ -10284,7 +10307,7 @@ var RadialRings = ({
|
|
|
10284
10307
|
sizeCircle2 = 200,
|
|
10285
10308
|
sizeCircle3 = 300
|
|
10286
10309
|
}) => {
|
|
10287
|
-
const [currentRing, setCurrentRing] = (0,
|
|
10310
|
+
const [currentRing, setCurrentRing] = (0, import_react24.useState)(0);
|
|
10288
10311
|
const size = sizeCircle3;
|
|
10289
10312
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
10290
10313
|
"div",
|
|
@@ -10433,13 +10456,13 @@ var TagIcon = ({
|
|
|
10433
10456
|
};
|
|
10434
10457
|
|
|
10435
10458
|
// src/components/layout/Carousel.tsx
|
|
10436
|
-
var
|
|
10459
|
+
var import_react25 = require("react");
|
|
10437
10460
|
var import_clsx20 = __toESM(require("clsx"));
|
|
10438
10461
|
var import_lucide_react7 = require("lucide-react");
|
|
10439
10462
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
10440
|
-
var CarouselContext = (0,
|
|
10463
|
+
var CarouselContext = (0, import_react25.createContext)(null);
|
|
10441
10464
|
var useCarouselContext = () => {
|
|
10442
|
-
const context = (0,
|
|
10465
|
+
const context = (0, import_react25.useContext)(CarouselContext);
|
|
10443
10466
|
if (!context) {
|
|
10444
10467
|
console.error("useCarouselContext must be used within CarouselContext");
|
|
10445
10468
|
}
|
|
@@ -10462,7 +10485,7 @@ function CarouselTabs({
|
|
|
10462
10485
|
defaultCarouselTabTranslationType
|
|
10463
10486
|
]);
|
|
10464
10487
|
const { id, slideCount, currentIndex, isLooping } = useCarouselContext();
|
|
10465
|
-
const tabRefs = (0,
|
|
10488
|
+
const tabRefs = (0, import_react25.useRef)([]);
|
|
10466
10489
|
const handleKeyDown = (event, index) => {
|
|
10467
10490
|
let newIndex = index;
|
|
10468
10491
|
if (event.key === "ArrowRight") {
|
|
@@ -10522,7 +10545,7 @@ var defaultCarouselSlideTranslationType = {
|
|
|
10522
10545
|
slideOf: `Slide {{index}} von {{length}} slides`
|
|
10523
10546
|
}
|
|
10524
10547
|
};
|
|
10525
|
-
var CarouselSlide = (0,
|
|
10548
|
+
var CarouselSlide = (0, import_react25.forwardRef)(
|
|
10526
10549
|
function CarouselSlide2({
|
|
10527
10550
|
index,
|
|
10528
10551
|
...props
|
|
@@ -10582,17 +10605,17 @@ var Carousel = ({
|
|
|
10582
10605
|
...props
|
|
10583
10606
|
}) => {
|
|
10584
10607
|
const translation = useTranslation([defaultCarouselTranslationType]);
|
|
10585
|
-
const slideRefs = (0,
|
|
10586
|
-
const [currentIndex, setCurrentIndex] = (0,
|
|
10587
|
-
const [hasFocus, setHasFocus] = (0,
|
|
10588
|
-
const [dragState, setDragState] = (0,
|
|
10608
|
+
const slideRefs = (0, import_react25.useRef)([]);
|
|
10609
|
+
const [currentIndex, setCurrentIndex] = (0, import_react25.useState)(0);
|
|
10610
|
+
const [hasFocus, setHasFocus] = (0, import_react25.useState)(false);
|
|
10611
|
+
const [dragState, setDragState] = (0, import_react25.useState)();
|
|
10589
10612
|
const isPaused = hasFocus;
|
|
10590
|
-
const carouselContainerRef = (0,
|
|
10591
|
-
const [disableClick, setDisableClick] = (0,
|
|
10592
|
-
const timeOut = (0,
|
|
10593
|
-
const length = (0,
|
|
10613
|
+
const carouselContainerRef = (0, import_react25.useRef)(null);
|
|
10614
|
+
const [disableClick, setDisableClick] = (0, import_react25.useState)(false);
|
|
10615
|
+
const timeOut = (0, import_react25.useRef)(void 0);
|
|
10616
|
+
const length = (0, import_react25.useMemo)(() => children.length, [children]);
|
|
10594
10617
|
const paddingItemCount = 3;
|
|
10595
|
-
const generatedId = "carousel" + (0,
|
|
10618
|
+
const generatedId = "carousel" + (0, import_react25.useId)();
|
|
10596
10619
|
const id = props.id ?? generatedId;
|
|
10597
10620
|
if (isAutoPlaying && !isLooping) {
|
|
10598
10621
|
console.error("When isAutoLooping is true, isLooping should also be true");
|
|
@@ -10601,7 +10624,7 @@ var Carousel = ({
|
|
|
10601
10624
|
autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
|
|
10602
10625
|
animationTime = Math.max(100, animationTime);
|
|
10603
10626
|
autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
|
|
10604
|
-
(0,
|
|
10627
|
+
(0, import_react25.useEffect)(() => {
|
|
10605
10628
|
const carousel = carouselContainerRef.current;
|
|
10606
10629
|
if (carousel) {
|
|
10607
10630
|
let onFocus = function() {
|
|
@@ -10624,7 +10647,7 @@ var Carousel = ({
|
|
|
10624
10647
|
const canGoLeft = () => {
|
|
10625
10648
|
return isLooping || currentIndex !== 0;
|
|
10626
10649
|
};
|
|
10627
|
-
const canGoRight = (0,
|
|
10650
|
+
const canGoRight = (0, import_react25.useCallback)(() => {
|
|
10628
10651
|
return isLooping || currentIndex !== length - 1;
|
|
10629
10652
|
}, [currentIndex, isLooping, length]);
|
|
10630
10653
|
const left = () => {
|
|
@@ -10632,12 +10655,12 @@ var Carousel = ({
|
|
|
10632
10655
|
setCurrentIndex(currentIndex - 1);
|
|
10633
10656
|
}
|
|
10634
10657
|
};
|
|
10635
|
-
const right = (0,
|
|
10658
|
+
const right = (0, import_react25.useCallback)(() => {
|
|
10636
10659
|
if (canGoRight()) {
|
|
10637
10660
|
setCurrentIndex((currentIndex + length + 1) % length);
|
|
10638
10661
|
}
|
|
10639
10662
|
}, [canGoRight, currentIndex, length]);
|
|
10640
|
-
(0,
|
|
10663
|
+
(0, import_react25.useEffect)(() => {
|
|
10641
10664
|
if (!timeOut.current && !isPaused) {
|
|
10642
10665
|
if (autoLoopingTimeOut > 0) {
|
|
10643
10666
|
timeOut.current = setTimeout(() => {
|
|
@@ -10689,7 +10712,7 @@ var Carousel = ({
|
|
|
10689
10712
|
}
|
|
10690
10713
|
setDragState(void 0);
|
|
10691
10714
|
};
|
|
10692
|
-
(0,
|
|
10715
|
+
(0, import_react25.useEffect)(() => {
|
|
10693
10716
|
setDisableClick(!dragState);
|
|
10694
10717
|
}, [dragState]);
|
|
10695
10718
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
@@ -11080,11 +11103,11 @@ var FAQSection = ({
|
|
|
11080
11103
|
};
|
|
11081
11104
|
|
|
11082
11105
|
// src/components/layout/FloatingContainer.tsx
|
|
11083
|
-
var
|
|
11106
|
+
var import_react26 = require("react");
|
|
11084
11107
|
var import_react_dom3 = require("react-dom");
|
|
11085
11108
|
var import_clsx23 = require("clsx");
|
|
11086
11109
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
11087
|
-
var FloatingContainer = (0,
|
|
11110
|
+
var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContainer2({
|
|
11088
11111
|
children,
|
|
11089
11112
|
backgroundOverlay,
|
|
11090
11113
|
anchor,
|
|
@@ -11096,8 +11119,8 @@ var FloatingContainer = (0, import_react24.forwardRef)(function FloatingContaine
|
|
|
11096
11119
|
gap = 4,
|
|
11097
11120
|
...props
|
|
11098
11121
|
}, forwardRef17) {
|
|
11099
|
-
const innerRef = (0,
|
|
11100
|
-
(0,
|
|
11122
|
+
const innerRef = (0, import_react26.useRef)(null);
|
|
11123
|
+
(0, import_react26.useImperativeHandle)(forwardRef17, () => innerRef.current);
|
|
11101
11124
|
const position = useFloatingElement({
|
|
11102
11125
|
active: !props.hidden,
|
|
11103
11126
|
containerRef: innerRef,
|
|
@@ -11137,18 +11160,18 @@ var FloatingContainer = (0, import_react24.forwardRef)(function FloatingContaine
|
|
|
11137
11160
|
});
|
|
11138
11161
|
|
|
11139
11162
|
// src/components/layout/ListBox.tsx
|
|
11140
|
-
var
|
|
11163
|
+
var import_react27 = __toESM(require("react"));
|
|
11141
11164
|
var import_clsx24 = require("clsx");
|
|
11142
11165
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
11143
|
-
var ListBoxContext = (0,
|
|
11166
|
+
var ListBoxContext = (0, import_react27.createContext)(null);
|
|
11144
11167
|
function useListBoxContext() {
|
|
11145
|
-
const ctx = (0,
|
|
11168
|
+
const ctx = (0, import_react27.useContext)(ListBoxContext);
|
|
11146
11169
|
if (!ctx) {
|
|
11147
11170
|
throw new Error("ListBoxItem must be used within a ListBoxPrimitive");
|
|
11148
11171
|
}
|
|
11149
11172
|
return ctx;
|
|
11150
11173
|
}
|
|
11151
|
-
var ListBoxItem = (0,
|
|
11174
|
+
var ListBoxItem = (0, import_react27.forwardRef)(
|
|
11152
11175
|
function ListBoxItem2({ value, disabled = false, children, className, ...rest }, ref) {
|
|
11153
11176
|
const {
|
|
11154
11177
|
registerItem,
|
|
@@ -11158,9 +11181,9 @@ var ListBoxItem = (0, import_react25.forwardRef)(
|
|
|
11158
11181
|
onItemClick,
|
|
11159
11182
|
isSelected
|
|
11160
11183
|
} = useListBoxContext();
|
|
11161
|
-
const itemRef = (0,
|
|
11162
|
-
const id =
|
|
11163
|
-
(0,
|
|
11184
|
+
const itemRef = (0, import_react27.useRef)(null);
|
|
11185
|
+
const id = import_react27.default.useId();
|
|
11186
|
+
(0, import_react27.useEffect)(() => {
|
|
11164
11187
|
registerItem({ id, value, disabled, ref: itemRef });
|
|
11165
11188
|
return () => unregisterItem(id);
|
|
11166
11189
|
}, [id, value, disabled, registerItem, unregisterItem]);
|
|
@@ -11202,7 +11225,7 @@ var ListBoxItem = (0, import_react25.forwardRef)(
|
|
|
11202
11225
|
);
|
|
11203
11226
|
}
|
|
11204
11227
|
);
|
|
11205
|
-
var ListBoxPrimitive = (0,
|
|
11228
|
+
var ListBoxPrimitive = (0, import_react27.forwardRef)(
|
|
11206
11229
|
function ListBoxPrimitive2({
|
|
11207
11230
|
value,
|
|
11208
11231
|
onSelectionChanged,
|
|
@@ -11212,9 +11235,9 @@ var ListBoxPrimitive = (0, import_react25.forwardRef)(
|
|
|
11212
11235
|
orientation = "vertical",
|
|
11213
11236
|
...props
|
|
11214
11237
|
}, ref) {
|
|
11215
|
-
const itemsRef = (0,
|
|
11216
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
11217
|
-
const registerItem = (0,
|
|
11238
|
+
const itemsRef = (0, import_react27.useRef)([]);
|
|
11239
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react27.useState)(void 0);
|
|
11240
|
+
const registerItem = (0, import_react27.useCallback)((item) => {
|
|
11218
11241
|
itemsRef.current.push(item);
|
|
11219
11242
|
itemsRef.current.sort((a, b) => {
|
|
11220
11243
|
const aEl = a.ref.current;
|
|
@@ -11223,14 +11246,14 @@ var ListBoxPrimitive = (0, import_react25.forwardRef)(
|
|
|
11223
11246
|
return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
11224
11247
|
});
|
|
11225
11248
|
}, []);
|
|
11226
|
-
const unregisterItem = (0,
|
|
11249
|
+
const unregisterItem = (0, import_react27.useCallback)((id) => {
|
|
11227
11250
|
itemsRef.current = itemsRef.current.filter((i) => i.id !== id);
|
|
11228
11251
|
}, []);
|
|
11229
|
-
const isSelected = (0,
|
|
11252
|
+
const isSelected = (0, import_react27.useCallback)(
|
|
11230
11253
|
(val) => (value ?? []).includes(val),
|
|
11231
11254
|
[value]
|
|
11232
11255
|
);
|
|
11233
|
-
const onItemClickedHandler = (0,
|
|
11256
|
+
const onItemClickedHandler = (0, import_react27.useCallback)(
|
|
11234
11257
|
(id) => {
|
|
11235
11258
|
const index = itemsRef.current.findIndex((i) => i.id === id);
|
|
11236
11259
|
if (index === -1) {
|
|
@@ -11254,13 +11277,13 @@ var ListBoxPrimitive = (0, import_react25.forwardRef)(
|
|
|
11254
11277
|
},
|
|
11255
11278
|
[onItemClicked, isSelection, isMultiple, onSelectionChanged, isSelected, value]
|
|
11256
11279
|
);
|
|
11257
|
-
const setHighlightedId = (0,
|
|
11280
|
+
const setHighlightedId = (0, import_react27.useCallback)((id) => {
|
|
11258
11281
|
const index = itemsRef.current.findIndex((i) => i.id === id);
|
|
11259
11282
|
if (index !== -1) {
|
|
11260
11283
|
setHighlightedIndex(index);
|
|
11261
11284
|
}
|
|
11262
11285
|
}, []);
|
|
11263
|
-
(0,
|
|
11286
|
+
(0, import_react27.useEffect)(() => {
|
|
11264
11287
|
if (highlightedIndex !== void 0) {
|
|
11265
11288
|
itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
|
|
11266
11289
|
}
|
|
@@ -11365,7 +11388,7 @@ var ListBoxMultipleUncontrolled = ({
|
|
|
11365
11388
|
}
|
|
11366
11389
|
);
|
|
11367
11390
|
};
|
|
11368
|
-
var ListBox = (0,
|
|
11391
|
+
var ListBox = (0, import_react27.forwardRef)(function ListBox2({
|
|
11369
11392
|
value,
|
|
11370
11393
|
onSelectionChanged,
|
|
11371
11394
|
...props
|
|
@@ -12499,7 +12522,7 @@ var ErrorComponent = ({
|
|
|
12499
12522
|
};
|
|
12500
12523
|
|
|
12501
12524
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
12502
|
-
var
|
|
12525
|
+
var import_react28 = require("react");
|
|
12503
12526
|
|
|
12504
12527
|
// src/components/loading-states/LoadingContainer.tsx
|
|
12505
12528
|
var import_clsx28 = require("clsx");
|
|
@@ -12520,8 +12543,8 @@ var LoadingAndErrorComponent = ({
|
|
|
12520
12543
|
minimumLoadingDuration = 200,
|
|
12521
12544
|
className
|
|
12522
12545
|
}) => {
|
|
12523
|
-
const [isInMinimumLoading, setIsInMinimumLoading] = (0,
|
|
12524
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0,
|
|
12546
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react28.useState)(false);
|
|
12547
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react28.useState)(false);
|
|
12525
12548
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
12526
12549
|
setIsInMinimumLoading(true);
|
|
12527
12550
|
setTimeout(() => {
|
|
@@ -12623,13 +12646,13 @@ var ProgressIndicator = ({
|
|
|
12623
12646
|
// src/components/navigation/BreadCrumb.tsx
|
|
12624
12647
|
var import_link = __toESM(require_link2());
|
|
12625
12648
|
var import_clsx32 = __toESM(require("clsx"));
|
|
12626
|
-
var
|
|
12649
|
+
var import_react29 = require("react");
|
|
12627
12650
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12628
12651
|
var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
12629
12652
|
const color = "text-description";
|
|
12630
12653
|
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) => {
|
|
12631
12654
|
const isLast = index === crumbs.length - 1;
|
|
12632
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
12655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_react29.Fragment, { children: [
|
|
12633
12656
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12634
12657
|
import_link.default,
|
|
12635
12658
|
{
|
|
@@ -12645,8 +12668,8 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
12645
12668
|
|
|
12646
12669
|
// src/components/navigation/Navigation.tsx
|
|
12647
12670
|
var import_lucide_react9 = require("lucide-react");
|
|
12648
|
-
var
|
|
12649
|
-
var
|
|
12671
|
+
var import_react30 = require("react");
|
|
12672
|
+
var import_react31 = require("react");
|
|
12650
12673
|
var import_link2 = __toESM(require_link2());
|
|
12651
12674
|
var import_clsx33 = __toESM(require("clsx"));
|
|
12652
12675
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
@@ -12659,10 +12682,10 @@ var NavigationItemWithSubItem = ({
|
|
|
12659
12682
|
horizontalAlignment = "center",
|
|
12660
12683
|
...options
|
|
12661
12684
|
}) => {
|
|
12662
|
-
const [isOpen, setOpen] = (0,
|
|
12663
|
-
const containerRef = (0,
|
|
12664
|
-
const triggerRef = (0,
|
|
12665
|
-
const id = (0,
|
|
12685
|
+
const [isOpen, setOpen] = (0, import_react31.useState)(false);
|
|
12686
|
+
const containerRef = (0, import_react31.useRef)();
|
|
12687
|
+
const triggerRef = (0, import_react31.useRef)(null);
|
|
12688
|
+
const id = (0, import_react31.useId)();
|
|
12666
12689
|
const style = useFloatingElement({
|
|
12667
12690
|
active: isOpen,
|
|
12668
12691
|
containerRef,
|
|
@@ -12670,7 +12693,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12670
12693
|
horizontalAlignment,
|
|
12671
12694
|
...options
|
|
12672
12695
|
});
|
|
12673
|
-
const onBlur = (0,
|
|
12696
|
+
const onBlur = (0, import_react31.useCallback)((event) => {
|
|
12674
12697
|
const nextFocus = event.relatedTarget;
|
|
12675
12698
|
if (!containerRef.current?.contains(nextFocus) && !triggerRef.current?.contains(nextFocus)) {
|
|
12676
12699
|
setOpen(false);
|
|
@@ -12724,10 +12747,10 @@ var NavigationItemList = ({ items, ...restProps }) => {
|
|
|
12724
12747
|
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)) });
|
|
12725
12748
|
};
|
|
12726
12749
|
var Navigation = ({ ...props }) => {
|
|
12727
|
-
const [isMobileOpen, setIsMobileOpen] = (0,
|
|
12728
|
-
const id = (0,
|
|
12729
|
-
const menuRef = (0,
|
|
12730
|
-
(0,
|
|
12750
|
+
const [isMobileOpen, setIsMobileOpen] = (0, import_react31.useState)(false);
|
|
12751
|
+
const id = (0, import_react31.useId)();
|
|
12752
|
+
const menuRef = (0, import_react31.useRef)(null);
|
|
12753
|
+
(0, import_react30.useEffect)(() => {
|
|
12731
12754
|
menuRef.current?.focus();
|
|
12732
12755
|
}, [isMobileOpen]);
|
|
12733
12756
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
@@ -12782,7 +12805,7 @@ var Navigation = ({ ...props }) => {
|
|
|
12782
12805
|
// src/components/navigation/Pagination.tsx
|
|
12783
12806
|
var import_lucide_react10 = require("lucide-react");
|
|
12784
12807
|
var import_clsx34 = __toESM(require("clsx"));
|
|
12785
|
-
var
|
|
12808
|
+
var import_react32 = require("react");
|
|
12786
12809
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
12787
12810
|
var Pagination = ({
|
|
12788
12811
|
overwriteTranslation,
|
|
@@ -12793,11 +12816,11 @@ var Pagination = ({
|
|
|
12793
12816
|
style
|
|
12794
12817
|
}) => {
|
|
12795
12818
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
12796
|
-
const [value, setValue] = (0,
|
|
12819
|
+
const [value, setValue] = (0, import_react32.useState)((pageIndex + 1).toString());
|
|
12797
12820
|
const noPages = pageCount === 0;
|
|
12798
12821
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
12799
12822
|
const onLastPage = pageIndex === pageCount - 1;
|
|
12800
|
-
(0,
|
|
12823
|
+
(0, import_react32.useEffect)(() => {
|
|
12801
12824
|
if (noPages) {
|
|
12802
12825
|
setValue("0");
|
|
12803
12826
|
} else {
|
|
@@ -13476,7 +13499,7 @@ var PropertyBase = ({
|
|
|
13476
13499
|
};
|
|
13477
13500
|
|
|
13478
13501
|
// src/components/properties/CheckboxProperty.tsx
|
|
13479
|
-
var
|
|
13502
|
+
var import_react33 = require("react");
|
|
13480
13503
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
13481
13504
|
var CheckboxProperty = ({
|
|
13482
13505
|
overwriteTranslation,
|
|
@@ -13486,7 +13509,7 @@ var CheckboxProperty = ({
|
|
|
13486
13509
|
...baseProps
|
|
13487
13510
|
}) => {
|
|
13488
13511
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
13489
|
-
const id = (0,
|
|
13512
|
+
const id = (0, import_react33.useId)();
|
|
13490
13513
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13491
13514
|
PropertyBase,
|
|
13492
13515
|
{
|
|
@@ -13709,10 +13732,10 @@ var import_lucide_react19 = require("lucide-react");
|
|
|
13709
13732
|
var import_clsx43 = __toESM(require("clsx"));
|
|
13710
13733
|
|
|
13711
13734
|
// src/components/user-action/Textarea.tsx
|
|
13712
|
-
var
|
|
13735
|
+
var import_react34 = require("react");
|
|
13713
13736
|
var import_clsx42 = __toESM(require("clsx"));
|
|
13714
13737
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
13715
|
-
var Textarea = (0,
|
|
13738
|
+
var Textarea = (0, import_react34.forwardRef)(function Textarea2({
|
|
13716
13739
|
id,
|
|
13717
13740
|
onChange,
|
|
13718
13741
|
onChangeText,
|
|
@@ -13786,7 +13809,7 @@ var TextareaWithHeadline = ({
|
|
|
13786
13809
|
containerClassName,
|
|
13787
13810
|
...props
|
|
13788
13811
|
}) => {
|
|
13789
|
-
const genId = (0,
|
|
13812
|
+
const genId = (0, import_react34.useId)();
|
|
13790
13813
|
const usedId = id ?? genId;
|
|
13791
13814
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
13792
13815
|
"div",
|
|
@@ -13901,7 +13924,7 @@ var TableFilters = {
|
|
|
13901
13924
|
};
|
|
13902
13925
|
|
|
13903
13926
|
// src/components/table/Table.tsx
|
|
13904
|
-
var
|
|
13927
|
+
var import_react40 = require("react");
|
|
13905
13928
|
var import_clsx48 = __toESM(require("clsx"));
|
|
13906
13929
|
var import_react_table = require("@tanstack/react-table");
|
|
13907
13930
|
var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
|
|
@@ -13917,9 +13940,9 @@ var TableCell = ({
|
|
|
13917
13940
|
};
|
|
13918
13941
|
|
|
13919
13942
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
13920
|
-
var
|
|
13943
|
+
var import_react35 = require("react");
|
|
13921
13944
|
var useResizeCallbackWrapper = (callback) => {
|
|
13922
|
-
(0,
|
|
13945
|
+
(0, import_react35.useEffect)(() => {
|
|
13923
13946
|
window.addEventListener("resize", callback);
|
|
13924
13947
|
return () => {
|
|
13925
13948
|
window.removeEventListener("resize", callback);
|
|
@@ -13962,7 +13985,7 @@ var TableSortButton = ({
|
|
|
13962
13985
|
var import_lucide_react21 = require("lucide-react");
|
|
13963
13986
|
|
|
13964
13987
|
// src/components/user-action/Menu.tsx
|
|
13965
|
-
var
|
|
13988
|
+
var import_react38 = require("react");
|
|
13966
13989
|
var import_clsx47 = __toESM(require("clsx"));
|
|
13967
13990
|
|
|
13968
13991
|
// src/utils/bagFunctions.ts
|
|
@@ -14034,15 +14057,15 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
14034
14057
|
};
|
|
14035
14058
|
|
|
14036
14059
|
// src/hooks/useHoverState.ts
|
|
14037
|
-
var
|
|
14060
|
+
var import_react36 = require("react");
|
|
14038
14061
|
var defaultUseHoverStateProps = {
|
|
14039
14062
|
closingDelay: 200,
|
|
14040
14063
|
isDisabled: false
|
|
14041
14064
|
};
|
|
14042
14065
|
var useHoverState = (props = void 0) => {
|
|
14043
14066
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
14044
|
-
const [isHovered, setIsHovered] = (0,
|
|
14045
|
-
const [timer, setTimer] = (0,
|
|
14067
|
+
const [isHovered, setIsHovered] = (0, import_react36.useState)(false);
|
|
14068
|
+
const [timer, setTimer] = (0, import_react36.useState)();
|
|
14046
14069
|
const onMouseEnter = () => {
|
|
14047
14070
|
if (isDisabled) {
|
|
14048
14071
|
return;
|
|
@@ -14058,14 +14081,14 @@ var useHoverState = (props = void 0) => {
|
|
|
14058
14081
|
setIsHovered(false);
|
|
14059
14082
|
}, closingDelay));
|
|
14060
14083
|
};
|
|
14061
|
-
(0,
|
|
14084
|
+
(0, import_react36.useEffect)(() => {
|
|
14062
14085
|
if (timer) {
|
|
14063
14086
|
return () => {
|
|
14064
14087
|
clearTimeout(timer);
|
|
14065
14088
|
};
|
|
14066
14089
|
}
|
|
14067
14090
|
});
|
|
14068
|
-
(0,
|
|
14091
|
+
(0, import_react36.useEffect)(() => {
|
|
14069
14092
|
if (timer) {
|
|
14070
14093
|
clearTimeout(timer);
|
|
14071
14094
|
}
|
|
@@ -14078,9 +14101,9 @@ var useHoverState = (props = void 0) => {
|
|
|
14078
14101
|
};
|
|
14079
14102
|
|
|
14080
14103
|
// src/hooks/useOutsideClick.ts
|
|
14081
|
-
var
|
|
14104
|
+
var import_react37 = require("react");
|
|
14082
14105
|
var useOutsideClick = (refs, handler) => {
|
|
14083
|
-
(0,
|
|
14106
|
+
(0, import_react37.useEffect)(() => {
|
|
14084
14107
|
const listener = (event) => {
|
|
14085
14108
|
if (event.target === null) return;
|
|
14086
14109
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -14138,10 +14161,10 @@ var Menu = ({
|
|
|
14138
14161
|
menuClassName = ""
|
|
14139
14162
|
}) => {
|
|
14140
14163
|
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
14141
|
-
const triggerRef = (0,
|
|
14142
|
-
const menuRef = (0,
|
|
14164
|
+
const triggerRef = (0, import_react38.useRef)(null);
|
|
14165
|
+
const menuRef = (0, import_react38.useRef)(null);
|
|
14143
14166
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
14144
|
-
const [isHidden, setIsHidden] = (0,
|
|
14167
|
+
const [isHidden, setIsHidden] = (0, import_react38.useState)(true);
|
|
14145
14168
|
const bag = {
|
|
14146
14169
|
isOpen,
|
|
14147
14170
|
close: () => setIsOpen(false),
|
|
@@ -14152,7 +14175,7 @@ var Menu = ({
|
|
|
14152
14175
|
triggerRef.current?.getBoundingClientRect(),
|
|
14153
14176
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
14154
14177
|
);
|
|
14155
|
-
(0,
|
|
14178
|
+
(0, import_react38.useEffect)(() => {
|
|
14156
14179
|
if (!isOpen) return;
|
|
14157
14180
|
const triggerEl = triggerRef.current;
|
|
14158
14181
|
if (!triggerEl) return;
|
|
@@ -14169,7 +14192,7 @@ var Menu = ({
|
|
|
14169
14192
|
window.removeEventListener("resize", close);
|
|
14170
14193
|
};
|
|
14171
14194
|
}, [isOpen, setIsOpen]);
|
|
14172
|
-
(0,
|
|
14195
|
+
(0, import_react38.useEffect)(() => {
|
|
14173
14196
|
if (isOpen) {
|
|
14174
14197
|
setIsHidden(false);
|
|
14175
14198
|
}
|
|
@@ -14205,7 +14228,7 @@ var Menu = ({
|
|
|
14205
14228
|
};
|
|
14206
14229
|
|
|
14207
14230
|
// src/components/table/TableFilterButton.tsx
|
|
14208
|
-
var
|
|
14231
|
+
var import_react39 = require("react");
|
|
14209
14232
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
14210
14233
|
var defaultTableFilterTranslation = {
|
|
14211
14234
|
en: {
|
|
@@ -14231,9 +14254,9 @@ var TableFilterButton = ({
|
|
|
14231
14254
|
}) => {
|
|
14232
14255
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
14233
14256
|
const columnFilterValue = column.getFilterValue();
|
|
14234
|
-
const [filterValue, setFilterValue] = (0,
|
|
14257
|
+
const [filterValue, setFilterValue] = (0, import_react39.useState)(columnFilterValue);
|
|
14235
14258
|
const hasFilter = !!filterValue;
|
|
14236
|
-
(0,
|
|
14259
|
+
(0, import_react39.useEffect)(() => {
|
|
14237
14260
|
setFilterValue(columnFilterValue);
|
|
14238
14261
|
}, [columnFilterValue]);
|
|
14239
14262
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
@@ -14347,22 +14370,22 @@ var Table = ({
|
|
|
14347
14370
|
columns,
|
|
14348
14371
|
...tableOptions
|
|
14349
14372
|
}) => {
|
|
14350
|
-
const ref = (0,
|
|
14351
|
-
const tableRef = (0,
|
|
14352
|
-
const [columnSizing, setColumnSizing] = (0,
|
|
14373
|
+
const ref = (0, import_react40.useRef)(null);
|
|
14374
|
+
const tableRef = (0, import_react40.useRef)(null);
|
|
14375
|
+
const [columnSizing, setColumnSizing] = (0, import_react40.useState)(columns.reduce((previousValue, currentValue) => {
|
|
14353
14376
|
return {
|
|
14354
14377
|
...previousValue,
|
|
14355
14378
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
14356
14379
|
};
|
|
14357
14380
|
}, {}));
|
|
14358
|
-
const [columnSizingInfo, setColumnSizingInfo] = (0,
|
|
14359
|
-
const [pagination, setPagination] = (0,
|
|
14381
|
+
const [columnSizingInfo, setColumnSizingInfo] = (0, import_react40.useState)();
|
|
14382
|
+
const [pagination, setPagination] = (0, import_react40.useState)({
|
|
14360
14383
|
pageSize: 10,
|
|
14361
14384
|
pageIndex: 0,
|
|
14362
14385
|
...initialState?.pagination
|
|
14363
14386
|
});
|
|
14364
|
-
const [columnFilters, setColumnFilters] = (0,
|
|
14365
|
-
const computedColumnMinWidths = (0,
|
|
14387
|
+
const [columnFilters, setColumnFilters] = (0, import_react40.useState)(initialState?.columnFilters);
|
|
14388
|
+
const computedColumnMinWidths = (0, import_react40.useMemo)(() => {
|
|
14366
14389
|
return columns.reduce((previousValue, column) => {
|
|
14367
14390
|
return {
|
|
14368
14391
|
...previousValue,
|
|
@@ -14371,7 +14394,7 @@ var Table = ({
|
|
|
14371
14394
|
};
|
|
14372
14395
|
}, {});
|
|
14373
14396
|
}, [columns, defaultColumn]);
|
|
14374
|
-
const computedColumnMaxWidths = (0,
|
|
14397
|
+
const computedColumnMaxWidths = (0, import_react40.useMemo)(() => {
|
|
14375
14398
|
return columns.reduce((previousValue, column) => {
|
|
14376
14399
|
return {
|
|
14377
14400
|
...previousValue,
|
|
@@ -14379,12 +14402,12 @@ var Table = ({
|
|
|
14379
14402
|
};
|
|
14380
14403
|
}, {});
|
|
14381
14404
|
}, [columns, defaultColumn]);
|
|
14382
|
-
const tableMinWidth = (0,
|
|
14405
|
+
const tableMinWidth = (0, import_react40.useMemo)(() => {
|
|
14383
14406
|
return columns.reduce((sum, column) => {
|
|
14384
14407
|
return sum + computedColumnMinWidths[column.id];
|
|
14385
14408
|
}, 0);
|
|
14386
14409
|
}, [columns, computedColumnMinWidths]);
|
|
14387
|
-
const updateColumnSizes = (0,
|
|
14410
|
+
const updateColumnSizes = (0, import_react40.useMemo)(() => {
|
|
14388
14411
|
return (previous) => {
|
|
14389
14412
|
const updateSizing = {
|
|
14390
14413
|
...columnSizing,
|
|
@@ -14501,18 +14524,18 @@ var Table = ({
|
|
|
14501
14524
|
columnResizeMode: "onChange",
|
|
14502
14525
|
...tableOptions
|
|
14503
14526
|
});
|
|
14504
|
-
const [hasInitializedSizing, setHasInitializedSizing] = (0,
|
|
14505
|
-
(0,
|
|
14527
|
+
const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react40.useState)(false);
|
|
14528
|
+
(0, import_react40.useEffect)(() => {
|
|
14506
14529
|
if (!hasInitializedSizing && ref.current) {
|
|
14507
14530
|
setHasInitializedSizing(true);
|
|
14508
14531
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
14509
14532
|
}
|
|
14510
14533
|
}, [columnSizing, hasInitializedSizing]);
|
|
14511
|
-
useResizeCallbackWrapper((0,
|
|
14534
|
+
useResizeCallbackWrapper((0, import_react40.useCallback)(() => {
|
|
14512
14535
|
table.setColumnSizing(updateColumnSizes);
|
|
14513
14536
|
}, [updateColumnSizes]));
|
|
14514
14537
|
const pageCount = table.getPageCount();
|
|
14515
|
-
(0,
|
|
14538
|
+
(0, import_react40.useEffect)(() => {
|
|
14516
14539
|
const totalPages = pageCount;
|
|
14517
14540
|
if (totalPages === 0) {
|
|
14518
14541
|
if (pagination.pageIndex !== 0) {
|
|
@@ -14528,7 +14551,7 @@ var Table = ({
|
|
|
14528
14551
|
}));
|
|
14529
14552
|
}
|
|
14530
14553
|
}, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
|
|
14531
|
-
const columnSizeVars = (0,
|
|
14554
|
+
const columnSizeVars = (0, import_react40.useMemo)(() => {
|
|
14532
14555
|
const headers = table.getFlatHeaders();
|
|
14533
14556
|
const colSizes = {};
|
|
14534
14557
|
for (let i = 0; i < headers.length; i++) {
|
|
@@ -14663,7 +14686,7 @@ var TableWithSelection = ({
|
|
|
14663
14686
|
meta,
|
|
14664
14687
|
...props
|
|
14665
14688
|
}) => {
|
|
14666
|
-
const columnsWithSelection = (0,
|
|
14689
|
+
const columnsWithSelection = (0, import_react40.useMemo)(() => {
|
|
14667
14690
|
return [
|
|
14668
14691
|
{
|
|
14669
14692
|
id: selectionRowId,
|
|
@@ -14732,7 +14755,7 @@ var TableWithSelection = ({
|
|
|
14732
14755
|
};
|
|
14733
14756
|
|
|
14734
14757
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
14735
|
-
var
|
|
14758
|
+
var import_react41 = require("react");
|
|
14736
14759
|
var import_clsx49 = require("clsx");
|
|
14737
14760
|
|
|
14738
14761
|
// src/utils/writeToClipboard.ts
|
|
@@ -14752,8 +14775,8 @@ var CopyToClipboardWrapper = ({
|
|
|
14752
14775
|
zIndex = 10
|
|
14753
14776
|
}) => {
|
|
14754
14777
|
const translation = useTranslation([formTranslation]);
|
|
14755
|
-
const [isShowingIndication, setIsShowingIndication] = (0,
|
|
14756
|
-
const [isShowingConfirmation, setIsShowingConfirmation] = (0,
|
|
14778
|
+
const [isShowingIndication, setIsShowingIndication] = (0, import_react41.useState)(false);
|
|
14779
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react41.useState)(false);
|
|
14757
14780
|
const positionClasses = {
|
|
14758
14781
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
14759
14782
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -14895,7 +14918,7 @@ var DateTimePicker = ({
|
|
|
14895
14918
|
};
|
|
14896
14919
|
|
|
14897
14920
|
// src/components/user-action/ScrollPicker.tsx
|
|
14898
|
-
var
|
|
14921
|
+
var import_react42 = require("react");
|
|
14899
14922
|
var import_clsx51 = __toESM(require("clsx"));
|
|
14900
14923
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
14901
14924
|
var up = 1;
|
|
@@ -14916,7 +14939,7 @@ var ScrollPicker = ({
|
|
|
14916
14939
|
transition,
|
|
14917
14940
|
items,
|
|
14918
14941
|
lastTimeStamp
|
|
14919
|
-
}, setAnimation] = (0,
|
|
14942
|
+
}, setAnimation] = (0, import_react42.useState)({
|
|
14920
14943
|
targetIndex: selectedIndex,
|
|
14921
14944
|
currentIndex: disabled ? selectedIndex : 0,
|
|
14922
14945
|
velocity: 0,
|
|
@@ -14932,7 +14955,7 @@ var ScrollPicker = ({
|
|
|
14932
14955
|
const itemHeight = 40;
|
|
14933
14956
|
const distance = 8;
|
|
14934
14957
|
const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
|
|
14935
|
-
const getDirection = (0,
|
|
14958
|
+
const getDirection = (0, import_react42.useCallback)((targetIndex, currentIndex2, transition2, length) => {
|
|
14936
14959
|
if (targetIndex === currentIndex2) {
|
|
14937
14960
|
return transition2 > 0 ? up : down;
|
|
14938
14961
|
}
|
|
@@ -14942,7 +14965,7 @@ var ScrollPicker = ({
|
|
|
14942
14965
|
}
|
|
14943
14966
|
return distanceForward >= length / 2 ? down : up;
|
|
14944
14967
|
}, []);
|
|
14945
|
-
const animate = (0,
|
|
14968
|
+
const animate = (0, import_react42.useCallback)((timestamp, startTime) => {
|
|
14946
14969
|
setAnimation((prevState) => {
|
|
14947
14970
|
const {
|
|
14948
14971
|
targetIndex,
|
|
@@ -15015,7 +15038,7 @@ var ScrollPicker = ({
|
|
|
15015
15038
|
};
|
|
15016
15039
|
});
|
|
15017
15040
|
}, [disabled, getDirection, onChange]);
|
|
15018
|
-
(0,
|
|
15041
|
+
(0, import_react42.useEffect)(() => {
|
|
15019
15042
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
15020
15043
|
});
|
|
15021
15044
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -15183,18 +15206,18 @@ var Tooltip = ({
|
|
|
15183
15206
|
};
|
|
15184
15207
|
|
|
15185
15208
|
// src/components/user-action/input/InsideLabelInput.tsx
|
|
15186
|
-
var
|
|
15187
|
-
var
|
|
15209
|
+
var import_react43 = require("react");
|
|
15210
|
+
var import_react44 = require("react");
|
|
15188
15211
|
var import_clsx54 = __toESM(require("clsx"));
|
|
15189
15212
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
15190
|
-
var InsideLabelInput = (0,
|
|
15213
|
+
var InsideLabelInput = (0, import_react44.forwardRef)(function InsideLabelInput2({
|
|
15191
15214
|
id: customId,
|
|
15192
15215
|
label,
|
|
15193
15216
|
...props
|
|
15194
15217
|
}, forwardedRef) {
|
|
15195
15218
|
const { value } = props;
|
|
15196
|
-
const [isFocused, setIsFocused] = (0,
|
|
15197
|
-
const generatedId = (0,
|
|
15219
|
+
const [isFocused, setIsFocused] = (0, import_react44.useState)(false);
|
|
15220
|
+
const generatedId = (0, import_react43.useId)();
|
|
15198
15221
|
const id = customId ?? generatedId;
|
|
15199
15222
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: (0, import_clsx54.default)("relative"), children: [
|
|
15200
15223
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
@@ -15247,20 +15270,20 @@ var InsideLabelInputUncontrolled = ({
|
|
|
15247
15270
|
};
|
|
15248
15271
|
|
|
15249
15272
|
// src/components/user-action/input/ToggleableInput.tsx
|
|
15250
|
-
var
|
|
15273
|
+
var import_react45 = require("react");
|
|
15251
15274
|
var import_lucide_react24 = require("lucide-react");
|
|
15252
15275
|
var import_clsx55 = __toESM(require("clsx"));
|
|
15253
15276
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
15254
|
-
var ToggleableInput = (0,
|
|
15277
|
+
var ToggleableInput = (0, import_react45.forwardRef)(function ToggleableInput2({
|
|
15255
15278
|
value,
|
|
15256
15279
|
initialState = "display",
|
|
15257
15280
|
editCompleteOptions,
|
|
15258
15281
|
...props
|
|
15259
15282
|
}, forwardedRef) {
|
|
15260
|
-
const [isEditing, setIsEditing] = (0,
|
|
15261
|
-
const innerRef = (0,
|
|
15262
|
-
(0,
|
|
15263
|
-
(0,
|
|
15283
|
+
const [isEditing, setIsEditing] = (0, import_react45.useState)(initialState !== "display");
|
|
15284
|
+
const innerRef = (0, import_react45.useRef)(null);
|
|
15285
|
+
(0, import_react45.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
15286
|
+
(0, import_react45.useEffect)(() => {
|
|
15264
15287
|
if (isEditing) {
|
|
15265
15288
|
innerRef.current?.focus();
|
|
15266
15289
|
}
|
|
@@ -15315,33 +15338,33 @@ var ToggleableInputUncontrolled = ({
|
|
|
15315
15338
|
};
|
|
15316
15339
|
|
|
15317
15340
|
// src/components/utils/FocusTrap.tsx
|
|
15318
|
-
var import_react44 = require("react");
|
|
15319
|
-
var import_react45 = require("react");
|
|
15320
15341
|
var import_react46 = require("react");
|
|
15342
|
+
var import_react47 = require("react");
|
|
15343
|
+
var import_react48 = require("react");
|
|
15321
15344
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
15322
|
-
var FocusTrap = (0,
|
|
15345
|
+
var FocusTrap = (0, import_react48.forwardRef)(function FocusTrap2({
|
|
15323
15346
|
active = true,
|
|
15324
15347
|
initialFocus,
|
|
15325
15348
|
focusFirst = false,
|
|
15326
15349
|
...props
|
|
15327
15350
|
}, forwardedRef) {
|
|
15328
|
-
const innerRef = (0,
|
|
15329
|
-
(0,
|
|
15351
|
+
const innerRef = (0, import_react46.useRef)(null);
|
|
15352
|
+
(0, import_react47.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
15330
15353
|
useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
|
|
15331
15354
|
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { ref: innerRef, ...props });
|
|
15332
15355
|
});
|
|
15333
15356
|
|
|
15334
15357
|
// src/components/utils/Transition.tsx
|
|
15335
|
-
var
|
|
15358
|
+
var import_react49 = require("react");
|
|
15336
15359
|
function Transition({
|
|
15337
15360
|
children,
|
|
15338
15361
|
show,
|
|
15339
15362
|
includeAnimation = true
|
|
15340
15363
|
}) {
|
|
15341
|
-
const [isOpen, setIsOpen] = (0,
|
|
15342
|
-
const [isTransitioning, setIsTransitioning] = (0,
|
|
15364
|
+
const [isOpen, setIsOpen] = (0, import_react49.useState)(show);
|
|
15365
|
+
const [isTransitioning, setIsTransitioning] = (0, import_react49.useState)(!isOpen);
|
|
15343
15366
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
15344
|
-
(0,
|
|
15367
|
+
(0, import_react49.useEffect)(() => {
|
|
15345
15368
|
setIsOpen(show);
|
|
15346
15369
|
setIsTransitioning(true);
|
|
15347
15370
|
}, [show]);
|