@helpwave/hightide 0.1.35 → 0.1.36
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 +30 -7
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/dialog/Dialog.mjs +29 -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.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/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.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.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.mjs
CHANGED
|
@@ -39,12 +39,12 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
39
39
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
40
40
|
}
|
|
41
41
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
42
|
-
var
|
|
43
|
-
var
|
|
42
|
+
var useState36 = React21.useState;
|
|
43
|
+
var useEffect39 = React21.useEffect;
|
|
44
44
|
var useLayoutEffect3 = React21.useLayoutEffect;
|
|
45
45
|
var useDebugValue = React21.useDebugValue;
|
|
46
46
|
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
47
|
-
var value = getSnapshot(), _useState =
|
|
47
|
+
var value = getSnapshot(), _useState = useState36({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
48
48
|
useLayoutEffect3(
|
|
49
49
|
function() {
|
|
50
50
|
inst.value = value;
|
|
@@ -53,7 +53,7 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
53
53
|
},
|
|
54
54
|
[subscribe2, value, getSnapshot]
|
|
55
55
|
);
|
|
56
|
-
|
|
56
|
+
useEffect39(
|
|
57
57
|
function() {
|
|
58
58
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
59
59
|
return subscribe2(function() {
|
|
@@ -102,7 +102,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
102
102
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
103
103
|
), didWarnUncachedGetSnapshot = true);
|
|
104
104
|
}
|
|
105
|
-
cachedValue =
|
|
105
|
+
cachedValue = useState36({
|
|
106
106
|
inst: { value, getSnapshot }
|
|
107
107
|
});
|
|
108
108
|
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
@@ -114,7 +114,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
114
114
|
},
|
|
115
115
|
[subscribe2, value, getSnapshot]
|
|
116
116
|
);
|
|
117
|
-
|
|
117
|
+
useEffect39(
|
|
118
118
|
function() {
|
|
119
119
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
120
120
|
return subscribe2(function() {
|
|
@@ -140,7 +140,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
140
140
|
return getSnapshot();
|
|
141
141
|
}
|
|
142
142
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
143
|
-
var React21 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
143
|
+
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;
|
|
144
144
|
exports.useSyncExternalStore = void 0 !== React21.useSyncExternalStore ? React21.useSyncExternalStore : shim;
|
|
145
145
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
146
146
|
}();
|
|
@@ -6914,8 +6914,15 @@ var useLocalStorage = (key, backupValue) => {
|
|
|
6914
6914
|
return backupValue;
|
|
6915
6915
|
}
|
|
6916
6916
|
const storageService = new LocalStorageService();
|
|
6917
|
-
|
|
6918
|
-
|
|
6917
|
+
try {
|
|
6918
|
+
const value = storageService.get(key);
|
|
6919
|
+
return value || backupValue;
|
|
6920
|
+
} catch (_) {
|
|
6921
|
+
console.warn("useLocalStorage: Error while reading the stored value. Make sure your typing is correct.");
|
|
6922
|
+
storageService.delete(key);
|
|
6923
|
+
console.info(`useLocalStorage: deleted erroneous value for key: ${key}`);
|
|
6924
|
+
return backupValue;
|
|
6925
|
+
}
|
|
6919
6926
|
}, [backupValue, key]);
|
|
6920
6927
|
const [storedValue, setStoredValue] = useState2(get);
|
|
6921
6928
|
const setValue = useCallback((action) => {
|
|
@@ -6971,6 +6978,7 @@ var LanguageProvider = ({ children, language }) => {
|
|
|
6971
6978
|
return LanguageUtil.DEFAULT_LANGUAGE;
|
|
6972
6979
|
}, [language, languagePreference, storedLanguage]);
|
|
6973
6980
|
useEffect2(() => {
|
|
6981
|
+
if (!language) return;
|
|
6974
6982
|
if (language === "system") {
|
|
6975
6983
|
deleteStoredLanguage();
|
|
6976
6984
|
} else {
|
|
@@ -7918,6 +7926,8 @@ var TimePickerUncontrolled = ({
|
|
|
7918
7926
|
import clsx10 from "clsx";
|
|
7919
7927
|
|
|
7920
7928
|
// src/components/dialog/Dialog.tsx
|
|
7929
|
+
import { useEffect as useEffect10 } from "react";
|
|
7930
|
+
import { useState as useState9 } from "react";
|
|
7921
7931
|
import { useRef as useRef4 } from "react";
|
|
7922
7932
|
import clsx9 from "clsx";
|
|
7923
7933
|
import { X } from "lucide-react";
|
|
@@ -8283,10 +8293,21 @@ var Dialog = ({
|
|
|
8283
8293
|
onClose,
|
|
8284
8294
|
className,
|
|
8285
8295
|
backgroundClassName,
|
|
8286
|
-
position = "center"
|
|
8296
|
+
position = "center",
|
|
8297
|
+
isAnimated = true
|
|
8287
8298
|
}) => {
|
|
8288
8299
|
const translation = useTranslation([formTranslation]);
|
|
8300
|
+
const [visible, setVisible] = useState9(isOpen);
|
|
8289
8301
|
const ref = useRef4(null);
|
|
8302
|
+
useEffect10(() => {
|
|
8303
|
+
if (isOpen) {
|
|
8304
|
+
setVisible(true);
|
|
8305
|
+
} else {
|
|
8306
|
+
if (!isAnimated) {
|
|
8307
|
+
setVisible(false);
|
|
8308
|
+
}
|
|
8309
|
+
}
|
|
8310
|
+
}, [isAnimated, isOpen]);
|
|
8290
8311
|
const onCloseWrapper = () => {
|
|
8291
8312
|
if (!isModal) return;
|
|
8292
8313
|
onClose?.();
|
|
@@ -8294,7 +8315,7 @@ var Dialog = ({
|
|
|
8294
8315
|
useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
|
|
8295
8316
|
useFocusTrap({
|
|
8296
8317
|
container: ref,
|
|
8297
|
-
active:
|
|
8318
|
+
active: visible,
|
|
8298
8319
|
focusFirst: true
|
|
8299
8320
|
});
|
|
8300
8321
|
const positionMap = {
|
|
@@ -8308,6 +8329,7 @@ var Dialog = ({
|
|
|
8308
8329
|
/* @__PURE__ */ jsx11(
|
|
8309
8330
|
"div",
|
|
8310
8331
|
{
|
|
8332
|
+
hidden: !visible,
|
|
8311
8333
|
className: clsx9(
|
|
8312
8334
|
"fixed inset-0 h-screen w-screen bg-overlay-shadow z-100",
|
|
8313
8335
|
{
|
|
@@ -8316,21 +8338,30 @@ var Dialog = ({
|
|
|
8316
8338
|
},
|
|
8317
8339
|
backgroundClassName
|
|
8318
8340
|
),
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8341
|
+
onAnimationEnd: () => {
|
|
8342
|
+
if (!isOpen) {
|
|
8343
|
+
setVisible(false);
|
|
8344
|
+
}
|
|
8345
|
+
},
|
|
8346
|
+
onClick: onCloseWrapper,
|
|
8347
|
+
"aria-hidden": true
|
|
8322
8348
|
}
|
|
8323
8349
|
),
|
|
8324
8350
|
/* @__PURE__ */ jsxs8(
|
|
8325
8351
|
"div",
|
|
8326
8352
|
{
|
|
8327
8353
|
ref,
|
|
8328
|
-
hidden: !
|
|
8354
|
+
hidden: !visible,
|
|
8329
8355
|
onKeyDown: (event) => {
|
|
8330
8356
|
if (event.key === "Escape") {
|
|
8331
8357
|
onCloseWrapper();
|
|
8332
8358
|
}
|
|
8333
8359
|
},
|
|
8360
|
+
onAnimationEnd: () => {
|
|
8361
|
+
if (!isOpen) {
|
|
8362
|
+
setVisible(false);
|
|
8363
|
+
}
|
|
8364
|
+
},
|
|
8334
8365
|
className: clsx9(
|
|
8335
8366
|
"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",
|
|
8336
8367
|
{
|
|
@@ -8459,13 +8490,13 @@ import { forwardRef as forwardRef3, useImperativeHandle, useRef as useRef5 } fro
|
|
|
8459
8490
|
import clsx11 from "clsx";
|
|
8460
8491
|
|
|
8461
8492
|
// src/hooks/useDelay.ts
|
|
8462
|
-
import { useEffect as
|
|
8493
|
+
import { useEffect as useEffect11, useState as useState10 } from "react";
|
|
8463
8494
|
var defaultOptions2 = {
|
|
8464
8495
|
delay: 3e3,
|
|
8465
8496
|
disabled: false
|
|
8466
8497
|
};
|
|
8467
8498
|
function useDelay(options) {
|
|
8468
|
-
const [timer, setTimer] =
|
|
8499
|
+
const [timer, setTimer] = useState10(void 0);
|
|
8469
8500
|
const { delay, disabled } = {
|
|
8470
8501
|
...defaultOptions2,
|
|
8471
8502
|
...options
|
|
@@ -8484,12 +8515,12 @@ function useDelay(options) {
|
|
|
8484
8515
|
setTimer(void 0);
|
|
8485
8516
|
}, delay));
|
|
8486
8517
|
};
|
|
8487
|
-
|
|
8518
|
+
useEffect11(() => {
|
|
8488
8519
|
return () => {
|
|
8489
8520
|
clearTimeout(timer);
|
|
8490
8521
|
};
|
|
8491
8522
|
}, [timer]);
|
|
8492
|
-
|
|
8523
|
+
useEffect11(() => {
|
|
8493
8524
|
if (disabled) {
|
|
8494
8525
|
clearTimeout(timer);
|
|
8495
8526
|
setTimer(void 0);
|
|
@@ -8676,11 +8707,11 @@ import {
|
|
|
8676
8707
|
forwardRef as forwardRef4,
|
|
8677
8708
|
useCallback as useCallback6,
|
|
8678
8709
|
useContext as useContext2,
|
|
8679
|
-
useEffect as
|
|
8710
|
+
useEffect as useEffect13,
|
|
8680
8711
|
useId as useId3,
|
|
8681
8712
|
useImperativeHandle as useImperativeHandle2,
|
|
8682
8713
|
useRef as useRef6,
|
|
8683
|
-
useState as
|
|
8714
|
+
useState as useState12
|
|
8684
8715
|
} from "react";
|
|
8685
8716
|
import clsx13 from "clsx";
|
|
8686
8717
|
|
|
@@ -8775,7 +8806,7 @@ var ChipList = ({
|
|
|
8775
8806
|
};
|
|
8776
8807
|
|
|
8777
8808
|
// src/hooks/useFloatingElement.ts
|
|
8778
|
-
import { useCallback as useCallback5, useEffect as
|
|
8809
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useState as useState11 } from "react";
|
|
8779
8810
|
|
|
8780
8811
|
// src/utils/math.ts
|
|
8781
8812
|
var clamp = (value, range2 = [0, 1]) => {
|
|
@@ -8838,7 +8869,7 @@ function useFloatingElement({
|
|
|
8838
8869
|
screenPadding = 16,
|
|
8839
8870
|
gap = 4
|
|
8840
8871
|
}) {
|
|
8841
|
-
const [style, setStyle] =
|
|
8872
|
+
const [style, setStyle] = useState11();
|
|
8842
8873
|
const isMounted = useIsMounted();
|
|
8843
8874
|
const calculate = useCallback5(() => {
|
|
8844
8875
|
const containerRect = containerRef.current.getBoundingClientRect();
|
|
@@ -8870,14 +8901,14 @@ function useFloatingElement({
|
|
|
8870
8901
|
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
8871
8902
|
const height = containerRef.current?.getBoundingClientRect().height;
|
|
8872
8903
|
const width = containerRef.current?.getBoundingClientRect().width;
|
|
8873
|
-
|
|
8904
|
+
useEffect12(() => {
|
|
8874
8905
|
if (active && isMounted) {
|
|
8875
8906
|
calculate();
|
|
8876
8907
|
} else {
|
|
8877
8908
|
setStyle(void 0);
|
|
8878
8909
|
}
|
|
8879
8910
|
}, [calculate, active, isMounted, height, width]);
|
|
8880
|
-
|
|
8911
|
+
useEffect12(() => {
|
|
8881
8912
|
window.addEventListener("resize", calculate);
|
|
8882
8913
|
let timeout;
|
|
8883
8914
|
if (isPolling) {
|
|
@@ -8920,11 +8951,11 @@ var SelectRoot = ({
|
|
|
8920
8951
|
isMultiSelect = false,
|
|
8921
8952
|
iconAppearance = "left"
|
|
8922
8953
|
}) => {
|
|
8923
|
-
const [options, setOptions] =
|
|
8954
|
+
const [options, setOptions] = useState12([]);
|
|
8924
8955
|
const triggerRef = useRef6(null);
|
|
8925
8956
|
const generatedId = useId3();
|
|
8926
8957
|
const usedId = id ?? generatedId;
|
|
8927
|
-
const [internalState, setInternalState] =
|
|
8958
|
+
const [internalState, setInternalState] = useState12({
|
|
8928
8959
|
isOpen
|
|
8929
8960
|
});
|
|
8930
8961
|
const selectedValues = isMultiSelect ? values ?? [] : [value].filter(Boolean);
|
|
@@ -9040,7 +9071,7 @@ var SelectRoot = ({
|
|
|
9040
9071
|
highlightedValue
|
|
9041
9072
|
}));
|
|
9042
9073
|
};
|
|
9043
|
-
|
|
9074
|
+
useEffect13(() => {
|
|
9044
9075
|
if (!internalState.highlightedValue) return;
|
|
9045
9076
|
const highlighted = options.find((value2) => value2.value === internalState.highlightedValue);
|
|
9046
9077
|
if (highlighted) {
|
|
@@ -9075,7 +9106,7 @@ var SelectOption = forwardRef4(
|
|
|
9075
9106
|
const itemRef = useRef6(null);
|
|
9076
9107
|
iconAppearance ??= config.iconAppearance;
|
|
9077
9108
|
const label = children ?? value;
|
|
9078
|
-
|
|
9109
|
+
useEffect13(() => {
|
|
9079
9110
|
register({
|
|
9080
9111
|
value,
|
|
9081
9112
|
label,
|
|
@@ -9159,7 +9190,7 @@ var SelectButton = forwardRef4(function SelectButton2({ placeholder, selectedDis
|
|
|
9159
9190
|
const { register, unregister, toggleOpen } = trigger;
|
|
9160
9191
|
const innerRef = useRef6(null);
|
|
9161
9192
|
useImperativeHandle2(ref, () => innerRef.current);
|
|
9162
|
-
|
|
9193
|
+
useEffect13(() => {
|
|
9163
9194
|
register(innerRef);
|
|
9164
9195
|
return () => unregister();
|
|
9165
9196
|
}, [register, unregister]);
|
|
@@ -9237,7 +9268,7 @@ var SelectChipDisplay = forwardRef4(function SelectChipDisplay2({ ...props }, re
|
|
|
9237
9268
|
const { register, unregister, toggleOpen } = trigger;
|
|
9238
9269
|
const innerRef = useRef6(null);
|
|
9239
9270
|
useImperativeHandle2(ref, () => innerRef.current);
|
|
9240
|
-
|
|
9271
|
+
useEffect13(() => {
|
|
9241
9272
|
register(innerRef);
|
|
9242
9273
|
return () => unregister();
|
|
9243
9274
|
}, [register, unregister]);
|
|
@@ -9543,7 +9574,7 @@ import { MonitorCog, MoonIcon, SunIcon } from "lucide-react";
|
|
|
9543
9574
|
import clsx14 from "clsx";
|
|
9544
9575
|
|
|
9545
9576
|
// src/theming/useTheme.tsx
|
|
9546
|
-
import { createContext as createContext3, useCallback as useCallback7, useContext as useContext3, useEffect as
|
|
9577
|
+
import { createContext as createContext3, useCallback as useCallback7, useContext as useContext3, useEffect as useEffect14, useMemo as useMemo2, useState as useState13 } from "react";
|
|
9547
9578
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
9548
9579
|
var themes = ["light", "dark", "system"];
|
|
9549
9580
|
var defaultThemeTypeTranslation = {
|
|
@@ -9577,7 +9608,7 @@ var ThemeProvider = ({ children, theme }) => {
|
|
|
9577
9608
|
setValue: setStoredTheme,
|
|
9578
9609
|
deleteValue: deleteStoredTheme
|
|
9579
9610
|
} = useLocalStorage("theme", "system");
|
|
9580
|
-
const [themePreference, setThemePreference] =
|
|
9611
|
+
const [themePreference, setThemePreference] = useState13("system");
|
|
9581
9612
|
const resolvedTheme = useMemo2(() => {
|
|
9582
9613
|
if (theme && theme !== "system") {
|
|
9583
9614
|
return theme;
|
|
@@ -9590,14 +9621,15 @@ var ThemeProvider = ({ children, theme }) => {
|
|
|
9590
9621
|
}
|
|
9591
9622
|
return "light";
|
|
9592
9623
|
}, [storedTheme, theme, themePreference]);
|
|
9593
|
-
|
|
9624
|
+
useEffect14(() => {
|
|
9625
|
+
if (!theme) return;
|
|
9594
9626
|
if (theme === "system") {
|
|
9595
9627
|
deleteStoredTheme();
|
|
9596
9628
|
} else {
|
|
9597
9629
|
setStoredTheme(theme);
|
|
9598
9630
|
}
|
|
9599
9631
|
}, [theme]);
|
|
9600
|
-
|
|
9632
|
+
useEffect14(() => {
|
|
9601
9633
|
document.documentElement.setAttribute("data-theme", resolvedTheme);
|
|
9602
9634
|
}, [resolvedTheme]);
|
|
9603
9635
|
const getPreference = useCallback7(() => {
|
|
@@ -9605,10 +9637,10 @@ var ThemeProvider = ({ children, theme }) => {
|
|
|
9605
9637
|
const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
|
|
9606
9638
|
setThemePreference(prefersDark ? "dark" : prefersLight ? "light" : "system");
|
|
9607
9639
|
}, []);
|
|
9608
|
-
|
|
9640
|
+
useEffect14(() => {
|
|
9609
9641
|
getPreference();
|
|
9610
9642
|
}, [getPreference]);
|
|
9611
|
-
|
|
9643
|
+
useEffect14(() => {
|
|
9612
9644
|
const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
9613
9645
|
const lightQuery = window.matchMedia("(prefers-color-scheme: light)");
|
|
9614
9646
|
const noPrefQuery = window.matchMedia("(prefers-color-scheme: no-preference)");
|
|
@@ -10319,7 +10351,7 @@ var Circle = ({
|
|
|
10319
10351
|
};
|
|
10320
10352
|
|
|
10321
10353
|
// src/components/icons-and-geometry/Ring.tsx
|
|
10322
|
-
import { useCallback as useCallback9, useEffect as
|
|
10354
|
+
import { useCallback as useCallback9, useEffect as useEffect17, useState as useState15 } from "react";
|
|
10323
10355
|
import clsx19 from "clsx";
|
|
10324
10356
|
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
10325
10357
|
var Ring = ({
|
|
@@ -10348,7 +10380,7 @@ var AnimatedRing = ({
|
|
|
10348
10380
|
onAnimationFinished,
|
|
10349
10381
|
style
|
|
10350
10382
|
}) => {
|
|
10351
|
-
const [currentWidth, setCurrentWidth] =
|
|
10383
|
+
const [currentWidth, setCurrentWidth] = useState15(0);
|
|
10352
10384
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10353
10385
|
const animate = useCallback9((timestamp, startTime) => {
|
|
10354
10386
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
@@ -10364,7 +10396,7 @@ var AnimatedRing = ({
|
|
|
10364
10396
|
}
|
|
10365
10397
|
}
|
|
10366
10398
|
}, [milliseconds, onAnimationFinished, repeating, width]);
|
|
10367
|
-
|
|
10399
|
+
useEffect17(() => {
|
|
10368
10400
|
if (currentWidth < width) {
|
|
10369
10401
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10370
10402
|
}
|
|
@@ -10399,7 +10431,7 @@ var RingWave = ({
|
|
|
10399
10431
|
onAnimationFinished,
|
|
10400
10432
|
style
|
|
10401
10433
|
}) => {
|
|
10402
|
-
const [currentInnerSize, setCurrentInnerSize] =
|
|
10434
|
+
const [currentInnerSize, setCurrentInnerSize] = useState15(startInnerSize);
|
|
10403
10435
|
const distance = endInnerSize - startInnerSize;
|
|
10404
10436
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10405
10437
|
const animate = useCallback9((timestamp, startTime) => {
|
|
@@ -10419,7 +10451,7 @@ var RingWave = ({
|
|
|
10419
10451
|
}
|
|
10420
10452
|
}
|
|
10421
10453
|
}, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
|
|
10422
|
-
|
|
10454
|
+
useEffect17(() => {
|
|
10423
10455
|
if (currentInnerSize < endInnerSize) {
|
|
10424
10456
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10425
10457
|
}
|
|
@@ -10454,7 +10486,7 @@ var RadialRings = ({
|
|
|
10454
10486
|
sizeCircle2 = 200,
|
|
10455
10487
|
sizeCircle3 = 300
|
|
10456
10488
|
}) => {
|
|
10457
|
-
const [currentRing, setCurrentRing] =
|
|
10489
|
+
const [currentRing, setCurrentRing] = useState15(0);
|
|
10458
10490
|
const size = sizeCircle3;
|
|
10459
10491
|
return /* @__PURE__ */ jsxs16(
|
|
10460
10492
|
"div",
|
|
@@ -10608,11 +10640,11 @@ import {
|
|
|
10608
10640
|
forwardRef as forwardRef8,
|
|
10609
10641
|
useCallback as useCallback10,
|
|
10610
10642
|
useContext as useContext5,
|
|
10611
|
-
useEffect as
|
|
10643
|
+
useEffect as useEffect18,
|
|
10612
10644
|
useId as useId5,
|
|
10613
10645
|
useMemo as useMemo6,
|
|
10614
10646
|
useRef as useRef9,
|
|
10615
|
-
useState as
|
|
10647
|
+
useState as useState16
|
|
10616
10648
|
} from "react";
|
|
10617
10649
|
import clsx20 from "clsx";
|
|
10618
10650
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
@@ -10763,12 +10795,12 @@ var Carousel = ({
|
|
|
10763
10795
|
}) => {
|
|
10764
10796
|
const translation = useTranslation([defaultCarouselTranslationType]);
|
|
10765
10797
|
const slideRefs = useRef9([]);
|
|
10766
|
-
const [currentIndex, setCurrentIndex] =
|
|
10767
|
-
const [hasFocus, setHasFocus] =
|
|
10768
|
-
const [dragState, setDragState] =
|
|
10798
|
+
const [currentIndex, setCurrentIndex] = useState16(0);
|
|
10799
|
+
const [hasFocus, setHasFocus] = useState16(false);
|
|
10800
|
+
const [dragState, setDragState] = useState16();
|
|
10769
10801
|
const isPaused = hasFocus;
|
|
10770
10802
|
const carouselContainerRef = useRef9(null);
|
|
10771
|
-
const [disableClick, setDisableClick] =
|
|
10803
|
+
const [disableClick, setDisableClick] = useState16(false);
|
|
10772
10804
|
const timeOut = useRef9(void 0);
|
|
10773
10805
|
const length = useMemo6(() => children.length, [children]);
|
|
10774
10806
|
const paddingItemCount = 3;
|
|
@@ -10781,7 +10813,7 @@ var Carousel = ({
|
|
|
10781
10813
|
autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
|
|
10782
10814
|
animationTime = Math.max(100, animationTime);
|
|
10783
10815
|
autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
|
|
10784
|
-
|
|
10816
|
+
useEffect18(() => {
|
|
10785
10817
|
const carousel = carouselContainerRef.current;
|
|
10786
10818
|
if (carousel) {
|
|
10787
10819
|
let onFocus = function() {
|
|
@@ -10817,7 +10849,7 @@ var Carousel = ({
|
|
|
10817
10849
|
setCurrentIndex((currentIndex + length + 1) % length);
|
|
10818
10850
|
}
|
|
10819
10851
|
}, [canGoRight, currentIndex, length]);
|
|
10820
|
-
|
|
10852
|
+
useEffect18(() => {
|
|
10821
10853
|
if (!timeOut.current && !isPaused) {
|
|
10822
10854
|
if (autoLoopingTimeOut > 0) {
|
|
10823
10855
|
timeOut.current = setTimeout(() => {
|
|
@@ -10869,7 +10901,7 @@ var Carousel = ({
|
|
|
10869
10901
|
}
|
|
10870
10902
|
setDragState(void 0);
|
|
10871
10903
|
};
|
|
10872
|
-
|
|
10904
|
+
useEffect18(() => {
|
|
10873
10905
|
setDisableClick(!dragState);
|
|
10874
10906
|
}, [dragState]);
|
|
10875
10907
|
return /* @__PURE__ */ jsx31(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ jsxs17(
|
|
@@ -11317,7 +11349,7 @@ var FloatingContainer = forwardRef9(function FloatingContainer2({
|
|
|
11317
11349
|
});
|
|
11318
11350
|
|
|
11319
11351
|
// src/components/layout/ListBox.tsx
|
|
11320
|
-
import React11, { createContext as createContext6, forwardRef as forwardRef10, useCallback as useCallback11, useContext as useContext6, useEffect as
|
|
11352
|
+
import React11, { createContext as createContext6, forwardRef as forwardRef10, useCallback as useCallback11, useContext as useContext6, useEffect as useEffect19, useRef as useRef11, useState as useState17 } from "react";
|
|
11321
11353
|
import { clsx as clsx24 } from "clsx";
|
|
11322
11354
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
11323
11355
|
var ListBoxContext = createContext6(null);
|
|
@@ -11340,7 +11372,7 @@ var ListBoxItem = forwardRef10(
|
|
|
11340
11372
|
} = useListBoxContext();
|
|
11341
11373
|
const itemRef = useRef11(null);
|
|
11342
11374
|
const id = React11.useId();
|
|
11343
|
-
|
|
11375
|
+
useEffect19(() => {
|
|
11344
11376
|
registerItem({ id, value, disabled, ref: itemRef });
|
|
11345
11377
|
return () => unregisterItem(id);
|
|
11346
11378
|
}, [id, value, disabled, registerItem, unregisterItem]);
|
|
@@ -11393,7 +11425,7 @@ var ListBoxPrimitive = forwardRef10(
|
|
|
11393
11425
|
...props
|
|
11394
11426
|
}, ref) {
|
|
11395
11427
|
const itemsRef = useRef11([]);
|
|
11396
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
11428
|
+
const [highlightedIndex, setHighlightedIndex] = useState17(void 0);
|
|
11397
11429
|
const registerItem = useCallback11((item) => {
|
|
11398
11430
|
itemsRef.current.push(item);
|
|
11399
11431
|
itemsRef.current.sort((a, b) => {
|
|
@@ -11440,7 +11472,7 @@ var ListBoxPrimitive = forwardRef10(
|
|
|
11440
11472
|
setHighlightedIndex(index);
|
|
11441
11473
|
}
|
|
11442
11474
|
}, []);
|
|
11443
|
-
|
|
11475
|
+
useEffect19(() => {
|
|
11444
11476
|
if (highlightedIndex !== void 0) {
|
|
11445
11477
|
itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
|
|
11446
11478
|
}
|
|
@@ -12679,7 +12711,7 @@ var ErrorComponent = ({
|
|
|
12679
12711
|
};
|
|
12680
12712
|
|
|
12681
12713
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
12682
|
-
import { useState as
|
|
12714
|
+
import { useState as useState20 } from "react";
|
|
12683
12715
|
|
|
12684
12716
|
// src/components/loading-states/LoadingContainer.tsx
|
|
12685
12717
|
import { clsx as clsx28 } from "clsx";
|
|
@@ -12700,8 +12732,8 @@ var LoadingAndErrorComponent = ({
|
|
|
12700
12732
|
minimumLoadingDuration = 200,
|
|
12701
12733
|
className
|
|
12702
12734
|
}) => {
|
|
12703
|
-
const [isInMinimumLoading, setIsInMinimumLoading] =
|
|
12704
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] =
|
|
12735
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = useState20(false);
|
|
12736
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState20(false);
|
|
12705
12737
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
12706
12738
|
setIsInMinimumLoading(true);
|
|
12707
12739
|
setTimeout(() => {
|
|
@@ -12826,8 +12858,8 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
12826
12858
|
// src/components/navigation/Navigation.tsx
|
|
12827
12859
|
var import_link2 = __toESM(require_link2());
|
|
12828
12860
|
import { Menu as MenuIcon, XIcon as XIcon2 } from "lucide-react";
|
|
12829
|
-
import { useEffect as
|
|
12830
|
-
import { useCallback as useCallback14, useId as useId6, useRef as useRef14, useState as
|
|
12861
|
+
import { useEffect as useEffect22 } from "react";
|
|
12862
|
+
import { useCallback as useCallback14, useId as useId6, useRef as useRef14, useState as useState21 } from "react";
|
|
12831
12863
|
import clsx33 from "clsx";
|
|
12832
12864
|
import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
12833
12865
|
function isSubItem(item) {
|
|
@@ -12839,7 +12871,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12839
12871
|
horizontalAlignment = "center",
|
|
12840
12872
|
...options
|
|
12841
12873
|
}) => {
|
|
12842
|
-
const [isOpen, setOpen] =
|
|
12874
|
+
const [isOpen, setOpen] = useState21(false);
|
|
12843
12875
|
const containerRef = useRef14();
|
|
12844
12876
|
const triggerRef = useRef14(null);
|
|
12845
12877
|
const id = useId6();
|
|
@@ -12904,10 +12936,10 @@ var NavigationItemList = ({ items, ...restProps }) => {
|
|
|
12904
12936
|
return /* @__PURE__ */ jsx49("nav", { ...restProps, className: clsx33("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ jsx49("li", { children: isSubItem(item) ? /* @__PURE__ */ jsx49(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ jsx49(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
|
|
12905
12937
|
};
|
|
12906
12938
|
var Navigation = ({ ...props }) => {
|
|
12907
|
-
const [isMobileOpen, setIsMobileOpen] =
|
|
12939
|
+
const [isMobileOpen, setIsMobileOpen] = useState21(false);
|
|
12908
12940
|
const id = useId6();
|
|
12909
12941
|
const menuRef = useRef14(null);
|
|
12910
|
-
|
|
12942
|
+
useEffect22(() => {
|
|
12911
12943
|
menuRef.current?.focus();
|
|
12912
12944
|
}, [isMobileOpen]);
|
|
12913
12945
|
return /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
@@ -12962,7 +12994,7 @@ var Navigation = ({ ...props }) => {
|
|
|
12962
12994
|
// src/components/navigation/Pagination.tsx
|
|
12963
12995
|
import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
12964
12996
|
import clsx34 from "clsx";
|
|
12965
|
-
import { useEffect as
|
|
12997
|
+
import { useEffect as useEffect23, useState as useState22 } from "react";
|
|
12966
12998
|
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
12967
12999
|
var Pagination = ({
|
|
12968
13000
|
overwriteTranslation,
|
|
@@ -12973,11 +13005,11 @@ var Pagination = ({
|
|
|
12973
13005
|
style
|
|
12974
13006
|
}) => {
|
|
12975
13007
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
12976
|
-
const [value, setValue] =
|
|
13008
|
+
const [value, setValue] = useState22((pageIndex + 1).toString());
|
|
12977
13009
|
const noPages = pageCount === 0;
|
|
12978
13010
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
12979
13011
|
const onLastPage = pageIndex === pageCount - 1;
|
|
12980
|
-
|
|
13012
|
+
useEffect23(() => {
|
|
12981
13013
|
if (noPages) {
|
|
12982
13014
|
setValue("0");
|
|
12983
13015
|
} else {
|
|
@@ -14081,7 +14113,7 @@ var TableFilters = {
|
|
|
14081
14113
|
};
|
|
14082
14114
|
|
|
14083
14115
|
// src/components/table/Table.tsx
|
|
14084
|
-
import { useCallback as useCallback16, useEffect as
|
|
14116
|
+
import { useCallback as useCallback16, useEffect as useEffect32, useMemo as useMemo9, useRef as useRef20, useState as useState29 } from "react";
|
|
14085
14117
|
import clsx48 from "clsx";
|
|
14086
14118
|
import {
|
|
14087
14119
|
flexRender,
|
|
@@ -14104,9 +14136,9 @@ var TableCell = ({
|
|
|
14104
14136
|
};
|
|
14105
14137
|
|
|
14106
14138
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
14107
|
-
import { useEffect as
|
|
14139
|
+
import { useEffect as useEffect27 } from "react";
|
|
14108
14140
|
var useResizeCallbackWrapper = (callback) => {
|
|
14109
|
-
|
|
14141
|
+
useEffect27(() => {
|
|
14110
14142
|
window.addEventListener("resize", callback);
|
|
14111
14143
|
return () => {
|
|
14112
14144
|
window.removeEventListener("resize", callback);
|
|
@@ -14149,7 +14181,7 @@ var TableSortButton = ({
|
|
|
14149
14181
|
import { FilterIcon } from "lucide-react";
|
|
14150
14182
|
|
|
14151
14183
|
// src/components/user-action/Menu.tsx
|
|
14152
|
-
import { useEffect as
|
|
14184
|
+
import { useEffect as useEffect30, useRef as useRef19, useState as useState27 } from "react";
|
|
14153
14185
|
import clsx47 from "clsx";
|
|
14154
14186
|
|
|
14155
14187
|
// src/utils/bagFunctions.ts
|
|
@@ -14221,15 +14253,15 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
14221
14253
|
};
|
|
14222
14254
|
|
|
14223
14255
|
// src/hooks/useHoverState.ts
|
|
14224
|
-
import { useEffect as
|
|
14256
|
+
import { useEffect as useEffect28, useState as useState26 } from "react";
|
|
14225
14257
|
var defaultUseHoverStateProps = {
|
|
14226
14258
|
closingDelay: 200,
|
|
14227
14259
|
isDisabled: false
|
|
14228
14260
|
};
|
|
14229
14261
|
var useHoverState = (props = void 0) => {
|
|
14230
14262
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
14231
|
-
const [isHovered, setIsHovered] =
|
|
14232
|
-
const [timer, setTimer] =
|
|
14263
|
+
const [isHovered, setIsHovered] = useState26(false);
|
|
14264
|
+
const [timer, setTimer] = useState26();
|
|
14233
14265
|
const onMouseEnter = () => {
|
|
14234
14266
|
if (isDisabled) {
|
|
14235
14267
|
return;
|
|
@@ -14245,14 +14277,14 @@ var useHoverState = (props = void 0) => {
|
|
|
14245
14277
|
setIsHovered(false);
|
|
14246
14278
|
}, closingDelay));
|
|
14247
14279
|
};
|
|
14248
|
-
|
|
14280
|
+
useEffect28(() => {
|
|
14249
14281
|
if (timer) {
|
|
14250
14282
|
return () => {
|
|
14251
14283
|
clearTimeout(timer);
|
|
14252
14284
|
};
|
|
14253
14285
|
}
|
|
14254
14286
|
});
|
|
14255
|
-
|
|
14287
|
+
useEffect28(() => {
|
|
14256
14288
|
if (timer) {
|
|
14257
14289
|
clearTimeout(timer);
|
|
14258
14290
|
}
|
|
@@ -14265,9 +14297,9 @@ var useHoverState = (props = void 0) => {
|
|
|
14265
14297
|
};
|
|
14266
14298
|
|
|
14267
14299
|
// src/hooks/useOutsideClick.ts
|
|
14268
|
-
import { useEffect as
|
|
14300
|
+
import { useEffect as useEffect29 } from "react";
|
|
14269
14301
|
var useOutsideClick = (refs, handler) => {
|
|
14270
|
-
|
|
14302
|
+
useEffect29(() => {
|
|
14271
14303
|
const listener = (event) => {
|
|
14272
14304
|
if (event.target === null) return;
|
|
14273
14305
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -14328,7 +14360,7 @@ var Menu = ({
|
|
|
14328
14360
|
const triggerRef = useRef19(null);
|
|
14329
14361
|
const menuRef = useRef19(null);
|
|
14330
14362
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
14331
|
-
const [isHidden, setIsHidden] =
|
|
14363
|
+
const [isHidden, setIsHidden] = useState27(true);
|
|
14332
14364
|
const bag = {
|
|
14333
14365
|
isOpen,
|
|
14334
14366
|
close: () => setIsOpen(false),
|
|
@@ -14339,7 +14371,7 @@ var Menu = ({
|
|
|
14339
14371
|
triggerRef.current?.getBoundingClientRect(),
|
|
14340
14372
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
14341
14373
|
);
|
|
14342
|
-
|
|
14374
|
+
useEffect30(() => {
|
|
14343
14375
|
if (!isOpen) return;
|
|
14344
14376
|
const triggerEl = triggerRef.current;
|
|
14345
14377
|
if (!triggerEl) return;
|
|
@@ -14356,7 +14388,7 @@ var Menu = ({
|
|
|
14356
14388
|
window.removeEventListener("resize", close);
|
|
14357
14389
|
};
|
|
14358
14390
|
}, [isOpen, setIsOpen]);
|
|
14359
|
-
|
|
14391
|
+
useEffect30(() => {
|
|
14360
14392
|
if (isOpen) {
|
|
14361
14393
|
setIsHidden(false);
|
|
14362
14394
|
}
|
|
@@ -14392,7 +14424,7 @@ var Menu = ({
|
|
|
14392
14424
|
};
|
|
14393
14425
|
|
|
14394
14426
|
// src/components/table/TableFilterButton.tsx
|
|
14395
|
-
import { useEffect as
|
|
14427
|
+
import { useEffect as useEffect31, useState as useState28 } from "react";
|
|
14396
14428
|
import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
14397
14429
|
var defaultTableFilterTranslation = {
|
|
14398
14430
|
en: {
|
|
@@ -14418,9 +14450,9 @@ var TableFilterButton = ({
|
|
|
14418
14450
|
}) => {
|
|
14419
14451
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
14420
14452
|
const columnFilterValue = column.getFilterValue();
|
|
14421
|
-
const [filterValue, setFilterValue] =
|
|
14453
|
+
const [filterValue, setFilterValue] = useState28(columnFilterValue);
|
|
14422
14454
|
const hasFilter = !!filterValue;
|
|
14423
|
-
|
|
14455
|
+
useEffect31(() => {
|
|
14424
14456
|
setFilterValue(columnFilterValue);
|
|
14425
14457
|
}, [columnFilterValue]);
|
|
14426
14458
|
return /* @__PURE__ */ jsx66(
|
|
@@ -14536,19 +14568,19 @@ var Table = ({
|
|
|
14536
14568
|
}) => {
|
|
14537
14569
|
const ref = useRef20(null);
|
|
14538
14570
|
const tableRef = useRef20(null);
|
|
14539
|
-
const [columnSizing, setColumnSizing] =
|
|
14571
|
+
const [columnSizing, setColumnSizing] = useState29(columns.reduce((previousValue, currentValue) => {
|
|
14540
14572
|
return {
|
|
14541
14573
|
...previousValue,
|
|
14542
14574
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
14543
14575
|
};
|
|
14544
14576
|
}, {}));
|
|
14545
|
-
const [columnSizingInfo, setColumnSizingInfo] =
|
|
14546
|
-
const [pagination, setPagination] =
|
|
14577
|
+
const [columnSizingInfo, setColumnSizingInfo] = useState29();
|
|
14578
|
+
const [pagination, setPagination] = useState29({
|
|
14547
14579
|
pageSize: 10,
|
|
14548
14580
|
pageIndex: 0,
|
|
14549
14581
|
...initialState?.pagination
|
|
14550
14582
|
});
|
|
14551
|
-
const [columnFilters, setColumnFilters] =
|
|
14583
|
+
const [columnFilters, setColumnFilters] = useState29(initialState?.columnFilters);
|
|
14552
14584
|
const computedColumnMinWidths = useMemo9(() => {
|
|
14553
14585
|
return columns.reduce((previousValue, column) => {
|
|
14554
14586
|
return {
|
|
@@ -14688,8 +14720,8 @@ var Table = ({
|
|
|
14688
14720
|
columnResizeMode: "onChange",
|
|
14689
14721
|
...tableOptions
|
|
14690
14722
|
});
|
|
14691
|
-
const [hasInitializedSizing, setHasInitializedSizing] =
|
|
14692
|
-
|
|
14723
|
+
const [hasInitializedSizing, setHasInitializedSizing] = useState29(false);
|
|
14724
|
+
useEffect32(() => {
|
|
14693
14725
|
if (!hasInitializedSizing && ref.current) {
|
|
14694
14726
|
setHasInitializedSizing(true);
|
|
14695
14727
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
@@ -14699,7 +14731,7 @@ var Table = ({
|
|
|
14699
14731
|
table.setColumnSizing(updateColumnSizes);
|
|
14700
14732
|
}, [updateColumnSizes]));
|
|
14701
14733
|
const pageCount = table.getPageCount();
|
|
14702
|
-
|
|
14734
|
+
useEffect32(() => {
|
|
14703
14735
|
const totalPages = pageCount;
|
|
14704
14736
|
if (totalPages === 0) {
|
|
14705
14737
|
if (pagination.pageIndex !== 0) {
|
|
@@ -14919,7 +14951,7 @@ var TableWithSelection = ({
|
|
|
14919
14951
|
};
|
|
14920
14952
|
|
|
14921
14953
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
14922
|
-
import { useState as
|
|
14954
|
+
import { useState as useState30 } from "react";
|
|
14923
14955
|
import { clsx as clsx49 } from "clsx";
|
|
14924
14956
|
|
|
14925
14957
|
// src/utils/writeToClipboard.ts
|
|
@@ -14939,8 +14971,8 @@ var CopyToClipboardWrapper = ({
|
|
|
14939
14971
|
zIndex = 10
|
|
14940
14972
|
}) => {
|
|
14941
14973
|
const translation = useTranslation([formTranslation]);
|
|
14942
|
-
const [isShowingIndication, setIsShowingIndication] =
|
|
14943
|
-
const [isShowingConfirmation, setIsShowingConfirmation] =
|
|
14974
|
+
const [isShowingIndication, setIsShowingIndication] = useState30(false);
|
|
14975
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = useState30(false);
|
|
14944
14976
|
const positionClasses = {
|
|
14945
14977
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
14946
14978
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -15082,7 +15114,7 @@ var DateTimePicker = ({
|
|
|
15082
15114
|
};
|
|
15083
15115
|
|
|
15084
15116
|
// src/components/user-action/ScrollPicker.tsx
|
|
15085
|
-
import { useCallback as useCallback17, useEffect as
|
|
15117
|
+
import { useCallback as useCallback17, useEffect as useEffect33, useState as useState31 } from "react";
|
|
15086
15118
|
import clsx51 from "clsx";
|
|
15087
15119
|
import { jsx as jsx70, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
15088
15120
|
var up = 1;
|
|
@@ -15103,7 +15135,7 @@ var ScrollPicker = ({
|
|
|
15103
15135
|
transition,
|
|
15104
15136
|
items,
|
|
15105
15137
|
lastTimeStamp
|
|
15106
|
-
}, setAnimation] =
|
|
15138
|
+
}, setAnimation] = useState31({
|
|
15107
15139
|
targetIndex: selectedIndex,
|
|
15108
15140
|
currentIndex: disabled ? selectedIndex : 0,
|
|
15109
15141
|
velocity: 0,
|
|
@@ -15202,7 +15234,7 @@ var ScrollPicker = ({
|
|
|
15202
15234
|
};
|
|
15203
15235
|
});
|
|
15204
15236
|
}, [disabled, getDirection, onChange]);
|
|
15205
|
-
|
|
15237
|
+
useEffect33(() => {
|
|
15206
15238
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
15207
15239
|
});
|
|
15208
15240
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -15371,7 +15403,7 @@ var Tooltip = ({
|
|
|
15371
15403
|
|
|
15372
15404
|
// src/components/user-action/input/InsideLabelInput.tsx
|
|
15373
15405
|
import { useId as useId9 } from "react";
|
|
15374
|
-
import { forwardRef as forwardRef14, useState as
|
|
15406
|
+
import { forwardRef as forwardRef14, useState as useState32 } from "react";
|
|
15375
15407
|
import clsx54 from "clsx";
|
|
15376
15408
|
import { jsx as jsx73, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
15377
15409
|
var InsideLabelInput = forwardRef14(function InsideLabelInput2({
|
|
@@ -15380,7 +15412,7 @@ var InsideLabelInput = forwardRef14(function InsideLabelInput2({
|
|
|
15380
15412
|
...props
|
|
15381
15413
|
}, forwardedRef) {
|
|
15382
15414
|
const { value } = props;
|
|
15383
|
-
const [isFocused, setIsFocused] =
|
|
15415
|
+
const [isFocused, setIsFocused] = useState32(false);
|
|
15384
15416
|
const generatedId = useId9();
|
|
15385
15417
|
const id = customId ?? generatedId;
|
|
15386
15418
|
return /* @__PURE__ */ jsxs45("div", { className: clsx54("relative"), children: [
|
|
@@ -15434,7 +15466,7 @@ var InsideLabelInputUncontrolled = ({
|
|
|
15434
15466
|
};
|
|
15435
15467
|
|
|
15436
15468
|
// src/components/user-action/input/ToggleableInput.tsx
|
|
15437
|
-
import { forwardRef as forwardRef15, useEffect as
|
|
15469
|
+
import { forwardRef as forwardRef15, useEffect as useEffect34, useImperativeHandle as useImperativeHandle4, useRef as useRef21, useState as useState33 } from "react";
|
|
15438
15470
|
import { Pencil } from "lucide-react";
|
|
15439
15471
|
import clsx55 from "clsx";
|
|
15440
15472
|
import { jsx as jsx74, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
@@ -15444,10 +15476,10 @@ var ToggleableInput = forwardRef15(function ToggleableInput2({
|
|
|
15444
15476
|
editCompleteOptions,
|
|
15445
15477
|
...props
|
|
15446
15478
|
}, forwardedRef) {
|
|
15447
|
-
const [isEditing, setIsEditing] =
|
|
15479
|
+
const [isEditing, setIsEditing] = useState33(initialState !== "display");
|
|
15448
15480
|
const innerRef = useRef21(null);
|
|
15449
15481
|
useImperativeHandle4(forwardedRef, () => innerRef.current);
|
|
15450
|
-
|
|
15482
|
+
useEffect34(() => {
|
|
15451
15483
|
if (isEditing) {
|
|
15452
15484
|
innerRef.current?.focus();
|
|
15453
15485
|
}
|
|
@@ -15519,16 +15551,16 @@ var FocusTrap = forwardRef16(function FocusTrap2({
|
|
|
15519
15551
|
});
|
|
15520
15552
|
|
|
15521
15553
|
// src/components/utils/Transition.tsx
|
|
15522
|
-
import { useEffect as
|
|
15554
|
+
import { useEffect as useEffect35, useState as useState34 } from "react";
|
|
15523
15555
|
function Transition({
|
|
15524
15556
|
children,
|
|
15525
15557
|
show,
|
|
15526
15558
|
includeAnimation = true
|
|
15527
15559
|
}) {
|
|
15528
|
-
const [isOpen, setIsOpen] =
|
|
15529
|
-
const [isTransitioning, setIsTransitioning] =
|
|
15560
|
+
const [isOpen, setIsOpen] = useState34(show);
|
|
15561
|
+
const [isTransitioning, setIsTransitioning] = useState34(!isOpen);
|
|
15530
15562
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
15531
|
-
|
|
15563
|
+
useEffect35(() => {
|
|
15532
15564
|
setIsOpen(show);
|
|
15533
15565
|
setIsTransitioning(true);
|
|
15534
15566
|
}, [show]);
|
|
@@ -15553,7 +15585,7 @@ function Transition({
|
|
|
15553
15585
|
}
|
|
15554
15586
|
|
|
15555
15587
|
// src/hooks/focus/useFocusGuards.ts
|
|
15556
|
-
import { useEffect as
|
|
15588
|
+
import { useEffect as useEffect36 } from "react";
|
|
15557
15589
|
var selectorName = "data-hw-focus-guard";
|
|
15558
15590
|
function FocusGuard() {
|
|
15559
15591
|
const element = document.createElement("div");
|
|
@@ -15591,7 +15623,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
15591
15623
|
}
|
|
15592
15624
|
};
|
|
15593
15625
|
var useFocusGuards = () => {
|
|
15594
|
-
|
|
15626
|
+
useEffect36(() => {
|
|
15595
15627
|
FocusGuardsService.getInstance().add();
|
|
15596
15628
|
return () => {
|
|
15597
15629
|
FocusGuardsService.getInstance().remove();
|
|
@@ -15600,10 +15632,10 @@ var useFocusGuards = () => {
|
|
|
15600
15632
|
};
|
|
15601
15633
|
|
|
15602
15634
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
15603
|
-
import React20, { useEffect as
|
|
15635
|
+
import React20, { useEffect as useEffect37 } from "react";
|
|
15604
15636
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
15605
15637
|
const [hasUsedFocus, setHasUsedFocus] = React20.useState(false);
|
|
15606
|
-
|
|
15638
|
+
useEffect37(() => {
|
|
15607
15639
|
if (disable || hasUsedFocus) {
|
|
15608
15640
|
return;
|
|
15609
15641
|
}
|
|
@@ -15629,7 +15661,7 @@ var useRerender = () => {
|
|
|
15629
15661
|
};
|
|
15630
15662
|
|
|
15631
15663
|
// src/hooks/useSearch.ts
|
|
15632
|
-
import { useCallback as useCallback18, useEffect as
|
|
15664
|
+
import { useCallback as useCallback18, useEffect as useEffect38, useMemo as useMemo10, useState as useState35 } from "react";
|
|
15633
15665
|
|
|
15634
15666
|
// src/utils/simpleSearch.ts
|
|
15635
15667
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -15668,8 +15700,8 @@ var useSearch = ({
|
|
|
15668
15700
|
filter,
|
|
15669
15701
|
disabled = false
|
|
15670
15702
|
}) => {
|
|
15671
|
-
const [search, setSearch] =
|
|
15672
|
-
const [result, setResult] =
|
|
15703
|
+
const [search, setSearch] = useState35(initialSearch ?? "");
|
|
15704
|
+
const [result, setResult] = useState35(list);
|
|
15673
15705
|
const searchTags = useMemo10(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
15674
15706
|
const updateSearch = useCallback18((newSearch) => {
|
|
15675
15707
|
const usedSearch = newSearch ?? search;
|
|
@@ -15678,7 +15710,7 @@ var useSearch = ({
|
|
|
15678
15710
|
}
|
|
15679
15711
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
15680
15712
|
}, [searchTags, list, search, searchMapping]);
|
|
15681
|
-
|
|
15713
|
+
useEffect38(() => {
|
|
15682
15714
|
if (isSearchInstant) {
|
|
15683
15715
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
15684
15716
|
}
|