@uva-glass/component-library 3.34.10 → 3.34.12
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/CheckboxButtonBar.css +1 -1
- package/dist/assets/ControlsButton.css +1 -1
- package/dist/assets/PeriodSelector.css +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +58 -76
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/ControlsButton/ControlsButton.js +27 -27
- package/dist/components/Icon/icons/index.d.ts +12 -0
- package/dist/components/Icon/icons/index.js +113 -103
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +27 -27
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as f, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as k } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { useRef as v, useState as M, useEffect as $ } from "react";
|
|
4
4
|
import "../Buttons/Button.js";
|
|
5
5
|
import "../Buttons/LinkButton.js";
|
|
@@ -10,12 +10,12 @@ import "@react-aria/dialog";
|
|
|
10
10
|
import "@react-aria/focus";
|
|
11
11
|
import "@react-aria/overlays";
|
|
12
12
|
import "../OverlayCloseButton/OverlayCloseButton.js";
|
|
13
|
-
import { FeedbackBox as
|
|
13
|
+
import { FeedbackBox as B } from "../FeedbackBox/FeedbackBox.js";
|
|
14
14
|
import "../GridRow/GridRow.js";
|
|
15
15
|
import "../IconButton/IconButton.js";
|
|
16
16
|
import "../Input/Input.js";
|
|
17
17
|
import "../InputField/InputField.js";
|
|
18
|
-
import { Label as
|
|
18
|
+
import { Label as D } from "../Label/Label.js";
|
|
19
19
|
import "react-router";
|
|
20
20
|
import "../../TablePlugin-CI_6HCsd.js";
|
|
21
21
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
@@ -27,60 +27,60 @@ import "../SelectListbox/SelectProvider.js";
|
|
|
27
27
|
import "../Sortable/components/SortableItem.js";
|
|
28
28
|
import "../../SortableProvider-l8-7ClBJ.js";
|
|
29
29
|
import '../../assets/PeriodSelector.css';const s = {
|
|
30
|
-
"period-selector__container": "_period-
|
|
31
|
-
"period-selector__container--label-left": "_period-selector__container--label-
|
|
32
|
-
"period-selector__container--label-top": "_period-selector__container--label-
|
|
33
|
-
"period-selector__selector-container": "_period-selector__selector-
|
|
34
|
-
"period-selector__selector-row": "_period-selector__selector-
|
|
35
|
-
}, h = 0, S = 1, E = 2, _ = 3,
|
|
30
|
+
"period-selector__container": "_period-selector__container_1txwd_1",
|
|
31
|
+
"period-selector__container--label-left": "_period-selector__container--label-left_1txwd_6",
|
|
32
|
+
"period-selector__container--label-top": "_period-selector__container--label-top_1txwd_12",
|
|
33
|
+
"period-selector__selector-container": "_period-selector__selector-container_1txwd_18",
|
|
34
|
+
"period-selector__selector-row": "_period-selector__selector-row_1txwd_24"
|
|
35
|
+
}, h = 0, S = 1, E = 2, _ = 3, I = 7, j = (i) => {
|
|
36
36
|
const n = [];
|
|
37
|
-
for (let
|
|
38
|
-
n.push(i.slice(
|
|
37
|
+
for (let o = 0; o < i.length; o += _)
|
|
38
|
+
n.push(i.slice(o, o + _));
|
|
39
39
|
return n;
|
|
40
40
|
}, se = ({
|
|
41
|
-
maxPeriods: i =
|
|
41
|
+
maxPeriods: i = I,
|
|
42
42
|
defaultValues: n,
|
|
43
|
-
label:
|
|
43
|
+
label: o,
|
|
44
44
|
labelPosition: b = "top",
|
|
45
45
|
required: m = !1,
|
|
46
46
|
notValidatedText: p = "",
|
|
47
|
-
onChange:
|
|
47
|
+
onChange: x
|
|
48
48
|
}) => {
|
|
49
|
-
const
|
|
50
|
-
label: `${r + 1}${e.length === 1 ? "" : `.${(
|
|
51
|
-
value:
|
|
49
|
+
const g = Array.from({ length: i }, (e, r) => r + 1), a = j(g), w = a.map((e, r) => e.map((t) => ({
|
|
50
|
+
label: `${r + 1}${e.length === 1 ? "" : `.${(t - 1) % _ + 1}`}`,
|
|
51
|
+
value: t.toString()
|
|
52
52
|
}))), c = v(
|
|
53
53
|
a.map(
|
|
54
|
-
(e) => e.reduce((r,
|
|
54
|
+
(e) => e.reduce((r, t) => (n?.includes(t) && r.push(t), r), [])
|
|
55
55
|
)
|
|
56
|
-
), [
|
|
57
|
-
c.current[r] = e.map((
|
|
56
|
+
), [R, d] = M([]), u = (e) => e[h].length !== 0 || e[S].length !== 0 ? [E] : e[E].length !== 0 ? [h, S] : [], P = (e, r) => {
|
|
57
|
+
c.current[r] = e.map((t) => Number(t)), d(u(c.current)), x([...c.current.flat()].sort());
|
|
58
58
|
};
|
|
59
59
|
return $(() => {
|
|
60
60
|
d(u(c.current));
|
|
61
61
|
}, []), /* @__PURE__ */ f(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
className:
|
|
64
|
+
className: k(
|
|
65
65
|
s["period-selector__container"],
|
|
66
66
|
s[`period-selector__container--label-${b}`]
|
|
67
67
|
),
|
|
68
68
|
children: [
|
|
69
|
-
|
|
69
|
+
o && /* @__PURE__ */ l(D, { htmlFor: "", required: m, children: o }),
|
|
70
70
|
/* @__PURE__ */ f("div", { className: s["period-selector__selector-container"], children: [
|
|
71
|
-
/* @__PURE__ */ l("div", { className: s["period-selector__selector-row"], children:
|
|
71
|
+
/* @__PURE__ */ l("div", { className: s["period-selector__selector-row"], children: w.map((e, r) => /* @__PURE__ */ l(
|
|
72
72
|
N,
|
|
73
73
|
{
|
|
74
74
|
checkboxes: e,
|
|
75
|
-
defaultValues: c.current[r].map((
|
|
76
|
-
disableGroup:
|
|
75
|
+
defaultValues: c.current[r].map((t) => t.toString()),
|
|
76
|
+
disableGroup: R.includes(r),
|
|
77
77
|
required: m,
|
|
78
|
-
onSetValues: (
|
|
78
|
+
onSetValues: (t) => P(t, r),
|
|
79
79
|
notValidated: p !== ""
|
|
80
80
|
},
|
|
81
81
|
`group_${r}`
|
|
82
82
|
)) }),
|
|
83
|
-
p !== "" && /* @__PURE__ */ l(
|
|
83
|
+
p !== "" && /* @__PURE__ */ l(B, { level: "error", feedback: p })
|
|
84
84
|
] })
|
|
85
85
|
]
|
|
86
86
|
}
|
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": "3.34.
|
|
5
|
+
"version": "3.34.12",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"@testing-library/jest-dom": "^6.6.3",
|
|
61
61
|
"@testing-library/react": "^16.3.0",
|
|
62
62
|
"@types/jest": "^30.0.0",
|
|
63
|
-
"@types/node": "^22.16.
|
|
63
|
+
"@types/node": "^22.16.5",
|
|
64
64
|
"@types/react": "^19.1.8",
|
|
65
65
|
"@types/react-dom": "^19.1.6",
|
|
66
66
|
"@uva-glass/eslint-config": "^1.3.11",
|
|
67
67
|
"@uva-glass/stylelint-config": "^1.2.3",
|
|
68
|
-
"@vitejs/plugin-react": "^4.
|
|
68
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
69
69
|
"babel-jest": "^30.0.4",
|
|
70
70
|
"babel-plugin-transform-vite-meta-env": "^1.0.3",
|
|
71
71
|
"clsx": "^2.1.1",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"semantic-release": "^24.2.7",
|
|
85
85
|
"storybook": "^9.0.17",
|
|
86
86
|
"style-dictionary": "^5.0.1",
|
|
87
|
-
"stylelint": "^16.
|
|
87
|
+
"stylelint": "^16.22.0",
|
|
88
88
|
"stylelint-config-recommended": "^16.0.0",
|
|
89
89
|
"stylelint-config-standard": "^38.0.0",
|
|
90
90
|
"stylelint-order": "^7.0.0",
|