@televet/kibble-ui 5.0.24 → 5.0.25-beta.0
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/chunks/{tab.types-BiDpSKGC.js → tab.types-9F6GuNAA.js} +118 -109
- package/dist/chunks/{tab.types-BiDpSKGC.js.map → tab.types-9F6GuNAA.js.map} +1 -1
- package/dist/chunks/{tab.types-B8hOk0uV.js → tab.types-DGzY5mN2.js} +2 -2
- package/dist/chunks/{tab.types-B8hOk0uV.js.map → tab.types-DGzY5mN2.js.map} +1 -1
- package/dist/cjs/components/Tabs/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/Tabs/index.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/components/Tabs/tabs.component.d.ts +6 -1
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@ import { I as L } from "./icon.component-PV_nHBId.js";
|
|
|
3
3
|
import { N as Y } from "./notificationCounter.component-6Q3q8jWj.js";
|
|
4
4
|
import { W as G } from "./heading.component-CpSAN3cv.js";
|
|
5
5
|
import { c as J } from "./create-slot-recipe-context-D_FXDJGp.js";
|
|
6
|
-
import { useState as Q, useEffect as Z, forwardRef as
|
|
7
|
-
import { a as te, b as x, d as
|
|
6
|
+
import { useState as Q, useEffect as Z, forwardRef as m, useId as ee } from "react";
|
|
7
|
+
import { a as te, b as x, d as y, e as ae, c as N, u as se, f as oe, g as re, n as ne } from "./use-locale-context-DmcfCmf9.js";
|
|
8
8
|
import { u as ie, s as $, R as j } from "./render-strategy-DLvzMQD1.js";
|
|
9
|
-
import { a6 as
|
|
9
|
+
import { a6 as h, s as ce, aa as le, E as ue, b2 as de, r as T, aR as ge, aS as fe, a1 as pe, f as be, c as b, a3 as ve, z as Te, O as me, j as ye, l as he, b5 as Re, q as Ce, aD as Pe, _ as Ve, $ as Ee } from "./index-BcafYtXX.js";
|
|
10
10
|
import { c as Ae, d as Ie } from "./index-DcmJgLUo.js";
|
|
11
11
|
function xe(e, t) {
|
|
12
12
|
const [s, a] = Q(e);
|
|
@@ -23,49 +23,49 @@ const [B, F] = te({
|
|
|
23
23
|
name: "TabsContext",
|
|
24
24
|
hookName: "useTabsContext",
|
|
25
25
|
providerName: "<TabsProvider />"
|
|
26
|
-
}), k =
|
|
26
|
+
}), k = m((e, t) => {
|
|
27
27
|
const [s, a] = x()(e, ["value"]), r = F(), o = ie(), n = Ae({
|
|
28
28
|
...o,
|
|
29
29
|
present: xe(r.value === e.value, 0),
|
|
30
30
|
immediate: !0
|
|
31
|
-
}),
|
|
32
|
-
return /* @__PURE__ */ c.jsx(Ie, { value: n, children: n.unmounted ? null : /* @__PURE__ */ c.jsx(
|
|
31
|
+
}), d = h(r.getContentProps(s), n.getPresenceProps(), a);
|
|
32
|
+
return /* @__PURE__ */ c.jsx(Ie, { value: n, children: n.unmounted ? null : /* @__PURE__ */ c.jsx(y.div, { ...d, ref: ae(n.ref, t) }) });
|
|
33
33
|
});
|
|
34
34
|
k.displayName = "TabContent";
|
|
35
|
-
const D =
|
|
36
|
-
const s = F(), a =
|
|
37
|
-
return /* @__PURE__ */ c.jsx(
|
|
35
|
+
const D = m((e, t) => {
|
|
36
|
+
const s = F(), a = h(s.getIndicatorProps(), e);
|
|
37
|
+
return /* @__PURE__ */ c.jsx(y.div, { ...a, ref: t });
|
|
38
38
|
});
|
|
39
39
|
D.displayName = "TabIndicator";
|
|
40
|
-
const U =
|
|
41
|
-
const s = F(), a =
|
|
42
|
-
return /* @__PURE__ */ c.jsx(
|
|
40
|
+
const U = m((e, t) => {
|
|
41
|
+
const s = F(), a = h(s.getListProps(), e);
|
|
42
|
+
return /* @__PURE__ */ c.jsx(y.div, { ...a, ref: t });
|
|
43
43
|
});
|
|
44
44
|
U.displayName = "TabList";
|
|
45
|
-
const W =
|
|
46
|
-
const [s, a] = x()(e, ["disabled", "value"]), r = F(), o =
|
|
47
|
-
return /* @__PURE__ */ c.jsx(
|
|
45
|
+
const W = m((e, t) => {
|
|
46
|
+
const [s, a] = x()(e, ["disabled", "value"]), r = F(), o = h(r.getTriggerProps(s), a);
|
|
47
|
+
return /* @__PURE__ */ c.jsx(y.button, { ...o, ref: t });
|
|
48
48
|
});
|
|
49
49
|
W.displayName = "TabTrigger";
|
|
50
|
-
var Fe = be("tabs").parts("root", "list", "trigger", "content", "indicator"),
|
|
51
|
-
const s = `[role=tab][data-ownedby='${CSS.escape(
|
|
50
|
+
var Fe = be("tabs").parts("root", "list", "trigger", "content", "indicator"), C = Fe.build(), _e = (e) => e.ids?.root ?? `tabs:${e.id}`, P = (e) => e.ids?.list ?? `tabs:${e.id}:list`, _ = (e, t) => e.ids?.content ?? `tabs:${e.id}:content-${t}`, v = (e, t) => e.ids?.trigger ?? `tabs:${e.id}:trigger-${t}`, M = (e) => e.ids?.indicator ?? `tabs:${e.id}:indicator`, Ne = (e) => e.getById(P(e)), we = (e, t) => e.getById(_(e, t)), I = (e, t) => e.getById(v(e, t)), O = (e) => e.getById(M(e)), V = (e) => {
|
|
51
|
+
const s = `[role=tab][data-ownedby='${CSS.escape(P(e))}']:not([disabled])`;
|
|
52
52
|
return Ce(Ne(e), s);
|
|
53
|
-
}, Se = (e) => Ee(
|
|
53
|
+
}, Se = (e) => Ee(V(e)), Le = (e) => Ve(V(e)), Oe = (e, t) => fe(V(e), v(e, t.value), t.loopFocus), $e = (e, t) => ge(V(e), v(e, t.value), t.loopFocus), X = (e) => ({
|
|
54
54
|
left: e?.offsetLeft ?? 0,
|
|
55
55
|
top: e?.offsetTop ?? 0,
|
|
56
56
|
width: e?.offsetWidth ?? 0,
|
|
57
57
|
height: e?.offsetHeight ?? 0
|
|
58
58
|
}), je = (e, t) => {
|
|
59
|
-
const s = Re(
|
|
60
|
-
return X(
|
|
61
|
-
},
|
|
59
|
+
const s = Re(V(e), v(e, t));
|
|
60
|
+
return H(X(s));
|
|
61
|
+
}, H = (e) => ({
|
|
62
62
|
width: `${e.width}px`,
|
|
63
63
|
height: `${e.height}px`,
|
|
64
64
|
left: `${e.left}px`,
|
|
65
65
|
top: `${e.top}px`
|
|
66
66
|
});
|
|
67
67
|
function Be(e, t) {
|
|
68
|
-
const { state: s, send: a, context: r, prop: o, scope: n } = e,
|
|
68
|
+
const { state: s, send: a, context: r, prop: o, scope: n } = e, d = o("translations"), u = s.matches("focused"), g = o("orientation") === "vertical", A = o("orientation") === "horizontal", w = o("composite");
|
|
69
69
|
function S(i) {
|
|
70
70
|
return {
|
|
71
71
|
selected: r.get("value") === i.value,
|
|
@@ -83,8 +83,8 @@ function Be(e, t) {
|
|
|
83
83
|
a({ type: "CLEAR_VALUE" });
|
|
84
84
|
},
|
|
85
85
|
setIndicatorRect(i) {
|
|
86
|
-
const
|
|
87
|
-
a({ type: "SET_INDICATOR_RECT", id:
|
|
86
|
+
const l = v(n, i);
|
|
87
|
+
a({ type: "SET_INDICATOR_RECT", id: l });
|
|
88
88
|
},
|
|
89
89
|
syncTabIndex() {
|
|
90
90
|
a({ type: "SYNC_TAB_INDEX" });
|
|
@@ -101,26 +101,26 @@ function Be(e, t) {
|
|
|
101
101
|
},
|
|
102
102
|
getRootProps() {
|
|
103
103
|
return t.element({
|
|
104
|
-
...
|
|
104
|
+
...C.root.attrs,
|
|
105
105
|
id: _e(n),
|
|
106
106
|
"data-orientation": o("orientation"),
|
|
107
|
-
"data-focus":
|
|
107
|
+
"data-focus": b(u),
|
|
108
108
|
dir: o("dir")
|
|
109
109
|
});
|
|
110
110
|
},
|
|
111
111
|
getListProps() {
|
|
112
112
|
return t.element({
|
|
113
|
-
...
|
|
114
|
-
id:
|
|
113
|
+
...C.list.attrs,
|
|
114
|
+
id: P(n),
|
|
115
115
|
role: "tablist",
|
|
116
116
|
dir: o("dir"),
|
|
117
|
-
"data-focus":
|
|
117
|
+
"data-focus": b(u),
|
|
118
118
|
"aria-orientation": o("orientation"),
|
|
119
119
|
"data-orientation": o("orientation"),
|
|
120
|
-
"aria-label":
|
|
120
|
+
"aria-label": d?.listLabel,
|
|
121
121
|
onKeyDown(i) {
|
|
122
122
|
if (i.defaultPrevented || !me(i) || ye(i)) return;
|
|
123
|
-
const
|
|
123
|
+
const l = {
|
|
124
124
|
ArrowDown() {
|
|
125
125
|
A || a({ type: "ARROW_NEXT", key: "ArrowDown" });
|
|
126
126
|
},
|
|
@@ -128,10 +128,10 @@ function Be(e, t) {
|
|
|
128
128
|
A || a({ type: "ARROW_PREV", key: "ArrowUp" });
|
|
129
129
|
},
|
|
130
130
|
ArrowLeft() {
|
|
131
|
-
|
|
131
|
+
g || a({ type: "ARROW_PREV", key: "ArrowLeft" });
|
|
132
132
|
},
|
|
133
133
|
ArrowRight() {
|
|
134
|
-
|
|
134
|
+
g || a({ type: "ARROW_NEXT", key: "ArrowRight" });
|
|
135
135
|
},
|
|
136
136
|
Home() {
|
|
137
137
|
a({ type: "HOME" });
|
|
@@ -140,13 +140,13 @@ function Be(e, t) {
|
|
|
140
140
|
a({ type: "END" });
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
let
|
|
143
|
+
let f = he(i, {
|
|
144
144
|
dir: o("dir"),
|
|
145
145
|
orientation: o("orientation")
|
|
146
146
|
});
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
i.preventDefault(),
|
|
147
|
+
const p = l[f];
|
|
148
|
+
if (p) {
|
|
149
|
+
i.preventDefault(), p(i);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -154,56 +154,56 @@ function Be(e, t) {
|
|
|
154
154
|
},
|
|
155
155
|
getTriggerState: S,
|
|
156
156
|
getTriggerProps(i) {
|
|
157
|
-
const { value:
|
|
157
|
+
const { value: l, disabled: f } = i, p = S(i);
|
|
158
158
|
return t.button({
|
|
159
|
-
...
|
|
159
|
+
...C.trigger.attrs,
|
|
160
160
|
role: "tab",
|
|
161
161
|
type: "button",
|
|
162
|
-
disabled:
|
|
162
|
+
disabled: f,
|
|
163
163
|
dir: o("dir"),
|
|
164
164
|
"data-orientation": o("orientation"),
|
|
165
|
-
"data-disabled":
|
|
166
|
-
"aria-disabled":
|
|
167
|
-
"data-value":
|
|
168
|
-
"aria-selected":
|
|
169
|
-
"data-selected": p
|
|
170
|
-
"data-focus": p
|
|
171
|
-
"aria-controls":
|
|
172
|
-
"data-ownedby":
|
|
173
|
-
"data-ssr":
|
|
174
|
-
id:
|
|
175
|
-
tabIndex:
|
|
165
|
+
"data-disabled": b(f),
|
|
166
|
+
"aria-disabled": f,
|
|
167
|
+
"data-value": l,
|
|
168
|
+
"aria-selected": p.selected,
|
|
169
|
+
"data-selected": b(p.selected),
|
|
170
|
+
"data-focus": b(p.focused),
|
|
171
|
+
"aria-controls": p.selected ? _(n, l) : void 0,
|
|
172
|
+
"data-ownedby": P(n),
|
|
173
|
+
"data-ssr": b(r.get("ssr")),
|
|
174
|
+
id: v(n, l),
|
|
175
|
+
tabIndex: p.selected && w ? 0 : -1,
|
|
176
176
|
onFocus() {
|
|
177
|
-
a({ type: "TAB_FOCUS", value:
|
|
177
|
+
a({ type: "TAB_FOCUS", value: l });
|
|
178
178
|
},
|
|
179
|
-
onBlur(
|
|
180
|
-
|
|
179
|
+
onBlur(R) {
|
|
180
|
+
R.relatedTarget?.getAttribute("role") !== "tab" && a({ type: "TAB_BLUR" });
|
|
181
181
|
},
|
|
182
|
-
onClick(
|
|
183
|
-
|
|
182
|
+
onClick(R) {
|
|
183
|
+
R.defaultPrevented || ve(R) || f || (Te() && R.currentTarget.focus(), a({ type: "TAB_CLICK", value: l }));
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
},
|
|
187
187
|
getContentProps(i) {
|
|
188
|
-
const { value:
|
|
188
|
+
const { value: l } = i, f = r.get("value") === l;
|
|
189
189
|
return t.element({
|
|
190
|
-
...
|
|
190
|
+
...C.content.attrs,
|
|
191
191
|
dir: o("dir"),
|
|
192
|
-
id: _(n,
|
|
192
|
+
id: _(n, l),
|
|
193
193
|
tabIndex: w ? 0 : -1,
|
|
194
|
-
"aria-labelledby":
|
|
194
|
+
"aria-labelledby": v(n, l),
|
|
195
195
|
role: "tabpanel",
|
|
196
|
-
"data-ownedby":
|
|
197
|
-
"data-selected":
|
|
196
|
+
"data-ownedby": P(n),
|
|
197
|
+
"data-selected": b(f),
|
|
198
198
|
"data-orientation": o("orientation"),
|
|
199
|
-
hidden: !
|
|
199
|
+
hidden: !f
|
|
200
200
|
});
|
|
201
201
|
},
|
|
202
202
|
getIndicatorProps() {
|
|
203
|
-
const i = r.get("indicatorRect"),
|
|
203
|
+
const i = r.get("indicatorRect"), l = r.get("indicatorTransition");
|
|
204
204
|
return t.element({
|
|
205
205
|
id: M(n),
|
|
206
|
-
...
|
|
206
|
+
...C.indicator.attrs,
|
|
207
207
|
dir: o("dir"),
|
|
208
208
|
"data-orientation": o("orientation"),
|
|
209
209
|
style: {
|
|
@@ -215,7 +215,7 @@ function Be(e, t) {
|
|
|
215
215
|
position: "absolute",
|
|
216
216
|
willChange: "var(--transition-property)",
|
|
217
217
|
transitionProperty: "var(--transition-property)",
|
|
218
|
-
transitionDuration:
|
|
218
|
+
transitionDuration: l ? "var(--transition-duration, 150ms)" : "0ms",
|
|
219
219
|
transitionTimingFunction: "var(--transition-timing-function)",
|
|
220
220
|
[A ? "left" : "top"]: A ? "var(--left)" : "var(--top)"
|
|
221
221
|
}
|
|
@@ -357,7 +357,7 @@ var { createMachine: ke } = ce(), De = ke({
|
|
|
357
357
|
},
|
|
358
358
|
actions: {
|
|
359
359
|
selectFocusedTab({ context: e, prop: t }) {
|
|
360
|
-
|
|
360
|
+
T(() => {
|
|
361
361
|
const s = e.get("focusedValue");
|
|
362
362
|
if (!s) return;
|
|
363
363
|
const r = t("deselectable") && e.get("value") === s ? null : s;
|
|
@@ -380,12 +380,12 @@ var { createMachine: ke } = ce(), De = ke({
|
|
|
380
380
|
e.set("value", null);
|
|
381
381
|
},
|
|
382
382
|
focusFirstTab({ scope: e }) {
|
|
383
|
-
|
|
383
|
+
T(() => {
|
|
384
384
|
Se(e)?.focus();
|
|
385
385
|
});
|
|
386
386
|
},
|
|
387
387
|
focusLastTab({ scope: e }) {
|
|
388
|
-
|
|
388
|
+
T(() => {
|
|
389
389
|
Le(e)?.focus();
|
|
390
390
|
});
|
|
391
391
|
},
|
|
@@ -396,7 +396,7 @@ var { createMachine: ke } = ce(), De = ke({
|
|
|
396
396
|
value: r,
|
|
397
397
|
loopFocus: t("loopFocus")
|
|
398
398
|
});
|
|
399
|
-
|
|
399
|
+
T(() => {
|
|
400
400
|
t("composite") ? o?.focus() : o?.dataset.value != null && e.set("focusedValue", o.dataset.value);
|
|
401
401
|
});
|
|
402
402
|
},
|
|
@@ -407,12 +407,12 @@ var { createMachine: ke } = ce(), De = ke({
|
|
|
407
407
|
value: r,
|
|
408
408
|
loopFocus: t("loopFocus")
|
|
409
409
|
});
|
|
410
|
-
|
|
410
|
+
T(() => {
|
|
411
411
|
t("composite") ? o?.focus() : o?.dataset.value != null && e.set("focusedValue", o.dataset.value);
|
|
412
412
|
});
|
|
413
413
|
},
|
|
414
414
|
syncTabIndex({ context: e, scope: t }) {
|
|
415
|
-
|
|
415
|
+
T(() => {
|
|
416
416
|
const s = e.get("value");
|
|
417
417
|
if (!s) return;
|
|
418
418
|
const a = we(t, s);
|
|
@@ -451,16 +451,16 @@ var { createMachine: ke } = ce(), De = ke({
|
|
|
451
451
|
}
|
|
452
452
|
const o = I(s, r), n = O(s);
|
|
453
453
|
if (!o || !n) return;
|
|
454
|
-
const
|
|
455
|
-
measure(
|
|
456
|
-
return
|
|
454
|
+
const d = ue([o], {
|
|
455
|
+
measure(u) {
|
|
456
|
+
return X(u);
|
|
457
457
|
},
|
|
458
|
-
onEntry({ rects:
|
|
459
|
-
const [
|
|
460
|
-
e.set("indicatorRect",
|
|
458
|
+
onEntry({ rects: u }) {
|
|
459
|
+
const [g] = u;
|
|
460
|
+
e.set("indicatorRect", H(g));
|
|
461
461
|
}
|
|
462
462
|
});
|
|
463
|
-
t.set("indicatorCleanup",
|
|
463
|
+
t.set("indicatorCleanup", d);
|
|
464
464
|
},
|
|
465
465
|
navigateIfNeeded({ context: e, prop: t, scope: s }) {
|
|
466
466
|
const a = e.get("value");
|
|
@@ -498,7 +498,7 @@ const Ue = (e) => {
|
|
|
498
498
|
...e
|
|
499
499
|
}, o = re(De, r);
|
|
500
500
|
return Be(o, ne);
|
|
501
|
-
}, K =
|
|
501
|
+
}, K = m((e, t) => {
|
|
502
502
|
const [s, a] = $(e), [r, o] = x()(a, [
|
|
503
503
|
"activationMode",
|
|
504
504
|
"composite",
|
|
@@ -513,40 +513,40 @@ const Ue = (e) => {
|
|
|
513
513
|
"orientation",
|
|
514
514
|
"translations",
|
|
515
515
|
"value"
|
|
516
|
-
]), n = Ue(r),
|
|
517
|
-
return /* @__PURE__ */ c.jsx(B, { value: n, children: /* @__PURE__ */ c.jsx(j, { value: s, children: /* @__PURE__ */ c.jsx(
|
|
516
|
+
]), n = Ue(r), d = h(n.getRootProps(), o);
|
|
517
|
+
return /* @__PURE__ */ c.jsx(B, { value: n, children: /* @__PURE__ */ c.jsx(j, { value: s, children: /* @__PURE__ */ c.jsx(y.div, { ...d, ref: t }) }) });
|
|
518
518
|
});
|
|
519
519
|
K.displayName = "TabsRoot";
|
|
520
|
-
const q =
|
|
521
|
-
const [s, a] = $(e), [{ value: r }, o] = x()(a, ["value"]), n =
|
|
522
|
-
return /* @__PURE__ */ c.jsx(B, { value: r, children: /* @__PURE__ */ c.jsx(j, { value: s, children: /* @__PURE__ */ c.jsx(
|
|
520
|
+
const q = m((e, t) => {
|
|
521
|
+
const [s, a] = $(e), [{ value: r }, o] = x()(a, ["value"]), n = h(r.getRootProps(), o);
|
|
522
|
+
return /* @__PURE__ */ c.jsx(B, { value: r, children: /* @__PURE__ */ c.jsx(j, { value: s, children: /* @__PURE__ */ c.jsx(y.div, { ...n, ref: t }) }) });
|
|
523
523
|
});
|
|
524
524
|
q.displayName = "TabsRootProvider";
|
|
525
525
|
const {
|
|
526
526
|
withProvider: z,
|
|
527
|
-
withContext:
|
|
527
|
+
withContext: E
|
|
528
528
|
} = J({ key: "tabs" });
|
|
529
529
|
z(q, "root", { forwardAsChild: !0 });
|
|
530
530
|
const We = z(
|
|
531
531
|
K,
|
|
532
532
|
"root",
|
|
533
533
|
{ forwardAsChild: !0 }
|
|
534
|
-
), Me =
|
|
534
|
+
), Me = E(
|
|
535
535
|
W,
|
|
536
536
|
"trigger",
|
|
537
537
|
{ forwardAsChild: !0 }
|
|
538
|
-
),
|
|
538
|
+
), Xe = E(
|
|
539
539
|
k,
|
|
540
540
|
"content",
|
|
541
541
|
{ forwardAsChild: !0 }
|
|
542
542
|
);
|
|
543
|
-
|
|
544
|
-
const
|
|
543
|
+
E("div", "contentGroup");
|
|
544
|
+
const He = E(
|
|
545
545
|
U,
|
|
546
546
|
"list",
|
|
547
547
|
{ forwardAsChild: !0 }
|
|
548
548
|
);
|
|
549
|
-
|
|
549
|
+
E(
|
|
550
550
|
D,
|
|
551
551
|
"indicator",
|
|
552
552
|
{ forwardAsChild: !0 }
|
|
@@ -569,8 +569,8 @@ const Ke = {
|
|
|
569
569
|
showNotificationCounter: r,
|
|
570
570
|
size: o = "md",
|
|
571
571
|
["data-testid"]: n = "kibble-tab",
|
|
572
|
-
...
|
|
573
|
-
}) => /* @__PURE__ */ c.jsxs(Me, { className: "Tab", "data-testid": n, ...
|
|
572
|
+
...d
|
|
573
|
+
}) => /* @__PURE__ */ c.jsxs(Me, { className: "Tab", "data-testid": n, ...d, children: [
|
|
574
574
|
!!e && t === "left" && /* @__PURE__ */ c.jsx(
|
|
575
575
|
L,
|
|
576
576
|
{
|
|
@@ -595,29 +595,38 @@ const Ke = {
|
|
|
595
595
|
] }), nt = ({
|
|
596
596
|
align: e = "start",
|
|
597
597
|
onChange: t,
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
598
|
+
scrollable: s = !1,
|
|
599
|
+
size: a = "md",
|
|
600
|
+
tabs: r,
|
|
601
|
+
tabsContent: o,
|
|
602
|
+
["data-testid"]: n = "kibble-tabs",
|
|
603
|
+
...d
|
|
603
604
|
}) => /* @__PURE__ */ c.jsxs(
|
|
604
605
|
We,
|
|
605
606
|
{
|
|
606
607
|
className: "Tabs",
|
|
607
|
-
"data-testid":
|
|
608
|
-
justify: e ||
|
|
609
|
-
size:
|
|
610
|
-
onValueChange: ({ value:
|
|
611
|
-
...
|
|
608
|
+
"data-testid": n,
|
|
609
|
+
justify: e || d.justify,
|
|
610
|
+
size: a,
|
|
611
|
+
onValueChange: ({ value: u }) => t?.(u),
|
|
612
|
+
...d,
|
|
612
613
|
children: [
|
|
613
|
-
/* @__PURE__ */ c.jsx(
|
|
614
|
-
!!r && r.map((l, d) => /* @__PURE__ */ c.jsx(
|
|
614
|
+
/* @__PURE__ */ c.jsx(
|
|
615
615
|
He,
|
|
616
616
|
{
|
|
617
|
-
"
|
|
618
|
-
|
|
617
|
+
className: "Tabs__List",
|
|
618
|
+
"data-testid": `${n}-trigger-list`,
|
|
619
|
+
...s && { overflowX: "auto", flexWrap: "nowrap" },
|
|
620
|
+
children: r.map((u, g) => /* @__PURE__ */ c.jsx(ze, { ...u, "data-testid": `${n}-trigger-${u.value}`, size: a }, `tab-${g}`))
|
|
621
|
+
}
|
|
622
|
+
),
|
|
623
|
+
!!o && o.map((u, g) => /* @__PURE__ */ c.jsx(
|
|
624
|
+
Xe,
|
|
625
|
+
{
|
|
626
|
+
"data-testid": `${n}-content-${r[g].value}`,
|
|
627
|
+
...u
|
|
619
628
|
},
|
|
620
|
-
`${
|
|
629
|
+
`${n}-tabContent-${g}`
|
|
621
630
|
))
|
|
622
631
|
]
|
|
623
632
|
}
|
|
@@ -627,4 +636,4 @@ export {
|
|
|
627
636
|
ct as a,
|
|
628
637
|
it as t
|
|
629
638
|
};
|
|
630
|
-
//# sourceMappingURL=tab.types-
|
|
639
|
+
//# sourceMappingURL=tab.types-9F6GuNAA.js.map
|