@uva-glass/component-library 2.6.2 → 2.7.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-BAr6tzpa.js → Lexical.prod-sR6tW7N6.js} +894 -894
- package/dist/Lexical.prod-sR6tW7N6.js.map +1 -0
- package/dist/{LexicalClipboard.prod-CLCBYtDj.js → LexicalClipboard.prod-BbRoaXo6.js} +93 -93
- package/dist/LexicalClipboard.prod-BbRoaXo6.js.map +1 -0
- package/dist/{LexicalComposerContext.prod-Dyvim1tK.js → LexicalComposerContext.prod-DxxjdrXB.js} +2 -2
- package/dist/{LexicalComposerContext.prod-Dyvim1tK.js.map → LexicalComposerContext.prod-DxxjdrXB.js.map} +1 -1
- package/dist/{LexicalLink.prod-CBgZ4B3x.js → LexicalLink.prod-iDKxtfCF.js} +42 -42
- package/dist/LexicalLink.prod-iDKxtfCF.js.map +1 -0
- package/dist/{LexicalList.prod-haeqjypw.js → LexicalList.prod-ywkx7SnO.js} +56 -56
- package/dist/LexicalList.prod-ywkx7SnO.js.map +1 -0
- package/dist/LexicalSelection.prod-mYXylG1z.js +86 -0
- package/dist/{LexicalSelection.prod-C8x7KK4L.js.map → LexicalSelection.prod-mYXylG1z.js.map} +1 -1
- package/dist/LexicalTable.prod-XN7avk7R.js +1447 -0
- package/dist/LexicalTable.prod-XN7avk7R.js.map +1 -0
- package/dist/{LexicalUtils.prod-Dsec_Kl-.js → LexicalUtils.prod-DnFLi0Ww.js} +24 -24
- package/dist/{LexicalUtils.prod-Dsec_Kl-.js.map → LexicalUtils.prod-DnFLi0Ww.js.map} +1 -1
- package/dist/{SortableProvider-BUsvniX7.js → SortableProvider-RaH_ZXB3.js} +20 -20
- package/dist/{SortableProvider-BUsvniX7.js.map → SortableProvider-RaH_ZXB3.js.map} +1 -1
- package/dist/{TablePlugin-sPSGmCno.js → TablePlugin-5Cs2F_co.js} +12 -11
- package/dist/{TablePlugin-sPSGmCno.js.map → TablePlugin-5Cs2F_co.js.map} +1 -1
- package/dist/assets/FormInput.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.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +6 -5
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.d.ts +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js +110 -74
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.d.ts +2 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +121 -31
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FormInput/FormInput.d.ts +1 -1
- package/dist/components/FormInput/FormInput.js +39 -41
- package/dist/components/FormInput/FormInput.js.map +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.js +17 -17
- package/dist/components/InputField/InputField.stories.js +17 -16
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +5 -4
- package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
- package/dist/components/OverlayStepBar/OverlayStepBar.js +13 -12
- package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +15 -14
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +11 -10
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.js +3 -3
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +6 -5
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +15 -14
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +6 -5
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +10 -9
- 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 +48 -48
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +5 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +8 -7
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +5 -5
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/Providers/LanguageProvider.js +7 -7
- package/dist/components/RteEditor/RteEditor.js +473 -472
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js +10 -10
- package/dist/components/Sortable/Sortable.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js +7 -7
- package/dist/components/Sortable/SortableProvider.js +1 -1
- package/dist/components/Sortable/components/SortableContainer.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js +15 -15
- package/dist/components/Sortable/sortableReducer.js +21 -21
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +5 -5
- package/dist/components/Tooltip/Tooltip.js +22 -22
- package/dist/components/index.js +1 -1
- package/dist/{helpers-DHHQR5ys.js → helpers-BpqX-Lj3.js} +26 -26
- package/dist/helpers-BpqX-Lj3.js.map +1 -0
- package/dist/{index-0wq-B7do.js → index-B3c5pcHk.js} +22 -22
- package/dist/{index-0wq-B7do.js.map → index-B3c5pcHk.js.map} +1 -1
- package/dist/{index-B9BWML6P.js → index-BpZ8v2ye.js} +7088 -7092
- package/dist/{index-B9BWML6P.js.map → index-BpZ8v2ye.js.map} +1 -1
- package/dist/index-CHX1d9_A.js +21922 -0
- package/dist/{index-DWzkl4aY.js.map → index-CHX1d9_A.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-BIqxBxbW.js → react-18-CT6mjea2.js} +2 -2
- package/dist/{react-18-BIqxBxbW.js.map → react-18-CT6mjea2.js.map} +1 -1
- package/dist/storybook__react.d.js +510 -510
- package/dist/storybook__react.d.js.map +1 -1
- package/package.json +1 -1
- package/dist/Lexical.prod-BAr6tzpa.js.map +0 -1
- package/dist/LexicalClipboard.prod-CLCBYtDj.js.map +0 -1
- package/dist/LexicalLink.prod-CBgZ4B3x.js.map +0 -1
- package/dist/LexicalList.prod-haeqjypw.js.map +0 -1
- package/dist/LexicalSelection.prod-C8x7KK4L.js +0 -86
- package/dist/LexicalTable.prod-8RqiGUG-.js +0 -1447
- package/dist/LexicalTable.prod-8RqiGUG-.js.map +0 -1
- package/dist/helpers-DHHQR5ys.js.map +0 -1
- package/dist/index-DWzkl4aY.js +0 -21915
|
@@ -1,71 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as t, jsxs as c, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { c as g } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Buttons/Button.js";
|
|
5
5
|
import "../Buttons/LinkButton.js";
|
|
6
6
|
import "@react-aria/button";
|
|
7
|
-
import
|
|
7
|
+
import "../Checkbox/Checkbox.js";
|
|
8
|
+
import { Label as x } from "../Label/Label.js";
|
|
8
9
|
import "@react-aria/dialog";
|
|
9
10
|
import "@react-aria/focus";
|
|
10
11
|
import "@react-aria/overlays";
|
|
11
12
|
import "../OverlayCloseButton/OverlayCloseButton.js";
|
|
12
|
-
import { FeedbackBox as
|
|
13
|
+
import { FeedbackBox as h } from "../FeedbackBox/FeedbackBox.js";
|
|
13
14
|
import "../GridRow/GridRow.js";
|
|
14
15
|
import "../IconButton/IconButton.js";
|
|
15
16
|
import "../Input/Input.js";
|
|
16
17
|
import "../InputField/InputField.js";
|
|
17
18
|
import "react-router";
|
|
18
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-5Cs2F_co.js";
|
|
19
20
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
20
21
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
22
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
22
|
-
import "../../index-
|
|
23
|
+
import "../../index-B3c5pcHk.js";
|
|
23
24
|
import "../SelectListbox/SelectListbox.js";
|
|
24
25
|
import "../SelectListbox/SelectProvider.js";
|
|
25
26
|
import "../Sortable/components/SortableItem.js";
|
|
26
|
-
import "../../SortableProvider-
|
|
27
|
-
import '../../assets/FormInput.css';const
|
|
28
|
-
"form-
|
|
29
|
-
"form-
|
|
30
|
-
"form-
|
|
31
|
-
"form-
|
|
32
|
-
"form-
|
|
33
|
-
"form-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
customInput: m
|
|
27
|
+
import "../../SortableProvider-RaH_ZXB3.js";
|
|
28
|
+
import '../../assets/FormInput.css';const o = {
|
|
29
|
+
"form-input__container": "_form-input__container_g2j8x_1",
|
|
30
|
+
"form-input__container--label-left": "_form-input__container--label-left_g2j8x_7",
|
|
31
|
+
"form-input__container--label-top": "_form-input__container--label-top_g2j8x_18",
|
|
32
|
+
"form-input__input-feedback-container": "_form-input__input-feedback-container_g2j8x_25",
|
|
33
|
+
"form-input__input-container": "_form-input__input-container_g2j8x_35",
|
|
34
|
+
"form-input__input": "_form-input__input_g2j8x_25"
|
|
35
|
+
}, U = ({
|
|
36
|
+
id: i,
|
|
37
|
+
label: n,
|
|
38
|
+
labelPosition: f = "top",
|
|
39
|
+
type: e = "text",
|
|
40
|
+
required: l = !1,
|
|
41
|
+
notValidatedText: p = "",
|
|
42
|
+
onChange: m,
|
|
43
|
+
noContainer: u = !1,
|
|
44
|
+
customInput: _
|
|
45
45
|
}) => {
|
|
46
|
-
const
|
|
47
|
-
typeof
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
46
|
+
const s = (r) => ["e", "E", "+", "-"].includes(r.key) && r.preventDefault(), d = (r) => {
|
|
47
|
+
typeof m == "function" && m(r.target.value);
|
|
48
|
+
}, a = /* @__PURE__ */ c(b, { children: [
|
|
49
|
+
n && /* @__PURE__ */ t(x, { htmlFor: i, required: l, alignRight: !0, children: n }),
|
|
50
|
+
/* @__PURE__ */ c("div", { className: o["form-input__input-feedback-container"], children: [
|
|
51
|
+
_ || /* @__PURE__ */ t("div", { className: o["form-input__input-container"], children: /* @__PURE__ */ t(
|
|
52
52
|
"input",
|
|
53
53
|
{
|
|
54
|
-
id:
|
|
55
|
-
type:
|
|
56
|
-
...
|
|
57
|
-
onChange:
|
|
58
|
-
className:
|
|
59
|
-
e !== "" && r["form-field__input--error"]
|
|
60
|
-
])
|
|
54
|
+
id: i,
|
|
55
|
+
type: e,
|
|
56
|
+
...e === "number" && { onKeyDown: s },
|
|
57
|
+
onChange: d,
|
|
58
|
+
className: o["form-input__input"]
|
|
61
59
|
}
|
|
62
60
|
) }),
|
|
63
|
-
|
|
61
|
+
p !== "" && /* @__PURE__ */ t(h, { level: "error", feedback: p })
|
|
64
62
|
] })
|
|
65
63
|
] });
|
|
66
|
-
return
|
|
64
|
+
return u ? a : /* @__PURE__ */ t("div", { className: g(o["form-input__container"], o[`form-input__container--label-${f}`]), children: a });
|
|
67
65
|
};
|
|
68
66
|
export {
|
|
69
|
-
|
|
67
|
+
U as FormInput
|
|
70
68
|
};
|
|
71
69
|
//# sourceMappingURL=FormInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange
|
|
1
|
+
{"version":3,"file":"FormInput.js","sources":["../../../src/components/FormInput/FormInput.tsx"],"sourcesContent":["import clsx from 'clsx';\n\nimport type { ReactNode } from 'react';\n\nimport styles from './FormInput.module.css';\n\nimport { FeedbackBox, Label } from 'components';\n\nexport interface FormInputProps {\n /** The id of the input element. */\n id: string;\n /** label text if empthy the label is not renderd */\n label: string;\n /** label position `top` or `left`. The default is `top`. */\n labelPosition?: 'top' | 'left';\n /** The type of the input element. */\n type?: 'text' | 'password' | 'email' | 'number';\n /** Shows red * */\n required?: boolean;\n /** error text to display if set */\n notValidatedText?: string;\n /** Returns array of selected values as number */\n onChange?: (value: string) => void;\n /** Determines if the container wrapper is rendered. */\n noContainer?: boolean;\n /** Optional custom input that will replace the default input */\n customInput?: ReactNode;\n}\n\nexport const FormInput = ({\n id,\n label,\n labelPosition = 'top',\n type = 'text',\n required = false,\n notValidatedText = '',\n onChange,\n noContainer = false,\n customInput,\n}: FormInputProps) => {\n const blockInvalidChar = (event: React.KeyboardEvent<HTMLInputElement>) =>\n ['e', 'E', '+', '-'].includes(event.key) && event.preventDefault();\n\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (typeof onChange === 'function') {\n onChange(event.target.value);\n }\n };\n\n const componentContent = (\n <>\n {label && (\n <Label htmlFor={id} required={required} alignRight>\n {label}\n </Label>\n )}\n\n <div className={styles['form-input__input-feedback-container']}>\n {customInput ? (\n customInput\n ) : (\n <div className={styles['form-input__input-container']}>\n <input\n id={id}\n type={type}\n {...(type === 'number' && { onKeyDown: blockInvalidChar })}\n onChange={handleChange}\n className={styles['form-input__input']}\n />\n </div>\n )}\n {notValidatedText !== '' && <FeedbackBox level=\"error\" feedback={notValidatedText} />}\n </div>\n </>\n );\n\n return noContainer ? (\n componentContent\n ) : (\n <div className={clsx(styles['form-input__container'], styles[`form-input__container--label-${labelPosition}`])}>\n {componentContent}\n </div>\n );\n};\n"],"names":["FormInput","id","label","labelPosition","type","required","notValidatedText","onChange","noContainer","customInput","blockInvalidChar","event","handleChange","componentContent","jsxs","Fragment","Label","styles","jsx","FeedbackBox","clsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BaA,IAAY,CAAC;AAAA,EACxB,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,aAAAC;AACF,MAAsB;AACpB,QAAMC,IAAmB,CAACC,MACxB,CAAC,KAAK,KAAK,KAAK,GAAG,EAAE,SAASA,EAAM,GAAG,KAAKA,EAAM,eAAe,GAE7DC,IAAe,CAACD,MAA+C;AAC/D,IAAA,OAAOJ,KAAa,cACbA,EAAAI,EAAM,OAAO,KAAK;AAAA,EAE/B,GAEME,IAED,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAAb,uBACEc,GAAM,EAAA,SAASf,GAAI,UAAAI,GAAoB,YAAU,IAC/C,UACHH,EAAA,CAAA;AAAA,IAGD,gBAAAY,EAAA,OAAA,EAAI,WAAWG,EAAO,sCAAsC,GAC1D,UAAA;AAAA,MAAAR,KAGE,gBAAAS,EAAA,OAAA,EAAI,WAAWD,EAAO,6BAA6B,GAClD,UAAA,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAAjB;AAAA,UACA,MAAAG;AAAA,UACC,GAAIA,MAAS,YAAY,EAAE,WAAWM,EAAiB;AAAA,UACxD,UAAUE;AAAA,UACV,WAAWK,EAAO,mBAAmB;AAAA,QAAA;AAAA,MAAA,GAEzC;AAAA,MAEDX,MAAqB,MAAM,gBAAAY,EAACC,KAAY,OAAM,SAAQ,UAAUb,EAAkB,CAAA;AAAA,IAAA,EACrF,CAAA;AAAA,EAAA,GACF;AAGF,SAAOE,IACLK,IAEC,gBAAAK,EAAA,OAAA,EAAI,WAAWE,EAAKH,EAAO,uBAAuB,GAAGA,EAAO,gCAAgCd,CAAa,EAAE,CAAC,GAC1G,UACHU,GAAA;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as i } from "../../index-CHX1d9_A.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 n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as r } from "../../index-CHX1d9_A.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,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as h, jsx as
|
|
1
|
+
import { jsxs as h, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as k, useState as b, useRef as g, useEffect as x } from "react";
|
|
3
3
|
import { c as y } from "../../clsx-OuTLNxxd.js";
|
|
4
|
-
import '../../assets/InputField.css';const
|
|
4
|
+
import '../../assets/InputField.css';const e = {
|
|
5
5
|
"input-field-wrapper": "_input-field-wrapper_1h8mk_1",
|
|
6
6
|
"input-field": "_input-field_1h8mk_1",
|
|
7
7
|
"input-field--large": "_input-field--large_1h8mk_22",
|
|
@@ -9,45 +9,45 @@ import '../../assets/InputField.css';const i = {
|
|
|
9
9
|
"input-field__clear-button": "_input-field__clear-button_1h8mk_34"
|
|
10
10
|
}, W = k(
|
|
11
11
|
({
|
|
12
|
-
autoComplete:
|
|
12
|
+
autoComplete: p = "off",
|
|
13
13
|
id: r,
|
|
14
|
-
value:
|
|
14
|
+
value: i,
|
|
15
15
|
variant: f,
|
|
16
16
|
width: o,
|
|
17
17
|
type: s = "text",
|
|
18
18
|
clearTrigger: n,
|
|
19
|
-
onClear:
|
|
19
|
+
onClear: u,
|
|
20
20
|
...a
|
|
21
21
|
}, t) => {
|
|
22
22
|
const [_, d] = b(0), l = g(null);
|
|
23
23
|
x(() => {
|
|
24
24
|
l.current && d(l.current.offsetWidth);
|
|
25
|
-
}, [
|
|
25
|
+
}, [i]);
|
|
26
26
|
const m = () => {
|
|
27
|
-
|
|
27
|
+
u && t && "current" in t && t.current && (u(), t.current.focus());
|
|
28
28
|
};
|
|
29
|
-
return /* @__PURE__ */ h("div", { className:
|
|
30
|
-
/* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ h("div", { className: e["input-field-wrapper"], children: [
|
|
30
|
+
/* @__PURE__ */ c(
|
|
31
31
|
"input",
|
|
32
32
|
{
|
|
33
33
|
...a,
|
|
34
|
-
autoComplete:
|
|
34
|
+
autoComplete: p,
|
|
35
35
|
ref: t,
|
|
36
36
|
id: r,
|
|
37
|
-
className: y(
|
|
38
|
-
[
|
|
39
|
-
[
|
|
37
|
+
className: y(e["input-field"], {
|
|
38
|
+
[e["input-field--large"]]: f === "large",
|
|
39
|
+
[e["input-field--compact"]]: o === "compact"
|
|
40
40
|
}),
|
|
41
41
|
type: s,
|
|
42
|
-
value:
|
|
43
|
-
style: { paddingRight:
|
|
42
|
+
value: i,
|
|
43
|
+
style: { paddingRight: i && n ? _ : void 0 }
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
|
|
46
|
+
i && n && /* @__PURE__ */ c(
|
|
47
47
|
"button",
|
|
48
48
|
{
|
|
49
49
|
type: "button",
|
|
50
|
-
className:
|
|
50
|
+
className: e["input-field__clear-button"],
|
|
51
51
|
onClick: m,
|
|
52
52
|
ref: l,
|
|
53
53
|
"aria-label": `clear trigger for ${r}`,
|
|
@@ -1,12 +1,13 @@
|
|
|
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 { f as p } from "../../index-CHX1d9_A.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 f } from "../Icon/Icon.js";
|
|
7
7
|
import "../Buttons/Button.js";
|
|
8
8
|
import "../Buttons/LinkButton.js";
|
|
9
9
|
import "@react-aria/button";
|
|
10
|
+
import "../Checkbox/Checkbox.js";
|
|
10
11
|
import "@react-aria/dialog";
|
|
11
12
|
import "@react-aria/focus";
|
|
12
13
|
import "@react-aria/overlays";
|
|
@@ -15,15 +16,15 @@ import "../GridRow/GridRow.js";
|
|
|
15
16
|
import "../IconButton/IconButton.js";
|
|
16
17
|
import "../Input/Input.js";
|
|
17
18
|
import "react-router";
|
|
18
|
-
import "../../TablePlugin-
|
|
19
|
+
import "../../TablePlugin-5Cs2F_co.js";
|
|
19
20
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
20
21
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
21
22
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
22
|
-
import "../../index-
|
|
23
|
+
import "../../index-B3c5pcHk.js";
|
|
23
24
|
import "../SelectListbox/SelectListbox.js";
|
|
24
25
|
import "../SelectListbox/SelectProvider.js";
|
|
25
26
|
import "../Sortable/components/SortableItem.js";
|
|
26
|
-
import "../../SortableProvider-
|
|
27
|
+
import "../../SortableProvider-RaH_ZXB3.js";
|
|
27
28
|
const C = `
|
|
28
29
|
// Has all HTMLInputElement props available except "className" and "style"
|
|
29
30
|
<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}
|
|
@@ -31,7 +32,7 @@ const C = `
|
|
|
31
32
|
`, h = (t) => {
|
|
32
33
|
const r = t.variant ?? [];
|
|
33
34
|
return { ...t, variant: r.toString() };
|
|
34
|
-
},
|
|
35
|
+
}, Q = {
|
|
35
36
|
title: "Atoms/InputField",
|
|
36
37
|
component: o,
|
|
37
38
|
argTypes: {
|
|
@@ -57,10 +58,10 @@ const C = `
|
|
|
57
58
|
codeString: C
|
|
58
59
|
}
|
|
59
60
|
}, a = (t) => {
|
|
60
|
-
const [r, i] = d(""),
|
|
61
|
-
i(c.target.value),
|
|
61
|
+
const [r, i] = d(""), l = g(null), m = (c) => {
|
|
62
|
+
i(c.target.value), p()("handleChange");
|
|
62
63
|
}, s = () => {
|
|
63
|
-
i(""),
|
|
64
|
+
i(""), p()("handleClear");
|
|
64
65
|
};
|
|
65
66
|
return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(
|
|
66
67
|
o,
|
|
@@ -69,19 +70,19 @@ const C = `
|
|
|
69
70
|
value: r,
|
|
70
71
|
onChange: m,
|
|
71
72
|
onClear: s,
|
|
72
|
-
ref:
|
|
73
|
+
ref: l
|
|
73
74
|
}
|
|
74
75
|
) });
|
|
75
76
|
}, n = {
|
|
76
77
|
type: "text",
|
|
77
78
|
variant: void 0,
|
|
78
79
|
id: "4f9ca77d"
|
|
79
|
-
},
|
|
80
|
-
|
|
80
|
+
}, b = a.bind({});
|
|
81
|
+
b.args = {
|
|
81
82
|
...n
|
|
82
83
|
};
|
|
83
|
-
const
|
|
84
|
-
|
|
84
|
+
const v = a.bind({});
|
|
85
|
+
v.args = {
|
|
85
86
|
...n,
|
|
86
87
|
clearTrigger: "Clear"
|
|
87
88
|
};
|
|
@@ -91,9 +92,9 @@ y.args = {
|
|
|
91
92
|
clearTrigger: /* @__PURE__ */ e(f, { name: "Cross" })
|
|
92
93
|
};
|
|
93
94
|
export {
|
|
94
|
-
|
|
95
|
+
b as InputFieldExample,
|
|
95
96
|
y as WithIconClearTrigger,
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
v as WithStringClearTrigger,
|
|
98
|
+
Q as default
|
|
98
99
|
};
|
|
99
100
|
//# sourceMappingURL=InputField.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon } from 'components';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}\n value={value} type={type} clearTrigger={clearTrigger} />\n`;\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: InputField,\n codeString: codeString,\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["codeString","transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputField.stories.js","sources":["../../../src/components/InputField/InputField.stories.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { fn } from '@storybook/test';\n\nimport type { ChangeEvent } from 'react';\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { InputFieldProps } from './InputField';\n\nimport { InputField } from './InputField';\n\nimport { Container } from 'storyComponents/Container';\nimport { Icon } from 'components';\n\nconst codeString = `\n// Has all HTMLInputElement props available except \"className\" and \"style\" \n<InputField aria-labelledby={aria-labelledby} id={id} onChange={onChangeFunction}\n value={value} type={type} clearTrigger={clearTrigger} />\n`;\n\nconst transformArgs = (args: InputFieldProps) => {\n // args.variant is provided as an array because the control type is set to a checkbox. So this transforms the selected value into its proper value: a string\n const variantArray = (args.variant as unknown as string[]) ?? [];\n return { ...args, ...{ variant: variantArray.toString() } } as InputFieldProps;\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/InputField',\n component: InputField,\n argTypes: {\n variant: {\n options: ['large'],\n control: 'check',\n },\n type: {\n control: 'radio',\n options: ['text', 'password', 'email'],\n },\n id: {\n control: 'text',\n },\n autoComplete: {\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: InputField,\n codeString: codeString,\n },\n} as Meta<InputFieldProps>;\n\nconst Template: StoryFn<InputFieldProps> = (args) => {\n const [inputValue, setInputValue] = useState<InputFieldProps['value']>('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n setInputValue(event.target.value);\n fn()('handleChange');\n };\n\n const handleClear = () => {\n setInputValue('');\n fn()('handleClear');\n };\n\n return (\n <Container>\n <InputField\n {...transformArgs(args)}\n value={inputValue}\n onChange={handleChange}\n onClear={handleClear}\n ref={inputRef}\n />\n </Container>\n );\n};\n\nconst defaultArgs: Partial<InputFieldProps> = {\n type: 'text',\n variant: undefined,\n id: '4f9ca77d',\n};\n\nexport const InputFieldExample = Template.bind({});\nInputFieldExample.args = {\n ...defaultArgs,\n};\n\nexport const WithStringClearTrigger = Template.bind({});\nWithStringClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: 'Clear',\n};\n\nexport const WithIconClearTrigger = Template.bind({});\nWithIconClearTrigger.args = {\n ...defaultArgs,\n clearTrigger: <Icon name=\"Cross\" />,\n};\n"],"names":["codeString","transformArgs","args","variantArray","InputField_stories","InputField","Template","inputValue","setInputValue","useState","inputRef","useRef","handleChange","event","fn","handleClear","Container","jsx","defaultArgs","InputFieldExample","WithStringClearTrigger","WithIconClearTrigger","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA,GAMbC,IAAgB,CAACC,MAA0B;AAEzC,QAAAC,IAAgBD,EAAK,WAAmC,CAAC;AACxD,SAAA,EAAE,GAAGA,GAAW,SAASC,EAAa,SAAS,EAAI;AAC5D,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,OAAO;AAAA,MACjB,SAAS;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,SAAS,CAAC,QAAQ,YAAY,OAAO;AAAA,IACvC;AAAA,IACA,IAAI;AAAA,MACF,SAAS;AAAA,IACX;AAAA,IACA,cAAc;AAAA,MACZ,OAAO;AAAA,QACL,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,EAEJ;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAL;AAAA,EAAA;AAEJ,GAEMM,IAAqC,CAACJ,MAAS;AACnD,QAAM,CAACK,GAAYC,CAAa,IAAIC,EAAmC,EAAE,GACnEC,IAAWC,EAAyB,IAAI,GAExCC,IAAe,CAACC,MAAyC;AAC/C,IAAAL,EAAAK,EAAM,OAAO,KAAK,GAChCC,EAAA,EAAK,cAAc;AAAA,EACrB,GAEMC,IAAc,MAAM;AACxB,IAAAP,EAAc,EAAE,GAChBM,EAAA,EAAK,aAAa;AAAA,EACpB;AAEA,2BACGE,GACC,EAAA,UAAA,gBAAAC;AAAA,IAACZ;AAAA,IAAA;AAAA,MACE,GAAGJ,EAAcC,CAAI;AAAA,MACtB,OAAOK;AAAA,MACP,UAAUK;AAAA,MACV,SAASG;AAAA,MACT,KAAKL;AAAA,IAAA;AAAA,EAAA,GAET;AAEJ,GAEMQ,IAAwC;AAAA,EAC5C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,IAAI;AACN,GAEaC,IAAoBb,EAAS,KAAK,CAAE,CAAA;AACjDa,EAAkB,OAAO;AAAA,EACvB,GAAGD;AACL;AAEO,MAAME,IAAyBd,EAAS,KAAK,CAAE,CAAA;AACtDc,EAAuB,OAAO;AAAA,EAC5B,GAAGF;AAAA,EACH,cAAc;AAChB;AAEO,MAAMG,IAAuBf,EAAS,KAAK,CAAE,CAAA;AACpDe,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,cAAc,gBAAAD,EAACK,GAAK,EAAA,MAAK,QAAQ,CAAA;AACnC;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { ModalProvider as l } from "@react-aria/overlays";
|
|
3
|
-
import {
|
|
3
|
+
import { f as i } from "../../index-CHX1d9_A.js";
|
|
4
4
|
import { ModalDialog as t } from "./ModalDialog.js";
|
|
5
5
|
import { Button as n } from "../Buttons/Button.js";
|
|
6
6
|
import "../Buttons/LinkButton.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as d } from "../../index-CHX1d9_A.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
|
-
import { M as e } from "../../TablePlugin-
|
|
4
|
+
import { M as e } from "../../TablePlugin-5Cs2F_co.js";
|
|
5
5
|
import { Container as M } from "../../storyComponents/Container/Container.js";
|
|
6
6
|
const C = `
|
|
7
7
|
// MultiSelectHeader can be added optionally
|
|
@@ -5,6 +5,7 @@ import "react";
|
|
|
5
5
|
import "../../Buttons/Button.js";
|
|
6
6
|
import "../../Buttons/LinkButton.js";
|
|
7
7
|
import "@react-aria/button";
|
|
8
|
+
import "../../Checkbox/Checkbox.js";
|
|
8
9
|
import "@react-aria/dialog";
|
|
9
10
|
import "@react-aria/focus";
|
|
10
11
|
import "@react-aria/overlays";
|
|
@@ -14,16 +15,16 @@ import "../../IconButton/IconButton.js";
|
|
|
14
15
|
import "../../Input/Input.js";
|
|
15
16
|
import "../../InputField/InputField.js";
|
|
16
17
|
import "react-router";
|
|
17
|
-
import { a as
|
|
18
|
+
import { a as y } from "../../../TablePlugin-5Cs2F_co.js";
|
|
18
19
|
import "../../RteEditor/Providers/LanguageProvider.js";
|
|
19
20
|
import "../../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
20
21
|
import "../../RteEditor/hooks/components/Flyout.js";
|
|
21
|
-
import "../../../index-
|
|
22
|
+
import "../../../index-B3c5pcHk.js";
|
|
22
23
|
import "../../SelectListbox/SelectListbox.js";
|
|
23
24
|
import "../../SelectListbox/SelectProvider.js";
|
|
24
25
|
import "../../Sortable/components/SortableItem.js";
|
|
25
|
-
import "../../../SortableProvider-
|
|
26
|
+
import "../../../SortableProvider-RaH_ZXB3.js";
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
y as MultiSelectHeader
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=MultiSelectHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiSelectHeader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as a } from "../../index-CHX1d9_A.js";
|
|
3
3
|
import { OverlayCloseButton as o } from "./OverlayCloseButton.js";
|
|
4
4
|
import { Container as l } from "../../storyComponents/Container/Container.js";
|
|
5
|
-
const
|
|
5
|
+
const r = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction} />", c = {
|
|
6
6
|
title: "Atoms/OverlayCloseButton",
|
|
7
7
|
component: o,
|
|
8
8
|
argTypes: {
|
|
@@ -15,9 +15,9 @@ const n = "<OverlayCloseButton aria-label={aria-label} onClick={onClickFunction}
|
|
|
15
15
|
},
|
|
16
16
|
parameters: {
|
|
17
17
|
inspectComponent: o,
|
|
18
|
-
codeString:
|
|
18
|
+
codeString: r
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, n = (t) => /* @__PURE__ */ e(l, { size: "small", padded: !1, children: /* @__PURE__ */ e(o, { ...t }) }), s = n.bind({});
|
|
21
21
|
s.args = {
|
|
22
22
|
paddedModal: !1,
|
|
23
23
|
"aria-label": "Close",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as l } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Icon as i } from "../Icon/Icon.js";
|
|
5
5
|
import "../Buttons/Button.js";
|
|
6
6
|
import "../Buttons/LinkButton.js";
|
|
7
7
|
import "@react-aria/button";
|
|
8
|
+
import "../Checkbox/Checkbox.js";
|
|
8
9
|
import "@react-aria/dialog";
|
|
9
10
|
import "@react-aria/focus";
|
|
10
11
|
import "@react-aria/overlays";
|
|
@@ -14,16 +15,16 @@ import "../IconButton/IconButton.js";
|
|
|
14
15
|
import "../Input/Input.js";
|
|
15
16
|
import "../InputField/InputField.js";
|
|
16
17
|
import "react-router";
|
|
17
|
-
import "../../TablePlugin-
|
|
18
|
+
import "../../TablePlugin-5Cs2F_co.js";
|
|
18
19
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
19
20
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
20
21
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
21
|
-
import "../../index-
|
|
22
|
+
import "../../index-B3c5pcHk.js";
|
|
22
23
|
import "../SelectListbox/SelectListbox.js";
|
|
23
24
|
import "../SelectListbox/SelectProvider.js";
|
|
24
25
|
import "../Sortable/components/SortableItem.js";
|
|
25
|
-
import "../../SortableProvider-
|
|
26
|
-
import '../../assets/OverlayStepBar.css';const
|
|
26
|
+
import "../../SortableProvider-RaH_ZXB3.js";
|
|
27
|
+
import '../../assets/OverlayStepBar.css';const r = {
|
|
27
28
|
"overlay-step-bar__container": "_overlay-step-bar__container_u2k5r_1",
|
|
28
29
|
"overlay-step-bar__separator": "_overlay-step-bar__separator_u2k5r_10",
|
|
29
30
|
"overlay-step-bar__step": "_overlay-step-bar__step_u2k5r_14",
|
|
@@ -42,18 +43,18 @@ import '../../assets/OverlayStepBar.css';const e = {
|
|
|
42
43
|
"Seven",
|
|
43
44
|
"Eight",
|
|
44
45
|
"Nine"
|
|
45
|
-
],
|
|
46
|
+
], B = ({ steps: a }) => {
|
|
46
47
|
if (a.length > t.length - 1)
|
|
47
48
|
throw new Error("The 'steps' array must contain no more than 9 objects.");
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
o !== 0 && /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */ s("span", { className:
|
|
51
|
-
/* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ e("div", { className: r["overlay-step-bar__container"], children: a.length < t.length && a.map(({ label: p, status: _ }, o) => /* @__PURE__ */ s(m, { children: [
|
|
50
|
+
o !== 0 && /* @__PURE__ */ e(i, { name: "CheveronRight", size: 16, className: r["overlay-step-bar__separator"] }),
|
|
51
|
+
/* @__PURE__ */ s("span", { className: l(r["overlay-step-bar__step"], r[`overlay-step-bar__step--${_}`]), children: [
|
|
52
|
+
/* @__PURE__ */ e("span", { className: r["overlay-step-bar__step-bullet"], children: /* @__PURE__ */ e(i, { name: _ === "checked" ? t[0] : t[o + 1], size: 24 }) }),
|
|
52
53
|
p
|
|
53
54
|
] })
|
|
54
55
|
] }, `${o}_${p}`)) });
|
|
55
56
|
};
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
B as OverlayStepBar
|
|
58
59
|
};
|
|
59
60
|
//# sourceMappingURL=OverlayStepBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayStepBar.js","sources":["../../../src/components/OverlayStepBar/OverlayStepBar.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { Fragment } from 'react/jsx-runtime';\n\nimport type { Icons } from 'components/Icon/icons';\n\nimport styles from './OverlayStepBar.module.css';\n\nimport { Icon } from 'components';\n\ntype StepType = {\n label: string;\n status: 'inactive' | 'active' | 'checked';\n};\n\nexport interface OverlayStepBarProps {\n steps: StepType[];\n}\n\nconst ICON_NAMES: (keyof typeof Icons)[] = [\n 'MiniCheck',\n 'One',\n 'Two',\n 'Three',\n 'Four',\n 'Five',\n 'Six',\n 'Seven',\n 'Eight',\n 'Nine',\n];\n\nexport const OverlayStepBar = ({ steps }: OverlayStepBarProps) => {\n if (steps.length > ICON_NAMES.length - 1) {\n throw new Error(\"The 'steps' array must contain no more than 9 objects.\");\n }\n\n return (\n <div className={styles['overlay-step-bar__container']}>\n {steps.length < ICON_NAMES.length &&\n steps.map(({ label, status }, index) => (\n <Fragment key={`${index}_${label}`}>\n {index !== 0 && <Icon name={'CheveronRight'} size={16} className={styles['overlay-step-bar__separator']} />}\n <span className={clsx(styles[`overlay-step-bar__step`], styles[`overlay-step-bar__step--${status}`])}>\n <span className={styles['overlay-step-bar__step-bullet']}>\n <Icon name={status === 'checked' ? ICON_NAMES[0] : ICON_NAMES[index + 1]} size={24} />\n </span>\n {label}\n </span>\n </Fragment>\n ))}\n </div>\n );\n};\n"],"names":["ICON_NAMES","OverlayStepBar","steps","styles","label","status","index","Fragment","jsx","Icon","jsxs","clsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"OverlayStepBar.js","sources":["../../../src/components/OverlayStepBar/OverlayStepBar.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { Fragment } from 'react/jsx-runtime';\n\nimport type { Icons } from 'components/Icon/icons';\n\nimport styles from './OverlayStepBar.module.css';\n\nimport { Icon } from 'components';\n\ntype StepType = {\n label: string;\n status: 'inactive' | 'active' | 'checked';\n};\n\nexport interface OverlayStepBarProps {\n steps: StepType[];\n}\n\nconst ICON_NAMES: (keyof typeof Icons)[] = [\n 'MiniCheck',\n 'One',\n 'Two',\n 'Three',\n 'Four',\n 'Five',\n 'Six',\n 'Seven',\n 'Eight',\n 'Nine',\n];\n\nexport const OverlayStepBar = ({ steps }: OverlayStepBarProps) => {\n if (steps.length > ICON_NAMES.length - 1) {\n throw new Error(\"The 'steps' array must contain no more than 9 objects.\");\n }\n\n return (\n <div className={styles['overlay-step-bar__container']}>\n {steps.length < ICON_NAMES.length &&\n steps.map(({ label, status }, index) => (\n <Fragment key={`${index}_${label}`}>\n {index !== 0 && <Icon name={'CheveronRight'} size={16} className={styles['overlay-step-bar__separator']} />}\n <span className={clsx(styles[`overlay-step-bar__step`], styles[`overlay-step-bar__step--${status}`])}>\n <span className={styles['overlay-step-bar__step-bullet']}>\n <Icon name={status === 'checked' ? ICON_NAMES[0] : ICON_NAMES[index + 1]} size={24} />\n </span>\n {label}\n </span>\n </Fragment>\n ))}\n </div>\n );\n};\n"],"names":["ICON_NAMES","OverlayStepBar","steps","styles","label","status","index","Fragment","jsx","Icon","jsxs","clsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkBMA,IAAqC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAiB,CAAC,EAAE,OAAAC,QAAiC;AAChE,MAAIA,EAAM,SAASF,EAAW,SAAS;AAC/B,UAAA,IAAI,MAAM,wDAAwD;AAG1E,2BACG,OAAI,EAAA,WAAWG,EAAO,6BAA6B,GACjD,YAAM,SAASH,EAAW,UACzBE,EAAM,IAAI,CAAC,EAAE,OAAAE,GAAO,QAAAC,KAAUC,wBAC3BC,GACE,EAAA,UAAA;AAAA,IAAUD,MAAA,KAAM,gBAAAE,EAAAC,GAAA,EAAK,MAAM,iBAAiB,MAAM,IAAI,WAAWN,EAAO,6BAA6B,EAAG,CAAA;AAAA,IACxG,gBAAAO,EAAA,QAAA,EAAK,WAAWC,EAAKR,EAAO,wBAAwB,GAAGA,EAAO,2BAA2BE,CAAM,EAAE,CAAC,GACjG,UAAA;AAAA,MAAA,gBAAAG,EAAC,UAAK,WAAWL,EAAO,+BAA+B,GACrD,UAAA,gBAAAK,EAACC,KAAK,MAAMJ,MAAW,YAAYL,EAAW,CAAC,IAAIA,EAAWM,IAAQ,CAAC,GAAG,MAAM,GAAI,CAAA,GACtF;AAAA,MACCF;AAAA,IAAA,EACH,CAAA;AAAA,EAAA,EAAA,GAPa,GAAGE,CAAK,IAAIF,CAAK,EAQhC,CACD,GACL;AAEJ;"}
|
|
@@ -4,6 +4,7 @@ import { useRef as M, useState as $, useEffect as N } from "react";
|
|
|
4
4
|
import "../Buttons/Button.js";
|
|
5
5
|
import "../Buttons/LinkButton.js";
|
|
6
6
|
import "@react-aria/button";
|
|
7
|
+
import "../Checkbox/Checkbox.js";
|
|
7
8
|
import { CheckboxButtonBar as w } from "../CheckboxButtonBar/CheckboxButtonBar.js";
|
|
8
9
|
import "@react-aria/dialog";
|
|
9
10
|
import "@react-aria/focus";
|
|
@@ -16,28 +17,28 @@ import "../Input/Input.js";
|
|
|
16
17
|
import "../InputField/InputField.js";
|
|
17
18
|
import { Label as D } from "../Label/Label.js";
|
|
18
19
|
import "react-router";
|
|
19
|
-
import "../../TablePlugin-
|
|
20
|
+
import "../../TablePlugin-5Cs2F_co.js";
|
|
20
21
|
import "../RteEditor/Providers/LanguageProvider.js";
|
|
21
22
|
import "../RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
|
|
22
23
|
import "../RteEditor/hooks/components/Flyout.js";
|
|
23
|
-
import "../../index-
|
|
24
|
+
import "../../index-B3c5pcHk.js";
|
|
24
25
|
import "../SelectListbox/SelectListbox.js";
|
|
25
26
|
import "../SelectListbox/SelectProvider.js";
|
|
26
27
|
import "../Sortable/components/SortableItem.js";
|
|
27
|
-
import "../../SortableProvider-
|
|
28
|
+
import "../../SortableProvider-RaH_ZXB3.js";
|
|
28
29
|
import '../../assets/PeriodSelector.css';const l = {
|
|
29
30
|
"period-selector__container": "_period-selector__container_10t7p_1",
|
|
30
31
|
"period-selector__container--label-left": "_period-selector__container--label-left_10t7p_6",
|
|
31
32
|
"period-selector__container--label-top": "_period-selector__container--label-top_10t7p_12",
|
|
32
33
|
"period-selector__selector-container": "_period-selector__selector-container_10t7p_19",
|
|
33
34
|
"period-selector__selector-row": "_period-selector__selector-row_10t7p_25"
|
|
34
|
-
}, S = 0, f = 1, E = 2, p = 3, I = 7, T = (
|
|
35
|
+
}, S = 0, f = 1, E = 2, p = 3, I = 7, T = (n) => {
|
|
35
36
|
const c = [];
|
|
36
|
-
for (let t = 0; t <
|
|
37
|
-
c.push(
|
|
37
|
+
for (let t = 0; t < n.length; t += p)
|
|
38
|
+
c.push(n.slice(t, t + p));
|
|
38
39
|
return c;
|
|
39
|
-
},
|
|
40
|
-
maxPeriods:
|
|
40
|
+
}, lr = ({
|
|
41
|
+
maxPeriods: n = I,
|
|
41
42
|
defaultValues: c,
|
|
42
43
|
label: t,
|
|
43
44
|
labelPosition: b = "top",
|
|
@@ -45,18 +46,18 @@ import '../../assets/PeriodSelector.css';const l = {
|
|
|
45
46
|
notValidatedText: m = "",
|
|
46
47
|
onChange: g
|
|
47
48
|
}) => {
|
|
48
|
-
const R = Array.from({ length:
|
|
49
|
+
const R = Array.from({ length: n }, (r, e) => e + 1), a = T(R), x = a.map((r, e) => r.map((o) => ({
|
|
49
50
|
label: `${e + 1}${r.length === 1 ? "" : `.${(o - 1) % p + 1}`}`,
|
|
50
51
|
value: o.toString()
|
|
51
|
-
}))),
|
|
52
|
+
}))), i = M(
|
|
52
53
|
a.map(
|
|
53
54
|
(r) => r.reduce((e, o) => (c != null && c.includes(o) && e.push(o), e), [])
|
|
54
55
|
)
|
|
55
56
|
), [P, u] = $([]), d = (r) => r[S].length !== 0 || r[f].length !== 0 ? [E] : r[E].length !== 0 ? [S, f] : [], k = (r, e) => {
|
|
56
|
-
|
|
57
|
+
i.current[e] = r.map((o) => Number(o)), u(d(i.current)), g([...i.current.flat()].sort());
|
|
57
58
|
};
|
|
58
59
|
return N(() => {
|
|
59
|
-
u(d(
|
|
60
|
+
u(d(i.current));
|
|
60
61
|
}, []), /* @__PURE__ */ h(
|
|
61
62
|
"div",
|
|
62
63
|
{
|
|
@@ -71,7 +72,7 @@ import '../../assets/PeriodSelector.css';const l = {
|
|
|
71
72
|
w,
|
|
72
73
|
{
|
|
73
74
|
checkboxes: r,
|
|
74
|
-
defaultValues:
|
|
75
|
+
defaultValues: i.current[e].map((o) => o.toString()),
|
|
75
76
|
disableGroup: P.includes(e),
|
|
76
77
|
required: _,
|
|
77
78
|
onSetValues: (o) => k(o, e)
|
|
@@ -85,6 +86,6 @@ import '../../assets/PeriodSelector.css';const l = {
|
|
|
85
86
|
);
|
|
86
87
|
};
|
|
87
88
|
export {
|
|
88
|
-
|
|
89
|
+
lr as PeriodSelector
|
|
89
90
|
};
|
|
90
91
|
//# sourceMappingURL=PeriodSelector.js.map
|