@uva-glass/component-library 3.13.0 → 3.14.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
- ._overlay-step-bar__container_u2k5r_1{align-items:center;background-color:var(--color-grey-50);display:flex;gap:2rem;height:2.5rem;justify-content:center}._overlay-step-bar__separator_u2k5r_10{color:var(--color-grey-400)}._overlay-step-bar__step_u2k5r_14{align-items:center;color:var(--color-grey-400);display:flex;font-family:inherit;font-size:var(--font-size-default);gap:.5rem}._overlay-step-bar__step-bullet_u2k5r_23{align-items:center;aspect-ratio:1;border-radius:50%;display:flex;gap:.5rem;height:1.25rem;justify-content:center;width:1.25rem}._overlay-step-bar__step--inactive_u2k5r_34 ._overlay-step-bar__step-bullet_u2k5r_23{background-color:transparent;border:1px solid var(--color-grey-400);color:var(--color-grey-400)}._overlay-step-bar__step--active_u2k5r_40{color:var(--color-black)}._overlay-step-bar__step--active_u2k5r_40 ._overlay-step-bar__step-bullet_u2k5r_23{background-color:var(--color-black);color:var(--color-white)}._overlay-step-bar__step--checked_u2k5r_49{color:var(--color-green-500);font-weight:var(--semibold)}._overlay-step-bar__step--checked_u2k5r_49 ._overlay-step-bar__step-bullet_u2k5r_23{border:1px solid var(--color-green-400);color:var(--color-green-500)}
1
+ ._overlay-step-bar__container_18gn9_1{align-items:center;background-color:var(--color-grey-50);display:flex;height:2.5rem;justify-content:center;overflow-y:hidden}._overlay-step-bar__step_18gn9_10{align-items:center;background-color:var(--color-grey-50);color:var(--color-grey-500);display:flex;font-family:inherit;font-size:var(--font-size-default);gap:.5rem;height:100%;padding:0 2rem;position:relative}._overlay-step-bar__step_18gn9_10:not(:last-child):after{border-bottom:1.5rem solid transparent;border-left:1rem solid var(--color-grey-50);border-top:1.5rem solid transparent;content:"";position:absolute;right:-.25rem;top:-.25rem;z-index:10}._overlay-step-bar__step_18gn9_10:not(:last-child):before{border-bottom:1.5rem solid transparent;border-left:1rem solid var(--color-white);border-top:1.5rem solid transparent;content:"";position:absolute;right:-.5rem;top:-.25rem;z-index:5}._overlay-step-bar__step--active_18gn9_45{color:var(--color-black);font-weight:var(--semibold)}
@@ -1 +1 @@
1
- ._page-overlay__container_1et9u_1{bottom:0;left:0;position:fixed;right:0;top:0;z-index:50}._page-overlay_1et9u_1{background:var(--color-white);display:flex;flex-direction:column;height:100dvh;width:100vw}._page-overlay__content_1et9u_20{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_1et9u_32{padding-bottom:1rem}._page-overlay__title_1et9u_36{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_1et9u_43{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_1et9u_43: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_1et9u_69:before{opacity:1}._page-overlay__close_1et9u_73{position:absolute;right:1.5rem;top:1rem}
1
+ ._page-overlay__container_mxs4k_1{bottom:0;left:0;position:fixed;right:0;top:0;z-index:50}._page-overlay_mxs4k_1{background:var(--color-white);display:flex;flex-direction:column;height:100dvh}._page-overlay--full-screen_mxs4k_19{width:100vw}._page-overlay--with-gutters_mxs4k_23{margin:0 .75rem;max-width:87.5rem;width:100%}._page-overlay__content_mxs4k_29{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_mxs4k_41{padding-bottom:1rem}._page-overlay__title_mxs4k_45{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_mxs4k_52{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_mxs4k_52: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_mxs4k_78:before{opacity:1}._page-overlay__close_mxs4k_82{position:relative;right:1rem;bottom:2.625rem}
@@ -1,9 +1,7 @@
1
- type StepType = {
2
- label: string;
3
- status: 'inactive' | 'active' | 'checked';
4
- };
5
1
  export interface OverlayStepBarProps {
6
- steps: StepType[];
2
+ /** Array of strings. */
3
+ stepLabels: string[];
4
+ /** activeStep number starting with 1. */
5
+ activeStep: number;
7
6
  }
8
- export declare const OverlayStepBar: ({ steps }: OverlayStepBarProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
7
+ export declare const OverlayStepBar: ({ stepLabels, activeStep }: OverlayStepBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,60 +1,22 @@
1
- import { jsx as e, jsxs as s, Fragment as m } from "react/jsx-runtime";
2
- import { c as l } from "../../clsx-OuTLNxxd.js";
3
- import "react";
4
- import { Icon as i } from "../Icon/Icon.js";
5
- import "../Buttons/Button.js";
6
- import "../Buttons/LinkButton.js";
7
- import "@react-aria/button";
8
- import "../Checkbox/Checkbox.js";
9
- import "@react-aria/dialog";
10
- import "@react-aria/focus";
11
- import "@react-aria/overlays";
12
- import "../OverlayCloseButton/OverlayCloseButton.js";
13
- import "../GridRow/GridRow.js";
14
- import "../IconButton/IconButton.js";
15
- import "../Input/Input.js";
16
- import "../InputField/InputField.js";
17
- import "react-router";
18
- import "../../TablePlugin-WOgWan8s.js";
19
- import "../RteEditor/Providers/LanguageProvider.js";
20
- import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
- import "../RteEditor/hooks/components/Flyout.js";
22
- import "../../index-DllfJcv4.js";
23
- import "../SelectListbox/SelectListbox.js";
24
- import "../SelectListbox/SelectProvider.js";
25
- import "../Sortable/components/SortableItem.js";
26
- import "../../SortableProvider-DZggDO3M.js";
27
- import '../../assets/OverlayStepBar.css';const r = {
28
- "overlay-step-bar__container": "_overlay-step-bar__container_u2k5r_1",
29
- "overlay-step-bar__separator": "_overlay-step-bar__separator_u2k5r_10",
30
- "overlay-step-bar__step": "_overlay-step-bar__step_u2k5r_14",
31
- "overlay-step-bar__step-bullet": "_overlay-step-bar__step-bullet_u2k5r_23",
32
- "overlay-step-bar__step--inactive": "_overlay-step-bar__step--inactive_u2k5r_34",
33
- "overlay-step-bar__step--active": "_overlay-step-bar__step--active_u2k5r_40",
34
- "overlay-step-bar__step--checked": "_overlay-step-bar__step--checked_u2k5r_49"
35
- }, t = [
36
- "MiniCheck",
37
- "One",
38
- "Two",
39
- "Three",
40
- "Four",
41
- "Five",
42
- "Six",
43
- "Seven",
44
- "Eight",
45
- "Nine"
46
- ], B = ({ steps: a }) => {
47
- if (a.length > t.length - 1)
48
- throw new Error("The 'steps' array must contain no more than 9 objects.");
49
- return /* @__PURE__ */ e("div", { className: r["overlay-step-bar__container"], children: a.length < t.length && a.map(({ label: p, status: _ }, o) => /* @__PURE__ */ s(m, { children: [
50
- o !== 0 && /* @__PURE__ */ e(i, { name: "CheveronRight", size: 16, className: r["overlay-step-bar__separator"] }),
51
- /* @__PURE__ */ s("span", { className: l(r["overlay-step-bar__step"], r[`overlay-step-bar__step--${_}`]), children: [
52
- /* @__PURE__ */ e("span", { className: r["overlay-step-bar__step-bullet"], children: /* @__PURE__ */ e(i, { name: _ === "checked" ? t[0] : t[o + 1], size: 24 }) }),
53
- p
54
- ] })
55
- ] }, `${o}_${p}`)) });
56
- };
1
+ import { jsx as e, Fragment as n, jsxs as o } from "react/jsx-runtime";
2
+ import { c as p } from "../../clsx-OuTLNxxd.js";
3
+ import '../../assets/OverlayStepBar.css';const t = {
4
+ "overlay-step-bar__container": "_overlay-step-bar__container_18gn9_1",
5
+ "overlay-step-bar__step": "_overlay-step-bar__step_18gn9_10",
6
+ "overlay-step-bar__step--active": "_overlay-step-bar__step--active_18gn9_45"
7
+ }, i = ({ stepLabels: r, activeStep: s = 0 }) => (s > r.length && console.error("activeStep is greater than the number of steps"), /* @__PURE__ */ e("div", { className: t["overlay-step-bar__container"], children: r.length && r.map((_, a) => /* @__PURE__ */ e(n, { children: /* @__PURE__ */ o(
8
+ "span",
9
+ {
10
+ className: p(t["overlay-step-bar__step"], [
11
+ a === s - 1 && t["overlay-step-bar__step--active"]
12
+ ]),
13
+ children: [
14
+ /* @__PURE__ */ e("span", { children: a + 1 }),
15
+ /* @__PURE__ */ e("span", { children: _ })
16
+ ]
17
+ }
18
+ ) }, `${a}_${_}`)) }));
57
19
  export {
58
- B as OverlayStepBar
20
+ i as OverlayStepBar
59
21
  };
60
22
  //# sourceMappingURL=OverlayStepBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayStepBar.js","sources":["../../../src/components/OverlayStepBar/OverlayStepBar.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { Fragment } from 'react/jsx-runtime';\n\nimport type { Icons } from 'components/Icon/icons';\n\nimport styles from './OverlayStepBar.module.css';\n\nimport { Icon } from 'components';\n\ntype StepType = {\n label: string;\n status: 'inactive' | 'active' | 'checked';\n};\n\nexport interface OverlayStepBarProps {\n steps: StepType[];\n}\n\nconst ICON_NAMES: (keyof typeof Icons)[] = [\n 'MiniCheck',\n 'One',\n 'Two',\n 'Three',\n 'Four',\n 'Five',\n 'Six',\n 'Seven',\n 'Eight',\n 'Nine',\n];\n\nexport const OverlayStepBar = ({ steps }: OverlayStepBarProps) => {\n if (steps.length > ICON_NAMES.length - 1) {\n throw new Error(\"The 'steps' array must contain no more than 9 objects.\");\n }\n\n return (\n <div className={styles['overlay-step-bar__container']}>\n {steps.length < ICON_NAMES.length &&\n steps.map(({ label, status }, index) => (\n <Fragment key={`${index}_${label}`}>\n {index !== 0 && <Icon name={'CheveronRight'} size={16} className={styles['overlay-step-bar__separator']} />}\n <span className={clsx(styles[`overlay-step-bar__step`], styles[`overlay-step-bar__step--${status}`])}>\n <span className={styles['overlay-step-bar__step-bullet']}>\n <Icon name={status === 'checked' ? ICON_NAMES[0] : ICON_NAMES[index + 1]} size={24} />\n </span>\n {label}\n </span>\n </Fragment>\n ))}\n </div>\n );\n};\n"],"names":["ICON_NAMES","OverlayStepBar","steps","styles","label","status","index","Fragment","jsx","Icon","jsxs","clsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkBMA,IAAqC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAiB,CAAC,EAAE,OAAAC,QAAiC;AAChE,MAAIA,EAAM,SAASF,EAAW,SAAS;AAC/B,UAAA,IAAI,MAAM,wDAAwD;AAG1E,2BACG,OAAI,EAAA,WAAWG,EAAO,6BAA6B,GACjD,YAAM,SAASH,EAAW,UACzBE,EAAM,IAAI,CAAC,EAAE,OAAAE,GAAO,QAAAC,KAAUC,wBAC3BC,GACE,EAAA,UAAA;AAAA,IAAUD,MAAA,KAAM,gBAAAE,EAAAC,GAAA,EAAK,MAAM,iBAAiB,MAAM,IAAI,WAAWN,EAAO,6BAA6B,EAAG,CAAA;AAAA,IACxG,gBAAAO,EAAA,QAAA,EAAK,WAAWC,EAAKR,EAAO,wBAAwB,GAAGA,EAAO,2BAA2BE,CAAM,EAAE,CAAC,GACjG,UAAA;AAAA,MAAA,gBAAAG,EAAC,UAAK,WAAWL,EAAO,+BAA+B,GACrD,UAAA,gBAAAK,EAACC,KAAK,MAAMJ,MAAW,YAAYL,EAAW,CAAC,IAAIA,EAAWM,IAAQ,CAAC,GAAG,MAAM,GAAI,CAAA,GACtF;AAAA,MACCF;AAAA,IAAA,EACH,CAAA;AAAA,EAAA,EAAA,GAPa,GAAGE,CAAK,IAAIF,CAAK,EAQhC,CACD,GACL;AAEJ;"}
1
+ {"version":3,"file":"OverlayStepBar.js","sources":["../../../src/components/OverlayStepBar/OverlayStepBar.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { Fragment } from 'react/jsx-runtime';\n\nimport styles from './OverlayStepBar.module.css';\n\nexport interface OverlayStepBarProps {\n /** Array of strings. */\n stepLabels: string[];\n /** activeStep number starting with 1. */\n activeStep: number;\n}\n\nexport const OverlayStepBar = ({ stepLabels, activeStep = 0 }: OverlayStepBarProps) => {\n if (activeStep > stepLabels.length) {\n console.error('activeStep is greater than the number of steps');\n }\n\n return (\n <div className={styles['overlay-step-bar__container']}>\n {stepLabels.length &&\n stepLabels.map((label, index) => (\n <Fragment key={`${index}_${label}`}>\n <span\n className={clsx(styles[`overlay-step-bar__step`], [\n index === activeStep - 1 && styles[`overlay-step-bar__step--active`],\n ])}\n >\n <span>{index + 1}</span>\n <span>{label}</span>\n </span>\n </Fragment>\n ))}\n </div>\n );\n};\n"],"names":["OverlayStepBar","stepLabels","activeStep","jsx","styles","label","index","Fragment","jsxs","clsx"],"mappings":";;;;;;GAYaA,IAAiB,CAAC,EAAE,YAAAC,GAAY,YAAAC,IAAa,SACpDA,IAAaD,EAAW,UAC1B,QAAQ,MAAM,gDAAgD,GAI7D,gBAAAE,EAAA,OAAA,EAAI,WAAWC,EAAO,6BAA6B,GACjD,UAAAH,EAAW,UACVA,EAAW,IAAI,CAACI,GAAOC,wBACpBC,GACC,EAAA,UAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKL,EAAO,wBAAwB,GAAG;AAAA,MAChDE,MAAUJ,IAAa,KAAKE,EAAO,gCAAgC;AAAA,IAAA,CACpE;AAAA,IAED,UAAA;AAAA,MAAC,gBAAAD,EAAA,QAAA,EAAM,cAAQ,EAAE,CAAA;AAAA,MACjB,gBAAAA,EAAC,UAAM,UAAME,EAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AAAA,KAPF,GAAGC,CAAK,IAAID,CAAK,EAShC,CACD,GACL;"}
@@ -1,22 +1,17 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as s } from "react/jsx-runtime";
2
2
  import { OverlayStepBar as e } from "./OverlayStepBar.js";
3
- const s = "<OverlayStepBar />", i = {
3
+ const r = "<OverlayStepBar stelLabels={[string]} activeStep={number}/>", i = {
4
4
  title: "Molecules/OverlayStepBar",
5
5
  component: e,
6
6
  argTypes: {},
7
7
  parameters: {
8
8
  inspectComponent: e,
9
- codeString: s
9
+ codeString: r
10
10
  }
11
- }, r = (t) => /* @__PURE__ */ a(e, { ...t }), l = {
12
- steps: [
13
- { status: "checked", label: "Basisgegevens" },
14
- { status: "checked", label: "Structuur" },
15
- { status: "active", label: "Aanvullende informatie" },
16
- { status: "inactive", label: "Docenten" },
17
- { status: "inactive", label: "Overzicht" }
18
- ]
19
- }, n = r.bind({});
11
+ }, a = (t) => /* @__PURE__ */ s(e, { ...t }), l = {
12
+ stepLabels: ["BasicDetails", "Lecturers", "PeriodPlanning", "Assessment", "Miscellaneous", "Overview"],
13
+ activeStep: 2
14
+ }, n = a.bind({});
20
15
  n.args = {
21
16
  ...l
22
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayStepBar.stories.js","sources":["../../../src/components/OverlayStepBar/OverlayStepBar.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { OverlayStepBarProps } from './OverlayStepBar';\n\nimport { OverlayStepBar } from './OverlayStepBar';\n\nconst codeString = '<OverlayStepBar />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/OverlayStepBar',\n component: OverlayStepBar,\n argTypes: {},\n parameters: {\n inspectComponent: OverlayStepBar,\n codeString: codeString,\n },\n} as Meta<OverlayStepBarProps>;\n\nconst Template: StoryFn<OverlayStepBarProps> = (args) => <OverlayStepBar {...args} />;\n\nconst defaultArgs: Partial<OverlayStepBarProps> = {\n steps: [\n { status: 'checked', label: 'Basisgegevens' },\n { status: 'checked', label: 'Structuur' },\n { status: 'active', label: 'Aanvullende informatie' },\n { status: 'inactive', label: 'Docenten' },\n { status: 'inactive', label: 'Overzicht' },\n ],\n};\n\nexport const OverlayStepBarExample = Template.bind({});\nOverlayStepBarExample.args = {\n ...defaultArgs,\n};\n"],"names":["codeString","OverlayStepBar_stories","OverlayStepBar","Template","args","jsx","defaultArgs","OverlayStepBarExample"],"mappings":";;AAKA,MAAMA,IAAa,sBAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAyC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAgB,GAAGE,GAAM,GAE7EE,IAA4C;AAAA,EAChD,OAAO;AAAA,IACL,EAAE,QAAQ,WAAW,OAAO,gBAAgB;AAAA,IAC5C,EAAE,QAAQ,WAAW,OAAO,YAAY;AAAA,IACxC,EAAE,QAAQ,UAAU,OAAO,yBAAyB;AAAA,IACpD,EAAE,QAAQ,YAAY,OAAO,WAAW;AAAA,IACxC,EAAE,QAAQ,YAAY,OAAO,YAAY;AAAA,EAAA;AAE7C,GAEaC,IAAwBJ,EAAS,KAAK,CAAE,CAAA;AACrDI,EAAsB,OAAO;AAAA,EAC3B,GAAGD;AACL;"}
1
+ {"version":3,"file":"OverlayStepBar.stories.js","sources":["../../../src/components/OverlayStepBar/OverlayStepBar.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { OverlayStepBarProps } from './OverlayStepBar';\n\nimport { OverlayStepBar } from './OverlayStepBar';\n\nconst codeString = '<OverlayStepBar stelLabels={[string]} activeStep={number}/>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/OverlayStepBar',\n component: OverlayStepBar,\n argTypes: {},\n parameters: {\n inspectComponent: OverlayStepBar,\n codeString: codeString,\n },\n} as Meta<OverlayStepBarProps>;\n\nconst Template: StoryFn<OverlayStepBarProps> = (args) => <OverlayStepBar {...args} />;\n\nconst defaultArgs: Partial<OverlayStepBarProps> = {\n stepLabels: ['BasicDetails', 'Lecturers', 'PeriodPlanning', 'Assessment', 'Miscellaneous', 'Overview'],\n activeStep: 2,\n};\n\nexport const OverlayStepBarExample = Template.bind({});\nOverlayStepBarExample.args = {\n ...defaultArgs,\n};\n"],"names":["codeString","OverlayStepBar_stories","OverlayStepBar","Template","args","jsx","defaultArgs","OverlayStepBarExample"],"mappings":";;AAKA,MAAMA,IAAa,+DAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU,CAAC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAyC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAgB,GAAGE,GAAM,GAE7EE,IAA4C;AAAA,EAChD,YAAY,CAAC,gBAAgB,aAAa,kBAAkB,cAAc,iBAAiB,UAAU;AAAA,EACrG,YAAY;AACd,GAEaC,IAAwBJ,EAAS,KAAK,CAAE,CAAA;AACrDI,EAAsB,OAAO;AAAA,EAC3B,GAAGD;AACL;"}
@@ -20,6 +20,8 @@ export interface PageOverlayProps {
20
20
  title?: string;
21
21
  /** The contents of the dialog header. */
22
22
  headerContent?: ReactNode;
23
+ /** The variant styling of the dialog. */
24
+ variant?: 'full-screen' | 'with-gutters';
23
25
  }
24
26
  /** Represents a component for a modal dialog. */
25
- export declare function PageOverlay({ buttons, children, isLoading, spinnerAriaValueText, closeButtonAriaValueText, isOpen, noValidate, onClose, onSubmit, title, headerContent, }: PropsWithChildren<PageOverlayProps>): import("react/jsx-runtime").JSX.Element | null;
27
+ export declare function PageOverlay({ buttons, children, isLoading, spinnerAriaValueText, closeButtonAriaValueText, isOpen, noValidate, onClose, onSubmit, title, headerContent, variant, }: PropsWithChildren<PageOverlayProps>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,88 +1,94 @@
1
- import { jsx as e, Fragment as m, jsxs as i } from "react/jsx-runtime";
2
- import { useDialog as j } from "@react-aria/dialog";
3
- import { FocusScope as k } from "@react-aria/focus";
4
- import { useModal as A, useOverlay as C, usePreventScroll as K, OverlayContainer as M } from "@react-aria/overlays";
5
- import { c as d } from "../../clsx-OuTLNxxd.js";
6
- import { useRef as y, useState as f, useEffect as U } from "react";
7
- import { OverlayCloseButton as V } from "../OverlayCloseButton/OverlayCloseButton.js";
8
- import { Spinner as q } from "../Spinner/Spinner.js";
1
+ import { jsx as e, Fragment as d, jsxs as _ } from "react/jsx-runtime";
2
+ import { useDialog as A } from "@react-aria/dialog";
3
+ import { FocusScope as C } from "@react-aria/focus";
4
+ import { useModal as K, useOverlay as M, usePreventScroll as U, OverlayContainer as V } from "@react-aria/overlays";
5
+ import { c as i } from "../../clsx-OuTLNxxd.js";
6
+ import { useRef as f, useState as h, useEffect as $ } from "react";
7
+ import { OverlayCloseButton as q } from "../OverlayCloseButton/OverlayCloseButton.js";
8
+ import { Spinner as G } from "../Spinner/Spinner.js";
9
+ import { Backdrop as J } from "../Backdrop/Backdrop.js";
9
10
  import '../../assets/PageOverlay.css';const o = {
10
- "page-overlay__container": "_page-overlay__container_1et9u_1",
11
- "page-overlay": "_page-overlay_1et9u_1",
12
- "page-overlay__content": "_page-overlay__content_1et9u_20",
13
- "page-overlay__children": "_page-overlay__children_1et9u_32",
14
- "page-overlay__title": "_page-overlay__title_1et9u_36",
15
- "page-overlay__buttons-bar": "_page-overlay__buttons-bar_1et9u_43",
16
- "page-overlay__buttons-bar--shadow": "_page-overlay__buttons-bar--shadow_1et9u_69",
17
- "page-overlay__close": "_page-overlay__close_1et9u_73"
11
+ "page-overlay__container": "_page-overlay__container_mxs4k_1",
12
+ "page-overlay": "_page-overlay_mxs4k_1",
13
+ "page-overlay--full-screen": "_page-overlay--full-screen_mxs4k_19",
14
+ "page-overlay--with-gutters": "_page-overlay--with-gutters_mxs4k_23",
15
+ "page-overlay__content": "_page-overlay__content_mxs4k_29",
16
+ "page-overlay__children": "_page-overlay__children_mxs4k_41",
17
+ "page-overlay__title": "_page-overlay__title_mxs4k_45",
18
+ "page-overlay__buttons-bar": "_page-overlay__buttons-bar_mxs4k_52",
19
+ "page-overlay__buttons-bar--shadow": "_page-overlay__buttons-bar--shadow_mxs4k_78",
20
+ "page-overlay__close": "_page-overlay__close_mxs4k_82"
18
21
  };
19
- function $({
22
+ function le({
20
23
  buttons: t,
21
- children: h,
22
- isLoading: b,
23
- spinnerAriaValueText: S = "Loading",
24
+ children: b,
25
+ isLoading: x,
26
+ spinnerAriaValueText: k = "Loading",
24
27
  closeButtonAriaValueText: w = "Close",
25
- isOpen: a,
26
- noValidate: N = !1,
27
- onClose: _,
28
+ isOpen: l,
29
+ noValidate: S = !1,
30
+ onClose: p,
28
31
  onSubmit: P,
29
32
  title: s,
30
- headerContent: n
33
+ headerContent: n,
34
+ variant: m = "full-screen"
31
35
  }) {
32
- const c = y(null), u = y(null), [T, E] = f(!1), [x, L] = f(!1), { dialogProps: F, titleProps: H } = j({ role: "dialog" }, c), { modalProps: z } = A({ isDisabled: !a }), { overlayProps: B } = C({ isOpen: a, onClose: _ }, c);
33
- K({ isDisabled: !a }), U(() => {
34
- const r = u.current;
36
+ const c = f(null), v = f(null), [N, T] = h(!1), [E, L] = h(!1), { dialogProps: B, titleProps: F } = A({ role: "dialog" }, c), { modalProps: H } = K({ isDisabled: !l }), { overlayProps: z, underlayProps: D } = M({ isOpen: l, onClose: p }, c);
37
+ U({ isDisabled: !l }), $(() => {
38
+ const r = v.current;
35
39
  if (!r) return;
36
- function p() {
37
- const v = r.scrollHeight, g = r.clientHeight, R = r.scrollTop;
38
- E(v > g), L(R + g >= v);
40
+ function g() {
41
+ const u = r.scrollHeight, y = r.clientHeight, j = r.scrollTop;
42
+ T(u > y), L(j + y >= u);
39
43
  }
40
- function l() {
41
- p();
44
+ function a() {
45
+ g();
42
46
  }
43
- r.addEventListener("scroll", l), window.addEventListener("resize", l);
44
- const I = setTimeout(() => {
45
- p();
47
+ r.addEventListener("scroll", a), window.addEventListener("resize", a);
48
+ const R = setTimeout(() => {
49
+ g();
46
50
  }, 0);
47
51
  return () => {
48
- r.removeEventListener("scroll", l), window.removeEventListener("resize", l), clearTimeout(I);
52
+ r.removeEventListener("scroll", a), window.removeEventListener("resize", a), clearTimeout(R);
49
53
  };
50
- }, [a, n]);
51
- function D(r) {
54
+ }, [l, n]);
55
+ function I(r) {
52
56
  r.stopPropagation();
53
57
  }
54
- return a ? /* @__PURE__ */ e(M, { className: o["page-overlay__container"], children: b ? /* @__PURE__ */ e(q, { ariaValueText: S }) : /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(k, { autoFocus: !0, contain: !0, restoreFocus: !0, children: /* @__PURE__ */ i(
58
+ return l ? /* @__PURE__ */ e(V, { className: o["page-overlay__container"], children: /* @__PURE__ */ e(J, { ...D, children: x ? /* @__PURE__ */ e(G, { ariaValueText: k }) : /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(C, { autoFocus: !0, contain: !0, restoreFocus: !0, children: /* @__PURE__ */ _(
55
59
  "div",
56
60
  {
57
- ...F,
58
- ...z,
59
61
  ...B,
60
- className: o["page-overlay"],
61
- onKeyUp: D,
62
+ ...H,
63
+ ...z,
64
+ className: i(o["page-overlay"], {
65
+ [o[`page-overlay--${m}`]]: m
66
+ }),
67
+ onKeyUp: I,
62
68
  role: "presentation",
63
69
  ref: c,
64
70
  children: [
65
- (s || n) && /* @__PURE__ */ i(m, { children: [
66
- s && /* @__PURE__ */ e("h1", { ...H, className: o["page-overlay__title"], children: s }),
71
+ (s || n) && /* @__PURE__ */ _(d, { children: [
72
+ s && /* @__PURE__ */ e("h1", { ...F, className: o["page-overlay__title"], children: s }),
67
73
  n,
68
- /* @__PURE__ */ e("span", { className: o["page-overlay__close"], children: /* @__PURE__ */ e(V, { "aria-label": w, onClick: _ }) })
74
+ /* @__PURE__ */ e("span", { className: o["page-overlay__close"], children: /* @__PURE__ */ e(q, { "aria-label": w, onClick: p }) })
69
75
  ] }),
70
- /* @__PURE__ */ i(
76
+ /* @__PURE__ */ _(
71
77
  "form",
72
78
  {
73
- className: d(o["page-overlay__content"], {
79
+ className: i(o["page-overlay__content"], {
74
80
  [o["page-overlay--content-with-buttons"]]: t
75
81
  }),
76
82
  onSubmit: P,
77
- noValidate: N,
78
- ref: u,
83
+ noValidate: S,
84
+ ref: v,
79
85
  children: [
80
- /* @__PURE__ */ e("div", { className: o["page-overlay__children"], children: h }),
86
+ /* @__PURE__ */ e("div", { className: o["page-overlay__children"], children: b }),
81
87
  t && /* @__PURE__ */ e(
82
88
  "div",
83
89
  {
84
- className: d(o["page-overlay__buttons-bar"], {
85
- [o["page-overlay__buttons-bar--shadow"]]: T && !x
90
+ className: i(o["page-overlay__buttons-bar"], {
91
+ [o["page-overlay__buttons-bar--shadow"]]: N && !E
86
92
  }),
87
93
  children: t
88
94
  }
@@ -92,9 +98,9 @@ function $({
92
98
  )
93
99
  ]
94
100
  }
95
- ) }) }) }) : null;
101
+ ) }) }) }) }) : null;
96
102
  }
97
103
  export {
98
- $ as PageOverlay
104
+ le as PageOverlay
99
105
  };
100
106
  //# sourceMappingURL=PageOverlay.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageOverlay.js","sources":["../../../src/components/PageOverlay/PageOverlay.tsx"],"sourcesContent":["import { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { OverlayContainer, useModal, useOverlay, usePreventScroll } from '@react-aria/overlays';\nimport classNames from 'clsx';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { FormHTMLAttributes, KeyboardEvent, PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './PageOverlay.module.css';\n\nimport { OverlayCloseButton } from 'components/OverlayCloseButton';\nimport { Spinner } from 'components/Spinner';\n\nexport interface PageOverlayProps {\n /** The buttons of the dialog. */\n buttons?: ReactNode;\n /** `true` to show a spinner, if the contents of the dialog is lazy loaded; otherwise, `false`. */\n isLoading?: boolean;\n /** The `aria-valuetext` value of the [Spinner](/story/atoms-spinner--spinner-example) component. Used together with `isLoading`. */\n spinnerAriaValueText?: string;\n /** The `aria-label` value of the [OverlayCloseButton](/story/atoms-overlayclosebutton--overlay-close-button-example) component. */\n closeButtonAriaValueText?: string;\n /** `true` to render the dialog opened; otherwise, `false`. */\n isOpen: boolean;\n /** `true` to disable form validation; otherwise, `false`. */\n noValidate?: boolean;\n /** The callback function that is invoked when the dialog is closed. */\n onClose?(): void;\n /** The callback function that is invoked when the form is submitted. */\n onSubmit?: FormHTMLAttributes<HTMLFormElement>['onSubmit'];\n /** The title of the dialog. */\n title?: string;\n /** The contents of the dialog header. */\n headerContent?: ReactNode;\n}\n\n/** Represents a component for a modal dialog. */\nexport function PageOverlay({\n buttons,\n children,\n isLoading,\n spinnerAriaValueText = 'Loading',\n closeButtonAriaValueText = 'Close',\n isOpen,\n noValidate = false,\n onClose,\n onSubmit,\n title,\n headerContent,\n}: PropsWithChildren<PageOverlayProps>) {\n const ref = useRef<HTMLDivElement>(null);\n const formRef = useRef<HTMLFormElement>(null);\n const [isScrollable, setIsScrollable] = useState(false);\n const [isScrolledToBottom, setIsScrolledToBottom] = useState(false);\n\n const { dialogProps, titleProps } = useDialog({ role: 'dialog' }, ref);\n const { modalProps } = useModal({ isDisabled: !isOpen });\n const { overlayProps } = useOverlay({ isOpen, onClose }, ref);\n\n usePreventScroll({ isDisabled: !isOpen });\n\n useEffect(() => {\n const formElement = formRef.current;\n\n if (!formElement) return;\n\n function checkScrollable() {\n const scrollHeight = formElement!.scrollHeight;\n const clientHeight = formElement!.clientHeight;\n const scrollTop = formElement!.scrollTop;\n\n setIsScrollable(scrollHeight > clientHeight);\n setIsScrolledToBottom(scrollTop + clientHeight >= scrollHeight);\n }\n\n function handleScrollAndResize() {\n checkScrollable();\n }\n\n formElement.addEventListener('scroll', handleScrollAndResize);\n window.addEventListener('resize', handleScrollAndResize);\n\n const timeoutId = setTimeout(() => {\n checkScrollable();\n }, 0);\n\n return () => {\n formElement.removeEventListener('scroll', handleScrollAndResize);\n\n window.removeEventListener('resize', handleScrollAndResize);\n clearTimeout(timeoutId);\n };\n }, [isOpen, headerContent]);\n\n function onKeyUp(event: KeyboardEvent) {\n event.stopPropagation();\n }\n\n if (!isOpen) return null;\n\n return (\n <OverlayContainer className={styles['page-overlay__container']}>\n {isLoading ? (\n <Spinner ariaValueText={spinnerAriaValueText} />\n ) : (\n <>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <FocusScope autoFocus contain restoreFocus>\n <div\n {...dialogProps}\n {...modalProps}\n {...overlayProps}\n className={styles['page-overlay']}\n onKeyUp={onKeyUp}\n role=\"presentation\"\n ref={ref}\n >\n {(title || headerContent) && (\n <>\n {title && (\n <h1 {...titleProps} className={styles['page-overlay__title']}>\n {title}\n </h1>\n )}\n {headerContent}\n {\n <span className={styles['page-overlay__close']}>\n <OverlayCloseButton aria-label={closeButtonAriaValueText} onClick={onClose} />\n </span>\n }\n </>\n )}\n <form\n className={classNames(styles['page-overlay__content'], {\n [styles['page-overlay--content-with-buttons']]: buttons,\n })}\n onSubmit={onSubmit}\n noValidate={noValidate}\n ref={formRef}\n >\n <div className={styles['page-overlay__children']}>{children}</div>\n {buttons && (\n <div\n className={classNames(styles['page-overlay__buttons-bar'], {\n [styles['page-overlay__buttons-bar--shadow']]: isScrollable && !isScrolledToBottom,\n })}\n >\n {buttons}\n </div>\n )}\n </form>\n </div>\n </FocusScope>\n </>\n )}\n </OverlayContainer>\n );\n}\n"],"names":["PageOverlay","buttons","children","isLoading","spinnerAriaValueText","closeButtonAriaValueText","isOpen","noValidate","onClose","onSubmit","title","headerContent","ref","useRef","formRef","isScrollable","setIsScrollable","useState","isScrolledToBottom","setIsScrolledToBottom","dialogProps","titleProps","useDialog","modalProps","useModal","overlayProps","useOverlay","usePreventScroll","useEffect","formElement","checkScrollable","scrollHeight","clientHeight","scrollTop","handleScrollAndResize","timeoutId","onKeyUp","event","jsx","OverlayContainer","styles","Spinner","Fragment","FocusScope","jsxs","OverlayCloseButton","classNames"],"mappings":";;;;;;;;;;;;;;;;;;AAqCO,SAASA,EAAY;AAAA,EAC1B,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,0BAAAC,IAA2B;AAAA,EAC3B,QAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AACF,GAAwC;AAChC,QAAAC,IAAMC,EAAuB,IAAI,GACjCC,IAAUD,EAAwB,IAAI,GACtC,CAACE,GAAcC,CAAe,IAAIC,EAAS,EAAK,GAChD,CAACC,GAAoBC,CAAqB,IAAIF,EAAS,EAAK,GAE5D,EAAE,aAAAG,GAAa,YAAAC,MAAeC,EAAU,EAAE,MAAM,SAAS,GAAGV,CAAG,GAC/D,EAAE,YAAAW,MAAeC,EAAS,EAAE,YAAY,CAAClB,GAAQ,GACjD,EAAE,cAAAmB,MAAiBC,EAAW,EAAE,QAAApB,GAAQ,SAAAE,KAAWI,CAAG;AAE5D,EAAAe,EAAiB,EAAE,YAAY,CAACrB,GAAQ,GAExCsB,EAAU,MAAM;AACd,UAAMC,IAAcf,EAAQ;AAE5B,QAAI,CAACe,EAAa;AAElB,aAASC,IAAkB;AACzB,YAAMC,IAAeF,EAAa,cAC5BG,IAAeH,EAAa,cAC5BI,IAAYJ,EAAa;AAE/B,MAAAb,EAAgBe,IAAeC,CAAY,GACrBb,EAAAc,IAAYD,KAAgBD,CAAY;AAAA,IAAA;AAGhE,aAASG,IAAwB;AACf,MAAAJ,EAAA;AAAA,IAAA;AAGN,IAAAD,EAAA,iBAAiB,UAAUK,CAAqB,GACrD,OAAA,iBAAiB,UAAUA,CAA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A,YACD,UAAAQ;AAAA,YACA,YAAAF;AAAA,YACA,KAAKO;AAAA,YAEL,UAAA;AAAA,cAAA,gBAAAwB,EAAC,OAAI,EAAA,WAAWE,EAAO,wBAAwB,GAAI,UAAAtC,GAAS;AAAA,cAC3DD,KACC,gBAAAqC;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWQ,EAAWN,EAAO,2BAA2B,GAAG;AAAA,oBACzD,CAACA,EAAO,mCAAmC,CAAC,GAAGzB,KAAgB,CAACG;AAAA,kBAAA,CACjE;AAAA,kBAEA,UAAAjB;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA,EAEJ,CAAA,EACF,CAAA,GAEJ,IAzDkB;AA2DtB;"}
1
+ {"version":3,"file":"PageOverlay.js","sources":["../../../src/components/PageOverlay/PageOverlay.tsx"],"sourcesContent":["import { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { OverlayContainer, useModal, useOverlay, usePreventScroll } from '@react-aria/overlays';\nimport classNames, { clsx } from 'clsx';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { FormHTMLAttributes, KeyboardEvent, PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './PageOverlay.module.css';\n\nimport { OverlayCloseButton } from 'components/OverlayCloseButton';\nimport { Spinner } from 'components/Spinner';\nimport { Backdrop } from 'components/Backdrop';\n\nexport interface PageOverlayProps {\n /** The buttons of the dialog. */\n buttons?: ReactNode;\n /** `true` to show a spinner, if the contents of the dialog is lazy loaded; otherwise, `false`. */\n isLoading?: boolean;\n /** The `aria-valuetext` value of the [Spinner](/story/atoms-spinner--spinner-example) component. Used together with `isLoading`. */\n spinnerAriaValueText?: string;\n /** The `aria-label` value of the [OverlayCloseButton](/story/atoms-overlayclosebutton--overlay-close-button-example) component. */\n closeButtonAriaValueText?: string;\n /** `true` to render the dialog opened; otherwise, `false`. */\n isOpen: boolean;\n /** `true` to disable form validation; otherwise, `false`. */\n noValidate?: boolean;\n /** The callback function that is invoked when the dialog is closed. */\n onClose?(): void;\n /** The callback function that is invoked when the form is submitted. */\n onSubmit?: FormHTMLAttributes<HTMLFormElement>['onSubmit'];\n /** The title of the dialog. */\n title?: string;\n /** The contents of the dialog header. */\n headerContent?: ReactNode;\n /** The variant styling of the dialog. */\n variant?: 'full-screen' | 'with-gutters';\n}\n\n/** Represents a component for a modal dialog. */\nexport function PageOverlay({\n buttons,\n children,\n isLoading,\n spinnerAriaValueText = 'Loading',\n closeButtonAriaValueText = 'Close',\n isOpen,\n noValidate = false,\n onClose,\n onSubmit,\n title,\n headerContent,\n variant = 'full-screen',\n}: PropsWithChildren<PageOverlayProps>) {\n const ref = useRef<HTMLDivElement>(null);\n const formRef = useRef<HTMLFormElement>(null);\n const [isScrollable, setIsScrollable] = useState(false);\n const [isScrolledToBottom, setIsScrolledToBottom] = useState(false);\n\n const { dialogProps, titleProps } = useDialog({ role: 'dialog' }, ref);\n const { modalProps } = useModal({ isDisabled: !isOpen });\n const { overlayProps, underlayProps } = useOverlay({ isOpen, onClose }, ref);\n\n usePreventScroll({ isDisabled: !isOpen });\n\n useEffect(() => {\n const formElement = formRef.current;\n\n if (!formElement) return;\n\n function checkScrollable() {\n const scrollHeight = formElement!.scrollHeight;\n const clientHeight = formElement!.clientHeight;\n const scrollTop = formElement!.scrollTop;\n\n setIsScrollable(scrollHeight > clientHeight);\n setIsScrolledToBottom(scrollTop + clientHeight >= scrollHeight);\n }\n\n function handleScrollAndResize() {\n checkScrollable();\n }\n\n formElement.addEventListener('scroll', handleScrollAndResize);\n window.addEventListener('resize', handleScrollAndResize);\n\n const timeoutId = setTimeout(() => {\n checkScrollable();\n }, 0);\n\n return () => {\n formElement.removeEventListener('scroll', handleScrollAndResize);\n\n window.removeEventListener('resize', handleScrollAndResize);\n clearTimeout(timeoutId);\n };\n }, [isOpen, headerContent]);\n\n function onKeyUp(event: KeyboardEvent) {\n event.stopPropagation();\n }\n\n if (!isOpen) return null;\n\n return (\n <OverlayContainer className={styles['page-overlay__container']}>\n <Backdrop {...underlayProps}>\n {isLoading ? (\n <Spinner ariaValueText={spinnerAriaValueText} />\n ) : (\n <>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <FocusScope autoFocus contain restoreFocus>\n <div\n {...dialogProps}\n {...modalProps}\n {...overlayProps}\n className={clsx(styles['page-overlay'], {\n [styles[`page-overlay--${variant}`]]: variant,\n })}\n onKeyUp={onKeyUp}\n role=\"presentation\"\n ref={ref}\n >\n {(title || headerContent) && (\n <>\n {title && (\n <h1 {...titleProps} className={styles['page-overlay__title']}>\n {title}\n </h1>\n )}\n {headerContent}\n {\n <span className={styles['page-overlay__close']}>\n <OverlayCloseButton aria-label={closeButtonAriaValueText} onClick={onClose} />\n </span>\n }\n </>\n )}\n <form\n className={classNames(styles['page-overlay__content'], {\n [styles['page-overlay--content-with-buttons']]: buttons,\n })}\n onSubmit={onSubmit}\n noValidate={noValidate}\n ref={formRef}\n >\n <div className={styles['page-overlay__children']}>{children}</div>\n {buttons && (\n <div\n className={classNames(styles['page-overlay__buttons-bar'], {\n [styles['page-overlay__buttons-bar--shadow']]: isScrollable && !isScrolledToBottom,\n })}\n >\n {buttons}\n </div>\n )}\n </form>\n </div>\n </FocusScope>\n </>\n )}\n </Backdrop>\n </OverlayContainer>\n );\n}\n"],"names":["PageOverlay","buttons","children","isLoading","spinnerAriaValueText","closeButtonAriaValueText","isOpen","noValidate","onClose","onSubmit","title","headerContent","variant","ref","useRef","formRef","isScrollable","setIsScrollable","useState","isScrolledToBottom","setIsScrolledToBottom","dialogProps","titleProps","useDialog","modalProps","useModal","overlayProps","underlayProps","useOverlay","usePreventScroll","useEffect","formElement","checkScrollable","scrollHeight","clientHeight","scrollTop","handleScrollAndResize","timeoutId","onKeyUp","event","jsx","OverlayContainer","styles","Backdrop","Spinner","Fragment","FocusScope","jsxs","clsx","OverlayCloseButton","classNames"],"mappings":";;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ACA,EAAO,oCAAoC,CAAC,GAAGzC;AAAA,YAAA,CACjD;AAAA,YACD,UAAAQ;AAAA,YACA,YAAAF;AAAA,YACA,KAAKQ;AAAA,YAEL,UAAA;AAAA,cAAA,gBAAAyB,EAAC,OAAI,EAAA,WAAWE,EAAO,wBAAwB,GAAI,UAAAxC,GAAS;AAAA,cAC3DD,KACC,gBAAAuC;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWU,EAAWR,EAAO,2BAA2B,GAAG;AAAA,oBACzD,CAACA,EAAO,mCAAmC,CAAC,GAAG1B,KAAgB,CAACG;AAAA,kBAAA,CACjE;AAAA,kBAEA,UAAAlB;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA,GAEJ,EACF,CAAA,EAEJ,CAAA,GACF,IA7DkB;AA+DtB;"}
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.13.0",
5
+ "version": "3.14.1",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -64,7 +64,7 @@
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.14.1",
67
+ "@types/node": "^22.15.3",
68
68
  "@types/react-dom": "^19.1.2",
69
69
  "@types/react": "^19.1.2",
70
70
  "@uva-glass/eslint-config": "^1.3.10",
@@ -84,11 +84,11 @@
84
84
  "npm-run-all2": "^7.0.2",
85
85
  "react": "^19.1.0",
86
86
  "react-dom": "^19.1.0",
87
- "react-router": "^7.5.1",
87
+ "react-router": "^7.5.3",
88
88
  "semantic-release": "^24.2.3",
89
89
  "storybook": "^8.6.12",
90
- "style-dictionary": "^4.3.3",
91
- "stylelint": "^16.19.0",
90
+ "style-dictionary": "^4.4.0",
91
+ "stylelint": "^16.19.1",
92
92
  "stylelint-config-recommended": "^16.0.0",
93
93
  "stylelint-config-standard": "^38.0.0",
94
94
  "stylelint-order": "^7.0.0",
@@ -112,9 +112,9 @@
112
112
  "lexical": "^0.30.0"
113
113
  },
114
114
  "optionalDependencies": {
115
- "@rollup/rollup-linux-x64-gnu": "^4.40.0",
116
- "@rspack/binding-darwin-arm64": "1.3.6",
117
- "@rspack/binding-linux-x64-gnu": "1.3.6",
115
+ "@rollup/rollup-linux-x64-gnu": "^4.40.1",
116
+ "@rspack/binding-darwin-arm64": "1.3.8",
117
+ "@rspack/binding-linux-x64-gnu": "1.3.8",
118
118
  "@ast-grep/napi-linux-x64-gnu": "0.37.0"
119
119
  }
120
120
  }