1mpacto-react-ui 2.0.16 → 2.0.18
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/src/components/Chart/PieChart.d.ts +3 -0
- package/dist/src/components/Chart/PieChart.stories.d.ts +147 -0
- package/dist/src/interfaces/components/Chart/index.d.ts +203 -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,87 @@
|
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { useIsomorphicLayoutEffect as z } from "../../hooks/useCombinedResizeObserver.mjs";
|
|
4
|
+
import { useMergeRefs as B } from "../../hooks/useMergeRefs.mjs";
|
|
5
|
+
import a from "./TextareaInnerLabel.module.scss.mjs";
|
|
6
|
+
import { configTextareaInnerLabel as S } from "./TextareaInnerLabel.config.mjs";
|
|
7
|
+
const p = m.forwardRef((r, x) => {
|
|
8
|
+
const {
|
|
9
|
+
isRequired: $,
|
|
10
|
+
classNameContainer: y,
|
|
11
|
+
className: N,
|
|
12
|
+
classNameLabel: L,
|
|
13
|
+
classNameLabelError: R,
|
|
14
|
+
name: u,
|
|
15
|
+
id: d,
|
|
16
|
+
label: f,
|
|
17
|
+
error: l,
|
|
18
|
+
height: I,
|
|
19
|
+
minHeight: h = 94,
|
|
20
|
+
maxHeight: v = 150,
|
|
21
|
+
style: E,
|
|
22
|
+
sizeInput: T = "large",
|
|
23
|
+
...s
|
|
24
|
+
} = r, n = m.useRef(null), w = B(n, x), F = { ...E ?? {}, maxHeight: v, height: I ?? h, minHeight: h }, [b, g] = m.useState(!1), H = function(e) {
|
|
25
|
+
var t;
|
|
26
|
+
g(!0), (t = r.onFocus) == null || t.call(r, e);
|
|
27
|
+
}, j = function(e) {
|
|
28
|
+
var t;
|
|
29
|
+
g(!1), (t = r.onBlur) == null || t.call(r, e);
|
|
30
|
+
}, i = function(e) {
|
|
31
|
+
const t = (e == null ? void 0 : e.target) ?? n.current;
|
|
32
|
+
t.style.height = "0px", t.style.height = t.scrollHeight + "px";
|
|
33
|
+
};
|
|
34
|
+
return z(() => (b && n.current ? n.current.addEventListener("input", i) : i(), () => {
|
|
35
|
+
var e;
|
|
36
|
+
(e = n.current) == null || e.removeEventListener("input", i);
|
|
37
|
+
}), [b]), /* @__PURE__ */ c(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: `${a.container}
|
|
41
|
+
${S.size[T]}
|
|
42
|
+
${y ?? ""}`,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ c("div", { className: `${a["container-textarea"]}`, children: [
|
|
45
|
+
/* @__PURE__ */ o(
|
|
46
|
+
"textarea",
|
|
47
|
+
{
|
|
48
|
+
id: d ?? u,
|
|
49
|
+
className: ` ${l ? a.error : ""}
|
|
50
|
+
${a.textarea}
|
|
51
|
+
${N ?? ""}`,
|
|
52
|
+
ref: w,
|
|
53
|
+
style: F,
|
|
54
|
+
...s,
|
|
55
|
+
onFocus: H,
|
|
56
|
+
onBlur: j
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
f && /* @__PURE__ */ c(
|
|
60
|
+
"label",
|
|
61
|
+
{
|
|
62
|
+
htmlFor: d ?? u,
|
|
63
|
+
className: `${a.label} ${s.disabled ? a.disabled : ""} ${L ?? ""}`,
|
|
64
|
+
children: [
|
|
65
|
+
f,
|
|
66
|
+
" ",
|
|
67
|
+
$ && /* @__PURE__ */ o("span", { children: "*" })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] }),
|
|
72
|
+
l && /* @__PURE__ */ o(
|
|
73
|
+
"label",
|
|
74
|
+
{
|
|
75
|
+
className: `${a["label-error"]}
|
|
76
|
+
${s.disabled ? a.disabled : ""} ${R ?? ""}`,
|
|
77
|
+
children: l
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
});
|
|
84
|
+
p.displayName = "TextareaInnerLabel";
|
|
85
|
+
export {
|
|
86
|
+
p as default
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_container_1p1m0_1",r="_textarea_1p1m0_12",a="_label_1p1m0_39",t="_error_1p1m0_59",_={container:e,"size-large":"_size-large_1p1m0_1","container-textarea":"_container-textarea_1p1m0_6",textarea:r,label:a,error:t,"label-error":"_label-error_1p1m0_82","size-small":"_size-small_1p1m0_93"};exports.container=e;exports.default=_;exports.error=t;exports.label=a;exports.textarea=r;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const e = "_container_1p1m0_1", r = "_textarea_1p1m0_12", a = "_label_1p1m0_39", _ = "_error_1p1m0_59", t = {
|
|
2
|
+
container: e,
|
|
3
|
+
"size-large": "_size-large_1p1m0_1",
|
|
4
|
+
"container-textarea": "_container-textarea_1p1m0_6",
|
|
5
|
+
textarea: r,
|
|
6
|
+
label: a,
|
|
7
|
+
error: _,
|
|
8
|
+
"label-error": "_label-error_1p1m0_82",
|
|
9
|
+
"size-small": "_size-small_1p1m0_93"
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
e as container,
|
|
13
|
+
t as default,
|
|
14
|
+
_ as error,
|
|
15
|
+
a as label,
|
|
16
|
+
r as textarea
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_container_1708w_1",a="_label_1708w_6",_="_disabled_1708w_17",l="_textarea_1708w_26",r="_error_1708w_75",t={container:e,"size-medium":"_size-medium_1708w_1",label:a,disabled:_,"container-textarea":"_container-textarea_1708w_20",textarea:l,error:r,"label-error":"_label-error_1708w_85","size-medium-border-bottom":"_size-medium-border-bottom_1708w_99","size-m":"_size-m_1708w_1","solid-blue-300":"_solid-blue-300_1708w_295","dashed-blue-300":"_dashed-blue-300_1708w_310","solid-laba-blue-10":"_solid-laba-blue-10_1708w_322","dashed-laba-blue-10":"_dashed-laba-blue-10_1708w_337","border-bottom-laba-blue-08":"_border-bottom-laba-blue-08_1708w_349"};exports.container=e;exports.default=t;exports.disabled=_;exports.error=r;exports.label=a;exports.textarea=l;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const e = "_container_1708w_1", _ = "_label_1708w_6", a = "_disabled_1708w_17", l = "_textarea_1708w_26", r = "_error_1708w_75", o = {
|
|
2
|
+
container: e,
|
|
3
|
+
"size-medium": "_size-medium_1708w_1",
|
|
4
|
+
label: _,
|
|
5
|
+
disabled: a,
|
|
6
|
+
"container-textarea": "_container-textarea_1708w_20",
|
|
7
|
+
textarea: l,
|
|
8
|
+
error: r,
|
|
9
|
+
"label-error": "_label-error_1708w_85",
|
|
10
|
+
"size-medium-border-bottom": "_size-medium-border-bottom_1708w_99",
|
|
11
|
+
"size-m": "_size-m_1708w_1",
|
|
12
|
+
"solid-blue-300": "_solid-blue-300_1708w_295",
|
|
13
|
+
"dashed-blue-300": "_dashed-blue-300_1708w_310",
|
|
14
|
+
"solid-laba-blue-10": "_solid-laba-blue-10_1708w_322",
|
|
15
|
+
"dashed-laba-blue-10": "_dashed-laba-blue-10_1708w_337",
|
|
16
|
+
"border-bottom-laba-blue-08": "_border-bottom-laba-blue-08_1708w_349"
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
e as container,
|
|
20
|
+
o as default,
|
|
21
|
+
a as disabled,
|
|
22
|
+
r as error,
|
|
23
|
+
_ as label,
|
|
24
|
+
l as textarea
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),C=require("react"),A=require("../Popover/Popover.cjs"),i=require("./TimeRange.module.scss.cjs"),H=require("../Button/Button.cjs"),$=(t,o=2)=>String(t).padStart(o,"0"),M=(t,o)=>t[0][0]&&t[0][1]&&t[1][0]&&t[1][1]?`${t[0][0]}:${t[0][1]} - ${t[1][0]}:${t[1][1]}`:f[o]["Select Time"],f={"en-US":{to:"to",Hour:"Hour",Minute:"Minute","Select Time":"Select Time",Reset:"Reset",Apply:"Apply"},"id-ID":{to:"to",Hour:"Jam",Minute:"Menit","Select Time":"Pilih Waktu",Reset:"Reset",Apply:"Terapkan"},"zh-CN":{to:"到",Hour:"小时",Minute:"分钟","Select Time":"选择时间",Reset:"重置",Apply:"应用"},"nl-NL":{to:"tot",Hour:"Uur",Minute:"Minuten","Select Time":"Select Time",Reset:"Reset",Apply:"Toepassen"}},T=[["",""],["",""]],V=t=>{const{id:o="time-range",classNameContainer:y,value:s=T,buttonClick:j,zIndexPopper:l=1,offsetPopover:g=5,floatingOptions:S,locale:d="id-ID",disableValidation:v=!1}=t,h=C.useRef(null),[n,b]=C.useState(T),e=(r,N)=>{if(N==="start"){const x=[r,n[1]];b(x)}else{const x=[n[0],r];b(x)}},c=r=>{var N;(N=h.current)==null||N.handlerShow(r),b(s||T)},u=()=>{var r;typeof(t==null?void 0:t.onChange)=="function"&&t.onChange(T),b(T),(r=h.current)==null||r.setShow(!1)},m=()=>{var R;const r=Number(n[0][0]),N=Number(n[0][1]),x=Number(n[1][0]),E=Number(n[1][1]),I=n[0][0]&&n[0][1]&&n[1][0]&&n[1][1],w=r<x||r===x&&N<=E;I&&(w||v)&&(typeof(t==null?void 0:t.onChange)=="function"&&t.onChange(n),(R=h.current)==null||R.setShow(!1))};return a.jsxs(a.Fragment,{children:[a.jsx("div",{id:o,onClick:c,className:y,children:typeof j=="function"?j(s,M(s,d)):s?M(s,d):f[d]["Select Time"]}),a.jsx(A.default,{zIndex:l,ref:h,offset:g,id:`${o}-popover`,floatingOptions:{placement:"bottom-end",...S},className:"iru-flex iru-flex-col",children:a.jsxs("div",{className:i.default["container-time-range"],children:[a.jsxs("div",{className:i.default["time-range-header"],children:[a.jsx("div",{className:i.default["time-range"],children:n[0][0]&&n[0][1]?`${n[0][0]}:${n[0][1]}`:"--:--"}),a.jsx("p",{className:i.default["text-to"],children:f[d].to}),a.jsx("div",{className:i.default["time-range"],children:n[1][0]&&n[1][1]?`${n[1][0]}:${n[1][1]}`:"--:--"})]}),a.jsxs("div",{className:i.default["time-range-body"],children:[a.jsx(k,{type:"start",value:[n[0][0],n[0][1]],onChange:r=>e(r,"start"),locale:d,values:n,disableValidation:v}),a.jsx("div",{className:i.default["time-range-divider"]}),a.jsx(k,{type:"end",value:[n[1][0],n[1][1]],onChange:r=>e(r,"end"),locale:d,values:n,disableValidation:v})]}),a.jsxs("div",{className:`${i.default["time-range-footer"]}`,children:[typeof(t==null?void 0:t.buttonReset)=="function"?a.jsx("div",{onClick:u,children:t.buttonReset()}):a.jsx(H.default,{variants:"nude-laba-blue-10",size:"small",onClick:u,children:f[d].Reset}),typeof(t==null?void 0:t.buttonSubmit)=="function"?a.jsx("div",{onClick:m,children:t.buttonSubmit()}):a.jsx(H.default,{size:"small",onClick:m,children:f[d].Apply})]})]})})]})},k=t=>{const{value:o,onChange:y,type:s,locale:j,values:l,disableValidation:g}=t,S=(e,c,u)=>Array.from({length:(c-e)/u+1},(m,r)=>e+r*u),d=()=>{const e=document.getElementById(`time-range-${s}-hour-${o[0]}`),c=document.getElementById(`time-range-${s}-minute-${o[1]}`),u=document.getElementById(`time-range-${s}-hour`),m=document.getElementById(`time-range-${s}-minute`);e&&u&&u.scrollTo({behavior:"instant",top:e.offsetTop-75}),c&&m&&m.scrollTo({behavior:"instant",top:c.offsetTop-75})},v=e=>{if(s==="start"||g)return!1;{if(!l[0][0])return!1;const c=Number(l[0][0]);return e<c}},h=e=>{if(s==="start"||g)return!1;{if(!l[0][0]||!l[0][1]||!l[1][0])return!1;const c=Number(l[0][0]),u=Number(l[1][0]),m=Number(l[0][1]);return c===u&&e<m}},n=e=>{if(s==="start"||g)return!1;{const c=Number(l[0][0]);return e<c}},b=e=>{if(s==="start"||g)return!1;{if(!l[0][0]||!l[0][1]||!l[1][0])return!1;const c=Number(l[0][0]),u=Number(l[1][0]),m=Number(l[0][1]);return c===u&&e<m}};return C.useEffect(()=>{d()},[]),a.jsxs("div",{className:i.default["list-time"],children:[a.jsxs("div",{className:i.default["container-time"],children:[a.jsx("p",{className:i.default["title-time"],children:f[j].Hour}),a.jsx("div",{id:`time-range-${s}-hour`,className:i.default["container-cell-time"],children:S(0,23,1).map(e=>a.jsx("div",{id:`time-range-${s}-hour-${e}`,className:`${i.default["cell-time"]} ${o[0]===$(e)?i.default.selected:""} ${v(e)?i.default.error:""} ${n(e)?i.default.disabled:""}`,onClick:()=>y([$(e),o[1]]),children:$(e)},e))})]}),a.jsxs("div",{className:i.default["container-time"],children:[a.jsx("p",{className:i.default["title-time"],children:f[j].Minute}),a.jsx("div",{id:`time-range-${s}-minute`,className:i.default["container-cell-time"],children:S(0,59,1).map(e=>a.jsx("div",{id:`time-range-${s}-minute-${e}`,className:`${i.default["cell-time"]} ${o[1]===$(e)?i.default.selected:""} ${h(e)?i.default.error:""} ${b(e)?i.default.disabled:""}`,onClick:()=>y([o[0],$(e)]),children:$(e)},e))})]})]})};exports.default=V;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { jsxs as f, Fragment as p, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import k, { useEffect as z } from "react";
|
|
3
|
+
import B from "../Popover/Popover.mjs";
|
|
4
|
+
import i from "./TimeRange.module.scss.mjs";
|
|
5
|
+
import x from "../Button/Button.mjs";
|
|
6
|
+
const T = (t, c = 2) => String(t).padStart(c, "0"), E = (t, c) => t[0][0] && t[0][1] && t[1][0] && t[1][1] ? `${t[0][0]}:${t[0][1]} - ${t[1][0]}:${t[1][1]}` : h[c]["Select Time"], h = {
|
|
7
|
+
"en-US": {
|
|
8
|
+
to: "to",
|
|
9
|
+
Hour: "Hour",
|
|
10
|
+
Minute: "Minute",
|
|
11
|
+
"Select Time": "Select Time",
|
|
12
|
+
Reset: "Reset",
|
|
13
|
+
Apply: "Apply"
|
|
14
|
+
},
|
|
15
|
+
"id-ID": {
|
|
16
|
+
to: "to",
|
|
17
|
+
Hour: "Jam",
|
|
18
|
+
Minute: "Menit",
|
|
19
|
+
"Select Time": "Pilih Waktu",
|
|
20
|
+
Reset: "Reset",
|
|
21
|
+
Apply: "Terapkan"
|
|
22
|
+
},
|
|
23
|
+
"zh-CN": {
|
|
24
|
+
to: "到",
|
|
25
|
+
Hour: "小时",
|
|
26
|
+
Minute: "分钟",
|
|
27
|
+
"Select Time": "选择时间",
|
|
28
|
+
Reset: "重置",
|
|
29
|
+
Apply: "应用"
|
|
30
|
+
},
|
|
31
|
+
"nl-NL": {
|
|
32
|
+
to: "tot",
|
|
33
|
+
Hour: "Uur",
|
|
34
|
+
Minute: "Minuten",
|
|
35
|
+
"Select Time": "Select Time",
|
|
36
|
+
Reset: "Reset",
|
|
37
|
+
Apply: "Toepassen"
|
|
38
|
+
}
|
|
39
|
+
}, H = [
|
|
40
|
+
["", ""],
|
|
41
|
+
["", ""]
|
|
42
|
+
], U = (t) => {
|
|
43
|
+
const {
|
|
44
|
+
id: c = "time-range",
|
|
45
|
+
classNameContainer: S,
|
|
46
|
+
value: r = H,
|
|
47
|
+
buttonClick: y,
|
|
48
|
+
zIndexPopper: l = 1,
|
|
49
|
+
offsetPopover: g = 5,
|
|
50
|
+
floatingOptions: R,
|
|
51
|
+
locale: u = "id-ID",
|
|
52
|
+
disableValidation: C = !1
|
|
53
|
+
} = t, N = k.useRef(null), [n, b] = k.useState(H), e = (s, $) => {
|
|
54
|
+
if ($ === "start") {
|
|
55
|
+
const v = [s, n[1]];
|
|
56
|
+
b(v);
|
|
57
|
+
} else {
|
|
58
|
+
const v = [n[0], s];
|
|
59
|
+
b(v);
|
|
60
|
+
}
|
|
61
|
+
}, o = (s) => {
|
|
62
|
+
var $;
|
|
63
|
+
($ = N.current) == null || $.handlerShow(s), b(r || H);
|
|
64
|
+
}, m = () => {
|
|
65
|
+
var s;
|
|
66
|
+
typeof (t == null ? void 0 : t.onChange) == "function" && t.onChange(H), b(H), (s = N.current) == null || s.setShow(!1);
|
|
67
|
+
}, d = () => {
|
|
68
|
+
var M;
|
|
69
|
+
const s = Number(n[0][0]), $ = Number(n[0][1]), v = Number(n[1][0]), w = Number(n[1][1]), A = n[0][0] && n[0][1] && n[1][0] && n[1][1], V = s < v || s === v && $ <= w;
|
|
70
|
+
A && (V || C) && (typeof (t == null ? void 0 : t.onChange) == "function" && t.onChange(n), (M = N.current) == null || M.setShow(!1));
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ f(p, { children: [
|
|
73
|
+
/* @__PURE__ */ a("div", { id: c, onClick: o, className: S, children: typeof y == "function" ? y(r, E(r, u)) : r ? E(r, u) : h[u]["Select Time"] }),
|
|
74
|
+
/* @__PURE__ */ a(
|
|
75
|
+
B,
|
|
76
|
+
{
|
|
77
|
+
zIndex: l,
|
|
78
|
+
ref: N,
|
|
79
|
+
offset: g,
|
|
80
|
+
id: `${c}-popover`,
|
|
81
|
+
floatingOptions: { placement: "bottom-end", ...R },
|
|
82
|
+
className: "iru-flex iru-flex-col",
|
|
83
|
+
children: /* @__PURE__ */ f("div", { className: i["container-time-range"], children: [
|
|
84
|
+
/* @__PURE__ */ f("div", { className: i["time-range-header"], children: [
|
|
85
|
+
/* @__PURE__ */ a("div", { className: i["time-range"], children: n[0][0] && n[0][1] ? `${n[0][0]}:${n[0][1]}` : "--:--" }),
|
|
86
|
+
/* @__PURE__ */ a("p", { className: i["text-to"], children: h[u].to }),
|
|
87
|
+
/* @__PURE__ */ a("div", { className: i["time-range"], children: n[1][0] && n[1][1] ? `${n[1][0]}:${n[1][1]}` : "--:--" })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ f("div", { className: i["time-range-body"], children: [
|
|
90
|
+
/* @__PURE__ */ a(
|
|
91
|
+
I,
|
|
92
|
+
{
|
|
93
|
+
type: "start",
|
|
94
|
+
value: [n[0][0], n[0][1]],
|
|
95
|
+
onChange: (s) => e(s, "start"),
|
|
96
|
+
locale: u,
|
|
97
|
+
values: n,
|
|
98
|
+
disableValidation: C
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ a("div", { className: i["time-range-divider"] }),
|
|
102
|
+
/* @__PURE__ */ a(
|
|
103
|
+
I,
|
|
104
|
+
{
|
|
105
|
+
type: "end",
|
|
106
|
+
value: [n[1][0], n[1][1]],
|
|
107
|
+
onChange: (s) => e(s, "end"),
|
|
108
|
+
locale: u,
|
|
109
|
+
values: n,
|
|
110
|
+
disableValidation: C
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ f("div", { className: `${i["time-range-footer"]}`, children: [
|
|
115
|
+
typeof (t == null ? void 0 : t.buttonReset) == "function" ? /* @__PURE__ */ a("div", { onClick: m, children: t.buttonReset() }) : /* @__PURE__ */ a(x, { variants: "nude-laba-blue-10", size: "small", onClick: m, children: h[u].Reset }),
|
|
116
|
+
typeof (t == null ? void 0 : t.buttonSubmit) == "function" ? /* @__PURE__ */ a("div", { onClick: d, children: t.buttonSubmit() }) : /* @__PURE__ */ a(x, { size: "small", onClick: d, children: h[u].Apply })
|
|
117
|
+
] })
|
|
118
|
+
] })
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] });
|
|
122
|
+
}, I = (t) => {
|
|
123
|
+
const { value: c, onChange: S, type: r, locale: y, values: l, disableValidation: g } = t, R = (e, o, m) => Array.from({ length: (o - e) / m + 1 }, (d, s) => e + s * m), u = () => {
|
|
124
|
+
const e = document.getElementById(`time-range-${r}-hour-${c[0]}`), o = document.getElementById(`time-range-${r}-minute-${c[1]}`), m = document.getElementById(`time-range-${r}-hour`), d = document.getElementById(`time-range-${r}-minute`);
|
|
125
|
+
e && m && m.scrollTo({ behavior: "instant", top: e.offsetTop - 75 }), o && d && d.scrollTo({ behavior: "instant", top: o.offsetTop - 75 });
|
|
126
|
+
}, C = (e) => {
|
|
127
|
+
if (r === "start" || g) return !1;
|
|
128
|
+
{
|
|
129
|
+
if (!l[0][0]) return !1;
|
|
130
|
+
const o = Number(l[0][0]);
|
|
131
|
+
return e < o;
|
|
132
|
+
}
|
|
133
|
+
}, N = (e) => {
|
|
134
|
+
if (r === "start" || g) return !1;
|
|
135
|
+
{
|
|
136
|
+
if (!l[0][0] || !l[0][1] || !l[1][0]) return !1;
|
|
137
|
+
const o = Number(l[0][0]), m = Number(l[1][0]), d = Number(l[0][1]);
|
|
138
|
+
return o === m && e < d;
|
|
139
|
+
}
|
|
140
|
+
}, n = (e) => {
|
|
141
|
+
if (r === "start" || g) return !1;
|
|
142
|
+
{
|
|
143
|
+
const o = Number(l[0][0]);
|
|
144
|
+
return e < o;
|
|
145
|
+
}
|
|
146
|
+
}, b = (e) => {
|
|
147
|
+
if (r === "start" || g) return !1;
|
|
148
|
+
{
|
|
149
|
+
if (!l[0][0] || !l[0][1] || !l[1][0]) return !1;
|
|
150
|
+
const o = Number(l[0][0]), m = Number(l[1][0]), d = Number(l[0][1]);
|
|
151
|
+
return o === m && e < d;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return z(() => {
|
|
155
|
+
u();
|
|
156
|
+
}, []), /* @__PURE__ */ f("div", { className: i["list-time"], children: [
|
|
157
|
+
/* @__PURE__ */ f("div", { className: i["container-time"], children: [
|
|
158
|
+
/* @__PURE__ */ a("p", { className: i["title-time"], children: h[y].Hour }),
|
|
159
|
+
/* @__PURE__ */ a("div", { id: `time-range-${r}-hour`, className: i["container-cell-time"], children: R(0, 23, 1).map((e) => /* @__PURE__ */ a(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
id: `time-range-${r}-hour-${e}`,
|
|
163
|
+
className: `${i["cell-time"]} ${c[0] === T(e) ? i.selected : ""} ${C(e) ? i.error : ""} ${n(e) ? i.disabled : ""}`,
|
|
164
|
+
onClick: () => S([T(e), c[1]]),
|
|
165
|
+
children: T(e)
|
|
166
|
+
},
|
|
167
|
+
e
|
|
168
|
+
)) })
|
|
169
|
+
] }),
|
|
170
|
+
/* @__PURE__ */ f("div", { className: i["container-time"], children: [
|
|
171
|
+
/* @__PURE__ */ a("p", { className: i["title-time"], children: h[y].Minute }),
|
|
172
|
+
/* @__PURE__ */ a("div", { id: `time-range-${r}-minute`, className: i["container-cell-time"], children: R(0, 59, 1).map((e) => /* @__PURE__ */ a(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
id: `time-range-${r}-minute-${e}`,
|
|
176
|
+
className: `${i["cell-time"]} ${c[1] === T(e) ? i.selected : ""} ${N(e) ? i.error : ""} ${b(e) ? i.disabled : ""}`,
|
|
177
|
+
onClick: () => S([c[0], T(e)]),
|
|
178
|
+
children: T(e)
|
|
179
|
+
},
|
|
180
|
+
e
|
|
181
|
+
)) })
|
|
182
|
+
] })
|
|
183
|
+
] });
|
|
184
|
+
};
|
|
185
|
+
export {
|
|
186
|
+
U as default
|
|
187
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_selected_1n7z7_93",t="_error_1n7z7_98",_="_disabled_1n7z7_102",n={"container-time-range":"_container-time-range_1n7z7_1","time-range-header":"_time-range-header_1n7z7_9","text-to":"_text-to_1n7z7_15","time-range":"_time-range_1n7z7_9","time-range-body":"_time-range-body_1n7z7_40","time-range-divider":"_time-range-divider_1n7z7_44","list-time":"_list-time_1n7z7_50","container-time":"_container-time_1n7z7_1","title-time":"_title-time_1n7z7_63","container-cell-time":"_container-cell-time_1n7z7_71","cell-time":"_cell-time_1n7z7_79",selected:e,error:t,disabled:_,"time-range-footer":"_time-range-footer_1n7z7_114"};exports.default=n;exports.disabled=_;exports.error=t;exports.selected=e;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const e = "_selected_1n7z7_93", t = "_error_1n7z7_98", _ = "_disabled_1n7z7_102", n = {
|
|
2
|
+
"container-time-range": "_container-time-range_1n7z7_1",
|
|
3
|
+
"time-range-header": "_time-range-header_1n7z7_9",
|
|
4
|
+
"text-to": "_text-to_1n7z7_15",
|
|
5
|
+
"time-range": "_time-range_1n7z7_9",
|
|
6
|
+
"time-range-body": "_time-range-body_1n7z7_40",
|
|
7
|
+
"time-range-divider": "_time-range-divider_1n7z7_44",
|
|
8
|
+
"list-time": "_list-time_1n7z7_50",
|
|
9
|
+
"container-time": "_container-time_1n7z7_1",
|
|
10
|
+
"title-time": "_title-time_1n7z7_63",
|
|
11
|
+
"container-cell-time": "_container-cell-time_1n7z7_71",
|
|
12
|
+
"cell-time": "_cell-time_1n7z7_79",
|
|
13
|
+
selected: e,
|
|
14
|
+
error: t,
|
|
15
|
+
disabled: _,
|
|
16
|
+
"time-range-footer": "_time-range-footer_1n7z7_114"
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
n as default,
|
|
20
|
+
_ as disabled,
|
|
21
|
+
t as error,
|
|
22
|
+
e as selected
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("./style.module.scss.cjs"),n=({children:s,noTime:l=!1})=>t.jsx("div",{className:`${e.default["timeline-container"]} ${l?e.default["no-time"]:""}`,children:s}),d=({children:s,time:l,clasName:a,noTime:i=!1})=>t.jsxs("div",{className:e.default["timeline-content"],children:[t.jsx("div",{className:`${e.default["left-content"]} ${i?e.default["no-time"]:""}`,children:t.jsxs("div",{className:e.default["time-content"],children:[!i&&t.jsx("time",{className:e.default["text-time"],children:l??""}),t.jsx("div",{className:e.default.dot})]})}),t.jsx("div",{className:`${e.default["right-content"]} ${i?e.default["no-time"]:""} ${a??""}`,children:s})]}),c=Object.assign(n,{TimelineContent:d});exports.default=c;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import e from "./style.module.scss.mjs";
|
|
3
|
+
const c = ({ children: i, noTime: n = !1 }) => /* @__PURE__ */ t("div", { className: `${e["timeline-container"]} ${n ? e["no-time"] : ""}`, children: i }), m = ({ children: i, time: n, clasName: l, noTime: s = !1 }) => /* @__PURE__ */ a("div", { className: e["timeline-content"], children: [
|
|
4
|
+
/* @__PURE__ */ t("div", { className: `${e["left-content"]} ${s ? e["no-time"] : ""}`, children: /* @__PURE__ */ a("div", { className: e["time-content"], children: [
|
|
5
|
+
!s && /* @__PURE__ */ t("time", { className: e["text-time"], children: n ?? "" }),
|
|
6
|
+
/* @__PURE__ */ t("div", { className: e.dot })
|
|
7
|
+
] }) }),
|
|
8
|
+
/* @__PURE__ */ t("div", { className: `${e["right-content"]} ${s ? e["no-time"] : ""} ${l ?? ""}`, children: i })
|
|
9
|
+
] }), d = Object.assign(c, { TimelineContent: m });
|
|
10
|
+
export {
|
|
11
|
+
d as default
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="_dot_1b9xw_46",e={"timeline-container":"_timeline-container_1b9xw_1","no-time":"_no-time_1b9xw_14","timeline-content":"_timeline-content_1b9xw_18","left-content":"_left-content_1b9xw_23","time-content":"_time-content_1b9xw_31","text-time":"_text-time_1b9xw_35",dot:t,"right-content":"_right-content_1b9xw_52"};exports.default=e;exports.dot=t;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const t = "_dot_1b9xw_46", e = {
|
|
2
|
+
"timeline-container": "_timeline-container_1b9xw_1",
|
|
3
|
+
"no-time": "_no-time_1b9xw_14",
|
|
4
|
+
"timeline-content": "_timeline-content_1b9xw_18",
|
|
5
|
+
"left-content": "_left-content_1b9xw_23",
|
|
6
|
+
"time-content": "_time-content_1b9xw_31",
|
|
7
|
+
"text-time": "_text-time_1b9xw_35",
|
|
8
|
+
dot: t,
|
|
9
|
+
"right-content": "_right-content_1b9xw_52"
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
e as default,
|
|
13
|
+
t as dot
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),s=require("react"),v=require("./Tooltip.module.scss.cjs"),x=require("../Popover/Popover.cjs"),y=require("../../config/tailwind/colors.cjs"),M=({id:m="1ru-tooltip",children:S,text:T,zIndexPopover:k=1,onShow:i,onClose:u,placement:w="top",backgroundColor:c="black",popoverProps:C={},arrowProps:b={},className:I,isHover:a,delay:j=600})=>{let n;const l=s.useRef(null),f={backgroundColor:y.default[c]||c},[o,d]=s.useState(!1),[q,p]=s.useState(!1),g=e=>{var t;(t=l.current)==null||t.handlerShow(e),p(!0),typeof i=="function"&&i()},h=()=>{var e;p(!1),o||(clearInterval(n),(e=l.current)==null||e.setShow(!1),typeof u=="function"&&u())};return r.jsxs(r.Fragment,{children:[r.jsx("div",{id:m,onMouseEnter:e=>{if(a&&!o){const t=e.currentTarget;n=setTimeout(()=>{g({...e,currentTarget:t})},j)}},onMouseLeave:()=>{a&&!o&&h()},onClick:e=>{d(!0),clearInterval(n),q||g(e)},className:v.default.container,children:S}),r.jsx(x.default,{floatingOptions:{placement:w},ref:l,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:k,onClose:()=>{o&&(d(!1),h())},styleInnerPopover:{backgroundColor:f.backgroundColor},propsArrow:{fill:f.backgroundColor,...b},className:`${v.default["container-popover"]} ${I??""}`,...C,children:T})]})};exports.default=M;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsxs as j, Fragment as A, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import s from "react";
|
|
3
|
+
import g from "./Tooltip.module.scss.mjs";
|
|
4
|
+
import M from "../Popover/Popover.mjs";
|
|
5
|
+
import N from "../../config/tailwind/colors.mjs";
|
|
6
|
+
const F = ({
|
|
7
|
+
id: k = "1ru-tooltip",
|
|
8
|
+
children: v,
|
|
9
|
+
text: w,
|
|
10
|
+
zIndexPopover: C = 1,
|
|
11
|
+
onShow: l,
|
|
12
|
+
onClose: i,
|
|
13
|
+
placement: I = "top",
|
|
14
|
+
backgroundColor: a = "black",
|
|
15
|
+
popoverProps: S = {},
|
|
16
|
+
arrowProps: T = {},
|
|
17
|
+
className: b,
|
|
18
|
+
isHover: c,
|
|
19
|
+
delay: x = 600
|
|
20
|
+
}) => {
|
|
21
|
+
let r;
|
|
22
|
+
const n = s.useRef(null), f = {
|
|
23
|
+
backgroundColor: N[a] || a
|
|
24
|
+
}, [e, p] = s.useState(!1), [y, u] = s.useState(!1), m = (o) => {
|
|
25
|
+
var t;
|
|
26
|
+
(t = n.current) == null || t.handlerShow(o), u(!0), typeof l == "function" && l();
|
|
27
|
+
}, d = () => {
|
|
28
|
+
var o;
|
|
29
|
+
u(!1), e || (clearInterval(r), (o = n.current) == null || o.setShow(!1), typeof i == "function" && i());
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ j(A, { children: [
|
|
32
|
+
/* @__PURE__ */ h(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
id: k,
|
|
36
|
+
onMouseEnter: (o) => {
|
|
37
|
+
if (c && !e) {
|
|
38
|
+
const t = o.currentTarget;
|
|
39
|
+
r = setTimeout(() => {
|
|
40
|
+
m({ ...o, currentTarget: t });
|
|
41
|
+
}, x);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
onMouseLeave: () => {
|
|
45
|
+
c && !e && d();
|
|
46
|
+
},
|
|
47
|
+
onClick: (o) => {
|
|
48
|
+
p(!0), clearInterval(r), y || m(o);
|
|
49
|
+
},
|
|
50
|
+
className: g.container,
|
|
51
|
+
children: v
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ h(
|
|
55
|
+
M,
|
|
56
|
+
{
|
|
57
|
+
floatingOptions: { placement: I },
|
|
58
|
+
ref: n,
|
|
59
|
+
id: "1ru-popover-tooltip",
|
|
60
|
+
offset: 10,
|
|
61
|
+
withArrow: !0,
|
|
62
|
+
zIndex: C,
|
|
63
|
+
onClose: () => {
|
|
64
|
+
e && (p(!1), d());
|
|
65
|
+
},
|
|
66
|
+
styleInnerPopover: { backgroundColor: f.backgroundColor },
|
|
67
|
+
propsArrow: { fill: f.backgroundColor, ...T },
|
|
68
|
+
className: `${g["container-popover"]} ${b ?? ""}`,
|
|
69
|
+
...S,
|
|
70
|
+
children: w
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] });
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
F as default
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_container_1ng8e_1",n={container:e,"container-popover":"_container-popover_1ng8e_7"};exports.container=e;exports.default=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),n=require("react"),z=({children:f,maxWidth:w,moreElement:h,style:E={},className:g,gap:s=0,gapStyle:m,...M})=>{const c=n.useMemo(()=>n.Children.toArray(f),[f]),r=c.length,[p,W]=n.useState(r),l=n.useRef(null),a=n.useRef([]),x=n.useRef(null);a.current=[];const y=()=>{const e=l.current,i=x.current;if(!e||e.offsetWidth===0)return;const d=e.offsetWidth,v=a.current.map(t=>t?t.offsetWidth:0),I=v.reduce((t,u)=>t+u,0),V=Math.max(0,r-1)*s;if(I+V<=d){W(r);return}const $=i?i.offsetWidth+s:0,q=d-$;let C=0,R=0;for(let t=0;t<r;t++){const u=v[t],j=t>0?s:0;if(C+u+j>q)break;C+=u+j,R++}W(R)};n.useLayoutEffect(()=>{y();const e=new ResizeObserver(y);return l.current&&e.observe(l.current),()=>{e.disconnect()}},[c,s]);const b=r-p,S={display:"flex",flexWrap:"nowrap",alignItems:"center",overflow:"hidden",gap:m??`${s}px`,maxWidth:w,minHeight:"38px",...E},k={position:"fixed",top:"-9999px",left:"-9999px",visibility:"hidden",pointerEvents:"none",zIndex:-1,display:"flex",flexWrap:"nowrap",alignItems:"center",gap:m??`${s}px`};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{ref:l,style:S,className:g??"",...M,children:[c.slice(0,p),b>0&&h(b)]}),o.jsxs("div",{style:k,"aria-hidden":"true",children:[c.map((e,i)=>n.cloneElement(e,{ref:d=>a.current[i]=d,key:`measure-${e.key||i}`})),r>0&&o.jsx("span",{ref:x,children:h(r)})]})]})};exports.default=z;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs as u, Fragment as M, jsx as N } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
|
+
const H = ({
|
|
4
|
+
children: f,
|
|
5
|
+
maxWidth: E,
|
|
6
|
+
moreElement: h,
|
|
7
|
+
style: k = {},
|
|
8
|
+
className: I,
|
|
9
|
+
gap: i = 0,
|
|
10
|
+
gapStyle: m,
|
|
11
|
+
...V
|
|
12
|
+
}) => {
|
|
13
|
+
const s = n.useMemo(() => n.Children.toArray(f), [f]), r = s.length, [p, W] = n.useState(r), c = n.useRef(null), d = n.useRef([]), x = n.useRef(null);
|
|
14
|
+
d.current = [];
|
|
15
|
+
const y = () => {
|
|
16
|
+
const e = c.current, o = x.current;
|
|
17
|
+
if (!e || e.offsetWidth === 0)
|
|
18
|
+
return;
|
|
19
|
+
const l = e.offsetWidth, b = d.current.map((t) => t ? t.offsetWidth : 0), j = b.reduce((t, a) => t + a, 0), z = Math.max(0, r - 1) * i;
|
|
20
|
+
if (j + z <= l) {
|
|
21
|
+
W(r);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const A = o ? o.offsetWidth + i : 0, L = l - A;
|
|
25
|
+
let v = 0, R = 0;
|
|
26
|
+
for (let t = 0; t < r; t++) {
|
|
27
|
+
const a = b[t], w = t > 0 ? i : 0;
|
|
28
|
+
if (v + a + w > L)
|
|
29
|
+
break;
|
|
30
|
+
v += a + w, R++;
|
|
31
|
+
}
|
|
32
|
+
W(R);
|
|
33
|
+
};
|
|
34
|
+
n.useLayoutEffect(() => {
|
|
35
|
+
y();
|
|
36
|
+
const e = new ResizeObserver(y);
|
|
37
|
+
return c.current && e.observe(c.current), () => {
|
|
38
|
+
e.disconnect();
|
|
39
|
+
};
|
|
40
|
+
}, [s, i]);
|
|
41
|
+
const C = r - p, $ = {
|
|
42
|
+
display: "flex",
|
|
43
|
+
flexWrap: "nowrap",
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
gap: m ?? `${i}px`,
|
|
47
|
+
maxWidth: E,
|
|
48
|
+
minHeight: "38px",
|
|
49
|
+
...k
|
|
50
|
+
}, g = {
|
|
51
|
+
position: "fixed",
|
|
52
|
+
top: "-9999px",
|
|
53
|
+
left: "-9999px",
|
|
54
|
+
visibility: "hidden",
|
|
55
|
+
pointerEvents: "none",
|
|
56
|
+
zIndex: -1,
|
|
57
|
+
display: "flex",
|
|
58
|
+
flexWrap: "nowrap",
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
gap: m ?? `${i}px`
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ u(M, { children: [
|
|
63
|
+
/* @__PURE__ */ u("div", { ref: c, style: $, className: I ?? "", ...V, children: [
|
|
64
|
+
s.slice(0, p),
|
|
65
|
+
C > 0 && h(C)
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ u("div", { style: g, "aria-hidden": "true", children: [
|
|
68
|
+
s.map(
|
|
69
|
+
(e, o) => n.cloneElement(
|
|
70
|
+
e,
|
|
71
|
+
{
|
|
72
|
+
ref: (l) => d.current[o] = l,
|
|
73
|
+
key: `measure-${e.key || o}`
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
),
|
|
77
|
+
r > 0 && /* @__PURE__ */ N("span", { ref: x, children: h(r) })
|
|
78
|
+
] })
|
|
79
|
+
] });
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
H as default
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),g=require("react"),B=require("../Input/InputReguler.cjs"),I=require("./UploadFile.module.scss.cjs"),E=()=>r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.19544 6.19126C6.32045 6.06628 6.48999 5.99607 6.66677 5.99607C6.84354 5.99607 7.01308 6.06628 7.1381 6.19126L10.0001 9.05326L12.8621 6.19126C12.9236 6.12758 12.9972 6.0768 13.0785 6.04186C13.1598 6.00692 13.2473 5.98853 13.3358 5.98776C13.4244 5.98699 13.5121 6.00386 13.5941 6.03738C13.676 6.0709 13.7504 6.1204 13.813 6.18299C13.8756 6.24559 13.9251 6.32002 13.9587 6.40195C13.9922 6.48389 14.009 6.57167 14.0083 6.66019C14.0075 6.74871 13.9891 6.83619 13.9542 6.91753C13.9192 6.99886 13.8684 7.07243 13.8048 7.13392L10.9428 9.99592L13.8048 12.8579C13.9262 12.9837 13.9934 13.1521 13.9919 13.3269C13.9904 13.5017 13.9203 13.6689 13.7966 13.7925C13.673 13.9161 13.5058 13.9862 13.331 13.9877C13.1562 13.9892 12.9878 13.922 12.8621 13.8006L10.0001 10.9386L7.1381 13.8006C7.01237 13.922 6.84397 13.9892 6.66917 13.9877C6.49437 13.9862 6.32716 13.9161 6.20356 13.7925C6.07995 13.6689 6.00984 13.5017 6.00832 13.3269C6.0068 13.1521 6.074 12.9837 6.19544 12.8579L9.05744 9.99592L6.19544 7.13392C6.07045 7.00891 6.00024 6.83937 6.00024 6.66259C6.00024 6.48581 6.07045 6.31628 6.19544 6.19126Z",fill:"#212121"})}),S=()=>r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:r.jsx("path",{d:"M2 11.3334V4.66671C2 4.31309 2.14048 3.97395 2.39052 3.7239C2.64057 3.47385 2.97971 3.33337 3.33333 3.33337H7.33333L8.66667 4.66671H12.6667C13.0203 4.66671 13.3594 4.80718 13.6095 5.05723C13.8595 5.30728 14 5.64642 14 6.00004V11.3334C14 11.687 13.8595 12.0261 13.6095 12.2762C13.3594 12.5262 13.0203 12.6667 12.6667 12.6667H3.33333C2.97971 12.6667 2.64057 12.5262 2.39052 12.2762C2.14048 12.0261 2 11.687 2 11.3334Z",stroke:"#9E9E9E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),p=m=>{const n=g.useRef(null),{fileName:o,onChange:u,maxFile:x,maxSize:a=2,validateFile:c,error:d,label:k,inputProps:v,priorityError:f="external",eventError:s}=m,l=c||["image/png","image/jpeg","image/jpg"],[C,j]=g.useState(""),w={internal:C||d,external:d||C},L=e=>{if(e!=null&&e.length){const t=e[0],M=t.size/1024/1024;let i="";if(l.some(y=>{var h;return(h=e[0].type)==null?void 0:h.includes(y)})?M>a?i=`${e.length>1?"Jumlah u":"U"}kuran berkas tidak boleh melebihi ${a}MB.`:u(t):i="Berkas tidak didukung, silahkan pilih file kembali.",j(i),s==null||s(i),!(n!=null&&n.current))return;n.current.value=""}},b=e=>{var t;e.preventDefault(),n!=null&&n.current&&((t=n.current)==null||t.click())},F=e=>{e.preventDefault(),n!=null&&n.current&&(u(null),n.current.value="")};return r.jsxs(r.Fragment,{children:[r.jsx("input",{accept:l==null?void 0:l.join(", "),ref:n,hidden:!0,type:"file",max:x,onChange:e=>{L(e.target.files)}}),r.jsx(B.default,{sizeInput:"medium",placeholder:"Pilih Berkas",label:k,value:o,readOnly:!0,onClick:e=>b(e),startIcon:r.jsx(S,{}),endIcon:o&&r.jsx("div",{className:I.default["button-remove"],onClick:e=>F(e),children:r.jsx(E,{})}),error:w[f],...v})]})};p.displayName="UploadFile";exports.default=p;
|