chop-logic-components 4.2.0 → 4.3.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/components/atoms/avatar/Avatar.css +1 -0
- package/dist/components/atoms/avatar/Avatar.d.ts +7 -0
- package/dist/components/atoms/avatar/Avatar2.js +44 -0
- package/dist/components/atoms/button/Button2.js +11 -11
- package/dist/components/atoms/button/icon-button/IconButton2.js +4 -4
- package/dist/components/atoms/button/inner-button/InnerButton2.js +4 -4
- package/dist/components/atoms/button/primary-button/PrimaryButton2.js +4 -4
- package/dist/components/atoms/button/secondary-button/SecondaryButton2.js +4 -4
- package/dist/components/atoms/editable-text/EditView.js +4 -4
- package/dist/components/atoms/editable-text/EditableText2.js +8 -8
- package/dist/components/atoms/icon/Icon2.js +10 -10
- package/dist/components/atoms/image/BasicImage.d.ts +2 -0
- package/dist/components/atoms/image/BasicImage.js +4 -9
- package/dist/components/atoms/image/Image.css +1 -1
- package/dist/components/atoms/image/Image2.js +16 -16
- package/dist/components/atoms/image/ResponsivePicture.d.ts +1 -0
- package/dist/components/atoms/image/ResponsivePicture.js +16 -9
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/atoms/input/Input2.js +5 -5
- package/dist/components/atoms/label/Label2.js +4 -4
- package/dist/components/atoms/link/Link2.js +4 -4
- package/dist/components/atoms/tag/Tag.css +1 -0
- package/dist/components/atoms/tag/Tag.d.ts +7 -0
- package/dist/components/atoms/tag/Tag2.js +15 -0
- package/dist/components/atoms/tooltip/Tooltip2.js +9 -8
- package/dist/components/contexts/theme/ThemeProvider.js +8 -8
- package/dist/components/hocs/with-error-boundary/with-error-boundary.js +8 -8
- package/dist/components/hocs/with-figure-caption/Figure.css +1 -1
- package/dist/components/molecules/alert/Alert2.js +19 -19
- package/dist/components/molecules/checkbox/CheckboxStateful.js +6 -6
- package/dist/components/molecules/checkbox/CheckboxStateless.js +6 -6
- package/dist/components/molecules/multi-select/MultiSelect.Combobox.js +6 -6
- package/dist/components/molecules/multi-select/MultiSelect.js +7 -7
- package/dist/components/molecules/multi-select/Option.js +8 -8
- package/dist/components/molecules/numeric-input/NumericInputStateful.js +8 -8
- package/dist/components/molecules/numeric-input/NumericInputStateless.js +8 -8
- package/dist/components/molecules/search/Search2.js +16 -16
- package/dist/components/molecules/select/Select2.js +7 -7
- package/dist/components/molecules/select/combobox/Combobox2.js +6 -6
- package/dist/components/molecules/select/option/Option2.js +6 -6
- package/dist/components/molecules/text-input/TextInputStateless.js +8 -8
- package/dist/components/organisms/dialog/Dialog2.js +14 -14
- package/dist/components/organisms/form/Form2.js +14 -14
- package/dist/components/organisms/gallery/Gallery.helpers.js +2 -2
- package/dist/components/organisms/gallery/Gallery2.js +8 -8
- package/dist/components/organisms/gallery/full-screen-viewer/FullscreenViewer2.js +7 -7
- package/dist/components/organisms/gallery/viewer-navigation/ViewerNavigation2.js +8 -8
- package/dist/components/organisms/grid/checkbox/GridCheckbox2.js +4 -4
- package/dist/components/organisms/index.d.ts +1 -0
- package/dist/components/organisms/menu/Menu2.js +5 -5
- package/dist/components/organisms/menu/list-item/MenuListItem2.js +8 -8
- package/dist/components/organisms/menu/sub-menu/SubMenu2.js +17 -17
- package/dist/components/organisms/preview-card/PreviewCard.css +1 -0
- package/dist/components/organisms/preview-card/PreviewCard.d.ts +4 -0
- package/dist/components/organisms/preview-card/PreviewCard2.js +57 -0
- package/dist/components/organisms/tabs/Tabs2.js +11 -11
- package/dist/components/organisms/tabs/button/TabButton2.js +23 -23
- package/dist/components/organisms/tabs/edit-input/TabEditInput2.js +9 -9
- package/dist/components/organisms/tabs/list/TabList2.js +12 -12
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/link-target.d.ts +6 -0
- package/dist/enums/link-target.js +6 -0
- package/dist/index.es.js +61 -57
- package/dist/types/image.d.ts +16 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/preview-card.d.ts +38 -0
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
.cl-figure{margin:0;display:block}.cl-figure__caption{text-align:center;font-family:var(--cl-core-font);padding-top:var(--cl-s-gap);color:var(--cl-base-font-color);font-size:var(--cl-typography-small-mobile)}@media (width>=640px){.cl-figure__caption{font-size:var(--cl-typography-small-tablet)}}@media (width>=1024px){.cl-figure__caption{font-size:var(--cl-typography-small-desktop)}}
|
|
1
|
+
.cl-figure{border-radius:var(--cl-border-radius);margin:0;display:block}.cl-figure__caption{text-align:center;font-family:var(--cl-core-font);padding-top:var(--cl-s-gap);color:var(--cl-base-font-color);font-size:var(--cl-typography-small-mobile)}@media (width>=640px){.cl-figure__caption{font-size:var(--cl-typography-small-tablet)}}@media (width>=1024px){.cl-figure__caption{font-size:var(--cl-typography-small-desktop)}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { AlertMode as e } from "../../../enums/alert-mode.js";
|
|
2
|
+
import { ButtonView as t } from "../../../enums/button-view.js";
|
|
3
|
+
import { ElementSize as n } from "../../../enums/element-size.js";
|
|
4
|
+
import { IconName as r } from "../../../enums/icon-name.js";
|
|
5
|
+
import { getClassName as i } from "../../../utils/get-class-name.js";
|
|
6
6
|
import a from "../../atoms/button/Button2.js";
|
|
7
7
|
import o from "../../atoms/header/Header2.js";
|
|
8
8
|
import s from "../../atoms/portal/Portal.js";
|
|
@@ -12,11 +12,11 @@ import { useRemainingTimer as u } from "../../../hooks/use-remaining-timer/use-r
|
|
|
12
12
|
import './Alert.css';/* empty css */
|
|
13
13
|
import { getAlertIcon as d, getAlertTitle as f } from "./Alert.helpers.js";
|
|
14
14
|
import { AlertProgressBar as p } from "./AlertProgressBar.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { useRef as m } from "react";
|
|
16
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/molecules/alert/Alert.tsx
|
|
18
|
-
var _ = ({ isOpened: _, onClose: v, title: y, message: b, mode: x =
|
|
19
|
-
let E = l(_), D = E && !_, O =
|
|
18
|
+
var _ = ({ isOpened: _, onClose: v, title: y, message: b, mode: x = e.Info, icon: S, autoClose: C = !1, autoCloseDelay: w = 3e3, ...T }) => {
|
|
19
|
+
let E = l(_), D = E && !_, O = m(null), k = c(O, E), A = !C, j = u({
|
|
20
20
|
isOpened: E,
|
|
21
21
|
isHovered: k,
|
|
22
22
|
onClose: v,
|
|
@@ -25,36 +25,36 @@ var _ = ({ isOpened: _, onClose: v, title: y, message: b, mode: x = t.Info, icon
|
|
|
25
25
|
});
|
|
26
26
|
if (!E) return null;
|
|
27
27
|
let M = f(x, y), N = d(x, S);
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ h(s, { children: /* @__PURE__ */ h("div", {
|
|
29
29
|
ref: O,
|
|
30
|
-
className:
|
|
30
|
+
className: i([
|
|
31
31
|
"cl-alert",
|
|
32
32
|
`cl-alert_${x.toLowerCase()}`,
|
|
33
33
|
{ "cl-alert_closing": D }
|
|
34
34
|
]),
|
|
35
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ g("div", {
|
|
36
36
|
...T,
|
|
37
37
|
className: "cl-alert__content",
|
|
38
38
|
children: [
|
|
39
|
-
A && /* @__PURE__ */
|
|
40
|
-
icon:
|
|
41
|
-
view:
|
|
42
|
-
iconSize:
|
|
39
|
+
A && /* @__PURE__ */ h(a, {
|
|
40
|
+
icon: r.X,
|
|
41
|
+
view: t.Icon,
|
|
42
|
+
iconSize: n.Medium,
|
|
43
43
|
label: "Close alert",
|
|
44
44
|
onClick: v,
|
|
45
45
|
className: "cl-alert__button"
|
|
46
46
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ h("header", { children: /* @__PURE__ */ h(o, {
|
|
48
48
|
icon: N,
|
|
49
49
|
as: "h3",
|
|
50
50
|
className: "cl-alert__header",
|
|
51
51
|
children: M
|
|
52
52
|
}) }),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ h("p", {
|
|
54
54
|
className: "cl-alert__message",
|
|
55
55
|
children: b
|
|
56
56
|
}),
|
|
57
|
-
C && /* @__PURE__ */
|
|
57
|
+
C && /* @__PURE__ */ h(p, { remainingPercentage: j })
|
|
58
58
|
]
|
|
59
59
|
})
|
|
60
60
|
}) });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ElementSize as e } from "../../../enums/element-size.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/label/Label2.js";
|
|
5
5
|
import { useElementIds as i } from "../../../hooks/use-element-ids/use-element-ids.js";
|
|
6
6
|
import { useCheckboxController as a } from "./Checkbox.controller.js";
|
|
@@ -16,7 +16,7 @@ var c = ({ name: c, label: l, disabled: u, noLabel: d, required: f = !1, iconPos
|
|
|
16
16
|
return /* @__PURE__ */ s("div", {
|
|
17
17
|
style: v,
|
|
18
18
|
tabIndex: y,
|
|
19
|
-
className:
|
|
19
|
+
className: n([
|
|
20
20
|
"cl-checkbox",
|
|
21
21
|
_,
|
|
22
22
|
{
|
|
@@ -38,9 +38,9 @@ var c = ({ name: c, label: l, disabled: u, noLabel: d, required: f = !1, iconPos
|
|
|
38
38
|
required: f,
|
|
39
39
|
inputId: S,
|
|
40
40
|
isTextHidden: d,
|
|
41
|
-
icon: x ?
|
|
41
|
+
icon: x ? t.CheckSquare : t.Square,
|
|
42
42
|
iconPosition: p,
|
|
43
|
-
iconSize:
|
|
43
|
+
iconSize: e.Medium
|
|
44
44
|
})]
|
|
45
45
|
});
|
|
46
46
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ElementSize as e } from "../../../enums/element-size.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/label/Label2.js";
|
|
5
5
|
import './Checkbox.css';/* empty css */
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
@@ -10,7 +10,7 @@ var o = ({ name: o, label: s, disabled: c, noLabel: l, required: u = !1, iconPos
|
|
|
10
10
|
return /* @__PURE__ */ a("div", {
|
|
11
11
|
style: g,
|
|
12
12
|
tabIndex: _,
|
|
13
|
-
className:
|
|
13
|
+
className: n([
|
|
14
14
|
"cl-checkbox",
|
|
15
15
|
h,
|
|
16
16
|
{
|
|
@@ -32,9 +32,9 @@ var o = ({ name: o, label: s, disabled: c, noLabel: l, required: u = !1, iconPos
|
|
|
32
32
|
required: u,
|
|
33
33
|
inputId: v,
|
|
34
34
|
isTextHidden: l,
|
|
35
|
-
icon: f ?
|
|
35
|
+
icon: f ? t.CheckSquare : t.Square,
|
|
36
36
|
iconPosition: d,
|
|
37
|
-
iconSize:
|
|
37
|
+
iconSize: e.Medium
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
40
40
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ElementSize as e } from "../../../enums/element-size.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/icon/Icon2.js";
|
|
5
5
|
import '../select/combobox/Combobox.css';/* empty css */
|
|
6
6
|
import { MultiSelectComboboxSelectedValues as i } from "./MultiSelectComboboxSelectedValues.js";
|
|
7
7
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/molecules/multi-select/MultiSelect.Combobox.tsx
|
|
9
9
|
var s = ({ opened: s, onClick: c, comboboxId: l, dropdownId: u, name: d, placeholder: f, disabled: p, required: m, values: h }) => {
|
|
10
|
-
let g = h?.filter((e) => e.selected).map((e) => e.id), _ =
|
|
10
|
+
let g = h?.filter((e) => e.selected).map((e) => e.id), _ = n(["cl-select-combobox__icon", { "cl-select-combobox__icon_opened": s }]);
|
|
11
11
|
return /* @__PURE__ */ o("button", {
|
|
12
12
|
type: "button",
|
|
13
13
|
name: d,
|
|
@@ -25,9 +25,9 @@ var s = ({ opened: s, onClick: c, comboboxId: l, dropdownId: u, name: d, placeho
|
|
|
25
25
|
values: h,
|
|
26
26
|
placeholder: f
|
|
27
27
|
}), /* @__PURE__ */ a(r, {
|
|
28
|
-
name:
|
|
28
|
+
name: t.ChevronDown,
|
|
29
29
|
className: _,
|
|
30
|
-
size:
|
|
30
|
+
size: e.Small
|
|
31
31
|
})]
|
|
32
32
|
});
|
|
33
33
|
};
|
|
@@ -7,11 +7,11 @@ import '../select/Select.css';/* empty css */
|
|
|
7
7
|
import { MultiSelectCombobox as a } from "./MultiSelect.Combobox.js";
|
|
8
8
|
import { useMultiSelectController as o } from "./MultiSelect.controller.js";
|
|
9
9
|
import { MultiSelectDropdown as s } from "./MultiSelect.Dropdown.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useRef as c } from "react";
|
|
11
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/molecules/multi-select/MultiSelect.tsx
|
|
13
13
|
var d = ({ options: d, name: f, label: p, required: m = !1, placeholder: h = "Not selected", disabled: g = !1, onChange: _, defaultValue: v, id: y, className: b, ...x }) => {
|
|
14
|
-
let S =
|
|
14
|
+
let S = c(null), { elementId: C, dropdownId: w } = r(y), { handleClose: T, handleSelect: E, handleToggle: D, opened: O, values: k } = o({
|
|
15
15
|
name: f,
|
|
16
16
|
options: d,
|
|
17
17
|
defaultValue: v,
|
|
@@ -24,18 +24,18 @@ var d = ({ options: d, name: f, label: p, required: m = !1, placeholder: h = "No
|
|
|
24
24
|
keyCode: "Escape",
|
|
25
25
|
ref: S,
|
|
26
26
|
onKeyPress: T
|
|
27
|
-
}), /* @__PURE__ */
|
|
27
|
+
}), /* @__PURE__ */ u("div", {
|
|
28
28
|
ref: S,
|
|
29
29
|
...x,
|
|
30
30
|
className: A,
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ l(t, {
|
|
33
33
|
label: p,
|
|
34
34
|
required: m,
|
|
35
35
|
inputId: C,
|
|
36
36
|
disabled: g
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ l(a, {
|
|
39
39
|
name: f,
|
|
40
40
|
opened: O,
|
|
41
41
|
comboboxId: C,
|
|
@@ -46,7 +46,7 @@ var d = ({ options: d, name: f, label: p, required: m = !1, placeholder: h = "No
|
|
|
46
46
|
disabled: g,
|
|
47
47
|
required: m
|
|
48
48
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ l(s, {
|
|
50
50
|
options: k,
|
|
51
51
|
opened: O,
|
|
52
52
|
onClose: T,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ElementSize as e } from "../../../enums/element-size.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/icon/Icon2.js";
|
|
5
5
|
import '../select/option/Option.css';/* empty css */
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/molecules/multi-select/Option.tsx
|
|
8
8
|
var o = ({ value: o, onSelect: s }) => {
|
|
9
|
-
let { id: c, label: l, selected: u } = o, d =
|
|
9
|
+
let { id: c, label: l, selected: u } = o, d = n([
|
|
10
10
|
"cl-select-option",
|
|
11
11
|
"cl-select-option_multi",
|
|
12
12
|
{ "cl-select-option_selected": u }
|
|
@@ -29,11 +29,11 @@ var o = ({ value: o, onSelect: s }) => {
|
|
|
29
29
|
onClick: () => s(c),
|
|
30
30
|
className: d,
|
|
31
31
|
children: [u ? /* @__PURE__ */ i(r, {
|
|
32
|
-
name:
|
|
33
|
-
size:
|
|
32
|
+
name: t.CheckSquare,
|
|
33
|
+
size: e.Small
|
|
34
34
|
}) : /* @__PURE__ */ i(r, {
|
|
35
|
-
name:
|
|
36
|
-
size:
|
|
35
|
+
name: t.Square,
|
|
36
|
+
size: e.Small
|
|
37
37
|
}), /* @__PURE__ */ i("span", { children: l })]
|
|
38
38
|
});
|
|
39
39
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ButtonView as e } from "../../../enums/button-view.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/button/Button2.js";
|
|
5
5
|
import i from "../../atoms/error-message/ErrorMessage2.js";
|
|
6
6
|
import a from "../../atoms/input/Input2.js";
|
|
@@ -25,7 +25,7 @@ var d = ({ name: d, label: f, errorMessage: p, onChange: m, onBlur: h, onFocus:
|
|
|
25
25
|
});
|
|
26
26
|
return /* @__PURE__ */ u("div", {
|
|
27
27
|
style: j,
|
|
28
|
-
className:
|
|
28
|
+
className: n(["cl-numeric-input", A]),
|
|
29
29
|
children: [/* @__PURE__ */ l(o, {
|
|
30
30
|
label: f,
|
|
31
31
|
required: T,
|
|
@@ -50,15 +50,15 @@ var d = ({ name: d, label: f, errorMessage: p, onChange: m, onBlur: h, onFocus:
|
|
|
50
50
|
tabIndex: C,
|
|
51
51
|
children: [D && /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ l(r, {
|
|
52
52
|
onClick: L,
|
|
53
|
-
view:
|
|
53
|
+
view: e.Inner,
|
|
54
54
|
label: `Decrement value for ${f}`,
|
|
55
|
-
icon:
|
|
55
|
+
icon: t.ChevronLeft,
|
|
56
56
|
disabled: w
|
|
57
57
|
}), /* @__PURE__ */ l(r, {
|
|
58
58
|
onClick: R,
|
|
59
|
-
view:
|
|
59
|
+
view: e.Inner,
|
|
60
60
|
label: `Increment value for ${f}`,
|
|
61
|
-
icon:
|
|
61
|
+
icon: t.ChevronRight,
|
|
62
62
|
disabled: w
|
|
63
63
|
})] }), /* @__PURE__ */ l(i, {
|
|
64
64
|
errorId: N,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ButtonView as e } from "../../../enums/button-view.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/button/Button2.js";
|
|
5
5
|
import i from "../../atoms/error-message/ErrorMessage2.js";
|
|
6
6
|
import a from "../../atoms/input/Input2.js";
|
|
@@ -12,7 +12,7 @@ var l = ({ name: l, label: u, errorMessage: d, onChange: f, onBlur: p, onFocus:
|
|
|
12
12
|
let A = y ?? `numeric-input-${l}`, j = `${l}-error`;
|
|
13
13
|
return /* @__PURE__ */ c("div", {
|
|
14
14
|
style: k,
|
|
15
|
-
className:
|
|
15
|
+
className: n(["cl-numeric-input", E]),
|
|
16
16
|
children: [/* @__PURE__ */ s(o, {
|
|
17
17
|
label: u,
|
|
18
18
|
required: S,
|
|
@@ -38,15 +38,15 @@ var l = ({ name: l, label: u, errorMessage: d, onChange: f, onBlur: p, onFocus:
|
|
|
38
38
|
tabIndex: b,
|
|
39
39
|
children: [w && /* @__PURE__ */ c("span", { children: [/* @__PURE__ */ s(r, {
|
|
40
40
|
onClick: g,
|
|
41
|
-
view:
|
|
41
|
+
view: e.Inner,
|
|
42
42
|
label: `Decrement value for ${u}`,
|
|
43
|
-
icon:
|
|
43
|
+
icon: t.ChevronLeft,
|
|
44
44
|
disabled: x
|
|
45
45
|
}), /* @__PURE__ */ s(r, {
|
|
46
46
|
onClick: h,
|
|
47
|
-
view:
|
|
47
|
+
view: e.Inner,
|
|
48
48
|
label: `Increment value for ${u}`,
|
|
49
|
-
icon:
|
|
49
|
+
icon: t.ChevronRight,
|
|
50
50
|
disabled: x
|
|
51
51
|
})] }), /* @__PURE__ */ s(i, {
|
|
52
52
|
errorId: j,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ButtonView as e } from "../../../enums/button-view.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/button/Button2.js";
|
|
5
5
|
import i from "../../atoms/input/Input2.js";
|
|
6
6
|
import a from "../../atoms/label/Label2.js";
|
|
7
7
|
import { useElementIds as o } from "../../../hooks/use-element-ids/use-element-ids.js";
|
|
8
8
|
import './Search.css';/* empty css */
|
|
9
9
|
import { useSearchController as s } from "./Search.controller.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useRef as c } from "react";
|
|
11
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/molecules/search/Search.tsx
|
|
13
13
|
var d = ({ label: d, onSearch: f, onBlur: p, onFocus: m, onClear: h, id: g, tabIndex: _, className: v, maxLength: y = 50, minLength: b = 1, searchMode: x = "automatic", name: S = "q", placeholder: C = "Type to search...", disabled: w = !1, clearable: T = !0, spellCheck: E = !1, autoComplete: D = "off", debounceDelay: O = 500, required: k, ...A }) => {
|
|
14
|
-
let { elementId: j } = o(g), M =
|
|
14
|
+
let { elementId: j } = o(g), M = c(null), N = n(["cl-search", v]), { searchValue: P, isSearchButtonVisible: F, isLabelIconVisible: I, isClearButtonVisible: L, isSearchValueValid: R, handleChange: z, handleClear: B, handleSearchClick: V, handleKeyDown: H } = s({
|
|
15
15
|
onSearch: f,
|
|
16
16
|
onClear: h,
|
|
17
17
|
maxLength: y,
|
|
@@ -21,16 +21,16 @@ var d = ({ label: d, onSearch: f, onBlur: p, onFocus: m, onClear: h, id: g, tabI
|
|
|
21
21
|
}), U = () => {
|
|
22
22
|
B(), M.current && M.current.focus();
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ u("div", {
|
|
25
25
|
...A,
|
|
26
26
|
className: N,
|
|
27
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ l(a, {
|
|
28
28
|
label: d,
|
|
29
29
|
required: !!k,
|
|
30
30
|
inputId: j,
|
|
31
|
-
icon: I ?
|
|
31
|
+
icon: I ? t.Search : void 0,
|
|
32
32
|
iconPosition: I ? "left" : void 0
|
|
33
|
-
}), /* @__PURE__ */
|
|
33
|
+
}), /* @__PURE__ */ l(i, {
|
|
34
34
|
ref: M,
|
|
35
35
|
id: j,
|
|
36
36
|
name: S,
|
|
@@ -48,16 +48,16 @@ var d = ({ label: d, onSearch: f, onBlur: p, onFocus: m, onClear: h, id: g, tabI
|
|
|
48
48
|
spellCheck: E,
|
|
49
49
|
tabIndex: _,
|
|
50
50
|
required: k,
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
-
view:
|
|
51
|
+
children: /* @__PURE__ */ u("span", { children: [T && L && /* @__PURE__ */ l(r, {
|
|
52
|
+
view: e.Inner,
|
|
53
53
|
onClick: U,
|
|
54
54
|
label: `Clear search input for ${d}`,
|
|
55
|
-
icon:
|
|
56
|
-
}), F && /* @__PURE__ */
|
|
57
|
-
view:
|
|
55
|
+
icon: t.Delete
|
|
56
|
+
}), F && /* @__PURE__ */ l(r, {
|
|
57
|
+
view: e.Inner,
|
|
58
58
|
onClick: V,
|
|
59
59
|
label: "Perform search",
|
|
60
|
-
icon:
|
|
60
|
+
icon: t.Search,
|
|
61
61
|
disabled: w || !R
|
|
62
62
|
})] })
|
|
63
63
|
})]
|
|
@@ -7,11 +7,11 @@ import './Select.css';/* empty css */
|
|
|
7
7
|
import { SelectCombobox as a } from "./combobox/Combobox2.js";
|
|
8
8
|
import { SelectDropdown as o } from "./dropdown/Dropdown2.js";
|
|
9
9
|
import { useSelectController as s } from "./Select.controller.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useRef as c } from "react";
|
|
11
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/molecules/select/Select.tsx
|
|
13
13
|
var d = ({ options: d, onChange: f, name: p, label: m, defaultValue: h, id: g, placeholder: _ = "Not selected", required: v = !1, disabled: y = !1, className: b, ...x }) => {
|
|
14
|
-
let S =
|
|
14
|
+
let S = c(null), { elementId: C, dropdownId: w } = r(g), { handleClear: T, handleClose: E, handleSelect: D, handleToggle: O, selected: k, opened: A } = s({
|
|
15
15
|
options: d,
|
|
16
16
|
onChange: f,
|
|
17
17
|
defaultValue: h,
|
|
@@ -24,17 +24,17 @@ var d = ({ options: d, onChange: f, name: p, label: m, defaultValue: h, id: g, p
|
|
|
24
24
|
keyCode: "Escape",
|
|
25
25
|
ref: S,
|
|
26
26
|
onKeyPress: E
|
|
27
|
-
}), /* @__PURE__ */
|
|
27
|
+
}), /* @__PURE__ */ u("div", {
|
|
28
28
|
ref: S,
|
|
29
29
|
...x,
|
|
30
30
|
className: j,
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ l(t, {
|
|
33
33
|
label: m,
|
|
34
34
|
required: v,
|
|
35
35
|
inputId: C
|
|
36
36
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ l(a, {
|
|
38
38
|
name: p,
|
|
39
39
|
opened: A,
|
|
40
40
|
comboboxId: C,
|
|
@@ -45,7 +45,7 @@ var d = ({ options: d, onChange: f, name: p, label: m, defaultValue: h, id: g, p
|
|
|
45
45
|
disabled: y,
|
|
46
46
|
required: v
|
|
47
47
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ l(o, {
|
|
49
49
|
options: d,
|
|
50
50
|
selected: k,
|
|
51
51
|
opened: A,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ElementSize as e } from "../../../../enums/element-size.js";
|
|
2
|
+
import { IconName as t } from "../../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../../atoms/icon/Icon2.js";
|
|
5
5
|
import './Combobox.css';/* empty css */
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/molecules/select/combobox/Combobox.tsx
|
|
8
8
|
var o = ({ opened: o, onClick: s, comboboxId: c, dropdownId: l, selected: u, name: d, placeholder: f, disabled: p, required: m }) => {
|
|
9
|
-
let h =
|
|
9
|
+
let h = n(["cl-select-combobox__icon", { "cl-select-combobox__icon_opened": o }]);
|
|
10
10
|
return /* @__PURE__ */ a("button", {
|
|
11
11
|
type: "button",
|
|
12
12
|
name: d,
|
|
@@ -21,9 +21,9 @@ var o = ({ opened: o, onClick: s, comboboxId: c, dropdownId: l, selected: u, nam
|
|
|
21
21
|
"aria-required": m,
|
|
22
22
|
className: "cl-select-combobox",
|
|
23
23
|
children: [u?.label ? /* @__PURE__ */ i("span", { children: u?.label }) : /* @__PURE__ */ i("span", { children: f }), /* @__PURE__ */ i(r, {
|
|
24
|
-
name:
|
|
24
|
+
name: t.ChevronDown,
|
|
25
25
|
className: h,
|
|
26
|
-
size:
|
|
26
|
+
size: e.Small
|
|
27
27
|
})]
|
|
28
28
|
});
|
|
29
29
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ElementSize as e } from "../../../../enums/element-size.js";
|
|
2
|
+
import { IconName as t } from "../../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../../atoms/icon/Icon2.js";
|
|
5
5
|
import './Option.css';/* empty css */
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/molecules/select/option/Option.tsx
|
|
8
8
|
var o = ({ value: o, selected: s, onSelect: c, onClear: l }) => {
|
|
9
|
-
let { id: u, label: d } = o, f =
|
|
9
|
+
let { id: u, label: d } = o, f = n(["cl-select-option", { "cl-select-option_selected": s }]), p = (e) => {
|
|
10
10
|
s ? l() : c(e);
|
|
11
11
|
};
|
|
12
12
|
return /* @__PURE__ */ a("li", {
|
|
@@ -27,8 +27,8 @@ var o = ({ value: o, selected: s, onSelect: c, onClear: l }) => {
|
|
|
27
27
|
onClick: () => p(u),
|
|
28
28
|
className: f,
|
|
29
29
|
children: [/* @__PURE__ */ i("span", { children: d }), s && /* @__PURE__ */ i(r, {
|
|
30
|
-
name:
|
|
31
|
-
size:
|
|
30
|
+
name: t.Check,
|
|
31
|
+
size: e.Small
|
|
32
32
|
})]
|
|
33
33
|
});
|
|
34
34
|
};
|
|
@@ -4,19 +4,19 @@ import n from "../../atoms/input/Input2.js";
|
|
|
4
4
|
import r from "../../atoms/label/Label2.js";
|
|
5
5
|
import './TextInput.css';/* empty css */
|
|
6
6
|
import i from "./TextInputButtons.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useState as a } from "react";
|
|
8
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/molecules/text-input/TextInputStateless.tsx
|
|
10
10
|
var c = ({ name: c, label: l, errorMessage: u, value: d, onChange: f, onBlur: p, onFocus: m, onClear: h, maxLength: g, id: _, tabIndex: v, placeholder: y = "Type here...", disabled: b = !1, required: x = !1, clearable: S = !0, readOnly: C = !1, autoComplete: w = "off", type: T = "text", className: E, style: D, defaultValue: O }) => {
|
|
11
|
-
let k = _ ?? `text-input-${c}`, A = `${c}-error`, [j, M] =
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
let k = _ ?? `text-input-${c}`, A = `${c}-error`, [j, M] = a(!1), N = T === "password";
|
|
12
|
+
return /* @__PURE__ */ s("div", {
|
|
13
13
|
style: D,
|
|
14
14
|
className: e(["cl-text-input", E]),
|
|
15
|
-
children: [/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ o(r, {
|
|
16
16
|
label: l,
|
|
17
17
|
required: x,
|
|
18
18
|
inputId: k
|
|
19
|
-
}), /* @__PURE__ */
|
|
19
|
+
}), /* @__PURE__ */ s(n, {
|
|
20
20
|
id: k,
|
|
21
21
|
name: c,
|
|
22
22
|
type: j ? "text" : T,
|
|
@@ -35,7 +35,7 @@ var c = ({ name: c, label: l, errorMessage: u, value: d, onChange: f, onBlur: p,
|
|
|
35
35
|
onBlur: p,
|
|
36
36
|
onFocus: m,
|
|
37
37
|
tabIndex: v,
|
|
38
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ o(i, {
|
|
39
39
|
clearable: S,
|
|
40
40
|
isPasswordButtonVisible: N,
|
|
41
41
|
handleClear: () => {
|
|
@@ -47,7 +47,7 @@ var c = ({ name: c, label: l, errorMessage: u, value: d, onChange: f, onBlur: p,
|
|
|
47
47
|
passwordShown: j,
|
|
48
48
|
label: l,
|
|
49
49
|
disabled: b
|
|
50
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ o(t, {
|
|
51
51
|
errorId: A,
|
|
52
52
|
message: u,
|
|
53
53
|
visible: !!u,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ButtonView as e } from "../../../enums/button-view.js";
|
|
2
|
+
import { IconName as t } from "../../../enums/icon-name.js";
|
|
3
|
+
import { getClassName as n } from "../../../utils/get-class-name.js";
|
|
4
4
|
import r from "../../atoms/button/Button2.js";
|
|
5
5
|
import i from "../../atoms/header/Header2.js";
|
|
6
6
|
import a from "../../atoms/portal/Portal.js";
|
|
@@ -8,11 +8,11 @@ import { useIsMounted as o } from "../../../hooks/use-is-mounted/use-is-mounted.
|
|
|
8
8
|
import { useKeyPress as s } from "../../../hooks/use-key-press/use-key-press.js";
|
|
9
9
|
import { useModalFocusTrap as c } from "../../../hooks/use-modal-focus-trap/use-modal-focus-trap.js";
|
|
10
10
|
import './Dialog.css';/* empty css */
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { useRef as l } from "react";
|
|
12
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/organisms/dialog/Dialog.tsx
|
|
14
14
|
var f = ({ isOpened: f, onClose: p, title: m, children: h, icon: g, ..._ }) => {
|
|
15
|
-
let v = o(f), y = v && !f, b =
|
|
15
|
+
let v = o(f), y = v && !f, b = l(null);
|
|
16
16
|
return c({
|
|
17
17
|
modalRef: b,
|
|
18
18
|
isOpened: f
|
|
@@ -20,28 +20,28 @@ var f = ({ isOpened: f, onClose: p, title: m, children: h, icon: g, ..._ }) => {
|
|
|
20
20
|
keyCode: "Escape",
|
|
21
21
|
ref: b,
|
|
22
22
|
onKeyPress: p
|
|
23
|
-
}), v ? /* @__PURE__ */
|
|
24
|
-
className:
|
|
25
|
-
children: /* @__PURE__ */
|
|
23
|
+
}), v ? /* @__PURE__ */ u(a, { children: /* @__PURE__ */ u("div", {
|
|
24
|
+
className: n(["cl-dialog", { "cl-dialog_closing": y }]),
|
|
25
|
+
children: /* @__PURE__ */ d("div", {
|
|
26
26
|
ref: b,
|
|
27
27
|
role: "dialog",
|
|
28
28
|
"aria-modal": "true",
|
|
29
29
|
..._,
|
|
30
30
|
className: "cl-dialog__layout",
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
icon:
|
|
34
|
-
view:
|
|
32
|
+
/* @__PURE__ */ u(r, {
|
|
33
|
+
icon: t.X,
|
|
34
|
+
view: e.Icon,
|
|
35
35
|
label: "Close modal window",
|
|
36
36
|
onClick: p,
|
|
37
37
|
className: "cl-dialog__button"
|
|
38
38
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ u("header", { children: /* @__PURE__ */ u(i, {
|
|
40
40
|
as: "h3",
|
|
41
41
|
icon: g,
|
|
42
42
|
children: m
|
|
43
43
|
}) }),
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ u("div", { children: h })
|
|
45
45
|
]
|
|
46
46
|
})
|
|
47
47
|
}) }) : null;
|