@telia/teddy 0.0.6 → 0.0.7
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/assets/badge.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/{badge-tBBi5HpV.js → badge-9vHb0-Jo.js} +234 -233
- package/dist/components/accordion/accordion.js +2 -2
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/card/card.js +2 -2
- package/dist/components/card/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +26 -26
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts +114 -5
- package/dist/components/radio-group/radio-group.js +3 -2
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.js +4 -0
- package/dist/components/{switch/switch.d.ts → toggle/toggle.d.ts} +20 -20
- package/dist/components/{switch/switch.js → toggle/toggle.js} +3 -3
- package/dist/main.js +18 -18
- package/dist/radio-group-BR5SMJXJ.js +440 -0
- package/package.json +1 -1
- package/dist/components/switch/index.d.ts +0 -2
- package/dist/components/switch/index.js +0 -4
- package/dist/radio-group-0Oc9WTDf.js +0 -422
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import './assets/badge.css';
|
|
2
2
|
import { jsx as l, Fragment as le, jsxs as K } from "react/jsx-runtime";
|
|
3
|
-
import { c as
|
|
4
|
-
import
|
|
5
|
-
import { b as W, _ as m, a as
|
|
6
|
-
import { $ as
|
|
3
|
+
import { c as u } from "./clsx-DB4S2d7J.js";
|
|
4
|
+
import c, { forwardRef as T, useState as fe, useRef as E, createElement as v, useEffect as be, useCallback as je } from "react";
|
|
5
|
+
import { b as W, _ as m, a as _e, $ as Fe } from "./index-DpfSJps6.js";
|
|
6
|
+
import { $ as Ue } from "./radio-group-BR5SMJXJ.js";
|
|
7
7
|
import "./components/box/box.js";
|
|
8
8
|
import "./components/flex/flex.js";
|
|
9
9
|
import "./components/grid/grid.js";
|
|
10
10
|
import "./components/navigation-menu/navigation-menu.js";
|
|
11
|
-
import { a as X, c as D, e as Y, i as
|
|
11
|
+
import { a as X, c as D, e as Y, i as ze, f as ue, h as Ge, g as Ke, $ as We, b as Xe } from "./index-0Eg2mucA.js";
|
|
12
12
|
import { $ as P } from "./index-DM5e-Whg.js";
|
|
13
13
|
import "./assets/5161b177f001ea1a.svg";
|
|
14
14
|
import { Icon as J } from "./components/icon/icon.js";
|
|
@@ -44,25 +44,25 @@ const p = {
|
|
|
44
44
|
"teddy-card__image--inset-bottom": "_teddy-card__image--inset-bottom_18dt8_163",
|
|
45
45
|
"teddy-card__image--inset-left": "_teddy-card__image--inset-left_18dt8_166",
|
|
46
46
|
"teddy-card__image--inset-right": "_teddy-card__image--inset-right_18dt8_169"
|
|
47
|
-
},
|
|
48
|
-
({ className: e, children: n, backgroundImageSrc: t, variant: r, bordered: o, ...
|
|
49
|
-
const s =
|
|
50
|
-
[p[`${
|
|
47
|
+
}, y = "teddy-card", z = `${y}__action`, tt = ["purple-light", "purple-dark", "gray", "white", "beige"], Z = c.createContext(void 0), pe = c.forwardRef(
|
|
48
|
+
({ className: e, children: n, backgroundImageSrc: t, variant: r, bordered: o, ...a }, d) => {
|
|
49
|
+
const s = c.useRef(null), i = c.useRef(null), f = u(
|
|
50
|
+
[p[`${y}`]],
|
|
51
51
|
{
|
|
52
|
-
[p[`${
|
|
53
|
-
[p[`${
|
|
54
|
-
[p[`${
|
|
52
|
+
[p[`${y}--${r}`]]: r,
|
|
53
|
+
[p[`${y}--border`]]: o,
|
|
54
|
+
[p[`${y}--background-image`]]: t
|
|
55
55
|
},
|
|
56
56
|
e
|
|
57
57
|
);
|
|
58
58
|
return /* @__PURE__ */ l(
|
|
59
59
|
Ze,
|
|
60
60
|
{
|
|
61
|
-
...
|
|
62
|
-
style: t ? { background: `url(${t})`, ...
|
|
63
|
-
onClick: et(
|
|
61
|
+
...a,
|
|
62
|
+
style: t ? { background: `url(${t})`, ...a.style } : a.style,
|
|
63
|
+
onClick: et(a.onClick, (_) => {
|
|
64
64
|
var b;
|
|
65
|
-
if (!
|
|
65
|
+
if (!_.isDefaultPrevented()) {
|
|
66
66
|
if (i.current)
|
|
67
67
|
return i.current.click();
|
|
68
68
|
(b = s.current) == null || b.click();
|
|
@@ -76,9 +76,9 @@ const p = {
|
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
78
|
pe.displayName = "Card";
|
|
79
|
-
const me =
|
|
79
|
+
const me = c.forwardRef(
|
|
80
80
|
({ className: e, variant: n = "title-200", as: t = "h2", ...r }, o) => {
|
|
81
|
-
const
|
|
81
|
+
const a = u([p[`${y}__heading`]], e);
|
|
82
82
|
return /* @__PURE__ */ l(
|
|
83
83
|
Q,
|
|
84
84
|
{
|
|
@@ -86,14 +86,14 @@ const me = a.forwardRef(
|
|
|
86
86
|
...r.asChild ? { as: void 0, asChild: !0 } : { as: t, asChild: !1 },
|
|
87
87
|
variant: n,
|
|
88
88
|
ref: o,
|
|
89
|
-
className:
|
|
89
|
+
className: a
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
me.displayName = "Card.Heading";
|
|
95
|
-
const ge =
|
|
96
|
-
const r =
|
|
95
|
+
const ge = c.forwardRef(({ className: e, ...n }, t) => {
|
|
96
|
+
const r = u([p[`${y}__content`]], e);
|
|
97
97
|
return /* @__PURE__ */ l("div", { ...n, ref: t, className: r });
|
|
98
98
|
});
|
|
99
99
|
ge.displayName = "Card.Content";
|
|
@@ -111,21 +111,21 @@ const ot = [
|
|
|
111
111
|
"bottom-right",
|
|
112
112
|
"top-bottom",
|
|
113
113
|
"left-right"
|
|
114
|
-
],
|
|
115
|
-
var o,
|
|
116
|
-
const r =
|
|
117
|
-
[p[`${
|
|
114
|
+
], ye = c.forwardRef(({ className: e, ...n }, t) => {
|
|
115
|
+
var o, a, d, s, i, f, _, b;
|
|
116
|
+
const r = u(
|
|
117
|
+
[p[`${y}__image`]],
|
|
118
118
|
{
|
|
119
|
-
[p[`${
|
|
120
|
-
[p[`${
|
|
121
|
-
[p[`${
|
|
122
|
-
[p[`${
|
|
119
|
+
[p[`${y}__image--inset-top`]]: ((o = n.inset) == null ? void 0 : o.includes("top")) || ((a = n.inset) == null ? void 0 : a.includes("all")),
|
|
120
|
+
[p[`${y}__image--inset-bottom`]]: ((d = n.inset) == null ? void 0 : d.includes("bottom")) || ((s = n.inset) == null ? void 0 : s.includes("all")),
|
|
121
|
+
[p[`${y}__image--inset-left`]]: ((i = n.inset) == null ? void 0 : i.includes("left")) || ((f = n.inset) == null ? void 0 : f.includes("all")),
|
|
122
|
+
[p[`${y}__image--inset-right`]]: ((_ = n.inset) == null ? void 0 : _.includes("right")) || ((b = n.inset) == null ? void 0 : b.includes("all"))
|
|
123
123
|
},
|
|
124
124
|
e
|
|
125
125
|
);
|
|
126
126
|
return /* @__PURE__ */ l("img", { ...n, ref: t, className: r });
|
|
127
127
|
});
|
|
128
|
-
|
|
128
|
+
ye.displayName = "Card.Image";
|
|
129
129
|
function nt(e) {
|
|
130
130
|
switch (e) {
|
|
131
131
|
case "purple-dark":
|
|
@@ -134,13 +134,13 @@ function nt(e) {
|
|
|
134
134
|
return "primary";
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
const
|
|
137
|
+
const he = c.forwardRef(
|
|
138
138
|
({ className: e, iconOnly: n = !1, ...t }, r) => {
|
|
139
|
-
const o =
|
|
140
|
-
[p[`${
|
|
141
|
-
p[
|
|
139
|
+
const o = c.useContext(Z), a = u(
|
|
140
|
+
[p[`${y}__button`]],
|
|
141
|
+
p[z],
|
|
142
142
|
{
|
|
143
|
-
[p[`${
|
|
143
|
+
[p[`${z}--disabled`]]: t.disabled
|
|
144
144
|
},
|
|
145
145
|
e
|
|
146
146
|
), d = $e(o == null ? void 0 : o.buttonRef, r);
|
|
@@ -151,85 +151,85 @@ const ye = a.forwardRef(
|
|
|
151
151
|
...t,
|
|
152
152
|
ref: d,
|
|
153
153
|
variant: nt(o == null ? void 0 : o.variant),
|
|
154
|
-
className:
|
|
154
|
+
className: a
|
|
155
155
|
}
|
|
156
156
|
) });
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
|
-
|
|
160
|
-
const Ce =
|
|
159
|
+
he.displayName = "Card.Button";
|
|
160
|
+
const Ce = c.forwardRef(
|
|
161
161
|
({ className: e, ...n }, t) => {
|
|
162
|
-
const r =
|
|
163
|
-
return /* @__PURE__ */ l(Ye, { ...n, ref:
|
|
162
|
+
const r = c.useContext(Z), o = u([p[`${y}__link`]], p[z], e), a = $e(r == null ? void 0 : r.linkRef, t);
|
|
163
|
+
return /* @__PURE__ */ l(Ye, { ...n, ref: a, className: o });
|
|
164
164
|
}
|
|
165
165
|
);
|
|
166
166
|
Ce.displayName = "Card.Link";
|
|
167
167
|
const vo = Object.assign(pe, {
|
|
168
168
|
Heading: me,
|
|
169
169
|
Content: ge,
|
|
170
|
-
Image:
|
|
171
|
-
Button:
|
|
170
|
+
Image: ye,
|
|
171
|
+
Button: he,
|
|
172
172
|
Link: Ce,
|
|
173
173
|
variantOptions: tt,
|
|
174
174
|
insetOptions: ot
|
|
175
|
-
}), ve = "Switch", [rt,
|
|
176
|
-
const { __scopeSwitch: t, name: r, checked: o, defaultChecked:
|
|
175
|
+
}), ve = "Switch", [rt, xo] = X(ve), [at, ct] = rt(ve), dt = /* @__PURE__ */ T((e, n) => {
|
|
176
|
+
const { __scopeSwitch: t, name: r, checked: o, defaultChecked: a, required: d, disabled: s, value: i = "on", onCheckedChange: f, ..._ } = e, [b, x] = fe(null), A = W(
|
|
177
177
|
n,
|
|
178
|
-
($) =>
|
|
179
|
-
),
|
|
178
|
+
($) => x($)
|
|
179
|
+
), w = E(!1), N = b ? !!b.closest("form") : !0, [h = !1, C] = D({
|
|
180
180
|
prop: o,
|
|
181
|
-
defaultProp:
|
|
181
|
+
defaultProp: a,
|
|
182
182
|
onChange: f
|
|
183
183
|
});
|
|
184
|
-
return /* @__PURE__ */ v(
|
|
184
|
+
return /* @__PURE__ */ v(at, {
|
|
185
185
|
scope: t,
|
|
186
|
-
checked:
|
|
186
|
+
checked: h,
|
|
187
187
|
disabled: s
|
|
188
188
|
}, /* @__PURE__ */ v(P.button, m({
|
|
189
189
|
type: "button",
|
|
190
190
|
role: "switch",
|
|
191
|
-
"aria-checked":
|
|
191
|
+
"aria-checked": h,
|
|
192
192
|
"aria-required": d,
|
|
193
|
-
"data-state":
|
|
193
|
+
"data-state": xe(h),
|
|
194
194
|
"data-disabled": s ? "" : void 0,
|
|
195
195
|
disabled: s,
|
|
196
196
|
value: i
|
|
197
|
-
},
|
|
197
|
+
}, _, {
|
|
198
198
|
ref: A,
|
|
199
199
|
onClick: Y(e.onClick, ($) => {
|
|
200
200
|
C(
|
|
201
201
|
(g) => !g
|
|
202
|
-
),
|
|
202
|
+
), N && (w.current = $.isPropagationStopped(), w.current || $.stopPropagation());
|
|
203
203
|
})
|
|
204
|
-
})),
|
|
204
|
+
})), N && /* @__PURE__ */ v(lt, {
|
|
205
205
|
control: b,
|
|
206
|
-
bubbles: !
|
|
206
|
+
bubbles: !w.current,
|
|
207
207
|
name: r,
|
|
208
208
|
value: i,
|
|
209
|
-
checked:
|
|
209
|
+
checked: h,
|
|
210
210
|
required: d,
|
|
211
211
|
disabled: s,
|
|
212
212
|
style: {
|
|
213
213
|
transform: "translateX(-100%)"
|
|
214
214
|
}
|
|
215
215
|
}));
|
|
216
|
-
}), st = "SwitchThumb", it = /* @__PURE__ */
|
|
217
|
-
const { __scopeSwitch: t, ...r } = e, o =
|
|
216
|
+
}), st = "SwitchThumb", it = /* @__PURE__ */ T((e, n) => {
|
|
217
|
+
const { __scopeSwitch: t, ...r } = e, o = ct(st, t);
|
|
218
218
|
return /* @__PURE__ */ v(P.span, m({
|
|
219
|
-
"data-state":
|
|
219
|
+
"data-state": xe(o.checked),
|
|
220
220
|
"data-disabled": o.disabled ? "" : void 0
|
|
221
221
|
}, r, {
|
|
222
222
|
ref: n
|
|
223
223
|
}));
|
|
224
224
|
}), lt = (e) => {
|
|
225
|
-
const { control: n, checked: t, bubbles: r = !0, ...o } = e,
|
|
225
|
+
const { control: n, checked: t, bubbles: r = !0, ...o } = e, a = E(null), d = ze(t), s = Ue(n);
|
|
226
226
|
return be(() => {
|
|
227
|
-
const i =
|
|
227
|
+
const i = a.current, f = window.HTMLInputElement.prototype, b = Object.getOwnPropertyDescriptor(f, "checked").set;
|
|
228
228
|
if (d !== t && b) {
|
|
229
|
-
const
|
|
229
|
+
const x = new Event("click", {
|
|
230
230
|
bubbles: r
|
|
231
231
|
});
|
|
232
|
-
b.call(i, t), i.dispatchEvent(
|
|
232
|
+
b.call(i, t), i.dispatchEvent(x);
|
|
233
233
|
}
|
|
234
234
|
}, [
|
|
235
235
|
d,
|
|
@@ -241,7 +241,7 @@ const vo = Object.assign(pe, {
|
|
|
241
241
|
defaultChecked: t
|
|
242
242
|
}, o, {
|
|
243
243
|
tabIndex: -1,
|
|
244
|
-
ref:
|
|
244
|
+
ref: a,
|
|
245
245
|
style: {
|
|
246
246
|
...e.style,
|
|
247
247
|
...s,
|
|
@@ -252,24 +252,24 @@ const vo = Object.assign(pe, {
|
|
|
252
252
|
}
|
|
253
253
|
}));
|
|
254
254
|
};
|
|
255
|
-
function
|
|
255
|
+
function xe(e) {
|
|
256
256
|
return e ? "checked" : "unchecked";
|
|
257
257
|
}
|
|
258
|
-
const ft = dt, bt = it,
|
|
259
|
-
"teddy-
|
|
260
|
-
"teddy-
|
|
261
|
-
"teddy-
|
|
262
|
-
"teddy-
|
|
263
|
-
},
|
|
258
|
+
const ft = dt, bt = it, S = {
|
|
259
|
+
"teddy-toggle": "_teddy-toggle_1rp8d_3",
|
|
260
|
+
"teddy-toggle__input": "_teddy-toggle__input_1rp8d_10",
|
|
261
|
+
"teddy-toggle__thumb": "_teddy-toggle__thumb_1rp8d_78",
|
|
262
|
+
"teddy-toggle__indicator": "_teddy-toggle__indicator_1rp8d_104"
|
|
263
|
+
}, O = "teddy-toggle", ee = c.createContext(void 0), we = c.forwardRef(
|
|
264
264
|
({ className: e, id: n, children: t, ...r }, o) => {
|
|
265
|
-
const
|
|
266
|
-
return /* @__PURE__ */ l("div", { ...r, ref: o, className:
|
|
265
|
+
const a = u([S[`${O}`]], e), d = c.useId(), [s, i] = c.useState(!1), [f, _] = c.useState(!1);
|
|
266
|
+
return /* @__PURE__ */ l("div", { ...r, ref: o, className: a, children: /* @__PURE__ */ l(ee.Provider, { value: { id: n ?? d, isDisabled: s, setIsDisabled: i, isRequired: f, setIsRequired: _ }, children: t }) });
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
|
-
|
|
270
|
-
const Ae =
|
|
269
|
+
we.displayName = "Toggle";
|
|
270
|
+
const Ae = c.forwardRef(
|
|
271
271
|
({ className: e, ...n }, t) => {
|
|
272
|
-
const r =
|
|
272
|
+
const r = u([S[`${O}__label`]], e), o = c.useContext(ee);
|
|
273
273
|
return /* @__PURE__ */ l(
|
|
274
274
|
Qe,
|
|
275
275
|
{
|
|
@@ -283,65 +283,66 @@ const Ae = a.forwardRef(
|
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
285
|
);
|
|
286
|
-
Ae.displayName = "
|
|
287
|
-
const Re =
|
|
286
|
+
Ae.displayName = "Toggle.Label";
|
|
287
|
+
const Re = c.forwardRef(
|
|
288
288
|
({ className: e, children: n, ...t }, r) => {
|
|
289
|
-
const o =
|
|
290
|
-
return
|
|
291
|
-
|
|
292
|
-
}, [
|
|
293
|
-
|
|
294
|
-
}, [
|
|
289
|
+
const o = u([S[`${O}__input`]], e), a = c.useContext(ee);
|
|
290
|
+
return c.useEffect(() => {
|
|
291
|
+
a && a.setIsDisabled(t.disabled === !0);
|
|
292
|
+
}, [a, t.disabled]), c.useEffect(() => {
|
|
293
|
+
a && a.setIsRequired(t.required === !0);
|
|
294
|
+
}, [a, t.required]), /* @__PURE__ */ l(ft, { ...t, id: a == null ? void 0 : a.id, ref: r, className: o, children: n || /* @__PURE__ */ K(le, { children: [
|
|
295
295
|
/* @__PURE__ */ l(M, {}),
|
|
296
|
-
/* @__PURE__ */ l(
|
|
296
|
+
/* @__PURE__ */ l(Ie, {})
|
|
297
297
|
] }) });
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
|
-
Re.displayName = "
|
|
301
|
-
const M =
|
|
300
|
+
Re.displayName = "Toggle.Input";
|
|
301
|
+
const M = c.forwardRef(
|
|
302
302
|
({ className: e, ...n }, t) => {
|
|
303
|
-
const r =
|
|
303
|
+
const r = u([S[`${O}__thumb`]], e);
|
|
304
304
|
return /* @__PURE__ */ l(bt, { ...n, ref: t, className: r });
|
|
305
305
|
}
|
|
306
306
|
);
|
|
307
|
-
M.displayName = "
|
|
308
|
-
const
|
|
307
|
+
M.displayName = "Toggle.Thumb";
|
|
308
|
+
const Ie = c.forwardRef(
|
|
309
309
|
({ className: e, ...n }, t) => {
|
|
310
|
-
const r =
|
|
310
|
+
const r = u([S[`${O}__indicator`]], e);
|
|
311
311
|
return /* @__PURE__ */ l(J, { name: "checkmark-bold", size: "xxs", ...n, ref: t, className: r });
|
|
312
312
|
}
|
|
313
313
|
);
|
|
314
|
-
M.displayName = "
|
|
315
|
-
const
|
|
314
|
+
M.displayName = "Toggle.Indicator";
|
|
315
|
+
const wo = Object.assign(we, {
|
|
316
316
|
Label: Ae,
|
|
317
317
|
Input: Re,
|
|
318
318
|
Thumb: M,
|
|
319
|
-
Indicator:
|
|
320
|
-
}),
|
|
321
|
-
"teddy-accordion--indented": "_teddy-accordion--
|
|
322
|
-
"teddy-accordion__trigger": "_teddy-
|
|
323
|
-
"teddy-accordion__content": "_teddy-
|
|
324
|
-
"teddy-accordion": "_teddy-
|
|
325
|
-
"teddy-
|
|
326
|
-
"teddy-
|
|
327
|
-
"teddy-
|
|
328
|
-
"teddy-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
319
|
+
Indicator: Ie
|
|
320
|
+
}), _t = "_slideDown_1nr64_1", ut = "_slideUp_1nr64_1", R = {
|
|
321
|
+
"teddy-accordion--indented": "_teddy-accordion--indented_1nr64_3",
|
|
322
|
+
"teddy-accordion__trigger": "_teddy-accordion__trigger_1nr64_3",
|
|
323
|
+
"teddy-accordion__content": "_teddy-accordion__content_1nr64_4",
|
|
324
|
+
"teddy-accordion--negative": "_teddy-accordion--negative_1nr64_13",
|
|
325
|
+
"teddy-accordion__header": "_teddy-accordion__header_1nr64_13",
|
|
326
|
+
"teddy-accordion__title": "_teddy-accordion__title_1nr64_17",
|
|
327
|
+
"teddy-accordion__item": "_teddy-accordion__item_1nr64_28",
|
|
328
|
+
"teddy-accordion": "_teddy-accordion_1nr64_3",
|
|
329
|
+
"teddy-accordion__indicator": "_teddy-accordion__indicator_1nr64_107",
|
|
330
|
+
slideDown: _t,
|
|
331
|
+
slideUp: ut
|
|
332
|
+
}, Ne = "Collapsible", [$t, ke] = X(Ne), [pt, te] = $t(Ne), mt = /* @__PURE__ */ T((e, n) => {
|
|
333
|
+
const { __scopeCollapsible: t, open: r, defaultOpen: o, disabled: a, onOpenChange: d, ...s } = e, [i = !1, f] = D({
|
|
333
334
|
prop: r,
|
|
334
335
|
defaultProp: o,
|
|
335
336
|
onChange: d
|
|
336
337
|
});
|
|
337
338
|
return /* @__PURE__ */ v(pt, {
|
|
338
339
|
scope: t,
|
|
339
|
-
disabled:
|
|
340
|
-
contentId:
|
|
340
|
+
disabled: a,
|
|
341
|
+
contentId: ue(),
|
|
341
342
|
open: i,
|
|
342
|
-
onOpenToggle:
|
|
343
|
+
onOpenToggle: je(
|
|
343
344
|
() => f(
|
|
344
|
-
(
|
|
345
|
+
(_) => !_
|
|
345
346
|
),
|
|
346
347
|
[
|
|
347
348
|
f
|
|
@@ -349,11 +350,11 @@ const xo = Object.assign(xe, {
|
|
|
349
350
|
)
|
|
350
351
|
}, /* @__PURE__ */ v(P.div, m({
|
|
351
352
|
"data-state": oe(i),
|
|
352
|
-
"data-disabled":
|
|
353
|
+
"data-disabled": a ? "" : void 0
|
|
353
354
|
}, s, {
|
|
354
355
|
ref: n
|
|
355
356
|
})));
|
|
356
|
-
}), gt = "CollapsibleTrigger",
|
|
357
|
+
}), gt = "CollapsibleTrigger", yt = /* @__PURE__ */ T((e, n) => {
|
|
357
358
|
const { __scopeCollapsible: t, ...r } = e, o = te(gt, t);
|
|
358
359
|
return /* @__PURE__ */ v(P.button, m({
|
|
359
360
|
type: "button",
|
|
@@ -366,23 +367,23 @@ const xo = Object.assign(xe, {
|
|
|
366
367
|
ref: n,
|
|
367
368
|
onClick: Y(e.onClick, o.onOpenToggle)
|
|
368
369
|
}));
|
|
369
|
-
}), Ee = "CollapsibleContent",
|
|
370
|
+
}), Ee = "CollapsibleContent", ht = /* @__PURE__ */ T((e, n) => {
|
|
370
371
|
const { forceMount: t, ...r } = e, o = te(Ee, e.__scopeCollapsible);
|
|
371
372
|
return /* @__PURE__ */ v(
|
|
372
373
|
Ge,
|
|
373
374
|
{
|
|
374
375
|
present: t || o.open
|
|
375
376
|
},
|
|
376
|
-
({ present:
|
|
377
|
+
({ present: a }) => /* @__PURE__ */ v(Ct, m({}, r, {
|
|
377
378
|
ref: n,
|
|
378
|
-
present:
|
|
379
|
+
present: a
|
|
379
380
|
}))
|
|
380
381
|
);
|
|
381
|
-
}), Ct = /* @__PURE__ */
|
|
382
|
-
const { __scopeCollapsible: t, present: r, children: o, ...
|
|
382
|
+
}), Ct = /* @__PURE__ */ T((e, n) => {
|
|
383
|
+
const { __scopeCollapsible: t, present: r, children: o, ...a } = e, d = te(Ee, t), [s, i] = fe(r), f = E(null), _ = W(n, f), b = E(0), x = b.current, A = E(0), w = A.current, N = d.open || s, h = E(N), C = E();
|
|
383
384
|
return be(() => {
|
|
384
385
|
const $ = requestAnimationFrame(
|
|
385
|
-
() =>
|
|
386
|
+
() => h.current = !1
|
|
386
387
|
);
|
|
387
388
|
return () => cancelAnimationFrame($);
|
|
388
389
|
}, []), Ke(() => {
|
|
@@ -393,7 +394,7 @@ const xo = Object.assign(xe, {
|
|
|
393
394
|
animationName: $.style.animationName
|
|
394
395
|
}, $.style.transitionDuration = "0s", $.style.animationName = "none";
|
|
395
396
|
const g = $.getBoundingClientRect();
|
|
396
|
-
b.current = g.height, A.current = g.width,
|
|
397
|
+
b.current = g.height, A.current = g.width, h.current || ($.style.transitionDuration = C.current.transitionDuration, $.style.animationName = C.current.animationName), i(r);
|
|
397
398
|
}
|
|
398
399
|
}, [
|
|
399
400
|
d.open,
|
|
@@ -402,36 +403,36 @@ const xo = Object.assign(xe, {
|
|
|
402
403
|
"data-state": oe(d.open),
|
|
403
404
|
"data-disabled": d.disabled ? "" : void 0,
|
|
404
405
|
id: d.contentId,
|
|
405
|
-
hidden: !
|
|
406
|
-
},
|
|
407
|
-
ref:
|
|
406
|
+
hidden: !N
|
|
407
|
+
}, a, {
|
|
408
|
+
ref: _,
|
|
408
409
|
style: {
|
|
409
|
-
"--radix-collapsible-content-height":
|
|
410
|
-
"--radix-collapsible-content-width":
|
|
410
|
+
"--radix-collapsible-content-height": x ? `${x}px` : void 0,
|
|
411
|
+
"--radix-collapsible-content-width": w ? `${w}px` : void 0,
|
|
411
412
|
...e.style
|
|
412
413
|
}
|
|
413
|
-
}),
|
|
414
|
+
}), N && o);
|
|
414
415
|
});
|
|
415
416
|
function oe(e) {
|
|
416
417
|
return e ? "open" : "closed";
|
|
417
418
|
}
|
|
418
|
-
const vt = mt,
|
|
419
|
+
const vt = mt, xt = yt, wt = ht, k = "Accordion", At = [
|
|
419
420
|
"Home",
|
|
420
421
|
"End",
|
|
421
422
|
"ArrowDown",
|
|
422
423
|
"ArrowUp",
|
|
423
424
|
"ArrowLeft",
|
|
424
425
|
"ArrowRight"
|
|
425
|
-
], [ne, Rt,
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
]), re =
|
|
429
|
-
const { type: t, ...r } = e, o = r,
|
|
430
|
-
return /* @__PURE__ */
|
|
426
|
+
], [ne, Rt, It] = We(k), [V, Ao] = X(k, [
|
|
427
|
+
It,
|
|
428
|
+
ke
|
|
429
|
+
]), re = ke(), Pe = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
430
|
+
const { type: t, ...r } = e, o = r, a = r;
|
|
431
|
+
return /* @__PURE__ */ c.createElement(ne.Provider, {
|
|
431
432
|
scope: e.__scopeAccordion
|
|
432
|
-
}, t === "multiple" ? /* @__PURE__ */
|
|
433
|
+
}, t === "multiple" ? /* @__PURE__ */ c.createElement(Pt, m({}, a, {
|
|
433
434
|
ref: n
|
|
434
|
-
})) : /* @__PURE__ */
|
|
435
|
+
})) : /* @__PURE__ */ c.createElement(Et, m({}, o, {
|
|
435
436
|
ref: n
|
|
436
437
|
})));
|
|
437
438
|
});
|
|
@@ -444,89 +445,89 @@ Pe.propTypes = {
|
|
|
444
445
|
].includes(e.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : e.type === "multiple" && typeof n == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : e.type === "single" && Array.isArray(n) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
|
|
445
446
|
}
|
|
446
447
|
};
|
|
447
|
-
const [
|
|
448
|
+
const [Te, Nt] = V(k), [Se, kt] = V(k, {
|
|
448
449
|
collapsible: !1
|
|
449
|
-
}), Et = /* @__PURE__ */
|
|
450
|
+
}), Et = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
450
451
|
const { value: t, defaultValue: r, onValueChange: o = () => {
|
|
451
|
-
}, collapsible:
|
|
452
|
+
}, collapsible: a = !1, ...d } = e, [s, i] = D({
|
|
452
453
|
prop: t,
|
|
453
454
|
defaultProp: r,
|
|
454
455
|
onChange: o
|
|
455
456
|
});
|
|
456
|
-
return /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ c.createElement(Te, {
|
|
457
458
|
scope: e.__scopeAccordion,
|
|
458
459
|
value: s ? [
|
|
459
460
|
s
|
|
460
461
|
] : [],
|
|
461
462
|
onItemOpen: i,
|
|
462
|
-
onItemClose:
|
|
463
|
-
() =>
|
|
463
|
+
onItemClose: c.useCallback(
|
|
464
|
+
() => a && i(""),
|
|
464
465
|
[
|
|
465
|
-
|
|
466
|
+
a,
|
|
466
467
|
i
|
|
467
468
|
]
|
|
468
469
|
)
|
|
469
|
-
}, /* @__PURE__ */
|
|
470
|
+
}, /* @__PURE__ */ c.createElement(Se, {
|
|
470
471
|
scope: e.__scopeAccordion,
|
|
471
|
-
collapsible:
|
|
472
|
-
}, /* @__PURE__ */
|
|
472
|
+
collapsible: a
|
|
473
|
+
}, /* @__PURE__ */ c.createElement(Oe, m({}, d, {
|
|
473
474
|
ref: n
|
|
474
475
|
}))));
|
|
475
|
-
}), Pt = /* @__PURE__ */
|
|
476
|
+
}), Pt = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
476
477
|
const { value: t, defaultValue: r, onValueChange: o = () => {
|
|
477
|
-
}, ...
|
|
478
|
+
}, ...a } = e, [d = [], s] = D({
|
|
478
479
|
prop: t,
|
|
479
480
|
defaultProp: r,
|
|
480
481
|
onChange: o
|
|
481
|
-
}), i =
|
|
482
|
-
(
|
|
482
|
+
}), i = c.useCallback(
|
|
483
|
+
(_) => s(
|
|
483
484
|
(b = []) => [
|
|
484
485
|
...b,
|
|
485
|
-
|
|
486
|
+
_
|
|
486
487
|
]
|
|
487
488
|
),
|
|
488
489
|
[
|
|
489
490
|
s
|
|
490
491
|
]
|
|
491
|
-
), f =
|
|
492
|
-
(
|
|
492
|
+
), f = c.useCallback(
|
|
493
|
+
(_) => s(
|
|
493
494
|
(b = []) => b.filter(
|
|
494
|
-
(
|
|
495
|
+
(x) => x !== _
|
|
495
496
|
)
|
|
496
497
|
),
|
|
497
498
|
[
|
|
498
499
|
s
|
|
499
500
|
]
|
|
500
501
|
);
|
|
501
|
-
return /* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ c.createElement(Te, {
|
|
502
503
|
scope: e.__scopeAccordion,
|
|
503
504
|
value: d,
|
|
504
505
|
onItemOpen: i,
|
|
505
506
|
onItemClose: f
|
|
506
|
-
}, /* @__PURE__ */
|
|
507
|
+
}, /* @__PURE__ */ c.createElement(Se, {
|
|
507
508
|
scope: e.__scopeAccordion,
|
|
508
509
|
collapsible: !0
|
|
509
|
-
}, /* @__PURE__ */
|
|
510
|
+
}, /* @__PURE__ */ c.createElement(Oe, m({}, a, {
|
|
510
511
|
ref: n
|
|
511
512
|
}))));
|
|
512
|
-
}), [
|
|
513
|
-
const { __scopeAccordion: t, disabled: r, dir: o, orientation:
|
|
514
|
-
var
|
|
513
|
+
}), [Tt, L] = V(k), Oe = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
514
|
+
const { __scopeAccordion: t, disabled: r, dir: o, orientation: a = "vertical", ...d } = e, s = c.useRef(null), i = W(s, n), f = Rt(t), b = Xe(o) === "ltr", x = Y(e.onKeyDown, (A) => {
|
|
515
|
+
var w;
|
|
515
516
|
if (!At.includes(A.key))
|
|
516
517
|
return;
|
|
517
|
-
const
|
|
518
|
-
var
|
|
519
|
-
return !((
|
|
520
|
-
}), C =
|
|
521
|
-
(
|
|
522
|
-
), $ =
|
|
518
|
+
const N = A.target, h = f().filter((F) => {
|
|
519
|
+
var U;
|
|
520
|
+
return !((U = F.ref.current) !== null && U !== void 0 && U.disabled);
|
|
521
|
+
}), C = h.findIndex(
|
|
522
|
+
(F) => F.ref.current === N
|
|
523
|
+
), $ = h.length;
|
|
523
524
|
if (C === -1)
|
|
524
525
|
return;
|
|
525
526
|
A.preventDefault();
|
|
526
527
|
let g = C;
|
|
527
528
|
const B = 0, H = $ - 1, q = () => {
|
|
528
529
|
g = C + 1, g > H && (g = B);
|
|
529
|
-
},
|
|
530
|
+
}, j = () => {
|
|
530
531
|
g = C - 1, g < B && (g = H);
|
|
531
532
|
};
|
|
532
533
|
switch (A.key) {
|
|
@@ -537,76 +538,76 @@ const [Se, It] = V(N), [Oe, Nt] = V(N, {
|
|
|
537
538
|
g = H;
|
|
538
539
|
break;
|
|
539
540
|
case "ArrowRight":
|
|
540
|
-
|
|
541
|
+
a === "horizontal" && (b ? q() : j());
|
|
541
542
|
break;
|
|
542
543
|
case "ArrowDown":
|
|
543
|
-
|
|
544
|
+
a === "vertical" && q();
|
|
544
545
|
break;
|
|
545
546
|
case "ArrowLeft":
|
|
546
|
-
|
|
547
|
+
a === "horizontal" && (b ? j() : q());
|
|
547
548
|
break;
|
|
548
549
|
case "ArrowUp":
|
|
549
|
-
|
|
550
|
+
a === "vertical" && j();
|
|
550
551
|
break;
|
|
551
552
|
}
|
|
552
553
|
const qe = g % $;
|
|
553
|
-
(
|
|
554
|
+
(w = h[qe].ref.current) === null || w === void 0 || w.focus();
|
|
554
555
|
});
|
|
555
|
-
return /* @__PURE__ */
|
|
556
|
+
return /* @__PURE__ */ c.createElement(Tt, {
|
|
556
557
|
scope: t,
|
|
557
558
|
disabled: r,
|
|
558
559
|
direction: o,
|
|
559
|
-
orientation:
|
|
560
|
-
}, /* @__PURE__ */
|
|
560
|
+
orientation: a
|
|
561
|
+
}, /* @__PURE__ */ c.createElement(ne.Slot, {
|
|
561
562
|
scope: t
|
|
562
|
-
}, /* @__PURE__ */
|
|
563
|
-
"data-orientation":
|
|
563
|
+
}, /* @__PURE__ */ c.createElement(P.div, m({}, d, {
|
|
564
|
+
"data-orientation": a,
|
|
564
565
|
ref: i,
|
|
565
|
-
onKeyDown: r ? void 0 :
|
|
566
|
+
onKeyDown: r ? void 0 : x
|
|
566
567
|
}))));
|
|
567
|
-
}), G = "AccordionItem", [
|
|
568
|
-
const { __scopeAccordion: t, value: r, ...o } = e,
|
|
569
|
-
return /* @__PURE__ */
|
|
568
|
+
}), G = "AccordionItem", [St, ae] = V(G), Ot = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
569
|
+
const { __scopeAccordion: t, value: r, ...o } = e, a = L(G, t), d = Nt(G, t), s = re(t), i = ue(), f = r && d.value.includes(r) || !1, _ = a.disabled || e.disabled;
|
|
570
|
+
return /* @__PURE__ */ c.createElement(St, {
|
|
570
571
|
scope: t,
|
|
571
572
|
open: f,
|
|
572
|
-
disabled:
|
|
573
|
+
disabled: _,
|
|
573
574
|
triggerId: i
|
|
574
|
-
}, /* @__PURE__ */
|
|
575
|
-
"data-orientation":
|
|
575
|
+
}, /* @__PURE__ */ c.createElement(vt, m({
|
|
576
|
+
"data-orientation": a.orientation,
|
|
576
577
|
"data-state": De(f)
|
|
577
578
|
}, s, o, {
|
|
578
579
|
ref: n,
|
|
579
|
-
disabled:
|
|
580
|
+
disabled: _,
|
|
580
581
|
open: f,
|
|
581
582
|
onOpenChange: (b) => {
|
|
582
583
|
b ? d.onItemOpen(r) : d.onItemClose(r);
|
|
583
584
|
}
|
|
584
585
|
})));
|
|
585
|
-
}), Dt = "AccordionHeader", Mt = /* @__PURE__ */
|
|
586
|
-
const { __scopeAccordion: t, ...r } = e, o = L(
|
|
587
|
-
return /* @__PURE__ */
|
|
586
|
+
}), Dt = "AccordionHeader", Mt = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
587
|
+
const { __scopeAccordion: t, ...r } = e, o = L(k, t), a = ae(Dt, t);
|
|
588
|
+
return /* @__PURE__ */ c.createElement(P.h3, m({
|
|
588
589
|
"data-orientation": o.orientation,
|
|
589
|
-
"data-state": De(
|
|
590
|
-
"data-disabled":
|
|
590
|
+
"data-state": De(a.open),
|
|
591
|
+
"data-disabled": a.disabled ? "" : void 0
|
|
591
592
|
}, r, {
|
|
592
593
|
ref: n
|
|
593
594
|
}));
|
|
594
|
-
}), de = "AccordionTrigger", Vt = /* @__PURE__ */
|
|
595
|
-
const { __scopeAccordion: t, ...r } = e, o = L(
|
|
596
|
-
return /* @__PURE__ */
|
|
595
|
+
}), de = "AccordionTrigger", Vt = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
596
|
+
const { __scopeAccordion: t, ...r } = e, o = L(k, t), a = ae(de, t), d = kt(de, t), s = re(t);
|
|
597
|
+
return /* @__PURE__ */ c.createElement(ne.ItemSlot, {
|
|
597
598
|
scope: t
|
|
598
|
-
}, /* @__PURE__ */
|
|
599
|
-
"aria-disabled":
|
|
599
|
+
}, /* @__PURE__ */ c.createElement(xt, m({
|
|
600
|
+
"aria-disabled": a.open && !d.collapsible || void 0,
|
|
600
601
|
"data-orientation": o.orientation,
|
|
601
|
-
id:
|
|
602
|
+
id: a.triggerId
|
|
602
603
|
}, s, r, {
|
|
603
604
|
ref: n
|
|
604
605
|
})));
|
|
605
|
-
}), Lt = "AccordionContent", Bt = /* @__PURE__ */
|
|
606
|
-
const { __scopeAccordion: t, ...r } = e, o = L(
|
|
607
|
-
return /* @__PURE__ */
|
|
606
|
+
}), Lt = "AccordionContent", Bt = /* @__PURE__ */ c.forwardRef((e, n) => {
|
|
607
|
+
const { __scopeAccordion: t, ...r } = e, o = L(k, t), a = ae(Lt, t), d = re(t);
|
|
608
|
+
return /* @__PURE__ */ c.createElement(wt, m({
|
|
608
609
|
role: "region",
|
|
609
|
-
"aria-labelledby":
|
|
610
|
+
"aria-labelledby": a.triggerId,
|
|
610
611
|
"data-orientation": o.orientation
|
|
611
612
|
}, d, r, {
|
|
612
613
|
ref: n,
|
|
@@ -620,60 +621,60 @@ const [Se, It] = V(N), [Oe, Nt] = V(N, {
|
|
|
620
621
|
function De(e) {
|
|
621
622
|
return e ? "open" : "closed";
|
|
622
623
|
}
|
|
623
|
-
const Ht = Pe, qt =
|
|
624
|
-
({ className: e, variant: n = "default", children: t, indented: r = !1, ...o },
|
|
625
|
-
const d =
|
|
626
|
-
R[
|
|
627
|
-
R[`${
|
|
624
|
+
const Ht = Pe, qt = Ot, jt = Mt, Ft = Vt, Ut = Bt, I = "teddy-accordion", Me = c.forwardRef(
|
|
625
|
+
({ className: e, variant: n = "default", children: t, indented: r = !1, ...o }, a) => {
|
|
626
|
+
const d = u(
|
|
627
|
+
R[I],
|
|
628
|
+
R[`${I}--${n}`],
|
|
628
629
|
{
|
|
629
|
-
[R[`${
|
|
630
|
+
[R[`${I}--indented`]]: r
|
|
630
631
|
},
|
|
631
632
|
e
|
|
632
633
|
);
|
|
633
|
-
return /* @__PURE__ */ l(Ht, { ...o, ref:
|
|
634
|
+
return /* @__PURE__ */ l(Ht, { ...o, ref: a, className: d, children: t });
|
|
634
635
|
}
|
|
635
636
|
);
|
|
636
637
|
Me.displayName = "Accordion";
|
|
637
|
-
const
|
|
638
|
+
const zt = c.forwardRef(
|
|
638
639
|
({ className: e, children: n, ...t }, r) => {
|
|
639
|
-
const o =
|
|
640
|
+
const o = u([R[`${I}__item`]], e);
|
|
640
641
|
return /* @__PURE__ */ l(qt, { ...t, ref: r, className: o, children: n });
|
|
641
642
|
}
|
|
642
|
-
), Ve =
|
|
643
|
+
), Ve = c.forwardRef(
|
|
643
644
|
({ className: e, children: n, ...t }, r) => {
|
|
644
|
-
const o =
|
|
645
|
-
return /* @__PURE__ */ l(
|
|
645
|
+
const o = u([R[`${I}__header`]], e);
|
|
646
|
+
return /* @__PURE__ */ l(jt, { ...t, ref: r, asChild: !0, className: o, children: /* @__PURE__ */ l(Q, { variant: "title-100", ...t.asChild ? { asChild: !0 } : { as: "h3" }, children: n }) });
|
|
646
647
|
}
|
|
647
648
|
);
|
|
648
649
|
Ve.displayName = "Accordion.Header";
|
|
649
|
-
const Le =
|
|
650
|
+
const Le = c.forwardRef(
|
|
650
651
|
({ className: e, children: n, hideIndicator: t, ...r }, o) => {
|
|
651
|
-
const
|
|
652
|
-
return /* @__PURE__ */ K(
|
|
653
|
-
/* @__PURE__ */ l(
|
|
654
|
-
!t && /* @__PURE__ */ l(
|
|
652
|
+
const a = u([R[`${I}__trigger`]], e);
|
|
653
|
+
return /* @__PURE__ */ K(Ft, { ...r, ref: o, className: a, children: [
|
|
654
|
+
/* @__PURE__ */ l(_e, { children: n }),
|
|
655
|
+
!t && /* @__PURE__ */ l(ce, {})
|
|
655
656
|
] });
|
|
656
657
|
}
|
|
657
658
|
);
|
|
658
659
|
Le.displayName = "Accordion.Trigger";
|
|
659
|
-
const
|
|
660
|
+
const ce = c.forwardRef(
|
|
660
661
|
({ className: e, children: n, ...t }, r) => {
|
|
661
|
-
const o =
|
|
662
|
+
const o = u([R[`${I}__indicator`]], e);
|
|
662
663
|
return /* @__PURE__ */ l(J, { "aria-hidden": !0, name: "chevron-down", ...t, ref: r, className: o, children: n });
|
|
663
664
|
}
|
|
664
665
|
);
|
|
665
|
-
|
|
666
|
-
const Be =
|
|
666
|
+
ce.displayName = "Accordion.Indicator";
|
|
667
|
+
const Be = c.forwardRef(
|
|
667
668
|
({ className: e, children: n, ...t }, r) => {
|
|
668
|
-
const o =
|
|
669
|
-
return /* @__PURE__ */ l(
|
|
669
|
+
const o = u([R[`${I}__content`]], e);
|
|
670
|
+
return /* @__PURE__ */ l(Ut, { ...t, ref: r, className: o, children: n });
|
|
670
671
|
}
|
|
671
672
|
);
|
|
672
673
|
Be.displayName = "Accordion.Content";
|
|
673
|
-
const He =
|
|
674
|
+
const He = c.forwardRef(
|
|
674
675
|
({ className: e, children: n, variant: t = "title-300", ...r }, o) => {
|
|
675
|
-
const
|
|
676
|
-
return /* @__PURE__ */ l(Q, { ...r, variant: t, ref: o, className:
|
|
676
|
+
const a = u([R[`${I}__title`]], e);
|
|
677
|
+
return /* @__PURE__ */ l(Q, { ...r, variant: t, ref: o, className: a, children: n });
|
|
677
678
|
}
|
|
678
679
|
);
|
|
679
680
|
He.displayName = "Accordion.Title";
|
|
@@ -681,8 +682,8 @@ const Ro = Object.assign(Me, {
|
|
|
681
682
|
Trigger: Le,
|
|
682
683
|
Content: Be,
|
|
683
684
|
Header: Ve,
|
|
684
|
-
Item:
|
|
685
|
-
Indicator:
|
|
685
|
+
Item: zt,
|
|
686
|
+
Indicator: ce,
|
|
686
687
|
Title: He
|
|
687
688
|
}), se = {
|
|
688
689
|
"teddy-badge": "_teddy-badge_sg6ab_1",
|
|
@@ -702,12 +703,12 @@ function Gt(e) {
|
|
|
702
703
|
if (e === "error")
|
|
703
704
|
return "error";
|
|
704
705
|
}
|
|
705
|
-
const Kt =
|
|
706
|
-
({ className: e, variant: n, asChild: t, children: r, ...o },
|
|
707
|
-
const d =
|
|
708
|
-
return /* @__PURE__ */ K(s, { ...o, ref:
|
|
706
|
+
const Kt = c.forwardRef(
|
|
707
|
+
({ className: e, variant: n, asChild: t, children: r, ...o }, a) => {
|
|
708
|
+
const d = u([se[`${ie}`]], [se[`${ie}--${n}`]], e), s = t ? Fe : "span", i = Gt(n);
|
|
709
|
+
return /* @__PURE__ */ K(s, { ...o, ref: a, className: d, children: [
|
|
709
710
|
!o.hideIcon && i && /* @__PURE__ */ l(J, { name: i }),
|
|
710
|
-
/* @__PURE__ */ l(
|
|
711
|
+
/* @__PURE__ */ l(_e, { children: r })
|
|
711
712
|
] });
|
|
712
713
|
}
|
|
713
714
|
);
|
|
@@ -716,5 +717,5 @@ export {
|
|
|
716
717
|
Ro as A,
|
|
717
718
|
Kt as B,
|
|
718
719
|
vo as C,
|
|
719
|
-
|
|
720
|
+
wo as T
|
|
720
721
|
};
|