@helpwave/hightide 0.1.37 → 0.1.39
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 +15 -9
- package/dist/components/dialog/ConfirmDialog.js.map +1 -1
- package/dist/components/dialog/ConfirmDialog.mjs +16 -10
- package/dist/components/dialog/ConfirmDialog.mjs.map +1 -1
- package/dist/components/dialog/Dialog.d.mts +4 -5
- package/dist/components/dialog/Dialog.d.ts +4 -5
- package/dist/components/dialog/Dialog.js +15 -9
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/dialog/Dialog.mjs +16 -10
- package/dist/components/dialog/Dialog.mjs.map +1 -1
- package/dist/components/dialog/DiscardChangesDialog.js +15 -9
- package/dist/components/dialog/DiscardChangesDialog.js.map +1 -1
- package/dist/components/dialog/DiscardChangesDialog.mjs +16 -10
- package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -1
- package/dist/components/dialog/InputDialog.js +15 -9
- package/dist/components/dialog/InputDialog.js.map +1 -1
- package/dist/components/dialog/InputDialog.mjs +16 -10
- package/dist/components/dialog/InputDialog.mjs.map +1 -1
- package/dist/components/dialog/LanguageDialog.js +188 -154
- package/dist/components/dialog/LanguageDialog.js.map +1 -1
- package/dist/components/dialog/LanguageDialog.mjs +151 -116
- package/dist/components/dialog/LanguageDialog.mjs.map +1 -1
- package/dist/components/dialog/ThemeDialog.js +191 -157
- package/dist/components/dialog/ThemeDialog.js.map +1 -1
- package/dist/components/dialog/ThemeDialog.mjs +151 -116
- package/dist/components/dialog/ThemeDialog.mjs.map +1 -1
- package/dist/components/dialog/index.js +205 -171
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/dialog/index.mjs +152 -117
- package/dist/components/dialog/index.mjs.map +1 -1
- package/dist/components/index.js +337 -299
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +198 -159
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/layout/Carousel.d.mts +2 -1
- package/dist/components/layout/Carousel.d.ts +2 -1
- package/dist/components/layout/Carousel.js +4 -0
- package/dist/components/layout/Carousel.js.map +1 -1
- package/dist/components/layout/Carousel.mjs +4 -0
- 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 +4 -0
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/index.mjs +4 -0
- package/dist/components/layout/index.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/index.js.map +1 -1
- package/dist/components/loading-states/index.mjs.map +1 -1
- package/dist/components/navigation/Pagination.js.map +1 -1
- package/dist/components/navigation/Pagination.mjs.map +1 -1
- package/dist/components/navigation/StepperBar.js.map +1 -1
- package/dist/components/navigation/StepperBar.mjs.map +1 -1
- package/dist/components/navigation/index.js.map +1 -1
- package/dist/components/navigation/index.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +129 -101
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +131 -102
- 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 +129 -101
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +131 -102
- 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 +129 -101
- package/dist/components/properties/index.js.map +1 -1
- package/dist/components/properties/index.mjs +131 -102
- 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 +129 -101
- package/dist/components/user-action/index.js.map +1 -1
- package/dist/components/user-action/index.mjs +131 -102
- package/dist/components/user-action/index.mjs.map +1 -1
- package/dist/components/user-action/select/Select.d.mts +2 -0
- package/dist/components/user-action/select/Select.d.ts +2 -0
- package/dist/components/user-action/select/Select.js +129 -101
- package/dist/components/user-action/select/Select.js.map +1 -1
- package/dist/components/user-action/select/Select.mjs +131 -102
- package/dist/components/user-action/select/Select.mjs.map +1 -1
- package/dist/components/user-action/select/index.js +129 -101
- package/dist/components/user-action/select/index.js.map +1 -1
- package/dist/components/user-action/select/index.mjs +131 -102
- package/dist/components/user-action/select/index.mjs.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/hooks/useValidators.js.map +1 -1
- package/dist/hooks/useValidators.mjs.map +1 -1
- package/dist/index.js +362 -324
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +206 -167
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +1 -1
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +1 -1
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/index.js +1 -1
- package/dist/localization/index.js.map +1 -1
- package/dist/localization/index.mjs +1 -1
- 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 +0 -3
- package/dist/theming/index.js +1 -1
- package/dist/theming/index.js.map +1 -1
- package/dist/theming/index.mjs +1 -1
- package/dist/theming/index.mjs.map +1 -1
- package/dist/theming/useTheme.js +1 -1
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +1 -1
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7004,7 +7004,7 @@ var LanguageProvider = ({ children, language }) => {
|
|
|
7004
7004
|
return /* @__PURE__ */ jsx3(LanguageContext.Provider, { value: {
|
|
7005
7005
|
language: resolvedLanguage,
|
|
7006
7006
|
setLanguage: (newLanguage) => {
|
|
7007
|
-
if (language) {
|
|
7007
|
+
if (language !== "system") {
|
|
7008
7008
|
console.warn("LanguageProvider: Attempting to change the language while setting a fixed language won't have any effect. Change the language provided to the LanguageProvider instead.");
|
|
7009
7009
|
}
|
|
7010
7010
|
setStoredLanguage(newLanguage);
|
|
@@ -7926,9 +7926,8 @@ var TimePickerUncontrolled = ({
|
|
|
7926
7926
|
import clsx10 from "clsx";
|
|
7927
7927
|
|
|
7928
7928
|
// src/components/dialog/Dialog.tsx
|
|
7929
|
-
import {
|
|
7930
|
-
import { useState as useState9 } from "react";
|
|
7931
|
-
import { useRef as useRef4 } from "react";
|
|
7929
|
+
import { useId as useId3 } from "react";
|
|
7930
|
+
import { useEffect as useEffect10, useRef as useRef4, useState as useState9 } from "react";
|
|
7932
7931
|
import clsx9 from "clsx";
|
|
7933
7932
|
import { X } from "lucide-react";
|
|
7934
7933
|
|
|
@@ -8283,7 +8282,7 @@ var useLogOnce = (message, condition, options) => {
|
|
|
8283
8282
|
|
|
8284
8283
|
// src/components/dialog/Dialog.tsx
|
|
8285
8284
|
import { createPortal } from "react-dom";
|
|
8286
|
-
import {
|
|
8285
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
8287
8286
|
var Dialog = ({
|
|
8288
8287
|
children,
|
|
8289
8288
|
isOpen,
|
|
@@ -8291,13 +8290,16 @@ var Dialog = ({
|
|
|
8291
8290
|
description,
|
|
8292
8291
|
isModal = true,
|
|
8293
8292
|
onClose,
|
|
8294
|
-
className,
|
|
8295
8293
|
backgroundClassName,
|
|
8296
8294
|
position = "center",
|
|
8297
|
-
isAnimated = true
|
|
8295
|
+
isAnimated = true,
|
|
8296
|
+
containerClassName,
|
|
8297
|
+
...props
|
|
8298
8298
|
}) => {
|
|
8299
8299
|
const translation = useTranslation([formTranslation]);
|
|
8300
8300
|
const [visible, setVisible] = useState9(isOpen);
|
|
8301
|
+
const generatedId = useId3();
|
|
8302
|
+
const id = props.id ?? generatedId;
|
|
8301
8303
|
const ref = useRef4(null);
|
|
8302
8304
|
useEffect10(() => {
|
|
8303
8305
|
if (isOpen) {
|
|
@@ -8324,14 +8326,16 @@ var Dialog = ({
|
|
|
8324
8326
|
none: ""
|
|
8325
8327
|
};
|
|
8326
8328
|
const positionStyle = positionMap[position];
|
|
8329
|
+
if (!visible) return;
|
|
8327
8330
|
return createPortal(
|
|
8328
|
-
/* @__PURE__ */ jsxs8(
|
|
8331
|
+
/* @__PURE__ */ jsxs8("div", { id: `dialog-container-${id}`, className: clsx9("fixed inset-0 h-screen w-screen", containerClassName), children: [
|
|
8329
8332
|
/* @__PURE__ */ jsx11(
|
|
8330
8333
|
"div",
|
|
8331
8334
|
{
|
|
8335
|
+
id: `dialog-background-${id}`,
|
|
8332
8336
|
hidden: !visible,
|
|
8333
8337
|
className: clsx9(
|
|
8334
|
-
"fixed inset-0 h-screen w-screen bg-overlay-shadow
|
|
8338
|
+
"fixed inset-0 h-screen w-screen bg-overlay-shadow",
|
|
8335
8339
|
{
|
|
8336
8340
|
"motion-safe:animate-fade-in": isOpen,
|
|
8337
8341
|
"motion-safe:animate-fade-out": !isOpen
|
|
@@ -8350,6 +8354,8 @@ var Dialog = ({
|
|
|
8350
8354
|
/* @__PURE__ */ jsxs8(
|
|
8351
8355
|
"div",
|
|
8352
8356
|
{
|
|
8357
|
+
...props,
|
|
8358
|
+
id: `dialog-${id}`,
|
|
8353
8359
|
ref,
|
|
8354
8360
|
hidden: !visible,
|
|
8355
8361
|
onKeyDown: (event) => {
|
|
@@ -8363,13 +8369,13 @@ var Dialog = ({
|
|
|
8363
8369
|
}
|
|
8364
8370
|
},
|
|
8365
8371
|
className: clsx9(
|
|
8366
|
-
"flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom max-w-[calc(100vw_-_2rem)] max-h-[calc(100vh_-_2rem)]
|
|
8372
|
+
"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)]",
|
|
8367
8373
|
{
|
|
8368
8374
|
"motion-safe:animate-pop-in": isOpen,
|
|
8369
8375
|
"motion-safe:animate-pop-out": !isOpen
|
|
8370
8376
|
},
|
|
8371
8377
|
positionStyle,
|
|
8372
|
-
className
|
|
8378
|
+
props.className
|
|
8373
8379
|
),
|
|
8374
8380
|
children: [
|
|
8375
8381
|
/* @__PURE__ */ jsx11("div", { className: "typography-title-lg mr-8", children: titleElement }),
|
|
@@ -8708,8 +8714,9 @@ import {
|
|
|
8708
8714
|
useCallback as useCallback6,
|
|
8709
8715
|
useContext as useContext2,
|
|
8710
8716
|
useEffect as useEffect13,
|
|
8711
|
-
useId as
|
|
8717
|
+
useId as useId4,
|
|
8712
8718
|
useImperativeHandle as useImperativeHandle2,
|
|
8719
|
+
useMemo as useMemo2,
|
|
8713
8720
|
useRef as useRef6,
|
|
8714
8721
|
useState as useState12
|
|
8715
8722
|
} from "react";
|
|
@@ -8926,9 +8933,9 @@ function useFloatingElement({
|
|
|
8926
8933
|
|
|
8927
8934
|
// src/components/user-action/select/Select.tsx
|
|
8928
8935
|
import { createPortal as createPortal2 } from "react-dom";
|
|
8929
|
-
import {
|
|
8936
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
8930
8937
|
var defaultToggleOpenOptions = {
|
|
8931
|
-
|
|
8938
|
+
highlightStartPositionBehavior: "first"
|
|
8932
8939
|
};
|
|
8933
8940
|
var SelectContext = createContext2(null);
|
|
8934
8941
|
function useSelectContext() {
|
|
@@ -8951,47 +8958,62 @@ var SelectRoot = ({
|
|
|
8951
8958
|
isMultiSelect = false,
|
|
8952
8959
|
iconAppearance = "left"
|
|
8953
8960
|
}) => {
|
|
8954
|
-
const [options, setOptions] = useState12([]);
|
|
8955
8961
|
const triggerRef = useRef6(null);
|
|
8956
|
-
const generatedId =
|
|
8962
|
+
const generatedId = useId4();
|
|
8957
8963
|
const usedId = id ?? generatedId;
|
|
8958
8964
|
const [internalState, setInternalState] = useState12({
|
|
8959
|
-
isOpen
|
|
8965
|
+
isOpen,
|
|
8966
|
+
options: []
|
|
8960
8967
|
});
|
|
8961
|
-
const selectedValues =
|
|
8968
|
+
const selectedValues = useMemo2(
|
|
8969
|
+
() => isMultiSelect ? values ?? [] : [value].filter(Boolean),
|
|
8970
|
+
[isMultiSelect, value, values]
|
|
8971
|
+
);
|
|
8972
|
+
const selectedOptions = useMemo2(
|
|
8973
|
+
() => selectedValues.map((value2) => internalState.options.find((option) => value2 === option.value)).filter(Boolean),
|
|
8974
|
+
[selectedValues, internalState.options]
|
|
8975
|
+
);
|
|
8962
8976
|
const state = {
|
|
8963
8977
|
...internalState,
|
|
8964
8978
|
id: usedId,
|
|
8965
8979
|
disabled,
|
|
8966
8980
|
invalid,
|
|
8967
8981
|
value: selectedValues,
|
|
8968
|
-
|
|
8969
|
-
selectedOptions: selectedValues.map((value2) => options.find((option) => value2 === option.value)).filter(Boolean)
|
|
8982
|
+
selectedOptions
|
|
8970
8983
|
};
|
|
8971
8984
|
const config = {
|
|
8972
8985
|
isMultiSelect,
|
|
8973
8986
|
iconAppearance
|
|
8974
8987
|
};
|
|
8975
8988
|
const registerItem = useCallback6((item) => {
|
|
8976
|
-
|
|
8977
|
-
const
|
|
8978
|
-
|
|
8989
|
+
setInternalState((prev) => {
|
|
8990
|
+
const updatedOptions = [...prev.options, item];
|
|
8991
|
+
updatedOptions.sort((a, b) => {
|
|
8979
8992
|
const aEl = a.ref.current;
|
|
8980
8993
|
const bEl = b.ref.current;
|
|
8981
8994
|
if (!aEl || !bEl) return 0;
|
|
8982
8995
|
return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
8983
8996
|
});
|
|
8984
|
-
return
|
|
8997
|
+
return {
|
|
8998
|
+
...prev,
|
|
8999
|
+
options: updatedOptions
|
|
9000
|
+
};
|
|
8985
9001
|
});
|
|
8986
9002
|
}, []);
|
|
8987
9003
|
const unregisterItem = useCallback6((value2) => {
|
|
8988
|
-
|
|
9004
|
+
setInternalState((prev) => {
|
|
9005
|
+
const updatedOptions = prev.options.filter((i) => i.value !== value2);
|
|
9006
|
+
return {
|
|
9007
|
+
...prev,
|
|
9008
|
+
options: updatedOptions
|
|
9009
|
+
};
|
|
9010
|
+
});
|
|
8989
9011
|
}, []);
|
|
8990
9012
|
const toggleSelection = (value2, isSelected) => {
|
|
8991
9013
|
if (disabled) {
|
|
8992
9014
|
return;
|
|
8993
9015
|
}
|
|
8994
|
-
const option = options.find((i) => i.value === value2);
|
|
9016
|
+
const option = state.options.find((i) => i.value === value2);
|
|
8995
9017
|
if (!option) {
|
|
8996
9018
|
console.error(`SelectOption with value: ${value2} not found`);
|
|
8997
9019
|
return;
|
|
@@ -9034,35 +9056,40 @@ var SelectRoot = ({
|
|
|
9034
9056
|
triggerRef.current = null;
|
|
9035
9057
|
}, []);
|
|
9036
9058
|
const toggleOpen = (isOpen2, toggleOpenOptions) => {
|
|
9037
|
-
const {
|
|
9038
|
-
let
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9059
|
+
const { highlightStartPositionBehavior } = { ...defaultToggleOpenOptions, ...toggleOpenOptions };
|
|
9060
|
+
let firstSelectedValue;
|
|
9061
|
+
let firstEnabledValue;
|
|
9062
|
+
for (let i = 0; i < state.options.length; i++) {
|
|
9063
|
+
const currentOption = state.options[highlightStartPositionBehavior === "first" ? i : state.options.length - i - 1];
|
|
9064
|
+
if (!currentOption.disabled) {
|
|
9065
|
+
if (!firstEnabledValue) {
|
|
9066
|
+
firstEnabledValue = currentOption.value;
|
|
9067
|
+
}
|
|
9068
|
+
if (selectedValues.includes(currentOption.value)) {
|
|
9069
|
+
firstSelectedValue = currentOption.value;
|
|
9070
|
+
break;
|
|
9071
|
+
}
|
|
9072
|
+
}
|
|
9046
9073
|
}
|
|
9047
9074
|
setInternalState((prevState) => ({
|
|
9048
9075
|
...prevState,
|
|
9049
9076
|
isOpen: isOpen2 ?? !prevState.isOpen,
|
|
9050
|
-
highlightedValue:
|
|
9077
|
+
highlightedValue: firstSelectedValue ?? firstEnabledValue
|
|
9051
9078
|
}));
|
|
9052
9079
|
};
|
|
9053
9080
|
const moveHighlightedIndex = (delta) => {
|
|
9054
|
-
let highlightedIndex = options.findIndex((value2) => value2.value === internalState.highlightedValue);
|
|
9081
|
+
let highlightedIndex = state.options.findIndex((value2) => value2.value === internalState.highlightedValue);
|
|
9055
9082
|
if (highlightedIndex === -1) {
|
|
9056
9083
|
highlightedIndex = 0;
|
|
9057
9084
|
}
|
|
9058
|
-
const optionLength = options.length;
|
|
9085
|
+
const optionLength = state.options.length;
|
|
9059
9086
|
const startIndex = (highlightedIndex + delta % optionLength + optionLength) % optionLength;
|
|
9060
9087
|
const isForward = delta >= 0;
|
|
9061
|
-
let highlightedValue = options[startIndex].value;
|
|
9062
|
-
for (let i = 0; i < options.length; i++) {
|
|
9088
|
+
let highlightedValue = state.options[startIndex].value;
|
|
9089
|
+
for (let i = 0; i < state.options.length; i++) {
|
|
9063
9090
|
const index = (startIndex + (isForward ? i : -i) + optionLength) % optionLength;
|
|
9064
|
-
if (!options[index].disabled) {
|
|
9065
|
-
highlightedValue = options[index].value;
|
|
9091
|
+
if (!state.options[index].disabled) {
|
|
9092
|
+
highlightedValue = state.options[index].value;
|
|
9066
9093
|
break;
|
|
9067
9094
|
}
|
|
9068
9095
|
}
|
|
@@ -9073,9 +9100,9 @@ var SelectRoot = ({
|
|
|
9073
9100
|
};
|
|
9074
9101
|
useEffect13(() => {
|
|
9075
9102
|
if (!internalState.highlightedValue) return;
|
|
9076
|
-
const highlighted = options.find((value2) => value2.value === internalState.highlightedValue);
|
|
9103
|
+
const highlighted = internalState.options.find((value2) => value2.value === internalState.highlightedValue);
|
|
9077
9104
|
if (highlighted) {
|
|
9078
|
-
highlighted.ref.current
|
|
9105
|
+
highlighted.ref.current?.scrollIntoView({ behavior: "instant", block: "nearest" });
|
|
9079
9106
|
} else {
|
|
9080
9107
|
console.error(`SelectRoot: Could not find highlighted value (${internalState.highlightedValue})`);
|
|
9081
9108
|
}
|
|
@@ -9212,12 +9239,12 @@ var SelectButton = forwardRef4(function SelectButton2({ placeholder, selectedDis
|
|
|
9212
9239
|
props.onKeyDown?.(event);
|
|
9213
9240
|
switch (event.key) {
|
|
9214
9241
|
case "ArrowDown":
|
|
9215
|
-
toggleOpen(true, {
|
|
9242
|
+
toggleOpen(true, { highlightStartPositionBehavior: "first" });
|
|
9216
9243
|
event.preventDefault();
|
|
9217
9244
|
event.stopPropagation();
|
|
9218
9245
|
break;
|
|
9219
9246
|
case "ArrowUp":
|
|
9220
|
-
toggleOpen(true, {
|
|
9247
|
+
toggleOpen(true, { highlightStartPositionBehavior: "last" });
|
|
9221
9248
|
event.preventDefault();
|
|
9222
9249
|
event.stopPropagation();
|
|
9223
9250
|
break;
|
|
@@ -9311,10 +9338,10 @@ var SelectChipDisplay = forwardRef4(function SelectChipDisplay2({ ...props }, re
|
|
|
9311
9338
|
onKeyDown: (event) => {
|
|
9312
9339
|
switch (event.key) {
|
|
9313
9340
|
case "ArrowDown":
|
|
9314
|
-
toggleOpen(true, {
|
|
9341
|
+
toggleOpen(true, { highlightStartPositionBehavior: "first" });
|
|
9315
9342
|
break;
|
|
9316
9343
|
case "ArrowUp":
|
|
9317
|
-
toggleOpen(true, {
|
|
9344
|
+
toggleOpen(true, { highlightStartPositionBehavior: "last" });
|
|
9318
9345
|
}
|
|
9319
9346
|
},
|
|
9320
9347
|
size: "small",
|
|
@@ -9335,6 +9362,7 @@ var SelectContent = forwardRef4(
|
|
|
9335
9362
|
function SelectContent2({
|
|
9336
9363
|
alignment,
|
|
9337
9364
|
orientation = "vertical",
|
|
9365
|
+
containerClassName,
|
|
9338
9366
|
...props
|
|
9339
9367
|
}, ref) {
|
|
9340
9368
|
const innerRef = useRef6(null);
|
|
@@ -9351,76 +9379,83 @@ var SelectContent = forwardRef4(
|
|
|
9351
9379
|
active: state.isOpen && !!position
|
|
9352
9380
|
});
|
|
9353
9381
|
return createPortal2(
|
|
9354
|
-
/* @__PURE__ */ jsxs11(
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
{
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
vertical: "ArrowDown",
|
|
9379
|
-
horizontal: "ArrowUp"
|
|
9380
|
-
}):
|
|
9381
|
-
item.moveHighlightedIndex(1);
|
|
9382
|
-
event.preventDefault();
|
|
9383
|
-
break;
|
|
9384
|
-
case match(orientation, {
|
|
9385
|
-
vertical: "ArrowUp",
|
|
9386
|
-
horizontal: "ArrowDown"
|
|
9387
|
-
}):
|
|
9388
|
-
item.moveHighlightedIndex(-1);
|
|
9389
|
-
event.preventDefault();
|
|
9390
|
-
break;
|
|
9391
|
-
case "Home":
|
|
9392
|
-
event.preventDefault();
|
|
9393
|
-
break;
|
|
9394
|
-
case "End":
|
|
9395
|
-
event.preventDefault();
|
|
9396
|
-
break;
|
|
9397
|
-
case "Enter":
|
|
9398
|
-
// Fall through
|
|
9399
|
-
case " ":
|
|
9400
|
-
if (state.highlightedValue) {
|
|
9401
|
-
item.toggleSelection(state.highlightedValue);
|
|
9402
|
-
if (!config.isMultiSelect) {
|
|
9382
|
+
/* @__PURE__ */ jsxs11(
|
|
9383
|
+
"div",
|
|
9384
|
+
{
|
|
9385
|
+
id: `select-container-${state.id}`,
|
|
9386
|
+
className: clsx13("fixed inset-0 w-screen h-screen", containerClassName),
|
|
9387
|
+
hidden: !state.isOpen,
|
|
9388
|
+
children: [
|
|
9389
|
+
/* @__PURE__ */ jsx17(
|
|
9390
|
+
"div",
|
|
9391
|
+
{
|
|
9392
|
+
id: `select-background-${state.id}`,
|
|
9393
|
+
onClick: () => trigger.toggleOpen(false),
|
|
9394
|
+
className: clsx13("fixed inset-0 w-screen h-screen")
|
|
9395
|
+
}
|
|
9396
|
+
),
|
|
9397
|
+
/* @__PURE__ */ jsx17(
|
|
9398
|
+
"ul",
|
|
9399
|
+
{
|
|
9400
|
+
...props,
|
|
9401
|
+
id: `${state.id}-listbox`,
|
|
9402
|
+
ref: innerRef,
|
|
9403
|
+
onKeyDown: (event) => {
|
|
9404
|
+
switch (event.key) {
|
|
9405
|
+
case "Escape":
|
|
9403
9406
|
trigger.toggleOpen(false);
|
|
9404
|
-
|
|
9405
|
-
|
|
9407
|
+
event.preventDefault();
|
|
9408
|
+
event.stopPropagation();
|
|
9409
|
+
break;
|
|
9410
|
+
case match(orientation, {
|
|
9411
|
+
vertical: "ArrowDown",
|
|
9412
|
+
horizontal: "ArrowUp"
|
|
9413
|
+
}):
|
|
9414
|
+
item.moveHighlightedIndex(1);
|
|
9415
|
+
event.preventDefault();
|
|
9416
|
+
break;
|
|
9417
|
+
case match(orientation, {
|
|
9418
|
+
vertical: "ArrowUp",
|
|
9419
|
+
horizontal: "ArrowDown"
|
|
9420
|
+
}):
|
|
9421
|
+
item.moveHighlightedIndex(-1);
|
|
9422
|
+
event.preventDefault();
|
|
9423
|
+
break;
|
|
9424
|
+
case "Home":
|
|
9425
|
+
event.preventDefault();
|
|
9426
|
+
break;
|
|
9427
|
+
case "End":
|
|
9428
|
+
event.preventDefault();
|
|
9429
|
+
break;
|
|
9430
|
+
case "Enter":
|
|
9431
|
+
// Fall through
|
|
9432
|
+
case " ":
|
|
9433
|
+
if (state.highlightedValue) {
|
|
9434
|
+
item.toggleSelection(state.highlightedValue);
|
|
9435
|
+
if (!config.isMultiSelect) {
|
|
9436
|
+
trigger.toggleOpen(false);
|
|
9437
|
+
}
|
|
9438
|
+
event.preventDefault();
|
|
9439
|
+
}
|
|
9440
|
+
break;
|
|
9406
9441
|
}
|
|
9407
|
-
|
|
9442
|
+
},
|
|
9443
|
+
className: clsx13("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
|
|
9444
|
+
style: {
|
|
9445
|
+
opacity: position ? void 0 : 0,
|
|
9446
|
+
position: "fixed",
|
|
9447
|
+
...position
|
|
9448
|
+
},
|
|
9449
|
+
role: "listbox",
|
|
9450
|
+
"aria-multiselectable": config.isMultiSelect,
|
|
9451
|
+
"aria-orientation": orientation,
|
|
9452
|
+
tabIndex: position ? 0 : void 0,
|
|
9453
|
+
children: props.children
|
|
9408
9454
|
}
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
position: "fixed",
|
|
9414
|
-
...position
|
|
9415
|
-
},
|
|
9416
|
-
role: "listbox",
|
|
9417
|
-
"aria-multiselectable": config.isMultiSelect,
|
|
9418
|
-
"aria-orientation": orientation,
|
|
9419
|
-
tabIndex: position ? 0 : void 0,
|
|
9420
|
-
children: props.children
|
|
9421
|
-
}
|
|
9422
|
-
)
|
|
9423
|
-
] }),
|
|
9455
|
+
)
|
|
9456
|
+
]
|
|
9457
|
+
}
|
|
9458
|
+
),
|
|
9424
9459
|
document.body
|
|
9425
9460
|
);
|
|
9426
9461
|
}
|
|
@@ -9574,7 +9609,7 @@ import { MonitorCog, MoonIcon, SunIcon } from "lucide-react";
|
|
|
9574
9609
|
import clsx14 from "clsx";
|
|
9575
9610
|
|
|
9576
9611
|
// src/theming/useTheme.tsx
|
|
9577
|
-
import { createContext as createContext3, useCallback as useCallback7, useContext as useContext3, useEffect as useEffect14, useMemo as
|
|
9612
|
+
import { createContext as createContext3, useCallback as useCallback7, useContext as useContext3, useEffect as useEffect14, useMemo as useMemo3, useState as useState13 } from "react";
|
|
9578
9613
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
9579
9614
|
var themes = ["light", "dark", "system"];
|
|
9580
9615
|
var defaultThemeTypeTranslation = {
|
|
@@ -9609,7 +9644,7 @@ var ThemeProvider = ({ children, theme }) => {
|
|
|
9609
9644
|
deleteValue: deleteStoredTheme
|
|
9610
9645
|
} = useLocalStorage("theme", "system");
|
|
9611
9646
|
const [themePreference, setThemePreference] = useState13("system");
|
|
9612
|
-
const resolvedTheme =
|
|
9647
|
+
const resolvedTheme = useMemo3(() => {
|
|
9613
9648
|
if (theme && theme !== "system") {
|
|
9614
9649
|
return theme;
|
|
9615
9650
|
}
|
|
@@ -9660,7 +9695,7 @@ var ThemeProvider = ({ children, theme }) => {
|
|
|
9660
9695
|
theme: storedTheme,
|
|
9661
9696
|
resolvedTheme,
|
|
9662
9697
|
setTheme: (newTheme) => {
|
|
9663
|
-
if (theme) {
|
|
9698
|
+
if (theme && theme !== "system") {
|
|
9664
9699
|
console.warn("ThemeProvider: Attempting to change the theme while setting a fixed theme won't have any effect. Change the theme provided to the ThemeProvider instead.");
|
|
9665
9700
|
}
|
|
9666
9701
|
setStoredTheme(newTheme);
|
|
@@ -9743,7 +9778,7 @@ var ThemeDialog = ({
|
|
|
9743
9778
|
};
|
|
9744
9779
|
|
|
9745
9780
|
// src/components/form/FormElementWrapper.tsx
|
|
9746
|
-
import { useId as
|
|
9781
|
+
import { useId as useId5 } from "react";
|
|
9747
9782
|
import { clsx as clsx16 } from "clsx";
|
|
9748
9783
|
|
|
9749
9784
|
// src/components/user-action/Label.tsx
|
|
@@ -9781,7 +9816,7 @@ var FormElementWrapper = ({
|
|
|
9781
9816
|
containerClassName
|
|
9782
9817
|
}) => {
|
|
9783
9818
|
const [touched, setTouched] = useOverwritableState(initialIsShowingError, onIsShowingError);
|
|
9784
|
-
const generatedId =
|
|
9819
|
+
const generatedId = useId5();
|
|
9785
9820
|
const usedId = id ?? generatedId;
|
|
9786
9821
|
const errorId = `${usedId}-description`;
|
|
9787
9822
|
const labelId = `${usedId}-label`;
|
|
@@ -9852,7 +9887,7 @@ var FormElementWrapper = ({
|
|
|
9852
9887
|
|
|
9853
9888
|
// src/components/icons-and-geometry/Avatar.tsx
|
|
9854
9889
|
import clsx17 from "clsx";
|
|
9855
|
-
import { useMemo as
|
|
9890
|
+
import { useMemo as useMemo6 } from "react";
|
|
9856
9891
|
import { UserIcon } from "lucide-react";
|
|
9857
9892
|
|
|
9858
9893
|
// node_modules/@radix-ui/react-avatar/dist/index.mjs
|
|
@@ -9979,7 +10014,7 @@ function useComposedRefs(...refs) {
|
|
|
9979
10014
|
}
|
|
9980
10015
|
|
|
9981
10016
|
// node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
9982
|
-
import { Fragment as
|
|
10017
|
+
import { Fragment as Fragment2, jsx as jsx24 } from "react/jsx-runtime";
|
|
9983
10018
|
// @__NO_SIDE_EFFECTS__
|
|
9984
10019
|
function createSlot(ownerName) {
|
|
9985
10020
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -10251,7 +10286,7 @@ var Avatar2 = ({ image, name, size = "md", fullyRounded, className = "" }) => {
|
|
|
10251
10286
|
maxHeight: pixels
|
|
10252
10287
|
};
|
|
10253
10288
|
const textClassName = textClassNameMapping[size];
|
|
10254
|
-
const displayName =
|
|
10289
|
+
const displayName = useMemo6(() => {
|
|
10255
10290
|
const maxLetters = size === "sm" ? 1 : 2;
|
|
10256
10291
|
return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
|
|
10257
10292
|
}, [name, size]);
|
|
@@ -10641,14 +10676,14 @@ import {
|
|
|
10641
10676
|
useCallback as useCallback10,
|
|
10642
10677
|
useContext as useContext5,
|
|
10643
10678
|
useEffect as useEffect18,
|
|
10644
|
-
useId as
|
|
10645
|
-
useMemo as
|
|
10679
|
+
useId as useId6,
|
|
10680
|
+
useMemo as useMemo7,
|
|
10646
10681
|
useRef as useRef9,
|
|
10647
10682
|
useState as useState16
|
|
10648
10683
|
} from "react";
|
|
10649
10684
|
import clsx20 from "clsx";
|
|
10650
10685
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
10651
|
-
import { Fragment as
|
|
10686
|
+
import { Fragment as Fragment3, jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
10652
10687
|
var CarouselContext = createContext5(null);
|
|
10653
10688
|
var useCarouselContext = () => {
|
|
10654
10689
|
const context = useContext5(CarouselContext);
|
|
@@ -10791,6 +10826,7 @@ var Carousel = ({
|
|
|
10791
10826
|
heightClassName = "h-96",
|
|
10792
10827
|
widthClassName = "w-[70%] desktop:w-1/2",
|
|
10793
10828
|
slideContainerProps,
|
|
10829
|
+
onSlideChanged,
|
|
10794
10830
|
...props
|
|
10795
10831
|
}) => {
|
|
10796
10832
|
const translation = useTranslation([defaultCarouselTranslationType]);
|
|
@@ -10802,9 +10838,9 @@ var Carousel = ({
|
|
|
10802
10838
|
const carouselContainerRef = useRef9(null);
|
|
10803
10839
|
const [disableClick, setDisableClick] = useState16(false);
|
|
10804
10840
|
const timeOut = useRef9(void 0);
|
|
10805
|
-
const length =
|
|
10841
|
+
const length = useMemo7(() => children.length, [children]);
|
|
10806
10842
|
const paddingItemCount = 3;
|
|
10807
|
-
const generatedId = "carousel" +
|
|
10843
|
+
const generatedId = "carousel" + useId6();
|
|
10808
10844
|
const id = props.id ?? generatedId;
|
|
10809
10845
|
if (isAutoPlaying && !isLooping) {
|
|
10810
10846
|
console.error("When isAutoLooping is true, isLooping should also be true");
|
|
@@ -10904,6 +10940,9 @@ var Carousel = ({
|
|
|
10904
10940
|
useEffect18(() => {
|
|
10905
10941
|
setDisableClick(!dragState);
|
|
10906
10942
|
}, [dragState]);
|
|
10943
|
+
useEffect18(() => {
|
|
10944
|
+
onSlideChanged?.(currentIndex);
|
|
10945
|
+
}, [currentIndex]);
|
|
10907
10946
|
return /* @__PURE__ */ jsx31(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ jsxs17(
|
|
10908
10947
|
"div",
|
|
10909
10948
|
{
|
|
@@ -10984,7 +11023,7 @@ var Carousel = ({
|
|
|
10984
11023
|
children: children[currentIndex]
|
|
10985
11024
|
}
|
|
10986
11025
|
),
|
|
10987
|
-
arrows && /* @__PURE__ */ jsxs17(
|
|
11026
|
+
arrows && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
10988
11027
|
/* @__PURE__ */ jsx31(
|
|
10989
11028
|
IconButton,
|
|
10990
11029
|
{
|
|
@@ -11041,7 +11080,7 @@ var DividerInserter = ({
|
|
|
11041
11080
|
import clsx22 from "clsx";
|
|
11042
11081
|
|
|
11043
11082
|
// src/components/layout/MarkdownInterpreter.tsx
|
|
11044
|
-
import { Fragment as
|
|
11083
|
+
import { Fragment as Fragment4, jsx as jsx33 } from "react/jsx-runtime";
|
|
11045
11084
|
var astNodeInserterType = ["helpwave", "newline"];
|
|
11046
11085
|
var ASTNodeInterpreter = ({
|
|
11047
11086
|
node,
|
|
@@ -11062,7 +11101,7 @@ var ASTNodeInterpreter = ({
|
|
|
11062
11101
|
node: value
|
|
11063
11102
|
},
|
|
11064
11103
|
index
|
|
11065
|
-
)) }) : /* @__PURE__ */ jsx33(
|
|
11104
|
+
)) }) : /* @__PURE__ */ jsx33(Fragment4, { children: node.children.map((value, index) => /* @__PURE__ */ jsx33(ASTNodeInterpreter, { node: value }, index)) });
|
|
11066
11105
|
case "bold":
|
|
11067
11106
|
return /* @__PURE__ */ jsx33("b", { children: node.children.map((value, index) => /* @__PURE__ */ jsx33(ASTNodeInterpreter, { node: value }, index)) });
|
|
11068
11107
|
case "italic":
|
|
@@ -11295,7 +11334,7 @@ var FAQSection = ({
|
|
|
11295
11334
|
import { forwardRef as forwardRef9, useImperativeHandle as useImperativeHandle3, useRef as useRef10 } from "react";
|
|
11296
11335
|
import { createPortal as createPortal3 } from "react-dom";
|
|
11297
11336
|
import { clsx as clsx23 } from "clsx";
|
|
11298
|
-
import { Fragment as
|
|
11337
|
+
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
11299
11338
|
var FloatingContainer = forwardRef9(function FloatingContainer2({
|
|
11300
11339
|
children,
|
|
11301
11340
|
backgroundOverlay,
|
|
@@ -11322,7 +11361,7 @@ var FloatingContainer = forwardRef9(function FloatingContainer2({
|
|
|
11322
11361
|
screenPadding
|
|
11323
11362
|
});
|
|
11324
11363
|
return createPortal3(
|
|
11325
|
-
/* @__PURE__ */ jsxs18(
|
|
11364
|
+
/* @__PURE__ */ jsxs18(Fragment5, { children: [
|
|
11326
11365
|
backgroundOverlay,
|
|
11327
11366
|
/* @__PURE__ */ jsx35(
|
|
11328
11367
|
"div",
|
|
@@ -11766,7 +11805,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
11766
11805
|
|
|
11767
11806
|
// node_modules/@radix-ui/react-scroll-area/dist/index.mjs
|
|
11768
11807
|
import * as React14 from "react";
|
|
11769
|
-
import { Fragment as
|
|
11808
|
+
import { Fragment as Fragment6, jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
11770
11809
|
function useStateMachine2(initialState, machine) {
|
|
11771
11810
|
return React14.useReducer((state, event) => {
|
|
11772
11811
|
const nextState = machine[state][event];
|
|
@@ -11845,7 +11884,7 @@ var ScrollAreaViewport = React23.forwardRef(
|
|
|
11845
11884
|
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
|
|
11846
11885
|
const ref = React23.useRef(null);
|
|
11847
11886
|
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
11848
|
-
return /* @__PURE__ */ jsxs19(
|
|
11887
|
+
return /* @__PURE__ */ jsxs19(Fragment6, { children: [
|
|
11849
11888
|
/* @__PURE__ */ jsx38(
|
|
11850
11889
|
"style",
|
|
11851
11890
|
{
|
|
@@ -12835,13 +12874,13 @@ var ProgressIndicator = ({
|
|
|
12835
12874
|
// src/components/navigation/BreadCrumb.tsx
|
|
12836
12875
|
var import_link = __toESM(require_link2());
|
|
12837
12876
|
import clsx32 from "clsx";
|
|
12838
|
-
import { Fragment as
|
|
12877
|
+
import { Fragment as Fragment7 } from "react";
|
|
12839
12878
|
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
12840
12879
|
var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
12841
12880
|
const color = "text-description";
|
|
12842
12881
|
return /* @__PURE__ */ jsx48("div", { className: clsx32("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
|
|
12843
12882
|
const isLast = index === crumbs.length - 1;
|
|
12844
|
-
return /* @__PURE__ */ jsxs27(
|
|
12883
|
+
return /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
12845
12884
|
/* @__PURE__ */ jsx48(
|
|
12846
12885
|
import_link.default,
|
|
12847
12886
|
{
|
|
@@ -12859,9 +12898,9 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
12859
12898
|
var import_link2 = __toESM(require_link2());
|
|
12860
12899
|
import { Menu as MenuIcon, XIcon as XIcon2 } from "lucide-react";
|
|
12861
12900
|
import { useEffect as useEffect22 } from "react";
|
|
12862
|
-
import { useCallback as useCallback14, useId as
|
|
12901
|
+
import { useCallback as useCallback14, useId as useId7, useRef as useRef14, useState as useState21 } from "react";
|
|
12863
12902
|
import clsx33 from "clsx";
|
|
12864
|
-
import { Fragment as
|
|
12903
|
+
import { Fragment as Fragment8, jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
12865
12904
|
function isSubItem(item) {
|
|
12866
12905
|
return "items" in item && Array.isArray(item.items);
|
|
12867
12906
|
}
|
|
@@ -12874,7 +12913,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12874
12913
|
const [isOpen, setOpen] = useState21(false);
|
|
12875
12914
|
const containerRef = useRef14();
|
|
12876
12915
|
const triggerRef = useRef14(null);
|
|
12877
|
-
const id =
|
|
12916
|
+
const id = useId7();
|
|
12878
12917
|
const style = useFloatingElement({
|
|
12879
12918
|
active: isOpen,
|
|
12880
12919
|
containerRef,
|
|
@@ -12888,7 +12927,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12888
12927
|
setOpen(false);
|
|
12889
12928
|
}
|
|
12890
12929
|
}, []);
|
|
12891
|
-
return /* @__PURE__ */ jsxs28(
|
|
12930
|
+
return /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
12892
12931
|
/* @__PURE__ */ jsxs28(
|
|
12893
12932
|
"button",
|
|
12894
12933
|
{
|
|
@@ -12937,12 +12976,12 @@ var NavigationItemList = ({ items, ...restProps }) => {
|
|
|
12937
12976
|
};
|
|
12938
12977
|
var Navigation = ({ ...props }) => {
|
|
12939
12978
|
const [isMobileOpen, setIsMobileOpen] = useState21(false);
|
|
12940
|
-
const id =
|
|
12979
|
+
const id = useId7();
|
|
12941
12980
|
const menuRef = useRef14(null);
|
|
12942
12981
|
useEffect22(() => {
|
|
12943
12982
|
menuRef.current?.focus();
|
|
12944
12983
|
}, [isMobileOpen]);
|
|
12945
|
-
return /* @__PURE__ */ jsxs28(
|
|
12984
|
+
return /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
12946
12985
|
/* @__PURE__ */ jsx49(
|
|
12947
12986
|
NavigationItemList,
|
|
12948
12987
|
{
|
|
@@ -13298,7 +13337,7 @@ function useSize(element) {
|
|
|
13298
13337
|
}
|
|
13299
13338
|
|
|
13300
13339
|
// node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
|
13301
|
-
import { Fragment as
|
|
13340
|
+
import { Fragment as Fragment9, jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
13302
13341
|
var CHECKBOX_NAME = "Checkbox";
|
|
13303
13342
|
var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
|
|
13304
13343
|
var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
@@ -13434,7 +13473,7 @@ var Checkbox = React19.forwardRef(
|
|
|
13434
13473
|
name,
|
|
13435
13474
|
form,
|
|
13436
13475
|
value,
|
|
13437
|
-
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs31(
|
|
13476
|
+
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs31(Fragment9, { children: [
|
|
13438
13477
|
/* @__PURE__ */ jsx52(
|
|
13439
13478
|
CheckboxTrigger,
|
|
13440
13479
|
{
|
|
@@ -13688,7 +13727,7 @@ var PropertyBase = ({
|
|
|
13688
13727
|
};
|
|
13689
13728
|
|
|
13690
13729
|
// src/components/properties/CheckboxProperty.tsx
|
|
13691
|
-
import { useId as
|
|
13730
|
+
import { useId as useId8 } from "react";
|
|
13692
13731
|
import { jsx as jsx55, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
13693
13732
|
var CheckboxProperty = ({
|
|
13694
13733
|
overwriteTranslation,
|
|
@@ -13698,7 +13737,7 @@ var CheckboxProperty = ({
|
|
|
13698
13737
|
...baseProps
|
|
13699
13738
|
}) => {
|
|
13700
13739
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
13701
|
-
const id =
|
|
13740
|
+
const id = useId8();
|
|
13702
13741
|
return /* @__PURE__ */ jsx55(
|
|
13703
13742
|
PropertyBase,
|
|
13704
13743
|
{
|
|
@@ -13921,7 +13960,7 @@ import { Text } from "lucide-react";
|
|
|
13921
13960
|
import clsx43 from "clsx";
|
|
13922
13961
|
|
|
13923
13962
|
// src/components/user-action/Textarea.tsx
|
|
13924
|
-
import { forwardRef as forwardRef13, useId as
|
|
13963
|
+
import { forwardRef as forwardRef13, useId as useId9 } from "react";
|
|
13925
13964
|
import clsx42 from "clsx";
|
|
13926
13965
|
import { jsx as jsx60, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
13927
13966
|
var Textarea = forwardRef13(function Textarea2({
|
|
@@ -13998,7 +14037,7 @@ var TextareaWithHeadline = ({
|
|
|
13998
14037
|
containerClassName,
|
|
13999
14038
|
...props
|
|
14000
14039
|
}) => {
|
|
14001
|
-
const genId =
|
|
14040
|
+
const genId = useId9();
|
|
14002
14041
|
const usedId = id ?? genId;
|
|
14003
14042
|
return /* @__PURE__ */ jsxs36(
|
|
14004
14043
|
"div",
|
|
@@ -14113,7 +14152,7 @@ var TableFilters = {
|
|
|
14113
14152
|
};
|
|
14114
14153
|
|
|
14115
14154
|
// src/components/table/Table.tsx
|
|
14116
|
-
import { useCallback as useCallback16, useEffect as useEffect32, useMemo as
|
|
14155
|
+
import { useCallback as useCallback16, useEffect as useEffect32, useMemo as useMemo10, useRef as useRef20, useState as useState29 } from "react";
|
|
14117
14156
|
import clsx48 from "clsx";
|
|
14118
14157
|
import {
|
|
14119
14158
|
flexRender,
|
|
@@ -14317,7 +14356,7 @@ var useOutsideClick = (refs, handler) => {
|
|
|
14317
14356
|
};
|
|
14318
14357
|
|
|
14319
14358
|
// src/components/user-action/Menu.tsx
|
|
14320
|
-
import { Fragment as
|
|
14359
|
+
import { Fragment as Fragment10, jsx as jsx65, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
14321
14360
|
var MenuItem = ({
|
|
14322
14361
|
children,
|
|
14323
14362
|
onClick,
|
|
@@ -14393,7 +14432,7 @@ var Menu = ({
|
|
|
14393
14432
|
setIsHidden(false);
|
|
14394
14433
|
}
|
|
14395
14434
|
}, [isOpen]);
|
|
14396
|
-
return /* @__PURE__ */ jsxs37(
|
|
14435
|
+
return /* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
14397
14436
|
trigger(bag, triggerRef),
|
|
14398
14437
|
createPortal4(/* @__PURE__ */ jsx65(
|
|
14399
14438
|
"div",
|
|
@@ -14425,7 +14464,7 @@ var Menu = ({
|
|
|
14425
14464
|
|
|
14426
14465
|
// src/components/table/TableFilterButton.tsx
|
|
14427
14466
|
import { useEffect as useEffect31, useState as useState28 } from "react";
|
|
14428
|
-
import { Fragment as
|
|
14467
|
+
import { Fragment as Fragment11, jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
14429
14468
|
var defaultTableFilterTranslation = {
|
|
14430
14469
|
en: {
|
|
14431
14470
|
filter: "Filter",
|
|
@@ -14509,7 +14548,7 @@ var TableFilterButton = ({
|
|
|
14509
14548
|
}
|
|
14510
14549
|
)
|
|
14511
14550
|
] }),
|
|
14512
|
-
filterType === "dateRange" && /* @__PURE__ */ jsxs38(
|
|
14551
|
+
filterType === "dateRange" && /* @__PURE__ */ jsxs38(Fragment11, { children: [
|
|
14513
14552
|
/* @__PURE__ */ jsx66(
|
|
14514
14553
|
Input,
|
|
14515
14554
|
{
|
|
@@ -14581,7 +14620,7 @@ var Table = ({
|
|
|
14581
14620
|
...initialState?.pagination
|
|
14582
14621
|
});
|
|
14583
14622
|
const [columnFilters, setColumnFilters] = useState29(initialState?.columnFilters);
|
|
14584
|
-
const computedColumnMinWidths =
|
|
14623
|
+
const computedColumnMinWidths = useMemo10(() => {
|
|
14585
14624
|
return columns.reduce((previousValue, column) => {
|
|
14586
14625
|
return {
|
|
14587
14626
|
...previousValue,
|
|
@@ -14590,7 +14629,7 @@ var Table = ({
|
|
|
14590
14629
|
};
|
|
14591
14630
|
}, {});
|
|
14592
14631
|
}, [columns, defaultColumn]);
|
|
14593
|
-
const computedColumnMaxWidths =
|
|
14632
|
+
const computedColumnMaxWidths = useMemo10(() => {
|
|
14594
14633
|
return columns.reduce((previousValue, column) => {
|
|
14595
14634
|
return {
|
|
14596
14635
|
...previousValue,
|
|
@@ -14598,12 +14637,12 @@ var Table = ({
|
|
|
14598
14637
|
};
|
|
14599
14638
|
}, {});
|
|
14600
14639
|
}, [columns, defaultColumn]);
|
|
14601
|
-
const tableMinWidth =
|
|
14640
|
+
const tableMinWidth = useMemo10(() => {
|
|
14602
14641
|
return columns.reduce((sum, column) => {
|
|
14603
14642
|
return sum + computedColumnMinWidths[column.id];
|
|
14604
14643
|
}, 0);
|
|
14605
14644
|
}, [columns, computedColumnMinWidths]);
|
|
14606
|
-
const updateColumnSizes =
|
|
14645
|
+
const updateColumnSizes = useMemo10(() => {
|
|
14607
14646
|
return (previous) => {
|
|
14608
14647
|
const updateSizing = {
|
|
14609
14648
|
...columnSizing,
|
|
@@ -14747,7 +14786,7 @@ var Table = ({
|
|
|
14747
14786
|
}));
|
|
14748
14787
|
}
|
|
14749
14788
|
}, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
|
|
14750
|
-
const columnSizeVars =
|
|
14789
|
+
const columnSizeVars = useMemo10(() => {
|
|
14751
14790
|
const headers = table.getFlatHeaders();
|
|
14752
14791
|
const colSizes = {};
|
|
14753
14792
|
for (let i = 0; i < headers.length; i++) {
|
|
@@ -14882,7 +14921,7 @@ var TableWithSelection = ({
|
|
|
14882
14921
|
meta,
|
|
14883
14922
|
...props
|
|
14884
14923
|
}) => {
|
|
14885
|
-
const columnsWithSelection =
|
|
14924
|
+
const columnsWithSelection = useMemo10(() => {
|
|
14886
14925
|
return [
|
|
14887
14926
|
{
|
|
14888
14927
|
id: selectionRowId,
|
|
@@ -15402,7 +15441,7 @@ var Tooltip = ({
|
|
|
15402
15441
|
};
|
|
15403
15442
|
|
|
15404
15443
|
// src/components/user-action/input/InsideLabelInput.tsx
|
|
15405
|
-
import { useId as
|
|
15444
|
+
import { useId as useId10 } from "react";
|
|
15406
15445
|
import { forwardRef as forwardRef14, useState as useState32 } from "react";
|
|
15407
15446
|
import clsx54 from "clsx";
|
|
15408
15447
|
import { jsx as jsx73, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
@@ -15413,7 +15452,7 @@ var InsideLabelInput = forwardRef14(function InsideLabelInput2({
|
|
|
15413
15452
|
}, forwardedRef) {
|
|
15414
15453
|
const { value } = props;
|
|
15415
15454
|
const [isFocused, setIsFocused] = useState32(false);
|
|
15416
|
-
const generatedId =
|
|
15455
|
+
const generatedId = useId10();
|
|
15417
15456
|
const id = customId ?? generatedId;
|
|
15418
15457
|
return /* @__PURE__ */ jsxs45("div", { className: clsx54("relative"), children: [
|
|
15419
15458
|
/* @__PURE__ */ jsx73(
|
|
@@ -15661,7 +15700,7 @@ var useRerender = () => {
|
|
|
15661
15700
|
};
|
|
15662
15701
|
|
|
15663
15702
|
// src/hooks/useSearch.ts
|
|
15664
|
-
import { useCallback as useCallback18, useEffect as useEffect38, useMemo as
|
|
15703
|
+
import { useCallback as useCallback18, useEffect as useEffect38, useMemo as useMemo11, useState as useState35 } from "react";
|
|
15665
15704
|
|
|
15666
15705
|
// src/utils/simpleSearch.ts
|
|
15667
15706
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -15702,7 +15741,7 @@ var useSearch = ({
|
|
|
15702
15741
|
}) => {
|
|
15703
15742
|
const [search, setSearch] = useState35(initialSearch ?? "");
|
|
15704
15743
|
const [result, setResult] = useState35(list);
|
|
15705
|
-
const searchTags =
|
|
15744
|
+
const searchTags = useMemo11(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
15706
15745
|
const updateSearch = useCallback18((newSearch) => {
|
|
15707
15746
|
const usedSearch = newSearch ?? search;
|
|
15708
15747
|
if (newSearch) {
|
|
@@ -15715,19 +15754,19 @@ var useSearch = ({
|
|
|
15715
15754
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
15716
15755
|
}
|
|
15717
15756
|
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
15718
|
-
const filteredResult =
|
|
15757
|
+
const filteredResult = useMemo11(() => {
|
|
15719
15758
|
if (!filter) {
|
|
15720
15759
|
return result;
|
|
15721
15760
|
}
|
|
15722
15761
|
return result.filter(filter);
|
|
15723
15762
|
}, [result, filter]);
|
|
15724
|
-
const sortedAndFilteredResult =
|
|
15763
|
+
const sortedAndFilteredResult = useMemo11(() => {
|
|
15725
15764
|
if (!sortingFunction) {
|
|
15726
15765
|
return filteredResult;
|
|
15727
15766
|
}
|
|
15728
15767
|
return filteredResult.sort(sortingFunction);
|
|
15729
15768
|
}, [filteredResult, sortingFunction]);
|
|
15730
|
-
const usedResult =
|
|
15769
|
+
const usedResult = useMemo11(() => {
|
|
15731
15770
|
if (!disabled) {
|
|
15732
15771
|
return sortedAndFilteredResult;
|
|
15733
15772
|
}
|