1mpacto-react-ui 2.0.19 → 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 -0
- package/dist/hooks/useDebounce.mjs +27 -0
- package/dist/hooks/useOtpInput.cjs +1 -1
- package/dist/hooks/useOtpInput.mjs +47 -51
- package/dist/hooks/usePacked.cjs +1 -0
- package/dist/hooks/usePacked.mjs +56 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +52 -48
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.d.ts +5 -4
- package/dist/package.json.mjs +1 -1
- package/dist/src/hooks/index.d.ts +4 -2
- package/dist/src/hooks/useDebounce.d.ts +61 -0
- package/dist/src/hooks/usePacked.d.ts +84 -0
- package/dist/utils/common.cjs +1 -1
- package/dist/utils/common.mjs +172 -173
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react-toastify"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react-toastify"),r=require("./style.module.scss.cjs"),c=(o,d,s)=>{const i=s?.variant??"outline",t={position:"top-center",autoClose:2e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0},n={icon:{solid:{success:e.jsx(C,{}),warning:e.jsx(w,{}),error:e.jsx(h,{}),info:e.jsx(x,{})},outline:{success:e.jsx(a,{}),warning:e.jsx(j,{}),error:e.jsx(u,{}),info:e.jsx(f,{})}},variant:{solid:{success:r.default["alert-success-filled"],error:r.default["alert-error-filled"],warning:r.default["alert-warning-filled"],info:r.default["alert-info-filled"]},outline:{success:r.default["alert-success-outlined"],error:r.default["alert-error-outlined"],warning:r.default["alert-warning-outlined"],info:r.default["alert-info-outlined"]}}};return d==="error"?l.toast.error(e.jsxs("div",{children:[["solid"].includes(i)&&e.jsx("p",{className:r.default["text-header"],children:"Error"}),o]}),{icon:n.icon[i].error,className:n.variant[i].error,...t,...s}):d==="info"?l.toast.info(e.jsxs("div",{children:[["solid"].includes(i)&&e.jsx("p",{className:r.default["text-header"],children:"Info"}),o]}),{icon:n.icon[i].info,className:n.variant[i].info,...t,...s}):d==="warning"?l.toast.warning(e.jsxs("div",{children:[["solid"].includes(i)&&e.jsx("p",{className:r.default["text-header"],children:"Warning"}),o]}),{icon:n.icon[i].warning,className:n.variant[i].warning,...t,...s}):l.toast(e.jsxs("div",{children:[["solid"].includes(i)&&e.jsx("p",{className:r.default["text-header"],children:"Success"}),o]}),{icon:n.icon[i].success,className:n.variant[i].success,...t,...s})},a=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:e.jsx("g",{id:"check-circle",children:e.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M10 18.5C12.1217 18.5 14.1566 17.6571 15.6569 16.1569C17.1571 14.6566 18 12.6217 18 10.5C18 8.37827 17.1571 6.34344 15.6569 4.84315C14.1566 3.34285 12.1217 2.5 10 2.5C7.87827 2.5 5.84344 3.34285 4.34315 4.84315C2.84285 6.34344 2 8.37827 2 10.5C2 12.6217 2.84285 14.6566 4.34315 16.1569C5.84344 17.6571 7.87827 18.5 10 18.5ZM13.707 9.207C13.8892 9.0184 13.99 8.7658 13.9877 8.5036C13.9854 8.2414 13.8802 7.99059 13.6948 7.80518C13.5094 7.61977 13.2586 7.5146 12.9964 7.51233C12.7342 7.51005 12.4816 7.61084 12.293 7.793L9 11.086L7.707 9.793C7.5184 9.61084 7.2658 9.51005 7.0036 9.51233C6.7414 9.5146 6.49059 9.61977 6.30518 9.80518C6.11977 9.99059 6.0146 10.2414 6.01233 10.5036C6.01005 10.7658 6.11084 11.0184 6.293 11.207L8.293 13.207C8.48053 13.3945 8.73484 13.4998 9 13.4998C9.26516 13.4998 9.51947 13.3945 9.707 13.207L13.707 9.207Z",fill:"#388E3C"})})}),C=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:e.jsxs("g",{id:"circle",children:[e.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{id:"Vector_2",d:"M9 12L11 14L15 10",stroke:"#038C67",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),u=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:e.jsx("g",{id:"exclamation-circle",children:e.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 14.5C11 14.7652 10.8946 15.0196 10.7071 15.2071C10.5196 15.3946 10.2652 15.5 10 15.5C9.73478 15.5 9.48043 15.3946 9.29289 15.2071C9.10536 15.0196 9 14.7652 9 14.5C9 14.2348 9.10536 13.9804 9.29289 13.7929C9.48043 13.6054 9.73478 13.5 10 13.5C10.2652 13.5 10.5196 13.6054 10.7071 13.7929C10.8946 13.9804 11 14.2348 11 14.5ZM10 5.5C9.73478 5.5 9.48043 5.60536 9.29289 5.79289C9.10536 5.98043 9 6.23478 9 6.5V10.5C9 10.7652 9.10536 11.0196 9.29289 11.2071C9.48043 11.3946 9.73478 11.5 10 11.5C10.2652 11.5 10.5196 11.3946 10.7071 11.2071C10.8946 11.0196 11 10.7652 11 10.5V6.5C11 6.23478 10.8946 5.98043 10.7071 5.79289C10.5196 5.60536 10.2652 5.5 10 5.5Z",fill:"#F44336"})})}),x=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:e.jsxs("g",{id:"alert",children:[e.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#006DFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),h=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:e.jsxs("g",{id:"alert",children:[e.jsx("path",{id:"Vector",d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{id:"Vector_2",d:"M12 8V12",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{id:"Vector_3",d:"M12 16H12.01",stroke:"#ED0019",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),j=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:e.jsx("g",{id:"exclamation",children:e.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M8.25697 3.59898C9.02197 2.23898 10.979 2.23898 11.743 3.59898L17.323 13.519C18.073 14.853 17.11 16.499 15.581 16.499H4.41997C2.88997 16.499 1.92697 14.853 2.67697 13.519L8.25697 3.59898ZM11 13.5C11 13.7652 10.8946 14.0196 10.7071 14.2071C10.5195 14.3946 10.2652 14.5 9.99997 14.5C9.73475 14.5 9.4804 14.3946 9.29286 14.2071C9.10533 14.0196 8.99997 13.7652 8.99997 13.5C8.99997 13.2348 9.10533 12.9804 9.29286 12.7929C9.4804 12.6053 9.73475 12.5 9.99997 12.5C10.2652 12.5 10.5195 12.6053 10.7071 12.7929C10.8946 12.9804 11 13.2348 11 13.5ZM9.99997 5.49998C9.73475 5.49998 9.4804 5.60534 9.29286 5.79287C9.10533 5.98041 8.99997 6.23476 8.99997 6.49998V9.49998C8.99997 9.7652 9.10533 10.0195 9.29286 10.2071C9.4804 10.3946 9.73475 10.5 9.99997 10.5C10.2652 10.5 10.5195 10.3946 10.7071 10.2071C10.8946 10.0195 11 9.7652 11 9.49998V6.49998C11 6.23476 10.8946 5.98041 10.7071 5.79287C10.5195 5.60534 10.2652 5.49998 9.99997 5.49998Z",fill:"#F9A825"})})}),w=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-6 iru-w-6",children:e.jsxs("g",{id:"alert",children:[e.jsx("path",{id:"Vector",d:"M12 15V15.01M12 9V11V9Z",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{id:"Vector_2",d:"M5 19H19C19.3263 18.9977 19.6471 18.9156 19.9344 18.7609C20.2217 18.6061 20.4667 18.3835 20.6482 18.1123C20.8297 17.841 20.942 17.5296 20.9754 17.205C21.0089 16.8804 20.9624 16.5525 20.84 16.25L13.74 4.00002C13.567 3.68741 13.3135 3.42685 13.0058 3.2454C12.698 3.06396 12.3473 2.96826 11.99 2.96826C11.6327 2.96826 11.282 3.06396 10.9742 3.2454C10.6665 3.42685 10.413 3.68741 10.24 4.00002L3.14 16.25C3.01994 16.5456 2.97233 16.8656 3.00115 17.1833C3.02997 17.501 3.13437 17.8073 3.30565 18.0764C3.47693 18.3456 3.71011 18.5698 3.98573 18.7305C4.26134 18.8912 4.57139 18.9836 4.89 19",stroke:"#FF7200",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),f=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"iru-h-5 iru-w-5",children:e.jsx("g",{id:"information-circle",children:e.jsx("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M18 10.5C18 12.6217 17.1571 14.6566 15.6569 16.1569C14.1566 17.6571 12.1217 18.5 10 18.5C7.87827 18.5 5.84344 17.6571 4.34315 16.1569C2.84285 14.6566 2 12.6217 2 10.5C2 8.37827 2.84285 6.34344 4.34315 4.84315C5.84344 3.34285 7.87827 2.5 10 2.5C12.1217 2.5 14.1566 3.34285 15.6569 4.84315C17.1571 6.34344 18 8.37827 18 10.5ZM11 6.5C11 6.76522 10.8946 7.01957 10.7071 7.20711C10.5196 7.39464 10.2652 7.5 10 7.5C9.73478 7.5 9.48043 7.39464 9.29289 7.20711C9.10536 7.01957 9 6.76522 9 6.5C9 6.23478 9.10536 5.98043 9.29289 5.79289C9.48043 5.60536 9.73478 5.5 10 5.5C10.2652 5.5 10.5196 5.60536 10.7071 5.79289C10.8946 5.98043 11 6.23478 11 6.5ZM9 9.5C8.73478 9.5 8.48043 9.60536 8.29289 9.79289C8.10536 9.98043 8 10.2348 8 10.5C8 10.7652 8.10536 11.0196 8.29289 11.2071C8.48043 11.3946 8.73478 11.5 9 11.5V14.5C9 14.7652 9.10536 15.0196 9.29289 15.2071C9.48043 15.3946 9.73478 15.5 10 15.5H11C11.2652 15.5 11.5196 15.3946 11.7071 15.2071C11.8946 15.0196 12 14.7652 12 14.5C12 14.2348 11.8946 13.9804 11.7071 13.7929C11.5196 13.6054 11.2652 13.5 11 13.5V10.5C11 10.2348 10.8946 9.98043 10.7071 9.79289C10.5196 9.60536 10.2652 9.5 10 9.5H9Z",fill:"#0288D1"})})});exports.openAlert=c;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { toast as
|
|
3
|
-
import
|
|
4
|
-
const x = (
|
|
5
|
-
const
|
|
2
|
+
import { toast as d } from "react-toastify";
|
|
3
|
+
import r from "./style.module.scss.mjs";
|
|
4
|
+
const x = (l, c, t) => {
|
|
5
|
+
const i = t?.variant ?? "outline", s = {
|
|
6
6
|
position: "top-center",
|
|
7
7
|
autoClose: 2e3,
|
|
8
8
|
hideProgressBar: !0,
|
|
@@ -26,62 +26,62 @@ const x = (t, c, l) => {
|
|
|
26
26
|
},
|
|
27
27
|
variant: {
|
|
28
28
|
solid: {
|
|
29
|
-
success:
|
|
30
|
-
error:
|
|
31
|
-
warning:
|
|
32
|
-
info:
|
|
29
|
+
success: r["alert-success-filled"],
|
|
30
|
+
error: r["alert-error-filled"],
|
|
31
|
+
warning: r["alert-warning-filled"],
|
|
32
|
+
info: r["alert-info-filled"]
|
|
33
33
|
},
|
|
34
34
|
outline: {
|
|
35
|
-
success:
|
|
36
|
-
error:
|
|
37
|
-
warning:
|
|
38
|
-
info:
|
|
35
|
+
success: r["alert-success-outlined"],
|
|
36
|
+
error: r["alert-error-outlined"],
|
|
37
|
+
warning: r["alert-warning-outlined"],
|
|
38
|
+
info: r["alert-info-outlined"]
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return c === "error" ?
|
|
42
|
+
return c === "error" ? d.error(
|
|
43
43
|
/* @__PURE__ */ o("div", { children: [
|
|
44
|
-
["solid"].includes(
|
|
45
|
-
|
|
44
|
+
["solid"].includes(i) && /* @__PURE__ */ e("p", { className: r["text-header"], children: "Error" }),
|
|
45
|
+
l
|
|
46
46
|
] }),
|
|
47
47
|
{
|
|
48
|
-
icon: n.icon[
|
|
49
|
-
className: n.variant[
|
|
50
|
-
...
|
|
51
|
-
...
|
|
48
|
+
icon: n.icon[i].error,
|
|
49
|
+
className: n.variant[i].error,
|
|
50
|
+
...s,
|
|
51
|
+
...t
|
|
52
52
|
}
|
|
53
|
-
) : c === "info" ?
|
|
53
|
+
) : c === "info" ? d.info(
|
|
54
54
|
/* @__PURE__ */ o("div", { children: [
|
|
55
|
-
["solid"].includes(
|
|
56
|
-
|
|
55
|
+
["solid"].includes(i) && /* @__PURE__ */ e("p", { className: r["text-header"], children: "Info" }),
|
|
56
|
+
l
|
|
57
57
|
] }),
|
|
58
58
|
{
|
|
59
|
-
icon: n.icon[
|
|
60
|
-
className: n.variant[
|
|
61
|
-
...
|
|
62
|
-
...
|
|
59
|
+
icon: n.icon[i].info,
|
|
60
|
+
className: n.variant[i].info,
|
|
61
|
+
...s,
|
|
62
|
+
...t
|
|
63
63
|
}
|
|
64
|
-
) : c === "warning" ?
|
|
64
|
+
) : c === "warning" ? d.warning(
|
|
65
65
|
/* @__PURE__ */ o("div", { children: [
|
|
66
|
-
["solid"].includes(
|
|
67
|
-
|
|
66
|
+
["solid"].includes(i) && /* @__PURE__ */ e("p", { className: r["text-header"], children: "Warning" }),
|
|
67
|
+
l
|
|
68
68
|
] }),
|
|
69
69
|
{
|
|
70
|
-
icon: n.icon[
|
|
71
|
-
className: n.variant[
|
|
72
|
-
...
|
|
73
|
-
...
|
|
70
|
+
icon: n.icon[i].warning,
|
|
71
|
+
className: n.variant[i].warning,
|
|
72
|
+
...s,
|
|
73
|
+
...t
|
|
74
74
|
}
|
|
75
|
-
) :
|
|
75
|
+
) : d(
|
|
76
76
|
/* @__PURE__ */ o("div", { children: [
|
|
77
|
-
["solid"].includes(
|
|
78
|
-
|
|
77
|
+
["solid"].includes(i) && /* @__PURE__ */ e("p", { className: r["text-header"], children: "Success" }),
|
|
78
|
+
l
|
|
79
79
|
] }),
|
|
80
80
|
{
|
|
81
|
-
icon: n.icon[
|
|
82
|
-
className: n.variant[
|
|
83
|
-
...
|
|
84
|
-
...
|
|
81
|
+
icon: n.icon[i].success,
|
|
82
|
+
className: n.variant[i].success,
|
|
83
|
+
...s,
|
|
84
|
+
...t
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
87
|
}, C = () => /* @__PURE__ */ e("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "iru-h-5 iru-w-5", children: /* @__PURE__ */ e("g", { id: "check-circle", children: /* @__PURE__ */ e(
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
${
|
|
3
|
-
${n?
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),F=require("react"),s=require("./style.module.scss.cjs"),c=require("./Breadcrumbs.config.cjs"),M=({as:g,variants:$="laba-blue-10",fonts:b="lato",urls:r=[],textBreadcrumbs:h=[],onClickBreadcrumbs:u=[],gapAction:n,gapUrls:i,className:j,textAction:v="Kembali",iconAction:y,onClickAction:l,onClickUrls:o,separator:q=">",propsLink:f,classNameAction:B,classNameUrl:N,renderAction:d,..._})=>{const p=g??"div",m=a=>!!(Array.isArray(r)&&r.length>0&&r.length-1===a);return t.jsxs("div",{className:`${c.configBreadcrumbs.fonts[b]} ${c.configBreadcrumbs.variants[$]}
|
|
2
|
+
${j??""}`,..._,children:[l&&t.jsxs("div",{onClick:l,className:`${s.default.action} ${B??""}
|
|
3
|
+
${n?c.configBreadcrumbs.gapAction[n]:""}`,children:[y,v]}),typeof d=="function"&&d(),t.jsx("div",{className:`${s.default.urls} ${i?c.configBreadcrumbs.gapUrls[i]:""}`,children:r?.map((a,e)=>t.jsxs(F.Fragment,{children:[t.jsx(p,{className:`${s.default.url} ${m(e)?s.default.active:""} ${N??""}`,onClick:()=>{u?.[e]!==void 0&&typeof u[e]=="function"?u[e]():typeof o=="function"&&o(a)},...f?f(a,e,r):{},children:h[e]}),!m(e)&&t.jsx(t.Fragment,{children:q})]},e))})]})};exports.default=M;
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import
|
|
4
|
-
import { configBreadcrumbs as
|
|
5
|
-
const
|
|
6
|
-
as:
|
|
7
|
-
variants:
|
|
8
|
-
fonts:
|
|
1
|
+
import { jsxs as m, jsx as s, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as w } from "react";
|
|
3
|
+
import e from "./style.module.scss.mjs";
|
|
4
|
+
import { configBreadcrumbs as o } from "./Breadcrumbs.config.mjs";
|
|
5
|
+
const E = ({
|
|
6
|
+
as: p,
|
|
7
|
+
variants: u = "laba-blue-10",
|
|
8
|
+
fonts: v = "lato",
|
|
9
9
|
urls: a = [],
|
|
10
|
-
textBreadcrumbs:
|
|
11
|
-
onClickBreadcrumbs:
|
|
12
|
-
gapAction:
|
|
13
|
-
gapUrls:
|
|
14
|
-
className:
|
|
15
|
-
textAction:
|
|
16
|
-
iconAction:
|
|
17
|
-
onClickAction:
|
|
18
|
-
onClickUrls:
|
|
19
|
-
separator:
|
|
20
|
-
propsLink:
|
|
21
|
-
classNameAction:
|
|
22
|
-
classNameUrl:
|
|
23
|
-
renderAction:
|
|
24
|
-
...
|
|
10
|
+
textBreadcrumbs: y = [],
|
|
11
|
+
onClickBreadcrumbs: f = [],
|
|
12
|
+
gapAction: c,
|
|
13
|
+
gapUrls: i,
|
|
14
|
+
className: d,
|
|
15
|
+
textAction: N = "Kembali",
|
|
16
|
+
iconAction: b,
|
|
17
|
+
onClickAction: n,
|
|
18
|
+
onClickUrls: l,
|
|
19
|
+
separator: F = ">",
|
|
20
|
+
propsLink: $,
|
|
21
|
+
classNameAction: j,
|
|
22
|
+
classNameUrl: K,
|
|
23
|
+
renderAction: g,
|
|
24
|
+
...P
|
|
25
25
|
}) => {
|
|
26
|
-
const
|
|
26
|
+
const T = p ?? "div", h = (r) => !!(Array.isArray(a) && a.length > 0 && a.length - 1 === r);
|
|
27
27
|
return /* @__PURE__ */ m(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
|
-
className: `${
|
|
31
|
-
${
|
|
32
|
-
...
|
|
30
|
+
className: `${o.fonts[v]} ${o.variants[u]}
|
|
31
|
+
${d ?? ""}`,
|
|
32
|
+
...P,
|
|
33
33
|
children: [
|
|
34
|
-
|
|
34
|
+
n && /* @__PURE__ */ m(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
|
-
onClick:
|
|
38
|
-
className: `${
|
|
39
|
-
${
|
|
37
|
+
onClick: n,
|
|
38
|
+
className: `${e.action} ${j ?? ""}
|
|
39
|
+
${c ? o.gapAction[c] : ""}`,
|
|
40
40
|
children: [
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
b,
|
|
42
|
+
N
|
|
43
43
|
]
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
typeof
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
46
|
+
typeof g == "function" && g(),
|
|
47
|
+
/* @__PURE__ */ s("div", { className: `${e.urls} ${i ? o.gapUrls[i] : ""}`, children: a?.map((r, t) => /* @__PURE__ */ m(w, { children: [
|
|
48
|
+
/* @__PURE__ */ s(
|
|
49
|
+
T,
|
|
50
50
|
{
|
|
51
|
-
className: `${
|
|
51
|
+
className: `${e.url} ${h(t) ? e.active : ""} ${K ?? ""}`,
|
|
52
52
|
onClick: () => {
|
|
53
|
-
|
|
53
|
+
f?.[t] !== void 0 && typeof f[t] == "function" ? f[t]() : typeof l == "function" && l(r);
|
|
54
54
|
},
|
|
55
|
-
|
|
56
|
-
children:
|
|
55
|
+
...$ ? $(r, t, a) : {},
|
|
56
|
+
children: y[t]
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
|
-
!
|
|
59
|
+
!h(t) && /* @__PURE__ */ s(q, { children: F })
|
|
60
60
|
] }, t)) })
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
};
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
E as default
|
|
67
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),t=require("react"),F=require("../Popover/Popover.cjs"),M=require("../Button/Button.cjs"),c=require("./style.module.scss.cjs"),m=t.forwardRef((v,w)=>{const{children:S,id:I="1ru-button-popover",text:x="",startIcon:P,endIcon:j,startIconShow:N,endIconShow:R,classNameButton:g="",classNameButtonShow:$="",className:q="",placement:y="top-end",popoverProps:B,zIndexPopover:b=1,offset:C=5,idPopover:_="1ru-popover-button-popover",onClick:u,onClose:i,...k}=v,s=t.useRef(null),z=t.useRef(null),[n,r]=t.useState(!1),d=(e,p,h)=>{let a=o.jsx(o.Fragment,{});return e&&t.isValidElement(p)?a=p:t.isValidElement(h)&&(a=o.jsx("div",{className:`${c.default.icon} ${e?c.default.show:""}`,children:h})),a},E=e=>{s.current?.setShow(e),r(e)},f=e=>{s.current?.handlerShow(e),r(!0)},l=()=>{r(!1),s.current?.setShow(!1),typeof i=="function"&&i()};return t.useImperativeHandle(w,()=>({show:n,setShow:E,handlerClose:l,handlerShow:f}),[n]),o.jsxs(o.Fragment,{children:[o.jsx(M.default,{ref:z,id:I,className:`${g} ${n?$:""}`,onClick:e=>{n?l():typeof u=="function"?u(e):f(e)},startIcon:d(n,N,P),endIcon:d(n,R,j),...k,children:x}),o.jsx(F.default,{ref:s,id:_,offset:C,floatingOptions:{placement:y},zIndex:b,onClose:l,className:`${c.default["container-popover"]} ${q}`,...B,children:S})]})});m.displayName="ButtonPopover";exports.default=m;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as F, Fragment as h, jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as F, Fragment as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
3
|
import H from "../Popover/Popover.mjs";
|
|
4
4
|
import O from "../Button/Button.mjs";
|
|
5
|
-
import
|
|
6
|
-
const q =
|
|
5
|
+
import c from "./style.module.scss.mjs";
|
|
6
|
+
const q = o.forwardRef((w, v) => {
|
|
7
7
|
const {
|
|
8
8
|
children: I,
|
|
9
9
|
id: S = "1ru-button-popover",
|
|
@@ -20,58 +20,55 @@ const q = t.forwardRef((w, v) => {
|
|
|
20
20
|
zIndexPopover: j = 1,
|
|
21
21
|
offset: k = 5,
|
|
22
22
|
idPopover: z = "1ru-popover-button-popover",
|
|
23
|
-
onClick:
|
|
24
|
-
onClose:
|
|
23
|
+
onClick: p,
|
|
24
|
+
onClose: i,
|
|
25
25
|
...E
|
|
26
|
-
} = w,
|
|
27
|
-
let
|
|
28
|
-
return e &&
|
|
26
|
+
} = w, n = o.useRef(null), V = o.useRef(null), [t, s] = o.useState(!1), f = (e, u, m) => {
|
|
27
|
+
let a = /* @__PURE__ */ r(h, {});
|
|
28
|
+
return e && o.isValidElement(u) ? a = u : o.isValidElement(m) && (a = /* @__PURE__ */ r("div", { className: `${c.icon} ${e ? c.show : ""}`, children: m })), a;
|
|
29
29
|
}, D = (e) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
(
|
|
35
|
-
}, a = () => {
|
|
36
|
-
var e;
|
|
37
|
-
l(!1), (e = r.current) == null || e.setShow(!1), typeof f == "function" && f();
|
|
30
|
+
n.current?.setShow(e), s(e);
|
|
31
|
+
}, d = (e) => {
|
|
32
|
+
n.current?.handlerShow(e), s(!0);
|
|
33
|
+
}, l = () => {
|
|
34
|
+
s(!1), n.current?.setShow(!1), typeof i == "function" && i();
|
|
38
35
|
};
|
|
39
|
-
return
|
|
36
|
+
return o.useImperativeHandle(
|
|
40
37
|
v,
|
|
41
38
|
() => ({
|
|
42
|
-
show:
|
|
39
|
+
show: t,
|
|
43
40
|
setShow: D,
|
|
44
|
-
handlerClose:
|
|
45
|
-
handlerShow:
|
|
41
|
+
handlerClose: l,
|
|
42
|
+
handlerShow: d
|
|
46
43
|
}),
|
|
47
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
48
|
-
[
|
|
45
|
+
[t]
|
|
49
46
|
), /* @__PURE__ */ F(h, { children: [
|
|
50
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ r(
|
|
51
48
|
O,
|
|
52
49
|
{
|
|
53
50
|
ref: V,
|
|
54
51
|
id: S,
|
|
55
|
-
className: `${B} ${
|
|
52
|
+
className: `${B} ${t ? y : ""}`,
|
|
56
53
|
onClick: (e) => {
|
|
57
|
-
|
|
54
|
+
t ? l() : typeof p == "function" ? p(e) : d(e);
|
|
58
55
|
},
|
|
59
|
-
startIcon:
|
|
60
|
-
endIcon:
|
|
56
|
+
startIcon: f(t, R, P),
|
|
57
|
+
endIcon: f(t, $, x),
|
|
61
58
|
...E,
|
|
62
59
|
children: N
|
|
63
60
|
}
|
|
64
61
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ r(
|
|
66
63
|
H,
|
|
67
64
|
{
|
|
68
|
-
ref:
|
|
65
|
+
ref: n,
|
|
69
66
|
id: z,
|
|
70
67
|
offset: k,
|
|
71
68
|
floatingOptions: { placement: g },
|
|
72
69
|
zIndex: j,
|
|
73
|
-
onClose:
|
|
74
|
-
className: `${
|
|
70
|
+
onClose: l,
|
|
71
|
+
className: `${c["container-popover"]} ${C}`,
|
|
75
72
|
...b,
|
|
76
73
|
children: I
|
|
77
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),x=require("react"),D=require("@internationalized/date"),k=require("react-aria"),B=require("react-stately"),i=require("./style.module.scss.cjs"),M=require("../Button/Button.cjs"),V=require("./CalendarCell.cjs"),w=require("./CalendarButton.cjs"),L=require("./CalendarMonth.cjs"),N=require("./CalendarYear.cjs"),Y=require("../../hooks/useDeepCompareEffect.cjs"),J=e=>{const g=D.getWeeksInMonth(e.state.visibleRange.start,e.locale),{gridProps:n,headerProps:l,weekDays:C}=k.useCalendarGrid({},e.state),{prevButtonProps:h,nextButtonProps:f,title:r}=k.useCalendar(e,e.state),u=c=>{let s="";switch(c){case 0:s="Min";break;case 1:s="Sen";break;case 2:s="Sel";break;case 3:s="Rab";break;case 4:s="Kam";break;case 5:s="Jum";break;case 6:s="Sab";break}return s};return t.jsxs("div",{children:[!e.hiddenHeader&&t.jsxs("div",{className:i.default["header-calendar"],children:[t.jsx(w.default,{...h,children:typeof e?.prevIcon=="function"||x.isValidElement(e?.prevIcon)?x.isValidElement(e.prevIcon)?e.prevIcon:e.prevIcon():t.jsx(N.ChevronDownIcon,{className:"iru-rotate-90"})}),t.jsx("div",{className:i.default["header-button-calendar"],onClick:()=>e.setActiveTypeCalendar("month"),children:r}),t.jsx(w.default,{...f,children:typeof e?.nextIcon=="function"||x.isValidElement(e?.nextIcon)?x.isValidElement(e.nextIcon)?e.nextIcon:e.nextIcon():t.jsx(N.ChevronDownIcon,{className:"-iru-rotate-90"})})]}),t.jsxs("table",{...n,children:[t.jsx("thead",{...l,children:t.jsx("tr",{children:C.map((c,s)=>t.jsx("th",{className:i.default["days-calendar"],children:u(s)},s))})}),t.jsx("tbody",{children:[...new Array(g).keys()].map(c=>t.jsx("tr",{children:e.state.getDatesInWeek(c).map((s,j)=>s?t.jsx(V.default,{state:e.state,date:s},j):t.jsx("td",{},j))},c))})]})]})},q=({minDate:e,maxDate:g,value:n,time:l,hiddenHeader:C,handlerChangeTime:h,timeLabel:f,type:r})=>{const u=e?new Date(e):null,c=g?new Date(g):null,s=u?.getHours(),j=c?.getHours(),o=u?.getMinutes(),T=c?.getMinutes(),[E,R]=x.useState(!0),S=(a,m,d)=>Array.from({length:(m-a)/d+1},(y,v)=>a+v*d),I=(a,m)=>{typeof h=="function"&&h({hour:a,minut:m,second:l?.second})},H=()=>{const a=document.getElementById(`calendar-hour-${l?.hour}-${r}`),m=document.getElementById(`calendar-minut-${l?.minut}-${r}`),d=document.getElementById(`wrapper-calendar-hour-${r}`),y=document.getElementById(`wrapper-calendar-minut-${r}`);a&&d&&d.scrollTo({behavior:"instant",top:a.offsetTop-78}),m&&y&&y.scrollTo({behavior:"instant",top:m.offsetTop-78})},b=(a,m)=>{let d=!0;if(u&&n){const y=n.year===u.getFullYear(),v=n.month===u.getMonth()+1;n.day===u.getDate()&&v&&y?(m==="hour"&&a<(s??0)||m==="minut"&&(l?.hour??0)<=u.getHours()&&a<(o??0))&&(d=!1):n.toDate(D.getLocalTimeZone()).getTime()<u.getTime()&&(d=!1)}if(c&&n){const y=n.year===c.getFullYear(),v=n.month===c.getMonth()+1;n.day===c.getDate()&&v&&y?(m==="hour"&&a>(j??0)||m==="minut"&&(l?.hour??0)>=c.getHours()&&a>(T??0))&&(d=!1):n.toDate(D.getLocalTimeZone()).getTime()>c.getTime()&&(d=!1)}return d};return x.useEffect(()=>{E&&H(),l&&R(!1)},[JSON.stringify(n),JSON.stringify(l)]),t.jsxs("div",{className:i.default["custom-time-calendar"],children:[!C&&t.jsx("div",{className:i.default["header-time"],children:f||"Atur Waktu"}),t.jsxs("div",{className:i.default["type-time"],children:[t.jsx("div",{children:"Jam"}),t.jsx("div",{children:"Menit"})]}),t.jsxs("div",{className:"iru-flex iru-justify-around",children:[t.jsx("div",{id:`wrapper-calendar-hour-${r}`,className:i.default["container-cell-time"],children:S(0,23,1).map(a=>t.jsx("div",{id:`calendar-hour-${a}-${r}`,className:`${i.default["cell-time"]} ${l?.hour===a?b(a,"hour")?i.default.selected:i.default.error:""} ${b(a,"hour")&&l?.hour!=a?i.default.valid:i.default.invalid}`,onClick:()=>{b(a,"hour")&&I(a,l?.minut)},children:a<10?`0${a}`:a},a))}),t.jsx("div",{id:`wrapper-calendar-minut-${r}`,className:i.default["container-cell-time"],children:S(0,59,1).map(a=>t.jsx("div",{id:`calendar-minut-${a}-${r}`,className:`${i.default["cell-time"]} ${l?.minut===a?b(a,"minut")?i.default.selected:i.default.error:""} ${b(a,"minut")&&l?.minut!=a?i.default.valid:i.default.invalid}`,onClick:()=>{b(a,"minut")&&I(l?.hour,a)},children:a<10?`0${a}`:a},a))})]})]})},P=e=>{const g=e.typeTime??"SINGLE",n=B.useCalendarState({...e,locale:e.locale,createCalendar:D.createCalendar}),{title:l}=k.useCalendar(e,n),[C,h]=x.useState(e?.activeType??"date"),[f,r]=x.useState({start:void 0,end:void 0}),u=f.start?.hour?.toString()&&f?.start?.minut?.toString()&&e.value?.toDate(D.getLocalTimeZone()).setHours(f.start?.hour,f.start?.minut)||e.minDate,c=e.maxDate,s=(o,T)=>{const E={...f,[T]:o};r(E),typeof e?.handlerChangeTime=="function"&&e.handlerChangeTime(E)},j=o=>{n.setValue(o)};return Y.useDeepCompareEffect(()=>{e?.activeType&&h(e.activeType)},[e?.activeType]),x.useEffect(()=>{if(e.time?.start&&e.time?.end){const o=e.time.start,T=e.time.end;r({start:o,end:T})}},[JSON.stringify(e.time)]),t.jsxs("div",{className:"iru-text-laba-base-sr",children:[C==="date"&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:i.default["container-calendar"],children:[t.jsxs("div",{className:"iru-flex iru-gap-2",children:[t.jsx(J,{state:n,setActiveTypeCalendar:h,...e}),e?.isCustomTime&&t.jsxs("div",{className:"iru-flex",children:[t.jsx(q,{minDate:e.minDate,maxDate:e.maxDate,time:e.time?.start,value:e.value,timeLabel:g==="RANGE"?"Awal":"Atur Waktu",type:"start",handlerChangeTime:o=>s(o,"start")}),g==="RANGE"&&t.jsx(q,{minDate:u,maxDate:c,time:e.time?.end,value:e.value,timeLabel:"Akhir",type:"end",handlerChangeTime:o=>s(o,"end")})]})]}),(e?.withConfirm??e?.isCustomTime)&&t.jsxs("div",{className:`${i.default["footer-calendar"]}`,children:[typeof e?.buttonReset=="function"?t.jsx("div",{onClick:()=>e.handlerReset(n),children:e.buttonReset()}):t.jsx(M.default,{variants:"nude-laba-blue-10",size:"small",onClick:()=>e.handlerReset(n),children:"Reset"}),typeof e?.buttonSubmit=="function"?t.jsx("div",{onClick:e.handlerSubmit,children:e.buttonSubmit()}):t.jsx(M.default,{size:"small",onClick:e.handlerSubmit,children:"Terapkan"})]})]})}),C==="month"&&t.jsx(L.default,{state:n,setActiveTypeCalendar:h,type:e.type,onChangeMonth:j,hiddenHeader:e.hiddenHeader}),C==="year"&&t.jsx(N.default,{state:n,type:e.type,setActiveTypeCalendar:h,title:l,onChangeYear:j,hiddenHeader:e.hiddenHeader})]})};exports.CustomTimeCalendar=q;exports.default=P;
|