@uva-glass/component-library 3.52.9 → 3.52.11
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/ProgrammeCard.css +1 -1
- package/dist/{chunk-RW5PKMWM-Dn7TLZUE.js → chunk-HERDX7MO-DaYu-eWo.js} +1704 -1676
- package/dist/chunk-HERDX7MO-DaYu-eWo.js.map +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.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FormInput/FormInput.d.ts +3 -1
- package/dist/components/FormInput/FormInput.js +25 -23
- package/dist/components/FormInput/FormInput.js.map +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/Notification/Notification.stories.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.d.ts +2 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.js +17 -15
- package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -3
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- 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/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/{index-DGI4ZxSQ.js → index-DRQMriwT.js} +4338 -4290
- package/dist/index-DRQMriwT.js.map +1 -0
- package/dist/storybook__react.d.js +2 -2
- package/package.json +15 -15
- package/dist/chunk-RW5PKMWM-Dn7TLZUE.js.map +0 -1
- package/dist/index-DGI4ZxSQ.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import { f as l } from "../../index-
|
|
2
|
+
import { f as l } from "../../index-DRQMriwT.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 { f as s } from "../../index-
|
|
2
|
+
import { f as s } from "../../index-DRQMriwT.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 { f as c } from "../../index-
|
|
2
|
+
import { f as c } from "../../index-DRQMriwT.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 { f as e } from "../../index-
|
|
2
|
+
import { f as e } from "../../index-DRQMriwT.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,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t, Fragment as l } from "react/jsx-runtime";
|
|
2
|
-
import { f as o } from "../../index-
|
|
2
|
+
import { f as o } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { CheckboxButtonBar as i } from "./CheckboxButtonBar.js";
|
|
4
4
|
import { Periods as r } from "../Periods/Periods.js";
|
|
5
5
|
const u = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosition={} required={} notValidatedText={} disableGroup={} onSetValues={} />", B = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as h, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import { f as C } from "../../index-
|
|
3
|
-
import { a as u } from "../../chunk-
|
|
2
|
+
import { f as C } from "../../index-DRQMriwT.js";
|
|
3
|
+
import { a as u } from "../../chunk-HERDX7MO-DaYu-eWo.js";
|
|
4
4
|
import { useState as f } from "react";
|
|
5
5
|
import { CheckboxTree as p } from "./CheckboxTree.js";
|
|
6
6
|
import { Chip as g } from "../Chip/Chip.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { f as t } from "../../index-
|
|
2
|
+
import { f as t } from "../../index-DRQMriwT.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",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as l, Fragment as s } from "react/jsx-runtime";
|
|
2
|
-
import { f as e } from "../../index-
|
|
2
|
+
import { f as e } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { ControlsButton as t } from "./ControlsButton.js";
|
|
4
4
|
import { Icons as a } from "../Icon/icons/index.js";
|
|
5
5
|
import { Periods as i } from "../Periods/Periods.js";
|
|
@@ -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 { f as m } from "../../index-
|
|
3
|
+
import { f as m } from "../../index-DRQMriwT.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";
|
|
@@ -16,9 +16,11 @@ export interface FormInputProps {
|
|
|
16
16
|
notValidatedText?: string;
|
|
17
17
|
/** Returns array of selected values as number */
|
|
18
18
|
onChange?: (value: string) => void;
|
|
19
|
+
/** Sets max length for the standard input */
|
|
20
|
+
maxLength?: number;
|
|
19
21
|
/** Determines if the container wrapper is rendered. */
|
|
20
22
|
noContainer?: boolean;
|
|
21
23
|
/** Optional custom input that will replace the default input */
|
|
22
24
|
customInput?: ReactNode;
|
|
23
25
|
}
|
|
24
|
-
export declare const FormInput: ({ id, label, labelPosition, type, required, notValid, notValidatedText, onChange, noContainer, customInput, }: FormInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const FormInput: ({ id, label, labelPosition, type, required, notValid, notValidatedText, onChange, maxLength, noContainer, customInput, }: FormInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsxs as l, Fragment as k, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import "../Accordion/Accordion.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../Buttons/Button.js";
|
|
6
6
|
import "../Buttons/LinkButton.js";
|
|
7
7
|
import "@react-aria/button";
|
|
8
8
|
import "../Checkbox/Checkbox.js";
|
|
9
|
-
import { Label as
|
|
10
|
-
import { FeedbackBox as
|
|
9
|
+
import { Label as g } from "../Label/Label.js";
|
|
10
|
+
import { FeedbackBox as x } from "../FeedbackBox/FeedbackBox.js";
|
|
11
11
|
import "@react-aria/dialog";
|
|
12
12
|
import "@react-aria/focus";
|
|
13
13
|
import "@react-aria/overlays";
|
|
@@ -37,41 +37,43 @@ import '../../assets/FormInput.css';const t = {
|
|
|
37
37
|
"form-input__input-container": "_form-input__input-container_rt0pn_35",
|
|
38
38
|
"form-input__input": "_form-input__input_rt0pn_25",
|
|
39
39
|
"not-valid": "_not-valid_rt0pn_60"
|
|
40
|
-
},
|
|
40
|
+
}, V = ({
|
|
41
41
|
id: o,
|
|
42
42
|
label: i,
|
|
43
|
-
labelPosition:
|
|
43
|
+
labelPosition: u = "top",
|
|
44
44
|
type: p = "text",
|
|
45
|
-
required:
|
|
46
|
-
notValid:
|
|
45
|
+
required: s = !1,
|
|
46
|
+
notValid: d = !1,
|
|
47
47
|
notValidatedText: e = "",
|
|
48
48
|
onChange: m,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
maxLength: _,
|
|
50
|
+
noContainer: b = !1,
|
|
51
|
+
customInput: a
|
|
51
52
|
}) => {
|
|
52
|
-
const
|
|
53
|
+
const h = (n) => ["e", "E", "+", "-"].includes(n.key) && n.preventDefault(), v = (n) => {
|
|
53
54
|
typeof m == "function" && m(n.target.value);
|
|
54
|
-
},
|
|
55
|
-
i && /* @__PURE__ */ r(
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
55
|
+
}, c = /* @__PURE__ */ l(k, { children: [
|
|
56
|
+
i && /* @__PURE__ */ r(g, { htmlFor: o, required: s, alignRight: !0, children: i }),
|
|
57
|
+
/* @__PURE__ */ l("div", { className: t["form-input__input-feedback-container"], children: [
|
|
58
|
+
a || /* @__PURE__ */ r("div", { className: t["form-input__input-container"], children: /* @__PURE__ */ r(
|
|
58
59
|
"input",
|
|
59
60
|
{
|
|
60
61
|
id: o,
|
|
61
62
|
type: p,
|
|
62
|
-
...p === "number" && { onKeyDown:
|
|
63
|
-
onChange:
|
|
64
|
-
className:
|
|
65
|
-
[t["not-valid"]]:
|
|
66
|
-
})
|
|
63
|
+
...p === "number" && { onKeyDown: h },
|
|
64
|
+
onChange: v,
|
|
65
|
+
className: f(t["form-input__input"], {
|
|
66
|
+
[t["not-valid"]]: d
|
|
67
|
+
}),
|
|
68
|
+
..._ ? { maxLength: _ } : {}
|
|
67
69
|
}
|
|
68
70
|
) }),
|
|
69
|
-
e !== "" && /* @__PURE__ */ r(
|
|
71
|
+
e !== "" && /* @__PURE__ */ r(x, { level: "error", feedback: e })
|
|
70
72
|
] })
|
|
71
73
|
] });
|
|
72
|
-
return
|
|
74
|
+
return b ? c : /* @__PURE__ */ r("div", { className: f(t["form-input__container"], t[`form-input__container--label-${u}`]), children: c });
|
|
73
75
|
};
|
|
74
76
|
export {
|
|
75
|
-
|
|
77
|
+
V as FormInput
|
|
76
78
|
};
|
|
77
79
|
//# sourceMappingURL=FormInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** `true` to color border red to show not valid; otherwise, `false`. */\n notValid?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange?: (value: string) => void;\n /** Determines if the container wrapper is rendered. */\n noContainer?: boolean;\n /** Optional custom input that will replace the default input */\n customInput?: ReactNode;\n}\n\nexport const FormInput = ({\n id,\n label,\n labelPosition = 'top',\n type = 'text',\n required = false,\n notValid = false,\n notValidatedText = '',\n onChange,\n noContainer = false,\n customInput,\n}: FormInputProps) => {\n const blockInvalidChar = (event: React.KeyboardEvent<HTMLInputElement>) =>\n ['e', 'E', '+', '-'].includes(event.key) && event.preventDefault();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (typeof onChange === 'function') {\n onChange(event.target.value);\n }\n };\n\n const componentContent = (\n <>\n {label && (\n <Label htmlFor={id} required={required} alignRight>\n {label}\n </Label>\n )}\n\n <div className={styles['form-input__input-feedback-container']}>\n {customInput ? (\n customInput\n ) : (\n <div className={styles['form-input__input-container']}>\n <input\n id={id}\n type={type}\n {...(type === 'number' && { onKeyDown: blockInvalidChar })}\n onChange={handleChange}\n className={clsx(styles['form-input__input'], {\n [styles['not-valid']]: notValid,\n })}\n />\n </div>\n )}\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </>\n );\n\n return noContainer ? (\n componentContent\n ) : (\n <div className={clsx(styles['form-input__container'], styles[`form-input__container--label-${labelPosition}`])}>\n {componentContent}\n </div>\n );\n};\n"],"names":["FormInput","id","label","labelPosition","type","required","notValid","notValidatedText","onChange","noContainer","customInput","blockInvalidChar","event","handleChange","componentContent","jsxs","Fragment","Label","styles","jsx","clsx","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** `true` to color border red to show not valid; otherwise, `false`. */\n notValid?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange?: (value: string) => void;\n /** Sets max length for the standard input */\n maxLength?: number;\n /** Determines if the container wrapper is rendered. */\n noContainer?: boolean;\n /** Optional custom input that will replace the default input */\n customInput?: ReactNode;\n}\n\nexport const FormInput = ({\n id,\n label,\n labelPosition = 'top',\n type = 'text',\n required = false,\n notValid = false,\n notValidatedText = '',\n onChange,\n maxLength,\n noContainer = false,\n customInput,\n}: FormInputProps) => {\n const blockInvalidChar = (event: React.KeyboardEvent<HTMLInputElement>) =>\n ['e', 'E', '+', '-'].includes(event.key) && event.preventDefault();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (typeof onChange === 'function') {\n onChange(event.target.value);\n }\n };\n\n const componentContent = (\n <>\n {label && (\n <Label htmlFor={id} required={required} alignRight>\n {label}\n </Label>\n )}\n\n <div className={styles['form-input__input-feedback-container']}>\n {customInput ? (\n customInput\n ) : (\n <div className={styles['form-input__input-container']}>\n <input\n id={id}\n type={type}\n {...(type === 'number' && { onKeyDown: blockInvalidChar })}\n onChange={handleChange}\n className={clsx(styles['form-input__input'], {\n [styles['not-valid']]: notValid,\n })}\n {...(maxLength ? { maxLength } : {})}\n />\n </div>\n )}\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </>\n );\n\n return noContainer ? (\n componentContent\n ) : (\n <div className={clsx(styles['form-input__container'], styles[`form-input__container--label-${labelPosition}`])}>\n {componentContent}\n </div>\n );\n};\n"],"names":["FormInput","id","label","labelPosition","type","required","notValid","notValidatedText","onChange","maxLength","noContainer","customInput","blockInvalidChar","event","handleChange","componentContent","jsxs","Fragment","Label","styles","jsx","clsx","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCaA,IAAY,CAAC;AAAA,EACxB,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,aAAAC;AACF,MAAsB;AACpB,QAAMC,IAAmB,CAACC,MACxB,CAAC,KAAK,KAAK,KAAK,GAAG,EAAE,SAASA,EAAM,GAAG,KAAKA,EAAM,eAAA,GAE9CC,IAAe,CAACD,MAA+C;AACnE,IAAI,OAAOL,KAAa,cACtBA,EAASK,EAAM,OAAO,KAAK;AAAA,EAE/B,GAEME,IACJ,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAf,uBACEgB,GAAA,EAAM,SAASjB,GAAI,UAAAI,GAAoB,YAAU,IAC/C,UAAAH,EAAA,CACH;AAAA,IAGF,gBAAAc,EAAC,OAAA,EAAI,WAAWG,EAAO,sCAAsC,GAC1D,UAAA;AAAA,MAAAR,KAGC,gBAAAS,EAAC,OAAA,EAAI,WAAWD,EAAO,6BAA6B,GAClD,UAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAAnB;AAAA,UACA,MAAAG;AAAA,UACC,GAAIA,MAAS,YAAY,EAAE,WAAWQ,EAAA;AAAA,UACvC,UAAUE;AAAA,UACV,WAAWO,EAAKF,EAAO,mBAAmB,GAAG;AAAA,YAC3C,CAACA,EAAO,WAAW,CAAC,GAAGb;AAAA,UAAA,CACxB;AAAA,UACA,GAAIG,IAAY,EAAE,WAAAA,MAAc,CAAA;AAAA,QAAC;AAAA,MAAA,GAEtC;AAAA,MAEDF,MAAqB,MAAM,gBAAAa,EAACE,KAAY,OAAM,SAAQ,UAAUf,EAAA,CAAkB;AAAA,IAAA,EAAA,CACrF;AAAA,EAAA,GACF;AAGF,SAAOG,IACLK,IAEA,gBAAAK,EAAC,OAAA,EAAI,WAAWC,EAAKF,EAAO,uBAAuB,GAAGA,EAAO,gCAAgChB,CAAa,EAAE,CAAC,GAC1G,UAAAY,GACH;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { f as i } from "../../index-
|
|
2
|
+
import { f as i } from "../../index-DRQMriwT.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 { f as r } from "../../index-
|
|
2
|
+
import { f as r } from "../../index-DRQMriwT.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 { f as p } from "../../index-
|
|
3
|
+
import { f as p } from "../../index-DRQMriwT.js";
|
|
4
4
|
import { InputField as e } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
import "../Accordion/Accordion.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 { f as i } from "../../index-
|
|
3
|
+
import { f as i } from "../../index-DRQMriwT.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 { f as d } from "../../index-
|
|
2
|
+
import { f as d } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
4
|
import { M as e } from "../../TablePlugin-CqCjNBW_.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { f as u } from "../../index-
|
|
2
|
+
import { f as u } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { useState as r } from "react";
|
|
4
4
|
import { MultiSelectBox as l } from "./MultiSelectBox.js";
|
|
5
5
|
const d = "<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuffix={string} />", S = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { f as a } from "../../index-
|
|
2
|
+
import { f as a } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { Notification as t } from "./Notification.js";
|
|
4
4
|
const r = `<Notification title={title} subtitle={subtitle} action={action}
|
|
5
5
|
level={level} variant={variant} onClose={() => {}} />`, p = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { f as a } from "../../index-
|
|
2
|
+
import { f as a } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { OverlayCloseButton as o } from "./OverlayCloseButton.js";
|
|
4
4
|
import { Container as l } from "../../storyComponents/Container/Container.js";
|
|
5
5
|
const r = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />", c = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { f as t } from "../../index-
|
|
2
|
+
import { f as t } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { PeriodSelector as e } from "./PeriodSelector.js";
|
|
4
4
|
const i = "<PeriodSelector maxPeriods={} defaultValues={} label={} labelPosition={} required={} onChange={} />", m = {
|
|
5
5
|
title: "Organisms/PeriodSelector",
|
|
@@ -6,6 +6,7 @@ export interface ProgrammeCardProps {
|
|
|
6
6
|
header?: ReactNode;
|
|
7
7
|
/** The programme details. */
|
|
8
8
|
details?: ReactNode;
|
|
9
|
+
isNew?: boolean;
|
|
9
10
|
}
|
|
10
11
|
/** Represents a component to render a card for a programme. */
|
|
11
|
-
export declare const ProgrammeCard: ({ href, header, details }: ProgrammeCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const ProgrammeCard: ({ href, header, details, isNew }: ProgrammeCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useNavigate as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
"programme-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as s, jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useNavigate as i } from "react-router";
|
|
3
|
+
import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import '../../assets/ProgrammeCard.css';const a = {
|
|
5
|
+
"programme-card": "_programme-card_1f880_1",
|
|
6
|
+
"programme-card--new": "_programme-card--new_1f880_13",
|
|
7
|
+
"programme-card__divider": "_programme-card__divider_1f880_31"
|
|
8
|
+
}, l = ({ href: m, header: o, details: e, isNew: c }) => {
|
|
9
|
+
const d = i();
|
|
10
|
+
return /* @__PURE__ */ s(
|
|
9
11
|
"a",
|
|
10
12
|
{
|
|
11
|
-
className:
|
|
12
|
-
href:
|
|
13
|
+
className: p(a["programme-card"], c && a["programme-card--new"]),
|
|
14
|
+
href: m,
|
|
13
15
|
onClick: (r) => {
|
|
14
|
-
r.metaKey || r.ctrlKey || r.shiftKey || r.altKey || r.button !== 0 || (r.preventDefault(),
|
|
16
|
+
r.metaKey || r.ctrlKey || r.shiftKey || r.altKey || r.button !== 0 || (r.preventDefault(), d(m));
|
|
15
17
|
},
|
|
16
18
|
children: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
o,
|
|
20
|
+
e && /* @__PURE__ */ _("hr", { className: a["programme-card__divider"] }),
|
|
21
|
+
e
|
|
20
22
|
]
|
|
21
23
|
}
|
|
22
24
|
);
|
|
23
25
|
};
|
|
24
26
|
export {
|
|
25
|
-
|
|
27
|
+
l as ProgrammeCard
|
|
26
28
|
};
|
|
27
29
|
//# sourceMappingURL=ProgrammeCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgrammeCard.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.tsx"],"sourcesContent":["import { useNavigate } from 'react-router';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './ProgrammeCard.module.css';\n\nexport interface ProgrammeCardProps {\n /** The URL to navigate to when the card is clicked. */\n href: string;\n /** The header contents. */\n header?: ReactNode;\n /** The programme details. */\n details?: ReactNode;\n}\n\n/** Represents a component to render a card for a programme. */\nexport const ProgrammeCard = ({ href, header, details }: ProgrammeCardProps) => {\n const navigate = useNavigate();\n\n return (\n <a\n className={styles['programme-card']}\n href={href}\n onClick={(event) => {\n // lets browser handle new tab\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0) {\n return;\n }\n event.preventDefault();\n // lets react-router handle SPA-style navigation\n navigate(href);\n }}\n >\n {header}\n {details && <hr className={styles['programme-card__divider']} />}\n {details}\n </a>\n );\n};\n"],"names":["ProgrammeCard","href","header","details","navigate","useNavigate","jsxs","styles","event","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProgrammeCard.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.tsx"],"sourcesContent":["import { useNavigate } from 'react-router';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './ProgrammeCard.module.css';\nimport { clsx } from 'clsx';\n\nexport interface ProgrammeCardProps {\n /** The URL to navigate to when the card is clicked. */\n href: string;\n /** The header contents. */\n header?: ReactNode;\n /** The programme details. */\n details?: ReactNode;\n isNew?: boolean;\n}\n\n/** Represents a component to render a card for a programme. */\nexport const ProgrammeCard = ({ href, header, details, isNew }: ProgrammeCardProps) => {\n const navigate = useNavigate();\n\n return (\n <a\n className={clsx(styles['programme-card'], isNew && styles['programme-card--new'])}\n href={href}\n onClick={(event) => {\n // lets browser handle new tab\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.button !== 0) {\n return;\n }\n event.preventDefault();\n // lets react-router handle SPA-style navigation\n navigate(href);\n }}\n >\n {header}\n {details && <hr className={styles['programme-card__divider']} />}\n {details}\n </a>\n );\n};\n"],"names":["ProgrammeCard","href","header","details","isNew","navigate","useNavigate","jsxs","clsx","styles","event","jsx"],"mappings":";;;;;;;GAkBaA,IAAgB,CAAC,EAAE,MAAAC,GAAM,QAAAC,GAAQ,SAAAC,GAAS,OAAAC,QAAgC;AACrF,QAAMC,IAAWC,EAAA;AAEjB,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,gBAAgB,GAAGL,KAASK,EAAO,qBAAqB,CAAC;AAAA,MAChF,MAAAR;AAAA,MACA,SAAS,CAACS,MAAU;AAElB,QAAIA,EAAM,WAAWA,EAAM,WAAWA,EAAM,YAAYA,EAAM,UAAUA,EAAM,WAAW,MAGzFA,EAAM,eAAA,GAENL,EAASJ,CAAI;AAAA,MACf;AAAA,MAEC,UAAA;AAAA,QAAAC;AAAA,QACAC,KAAW,gBAAAQ,EAAC,MAAA,EAAG,WAAWF,EAAO,yBAAyB,GAAG;AAAA,QAC7DN;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -30,7 +30,7 @@ import "../SelectListbox/SelectProvider.js";
|
|
|
30
30
|
import "../Sortable/components/SortableItem.js";
|
|
31
31
|
import "../../SortableProvider-BbwlEPIr.js";
|
|
32
32
|
import "../WeekSelector/components/WeekSelectorOptionContainer.js";
|
|
33
|
-
const n = "<ProgrammeCard key={key} header={header} details={details} href={href} />", O = {
|
|
33
|
+
const n = "<ProgrammeCard key={key} header={header} details={details} href={href} isNew={boolean} />", O = {
|
|
34
34
|
title: "Atoms/ProgrammeCard",
|
|
35
35
|
component: o,
|
|
36
36
|
parameters: {
|
|
@@ -39,8 +39,8 @@ const n = "<ProgrammeCard key={key} header={header} details={details} href={href
|
|
|
39
39
|
}
|
|
40
40
|
}, s = (t) => /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(p, { size: "large", children: /* @__PURE__ */ r(o, { ...t }) }) }), l = s.bind({});
|
|
41
41
|
l.args = {
|
|
42
|
-
header: "This is
|
|
43
|
-
details: "This is
|
|
42
|
+
header: "This is our header",
|
|
43
|
+
details: "This is our details",
|
|
44
44
|
href: "/"
|
|
45
45
|
};
|
|
46
46
|
const d = s.bind({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgrammeCard.stories.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.stories.tsx"],"sourcesContent":["import { BrowserRouter } from 'react-router';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ProgrammeCardProps } from './ProgrammeCard';\n\nimport { ProgrammeCard } from './ProgrammeCard';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon, Repeater } from 'components';\n\nconst codeString = '<ProgrammeCard key={key} header={header} details={details} href={href} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/ProgrammeCard',\n component: ProgrammeCard,\n parameters: {\n inspectComponent: ProgrammeCard,\n codeString: codeString,\n },\n} as Meta<ProgrammeCardProps>;\n\nconst Template: StoryFn<ProgrammeCardProps> = (args) => (\n <BrowserRouter>\n <Container size=\"large\">\n <ProgrammeCard {...args} />\n </Container>\n </BrowserRouter>\n);\n\nexport const ProgrammeCardExample = Template.bind({});\nProgrammeCardExample.args = {\n header: 'This is
|
|
1
|
+
{"version":3,"file":"ProgrammeCard.stories.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.stories.tsx"],"sourcesContent":["import { BrowserRouter } from 'react-router';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ProgrammeCardProps } from './ProgrammeCard';\n\nimport { ProgrammeCard } from './ProgrammeCard';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon, Repeater } from 'components';\n\nconst codeString = '<ProgrammeCard key={key} header={header} details={details} href={href} isNew={boolean} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/ProgrammeCard',\n component: ProgrammeCard,\n parameters: {\n inspectComponent: ProgrammeCard,\n codeString: codeString,\n },\n} as Meta<ProgrammeCardProps>;\n\nconst Template: StoryFn<ProgrammeCardProps> = (args) => (\n <BrowserRouter>\n <Container size=\"large\">\n <ProgrammeCard {...args} />\n </Container>\n </BrowserRouter>\n);\n\nexport const ProgrammeCardExample = Template.bind({});\nProgrammeCardExample.args = {\n header: 'This is our header',\n details: 'This is our details',\n href: '/',\n};\n\nexport const WithComplexContent = Template.bind({});\nWithComplexContent.args = {\n header: (\n <Repeater flexDirection=\"row\" gap=\"150\">\n <Icon name=\"Envelope\" size={32} />\n <h2 style={{ margin: 0 }}>This is my header</h2>\n </Repeater>\n ),\n details: (\n <Repeater flexDirection=\"row\" gap=\"150\">\n <Repeater flexDirection=\"row\">\n <Icon name=\"FaceFrown\" />\n Details 1\n </Repeater>\n <Repeater flexDirection=\"row\">\n <Icon name=\"Heart\" />\n Details 2\n </Repeater>\n <Repeater flexDirection=\"row\">\n <Icon name=\"Sparkles\" />\n Details 3\n </Repeater>\n </Repeater>\n ),\n href: '/',\n};\n\nconst MultiProgrammeCardsTemplate: StoryFn<ProgrammeCardProps> = (args) => (\n <BrowserRouter>\n <Container size=\"large\">\n <Repeater>\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n </Repeater>\n </Container>\n </BrowserRouter>\n);\n\nexport const MultiProgrammeCards = MultiProgrammeCardsTemplate.bind({});\nMultiProgrammeCards.args = {\n header: 'This is my header',\n details: 'This is my details',\n href: '/',\n};\n"],"names":["codeString","ProgrammeCard_stories","ProgrammeCard","Template","args","jsx","BrowserRouter","Container","ProgrammeCardExample","WithComplexContent","jsxs","Repeater","Icon","MultiProgrammeCardsTemplate","MultiProgrammeCards"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAMA,IAAa,6FAGnBC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAwC,CAACC,MAC7C,gBAAAC,EAACC,KACC,UAAA,gBAAAD,EAACE,GAAA,EAAU,MAAK,SACd,UAAA,gBAAAF,EAACH,GAAA,EAAe,GAAGE,EAAA,CAAM,GAC3B,GACF,GAGWI,IAAuBL,EAAS,KAAK,CAAA,CAAE;AACpDK,EAAqB,OAAO;AAAA,EAC1B,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAMC,IAAqBN,EAAS,KAAK,CAAA,CAAE;AAClDM,EAAmB,OAAO;AAAA,EACxB,QACE,gBAAAC,EAACC,GAAA,EAAS,eAAc,OAAM,KAAI,OAChC,UAAA;AAAA,IAAA,gBAAAN,EAACO,GAAA,EAAK,MAAK,YAAW,MAAM,IAAI;AAAA,sBAC/B,MAAA,EAAG,OAAO,EAAE,QAAQ,EAAA,GAAK,UAAA,oBAAA,CAAiB;AAAA,EAAA,GAC7C;AAAA,EAEF,SACE,gBAAAF,EAACC,GAAA,EAAS,eAAc,OAAM,KAAI,OAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAAS,eAAc,OACtB,UAAA;AAAA,MAAA,gBAAAN,EAACO,GAAA,EAAK,MAAK,YAAA,CAAY;AAAA,MAAE;AAAA,IAAA,GAE3B;AAAA,IACA,gBAAAF,EAACC,GAAA,EAAS,eAAc,OACtB,UAAA;AAAA,MAAA,gBAAAN,EAACO,GAAA,EAAK,MAAK,QAAA,CAAQ;AAAA,MAAE;AAAA,IAAA,GAEvB;AAAA,IACA,gBAAAF,EAACC,GAAA,EAAS,eAAc,OACtB,UAAA;AAAA,MAAA,gBAAAN,EAACO,GAAA,EAAK,MAAK,WAAA,CAAW;AAAA,MAAE;AAAA,IAAA,EAAA,CAE1B;AAAA,EAAA,GACF;AAAA,EAEF,MAAM;AACR;AAEA,MAAMC,IAA2D,CAACT,MAChE,gBAAAC,EAACC,GAAA,EACC,4BAACC,GAAA,EAAU,MAAK,SACd,UAAA,gBAAAG,EAACC,GAAA,EACC,UAAA;AAAA,EAAA,gBAAAN,EAACH,GAAA,EAAe,GAAGE,GAAM;AAAA,EACzB,gBAAAC,EAACH,GAAA,EAAe,GAAGE,GAAM;AAAA,EACzB,gBAAAC,EAACH,GAAA,EAAe,GAAGE,EAAA,CAAM;AAAA,EAAA,CAC3B,GACF,GACF,GAGWU,IAAsBD,EAA4B,KAAK,CAAA,CAAE;AACtEC,EAAoB,OAAO;AAAA,EACzB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACR;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { f as t } from "../../index-
|
|
2
|
+
import { f as t } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { RadioTabSelector as e } from "./RadioTabSelector.js";
|
|
4
4
|
const i = "<RadioTabSelector radioButtons={} defaultValue={} label={} labelPosition={} required={} notValidatedText={} onSetValue={} />", b = {
|
|
5
5
|
title: "Molecules/RadioTabSelector",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import { f as s } from "../../index-
|
|
2
|
+
import { f as s } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { Sortable as l } from "./Sortable.js";
|
|
4
4
|
import { InputField as d } from "../InputField/InputField.js";
|
|
5
5
|
import { Icon as c } from "../Icon/Icon.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { f as a } from "../../index-
|
|
2
|
+
import { f as a } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { TextArea as e } from "./TextArea.js";
|
|
4
4
|
const o = `
|
|
5
5
|
<TextArea label={label} maxCharacters={maxCharacters} defaultValue={string}/> `, b = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { f as l } from "../../index-
|
|
2
|
+
import { f as l } from "../../index-DRQMriwT.js";
|
|
3
3
|
import { ToggleSwitch as e } from "./ToggleSwitch.js";
|
|
4
4
|
const a = `
|
|
5
5
|
// Has all InputHTMLAttributes props available except "className" and "style"
|