@uva-glass/component-library 1.31.1 → 1.32.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/MultiSelect-CFOkF66G.js +46 -0
- package/dist/MultiSelect-CFOkF66G.js.map +1 -0
- package/dist/MultiSelectItem-D5q99kfp.js +24 -0
- package/dist/MultiSelectItem-D5q99kfp.js.map +1 -0
- package/dist/assets/Label.css +1 -1
- package/dist/assets/MultiSelectItem.css +1 -1
- package/dist/components/InputField/InputField.d.ts +1 -1
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +9 -8
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.d.ts +2 -1
- package/dist/components/Label/Label.js +17 -5
- package/dist/components/Label/Label.js.map +1 -1
- package/dist/components/Label/Label.stories.d.ts +1 -0
- package/dist/components/Label/Label.stories.js +13 -5
- package/dist/components/Label/Label.stories.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +11 -8
- package/dist/components/MultiSelect/MultiSelect.js +5 -7
- package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +5 -2
- package/dist/components/MultiSelect/MultiSelect.stories.js +74 -35
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.d.ts +6 -0
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +16 -0
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -0
- package/dist/components/MultiSelect/components/MultiSelectItem.js +9 -0
- package/dist/components/MultiSelect/components/MultiSelectItem.js.map +1 -0
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -2
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +24 -26
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +24 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/MultiSelect.css +0 -1
- package/dist/components/MultiSelectItem/MultiSelectItem.js +0 -19
- package/dist/components/MultiSelectItem/MultiSelectItem.js.map +0 -1
- package/dist/components/MultiSelectItem/MultiSelectItem.stories.d.ts +0 -5
- package/dist/components/MultiSelectItem/MultiSelectItem.stories.js +0 -17
- package/dist/components/MultiSelectItem/MultiSelectItem.stories.js.map +0 -1
- package/dist/components/MultiSelectItem/index.d.ts +0 -1
- package/dist/components/MultiSelectItem/index.js +0 -5
- package/dist/components/MultiSelectItem/index.js.map +0 -1
- /package/dist/components/{MultiSelectItem → MultiSelect/components}/MultiSelectItem.d.ts +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as s, jsx as l, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "./clsx-DB4S2d7J.js";
|
|
3
|
+
import { s as t, M as u } from "./MultiSelectItem-D5q99kfp.js";
|
|
4
|
+
import { Label as n } from "./components/Label/Label.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { Button as p } from "./components/Button/Button.js";
|
|
7
|
+
import "./components/OverlayCloseButton/OverlayCloseButton.js";
|
|
8
|
+
import "./components/IconButton/IconButton.js";
|
|
9
|
+
import "./components/Input/Input.js";
|
|
10
|
+
import "./components/InputField/InputField.js";
|
|
11
|
+
import "./components/SelectListbox/SelectListbox.js";
|
|
12
|
+
import "./components/SelectListbox/SelectProvider.js";
|
|
13
|
+
function d({ label: i, clearTrigger: e, onClear: r }) {
|
|
14
|
+
return /* @__PURE__ */ s("header", { className: t["multi-select__header"], children: [
|
|
15
|
+
/* @__PURE__ */ l(n, { htmlFor: "multi-select-list", children: i }),
|
|
16
|
+
e && /* @__PURE__ */ l(p, { variant: "blank", onClick: r, children: e })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
const o = ({ scrollable: i = !0, noBorder: e, header: r, children: c }) => /* @__PURE__ */ s(a, { children: [
|
|
20
|
+
r,
|
|
21
|
+
/* @__PURE__ */ l(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: m(t["multi-select"], {
|
|
25
|
+
[t["multi-select--no-border"]]: e
|
|
26
|
+
}),
|
|
27
|
+
children: /* @__PURE__ */ l(
|
|
28
|
+
"ul",
|
|
29
|
+
{
|
|
30
|
+
className: m(t["multi-select__list"], {
|
|
31
|
+
[t["multi-select__list--scrollable"]]: i
|
|
32
|
+
}),
|
|
33
|
+
id: "multi-select-list",
|
|
34
|
+
children: c
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] });
|
|
40
|
+
o.MultiSelectHeader = d;
|
|
41
|
+
o.MultiSelectItem = u;
|
|
42
|
+
export {
|
|
43
|
+
o as M,
|
|
44
|
+
d as a
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=MultiSelect-CFOkF66G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelect-CFOkF66G.js","sources":["../src/components/MultiSelect/components/MultiSelectHeader.tsx","../src/components/MultiSelect/MultiSelect.tsx"],"sourcesContent":["import styles from 'components/MultiSelect/MultiSelect.module.css';\nimport { Label } from 'components/Label';\nimport { Button } from 'components';\n\nexport interface MultiSelectHeaderProps {\n label: string;\n clearTrigger?: string;\n onClear?: () => void;\n}\n\nexport function MultiSelectHeader({ label, clearTrigger, onClear }: MultiSelectHeaderProps) {\n return (\n <header className={styles['multi-select__header']}>\n <Label htmlFor=\"multi-select-list\">{label}</Label>\n {clearTrigger && (\n <Button variant={'blank'} onClick={onClear}>\n {clearTrigger}\n </Button>\n )}\n </header>\n );\n}\n","import clsx from 'clsx';\n\nimport type { PropsWithChildren, ReactNode } from 'react';\n\nimport styles from './MultiSelect.module.css';\n\nimport { MultiSelectItem } from 'components/MultiSelect/components/MultiSelectItem';\nimport { MultiSelectHeader } from 'components/MultiSelect/components/MultiSelectHeader';\nexport interface MultiSelectProps {\n scrollable?: boolean;\n noBorder?: boolean;\n header?: ReactNode;\n}\n\nexport const MultiSelect = ({ scrollable = true, noBorder, header, children }: PropsWithChildren<MultiSelectProps>) => (\n <>\n {header}\n <div\n className={clsx(styles['multi-select'], {\n [styles['multi-select--no-border']]: noBorder,\n })}\n >\n <ul\n className={clsx(styles['multi-select__list'], {\n [styles['multi-select__list--scrollable']]: scrollable,\n })}\n id=\"multi-select-list\"\n >\n {children}\n </ul>\n </div>\n </>\n);\n\nMultiSelect.MultiSelectHeader = MultiSelectHeader;\nMultiSelect.MultiSelectItem = MultiSelectItem;\n"],"names":["MultiSelectHeader","label","clearTrigger","onClear","jsxs","styles","jsx","Label","Button","MultiSelect","scrollable","noBorder","header","children","Fragment","clsx","MultiSelectItem"],"mappings":";;;;;;;;;;;;AAUO,SAASA,EAAkB,EAAE,OAAAC,GAAO,cAAAC,GAAc,SAAAC,KAAmC;AAC1F,SACG,gBAAAC,EAAA,UAAA,EAAO,WAAWC,EAAO,sBAAsB,GAC9C,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAM,SAAQ,qBAAqB,UAAMN,GAAA;AAAA,IACzCC,KACE,gBAAAI,EAAAE,GAAA,EAAO,SAAS,SAAS,SAASL,GAChC,UACHD,GAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;ACPa,MAAAO,IAAc,CAAC,EAAE,YAAAC,IAAa,IAAM,UAAAC,GAAU,QAAAC,GAAQ,UAAAC,QAE9D,gBAAAT,EAAAU,GAAA,EAAA,UAAA;AAAA,EAAAF;AAAA,EACD,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWS,EAAKV,EAAO,cAAc,GAAG;AAAA,QACtC,CAACA,EAAO,yBAAyB,CAAC,GAAGM;AAAA,MAAA,CACtC;AAAA,MAED,UAAA,gBAAAL;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWS,EAAKV,EAAO,oBAAoB,GAAG;AAAA,YAC5C,CAACA,EAAO,gCAAgC,CAAC,GAAGK;AAAA,UAAA,CAC7C;AAAA,UACD,IAAG;AAAA,UAEF,UAAAG;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF;AAAA,GACF;AAGFJ,EAAY,oBAAoBT;AAChCS,EAAY,kBAAkBO;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as c } from "react";
|
|
3
|
+
import { Checkbox as o } from "./components/Checkbox/Checkbox.js";
|
|
4
|
+
import { Label as n } from "./components/Label/Label.js";
|
|
5
|
+
import './assets/MultiSelectItem.css';const i = {
|
|
6
|
+
"multi-select": "_multi-select_mabi4_1",
|
|
7
|
+
"multi-select--no-border": "_multi-select--no-border_mabi4_7",
|
|
8
|
+
"multi-select__header": "_multi-select__header_mabi4_12",
|
|
9
|
+
"multi-select__list": "_multi-select__list_mabi4_18",
|
|
10
|
+
"multi-select__list--scrollable": "_multi-select__list--scrollable_mabi4_27",
|
|
11
|
+
"multi-select__item-inner": "_multi-select__item-inner_mabi4_32"
|
|
12
|
+
};
|
|
13
|
+
function h({ label: _, value: m, checked: t, onChange: s }) {
|
|
14
|
+
const l = c();
|
|
15
|
+
return /* @__PURE__ */ e("li", { className: i["multi-select__item"], children: /* @__PURE__ */ r("div", { className: i["multi-select__item-inner"], children: [
|
|
16
|
+
/* @__PURE__ */ e(o, { id: l, value: m, checked: t, onChange: s }),
|
|
17
|
+
/* @__PURE__ */ e(n, { htmlFor: l, noFontWeight: !t, children: _ })
|
|
18
|
+
] }) });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
h as M,
|
|
22
|
+
i as s
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=MultiSelectItem-D5q99kfp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectItem-D5q99kfp.js","sources":["../src/components/MultiSelect/components/MultiSelectItem.tsx"],"sourcesContent":["import { useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\n\nimport styles from 'components/MultiSelect/MultiSelect.module.css';\nimport { Checkbox } from 'components/Checkbox';\nimport { Label } from 'components/Label';\n\nexport interface MultiSelectItemProps {\n label: string;\n value: string | number;\n checked: boolean;\n onChange(event: ChangeEvent<HTMLInputElement>): void;\n}\n\nexport function MultiSelectItem({ label, value, checked, onChange }: MultiSelectItemProps) {\n const id = useId();\n\n return (\n <li className={styles['multi-select__item']}>\n <div className={styles['multi-select__item-inner']}>\n <Checkbox id={id} value={value} checked={checked} onChange={onChange} />\n <Label htmlFor={id} noFontWeight={!checked}>\n {label}\n </Label>\n </div>\n </li>\n );\n}\n"],"names":["MultiSelectItem","label","value","checked","onChange","id","useId","jsx","styles","jsxs","Checkbox","Label"],"mappings":";;;;;;;;;;;;AAeO,SAASA,EAAgB,EAAE,OAAAC,GAAO,OAAAC,GAAO,SAAAC,GAAS,UAAAC,KAAkC;AACzF,QAAMC,IAAKC;AAGT,SAAA,gBAAAC,EAAC,MAAG,EAAA,WAAWC,EAAO,oBAAoB,GACxC,UAAA,gBAAAC,EAAC,OAAI,EAAA,WAAWD,EAAO,0BAA0B,GAC/C,UAAA;AAAA,IAAA,gBAAAD,EAACG,GAAS,EAAA,IAAAL,GAAQ,OAAAH,GAAc,SAAAC,GAAkB,UAAAC,GAAoB;AAAA,sBACrEO,GAAM,EAAA,SAASN,GAAI,cAAc,CAACF,GAChC,UACHF,GAAA;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
|
package/dist/assets/Label.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_1b4r9_1{font-weight:var(--semibold);text-align:left}._label--unset-font-weight_1b4r9_6{font-weight:unset}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._multi-
|
|
1
|
+
._multi-select_mabi4_1{border:1px solid var(--color-black);border-radius:var(--border-radius-default);padding:.75rem}._multi-select--no-border_mabi4_7{border:none;padding:0}._multi-select__header_mabi4_12{display:flex;justify-content:space-between;margin-bottom:.5rem}._multi-select__list_mabi4_18{display:flex;flex-direction:column;gap:.5rem;list-style:none;margin:0;padding:0}._multi-select__list--scrollable_mabi4_27{max-height:8.75rem;overflow:auto}._multi-select__item-inner_mabi4_32{align-items:center;display:flex;gap:.75rem}
|
|
@@ -2,7 +2,7 @@ import { InputHTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {
|
|
4
4
|
variant?: 'large';
|
|
5
|
-
type?: 'text' | '
|
|
5
|
+
type?: 'text' | 'password' | 'email';
|
|
6
6
|
id: string;
|
|
7
7
|
clearTrigger?: ReactNode;
|
|
8
8
|
onClear?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.js","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import { forwardRef, useState, useEffect, useRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './InputField.module.css';\n\nexport interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {\n variant?: 'large';\n type?: 'text' | '
|
|
1
|
+
{"version":3,"file":"InputField.js","sources":["../../../src/components/InputField/InputField.tsx"],"sourcesContent":["import { forwardRef, useState, useEffect, useRef } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { InputHTMLAttributes, ReactNode } from 'react';\n\nimport styles from './InputField.module.css';\n\nexport interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {\n variant?: 'large';\n type?: 'text' | 'password' | 'email';\n id: string;\n clearTrigger?: ReactNode;\n onClear?: () => void;\n}\n\nexport const InputField = forwardRef<HTMLInputElement, InputFieldProps>(\n (\n { autoComplete = 'off', id, value, variant, type = 'text', clearTrigger, onClear, ...restProps }: InputFieldProps,\n forwardedRef\n ) => {\n const [clearButtonWidth, setClearButtonWidth] = useState<number>(0);\n const clearButtonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (clearButtonRef.current) {\n setClearButtonWidth(clearButtonRef.current.offsetWidth);\n }\n }, [value]);\n\n const handleClearTriggerClick = () => {\n if (onClear && forwardedRef && 'current' in forwardedRef && forwardedRef.current) {\n onClear();\n forwardedRef.current.focus();\n }\n };\n\n return (\n <div className={styles['input-field-wrapper']}>\n <input\n {...restProps}\n autoComplete={autoComplete}\n ref={forwardedRef}\n id={id}\n className={clsx(styles['input-field'], {\n [styles['input-field--large']]: variant === 'large',\n })}\n type={type}\n value={value}\n style={{ paddingRight: value && clearTrigger ? clearButtonWidth : undefined }}\n />\n {value && clearTrigger && (\n <button\n type=\"button\"\n className={styles['input-field__clear-button']}\n onClick={handleClearTriggerClick}\n ref={clearButtonRef}\n aria-label={`clear trigger for ${id}`}\n >\n {clearTrigger}\n </button>\n )}\n </div>\n );\n }\n);\n"],"names":["InputField","forwardRef","autoComplete","id","value","variant","type","clearTrigger","onClear","restProps","forwardedRef","clearButtonWidth","setClearButtonWidth","useState","clearButtonRef","useRef","useEffect","handleClearTriggerClick","jsxs","styles","jsx","clsx"],"mappings":";;;;;;;;GAeaA,IAAaC;AAAA,EACxB,CACE,EAAE,cAAAC,IAAe,OAAO,IAAAC,GAAI,OAAAC,GAAO,SAAAC,GAAS,MAAAC,IAAO,QAAQ,cAAAC,GAAc,SAAAC,GAAS,GAAGC,EAAA,GACrFC,MACG;AACH,UAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAiB,CAAC,GAC5DC,IAAiBC,EAA0B,IAAI;AAErD,IAAAC,EAAU,MAAM;AACd,MAAIF,EAAe,WACGF,EAAAE,EAAe,QAAQ,WAAW;AAAA,IACxD,GACC,CAACV,CAAK,CAAC;AAEV,UAAMa,IAA0B,MAAM;AACpC,MAAIT,KAAWE,KAAgB,aAAaA,KAAgBA,EAAa,YAC/DF,KACRE,EAAa,QAAQ;IACvB;AAGF,WACG,gBAAAQ,EAAA,OAAA,EAAI,WAAWC,EAAO,qBAAqB,GAC1C,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACE,GAAGX;AAAA,UACJ,cAAAP;AAAA,UACA,KAAKQ;AAAA,UACL,IAAAP;AAAA,UACA,WAAWkB,EAAKF,EAAO,aAAa,GAAG;AAAA,YACrC,CAACA,EAAO,oBAAoB,CAAC,GAAGd,MAAY;AAAA,UAAA,CAC7C;AAAA,UACD,MAAAC;AAAA,UACA,OAAAF;AAAA,UACA,OAAO,EAAE,cAAcA,KAASG,IAAeI,IAAmB,OAAU;AAAA,QAAA;AAAA,MAC9E;AAAA,MACCP,KAASG,KACR,gBAAAa;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAWD,EAAO,2BAA2B;AAAA,UAC7C,SAASF;AAAA,UACT,KAAKH;AAAA,UACL,cAAY,qBAAqBX,CAAE;AAAA,UAElC,UAAAI;AAAA,QAAA;AAAA,MACH;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -8,12 +8,13 @@ import "../Button/Button.js";
|
|
|
8
8
|
import "../OverlayCloseButton/OverlayCloseButton.js";
|
|
9
9
|
import "../IconButton/IconButton.js";
|
|
10
10
|
import "../Input/Input.js";
|
|
11
|
+
import "../../MultiSelect-CFOkF66G.js";
|
|
11
12
|
import "../SelectListbox/SelectListbox.js";
|
|
12
13
|
import "../SelectListbox/SelectProvider.js";
|
|
13
|
-
const
|
|
14
|
+
const C = (t) => {
|
|
14
15
|
const r = t.variant ?? [];
|
|
15
16
|
return { ...t, variant: r.toString() };
|
|
16
|
-
},
|
|
17
|
+
}, E = {
|
|
17
18
|
title: "Atoms/InputField",
|
|
18
19
|
component: l,
|
|
19
20
|
argTypes: {
|
|
@@ -23,7 +24,7 @@ const h = (t) => {
|
|
|
23
24
|
},
|
|
24
25
|
type: {
|
|
25
26
|
control: "radio",
|
|
26
|
-
options: ["text", "
|
|
27
|
+
options: ["text", "password", "email"]
|
|
27
28
|
},
|
|
28
29
|
id: {
|
|
29
30
|
control: "text"
|
|
@@ -43,7 +44,7 @@ const h = (t) => {
|
|
|
43
44
|
return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(
|
|
44
45
|
l,
|
|
45
46
|
{
|
|
46
|
-
...
|
|
47
|
+
...C(t),
|
|
47
48
|
value: r,
|
|
48
49
|
onChange: p,
|
|
49
50
|
onClear: m,
|
|
@@ -54,8 +55,8 @@ const h = (t) => {
|
|
|
54
55
|
type: "text",
|
|
55
56
|
variant: void 0,
|
|
56
57
|
id: "4f9ca77d"
|
|
57
|
-
},
|
|
58
|
-
|
|
58
|
+
}, h = o.bind({});
|
|
59
|
+
h.args = {
|
|
59
60
|
...n
|
|
60
61
|
};
|
|
61
62
|
const v = o.bind({});
|
|
@@ -69,9 +70,9 @@ I.args = {
|
|
|
69
70
|
clearTrigger: /* @__PURE__ */ e(f, { name: "Cross" })
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
h as InputFieldExample,
|
|
73
74
|
I as WithIconClearTrigger,
|
|
74
75
|
v as WithStringClearTrigger,
|
|
75
|
-
|
|
76
|
+
E as default
|
|
76
77
|
};
|
|
77
78
|
//# sourceMappingURL=InputField.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', '
|
|
1
|
+
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon } from 'components';\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;;;AAYA,MAAMA,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC;AACvD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS;AACxD,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,YAAY,OAAO;AAAA,IACvC;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAqC,CAACJ,MAAS;AACnD,QAAM,CAACK,GAAYC,CAAa,IAAIC,EAAmC,EAAE,GACnEC,IAAWC,EAAyB,IAAI,GAExCC,IAAe,CAACC,MAAyC;AAC/C,IAAAL,EAAAK,EAAM,OAAO,KAAK,GAChCC,EAAA,EAAK,cAAc;AAAA,EAAA,GAGfC,IAAc,MAAM;AACxB,IAAAP,EAAc,EAAE,GAChBM,EAAA,EAAK,aAAa;AAAA,EAAA;AAGpB,2BACGE,GACC,EAAA,UAAA,gBAAAC;AAAA,IAACZ;AAAA,IAAA;AAAA,MACE,GAAGJ,EAAcC,CAAI;AAAA,MACtB,OAAOK;AAAA,MACP,UAAUK;AAAA,MACV,SAASG;AAAA,MACT,KAAKL;AAAA,IAAA;AAAA,EAET,EAAA,CAAA;AAEJ,GAEMQ,IAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AACN,GAEaC,IAAoBb,EAAS,KAAK,EAAE;AACjDa,EAAkB,OAAO;AAAA,EACvB,GAAGD;AACL;AAEO,MAAME,IAAyBd,EAAS,KAAK,EAAE;AACtDc,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,cAAc;AAChB;AAEO,MAAMG,IAAuBf,EAAS,KAAK,EAAE;AACpDe,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,cAAc,gBAAAD,EAACK,GAAK,EAAA,MAAK,QAAQ,CAAA;AACnC;"}
|
|
@@ -2,5 +2,6 @@ import { LabelHTMLAttributes } from 'react';
|
|
|
2
2
|
|
|
3
3
|
export interface LabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'className' | 'style'> {
|
|
4
4
|
htmlFor: string;
|
|
5
|
+
noFontWeight?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare const Label: ({ children, htmlFor, ...restProps }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Label: ({ children, htmlFor, noFontWeight, ...restProps }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { c as o } from "../../clsx-DB4S2d7J.js";
|
|
3
|
+
import '../../assets/Label.css';const n = "_label_1b4r9_1", l = {
|
|
4
|
+
label: n,
|
|
5
|
+
"label--unset-font-weight": "_label--unset-font-weight_1b4r9_6"
|
|
6
|
+
}, _ = ({ children: e, htmlFor: t, noFontWeight: s, ...a }) => /* @__PURE__ */ b(
|
|
7
|
+
"label",
|
|
8
|
+
{
|
|
9
|
+
...a,
|
|
10
|
+
htmlFor: t,
|
|
11
|
+
className: o(l.label, {
|
|
12
|
+
[l["label--unset-font-weight"]]: s
|
|
13
|
+
}),
|
|
14
|
+
children: e
|
|
15
|
+
}
|
|
16
|
+
);
|
|
5
17
|
export {
|
|
6
|
-
|
|
18
|
+
_ as Label
|
|
7
19
|
};
|
|
8
20
|
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sources":["../../../src/components/Label/Label.tsx"],"sourcesContent":["import type { LabelHTMLAttributes } from 'react';\n\nimport styles from './Label.module.css';\n\nexport interface LabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'className' | 'style'> {\n htmlFor: string;\n}\n\nexport const Label = ({ children, htmlFor, ...restProps }: LabelProps) => (\n <label
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../../../src/components/Label/Label.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { LabelHTMLAttributes } from 'react';\n\nimport styles from './Label.module.css';\n\nexport interface LabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'className' | 'style'> {\n htmlFor: string;\n noFontWeight?: boolean;\n}\n\nexport const Label = ({ children, htmlFor, noFontWeight, ...restProps }: LabelProps) => (\n <label\n {...restProps}\n htmlFor={htmlFor}\n className={clsx(styles['label'], {\n [styles['label--unset-font-weight']]: noFontWeight,\n })}\n >\n {children}\n </label>\n);\n"],"names":["Label","children","htmlFor","noFontWeight","restProps","jsx","clsx","styles"],"mappings":";;;;;GAWaA,IAAQ,CAAC,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,GAAc,GAAGC,QAC1D,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACE,GAAGD;AAAA,IACJ,SAAAF;AAAA,IACA,WAAWI,EAAKC,EAAO,OAAU;AAAA,MAC/B,CAACA,EAAO,0BAA0B,CAAC,GAAGJ;AAAA,IAAA,CACvC;AAAA,IAEA,UAAAF;AAAA,EAAA;AACH;"}
|
|
@@ -3,3 +3,4 @@ import { LabelProps } from './Label';
|
|
|
3
3
|
declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, LabelProps>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const LabelExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, LabelProps>;
|
|
6
|
+
export declare const WithNoFontWeight: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, LabelProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { Label as t } from "./Label.js";
|
|
3
|
-
const
|
|
3
|
+
const c = {
|
|
4
4
|
title: "Atoms/Label",
|
|
5
5
|
component: t,
|
|
6
6
|
argTypes: {
|
|
@@ -11,13 +11,21 @@ const a = {
|
|
|
11
11
|
control: "text"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
l.args = {
|
|
14
|
+
}, o = (r) => /* @__PURE__ */ n(t, { ...r }), e = {
|
|
16
15
|
children: "Lorem Ipsum",
|
|
17
16
|
htmlFor: "bd79f7ec"
|
|
17
|
+
}, l = o.bind({});
|
|
18
|
+
l.args = {
|
|
19
|
+
...e
|
|
20
|
+
};
|
|
21
|
+
const s = o.bind({});
|
|
22
|
+
s.args = {
|
|
23
|
+
...e,
|
|
24
|
+
noFontWeight: !0
|
|
18
25
|
};
|
|
19
26
|
export {
|
|
20
27
|
l as LabelExample,
|
|
21
|
-
|
|
28
|
+
s as WithNoFontWeight,
|
|
29
|
+
c as default
|
|
22
30
|
};
|
|
23
31
|
//# sourceMappingURL=Label.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.stories.js","sources":["../../../src/components/Label/Label.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { LabelProps } from './Label';\n\nimport { Label } from './Label';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Label',\n component: Label,\n argTypes: {\n htmlFor: {\n control: 'text',\n },\n children: {\n control: 'text',\n },\n },\n} as Meta<LabelProps>;\n\nconst Template: StoryFn<LabelProps> = (args) => <Label {...args} />;\n\nexport const LabelExample = Template.bind({});\nLabelExample.args = {\n
|
|
1
|
+
{"version":3,"file":"Label.stories.js","sources":["../../../src/components/Label/Label.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { LabelProps } from './Label';\n\nimport { Label } from './Label';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Label',\n component: Label,\n argTypes: {\n htmlFor: {\n control: 'text',\n },\n children: {\n control: 'text',\n },\n },\n} as Meta<LabelProps>;\n\nconst Template: StoryFn<LabelProps> = (args) => <Label {...args} />;\n\nconst defaultArgs: Partial<LabelProps> = {\n children: 'Lorem Ipsum',\n htmlFor: 'bd79f7ec',\n};\n\nexport const LabelExample = Template.bind({});\nLabelExample.args = {\n ...defaultArgs,\n};\n\nexport const WithNoFontWeight = Template.bind({});\nWithNoFontWeight.args = {\n ...defaultArgs,\n noFontWeight: true,\n};\n"],"names":["Label_stories","Label","Template","args","jsx","defaultArgs","LabelExample","WithNoFontWeight"],"mappings":";;AAMA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IACX;AAAA,EACF;AACF,GAEMC,IAAgC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAO,GAAGE,EAAM,CAAA,GAE3DE,IAAmC;AAAA,EACvC,UAAU;AAAA,EACV,SAAS;AACX,GAEaC,IAAeJ,EAAS,KAAK,EAAE;AAC5CI,EAAa,OAAO;AAAA,EAClB,GAAGD;AACL;AAEO,MAAME,IAAmBL,EAAS,KAAK,EAAE;AAChDK,EAAiB,OAAO;AAAA,EACtB,GAAGF;AAAA,EACH,cAAc;AAChB;"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { MultiSelectItem } from 'components/MultiSelect/components/MultiSelectItem';
|
|
3
|
+
import { MultiSelectHeader } from 'components/MultiSelect/components/MultiSelectHeader';
|
|
2
4
|
|
|
3
5
|
export interface MultiSelectProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
checked: boolean;
|
|
8
|
-
}>;
|
|
9
|
-
onChange(event: ChangeEvent<HTMLInputElement>): void;
|
|
6
|
+
scrollable?: boolean;
|
|
7
|
+
noBorder?: boolean;
|
|
8
|
+
header?: ReactNode;
|
|
10
9
|
}
|
|
11
|
-
export declare const MultiSelect:
|
|
10
|
+
export declare const MultiSelect: {
|
|
11
|
+
({ scrollable, noBorder, header, children }: PropsWithChildren<MultiSelectProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
MultiSelectHeader: typeof MultiSelectHeader;
|
|
13
|
+
MultiSelectItem: typeof MultiSelectItem;
|
|
14
|
+
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
"multi-select__scroll-container": "_multi-select__scroll-container_1se76_7"
|
|
6
|
-
}, r = ({ items: c, onChange: s }) => /* @__PURE__ */ l("div", { className: t["multi-select"], children: /* @__PURE__ */ l("ul", { className: t["multi-select__scroll-container"], children: c.map((e) => /* @__PURE__ */ l(i, { ...e, onChange: s }, e.label)) }) });
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../clsx-DB4S2d7J.js";
|
|
3
|
+
import "../../MultiSelectItem-D5q99kfp.js";
|
|
4
|
+
import { M as p } from "../../MultiSelect-CFOkF66G.js";
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
p as MultiSelect
|
|
9
7
|
};
|
|
10
8
|
//# sourceMappingURL=MultiSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.js","sources":[
|
|
1
|
+
{"version":3,"file":"MultiSelect.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
1
2
|
import { MultiSelectProps } from './MultiSelect';
|
|
2
3
|
|
|
3
|
-
declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, MultiSelectProps
|
|
4
|
+
declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
|
|
4
5
|
export default _default;
|
|
5
|
-
export declare const MultiSelectExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, MultiSelectProps
|
|
6
|
+
export declare const MultiSelectExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
|
|
7
|
+
export declare const WithHeader: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
|
|
8
|
+
export declare const WithheaderAndWithoutScrollContainerAndBorder: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<MultiSelectProps>>;
|
|
@@ -1,42 +1,81 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { f as
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { f as d } from "../../index-DFUrxrKJ.js";
|
|
3
|
+
import { useState as b } from "react";
|
|
4
|
+
import { M as l } from "../../MultiSelect-CFOkF66G.js";
|
|
5
|
+
import { Container as S } from "../storyComponents/Container/Container.js";
|
|
6
|
+
const T = {
|
|
6
7
|
title: "Organisms/MultiSelect",
|
|
7
|
-
component:
|
|
8
|
+
component: l,
|
|
8
9
|
argTypes: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const [s, i] = u([]);
|
|
13
|
-
return /* @__PURE__ */ c(
|
|
14
|
-
o,
|
|
15
|
-
{
|
|
16
|
-
items: [
|
|
17
|
-
{ label: "Item 1", itemValue: "1" },
|
|
18
|
-
{ label: "Item 2", itemValue: "2" },
|
|
19
|
-
{ label: "Item 3", itemValue: "3" },
|
|
20
|
-
{ label: "Item 4", itemValue: "4" },
|
|
21
|
-
{ label: "Item 5", itemValue: "5" },
|
|
22
|
-
{ label: "Item 6", itemValue: "6" }
|
|
23
|
-
].map(({ label: t, itemValue: e }) => ({
|
|
24
|
-
label: t,
|
|
25
|
-
value: e,
|
|
26
|
-
checked: s.includes(e)
|
|
27
|
-
})),
|
|
28
|
-
onChange: (t) => {
|
|
29
|
-
const { checked: e, value: l } = t.target;
|
|
30
|
-
i((m) => {
|
|
31
|
-
const a = e ? [...m, l] : m.filter((n) => n !== l);
|
|
32
|
-
return r()(a), a;
|
|
33
|
-
});
|
|
10
|
+
header: {
|
|
11
|
+
table: {
|
|
12
|
+
disable: !0
|
|
34
13
|
}
|
|
35
14
|
}
|
|
36
|
-
|
|
37
|
-
},
|
|
15
|
+
}
|
|
16
|
+
}, a = (m) => {
|
|
17
|
+
const [i, n] = b([]), h = [
|
|
18
|
+
{ itemName: "Item 1", itemValue: "1" },
|
|
19
|
+
{ itemName: "Item 2", itemValue: "2" },
|
|
20
|
+
{ itemName: "Item 3", itemValue: "3" },
|
|
21
|
+
{ itemName: "Item 4", itemValue: "4" },
|
|
22
|
+
{ itemName: "Item 5", itemValue: "5" },
|
|
23
|
+
{ itemName: "Item 6", itemValue: "6" }
|
|
24
|
+
], f = () => {
|
|
25
|
+
n([]), d()();
|
|
26
|
+
}, g = (e) => {
|
|
27
|
+
const { checked: t, value: o } = e.target;
|
|
28
|
+
n((s) => {
|
|
29
|
+
const c = t ? [...s, o] : s.filter((I) => I !== o);
|
|
30
|
+
return d()(c), c;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ p(S, { children: [
|
|
34
|
+
m.header && /* @__PURE__ */ r(
|
|
35
|
+
l.MultiSelectHeader,
|
|
36
|
+
{
|
|
37
|
+
label: "Item list",
|
|
38
|
+
clearTrigger: i.length > 0 ? "Clear Selection" : "",
|
|
39
|
+
onClear: f
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ r(l, { ...m, children: h.map(({ itemName: e, itemValue: t }) => /* @__PURE__ */ r(
|
|
43
|
+
l.MultiSelectItem,
|
|
44
|
+
{
|
|
45
|
+
label: e,
|
|
46
|
+
value: t,
|
|
47
|
+
checked: i.includes(t),
|
|
48
|
+
onChange: g
|
|
49
|
+
},
|
|
50
|
+
e
|
|
51
|
+
)) })
|
|
52
|
+
] });
|
|
53
|
+
}, u = {
|
|
54
|
+
scrollable: !0,
|
|
55
|
+
noBorder: !1
|
|
56
|
+
}, C = a.bind({});
|
|
57
|
+
C.args = {
|
|
58
|
+
...u
|
|
59
|
+
};
|
|
60
|
+
const M = a.bind({});
|
|
61
|
+
M.args = {
|
|
62
|
+
...u,
|
|
63
|
+
// boolean is not normal way of adding header but if added after template the rerender logic of
|
|
64
|
+
// storybook would not correctly clear the checkboxes
|
|
65
|
+
header: !0
|
|
66
|
+
};
|
|
67
|
+
const N = a.bind({});
|
|
68
|
+
N.args = {
|
|
69
|
+
scrollable: !1,
|
|
70
|
+
noBorder: !0,
|
|
71
|
+
// boolean is not normal way of adding header but if added after template the rerender logic of
|
|
72
|
+
// storybook would not correctly clear the checkboxes
|
|
73
|
+
header: !0
|
|
74
|
+
};
|
|
38
75
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
76
|
+
C as MultiSelectExample,
|
|
77
|
+
M as WithHeader,
|
|
78
|
+
N as WithheaderAndWithoutScrollContainerAndBorder,
|
|
79
|
+
T as default
|
|
41
80
|
};
|
|
42
81
|
//# sourceMappingURL=MultiSelect.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.stories.js","sources":["../../../src/components/MultiSelect/MultiSelect.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\nimport { useState } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MultiSelectProps } from './MultiSelect';\n\nimport { MultiSelect } from './MultiSelect';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/MultiSelect',\n component: MultiSelect,\n argTypes: {\n
|
|
1
|
+
{"version":3,"file":"MultiSelect.stories.js","sources":["../../../src/components/MultiSelect/MultiSelect.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\nimport { useState } from 'react';\n\nimport type { ChangeEvent, PropsWithChildren } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MultiSelectProps } from './MultiSelect';\n\nimport { MultiSelect } from './MultiSelect';\n\nimport { Container } from 'components/storyComponents/Container';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/MultiSelect',\n component: MultiSelect,\n argTypes: {\n header: {\n table: {\n disable: true,\n },\n },\n },\n} as Meta<PropsWithChildren<MultiSelectProps>>;\n\nconst Template: StoryFn<PropsWithChildren<MultiSelectProps>> = (args) => {\n const [items, setItems] = useState<string[]>([]);\n\n const mockItems = [\n { itemName: 'Item 1', itemValue: '1' },\n { itemName: 'Item 2', itemValue: '2' },\n { itemName: 'Item 3', itemValue: '3' },\n { itemName: 'Item 4', itemValue: '4' },\n { itemName: 'Item 5', itemValue: '5' },\n { itemName: 'Item 6', itemValue: '6' },\n ];\n\n const handleClear = () => {\n setItems([]);\n fn()();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const { checked, value } = event.target;\n setItems((prevState) => {\n const newItems = checked ? [...prevState, value] : prevState.filter((itemValue) => itemValue !== value);\n fn()(newItems);\n return newItems;\n });\n };\n\n return (\n <Container>\n {/* header added under separate boolean arg here for storybook purpose, \n it should be added as direct arg to MultiSelect when used in application */}\n {args.header && (\n <MultiSelect.MultiSelectHeader\n label=\"Item list\"\n clearTrigger={items.length > 0 ? 'Clear Selection' : ''}\n onClear={handleClear}\n />\n )}\n <MultiSelect {...args}>\n {mockItems.map(({ itemName, itemValue }) => (\n <MultiSelect.MultiSelectItem\n key={itemName}\n label={itemName}\n value={itemValue}\n checked={items.includes(itemValue)}\n onChange={handleChange}\n />\n ))}\n </MultiSelect>\n </Container>\n );\n};\n\nconst defaultArgs: Partial<MultiSelectProps> = {\n scrollable: true,\n noBorder: false,\n};\n\nexport const MultiSelectExample = Template.bind({});\nMultiSelectExample.args = {\n ...defaultArgs,\n};\n\nexport const WithHeader = Template.bind({});\nWithHeader.args = {\n ...defaultArgs,\n // boolean is not normal way of adding header but if added after template the rerender logic of\n // storybook would not correctly clear the checkboxes\n header: true,\n};\n\nexport const WithheaderAndWithoutScrollContainerAndBorder = Template.bind({});\nWithheaderAndWithoutScrollContainerAndBorder.args = {\n scrollable: false,\n noBorder: true,\n // boolean is not normal way of adding header but if added after template the rerender logic of\n // storybook would not correctly clear the checkboxes\n header: true,\n};\n"],"names":["MultiSelect_stories","MultiSelect","Template","args","items","setItems","useState","mockItems","handleClear","fn","handleChange","event","checked","value","prevState","newItems","itemValue","Container","jsx","itemName","defaultArgs","MultiSelectExample","WithHeader","WithheaderAndWithoutScrollContainerAndBorder"],"mappings":";;;;;AAYA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF,GAEMC,IAAyD,CAACC,MAAS;AACvE,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAmB,CAAE,CAAA,GAEzCC,IAAY;AAAA,IAChB,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrC,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrC,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrC,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrC,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,IACrC,EAAE,UAAU,UAAU,WAAW,IAAI;AAAA,EAAA,GAGjCC,IAAc,MAAM;AACxB,IAAAH,EAAS,CAAE,CAAA,GACXI,EAAK,EAAA;AAAA,EAAA,GAGDC,IAAe,CAACC,MAAyC;AAC7D,UAAM,EAAE,SAAAC,GAAS,OAAAC,MAAUF,EAAM;AACjC,IAAAN,EAAS,CAACS,MAAc;AACtB,YAAMC,IAAWH,IAAU,CAAC,GAAGE,GAAWD,CAAK,IAAIC,EAAU,OAAO,CAACE,MAAcA,MAAcH,CAAK;AACtGJ,aAAAA,EAAA,EAAKM,CAAQ,GACNA;AAAA,IAAA,CACR;AAAA,EAAA;AAGH,2BACGE,GAGE,EAAA,UAAA;AAAA,IAAAd,EAAK,UACJ,gBAAAe;AAAA,MAACjB,EAAY;AAAA,MAAZ;AAAA,QACC,OAAM;AAAA,QACN,cAAcG,EAAM,SAAS,IAAI,oBAAoB;AAAA,QACrD,SAASI;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,gBAAAU,EAACjB,GAAa,EAAA,GAAGE,GACd,UAAAI,EAAU,IAAI,CAAC,EAAE,UAAAY,GAAU,WAAAH,EAC1B,MAAA,gBAAAE;AAAA,MAACjB,EAAY;AAAA,MAAZ;AAAA,QAEC,OAAOkB;AAAA,QACP,OAAOH;AAAA,QACP,SAASZ,EAAM,SAASY,CAAS;AAAA,QACjC,UAAUN;AAAA,MAAA;AAAA,MAJLS;AAAA,IAMR,CAAA,GACH;AAAA,EACF,EAAA,CAAA;AAEJ,GAEMC,IAAyC;AAAA,EAC7C,YAAY;AAAA,EACZ,UAAU;AACZ,GAEaC,IAAqBnB,EAAS,KAAK,EAAE;AAClDmB,EAAmB,OAAO;AAAA,EACxB,GAAGD;AACL;AAEO,MAAME,IAAapB,EAAS,KAAK,EAAE;AAC1CoB,EAAW,OAAO;AAAA,EAChB,GAAGF;AAAA;AAAA;AAAA,EAGH,QAAQ;AACV;AAEO,MAAMG,IAA+CrB,EAAS,KAAK,EAAE;AAC5EqB,EAA6C,OAAO;AAAA,EAClD,YAAY;AAAA,EACZ,UAAU;AAAA;AAAA;AAAA,EAGV,QAAQ;AACV;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../../MultiSelectItem-D5q99kfp.js";
|
|
3
|
+
import "../../Label/Label.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "../../Button/Button.js";
|
|
6
|
+
import "../../OverlayCloseButton/OverlayCloseButton.js";
|
|
7
|
+
import "../../IconButton/IconButton.js";
|
|
8
|
+
import "../../Input/Input.js";
|
|
9
|
+
import "../../InputField/InputField.js";
|
|
10
|
+
import { a as u } from "../../../MultiSelect-CFOkF66G.js";
|
|
11
|
+
import "../../SelectListbox/SelectListbox.js";
|
|
12
|
+
import "../../SelectListbox/SelectProvider.js";
|
|
13
|
+
export {
|
|
14
|
+
u as MultiSelectHeader
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=MultiSelectHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { M as e } from "../../../MultiSelectItem-D5q99kfp.js";
|
|
4
|
+
import "../../Checkbox/Checkbox.js";
|
|
5
|
+
import "../../Label/Label.js";
|
|
6
|
+
export {
|
|
7
|
+
e as MultiSelectItem
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=MultiSelectItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -9,10 +9,11 @@ import "../OverlayCloseButton/OverlayCloseButton.js";
|
|
|
9
9
|
import "../IconButton/IconButton.js";
|
|
10
10
|
import "../Input/Input.js";
|
|
11
11
|
import "../InputField/InputField.js";
|
|
12
|
+
import "../../MultiSelect-CFOkF66G.js";
|
|
12
13
|
import { Repeater as i } from "../Repeater/Repeater.js";
|
|
13
14
|
import "../SelectListbox/SelectListbox.js";
|
|
14
15
|
import "../SelectListbox/SelectProvider.js";
|
|
15
|
-
const
|
|
16
|
+
const E = {
|
|
16
17
|
title: "Atoms/ProgrammeCard",
|
|
17
18
|
component: t
|
|
18
19
|
}, s = (o) => /* @__PURE__ */ e(n, { size: "large", children: /* @__PURE__ */ e(t, { ...o }) }), l = s.bind({});
|
|
@@ -57,6 +58,6 @@ export {
|
|
|
57
58
|
p as MultiProgrammeCards,
|
|
58
59
|
l as ProgrammeCardExample,
|
|
59
60
|
d as WithComplexContent,
|
|
60
|
-
|
|
61
|
+
E as default
|
|
61
62
|
};
|
|
62
63
|
//# sourceMappingURL=ProgrammeCard.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgrammeCard.stories.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ProgrammeCardProps } from './ProgrammeCard';\n\nimport { ProgrammeCard } from './ProgrammeCard';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon, Repeater } from 'components';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/ProgrammeCard',\n component: ProgrammeCard,\n} as Meta<ProgrammeCardProps>;\n\nconst Template: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <ProgrammeCard {...args} />\n </Container>\n);\n\nexport const ProgrammeCardExample = Template.bind({});\nProgrammeCardExample.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\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 onClick: fn(),\n};\n\nconst MultiProgrammeCardsTemplate: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <Repeater>\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n </Repeater>\n </Container>\n);\n\nexport const MultiProgrammeCards = MultiProgrammeCardsTemplate.bind({});\nMultiProgrammeCards.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\n};\n"],"names":["ProgrammeCard_stories","ProgrammeCard","Template","args","jsx","Container","ProgrammeCardExample","fn","WithComplexContent","jsxs","Repeater","Icon","MultiProgrammeCardsTemplate","MultiProgrammeCards"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProgrammeCard.stories.js","sources":["../../../src/components/ProgrammeCard/ProgrammeCard.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ProgrammeCardProps } from './ProgrammeCard';\n\nimport { ProgrammeCard } from './ProgrammeCard';\n\nimport { Container } from 'components/storyComponents/Container';\nimport { Icon, Repeater } from 'components';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/ProgrammeCard',\n component: ProgrammeCard,\n} as Meta<ProgrammeCardProps>;\n\nconst Template: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <ProgrammeCard {...args} />\n </Container>\n);\n\nexport const ProgrammeCardExample = Template.bind({});\nProgrammeCardExample.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\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 onClick: fn(),\n};\n\nconst MultiProgrammeCardsTemplate: StoryFn<ProgrammeCardProps> = (args) => (\n <Container size=\"large\">\n <Repeater>\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n <ProgrammeCard {...args} />\n </Repeater>\n </Container>\n);\n\nexport const MultiProgrammeCards = MultiProgrammeCardsTemplate.bind({});\nMultiProgrammeCards.args = {\n header: 'This is my header',\n details: 'This is my details',\n onClick: fn(),\n};\n"],"names":["ProgrammeCard_stories","ProgrammeCard","Template","args","jsx","Container","ProgrammeCardExample","fn","WithComplexContent","jsxs","Repeater","Icon","MultiProgrammeCardsTemplate","MultiProgrammeCards"],"mappings":";;;;;;;;;;;;;;;AAWA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AACb,GAEMC,IAAwC,CAACC,MAC5C,gBAAAC,EAAAC,GAAA,EAAU,MAAK,SACd,UAAC,gBAAAD,EAAAH,GAAA,EAAe,GAAGE,EAAM,CAAA,EAC3B,CAAA,GAGWG,IAAuBJ,EAAS,KAAK,EAAE;AACpDI,EAAqB,OAAO;AAAA,EAC1B,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAASC,EAAG;AACd;AAEO,MAAMC,IAAqBN,EAAS,KAAK,EAAE;AAClDM,EAAmB,OAAO;AAAA,EACxB,QACG,gBAAAC,EAAAC,GAAA,EAAS,eAAc,OAAM,KAAI,OAChC,UAAA;AAAA,IAAA,gBAAAN,EAACO,GAAK,EAAA,MAAK,YAAW,MAAM,IAAI;AAAA,sBAC/B,MAAG,EAAA,OAAO,EAAE,QAAQ,KAAK,UAAiB,qBAAA;AAAA,EAAA,GAC7C;AAAA,EAEF,SACG,gBAAAF,EAAAC,GAAA,EAAS,eAAc,OAAM,KAAI,OAChC,UAAA;AAAA,IAAC,gBAAAD,EAAAC,GAAA,EAAS,eAAc,OACtB,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EAAK,MAAK,YAAY,CAAA;AAAA,MAAE;AAAA,IAAA,GAE3B;AAAA,IACA,gBAAAF,EAACC,GAAS,EAAA,eAAc,OACtB,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EAAK,MAAK,QAAQ,CAAA;AAAA,MAAE;AAAA,IAAA,GAEvB;AAAA,IACA,gBAAAF,EAACC,GAAS,EAAA,eAAc,OACtB,UAAA;AAAA,MAAC,gBAAAN,EAAAO,GAAA,EAAK,MAAK,WAAW,CAAA;AAAA,MAAE;AAAA,IAAA,GAE1B;AAAA,EAAA,GACF;AAAA,EAEF,SAASJ,EAAG;AACd;AAEA,MAAMK,IAA2D,CAACT,MAChE,gBAAAC,EAACC,KAAU,MAAK,SACd,4BAACK,GACC,EAAA,UAAA;AAAA,EAAC,gBAAAN,EAAAH,GAAA,EAAe,GAAGE,GAAM;AAAA,EACzB,gBAAAC,EAACH,GAAe,EAAA,GAAGE,GAAM;AAAA,EACzB,gBAAAC,EAACH,GAAe,EAAA,GAAGE,GAAM;AAAA,EAC3B,CAAA,EACF,CAAA,GAGWU,IAAsBD,EAA4B,KAAK,EAAE;AACtEC,EAAoB,OAAO;AAAA,EACzB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAASN,EAAG;AACd;"}
|
|
@@ -19,7 +19,6 @@ export * from './MenuLink';
|
|
|
19
19
|
export * from './MetaDataList';
|
|
20
20
|
export * from './ModalDialog';
|
|
21
21
|
export * from './MultiSelect';
|
|
22
|
-
export * from './MultiSelectItem';
|
|
23
22
|
export * from './OverlayCloseButton';
|
|
24
23
|
export * from './ProgrammeCard';
|
|
25
24
|
export * from './RadioButton';
|
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Accordion as t } from "./Accordion/Accordion.js";
|
|
2
2
|
import { AppStatusBar as p } from "./AppStatusBar/AppStatusBar.js";
|
|
3
3
|
import { Attention as f } from "./Attention/Attention.js";
|
|
4
|
-
import { Backdrop as
|
|
4
|
+
import { Backdrop as a } from "./Backdrop/Backdrop.js";
|
|
5
5
|
import { Button as n } from "./Button/Button.js";
|
|
6
6
|
import { ButtonGroup as u } from "./ButtonGroup/ButtonGroup.js";
|
|
7
7
|
import { Card as d } from "./Card/Card.js";
|
|
@@ -18,23 +18,22 @@ import { Label as G } from "./Label/Label.js";
|
|
|
18
18
|
import { M as N } from "../MenuLink-CLEqkVVh.js";
|
|
19
19
|
import { MetaDataList as T } from "./MetaDataList/MetaDataList.js";
|
|
20
20
|
import { ModalDialog as q } from "./ModalDialog/ModalDialog.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { Tooltip as lo } from "./Tooltip/Tooltip.js";
|
|
21
|
+
import { M as E } from "../MultiSelect-CFOkF66G.js";
|
|
22
|
+
import { OverlayCloseButton as K } from "./OverlayCloseButton/OverlayCloseButton.js";
|
|
23
|
+
import { ProgrammeCard as U } from "./ProgrammeCard/ProgrammeCard.js";
|
|
24
|
+
import { RadioButton as W } from "./RadioButton/RadioButton.js";
|
|
25
|
+
import { Repeater as Y } from "./Repeater/Repeater.js";
|
|
26
|
+
import { SectionNotification as _ } from "./SectionNotification/SectionNotification.js";
|
|
27
|
+
import { SelectListbox as oo } from "./SelectListbox/SelectListbox.js";
|
|
28
|
+
import { SelectProvider as to, useSelect as eo } from "./SelectListbox/SelectProvider.js";
|
|
29
|
+
import { Spinner as mo } from "./Spinner/Spinner.js";
|
|
30
|
+
import { StatusPill as xo } from "./StatusPill/StatusPill.js";
|
|
31
|
+
import { Tooltip as io } from "./Tooltip/Tooltip.js";
|
|
33
32
|
export {
|
|
34
33
|
t as Accordion,
|
|
35
34
|
p as AppStatusBar,
|
|
36
35
|
f as Attention,
|
|
37
|
-
|
|
36
|
+
a as Backdrop,
|
|
38
37
|
n as Button,
|
|
39
38
|
u as ButtonGroup,
|
|
40
39
|
d as Card,
|
|
@@ -52,17 +51,16 @@ export {
|
|
|
52
51
|
T as MetaDataList,
|
|
53
52
|
q as ModalDialog,
|
|
54
53
|
E as MultiSelect,
|
|
55
|
-
K as
|
|
56
|
-
U as
|
|
57
|
-
W as
|
|
58
|
-
Y as
|
|
59
|
-
_ as
|
|
60
|
-
oo as
|
|
61
|
-
to as
|
|
62
|
-
|
|
63
|
-
xo as
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
mo as useSelect
|
|
54
|
+
K as OverlayCloseButton,
|
|
55
|
+
U as ProgrammeCard,
|
|
56
|
+
W as RadioButton,
|
|
57
|
+
Y as Repeater,
|
|
58
|
+
_ as SectionNotification,
|
|
59
|
+
oo as SelectListbox,
|
|
60
|
+
to as SelectProvider,
|
|
61
|
+
mo as Spinner,
|
|
62
|
+
xo as StatusPill,
|
|
63
|
+
io as Tooltip,
|
|
64
|
+
eo as useSelect
|
|
67
65
|
};
|
|
68
66
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Accordion as t } from "./components/Accordion/Accordion.js";
|
|
2
2
|
import { AppStatusBar as p } from "./components/AppStatusBar/AppStatusBar.js";
|
|
3
3
|
import { Attention as f } from "./components/Attention/Attention.js";
|
|
4
|
-
import { Backdrop as
|
|
4
|
+
import { Backdrop as a } from "./components/Backdrop/Backdrop.js";
|
|
5
5
|
import { Button as n } from "./components/Button/Button.js";
|
|
6
6
|
import { ButtonGroup as u } from "./components/ButtonGroup/ButtonGroup.js";
|
|
7
7
|
import { Card as d } from "./components/Card/Card.js";
|
|
@@ -18,23 +18,22 @@ import { Label as G } from "./components/Label/Label.js";
|
|
|
18
18
|
import { M as N } from "./MenuLink-CLEqkVVh.js";
|
|
19
19
|
import { MetaDataList as T } from "./components/MetaDataList/MetaDataList.js";
|
|
20
20
|
import { ModalDialog as q } from "./components/ModalDialog/ModalDialog.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { Tooltip as lo } from "./components/Tooltip/Tooltip.js";
|
|
21
|
+
import { M as E } from "./MultiSelect-CFOkF66G.js";
|
|
22
|
+
import { OverlayCloseButton as K } from "./components/OverlayCloseButton/OverlayCloseButton.js";
|
|
23
|
+
import { ProgrammeCard as U } from "./components/ProgrammeCard/ProgrammeCard.js";
|
|
24
|
+
import { RadioButton as W } from "./components/RadioButton/RadioButton.js";
|
|
25
|
+
import { Repeater as Y } from "./components/Repeater/Repeater.js";
|
|
26
|
+
import { SectionNotification as _ } from "./components/SectionNotification/SectionNotification.js";
|
|
27
|
+
import { SelectListbox as oo } from "./components/SelectListbox/SelectListbox.js";
|
|
28
|
+
import { SelectProvider as to, useSelect as eo } from "./components/SelectListbox/SelectProvider.js";
|
|
29
|
+
import { Spinner as mo } from "./components/Spinner/Spinner.js";
|
|
30
|
+
import { StatusPill as xo } from "./components/StatusPill/StatusPill.js";
|
|
31
|
+
import { Tooltip as io } from "./components/Tooltip/Tooltip.js";
|
|
33
32
|
export {
|
|
34
33
|
t as Accordion,
|
|
35
34
|
p as AppStatusBar,
|
|
36
35
|
f as Attention,
|
|
37
|
-
|
|
36
|
+
a as Backdrop,
|
|
38
37
|
n as Button,
|
|
39
38
|
u as ButtonGroup,
|
|
40
39
|
d as Card,
|
|
@@ -52,17 +51,16 @@ export {
|
|
|
52
51
|
T as MetaDataList,
|
|
53
52
|
q as ModalDialog,
|
|
54
53
|
E as MultiSelect,
|
|
55
|
-
K as
|
|
56
|
-
U as
|
|
57
|
-
W as
|
|
58
|
-
Y as
|
|
59
|
-
_ as
|
|
60
|
-
oo as
|
|
61
|
-
to as
|
|
62
|
-
|
|
63
|
-
xo as
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
mo as useSelect
|
|
54
|
+
K as OverlayCloseButton,
|
|
55
|
+
U as ProgrammeCard,
|
|
56
|
+
W as RadioButton,
|
|
57
|
+
Y as Repeater,
|
|
58
|
+
_ as SectionNotification,
|
|
59
|
+
oo as SelectListbox,
|
|
60
|
+
to as SelectProvider,
|
|
61
|
+
mo as Spinner,
|
|
62
|
+
xo as StatusPill,
|
|
63
|
+
io as Tooltip,
|
|
64
|
+
eo as useSelect
|
|
67
65
|
};
|
|
68
66
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._multi-select_1se76_1{border:1px solid var(--color-black);border-radius:var(--border-radius-default);padding:.75rem}._multi-select__scroll-container_1se76_7{list-style:none;margin:0;max-height:8.75rem;overflow:auto;padding:0}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { useId as _ } from "react";
|
|
3
|
-
import { Checkbox as c } from "../Checkbox/Checkbox.js";
|
|
4
|
-
import { Label as n } from "../Label/Label.js";
|
|
5
|
-
import '../../assets/MultiSelectItem.css';const i = {
|
|
6
|
-
"multi-select__item": "_multi-select__item_2oogm_1",
|
|
7
|
-
"multi-select__item-inner": "_multi-select__item-inner_2oogm_9"
|
|
8
|
-
};
|
|
9
|
-
function h({ label: m, value: l, checked: o, onChange: r }) {
|
|
10
|
-
const t = _();
|
|
11
|
-
return /* @__PURE__ */ e("li", { className: i["multi-select__item"], children: /* @__PURE__ */ s("div", { className: i["multi-select__item-inner"], children: [
|
|
12
|
-
/* @__PURE__ */ e(c, { id: t, value: l, checked: o, onChange: r }),
|
|
13
|
-
/* @__PURE__ */ e(n, { htmlFor: t, children: m })
|
|
14
|
-
] }) });
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
h as MultiSelectItem
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=MultiSelectItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectItem.js","sources":["../../../src/components/MultiSelectItem/MultiSelectItem.tsx"],"sourcesContent":["import { useId } from 'react';\n\nimport type { ChangeEvent } from 'react';\n\nimport styles from './MultiSelectItem.module.css';\n\nimport { Checkbox } from 'components/Checkbox';\nimport { Label } from 'components/Label';\n\nexport interface MultiSelectItemProps {\n label: string;\n value: string | number;\n checked: boolean;\n onChange(event: ChangeEvent<HTMLInputElement>): void;\n}\n\nexport function MultiSelectItem({ label, value, checked, onChange }: MultiSelectItemProps) {\n const id = useId();\n\n return (\n <li className={styles['multi-select__item']}>\n <div className={styles['multi-select__item-inner']}>\n <Checkbox id={id} value={value} checked={checked} onChange={onChange} />\n <Label htmlFor={id}>{label}</Label>\n </div>\n </li>\n );\n}\n"],"names":["MultiSelectItem","label","value","checked","onChange","id","useId","jsx","styles","jsxs","Checkbox","Label"],"mappings":";;;;;;;;AAgBO,SAASA,EAAgB,EAAE,OAAAC,GAAO,OAAAC,GAAO,SAAAC,GAAS,UAAAC,KAAkC;AACzF,QAAMC,IAAKC;AAGT,SAAA,gBAAAC,EAAC,MAAG,EAAA,WAAWC,EAAO,oBAAoB,GACxC,UAAA,gBAAAC,EAAC,OAAI,EAAA,WAAWD,EAAO,0BAA0B,GAC/C,UAAA;AAAA,IAAA,gBAAAD,EAACG,GAAS,EAAA,IAAAL,GAAQ,OAAAH,GAAc,SAAAC,GAAkB,UAAAC,GAAoB;AAAA,IACrE,gBAAAG,EAAAI,GAAA,EAAM,SAASN,GAAK,UAAMJ,GAAA;AAAA,EAAA,EAC7B,CAAA,EACF,CAAA;AAEJ;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { MultiSelectItemProps } from './MultiSelectItem';
|
|
2
|
-
|
|
3
|
-
declare const _default: import('@storybook/types').ComponentAnnotations<import('@storybook/react').ReactRenderer, MultiSelectItemProps>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const MultiSelectItemExample: import('@storybook/types').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, MultiSelectItemProps>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { f as m } from "../../index-DFUrxrKJ.js";
|
|
3
|
-
import { MultiSelectItem as e } from "./MultiSelectItem.js";
|
|
4
|
-
const u = {
|
|
5
|
-
title: "Molecules/MultiSelectItem",
|
|
6
|
-
component: e
|
|
7
|
-
}, o = (t) => /* @__PURE__ */ l(e, { ...t }), i = o.bind({});
|
|
8
|
-
i.args = {
|
|
9
|
-
label: "Example MultiSelectItem",
|
|
10
|
-
value: "Value MultiSelectItem",
|
|
11
|
-
onChange: m()
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
i as MultiSelectItemExample,
|
|
15
|
-
u as default
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=MultiSelectItem.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectItem.stories.js","sources":["../../../src/components/MultiSelectItem/MultiSelectItem.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MultiSelectItemProps } from './MultiSelectItem';\n\nimport { MultiSelectItem } from './MultiSelectItem';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/MultiSelectItem',\n component: MultiSelectItem,\n} as Meta<MultiSelectItemProps>;\n\nconst Template: StoryFn<MultiSelectItemProps> = (args) => <MultiSelectItem {...args} />;\n\nexport const MultiSelectItemExample = Template.bind({});\nMultiSelectItemExample.args = {\n label: 'Example MultiSelectItem',\n value: 'Value MultiSelectItem',\n onChange: fn(),\n};\n"],"names":["MultiSelectItem_stories","MultiSelectItem","Template","args","jsx","MultiSelectItemExample","fn"],"mappings":";;;AAQA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AACb,GAEMC,IAA0C,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAiB,GAAGE,EAAM,CAAA,GAExEE,IAAyBH,EAAS,KAAK,EAAE;AACtDG,EAAuB,OAAO;AAAA,EAC5B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAUC,EAAG;AACf;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MultiSelectItem';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
File without changes
|