@uva-glass/component-library 3.39.1 → 3.40.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 +1 @@
1
- ._controls-input_1hbz5_1{aspect-ratio:unset;cursor:pointer;height:0;opacity:0;position:absolute;width:0}._controls-input_1hbz5_1:focus-visible+label{outline:.125rem dotted var(--new-color-navy-600);outline-offset:.125rem}._controls-input_1hbz5_1:checked+label{background-color:var(--new-color-grey-200);border:1px solid var(--new-color-grey-700);font-weight:var(--semibold)}._controls-input_1hbz5_1:disabled+label,._controls-input_1hbz5_1:disabled:hover+label{background-color:var(--new-color-grey-400);color:var(--new-color-grey-700);cursor:not-allowed}._controls-input_1hbz5_1:hover+label{background-color:var(--new-color-grey-300)}._controls-button_1hbz5_32{align-items:center;background-color:var(--new-color-uva-white);border:1px solid transparent;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:var(--font-size-default);height:2.25rem;justify-content:center;min-width:2.25rem;padding:.5rem;position:relative;-webkit-user-select:none;user-select:none;white-space:nowrap}._controls-button--squared_1hbz5_50{width:2.25rem}._controls-button_1hbz5_32:after{content:"";min-height:2.625rem;min-width:2.625rem;position:absolute;width:100%}._controls-button--with-prefix_1hbz5_62{height:auto;padding:.125rem .5rem;width:auto}._controls-button--with-icon_1hbz5_68{gap:.5rem}._controls-button__wrapper_1hbz5_72{align-items:center;display:flex;flex-direction:column}._controls-button__prefix_1hbz5_78{color:var(--new-color-grey-700);font-size:var(--font-size-text-non-essential)}._controls-button__tooltip_1hbz5_83{background-color:var(--new-color-uva-white);box-shadow:0 0 .25rem #00000040;color:var(--new-color-grey-700);display:none;font-size:var(--font-size-text-non-essential);font-style:italic;font-weight:400;left:50%;padding:.5rem 1rem;position:absolute;text-align:center;top:calc(100% + .5rem);transform:translate(-50%);z-index:1}._controls-button__tooltip_1hbz5_83:before{border-color:transparent transparent var(--new-color-grey-400) transparent;border-style:solid;border-width:.5rem;bottom:calc(100% + .125rem);content:"";filter:blur(.125rem);left:50%;position:absolute;transform:translate(-50%);z-index:-1}._controls-button__tooltip_1hbz5_83:after{border-color:transparent transparent var(--new-color-uva-white) transparent;border-style:solid;border-width:.5rem;bottom:100%;content:"";left:50%;position:absolute;transform:translate(-50%)}._controls-button_1hbz5_32:hover ._controls-button__tooltip_1hbz5_83,._controls-input_1hbz5_1:focus-visible+label ._controls-button__tooltip_1hbz5_83{display:block}
1
+ ._controls-input_lu12f_1{aspect-ratio:unset;cursor:pointer;height:0;opacity:0;position:absolute;width:0}._controls-input_lu12f_1:focus-visible+label{outline:.125rem dotted var(--new-color-navy-600);outline-offset:.125rem}._controls-input_lu12f_1:checked+label{background-color:var(--new-color-grey-200);border:1px solid var(--new-color-grey-700);font-weight:var(--semibold)}._controls-input_lu12f_1:disabled+label,._controls-input_lu12f_1:disabled:hover+label{background-color:var(--new-color-grey-400);color:var(--new-color-grey-700);cursor:not-allowed}._controls-input_lu12f_1:hover+label{background-color:var(--new-color-grey-300)}._controls-button_lu12f_32{align-items:center;background-color:var(--new-color-uva-white);border:1px solid transparent;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:var(--font-size-default);height:2.25rem;justify-content:center;min-width:2.25rem;padding:.5rem;position:relative;-webkit-user-select:none;user-select:none;white-space:nowrap}._controls-button--squared_lu12f_50{width:2.25rem}._controls-button_lu12f_32:after{content:"";min-height:2.625rem;min-width:2.625rem;position:absolute;width:100%}._controls-button--with-prefix_lu12f_62{height:auto;padding:.125rem .5rem;width:auto}._controls-button--with-icon_lu12f_68{gap:.5rem}._controls-button__wrapper_lu12f_72{align-items:center;display:flex;flex-direction:column}._controls-button__prefix_lu12f_78{color:var(--new-color-grey-700);font-size:var(--font-size-text-non-essential)}._controls-button__tooltip_lu12f_83{background-color:var(--new-color-uva-white);box-shadow:0 0 .25rem #00000040;color:var(--new-color-grey-700);display:none;font-size:var(--font-size-text-non-essential);font-style:italic;font-weight:400;padding:.5rem 1rem;position:absolute;text-align:center;top:calc(100% + .5rem);z-index:1}._controls-button__tooltip--left_lu12f_98{left:0rem}._controls-button__tooltip--center_lu12f_102{left:50%;transform:translate(-50%)}._controls-button__tooltip--right_lu12f_107{right:0rem}._controls-button__tooltip_lu12f_83:before{border-color:transparent transparent var(--new-color-grey-400) transparent;border-style:solid;border-width:.5rem;bottom:calc(100% + .125rem);content:"";filter:blur(.125rem);position:absolute;z-index:-1}._controls-button__tooltip_lu12f_83:after{border-color:transparent transparent var(--new-color-uva-white) transparent;border-style:solid;border-width:.5rem;bottom:100%;content:"";position:absolute}._controls-button_lu12f_32:hover ._controls-button__tooltip_lu12f_83,._controls-input_lu12f_1:focus-visible+label ._controls-button__tooltip_lu12f_83{display:block}._controls-button__tooltip--left_lu12f_98:before,._controls-button__tooltip--left_lu12f_98:after{left:.5rem}._controls-button__tooltip--center_lu12f_102:before,._controls-button__tooltip--center_lu12f_102:after{left:50%;transform:translate(-50%)}._controls-button__tooltip--right_lu12f_107:before,._controls-button__tooltip--right_lu12f_107:after{right:.5rem}
@@ -4,6 +4,7 @@ type CheckboxProps = {
4
4
  value: string;
5
5
  prefix?: string;
6
6
  tooltip?: ReactNode;
7
+ tooltipPosition?: 'left' | 'center' | 'right';
7
8
  disabled?: boolean;
8
9
  };
9
10
  export interface CheckboxButtonBarProps {
@@ -1,9 +1,9 @@
1
1
  import { jsxs as k, jsx as c } from "react/jsx-runtime";
2
- import { useState as N } from "react";
2
+ import { useState as S } from "react";
3
3
  import { c as x } from "../../clsx-OuTLNxxd.js";
4
- import { Label as S } from "../Label/Label.js";
5
- import { FeedbackBox as j } from "../FeedbackBox/FeedbackBox.js";
6
- import { ControlsButton as y } from "../ControlsButton/ControlsButton.js";
4
+ import { Label as j } from "../Label/Label.js";
5
+ import { FeedbackBox as y } from "../FeedbackBox/FeedbackBox.js";
6
+ import { ControlsButton as F } from "../ControlsButton/ControlsButton.js";
7
7
  import '../../assets/CheckboxButtonBar.css';const t = {
8
8
  "checkbox-button-bar__container": "_checkbox-button-bar__container_5gd9n_1",
9
9
  "checkbox-button-bar__container--label-left": "_checkbox-button-bar__container--label-left_5gd9n_5",
@@ -12,7 +12,7 @@ import '../../assets/CheckboxButtonBar.css';const t = {
12
12
  "checkbox-button-bar__row": "_checkbox-button-bar__row_5gd9n_15",
13
13
  "checkbox-button-bar__row--not-validated": "_checkbox-button-bar__row--not-validated_5gd9n_30",
14
14
  "checkbox-button-bar__footer": "_checkbox-button-bar__footer_5gd9n_33"
15
- }, D = ({
15
+ }, E = ({
16
16
  checkboxes: d,
17
17
  defaultValues: r,
18
18
  label: a,
@@ -25,7 +25,7 @@ import '../../assets/CheckboxButtonBar.css';const t = {
25
25
  disableGroup: p = !1,
26
26
  onSetValues: i
27
27
  }) => {
28
- const [h, s] = N(
28
+ const [h, s] = S(
29
29
  r && !n ? r.map(String) : r && n ? r.slice(0, 1) : []
30
30
  ), g = (e) => {
31
31
  let o = h;
@@ -39,7 +39,7 @@ import '../../assets/CheckboxButtonBar.css';const t = {
39
39
  t[`checkbox-button-bar__container--label-${u}`]
40
40
  ),
41
41
  children: [
42
- a && /* @__PURE__ */ c(S, { htmlFor: "", required: m, children: a }),
42
+ a && /* @__PURE__ */ c(j, { htmlFor: "", required: m, children: a }),
43
43
  /* @__PURE__ */ k("div", { className: t["checkbox-button-bar__row-container"], children: [
44
44
  /* @__PURE__ */ c(
45
45
  "div",
@@ -47,31 +47,32 @@ import '../../assets/CheckboxButtonBar.css';const t = {
47
47
  className: x(t["checkbox-button-bar__row"], {
48
48
  [t["checkbox-button-bar__row--not-validated"]]: f || b
49
49
  }),
50
- children: d.map(({ label: e, value: o, prefix: _, tooltip: w, disabled: v }) => /* @__PURE__ */ c(
51
- y,
50
+ children: d.map(({ label: e, value: o, prefix: _, tooltip: w, tooltipPosition: v, disabled: C }) => /* @__PURE__ */ c(
51
+ F,
52
52
  {
53
53
  type: "checkbox",
54
54
  label: e,
55
55
  prefix: _,
56
56
  tooltip: w,
57
+ tooltipPosition: v,
57
58
  forceSquared: !0,
58
59
  value: o,
59
60
  checked: h.includes(o),
60
- disabled: v || p,
61
- onSetValue: (C) => g(C.target.value)
61
+ disabled: C || p,
62
+ onSetValue: (N) => g(N.target.value)
62
63
  },
63
64
  `${o}`
64
65
  ))
65
66
  }
66
67
  ),
67
68
  l && /* @__PURE__ */ c("div", { className: t["checkbox-button-bar__footer"], children: l }),
68
- b !== "" && /* @__PURE__ */ c(j, { level: "error", feedback: b })
69
+ b !== "" && /* @__PURE__ */ c(y, { level: "error", feedback: b })
69
70
  ] })
70
71
  ]
71
72
  }
72
73
  );
73
74
  };
74
75
  export {
75
- D as CheckboxButtonBar
76
+ E as CheckboxButtonBar
76
77
  };
77
78
  //# 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 type { ReactNode } from 'react';\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 prefix?: string;\n tooltip?: ReactNode;\n disabled?: boolean;\n};\n\nexport interface CheckboxButtonBarProps {\n /** array with objects with label, value, prefix and disabled*/\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, prefix, tooltip, disabled }) => (\n <ControlsButton\n key={`${value}`}\n type=\"checkbox\"\n label={label}\n prefix={prefix}\n tooltip={tooltip}\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","prefix","tooltip","disabled","ControlsButton","event","F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KAAgBC;AAAA,cAAA,CACtE;AAAA,cAEA,UAAAN,EAAW,IAAI,CAAC,EAAE,OAAAE,GAAO,OAAAa,GAAO,QAAAQ,GAAQ,SAAAC,GAAS,UAAAC,EAAA,MAChD,gBAAAJ;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBAEC,MAAK;AAAA,kBACL,OAAOxB;AAAAA,kBACP,QAAAqB;AAAA,kBACA,SAAAC;AAAA,kBACA,cAAc;AAAA,kBACd,OAAAT;AAAA,kBACA,SAASJ,EAAc,SAASI,CAAK;AAAA,kBACrC,UAAUU,KAAYhB;AAAA,kBACtB,YAAY,CAACkB,MAAUb,EAAaa,EAAM,OAAO,KAAK;AAAA,gBAAA;AAAA,gBATjD,GAAGZ,CAAK;AAAA,cAAA,CAWhB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEFP,KAAc,gBAAAa,EAAC,OAAA,EAAI,WAAWD,EAAO,6BAA6B,GAAI,UAAAZ,GAAW;AAAA,UACjFF,MAAqB,MAAM,gBAAAe,EAACO,KAAY,OAAM,SAAQ,UAAUtB,EAAA,CAAkB;AAAA,QAAA,EAAA,CACrF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"CheckboxButtonBar.js","sources":["../../../src/components/CheckboxButtonBar/CheckboxButtonBar.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport type { ReactNode } from 'react';\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 prefix?: string;\n tooltip?: ReactNode;\n tooltipPosition?: 'left' | 'center' | 'right';\n disabled?: boolean;\n};\n\nexport interface CheckboxButtonBarProps {\n /** array with objects with label, value, prefix and disabled*/\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, prefix, tooltip, tooltipPosition, disabled }) => (\n <ControlsButton\n key={`${value}`}\n type=\"checkbox\"\n label={label}\n prefix={prefix}\n tooltip={tooltip}\n tooltipPosition={tooltipPosition}\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","prefix","tooltip","tooltipPosition","disabled","ControlsButton","event","FeedbackBox"],"mappings":";;;;;;;;;;;;;;GA2CaA,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;AAC5B,QAAM,CAACC,GAAeC,CAAgB,IAAIC;AAAA,IACxCZ,KAAiB,CAACM,IACdN,EAAc,IAAI,MAAM,IACxBA,KAAiBM,IACfN,EAAc,MAAM,GAAG,CAAC,IACxB,CAAA;AAAA,EAAC,GAGHa,IAAe,CAACC,MAAkB;AACtC,QAAIC,IAASL;AAEb,IAAIJ,KACFK,EAAiB,CAACG,CAAK,CAAC,GACxBL,EAAY,CAACK,CAAK,CAAC,MAEfC,EAAO,SAASD,CAAK,IACvBC,IAASA,EAAO,OAAO,CAACC,MAAQA,MAAQF,CAAK,IAE7CC,IAAS,CAAC,GAAGA,GAAQD,CAAK,GAE5BH,EAAiBI,CAAM,GACvBN,EAAYM,CAAM;AAAA,EACpB;AAGF,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO,gCAAgC;AAAA,QACvCA,EAAO,yCAAyCjB,CAAa,EAAE;AAAA,MAAA;AAAA,MAGhE,UAAA;AAAA,QAAAD,KACC,gBAAAmB,EAACC,GAAA,EAAM,SAAQ,IAAG,UAAAlB,GACf,UAAAF,GACH;AAAA,QAEF,gBAAAgB,EAAC,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,QAAAQ,GAAQ,SAAAC,GAAS,iBAAAC,GAAiB,UAAAC,EAAA,MACjE,gBAAAL;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBAEC,MAAK;AAAA,kBACL,OAAOzB;AAAAA,kBACP,QAAAqB;AAAA,kBACA,SAAAC;AAAA,kBACA,iBAAAC;AAAA,kBACA,cAAc;AAAA,kBACd,OAAAV;AAAA,kBACA,SAASJ,EAAc,SAASI,CAAK;AAAA,kBACrC,UAAUW,KAAYjB;AAAA,kBACtB,YAAY,CAACmB,MAAUd,EAAac,EAAM,OAAO,KAAK;AAAA,gBAAA;AAAA,gBAVjD,GAAGb,CAAK;AAAA,cAAA,CAYhB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEFP,KAAc,gBAAAa,EAAC,OAAA,EAAI,WAAWD,EAAO,6BAA6B,GAAI,UAAAZ,GAAW;AAAA,UACjFF,MAAqB,MAAM,gBAAAe,EAACQ,KAAY,OAAM,SAAQ,UAAUvB,EAAA,CAAkB;AAAA,QAAA,EAAA,CACrF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as l, Fragment as t } from "react/jsx-runtime";
2
- import { l as a } from "../../index-BYGu3RV5.js";
2
+ import { l as o } from "../../index-BYGu3RV5.js";
3
3
  import { CheckboxButtonBar as r } from "./CheckboxButtonBar.js";
4
4
  const b = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosition={} required={} notValidatedText={} disableGroup={} onSetValues={} />", f = {
5
5
  title: "Molecules/CheckboxButtonBar",
@@ -44,7 +44,7 @@ const b = "<CheckboxButtonBar checkboxes={} defaultValues={} label={} labelPosit
44
44
  inspectComponent: r,
45
45
  codeString: b
46
46
  }
47
- }, o = (i) => /* @__PURE__ */ e(r, { ...i }), u = o.bind({});
47
+ }, a = (i) => /* @__PURE__ */ e(r, { ...i }), u = a.bind({});
48
48
  u.args = {
49
49
  label: "Periode",
50
50
  required: !0,
@@ -77,9 +77,9 @@ u.args = {
77
77
  defaultValues: ["1", "2"],
78
78
  labelPosition: "top",
79
79
  footerText: "Weken in periode 2",
80
- onSetValues: a()
80
+ onSetValues: o()
81
81
  };
82
- const n = o.bind({});
82
+ const n = a.bind({});
83
83
  n.args = {
84
84
  label: "Weken",
85
85
  required: !0,
@@ -112,9 +112,9 @@ n.args = {
112
112
  defaultValues: ["1"],
113
113
  labelPosition: "top",
114
114
  actAsRadioButtonBar: !0,
115
- onSetValues: a()
115
+ onSetValues: o()
116
116
  };
117
- const s = o.bind({});
117
+ const s = a.bind({});
118
118
  s.args = {
119
119
  label: "Weken",
120
120
  required: !0,
@@ -153,9 +153,9 @@ s.args = {
153
153
  defaultValues: ["1"],
154
154
  labelPosition: "top",
155
155
  actAsRadioButtonBar: !1,
156
- onSetValues: a()
156
+ onSetValues: o()
157
157
  };
158
- const p = o.bind({});
158
+ const p = a.bind({});
159
159
  p.args = {
160
160
  label: "Weken",
161
161
  required: !0,
@@ -168,7 +168,8 @@ p.args = {
168
168
  "1 sept - 5 sept",
169
169
  /* @__PURE__ */ e("br", {}),
170
170
  "2025"
171
- ] })
171
+ ] }),
172
+ tooltipPosition: "left"
172
173
  },
173
174
  {
174
175
  label: "2",
@@ -238,13 +239,14 @@ p.args = {
238
239
  "20 okt - 24 okt",
239
240
  /* @__PURE__ */ e("br", {}),
240
241
  "2025"
241
- ] })
242
+ ] }),
243
+ tooltipPosition: "right"
242
244
  }
