@helpwave/hightide 0.1.47 → 0.1.48
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 +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +532 -433
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +503 -407
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +24 -0
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -39,12 +39,12 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
39
39
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
40
40
|
}
|
|
41
41
|
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
42
|
-
var
|
|
43
|
-
var
|
|
42
|
+
var useState37 = React21.useState;
|
|
43
|
+
var useEffect40 = React21.useEffect;
|
|
44
44
|
var useLayoutEffect3 = React21.useLayoutEffect;
|
|
45
45
|
var useDebugValue = React21.useDebugValue;
|
|
46
46
|
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
47
|
-
var value = getSnapshot(), _useState =
|
|
47
|
+
var value = getSnapshot(), _useState = useState37({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
48
48
|
useLayoutEffect3(
|
|
49
49
|
function() {
|
|
50
50
|
inst.value = value;
|
|
@@ -53,7 +53,7 @@ var require_use_sync_external_store_shim_production = __commonJS({
|
|
|
53
53
|
},
|
|
54
54
|
[subscribe2, value, getSnapshot]
|
|
55
55
|
);
|
|
56
|
-
|
|
56
|
+
useEffect40(
|
|
57
57
|
function() {
|
|
58
58
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
59
59
|
return subscribe2(function() {
|
|
@@ -102,7 +102,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
102
102
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
103
103
|
), didWarnUncachedGetSnapshot = true);
|
|
104
104
|
}
|
|
105
|
-
cachedValue =
|
|
105
|
+
cachedValue = useState37({
|
|
106
106
|
inst: { value, getSnapshot }
|
|
107
107
|
});
|
|
108
108
|
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
@@ -114,7 +114,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
114
114
|
},
|
|
115
115
|
[subscribe2, value, getSnapshot]
|
|
116
116
|
);
|
|
117
|
-
|
|
117
|
+
useEffect40(
|
|
118
118
|
function() {
|
|
119
119
|
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
120
120
|
return subscribe2(function() {
|
|
@@ -140,7 +140,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
140
140
|
return getSnapshot();
|
|
141
141
|
}
|
|
142
142
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
143
|
-
var React21 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is,
|
|
143
|
+
var React21 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState37 = React21.useState, useEffect40 = React21.useEffect, useLayoutEffect3 = React21.useLayoutEffect, useDebugValue = React21.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
144
144
|
exports.useSyncExternalStore = void 0 !== React21.useSyncExternalStore ? React21.useSyncExternalStore : shim;
|
|
145
145
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
146
146
|
}();
|
|
@@ -6986,7 +6986,7 @@ var hightideTranslation = {
|
|
|
6986
6986
|
});
|
|
6987
6987
|
},
|
|
6988
6988
|
"themes": ({ count }) => {
|
|
6989
|
-
return TranslationGen.
|
|
6989
|
+
return TranslationGen.resolvePlural(count, {
|
|
6990
6990
|
"=1": `Farbschema`,
|
|
6991
6991
|
"other": `Farbschemas`
|
|
6992
6992
|
});
|
|
@@ -6998,19 +6998,19 @@ var hightideTranslation = {
|
|
|
6998
6998
|
"time.april": `April`,
|
|
6999
6999
|
"time.august": `August`,
|
|
7000
7000
|
"time.century": ({ count }) => {
|
|
7001
|
-
return TranslationGen.
|
|
7001
|
+
return TranslationGen.resolvePlural(count, {
|
|
7002
7002
|
"=1": `Jahrhundert`,
|
|
7003
7003
|
"other": `Jahrhunderte`
|
|
7004
7004
|
});
|
|
7005
7005
|
},
|
|
7006
7006
|
"time.day": ({ count }) => {
|
|
7007
|
-
return TranslationGen.
|
|
7007
|
+
return TranslationGen.resolvePlural(count, {
|
|
7008
7008
|
"=1": `Tag`,
|
|
7009
7009
|
"other": `Tage`
|
|
7010
7010
|
});
|
|
7011
7011
|
},
|
|
7012
7012
|
"time.decade": ({ count }) => {
|
|
7013
|
-
return TranslationGen.
|
|
7013
|
+
return TranslationGen.resolvePlural(count, {
|
|
7014
7014
|
"=1": `Jahrzehnt`,
|
|
7015
7015
|
"other": `Jahrzehnte`
|
|
7016
7016
|
});
|
|
@@ -7018,7 +7018,7 @@ var hightideTranslation = {
|
|
|
7018
7018
|
"time.december": `December`,
|
|
7019
7019
|
"time.february": `Febuar`,
|
|
7020
7020
|
"time.hour": ({ count }) => {
|
|
7021
|
-
return TranslationGen.
|
|
7021
|
+
return TranslationGen.resolvePlural(count, {
|
|
7022
7022
|
"=1": `Stunde`,
|
|
7023
7023
|
"other": `Stunden`
|
|
7024
7024
|
});
|
|
@@ -7033,25 +7033,25 @@ var hightideTranslation = {
|
|
|
7033
7033
|
"time.march": `M\xE4rz`,
|
|
7034
7034
|
"time.may": `Mai`,
|
|
7035
7035
|
"time.microsecond": ({ count }) => {
|
|
7036
|
-
return TranslationGen.
|
|
7036
|
+
return TranslationGen.resolvePlural(count, {
|
|
7037
7037
|
"=1": `Mikrosekunde`,
|
|
7038
7038
|
"other": `Mikrosekunden`
|
|
7039
7039
|
});
|
|
7040
7040
|
},
|
|
7041
7041
|
"time.millisecond": ({ count }) => {
|
|
7042
|
-
return TranslationGen.
|
|
7042
|
+
return TranslationGen.resolvePlural(count, {
|
|
7043
7043
|
"=1": `Millisekunde`,
|
|
7044
7044
|
"other": `Millisekunden`
|
|
7045
7045
|
});
|
|
7046
7046
|
},
|
|
7047
7047
|
"time.minute": ({ count }) => {
|
|
7048
|
-
return TranslationGen.
|
|
7048
|
+
return TranslationGen.resolvePlural(count, {
|
|
7049
7049
|
"=1": `Minute`,
|
|
7050
7050
|
"other": `Minuten`
|
|
7051
7051
|
});
|
|
7052
7052
|
},
|
|
7053
7053
|
"time.month": ({ count }) => {
|
|
7054
|
-
return TranslationGen.
|
|
7054
|
+
return TranslationGen.resolvePlural(count, {
|
|
7055
7055
|
"=1": `Monat`,
|
|
7056
7056
|
"other": `Monate`
|
|
7057
7057
|
});
|
|
@@ -7074,7 +7074,7 @@ var hightideTranslation = {
|
|
|
7074
7074
|
});
|
|
7075
7075
|
},
|
|
7076
7076
|
"time.nanosecond": ({ count }) => {
|
|
7077
|
-
return TranslationGen.
|
|
7077
|
+
return TranslationGen.resolvePlural(count, {
|
|
7078
7078
|
"=1": `Nanosekunde`,
|
|
7079
7079
|
"other": `Nanosekunden`
|
|
7080
7080
|
});
|
|
@@ -7082,7 +7082,7 @@ var hightideTranslation = {
|
|
|
7082
7082
|
"time.november": `November`,
|
|
7083
7083
|
"time.october": `October`,
|
|
7084
7084
|
"time.second": ({ count }) => {
|
|
7085
|
-
return TranslationGen.
|
|
7085
|
+
return TranslationGen.resolvePlural(count, {
|
|
7086
7086
|
"=1": `Sekunde`,
|
|
7087
7087
|
"other": `Sekunden`
|
|
7088
7088
|
});
|
|
@@ -7091,7 +7091,7 @@ var hightideTranslation = {
|
|
|
7091
7091
|
"time.today": `Heute`,
|
|
7092
7092
|
"time.tomorrow": `Morgen`,
|
|
7093
7093
|
"time.year": ({ count }) => {
|
|
7094
|
-
return TranslationGen.
|
|
7094
|
+
return TranslationGen.resolvePlural(count, {
|
|
7095
7095
|
"=1": `Jahr`,
|
|
7096
7096
|
"other": `Jahre`
|
|
7097
7097
|
});
|
|
@@ -7222,7 +7222,7 @@ var hightideTranslation = {
|
|
|
7222
7222
|
});
|
|
7223
7223
|
},
|
|
7224
7224
|
"themes": ({ count }) => {
|
|
7225
|
-
return TranslationGen.
|
|
7225
|
+
return TranslationGen.resolvePlural(count, {
|
|
7226
7226
|
"=1": `Theme`,
|
|
7227
7227
|
"other": `Themes`
|
|
7228
7228
|
});
|
|
@@ -7234,19 +7234,19 @@ var hightideTranslation = {
|
|
|
7234
7234
|
"time.april": `April`,
|
|
7235
7235
|
"time.august": `August`,
|
|
7236
7236
|
"time.century": ({ count }) => {
|
|
7237
|
-
return TranslationGen.
|
|
7237
|
+
return TranslationGen.resolvePlural(count, {
|
|
7238
7238
|
"=1": `Century`,
|
|
7239
7239
|
"other": `Centuries`
|
|
7240
7240
|
});
|
|
7241
7241
|
},
|
|
7242
7242
|
"time.day": ({ count }) => {
|
|
7243
|
-
return TranslationGen.
|
|
7243
|
+
return TranslationGen.resolvePlural(count, {
|
|
7244
7244
|
"=1": `Day`,
|
|
7245
7245
|
"other": `Days`
|
|
7246
7246
|
});
|
|
7247
7247
|
},
|
|
7248
7248
|
"time.decade": ({ count }) => {
|
|
7249
|
-
return TranslationGen.
|
|
7249
|
+
return TranslationGen.resolvePlural(count, {
|
|
7250
7250
|
"=1": `Decade`,
|
|
7251
7251
|
"other": `Decades`
|
|
7252
7252
|
});
|
|
@@ -7254,7 +7254,7 @@ var hightideTranslation = {
|
|
|
7254
7254
|
"time.december": `December`,
|
|
7255
7255
|
"time.february": `Febuary`,
|
|
7256
7256
|
"time.hour": ({ count }) => {
|
|
7257
|
-
return TranslationGen.
|
|
7257
|
+
return TranslationGen.resolvePlural(count, {
|
|
7258
7258
|
"=1": `Hour`,
|
|
7259
7259
|
"other": `Hours`
|
|
7260
7260
|
});
|
|
@@ -7269,25 +7269,25 @@ var hightideTranslation = {
|
|
|
7269
7269
|
"time.march": `March`,
|
|
7270
7270
|
"time.may": `May`,
|
|
7271
7271
|
"time.microsecond": ({ count }) => {
|
|
7272
|
-
return TranslationGen.
|
|
7272
|
+
return TranslationGen.resolvePlural(count, {
|
|
7273
7273
|
"=1": `Microsecond`,
|
|
7274
7274
|
"other": `Microseconds`
|
|
7275
7275
|
});
|
|
7276
7276
|
},
|
|
7277
7277
|
"time.millisecond": ({ count }) => {
|
|
7278
|
-
return TranslationGen.
|
|
7278
|
+
return TranslationGen.resolvePlural(count, {
|
|
7279
7279
|
"=1": `Millisecond`,
|
|
7280
7280
|
"other": `Milliseconds`
|
|
7281
7281
|
});
|
|
7282
7282
|
},
|
|
7283
7283
|
"time.minute": ({ count }) => {
|
|
7284
|
-
return TranslationGen.
|
|
7284
|
+
return TranslationGen.resolvePlural(count, {
|
|
7285
7285
|
"=1": `Minute`,
|
|
7286
7286
|
"other": `Minutes`
|
|
7287
7287
|
});
|
|
7288
7288
|
},
|
|
7289
7289
|
"time.month": ({ count }) => {
|
|
7290
|
-
return TranslationGen.
|
|
7290
|
+
return TranslationGen.resolvePlural(count, {
|
|
7291
7291
|
"=1": `Month`,
|
|
7292
7292
|
"other": `Months`
|
|
7293
7293
|
});
|
|
@@ -7310,7 +7310,7 @@ var hightideTranslation = {
|
|
|
7310
7310
|
});
|
|
7311
7311
|
},
|
|
7312
7312
|
"time.nanosecond": ({ count }) => {
|
|
7313
|
-
return TranslationGen.
|
|
7313
|
+
return TranslationGen.resolvePlural(count, {
|
|
7314
7314
|
"=1": `Nanosecond`,
|
|
7315
7315
|
"other": `Nanoseconds`
|
|
7316
7316
|
});
|
|
@@ -7318,7 +7318,7 @@ var hightideTranslation = {
|
|
|
7318
7318
|
"time.november": `November`,
|
|
7319
7319
|
"time.october": `October`,
|
|
7320
7320
|
"time.second": ({ count }) => {
|
|
7321
|
-
return TranslationGen.
|
|
7321
|
+
return TranslationGen.resolvePlural(count, {
|
|
7322
7322
|
"=1": `Second`,
|
|
7323
7323
|
"other": `Seconds`
|
|
7324
7324
|
});
|
|
@@ -7327,7 +7327,7 @@ var hightideTranslation = {
|
|
|
7327
7327
|
"time.today": `Today`,
|
|
7328
7328
|
"time.tomorrow": `Tomorrow`,
|
|
7329
7329
|
"time.year": ({ count }) => {
|
|
7330
|
-
return TranslationGen.
|
|
7330
|
+
return TranslationGen.resolvePlural(count, {
|
|
7331
7331
|
"=1": `Year`,
|
|
7332
7332
|
"other": `Years`
|
|
7333
7333
|
});
|
|
@@ -12786,9 +12786,102 @@ var ScrollArea2 = ({
|
|
|
12786
12786
|
);
|
|
12787
12787
|
};
|
|
12788
12788
|
|
|
12789
|
-
// src/components/layout/
|
|
12789
|
+
// src/components/layout/TabView.tsx
|
|
12790
|
+
import { useId as useId7 } from "react";
|
|
12791
|
+
import { createContext as createContext8, useContext as useContext8, useState as useState20, useEffect as useEffect22, useRef as useRef14 } from "react";
|
|
12790
12792
|
import clsx26 from "clsx";
|
|
12791
12793
|
import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
12794
|
+
var TabContext = createContext8(null);
|
|
12795
|
+
function useTabContext() {
|
|
12796
|
+
const ctx = useContext8(TabContext);
|
|
12797
|
+
if (!ctx) throw new Error("useTabContext must be used inside a <TabView>");
|
|
12798
|
+
return ctx;
|
|
12799
|
+
}
|
|
12800
|
+
function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, ...props }) {
|
|
12801
|
+
const [tabs, setTabs] = useState20([]);
|
|
12802
|
+
const [active, setActiveState] = useState20(null);
|
|
12803
|
+
const buttonRefs = useRef14({});
|
|
12804
|
+
const setActive = (id) => {
|
|
12805
|
+
setActiveState(id);
|
|
12806
|
+
onTabChanged?.(id);
|
|
12807
|
+
};
|
|
12808
|
+
const register = (id, label) => {
|
|
12809
|
+
setTabs((prev) => {
|
|
12810
|
+
const exists = prev.some((t) => t.id === id);
|
|
12811
|
+
if (!exists) {
|
|
12812
|
+
const updated = [...prev, { id, label }];
|
|
12813
|
+
if (active === null && updated[initialTabIndex]) {
|
|
12814
|
+
setActive(updated[initialTabIndex].id);
|
|
12815
|
+
}
|
|
12816
|
+
return updated;
|
|
12817
|
+
}
|
|
12818
|
+
return prev;
|
|
12819
|
+
});
|
|
12820
|
+
};
|
|
12821
|
+
const unregister = (id) => {
|
|
12822
|
+
setTabs((prev) => prev.filter((t) => t.id !== id));
|
|
12823
|
+
delete buttonRefs.current[id];
|
|
12824
|
+
};
|
|
12825
|
+
const onKeyDown = (e, id) => {
|
|
12826
|
+
const idx = tabs.findIndex((t) => t.id === id);
|
|
12827
|
+
if (idx === -1) return;
|
|
12828
|
+
let nextIdx = idx;
|
|
12829
|
+
if (e.key === "ArrowRight") nextIdx = (idx + 1) % tabs.length;
|
|
12830
|
+
else if (e.key === "ArrowLeft") nextIdx = (idx - 1 + tabs.length) % tabs.length;
|
|
12831
|
+
else return;
|
|
12832
|
+
const nextId = tabs[nextIdx].id;
|
|
12833
|
+
setActive(nextId);
|
|
12834
|
+
buttonRefs.current[nextId]?.focus();
|
|
12835
|
+
};
|
|
12836
|
+
const value = { active, setActive, register, unregister, tabs };
|
|
12837
|
+
return /* @__PURE__ */ jsx40(TabContext.Provider, { value, children: /* @__PURE__ */ jsxs21("div", { ...outerDivProps, className: clsx26("w-full", props.className), children: [
|
|
12838
|
+
/* @__PURE__ */ jsx40("div", { role: "tablist", ...props, className: clsx26("flex-row-0"), children: tabs.map((t) => /* @__PURE__ */ jsx40(
|
|
12839
|
+
"button",
|
|
12840
|
+
{
|
|
12841
|
+
role: "tab",
|
|
12842
|
+
"aria-selected": active === t.id,
|
|
12843
|
+
"aria-controls": `${t.id}-panel`,
|
|
12844
|
+
id: `${t.id}-tab`,
|
|
12845
|
+
tabIndex: active === t.id ? 0 : -1,
|
|
12846
|
+
ref: (el) => buttonRefs.current[t.id] = el,
|
|
12847
|
+
onClick: () => setActive(t.id),
|
|
12848
|
+
onKeyDown: (e) => onKeyDown(e, t.id),
|
|
12849
|
+
className: clsx26(
|
|
12850
|
+
"flex-row-0 grow justify-center px-3 pb-1 typography-label-md border-b-2",
|
|
12851
|
+
active === t.id ? "border-primary" : "text-description hover:text-on-background"
|
|
12852
|
+
),
|
|
12853
|
+
children: t.label
|
|
12854
|
+
},
|
|
12855
|
+
t.id
|
|
12856
|
+
)) }),
|
|
12857
|
+
children
|
|
12858
|
+
] }) });
|
|
12859
|
+
}
|
|
12860
|
+
function Tab({ id: customId, label, children, ...props }) {
|
|
12861
|
+
const { active, register, unregister } = useTabContext();
|
|
12862
|
+
const generatedId = useId7();
|
|
12863
|
+
const id = customId ?? generatedId;
|
|
12864
|
+
useEffect22(() => {
|
|
12865
|
+
register(id, label);
|
|
12866
|
+
return () => unregister(id);
|
|
12867
|
+
}, [id, label]);
|
|
12868
|
+
return /* @__PURE__ */ jsx40(
|
|
12869
|
+
"div",
|
|
12870
|
+
{
|
|
12871
|
+
role: "tabpanel",
|
|
12872
|
+
id: `${id}-panel`,
|
|
12873
|
+
"aria-labelledby": `${id}-tab`,
|
|
12874
|
+
hidden: active !== id,
|
|
12875
|
+
className: "mt-4 text-sm",
|
|
12876
|
+
...props,
|
|
12877
|
+
children: active === id && children
|
|
12878
|
+
}
|
|
12879
|
+
);
|
|
12880
|
+
}
|
|
12881
|
+
|
|
12882
|
+
// src/components/layout/TextImage.tsx
|
|
12883
|
+
import clsx27 from "clsx";
|
|
12884
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
12792
12885
|
var TextImage = ({
|
|
12793
12886
|
title,
|
|
12794
12887
|
description,
|
|
@@ -12810,25 +12903,25 @@ var TextImage = ({
|
|
|
12810
12903
|
secondary: "text-text-image-secondary-text bg-linear-to-r from-30% from-text-image-secondary-background to-text-image-secondary-background/55",
|
|
12811
12904
|
dark: "text-text-image-dark-text bg-linear-to-r from-30% from-text-image-dark-background to-text-image-dark-background/55"
|
|
12812
12905
|
};
|
|
12813
|
-
return /* @__PURE__ */
|
|
12906
|
+
return /* @__PURE__ */ jsx41(
|
|
12814
12907
|
"div",
|
|
12815
12908
|
{
|
|
12816
|
-
className:
|
|
12909
|
+
className: clsx27("rounded-2xl w-full", className),
|
|
12817
12910
|
style: {
|
|
12818
12911
|
backgroundImage: `url(${imageUrl})`,
|
|
12819
12912
|
backgroundSize: "cover"
|
|
12820
12913
|
},
|
|
12821
|
-
children: /* @__PURE__ */
|
|
12914
|
+
children: /* @__PURE__ */ jsxs22(
|
|
12822
12915
|
"div",
|
|
12823
12916
|
{
|
|
12824
|
-
className:
|
|
12917
|
+
className: clsx27(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
|
|
12825
12918
|
children: [
|
|
12826
|
-
badge && /* @__PURE__ */
|
|
12827
|
-
/* @__PURE__ */
|
|
12828
|
-
/* @__PURE__ */
|
|
12829
|
-
/* @__PURE__ */
|
|
12919
|
+
badge && /* @__PURE__ */ jsx41("div", { className: clsx27(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ jsx41("span", { className: "text-lg font-bold", children: badge }) }),
|
|
12920
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex-col-1 overflow-hidden", children: [
|
|
12921
|
+
/* @__PURE__ */ jsx41("span", { className: "typography-title-lg", children: title }),
|
|
12922
|
+
/* @__PURE__ */ jsx41("span", { className: "text-ellipsis overflow-hidden", children: description })
|
|
12830
12923
|
] }),
|
|
12831
|
-
onShowMoreClicked && /* @__PURE__ */
|
|
12924
|
+
onShowMoreClicked && /* @__PURE__ */ jsx41("div", { className: "flex-row-2 mt-2 underline", children: /* @__PURE__ */ jsx41("button", { onClick: onShowMoreClicked, children: translation("showMore") }) })
|
|
12832
12925
|
]
|
|
12833
12926
|
}
|
|
12834
12927
|
)
|
|
@@ -12837,7 +12930,7 @@ var TextImage = ({
|
|
|
12837
12930
|
};
|
|
12838
12931
|
|
|
12839
12932
|
// src/components/layout/VerticalDivider.tsx
|
|
12840
|
-
import { jsx as
|
|
12933
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12841
12934
|
var VerticalDivider = ({
|
|
12842
12935
|
width = 1,
|
|
12843
12936
|
height = 100,
|
|
@@ -12845,7 +12938,7 @@ var VerticalDivider = ({
|
|
|
12845
12938
|
dashGap = 4,
|
|
12846
12939
|
dashLength = 4
|
|
12847
12940
|
}) => {
|
|
12848
|
-
return /* @__PURE__ */
|
|
12941
|
+
return /* @__PURE__ */ jsx42("div", { style: { width: width + "px", height: height + "px" }, children: /* @__PURE__ */ jsxs23(
|
|
12849
12942
|
"svg",
|
|
12850
12943
|
{
|
|
12851
12944
|
width,
|
|
@@ -12854,7 +12947,7 @@ var VerticalDivider = ({
|
|
|
12854
12947
|
fill: "none",
|
|
12855
12948
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12856
12949
|
children: [
|
|
12857
|
-
/* @__PURE__ */
|
|
12950
|
+
/* @__PURE__ */ jsx42(
|
|
12858
12951
|
"line",
|
|
12859
12952
|
{
|
|
12860
12953
|
opacity: "0.5",
|
|
@@ -12868,7 +12961,7 @@ var VerticalDivider = ({
|
|
|
12868
12961
|
strokeLinecap: "round"
|
|
12869
12962
|
}
|
|
12870
12963
|
),
|
|
12871
|
-
/* @__PURE__ */
|
|
12964
|
+
/* @__PURE__ */ jsx42("defs", { children: /* @__PURE__ */ jsxs23(
|
|
12872
12965
|
"linearGradient",
|
|
12873
12966
|
{
|
|
12874
12967
|
id: "paint_linear",
|
|
@@ -12878,9 +12971,9 @@ var VerticalDivider = ({
|
|
|
12878
12971
|
y2: height,
|
|
12879
12972
|
gradientUnits: "userSpaceOnUse",
|
|
12880
12973
|
children: [
|
|
12881
|
-
/* @__PURE__ */
|
|
12882
|
-
/* @__PURE__ */
|
|
12883
|
-
/* @__PURE__ */
|
|
12974
|
+
/* @__PURE__ */ jsx42("stop", { stopOpacity: "0", stopColor: "currentColor" }),
|
|
12975
|
+
/* @__PURE__ */ jsx42("stop", { offset: "0.5", stopColor: "currentColor" }),
|
|
12976
|
+
/* @__PURE__ */ jsx42("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
|
|
12884
12977
|
]
|
|
12885
12978
|
}
|
|
12886
12979
|
) })
|
|
@@ -12891,32 +12984,32 @@ var VerticalDivider = ({
|
|
|
12891
12984
|
|
|
12892
12985
|
// src/components/loading-states/ErrorComponent.tsx
|
|
12893
12986
|
import { AlertOctagon } from "lucide-react";
|
|
12894
|
-
import
|
|
12895
|
-
import { jsx as
|
|
12987
|
+
import clsx28 from "clsx";
|
|
12988
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
12896
12989
|
var ErrorComponent = ({
|
|
12897
12990
|
errorText,
|
|
12898
12991
|
classname
|
|
12899
12992
|
}) => {
|
|
12900
12993
|
const translation = useHightideTranslation();
|
|
12901
|
-
return /* @__PURE__ */
|
|
12902
|
-
/* @__PURE__ */
|
|
12994
|
+
return /* @__PURE__ */ jsxs24("div", { className: clsx28("flex-col-4 items-center justify-center w-full h-24", classname), children: [
|
|
12995
|
+
/* @__PURE__ */ jsx43(AlertOctagon, { size: 64, className: "text-warning" }),
|
|
12903
12996
|
errorText ?? `${translation("errorOccurred")} :(`
|
|
12904
12997
|
] });
|
|
12905
12998
|
};
|
|
12906
12999
|
|
|
12907
13000
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
12908
|
-
import { useState as
|
|
13001
|
+
import { useState as useState21 } from "react";
|
|
12909
13002
|
|
|
12910
13003
|
// src/components/loading-states/LoadingContainer.tsx
|
|
12911
|
-
import { clsx as
|
|
12912
|
-
import { jsx as
|
|
13004
|
+
import { clsx as clsx29 } from "clsx";
|
|
13005
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
12913
13006
|
var LoadingContainer = ({ className }) => {
|
|
12914
|
-
return /* @__PURE__ */
|
|
13007
|
+
return /* @__PURE__ */ jsx44("div", { className: clsx29("relative overflow-hidden shimmer bg-disabled-background rounded-md", className) });
|
|
12915
13008
|
};
|
|
12916
13009
|
|
|
12917
13010
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
12918
|
-
import { clsx as
|
|
12919
|
-
import { jsx as
|
|
13011
|
+
import { clsx as clsx30 } from "clsx";
|
|
13012
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
12920
13013
|
var LoadingAndErrorComponent = ({
|
|
12921
13014
|
children,
|
|
12922
13015
|
isLoading = false,
|
|
@@ -12926,8 +13019,8 @@ var LoadingAndErrorComponent = ({
|
|
|
12926
13019
|
minimumLoadingDuration = 200,
|
|
12927
13020
|
className
|
|
12928
13021
|
}) => {
|
|
12929
|
-
const [isInMinimumLoading, setIsInMinimumLoading] =
|
|
12930
|
-
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] =
|
|
13022
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = useState21(false);
|
|
13023
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState21(false);
|
|
12931
13024
|
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
12932
13025
|
setIsInMinimumLoading(true);
|
|
12933
13026
|
setTimeout(() => {
|
|
@@ -12936,41 +13029,41 @@ var LoadingAndErrorComponent = ({
|
|
|
12936
13029
|
}, minimumLoadingDuration);
|
|
12937
13030
|
}
|
|
12938
13031
|
if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
|
|
12939
|
-
return loadingComponent ?? /* @__PURE__ */
|
|
13032
|
+
return loadingComponent ?? /* @__PURE__ */ jsx45(LoadingContainer, { className: clsx30(className) });
|
|
12940
13033
|
}
|
|
12941
13034
|
if (hasError) {
|
|
12942
|
-
return errorComponent ?? /* @__PURE__ */
|
|
13035
|
+
return errorComponent ?? /* @__PURE__ */ jsx45(LoadingContainer, { className: clsx30("bg-negative", className) });
|
|
12943
13036
|
}
|
|
12944
13037
|
return children;
|
|
12945
13038
|
};
|
|
12946
13039
|
|
|
12947
13040
|
// src/components/loading-states/LoadingAnimation.tsx
|
|
12948
|
-
import
|
|
12949
|
-
import { jsx as
|
|
13041
|
+
import clsx31 from "clsx";
|
|
13042
|
+
import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
12950
13043
|
var LoadingAnimation = ({
|
|
12951
13044
|
loadingText,
|
|
12952
13045
|
classname
|
|
12953
13046
|
}) => {
|
|
12954
13047
|
const translation = useHightideTranslation();
|
|
12955
|
-
return /* @__PURE__ */
|
|
12956
|
-
/* @__PURE__ */
|
|
13048
|
+
return /* @__PURE__ */ jsxs25("div", { className: clsx31("flex-col-2 items-center justify-center w-full h-24", classname), children: [
|
|
13049
|
+
/* @__PURE__ */ jsx46(HelpwaveLogo, { animate: "loading" }),
|
|
12957
13050
|
loadingText ?? `${translation("loading")}...`
|
|
12958
13051
|
] });
|
|
12959
13052
|
};
|
|
12960
13053
|
|
|
12961
13054
|
// src/components/loading-states/LoadingButton.tsx
|
|
12962
|
-
import
|
|
12963
|
-
import { jsx as
|
|
13055
|
+
import clsx32 from "clsx";
|
|
13056
|
+
import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
12964
13057
|
var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
|
|
12965
13058
|
const paddingClass = ButtonUtil.paddingMapping[size];
|
|
12966
|
-
return /* @__PURE__ */
|
|
12967
|
-
isLoading && /* @__PURE__ */
|
|
12968
|
-
/* @__PURE__ */
|
|
13059
|
+
return /* @__PURE__ */ jsxs26("div", { className: "inline-block relative", children: [
|
|
13060
|
+
isLoading && /* @__PURE__ */ jsx47("div", { className: clsx32("flex-row-2 absolute inset-0 items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ jsx47(HelpwaveLogo, { animate: "loading", className: "text-white" }) }),
|
|
13061
|
+
/* @__PURE__ */ jsx47(SolidButton, { ...rest, disabled: rest.disabled, onClick })
|
|
12969
13062
|
] });
|
|
12970
13063
|
};
|
|
12971
13064
|
|
|
12972
13065
|
// src/components/loading-states/ProgressIndicator.tsx
|
|
12973
|
-
import { jsx as
|
|
13066
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
12974
13067
|
var sizeMapping = { small: 16, medium: 24, big: 48 };
|
|
12975
13068
|
var ProgressIndicator = ({
|
|
12976
13069
|
progress,
|
|
@@ -12987,7 +13080,7 @@ var ProgressIndicator = ({
|
|
|
12987
13080
|
if (direction === "clockwise") {
|
|
12988
13081
|
rotation += 360 * progress;
|
|
12989
13082
|
}
|
|
12990
|
-
return /* @__PURE__ */
|
|
13083
|
+
return /* @__PURE__ */ jsxs27(
|
|
12991
13084
|
"svg",
|
|
12992
13085
|
{
|
|
12993
13086
|
style: {
|
|
@@ -12996,7 +13089,7 @@ var ProgressIndicator = ({
|
|
|
12996
13089
|
transform: `rotate(${rotation}deg)`
|
|
12997
13090
|
},
|
|
12998
13091
|
children: [
|
|
12999
|
-
/* @__PURE__ */
|
|
13092
|
+
/* @__PURE__ */ jsx48(
|
|
13000
13093
|
"circle",
|
|
13001
13094
|
{
|
|
13002
13095
|
cx: center,
|
|
@@ -13007,7 +13100,7 @@ var ProgressIndicator = ({
|
|
|
13007
13100
|
className: "stroke-progress-indicator-fill"
|
|
13008
13101
|
}
|
|
13009
13102
|
),
|
|
13010
|
-
/* @__PURE__ */
|
|
13103
|
+
/* @__PURE__ */ jsx48(
|
|
13011
13104
|
"circle",
|
|
13012
13105
|
{
|
|
13013
13106
|
cx: center,
|
|
@@ -13027,23 +13120,23 @@ var ProgressIndicator = ({
|
|
|
13027
13120
|
|
|
13028
13121
|
// src/components/navigation/BreadCrumb.tsx
|
|
13029
13122
|
var import_link = __toESM(require_link2());
|
|
13030
|
-
import
|
|
13123
|
+
import clsx33 from "clsx";
|
|
13031
13124
|
import { Fragment as Fragment7 } from "react";
|
|
13032
|
-
import { jsx as
|
|
13125
|
+
import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
13033
13126
|
var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
13034
13127
|
const color = "text-description";
|
|
13035
|
-
return /* @__PURE__ */
|
|
13128
|
+
return /* @__PURE__ */ jsx49("div", { className: clsx33("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
|
|
13036
13129
|
const isLast = index === crumbs.length - 1;
|
|
13037
|
-
return /* @__PURE__ */
|
|
13038
|
-
/* @__PURE__ */
|
|
13130
|
+
return /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
13131
|
+
/* @__PURE__ */ jsx49(
|
|
13039
13132
|
import_link.default,
|
|
13040
13133
|
{
|
|
13041
13134
|
href: crumb.link,
|
|
13042
|
-
className:
|
|
13135
|
+
className: clsx33("btn-sm hover:bg-description/20", linkClassName, { [color]: !isLast }),
|
|
13043
13136
|
children: crumb.display
|
|
13044
13137
|
}
|
|
13045
13138
|
),
|
|
13046
|
-
!isLast && /* @__PURE__ */
|
|
13139
|
+
!isLast && /* @__PURE__ */ jsx49("span", { className: clsx33(`px-1`, color), children: "/" })
|
|
13047
13140
|
] }, index);
|
|
13048
13141
|
}) });
|
|
13049
13142
|
};
|
|
@@ -13051,10 +13144,10 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
|
|
|
13051
13144
|
// src/components/navigation/Navigation.tsx
|
|
13052
13145
|
var import_link2 = __toESM(require_link2());
|
|
13053
13146
|
import { Menu as MenuIcon, XIcon as XIcon2 } from "lucide-react";
|
|
13054
|
-
import { useEffect as
|
|
13055
|
-
import { useCallback as useCallback14, useId as
|
|
13056
|
-
import
|
|
13057
|
-
import { Fragment as Fragment8, jsx as
|
|
13147
|
+
import { useEffect as useEffect23 } from "react";
|
|
13148
|
+
import { useCallback as useCallback14, useId as useId8, useRef as useRef15, useState as useState22 } from "react";
|
|
13149
|
+
import clsx34 from "clsx";
|
|
13150
|
+
import { Fragment as Fragment8, jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
13058
13151
|
function isSubItem(item) {
|
|
13059
13152
|
return "items" in item && Array.isArray(item.items);
|
|
13060
13153
|
}
|
|
@@ -13064,10 +13157,10 @@ var NavigationItemWithSubItem = ({
|
|
|
13064
13157
|
horizontalAlignment = "center",
|
|
13065
13158
|
...options
|
|
13066
13159
|
}) => {
|
|
13067
|
-
const [isOpen, setOpen] =
|
|
13068
|
-
const containerRef =
|
|
13069
|
-
const triggerRef =
|
|
13070
|
-
const id =
|
|
13160
|
+
const [isOpen, setOpen] = useState22(false);
|
|
13161
|
+
const containerRef = useRef15();
|
|
13162
|
+
const triggerRef = useRef15(null);
|
|
13163
|
+
const id = useId8();
|
|
13071
13164
|
const style = useFloatingElement({
|
|
13072
13165
|
active: isOpen,
|
|
13073
13166
|
containerRef,
|
|
@@ -13081,8 +13174,8 @@ var NavigationItemWithSubItem = ({
|
|
|
13081
13174
|
setOpen(false);
|
|
13082
13175
|
}
|
|
13083
13176
|
}, []);
|
|
13084
|
-
return /* @__PURE__ */
|
|
13085
|
-
/* @__PURE__ */
|
|
13177
|
+
return /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
13178
|
+
/* @__PURE__ */ jsxs29(
|
|
13086
13179
|
"button",
|
|
13087
13180
|
{
|
|
13088
13181
|
id: "navigation-" + id,
|
|
@@ -13097,11 +13190,11 @@ var NavigationItemWithSubItem = ({
|
|
|
13097
13190
|
"aria-controls": "navigation-items-" + id,
|
|
13098
13191
|
children: [
|
|
13099
13192
|
label,
|
|
13100
|
-
/* @__PURE__ */
|
|
13193
|
+
/* @__PURE__ */ jsx50(ExpansionIcon, { isExpanded: isOpen })
|
|
13101
13194
|
]
|
|
13102
13195
|
}
|
|
13103
13196
|
),
|
|
13104
|
-
/* @__PURE__ */
|
|
13197
|
+
/* @__PURE__ */ jsx50(
|
|
13105
13198
|
"ul",
|
|
13106
13199
|
{
|
|
13107
13200
|
id: "navigation-items-" + id,
|
|
@@ -13115,12 +13208,12 @@ var NavigationItemWithSubItem = ({
|
|
|
13115
13208
|
},
|
|
13116
13209
|
onBlur,
|
|
13117
13210
|
hidden: !isOpen,
|
|
13118
|
-
className:
|
|
13211
|
+
className: clsx34(
|
|
13119
13212
|
"fixed flex-col-4 p-4 bg-surface text-on-surface shadow-side shadow-hw-bottom rounded-md z-2001",
|
|
13120
13213
|
{ "opacity-0": !style }
|
|
13121
13214
|
),
|
|
13122
13215
|
style,
|
|
13123
|
-
children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */
|
|
13216
|
+
children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */ jsx50("li", { children: /* @__PURE__ */ jsx50(
|
|
13124
13217
|
import_link2.default,
|
|
13125
13218
|
{
|
|
13126
13219
|
href: link,
|
|
@@ -13134,24 +13227,24 @@ var NavigationItemWithSubItem = ({
|
|
|
13134
13227
|
] });
|
|
13135
13228
|
};
|
|
13136
13229
|
var NavigationItemList = ({ items, ...restProps }) => {
|
|
13137
|
-
return /* @__PURE__ */
|
|
13230
|
+
return /* @__PURE__ */ jsx50("ul", { ...restProps, className: clsx34("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ jsx50("li", { children: isSubItem(item) ? /* @__PURE__ */ jsx50(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ jsx50(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
|
|
13138
13231
|
};
|
|
13139
13232
|
var Navigation = ({ ...props }) => {
|
|
13140
|
-
const [isMobileOpen, setIsMobileOpen] =
|
|
13141
|
-
const id =
|
|
13142
|
-
const menuRef =
|
|
13143
|
-
|
|
13233
|
+
const [isMobileOpen, setIsMobileOpen] = useState22(false);
|
|
13234
|
+
const id = useId8();
|
|
13235
|
+
const menuRef = useRef15(null);
|
|
13236
|
+
useEffect23(() => {
|
|
13144
13237
|
menuRef.current?.focus();
|
|
13145
13238
|
}, [isMobileOpen]);
|
|
13146
|
-
return /* @__PURE__ */
|
|
13147
|
-
/* @__PURE__ */
|
|
13239
|
+
return /* @__PURE__ */ jsxs29("nav", { children: [
|
|
13240
|
+
/* @__PURE__ */ jsx50(
|
|
13148
13241
|
NavigationItemList,
|
|
13149
13242
|
{
|
|
13150
13243
|
...props,
|
|
13151
|
-
className:
|
|
13244
|
+
className: clsx34("hidden", { "desktop:flex": !isMobileOpen }, props.className)
|
|
13152
13245
|
}
|
|
13153
13246
|
),
|
|
13154
|
-
/* @__PURE__ */
|
|
13247
|
+
/* @__PURE__ */ jsx50(
|
|
13155
13248
|
IconButton,
|
|
13156
13249
|
{
|
|
13157
13250
|
color: "transparent",
|
|
@@ -13160,10 +13253,10 @@ var Navigation = ({ ...props }) => {
|
|
|
13160
13253
|
"aria-haspopup": "true",
|
|
13161
13254
|
"aria-expanded": isMobileOpen,
|
|
13162
13255
|
"aria-controls": "navigation-menu-" + id,
|
|
13163
|
-
children: /* @__PURE__ */
|
|
13256
|
+
children: /* @__PURE__ */ jsx50(MenuIcon, { className: "w-6 h-6" })
|
|
13164
13257
|
}
|
|
13165
13258
|
),
|
|
13166
|
-
/* @__PURE__ */
|
|
13259
|
+
/* @__PURE__ */ jsxs29(
|
|
13167
13260
|
"div",
|
|
13168
13261
|
{
|
|
13169
13262
|
id: "navigation-menu-" + id,
|
|
@@ -13176,7 +13269,7 @@ var Navigation = ({ ...props }) => {
|
|
|
13176
13269
|
event.stopPropagation();
|
|
13177
13270
|
}
|
|
13178
13271
|
},
|
|
13179
|
-
className:
|
|
13272
|
+
className: clsx34(
|
|
13180
13273
|
"flex-col-8 items-center justify-center fixed inset-0 p-8 w-screen h-screen z-2000 bg-surface text-on-surface",
|
|
13181
13274
|
{
|
|
13182
13275
|
"desktop:hidden": isMobileOpen
|
|
@@ -13184,8 +13277,8 @@ var Navigation = ({ ...props }) => {
|
|
|
13184
13277
|
props.className
|
|
13185
13278
|
),
|
|
13186
13279
|
children: [
|
|
13187
|
-
/* @__PURE__ */
|
|
13188
|
-
/* @__PURE__ */
|
|
13280
|
+
/* @__PURE__ */ jsx50(IconButton, { color: "transparent", onClick: () => setIsMobileOpen(false), children: /* @__PURE__ */ jsx50(XIcon2, {}) }),
|
|
13281
|
+
/* @__PURE__ */ jsx50(NavigationItemList, { ...props, className: clsx34("flex-col-8", props.className) })
|
|
13189
13282
|
]
|
|
13190
13283
|
}
|
|
13191
13284
|
)
|
|
@@ -13194,9 +13287,9 @@ var Navigation = ({ ...props }) => {
|
|
|
13194
13287
|
|
|
13195
13288
|
// src/components/navigation/Pagination.tsx
|
|
13196
13289
|
import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
13197
|
-
import
|
|
13198
|
-
import { useEffect as
|
|
13199
|
-
import { jsx as
|
|
13290
|
+
import clsx35 from "clsx";
|
|
13291
|
+
import { useEffect as useEffect24, useState as useState23 } from "react";
|
|
13292
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
13200
13293
|
var Pagination = ({
|
|
13201
13294
|
pageIndex,
|
|
13202
13295
|
pageCount,
|
|
@@ -13205,11 +13298,11 @@ var Pagination = ({
|
|
|
13205
13298
|
style
|
|
13206
13299
|
}) => {
|
|
13207
13300
|
const translation = useHightideTranslation();
|
|
13208
|
-
const [value, setValue] =
|
|
13301
|
+
const [value, setValue] = useState23((pageIndex + 1).toString());
|
|
13209
13302
|
const noPages = pageCount === 0;
|
|
13210
13303
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
13211
13304
|
const onLastPage = pageIndex === pageCount - 1;
|
|
13212
|
-
|
|
13305
|
+
useEffect24(() => {
|
|
13213
13306
|
if (noPages) {
|
|
13214
13307
|
setValue("0");
|
|
13215
13308
|
} else {
|
|
@@ -13219,15 +13312,15 @@ var Pagination = ({
|
|
|
13219
13312
|
const changePage = (page) => {
|
|
13220
13313
|
onPageChanged(page);
|
|
13221
13314
|
};
|
|
13222
|
-
return /* @__PURE__ */
|
|
13223
|
-
/* @__PURE__ */
|
|
13224
|
-
/* @__PURE__ */
|
|
13225
|
-
/* @__PURE__ */
|
|
13226
|
-
/* @__PURE__ */
|
|
13315
|
+
return /* @__PURE__ */ jsxs30("div", { className: clsx35("flex-row-1", className), style, children: [
|
|
13316
|
+
/* @__PURE__ */ jsx51(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx51(ChevronFirst, {}) }),
|
|
13317
|
+
/* @__PURE__ */ jsx51(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ jsx51(ChevronLeft2, {}) }),
|
|
13318
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
|
|
13319
|
+
/* @__PURE__ */ jsx51(
|
|
13227
13320
|
Input,
|
|
13228
13321
|
{
|
|
13229
13322
|
value,
|
|
13230
|
-
className:
|
|
13323
|
+
className: clsx35(
|
|
13231
13324
|
"w-full text-center font-bold input-indicator-hidden h-10"
|
|
13232
13325
|
),
|
|
13233
13326
|
type: "number",
|
|
@@ -13247,8 +13340,8 @@ var Pagination = ({
|
|
|
13247
13340
|
editCompleteOptions: { delay: 800 }
|
|
13248
13341
|
}
|
|
13249
13342
|
),
|
|
13250
|
-
/* @__PURE__ */
|
|
13251
|
-
/* @__PURE__ */
|
|
13343
|
+
/* @__PURE__ */ jsx51("span", { className: "select-none w-10", children: translation("of") }),
|
|
13344
|
+
/* @__PURE__ */ jsx51(
|
|
13252
13345
|
"span",
|
|
13253
13346
|
{
|
|
13254
13347
|
className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-input-background text-input-text rounded-md font-bold",
|
|
@@ -13256,15 +13349,15 @@ var Pagination = ({
|
|
|
13256
13349
|
}
|
|
13257
13350
|
)
|
|
13258
13351
|
] }),
|
|
13259
|
-
/* @__PURE__ */
|
|
13260
|
-
/* @__PURE__ */
|
|
13352
|
+
/* @__PURE__ */ jsx51(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx51(ChevronRight2, {}) }),
|
|
13353
|
+
/* @__PURE__ */ jsx51(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ jsx51(ChevronLast, {}) })
|
|
13261
13354
|
] });
|
|
13262
13355
|
};
|
|
13263
13356
|
|
|
13264
13357
|
// src/components/navigation/StepperBar.tsx
|
|
13265
13358
|
import { Check, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
13266
|
-
import
|
|
13267
|
-
import { jsx as
|
|
13359
|
+
import clsx36 from "clsx";
|
|
13360
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
13268
13361
|
var defaultState = {
|
|
13269
13362
|
currentStep: 0,
|
|
13270
13363
|
seenSteps: /* @__PURE__ */ new Set([0])
|
|
@@ -13286,12 +13379,12 @@ var StepperBar = ({
|
|
|
13286
13379
|
seenSteps.add(newStep);
|
|
13287
13380
|
onChange({ currentStep: newStep, seenSteps });
|
|
13288
13381
|
};
|
|
13289
|
-
return /* @__PURE__ */
|
|
13382
|
+
return /* @__PURE__ */ jsxs31(
|
|
13290
13383
|
"div",
|
|
13291
13384
|
{
|
|
13292
|
-
className:
|
|
13385
|
+
className: clsx36("flex-row-2 justify-between", className),
|
|
13293
13386
|
children: [
|
|
13294
|
-
/* @__PURE__ */
|
|
13387
|
+
/* @__PURE__ */ jsx52("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ jsxs31(
|
|
13295
13388
|
SolidButton,
|
|
13296
13389
|
{
|
|
13297
13390
|
disabled: currentStep === 0 || disabledSteps.has(currentStep),
|
|
@@ -13300,18 +13393,18 @@ var StepperBar = ({
|
|
|
13300
13393
|
},
|
|
13301
13394
|
className: "flex-row-1 items-center justify-center",
|
|
13302
13395
|
children: [
|
|
13303
|
-
/* @__PURE__ */
|
|
13396
|
+
/* @__PURE__ */ jsx52(ChevronLeft3, { size: 14 }),
|
|
13304
13397
|
translation("back")
|
|
13305
13398
|
]
|
|
13306
13399
|
}
|
|
13307
13400
|
) }),
|
|
13308
|
-
/* @__PURE__ */
|
|
13401
|
+
/* @__PURE__ */ jsx52("div", { className: "flex-row-2 flex-[5] justify-center items-center", children: showDots && dots.map((value, index) => {
|
|
13309
13402
|
const seen = seenSteps.has(index);
|
|
13310
|
-
return /* @__PURE__ */
|
|
13403
|
+
return /* @__PURE__ */ jsx52(
|
|
13311
13404
|
"div",
|
|
13312
13405
|
{
|
|
13313
13406
|
onClick: () => seen && update(index),
|
|
13314
|
-
className:
|
|
13407
|
+
className: clsx36(
|
|
13315
13408
|
"rounded-full w-4 h-4",
|
|
13316
13409
|
{
|
|
13317
13410
|
"bg-stepperbar-dot-active hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
|
|
@@ -13327,7 +13420,7 @@ var StepperBar = ({
|
|
|
13327
13420
|
index
|
|
13328
13421
|
);
|
|
13329
13422
|
}) }),
|
|
13330
|
-
currentStep !== numberOfSteps && /* @__PURE__ */
|
|
13423
|
+
currentStep !== numberOfSteps && /* @__PURE__ */ jsx52("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs31(
|
|
13331
13424
|
SolidButton,
|
|
13332
13425
|
{
|
|
13333
13426
|
onClick: () => update(currentStep + 1),
|
|
@@ -13335,18 +13428,18 @@ var StepperBar = ({
|
|
|
13335
13428
|
disabled: disabledSteps.has(currentStep),
|
|
13336
13429
|
children: [
|
|
13337
13430
|
translation("next"),
|
|
13338
|
-
/* @__PURE__ */
|
|
13431
|
+
/* @__PURE__ */ jsx52(ChevronRight3, { size: 14 })
|
|
13339
13432
|
]
|
|
13340
13433
|
}
|
|
13341
13434
|
) }),
|
|
13342
|
-
currentStep === numberOfSteps && /* @__PURE__ */
|
|
13435
|
+
currentStep === numberOfSteps && /* @__PURE__ */ jsx52("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs31(
|
|
13343
13436
|
SolidButton,
|
|
13344
13437
|
{
|
|
13345
13438
|
disabled: disabledSteps.has(currentStep),
|
|
13346
13439
|
onClick: onFinish,
|
|
13347
13440
|
className: "flex-row-1 items-center justify-center",
|
|
13348
13441
|
children: [
|
|
13349
|
-
/* @__PURE__ */
|
|
13442
|
+
/* @__PURE__ */ jsx52(Check, { size: 14 }),
|
|
13350
13443
|
finishText ?? translation("confirm")
|
|
13351
13444
|
]
|
|
13352
13445
|
}
|
|
@@ -13357,7 +13450,7 @@ var StepperBar = ({
|
|
|
13357
13450
|
};
|
|
13358
13451
|
var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
|
|
13359
13452
|
const [usedState, setUsedState] = useOverwritableState(state, onChange);
|
|
13360
|
-
return /* @__PURE__ */
|
|
13453
|
+
return /* @__PURE__ */ jsx52(
|
|
13361
13454
|
StepperBar,
|
|
13362
13455
|
{
|
|
13363
13456
|
...props,
|
|
@@ -13372,7 +13465,7 @@ import { Check as Check3 } from "lucide-react";
|
|
|
13372
13465
|
|
|
13373
13466
|
// src/components/user-action/Checkbox.tsx
|
|
13374
13467
|
import { Check as Check2, Minus } from "lucide-react";
|
|
13375
|
-
import
|
|
13468
|
+
import clsx37 from "clsx";
|
|
13376
13469
|
|
|
13377
13470
|
// node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
|
13378
13471
|
import * as React19 from "react";
|
|
@@ -13497,7 +13590,7 @@ function useSize(element) {
|
|
|
13497
13590
|
}
|
|
13498
13591
|
|
|
13499
13592
|
// node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
|
13500
|
-
import { Fragment as Fragment9, jsx as
|
|
13593
|
+
import { Fragment as Fragment9, jsx as jsx53, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
13501
13594
|
var CHECKBOX_NAME = "Checkbox";
|
|
13502
13595
|
var [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);
|
|
13503
13596
|
var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
@@ -13545,7 +13638,7 @@ function CheckboxProvider(props) {
|
|
|
13545
13638
|
bubbleInput,
|
|
13546
13639
|
setBubbleInput
|
|
13547
13640
|
};
|
|
13548
|
-
return /* @__PURE__ */
|
|
13641
|
+
return /* @__PURE__ */ jsx53(
|
|
13549
13642
|
CheckboxProviderImpl,
|
|
13550
13643
|
{
|
|
13551
13644
|
scope: __scopeCheckbox,
|
|
@@ -13579,7 +13672,7 @@ var CheckboxTrigger = React19.forwardRef(
|
|
|
13579
13672
|
return () => form.removeEventListener("reset", reset);
|
|
13580
13673
|
}
|
|
13581
13674
|
}, [control, setChecked]);
|
|
13582
|
-
return /* @__PURE__ */
|
|
13675
|
+
return /* @__PURE__ */ jsx53(
|
|
13583
13676
|
Primitive.button,
|
|
13584
13677
|
{
|
|
13585
13678
|
type: "button",
|
|
@@ -13621,7 +13714,7 @@ var Checkbox = React19.forwardRef(
|
|
|
13621
13714
|
form,
|
|
13622
13715
|
...checkboxProps
|
|
13623
13716
|
} = props;
|
|
13624
|
-
return /* @__PURE__ */
|
|
13717
|
+
return /* @__PURE__ */ jsx53(
|
|
13625
13718
|
CheckboxProvider,
|
|
13626
13719
|
{
|
|
13627
13720
|
__scopeCheckbox,
|
|
@@ -13633,8 +13726,8 @@ var Checkbox = React19.forwardRef(
|
|
|
13633
13726
|
name,
|
|
13634
13727
|
form,
|
|
13635
13728
|
value,
|
|
13636
|
-
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */
|
|
13637
|
-
/* @__PURE__ */
|
|
13729
|
+
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
13730
|
+
/* @__PURE__ */ jsx53(
|
|
13638
13731
|
CheckboxTrigger,
|
|
13639
13732
|
{
|
|
13640
13733
|
...checkboxProps,
|
|
@@ -13642,7 +13735,7 @@ var Checkbox = React19.forwardRef(
|
|
|
13642
13735
|
__scopeCheckbox
|
|
13643
13736
|
}
|
|
13644
13737
|
),
|
|
13645
|
-
isFormControl && /* @__PURE__ */
|
|
13738
|
+
isFormControl && /* @__PURE__ */ jsx53(
|
|
13646
13739
|
CheckboxBubbleInput,
|
|
13647
13740
|
{
|
|
13648
13741
|
__scopeCheckbox
|
|
@@ -13659,11 +13752,11 @@ var CheckboxIndicator = React19.forwardRef(
|
|
|
13659
13752
|
(props, forwardedRef) => {
|
|
13660
13753
|
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
13661
13754
|
const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
|
|
13662
|
-
return /* @__PURE__ */
|
|
13755
|
+
return /* @__PURE__ */ jsx53(
|
|
13663
13756
|
Presence,
|
|
13664
13757
|
{
|
|
13665
13758
|
present: forceMount || isIndeterminate(context.checked) || context.checked === true,
|
|
13666
|
-
children: /* @__PURE__ */
|
|
13759
|
+
children: /* @__PURE__ */ jsx53(
|
|
13667
13760
|
Primitive.span,
|
|
13668
13761
|
{
|
|
13669
13762
|
"data-state": getState(context.checked),
|
|
@@ -13715,7 +13808,7 @@ var CheckboxBubbleInput = React19.forwardRef(
|
|
|
13715
13808
|
}
|
|
13716
13809
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
13717
13810
|
const defaultCheckedRef = React19.useRef(isIndeterminate(checked) ? false : checked);
|
|
13718
|
-
return /* @__PURE__ */
|
|
13811
|
+
return /* @__PURE__ */ jsx53(
|
|
13719
13812
|
Primitive.input,
|
|
13720
13813
|
{
|
|
13721
13814
|
type: "checkbox",
|
|
@@ -13757,7 +13850,7 @@ function getState(checked) {
|
|
|
13757
13850
|
}
|
|
13758
13851
|
|
|
13759
13852
|
// src/components/user-action/Checkbox.tsx
|
|
13760
|
-
import { jsx as
|
|
13853
|
+
import { jsx as jsx54, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
13761
13854
|
var checkboxSizeMapping = {
|
|
13762
13855
|
sm: "size-5 border-1",
|
|
13763
13856
|
md: "size-6 border-1",
|
|
@@ -13779,14 +13872,14 @@ var Checkbox2 = ({
|
|
|
13779
13872
|
}) => {
|
|
13780
13873
|
const usedSizeClass = checkboxSizeMapping[size];
|
|
13781
13874
|
const innerIconSize = checkboxIconSizeMapping[size];
|
|
13782
|
-
return /* @__PURE__ */
|
|
13875
|
+
return /* @__PURE__ */ jsx54(
|
|
13783
13876
|
Checkbox,
|
|
13784
13877
|
{
|
|
13785
13878
|
...props,
|
|
13786
13879
|
disabled,
|
|
13787
13880
|
checked: indeterminate ? "indeterminate" : checked,
|
|
13788
13881
|
onCheckedChange: onChange,
|
|
13789
|
-
className:
|
|
13882
|
+
className: clsx37(
|
|
13790
13883
|
usedSizeClass,
|
|
13791
13884
|
`flex-col-0 items-center justify-center rounded`,
|
|
13792
13885
|
{
|
|
@@ -13797,10 +13890,10 @@ var Checkbox2 = ({
|
|
|
13797
13890
|
},
|
|
13798
13891
|
className
|
|
13799
13892
|
),
|
|
13800
|
-
children: /* @__PURE__ */
|
|
13801
|
-
!checked && !indeterminate && /* @__PURE__ */
|
|
13802
|
-
checked && !indeterminate && /* @__PURE__ */
|
|
13803
|
-
indeterminate && /* @__PURE__ */
|
|
13893
|
+
children: /* @__PURE__ */ jsxs33(CheckboxIndicator, { children: [
|
|
13894
|
+
!checked && !indeterminate && /* @__PURE__ */ jsx54("div", { className: clsx37("bg-input-background", innerIconSize) }),
|
|
13895
|
+
checked && !indeterminate && /* @__PURE__ */ jsx54(Check2, { className: innerIconSize }),
|
|
13896
|
+
indeterminate && /* @__PURE__ */ jsx54(Minus, { className: innerIconSize })
|
|
13804
13897
|
] })
|
|
13805
13898
|
}
|
|
13806
13899
|
);
|
|
@@ -13811,7 +13904,7 @@ var CheckboxUncontrolled = ({
|
|
|
13811
13904
|
...props
|
|
13812
13905
|
}) => {
|
|
13813
13906
|
const [checked, setChecked] = useOverwritableState(initialChecked, onChange);
|
|
13814
|
-
return /* @__PURE__ */
|
|
13907
|
+
return /* @__PURE__ */ jsx54(
|
|
13815
13908
|
Checkbox2,
|
|
13816
13909
|
{
|
|
13817
13910
|
...props,
|
|
@@ -13823,8 +13916,8 @@ var CheckboxUncontrolled = ({
|
|
|
13823
13916
|
|
|
13824
13917
|
// src/components/properties/PropertyBase.tsx
|
|
13825
13918
|
import { AlertTriangle } from "lucide-react";
|
|
13826
|
-
import
|
|
13827
|
-
import { jsx as
|
|
13919
|
+
import clsx38 from "clsx";
|
|
13920
|
+
import { jsx as jsx55, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
13828
13921
|
var PropertyBase = ({
|
|
13829
13922
|
name,
|
|
13830
13923
|
input,
|
|
@@ -13837,11 +13930,11 @@ var PropertyBase = ({
|
|
|
13837
13930
|
}) => {
|
|
13838
13931
|
const translation = useHightideTranslation();
|
|
13839
13932
|
const requiredAndNoValue = softRequired && !hasValue;
|
|
13840
|
-
return /* @__PURE__ */
|
|
13841
|
-
/* @__PURE__ */
|
|
13933
|
+
return /* @__PURE__ */ jsxs34("div", { className: clsx38("flex-row-0 group", className), children: [
|
|
13934
|
+
/* @__PURE__ */ jsxs34(
|
|
13842
13935
|
"div",
|
|
13843
13936
|
{
|
|
13844
|
-
className:
|
|
13937
|
+
className: clsx38(
|
|
13845
13938
|
"flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
|
|
13846
13939
|
{
|
|
13847
13940
|
"bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
|
|
@@ -13850,15 +13943,15 @@ var PropertyBase = ({
|
|
|
13850
13943
|
className
|
|
13851
13944
|
),
|
|
13852
13945
|
children: [
|
|
13853
|
-
/* @__PURE__ */
|
|
13854
|
-
/* @__PURE__ */
|
|
13946
|
+
/* @__PURE__ */ jsx55("div", { className: "max-w-6 min-w-6 text-text-primary", children: icon }),
|
|
13947
|
+
/* @__PURE__ */ jsx55("span", { className: "font-semibold", children: name })
|
|
13855
13948
|
]
|
|
13856
13949
|
}
|
|
13857
13950
|
),
|
|
13858
|
-
/* @__PURE__ */
|
|
13951
|
+
/* @__PURE__ */ jsxs34(
|
|
13859
13952
|
"div",
|
|
13860
13953
|
{
|
|
13861
|
-
className:
|
|
13954
|
+
className: clsx38(
|
|
13862
13955
|
"flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
|
|
13863
13956
|
{
|
|
13864
13957
|
"bg-input-background text-input-text group-hover:border-primary": !requiredAndNoValue,
|
|
@@ -13868,13 +13961,13 @@ var PropertyBase = ({
|
|
|
13868
13961
|
),
|
|
13869
13962
|
children: [
|
|
13870
13963
|
input({ softRequired, hasValue }),
|
|
13871
|
-
requiredAndNoValue && /* @__PURE__ */
|
|
13872
|
-
onRemove && !readOnly && /* @__PURE__ */
|
|
13964
|
+
requiredAndNoValue && /* @__PURE__ */ jsx55("div", { className: "text-warning", children: /* @__PURE__ */ jsx55(AlertTriangle, { size: 24 }) }),
|
|
13965
|
+
onRemove && !readOnly && /* @__PURE__ */ jsx55(
|
|
13873
13966
|
TextButton,
|
|
13874
13967
|
{
|
|
13875
13968
|
onClick: onRemove,
|
|
13876
13969
|
color: "negative",
|
|
13877
|
-
className:
|
|
13970
|
+
className: clsx38("items-center"),
|
|
13878
13971
|
disabled: !hasValue,
|
|
13879
13972
|
children: translation("remove")
|
|
13880
13973
|
}
|
|
@@ -13886,8 +13979,8 @@ var PropertyBase = ({
|
|
|
13886
13979
|
};
|
|
13887
13980
|
|
|
13888
13981
|
// src/components/properties/CheckboxProperty.tsx
|
|
13889
|
-
import { useId as
|
|
13890
|
-
import { jsx as
|
|
13982
|
+
import { useId as useId9 } from "react";
|
|
13983
|
+
import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
13891
13984
|
var CheckboxProperty = ({
|
|
13892
13985
|
value,
|
|
13893
13986
|
onChange,
|
|
@@ -13895,16 +13988,16 @@ var CheckboxProperty = ({
|
|
|
13895
13988
|
...baseProps
|
|
13896
13989
|
}) => {
|
|
13897
13990
|
const translation = useHightideTranslation();
|
|
13898
|
-
const id =
|
|
13899
|
-
return /* @__PURE__ */
|
|
13991
|
+
const id = useId9();
|
|
13992
|
+
return /* @__PURE__ */ jsx56(
|
|
13900
13993
|
PropertyBase,
|
|
13901
13994
|
{
|
|
13902
13995
|
...baseProps,
|
|
13903
13996
|
hasValue: true,
|
|
13904
13997
|
readOnly,
|
|
13905
|
-
icon: /* @__PURE__ */
|
|
13906
|
-
input: () => /* @__PURE__ */
|
|
13907
|
-
/* @__PURE__ */
|
|
13998
|
+
icon: /* @__PURE__ */ jsx56(Check3, { size: 24 }),
|
|
13999
|
+
input: () => /* @__PURE__ */ jsxs35("div", { className: "flex-row-2 items-center", children: [
|
|
14000
|
+
/* @__PURE__ */ jsx56(
|
|
13908
14001
|
Checkbox2,
|
|
13909
14002
|
{
|
|
13910
14003
|
id,
|
|
@@ -13914,7 +14007,7 @@ var CheckboxProperty = ({
|
|
|
13914
14007
|
"aria-labelledby": id + "label"
|
|
13915
14008
|
}
|
|
13916
14009
|
),
|
|
13917
|
-
/* @__PURE__ */
|
|
14010
|
+
/* @__PURE__ */ jsx56(Label, { id: id + "label", children: `${translation("yes")}/${translation("no")}` })
|
|
13918
14011
|
] })
|
|
13919
14012
|
}
|
|
13920
14013
|
);
|
|
@@ -13922,8 +14015,8 @@ var CheckboxProperty = ({
|
|
|
13922
14015
|
|
|
13923
14016
|
// src/components/properties/DateProperty.tsx
|
|
13924
14017
|
import { CalendarDays } from "lucide-react";
|
|
13925
|
-
import
|
|
13926
|
-
import { jsx as
|
|
14018
|
+
import clsx39 from "clsx";
|
|
14019
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
13927
14020
|
var DateProperty = ({
|
|
13928
14021
|
value,
|
|
13929
14022
|
onChange,
|
|
@@ -13934,16 +14027,16 @@ var DateProperty = ({
|
|
|
13934
14027
|
}) => {
|
|
13935
14028
|
const hasValue = !!value;
|
|
13936
14029
|
const dateText = value ? type === "dateTime" ? formatDateTime(value) : formatDate(value) : "";
|
|
13937
|
-
return /* @__PURE__ */
|
|
14030
|
+
return /* @__PURE__ */ jsx57(
|
|
13938
14031
|
PropertyBase,
|
|
13939
14032
|
{
|
|
13940
14033
|
...baseProps,
|
|
13941
14034
|
hasValue,
|
|
13942
|
-
icon: /* @__PURE__ */
|
|
13943
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
14035
|
+
icon: /* @__PURE__ */ jsx57(CalendarDays, { size: 24 }),
|
|
14036
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsx57(
|
|
13944
14037
|
Input,
|
|
13945
14038
|
{
|
|
13946
|
-
className:
|
|
14039
|
+
className: clsx39("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
|
|
13947
14040
|
value: dateText,
|
|
13948
14041
|
type: type === "dateTime" ? "datetime-local" : "date",
|
|
13949
14042
|
readOnly,
|
|
@@ -13965,8 +14058,8 @@ var DateProperty = ({
|
|
|
13965
14058
|
|
|
13966
14059
|
// src/components/properties/MultiSelectProperty.tsx
|
|
13967
14060
|
import { List } from "lucide-react";
|
|
13968
|
-
import
|
|
13969
|
-
import { jsx as
|
|
14061
|
+
import clsx40 from "clsx";
|
|
14062
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
13970
14063
|
var MultiSelectProperty = ({
|
|
13971
14064
|
children,
|
|
13972
14065
|
values,
|
|
@@ -13974,25 +14067,25 @@ var MultiSelectProperty = ({
|
|
|
13974
14067
|
...props
|
|
13975
14068
|
}) => {
|
|
13976
14069
|
const hasValue = values.length > 0;
|
|
13977
|
-
return /* @__PURE__ */
|
|
14070
|
+
return /* @__PURE__ */ jsx58(
|
|
13978
14071
|
PropertyBase,
|
|
13979
14072
|
{
|
|
13980
14073
|
...props,
|
|
13981
14074
|
hasValue,
|
|
13982
|
-
icon: /* @__PURE__ */
|
|
13983
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
14075
|
+
icon: /* @__PURE__ */ jsx58(List, { size: 24 }),
|
|
14076
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsx58(
|
|
13984
14077
|
MultiSelectChipDisplay,
|
|
13985
14078
|
{
|
|
13986
14079
|
values,
|
|
13987
14080
|
onValuesChanged,
|
|
13988
14081
|
disabled: props.readOnly,
|
|
13989
14082
|
contentPanelProps: {
|
|
13990
|
-
className:
|
|
14083
|
+
className: clsx40(
|
|
13991
14084
|
"!border-none !min-h-10"
|
|
13992
14085
|
)
|
|
13993
14086
|
},
|
|
13994
14087
|
chipDisplayProps: {
|
|
13995
|
-
className:
|
|
14088
|
+
className: clsx40({
|
|
13996
14089
|
"!bg-warning !text-surface-warning": softRequired && !hasValue
|
|
13997
14090
|
})
|
|
13998
14091
|
},
|
|
@@ -14005,8 +14098,8 @@ var MultiSelectProperty = ({
|
|
|
14005
14098
|
|
|
14006
14099
|
// src/components/properties/NumberProperty.tsx
|
|
14007
14100
|
import { Binary } from "lucide-react";
|
|
14008
|
-
import
|
|
14009
|
-
import { jsx as
|
|
14101
|
+
import clsx41 from "clsx";
|
|
14102
|
+
import { jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
14010
14103
|
var NumberProperty = ({
|
|
14011
14104
|
value,
|
|
14012
14105
|
onChange,
|
|
@@ -14018,22 +14111,22 @@ var NumberProperty = ({
|
|
|
14018
14111
|
}) => {
|
|
14019
14112
|
const translation = useHightideTranslation();
|
|
14020
14113
|
const hasValue = value !== void 0;
|
|
14021
|
-
return /* @__PURE__ */
|
|
14114
|
+
return /* @__PURE__ */ jsx59(
|
|
14022
14115
|
PropertyBase,
|
|
14023
14116
|
{
|
|
14024
14117
|
...baseProps,
|
|
14025
14118
|
onRemove,
|
|
14026
14119
|
hasValue,
|
|
14027
|
-
icon: /* @__PURE__ */
|
|
14028
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
14120
|
+
icon: /* @__PURE__ */ jsx59(Binary, { size: 24 }),
|
|
14121
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsxs36(
|
|
14029
14122
|
"div",
|
|
14030
14123
|
{
|
|
14031
|
-
className:
|
|
14124
|
+
className: clsx41("flex-row-2 grow", { "text-warning": softRequired && !hasValue }),
|
|
14032
14125
|
children: [
|
|
14033
|
-
/* @__PURE__ */
|
|
14126
|
+
/* @__PURE__ */ jsx59(
|
|
14034
14127
|
Input,
|
|
14035
14128
|
{
|
|
14036
|
-
className:
|
|
14129
|
+
className: clsx41("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
|
|
14037
14130
|
value: value?.toString() ?? "",
|
|
14038
14131
|
type: "number",
|
|
14039
14132
|
readOnly,
|
|
@@ -14056,7 +14149,7 @@ var NumberProperty = ({
|
|
|
14056
14149
|
}
|
|
14057
14150
|
}
|
|
14058
14151
|
),
|
|
14059
|
-
suffix && /* @__PURE__ */
|
|
14152
|
+
suffix && /* @__PURE__ */ jsx59("span", { className: clsx41("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
|
|
14060
14153
|
]
|
|
14061
14154
|
}
|
|
14062
14155
|
)
|
|
@@ -14066,8 +14159,8 @@ var NumberProperty = ({
|
|
|
14066
14159
|
|
|
14067
14160
|
// src/components/properties/SelectProperty.tsx
|
|
14068
14161
|
import { List as List2 } from "lucide-react";
|
|
14069
|
-
import
|
|
14070
|
-
import { jsx as
|
|
14162
|
+
import clsx42 from "clsx";
|
|
14163
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
14071
14164
|
var SingleSelectProperty = ({
|
|
14072
14165
|
children,
|
|
14073
14166
|
value,
|
|
@@ -14076,20 +14169,20 @@ var SingleSelectProperty = ({
|
|
|
14076
14169
|
...props
|
|
14077
14170
|
}) => {
|
|
14078
14171
|
const hasValue = value !== void 0;
|
|
14079
|
-
return /* @__PURE__ */
|
|
14172
|
+
return /* @__PURE__ */ jsx60(
|
|
14080
14173
|
PropertyBase,
|
|
14081
14174
|
{
|
|
14082
14175
|
...props,
|
|
14083
14176
|
hasValue,
|
|
14084
|
-
icon: /* @__PURE__ */
|
|
14085
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
14177
|
+
icon: /* @__PURE__ */ jsx60(List2, { size: 24 }),
|
|
14178
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsx60(
|
|
14086
14179
|
Select,
|
|
14087
14180
|
{
|
|
14088
14181
|
value,
|
|
14089
14182
|
onValueChanged,
|
|
14090
14183
|
disabled: props.readOnly,
|
|
14091
14184
|
buttonProps: {
|
|
14092
|
-
className:
|
|
14185
|
+
className: clsx42(
|
|
14093
14186
|
"border-none w-full",
|
|
14094
14187
|
{
|
|
14095
14188
|
"!bg-warning !text-surface-warning": softRequired && !hasValue
|
|
@@ -14106,12 +14199,12 @@ var SingleSelectProperty = ({
|
|
|
14106
14199
|
|
|
14107
14200
|
// src/components/properties/TextProperty.tsx
|
|
14108
14201
|
import { Text } from "lucide-react";
|
|
14109
|
-
import
|
|
14202
|
+
import clsx44 from "clsx";
|
|
14110
14203
|
|
|
14111
14204
|
// src/components/user-action/Textarea.tsx
|
|
14112
|
-
import { forwardRef as forwardRef13, useId as
|
|
14113
|
-
import
|
|
14114
|
-
import { jsx as
|
|
14205
|
+
import { forwardRef as forwardRef13, useId as useId10 } from "react";
|
|
14206
|
+
import clsx43 from "clsx";
|
|
14207
|
+
import { jsx as jsx61, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
14115
14208
|
var Textarea = forwardRef13(function Textarea2({
|
|
14116
14209
|
id,
|
|
14117
14210
|
onChange,
|
|
@@ -14130,12 +14223,12 @@ var Textarea = forwardRef13(function Textarea2({
|
|
|
14130
14223
|
onEditCompleted?.(text);
|
|
14131
14224
|
clearTimer();
|
|
14132
14225
|
};
|
|
14133
|
-
return /* @__PURE__ */
|
|
14226
|
+
return /* @__PURE__ */ jsx61(
|
|
14134
14227
|
"textarea",
|
|
14135
14228
|
{
|
|
14136
14229
|
ref,
|
|
14137
14230
|
id,
|
|
14138
|
-
className:
|
|
14231
|
+
className: clsx43(
|
|
14139
14232
|
"resize-none w-full h-32 overflow-y-scroll",
|
|
14140
14233
|
"py-2 px-3 rounded-md border-2 border-transparent focus-style-none",
|
|
14141
14234
|
{
|
|
@@ -14168,7 +14261,7 @@ var TextareaUncontrolled = ({
|
|
|
14168
14261
|
...props
|
|
14169
14262
|
}) => {
|
|
14170
14263
|
const [text, setText] = useOverwritableState(value, onChangeText);
|
|
14171
|
-
return /* @__PURE__ */
|
|
14264
|
+
return /* @__PURE__ */ jsx61(
|
|
14172
14265
|
Textarea,
|
|
14173
14266
|
{
|
|
14174
14267
|
...props,
|
|
@@ -14186,12 +14279,12 @@ var TextareaWithHeadline = ({
|
|
|
14186
14279
|
containerClassName,
|
|
14187
14280
|
...props
|
|
14188
14281
|
}) => {
|
|
14189
|
-
const genId =
|
|
14282
|
+
const genId = useId10();
|
|
14190
14283
|
const usedId = id ?? genId;
|
|
14191
|
-
return /* @__PURE__ */
|
|
14284
|
+
return /* @__PURE__ */ jsxs37(
|
|
14192
14285
|
"div",
|
|
14193
14286
|
{
|
|
14194
|
-
className:
|
|
14287
|
+
className: clsx43(
|
|
14195
14288
|
"group flex-col-3 border-2 rounded-lg",
|
|
14196
14289
|
{
|
|
14197
14290
|
"bg-input-background text-input-text hover:border-primary focus-within:border-primary": !disabled,
|
|
@@ -14200,13 +14293,13 @@ var TextareaWithHeadline = ({
|
|
|
14200
14293
|
containerClassName
|
|
14201
14294
|
),
|
|
14202
14295
|
children: [
|
|
14203
|
-
headline && /* @__PURE__ */
|
|
14204
|
-
/* @__PURE__ */
|
|
14296
|
+
headline && /* @__PURE__ */ jsx61(Label, { size: "md", ...headlineProps, htmlFor: usedId, children: headline }),
|
|
14297
|
+
/* @__PURE__ */ jsx61(
|
|
14205
14298
|
Textarea,
|
|
14206
14299
|
{
|
|
14207
14300
|
...props,
|
|
14208
14301
|
id: usedId,
|
|
14209
|
-
className:
|
|
14302
|
+
className: clsx43(
|
|
14210
14303
|
"border-transparent focus:ring-0 focus-visible:ring-0 resize-none h-32",
|
|
14211
14304
|
className
|
|
14212
14305
|
),
|
|
@@ -14219,7 +14312,7 @@ var TextareaWithHeadline = ({
|
|
|
14219
14312
|
};
|
|
14220
14313
|
|
|
14221
14314
|
// src/components/properties/TextProperty.tsx
|
|
14222
|
-
import { jsx as
|
|
14315
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
14223
14316
|
var TextProperty = ({
|
|
14224
14317
|
value,
|
|
14225
14318
|
readOnly,
|
|
@@ -14230,17 +14323,17 @@ var TextProperty = ({
|
|
|
14230
14323
|
}) => {
|
|
14231
14324
|
const translation = useHightideTranslation();
|
|
14232
14325
|
const hasValue = value !== void 0;
|
|
14233
|
-
return /* @__PURE__ */
|
|
14326
|
+
return /* @__PURE__ */ jsx62(
|
|
14234
14327
|
PropertyBase,
|
|
14235
14328
|
{
|
|
14236
14329
|
...baseProps,
|
|
14237
14330
|
onRemove,
|
|
14238
14331
|
hasValue,
|
|
14239
|
-
icon: /* @__PURE__ */
|
|
14240
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
14332
|
+
icon: /* @__PURE__ */ jsx62(Text, { size: 24 }),
|
|
14333
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsx62(
|
|
14241
14334
|
Textarea,
|
|
14242
14335
|
{
|
|
14243
|
-
className:
|
|
14336
|
+
className: clsx44({
|
|
14244
14337
|
"bg-surface-warning placeholder-warning": softRequired && !hasValue
|
|
14245
14338
|
}),
|
|
14246
14339
|
rows: 5,
|
|
@@ -14269,12 +14362,12 @@ var TextProperty = ({
|
|
|
14269
14362
|
};
|
|
14270
14363
|
|
|
14271
14364
|
// src/components/table/FillerRowElement.tsx
|
|
14272
|
-
import { clsx as
|
|
14273
|
-
import { jsx as
|
|
14365
|
+
import { clsx as clsx45 } from "clsx";
|
|
14366
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
14274
14367
|
var FillerRowElement = ({
|
|
14275
14368
|
className
|
|
14276
14369
|
}) => {
|
|
14277
|
-
return /* @__PURE__ */
|
|
14370
|
+
return /* @__PURE__ */ jsx63("div", { className: clsx45("flex flex-row items-center w-1/2 h-4 text-disabled font-bold", className), children: "-" });
|
|
14278
14371
|
};
|
|
14279
14372
|
|
|
14280
14373
|
// src/components/table/Filter.ts
|
|
@@ -14292,8 +14385,8 @@ var TableFilters = {
|
|
|
14292
14385
|
};
|
|
14293
14386
|
|
|
14294
14387
|
// src/components/table/Table.tsx
|
|
14295
|
-
import { useCallback as useCallback16, useEffect as
|
|
14296
|
-
import
|
|
14388
|
+
import { useCallback as useCallback16, useEffect as useEffect33, useMemo as useMemo10, useRef as useRef21, useState as useState30 } from "react";
|
|
14389
|
+
import clsx49 from "clsx";
|
|
14297
14390
|
import {
|
|
14298
14391
|
flexRender,
|
|
14299
14392
|
getCoreRowModel,
|
|
@@ -14305,19 +14398,19 @@ import {
|
|
|
14305
14398
|
import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
|
|
14306
14399
|
|
|
14307
14400
|
// src/components/table/TableCell.tsx
|
|
14308
|
-
import { clsx as
|
|
14309
|
-
import { jsx as
|
|
14401
|
+
import { clsx as clsx46 } from "clsx";
|
|
14402
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
14310
14403
|
var TableCell = ({
|
|
14311
14404
|
children,
|
|
14312
14405
|
className
|
|
14313
14406
|
}) => {
|
|
14314
|
-
return /* @__PURE__ */
|
|
14407
|
+
return /* @__PURE__ */ jsx64("span", { className: clsx46("block max-w-full overflow-ellipsis truncate", className), children });
|
|
14315
14408
|
};
|
|
14316
14409
|
|
|
14317
14410
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
14318
|
-
import { useEffect as
|
|
14411
|
+
import { useEffect as useEffect28 } from "react";
|
|
14319
14412
|
var useResizeCallbackWrapper = (callback) => {
|
|
14320
|
-
|
|
14413
|
+
useEffect28(() => {
|
|
14321
14414
|
window.addEventListener("resize", callback);
|
|
14322
14415
|
return () => {
|
|
14323
14416
|
window.removeEventListener("resize", callback);
|
|
@@ -14327,8 +14420,8 @@ var useResizeCallbackWrapper = (callback) => {
|
|
|
14327
14420
|
|
|
14328
14421
|
// src/components/table/TableSortButton.tsx
|
|
14329
14422
|
import { ChevronDown as ChevronDown3, ChevronsUpDown, ChevronUp } from "lucide-react";
|
|
14330
|
-
import
|
|
14331
|
-
import { jsx as
|
|
14423
|
+
import clsx47 from "clsx";
|
|
14424
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
14332
14425
|
var TableSortButton = ({
|
|
14333
14426
|
sortDirection,
|
|
14334
14427
|
invert = false,
|
|
@@ -14336,20 +14429,20 @@ var TableSortButton = ({
|
|
|
14336
14429
|
className,
|
|
14337
14430
|
...buttonProps
|
|
14338
14431
|
}) => {
|
|
14339
|
-
let icon = /* @__PURE__ */
|
|
14432
|
+
let icon = /* @__PURE__ */ jsx65(ChevronsUpDown, { className: "w-full h-full" });
|
|
14340
14433
|
if (sortDirection) {
|
|
14341
14434
|
let usedSortDirection = sortDirection;
|
|
14342
14435
|
if (invert) {
|
|
14343
14436
|
usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
|
|
14344
14437
|
}
|
|
14345
|
-
icon = usedSortDirection === "asc" ? /* @__PURE__ */
|
|
14438
|
+
icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx65(ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ jsx65(ChevronDown3, { className: "w-full h-full" });
|
|
14346
14439
|
}
|
|
14347
|
-
return /* @__PURE__ */
|
|
14440
|
+
return /* @__PURE__ */ jsx65(
|
|
14348
14441
|
IconButton,
|
|
14349
14442
|
{
|
|
14350
14443
|
size: "tiny",
|
|
14351
14444
|
color,
|
|
14352
|
-
className:
|
|
14445
|
+
className: clsx47(className),
|
|
14353
14446
|
...buttonProps,
|
|
14354
14447
|
children: icon
|
|
14355
14448
|
}
|
|
@@ -14360,8 +14453,8 @@ var TableSortButton = ({
|
|
|
14360
14453
|
import { FilterIcon } from "lucide-react";
|
|
14361
14454
|
|
|
14362
14455
|
// src/components/user-action/Menu.tsx
|
|
14363
|
-
import { useEffect as
|
|
14364
|
-
import
|
|
14456
|
+
import { useEffect as useEffect31, useRef as useRef20, useState as useState28 } from "react";
|
|
14457
|
+
import clsx48 from "clsx";
|
|
14365
14458
|
|
|
14366
14459
|
// src/utils/bagFunctions.ts
|
|
14367
14460
|
var resolve = (children, bag) => {
|
|
@@ -14432,15 +14525,15 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
14432
14525
|
};
|
|
14433
14526
|
|
|
14434
14527
|
// src/hooks/useHoverState.ts
|
|
14435
|
-
import { useEffect as
|
|
14528
|
+
import { useEffect as useEffect29, useState as useState27 } from "react";
|
|
14436
14529
|
var defaultUseHoverStateProps = {
|
|
14437
14530
|
closingDelay: 200,
|
|
14438
14531
|
isDisabled: false
|
|
14439
14532
|
};
|
|
14440
14533
|
var useHoverState = (props = void 0) => {
|
|
14441
14534
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
14442
|
-
const [isHovered, setIsHovered] =
|
|
14443
|
-
const [timer, setTimer] =
|
|
14535
|
+
const [isHovered, setIsHovered] = useState27(false);
|
|
14536
|
+
const [timer, setTimer] = useState27();
|
|
14444
14537
|
const onMouseEnter = () => {
|
|
14445
14538
|
if (isDisabled) {
|
|
14446
14539
|
return;
|
|
@@ -14456,14 +14549,14 @@ var useHoverState = (props = void 0) => {
|
|
|
14456
14549
|
setIsHovered(false);
|
|
14457
14550
|
}, closingDelay));
|
|
14458
14551
|
};
|
|
14459
|
-
|
|
14552
|
+
useEffect29(() => {
|
|
14460
14553
|
if (timer) {
|
|
14461
14554
|
return () => {
|
|
14462
14555
|
clearTimeout(timer);
|
|
14463
14556
|
};
|
|
14464
14557
|
}
|
|
14465
14558
|
});
|
|
14466
|
-
|
|
14559
|
+
useEffect29(() => {
|
|
14467
14560
|
if (timer) {
|
|
14468
14561
|
clearTimeout(timer);
|
|
14469
14562
|
}
|
|
@@ -14476,9 +14569,9 @@ var useHoverState = (props = void 0) => {
|
|
|
14476
14569
|
};
|
|
14477
14570
|
|
|
14478
14571
|
// src/hooks/useOutsideClick.ts
|
|
14479
|
-
import { useEffect as
|
|
14572
|
+
import { useEffect as useEffect30 } from "react";
|
|
14480
14573
|
var useOutsideClick = (refs, handler) => {
|
|
14481
|
-
|
|
14574
|
+
useEffect30(() => {
|
|
14482
14575
|
const listener = (event) => {
|
|
14483
14576
|
if (event.target === null) return;
|
|
14484
14577
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -14496,17 +14589,17 @@ var useOutsideClick = (refs, handler) => {
|
|
|
14496
14589
|
};
|
|
14497
14590
|
|
|
14498
14591
|
// src/components/user-action/Menu.tsx
|
|
14499
|
-
import { Fragment as Fragment10, jsx as
|
|
14592
|
+
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
14500
14593
|
var MenuItem = ({
|
|
14501
14594
|
children,
|
|
14502
14595
|
onClick,
|
|
14503
14596
|
alignment = "left",
|
|
14504
14597
|
isDisabled = false,
|
|
14505
14598
|
className
|
|
14506
|
-
}) => /* @__PURE__ */
|
|
14599
|
+
}) => /* @__PURE__ */ jsx66(
|
|
14507
14600
|
"div",
|
|
14508
14601
|
{
|
|
14509
|
-
className:
|
|
14602
|
+
className: clsx48("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
|
|
14510
14603
|
"text-right": alignment === "right",
|
|
14511
14604
|
"text-left": alignment === "left",
|
|
14512
14605
|
"text-disabled cursor-not-allowed": isDisabled,
|
|
@@ -14536,10 +14629,10 @@ var Menu = ({
|
|
|
14536
14629
|
menuClassName = ""
|
|
14537
14630
|
}) => {
|
|
14538
14631
|
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
14539
|
-
const triggerRef =
|
|
14540
|
-
const menuRef =
|
|
14632
|
+
const triggerRef = useRef20(null);
|
|
14633
|
+
const menuRef = useRef20(null);
|
|
14541
14634
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
14542
|
-
const [isHidden, setIsHidden] =
|
|
14635
|
+
const [isHidden, setIsHidden] = useState28(true);
|
|
14543
14636
|
const bag = {
|
|
14544
14637
|
isOpen,
|
|
14545
14638
|
close: () => setIsOpen(false),
|
|
@@ -14550,7 +14643,7 @@ var Menu = ({
|
|
|
14550
14643
|
triggerRef.current?.getBoundingClientRect(),
|
|
14551
14644
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
14552
14645
|
);
|
|
14553
|
-
|
|
14646
|
+
useEffect31(() => {
|
|
14554
14647
|
if (!isOpen) return;
|
|
14555
14648
|
const triggerEl = triggerRef.current;
|
|
14556
14649
|
if (!triggerEl) return;
|
|
@@ -14567,19 +14660,19 @@ var Menu = ({
|
|
|
14567
14660
|
window.removeEventListener("resize", close);
|
|
14568
14661
|
};
|
|
14569
14662
|
}, [isOpen, setIsOpen]);
|
|
14570
|
-
|
|
14663
|
+
useEffect31(() => {
|
|
14571
14664
|
if (isOpen) {
|
|
14572
14665
|
setIsHidden(false);
|
|
14573
14666
|
}
|
|
14574
14667
|
}, [isOpen]);
|
|
14575
|
-
return /* @__PURE__ */
|
|
14668
|
+
return /* @__PURE__ */ jsxs38(Fragment10, { children: [
|
|
14576
14669
|
trigger(bag, triggerRef),
|
|
14577
|
-
createPortal4(/* @__PURE__ */
|
|
14670
|
+
createPortal4(/* @__PURE__ */ jsx66(
|
|
14578
14671
|
"div",
|
|
14579
14672
|
{
|
|
14580
14673
|
ref: menuRef,
|
|
14581
14674
|
onClick: (e) => e.stopPropagation(),
|
|
14582
|
-
className:
|
|
14675
|
+
className: clsx48(
|
|
14583
14676
|
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
|
|
14584
14677
|
{
|
|
14585
14678
|
"animate-pop-in": isOpen,
|
|
@@ -14603,25 +14696,25 @@ var Menu = ({
|
|
|
14603
14696
|
};
|
|
14604
14697
|
|
|
14605
14698
|
// src/components/table/TableFilterButton.tsx
|
|
14606
|
-
import { useEffect as
|
|
14607
|
-
import { Fragment as Fragment11, jsx as
|
|
14699
|
+
import { useEffect as useEffect32, useState as useState29 } from "react";
|
|
14700
|
+
import { Fragment as Fragment11, jsx as jsx67, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
14608
14701
|
var TableFilterButton = ({
|
|
14609
14702
|
filterType,
|
|
14610
14703
|
column
|
|
14611
14704
|
}) => {
|
|
14612
14705
|
const translation = useHightideTranslation();
|
|
14613
14706
|
const columnFilterValue = column.getFilterValue();
|
|
14614
|
-
const [filterValue, setFilterValue] =
|
|
14707
|
+
const [filterValue, setFilterValue] = useState29(columnFilterValue);
|
|
14615
14708
|
const hasFilter = !!filterValue;
|
|
14616
|
-
|
|
14709
|
+
useEffect32(() => {
|
|
14617
14710
|
setFilterValue(columnFilterValue);
|
|
14618
14711
|
}, [columnFilterValue]);
|
|
14619
|
-
return /* @__PURE__ */
|
|
14712
|
+
return /* @__PURE__ */ jsx67(
|
|
14620
14713
|
Menu,
|
|
14621
14714
|
{
|
|
14622
|
-
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */
|
|
14623
|
-
/* @__PURE__ */
|
|
14624
|
-
hasFilter && /* @__PURE__ */
|
|
14715
|
+
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs39("div", { ref, className: "relative", children: [
|
|
14716
|
+
/* @__PURE__ */ jsx67(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ jsx67(FilterIcon, {}) }),
|
|
14717
|
+
hasFilter && /* @__PURE__ */ jsx67(
|
|
14625
14718
|
"div",
|
|
14626
14719
|
{
|
|
14627
14720
|
className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
|
|
@@ -14629,9 +14722,9 @@ var TableFilterButton = ({
|
|
|
14629
14722
|
}
|
|
14630
14723
|
)
|
|
14631
14724
|
] }),
|
|
14632
|
-
children: ({ close }) => /* @__PURE__ */
|
|
14633
|
-
/* @__PURE__ */
|
|
14634
|
-
filterType === "text" && /* @__PURE__ */
|
|
14725
|
+
children: ({ close }) => /* @__PURE__ */ jsxs39("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
|
|
14726
|
+
/* @__PURE__ */ jsx67("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
|
|
14727
|
+
filterType === "text" && /* @__PURE__ */ jsx67(
|
|
14635
14728
|
Input,
|
|
14636
14729
|
{
|
|
14637
14730
|
value: filterValue ?? "",
|
|
@@ -14641,8 +14734,8 @@ var TableFilterButton = ({
|
|
|
14641
14734
|
className: "h-10"
|
|
14642
14735
|
}
|
|
14643
14736
|
),
|
|
14644
|
-
filterType === "range" && /* @__PURE__ */
|
|
14645
|
-
/* @__PURE__ */
|
|
14737
|
+
filterType === "range" && /* @__PURE__ */ jsxs39("div", { className: "flex-row-2 items-center", children: [
|
|
14738
|
+
/* @__PURE__ */ jsx67(
|
|
14646
14739
|
Input,
|
|
14647
14740
|
{
|
|
14648
14741
|
value: filterValue?.[0] ?? "",
|
|
@@ -14655,8 +14748,8 @@ var TableFilterButton = ({
|
|
|
14655
14748
|
className: "h-10 input-indicator-hidden w-40"
|
|
14656
14749
|
}
|
|
14657
14750
|
),
|
|
14658
|
-
/* @__PURE__ */
|
|
14659
|
-
/* @__PURE__ */
|
|
14751
|
+
/* @__PURE__ */ jsx67("span", { className: "font-bold", children: "-" }),
|
|
14752
|
+
/* @__PURE__ */ jsx67(
|
|
14660
14753
|
Input,
|
|
14661
14754
|
{
|
|
14662
14755
|
value: filterValue?.[1] ?? "",
|
|
@@ -14670,8 +14763,8 @@ var TableFilterButton = ({
|
|
|
14670
14763
|
}
|
|
14671
14764
|
)
|
|
14672
14765
|
] }),
|
|
14673
|
-
filterType === "dateRange" && /* @__PURE__ */
|
|
14674
|
-
/* @__PURE__ */
|
|
14766
|
+
filterType === "dateRange" && /* @__PURE__ */ jsxs39(Fragment11, { children: [
|
|
14767
|
+
/* @__PURE__ */ jsx67(
|
|
14675
14768
|
Input,
|
|
14676
14769
|
{
|
|
14677
14770
|
value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
|
|
@@ -14684,7 +14777,7 @@ var TableFilterButton = ({
|
|
|
14684
14777
|
className: "h-10 w-50"
|
|
14685
14778
|
}
|
|
14686
14779
|
),
|
|
14687
|
-
/* @__PURE__ */
|
|
14780
|
+
/* @__PURE__ */ jsx67(
|
|
14688
14781
|
Input,
|
|
14689
14782
|
{
|
|
14690
14783
|
value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
|
|
@@ -14698,12 +14791,12 @@ var TableFilterButton = ({
|
|
|
14698
14791
|
}
|
|
14699
14792
|
)
|
|
14700
14793
|
] }),
|
|
14701
|
-
/* @__PURE__ */
|
|
14702
|
-
hasFilter && /* @__PURE__ */
|
|
14794
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
14795
|
+
hasFilter && /* @__PURE__ */ jsx67(SolidButton, { color: "negative", size: "small", onClick: () => {
|
|
14703
14796
|
column.setFilterValue(void 0);
|
|
14704
14797
|
close();
|
|
14705
14798
|
}, children: translation("remove") }),
|
|
14706
|
-
/* @__PURE__ */
|
|
14799
|
+
/* @__PURE__ */ jsx67(SolidButton, { size: "small", onClick: () => {
|
|
14707
14800
|
column.setFilterValue(filterValue);
|
|
14708
14801
|
close();
|
|
14709
14802
|
}, children: translation("apply") })
|
|
@@ -14714,7 +14807,7 @@ var TableFilterButton = ({
|
|
|
14714
14807
|
};
|
|
14715
14808
|
|
|
14716
14809
|
// src/components/table/Table.tsx
|
|
14717
|
-
import { jsx as
|
|
14810
|
+
import { jsx as jsx68, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
14718
14811
|
var Table = ({
|
|
14719
14812
|
data,
|
|
14720
14813
|
fillerRow,
|
|
@@ -14727,21 +14820,21 @@ var Table = ({
|
|
|
14727
14820
|
columns,
|
|
14728
14821
|
...tableOptions
|
|
14729
14822
|
}) => {
|
|
14730
|
-
const ref =
|
|
14731
|
-
const tableRef =
|
|
14732
|
-
const [columnSizing, setColumnSizing] =
|
|
14823
|
+
const ref = useRef21(null);
|
|
14824
|
+
const tableRef = useRef21(null);
|
|
14825
|
+
const [columnSizing, setColumnSizing] = useState30(columns.reduce((previousValue, currentValue) => {
|
|
14733
14826
|
return {
|
|
14734
14827
|
...previousValue,
|
|
14735
14828
|
[currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
|
|
14736
14829
|
};
|
|
14737
14830
|
}, {}));
|
|
14738
|
-
const [columnSizingInfo, setColumnSizingInfo] =
|
|
14739
|
-
const [pagination, setPagination] =
|
|
14831
|
+
const [columnSizingInfo, setColumnSizingInfo] = useState30();
|
|
14832
|
+
const [pagination, setPagination] = useState30({
|
|
14740
14833
|
pageSize: 10,
|
|
14741
14834
|
pageIndex: 0,
|
|
14742
14835
|
...initialState?.pagination
|
|
14743
14836
|
});
|
|
14744
|
-
const [columnFilters, setColumnFilters] =
|
|
14837
|
+
const [columnFilters, setColumnFilters] = useState30(initialState?.columnFilters);
|
|
14745
14838
|
const computedColumnMinWidths = useMemo10(() => {
|
|
14746
14839
|
return columns.reduce((previousValue, column) => {
|
|
14747
14840
|
return {
|
|
@@ -14833,7 +14926,7 @@ var Table = ({
|
|
|
14833
14926
|
minSize: 60,
|
|
14834
14927
|
maxSize: 700,
|
|
14835
14928
|
cell: ({ cell }) => {
|
|
14836
|
-
return /* @__PURE__ */
|
|
14929
|
+
return /* @__PURE__ */ jsx68(TableCell, { children: cell.getValue() });
|
|
14837
14930
|
},
|
|
14838
14931
|
...defaultColumn
|
|
14839
14932
|
},
|
|
@@ -14881,8 +14974,8 @@ var Table = ({
|
|
|
14881
14974
|
columnResizeMode: "onChange",
|
|
14882
14975
|
...tableOptions
|
|
14883
14976
|
});
|
|
14884
|
-
const [hasInitializedSizing, setHasInitializedSizing] =
|
|
14885
|
-
|
|
14977
|
+
const [hasInitializedSizing, setHasInitializedSizing] = useState30(false);
|
|
14978
|
+
useEffect33(() => {
|
|
14886
14979
|
if (!hasInitializedSizing && ref.current) {
|
|
14887
14980
|
setHasInitializedSizing(true);
|
|
14888
14981
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
@@ -14892,7 +14985,7 @@ var Table = ({
|
|
|
14892
14985
|
table.setColumnSizing(updateColumnSizes);
|
|
14893
14986
|
}, [updateColumnSizes]));
|
|
14894
14987
|
const pageCount = table.getPageCount();
|
|
14895
|
-
|
|
14988
|
+
useEffect33(() => {
|
|
14896
14989
|
const totalPages = pageCount;
|
|
14897
14990
|
if (totalPages === 0) {
|
|
14898
14991
|
if (pagination.pageIndex !== 0) {
|
|
@@ -14918,24 +15011,24 @@ var Table = ({
|
|
|
14918
15011
|
}
|
|
14919
15012
|
return colSizes;
|
|
14920
15013
|
}, [table.getState().columnSizingInfo, table.getState().columnSizing]);
|
|
14921
|
-
return /* @__PURE__ */
|
|
14922
|
-
/* @__PURE__ */
|
|
15014
|
+
return /* @__PURE__ */ jsxs40("div", { ref, className: clsx49("flex-col-4", className), children: [
|
|
15015
|
+
/* @__PURE__ */ jsx68(
|
|
14923
15016
|
Scrollbars3,
|
|
14924
15017
|
{
|
|
14925
15018
|
autoHeight: true,
|
|
14926
15019
|
autoHeightMax: tableRef.current?.offsetHeight ? tableRef.current?.offsetHeight + 2 : void 0,
|
|
14927
15020
|
autoHide: true,
|
|
14928
|
-
children: /* @__PURE__ */
|
|
15021
|
+
children: /* @__PURE__ */ jsxs40(
|
|
14929
15022
|
"table",
|
|
14930
15023
|
{
|
|
14931
15024
|
ref: tableRef,
|
|
14932
|
-
className:
|
|
15025
|
+
className: clsx49(tableClassName),
|
|
14933
15026
|
style: {
|
|
14934
15027
|
...columnSizeVars,
|
|
14935
15028
|
width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
|
|
14936
15029
|
},
|
|
14937
15030
|
children: [
|
|
14938
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */
|
|
15031
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx68("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx68(
|
|
14939
15032
|
"col",
|
|
14940
15033
|
{
|
|
14941
15034
|
style: {
|
|
@@ -14946,22 +15039,22 @@ var Table = ({
|
|
|
14946
15039
|
},
|
|
14947
15040
|
header.id
|
|
14948
15041
|
)) }, headerGroup.id)),
|
|
14949
|
-
/* @__PURE__ */
|
|
14950
|
-
return /* @__PURE__ */
|
|
15042
|
+
/* @__PURE__ */ jsx68("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx68("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
|
|
15043
|
+
return /* @__PURE__ */ jsxs40(
|
|
14951
15044
|
"th",
|
|
14952
15045
|
{
|
|
14953
15046
|
colSpan: header.colSpan,
|
|
14954
|
-
className:
|
|
15047
|
+
className: clsx49("relative group", header.column.columnDef.meta?.className),
|
|
14955
15048
|
children: [
|
|
14956
|
-
/* @__PURE__ */
|
|
14957
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
15049
|
+
/* @__PURE__ */ jsx68("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs40("div", { className: "flex-row-1 items-center", children: [
|
|
15050
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx68(
|
|
14958
15051
|
TableSortButton,
|
|
14959
15052
|
{
|
|
14960
15053
|
sortDirection: header.column.getIsSorted(),
|
|
14961
15054
|
onClick: () => header.column.toggleSorting()
|
|
14962
15055
|
}
|
|
14963
15056
|
),
|
|
14964
|
-
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */
|
|
15057
|
+
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx68(
|
|
14965
15058
|
TableFilterButton,
|
|
14966
15059
|
{
|
|
14967
15060
|
column: header.column,
|
|
@@ -14973,7 +15066,7 @@ var Table = ({
|
|
|
14973
15066
|
header.getContext()
|
|
14974
15067
|
)
|
|
14975
15068
|
] }) }),
|
|
14976
|
-
header.column.getCanResize() && /* @__PURE__ */
|
|
15069
|
+
header.column.getCanResize() && /* @__PURE__ */ jsx68(
|
|
14977
15070
|
"div",
|
|
14978
15071
|
{
|
|
14979
15072
|
onMouseDown: header.getResizeHandler(),
|
|
@@ -14992,18 +15085,18 @@ var Table = ({
|
|
|
14992
15085
|
header.id
|
|
14993
15086
|
);
|
|
14994
15087
|
}) }, headerGroup.id)) }),
|
|
14995
|
-
/* @__PURE__ */
|
|
15088
|
+
/* @__PURE__ */ jsxs40("tbody", { children: [
|
|
14996
15089
|
table.getRowModel().rows.map((row) => {
|
|
14997
|
-
return /* @__PURE__ */
|
|
14998
|
-
return /* @__PURE__ */
|
|
15090
|
+
return /* @__PURE__ */ jsx68("tr", { onClick: () => onRowClick?.(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
|
|
15091
|
+
return /* @__PURE__ */ jsx68("td", { children: flexRender(
|
|
14999
15092
|
cell.column.columnDef.cell,
|
|
15000
15093
|
cell.getContext()
|
|
15001
15094
|
) }, cell.id);
|
|
15002
15095
|
}) }, row.id);
|
|
15003
15096
|
}),
|
|
15004
15097
|
range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
|
|
15005
|
-
return /* @__PURE__ */
|
|
15006
|
-
return /* @__PURE__ */
|
|
15098
|
+
return /* @__PURE__ */ jsx68("tr", { children: columns.map((column) => {
|
|
15099
|
+
return /* @__PURE__ */ jsx68("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx68(FillerRowElement, {}) }, column.id);
|
|
15007
15100
|
}) }, "filler-row-" + index);
|
|
15008
15101
|
})
|
|
15009
15102
|
] })
|
|
@@ -15012,7 +15105,7 @@ var Table = ({
|
|
|
15012
15105
|
)
|
|
15013
15106
|
}
|
|
15014
15107
|
),
|
|
15015
|
-
/* @__PURE__ */
|
|
15108
|
+
/* @__PURE__ */ jsx68("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx68(
|
|
15016
15109
|
Pagination,
|
|
15017
15110
|
{
|
|
15018
15111
|
pageIndex: table.getState().pagination.pageIndex,
|
|
@@ -15024,7 +15117,7 @@ var Table = ({
|
|
|
15024
15117
|
};
|
|
15025
15118
|
var TableUncontrolled = ({ data, ...props }) => {
|
|
15026
15119
|
const [usedDate] = useOverwritableState(data);
|
|
15027
|
-
return /* @__PURE__ */
|
|
15120
|
+
return /* @__PURE__ */ jsx68(
|
|
15028
15121
|
Table,
|
|
15029
15122
|
{
|
|
15030
15123
|
...props,
|
|
@@ -15048,7 +15141,7 @@ var TableWithSelection = ({
|
|
|
15048
15141
|
{
|
|
15049
15142
|
id: selectionRowId,
|
|
15050
15143
|
header: ({ table }) => {
|
|
15051
|
-
return /* @__PURE__ */
|
|
15144
|
+
return /* @__PURE__ */ jsx68(
|
|
15052
15145
|
Checkbox2,
|
|
15053
15146
|
{
|
|
15054
15147
|
checked: table.getIsAllRowsSelected(),
|
|
@@ -15061,7 +15154,7 @@ var TableWithSelection = ({
|
|
|
15061
15154
|
);
|
|
15062
15155
|
},
|
|
15063
15156
|
cell: ({ row }) => {
|
|
15064
|
-
return /* @__PURE__ */
|
|
15157
|
+
return /* @__PURE__ */ jsx68(
|
|
15065
15158
|
Checkbox2,
|
|
15066
15159
|
{
|
|
15067
15160
|
disabled: !row.getCanSelect(),
|
|
@@ -15079,15 +15172,15 @@ var TableWithSelection = ({
|
|
|
15079
15172
|
...columns
|
|
15080
15173
|
];
|
|
15081
15174
|
}, [columns, selectionRowId]);
|
|
15082
|
-
return /* @__PURE__ */
|
|
15175
|
+
return /* @__PURE__ */ jsx68(
|
|
15083
15176
|
Table,
|
|
15084
15177
|
{
|
|
15085
15178
|
columns: columnsWithSelection,
|
|
15086
15179
|
fillerRow: (columnId, table) => {
|
|
15087
15180
|
if (columnId === selectionRowId) {
|
|
15088
|
-
return /* @__PURE__ */
|
|
15181
|
+
return /* @__PURE__ */ jsx68(Checkbox2, { checked: false, disabled: true, className: "max-w-6" });
|
|
15089
15182
|
}
|
|
15090
|
-
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */
|
|
15183
|
+
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx68(FillerRowElement, {});
|
|
15091
15184
|
},
|
|
15092
15185
|
state: {
|
|
15093
15186
|
rowSelection,
|
|
@@ -15101,7 +15194,7 @@ var TableWithSelection = ({
|
|
|
15101
15194
|
},
|
|
15102
15195
|
meta: {
|
|
15103
15196
|
...meta,
|
|
15104
|
-
bodyRowClassName:
|
|
15197
|
+
bodyRowClassName: clsx49(
|
|
15105
15198
|
{ "cursor-pointer": !disableClickRowClickSelection },
|
|
15106
15199
|
meta?.bodyRowClassName
|
|
15107
15200
|
)
|
|
@@ -15112,8 +15205,8 @@ var TableWithSelection = ({
|
|
|
15112
15205
|
};
|
|
15113
15206
|
|
|
15114
15207
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
15115
|
-
import { useState as
|
|
15116
|
-
import { clsx as
|
|
15208
|
+
import { useState as useState31 } from "react";
|
|
15209
|
+
import { clsx as clsx50 } from "clsx";
|
|
15117
15210
|
|
|
15118
15211
|
// src/utils/writeToClipboard.ts
|
|
15119
15212
|
var writeToClipboard = (text) => {
|
|
@@ -15122,7 +15215,7 @@ var writeToClipboard = (text) => {
|
|
|
15122
15215
|
|
|
15123
15216
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
15124
15217
|
import { CheckIcon as CheckIcon2, Copy } from "lucide-react";
|
|
15125
|
-
import { jsx as
|
|
15218
|
+
import { jsx as jsx69, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
15126
15219
|
var CopyToClipboardWrapper = ({
|
|
15127
15220
|
children,
|
|
15128
15221
|
textToCopy,
|
|
@@ -15132,8 +15225,8 @@ var CopyToClipboardWrapper = ({
|
|
|
15132
15225
|
zIndex = 10
|
|
15133
15226
|
}) => {
|
|
15134
15227
|
const translation = useHightideTranslation();
|
|
15135
|
-
const [isShowingIndication, setIsShowingIndication] =
|
|
15136
|
-
const [isShowingConfirmation, setIsShowingConfirmation] =
|
|
15228
|
+
const [isShowingIndication, setIsShowingIndication] = useState31(false);
|
|
15229
|
+
const [isShowingConfirmation, setIsShowingConfirmation] = useState31(false);
|
|
15137
15230
|
const positionClasses = {
|
|
15138
15231
|
top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
|
|
15139
15232
|
bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
|
|
@@ -15153,10 +15246,10 @@ var CopyToClipboardWrapper = ({
|
|
|
15153
15246
|
left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
|
|
15154
15247
|
right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
|
|
15155
15248
|
};
|
|
15156
|
-
return /* @__PURE__ */
|
|
15249
|
+
return /* @__PURE__ */ jsxs41(
|
|
15157
15250
|
"div",
|
|
15158
15251
|
{
|
|
15159
|
-
className:
|
|
15252
|
+
className: clsx50("relative inline-block cursor-copy", containerClassName),
|
|
15160
15253
|
onMouseEnter: () => {
|
|
15161
15254
|
setIsShowingIndication(true);
|
|
15162
15255
|
},
|
|
@@ -15171,10 +15264,10 @@ var CopyToClipboardWrapper = ({
|
|
|
15171
15264
|
},
|
|
15172
15265
|
children: [
|
|
15173
15266
|
children,
|
|
15174
|
-
/* @__PURE__ */
|
|
15267
|
+
/* @__PURE__ */ jsxs41(
|
|
15175
15268
|
"div",
|
|
15176
15269
|
{
|
|
15177
|
-
className:
|
|
15270
|
+
className: clsx50(
|
|
15178
15271
|
`absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
15179
15272
|
shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
|
|
15180
15273
|
"transition-opacity duration-200",
|
|
@@ -15186,18 +15279,18 @@ var CopyToClipboardWrapper = ({
|
|
|
15186
15279
|
opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
|
|
15187
15280
|
},
|
|
15188
15281
|
children: [
|
|
15189
|
-
isShowingConfirmation && /* @__PURE__ */
|
|
15190
|
-
/* @__PURE__ */
|
|
15282
|
+
isShowingConfirmation && /* @__PURE__ */ jsxs41("div", { className: "flex-row-1", children: [
|
|
15283
|
+
/* @__PURE__ */ jsx69(CheckIcon2, { size: 16, className: "text-positive" }),
|
|
15191
15284
|
translation("copied")
|
|
15192
15285
|
] }),
|
|
15193
|
-
isShowingIndication && /* @__PURE__ */
|
|
15194
|
-
/* @__PURE__ */
|
|
15286
|
+
isShowingIndication && /* @__PURE__ */ jsxs41("div", { className: "flex-row-1 text-description", children: [
|
|
15287
|
+
/* @__PURE__ */ jsx69(Copy, { size: 16 }),
|
|
15195
15288
|
translation("clickToCopy")
|
|
15196
15289
|
] }),
|
|
15197
|
-
/* @__PURE__ */
|
|
15290
|
+
/* @__PURE__ */ jsx69(
|
|
15198
15291
|
"div",
|
|
15199
15292
|
{
|
|
15200
|
-
className:
|
|
15293
|
+
className: clsx50(`absolute w-0 h-0`, triangleClasses[position]),
|
|
15201
15294
|
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
15202
15295
|
}
|
|
15203
15296
|
)
|
|
@@ -15210,8 +15303,8 @@ var CopyToClipboardWrapper = ({
|
|
|
15210
15303
|
};
|
|
15211
15304
|
|
|
15212
15305
|
// src/components/user-action/DateAndTimePicker.tsx
|
|
15213
|
-
import
|
|
15214
|
-
import { jsx as
|
|
15306
|
+
import clsx51 from "clsx";
|
|
15307
|
+
import { jsx as jsx70, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
15215
15308
|
var DateTimePicker = ({
|
|
15216
15309
|
value = /* @__PURE__ */ new Date(),
|
|
15217
15310
|
start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
|
|
@@ -15229,7 +15322,7 @@ var DateTimePicker = ({
|
|
|
15229
15322
|
let dateDisplay;
|
|
15230
15323
|
let timeDisplay;
|
|
15231
15324
|
if (useDate) {
|
|
15232
|
-
dateDisplay = /* @__PURE__ */
|
|
15325
|
+
dateDisplay = /* @__PURE__ */ jsx70(
|
|
15233
15326
|
DatePicker,
|
|
15234
15327
|
{
|
|
15235
15328
|
...datePickerProps,
|
|
@@ -15243,25 +15336,25 @@ var DateTimePicker = ({
|
|
|
15243
15336
|
);
|
|
15244
15337
|
}
|
|
15245
15338
|
if (useTime) {
|
|
15246
|
-
timeDisplay = /* @__PURE__ */
|
|
15339
|
+
timeDisplay = /* @__PURE__ */ jsx70(
|
|
15247
15340
|
TimePicker,
|
|
15248
15341
|
{
|
|
15249
15342
|
...timePickerProps,
|
|
15250
|
-
className:
|
|
15343
|
+
className: clsx51("h-full", { "justify-between w-full": mode === "time" }),
|
|
15251
15344
|
maxHeight: 250,
|
|
15252
15345
|
time: value,
|
|
15253
15346
|
onChange
|
|
15254
15347
|
}
|
|
15255
15348
|
);
|
|
15256
15349
|
}
|
|
15257
|
-
return /* @__PURE__ */
|
|
15258
|
-
/* @__PURE__ */
|
|
15350
|
+
return /* @__PURE__ */ jsxs42("div", { className: "flex-col-2 w-fit", children: [
|
|
15351
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex-row-4", children: [
|
|
15259
15352
|
dateDisplay,
|
|
15260
15353
|
timeDisplay
|
|
15261
15354
|
] }),
|
|
15262
|
-
/* @__PURE__ */
|
|
15263
|
-
/* @__PURE__ */
|
|
15264
|
-
/* @__PURE__ */
|
|
15355
|
+
/* @__PURE__ */ jsx70("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ jsxs42("div", { className: "flex-row-2 mt-1", children: [
|
|
15356
|
+
/* @__PURE__ */ jsx70(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
15357
|
+
/* @__PURE__ */ jsx70(
|
|
15265
15358
|
SolidButton,
|
|
15266
15359
|
{
|
|
15267
15360
|
size: "medium",
|
|
@@ -15274,9 +15367,9 @@ var DateTimePicker = ({
|
|
|
15274
15367
|
};
|
|
15275
15368
|
|
|
15276
15369
|
// src/components/user-action/ScrollPicker.tsx
|
|
15277
|
-
import { useCallback as useCallback17, useEffect as
|
|
15278
|
-
import
|
|
15279
|
-
import { jsx as
|
|
15370
|
+
import { useCallback as useCallback17, useEffect as useEffect34, useState as useState32 } from "react";
|
|
15371
|
+
import clsx52 from "clsx";
|
|
15372
|
+
import { jsx as jsx71, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
15280
15373
|
var up = 1;
|
|
15281
15374
|
var down = -1;
|
|
15282
15375
|
var ScrollPicker = ({
|
|
@@ -15295,7 +15388,7 @@ var ScrollPicker = ({
|
|
|
15295
15388
|
transition,
|
|
15296
15389
|
items,
|
|
15297
15390
|
lastTimeStamp
|
|
15298
|
-
}, setAnimation] =
|
|
15391
|
+
}, setAnimation] = useState32({
|
|
15299
15392
|
targetIndex: selectedIndex,
|
|
15300
15393
|
currentIndex: disabled ? selectedIndex : 0,
|
|
15301
15394
|
velocity: 0,
|
|
@@ -15394,7 +15487,7 @@ var ScrollPicker = ({
|
|
|
15394
15487
|
};
|
|
15395
15488
|
});
|
|
15396
15489
|
}, [disabled, getDirection, onChange]);
|
|
15397
|
-
|
|
15490
|
+
useEffect34(() => {
|
|
15398
15491
|
requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
|
|
15399
15492
|
});
|
|
15400
15493
|
const opacity = (transition2, index, itemsCount) => {
|
|
@@ -15415,7 +15508,7 @@ var ScrollPicker = ({
|
|
|
15415
15508
|
}
|
|
15416
15509
|
return clamp(1 - opacityValue / max);
|
|
15417
15510
|
};
|
|
15418
|
-
return /* @__PURE__ */
|
|
15511
|
+
return /* @__PURE__ */ jsx71(
|
|
15419
15512
|
"div",
|
|
15420
15513
|
{
|
|
15421
15514
|
className: "relative overflow-hidden",
|
|
@@ -15426,15 +15519,15 @@ var ScrollPicker = ({
|
|
|
15426
15519
|
setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + deltaY }));
|
|
15427
15520
|
}
|
|
15428
15521
|
},
|
|
15429
|
-
children: /* @__PURE__ */
|
|
15430
|
-
/* @__PURE__ */
|
|
15522
|
+
children: /* @__PURE__ */ jsxs43("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
|
|
15523
|
+
/* @__PURE__ */ jsx71(
|
|
15431
15524
|
"div",
|
|
15432
15525
|
{
|
|
15433
15526
|
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 ",
|
|
15434
15527
|
style: { height: `${itemHeight}px` }
|
|
15435
15528
|
}
|
|
15436
15529
|
),
|
|
15437
|
-
/* @__PURE__ */
|
|
15530
|
+
/* @__PURE__ */ jsx71(
|
|
15438
15531
|
"div",
|
|
15439
15532
|
{
|
|
15440
15533
|
className: "flex-col-2 select-none",
|
|
@@ -15442,10 +15535,10 @@ var ScrollPicker = ({
|
|
|
15442
15535
|
transform: `translateY(${-transition * (distance + itemHeight)}px)`,
|
|
15443
15536
|
columnGap: `${distance}px`
|
|
15444
15537
|
},
|
|
15445
|
-
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */
|
|
15538
|
+
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx71(
|
|
15446
15539
|
"div",
|
|
15447
15540
|
{
|
|
15448
|
-
className:
|
|
15541
|
+
className: clsx52(
|
|
15449
15542
|
`flex-col-2 items-center justify-center rounded-md`,
|
|
15450
15543
|
{
|
|
15451
15544
|
"text-primary font-bold": currentIndex === index,
|
|
@@ -15473,8 +15566,8 @@ var ScrollPicker = ({
|
|
|
15473
15566
|
|
|
15474
15567
|
// src/components/user-action/SearchBar.tsx
|
|
15475
15568
|
import { Search } from "lucide-react";
|
|
15476
|
-
import { clsx as
|
|
15477
|
-
import { jsx as
|
|
15569
|
+
import { clsx as clsx53 } from "clsx";
|
|
15570
|
+
import { jsx as jsx72, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
15478
15571
|
var SearchBar = ({
|
|
15479
15572
|
placeholder,
|
|
15480
15573
|
onSearch,
|
|
@@ -15483,21 +15576,21 @@ var SearchBar = ({
|
|
|
15483
15576
|
...inputProps
|
|
15484
15577
|
}) => {
|
|
15485
15578
|
const translation = useHightideTranslation();
|
|
15486
|
-
return /* @__PURE__ */
|
|
15487
|
-
/* @__PURE__ */
|
|
15579
|
+
return /* @__PURE__ */ jsxs44("div", { className: clsx53("flex-row-2 justify-between items-center", containerClassName), children: [
|
|
15580
|
+
/* @__PURE__ */ jsx72(
|
|
15488
15581
|
Input,
|
|
15489
15582
|
{
|
|
15490
15583
|
...inputProps,
|
|
15491
15584
|
placeholder: placeholder ?? translation("search")
|
|
15492
15585
|
}
|
|
15493
15586
|
),
|
|
15494
|
-
onSearch && /* @__PURE__ */
|
|
15587
|
+
onSearch && /* @__PURE__ */ jsx72(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ jsx72(Search, { className: "w-full h-full" }) })
|
|
15495
15588
|
] });
|
|
15496
15589
|
};
|
|
15497
15590
|
|
|
15498
15591
|
// src/components/user-action/Tooltip.tsx
|
|
15499
|
-
import { clsx as
|
|
15500
|
-
import { jsx as
|
|
15592
|
+
import { clsx as clsx54 } from "clsx";
|
|
15593
|
+
import { jsx as jsx73, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
15501
15594
|
var Tooltip = ({
|
|
15502
15595
|
tooltip,
|
|
15503
15596
|
children,
|
|
@@ -15527,17 +15620,17 @@ var Tooltip = ({
|
|
|
15527
15620
|
left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
|
|
15528
15621
|
right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
|
|
15529
15622
|
};
|
|
15530
|
-
return /* @__PURE__ */
|
|
15623
|
+
return /* @__PURE__ */ jsxs45(
|
|
15531
15624
|
"div",
|
|
15532
15625
|
{
|
|
15533
|
-
className:
|
|
15626
|
+
className: clsx54("relative inline-block", containerClassName),
|
|
15534
15627
|
...handlers,
|
|
15535
15628
|
children: [
|
|
15536
15629
|
children,
|
|
15537
|
-
isHovered && /* @__PURE__ */
|
|
15630
|
+
isHovered && /* @__PURE__ */ jsxs45(
|
|
15538
15631
|
"div",
|
|
15539
15632
|
{
|
|
15540
|
-
className:
|
|
15633
|
+
className: clsx54(
|
|
15541
15634
|
`opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
15542
15635
|
animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
|
|
15543
15636
|
positionClasses[position],
|
|
@@ -15546,10 +15639,10 @@ var Tooltip = ({
|
|
|
15546
15639
|
style: { zIndex, animationDelay: animationDelay + "ms" },
|
|
15547
15640
|
children: [
|
|
15548
15641
|
tooltip,
|
|
15549
|
-
/* @__PURE__ */
|
|
15642
|
+
/* @__PURE__ */ jsx73(
|
|
15550
15643
|
"div",
|
|
15551
15644
|
{
|
|
15552
|
-
className:
|
|
15645
|
+
className: clsx54(`absolute w-0 h-0`, triangleClasses[position]),
|
|
15553
15646
|
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
15554
15647
|
}
|
|
15555
15648
|
)
|
|
@@ -15562,26 +15655,26 @@ var Tooltip = ({
|
|
|
15562
15655
|
};
|
|
15563
15656
|
|
|
15564
15657
|
// src/components/user-action/input/InsideLabelInput.tsx
|
|
15565
|
-
import { useId as
|
|
15566
|
-
import { forwardRef as forwardRef14, useState as
|
|
15567
|
-
import
|
|
15568
|
-
import { jsx as
|
|
15658
|
+
import { useId as useId11 } from "react";
|
|
15659
|
+
import { forwardRef as forwardRef14, useState as useState33 } from "react";
|
|
15660
|
+
import clsx55 from "clsx";
|
|
15661
|
+
import { jsx as jsx74, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
15569
15662
|
var InsideLabelInput = forwardRef14(function InsideLabelInput2({
|
|
15570
15663
|
id: customId,
|
|
15571
15664
|
label,
|
|
15572
15665
|
...props
|
|
15573
15666
|
}, forwardedRef) {
|
|
15574
15667
|
const { value } = props;
|
|
15575
|
-
const [isFocused, setIsFocused] =
|
|
15576
|
-
const generatedId =
|
|
15668
|
+
const [isFocused, setIsFocused] = useState33(false);
|
|
15669
|
+
const generatedId = useId11();
|
|
15577
15670
|
const id = customId ?? generatedId;
|
|
15578
|
-
return /* @__PURE__ */
|
|
15579
|
-
/* @__PURE__ */
|
|
15671
|
+
return /* @__PURE__ */ jsxs46("div", { className: clsx55("relative"), children: [
|
|
15672
|
+
/* @__PURE__ */ jsx74(
|
|
15580
15673
|
Input,
|
|
15581
15674
|
{
|
|
15582
15675
|
...props,
|
|
15583
15676
|
id,
|
|
15584
|
-
className:
|
|
15677
|
+
className: clsx55("h-14 px-4 pb-2 py-6.5", props.className),
|
|
15585
15678
|
ref: forwardedRef,
|
|
15586
15679
|
"aria-labelledby": id + "-label",
|
|
15587
15680
|
onFocus: (event) => {
|
|
@@ -15594,13 +15687,13 @@ var InsideLabelInput = forwardRef14(function InsideLabelInput2({
|
|
|
15594
15687
|
}
|
|
15595
15688
|
}
|
|
15596
15689
|
),
|
|
15597
|
-
/* @__PURE__ */
|
|
15690
|
+
/* @__PURE__ */ jsx74(
|
|
15598
15691
|
"label",
|
|
15599
15692
|
{
|
|
15600
15693
|
id: id + "-label",
|
|
15601
15694
|
"aria-hidden": true,
|
|
15602
15695
|
"data-display": isFocused || !!value ? "small" : "full",
|
|
15603
|
-
className:
|
|
15696
|
+
className: clsx55(
|
|
15604
15697
|
// margin left to account for the border which is ignored for absolute positions
|
|
15605
15698
|
"absolute left-4 ml-0.5 top-2 transition-all delay-25 pointer-events-none touch-none",
|
|
15606
15699
|
"data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm data-[display=small]:overflow-y-hidden",
|
|
@@ -15616,7 +15709,7 @@ var InsideLabelInputUncontrolled = ({
|
|
|
15616
15709
|
...props
|
|
15617
15710
|
}) => {
|
|
15618
15711
|
const [value, setValue] = useOverwritableState(initialValue, props.onChangeText);
|
|
15619
|
-
return /* @__PURE__ */
|
|
15712
|
+
return /* @__PURE__ */ jsx74(
|
|
15620
15713
|
InsideLabelInput,
|
|
15621
15714
|
{
|
|
15622
15715
|
...props,
|
|
@@ -15627,26 +15720,26 @@ var InsideLabelInputUncontrolled = ({
|
|
|
15627
15720
|
};
|
|
15628
15721
|
|
|
15629
15722
|
// src/components/user-action/input/ToggleableInput.tsx
|
|
15630
|
-
import { forwardRef as forwardRef15, useEffect as
|
|
15723
|
+
import { forwardRef as forwardRef15, useEffect as useEffect35, useImperativeHandle as useImperativeHandle4, useRef as useRef22, useState as useState34 } from "react";
|
|
15631
15724
|
import { Pencil } from "lucide-react";
|
|
15632
|
-
import
|
|
15633
|
-
import { jsx as
|
|
15725
|
+
import clsx56 from "clsx";
|
|
15726
|
+
import { jsx as jsx75, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
15634
15727
|
var ToggleableInput = forwardRef15(function ToggleableInput2({
|
|
15635
15728
|
value,
|
|
15636
15729
|
initialState = "display",
|
|
15637
15730
|
editCompleteOptions,
|
|
15638
15731
|
...props
|
|
15639
15732
|
}, forwardedRef) {
|
|
15640
|
-
const [isEditing, setIsEditing] =
|
|
15641
|
-
const innerRef =
|
|
15733
|
+
const [isEditing, setIsEditing] = useState34(initialState !== "display");
|
|
15734
|
+
const innerRef = useRef22(null);
|
|
15642
15735
|
useImperativeHandle4(forwardedRef, () => innerRef.current);
|
|
15643
|
-
|
|
15736
|
+
useEffect35(() => {
|
|
15644
15737
|
if (isEditing) {
|
|
15645
15738
|
innerRef.current?.focus();
|
|
15646
15739
|
}
|
|
15647
15740
|
}, [isEditing]);
|
|
15648
|
-
return /* @__PURE__ */
|
|
15649
|
-
/* @__PURE__ */
|
|
15741
|
+
return /* @__PURE__ */ jsxs47("div", { className: clsx56("relative flex-row-2", { "flex-1": isEditing }), children: [
|
|
15742
|
+
/* @__PURE__ */ jsx75(
|
|
15650
15743
|
Input,
|
|
15651
15744
|
{
|
|
15652
15745
|
...props,
|
|
@@ -15665,16 +15758,16 @@ var ToggleableInput = forwardRef15(function ToggleableInput2({
|
|
|
15665
15758
|
...editCompleteOptions,
|
|
15666
15759
|
allowEnterComplete: true
|
|
15667
15760
|
},
|
|
15668
|
-
className:
|
|
15761
|
+
className: clsx56(`w-full ring-0 outline-0 decoration-primary underline-offset-4`, {
|
|
15669
15762
|
"underline": isEditing,
|
|
15670
15763
|
"text-transparent": !isEditing
|
|
15671
15764
|
}),
|
|
15672
15765
|
defaultStyle: false
|
|
15673
15766
|
}
|
|
15674
15767
|
),
|
|
15675
|
-
!isEditing && /* @__PURE__ */
|
|
15676
|
-
/* @__PURE__ */
|
|
15677
|
-
/* @__PURE__ */
|
|
15768
|
+
!isEditing && /* @__PURE__ */ jsxs47("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
|
|
15769
|
+
/* @__PURE__ */ jsx75("span", { className: clsx56(" truncate"), children: value }),
|
|
15770
|
+
/* @__PURE__ */ jsx75(Pencil, { className: clsx56(`size-force-4`, { "text-transparent": isEditing }) })
|
|
15678
15771
|
] })
|
|
15679
15772
|
] });
|
|
15680
15773
|
});
|
|
@@ -15684,7 +15777,7 @@ var ToggleableInputUncontrolled = ({
|
|
|
15684
15777
|
...restProps
|
|
15685
15778
|
}) => {
|
|
15686
15779
|
const [value, setValue] = useOverwritableState(initialValue, onChangeText);
|
|
15687
|
-
return /* @__PURE__ */
|
|
15780
|
+
return /* @__PURE__ */ jsx75(
|
|
15688
15781
|
ToggleableInput,
|
|
15689
15782
|
{
|
|
15690
15783
|
value,
|
|
@@ -15695,33 +15788,33 @@ var ToggleableInputUncontrolled = ({
|
|
|
15695
15788
|
};
|
|
15696
15789
|
|
|
15697
15790
|
// src/components/utils/FocusTrap.tsx
|
|
15698
|
-
import { useRef as
|
|
15791
|
+
import { useRef as useRef23 } from "react";
|
|
15699
15792
|
import { useImperativeHandle as useImperativeHandle5 } from "react";
|
|
15700
15793
|
import { forwardRef as forwardRef16 } from "react";
|
|
15701
|
-
import { jsx as
|
|
15794
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
15702
15795
|
var FocusTrap = forwardRef16(function FocusTrap2({
|
|
15703
15796
|
active = true,
|
|
15704
15797
|
initialFocus,
|
|
15705
15798
|
focusFirst = false,
|
|
15706
15799
|
...props
|
|
15707
15800
|
}, forwardedRef) {
|
|
15708
|
-
const innerRef =
|
|
15801
|
+
const innerRef = useRef23(null);
|
|
15709
15802
|
useImperativeHandle5(forwardedRef, () => innerRef.current);
|
|
15710
15803
|
useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
|
|
15711
|
-
return /* @__PURE__ */
|
|
15804
|
+
return /* @__PURE__ */ jsx76("div", { ref: innerRef, ...props });
|
|
15712
15805
|
});
|
|
15713
15806
|
|
|
15714
15807
|
// src/components/utils/Transition.tsx
|
|
15715
|
-
import { useEffect as
|
|
15808
|
+
import { useEffect as useEffect36, useState as useState35 } from "react";
|
|
15716
15809
|
function Transition({
|
|
15717
15810
|
children,
|
|
15718
15811
|
show,
|
|
15719
15812
|
includeAnimation = true
|
|
15720
15813
|
}) {
|
|
15721
|
-
const [isOpen, setIsOpen] =
|
|
15722
|
-
const [isTransitioning, setIsTransitioning] =
|
|
15814
|
+
const [isOpen, setIsOpen] = useState35(show);
|
|
15815
|
+
const [isTransitioning, setIsTransitioning] = useState35(!isOpen);
|
|
15723
15816
|
const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
|
|
15724
|
-
|
|
15817
|
+
useEffect36(() => {
|
|
15725
15818
|
setIsOpen(show);
|
|
15726
15819
|
setIsTransitioning(true);
|
|
15727
15820
|
}, [show]);
|
|
@@ -15746,7 +15839,7 @@ function Transition({
|
|
|
15746
15839
|
}
|
|
15747
15840
|
|
|
15748
15841
|
// src/hooks/focus/useFocusGuards.ts
|
|
15749
|
-
import { useEffect as
|
|
15842
|
+
import { useEffect as useEffect37 } from "react";
|
|
15750
15843
|
var selectorName = "data-hw-focus-guard";
|
|
15751
15844
|
function FocusGuard() {
|
|
15752
15845
|
const element = document.createElement("div");
|
|
@@ -15784,7 +15877,7 @@ var FocusGuardsService = class _FocusGuardsService {
|
|
|
15784
15877
|
}
|
|
15785
15878
|
};
|
|
15786
15879
|
var useFocusGuards = () => {
|
|
15787
|
-
|
|
15880
|
+
useEffect37(() => {
|
|
15788
15881
|
FocusGuardsService.getInstance().add();
|
|
15789
15882
|
return () => {
|
|
15790
15883
|
FocusGuardsService.getInstance().remove();
|
|
@@ -15793,10 +15886,10 @@ var useFocusGuards = () => {
|
|
|
15793
15886
|
};
|
|
15794
15887
|
|
|
15795
15888
|
// src/hooks/focus/useFocusOnceVisible.ts
|
|
15796
|
-
import React20, { useEffect as
|
|
15889
|
+
import React20, { useEffect as useEffect38 } from "react";
|
|
15797
15890
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
15798
15891
|
const [hasUsedFocus, setHasUsedFocus] = React20.useState(false);
|
|
15799
|
-
|
|
15892
|
+
useEffect38(() => {
|
|
15800
15893
|
if (disable || hasUsedFocus) {
|
|
15801
15894
|
return;
|
|
15802
15895
|
}
|
|
@@ -15822,7 +15915,7 @@ var useRerender = () => {
|
|
|
15822
15915
|
};
|
|
15823
15916
|
|
|
15824
15917
|
// src/hooks/useSearch.ts
|
|
15825
|
-
import { useCallback as useCallback18, useEffect as
|
|
15918
|
+
import { useCallback as useCallback18, useEffect as useEffect39, useMemo as useMemo11, useState as useState36 } from "react";
|
|
15826
15919
|
|
|
15827
15920
|
// src/utils/simpleSearch.ts
|
|
15828
15921
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -15861,8 +15954,8 @@ var useSearch = ({
|
|
|
15861
15954
|
filter,
|
|
15862
15955
|
disabled = false
|
|
15863
15956
|
}) => {
|
|
15864
|
-
const [search, setSearch] =
|
|
15865
|
-
const [result, setResult] =
|
|
15957
|
+
const [search, setSearch] = useState36(initialSearch ?? "");
|
|
15958
|
+
const [result, setResult] = useState36(list);
|
|
15866
15959
|
const searchTags = useMemo11(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
15867
15960
|
const updateSearch = useCallback18((newSearch) => {
|
|
15868
15961
|
const usedSearch = newSearch ?? search;
|
|
@@ -15871,7 +15964,7 @@ var useSearch = ({
|
|
|
15871
15964
|
}
|
|
15872
15965
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
15873
15966
|
}, [searchTags, list, search, searchMapping]);
|
|
15874
|
-
|
|
15967
|
+
useEffect39(() => {
|
|
15875
15968
|
if (isSearchInstant) {
|
|
15876
15969
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
15877
15970
|
}
|
|
@@ -16201,6 +16294,8 @@ export {
|
|
|
16201
16294
|
SolidButton,
|
|
16202
16295
|
StepperBar,
|
|
16203
16296
|
StepperBarUncontrolled,
|
|
16297
|
+
Tab,
|
|
16298
|
+
TabView,
|
|
16204
16299
|
Table,
|
|
16205
16300
|
TableCell,
|
|
16206
16301
|
TableFilterButton,
|
|
@@ -16276,6 +16371,7 @@ export {
|
|
|
16276
16371
|
useRerender,
|
|
16277
16372
|
useResizeCallbackWrapper,
|
|
16278
16373
|
useSearch,
|
|
16374
|
+
useTabContext,
|
|
16279
16375
|
useTheme,
|
|
16280
16376
|
useTranslatedValidators,
|
|
16281
16377
|
validateEmail,
|