@midas-ds/components 1.0.2
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/Breadcrumbs.css +1 -0
- package/Button-CCevm2s3.js +183 -0
- package/Button.css +1 -0
- package/ButtonGroup.css +1 -0
- package/CHANGELOG.md +76 -0
- package/Card.css +1 -0
- package/Checkbox-CllWDBxF.js +405 -0
- package/Checkbox.css +1 -0
- package/Collection-B3xUVWPF.js +483 -0
- package/ComboBox.css +1 -0
- package/DatePicker.css +1 -0
- package/Dialog-CLTyYwkS.js +1889 -0
- package/DragAndDrop-OTN7La7U.js +42 -0
- package/Dropdown.css +1 -0
- package/FileUpload.css +1 -0
- package/Flex.css +1 -0
- package/Flex.module-CpoxBzQX.js +37 -0
- package/FocusScope-BR0SJ-cZ.js +512 -0
- package/Form-DXLoQL91.js +240 -0
- package/Grid.css +1 -0
- package/Grid.module-Ia0e9Dix.js +36 -0
- package/Group-DPMuN3h8.js +44 -0
- package/Hidden-BQWDvze4.js +37 -0
- package/InfoBanner.css +1 -0
- package/Label-C18A_4Z5.js +69 -0
- package/Layout.css +1 -0
- package/Link-BU1h3K2a.js +77 -0
- package/Link.css +1 -0
- package/LinkButton.css +1 -0
- package/ListBox-D21tdwTs.js +463 -0
- package/ListKeyboardDelegate-DxMjfMsI.js +172 -0
- package/Logo.css +1 -0
- package/Modal.css +1 -0
- package/MultiSelect.css +1 -0
- package/PressResponder-DP8ZDNGy.js +31 -0
- package/README.md +7 -0
- package/RSPContexts-EOiWkKOf.js +11 -0
- package/Radio.css +1 -0
- package/SearchField.css +1 -0
- package/Select.css +1 -0
- package/SelectionManager-D4WtKtey.js +988 -0
- package/Separator-DLUHK9vv.js +48 -0
- package/Spinner.css +1 -0
- package/Table.css +1 -0
- package/Tabs.css +1 -0
- package/Tag-CEd6WWSc.js +725 -0
- package/Tag.css +1 -0
- package/Text-DGLaY3HR.js +17 -0
- package/TextArea.css +1 -0
- package/TextField-C_hq9WeT.js +226 -0
- package/TextField.css +1 -0
- package/TextField.module-Cwq1FAm7.js +141 -0
- package/Toast.css +1 -0
- package/VisuallyHidden-B_XzVvlX.js +39 -0
- package/accordion/Accordion.d.ts +13 -0
- package/accordion/AccordionContent.d.ts +3 -0
- package/accordion/AccordionItem.d.ts +3 -0
- package/accordion/AccordionTagContext.d.ts +3 -0
- package/accordion/AccordionTrigger.d.ts +3 -0
- package/accordion/index.d.ts +5 -0
- package/breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/breadcrumbs/index.d.ts +1 -0
- package/button/Button.d.ts +41 -0
- package/button/ButtonGroup.d.ts +12 -0
- package/button/index.d.ts +2 -0
- package/card/Card.d.ts +34 -0
- package/card/index.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +2 -0
- package/checkbox/CheckboxGroup.d.ts +10 -0
- package/checkbox/index.d.ts +2 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/chevron-right-DBMc9VMi.js +23 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/combobox/ComboBox.d.ts +12 -0
- package/combobox/index.d.ts +1 -0
- package/context-ScOIq_Gu.js +80 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-picker/DatePicker.d.ts +14 -0
- package/date-picker/index.d.ts +2 -0
- package/dropdown/Dropdown.d.ts +8 -0
- package/dropdown/index.d.ts +1 -0
- package/file-upload/FileUpload.d.ts +11 -0
- package/file-upload/index.d.ts +1 -0
- package/flex/Flex.d.ts +17 -0
- package/flex/FlexItem.d.ts +15 -0
- package/flex/index.d.ts +2 -0
- package/grid/Grid.d.ts +16 -0
- package/grid/GridItem.d.ts +7 -0
- package/grid/index.d.ts +2 -0
- package/index-CEg5vZQH.js +132 -0
- package/index-CgfokhRq.js +674 -0
- package/index-CorR1LBD.js +3122 -0
- package/index-Dl1Q-tbj.js +26984 -0
- package/index.css +1 -0
- package/index.d.ts +29 -0
- package/index.js +114 -0
- package/index10.js +4 -0
- package/index11.js +5 -0
- package/index12.js +4 -0
- package/index13.js +4 -0
- package/index14.js +4 -0
- package/index15.js +6 -0
- package/index16.js +6 -0
- package/index17.js +6 -0
- package/index18.js +4 -0
- package/index19.js +6 -0
- package/index2.js +8 -0
- package/index20.js +6 -0
- package/index21.js +4 -0
- package/index22.js +5 -0
- package/index23.js +5 -0
- package/index24.js +5 -0
- package/index25.js +6 -0
- package/index26.js +6 -0
- package/index27.js +6 -0
- package/index28.js +4 -0
- package/index29.js +12 -0
- package/index3.js +8 -0
- package/index30.js +20 -0
- package/index31.js +22 -0
- package/index32.js +14 -0
- package/index33.js +11 -0
- package/index34.js +31 -0
- package/index35.js +8 -0
- package/index36.js +9 -0
- package/index37.js +19 -0
- package/index38.js +9 -0
- package/index39.js +9 -0
- package/index4.js +4 -0
- package/index40.js +16 -0
- package/index41.js +16 -0
- package/index42.js +31 -0
- package/index43.js +16 -0
- package/index44.js +6 -0
- package/index45.js +53 -0
- package/index46.js +18 -0
- package/index47.js +27 -0
- package/index48.js +18 -0
- package/index49.js +21 -0
- package/index5.js +5 -0
- package/index50.js +49 -0
- package/index51.js +5 -0
- package/index52.js +25 -0
- package/index53.js +18 -0
- package/index54.js +9 -0
- package/index55.js +25 -0
- package/index56.js +18 -0
- package/index57.js +11 -0
- package/index58.js +12 -0
- package/index59.js +15 -0
- package/index6.js +4 -0
- package/index60.js +9 -0
- package/index61.js +9 -0
- package/index62.js +19 -0
- package/index63.js +22 -0
- package/index64.js +61 -0
- package/index65.js +15 -0
- package/index66.js +11 -0
- package/index67.js +63 -0
- package/index68.js +85 -0
- package/index69.js +74 -0
- package/index7.js +9 -0
- package/index70.js +24 -0
- package/index71.js +69 -0
- package/index72.js +80 -0
- package/index73.js +140 -0
- package/index74.js +70 -0
- package/index75.js +42 -0
- package/index76.js +82 -0
- package/index77.js +71 -0
- package/index78.js +104 -0
- package/index79.js +274 -0
- package/index8.js +4 -0
- package/index80.js +724 -0
- package/index81.js +491 -0
- package/index82.js +317 -0
- package/index83.js +391 -0
- package/index84.js +254 -0
- package/index85.js +1364 -0
- package/index86.js +1009 -0
- package/index87.js +388 -0
- package/index88.js +2105 -0
- package/index89.js +2371 -0
- package/index9.js +5 -0
- package/index90.js +6834 -0
- package/index91.js +17 -0
- package/index92.js +14 -0
- package/index93.js +6 -0
- package/index94.js +9 -0
- package/info-banner/InfoBanner.d.ts +21 -0
- package/info-banner/index.d.ts +1 -0
- package/intlStrings-Cd44R5hT.js +278 -0
- package/layout/Layout.d.ts +51 -0
- package/layout/index.d.ts +1 -0
- package/link/Link.d.ts +13 -0
- package/link/index.d.ts +1 -0
- package/link-button/LinkButton.d.ts +18 -0
- package/link-button/index.d.ts +1 -0
- package/logo/Logo.d.ts +16 -0
- package/logo/index.d.ts +1 -0
- package/modal/Modal.d.ts +13 -0
- package/modal/index.d.ts +1 -0
- package/multi-select/MultiSelect.d.ts +28 -0
- package/multi-select/index.d.ts +1 -0
- package/package.json +29 -0
- package/radio/Radio.d.ts +20 -0
- package/radio/index.d.ts +1 -0
- package/react.esm-D8HpDGKP.js +11060 -0
- package/search-field/SearchField.d.ts +13 -0
- package/search-field/index.d.ts +1 -0
- package/select/Select.d.ts +11 -0
- package/select/index.d.ts +1 -0
- package/spinner/Spinner.d.ts +11 -0
- package/spinner/index.d.ts +1 -0
- package/table/Table.d.ts +12 -0
- package/table/index.d.ts +1 -0
- package/tabs/Tabs.d.ts +12 -0
- package/tabs/index.d.ts +1 -0
- package/tag/Tag.d.ts +11 -0
- package/tag/index.d.ts +1 -0
- package/textarea/TextArea.d.ts +20 -0
- package/textarea/index.d.ts +1 -0
- package/textfield/TextField.d.ts +16 -0
- package/textfield/index.d.ts +3 -0
- package/theme/index.d.ts +138 -0
- package/theme/tokens.d.ts +135 -0
- package/toast/Toast.d.ts +25 -0
- package/toast/index.d.ts +1 -0
- package/tokens-CjXmpXTi.js +160 -0
- package/triangle-alert-1OYl9KWz.js +56 -0
- package/useControlledState-S_TYcV_c.js +45 -0
- package/useDescription-D4_zk_sA.js +32 -0
- package/useFilter-BnJDBCkt.js +35 -0
- package/useFocusRing-D97-G3fT.js +1324 -0
- package/useFocusable-C-N9wcwm.js +56 -0
- package/useGridSelectionCheckbox-i1rsjlC-.js +22 -0
- package/useHasTabbableChild-DeuCnGGv.js +34 -0
- package/useHighlightSelectionDescription-JVx2MW_e.js +552 -0
- package/useListState-DSOTbsL3.js +119 -0
- package/useLocalizedStringFormatter-DVCAZqcL.js +96 -0
- package/useSingleSelectListState-CmX9_L5H.js +34 -0
- package/useUpdateEffect-Dtz-i14F.js +12 -0
- package/x-JK7i-TQC.js +14 -0
package/Breadcrumbs.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_k9jic_4{padding-inline-start:0;font-family:Inter,sans-serif;display:flex;flex-flow:row wrap;gap:.25rem;list-style:none;margin:0}._container_k9jic_4 li:not(:last-child):after{color:#1f1f1f;content:"/";alt:" ";padding:0 5px}._container_k9jic_4 li[data-current=true] a{cursor:default}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { m as I, e as m, n as C, a as w, c as F, b as N, d as O, k as x } from "./useFocusRing-D97-G3fT.js";
|
|
2
|
+
import L, { createContext as E, useRef as S, useEffect as V } from "react";
|
|
3
|
+
import { $ as M } from "./Hidden-BQWDvze4.js";
|
|
4
|
+
import { $ as R } from "./useFocusable-C-N9wcwm.js";
|
|
5
|
+
function k(e, t) {
|
|
6
|
+
let {
|
|
7
|
+
elementType: n = "button",
|
|
8
|
+
isDisabled: i,
|
|
9
|
+
onPress: a,
|
|
10
|
+
onPressStart: r,
|
|
11
|
+
onPressEnd: s,
|
|
12
|
+
onPressUp: l,
|
|
13
|
+
onPressChange: $,
|
|
14
|
+
preventFocusOnPress: p,
|
|
15
|
+
allowFocusWhenDisabled: h,
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
onClick: f,
|
|
18
|
+
href: P,
|
|
19
|
+
target: u,
|
|
20
|
+
rel: b,
|
|
21
|
+
type: o = "button"
|
|
22
|
+
} = e, c;
|
|
23
|
+
n === "button" ? c = {
|
|
24
|
+
type: o,
|
|
25
|
+
disabled: i
|
|
26
|
+
} : c = {
|
|
27
|
+
role: "button",
|
|
28
|
+
tabIndex: i ? void 0 : 0,
|
|
29
|
+
href: n === "a" && !i ? P : void 0,
|
|
30
|
+
target: n === "a" ? u : void 0,
|
|
31
|
+
type: n === "input" ? o : void 0,
|
|
32
|
+
disabled: n === "input" ? i : void 0,
|
|
33
|
+
"aria-disabled": !i || n === "input" ? void 0 : i,
|
|
34
|
+
rel: n === "a" ? b : void 0
|
|
35
|
+
};
|
|
36
|
+
let { pressProps: v, isPressed: T } = I({
|
|
37
|
+
onPressStart: r,
|
|
38
|
+
onPressEnd: s,
|
|
39
|
+
onPressChange: $,
|
|
40
|
+
onPress: a,
|
|
41
|
+
onPressUp: l,
|
|
42
|
+
isDisabled: i,
|
|
43
|
+
preventFocusOnPress: p,
|
|
44
|
+
ref: t
|
|
45
|
+
}), { focusableProps: g } = R(e, t);
|
|
46
|
+
h && (g.tabIndex = i ? -1 : g.tabIndex);
|
|
47
|
+
let _ = m(g, v, C(e, {
|
|
48
|
+
labelable: !0
|
|
49
|
+
}));
|
|
50
|
+
return {
|
|
51
|
+
isPressed: T,
|
|
52
|
+
buttonProps: m(c, _, {
|
|
53
|
+
"aria-haspopup": e["aria-haspopup"],
|
|
54
|
+
"aria-expanded": e["aria-expanded"],
|
|
55
|
+
"aria-controls": e["aria-controls"],
|
|
56
|
+
"aria-pressed": e["aria-pressed"],
|
|
57
|
+
onClick: (D) => {
|
|
58
|
+
f && (f(D), console.warn("onClick is deprecated, please use onPress"));
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const A = 7e3;
|
|
64
|
+
let d = null;
|
|
65
|
+
function y(e, t = "assertive", n = A) {
|
|
66
|
+
d ? d.announce(e, t, n) : (d = new H(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? d.announce(e, t, n) : setTimeout(() => {
|
|
67
|
+
d != null && d.isAttached() && (d == null || d.announce(e, t, n));
|
|
68
|
+
}, 100));
|
|
69
|
+
}
|
|
70
|
+
function J(e) {
|
|
71
|
+
d && d.clear(e);
|
|
72
|
+
}
|
|
73
|
+
class H {
|
|
74
|
+
isAttached() {
|
|
75
|
+
var t;
|
|
76
|
+
return (t = this.node) === null || t === void 0 ? void 0 : t.isConnected;
|
|
77
|
+
}
|
|
78
|
+
createLog(t) {
|
|
79
|
+
let n = document.createElement("div");
|
|
80
|
+
return n.setAttribute("role", "log"), n.setAttribute("aria-live", t), n.setAttribute("aria-relevant", "additions"), n;
|
|
81
|
+
}
|
|
82
|
+
destroy() {
|
|
83
|
+
this.node && (document.body.removeChild(this.node), this.node = null);
|
|
84
|
+
}
|
|
85
|
+
announce(t, n = "assertive", i = A) {
|
|
86
|
+
var a, r;
|
|
87
|
+
if (!this.node) return;
|
|
88
|
+
let s = document.createElement("div");
|
|
89
|
+
typeof t == "object" ? (s.setAttribute("role", "img"), s.setAttribute("aria-labelledby", t["aria-labelledby"])) : s.textContent = t, n === "assertive" ? (a = this.assertiveLog) === null || a === void 0 || a.appendChild(s) : (r = this.politeLog) === null || r === void 0 || r.appendChild(s), t !== "" && setTimeout(() => {
|
|
90
|
+
s.remove();
|
|
91
|
+
}, i);
|
|
92
|
+
}
|
|
93
|
+
clear(t) {
|
|
94
|
+
this.node && ((!t || t === "assertive") && this.assertiveLog && (this.assertiveLog.innerHTML = ""), (!t || t === "polite") && this.politeLog && (this.politeLog.innerHTML = ""));
|
|
95
|
+
}
|
|
96
|
+
constructor() {
|
|
97
|
+
this.node = null, this.assertiveLog = null, this.politeLog = null, typeof document < "u" && (this.node = document.createElement("div"), this.node.dataset.liveAnnouncer = "true", Object.assign(this.node.style, {
|
|
98
|
+
border: 0,
|
|
99
|
+
clip: "rect(0 0 0 0)",
|
|
100
|
+
clipPath: "inset(50%)",
|
|
101
|
+
height: "1px",
|
|
102
|
+
margin: "-1px",
|
|
103
|
+
overflow: "hidden",
|
|
104
|
+
padding: 0,
|
|
105
|
+
position: "absolute",
|
|
106
|
+
width: "1px",
|
|
107
|
+
whiteSpace: "nowrap"
|
|
108
|
+
}), this.assertiveLog = this.createLog("assertive"), this.node.appendChild(this.assertiveLog), this.politeLog = this.createLog("polite"), this.node.appendChild(this.politeLog), document.body.prepend(this.node));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const U = /* @__PURE__ */ E(null), j = /* @__PURE__ */ new Set([
|
|
112
|
+
"form",
|
|
113
|
+
"formAction",
|
|
114
|
+
"formEncType",
|
|
115
|
+
"formMethod",
|
|
116
|
+
"formNoValidate",
|
|
117
|
+
"formTarget",
|
|
118
|
+
"name",
|
|
119
|
+
"value"
|
|
120
|
+
]), B = /* @__PURE__ */ E({});
|
|
121
|
+
function K(e, t) {
|
|
122
|
+
[e, t] = w(e, t, B), e = W(e);
|
|
123
|
+
let n = e, { isPending: i } = n, { buttonProps: a, isPressed: r } = k(e, t), { focusProps: s, isFocused: l, isFocusVisible: $ } = F(e), { hoverProps: p, isHovered: h } = N({
|
|
124
|
+
...e,
|
|
125
|
+
isDisabled: e.isDisabled || i
|
|
126
|
+
}), f = {
|
|
127
|
+
isHovered: h,
|
|
128
|
+
isPressed: (n.isPressed || r) && !i,
|
|
129
|
+
isFocused: l,
|
|
130
|
+
isFocusVisible: $,
|
|
131
|
+
isDisabled: e.isDisabled || !1,
|
|
132
|
+
isPending: i ?? !1
|
|
133
|
+
}, P = O({
|
|
134
|
+
...e,
|
|
135
|
+
values: f,
|
|
136
|
+
defaultClassName: "react-aria-Button"
|
|
137
|
+
}), u = x(a.id), b = x(), o = a["aria-labelledby"];
|
|
138
|
+
i && (o ? o = `${o} ${b}` : a["aria-label"] && (o = `${u} ${b}`));
|
|
139
|
+
let c = S(i);
|
|
140
|
+
return V(() => {
|
|
141
|
+
let v = {
|
|
142
|
+
"aria-labelledby": o || u
|
|
143
|
+
};
|
|
144
|
+
(!c.current && l && i || c.current && l && !i) && y(v, "assertive"), c.current = i;
|
|
145
|
+
}, [
|
|
146
|
+
i,
|
|
147
|
+
l,
|
|
148
|
+
o,
|
|
149
|
+
u
|
|
150
|
+
]), /* @__PURE__ */ L.createElement("button", {
|
|
151
|
+
...C(e, {
|
|
152
|
+
propNames: j
|
|
153
|
+
}),
|
|
154
|
+
...m(a, s, p),
|
|
155
|
+
...P,
|
|
156
|
+
id: u,
|
|
157
|
+
ref: t,
|
|
158
|
+
"aria-labelledby": o,
|
|
159
|
+
slot: e.slot || void 0,
|
|
160
|
+
"aria-disabled": i ? "true" : a["aria-disabled"],
|
|
161
|
+
"data-disabled": e.isDisabled || void 0,
|
|
162
|
+
"data-pressed": f.isPressed || void 0,
|
|
163
|
+
"data-hovered": h || void 0,
|
|
164
|
+
"data-focused": l || void 0,
|
|
165
|
+
"data-pending": i || void 0,
|
|
166
|
+
"data-focus-visible": $ || void 0
|
|
167
|
+
}, /* @__PURE__ */ L.createElement(U.Provider, {
|
|
168
|
+
value: {
|
|
169
|
+
id: b
|
|
170
|
+
}
|
|
171
|
+
}, P.children));
|
|
172
|
+
}
|
|
173
|
+
function W(e) {
|
|
174
|
+
return e.isPending && (e.onPress = void 0, e.onPressStart = void 0, e.onPressEnd = void 0, e.onPressChange = void 0, e.onPressUp = void 0, e.onKeyDown = void 0, e.onKeyUp = void 0, e.onClick = void 0, e.href = void 0), e;
|
|
175
|
+
}
|
|
176
|
+
const Q = /* @__PURE__ */ M(K);
|
|
177
|
+
export {
|
|
178
|
+
Q as $,
|
|
179
|
+
B as a,
|
|
180
|
+
y as b,
|
|
181
|
+
k as c,
|
|
182
|
+
J as d
|
|
183
|
+
};
|
package/Button.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._button_1tedv_4{font-family:Inter,sans-serif;font-size:1rem;font-weight:500;padding:.8125rem 1.9375rem;background-color:#143c50;border:solid 1px transparent;color:#fff;cursor:pointer;opacity:1;outline:none;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:.5rem}._button_1tedv_4[data-focus-visible],._button_1tedv_4:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #000}._button_1tedv_4:hover{background-color:#25607f}._button_1tedv_4[data-pressed]{background-color:#4289ad;outline:none}._primary_1tedv_36[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#f2f2f2}._secondary_1tedv_42{color:#143c50;background-color:#fff;border-color:#143c50;opacity:1}._secondary_1tedv_42:hover{color:#143c50;background-color:#f2f2f2}._secondary_1tedv_42[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#fff;border-color:#bfbfbf}._secondary_1tedv_42[data-pressed]{background-color:#e6e6e6;border-color:#143c50}._tertiary_1tedv_66{color:#143c50;background-color:transparent;padding:.8125rem .9375rem;opacity:1}._tertiary_1tedv_66:hover{color:#143c50;background-color:#f2f2f2}._tertiary_1tedv_66[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#fff}._tertiary_1tedv_66[data-pressed]{background-color:#e6e6e6}._iconBtn_1tedv_88{background-color:transparent;padding:.875rem;color:#000;display:flex;align-items:center}._iconBtn_1tedv_88:hover{background-color:#0000001a}._iconBtn_1tedv_88[data-disabled]{color:#bfbfbf;pointer-events:none}._iconBtn_1tedv_88[data-pressed]{background-color:#e6e6e6}._danger_1tedv_109{color:#fff;background-color:#e62323;opacity:1}._danger_1tedv_109:hover{color:#fff;background-color:#b31b1b}._danger_1tedv_109[data-disabled]{color:#bfbfbf;pointer-events:none;background-color:#f2f2f2}._danger_1tedv_109[data-pressed]{background-color:#801313;outline:none}._iconRight_1tedv_131{flex-direction:row-reverse}._fullwidth_1tedv_135{width:100%}._small_1tedv_139{min-height:1.5rem;font-size:.75rem;padding:.25rem .5rem}
|
package/ButtonGroup.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._buttonGroup_5pd8y_4{display:flex;flex-flow:row wrap;gap:.5rem}@media (max-width: 767px){._buttonGroup_5pd8y_4>*{width:100%}}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
## 1.0.2 (2025-01-27)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **textarea:** new component
|
|
6
|
+
- **docs:** add docusaurus boilerplate
|
|
7
|
+
- **storybook:** add boilerplate storybook instance
|
|
8
|
+
- **button:** add react aria button component
|
|
9
|
+
|
|
10
|
+
### 🩹 Fixes
|
|
11
|
+
|
|
12
|
+
- fix the link path in readme
|
|
13
|
+
- **modal:** update modal docs
|
|
14
|
+
- dependencies
|
|
15
|
+
- **docs:** update url
|
|
16
|
+
- **docs:** update url
|
|
17
|
+
- **docs:** fix storybook link
|
|
18
|
+
- new readme + doc build
|
|
19
|
+
- change node version on deploy
|
|
20
|
+
- **docs:** mend broken pages
|
|
21
|
+
- **docs:** change doc structure
|
|
22
|
+
- package.json and package-lock.json
|
|
23
|
+
|
|
24
|
+
### ❤️ Thank You
|
|
25
|
+
|
|
26
|
+
- jabir Khalil
|
|
27
|
+
- pixelrickdreamer
|
|
28
|
+
- Wilhelm Hjelm
|
|
29
|
+
|
|
30
|
+
## 1.0.1 (2025-01-27)
|
|
31
|
+
|
|
32
|
+
### 🚀 Features
|
|
33
|
+
|
|
34
|
+
- **textarea:** new component
|
|
35
|
+
|
|
36
|
+
### 🩹 Fixes
|
|
37
|
+
|
|
38
|
+
- fix the link path in readme
|
|
39
|
+
- **modal:** update modal docs
|
|
40
|
+
- dependencies
|
|
41
|
+
- **docs:** update url
|
|
42
|
+
- **docs:** update url
|
|
43
|
+
- **docs:** fix storybook link
|
|
44
|
+
- new readme + doc build
|
|
45
|
+
- change node version on deploy
|
|
46
|
+
- **docs:** mend broken pages
|
|
47
|
+
- **docs:** change doc structure
|
|
48
|
+
|
|
49
|
+
### ❤️ Thank You
|
|
50
|
+
|
|
51
|
+
- jabir Khalil
|
|
52
|
+
- Wilhelm Hjelm
|
|
53
|
+
|
|
54
|
+
# 1.0.0 (2025-01-27)
|
|
55
|
+
|
|
56
|
+
### 🚀 Features
|
|
57
|
+
|
|
58
|
+
- **textarea:** new component
|
|
59
|
+
|
|
60
|
+
### 🩹 Fixes
|
|
61
|
+
|
|
62
|
+
- fix the link path in readme
|
|
63
|
+
- **modal:** update modal docs
|
|
64
|
+
- dependencies
|
|
65
|
+
- **docs:** update url
|
|
66
|
+
- **docs:** update url
|
|
67
|
+
- **docs:** fix storybook link
|
|
68
|
+
- new readme + doc build
|
|
69
|
+
- change node version on deploy
|
|
70
|
+
- **docs:** mend broken pages
|
|
71
|
+
- **docs:** change doc structure
|
|
72
|
+
|
|
73
|
+
### ❤️ Thank You
|
|
74
|
+
|
|
75
|
+
- jabir Khalil
|
|
76
|
+
- Wilhelm Hjelm
|
package/Card.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._card_vbecj_4{position:relative;font-family:Inter,sans-serif;display:flex;flex:1;flex-direction:column;justify-content:space-between;gap:1rem;padding:2rem 1.5rem;border-bottom:1px solid #000000;background-color:#fff;transition:transform .25s ease-in-out,background-color .25s ease-in-out}._card_vbecj_4:hover{background-color:#e6e6e6}._card_vbecj_4:active{background-color:#f2f2f2}._card_vbecj_4:focus-visible{outline:2px solid #000000;outline-offset:-2px}._content_vbecj_33{display:flex;flex-direction:column;gap:.5rem}._heading_vbecj_39{margin:0;font-size:1.5rem;line-height:2rem;font-weight:500;color:#1f1f1f}._image_vbecj_47{height:auto;width:100%;object-fit:cover;max-width:100%;vertical-align:middle;aspect-ratio:4/3}._background_vbecj_56{background-color:#d5e5ed}._text_vbecj_60{margin-block-start:0;color:#000;margin:0;padding:0}
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { jsx as y, jsxs as J, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import { c as Q } from "./clsx-OuTLNxxd.js";
|
|
3
|
+
import { $ as U } from "./RSPContexts-EOiWkKOf.js";
|
|
4
|
+
import { m as D, e as x, n as S, f as X, a as C, u as w, v as Y, d as M, x as Z, i as ee, H as ae, w as _, c as ie, b as de } from "./useFocusRing-D97-G3fT.js";
|
|
5
|
+
import { a as le, $ as B, b as ne, f as E, g as te, h as se, c as F, d as re } from "./Form-DXLoQL91.js";
|
|
6
|
+
import { $ as oe, a as ce } from "./Label-C18A_4Z5.js";
|
|
7
|
+
import { $ as fe } from "./Text-DGLaY3HR.js";
|
|
8
|
+
import R, { useEffect as W, useRef as G, forwardRef as N, createContext as H, useContext as ue } from "react";
|
|
9
|
+
import { $ as L } from "./useControlledState-S_TYcV_c.js";
|
|
10
|
+
import { $ as be } from "./useFocusable-C-N9wcwm.js";
|
|
11
|
+
import { a as ve } from "./VisuallyHidden-B_XzVvlX.js";
|
|
12
|
+
import './Checkbox.css';function $e(e, a, d) {
|
|
13
|
+
let { isDisabled: n = !1, isReadOnly: s = !1, value: t, name: l, children: c, "aria-label": f, "aria-labelledby": i, validationState: r = "valid", isInvalid: o } = e, b = (g) => {
|
|
14
|
+
g.stopPropagation(), a.setSelected(g.target.checked);
|
|
15
|
+
}, v = c != null, u = f != null || i != null;
|
|
16
|
+
!v && !u && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
17
|
+
let { pressProps: h, isPressed: $ } = D({
|
|
18
|
+
isDisabled: n
|
|
19
|
+
}), { pressProps: m, isPressed: P } = D({
|
|
20
|
+
isDisabled: n || s,
|
|
21
|
+
onPress() {
|
|
22
|
+
a.toggle();
|
|
23
|
+
}
|
|
24
|
+
}), { focusableProps: I } = be(e, d), p = x(h, I), V = S(e, {
|
|
25
|
+
labelable: !0
|
|
26
|
+
});
|
|
27
|
+
return le(d, a.isSelected, a.setSelected), {
|
|
28
|
+
labelProps: x(m, {
|
|
29
|
+
onClick: (g) => g.preventDefault()
|
|
30
|
+
}),
|
|
31
|
+
inputProps: x(V, {
|
|
32
|
+
"aria-invalid": o || r === "invalid" || void 0,
|
|
33
|
+
"aria-errormessage": e["aria-errormessage"],
|
|
34
|
+
"aria-controls": e["aria-controls"],
|
|
35
|
+
"aria-readonly": s || void 0,
|
|
36
|
+
onChange: b,
|
|
37
|
+
disabled: n,
|
|
38
|
+
...t == null ? {} : {
|
|
39
|
+
value: t
|
|
40
|
+
},
|
|
41
|
+
name: l,
|
|
42
|
+
type: "checkbox",
|
|
43
|
+
...p
|
|
44
|
+
}),
|
|
45
|
+
isSelected: a.isSelected,
|
|
46
|
+
isPressed: $ || P,
|
|
47
|
+
isDisabled: n,
|
|
48
|
+
isReadOnly: s,
|
|
49
|
+
isInvalid: o || r === "invalid"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function j(e, a, d) {
|
|
53
|
+
let n = B({
|
|
54
|
+
...e,
|
|
55
|
+
value: a.isSelected
|
|
56
|
+
}), { isInvalid: s, validationErrors: t, validationDetails: l } = n.displayValidation, { labelProps: c, inputProps: f, isSelected: i, isPressed: r, isDisabled: o, isReadOnly: b } = $e({
|
|
57
|
+
...e,
|
|
58
|
+
isInvalid: s
|
|
59
|
+
}, a, d);
|
|
60
|
+
ne(e, n, d);
|
|
61
|
+
let { isIndeterminate: v, isRequired: u, validationBehavior: h = "aria" } = e;
|
|
62
|
+
W(() => {
|
|
63
|
+
d.current && (d.current.indeterminate = !!v);
|
|
64
|
+
});
|
|
65
|
+
let { pressProps: $ } = D({
|
|
66
|
+
isDisabled: o || b,
|
|
67
|
+
onPress() {
|
|
68
|
+
let { [E]: m } = e, { commitValidation: P } = m || n;
|
|
69
|
+
P();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
labelProps: x(c, $),
|
|
74
|
+
inputProps: {
|
|
75
|
+
...f,
|
|
76
|
+
checked: i,
|
|
77
|
+
"aria-required": u && h === "aria" || void 0,
|
|
78
|
+
required: u && h === "native"
|
|
79
|
+
},
|
|
80
|
+
isSelected: i,
|
|
81
|
+
isPressed: r,
|
|
82
|
+
isDisabled: o,
|
|
83
|
+
isReadOnly: b,
|
|
84
|
+
isInvalid: s,
|
|
85
|
+
validationErrors: t,
|
|
86
|
+
validationDetails: l
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
const T = /* @__PURE__ */ new WeakMap();
|
|
90
|
+
function he(e, a) {
|
|
91
|
+
let { isDisabled: d, name: n, validationBehavior: s = "aria" } = e, { isInvalid: t, validationErrors: l, validationDetails: c } = a.displayValidation, { labelProps: f, fieldProps: i, descriptionProps: r, errorMessageProps: o } = oe({
|
|
92
|
+
...e,
|
|
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: t,
|
|
97
|
+
errorMessage: e.errorMessage || l
|
|
98
|
+
});
|
|
99
|
+
T.set(a, {
|
|
100
|
+
name: n,
|
|
101
|
+
descriptionId: r.id,
|
|
102
|
+
errorMessageId: o.id,
|
|
103
|
+
validationBehavior: s
|
|
104
|
+
});
|
|
105
|
+
let b = S(e, {
|
|
106
|
+
labelable: !0
|
|
107
|
+
}), { focusWithinProps: v } = X({
|
|
108
|
+
onBlurWithin: e.onBlur,
|
|
109
|
+
onFocusWithin: e.onFocus,
|
|
110
|
+
onFocusWithinChange: e.onFocusChange
|
|
111
|
+
});
|
|
112
|
+
return {
|
|
113
|
+
groupProps: x(b, {
|
|
114
|
+
role: "group",
|
|
115
|
+
"aria-disabled": d || void 0,
|
|
116
|
+
...i,
|
|
117
|
+
...v
|
|
118
|
+
}),
|
|
119
|
+
labelProps: f,
|
|
120
|
+
descriptionProps: r,
|
|
121
|
+
errorMessageProps: o,
|
|
122
|
+
isInvalid: t,
|
|
123
|
+
validationErrors: l,
|
|
124
|
+
validationDetails: c
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function A(e = {}) {
|
|
128
|
+
let { isReadOnly: a } = e, [d, n] = L(e.isSelected, e.defaultSelected || !1, e.onChange);
|
|
129
|
+
function s(l) {
|
|
130
|
+
a || n(l);
|
|
131
|
+
}
|
|
132
|
+
function t() {
|
|
133
|
+
a || n(!d);
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
isSelected: d,
|
|
137
|
+
setSelected: s,
|
|
138
|
+
toggle: t
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function me(e, a, d) {
|
|
142
|
+
const n = A({
|
|
143
|
+
isReadOnly: e.isReadOnly || a.isReadOnly,
|
|
144
|
+
isSelected: a.isSelected(e.value),
|
|
145
|
+
onChange($) {
|
|
146
|
+
$ ? a.addValue(e.value) : a.removeValue(e.value), e.onChange && e.onChange($);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
let { name: s, descriptionId: t, errorMessageId: l, validationBehavior: c } = T.get(a);
|
|
150
|
+
var f;
|
|
151
|
+
c = (f = e.validationBehavior) !== null && f !== void 0 ? f : c;
|
|
152
|
+
let { realtimeValidation: i } = B({
|
|
153
|
+
...e,
|
|
154
|
+
value: n.isSelected,
|
|
155
|
+
// Server validation is handled at the group level.
|
|
156
|
+
name: void 0,
|
|
157
|
+
validationBehavior: "aria"
|
|
158
|
+
}), r = G(te), o = () => {
|
|
159
|
+
a.setInvalid(e.value, i.isInvalid ? i : r.current);
|
|
160
|
+
};
|
|
161
|
+
W(o);
|
|
162
|
+
let b = a.realtimeValidation.isInvalid ? a.realtimeValidation : i, v = c === "native" ? a.displayValidation : b;
|
|
163
|
+
var u;
|
|
164
|
+
let h = j({
|
|
165
|
+
...e,
|
|
166
|
+
isReadOnly: e.isReadOnly || a.isReadOnly,
|
|
167
|
+
isDisabled: e.isDisabled || a.isDisabled,
|
|
168
|
+
name: e.name || s,
|
|
169
|
+
isRequired: (u = e.isRequired) !== null && u !== void 0 ? u : a.isRequired,
|
|
170
|
+
validationBehavior: c,
|
|
171
|
+
[E]: {
|
|
172
|
+
realtimeValidation: b,
|
|
173
|
+
displayValidation: v,
|
|
174
|
+
resetValidation: a.resetValidation,
|
|
175
|
+
commitValidation: a.commitValidation,
|
|
176
|
+
updateValidation($) {
|
|
177
|
+
r.current = $, o();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}, n, d);
|
|
181
|
+
return {
|
|
182
|
+
...h,
|
|
183
|
+
inputProps: {
|
|
184
|
+
...h.inputProps,
|
|
185
|
+
"aria-describedby": [
|
|
186
|
+
e["aria-describedby"],
|
|
187
|
+
a.isInvalid ? l : null,
|
|
188
|
+
t
|
|
189
|
+
].filter(Boolean).join(" ") || void 0
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function ge(e = {}) {
|
|
194
|
+
let [a, d] = L(e.value, e.defaultValue || [], e.onChange), n = !!e.isRequired && a.length === 0, s = G(/* @__PURE__ */ new Map()), t = B({
|
|
195
|
+
...e,
|
|
196
|
+
value: a
|
|
197
|
+
}), l = t.displayValidation.isInvalid;
|
|
198
|
+
var c;
|
|
199
|
+
return {
|
|
200
|
+
...t,
|
|
201
|
+
value: a,
|
|
202
|
+
setValue(i) {
|
|
203
|
+
e.isReadOnly || e.isDisabled || d(i);
|
|
204
|
+
},
|
|
205
|
+
isDisabled: e.isDisabled || !1,
|
|
206
|
+
isReadOnly: e.isReadOnly || !1,
|
|
207
|
+
isSelected(i) {
|
|
208
|
+
return a.includes(i);
|
|
209
|
+
},
|
|
210
|
+
addValue(i) {
|
|
211
|
+
e.isReadOnly || e.isDisabled || a.includes(i) || d(a.concat(i));
|
|
212
|
+
},
|
|
213
|
+
removeValue(i) {
|
|
214
|
+
e.isReadOnly || e.isDisabled || a.includes(i) && d(a.filter((r) => r !== i));
|
|
215
|
+
},
|
|
216
|
+
toggleValue(i) {
|
|
217
|
+
e.isReadOnly || e.isDisabled || (a.includes(i) ? d(a.filter((r) => r !== i)) : d(a.concat(i)));
|
|
218
|
+
},
|
|
219
|
+
setInvalid(i, r) {
|
|
220
|
+
let o = new Map(s.current);
|
|
221
|
+
r.isInvalid ? o.set(i, r) : o.delete(i), s.current = o, t.updateValidation(se(...o.values()));
|
|
222
|
+
},
|
|
223
|
+
validationState: (c = e.validationState) !== null && c !== void 0 ? c : l ? "invalid" : null,
|
|
224
|
+
isInvalid: l,
|
|
225
|
+
isRequired: n
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
const xe = /* @__PURE__ */ H(null), z = /* @__PURE__ */ H(null);
|
|
229
|
+
function Pe(e, a) {
|
|
230
|
+
[e, a] = C(e, a, xe);
|
|
231
|
+
let { validationBehavior: d } = w(F) || {};
|
|
232
|
+
var n, s;
|
|
233
|
+
let t = (s = (n = e.validationBehavior) !== null && n !== void 0 ? n : d) !== null && s !== void 0 ? s : "native", l = ge({
|
|
234
|
+
...e,
|
|
235
|
+
validationBehavior: t
|
|
236
|
+
}), [c, f] = Y(), { groupProps: i, labelProps: r, descriptionProps: o, errorMessageProps: b, ...v } = he({
|
|
237
|
+
...e,
|
|
238
|
+
label: f,
|
|
239
|
+
validationBehavior: t
|
|
240
|
+
}, l), u = M({
|
|
241
|
+
...e,
|
|
242
|
+
values: {
|
|
243
|
+
isDisabled: l.isDisabled,
|
|
244
|
+
isReadOnly: l.isReadOnly,
|
|
245
|
+
isRequired: e.isRequired || !1,
|
|
246
|
+
isInvalid: l.isInvalid,
|
|
247
|
+
state: l
|
|
248
|
+
},
|
|
249
|
+
defaultClassName: "react-aria-CheckboxGroup"
|
|
250
|
+
});
|
|
251
|
+
return /* @__PURE__ */ R.createElement("div", {
|
|
252
|
+
...i,
|
|
253
|
+
...u,
|
|
254
|
+
ref: a,
|
|
255
|
+
slot: e.slot || void 0,
|
|
256
|
+
"data-readonly": l.isReadOnly || void 0,
|
|
257
|
+
"data-required": e.isRequired || void 0,
|
|
258
|
+
"data-invalid": l.isInvalid || void 0,
|
|
259
|
+
"data-disabled": e.isDisabled || void 0
|
|
260
|
+
}, /* @__PURE__ */ R.createElement(Z, {
|
|
261
|
+
values: [
|
|
262
|
+
[
|
|
263
|
+
z,
|
|
264
|
+
l
|
|
265
|
+
],
|
|
266
|
+
[
|
|
267
|
+
ce,
|
|
268
|
+
{
|
|
269
|
+
...r,
|
|
270
|
+
ref: c,
|
|
271
|
+
elementType: "span"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
[
|
|
275
|
+
fe,
|
|
276
|
+
{
|
|
277
|
+
slots: {
|
|
278
|
+
description: o,
|
|
279
|
+
errorMessage: b
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
[
|
|
284
|
+
re,
|
|
285
|
+
v
|
|
286
|
+
]
|
|
287
|
+
]
|
|
288
|
+
}, u.children));
|
|
289
|
+
}
|
|
290
|
+
function ye(e, a) {
|
|
291
|
+
let { inputRef: d = null, ...n } = e;
|
|
292
|
+
[e, a] = C(n, a, U);
|
|
293
|
+
let { validationBehavior: s } = w(F) || {};
|
|
294
|
+
var t, l;
|
|
295
|
+
let c = (l = (t = e.validationBehavior) !== null && t !== void 0 ? t : s) !== null && l !== void 0 ? l : "native", f = ue(z), i = ee(ae(d, e.inputRef !== void 0 ? e.inputRef : null)), { labelProps: r, inputProps: o, isSelected: b, isDisabled: v, isReadOnly: u, isPressed: h, isInvalid: $ } = f ? me({
|
|
296
|
+
..._(e),
|
|
297
|
+
// Value is optional for standalone checkboxes, but required for CheckboxGroup items;
|
|
298
|
+
// it's passed explicitly here to avoid typescript error (requires ignore).
|
|
299
|
+
// @ts-ignore
|
|
300
|
+
value: e.value,
|
|
301
|
+
// ReactNode type doesn't allow function children.
|
|
302
|
+
children: typeof e.children == "function" ? !0 : e.children
|
|
303
|
+
}, f, i) : j({
|
|
304
|
+
..._(e),
|
|
305
|
+
children: typeof e.children == "function" ? !0 : e.children,
|
|
306
|
+
validationBehavior: c
|
|
307
|
+
}, A(e), i), { isFocused: m, isFocusVisible: P, focusProps: I } = ie(), p = v || u, { hoverProps: V, isHovered: g } = de({
|
|
308
|
+
...e,
|
|
309
|
+
isDisabled: p
|
|
310
|
+
}), k = M({
|
|
311
|
+
...e,
|
|
312
|
+
defaultClassName: "react-aria-Checkbox",
|
|
313
|
+
values: {
|
|
314
|
+
isSelected: b,
|
|
315
|
+
isIndeterminate: e.isIndeterminate || !1,
|
|
316
|
+
isPressed: h,
|
|
317
|
+
isHovered: g,
|
|
318
|
+
isFocused: m,
|
|
319
|
+
isFocusVisible: P,
|
|
320
|
+
isDisabled: v,
|
|
321
|
+
isReadOnly: u,
|
|
322
|
+
isInvalid: $,
|
|
323
|
+
isRequired: e.isRequired || !1
|
|
324
|
+
}
|
|
325
|
+
}), O = S(e);
|
|
326
|
+
return delete O.id, /* @__PURE__ */ R.createElement("label", {
|
|
327
|
+
...x(O, r, V, k),
|
|
328
|
+
ref: a,
|
|
329
|
+
slot: e.slot || void 0,
|
|
330
|
+
"data-selected": b || void 0,
|
|
331
|
+
"data-indeterminate": e.isIndeterminate || void 0,
|
|
332
|
+
"data-pressed": h || void 0,
|
|
333
|
+
"data-hovered": g || void 0,
|
|
334
|
+
"data-focused": m || void 0,
|
|
335
|
+
"data-focus-visible": P || void 0,
|
|
336
|
+
"data-disabled": v || void 0,
|
|
337
|
+
"data-readonly": u || void 0,
|
|
338
|
+
"data-invalid": $ || void 0,
|
|
339
|
+
"data-required": e.isRequired || void 0
|
|
340
|
+
}, /* @__PURE__ */ R.createElement(ve, {
|
|
341
|
+
elementType: "span"
|
|
342
|
+
}, /* @__PURE__ */ R.createElement("input", {
|
|
343
|
+
...x(o, I),
|
|
344
|
+
ref: i
|
|
345
|
+
})), k.children);
|
|
346
|
+
}
|
|
347
|
+
const Re = /* @__PURE__ */ N(ye), la = /* @__PURE__ */ N(Pe), Ie = '"../theme/tokens.css"', pe = '"Inter", sans-serif', Ve = "#000000", De = "#143c50", Se = "#5897b8", Be = "#25607f", ke = "#ffdfdf", Oe = "#e62323", _e = "0 0 0 2px #ffffff, 0 0 0 4px #000000", qe = "#b31b1b", Ce = "#ffffff", we = "#f2f2f2", Me = "#cccccc", Ee = "#808080", Fe = "#bfbfbf", We = "#e6e6e6", Ge = "400", Ne = "500", He = "(max-width: 767px)", Le = "#b3b3b3", je = "_wrap_qn5vw_4", Te = "_checkboxInner_qn5vw_11", Ae = "_checkbox_qn5vw_11", ze = "_checkboxGroup_qn5vw_129", q = {
|
|
348
|
+
tokens: Ie,
|
|
349
|
+
display: pe,
|
|
350
|
+
black: Ve,
|
|
351
|
+
primaryBackground: De,
|
|
352
|
+
blue80: Se,
|
|
353
|
+
blue130: Be,
|
|
354
|
+
signalRed10: ke,
|
|
355
|
+
signalRed100: Oe,
|
|
356
|
+
focus: _e,
|
|
357
|
+
signalRed130: qe,
|
|
358
|
+
white: Ce,
|
|
359
|
+
gray10: we,
|
|
360
|
+
gray40: Me,
|
|
361
|
+
gray100: Ee,
|
|
362
|
+
gray50: Fe,
|
|
363
|
+
gray20: We,
|
|
364
|
+
regularWeight: Ge,
|
|
365
|
+
mediumWeight: Ne,
|
|
366
|
+
smBreakpoint: He,
|
|
367
|
+
borderSecondary: Le,
|
|
368
|
+
wrap: je,
|
|
369
|
+
checkboxInner: Te,
|
|
370
|
+
checkbox: Ae,
|
|
371
|
+
checkboxGroup: ze
|
|
372
|
+
}, na = ({ children: e, ...a }) => /* @__PURE__ */ y(
|
|
373
|
+
Re,
|
|
374
|
+
{
|
|
375
|
+
className: Q(q.checkbox, a.className),
|
|
376
|
+
...a,
|
|
377
|
+
children: ({ isIndeterminate: d }) => /* @__PURE__ */ J(K, { children: [
|
|
378
|
+
/* @__PURE__ */ y("div", { className: q.checkboxInner, children: /* @__PURE__ */ y(
|
|
379
|
+
"svg",
|
|
380
|
+
{
|
|
381
|
+
width: 16,
|
|
382
|
+
height: 16,
|
|
383
|
+
viewBox: "0 0 18 18",
|
|
384
|
+
"aria-hidden": "true",
|
|
385
|
+
children: d ? /* @__PURE__ */ y(
|
|
386
|
+
"rect",
|
|
387
|
+
{
|
|
388
|
+
x: 4,
|
|
389
|
+
y: 8,
|
|
390
|
+
width: 10,
|
|
391
|
+
height: 2
|
|
392
|
+
}
|
|
393
|
+
) : /* @__PURE__ */ y("polyline", { points: "3,9 7,13 15,4" })
|
|
394
|
+
}
|
|
395
|
+
) }),
|
|
396
|
+
e
|
|
397
|
+
] })
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
export {
|
|
401
|
+
la as $,
|
|
402
|
+
na as C,
|
|
403
|
+
z as a,
|
|
404
|
+
q as s
|
|
405
|
+
};
|
package/Checkbox.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
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}}
|