@uva-glass/component-library 3.21.2 → 3.22.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.
- package/dist/Button.module-BXzi8gZH.js +15 -0
- package/dist/Button.module-BXzi8gZH.js.map +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Periods.css +1 -1
- package/dist/components/Buttons/Button.js +1 -1
- package/dist/components/Buttons/LinkButton.js +1 -1
- package/dist/components/Buttons/MenuButton.js +1 -1
- package/dist/components/Periods/Periods.js +25 -25
- package/dist/types/UserInterface.d.ts +1 -1
- package/package.json +4 -4
- package/dist/Button.module-BVsTgdTe.js +0 -15
- package/dist/Button.module-BVsTgdTe.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './assets/Button.css';const t = "_button_ezcrm_1", n = {
|
|
2
|
+
button: t,
|
|
3
|
+
"button--blank": "_button--blank_ezcrm_35",
|
|
4
|
+
"button--blank-subtle": "_button--blank-subtle_ezcrm_36",
|
|
5
|
+
"button--blank-icon": "_button--blank-icon_ezcrm_37",
|
|
6
|
+
"button--primary": "_button--primary_ezcrm_82",
|
|
7
|
+
"button--secondary": "_button--secondary_ezcrm_98",
|
|
8
|
+
"button--destructive-primary": "_button--destructive-primary_ezcrm_114",
|
|
9
|
+
"button--destructive-secondary": "_button--destructive-secondary_ezcrm_132",
|
|
10
|
+
"button--wide-column": "_button--wide-column_ezcrm_150"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
n as s
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Button.module-BXzi8gZH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.module-BXzi8gZH.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/dist/assets/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_ezcrm_1{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:1px solid transparent;border-radius:.5rem;cursor:pointer;display:inline-flex;font-family:inherit;font-size:var(--font-size-default);gap:.5rem;height:2.75rem;justify-content:center;line-height:inherit;margin:0;padding:.75rem 1rem;transition:var(--transition-colors);white-space:nowrap}._button_ezcrm_1[href]{text-decoration:none}._button_ezcrm_1:focus-visible{outline:.125rem dotted var(--new-color-navy-600);outline-offset:.125rem}._button_ezcrm_1:hover{background-color:var(--new-color-grey-300);outline:0}._button--blank_ezcrm_35,._button--blank-subtle_ezcrm_36,._button--blank-icon_ezcrm_37{border:0;border-radius:0;gap:0;height:auto;padding:0;text-decoration:underline;vertical-align:middle}._button--blank_ezcrm_35,._button--blank-icon_ezcrm_37{color:var(--new-color-uva-black)}._button--blank-subtle_ezcrm_36{color:var(--new-color-grey-700)}._button--blank-icon_ezcrm_37{border:1px solid transparent;border-radius:.5rem;height:2.5rem;width:2.5rem}._button--blank_ezcrm_35:focus,._button--blank_ezcrm_35:not([disabled]):hover{background:none;text-decoration:underline}._button--blank-subtle_ezcrm_36:focus,._button--blank-subtle_ezcrm_36:not([disabled]):hover{background:none;color:var(--new-color-uva-black);text-decoration:underline}._button--blank-icon_ezcrm_37:focus,._button--blank-icon_ezcrm_37:not([disabled]):hover{background-color:var(--new-color-grey-300);border-color:var(--new-color-grey-600)}._button--primary_ezcrm_82{background-color:var(--new-color-uva-black);border-color:var(--new-color-uva-black);color:var(--new-color-uva-white)}._button--primary_ezcrm_82:hover{background-color:var(--new-color-grey-700);border-color:var(--new-color-grey-700)}._button--primary_ezcrm_82[disabled]{background-color:var(--new-color-uva-black);color:var(--new-color-uva-white)}._button--secondary_ezcrm_98{background-color:transparent;border-color:var(--new-color-uva-black);color:var(--new-color-uva-black)}._button--secondary_ezcrm_98:hover{background-color:var(--new-color-uva-black);color:var(--new-color-uva-white)}._button--secondary_ezcrm_98[disabled]{background-color:transparent;color:var(--new-color-uva-black)}._button--destructive-primary_ezcrm_114{background-color:var(--new-color-red-600);border-color:var(--new-color-red-600);color:var(--new-color-uva-white)}._button--destructive-primary_ezcrm_114:hover{background-color:var(--new-color-red-800);border-color:var(--new-color-red-800);color:var(--new-color-uva-white)}._button--destructive-primary_ezcrm_114[disabled]{background-color:var(--new-color-red-600);border-color:var(--new-color-red-600);color:var(--new-color-uva-white)}._button--destructive-secondary_ezcrm_132{background-color:var(--new-color-uva-white);border-color:var(--new-color-red-600);color:var(--new-color-red-600)}._button--destructive-secondary_ezcrm_132:hover{background-color:var(--new-color-red-600);border-color:var(--new-color-red-600);color:var(--new-color-uva-white)}._button--destructive-secondary_ezcrm_132[disabled]{background-color:var(--new-color-uva-white);border-color:var(--new-color-red-600);color:var(--new-color-red-600)}._button--wide-column_ezcrm_150{display:flex;flex-direction:column;font-size:var(--font-size-text-non-essential);gap:.25rem;height:unset;padding:.5rem .25rem;width:100%}._button_ezcrm_1[disabled]{cursor:unset;opacity:.4;text-decoration:none;transition-delay:.25s}
|
package/dist/assets/Periods.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._periods__container_zb1ls_1{display:flex;flex-wrap:nowrap}._periods__item_zb1ls_6{background-color:var(--new-color-grey-400);border:1px solid var(--new-color-grey-500);display:inline-block;height:.75rem;margin-right:.125rem;width:.5rem}._periods__item_zb1ls_6:last-child{margin-right:0}._periods__item_zb1ls_6:nth-child(3n):not(:last-child){margin-right:.5rem}._periods__item--active_zb1ls_23{background-color:var(--new-color-grey-600);border:unset}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import { c as u } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { forwardRef as a } from "react";
|
|
4
|
-
import { s as t } from "../../Button.module-
|
|
4
|
+
import { s as t } from "../../Button.module-BXzi8gZH.js";
|
|
5
5
|
const p = a(
|
|
6
6
|
({ children: o, type: r = "button", variant: s, displayColumn: m = !1, ...n }, e) => /* @__PURE__ */ f(
|
|
7
7
|
"button",
|
|
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
3
|
import { Link as i } from "react-router";
|
|
4
4
|
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
5
|
-
import { s as o } from "../../Button.module-
|
|
5
|
+
import { s as o } from "../../Button.module-BXzi8gZH.js";
|
|
6
6
|
const l = f(
|
|
7
7
|
({ variant: r, ...t }, m) => /* @__PURE__ */ s(i, { ...t, className: n(o.button, o[`button--${r}`]), ref: m })
|
|
8
8
|
);
|
|
@@ -2,7 +2,7 @@ import { jsxs as e, jsx as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { useButton as c } from "@react-aria/button";
|
|
3
3
|
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { Icon as i } from "../Icon/Icon.js";
|
|
5
|
-
import { s as r } from "../../Button.module-
|
|
5
|
+
import { s as r } from "../../Button.module-BXzi8gZH.js";
|
|
6
6
|
function B({ buttonRef: t, variant: s, iconName: o, children: n, ...m }) {
|
|
7
7
|
const { buttonProps: u } = c(m, t);
|
|
8
8
|
return /* @__PURE__ */ e("button", { ...u, ref: t, className: f(r.button, r[`button--${s}`]), children: [
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { c as P } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { useId as
|
|
4
|
-
import '../../assets/Periods.css';const
|
|
5
|
-
periods__container:
|
|
6
|
-
periods__item:
|
|
7
|
-
"periods__item--active": "_periods__item--
|
|
8
|
-
},
|
|
9
|
-
const
|
|
3
|
+
import { useId as N } from "react";
|
|
4
|
+
import '../../assets/Periods.css';const g = "_periods__container_zb1ls_1", v = "_periods__item_zb1ls_6", _ = {
|
|
5
|
+
periods__container: g,
|
|
6
|
+
periods__item: v,
|
|
7
|
+
"periods__item--active": "_periods__item--active_zb1ls_23"
|
|
8
|
+
}, S = 6, E = ({ periods: i, tooltipTranslations: u, maxPeriods: p = S }) => {
|
|
9
|
+
const f = Array.from({ length: p }, (e, t) => t + 1), b = N(), a = i.some((e) => typeof e == "number"), $ = (e) => {
|
|
10
10
|
const t = {};
|
|
11
|
-
return
|
|
12
|
-
if (typeof
|
|
13
|
-
const
|
|
14
|
-
t[
|
|
11
|
+
return a ? i.forEach((r) => {
|
|
12
|
+
if (typeof r == "number") {
|
|
13
|
+
const s = Math.ceil(r / 3), o = (r - 1) % 3 + 1;
|
|
14
|
+
t[s] || (t[s] = []), t[s].push(o);
|
|
15
15
|
}
|
|
16
|
-
}) : i.forEach((
|
|
17
|
-
const { semesterNumber:
|
|
18
|
-
t[
|
|
19
|
-
}), Object.keys(t).reduce((
|
|
20
|
-
const c = Number(
|
|
16
|
+
}) : i.forEach((r) => {
|
|
17
|
+
const { semesterNumber: s, periodInSemester: o } = r;
|
|
18
|
+
t[s] || (t[s] = []), t[s].push(o);
|
|
19
|
+
}), Object.keys(t).reduce((r, s, o) => {
|
|
20
|
+
const c = Number(s), n = t[c];
|
|
21
21
|
let m = "";
|
|
22
|
-
const
|
|
22
|
+
const d = n.length > 1 ? e.periods : e.period;
|
|
23
23
|
if (n.length > 1) {
|
|
24
24
|
const y = n.pop();
|
|
25
|
-
m = `Semester ${c} ${
|
|
25
|
+
m = `Semester ${c} ${d} ${n.join(", ")} ${e.and} ${y}`;
|
|
26
26
|
} else
|
|
27
|
-
m = `Semester ${c} ${
|
|
28
|
-
return `${
|
|
27
|
+
m = `Semester ${c} ${d} ${n[0]}`;
|
|
28
|
+
return `${r}${o > 0 ? ". " : ""}${m}`;
|
|
29
29
|
}, "").trim() + ".";
|
|
30
|
-
}, h = (e) =>
|
|
31
|
-
return /* @__PURE__ */
|
|
30
|
+
}, h = (e) => a ? i.includes(e) : !!i.find((t) => t.number === e);
|
|
31
|
+
return /* @__PURE__ */ l("div", { className: _.periods__container, title: u ? $(u) : "", children: f.map((e) => /* @__PURE__ */ l(
|
|
32
32
|
"span",
|
|
33
33
|
{
|
|
34
34
|
className: P(
|
|
@@ -36,10 +36,10 @@ import '../../assets/Periods.css';const N = "_periods__container_13djf_1", g = "
|
|
|
36
36
|
h(e) ? _["periods__item--active"] : ""
|
|
37
37
|
)
|
|
38
38
|
},
|
|
39
|
-
`${
|
|
39
|
+
`${b}-${e}`
|
|
40
40
|
)) });
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
E as Periods
|
|
44
44
|
};
|
|
45
45
|
//# sourceMappingURL=Periods.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type UIButtonVariant = 'primary' | 'secondary' | 'destructive-primary' | 'destructive-secondary' | 'blank' | 'blank-subtle' | 'blank-icon';
|
|
2
2
|
export type UISelectVariant = 'small' | 'regular';
|
|
3
3
|
export type UITooltipSize = 'small' | 'medium' | 'large';
|
|
4
|
-
export type UIStatus = 'information' | 'danger' | 'warning' | 'success' | 'default';
|
|
4
|
+
export type UIStatus = 'information' | 'danger' | 'warning' | 'success' | 'default' | 'cluster' | 'information-light' | 'warning-light' | 'success-light' | 'default-light';
|
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.
|
|
5
|
+
"version": "3.22.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@testing-library/jest-dom": "^6.6.3",
|
|
65
65
|
"@testing-library/react": "^16.3.0",
|
|
66
66
|
"@types/jest": "^29.5.14",
|
|
67
|
-
"@types/node": "^22.15.
|
|
67
|
+
"@types/node": "^22.15.21",
|
|
68
68
|
"@types/react-dom": "^19.1.5",
|
|
69
|
-
"@types/react": "^19.1.
|
|
69
|
+
"@types/react": "^19.1.5",
|
|
70
70
|
"@uva-glass/eslint-config": "^1.3.10",
|
|
71
71
|
"@uva-glass/stylelint-config": "^1.2.2",
|
|
72
72
|
"@vitejs/plugin-react": "^4.4.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"jest-environment-jsdom": "^29.7.0",
|
|
82
82
|
"jest-junit": "^16.0.0",
|
|
83
83
|
"jsdom": "^26.1.0",
|
|
84
|
-
"npm-run-all2": "^8.0.
|
|
84
|
+
"npm-run-all2": "^8.0.3",
|
|
85
85
|
"react": "^19.1.0",
|
|
86
86
|
"react-dom": "^19.1.0",
|
|
87
87
|
"react-router": "^7.6.0",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import './assets/Button.css';const t = "_button_ged5k_1", n = {
|
|
2
|
-
button: t,
|
|
3
|
-
"button--blank": "_button--blank_ged5k_35",
|
|
4
|
-
"button--blank-subtle": "_button--blank-subtle_ged5k_36",
|
|
5
|
-
"button--blank-icon": "_button--blank-icon_ged5k_37",
|
|
6
|
-
"button--primary": "_button--primary_ged5k_82",
|
|
7
|
-
"button--secondary": "_button--secondary_ged5k_98",
|
|
8
|
-
"button--destructive-primary": "_button--destructive-primary_ged5k_114",
|
|
9
|
-
"button--destructive-secondary": "_button--destructive-secondary_ged5k_132",
|
|
10
|
-
"button--wide-column": "_button--wide-column_ged5k_150"
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
n as s
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=Button.module-BVsTgdTe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.module-BVsTgdTe.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|