@uva-glass/component-library 3.43.1 → 3.44.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.
- package/dist/SelectListbox.module-CAKDuwcy.js +28 -0
- package/dist/SelectListbox.module-CAKDuwcy.js.map +1 -0
- package/dist/assets/CheckboxButtonBar.css +1 -1
- package/dist/assets/SelectListbox.css +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.d.ts +4 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +95 -64
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.d.ts +4 -3
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +61 -26
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.d.ts +1 -1
- package/dist/components/ControlsButton/ControlsButton.js +27 -27
- package/dist/components/ControlsButton/ControlsButton.js.map +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.d.ts +1 -0
- package/dist/components/ControlsButton/ControlsButton.stories.js +70 -25
- package/dist/components/ControlsButton/ControlsButton.stories.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +6 -6
- package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListbox.d.ts +1 -1
- package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectButton.d.ts +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js +1 -1
- package/dist/components/SelectListbox/components/SelectOptionBox.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/{index-BVrrnUn0.js → index-BfMTX2kB.js} +6 -3
- package/dist/index-BfMTX2kB.js.map +1 -0
- package/dist/{index-BamlKH-k.js → index-DvUwfXNb.js} +3 -2
- package/dist/{index-BamlKH-k.js.map → index-DvUwfXNb.js.map} +1 -1
- package/dist/storybook__react.d.js +3 -3
- package/package.json +10 -10
- package/dist/SelectListbox.module-yzXaWwsm.js +0 -26
- package/dist/SelectListbox.module-yzXaWwsm.js.map +0 -1
- package/dist/index-BVrrnUn0.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { c as
|
|
4
|
-
import { Icon as
|
|
1
|
+
import { jsxs as c, Fragment as g, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useId as I } from "react";
|
|
3
|
+
import { c as b } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { Icon as $ } from "../Icon/Icon.js";
|
|
5
5
|
import '../../assets/ControlsButton.css';const t = {
|
|
6
6
|
"controls-input": "_controls-input_lu12f_1",
|
|
7
7
|
"controls-button": "_controls-button_lu12f_32",
|
|
@@ -14,13 +14,13 @@ import '../../assets/ControlsButton.css';const t = {
|
|
|
14
14
|
"controls-button__tooltip--left": "_controls-button__tooltip--left_lu12f_98",
|
|
15
15
|
"controls-button__tooltip--center": "_controls-button__tooltip--center_lu12f_102",
|
|
16
16
|
"controls-button__tooltip--right": "_controls-button__tooltip--right_lu12f_107"
|
|
17
|
-
},
|
|
18
|
-
type:
|
|
19
|
-
label:
|
|
20
|
-
value:
|
|
21
|
-
iconName:
|
|
17
|
+
}, z = ({
|
|
18
|
+
type: p = "checkbox",
|
|
19
|
+
label: n,
|
|
20
|
+
value: i,
|
|
21
|
+
iconName: r,
|
|
22
22
|
prefix: l,
|
|
23
|
-
tooltip:
|
|
23
|
+
tooltip: s,
|
|
24
24
|
tooltipPosition: a = "center",
|
|
25
25
|
name: f,
|
|
26
26
|
forceSquared: d = !1,
|
|
@@ -28,44 +28,44 @@ import '../../assets/ControlsButton.css';const t = {
|
|
|
28
28
|
disabled: m,
|
|
29
29
|
onSetValue: x
|
|
30
30
|
}) => {
|
|
31
|
-
const w =
|
|
32
|
-
return /* @__PURE__ */
|
|
31
|
+
const w = I(), u = (typeof n == "string" ? n : i).replace(/\s+/g, "_"), _ = `${w}${u}`, e = `${_}-tooltip`;
|
|
32
|
+
return /* @__PURE__ */ c(g, { children: [
|
|
33
33
|
/* @__PURE__ */ o(
|
|
34
34
|
"input",
|
|
35
35
|
{
|
|
36
|
-
type:
|
|
36
|
+
type: p,
|
|
37
37
|
id: _,
|
|
38
|
-
name: f ??
|
|
38
|
+
name: f ?? u,
|
|
39
39
|
disabled: m,
|
|
40
|
-
value:
|
|
40
|
+
value: i,
|
|
41
41
|
checked: h,
|
|
42
42
|
onChange: x,
|
|
43
43
|
className: t["controls-input"],
|
|
44
|
-
"aria-describedby":
|
|
44
|
+
"aria-describedby": s ? e : void 0
|
|
45
45
|
}
|
|
46
46
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ c(
|
|
48
48
|
"label",
|
|
49
49
|
{
|
|
50
50
|
htmlFor: _,
|
|
51
|
-
className:
|
|
51
|
+
className: b(t["controls-button"], [
|
|
52
52
|
d && t["controls-button--squared"],
|
|
53
53
|
l && t["controls-button--with-prefix"],
|
|
54
|
-
|
|
54
|
+
r && t["controls-button--with-icon"]
|
|
55
55
|
]),
|
|
56
56
|
children: [
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
57
|
+
r && /* @__PURE__ */ o($, { name: r, size: 20 }),
|
|
58
|
+
/* @__PURE__ */ c("div", { className: t["controls-button__wrapper"], children: [
|
|
59
59
|
l && /* @__PURE__ */ o("div", { className: t["controls-button__prefix"], children: l }),
|
|
60
|
-
|
|
60
|
+
n
|
|
61
61
|
] }),
|
|
62
|
-
|
|
62
|
+
s && /* @__PURE__ */ o(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
id:
|
|
65
|
+
id: e,
|
|
66
66
|
role: "tooltip",
|
|
67
|
-
className:
|
|
68
|
-
children:
|
|
67
|
+
className: b(t["controls-button__tooltip"], t[`controls-button__tooltip--${a}`]),
|
|
68
|
+
children: s
|
|
69
69
|
}
|
|
70
70
|
)
|
|
71
71
|
]
|
|
@@ -74,6 +74,6 @@ import '../../assets/ControlsButton.css';const t = {
|
|
|
74
74
|
] });
|
|
75
75
|
};
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
z as ControlsButton
|
|
78
78
|
};
|
|
79
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 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 =
|
|
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 | ReactNode;\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 labelString = typeof label === 'string' ? label : value;\r\n const sanitizedLabel = labelString.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,EAAA,GAEXC,KADc,OAAOb,KAAU,WAAWA,IAAQC,GACrB,QAAQ,QAAQ,GAAG,GAChDa,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,MAAAnB;AAAA,QACA,IAAIe;AAAA,QACJ,MAAMR,KAAQO;AAAA,QACd,UAAAJ;AAAA,QACA,OAAAR;AAAA,QACA,SAAAO;AAAA,QACA,UAAUE;AAAA,QACV,WAAWS,EAAO,gBAAgB;AAAA,QAClC,oBAAkBf,IAAUW,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,UACjDhB,KAAUgB,EAAO,8BAA8B;AAAA,UAC/CjB,KAAYiB,EAAO,4BAA4B;AAAA,QAAA,CAChD;AAAA,QAEA,UAAA;AAAA,UAAAjB,KAAY,gBAAAgB,EAACG,GAAA,EAAK,MAAMnB,GAAU,MAAM,IAAI;AAAA,UAC7C,gBAAAc,EAAC,OAAA,EAAI,WAAWG,EAAO,0BAA0B,GAC9C,UAAA;AAAA,YAAAhB,uBAAW,OAAA,EAAI,WAAWgB,EAAO,yBAAyB,GAAI,UAAAhB,GAAO;AAAA,YACrEH;AAAA,UAAA,GACH;AAAA,UACCI,KACC,gBAAAc;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,IAAIH;AAAA,cACJ,MAAK;AAAA,cACL,WAAWK,EAAKD,EAAO,0BAA0B,GAAGA,EAAO,6BAA6Bd,CAAe,EAAE,CAAC;AAAA,cAEzG,UAAAD;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
|
|
@@ -6,3 +6,4 @@ export declare const ControlsButtonExample: import('storybook/internal/csf').Ann
|
|
|
6
6
|
export declare const WithPrefix: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ControlsButtonProps>;
|
|
7
7
|
export declare const WithIcon: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ControlsButtonProps>;
|
|
8
8
|
export declare const WithTooltip: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ControlsButtonProps>;
|
|
9
|
+
export declare const WithComplexLabel: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ControlsButtonProps>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { l as
|
|
1
|
+
import { jsx as r, jsxs as l, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { l as e } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { ControlsButton as t } from "./ControlsButton.js";
|
|
4
|
-
import { Icons as
|
|
5
|
-
|
|
4
|
+
import { Icons as a } from "../Icon/icons/index.js";
|
|
5
|
+
import { Periods as i } from "../Periods/Periods.js";
|
|
6
|
+
const c = Object.keys(a), m = "<ControlsButton type={radio or checkbox} label={} value={} prefix={} tooltip={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />", C = {
|
|
6
7
|
title: "Atoms/ControlsButton",
|
|
7
8
|
component: t,
|
|
8
9
|
argTypes: {
|
|
@@ -14,7 +15,7 @@ const i = Object.keys(c), s = "<ControlsButton type={radio or checkbox} label={}
|
|
|
14
15
|
},
|
|
15
16
|
iconName: {
|
|
16
17
|
control: { type: "select" },
|
|
17
|
-
options:
|
|
18
|
+
options: c
|
|
18
19
|
},
|
|
19
20
|
forceSquared: {
|
|
20
21
|
control: "boolean"
|
|
@@ -33,51 +34,95 @@ const i = Object.keys(c), s = "<ControlsButton type={radio or checkbox} label={}
|
|
|
33
34
|
},
|
|
34
35
|
parameters: {
|
|
35
36
|
inspectComponent: t,
|
|
36
|
-
codeString:
|
|
37
|
+
codeString: m
|
|
37
38
|
}
|
|
38
|
-
},
|
|
39
|
-
|
|
39
|
+
}, o = (n) => /* @__PURE__ */ r(t, { ...n }), b = o.bind({});
|
|
40
|
+
b.args = {
|
|
40
41
|
type: "checkbox",
|
|
41
42
|
label: "1.2",
|
|
42
43
|
value: "1.2",
|
|
43
44
|
forceSquared: !0,
|
|
44
|
-
onSetValue:
|
|
45
|
+
onSetValue: e()
|
|
45
46
|
};
|
|
46
|
-
const
|
|
47
|
-
|
|
47
|
+
const p = o.bind({});
|
|
48
|
+
p.args = {
|
|
48
49
|
type: "checkbox",
|
|
49
50
|
label: "1.3",
|
|
50
51
|
value: "1.3",
|
|
51
52
|
prefix: "13",
|
|
52
|
-
onSetValue:
|
|
53
|
+
onSetValue: e()
|
|
53
54
|
};
|
|
54
|
-
const
|
|
55
|
-
|
|
55
|
+
const d = o.bind({});
|
|
56
|
+
d.args = {
|
|
56
57
|
type: "checkbox",
|
|
57
58
|
label: "2.1",
|
|
58
59
|
value: "2.1",
|
|
59
60
|
iconName: "AcademicCap",
|
|
60
|
-
onSetValue:
|
|
61
|
+
onSetValue: e()
|
|
61
62
|
};
|
|
62
|
-
const
|
|
63
|
-
|
|
63
|
+
const u = o.bind({});
|
|
64
|
+
u.args = {
|
|
64
65
|
type: "checkbox",
|
|
65
66
|
label: "5",
|
|
66
67
|
value: "5",
|
|
67
68
|
prefix: "40",
|
|
68
|
-
tooltip: /* @__PURE__ */
|
|
69
|
+
tooltip: /* @__PURE__ */ l(s, { children: [
|
|
69
70
|
"15 dec - 19 dec",
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ r("br", {}),
|
|
71
72
|
"2025"
|
|
72
73
|
] }),
|
|
73
74
|
tooltipPosition: "center",
|
|
74
|
-
onSetValue:
|
|
75
|
+
onSetValue: e()
|
|
76
|
+
};
|
|
77
|
+
const x = o.bind({});
|
|
78
|
+
x.args = {
|
|
79
|
+
type: "checkbox",
|
|
80
|
+
label: /* @__PURE__ */ r(
|
|
81
|
+
i,
|
|
82
|
+
{
|
|
83
|
+
periods: [
|
|
84
|
+
{
|
|
85
|
+
id: "2023P1",
|
|
86
|
+
number: 1,
|
|
87
|
+
semesterNumber: 1,
|
|
88
|
+
periodInSemester: 1
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "2023P2",
|
|
92
|
+
number: 2,
|
|
93
|
+
semesterNumber: 1,
|
|
94
|
+
periodInSemester: 2
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "2023P3",
|
|
98
|
+
number: 3,
|
|
99
|
+
semesterNumber: 1,
|
|
100
|
+
periodInSemester: 3
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "2023P5",
|
|
104
|
+
number: 5,
|
|
105
|
+
semesterNumber: 2,
|
|
106
|
+
periodInSemester: 2
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "2023P7",
|
|
110
|
+
number: 7,
|
|
111
|
+
semesterNumber: 3,
|
|
112
|
+
periodInSemester: 1
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
value: "5",
|
|
118
|
+
onSetValue: e()
|
|
75
119
|
};
|
|
76
120
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
121
|
+
b as ControlsButtonExample,
|
|
122
|
+
x as WithComplexLabel,
|
|
123
|
+
d as WithIcon,
|
|
124
|
+
p as WithPrefix,
|
|
125
|
+
u as WithTooltip,
|
|
126
|
+
C as default
|
|
82
127
|
};
|
|
83
128
|
//# sourceMappingURL=ControlsButton.stories.js.map
|
|
@@ -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 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":"
|
|
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\nimport { Periods } from 'components/Periods';\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\r\nexport const WithComplexLabel = Template.bind({});\r\nWithComplexLabel.args = {\r\n type: 'checkbox',\r\n label: (\r\n <Periods\r\n periods={[\r\n {\r\n id: '2023P1',\r\n number: 1,\r\n semesterNumber: 1,\r\n periodInSemester: 1,\r\n },\r\n {\r\n id: '2023P2',\r\n number: 2,\r\n semesterNumber: 1,\r\n periodInSemester: 2,\r\n },\r\n {\r\n id: '2023P3',\r\n number: 3,\r\n semesterNumber: 1,\r\n periodInSemester: 3,\r\n },\r\n {\r\n id: '2023P5',\r\n number: 5,\r\n semesterNumber: 2,\r\n periodInSemester: 2,\r\n },\r\n {\r\n id: '2023P7',\r\n number: 7,\r\n semesterNumber: 3,\r\n periodInSemester: 1,\r\n },\r\n ]}\r\n />\r\n ),\r\n value: '5',\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","WithComplexLabel","Periods"],"mappings":";;;;;AAUA,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;AAEO,MAAMM,IAAmBV,EAAS,KAAK,CAAA,CAAE;AAChDU,EAAiB,OAAO;AAAA,EACtB,MAAM;AAAA,EACN,OACE,gBAAAR;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,SAAS;AAAA,QACP;AAAA,UACE,IAAI;AAAA,UACJ,QAAQ;AAAA,UACR,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,QAAA;AAAA,QAEpB;AAAA,UACE,IAAI;AAAA,UACJ,QAAQ;AAAA,UACR,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,QAAA;AAAA,QAEpB;AAAA,UACE,IAAI;AAAA,UACJ,QAAQ;AAAA,UACR,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,QAAA;AAAA,QAEpB;AAAA,UACE,IAAI;AAAA,UACJ,QAAQ;AAAA,UACR,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,QAAA;AAAA,QAEpB;AAAA,UACE,IAAI;AAAA,UACJ,QAAQ;AAAA,UACR,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,QAAA;AAAA,MACpB;AAAA,IACF;AAAA,EAAA;AAAA,EAGJ,OAAO;AAAA,EACP,YAAYP,EAAA;AACd;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { OverlayProvider as p } from "@react-aria/overlays";
|
|
3
|
-
import { l as m } from "../../index-
|
|
3
|
+
import { l as m } from "../../index-DvUwfXNb.js";
|
|
4
4
|
import { useState as c } from "react";
|
|
5
5
|
import { Drawer as r } from "./Drawer.js";
|
|
6
6
|
import { Button as o } from "../Buttons/Button.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { l as i } from "../../index-
|
|
2
|
+
import { l as i } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { FormInput as a } from "./FormInput.js";
|
|
4
4
|
import { SelectListbox as o } from "../SelectListbox/SelectListbox.js";
|
|
5
5
|
const m = `
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { l as r } from "../../index-
|
|
2
|
+
import { l as r } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { IconButton as t } from "./IconButton.js";
|
|
4
4
|
import { Icon as i } from "../Icon/Icon.js";
|
|
5
5
|
const l = `<IconButton variant={variant} aria-label={aria-label} onClick={onClickFunction}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g } from "react";
|
|
3
|
-
import { l } from "../../index-
|
|
3
|
+
import { l } from "../../index-DvUwfXNb.js";
|
|
4
4
|
import { InputField as e } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
import "../Accordion/Accordion.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { ModalProvider as n } from "@react-aria/overlays";
|
|
3
|
-
import { l as i } from "../../index-
|
|
3
|
+
import { l as i } from "../../index-DvUwfXNb.js";
|
|
4
4
|
import { ModalDialog as t } from "./ModalDialog.js";
|
|
5
5
|
import { Button as l } from "../Buttons/Button.js";
|
|
6
6
|
import "../Buttons/LinkButton.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { l as d } from "../../index-
|
|
2
|
+
import { l as d } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
4
|
import { M as e } from "../../TablePlugin-DaKDRL4G.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { l as n } from "../../index-
|
|
2
|
+
import { l as n } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { MultiSelectBox as e } from "./MultiSelectBox.js";
|
|
4
4
|
const c = "<MultiSelectBox selectData={[{label, value}]} onChange={fn} labelSuffix={string} />", f = {
|
|
5
5
|
title: "Organisms/MultiSelectBox",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { l as a } from "../../index-
|
|
2
|
+
import { l as a } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { Notification as t } from "./Notification.js";
|
|
4
4
|
const l = `<Notification title={title} subtitle={subtitle} action={action}
|
|
5
5
|
level={level} variant={variant} onClose={() => {}} />`, m = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { l as t } from "../../index-
|
|
2
|
+
import { l as t } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { OverlayCloseButton as o } from "./OverlayCloseButton.js";
|
|
4
4
|
import { Container as a } from "../../storyComponents/Container/Container.js";
|
|
5
5
|
const r = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />", c = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { l as t } from "../../index-
|
|
2
|
+
import { l as t } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { PeriodSelector as e } from "./PeriodSelector.js";
|
|
4
4
|
const i = "<PeriodSelector maxPeriods={} defaultValues={} label={} labelPosition={} required={} onChange={} />", m = {
|
|
5
5
|
title: "Organisms/PeriodSelector",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { l as t } from "../../index-
|
|
2
|
+
import { l as t } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { RadioTabSelector as e } from "./RadioTabSelector.js";
|
|
4
4
|
const i = "<RadioTabSelector radioButtons={} defaultValue={} label={} labelPosition={} required={} notValidatedText={} onSetValue={} />", b = {
|
|
5
5
|
title: "Molecules/RadioTabSelector",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as M } from "react/jsx-runtime";
|
|
2
|
-
import { l as i } from "../../index-
|
|
2
|
+
import { l as i } from "../../index-DvUwfXNb.js";
|
|
3
3
|
import { SelectListbox as r } from "./SelectListbox.js";
|
|
4
4
|
import * as e from "react";
|
|
5
5
|
const E = ({
|
|
@@ -92,7 +92,7 @@ const E = ({
|
|
|
92
92
|
default: !1
|
|
93
93
|
},
|
|
94
94
|
variant: {
|
|
95
|
-
options: ["default", "noborder", "pill", "pillLeft", "pillRight", "darkBorder"],
|
|
95
|
+
options: ["default", "noborder", "pill", "pillLeft", "pillRight", "darkBorder", "roundedLeft", "roundedRight"],
|
|
96
96
|
control: { type: "select" }
|
|
97
97
|
},
|
|
98
98
|
optionPositionRight: {
|
|
@@ -149,7 +149,7 @@ const E = ({
|
|
|
149
149
|
mobileBreakpoint: "28rem",
|
|
150
150
|
size: "default",
|
|
151
151
|
onChange: i()
|
|
152
|
-
}, L = (t) => /* @__PURE__ */ a("div", { style: { width: "30rem", margin: "0rem auto 0 auto" }, children: /* @__PURE__ */ a(r, { ...t, children: d.map(({ label: l, value: c },
|
|
152
|
+
}, L = (t) => /* @__PURE__ */ a("div", { style: { width: "30rem", margin: "0rem auto 0 auto" }, children: /* @__PURE__ */ a(r, { ...t, children: d.map(({ label: l, value: c }, n) => /* @__PURE__ */ a(r.SelectOption, { option: { label: l, value: c }, index: n, children: l }, `${c}`)) }) }), f = L.bind({});
|
|
153
153
|
f.args = {
|
|
154
154
|
...m
|
|
155
155
|
};
|
|
@@ -171,7 +171,7 @@ const S = ({ label: t, value: l }) => /* @__PURE__ */ M("div", { style: { displa
|
|
|
171
171
|
ES: /* @__PURE__ */ a(u, { style: { width: "24px", height: "24px", marginRight: "10px" } })
|
|
172
172
|
}[l],
|
|
173
173
|
t
|
|
174
|
-
] }), y = (t) => /* @__PURE__ */ a("div", { style: { width: "10rem", margin: "0rem auto 0 auto" }, children: /* @__PURE__ */ a(r, { ...t, children: t.options.map(({ label: l, value: c },
|
|
174
|
+
] }), y = (t) => /* @__PURE__ */ a("div", { style: { width: "10rem", margin: "0rem auto 0 auto" }, children: /* @__PURE__ */ a(r, { ...t, children: t.options.map(({ label: l, value: c }, n) => /* @__PURE__ */ a(r.SelectOption, { option: { label: l, value: c }, index: n, children: /* @__PURE__ */ a(S, { label: l, value: c }) }, `${c}`)) }) }), k = y.bind({});
|
|
175
175
|
k.args = {
|
|
176
176
|
...m
|
|
177
177
|
};
|
|
@@ -234,8 +234,8 @@ const B = [
|
|
|
234
234
|
size: "default",
|
|
235
235
|
onChange: i()
|
|
236
236
|
}, N = (t) => {
|
|
237
|
-
const { options: l, ...c } = t,
|
|
238
|
-
return /* @__PURE__ */ a("div", { style: { width: "
|
|
237
|
+
const { options: l, ...c } = t, h = (t.SwitchLanguage ?? "EN") === "NL" ? B : j;
|
|
238
|
+
return /* @__PURE__ */ a("div", { style: { width: "50rem", margin: "0rem auto 0 auto" }, children: /* @__PURE__ */ a(r, { ...c, options: h, children: h.map(({ label: o, value: s }, p) => /* @__PURE__ */ a(r.SelectOption, { option: { label: o, value: s }, index: p, children: o }, `${s}`)) }) });
|
|
239
239
|
}, D = N.bind({});
|
|
240
240
|
D.args = {
|
|
241
241
|
...V
|