@elcrm/components 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/{AvatarGroup-Dq-UrOaC.js → AvatarGroup-DeceOhGV.js} +29 -26
- package/dist/AvatarGroup.js +1 -1
- package/dist/{Breadcrumb-DM_hWw5n.js → Breadcrumb-BexTTfCV.js} +42 -29
- package/dist/Breadcrumb.js +1 -1
- package/dist/CodeBlock-CZFC4r35.js +37 -0
- package/dist/CodeBlock.js +1 -1
- package/dist/Dropdown-C9rbsSgR.js +190 -0
- package/dist/Dropdown.js +1 -1
- package/dist/{Healthmap-Z-LLfGW0.js → Healthmap-B4h6_9Yv.js} +130 -123
- package/dist/Healthmap.js +1 -1
- package/dist/Layout.css +1 -1
- package/dist/Layout.d.ts +3 -1
- package/dist/Menu-CR2CclSe.js +76 -0
- package/dist/Menu.d.ts +5 -0
- package/dist/Menu.js +1 -1
- package/dist/PageHead-BjBvWtlk.js +33 -0
- package/dist/PageHead.d.ts +7 -1
- package/dist/PageHead.js +1 -1
- package/dist/{PanelInfo-Db5GCr-c.js → PanelInfo-BTkDUF-p.js} +61 -58
- package/dist/PanelInfo.js +1 -1
- package/dist/Popover.d.ts +1 -1
- package/dist/{PricingTable-BjpGVAhi.js → PricingTable-Dt2wsnEz.js} +56 -53
- package/dist/PricingTable.js +1 -1
- package/dist/Section-C5XfBTfd.js +48 -0
- package/dist/Section.d.ts +8 -1
- package/dist/Section.js +1 -1
- package/dist/{Sidebar-Bouhd5SS.js → Sidebar-C5vMwV9L.js} +77 -74
- package/dist/Sidebar.js +1 -1
- package/dist/TabSections-CEM_8Fjy.js +87 -0
- package/dist/TabSections.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +12 -12
- package/dist/kit-manifest.json +12 -2
- package/dist/tokens.css +2 -0
- package/package.json +1 -1
- package/dist/CodeBlock-B3wvMejv.js +0 -34
- package/dist/Dropdown-CR_XxNak.js +0 -185
- package/dist/Menu-D2kf7fN_.js +0 -72
- package/dist/PageHead-BfClTLrF.js +0 -31
- package/dist/Section-PprWjOvt.js +0 -47
- package/dist/TabSections-Dppe9wiz.js +0 -84
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import n, { useRef as A, useEffect as K } from "react";
|
|
2
|
-
import { c as u } from "./cx-CcykAxZN.js";
|
|
3
|
-
import { P as T } from "./Popover-xEZoMY-h.js";
|
|
4
|
-
import { h as W } from "./rovingKeys-Di9N1Nct.js";
|
|
5
|
-
import { u as G } from "./Toolbar-Bl9-5Mis.js";
|
|
6
|
-
import { u as H } from "./useControllableValue-BaE0VR5d.js";
|
|
7
|
-
import { C as S } from "./CheckIcon-FdB8fMEF.js";
|
|
8
|
-
import './Dropdown.css';const $ = "ldr", J = "lda", Q = "ldt", U = "ldc", X = "ldp", Y = "ldh", Z = "ldg", _ = "ldd", V = "ldi", ee = "ldn", ne = "ldm", te = "ldk", le = "ldl", ae = "ldu", ce = "ldb", oe = "ldo", re = "ldf", se = "ldx", ue = "ldy", de = "ldv", ie = "lde", fe = "lds", l = {
|
|
9
|
-
root: $,
|
|
10
|
-
anchor: J,
|
|
11
|
-
trigger: Q,
|
|
12
|
-
chevron: U,
|
|
13
|
-
panel: X,
|
|
14
|
-
heading: Y,
|
|
15
|
-
group: Z,
|
|
16
|
-
divider: _,
|
|
17
|
-
item: V,
|
|
18
|
-
none: ee,
|
|
19
|
-
more: ne,
|
|
20
|
-
kcheck: te,
|
|
21
|
-
label: le,
|
|
22
|
-
ushort: ae,
|
|
23
|
-
bead: ce,
|
|
24
|
-
online: oe,
|
|
25
|
-
foff: re,
|
|
26
|
-
xbox: se,
|
|
27
|
-
yes: ue,
|
|
28
|
-
vtick: de,
|
|
29
|
-
elevated: ie,
|
|
30
|
-
surface: fe
|
|
31
|
-
};
|
|
32
|
-
function he() {
|
|
33
|
-
return /* @__PURE__ */ n.createElement("svg", { className: l.chevron, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ n.createElement(
|
|
34
|
-
"path",
|
|
35
|
-
{
|
|
36
|
-
d: "M2.5 4.5 6 8l3.5-3.5",
|
|
37
|
-
fill: "none",
|
|
38
|
-
stroke: "currentColor",
|
|
39
|
-
strokeWidth: "1.5",
|
|
40
|
-
strokeLinecap: "round",
|
|
41
|
-
strokeLinejoin: "round"
|
|
42
|
-
}
|
|
43
|
-
));
|
|
44
|
-
}
|
|
45
|
-
function me() {
|
|
46
|
-
return /* @__PURE__ */ n.createElement("svg", { className: l.more, viewBox: "0 0 12 12", "aria-hidden": !0 }, /* @__PURE__ */ n.createElement(
|
|
47
|
-
"path",
|
|
48
|
-
{
|
|
49
|
-
d: "M4.5 2.5 8 6l-3.5 3.5",
|
|
50
|
-
fill: "none",
|
|
51
|
-
stroke: "currentColor",
|
|
52
|
-
strokeWidth: "1.5",
|
|
53
|
-
strokeLinecap: "round",
|
|
54
|
-
strokeLinejoin: "round"
|
|
55
|
-
}
|
|
56
|
-
));
|
|
57
|
-
}
|
|
58
|
-
function ke({ item: a }) {
|
|
59
|
-
return a.checkbox ? /* @__PURE__ */ n.createElement("span", { className: u(l.xbox, a.checked && l.yes), "aria-hidden": !0 }, a.checked ? /* @__PURE__ */ n.createElement(S, { className: l.vtick }) : null) : a.checked ? /* @__PURE__ */ n.createElement("span", { className: l.kcheck, "aria-hidden": !0 }, /* @__PURE__ */ n.createElement(S, { className: l.vtick })) : a.status != null ? /* @__PURE__ */ n.createElement(
|
|
60
|
-
"span",
|
|
61
|
-
{
|
|
62
|
-
className: u(l.bead, a.status === "online" ? l.online : l.foff),
|
|
63
|
-
"aria-hidden": !0
|
|
64
|
-
}
|
|
65
|
-
) : a.icon != null ? /* @__PURE__ */ n.createElement("span", { className: l.none }, a.icon) : null;
|
|
66
|
-
}
|
|
67
|
-
function ve(a, o, c) {
|
|
68
|
-
return o != null && o.length > 0 ? c != null && o[0] && o[0].title == null ? [{ ...o[0], title: c }, ...o.slice(1)] : o : a != null && a.length > 0 ? [{ title: c, items: a }] : c != null ? [{ title: c, items: [] }] : [];
|
|
69
|
-
}
|
|
70
|
-
function Se({
|
|
71
|
-
items: a,
|
|
72
|
-
groups: o,
|
|
73
|
-
trigger: c,
|
|
74
|
-
label: d,
|
|
75
|
-
hideChevron: g = !1,
|
|
76
|
-
title: L,
|
|
77
|
-
align: E = "end",
|
|
78
|
-
placement: R = "auto",
|
|
79
|
-
open: w,
|
|
80
|
-
defaultOpen: z = !1,
|
|
81
|
-
onOpenChange: D,
|
|
82
|
-
closeOnSelect: M = !0,
|
|
83
|
-
disabled: i = !1,
|
|
84
|
-
size: O,
|
|
85
|
-
tone: N = "default",
|
|
86
|
-
onValueChange: f,
|
|
87
|
-
className: P
|
|
88
|
-
}) {
|
|
89
|
-
const h = G(), B = O ?? (h == null ? void 0 : h.size), [m = !1, x] = H(
|
|
90
|
-
w,
|
|
91
|
-
z,
|
|
92
|
-
D
|
|
93
|
-
), y = ve(a, o, L), k = A(null), v = y.flatMap((e) => e.items).filter((e) => !e.disabled).map((e) => e.value), [C, p] = n.useState(v[0] ?? ""), b = N === "account";
|
|
94
|
-
K(() => {
|
|
95
|
-
if (!m) return;
|
|
96
|
-
const e = v[0];
|
|
97
|
-
e && (p(e), requestAnimationFrame(() => {
|
|
98
|
-
var t;
|
|
99
|
-
const r = (t = k.current) == null ? void 0 : t.querySelector(
|
|
100
|
-
`[data-value="${typeof CSS < "u" && CSS.escape ? CSS.escape(e) : e.replace(/"/g, '\\"')}"]`
|
|
101
|
-
);
|
|
102
|
-
r instanceof HTMLElement && r.focus();
|
|
103
|
-
}));
|
|
104
|
-
}, [m]);
|
|
105
|
-
const F = (e) => {
|
|
106
|
-
var t;
|
|
107
|
-
if (e.disabled) return;
|
|
108
|
-
(t = e.onClick) == null || t.call(e), f == null || f(e.value, e), e.checkbox || e.submenu || !M || x(!1);
|
|
109
|
-
};
|
|
110
|
-
return /* @__PURE__ */ n.createElement(
|
|
111
|
-
T,
|
|
112
|
-
{
|
|
113
|
-
className: u(l.root, P),
|
|
114
|
-
open: m,
|
|
115
|
-
onOpenChange: (e) => {
|
|
116
|
-
i || x(e);
|
|
117
|
-
},
|
|
118
|
-
align: E,
|
|
119
|
-
placement: R,
|
|
120
|
-
label: typeof d == "string" ? d : void 0,
|
|
121
|
-
disabled: i,
|
|
122
|
-
role: "menu",
|
|
123
|
-
panelClassName: b ? l.elevated : void 0,
|
|
124
|
-
fitContent: b,
|
|
125
|
-
trigger: (e) => typeof c == "function" ? c(e) : c != null ? /* @__PURE__ */ n.createElement("span", { className: l.anchor, ...e.anchorProps }, c) : /* @__PURE__ */ n.createElement(
|
|
126
|
-
"button",
|
|
127
|
-
{
|
|
128
|
-
type: "button",
|
|
129
|
-
className: l.trigger,
|
|
130
|
-
"data-size": B,
|
|
131
|
-
"data-open": e.open ? "true" : void 0,
|
|
132
|
-
disabled: i,
|
|
133
|
-
...e.anchorProps
|
|
134
|
-
},
|
|
135
|
-
d,
|
|
136
|
-
g ? null : /* @__PURE__ */ n.createElement(he, null)
|
|
137
|
-
)
|
|
138
|
-
},
|
|
139
|
-
/* @__PURE__ */ n.createElement(
|
|
140
|
-
"div",
|
|
141
|
-
{
|
|
142
|
-
ref: k,
|
|
143
|
-
className: u(l.panel, b && l.surface),
|
|
144
|
-
"data-align": E,
|
|
145
|
-
"data-tone": N,
|
|
146
|
-
onKeyDown: (e) => W(e, {
|
|
147
|
-
values: v,
|
|
148
|
-
value: C,
|
|
149
|
-
vertical: !0,
|
|
150
|
-
focusRoot: k.current,
|
|
151
|
-
onSelect: p
|
|
152
|
-
})
|
|
153
|
-
},
|
|
154
|
-
y.map((e, r) => /* @__PURE__ */ n.createElement(n.Fragment, { key: e.value ?? e.title ?? r }, r > 0 ? /* @__PURE__ */ n.createElement("hr", { className: l.divider }) : null, /* @__PURE__ */ n.createElement("div", { className: l.group, role: "group" }, e.title != null ? /* @__PURE__ */ n.createElement("p", { className: l.heading }, e.title) : null, e.items.map((t) => {
|
|
155
|
-
const I = e.items.some(
|
|
156
|
-
(s) => s.checked || s.checkbox || s.status != null || s.icon != null
|
|
157
|
-
), j = /* @__PURE__ */ n.createElement(ke, { item: t }), q = t.checkbox === !0 || t.checked != null;
|
|
158
|
-
return /* @__PURE__ */ n.createElement(
|
|
159
|
-
"button",
|
|
160
|
-
{
|
|
161
|
-
key: t.value,
|
|
162
|
-
type: "button",
|
|
163
|
-
role: t.checkbox ? "menuitemcheckbox" : "menuitem",
|
|
164
|
-
className: l.item,
|
|
165
|
-
"data-value": t.value,
|
|
166
|
-
"data-checked": (t.checked || t.checkbox) && t.checked ? "true" : void 0,
|
|
167
|
-
"data-danger": t.danger ? "true" : void 0,
|
|
168
|
-
tabIndex: t.value === C ? 0 : -1,
|
|
169
|
-
disabled: t.disabled,
|
|
170
|
-
"aria-checked": q ? !!t.checked : void 0,
|
|
171
|
-
onClick: () => F(t),
|
|
172
|
-
onFocus: () => p(t.value)
|
|
173
|
-
},
|
|
174
|
-
I ? j ?? /* @__PURE__ */ n.createElement("span", { className: l.none, "aria-hidden": !0 }) : null,
|
|
175
|
-
t.label != null ? /* @__PURE__ */ n.createElement("span", { className: l.label }, t.label) : null,
|
|
176
|
-
t.shortcut != null ? /* @__PURE__ */ n.createElement("span", { className: l.ushort }, t.shortcut) : null,
|
|
177
|
-
t.submenu ? /* @__PURE__ */ n.createElement(me, null) : null
|
|
178
|
-
);
|
|
179
|
-
}))))
|
|
180
|
-
)
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
export {
|
|
184
|
-
Se as D
|
|
185
|
-
};
|
package/dist/Menu-D2kf7fN_.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import l from "react";
|
|
2
|
-
import { B as E } from "./Badge-BjScAXGy.js";
|
|
3
|
-
import { b as N } from "./badgeText-CRzlIzi3.js";
|
|
4
|
-
import { c as p } from "./cx-CcykAxZN.js";
|
|
5
|
-
import { h } from "./rovingKeys-Di9N1Nct.js";
|
|
6
|
-
import { u as w } from "./useControllableValue-BaE0VR5d.js";
|
|
7
|
-
import './Menu.css';const B = "lnr", C = "lnv", K = "lni", M = "lnd", z = "lna", D = "lnu", n = {
|
|
8
|
-
root: B,
|
|
9
|
-
vertical: C,
|
|
10
|
-
item: K,
|
|
11
|
-
dot: M,
|
|
12
|
-
active: z,
|
|
13
|
-
underline: D
|
|
14
|
-
};
|
|
15
|
-
function F({
|
|
16
|
-
items: o,
|
|
17
|
-
vertical: c,
|
|
18
|
-
variant: m = "plain",
|
|
19
|
-
value: r,
|
|
20
|
-
defaultValue: s,
|
|
21
|
-
onValueChange: u,
|
|
22
|
-
children: g,
|
|
23
|
-
className: R,
|
|
24
|
-
...x
|
|
25
|
-
}) {
|
|
26
|
-
const [t, v] = w(
|
|
27
|
-
r,
|
|
28
|
-
s,
|
|
29
|
-
u
|
|
30
|
-
), y = (o ?? []).filter((e) => !e.disabled).map((e) => e.value), k = m === "line", d = l.useRef(null), i = u || r !== void 0 || s !== void 0;
|
|
31
|
-
return /* @__PURE__ */ l.createElement(
|
|
32
|
-
"nav",
|
|
33
|
-
{
|
|
34
|
-
ref: d,
|
|
35
|
-
className: p(n.root, c && n.vertical, k && n.underline, R),
|
|
36
|
-
onKeyDown: i ? (e) => h(e, {
|
|
37
|
-
values: y,
|
|
38
|
-
value: t,
|
|
39
|
-
onSelect: v,
|
|
40
|
-
vertical: c,
|
|
41
|
-
focusRoot: d.current
|
|
42
|
-
}) : void 0,
|
|
43
|
-
...x
|
|
44
|
-
},
|
|
45
|
-
o == null ? void 0 : o.map((e) => {
|
|
46
|
-
const a = e.active ?? (t != null && e.value === t), b = N(e.badge);
|
|
47
|
-
return /* @__PURE__ */ l.createElement(
|
|
48
|
-
"button",
|
|
49
|
-
{
|
|
50
|
-
key: e.value,
|
|
51
|
-
type: "button",
|
|
52
|
-
className: p(n.item, a && n.active),
|
|
53
|
-
"data-value": e.value,
|
|
54
|
-
"data-active": a ? "true" : void 0,
|
|
55
|
-
"aria-current": a ? "page" : void 0,
|
|
56
|
-
tabIndex: i ? a ? 0 : -1 : void 0,
|
|
57
|
-
disabled: e.disabled,
|
|
58
|
-
onClick: () => {
|
|
59
|
-
var f;
|
|
60
|
-
(f = e.onClick) == null || f.call(e), v(e.value);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
e.label,
|
|
64
|
-
b != null ? /* @__PURE__ */ l.createElement(E, { className: n.dot, tone: "accent", size: "s" }, b) : null
|
|
65
|
-
);
|
|
66
|
-
}),
|
|
67
|
-
g
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
F as M
|
|
72
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import { c as m } from "./cx-CcykAxZN.js";
|
|
3
|
-
import './PageHead.css';const d = "sdr", i = "sdk", u = "sdw", f = "sdt", p = "sdh", E = "sdn", N = "sdu", h = "sds", v = "sda", w = "sdc", e = {
|
|
4
|
-
root: d,
|
|
5
|
-
kept: i,
|
|
6
|
-
wrap: u,
|
|
7
|
-
textcol: f,
|
|
8
|
-
heading: p,
|
|
9
|
-
name: E,
|
|
10
|
-
usup: N,
|
|
11
|
-
subtitle: h,
|
|
12
|
-
actions: v,
|
|
13
|
-
children: w
|
|
14
|
-
};
|
|
15
|
-
function x(n) {
|
|
16
|
-
return !(n == null || n === !1 || n === "" || typeof n == "number" && n === 0 || n === "0");
|
|
17
|
-
}
|
|
18
|
-
function b({
|
|
19
|
-
title: n,
|
|
20
|
-
sup: s,
|
|
21
|
-
subtitle: a,
|
|
22
|
-
actions: l,
|
|
23
|
-
sticky: r,
|
|
24
|
-
className: o,
|
|
25
|
-
children: c
|
|
26
|
-
}) {
|
|
27
|
-
return /* @__PURE__ */ t.createElement("div", { className: m(e.root, r && e.kept, o) }, /* @__PURE__ */ t.createElement("div", { className: e.wrap }, /* @__PURE__ */ t.createElement("div", { className: e.textcol }, /* @__PURE__ */ t.createElement("h1", { className: e.heading }, /* @__PURE__ */ t.createElement("span", { className: e.name }, n), x(s) ? /* @__PURE__ */ t.createElement("span", { className: e.usup }, s) : null), a != null ? /* @__PURE__ */ t.createElement("p", { className: e.subtitle }, a) : null), l != null ? /* @__PURE__ */ t.createElement("div", { className: e.actions }, l) : null), c != null ? /* @__PURE__ */ t.createElement("div", { className: e.children }, c) : null);
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
b as P
|
|
31
|
-
};
|
package/dist/Section-PprWjOvt.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import { c as l } from "./cx-CcykAxZN.js";
|
|
3
|
-
import { S as v } from "./Stack-BPTehVYc.js";
|
|
4
|
-
import './Section.css';const w = "sep", y = "seu", A = "sek", T = "seh", z = "sec", B = "sei", F = "set", H = "sed", R = "see", j = "seb", q = "ses", C = "sel", e = {
|
|
5
|
-
page: w,
|
|
6
|
-
uwrap: y,
|
|
7
|
-
kcard: A,
|
|
8
|
-
header: T,
|
|
9
|
-
center: z,
|
|
10
|
-
icon: B,
|
|
11
|
-
title: F,
|
|
12
|
-
demi: H,
|
|
13
|
-
excerpt: R,
|
|
14
|
-
body: j,
|
|
15
|
-
slot: q,
|
|
16
|
-
line: C
|
|
17
|
-
};
|
|
18
|
-
function J({
|
|
19
|
-
title: n,
|
|
20
|
-
description: s,
|
|
21
|
-
icon: c,
|
|
22
|
-
children: r,
|
|
23
|
-
actions: o,
|
|
24
|
-
variant: m = "page",
|
|
25
|
-
align: g,
|
|
26
|
-
titleSize: E = "lg",
|
|
27
|
-
direction: h = "column",
|
|
28
|
-
gap: N,
|
|
29
|
-
columns: k,
|
|
30
|
-
className: u,
|
|
31
|
-
as: b
|
|
32
|
-
}) {
|
|
33
|
-
const d = m === "auth", a = m === "block", f = g ?? (d ? "center" : "start"), i = b ?? "section", x = a ? "h2" : "h1", S = E ?? (a ? "md" : "lg"), p = /* @__PURE__ */ t.createElement(t.Fragment, null, (c != null || n != null || s != null) && /* @__PURE__ */ t.createElement("header", { className: l(e.header, f === "center" && e.center) }, c != null ? /* @__PURE__ */ t.createElement("div", { className: e.icon }, c) : null, n != null ? /* @__PURE__ */ t.createElement(x, { className: l(e.title, S === "md" && e.demi) }, n) : null, s != null ? /* @__PURE__ */ t.createElement("p", { className: e.excerpt }, s) : null), r != null ? /* @__PURE__ */ t.createElement(
|
|
34
|
-
v,
|
|
35
|
-
{
|
|
36
|
-
className: e.body,
|
|
37
|
-
direction: h,
|
|
38
|
-
gap: N,
|
|
39
|
-
columns: k
|
|
40
|
-
},
|
|
41
|
-
r
|
|
42
|
-
) : null, o != null ? /* @__PURE__ */ t.createElement("div", { className: e.slot }, o) : null);
|
|
43
|
-
return d ? /* @__PURE__ */ t.createElement("div", { className: l(e.uwrap, u) }, /* @__PURE__ */ t.createElement(i, { className: e.kcard }, p)) : /* @__PURE__ */ t.createElement(i, { className: l(a ? e.line : e.page, u) }, p);
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
J as S
|
|
47
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import a, { useMemo as k, useId as x, useRef as C, Suspense as K } from "react";
|
|
2
|
-
import { c as p } from "./cx-CcykAxZN.js";
|
|
3
|
-
import { h as S } from "./rovingKeys-Di9N1Nct.js";
|
|
4
|
-
import { u as T } from "./useControllableValue-BaE0VR5d.js";
|
|
5
|
-
import './TabSections.css';const w = "ntr", D = "ntb", M = "ntn", P = "ntt", h = "nta", j = "nte", q = "nts", z = "ntm", l = {
|
|
6
|
-
root: w,
|
|
7
|
-
bar: D,
|
|
8
|
-
nav: M,
|
|
9
|
-
tab: P,
|
|
10
|
-
active: h,
|
|
11
|
-
ember: j,
|
|
12
|
-
slot: q,
|
|
13
|
-
main: z
|
|
14
|
-
};
|
|
15
|
-
function H({
|
|
16
|
-
items: s = [],
|
|
17
|
-
resolveSection: b,
|
|
18
|
-
children: o,
|
|
19
|
-
value: f,
|
|
20
|
-
defaultValue: c,
|
|
21
|
-
onValueChange: E,
|
|
22
|
-
loading: N = null,
|
|
23
|
-
actions: u,
|
|
24
|
-
className: y,
|
|
25
|
-
navLabel: I = "Вкладки"
|
|
26
|
-
}) {
|
|
27
|
-
const R = k(() => {
|
|
28
|
-
var e;
|
|
29
|
-
return c || (((e = s.find((n) => !n.disabled)) == null ? void 0 : e.value) ?? "");
|
|
30
|
-
}, [c, s]), [t, d] = T(
|
|
31
|
-
f,
|
|
32
|
-
R,
|
|
33
|
-
E
|
|
34
|
-
), $ = s.filter((e) => !e.disabled).map((e) => e.value), r = x(), v = C(null), m = `${r}-panel`, i = o == null && t && b ? b(t) : null;
|
|
35
|
-
return /* @__PURE__ */ a.createElement("div", { className: p(l.root, y) }, /* @__PURE__ */ a.createElement("div", { className: l.bar }, /* @__PURE__ */ a.createElement(
|
|
36
|
-
"nav",
|
|
37
|
-
{
|
|
38
|
-
ref: v,
|
|
39
|
-
className: l.nav,
|
|
40
|
-
"aria-label": I,
|
|
41
|
-
role: "tablist",
|
|
42
|
-
onKeyDown: (e) => S(e, {
|
|
43
|
-
values: $,
|
|
44
|
-
value: t,
|
|
45
|
-
onSelect: d,
|
|
46
|
-
focusRoot: v.current
|
|
47
|
-
})
|
|
48
|
-
},
|
|
49
|
-
s.map((e) => {
|
|
50
|
-
const n = e.value === t, g = `${r}-tab-${e.value}`;
|
|
51
|
-
return /* @__PURE__ */ a.createElement(
|
|
52
|
-
"button",
|
|
53
|
-
{
|
|
54
|
-
key: e.value,
|
|
55
|
-
id: g,
|
|
56
|
-
type: "button",
|
|
57
|
-
role: "tab",
|
|
58
|
-
className: p(l.tab, n && l.active),
|
|
59
|
-
"data-value": e.value,
|
|
60
|
-
"data-active": n ? "true" : void 0,
|
|
61
|
-
"aria-selected": n,
|
|
62
|
-
"aria-controls": m,
|
|
63
|
-
tabIndex: n ? 0 : -1,
|
|
64
|
-
disabled: e.disabled,
|
|
65
|
-
onClick: () => d(e.value)
|
|
66
|
-
},
|
|
67
|
-
/* @__PURE__ */ a.createElement("span", null, e.label),
|
|
68
|
-
e.badge != null && e.badge !== "" ? /* @__PURE__ */ a.createElement("em", { className: l.ember }, e.badge) : null
|
|
69
|
-
);
|
|
70
|
-
})
|
|
71
|
-
), u != null ? /* @__PURE__ */ a.createElement("div", { className: l.slot }, u) : null), /* @__PURE__ */ a.createElement(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
id: m,
|
|
75
|
-
className: l.main,
|
|
76
|
-
role: "tabpanel",
|
|
77
|
-
"aria-labelledby": t ? `${r}-tab-${t}` : void 0
|
|
78
|
-
},
|
|
79
|
-
o ?? (i ? /* @__PURE__ */ a.createElement(K, { fallback: N }, a.createElement(i)) : null)
|
|
80
|
-
));
|
|
81
|
-
}
|
|
82
|
-
export {
|
|
83
|
-
H as T
|
|
84
|
-
};
|