@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
|
@@ -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 useState35 = React20.useState;
|
|
43
|
+
var useEffect36 = React20.useEffect;
|
|
44
44
|
var useLayoutEffect3 = React20.useLayoutEffect;
|
|
45
45
|
var useDebugValue = React20.useDebugValue;
|
|
46
46
|
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
47
|
-
var value = getSnapshot(), _useState =
|
|
47
|
+
var value = getSnapshot(), _useState = useState35({ 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
|
+
useEffect36(
|
|
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 = useState35({
|
|
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
|
+
useEffect36(
|
|
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 React20 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
143
|
+
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;
|
|
144
144
|
exports.useSyncExternalStore = void 0 !== React20.useSyncExternalStore ? React20.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
|
}();
|
|
@@ -7705,6 +7705,8 @@ var TimePickerUncontrolled = ({
|
|
|
7705
7705
|
import clsx10 from "clsx";
|
|
7706
7706
|
|
|
7707
7707
|
// src/components/dialog/Dialog.tsx
|
|
7708
|
+
import { useEffect as useEffect10 } from "react";
|
|
7709
|
+
import { useState as useState9 } from "react";
|
|
7708
7710
|
import { useRef as useRef4 } from "react";
|
|
7709
7711
|
import clsx9 from "clsx";
|
|
7710
7712
|
import { X } from "lucide-react";
|
|
@@ -8070,10 +8072,21 @@ var Dialog = ({
|
|
|
8070
8072
|
onClose,
|
|
8071
8073
|
className,
|
|
8072
8074
|
backgroundClassName,
|
|
8073
|
-
position = "center"
|
|
8075
|
+
position = "center",
|
|
8076
|
+
isAnimated = true
|
|
8074
8077
|
}) => {
|
|
8075
8078
|
const translation = useTranslation([formTranslation]);
|
|
8079
|
+
const [visible, setVisible] = useState9(isOpen);
|
|
8076
8080
|
const ref = useRef4(null);
|
|
8081
|
+
useEffect10(() => {
|
|
8082
|
+
if (isOpen) {
|
|
8083
|
+
setVisible(true);
|
|
8084
|
+
} else {
|
|
8085
|
+
if (!isAnimated) {
|
|
8086
|
+
setVisible(false);
|
|
8087
|
+
}
|
|
8088
|
+
}
|
|
8089
|
+
}, [isAnimated, isOpen]);
|
|
8077
8090
|
const onCloseWrapper = () => {
|
|
8078
8091
|
if (!isModal) return;
|
|
8079
8092
|
onClose?.();
|
|
@@ -8081,7 +8094,7 @@ var Dialog = ({
|
|
|
8081
8094
|
useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
|
|
8082
8095
|
useFocusTrap({
|
|
8083
8096
|
container: ref,
|
|
8084
|
-
active:
|
|
8097
|
+
active: visible,
|
|
8085
8098
|
focusFirst: true
|
|
8086
8099
|
});
|
|
8087
8100
|
const positionMap = {
|
|
@@ -8095,6 +8108,7 @@ var Dialog = ({
|
|
|
8095
8108
|
/* @__PURE__ */ jsx11(
|
|
8096
8109
|
"div",
|
|
8097
8110
|
{
|
|
8111
|
+
hidden: !visible,
|
|
8098
8112
|
className: clsx9(
|
|
8099
8113
|
"fixed inset-0 h-screen w-screen bg-overlay-shadow z-100",
|
|
8100
8114
|
{
|
|
@@ -8103,21 +8117,30 @@ var Dialog = ({
|
|
|
8103
8117
|
},
|
|
8104
8118
|
backgroundClassName
|
|
8105
8119
|
),
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8120
|
+
onAnimationEnd: () => {
|
|
8121
|
+
if (!isOpen) {
|
|
8122
|
+
setVisible(false);
|
|
8123
|
+
}
|
|
8124
|
+
},
|
|
8125
|
+
onClick: onCloseWrapper,
|
|
8126
|
+
"aria-hidden": true
|
|
8109
8127
|
}
|
|
8110
8128
|
),
|
|
8111
8129
|
/* @__PURE__ */ jsxs8(
|
|
8112
8130
|
"div",
|
|
8113
8131
|
{
|
|
8114
8132
|
ref,
|
|
8115
|
-
hidden: !
|
|
8133
|
+
hidden: !visible,
|
|
8116
8134
|
onKeyDown: (event) => {
|
|
8117
8135
|
if (event.key === "Escape") {
|
|
8118
8136
|
onCloseWrapper();
|
|
8119
8137
|
}
|
|
8120
8138
|
},
|
|
8139
|
+
onAnimationEnd: () => {
|
|
8140
|
+
if (!isOpen) {
|
|
8141
|
+
setVisible(false);
|
|
8142
|
+
}
|
|
8143
|
+
},
|
|
8121
8144
|
className: clsx9(
|
|
8122
8145
|
"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",
|
|
8123
8146
|
{
|
|
@@ -8246,13 +8269,13 @@ import { forwardRef as forwardRef3, useImperativeHandle, useRef as useRef5 } fro
|
|
|
8246
8269
|
import clsx11 from "clsx";
|
|
8247
8270
|
|
|
8248
8271
|
// src/hooks/useDelay.ts
|
|
8249
|
-
import { useEffect as
|
|
8272
|
+
import { useEffect as useEffect11, useState as useState10 } from "react";
|
|
8250
8273
|
var defaultOptions2 = {
|
|
8251
8274
|
delay: 3e3,
|
|
8252
8275
|
disabled: false
|
|
8253
8276
|
};
|
|
8254
8277
|
function useDelay(options) {
|
|
8255
|
-
const [timer, setTimer] =
|
|
8278
|
+
const [timer, setTimer] = useState10(void 0);
|
|
8256
8279
|
const { delay, disabled } = {
|
|
8257
8280
|
...defaultOptions2,
|
|
8258
8281
|
...options
|
|
@@ -8271,12 +8294,12 @@ function useDelay(options) {
|
|
|
8271
8294
|
setTimer(void 0);
|
|
8272
8295
|
}, delay));
|
|
8273
8296
|
};
|
|
8274
|
-
|
|
8297
|
+
useEffect11(() => {
|
|
8275
8298
|
return () => {
|
|
8276
8299
|
clearTimeout(timer);
|
|
8277
8300
|
};
|
|
8278
8301
|
}, [timer]);
|
|
8279
|
-
|
|
8302
|
+
useEffect11(() => {
|
|
8280
8303
|
if (disabled) {
|
|
8281
8304
|
clearTimeout(timer);
|
|
8282
8305
|
setTimer(void 0);
|
|
@@ -8463,11 +8486,11 @@ import {
|
|
|
8463
8486
|
forwardRef as forwardRef4,
|
|
8464
8487
|
useCallback as useCallback6,
|
|
8465
8488
|
useContext as useContext2,
|
|
8466
|
-
useEffect as
|
|
8489
|
+
useEffect as useEffect13,
|
|
8467
8490
|
useId as useId3,
|
|
8468
8491
|
useImperativeHandle as useImperativeHandle2,
|
|
8469
8492
|
useRef as useRef6,
|
|
8470
|
-
useState as
|
|
8493
|
+
useState as useState12
|
|
8471
8494
|
} from "react";
|
|
8472
8495
|
import clsx13 from "clsx";
|
|
8473
8496
|
|
|
@@ -8562,7 +8585,7 @@ var ChipList = ({
|
|
|
8562
8585
|
};
|
|
8563
8586
|
|
|
8564
8587
|
// src/hooks/useFloatingElement.ts
|
|
8565
|
-
import { useCallback as useCallback5, useEffect as
|
|
8588
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useState as useState11 } from "react";
|
|
8566
8589
|
|
|
8567
8590
|
// src/utils/math.ts
|
|
8568
8591
|
var clamp = (value, range2 = [0, 1]) => {
|
|
@@ -8625,7 +8648,7 @@ function useFloatingElement({
|
|
|
8625
8648
|
screenPadding = 16,
|
|
8626
8649
|
gap = 4
|
|
8627
8650
|
}) {
|
|
8628
|
-
const [style, setStyle] =
|
|
8651
|
+
const [style, setStyle] = useState11();
|
|
8629
8652
|
const isMounted = useIsMounted();
|
|
8630
8653
|
const calculate = useCallback5(() => {
|
|
8631
8654
|
const containerRect = containerRef.current.getBoundingClientRect();
|
|
@@ -8657,14 +8680,14 @@ function useFloatingElement({
|
|
|
8657
8680
|
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
8658
8681
|
const height = containerRef.current?.getBoundingClientRect().height;
|
|
8659
8682
|
const width = containerRef.current?.getBoundingClientRect().width;
|
|
8660
|
-
|
|
8683
|
+
useEffect12(() => {
|
|
8661
8684
|
if (active && isMounted) {
|
|
8662
8685
|
calculate();
|
|
8663
8686
|
} else {
|
|
8664
8687
|
setStyle(void 0);
|
|
8665
8688
|
}
|
|
8666
8689
|
}, [calculate, active, isMounted, height, width]);
|
|
8667
|
-
|
|
8690
|
+
useEffect12(() => {
|
|
8668
8691
|
window.addEventListener("resize", calculate);
|
|
8669
8692
|
let timeout;
|
|
8670
8693
|
if (isPolling) {
|
|
@@ -8707,11 +8730,11 @@ var SelectRoot = ({
|
|
|
8707
8730
|
isMultiSelect = false,
|
|
8708
8731
|
iconAppearance = "left"
|
|
8709
8732
|
}) => {
|
|
8710
|
-
const [options, setOptions] =
|
|
8733
|
+
const [options, setOptions] = useState12([]);
|
|
8711
8734
|
const triggerRef = useRef6(null);
|
|
8712
8735
|
const generatedId = useId3();
|
|
8713
8736
|
const usedId = id ?? generatedId;
|
|
8714
|
-
const [internalState, setInternalState] =
|
|
8737
|
+
const [internalState, setInternalState] = useState12({
|
|
8715
8738
|
isOpen
|
|
8716
8739
|
});
|
|
8717
8740
|
const selectedValues = isMultiSelect ? values ?? [] : [value].filter(Boolean);
|
|
@@ -8827,7 +8850,7 @@ var SelectRoot = ({
|
|
|
8827
8850
|
highlightedValue
|
|
8828
8851
|
}));
|
|
8829
8852
|
};
|
|
8830
|
-
|
|
8853
|
+
useEffect13(() => {
|
|
8831
8854
|
if (!internalState.highlightedValue) return;
|
|
8832
8855
|
const highlighted = options.find((value2) => value2.value === internalState.highlightedValue);
|
|
8833
8856
|
if (highlighted) {
|
|
@@ -8862,7 +8885,7 @@ var SelectOption = forwardRef4(
|
|
|
8862
8885
|
const itemRef = useRef6(null);
|
|
8863
8886
|
iconAppearance ??= config.iconAppearance;
|
|
8864
8887
|
const label = children ?? value;
|
|
8865
|
-
|
|
8888
|
+
useEffect13(() => {
|
|
8866
8889
|
register({
|
|
8867
8890
|
value,
|
|
8868
8891
|
label,
|
|
@@ -8946,7 +8969,7 @@ var SelectButton = forwardRef4(function SelectButton2({ placeholder, selectedDis
|
|
|
8946
8969
|
const { register, unregister, toggleOpen } = trigger;
|
|
8947
8970
|
const innerRef = useRef6(null);
|
|
8948
8971
|
useImperativeHandle2(ref, () => innerRef.current);
|
|
8949
|
-
|
|
8972
|
+
useEffect13(() => {
|
|
8950
8973
|
register(innerRef);
|
|
8951
8974
|
return () => unregister();
|
|
8952
8975
|
}, [register, unregister]);
|
|
@@ -9024,7 +9047,7 @@ var SelectChipDisplay = forwardRef4(function SelectChipDisplay2({ ...props }, re
|
|
|
9024
9047
|
const { register, unregister, toggleOpen } = trigger;
|
|
9025
9048
|
const innerRef = useRef6(null);
|
|
9026
9049
|
useImperativeHandle2(ref, () => innerRef.current);
|
|
9027
|
-
|
|
9050
|
+
useEffect13(() => {
|
|
9028
9051
|
register(innerRef);
|
|
9029
9052
|
return () => unregister();
|
|
9030
9053
|
}, [register, unregister]);
|
|
@@ -9330,7 +9353,7 @@ import { MonitorCog, MoonIcon, SunIcon } from "lucide-react";
|
|
|
9330
9353
|
import clsx14 from "clsx";
|
|
9331
9354
|
|
|
9332
9355
|
// src/theming/useTheme.tsx
|
|
9333
|
-
import { createContext as createContext3, useCallback as useCallback7, useContext as useContext3, useEffect as
|
|
9356
|
+
import { createContext as createContext3, useCallback as useCallback7, useContext as useContext3, useEffect as useEffect14, useMemo as useMemo2, useState as useState13 } from "react";
|
|
9334
9357
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
9335
9358
|
var themes = ["light", "dark", "system"];
|
|
9336
9359
|
var defaultThemeTypeTranslation = {
|
|
@@ -10039,7 +10062,7 @@ var Circle = ({
|
|
|
10039
10062
|
};
|
|
10040
10063
|
|
|
10041
10064
|
// src/components/icons-and-geometry/Ring.tsx
|
|
10042
|
-
import { useCallback as useCallback9, useEffect as
|
|
10065
|
+
import { useCallback as useCallback9, useEffect as useEffect17, useState as useState15 } from "react";
|
|
10043
10066
|
import clsx19 from "clsx";
|
|
10044
10067
|
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
10045
10068
|
var Ring = ({
|
|
@@ -10068,7 +10091,7 @@ var AnimatedRing = ({
|
|
|
10068
10091
|
onAnimationFinished,
|
|
10069
10092
|
style
|
|
10070
10093
|
}) => {
|
|
10071
|
-
const [currentWidth, setCurrentWidth] =
|
|
10094
|
+
const [currentWidth, setCurrentWidth] = useState15(0);
|
|
10072
10095
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10073
10096
|
const animate = useCallback9((timestamp, startTime) => {
|
|
10074
10097
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
@@ -10084,7 +10107,7 @@ var AnimatedRing = ({
|
|
|
10084
10107
|
}
|
|
10085
10108
|
}
|
|
10086
10109
|
}, [milliseconds, onAnimationFinished, repeating, width]);
|
|
10087
|
-
|
|
10110
|
+
useEffect17(() => {
|
|
10088
10111
|
if (currentWidth < width) {
|
|
10089
10112
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10090
10113
|
}
|
|
@@ -10119,7 +10142,7 @@ var RingWave = ({
|
|
|
10119
10142
|
onAnimationFinished,
|
|
10120
10143
|
style
|
|
10121
10144
|
}) => {
|
|
10122
|
-
const [currentInnerSize, setCurrentInnerSize] =
|
|
10145
|
+
const [currentInnerSize, setCurrentInnerSize] = useState15(startInnerSize);
|
|
10123
10146
|
const distance = endInnerSize - startInnerSize;
|
|
10124
10147
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
10125
10148
|
const animate = useCallback9((timestamp, startTime) => {
|
|
@@ -10139,7 +10162,7 @@ var RingWave = ({
|
|
|
10139
10162
|
}
|
|
10140
10163
|
}
|
|
10141
10164
|
}, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
|
|
10142
|
-
|
|
10165
|
+
useEffect17(() => {
|
|
10143
10166
|
if (currentInnerSize < endInnerSize) {
|
|
10144
10167
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
10145
10168
|
}
|
|
@@ -10174,7 +10197,7 @@ var RadialRings = ({
|
|
|
10174
10197
|
sizeCircle2 = 200,
|
|
10175
10198
|
sizeCircle3 = 300
|
|
10176
10199
|
}) => {
|
|
10177
|
-
const [currentRing, setCurrentRing] =
|
|
10200
|
+
const [currentRing, setCurrentRing] = useState15(0);
|
|
10178
10201
|
const size = sizeCircle3;
|
|
10179
10202
|
return /* @__PURE__ */ jsxs16(
|
|
10180
10203
|
"div",
|
|
@@ -10328,11 +10351,11 @@ import {
|
|
|
10328
10351
|
forwardRef as forwardRef8,
|
|
10329
10352
|
useCallback as useCallback10,
|
|
10330
10353
|
useContext as useContext5,
|
|
10331
|
-
useEffect as
|
|
10354
|
+
useEffect as useEffect18,
|
|
10332
10355
|
useId as useId5,
|
|
10333
10356
|
useMemo as useMemo6,
|
|
10334
10357
|
useRef as useRef9,
|
|
10335
|
-
useState as
|
|
10358
|
+
useState as useState16
|
|
10336
10359
|
} from "react";
|
|
10337
10360
|
import clsx20 from "clsx";
|
|
10338
10361
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
@@ -10483,12 +10506,12 @@ var Carousel = ({
|
|
|
10483
10506
|
}) => {
|
|
10484
10507
|
const translation = useTranslation([defaultCarouselTranslationType]);
|
|
10485
10508
|
const slideRefs = useRef9([]);
|
|
10486
|
-
const [currentIndex, setCurrentIndex] =
|
|
10487
|
-
const [hasFocus, setHasFocus] =
|
|
10488
|
-
const [dragState, setDragState] =
|
|
10509
|
+
const [currentIndex, setCurrentIndex] = useState16(0);
|
|
10510
|
+
const [hasFocus, setHasFocus] = useState16(false);
|
|
10511
|
+
const [dragState, setDragState] = useState16();
|
|
10489
10512
|
const isPaused = hasFocus;
|
|
10490
10513
|
const carouselContainerRef = useRef9(null);
|
|
10491
|
-
const [disableClick, setDisableClick] =
|
|
10514
|
+
const [disableClick, setDisableClick] = useState16(false);
|
|
10492
10515
|
const timeOut = useRef9(void 0);
|
|
10493
10516
|
const length = useMemo6(() => children.length, [children]);
|
|
10494
10517
|
const paddingItemCount = 3;
|
|
@@ -10501,7 +10524,7 @@ var Carousel = ({
|
|
|
10501
10524
|
autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
|
|
10502
10525
|
animationTime = Math.max(100, animationTime);
|
|
10503
10526
|
autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
|
|
10504
|
-
|
|
10527
|
+
useEffect18(() => {
|
|
10505
10528
|
const carousel = carouselContainerRef.current;
|
|
10506
10529
|
if (carousel) {
|
|
10507
10530
|
let onFocus = function() {
|
|
@@ -10537,7 +10560,7 @@ var Carousel = ({
|
|
|
10537
10560
|
setCurrentIndex((currentIndex + length + 1) % length);
|
|
10538
10561
|
}
|
|
10539
10562
|
}, [canGoRight, currentIndex, length]);
|
|
10540
|
-
|
|
10563
|
+
useEffect18(() => {
|
|
10541
10564
|
if (!timeOut.current && !isPaused) {
|
|
10542
10565
|
if (autoLoopingTimeOut > 0) {
|
|
10543
10566
|
timeOut.current = setTimeout(() => {
|
|
@@ -10589,7 +10612,7 @@ var Carousel = ({
|
|
|
10589
10612
|
}
|
|
10590
10613
|
setDragState(void 0);
|
|
10591
10614
|
};
|
|
10592
|
-
|
|
10615
|
+
useEffect18(() => {
|
|
10593
10616
|
setDisableClick(!dragState);
|
|
10594
10617
|
}, [dragState]);
|
|
10595
10618
|
return /* @__PURE__ */ jsx31(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ jsxs17(
|
|
@@ -11037,7 +11060,7 @@ var FloatingContainer = forwardRef9(function FloatingContainer2({
|
|
|
11037
11060
|
});
|
|
11038
11061
|
|
|
11039
11062
|
// src/components/layout/ListBox.tsx
|
|
11040
|
-
import React11, { createContext as createContext6, forwardRef as forwardRef10, useCallback as useCallback11, useContext as useContext6, useEffect as
|
|
11063
|
+
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";
|
|
11041
11064
|
import { clsx as clsx24 } from "clsx";
|
|
11042
11065
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
11043
11066
|
var ListBoxContext = createContext6(null);
|
|
@@ -11060,7 +11083,7 @@ var ListBoxItem = forwardRef10(
|
|
|
11060
11083
|
} = useListBoxContext();
|
|
11061
11084
|
const itemRef = useRef11(null);
|
|
11062
11085
|
const id = React11.useId();
|
|
11063
|
-
|
|
11086
|
+
useEffect19(() => {
|
|
11064
11087
|
registerItem({ id, value, disabled, ref: itemRef });
|
|
11065
11088
|
return () => unregisterItem(id);
|
|
11066
11089
|
}, [id, value, disabled, registerItem, unregisterItem]);
|
|
@@ -11113,7 +11136,7 @@ var ListBoxPrimitive = forwardRef10(
|
|
|
11113
11136
|
...props
|
|
11114
11137
|
}, ref) {
|
|
11115
11138
|
const itemsRef = useRef11([]);
|
|
11116
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
11139
|
+
const [highlightedIndex, setHighlightedIndex] = useState17(void 0);
|
|
11117
11140
|
const registerItem = useCallback11((item) => {
|
|
11118
11141
|
itemsRef.current.push(item);
|
|
11119
11142
|
itemsRef.current.sort((a, b) => {
|
|
@@ -11160,7 +11183,7 @@ var ListBoxPrimitive = forwardRef10(
|
|
|
11160
11183
|
setHighlightedIndex(index);
|
|
11161
11184
|
}
|
|
11162
11185
|
}, []);
|
|
11163
|
-
|
|
11186
|
+
useEffect19(() => {
|
|
11164
11187
|
if (highlightedIndex !== void 0) {
|
|
11165
11188
|
itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
|
|
11166
11189
|
}
|
|
@@ -12399,7 +12422,7 @@ var ErrorComponent = ({
|
|
|
12399
12422
|
};
|
|
12400
12423
|
|
|
12401
12424
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
12402
|
-
import { useState as
|
|
12425
|
+
import { useState as useState20 } from "react";
|
|
12403
12426
|
|
|
12404
12427
|
// src/components/loading-states/LoadingContainer.tsx
|
|
12405
12428
|
import { clsx as clsx28 } from "clsx";
|
|
@@ -12420,8 +12443,8 @@ var LoadingAndErrorComponent = ({
|
|
|
12420
12443
|
minimumLoadingDuration = 200,
|
|
12421
12444
|
className
|
|
12422
12445
|
}) => {
|
|
12423
|
-
const [isInMinimumLoading, setIsInMinimumLoading] =
|
|
12424
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] =
|
|
12446
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = useState20(false);
|
|
12447
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState20(false);
|
|
12425
12448
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
12426
12449
|
setIsInMinimumLoading(true);
|
|
12427
12450
|
setTimeout(() => {
|
|
@@ -12546,8 +12569,8 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
12546
12569
|
// src/components/navigation/Navigation.tsx
|
|
12547
12570
|
var import_link2 = __toESM(require_link2());
|
|
12548
12571
|
import { Menu as MenuIcon, XIcon as XIcon2 } from "lucide-react";
|
|
12549
|
-
import { useEffect as
|
|
12550
|
-
import { useCallback as useCallback14, useId as useId6, useRef as useRef14, useState as
|
|
12572
|
+
import { useEffect as useEffect22 } from "react";
|
|
12573
|
+
import { useCallback as useCallback14, useId as useId6, useRef as useRef14, useState as useState21 } from "react";
|
|
12551
12574
|
import clsx33 from "clsx";
|
|
12552
12575
|
import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
12553
12576
|
function isSubItem(item) {
|
|
@@ -12559,7 +12582,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12559
12582
|
horizontalAlignment = "center",
|
|
12560
12583
|
...options
|
|
12561
12584
|
}) => {
|
|
12562
|
-
const [isOpen, setOpen] =
|
|
12585
|
+
const [isOpen, setOpen] = useState21(false);
|
|
12563
12586
|
const containerRef = useRef14();
|
|
12564
12587
|
const triggerRef = useRef14(null);
|
|
12565
12588
|
const id = useId6();
|
|
@@ -12624,10 +12647,10 @@ var NavigationItemList = ({ items, ...restProps }) => {
|
|
|
12624
12647
|
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)) });
|
|
12625
12648
|
};
|
|
12626
12649
|
var Navigation = ({ ...props }) => {
|
|
12627
|
-
const [isMobileOpen, setIsMobileOpen] =
|
|
12650
|
+
const [isMobileOpen, setIsMobileOpen] = useState21(false);
|
|
12628
12651
|
const id = useId6();
|
|
12629
12652
|
const menuRef = useRef14(null);
|
|
12630
|
-
|
|
12653
|
+
useEffect22(() => {
|
|
12631
12654
|
menuRef.current?.focus();
|
|
12632
12655
|
}, [isMobileOpen]);
|
|
12633
12656
|
return /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
@@ -12682,7 +12705,7 @@ var Navigation = ({ ...props }) => {
|
|
|
12682
12705
|
// src/components/navigation/Pagination.tsx
|
|
12683
12706
|
import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
12684
12707
|
import clsx34 from "clsx";
|
|
12685
|
-
import { useEffect as
|
|
12708
|
+
import { useEffect as useEffect23, useState as useState22 } from "react";
|
|
12686
12709
|
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
12687
12710
|
var Pagination = ({
|
|
12688
12711
|
overwriteTranslation,
|
|
@@ -12693,11 +12716,11 @@ var Pagination = ({
|
|
|
12693
12716
|
style
|
|
12694
12717
|
}) => {
|
|
12695
12718
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
12696
|
-
const [value, setValue] =
|
|
12719
|
+
const [value, setValue] = useState22((pageIndex + 1).toString());
|
|
12697
12720
|
const noPages = pageCount === 0;
|
|
12698
12721
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
12699
12722
|
const onLastPage = pageIndex === pageCount - 1;
|
|
12700
|
-
|
|
12723
|
+
useEffect23(() => {
|
|
12701
12724
|
if (noPages) {
|
|
12702
12725
|
setValue("0");
|
|
12703
12726
|
} else {
|
|
@@ -13801,7 +13824,7 @@ var TableFilters = {
|
|
|
13801
13824
|
};
|
|
13802
13825
|
|
|
13803
13826
|
// src/components/table/Table.tsx
|
|
13804
|
-
import { useCallback as useCallback16, useEffect as
|
|
13827
|
+
import { useCallback as useCallback16, useEffect as useEffect32, useMemo as useMemo9, useRef as useRef20, useState as useState29 } from "react";
|
|
13805
13828
|
import clsx48 from "clsx";
|
|
13806
13829
|
import {
|
|
13807
13830
|
flexRender,
|
|
@@ -13824,9 +13847,9 @@ var TableCell = ({
|
|
|
13824
13847
|
};
|
|
13825
13848
|
|
|
13826
13849
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
13827
|
-
import { useEffect as
|
|
13850
|
+
import { useEffect as useEffect27 } from "react";
|
|
13828
13851
|
var useResizeCallbackWrapper = (callback) => {
|
|
13829
|
-
|
|
13852
|
+
useEffect27(() => {
|
|
13830
13853
|
window.addEventListener("resize", callback);
|
|
13831
13854
|
return () => {
|
|
13832
13855
|
window.removeEventListener("resize", callback);
|
|
@@ -13869,7 +13892,7 @@ var TableSortButton = ({
|
|
|
13869
13892
|
import { FilterIcon } from "lucide-react";
|
|
13870
13893
|
|
|
13871
13894
|
// src/components/user-action/Menu.tsx
|
|
13872
|
-
import { useEffect as
|
|
13895
|
+
import { useEffect as useEffect30, useRef as useRef19, useState as useState27 } from "react";
|
|
13873
13896
|
import clsx47 from "clsx";
|
|
13874
13897
|
|
|
13875
13898
|
// src/utils/bagFunctions.ts
|
|
@@ -13941,15 +13964,15 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
13941
13964
|
};
|
|
13942
13965
|
|
|
13943
13966
|
// src/hooks/useHoverState.ts
|
|
13944
|
-
import { useEffect as
|
|
13967
|
+
import { useEffect as useEffect28, useState as useState26 } from "react";
|
|
13945
13968
|
var defaultUseHoverStateProps = {
|
|
13946
13969
|
closingDelay: 200,
|
|
13947
13970
|
isDisabled: false
|
|
13948
13971
|
};
|
|
13949
13972
|
var useHoverState = (props = void 0) => {
|
|
13950
13973
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
13951
|
-
const [isHovered, setIsHovered] =
|
|
13952
|
-
const [timer, setTimer] =
|
|
13974
|
+
const [isHovered, setIsHovered] = useState26(false);
|
|
13975
|
+
const [timer, setTimer] = useState26();
|
|
13953
13976
|
const onMouseEnter = () => {
|
|
13954
13977
|
if (isDisabled) {
|
|
13955
13978
|
return;
|
|
@@ -13965,14 +13988,14 @@ var useHoverState = (props = void 0) => {
|
|
|
13965
13988
|
setIsHovered(false);
|
|
13966
13989
|
}, closingDelay));
|
|
13967
13990
|
};
|
|
13968
|
-
|
|
13991
|
+
useEffect28(() => {
|
|
13969
13992
|
if (timer) {
|
|
13970
13993
|
return () => {
|
|
13971
13994
|
clearTimeout(timer);
|
|
13972
13995
|
};
|
|
13973
13996
|
}
|
|
13974
13997
|
});
|
|
13975
|
-
|
|
13998
|
+
useEffect28(() => {
|
|
13976
13999
|
if (timer) {
|
|
13977
14000
|
clearTimeout(timer);
|
|
13978
14001
|
}
|
|
@@ -13985,9 +14008,9 @@ var useHoverState = (props = void 0) => {
|
|
|
13985
14008
|
};
|
|
13986
14009
|
|
|
13987
14010
|
// src/hooks/useOutsideClick.ts
|
|
13988
|
-
import { useEffect as
|
|
14011
|
+
import { useEffect as useEffect29 } from "react";
|
|
13989
14012
|
var useOutsideClick = (refs, handler) => {
|
|
13990
|
-
|
|
14013
|
+
useEffect29(() => {
|
|
13991
14014
|
const listener = (event) => {
|
|
13992
14015
|
if (event.target === null) return;
|
|
13993
14016
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -14048,7 +14071,7 @@ var Menu = ({
|
|
|
14048
14071
|
const triggerRef = useRef19(null);
|
|
14049
14072
|
const menuRef = useRef19(null);
|
|
14050
14073
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
14051
|
-
const [isHidden, setIsHidden] =
|
|
14074
|
+
const [isHidden, setIsHidden] = useState27(true);
|
|
14052
14075
|
const bag = {
|
|
14053
14076
|
isOpen,
|
|
14054
14077
|
close: () => setIsOpen(false),
|
|
@@ -14059,7 +14082,7 @@ var Menu = ({
|
|
|
14059
14082
|
triggerRef.current?.getBoundingClientRect(),
|
|
14060
14083
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
14061
14084
|
);
|
|
14062
|
-
|
|
14085
|
+
useEffect30(() => {
|
|
14063
14086
|
if (!isOpen) return;
|
|
14064
14087
|
const triggerEl = triggerRef.current;
|
|
14065
14088
|
if (!triggerEl) return;
|
|
@@ -14076,7 +14099,7 @@ var Menu = ({
|
|
|
14076
14099
|
window.removeEventListener("resize", close);
|
|
14077
14100
|
};
|
|
14078
14101
|
}, [isOpen, setIsOpen]);
|
|
14079
|
-
|
|
14102
|
+
useEffect30(() => {
|
|
14080
14103
|
if (isOpen) {
|
|
14081
14104
|
setIsHidden(false);
|
|
14082
14105
|
}
|
|
@@ -14112,7 +14135,7 @@ var Menu = ({
|
|
|
14112
14135
|
};
|
|
14113
14136
|
|
|
14114
14137
|
// src/components/table/TableFilterButton.tsx
|
|
14115
|
-
import { useEffect as
|
|
14138
|
+
import { useEffect as useEffect31, useState as useState28 } from "react";
|
|
14116
14139
|
import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
14117
14140
|
var defaultTableFilterTranslation = {
|
|
14118
14141
|
en: {
|
|
@@ -14138,9 +14161,9 @@ var TableFilterButton = ({
|
|
|
14138
14161
|
}) => {
|
|
14139
14162
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
14140
14163
|
const columnFilterValue = column.getFilterValue();
|
|
14141
|
-
const [filterValue, setFilterValue] =
|
|
14164
|
+
const [filterValue, setFilterValue] = useState28(columnFilterValue);
|
|
14142
14165
|
const hasFilter = !!filterValue;
|
|
14143
|
-
|
|
14166
|
+
useEffect31(() => {
|
|
14144
14167
|
setFilterValue(columnFilterValue);
|
|
14145
14168
|
}, [columnFilterValue]);
|
|
14146
14169
|
return /* @__PURE__ */ jsx66(
|
|
@@ -14256,19 +14279,19 @@ var Table = ({
|
|
|
14256
14279
|
}) => {
|
|
14257
14280
|
const ref = useRef20(null);
|
|
14258
14281
|
const tableRef = useRef20(null);
|
|
14259
|
-
const [columnSizing, setColumnSizing] =
|
|
14282
|
+
const [columnSizing, setColumnSizing] = useState29(columns.reduce((previousValue, currentValue) => {
|
|
14260
14283
|
return {
|
|
14261
14284
|
...previousValue,
|
|
14262
14285
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
14263
14286
|
};
|
|
14264
14287
|
}, {}));
|
|
14265
|
-
const [columnSizingInfo, setColumnSizingInfo] =
|
|
14266
|
-
const [pagination, setPagination] =
|
|
14288
|
+
const [columnSizingInfo, setColumnSizingInfo] = useState29();
|
|
14289
|
+
const [pagination, setPagination] = useState29({
|
|
14267
14290
|
pageSize: 10,
|
|
14268
14291
|
pageIndex: 0,
|
|
14269
14292
|
...initialState?.pagination
|
|
14270
14293
|
});
|
|
14271
|
-
const [columnFilters, setColumnFilters] =
|
|
14294
|
+
const [columnFilters, setColumnFilters] = useState29(initialState?.columnFilters);
|
|
14272
14295
|
const computedColumnMinWidths = useMemo9(() => {
|
|
14273
14296
|
return columns.reduce((previousValue, column) => {
|
|
14274
14297
|
return {
|
|
@@ -14408,8 +14431,8 @@ var Table = ({
|
|
|
14408
14431
|
columnResizeMode: "onChange",
|
|
14409
14432
|
...tableOptions
|
|
14410
14433
|
});
|
|
14411
|
-
const [hasInitializedSizing, setHasInitializedSizing] =
|
|
14412
|
-
|
|
14434
|
+
const [hasInitializedSizing, setHasInitializedSizing] = useState29(false);
|
|
14435
|
+
useEffect32(() => {
|
|
14413
14436
|
if (!hasInitializedSizing && ref.current) {
|
|
14414
14437
|
setHasInitializedSizing(true);
|
|
14415
14438
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
@@ -14419,7 +14442,7 @@ var Table = ({
|
|
|
14419
14442
|
table.setColumnSizing(updateColumnSizes);
|
|
14420
14443
|
}, [updateColumnSizes]));
|
|
14421
14444
|
const pageCount = table.getPageCount();
|
|
14422
|
-
|
|
14445
|
+
useEffect32(() => {
|
|
14423
14446
|
const totalPages = pageCount;
|
|
14424
14447
|
if (totalPages === 0) {
|
|
14425
14448
|
if (pagination.pageIndex !== 0) {
|
|
@@ -14639,7 +14662,7 @@ var TableWithSelection = ({
|
|
|
14639
14662
|
};
|
|
14640
14663
|
|
|
14641
14664
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
14642
|
-
import { useState as
|
|
14665
|
+
import { useState as useState30 } from "react";
|
|
14643
14666
|
import { clsx as clsx49 } from "clsx";
|
|
14644
14667
|
|
|
14645
14668
|
// src/utils/writeToClipboard.ts
|
|
@@ -14659,8 +14682,8 @@ var CopyToClipboardWrapper = ({
|
|
|
14659
14682
|
zIndex = 10
|
|
14660
14683
|
}) => {
|
|
14661
14684
|
const translation = useTranslation([formTranslation]);
|
|
14662
|
-
const [isShowingIndication, setIsShowingIndication] =
|
|
14663
|
-
const [isShowingConfirmation, setIsShowingConfirmation] =
|
|
14685
|
+
const [isShowingIndication, setIsShowingIndication] = useState30(false);
|
|
14686
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = useState30(false);
|
|
14664
14687
|
const positionClasses = {
|
|
14665
14688
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
14666
14689
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -14802,7 +14825,7 @@ var DateTimePicker = ({
|
|
|
14802
14825
|
};
|
|
14803
14826
|
|
|
14804
14827
|
// src/components/user-action/ScrollPicker.tsx
|
|
14805
|
-
import { useCallback as useCallback17, useEffect as
|
|
14828
|
+
import { useCallback as useCallback17, useEffect as useEffect33, useState as useState31 } from "react";
|
|
14806
14829
|
import clsx51 from "clsx";
|
|
14807
14830
|
import { jsx as jsx70, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
14808
14831
|
var up = 1;
|
|
@@ -14823,7 +14846,7 @@ var ScrollPicker = ({
|
|
|
14823
14846
|
transition,
|
|
14824
14847
|
items,
|
|
14825
14848
|
lastTimeStamp
|
|
14826
|
-
}, setAnimation] =
|
|
14849
|
+
}, setAnimation] = useState31({
|
|
14827
14850
|
targetIndex: selectedIndex,
|
|
14828
14851
|
currentIndex: disabled ? selectedIndex : 0,
|
|
14829
14852
|
velocity: 0,
|
|
@@ -14922,7 +14945,7 @@ var ScrollPicker = ({
|
|
|
14922
14945
|
};
|
|
14923
14946
|
});
|
|
14924
14947
|
}, [disabled, getDirection, onChange]);
|
|
14925
|
-
|
|
14948
|
+
useEffect33(() => {
|
|
14926
14949
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
14927
14950
|
});
|
|
14928
14951
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -15091,7 +15114,7 @@ var Tooltip = ({
|
|
|
15091
15114
|
|
|
15092
15115
|
// src/components/user-action/input/InsideLabelInput.tsx
|
|
15093
15116
|
import { useId as useId9 } from "react";
|
|
15094
|
-
import { forwardRef as forwardRef14, useState as
|
|
15117
|
+
import { forwardRef as forwardRef14, useState as useState32 } from "react";
|
|
15095
15118
|
import clsx54 from "clsx";
|
|
15096
15119
|
import { jsx as jsx73, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
15097
15120
|
var InsideLabelInput = forwardRef14(function InsideLabelInput2({
|
|
@@ -15100,7 +15123,7 @@ var InsideLabelInput = forwardRef14(function InsideLabelInput2({
|
|
|
15100
15123
|
...props
|
|
15101
15124
|
}, forwardedRef) {
|
|
15102
15125
|
const { value } = props;
|
|
15103
|
-
const [isFocused, setIsFocused] =
|
|
15126
|
+
const [isFocused, setIsFocused] = useState32(false);
|
|
15104
15127
|
const generatedId = useId9();
|
|
15105
15128
|
const id = customId ?? generatedId;
|
|
15106
15129
|
return /* @__PURE__ */ jsxs45("div", { className: clsx54("relative"), children: [
|
|
@@ -15154,7 +15177,7 @@ var InsideLabelInputUncontrolled = ({
|
|
|
15154
15177
|
};
|
|
15155
15178
|
|
|
15156
15179
|
// src/components/user-action/input/ToggleableInput.tsx
|
|
15157
|
-
import { forwardRef as forwardRef15, useEffect as
|
|
15180
|
+
import { forwardRef as forwardRef15, useEffect as useEffect34, useImperativeHandle as useImperativeHandle4, useRef as useRef21, useState as useState33 } from "react";
|
|
15158
15181
|
import { Pencil } from "lucide-react";
|
|
15159
15182
|
import clsx55 from "clsx";
|
|
15160
15183
|
import { jsx as jsx74, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
@@ -15164,10 +15187,10 @@ var ToggleableInput = forwardRef15(function ToggleableInput2({
|
|
|
15164
15187
|
editCompleteOptions,
|
|
15165
15188
|
...props
|
|
15166
15189
|
}, forwardedRef) {
|
|
15167
|
-
const [isEditing, setIsEditing] =
|
|
15190
|
+
const [isEditing, setIsEditing] = useState33(initialState !== "display");
|
|
15168
15191
|
const innerRef = useRef21(null);
|
|
15169
15192
|
useImperativeHandle4(forwardedRef, () => innerRef.current);
|
|
15170
|
-
|
|
15193
|
+
useEffect34(() => {
|
|
15171
15194
|
if (isEditing) {
|
|
15172
15195
|
innerRef.current?.focus();
|
|
15173
15196
|
}
|
|
@@ -15239,16 +15262,16 @@ var FocusTrap = forwardRef16(function FocusTrap2({
|
|
|
15239
15262
|
});
|
|
15240
15263
|
|
|
15241
15264
|
// src/components/utils/Transition.tsx
|
|
15242
|
-
import { useEffect as
|
|
15265
|
+
import { useEffect as useEffect35, useState as useState34 } from "react";
|
|
15243
15266
|
function Transition({
|
|
15244
15267
|
children,
|
|
15245
15268
|
show,
|
|
15246
15269
|
includeAnimation = true
|
|
15247
15270
|
}) {
|
|
15248
|
-
const [isOpen, setIsOpen] =
|
|
15249
|
-
const [isTransitioning, setIsTransitioning] =
|
|
15271
|
+
const [isOpen, setIsOpen] = useState34(show);
|
|
15272
|
+
const [isTransitioning, setIsTransitioning] = useState34(!isOpen);
|
|
15250
15273
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
15251
|
-
|
|
15274
|
+
useEffect35(() => {
|
|
15252
15275
|
setIsOpen(show);
|
|
15253
15276
|
setIsTransitioning(true);
|
|
15254
15277
|
}, [show]);
|