@helpwave/hightide 0.1.2 → 0.1.4
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/coloring/shading.cjs +42 -20
- package/dist/coloring/shading.cjs.map +1 -1
- package/dist/coloring/shading.js +51 -29
- package/dist/coloring/shading.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.cjs +2 -2
- package/dist/components/branding/HelpwaveBadge.cjs.map +1 -1
- package/dist/components/branding/HelpwaveBadge.js +2 -2
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/date/DatePicker.cjs +36 -15
- package/dist/components/date/DatePicker.cjs.map +1 -1
- package/dist/components/date/DatePicker.js +43 -22
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.cjs +30 -9
- package/dist/components/date/YearMonthPicker.cjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +36 -15
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.cjs +6 -6
- package/dist/components/dialogs/ConfirmDialog.cjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js +6 -6
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.cjs +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.cjs.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.cjs +37 -9
- package/dist/components/layout-and-navigation/Expandable.cjs.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.d.cts +20 -3
- package/dist/components/layout-and-navigation/Expandable.d.ts +20 -3
- package/dist/components/layout-and-navigation/Expandable.js +36 -9
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.cjs +34 -8
- package/dist/components/layout-and-navigation/FAQSection.cjs.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.d.cts +1 -1
- package/dist/components/layout-and-navigation/FAQSection.d.ts +1 -1
- package/dist/components/layout-and-navigation/FAQSection.js +35 -9
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.cjs +3 -3
- package/dist/components/layout-and-navigation/Overlay.cjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +3 -3
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.cjs +50 -22
- package/dist/components/layout-and-navigation/StepperBar.cjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.d.cts +10 -7
- package/dist/components/layout-and-navigation/StepperBar.d.ts +10 -7
- package/dist/components/layout-and-navigation/StepperBar.js +48 -21
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/Table.cjs +3 -3
- package/dist/components/layout-and-navigation/Table.cjs.map +1 -1
- package/dist/components/layout-and-navigation/Table.js +3 -3
- package/dist/components/layout-and-navigation/Table.js.map +1 -1
- package/dist/components/layout-and-navigation/Tile.cjs +2 -2
- package/dist/components/layout-and-navigation/Tile.cjs.map +1 -1
- package/dist/components/layout-and-navigation/Tile.js +2 -2
- package/dist/components/layout-and-navigation/Tile.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.cjs +3 -3
- package/dist/components/loading-states/LoadingButton.cjs.map +1 -1
- package/dist/components/loading-states/LoadingButton.js +3 -3
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/modals/ConfirmModal.cjs +6 -6
- package/dist/components/modals/ConfirmModal.cjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +6 -6
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.cjs +6 -6
- package/dist/components/modals/DiscardChangesModal.cjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +6 -6
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/InputModal.cjs +44 -29
- package/dist/components/modals/InputModal.cjs.map +1 -1
- package/dist/components/modals/InputModal.d.cts +2 -2
- package/dist/components/modals/InputModal.d.ts +2 -2
- package/dist/components/modals/InputModal.js +44 -29
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.cjs +6 -6
- package/dist/components/modals/LanguageModal.cjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +6 -6
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.cjs +6 -6
- package/dist/components/modals/ThemeModal.cjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +6 -6
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.cjs +3 -3
- package/dist/components/properties/CheckboxProperty.cjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +3 -3
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.cjs +3 -3
- package/dist/components/properties/DateProperty.cjs.map +1 -1
- package/dist/components/properties/DateProperty.js +3 -3
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.cjs +3 -3
- package/dist/components/properties/MultiSelectProperty.cjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +3 -3
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.cjs +3 -3
- package/dist/components/properties/NumberProperty.cjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +3 -3
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/PropertyBase.cjs +3 -3
- package/dist/components/properties/PropertyBase.cjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +3 -3
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/SelectProperty.cjs +3 -3
- package/dist/components/properties/SelectProperty.cjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +3 -3
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.cjs +3 -3
- package/dist/components/properties/TextProperty.cjs.map +1 -1
- package/dist/components/properties/TextProperty.js +3 -3
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/user-action/Button.cjs +12 -12
- package/dist/components/user-action/Button.cjs.map +1 -1
- package/dist/components/user-action/Button.js +12 -12
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.cjs +36 -15
- package/dist/components/user-action/DateAndTimePicker.cjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +42 -21
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/css/globals.css +0 -6
- package/dist/index.cjs +140 -89
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +156 -107
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -56,8 +56,8 @@ var Tile = ({
|
|
|
56
56
|
}) => {
|
|
57
57
|
return /* @__PURE__ */ jsxs("div", { className: clsx("row gap-x-4 w-full items-center", className), children: [
|
|
58
58
|
prefix,
|
|
59
|
-
/* @__PURE__ */ jsxs("div", { className: "col w-full", children: [
|
|
60
|
-
/* @__PURE__ */ jsx("
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "col gap-y-0 w-full", children: [
|
|
60
|
+
/* @__PURE__ */ jsx("h4", { className: clsx(title.className ?? "textstyle-title-normal"), children: title.value }),
|
|
61
61
|
!!description && /* @__PURE__ */ jsx("span", { className: clsx(description.className ?? "textstyle-description"), children: description.value })
|
|
62
62
|
] }),
|
|
63
63
|
suffix
|
|
@@ -178,7 +178,7 @@ var HelpwaveBadge = ({
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
// src/components/date/DatePicker.tsx
|
|
181
|
-
import { useEffect as
|
|
181
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
182
182
|
import { ArrowDown, ArrowUp, ChevronDown as ChevronDown2 } from "lucide-react";
|
|
183
183
|
|
|
184
184
|
// src/localization/LanguageProvider.tsx
|
|
@@ -595,12 +595,12 @@ var SolidButton = ({
|
|
|
595
595
|
onClick: disabled ? void 0 : onClick,
|
|
596
596
|
disabled: disabled || onClick === void 0,
|
|
597
597
|
className: clsx4(
|
|
598
|
-
className,
|
|
599
598
|
{
|
|
600
|
-
"text-disabled-text bg-disabled-background": disabled,
|
|
599
|
+
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
601
600
|
[clsx4(colorClasses, "hover:brightness-90")]: !disabled
|
|
602
601
|
},
|
|
603
|
-
ButtonUtil.paddingMapping[size]
|
|
602
|
+
ButtonUtil.paddingMapping[size],
|
|
603
|
+
className
|
|
604
604
|
),
|
|
605
605
|
...restProps,
|
|
606
606
|
children: [
|
|
@@ -652,12 +652,12 @@ var OutlineButton = ({
|
|
|
652
652
|
onClick: disabled ? void 0 : onClick,
|
|
653
653
|
disabled: disabled || onClick === void 0,
|
|
654
654
|
className: clsx4(
|
|
655
|
-
className,
|
|
656
655
|
{
|
|
657
|
-
"text-disabled-text border-disabled-outline": disabled,
|
|
656
|
+
"text-disabled-text border-disabled-outline cursor-not-allowed": disabled,
|
|
658
657
|
[clsx4(colorClasses, "hover:brightness-80")]: !disabled
|
|
659
658
|
},
|
|
660
|
-
ButtonUtil.paddingMapping[size]
|
|
659
|
+
ButtonUtil.paddingMapping[size],
|
|
660
|
+
className
|
|
661
661
|
),
|
|
662
662
|
...restProps,
|
|
663
663
|
children: [
|
|
@@ -713,12 +713,12 @@ var TextButton = ({
|
|
|
713
713
|
onClick: disabled ? void 0 : onClick,
|
|
714
714
|
disabled: disabled || onClick === void 0,
|
|
715
715
|
className: clsx4(
|
|
716
|
-
className,
|
|
717
716
|
{
|
|
718
|
-
"text-disabled-text": disabled,
|
|
717
|
+
"text-disabled-text cursor-not-allowed": disabled,
|
|
719
718
|
[clsx4(colorClasses, "hover:bg-button-text-hover-background rounded-full")]: !disabled
|
|
720
719
|
},
|
|
721
|
-
ButtonUtil.paddingMapping[size]
|
|
720
|
+
ButtonUtil.paddingMapping[size],
|
|
721
|
+
className
|
|
722
722
|
),
|
|
723
723
|
...restProps,
|
|
724
724
|
children: [
|
|
@@ -771,12 +771,12 @@ var IconButton = ({
|
|
|
771
771
|
onClick: disabled ? void 0 : onClick,
|
|
772
772
|
disabled: disabled || onClick === void 0,
|
|
773
773
|
className: clsx4(
|
|
774
|
-
className,
|
|
775
774
|
{
|
|
776
|
-
"text-disabled-text bg-disabled-background": disabled,
|
|
775
|
+
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
777
776
|
[clsx4(colorClasses, "hover:brightness-90")]: !disabled
|
|
778
777
|
},
|
|
779
|
-
ButtonUtil.iconPaddingMapping[size]
|
|
778
|
+
ButtonUtil.iconPaddingMapping[size],
|
|
779
|
+
className
|
|
780
780
|
),
|
|
781
781
|
...restProps,
|
|
782
782
|
children
|
|
@@ -785,34 +785,34 @@ var IconButton = ({
|
|
|
785
785
|
};
|
|
786
786
|
|
|
787
787
|
// src/components/date/YearMonthPicker.tsx
|
|
788
|
-
import { useEffect as
|
|
788
|
+
import { useEffect as useEffect4, useRef, useState as useState4 } from "react";
|
|
789
789
|
import { Scrollbars } from "react-custom-scrollbars-2";
|
|
790
790
|
import clsx6 from "clsx";
|
|
791
791
|
|
|
792
792
|
// src/components/layout-and-navigation/Expandable.tsx
|
|
793
|
-
import { forwardRef, useState as useState3 } from "react";
|
|
793
|
+
import { forwardRef, useEffect as useEffect3, useState as useState3 } from "react";
|
|
794
794
|
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
795
795
|
import clsx5 from "clsx";
|
|
796
796
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
797
797
|
var DefaultIcon = (expanded) => expanded ? /* @__PURE__ */ jsx6(ChevronUp, { size: 16, className: "min-w-[16px]" }) : /* @__PURE__ */ jsx6(ChevronDown, { size: 16, className: "min-w-[16px]" });
|
|
798
|
-
var Expandable = forwardRef(({
|
|
798
|
+
var Expandable = forwardRef(function Expandable2({
|
|
799
799
|
children,
|
|
800
800
|
label,
|
|
801
801
|
icon,
|
|
802
|
-
|
|
802
|
+
isExpanded = false,
|
|
803
|
+
onChange = noop,
|
|
803
804
|
clickOnlyOnHeader = true,
|
|
804
805
|
disabled = false,
|
|
805
806
|
className = "",
|
|
806
807
|
headerClassName = ""
|
|
807
|
-
}, ref)
|
|
808
|
-
const [isExpanded, setIsExpanded] = useState3(initialExpansion);
|
|
808
|
+
}, ref) {
|
|
809
809
|
icon ??= DefaultIcon;
|
|
810
810
|
return /* @__PURE__ */ jsxs4(
|
|
811
811
|
"div",
|
|
812
812
|
{
|
|
813
813
|
ref,
|
|
814
814
|
className: clsx5("col gap-y-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
|
|
815
|
-
onClick: () => !clickOnlyOnHeader && !disabled &&
|
|
815
|
+
onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
816
816
|
children: [
|
|
817
817
|
/* @__PURE__ */ jsxs4(
|
|
818
818
|
"div",
|
|
@@ -826,7 +826,7 @@ var Expandable = forwardRef(({
|
|
|
826
826
|
},
|
|
827
827
|
headerClassName
|
|
828
828
|
),
|
|
829
|
-
onClick: () => clickOnlyOnHeader && !disabled &&
|
|
829
|
+
onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
830
830
|
children: [
|
|
831
831
|
label,
|
|
832
832
|
icon(isExpanded)
|
|
@@ -838,7 +838,28 @@ var Expandable = forwardRef(({
|
|
|
838
838
|
}
|
|
839
839
|
);
|
|
840
840
|
});
|
|
841
|
-
|
|
841
|
+
var ExpandableUncontrolled = forwardRef(function ExpandableUncontrolled2({
|
|
842
|
+
isExpanded,
|
|
843
|
+
onChange = noop,
|
|
844
|
+
...props
|
|
845
|
+
}, ref) {
|
|
846
|
+
const [usedIsExpanded, setUsedIsExpanded] = useState3(isExpanded);
|
|
847
|
+
useEffect3(() => {
|
|
848
|
+
setUsedIsExpanded(isExpanded);
|
|
849
|
+
}, [isExpanded]);
|
|
850
|
+
return /* @__PURE__ */ jsx6(
|
|
851
|
+
Expandable,
|
|
852
|
+
{
|
|
853
|
+
...props,
|
|
854
|
+
ref,
|
|
855
|
+
isExpanded: usedIsExpanded,
|
|
856
|
+
onChange: (value) => {
|
|
857
|
+
onChange(value);
|
|
858
|
+
setUsedIsExpanded(value);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
);
|
|
862
|
+
});
|
|
842
863
|
|
|
843
864
|
// src/components/date/YearMonthPicker.tsx
|
|
844
865
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
@@ -853,7 +874,7 @@ var YearMonthPicker = ({
|
|
|
853
874
|
}) => {
|
|
854
875
|
const locale = useLocale();
|
|
855
876
|
const ref = useRef(null);
|
|
856
|
-
|
|
877
|
+
useEffect4(() => {
|
|
857
878
|
const scrollToItem = () => {
|
|
858
879
|
if (ref.current) {
|
|
859
880
|
ref.current.scrollIntoView({
|
|
@@ -872,11 +893,11 @@ var YearMonthPicker = ({
|
|
|
872
893
|
return /* @__PURE__ */ jsx7("div", { className: clsx6("col select-none", className), children: /* @__PURE__ */ jsx7(Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ jsx7("div", { className: "col gap-y-1 mr-3", children: years.map((year) => {
|
|
873
894
|
const selectedYear = displayedYearMonth.getFullYear() === year;
|
|
874
895
|
return /* @__PURE__ */ jsx7(
|
|
875
|
-
|
|
896
|
+
ExpandableUncontrolled,
|
|
876
897
|
{
|
|
877
898
|
ref: (displayedYearMonth.getFullYear() ?? (/* @__PURE__ */ new Date()).getFullYear()) === year ? ref : void 0,
|
|
878
899
|
label: /* @__PURE__ */ jsx7("span", { className: clsx6({ "text-primary font-bold": selectedYear }), children: year }),
|
|
879
|
-
|
|
900
|
+
isExpanded: showValueOpen && selectedYear,
|
|
880
901
|
children: /* @__PURE__ */ jsx7("div", { className: "col gap-y-1 px-2 pb-2", children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx7("div", { className: "row", children: monthList.map((month) => {
|
|
881
902
|
const monthIndex = monthsList.indexOf(month);
|
|
882
903
|
const newDate = new Date(year, monthIndex);
|
|
@@ -917,7 +938,7 @@ var YearMonthPickerUncontrolled = ({
|
|
|
917
938
|
...props
|
|
918
939
|
}) => {
|
|
919
940
|
const [yearMonth, setYearMonth] = useState4(displayedYearMonth);
|
|
920
|
-
|
|
941
|
+
useEffect4(() => setYearMonth(displayedYearMonth), [displayedYearMonth]);
|
|
921
942
|
return /* @__PURE__ */ jsx7(
|
|
922
943
|
YearMonthPicker,
|
|
923
944
|
{
|
|
@@ -933,7 +954,7 @@ var YearMonthPickerUncontrolled = ({
|
|
|
933
954
|
|
|
934
955
|
// src/components/date/DayPicker.tsx
|
|
935
956
|
import clsx7 from "clsx";
|
|
936
|
-
import { useEffect as
|
|
957
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
937
958
|
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
938
959
|
var DayPicker = ({
|
|
939
960
|
displayedMonth,
|
|
@@ -980,7 +1001,7 @@ var DayPicker = ({
|
|
|
980
1001
|
};
|
|
981
1002
|
var DayPickerUncontrolled = ({ displayedMonth, onChange = noop, ...restProps }) => {
|
|
982
1003
|
const [date, setDate] = useState5(displayedMonth);
|
|
983
|
-
|
|
1004
|
+
useEffect5(() => setDate(displayedMonth), [displayedMonth]);
|
|
984
1005
|
return /* @__PURE__ */ jsx8(
|
|
985
1006
|
DayPicker,
|
|
986
1007
|
{
|
|
@@ -1019,7 +1040,7 @@ var DatePicker = ({
|
|
|
1019
1040
|
const translation = useTranslation(defaultDatePickerTranslation, overwriteTranslation);
|
|
1020
1041
|
const [displayedMonth, setDisplayedMonth] = useState6(value);
|
|
1021
1042
|
const [displayMode, setDisplayMode] = useState6(initialDisplay);
|
|
1022
|
-
|
|
1043
|
+
useEffect6(() => {
|
|
1023
1044
|
setDisplayedMonth(value);
|
|
1024
1045
|
}, [value]);
|
|
1025
1046
|
return /* @__PURE__ */ jsxs6("div", { className: clsx8("col gap-y-4", className), children: [
|
|
@@ -1110,7 +1131,7 @@ var DatePickerUncontrolled = ({
|
|
|
1110
1131
|
...props
|
|
1111
1132
|
}) => {
|
|
1112
1133
|
const [date, setDate] = useState6(value);
|
|
1113
|
-
|
|
1134
|
+
useEffect6(() => setDate(value), [value]);
|
|
1114
1135
|
return /* @__PURE__ */ jsx9(
|
|
1115
1136
|
DatePicker,
|
|
1116
1137
|
{
|
|
@@ -1207,7 +1228,7 @@ var TimeDisplay = ({
|
|
|
1207
1228
|
};
|
|
1208
1229
|
|
|
1209
1230
|
// src/components/date/TimePicker.tsx
|
|
1210
|
-
import { useEffect as
|
|
1231
|
+
import { useEffect as useEffect7, useRef as useRef2, useState as useState7 } from "react";
|
|
1211
1232
|
import { Scrollbars as Scrollbars2 } from "react-custom-scrollbars-2";
|
|
1212
1233
|
import clsx9 from "clsx";
|
|
1213
1234
|
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -1224,7 +1245,7 @@ var TimePicker = ({
|
|
|
1224
1245
|
const isPM = time.getHours() >= 11;
|
|
1225
1246
|
const hours = is24HourFormat ? range(0, 23) : range(1, 12);
|
|
1226
1247
|
let minutes = range(0, 59);
|
|
1227
|
-
|
|
1248
|
+
useEffect7(() => {
|
|
1228
1249
|
const scrollToItem = () => {
|
|
1229
1250
|
if (minuteRef.current) {
|
|
1230
1251
|
const container = minuteRef.current.parentElement;
|
|
@@ -1239,7 +1260,7 @@ var TimePicker = ({
|
|
|
1239
1260
|
};
|
|
1240
1261
|
scrollToItem();
|
|
1241
1262
|
}, [minuteRef, minuteRef.current]);
|
|
1242
|
-
|
|
1263
|
+
useEffect7(() => {
|
|
1243
1264
|
const scrollToItem = () => {
|
|
1244
1265
|
if (hourRef.current) {
|
|
1245
1266
|
const container = hourRef.current.parentElement;
|
|
@@ -1331,7 +1352,7 @@ var TimePickerUncontrolled = ({
|
|
|
1331
1352
|
...props
|
|
1332
1353
|
}) => {
|
|
1333
1354
|
const [value, setValue] = useState7(time);
|
|
1334
|
-
|
|
1355
|
+
useEffect7(() => setValue(time), [time]);
|
|
1335
1356
|
return /* @__PURE__ */ jsx11(
|
|
1336
1357
|
TimePicker,
|
|
1337
1358
|
{
|
|
@@ -1349,12 +1370,12 @@ var TimePickerUncontrolled = ({
|
|
|
1349
1370
|
import clsx12 from "clsx";
|
|
1350
1371
|
|
|
1351
1372
|
// src/components/layout-and-navigation/Overlay.tsx
|
|
1352
|
-
import { useEffect as
|
|
1373
|
+
import { useEffect as useEffect9, useRef as useRef3, useState as useState9 } from "react";
|
|
1353
1374
|
import ReactDOM from "react-dom";
|
|
1354
1375
|
import clsx11 from "clsx";
|
|
1355
1376
|
|
|
1356
1377
|
// src/hooks/useHoverState.ts
|
|
1357
|
-
import { useEffect as
|
|
1378
|
+
import { useEffect as useEffect8, useState as useState8 } from "react";
|
|
1358
1379
|
var defaultUseHoverStateProps = {
|
|
1359
1380
|
closingDelay: 200,
|
|
1360
1381
|
isDisabled: false
|
|
@@ -1378,14 +1399,14 @@ var useHoverState = (props = void 0) => {
|
|
|
1378
1399
|
setIsHovered(false);
|
|
1379
1400
|
}, closingDelay));
|
|
1380
1401
|
};
|
|
1381
|
-
|
|
1402
|
+
useEffect8(() => {
|
|
1382
1403
|
if (timer) {
|
|
1383
1404
|
return () => {
|
|
1384
1405
|
clearTimeout(timer);
|
|
1385
1406
|
};
|
|
1386
1407
|
}
|
|
1387
1408
|
});
|
|
1388
|
-
|
|
1409
|
+
useEffect8(() => {
|
|
1389
1410
|
if (timer) {
|
|
1390
1411
|
clearTimeout(timer);
|
|
1391
1412
|
}
|
|
@@ -1473,7 +1494,7 @@ var Overlay = ({
|
|
|
1473
1494
|
backgroundClassName
|
|
1474
1495
|
}) => {
|
|
1475
1496
|
const [root, setRoot] = useState9();
|
|
1476
|
-
|
|
1497
|
+
useEffect9(() => {
|
|
1477
1498
|
setRoot(document.body);
|
|
1478
1499
|
}, []);
|
|
1479
1500
|
if (!root || !isOpen) return null;
|
|
@@ -1536,7 +1557,7 @@ var Modal = ({
|
|
|
1536
1557
|
headerProps
|
|
1537
1558
|
}) => {
|
|
1538
1559
|
const ref = useRef3(null);
|
|
1539
|
-
|
|
1560
|
+
useEffect9(() => {
|
|
1540
1561
|
if (!isOpen) return;
|
|
1541
1562
|
const modal = ref.current;
|
|
1542
1563
|
if (!modal) {
|
|
@@ -1607,7 +1628,7 @@ var Dialog = ({
|
|
|
1607
1628
|
headerProps
|
|
1608
1629
|
}) => {
|
|
1609
1630
|
const ref = useRef3(null);
|
|
1610
|
-
|
|
1631
|
+
useEffect9(() => {
|
|
1611
1632
|
if (!isOpen) return;
|
|
1612
1633
|
const dialog = ref.current;
|
|
1613
1634
|
if (!dialog) {
|
|
@@ -1825,7 +1846,7 @@ var Circle = ({
|
|
|
1825
1846
|
};
|
|
1826
1847
|
|
|
1827
1848
|
// src/components/icons-and-geometry/Ring.tsx
|
|
1828
|
-
import { useCallback as useCallback2, useEffect as
|
|
1849
|
+
import { useCallback as useCallback2, useEffect as useEffect10, useState as useState10 } from "react";
|
|
1829
1850
|
import clsx15 from "clsx";
|
|
1830
1851
|
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1831
1852
|
var Ring = ({
|
|
@@ -1870,7 +1891,7 @@ var AnimatedRing = ({
|
|
|
1870
1891
|
}
|
|
1871
1892
|
}
|
|
1872
1893
|
}, [milliseconds, onAnimationFinished, repeating, width]);
|
|
1873
|
-
|
|
1894
|
+
useEffect10(() => {
|
|
1874
1895
|
if (currentWidth < width) {
|
|
1875
1896
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
1876
1897
|
}
|
|
@@ -1925,7 +1946,7 @@ var RingWave = ({
|
|
|
1925
1946
|
}
|
|
1926
1947
|
}
|
|
1927
1948
|
}, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
|
|
1928
|
-
|
|
1949
|
+
useEffect10(() => {
|
|
1929
1950
|
if (currentInnerSize < endInnerSize) {
|
|
1930
1951
|
requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
|
|
1931
1952
|
}
|
|
@@ -2116,7 +2137,7 @@ import clsx16 from "clsx";
|
|
|
2116
2137
|
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2117
2138
|
var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
2118
2139
|
const color = "text-description";
|
|
2119
|
-
return /* @__PURE__ */ jsx19("div", { className: clsx16("row", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
2140
|
+
return /* @__PURE__ */ jsx19("div", { className: clsx16("row gap-x-0", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ jsxs13("div", { children: [
|
|
2120
2141
|
/* @__PURE__ */ jsx19(
|
|
2121
2142
|
Link,
|
|
2122
2143
|
{
|
|
@@ -2130,7 +2151,7 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
2130
2151
|
};
|
|
2131
2152
|
|
|
2132
2153
|
// src/components/layout-and-navigation/Carousel.tsx
|
|
2133
|
-
import { useCallback as useCallback3, useEffect as
|
|
2154
|
+
import { useCallback as useCallback3, useEffect as useEffect11, useMemo, useRef as useRef4, useState as useState11 } from "react";
|
|
2134
2155
|
import clsx17 from "clsx";
|
|
2135
2156
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
2136
2157
|
|
|
@@ -2323,7 +2344,7 @@ var Carousel = ({
|
|
|
2323
2344
|
animationId.current = requestAnimationFrame((time1) => animation(time1));
|
|
2324
2345
|
}
|
|
2325
2346
|
}, [animationTime, autoLoopAnimationTime, util]);
|
|
2326
|
-
|
|
2347
|
+
useEffect11(() => {
|
|
2327
2348
|
if (animationState) {
|
|
2328
2349
|
animationId.current = requestAnimationFrame(animation);
|
|
2329
2350
|
}
|
|
@@ -2345,7 +2366,7 @@ var Carousel = ({
|
|
|
2345
2366
|
isAutoLooping: true
|
|
2346
2367
|
}
|
|
2347
2368
|
}));
|
|
2348
|
-
|
|
2369
|
+
useEffect11(() => {
|
|
2349
2370
|
if (!animationId.current && !animationState && !dragState && !timeOut.current) {
|
|
2350
2371
|
if (autoLoopingTimeOut > 0) {
|
|
2351
2372
|
timeOut.current = setTimeout(() => {
|
|
@@ -2876,7 +2897,7 @@ var FAQSection = ({
|
|
|
2876
2897
|
}) => {
|
|
2877
2898
|
const chevronSize = 28;
|
|
2878
2899
|
return /* @__PURE__ */ jsx24("div", { className: "col gap-y-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ jsx24(
|
|
2879
|
-
|
|
2900
|
+
ExpandableUncontrolled,
|
|
2880
2901
|
{
|
|
2881
2902
|
...restProps,
|
|
2882
2903
|
label: /* @__PURE__ */ jsx24("h3", { id, className: "textstyle-title-md", children: title }),
|
|
@@ -2928,7 +2949,7 @@ var Pagination = ({
|
|
|
2928
2949
|
};
|
|
2929
2950
|
|
|
2930
2951
|
// src/components/layout-and-navigation/SearchableList.tsx
|
|
2931
|
-
import { useEffect as
|
|
2952
|
+
import { useEffect as useEffect14, useMemo as useMemo2, useState as useState14 } from "react";
|
|
2932
2953
|
import { Search } from "lucide-react";
|
|
2933
2954
|
import clsx24 from "clsx";
|
|
2934
2955
|
|
|
@@ -2953,11 +2974,11 @@ var SimpleSearch = (search, objects) => {
|
|
|
2953
2974
|
};
|
|
2954
2975
|
|
|
2955
2976
|
// src/components/user-action/Input.tsx
|
|
2956
|
-
import { forwardRef as forwardRef2, useEffect as
|
|
2977
|
+
import { forwardRef as forwardRef2, useEffect as useEffect13, useRef as useRef5, useState as useState13 } from "react";
|
|
2957
2978
|
import clsx23 from "clsx";
|
|
2958
2979
|
|
|
2959
2980
|
// src/hooks/useSaveDelay.ts
|
|
2960
|
-
import { useEffect as
|
|
2981
|
+
import { useEffect as useEffect12, useState as useState12 } from "react";
|
|
2961
2982
|
function useSaveDelay(setNotificationStatus, delay) {
|
|
2962
2983
|
const [updateTimer, setUpdateTimer] = useState12(void 0);
|
|
2963
2984
|
const [notificationTimer, setNotificationTimer] = useState12(void 0);
|
|
@@ -2987,7 +3008,7 @@ function useSaveDelay(setNotificationStatus, delay) {
|
|
|
2987
3008
|
setNotificationStatus(false);
|
|
2988
3009
|
}
|
|
2989
3010
|
};
|
|
2990
|
-
|
|
3011
|
+
useEffect12(() => {
|
|
2991
3012
|
return () => {
|
|
2992
3013
|
clearTimeout(updateTimer);
|
|
2993
3014
|
clearTimeout(notificationTimer);
|
|
@@ -3036,7 +3057,7 @@ var Input = ({
|
|
|
3036
3057
|
clearUpdateTimer
|
|
3037
3058
|
} = useSaveDelay(() => void 0, 3e3);
|
|
3038
3059
|
const ref = useRef5(null);
|
|
3039
|
-
|
|
3060
|
+
useEffect13(() => {
|
|
3040
3061
|
if (autoFocus) {
|
|
3041
3062
|
ref.current?.focus();
|
|
3042
3063
|
}
|
|
@@ -3152,7 +3173,7 @@ var SearchableList = ({
|
|
|
3152
3173
|
}) => {
|
|
3153
3174
|
const translation = useTranslation(defaultSearchableListTranslation, overwriteTranslation);
|
|
3154
3175
|
const [search, setSearch] = useState14(initialSearch);
|
|
3155
|
-
|
|
3176
|
+
useEffect14(() => setSearch(initialSearch), [initialSearch]);
|
|
3156
3177
|
const filteredEntries = useMemo2(() => MultiSearchWithMapping(search, list, searchMapping), [search, list, searchMapping]);
|
|
3157
3178
|
return /* @__PURE__ */ jsxs18("div", { className: clsx24("col gap-y-2", className), children: [
|
|
3158
3179
|
/* @__PURE__ */ jsxs18("div", { className: "row justify-between gap-x-2 items-center", children: [
|
|
@@ -3167,6 +3188,7 @@ var SearchableList = ({
|
|
|
3167
3188
|
// src/components/layout-and-navigation/StepperBar.tsx
|
|
3168
3189
|
import { Check, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
3169
3190
|
import clsx25 from "clsx";
|
|
3191
|
+
import { useEffect as useEffect15, useState as useState15 } from "react";
|
|
3170
3192
|
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3171
3193
|
var defaultStepperBarTranslation = {
|
|
3172
3194
|
en: {
|
|
@@ -3180,32 +3202,39 @@ var defaultStepperBarTranslation = {
|
|
|
3180
3202
|
confirm: "Erstellen"
|
|
3181
3203
|
}
|
|
3182
3204
|
};
|
|
3205
|
+
var defaultState = {
|
|
3206
|
+
currentStep: 0,
|
|
3207
|
+
seenSteps: /* @__PURE__ */ new Set([0])
|
|
3208
|
+
};
|
|
3183
3209
|
var StepperBar = ({
|
|
3184
3210
|
overwriteTranslation,
|
|
3185
|
-
|
|
3211
|
+
state,
|
|
3212
|
+
numberOfSteps,
|
|
3213
|
+
disabledSteps = /* @__PURE__ */ new Set(),
|
|
3186
3214
|
onChange,
|
|
3187
3215
|
onFinish,
|
|
3216
|
+
finishText,
|
|
3188
3217
|
showDots = true,
|
|
3189
3218
|
className = ""
|
|
3190
3219
|
}) => {
|
|
3191
3220
|
const translation = useTranslation(defaultStepperBarTranslation, overwriteTranslation);
|
|
3192
|
-
const dots = range(0,
|
|
3193
|
-
const {
|
|
3221
|
+
const dots = range(0, numberOfSteps);
|
|
3222
|
+
const { currentStep, seenSteps } = state ?? defaultState;
|
|
3194
3223
|
const update = (newStep) => {
|
|
3195
3224
|
seenSteps.add(newStep);
|
|
3196
|
-
onChange({
|
|
3225
|
+
onChange({ currentStep: newStep, seenSteps });
|
|
3197
3226
|
};
|
|
3198
3227
|
return /* @__PURE__ */ jsxs19(
|
|
3199
3228
|
"div",
|
|
3200
3229
|
{
|
|
3201
|
-
className: clsx25("
|
|
3230
|
+
className: clsx25("row justify-between", className),
|
|
3202
3231
|
children: [
|
|
3203
|
-
/* @__PURE__ */ jsx29("div", { className: "flex-[2] justify-start", children: /* @__PURE__ */ jsxs19(
|
|
3232
|
+
/* @__PURE__ */ jsx29("div", { className: "row flex-[2] justify-start", children: /* @__PURE__ */ jsxs19(
|
|
3204
3233
|
SolidButton,
|
|
3205
3234
|
{
|
|
3206
|
-
disabled:
|
|
3235
|
+
disabled: currentStep === 0 || disabledSteps.has(currentStep),
|
|
3207
3236
|
onClick: () => {
|
|
3208
|
-
update(
|
|
3237
|
+
update(currentStep - 1);
|
|
3209
3238
|
},
|
|
3210
3239
|
className: "row gap-x-1 items-center justify-center",
|
|
3211
3240
|
children: [
|
|
@@ -3223,39 +3252,40 @@ var StepperBar = ({
|
|
|
3223
3252
|
className: clsx25(
|
|
3224
3253
|
"rounded-full w-4 h-4",
|
|
3225
3254
|
{
|
|
3226
|
-
"bg-primary hover:brightness-75": index ===
|
|
3227
|
-
"bg-primary/40 hover:bg-primary": index !==
|
|
3228
|
-
"bg-gray-200 outline-transparent": !seen
|
|
3255
|
+
"bg-primary hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
|
|
3256
|
+
"bg-primary/40 hover:bg-primary": index !== currentStep && seen && !disabledSteps.has(currentStep),
|
|
3257
|
+
"bg-gray-200 outline-transparent": !seen || disabledSteps.has(currentStep)
|
|
3229
3258
|
},
|
|
3230
3259
|
{
|
|
3231
3260
|
"cursor-pointer": seen,
|
|
3232
|
-
"cursor-not-allowed": !seen
|
|
3261
|
+
"cursor-not-allowed": !seen || disabledSteps.has(currentStep)
|
|
3233
3262
|
}
|
|
3234
3263
|
)
|
|
3235
3264
|
},
|
|
3236
3265
|
index
|
|
3237
3266
|
);
|
|
3238
3267
|
}) }),
|
|
3239
|
-
|
|
3268
|
+
currentStep !== numberOfSteps && /* @__PURE__ */ jsx29("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ jsxs19(
|
|
3240
3269
|
SolidButton,
|
|
3241
3270
|
{
|
|
3242
|
-
onClick: () => update(
|
|
3271
|
+
onClick: () => update(currentStep + 1),
|
|
3243
3272
|
className: "row gap-x-1 items-center justify-center",
|
|
3273
|
+
disabled: disabledSteps.has(currentStep),
|
|
3244
3274
|
children: [
|
|
3245
3275
|
translation.next,
|
|
3246
3276
|
/* @__PURE__ */ jsx29(ChevronRight3, { size: 14 })
|
|
3247
3277
|
]
|
|
3248
3278
|
}
|
|
3249
3279
|
) }),
|
|
3250
|
-
|
|
3280
|
+
currentStep === numberOfSteps && /* @__PURE__ */ jsx29("div", { className: "row flex-[2] justify-end", children: /* @__PURE__ */ jsxs19(
|
|
3251
3281
|
SolidButton,
|
|
3252
3282
|
{
|
|
3253
|
-
disabled:
|
|
3283
|
+
disabled: disabledSteps.has(currentStep),
|
|
3254
3284
|
onClick: onFinish,
|
|
3255
3285
|
className: "row gap-x-1 items-center justify-center",
|
|
3256
3286
|
children: [
|
|
3257
3287
|
/* @__PURE__ */ jsx29(Check, { size: 14 }),
|
|
3258
|
-
translation.confirm
|
|
3288
|
+
finishText ?? translation.confirm
|
|
3259
3289
|
]
|
|
3260
3290
|
}
|
|
3261
3291
|
) })
|
|
@@ -3263,13 +3293,30 @@ var StepperBar = ({
|
|
|
3263
3293
|
}
|
|
3264
3294
|
);
|
|
3265
3295
|
};
|
|
3296
|
+
var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
|
|
3297
|
+
const [usedState, setUsedState] = useState15(state ?? defaultState);
|
|
3298
|
+
useEffect15(() => {
|
|
3299
|
+
setUsedState(state ?? defaultState);
|
|
3300
|
+
}, [state]);
|
|
3301
|
+
return /* @__PURE__ */ jsx29(
|
|
3302
|
+
StepperBar,
|
|
3303
|
+
{
|
|
3304
|
+
...props,
|
|
3305
|
+
state: usedState,
|
|
3306
|
+
onChange: (newState) => {
|
|
3307
|
+
setUsedState(newState);
|
|
3308
|
+
onChange(newState);
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
);
|
|
3312
|
+
};
|
|
3266
3313
|
|
|
3267
3314
|
// src/components/layout-and-navigation/Table.tsx
|
|
3268
|
-
import { useEffect as
|
|
3315
|
+
import { useEffect as useEffect16, useRef as useRef6, useState as useState17 } from "react";
|
|
3269
3316
|
import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
|
|
3270
3317
|
|
|
3271
3318
|
// src/components/user-action/Checkbox.tsx
|
|
3272
|
-
import { useState as
|
|
3319
|
+
import { useState as useState16 } from "react";
|
|
3273
3320
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3274
3321
|
import { Check as Check2, Minus } from "lucide-react";
|
|
3275
3322
|
import clsx26 from "clsx";
|
|
@@ -3346,7 +3393,7 @@ var CheckboxUncontrolled = ({
|
|
|
3346
3393
|
defaultValue = false,
|
|
3347
3394
|
...props
|
|
3348
3395
|
}) => {
|
|
3349
|
-
const [checked, setChecked] =
|
|
3396
|
+
const [checked, setChecked] = useState16(defaultValue);
|
|
3350
3397
|
const handleChange = (checked2) => {
|
|
3351
3398
|
if (onChangeTristate) {
|
|
3352
3399
|
onChangeTristate(checked2);
|
|
@@ -3521,7 +3568,7 @@ var Table = ({
|
|
|
3521
3568
|
const headerPaddingHead = "pb-2";
|
|
3522
3569
|
const headerPaddingBody = "pt-2";
|
|
3523
3570
|
const cellPadding = "py-1 px-2";
|
|
3524
|
-
const [scrollbarsAutoHeightMin, setScrollbarsAutoHeightMin] =
|
|
3571
|
+
const [scrollbarsAutoHeightMin, setScrollbarsAutoHeightMin] = useState17(0);
|
|
3525
3572
|
const tableRef = useRef6(null);
|
|
3526
3573
|
const calculateHeight = () => {
|
|
3527
3574
|
if (tableRef.current) {
|
|
@@ -3530,7 +3577,7 @@ var Table = ({
|
|
|
3530
3577
|
setScrollbarsAutoHeightMin(tableHeight + offset);
|
|
3531
3578
|
}
|
|
3532
3579
|
};
|
|
3533
|
-
|
|
3580
|
+
useEffect16(() => {
|
|
3534
3581
|
calculateHeight();
|
|
3535
3582
|
const handleResize = () => {
|
|
3536
3583
|
calculateHeight();
|
|
@@ -3736,7 +3783,7 @@ var ErrorComponent = ({
|
|
|
3736
3783
|
};
|
|
3737
3784
|
|
|
3738
3785
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
3739
|
-
import { useState as
|
|
3786
|
+
import { useState as useState18 } from "react";
|
|
3740
3787
|
|
|
3741
3788
|
// src/components/loading-states/LoadingAnimation.tsx
|
|
3742
3789
|
import clsx30 from "clsx";
|
|
@@ -3771,8 +3818,8 @@ var LoadingAndErrorComponent = ({
|
|
|
3771
3818
|
loadingProps,
|
|
3772
3819
|
minimumLoadingDuration
|
|
3773
3820
|
}) => {
|
|
3774
|
-
const [isInMinimumLoading, setIsInMinimumLoading] =
|
|
3775
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] =
|
|
3821
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = useState18(false);
|
|
3822
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState18(false);
|
|
3776
3823
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
3777
3824
|
setIsInMinimumLoading(true);
|
|
3778
3825
|
setTimeout(() => {
|
|
@@ -3978,7 +4025,7 @@ var InputModal = ({
|
|
|
3978
4025
|
...restProps
|
|
3979
4026
|
}) => {
|
|
3980
4027
|
return /* @__PURE__ */ jsx41(
|
|
3981
|
-
|
|
4028
|
+
ConfirmModal,
|
|
3982
4029
|
{
|
|
3983
4030
|
buttonOverwrites,
|
|
3984
4031
|
...restProps,
|
|
@@ -3990,7 +4037,7 @@ var InputModal = ({
|
|
|
3990
4037
|
// src/components/user-action/Select.tsx
|
|
3991
4038
|
import { Menu } from "@headlessui/react";
|
|
3992
4039
|
import { ChevronDown as ChevronDown5, ChevronUp as ChevronUp4, Search as Search2 } from "lucide-react";
|
|
3993
|
-
import { useEffect as
|
|
4040
|
+
import { useEffect as useEffect17, useState as useState19 } from "react";
|
|
3994
4041
|
import clsx33 from "clsx";
|
|
3995
4042
|
import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3996
4043
|
var Select = ({
|
|
@@ -4091,8 +4138,8 @@ var SelectUncontrolled = ({
|
|
|
4091
4138
|
hintText,
|
|
4092
4139
|
...props
|
|
4093
4140
|
}) => {
|
|
4094
|
-
const [selected, setSelected] =
|
|
4095
|
-
|
|
4141
|
+
const [selected, setSelected] = useState19(value);
|
|
4142
|
+
useEffect17(() => {
|
|
4096
4143
|
if (options.find((options2) => options2.value === value)) {
|
|
4097
4144
|
setSelected(value);
|
|
4098
4145
|
}
|
|
@@ -4117,7 +4164,7 @@ var SearchableSelect = ({
|
|
|
4117
4164
|
searchMapping,
|
|
4118
4165
|
...selectProps
|
|
4119
4166
|
}) => {
|
|
4120
|
-
const [search, setSearch] =
|
|
4167
|
+
const [search, setSearch] = useState19("");
|
|
4121
4168
|
const filteredOptions = MultiSearchWithMapping(search, options, searchMapping);
|
|
4122
4169
|
return /* @__PURE__ */ jsx42(
|
|
4123
4170
|
Select,
|
|
@@ -4184,7 +4231,7 @@ var LanguageModal = ({
|
|
|
4184
4231
|
};
|
|
4185
4232
|
|
|
4186
4233
|
// src/theming/useTheme.tsx
|
|
4187
|
-
import { createContext as createContext2, useContext as useContext2, useEffect as
|
|
4234
|
+
import { createContext as createContext2, useContext as useContext2, useEffect as useEffect18, useState as useState20 } from "react";
|
|
4188
4235
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
4189
4236
|
var themes = ["light", "dark"];
|
|
4190
4237
|
var defaultThemeTypeTranslation = {
|
|
@@ -4206,14 +4253,14 @@ var ThemeContext = createContext2({
|
|
|
4206
4253
|
setTheme: noop
|
|
4207
4254
|
});
|
|
4208
4255
|
var ThemeProvider = ({ children, initialTheme = "light" }) => {
|
|
4209
|
-
const [theme, setTheme] =
|
|
4210
|
-
|
|
4256
|
+
const [theme, setTheme] = useState20(initialTheme);
|
|
4257
|
+
useEffect18(() => {
|
|
4211
4258
|
if (theme !== initialTheme) {
|
|
4212
4259
|
console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
|
|
4213
4260
|
setTheme(initialTheme);
|
|
4214
4261
|
}
|
|
4215
4262
|
}, [initialTheme]);
|
|
4216
|
-
|
|
4263
|
+
useEffect18(() => {
|
|
4217
4264
|
document.documentElement.setAttribute("data-theme", theme);
|
|
4218
4265
|
}, [theme]);
|
|
4219
4266
|
return /* @__PURE__ */ jsx44(ThemeContext.Provider, { value: { theme, setTheme }, children });
|
|
@@ -4432,7 +4479,7 @@ import { List } from "lucide-react";
|
|
|
4432
4479
|
import clsx38 from "clsx";
|
|
4433
4480
|
|
|
4434
4481
|
// src/components/user-action/MultiSelect.tsx
|
|
4435
|
-
import { useState as
|
|
4482
|
+
import { useState as useState21 } from "react";
|
|
4436
4483
|
import { Search as Search3 } from "lucide-react";
|
|
4437
4484
|
import clsx37 from "clsx";
|
|
4438
4485
|
|
|
@@ -4441,9 +4488,9 @@ import { useRef as useRef7 } from "react";
|
|
|
4441
4488
|
import clsx36 from "clsx";
|
|
4442
4489
|
|
|
4443
4490
|
// src/hooks/useOutsideClick.ts
|
|
4444
|
-
import { useEffect as
|
|
4491
|
+
import { useEffect as useEffect19 } from "react";
|
|
4445
4492
|
var useOutsideClick = (refs, handler) => {
|
|
4446
|
-
|
|
4493
|
+
useEffect19(() => {
|
|
4447
4494
|
const listener = (event) => {
|
|
4448
4495
|
if (event.target === null) return;
|
|
4449
4496
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -4543,7 +4590,7 @@ var MultiSelect = ({
|
|
|
4543
4590
|
triggerClassName = ""
|
|
4544
4591
|
}) => {
|
|
4545
4592
|
const translation = useTranslation(defaultMultiSelectTranslation, overwriteTranslation);
|
|
4546
|
-
const [searchText, setSearchText] =
|
|
4593
|
+
const [searchText, setSearchText] = useState21(search?.initialSearch ?? "");
|
|
4547
4594
|
let filteredOptions = options;
|
|
4548
4595
|
const enableSearch = !!search;
|
|
4549
4596
|
if (enableSearch && !!searchText) {
|
|
@@ -4826,7 +4873,7 @@ import { Text } from "lucide-react";
|
|
|
4826
4873
|
import clsx42 from "clsx";
|
|
4827
4874
|
|
|
4828
4875
|
// src/components/user-action/Textarea.tsx
|
|
4829
|
-
import { useEffect as
|
|
4876
|
+
import { useEffect as useEffect20, useState as useState22 } from "react";
|
|
4830
4877
|
import clsx41 from "clsx";
|
|
4831
4878
|
import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4832
4879
|
var Textarea = ({
|
|
@@ -4843,7 +4890,7 @@ var Textarea = ({
|
|
|
4843
4890
|
className,
|
|
4844
4891
|
...props
|
|
4845
4892
|
}) => {
|
|
4846
|
-
const [hasFocus, setHasFocus] =
|
|
4893
|
+
const [hasFocus, setHasFocus] = useState22(false);
|
|
4847
4894
|
const { restartTimer, clearUpdateTimer } = useSaveDelay(() => void 0, 3e3);
|
|
4848
4895
|
const onEditCompletedWrapper = (text) => {
|
|
4849
4896
|
onEditCompleted(text);
|
|
@@ -4904,8 +4951,8 @@ var TextareaUncontrolled = ({
|
|
|
4904
4951
|
onChangeText = noop,
|
|
4905
4952
|
...props
|
|
4906
4953
|
}) => {
|
|
4907
|
-
const [text, setText] =
|
|
4908
|
-
|
|
4954
|
+
const [text, setText] = useState22(value);
|
|
4955
|
+
useEffect20(() => {
|
|
4909
4956
|
setText(value);
|
|
4910
4957
|
}, [value]);
|
|
4911
4958
|
return /* @__PURE__ */ jsx54(
|
|
@@ -5090,7 +5137,7 @@ var DateTimePicker = ({
|
|
|
5090
5137
|
};
|
|
5091
5138
|
|
|
5092
5139
|
// src/components/user-action/ScrollPicker.tsx
|
|
5093
|
-
import { useCallback as useCallback4, useEffect as
|
|
5140
|
+
import { useCallback as useCallback4, useEffect as useEffect21, useState as useState23 } from "react";
|
|
5094
5141
|
import clsx44 from "clsx";
|
|
5095
5142
|
import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5096
5143
|
var up = 1;
|
|
@@ -5111,7 +5158,7 @@ var ScrollPicker = ({
|
|
|
5111
5158
|
transition,
|
|
5112
5159
|
items,
|
|
5113
5160
|
lastTimeStamp
|
|
5114
|
-
}, setAnimation] =
|
|
5161
|
+
}, setAnimation] = useState23({
|
|
5115
5162
|
targetIndex: selectedIndex,
|
|
5116
5163
|
currentIndex: disabled ? selectedIndex : 0,
|
|
5117
5164
|
velocity: 0,
|
|
@@ -5210,7 +5257,7 @@ var ScrollPicker = ({
|
|
|
5210
5257
|
};
|
|
5211
5258
|
});
|
|
5212
5259
|
}, [disabled, getDirection, onChange]);
|
|
5213
|
-
|
|
5260
|
+
useEffect21(() => {
|
|
5214
5261
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
5215
5262
|
});
|
|
5216
5263
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -5287,7 +5334,7 @@ var ScrollPicker = ({
|
|
|
5287
5334
|
};
|
|
5288
5335
|
|
|
5289
5336
|
// src/components/user-action/ToggleableInput.tsx
|
|
5290
|
-
import { useEffect as
|
|
5337
|
+
import { useEffect as useEffect22, useRef as useRef8, useState as useState24 } from "react";
|
|
5291
5338
|
import { Pencil } from "lucide-react";
|
|
5292
5339
|
import clsx45 from "clsx";
|
|
5293
5340
|
import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
@@ -5304,14 +5351,14 @@ var ToggleableInput = ({
|
|
|
5304
5351
|
onBlur,
|
|
5305
5352
|
...restProps
|
|
5306
5353
|
}) => {
|
|
5307
|
-
const [isEditing, setIsEditing] =
|
|
5354
|
+
const [isEditing, setIsEditing] = useState24(initialState !== "display");
|
|
5308
5355
|
const { restartTimer, clearUpdateTimer } = useSaveDelay(() => void 0, 3e3);
|
|
5309
5356
|
const ref = useRef8(null);
|
|
5310
5357
|
const onEditCompletedWrapper = (text) => {
|
|
5311
5358
|
onEditCompleted(text);
|
|
5312
5359
|
clearUpdateTimer();
|
|
5313
5360
|
};
|
|
5314
|
-
|
|
5361
|
+
useEffect22(() => {
|
|
5315
5362
|
if (isEditing) {
|
|
5316
5363
|
ref.current?.focus();
|
|
5317
5364
|
}
|
|
@@ -5376,8 +5423,8 @@ var ToggleableInputUncontrolled = ({
|
|
|
5376
5423
|
onChangeText = noop,
|
|
5377
5424
|
...restProps
|
|
5378
5425
|
}) => {
|
|
5379
|
-
const [value, setValue] =
|
|
5380
|
-
|
|
5426
|
+
const [value, setValue] = useState24(initialValue);
|
|
5427
|
+
useEffect22(() => {
|
|
5381
5428
|
setValue(initialValue);
|
|
5382
5429
|
}, [initialValue]);
|
|
5383
5430
|
return /* @__PURE__ */ jsx58(
|
|
@@ -5461,6 +5508,7 @@ export {
|
|
|
5461
5508
|
EaseFunctions,
|
|
5462
5509
|
ErrorComponent,
|
|
5463
5510
|
Expandable,
|
|
5511
|
+
ExpandableUncontrolled,
|
|
5464
5512
|
FAQSection,
|
|
5465
5513
|
FormInput,
|
|
5466
5514
|
Helpwave,
|
|
@@ -5509,6 +5557,7 @@ export {
|
|
|
5509
5557
|
SolidButton,
|
|
5510
5558
|
SortButton,
|
|
5511
5559
|
StepperBar,
|
|
5560
|
+
StepperBarUncontrolled,
|
|
5512
5561
|
Table,
|
|
5513
5562
|
TagIcon,
|
|
5514
5563
|
TextButton,
|