@uva-glass/component-library 1.31.1 → 1.32.0

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.
Files changed (44) hide show
  1. package/dist/MultiSelect-CFOkF66G.js +46 -0
  2. package/dist/MultiSelect-CFOkF66G.js.map +1 -0
  3. package/dist/MultiSelectItem-D5q99kfp.js +24 -0
  4. package/dist/MultiSelectItem-D5q99kfp.js.map +1 -0
  5. package/dist/assets/Label.css +1 -1
  6. package/dist/assets/MultiSelectItem.css +1 -1
  7. package/dist/components/InputField/InputField.stories.js +3 -2
  8. package/dist/components/InputField/InputField.stories.js.map +1 -1
  9. package/dist/components/Label/Label.d.ts +2 -1
  10. package/dist/components/Label/Label.js +17 -5
  11. package/dist/components/Label/Label.js.map +1 -1
  12. package/dist/components/Label/Label.stories.d.ts +1 -0
  13. package/dist/components/Label/Label.stories.js +13 -5
  14. package/dist/components/Label/Label.stories.js.map +1 -1
  15. package/dist/components/MultiSelect/MultiSelect.d.ts +11 -8
  16. package/dist/components/MultiSelect/MultiSelect.js +5 -7
  17. package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
  18. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +5 -2
  19. package/dist/components/MultiSelect/MultiSelect.stories.js +74 -35
  20. package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
  21. package/dist/components/MultiSelect/components/MultiSelectHeader.d.ts +6 -0
  22. package/dist/components/MultiSelect/components/MultiSelectHeader.js +16 -0
  23. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -0
  24. package/dist/components/MultiSelect/components/MultiSelectItem.js +9 -0
  25. package/dist/components/MultiSelect/components/MultiSelectItem.js.map +1 -0
  26. package/dist/components/MultiSelect/index.js +1 -1
  27. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -2
  28. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  29. package/dist/components/index.d.ts +0 -1
  30. package/dist/components/index.js +24 -26
  31. package/dist/components/index.js.map +1 -1
  32. package/dist/index.js +24 -26
  33. package/dist/index.js.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/assets/MultiSelect.css +0 -1
  36. package/dist/components/MultiSelectItem/MultiSelectItem.js +0 -19
  37. package/dist/components/MultiSelectItem/MultiSelectItem.js.map +0 -1
  38. package/dist/components/MultiSelectItem/MultiSelectItem.stories.d.ts +0 -5
  39. package/dist/components/MultiSelectItem/MultiSelectItem.stories.js +0 -17
  40. package/dist/components/MultiSelectItem/MultiSelectItem.stories.js.map +0 -1
  41. package/dist/components/MultiSelectItem/index.d.ts +0 -1
  42. package/dist/components/MultiSelectItem/index.js +0 -5
  43. package/dist/components/MultiSelectItem/index.js.map +0 -1
  44. /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;"}
