@uva-glass/component-library 3.30.1 → 3.31.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/{Lexical.prod-UwAbgYpF.js → Lexical.prod-B84LhBo3.js} +1196 -1224
- package/dist/Lexical.prod-B84LhBo3.js.map +1 -0
- package/dist/{LexicalClipboard.prod-DHIGjydG.js → LexicalClipboard.prod-DLgWWXys.js} +4 -4
- package/dist/{LexicalClipboard.prod-DHIGjydG.js.map → LexicalClipboard.prod-DLgWWXys.js.map} +1 -1
- package/dist/{LexicalLink.prod-Bsa9J7L-.js → LexicalLink.prod-DoU9RL94.js} +3 -3
- package/dist/{LexicalLink.prod-Bsa9J7L-.js.map → LexicalLink.prod-DoU9RL94.js.map} +1 -1
- package/dist/{LexicalList.prod-jxGuZd4b.js → LexicalList.prod-Cw2TK1jY.js} +4 -4
- package/dist/{LexicalList.prod-jxGuZd4b.js.map → LexicalList.prod-Cw2TK1jY.js.map} +1 -1
- package/dist/{LexicalSelection.prod-xk5MiZnZ.js → LexicalSelection.prod-TB5pn9xc.js} +2 -2
- package/dist/{LexicalSelection.prod-xk5MiZnZ.js.map → LexicalSelection.prod-TB5pn9xc.js.map} +1 -1
- package/dist/{LexicalTable.prod-BSjs04iE.js → LexicalTable.prod-9xjyWB0C.js} +4 -4
- package/dist/{LexicalTable.prod-BSjs04iE.js.map → LexicalTable.prod-9xjyWB0C.js.map} +1 -1
- package/dist/{LexicalUtils.prod-cQutjKA3.js → LexicalUtils.prod-CD3xGFhm.js} +2 -2
- package/dist/{LexicalUtils.prod-cQutjKA3.js.map → LexicalUtils.prod-CD3xGFhm.js.map} +1 -1
- package/dist/Sortable.module--kgnzOjW.js +26 -0
- package/dist/Sortable.module--kgnzOjW.js.map +1 -0
- package/dist/SortableProvider-C2T7b-pm.js +153 -0
- package/dist/SortableProvider-C2T7b-pm.js.map +1 -0
- package/dist/{TablePlugin-NmJsn2fm.js → TablePlugin-Dmy98Epb.js} +86 -91
- package/dist/{TablePlugin-NmJsn2fm.js.map → TablePlugin-Dmy98Epb.js.map} +1 -1
- package/dist/assets/Backdrop.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ClipboardButton.css +1 -1
- package/dist/assets/ExpandableInfoPanel.css +1 -1
- package/dist/assets/FormInput.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/InputField.css +1 -1
- package/dist/assets/LinkContextMenu.css +1 -1
- package/dist/assets/Notification.css +1 -1
- package/dist/assets/OverlayCloseButton.css +1 -1
- package/dist/assets/OverlayStepBar.css +1 -1
- package/dist/assets/PageOverlay.css +1 -1
- package/dist/assets/Sortable.css +1 -1
- package/dist/assets/VarIndicator.css +1 -1
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.stories.js +5 -5
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +3 -3
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +58 -59
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +58 -59
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.js +5 -5
- package/dist/components/ControlsButton/ControlsButton.stories.js +5 -5
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FormInput/FormInput.js +3 -3
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/HorizontalList/HorizontalList.js +7 -7
- package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.stories.js +10 -10
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/ModalDialog/ModalDialog.stories.js +8 -8
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +8 -8
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +3 -3
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.js +66 -70
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
- package/dist/components/Notification/Notification.stories.js +6 -6
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js +19 -20
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +33 -33
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +4 -4
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +3 -3
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.js +3 -3
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -3
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +51 -61
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +79 -89
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +19 -19
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +17 -18
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +31 -32
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +10 -10
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js +31 -32
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js +29 -30
- package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
- package/dist/components/Sortable/Sortable.d.ts +6 -1
- package/dist/components/Sortable/Sortable.js +23 -13
- package/dist/components/Sortable/Sortable.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +13 -12
- package/dist/components/Sortable/Sortable.stories.js.map +1 -1
- package/dist/components/Sortable/SortableProvider.d.ts +2 -1
- package/dist/components/Sortable/SortableProvider.js +1 -1
- package/dist/components/Sortable/components/SortableContainer.d.ts +2 -1
- package/dist/components/Sortable/components/SortableContainer.js +2 -2
- package/dist/components/Sortable/components/SortableHandle.js +1 -1
- package/dist/components/Sortable/components/SortableItem.d.ts +3 -1
- package/dist/components/Sortable/components/SortableItem.js +48 -47
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/hooks/usePositionedFloaters.js +39 -39
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-DZIm3MiJ.js → helpers-CMG0anwr.js} +4 -4
- package/dist/{helpers-DZIm3MiJ.js.map → helpers-CMG0anwr.js.map} +1 -1
- package/dist/{index-DV47hRzi.js → index-Br0QepD6.js} +8 -10
- package/dist/{index-DV47hRzi.js.map → index-Br0QepD6.js.map} +1 -1
- package/dist/{index-Di9WPZUe.js → index-C2E9FY6V.js} +9149 -9854
- package/dist/index-C2E9FY6V.js.map +1 -0
- package/dist/{index-PaHiqSUg.js → index-Ds1dMTvJ.js} +29 -29
- package/dist/{index-PaHiqSUg.js.map → index-Ds1dMTvJ.js.map} +1 -1
- package/dist/{index-BVAvx58-.js → index-KJPw-7za.js} +2209 -2280
- package/dist/{index-BVAvx58-.js.map → index-KJPw-7za.js.map} +1 -1
- package/dist/{index-DllfJcv4.js → index-nrPtQ1dv.js} +2 -2
- package/dist/{index-DllfJcv4.js.map → index-nrPtQ1dv.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react.esm-CFMwGdo5.js → react.esm-BKjCIfbB.js} +373 -374
- package/dist/{react.esm-CFMwGdo5.js.map → react.esm-BKjCIfbB.js.map} +1 -1
- package/dist/setupTests.js +6 -9
- package/dist/setupTests.js.map +1 -1
- package/dist/storybook__react.d.js +2056 -2072
- package/dist/storybook__react.d.js.map +1 -1
- package/package.json +14 -14
- package/dist/Lexical.prod-UwAbgYpF.js.map +0 -1
- package/dist/Sortable.module-CekPNg54.js +0 -23
- package/dist/Sortable.module-CekPNg54.js.map +0 -1
- package/dist/SortableProvider-CwX1lFMa.js +0 -152
- package/dist/SortableProvider-CwX1lFMa.js.map +0 -1
- package/dist/index-Di9WPZUe.js.map +0 -1
|
@@ -1,125 +1,124 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
2
|
-
import { s as
|
|
3
|
-
import { Y as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsx as d, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { s as T, l as _ } from "../../index-C2E9FY6V.js";
|
|
3
|
+
import { Y as v, z as w } from "../../index-KJPw-7za.js";
|
|
4
|
+
import { useState as R } from "react";
|
|
5
5
|
import { CheckboxTree as b } from "./CheckboxTree.js";
|
|
6
|
-
import { Chip as
|
|
7
|
-
var
|
|
6
|
+
import { Chip as S } from "../Chip/Chip.js";
|
|
7
|
+
var x = Object.defineProperty, h = (e, t) => x(e, "name", { value: t, configurable: !0 }), j = "storybook/actions", P = `${j}/action-event`, V = {
|
|
8
8
|
depth: 10,
|
|
9
9
|
clearOnStoryChange: !0,
|
|
10
10
|
limit: 50
|
|
11
|
-
},
|
|
11
|
+
}, E = /* @__PURE__ */ h((e, t) => {
|
|
12
12
|
let r = Object.getPrototypeOf(e);
|
|
13
|
-
return !r || t(r) ? r :
|
|
14
|
-
}, "findProto"),
|
|
15
|
-
if (
|
|
13
|
+
return !r || t(r) ? r : E(r, t);
|
|
14
|
+
}, "findProto"), $ = /* @__PURE__ */ h((e) => !!(typeof e == "object" && e && E(e, (t) => /^Synthetic(?:Base)?Event$/.test(t.constructor.name)) && typeof e.persist == "function"), "isReactSyntheticEvent"), k = /* @__PURE__ */ h((e) => {
|
|
15
|
+
if ($(e)) {
|
|
16
16
|
let t = Object.create(
|
|
17
17
|
e.constructor.prototype,
|
|
18
18
|
Object.getOwnPropertyDescriptors(e)
|
|
19
19
|
);
|
|
20
20
|
t.persist();
|
|
21
|
-
let r = Object.getOwnPropertyDescriptor(t, "view"),
|
|
22
|
-
return typeof
|
|
21
|
+
let r = Object.getOwnPropertyDescriptor(t, "view"), o = r?.value;
|
|
22
|
+
return typeof o == "object" && o?.constructor.name === "Window" && Object.defineProperty(t, "view", {
|
|
23
23
|
...r,
|
|
24
|
-
value: Object.create(
|
|
24
|
+
value: Object.create(o.constructor.prototype)
|
|
25
25
|
}), t;
|
|
26
26
|
}
|
|
27
27
|
return e;
|
|
28
28
|
}, "serializeArg");
|
|
29
29
|
function f(e, t = {}) {
|
|
30
30
|
let r = {
|
|
31
|
-
...
|
|
31
|
+
...V,
|
|
32
32
|
...t
|
|
33
|
-
},
|
|
34
|
-
var g, O;
|
|
33
|
+
}, o = /* @__PURE__ */ h(function(...i) {
|
|
35
34
|
if (t.implicit) {
|
|
36
|
-
let
|
|
35
|
+
let g = ("__STORYBOOK_PREVIEW__" in T ? T.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(
|
|
37
36
|
(p) => p.phase === "playing" || p.phase === "rendering"
|
|
38
37
|
);
|
|
39
|
-
if (
|
|
40
|
-
let p = !
|
|
41
|
-
phase:
|
|
38
|
+
if (g) {
|
|
39
|
+
let p = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, O = new v({
|
|
40
|
+
phase: g.phase,
|
|
42
41
|
name: e,
|
|
43
42
|
deprecated: p
|
|
44
43
|
});
|
|
45
44
|
if (p)
|
|
46
|
-
console.warn(
|
|
45
|
+
console.warn(O);
|
|
47
46
|
else
|
|
48
|
-
throw
|
|
47
|
+
throw O;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
let c =
|
|
50
|
+
let c = w.getChannel(), u = Date.now().toString(36) + Math.random().toString(36).substring(2), n = 5, s = i.map(k), a = i.length > 1 ? s : s[0], l = {
|
|
52
51
|
id: u,
|
|
53
52
|
count: 0,
|
|
54
53
|
data: { name: e, args: a },
|
|
55
54
|
options: {
|
|
56
55
|
...r,
|
|
57
|
-
maxDepth:
|
|
56
|
+
maxDepth: n + (r.depth || 3)
|
|
58
57
|
}
|
|
59
58
|
};
|
|
60
|
-
c.emit(
|
|
59
|
+
c.emit(P, l);
|
|
61
60
|
}, "actionHandler");
|
|
62
|
-
return
|
|
61
|
+
return o.isAction = !0, o.implicit = t.implicit, o;
|
|
63
62
|
}
|
|
64
63
|
h(f, "action");
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const s = Math.ceil(parseInt(
|
|
64
|
+
const A = (e, t, r) => {
|
|
65
|
+
const o = Array.from({ length: t }, (n, s) => s + 1), i = (n) => {
|
|
66
|
+
const s = Math.ceil(parseInt(n) / r), a = s === r ? "" : `.${parseInt(n) % r || r}`;
|
|
68
67
|
return `${s}${a}`;
|
|
69
|
-
}, c =
|
|
70
|
-
itemName: i(String(
|
|
71
|
-
itemValue:
|
|
68
|
+
}, c = o.map((n) => ({
|
|
69
|
+
itemName: i(String(n)),
|
|
70
|
+
itemValue: n,
|
|
72
71
|
disabled: !1
|
|
73
72
|
}));
|
|
74
|
-
return
|
|
73
|
+
return o.reduce((n, s, a) => {
|
|
75
74
|
const l = Math.ceil(s / r);
|
|
76
|
-
return e.includes(String(a + 1)) && (
|
|
75
|
+
return e.includes(String(a + 1)) && (n[l] || (n[l] = {
|
|
77
76
|
itemName: `Semester ${l}`,
|
|
78
77
|
children: []
|
|
79
|
-
}),
|
|
78
|
+
}), n[l].children.push({
|
|
80
79
|
...c[a],
|
|
81
80
|
itemValue: String(c[a].itemValue)
|
|
82
|
-
})),
|
|
81
|
+
})), n;
|
|
83
82
|
}, []);
|
|
84
|
-
},
|
|
83
|
+
}, D = 7, I = 3, y = A(
|
|
85
84
|
["1", "2", "3", "4", "5", "6", "7"],
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
),
|
|
85
|
+
D,
|
|
86
|
+
I
|
|
87
|
+
), M = "<CheckboxTree title={} checkboxTree={} selectedValues={} onChange={} />", U = {
|
|
89
88
|
title: "Organisms/CheckboxTree",
|
|
90
89
|
component: b,
|
|
91
90
|
parameters: {
|
|
92
91
|
inspectComponent: b,
|
|
93
|
-
codeString:
|
|
92
|
+
codeString: M
|
|
94
93
|
}
|
|
95
|
-
},
|
|
96
|
-
|
|
94
|
+
}, N = (e) => /* @__PURE__ */ d(b, { ...e }), B = N.bind({});
|
|
95
|
+
B.args = {
|
|
97
96
|
title: "Periode",
|
|
98
|
-
checkboxTree:
|
|
97
|
+
checkboxTree: y,
|
|
99
98
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
100
99
|
selectedValues: ["3", "4"],
|
|
101
|
-
onChange:
|
|
100
|
+
onChange: _()
|
|
102
101
|
};
|
|
103
|
-
const m = 3,
|
|
102
|
+
const m = 3, F = (e) => {
|
|
104
103
|
const t = Math.ceil(parseInt(e) / m), r = t === m ? "" : `.${parseInt(e) % m || m}`;
|
|
105
104
|
return `${t}${r}`;
|
|
106
|
-
},
|
|
105
|
+
}, W = (e) => {
|
|
107
106
|
const [t, r] = e.split(".").map(Number);
|
|
108
107
|
return `${(t - 1) * m + (r || 1)}`;
|
|
109
|
-
},
|
|
110
|
-
const [e, t] =
|
|
108
|
+
}, G = () => {
|
|
109
|
+
const [e, t] = R(["5", "4", "1"]), r = (i) => {
|
|
111
110
|
const c = JSON.parse(JSON.stringify(e)).filter(
|
|
112
|
-
(u) => u !==
|
|
111
|
+
(u) => u !== W(i)
|
|
113
112
|
);
|
|
114
113
|
t(() => c), f("onChange value:")(c);
|
|
115
|
-
},
|
|
114
|
+
}, o = (i) => {
|
|
116
115
|
t([...i]), f("onChange value:")(i);
|
|
117
116
|
};
|
|
118
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ C("div", { style: { width: "15rem" }, children: [
|
|
119
118
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexWrap: "wrap", gap: "0.5rem", width: "100%", marginBottom: "1rem" }, children: e && e.map((i, c) => /* @__PURE__ */ d(
|
|
120
|
-
|
|
119
|
+
S,
|
|
121
120
|
{
|
|
122
|
-
label:
|
|
121
|
+
label: F(i),
|
|
123
122
|
onDelete: r
|
|
124
123
|
},
|
|
125
124
|
`${c}_${i}`
|
|
@@ -128,16 +127,16 @@ const m = 3, K = (e) => {
|
|
|
128
127
|
b,
|
|
129
128
|
{
|
|
130
129
|
title: "Periode",
|
|
131
|
-
checkboxTree:
|
|
130
|
+
checkboxTree: y,
|
|
132
131
|
selectedValues: e,
|
|
133
|
-
onChange:
|
|
132
|
+
onChange: o
|
|
134
133
|
}
|
|
135
134
|
)
|
|
136
135
|
] });
|
|
137
136
|
};
|
|
138
137
|
export {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
B as CheckboxTreeExample,
|
|
139
|
+
G as CheckboxTreeWithChips,
|
|
140
|
+
U as default
|
|
142
141
|
};
|
|
143
142
|
//# sourceMappingURL=CheckboxTree.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxTree.stories.js","sources":["../../../node_modules/storybook/dist/actions/index.js","../../../src/components/CheckboxTree/CheckboxTree.stories.tsx"],"sourcesContent":["var w = Object.defineProperty;\nvar i = (o, n) => w(o, \"name\", { value: n, configurable: !0 });\n\n// src/actions/constants.ts\nvar P = \"actions\", a = \"storybook/actions\", S = `${a}/panel`, f = `${a}/action-event`, I = `${a}/action-clear`, T = \"$___storybook.isCyclic\";\n\n// src/actions/runtime/action.ts\nimport { ImplicitActionsDuringRendering as _ } from \"storybook/internal/preview-errors\";\nimport { global as d } from \"@storybook/global\";\nimport { addons as v } from \"storybook/preview-api\";\n\n// src/actions/runtime/configureActions.ts\nvar c = {\n depth: 10,\n clearOnStoryChange: !0,\n limit: 50\n}, C = /* @__PURE__ */ i((o = {}) => {\n Object.assign(c, o);\n}, \"configureActions\");\n\n// src/actions/runtime/action.ts\nvar u = /* @__PURE__ */ i((o, n) => {\n let t = Object.getPrototypeOf(o);\n return !t || n(t) ? t : u(t, n);\n}, \"findProto\"), D = /* @__PURE__ */ i((o) => !!(typeof o == \"object\" && o && u(o, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&\ntypeof o.persist == \"function\"), \"isReactSyntheticEvent\"), x = /* @__PURE__ */ i((o) => {\n if (D(o)) {\n let n = Object.create(\n o.constructor.prototype,\n Object.getOwnPropertyDescriptors(o)\n );\n n.persist();\n let t = Object.getOwnPropertyDescriptor(n, \"view\"), e = t?.value;\n return typeof e == \"object\" && e?.constructor.name === \"Window\" && Object.defineProperty(n, \"view\", {\n ...t,\n value: Object.create(e.constructor.prototype)\n }), n;\n }\n return o;\n}, \"serializeArg\");\nfunction g(o, n = {}) {\n let t = {\n ...c,\n ...n\n }, e = /* @__PURE__ */ i(function(...r) {\n if (n.implicit) {\n let m = (\"__STORYBOOK_PREVIEW__\" in d ? d.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(\n (s) => s.phase === \"playing\" || s.phase === \"rendering\"\n );\n if (m) {\n let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, y = new _({\n phase: m.phase,\n name: o,\n deprecated: s\n });\n if (s)\n console.warn(y);\n else\n throw y;\n }\n }\n let A = v.getChannel(), O = Date.now().toString(36) + Math.random().toString(36).substring(2), h = 5, l = r.map(x), E = r.length > 1 ? l :\n l[0], b = {\n id: O,\n count: 0,\n data: { name: o, args: E },\n options: {\n ...t,\n maxDepth: h + (t.depth || 3)\n }\n };\n A.emit(f, b);\n }, \"actionHandler\");\n return e.isAction = !0, e.implicit = n.implicit, e;\n}\ni(g, \"action\");\n\n// src/actions/runtime/actions.ts\nvar L = /* @__PURE__ */ i((...o) => {\n let n = c, t = o;\n t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != \"string\" && (n = {\n ...c,\n ...t.pop()\n });\n let e = t[0];\n (t.length !== 1 || typeof e == \"string\") && (e = {}, t.forEach((r) => {\n e[r] = r;\n }));\n let p = {};\n return Object.keys(e).forEach((r) => {\n p[r] = g(e[r], n);\n }), p;\n}, \"actions\");\nexport {\n a as ADDON_ID,\n I as CLEAR_ID,\n T as CYCLIC_KEY,\n f as EVENT_ID,\n S as PANEL_ID,\n P as PARAM_KEY,\n g as action,\n L as actions,\n c as config,\n C as configureActions\n};\n","import { fn } from 'storybook/test';\nimport { action } from 'storybook/actions';\nimport { useState } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxLeaf, CheckboxBranch, CheckboxTreeProps } from './CheckboxTree';\n\nimport { CheckboxTree } from './CheckboxTree';\n\nimport { Chip } from 'components/Chip';\n\nconst createPeriodTree = (periodIndices: string[], numberOfPeriods: number, periodPerSemester: number) => {\n const allPeriods = Array.from({ length: numberOfPeriods }, (_, idx) => idx + 1);\n\n const periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / periodPerSemester);\n const period = semester === periodPerSemester ? '' : `.${parseInt(value) % periodPerSemester || periodPerSemester}`;\n return `${semester}${period}`;\n };\n\n const periodTree = allPeriods.map((periodIndex) => ({\n itemName: periodValueToLabel(String(periodIndex)),\n itemValue: periodIndex,\n disabled: false,\n }));\n\n const periodTreeObject = allPeriods.reduce((periods, currentPeriod, periodIndex) => {\n const semester = Math.ceil(currentPeriod / periodPerSemester);\n if (periodIndices.includes(String(periodIndex + 1))) {\n if (!periods[semester]) {\n periods[semester] = {\n itemName: `Semester ${semester}`,\n children: [],\n };\n }\n periods[semester].children.push({\n ...periodTree[periodIndex],\n itemValue: String(periodTree[periodIndex].itemValue),\n } as CheckboxLeaf);\n }\n return periods;\n }, [] as CheckboxBranch[]);\n\n return periodTreeObject;\n};\n\nconst NUMBER_OF_PERIODS = 7;\nconst PERIOD_PER_SEMESTER = 3;\n\nconst MOCK_CHECKBOX_TREE = createPeriodTree(\n ['1', '2', '3', '4', '5', '6', '7'],\n NUMBER_OF_PERIODS,\n PERIOD_PER_SEMESTER\n);\n\nconst codeString = '<CheckboxTree title={} checkboxTree={} selectedValues={} onChange={} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/CheckboxTree',\n component: CheckboxTree,\n parameters: {\n inspectComponent: CheckboxTree,\n codeString: codeString,\n },\n} as Meta<CheckboxTreeProps>;\n\nconst Template: StoryFn<CheckboxTreeProps> = (args) => <CheckboxTree {...args} />;\n\nexport const CheckboxTreeExample = Template.bind({});\nCheckboxTreeExample.args = {\n title: 'Periode',\n checkboxTree: MOCK_CHECKBOX_TREE,\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n selectedValues: ['3', '4'],\n onChange: fn(),\n};\n\nconst PERIOD_SEGMENT = 3;\n\nconst periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / PERIOD_SEGMENT);\n const period = semester === PERIOD_SEGMENT ? '' : `.${parseInt(value) % PERIOD_SEGMENT || PERIOD_SEGMENT}`;\n return `${semester}${period}`;\n};\n\nconst periodLabelToValue = (value: string): string => {\n const [row, col] = value.split('.').map(Number);\n return `${(row - 1) * PERIOD_SEGMENT + (col || 1)}`;\n};\n\nexport const CheckboxTreeWithChips: StoryFn<CheckboxTreeProps> = () => {\n const [activeFilters, setActiveFilters] = useState<string[]>(['5', '4', '1']);\n\n const handleRemoveActiveFilter = (filterToRemove: string) => {\n const newActiveFilters = JSON.parse(JSON.stringify(activeFilters)).filter(\n (filter: string) => filter !== periodLabelToValue(filterToRemove)\n );\n\n setActiveFilters(() => newActiveFilters);\n action('onChange value:')(newActiveFilters);\n };\n\n const handlePeriodChange = (value: string[]) => {\n setActiveFilters([...value]);\n action('onChange value:')(value);\n };\n\n return (\n <div style={{ width: '15rem' }}>\n <div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem', width: '100%', marginBottom: '1rem' }}>\n {activeFilters &&\n activeFilters.map((activeFilter, index) => (\n <Chip\n label={periodValueToLabel(activeFilter)}\n onDelete={handleRemoveActiveFilter}\n key={`${index}_${activeFilter}`}\n />\n ))}\n </div>\n <CheckboxTree\n title=\"Periode\"\n checkboxTree={MOCK_CHECKBOX_TREE}\n selectedValues={activeFilters}\n onChange={handlePeriodChange}\n />\n </div>\n );\n};\n"],"names":["w","i","o","n","a","f","c","u","t","D","x","e","g","r","m","_a","d","s","_b","y","_","A","v","O","h","l","E","b","createPeriodTree","periodIndices","numberOfPeriods","periodPerSemester","allPeriods","idx","periodValueToLabel","value","semester","period","periodTree","periodIndex","periods","currentPeriod","NUMBER_OF_PERIODS","PERIOD_PER_SEMESTER","MOCK_CHECKBOX_TREE","codeString","CheckboxTree_stories","CheckboxTree","Template","args","jsx","CheckboxTreeExample","fn","PERIOD_SEGMENT","periodLabelToValue","row","col","CheckboxTreeWithChips","activeFilters","setActiveFilters","useState","handleRemoveActiveFilter","filterToRemove","newActiveFilters","filter","action","handlePeriodChange","activeFilter","index","Chip"],"mappings":";;;;;;AAAA,IAAIA,IAAI,OAAO,gBACXC,IAAI,CAACC,GAAGC,MAAMH,EAAEE,GAAG,QAAQ,EAAE,OAAOC,GAAG,cAAc,GAAE,CAAE,GAG1CC,IAAI,qBAAuCC,IAAI,GAAGD,CAAC,iBAQlEE,IAAI;AAAA,EACN,OAAO;AAAA,EACP,oBA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IAAA;AAAA,EACZ,GACF;AAEJ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"CheckboxTree.stories.js","sources":["../../../node_modules/storybook/dist/actions/index.js","../../../src/components/CheckboxTree/CheckboxTree.stories.tsx"],"sourcesContent":["var w = Object.defineProperty;\nvar i = (o, n) => w(o, \"name\", { value: n, configurable: !0 });\n\n// src/actions/constants.ts\nvar P = \"actions\", a = \"storybook/actions\", S = `${a}/panel`, f = `${a}/action-event`, I = `${a}/action-clear`, T = \"$___storybook.isCyclic\";\n\n// src/actions/runtime/action.ts\nimport { ImplicitActionsDuringRendering as _ } from \"storybook/internal/preview-errors\";\nimport { global as d } from \"@storybook/global\";\nimport { addons as v } from \"storybook/preview-api\";\n\n// src/actions/runtime/configureActions.ts\nvar c = {\n depth: 10,\n clearOnStoryChange: !0,\n limit: 50\n}, C = /* @__PURE__ */ i((o = {}) => {\n Object.assign(c, o);\n}, \"configureActions\");\n\n// src/actions/runtime/action.ts\nvar u = /* @__PURE__ */ i((o, n) => {\n let t = Object.getPrototypeOf(o);\n return !t || n(t) ? t : u(t, n);\n}, \"findProto\"), D = /* @__PURE__ */ i((o) => !!(typeof o == \"object\" && o && u(o, (n) => /^Synthetic(?:Base)?Event$/.test(n.constructor.name)) &&\ntypeof o.persist == \"function\"), \"isReactSyntheticEvent\"), x = /* @__PURE__ */ i((o) => {\n if (D(o)) {\n let n = Object.create(\n o.constructor.prototype,\n Object.getOwnPropertyDescriptors(o)\n );\n n.persist();\n let t = Object.getOwnPropertyDescriptor(n, \"view\"), e = t?.value;\n return typeof e == \"object\" && e?.constructor.name === \"Window\" && Object.defineProperty(n, \"view\", {\n ...t,\n value: Object.create(e.constructor.prototype)\n }), n;\n }\n return o;\n}, \"serializeArg\");\nfunction g(o, n = {}) {\n let t = {\n ...c,\n ...n\n }, e = /* @__PURE__ */ i(function(...r) {\n if (n.implicit) {\n let m = (\"__STORYBOOK_PREVIEW__\" in d ? d.__STORYBOOK_PREVIEW__ : void 0)?.storyRenders.find(\n (s) => s.phase === \"playing\" || s.phase === \"rendering\"\n );\n if (m) {\n let s = !globalThis?.FEATURES?.disallowImplicitActionsInRenderV8, y = new _({\n phase: m.phase,\n name: o,\n deprecated: s\n });\n if (s)\n console.warn(y);\n else\n throw y;\n }\n }\n let A = v.getChannel(), O = Date.now().toString(36) + Math.random().toString(36).substring(2), h = 5, l = r.map(x), E = r.length > 1 ? l :\n l[0], b = {\n id: O,\n count: 0,\n data: { name: o, args: E },\n options: {\n ...t,\n maxDepth: h + (t.depth || 3)\n }\n };\n A.emit(f, b);\n }, \"actionHandler\");\n return e.isAction = !0, e.implicit = n.implicit, e;\n}\ni(g, \"action\");\n\n// src/actions/runtime/actions.ts\nvar L = /* @__PURE__ */ i((...o) => {\n let n = c, t = o;\n t.length === 1 && Array.isArray(t[0]) && ([t] = t), t.length !== 1 && typeof t[t.length - 1] != \"string\" && (n = {\n ...c,\n ...t.pop()\n });\n let e = t[0];\n (t.length !== 1 || typeof e == \"string\") && (e = {}, t.forEach((r) => {\n e[r] = r;\n }));\n let p = {};\n return Object.keys(e).forEach((r) => {\n p[r] = g(e[r], n);\n }), p;\n}, \"actions\");\nexport {\n a as ADDON_ID,\n I as CLEAR_ID,\n T as CYCLIC_KEY,\n f as EVENT_ID,\n S as PANEL_ID,\n P as PARAM_KEY,\n g as action,\n L as actions,\n c as config,\n C as configureActions\n};\n","import { fn } from 'storybook/test';\nimport { action } from 'storybook/actions';\nimport { useState } from 'react';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { CheckboxLeaf, CheckboxBranch, CheckboxTreeProps } from './CheckboxTree';\n\nimport { CheckboxTree } from './CheckboxTree';\n\nimport { Chip } from 'components/Chip';\n\nconst createPeriodTree = (periodIndices: string[], numberOfPeriods: number, periodPerSemester: number) => {\n const allPeriods = Array.from({ length: numberOfPeriods }, (_, idx) => idx + 1);\n\n const periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / periodPerSemester);\n const period = semester === periodPerSemester ? '' : `.${parseInt(value) % periodPerSemester || periodPerSemester}`;\n return `${semester}${period}`;\n };\n\n const periodTree = allPeriods.map((periodIndex) => ({\n itemName: periodValueToLabel(String(periodIndex)),\n itemValue: periodIndex,\n disabled: false,\n }));\n\n const periodTreeObject = allPeriods.reduce((periods, currentPeriod, periodIndex) => {\n const semester = Math.ceil(currentPeriod / periodPerSemester);\n if (periodIndices.includes(String(periodIndex + 1))) {\n if (!periods[semester]) {\n periods[semester] = {\n itemName: `Semester ${semester}`,\n children: [],\n };\n }\n periods[semester].children.push({\n ...periodTree[periodIndex],\n itemValue: String(periodTree[periodIndex].itemValue),\n } as CheckboxLeaf);\n }\n return periods;\n }, [] as CheckboxBranch[]);\n\n return periodTreeObject;\n};\n\nconst NUMBER_OF_PERIODS = 7;\nconst PERIOD_PER_SEMESTER = 3;\n\nconst MOCK_CHECKBOX_TREE = createPeriodTree(\n ['1', '2', '3', '4', '5', '6', '7'],\n NUMBER_OF_PERIODS,\n PERIOD_PER_SEMESTER\n);\n\nconst codeString = '<CheckboxTree title={} checkboxTree={} selectedValues={} onChange={} />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Organisms/CheckboxTree',\n component: CheckboxTree,\n parameters: {\n inspectComponent: CheckboxTree,\n codeString: codeString,\n },\n} as Meta<CheckboxTreeProps>;\n\nconst Template: StoryFn<CheckboxTreeProps> = (args) => <CheckboxTree {...args} />;\n\nexport const CheckboxTreeExample = Template.bind({});\nCheckboxTreeExample.args = {\n title: 'Periode',\n checkboxTree: MOCK_CHECKBOX_TREE,\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n selectedValues: ['3', '4'],\n onChange: fn(),\n};\n\nconst PERIOD_SEGMENT = 3;\n\nconst periodValueToLabel = (value: string) => {\n const semester = Math.ceil(parseInt(value) / PERIOD_SEGMENT);\n const period = semester === PERIOD_SEGMENT ? '' : `.${parseInt(value) % PERIOD_SEGMENT || PERIOD_SEGMENT}`;\n return `${semester}${period}`;\n};\n\nconst periodLabelToValue = (value: string): string => {\n const [row, col] = value.split('.').map(Number);\n return `${(row - 1) * PERIOD_SEGMENT + (col || 1)}`;\n};\n\nexport const CheckboxTreeWithChips: StoryFn<CheckboxTreeProps> = () => {\n const [activeFilters, setActiveFilters] = useState<string[]>(['5', '4', '1']);\n\n const handleRemoveActiveFilter = (filterToRemove: string) => {\n const newActiveFilters = JSON.parse(JSON.stringify(activeFilters)).filter(\n (filter: string) => filter !== periodLabelToValue(filterToRemove)\n );\n\n setActiveFilters(() => newActiveFilters);\n action('onChange value:')(newActiveFilters);\n };\n\n const handlePeriodChange = (value: string[]) => {\n setActiveFilters([...value]);\n action('onChange value:')(value);\n };\n\n return (\n <div style={{ width: '15rem' }}>\n <div style={{ display: 'flex', flexWrap: 'wrap', gap: '0.5rem', width: '100%', marginBottom: '1rem' }}>\n {activeFilters &&\n activeFilters.map((activeFilter, index) => (\n <Chip\n label={periodValueToLabel(activeFilter)}\n onDelete={handleRemoveActiveFilter}\n key={`${index}_${activeFilter}`}\n />\n ))}\n </div>\n <CheckboxTree\n title=\"Periode\"\n checkboxTree={MOCK_CHECKBOX_TREE}\n selectedValues={activeFilters}\n onChange={handlePeriodChange}\n />\n </div>\n );\n};\n"],"names":["w","i","o","n","a","f","c","u","t","D","x","e","g","r","m","d","s","y","_","A","v","O","h","l","E","b","createPeriodTree","periodIndices","numberOfPeriods","periodPerSemester","allPeriods","idx","periodValueToLabel","value","semester","period","periodTree","periodIndex","periods","currentPeriod","NUMBER_OF_PERIODS","PERIOD_PER_SEMESTER","MOCK_CHECKBOX_TREE","codeString","CheckboxTree_stories","CheckboxTree","Template","args","jsx","CheckboxTreeExample","fn","PERIOD_SEGMENT","periodLabelToValue","row","col","CheckboxTreeWithChips","activeFilters","setActiveFilters","useState","handleRemoveActiveFilter","filterToRemove","newActiveFilters","filter","action","handlePeriodChange","activeFilter","index","Chip"],"mappings":";;;;;;AAAA,IAAIA,IAAI,OAAO,gBACXC,IAAI,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,QACC,OAAM;AAAA,QACN,cAAcH;AAAA,QACd,gBAAgBc;AAAA,QAChB,UAAUQ;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { l as t } from "../../index-C2E9FY6V.js";
|
|
3
3
|
import { Chip as e } from "./Chip.js";
|
|
4
4
|
const s = "<Chip label={string} onDelete={onDeleteFunction(label)}/>", b = {
|
|
5
5
|
title: "Atoms/Chip",
|
|
@@ -9,14 +9,14 @@ const s = "<Chip label={string} onDelete={onDeleteFunction(label)}/>", b = {
|
|
|
9
9
|
inspectComponent: e,
|
|
10
10
|
codeString: s
|
|
11
11
|
}
|
|
12
|
-
},
|
|
12
|
+
}, l = (n) => /* @__PURE__ */ o(e, { ...n }), a = {
|
|
13
13
|
label: "Nederlands",
|
|
14
14
|
onDelete: t()
|
|
15
|
-
}, i =
|
|
15
|
+
}, i = l.bind({});
|
|
16
16
|
i.args = {
|
|
17
17
|
...a
|
|
18
18
|
};
|
|
19
|
-
const r =
|
|
19
|
+
const r = l.bind({});
|
|
20
20
|
r.args = {
|
|
21
21
|
label: "Een filter met een veel te lang label",
|
|
22
22
|
onDelete: t()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { l } from "../../index-C2E9FY6V.js";
|
|
3
3
|
import { ControlsButton as o } from "./ControlsButton.js";
|
|
4
|
-
const
|
|
4
|
+
const r = "<ControlsButton type={radio or checkbox} label={} value={} prefix={} forceSquared={}isChecked={} variant={} disabled={} notValid={} onSetValue={} key={} />", u = {
|
|
5
5
|
title: "Atoms/ControlsButton",
|
|
6
6
|
component: o,
|
|
7
7
|
argTypes: {
|
|
@@ -28,15 +28,15 @@ const n = "<ControlsButton type={radio or checkbox} label={} value={} prefix={}
|
|
|
28
28
|
},
|
|
29
29
|
parameters: {
|
|
30
30
|
inspectComponent: o,
|
|
31
|
-
codeString:
|
|
31
|
+
codeString: r
|
|
32
32
|
}
|
|
33
|
-
},
|
|
33
|
+
}, n = (e) => /* @__PURE__ */ t(o, { ...e }), a = n.bind({});
|
|
34
34
|
a.args = {
|
|
35
35
|
type: "checkbox",
|
|
36
36
|
label: "1.2",
|
|
37
37
|
value: "1.2",
|
|
38
38
|
forceSquared: !0,
|
|
39
|
-
onSetValue:
|
|
39
|
+
onSetValue: l()
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
42
|
a as ControlsButtonExample,
|
|
@@ -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 {
|
|
3
|
+
import { l as m } from "../../index-C2E9FY6V.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,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as s, s as e, f as r } from "../../react.esm-
|
|
2
|
+
import "../../index-Br0QepD6.js";
|
|
3
|
+
import { r as s, s as e, f as r } from "../../react.esm-BKjCIfbB.js";
|
|
4
4
|
import { FeedbackBar as c } from "./FeedbackBar.js";
|
|
5
5
|
describe("FeedbackBar", () => {
|
|
6
6
|
it("should render with children text", () => {
|
|
@@ -16,15 +16,15 @@ import "../IconButton/IconButton.js";
|
|
|
16
16
|
import "../Input/Input.js";
|
|
17
17
|
import "../InputField/InputField.js";
|
|
18
18
|
import "react-router";
|
|
19
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-Dmy98Epb.js";
|
|
20
20
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
21
21
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
22
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
23
|
-
import "../../index-
|
|
23
|
+
import "../../index-nrPtQ1dv.js";
|
|
24
24
|
import "../SelectListbox/SelectListbox.js";
|
|
25
25
|
import "../SelectListbox/SelectProvider.js";
|
|
26
26
|
import "../Sortable/components/SortableItem.js";
|
|
27
|
-
import "../../SortableProvider-
|
|
27
|
+
import "../../SortableProvider-C2T7b-pm.js";
|
|
28
28
|
import '../../assets/FormInput.css';const o = {
|
|
29
29
|
"form-input__container": "_form-input__container_c0vpz_1",
|
|
30
30
|
"form-input__container--label-left": "_form-input__container--label-left_c0vpz_7",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { l as i } from "../../index-C2E9FY6V.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,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/HorizontalList.css';const
|
|
1
|
+
import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/HorizontalList.css';const o = {
|
|
3
3
|
"horizontal-list-wrapper": "_horizontal-list-wrapper_oivby_1",
|
|
4
4
|
"horizontal-list-value": "_horizontal-list-value_oivby_6",
|
|
5
5
|
"horizontal-list-separator": "_horizontal-list-separator_oivby_11"
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
] }, `${
|
|
6
|
+
}, e = ({ values: t, separator: l = "•" }) => /* @__PURE__ */ i("div", { className: o["horizontal-list-wrapper"], children: t.map((r, a) => /* @__PURE__ */ s("span", { className: o["horizontal-list-value"], children: [
|
|
7
|
+
r,
|
|
8
|
+
a < t.length - 1 && /* @__PURE__ */ i("span", { className: o["horizontal-list-separator"], children: l })
|
|
9
|
+
] }, `${r?.toString()}-${a}`)) });
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
e as HorizontalList
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=HorizontalList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n /** The items to display. */\n values: ReactNode[];\n /** The separator to use. */\n separator?: ReactNode;\n}\n\n/** Represents a component to show text separated by a given separator in a horizontal direction. */\nexport const HorizontalList = ({ values, separator = '•' }: HorizontalListProps) => {\n return (\n <div className={styles['horizontal-list-wrapper']}>\n {values.map((value, index) => (\n <span className={styles['horizontal-list-value']} key={`${value?.toString()}-${index}`}>\n {value}\n {index < values.length - 1 && <span className={styles['horizontal-list-separator']}>{separator}</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"names":["HorizontalList","values","separator","styles","value","index","jsxs","jsx"],"mappings":";;;;;GAYaA,IAAiB,CAAC,EAAE,QAAAC,GAAQ,WAAAC,IAAY,4BAEhD,OAAA,EAAI,WAAWC,EAAO,yBAAyB,GAC7C,UAAAF,EAAO,IAAI,CAACG,GAAOC,MAClB,gBAAAC,EAAC,QAAA,EAAK,WAAWH,EAAO,uBAAuB,GAC5C,UAAA;AAAA,EAAAC;AAAA,EACAC,IAAQJ,EAAO,SAAS,KAAK,gBAAAM,EAAC,UAAK,WAAWJ,EAAO,2BAA2B,GAAI,UAAAD,EAAA,CAAU;AAAA,KAF1C,GAAGE,
|
|
1
|
+
{"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n /** The items to display. */\n values: ReactNode[];\n /** The separator to use. */\n separator?: ReactNode;\n}\n\n/** Represents a component to show text separated by a given separator in a horizontal direction. */\nexport const HorizontalList = ({ values, separator = '•' }: HorizontalListProps) => {\n return (\n <div className={styles['horizontal-list-wrapper']}>\n {values.map((value, index) => (\n <span className={styles['horizontal-list-value']} key={`${value?.toString()}-${index}`}>\n {value}\n {index < values.length - 1 && <span className={styles['horizontal-list-separator']}>{separator}</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"names":["HorizontalList","values","separator","styles","value","index","jsxs","jsx"],"mappings":";;;;;GAYaA,IAAiB,CAAC,EAAE,QAAAC,GAAQ,WAAAC,IAAY,4BAEhD,OAAA,EAAI,WAAWC,EAAO,yBAAyB,GAC7C,UAAAF,EAAO,IAAI,CAACG,GAAOC,MAClB,gBAAAC,EAAC,QAAA,EAAK,WAAWH,EAAO,uBAAuB,GAC5C,UAAA;AAAA,EAAAC;AAAA,EACAC,IAAQJ,EAAO,SAAS,KAAK,gBAAAM,EAAC,UAAK,WAAWJ,EAAO,2BAA2B,GAAI,UAAAD,EAAA,CAAU;AAAA,KAF1C,GAAGE,GAAO,SAAA,CAAU,IAAIC,CAAK,EAGpF,CACD,GACH;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { l as r } from "../../index-C2E9FY6V.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 e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useRef as g } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { l } from "../../index-C2E9FY6V.js";
|
|
4
4
|
import { InputField as o } from "./InputField.js";
|
|
5
5
|
import { Container as u } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
import { Icon as h } from "../Icon/Icon.js";
|
|
@@ -16,15 +16,15 @@ import "../GridRow/GridRow.js";
|
|
|
16
16
|
import "../IconButton/IconButton.js";
|
|
17
17
|
import "../Input/Input.js";
|
|
18
18
|
import "react-router";
|
|
19
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-Dmy98Epb.js";
|
|
20
20
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
21
21
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
22
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
23
|
-
import "../../index-
|
|
23
|
+
import "../../index-nrPtQ1dv.js";
|
|
24
24
|
import "../SelectListbox/SelectListbox.js";
|
|
25
25
|
import "../SelectListbox/SelectProvider.js";
|
|
26
26
|
import "../Sortable/components/SortableItem.js";
|
|
27
|
-
import "../../SortableProvider-
|
|
27
|
+
import "../../SortableProvider-C2T7b-pm.js";
|
|
28
28
|
const C = `
|
|
29
29
|
// Has all HTMLInputElement props available except "className" and "style"
|
|
30
30
|
<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}
|
|
@@ -85,12 +85,12 @@ const C = `
|
|
|
85
85
|
type: "text",
|
|
86
86
|
variant: void 0,
|
|
87
87
|
id: "4f9ca77d"
|
|
88
|
-
},
|
|
89
|
-
|
|
88
|
+
}, b = a.bind({});
|
|
89
|
+
b.args = {
|
|
90
90
|
...i
|
|
91
91
|
};
|
|
92
|
-
const
|
|
93
|
-
|
|
92
|
+
const v = a.bind({});
|
|
93
|
+
v.args = {
|
|
94
94
|
...i,
|
|
95
95
|
clearTrigger: "Clear"
|
|
96
96
|
};
|
|
@@ -100,9 +100,9 @@ y.args = {
|
|
|
100
100
|
clearTrigger: /* @__PURE__ */ e(h, { name: "Cross" })
|
|
101
101
|
};
|
|
102
102
|
export {
|
|
103
|
-
|
|
103
|
+
b as InputFieldExample,
|
|
104
104
|
y as WithIconClearTrigger,
|
|
105
|
-
|
|
105
|
+
v as WithStringClearTrigger,
|
|
106
106
|
Q as default
|
|
107
107
|
};
|
|
108
108
|
//# sourceMappingURL=InputField.stories.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-
|
|
3
|
-
import { r as t, s as l } from "../../react.esm-
|
|
2
|
+
import "../../index-Br0QepD6.js";
|
|
3
|
+
import { r as t, s as l } from "../../react.esm-BKjCIfbB.js";
|
|
4
4
|
import { Label as r } from "./Label.js";
|
|
5
5
|
describe("Label", () => {
|
|
6
6
|
it("should render", () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { ModalProvider as
|
|
3
|
-
import {
|
|
2
|
+
import { ModalProvider as n } from "@react-aria/overlays";
|
|
3
|
+
import { l as i } from "../../index-C2E9FY6V.js";
|
|
4
4
|
import { ModalDialog as t } from "./ModalDialog.js";
|
|
5
|
-
import { Button as
|
|
5
|
+
import { Button as l } from "../Buttons/Button.js";
|
|
6
6
|
import "../Buttons/LinkButton.js";
|
|
7
7
|
import "@react-aria/button";
|
|
8
8
|
import { ButtonGroup as m } from "../ButtonGroup/ButtonGroup.js";
|
|
9
|
-
import { FormField as
|
|
9
|
+
import { FormField as r } from "../FormField/FormField.js";
|
|
10
10
|
import { InputField as d } from "../InputField/InputField.js";
|
|
11
11
|
import { Label as c } from "../Label/Label.js";
|
|
12
12
|
const p = `
|
|
@@ -50,7 +50,7 @@ const p = `
|
|
|
50
50
|
inspectComponent: t,
|
|
51
51
|
codeString: p
|
|
52
52
|
}
|
|
53
|
-
}, u = (o) => /* @__PURE__ */ e(
|
|
53
|
+
}, u = (o) => /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(t, { ...o, children: /* @__PURE__ */ a(r, { outerSpace: !0, children: [
|
|
54
54
|
/* @__PURE__ */ e(c, { htmlFor: "text-field", children: "Example Text Field" }),
|
|
55
55
|
/* @__PURE__ */ e(d, { id: "text-field" })
|
|
56
56
|
] }) }) }), s = {
|
|
@@ -65,8 +65,8 @@ const p = `
|
|
|
65
65
|
onSubmit: i(),
|
|
66
66
|
onClose: i(),
|
|
67
67
|
buttons: /* @__PURE__ */ a(m, { reversed: !0, children: [
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(l, { variant: "primary", onClick: i(), children: "OK" }),
|
|
69
|
+
/* @__PURE__ */ e(l, { variant: "secondary", onClick: i(), children: "Cancel" })
|
|
70
70
|
] }),
|
|
71
71
|
isOpen: !0
|
|
72
72
|
}, b = u.bind({});
|
|
@@ -79,7 +79,7 @@ g.args = {
|
|
|
79
79
|
isLoading: !0,
|
|
80
80
|
spinnerAriaValueText: "Loading"
|
|
81
81
|
};
|
|
82
|
-
const f = (o) => /* @__PURE__ */ e(
|
|
82
|
+
const f = (o) => /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(t, { ...o, children: /* @__PURE__ */ a(r, { outerSpace: !0, children: [
|
|
83
83
|
/* @__PURE__ */ e("div", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ac dui et nibh eleifend ultricies a id nulla. Pellentesque eleifend sem a tellus dictum tempus. Proin non leo id risus placerat vulputate at ac erat. Ut fringilla imperdiet sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Cras molestie ante ac magna ornare rhoncus non at quam. Mauris elementum luctus euismod. Pellentesque molestie malesuada purus, sed egestas lacus interdum sit amet. Morbi blandit lacus sit amet dictum pulvinar. Ut semper nunc ac enim imperdiet, non interdum diam gravida. In nunc tortor, mollis ac molestie dignissim, elementum sed quam. Suspendisse mollis venenatis libero, pellentesque vestibulum elit consequat et. Aliquam fringilla tellus id libero tempus, sit amet suscipit augue tristique. Quisque cursus neque vel justo tristique, eget semper turpis elementum. Etiam venenatis mattis sapien ac mattis. Mauris vitae ultrices erat." }),
|
|
84
84
|
/* @__PURE__ */ e("div", { children: "Aliquam facilisis massa sed justo rhoncus bibendum. Sed lobortis urna orci, vitae porta leo placerat nec. Nam porta porttitor ornare. Suspendisse vehicula nunc nec egestas finibus. Aliquam non luctus risus. Phasellus ac diam tincidunt, bibendum sem eget, sollicitudin neque. Curabitur mauris risus, feugiat ac euismod non, vulputate ac justo. Curabitur pretium vehicula augue, blandit porta odio rutrum sit amet. Proin semper enim ut sapien tempor, a ornare ipsum faucibus." })
|
|
85
85
|
] }) }) }), h = f.bind({});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { l as d } from "../../index-C2E9FY6V.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
|
-
import { M as e } from "../../TablePlugin-
|
|
4
|
+
import { M as e } from "../../TablePlugin-Dmy98Epb.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
const C = `
|
|
7
7
|
// MultiSelectHeader can be added optionally
|
|
@@ -12,7 +12,7 @@ const C = `
|
|
|
12
12
|
checked={stateItems.includes(itemValue)} onChange={handleChange} disabled={disabled} />
|
|
13
13
|
))}
|
|
14
14
|
</MultiSelect>
|
|
15
|
-
`,
|
|
15
|
+
`, H = {
|
|
16
16
|
title: "Organisms/MultiSelect",
|
|
17
17
|
component: e,
|
|
18
18
|
argTypes: {
|
|
@@ -27,14 +27,14 @@ const C = `
|
|
|
27
27
|
codeString: C
|
|
28
28
|
}
|
|
29
29
|
}, m = (i) => {
|
|
30
|
-
const [n, o] = p([]),
|
|
30
|
+
const [n, o] = p([]), I = [
|
|
31
31
|
{ itemName: "AItem 1", itemValue: "1", disabled: !0 },
|
|
32
32
|
{ itemName: "BItem 2", itemValue: "2" },
|
|
33
33
|
{ itemName: "Multi line Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3 Item 3", itemValue: "3" },
|
|
34
34
|
{ itemName: "CItem 4", itemValue: "4" },
|
|
35
35
|
{ itemName: "DItem 5", itemValue: "5" },
|
|
36
36
|
{ itemName: "EItem 6", itemValue: "6" }
|
|
37
|
-
],
|
|
37
|
+
], h = () => {
|
|
38
38
|
o([]), d()();
|
|
39
39
|
}, b = (t) => {
|
|
40
40
|
const { checked: l, value: a } = t.target;
|
|
@@ -49,10 +49,10 @@ const C = `
|
|
|
49
49
|
{
|
|
50
50
|
label: "Item list",
|
|
51
51
|
clearTrigger: n.length > 0 ? "Clear Selection" : "",
|
|
52
|
-
onClear:
|
|
52
|
+
onClear: h
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
/* @__PURE__ */ r(e, { ...i, children:
|
|
55
|
+
/* @__PURE__ */ r(e, { ...i, children: I.map(({ itemName: t, itemValue: l, disabled: a }) => /* @__PURE__ */ r(
|
|
56
56
|
e.MultiSelectItem,
|
|
57
57
|
{
|
|
58
58
|
label: t,
|
|
@@ -90,6 +90,6 @@ export {
|
|
|
90
90
|
f as MultiSelectExample,
|
|
91
91
|
N as WithHeader,
|
|
92
92
|
V as WithheaderAndWithoutScrollContainerAndBorder,
|
|
93
|
-
|
|
93
|
+
H as default
|
|
94
94
|
};
|
|
95
95
|
//# sourceMappingURL=MultiSelect.stories.js.map
|
|
@@ -15,15 +15,15 @@ import "../../IconButton/IconButton.js";
|
|
|
15
15
|
import "../../Input/Input.js";
|
|
16
16
|
import "../../InputField/InputField.js";
|
|
17
17
|
import "react-router";
|
|
18
|
-
import { a as y } from "../../../TablePlugin-
|
|
18
|
+
import { a as y } from "../../../TablePlugin-Dmy98Epb.js";
|
|
19
19
|
import "../../RteEditor/Providers/LanguageProvider.js";
|
|
20
20
|
import "../../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
21
|
import "../../RteEditor/hooks/components/Flyout.js";
|
|
22
|
-
import "../../../index-
|
|
22
|
+
import "../../../index-nrPtQ1dv.js";
|
|
23
23
|
import "../../SelectListbox/SelectListbox.js";
|
|
24
24
|
import "../../SelectListbox/SelectProvider.js";
|
|
25
25
|
import "../../Sortable/components/SortableItem.js";
|
|
26
|
-
import "../../../SortableProvider-
|
|
26
|
+
import "../../../SortableProvider-C2T7b-pm.js";
|
|
27
27
|
export {
|
|
28
28
|
y as MultiSelectHeader
|
|
29
29
|
};
|