243
245
  ],
244
246
  defaultValues: ["1"],
245
247
  labelPosition: "top",
246
248
  actAsRadioButtonBar: !1,
247
- onSetValues: a()
249
+ onSetValues: o()
248
250
  };
249
251
  export {
250
252
  n as CheckboxButtonBarAsRadioButtonBar,
@@ -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 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\nexport const CheckboxButtonBarWithPrefix = Template.bind({});\nCheckboxButtonBarWithPrefix.args = {\n label: 'Weken',\n required: true,\n checkboxes: [\n {\n label: '1',\n value: '1',\n prefix: '13',\n },\n {\n label: '2',\n value: '2',\n prefix: '14',\n },\n {\n label: '3',\n value: '3',\n prefix: '15',\n },\n {\n label: '4',\n value: '4',\n prefix: '16',\n },\n {\n label: '5',\n value: '5',\n prefix: '17',\n },\n {\n label: '6',\n value: '6',\n prefix: '18',\n },\n ],\n defaultValues: ['1'],\n labelPosition: 'top',\n actAsRadioButtonBar: false,\n onSetValues: fn(),\n};\n\nexport const CheckboxButtonBarWithTooltip = Template.bind({});\nCheckboxButtonBarWithTooltip.args = {\n label: 'Weken',\n required: true,\n checkboxes: [\n {\n label: '1',\n value: '1',\n prefix: '36',\n tooltip: (\n <>\n 1 sept - 5 sept\n <br />\n 2025\n </>\n ),\n },\n {\n label: '2',\n value: '2',\n prefix: '37',\n tooltip: (\n <>\n 8 sept - 12 sept\n <br />\n 2025\n </>\n ),\n },\n {\n label: '3',\n value: '3',\n prefix: '38',\n tooltip: (\n <>\n 15 sept - 19 sept\n <br />\n 2025\n </>\n ),\n },\n {\n label: '4',\n value: '4',\n prefix: '39',\n tooltip: (\n <>\n 22 sept - 26 sept\n <br />\n 2025\n </>\n ),\n },\n {\n label: '5',\n value: '5',\n prefix: '40',\n tooltip: (\n <>\n 29 sept - 3 okt\n <br />\n 2025\n </>\n ),\n },\n {\n label: '6',\n value: '6',\n prefix: '41',\n tooltip: (\n <>\n 6 okt - 10 okt\n <br />\n 2025\n </>\n ),\n },\n {\n label: '7',\n value: '7',\n prefix: '42',\n tooltip: (\n <>\n 13 okt - 17 okt\n <br />\n 2025\n </>\n ),\n },\n {\n label: '8',\n value: '8',\n prefix: '43',\n tooltip: (\n <>\n 20 okt - 24 okt\n <br />\n 2025\n </>\n ),\n },\n ],\n defaultValues: ['1'],\n labelPosition: 'top',\n actAsRadioButtonBar: false,\n onSetValues: fn(),\n};\n"],"names":["codeString","CheckboxButtonBar_stories","CheckboxButtonBar","Template","args","jsx","CheckboxButtonBarExample","fn","CheckboxButtonBarAsRadioButtonBar","CheckboxButtonBarWithPrefix","CheckboxButtonBarWithTooltip","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IACJ,iJAGFC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,eAAe;AAAA,MACb,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,cAAc;AAAA,MACZ,SAAS;AAAA,IAAA;AAAA,IAEX,qBAAqB;AAAA,MACnB,SAAS;AAAA,IAAA;AAAA,IAEX,aAAa;AAAA,MACX,OAAO;AAAA,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A,IAAA;AAAA,EAEJ;AAAA,EAEF,eAAe,CAAC,GAAG;AAAA,EACnB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,aAAaL,EAAA;AACf;"}
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\nexport const CheckboxButtonBarWithPrefix = Template.bind({});\nCheckboxButtonBarWithPrefix.args = {\n label: 'Weken',\n required: true,\n checkboxes: [\n {\n label: '1',\n value: '1',\n prefix: '13',\n },\n {\n label: '2',\n value: '2',\n prefix: '14',\n },\n {\n label: '3',\n value: '3',\n prefix: '15',\n },\n {\n label: '4',\n value: '4',\n prefix: '16',\n },\n {\n label: '5',\n value: '5',\n prefix: '17',\n },\n {\n label: '6',\n value: '6',\n prefix: '18',\n },\n ],\n defaultValues: ['1'],\n labelPosition: 'top',\n actAsRadioButtonBar: false,\n onSetValues: fn(),\n};\n\nexport const CheckboxButtonBarWithTooltip = Template.bind({});\nCheckboxButtonBarWithTooltip.args = {\n label: 'Weken',\n required: true,\n checkboxes: [\n {\n label: '1',\n value: '1',\n prefix: '36',\n tooltip: (\n <>\n 1 sept - 5 sept\n <br />\n 2025\n </>\n ),\n tooltipPosition: 'left',\n },\n {\n label: '2',\n value: '2',\n prefix: '37',\n tooltip: (\n <>\n 8 sept - 12 sept\n <br />\n 2025\n </>\n ),\n },\n {\n label: '3',\n value: '3',\n prefix: '38',\n tooltip: (\n <>\n 15 sept - 19 sept\n <br />\n 2025\n </>\n ),\n },\n {\n label: '4',\n value: '4',\n prefix: '39',\n tooltip: (\n <>\n 22 sept - 26 sept\n <br />\n 2025\n </>\n ),\n },\n {\n label: '5',\n value: '5',\n prefix: '40',\n tooltip: (\n <>\n 29 sept - 3 okt\n <br />\n 2025\n </>\n ),\n },\n {\n label: '6',\n value: '6',\n prefix: '41',\n tooltip: (\n <>\n 6 okt - 10 okt\n <br />\n 2025\n </>\n ),\n },\n {\n label: '7',\n value: '7',\n prefix: '42',\n tooltip: (\n <>\n 13 okt - 17 okt\n <br />\n 2025\n </>\n ),\n },\n {\n label: '8',\n value: '8',\n prefix: '43',\n tooltip: (\n <>\n 20 okt - 24 okt\n <br />\n 2025\n </>\n ),\n tooltipPosition: 'right',\n },\n ],\n defaultValues: ['1'],\n labelPosition: 'top',\n actAsRadioButtonBar: false,\n onSetValues: fn(),\n};\n"],"names":["codeString","CheckboxButtonBar_stories","CheckboxButtonBar","Template","args","jsx","CheckboxButtonBarExample","fn","CheckboxButtonBarAsRadioButtonBar","CheckboxButtonBarWithPrefix","CheckboxButtonBarWithTooltip","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IACJ,iJAGFC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,eAAe;AAAA,MACb,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,cAAc;AAAA,MACZ,SAAS;AAAA,IAAA;AAAA,IAEX,qBAAqB;AAAA,MACnB,SAAS;AAAA,IAAA;AAAA,IAEX,aAAa;AAAA,MACX,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAA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f,qBAAqB;AAAA,EACrB,aAAaL,EAAA;AACf;"}
@@ -13,6 +13,8 @@ export interface ControlsButtonProps {
13
13
  prefix?: string;
14
14
  /** set tooltip */
15
15
  tooltip?: ReactNode;
16
+ /** set horizontal position of the tooltip */
17
+ tooltipPosition?: 'left' | 'center' | 'right';
16
18
  /** set if used as radiogroup */
17
19
  name?: string;
18
20
  /** `true` to set squared button; otherwise, `false`. The default is `false`. Note: hides icon */
@@ -24,4 +26,4 @@ export interface ControlsButtonProps {
24
26
  /** The callback function that is invoked when the radio button changes value. */
25
27
  onSetValue: (event: ChangeEvent<HTMLInputElement>) => void;
26
28
  }
27
- export declare const ControlsButton: ({ type, label, value, iconName, prefix, tooltip, name, forceSquared, checked, disabled, onSetValue, }: ControlsButtonProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const ControlsButton: ({ type, label, value, iconName, prefix, tooltip, tooltipPosition, name, forceSquared, checked, disabled, onSetValue, }: ControlsButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,67 +1,79 @@
1
- import { jsxs as l, Fragment as x, jsx as o } from "react/jsx-runtime";
2
- import { useId as z } from "react";
3
- import { c as w } from "../../clsx-OuTLNxxd.js";
4
- import { Icon as v } from "../Icon/Icon.js";
1
+ import { jsxs as s, Fragment as g, jsx as o } from "react/jsx-runtime";
2
+ import { useId as v } from "react";
3
+ import { c as e } from "../../clsx-OuTLNxxd.js";
4
+ import { Icon as I } from "../Icon/Icon.js";
5
5
  import '../../assets/ControlsButton.css';const t = {
6
- "controls-input": "_controls-input_1hbz5_1",
7
- "controls-button": "_controls-button_1hbz5_32",
8
- "controls-button--squared": "_controls-button--squared_1hbz5_50",
9
- "controls-button--with-prefix": "_controls-button--with-prefix_1hbz5_62",
10
- "controls-button--with-icon": "_controls-button--with-icon_1hbz5_68",
11
- "controls-button__wrapper": "_controls-button__wrapper_1hbz5_72",
12
- "controls-button__prefix": "_controls-button__prefix_1hbz5_78",
13
- "controls-button__tooltip": "_controls-button__tooltip_1hbz5_83"
14
- }, $ = ({
6
+ "controls-input": "_controls-input_lu12f_1",
7
+ "controls-button": "_controls-button_lu12f_32",
8
+ "controls-button--squared": "_controls-button--squared_lu12f_50",
9
+ "controls-button--with-prefix": "_controls-button--with-prefix_lu12f_62",
10
+ "controls-button--with-icon": "_controls-button--with-icon_lu12f_68",
11
+ "controls-button__wrapper": "_controls-button__wrapper_lu12f_72",
12
+ "controls-button__prefix": "_controls-button__prefix_lu12f_78",
13
+ "controls-button__tooltip": "_controls-button__tooltip_lu12f_83",
14
+ "controls-button__tooltip--left": "_controls-button__tooltip--left_lu12f_98",
15
+ "controls-button__tooltip--center": "_controls-button__tooltip--center_lu12f_102",
16
+ "controls-button__tooltip--right": "_controls-button__tooltip--right_lu12f_107"
17
+ }, y = ({
15
18
  type: b = "checkbox",
16
- label: _,
17
- value: u,
19
+ label: c,
20
+ value: p,
18
21
  iconName: n,
19
- prefix: r,
20
- tooltip: s,
21
- name: a,
22
- forceSquared: p = !1,
22
+ prefix: l,
23
+ tooltip: r,
24
+ tooltipPosition: a = "center",
25
+ name: f,
26
+ forceSquared: d = !1,
23
27
  checked: h,
24
- disabled: d,
25
- onSetValue: m
28
+ disabled: m,
29
+ onSetValue: x
26
30
  }) => {
27
- const f = z(), i = _.replace(/\s+/g, "_"), c = `${f}${i}`, e = `${c}-tooltip`;
28
- return /* @__PURE__ */ l(x, { children: [
31
+ const w = v(), i = c.replace(/\s+/g, "_"), _ = `${w}${i}`, u = `${_}-tooltip`;
32
+ return /* @__PURE__ */ s(g, { children: [
29
33
  /* @__PURE__ */ o(
30
34
  "input",
31
35
  {
32
36
  type: b,
33
- id: c,
34
- name: a ?? i,
35
- disabled: d,
36
- value: u,
37
+ id: _,
38
+ name: f ?? i,
39
+ disabled: m,
40
+ value: p,
37
41
  checked: h,
38
- onChange: m,
42
+ onChange: x,
39
43
  className: t["controls-input"],
40
- "aria-describedby": s ? e : void 0
44
+ "aria-describedby": r ? u : void 0
41
45
  }
42
46
  ),
43
- /* @__PURE__ */ l(
47
+ /* @__PURE__ */ s(
44
48
  "label",
45
49
  {
46
- htmlFor: c,
47
- className: w(t["controls-button"], [
48
- p && t["controls-button--squared"],
49
- r && t["controls-button--with-prefix"],
50
+ htmlFor: _,
51
+ className: e(t["controls-button"], [
52
+ d && t["controls-button--squared"],
53
+ l && t["controls-button--with-prefix"],
50
54
  n && t["controls-button--with-icon"]
51
55
  ]),
52
56
  children: [
53
- n && /* @__PURE__ */ o(v, { name: n, size: 20 }),
54
- /* @__PURE__ */ l("div", { className: t["controls-button__wrapper"], children: [
55
- r && /* @__PURE__ */ o("div", { className: t["controls-button__prefix"], children: r }),
56
- _
57
+ n && /* @__PURE__ */ o(I, { name: n, size: 20 }),
58
+ /* @__PURE__ */ s("div", { className: t["controls-button__wrapper"], children: [
59
+ l && /* @__PURE__ */ o("div", { className: t["controls-button__prefix"], children: l }),
60
+ c
57
61
  ] }),
58
- s && /* @__PURE__ */ o("div", { id: e, role: "tooltip", className: t["controls-button__tooltip"], children: s })
62
+ r && /* @__PURE__ */ o(
63
+ "div",
64
+ {
65
+ id: u,
66
+ role: "tooltip",
67
+ className: e(t["controls-button__tooltip"], t[`controls-button__tooltip--${a}`]),
68
+ children: r
69
+ }
70
+ )
59
71
  ]
60
72
  }
61
73
  )
62
74
  ] });
63
75
  };
64
76
  export {
65
- $ as ControlsButton
77
+ y as ControlsButton
66
78
  };
67
79
  //# sourceMappingURL=ControlsButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ControlsButton.js","sources":["../../../src/components/ControlsButton/ControlsButton.tsx"],"sourcesContent":["import { useId } from 'react';\r\nimport { clsx } from 'clsx';\r\n\r\nimport type { ChangeEvent, ReactNode } from 'react';\r\nimport type { IconProps } from 'components/Icon';\r\n\r\nimport styles from './ControlsButton.module.css';\r\n\r\nimport { Icon } from 'components/Icon';\r\n\r\nexport interface ControlsButtonProps {\r\n /** to set type/behaviour of input radio or checkbox */\r\n type?: 'radio' | 'checkbox';\r\n /** button label */\r\n label: string;\r\n /** button value */\r\n value: string;\r\n /** set if icon is needed in font of label */\r\n iconName?: IconProps['name'];\r\n /** set if prefix is needed above of label */\r\n prefix?: string;\r\n /** set tooltip */\r\n tooltip?: ReactNode;\r\n /** set if used as radiogroup */\r\n name?: string;\r\n /** `true` to set squared button; otherwise, `false`. The default is `false`. Note: hides icon */\r\n forceSquared?: boolean;\r\n /** to set default status */\r\n checked?: boolean;\r\n /** `true` to disable the button; otherwise, `false`. The default is `false`. */\r\n disabled?: boolean;\r\n /** The callback function that is invoked when the radio button changes value. */\r\n onSetValue: (event: ChangeEvent<HTMLInputElement>) => void;\r\n}\r\n\r\nexport const ControlsButton = ({\r\n type = 'checkbox',\r\n label,\r\n value,\r\n iconName,\r\n prefix,\r\n tooltip,\r\n name,\r\n forceSquared = false,\r\n checked,\r\n disabled,\r\n onSetValue,\r\n}: ControlsButtonProps) => {\r\n const idPrefix = useId();\r\n const sanitizedLabel = label.replace(/\\s+/g, '_');\r\n const baseId = `${idPrefix}${sanitizedLabel}`;\r\n const tooltipId = `${baseId}-tooltip`;\r\n\r\n return (\r\n <>\r\n <input\r\n type={type}\r\n id={baseId}\r\n name={name ?? sanitizedLabel}\r\n disabled={disabled}\r\n value={value}\r\n checked={checked}\r\n onChange={onSetValue}\r\n className={styles['controls-input']}\r\n aria-describedby={tooltip ? tooltipId : undefined}\r\n />\r\n <label\r\n htmlFor={baseId}\r\n className={clsx(styles['controls-button'], [\r\n forceSquared && styles['controls-button--squared'],\r\n prefix && styles['controls-button--with-prefix'],\r\n iconName && styles['controls-button--with-icon'],\r\n ])}\r\n >\r\n {iconName && <Icon name={iconName} size={20} />}\r\n <div className={styles['controls-button__wrapper']}>\r\n {prefix && <div className={styles['controls-button__prefix']}>{prefix}</div>}\r\n {label}\r\n </div>\r\n {tooltip && (\r\n <div id={tooltipId} role=\"tooltip\" className={styles['controls-button__tooltip']}>\r\n {tooltip}\r\n </div>\r\n )}\r\n </label>\r\n </>\r\n );\r\n};\r\n"],"names":["ControlsButton","type","label","value","iconName","prefix","tooltip","name","forceSquared","checked","disabled","onSetValue","idPrefix","useId","sanitizedLabel","baseId","tooltipId","jsxs","Fragment","jsx","styles","clsx","Icon"],"mappings":";;;;;;;;;;;;;GAmCaA,IAAiB,CAAC;AAAA,EAC7B,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,MAA2B;AACzB,QAAMC,IAAWC,EAAA,GACXC,IAAiBZ,EAAM,QAAQ,QAAQ,GAAG,GAC1Ca,IAAS,GAAGH,CAAQ,GAAGE,CAAc,IACrCE,IAAY,GAAGD,CAAM;AAE3B,SACE,gBAAAE,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAAlB;AAAA,QACA,IAAIc;AAAA,QACJ,MAAMR,KAAQO;AAAA,QACd,UAAAJ;AAAA,QACA,OAAAP;AAAA,QACA,SAAAM;AAAA,QACA,UAAUE;AAAA,QACV,WAAWS,EAAO,gBAAgB;AAAA,QAClC,oBAAkBd,IAAUU,IAAY;AAAA,MAAA;AAAA,IAAA;AAAA,IAE1C,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAASF;AAAA,QACT,WAAWM,EAAKD,EAAO,iBAAiB,GAAG;AAAA,UACzCZ,KAAgBY,EAAO,0BAA0B;AAAA,UACjDf,KAAUe,EAAO,8BAA8B;AAAA,UAC/ChB,KAAYgB,EAAO,4BAA4B;AAAA,QAAA,CAChD;AAAA,QAEA,UAAA;AAAA,UAAAhB,KAAY,gBAAAe,EAACG,GAAA,EAAK,MAAMlB,GAAU,MAAM,IAAI;AAAA,UAC7C,gBAAAa,EAAC,OAAA,EAAI,WAAWG,EAAO,0BAA0B,GAC9C,UAAA;AAAA,YAAAf,uBAAW,OAAA,EAAI,WAAWe,EAAO,yBAAyB,GAAI,UAAAf,GAAO;AAAA,YACrEH;AAAA,UAAA,GACH;AAAA,UACCI,KACC,gBAAAa,EAAC,OAAA,EAAI,IAAIH,GAAW,MAAK,WAAU,WAAWI,EAAO,0BAA0B,GAC5E,UAAAd,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
1
+ {"version":3,"file":"ControlsButton.js","sources":["../../../src/components/ControlsButton/ControlsButton.tsx"],"sourcesContent":["import { useId } from 'react';\r\nimport { clsx } from 'clsx';\r\n\r\nimport type { ChangeEvent, ReactNode } from 'react';\r\nimport type { IconProps } from 'components/Icon';\r\n\r\nimport styles from './ControlsButton.module.css';\r\n\r\nimport { Icon } from 'components/Icon';\r\n\r\nexport interface ControlsButtonProps {\r\n /** to set type/behaviour of input radio or checkbox */\r\n type?: 'radio' | 'checkbox';\r\n /** button label */\r\n label: string;\r\n /** button value */\r\n value: string;\r\n /** set if icon is needed in font of label */\r\n iconName?: IconProps['name'];\r\n /** set if prefix is needed above of label */\r\n prefix?: string;\r\n /** set tooltip */\r\n tooltip?: ReactNode;\r\n /** set horizontal position of the tooltip */\r\n tooltipPosition?: 'left' | 'center' | 'right';\r\n /** set if used as radiogroup */\r\n name?: string;\r\n /** `true` to set squared button; otherwise, `false`. The default is `false`. Note: hides icon */\r\n forceSquared?: boolean;\r\n /** to set default status */\r\n checked?: boolean;\r\n /** `true` to disable the button; otherwise, `false`. The default is `false`. */\r\n disabled?: boolean;\r\n /** The callback function that is invoked when the radio button changes value. */\r\n onSetValue: (event: ChangeEvent<HTMLInputElement>) => void;\r\n}\r\n\r\nexport const ControlsButton = ({\r\n type = 'checkbox',\r\n label,\r\n value,\r\n iconName,\r\n prefix,\r\n tooltip,\r\n tooltipPosition = 'center',\r\n name,\r\n forceSquared = false,\r\n checked,\r\n disabled,\r\n onSetValue,\r\n}: ControlsButtonProps) => {\r\n const idPrefix = useId();\r\n const sanitizedLabel = label.replace(/\\s+/g, '_');\r\n const baseId = `${idPrefix}${sanitizedLabel}`;\r\n const tooltipId = `${baseId}-tooltip`;\r\n\r\n return (\r\n <>\r\n <input\r\n type={type}\r\n id={baseId}\r\n name={name ?? sanitizedLabel}\r\n disabled={disabled}\r\n value={value}\r\n checked={checked}\r\n onChange={onSetValue}\r\n className={styles['controls-input']}\r\n aria-describedby={tooltip ? tooltipId : undefined}\r\n />\r\n <label\r\n htmlFor={baseId}\r\n className={clsx(styles['controls-button'], [\r\n forceSquared && styles['controls-button--squared'],\r\n prefix && styles['controls-button--with-prefix'],\r\n iconName && styles['controls-button--with-icon'],\r\n ])}\r\n >\r\n {iconName && <Icon name={iconName} size={20} />}\r\n <div className={styles['controls-button__wrapper']}>\r\n {prefix && <div className={styles['controls-button__prefix']}>{prefix}</div>}\r\n {label}\r\n </div>\r\n {tooltip && (\r\n <div\r\n id={tooltipId}\r\n role=\"tooltip\"\r\n className={clsx(styles['controls-button__tooltip'], styles[`controls-button__tooltip--${tooltipPosition}`])}\r\n >\r\n {tooltip}\r\n </div>\r\n )}\r\n </label>\r\n </>\r\n );\r\n};\r\n"],"names":["ControlsButton","type","label","value","iconName","prefix","tooltip","tooltipPosition","name","forceSquared","checked","disabled","onSetValue","idPrefix","useId","sanitizedLabel","baseId","tooltipId","jsxs","Fragment","jsx","styles","clsx","Icon"],"mappings":";;;;;;;;;;;;;;;;GAqCaA,IAAiB,CAAC;AAAA,EAC7B,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,MAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,MAA2B;AACzB,QAAMC,IAAWC,EAA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,8 @@
1
- import { jsx as l, jsxs as a, Fragment as r } from "react/jsx-runtime";
2
- import { l as e } from "../../index-BYGu3RV5.js";
1
+ import { jsx as n, jsxs as a, Fragment as r } from "react/jsx-runtime";
2
+ import { l as o } from "../../index-BYGu3RV5.js";
3
3
  import { ControlsButton as t } from "./ControlsButton.js";
4
4
  import { Icons as c } from "../Icon/icons/index.js";
5
- const s = Object.keys(c), i = "<ControlsButton type={radio or checkbox} label={} value={} prefix={} tooltip={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />", S = {
5
+ const i = Object.keys(c), s = "<ControlsButton type={radio or checkbox} label={} value={} prefix={} tooltip={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />", S = {
6
6
  title: "Atoms/ControlsButton",
7
7
  component: t,
8
8
  argTypes: {
@@ -14,7 +14,7 @@ const s = Object.keys(c), i = "<ControlsButton type={radio or checkbox} label={}
14
14
  },
15
15
  iconName: {
16
16
  control: { type: "select" },
17
- options: s
17
+ options: i
18
18
  },
19
19
  forceSquared: {
20
20
  control: "boolean"
@@ -33,33 +33,33 @@ const s = Object.keys(c), i = "<ControlsButton type={radio or checkbox} label={}
33
33
  },
34
34
  parameters: {
35
35
  inspectComponent: t,
36
- codeString: i
36
+ codeString: s
37
37
  }
38
- }, o = (n) => /* @__PURE__ */ l(t, { ...n }), p = o.bind({});
38
+ }, e = (l) => /* @__PURE__ */ n(t, { ...l }), p = e.bind({});
39
39
  p.args = {
40
40
  type: "checkbox",
41
41
  label: "1.2",
42
42
  value: "1.2",
43
43
  forceSquared: !0,
44
- onSetValue: e()
44
+ onSetValue: o()
45
45
  };
46
- const b = o.bind({});
46
+ const b = e.bind({});
47
47
  b.args = {
48
48
  type: "checkbox",
49
49
  label: "1.3",
50
50
  value: "1.3",
51
51
  prefix: "13",
52
- onSetValue: e()
52
+ onSetValue: o()
53
53
  };
54
- const u = o.bind({});
54
+ const u = e.bind({});
55
55
  u.args = {
56
56
  type: "checkbox",
57
57
  label: "2.1",
58
58
  value: "2.1",
59
59
  iconName: "AcademicCap",
60
- onSetValue: e()
60
+ onSetValue: o()
61
61
  };
62
- const d = o.bind({});
62
+ const d = e.bind({});
63
63
  d.args = {
64
64
  type: "checkbox",
65
65
  label: "5",
@@ -67,10 +67,11 @@ d.args = {
67
67
  prefix: "40",
68
68
  tooltip: /* @__PURE__ */ a(r, { children: [
69
69
  "15 dec - 19 dec",
70
- /* @__PURE__ */ l("br", {}),
70
+ /* @__PURE__ */ n("br", {}),
71
71
  "2025"
72
72
  ] }),
73
- onSetValue: e()
73
+ tooltipPosition: "center",
74
+ onSetValue: o()
74
75
  };
75
76
  export {
76
77
  p as ControlsButtonExample,
@@ -1 +1 @@
1
- {"version":3,"file":"ControlsButton.stories.js","sources":["../../../src/components/ControlsButton/ControlsButton.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\r\n\r\nimport type { Meta, StoryFn } from '@storybook/react';\r\nimport type { ControlsButtonProps } from './ControlsButton';\r\n\r\nimport { ControlsButton } from './ControlsButton';\r\n\r\nimport { Icons } from 'components/Icon/icons';\r\n\r\nconst iconNames = Object.keys(Icons) as (keyof typeof Icons)[];\r\n\r\nconst codeString =\r\n '<ControlsButton type={radio or checkbox} label={} value={} prefix={} tooltip={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />';\r\n\r\n// eslint-disable-next-line import/no-default-export\r\nexport default {\r\n title: 'Atoms/ControlsButton',\r\n component: ControlsButton,\r\n argTypes: {\r\n label: {\r\n control: 'text',\r\n },\r\n value: {\r\n control: 'string',\r\n },\r\n iconName: {\r\n control: { type: 'select' },\r\n options: iconNames,\r\n },\r\n forceSquared: {\r\n control: 'boolean',\r\n },\r\n isChecked: {\r\n control: 'boolean',\r\n },\r\n disabled: {\r\n control: 'boolean',\r\n },\r\n onSetValue: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n },\r\n parameters: {\r\n inspectComponent: ControlsButton,\r\n codeString: codeString,\r\n },\r\n} as Meta<ControlsButtonProps>;\r\n\r\nconst Template: StoryFn<ControlsButtonProps> = (args) => <ControlsButton {...args} />;\r\n\r\nexport const ControlsButtonExample = Template.bind({});\r\nControlsButtonExample.args = {\r\n type: 'checkbox',\r\n label: '1.2',\r\n value: '1.2',\r\n forceSquared: true,\r\n onSetValue: fn(),\r\n};\r\n\r\nexport const WithPrefix = Template.bind({});\r\nWithPrefix.args = {\r\n type: 'checkbox',\r\n label: '1.3',\r\n value: '1.3',\r\n prefix: '13',\r\n onSetValue: fn(),\r\n};\r\n\r\nexport const WithIcon = Template.bind({});\r\nWithIcon.args = {\r\n type: 'checkbox',\r\n label: '2.1',\r\n value: '2.1',\r\n iconName: 'AcademicCap',\r\n onSetValue: fn(),\r\n};\r\n\r\nexport const WithTooltip = Template.bind({});\r\nWithTooltip.args = {\r\n type: 'checkbox',\r\n label: '5',\r\n value: '5',\r\n prefix: '40',\r\n tooltip: (\r\n <>\r\n 15 dec - 19 dec\r\n <br />\r\n 2025\r\n </>\r\n ),\r\n onSetValue: fn(),\r\n};\r\n"],"names":["iconNames","Icons","codeString","ControlsButton_stories","ControlsButton","Template","args","jsx","ControlsButtonExample","fn","WithPrefix","WithIcon","WithTooltip","jsxs","Fragment"],"mappings":";;;;AASA,MAAMA,IAAY,OAAO,KAAKC,CAAK,GAE7BC,IACJ,0KAGFC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IAAA;AAAA,IAEX,OAAO;AAAA,MACL,SAAS;AAAA,IAAA;AAAA,IAEX,UAAU;AAAA,MACR,SAAS,EAAE,MAAM,SAAA;AAAA,MACjB,SAASJ;AAAA,IAAA;AAAA,IAEX,cAAc;AAAA,MACZ,SAAS;AAAA,IAAA;AAAA,IAEX,WAAW;AAAA,MACT,SAAS;AAAA,IAAA;AAAA,IAEX,UAAU;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,IAEX,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBI;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAyC,CAACC,MAAS,gBAAAC,EAACH,GAAA,EAAgB,GAAGE,GAAM,GAEtEE,IAAwBH,EAAS,KAAK,CAAA,CAAE;AACrDG,EAAsB,OAAO;AAAA,EAC3B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,cAAc;AAAA,EACd,YAAYC,EAAA;AACd;AAEO,MAAMC,IAAaL,EAAS,KAAK,CAAA,CAAE;AAC1CK,EAAW,OAAO;AAAA,EAChB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,YAAYD,EAAA;AACd;AAEO,MAAME,IAAWN,EAAS,KAAK,CAAA,CAAE;AACxCM,EAAS,OAAO;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAYF,EAAA;AACd;AAEO,MAAMG,IAAcP,EAAS,KAAK,CAAA,CAAE;AAC3CO,EAAY,OAAO;AAAA,EACjB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SACE,gBAAAC,EAAAC,GAAA,EAAE,UAAA;AAAA,IAAA;AAAA,sBAEC,MAAA,EAAG;AAAA,IAAE;AAAA,EAAA,GAER;AAAA,EAEF,YAAYL,EAAA;AACd;"}
1
+ {"version":3,"file":"ControlsButton.stories.js","sources":["../../../src/components/ControlsButton/ControlsButton.stories.tsx"],"sourcesContent":["import { fn } from 'storybook/test';\r\n\r\nimport type { Meta, StoryFn } from '@storybook/react';\r\nimport type { ControlsButtonProps } from './ControlsButton';\r\n\r\nimport { ControlsButton } from './ControlsButton';\r\n\r\nimport { Icons } from 'components/Icon/icons';\r\n\r\nconst iconNames = Object.keys(Icons) as (keyof typeof Icons)[];\r\n\r\nconst codeString =\r\n '<ControlsButton type={radio or checkbox} label={} value={} prefix={} tooltip={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />';\r\n\r\n// eslint-disable-next-line import/no-default-export\r\nexport default {\r\n title: 'Atoms/ControlsButton',\r\n component: ControlsButton,\r\n argTypes: {\r\n label: {\r\n control: 'text',\r\n },\r\n value: {\r\n control: 'string',\r\n },\r\n iconName: {\r\n control: { type: 'select' },\r\n options: iconNames,\r\n },\r\n forceSquared: {\r\n control: 'boolean',\r\n },\r\n isChecked: {\r\n control: 'boolean',\r\n },\r\n disabled: {\r\n control: 'boolean',\r\n },\r\n onSetValue: {\r\n table: {\r\n disable: true,\r\n },\r\n },\r\n },\r\n parameters: {\r\n inspectComponent: ControlsButton,\r\n codeString: codeString,\r\n },\r\n} as Meta<ControlsButtonProps>;\r\n\r\nconst Template: StoryFn<ControlsButtonProps> = (args) => <ControlsButton {...args} />;\r\n\r\nexport const ControlsButtonExample = Template.bind({});\r\nControlsButtonExample.args = {\r\n type: 'checkbox',\r\n label: '1.2',\r\n value: '1.2',\r\n forceSquared: true,\r\n onSetValue: fn(),\r\n};\r\n\r\nexport const WithPrefix = Template.bind({});\r\nWithPrefix.args = {\r\n type: 'checkbox',\r\n label: '1.3',\r\n value: '1.3',\r\n prefix: '13',\r\n onSetValue: fn(),\r\n};\r\n\r\nexport const WithIcon = Template.bind({});\r\nWithIcon.args = {\r\n type: 'checkbox',\r\n label: '2.1',\r\n value: '2.1',\r\n iconName: 'AcademicCap',\r\n onSetValue: fn(),\r\n};\r\n\r\nexport const WithTooltip = Template.bind({});\r\nWithTooltip.args = {\r\n type: 'checkbox',\r\n label: '5',\r\n value: '5',\r\n prefix: '40',\r\n tooltip: (\r\n <>\r\n 15 dec - 19 dec\r\n <br />\r\n 2025\r\n </>\r\n ),\r\n tooltipPosition: 'center',\r\n onSetValue: fn(),\r\n};\r\n"],"names":["iconNames","Icons","codeString","ControlsButton_stories","ControlsButton","Template","args","jsx","ControlsButtonExample","fn","WithPrefix","WithIcon","WithTooltip","jsxs","Fragment"],"mappings":";;;;AASA,MAAMA,IAAY,OAAO,KAAKC,CAAK,GAE7BC,IACJ,0KAGFC,IAAe;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA,IAAA;AAAA,IAEX,OAAO;AAAA,MACL,SAAS;AAAA,IAAA;AAAA,IAEX,UAAU;AAAA,MACR,SAAS,EAAE,MAAM,SAAA;AAAA,MACjB,SAASJ;AAAA,IAAA;AAAA,IAEX,cAAc;AAAA,MACZ,SAAS;AAAA,IAAA;AAAA,IAEX,WAAW;AAAA,MACT,SAAS;AAAA,IAAA;AAAA,IAEX,UAAU;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,IAEX,YAAY;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEF,YAAY;AAAA,IACV,kBAAkBI;AAAA,IAClB,YAAAF;AAAA,EAAA;AAEJ,GAEMG,IAAyC,CAACC,MAAS,gBAAAC,EAACH,GAAA,EAAgB,GAAGE,GAAM,GAEtEE,IAAwBH,EAAS,KAAK,CAAA,CAAE;AACrDG,EAAsB,OAAO;AAAA,EAC3B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,cAAc;AAAA,EACd,YAAYC,EAAA;AACd;AAEO,MAAMC,IAAaL,EAAS,KAAK,CAAA,CAAE;AAC1CK,EAAW,OAAO;AAAA,EAChB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,YAAYD,EAAA;AACd;AAEO,MAAME,IAAWN,EAAS,KAAK,CAAA,CAAE;AACxCM,EAAS,OAAO;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAYF,EAAA;AACd;AAEO,MAAMG,IAAcP,EAAS,KAAK,CAAA,CAAE;AAC3CO,EAAY,OAAO;AAAA,EACjB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SACE,gBAAAC,EAAAC,GAAA,EAAE,UAAA;AAAA,IAAA;AAAA,sBAEC,MAAA,EAAG;AAAA,IAAE;AAAA,EAAA,GAER;AAAA,EAEF,iBAAiB;AAAA,EACjB,YAAYL,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.39.1",
5
+ "version": "3.40.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",