skillgrid 0.0.88 → 0.0.89
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/assets/components/Radio/Radio.module-C97VGndQ.css +1 -0
- package/dist/components/Radio/Radio.js +63 -49
- package/dist/components/Radio/Radio.module.css.js +39 -31
- package/dist/index.cjs.js +3 -3
- package/dist/index.css +1 -1
- package/package.json +1 -1
- package/dist/assets/components/Radio/Radio.module-TNOIshDX.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--radio-background-neutral: #FFFFFF;--radio-border-neutral: var(--base-graphite-90);--radio-icon-neutral: #FFFFFF;--radio-background-accent: var(--brand-primary-500);--radio-background-accent-hovered: var(--brand-primary-550);--radio-background-negative: var(--base-red-60);--radio-border-negative: var(--base-red-60);--radio-background-secondary: var(--base-graphite-85);--radio-border-secondary: var(--base-graphite-95);--radio-icon-secondary: var(--base-graphite-95);--radio-focused-accent: color-mix(in srgb, var(--brand-primary-500) 48%, transparent);--radio-focused-negative: color-mix(in srgb, var(--base-red-60) 48%, transparent);--radio-focused-secondary: color-mix(in srgb, var(--radio-background-secondary) 48%, transparent);--radio-animation-ease-in-out-200: all .2s ease-in-out;--radio-animation-ease-in-out-tiger-200: all .2s ease-in-out;--radio-scale-pressed: 1.05;--radio-size-small: 16.67px;--radio-size-medium: 16.67px;--radio-size-large: 20px;--radio-padding: 2px;--radio-border-width: 1.5px;--radio-focus-ring-width: 4px;--radio-icon-size: 8px;--radio-gap: 10px;--radio-mode-card-xl-padding: 16px;--radio-mode-card-m-padding: 14px;--radio-mode-card-s-padding: 10px 8px;--radio-mode-card-border-radius: 12px;--radio-mode-card-border: 1px solid var(--radio-border-neutral);--radio-label-font-size: 14px;--radio-label-line-height: 20px}._default_1mtjf_53{display:flex}._radio_1mtjf_59{cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:var(--radio-padding);color:var(--radio-icon-neutral);border-radius:50%;transition:var(--radio-animation-ease-in-out-tiger-200)}._radio_1mtjf_59._checked_1mtjf_78 ._background_1mtjf_78{fill:var(--radio-background-accent)}._radio_1mtjf_59._checked_1mtjf_78 ._outline_1mtjf_82{opacity:0}._radio_1mtjf_59._error_1mtjf_86 ._outline_1mtjf_82{stroke:var(--radio-border-negative)}._radio_1mtjf_59._error_1mtjf_86._checked_1mtjf_78 ._background_1mtjf_78{fill:var(--radio-background-negative)}._radio_1mtjf_59._disabled_1mtjf_94{cursor:not-allowed}._radio_1mtjf_59._disabled_1mtjf_94 ._outline_1mtjf_82{stroke:var(--radio-border-secondary)}._radio_1mtjf_59._checked_1mtjf_78._disabled_1mtjf_94 ._background_1mtjf_78{fill:var(--radio-background-secondary)}._radio_1mtjf_59:focus-visible:not(._disabled_1mtjf_94){outline:none;box-shadow:0 0 0 var(--radio-focus-ring-width) var(--radio-focused-accent)}._radio_1mtjf_59._checked_1mtjf_78:focus-visible:not(._disabled_1mtjf_94){outline:none;box-shadow:0 0 0 var(--radio-focus-ring-width) var(--radio-focused-accent)}._radio_1mtjf_59._error_1mtjf_86:focus-visible:not(._disabled_1mtjf_94){outline:none;box-shadow:0 0 0 var(--radio-focus-ring-width) var(--radio-focused-negative)}._radio_1mtjf_59._disabled_1mtjf_94:focus-visible{outline:none;box-shadow:0 0 0 var(--radio-focus-ring-width) var(--radio-focused-secondary)}._iconBaseline_1mtjf_127{display:block;width:var(--radio-icon-size);height:var(--radio-icon-size)}._icon_1mtjf_127{pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;overflow:visible;width:100%;height:100%}._background_1mtjf_78{r:50%;fill:var(--radio-background-neutral);transition:var(--radio-animation-ease-in-out-tiger-200)}._outline_1mtjf_82{r:calc(50% - var(--radio-border-width) / 2);fill:none;stroke:var(--radio-border-neutral);stroke-width:var(--radio-border-width);transition:var(--radio-animation-ease-in-out-tiger-200)}._dot_1mtjf_161{r:calc(var(--radio-icon-size) / 2);fill:currentcolor;transition:var(--radio-animation-ease-in-out-200)}._small_1mtjf_168{width:var(--radio-size-small);min-width:var(--radio-size-small);height:var(--radio-size-small);min-height:var(--radio-size-small)}._medium_1mtjf_175{width:var(--radio-size-medium);min-width:var(--radio-size-medium);height:var(--radio-size-medium);min-height:var(--radio-size-medium)}._large_1mtjf_182{width:var(--radio-size-large);min-width:var(--radio-size-large);height:var(--radio-size-large);min-height:var(--radio-size-large)}._label_1mtjf_189{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;gap:var(--radio-gap);align-items:center}._label_1mtjf_189[aria-disabled=true]{cursor:not-allowed}._label_1mtjf_189:hover ._radio_1mtjf_59:not(._checked_1mtjf_78,._error_1mtjf_86,._disabled_1mtjf_94) ._dot_1mtjf_161{fill:var(--radio-icon-secondary)}._label_1mtjf_189:hover ._radio_1mtjf_59._checked_1mtjf_78:not(._error_1mtjf_86,._disabled_1mtjf_94) ._background_1mtjf_78{fill:var(--radio-background-accent-hovered)}._label_1mtjf_189:active ._radio_1mtjf_59:not(._disabled_1mtjf_94){transform:scale(var(--radio-scale-pressed))}._container_1mtjf_215{display:flex;gap:var(--radio-gap);align-items:baseline;width:fit-content;font-family:var(--font-family);font-size:var(--radio-label-font-size);line-height:var(--radio-label-line-height);color:var(--text-primary)}._input_1mtjf_228{position:absolute;width:0;height:0;opacity:0}._card_1mtjf_235{padding:var(--radio-mode-card-m-padding);border:var(--radio-mode-card-border);border-radius:var(--radio-mode-card-border-radius)}._smallCard_1mtjf_241{padding:var(--radio-mode-card-s-padding)}._mediumCard_1mtjf_245{padding:var(--radio-mode-card-m-padding)}._largeCard_1mtjf_249{padding:var(--radio-mode-card-xl-padding)}[data-skillgridDarkTheme=true]{--radio-background-neutral: var(--bg-secondary);--radio-border-neutral: var(--stroke-neutral);--radio-icon-neutral: var(--bg-secondary);--radio-background-secondary: var(--stroke-neutral-disabled);--radio-border-secondary: var(--stroke-neutral);--radio-icon-secondary: var(--stroke-neutral)}
|
|
@@ -1,101 +1,115 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
1
|
+
import { jsxs as c, jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as O } from "react";
|
|
3
|
-
import { clsx as
|
|
3
|
+
import { clsx as l } from "clsx";
|
|
4
4
|
import a from "./Radio.module.css.js";
|
|
5
5
|
const P = "radio-container-", j = "radio-label", q = O(
|
|
6
|
-
(
|
|
6
|
+
(I, C) => {
|
|
7
7
|
const {
|
|
8
8
|
name: f,
|
|
9
9
|
id: R,
|
|
10
10
|
value: o,
|
|
11
11
|
size: b = "large",
|
|
12
12
|
loading: v = !1,
|
|
13
|
-
error:
|
|
13
|
+
error: N,
|
|
14
14
|
disabled: D = !1,
|
|
15
|
-
checked:
|
|
16
|
-
containerClassName:
|
|
15
|
+
checked: n = !1,
|
|
16
|
+
containerClassName: h,
|
|
17
17
|
className: T,
|
|
18
|
-
children:
|
|
18
|
+
children: p,
|
|
19
19
|
clickable: _ = "all",
|
|
20
|
-
mode:
|
|
21
|
-
tabIndex:
|
|
22
|
-
style:
|
|
23
|
-
containerStyle:
|
|
20
|
+
mode: m = "default",
|
|
21
|
+
tabIndex: g,
|
|
22
|
+
style: $,
|
|
23
|
+
containerStyle: A,
|
|
24
24
|
onChange: e,
|
|
25
|
-
"data-testid":
|
|
26
|
-
...
|
|
27
|
-
} =
|
|
28
|
-
|
|
25
|
+
"data-testid": u,
|
|
26
|
+
...S
|
|
27
|
+
} = I, y = !!N, s = D || v, r = _ === "all", k = m === "card", x = a[`${b}Card`], t = R ?? f, w = (i) => {
|
|
28
|
+
s || e == null || e(o, i);
|
|
29
29
|
}, B = (i) => {
|
|
30
|
-
i.key === "Enter" && !
|
|
30
|
+
i.key === "Enter" && !s && (i.preventDefault(), e == null || e(o));
|
|
31
31
|
}, F = (i) => i.stopPropagation(), L = () => /* @__PURE__ */ c(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
|
-
className:
|
|
34
|
+
className: l(
|
|
35
35
|
a.radio,
|
|
36
36
|
a[b],
|
|
37
37
|
{
|
|
38
|
-
[a.checked]:
|
|
39
|
-
[a.disabled]:
|
|
40
|
-
[a.error]:
|
|
38
|
+
[a.checked]: n,
|
|
39
|
+
[a.disabled]: s,
|
|
40
|
+
[a.error]: y && !s
|
|
41
41
|
},
|
|
42
42
|
T
|
|
43
43
|
),
|
|
44
|
-
style:
|
|
45
|
-
tabIndex:
|
|
46
|
-
"data-testid": `${P}${
|
|
44
|
+
style: $,
|
|
45
|
+
tabIndex: g || 1,
|
|
46
|
+
"data-testid": `${P}${t}`,
|
|
47
47
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ d(
|
|
49
49
|
"input",
|
|
50
50
|
{
|
|
51
|
-
"aria-errormessage":
|
|
52
|
-
"aria-invalid":
|
|
53
|
-
checked:
|
|
51
|
+
"aria-errormessage": N,
|
|
52
|
+
"aria-invalid": y,
|
|
53
|
+
checked: n,
|
|
54
54
|
className: a.input,
|
|
55
|
-
"data-testid": `radio-${
|
|
56
|
-
disabled:
|
|
57
|
-
id:
|
|
55
|
+
"data-testid": `radio-${t}`,
|
|
56
|
+
disabled: s,
|
|
57
|
+
id: t,
|
|
58
58
|
name: f,
|
|
59
59
|
ref: C,
|
|
60
60
|
type: "radio",
|
|
61
61
|
value: o,
|
|
62
|
-
onChange:
|
|
62
|
+
onChange: w,
|
|
63
63
|
onClick: F
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ d("span", { className: a.iconBaseline, "aria-hidden": !0 }),
|
|
67
|
+
/* @__PURE__ */ c(
|
|
68
|
+
"svg",
|
|
69
|
+
{
|
|
70
|
+
"data-testid": `radio-icon-${t}`,
|
|
71
|
+
className: a.icon,
|
|
72
|
+
"aria-hidden": !0,
|
|
73
|
+
focusable: !1,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ d("circle", { cx: "50%", cy: "50%", className: a.background }),
|
|
76
|
+
/* @__PURE__ */ d("circle", { cx: "50%", cy: "50%", className: a.outline }),
|
|
77
|
+
/* @__PURE__ */ d("circle", { cx: "50%", cy: "50%", className: a.dot })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
67
81
|
]
|
|
68
82
|
}
|
|
69
|
-
),
|
|
83
|
+
), E = () => /* @__PURE__ */ c(
|
|
70
84
|
"label",
|
|
71
85
|
{
|
|
72
|
-
"aria-checked":
|
|
73
|
-
"aria-disabled":
|
|
74
|
-
"data-testid":
|
|
75
|
-
htmlFor:
|
|
76
|
-
style:
|
|
77
|
-
className:
|
|
78
|
-
[
|
|
79
|
-
[
|
|
86
|
+
"aria-checked": n,
|
|
87
|
+
"aria-disabled": s,
|
|
88
|
+
"data-testid": r ? u : j,
|
|
89
|
+
htmlFor: t,
|
|
90
|
+
style: A,
|
|
91
|
+
className: l(a.label, {
|
|
92
|
+
[l(a.container, a[m], h)]: r,
|
|
93
|
+
[x]: r && k
|
|
80
94
|
}),
|
|
81
95
|
onKeyDown: B,
|
|
82
|
-
...
|
|
96
|
+
...S,
|
|
83
97
|
children: [
|
|
84
98
|
L(),
|
|
85
|
-
|
|
99
|
+
r && p
|
|
86
100
|
]
|
|
87
101
|
}
|
|
88
102
|
);
|
|
89
|
-
return
|
|
103
|
+
return r ? E() : /* @__PURE__ */ c(
|
|
90
104
|
"div",
|
|
91
105
|
{
|
|
92
|
-
className:
|
|
93
|
-
[
|
|
106
|
+
className: l(a.container, a[m], h, {
|
|
107
|
+
[x]: k
|
|
94
108
|
}),
|
|
95
|
-
"data-testid":
|
|
109
|
+
"data-testid": u,
|
|
96
110
|
children: [
|
|
97
|
-
|
|
98
|
-
|
|
111
|
+
E(),
|
|
112
|
+
p
|
|
99
113
|
]
|
|
100
114
|
}
|
|
101
115
|
);
|
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
import '../../assets/components/Radio/Radio.module-
|
|
2
|
-
default: "
|
|
3
|
-
radio:
|
|
4
|
-
checked:
|
|
1
|
+
import '../../assets/components/Radio/Radio.module-C97VGndQ.css';const _ = "_radio_1mtjf_59", t = "_checked_1mtjf_78", a = "_background_1mtjf_78", o = "_outline_1mtjf_82", n = "_error_1mtjf_86", e = "_disabled_1mtjf_94", c = "_iconBaseline_1mtjf_127", d = "_icon_1mtjf_127", m = "_dot_1mtjf_161", r = "_small_1mtjf_168", l = "_medium_1mtjf_175", s = "_large_1mtjf_182", i = "_label_1mtjf_189", f = "_container_1mtjf_215", j = "_input_1mtjf_228", u = "_card_1mtjf_235", b = "_smallCard_1mtjf_241", g = "_mediumCard_1mtjf_245", C = "_largeCard_1mtjf_249", k = {
|
|
2
|
+
default: "_default_1mtjf_53",
|
|
3
|
+
radio: _,
|
|
4
|
+
checked: t,
|
|
5
|
+
background: a,
|
|
6
|
+
outline: o,
|
|
5
7
|
error: n,
|
|
6
|
-
disabled:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
disabled: e,
|
|
9
|
+
iconBaseline: c,
|
|
10
|
+
icon: d,
|
|
11
|
+
dot: m,
|
|
12
|
+
small: r,
|
|
13
|
+
medium: l,
|
|
14
|
+
large: s,
|
|
15
|
+
label: i,
|
|
16
|
+
container: f,
|
|
17
|
+
input: j,
|
|
18
|
+
card: u,
|
|
19
|
+
smallCard: b,
|
|
20
|
+
mediumCard: g,
|
|
21
|
+
largeCard: C
|
|
18
22
|
};
|
|
19
23
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
a as background,
|
|
25
|
+
u as card,
|
|
26
|
+
t as checked,
|
|
27
|
+
f as container,
|
|
28
|
+
k as default,
|
|
29
|
+
e as disabled,
|
|
30
|
+
m as dot,
|
|
25
31
|
n as error,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
d as icon,
|
|
33
|
+
c as iconBaseline,
|
|
34
|
+
j as input,
|
|
35
|
+
i as label,
|
|
36
|
+
s as large,
|
|
37
|
+
C as largeCard,
|
|
38
|
+
l as medium,
|
|
39
|
+
g as mediumCard,
|
|
40
|
+
o as outline,
|
|
41
|
+
_ as radio,
|
|
42
|
+
r as small,
|
|
43
|
+
b as smallCard
|
|
36
44
|
};
|