1mpacto-react-ui 2.0.20 → 2.0.21
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/assets/style.css +1 -1
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/index.mjs +40 -40
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +3 -3
- package/dist/components/Breadcrumbs/Breadcrumbs.mjs +43 -43
- package/dist/components/ButtonPopover/ButtonPopover.cjs +1 -1
- package/dist/components/ButtonPopover/ButtonPopover.mjs +28 -31
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.mjs +98 -100
- package/dist/components/Calendar/CalendarMonth.cjs +1 -1
- package/dist/components/Calendar/CalendarMonth.mjs +41 -42
- package/dist/components/Calendar/CalendarRange.cjs +1 -1
- package/dist/components/Calendar/CalendarRange.mjs +59 -61
- package/dist/components/Calendar/CalendarYear.cjs +2 -2
- package/dist/components/Calendar/CalendarYear.mjs +37 -38
- package/dist/components/Chart/DoughnutChart.cjs +1 -1
- package/dist/components/Chart/DoughnutChart.mjs +93 -96
- package/dist/components/Chart/GradientBarChart.cjs +1 -1
- package/dist/components/Chart/GradientBarChart.mjs +80 -81
- package/dist/components/Chart/GradientLineChart.cjs +1 -1
- package/dist/components/Chart/GradientLineChart.mjs +50 -51
- package/dist/components/Chart/LineChart.cjs +1 -1
- package/dist/components/Chart/LineChart.mjs +23 -23
- package/dist/components/Chart/PieChart.cjs +1 -1
- package/dist/components/Chart/PieChart.mjs +45 -48
- package/dist/components/Collapse/Collapse.cjs +1 -1
- package/dist/components/Collapse/Collapse.mjs +23 -24
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.mjs +86 -89
- package/dist/components/DatePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DatePicker/DateRangePicker.mjs +91 -92
- package/dist/components/DatePicker/FilterDate.cjs +1 -1
- package/dist/components/DatePicker/FilterDate.mjs +107 -110
- package/dist/components/DatePicker/MonthYearPicker.cjs +1 -1
- package/dist/components/DatePicker/MonthYearPicker.mjs +51 -53
- package/dist/components/FilterContainer/FilterContainer.cjs +1 -1
- package/dist/components/FilterContainer/FilterContainer.mjs +27 -27
- package/dist/components/Input/InputFloatingInner.cjs +5 -5
- package/dist/components/Input/InputFloatingInner.mjs +24 -25
- package/dist/components/NumberFormat/NumberFormat.cjs +1 -1
- package/dist/components/NumberFormat/NumberFormat.mjs +12 -13
- package/dist/components/Pagination/Pagination.cjs +2 -2
- package/dist/components/Pagination/Pagination.mjs +76 -80
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.cjs +1 -1
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.mjs +98 -102
- package/dist/components/Sidebar/ItemSidebar.cjs +8 -8
- package/dist/components/Sidebar/ItemSidebar.mjs +71 -72
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.mjs +65 -68
- package/dist/components/Step/Step.cjs +5 -5
- package/dist/components/Step/Step.mjs +52 -52
- package/dist/components/Table/Table.cjs +3 -3
- package/dist/components/Table/Table.mjs +275 -298
- package/dist/components/Table/TableSubMobile.cjs +1 -1
- package/dist/components/Table/TableSubMobile.mjs +32 -35
- package/dist/components/Tabs/Tabs.cjs +8 -8
- package/dist/components/Tabs/Tabs.mjs +66 -70
- package/dist/components/Textarea/Textarea.cjs +7 -7
- package/dist/components/Textarea/Textarea.mjs +47 -50
- package/dist/components/Textarea/TextareaFloatingInner.cjs +6 -6
- package/dist/components/Textarea/TextareaFloatingInner.mjs +56 -61
- package/dist/components/Textarea/TextareaInnerLabel.cjs +6 -6
- package/dist/components/Textarea/TextareaInnerLabel.mjs +47 -50
- package/dist/components/TimeRange/TimeRange.cjs +1 -1
- package/dist/components/TimeRange/TimeRange.mjs +88 -91
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.mjs +44 -46
- package/dist/components/Upload/UploadFile.cjs +1 -1
- package/dist/components/Upload/UploadFile.mjs +50 -54
- package/dist/components/Upload/UploadImage.cjs +3 -3
- package/dist/components/Upload/UploadImage.mjs +62 -68
- package/dist/components/Upload/UploadMultipleFile.cjs +1 -1
- package/dist/components/Upload/UploadMultipleFile.mjs +61 -62
- package/dist/components/Virtualization/ListVirtualization.cjs +1 -1
- package/dist/components/Virtualization/ListVirtualization.mjs +52 -55
- package/dist/components/Virtualization/TableVirtualization.cjs +1 -1
- package/dist/components/Virtualization/TableVirtualization.mjs +56 -59
- package/dist/config/components/tinymce.cjs +2 -2
- package/dist/config/components/tinymce.mjs +3 -3
- package/dist/hooks/useCountdown.cjs +1 -1
- package/dist/hooks/useCountdown.mjs +15 -15
- package/dist/hooks/useDebounce.cjs +1 -1
- package/dist/hooks/useDebounce.mjs +19 -19
- package/dist/hooks/useOtpInput.cjs +1 -1
- package/dist/hooks/useOtpInput.mjs +47 -51
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.d.ts +5 -4
- package/dist/package.json.mjs +1 -1
- package/dist/utils/common.cjs +1 -1
- package/dist/utils/common.mjs +172 -173
- package/package.json +4 -4
|
@@ -1,56 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as t, Fragment as $, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, isValidElement as a, createElement as j } from "react";
|
|
3
|
+
import i from "./itemSidebar.module.scss.mjs";
|
|
4
4
|
import { configItemSidebar as d } from "./ItemSidebar.config.mjs";
|
|
5
|
-
const
|
|
6
|
-
as:
|
|
7
|
-
show:
|
|
8
|
-
open:
|
|
9
|
-
patch:
|
|
5
|
+
const C = ({
|
|
6
|
+
as: p,
|
|
7
|
+
show: I,
|
|
8
|
+
open: s,
|
|
9
|
+
patch: y,
|
|
10
10
|
iconSubs: r,
|
|
11
11
|
variant: m = "payhere-brand-base-white",
|
|
12
|
-
setShow:
|
|
13
|
-
onClickItems:
|
|
14
|
-
propsLink:
|
|
15
|
-
...
|
|
12
|
+
setShow: l,
|
|
13
|
+
onClickItems: x,
|
|
14
|
+
propsLink: b,
|
|
15
|
+
...e
|
|
16
16
|
}) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
o.length > 0 ? g(`${o.join("/")}/`) : g("");
|
|
17
|
+
let g = /* @__PURE__ */ t($, {});
|
|
18
|
+
const A = p ?? "div", [O, f] = M(!1), h = y === e.slug, N = I.split("/"), n = N.includes(e.name), H = () => {
|
|
19
|
+
if (e.subs.length > 0)
|
|
20
|
+
if (n) {
|
|
21
|
+
const o = N.splice(0, N.indexOf(e.name));
|
|
22
|
+
o.length > 0 ? l(`${o.join("/")}/`) : l("");
|
|
24
23
|
} else
|
|
25
|
-
|
|
26
|
-
else typeof
|
|
24
|
+
l(`${I}${e.name}/`);
|
|
25
|
+
else typeof x == "function" && x(e);
|
|
27
26
|
};
|
|
28
|
-
return
|
|
27
|
+
return e.isShow ? ([1, 3, 5, 6, 7, 8].includes(e.parent) && (g = /* @__PURE__ */ c($, { children: [
|
|
29
28
|
/* @__PURE__ */ c(
|
|
30
|
-
|
|
29
|
+
A,
|
|
31
30
|
{
|
|
32
|
-
id:
|
|
33
|
-
className: `${
|
|
34
|
-
${
|
|
35
|
-
${
|
|
31
|
+
id: e.name,
|
|
32
|
+
className: `${i["item-sidebar-1"]}
|
|
33
|
+
${d.variant?.[m]} ${d.parent?.[e.parent.toString()]}
|
|
34
|
+
${h || e.subs.length > 0 && n ? i.active : ""} ${typeof s == "boolean" && s ? i["item-sidebar-open"] : ""} ${typeof s == "boolean" && !s ? i["item-sidebar-close"] : ""}
|
|
36
35
|
`,
|
|
37
|
-
onClick:
|
|
38
|
-
onMouseOver: () =>
|
|
39
|
-
onMouseOut: () =>
|
|
40
|
-
...
|
|
36
|
+
onClick: H,
|
|
37
|
+
onMouseOver: () => f(!0),
|
|
38
|
+
onMouseOut: () => f(!1),
|
|
39
|
+
...b ? b(e.slug, e) : {},
|
|
41
40
|
children: [
|
|
42
41
|
/* @__PURE__ */ c("div", { className: "iru-flex iru-items-center iru-gap-3 iru-relative", children: [
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */
|
|
42
|
+
a(e.svgIcon) && /* @__PURE__ */ t("div", { className: i["item-icon"], children: h || e.subs.length > 0 && n ? e?.svgIconActive : O ? e?.svgIconHover || e?.svgIconActive : e?.svgIcon }),
|
|
43
|
+
/* @__PURE__ */ t("div", { className: i["item-label"], children: e.label })
|
|
45
44
|
] }),
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
a(e.endIcon) && /* @__PURE__ */ t("div", { className: i["end-icon"], children: e?.endIcon }),
|
|
46
|
+
e.subs.length > 0 && s && /* @__PURE__ */ c(
|
|
48
47
|
"div",
|
|
49
48
|
{
|
|
50
|
-
className: `${
|
|
51
|
-
id: `item-sidebar-subs-${
|
|
49
|
+
className: `${i["item-icon-subs"]} ${n ? i["item-icon-subs-active"] : ""}`,
|
|
50
|
+
id: `item-sidebar-subs-${e.name}-icon`,
|
|
52
51
|
children: [
|
|
53
|
-
|
|
52
|
+
a(r) && r,
|
|
54
53
|
typeof r == "function" && r()
|
|
55
54
|
]
|
|
56
55
|
}
|
|
@@ -58,30 +57,30 @@ const w = ({
|
|
|
58
57
|
]
|
|
59
58
|
}
|
|
60
59
|
),
|
|
61
|
-
|
|
62
|
-
] })), (
|
|
60
|
+
e.parent === 3 && !e.subs.length && /* @__PURE__ */ t("div", { className: d.divider?.[m] })
|
|
61
|
+
] })), (e.parent === 2 || e.parent === 4) && (g = /* @__PURE__ */ c($, { children: [
|
|
63
62
|
/* @__PURE__ */ c(
|
|
64
|
-
|
|
63
|
+
A,
|
|
65
64
|
{
|
|
66
|
-
id:
|
|
67
|
-
className: `${
|
|
68
|
-
${
|
|
69
|
-
${
|
|
65
|
+
id: e.name,
|
|
66
|
+
className: `${i["item-sidebar-2"]}
|
|
67
|
+
${d.variant?.[m]} ${d.parent?.[e.parent.toString()]}
|
|
68
|
+
${h || e.subs.length > 0 && n ? i.active : ""} ${typeof s == "boolean" && s ? i["item-sidebar-open"] : ""} ${typeof s == "boolean" && !s ? i["item-sidebar-close"] : ""}
|
|
70
69
|
`,
|
|
71
|
-
onClick:
|
|
72
|
-
onMouseOver: () =>
|
|
73
|
-
onMouseOut: () =>
|
|
74
|
-
...
|
|
70
|
+
onClick: H,
|
|
71
|
+
onMouseOver: () => f(!0),
|
|
72
|
+
onMouseOut: () => f(!1),
|
|
73
|
+
...b ? b(e.slug, e) : {},
|
|
75
74
|
children: [
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
75
|
+
a(e.svgIcon) && /* @__PURE__ */ t("div", { className: i["item-icon"], children: h || e.subs.length > 0 && n ? e?.svgIconActive : O ? e?.svgIconHover || e?.svgIconActive : e?.svgIcon }),
|
|
76
|
+
/* @__PURE__ */ t("div", { className: i["item-label"], children: e.label }),
|
|
77
|
+
e.subs.length > 0 && s && /* @__PURE__ */ c(
|
|
79
78
|
"div",
|
|
80
79
|
{
|
|
81
|
-
className: `${
|
|
82
|
-
id: `item-sidebar-subs-${
|
|
80
|
+
className: `${i["item-icon-subs"]} ${n ? i["item-icon-subs-active"] : ""}`,
|
|
81
|
+
id: `item-sidebar-subs-${e.name}-icon`,
|
|
83
82
|
children: [
|
|
84
|
-
|
|
83
|
+
a(r) && r,
|
|
85
84
|
typeof r == "function" && r()
|
|
86
85
|
]
|
|
87
86
|
}
|
|
@@ -89,34 +88,34 @@ const w = ({
|
|
|
89
88
|
]
|
|
90
89
|
}
|
|
91
90
|
),
|
|
92
|
-
|
|
93
|
-
] })),
|
|
94
|
-
|
|
95
|
-
/* @__PURE__ */
|
|
91
|
+
e.parent === 4 && !e.subs.length && /* @__PURE__ */ t("div", { className: d.divider?.[m] })
|
|
92
|
+
] })), e.subs.length > 0 ? /* @__PURE__ */ c("div", { className: `${s || n ? "" : "-mt-2"}`, children: [
|
|
93
|
+
g,
|
|
94
|
+
/* @__PURE__ */ t(
|
|
96
95
|
"div",
|
|
97
96
|
{
|
|
98
|
-
id: `item-sidebar-subs-${
|
|
99
|
-
className: `${
|
|
100
|
-
${
|
|
101
|
-
children:
|
|
102
|
-
|
|
97
|
+
id: `item-sidebar-subs-${e.name}-${s && n ? "open" : "close"}`,
|
|
98
|
+
className: `${i["item-subs-sidebar"]}
|
|
99
|
+
${d.variant?.[m]} ${!s || !n ? i.hidden : ""}`,
|
|
100
|
+
children: e.subs.map((o) => /* @__PURE__ */ j(
|
|
101
|
+
C,
|
|
103
102
|
{
|
|
104
103
|
...o,
|
|
105
|
-
as: o.manualRoute ? "div" : o.subs.length > 0 ?
|
|
104
|
+
as: o.manualRoute ? "div" : o.subs.length > 0 ? p : e.linkComponent,
|
|
106
105
|
key: o.name,
|
|
107
|
-
patch:
|
|
106
|
+
patch: y,
|
|
108
107
|
iconSubs: r,
|
|
109
|
-
show:
|
|
110
|
-
open:
|
|
108
|
+
show: I,
|
|
109
|
+
open: s,
|
|
111
110
|
variant: m,
|
|
112
|
-
setShow:
|
|
111
|
+
setShow: l
|
|
113
112
|
}
|
|
114
113
|
))
|
|
115
114
|
}
|
|
116
115
|
),
|
|
117
|
-
[3, 4].includes(
|
|
118
|
-
] }) :
|
|
116
|
+
[3, 4].includes(e.parent) && /* @__PURE__ */ t("div", { className: d.divider?.[m] })
|
|
117
|
+
] }) : g) : /* @__PURE__ */ t($, {});
|
|
119
118
|
};
|
|
120
119
|
export {
|
|
121
|
-
|
|
120
|
+
C as default
|
|
122
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("react"),a=require("./Sidebar.module.scss.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("react"),a=require("./Sidebar.module.scss.cjs"),B=require("./ItemSidebar.cjs"),N=require("../../config/tailwind/nativeScreen.cjs"),S=require("./Sidebar.config.cjs"),I=e.forwardRef((R,W)=>{const{as:C,children:v,patch:d="/",iconCompany:c,iconSubs:k,iconCollapse:m,iconCollapseClose:w,modules:q,toleranceWidthIconCompany:O=25,onClickItems:$,variant:r="payhere-brand-base-white",footer:o,withInheritance:g,id:p="1ru-sidebar",styleSidebar:V,styleContent:L,...M}=R,_=e.useRef(null),[n,l]=e.useState(null),[i,f]=e.useState(null),[z,j]=e.useState(""),[x,h]=e.useState(),[E,F]=e.useState(0),b=()=>{let s=0;document.getElementById("icon-company-sidebar")?.childNodes?.forEach(T=>{s+=T.getBoundingClientRect().width??0}),h(s+O+"px")},y=()=>{F(window.innerWidth)},u=()=>{l(!i),i?h("auto"):setTimeout(()=>{b()},100)};return e.useEffect(()=>{E>=(S.configSidebar.mobileSupport.includes(r)?N.default.lg:N.default.md)?(l(!0),setTimeout(()=>{b()},100)):(l(!1),h("auto"))},[E]),e.useEffect(()=>{typeof n=="boolean"&&f(n)},[n]),e.useImperativeHandle(W,()=>({openSidebar:n,setOpenSidebar:l,handlerClickCollapse:u}),[n,i]),e.useEffect(()=>(d&&d.split("/").length>1&&j(d+"/"),b(),y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)),[]),t.jsxs("div",{className:S.configSidebar.variants[r],...M,ref:_,children:[t.jsxs("div",{id:p,className:`${a.default.sidebar} ${typeof i=="boolean"&&i?a.default["sidebar-open"]:""} ${typeof i=="boolean"&&!i?a.default["sidebar-close"]:""}`,style:V||{},children:[e.isValidElement(m)&&t.jsxs("div",{className:a.default["button-collaps-sidebar"],id:`${p}-${n?"close-collapse":"open-collapse"}`,onClick:u,children:[n&&m,n?"":e.isValidElement(w)?w:m]}),t.jsx("div",{className:a.default["container-icon-company-sidebar"],children:t.jsxs("div",{id:"icon-company-sidebar",className:a.default["icon-company-sidebar"],style:{width:x&&S.configSidebar.withCuctomWidthIconCompany.includes(r)?x:"100%"},children:[e.isValidElement(c)&&c,typeof c=="function"&&c({openSidebar:i,setOpenSidebar:l})]})}),t.jsx("div",{className:a.default["menu-sidebar"],onMouseOver:()=>{n||f(!0)},onMouseOut:()=>{n||f(!1)},children:q.map(s=>e.createElement(B.default,{...s,as:s.manualRoute||s.subs.length>0?"div":C,linkComponent:C,key:s.name,show:z,open:i,patch:d,iconSubs:k,variant:r,setShow:j,onClickItems:$}))}),o&&t.jsxs("div",{className:i?"iru-opacity-[1]":"iru-opacity-0",children:[e.isValidElement(o)&&t.jsx("div",{children:o}),typeof o=="function"&&t.jsx("div",{children:o()})]})]}),n&&t.jsx("div",{id:`${p}-splace-screen`,className:a.default["splace-screen"],onClick:u}),t.jsxs("div",{className:a.default["content-sidebar"],style:L||{},children:[g&&e.Children?.map(v,s=>t.jsx(t.Fragment,{children:e.isValidElement(s)&&t.jsx(t.Fragment,{children:e.cloneElement(s,{openSidebar:n,handlerClickCollapse:u})})})),!g&&t.jsx(t.Fragment,{children:v})]})]})});I.displayName="Sidebar";exports.default=I;
|
|
@@ -1,75 +1,72 @@
|
|
|
1
|
-
import { jsxs as a, jsx as s, Fragment as
|
|
2
|
-
import e, { createElement as
|
|
1
|
+
import { jsxs as a, jsx as s, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import e, { createElement as q } from "react";
|
|
3
3
|
import o from "./Sidebar.module.scss.mjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { configSidebar as
|
|
7
|
-
const
|
|
8
|
-
(
|
|
9
|
-
var $;
|
|
4
|
+
import A from "./ItemSidebar.mjs";
|
|
5
|
+
import k from "../../config/tailwind/nativeScreen.mjs";
|
|
6
|
+
import { configSidebar as S } from "./Sidebar.config.mjs";
|
|
7
|
+
const D = e.forwardRef(
|
|
8
|
+
($, O) => {
|
|
10
9
|
const {
|
|
11
|
-
as:
|
|
12
|
-
children:
|
|
13
|
-
patch:
|
|
14
|
-
iconCompany:
|
|
15
|
-
iconSubs:
|
|
10
|
+
as: v,
|
|
11
|
+
children: E,
|
|
12
|
+
patch: c = "/",
|
|
13
|
+
iconCompany: r,
|
|
14
|
+
iconSubs: V,
|
|
16
15
|
iconCollapse: u,
|
|
17
|
-
iconCollapseClose:
|
|
18
|
-
modules:
|
|
19
|
-
toleranceWidthIconCompany:
|
|
20
|
-
onClickItems:
|
|
16
|
+
iconCollapseClose: N,
|
|
17
|
+
modules: x,
|
|
18
|
+
toleranceWidthIconCompany: L = 25,
|
|
19
|
+
onClickItems: z,
|
|
21
20
|
variant: m = "payhere-brand-base-white",
|
|
22
21
|
footer: l,
|
|
23
|
-
withInheritance:
|
|
22
|
+
withInheritance: g,
|
|
24
23
|
id: h = "1ru-sidebar",
|
|
25
|
-
styleSidebar:
|
|
26
|
-
styleContent:
|
|
27
|
-
...
|
|
28
|
-
} =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, w = () => {
|
|
36
|
-
A(window.innerWidth);
|
|
24
|
+
styleSidebar: j,
|
|
25
|
+
styleContent: B,
|
|
26
|
+
...M
|
|
27
|
+
} = $, T = e.useRef(null), [n, d] = e.useState(null), [i, f] = e.useState(null), [F, I] = e.useState(""), [R, b] = e.useState(), [W, H] = e.useState(0), y = () => {
|
|
28
|
+
let t = 0;
|
|
29
|
+
document.getElementById("icon-company-sidebar")?.childNodes?.forEach((P) => {
|
|
30
|
+
t += P.getBoundingClientRect().width ?? 0;
|
|
31
|
+
}), b(t + L + "px");
|
|
32
|
+
}, C = () => {
|
|
33
|
+
H(window.innerWidth);
|
|
37
34
|
}, p = () => {
|
|
38
|
-
d(!
|
|
35
|
+
d(!i), i ? b("auto") : setTimeout(() => {
|
|
39
36
|
y();
|
|
40
37
|
}, 100);
|
|
41
38
|
};
|
|
42
39
|
return e.useEffect(() => {
|
|
43
|
-
|
|
40
|
+
W >= (S.mobileSupport.includes(m) ? k.lg : k.md) ? (d(!0), setTimeout(() => {
|
|
44
41
|
y();
|
|
45
42
|
}, 100)) : (d(!1), b("auto"));
|
|
46
|
-
}, [
|
|
47
|
-
typeof
|
|
48
|
-
}, [
|
|
49
|
-
|
|
43
|
+
}, [W]), e.useEffect(() => {
|
|
44
|
+
typeof n == "boolean" && f(n);
|
|
45
|
+
}, [n]), e.useImperativeHandle(
|
|
46
|
+
O,
|
|
50
47
|
() => ({
|
|
51
|
-
openSidebar:
|
|
48
|
+
openSidebar: n,
|
|
52
49
|
setOpenSidebar: d,
|
|
53
50
|
handlerClickCollapse: p
|
|
54
51
|
}),
|
|
55
|
-
[
|
|
56
|
-
), e.useEffect(() => (
|
|
52
|
+
[n, i]
|
|
53
|
+
), e.useEffect(() => (c && c.split("/").length > 1 && I(c + "/"), y(), C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C)), []), /* @__PURE__ */ a("div", { className: S.variants[m], ...M, ref: T, children: [
|
|
57
54
|
/* @__PURE__ */ a(
|
|
58
55
|
"div",
|
|
59
56
|
{
|
|
60
57
|
id: h,
|
|
61
|
-
className: `${o.sidebar} ${typeof
|
|
62
|
-
style:
|
|
58
|
+
className: `${o.sidebar} ${typeof i == "boolean" && i ? o["sidebar-open"] : ""} ${typeof i == "boolean" && !i ? o["sidebar-close"] : ""}`,
|
|
59
|
+
style: j || {},
|
|
63
60
|
children: [
|
|
64
61
|
e.isValidElement(u) && /* @__PURE__ */ a(
|
|
65
62
|
"div",
|
|
66
63
|
{
|
|
67
64
|
className: o["button-collaps-sidebar"],
|
|
68
|
-
id: `${h}-${
|
|
65
|
+
id: `${h}-${n ? "close-collapse" : "open-collapse"}`,
|
|
69
66
|
onClick: p,
|
|
70
67
|
children: [
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
n && u,
|
|
69
|
+
n ? "" : e.isValidElement(N) ? N : u
|
|
73
70
|
]
|
|
74
71
|
}
|
|
75
72
|
),
|
|
@@ -79,11 +76,11 @@ const K = e.forwardRef(
|
|
|
79
76
|
id: "icon-company-sidebar",
|
|
80
77
|
className: o["icon-company-sidebar"],
|
|
81
78
|
style: {
|
|
82
|
-
width:
|
|
79
|
+
width: R && S.withCuctomWidthIconCompany.includes(m) ? R : "100%"
|
|
83
80
|
},
|
|
84
81
|
children: [
|
|
85
|
-
e.isValidElement(
|
|
86
|
-
typeof
|
|
82
|
+
e.isValidElement(r) && r,
|
|
83
|
+
typeof r == "function" && r({ openSidebar: i, setOpenSidebar: d })
|
|
87
84
|
]
|
|
88
85
|
}
|
|
89
86
|
) }),
|
|
@@ -92,45 +89,45 @@ const K = e.forwardRef(
|
|
|
92
89
|
{
|
|
93
90
|
className: o["menu-sidebar"],
|
|
94
91
|
onMouseOver: () => {
|
|
95
|
-
|
|
92
|
+
n || f(!0);
|
|
96
93
|
},
|
|
97
94
|
onMouseOut: () => {
|
|
98
|
-
|
|
95
|
+
n || f(!1);
|
|
99
96
|
},
|
|
100
|
-
children:
|
|
101
|
-
|
|
97
|
+
children: x.map((t) => /* @__PURE__ */ q(
|
|
98
|
+
A,
|
|
102
99
|
{
|
|
103
|
-
...
|
|
104
|
-
as:
|
|
105
|
-
linkComponent:
|
|
106
|
-
key:
|
|
107
|
-
show:
|
|
108
|
-
open:
|
|
109
|
-
patch:
|
|
110
|
-
iconSubs:
|
|
100
|
+
...t,
|
|
101
|
+
as: t.manualRoute || t.subs.length > 0 ? "div" : v,
|
|
102
|
+
linkComponent: v,
|
|
103
|
+
key: t.name,
|
|
104
|
+
show: F,
|
|
105
|
+
open: i,
|
|
106
|
+
patch: c,
|
|
107
|
+
iconSubs: V,
|
|
111
108
|
variant: m,
|
|
112
|
-
setShow:
|
|
113
|
-
onClickItems:
|
|
109
|
+
setShow: I,
|
|
110
|
+
onClickItems: z
|
|
114
111
|
}
|
|
115
112
|
))
|
|
116
113
|
}
|
|
117
114
|
),
|
|
118
|
-
l && /* @__PURE__ */ a("div", { className:
|
|
115
|
+
l && /* @__PURE__ */ a("div", { className: i ? "iru-opacity-[1]" : "iru-opacity-0", children: [
|
|
119
116
|
e.isValidElement(l) && /* @__PURE__ */ s("div", { children: l }),
|
|
120
117
|
typeof l == "function" && /* @__PURE__ */ s("div", { children: l() })
|
|
121
118
|
] })
|
|
122
119
|
]
|
|
123
120
|
}
|
|
124
121
|
),
|
|
125
|
-
|
|
126
|
-
/* @__PURE__ */ a("div", { className: o["content-sidebar"], style:
|
|
127
|
-
|
|
128
|
-
!
|
|
122
|
+
n && /* @__PURE__ */ s("div", { id: `${h}-splace-screen`, className: o["splace-screen"], onClick: p }),
|
|
123
|
+
/* @__PURE__ */ a("div", { className: o["content-sidebar"], style: B || {}, children: [
|
|
124
|
+
g && e.Children?.map(E, (t) => /* @__PURE__ */ s(w, { children: e.isValidElement(t) && /* @__PURE__ */ s(w, { children: e.cloneElement(t, { openSidebar: n, handlerClickCollapse: p }) }) })),
|
|
125
|
+
!g && /* @__PURE__ */ s(w, { children: E })
|
|
129
126
|
] })
|
|
130
127
|
] });
|
|
131
128
|
}
|
|
132
129
|
);
|
|
133
|
-
|
|
130
|
+
D.displayName = "Sidebar";
|
|
134
131
|
export {
|
|
135
|
-
|
|
132
|
+
D as default
|
|
136
133
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),
|
|
2
|
-
${(e.step??
|
|
3
|
-
${(e.step??
|
|
4
|
-
${e.className??""}`,children:
|
|
5
|
-
${(e.step??
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),l=require("./Step.module.scss.cjs"),g=({widthLine:t,color:n})=>s.jsx("svg",{height:"5",xmlns:"http://www.w3.org/2000/svg",className:l.default["content-line-dashed"],width:t+10,style:{right:-(t/2+14)},children:s.jsx("g",{fill:"none",stroke:n,strokeWidth:"10",children:s.jsx("path",{strokeDasharray:"12,4",d:`M0 0 ${t+10} 0`})})}),u=({widthLine:t,color:n})=>s.jsx("hr",{className:l.default["content-line-active"],style:{width:t+22,right:-(t/2+20),borderColor:n}}),$=({activeStep:t,stepList:n,widthLine:r=250,classNameContainer:x,classNameContent:f,classNameDesc:i,onChange:c,afterActiveType:a="solid",beforeActiveType:h="dashed",colorActive:m="#0163c8 ",colorInactive:j="#D6D6D6"})=>s.jsx("div",{className:`${l.default.container} ${x??""}`,children:n.map((e,d)=>{const o=d+1;return s.jsxs("div",{className:`${l.default["content-section"]} ${f??""}`,onClick:()=>{typeof c=="function"&&c(e)},children:[s.jsxs("div",{className:l.default["content-step"],children:[o<n.length&&s.jsxs(s.Fragment,{children:[(e.step??o)>=t&&s.jsxs(s.Fragment,{children:[h==="solid"&&s.jsx(u,{color:j,widthLine:r}),h==="dashed"&&s.jsx(g,{color:j,widthLine:r})]}),(e.step??o)<t&&s.jsxs(s.Fragment,{children:[a==="solid"&&s.jsx(u,{color:m,widthLine:r}),a==="dashed"&&s.jsx(g,{color:m,widthLine:r})]})]}),d!==0&&s.jsx("div",{style:{width:r/2}}),s.jsx("div",{className:`${l.default["number-step"]}
|
|
2
|
+
${(e.step??o)<t?l.default.passed:""}
|
|
3
|
+
${(e.step??o)===t?l.default.active:""}
|
|
4
|
+
${e.className??""}`,children:t>e.step&&e.valueDone?s.jsx(s.Fragment,{children:e.valueDone}):s.jsx(s.Fragment,{children:e.value?e.value:o})}),d+1!==n?.length&&s.jsx("div",{style:{width:r/2}})]}),e.desc&&s.jsx("div",{className:`${l.default["content-description"]} ${i??""}
|
|
5
|
+
${(e.step??o)<=t?l.default.active:""}`,style:{maxWidth:d+1===n?.length||d===0?(r-30)*2:r-30,marginRight:d+1===n?.length?-(r/2):0,marginLeft:d===0?-(r/2):0},children:e.desc})]},d)})});exports.default=$;
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as d, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import t from "./Step.module.scss.mjs";
|
|
3
|
+
const i = ({ widthLine: o, color: c }) => /* @__PURE__ */ s(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
6
6
|
height: "5",
|
|
7
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
-
className:
|
|
9
|
-
width:
|
|
10
|
-
style: { right: -(
|
|
11
|
-
children: /* @__PURE__ */
|
|
8
|
+
className: t["content-line-dashed"],
|
|
9
|
+
width: o + 10,
|
|
10
|
+
style: { right: -(o / 2 + 14) },
|
|
11
|
+
children: /* @__PURE__ */ s("g", { fill: "none", stroke: c, strokeWidth: "10", children: /* @__PURE__ */ s("path", { strokeDasharray: "12,4", d: `M0 0 ${o + 10} 0` }) })
|
|
12
12
|
}
|
|
13
|
-
),
|
|
13
|
+
), N = ({ widthLine: o, color: c }) => /* @__PURE__ */ s(
|
|
14
14
|
"hr",
|
|
15
15
|
{
|
|
16
|
-
className:
|
|
17
|
-
style: { width:
|
|
16
|
+
className: t["content-line-active"],
|
|
17
|
+
style: { width: o + 22, right: -(o / 2 + 20), borderColor: c }
|
|
18
18
|
}
|
|
19
|
-
),
|
|
20
|
-
activeStep:
|
|
21
|
-
stepList:
|
|
22
|
-
widthLine:
|
|
23
|
-
classNameContainer:
|
|
24
|
-
classNameContent:
|
|
25
|
-
classNameDesc:
|
|
26
|
-
onChange:
|
|
27
|
-
afterActiveType:
|
|
28
|
-
beforeActiveType:
|
|
29
|
-
colorActive:
|
|
30
|
-
colorInactive:
|
|
31
|
-
}) => /* @__PURE__ */
|
|
32
|
-
const
|
|
33
|
-
return /* @__PURE__ */
|
|
19
|
+
), j = ({
|
|
20
|
+
activeStep: o,
|
|
21
|
+
stepList: c,
|
|
22
|
+
widthLine: l = 250,
|
|
23
|
+
classNameContainer: D,
|
|
24
|
+
classNameContent: f,
|
|
25
|
+
classNameDesc: y,
|
|
26
|
+
onChange: a,
|
|
27
|
+
afterActiveType: m = "solid",
|
|
28
|
+
beforeActiveType: g = "dashed",
|
|
29
|
+
colorActive: $ = "#0163c8 ",
|
|
30
|
+
colorInactive: p = "#D6D6D6"
|
|
31
|
+
}) => /* @__PURE__ */ s("div", { className: `${t.container} ${D ?? ""}`, children: c.map((r, n) => {
|
|
32
|
+
const e = n + 1;
|
|
33
|
+
return /* @__PURE__ */ d(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
className: `${
|
|
36
|
+
className: `${t["content-section"]} ${f ?? ""}`,
|
|
37
37
|
onClick: () => {
|
|
38
|
-
typeof
|
|
38
|
+
typeof a == "function" && a(r);
|
|
39
39
|
},
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
(
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
/* @__PURE__ */ d("div", { className: t["content-step"], children: [
|
|
42
|
+
e < c.length && /* @__PURE__ */ d(h, { children: [
|
|
43
|
+
(r.step ?? e) >= o && /* @__PURE__ */ d(h, { children: [
|
|
44
|
+
g === "solid" && /* @__PURE__ */ s(N, { color: p, widthLine: l }),
|
|
45
|
+
g === "dashed" && /* @__PURE__ */ s(i, { color: p, widthLine: l })
|
|
46
46
|
] }),
|
|
47
|
-
(
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
(r.step ?? e) < o && /* @__PURE__ */ d(h, { children: [
|
|
48
|
+
m === "solid" && /* @__PURE__ */ s(N, { color: $, widthLine: l }),
|
|
49
|
+
m === "dashed" && /* @__PURE__ */ s(i, { color: $, widthLine: l })
|
|
50
50
|
] })
|
|
51
51
|
] }),
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */
|
|
52
|
+
n !== 0 && /* @__PURE__ */ s("div", { style: { width: l / 2 } }),
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
className: `${
|
|
57
|
-
${(
|
|
58
|
-
${(
|
|
59
|
-
${
|
|
60
|
-
children:
|
|
56
|
+
className: `${t["number-step"]}
|
|
57
|
+
${(r.step ?? e) < o ? t.passed : ""}
|
|
58
|
+
${(r.step ?? e) === o ? t.active : ""}
|
|
59
|
+
${r.className ?? ""}`,
|
|
60
|
+
children: o > r.step && r.valueDone ? /* @__PURE__ */ s(h, { children: r.valueDone }) : /* @__PURE__ */ s(h, { children: r.value ? r.value : e })
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
|
-
|
|
63
|
+
n + 1 !== c?.length && /* @__PURE__ */ s("div", { style: { width: l / 2 } })
|
|
64
64
|
] }),
|
|
65
|
-
|
|
65
|
+
r.desc && /* @__PURE__ */ s(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
|
-
className: `${
|
|
69
|
-
${(
|
|
68
|
+
className: `${t["content-description"]} ${y ?? ""}
|
|
69
|
+
${(r.step ?? e) <= o ? t.active : ""}`,
|
|
70
70
|
style: {
|
|
71
|
-
maxWidth:
|
|
72
|
-
marginRight:
|
|
73
|
-
marginLeft:
|
|
71
|
+
maxWidth: n + 1 === c?.length || n === 0 ? (l - 30) * 2 : l - 30,
|
|
72
|
+
marginRight: n + 1 === c?.length ? -(l / 2) : 0,
|
|
73
|
+
marginLeft: n === 0 ? -(l / 2) : 0
|
|
74
74
|
},
|
|
75
|
-
children:
|
|
75
|
+
children: r.desc
|
|
76
76
|
}
|
|
77
77
|
)
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
|
-
|
|
80
|
+
n
|
|
81
81
|
);
|
|
82
82
|
}) });
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
j as default
|
|
85
85
|
};
|