@helpwave/hightide 0.6.3 → 0.6.5
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/index.d.mts +1 -5
- package/dist/index.d.ts +1 -5
- package/dist/index.js +570 -575
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +553 -558
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +31 -64
- package/dist/style/uncompiled/theme/components/expandable.css +3 -3
- package/dist/style/uncompiled/theme/components/table.css +5 -1
- package/dist/style/uncompiled/theme/components/tooltip.css +13 -4
- package/dist/style/uncompiled/utitlity/animation.css +0 -61
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8402,8 +8402,7 @@ var import_react9 = require("react");
|
|
|
8402
8402
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
8403
8403
|
var defaultConfig = {
|
|
8404
8404
|
tooltip: {
|
|
8405
|
-
appearDelay:
|
|
8406
|
-
disappearDelay: 400
|
|
8405
|
+
appearDelay: 400
|
|
8407
8406
|
},
|
|
8408
8407
|
theme: {
|
|
8409
8408
|
initialTheme: "light"
|
|
@@ -11094,6 +11093,9 @@ var InputDialog = ({
|
|
|
11094
11093
|
);
|
|
11095
11094
|
};
|
|
11096
11095
|
|
|
11096
|
+
// src/components/user-interaction/select/Select.tsx
|
|
11097
|
+
var import_react36 = require("react");
|
|
11098
|
+
|
|
11097
11099
|
// src/components/user-interaction/select/SelectContext.tsx
|
|
11098
11100
|
var import_react34 = require("react");
|
|
11099
11101
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
@@ -11602,168 +11604,16 @@ var MultiSelectOption = SelectOption;
|
|
|
11602
11604
|
var MultiSelectContent = SelectContent;
|
|
11603
11605
|
var MultiSelectButton = SelectButton;
|
|
11604
11606
|
|
|
11605
|
-
// src/components/user-interaction/select/MultiSelect.tsx
|
|
11606
|
-
var import_react36 = require("react");
|
|
11607
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
11608
|
-
var MultiSelect = (0, import_react36.forwardRef)(function MultiSelect2({
|
|
11609
|
-
children,
|
|
11610
|
-
contentPanelProps,
|
|
11611
|
-
buttonProps,
|
|
11612
|
-
...props
|
|
11613
|
-
}, ref) {
|
|
11614
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(MultiSelectRoot, { ...props, children: [
|
|
11615
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MultiSelectButton, { ref, ...buttonProps }),
|
|
11616
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(MultiSelectContent, { ...contentPanelProps, children })
|
|
11617
|
-
] });
|
|
11618
|
-
});
|
|
11619
|
-
var MultiSelectUncontrolled = (0, import_react36.forwardRef)(function MultiSelectUncontrolled2({
|
|
11620
|
-
value: initialValue,
|
|
11621
|
-
onValueChange,
|
|
11622
|
-
...props
|
|
11623
|
-
}, ref) {
|
|
11624
|
-
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
11625
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11626
|
-
MultiSelect,
|
|
11627
|
-
{
|
|
11628
|
-
...props,
|
|
11629
|
-
ref,
|
|
11630
|
-
value,
|
|
11631
|
-
onValueChange: setValue
|
|
11632
|
-
}
|
|
11633
|
-
);
|
|
11634
|
-
});
|
|
11635
|
-
|
|
11636
|
-
// src/components/user-interaction/select/MultiSelectChipDisplay.tsx
|
|
11637
|
-
var import_react37 = require("react");
|
|
11638
|
-
var import_lucide_react8 = require("lucide-react");
|
|
11639
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
11640
|
-
var MultiSelectChipDisplayButton = (0, import_react37.forwardRef)(function MultiSelectChipDisplayButton2({
|
|
11641
|
-
id,
|
|
11642
|
-
...props
|
|
11643
|
-
}, ref) {
|
|
11644
|
-
const { state, trigger, item, ids, setIds } = useSelectContext();
|
|
11645
|
-
const { register, unregister, toggleOpen } = trigger;
|
|
11646
|
-
(0, import_react37.useEffect)(() => {
|
|
11647
|
-
if (id) {
|
|
11648
|
-
setIds((prev) => ({
|
|
11649
|
-
...prev,
|
|
11650
|
-
trigger: id
|
|
11651
|
-
}));
|
|
11652
|
-
}
|
|
11653
|
-
}, [id, setIds]);
|
|
11654
|
-
const innerRef = (0, import_react37.useRef)(null);
|
|
11655
|
-
(0, import_react37.useImperativeHandle)(ref, () => innerRef.current);
|
|
11656
|
-
(0, import_react37.useEffect)(() => {
|
|
11657
|
-
register(innerRef);
|
|
11658
|
-
return () => unregister();
|
|
11659
|
-
}, [register, unregister]);
|
|
11660
|
-
const disabled = !!props?.disabled || !!state.disabled;
|
|
11661
|
-
const invalid = state.invalid;
|
|
11662
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
11663
|
-
"div",
|
|
11664
|
-
{
|
|
11665
|
-
...props,
|
|
11666
|
-
ref: innerRef,
|
|
11667
|
-
onClick: (event) => {
|
|
11668
|
-
toggleOpen();
|
|
11669
|
-
props.onClick?.(event);
|
|
11670
|
-
},
|
|
11671
|
-
"data-name": props["data-name"] ?? "select-button-chips",
|
|
11672
|
-
"data-value": state.value.length > 0 ? "" : void 0,
|
|
11673
|
-
"data-disabled": disabled ? "" : void 0,
|
|
11674
|
-
"data-invalid": invalid ? "" : void 0,
|
|
11675
|
-
"aria-invalid": invalid,
|
|
11676
|
-
"aria-disabled": disabled,
|
|
11677
|
-
children: [
|
|
11678
|
-
state.selectedOptions.map(({ value, label }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Chip, { className: "gap-x-2", children: [
|
|
11679
|
-
label,
|
|
11680
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11681
|
-
Button,
|
|
11682
|
-
{
|
|
11683
|
-
onClick: () => {
|
|
11684
|
-
item.toggleSelection(value, false);
|
|
11685
|
-
},
|
|
11686
|
-
size: "xs",
|
|
11687
|
-
color: "negative",
|
|
11688
|
-
coloringStyle: "text",
|
|
11689
|
-
layout: "icon",
|
|
11690
|
-
className: "flex-row-0 items-center",
|
|
11691
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react8.XIcon, { className: "size-5" })
|
|
11692
|
-
}
|
|
11693
|
-
)
|
|
11694
|
-
] }, value)),
|
|
11695
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11696
|
-
Button,
|
|
11697
|
-
{
|
|
11698
|
-
id: ids.trigger,
|
|
11699
|
-
onClick: (event) => {
|
|
11700
|
-
event.stopPropagation();
|
|
11701
|
-
toggleOpen();
|
|
11702
|
-
},
|
|
11703
|
-
onKeyDown: (event) => {
|
|
11704
|
-
switch (event.key) {
|
|
11705
|
-
case "ArrowDown":
|
|
11706
|
-
toggleOpen(true, { highlightStartPositionBehavior: "first" });
|
|
11707
|
-
break;
|
|
11708
|
-
case "ArrowUp":
|
|
11709
|
-
toggleOpen(true, { highlightStartPositionBehavior: "last" });
|
|
11710
|
-
}
|
|
11711
|
-
},
|
|
11712
|
-
layout: "icon",
|
|
11713
|
-
size: "sm",
|
|
11714
|
-
color: "neutral",
|
|
11715
|
-
"aria-invalid": invalid,
|
|
11716
|
-
"aria-disabled": disabled,
|
|
11717
|
-
"aria-haspopup": "listbox",
|
|
11718
|
-
"aria-expanded": state.isOpen,
|
|
11719
|
-
"aria-controls": state.isOpen ? ids.content : void 0,
|
|
11720
|
-
className: "size-9",
|
|
11721
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react8.Plus, {})
|
|
11722
|
-
}
|
|
11723
|
-
)
|
|
11724
|
-
]
|
|
11725
|
-
}
|
|
11726
|
-
);
|
|
11727
|
-
});
|
|
11728
|
-
var MultiSelectChipDisplay = (0, import_react37.forwardRef)(function MultiSelectChipDisplay2({
|
|
11729
|
-
children,
|
|
11730
|
-
contentPanelProps,
|
|
11731
|
-
chipDisplayProps,
|
|
11732
|
-
...props
|
|
11733
|
-
}, ref) {
|
|
11734
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(MultiSelectRoot, { ...props, children: [
|
|
11735
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MultiSelectChipDisplayButton, { ref, ...chipDisplayProps }),
|
|
11736
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MultiSelectContent, { ...contentPanelProps, children })
|
|
11737
|
-
] });
|
|
11738
|
-
});
|
|
11739
|
-
var MultiSelectChipDisplayUncontrolled = (0, import_react37.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
|
|
11740
|
-
value: initialValue,
|
|
11741
|
-
onValueChange,
|
|
11742
|
-
...props
|
|
11743
|
-
}, ref) {
|
|
11744
|
-
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
11745
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11746
|
-
MultiSelectChipDisplay,
|
|
11747
|
-
{
|
|
11748
|
-
...props,
|
|
11749
|
-
ref,
|
|
11750
|
-
value,
|
|
11751
|
-
onValueChange: setValue
|
|
11752
|
-
}
|
|
11753
|
-
);
|
|
11754
|
-
});
|
|
11755
|
-
|
|
11756
11607
|
// src/components/user-interaction/select/Select.tsx
|
|
11757
|
-
var
|
|
11758
|
-
var
|
|
11759
|
-
var Select = (0, import_react38.forwardRef)(function Select2({
|
|
11608
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
11609
|
+
var Select = (0, import_react36.forwardRef)(function Select2({
|
|
11760
11610
|
children,
|
|
11761
11611
|
contentPanelProps,
|
|
11762
11612
|
buttonProps,
|
|
11763
11613
|
...props
|
|
11764
11614
|
}, ref) {
|
|
11765
|
-
return /* @__PURE__ */ (0,
|
|
11766
|
-
/* @__PURE__ */ (0,
|
|
11615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(SelectRoot, { ...props, children: [
|
|
11616
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11767
11617
|
SelectButton,
|
|
11768
11618
|
{
|
|
11769
11619
|
ref,
|
|
@@ -11775,16 +11625,16 @@ var Select = (0, import_react38.forwardRef)(function Select2({
|
|
|
11775
11625
|
}
|
|
11776
11626
|
}
|
|
11777
11627
|
),
|
|
11778
|
-
/* @__PURE__ */ (0,
|
|
11628
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectContent, { ...contentPanelProps, children })
|
|
11779
11629
|
] });
|
|
11780
11630
|
});
|
|
11781
|
-
var SelectUncontrolled = (0,
|
|
11631
|
+
var SelectUncontrolled = (0, import_react36.forwardRef)(function SelectUncontrolled2({
|
|
11782
11632
|
value: initialValue,
|
|
11783
11633
|
onValueChange,
|
|
11784
11634
|
...props
|
|
11785
11635
|
}, ref) {
|
|
11786
11636
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
11787
|
-
return /* @__PURE__ */ (0,
|
|
11637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11788
11638
|
Select,
|
|
11789
11639
|
{
|
|
11790
11640
|
...props,
|
|
@@ -11796,7 +11646,7 @@ var SelectUncontrolled = (0, import_react38.forwardRef)(function SelectUncontrol
|
|
|
11796
11646
|
});
|
|
11797
11647
|
|
|
11798
11648
|
// src/components/layout/dialog/LanguageDialog.tsx
|
|
11799
|
-
var
|
|
11649
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
11800
11650
|
var LanguageDialog = ({
|
|
11801
11651
|
onClose,
|
|
11802
11652
|
titleOverwrite,
|
|
@@ -11805,15 +11655,15 @@ var LanguageDialog = ({
|
|
|
11805
11655
|
}) => {
|
|
11806
11656
|
const { locale, setLocale } = useLocale();
|
|
11807
11657
|
const translation = useHightideTranslation();
|
|
11808
|
-
return /* @__PURE__ */ (0,
|
|
11658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11809
11659
|
Dialog,
|
|
11810
11660
|
{
|
|
11811
11661
|
titleElement: titleOverwrite ?? translation("language"),
|
|
11812
11662
|
description: descriptionOverwrite ?? translation("chooseLanguage"),
|
|
11813
11663
|
onClose,
|
|
11814
11664
|
...props,
|
|
11815
|
-
children: /* @__PURE__ */ (0,
|
|
11816
|
-
/* @__PURE__ */ (0,
|
|
11665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "w-64", children: [
|
|
11666
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11817
11667
|
Select,
|
|
11818
11668
|
{
|
|
11819
11669
|
value: locale,
|
|
@@ -11821,27 +11671,27 @@ var LanguageDialog = ({
|
|
|
11821
11671
|
buttonProps: {
|
|
11822
11672
|
selectedDisplay: (locale2) => LocalizationUtil.languagesLocalNames[locale2]
|
|
11823
11673
|
},
|
|
11824
|
-
children: LocalizationUtil.locals.map((local) => /* @__PURE__ */ (0,
|
|
11674
|
+
children: LocalizationUtil.locals.map((local) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SelectOption, { value: local, children: LocalizationUtil.languagesLocalNames[local] }, local))
|
|
11825
11675
|
}
|
|
11826
11676
|
),
|
|
11827
|
-
/* @__PURE__ */ (0,
|
|
11677
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { color: "positive", onClick: onClose, children: translation("done") }) })
|
|
11828
11678
|
] })
|
|
11829
11679
|
}
|
|
11830
11680
|
);
|
|
11831
11681
|
};
|
|
11832
11682
|
|
|
11833
11683
|
// src/components/layout/dialog/ThemeDialog.tsx
|
|
11834
|
-
var
|
|
11684
|
+
var import_lucide_react8 = require("lucide-react");
|
|
11835
11685
|
var import_clsx14 = __toESM(require("clsx"));
|
|
11836
11686
|
|
|
11837
11687
|
// src/contexts/ThemeContext.tsx
|
|
11838
|
-
var
|
|
11839
|
-
var
|
|
11688
|
+
var import_react37 = require("react");
|
|
11689
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
11840
11690
|
var themes = ["light", "dark", "system"];
|
|
11841
11691
|
var ThemeUtil = {
|
|
11842
11692
|
themes
|
|
11843
11693
|
};
|
|
11844
|
-
var ThemeContext = (0,
|
|
11694
|
+
var ThemeContext = (0, import_react37.createContext)(null);
|
|
11845
11695
|
var ThemeProvider = ({ children, theme, initialTheme }) => {
|
|
11846
11696
|
const {
|
|
11847
11697
|
value: storedTheme,
|
|
@@ -11849,8 +11699,8 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
|
|
|
11849
11699
|
deleteValue: deleteStoredTheme
|
|
11850
11700
|
} = useLocalStorage("theme", "system");
|
|
11851
11701
|
const { config } = useHightideConfig();
|
|
11852
|
-
const [themePreference, setThemePreference] = (0,
|
|
11853
|
-
const resolvedTheme = (0,
|
|
11702
|
+
const [themePreference, setThemePreference] = (0, import_react37.useState)("system");
|
|
11703
|
+
const resolvedTheme = (0, import_react37.useMemo)(() => {
|
|
11854
11704
|
if (theme && theme !== "system") {
|
|
11855
11705
|
return theme;
|
|
11856
11706
|
}
|
|
@@ -11862,7 +11712,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
|
|
|
11862
11712
|
}
|
|
11863
11713
|
return initialTheme ?? config.theme.initialTheme;
|
|
11864
11714
|
}, [config.theme.initialTheme, initialTheme, storedTheme, theme, themePreference]);
|
|
11865
|
-
(0,
|
|
11715
|
+
(0, import_react37.useEffect)(() => {
|
|
11866
11716
|
if (!theme) return;
|
|
11867
11717
|
if (theme === "system") {
|
|
11868
11718
|
deleteStoredTheme();
|
|
@@ -11870,18 +11720,18 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
|
|
|
11870
11720
|
setStoredTheme(theme);
|
|
11871
11721
|
}
|
|
11872
11722
|
}, [theme]);
|
|
11873
|
-
(0,
|
|
11723
|
+
(0, import_react37.useEffect)(() => {
|
|
11874
11724
|
document.documentElement.setAttribute("data-theme", resolvedTheme);
|
|
11875
11725
|
}, [resolvedTheme]);
|
|
11876
|
-
const getPreference = (0,
|
|
11726
|
+
const getPreference = (0, import_react37.useCallback)(() => {
|
|
11877
11727
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
11878
11728
|
const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
|
|
11879
11729
|
setThemePreference(prefersDark ? "dark" : prefersLight ? "light" : "system");
|
|
11880
11730
|
}, []);
|
|
11881
|
-
(0,
|
|
11731
|
+
(0, import_react37.useEffect)(() => {
|
|
11882
11732
|
getPreference();
|
|
11883
11733
|
}, [getPreference]);
|
|
11884
|
-
(0,
|
|
11734
|
+
(0, import_react37.useEffect)(() => {
|
|
11885
11735
|
const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
11886
11736
|
const lightQuery = window.matchMedia("(prefers-color-scheme: light)");
|
|
11887
11737
|
const noPrefQuery = window.matchMedia("(prefers-color-scheme: no-preference)");
|
|
@@ -11894,7 +11744,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
|
|
|
11894
11744
|
noPrefQuery.removeEventListener("change", getPreference);
|
|
11895
11745
|
};
|
|
11896
11746
|
}, [getPreference]);
|
|
11897
|
-
return /* @__PURE__ */ (0,
|
|
11747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
11898
11748
|
ThemeContext.Provider,
|
|
11899
11749
|
{
|
|
11900
11750
|
value: {
|
|
@@ -11912,7 +11762,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
|
|
|
11912
11762
|
);
|
|
11913
11763
|
};
|
|
11914
11764
|
var useTheme = () => {
|
|
11915
|
-
const context = (0,
|
|
11765
|
+
const context = (0, import_react37.useContext)(ThemeContext);
|
|
11916
11766
|
if (!context) {
|
|
11917
11767
|
throw new Error("useTheme must be used within ThemeContext. Try adding a ThemeProvider around your app.");
|
|
11918
11768
|
}
|
|
@@ -11920,14 +11770,14 @@ var useTheme = () => {
|
|
|
11920
11770
|
};
|
|
11921
11771
|
|
|
11922
11772
|
// src/components/layout/dialog/ThemeDialog.tsx
|
|
11923
|
-
var
|
|
11773
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
11924
11774
|
var ThemeIcon = ({ theme, className }) => {
|
|
11925
11775
|
if (theme === "dark") {
|
|
11926
|
-
return /* @__PURE__ */ (0,
|
|
11776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react8.MoonIcon, { className: (0, import_clsx14.default)("w-4 h-4", className) });
|
|
11927
11777
|
} else if (theme === "light") {
|
|
11928
|
-
return /* @__PURE__ */ (0,
|
|
11778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react8.SunIcon, { className: (0, import_clsx14.default)("w-4 h-4", className) });
|
|
11929
11779
|
} else {
|
|
11930
|
-
return /* @__PURE__ */ (0,
|
|
11780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react8.MonitorCog, { className: (0, import_clsx14.default)("w-4 h-4", className) });
|
|
11931
11781
|
}
|
|
11932
11782
|
};
|
|
11933
11783
|
var ThemeDialog = ({
|
|
@@ -11938,67 +11788,67 @@ var ThemeDialog = ({
|
|
|
11938
11788
|
}) => {
|
|
11939
11789
|
const { theme, setTheme } = useTheme();
|
|
11940
11790
|
const translation = useHightideTranslation();
|
|
11941
|
-
return /* @__PURE__ */ (0,
|
|
11791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11942
11792
|
Dialog,
|
|
11943
11793
|
{
|
|
11944
11794
|
titleElement: titleOverwrite ?? translation("pThemes", { count: 1 }),
|
|
11945
11795
|
description: descriptionOverwrite ?? translation("chooseTheme"),
|
|
11946
11796
|
onClose,
|
|
11947
11797
|
...props,
|
|
11948
|
-
children: /* @__PURE__ */ (0,
|
|
11949
|
-
/* @__PURE__ */ (0,
|
|
11798
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "w-64", children: [
|
|
11799
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11950
11800
|
Select,
|
|
11951
11801
|
{
|
|
11952
11802
|
value: theme,
|
|
11953
11803
|
onValueChange: (theme2) => setTheme(theme2),
|
|
11954
11804
|
iconAppearance: "right",
|
|
11955
11805
|
buttonProps: {
|
|
11956
|
-
selectedDisplay: (value) => /* @__PURE__ */ (0,
|
|
11957
|
-
/* @__PURE__ */ (0,
|
|
11806
|
+
selectedDisplay: (value) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex-row-2 items-center", children: [
|
|
11807
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ThemeIcon, { theme }),
|
|
11958
11808
|
translation("sThemeMode", { theme: value })
|
|
11959
11809
|
] }),
|
|
11960
11810
|
className: "min-w-32"
|
|
11961
11811
|
},
|
|
11962
|
-
children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ (0,
|
|
11963
|
-
/* @__PURE__ */ (0,
|
|
11812
|
+
children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectOption, { value: theme2, className: "gap-x-6 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex-row-2 items-center", children: [
|
|
11813
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ThemeIcon, { theme: theme2 }),
|
|
11964
11814
|
translation("sThemeMode", { theme: theme2 })
|
|
11965
11815
|
] }) }, theme2))
|
|
11966
11816
|
}
|
|
11967
11817
|
),
|
|
11968
|
-
/* @__PURE__ */ (0,
|
|
11818
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
11969
11819
|
] })
|
|
11970
11820
|
}
|
|
11971
11821
|
);
|
|
11972
11822
|
};
|
|
11973
11823
|
|
|
11974
11824
|
// src/components/layout/loading/ErrorComponent.tsx
|
|
11975
|
-
var
|
|
11825
|
+
var import_lucide_react9 = require("lucide-react");
|
|
11976
11826
|
var import_clsx15 = __toESM(require("clsx"));
|
|
11977
|
-
var
|
|
11827
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
11978
11828
|
var ErrorComponent = ({
|
|
11979
11829
|
errorText,
|
|
11980
11830
|
classname
|
|
11981
11831
|
}) => {
|
|
11982
11832
|
const translation = useHightideTranslation();
|
|
11983
|
-
return /* @__PURE__ */ (0,
|
|
11984
|
-
/* @__PURE__ */ (0,
|
|
11833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: (0, import_clsx15.default)("flex-col-4 items-center justify-center w-full h-24", classname), children: [
|
|
11834
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react9.AlertOctagon, { size: 64, className: "text-warning" }),
|
|
11985
11835
|
errorText ?? `${translation("errorOccurred")} :(`
|
|
11986
11836
|
] });
|
|
11987
11837
|
};
|
|
11988
11838
|
|
|
11989
11839
|
// src/components/layout/loading/LoadingAndErrorComponent.tsx
|
|
11990
|
-
var
|
|
11840
|
+
var import_react38 = require("react");
|
|
11991
11841
|
|
|
11992
11842
|
// src/components/layout/loading/LoadingContainer.tsx
|
|
11993
11843
|
var import_clsx16 = require("clsx");
|
|
11994
|
-
var
|
|
11844
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
11995
11845
|
var LoadingContainer = ({ className }) => {
|
|
11996
|
-
return /* @__PURE__ */ (0,
|
|
11846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: (0, import_clsx16.clsx)("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
|
|
11997
11847
|
};
|
|
11998
11848
|
|
|
11999
11849
|
// src/components/layout/loading/LoadingAndErrorComponent.tsx
|
|
12000
11850
|
var import_clsx17 = require("clsx");
|
|
12001
|
-
var
|
|
11851
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
12002
11852
|
var LoadingAndErrorComponent = ({
|
|
12003
11853
|
children,
|
|
12004
11854
|
isLoading = false,
|
|
@@ -12008,8 +11858,8 @@ var LoadingAndErrorComponent = ({
|
|
|
12008
11858
|
minimumLoadingDuration = 200,
|
|
12009
11859
|
className
|
|
12010
11860
|
}) => {
|
|
12011
|
-
const [isInMinimumLoading, setIsInMinimumLoading] = (0,
|
|
12012
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0,
|
|
11861
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react38.useState)(false);
|
|
11862
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react38.useState)(false);
|
|
12013
11863
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
12014
11864
|
setIsInMinimumLoading(true);
|
|
12015
11865
|
setTimeout(() => {
|
|
@@ -12018,33 +11868,33 @@ var LoadingAndErrorComponent = ({
|
|
|
12018
11868
|
}, minimumLoadingDuration);
|
|
12019
11869
|
}
|
|
12020
11870
|
if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
|
|
12021
|
-
return /* @__PURE__ */ (0,
|
|
11871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LoadingContainer, { className: (0, import_clsx17.clsx)(className) }) });
|
|
12022
11872
|
}
|
|
12023
11873
|
if (hasError) {
|
|
12024
|
-
return /* @__PURE__ */ (0,
|
|
11874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(LoadingContainer, { className: (0, import_clsx17.clsx)("bg-negative", className) }) });
|
|
12025
11875
|
}
|
|
12026
|
-
return /* @__PURE__ */ (0,
|
|
11876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children });
|
|
12027
11877
|
};
|
|
12028
11878
|
|
|
12029
11879
|
// src/components/layout/loading/LoadingAnimation.tsx
|
|
12030
11880
|
var import_clsx18 = __toESM(require("clsx"));
|
|
12031
|
-
var
|
|
11881
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
12032
11882
|
var LoadingAnimation = ({
|
|
12033
11883
|
loadingText,
|
|
12034
11884
|
classname
|
|
12035
11885
|
}) => {
|
|
12036
11886
|
const translation = useHightideTranslation();
|
|
12037
|
-
return /* @__PURE__ */ (0,
|
|
12038
|
-
/* @__PURE__ */ (0,
|
|
11887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: (0, import_clsx18.default)("flex-col-2 items-center justify-center w-full h-24", classname), children: [
|
|
11888
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(HelpwaveLogo, { animate: "loading" }),
|
|
12039
11889
|
loadingText ?? `${translation("loading")}...`
|
|
12040
11890
|
] });
|
|
12041
11891
|
};
|
|
12042
11892
|
|
|
12043
11893
|
// src/components/layout/navigation/BreadCrumbs.tsx
|
|
12044
11894
|
var import_link = __toESM(require_link2());
|
|
12045
|
-
var
|
|
11895
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12046
11896
|
var BreadCrumbLink = ({ ...props }) => {
|
|
12047
|
-
return /* @__PURE__ */ (0,
|
|
11897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12048
11898
|
import_link.default,
|
|
12049
11899
|
{
|
|
12050
11900
|
...props,
|
|
@@ -12053,29 +11903,29 @@ var BreadCrumbLink = ({ ...props }) => {
|
|
|
12053
11903
|
);
|
|
12054
11904
|
};
|
|
12055
11905
|
var BreadCrumbDivider = () => {
|
|
12056
|
-
return /* @__PURE__ */ (0,
|
|
11906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { "data-name": "breadcrumb-divider", children: "/" });
|
|
12057
11907
|
};
|
|
12058
11908
|
var BreadCrumbGroup = ({ children, divider, ...props }) => {
|
|
12059
11909
|
const items = ArrayUtil.resolveSingleOrArray(children);
|
|
12060
|
-
return /* @__PURE__ */ (0,
|
|
11910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { ...props, "data-name": props["data-name"] ?? "breadcrumb", children: items.map((item, index) => {
|
|
12061
11911
|
const isLast = index === items.length - 1;
|
|
12062
|
-
return /* @__PURE__ */ (0,
|
|
11912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("li", { "data-name": "breadcrumb-item", children: [
|
|
12063
11913
|
item,
|
|
12064
|
-
!isLast && divider !== null && (divider ?? /* @__PURE__ */ (0,
|
|
11914
|
+
!isLast && divider !== null && (divider ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BreadCrumbDivider, {}))
|
|
12065
11915
|
] }, index);
|
|
12066
11916
|
}) });
|
|
12067
11917
|
};
|
|
12068
11918
|
var BreadCrumbs = ({ crumbs }) => {
|
|
12069
|
-
return /* @__PURE__ */ (0,
|
|
11919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BreadCrumbGroup, { children: crumbs.map(({ href, label }, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BreadCrumbLink, { href, children: label }, index)) });
|
|
12070
11920
|
};
|
|
12071
11921
|
|
|
12072
11922
|
// src/components/layout/navigation/Navigation.tsx
|
|
12073
|
-
var
|
|
12074
|
-
var
|
|
12075
|
-
var
|
|
11923
|
+
var import_lucide_react10 = require("lucide-react");
|
|
11924
|
+
var import_react39 = require("react");
|
|
11925
|
+
var import_react40 = require("react");
|
|
12076
11926
|
var import_link2 = __toESM(require_link2());
|
|
12077
11927
|
var import_clsx19 = __toESM(require("clsx"));
|
|
12078
|
-
var
|
|
11928
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12079
11929
|
function isSubItem(item) {
|
|
12080
11930
|
return "items" in item && Array.isArray(item.items);
|
|
12081
11931
|
}
|
|
@@ -12085,10 +11935,10 @@ var NavigationItemWithSubItem = ({
|
|
|
12085
11935
|
horizontalAlignment = "center",
|
|
12086
11936
|
...options
|
|
12087
11937
|
}) => {
|
|
12088
|
-
const [isOpen, setOpen] = (0,
|
|
12089
|
-
const containerRef = (0,
|
|
12090
|
-
const triggerRef = (0,
|
|
12091
|
-
const id = (0,
|
|
11938
|
+
const [isOpen, setOpen] = (0, import_react40.useState)(false);
|
|
11939
|
+
const containerRef = (0, import_react40.useRef)(null);
|
|
11940
|
+
const triggerRef = (0, import_react40.useRef)(null);
|
|
11941
|
+
const id = (0, import_react40.useId)();
|
|
12092
11942
|
const style = useFloatingElement({
|
|
12093
11943
|
active: isOpen,
|
|
12094
11944
|
containerRef,
|
|
@@ -12096,15 +11946,15 @@ var NavigationItemWithSubItem = ({
|
|
|
12096
11946
|
horizontalAlignment,
|
|
12097
11947
|
...options
|
|
12098
11948
|
});
|
|
12099
|
-
const onBlur = (0,
|
|
11949
|
+
const onBlur = (0, import_react40.useCallback)((event) => {
|
|
12100
11950
|
const nextFocus = event.relatedTarget;
|
|
12101
11951
|
if (!containerRef.current?.contains(nextFocus) && !triggerRef.current?.contains(nextFocus)) {
|
|
12102
11952
|
setOpen(false);
|
|
12103
11953
|
}
|
|
12104
11954
|
}, []);
|
|
12105
11955
|
const { zIndex } = useOverlayRegistry();
|
|
12106
|
-
return /* @__PURE__ */ (0,
|
|
12107
|
-
/* @__PURE__ */ (0,
|
|
11956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
11957
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
12108
11958
|
"button",
|
|
12109
11959
|
{
|
|
12110
11960
|
id: "navigation-" + id,
|
|
@@ -12120,11 +11970,11 @@ var NavigationItemWithSubItem = ({
|
|
|
12120
11970
|
"aria-controls": "navigation-items-" + id,
|
|
12121
11971
|
children: [
|
|
12122
11972
|
label,
|
|
12123
|
-
/* @__PURE__ */ (0,
|
|
11973
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ExpansionIcon, { isExpanded: isOpen })
|
|
12124
11974
|
]
|
|
12125
11975
|
}
|
|
12126
11976
|
),
|
|
12127
|
-
/* @__PURE__ */ (0,
|
|
11977
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
12128
11978
|
"ul",
|
|
12129
11979
|
{
|
|
12130
11980
|
id: "navigation-items-" + id,
|
|
@@ -12143,7 +11993,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12143
11993
|
{ "opacity-0": !style }
|
|
12144
11994
|
),
|
|
12145
11995
|
style: { ...style, zIndex },
|
|
12146
|
-
children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */ (0,
|
|
11996
|
+
children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
12147
11997
|
import_link2.default,
|
|
12148
11998
|
{
|
|
12149
11999
|
href: link,
|
|
@@ -12157,25 +12007,25 @@ var NavigationItemWithSubItem = ({
|
|
|
12157
12007
|
] });
|
|
12158
12008
|
};
|
|
12159
12009
|
var NavigationItemList = ({ items, ...restProps }) => {
|
|
12160
|
-
return /* @__PURE__ */ (0,
|
|
12010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("ul", { ...restProps, className: (0, import_clsx19.default)("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { children: isSubItem(item) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
|
|
12161
12011
|
};
|
|
12162
12012
|
var Navigation = ({ ...props }) => {
|
|
12163
|
-
const [isMobileOpen, setIsMobileOpen] = (0,
|
|
12164
|
-
const id = (0,
|
|
12165
|
-
const menuRef = (0,
|
|
12166
|
-
(0,
|
|
12013
|
+
const [isMobileOpen, setIsMobileOpen] = (0, import_react40.useState)(false);
|
|
12014
|
+
const id = (0, import_react40.useId)();
|
|
12015
|
+
const menuRef = (0, import_react40.useRef)(null);
|
|
12016
|
+
(0, import_react39.useEffect)(() => {
|
|
12167
12017
|
menuRef.current?.focus();
|
|
12168
12018
|
}, [isMobileOpen]);
|
|
12169
12019
|
const { zIndex } = useOverlayRegistry({ isActive: isMobileOpen });
|
|
12170
|
-
return /* @__PURE__ */ (0,
|
|
12171
|
-
/* @__PURE__ */ (0,
|
|
12020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("nav", { children: [
|
|
12021
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
12172
12022
|
NavigationItemList,
|
|
12173
12023
|
{
|
|
12174
12024
|
...props,
|
|
12175
12025
|
className: (0, import_clsx19.default)("hidden", { "desktop:flex": !isMobileOpen }, props.className)
|
|
12176
12026
|
}
|
|
12177
12027
|
),
|
|
12178
|
-
/* @__PURE__ */ (0,
|
|
12028
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
12179
12029
|
Button,
|
|
12180
12030
|
{
|
|
12181
12031
|
layout: "icon",
|
|
@@ -12186,10 +12036,10 @@ var Navigation = ({ ...props }) => {
|
|
|
12186
12036
|
"aria-haspopup": "true",
|
|
12187
12037
|
"aria-expanded": isMobileOpen,
|
|
12188
12038
|
"aria-controls": "navigation-menu-" + id,
|
|
12189
|
-
children: /* @__PURE__ */ (0,
|
|
12039
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react10.Menu, { className: "w-6 h-6" })
|
|
12190
12040
|
}
|
|
12191
12041
|
),
|
|
12192
|
-
/* @__PURE__ */ (0,
|
|
12042
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
12193
12043
|
"div",
|
|
12194
12044
|
{
|
|
12195
12045
|
id: "navigation-menu-" + id,
|
|
@@ -12211,17 +12061,17 @@ var Navigation = ({ ...props }) => {
|
|
|
12211
12061
|
),
|
|
12212
12062
|
style: { zIndex },
|
|
12213
12063
|
children: [
|
|
12214
|
-
/* @__PURE__ */ (0,
|
|
12064
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
12215
12065
|
Button,
|
|
12216
12066
|
{
|
|
12217
12067
|
layout: "icon",
|
|
12218
12068
|
coloringStyle: "text",
|
|
12219
12069
|
color: "neutral",
|
|
12220
12070
|
onClick: () => setIsMobileOpen(false),
|
|
12221
|
-
children: /* @__PURE__ */ (0,
|
|
12071
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react10.XIcon, {})
|
|
12222
12072
|
}
|
|
12223
12073
|
),
|
|
12224
|
-
/* @__PURE__ */ (0,
|
|
12074
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(NavigationItemList, { ...props, className: (0, import_clsx19.default)("flex-col-8", props.className) })
|
|
12225
12075
|
]
|
|
12226
12076
|
}
|
|
12227
12077
|
)
|
|
@@ -12229,10 +12079,10 @@ var Navigation = ({ ...props }) => {
|
|
|
12229
12079
|
};
|
|
12230
12080
|
|
|
12231
12081
|
// src/components/layout/navigation/Pagination.tsx
|
|
12232
|
-
var
|
|
12082
|
+
var import_lucide_react11 = require("lucide-react");
|
|
12233
12083
|
var import_clsx20 = __toESM(require("clsx"));
|
|
12234
|
-
var
|
|
12235
|
-
var
|
|
12084
|
+
var import_react41 = require("react");
|
|
12085
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12236
12086
|
var Pagination = ({
|
|
12237
12087
|
pageIndex,
|
|
12238
12088
|
pageCount,
|
|
@@ -12241,11 +12091,11 @@ var Pagination = ({
|
|
|
12241
12091
|
style
|
|
12242
12092
|
}) => {
|
|
12243
12093
|
const translation = useHightideTranslation();
|
|
12244
|
-
const [value, setValue] = (0,
|
|
12094
|
+
const [value, setValue] = (0, import_react41.useState)((pageIndex + 1).toString());
|
|
12245
12095
|
const noPages = pageCount === 0;
|
|
12246
12096
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
12247
12097
|
const onLastPage = pageIndex === pageCount - 1;
|
|
12248
|
-
(0,
|
|
12098
|
+
(0, import_react41.useEffect)(() => {
|
|
12249
12099
|
if (noPages) {
|
|
12250
12100
|
setValue("0");
|
|
12251
12101
|
} else {
|
|
@@ -12255,8 +12105,8 @@ var Pagination = ({
|
|
|
12255
12105
|
const changePage = (page) => {
|
|
12256
12106
|
onPageChanged(page);
|
|
12257
12107
|
};
|
|
12258
|
-
return /* @__PURE__ */ (0,
|
|
12259
|
-
/* @__PURE__ */ (0,
|
|
12108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: (0, import_clsx20.default)("flex-row-1", className), style, children: [
|
|
12109
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12260
12110
|
Button,
|
|
12261
12111
|
{
|
|
12262
12112
|
layout: "icon",
|
|
@@ -12264,10 +12114,10 @@ var Pagination = ({
|
|
|
12264
12114
|
color: "neutral",
|
|
12265
12115
|
onClick: () => changePage(0),
|
|
12266
12116
|
disabled: onFirstPage || noPages,
|
|
12267
|
-
children: /* @__PURE__ */ (0,
|
|
12117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react11.ChevronFirst, {})
|
|
12268
12118
|
}
|
|
12269
12119
|
),
|
|
12270
|
-
/* @__PURE__ */ (0,
|
|
12120
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12271
12121
|
Button,
|
|
12272
12122
|
{
|
|
12273
12123
|
layout: "icon",
|
|
@@ -12275,11 +12125,11 @@ var Pagination = ({
|
|
|
12275
12125
|
color: "neutral",
|
|
12276
12126
|
onClick: () => changePage(pageIndex - 1),
|
|
12277
12127
|
disabled: onFirstPage || noPages,
|
|
12278
|
-
children: /* @__PURE__ */ (0,
|
|
12128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react11.ChevronLeft, {})
|
|
12279
12129
|
}
|
|
12280
12130
|
),
|
|
12281
|
-
/* @__PURE__ */ (0,
|
|
12282
|
-
/* @__PURE__ */ (0,
|
|
12131
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
|
|
12132
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12283
12133
|
Input,
|
|
12284
12134
|
{
|
|
12285
12135
|
value,
|
|
@@ -12303,8 +12153,8 @@ var Pagination = ({
|
|
|
12303
12153
|
editCompleteOptions: { delay: 800 }
|
|
12304
12154
|
}
|
|
12305
12155
|
),
|
|
12306
|
-
/* @__PURE__ */ (0,
|
|
12307
|
-
/* @__PURE__ */ (0,
|
|
12156
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "select-none w-10", children: translation("of") }),
|
|
12157
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12308
12158
|
"span",
|
|
12309
12159
|
{
|
|
12310
12160
|
className: "flex-row-2 w-24 items-center justify-center select-none h-10 bg-input-background text-input-text rounded-md font-bold",
|
|
@@ -12312,7 +12162,7 @@ var Pagination = ({
|
|
|
12312
12162
|
}
|
|
12313
12163
|
)
|
|
12314
12164
|
] }),
|
|
12315
|
-
/* @__PURE__ */ (0,
|
|
12165
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12316
12166
|
Button,
|
|
12317
12167
|
{
|
|
12318
12168
|
layout: "icon",
|
|
@@ -12320,10 +12170,10 @@ var Pagination = ({
|
|
|
12320
12170
|
color: "neutral",
|
|
12321
12171
|
onClick: () => changePage(pageIndex + 1),
|
|
12322
12172
|
disabled: onLastPage || noPages,
|
|
12323
|
-
children: /* @__PURE__ */ (0,
|
|
12173
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react11.ChevronRight, {})
|
|
12324
12174
|
}
|
|
12325
12175
|
),
|
|
12326
|
-
/* @__PURE__ */ (0,
|
|
12176
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12327
12177
|
Button,
|
|
12328
12178
|
{
|
|
12329
12179
|
layout: "icon",
|
|
@@ -12331,16 +12181,16 @@ var Pagination = ({
|
|
|
12331
12181
|
color: "neutral",
|
|
12332
12182
|
onClick: () => changePage(pageCount - 1),
|
|
12333
12183
|
disabled: onLastPage || noPages,
|
|
12334
|
-
children: /* @__PURE__ */ (0,
|
|
12184
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react11.ChevronLast, {})
|
|
12335
12185
|
}
|
|
12336
12186
|
)
|
|
12337
12187
|
] });
|
|
12338
12188
|
};
|
|
12339
12189
|
|
|
12340
12190
|
// src/components/layout/navigation/StepperBar.tsx
|
|
12341
|
-
var
|
|
12191
|
+
var import_lucide_react12 = require("lucide-react");
|
|
12342
12192
|
var import_clsx21 = __toESM(require("clsx"));
|
|
12343
|
-
var
|
|
12193
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
12344
12194
|
var defaultState = {
|
|
12345
12195
|
currentStep: 0,
|
|
12346
12196
|
seenSteps: /* @__PURE__ */ new Set([0])
|
|
@@ -12362,12 +12212,12 @@ var StepperBar = ({
|
|
|
12362
12212
|
seenSteps.add(newStep);
|
|
12363
12213
|
onChange({ currentStep: newStep, seenSteps });
|
|
12364
12214
|
};
|
|
12365
|
-
return /* @__PURE__ */ (0,
|
|
12215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12366
12216
|
"div",
|
|
12367
12217
|
{
|
|
12368
12218
|
className: (0, import_clsx21.default)("flex-row-2 justify-between", className),
|
|
12369
12219
|
children: [
|
|
12370
|
-
/* @__PURE__ */ (0,
|
|
12220
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12371
12221
|
Button,
|
|
12372
12222
|
{
|
|
12373
12223
|
disabled: currentStep === 0 || disabledSteps.has(currentStep),
|
|
@@ -12376,14 +12226,14 @@ var StepperBar = ({
|
|
|
12376
12226
|
},
|
|
12377
12227
|
className: "flex-row-1 items-center justify-center",
|
|
12378
12228
|
children: [
|
|
12379
|
-
/* @__PURE__ */ (0,
|
|
12229
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react12.ChevronLeft, { size: 14 }),
|
|
12380
12230
|
translation("back")
|
|
12381
12231
|
]
|
|
12382
12232
|
}
|
|
12383
12233
|
) }),
|
|
12384
|
-
/* @__PURE__ */ (0,
|
|
12234
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-row-2 flex-[5] justify-center items-center", children: showDots && dots.map((value, index) => {
|
|
12385
12235
|
const seen = seenSteps.has(index);
|
|
12386
|
-
return /* @__PURE__ */ (0,
|
|
12236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12387
12237
|
"div",
|
|
12388
12238
|
{
|
|
12389
12239
|
onClick: () => seen && update(index),
|
|
@@ -12403,7 +12253,7 @@ var StepperBar = ({
|
|
|
12403
12253
|
index
|
|
12404
12254
|
);
|
|
12405
12255
|
}) }),
|
|
12406
|
-
currentStep !== numberOfSteps && /* @__PURE__ */ (0,
|
|
12256
|
+
currentStep !== numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12407
12257
|
Button,
|
|
12408
12258
|
{
|
|
12409
12259
|
onClick: () => update(currentStep + 1),
|
|
@@ -12411,18 +12261,18 @@ var StepperBar = ({
|
|
|
12411
12261
|
disabled: disabledSteps.has(currentStep),
|
|
12412
12262
|
children: [
|
|
12413
12263
|
translation("next"),
|
|
12414
|
-
/* @__PURE__ */ (0,
|
|
12264
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react12.ChevronRight, { size: 14 })
|
|
12415
12265
|
]
|
|
12416
12266
|
}
|
|
12417
12267
|
) }),
|
|
12418
|
-
currentStep === numberOfSteps && /* @__PURE__ */ (0,
|
|
12268
|
+
currentStep === numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
12419
12269
|
Button,
|
|
12420
12270
|
{
|
|
12421
12271
|
disabled: disabledSteps.has(currentStep),
|
|
12422
12272
|
onClick: onFinish,
|
|
12423
12273
|
className: "flex-row-1 items-center justify-center",
|
|
12424
12274
|
children: [
|
|
12425
|
-
/* @__PURE__ */ (0,
|
|
12275
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react12.Check, { size: 14 }),
|
|
12426
12276
|
finishText ?? translation("confirm")
|
|
12427
12277
|
]
|
|
12428
12278
|
}
|
|
@@ -12433,7 +12283,7 @@ var StepperBar = ({
|
|
|
12433
12283
|
};
|
|
12434
12284
|
var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
|
|
12435
12285
|
const [usedState, setUsedState] = useOverwritableState(state, onChange);
|
|
12436
|
-
return /* @__PURE__ */ (0,
|
|
12286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
12437
12287
|
StepperBar,
|
|
12438
12288
|
{
|
|
12439
12289
|
...props,
|
|
@@ -12444,15 +12294,15 @@ var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
|
|
|
12444
12294
|
};
|
|
12445
12295
|
|
|
12446
12296
|
// src/components/layout/table/FillerCell.tsx
|
|
12447
|
-
var
|
|
12448
|
-
var
|
|
12297
|
+
var import_lucide_react13 = require("lucide-react");
|
|
12298
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12449
12299
|
var FillerCell = ({ ...props }) => {
|
|
12450
|
-
return /* @__PURE__ */ (0,
|
|
12300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
12451
12301
|
"div",
|
|
12452
12302
|
{
|
|
12453
12303
|
...props,
|
|
12454
12304
|
"data-name": PropsUtil.dataAttributes.name("table-filler-cell"),
|
|
12455
|
-
children: /* @__PURE__ */ (0,
|
|
12305
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react13.Minus, { className: "max-w-4 max-h-4" })
|
|
12456
12306
|
}
|
|
12457
12307
|
);
|
|
12458
12308
|
};
|
|
@@ -12478,18 +12328,18 @@ var import_react_table = require("@tanstack/react-table");
|
|
|
12478
12328
|
|
|
12479
12329
|
// src/components/layout/table/TableCell.tsx
|
|
12480
12330
|
var import_clsx22 = require("clsx");
|
|
12481
|
-
var
|
|
12331
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12482
12332
|
var TableCell = ({
|
|
12483
12333
|
children,
|
|
12484
12334
|
className
|
|
12485
12335
|
}) => {
|
|
12486
|
-
return /* @__PURE__ */ (0,
|
|
12336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: (0, import_clsx22.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
|
|
12487
12337
|
};
|
|
12488
12338
|
|
|
12489
12339
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
12490
|
-
var
|
|
12340
|
+
var import_react42 = require("react");
|
|
12491
12341
|
var useResizeCallbackWrapper = (callback) => {
|
|
12492
|
-
(0,
|
|
12342
|
+
(0, import_react42.useEffect)(() => {
|
|
12493
12343
|
window.addEventListener("resize", callback);
|
|
12494
12344
|
return () => {
|
|
12495
12345
|
window.removeEventListener("resize", callback);
|
|
@@ -12498,41 +12348,37 @@ var useResizeCallbackWrapper = (callback) => {
|
|
|
12498
12348
|
};
|
|
12499
12349
|
|
|
12500
12350
|
// src/components/layout/table/TableSortButton.tsx
|
|
12501
|
-
var
|
|
12351
|
+
var import_lucide_react14 = require("lucide-react");
|
|
12502
12352
|
var import_clsx24 = __toESM(require("clsx"));
|
|
12503
12353
|
|
|
12504
12354
|
// src/components/user-interaction/Tooltip.tsx
|
|
12355
|
+
var import_react43 = require("react");
|
|
12356
|
+
var import_react44 = require("react");
|
|
12505
12357
|
var import_react45 = require("react");
|
|
12506
12358
|
var import_clsx23 = require("clsx");
|
|
12507
12359
|
var import_react_dom6 = require("react-dom");
|
|
12508
|
-
var
|
|
12360
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
12509
12361
|
var Tooltip = ({
|
|
12510
12362
|
tooltip,
|
|
12511
12363
|
children,
|
|
12512
|
-
appearDelay:
|
|
12513
|
-
disappearDelay: disappearDelayOverwrite,
|
|
12364
|
+
appearDelay: appearOverwrite,
|
|
12514
12365
|
tooltipClassName,
|
|
12515
12366
|
containerClassName,
|
|
12516
12367
|
position = "bottom",
|
|
12517
12368
|
disabled = false
|
|
12518
12369
|
}) => {
|
|
12519
|
-
const
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
});
|
|
12370
|
+
const id = (0, import_react44.useId)();
|
|
12371
|
+
const [open, setOpen] = (0, import_react45.useState)(false);
|
|
12372
|
+
const timeoutRef = (0, import_react45.useRef)(null);
|
|
12523
12373
|
const { config } = useHightideConfig();
|
|
12524
12374
|
const appearDelay = (0, import_react45.useMemo)(
|
|
12525
|
-
() =>
|
|
12526
|
-
[config.tooltip.appearDelay
|
|
12527
|
-
);
|
|
12528
|
-
const disappearDelay = (0, import_react45.useMemo)(
|
|
12529
|
-
() => disappearDelayOverwrite ?? config.tooltip.disappearDelay,
|
|
12530
|
-
[config.tooltip.disappearDelay, disappearDelayOverwrite]
|
|
12375
|
+
() => appearOverwrite ?? config.tooltip.appearDelay,
|
|
12376
|
+
[appearOverwrite, config.tooltip.appearDelay]
|
|
12531
12377
|
);
|
|
12532
12378
|
const anchorRef = (0, import_react45.useRef)(null);
|
|
12533
12379
|
const containerRef = (0, import_react45.useRef)(null);
|
|
12534
12380
|
const triangleRef = (0, import_react45.useRef)(null);
|
|
12535
|
-
const isActive = !disabled &&
|
|
12381
|
+
const isActive = !disabled && open;
|
|
12536
12382
|
const { isVisible, transitionState, callbacks } = useTransitionState(
|
|
12537
12383
|
(0, import_react45.useMemo)(() => ({ isOpen: isActive }), [isActive])
|
|
12538
12384
|
);
|
|
@@ -12561,66 +12407,62 @@ var Tooltip = ({
|
|
|
12561
12407
|
const regsitryOptions = (0, import_react45.useMemo)(() => ({ isActive }), [isActive]);
|
|
12562
12408
|
const { zIndex } = useOverlayRegistry(regsitryOptions);
|
|
12563
12409
|
const { zIndex: zIndexTriangle } = useOverlayRegistry(regsitryOptions);
|
|
12564
|
-
const
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12410
|
+
const openWithDelay = (0, import_react45.useCallback)(() => {
|
|
12411
|
+
if (timeoutRef.current || open) return;
|
|
12412
|
+
timeoutRef.current = window.setTimeout(() => {
|
|
12413
|
+
timeoutRef.current = null;
|
|
12414
|
+
setOpen(true);
|
|
12415
|
+
}, appearDelay);
|
|
12416
|
+
}, [appearDelay, open]);
|
|
12417
|
+
const close3 = (0, import_react45.useCallback)(() => {
|
|
12418
|
+
if (timeoutRef.current) {
|
|
12419
|
+
clearTimeout(timeoutRef.current);
|
|
12420
|
+
timeoutRef.current = null;
|
|
12421
|
+
}
|
|
12422
|
+
setOpen(false);
|
|
12423
|
+
}, []);
|
|
12424
|
+
(0, import_react43.useEffect)(() => {
|
|
12425
|
+
if (!open) return;
|
|
12426
|
+
const closeOnBlur = () => close3();
|
|
12427
|
+
const closeOnScroll = () => close3();
|
|
12428
|
+
window.addEventListener("blur", closeOnBlur);
|
|
12429
|
+
window.addEventListener("scroll", closeOnScroll, true);
|
|
12430
|
+
return () => {
|
|
12431
|
+
window.removeEventListener("blur", closeOnBlur);
|
|
12432
|
+
window.removeEventListener("scroll", closeOnScroll, true);
|
|
12433
|
+
};
|
|
12434
|
+
}, [open, close3]);
|
|
12435
|
+
(0, import_react43.useEffect)(() => {
|
|
12436
|
+
return () => {
|
|
12437
|
+
if (timeoutRef.current) {
|
|
12438
|
+
clearTimeout(timeoutRef.current);
|
|
12592
12439
|
}
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
timer: setTimeout(() => {
|
|
12597
|
-
setState((prevState2) => {
|
|
12598
|
-
clearTimeout(prevState2.timer);
|
|
12599
|
-
return { ...prevState2, isShown: false, timer: null };
|
|
12600
|
-
});
|
|
12601
|
-
}, disappearDelay)
|
|
12602
|
-
};
|
|
12603
|
-
});
|
|
12604
|
-
}, [disappearDelay]);
|
|
12605
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
12440
|
+
};
|
|
12441
|
+
}, []);
|
|
12442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
12606
12443
|
"div",
|
|
12607
12444
|
{
|
|
12608
12445
|
ref: anchorRef,
|
|
12609
12446
|
className: (0, import_clsx23.clsx)("relative inline-block", containerClassName),
|
|
12610
|
-
|
|
12611
|
-
|
|
12447
|
+
"aria-describedby": isVisible ? id : void 0,
|
|
12448
|
+
onPointerEnter: openWithDelay,
|
|
12449
|
+
onPointerLeave: close3,
|
|
12450
|
+
onPointerCancel: close3,
|
|
12451
|
+
onFocus: openWithDelay,
|
|
12452
|
+
onBlur: close3,
|
|
12612
12453
|
children: [
|
|
12613
12454
|
children,
|
|
12614
|
-
/* @__PURE__ */ (0,
|
|
12455
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Visibility, { isVisible: isActive || isVisible, children: [
|
|
12615
12456
|
(0, import_react_dom6.createPortal)(
|
|
12616
|
-
/* @__PURE__ */ (0,
|
|
12457
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
12617
12458
|
"div",
|
|
12618
12459
|
{
|
|
12619
12460
|
ref: containerRef,
|
|
12461
|
+
id,
|
|
12620
12462
|
...callbacks,
|
|
12621
|
-
onPointerEnter: onEnter,
|
|
12622
12463
|
"data-name": PropsUtil.dataAttributes.name("tooltip"),
|
|
12623
12464
|
"data-state": transitionState,
|
|
12465
|
+
role: "tooltip",
|
|
12624
12466
|
className: tooltipClassName,
|
|
12625
12467
|
style: { ...css, zIndex },
|
|
12626
12468
|
children: tooltip
|
|
@@ -12629,7 +12471,7 @@ var Tooltip = ({
|
|
|
12629
12471
|
document.body
|
|
12630
12472
|
),
|
|
12631
12473
|
(0, import_react_dom6.createPortal)(
|
|
12632
|
-
/* @__PURE__ */ (0,
|
|
12474
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
12633
12475
|
"div",
|
|
12634
12476
|
{
|
|
12635
12477
|
ref: triangleRef,
|
|
@@ -12648,7 +12490,7 @@ var Tooltip = ({
|
|
|
12648
12490
|
};
|
|
12649
12491
|
|
|
12650
12492
|
// src/components/layout/table/TableSortButton.tsx
|
|
12651
|
-
var
|
|
12493
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
12652
12494
|
var TableSortButton = ({
|
|
12653
12495
|
sortDirection,
|
|
12654
12496
|
invert = false,
|
|
@@ -12660,16 +12502,16 @@ var TableSortButton = ({
|
|
|
12660
12502
|
}) => {
|
|
12661
12503
|
const translation = useHightideTranslation();
|
|
12662
12504
|
const { sortingsCount, index } = sortingIndexDisplay;
|
|
12663
|
-
let icon = /* @__PURE__ */ (0,
|
|
12505
|
+
let icon = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react14.ChevronsUpDown, { className: "size-4" });
|
|
12664
12506
|
if (sortDirection) {
|
|
12665
12507
|
let usedSortDirection = sortDirection;
|
|
12666
12508
|
if (invert) {
|
|
12667
12509
|
usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
|
|
12668
12510
|
}
|
|
12669
|
-
icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0,
|
|
12511
|
+
icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react14.ChevronUp, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react14.ChevronDown, { className: "size-4" });
|
|
12670
12512
|
}
|
|
12671
12513
|
const hasSortingIndex = !!sortingIndexDisplay && sortingsCount > 1 && index > 0;
|
|
12672
|
-
return /* @__PURE__ */ (0,
|
|
12514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Tooltip, { tooltip: translation("rSortingOrderAfter", { otherSortings: index - 1 }), disabled: !hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
12673
12515
|
Button,
|
|
12674
12516
|
{
|
|
12675
12517
|
layout: hasSortingIndex ? "default" : "icon",
|
|
@@ -12678,7 +12520,7 @@ var TableSortButton = ({
|
|
|
12678
12520
|
className: (0, import_clsx24.default)("relative", className),
|
|
12679
12521
|
...props,
|
|
12680
12522
|
children: [
|
|
12681
|
-
/* @__PURE__ */ (0,
|
|
12523
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
12682
12524
|
"div",
|
|
12683
12525
|
{
|
|
12684
12526
|
className: (0, import_clsx24.default)("absolute bottom-0 right-1/2 translate-x-1/2 translate-y-2/3 z-1 primary coloring-solid rounded-full h-4 w-5 text-sm"),
|
|
@@ -12692,7 +12534,7 @@ var TableSortButton = ({
|
|
|
12692
12534
|
};
|
|
12693
12535
|
|
|
12694
12536
|
// src/components/layout/table/TableFilterButton.tsx
|
|
12695
|
-
var
|
|
12537
|
+
var import_lucide_react15 = require("lucide-react");
|
|
12696
12538
|
|
|
12697
12539
|
// src/components/user-interaction/Menu.tsx
|
|
12698
12540
|
var import_react48 = require("react");
|
|
@@ -12831,14 +12673,14 @@ var useOutsideClick = (refs, handler) => {
|
|
|
12831
12673
|
};
|
|
12832
12674
|
|
|
12833
12675
|
// src/components/user-interaction/Menu.tsx
|
|
12834
|
-
var
|
|
12676
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
12835
12677
|
var MenuItem = ({
|
|
12836
12678
|
children,
|
|
12837
12679
|
onClick,
|
|
12838
12680
|
alignment = "left",
|
|
12839
12681
|
isDisabled = false,
|
|
12840
12682
|
className
|
|
12841
|
-
}) => /* @__PURE__ */ (0,
|
|
12683
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12842
12684
|
"div",
|
|
12843
12685
|
{
|
|
12844
12686
|
className: (0, import_clsx25.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
|
|
@@ -12910,9 +12752,9 @@ var Menu = ({
|
|
|
12910
12752
|
const { zIndex } = useOverlayRegistry({
|
|
12911
12753
|
isActive: isOpen
|
|
12912
12754
|
});
|
|
12913
|
-
return /* @__PURE__ */ (0,
|
|
12755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
12914
12756
|
trigger(bag, (0, import_react48.useCallback)((el) => triggerRef.current = el, [])),
|
|
12915
|
-
(0, import_react_dom7.createPortal)(/* @__PURE__ */ (0,
|
|
12757
|
+
(0, import_react_dom7.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12916
12758
|
"div",
|
|
12917
12759
|
{
|
|
12918
12760
|
ref: menuRef,
|
|
@@ -12943,7 +12785,7 @@ var Menu = ({
|
|
|
12943
12785
|
|
|
12944
12786
|
// src/components/layout/table/TableFilterButton.tsx
|
|
12945
12787
|
var import_react49 = require("react");
|
|
12946
|
-
var
|
|
12788
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12947
12789
|
var TableFilterButton = ({
|
|
12948
12790
|
filterType,
|
|
12949
12791
|
column
|
|
@@ -12955,21 +12797,21 @@ var TableFilterButton = ({
|
|
|
12955
12797
|
(0, import_react49.useEffect)(() => {
|
|
12956
12798
|
setFilterValue(columnFilterValue);
|
|
12957
12799
|
}, [columnFilterValue]);
|
|
12958
|
-
return /* @__PURE__ */ (0,
|
|
12800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12959
12801
|
Menu,
|
|
12960
12802
|
{
|
|
12961
|
-
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0,
|
|
12962
|
-
/* @__PURE__ */ (0,
|
|
12803
|
+
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { ref, className: "relative", children: [
|
|
12804
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12963
12805
|
Button,
|
|
12964
12806
|
{
|
|
12965
12807
|
layout: "icon",
|
|
12966
12808
|
color: "neutral",
|
|
12967
12809
|
size: "xs",
|
|
12968
12810
|
onClick: toggleOpen,
|
|
12969
|
-
children: /* @__PURE__ */ (0,
|
|
12811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react15.FilterIcon, { className: "size-4" })
|
|
12970
12812
|
}
|
|
12971
12813
|
),
|
|
12972
|
-
hasFilter && /* @__PURE__ */ (0,
|
|
12814
|
+
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12973
12815
|
"div",
|
|
12974
12816
|
{
|
|
12975
12817
|
className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
|
|
@@ -12977,9 +12819,9 @@ var TableFilterButton = ({
|
|
|
12977
12819
|
}
|
|
12978
12820
|
)
|
|
12979
12821
|
] }),
|
|
12980
|
-
children: ({ close: close3 }) => /* @__PURE__ */ (0,
|
|
12981
|
-
/* @__PURE__ */ (0,
|
|
12982
|
-
filterType === "text" && /* @__PURE__ */ (0,
|
|
12822
|
+
children: ({ close: close3 }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
|
|
12823
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
|
|
12824
|
+
filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12983
12825
|
Input,
|
|
12984
12826
|
{
|
|
12985
12827
|
value: filterValue ?? "",
|
|
@@ -12989,8 +12831,8 @@ var TableFilterButton = ({
|
|
|
12989
12831
|
className: "h-10"
|
|
12990
12832
|
}
|
|
12991
12833
|
),
|
|
12992
|
-
filterType === "range" && /* @__PURE__ */ (0,
|
|
12993
|
-
/* @__PURE__ */ (0,
|
|
12834
|
+
filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-row-2 items-center", children: [
|
|
12835
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12994
12836
|
Input,
|
|
12995
12837
|
{
|
|
12996
12838
|
value: filterValue?.[0].toString() ?? "",
|
|
@@ -13003,8 +12845,8 @@ var TableFilterButton = ({
|
|
|
13003
12845
|
className: "h-10 input-indicator-hidden w-40"
|
|
13004
12846
|
}
|
|
13005
12847
|
),
|
|
13006
|
-
/* @__PURE__ */ (0,
|
|
13007
|
-
/* @__PURE__ */ (0,
|
|
12848
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "font-bold", children: "-" }),
|
|
12849
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
13008
12850
|
Input,
|
|
13009
12851
|
{
|
|
13010
12852
|
value: filterValue?.[1].toString() ?? "",
|
|
@@ -13018,8 +12860,8 @@ var TableFilterButton = ({
|
|
|
13018
12860
|
}
|
|
13019
12861
|
)
|
|
13020
12862
|
] }),
|
|
13021
|
-
filterType === "dateRange" && /* @__PURE__ */ (0,
|
|
13022
|
-
/* @__PURE__ */ (0,
|
|
12863
|
+
filterType === "dateRange" && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
12864
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
13023
12865
|
Input,
|
|
13024
12866
|
{
|
|
13025
12867
|
value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
|
|
@@ -13032,7 +12874,7 @@ var TableFilterButton = ({
|
|
|
13032
12874
|
className: "h-10 w-50"
|
|
13033
12875
|
}
|
|
13034
12876
|
),
|
|
13035
|
-
/* @__PURE__ */ (0,
|
|
12877
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
13036
12878
|
Input,
|
|
13037
12879
|
{
|
|
13038
12880
|
value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
|
|
@@ -13046,12 +12888,12 @@ var TableFilterButton = ({
|
|
|
13046
12888
|
}
|
|
13047
12889
|
)
|
|
13048
12890
|
] }),
|
|
13049
|
-
/* @__PURE__ */ (0,
|
|
13050
|
-
hasFilter && /* @__PURE__ */ (0,
|
|
12891
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
12892
|
+
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { color: "negative", size: "sm", onClick: () => {
|
|
13051
12893
|
column.setFilterValue(void 0);
|
|
13052
12894
|
close3();
|
|
13053
12895
|
}, children: translation("remove") }),
|
|
13054
|
-
/* @__PURE__ */ (0,
|
|
12896
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button, { size: "sm", onClick: () => {
|
|
13055
12897
|
column.setFilterValue(filterValue);
|
|
13056
12898
|
close3();
|
|
13057
12899
|
}, children: translation("apply") })
|
|
@@ -13062,9 +12904,9 @@ var TableFilterButton = ({
|
|
|
13062
12904
|
};
|
|
13063
12905
|
|
|
13064
12906
|
// src/components/user-interaction/Checkbox.tsx
|
|
13065
|
-
var
|
|
12907
|
+
var import_lucide_react16 = require("lucide-react");
|
|
13066
12908
|
var import_react50 = require("react");
|
|
13067
|
-
var
|
|
12909
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
13068
12910
|
var Checkbox = ({
|
|
13069
12911
|
value = false,
|
|
13070
12912
|
indeterminate = false,
|
|
@@ -13082,7 +12924,7 @@ var Checkbox = ({
|
|
|
13082
12924
|
onValueChange?.(!value);
|
|
13083
12925
|
onEditComplete?.(!value);
|
|
13084
12926
|
}, [onEditComplete, onValueChange, value]);
|
|
13085
|
-
return /* @__PURE__ */ (0,
|
|
12927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
13086
12928
|
"div",
|
|
13087
12929
|
{
|
|
13088
12930
|
...props,
|
|
@@ -13109,8 +12951,8 @@ var Checkbox = ({
|
|
|
13109
12951
|
"aria-checked": indeterminate ? "mixed" : value,
|
|
13110
12952
|
...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
|
|
13111
12953
|
children: [
|
|
13112
|
-
/* @__PURE__ */ (0,
|
|
13113
|
-
/* @__PURE__ */ (0,
|
|
12954
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react16.Minus, { "data-name": "checkbox-indicator", "aria-hidden": true }) }),
|
|
12955
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react16.Check, { "data-name": "checkbox-indicator", "aria-hidden": true }) })
|
|
13114
12956
|
]
|
|
13115
12957
|
}
|
|
13116
12958
|
);
|
|
@@ -13121,7 +12963,7 @@ var CheckboxUncontrolled = ({
|
|
|
13121
12963
|
...props
|
|
13122
12964
|
}) => {
|
|
13123
12965
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
13124
|
-
return /* @__PURE__ */ (0,
|
|
12966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
13125
12967
|
Checkbox,
|
|
13126
12968
|
{
|
|
13127
12969
|
...props,
|
|
@@ -13132,7 +12974,7 @@ var CheckboxUncontrolled = ({
|
|
|
13132
12974
|
};
|
|
13133
12975
|
|
|
13134
12976
|
// src/components/layout/table/Table.tsx
|
|
13135
|
-
var
|
|
12977
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
13136
12978
|
var Table = ({
|
|
13137
12979
|
data,
|
|
13138
12980
|
fillerRow,
|
|
@@ -13252,7 +13094,7 @@ var Table = ({
|
|
|
13252
13094
|
minSize: 60,
|
|
13253
13095
|
maxSize: 700,
|
|
13254
13096
|
cell: ({ cell }) => {
|
|
13255
|
-
return /* @__PURE__ */ (0,
|
|
13097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { children: cell.getValue() });
|
|
13256
13098
|
},
|
|
13257
13099
|
...defaultColumn
|
|
13258
13100
|
},
|
|
@@ -13337,8 +13179,8 @@ var Table = ({
|
|
|
13337
13179
|
}
|
|
13338
13180
|
return colSizes;
|
|
13339
13181
|
}, [table.getState().columnSizingInfo, table.getState().columnSizing]);
|
|
13340
|
-
return /* @__PURE__ */ (0,
|
|
13341
|
-
/* @__PURE__ */ (0,
|
|
13182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { ref, "data-name": PropsUtil.dataAttributes.name("table-container"), className, children: [
|
|
13183
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { "data-name": PropsUtil.dataAttributes.name("table-scroll-wrapper"), className: tableContainerClassName, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
13342
13184
|
"table",
|
|
13343
13185
|
{
|
|
13344
13186
|
ref: tableRef,
|
|
@@ -13349,7 +13191,7 @@ var Table = ({
|
|
|
13349
13191
|
},
|
|
13350
13192
|
className: tableClassName,
|
|
13351
13193
|
children: [
|
|
13352
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0,
|
|
13194
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13353
13195
|
"col",
|
|
13354
13196
|
{
|
|
13355
13197
|
style: {
|
|
@@ -13360,16 +13202,16 @@ var Table = ({
|
|
|
13360
13202
|
},
|
|
13361
13203
|
header.id
|
|
13362
13204
|
)) }, headerGroup.id)),
|
|
13363
|
-
/* @__PURE__ */ (0,
|
|
13364
|
-
return /* @__PURE__ */ (0,
|
|
13205
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { "data-name": PropsUtil.dataAttributes.name("table-header-row"), className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
|
|
13206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
13365
13207
|
"th",
|
|
13366
13208
|
{
|
|
13367
13209
|
colSpan: header.colSpan,
|
|
13368
13210
|
"data-name": PropsUtil.dataAttributes.name("table-header-cell"),
|
|
13369
13211
|
className: (0, import_clsx26.default)("group/table-header-cell", header.column.columnDef.meta?.className),
|
|
13370
13212
|
children: [
|
|
13371
|
-
/* @__PURE__ */ (0,
|
|
13372
|
-
/* @__PURE__ */ (0,
|
|
13213
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Visibility, { isVisible: !header.isPlaceholder, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex-row-1 items-center", children: [
|
|
13214
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13373
13215
|
TableSortButton,
|
|
13374
13216
|
{
|
|
13375
13217
|
sortDirection: header.column.getIsSorted(),
|
|
@@ -13395,7 +13237,7 @@ var Table = ({
|
|
|
13395
13237
|
}
|
|
13396
13238
|
}
|
|
13397
13239
|
) }),
|
|
13398
|
-
/* @__PURE__ */ (0,
|
|
13240
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Visibility, { isVisible: header.column.getCanFilter() && !!header.column.columnDef.meta?.filterType, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13399
13241
|
TableFilterButton,
|
|
13400
13242
|
{
|
|
13401
13243
|
column: header.column,
|
|
@@ -13407,7 +13249,7 @@ var Table = ({
|
|
|
13407
13249
|
header.getContext()
|
|
13408
13250
|
)
|
|
13409
13251
|
] }) }),
|
|
13410
|
-
/* @__PURE__ */ (0,
|
|
13252
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13411
13253
|
"div",
|
|
13412
13254
|
{
|
|
13413
13255
|
onPointerDown: header.getResizeHandler(),
|
|
@@ -13428,16 +13270,16 @@ var Table = ({
|
|
|
13428
13270
|
header.id
|
|
13429
13271
|
);
|
|
13430
13272
|
}) }, headerGroup.id)) }),
|
|
13431
|
-
/* @__PURE__ */ (0,
|
|
13273
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("tbody", { children: [
|
|
13432
13274
|
table.getRowModel().rows.map((row) => {
|
|
13433
|
-
return /* @__PURE__ */ (0,
|
|
13275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13434
13276
|
"tr",
|
|
13435
13277
|
{
|
|
13436
13278
|
onClick: () => onRowClick?.(row, table),
|
|
13437
13279
|
"data-name": "table-body-row",
|
|
13438
13280
|
className: BagFunctionUtil.resolve(table.options.meta?.bodyRowClassName, row.original),
|
|
13439
13281
|
children: row.getVisibleCells().map((cell) => {
|
|
13440
|
-
return /* @__PURE__ */ (0,
|
|
13282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { "data-name": "table-body-cell", children: (0, import_react_table.flexRender)(
|
|
13441
13283
|
cell.column.columnDef.cell,
|
|
13442
13284
|
cell.getContext()
|
|
13443
13285
|
) }, cell.id);
|
|
@@ -13447,15 +13289,15 @@ var Table = ({
|
|
|
13447
13289
|
);
|
|
13448
13290
|
}),
|
|
13449
13291
|
range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
|
|
13450
|
-
return /* @__PURE__ */ (0,
|
|
13451
|
-
return /* @__PURE__ */ (0,
|
|
13292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { "data-name": "table-body-filler-row", children: columns.map((column) => {
|
|
13293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { "data-name": "table-body-filler-cell", children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FillerCell, {}) }, column.id);
|
|
13452
13294
|
}) }, "filler-row-" + index);
|
|
13453
13295
|
})
|
|
13454
13296
|
] })
|
|
13455
13297
|
]
|
|
13456
13298
|
}
|
|
13457
13299
|
) }),
|
|
13458
|
-
/* @__PURE__ */ (0,
|
|
13300
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13459
13301
|
Pagination,
|
|
13460
13302
|
{
|
|
13461
13303
|
pageIndex: table.getState().pagination.pageIndex,
|
|
@@ -13467,7 +13309,7 @@ var Table = ({
|
|
|
13467
13309
|
};
|
|
13468
13310
|
var TableUncontrolled = ({ data, ...props }) => {
|
|
13469
13311
|
const [usedDate] = useOverwritableState(data);
|
|
13470
|
-
return /* @__PURE__ */ (0,
|
|
13312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13471
13313
|
Table,
|
|
13472
13314
|
{
|
|
13473
13315
|
...props,
|
|
@@ -13491,7 +13333,7 @@ var TableWithSelection = ({
|
|
|
13491
13333
|
{
|
|
13492
13334
|
id: selectionRowId,
|
|
13493
13335
|
header: ({ table }) => {
|
|
13494
|
-
return /* @__PURE__ */ (0,
|
|
13336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13495
13337
|
Checkbox,
|
|
13496
13338
|
{
|
|
13497
13339
|
value: table.getIsAllRowsSelected(),
|
|
@@ -13504,7 +13346,7 @@ var TableWithSelection = ({
|
|
|
13504
13346
|
);
|
|
13505
13347
|
},
|
|
13506
13348
|
cell: ({ row }) => {
|
|
13507
|
-
return /* @__PURE__ */ (0,
|
|
13349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13508
13350
|
Checkbox,
|
|
13509
13351
|
{
|
|
13510
13352
|
disabled: !row.getCanSelect(),
|
|
@@ -13522,15 +13364,15 @@ var TableWithSelection = ({
|
|
|
13522
13364
|
...columns
|
|
13523
13365
|
];
|
|
13524
13366
|
}, [columns, selectionRowId]);
|
|
13525
|
-
return /* @__PURE__ */ (0,
|
|
13367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
13526
13368
|
Table,
|
|
13527
13369
|
{
|
|
13528
13370
|
columns: columnsWithSelection,
|
|
13529
13371
|
fillerRow: (columnId, table) => {
|
|
13530
13372
|
if (columnId === selectionRowId) {
|
|
13531
|
-
return /* @__PURE__ */ (0,
|
|
13373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Checkbox, { value: false, disabled: true, className: "max-w-6" });
|
|
13532
13374
|
}
|
|
13533
|
-
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0,
|
|
13375
|
+
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(FillerCell, {});
|
|
13534
13376
|
},
|
|
13535
13377
|
state: {
|
|
13536
13378
|
rowSelection,
|
|
@@ -13564,8 +13406,8 @@ var writeToClipboard = (text) => {
|
|
|
13564
13406
|
};
|
|
13565
13407
|
|
|
13566
13408
|
// src/components/user-interaction/CopyToClipboardWrapper.tsx
|
|
13567
|
-
var
|
|
13568
|
-
var
|
|
13409
|
+
var import_lucide_react17 = require("lucide-react");
|
|
13410
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
13569
13411
|
var CopyToClipboardWrapper = ({
|
|
13570
13412
|
children,
|
|
13571
13413
|
textToCopy,
|
|
@@ -13596,7 +13438,7 @@ var CopyToClipboardWrapper = ({
|
|
|
13596
13438
|
left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
|
|
13597
13439
|
right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
|
|
13598
13440
|
};
|
|
13599
|
-
return /* @__PURE__ */ (0,
|
|
13441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
13600
13442
|
"div",
|
|
13601
13443
|
{
|
|
13602
13444
|
className: (0, import_clsx27.clsx)("relative inline-block cursor-copy", containerClassName),
|
|
@@ -13614,7 +13456,7 @@ var CopyToClipboardWrapper = ({
|
|
|
13614
13456
|
},
|
|
13615
13457
|
children: [
|
|
13616
13458
|
children,
|
|
13617
|
-
/* @__PURE__ */ (0,
|
|
13459
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
13618
13460
|
"div",
|
|
13619
13461
|
{
|
|
13620
13462
|
className: (0, import_clsx27.clsx)(
|
|
@@ -13629,15 +13471,15 @@ var CopyToClipboardWrapper = ({
|
|
|
13629
13471
|
opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
|
|
13630
13472
|
},
|
|
13631
13473
|
children: [
|
|
13632
|
-
isShowingConfirmation && /* @__PURE__ */ (0,
|
|
13633
|
-
/* @__PURE__ */ (0,
|
|
13474
|
+
isShowingConfirmation && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex-row-1", children: [
|
|
13475
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react17.CheckIcon, { size: 16, className: "text-positive" }),
|
|
13634
13476
|
translation("copied")
|
|
13635
13477
|
] }),
|
|
13636
|
-
isShowingIndication && /* @__PURE__ */ (0,
|
|
13637
|
-
/* @__PURE__ */ (0,
|
|
13478
|
+
isShowingIndication && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex-row-1 text-description", children: [
|
|
13479
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react17.Copy, { size: 16 }),
|
|
13638
13480
|
translation("clickToCopy")
|
|
13639
13481
|
] }),
|
|
13640
|
-
/* @__PURE__ */ (0,
|
|
13482
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13641
13483
|
"div",
|
|
13642
13484
|
{
|
|
13643
13485
|
className: (0, import_clsx27.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
|
|
@@ -13655,7 +13497,7 @@ var CopyToClipboardWrapper = ({
|
|
|
13655
13497
|
// src/components/user-interaction/ScrollPicker.tsx
|
|
13656
13498
|
var import_react53 = require("react");
|
|
13657
13499
|
var import_clsx28 = __toESM(require("clsx"));
|
|
13658
|
-
var
|
|
13500
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
13659
13501
|
var up = 1;
|
|
13660
13502
|
var down = -1;
|
|
13661
13503
|
var ScrollPicker = ({
|
|
@@ -13794,7 +13636,7 @@ var ScrollPicker = ({
|
|
|
13794
13636
|
}
|
|
13795
13637
|
return clamp(1 - opacityValue / max);
|
|
13796
13638
|
};
|
|
13797
|
-
return /* @__PURE__ */ (0,
|
|
13639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13798
13640
|
"div",
|
|
13799
13641
|
{
|
|
13800
13642
|
className: "relative overflow-hidden",
|
|
@@ -13805,15 +13647,15 @@ var ScrollPicker = ({
|
|
|
13805
13647
|
setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + deltaY }));
|
|
13806
13648
|
}
|
|
13807
13649
|
},
|
|
13808
|
-
children: /* @__PURE__ */ (0,
|
|
13809
|
-
/* @__PURE__ */ (0,
|
|
13650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
|
|
13651
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13810
13652
|
"div",
|
|
13811
13653
|
{
|
|
13812
13654
|
className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/50 border-y-2 border-x-0 ",
|
|
13813
13655
|
style: { height: `${itemHeight}px` }
|
|
13814
13656
|
}
|
|
13815
13657
|
),
|
|
13816
|
-
/* @__PURE__ */ (0,
|
|
13658
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13817
13659
|
"div",
|
|
13818
13660
|
{
|
|
13819
13661
|
className: "flex-col-2 select-none",
|
|
@@ -13821,7 +13663,7 @@ var ScrollPicker = ({
|
|
|
13821
13663
|
transform: `translateY(${-transition * (distance + itemHeight)}px)`,
|
|
13822
13664
|
columnGap: `${distance}px`
|
|
13823
13665
|
},
|
|
13824
|
-
children: shownItems.map(({ name: name2, index }, arrayIndex) => /* @__PURE__ */ (0,
|
|
13666
|
+
children: shownItems.map(({ name: name2, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13825
13667
|
"div",
|
|
13826
13668
|
{
|
|
13827
13669
|
className: (0, import_clsx28.default)(
|
|
@@ -13853,7 +13695,7 @@ var ScrollPicker = ({
|
|
|
13853
13695
|
// src/components/user-interaction/Textarea.tsx
|
|
13854
13696
|
var import_react54 = require("react");
|
|
13855
13697
|
var import_clsx29 = __toESM(require("clsx"));
|
|
13856
|
-
var
|
|
13698
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
13857
13699
|
var Textarea = (0, import_react54.forwardRef)(function Textarea2({
|
|
13858
13700
|
invalid = false,
|
|
13859
13701
|
onValueChange,
|
|
@@ -13866,7 +13708,7 @@ var Textarea = (0, import_react54.forwardRef)(function Textarea2({
|
|
|
13866
13708
|
onEditComplete?.(text);
|
|
13867
13709
|
clearTimer();
|
|
13868
13710
|
};
|
|
13869
|
-
return /* @__PURE__ */ (0,
|
|
13711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13870
13712
|
"textarea",
|
|
13871
13713
|
{
|
|
13872
13714
|
...props,
|
|
@@ -13896,7 +13738,7 @@ var TextareaUncontrolled = ({
|
|
|
13896
13738
|
...props
|
|
13897
13739
|
}) => {
|
|
13898
13740
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
13899
|
-
return /* @__PURE__ */ (0,
|
|
13741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13900
13742
|
Textarea,
|
|
13901
13743
|
{
|
|
13902
13744
|
...props,
|
|
@@ -13916,7 +13758,7 @@ var TextareaWithHeadline = ({
|
|
|
13916
13758
|
}) => {
|
|
13917
13759
|
const genId = (0, import_react54.useId)();
|
|
13918
13760
|
const usedId = id ?? genId;
|
|
13919
|
-
return /* @__PURE__ */ (0,
|
|
13761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
13920
13762
|
"div",
|
|
13921
13763
|
{
|
|
13922
13764
|
className: (0, import_clsx29.default)(
|
|
@@ -13928,8 +13770,8 @@ var TextareaWithHeadline = ({
|
|
|
13928
13770
|
containerClassName
|
|
13929
13771
|
),
|
|
13930
13772
|
children: [
|
|
13931
|
-
headline && /* @__PURE__ */ (0,
|
|
13932
|
-
/* @__PURE__ */ (0,
|
|
13773
|
+
headline && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("label", { ...headlineProps, htmlFor: usedId, className: (0, import_clsx29.default)("typography-lable-md text-label", headlineProps.className), children: headline }),
|
|
13774
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13933
13775
|
Textarea,
|
|
13934
13776
|
{
|
|
13935
13777
|
...props,
|
|
@@ -13947,7 +13789,7 @@ var TextareaWithHeadline = ({
|
|
|
13947
13789
|
|
|
13948
13790
|
// src/components/user-interaction/date/DatePicker.tsx
|
|
13949
13791
|
var import_react57 = require("react");
|
|
13950
|
-
var
|
|
13792
|
+
var import_lucide_react18 = require("lucide-react");
|
|
13951
13793
|
|
|
13952
13794
|
// src/utils/date.ts
|
|
13953
13795
|
var monthsList = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"];
|
|
@@ -14124,7 +13966,7 @@ var import_clsx31 = __toESM(require("clsx"));
|
|
|
14124
13966
|
|
|
14125
13967
|
// src/components/user-interaction/date/DayPicker.tsx
|
|
14126
13968
|
var import_react55 = require("react");
|
|
14127
|
-
var
|
|
13969
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
14128
13970
|
var DayPicker = ({
|
|
14129
13971
|
displayedMonth,
|
|
14130
13972
|
value,
|
|
@@ -14147,14 +13989,14 @@ var DayPicker = ({
|
|
|
14147
13989
|
if (!providedStart) return;
|
|
14148
13990
|
return new Date(providedStart.getFullYear(), providedStart.getMonth(), providedStart.getDate());
|
|
14149
13991
|
}, [providedStart]);
|
|
14150
|
-
return /* @__PURE__ */ (0,
|
|
14151
|
-
/* @__PURE__ */ (0,
|
|
14152
|
-
weeks.map((week, index) => /* @__PURE__ */ (0,
|
|
13992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className, "data-name": "day-picker-container", children: [
|
|
13993
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { "data-name": "day-picker-header-row", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { "data-name": "day-picker-header-item", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
|
|
13994
|
+
weeks.map((week, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { "data-name": "day-picker-body-row", children: week.map((date) => {
|
|
14153
13995
|
const isSelected = !!value && DateUtils.equalDate(value, date);
|
|
14154
13996
|
const isToday = DateUtils.equalDate(/* @__PURE__ */ new Date(), date);
|
|
14155
13997
|
const isSameMonth = date.getMonth() === month;
|
|
14156
13998
|
const isDayValid = isInTimeSpan(date, start, end);
|
|
14157
|
-
return /* @__PURE__ */ (0,
|
|
13999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
14158
14000
|
"button",
|
|
14159
14001
|
{
|
|
14160
14002
|
disabled: !isDayValid,
|
|
@@ -14188,7 +14030,7 @@ var DayPickerUncontrolled = ({
|
|
|
14188
14030
|
...props
|
|
14189
14031
|
}) => {
|
|
14190
14032
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
14191
|
-
return /* @__PURE__ */ (0,
|
|
14033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
14192
14034
|
DayPicker,
|
|
14193
14035
|
{
|
|
14194
14036
|
value,
|
|
@@ -14201,7 +14043,7 @@ var DayPickerUncontrolled = ({
|
|
|
14201
14043
|
// src/components/user-interaction/date/YearMonthPicker.tsx
|
|
14202
14044
|
var import_react56 = require("react");
|
|
14203
14045
|
var import_clsx30 = __toESM(require("clsx"));
|
|
14204
|
-
var
|
|
14046
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
14205
14047
|
var YearRow = (0, import_react56.memo)(function YearRow2({
|
|
14206
14048
|
year,
|
|
14207
14049
|
selectedMonthIndex,
|
|
@@ -14219,22 +14061,22 @@ var YearRow = (0, import_react56.memo)(function YearRow2({
|
|
|
14219
14061
|
}
|
|
14220
14062
|
}, [isSelectedYear]);
|
|
14221
14063
|
const monthGrid = (0, import_react56.useMemo)(() => equalSizeGroups([...DateUtils.monthsList], 3), []);
|
|
14222
|
-
return /* @__PURE__ */ (0,
|
|
14064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
14223
14065
|
ExpandableRoot,
|
|
14224
14066
|
{
|
|
14225
14067
|
ref: isSelectedYear ? ref : void 0,
|
|
14226
14068
|
isExpanded,
|
|
14227
14069
|
onExpandedChange: setIsExpanded,
|
|
14228
14070
|
children: [
|
|
14229
|
-
/* @__PURE__ */ (0,
|
|
14230
|
-
/* @__PURE__ */ (0,
|
|
14071
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ExpandableHeader, { className: (0, import_clsx30.default)("px-2", { "text-primary font-bold": isSelectedYear }), children: year }),
|
|
14072
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ExpandableContent, { className: "gap-y-1 px-2 expadable-content-h-39", children: isExpanded && monthGrid.map((group, groupIdx) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex-row-1", children: group.map((month) => {
|
|
14231
14073
|
const monthIndex = DateUtils.monthsList.indexOf(month);
|
|
14232
14074
|
const currentTimestamp = new Date(year, monthIndex).getTime();
|
|
14233
14075
|
const isAfterStart = minTimestamp === void 0 || currentTimestamp >= minTimestamp;
|
|
14234
14076
|
const isBeforeEnd = maxTimestamp === void 0 || currentTimestamp <= maxTimestamp;
|
|
14235
14077
|
const isValid = isAfterStart && isBeforeEnd;
|
|
14236
14078
|
const isSelectedMonth = monthIndex === selectedMonthIndex;
|
|
14237
|
-
return /* @__PURE__ */ (0,
|
|
14079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
14238
14080
|
Button,
|
|
14239
14081
|
{
|
|
14240
14082
|
disabled: !isValid,
|
|
@@ -14291,7 +14133,7 @@ var YearMonthPicker = ({
|
|
|
14291
14133
|
onValueChange2?.(newDate);
|
|
14292
14134
|
onEditComplete2?.(newDate);
|
|
14293
14135
|
}, []);
|
|
14294
|
-
return /* @__PURE__ */ (0,
|
|
14136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
14295
14137
|
InfiniteScroll,
|
|
14296
14138
|
{
|
|
14297
14139
|
itemCount: years.length,
|
|
@@ -14301,7 +14143,7 @@ var YearMonthPicker = ({
|
|
|
14301
14143
|
const year = years[index];
|
|
14302
14144
|
const isSelectedYear = value.getFullYear() === year;
|
|
14303
14145
|
const selectedMonthIndex = isSelectedYear ? value.getMonth() : void 0;
|
|
14304
|
-
return /* @__PURE__ */ (0,
|
|
14146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
14305
14147
|
YearRow,
|
|
14306
14148
|
{
|
|
14307
14149
|
year,
|
|
@@ -14323,7 +14165,7 @@ var YearMonthPickerUncontrolled = ({
|
|
|
14323
14165
|
...props
|
|
14324
14166
|
}) => {
|
|
14325
14167
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
14326
|
-
return /* @__PURE__ */ (0,
|
|
14168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
14327
14169
|
YearMonthPicker,
|
|
14328
14170
|
{
|
|
14329
14171
|
value,
|
|
@@ -14334,7 +14176,7 @@ var YearMonthPickerUncontrolled = ({
|
|
|
14334
14176
|
};
|
|
14335
14177
|
|
|
14336
14178
|
// src/components/user-interaction/date/DatePicker.tsx
|
|
14337
|
-
var
|
|
14179
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
14338
14180
|
var DatePicker = ({
|
|
14339
14181
|
value = /* @__PURE__ */ new Date(),
|
|
14340
14182
|
start,
|
|
@@ -14350,9 +14192,9 @@ var DatePicker = ({
|
|
|
14350
14192
|
const { locale } = useLocale();
|
|
14351
14193
|
const [displayedMonth, setDisplayedMonth] = (0, import_react57.useState)(new Date(value.getFullYear(), value.getMonth(), 1));
|
|
14352
14194
|
const [displayMode, setDisplayMode] = (0, import_react57.useState)(initialDisplay);
|
|
14353
|
-
return /* @__PURE__ */ (0,
|
|
14354
|
-
/* @__PURE__ */ (0,
|
|
14355
|
-
/* @__PURE__ */ (0,
|
|
14195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: (0, import_clsx31.default)("flex-col-3", className), children: [
|
|
14196
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-2 items-center justify-between", children: [
|
|
14197
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
14356
14198
|
Button,
|
|
14357
14199
|
{
|
|
14358
14200
|
size: "sm",
|
|
@@ -14363,12 +14205,12 @@ var DatePicker = ({
|
|
|
14363
14205
|
onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
|
|
14364
14206
|
children: [
|
|
14365
14207
|
`${new Intl.DateTimeFormat(LocalizationUtil.localToLanguage(locale), { month: "long" }).format(displayedMonth)} ${displayedMonth.getFullYear()}`,
|
|
14366
|
-
/* @__PURE__ */ (0,
|
|
14208
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react18.ChevronDown, { size: 16 })
|
|
14367
14209
|
]
|
|
14368
14210
|
}
|
|
14369
14211
|
),
|
|
14370
|
-
displayMode === "day" && /* @__PURE__ */ (0,
|
|
14371
|
-
/* @__PURE__ */ (0,
|
|
14212
|
+
displayMode === "day" && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-2 justify-end", children: [
|
|
14213
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14372
14214
|
Button,
|
|
14373
14215
|
{
|
|
14374
14216
|
size: "sm",
|
|
@@ -14379,10 +14221,10 @@ var DatePicker = ({
|
|
|
14379
14221
|
onValueChange(newDate);
|
|
14380
14222
|
setDisplayedMonth(newDate);
|
|
14381
14223
|
},
|
|
14382
|
-
children: /* @__PURE__ */ (0,
|
|
14224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react18.Calendar, { className: "size-5" })
|
|
14383
14225
|
}
|
|
14384
14226
|
),
|
|
14385
|
-
/* @__PURE__ */ (0,
|
|
14227
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14386
14228
|
Button,
|
|
14387
14229
|
{
|
|
14388
14230
|
size: "sm",
|
|
@@ -14390,10 +14232,10 @@ var DatePicker = ({
|
|
|
14390
14232
|
onClick: () => {
|
|
14391
14233
|
setDisplayedMonth(subtractDuration(displayedMonth, { months: 1 }));
|
|
14392
14234
|
},
|
|
14393
|
-
children: /* @__PURE__ */ (0,
|
|
14235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react18.ArrowUp, { size: 20 })
|
|
14394
14236
|
}
|
|
14395
14237
|
),
|
|
14396
|
-
/* @__PURE__ */ (0,
|
|
14238
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14397
14239
|
Button,
|
|
14398
14240
|
{
|
|
14399
14241
|
size: "sm",
|
|
@@ -14401,12 +14243,12 @@ var DatePicker = ({
|
|
|
14401
14243
|
onClick: () => {
|
|
14402
14244
|
setDisplayedMonth(addDuration(displayedMonth, { months: 1 }));
|
|
14403
14245
|
},
|
|
14404
|
-
children: /* @__PURE__ */ (0,
|
|
14246
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react18.ArrowDown, { size: 20 })
|
|
14405
14247
|
}
|
|
14406
14248
|
)
|
|
14407
14249
|
] })
|
|
14408
14250
|
] }),
|
|
14409
|
-
displayMode === "yearMonth" ? /* @__PURE__ */ (0,
|
|
14251
|
+
displayMode === "yearMonth" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14410
14252
|
YearMonthPicker,
|
|
14411
14253
|
{
|
|
14412
14254
|
...yearMonthPickerProps,
|
|
@@ -14423,7 +14265,7 @@ var DatePicker = ({
|
|
|
14423
14265
|
},
|
|
14424
14266
|
className: "h-60 max-h-60"
|
|
14425
14267
|
}
|
|
14426
|
-
) : /* @__PURE__ */ (0,
|
|
14268
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14427
14269
|
DayPicker,
|
|
14428
14270
|
{
|
|
14429
14271
|
...dayPickerProps,
|
|
@@ -14445,7 +14287,7 @@ var DatePickerUncontrolled = ({
|
|
|
14445
14287
|
...props
|
|
14446
14288
|
}) => {
|
|
14447
14289
|
const [date, setDate] = useOverwritableState(value, onValueChange);
|
|
14448
|
-
return /* @__PURE__ */ (0,
|
|
14290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
14449
14291
|
DatePicker,
|
|
14450
14292
|
{
|
|
14451
14293
|
...props,
|
|
@@ -14460,7 +14302,7 @@ var import_clsx32 = __toESM(require("clsx"));
|
|
|
14460
14302
|
|
|
14461
14303
|
// src/components/user-interaction/date/TimePicker.tsx
|
|
14462
14304
|
var import_react58 = require("react");
|
|
14463
|
-
var
|
|
14305
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
14464
14306
|
var TimePicker = ({
|
|
14465
14307
|
value = /* @__PURE__ */ new Date(),
|
|
14466
14308
|
onValueChange,
|
|
@@ -14508,10 +14350,10 @@ var TimePicker = ({
|
|
|
14508
14350
|
onValueChange?.(newDate);
|
|
14509
14351
|
onEditComplete?.(newDate);
|
|
14510
14352
|
};
|
|
14511
|
-
return /* @__PURE__ */ (0,
|
|
14512
|
-
/* @__PURE__ */ (0,
|
|
14353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-name": "time-picker-container", className, children: [
|
|
14354
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-name": "time-picker-value-column", children: hours.map((hour2) => {
|
|
14513
14355
|
const isSelected = hour2 === value.getHours() - (!is24HourFormat && isPM ? 12 : 0);
|
|
14514
|
-
return /* @__PURE__ */ (0,
|
|
14356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14515
14357
|
Button,
|
|
14516
14358
|
{
|
|
14517
14359
|
size: "sm",
|
|
@@ -14523,9 +14365,9 @@ var TimePicker = ({
|
|
|
14523
14365
|
hour2
|
|
14524
14366
|
);
|
|
14525
14367
|
}) }),
|
|
14526
|
-
/* @__PURE__ */ (0,
|
|
14368
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-name": "time-picker-value-column", children: minutes.map((minute) => {
|
|
14527
14369
|
const isSelected = minute === closestMinute;
|
|
14528
|
-
return /* @__PURE__ */ (0,
|
|
14370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14529
14371
|
Button,
|
|
14530
14372
|
{
|
|
14531
14373
|
size: "sm",
|
|
@@ -14537,8 +14379,8 @@ var TimePicker = ({
|
|
|
14537
14379
|
minute + minuteIncrement
|
|
14538
14380
|
);
|
|
14539
14381
|
}) }),
|
|
14540
|
-
!is24HourFormat && /* @__PURE__ */ (0,
|
|
14541
|
-
/* @__PURE__ */ (0,
|
|
14382
|
+
!is24HourFormat && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { "data-name": "time-picker-value-column", children: [
|
|
14383
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14542
14384
|
Button,
|
|
14543
14385
|
{
|
|
14544
14386
|
size: "sm",
|
|
@@ -14547,7 +14389,7 @@ var TimePicker = ({
|
|
|
14547
14389
|
children: "AM"
|
|
14548
14390
|
}
|
|
14549
14391
|
),
|
|
14550
|
-
/* @__PURE__ */ (0,
|
|
14392
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14551
14393
|
Button,
|
|
14552
14394
|
{
|
|
14553
14395
|
size: "sm",
|
|
@@ -14565,7 +14407,7 @@ var TimePickerUncontrolled = ({
|
|
|
14565
14407
|
...props
|
|
14566
14408
|
}) => {
|
|
14567
14409
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
14568
|
-
return /* @__PURE__ */ (0,
|
|
14410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
14569
14411
|
TimePicker,
|
|
14570
14412
|
{
|
|
14571
14413
|
...props,
|
|
@@ -14576,7 +14418,7 @@ var TimePickerUncontrolled = ({
|
|
|
14576
14418
|
};
|
|
14577
14419
|
|
|
14578
14420
|
// src/components/user-interaction/date/DateTimePicker.tsx
|
|
14579
|
-
var
|
|
14421
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
14580
14422
|
var DateTimePicker = ({
|
|
14581
14423
|
value = /* @__PURE__ */ new Date(),
|
|
14582
14424
|
start,
|
|
@@ -14595,7 +14437,7 @@ var DateTimePicker = ({
|
|
|
14595
14437
|
let dateDisplay;
|
|
14596
14438
|
let timeDisplay;
|
|
14597
14439
|
if (useDate) {
|
|
14598
|
-
dateDisplay = /* @__PURE__ */ (0,
|
|
14440
|
+
dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
14599
14441
|
DatePicker,
|
|
14600
14442
|
{
|
|
14601
14443
|
...datePickerProps,
|
|
@@ -14611,7 +14453,7 @@ var DateTimePicker = ({
|
|
|
14611
14453
|
);
|
|
14612
14454
|
}
|
|
14613
14455
|
if (useTime) {
|
|
14614
|
-
timeDisplay = /* @__PURE__ */ (0,
|
|
14456
|
+
timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
14615
14457
|
TimePicker,
|
|
14616
14458
|
{
|
|
14617
14459
|
...timePickerProps,
|
|
@@ -14624,14 +14466,14 @@ var DateTimePicker = ({
|
|
|
14624
14466
|
}
|
|
14625
14467
|
);
|
|
14626
14468
|
}
|
|
14627
|
-
return /* @__PURE__ */ (0,
|
|
14469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
|
|
14628
14470
|
dateDisplay,
|
|
14629
14471
|
timeDisplay
|
|
14630
14472
|
] });
|
|
14631
14473
|
};
|
|
14632
14474
|
var DateTimePickerUncontrolled = ({ value: initialValue, onValueChange, ...props }) => {
|
|
14633
14475
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
14634
|
-
return /* @__PURE__ */ (0,
|
|
14476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
14635
14477
|
DateTimePicker,
|
|
14636
14478
|
{
|
|
14637
14479
|
...props,
|
|
@@ -14642,7 +14484,7 @@ var DateTimePickerUncontrolled = ({ value: initialValue, onValueChange, ...props
|
|
|
14642
14484
|
};
|
|
14643
14485
|
|
|
14644
14486
|
// src/components/user-interaction/date/TimeDisplay.tsx
|
|
14645
|
-
var
|
|
14487
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
14646
14488
|
var TimeDisplay = ({
|
|
14647
14489
|
date,
|
|
14648
14490
|
mode = "daysFromToday"
|
|
@@ -14679,15 +14521,15 @@ var TimeDisplay = ({
|
|
|
14679
14521
|
} else {
|
|
14680
14522
|
fullString = `${date.getDate()}. ${monthToTranslation[date.getMonth()]} ${date.getFullYear()}`;
|
|
14681
14523
|
}
|
|
14682
|
-
return /* @__PURE__ */ (0,
|
|
14524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: fullString });
|
|
14683
14525
|
};
|
|
14684
14526
|
|
|
14685
14527
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
14686
14528
|
var import_react59 = require("react");
|
|
14687
14529
|
var import_react_dom8 = require("react-dom");
|
|
14688
|
-
var
|
|
14530
|
+
var import_lucide_react19 = require("lucide-react");
|
|
14689
14531
|
var import_clsx33 = __toESM(require("clsx"));
|
|
14690
|
-
var
|
|
14532
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
14691
14533
|
var DateTimeInput = ({
|
|
14692
14534
|
value,
|
|
14693
14535
|
onValueChange,
|
|
@@ -14722,9 +14564,9 @@ var DateTimeInput = ({
|
|
|
14722
14564
|
setIsOpen(false);
|
|
14723
14565
|
}
|
|
14724
14566
|
}, [isReadOnly]);
|
|
14725
|
-
return /* @__PURE__ */ (0,
|
|
14726
|
-
/* @__PURE__ */ (0,
|
|
14727
|
-
/* @__PURE__ */ (0,
|
|
14567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
14568
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { ...containerProps, ref: anchorRef, className: (0, import_clsx33.default)("relative w-full", containerProps?.className), children: [
|
|
14569
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14728
14570
|
Input,
|
|
14729
14571
|
{
|
|
14730
14572
|
...props,
|
|
@@ -14742,7 +14584,7 @@ var DateTimeInput = ({
|
|
|
14742
14584
|
)
|
|
14743
14585
|
}
|
|
14744
14586
|
),
|
|
14745
|
-
/* @__PURE__ */ (0,
|
|
14587
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14746
14588
|
Button,
|
|
14747
14589
|
{
|
|
14748
14590
|
coloringStyle: "text",
|
|
@@ -14752,12 +14594,12 @@ var DateTimeInput = ({
|
|
|
14752
14594
|
className: "absolute right-1 top-1/2 -translate-y-1/2",
|
|
14753
14595
|
disabled: isReadOnly,
|
|
14754
14596
|
onClick: () => setIsOpen((prevState) => !prevState),
|
|
14755
|
-
children: /* @__PURE__ */ (0,
|
|
14597
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react19.CalendarIcon, { className: "size-5" })
|
|
14756
14598
|
}
|
|
14757
14599
|
)
|
|
14758
14600
|
] }),
|
|
14759
|
-
/* @__PURE__ */ (0,
|
|
14760
|
-
/* @__PURE__ */ (0,
|
|
14601
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: isOpen, children: (0, import_react_dom8.createPortal)(
|
|
14602
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
14761
14603
|
"div",
|
|
14762
14604
|
{
|
|
14763
14605
|
ref: containerRef,
|
|
@@ -14768,7 +14610,7 @@ var DateTimeInput = ({
|
|
|
14768
14610
|
opacity: position ? void 0 : 0
|
|
14769
14611
|
},
|
|
14770
14612
|
children: [
|
|
14771
|
-
/* @__PURE__ */ (0,
|
|
14613
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14772
14614
|
DateTimePicker,
|
|
14773
14615
|
{
|
|
14774
14616
|
...pickerProps,
|
|
@@ -14778,8 +14620,8 @@ var DateTimeInput = ({
|
|
|
14778
14620
|
onEditComplete
|
|
14779
14621
|
}
|
|
14780
14622
|
),
|
|
14781
|
-
/* @__PURE__ */ (0,
|
|
14782
|
-
/* @__PURE__ */ (0,
|
|
14623
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex-row-2 justify-end", children: [
|
|
14624
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: !!onRemove && !!value, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14783
14625
|
Button,
|
|
14784
14626
|
{
|
|
14785
14627
|
size: "md",
|
|
@@ -14792,7 +14634,7 @@ var DateTimeInput = ({
|
|
|
14792
14634
|
children: translation("clear")
|
|
14793
14635
|
}
|
|
14794
14636
|
) }),
|
|
14795
|
-
/* @__PURE__ */ (0,
|
|
14637
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: !value, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14796
14638
|
Button,
|
|
14797
14639
|
{
|
|
14798
14640
|
size: "md",
|
|
@@ -14802,7 +14644,7 @@ var DateTimeInput = ({
|
|
|
14802
14644
|
children: translation("cancel")
|
|
14803
14645
|
}
|
|
14804
14646
|
) }),
|
|
14805
|
-
/* @__PURE__ */ (0,
|
|
14647
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14806
14648
|
Button,
|
|
14807
14649
|
{
|
|
14808
14650
|
size: "md",
|
|
@@ -14827,7 +14669,7 @@ var DateTimeInputUncontrolled = ({
|
|
|
14827
14669
|
...props
|
|
14828
14670
|
}) => {
|
|
14829
14671
|
const [value, setValue] = useOverwritableState(initialValue);
|
|
14830
|
-
return /* @__PURE__ */ (0,
|
|
14672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
14831
14673
|
DateTimeInput,
|
|
14832
14674
|
{
|
|
14833
14675
|
...props,
|
|
@@ -14848,7 +14690,7 @@ var DateTimeInputUncontrolled = ({
|
|
|
14848
14690
|
var import_react60 = require("react");
|
|
14849
14691
|
var import_react61 = require("react");
|
|
14850
14692
|
var import_clsx34 = __toESM(require("clsx"));
|
|
14851
|
-
var
|
|
14693
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
14852
14694
|
var InsideLabelInput = (0, import_react61.forwardRef)(function InsideLabelInput2({
|
|
14853
14695
|
id: customId,
|
|
14854
14696
|
label,
|
|
@@ -14858,8 +14700,8 @@ var InsideLabelInput = (0, import_react61.forwardRef)(function InsideLabelInput2
|
|
|
14858
14700
|
const [isFocused, setIsFocused] = (0, import_react61.useState)(false);
|
|
14859
14701
|
const generatedId = (0, import_react60.useId)();
|
|
14860
14702
|
const id = customId ?? generatedId;
|
|
14861
|
-
return /* @__PURE__ */ (0,
|
|
14862
|
-
/* @__PURE__ */ (0,
|
|
14703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_clsx34.default)("relative"), children: [
|
|
14704
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
14863
14705
|
Input,
|
|
14864
14706
|
{
|
|
14865
14707
|
...props,
|
|
@@ -14877,7 +14719,7 @@ var InsideLabelInput = (0, import_react61.forwardRef)(function InsideLabelInput2
|
|
|
14877
14719
|
}
|
|
14878
14720
|
}
|
|
14879
14721
|
),
|
|
14880
|
-
/* @__PURE__ */ (0,
|
|
14722
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
14881
14723
|
"label",
|
|
14882
14724
|
{
|
|
14883
14725
|
id: id + "-label",
|
|
@@ -14899,7 +14741,7 @@ var InsideLabelInputUncontrolled = ({
|
|
|
14899
14741
|
...props
|
|
14900
14742
|
}) => {
|
|
14901
14743
|
const [value, setValue] = useOverwritableState(initialValue, props.onValueChange);
|
|
14902
|
-
return /* @__PURE__ */ (0,
|
|
14744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
14903
14745
|
InsideLabelInput,
|
|
14904
14746
|
{
|
|
14905
14747
|
...props,
|
|
@@ -14910,9 +14752,9 @@ var InsideLabelInputUncontrolled = ({
|
|
|
14910
14752
|
};
|
|
14911
14753
|
|
|
14912
14754
|
// src/components/user-interaction/input/SearchBar.tsx
|
|
14913
|
-
var
|
|
14755
|
+
var import_lucide_react20 = require("lucide-react");
|
|
14914
14756
|
var import_clsx35 = require("clsx");
|
|
14915
|
-
var
|
|
14757
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
14916
14758
|
var SearchBar = ({
|
|
14917
14759
|
value: initialValue,
|
|
14918
14760
|
onSearch,
|
|
@@ -14923,8 +14765,8 @@ var SearchBar = ({
|
|
|
14923
14765
|
}) => {
|
|
14924
14766
|
const translation = useHightideTranslation();
|
|
14925
14767
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
14926
|
-
return /* @__PURE__ */ (0,
|
|
14927
|
-
/* @__PURE__ */ (0,
|
|
14768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { ...containerProps, className: (0, import_clsx35.clsx)("relative", containerProps?.className), children: [
|
|
14769
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14928
14770
|
InputUncontrolled,
|
|
14929
14771
|
{
|
|
14930
14772
|
...inputProps,
|
|
@@ -14935,7 +14777,7 @@ var SearchBar = ({
|
|
|
14935
14777
|
className: (0, import_clsx35.clsx)("pr-10 w-full", inputProps.className)
|
|
14936
14778
|
}
|
|
14937
14779
|
),
|
|
14938
|
-
/* @__PURE__ */ (0,
|
|
14780
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
14939
14781
|
Button,
|
|
14940
14782
|
{
|
|
14941
14783
|
...searchButtonProps,
|
|
@@ -14945,7 +14787,7 @@ var SearchBar = ({
|
|
|
14945
14787
|
coloringStyle: "text",
|
|
14946
14788
|
onClick: () => onSearch(value),
|
|
14947
14789
|
className: (0, import_clsx35.clsx)("absolute right-1 top-1/2 -translate-y-1/2", searchButtonProps?.className),
|
|
14948
|
-
children: /* @__PURE__ */ (0,
|
|
14790
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react20.Search, { className: "w-full h-full" })
|
|
14949
14791
|
}
|
|
14950
14792
|
)
|
|
14951
14793
|
] });
|
|
@@ -14953,9 +14795,9 @@ var SearchBar = ({
|
|
|
14953
14795
|
|
|
14954
14796
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
14955
14797
|
var import_react62 = require("react");
|
|
14956
|
-
var
|
|
14798
|
+
var import_lucide_react21 = require("lucide-react");
|
|
14957
14799
|
var import_clsx36 = __toESM(require("clsx"));
|
|
14958
|
-
var
|
|
14800
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
14959
14801
|
var ToggleableInput = (0, import_react62.forwardRef)(function ToggleableInput2({
|
|
14960
14802
|
value,
|
|
14961
14803
|
initialState = "display",
|
|
@@ -14970,8 +14812,8 @@ var ToggleableInput = (0, import_react62.forwardRef)(function ToggleableInput2({
|
|
|
14970
14812
|
innerRef.current?.focus();
|
|
14971
14813
|
}
|
|
14972
14814
|
}, [isEditing]);
|
|
14973
|
-
return /* @__PURE__ */ (0,
|
|
14974
|
-
/* @__PURE__ */ (0,
|
|
14815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0, import_clsx36.default)("relative flex-row-2", { "flex-1": isEditing }), children: [
|
|
14816
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
14975
14817
|
Input,
|
|
14976
14818
|
{
|
|
14977
14819
|
...props,
|
|
@@ -14997,9 +14839,9 @@ var ToggleableInput = (0, import_react62.forwardRef)(function ToggleableInput2({
|
|
|
14997
14839
|
})
|
|
14998
14840
|
}
|
|
14999
14841
|
),
|
|
15000
|
-
!isEditing && /* @__PURE__ */ (0,
|
|
15001
|
-
/* @__PURE__ */ (0,
|
|
15002
|
-
/* @__PURE__ */ (0,
|
|
14842
|
+
!isEditing && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
|
|
14843
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: (0, import_clsx36.default)(" truncate"), children: value }),
|
|
14844
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react21.Pencil, { className: (0, import_clsx36.default)(`size-force-4`, { "text-transparent": isEditing }) })
|
|
15003
14845
|
] })
|
|
15004
14846
|
] });
|
|
15005
14847
|
});
|
|
@@ -15009,7 +14851,7 @@ var ToggleableInputUncontrolled = ({
|
|
|
15009
14851
|
...restProps
|
|
15010
14852
|
}) => {
|
|
15011
14853
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
15012
|
-
return /* @__PURE__ */ (0,
|
|
14854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
15013
14855
|
ToggleableInput,
|
|
15014
14856
|
{
|
|
15015
14857
|
value,
|
|
@@ -15020,11 +14862,11 @@ var ToggleableInputUncontrolled = ({
|
|
|
15020
14862
|
};
|
|
15021
14863
|
|
|
15022
14864
|
// src/components/user-interaction/properties/CheckboxProperty.tsx
|
|
15023
|
-
var
|
|
14865
|
+
var import_lucide_react23 = require("lucide-react");
|
|
15024
14866
|
|
|
15025
14867
|
// src/components/user-interaction/properties/PropertyBase.tsx
|
|
15026
|
-
var
|
|
15027
|
-
var
|
|
14868
|
+
var import_lucide_react22 = require("lucide-react");
|
|
14869
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
15028
14870
|
var PropertyBase = ({
|
|
15029
14871
|
name: name2,
|
|
15030
14872
|
children,
|
|
@@ -15043,29 +14885,29 @@ var PropertyBase = ({
|
|
|
15043
14885
|
const isClearEnabled = allowClear && !readOnly;
|
|
15044
14886
|
const isRemoveEnabled = allowRemove && !readOnly;
|
|
15045
14887
|
const showActionsContainer = isClearEnabled || isRemoveEnabled;
|
|
15046
|
-
return /* @__PURE__ */ (0,
|
|
14888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
15047
14889
|
"div",
|
|
15048
14890
|
{
|
|
15049
14891
|
className: className ? `group/property ${className}` : "group/property",
|
|
15050
14892
|
"data-name": "property-root",
|
|
15051
14893
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
15052
14894
|
children: [
|
|
15053
|
-
/* @__PURE__ */ (0,
|
|
14895
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
15054
14896
|
"div",
|
|
15055
14897
|
{
|
|
15056
14898
|
className,
|
|
15057
14899
|
"data-name": "property-title",
|
|
15058
14900
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
15059
14901
|
children: [
|
|
15060
|
-
/* @__PURE__ */ (0,
|
|
15061
|
-
/* @__PURE__ */ (0,
|
|
15062
|
-
/* @__PURE__ */ (0,
|
|
14902
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Tooltip, { tooltip: name2, containerClassName: "min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex-row-1 items-center", children: [
|
|
14903
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-name": "property-title-icon", children: icon }),
|
|
14904
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { "data-name": "property-title-text", children: name2 })
|
|
15063
14905
|
] }) }),
|
|
15064
|
-
invalid && /* @__PURE__ */ (0,
|
|
14906
|
+
invalid && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react22.AlertTriangle, { className: "size-force-6" })
|
|
15065
14907
|
]
|
|
15066
14908
|
}
|
|
15067
14909
|
),
|
|
15068
|
-
/* @__PURE__ */ (0,
|
|
14910
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
15069
14911
|
"div",
|
|
15070
14912
|
{
|
|
15071
14913
|
className,
|
|
@@ -15073,8 +14915,8 @@ var PropertyBase = ({
|
|
|
15073
14915
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
15074
14916
|
children: [
|
|
15075
14917
|
children({ required, hasValue, invalid }),
|
|
15076
|
-
showActionsContainer && /* @__PURE__ */ (0,
|
|
15077
|
-
isClearEnabled && /* @__PURE__ */ (0,
|
|
14918
|
+
showActionsContainer && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { "data-name": "property-actions", children: [
|
|
14919
|
+
isClearEnabled && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Tooltip, { tooltip: translation("clearValue"), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15078
14920
|
Button,
|
|
15079
14921
|
{
|
|
15080
14922
|
onClick: onValueClear,
|
|
@@ -15083,10 +14925,10 @@ var PropertyBase = ({
|
|
|
15083
14925
|
coloringStyle: "text",
|
|
15084
14926
|
layout: "icon",
|
|
15085
14927
|
size: "sm",
|
|
15086
|
-
children: /* @__PURE__ */ (0,
|
|
14928
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react22.X, { className: "size-force-5" })
|
|
15087
14929
|
}
|
|
15088
14930
|
) }),
|
|
15089
|
-
isRemoveEnabled && /* @__PURE__ */ (0,
|
|
14931
|
+
isRemoveEnabled && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Tooltip, { tooltip: translation("removeProperty"), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
15090
14932
|
Button,
|
|
15091
14933
|
{
|
|
15092
14934
|
onClick: onRemove,
|
|
@@ -15094,7 +14936,7 @@ var PropertyBase = ({
|
|
|
15094
14936
|
coloringStyle: "text",
|
|
15095
14937
|
layout: "icon",
|
|
15096
14938
|
size: "sm",
|
|
15097
|
-
children: /* @__PURE__ */ (0,
|
|
14939
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react22.Trash, { className: "size-force-5" })
|
|
15098
14940
|
}
|
|
15099
14941
|
) })
|
|
15100
14942
|
] })
|
|
@@ -15107,7 +14949,7 @@ var PropertyBase = ({
|
|
|
15107
14949
|
};
|
|
15108
14950
|
|
|
15109
14951
|
// src/components/user-interaction/properties/CheckboxProperty.tsx
|
|
15110
|
-
var
|
|
14952
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
15111
14953
|
var CheckboxProperty = ({
|
|
15112
14954
|
value,
|
|
15113
14955
|
onValueChange,
|
|
@@ -15116,15 +14958,15 @@ var CheckboxProperty = ({
|
|
|
15116
14958
|
...baseProps
|
|
15117
14959
|
}) => {
|
|
15118
14960
|
const translation = useHightideTranslation();
|
|
15119
|
-
return /* @__PURE__ */ (0,
|
|
14961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
15120
14962
|
PropertyBase,
|
|
15121
14963
|
{
|
|
15122
14964
|
...baseProps,
|
|
15123
14965
|
hasValue: value !== void 0,
|
|
15124
14966
|
readOnly,
|
|
15125
|
-
icon: /* @__PURE__ */ (0,
|
|
15126
|
-
children: () => /* @__PURE__ */ (0,
|
|
15127
|
-
/* @__PURE__ */ (0,
|
|
14967
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react23.Check, { size: 24 }),
|
|
14968
|
+
children: () => /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex-row-2 items-center", children: [
|
|
14969
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
15128
14970
|
Button,
|
|
15129
14971
|
{
|
|
15130
14972
|
color: value ? "positive" : "neutral",
|
|
@@ -15137,7 +14979,7 @@ var CheckboxProperty = ({
|
|
|
15137
14979
|
children: translation("yes")
|
|
15138
14980
|
}
|
|
15139
14981
|
),
|
|
15140
|
-
/* @__PURE__ */ (0,
|
|
14982
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
15141
14983
|
Button,
|
|
15142
14984
|
{
|
|
15143
14985
|
color: !value && value !== void 0 ? "negative" : "neutral",
|
|
@@ -15156,8 +14998,8 @@ var CheckboxProperty = ({
|
|
|
15156
14998
|
};
|
|
15157
14999
|
|
|
15158
15000
|
// src/components/user-interaction/properties/DateProperty.tsx
|
|
15159
|
-
var
|
|
15160
|
-
var
|
|
15001
|
+
var import_lucide_react24 = require("lucide-react");
|
|
15002
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
15161
15003
|
var DateProperty = ({
|
|
15162
15004
|
value,
|
|
15163
15005
|
onValueChange,
|
|
@@ -15167,13 +15009,13 @@ var DateProperty = ({
|
|
|
15167
15009
|
...baseProps
|
|
15168
15010
|
}) => {
|
|
15169
15011
|
const hasValue = !!value;
|
|
15170
|
-
return /* @__PURE__ */ (0,
|
|
15012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
15171
15013
|
PropertyBase,
|
|
15172
15014
|
{
|
|
15173
15015
|
...baseProps,
|
|
15174
15016
|
hasValue,
|
|
15175
|
-
icon: /* @__PURE__ */ (0,
|
|
15176
|
-
children: ({ invalid }) => /* @__PURE__ */ (0,
|
|
15017
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react24.CalendarDays, { size: 24 }),
|
|
15018
|
+
children: ({ invalid }) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
15177
15019
|
DateTimeInput,
|
|
15178
15020
|
{
|
|
15179
15021
|
value,
|
|
@@ -15191,7 +15033,129 @@ var DateProperty = ({
|
|
|
15191
15033
|
|
|
15192
15034
|
// src/components/user-interaction/properties/MultiSelectProperty.tsx
|
|
15193
15035
|
var import_lucide_react26 = require("lucide-react");
|
|
15194
|
-
|
|
15036
|
+
|
|
15037
|
+
// src/components/user-interaction/select/MultiSelectChipDisplay.tsx
|
|
15038
|
+
var import_react63 = require("react");
|
|
15039
|
+
var import_lucide_react25 = require("lucide-react");
|
|
15040
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
15041
|
+
var MultiSelectChipDisplayButton = (0, import_react63.forwardRef)(function MultiSelectChipDisplayButton2({
|
|
15042
|
+
id,
|
|
15043
|
+
...props
|
|
15044
|
+
}, ref) {
|
|
15045
|
+
const { state, trigger, item, ids, setIds } = useSelectContext();
|
|
15046
|
+
const { register, unregister, toggleOpen } = trigger;
|
|
15047
|
+
(0, import_react63.useEffect)(() => {
|
|
15048
|
+
if (id) {
|
|
15049
|
+
setIds((prev) => ({
|
|
15050
|
+
...prev,
|
|
15051
|
+
trigger: id
|
|
15052
|
+
}));
|
|
15053
|
+
}
|
|
15054
|
+
}, [id, setIds]);
|
|
15055
|
+
const innerRef = (0, import_react63.useRef)(null);
|
|
15056
|
+
(0, import_react63.useImperativeHandle)(ref, () => innerRef.current);
|
|
15057
|
+
(0, import_react63.useEffect)(() => {
|
|
15058
|
+
register(innerRef);
|
|
15059
|
+
return () => unregister();
|
|
15060
|
+
}, [register, unregister]);
|
|
15061
|
+
const disabled = !!props?.disabled || !!state.disabled;
|
|
15062
|
+
const invalid = state.invalid;
|
|
15063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
15064
|
+
"div",
|
|
15065
|
+
{
|
|
15066
|
+
...props,
|
|
15067
|
+
ref: innerRef,
|
|
15068
|
+
onClick: (event) => {
|
|
15069
|
+
toggleOpen();
|
|
15070
|
+
props.onClick?.(event);
|
|
15071
|
+
},
|
|
15072
|
+
"data-name": props["data-name"] ?? "select-button-chips",
|
|
15073
|
+
"data-value": state.value.length > 0 ? "" : void 0,
|
|
15074
|
+
"data-disabled": disabled ? "" : void 0,
|
|
15075
|
+
"data-invalid": invalid ? "" : void 0,
|
|
15076
|
+
"aria-invalid": invalid,
|
|
15077
|
+
"aria-disabled": disabled,
|
|
15078
|
+
children: [
|
|
15079
|
+
state.selectedOptions.map(({ value, label }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Chip, { className: "gap-x-2", children: [
|
|
15080
|
+
label,
|
|
15081
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
15082
|
+
Button,
|
|
15083
|
+
{
|
|
15084
|
+
onClick: () => {
|
|
15085
|
+
item.toggleSelection(value, false);
|
|
15086
|
+
},
|
|
15087
|
+
size: "xs",
|
|
15088
|
+
color: "negative",
|
|
15089
|
+
coloringStyle: "text",
|
|
15090
|
+
layout: "icon",
|
|
15091
|
+
className: "flex-row-0 items-center",
|
|
15092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react25.XIcon, { className: "size-5" })
|
|
15093
|
+
}
|
|
15094
|
+
)
|
|
15095
|
+
] }, value)),
|
|
15096
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
15097
|
+
Button,
|
|
15098
|
+
{
|
|
15099
|
+
id: ids.trigger,
|
|
15100
|
+
onClick: (event) => {
|
|
15101
|
+
event.stopPropagation();
|
|
15102
|
+
toggleOpen();
|
|
15103
|
+
},
|
|
15104
|
+
onKeyDown: (event) => {
|
|
15105
|
+
switch (event.key) {
|
|
15106
|
+
case "ArrowDown":
|
|
15107
|
+
toggleOpen(true, { highlightStartPositionBehavior: "first" });
|
|
15108
|
+
break;
|
|
15109
|
+
case "ArrowUp":
|
|
15110
|
+
toggleOpen(true, { highlightStartPositionBehavior: "last" });
|
|
15111
|
+
}
|
|
15112
|
+
},
|
|
15113
|
+
layout: "icon",
|
|
15114
|
+
size: "sm",
|
|
15115
|
+
color: "neutral",
|
|
15116
|
+
"aria-invalid": invalid,
|
|
15117
|
+
"aria-disabled": disabled,
|
|
15118
|
+
"aria-haspopup": "listbox",
|
|
15119
|
+
"aria-expanded": state.isOpen,
|
|
15120
|
+
"aria-controls": state.isOpen ? ids.content : void 0,
|
|
15121
|
+
className: "size-9",
|
|
15122
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react25.Plus, {})
|
|
15123
|
+
}
|
|
15124
|
+
)
|
|
15125
|
+
]
|
|
15126
|
+
}
|
|
15127
|
+
);
|
|
15128
|
+
});
|
|
15129
|
+
var MultiSelectChipDisplay = (0, import_react63.forwardRef)(function MultiSelectChipDisplay2({
|
|
15130
|
+
children,
|
|
15131
|
+
contentPanelProps,
|
|
15132
|
+
chipDisplayProps,
|
|
15133
|
+
...props
|
|
15134
|
+
}, ref) {
|
|
15135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(MultiSelectRoot, { ...props, children: [
|
|
15136
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(MultiSelectChipDisplayButton, { ref, ...chipDisplayProps }),
|
|
15137
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(MultiSelectContent, { ...contentPanelProps, children })
|
|
15138
|
+
] });
|
|
15139
|
+
});
|
|
15140
|
+
var MultiSelectChipDisplayUncontrolled = (0, import_react63.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
|
|
15141
|
+
value: initialValue,
|
|
15142
|
+
onValueChange,
|
|
15143
|
+
...props
|
|
15144
|
+
}, ref) {
|
|
15145
|
+
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
15146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
15147
|
+
MultiSelectChipDisplay,
|
|
15148
|
+
{
|
|
15149
|
+
...props,
|
|
15150
|
+
ref,
|
|
15151
|
+
value,
|
|
15152
|
+
onValueChange: setValue
|
|
15153
|
+
}
|
|
15154
|
+
);
|
|
15155
|
+
});
|
|
15156
|
+
|
|
15157
|
+
// src/components/user-interaction/properties/MultiSelectProperty.tsx
|
|
15158
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
15195
15159
|
var MultiSelectProperty = ({
|
|
15196
15160
|
children,
|
|
15197
15161
|
value,
|
|
@@ -15200,18 +15164,18 @@ var MultiSelectProperty = ({
|
|
|
15200
15164
|
...props
|
|
15201
15165
|
}) => {
|
|
15202
15166
|
const hasValue = value.length > 0;
|
|
15203
|
-
return /* @__PURE__ */ (0,
|
|
15167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15204
15168
|
PropertyBase,
|
|
15205
15169
|
{
|
|
15206
15170
|
...props,
|
|
15207
15171
|
hasValue,
|
|
15208
|
-
icon: /* @__PURE__ */ (0,
|
|
15209
|
-
children: ({ invalid }) => /* @__PURE__ */ (0,
|
|
15172
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react26.List, { size: 24 }),
|
|
15173
|
+
children: ({ invalid }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15210
15174
|
"div",
|
|
15211
15175
|
{
|
|
15212
15176
|
"data-name": "property-input-wrapper",
|
|
15213
15177
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
15214
|
-
children: /* @__PURE__ */ (0,
|
|
15178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
15215
15179
|
MultiSelectChipDisplay,
|
|
15216
15180
|
{
|
|
15217
15181
|
value,
|
|
@@ -15237,7 +15201,7 @@ var MultiSelectProperty = ({
|
|
|
15237
15201
|
|
|
15238
15202
|
// src/components/user-interaction/properties/NumberProperty.tsx
|
|
15239
15203
|
var import_lucide_react27 = require("lucide-react");
|
|
15240
|
-
var
|
|
15204
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
15241
15205
|
var NumberProperty = ({
|
|
15242
15206
|
value,
|
|
15243
15207
|
onRemove,
|
|
@@ -15249,20 +15213,20 @@ var NumberProperty = ({
|
|
|
15249
15213
|
}) => {
|
|
15250
15214
|
const translation = useHightideTranslation();
|
|
15251
15215
|
const hasValue = value !== void 0;
|
|
15252
|
-
return /* @__PURE__ */ (0,
|
|
15216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
15253
15217
|
PropertyBase,
|
|
15254
15218
|
{
|
|
15255
15219
|
...baseProps,
|
|
15256
15220
|
onRemove,
|
|
15257
15221
|
hasValue,
|
|
15258
|
-
icon: /* @__PURE__ */ (0,
|
|
15259
|
-
children: ({ invalid }) => /* @__PURE__ */ (0,
|
|
15222
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react27.Binary, { size: 24 }),
|
|
15223
|
+
children: ({ invalid }) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
15260
15224
|
"div",
|
|
15261
15225
|
{
|
|
15262
15226
|
"data-name": "property-input-wrapper",
|
|
15263
15227
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
15264
15228
|
children: [
|
|
15265
|
-
/* @__PURE__ */ (0,
|
|
15229
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
15266
15230
|
Input,
|
|
15267
15231
|
{
|
|
15268
15232
|
className: "w-full pr-8",
|
|
@@ -15290,7 +15254,7 @@ var NumberProperty = ({
|
|
|
15290
15254
|
}
|
|
15291
15255
|
}
|
|
15292
15256
|
),
|
|
15293
|
-
suffix && /* @__PURE__ */ (0,
|
|
15257
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
15294
15258
|
"span",
|
|
15295
15259
|
{
|
|
15296
15260
|
"data-name": "property-suffix",
|
|
@@ -15307,7 +15271,7 @@ var NumberProperty = ({
|
|
|
15307
15271
|
|
|
15308
15272
|
// src/components/user-interaction/properties/SelectProperty.tsx
|
|
15309
15273
|
var import_lucide_react28 = require("lucide-react");
|
|
15310
|
-
var
|
|
15274
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
15311
15275
|
var SingleSelectProperty = ({
|
|
15312
15276
|
children,
|
|
15313
15277
|
value,
|
|
@@ -15316,18 +15280,18 @@ var SingleSelectProperty = ({
|
|
|
15316
15280
|
...props
|
|
15317
15281
|
}) => {
|
|
15318
15282
|
const hasValue = value !== void 0;
|
|
15319
|
-
return /* @__PURE__ */ (0,
|
|
15283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
15320
15284
|
PropertyBase,
|
|
15321
15285
|
{
|
|
15322
15286
|
...props,
|
|
15323
15287
|
hasValue,
|
|
15324
|
-
icon: /* @__PURE__ */ (0,
|
|
15325
|
-
children: ({ invalid }) => /* @__PURE__ */ (0,
|
|
15288
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_lucide_react28.List, { size: 24 }),
|
|
15289
|
+
children: ({ invalid }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
15326
15290
|
"div",
|
|
15327
15291
|
{
|
|
15328
15292
|
"data-name": "property-input-wrapper",
|
|
15329
15293
|
"data-invalid": PropsUtil.dataAttributes.bool(invalid),
|
|
15330
|
-
children: /* @__PURE__ */ (0,
|
|
15294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
15331
15295
|
Select,
|
|
15332
15296
|
{
|
|
15333
15297
|
value,
|
|
@@ -15350,7 +15314,7 @@ var SingleSelectProperty = ({
|
|
|
15350
15314
|
|
|
15351
15315
|
// src/components/user-interaction/properties/TextProperty.tsx
|
|
15352
15316
|
var import_lucide_react29 = require("lucide-react");
|
|
15353
|
-
var
|
|
15317
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
15354
15318
|
var TextProperty = ({
|
|
15355
15319
|
value,
|
|
15356
15320
|
readOnly,
|
|
@@ -15361,14 +15325,14 @@ var TextProperty = ({
|
|
|
15361
15325
|
}) => {
|
|
15362
15326
|
const translation = useHightideTranslation();
|
|
15363
15327
|
const hasValue = value !== void 0;
|
|
15364
|
-
return /* @__PURE__ */ (0,
|
|
15328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
15365
15329
|
PropertyBase,
|
|
15366
15330
|
{
|
|
15367
15331
|
...baseProps,
|
|
15368
15332
|
onRemove,
|
|
15369
15333
|
hasValue,
|
|
15370
|
-
icon: /* @__PURE__ */ (0,
|
|
15371
|
-
children: ({ invalid }) => /* @__PURE__ */ (0,
|
|
15334
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_lucide_react29.Text, { size: 24 }),
|
|
15335
|
+
children: ({ invalid }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
15372
15336
|
Textarea,
|
|
15373
15337
|
{
|
|
15374
15338
|
className: "w-full",
|
|
@@ -15398,34 +15362,65 @@ var TextProperty = ({
|
|
|
15398
15362
|
);
|
|
15399
15363
|
};
|
|
15400
15364
|
|
|
15401
|
-
// src/components/
|
|
15402
|
-
var import_react63 = require("react");
|
|
15365
|
+
// src/components/user-interaction/select/MultiSelect.tsx
|
|
15403
15366
|
var import_react64 = require("react");
|
|
15367
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
15368
|
+
var MultiSelect = (0, import_react64.forwardRef)(function MultiSelect2({
|
|
15369
|
+
children,
|
|
15370
|
+
contentPanelProps,
|
|
15371
|
+
buttonProps,
|
|
15372
|
+
...props
|
|
15373
|
+
}, ref) {
|
|
15374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(MultiSelectRoot, { ...props, children: [
|
|
15375
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MultiSelectButton, { ref, ...buttonProps }),
|
|
15376
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MultiSelectContent, { ...contentPanelProps, children })
|
|
15377
|
+
] });
|
|
15378
|
+
});
|
|
15379
|
+
var MultiSelectUncontrolled = (0, import_react64.forwardRef)(function MultiSelectUncontrolled2({
|
|
15380
|
+
value: initialValue,
|
|
15381
|
+
onValueChange,
|
|
15382
|
+
...props
|
|
15383
|
+
}, ref) {
|
|
15384
|
+
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
15385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
15386
|
+
MultiSelect,
|
|
15387
|
+
{
|
|
15388
|
+
...props,
|
|
15389
|
+
ref,
|
|
15390
|
+
value,
|
|
15391
|
+
onValueChange: setValue
|
|
15392
|
+
}
|
|
15393
|
+
);
|
|
15394
|
+
});
|
|
15395
|
+
|
|
15396
|
+
// src/components/utils/FocusTrap.tsx
|
|
15404
15397
|
var import_react65 = require("react");
|
|
15398
|
+
var import_react66 = require("react");
|
|
15399
|
+
var import_react67 = require("react");
|
|
15405
15400
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
15406
|
-
var FocusTrap = (0,
|
|
15401
|
+
var FocusTrap = (0, import_react67.forwardRef)(function FocusTrap2({
|
|
15407
15402
|
active = true,
|
|
15408
15403
|
initialFocus,
|
|
15409
15404
|
focusFirst = false,
|
|
15410
15405
|
...props
|
|
15411
15406
|
}, forwardedRef) {
|
|
15412
|
-
const innerRef = (0,
|
|
15413
|
-
(0,
|
|
15407
|
+
const innerRef = (0, import_react65.useRef)(null);
|
|
15408
|
+
(0, import_react66.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
15414
15409
|
useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
|
|
15415
15410
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { ref: innerRef, ...props });
|
|
15416
15411
|
});
|
|
15417
15412
|
|
|
15418
15413
|
// src/components/utils/Transition.tsx
|
|
15419
|
-
var
|
|
15414
|
+
var import_react68 = require("react");
|
|
15420
15415
|
function Transition({
|
|
15421
15416
|
children,
|
|
15422
15417
|
show,
|
|
15423
15418
|
includeAnimation = true
|
|
15424
15419
|
}) {
|
|
15425
|
-
const [isOpen, setIsOpen] = (0,
|
|
15426
|
-
const [isTransitioning, setIsTransitioning] = (0,
|
|
15420
|
+
const [isOpen, setIsOpen] = (0, import_react68.useState)(show);
|
|
15421
|
+
const [isTransitioning, setIsTransitioning] = (0, import_react68.useState)(!isOpen);
|
|
15427
15422
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
15428
|
-
(0,
|
|
15423
|
+
(0, import_react68.useEffect)(() => {
|
|
15429
15424
|
setIsOpen(show);
|
|
15430
15425
|
setIsTransitioning(true);
|
|
15431
15426
|
}, [show]);
|
|
@@ -15461,7 +15456,7 @@ var HightideProvider = ({
|
|
|
15461
15456
|
};
|
|
15462
15457
|
|
|
15463
15458
|
// src/hooks/focus/useFocusGuards.ts
|
|
15464
|
-
var
|
|
15459
|
+
var import_react69 = require("react");
|
|
15465
15460
|
var selectorName = "data-hw-focus-guard";
|
|
15466
15461
|
function FocusGuard() {
|
|
15467
15462
|
const element = document.createElement("div");
|
|
@@ -15499,7 +15494,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
15499
15494
|
}
|
|
15500
15495
|
};
|
|
15501
15496
|
var useFocusGuards = () => {
|
|
15502
|
-
(0,
|
|
15497
|
+
(0, import_react69.useEffect)(() => {
|
|
15503
15498
|
FocusGuardsService.getInstance().add();
|
|
15504
15499
|
return () => {
|
|
15505
15500
|
FocusGuardsService.getInstance().remove();
|
|
@@ -15508,10 +15503,10 @@ var useFocusGuards = () => {
|
|
|
15508
15503
|
};
|
|
15509
15504
|
|
|
15510
15505
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
15511
|
-
var
|
|
15506
|
+
var import_react70 = __toESM(require("react"));
|
|
15512
15507
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
15513
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
15514
|
-
(0,
|
|
15508
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react70.default.useState(false);
|
|
15509
|
+
(0, import_react70.useEffect)(() => {
|
|
15515
15510
|
if (disable || hasUsedFocus) {
|
|
15516
15511
|
return;
|
|
15517
15512
|
}
|
|
@@ -15531,13 +15526,13 @@ var useFocusOnceVisible = (ref, disable = false) => {
|
|
|
15531
15526
|
};
|
|
15532
15527
|
|
|
15533
15528
|
// src/hooks/useRerender.ts
|
|
15534
|
-
var
|
|
15529
|
+
var import_react71 = require("react");
|
|
15535
15530
|
var useRerender = () => {
|
|
15536
|
-
return (0,
|
|
15531
|
+
return (0, import_react71.useReducer)(() => ({}), {})[1];
|
|
15537
15532
|
};
|
|
15538
15533
|
|
|
15539
15534
|
// src/hooks/useSearch.ts
|
|
15540
|
-
var
|
|
15535
|
+
var import_react72 = require("react");
|
|
15541
15536
|
|
|
15542
15537
|
// src/utils/simpleSearch.ts
|
|
15543
15538
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -15576,34 +15571,34 @@ var useSearch = ({
|
|
|
15576
15571
|
filter,
|
|
15577
15572
|
disabled = false
|
|
15578
15573
|
}) => {
|
|
15579
|
-
const [search, setSearch] = (0,
|
|
15580
|
-
const [result, setResult] = (0,
|
|
15581
|
-
const searchTags = (0,
|
|
15582
|
-
const updateSearch = (0,
|
|
15574
|
+
const [search, setSearch] = (0, import_react72.useState)(initialSearch ?? "");
|
|
15575
|
+
const [result, setResult] = (0, import_react72.useState)(list);
|
|
15576
|
+
const searchTags = (0, import_react72.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
15577
|
+
const updateSearch = (0, import_react72.useCallback)((newSearch) => {
|
|
15583
15578
|
const usedSearch = newSearch ?? search;
|
|
15584
15579
|
if (newSearch) {
|
|
15585
15580
|
setSearch(search);
|
|
15586
15581
|
}
|
|
15587
15582
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
15588
15583
|
}, [searchTags, list, search, searchMapping]);
|
|
15589
|
-
(0,
|
|
15584
|
+
(0, import_react72.useEffect)(() => {
|
|
15590
15585
|
if (isSearchInstant) {
|
|
15591
15586
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
15592
15587
|
}
|
|
15593
15588
|
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
15594
|
-
const filteredResult = (0,
|
|
15589
|
+
const filteredResult = (0, import_react72.useMemo)(() => {
|
|
15595
15590
|
if (!filter) {
|
|
15596
15591
|
return result;
|
|
15597
15592
|
}
|
|
15598
15593
|
return result.filter(filter);
|
|
15599
15594
|
}, [result, filter]);
|
|
15600
|
-
const sortedAndFilteredResult = (0,
|
|
15595
|
+
const sortedAndFilteredResult = (0, import_react72.useMemo)(() => {
|
|
15601
15596
|
if (!sortingFunction) {
|
|
15602
15597
|
return filteredResult;
|
|
15603
15598
|
}
|
|
15604
15599
|
return filteredResult.sort(sortingFunction);
|
|
15605
15600
|
}, [filteredResult, sortingFunction]);
|
|
15606
|
-
const usedResult = (0,
|
|
15601
|
+
const usedResult = (0, import_react72.useMemo)(() => {
|
|
15607
15602
|
if (!disabled) {
|
|
15608
15603
|
return sortedAndFilteredResult;
|
|
15609
15604
|
}
|
|
@@ -15625,7 +15620,7 @@ var validateEmail = (email) => {
|
|
|
15625
15620
|
};
|
|
15626
15621
|
|
|
15627
15622
|
// src/hooks/useValidators.ts
|
|
15628
|
-
var
|
|
15623
|
+
var import_react73 = require("react");
|
|
15629
15624
|
var notEmpty = (value) => {
|
|
15630
15625
|
if (!value) {
|
|
15631
15626
|
return "notEmpty";
|
|
@@ -15675,7 +15670,7 @@ var UseValidators = {
|
|
|
15675
15670
|
};
|
|
15676
15671
|
var useTranslatedValidators = () => {
|
|
15677
15672
|
const translation = useHightideTranslation();
|
|
15678
|
-
return (0,
|
|
15673
|
+
return (0, import_react73.useMemo)(() => ({
|
|
15679
15674
|
notEmpty: (value) => {
|
|
15680
15675
|
const result = notEmpty(value);
|
|
15681
15676
|
if (result) {
|