@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.
@@ -1,5 +1,5 @@
1
1
  import { jsxs as f, jsx as l } from "react/jsx-runtime";
2
- import { c as x } from "../../clsx-OuTLNxxd.js";
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 w } from "../FeedbackBox/FeedbackBox.js";
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 B } from "../Label/Label.js";
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-selector__container_d1p0j_1",
31
- "period-selector__container--label-left": "_period-selector__container--label-left_d1p0j_6",
32
- "period-selector__container--label-top": "_period-selector__container--label-top_d1p0j_12",
33
- "period-selector__selector-container": "_period-selector__selector-container_d1p0j_18",
34
- "period-selector__selector-row": "_period-selector__selector-row_d1p0j_24"
35
- }, h = 0, S = 1, E = 2, _ = 3, D = 7, I = (i) => {
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 t = 0; t < i.length; t += _)
38
- n.push(i.slice(t, t + _));
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 = D,
41
+ maxPeriods: i = I,
42
42
  defaultValues: n,
43
- label: t,
43
+ label: o,
44
44
  labelPosition: b = "top",
45
45
  required: m = !1,
46
46
  notValidatedText: p = "",
47
- onChange: g
47
+ onChange: x
48
48
  }) => {
49
- const R = Array.from({ length: i }, (e, r) => r + 1), a = I(R), j = a.map((e, r) => e.map((o) => ({
50
- label: `${r + 1}${e.length === 1 ? "" : `.${(o - 1) % _ + 1}`}`,
51
- value: o.toString()
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, o) => (n?.includes(o) && r.push(o), r), [])
54
+ (e) => e.reduce((r, t) => (n?.includes(t) && r.push(t), r), [])
55
55
  )
56
- ), [P, d] = M([]), u = (e) => e[h].length !== 0 || e[S].length !== 0 ? [E] : e[E].length !== 0 ? [h, S] : [], k = (e, r) => {
57
- c.current[r] = e.map((o) => Number(o)), d(u(c.current)), g([...c.current.flat()].sort());
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: x(
64
+ className: k(
65
65
  s["period-selector__container"],
66
66
  s[`period-selector__container--label-${b}`]
67
67
  ),
68
68
  children: [
69
- t && /* @__PURE__ */ l(B, { htmlFor: "", required: m, children: t }),
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: j.map((e, r) => /* @__PURE__ */ l(
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((o) => o.toString()),
76
- disableGroup: P.includes(r),
75
+ defaultValues: c.current[r].map((t) => t.toString()),
76
+ disableGroup: R.includes(r),
77
77
  required: m,
78
- onSetValues: (o) => k(o, r),
78
+ onSetValues: (t) => P(t, r),
79
79
  notValidated: p !== ""
80
80
  },
81
81
  `group_${r}`
82
82
  )) }),
83
- p !== "" && /* @__PURE__ */ l(w, { level: "error", feedback: p })
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.10",
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.4",
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.6.0",
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.21.1",
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",