@yuno-payments/dashboard-design-system 0.0.184 → 0.0.185
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.
|
@@ -61,13 +61,13 @@ const P = f(
|
|
|
61
61
|
o && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
62
62
|
/* @__PURE__ */ e.jsx(p, { orientation: "vertical", className: "h-5" }),
|
|
63
63
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
64
|
-
x.map((
|
|
64
|
+
x.map((d) => /* @__PURE__ */ e.jsx(
|
|
65
65
|
F,
|
|
66
66
|
{
|
|
67
|
-
label:
|
|
68
|
-
onRemove: () => t?.(
|
|
67
|
+
label: d.label,
|
|
68
|
+
onRemove: () => t?.(d.id)
|
|
69
69
|
},
|
|
70
|
-
|
|
70
|
+
d.id
|
|
71
71
|
)),
|
|
72
72
|
u > 0 && /* @__PURE__ */ e.jsx(C, { variant: "default", className: "h-8 px-3 py-2 shadow-xs", children: /* @__PURE__ */ e.jsxs("span", { className: "text-xs font-medium leading-none", children: [
|
|
73
73
|
"+",
|
|
@@ -105,23 +105,23 @@ const X = f(
|
|
|
105
105
|
showActions: o = !1,
|
|
106
106
|
enableSelectAll: x = !0,
|
|
107
107
|
enableInverse: u = !0,
|
|
108
|
-
enableNone:
|
|
109
|
-
} = s,
|
|
108
|
+
enableNone: d = !0
|
|
109
|
+
} = s, m = s.type || "checkbox", w = m === "radio", z = m === "checkbox" || !s.type, [N, I] = A(""), b = M(() => N ? l.filter(
|
|
110
110
|
(a) => a.label.toLowerCase().includes(N.toLowerCase())
|
|
111
111
|
) : l, [l, N]), R = () => {
|
|
112
|
-
if (
|
|
112
|
+
if (m === "checkbox" && "selectedValues" in s) {
|
|
113
113
|
const a = l.map((h) => h.value);
|
|
114
114
|
s.onChange(a);
|
|
115
115
|
}
|
|
116
116
|
}, T = () => {
|
|
117
|
-
if (
|
|
117
|
+
if (m === "checkbox" && "selectedValues" in s) {
|
|
118
118
|
const a = l.filter((h) => !s.selectedValues.includes(h.value)).map((h) => h.value);
|
|
119
119
|
s.onChange(a);
|
|
120
120
|
}
|
|
121
121
|
}, B = () => {
|
|
122
|
-
|
|
122
|
+
m === "checkbox" && "selectedValues" in s ? s.onChange([]) : m === "radio" && "selectedValue" in s && s.onChange("");
|
|
123
123
|
}, G = (a) => {
|
|
124
|
-
if (
|
|
124
|
+
if (m === "checkbox" && "selectedValues" in s) {
|
|
125
125
|
const O = s.selectedValues.includes(a) ? s.selectedValues.filter(($) => $ !== a) : [...s.selectedValues, a];
|
|
126
126
|
s.onChange(O);
|
|
127
127
|
}
|
|
@@ -139,7 +139,7 @@ const X = f(
|
|
|
139
139
|
),
|
|
140
140
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between mb-1", children: [
|
|
141
141
|
/* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-foreground", children: n }),
|
|
142
|
-
o &&
|
|
142
|
+
o && m === "checkbox" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
|
|
143
143
|
x && /* @__PURE__ */ e.jsx(
|
|
144
144
|
j,
|
|
145
145
|
{
|
|
@@ -160,7 +160,7 @@ const X = f(
|
|
|
160
160
|
children: "Inverse"
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
|
|
163
|
+
d && /* @__PURE__ */ e.jsx(
|
|
164
164
|
j,
|
|
165
165
|
{
|
|
166
166
|
variant: "link",
|
|
@@ -213,9 +213,9 @@ const V = f(({ label: s, checked: t, onCheckedChange: n, description: l, classNa
|
|
|
213
213
|
{
|
|
214
214
|
src: r,
|
|
215
215
|
alt: "",
|
|
216
|
-
className: "size-4 object-contain shrink-0",
|
|
217
|
-
onError: (
|
|
218
|
-
|
|
216
|
+
className: "size-4 object-contain shrink-0 mt-1",
|
|
217
|
+
onError: (d) => {
|
|
218
|
+
d.currentTarget.style.display = "none";
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
),
|