@uva-glass/component-library 3.14.2 → 3.15.1
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
|
-
._page-
|
|
1
|
+
._page-overlay__container_13hmc_1{bottom:0;left:0;position:fixed;right:0;top:0;z-index:50}._page-overlay_13hmc_1{background:var(--color-white);display:flex;flex-direction:column;height:100dvh}._page-overlay--full-screen_13hmc_19{width:100vw}._page-overlay--with-gutters_13hmc_23{max-width:87.5rem;width:100%}._page-overlay__content_13hmc_28{background-color:var(--color-grey-100);display:flex;flex-direction:column;height:100svh;justify-content:space-between;overflow:hidden;overflow-y:auto;padding:0 1.5rem;width:100%}._page-overlay__children_13hmc_40{padding-bottom:1rem}._page-overlay__title_13hmc_44{font-size:var(--font-size-s);line-height:var(--line-height-m);margin:0 1.5rem 0 0;padding:1rem 1.5rem}._page-overlay__buttons-bar_13hmc_51{background-color:var(--color-white);bottom:0;display:flex;flex-direction:column;gap:.75rem;justify-content:flex-start;margin:0 -1.5rem;padding:.5rem 1rem;position:sticky;right:0}._page-overlay__buttons-bar_13hmc_51:before{background:linear-gradient(to top,#0000004d,#0000);bottom:100%;content:"";height:10px;left:0;opacity:0;pointer-events:none;position:absolute;right:0;transition:opacity .4s ease-out}._page-overlay__buttons-bar--shadow_13hmc_77:before{opacity:1}._page-overlay__close_13hmc_81{position:relative;right:1rem;bottom:2.625rem}@media (min-width: 28rem) and (min-height: 28rem){._page-overlay--with-gutters_13hmc_23{margin:0 .75rem}}
|
|
@@ -3,43 +3,43 @@ import { useDialog as A } from "@react-aria/dialog";
|
|
|
3
3
|
import { FocusScope as C } from "@react-aria/focus";
|
|
4
4
|
import { useModal as K, useOverlay as M, usePreventScroll as U, OverlayContainer as V } from "@react-aria/overlays";
|
|
5
5
|
import { c as i } from "../../clsx-OuTLNxxd.js";
|
|
6
|
-
import { useRef as
|
|
6
|
+
import { useRef as h, useState as f, useEffect as $ } from "react";
|
|
7
7
|
import { OverlayCloseButton as q } from "../OverlayCloseButton/OverlayCloseButton.js";
|
|
8
8
|
import { Spinner as G } from "../Spinner/Spinner.js";
|
|
9
9
|
import { Backdrop as J } from "../Backdrop/Backdrop.js";
|
|
10
10
|
import '../../assets/PageOverlay.css';const o = {
|
|
11
|
-
"page-overlay__container": "_page-
|
|
12
|
-
"page-overlay": "_page-
|
|
13
|
-
"page-overlay--full-screen": "_page-overlay--full-
|
|
14
|
-
"page-overlay--with-gutters": "_page-overlay--with-
|
|
15
|
-
"page-overlay__content": "_page-
|
|
16
|
-
"page-overlay__children": "_page-
|
|
17
|
-
"page-overlay__title": "_page-
|
|
18
|
-
"page-overlay__buttons-bar": "_page-overlay__buttons-
|
|
19
|
-
"page-overlay__buttons-bar--shadow": "_page-overlay__buttons-bar--
|
|
20
|
-
"page-overlay__close": "_page-
|
|
11
|
+
"page-overlay__container": "_page-overlay__container_13hmc_1",
|
|
12
|
+
"page-overlay": "_page-overlay_13hmc_1",
|
|
13
|
+
"page-overlay--full-screen": "_page-overlay--full-screen_13hmc_19",
|
|
14
|
+
"page-overlay--with-gutters": "_page-overlay--with-gutters_13hmc_23",
|
|
15
|
+
"page-overlay__content": "_page-overlay__content_13hmc_28",
|
|
16
|
+
"page-overlay__children": "_page-overlay__children_13hmc_40",
|
|
17
|
+
"page-overlay__title": "_page-overlay__title_13hmc_44",
|
|
18
|
+
"page-overlay__buttons-bar": "_page-overlay__buttons-bar_13hmc_51",
|
|
19
|
+
"page-overlay__buttons-bar--shadow": "_page-overlay__buttons-bar--shadow_13hmc_77",
|
|
20
|
+
"page-overlay__close": "_page-overlay__close_13hmc_81"
|
|
21
21
|
};
|
|
22
22
|
function le({
|
|
23
23
|
buttons: t,
|
|
24
24
|
children: b,
|
|
25
|
-
isLoading:
|
|
26
|
-
spinnerAriaValueText:
|
|
27
|
-
closeButtonAriaValueText:
|
|
25
|
+
isLoading: w,
|
|
26
|
+
spinnerAriaValueText: S = "Loading",
|
|
27
|
+
closeButtonAriaValueText: P = "Close",
|
|
28
28
|
isOpen: l,
|
|
29
|
-
noValidate:
|
|
29
|
+
noValidate: N = !1,
|
|
30
30
|
onClose: p,
|
|
31
|
-
onSubmit:
|
|
31
|
+
onSubmit: T,
|
|
32
32
|
title: s,
|
|
33
|
-
headerContent:
|
|
33
|
+
headerContent: c,
|
|
34
34
|
variant: m = "full-screen"
|
|
35
35
|
}) {
|
|
36
|
-
const
|
|
36
|
+
const n = h(null), v = h(null), [E, x] = f(!1), [L, B] = f(!1), { dialogProps: F, titleProps: H } = A({ role: "dialog" }, n), { modalProps: k } = K({ isDisabled: !l }), { overlayProps: z, underlayProps: D } = M({ isOpen: l, onClose: p }, n);
|
|
37
37
|
U({ isDisabled: !l }), $(() => {
|
|
38
38
|
const r = v.current;
|
|
39
39
|
if (!r) return;
|
|
40
40
|
function g() {
|
|
41
41
|
const u = r.scrollHeight, y = r.clientHeight, j = r.scrollTop;
|
|
42
|
-
|
|
42
|
+
x(u > y), B(j + y >= u);
|
|
43
43
|
}
|
|
44
44
|
function a() {
|
|
45
45
|
g();
|
|
@@ -51,27 +51,27 @@ function le({
|
|
|
51
51
|
return () => {
|
|
52
52
|
r.removeEventListener("scroll", a), window.removeEventListener("resize", a), clearTimeout(R);
|
|
53
53
|
};
|
|
54
|
-
}, [l,
|
|
54
|
+
}, [l, c]);
|
|
55
55
|
function I(r) {
|
|
56
56
|
r.stopPropagation();
|
|
57
57
|
}
|
|
58
|
-
return l ? /* @__PURE__ */ e(V, { className: o["page-overlay__container"], children: /* @__PURE__ */ e(J, { ...D, children:
|
|
58
|
+
return l ? /* @__PURE__ */ e(V, { className: o["page-overlay__container"], children: /* @__PURE__ */ e(J, { ...D, children: w ? /* @__PURE__ */ e(G, { ariaValueText: S }) : /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(C, { autoFocus: !0, contain: !0, restoreFocus: !0, children: /* @__PURE__ */ _(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
|
-
...
|
|
62
|
-
...
|
|
61
|
+
...F,
|
|
62
|
+
...k,
|
|
63
63
|
...z,
|
|
64
64
|
className: i(o["page-overlay"], {
|
|
65
65
|
[o[`page-overlay--${m}`]]: m
|
|
66
66
|
}),
|
|
67
67
|
onKeyUp: I,
|
|
68
68
|
role: "presentation",
|
|
69
|
-
ref:
|
|
69
|
+
ref: n,
|
|
70
70
|
children: [
|
|
71
|
-
(s ||
|
|
72
|
-
s && /* @__PURE__ */ e("h1", { ...
|
|
73
|
-
|
|
74
|
-
/* @__PURE__ */ e("span", { className: o["page-overlay__close"], children: /* @__PURE__ */ e(q, { "aria-label":
|
|
71
|
+
(s || c) && /* @__PURE__ */ _(d, { children: [
|
|
72
|
+
s && /* @__PURE__ */ e("h1", { ...H, className: o["page-overlay__title"], children: s }),
|
|
73
|
+
c,
|
|
74
|
+
/* @__PURE__ */ e("span", { className: o["page-overlay__close"], children: /* @__PURE__ */ e(q, { "aria-label": P, onClick: p }) })
|
|
75
75
|
] }),
|
|
76
76
|
/* @__PURE__ */ _(
|
|
77
77
|
"form",
|
|
@@ -79,8 +79,8 @@ function le({
|
|
|
79
79
|
className: i(o["page-overlay__content"], {
|
|
80
80
|
[o["page-overlay--content-with-buttons"]]: t
|
|
81
81
|
}),
|
|
82
|
-
onSubmit:
|
|
83
|
-
noValidate:
|
|
82
|
+
onSubmit: T,
|
|
83
|
+
noValidate: N,
|
|
84
84
|
ref: v,
|
|
85
85
|
children: [
|
|
86
86
|
/* @__PURE__ */ e("div", { className: o["page-overlay__children"], children: b }),
|
|
@@ -88,7 +88,7 @@ function le({
|
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
className: i(o["page-overlay__buttons-bar"], {
|
|
91
|
-
[o["page-overlay__buttons-bar--shadow"]]:
|
|
91
|
+
[o["page-overlay__buttons-bar--shadow"]]: E && !L
|
|
92
92
|
}),
|
|
93
93
|
children: t
|
|
94
94
|
}
|
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.15.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@testing-library/react": "^16.3.0",
|
|
66
66
|
"@types/jest": "^29.5.14",
|
|
67
67
|
"@types/node": "^22.15.3",
|
|
68
|
-
"@types/react-dom": "^19.1.
|
|
68
|
+
"@types/react-dom": "^19.1.3",
|
|
69
69
|
"@types/react": "^19.1.2",
|
|
70
70
|
"@uva-glass/eslint-config": "^1.3.10",
|
|
71
71
|
"@uva-glass/stylelint-config": "^1.2.2",
|
|
@@ -102,9 +102,9 @@
|
|
|
102
102
|
"vite": "^6.3.4"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@babel/preset-env": "^7.
|
|
106
|
-
"@babel/preset-react": "^7.
|
|
107
|
-
"@babel/preset-typescript": "^7.27.
|
|
105
|
+
"@babel/preset-env": "^7.27.1",
|
|
106
|
+
"@babel/preset-react": "^7.27.1",
|
|
107
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
108
108
|
"@lexical/link": "^0.31.0",
|
|
109
109
|
"@lexical/list": "^0.31.0",
|
|
110
110
|
"@lexical/react": "^0.31.0",
|