@uva-glass/component-library 3.26.2 → 3.26.3

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.
@@ -16,12 +16,13 @@ export interface CheckboxButtonBarProps {
16
16
  notValidated?: boolean;
17
17
  /** error text to display under the bar */
18
18
  notValidatedText?: string;
19
+ /** returns an array with only one value */
20
+ actAsRadioButtonBar?: boolean;
19
21
  /** optional footer text */
20
22
  footerText?: string;
21
23
  /** disables all checkboxes in the bar */
22
24
  disableGroup?: boolean;
23
25
  onSetValues: (value: string[]) => void;
24
26
  }
25
- /** Represents a component that shows a collection of [CheckboxButton](/story/atoms-checkboxbutton--checkbox-button-example)s. */
26
- export declare const CheckboxButtonBar: ({ checkboxes, defaultValues, label, labelPosition, required, notValidated, notValidatedText, footerText, disableGroup, onSetValues, }: CheckboxButtonBarProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const CheckboxButtonBar: ({ checkboxes, defaultValues, label, labelPosition, required, notValidated, notValidatedText, actAsRadioButtonBar, footerText, disableGroup, onSetValues, }: CheckboxButtonBarProps) => import("react/jsx-runtime").JSX.Element;
27
28
  export {};
@@ -1,9 +1,9 @@
1
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
- import { useState as w } from "react";
3
- import { c as i } from "../../clsx-OuTLNxxd.js";
4
- import { Label as B } from "../Label/Label.js";
5
- import { FeedbackBox as C } from "../FeedbackBox/FeedbackBox.js";
6
- import { ControlsButton as N } from "../ControlsButton/ControlsButton.js";
1
+ import { jsxs as u, jsx as c } from "react/jsx-runtime";
2
+ import { useState as C } from "react";
3
+ import { c as k } from "../../clsx-OuTLNxxd.js";
4
+ import { Label as N } from "../Label/Label.js";
5
+ import { FeedbackBox as g } from "../FeedbackBox/FeedbackBox.js";
6
+ import { ControlsButton as S } from "../ControlsButton/ControlsButton.js";
7
7
  import '../../assets/CheckboxButtonBar.css';const t = {
8
8
  "checkbox-button-bar__container": "_checkbox-button-bar__container_u7fv0_1",
9
9
  "checkbox-button-bar__container--label-left": "_checkbox-button-bar__container--label-left_u7fv0_6",
@@ -12,61 +12,64 @@ import '../../assets/CheckboxButtonBar.css';const t = {
12
12
  "checkbox-button-bar__row": "_checkbox-button-bar__row_u7fv0_18",
13
13
  "checkbox-button-bar__row--not-validated": "_checkbox-button-bar__row--not-validated_u7fv0_35",
14
14
  "checkbox-button-bar__footer": "_checkbox-button-bar__footer_u7fv0_39"
15
- }, q = ({
16
- checkboxes: h,
17
- defaultValues: n,
15
+ }, z = ({
16
+ checkboxes: x,
17
+ defaultValues: r,
18
18
  label: a,
19
- labelPosition: s = "top",
20
- required: k = !1,
21
- notValidated: x = !1,
22
- notValidatedText: c = "",
23
- footerText: _ = "",
24
- disableGroup: f = !1,
25
- onSetValues: d
19
+ labelPosition: f = "top",
20
+ required: m = !1,
21
+ notValidated: d = !1,
22
+ notValidatedText: b = "",
23
+ actAsRadioButtonBar: n = !1,
24
+ footerText: l = "",
25
+ disableGroup: p = !1,
26
+ onSetValues: i
26
27
  }) => {
27
- const [l, m] = w(n ? n.map(String) : []), p = (e) => {
28
- let o = l;
29
- o.includes(e) ? o = o.filter((b) => b !== e) : o = [...o, e], m(o), d(o);
28
+ const [h, s] = C(
29
+ r && !n ? r.map(String) : r && n ? r.slice(0, 1) : []
30
+ ), v = (e) => {
31
+ let o = h;
32
+ n ? (s([e]), i([e])) : (o.includes(e) ? o = o.filter((_) => _ !== e) : o = [...o, e], s(o), i(o));
30
33
  };
31
34
  return /* @__PURE__ */ u(
32
35
  "div",
33
36
  {
34
- className: i(
37
+ className: k(
35
38
  t["checkbox-button-bar__container"],
36
- t[`checkbox-button-bar__container--label-${s}`]
39
+ t[`checkbox-button-bar__container--label-${f}`]
37
40
  ),
38
41
  children: [
39
- a && /* @__PURE__ */ r(B, { htmlFor: "", required: k, children: a }),
42
+ a && /* @__PURE__ */ c(N, { htmlFor: "", required: m, children: a }),
40
43
  /* @__PURE__ */ u("div", { className: t["checkbox-button-bar__row-container"], children: [
41
- /* @__PURE__ */ r(
44
+ /* @__PURE__ */ c(
42
45
  "div",
43
46
  {
44
- className: i(t["checkbox-button-bar__row"], {
45
- [t["checkbox-button-bar__row--not-validated"]]: x || c
47
+ className: k(t["checkbox-button-bar__row"], {
48
+ [t["checkbox-button-bar__row--not-validated"]]: d || b
46
49
  }),
47
- children: h.map(({ label: e, value: o, disabled: b }) => /* @__PURE__ */ r(
48
- N,
50
+ children: x.map(({ label: e, value: o, disabled: _ }) => /* @__PURE__ */ c(
51
+ S,
49
52
  {
50
53
  type: "checkbox",
51
54
  label: e,
52
55
  forceSquared: !0,
53
56
  value: o,
54
- checked: l.includes(o),
55
- disabled: b || f,
56
- onSetValue: (v) => p(v.target.value)
57
+ checked: h.includes(o),
58
+ disabled: _ || p,
59
+ onSetValue: (w) => v(w.target.value)
57
60
  },
58
61
  `${o}`
59
62
  ))
60
63
  }
61
64
  ),
62
- _ && /* @__PURE__ */ r("div", { className: t["checkbox-button-bar__footer"], children: _ }),
63
- c !== "" && /* @__PURE__ */ r(C, { level: "error", feedback: c })
65
+ l && /* @__PURE__ */ c("div", { className: t["checkbox-button-bar__footer"], children: l }),
66
+ b !== "" && /* @__PURE__ */ c(g, { level: "error", feedback: b })
64
67
  ] })
65
68
  ]
66
69
  }
67
70
  );
68
71
  };
69
72
  export {
70
- q as CheckboxButtonBar
73
+ z as CheckboxButtonBar
71
74
  };
72
75
  //# sourceMappingURL=CheckboxButtonBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxButtonBar.js","sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.tsx"],"sourcesContent":["import { useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './CheckboxButtonBar.module.css';\n\nimport { Label } from 'components/Label';\nimport { FeedbackBox } from 'components/FeedbackBox';\nimport { ControlsButton } from 'components/ControlsButton';\n\ntype CheckboxProps = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport interface CheckboxButtonBarProps {\n /** array with objects with label, value */\n checkboxes: CheckboxProps[];\n //** array with values */\n defaultValues?: string[];\n label?: string;\n /** 'top' | 'left' */\n labelPosition?: 'top' | 'left';\n /** `true` to show an asterisk to indicate an item is required; otherwise, `false`. */\n required?: boolean;\n /** `true` to color border red to show missing in validation; otherwise, `false`. */\n notValidated?: boolean;\n /** error text to display under the bar */\n notValidatedText?: string;\n /** optional footer text */\n footerText?: string;\n /** disables all checkboxes in the bar */\n disableGroup?: boolean;\n onSetValues: (value: string[]) => void;\n}\n\n/** Represents a component that shows a collection of [CheckboxButton](/story/atoms-checkboxbutton--checkbox-button-example)s. */\nexport const CheckboxButtonBar = ({\n checkboxes,\n defaultValues,\n label,\n labelPosition = 'top',\n required = false,\n notValidated = false,\n notValidatedText = '',\n footerText = '',\n disableGroup = false,\n onSetValues,\n}: CheckboxButtonBarProps) => {\n const [currentValues, setCurrentValues] = useState<string[]>(defaultValues ? defaultValues.map(String) : []);\n\n const handleChange = (value: string) => {\n let values = currentValues;\n\n if (values.includes(value)) {\n values = values.filter((val) => val !== value);\n } else {\n values = [...values, value];\n }\n setCurrentValues(values);\n onSetValues(values);\n };\n\n return (\n <div\n className={clsx(\n styles['checkbox-button-bar__container'],\n styles[`checkbox-button-bar__container--label-${labelPosition}`]\n )}\n >\n {label && (\n <Label htmlFor=\"\" required={required}>\n {label}\n </Label>\n )}\n <div className={styles['checkbox-button-bar__row-container']}>\n <div\n className={clsx(styles['checkbox-button-bar__row'], {\n [styles['checkbox-button-bar__row--not-validated']]: notValidated || notValidatedText,\n })}\n >\n {checkboxes.map(({ label, value, disabled }) => (\n <ControlsButton\n type=\"checkbox\"\n key={`${value}`}\n label={label}\n forceSquared={true}\n value={value}\n checked={currentValues.includes(value)}\n disabled={disabled || disableGroup}\n onSetValue={(event) => handleChange(event.target.value)}\n />\n ))}\n </div>\n {footerText && <div className={styles['checkbox-button-bar__footer']}>{footerText}</div>}\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </div>\n );\n};\n"],"names":["CheckboxButtonBar","checkboxes","defaultValues","label","labelPosition","required","notValidated","notValidatedText","footerText","disableGroup","onSetValues","currentValues","setCurrentValues","useState","handleChange","value","values","val","jsxs","clsx","styles","jsx","Label","disabled","ControlsButton","event","FeedbackBox"],"mappings":";;;;;;;;;;;;;;GAqCaA,IAAoB,CAAC;AAAA,EAChC,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC,IAAW;AAAA,EACX,cAAAC,IAAe;AAAA,EACf,kBAAAC,IAAmB;AAAA,EACnB,YAAAC,IAAa;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,aAAAC;AACF,MAA8B;AACtB,QAAA,CAACC,GAAeC,CAAgB,IAAIC,EAAmBX,IAAgBA,EAAc,IAAI,MAAM,IAAI,EAAE,GAErGY,IAAe,CAACC,MAAkB;AACtC,QAAIC,IAASL;AAET,IAAAK,EAAO,SAASD,CAAK,IACvBC,IAASA,EAAO,OAAO,CAACC,MAAQA,MAAQF,CAAK,IAEpCC,IAAA,CAAC,GAAGA,GAAQD,CAAK,GAE5BH,EAAiBI,CAAM,GACvBN,EAAYM,CAAM;AAAA,EACpB;AAGE,SAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO,gCAAgC;AAAA,QACvCA,EAAO,yCAAyChB,CAAa,EAAE;AAAA,MACjE;AAAA,MAEC,UAAA;AAAA,QAAAD,KACE,gBAAAkB,EAAAC,GAAA,EAAM,SAAQ,IAAG,UAAAjB,GACf,UACHF,GAAA;AAAA,QAED,gBAAAe,EAAA,OAAA,EAAI,WAAWE,EAAO,oCAAoC,GACzD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAKC,EAAO,0BAA0B,GAAG;AAAA,gBAClD,CAACA,EAAO,yCAAyC,CAAC,GAAGd,KAAgBC;AAAA,cAAA,CACtE;AAAA,cAEA,UAAAN,EAAW,IAAI,CAAC,EAAE,OAAAE,GAAO,OAAAY,GAAO,UAAAQ,QAC/B,gBAAAF;AAAA,gBAACG;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBAEL,OAAOrB;AAAAA,kBACP,cAAc;AAAA,kBACd,OAAAY;AAAA,kBACA,SAASJ,EAAc,SAASI,CAAK;AAAA,kBACrC,UAAUQ,KAAYd;AAAA,kBACtB,YAAY,CAACgB,MAAUX,EAAaW,EAAM,OAAO,KAAK;AAAA,gBAAA;AAAA,gBANjD,GAAGV,CAAK;AAAA,cAQhB,CAAA;AAAA,YAAA;AAAA,UACH;AAAA,UACCP,KAAe,gBAAAa,EAAA,OAAA,EAAI,WAAWD,EAAO,6BAA6B,GAAI,UAAWZ,GAAA;AAAA,UACjFD,MAAqB,MAAM,gBAAAc,EAACK,KAAY,OAAM,SAAQ,UAAUnB,EAAkB,CAAA;AAAA,QAAA,EACrF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"CheckboxButtonBar.js","sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.tsx"],"sourcesContent":["import { useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './CheckboxButtonBar.module.css';\n\nimport { Label } from 'components/Label';\nimport { FeedbackBox } from 'components/FeedbackBox';\nimport { ControlsButton } from 'components/ControlsButton';\n\ntype CheckboxProps = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport interface CheckboxButtonBarProps {\n /** array with objects with label, value */\n checkboxes: CheckboxProps[];\n //** array with value(s) */\n defaultValues?: string[];\n label?: string;\n /** 'top' | 'left' */\n labelPosition?: 'top' | 'left';\n /** `true` to show an asterisk to indicate an item is required; otherwise, `false`. */\n required?: boolean;\n /** `true` to color border red to show missing in validation; otherwise, `false`. */\n notValidated?: boolean;\n /** error text to display under the bar */\n notValidatedText?: string;\n /** returns an array with only one value */\n actAsRadioButtonBar?: boolean;\n /** optional footer text */\n footerText?: string;\n /** disables all checkboxes in the bar */\n disableGroup?: boolean;\n onSetValues: (value: string[]) => void;\n}\n\nexport const CheckboxButtonBar = ({\n checkboxes,\n defaultValues,\n label,\n labelPosition = 'top',\n required = false,\n notValidated = false,\n notValidatedText = '',\n actAsRadioButtonBar = false,\n footerText = '',\n disableGroup = false,\n onSetValues,\n}: CheckboxButtonBarProps) => {\n const [currentValues, setCurrentValues] = useState<string[]>(\n defaultValues && !actAsRadioButtonBar\n ? defaultValues.map(String)\n : defaultValues && actAsRadioButtonBar\n ? defaultValues.slice(0, 1)\n : []\n );\n\n const handleChange = (value: string) => {\n let values = currentValues;\n\n if (actAsRadioButtonBar) {\n setCurrentValues([value]);\n onSetValues([value]);\n } else {\n if (values.includes(value)) {\n values = values.filter((val) => val !== value);\n } else {\n values = [...values, value];\n }\n setCurrentValues(values);\n onSetValues(values);\n }\n };\n\n return (\n <div\n className={clsx(\n styles['checkbox-button-bar__container'],\n styles[`checkbox-button-bar__container--label-${labelPosition}`]\n )}\n >\n {label && (\n <Label htmlFor=\"\" required={required}>\n {label}\n </Label>\n )}\n <div className={styles['checkbox-button-bar__row-container']}>\n <div\n className={clsx(styles['checkbox-button-bar__row'], {\n [styles['checkbox-button-bar__row--not-validated']]: notValidated || notValidatedText,\n })}\n >\n {checkboxes.map(({ label, value, disabled }) => (\n <ControlsButton\n type=\"checkbox\"\n key={`${value}`}\n label={label}\n forceSquared={true}\n value={value}\n checked={currentValues.includes(value)}\n disabled={disabled || disableGroup}\n onSetValue={(event) => handleChange(event.target.value)}\n />\n ))}\n </div>\n {footerText && <div className={styles['checkbox-button-bar__footer']}>{footerText}</div>}\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </div>\n );\n};\n"],"names":["CheckboxButtonBar","checkboxes","defaultValues","label","labelPosition","required","notValidated","notValidatedText","actAsRadioButtonBar","footerText","disableGroup","onSetValues","currentValues","setCurrentValues","useState","handleChange","value","values","val","jsxs","clsx","styles","jsx","Label","disabled","ControlsButton","event","FeedbackBox"],"mappings":";;;;;;;;;;;;;;GAsCaA,IAAoB,CAAC;AAAA,EAChC,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC,IAAW;AAAA,EACX,cAAAC,IAAe;AAAA,EACf,kBAAAC,IAAmB;AAAA,EACnB,qBAAAC,IAAsB;AAAA,EACtB,YAAAC,IAAa;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,aAAAC;AACF,MAA8B;AACtB,QAAA,CAACC,GAAeC,CAAgB,IAAIC;AAAA,IACxCZ,KAAiB,CAACM,IACdN,EAAc,IAAI,MAAM,IACxBA,KAAiBM,IACfN,EAAc,MAAM,GAAG,CAAC,IACxB,CAAA;AAAA,EACR,GAEMa,IAAe,CAACC,MAAkB;AACtC,QAAIC,IAASL;AAEb,IAAIJ,KACeK,EAAA,CAACG,CAAK,CAAC,GACZL,EAAA,CAACK,CAAK,CAAC,MAEfC,EAAO,SAASD,CAAK,IACvBC,IAASA,EAAO,OAAO,CAACC,MAAQA,MAAQF,CAAK,IAEpCC,IAAA,CAAC,GAAGA,GAAQD,CAAK,GAE5BH,EAAiBI,CAAM,GACvBN,EAAYM,CAAM;AAAA,EAEtB;AAGE,SAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO,gCAAgC;AAAA,QACvCA,EAAO,yCAAyCjB,CAAa,EAAE;AAAA,MACjE;AAAA,MAEC,UAAA;AAAA,QAAAD,KACE,gBAAAmB,EAAAC,GAAA,EAAM,SAAQ,IAAG,UAAAlB,GACf,UACHF,GAAA;AAAA,QAED,gBAAAgB,EAAA,OAAA,EAAI,WAAWE,EAAO,oCAAoC,GACzD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAKC,EAAO,0BAA0B,GAAG;AAAA,gBAClD,CAACA,EAAO,yCAAyC,CAAC,GAAGf,KAAgBC;AAAA,cAAA,CACtE;AAAA,cAEA,UAAAN,EAAW,IAAI,CAAC,EAAE,OAAAE,GAAO,OAAAa,GAAO,UAAAQ,QAC/B,gBAAAF;AAAA,gBAACG;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBAEL,OAAOtB;AAAAA,kBACP,cAAc;AAAA,kBACd,OAAAa;AAAA,kBACA,SAASJ,EAAc,SAASI,CAAK;AAAA,kBACrC,UAAUQ,KAAYd;AAAA,kBACtB,YAAY,CAACgB,MAAUX,EAAaW,EAAM,OAAO,KAAK;AAAA,gBAAA;AAAA,gBANjD,GAAGV,CAAK;AAAA,cAQhB,CAAA;AAAA,YAAA;AAAA,UACH;AAAA,UACCP,KAAe,gBAAAa,EAAA,OAAA,EAAI,WAAWD,EAAO,6BAA6B,GAAI,UAAWZ,GAAA;AAAA,UACjFF,MAAqB,MAAM,gBAAAe,EAACK,KAAY,OAAM,SAAQ,UAAUpB,EAAkB,CAAA;AAAA,QAAA,EACrF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -3,3 +3,4 @@ import { CheckboxButtonBarProps } from './CheckboxButtonBar';
3
3
  declare const _default: Meta<CheckboxButtonBarProps>;
4
4
  export default _default;
5
5
  export declare const CheckboxButtonBarExample: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, CheckboxButtonBarProps>;
6
+ export declare const CheckboxButtonBarAsRadioButtonBar: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, CheckboxButtonBarProps>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { fn as l } from "../../index-Dwqes6RH.js";
3
3
  import { CheckboxButtonBar as e } from "./CheckboxButtonBar.js";
4
- const a = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosition={} required={} notValidatedText={} disableGroup={} onSetValues={} />", i = {
4
+ const r = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosition={} required={} notValidatedText={} disableGroup={} onSetValues={} />", c = {
5
5
  title: "Molecules/CheckboxButtonBar",
6
6
  component: e,
7
7
  argTypes: {
@@ -31,6 +31,9 @@ const a = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosit
31
31
  disableGroup: {
32
32
  control: "boolean"
33
33
  },
34
+ actAsRadioButtonBar: {
35
+ control: "boolean"
36
+ },
34
37
  onSetValues: {
35
38
  table: {
36
39
  disable: !0
@@ -39,9 +42,9 @@ const a = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosit
39
42
  },
40
43
  parameters: {
41
44
  inspectComponent: e,
42
- codeString: a
45
+ codeString: r
43
46
  }
44
- }, r = (o) => /* @__PURE__ */ t(e, { ...o }), n = r.bind({});
47
+ }, o = (a) => /* @__PURE__ */ t(e, { ...a }), n = o.bind({});
45
48
  n.args = {
46
49
  label: "Periode",
47
50
  required: !0,
@@ -76,8 +79,44 @@ n.args = {
76
79
  footerText: "Weken in periode 2",
77
80
  onSetValues: l()
78
81
  };
82
+ const u = o.bind({});
83
+ u.args = {
84
+ label: "Weken",
85
+ required: !0,
86
+ checkboxes: [
87
+ {
88
+ label: "1",
89
+ value: "1"
90
+ },
91
+ {
92
+ label: "2",
93
+ value: "2"
94
+ },
95
+ {
96
+ label: "3",
97
+ value: "3"
98
+ },
99
+ {
100
+ label: "4",
101
+ value: "4"
102
+ },
103
+ {
104
+ label: "5",
105
+ value: "5"
106
+ },
107
+ {
108
+ label: "6",
109
+ value: "6"
110
+ }
111
+ ],
112
+ defaultValues: ["1"],
113
+ labelPosition: "top",
114
+ actAsRadioButtonBar: !0,
115
+ onSetValues: l()
116
+ };
79
117
  export {
118
+ u as CheckboxButtonBarAsRadioButtonBar,
80
119
  n as CheckboxButtonBarExample,
81
- i as default
120
+ c as default
82
121
  };
83
122
  //# sourceMappingURL=CheckboxButtonBar.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxButtonBar.stories.js","sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxButtonBarProps } from './CheckboxButtonBar';\n\nimport { CheckboxButtonBar } from './CheckboxButtonBar';\n\nconst codeString =\n '<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosition={} required={} notValidatedText={} disableGroup={} onSetValues={} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/CheckboxButtonBar',\n component: CheckboxButtonBar,\n argTypes: {\n checkboxes: {\n table: {\n disable: true,\n },\n },\n defaultValues: {\n table: {\n disable: true,\n },\n },\n label: {\n control: 'text',\n },\n labelPosition: {\n control: 'radio',\n options: ['top', 'left'],\n },\n required: {\n control: 'boolean',\n },\n notValidatedText: {\n control: 'text',\n },\n disableGroup: {\n control: 'boolean',\n },\n onSetValues: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: CheckboxButtonBar,\n codeString: codeString,\n },\n} as Meta<CheckboxButtonBarProps>;\n\nconst Template: StoryFn<CheckboxButtonBarProps> = (args) => <CheckboxButtonBar {...args} />;\n\nexport const CheckboxButtonBarExample = Template.bind({});\nCheckboxButtonBarExample.args = {\n label: 'Periode',\n required: true,\n checkboxes: [\n {\n label: '1.1',\n value: '1',\n },\n {\n label: '1.2',\n value: '2',\n },\n {\n label: '1.3',\n value: '3',\n },\n {\n label: '4',\n value: '4',\n },\n {\n label: '5',\n value: '5',\n },\n {\n label: '6',\n value: '6',\n },\n ],\n defaultValues: ['1', '2'],\n labelPosition: 'top',\n footerText: 'Weken in periode 2',\n onSetValues: fn(),\n};\n"],"names":["codeString","CheckboxButtonBar_stories","CheckboxButtonBar","Template","args","jsx","CheckboxButtonBarExample","fn"],"mappings":";;;AAOA,MAAMA,IACJ,iJAGaC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,IACA,eAAe;AAAA,MACb,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,SAAS;AAAA,MACT,SAAS,CAAC,OAAO,MAAM;AAAA,IACzB;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACX,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EAEJ;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAA4C,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAmB,GAAGE,GAAM,GAE5EE,IAA2BH,EAAS,KAAK,CAAE,CAAA;AACxDG,EAAyB,OAAO;AAAA,EAC9B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,IACV;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,eAAe,CAAC,KAAK,GAAG;AAAA,EACxB,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,aAAaC,EAAG;AAClB;"}
1
+ {"version":3,"file":"CheckboxButtonBar.stories.js","sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxButtonBarProps } from './CheckboxButtonBar';\n\nimport { CheckboxButtonBar } from './CheckboxButtonBar';\n\nconst codeString =\n '<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosition={} required={} notValidatedText={} disableGroup={} onSetValues={} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Molecules/CheckboxButtonBar',\n component: CheckboxButtonBar,\n argTypes: {\n checkboxes: {\n table: {\n disable: true,\n },\n },\n defaultValues: {\n table: {\n disable: true,\n },\n },\n label: {\n control: 'text',\n },\n labelPosition: {\n control: 'radio',\n options: ['top', 'left'],\n },\n required: {\n control: 'boolean',\n },\n notValidatedText: {\n control: 'text',\n },\n disableGroup: {\n control: 'boolean',\n },\n actAsRadioButtonBar: {\n control: 'boolean',\n },\n onSetValues: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: CheckboxButtonBar,\n codeString: codeString,\n },\n} as Meta<CheckboxButtonBarProps>;\n\nconst Template: StoryFn<CheckboxButtonBarProps> = (args) => <CheckboxButtonBar {...args} />;\n\nexport const CheckboxButtonBarExample = Template.bind({});\nCheckboxButtonBarExample.args = {\n label: 'Periode',\n required: true,\n checkboxes: [\n {\n label: '1.1',\n value: '1',\n },\n {\n label: '1.2',\n value: '2',\n },\n {\n label: '1.3',\n value: '3',\n },\n {\n label: '4',\n value: '4',\n },\n {\n label: '5',\n value: '5',\n },\n {\n label: '6',\n value: '6',\n },\n ],\n defaultValues: ['1', '2'],\n labelPosition: 'top',\n footerText: 'Weken in periode 2',\n onSetValues: fn(),\n};\n\nexport const CheckboxButtonBarAsRadioButtonBar = Template.bind({});\nCheckboxButtonBarAsRadioButtonBar.args = {\n label: 'Weken',\n required: true,\n checkboxes: [\n {\n label: '1',\n value: '1',\n },\n {\n label: '2',\n value: '2',\n },\n {\n label: '3',\n value: '3',\n },\n {\n label: '4',\n value: '4',\n },\n {\n label: '5',\n value: '5',\n },\n {\n label: '6',\n value: '6',\n },\n ],\n defaultValues: ['1'],\n labelPosition: 'top',\n actAsRadioButtonBar: true,\n onSetValues: fn(),\n};\n"],"names":["codeString","CheckboxButtonBar_stories","CheckboxButtonBar","Template","args","jsx","CheckboxButtonBarExample","fn","CheckboxButtonBarAsRadioButtonBar"],"mappings":";;;AAOA,MAAMA,IACJ,iJAGaC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,IACA,eAAe;AAAA,MACb,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IAEb;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,MACb,SAAS;AAAA,MACT,SAAS,CAAC,OAAO,MAAM;AAAA,IACzB;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,IACX;AAAA,IACA,qBAAqB;AAAA,MACnB,SAAS;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACX,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EAEJ;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAA4C,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAmB,GAAGE,GAAM,GAE5EE,IAA2BH,EAAS,KAAK,CAAE,CAAA;AACxDG,EAAyB,OAAO;AAAA,EAC9B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,IACV;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,eAAe,CAAC,KAAK,GAAG;AAAA,EACxB,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,aAAaC,EAAG;AAClB;AAEO,MAAMC,IAAoCL,EAAS,KAAK,CAAE,CAAA;AACjEK,EAAkC,OAAO;AAAA,EACvC,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,IACV;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,eAAe,CAAC,GAAG;AAAA,EACnB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,aAAaD,EAAG;AAClB;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uva-glass/component-library",
3
3
  "author": "Team Glass - Frontend vrienden",
4
4
  "private": false,
5
- "version": "3.26.2",
5
+ "version": "3.26.3",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -69,7 +69,7 @@
69
69
  "@types/react": "^19.1.6",
70
70
  "@uva-glass/eslint-config": "^1.3.10",
71
71
  "@uva-glass/stylelint-config": "^1.2.2",
72
- "@vitejs/plugin-react": "^4.5.0",
72
+ "@vitejs/plugin-react": "^4.5.1",
73
73
  "babel-jest": "^29.7.0",
74
74
  "babel-plugin-transform-vite-meta-env": "^1.0.3",
75
75
  "clsx": "^2.1.1",
@@ -84,7 +84,7 @@
84
84
  "npm-run-all2": "^8.0.4",
85
85
  "react": "^19.1.0",
86
86
  "react-dom": "^19.1.0",
87
- "react-router": "^7.6.1",
87
+ "react-router": "^7.6.2",
88
88
  "semantic-release": "^24.2.5",
89
89
  "storybook": "^8.6.14",
90
90
  "style-dictionary": "^5.0.0",