@koide-labs/ui 0.1.0 → 0.1.2
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/accordion.css +1 -1
- package/dist/alert-dialog.css +1 -1
- package/dist/anchor.css +1 -1
- package/dist/avatar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/button.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/code.css +1 -1
- package/dist/collapse.css +1 -1
- package/dist/command.css +1 -1
- package/dist/components/accordion/accordion.js +40 -40
- package/dist/components/alert-dialog/alert-dialog.js +9 -9
- package/dist/components/anchor/anchor.js +5 -5
- package/dist/components/avatar/avatar.js +26 -26
- package/dist/components/badge/badge.js +13 -13
- package/dist/components/button/button.js +13 -13
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/code/code.js +48 -48
- package/dist/components/collapse/collapse.js +14 -14
- package/dist/components/command/command.js +121 -121
- package/dist/components/context-menu/context-menu.js +6 -6
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/heading/heading.js +6 -6
- package/dist/components/icon/icon.js +12 -12
- package/dist/components/icon-button/icon-button.js +26 -26
- package/dist/components/inline-code/inline-code.js +2 -2
- package/dist/components/input/input.js +1 -1
- package/dist/components/meter/meter.js +40 -40
- package/dist/components/multiline-input/multiline-input.js +1 -1
- package/dist/components/number-input/number-input.js +7 -7
- package/dist/components/password-input/password-input.js +2 -2
- package/dist/components/pill/pill.js +11 -11
- package/dist/components/popover/popover.js +21 -21
- package/dist/components/preview-card/preview-card.js +2 -2
- package/dist/components/radio-group/radio-group.js +54 -54
- package/dist/components/search-bar/search-bar.js +8 -8
- package/dist/components/select/select.js +75 -75
- package/dist/components/separator/index.js +1 -1
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/slider/slider.js +128 -128
- package/dist/components/spinner/spinner.js +4 -4
- package/dist/components/stacked-avatars/stacked-avatars.js +35 -35
- package/dist/components/status-banner/status-banner.js +22 -22
- package/dist/components/surface/surface.js +14 -14
- package/dist/components/switch/switch.js +28 -28
- package/dist/components/tabs/tabs.js +132 -132
- package/dist/components/text/text.js +15 -15
- package/dist/components/timestamp/timestamp.js +73 -73
- package/dist/components/toaster/toaster.js +165 -165
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/view/view.js +40 -40
- package/dist/context-menu.css +1 -1
- package/dist/dialog.css +1 -1
- package/dist/{dialog.module-DsbQRp-d.js → dialog.module-Pi1eHwli.js} +13 -13
- package/dist/heading.css +1 -1
- package/dist/icon-button.css +1 -1
- package/dist/icon.css +1 -1
- package/dist/index.js +2 -2
- package/dist/inline-code.css +1 -1
- package/dist/input.css +1 -1
- package/dist/input.module-zw1dlr1_.js +8 -0
- package/dist/integrations/react-markdown/index.js +1 -1
- package/dist/meter.css +1 -1
- package/dist/number-input.css +1 -1
- package/dist/password-input.css +1 -1
- package/dist/pill.css +1 -1
- package/dist/popover.css +1 -1
- package/dist/preview-card.css +1 -1
- package/dist/radio-group.css +1 -1
- package/dist/search-bar.css +1 -1
- package/dist/select.css +1 -1
- package/dist/{separator-fh_wDZNf.js → separator-wNYojB9q.js} +8 -8
- package/dist/separator.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/spinner.css +1 -1
- package/dist/stacked-avatars.css +1 -1
- package/dist/status-banner.css +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/surface.css +1 -1
- package/dist/switch.css +1 -1
- package/dist/tabs.css +1 -1
- package/dist/text.css +1 -1
- package/dist/timestamp.css +1 -1
- package/dist/toaster.css +1 -1
- package/dist/{tooltip-oCp-elli.js → tooltip-DZkByWDR.js} +63 -63
- package/dist/tooltip.css +1 -1
- package/dist/view.css +1 -1
- package/dist/view.module-DlwuNdUj.js +6 -0
- package/dist/view2.css +1 -1
- package/package.json +1 -1
- package/dist/input.module-CtE19OH8.js +0 -8
- package/dist/view.module-Dj7wj0kk.js +0 -6
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as g, jsxs as j } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as k } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { Fragment as rt } from "react";
|
|
5
5
|
import { tokens as it } from "../../styles/tokens.js";
|
|
6
6
|
import { View as U } from "../view/view.js";
|
|
7
7
|
import { Button as ut } from "../button/button.js";
|
|
8
8
|
import { Icon as ct } from "../icon/icon.js";
|
|
9
|
-
import { S as lt } from "../../separator-
|
|
9
|
+
import { S as lt } from "../../separator-wNYojB9q.js";
|
|
10
10
|
import { u as dt } from "../../useControlled-Du4sJyMj.js";
|
|
11
11
|
import { u as F } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
|
|
12
|
-
import { u as
|
|
12
|
+
import { u as z } from "../../useStableCallback-DKZHlUAT.js";
|
|
13
13
|
import { u as $, b as ft } from "../../useRenderElement-DngNDu_P.js";
|
|
14
14
|
import { C as bt, u as pt } from "../../useCompositeListItem-CZp9WTnF.js";
|
|
15
15
|
import { u as mt } from "../../DirectionContext-C2o_MF_i.js";
|
|
@@ -18,8 +18,8 @@ import { u as et } from "../../useBaseUiId-B7WyxtIE.js";
|
|
|
18
18
|
import { u as _t, A as gt, C as vt } from "../../CompositeRoot-CCgh2M64.js";
|
|
19
19
|
import { o as J } from "../../owner-rKN292Q9.js";
|
|
20
20
|
import { c as Q, n as X } from "../../createBaseUIEventDetails-CCSfZ2vM.js";
|
|
21
|
-
import { u as
|
|
22
|
-
import { d as
|
|
21
|
+
import { u as Tt } from "../../useButton-d3_JgBNr.js";
|
|
22
|
+
import { d as ht, f as xt } from "../../element-u5WgOZX1.js";
|
|
23
23
|
import '../../tabs.css';const K = /* @__PURE__ */ n.createContext(void 0);
|
|
24
24
|
process.env.NODE_ENV !== "production" && (K.displayName = "TabsRootContext");
|
|
25
25
|
function Y() {
|
|
@@ -28,12 +28,12 @@ function Y() {
|
|
|
28
28
|
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>." : tt(64));
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
|
-
let
|
|
31
|
+
let Ct = /* @__PURE__ */ (function(t) {
|
|
32
32
|
return t.activationDirection = "data-activation-direction", t.orientation = "data-orientation", t;
|
|
33
33
|
})({});
|
|
34
34
|
const W = {
|
|
35
35
|
tabActivationDirection: (t) => ({
|
|
36
|
-
[
|
|
36
|
+
[Ct.activationDirection]: t
|
|
37
37
|
})
|
|
38
38
|
}, nt = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
39
39
|
const {
|
|
@@ -44,51 +44,51 @@ const W = {
|
|
|
44
44
|
render: _,
|
|
45
45
|
value: b,
|
|
46
46
|
...v
|
|
47
|
-
} = o,
|
|
47
|
+
} = o, T = mt(), C = Object.hasOwn(o, "defaultValue"), R = n.useRef([]), [M, l] = n.useState(() => /* @__PURE__ */ new Map()), [d, h] = dt({
|
|
48
48
|
controlled: b,
|
|
49
49
|
default: e,
|
|
50
50
|
name: "Tabs",
|
|
51
51
|
state: "value"
|
|
52
|
-
}), N = b !== void 0, [i,
|
|
53
|
-
c?.(s, m), !m.isCanceled && (
|
|
54
|
-
}), p =
|
|
52
|
+
}), N = b !== void 0, [i, w] = n.useState(() => /* @__PURE__ */ new Map()), [P, D] = n.useState("none"), E = z((s, m) => {
|
|
53
|
+
c?.(s, m), !m.isCanceled && (h(s), D(m.activationDirection));
|
|
54
|
+
}), p = z((s, m) => {
|
|
55
55
|
l((r) => {
|
|
56
56
|
if (r.get(s) === m)
|
|
57
57
|
return r;
|
|
58
|
-
const
|
|
59
|
-
return
|
|
58
|
+
const x = new Map(r);
|
|
59
|
+
return x.set(s, m), x;
|
|
60
60
|
});
|
|
61
|
-
}),
|
|
61
|
+
}), I = z((s, m) => {
|
|
62
62
|
l((r) => {
|
|
63
63
|
if (!r.has(s) || r.get(s) !== m)
|
|
64
64
|
return r;
|
|
65
|
-
const
|
|
66
|
-
return
|
|
65
|
+
const x = new Map(r);
|
|
66
|
+
return x.delete(s), x;
|
|
67
67
|
});
|
|
68
|
-
}),
|
|
68
|
+
}), S = n.useCallback((s) => M.get(s), [M]), B = n.useCallback((s) => {
|
|
69
69
|
for (const m of i.values())
|
|
70
70
|
if (s === m?.value)
|
|
71
71
|
return m?.id;
|
|
72
|
-
}, [i]),
|
|
72
|
+
}, [i]), O = n.useCallback((s) => {
|
|
73
73
|
if (s === void 0)
|
|
74
74
|
return null;
|
|
75
75
|
for (const [m, r] of i.entries())
|
|
76
76
|
if (r != null && s === (r.value ?? r.index))
|
|
77
77
|
return m;
|
|
78
78
|
return null;
|
|
79
|
-
}, [i]),
|
|
80
|
-
direction:
|
|
81
|
-
getTabElementBySelectedValue:
|
|
82
|
-
getTabIdByPanelValue:
|
|
83
|
-
getTabPanelIdByValue:
|
|
84
|
-
onValueChange:
|
|
79
|
+
}, [i]), V = n.useMemo(() => ({
|
|
80
|
+
direction: T,
|
|
81
|
+
getTabElementBySelectedValue: O,
|
|
82
|
+
getTabIdByPanelValue: B,
|
|
83
|
+
getTabPanelIdByValue: S,
|
|
84
|
+
onValueChange: E,
|
|
85
85
|
orientation: a,
|
|
86
86
|
registerMountedTabPanel: p,
|
|
87
|
-
setTabMap:
|
|
88
|
-
unregisterMountedTabPanel:
|
|
89
|
-
tabActivationDirection:
|
|
87
|
+
setTabMap: w,
|
|
88
|
+
unregisterMountedTabPanel: I,
|
|
89
|
+
tabActivationDirection: P,
|
|
90
90
|
value: d
|
|
91
|
-
}), [
|
|
91
|
+
}), [T, O, B, S, E, a, p, w, I, P, d]), A = n.useMemo(() => {
|
|
92
92
|
for (const s of i.values())
|
|
93
93
|
if (s != null && s.value === d)
|
|
94
94
|
return s;
|
|
@@ -100,23 +100,23 @@ const W = {
|
|
|
100
100
|
F(() => {
|
|
101
101
|
if (N || i.size === 0)
|
|
102
102
|
return;
|
|
103
|
-
const s =
|
|
104
|
-
if (
|
|
103
|
+
const s = A?.disabled, m = A == null && d !== null;
|
|
104
|
+
if (C && s && d === e || !s && !m)
|
|
105
105
|
return;
|
|
106
|
-
const
|
|
107
|
-
d !==
|
|
108
|
-
}, [e, L,
|
|
106
|
+
const x = L ?? null;
|
|
107
|
+
d !== x && (h(x), D("none"));
|
|
108
|
+
}, [e, L, C, N, A, D, h, i, d]);
|
|
109
109
|
const H = $("div", o, {
|
|
110
110
|
state: {
|
|
111
111
|
orientation: a,
|
|
112
|
-
tabActivationDirection:
|
|
112
|
+
tabActivationDirection: P
|
|
113
113
|
},
|
|
114
114
|
ref: u,
|
|
115
115
|
props: v,
|
|
116
116
|
stateAttributesMapping: W
|
|
117
117
|
});
|
|
118
118
|
return /* @__PURE__ */ g(K.Provider, {
|
|
119
|
-
value:
|
|
119
|
+
value: V,
|
|
120
120
|
children: /* @__PURE__ */ g(bt, {
|
|
121
121
|
elementsRef: R,
|
|
122
122
|
children: H
|
|
@@ -126,7 +126,7 @@ const W = {
|
|
|
126
126
|
process.env.NODE_ENV !== "production" && (nt.displayName = "TabsRoot");
|
|
127
127
|
const q = /* @__PURE__ */ n.createContext(void 0);
|
|
128
128
|
process.env.NODE_ENV !== "production" && (q.displayName = "TabsListContext");
|
|
129
|
-
function
|
|
129
|
+
function Et() {
|
|
130
130
|
const t = n.useContext(q);
|
|
131
131
|
if (t === void 0)
|
|
132
132
|
throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>." : tt(65));
|
|
@@ -142,70 +142,70 @@ const ot = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
|
142
142
|
nativeButton: b = !0,
|
|
143
143
|
...v
|
|
144
144
|
} = o, {
|
|
145
|
-
value:
|
|
146
|
-
getTabPanelIdByValue:
|
|
145
|
+
value: T,
|
|
146
|
+
getTabPanelIdByValue: C,
|
|
147
147
|
orientation: R
|
|
148
148
|
} = Y(), {
|
|
149
|
-
activateOnFocus:
|
|
149
|
+
activateOnFocus: M,
|
|
150
150
|
highlightedTabIndex: l,
|
|
151
151
|
onTabActivation: d,
|
|
152
|
-
setHighlightedTabIndex:
|
|
152
|
+
setHighlightedTabIndex: h,
|
|
153
153
|
tabsListElement: N
|
|
154
|
-
} =
|
|
154
|
+
} = Et(), i = et(_), w = n.useMemo(() => ({
|
|
155
155
|
disabled: e,
|
|
156
156
|
id: i,
|
|
157
157
|
value: a
|
|
158
158
|
}), [e, i, a]), {
|
|
159
|
-
compositeProps:
|
|
160
|
-
compositeRef:
|
|
161
|
-
index:
|
|
159
|
+
compositeProps: P,
|
|
160
|
+
compositeRef: D,
|
|
161
|
+
index: E
|
|
162
162
|
// hook is used instead of the CompositeItem component
|
|
163
163
|
// because the index is needed for Tab internals
|
|
164
164
|
} = _t({
|
|
165
|
-
metadata:
|
|
166
|
-
}), p = a ===
|
|
165
|
+
metadata: w
|
|
166
|
+
}), p = a === T, I = n.useRef(!1);
|
|
167
167
|
F(() => {
|
|
168
|
-
if (
|
|
169
|
-
|
|
168
|
+
if (I.current) {
|
|
169
|
+
I.current = !1;
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
if (!(p &&
|
|
172
|
+
if (!(p && E > -1 && l !== E))
|
|
173
173
|
return;
|
|
174
174
|
const r = N;
|
|
175
175
|
if (r != null) {
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
176
|
+
const x = ht(J(r));
|
|
177
|
+
if (x && xt(r, x))
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
e ||
|
|
181
|
-
}, [p,
|
|
180
|
+
e || h(E);
|
|
181
|
+
}, [p, E, l, h, e, N]);
|
|
182
182
|
const {
|
|
183
|
-
getButtonProps:
|
|
184
|
-
buttonRef:
|
|
185
|
-
} =
|
|
183
|
+
getButtonProps: S,
|
|
184
|
+
buttonRef: B
|
|
185
|
+
} = Tt({
|
|
186
186
|
disabled: e,
|
|
187
187
|
native: b,
|
|
188
188
|
focusableWhenDisabled: !0
|
|
189
|
-
}),
|
|
189
|
+
}), O = C(a), V = n.useRef(!1), A = n.useRef(!1);
|
|
190
190
|
function L(r) {
|
|
191
191
|
p || e || d(a, Q(X, r.nativeEvent, void 0, {
|
|
192
192
|
activationDirection: "none"
|
|
193
193
|
}));
|
|
194
194
|
}
|
|
195
195
|
function G(r) {
|
|
196
|
-
p || (
|
|
197
|
-
|
|
196
|
+
p || (E > -1 && !e && h(E), !e && M && (!V.current || // keyboard or touch focus
|
|
197
|
+
V.current && A.current) && d(a, Q(X, r.nativeEvent, void 0, {
|
|
198
198
|
activationDirection: "none"
|
|
199
199
|
})));
|
|
200
200
|
}
|
|
201
201
|
function H(r) {
|
|
202
202
|
if (p || e)
|
|
203
203
|
return;
|
|
204
|
-
|
|
205
|
-
function
|
|
206
|
-
|
|
204
|
+
V.current = !0;
|
|
205
|
+
function x() {
|
|
206
|
+
V.current = !1, A.current = !1;
|
|
207
207
|
}
|
|
208
|
-
(!r.button || r.button === 0) && (
|
|
208
|
+
(!r.button || r.button === 0) && (A.current = !0, J(r.currentTarget).addEventListener("pointerup", x, {
|
|
209
209
|
once: !0
|
|
210
210
|
}));
|
|
211
211
|
}
|
|
@@ -216,10 +216,10 @@ const ot = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
|
216
216
|
}), [e, p, R]);
|
|
217
217
|
return $("button", o, {
|
|
218
218
|
state: s,
|
|
219
|
-
ref: [u,
|
|
220
|
-
props: [
|
|
219
|
+
ref: [u, B, D],
|
|
220
|
+
props: [P, {
|
|
221
221
|
role: "tab",
|
|
222
|
-
"aria-controls":
|
|
222
|
+
"aria-controls": O,
|
|
223
223
|
"aria-selected": p,
|
|
224
224
|
id: i,
|
|
225
225
|
onClick: L,
|
|
@@ -227,13 +227,13 @@ const ot = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
|
227
227
|
onPointerDown: H,
|
|
228
228
|
[gt]: p ? "" : void 0,
|
|
229
229
|
onKeyDownCapture() {
|
|
230
|
-
|
|
230
|
+
I.current = !0;
|
|
231
231
|
}
|
|
232
|
-
}, v,
|
|
232
|
+
}, v, S]
|
|
233
233
|
});
|
|
234
234
|
});
|
|
235
235
|
process.env.NODE_ENV !== "production" && (ot.displayName = "TabsTab");
|
|
236
|
-
let
|
|
236
|
+
let Mt = /* @__PURE__ */ (function(t) {
|
|
237
237
|
return t.index = "data-index", t.activationDirection = "data-activation-direction", t.orientation = "data-orientation", t.hidden = "data-hidden", t;
|
|
238
238
|
})({});
|
|
239
239
|
const at = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
@@ -246,41 +246,41 @@ const at = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
|
246
246
|
} = o, {
|
|
247
247
|
value: b,
|
|
248
248
|
getTabIdByPanelValue: v,
|
|
249
|
-
orientation:
|
|
250
|
-
tabActivationDirection:
|
|
249
|
+
orientation: T,
|
|
250
|
+
tabActivationDirection: C,
|
|
251
251
|
registerMountedTabPanel: R,
|
|
252
|
-
unregisterMountedTabPanel:
|
|
252
|
+
unregisterMountedTabPanel: M
|
|
253
253
|
} = Y(), l = et(), d = n.useMemo(() => ({
|
|
254
254
|
id: l,
|
|
255
255
|
value: e
|
|
256
256
|
}), [l, e]), {
|
|
257
|
-
ref:
|
|
257
|
+
ref: h,
|
|
258
258
|
index: N
|
|
259
259
|
} = pt({
|
|
260
260
|
metadata: d
|
|
261
|
-
}), i = e !== b,
|
|
261
|
+
}), i = e !== b, w = v(e), P = n.useMemo(() => ({
|
|
262
262
|
hidden: i,
|
|
263
|
-
orientation:
|
|
264
|
-
tabActivationDirection:
|
|
265
|
-
}), [i,
|
|
266
|
-
state:
|
|
267
|
-
ref: [u,
|
|
263
|
+
orientation: T,
|
|
264
|
+
tabActivationDirection: C
|
|
265
|
+
}), [i, T, C]), D = $("div", o, {
|
|
266
|
+
state: P,
|
|
267
|
+
ref: [u, h],
|
|
268
268
|
props: [{
|
|
269
|
-
"aria-labelledby":
|
|
269
|
+
"aria-labelledby": w,
|
|
270
270
|
hidden: i,
|
|
271
271
|
id: l ?? void 0,
|
|
272
272
|
role: "tabpanel",
|
|
273
273
|
tabIndex: i ? -1 : 0,
|
|
274
|
-
[
|
|
274
|
+
[Mt.index]: N
|
|
275
275
|
}, _],
|
|
276
276
|
stateAttributesMapping: W
|
|
277
277
|
});
|
|
278
278
|
return F(() => {
|
|
279
279
|
if (!(i && !a) && l != null)
|
|
280
280
|
return R(e, l), () => {
|
|
281
|
-
|
|
281
|
+
M(e, l);
|
|
282
282
|
};
|
|
283
|
-
}, [i, a, e, l, R,
|
|
283
|
+
}, [i, a, e, l, R, M]), !i || a ? D : null;
|
|
284
284
|
});
|
|
285
285
|
process.env.NODE_ENV !== "production" && (at.displayName = "TabsPanel");
|
|
286
286
|
const st = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
@@ -293,48 +293,48 @@ const st = /* @__PURE__ */ n.forwardRef(function(o, u) {
|
|
|
293
293
|
} = o, {
|
|
294
294
|
getTabElementBySelectedValue: b,
|
|
295
295
|
onValueChange: v,
|
|
296
|
-
orientation:
|
|
297
|
-
value:
|
|
296
|
+
orientation: T,
|
|
297
|
+
value: C,
|
|
298
298
|
setTabMap: R,
|
|
299
|
-
tabActivationDirection:
|
|
300
|
-
} = Y(), [l, d] = n.useState(0), [
|
|
301
|
-
|
|
299
|
+
tabActivationDirection: M
|
|
300
|
+
} = Y(), [l, d] = n.useState(0), [h, N] = n.useState(null), i = Rt(
|
|
301
|
+
C,
|
|
302
302
|
// the old value
|
|
303
|
-
h,
|
|
304
303
|
T,
|
|
304
|
+
h,
|
|
305
305
|
b
|
|
306
|
-
),
|
|
307
|
-
if (p !==
|
|
308
|
-
const
|
|
309
|
-
|
|
306
|
+
), w = z((p, I) => {
|
|
307
|
+
if (p !== C) {
|
|
308
|
+
const S = i(p);
|
|
309
|
+
I.activationDirection = S, v(p, I);
|
|
310
310
|
}
|
|
311
|
-
}),
|
|
312
|
-
orientation:
|
|
313
|
-
tabActivationDirection:
|
|
314
|
-
}), [
|
|
315
|
-
"aria-orientation":
|
|
311
|
+
}), P = n.useMemo(() => ({
|
|
312
|
+
orientation: T,
|
|
313
|
+
tabActivationDirection: M
|
|
314
|
+
}), [T, M]), D = {
|
|
315
|
+
"aria-orientation": T === "vertical" ? "vertical" : void 0,
|
|
316
316
|
role: "tablist"
|
|
317
|
-
},
|
|
317
|
+
}, E = n.useMemo(() => ({
|
|
318
318
|
activateOnFocus: f,
|
|
319
319
|
highlightedTabIndex: l,
|
|
320
|
-
onTabActivation:
|
|
320
|
+
onTabActivation: w,
|
|
321
321
|
setHighlightedTabIndex: d,
|
|
322
|
-
tabsListElement:
|
|
323
|
-
value:
|
|
324
|
-
}), [f, l,
|
|
322
|
+
tabsListElement: h,
|
|
323
|
+
value: C
|
|
324
|
+
}), [f, l, w, d, h, C]);
|
|
325
325
|
return /* @__PURE__ */ g(q.Provider, {
|
|
326
|
-
value:
|
|
326
|
+
value: E,
|
|
327
327
|
children: /* @__PURE__ */ g(vt, {
|
|
328
328
|
render: a,
|
|
329
329
|
className: e,
|
|
330
|
-
state:
|
|
330
|
+
state: P,
|
|
331
331
|
refs: [u, N],
|
|
332
|
-
props: [
|
|
332
|
+
props: [D, _],
|
|
333
333
|
stateAttributesMapping: W,
|
|
334
334
|
highlightedIndex: l,
|
|
335
335
|
enableHomeAndEndKeys: !0,
|
|
336
336
|
loopFocus: c,
|
|
337
|
-
orientation:
|
|
337
|
+
orientation: T,
|
|
338
338
|
onHighlightedIndexChange: d,
|
|
339
339
|
onMapChange: R,
|
|
340
340
|
disabledIndices: ft
|
|
@@ -402,17 +402,17 @@ function Rt(t, o, u, f) {
|
|
|
402
402
|
return "none";
|
|
403
403
|
}, [f, o, e, u, t]);
|
|
404
404
|
}
|
|
405
|
-
const Nt = "
|
|
405
|
+
const Nt = "_tabs_xww4z_6", wt = "_tabs__list_xww4z_10", Pt = "_tabs_variant_default_xww4z_17", Dt = "_tabs__separator_xww4z_22", It = "_tabs__trigger_xww4z_26", At = "_tabs_variant_progress_xww4z_48", y = {
|
|
406
406
|
tabs: Nt,
|
|
407
|
-
tabs__list:
|
|
408
|
-
tabs_variant_default:
|
|
409
|
-
tabs__separator:
|
|
410
|
-
tabs__trigger:
|
|
411
|
-
tabs_variant_progress:
|
|
412
|
-
"tabs__trigger-complete": "_tabs__trigger-
|
|
413
|
-
"tabs_variant_button-group": "_tabs_variant_button-
|
|
414
|
-
},
|
|
415
|
-
function
|
|
407
|
+
tabs__list: wt,
|
|
408
|
+
tabs_variant_default: Pt,
|
|
409
|
+
tabs__separator: Dt,
|
|
410
|
+
tabs__trigger: It,
|
|
411
|
+
tabs_variant_progress: At,
|
|
412
|
+
"tabs__trigger-complete": "_tabs__trigger-complete_xww4z_72",
|
|
413
|
+
"tabs_variant_button-group": "_tabs_variant_button-group_xww4z_84"
|
|
414
|
+
}, St = /* @__PURE__ */ new Set(["default", "progress"]);
|
|
415
|
+
function Vt({
|
|
416
416
|
variant: t = "default",
|
|
417
417
|
disabled: o = !1,
|
|
418
418
|
tabs: u,
|
|
@@ -426,19 +426,19 @@ function yt({
|
|
|
426
426
|
render: /* @__PURE__ */ g(
|
|
427
427
|
nt,
|
|
428
428
|
{
|
|
429
|
-
className:
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
className: k(
|
|
430
|
+
y.tabs,
|
|
431
|
+
y[`tabs_variant_${t}`],
|
|
432
432
|
f
|
|
433
433
|
),
|
|
434
434
|
...c
|
|
435
435
|
}
|
|
436
436
|
),
|
|
437
437
|
children: [
|
|
438
|
-
/* @__PURE__ */ g(
|
|
439
|
-
/* @__PURE__ */ g(
|
|
440
|
-
_ + 1 < u.length &&
|
|
441
|
-
|
|
438
|
+
/* @__PURE__ */ g(Bt, { children: u.map((a, _) => /* @__PURE__ */ j(rt, { children: [
|
|
439
|
+
/* @__PURE__ */ g(yt, { disabled: o, ...a }),
|
|
440
|
+
_ + 1 < u.length && St.has(t) ? /* @__PURE__ */ g(
|
|
441
|
+
Ot,
|
|
442
442
|
{
|
|
443
443
|
orientation: t === "progress" ? "horizontal" : "vertical"
|
|
444
444
|
}
|
|
@@ -449,7 +449,7 @@ function yt({
|
|
|
449
449
|
}
|
|
450
450
|
);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function yt({
|
|
453
453
|
value: t,
|
|
454
454
|
className: o,
|
|
455
455
|
complete: u,
|
|
@@ -460,7 +460,7 @@ function Bt({
|
|
|
460
460
|
ut,
|
|
461
461
|
{
|
|
462
462
|
interactive: "list-item",
|
|
463
|
-
className:
|
|
463
|
+
className: k(y.tabs__trigger, o),
|
|
464
464
|
render: /* @__PURE__ */ g(ot, { value: t }),
|
|
465
465
|
...e,
|
|
466
466
|
children: [
|
|
@@ -469,7 +469,7 @@ function Bt({
|
|
|
469
469
|
{
|
|
470
470
|
color: it.positiveDefault,
|
|
471
471
|
name: "check-line",
|
|
472
|
-
className:
|
|
472
|
+
className: y["tabs__trigger-complete"]
|
|
473
473
|
}
|
|
474
474
|
) : null,
|
|
475
475
|
f
|
|
@@ -477,25 +477,25 @@ function Bt({
|
|
|
477
477
|
}
|
|
478
478
|
);
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Bt({ className: t, ...o }) {
|
|
481
481
|
return /* @__PURE__ */ g(
|
|
482
482
|
U,
|
|
483
483
|
{
|
|
484
484
|
render: /* @__PURE__ */ g(
|
|
485
485
|
st,
|
|
486
486
|
{
|
|
487
|
-
className:
|
|
487
|
+
className: k(y.tabs__list, t),
|
|
488
488
|
...o
|
|
489
489
|
}
|
|
490
490
|
)
|
|
491
491
|
}
|
|
492
492
|
);
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Ot({ className: t, ...o }) {
|
|
495
495
|
return /* @__PURE__ */ g(
|
|
496
496
|
lt,
|
|
497
497
|
{
|
|
498
|
-
className:
|
|
498
|
+
className: k(y.tabs__separator, t),
|
|
499
499
|
...o
|
|
500
500
|
}
|
|
501
501
|
);
|
|
@@ -503,7 +503,7 @@ function wt({ className: t, ...o }) {
|
|
|
503
503
|
function Lt({ children: t, ...o }) {
|
|
504
504
|
return /* @__PURE__ */ g(at, { ...o, children: /* @__PURE__ */ g(U, { children: t }) });
|
|
505
505
|
}
|
|
506
|
-
const re = Object.assign(
|
|
506
|
+
const re = Object.assign(Vt, {
|
|
507
507
|
Panel: Lt
|
|
508
508
|
});
|
|
509
509
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { c as l } from "../../clsx-OuTLNxxd.js";
|
|
2
|
-
import { s as r } from "../../view.module-
|
|
2
|
+
import { s as r } from "../../view.module-DlwuNdUj.js";
|
|
3
3
|
import { u as i } from "../../useRender-C3vlzS3t.js";
|
|
4
|
-
import { m as
|
|
5
|
-
import '../../text.css';const
|
|
6
|
-
text:
|
|
7
|
-
"text_clip-line": "_text_clip-
|
|
8
|
-
"text_clamp-lines": "_text_clamp-
|
|
9
|
-
text_color_inherit:
|
|
10
|
-
text_color_default:
|
|
11
|
-
text_color_dimmer:
|
|
12
|
-
text_color_dimmest:
|
|
4
|
+
import { m as n } from "../../useRenderElement-DngNDu_P.js";
|
|
5
|
+
import '../../text.css';const m = "_text_6cryn_2", a = "_text_color_inherit_6cryn_26", z = "_text_color_default_6cryn_30", d = "_text_color_dimmer_6cryn_34", y = "_text_color_dimmest_6cryn_38", p = "_text_size_sm_6cryn_43", f = "_text_size_md_6cryn_49", u = "_text_size_lg_6cryn_55", g = "_text_size_xl_6cryn_61", h = "_text_size_2xl_6cryn_67", $ = "_text_size_3xl_6cryn_73", t = {
|
|
6
|
+
text: m,
|
|
7
|
+
"text_clip-line": "_text_clip-line_6cryn_9",
|
|
8
|
+
"text_clamp-lines": "_text_clamp-lines_6cryn_16",
|
|
9
|
+
text_color_inherit: a,
|
|
10
|
+
text_color_default: z,
|
|
11
|
+
text_color_dimmer: d,
|
|
12
|
+
text_color_dimmest: y,
|
|
13
13
|
text_size_sm: p,
|
|
14
14
|
text_size_md: f,
|
|
15
|
-
text_size_lg:
|
|
16
|
-
text_size_xl:
|
|
17
|
-
text_size_2xl:
|
|
15
|
+
text_size_lg: u,
|
|
16
|
+
text_size_xl: g,
|
|
17
|
+
text_size_2xl: h,
|
|
18
18
|
text_size_3xl: $
|
|
19
19
|
};
|
|
20
20
|
function P({
|
|
@@ -23,12 +23,12 @@ function P({
|
|
|
23
23
|
maxLines: _ = 1,
|
|
24
24
|
multiline: e,
|
|
25
25
|
render: o,
|
|
26
|
-
...
|
|
26
|
+
...c
|
|
27
27
|
}) {
|
|
28
28
|
return i({
|
|
29
29
|
defaultTagName: "span",
|
|
30
30
|
render: o,
|
|
31
|
-
props: c
|
|
31
|
+
props: n(c, {
|
|
32
32
|
className: l(
|
|
33
33
|
r.view,
|
|
34
34
|
t.text,
|