1mpacto-react-ui 2.0.16 → 2.0.17
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 -0
- package/dist/components/Alert/index.mjs +220 -0
- package/dist/components/Alert/style.module.scss.cjs +1 -0
- package/dist/components/Alert/style.module.scss.mjs +14 -0
- package/dist/components/Badges/Badges.cjs +2 -0
- package/dist/components/Badges/Badges.config.cjs +1 -0
- package/dist/components/Badges/Badges.config.mjs +47 -0
- package/dist/components/Badges/Badges.mjs +29 -0
- package/dist/components/Badges/style.module.scss.cjs +1 -0
- package/dist/components/Badges/style.module.scss.mjs +40 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +3 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.cjs +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.config.mjs +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.mjs +67 -0
- package/dist/components/Breadcrumbs/style.module.scss.cjs +1 -0
- package/dist/components/Breadcrumbs/style.module.scss.mjs +16 -0
- package/dist/components/Button/Button.cjs +12 -0
- package/dist/components/Button/Button.config.cjs +1 -0
- package/dist/components/Button/Button.config.mjs +75 -0
- package/dist/components/Button/Button.mjs +75 -0
- package/dist/components/Button/style.module.scss.cjs +1 -0
- package/dist/components/Button/style.module.scss.mjs +58 -0
- package/dist/components/ButtonIcon/ButtonIcon.cjs +12 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.cjs +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.config.mjs +68 -0
- package/dist/components/ButtonIcon/ButtonIcon.mjs +65 -0
- package/dist/components/ButtonIcon/style.module.scss.cjs +1 -0
- package/dist/components/ButtonIcon/style.module.scss.mjs +51 -0
- package/dist/components/ButtonPopover/ButtonPopover.cjs +1 -0
- package/dist/components/ButtonPopover/ButtonPopover.mjs +84 -0
- package/dist/components/ButtonPopover/style.module.scss.cjs +1 -0
- package/dist/components/ButtonPopover/style.module.scss.mjs +10 -0
- package/dist/components/Calendar/Calendar.cjs +1 -0
- package/dist/components/Calendar/Calendar.mjs +199 -0
- package/dist/components/Calendar/CalendarButton.cjs +1 -0
- package/dist/components/Calendar/CalendarButton.mjs +18 -0
- package/dist/components/Calendar/CalendarCell.cjs +1 -0
- package/dist/components/Calendar/CalendarCell.mjs +26 -0
- package/dist/components/Calendar/CalendarMonth.cjs +1 -0
- package/dist/components/Calendar/CalendarMonth.mjs +74 -0
- package/dist/components/Calendar/CalendarRange.cjs +1 -0
- package/dist/components/Calendar/CalendarRange.mjs +140 -0
- package/dist/components/Calendar/CalendarYear.cjs +3 -0
- package/dist/components/Calendar/CalendarYear.mjs +74 -0
- package/dist/components/Calendar/style.module.scss.cjs +1 -0
- package/dist/components/Calendar/style.module.scss.mjs +36 -0
- package/dist/components/Chart/DoughnutChart.cjs +1 -0
- package/dist/components/Chart/DoughnutChart.mjs +173 -0
- package/dist/components/Chart/GradientBarChart.cjs +1 -0
- package/dist/components/Chart/GradientBarChart.mjs +157 -0
- package/dist/components/Chart/GradientLineChart.cjs +1 -0
- package/dist/components/Chart/GradientLineChart.mjs +143 -0
- package/dist/components/Chart/LineChart.cjs +1 -0
- package/dist/components/Chart/LineChart.mjs +158 -0
- package/dist/components/Chips/Chips.cjs +3 -0
- package/dist/components/Chips/Chips.config.cjs +1 -0
- package/dist/components/Chips/Chips.config.mjs +35 -0
- package/dist/components/Chips/Chips.mjs +37 -0
- package/dist/components/Chips/style.module.scss.cjs +1 -0
- package/dist/components/Chips/style.module.scss.mjs +14 -0
- package/dist/components/Collapse/Collapse.cjs +1 -0
- package/dist/components/Collapse/Collapse.mjs +35 -0
- package/dist/components/Collapse/CollapseV2.cjs +1 -0
- package/dist/components/Collapse/CollapseV2.mjs +30 -0
- package/dist/components/Collapse/style.module.scss.cjs +1 -0
- package/dist/components/Collapse/style.module.scss.mjs +7 -0
- package/dist/components/DatePicker/DatePicker.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.mjs +125 -0
- package/dist/components/DatePicker/DateRangePicker.cjs +1 -0
- package/dist/components/DatePicker/DateRangePicker.mjs +112 -0
- package/dist/components/DatePicker/FilterDate.cjs +1 -0
- package/dist/components/DatePicker/FilterDate.mjs +248 -0
- package/dist/components/DatePicker/MonthYearPicker.cjs +1 -0
- package/dist/components/DatePicker/MonthYearPicker.mjs +83 -0
- package/dist/components/ErrorMessage/ErrorMessage.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.cjs +1 -0
- package/dist/components/ErrorMessage/ErrorMessage.config.mjs +11 -0
- package/dist/components/ErrorMessage/ErrorMessage.mjs +6 -0
- package/dist/components/ErrorMessage/style.module.scss.cjs +1 -0
- package/dist/components/ErrorMessage/style.module.scss.mjs +8 -0
- package/dist/components/FilterContainer/FilterContainer.cjs +1 -0
- package/dist/components/FilterContainer/FilterContainer.mjs +63 -0
- package/dist/components/Input/InputFloatingInner.cjs +5 -0
- package/dist/components/Input/InputFloatingInner.config.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.config.mjs +11 -0
- package/dist/components/Input/InputFloatingInner.mjs +65 -0
- package/dist/components/Input/InputFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Input/InputFloatingInner.module.scss.mjs +20 -0
- package/dist/components/Input/InputInnerLabel.cjs +6 -0
- package/dist/components/Input/InputInnerLabel.config.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.config.mjs +10 -0
- package/dist/components/Input/InputInnerLabel.mjs +78 -0
- package/dist/components/Input/InputInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Input/InputInnerLabel.module.scss.mjs +20 -0
- package/dist/components/Input/InputNative.cjs +5 -0
- package/dist/components/Input/InputNative.config.cjs +1 -0
- package/dist/components/Input/InputNative.config.mjs +11 -0
- package/dist/components/Input/InputNative.mjs +58 -0
- package/dist/components/Input/InputNative.module.scss.cjs +1 -0
- package/dist/components/Input/InputNative.module.scss.mjs +18 -0
- package/dist/components/Input/InputReguler.cjs +5 -0
- package/dist/components/Input/InputReguler.config.cjs +1 -0
- package/dist/components/Input/InputReguler.config.mjs +11 -0
- package/dist/components/Input/InputReguler.mjs +79 -0
- package/dist/components/Input/InputReguler.module.scss.cjs +1 -0
- package/dist/components/Input/InputReguler.module.scss.mjs +24 -0
- package/dist/components/Modal/ModalDialog.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.cjs +1 -0
- package/dist/components/Modal/ModalDialog.config.mjs +12 -0
- package/dist/components/Modal/ModalDialog.mjs +44 -0
- package/dist/components/Modal/style.module.scss.cjs +1 -0
- package/dist/components/Modal/style.module.scss.mjs +14 -0
- package/dist/components/NumberFormat/NumberFormat.cjs +1 -0
- package/dist/components/NumberFormat/NumberFormat.mjs +33 -0
- package/dist/components/Pagination/Pagination.cjs +2 -0
- package/dist/components/Pagination/Pagination.config.cjs +1 -0
- package/dist/components/Pagination/Pagination.config.mjs +25 -0
- package/dist/components/Pagination/Pagination.mjs +231 -0
- package/dist/components/Pagination/style.module.scss.cjs +1 -0
- package/dist/components/Pagination/style.module.scss.mjs +20 -0
- package/dist/components/Popover/Popover.cjs +1 -0
- package/dist/components/Popover/Popover.mjs +78 -0
- package/dist/components/Popover/style.module.scss.cjs +1 -0
- package/dist/components/Popover/style.module.scss.mjs +7 -0
- package/dist/components/PortalComponent/PortalComponent.cjs +1 -0
- package/dist/components/PortalComponent/PortalComponent.mjs +18 -0
- package/dist/components/RadioCheckbox/CheckboxTable.cjs +1 -0
- package/dist/components/RadioCheckbox/CheckboxTable.mjs +27 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.cjs +3 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.config.mjs +31 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.mjs +84 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckbox.module.scss.mjs +26 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.cjs +4 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.config.mjs +20 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.mjs +55 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.cjs +1 -0
- package/dist/components/RadioCheckbox/RadioCheckboxLabel.module.scss.mjs +19 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.config.mjs +27 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.mjs +150 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.cjs +1 -0
- package/dist/components/SelectDropdownContainer/SelectDropdownContainer.module.scss.mjs +10 -0
- package/dist/components/SelectDropdownContainer/styleConfig.cjs +1 -0
- package/dist/components/SelectDropdownContainer/styleConfig.mjs +277 -0
- package/dist/components/Sidebar/ItemSidebar.cjs +8 -0
- package/dist/components/Sidebar/ItemSidebar.config.cjs +1 -0
- package/dist/components/Sidebar/ItemSidebar.config.mjs +42 -0
- package/dist/components/Sidebar/ItemSidebar.mjs +122 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.config.mjs +25 -0
- package/dist/components/Sidebar/Sidebar.mjs +136 -0
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.module.scss.mjs +26 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.cjs +1 -0
- package/dist/components/Sidebar/itemSidebar.module.scss.mjs +31 -0
- package/dist/components/Step/Step.cjs +5 -0
- package/dist/components/Step/Step.mjs +85 -0
- package/dist/components/Step/Step.module.scss.cjs +1 -0
- package/dist/components/Step/Step.module.scss.mjs +17 -0
- package/dist/components/Step/StepIndicator.cjs +4 -0
- package/dist/components/Step/StepIndicator.mjs +65 -0
- package/dist/components/Step/StepIndicator.module.scss.cjs +1 -0
- package/dist/components/Step/StepIndicator.module.scss.mjs +16 -0
- package/dist/components/Switch/Switch.cjs +1 -0
- package/dist/components/Switch/Switch.config.cjs +1 -0
- package/dist/components/Switch/Switch.config.mjs +28 -0
- package/dist/components/Switch/Switch.mjs +53 -0
- package/dist/components/Switch/style.module.scss.cjs +1 -0
- package/dist/components/Switch/style.module.scss.mjs +23 -0
- package/dist/components/TPublish/TPublish.cjs +1 -0
- package/dist/components/TPublish/TPublish.mjs +5 -0
- package/dist/components/Table/Table.cjs +3 -0
- package/dist/components/Table/Table.config.cjs +1 -0
- package/dist/components/Table/Table.config.mjs +69 -0
- package/dist/components/Table/Table.mjs +402 -0
- package/dist/components/Table/Table.module.scss.cjs +1 -0
- package/dist/components/Table/Table.module.scss.mjs +19 -0
- package/dist/components/Table/TableSubMobile.cjs +1 -0
- package/dist/components/Table/TableSubMobile.mjs +37 -0
- package/dist/components/Table/TableSubMobile.module.scss.cjs +1 -0
- package/dist/components/Table/TableSubMobile.module.scss.mjs +6 -0
- package/dist/components/Tabs/TabPanel.cjs +1 -0
- package/dist/components/Tabs/TabPanel.mjs +14 -0
- package/dist/components/Tabs/Tabs.cjs +8 -0
- package/dist/components/Tabs/Tabs.config.cjs +1 -0
- package/dist/components/Tabs/Tabs.config.mjs +33 -0
- package/dist/components/Tabs/Tabs.mjs +112 -0
- package/dist/components/Tabs/style.module.scss.cjs +1 -0
- package/dist/components/Tabs/style.module.scss.mjs +30 -0
- package/dist/components/Text/Text.cjs +5 -0
- package/dist/components/Text/Text.mjs +39 -0
- package/dist/components/TextEditor/TextEditor.cjs +1 -0
- package/dist/components/TextEditor/TextEditor.mjs +9 -0
- package/dist/components/TextEditor/style.module.scss.cjs +1 -0
- package/dist/components/TextEditor/style.module.scss.mjs +7 -0
- package/dist/components/Textarea/Textarea.cjs +7 -0
- package/dist/components/Textarea/Textarea.config.cjs +1 -0
- package/dist/components/Textarea/Textarea.config.mjs +33 -0
- package/dist/components/Textarea/Textarea.mjs +87 -0
- package/dist/components/Textarea/TextareaFloatingInner.cjs +6 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.config.mjs +9 -0
- package/dist/components/Textarea/TextareaFloatingInner.mjs +101 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaFloatingInner.module.scss.mjs +17 -0
- package/dist/components/Textarea/TextareaInnerLabel.cjs +6 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.config.mjs +10 -0
- package/dist/components/Textarea/TextareaInnerLabel.mjs +87 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.cjs +1 -0
- package/dist/components/Textarea/TextareaInnerLabel.module.scss.mjs +17 -0
- package/dist/components/Textarea/style.module.scss.cjs +1 -0
- package/dist/components/Textarea/style.module.scss.mjs +25 -0
- package/dist/components/TimeRange/TimeRange.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.mjs +187 -0
- package/dist/components/TimeRange/TimeRange.module.scss.cjs +1 -0
- package/dist/components/TimeRange/TimeRange.module.scss.mjs +23 -0
- package/dist/components/Timeline/Timeline.cjs +1 -0
- package/dist/components/Timeline/Timeline.mjs +12 -0
- package/dist/components/Timeline/style.module.scss.cjs +1 -0
- package/dist/components/Timeline/style.module.scss.mjs +14 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.mjs +77 -0
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.module.scss.mjs +8 -0
- package/dist/components/TruncateComponent/TruncateComponent.cjs +1 -0
- package/dist/components/TruncateComponent/TruncateComponent.mjs +83 -0
- package/dist/components/Upload/UploadFile.cjs +1 -0
- package/dist/components/Upload/UploadFile.mjs +94 -0
- package/dist/components/Upload/UploadFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadFile.module.scss.mjs +6 -0
- package/dist/components/Upload/UploadImage.cjs +12 -0
- package/dist/components/Upload/UploadImage.mjs +162 -0
- package/dist/components/Upload/UploadImage.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadImage.module.scss.mjs +14 -0
- package/dist/components/Upload/UploadMultipleFile.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.mjs +85 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.cjs +1 -0
- package/dist/components/Upload/UploadMultipleFile.module.scss.mjs +14 -0
- package/dist/components/Virtualization/ListVirtualization.cjs +1 -0
- package/dist/components/Virtualization/ListVirtualization.mjs +82 -0
- package/dist/components/Virtualization/TableVirtualization.cjs +1 -0
- package/dist/components/Virtualization/TableVirtualization.mjs +84 -0
- package/dist/config/bigNumber/index.cjs +1 -0
- package/dist/config/bigNumber/index.mjs +15 -0
- package/dist/config/components/borderRadius.cjs +1 -0
- package/dist/config/components/borderRadius.mjs +14 -0
- package/dist/config/components/font.cjs +1 -0
- package/dist/config/components/font.mjs +8 -0
- package/dist/config/components/gap.cjs +1 -0
- package/dist/config/components/gap.mjs +110 -0
- package/dist/config/components/tinymce.cjs +28 -0
- package/dist/config/components/tinymce.mjs +81 -0
- package/dist/config/components/typography.cjs +1 -0
- package/dist/config/components/typography.mjs +83 -0
- package/dist/config/resources/index.cjs +1 -0
- package/dist/config/resources/index.mjs +4 -0
- package/dist/config/tailwind/colors.cjs +1 -0
- package/dist/config/tailwind/colors.mjs +291 -0
- package/dist/config/tailwind/nativeScreen.cjs +1 -0
- package/dist/config/tailwind/nativeScreen.mjs +11 -0
- package/dist/config/tailwind/screen.cjs +1 -0
- package/dist/config/tailwind/screen.mjs +11 -0
- package/dist/config/tailwind/typography.cjs +1 -0
- package/dist/config/tailwind/typography.mjs +158 -0
- package/dist/hooks/useAsyncDebounce.cjs +1 -0
- package/dist/hooks/useAsyncDebounce.mjs +21 -0
- package/dist/hooks/useCombinedResizeObserver.cjs +1 -0
- package/dist/hooks/useCombinedResizeObserver.mjs +48 -0
- package/dist/hooks/useCountdown.cjs +1 -0
- package/dist/hooks/useCountdown.mjs +38 -0
- package/dist/hooks/useDeepCompareEffect.cjs +1 -0
- package/dist/hooks/useDeepCompareEffect.mjs +14 -0
- package/dist/hooks/useElementOrWindowMediaQuery.cjs +1 -0
- package/dist/hooks/useElementOrWindowMediaQuery.mjs +23 -0
- package/dist/hooks/useEventListener.cjs +1 -0
- package/dist/hooks/useEventListener.mjs +19 -0
- package/dist/hooks/useMasonry.cjs +1 -0
- package/dist/hooks/useMasonry.mjs +53 -0
- package/dist/hooks/useMergeRefs.cjs +1 -0
- package/dist/hooks/useMergeRefs.mjs +29 -0
- package/dist/hooks/useOtpInput.cjs +1 -0
- package/dist/hooks/useOtpInput.mjs +115 -0
- package/dist/hooks/useStateRef.cjs +1 -0
- package/dist/hooks/useStateRef.mjs +10 -0
- package/dist/index.cjs +1 -247
- package/dist/index.mjs +207 -51684
- package/dist/package.json.cjs +1 -0
- package/dist/package.json.d.ts +3 -2
- package/dist/package.json.mjs +7 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.cjs +1 -0
- package/dist/public/assets/icons/arrow-narrow-down.svg.mjs +4 -0
- package/dist/utils/axiosBigNumber.cjs +1 -0
- package/dist/utils/axiosBigNumber.mjs +32 -0
- package/dist/utils/common.cjs +1 -0
- package/dist/utils/common.mjs +264 -0
- package/dist/utils/cookies.cjs +1 -0
- package/dist/utils/cookies.mjs +48 -0
- package/dist/utils/formatBigNumber.cjs +1 -0
- package/dist/utils/formatBigNumber.mjs +39 -0
- package/dist/utils/yup.cjs +1 -0
- package/dist/utils/yup.mjs +78 -0
- package/package.json +3 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { configFont as e } from "../../config/components/font.mjs";
|
|
2
|
+
import { configtypography as a } from "../../config/components/typography.mjs";
|
|
3
|
+
import l from "./style.module.scss.mjs";
|
|
4
|
+
const s = {
|
|
5
|
+
fonts: e,
|
|
6
|
+
size: {
|
|
7
|
+
reguler: {
|
|
8
|
+
style: l["chips-reguler"],
|
|
9
|
+
typography: "laba-subtitle-rb"
|
|
10
|
+
},
|
|
11
|
+
small: {
|
|
12
|
+
style: l["chips-small"],
|
|
13
|
+
typography: "laba-subtitle-sb"
|
|
14
|
+
},
|
|
15
|
+
l: {
|
|
16
|
+
style: l["chips-l"],
|
|
17
|
+
typography: "payhere-label-r"
|
|
18
|
+
},
|
|
19
|
+
s: {
|
|
20
|
+
style: l["chips-s"],
|
|
21
|
+
typography: "payhere-body-esm"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
typography: a,
|
|
25
|
+
variants: {
|
|
26
|
+
"filled-laba-blue-10": l["filled-laba-blue-10"],
|
|
27
|
+
"filled-gray-300": l["filled-gray-300"],
|
|
28
|
+
"filled-blue-gray-100": l["filled-blue-gray-100"],
|
|
29
|
+
"ghost-laba-grey-02": l["ghost-laba-grey-02"],
|
|
30
|
+
"nude-laba-grey-10": l["nude-laba-grey-10"]
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
s as configChips
|
|
35
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as i, Fragment as a, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, isValidElement as n } from "react";
|
|
3
|
+
import { configChips as e } from "./Chips.config.mjs";
|
|
4
|
+
const u = g((p, f) => {
|
|
5
|
+
const {
|
|
6
|
+
className: l,
|
|
7
|
+
children: m,
|
|
8
|
+
fonts: c = "inter",
|
|
9
|
+
size: s = "reguler",
|
|
10
|
+
variants: y = "filled-laba-blue-10",
|
|
11
|
+
icon: o = /* @__PURE__ */ i(a, {}),
|
|
12
|
+
removeIcon: r = /* @__PURE__ */ i(a, {}),
|
|
13
|
+
typography: t,
|
|
14
|
+
...h
|
|
15
|
+
} = p;
|
|
16
|
+
return /* @__PURE__ */ d(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
className: `${e.fonts[c]} ${e.size[s].style}
|
|
20
|
+
${t ? e.typography[t] : e.size[s].typography}
|
|
21
|
+
${e.variants[y]} ${l ?? ""}`,
|
|
22
|
+
ref: f,
|
|
23
|
+
...h,
|
|
24
|
+
children: [
|
|
25
|
+
typeof o == "function" && o(),
|
|
26
|
+
n(o) && o,
|
|
27
|
+
m,
|
|
28
|
+
typeof r == "function" && r(),
|
|
29
|
+
n(r) && r
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
u.displayName = "Chips";
|
|
35
|
+
export {
|
|
36
|
+
u as default
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l={"chips-reguler":"_chips-reguler_s2mpn_1","chips-small":"_chips-small_s2mpn_13","chips-l":"_chips-l_s2mpn_25","chips-s":"_chips-s_s2mpn_13","filled-laba-blue-10":"_filled-laba-blue-10_s2mpn_49","filled-blue-gray-100":"_filled-blue-gray-100_s2mpn_54","filled-gray-300":"_filled-gray-300_s2mpn_59","ghost-laba-grey-02":"_ghost-laba-grey-02_s2mpn_64","nude-laba-grey-10":"_nude-laba-grey-10_s2mpn_70"};exports.default=l;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
"chips-reguler": "_chips-reguler_s2mpn_1",
|
|
3
|
+
"chips-small": "_chips-small_s2mpn_13",
|
|
4
|
+
"chips-l": "_chips-l_s2mpn_25",
|
|
5
|
+
"chips-s": "_chips-s_s2mpn_13",
|
|
6
|
+
"filled-laba-blue-10": "_filled-laba-blue-10_s2mpn_49",
|
|
7
|
+
"filled-blue-gray-100": "_filled-blue-gray-100_s2mpn_54",
|
|
8
|
+
"filled-gray-300": "_filled-gray-300_s2mpn_59",
|
|
9
|
+
"ghost-laba-grey-02": "_ghost-laba-grey-02_s2mpn_64",
|
|
10
|
+
"nude-laba-grey-10": "_nude-laba-grey-10_s2mpn_70"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
l as default
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),o=require("react"),g=require("./style.module.scss.cjs"),w=({children:l,id:s,open:r,className:a,classNameContainer:c,maxCollapsedHeight:u="0px",triggerCalCulateContainer:d,delayTriggerCalculateHeight:h=0})=>{const[m,v]=o.useState("1000vh"),e=()=>{var i;const t=((i=document==null?void 0:document.getElementById(s))==null?void 0:i.offsetHeight)??0;v(t||"1000vh")};return o.useEffect(()=>{const t=setTimeout(e,h);return window==null||window.addEventListener("resize",e),window==null||window.addEventListener("load",e),()=>{clearTimeout(t),window==null||window.removeEventListener("resize",e),window==null||window.removeEventListener("load",e)}},[d]),n.jsx("div",{className:`${g.default.collapse} ${c??""}`,style:{maxHeight:r?m:u},children:n.jsx("div",{id:s,className:a??"",children:l})})};exports.default=w;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import w from "./style.module.scss.mjs";
|
|
4
|
+
const E = ({
|
|
5
|
+
children: r,
|
|
6
|
+
id: o,
|
|
7
|
+
open: a,
|
|
8
|
+
className: l,
|
|
9
|
+
classNameContainer: c,
|
|
10
|
+
maxCollapsedHeight: d = "0px",
|
|
11
|
+
triggerCalCulateContainer: m,
|
|
12
|
+
delayTriggerCalculateHeight: h = 0
|
|
13
|
+
}) => {
|
|
14
|
+
const [u, v] = n.useState("1000vh"), e = () => {
|
|
15
|
+
var s;
|
|
16
|
+
const t = ((s = document == null ? void 0 : document.getElementById(o)) == null ? void 0 : s.offsetHeight) ?? 0;
|
|
17
|
+
v(t || "1000vh");
|
|
18
|
+
};
|
|
19
|
+
return n.useEffect(() => {
|
|
20
|
+
const t = setTimeout(e, h);
|
|
21
|
+
return window == null || window.addEventListener("resize", e), window == null || window.addEventListener("load", e), () => {
|
|
22
|
+
clearTimeout(t), window == null || window.removeEventListener("resize", e), window == null || window.removeEventListener("load", e);
|
|
23
|
+
};
|
|
24
|
+
}, [m]), /* @__PURE__ */ i(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: `${w.collapse} ${c ?? ""}`,
|
|
28
|
+
style: { maxHeight: a ? u : d },
|
|
29
|
+
children: /* @__PURE__ */ i("div", { id: o, className: l ?? "", children: r })
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
E as default
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),h=require("react"),y=require("./style.module.scss.cjs"),d=({children:o,open:r,className:l,id:e,classNameContainer:g,maxCollapsedHeight:t="0px"})=>(h.useLayoutEffect(()=>{const n=document.getElementById(e),s=document.getElementById(`inner-${e}`);if(!n||!s)return;const i=new ResizeObserver(()=>{const c=s.getBoundingClientRect().height;n.style.height=`${c}px`});if(r){const c=s.getBoundingClientRect().height;n.style.height=`${c}px`,i.observe(s)}else n.style.height=typeof t=="number"?`${t}px`:t;return()=>{i.disconnect()}},[r,e,t]),u.jsx("div",{id:e,className:`${y.default.collapse} ${g??""}`,style:{height:r?0:t},children:u.jsx("div",{id:`inner-${e}`,className:l??"",children:o})}));exports.default=d;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import g from "react";
|
|
3
|
+
import f from "./style.module.scss.mjs";
|
|
4
|
+
const $ = ({ children: l, open: s, className: h, id: e, classNameContainer: u, maxCollapsedHeight: t = "0px" }) => (g.useLayoutEffect(() => {
|
|
5
|
+
const n = document.getElementById(e), r = document.getElementById(`inner-${e}`);
|
|
6
|
+
if (!n || !r) return;
|
|
7
|
+
const i = new ResizeObserver(() => {
|
|
8
|
+
const c = r.getBoundingClientRect().height;
|
|
9
|
+
n.style.height = `${c}px`;
|
|
10
|
+
});
|
|
11
|
+
if (s) {
|
|
12
|
+
const c = r.getBoundingClientRect().height;
|
|
13
|
+
n.style.height = `${c}px`, i.observe(r);
|
|
14
|
+
} else
|
|
15
|
+
n.style.height = typeof t == "number" ? `${t}px` : t;
|
|
16
|
+
return () => {
|
|
17
|
+
i.disconnect();
|
|
18
|
+
};
|
|
19
|
+
}, [s, e, t]), /* @__PURE__ */ o(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
id: e,
|
|
23
|
+
className: `${f.collapse} ${u ?? ""}`,
|
|
24
|
+
style: { height: s ? 0 : t },
|
|
25
|
+
children: /* @__PURE__ */ o("div", { id: `inner-${e}`, className: h ?? "", children: l })
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
export {
|
|
29
|
+
$ as default
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_collapse_qzzyu_1",l={collapse:e};exports.collapse=e;exports.default=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),m=require("react"),w=require("@internationalized/date"),Z=require("../Calendar/Calendar.cjs"),p=require("react-aria"),J=require("../Popover/Popover.cjs"),S=l=>{let r;const i=new Date(l??new Date);return l&&(r=w.parseDate(new Date(i.setHours(i.getHours()+7)).toISOString().slice(0,10))),r},K=l=>{const{minDate:r,maxDate:i,value:c,defaultValue:b,withConfirm:H=!1,isCustomTime:D=!1,className:j,classNameButton:I,buttonClick:C,buttonReset:M,buttonSubmit:y,prevIcon:q,nextIcon:R,onChange:d,id:k="date-picker",idPopover:N="date-picker-popover",floatingOptions:O={},offsetPopover:V=5,zIndexPopper:L=1,hiddenHeader:z}=l,g=p.useDateFormatter(),{locale:F}=p.useLocale(),_=S(r),$=S(i),f=m.useRef(null),[h,v]=m.useState(),[a,x]=m.useState(),A=s=>{var T;const o=new Date;let e=s.toDate(w.getLocalTimeZone());e.setHours(o.getHours(),o.getMinutes(),o.getSeconds());const t=r?new Date(r):null,n=i?new Date(i):null;if(D){if(e=new Date(new Date(e).setHours((a==null?void 0:a.hour)??0,a==null?void 0:a.minut,a==null?void 0:a.second)),t&&(t==null?void 0:t.toDateString())===new Date(e).toDateString()&&(t==null?void 0:t.toTimeString())>=(e==null?void 0:e.toTimeString())){if(t&&(t.getHours()>e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()>e.getMinutes()))return;e=new Date(t.setSeconds(t.getSeconds()+1))}if(n&&(n==null?void 0:n.toDateString())===new Date(e).toDateString()&&(n==null?void 0:n.toTimeString())<(e==null?void 0:e.toTimeString())){if(n&&(n.getHours()<e.getHours()||n.getHours()===e.getHours()&&n.getMinutes()<e.getMinutes()))return;e=new Date(n.setSeconds(n.getSeconds()-1))}}else t&&g.format(e)===g.format(t)&&t.getTime()>=e.getTime()?e=new Date(t.setSeconds(t.getSeconds()+1)):n&&g.format(e)===g.format(n)&&n.getTime()<=e.getTime()&&(e=new Date(n.setSeconds(n.getSeconds()-1)));typeof d=="function"&&(d(e),(T=f.current)==null||T.setShow(!1))},P=(s,o)=>{v(s),(o??(!H&&!D))&&A(s)},B=s=>{const{start:o}=s;x(o)},E=s=>{const o=new Date(c??new Date);x({hour:o.getHours(),minut:o.getMinutes(),second:o.getSeconds()}),v(S(c))},G=()=>{h&&P(h,!0)};return u.jsxs(u.Fragment,{children:[u.jsx("div",{id:k,onClick:s=>{var o;(o=f.current)==null||o.handlerShow(s),E()},className:I,children:typeof C=="function"?C(c):c?new Date(c).toDateString():"Pilih Tanggal"}),u.jsx(J.default,{zIndex:L,ref:f,offset:V,id:N,floatingOptions:{placement:"bottom-end",...O},children:u.jsx("div",{className:j??"",children:u.jsx(p.I18nProvider,{locale:"id-ID",children:u.jsx(Z.default,{minValue:_,maxValue:$,minDate:r,maxDate:i,time:{start:a},locale:F,value:h,typeTime:"SINGLE",buttonReset:M,buttonSubmit:y,prevIcon:q,nextIcon:R,createCalendar:w.createCalendar,defaultValue:S(c),onChange:P,handlerReset:()=>{var s;typeof d=="function"&&(d(b),(s=f.current)==null||s.setShow(!1))},handlerSubmit:G,handlerChangeTime:B,withConfirm:H,isCustomTime:D,type:["date","month","year"],hiddenHeader:z})})})})]})};exports.default=K;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { jsxs as A, Fragment as J, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { createCalendar as K, parseDate as Q, getLocalTimeZone as U } from "@internationalized/date";
|
|
4
|
+
import W from "../Calendar/Calendar.mjs";
|
|
5
|
+
import { useDateFormatter as X, useLocale as Y, I18nProvider as _ } from "react-aria";
|
|
6
|
+
import $ from "../Popover/Popover.mjs";
|
|
7
|
+
const m = (l) => {
|
|
8
|
+
let a;
|
|
9
|
+
const i = new Date(l ?? /* @__PURE__ */ new Date());
|
|
10
|
+
return l && (a = Q(new Date(i.setHours(i.getHours() + 7)).toISOString().slice(0, 10))), a;
|
|
11
|
+
}, ae = (l) => {
|
|
12
|
+
const {
|
|
13
|
+
minDate: a,
|
|
14
|
+
maxDate: i,
|
|
15
|
+
value: c,
|
|
16
|
+
defaultValue: P,
|
|
17
|
+
withConfirm: h = !1,
|
|
18
|
+
isCustomTime: D = !1,
|
|
19
|
+
className: T,
|
|
20
|
+
classNameButton: b,
|
|
21
|
+
buttonClick: w,
|
|
22
|
+
buttonReset: y,
|
|
23
|
+
buttonSubmit: M,
|
|
24
|
+
prevIcon: k,
|
|
25
|
+
nextIcon: x,
|
|
26
|
+
onChange: d,
|
|
27
|
+
id: N = "date-picker",
|
|
28
|
+
idPopover: R = "date-picker-popover",
|
|
29
|
+
floatingOptions: V = {},
|
|
30
|
+
offsetPopover: L = 5,
|
|
31
|
+
zIndexPopper: O = 1,
|
|
32
|
+
hiddenHeader: j
|
|
33
|
+
} = l, f = X(), { locale: z } = Y(), F = m(a), B = m(i), g = p.useRef(null), [S, H] = p.useState(), [r, C] = p.useState(), E = (s) => {
|
|
34
|
+
var I;
|
|
35
|
+
const n = /* @__PURE__ */ new Date();
|
|
36
|
+
let e = s.toDate(U());
|
|
37
|
+
e.setHours(n.getHours(), n.getMinutes(), n.getSeconds());
|
|
38
|
+
const t = a ? new Date(a) : null, o = i ? new Date(i) : null;
|
|
39
|
+
if (D) {
|
|
40
|
+
if (e = new Date(new Date(e).setHours((r == null ? void 0 : r.hour) ?? 0, r == null ? void 0 : r.minut, r == null ? void 0 : r.second)), t && (t == null ? void 0 : t.toDateString()) === new Date(e).toDateString() && (t == null ? void 0 : t.toTimeString()) >= (e == null ? void 0 : e.toTimeString())) {
|
|
41
|
+
if (t && (t.getHours() > e.getHours() || t.getHours() === e.getHours() && t.getMinutes() > e.getMinutes()))
|
|
42
|
+
return;
|
|
43
|
+
e = new Date(t.setSeconds(t.getSeconds() + 1));
|
|
44
|
+
}
|
|
45
|
+
if (o && (o == null ? void 0 : o.toDateString()) === new Date(e).toDateString() && (o == null ? void 0 : o.toTimeString()) < (e == null ? void 0 : e.toTimeString())) {
|
|
46
|
+
if (o && (o.getHours() < e.getHours() || o.getHours() === e.getHours() && o.getMinutes() < e.getMinutes()))
|
|
47
|
+
return;
|
|
48
|
+
e = new Date(o.setSeconds(o.getSeconds() - 1));
|
|
49
|
+
}
|
|
50
|
+
} else
|
|
51
|
+
t && f.format(e) === f.format(t) && t.getTime() >= e.getTime() ? e = new Date(t.setSeconds(t.getSeconds() + 1)) : o && f.format(e) === f.format(o) && o.getTime() <= e.getTime() && (e = new Date(o.setSeconds(o.getSeconds() - 1)));
|
|
52
|
+
typeof d == "function" && (d(e), (I = g.current) == null || I.setShow(!1));
|
|
53
|
+
}, v = (s, n) => {
|
|
54
|
+
H(s), (n ?? (!h && !D)) && E(s);
|
|
55
|
+
}, G = (s) => {
|
|
56
|
+
const { start: n } = s;
|
|
57
|
+
C(n);
|
|
58
|
+
}, Z = (s) => {
|
|
59
|
+
const n = new Date(c ?? /* @__PURE__ */ new Date());
|
|
60
|
+
C({
|
|
61
|
+
hour: n.getHours(),
|
|
62
|
+
minut: n.getMinutes(),
|
|
63
|
+
second: n.getSeconds()
|
|
64
|
+
}), H(m(c));
|
|
65
|
+
}, q = () => {
|
|
66
|
+
S && v(S, !0);
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ A(J, { children: [
|
|
69
|
+
/* @__PURE__ */ u(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
id: N,
|
|
73
|
+
onClick: (s) => {
|
|
74
|
+
var n;
|
|
75
|
+
(n = g.current) == null || n.handlerShow(s), Z();
|
|
76
|
+
},
|
|
77
|
+
className: b,
|
|
78
|
+
children: typeof w == "function" ? w(c) : c ? new Date(c).toDateString() : "Pilih Tanggal"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ u(
|
|
82
|
+
$,
|
|
83
|
+
{
|
|
84
|
+
zIndex: O,
|
|
85
|
+
ref: g,
|
|
86
|
+
offset: L,
|
|
87
|
+
id: R,
|
|
88
|
+
floatingOptions: { placement: "bottom-end", ...V },
|
|
89
|
+
children: /* @__PURE__ */ u("div", { className: T ?? "", children: /* @__PURE__ */ u(_, { locale: "id-ID", children: /* @__PURE__ */ u(
|
|
90
|
+
W,
|
|
91
|
+
{
|
|
92
|
+
minValue: F,
|
|
93
|
+
maxValue: B,
|
|
94
|
+
minDate: a,
|
|
95
|
+
maxDate: i,
|
|
96
|
+
time: { start: r },
|
|
97
|
+
locale: z,
|
|
98
|
+
value: S,
|
|
99
|
+
typeTime: "SINGLE",
|
|
100
|
+
buttonReset: y,
|
|
101
|
+
buttonSubmit: M,
|
|
102
|
+
prevIcon: k,
|
|
103
|
+
nextIcon: x,
|
|
104
|
+
createCalendar: K,
|
|
105
|
+
defaultValue: m(c),
|
|
106
|
+
onChange: v,
|
|
107
|
+
handlerReset: () => {
|
|
108
|
+
var s;
|
|
109
|
+
typeof d == "function" && (d(P), (s = g.current) == null || s.setShow(!1));
|
|
110
|
+
},
|
|
111
|
+
handlerSubmit: q,
|
|
112
|
+
handlerChangeTime: G,
|
|
113
|
+
withConfirm: h,
|
|
114
|
+
isCustomTime: D,
|
|
115
|
+
type: ["date", "month", "year"],
|
|
116
|
+
hiddenHeader: j
|
|
117
|
+
}
|
|
118
|
+
) }) })
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] });
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
ae as default
|
|
125
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("react/jsx-runtime"),y=require("react"),Y=require("react-aria"),B=require("../Calendar/CalendarRange.cjs"),n=require("@internationalized/date"),K=require("../Calendar/Calendar.cjs"),H=a=>{let o;const r=new Date(a??new Date);return a&&(o=n.parseDate(new Date(r.setHours(r.getHours()+7)).toISOString().slice(0,10))),o},k=a=>{const o=new Date((a==null?void 0:a.startDate)??new Date),r=new Date((a==null?void 0:a.endDate)??new Date),i=new n.CalendarDate(o.getFullYear(),o.getMonth()+1,o.getDate()),D=new n.CalendarDate(r.getFullYear(),r.getMonth()+1,r.getDate());return a?{start:i,end:D}:void 0},Q=a=>{const{minDate:o,maxDate:r,defaultValue:i,withConfirm:D,prevIcon:M,nextIcon:p,buttonReset:L,buttonSubmit:b,typePicker:j="RANGE",onChange:q,value:c,onReset:E,isCustomTime:w}=a,{locale:_}=Y.useLocale(),I=H(o),N=H(r),[e,C]=y.useState(),[S,T]=y.useState({start:void 0,end:void 0}),Z=t=>{typeof q=="function"&&q(t)},R=(t,s)=>{const d=t.start.toDate(n.getLocalTimeZone()),u=t.end.toDate(n.getLocalTimeZone());C(t),T({start:{hour:0,minut:0,second:0},end:{hour:23,minut:59,second:59}}),(s??!D)&&Z({startDate:d,endDate:new Date(u.setHours(23,59,59))})},x=(t,s)=>{var d,u,g,m,l,f,G,P;if(e!=null&&e.start&&(e!=null&&e.end)&&(T(t),(u=(d=t.start)==null?void 0:d.hour)!=null&&u.toString()&&((m=(g=t.start)==null?void 0:g.minut)!=null&&m.toString())&&((f=(l=t.end)==null?void 0:l.hour)!=null&&f.toString())&&((P=(G=t.end)==null?void 0:G.minut)!=null&&P.toString())&&(s??!D))){const J=e.start.toDate(n.getLocalTimeZone()),z=e.end.toDate(n.getLocalTimeZone()),O=new Date(J.setHours(t.start.hour,t.start.minut)),V=new Date(z.setHours(t.end.hour,t.end.minut,59));O.getTime()<V.getTime()&&Z({startDate:O,endDate:V})}},A=t=>{if(typeof E=="function")E();else if(i&&t){const s=new Date(i.endDate??new Date),d=t.focusedDate.set({month:s.getMonth()+1,year:s.getFullYear()});t.setFocusedDate(d)}C(k(i))},F=()=>{e&&(w?x(S,!0):R(e,!0))};return y.useEffect(()=>{if(c!=null&&c.endDate&&(c!=null&&c.startDate)){const t=new Date(c.startDate),s=new Date(c.endDate),d=t.getHours(),u=t.getMinutes(),g=s.getHours(),m=s.getMinutes(),l=n.toCalendarDate(n.fromDate(t,n.getLocalTimeZone())),f=n.toCalendarDate(n.fromDate(s,n.getLocalTimeZone()));C({start:l,end:f}),T({start:{hour:d,minut:u},end:{hour:g,minut:m}})}},[JSON.stringify(c)]),h.jsx("div",{className:"iru-flex iru-flex-col",children:h.jsxs(Y.I18nProvider,{locale:"id-ID",children:[j==="RANGE"&&h.jsx(B.default,{defaultValue:k(i),value:e,minValue:I,maxValue:N,withConfirm:D,prevIcon:M,nextIcon:p,buttonReset:L,buttonSubmit:b,onChange:t=>R(t),isCustomTime:w,handlerReset:A,handlerSubmit:F,time:S,minDate:o,maxDate:r,handlerChangeTimeRange:x}),j==="SINGLE"&&h.jsx(K.default,{defaultValue:H(i==null?void 0:i.endDate),value:e==null?void 0:e.end,minValue:I,maxValue:N,minDate:o,maxDate:r,withConfirm:D,prevIcon:M,nextIcon:p,buttonReset:L,buttonSubmit:b,locale:_,time:S,typeTime:"RANGE",handlerChangeTime:x,isCustomTime:w,createCalendar:n.createCalendar,onChange:t=>R({start:t,end:t}),handlerReset:A,handlerSubmit:F,type:["date","month","year"]})]})})};exports.default=Q;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
2
|
+
import O, { useEffect as W } from "react";
|
|
3
|
+
import { useLocale as X, I18nProvider as _ } from "react-aria";
|
|
4
|
+
import $ from "../Calendar/CalendarRange.mjs";
|
|
5
|
+
import { toCalendarDate as J, fromDate as Z, getLocalTimeZone as m, createCalendar as v, parseDate as tt, CalendarDate as q } from "@internationalized/date";
|
|
6
|
+
import et from "../Calendar/Calendar.mjs";
|
|
7
|
+
const x = (n) => {
|
|
8
|
+
let o;
|
|
9
|
+
const a = new Date(n ?? /* @__PURE__ */ new Date());
|
|
10
|
+
return n && (o = tt(new Date(a.setHours(a.getHours() + 7)).toISOString().slice(0, 10))), o;
|
|
11
|
+
}, z = (n) => {
|
|
12
|
+
const o = new Date((n == null ? void 0 : n.startDate) ?? /* @__PURE__ */ new Date()), a = new Date((n == null ? void 0 : n.endDate) ?? /* @__PURE__ */ new Date()), s = new q(o.getFullYear(), o.getMonth() + 1, o.getDate()), D = new q(a.getFullYear(), a.getMonth() + 1, a.getDate());
|
|
13
|
+
return n ? { start: s, end: D } : void 0;
|
|
14
|
+
}, ct = (n) => {
|
|
15
|
+
const {
|
|
16
|
+
minDate: o,
|
|
17
|
+
maxDate: a,
|
|
18
|
+
defaultValue: s,
|
|
19
|
+
withConfirm: D,
|
|
20
|
+
prevIcon: y,
|
|
21
|
+
nextIcon: T,
|
|
22
|
+
buttonReset: M,
|
|
23
|
+
buttonSubmit: E,
|
|
24
|
+
typePicker: I = "RANGE",
|
|
25
|
+
onChange: N,
|
|
26
|
+
value: i,
|
|
27
|
+
onReset: b,
|
|
28
|
+
isCustomTime: w
|
|
29
|
+
} = n, { locale: B } = X(), F = x(o), G = x(a), [e, l] = O.useState(), [p, C] = O.useState({ start: void 0, end: void 0 }), A = (t) => {
|
|
30
|
+
typeof N == "function" && N(t);
|
|
31
|
+
}, S = (t, r) => {
|
|
32
|
+
const c = t.start.toDate(m()), d = t.end.toDate(m());
|
|
33
|
+
l(t), C({ start: { hour: 0, minut: 0, second: 0 }, end: { hour: 23, minut: 59, second: 59 } }), (r ?? !D) && A({ startDate: c, endDate: new Date(d.setHours(23, 59, 59)) });
|
|
34
|
+
}, R = (t, r) => {
|
|
35
|
+
var c, d, u, f, g, h, V, Y;
|
|
36
|
+
if (e != null && e.start && (e != null && e.end) && (C(t), (d = (c = t.start) == null ? void 0 : c.hour) != null && d.toString() && ((f = (u = t.start) == null ? void 0 : u.minut) != null && f.toString()) && ((h = (g = t.end) == null ? void 0 : g.hour) != null && h.toString()) && ((Y = (V = t.end) == null ? void 0 : V.minut) != null && Y.toString()) && (r ?? !D))) {
|
|
37
|
+
const K = e.start.toDate(m()), Q = e.end.toDate(m()), j = new Date(K.setHours(t.start.hour, t.start.minut)), k = new Date(Q.setHours(t.end.hour, t.end.minut, 59));
|
|
38
|
+
j.getTime() < k.getTime() && A({ startDate: j, endDate: k });
|
|
39
|
+
}
|
|
40
|
+
}, L = (t) => {
|
|
41
|
+
if (typeof b == "function")
|
|
42
|
+
b();
|
|
43
|
+
else if (s && t) {
|
|
44
|
+
const r = new Date(s.endDate ?? /* @__PURE__ */ new Date()), c = t.focusedDate.set({
|
|
45
|
+
month: r.getMonth() + 1,
|
|
46
|
+
year: r.getFullYear()
|
|
47
|
+
});
|
|
48
|
+
t.setFocusedDate(c);
|
|
49
|
+
}
|
|
50
|
+
l(z(s));
|
|
51
|
+
}, P = () => {
|
|
52
|
+
e && (w ? R(p, !0) : S(e, !0));
|
|
53
|
+
};
|
|
54
|
+
return W(() => {
|
|
55
|
+
if (i != null && i.endDate && (i != null && i.startDate)) {
|
|
56
|
+
const t = new Date(i.startDate), r = new Date(i.endDate), c = t.getHours(), d = t.getMinutes(), u = r.getHours(), f = r.getMinutes(), g = J(Z(t, m())), h = J(Z(r, m()));
|
|
57
|
+
l({ start: g, end: h }), C({ start: { hour: c, minut: d }, end: { hour: u, minut: f } });
|
|
58
|
+
}
|
|
59
|
+
}, [JSON.stringify(i)]), /* @__PURE__ */ H("div", { className: "iru-flex iru-flex-col", children: /* @__PURE__ */ U(_, { locale: "id-ID", children: [
|
|
60
|
+
I === "RANGE" && /* @__PURE__ */ H(
|
|
61
|
+
$,
|
|
62
|
+
{
|
|
63
|
+
defaultValue: z(s),
|
|
64
|
+
value: e,
|
|
65
|
+
minValue: F,
|
|
66
|
+
maxValue: G,
|
|
67
|
+
withConfirm: D,
|
|
68
|
+
prevIcon: y,
|
|
69
|
+
nextIcon: T,
|
|
70
|
+
buttonReset: M,
|
|
71
|
+
buttonSubmit: E,
|
|
72
|
+
onChange: (t) => S(t),
|
|
73
|
+
isCustomTime: w,
|
|
74
|
+
handlerReset: L,
|
|
75
|
+
handlerSubmit: P,
|
|
76
|
+
time: p,
|
|
77
|
+
minDate: o,
|
|
78
|
+
maxDate: a,
|
|
79
|
+
handlerChangeTimeRange: R
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
I === "SINGLE" && /* @__PURE__ */ H(
|
|
83
|
+
et,
|
|
84
|
+
{
|
|
85
|
+
defaultValue: x(s == null ? void 0 : s.endDate),
|
|
86
|
+
value: e == null ? void 0 : e.end,
|
|
87
|
+
minValue: F,
|
|
88
|
+
maxValue: G,
|
|
89
|
+
minDate: o,
|
|
90
|
+
maxDate: a,
|
|
91
|
+
withConfirm: D,
|
|
92
|
+
prevIcon: y,
|
|
93
|
+
nextIcon: T,
|
|
94
|
+
buttonReset: M,
|
|
95
|
+
buttonSubmit: E,
|
|
96
|
+
locale: B,
|
|
97
|
+
time: p,
|
|
98
|
+
typeTime: "RANGE",
|
|
99
|
+
handlerChangeTime: R,
|
|
100
|
+
isCustomTime: w,
|
|
101
|
+
createCalendar: v,
|
|
102
|
+
onChange: (t) => S({ start: t, end: t }),
|
|
103
|
+
handlerReset: L,
|
|
104
|
+
handlerSubmit: P,
|
|
105
|
+
type: ["date", "month", "year"]
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] }) });
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
ct as default
|
|
112
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),r=require("react"),Q=require("./DateRangePicker.cjs"),U=require("../Popover/Popover.cjs"),m=require("../Calendar/style.module.scss.cjs"),k=require("../../utils/common.cjs"),X=require("../Button/Button.cjs"),Z=({value:o,prevIcon:T,nextIcon:K,buttonReset:g,buttonSubmit:q,className:H,classNameButton:N,buttonClick:c,buttonList:w,typePicker:R="RANGE",onChange:Y,idPopover:W="filter-date-popover",id:P="filter-date",floatingOptions:B={},offsetPopover:E=5,zIndexPopper:O=0,defaultValueLabel:l,isCustomTime:$=!1,mountedExecuteChange:_=!0,formatingDate:D})=>{const S=[{key:"thisDay",value:"Hari ini"},{key:"thisWeek",value:"Minggu ini"},{key:"thisMonth",value:"Bulan ini"},{key:"thisYear",value:"Tahun ini"},{key:"yesterday",value:"Kemarin"},{key:"lastWeek",value:"Minggu lalu"},{key:"lastMonth",value:"Bulan lalu"},{key:"lastYear",value:"Tahun lalu"},{key:"custom",value:"Kustom"}],b=r.useRef(null),[n,M]=r.useState(),[z,i]=r.useState(),[x,p]=r.useState(),d=(e,t)=>{const a=new Date(e??new Date);return t==="start"?new Date(a.setHours(0,0,0)):new Date(a.setHours(23,59,59))},V=()=>{const e=new Date;return{startDate:e,endDate:e}},v=()=>{const e=new Date;e.setDate(e.getDate()-e.getDay());const t=new Date;return t.setDate(t.getDate()+(6-t.getDay())),{startDate:e,endDate:t}},A=()=>{const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1),a=new Date(e.getFullYear(),e.getMonth()+1,0);return{startDate:t,endDate:a}},G=()=>{const e=new Date(new Date().getFullYear(),0,1),t=new Date(new Date().getFullYear(),11,31);return{startDate:e,endDate:t}},I=()=>{const e=new Date(new Date().setDate(new Date().getDate()-1));return{startDate:e,endDate:e}},J=()=>{const e=new Date;e.setDate(e.getDate()-(7+e.getDay()));const t=new Date;return t.setDate(t.getDate()-(t.getDay()+1)),{startDate:e,endDate:t}},C=()=>{const e=new Date,t=new Date(e.getFullYear(),e.getMonth()-1,1),a=new Date(e.getFullYear(),e.getMonth(),0);return{startDate:t,endDate:a}},L=()=>{const e=new Date(new Date().getFullYear()-1,0,1),t=new Date(new Date().getFullYear()-1,11,31);return{startDate:e,endDate:t}},u=(e,t,a)=>{var h;if(p(e),typeof Y=="function"){let j=e;D==="string"&&e?j={startDate:k.formatDate(e.startDate,D),endDate:k.formatDate(e.endDate,D)}:typeof D=="boolean"&&e&&(j={startDate:k.formatDate(e.startDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),endDate:k.formatDate(e.endDate,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")}),(h=b.current)==null||h.setShow(!1),Y(j,t??"",a)}},f=(e,t)=>{M(e);let a;if((e==null?void 0:e.key)!=="custom"){switch(i(e),e==null?void 0:e.key){case"thisDay":a=V();break;case"thisWeek":a=v();break;case"thisMonth":a=A();break;case"thisYear":a=G();break;case"yesterday":a=I();break;case"lastWeek":a=J();break;case"lastMonth":a=C();break;case"lastYear":a=L();break}a&&t&&u({startDate:d(a.startDate,"start"),endDate:d(a.endDate,"end")},e==null?void 0:e.value,e)}},y=(e,t)=>{const a=(w??S).find(h=>h.key===e);!e&&!a?(t&&u(),f(void 0,t),i(void 0)):typeof e=="object"?(t&&u({startDate:d(e.startDate,"start"),endDate:d(e.endDate,"end")},"Kustom",{key:"custom",value:"Kustom"}),f({key:"custom",value:"Kustom"},t),i({key:"custom",value:"Kustom"})):(f(a,t),i(a))},F=()=>{var e;if(o){p(o);const t=(e=w??S)==null?void 0:e.find(a=>a.key===o.label||a.value===o.label);Object.keys(t||{}).length>0&&M(t)}else M(void 0),i(void 0)};return r.useEffect(()=>{F()},[JSON.stringify(o)]),r.useEffect(()=>{y(l??o,_)},[]),s.jsxs(s.Fragment,{children:[s.jsxs("div",{onClick:e=>{var t;(t=b.current)==null||t.handlerShow(e),F()},className:N,id:P,children:[r.isValidElement(c)&&c,typeof c=="function"?c(x,z):"Pilih Filter"]}),s.jsx(U.default,{zIndex:O,ref:b,offset:E,id:W,floatingOptions:{placement:"bottom-end",...B},children:s.jsxs("div",{className:`${m.default["container-filter-date"]} ${H}`,children:[s.jsxs("div",{children:[(w??S).map((e,t)=>s.jsx("div",{className:`${m.default["button-filter-date"]} hover:iru-bg-laba-blue-01 ${(n==null?void 0:n.key)===e.key?"iru-text-laba-blue-10":""}`,onClick:()=>f(e,!0),children:e.value},t)),(n==null?void 0:n.key)!=="custom"&&s.jsx(s.Fragment,{children:typeof g=="function"?s.jsx("div",{className:m.default["button-filter-date-custome"],onClick:()=>y(l,!0),children:g()}):s.jsx(X.default,{className:m.default["button-reset-filter-date"],variants:"nude-laba-blue-10",size:"small",onClick:()=>y(l,!0),children:"Reset"})})]}),(n==null?void 0:n.key)==="custom"&&s.jsx("div",{children:s.jsx(Q.default,{defaultValue:x,value:x,prevIcon:T,nextIcon:K,buttonReset:g,buttonSubmit:q,isCustomTime:$,onChange:e=>{u(e,"Kustom",{key:"custom",value:"Kustom"}),i({key:"custom",value:"Kustom"})},onReset:()=>{y(l,!0)},typePicker:R,withConfirm:!0})})]})})]})};exports.default=Z;
|