@@ -1 +1 @@
1
- ._label_18mqr_1{font-weight:var(--semibold);text-align:left}
1
+ ._label_1b4r9_1{font-weight:var(--semibold);text-align:left}._label--unset-font-weight_1b4r9_6{font-weight:unset}
@@ -1 +1 @@
1
- ._multi-select__item_2oogm_1{list-style:none}._multi-select__item_2oogm_1+._multi-select__item_2oogm_1{margin-top:.5rem}._multi-select__item-inner_2oogm_9{align-items:center;display:flex;gap:.75rem}
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}
@@ -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
14
  const h = (t) => {
14
15
  const r = t.variant ?? [];
15
16
  return { ...t, variant: r.toString() };
16
- }, w = {
17
+ }, E = {
17
18
  title: "Atoms/InputField",
18
19
  component: l,
19
20
  argTypes: {
@@ -72,6 +73,6 @@ export {
72
73
  C as InputFieldExample,
73
74
  I as WithIconClearTrigger,
74
75
  v as WithStringClearTrigger,
75
- w as default
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', 'search', '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,UAAU,YAAY,OAAO;AAAA,IACjD;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;"}
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', 'search', '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,UAAU,YAAY,OAAO;AAAA,IACjD;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 s } from "react/jsx-runtime";
2
- import '../../assets/Label.css';const b = "_label_18mqr_1", o = {
3
- label: b
4
- }, c = ({ children: l, htmlFor: e, ...a }) => /* @__PURE__ */ s("label", { ...a, htmlFor: e, className: o.label, children: l });
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
- c as Label
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 {...restProps} htmlFor={htmlFor} className={styles['label']}>\n {children}\n </label>\n);\n"],"names":["Label","children","htmlFor","restProps","jsx","styles"],"mappings":";;;GAQaA,IAAQ,CAAC,EAAE,UAAAC,GAAU,SAAAC,GAAS,GAAGC,EAAU,MACrD,gBAAAC,EAAA,SAAA,EAAO,GAAGD,GAAW,SAAAD,GAAkB,WAAWG,EAAO,OACvD,UAAAJ,EACH,CAAA;"}
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 o } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import { Label as t } from "./Label.js";
3
- const a = {
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
- }, r = (e) => /* @__PURE__ */ o(t, { ...e }), l = r.bind({});
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
- a as default
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 children: 'Lorem Ipsum',\n htmlFor: 'bd79f7ec',\n};\n"],"names":["Label_stories","Label","Template","args","jsx","LabelExample"],"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,GAEpDE,IAAeH,EAAS,KAAK,EAAE;AAC5CG,EAAa,OAAO;AAAA,EAClB,UAAU;AAAA,EACV,SAAS;AACX;"}
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 { ChangeEvent } from 'react';
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
- items: Array<{
5
- label: string;
6
- value: string | number;
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: ({ items, onChange }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
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 { jsx as l } from "react/jsx-runtime";
2
- import { MultiSelectItem as i } from "../MultiSelectItem/MultiSelectItem.js";
3
- import '../../assets/MultiSelect.css';const t = {
4
- "multi-select": "_multi-select_1se76_1",
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
- r as MultiSelect
6
+ p as MultiSelect
9
7
  };
10
8
  //# sourceMappingURL=MultiSelect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect.js","sources":["../../../src/components/MultiSelect/MultiSelect.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react';\n\nimport styles from './MultiSelect.module.css';\n\nimport { MultiSelectItem } from 'components/MultiSelectItem';\n\nexport interface MultiSelectProps {\n items: Array<{\n label: string;\n value: string | number;\n checked: boolean;\n }>;\n onChange(event: ChangeEvent<HTMLInputElement>): void;\n}\n\nexport const MultiSelect = ({ items, onChange }: MultiSelectProps) => (\n <div className={styles['multi-select']}>\n <ul className={styles['multi-select__scroll-container']}>\n {items.map((item) => (\n <MultiSelectItem key={item.label} {...item} onChange={onChange} />\n ))}\n </ul>\n </div>\n);\n"],"names":["MultiSelect","items","onChange","jsx","styles","item","MultiSelectItem"],"mappings":";;;;;GAeaA,IAAc,CAAC,EAAE,OAAAC,GAAO,UAAAC,EAAS,MAC3C,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,cAAc,GACnC,4BAAC,MAAG,EAAA,WAAWA,EAAO,gCAAgC,GACnD,UAAAH,EAAM,IAAI,CAACI,MACT,gBAAAF,EAAAG,GAAA,EAAkC,GAAGD,GAAM,UAAAH,EAAtB,GAAAG,EAAK,KAAqC,CACjE,GACH,EACF,CAAA;"}
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 c } from "react/jsx-runtime";
2
- import { f as r } from "../../index-DFUrxrKJ.js";
3
- import { useState as u } from "react";
4
- import { MultiSelect as o } from "./MultiSelect.js";
5
- const h = {
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: o,
8
+ component: l,
8
9
  argTypes: {
9
- onChange: { action: "changed" }
10
- }
11
- }, I = () => {
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
- }, V = I.bind({});
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
- V as MultiSelectExample,
40
- h as default
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 onChange: { action: 'changed' },\n },\n} as Meta<MultiSelectProps>;\n\nconst Template: StoryFn<MultiSelectProps> = () => {\n const [items, setItems] = useState<string[]>([]);\n\n const mockItems = [\n { label: 'Item 1', itemValue: '1' },\n { label: 'Item 2', itemValue: '2' },\n { label: 'Item 3', itemValue: '3' },\n { label: 'Item 4', itemValue: '4' },\n { label: 'Item 5', itemValue: '5' },\n { label: 'Item 6', itemValue: '6' },\n ];\n\n return (\n <MultiSelect\n items={mockItems.map(({ label, itemValue }) => ({\n label,\n value: itemValue,\n checked: items.includes(itemValue),\n }))}\n onChange={(event) => {\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 );\n};\n\nexport const MultiSelectExample = Template.bind({});\n"],"names":["MultiSelect_stories","MultiSelect","Template","items","setItems","useState","jsx","label","itemValue","event","checked","value","prevState","newItems","fn","MultiSelectExample"],"mappings":";;;;AASA,MAAeA,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,UAAU,EAAE,QAAQ,UAAU;AAAA,EAChC;AACF,GAEMC,IAAsC,MAAM;AAChD,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAmB,CAAE,CAAA;AAY7C,SAAA,gBAAAC;AAAA,IAACL;AAAA,IAAA;AAAA,MACC,OAXc;AAAA,QAChB,EAAE,OAAO,UAAU,WAAW,IAAI;AAAA,QAClC,EAAE,OAAO,UAAU,WAAW,IAAI;AAAA,QAClC,EAAE,OAAO,UAAU,WAAW,IAAI;AAAA,QAClC,EAAE,OAAO,UAAU,WAAW,IAAI;AAAA,QAClC,EAAE,OAAO,UAAU,WAAW,IAAI;AAAA,QAClC,EAAE,OAAO,UAAU,WAAW,IAAI;AAAA,MAAA,EAKf,IAAI,CAAC,EAAE,OAAAM,GAAO,WAAAC,SAAiB;AAAA,QAC9C,OAAAD;AAAA,QACA,OAAOC;AAAA,QACP,SAASL,EAAM,SAASK,CAAS;AAAA,MAAA,EACjC;AAAA,MACF,UAAU,CAACC,MAAU;AACnB,cAAM,EAAE,SAAAC,GAAS,OAAAC,MAAUF,EAAM;AACjC,QAAAL,EAAS,CAACQ,MAAc;AACtB,gBAAMC,IAAWH,IAAU,CAAC,GAAGE,GAAWD,CAAK,IAAIC,EAAU,OAAO,CAACJ,MAAcA,MAAcG,CAAK;AACtGG,iBAAAA,EAAA,EAAKD,CAAQ,GACNA;AAAA,QAAA,CACR;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaE,IAAqBb,EAAS,KAAK,CAAE,CAAA;"}
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,6 @@
1
+ export interface MultiSelectHeaderProps {
2
+ label: string;
3
+ clearTrigger?: string;
4
+ onClear?: () => void;
5
+ }
6
+ export declare function MultiSelectHeader({ label, clearTrigger, onClear }: MultiSelectHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -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":";;;;;"}
@@ -1,4 +1,4 @@
1
- import { MultiSelect as l } from "./MultiSelect.js";
1
+ import { M as l } from "../../MultiSelect-CFOkF66G.js";
2
2
  export {
3
3
  l as MultiSelect
4
4
  };
@@ -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 j = {
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
- j as default
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":";;;;;;;;;;;;;;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;"}
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';
@@ -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 i } from "./Backdrop/Backdrop.js";
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 { MultiSelect as E } from "./MultiSelect/MultiSelect.js";
22
- import { MultiSelectItem as K } from "./MultiSelectItem/MultiSelectItem.js";
23
- import { OverlayCloseButton as U } from "./OverlayCloseButton/OverlayCloseButton.js";
24
- import { ProgrammeCard as W } from "./ProgrammeCard/ProgrammeCard.js";
25
- import { RadioButton as Y } from "./RadioButton/RadioButton.js";
26
- import { Repeater as _ } from "./Repeater/Repeater.js";
27
- import { SectionNotification as oo } from "./SectionNotification/SectionNotification.js";
28
- import { SelectListbox as to } from "./SelectListbox/SelectListbox.js";
29
- import { SelectProvider as po, useSelect as mo } from "./SelectListbox/SelectProvider.js";
30
- import { Spinner as xo } from "./Spinner/Spinner.js";
31
- import { StatusPill as ao } from "./StatusPill/StatusPill.js";
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
- i as Backdrop,
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 MultiSelectItem,
56
- U as OverlayCloseButton,
57
- W as ProgrammeCard,
58
- Y as RadioButton,
59
- _ as Repeater,
60
- oo as SectionNotification,
61
- to as SelectListbox,
62
- po as SelectProvider,
63
- xo as Spinner,
64
- ao as StatusPill,
65
- lo as Tooltip,
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 i } from "./components/Backdrop/Backdrop.js";
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 { MultiSelect as E } from "./components/MultiSelect/MultiSelect.js";
22
- import { MultiSelectItem as K } from "./components/MultiSelectItem/MultiSelectItem.js";
23
- import { OverlayCloseButton as U } from "./components/OverlayCloseButton/OverlayCloseButton.js";
24
- import { ProgrammeCard as W } from "./components/ProgrammeCard/ProgrammeCard.js";
25
- import { RadioButton as Y } from "./components/RadioButton/RadioButton.js";
26
- import { Repeater as _ } from "./components/Repeater/Repeater.js";
27
- import { SectionNotification as oo } from "./components/SectionNotification/SectionNotification.js";
28
- import { SelectListbox as to } from "./components/SelectListbox/SelectListbox.js";
29
- import { SelectProvider as po, useSelect as mo } from "./components/SelectListbox/SelectProvider.js";
30
- import { Spinner as xo } from "./components/Spinner/Spinner.js";
31
- import { StatusPill as ao } from "./components/StatusPill/StatusPill.js";
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
- i as Backdrop,
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 MultiSelectItem,
56
- U as OverlayCloseButton,
57
- W as ProgrammeCard,
58
- Y as RadioButton,
59
- _ as Repeater,
60
- oo as SectionNotification,
61
- to as SelectListbox,
62
- po as SelectProvider,
63
- xo as Spinner,
64
- ao as StatusPill,
65
- lo as Tooltip,
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
@@ -2,7 +2,7 @@
2
2
  "name": "@uva-glass/component-library",
3
3
  "author": "Team Glass - Frontend vrienden",
4
4
  "private": false,
5
- "version": "1.31.1",
5
+ "version": "1.32.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -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,5 +0,0 @@
1
- import { MultiSelectItem as l } from "./MultiSelectItem.js";
2
- export {
3
- l as MultiSelectItem
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}