@cagatayfdn/flora-components 0.0.138 → 0.0.140
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/Accordion.css +1 -0
- package/dist/ActionButton.css +1 -0
- package/dist/AlertCard.css +1 -0
- package/dist/Autocomplete.css +1 -0
- package/dist/Button.css +1 -0
- package/dist/Card.css +1 -0
- package/dist/Checkbox.css +1 -0
- package/dist/Config.css +1 -0
- package/dist/Confirm.css +1 -0
- package/dist/ContentHeader.css +1 -0
- package/dist/Datepicker.css +1 -0
- package/dist/Divider.css +1 -0
- package/dist/DropdownList.css +1 -0
- package/dist/ErrorLogModal.css +1 -0
- package/dist/FileUpload.css +1 -0
- package/dist/FileUpload.module-BxCEtOHx.js +32 -0
- package/dist/Heading.css +1 -0
- package/dist/IconBox.css +1 -0
- package/dist/InfoBoxList.css +1 -0
- package/dist/InfoBoxList.module-BHkAHgos.js +8 -0
- package/dist/InfoDate.css +1 -0
- package/dist/InfoText.css +1 -0
- package/dist/Input.css +1 -0
- package/dist/Label.css +1 -0
- package/dist/Legends.css +1 -0
- package/dist/Loading.css +1 -0
- package/dist/MenuItem-Df6Zsa7E.js +53 -0
- package/dist/MenuItem.css +1 -0
- package/dist/Modal.css +1 -0
- package/dist/NoResult.css +1 -0
- package/dist/PageWrap.css +1 -0
- package/dist/Pager.css +1 -0
- package/dist/Panel.css +1 -0
- package/dist/Radio.css +1 -0
- package/dist/ResultError.css +1 -0
- package/dist/ScrollContainer.css +1 -0
- package/dist/Select-BE_y91ZN.js +1831 -0
- package/dist/Select.css +1 -0
- package/dist/Select.module-ByPQ6qr4.js +21 -0
- package/dist/StatusTag.css +1 -0
- package/dist/StatusTypography.css +1 -0
- package/dist/Stepper.css +1 -0
- package/dist/Switch.css +1 -0
- package/dist/Tab.css +1 -0
- package/dist/Table.css +1 -0
- package/dist/Table.module-DUqpZOLt.js +29 -0
- package/dist/Textarea.css +1 -0
- package/dist/Tooltip.css +1 -0
- package/dist/Trans-B4ILpbwK.js +343 -0
- package/dist/TypographyText.css +1 -0
- package/dist/ValidationError.css +1 -0
- package/dist/_commonjsHelpers-CT_km90n.js +30 -0
- package/dist/_isArray-CBUZFxFA.js +6 -0
- package/dist/_isString-BUpNGP_8.js +6 -0
- package/dist/_reduce-DsUCMz4O.js +148 -0
- package/dist/assets/icons/icons.js +70 -0
- package/dist/assets/images/500_error_2x.gif +0 -0
- package/dist/assets/images/oms.png +0 -0
- package/dist/components/Accordion/Accordion.js +60 -0
- package/dist/components/ActionButton/ActionButton.js +54 -0
- package/dist/components/AlertCard/AlertCard.js +29 -0
- package/dist/components/AuthUserCan/Permission.js +18 -0
- package/dist/components/AuthUserCan/index.js +23 -0
- package/dist/components/Autocomplete/Autocomplete.js +87 -0
- package/dist/components/Button/Button.js +87 -0
- package/dist/components/Card/Card.js +21 -0
- package/dist/components/Charts/Bar.js +18 -0
- package/dist/components/Charts/Legends.js +21 -0
- package/dist/components/Charts/Line.js +18 -0
- package/dist/components/Charts/Pie.js +43 -0
- package/dist/components/Charts/index.js +31 -0
- package/dist/components/Charts/types.js +1 -0
- package/dist/components/Charts/utils.js +12 -0
- package/dist/components/Checkbox/Checkbox.js +68 -0
- package/dist/components/Config/Config.js +32 -0
- package/dist/components/Confirm/Confirm.js +60 -0
- package/dist/components/ContentHeader/ContentHeader.js +75 -0
- package/dist/components/ContentLoader/ContentLoader.js +16 -0
- package/dist/components/Countdown/Countdown.js +20 -0
- package/dist/components/Datepicker/Datepicker.js +1478 -0
- package/dist/components/Divider/Divider.js +27 -0
- package/dist/components/Drawer/Provider.js +24 -0
- package/dist/components/Drawer/index.js +55 -0
- package/dist/components/Dropdown/DropdownList.js +90 -0
- package/dist/components/ErrorLogModal/ErrorLogModal.js +69 -0
- package/dist/components/FileUpload/FileUpload.js +237 -0
- package/dist/components/FileUpload/ImagePreview.js +19 -0
- package/dist/components/FileUpload/LengthCard.js +6 -0
- package/dist/components/FileUpload/PreviewModal.js +53 -0
- package/dist/components/Grid/Column.js +29 -0
- package/dist/components/Grid/Row.js +6 -0
- package/dist/components/Heading/Heading.js +22 -0
- package/dist/components/Icon/index.js +24 -0
- package/dist/components/IconBox/IconBox.js +13 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -0
- package/dist/components/InfoBoxList/InfoBoxList.js +30 -0
- package/dist/components/InfoBoxList/helper.js +83 -0
- package/dist/components/InfoDate/InfoDate.js +19 -0
- package/dist/components/InfoText/InfoText.js +13 -0
- package/dist/components/Input/Input.js +140 -0
- package/dist/components/Label/Label.js +22 -0
- package/dist/components/Loading/Loading.js +62 -0
- package/dist/components/Modal/Modal.js +74 -0
- package/dist/components/NavigatorCard/index.js +59 -0
- package/dist/components/NoResult/NoResult.js +12 -0
- package/dist/components/Notification/Notification.js +26 -0
- package/dist/components/PageWrapper/PageWrap.js +46 -0
- package/dist/components/Pager/Pager.js +103 -0
- package/dist/components/Panel/Panel.js +71 -0
- package/dist/components/PermaLink/PermaLink.js +387 -0
- package/dist/components/Radio/Radio.js +96 -0
- package/dist/components/ResultError/ResultError.js +20 -0
- package/dist/components/ScrollContainer/ScrollContainer.js +23 -0
- package/dist/components/Select/NoData.js +10 -0
- package/dist/components/Select/OptionItem.js +19 -0
- package/dist/components/Select/Select.js +13 -0
- package/dist/components/Sidebar/MenuItem.js +9 -0
- package/dist/components/Sidebar/index.js +137 -0
- package/dist/components/StatusTag/StatusTag.js +24 -0
- package/dist/components/StatusTypography/StatusTypography.js +51 -0
- package/dist/components/Stepper/Stepper.js +75 -0
- package/dist/components/Switch/Switch.js +84 -0
- package/dist/components/Tab/Tab.js +28 -0
- package/dist/components/Table/Table.js +271 -0
- package/dist/components/Table/TableHeader.js +137 -0
- package/dist/components/Table/TableSort.js +25 -0
- package/dist/components/Textarea/Textarea.js +95 -0
- package/dist/components/Tooltip/Tooltip.js +1548 -0
- package/dist/components/TypographyText/TypographyText.js +91 -0
- package/dist/components/ValidationError/ValidationError.js +7 -0
- package/dist/components/index.js +133 -0
- package/dist/defineProperty-DeKy1XT0.js +37 -0
- package/dist/enums/appearance.js +14 -0
- package/dist/enums/applicationTypeSlug.js +4 -0
- package/dist/enums/index.js +29 -0
- package/dist/enums/isActiveColor.js +4 -0
- package/dist/enums/size.js +4 -0
- package/dist/enums/status.js +11 -0
- package/dist/equals-PL9KqVQf.js +119 -0
- package/dist/flatpickr-CRz1AV0e.js +59 -0
- package/dist/helper-lFjvXQpv.js +1465 -0
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/useAauth.js +40 -0
- package/dist/hooks/useDisclosure.js +14 -0
- package/dist/hooks/useDrawer.js +9 -0
- package/dist/hooks/useMediaQuery.js +21 -0
- package/dist/hooks/useNiceModal.js +13 -0
- package/dist/i18nInstance-CiCZbaCK.js +55 -0
- package/dist/includes-8YTFrx85.js +46 -0
- package/dist/index-9ZLCCecr.js +364 -0
- package/dist/index-BHf7G3IG.js +35 -0
- package/dist/index-BJU1K2Aw.js +8003 -0
- package/dist/index-CB61CB0b.js +669 -0
- package/dist/index-H7XbDVmH.js +320 -0
- package/dist/index.css +1 -0
- package/dist/index.d.mts +1478 -0
- package/dist/index.d.ts +1478 -0
- package/dist/index.js +203 -0
- package/dist/index2.css +1 -0
- package/dist/jsx-runtime-BcAkpsdy.js +631 -0
- package/dist/keys-B0bo5Q7o.js +67 -0
- package/dist/locales/en/index.js +615 -0
- package/dist/locales/i18n.js +1417 -0
- package/dist/locales/index.js +5 -0
- package/dist/locales/tr/index.js +615 -0
- package/dist/main.css +1 -0
- package/dist/main.js +57 -0
- package/dist/prodivers.css +6 -0
- package/dist/prodivers.js +13 -0
- package/dist/react-content-loader.es-CswLCxkm.js +90 -0
- package/dist/react-toastify.esm-BUWNP7Nm.js +808 -0
- package/dist/types/common/date.js +1 -0
- package/dist/types/common/events.js +1 -0
- package/dist/types/common/forms.js +1 -0
- package/dist/types/common/option.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/useTranslation-CnCPcxVj.js +142 -0
- package/dist/utils/date.js +413 -0
- package/dist/utils/flatpickr.js +4 -0
- package/dist/utils/helper.js +18 -0
- package/dist/utils/index.js +27 -0
- package/dist/utils/language.js +46 -0
- package/dist/utils/table.js +62 -0
- package/dist/utils/validation.js +27 -0
- package/dist/utils/yup.js +2921 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { j as t } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { s as n } from "../../Select.module-ByPQ6qr4.js";
|
|
3
|
+
import { u as r } from "../../useTranslation-CnCPcxVj.js";
|
|
4
|
+
function d({ text: s }) {
|
|
5
|
+
const { t: a } = r(), o = s || a("text.no_results");
|
|
6
|
+
return /* @__PURE__ */ t.jsx("div", { className: n.noData, "data-testid": "nodata", children: /* @__PURE__ */ t.jsx("span", { children: o }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
d as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { s as t } from "../../Select.module-ByPQ6qr4.js";
|
|
3
|
+
function m({
|
|
4
|
+
props: l,
|
|
5
|
+
item: s,
|
|
6
|
+
methods: a,
|
|
7
|
+
onRemoveItem: o
|
|
8
|
+
}) {
|
|
9
|
+
const n = l.labelField || "label", r = (c) => {
|
|
10
|
+
a.removeItem(c, s, !0), o && o(s);
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ e.jsxs("span", { role: "listitem", className: t.customOptionItem, "data-testid": "option-item", children: [
|
|
13
|
+
/* @__PURE__ */ e.jsx("span", { children: s == null ? void 0 : s[n] }),
|
|
14
|
+
/* @__PURE__ */ e.jsx("span", { onClick: r, className: t.remove, children: "x" })
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
m as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { S as s } from "../../Select-BE_y91ZN.js";
|
|
3
|
+
import "../../index-BHf7G3IG.js";
|
|
4
|
+
import "../../Select.module-ByPQ6qr4.js";
|
|
5
|
+
import "../Label/Label.js";
|
|
6
|
+
import "../ValidationError/ValidationError.js";
|
|
7
|
+
import "./NoData.js";
|
|
8
|
+
import "./OptionItem.js";
|
|
9
|
+
import "../InfiniteScroll/InfiniteScroll.js";
|
|
10
|
+
import "../../useTranslation-CnCPcxVj.js";
|
|
11
|
+
export {
|
|
12
|
+
s as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import "../Icon/index.js";
|
|
3
|
+
import "../PermaLink/PermaLink.js";
|
|
4
|
+
import "../Tooltip/Tooltip.js";
|
|
5
|
+
import { M as e } from "../../MenuItem-Df6Zsa7E.js";
|
|
6
|
+
import "../../enums/appearance.js";
|
|
7
|
+
export {
|
|
8
|
+
e as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { useState as T, useEffect as k } from "react";
|
|
3
|
+
import x from "../AuthUserCan/index.js";
|
|
4
|
+
import w from "../Icon/index.js";
|
|
5
|
+
import { Icons as h } from "../../assets/icons/icons.js";
|
|
6
|
+
import { c as n } from "../../index-BHf7G3IG.js";
|
|
7
|
+
import { s as r, M as d } from "../../MenuItem-Df6Zsa7E.js";
|
|
8
|
+
import { u as y } from "../../index-9ZLCCecr.js";
|
|
9
|
+
const g = ({
|
|
10
|
+
collapsed: a = !1,
|
|
11
|
+
items: j,
|
|
12
|
+
className: v,
|
|
13
|
+
isActiveSubMenu: M
|
|
14
|
+
}) => {
|
|
15
|
+
const { pathname: o } = y(), [I, t] = T(M);
|
|
16
|
+
return k(() => {
|
|
17
|
+
a && t(void 0);
|
|
18
|
+
}, [a]), /* @__PURE__ */ e.jsx("div", { className: n(r.wrap, v), "data-testid": "sidebar-container", children: /* @__PURE__ */ e.jsx(
|
|
19
|
+
"ul",
|
|
20
|
+
{
|
|
21
|
+
className: n(r.menu, {
|
|
22
|
+
[r.closeMenu]: a
|
|
23
|
+
}),
|
|
24
|
+
"data-testid": "sidebar-list",
|
|
25
|
+
children: j.map(({ to: l, icon: m, title: u, permItem: N, permType: C, children: i }) => {
|
|
26
|
+
var p;
|
|
27
|
+
const S = l && ((p = o == null ? void 0 : o.replaceAll("/", "")) == null ? void 0 : p.includes(l == null ? void 0 : l.replaceAll("/", ""))), c = I === u;
|
|
28
|
+
return /* @__PURE__ */ e.jsx(x, { permType: C, permItem: N, children: /* @__PURE__ */ e.jsx(
|
|
29
|
+
"li",
|
|
30
|
+
{
|
|
31
|
+
"data-testid": "sidebar-list-item",
|
|
32
|
+
className: n(r.menuItem, {
|
|
33
|
+
[r.selected]: S,
|
|
34
|
+
[r.subMenuWrap]: i
|
|
35
|
+
}),
|
|
36
|
+
onMouseEnter: () => {
|
|
37
|
+
i && a && t(u);
|
|
38
|
+
},
|
|
39
|
+
onMouseLeave: () => {
|
|
40
|
+
i && a && t(void 0);
|
|
41
|
+
},
|
|
42
|
+
children: i ? /* @__PURE__ */ e.jsxs(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: n({
|
|
46
|
+
[r.opened]: c
|
|
47
|
+
}),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ e.jsxs(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
onClick: () => {
|
|
53
|
+
a || t(c ? void 0 : u);
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ e.jsx(
|
|
57
|
+
d,
|
|
58
|
+
{
|
|
59
|
+
to: l,
|
|
60
|
+
title: u,
|
|
61
|
+
icon: m,
|
|
62
|
+
visibleTooltip: !1
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
!a && /* @__PURE__ */ e.jsx(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: n(r.arrow, {
|
|
69
|
+
[r.up]: c
|
|
70
|
+
}),
|
|
71
|
+
children: /* @__PURE__ */ e.jsx(w, { name: h.DownArrow })
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
c && /* @__PURE__ */ e.jsx(
|
|
78
|
+
"ul",
|
|
79
|
+
{
|
|
80
|
+
className: n(r.subMenu, {
|
|
81
|
+
[r.hover]: a
|
|
82
|
+
}),
|
|
83
|
+
"data-testid": "sidebar-submenu-list",
|
|
84
|
+
children: i == null ? void 0 : i.map((s) => {
|
|
85
|
+
var b, f;
|
|
86
|
+
const A = s.to && ((f = o == null ? void 0 : o.replaceAll("/", "")) == null ? void 0 : f.includes((b = s == null ? void 0 : s.to) == null ? void 0 : b.replaceAll("/", "")));
|
|
87
|
+
return /* @__PURE__ */ e.jsx(
|
|
88
|
+
x,
|
|
89
|
+
{
|
|
90
|
+
permType: s.permType,
|
|
91
|
+
permItem: s.permItem,
|
|
92
|
+
children: /* @__PURE__ */ e.jsx(
|
|
93
|
+
"li",
|
|
94
|
+
{
|
|
95
|
+
"data-testid": "sidebar-submenu-list-item",
|
|
96
|
+
onClick: () => {
|
|
97
|
+
s.onClick && s.onClick(), a && t(void 0);
|
|
98
|
+
},
|
|
99
|
+
className: n(r.menuItem, {
|
|
100
|
+
[r.selected]: A || (s == null ? void 0 : s.isItemSelected)
|
|
101
|
+
}),
|
|
102
|
+
children: /* @__PURE__ */ e.jsx(
|
|
103
|
+
d,
|
|
104
|
+
{
|
|
105
|
+
to: s.to,
|
|
106
|
+
title: s.title,
|
|
107
|
+
visibleTooltip: !1
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
},
|
|
113
|
+
s.to
|
|
114
|
+
);
|
|
115
|
+
})
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
) : /* @__PURE__ */ e.jsx(
|
|
121
|
+
d,
|
|
122
|
+
{
|
|
123
|
+
to: l,
|
|
124
|
+
title: u,
|
|
125
|
+
icon: m,
|
|
126
|
+
visibleTooltip: a
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
) }, u);
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
) });
|
|
134
|
+
};
|
|
135
|
+
export {
|
|
136
|
+
g as default
|
|
137
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { j as i } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as e } from "../../index-BHf7G3IG.js";
|
|
3
|
+
import '../../StatusTag.css';const c = "_tag_1i9wh_2", _ = "_success_1i9wh_2", n = "_failed_1i9wh_2", o = "_empty_1i9wh_2", m = "_waiting_1i9wh_2", t = {
|
|
4
|
+
tag: c,
|
|
5
|
+
success: _,
|
|
6
|
+
failed: n,
|
|
7
|
+
empty: o,
|
|
8
|
+
waiting: m
|
|
9
|
+
}, d = ({ status: s, text: a }) => /* @__PURE__ */ i.jsx(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
"data-testid": "status-tag",
|
|
13
|
+
className: e(
|
|
14
|
+
t.tag,
|
|
15
|
+
{
|
|
16
|
+
[t[s]]: s
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
children: a
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
export {
|
|
23
|
+
d as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { j as n } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import r from "../Loading/Loading.js";
|
|
3
|
+
import { c as o } from "../../index-BHf7G3IG.js";
|
|
4
|
+
import { AppAndServicesStatusApperenceType as g } from "../../enums/appearance.js";
|
|
5
|
+
import '../../StatusTypography.css';const x = "_wrapper_bso71_2", f = "_statusSubText_bso71_2", b = "_spinContainer_bso71_2", y = "_postfixSpinner_bso71_2", N = "_spinner_bso71_2", j = "_warning_bso71_2", u = "_danger_bso71_2", w = "_success_bso71_2", m = "_initializing_bso71_2", z = "_pending_bso71_2", h = "_failed_bso71_2", T = "_queued_bso71_2", q = "_passed_bso71_2", i = {
|
|
6
|
+
wrapper: x,
|
|
7
|
+
statusSubText: f,
|
|
8
|
+
spinContainer: b,
|
|
9
|
+
postfixSpinner: y,
|
|
10
|
+
spinner: N,
|
|
11
|
+
warning: j,
|
|
12
|
+
danger: u,
|
|
13
|
+
success: w,
|
|
14
|
+
initializing: m,
|
|
15
|
+
pending: z,
|
|
16
|
+
failed: h,
|
|
17
|
+
queued: T,
|
|
18
|
+
passed: q
|
|
19
|
+
};
|
|
20
|
+
var p = /* @__PURE__ */ ((s) => (s.addons_initializing = "initializing", s.addons_initialization_failed = "failed", s.deploying = "warning", s.failed = "failed", s.deployed = "success", s.completed = "success", s.initializing = "initializing", s.initialization_failed = "failed", s.queueing = "warning", s.queued = "queued", s.pending = "pending", s.passed = "passed", s))(p || {});
|
|
21
|
+
const k = (s) => {
|
|
22
|
+
const {
|
|
23
|
+
text: t,
|
|
24
|
+
type: c = g.ADDONS_INITIALIZING,
|
|
25
|
+
extra: l,
|
|
26
|
+
spin: e,
|
|
27
|
+
condition: _,
|
|
28
|
+
spinnerLocation: d = "back"
|
|
29
|
+
} = s, a = t && t.replace(/\_/g, " ");
|
|
30
|
+
return /* @__PURE__ */ n.jsx("p", { "data-testid": "statustypography", className: o(i.wrapper, [i[p[c]]]), children: _ ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
31
|
+
/* @__PURE__ */ n.jsxs("span", { className: i.spinContainer, children: [
|
|
32
|
+
e && d === "front" && /* @__PURE__ */ n.jsx(r, { className: o(i.spinner), layer: !1 }),
|
|
33
|
+
a,
|
|
34
|
+
e && d === "back" && /* @__PURE__ */ n.jsx(
|
|
35
|
+
r,
|
|
36
|
+
{
|
|
37
|
+
className: o(i.spinner, i.postfixSpinner),
|
|
38
|
+
layer: !1
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ n.jsx("p", { className: i.statusSubText, children: l })
|
|
43
|
+
] }) : p[c] === "warning" && e ? /* @__PURE__ */ n.jsxs("span", { className: i.spinContainer, children: [
|
|
44
|
+
/* @__PURE__ */ n.jsx(r, { className: i.spinner, layer: !1 }),
|
|
45
|
+
a
|
|
46
|
+
] }) : /* @__PURE__ */ n.jsx("span", { className: i.spinContainer, children: a }) });
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
p as StatusEnum,
|
|
50
|
+
k as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { j as t } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as j } from "../../index-BHf7G3IG.js";
|
|
3
|
+
import x from "../Icon/index.js";
|
|
4
|
+
import { Icons as z } from "../../assets/icons/icons.js";
|
|
5
|
+
import '../../Stepper.css';const C = "_container_b20ez_2", N = "_complete_b20ez_2", g = "_active_b20ez_2", i = {
|
|
6
|
+
container: C,
|
|
7
|
+
complete: N,
|
|
8
|
+
active: g
|
|
9
|
+
}, w = (l) => {
|
|
10
|
+
let s = !0;
|
|
11
|
+
const {
|
|
12
|
+
items: _,
|
|
13
|
+
selected: p = 0,
|
|
14
|
+
selectAll: m,
|
|
15
|
+
onChange: d,
|
|
16
|
+
renderItem: f,
|
|
17
|
+
wrapperClass: u
|
|
18
|
+
} = l, v = ({ index: e, title: c, customIndexItem: r }) => /* @__PURE__ */ t.jsxs(
|
|
19
|
+
"a",
|
|
20
|
+
{
|
|
21
|
+
href: `#step-${e}`,
|
|
22
|
+
onClick: (n) => d && d(e, n),
|
|
23
|
+
children: [
|
|
24
|
+
r || (p > e ? /* @__PURE__ */ t.jsx("span", { children: /* @__PURE__ */ t.jsx(x, { name: z.Check }) }) : /* @__PURE__ */ t.jsx("span", { children: e + 1 })),
|
|
25
|
+
c
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ t.jsx(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: j(i.container, u),
|
|
33
|
+
"data-testid": "stepper-container",
|
|
34
|
+
children: /* @__PURE__ */ t.jsx("ul", { "data-testid": "stepper-list", children: _.map(
|
|
35
|
+
({
|
|
36
|
+
title: e,
|
|
37
|
+
customIndexItem: c,
|
|
38
|
+
activeClass: r,
|
|
39
|
+
completeClass: n,
|
|
40
|
+
to: b,
|
|
41
|
+
skip: h
|
|
42
|
+
}, a) => {
|
|
43
|
+
if (h)
|
|
44
|
+
return null;
|
|
45
|
+
m && (s = !0);
|
|
46
|
+
const o = a === p;
|
|
47
|
+
return !m && o && (s = !1), /* @__PURE__ */ t.jsx(
|
|
48
|
+
"li",
|
|
49
|
+
{
|
|
50
|
+
"data-testid": "stepper-list-item",
|
|
51
|
+
className: j({
|
|
52
|
+
[i.active]: o,
|
|
53
|
+
[i.complete]: s,
|
|
54
|
+
[r]: o,
|
|
55
|
+
[n]: s
|
|
56
|
+
}),
|
|
57
|
+
children: f ? f({
|
|
58
|
+
title: e,
|
|
59
|
+
customIndexItem: c,
|
|
60
|
+
activeClass: r,
|
|
61
|
+
completeClass: n,
|
|
62
|
+
to: b,
|
|
63
|
+
skip: h
|
|
64
|
+
}, l) : v({ index: a, title: e, customIndexItem: c })
|
|
65
|
+
},
|
|
66
|
+
`stepper-item-${a}`
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
w as default
|
|
75
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import u, { useState as v, useEffect as k } from "react";
|
|
3
|
+
import { c as _ } from "../../index-BHf7G3IG.js";
|
|
4
|
+
import N from "../Label/Label.js";
|
|
5
|
+
import { Size as y } from "../../enums/size.js";
|
|
6
|
+
import { u as b } from "../../useTranslation-CnCPcxVj.js";
|
|
7
|
+
import '../../Switch.css';const S = "_checked_1n7nk_2", O = "_disabled_1n7nk_2", R = "_switch__small_1n7nk_2", g = "_slider_1n7nk_2", C = "_active_1n7nk_2", E = "_passive_1n7nk_2", F = "_switch__large_1n7nk_2", L = "_round_1n7nk_2", t = {
|
|
8
|
+
switch: "_switch_1n7nk_2",
|
|
9
|
+
checked: S,
|
|
10
|
+
disabled: O,
|
|
11
|
+
switch__small: R,
|
|
12
|
+
slider: g,
|
|
13
|
+
active: C,
|
|
14
|
+
passive: E,
|
|
15
|
+
switch__large: F,
|
|
16
|
+
round: L
|
|
17
|
+
}, B = u.forwardRef(
|
|
18
|
+
({
|
|
19
|
+
name: n,
|
|
20
|
+
label: d,
|
|
21
|
+
className: p,
|
|
22
|
+
isDisabled: i,
|
|
23
|
+
value: c,
|
|
24
|
+
onChange: r,
|
|
25
|
+
onLabelClick: o,
|
|
26
|
+
checkedChildren: f,
|
|
27
|
+
size: l = y.SM,
|
|
28
|
+
unCheckedChildren: w,
|
|
29
|
+
...a
|
|
30
|
+
}, x) => {
|
|
31
|
+
const [s, h] = v(c), { t: m } = b();
|
|
32
|
+
k(() => {
|
|
33
|
+
!a.readOnly && !i && c !== void 0 && r && r(s);
|
|
34
|
+
}, [s, c]), k(() => {
|
|
35
|
+
c && h(c);
|
|
36
|
+
}, [c]);
|
|
37
|
+
const j = () => {
|
|
38
|
+
!i && !a.readOnly && h(!s), !i && o && o(!s);
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ e.jsxs("div", { className: _(t.container, p), "data-testid": "switch-container", children: [
|
|
41
|
+
d && /* @__PURE__ */ e.jsx(N, { name: n, children: d }),
|
|
42
|
+
/* @__PURE__ */ e.jsx("div", { className: t.block, children: /* @__PURE__ */ e.jsxs(
|
|
43
|
+
"label",
|
|
44
|
+
{
|
|
45
|
+
className: _(t.switch, {
|
|
46
|
+
[t.checked]: s,
|
|
47
|
+
[t.disabled]: i,
|
|
48
|
+
[t[`switch__${l}`]]: l
|
|
49
|
+
}),
|
|
50
|
+
htmlFor: n,
|
|
51
|
+
onClick: () => j(),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ e.jsx(
|
|
54
|
+
"input",
|
|
55
|
+
{
|
|
56
|
+
type: "checkbox",
|
|
57
|
+
name: n,
|
|
58
|
+
value: c,
|
|
59
|
+
"data-testid": "switch-input",
|
|
60
|
+
ref: x,
|
|
61
|
+
checked: s,
|
|
62
|
+
readOnly: !0,
|
|
63
|
+
...a
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ e.jsx("span", { className: t.slider, children: /* @__PURE__ */ e.jsx(
|
|
67
|
+
"span",
|
|
68
|
+
{
|
|
69
|
+
className: _({
|
|
70
|
+
[t.active]: s,
|
|
71
|
+
[t.passive]: !s
|
|
72
|
+
}),
|
|
73
|
+
children: s ? f || m("text.active") : w || m("text.passive")
|
|
74
|
+
}
|
|
75
|
+
) })
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
) })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
export {
|
|
83
|
+
B as default
|
|
84
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { j as t } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as r } from "../../index-BHf7G3IG.js";
|
|
3
|
+
import '../../Tab.css';const o = "_tabContainer_ks20u_2", d = "_titleWrapper_ks20u_2", p = "_title_ks20u_2", _ = "_isActive_ks20u_2", e = {
|
|
4
|
+
tabContainer: o,
|
|
5
|
+
titleWrapper: d,
|
|
6
|
+
title: p,
|
|
7
|
+
isActive: _
|
|
8
|
+
};
|
|
9
|
+
function b({ items: l, selected: c, onChange: s }) {
|
|
10
|
+
return /* @__PURE__ */ t.jsx("div", { className: e.tabContainer, "data-testid": "tab-container", children: l.map((a, i) => {
|
|
11
|
+
const n = c == i;
|
|
12
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
"data-testid": "tab-item",
|
|
16
|
+
onClick: () => s && s(i),
|
|
17
|
+
className: r(e.titleWrapper, {
|
|
18
|
+
[e.isActive]: n
|
|
19
|
+
}),
|
|
20
|
+
children: /* @__PURE__ */ t.jsx("div", { title: a.title, className: r(e.title), "data-testid": "tab-title", children: a.title })
|
|
21
|
+
},
|
|
22
|
+
i
|
|
23
|
+
) });
|
|
24
|
+
}) });
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
b as default
|
|
28
|
+
};
|