konsolpro-custom-ui 0.0.348 → 0.0.349
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/lib/ui/checkbox.js
CHANGED
|
@@ -1,144 +1,144 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
1
|
+
var Z = Object.defineProperty, ee = Object.defineProperties;
|
|
2
|
+
var re = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var N = Object.getOwnPropertySymbols;
|
|
4
|
+
var A = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var q = (e, r, o) => r in e ? Z(e, r, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[r] = o, y = (e, r) => {
|
|
6
|
+
for (var o in r || (r = {}))
|
|
7
|
+
A.call(r, o) && q(e, o, r[o]);
|
|
8
|
+
if (N)
|
|
9
|
+
for (var o of N(r))
|
|
10
|
+
F.call(r, o) && q(e, o, r[o]);
|
|
11
11
|
return e;
|
|
12
|
-
}, g = (e,
|
|
13
|
-
var w = (e,
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var
|
|
19
|
-
|
|
20
|
-
return
|
|
12
|
+
}, g = (e, r) => ee(e, re(r));
|
|
13
|
+
var w = (e, r) => {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var t in e)
|
|
16
|
+
A.call(e, t) && r.indexOf(t) < 0 && (o[t] = e[t]);
|
|
17
|
+
if (e != null && N)
|
|
18
|
+
for (var t of N(e))
|
|
19
|
+
r.indexOf(t) < 0 && F.call(e, t) && (o[t] = e[t]);
|
|
20
|
+
return o;
|
|
21
21
|
};
|
|
22
|
-
import { jsx as
|
|
23
|
-
import * as
|
|
24
|
-
import
|
|
25
|
-
import { u as
|
|
22
|
+
import { jsx as d, jsxs as B, Fragment as oe } from "react/jsx-runtime";
|
|
23
|
+
import * as b from "react";
|
|
24
|
+
import D from "react";
|
|
25
|
+
import { u as O } from "../../chunks/index-DLcqcWxM.js";
|
|
26
26
|
import { c as te } from "../../chunks/index-E4d_Gd-w.js";
|
|
27
|
-
import { c as
|
|
28
|
-
import { u as
|
|
29
|
-
import { u as
|
|
30
|
-
import { u as
|
|
31
|
-
import { P as
|
|
32
|
-
import { P as
|
|
33
|
-
import { c as
|
|
34
|
-
import { c as
|
|
35
|
-
import { Icon as
|
|
36
|
-
var
|
|
37
|
-
function
|
|
27
|
+
import { c as L } from "../../chunks/index-DLeNytVF.js";
|
|
28
|
+
import { u as ne } from "../../chunks/index-DYfkNB0n.js";
|
|
29
|
+
import { u as ae } from "../../chunks/index-BZPx6jYI.js";
|
|
30
|
+
import { u as ce } from "../../chunks/index-CHDs-SiB.js";
|
|
31
|
+
import { P as se } from "../../chunks/index-PsqJG3fE.js";
|
|
32
|
+
import { P as T } from "../../chunks/index-BJD1rYeT.js";
|
|
33
|
+
import { c as V } from "../../chunks/index-BO6p208a.js";
|
|
34
|
+
import { c as P } from "../../chunks/utils-TbLXCoKm.js";
|
|
35
|
+
import { Icon as ie } from "../icon/icon.js";
|
|
36
|
+
var S = "Checkbox", [de, Se] = te(S), [le, M] = de(S);
|
|
37
|
+
function ue(e) {
|
|
38
38
|
const {
|
|
39
|
-
__scopeCheckbox:
|
|
40
|
-
checked:
|
|
41
|
-
children:
|
|
39
|
+
__scopeCheckbox: r,
|
|
40
|
+
checked: o,
|
|
41
|
+
children: t,
|
|
42
42
|
defaultChecked: a,
|
|
43
|
-
disabled:
|
|
44
|
-
form:
|
|
43
|
+
disabled: l,
|
|
44
|
+
form: c,
|
|
45
45
|
name: n,
|
|
46
|
-
onCheckedChange:
|
|
47
|
-
required:
|
|
46
|
+
onCheckedChange: m,
|
|
47
|
+
required: v,
|
|
48
48
|
value: p = "on",
|
|
49
49
|
// @ts-expect-error
|
|
50
|
-
internal_do_not_use_render:
|
|
51
|
-
} = e, [
|
|
52
|
-
prop:
|
|
50
|
+
internal_do_not_use_render: k
|
|
51
|
+
} = e, [C, h] = ne({
|
|
52
|
+
prop: o,
|
|
53
53
|
defaultProp: a != null ? a : !1,
|
|
54
|
-
onChange:
|
|
55
|
-
caller:
|
|
56
|
-
}), [
|
|
54
|
+
onChange: m,
|
|
55
|
+
caller: S
|
|
56
|
+
}), [u, R] = b.useState(null), [_, x] = b.useState(null), f = b.useRef(!1), s = u ? !!c || !!u.closest("form") : (
|
|
57
57
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
58
58
|
!0
|
|
59
|
-
),
|
|
60
|
-
checked:
|
|
61
|
-
disabled:
|
|
62
|
-
setChecked:
|
|
63
|
-
control:
|
|
59
|
+
), i = {
|
|
60
|
+
checked: C,
|
|
61
|
+
disabled: l,
|
|
62
|
+
setChecked: h,
|
|
63
|
+
control: u,
|
|
64
64
|
setControl: R,
|
|
65
65
|
name: n,
|
|
66
|
-
form:
|
|
66
|
+
form: c,
|
|
67
67
|
value: p,
|
|
68
|
-
hasConsumerStoppedPropagationRef:
|
|
69
|
-
required:
|
|
68
|
+
hasConsumerStoppedPropagationRef: f,
|
|
69
|
+
required: v,
|
|
70
70
|
defaultChecked: I(a) ? !1 : a,
|
|
71
|
-
isFormControl:
|
|
72
|
-
bubbleInput:
|
|
73
|
-
setBubbleInput:
|
|
71
|
+
isFormControl: s,
|
|
72
|
+
bubbleInput: _,
|
|
73
|
+
setBubbleInput: x
|
|
74
74
|
};
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
g(
|
|
78
|
-
scope:
|
|
79
|
-
},
|
|
80
|
-
children:
|
|
75
|
+
return /* @__PURE__ */ d(
|
|
76
|
+
le,
|
|
77
|
+
g(y({
|
|
78
|
+
scope: r
|
|
79
|
+
}, i), {
|
|
80
|
+
children: me(k) ? k(i) : t
|
|
81
81
|
})
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
|
-
var
|
|
85
|
-
(
|
|
86
|
-
var
|
|
84
|
+
var H = "CheckboxTrigger", G = b.forwardRef(
|
|
85
|
+
(l, a) => {
|
|
86
|
+
var c = l, { __scopeCheckbox: e, onKeyDown: r, onClick: o } = c, t = w(c, ["__scopeCheckbox", "onKeyDown", "onClick"]);
|
|
87
87
|
const {
|
|
88
88
|
control: n,
|
|
89
|
-
value:
|
|
90
|
-
disabled:
|
|
89
|
+
value: m,
|
|
90
|
+
disabled: v,
|
|
91
91
|
checked: p,
|
|
92
|
-
required:
|
|
93
|
-
setControl:
|
|
94
|
-
setChecked:
|
|
95
|
-
hasConsumerStoppedPropagationRef:
|
|
92
|
+
required: k,
|
|
93
|
+
setControl: C,
|
|
94
|
+
setChecked: h,
|
|
95
|
+
hasConsumerStoppedPropagationRef: u,
|
|
96
96
|
isFormControl: R,
|
|
97
|
-
bubbleInput:
|
|
98
|
-
} =
|
|
99
|
-
return
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
103
|
-
return
|
|
97
|
+
bubbleInput: _
|
|
98
|
+
} = M(H, e), x = O(a, C), f = b.useRef(p);
|
|
99
|
+
return b.useEffect(() => {
|
|
100
|
+
const s = n == null ? void 0 : n.form;
|
|
101
|
+
if (s) {
|
|
102
|
+
const i = () => h(f.current);
|
|
103
|
+
return s.addEventListener("reset", i), () => s.removeEventListener("reset", i);
|
|
104
104
|
}
|
|
105
|
-
}, [n,
|
|
106
|
-
|
|
107
|
-
g(
|
|
105
|
+
}, [n, h]), /* @__PURE__ */ d(
|
|
106
|
+
T.button,
|
|
107
|
+
g(y({
|
|
108
108
|
type: "button",
|
|
109
109
|
role: "checkbox",
|
|
110
110
|
"aria-checked": I(p) ? "mixed" : p,
|
|
111
|
-
"aria-required":
|
|
112
|
-
"data-state":
|
|
113
|
-
"data-disabled":
|
|
114
|
-
disabled:
|
|
115
|
-
value:
|
|
116
|
-
},
|
|
117
|
-
ref:
|
|
118
|
-
onKeyDown:
|
|
119
|
-
|
|
111
|
+
"aria-required": k,
|
|
112
|
+
"data-state": Q(p),
|
|
113
|
+
"data-disabled": v ? "" : void 0,
|
|
114
|
+
disabled: v,
|
|
115
|
+
value: m
|
|
116
|
+
}, t), {
|
|
117
|
+
ref: x,
|
|
118
|
+
onKeyDown: L(r, (s) => {
|
|
119
|
+
s.key === "Enter" && s.preventDefault();
|
|
120
120
|
}),
|
|
121
|
-
onClick:
|
|
122
|
-
|
|
121
|
+
onClick: L(o, (s) => {
|
|
122
|
+
h((i) => I(i) ? !0 : !i), _ && R && (u.current = s.isPropagationStopped(), u.current || s.stopPropagation());
|
|
123
123
|
})
|
|
124
124
|
})
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
);
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
(e,
|
|
131
|
-
const
|
|
132
|
-
__scopeCheckbox:
|
|
133
|
-
name:
|
|
128
|
+
G.displayName = H;
|
|
129
|
+
var K = b.forwardRef(
|
|
130
|
+
(e, r) => {
|
|
131
|
+
const C = e, {
|
|
132
|
+
__scopeCheckbox: o,
|
|
133
|
+
name: t,
|
|
134
134
|
checked: a,
|
|
135
|
-
defaultChecked:
|
|
136
|
-
required:
|
|
135
|
+
defaultChecked: l,
|
|
136
|
+
required: c,
|
|
137
137
|
disabled: n,
|
|
138
|
-
value:
|
|
139
|
-
onCheckedChange:
|
|
138
|
+
value: m,
|
|
139
|
+
onCheckedChange: v,
|
|
140
140
|
form: p
|
|
141
|
-
} =
|
|
141
|
+
} = C, k = w(C, [
|
|
142
142
|
"__scopeCheckbox",
|
|
143
143
|
"name",
|
|
144
144
|
"checked",
|
|
@@ -149,30 +149,30 @@ var G = v.forwardRef(
|
|
|
149
149
|
"onCheckedChange",
|
|
150
150
|
"form"
|
|
151
151
|
]);
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
-
|
|
152
|
+
return /* @__PURE__ */ d(
|
|
153
|
+
ue,
|
|
154
154
|
{
|
|
155
|
-
__scopeCheckbox:
|
|
155
|
+
__scopeCheckbox: o,
|
|
156
156
|
checked: a,
|
|
157
|
-
defaultChecked:
|
|
157
|
+
defaultChecked: l,
|
|
158
158
|
disabled: n,
|
|
159
|
-
required:
|
|
160
|
-
onCheckedChange:
|
|
161
|
-
name:
|
|
159
|
+
required: c,
|
|
160
|
+
onCheckedChange: v,
|
|
161
|
+
name: t,
|
|
162
162
|
form: p,
|
|
163
|
-
value:
|
|
164
|
-
internal_do_not_use_render: ({ isFormControl:
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
|
|
167
|
-
g(
|
|
168
|
-
ref:
|
|
169
|
-
__scopeCheckbox:
|
|
163
|
+
value: m,
|
|
164
|
+
internal_do_not_use_render: ({ isFormControl: h }) => /* @__PURE__ */ B(oe, { children: [
|
|
165
|
+
/* @__PURE__ */ d(
|
|
166
|
+
G,
|
|
167
|
+
g(y({}, k), {
|
|
168
|
+
ref: r,
|
|
169
|
+
__scopeCheckbox: o
|
|
170
170
|
})
|
|
171
171
|
),
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
h && /* @__PURE__ */ d(
|
|
173
|
+
J,
|
|
174
174
|
{
|
|
175
|
-
__scopeCheckbox:
|
|
175
|
+
__scopeCheckbox: o
|
|
176
176
|
}
|
|
177
177
|
)
|
|
178
178
|
] })
|
|
@@ -180,73 +180,73 @@ var G = v.forwardRef(
|
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
(e,
|
|
186
|
-
const
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
|
|
183
|
+
K.displayName = S;
|
|
184
|
+
var U = "CheckboxIndicator", X = b.forwardRef(
|
|
185
|
+
(e, r) => {
|
|
186
|
+
const c = e, { __scopeCheckbox: o, forceMount: t } = c, a = w(c, ["__scopeCheckbox", "forceMount"]), l = M(U, o);
|
|
187
|
+
return /* @__PURE__ */ d(
|
|
188
|
+
se,
|
|
189
189
|
{
|
|
190
|
-
present:
|
|
191
|
-
children: /* @__PURE__ */
|
|
192
|
-
|
|
193
|
-
g(
|
|
194
|
-
"data-state":
|
|
195
|
-
"data-disabled":
|
|
190
|
+
present: t || I(l.checked) || l.checked === !0,
|
|
191
|
+
children: /* @__PURE__ */ d(
|
|
192
|
+
T.span,
|
|
193
|
+
g(y({
|
|
194
|
+
"data-state": Q(l.checked),
|
|
195
|
+
"data-disabled": l.disabled ? "" : void 0
|
|
196
196
|
}, a), {
|
|
197
|
-
ref:
|
|
198
|
-
style:
|
|
197
|
+
ref: r,
|
|
198
|
+
style: y({ pointerEvents: "none" }, e.style)
|
|
199
199
|
})
|
|
200
200
|
)
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
);
|
|
205
|
-
|
|
206
|
-
var
|
|
207
|
-
(
|
|
208
|
-
var a =
|
|
205
|
+
X.displayName = U;
|
|
206
|
+
var $ = "CheckboxBubbleInput", J = b.forwardRef(
|
|
207
|
+
(t, o) => {
|
|
208
|
+
var a = t, { __scopeCheckbox: e } = a, r = w(a, ["__scopeCheckbox"]);
|
|
209
209
|
const {
|
|
210
|
-
control:
|
|
211
|
-
hasConsumerStoppedPropagationRef:
|
|
210
|
+
control: l,
|
|
211
|
+
hasConsumerStoppedPropagationRef: c,
|
|
212
212
|
checked: n,
|
|
213
|
-
defaultChecked:
|
|
214
|
-
required:
|
|
213
|
+
defaultChecked: m,
|
|
214
|
+
required: v,
|
|
215
215
|
disabled: p,
|
|
216
|
-
name:
|
|
217
|
-
value:
|
|
218
|
-
form:
|
|
219
|
-
bubbleInput:
|
|
216
|
+
name: k,
|
|
217
|
+
value: C,
|
|
218
|
+
form: h,
|
|
219
|
+
bubbleInput: u,
|
|
220
220
|
setBubbleInput: R
|
|
221
|
-
} =
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
if (!
|
|
225
|
-
const E = window.HTMLInputElement.prototype,
|
|
221
|
+
} = M($, e), _ = O(o, R), x = ae(n), f = ce(l);
|
|
222
|
+
b.useEffect(() => {
|
|
223
|
+
const i = u;
|
|
224
|
+
if (!i) return;
|
|
225
|
+
const E = window.HTMLInputElement.prototype, j = Object.getOwnPropertyDescriptor(
|
|
226
226
|
E,
|
|
227
227
|
"checked"
|
|
228
|
-
).set,
|
|
229
|
-
if (
|
|
230
|
-
const
|
|
231
|
-
|
|
228
|
+
).set, W = !c.current;
|
|
229
|
+
if (x !== n && j) {
|
|
230
|
+
const Y = new Event("click", { bubbles: W });
|
|
231
|
+
i.indeterminate = I(n), j.call(i, I(n) ? !1 : n), i.dispatchEvent(Y);
|
|
232
232
|
}
|
|
233
|
-
}, [
|
|
234
|
-
const
|
|
235
|
-
return /* @__PURE__ */
|
|
236
|
-
|
|
237
|
-
g(
|
|
233
|
+
}, [u, x, n, c]);
|
|
234
|
+
const s = b.useRef(I(n) ? !1 : n);
|
|
235
|
+
return /* @__PURE__ */ d(
|
|
236
|
+
T.input,
|
|
237
|
+
g(y({
|
|
238
238
|
type: "checkbox",
|
|
239
239
|
"aria-hidden": !0,
|
|
240
|
-
defaultChecked:
|
|
241
|
-
required:
|
|
240
|
+
defaultChecked: m != null ? m : s.current,
|
|
241
|
+
required: v,
|
|
242
242
|
disabled: p,
|
|
243
|
-
name:
|
|
244
|
-
value:
|
|
245
|
-
form:
|
|
246
|
-
},
|
|
243
|
+
name: k,
|
|
244
|
+
value: C,
|
|
245
|
+
form: h
|
|
246
|
+
}, r), {
|
|
247
247
|
tabIndex: -1,
|
|
248
|
-
ref:
|
|
249
|
-
style: g(
|
|
248
|
+
ref: _,
|
|
249
|
+
style: g(y(y({}, r.style), f), {
|
|
250
250
|
position: "absolute",
|
|
251
251
|
pointerEvents: "none",
|
|
252
252
|
opacity: 0,
|
|
@@ -260,17 +260,17 @@ var X = "CheckboxBubbleInput", $ = v.forwardRef(
|
|
|
260
260
|
);
|
|
261
261
|
}
|
|
262
262
|
);
|
|
263
|
-
|
|
264
|
-
function
|
|
263
|
+
J.displayName = $;
|
|
264
|
+
function me(e) {
|
|
265
265
|
return typeof e == "function";
|
|
266
266
|
}
|
|
267
267
|
function I(e) {
|
|
268
268
|
return e === "indeterminate";
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Q(e) {
|
|
271
271
|
return I(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
272
272
|
}
|
|
273
|
-
const pe =
|
|
273
|
+
const pe = V(
|
|
274
274
|
"group peer cursor-pointer border-border focus:border-primary focus:shadow-focus disabled:cursor-not-allowed shrink-0 rounded-sm border focus:outline-none flex items-center justify-center",
|
|
275
275
|
{
|
|
276
276
|
variants: {
|
|
@@ -294,7 +294,7 @@ const pe = O(
|
|
|
294
294
|
isDisabled: !1
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
),
|
|
297
|
+
), he = V(
|
|
298
298
|
"rounded-[2px] bg-primary shrink-0 group-hover:bg-primary-hover group-disabled:group-hover:bg-primary group-active:bg-primary-active",
|
|
299
299
|
{
|
|
300
300
|
variants: {
|
|
@@ -305,59 +305,60 @@ const pe = O(
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
);
|
|
308
|
-
function
|
|
308
|
+
function fe(e) {
|
|
309
309
|
const {
|
|
310
|
-
className:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
310
|
+
className: r,
|
|
311
|
+
checkboxClassName: o,
|
|
312
|
+
size: t = "md",
|
|
313
|
+
label: a,
|
|
314
|
+
disabled: l,
|
|
315
|
+
checked: c,
|
|
316
|
+
id: n,
|
|
317
|
+
onCheckedChange: m,
|
|
318
|
+
ref: v,
|
|
319
|
+
"data-testid": p
|
|
320
|
+
} = e, k = t === "md" ? 16 : 24, C = D.useId(), h = n || C, u = l || !1, [R, _] = D.useState(!1), x = c !== void 0, f = x ? c : R, s = () => f === !0 ? "checked" : f === "indeterminate" ? "indeterminate" : "unchecked", i = (z) => {
|
|
321
|
+
x && m ? m(z) : x || _(z);
|
|
322
|
+
}, E = /* @__PURE__ */ d(
|
|
323
|
+
K,
|
|
323
324
|
{
|
|
324
|
-
ref:
|
|
325
|
-
id:
|
|
326
|
-
className:
|
|
327
|
-
pe({ size:
|
|
328
|
-
|
|
325
|
+
ref: v,
|
|
326
|
+
id: h,
|
|
327
|
+
className: P(
|
|
328
|
+
pe({ size: t, state: s(), isDisabled: u }),
|
|
329
|
+
o || (a ? void 0 : r)
|
|
329
330
|
),
|
|
330
331
|
disabled: u,
|
|
331
|
-
checked:
|
|
332
|
+
checked: f,
|
|
332
333
|
onCheckedChange: i,
|
|
333
|
-
"data-testid":
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
-
|
|
336
|
-
|
|
334
|
+
"data-testid": p,
|
|
335
|
+
children: /* @__PURE__ */ B(X, { className: "flex h-full w-full items-center justify-center", children: [
|
|
336
|
+
f === "indeterminate" && /* @__PURE__ */ d("div", { className: he({ size: t }) }),
|
|
337
|
+
f === !0 && /* @__PURE__ */ d(ie, { icon: "DoneIcon", size: k, className: "text-white" })
|
|
337
338
|
] })
|
|
338
339
|
}
|
|
339
340
|
);
|
|
340
|
-
return
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
341
|
+
return a ? /* @__PURE__ */ B("div", { className: P("items-top flex flex-row space-x-2", r), children: [
|
|
342
|
+
/* @__PURE__ */ d("div", { className: P(t === "md" && "pt-0.5"), children: E }),
|
|
343
|
+
/* @__PURE__ */ d(
|
|
343
344
|
"label",
|
|
344
345
|
{
|
|
345
|
-
htmlFor:
|
|
346
|
-
className:
|
|
346
|
+
htmlFor: h,
|
|
347
|
+
className: P(
|
|
347
348
|
"font-graphik m-0 cursor-pointer text-[14px] leading-[20px] font-normal",
|
|
348
349
|
u && "cursor-not-allowed opacity-40",
|
|
349
|
-
|
|
350
|
+
t === "lg" && "pt-0.5"
|
|
350
351
|
),
|
|
351
|
-
children:
|
|
352
|
+
children: a
|
|
352
353
|
}
|
|
353
354
|
)
|
|
354
|
-
] }) :
|
|
355
|
+
] }) : E;
|
|
355
356
|
}
|
|
356
|
-
const ze =
|
|
357
|
-
(e,
|
|
357
|
+
const ze = D.forwardRef(
|
|
358
|
+
(e, r) => /* @__PURE__ */ d(fe, g(y({}, e), { ref: r }))
|
|
358
359
|
);
|
|
359
360
|
export {
|
|
360
361
|
ze as Checkbox,
|
|
361
362
|
pe as checkboxVariants,
|
|
362
|
-
|
|
363
|
+
he as indicatorVariants
|
|
363
364
|
};
|
|
@@ -12,6 +12,7 @@ export type CheckboxSize = 'md' | 'lg';
|
|
|
12
12
|
type CheckboxValue = boolean | 'indeterminate';
|
|
13
13
|
interface CheckboxProps<T extends CheckboxValue> {
|
|
14
14
|
className?: string;
|
|
15
|
+
checkboxClassName?: string;
|
|
15
16
|
size?: CheckboxSize;
|
|
16
17
|
label?: string | ReactElement;
|
|
17
18
|
disabled?: boolean;
|