@uva-glass/component-library 3.20.0 → 3.21.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.
- package/dist/assets/ControlsButton.css +1 -0
- package/dist/assets/PageOverlay.css +1 -1
- package/dist/assets/RadioTabSelector.css +1 -0
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +34 -31
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.d.ts +18 -0
- package/dist/components/ControlsButton/ControlsButton.js +46 -0
- package/dist/components/ControlsButton/ControlsButton.js.map +1 -0
- package/dist/components/ControlsButton/ControlsButton.stories.d.ts +5 -0
- package/dist/components/ControlsButton/ControlsButton.stories.js +45 -0
- package/dist/components/ControlsButton/ControlsButton.stories.js.map +1 -0
- package/dist/components/ControlsButton/index.d.ts +1 -0
- package/dist/components/ControlsButton/index.js +5 -0
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PageOverlay/PageOverlay.d.ts +3 -1
- package/dist/components/PageOverlay/PageOverlay.js +60 -53
- package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.d.ts +25 -0
- package/dist/components/RadioTabSelector/RadioTabSelector.js +89 -0
- package/dist/components/RadioTabSelector/RadioTabSelector.js.map +1 -0
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.d.ts +5 -0
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +60 -0
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js.map +1 -0
- package/dist/components/RadioTabSelector/index.d.ts +1 -0
- package/dist/components/RadioTabSelector/index.js +5 -0
- package/dist/components/RadioTabSelector/index.js.map +1 -0
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +46 -44
- package/dist/components/index.js.map +1 -1
- package/dist/{index-BCvy9BiK.js → index-Dwqes6RH.js} +5 -2
- package/dist/{index-BCvy9BiK.js.map → index-Dwqes6RH.js.map} +1 -1
- package/dist/index.js +46 -44
- package/dist/index.js.map +1 -1
- package/dist/storybook__react.d.js +1 -1
- package/package.json +22 -22
- package/dist/assets/CheckboxButton.css +0 -1
- package/dist/components/CheckboxButton/CheckboxButton.d.ts +0 -12
- package/dist/components/CheckboxButton/CheckboxButton.js +0 -28
- package/dist/components/CheckboxButton/CheckboxButton.js.map +0 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.d.ts +0 -5
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +0 -40
- package/dist/components/CheckboxButton/CheckboxButton.stories.js.map +0 -1
- package/dist/components/CheckboxButton/CheckboxButton.test.d.ts +0 -0
- package/dist/components/CheckboxButton/CheckboxButton.test.js +0 -21
- package/dist/components/CheckboxButton/CheckboxButton.test.js.map +0 -1
- package/dist/components/CheckboxButton/index.d.ts +0 -1
- package/dist/components/CheckboxButton/index.js +0 -5
- /package/dist/components/{CheckboxButton → ControlsButton}/index.js.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._controls-button_105b3_1{align-items:center;background-color:var(--new-color-uva-white);border-radius:.25rem;cursor:pointer;display:inline-flex;font-size:var(--font-size-default);height:2.25rem;justify-content:center;min-width:2.25rem;padding:.5rem;position:relative;-webkit-user-select:none;user-select:none;white-space:nowrap}._controls-button--squared_105b3_17{width:2.25rem}._controls-input_105b3_21{aspect-ratio:unset;cursor:pointer;height:0;opacity:0;position:absolute;width:0}._controls-button_105b3_1:after{content:"";min-height:2.625rem;min-width:2.625rem;position:absolute;width:100%}._controls-input_105b3_21:focus-visible+label{outline:.125rem dotted var(--new-color-navy-600);outline-offset:.125rem}._controls-input_105b3_21:checked+label{background-color:var(--new-color-grey-200);border:1px solid var(--new-color-grey-700);font-weight:var(--semibold)}._controls-input_105b3_21:disabled+label,._controls-input_105b3_21:disabled:hover+label{background-color:var(--new-color-grey-400);color:var(--new-color-grey-700);cursor:not-allowed}._controls-input_105b3_21:hover+label{background-color:var(--new-color-grey-300)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._page-
|
|
1
|
+
._page-overlay__container_1wy1h_1{bottom:0;left:0;position:fixed;right:0;top:0;z-index:50}._page-overlay_1wy1h_1{background:var(--new-color-uva-white);display:flex;flex-direction:column;height:100dvh}._page-overlay--full-screen_1wy1h_18{width:100vw}._page-overlay--with-gutters_1wy1h_22{max-width:87.5rem;width:100%}._page-overlay__content_1wy1h_27{display:flex;flex-direction:column;height:100svh;justify-content:space-between;overflow:hidden;overflow-y:auto;padding:0 1.5rem;width:100%}._page-overlay__content--grey_1wy1h_38{background-color:var(--new-color-grey-300)}._page-overlay__content--white_1wy1h_42{background-color:var(--new-color-uva-white)}._page-overlay__children_1wy1h_46{padding-bottom:1rem}._page-overlay__title-wrapper_1wy1h_50{position:relative}._page-overlay__title_1wy1h_50{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_1wy1h_61{background-color:var(--new-color-uva-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_1wy1h_61: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_1wy1h_87:before{opacity:1}._page-overlay__close_1wy1h_92{height:1.5rem;position:absolute;right:1rem;top:calc(50% - .125rem);transform:translateY(-50%)}@media (min-width: 28rem) and (min-height: 28rem){._page-overlay--with-gutters_1wy1h_22{margin:0 .75rem}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._radio-tab-selector-button-bar__container_a4wnc_1{display:flex;flex-wrap:wrap}._radio-tab-selector-button-bar__container--label-left_a4wnc_6{align-items:baseline;flex-direction:row;gap:1rem}._radio-tab-selector-button-bar__container--label-top_a4wnc_12{align-items:flex-start;flex-direction:column;gap:.5rem}._radio-tab-selector-button-bar__row-container_a4wnc_18{display:flex;flex-direction:column;gap:.5rem}._radio-tab-selector-button-bar__row_a4wnc_18{align-items:center;background-color:var(--new-color-uva-white);border:1px solid var(--new-color-grey-700);border-radius:.5rem;display:flex;flex-wrap:nowrap;gap:.25rem;padding:.25rem}._radio-tab-selector-button-bar__row--not-validated_a4wnc_35{border-color:var(--new-color-red-600)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import { fn as l } from "../../index-
|
|
2
|
+
import { fn as l } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { Button as n } from "./Button.js";
|
|
4
4
|
const c = "<Button variant={variant} onClick={onClictFunction}>{children}</Button>", h = {
|
|
5
5
|
title: "Atoms/Buttons/Button",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a, Fragment as l } from "react/jsx-runtime";
|
|
2
|
-
import { fn as s } from "../../index-
|
|
2
|
+
import { fn as s } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { BrowserRouter as c } from "react-router";
|
|
4
4
|
import { LinkButton as n } from "./LinkButton.js";
|
|
5
5
|
const d = `
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as s, Fragment as l } from "react/jsx-runtime";
|
|
2
|
-
import { fn as c } from "../../index-
|
|
2
|
+
import { fn as c } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { MenuButton as t } from "./MenuButton.js";
|
|
4
4
|
const d = `
|
|
5
5
|
// Has all LabelHTMLAttributes props available except "className" and "style"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as g, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { fn as e } from "../../index-
|
|
2
|
+
import { fn as e } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { Checkbox as n } from "./Checkbox.js";
|
|
4
4
|
import { FormField as t } from "../FormField/FormField.js";
|
|
5
5
|
import { Label as i } from "../Label/Label.js";
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
import { CheckboxButton as w } from "../CheckboxButton/CheckboxButton.js";
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w } from "react";
|
|
3
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
5
4
|
import { Label as z } from "../Label/Label.js";
|
|
6
5
|
import { FeedbackBox as v } from "../FeedbackBox/FeedbackBox.js";
|
|
7
|
-
import
|
|
6
|
+
import { ControlsButton as B } from "../ControlsButton/ControlsButton.js";
|
|
7
|
+
import '../../assets/CheckboxButtonBar.css';const t = {
|
|
8
8
|
"checkbox-button-bar__container": "_checkbox-button-bar__container_e14sz_1",
|
|
9
9
|
"checkbox-button-bar__container--label-left": "_checkbox-button-bar__container--label-left_e14sz_6",
|
|
10
10
|
"checkbox-button-bar__container--label-top": "_checkbox-button-bar__container--label-top_e14sz_12",
|
|
11
11
|
"checkbox-button-bar__row-container": "_checkbox-button-bar__row-container_e14sz_18",
|
|
12
12
|
"checkbox-button-bar__row": "_checkbox-button-bar__row_e14sz_18",
|
|
13
13
|
"checkbox-button-bar__row--not-validated": "_checkbox-button-bar__row--not-validated_e14sz_35"
|
|
14
|
-
},
|
|
15
|
-
checkboxes:
|
|
16
|
-
defaultValues:
|
|
14
|
+
}, F = ({
|
|
15
|
+
checkboxes: i,
|
|
16
|
+
defaultValues: n,
|
|
17
17
|
label: a,
|
|
18
18
|
labelPosition: h = "top",
|
|
19
|
-
required:
|
|
20
|
-
notValidated:
|
|
21
|
-
notValidatedText:
|
|
22
|
-
disableGroup:
|
|
19
|
+
required: u = !1,
|
|
20
|
+
notValidated: k = !1,
|
|
21
|
+
notValidatedText: c = "",
|
|
22
|
+
disableGroup: x = !1,
|
|
23
23
|
onSetValues: m
|
|
24
24
|
}) => {
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const [_, d] = w(n ? n.map(String) : []), f = (e) => {
|
|
26
|
+
let o = _;
|
|
27
|
+
o.includes(e) ? o = o.filter((b) => b !== e) : o = [...o, e], d(o), m(o);
|
|
27
28
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ l(
|
|
29
30
|
"div",
|
|
30
31
|
{
|
|
31
|
-
className:
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
className: s(
|
|
33
|
+
t["checkbox-button-bar__container"],
|
|
34
|
+
t[`checkbox-button-bar__container--label-${h}`]
|
|
34
35
|
),
|
|
35
36
|
children: [
|
|
36
|
-
a && /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
37
|
+
a && /* @__PURE__ */ r(z, { htmlFor: "", required: u, children: a }),
|
|
38
|
+
/* @__PURE__ */ l("div", { className: t["checkbox-button-bar__row-container"], children: [
|
|
39
|
+
/* @__PURE__ */ r(
|
|
39
40
|
"div",
|
|
40
41
|
{
|
|
41
|
-
className:
|
|
42
|
-
[
|
|
42
|
+
className: s(t["checkbox-button-bar__row"], {
|
|
43
|
+
[t["checkbox-button-bar__row--not-validated"]]: k || c
|
|
43
44
|
}),
|
|
44
|
-
children:
|
|
45
|
-
|
|
45
|
+
children: i.map(({ label: e, value: o, disabled: b }) => /* @__PURE__ */ r(
|
|
46
|
+
B,
|
|
46
47
|
{
|
|
47
|
-
|
|
48
|
+
type: "checkbox",
|
|
49
|
+
label: e,
|
|
50
|
+
forceSquared: !0,
|
|
48
51
|
value: o,
|
|
49
|
-
|
|
50
|
-
disabled:
|
|
51
|
-
onSetValue: (
|
|
52
|
+
checked: _.includes(o),
|
|
53
|
+
disabled: b || x,
|
|
54
|
+
onSetValue: (p) => f(p.target.value)
|
|
52
55
|
},
|
|
53
56
|
`${o}`
|
|
54
57
|
))
|
|
55
58
|
}
|
|
56
59
|
),
|
|
57
|
-
|
|
60
|
+
c !== "" && /* @__PURE__ */ r(v, { level: "error", feedback: c })
|
|
58
61
|
] })
|
|
59
62
|
]
|
|
60
63
|
}
|
|
61
64
|
);
|
|
62
65
|
};
|
|
63
66
|
export {
|
|
64
|
-
|
|
67
|
+
F as CheckboxButtonBar
|
|
65
68
|
};
|
|
66
69
|
//# sourceMappingURL=CheckboxButtonBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxButtonBar.js","sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"CheckboxButtonBar.js","sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.tsx"],"sourcesContent":["import { useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './CheckboxButtonBar.module.css';\n\nimport { Label } from 'components/Label';\nimport { FeedbackBox } from 'components/FeedbackBox';\nimport { ControlsButton } from 'components/ControlsButton';\n\ntype CheckboxProps = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport interface CheckboxButtonBarProps {\n /** array with objects with label, value */\n checkboxes: CheckboxProps[];\n //** array with values */\n defaultValues?: string[];\n label?: string;\n /** 'top' | 'left' */\n labelPosition?: 'top' | 'left';\n /** `true` to show an asterisk to indicate an item is required; otherwise, `false`. */\n required?: boolean;\n /** `true` to color border red to show missing in validation; otherwise, `false`. */\n notValidated?: boolean;\n /** error text to display under the bar */\n notValidatedText?: string;\n /** disables all checkboxes in the bar */\n disableGroup?: boolean;\n onSetValues: (value: string[]) => void;\n}\n\n/** Represents a component that shows a collection of [CheckboxButton](/story/atoms-checkboxbutton--checkbox-button-example)s. */\nexport const CheckboxButtonBar = ({\n checkboxes,\n defaultValues,\n label,\n labelPosition = 'top',\n required = false,\n notValidated = false,\n notValidatedText = '',\n disableGroup = false,\n onSetValues,\n}: CheckboxButtonBarProps) => {\n const [currentValues, setCurrentValues] = useState<string[]>(defaultValues ? defaultValues.map(String) : []);\n\n const handleChange = (value: string) => {\n let values = currentValues;\n\n if (values.includes(value)) {\n values = values.filter((val) => val !== value);\n } else {\n values = [...values, value];\n }\n setCurrentValues(values);\n onSetValues(values);\n };\n\n return (\n <div\n className={clsx(\n styles['checkbox-button-bar__container'],\n styles[`checkbox-button-bar__container--label-${labelPosition}`]\n )}\n >\n {label && (\n <Label htmlFor=\"\" required={required}>\n {label}\n </Label>\n )}\n <div className={styles['checkbox-button-bar__row-container']}>\n <div\n className={clsx(styles['checkbox-button-bar__row'], {\n [styles['checkbox-button-bar__row--not-validated']]: notValidated || notValidatedText,\n })}\n >\n {checkboxes.map(({ label, value, disabled }) => (\n <ControlsButton\n type=\"checkbox\"\n key={`${value}`}\n label={label}\n forceSquared={true}\n value={value}\n checked={currentValues.includes(value)}\n disabled={disabled || disableGroup}\n onSetValue={(event) => handleChange(event.target.value)}\n />\n ))}\n </div>\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </div>\n );\n};\n"],"names":["CheckboxButtonBar","checkboxes","defaultValues","label","labelPosition","required","notValidated","notValidatedText","disableGroup","onSetValues","currentValues","setCurrentValues","useState","handleChange","value","values","val","jsxs","clsx","styles","jsx","Label","disabled","ControlsButton","event","FeedbackBox"],"mappings":";;;;;;;;;;;;;GAmCaA,IAAoB,CAAC;AAAA,EAChC,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC,IAAW;AAAA,EACX,cAAAC,IAAe;AAAA,EACf,kBAAAC,IAAmB;AAAA,EACnB,cAAAC,IAAe;AAAA,EACf,aAAAC;AACF,MAA8B;AACtB,QAAA,CAACC,GAAeC,CAAgB,IAAIC,EAAmBV,IAAgBA,EAAc,IAAI,MAAM,IAAI,EAAE,GAErGW,IAAe,CAACC,MAAkB;AACtC,QAAIC,IAASL;AAET,IAAAK,EAAO,SAASD,CAAK,IACvBC,IAASA,EAAO,OAAO,CAACC,MAAQA,MAAQF,CAAK,IAEpCC,IAAA,CAAC,GAAGA,GAAQD,CAAK,GAE5BH,EAAiBI,CAAM,GACvBN,EAAYM,CAAM;AAAA,EACpB;AAGE,SAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO,gCAAgC;AAAA,QACvCA,EAAO,yCAAyCf,CAAa,EAAE;AAAA,MACjE;AAAA,MAEC,UAAA;AAAA,QAAAD,KACE,gBAAAiB,EAAAC,GAAA,EAAM,SAAQ,IAAG,UAAAhB,GACf,UACHF,GAAA;AAAA,QAED,gBAAAc,EAAA,OAAA,EAAI,WAAWE,EAAO,oCAAoC,GACzD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAKC,EAAO,0BAA0B,GAAG;AAAA,gBAClD,CAACA,EAAO,yCAAyC,CAAC,GAAGb,KAAgBC;AAAA,cAAA,CACtE;AAAA,cAEA,UAAAN,EAAW,IAAI,CAAC,EAAE,OAAAE,GAAO,OAAAW,GAAO,UAAAQ,QAC/B,gBAAAF;AAAA,gBAACG;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBAEL,OAAOpB;AAAAA,kBACP,cAAc;AAAA,kBACd,OAAAW;AAAA,kBACA,SAASJ,EAAc,SAASI,CAAK;AAAA,kBACrC,UAAUQ,KAAYd;AAAA,kBACtB,YAAY,CAACgB,MAAUX,EAAaW,EAAM,OAAO,KAAK;AAAA,gBAAA;AAAA,gBANjD,GAAGV,CAAK;AAAA,cAQhB,CAAA;AAAA,YAAA;AAAA,UACH;AAAA,UACCP,MAAqB,MAAM,gBAAAa,EAACK,KAAY,OAAM,SAAQ,UAAUlB,EAAkB,CAAA;AAAA,QAAA,EACrF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { fn as t } from "../../index-
|
|
2
|
+
import { fn as t } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { CheckboxButtonBar as e } from "./CheckboxButtonBar.js";
|
|
4
4
|
const a = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosition={} required={} notValidatedText={} disableGroup={} onSetValues={} />", i = {
|
|
5
5
|
title: "Molecules/CheckboxButtonBar",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _, jsxs as A } from "react/jsx-runtime";
|
|
2
|
-
import { fn as w } from "../../index-
|
|
2
|
+
import { fn as w } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { s as g, j as V, V as j } from "../../index-DH9Vbk37.js";
|
|
4
4
|
import { useState as D } from "react";
|
|
5
5
|
import { CheckboxTree as O } from "./CheckboxTree.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { fn as t } from "../../index-
|
|
2
|
+
import { fn as t } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { Chip as e } from "./Chip.js";
|
|
4
4
|
const s = "<Chip label={string} onDelete={onDeleteFunction(label)}/>", b = {
|
|
5
5
|
title: "Atoms/Chip",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
export interface ControlsButtonProps {
|
|
3
|
+
/** to set type/behaviour of input radio or checkbox */
|
|
4
|
+
type?: 'radio' | 'checkbox';
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
/** set if used as radiogroup */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** `true` to set squared button; otherwise, `false`. The default is `false`. */
|
|
10
|
+
forceSquared?: boolean;
|
|
11
|
+
/** to set default status */
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/** `true` to disable the button; otherwise, `false`. The default is `false`. */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** The callback function that is invoked when the radio button changes value. */
|
|
16
|
+
onSetValue: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const ControlsButton: ({ type, label, value, name, forceSquared, checked, disabled, onSetValue, }: ControlsButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as b } from "react";
|
|
3
|
+
import { c as d } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import '../../assets/ControlsButton.css';const t = {
|
|
5
|
+
"controls-button": "_controls-button_105b3_1",
|
|
6
|
+
"controls-button--squared": "_controls-button--squared_105b3_17",
|
|
7
|
+
"controls-input": "_controls-input_105b3_21"
|
|
8
|
+
}, g = ({
|
|
9
|
+
type: c = "checkbox",
|
|
10
|
+
label: o,
|
|
11
|
+
value: e,
|
|
12
|
+
name: s,
|
|
13
|
+
forceSquared: l = !1,
|
|
14
|
+
checked: u,
|
|
15
|
+
disabled: i,
|
|
16
|
+
onSetValue: a
|
|
17
|
+
}) => {
|
|
18
|
+
const n = b();
|
|
19
|
+
return /* @__PURE__ */ m(p, { children: [
|
|
20
|
+
/* @__PURE__ */ r(
|
|
21
|
+
"input",
|
|
22
|
+
{
|
|
23
|
+
type: c,
|
|
24
|
+
id: `${n}${o.replace(/\s+/g, "_")}`,
|
|
25
|
+
name: s || o.replace(/\s+/g, "_"),
|
|
26
|
+
disabled: i,
|
|
27
|
+
value: e,
|
|
28
|
+
checked: u,
|
|
29
|
+
onChange: (_) => a(_),
|
|
30
|
+
className: t["controls-input"]
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
|
+
"label",
|
|
35
|
+
{
|
|
36
|
+
htmlFor: `${n}${o}`,
|
|
37
|
+
className: d(t["controls-button"], [l && t["controls-button--squared"]]),
|
|
38
|
+
children: o
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] });
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
g as ControlsButton
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=ControlsButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlsButton.js","sources":["../../../src/components/ControlsButton/ControlsButton.tsx"],"sourcesContent":["import { useId } from 'react';\r\nimport clsx from 'clsx';\r\n\r\nimport type { ChangeEvent } from 'react';\r\n\r\nimport styles from './ControlsButton.module.css';\r\n\r\nexport interface ControlsButtonProps {\r\n /** to set type/behaviour of input radio or checkbox */\r\n type?: 'radio' | 'checkbox';\r\n label: string;\r\n value: string;\r\n /** set if used as radiogroup */\r\n name?: string;\r\n /** `true` to set squared button; otherwise, `false`. The default is `false`. */\r\n forceSquared?: boolean;\r\n /** to set default status */\r\n checked?: boolean;\r\n /** `true` to disable the button; otherwise, `false`. The default is `false`. */\r\n disabled?: boolean;\r\n /** The callback function that is invoked when the radio button changes value. */\r\n onSetValue: (event: ChangeEvent<HTMLInputElement>) => void;\r\n}\r\n\r\nexport const ControlsButton = ({\r\n type = 'checkbox',\r\n label,\r\n value,\r\n name,\r\n forceSquared = false,\r\n checked,\r\n disabled,\r\n onSetValue,\r\n}: ControlsButtonProps) => {\r\n const idPrefix = useId();\r\n\r\n return (\r\n <>\r\n <input\r\n type={type}\r\n id={`${idPrefix}${label.replace(/\\s+/g, '_')}`}\r\n name={name ? name : label.replace(/\\s+/g, '_')}\r\n disabled={disabled}\r\n value={value}\r\n checked={checked}\r\n onChange={(event) => onSetValue(event)}\r\n className={styles['controls-input']}\r\n />\r\n <label\r\n htmlFor={`${idPrefix}${label}`}\r\n className={clsx(styles['controls-button'], [forceSquared && styles['controls-button--squared']])}\r\n >\r\n {label}\r\n </label>\r\n </>\r\n );\r\n};\r\n"],"names":["ControlsButton","type","label","value","name","forceSquared","checked","disabled","onSetValue","idPrefix","useId","jsxs","Fragment","jsx","event","styles","clsx"],"mappings":";;;;;;;GAwBaA,IAAiB,CAAC;AAAA,EAC7B,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,MAA2B;AACzB,QAAMC,IAAWC,EAAM;AAEvB,SAEI,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAAZ;AAAA,QACA,IAAI,GAAGQ,CAAQ,GAAGP,EAAM,QAAQ,QAAQ,GAAG,CAAC;AAAA,QAC5C,MAAME,KAAcF,EAAM,QAAQ,QAAQ,GAAG;AAAA,QAC7C,UAAAK;AAAA,QACA,OAAAJ;AAAA,QACA,SAAAG;AAAA,QACA,UAAU,CAACQ,MAAUN,EAAWM,CAAK;AAAA,QACrC,WAAWC,EAAO,gBAAgB;AAAA,MAAA;AAAA,IACpC;AAAA,IACA,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAAS,GAAGJ,CAAQ,GAAGP,CAAK;AAAA,QAC5B,WAAWc,EAAKD,EAAO,iBAAiB,GAAG,CAACV,KAAgBU,EAAO,0BAA0B,CAAC,CAAC;AAAA,QAE9F,UAAAb;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ControlsButtonProps } from './ControlsButton';
|
|
3
|
+
declare const _default: Meta<ControlsButtonProps>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const ControlsButtonExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ControlsButtonProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { fn as n } from "../../index-Dwqes6RH.js";
|
|
3
|
+
import { ControlsButton as o } from "./ControlsButton.js";
|
|
4
|
+
const r = "<ControlsButton type={radio or checkbox} label={} value={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />", u = {
|
|
5
|
+
title: "Atoms/ControlsButton",
|
|
6
|
+
component: o,
|
|
7
|
+
argTypes: {
|
|
8
|
+
label: {
|
|
9
|
+
control: "text"
|
|
10
|
+
},
|
|
11
|
+
value: {
|
|
12
|
+
control: "string"
|
|
13
|
+
},
|
|
14
|
+
forceSquared: {
|
|
15
|
+
control: "boolean"
|
|
16
|
+
},
|
|
17
|
+
isChecked: {
|
|
18
|
+
control: "boolean"
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
control: "boolean"
|
|
22
|
+
},
|
|
23
|
+
onSetValue: {
|
|
24
|
+
table: {
|
|
25
|
+
disable: !0
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
parameters: {
|
|
30
|
+
inspectComponent: o,
|
|
31
|
+
codeString: r
|
|
32
|
+
}
|
|
33
|
+
}, l = (t) => /* @__PURE__ */ e(o, { ...t }), a = l.bind({});
|
|
34
|
+
a.args = {
|
|
35
|
+
type: "checkbox",
|
|
36
|
+
label: "1.2",
|
|
37
|
+
value: "1.2",
|
|
38
|
+
forceSquared: !0,
|
|
39
|
+
onSetValue: n()
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
a as ControlsButtonExample,
|
|
43
|
+
u as default
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=ControlsButton.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlsButton.stories.js","sources":["../../../src/components/ControlsButton/ControlsButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\r\n\r\nimport type { Meta, StoryFn } from '@storybook/react';\r\nimport type { ControlsButtonProps } from './ControlsButton';\r\n\r\nimport { ControlsButton } from './ControlsButton';\r\n\r\nconst codeString =\r\n '<ControlsButton type={radio or checkbox} label={} value={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />';\r\n\r\n// eslint-disable-next-line import/no-default-export\r\nexport default {\r\n title: 'Atoms/ControlsButton',\r\n component: ControlsButton,\r\n argTypes: {\r\n label: {\r\n control: 'text',\r\n },\r\n value: {\r\n control: 'string',\r\n },\r\n forceSquared: {\r\n control: 'boolean',\r\n },\r\n isChecked: {\r\n control: 'boolean',\r\n },\r\n disabled: {\r\n control: 'boolean',\r\n },\r\n onSetValue: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n },\r\n parameters: {\r\n inspectComponent: ControlsButton,\r\n codeString: codeString,\r\n },\r\n} as Meta<ControlsButtonProps>;\r\n\r\nconst Template: StoryFn<ControlsButtonProps> = (args) => <ControlsButton {...args} />;\r\n\r\nexport const ControlsButtonExample = Template.bind({});\r\nControlsButtonExample.args = {\r\n type: 'checkbox',\r\n label: '1.2',\r\n value: '1.2',\r\n forceSquared: true,\r\n onSetValue: fn(),\r\n};\r\n"],"names":["codeString","ControlsButton_stories","ControlsButton","Template","args","jsx","ControlsButtonExample","fn"],"mappings":";;;AAOA,MAAMA,IACJ,qJAGaC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EAEJ;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAyC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAgB,GAAGE,GAAM,GAEtEE,IAAwBH,EAAS,KAAK,CAAE,CAAA;AACrDG,EAAsB,OAAO;AAAA,EAC3B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,cAAc;AAAA,EACd,YAAYC,EAAG;AACjB;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ControlsButton';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { OverlayProvider as p } from "@react-aria/overlays";
|
|
3
|
-
import { fn as m } from "../../index-
|
|
3
|
+
import { fn as m } from "../../index-Dwqes6RH.js";
|
|
4
4
|
import { useState as c } from "react";
|
|
5
5
|
import { Drawer as r } from "./Drawer.js";
|
|
6
6
|
import { Button as o } from "../Buttons/Button.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { fn as i } from "../../index-
|
|
2
|
+
import { fn as i } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { FormInput as a } from "./FormInput.js";
|
|
4
4
|
import { SelectListbox as o } from "../SelectListbox/SelectListbox.js";
|
|
5
5
|
const m = `
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { fn as r } from "../../index-
|
|
2
|
+
import { fn as r } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { IconButton as t } from "./IconButton.js";
|
|
4
4
|
import { Icon as i } from "../Icon/Icon.js";
|
|
5
5
|
const l = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g } from "react";
|
|
3
|
-
import { fn as l } from "../../index-
|
|
3
|
+
import { fn as l } from "../../index-Dwqes6RH.js";
|
|
4
4
|
import { InputField as e } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
import { Icon as h } from "../Icon/Icon.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { ModalProvider as r } from "@react-aria/overlays";
|
|
3
|
-
import { fn as i } from "../../index-
|
|
3
|
+
import { fn as i } from "../../index-Dwqes6RH.js";
|
|
4
4
|
import { ModalDialog as t } from "./ModalDialog.js";
|
|
5
5
|
import { Button as s } from "../Buttons/Button.js";
|
|
6
6
|
import "../Buttons/LinkButton.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { fn as d } from "../../index-
|
|
2
|
+
import { fn as d } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
4
|
import { M as e } from "../../TablePlugin-hxs9O_ox.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { fn as o } from "../../index-
|
|
2
|
+
import { fn as o } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { MultiSelectBox as e } from "./MultiSelectBox.js";
|
|
4
4
|
const c = "<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuffix={string} />", b = {
|
|
5
5
|
title: "Organisms/MultiSelectBox",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { fn as a } from "../../index-
|
|
2
|
+
import { fn as a } from "../../index-Dwqes6RH.js";
|
|
3
3
|
import { OverlayCloseButton as o } from "./OverlayCloseButton.js";
|
|
4
4
|
import { Container as l } from "../../storyComponents/Container/Container.js";
|
|
5
5
|
const n = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />", c = {
|
|
@@ -22,6 +22,8 @@ export interface PageOverlayProps {
|
|
|
22
22
|
headerContent?: ReactNode;
|
|
23
23
|
/** The variant styling of the dialog. */
|
|
24
24
|
variant?: 'full-screen' | 'with-gutters';
|
|
25
|
+
/** The content background color of the dialog. Default grey-300*/
|
|
26
|
+
contentBackgroundColor?: 'grey' | 'white';
|
|
25
27
|
}
|
|
26
28
|
/** Represents a component for a modal dialog. */
|
|
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;
|
|
29
|
+
export declare function PageOverlay({ buttons, children, isLoading, spinnerAriaValueText, closeButtonAriaValueText, isOpen, noValidate, onClose, onSubmit, title, headerContent, variant, contentBackgroundColor, }: PropsWithChildren<PageOverlayProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,95 +1,102 @@
|
|
|
1
|
-
import { jsx as o, Fragment as
|
|
1
|
+
import { jsx as o, Fragment as $, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
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
|
|
7
|
-
import { OverlayCloseButton as
|
|
8
|
-
import { Spinner as
|
|
9
|
-
import { Backdrop as
|
|
6
|
+
import { useRef as m, useState as d, useEffect as q } from "react";
|
|
7
|
+
import { OverlayCloseButton as G } from "../OverlayCloseButton/OverlayCloseButton.js";
|
|
8
|
+
import { Spinner as J } from "../Spinner/Spinner.js";
|
|
9
|
+
import { Backdrop as O } from "../Backdrop/Backdrop.js";
|
|
10
10
|
import '../../assets/PageOverlay.css';const e = {
|
|
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-
|
|
17
|
-
"page-
|
|
18
|
-
"page-
|
|
19
|
-
"page-
|
|
20
|
-
"page-
|
|
21
|
-
"page-
|
|
11
|
+
"page-overlay__container": "_page-overlay__container_1wy1h_1",
|
|
12
|
+
"page-overlay": "_page-overlay_1wy1h_1",
|
|
13
|
+
"page-overlay--full-screen": "_page-overlay--full-screen_1wy1h_18",
|
|
14
|
+
"page-overlay--with-gutters": "_page-overlay--with-gutters_1wy1h_22",
|
|
15
|
+
"page-overlay__content": "_page-overlay__content_1wy1h_27",
|
|
16
|
+
"page-overlay__content--grey": "_page-overlay__content--grey_1wy1h_38",
|
|
17
|
+
"page-overlay__content--white": "_page-overlay__content--white_1wy1h_42",
|
|
18
|
+
"page-overlay__children": "_page-overlay__children_1wy1h_46",
|
|
19
|
+
"page-overlay__title-wrapper": "_page-overlay__title-wrapper_1wy1h_50",
|
|
20
|
+
"page-overlay__title": "_page-overlay__title_1wy1h_50",
|
|
21
|
+
"page-overlay__buttons-bar": "_page-overlay__buttons-bar_1wy1h_61",
|
|
22
|
+
"page-overlay__buttons-bar--shadow": "_page-overlay__buttons-bar--shadow_1wy1h_87",
|
|
23
|
+
"page-overlay__close": "_page-overlay__close_1wy1h_92"
|
|
22
24
|
};
|
|
23
|
-
function
|
|
25
|
+
function le({
|
|
24
26
|
buttons: t,
|
|
25
|
-
children:
|
|
26
|
-
isLoading:
|
|
27
|
-
spinnerAriaValueText:
|
|
27
|
+
children: f,
|
|
28
|
+
isLoading: w,
|
|
29
|
+
spinnerAriaValueText: b = "Loading",
|
|
28
30
|
closeButtonAriaValueText: S = "Close",
|
|
29
31
|
isOpen: a,
|
|
30
32
|
noValidate: N = !1,
|
|
31
33
|
onClose: p,
|
|
32
34
|
onSubmit: P,
|
|
33
|
-
title:
|
|
34
|
-
headerContent:
|
|
35
|
-
variant:
|
|
35
|
+
title: _,
|
|
36
|
+
headerContent: n,
|
|
37
|
+
variant: y = "full-screen",
|
|
38
|
+
contentBackgroundColor: T = "grey"
|
|
36
39
|
}) {
|
|
37
|
-
const
|
|
38
|
-
U({ isDisabled: !a }),
|
|
39
|
-
const r =
|
|
40
|
+
const s = m(null), g = m(null), [E, x] = d(!1), [L, B] = d(!1), { dialogProps: F, titleProps: H } = A({ role: "dialog" }, s), { modalProps: k } = K({ isDisabled: !a }), { overlayProps: z, underlayProps: D } = M({ isOpen: a, onClose: p }, s);
|
|
41
|
+
U({ isDisabled: !a }), q(() => {
|
|
42
|
+
const r = g.current;
|
|
40
43
|
if (!r) return;
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
+
function v() {
|
|
45
|
+
const u = r.scrollHeight, h = r.clientHeight, j = r.scrollTop;
|
|
46
|
+
x(u > h), B(j + h >= u);
|
|
44
47
|
}
|
|
45
48
|
function l() {
|
|
46
|
-
|
|
49
|
+
v();
|
|
47
50
|
}
|
|
48
51
|
r.addEventListener("scroll", l), window.addEventListener("resize", l);
|
|
49
|
-
const
|
|
50
|
-
|
|
52
|
+
const R = setTimeout(() => {
|
|
53
|
+
v();
|
|
51
54
|
}, 0);
|
|
52
55
|
return () => {
|
|
53
|
-
r.removeEventListener("scroll", l), window.removeEventListener("resize", l), clearTimeout(
|
|
56
|
+
r.removeEventListener("scroll", l), window.removeEventListener("resize", l), clearTimeout(R);
|
|
54
57
|
};
|
|
55
|
-
}, [a,
|
|
56
|
-
function
|
|
58
|
+
}, [a, n]);
|
|
59
|
+
function I(r) {
|
|
57
60
|
r.stopPropagation();
|
|
58
61
|
}
|
|
59
|
-
return a ? /* @__PURE__ */ o(V, { className: e["page-overlay__container"], children: /* @__PURE__ */ o(
|
|
62
|
+
return a ? /* @__PURE__ */ o(V, { className: e["page-overlay__container"], children: /* @__PURE__ */ o(O, { ...D, children: w ? /* @__PURE__ */ o(J, { ariaValueText: b }) : /* @__PURE__ */ o($, { children: /* @__PURE__ */ o(C, { autoFocus: !0, contain: !0, restoreFocus: !0, children: /* @__PURE__ */ c(
|
|
60
63
|
"div",
|
|
61
64
|
{
|
|
62
|
-
...
|
|
63
|
-
...H,
|
|
65
|
+
...F,
|
|
64
66
|
...k,
|
|
67
|
+
...z,
|
|
65
68
|
className: i(e["page-overlay"], {
|
|
66
|
-
[e[`page-overlay--${
|
|
69
|
+
[e[`page-overlay--${y}`]]: y
|
|
67
70
|
}),
|
|
68
|
-
onKeyUp:
|
|
71
|
+
onKeyUp: I,
|
|
69
72
|
role: "presentation",
|
|
70
|
-
ref:
|
|
73
|
+
ref: s,
|
|
71
74
|
children: [
|
|
72
|
-
(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/* @__PURE__ */ o("span", { className: e["page-overlay__close"], children: /* @__PURE__ */ o(
|
|
75
|
+
(_ || n) && /* @__PURE__ */ c("div", { className: e["page-overlay__title-wrapper"], children: [
|
|
76
|
+
_ && /* @__PURE__ */ o("h1", { ...H, className: e["page-overlay__title"], children: _ }),
|
|
77
|
+
n,
|
|
78
|
+
/* @__PURE__ */ o("span", { className: e["page-overlay__close"], children: /* @__PURE__ */ o(G, { "aria-label": S, onClick: p }) })
|
|
76
79
|
] }),
|
|
77
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ c(
|
|
78
81
|
"form",
|
|
79
82
|
{
|
|
80
|
-
className: i(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
className: i(
|
|
84
|
+
e["page-overlay__content"],
|
|
85
|
+
e[`page-overlay__content--${T}`],
|
|
86
|
+
{
|
|
87
|
+
[e["page-overlay--content-with-buttons"]]: t
|
|
88
|
+
}
|
|
89
|
+
),
|
|
83
90
|
onSubmit: P,
|
|
84
91
|
noValidate: N,
|
|
85
|
-
ref:
|
|
92
|
+
ref: g,
|
|
86
93
|
children: [
|
|
87
|
-
/* @__PURE__ */ o("div", { className: e["page-overlay__children"], children:
|
|
94
|
+
/* @__PURE__ */ o("div", { className: e["page-overlay__children"], children: f }),
|
|
88
95
|
t && /* @__PURE__ */ o(
|
|
89
96
|
"div",
|
|
90
97
|
{
|
|
91
98
|
className: i(e["page-overlay__buttons-bar"], {
|
|
92
|
-
[e["page-overlay__buttons-bar--shadow"]]:
|
|
99
|
+
[e["page-overlay__buttons-bar--shadow"]]: E && !L
|
|
93
100
|
}),
|
|
94
101
|
children: t
|
|
95
102
|
}
|
|
@@ -102,6 +109,6 @@ function ae({
|
|
|
102
109
|
) }) }) }) }) : null;
|
|
103
110
|
}
|
|
104
111
|
export {
|
|
105
|
-
|
|
112
|
+
le as PageOverlay
|
|
106
113
|
};
|
|
107
114
|
//# sourceMappingURL=PageOverlay.js.map
|