@helpwave/hightide 0.1.21 → 0.1.22
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 +11 -1
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +11 -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 +1 -0
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +1 -0
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js +2 -1
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +2 -1
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.d.mts +17 -7
- package/dist/components/icons-and-geometry/Avatar.d.ts +17 -7
- package/dist/components/icons-and-geometry/Avatar.js +103 -42
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +102 -40
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +1 -0
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +1 -0
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Chip.d.mts +6 -2
- package/dist/components/layout-and-navigation/Chip.d.ts +6 -2
- package/dist/components/layout-and-navigation/Chip.js +8 -2
- package/dist/components/layout-and-navigation/Chip.js.map +1 -1
- package/dist/components/layout-and-navigation/Chip.mjs +6 -1
- package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +3 -2
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +3 -2
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js +3 -2
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +3 -2
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +2 -1
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +2 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js +1 -0
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +1 -0
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.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/LoadingButton.js +1 -0
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.mjs +1 -0
- package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +2 -1
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +2 -1
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +2 -1
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +2 -1
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js +3 -2
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +3 -2
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +5 -4
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +6 -9
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +11 -7
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +10 -10
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +13 -3
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +13 -3
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +13 -3
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +13 -3
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +18 -8
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +19 -13
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +13 -3
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +13 -3
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +12 -2
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +12 -2
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +15 -5
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +16 -10
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +15 -5
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +15 -5
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +6 -5
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +7 -10
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +3 -2
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +4 -7
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/TableSortButton.js +1 -0
- package/dist/components/table/TableSortButton.js.map +1 -1
- package/dist/components/table/TableSortButton.mjs +1 -0
- package/dist/components/table/TableSortButton.mjs.map +1 -1
- package/dist/components/user-action/Button.d.mts +2 -1
- package/dist/components/user-action/Button.d.ts +2 -1
- package/dist/components/user-action/Button.js +12 -1
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/Button.mjs +12 -1
- package/dist/components/user-action/Button.mjs.map +1 -1
- package/dist/components/user-action/Checkbox.js +1 -1
- package/dist/components/user-action/Checkbox.js.map +1 -1
- package/dist/components/user-action/Checkbox.mjs +1 -1
- package/dist/components/user-action/Checkbox.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 +11 -1
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +11 -1
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Input.js +1 -1
- package/dist/components/user-action/Input.js.map +1 -1
- package/dist/components/user-action/Input.mjs +1 -1
- package/dist/components/user-action/Input.mjs.map +1 -1
- package/dist/components/user-action/Menu.js +2 -2
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +3 -7
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.js +7 -6
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +8 -11
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.js +2 -1
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs +2 -1
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/Select.js +4 -3
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +5 -8
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Textarea.js +3 -3
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +3 -3
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/css/globals.css +270 -47
- package/dist/css/uncompiled/globals.css +2 -2
- package/dist/css/uncompiled/theme/colors-basic.css +1 -1
- package/dist/css/uncompiled/theme/colors-component.css +9 -13
- package/dist/css/uncompiled/theme/colors-semantic.css +8 -3
- package/dist/css/uncompiled/utitlity/shadow.css +45 -16
- package/dist/hooks/useLocalStorage.js +8 -3
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +8 -3
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/hooks/useLogOnce.d.mts +8 -0
- package/dist/hooks/useLogOnce.d.ts +8 -0
- package/dist/hooks/useLogOnce.js +53 -0
- package/dist/hooks/useLogOnce.js.map +1 -0
- package/dist/hooks/useLogOnce.mjs +29 -0
- package/dist/hooks/useLogOnce.mjs.map +1 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +285 -206
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +249 -175
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +8 -3
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +8 -3
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.d.mts +2 -2
- package/dist/theming/useTheme.d.ts +2 -2
- package/dist/theming/useTheme.js +26 -22
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +21 -17
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2845,6 +2845,7 @@ __export(index_exports, {
|
|
|
2845
2845
|
ArrayUtil: () => ArrayUtil,
|
|
2846
2846
|
Avatar: () => Avatar,
|
|
2847
2847
|
AvatarGroup: () => AvatarGroup,
|
|
2848
|
+
AvatarUtil: () => AvatarUtil,
|
|
2848
2849
|
BagFunctionUtil: () => BagFunctionUtil,
|
|
2849
2850
|
BreadCrumb: () => BreadCrumb,
|
|
2850
2851
|
ButtonColorUtil: () => ButtonColorUtil,
|
|
@@ -2855,6 +2856,7 @@ __export(index_exports, {
|
|
|
2855
2856
|
CheckboxUncontrolled: () => CheckboxUncontrolled,
|
|
2856
2857
|
Chip: () => Chip,
|
|
2857
2858
|
ChipList: () => ChipList,
|
|
2859
|
+
ChipUtil: () => ChipUtil,
|
|
2858
2860
|
Circle: () => Circle,
|
|
2859
2861
|
ConfirmDialog: () => ConfirmDialog,
|
|
2860
2862
|
ConfirmModal: () => ConfirmModal,
|
|
@@ -2955,8 +2957,6 @@ __export(index_exports, {
|
|
|
2955
2957
|
YearMonthPicker: () => YearMonthPicker,
|
|
2956
2958
|
YearMonthPickerUncontrolled: () => YearMonthPickerUncontrolled,
|
|
2957
2959
|
addDuration: () => addDuration,
|
|
2958
|
-
avatarSizeMapping: () => avatarSizeMapping,
|
|
2959
|
-
avtarSizeList: () => avtarSizeList,
|
|
2960
2960
|
builder: () => builder,
|
|
2961
2961
|
changeDuration: () => changeDuration,
|
|
2962
2962
|
clamp: () => clamp,
|
|
@@ -2993,6 +2993,7 @@ __export(index_exports, {
|
|
|
2993
2993
|
useLanguage: () => useLanguage,
|
|
2994
2994
|
useLocalStorage: () => useLocalStorage,
|
|
2995
2995
|
useLocale: () => useLocale,
|
|
2996
|
+
useLogOnce: () => useLogOnce,
|
|
2996
2997
|
useOutsideClick: () => useOutsideClick,
|
|
2997
2998
|
usePopoverPosition: () => usePopoverPosition,
|
|
2998
2999
|
useRerender: () => useRerender,
|
|
@@ -3235,6 +3236,11 @@ var SessionStorageService = class extends StorageService {
|
|
|
3235
3236
|
}
|
|
3236
3237
|
};
|
|
3237
3238
|
|
|
3239
|
+
// src/util/resolveSetState.ts
|
|
3240
|
+
function resolveSetState(action, prev) {
|
|
3241
|
+
return typeof action === "function" ? action(prev) : action;
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3238
3244
|
// src/hooks/useLocalStorage.ts
|
|
3239
3245
|
var useLocalStorage = (key, initValue) => {
|
|
3240
3246
|
const get = (0, import_react.useCallback)(() => {
|
|
@@ -3246,10 +3252,10 @@ var useLocalStorage = (key, initValue) => {
|
|
|
3246
3252
|
return value || initValue;
|
|
3247
3253
|
}, [initValue, key]);
|
|
3248
3254
|
const [storedValue, setStoredValue] = (0, import_react.useState)(get);
|
|
3249
|
-
const setValue = (0, import_react.useCallback)((
|
|
3250
|
-
const newValue =
|
|
3255
|
+
const setValue = (0, import_react.useCallback)((action) => {
|
|
3256
|
+
const newValue = resolveSetState(action, storedValue);
|
|
3251
3257
|
const storageService = new LocalStorageService();
|
|
3252
|
-
storageService.set(key,
|
|
3258
|
+
storageService.set(key, newValue);
|
|
3253
3259
|
setStoredValue(newValue);
|
|
3254
3260
|
}, [storedValue, setStoredValue, key]);
|
|
3255
3261
|
(0, import_react.useEffect)(() => {
|
|
@@ -3685,6 +3691,7 @@ var SolidButton = (0, import_react3.forwardRef)(function SolidButton2({
|
|
|
3685
3691
|
onClick,
|
|
3686
3692
|
disabled,
|
|
3687
3693
|
className: (0, import_clsx4.default)(
|
|
3694
|
+
"font-semibold",
|
|
3688
3695
|
{
|
|
3689
3696
|
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
3690
3697
|
[(0, import_clsx4.default)(colorClasses, "hover:brightness-90")]: !disabled
|
|
@@ -3742,6 +3749,7 @@ var OutlineButton = ({
|
|
|
3742
3749
|
onClick,
|
|
3743
3750
|
disabled,
|
|
3744
3751
|
className: (0, import_clsx4.default)(
|
|
3752
|
+
"font-semibold",
|
|
3745
3753
|
{
|
|
3746
3754
|
"text-disabled-text border-disabled-outline cursor-not-allowed": disabled,
|
|
3747
3755
|
[(0, import_clsx4.default)(colorClasses, "hover:brightness-80")]: !disabled
|
|
@@ -3784,6 +3792,7 @@ var TextButton = ({
|
|
|
3784
3792
|
startIcon,
|
|
3785
3793
|
endIcon,
|
|
3786
3794
|
onClick,
|
|
3795
|
+
coloredHoverBackground = true,
|
|
3787
3796
|
className,
|
|
3788
3797
|
...restProps
|
|
3789
3798
|
}) => {
|
|
@@ -3792,6 +3801,11 @@ var TextButton = ({
|
|
|
3792
3801
|
negative: "bg-transparent text-button-text-negative-text",
|
|
3793
3802
|
neutral: "bg-transparent text-button-text-neutral-text"
|
|
3794
3803
|
}[color];
|
|
3804
|
+
const backgroundColor = {
|
|
3805
|
+
primary: "hover:bg-button-text-primary-text/20",
|
|
3806
|
+
negative: "hover:bg-button-text-negative-text/20",
|
|
3807
|
+
neutral: "hover:bg-button-text-neutral-text/20"
|
|
3808
|
+
}[color];
|
|
3795
3809
|
const iconColorClasses = {
|
|
3796
3810
|
primary: "text-button-text-primary-icon",
|
|
3797
3811
|
negative: "text-button-text-negative-icon",
|
|
@@ -3803,9 +3817,12 @@ var TextButton = ({
|
|
|
3803
3817
|
onClick,
|
|
3804
3818
|
disabled,
|
|
3805
3819
|
className: (0, import_clsx4.default)(
|
|
3820
|
+
"font-semibold",
|
|
3806
3821
|
{
|
|
3807
3822
|
"text-disabled-text cursor-not-allowed": disabled,
|
|
3808
|
-
[
|
|
3823
|
+
[colorClasses]: !disabled,
|
|
3824
|
+
[backgroundColor]: !disabled && coloredHoverBackground,
|
|
3825
|
+
"hover:bg-button-text-hover-background": !disabled && !coloredHoverBackground
|
|
3809
3826
|
},
|
|
3810
3827
|
ButtonUtil.paddingMapping[size],
|
|
3811
3828
|
className
|
|
@@ -4887,7 +4904,7 @@ var Modal = ({
|
|
|
4887
4904
|
ref,
|
|
4888
4905
|
tabIndex: -1,
|
|
4889
4906
|
className: (0, import_clsx11.default)(
|
|
4890
|
-
"flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-
|
|
4907
|
+
"flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-around-lg shadow-strong animate-pop-in",
|
|
4891
4908
|
className
|
|
4892
4909
|
),
|
|
4893
4910
|
role: "dialog",
|
|
@@ -4956,7 +4973,7 @@ var Dialog = ({
|
|
|
4956
4973
|
ref,
|
|
4957
4974
|
tabIndex: -1,
|
|
4958
4975
|
className: (0, import_clsx11.default)(
|
|
4959
|
-
"flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-
|
|
4976
|
+
"flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-around-lg shadow-strong animate-pop-in",
|
|
4960
4977
|
className
|
|
4961
4978
|
),
|
|
4962
4979
|
role: "dialog",
|
|
@@ -5018,49 +5035,105 @@ var ConfirmDialog = ({
|
|
|
5018
5035
|
|
|
5019
5036
|
// src/components/icons-and-geometry/Avatar.tsx
|
|
5020
5037
|
var import_clsx13 = __toESM(require("clsx"));
|
|
5038
|
+
|
|
5039
|
+
// src/hooks/useLogOnce.ts
|
|
5040
|
+
var import_react11 = require("react");
|
|
5041
|
+
var useLogOnce = ({
|
|
5042
|
+
message,
|
|
5043
|
+
condition,
|
|
5044
|
+
type = "warning"
|
|
5045
|
+
}) => {
|
|
5046
|
+
const [hasLogged, setHasLogged] = (0, import_react11.useState)(false);
|
|
5047
|
+
(0, import_react11.useEffect)(() => {
|
|
5048
|
+
if (!hasLogged && condition) {
|
|
5049
|
+
switch (type) {
|
|
5050
|
+
case "info":
|
|
5051
|
+
console.info(message);
|
|
5052
|
+
break;
|
|
5053
|
+
case "error":
|
|
5054
|
+
console.error(message);
|
|
5055
|
+
break;
|
|
5056
|
+
case "warning":
|
|
5057
|
+
console.warn(message);
|
|
5058
|
+
break;
|
|
5059
|
+
}
|
|
5060
|
+
setHasLogged(true);
|
|
5061
|
+
}
|
|
5062
|
+
}, [condition]);
|
|
5063
|
+
};
|
|
5064
|
+
|
|
5065
|
+
// src/components/icons-and-geometry/Avatar.tsx
|
|
5066
|
+
var import_react12 = require("react");
|
|
5021
5067
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
5022
|
-
var avtarSizeList = ["
|
|
5068
|
+
var avtarSizeList = ["sm", "md", "lg", "xl"];
|
|
5023
5069
|
var avatarSizeMapping = {
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
};
|
|
5029
|
-
var
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
minWidth:
|
|
5043
|
-
|
|
5070
|
+
sm: 18,
|
|
5071
|
+
md: 24,
|
|
5072
|
+
lg: 32,
|
|
5073
|
+
xl: 48
|
|
5074
|
+
};
|
|
5075
|
+
var textClassNameMapping = {
|
|
5076
|
+
sm: "text-xs font-semibold",
|
|
5077
|
+
md: "text-sm font-semibold",
|
|
5078
|
+
lg: "text-lg font-semibold",
|
|
5079
|
+
xl: "text-2xl font-bold"
|
|
5080
|
+
};
|
|
5081
|
+
var AvatarUtil = {
|
|
5082
|
+
avatarSizeMapping,
|
|
5083
|
+
sizes: avtarSizeList
|
|
5084
|
+
};
|
|
5085
|
+
var Avatar = ({ image, name, size = "md", fullyRounded, className = "" }) => {
|
|
5086
|
+
const pixels = avatarSizeMapping[size];
|
|
5087
|
+
const sizeStyle = {
|
|
5088
|
+
minWidth: pixels,
|
|
5089
|
+
maxWidth: pixels,
|
|
5090
|
+
minHeight: pixels,
|
|
5091
|
+
maxHeight: pixels
|
|
5044
5092
|
};
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5093
|
+
const textClassName = textClassNameMapping[size];
|
|
5094
|
+
useLogOnce({ message: "Either set image or name in Avatar", condition: !image && !name, type: "warning" });
|
|
5095
|
+
const displayName = (0, import_react12.useMemo)(() => {
|
|
5096
|
+
const maxLetters = size === "sm" ? 1 : 2;
|
|
5097
|
+
return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
|
|
5098
|
+
}, [name, size]);
|
|
5099
|
+
const rounding = {
|
|
5100
|
+
"rounded-full": fullyRounded,
|
|
5101
|
+
"rounded-lg": !fullyRounded && !(size === "sm" || size === "md"),
|
|
5102
|
+
"rounded-sm": !fullyRounded && (size === "sm" || size === "md")
|
|
5103
|
+
};
|
|
5104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5105
|
+
"div",
|
|
5106
|
+
{
|
|
5107
|
+
className: (0, import_clsx13.default)(
|
|
5108
|
+
`relative bg-primary text-on-primary`,
|
|
5109
|
+
rounding,
|
|
5110
|
+
className
|
|
5111
|
+
),
|
|
5112
|
+
style: sizeStyle,
|
|
5113
|
+
children: [
|
|
5114
|
+
name && !image && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: (0, import_clsx13.default)(textClassName, "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"), children: displayName }),
|
|
5115
|
+
image && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5116
|
+
"img",
|
|
5117
|
+
{
|
|
5118
|
+
className: (0, import_clsx13.default)(
|
|
5119
|
+
"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
5120
|
+
rounding
|
|
5121
|
+
),
|
|
5122
|
+
src: image.avatarUrl,
|
|
5123
|
+
alt: image.alt,
|
|
5124
|
+
style: sizeStyle
|
|
5125
|
+
}
|
|
5126
|
+
)
|
|
5127
|
+
]
|
|
5128
|
+
}
|
|
5058
5129
|
);
|
|
5059
5130
|
};
|
|
5060
5131
|
var AvatarGroup = ({
|
|
5061
5132
|
avatars,
|
|
5062
5133
|
maxShownProfiles = 5,
|
|
5063
|
-
|
|
5134
|
+
showTotalNumber = true,
|
|
5135
|
+
size = "md",
|
|
5136
|
+
fullyRounded
|
|
5064
5137
|
}) => {
|
|
5065
5138
|
const displayedProfiles = avatars.length < maxShownProfiles ? avatars : avatars.slice(0, maxShownProfiles);
|
|
5066
5139
|
const diameter = avatarSizeMapping[size];
|
|
@@ -5073,15 +5146,22 @@ var AvatarGroup = ({
|
|
|
5073
5146
|
{
|
|
5074
5147
|
className: "absolute",
|
|
5075
5148
|
style: { left: index * diameter * stackingOverlap + "px", zIndex: maxShownProfiles - index },
|
|
5076
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5150
|
+
Avatar,
|
|
5151
|
+
{
|
|
5152
|
+
...avatar,
|
|
5153
|
+
size,
|
|
5154
|
+
fullyRounded,
|
|
5155
|
+
className: (0, import_clsx13.default)("shadow-side shadow-r-4 shadow-hard", avatar.className)
|
|
5156
|
+
}
|
|
5157
|
+
)
|
|
5077
5158
|
},
|
|
5078
5159
|
index
|
|
5079
5160
|
)) }),
|
|
5080
|
-
notDisplayedProfiles > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5161
|
+
showTotalNumber && notDisplayedProfiles > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5081
5162
|
"div",
|
|
5082
5163
|
{
|
|
5083
|
-
className: "flex-row-2 truncate items-center",
|
|
5084
|
-
style: { fontSize: diameter / 2 + "px", marginLeft: 1 + diameter / 16 + "px" },
|
|
5164
|
+
className: (0, import_clsx13.default)(textClassNameMapping[size], "flex-row-2 truncate items-center"),
|
|
5085
5165
|
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
5086
5166
|
"+ ",
|
|
5087
5167
|
notDisplayedProfiles
|
|
@@ -5116,7 +5196,7 @@ var Circle = ({
|
|
|
5116
5196
|
};
|
|
5117
5197
|
|
|
5118
5198
|
// src/components/icons-and-geometry/Ring.tsx
|
|
5119
|
-
var
|
|
5199
|
+
var import_react13 = require("react");
|
|
5120
5200
|
var import_clsx15 = __toESM(require("clsx"));
|
|
5121
5201
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
5122
5202
|
var Ring = ({
|
|
@@ -5145,9 +5225,9 @@ var AnimatedRing = ({
|
|
|
5145
5225
|
onAnimationFinished = noop,
|
|
5146
5226
|
style
|
|
5147
5227
|
}) => {
|
|
5148
|
-
const [currentWidth, setCurrentWidth] = (0,
|
|
5228
|
+
const [currentWidth, setCurrentWidth] = (0, import_react13.useState)(0);
|
|
5149
5229
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
5150
|
-
const animate = (0,
|
|
5230
|
+
const animate = (0, import_react13.useCallback)((timestamp, startTime) => {
|
|
5151
5231
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
5152
5232
|
const newWidth = Math.min(width * progress, width);
|
|
5153
5233
|
setCurrentWidth(newWidth);
|
|
@@ -5161,7 +5241,7 @@ var AnimatedRing = ({
|
|
|
5161
5241
|
}
|
|
5162
5242
|
}
|
|
5163
5243
|
}, [milliseconds, onAnimationFinished, repeating, width]);
|
|
5164
|
-
(0,
|
|
5244
|
+
(0, import_react13.useEffect)(() => {
|
|
5165
5245
|
if (currentWidth < width) {
|
|
5166
5246
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
5167
5247
|
}
|
|
@@ -5196,10 +5276,10 @@ var RingWave = ({
|
|
|
5196
5276
|
onAnimationFinished = noop,
|
|
5197
5277
|
style
|
|
5198
5278
|
}) => {
|
|
5199
|
-
const [currentInnerSize, setCurrentInnerSize] = (0,
|
|
5279
|
+
const [currentInnerSize, setCurrentInnerSize] = (0, import_react13.useState)(startInnerSize);
|
|
5200
5280
|
const distance = endInnerSize - startInnerSize;
|
|
5201
5281
|
const milliseconds = 1e3 * fillAnimationDuration;
|
|
5202
|
-
const animate = (0,
|
|
5282
|
+
const animate = (0, import_react13.useCallback)((timestamp, startTime) => {
|
|
5203
5283
|
const progress = Math.min((timestamp - startTime) / milliseconds, 1);
|
|
5204
5284
|
const newInnerSize = Math.min(
|
|
5205
5285
|
startInnerSize + distance * progress,
|
|
@@ -5216,7 +5296,7 @@ var RingWave = ({
|
|
|
5216
5296
|
}
|
|
5217
5297
|
}
|
|
5218
5298
|
}, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
|
|
5219
|
-
(0,
|
|
5299
|
+
(0, import_react13.useEffect)(() => {
|
|
5220
5300
|
if (currentInnerSize < endInnerSize) {
|
|
5221
5301
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
5222
5302
|
}
|
|
@@ -5251,7 +5331,7 @@ var RadialRings = ({
|
|
|
5251
5331
|
sizeCircle2 = 200,
|
|
5252
5332
|
sizeCircle3 = 300
|
|
5253
5333
|
}) => {
|
|
5254
|
-
const [currentRing, setCurrentRing] = (0,
|
|
5334
|
+
const [currentRing, setCurrentRing] = (0, import_react13.useState)(0);
|
|
5255
5335
|
const size = sizeCircle3;
|
|
5256
5336
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
5257
5337
|
"div",
|
|
@@ -5418,7 +5498,7 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
5418
5498
|
};
|
|
5419
5499
|
|
|
5420
5500
|
// src/components/layout-and-navigation/Carousel.tsx
|
|
5421
|
-
var
|
|
5501
|
+
var import_react14 = require("react");
|
|
5422
5502
|
var import_clsx17 = __toESM(require("clsx"));
|
|
5423
5503
|
var import_lucide_react5 = require("lucide-react");
|
|
5424
5504
|
|
|
@@ -5550,15 +5630,15 @@ var Carousel = ({
|
|
|
5550
5630
|
currentPosition,
|
|
5551
5631
|
dragState,
|
|
5552
5632
|
animationState
|
|
5553
|
-
}, setCarouselInformation] = (0,
|
|
5633
|
+
}, setCarouselInformation] = (0, import_react14.useState)({
|
|
5554
5634
|
currentPosition: 0
|
|
5555
5635
|
});
|
|
5556
|
-
const animationId = (0,
|
|
5557
|
-
const timeOut = (0,
|
|
5636
|
+
const animationId = (0, import_react14.useRef)(void 0);
|
|
5637
|
+
const timeOut = (0, import_react14.useRef)(void 0);
|
|
5558
5638
|
autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
|
|
5559
5639
|
const length = children.length;
|
|
5560
5640
|
const paddingItemCount = 3;
|
|
5561
|
-
const util = (0,
|
|
5641
|
+
const util = (0, import_react14.useMemo)(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
|
|
5562
5642
|
const currentIndex = util.getCorrectedPosition(LoopingArrayCalculator.withoutOffset(currentPosition));
|
|
5563
5643
|
animationTime = Math.max(200, animationTime);
|
|
5564
5644
|
autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
|
|
@@ -5566,7 +5646,7 @@ var Carousel = ({
|
|
|
5566
5646
|
const baseOffset = -50 + (index - currentPosition) * 100;
|
|
5567
5647
|
return `${baseOffset}%`;
|
|
5568
5648
|
};
|
|
5569
|
-
const animation = (0,
|
|
5649
|
+
const animation = (0, import_react14.useCallback)((time) => {
|
|
5570
5650
|
let keepAnimating = true;
|
|
5571
5651
|
setCarouselInformation((state) => {
|
|
5572
5652
|
const {
|
|
@@ -5611,7 +5691,7 @@ var Carousel = ({
|
|
|
5611
5691
|
animationId.current = requestAnimationFrame((time1) => animation(time1));
|
|
5612
5692
|
}
|
|
5613
5693
|
}, [animationTime, autoLoopAnimationTime, util]);
|
|
5614
|
-
(0,
|
|
5694
|
+
(0, import_react14.useEffect)(() => {
|
|
5615
5695
|
if (animationState) {
|
|
5616
5696
|
animationId.current = requestAnimationFrame(animation);
|
|
5617
5697
|
}
|
|
@@ -5633,7 +5713,7 @@ var Carousel = ({
|
|
|
5633
5713
|
isAutoLooping: true
|
|
5634
5714
|
}
|
|
5635
5715
|
}));
|
|
5636
|
-
(0,
|
|
5716
|
+
(0, import_react14.useEffect)(() => {
|
|
5637
5717
|
if (!animationId.current && !animationState && !dragState && !timeOut.current) {
|
|
5638
5718
|
if (autoLoopingTimeOut > 0) {
|
|
5639
5719
|
timeOut.current = setTimeout(() => {
|
|
@@ -5841,6 +5921,10 @@ var Carousel = ({
|
|
|
5841
5921
|
// src/components/layout-and-navigation/Chip.tsx
|
|
5842
5922
|
var import_clsx18 = __toESM(require("clsx"));
|
|
5843
5923
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
5924
|
+
var chipColors = ["default", "dark", "red", "yellow", "green", "blue", "pink"];
|
|
5925
|
+
var ChipUtil = {
|
|
5926
|
+
colors: chipColors
|
|
5927
|
+
};
|
|
5844
5928
|
var Chip = ({
|
|
5845
5929
|
children,
|
|
5846
5930
|
trailingIcon,
|
|
@@ -6184,17 +6268,17 @@ var import_lucide_react6 = require("lucide-react");
|
|
|
6184
6268
|
var import_clsx23 = __toESM(require("clsx"));
|
|
6185
6269
|
|
|
6186
6270
|
// src/components/user-action/Input.tsx
|
|
6187
|
-
var
|
|
6271
|
+
var import_react18 = require("react");
|
|
6188
6272
|
var import_clsx22 = __toESM(require("clsx"));
|
|
6189
6273
|
|
|
6190
6274
|
// src/hooks/useDelay.ts
|
|
6191
|
-
var
|
|
6275
|
+
var import_react15 = require("react");
|
|
6192
6276
|
var defaultOptions = {
|
|
6193
6277
|
delay: 3e3,
|
|
6194
6278
|
disabled: false
|
|
6195
6279
|
};
|
|
6196
6280
|
function useDelay(options) {
|
|
6197
|
-
const [timer, setTimer] = (0,
|
|
6281
|
+
const [timer, setTimer] = (0, import_react15.useState)(void 0);
|
|
6198
6282
|
const { delay, disabled } = {
|
|
6199
6283
|
...defaultOptions,
|
|
6200
6284
|
...options
|
|
@@ -6213,12 +6297,12 @@ function useDelay(options) {
|
|
|
6213
6297
|
setTimer(void 0);
|
|
6214
6298
|
}, delay));
|
|
6215
6299
|
};
|
|
6216
|
-
(0,
|
|
6300
|
+
(0, import_react15.useEffect)(() => {
|
|
6217
6301
|
return () => {
|
|
6218
6302
|
clearTimeout(timer);
|
|
6219
6303
|
};
|
|
6220
6304
|
}, [timer]);
|
|
6221
|
-
(0,
|
|
6305
|
+
(0, import_react15.useEffect)(() => {
|
|
6222
6306
|
if (disabled) {
|
|
6223
6307
|
clearTimeout(timer);
|
|
6224
6308
|
setTimer(void 0);
|
|
@@ -6246,9 +6330,9 @@ var Label = ({
|
|
|
6246
6330
|
};
|
|
6247
6331
|
|
|
6248
6332
|
// src/hooks/useFocusManagement.ts
|
|
6249
|
-
var
|
|
6333
|
+
var import_react16 = require("react");
|
|
6250
6334
|
function useFocusManagement() {
|
|
6251
|
-
const getFocusableElements = (0,
|
|
6335
|
+
const getFocusableElements = (0, import_react16.useCallback)(() => {
|
|
6252
6336
|
return Array.from(
|
|
6253
6337
|
document.querySelectorAll(
|
|
6254
6338
|
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -6257,7 +6341,7 @@ function useFocusManagement() {
|
|
|
6257
6341
|
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
6258
6342
|
);
|
|
6259
6343
|
}, []);
|
|
6260
|
-
const getNextFocusElement = (0,
|
|
6344
|
+
const getNextFocusElement = (0, import_react16.useCallback)(() => {
|
|
6261
6345
|
const elements = getFocusableElements();
|
|
6262
6346
|
if (elements.length === 0) {
|
|
6263
6347
|
return void 0;
|
|
@@ -6269,11 +6353,11 @@ function useFocusManagement() {
|
|
|
6269
6353
|
}
|
|
6270
6354
|
return nextElement;
|
|
6271
6355
|
}, [getFocusableElements]);
|
|
6272
|
-
const focusNext = (0,
|
|
6356
|
+
const focusNext = (0, import_react16.useCallback)(() => {
|
|
6273
6357
|
const nextElement = getNextFocusElement();
|
|
6274
6358
|
nextElement?.focus();
|
|
6275
6359
|
}, [getNextFocusElement]);
|
|
6276
|
-
const getPreviousFocusElement = (0,
|
|
6360
|
+
const getPreviousFocusElement = (0, import_react16.useCallback)(() => {
|
|
6277
6361
|
const elements = getFocusableElements();
|
|
6278
6362
|
if (elements.length === 0) {
|
|
6279
6363
|
return void 0;
|
|
@@ -6289,7 +6373,7 @@ function useFocusManagement() {
|
|
|
6289
6373
|
}
|
|
6290
6374
|
return previousElement;
|
|
6291
6375
|
}, [getFocusableElements]);
|
|
6292
|
-
const focusPrevious = (0,
|
|
6376
|
+
const focusPrevious = (0, import_react16.useCallback)(() => {
|
|
6293
6377
|
const previousElement = getPreviousFocusElement();
|
|
6294
6378
|
if (previousElement) previousElement.focus();
|
|
6295
6379
|
}, [getPreviousFocusElement]);
|
|
@@ -6303,10 +6387,10 @@ function useFocusManagement() {
|
|
|
6303
6387
|
}
|
|
6304
6388
|
|
|
6305
6389
|
// src/hooks/useFocusOnceVisible.ts
|
|
6306
|
-
var
|
|
6390
|
+
var import_react17 = __toESM(require("react"));
|
|
6307
6391
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
6308
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
6309
|
-
(0,
|
|
6392
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react17.default.useState(false);
|
|
6393
|
+
(0, import_react17.useEffect)(() => {
|
|
6310
6394
|
if (disable || hasUsedFocus) {
|
|
6311
6395
|
return;
|
|
6312
6396
|
}
|
|
@@ -6331,7 +6415,7 @@ var getInputClassName = ({ disabled = false, hasError = false }) => {
|
|
|
6331
6415
|
return (0, import_clsx22.default)(
|
|
6332
6416
|
"px-2 py-1.5 rounded-md border-2",
|
|
6333
6417
|
{
|
|
6334
|
-
"bg-
|
|
6418
|
+
"bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
|
|
6335
6419
|
"bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
|
|
6336
6420
|
"bg-disabled-background text-disabled-text border-disabled-border": disabled
|
|
6337
6421
|
}
|
|
@@ -6342,7 +6426,7 @@ var defaultEditCompleteOptions = {
|
|
|
6342
6426
|
afterDelay: true,
|
|
6343
6427
|
delay: 2500
|
|
6344
6428
|
};
|
|
6345
|
-
var Input = (0,
|
|
6429
|
+
var Input = (0, import_react18.forwardRef)(function Input2({
|
|
6346
6430
|
id,
|
|
6347
6431
|
type = "text",
|
|
6348
6432
|
value,
|
|
@@ -6365,10 +6449,10 @@ var Input = (0, import_react16.forwardRef)(function Input2({
|
|
|
6365
6449
|
restartTimer,
|
|
6366
6450
|
clearTimer
|
|
6367
6451
|
} = useDelay({ delay, disabled: !afterDelay });
|
|
6368
|
-
const innerRef = (0,
|
|
6452
|
+
const innerRef = (0, import_react18.useRef)(null);
|
|
6369
6453
|
const { focusNext } = useFocusManagement();
|
|
6370
6454
|
useFocusOnceVisible(innerRef, !autoFocus);
|
|
6371
|
-
(0,
|
|
6455
|
+
(0, import_react18.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
6372
6456
|
const handleKeyDown = (e) => {
|
|
6373
6457
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
6374
6458
|
e.preventDefault();
|
|
@@ -6422,8 +6506,8 @@ var InputUncontrolled = ({
|
|
|
6422
6506
|
onChangeText = noop,
|
|
6423
6507
|
...props
|
|
6424
6508
|
}) => {
|
|
6425
|
-
const [usedValue, setUsedValue] = (0,
|
|
6426
|
-
(0,
|
|
6509
|
+
const [usedValue, setUsedValue] = (0, import_react18.useState)(value);
|
|
6510
|
+
(0, import_react18.useEffect)(() => {
|
|
6427
6511
|
setUsedValue(value);
|
|
6428
6512
|
}, [value]);
|
|
6429
6513
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
@@ -6438,7 +6522,7 @@ var InputUncontrolled = ({
|
|
|
6438
6522
|
}
|
|
6439
6523
|
);
|
|
6440
6524
|
};
|
|
6441
|
-
var FormInput = (0,
|
|
6525
|
+
var FormInput = (0, import_react18.forwardRef)(function FormInput2({
|
|
6442
6526
|
id,
|
|
6443
6527
|
labelText,
|
|
6444
6528
|
errorText,
|
|
@@ -6474,7 +6558,7 @@ var FormInput = (0, import_react16.forwardRef)(function FormInput2({
|
|
|
6474
6558
|
});
|
|
6475
6559
|
|
|
6476
6560
|
// src/components/layout-and-navigation/Pagination.tsx
|
|
6477
|
-
var
|
|
6561
|
+
var import_react19 = require("react");
|
|
6478
6562
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
6479
6563
|
var Pagination = ({
|
|
6480
6564
|
overwriteTranslation,
|
|
@@ -6485,11 +6569,11 @@ var Pagination = ({
|
|
|
6485
6569
|
style
|
|
6486
6570
|
}) => {
|
|
6487
6571
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6488
|
-
const [value, setValue] = (0,
|
|
6572
|
+
const [value, setValue] = (0, import_react19.useState)((pageIndex + 1).toString());
|
|
6489
6573
|
const noPages = pageCount === 0;
|
|
6490
6574
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
6491
6575
|
const onLastPage = pageIndex === pageCount - 1;
|
|
6492
|
-
(0,
|
|
6576
|
+
(0, import_react19.useEffect)(() => {
|
|
6493
6577
|
if (noPages) {
|
|
6494
6578
|
setValue("0");
|
|
6495
6579
|
} else {
|
|
@@ -6532,7 +6616,7 @@ var Pagination = ({
|
|
|
6532
6616
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
6533
6617
|
"span",
|
|
6534
6618
|
{
|
|
6535
|
-
className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-
|
|
6619
|
+
className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-input-background text-input-text rounded-md font-bold",
|
|
6536
6620
|
children: pageCount
|
|
6537
6621
|
}
|
|
6538
6622
|
)
|
|
@@ -6547,7 +6631,7 @@ var import_lucide_react7 = require("lucide-react");
|
|
|
6547
6631
|
var import_clsx24 = __toESM(require("clsx"));
|
|
6548
6632
|
|
|
6549
6633
|
// src/hooks/useSearch.ts
|
|
6550
|
-
var
|
|
6634
|
+
var import_react20 = require("react");
|
|
6551
6635
|
|
|
6552
6636
|
// src/util/simpleSearch.ts
|
|
6553
6637
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -6586,34 +6670,34 @@ var useSearch = ({
|
|
|
6586
6670
|
filter,
|
|
6587
6671
|
disabled = false
|
|
6588
6672
|
}) => {
|
|
6589
|
-
const [search, setSearch] = (0,
|
|
6590
|
-
const [result, setResult] = (0,
|
|
6591
|
-
const searchTags = (0,
|
|
6592
|
-
const updateSearch = (0,
|
|
6673
|
+
const [search, setSearch] = (0, import_react20.useState)(initialSearch ?? "");
|
|
6674
|
+
const [result, setResult] = (0, import_react20.useState)(list);
|
|
6675
|
+
const searchTags = (0, import_react20.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
6676
|
+
const updateSearch = (0, import_react20.useCallback)((newSearch) => {
|
|
6593
6677
|
const usedSearch = newSearch ?? search;
|
|
6594
6678
|
if (newSearch) {
|
|
6595
6679
|
setSearch(search);
|
|
6596
6680
|
}
|
|
6597
6681
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
6598
6682
|
}, [searchTags, list, search, searchMapping]);
|
|
6599
|
-
(0,
|
|
6683
|
+
(0, import_react20.useEffect)(() => {
|
|
6600
6684
|
if (isSearchInstant) {
|
|
6601
6685
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
6602
6686
|
}
|
|
6603
6687
|
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
6604
|
-
const filteredResult = (0,
|
|
6688
|
+
const filteredResult = (0, import_react20.useMemo)(() => {
|
|
6605
6689
|
if (!filter) {
|
|
6606
6690
|
return result;
|
|
6607
6691
|
}
|
|
6608
6692
|
return result.filter(filter);
|
|
6609
6693
|
}, [result, filter]);
|
|
6610
|
-
const sortedAndFilteredResult = (0,
|
|
6694
|
+
const sortedAndFilteredResult = (0, import_react20.useMemo)(() => {
|
|
6611
6695
|
if (!sortingFunction) {
|
|
6612
6696
|
return filteredResult;
|
|
6613
6697
|
}
|
|
6614
6698
|
return filteredResult.sort(sortingFunction);
|
|
6615
6699
|
}, [filteredResult, sortingFunction]);
|
|
6616
|
-
const usedResult = (0,
|
|
6700
|
+
const usedResult = (0, import_react20.useMemo)(() => {
|
|
6617
6701
|
if (!disabled) {
|
|
6618
6702
|
return sortedAndFilteredResult;
|
|
6619
6703
|
}
|
|
@@ -6673,7 +6757,7 @@ var SearchableList = ({
|
|
|
6673
6757
|
// src/components/layout-and-navigation/StepperBar.tsx
|
|
6674
6758
|
var import_lucide_react8 = require("lucide-react");
|
|
6675
6759
|
var import_clsx25 = __toESM(require("clsx"));
|
|
6676
|
-
var
|
|
6760
|
+
var import_react21 = require("react");
|
|
6677
6761
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
6678
6762
|
var defaultState = {
|
|
6679
6763
|
currentStep: 0,
|
|
@@ -6767,8 +6851,8 @@ var StepperBar = ({
|
|
|
6767
6851
|
);
|
|
6768
6852
|
};
|
|
6769
6853
|
var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
|
|
6770
|
-
const [usedState, setUsedState] = (0,
|
|
6771
|
-
(0,
|
|
6854
|
+
const [usedState, setUsedState] = (0, import_react21.useState)(state ?? defaultState);
|
|
6855
|
+
(0, import_react21.useEffect)(() => {
|
|
6772
6856
|
setUsedState(state ?? defaultState);
|
|
6773
6857
|
}, [state]);
|
|
6774
6858
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
@@ -6913,7 +6997,7 @@ var ErrorComponent = ({
|
|
|
6913
6997
|
};
|
|
6914
6998
|
|
|
6915
6999
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
6916
|
-
var
|
|
7000
|
+
var import_react22 = require("react");
|
|
6917
7001
|
|
|
6918
7002
|
// src/components/loading-states/LoadingContainer.tsx
|
|
6919
7003
|
var import_clsx28 = require("clsx");
|
|
@@ -6934,8 +7018,8 @@ var LoadingAndErrorComponent = ({
|
|
|
6934
7018
|
minimumLoadingDuration,
|
|
6935
7019
|
className
|
|
6936
7020
|
}) => {
|
|
6937
|
-
const [isInMinimumLoading, setIsInMinimumLoading] = (0,
|
|
6938
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0,
|
|
7021
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react22.useState)(false);
|
|
7022
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react22.useState)(false);
|
|
6939
7023
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
6940
7024
|
setIsInMinimumLoading(true);
|
|
6941
7025
|
setTimeout(() => {
|
|
@@ -7138,18 +7222,18 @@ var InputModal = ({
|
|
|
7138
7222
|
};
|
|
7139
7223
|
|
|
7140
7224
|
// src/components/user-action/Select.tsx
|
|
7141
|
-
var
|
|
7142
|
-
var
|
|
7225
|
+
var import_react25 = require("react");
|
|
7226
|
+
var import_react26 = require("react");
|
|
7143
7227
|
var import_clsx35 = __toESM(require("clsx"));
|
|
7144
7228
|
|
|
7145
7229
|
// src/components/user-action/Menu.tsx
|
|
7146
|
-
var
|
|
7230
|
+
var import_react24 = require("react");
|
|
7147
7231
|
var import_clsx33 = __toESM(require("clsx"));
|
|
7148
7232
|
|
|
7149
7233
|
// src/hooks/useOutsideClick.ts
|
|
7150
|
-
var
|
|
7234
|
+
var import_react23 = require("react");
|
|
7151
7235
|
var useOutsideClick = (refs, handler) => {
|
|
7152
|
-
(0,
|
|
7236
|
+
(0, import_react23.useEffect)(() => {
|
|
7153
7237
|
const listener = (event) => {
|
|
7154
7238
|
if (event.target === null) return;
|
|
7155
7239
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -7243,7 +7327,7 @@ var MenuItem = ({
|
|
|
7243
7327
|
}) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7244
7328
|
"div",
|
|
7245
7329
|
{
|
|
7246
|
-
className: (0, import_clsx33.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold", {
|
|
7330
|
+
className: (0, import_clsx33.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
|
|
7247
7331
|
"text-right": alignment === "right",
|
|
7248
7332
|
"text-left": alignment === "left",
|
|
7249
7333
|
"text-disabled-text cursor-not-allowed": isDisabled,
|
|
@@ -7273,10 +7357,10 @@ var Menu = ({
|
|
|
7273
7357
|
menuClassName = ""
|
|
7274
7358
|
}) => {
|
|
7275
7359
|
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
7276
|
-
const triggerRef = (0,
|
|
7277
|
-
const menuRef = (0,
|
|
7360
|
+
const triggerRef = (0, import_react24.useRef)(null);
|
|
7361
|
+
const menuRef = (0, import_react24.useRef)(null);
|
|
7278
7362
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
7279
|
-
const [isHidden, setIsHidden] = (0,
|
|
7363
|
+
const [isHidden, setIsHidden] = (0, import_react24.useState)(true);
|
|
7280
7364
|
const bag = {
|
|
7281
7365
|
isOpen,
|
|
7282
7366
|
close: () => setIsOpen(false),
|
|
@@ -7287,7 +7371,7 @@ var Menu = ({
|
|
|
7287
7371
|
triggerRef.current?.getBoundingClientRect(),
|
|
7288
7372
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
7289
7373
|
);
|
|
7290
|
-
(0,
|
|
7374
|
+
(0, import_react24.useEffect)(() => {
|
|
7291
7375
|
if (!isOpen) return;
|
|
7292
7376
|
const triggerEl = triggerRef.current;
|
|
7293
7377
|
if (!triggerEl) return;
|
|
@@ -7304,7 +7388,7 @@ var Menu = ({
|
|
|
7304
7388
|
window.removeEventListener("resize", close);
|
|
7305
7389
|
};
|
|
7306
7390
|
}, [isOpen, setIsOpen]);
|
|
7307
|
-
(0,
|
|
7391
|
+
(0, import_react24.useEffect)(() => {
|
|
7308
7392
|
if (isOpen) {
|
|
7309
7393
|
setIsHidden(false);
|
|
7310
7394
|
}
|
|
@@ -7317,7 +7401,7 @@ var Menu = ({
|
|
|
7317
7401
|
ref: menuRef,
|
|
7318
7402
|
onClick: (e) => e.stopPropagation(),
|
|
7319
7403
|
className: (0, import_clsx33.default)(
|
|
7320
|
-
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-[300]",
|
|
7404
|
+
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
|
|
7321
7405
|
{
|
|
7322
7406
|
"animate-pop-in": isOpen,
|
|
7323
7407
|
"animate-pop-out": !isOpen,
|
|
@@ -7402,7 +7486,7 @@ var Select = ({
|
|
|
7402
7486
|
const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
|
|
7403
7487
|
const { result, search, setSearch } = useSearch({
|
|
7404
7488
|
list: options,
|
|
7405
|
-
searchMapping: (0,
|
|
7489
|
+
searchMapping: (0, import_react25.useCallback)((item) => item.searchTags, []),
|
|
7406
7490
|
...searchOptions
|
|
7407
7491
|
});
|
|
7408
7492
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: (0, import_clsx35.default)(className), children: [
|
|
@@ -7419,7 +7503,7 @@ var Select = ({
|
|
|
7419
7503
|
"btn-md justify-between w-full border-2",
|
|
7420
7504
|
{
|
|
7421
7505
|
"rounded-b-lg": !open,
|
|
7422
|
-
"bg-
|
|
7506
|
+
"bg-input-background text-input-text hover:border-primary": !disabled,
|
|
7423
7507
|
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
|
|
7424
7508
|
},
|
|
7425
7509
|
triggerClassName
|
|
@@ -7474,8 +7558,8 @@ var SelectUncontrolled = ({
|
|
|
7474
7558
|
hintText,
|
|
7475
7559
|
...props
|
|
7476
7560
|
}) => {
|
|
7477
|
-
const [selected, setSelected] = (0,
|
|
7478
|
-
(0,
|
|
7561
|
+
const [selected, setSelected] = (0, import_react26.useState)(value);
|
|
7562
|
+
(0, import_react26.useEffect)(() => {
|
|
7479
7563
|
if (options.find((options2) => options2.value === value)) {
|
|
7480
7564
|
setSelected(value);
|
|
7481
7565
|
}
|
|
@@ -7547,13 +7631,15 @@ var LanguageModal = ({
|
|
|
7547
7631
|
};
|
|
7548
7632
|
|
|
7549
7633
|
// src/theming/useTheme.tsx
|
|
7550
|
-
var
|
|
7634
|
+
var import_react27 = require("react");
|
|
7635
|
+
var import_react28 = require("react");
|
|
7551
7636
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
7552
|
-
var themes = ["light", "dark"];
|
|
7637
|
+
var themes = ["light", "dark", "system"];
|
|
7553
7638
|
var defaultThemeTypeTranslation = {
|
|
7554
7639
|
en: {
|
|
7555
7640
|
dark: "Dark",
|
|
7556
7641
|
light: "Light",
|
|
7642
|
+
system: "System",
|
|
7557
7643
|
theme: {
|
|
7558
7644
|
one: "Theme",
|
|
7559
7645
|
other: "Themes"
|
|
@@ -7562,6 +7648,7 @@ var defaultThemeTypeTranslation = {
|
|
|
7562
7648
|
de: {
|
|
7563
7649
|
dark: "Dunkel",
|
|
7564
7650
|
light: "Hell",
|
|
7651
|
+
system: "System",
|
|
7565
7652
|
theme: {
|
|
7566
7653
|
one: "Farbschema",
|
|
7567
7654
|
other: "Farbschemas"
|
|
@@ -7572,34 +7659,30 @@ var ThemeUtil = {
|
|
|
7572
7659
|
themes,
|
|
7573
7660
|
translation: defaultThemeTypeTranslation
|
|
7574
7661
|
};
|
|
7575
|
-
var ThemeContext = (0,
|
|
7662
|
+
var ThemeContext = (0, import_react28.createContext)({
|
|
7576
7663
|
theme: "light",
|
|
7577
7664
|
setTheme: noop
|
|
7578
7665
|
});
|
|
7579
|
-
var ThemeProvider = ({ children, initialTheme = "
|
|
7580
|
-
const [theme, setTheme] = (0, import_react25.useState)(initialTheme);
|
|
7666
|
+
var ThemeProvider = ({ children, initialTheme = "system" }) => {
|
|
7581
7667
|
const [storedTheme, setStoredTheme] = useLocalStorage("theme", initialTheme);
|
|
7582
|
-
(0,
|
|
7583
|
-
|
|
7668
|
+
const [userTheme, setUserTheme] = (0, import_react28.useState)();
|
|
7669
|
+
(0, import_react28.useEffect)(() => {
|
|
7670
|
+
if (storedTheme !== initialTheme) {
|
|
7584
7671
|
console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
|
|
7585
|
-
|
|
7672
|
+
setStoredTheme(initialTheme);
|
|
7586
7673
|
}
|
|
7587
7674
|
}, [initialTheme]);
|
|
7588
|
-
(0,
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
}, [
|
|
7592
|
-
(0,
|
|
7593
|
-
if (storedTheme !== null) {
|
|
7594
|
-
setTheme(storedTheme);
|
|
7595
|
-
return;
|
|
7596
|
-
}
|
|
7675
|
+
const usedTheme = (0, import_react27.useMemo)(() => storedTheme !== "system" ? storedTheme : userTheme, [storedTheme, userTheme]);
|
|
7676
|
+
(0, import_react28.useEffect)(() => {
|
|
7677
|
+
document.documentElement.setAttribute("data-theme", usedTheme);
|
|
7678
|
+
}, [usedTheme]);
|
|
7679
|
+
(0, import_react28.useEffect)(() => {
|
|
7597
7680
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
7598
|
-
|
|
7681
|
+
setUserTheme(prefersDark ? "dark" : "light");
|
|
7599
7682
|
}, []);
|
|
7600
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThemeContext.Provider, { value: { theme, setTheme }, children });
|
|
7683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ThemeContext.Provider, { value: { theme: storedTheme, setTheme: setStoredTheme }, children });
|
|
7601
7684
|
};
|
|
7602
|
-
var useTheme = () => (0,
|
|
7685
|
+
var useTheme = () => (0, import_react28.useContext)(ThemeContext);
|
|
7603
7686
|
|
|
7604
7687
|
// src/components/modals/ThemeModal.tsx
|
|
7605
7688
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
@@ -7650,7 +7733,7 @@ var ThemeModal = ({
|
|
|
7650
7733
|
var import_lucide_react13 = require("lucide-react");
|
|
7651
7734
|
|
|
7652
7735
|
// src/components/user-action/Checkbox.tsx
|
|
7653
|
-
var
|
|
7736
|
+
var import_react29 = require("react");
|
|
7654
7737
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
7655
7738
|
var import_lucide_react11 = require("lucide-react");
|
|
7656
7739
|
var import_clsx36 = __toESM(require("clsx"));
|
|
@@ -7701,7 +7784,7 @@ var Checkbox = ({
|
|
|
7701
7784
|
className: (0, import_clsx36.default)(usedSizeClass, `items-center border-2 rounded outline-none `, {
|
|
7702
7785
|
"text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
|
|
7703
7786
|
"focus:border-primary group-hover:border-primary ": !disabled,
|
|
7704
|
-
"bg-
|
|
7787
|
+
"bg-input-background": !disabled && !checked,
|
|
7705
7788
|
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
7706
7789
|
}, className),
|
|
7707
7790
|
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(CheckboxPrimitive.Indicator, { children: [
|
|
@@ -7719,7 +7802,7 @@ var CheckboxUncontrolled = ({
|
|
|
7719
7802
|
defaultValue = false,
|
|
7720
7803
|
...props
|
|
7721
7804
|
}) => {
|
|
7722
|
-
const [checked, setChecked] = (0,
|
|
7805
|
+
const [checked, setChecked] = (0, import_react29.useState)(defaultValue);
|
|
7723
7806
|
const handleChange = (checked2) => {
|
|
7724
7807
|
if (onChangeTristate) {
|
|
7725
7808
|
onChangeTristate(checked2);
|
|
@@ -7780,7 +7863,7 @@ var PropertyBase = ({
|
|
|
7780
7863
|
className: (0, import_clsx37.default)(
|
|
7781
7864
|
"flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
|
|
7782
7865
|
{
|
|
7783
|
-
"bg-
|
|
7866
|
+
"bg-input-background text-input-text group-hover:border-primary": !requiredAndNoValue,
|
|
7784
7867
|
"bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
|
|
7785
7868
|
},
|
|
7786
7869
|
className
|
|
@@ -7883,8 +7966,8 @@ var import_lucide_react16 = require("lucide-react");
|
|
|
7883
7966
|
var import_clsx40 = __toESM(require("clsx"));
|
|
7884
7967
|
|
|
7885
7968
|
// src/components/user-action/MultiSelect.tsx
|
|
7886
|
-
var
|
|
7887
|
-
var
|
|
7969
|
+
var import_react30 = require("react");
|
|
7970
|
+
var import_react31 = require("react");
|
|
7888
7971
|
var import_clsx39 = __toESM(require("clsx"));
|
|
7889
7972
|
var import_lucide_react15 = require("lucide-react");
|
|
7890
7973
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
@@ -7914,7 +7997,7 @@ var MultiSelect = ({
|
|
|
7914
7997
|
const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
|
|
7915
7998
|
const { result, search, setSearch } = useSearch({
|
|
7916
7999
|
list: options,
|
|
7917
|
-
searchMapping: (0,
|
|
8000
|
+
searchMapping: (0, import_react30.useCallback)((item) => item.searchTags, []),
|
|
7918
8001
|
...searchOptions
|
|
7919
8002
|
});
|
|
7920
8003
|
const selectedItems = options.filter((value) => value.selected);
|
|
@@ -7938,17 +8021,17 @@ var MultiSelect = ({
|
|
|
7938
8021
|
{
|
|
7939
8022
|
ref,
|
|
7940
8023
|
className: (0, import_clsx39.default)(
|
|
7941
|
-
"btn-md justify-between w-full border-2 h-auto",
|
|
8024
|
+
"group btn-md justify-between w-full border-2 h-auto",
|
|
7942
8025
|
{
|
|
7943
8026
|
"min-h-14": useChipDisplay,
|
|
7944
|
-
"bg-
|
|
8027
|
+
"bg-input-background text-input-text hover:border-primary": !disabled,
|
|
7945
8028
|
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
|
|
7946
8029
|
},
|
|
7947
8030
|
triggerClassName
|
|
7948
8031
|
),
|
|
7949
8032
|
onClick: toggleOpen,
|
|
7950
8033
|
disabled,
|
|
7951
|
-
children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
8034
|
+
children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "icon-btn-sm bg-button-solid-neutral-background text-button-solid-neutral-text hover:brightness-90 group-hover:brightness-90", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react15.Plus, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
7952
8035
|
!isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
|
|
7953
8036
|
isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: (0, import_clsx39.default)("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
|
|
7954
8037
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ExpansionIcon, { isExpanded: isOpen })
|
|
@@ -8041,8 +8124,8 @@ var MultiSelectUncontrolled = ({
|
|
|
8041
8124
|
onChange,
|
|
8042
8125
|
...props
|
|
8043
8126
|
}) => {
|
|
8044
|
-
const [usedOptions, setUsedOptions] = (0,
|
|
8045
|
-
(0,
|
|
8127
|
+
const [usedOptions, setUsedOptions] = (0, import_react31.useState)(options);
|
|
8128
|
+
(0, import_react31.useEffect)(() => {
|
|
8046
8129
|
setUsedOptions(options);
|
|
8047
8130
|
}, [options]);
|
|
8048
8131
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
@@ -8270,7 +8353,7 @@ var import_lucide_react19 = require("lucide-react");
|
|
|
8270
8353
|
var import_clsx44 = __toESM(require("clsx"));
|
|
8271
8354
|
|
|
8272
8355
|
// src/components/user-action/Textarea.tsx
|
|
8273
|
-
var
|
|
8356
|
+
var import_react32 = require("react");
|
|
8274
8357
|
var import_clsx43 = __toESM(require("clsx"));
|
|
8275
8358
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
8276
8359
|
var Textarea = ({
|
|
@@ -8289,7 +8372,7 @@ var Textarea = ({
|
|
|
8289
8372
|
className,
|
|
8290
8373
|
...props
|
|
8291
8374
|
}) => {
|
|
8292
|
-
const [hasFocus, setHasFocus] = (0,
|
|
8375
|
+
const [hasFocus, setHasFocus] = (0, import_react32.useState)(false);
|
|
8293
8376
|
const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
|
|
8294
8377
|
const onEditCompletedWrapper = (text) => {
|
|
8295
8378
|
onEditCompleted(text);
|
|
@@ -8309,11 +8392,11 @@ var Textarea = ({
|
|
|
8309
8392
|
"div",
|
|
8310
8393
|
{
|
|
8311
8394
|
className: (0, import_clsx43.default)(
|
|
8312
|
-
"bg-
|
|
8395
|
+
"bg-input-background text-input-text relative",
|
|
8313
8396
|
{
|
|
8314
|
-
"
|
|
8397
|
+
"border-2 rounded-lg": defaultStyle,
|
|
8315
8398
|
"hover:border-primary focus-within:border-primary": defaultStyle && !disabled,
|
|
8316
|
-
"border-disabled-border cursor-not-allowed": defaultStyle &&
|
|
8399
|
+
"border-disabled-border cursor-not-allowed": defaultStyle && disabled
|
|
8317
8400
|
}
|
|
8318
8401
|
),
|
|
8319
8402
|
children: [
|
|
@@ -8359,8 +8442,8 @@ var TextareaUncontrolled = ({
|
|
|
8359
8442
|
onChangeText = noop,
|
|
8360
8443
|
...props
|
|
8361
8444
|
}) => {
|
|
8362
|
-
const [text, setText] = (0,
|
|
8363
|
-
(0,
|
|
8445
|
+
const [text, setText] = (0, import_react32.useState)(value);
|
|
8446
|
+
(0, import_react32.useEffect)(() => {
|
|
8364
8447
|
setText(value);
|
|
8365
8448
|
}, [value]);
|
|
8366
8449
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
@@ -8457,14 +8540,14 @@ var TableFilters = {
|
|
|
8457
8540
|
};
|
|
8458
8541
|
|
|
8459
8542
|
// src/components/table/Table.tsx
|
|
8460
|
-
var
|
|
8543
|
+
var import_react35 = require("react");
|
|
8461
8544
|
var import_clsx48 = __toESM(require("clsx"));
|
|
8462
8545
|
var import_react_table = require("@tanstack/react-table");
|
|
8463
8546
|
var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
|
|
8464
8547
|
|
|
8465
8548
|
// src/components/table/TableFilterButton.tsx
|
|
8466
8549
|
var import_lucide_react20 = require("lucide-react");
|
|
8467
|
-
var
|
|
8550
|
+
var import_react33 = require("react");
|
|
8468
8551
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
8469
8552
|
var defaultTableFilterTranslation = {
|
|
8470
8553
|
en: {
|
|
@@ -8490,9 +8573,9 @@ var TableFilterButton = ({
|
|
|
8490
8573
|
}) => {
|
|
8491
8574
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
8492
8575
|
const columnFilterValue = column.getFilterValue();
|
|
8493
|
-
const [filterValue, setFilterValue] = (0,
|
|
8576
|
+
const [filterValue, setFilterValue] = (0, import_react33.useState)(columnFilterValue);
|
|
8494
8577
|
const hasFilter = !!filterValue;
|
|
8495
|
-
(0,
|
|
8578
|
+
(0, import_react33.useEffect)(() => {
|
|
8496
8579
|
setFilterValue(columnFilterValue);
|
|
8497
8580
|
}, [columnFilterValue]);
|
|
8498
8581
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
@@ -8624,9 +8707,9 @@ var TableSortButton = ({
|
|
|
8624
8707
|
};
|
|
8625
8708
|
|
|
8626
8709
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
8627
|
-
var
|
|
8710
|
+
var import_react34 = require("react");
|
|
8628
8711
|
var useResizeCallbackWrapper = (callback) => {
|
|
8629
|
-
(0,
|
|
8712
|
+
(0, import_react34.useEffect)(() => {
|
|
8630
8713
|
window.addEventListener("resize", callback);
|
|
8631
8714
|
return () => {
|
|
8632
8715
|
window.removeEventListener("resize", callback);
|
|
@@ -8658,22 +8741,22 @@ var Table = ({
|
|
|
8658
8741
|
columns,
|
|
8659
8742
|
...tableOptions
|
|
8660
8743
|
}) => {
|
|
8661
|
-
const ref = (0,
|
|
8662
|
-
const tableRef = (0,
|
|
8663
|
-
const [columnSizing, setColumnSizing] = (0,
|
|
8744
|
+
const ref = (0, import_react35.useRef)(null);
|
|
8745
|
+
const tableRef = (0, import_react35.useRef)(null);
|
|
8746
|
+
const [columnSizing, setColumnSizing] = (0, import_react35.useState)(columns.reduce((previousValue, currentValue) => {
|
|
8664
8747
|
return {
|
|
8665
8748
|
...previousValue,
|
|
8666
8749
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
8667
8750
|
};
|
|
8668
8751
|
}, {}));
|
|
8669
|
-
const [columnSizingInfo, setColumnSizingInfo] = (0,
|
|
8670
|
-
const [pagination, setPagination] = (0,
|
|
8752
|
+
const [columnSizingInfo, setColumnSizingInfo] = (0, import_react35.useState)();
|
|
8753
|
+
const [pagination, setPagination] = (0, import_react35.useState)({
|
|
8671
8754
|
pageSize: 10,
|
|
8672
8755
|
pageIndex: 0,
|
|
8673
8756
|
...initialState?.pagination
|
|
8674
8757
|
});
|
|
8675
|
-
const [columnFilters, setColumnFilters] = (0,
|
|
8676
|
-
const computedColumnMinWidths = (0,
|
|
8758
|
+
const [columnFilters, setColumnFilters] = (0, import_react35.useState)(initialState?.columnFilters);
|
|
8759
|
+
const computedColumnMinWidths = (0, import_react35.useMemo)(() => {
|
|
8677
8760
|
return columns.reduce((previousValue, column) => {
|
|
8678
8761
|
return {
|
|
8679
8762
|
...previousValue,
|
|
@@ -8682,7 +8765,7 @@ var Table = ({
|
|
|
8682
8765
|
};
|
|
8683
8766
|
}, {});
|
|
8684
8767
|
}, [columns, defaultColumn]);
|
|
8685
|
-
const computedColumnMaxWidths = (0,
|
|
8768
|
+
const computedColumnMaxWidths = (0, import_react35.useMemo)(() => {
|
|
8686
8769
|
return columns.reduce((previousValue, column) => {
|
|
8687
8770
|
return {
|
|
8688
8771
|
...previousValue,
|
|
@@ -8690,12 +8773,12 @@ var Table = ({
|
|
|
8690
8773
|
};
|
|
8691
8774
|
}, {});
|
|
8692
8775
|
}, [columns, defaultColumn]);
|
|
8693
|
-
const tableMinWidth = (0,
|
|
8776
|
+
const tableMinWidth = (0, import_react35.useMemo)(() => {
|
|
8694
8777
|
return columns.reduce((sum, column) => {
|
|
8695
8778
|
return sum + computedColumnMinWidths[column.id];
|
|
8696
8779
|
}, 0);
|
|
8697
8780
|
}, [columns, computedColumnMinWidths]);
|
|
8698
|
-
const updateColumnSizes = (0,
|
|
8781
|
+
const updateColumnSizes = (0, import_react35.useMemo)(() => {
|
|
8699
8782
|
return (previous) => {
|
|
8700
8783
|
const updateSizing = {
|
|
8701
8784
|
...columnSizing,
|
|
@@ -8812,18 +8895,18 @@ var Table = ({
|
|
|
8812
8895
|
columnResizeMode: "onChange",
|
|
8813
8896
|
...tableOptions
|
|
8814
8897
|
});
|
|
8815
|
-
const [hasInitializedSizing, setHasInitializedSizing] = (0,
|
|
8816
|
-
(0,
|
|
8898
|
+
const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react35.useState)(false);
|
|
8899
|
+
(0, import_react35.useEffect)(() => {
|
|
8817
8900
|
if (!hasInitializedSizing && ref.current) {
|
|
8818
8901
|
setHasInitializedSizing(true);
|
|
8819
8902
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
8820
8903
|
}
|
|
8821
8904
|
}, [columnSizing, hasInitializedSizing]);
|
|
8822
|
-
useResizeCallbackWrapper((0,
|
|
8905
|
+
useResizeCallbackWrapper((0, import_react35.useCallback)(() => {
|
|
8823
8906
|
table.setColumnSizing(updateColumnSizes);
|
|
8824
8907
|
}, [updateColumnSizes]));
|
|
8825
8908
|
const pageCount = table.getPageCount();
|
|
8826
|
-
(0,
|
|
8909
|
+
(0, import_react35.useEffect)(() => {
|
|
8827
8910
|
const totalPages = pageCount;
|
|
8828
8911
|
if (totalPages === 0) {
|
|
8829
8912
|
if (pagination.pageIndex !== 0) {
|
|
@@ -8839,7 +8922,7 @@ var Table = ({
|
|
|
8839
8922
|
}));
|
|
8840
8923
|
}
|
|
8841
8924
|
}, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
|
|
8842
|
-
const columnSizeVars = (0,
|
|
8925
|
+
const columnSizeVars = (0, import_react35.useMemo)(() => {
|
|
8843
8926
|
const headers = table.getFlatHeaders();
|
|
8844
8927
|
const colSizes = {};
|
|
8845
8928
|
for (let i = 0; i < headers.length; i++) {
|
|
@@ -8854,7 +8937,7 @@ var Table = ({
|
|
|
8854
8937
|
import_react_custom_scrollbars_23.Scrollbars,
|
|
8855
8938
|
{
|
|
8856
8939
|
autoHeight: true,
|
|
8857
|
-
autoHeightMax: tableRef.current?.offsetHeight + 2,
|
|
8940
|
+
autoHeightMax: tableRef.current?.offsetHeight ? tableRef.current?.offsetHeight + 2 : void 0,
|
|
8858
8941
|
autoHide: true,
|
|
8859
8942
|
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8860
8943
|
"table",
|
|
@@ -8954,8 +9037,8 @@ var Table = ({
|
|
|
8954
9037
|
] });
|
|
8955
9038
|
};
|
|
8956
9039
|
var TableUncontrolled = ({ data, ...props }) => {
|
|
8957
|
-
const [usedDate, setUsedData] = (0,
|
|
8958
|
-
(0,
|
|
9040
|
+
const [usedDate, setUsedData] = (0, import_react35.useState)(data);
|
|
9041
|
+
(0, import_react35.useEffect)(() => {
|
|
8959
9042
|
setUsedData(data);
|
|
8960
9043
|
}, [data]);
|
|
8961
9044
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
@@ -8977,7 +9060,7 @@ var TableWithSelection = ({
|
|
|
8977
9060
|
meta,
|
|
8978
9061
|
...props
|
|
8979
9062
|
}) => {
|
|
8980
|
-
const columnsWithSelection = (0,
|
|
9063
|
+
const columnsWithSelection = (0, import_react35.useMemo)(() => {
|
|
8981
9064
|
return [
|
|
8982
9065
|
{
|
|
8983
9066
|
id: selectionRowId,
|
|
@@ -9047,7 +9130,7 @@ var TableWithSelection = ({
|
|
|
9047
9130
|
};
|
|
9048
9131
|
|
|
9049
9132
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
9050
|
-
var
|
|
9133
|
+
var import_react36 = require("react");
|
|
9051
9134
|
var import_clsx49 = require("clsx");
|
|
9052
9135
|
|
|
9053
9136
|
// src/util/writeToClipboard.ts
|
|
@@ -9067,8 +9150,8 @@ var CopyToClipboardWrapper = ({
|
|
|
9067
9150
|
zIndex = 10
|
|
9068
9151
|
}) => {
|
|
9069
9152
|
const translation = useTranslation([formTranslation]);
|
|
9070
|
-
const [isShowingIndication, setIsShowingIndication] = (0,
|
|
9071
|
-
const [isShowingConfirmation, setIsShowingConfirmation] = (0,
|
|
9153
|
+
const [isShowingIndication, setIsShowingIndication] = (0, import_react36.useState)(false);
|
|
9154
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react36.useState)(false);
|
|
9072
9155
|
const positionClasses = {
|
|
9073
9156
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
9074
9157
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -9210,7 +9293,7 @@ var DateTimePicker = ({
|
|
|
9210
9293
|
};
|
|
9211
9294
|
|
|
9212
9295
|
// src/components/user-action/ScrollPicker.tsx
|
|
9213
|
-
var
|
|
9296
|
+
var import_react37 = require("react");
|
|
9214
9297
|
var import_clsx51 = __toESM(require("clsx"));
|
|
9215
9298
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
9216
9299
|
var up = 1;
|
|
@@ -9231,7 +9314,7 @@ var ScrollPicker = ({
|
|
|
9231
9314
|
transition,
|
|
9232
9315
|
items,
|
|
9233
9316
|
lastTimeStamp
|
|
9234
|
-
}, setAnimation] = (0,
|
|
9317
|
+
}, setAnimation] = (0, import_react37.useState)({
|
|
9235
9318
|
targetIndex: selectedIndex,
|
|
9236
9319
|
currentIndex: disabled ? selectedIndex : 0,
|
|
9237
9320
|
velocity: 0,
|
|
@@ -9247,7 +9330,7 @@ var ScrollPicker = ({
|
|
|
9247
9330
|
const itemHeight = 40;
|
|
9248
9331
|
const distance = 8;
|
|
9249
9332
|
const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
|
|
9250
|
-
const getDirection = (0,
|
|
9333
|
+
const getDirection = (0, import_react37.useCallback)((targetIndex, currentIndex2, transition2, length) => {
|
|
9251
9334
|
if (targetIndex === currentIndex2) {
|
|
9252
9335
|
return transition2 > 0 ? up : down;
|
|
9253
9336
|
}
|
|
@@ -9257,7 +9340,7 @@ var ScrollPicker = ({
|
|
|
9257
9340
|
}
|
|
9258
9341
|
return distanceForward >= length / 2 ? down : up;
|
|
9259
9342
|
}, []);
|
|
9260
|
-
const animate = (0,
|
|
9343
|
+
const animate = (0, import_react37.useCallback)((timestamp, startTime) => {
|
|
9261
9344
|
setAnimation((prevState) => {
|
|
9262
9345
|
const {
|
|
9263
9346
|
targetIndex,
|
|
@@ -9330,7 +9413,7 @@ var ScrollPicker = ({
|
|
|
9330
9413
|
};
|
|
9331
9414
|
});
|
|
9332
9415
|
}, [disabled, getDirection, onChange]);
|
|
9333
|
-
(0,
|
|
9416
|
+
(0, import_react37.useEffect)(() => {
|
|
9334
9417
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
9335
9418
|
});
|
|
9336
9419
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -9407,7 +9490,7 @@ var ScrollPicker = ({
|
|
|
9407
9490
|
};
|
|
9408
9491
|
|
|
9409
9492
|
// src/components/user-action/ToggleableInput.tsx
|
|
9410
|
-
var
|
|
9493
|
+
var import_react38 = require("react");
|
|
9411
9494
|
var import_lucide_react23 = require("lucide-react");
|
|
9412
9495
|
var import_clsx52 = __toESM(require("clsx"));
|
|
9413
9496
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
@@ -9425,14 +9508,14 @@ var ToggleableInput = ({
|
|
|
9425
9508
|
saveDelayOptions,
|
|
9426
9509
|
...restProps
|
|
9427
9510
|
}) => {
|
|
9428
|
-
const [isEditing, setIsEditing] = (0,
|
|
9511
|
+
const [isEditing, setIsEditing] = (0, import_react38.useState)(initialState !== "display");
|
|
9429
9512
|
const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
|
|
9430
|
-
const ref = (0,
|
|
9513
|
+
const ref = (0, import_react38.useRef)(null);
|
|
9431
9514
|
const onEditCompletedWrapper = (text) => {
|
|
9432
9515
|
onEditCompleted(text);
|
|
9433
9516
|
clearTimer();
|
|
9434
9517
|
};
|
|
9435
|
-
(0,
|
|
9518
|
+
(0, import_react38.useEffect)(() => {
|
|
9436
9519
|
if (isEditing) {
|
|
9437
9520
|
ref.current?.focus();
|
|
9438
9521
|
}
|
|
@@ -9497,8 +9580,8 @@ var ToggleableInputUncontrolled = ({
|
|
|
9497
9580
|
onChangeText = noop,
|
|
9498
9581
|
...restProps
|
|
9499
9582
|
}) => {
|
|
9500
|
-
const [value, setValue] = (0,
|
|
9501
|
-
(0,
|
|
9583
|
+
const [value, setValue] = (0, import_react38.useState)(initialValue);
|
|
9584
|
+
(0, import_react38.useEffect)(() => {
|
|
9502
9585
|
setValue(initialValue);
|
|
9503
9586
|
}, [initialValue]);
|
|
9504
9587
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
@@ -9515,9 +9598,9 @@ var ToggleableInputUncontrolled = ({
|
|
|
9515
9598
|
};
|
|
9516
9599
|
|
|
9517
9600
|
// src/hooks/useRerender.ts
|
|
9518
|
-
var
|
|
9601
|
+
var import_react39 = require("react");
|
|
9519
9602
|
var useRerender = () => {
|
|
9520
|
-
return (0,
|
|
9603
|
+
return (0, import_react39.useReducer)(() => ({}), {})[1];
|
|
9521
9604
|
};
|
|
9522
9605
|
|
|
9523
9606
|
// src/util/builder.ts
|
|
@@ -9558,11 +9641,6 @@ var localizedNewsSchema = import_zod.z.record(import_zod.z.enum(LanguageUtil.lan
|
|
|
9558
9641
|
var filterNews = (localizedNews, requiredKeys) => {
|
|
9559
9642
|
return localizedNews.filter((news) => requiredKeys.every((value) => news.keys.includes(value)));
|
|
9560
9643
|
};
|
|
9561
|
-
|
|
9562
|
-
// src/util/resolveSetState.ts
|
|
9563
|
-
function resolveSetState(action, prev) {
|
|
9564
|
-
return typeof action === "function" ? action(prev) : action;
|
|
9565
|
-
}
|
|
9566
9644
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9567
9645
|
0 && (module.exports = {
|
|
9568
9646
|
ASTNodeInterpreter,
|
|
@@ -9570,6 +9648,7 @@ function resolveSetState(action, prev) {
|
|
|
9570
9648
|
ArrayUtil,
|
|
9571
9649
|
Avatar,
|
|
9572
9650
|
AvatarGroup,
|
|
9651
|
+
AvatarUtil,
|
|
9573
9652
|
BagFunctionUtil,
|
|
9574
9653
|
BreadCrumb,
|
|
9575
9654
|
ButtonColorUtil,
|
|
@@ -9580,6 +9659,7 @@ function resolveSetState(action, prev) {
|
|
|
9580
9659
|
CheckboxUncontrolled,
|
|
9581
9660
|
Chip,
|
|
9582
9661
|
ChipList,
|
|
9662
|
+
ChipUtil,
|
|
9583
9663
|
Circle,
|
|
9584
9664
|
ConfirmDialog,
|
|
9585
9665
|
ConfirmModal,
|
|
@@ -9680,8 +9760,6 @@ function resolveSetState(action, prev) {
|
|
|
9680
9760
|
YearMonthPicker,
|
|
9681
9761
|
YearMonthPickerUncontrolled,
|
|
9682
9762
|
addDuration,
|
|
9683
|
-
avatarSizeMapping,
|
|
9684
|
-
avtarSizeList,
|
|
9685
9763
|
builder,
|
|
9686
9764
|
changeDuration,
|
|
9687
9765
|
clamp,
|
|
@@ -9718,6 +9796,7 @@ function resolveSetState(action, prev) {
|
|
|
9718
9796
|
useLanguage,
|
|
9719
9797
|
useLocalStorage,
|
|
9720
9798
|
useLocale,
|
|
9799
|
+
useLogOnce,
|
|
9721
9800
|
useOutsideClick,
|
|
9722
9801
|
usePopoverPosition,
|
|
9723
9802
|
useRerender,
|