@uva-glass/component-library 3.36.1 → 3.37.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.
@@ -1,10 +1,12 @@
1
+ import { IconProps } from 'components';
1
2
  type ButtonProps = {
2
3
  label: string;
3
4
  value: string;
5
+ iconName?: IconProps['name'];
4
6
  disabled?: boolean;
5
7
  };
6
8
  export interface RadioTabSelectorProps {
7
- /** array with objects with label, value, disablestate */
9
+ /** array with button objects with label, value and optional iconName or disabled-state */
8
10
  buttons: ButtonProps[];
9
11
  /** name of the radiogroup */
10
12
  radioGroupName: string;
@@ -1,13 +1,13 @@
1
1
  import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
2
  import { c as b } from "../../clsx-OuTLNxxd.js";
3
- import { useState as h } from "react";
3
+ import { useState as v } from "react";
4
4
  import "../Buttons/Button.js";
5
5
  import "../Buttons/LinkButton.js";
6
6
  import "@react-aria/button";
7
7
  import "../Checkbox/Checkbox.js";
8
- import { Label as v } from "../Label/Label.js";
9
- import { FeedbackBox as g } from "../FeedbackBox/FeedbackBox.js";
10
- import { ControlsButton as k } from "../ControlsButton/ControlsButton.js";
8
+ import { Label as g } from "../Label/Label.js";
9
+ import { FeedbackBox as k } from "../FeedbackBox/FeedbackBox.js";
10
+ import { ControlsButton as x } from "../ControlsButton/ControlsButton.js";
11
11
  import "@react-aria/dialog";
12
12
  import "@react-aria/focus";
13
13
  import "@react-aria/overlays";
@@ -33,7 +33,7 @@ import '../../assets/RadioTabSelector.css';const t = {
33
33
  "radio-tab-selector-button-bar__row-container": "_radio-tab-selector-button-bar__row-container_a4wnc_18",
34
34
  "radio-tab-selector-button-bar__row": "_radio-tab-selector-button-bar__row_a4wnc_18",
35
35
  "radio-tab-selector-button-bar__row--not-validated": "_radio-tab-selector-button-bar__row--not-validated_a4wnc_35"
36
- }, X = ({
36
+ }, Y = ({
37
37
  buttons: l,
38
38
  radioGroupName: c,
39
39
  defaultValue: _,
@@ -43,7 +43,7 @@ import '../../assets/RadioTabSelector.css';const t = {
43
43
  notValidatedText: a = "",
44
44
  onSetValue: p
45
45
  }) => {
46
- const [d, u] = h(_ || null), w = (r) => {
46
+ const [d, u] = v(_ || null), w = (r) => {
47
47
  u(r.target.value), p(r.target.value);
48
48
  };
49
49
  return /* @__PURE__ */ n(
@@ -54,7 +54,7 @@ import '../../assets/RadioTabSelector.css';const t = {
54
54
  t[`radio-tab-selector-button-bar__container--label-${m}`]
55
55
  ),
56
56
  children: [
57
- i && /* @__PURE__ */ o(v, { htmlFor: "", required: s, children: i }),
57
+ i && /* @__PURE__ */ o(g, { htmlFor: "", required: s, children: i }),
58
58
  /* @__PURE__ */ n("div", { className: t["radio-tab-selector-button-bar__row-container"], children: [
59
59
  /* @__PURE__ */ o(
60
60
  "div",
@@ -62,28 +62,29 @@ import '../../assets/RadioTabSelector.css';const t = {
62
62
  className: b(t["radio-tab-selector-button-bar__row"], {
63
63
  [t["radio-tab-selector-button-bar__row--not-validated"]]: a
64
64
  }),
65
- children: l.map(({ label: r, value: e, disabled: f }) => /* @__PURE__ */ o(
66
- k,
65
+ children: l.map(({ label: r, value: e, iconName: f, disabled: h }) => /* @__PURE__ */ o(
66
+ x,
67
67
  {
68
68
  type: "radio",
69
69
  name: c,
70
70
  label: r,
71
71
  value: e,
72
+ iconName: f,
72
73
  checked: d === e,
73
- disabled: f,
74
+ disabled: h,
74
75
  onSetValue: w
75
76
  },
76
77
  `${e}`
77
78
  ))
78
79
  }
79
80
  ),
80
- a !== "" && /* @__PURE__ */ o(g, { level: "error", feedback: a })
81
+ a !== "" && /* @__PURE__ */ o(k, { level: "error", feedback: a })
81
82
  ] })
82
83
  ]
83
84
  }
84
85
  );
85
86
  };
86
87
  export {
87
- X as RadioTabSelector
88
+ Y as RadioTabSelector
88
89
  };
89
90
  //# sourceMappingURL=RadioTabSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioTabSelector.js","sources":["../../../src/components/RadioTabSelector/RadioTabSelector.tsx"],"sourcesContent":["import { clsx } from 'clsx';\r\nimport { useState } from 'react';\r\n\r\nimport type { ChangeEvent } from 'react';\r\n\r\nimport styles from './RadioTabSelector.module.css';\r\n\r\nimport { ControlsButton, FeedbackBox, Label } from 'components';\r\n\r\ntype ButtonProps = {\r\n label: string;\r\n value: string;\r\n disabled?: boolean;\r\n};\r\n\r\nexport interface RadioTabSelectorProps {\r\n /** array with objects with label, value, disablestate */\r\n buttons: ButtonProps[];\r\n /** name of the radiogroup */\r\n radioGroupName: string;\r\n /** innitial value */\r\n defaultValue?: string;\r\n /** label takst */\r\n label?: string;\r\n /** 'top' | 'left' */\r\n labelPosition?: 'top' | 'left';\r\n /** show red star */\r\n required?: boolean;\r\n /** error text to display if set */\r\n notValidatedText?: string;\r\n /** The callback function that is invoked when the radio tab selector changes value. */\r\n onSetValue: (value: string | null) => void;\r\n}\r\n\r\nexport const RadioTabSelector = ({\r\n buttons,\r\n radioGroupName,\r\n defaultValue,\r\n label,\r\n labelPosition = 'top',\r\n required = false,\r\n notValidatedText = '',\r\n onSetValue,\r\n}: RadioTabSelectorProps) => {\r\n const [currentValue, setCurrentValue] = useState<string | null>(defaultValue || null);\r\n\r\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\r\n setCurrentValue(event.target.value);\r\n onSetValue(event.target.value);\r\n };\r\n\r\n return (\r\n <div\r\n className={clsx(\r\n styles['radio-tab-selector-button-bar__container'],\r\n styles[`radio-tab-selector-button-bar__container--label-${labelPosition}`]\r\n )}\r\n >\r\n {label && (\r\n <Label htmlFor=\"\" required={required}>\r\n {label}\r\n </Label>\r\n )}\r\n <div className={styles['radio-tab-selector-button-bar__row-container']}>\r\n <div\r\n className={clsx(styles['radio-tab-selector-button-bar__row'], {\r\n [styles['radio-tab-selector-button-bar__row--not-validated']]: notValidatedText,\r\n })}\r\n >\r\n {buttons.map(({ label, value, disabled }) => (\r\n <ControlsButton\r\n type=\"radio\"\r\n name={radioGroupName}\r\n key={`${value}`}\r\n label={label}\r\n value={value}\r\n checked={currentValue === value}\r\n disabled={disabled}\r\n onSetValue={handleChange}\r\n />\r\n ))}\r\n </div>\r\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\r\n </div>\r\n </div>\r\n );\r\n};\r\n"],"names":["RadioTabSelector","buttons","radioGroupName","defaultValue","label","labelPosition","required","notValidatedText","onSetValue","currentValue","setCurrentValue","useState","handleChange","event","jsxs","clsx","styles","jsx","Label","value","disabled","ControlsButton","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCaA,IAAmB,CAAC;AAAA,EAC/B,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AAAA,EACnB,YAAAC;AACF,MAA6B;AAC3B,QAAM,CAACC,GAAcC,CAAe,IAAIC,EAAwBR,KAAgB,IAAI,GAE9ES,IAAe,CAACC,MAAyC;AAC7D,IAAAH,EAAgBG,EAAM,OAAO,KAAK,GAClCL,EAAWK,EAAM,OAAO,KAAK;AAAA,EAAA;AAG/B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO,0CAA0C;AAAA,QACjDA,EAAO,mDAAmDX,CAAa,EAAE;AAAA,MAAA;AAAA,MAG1E,UAAA;AAAA,QAAAD,KACC,gBAAAa,EAACC,GAAA,EAAM,SAAQ,IAAG,UAAAZ,GACf,UAAAF,GACH;AAAA,QAEF,gBAAAU,EAAC,OAAA,EAAI,WAAWE,EAAO,8CAA8C,GACnE,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAKC,EAAO,oCAAoC,GAAG;AAAA,gBAC5D,CAACA,EAAO,mDAAmD,CAAC,GAAGT;AAAA,cAAA,CAChE;AAAA,cAEA,UAAAN,EAAQ,IAAI,CAAC,EAAE,OAAAG,GAAO,OAAAe,GAAO,UAAAC,QAC5B,gBAAAH;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBACL,MAAMnB;AAAA,kBAEN,OAAOE;AAAAA,kBACP,OAAAe;AAAA,kBACA,SAASV,MAAiBU;AAAA,kBAC1B,UAAAC;AAAA,kBACA,YAAYR;AAAA,gBAAA;AAAA,gBALP,GAAGO,CAAK;AAAA,cAAA,CAOhB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEFZ,MAAqB,MAAM,gBAAAU,EAACK,KAAY,OAAM,SAAQ,UAAUf,EAAA,CAAkB;AAAA,QAAA,EAAA,CACrF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"RadioTabSelector.js","sources":["../../../src/components/RadioTabSelector/RadioTabSelector.tsx"],"sourcesContent":["import { clsx } from 'clsx';\r\nimport { useState } from 'react';\r\n\r\nimport type { ChangeEvent } from 'react';\r\nimport type { IconProps } from 'components';\r\n\r\nimport styles from './RadioTabSelector.module.css';\r\n\r\nimport { ControlsButton, FeedbackBox, Label } from 'components';\r\n\r\ntype ButtonProps = {\r\n label: string;\r\n value: string;\r\n iconName?: IconProps['name'];\r\n disabled?: boolean;\r\n};\r\n\r\nexport interface RadioTabSelectorProps {\r\n /** array with button objects with label, value and optional iconName or disabled-state */\r\n buttons: ButtonProps[];\r\n /** name of the radiogroup */\r\n radioGroupName: string;\r\n /** innitial value */\r\n defaultValue?: string;\r\n /** label takst */\r\n label?: string;\r\n /** 'top' | 'left' */\r\n labelPosition?: 'top' | 'left';\r\n /** show red star */\r\n required?: boolean;\r\n /** error text to display if set */\r\n notValidatedText?: string;\r\n /** The callback function that is invoked when the radio tab selector changes value. */\r\n onSetValue: (value: string | null) => void;\r\n}\r\n\r\nexport const RadioTabSelector = ({\r\n buttons,\r\n radioGroupName,\r\n defaultValue,\r\n label,\r\n labelPosition = 'top',\r\n required = false,\r\n notValidatedText = '',\r\n onSetValue,\r\n}: RadioTabSelectorProps) => {\r\n const [currentValue, setCurrentValue] = useState<string | null>(defaultValue || null);\r\n\r\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\r\n setCurrentValue(event.target.value);\r\n onSetValue(event.target.value);\r\n };\r\n\r\n return (\r\n <div\r\n className={clsx(\r\n styles['radio-tab-selector-button-bar__container'],\r\n styles[`radio-tab-selector-button-bar__container--label-${labelPosition}`]\r\n )}\r\n >\r\n {label && (\r\n <Label htmlFor=\"\" required={required}>\r\n {label}\r\n </Label>\r\n )}\r\n <div className={styles['radio-tab-selector-button-bar__row-container']}>\r\n <div\r\n className={clsx(styles['radio-tab-selector-button-bar__row'], {\r\n [styles['radio-tab-selector-button-bar__row--not-validated']]: notValidatedText,\r\n })}\r\n >\r\n {buttons.map(({ label, value, iconName, disabled }) => (\r\n <ControlsButton\r\n type=\"radio\"\r\n name={radioGroupName}\r\n key={`${value}`}\r\n label={label}\r\n value={value}\r\n iconName={iconName}\r\n checked={currentValue === value}\r\n disabled={disabled}\r\n onSetValue={handleChange}\r\n />\r\n ))}\r\n </div>\r\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\r\n </div>\r\n </div>\r\n );\r\n};\r\n"],"names":["RadioTabSelector","buttons","radioGroupName","defaultValue","label","labelPosition","required","notValidatedText","onSetValue","currentValue","setCurrentValue","useState","handleChange","event","jsxs","clsx","styles","jsx","Label","value","iconName","disabled","ControlsButton","FeedbackBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCaA,IAAmB,CAAC;AAAA,EAC/B,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AAAA,EACnB,YAAAC;AACF,MAA6B;AAC3B,QAAM,CAACC,GAAcC,CAAe,IAAIC,EAAwBR,KAAgB,IAAI,GAE9ES,IAAe,CAACC,MAAyC;AAC7D,IAAAH,EAAgBG,EAAM,OAAO,KAAK,GAClCL,EAAWK,EAAM,OAAO,KAAK;AAAA,EAAA;AAG/B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO,0CAA0C;AAAA,QACjDA,EAAO,mDAAmDX,CAAa,EAAE;AAAA,MAAA;AAAA,MAG1E,UAAA;AAAA,QAAAD,KACC,gBAAAa,EAACC,GAAA,EAAM,SAAQ,IAAG,UAAAZ,GACf,UAAAF,GACH;AAAA,QAEF,gBAAAU,EAAC,OAAA,EAAI,WAAWE,EAAO,8CAA8C,GACnE,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF,EAAKC,EAAO,oCAAoC,GAAG;AAAA,gBAC5D,CAACA,EAAO,mDAAmD,CAAC,GAAGT;AAAA,cAAA,CAChE;AAAA,cAEA,UAAAN,EAAQ,IAAI,CAAC,EAAE,OAAAG,GAAO,OAAAe,GAAO,UAAAC,GAAU,UAAAC,EAAA,MACtC,gBAAAJ;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBACL,MAAMpB;AAAA,kBAEN,OAAOE;AAAAA,kBACP,OAAAe;AAAA,kBACA,UAAAC;AAAA,kBACA,SAASX,MAAiBU;AAAA,kBAC1B,UAAAE;AAAA,kBACA,YAAYT;AAAA,gBAAA;AAAA,gBANP,GAAGO,CAAK;AAAA,cAAA,CAQhB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEFZ,MAAqB,MAAM,gBAAAU,EAACM,KAAY,OAAM,SAAQ,UAAUhB,EAAA,CAAkB;AAAA,QAAA,EAAA,CACrF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -3,3 +3,4 @@ import { RadioTabSelectorProps } from './RadioTabSelector';
3
3
  declare const _default: Meta<RadioTabSelectorProps>;
4
4
  export default _default;
5
5
  export declare const RadioTabSelectorExample: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RadioTabSelectorProps>;
6
+ export declare const WithIcons: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, RadioTabSelectorProps>;
@@ -1,7 +1,7 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { l as o } from "../../index-DFu0GqDc.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { l as t } from "../../index-DFu0GqDc.js";
3
3
  import { RadioTabSelector as e } from "./RadioTabSelector.js";
4
- const l = "<RadioTabSelector radioButtons={} defaultValue={} label={} labelPosition={} required={} notValidatedText={} onSetValue={} />", u = {
4
+ const i = "<RadioTabSelector radioButtons={} defaultValue={} label={} labelPosition={} required={} notValidatedText={} onSetValue={} />", b = {
5
5
  title: "Molecules/RadioTabSelector",
6
6
  component: e,
7
7
  argTypes: {
@@ -36,9 +36,9 @@ const l = "<RadioTabSelector radioButtons={} defaultValue={} label={} labelPosit
36
36
  },
37
37
  parameters: {
38
38
  inspectComponent: e,
39
- codeString: l
39
+ codeString: i
40
40
  }
41
- }, i = (t) => /* @__PURE__ */ a(e, { ...t }), r = i.bind({});
41
+ }, a = (l) => /* @__PURE__ */ o(e, { ...l }), r = a.bind({});
42
42
  r.args = {
43
43
  buttons: [
44
44
  { label: "Digitaal", value: "digitaal" },
@@ -51,10 +51,26 @@ r.args = {
51
51
  labelPosition: "top",
52
52
  required: !0,
53
53
  notValidatedText: "",
54
- onSetValue: o()
54
+ onSetValue: t()
55
+ };
56
+ const n = a.bind({});
57
+ n.args = {
58
+ buttons: [
59
+ { label: "Digitaal", value: "digitaal", iconName: "SignalActive" },
60
+ { label: "Schriftelijk", value: "schriftelijk", iconName: "Pencil" },
61
+ { label: "Presentatie", value: "presentatie", iconName: "User" }
62
+ ],
63
+ defaultValue: "digitaal",
64
+ radioGroupName: "radio-group",
65
+ label: "Toetsvorm",
66
+ labelPosition: "top",
67
+ required: !0,
68
+ notValidatedText: "",
69
+ onSetValue: t()
55
70
  };
56
71
  export {
57
72
  r as RadioTabSelectorExample,
58
- u as default
73
+ n as WithIcons,
74
+ b as default
59
75
  };
60
76
  //# sourceMappingURL=RadioTabSelector.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioTabSelector.stories.js","sources":["../../../src/components/RadioTabSelector/RadioTabSelector.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\r\n\r\nimport type { Meta, StoryFn } from '@storybook/react';\r\nimport type { RadioTabSelectorProps } from './RadioTabSelector'; // Already imported above\r\n\r\nimport { RadioTabSelector } from './RadioTabSelector';\r\n\r\nconst codeString =\r\n '<RadioTabSelector radioButtons={} defaultValue={} label={} labelPosition={} required={} notValidatedText={} onSetValue={} />';\r\n\r\n// eslint-disable-next-line import/no-default-export\r\nexport default {\r\n title: 'Molecules/RadioTabSelector',\r\n component: RadioTabSelector,\r\n argTypes: {\r\n radioButtons: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n defaultValue: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n label: {\r\n control: 'text',\r\n },\r\n labelPosition: {\r\n control: 'radio',\r\n options: ['top', 'left'],\r\n },\r\n required: {\r\n control: 'boolean',\r\n },\r\n notValidatedText: {\r\n control: 'text',\r\n },\r\n onSetValue: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n },\r\n parameters: {\r\n inspectComponent: RadioTabSelector,\r\n codeString: codeString,\r\n },\r\n} as Meta<RadioTabSelectorProps>;\r\n\r\nconst Template: StoryFn<RadioTabSelectorProps> = (args) => <RadioTabSelector {...args} />;\r\n\r\nexport const RadioTabSelectorExample = Template.bind({});\r\nRadioTabSelectorExample.args = {\r\n buttons: [\r\n { label: 'Digitaal', value: 'digitaal' },\r\n { label: 'Schriftelijk', value: 'schriftelijk' },\r\n { label: 'Presentatie', value: 'presentatie' },\r\n ],\r\n defaultValue: 'digitaal',\r\n radioGroupName: 'radio-group',\r\n label: 'Toetsvorm',\r\n labelPosition: 'top',\r\n required: true,\r\n notValidatedText: '',\r\n onSetValue: fn(),\r\n};\r\n"],"names":["codeString","RadioTabSelector_stories","RadioTabSelector","Template","args","jsx","RadioTabSelectorExample","fn"],"mappings":";;;AAOA,MAAMA,IACJ,gIAGFC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,OAAO;AAAA,MACL,SAAS;AAAA,IAAA;AAAA,IAEX,eAAe;AAAA,MACb,SAAS;AAAA,MACT,SAAS,CAAC,OAAO,MAAM;AAAA,IAAA;AAAA,IAEzB,UAAU;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,IAEX,kBAAkB;AAAA,MAChB,SAAS;AAAA,IAAA;AAAA,IAEX,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAA2C,CAACC,MAAS,gBAAAC,EAACH,GAAA,EAAkB,GAAGE,GAAM,GAE1EE,IAA0BH,EAAS,KAAK,CAAA,CAAE;AACvDG,EAAwB,OAAO;AAAA,EAC7B,SAAS;AAAA,IACP,EAAE,OAAO,YAAY,OAAO,WAAA;AAAA,IAC5B,EAAE,OAAO,gBAAgB,OAAO,eAAA;AAAA,IAChC,EAAE,OAAO,eAAe,OAAO,cAAA;AAAA,EAAc;AAAA,EAE/C,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,YAAYC,EAAA;AACd;"}
1
+ {"version":3,"file":"RadioTabSelector.stories.js","sources":["../../../src/components/RadioTabSelector/RadioTabSelector.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\r\n\r\nimport type { Meta, StoryFn } from '@storybook/react';\r\nimport type { RadioTabSelectorProps } from './RadioTabSelector'; // Already imported above\r\n\r\nimport { RadioTabSelector } from './RadioTabSelector';\r\n\r\nconst codeString =\r\n '<RadioTabSelector radioButtons={} defaultValue={} label={} labelPosition={} required={} notValidatedText={} onSetValue={} />';\r\n\r\n// eslint-disable-next-line import/no-default-export\r\nexport default {\r\n title: 'Molecules/RadioTabSelector',\r\n component: RadioTabSelector,\r\n argTypes: {\r\n radioButtons: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n defaultValue: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n label: {\r\n control: 'text',\r\n },\r\n labelPosition: {\r\n control: 'radio',\r\n options: ['top', 'left'],\r\n },\r\n required: {\r\n control: 'boolean',\r\n },\r\n notValidatedText: {\r\n control: 'text',\r\n },\r\n onSetValue: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n },\r\n parameters: {\r\n inspectComponent: RadioTabSelector,\r\n codeString: codeString,\r\n },\r\n} as Meta<RadioTabSelectorProps>;\r\n\r\nconst Template: StoryFn<RadioTabSelectorProps> = (args) => <RadioTabSelector {...args} />;\r\n\r\nexport const RadioTabSelectorExample = Template.bind({});\r\nRadioTabSelectorExample.args = {\r\n buttons: [\r\n { label: 'Digitaal', value: 'digitaal' },\r\n { label: 'Schriftelijk', value: 'schriftelijk' },\r\n { label: 'Presentatie', value: 'presentatie' },\r\n ],\r\n defaultValue: 'digitaal',\r\n radioGroupName: 'radio-group',\r\n label: 'Toetsvorm',\r\n labelPosition: 'top',\r\n required: true,\r\n notValidatedText: '',\r\n onSetValue: fn(),\r\n};\r\n\r\nexport const WithIcons = Template.bind({});\r\nWithIcons.args = {\r\n buttons: [\r\n { label: 'Digitaal', value: 'digitaal', iconName: 'SignalActive' },\r\n { label: 'Schriftelijk', value: 'schriftelijk', iconName: 'Pencil' },\r\n { label: 'Presentatie', value: 'presentatie', iconName: 'User' },\r\n ],\r\n defaultValue: 'digitaal',\r\n radioGroupName: 'radio-group',\r\n label: 'Toetsvorm',\r\n labelPosition: 'top',\r\n required: true,\r\n notValidatedText: '',\r\n onSetValue: fn(),\r\n};\r\n"],"names":["codeString","RadioTabSelector_stories","RadioTabSelector","Template","args","jsx","RadioTabSelectorExample","fn","WithIcons"],"mappings":";;;AAOA,MAAMA,IACJ,gIAGFC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,OAAO;AAAA,MACL,SAAS;AAAA,IAAA;AAAA,IAEX,eAAe;AAAA,MACb,SAAS;AAAA,MACT,SAAS,CAAC,OAAO,MAAM;AAAA,IAAA;AAAA,IAEzB,UAAU;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,IAEX,kBAAkB;AAAA,MAChB,SAAS;AAAA,IAAA;AAAA,IAEX,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAA2C,CAACC,MAAS,gBAAAC,EAACH,GAAA,EAAkB,GAAGE,GAAM,GAE1EE,IAA0BH,EAAS,KAAK,CAAA,CAAE;AACvDG,EAAwB,OAAO;AAAA,EAC7B,SAAS;AAAA,IACP,EAAE,OAAO,YAAY,OAAO,WAAA;AAAA,IAC5B,EAAE,OAAO,gBAAgB,OAAO,eAAA;AAAA,IAChC,EAAE,OAAO,eAAe,OAAO,cAAA;AAAA,EAAc;AAAA,EAE/C,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,YAAYC,EAAA;AACd;AAEO,MAAMC,IAAYL,EAAS,KAAK,CAAA,CAAE;AACzCK,EAAU,OAAO;AAAA,EACf,SAAS;AAAA,IACP,EAAE,OAAO,YAAY,OAAO,YAAY,UAAU,eAAA;AAAA,IAClD,EAAE,OAAO,gBAAgB,OAAO,gBAAgB,UAAU,SAAA;AAAA,IAC1D,EAAE,OAAO,eAAe,OAAO,eAAe,UAAU,OAAA;AAAA,EAAO;AAAA,EAEjE,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,YAAYD,EAAA;AACd;"}
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.36.1",
5
+ "version": "3.37.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",