@uva-glass/component-library 1.49.0 → 1.50.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
._checkbox-
|
|
1
|
+
._checkbox-button__container_lqy3b_1{align-items:center;display:inline-flex;justify-content:center}._checkbox-button__container_lqy3b_1 input[type=checkbox]{cursor:pointer;height:0;opacity:0;position:absolute;width:0;z-index:-1}._checkbox-button__container_lqy3b_1 input[type=checkbox]:focus-visible+label{outline:.125rem dotted var(--color-cobalt);outline-offset:.125rem;z-index:1}._checkbox-button__container_lqy3b_1 input[type=checkbox]:checked+label{background-color:var(--color-black);color:var(--color-white)}._checkbox-button__container_lqy3b_1 input[type=checkbox]:disabled+label,._checkbox-button__container_lqy3b_1 input[type=checkbox]:disabled:hover+label{background-color:var(--color-grey-100);color:var(--color-grey-300);cursor:not-allowed}._checkbox-button__container_lqy3b_1 input[type=checkbox]:checked+label:hover{background-color:var(--color-grey-300);color:var(--color-black);z-index:1}._checkbox-button_lqy3b_1{align-items:center;background-color:var(--color-white);border:1px solid var(--color-grey-400);cursor:pointer;display:flex;font-size:var(--font-size-default);height:2.5rem;justify-content:center;padding:.25rem;-webkit-user-select:none;user-select:none;white-space:nowrap;width:2.5rem}._checkbox-button_lqy3b_1:hover{background-color:var(--color-grey-300)}._checkbox-button--not-valid_lqy3b_59{border-color:var(--color-red-500)}._checkbox-button--not-valid_lqy3b_59:hover{background-color:var(--color-grey-300);border-color:var(--color-grey-300);color:var(--color-black)}._checkbox-button--single_lqy3b_69{border-radius:.25rem}._checkbox-button--start_lqy3b_73{border-radius:.25rem 0 0 .25rem}._checkbox-button--middle_lqy3b_77{border-radius:0;border-width:1px 0;position:relative;width:2.375rem}._checkbox-button--end_lqy3b_84{border-radius:0 .25rem .25rem 0}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useId as
|
|
1
|
+
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { useId as d, useState as m } from "react";
|
|
4
4
|
import '../../assets/CheckboxButton.css';const t = {
|
|
5
|
-
"checkbox-button__container": "_checkbox-
|
|
6
|
-
"checkbox-button": "_checkbox-
|
|
7
|
-
"checkbox-button--not-valid": "_checkbox-button--not-
|
|
8
|
-
"checkbox-button--single": "_checkbox-button--
|
|
9
|
-
"checkbox-button--start": "_checkbox-button--
|
|
10
|
-
"checkbox-button--middle": "_checkbox-button--
|
|
11
|
-
"checkbox-button--end": "_checkbox-button--
|
|
12
|
-
},
|
|
13
|
-
label:
|
|
5
|
+
"checkbox-button__container": "_checkbox-button__container_lqy3b_1",
|
|
6
|
+
"checkbox-button": "_checkbox-button_lqy3b_1",
|
|
7
|
+
"checkbox-button--not-valid": "_checkbox-button--not-valid_lqy3b_59",
|
|
8
|
+
"checkbox-button--single": "_checkbox-button--single_lqy3b_69",
|
|
9
|
+
"checkbox-button--start": "_checkbox-button--start_lqy3b_73",
|
|
10
|
+
"checkbox-button--middle": "_checkbox-button--middle_lqy3b_77",
|
|
11
|
+
"checkbox-button--end": "_checkbox-button--end_lqy3b_84"
|
|
12
|
+
}, q = ({
|
|
13
|
+
label: c,
|
|
14
14
|
value: b,
|
|
15
|
-
isChecked:
|
|
16
|
-
variant:
|
|
17
|
-
disabled:
|
|
18
|
-
notValid:
|
|
19
|
-
onSetValue:
|
|
15
|
+
isChecked: h = !1,
|
|
16
|
+
variant: _ = "single",
|
|
17
|
+
disabled: s,
|
|
18
|
+
notValid: l,
|
|
19
|
+
onSetValue: u
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const e = d(), [x, k] = m(h), a = (o) => {
|
|
22
|
+
k(o.target.checked), u(o.target.checked ? o.target.value : null);
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ r("span", { className: t["checkbox-button__container"], children: [
|
|
25
25
|
/* @__PURE__ */ n(
|
|
26
26
|
"input",
|
|
27
27
|
{
|
|
28
28
|
type: "checkbox",
|
|
29
|
-
id: `${
|
|
30
|
-
disabled:
|
|
29
|
+
id: `${e}${c}`,
|
|
30
|
+
disabled: s,
|
|
31
31
|
value: b,
|
|
32
|
-
checked:
|
|
33
|
-
onChange:
|
|
32
|
+
checked: x,
|
|
33
|
+
onChange: a
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
36
|
/* @__PURE__ */ n(
|
|
37
37
|
"label",
|
|
38
38
|
{
|
|
39
|
-
htmlFor: `${
|
|
40
|
-
className:
|
|
41
|
-
[t["checkbox-button--not-valid"]]:
|
|
39
|
+
htmlFor: `${e}${c}`,
|
|
40
|
+
className: i(t["checkbox-button"], t[`checkbox-button--${_}`], {
|
|
41
|
+
[t["checkbox-button--not-valid"]]: l
|
|
42
42
|
}),
|
|
43
|
-
children:
|
|
43
|
+
children: c
|
|
44
44
|
}
|
|
45
45
|
)
|
|
46
46
|
] });
|
|
47
47
|
};
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
q as CheckboxButton
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=CheckboxButton.js.map
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uva-glass/component-library",
|
|
3
3
|
"author": "Team Glass - Frontend vrienden",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.50.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@storybook/react": "^8.3.2",
|
|
58
58
|
"@storybook/react-vite": "^8.3.2",
|
|
59
59
|
"@storybook/test": "^8.3.2",
|
|
60
|
-
"@types/node": "^20.16.
|
|
60
|
+
"@types/node": "^20.16.6",
|
|
61
61
|
"@types/react": "^18.3.8",
|
|
62
62
|
"@types/react-dom": "^18.3.0",
|
|
63
63
|
"@uva-glass/eslint-config": "^1.3.1",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"stylelint-order": "^6.0.4",
|
|
90
90
|
"typescript": "^5.6.2",
|
|
91
91
|
"vite": "^5.4.7",
|
|
92
|
-
"vite-plugin-dts": "^4.2.
|
|
92
|
+
"vite-plugin-dts": "^4.2.2",
|
|
93
93
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
94
94
|
"vite-plugin-static-copy": "^1.0.6",
|
|
95
95
|
"vite-plugin-svgr": "^4.2.0",
|