@hortiview/shared-components 0.0.9195 → 0.0.9279
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/{Iconify-B9ptjDuU.js → Iconify-DoU6pP1o.js} +73 -67
- package/dist/{_Map-2-rfNHMr.js → _Map-DKsHX-kc.js} +2 -2
- package/dist/{_baseToString-xTcv8tEN.js → _baseToString-dkhmFwqS.js} +1 -1
- package/dist/{_equalByTag-Bi6Uk01d.js → _equalByTag-BZEJl6ST.js} +2 -2
- package/dist/components/BaseView/BaseView.js +45 -37
- package/dist/components/BasicHeading/BasicHeading.js +1 -1
- package/dist/components/BlockView/BlockView.js +15 -15
- package/dist/components/BlockView/BlockView.test.js +4 -4
- package/dist/components/ChipCard/ChipCard.js +11 -9
- package/dist/components/ContextMenu/ContextMenu.js +31 -31
- package/dist/components/ContextMenu/ContextMenu.test.js +17 -17
- package/dist/components/DeleteModal/DeleteModal.js +42 -33
- package/dist/components/EmptyView/EmptyView.js +21 -13
- package/dist/components/Filter/Filter.js +4 -4
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +13 -4
- package/dist/components/FormComponents/FormSelect/FormSelect.js +87 -78
- package/dist/components/FormComponents/FormSlider/FormSlider.js +14 -13
- package/dist/components/FormComponents/FormText/FormText.js +36 -33
- package/dist/components/GenericTable/GenericTable.js +3 -3
- package/dist/components/HashTabView/HashTabView.js +68 -57
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/Iconify/Iconify.test.js +1 -1
- package/dist/components/ListArea/ListArea.js +174 -165
- package/dist/components/ListArea/ListAreaService.d.ts +2 -0
- package/dist/components/ListArea/ListAreaService.js +42 -32
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
- package/dist/components/Modal/Modal.js +3 -2
- package/dist/components/SearchBar/SearchBar.js +16 -15
- package/dist/enums/AvailableCustomIcons.d.ts +20 -14
- package/dist/enums/AvailableCustomIcons.js +1 -1
- package/dist/{get-DAwLfiRB.js → get-BJn2Enx7.js} +1 -1
- package/dist/{iconify.module-D_I3-4iU.js → iconify.module-Cru5NS2X.js} +5 -5
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, Fragment as M, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import { Select as k } from "@element/react-components";
|
|
3
|
-
import { g as h } from "../../../get-
|
|
3
|
+
import { g as h } from "../../../get-BJn2Enx7.js";
|
|
4
4
|
import { i as z } from "../../../isArray-thIeLpc5.js";
|
|
5
5
|
import { useMemo as S } from "react";
|
|
6
6
|
import { useFormContext as B, Controller as C } from "react-hook-form";
|
|
@@ -8,104 +8,113 @@ import { H as G } from "../../../react-tooltip.min-BzHiZW8k.js";
|
|
|
8
8
|
import { SelectTooltipText as J } from "./SelectTooltipText.js";
|
|
9
9
|
import { s as n } from "../../../formSelect.module-DMHh1bp8.js";
|
|
10
10
|
const N = ({
|
|
11
|
-
propertyName:
|
|
12
|
-
label:
|
|
11
|
+
propertyName: e,
|
|
12
|
+
label: f,
|
|
13
13
|
options: o,
|
|
14
|
-
multi:
|
|
14
|
+
multi: d = !1,
|
|
15
15
|
disabled: T = !1,
|
|
16
16
|
hoisted: F = !1,
|
|
17
17
|
hidden: I = !1,
|
|
18
18
|
valueKey: i = "value",
|
|
19
|
-
textKey:
|
|
19
|
+
textKey: H = "text",
|
|
20
20
|
clearable: j = !1,
|
|
21
21
|
searchable: v = !0,
|
|
22
22
|
noOptionsMessage: w = "",
|
|
23
|
-
rules:
|
|
24
|
-
...
|
|
23
|
+
rules: s,
|
|
24
|
+
...l
|
|
25
25
|
}) => {
|
|
26
26
|
const {
|
|
27
|
-
control:
|
|
28
|
-
formState: { errors: a, isValidating:
|
|
27
|
+
control: $,
|
|
28
|
+
formState: { errors: a, isValidating: p }
|
|
29
29
|
} = B(), c = S(
|
|
30
|
-
() => !
|
|
31
|
-
[a,
|
|
30
|
+
() => !p && h(a, e) !== void 0,
|
|
31
|
+
[a, e, p]
|
|
32
32
|
), A = S(
|
|
33
|
-
() =>
|
|
34
|
-
[
|
|
33
|
+
() => s?.required?.value,
|
|
34
|
+
[s]
|
|
35
35
|
), D = S(
|
|
36
|
-
() =>
|
|
37
|
-
[
|
|
36
|
+
() => s?.required?.message,
|
|
37
|
+
[s]
|
|
38
38
|
), E = () => {
|
|
39
|
-
if (a && a[
|
|
40
|
-
const u = a[
|
|
39
|
+
if (a && a[e]) {
|
|
40
|
+
const u = a[e]?.message;
|
|
41
41
|
return u || "Invalid input";
|
|
42
42
|
}
|
|
43
43
|
return D;
|
|
44
44
|
};
|
|
45
|
-
return I ? /* @__PURE__ */
|
|
46
|
-
|
|
45
|
+
return I ? /* @__PURE__ */ r(C, { name: e, control: $, render: () => /* @__PURE__ */ r(M, {}) }) : /* @__PURE__ */ r(
|
|
46
|
+
"div",
|
|
47
47
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
48
|
+
"data-testid": "form-select-container",
|
|
49
|
+
className: n.formSelectContainer,
|
|
50
|
+
"data-tooltip-id": f,
|
|
51
|
+
children: /* @__PURE__ */ r(
|
|
52
|
+
C,
|
|
53
|
+
{
|
|
54
|
+
name: e,
|
|
55
|
+
rules: s,
|
|
56
|
+
control: $,
|
|
57
|
+
render: ({ field: { ref: u, onChange: x, value: q, ...O } }) => {
|
|
58
|
+
let g = o;
|
|
59
|
+
z(o) && h(o[0], "options") !== void 0 && (g = o.flatMap((t) => h(t, "options") ?? []));
|
|
60
|
+
const m = d ? g?.filter(
|
|
61
|
+
(t) => q?.includes(t[i])
|
|
62
|
+
) : g?.find((t) => t[i] === q), P = d && l.multiDisplayType === "text" && l.fixedHeightInput;
|
|
63
|
+
return /* @__PURE__ */ b(M, { children: [
|
|
64
|
+
/* @__PURE__ */ r(
|
|
65
|
+
k,
|
|
66
|
+
{
|
|
67
|
+
...O,
|
|
68
|
+
...l,
|
|
69
|
+
value: m ?? [],
|
|
70
|
+
label: f,
|
|
71
|
+
variant: "outlined",
|
|
72
|
+
helperText: E(),
|
|
73
|
+
helperTextPersistent: A || c,
|
|
74
|
+
options: o,
|
|
75
|
+
valid: !c,
|
|
76
|
+
"data-testid": `select-${e}`,
|
|
77
|
+
multiSelect: d,
|
|
78
|
+
className: `${n.formSelect} ${c ? n.invalid : ""} ${P ? n.multiText : ""} ${T ? n.disabled : ""}`,
|
|
79
|
+
disabled: T,
|
|
80
|
+
valueKey: i,
|
|
81
|
+
textKey: H,
|
|
82
|
+
onChange: (t) => {
|
|
83
|
+
if (t == null) {
|
|
84
|
+
x(t);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (d) {
|
|
88
|
+
x(t.map((V) => V[i]));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
x(t[i]), l?.onChange?.(t);
|
|
92
|
+
},
|
|
93
|
+
hoisted: F,
|
|
94
|
+
noOptionsMessage: w,
|
|
95
|
+
searchable: v,
|
|
96
|
+
clearable: j,
|
|
97
|
+
menuMaxHeight: "15rem"
|
|
79
98
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ r(
|
|
101
|
+
G,
|
|
102
|
+
{
|
|
103
|
+
id: f,
|
|
104
|
+
noArrow: !0,
|
|
105
|
+
place: "bottom",
|
|
106
|
+
delayShow: 420,
|
|
107
|
+
className: n.tooltip,
|
|
108
|
+
hidden: !m || m.length === 0 || !l.fixedHeightInput,
|
|
109
|
+
children: /* @__PURE__ */ r(J, { value: m, textKey: H, valueKey: i })
|
|
83
110
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
clearable: j,
|
|
90
|
-
menuMaxHeight: "15rem"
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
/* @__PURE__ */ e(
|
|
94
|
-
G,
|
|
95
|
-
{
|
|
96
|
-
id: d,
|
|
97
|
-
noArrow: !0,
|
|
98
|
-
place: "bottom",
|
|
99
|
-
delayShow: 420,
|
|
100
|
-
className: n.tooltip,
|
|
101
|
-
hidden: !f || f.length === 0 || !s.fixedHeightInput,
|
|
102
|
-
children: /* @__PURE__ */ e(J, { value: f, textKey: p, valueKey: i })
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] });
|
|
106
|
-
}
|
|
111
|
+
)
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
)
|
|
107
116
|
}
|
|
108
|
-
)
|
|
117
|
+
);
|
|
109
118
|
};
|
|
110
119
|
export {
|
|
111
120
|
N as FormSelect
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Slider as
|
|
3
|
-
import { useFormContext as
|
|
2
|
+
import { Slider as d } from "@element/react-components";
|
|
3
|
+
import { useFormContext as p, Controller as u } from "react-hook-form";
|
|
4
4
|
const f = ({
|
|
5
|
-
propertyName:
|
|
6
|
-
label:
|
|
7
|
-
minValue:
|
|
5
|
+
propertyName: e,
|
|
6
|
+
label: t,
|
|
7
|
+
minValue: n,
|
|
8
8
|
maxValue: m,
|
|
9
9
|
step: a,
|
|
10
10
|
disabled: i
|
|
11
11
|
}) => {
|
|
12
|
-
const { control: l } =
|
|
12
|
+
const { control: l } = p();
|
|
13
13
|
return /* @__PURE__ */ o(
|
|
14
|
-
|
|
14
|
+
u,
|
|
15
15
|
{
|
|
16
|
-
name:
|
|
16
|
+
name: e,
|
|
17
17
|
control: l,
|
|
18
18
|
render: ({ field: r }) => /* @__PURE__ */ o(
|
|
19
|
-
|
|
19
|
+
d,
|
|
20
20
|
{
|
|
21
|
+
"data-testid": "slider",
|
|
21
22
|
...r,
|
|
22
|
-
onChange: (
|
|
23
|
-
r.onChange(
|
|
23
|
+
onChange: (s) => {
|
|
24
|
+
r.onChange(s.value);
|
|
24
25
|
},
|
|
25
|
-
label:
|
|
26
|
-
min:
|
|
26
|
+
label: t,
|
|
27
|
+
min: n,
|
|
27
28
|
max: m,
|
|
28
29
|
step: a,
|
|
29
30
|
disabled: i
|
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
import { jsx as t, Fragment as S, jsxs as J } from "react/jsx-runtime";
|
|
2
2
|
import { Textfield as K, TypoCaption as O } from "@element/react-components";
|
|
3
|
-
import { g as B } from "../../../get-
|
|
3
|
+
import { g as B } from "../../../get-BJn2Enx7.js";
|
|
4
4
|
import { useState as A, useCallback as Q, useMemo as c, useEffect as U } from "react";
|
|
5
5
|
import { useFormContext as X, Controller as j } from "react-hook-form";
|
|
6
6
|
import { s as i } from "../../../formText.module-C0by6_DK.js";
|
|
7
7
|
const Y = ({
|
|
8
8
|
count: e,
|
|
9
|
-
maxCount:
|
|
10
|
-
invalid:
|
|
9
|
+
maxCount: u,
|
|
10
|
+
invalid: f = !1,
|
|
11
11
|
hasRequiredText: r = !1
|
|
12
12
|
}) => /* @__PURE__ */ t(
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
"data-testid": "character-counter-container",
|
|
16
|
+
className: `${i.formTextAreaHelperText} ${f ? i.invalid : ""} ${r ? i.required : ""}`,
|
|
17
|
+
children: /* @__PURE__ */ t(O, { children: `${e}/${u}` })
|
|
17
18
|
}
|
|
18
|
-
), re = (e) => e.textarea ? /* @__PURE__ */ t(Z, { ...e }) : /* @__PURE__ */ t(_, { ...e }), Z = (e) => /* @__PURE__ */ t("div", { className: i.formTextArea, children: /* @__PURE__ */ t(k, { ...e }) }), _ = (e) => /* @__PURE__ */ t(
|
|
19
|
+
), re = (e) => e.textarea ? /* @__PURE__ */ t(Z, { ...e }) : /* @__PURE__ */ t(_, { ...e }), Z = (e) => /* @__PURE__ */ t("div", { "data-testid": "form-text-area", className: i.formTextArea, children: /* @__PURE__ */ t(k, { ...e }) }), _ = (e) => /* @__PURE__ */ t(
|
|
19
20
|
"div",
|
|
20
21
|
{
|
|
22
|
+
"data-testid": "form-text-field",
|
|
21
23
|
className: `${e.hasCharacterCount ? i.characterCount : i.withoutCharacterCount}`,
|
|
22
24
|
children: /* @__PURE__ */ t(k, { ...e })
|
|
23
25
|
}
|
|
24
26
|
), k = ({
|
|
25
27
|
propertyName: e,
|
|
26
|
-
label:
|
|
27
|
-
disabled:
|
|
28
|
+
label: u,
|
|
29
|
+
disabled: f = !1,
|
|
28
30
|
textarea: r = !1,
|
|
29
|
-
hasCharacterCount:
|
|
31
|
+
hasCharacterCount: d = !1,
|
|
30
32
|
hidden: H = !1,
|
|
31
33
|
placeholder: R,
|
|
32
34
|
type: b,
|
|
33
35
|
prefixText: w,
|
|
34
36
|
inputMode: z,
|
|
35
37
|
trailingIcon: E,
|
|
36
|
-
trigger:
|
|
38
|
+
trigger: h = "likeForm",
|
|
37
39
|
rules: n,
|
|
38
|
-
...
|
|
40
|
+
...v
|
|
39
41
|
}) => {
|
|
40
42
|
const {
|
|
41
43
|
control: T,
|
|
42
|
-
getFieldState:
|
|
44
|
+
getFieldState: m,
|
|
43
45
|
formState: { errors: C },
|
|
44
|
-
trigger:
|
|
45
|
-
} = X(), [I,
|
|
46
|
+
trigger: $
|
|
47
|
+
} = X(), [I, x] = A(0), [o, M] = A(), g = Q(
|
|
46
48
|
(l) => {
|
|
47
49
|
if (o != null) {
|
|
48
|
-
|
|
50
|
+
x(o.length);
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
51
53
|
if (l) {
|
|
52
|
-
|
|
54
|
+
x(l.length);
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
|
-
|
|
57
|
+
x(0);
|
|
56
58
|
},
|
|
57
59
|
[o]
|
|
58
60
|
), P = () => {
|
|
@@ -61,7 +63,7 @@ const Y = ({
|
|
|
61
63
|
const s = l.message;
|
|
62
64
|
return s || "Invalid input";
|
|
63
65
|
}
|
|
64
|
-
return
|
|
66
|
+
return F;
|
|
65
67
|
}, a = c(
|
|
66
68
|
() => n?.maxLength?.value,
|
|
67
69
|
[n]
|
|
@@ -71,13 +73,13 @@ const Y = ({
|
|
|
71
73
|
), W = c(
|
|
72
74
|
() => n?.required?.value,
|
|
73
75
|
[n]
|
|
74
|
-
),
|
|
76
|
+
), F = c(
|
|
75
77
|
() => n?.required?.message,
|
|
76
78
|
[n]
|
|
77
79
|
);
|
|
78
80
|
return U(() => {
|
|
79
|
-
(r ||
|
|
80
|
-
}, [o, r,
|
|
81
|
+
(r || d) && a !== void 0 && o != null && g();
|
|
82
|
+
}, [o, r, d, a, g]), H ? /* @__PURE__ */ t(j, { name: e, control: T, render: () => /* @__PURE__ */ t(S, {}) }) : /* @__PURE__ */ t(
|
|
81
83
|
j,
|
|
82
84
|
{
|
|
83
85
|
name: e,
|
|
@@ -85,47 +87,48 @@ const Y = ({
|
|
|
85
87
|
control: T,
|
|
86
88
|
render: ({ field: { ref: l, ...s }, formState: { defaultValues: D } }) => {
|
|
87
89
|
const q = B(D, e);
|
|
88
|
-
return !o && q && (
|
|
90
|
+
return !o && q && (d || r) && g(q), /* @__PURE__ */ J(S, { children: [
|
|
89
91
|
/* @__PURE__ */ t(
|
|
90
92
|
K,
|
|
91
93
|
{
|
|
92
|
-
...
|
|
94
|
+
...v,
|
|
93
95
|
...s,
|
|
94
96
|
value: s.value ?? "",
|
|
95
97
|
type: b,
|
|
96
98
|
fullWidth: !0,
|
|
99
|
+
"data-testid": `textfield-${e}`,
|
|
97
100
|
inputMode: z,
|
|
98
101
|
placeholder: R,
|
|
99
102
|
prefixText: w,
|
|
100
|
-
disabled:
|
|
103
|
+
disabled: f,
|
|
101
104
|
helperText: P(),
|
|
102
|
-
helperTextPersistent: C !== void 0 || W || a !== void 0 && (r ||
|
|
103
|
-
label:
|
|
105
|
+
helperTextPersistent: C !== void 0 || W || a !== void 0 && (r || d),
|
|
106
|
+
label: u,
|
|
104
107
|
variant: "outlined",
|
|
105
108
|
maxlength: a,
|
|
106
109
|
minLength: V,
|
|
107
110
|
textarea: r,
|
|
108
111
|
noResize: !1,
|
|
109
112
|
onBlur: () => {
|
|
110
|
-
|
|
113
|
+
h === "onBlur" && $(e), v.onBlur?.();
|
|
111
114
|
},
|
|
112
115
|
onChange: (L) => {
|
|
113
116
|
s.onChange(L);
|
|
114
117
|
const G = L?.target?.value;
|
|
115
|
-
M(G),
|
|
118
|
+
M(G), h === "onChange" && $(e);
|
|
116
119
|
},
|
|
117
|
-
valid: !
|
|
118
|
-
className: `${i.formText} ${
|
|
120
|
+
valid: !m(e).invalid,
|
|
121
|
+
className: `${i.formText} ${m(e).invalid ? i.invalid : ""}`,
|
|
119
122
|
trailingIcon: E
|
|
120
123
|
}
|
|
121
124
|
),
|
|
122
|
-
a !== void 0 && (
|
|
125
|
+
a !== void 0 && (d || r) && /* @__PURE__ */ t(
|
|
123
126
|
Y,
|
|
124
127
|
{
|
|
125
128
|
count: I,
|
|
126
129
|
maxCount: a,
|
|
127
|
-
invalid:
|
|
128
|
-
hasRequiredText:
|
|
130
|
+
invalid: m(e).invalid,
|
|
131
|
+
hasRequiredText: !!F
|
|
129
132
|
}
|
|
130
133
|
)
|
|
131
134
|
] });
|
|
@@ -4,13 +4,13 @@ import { Fragment as C } from "react";
|
|
|
4
4
|
import { a as t } from "../../genericTable.module-Dk3yy2S3.js";
|
|
5
5
|
import { u as j } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
6
6
|
import "../../alertBanner.module-BPiKN0gh.js";
|
|
7
|
-
import "../../iconify.module-
|
|
7
|
+
import "../../iconify.module-Cru5NS2X.js";
|
|
8
8
|
import "../../isArray-thIeLpc5.js";
|
|
9
9
|
import "../../react-tooltip.min-BzHiZW8k.js";
|
|
10
10
|
import "../../overflowTooltip.module-YyRN2MGc.js";
|
|
11
11
|
import "../../basicHeading.module-BYb8xvuk.js";
|
|
12
|
-
import "../../_baseToString-
|
|
13
|
-
import "../../_equalByTag-
|
|
12
|
+
import "../../_baseToString-dkhmFwqS.js";
|
|
13
|
+
import "../../_equalByTag-BZEJl6ST.js";
|
|
14
14
|
import "../../searchBar.module-9gKyrZRT.js";
|
|
15
15
|
import "../../listArea.module-BhO_OJ1S.js";
|
|
16
16
|
import "../../verticalDivider.module-C3_GL-fH.js";
|
|
@@ -1,73 +1,84 @@
|
|
|
1
|
-
import { jsx as i, jsxs as m, Fragment as
|
|
2
|
-
import { Elevation as
|
|
1
|
+
import { jsx as i, jsxs as m, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { Elevation as $, Group as o, TabBar as y, Tab as I, Padding as N } from "@element/react-components";
|
|
3
3
|
import { useState as k, useEffect as w } from "react";
|
|
4
4
|
import { u as x } from "../../useBreakpoints-MzTZ0tCT.js";
|
|
5
|
-
import { s as
|
|
6
|
-
const u = (
|
|
7
|
-
tabs:
|
|
8
|
-
hasHash:
|
|
9
|
-
hash:
|
|
5
|
+
import { s as a } from "../../HashTabView.module-DUekkiTC.js";
|
|
6
|
+
const u = (t, n) => !n || !t ? 0 : t.findIndex((r) => r.hash === n.replace("#", "")) ?? 0, z = ({
|
|
7
|
+
tabs: t,
|
|
8
|
+
hasHash: n = !0,
|
|
9
|
+
hash: r = "",
|
|
10
10
|
clusterAlign: f = "start",
|
|
11
|
-
hasClusteredTabs:
|
|
11
|
+
hasClusteredTabs: h,
|
|
12
12
|
children: s,
|
|
13
|
-
verticalGap:
|
|
14
|
-
elevation:
|
|
13
|
+
verticalGap: g = "none",
|
|
14
|
+
elevation: v = 0,
|
|
15
15
|
backgroundColor: T = "themeBackground",
|
|
16
|
-
onChange:
|
|
16
|
+
onChange: b
|
|
17
17
|
}) => {
|
|
18
|
-
const [l, p] = k(u(
|
|
18
|
+
const [l, p] = k(u(t, r)), { isDesktop: d } = x();
|
|
19
19
|
w(() => {
|
|
20
|
-
if (!
|
|
20
|
+
if (!n || !r)
|
|
21
21
|
return;
|
|
22
|
-
const e = u(
|
|
22
|
+
const e = u(t, r);
|
|
23
23
|
p(e);
|
|
24
|
-
}, [
|
|
25
|
-
const
|
|
26
|
-
const c =
|
|
27
|
-
c != null &&
|
|
24
|
+
}, [t, r, n]);
|
|
25
|
+
const A = (e) => {
|
|
26
|
+
const c = t[e].hash;
|
|
27
|
+
c != null && n && window.history.replaceState(null, "", `#${c}`), p(e), b?.(e);
|
|
28
28
|
};
|
|
29
29
|
return /* @__PURE__ */ i(
|
|
30
|
-
|
|
30
|
+
$,
|
|
31
31
|
{
|
|
32
|
-
elevation:
|
|
33
|
-
className: `${
|
|
34
|
-
children: /* @__PURE__ */ m(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: n.map((e, c) => /* @__PURE__ */ i(
|
|
46
|
-
$,
|
|
32
|
+
elevation: v,
|
|
33
|
+
className: `${a.elevation} ${T === "none" ? "" : a.themeBackground}`,
|
|
34
|
+
children: /* @__PURE__ */ m(
|
|
35
|
+
o,
|
|
36
|
+
{
|
|
37
|
+
"data-testid": "hash-tab-container",
|
|
38
|
+
direction: "vertical",
|
|
39
|
+
gap: g,
|
|
40
|
+
secondaryAlign: "stretch",
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ m(o, { direction: d ? "horizontal" : "vertical", className: a.tabWrapper, children: [
|
|
43
|
+
/* @__PURE__ */ i(
|
|
44
|
+
y,
|
|
47
45
|
{
|
|
48
|
-
|
|
49
|
-
className:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
46
|
+
"data-testid": "tab-bar",
|
|
47
|
+
className: a.tabBar,
|
|
48
|
+
clustered: d ? h : !1,
|
|
49
|
+
clusterAlign: f,
|
|
50
|
+
variant: "surface",
|
|
51
|
+
activeTabIndex: l,
|
|
52
|
+
onTabActivated: A,
|
|
53
|
+
children: t.map((e, c) => /* @__PURE__ */ i(
|
|
54
|
+
I,
|
|
55
|
+
{
|
|
56
|
+
"data-testid": `tab-${e.title}`,
|
|
57
|
+
icon: e.leadingIcon,
|
|
58
|
+
className: s ? a.tabButton : "",
|
|
59
|
+
active: l === c,
|
|
60
|
+
children: /* @__PURE__ */ m(o, { gap: "dense", children: [
|
|
61
|
+
e.title,
|
|
62
|
+
e.trailingIcon
|
|
63
|
+
] })
|
|
64
|
+
},
|
|
65
|
+
`${c}_${e.hash}`
|
|
66
|
+
))
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
s ? /* @__PURE__ */ i(
|
|
70
|
+
N,
|
|
71
|
+
{
|
|
72
|
+
variant: "dense",
|
|
73
|
+
className: d ? a.childContainer : a.childContainerPhone,
|
|
74
|
+
children: /* @__PURE__ */ i(o, { gap: "dense", primaryAlign: "center", secondaryAlign: "center", children: s })
|
|
75
|
+
}
|
|
76
|
+
) : /* @__PURE__ */ i(B, {})
|
|
77
|
+
] }),
|
|
78
|
+
t[l]?.component
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
)
|
|
71
82
|
}
|
|
72
83
|
);
|
|
73
84
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "@element/react-components";
|
|
3
|
-
import { I as f } from "../../Iconify-
|
|
3
|
+
import { I as f } from "../../Iconify-DoU6pP1o.js";
|
|
4
4
|
import "../../enums/AvailableCustomIcons.js";
|
|
5
|
-
import "../../iconify.module-
|
|
5
|
+
import "../../iconify.module-Cru5NS2X.js";
|
|
6
6
|
export {
|
|
7
7
|
f as Iconify
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { I as c } from "../../Iconify-
|
|
2
|
+
import { I as c } from "../../Iconify-DoU6pP1o.js";
|
|
3
3
|
import { AvailableCustomIcons as l } from "../../enums/AvailableCustomIcons.js";
|
|
4
4
|
import { a as r, w as s, s as i } from "../../react.esm-Dy4VzU4L.js";
|
|
5
5
|
import { d as f, t as a, g as o } from "../../vi.JYQecGiw-BbUbJcT8.js";
|