@midas-ds/components 1.1.0 → 1.3.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/CHANGELOG.md +63 -1
- package/accordion/AccordionItem.d.ts +2 -2
- package/index.cjs +138 -0
- package/index.css +1 -0
- package/index.d.ts +0 -2
- package/index.js +27094 -105
- package/package.json +22 -4
- package/table/Table.d.ts +3 -4
- package/textfield/TextField.d.ts +15 -4
- package/theme.cjs +1 -0
- package/theme.js +20 -0
- package/tokens-BskyMDHv.cjs +1 -0
- package/Breadcrumbs.css +0 -1
- package/Button-DL6nqUco.js +0 -182
- package/Button.css +0 -1
- package/ButtonGroup.css +0 -1
- package/Card.css +0 -1
- package/Checkbox-q0dugR2t.js +0 -402
- package/Checkbox.css +0 -1
- package/Collection-KMFfVuzU.js +0 -510
- package/ComboBox.css +0 -1
- package/DatePicker.css +0 -1
- package/Dialog-D6Bqrpn-.js +0 -1952
- package/Disclosure-dAZYXyTH.js +0 -225
- package/Disclosure.css +0 -1
- package/DragAndDrop-B0T3WgjL.js +0 -40
- package/Dropdown.css +0 -1
- package/FileUpload.css +0 -1
- package/Flex.css +0 -1
- package/Flex.module-CpoxBzQX.js +0 -37
- package/FocusScope-B7CkxXNC.js +0 -513
- package/Form-BWBjJC6v.js +0 -238
- package/Grid.css +0 -1
- package/Grid.module-Ia0e9Dix.js +0 -36
- package/Group-D7_8007y.js +0 -42
- package/Heading-RCRHv6hd.js +0 -15
- package/Hidden-CVlUgUJM.js +0 -37
- package/InfoBanner.css +0 -1
- package/Layout.css +0 -1
- package/Link-BnQvB-hH.js +0 -75
- package/Link.css +0 -1
- package/LinkButton.css +0 -1
- package/ListBox-DBBiqvcR.js +0 -474
- package/ListKeyboardDelegate-gCXy-Xnn.js +0 -172
- package/Logo.css +0 -1
- package/Modal.css +0 -1
- package/MultiSelect.css +0 -1
- package/PressResponder-B4g56kDz.js +0 -31
- package/RSPContexts-BW2SEIqe.js +0 -11
- package/Radio.css +0 -1
- package/SearchField.css +0 -1
- package/Select.css +0 -1
- package/SelectionManager-BfXUE1qg.js +0 -1031
- package/Separator-BBX9m2O2.js +0 -49
- package/Spinner.css +0 -1
- package/Table.css +0 -1
- package/Tabs.css +0 -1
- package/Tag-DWt0koFj.js +0 -728
- package/Tag.css +0 -1
- package/Text-BCF0xvqL.js +0 -15
- package/TextArea.css +0 -1
- package/TextField-CX4eOQf6.js +0 -225
- package/TextField.css +0 -1
- package/TextField.module-DdICj682.js +0 -143
- package/Toast.css +0 -1
- package/VisuallyHidden-Dhr5caPC.js +0 -39
- package/chevron-down-Cd1bkzXT.js +0 -13
- package/chevron-right-DBMc9VMi.js +0 -23
- package/clsx-OuTLNxxd.js +0 -16
- package/context-BpJLnOuu.js +0 -80
- package/createLucideIcon-DeWljiyi.js +0 -79
- package/index-B-jHjTDC.js +0 -120
- package/index-BPdc9gJ8.js +0 -3122
- package/index-KSgQWWiy.js +0 -26984
- package/index10.js +0 -4
- package/index11.js +0 -5
- package/index12.js +0 -4
- package/index13.js +0 -4
- package/index14.js +0 -4
- package/index15.js +0 -6
- package/index16.js +0 -6
- package/index17.js +0 -6
- package/index18.js +0 -4
- package/index19.js +0 -6
- package/index2.js +0 -8
- package/index20.js +0 -6
- package/index21.js +0 -4
- package/index22.js +0 -5
- package/index23.js +0 -5
- package/index24.js +0 -5
- package/index25.js +0 -6
- package/index26.js +0 -6
- package/index27.js +0 -6
- package/index28.js +0 -4
- package/index29.js +0 -6
- package/index3.js +0 -6
- package/index30.js +0 -21
- package/index31.js +0 -22
- package/index32.js +0 -14
- package/index33.js +0 -11
- package/index34.js +0 -31
- package/index35.js +0 -8
- package/index36.js +0 -9
- package/index37.js +0 -19
- package/index38.js +0 -9
- package/index39.js +0 -9
- package/index4.js +0 -4
- package/index40.js +0 -23
- package/index41.js +0 -63
- package/index42.js +0 -53
- package/index43.js +0 -18
- package/index44.js +0 -27
- package/index45.js +0 -18
- package/index46.js +0 -21
- package/index47.js +0 -49
- package/index48.js +0 -5
- package/index49.js +0 -25
- package/index5.js +0 -5
- package/index50.js +0 -18
- package/index51.js +0 -9
- package/index52.js +0 -25
- package/index53.js +0 -18
- package/index54.js +0 -11
- package/index55.js +0 -12
- package/index56.js +0 -15
- package/index57.js +0 -9
- package/index58.js +0 -9
- package/index59.js +0 -19
- package/index6.js +0 -4
- package/index60.js +0 -22
- package/index61.js +0 -61
- package/index62.js +0 -15
- package/index63.js +0 -11
- package/index64.js +0 -53
- package/index65.js +0 -85
- package/index66.js +0 -74
- package/index67.js +0 -24
- package/index68.js +0 -69
- package/index69.js +0 -80
- package/index7.js +0 -9
- package/index70.js +0 -140
- package/index71.js +0 -70
- package/index72.js +0 -42
- package/index73.js +0 -82
- package/index74.js +0 -71
- package/index75.js +0 -104
- package/index76.js +0 -275
- package/index77.js +0 -723
- package/index78.js +0 -489
- package/index79.js +0 -314
- package/index8.js +0 -4
- package/index80.js +0 -389
- package/index81.js +0 -252
- package/index82.js +0 -1364
- package/index83.js +0 -1009
- package/index84.js +0 -386
- package/index85.js +0 -2101
- package/index86.js +0 -2368
- package/index87.js +0 -6831
- package/index88.js +0 -17
- package/index89.js +0 -14
- package/index9.js +0 -5
- package/index90.js +0 -6
- package/index91.js +0 -9
- package/intlStrings-Cd44R5hT.js +0 -278
- package/react.esm-sMU8Z7rL.js +0 -11060
- package/triangle-alert-1OYl9KWz.js +0 -56
- package/useControlledState-Kv9K2AYu.js +0 -30
- package/useDescription-B7stiK3j.js +0 -32
- package/useEvent-Xk5kn5Ns.js +0 -21
- package/useField-DMzJIIN4.js +0 -67
- package/useFilter-Bt9dbV1U.js +0 -35
- package/useFocusRing-9PXyKy2A.js +0 -1297
- package/useFocusable-CcEBZe40.js +0 -59
- package/useGridSelectionCheckbox-DYgEnElE.js +0 -22
- package/useHasTabbableChild-D6DwR81L.js +0 -34
- package/useHighlightSelectionDescription-WYAbP4No.js +0 -552
- package/useLabels-9zaZ9oa0.js +0 -17
- package/useListState-BfTeKTk5.js +0 -119
- package/useLocalizedStringFormatter-BlCbn-hX.js +0 -96
- package/useSingleSelectListState-DPkaL0la.js +0 -34
- package/useUpdateEffect-Dtz-i14F.js +0 -12
- package/x-JK7i-TQC.js +0 -14
package/Checkbox-q0dugR2t.js
DELETED
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
import { jsx as P, jsxs as K, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { c as U } from "./clsx-OuTLNxxd.js";
|
|
3
|
-
import { a as X } from "./RSPContexts-BW2SEIqe.js";
|
|
4
|
-
import { n as D, e as g, o as S, f as Y, a as w, y as M, z as Z, d as E, B as ee, i as ae, F as ie, A as q, c as de, b as le } from "./useFocusRing-9PXyKy2A.js";
|
|
5
|
-
import { d as ne, c as B, e as te, f as F, g as se, h as re, $ as W, a as oe } from "./Form-BWBjJC6v.js";
|
|
6
|
-
import { b as ce, $ as fe } from "./useField-DMzJIIN4.js";
|
|
7
|
-
import { $ as ue } from "./Text-BCF0xvqL.js";
|
|
8
|
-
import R, { useEffect as G, useRef as N, forwardRef as L, useContext as be, createContext as j } from "react";
|
|
9
|
-
import { $ as H } from "./useControlledState-Kv9K2AYu.js";
|
|
10
|
-
import { $ as ve } from "./useFocusable-CcEBZe40.js";
|
|
11
|
-
import { a as $e } from "./VisuallyHidden-Dhr5caPC.js";
|
|
12
|
-
import './Checkbox.css';function he(a, e, d) {
|
|
13
|
-
let { isDisabled: t = !1, isReadOnly: s = !1, value: r, name: o, children: l, "aria-label": f, "aria-labelledby": i, validationState: n = "valid", isInvalid: c } = a, v = (y) => {
|
|
14
|
-
y.stopPropagation(), e.setSelected(y.target.checked);
|
|
15
|
-
}, $ = l != null, u = f != null || i != null;
|
|
16
|
-
!$ && !u && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
17
|
-
let { pressProps: b, isPressed: h } = D({
|
|
18
|
-
isDisabled: t
|
|
19
|
-
}), { pressProps: m, isPressed: x } = D({
|
|
20
|
-
isDisabled: t || s,
|
|
21
|
-
onPress() {
|
|
22
|
-
e.toggle();
|
|
23
|
-
}
|
|
24
|
-
}), { focusableProps: I } = ve(a, d), p = g(b, I), V = S(a, {
|
|
25
|
-
labelable: !0
|
|
26
|
-
});
|
|
27
|
-
return ne(d, e.isSelected, e.setSelected), {
|
|
28
|
-
labelProps: g(m, {
|
|
29
|
-
onClick: (y) => y.preventDefault()
|
|
30
|
-
}),
|
|
31
|
-
inputProps: g(V, {
|
|
32
|
-
"aria-invalid": c || n === "invalid" || void 0,
|
|
33
|
-
"aria-errormessage": a["aria-errormessage"],
|
|
34
|
-
"aria-controls": a["aria-controls"],
|
|
35
|
-
"aria-readonly": s || void 0,
|
|
36
|
-
onChange: v,
|
|
37
|
-
disabled: t,
|
|
38
|
-
...r == null ? {} : {
|
|
39
|
-
value: r
|
|
40
|
-
},
|
|
41
|
-
name: o,
|
|
42
|
-
type: "checkbox",
|
|
43
|
-
...p
|
|
44
|
-
}),
|
|
45
|
-
isSelected: e.isSelected,
|
|
46
|
-
isPressed: h || x,
|
|
47
|
-
isDisabled: t,
|
|
48
|
-
isReadOnly: s,
|
|
49
|
-
isInvalid: c || n === "invalid"
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function T(a, e, d) {
|
|
53
|
-
let t = B({
|
|
54
|
-
...a,
|
|
55
|
-
value: e.isSelected
|
|
56
|
-
}), { isInvalid: s, validationErrors: r, validationDetails: o } = t.displayValidation, { labelProps: l, inputProps: f, isSelected: i, isPressed: n, isDisabled: c, isReadOnly: v } = he({
|
|
57
|
-
...a,
|
|
58
|
-
isInvalid: s
|
|
59
|
-
}, e, d);
|
|
60
|
-
te(a, t, d);
|
|
61
|
-
let { isIndeterminate: $, isRequired: u, validationBehavior: b = "aria" } = a;
|
|
62
|
-
G(() => {
|
|
63
|
-
d.current && (d.current.indeterminate = !!$);
|
|
64
|
-
});
|
|
65
|
-
let { pressProps: h } = D({
|
|
66
|
-
isDisabled: c || v,
|
|
67
|
-
onPress() {
|
|
68
|
-
let { [F]: m } = a, { commitValidation: x } = m || t;
|
|
69
|
-
x();
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
return {
|
|
73
|
-
labelProps: g(l, h),
|
|
74
|
-
inputProps: {
|
|
75
|
-
...f,
|
|
76
|
-
checked: i,
|
|
77
|
-
"aria-required": u && b === "aria" || void 0,
|
|
78
|
-
required: u && b === "native"
|
|
79
|
-
},
|
|
80
|
-
isSelected: i,
|
|
81
|
-
isPressed: n,
|
|
82
|
-
isDisabled: c,
|
|
83
|
-
isReadOnly: v,
|
|
84
|
-
isInvalid: s,
|
|
85
|
-
validationErrors: r,
|
|
86
|
-
validationDetails: o
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
const A = /* @__PURE__ */ new WeakMap();
|
|
90
|
-
function me(a, e) {
|
|
91
|
-
let { isDisabled: d, name: t, validationBehavior: s = "aria" } = a, { isInvalid: r, validationErrors: o, validationDetails: l } = e.displayValidation, { labelProps: f, fieldProps: i, descriptionProps: n, errorMessageProps: c } = ce({
|
|
92
|
-
...a,
|
|
93
|
-
// Checkbox group is not an HTML input element so it
|
|
94
|
-
// shouldn't be labeled by a <label> element.
|
|
95
|
-
labelElementType: "span",
|
|
96
|
-
isInvalid: r,
|
|
97
|
-
errorMessage: a.errorMessage || o
|
|
98
|
-
});
|
|
99
|
-
A.set(e, {
|
|
100
|
-
name: t,
|
|
101
|
-
descriptionId: n.id,
|
|
102
|
-
errorMessageId: c.id,
|
|
103
|
-
validationBehavior: s
|
|
104
|
-
});
|
|
105
|
-
let v = S(a, {
|
|
106
|
-
labelable: !0
|
|
107
|
-
}), { focusWithinProps: $ } = Y({
|
|
108
|
-
onBlurWithin: a.onBlur,
|
|
109
|
-
onFocusWithin: a.onFocus,
|
|
110
|
-
onFocusWithinChange: a.onFocusChange
|
|
111
|
-
});
|
|
112
|
-
return {
|
|
113
|
-
groupProps: g(v, {
|
|
114
|
-
role: "group",
|
|
115
|
-
"aria-disabled": d || void 0,
|
|
116
|
-
...i,
|
|
117
|
-
...$
|
|
118
|
-
}),
|
|
119
|
-
labelProps: f,
|
|
120
|
-
descriptionProps: n,
|
|
121
|
-
errorMessageProps: c,
|
|
122
|
-
isInvalid: r,
|
|
123
|
-
validationErrors: o,
|
|
124
|
-
validationDetails: l
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function z(a = {}) {
|
|
128
|
-
let { isReadOnly: e } = a, [d, t] = H(a.isSelected, a.defaultSelected || !1, a.onChange);
|
|
129
|
-
function s(o) {
|
|
130
|
-
e || t(o);
|
|
131
|
-
}
|
|
132
|
-
function r() {
|
|
133
|
-
e || t(!d);
|
|
134
|
-
}
|
|
135
|
-
return {
|
|
136
|
-
isSelected: d,
|
|
137
|
-
setSelected: s,
|
|
138
|
-
toggle: r
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
function ge(a, e, d) {
|
|
142
|
-
const t = z({
|
|
143
|
-
isReadOnly: a.isReadOnly || e.isReadOnly,
|
|
144
|
-
isSelected: e.isSelected(a.value),
|
|
145
|
-
onChange(h) {
|
|
146
|
-
h ? e.addValue(a.value) : e.removeValue(a.value), a.onChange && a.onChange(h);
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
let { name: s, descriptionId: r, errorMessageId: o, validationBehavior: l } = A.get(e);
|
|
150
|
-
var f;
|
|
151
|
-
l = (f = a.validationBehavior) !== null && f !== void 0 ? f : l;
|
|
152
|
-
let { realtimeValidation: i } = B({
|
|
153
|
-
...a,
|
|
154
|
-
value: t.isSelected,
|
|
155
|
-
// Server validation is handled at the group level.
|
|
156
|
-
name: void 0,
|
|
157
|
-
validationBehavior: "aria"
|
|
158
|
-
}), n = N(se), c = () => {
|
|
159
|
-
e.setInvalid(a.value, i.isInvalid ? i : n.current);
|
|
160
|
-
};
|
|
161
|
-
G(c);
|
|
162
|
-
let v = e.realtimeValidation.isInvalid ? e.realtimeValidation : i, $ = l === "native" ? e.displayValidation : v;
|
|
163
|
-
var u;
|
|
164
|
-
let b = T({
|
|
165
|
-
...a,
|
|
166
|
-
isReadOnly: a.isReadOnly || e.isReadOnly,
|
|
167
|
-
isDisabled: a.isDisabled || e.isDisabled,
|
|
168
|
-
name: a.name || s,
|
|
169
|
-
isRequired: (u = a.isRequired) !== null && u !== void 0 ? u : e.isRequired,
|
|
170
|
-
validationBehavior: l,
|
|
171
|
-
[F]: {
|
|
172
|
-
realtimeValidation: v,
|
|
173
|
-
displayValidation: $,
|
|
174
|
-
resetValidation: e.resetValidation,
|
|
175
|
-
commitValidation: e.commitValidation,
|
|
176
|
-
updateValidation(h) {
|
|
177
|
-
n.current = h, c();
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}, t, d);
|
|
181
|
-
return {
|
|
182
|
-
...b,
|
|
183
|
-
inputProps: {
|
|
184
|
-
...b.inputProps,
|
|
185
|
-
"aria-describedby": [
|
|
186
|
-
a["aria-describedby"],
|
|
187
|
-
e.isInvalid ? o : null,
|
|
188
|
-
r
|
|
189
|
-
].filter(Boolean).join(" ") || void 0
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
function xe(a = {}) {
|
|
194
|
-
let [e, d] = H(a.value, a.defaultValue || [], a.onChange), t = !!a.isRequired && e.length === 0, s = N(/* @__PURE__ */ new Map()), r = B({
|
|
195
|
-
...a,
|
|
196
|
-
value: e
|
|
197
|
-
}), o = r.displayValidation.isInvalid;
|
|
198
|
-
var l;
|
|
199
|
-
return {
|
|
200
|
-
...r,
|
|
201
|
-
value: e,
|
|
202
|
-
setValue(i) {
|
|
203
|
-
a.isReadOnly || a.isDisabled || d(i);
|
|
204
|
-
},
|
|
205
|
-
isDisabled: a.isDisabled || !1,
|
|
206
|
-
isReadOnly: a.isReadOnly || !1,
|
|
207
|
-
isSelected(i) {
|
|
208
|
-
return e.includes(i);
|
|
209
|
-
},
|
|
210
|
-
addValue(i) {
|
|
211
|
-
a.isReadOnly || a.isDisabled || e.includes(i) || d(e.concat(i));
|
|
212
|
-
},
|
|
213
|
-
removeValue(i) {
|
|
214
|
-
a.isReadOnly || a.isDisabled || e.includes(i) && d(e.filter((n) => n !== i));
|
|
215
|
-
},
|
|
216
|
-
toggleValue(i) {
|
|
217
|
-
a.isReadOnly || a.isDisabled || (e.includes(i) ? d(e.filter((n) => n !== i)) : d(e.concat(i)));
|
|
218
|
-
},
|
|
219
|
-
setInvalid(i, n) {
|
|
220
|
-
let c = new Map(s.current);
|
|
221
|
-
n.isInvalid ? c.set(i, n) : c.delete(i), s.current = c, r.updateValidation(re(...c.values()));
|
|
222
|
-
},
|
|
223
|
-
validationState: (l = a.validationState) !== null && l !== void 0 ? l : o ? "invalid" : null,
|
|
224
|
-
isInvalid: o,
|
|
225
|
-
isRequired: t
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
const ye = /* @__PURE__ */ j(null), J = /* @__PURE__ */ j(null), da = /* @__PURE__ */ L(function(e, d) {
|
|
229
|
-
[e, d] = w(e, d, ye);
|
|
230
|
-
let { validationBehavior: t } = M(W) || {};
|
|
231
|
-
var s, r;
|
|
232
|
-
let o = (r = (s = e.validationBehavior) !== null && s !== void 0 ? s : t) !== null && r !== void 0 ? r : "native", l = xe({
|
|
233
|
-
...e,
|
|
234
|
-
validationBehavior: o
|
|
235
|
-
}), [f, i] = Z(), { groupProps: n, labelProps: c, descriptionProps: v, errorMessageProps: $, ...u } = me({
|
|
236
|
-
...e,
|
|
237
|
-
label: i,
|
|
238
|
-
validationBehavior: o
|
|
239
|
-
}, l), b = E({
|
|
240
|
-
...e,
|
|
241
|
-
values: {
|
|
242
|
-
isDisabled: l.isDisabled,
|
|
243
|
-
isReadOnly: l.isReadOnly,
|
|
244
|
-
isRequired: e.isRequired || !1,
|
|
245
|
-
isInvalid: l.isInvalid,
|
|
246
|
-
state: l
|
|
247
|
-
},
|
|
248
|
-
defaultClassName: "react-aria-CheckboxGroup"
|
|
249
|
-
});
|
|
250
|
-
return /* @__PURE__ */ R.createElement("div", {
|
|
251
|
-
...n,
|
|
252
|
-
...b,
|
|
253
|
-
ref: d,
|
|
254
|
-
slot: e.slot || void 0,
|
|
255
|
-
"data-readonly": l.isReadOnly || void 0,
|
|
256
|
-
"data-required": e.isRequired || void 0,
|
|
257
|
-
"data-invalid": l.isInvalid || void 0,
|
|
258
|
-
"data-disabled": e.isDisabled || void 0
|
|
259
|
-
}, /* @__PURE__ */ R.createElement(ee, {
|
|
260
|
-
values: [
|
|
261
|
-
[
|
|
262
|
-
J,
|
|
263
|
-
l
|
|
264
|
-
],
|
|
265
|
-
[
|
|
266
|
-
fe,
|
|
267
|
-
{
|
|
268
|
-
...c,
|
|
269
|
-
ref: f,
|
|
270
|
-
elementType: "span"
|
|
271
|
-
}
|
|
272
|
-
],
|
|
273
|
-
[
|
|
274
|
-
ue,
|
|
275
|
-
{
|
|
276
|
-
slots: {
|
|
277
|
-
description: v,
|
|
278
|
-
errorMessage: $
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
],
|
|
282
|
-
[
|
|
283
|
-
oe,
|
|
284
|
-
u
|
|
285
|
-
]
|
|
286
|
-
]
|
|
287
|
-
}, b.children));
|
|
288
|
-
}), Pe = /* @__PURE__ */ L(function(e, d) {
|
|
289
|
-
let { inputRef: t = null, ...s } = e;
|
|
290
|
-
[e, d] = w(s, d, X);
|
|
291
|
-
let { validationBehavior: r } = M(W) || {};
|
|
292
|
-
var o, l;
|
|
293
|
-
let f = (l = (o = e.validationBehavior) !== null && o !== void 0 ? o : r) !== null && l !== void 0 ? l : "native", i = be(J), n = ae(ie(t, e.inputRef !== void 0 ? e.inputRef : null)), { labelProps: c, inputProps: v, isSelected: $, isDisabled: u, isReadOnly: b, isPressed: h, isInvalid: m } = i ? ge({
|
|
294
|
-
...q(e),
|
|
295
|
-
// Value is optional for standalone checkboxes, but required for CheckboxGroup items;
|
|
296
|
-
// it's passed explicitly here to avoid typescript error (requires ignore).
|
|
297
|
-
// @ts-ignore
|
|
298
|
-
value: e.value,
|
|
299
|
-
// ReactNode type doesn't allow function children.
|
|
300
|
-
children: typeof e.children == "function" ? !0 : e.children
|
|
301
|
-
}, i, n) : T({
|
|
302
|
-
...q(e),
|
|
303
|
-
children: typeof e.children == "function" ? !0 : e.children,
|
|
304
|
-
validationBehavior: f
|
|
305
|
-
}, z(e), n), { isFocused: x, isFocusVisible: I, focusProps: p } = de(), V = u || b, { hoverProps: y, isHovered: k } = le({
|
|
306
|
-
...e,
|
|
307
|
-
isDisabled: V
|
|
308
|
-
}), O = E({
|
|
309
|
-
...e,
|
|
310
|
-
defaultClassName: "react-aria-Checkbox",
|
|
311
|
-
values: {
|
|
312
|
-
isSelected: $,
|
|
313
|
-
isIndeterminate: e.isIndeterminate || !1,
|
|
314
|
-
isPressed: h,
|
|
315
|
-
isHovered: k,
|
|
316
|
-
isFocused: x,
|
|
317
|
-
isFocusVisible: I,
|
|
318
|
-
isDisabled: u,
|
|
319
|
-
isReadOnly: b,
|
|
320
|
-
isInvalid: m,
|
|
321
|
-
isRequired: e.isRequired || !1
|
|
322
|
-
}
|
|
323
|
-
}), _ = S(e);
|
|
324
|
-
return delete _.id, /* @__PURE__ */ R.createElement("label", {
|
|
325
|
-
...g(_, c, y, O),
|
|
326
|
-
ref: d,
|
|
327
|
-
slot: e.slot || void 0,
|
|
328
|
-
"data-selected": $ || void 0,
|
|
329
|
-
"data-indeterminate": e.isIndeterminate || void 0,
|
|
330
|
-
"data-pressed": h || void 0,
|
|
331
|
-
"data-hovered": k || void 0,
|
|
332
|
-
"data-focused": x || void 0,
|
|
333
|
-
"data-focus-visible": I || void 0,
|
|
334
|
-
"data-disabled": u || void 0,
|
|
335
|
-
"data-readonly": b || void 0,
|
|
336
|
-
"data-invalid": m || void 0,
|
|
337
|
-
"data-required": e.isRequired || void 0
|
|
338
|
-
}, /* @__PURE__ */ R.createElement($e, {
|
|
339
|
-
elementType: "span"
|
|
340
|
-
}, /* @__PURE__ */ R.createElement("input", {
|
|
341
|
-
...g(v, p),
|
|
342
|
-
ref: n
|
|
343
|
-
})), O.children);
|
|
344
|
-
}), Re = '"../theme/tokens.css"', Ie = '"Inter", sans-serif', pe = "#000000", Ve = "#143c50", De = "#5897b8", Se = "#25607f", Be = "#ffdfdf", ke = "#e62323", Oe = "0 0 0 2px #ffffff, 0 0 0 4px #000000", _e = "#b31b1b", qe = "#ffffff", Ce = "#f2f2f2", we = "#cccccc", Me = "#808080", Ee = "#bfbfbf", Fe = "#e6e6e6", We = "400", Ge = "500", Ne = "(max-width: 767px)", Le = "#b3b3b3", je = "_wrap_qn5vw_4", He = "_checkboxInner_qn5vw_11", Te = "_checkbox_qn5vw_11", Ae = "_checkboxGroup_qn5vw_129", C = {
|
|
345
|
-
tokens: Re,
|
|
346
|
-
display: Ie,
|
|
347
|
-
black: pe,
|
|
348
|
-
primaryBackground: Ve,
|
|
349
|
-
blue80: De,
|
|
350
|
-
blue130: Se,
|
|
351
|
-
signalRed10: Be,
|
|
352
|
-
signalRed100: ke,
|
|
353
|
-
focus: Oe,
|
|
354
|
-
signalRed130: _e,
|
|
355
|
-
white: qe,
|
|
356
|
-
gray10: Ce,
|
|
357
|
-
gray40: we,
|
|
358
|
-
gray100: Me,
|
|
359
|
-
gray50: Ee,
|
|
360
|
-
gray20: Fe,
|
|
361
|
-
regularWeight: We,
|
|
362
|
-
mediumWeight: Ge,
|
|
363
|
-
smBreakpoint: Ne,
|
|
364
|
-
borderSecondary: Le,
|
|
365
|
-
wrap: je,
|
|
366
|
-
checkboxInner: He,
|
|
367
|
-
checkbox: Te,
|
|
368
|
-
checkboxGroup: Ae
|
|
369
|
-
}, la = ({ children: a, ...e }) => /* @__PURE__ */ P(
|
|
370
|
-
Pe,
|
|
371
|
-
{
|
|
372
|
-
className: U(C.checkbox, e.className),
|
|
373
|
-
...e,
|
|
374
|
-
children: ({ isIndeterminate: d }) => /* @__PURE__ */ K(Q, { children: [
|
|
375
|
-
/* @__PURE__ */ P("div", { className: C.checkboxInner, children: /* @__PURE__ */ P(
|
|
376
|
-
"svg",
|
|
377
|
-
{
|
|
378
|
-
width: 16,
|
|
379
|
-
height: 16,
|
|
380
|
-
viewBox: "0 0 18 18",
|
|
381
|
-
"aria-hidden": "true",
|
|
382
|
-
children: d ? /* @__PURE__ */ P(
|
|
383
|
-
"rect",
|
|
384
|
-
{
|
|
385
|
-
x: 4,
|
|
386
|
-
y: 8,
|
|
387
|
-
width: 10,
|
|
388
|
-
height: 2
|
|
389
|
-
}
|
|
390
|
-
) : /* @__PURE__ */ P("polyline", { points: "3,9 7,13 15,4" })
|
|
391
|
-
}
|
|
392
|
-
) }),
|
|
393
|
-
a
|
|
394
|
-
] })
|
|
395
|
-
}
|
|
396
|
-
);
|
|
397
|
-
export {
|
|
398
|
-
da as $,
|
|
399
|
-
la as C,
|
|
400
|
-
J as a,
|
|
401
|
-
C as s
|
|
402
|
-
};
|
package/Checkbox.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._wrap_qn5vw_4{grid-area:Input;display:flex;flex-direction:column;gap:.5rem}._checkboxInner_qn5vw_11{width:1rem;height:1rem;box-sizing:border-box;border:1px solid #000000;transition:all .2s;align-items:center;justify-content:center;forced-color-adjust:none;display:flex}._checkboxInner_qn5vw_11 svg{width:1rem;height:1rem;fill:none;stroke:var(--checkmarkColor, #ffffff);stroke-width:2px;stroke-dasharray:22;stroke-dashoffset:66;transition:all .2s}._checkbox_qn5vw_11{font-family:Inter,sans-serif;font-weight:400;--borderColorPressed: #b3b3b3;--selectedColor: #143c50;--selectedPressed: #5897b8;--selectedHover: #25607f;--invalidColor: #e62323;--invalidPressed: #b31b1b;--checkmarkColor: #ffffff;gap:.5rem;align-items:center;forced-color-adjust:none;display:flex;width:max-content}._checkbox_qn5vw_11:hover div{border-color:gray}._checkbox_qn5vw_11[data-pressed] div{border-color:var(--borderColorPressed)}._checkbox_qn5vw_11[data-focus-visible],._checkbox_qn5vw_11:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #000;outline:none}._checkbox_qn5vw_11[data-selected] div,._checkbox_qn5vw_11[data-indeterminate] div{background:var(--selectedColor);border-color:var(--selectedColor)}._checkbox_qn5vw_11[data-invalid] div{border:2px solid var(--invalidColor)}._checkbox_qn5vw_11[data-disabled] div{pointer-events:none;border:1px solid #bfbfbf}._checkbox_qn5vw_11[data-selected]:hover div,._checkbox_qn5vw_11[data-indeterminate]:hover div{background:var(--selectedHover);border-color:var(--selectedHover)}._checkbox_qn5vw_11[data-selected][data-pressed] div,._checkbox_qn5vw_11[data-indeterminate][data-pressed] div{border-color:blue100;background:blue100}._checkbox_qn5vw_11[data-selected] svg,._checkbox_qn5vw_11[data-indeterminate] svg{stroke-dashoffset:44}._checkbox_qn5vw_11[data-indeterminate] svg{stroke:none;fill:var(--checkmarkColor)}._checkbox_qn5vw_11[data-invalid]:hover div{opacity:.5;border-color:var(--invalidColor)}._checkbox_qn5vw_11[data-invalid][data-pressed] div{border-color:var(--invalidPressed)}._checkbox_qn5vw_11[data-disabled]{color:#bfbfbf}._checkbox_qn5vw_11[data-disabled][data-selected] div,._checkbox_qn5vw_11[data-disabled][data-indeterminate] div{pointer-events:none;border:none;background:#e6e6e6}._checkboxGroup_qn5vw_129{font-family:Inter,sans-serif;display:flex;flex-direction:column;gap:.5rem;font-size:1rem;min-width:150px}._checkboxGroup_qn5vw_129 span{display:flex;align-items:center;gap:.5rem}._checkboxGroup_qn5vw_129[data-disabled]{color:#bfbfbf}@media (max-width: 767px){._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11{padding:.875rem 1rem;border:1px solid #000000;width:auto}._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11:hover{background-color:#f2f2f2}._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11[data-invalid]{border:2px solid var(--invalidColor)}._checkboxGroup_qn5vw_129 ._checkbox_qn5vw_11[data-disabled]{pointer-events:none;border-color:#bfbfbf}}
|