@vellira-ui/react 2.98.4 → 2.98.6
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/index.cjs +1 -1
- package/dist/index.js +46 -41
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55,8 +55,8 @@ function ce({ children: e, disabled: t = !1, contentId: n, expanded: r = !1, onA
|
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/components/Accordion/Root/AccordionRoot.tsx
|
|
58
|
-
function le(
|
|
59
|
-
let m = l(), h = i !== void 0, [_, v] = p(s ?? (
|
|
58
|
+
function le(t) {
|
|
59
|
+
let { children: r, value: i, defaultValue: s, disabled: c = !1 } = t, u = t.type ?? "single", f = t.type === "multiple" ? !1 : t.collapsible ?? !1, m = l(), h = i !== void 0, [_, v] = p(s ?? (u === "multiple" ? [] : "")), y = d(() => {
|
|
60
60
|
let e = (h ? i : _) ?? [];
|
|
61
61
|
return Array.isArray(e) ? e : e ? [e] : [];
|
|
62
62
|
}, [
|
|
@@ -64,25 +64,29 @@ function le({ children: t, type: r = "single", value: i, defaultValue: s, onValu
|
|
|
64
64
|
_,
|
|
65
65
|
i
|
|
66
66
|
]), b = o((e) => {
|
|
67
|
-
if (
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
if (c) return;
|
|
68
|
+
let n = y.includes(e);
|
|
69
|
+
if (t.type === "multiple") {
|
|
70
|
+
let r = n ? y.filter((t) => t !== e) : [...y, e];
|
|
71
|
+
h || v(r), t.onValueChange?.(r);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let r = (n ? f ? [] : y : [e])[0] ?? "";
|
|
75
|
+
h || v(r), t.onValueChange?.(r);
|
|
72
76
|
}, [
|
|
73
|
-
u,
|
|
74
77
|
f,
|
|
78
|
+
c,
|
|
75
79
|
y,
|
|
76
80
|
h,
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
t.onValueChange,
|
|
82
|
+
t.type
|
|
79
83
|
]);
|
|
80
84
|
return /* @__PURE__ */ g("div", {
|
|
81
85
|
className: ae.root,
|
|
82
|
-
"data-disabled":
|
|
83
|
-
children: e.map(
|
|
86
|
+
"data-disabled": c || void 0,
|
|
87
|
+
children: e.map(r, (t) => {
|
|
84
88
|
if (!a(t) || t.type !== se) return t;
|
|
85
|
-
let r = t, i =
|
|
89
|
+
let r = t, i = c || !!r.props.disabled, o = y.includes(r.props.value), s = `${m}-accordion-content-${r.props.value}`, l = e.map(r.props.children, (e) => a(e) ? e.type === ce ? n(e, {
|
|
86
90
|
contentId: s,
|
|
87
91
|
disabled: i,
|
|
88
92
|
expanded: o,
|
|
@@ -93,7 +97,7 @@ function le({ children: t, type: r = "single", value: i, defaultValue: s, onValu
|
|
|
93
97
|
}) : e : e);
|
|
94
98
|
return n(r, {
|
|
95
99
|
className: `${ae.item} ${o ? ae.expanded : ""}`,
|
|
96
|
-
children:
|
|
100
|
+
children: l
|
|
97
101
|
});
|
|
98
102
|
})
|
|
99
103
|
});
|
|
@@ -2322,28 +2326,28 @@ function Gn() {
|
|
|
2322
2326
|
return s(Un);
|
|
2323
2327
|
}
|
|
2324
2328
|
var Kn = {
|
|
2325
|
-
root: "
|
|
2326
|
-
invalid: "
|
|
2327
|
-
control: "
|
|
2328
|
-
label: "
|
|
2329
|
-
wrapper: "
|
|
2330
|
-
input: "
|
|
2331
|
-
disabled: "
|
|
2332
|
-
description: "
|
|
2333
|
-
colorPrimary: "
|
|
2334
|
-
colorNeutral: "
|
|
2335
|
-
colorSuccess: "
|
|
2336
|
-
colorWarning: "
|
|
2337
|
-
colorDanger: "
|
|
2338
|
-
sm: "
|
|
2339
|
-
md: "
|
|
2340
|
-
lg: "
|
|
2341
|
-
indicator: "
|
|
2342
|
-
customIcon: "
|
|
2343
|
-
"radio-pop": "_radio-
|
|
2344
|
-
"radio-indicator-in": "_radio-indicator-
|
|
2345
|
-
content: "
|
|
2346
|
-
error: "
|
|
2329
|
+
root: "_root_goond_1",
|
|
2330
|
+
invalid: "_invalid_goond_34",
|
|
2331
|
+
control: "_control_goond_34",
|
|
2332
|
+
label: "_label_goond_37",
|
|
2333
|
+
wrapper: "_wrapper_goond_40",
|
|
2334
|
+
input: "_input_goond_41",
|
|
2335
|
+
disabled: "_disabled_goond_44",
|
|
2336
|
+
description: "_description_goond_52",
|
|
2337
|
+
colorPrimary: "_colorPrimary_goond_56",
|
|
2338
|
+
colorNeutral: "_colorNeutral_goond_72",
|
|
2339
|
+
colorSuccess: "_colorSuccess_goond_88",
|
|
2340
|
+
colorWarning: "_colorWarning_goond_104",
|
|
2341
|
+
colorDanger: "_colorDanger_goond_120",
|
|
2342
|
+
sm: "_sm_goond_136",
|
|
2343
|
+
md: "_md_goond_145",
|
|
2344
|
+
lg: "_lg_goond_154",
|
|
2345
|
+
indicator: "_indicator_goond_209",
|
|
2346
|
+
customIcon: "_customIcon_goond_223",
|
|
2347
|
+
"radio-pop": "_radio-pop_goond_1",
|
|
2348
|
+
"radio-indicator-in": "_radio-indicator-in_goond_1",
|
|
2349
|
+
content: "_content_goond_346",
|
|
2350
|
+
error: "_error_goond_363"
|
|
2347
2351
|
}, qn = {
|
|
2348
2352
|
primary: Kn.colorPrimary,
|
|
2349
2353
|
neutral: Kn.colorNeutral,
|
|
@@ -4287,8 +4291,8 @@ function Di() {
|
|
|
4287
4291
|
return s(Ci);
|
|
4288
4292
|
}
|
|
4289
4293
|
var Oi = {
|
|
4290
|
-
tooltip: "
|
|
4291
|
-
arrow: "
|
|
4294
|
+
tooltip: "_tooltip_god78_1",
|
|
4295
|
+
arrow: "_arrow_god78_25"
|
|
4292
4296
|
}, ki = i(({ children: e, forceMount: t = !1, withArrow: n = !1, className: r, style: i, ...a }, o) => {
|
|
4293
4297
|
let s = Ei();
|
|
4294
4298
|
if (!t && !s.open) return null;
|
|
@@ -4312,19 +4316,20 @@ var Oi = {
|
|
|
4312
4316
|
});
|
|
4313
4317
|
ki.displayName = "Tooltip.Content";
|
|
4314
4318
|
function Ai() {
|
|
4315
|
-
let e = Ei(), t = {
|
|
4319
|
+
let e = Ei(), t = e.placement.split("-")[0], n = {
|
|
4316
4320
|
top: "bottom",
|
|
4317
4321
|
right: "left",
|
|
4318
4322
|
bottom: "top",
|
|
4319
4323
|
left: "right"
|
|
4320
|
-
}[
|
|
4324
|
+
}[t];
|
|
4321
4325
|
return /* @__PURE__ */ g("div", {
|
|
4322
4326
|
ref: e.arrowRef,
|
|
4323
4327
|
className: Oi.arrow,
|
|
4328
|
+
"data-side": t,
|
|
4324
4329
|
style: {
|
|
4325
4330
|
left: e.arrowX == null ? void 0 : `${e.arrowX}px`,
|
|
4326
4331
|
top: e.arrowY == null ? void 0 : `${e.arrowY}px`,
|
|
4327
|
-
[
|
|
4332
|
+
[n]: "calc(var(--tooltip-arrow-size) / -2)"
|
|
4328
4333
|
}
|
|
4329
4334
|
});
|
|
4330
4335
|
}
|