1mpacto-react-ui 0.2.0-beta.9 → 2.0.0
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/_colors.scss +80 -0
- package/dist/assets/_mixins.scss +32 -5
- package/dist/assets/_typography.scss +582 -0
- package/dist/assets/colors.css +40 -0
- package/dist/assets/core.css +1 -1
- package/dist/assets/fontfamily.css +1 -1
- package/dist/assets/fonts/PlusJakartaSans-Italic.ttf +0 -0
- package/dist/assets/fonts/PlusJakartaSans.ttf +0 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/typography.css +96 -0
- package/dist/index.cjs +108 -96
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +16743 -15220
- package/dist/package.json.d.ts +1 -1
- package/dist/src/components/Badges/Badges.config.d.ts +57 -0
- package/dist/src/components/Badges/Badges.stories.d.ts +115 -1
- package/dist/src/components/Breadcrumbs/Breadcrumbs.config.d.ts +113 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/src/components/Breadcrumbs/Breadcrumbs.stories.d.ts +219 -5
- package/dist/src/components/Button/Button.config.d.ts +70 -0
- package/dist/src/components/Button/Button.stories.d.ts +127 -3
- package/dist/src/components/ButtonIcon/ButtonIcon.config.d.ts +53 -0
- package/dist/src/components/ButtonIcon/ButtonIcon.stories.d.ts +121 -3
- package/dist/src/components/ButtonPopover/ButtonPopover.stories.d.ts +256 -1
- package/dist/src/components/Calendar/Calendar.d.ts +2 -1
- package/dist/src/components/Calendar/Calendar.stories.d.ts +281 -1
- package/dist/src/components/Chart/GradientBarChart.stories.d.ts +67 -1
- package/dist/src/components/Chart/GradientLineChart.stories.d.ts +78 -1
- package/dist/src/components/Chart/LineChart.stories.d.ts +33 -1
- package/dist/src/components/Chips/Chips.config.d.ts +35 -0
- package/dist/src/components/Chips/Chips.stories.d.ts +135 -1
- package/dist/src/components/Collapse/Collapse.stories.d.ts +87 -1
- package/dist/src/components/Collapse/CollapseV2.stories.d.ts +57 -1
- package/dist/src/components/DatePicker/DatePicker.stories.d.ts +219 -1
- package/dist/src/components/DatePicker/FilterDate.d.ts +1 -1
- package/dist/src/components/DatePicker/FilterDate.stories.d.ts +230 -2
- package/dist/src/components/DatePicker/MonthYearPicker.stories.d.ts +196 -1
- package/dist/src/components/ErrorMessage/ErrorMessage.config.d.ts +8 -0
- package/dist/src/components/ErrorMessage/ErrorMessage.stories.d.ts +37 -1
- package/dist/src/components/FilterContainer/FilterContainer.stories.d.ts +164 -0
- package/dist/src/components/Input/InputFloatingInner.config.d.ts +9 -0
- package/dist/src/components/Input/InputFloatingInner.stories.d.ts +175 -5
- package/dist/src/components/Input/InputInnerLabel.config.d.ts +8 -0
- package/dist/src/components/Input/InputInnerLabel.d.ts +4 -0
- package/dist/src/components/Input/InputInnerLabel.stories.d.ts +204 -0
- package/dist/src/components/Input/InputNative.config.d.ts +9 -0
- package/dist/src/components/Input/InputNative.stories.d.ts +147 -4
- package/dist/src/components/Input/InputReguler.config.d.ts +9 -0
- package/dist/src/components/Input/InputReguler.stories.d.ts +175 -5
- package/dist/src/components/Modal/ModalDialog.config.d.ts +9 -0
- package/dist/src/components/Modal/ModalDialog.stories.d.ts +119 -1
- package/dist/src/components/NumberFormat/NumberFormat.stories.d.ts +371 -17
- package/dist/src/components/Pagination/Pagination.config.d.ts +5 -0
- package/dist/src/components/Pagination/Pagination.d.ts +1 -1
- package/dist/src/components/Pagination/Pagination.stories.d.ts +198 -2
- package/dist/src/components/Popover/Popover.stories.d.ts +212 -4
- package/dist/src/components/PortalComponent/PortalComponent.stories.d.ts +60 -0
- package/dist/src/components/RadioCheckbox/RadioCheckbox.config.d.ts +41 -0
- package/dist/src/components/RadioCheckbox/RadioCheckbox.stories.d.ts +228 -7
- package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.config.d.ts +25 -0
- package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.stories.d.ts +194 -3
- package/dist/src/components/SelectDropdownContainer/SelectDropdownContainer.config.d.ts +26 -0
- package/dist/src/components/SelectDropdownContainer/styleConfig.d.ts +4 -1
- package/dist/src/components/Sidebar/ItemSidebar.config.d.ts +34 -0
- package/dist/src/components/Sidebar/Sidebar.config.d.ts +16 -0
- package/dist/src/components/Step/Step.stories.d.ts +133 -1
- package/dist/src/components/Step/StepIndicator.stories.d.ts +146 -1
- package/dist/src/components/Switch/Switch.config.d.ts +26 -0
- package/dist/src/components/Switch/Switch.stories.d.ts +126 -1
- package/dist/src/components/Table/Table.config.d.ts +4 -0
- package/dist/src/components/Table/Table.d.ts +2 -3
- package/dist/src/components/Table/Table.stories.d.ts +69 -51
- package/dist/src/components/Table/TableSubMobile.d.ts +3 -0
- package/dist/src/components/Tabs/Tabs.config.d.ts +31 -0
- package/dist/src/components/Tabs/Tabs.d.ts +1 -1
- package/dist/src/components/Tabs/Tabs.stories.d.ts +218 -2
- package/dist/src/components/TextEditor/TextEditor.stories.d.ts +57 -9
- package/dist/src/components/Textarea/Textarea.config.d.ts +31 -0
- package/dist/src/components/Textarea/Textarea.stories.d.ts +248 -2
- package/dist/src/components/Textarea/TextareaFloatingInner.config.d.ts +6 -0
- package/dist/src/components/Textarea/TextareaFloatingInner.stories.d.ts +258 -2
- package/dist/src/components/Textarea/TextareaInnerLabel.config.d.ts +7 -0
- package/dist/src/components/Textarea/TextareaInnerLabel.d.ts +4 -0
- package/dist/src/components/Textarea/TextareaInnerLabel.stories.d.ts +258 -0
- package/dist/src/components/TimeRange/TimeRange.d.ts +3 -0
- package/dist/src/components/TimeRange/TimeRange.stories.d.ts +185 -0
- package/dist/src/components/Timeline/Timeline.stories.d.ts +38 -1
- package/dist/src/components/Tooltip/Tooltip.stories.d.ts +157 -1
- package/dist/src/components/TruncateComponent/TruncateComponent.stories.d.ts +104 -1
- package/dist/src/components/Upload/UploadFile.stories.d.ts +125 -1
- package/dist/src/components/Upload/UploadImage.d.ts +1 -1
- package/dist/src/components/Upload/UploadImage.stories.d.ts +143 -2
- package/dist/src/components/Upload/UploadMultipleFile.d.ts +1 -1
- package/dist/src/components/Upload/UploadMultipleFile.stories.d.ts +188 -2
- package/dist/src/components/Virtualization/ListVirtualization.stories.d.ts +277 -1
- package/dist/src/components/Virtualization/TableVirtualization.stories.d.ts +294 -1
- package/dist/src/components/index.d.ts +14 -8
- package/dist/src/components/screens/Screens.stories.d.ts +13 -0
- package/dist/src/config/components/borderRadius.d.ts +1 -0
- package/dist/src/config/components/font.d.ts +7 -0
- package/dist/src/config/components/gap.d.ts +1 -0
- package/dist/src/config/components/typography.d.ts +3 -49
- package/dist/src/config/tailwind/index.d.ts +2 -1
- package/dist/src/config/tailwind/nativeScreen.d.ts +3 -0
- package/dist/src/config/tailwind/typography.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +5 -3
- package/dist/src/hooks/useAsyncDebounce.d.ts +9 -0
- package/dist/src/hooks/useCombinedResizeObserver.d.ts +66 -0
- package/dist/src/hooks/useCountdown.d.ts +67 -3
- package/dist/src/hooks/useDeepCompareEffect.d.ts +13 -0
- package/dist/src/hooks/useElementOrWindowMediaQuery.d.ts +9 -0
- package/dist/src/hooks/useEventListener.d.ts +27 -0
- package/dist/src/hooks/useMasonry.d.ts +79 -0
- package/dist/src/hooks/useMergeRefs.d.ts +26 -0
- package/dist/src/hooks/useOtpInput.d.ts +199 -0
- package/dist/src/hooks/useStateRef.d.ts +8 -0
- package/dist/src/interfaces/components/Alert/index.d.ts +8 -0
- package/dist/src/interfaces/components/Badges/index.d.ts +30 -1
- package/dist/src/interfaces/components/Breadcrumbs/index.d.ts +85 -2
- package/dist/src/interfaces/components/Button/index.d.ts +46 -2
- package/dist/src/interfaces/components/ButtonIcon/index.d.ts +36 -0
- package/dist/src/interfaces/components/ButtonPopover/index.d.ts +78 -0
- package/dist/src/interfaces/components/Calendar/index.d.ts +384 -3
- package/dist/src/interfaces/components/Chart/index.d.ts +460 -0
- package/dist/src/interfaces/components/Checkbox/index.d.ts +12 -0
- package/dist/src/interfaces/components/Chips/index.d.ts +38 -1
- package/dist/src/interfaces/components/Collapse/index.d.ts +60 -0
- package/dist/src/interfaces/components/DatePicker/index.d.ts +277 -1
- package/dist/src/interfaces/components/ErrorMessage/index.d.ts +17 -1
- package/dist/src/interfaces/components/FilterContainer/index.d.ts +102 -0
- package/dist/src/interfaces/components/Input/index.d.ts +193 -0
- package/dist/src/interfaces/components/Modal/index.d.ts +45 -0
- package/dist/src/interfaces/components/NumberFormat/index.d.ts +25 -0
- package/dist/src/interfaces/components/Pagination/index.d.ts +83 -0
- package/dist/src/interfaces/components/Popover/index.d.ts +98 -1
- package/dist/src/interfaces/components/RadioCheckbox/RadioCheckbox.d.ts +59 -2
- package/dist/src/interfaces/components/RadioCheckbox/RadioCheckboxLabel.d.ts +46 -1
- package/dist/src/interfaces/components/SelectDropdownContainer/index.d.ts +196 -2
- package/dist/src/interfaces/components/Sidebar/index.d.ts +229 -1
- package/dist/src/interfaces/components/Step/index.d.ts +153 -0
- package/dist/src/interfaces/components/Switch/index.d.ts +54 -1
- package/dist/src/interfaces/components/Table/index.d.ts +402 -6
- package/dist/src/interfaces/components/Tabs/index.d.ts +130 -1
- package/dist/src/interfaces/components/TextEditor/index.d.ts +12 -0
- package/dist/src/interfaces/components/Textarea/index.d.ts +169 -0
- package/dist/src/interfaces/components/TimeRange/index.d.ts +128 -0
- package/dist/src/interfaces/components/Timeline/index.d.ts +36 -0
- package/dist/src/interfaces/components/Tooltip/index.d.ts +56 -0
- package/dist/src/interfaces/components/TruncateComponent/index.d.ts +34 -0
- package/dist/src/interfaces/components/UploadFile/index.d.ts +186 -0
- package/dist/src/interfaces/components/Virtualization/ListVirtualization.d.ts +138 -0
- package/dist/src/interfaces/components/Virtualization/TableVirtualization.d.ts +143 -0
- package/dist/src/utils/common.d.ts +4 -4
- package/dist/src/utils/constant.d.ts +1 -0
- package/dist/types-external/table.d.ts +3 -0
- package/package.json +1 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -1,13 +1,57 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* [ID] : Tipe varian tombol yang tersedia.
|
|
4
|
+
* [EN] : Available button variant types.
|
|
5
|
+
*/
|
|
6
|
+
export type TButtonVariants = 'primary-laba-blue-10' | 'primary-red-700-dsb_laba-grey-06' | 'primary-green-700' | 'ghost-laba-blue-10' | 'ghost-red-700' | 'ghost-green-700' | 'ghost-blue-gray-100-bg_white' | 'ghost-laba-green-10' | 'ghost-blue-gray-100-bg_white-text_blue-gray-400' | 'ghost-laba-blue-05' | 'nude-laba-blue-10' | 'nude-red-700' | 'nude-green-700' | 'nude-gray-500' | 'nude-laba-red-10' | 'nude-laba-red-08' | 'nude-laba-red-05' | 'primary-blue-700' | 'primary-red-700' | 'secondary-blue-700' | 'secondary-red-600' | 'secondary-green-600' | 'tertiary-blue-700' | 'tertiary-red-300' | 'tertiary-red-600' | 'tertiary-gray-500' | 'ghost-laba-blue-01' | 'filled-laba-white_laba-blue-10' | 'filled-laba-white_laba-red-05' | 'secondary-red-700' | 'tertiary-black' | 'primary-bill-primary-600' | 'secondary-bill-secondary-800' | 'tertiary-bill-secondary-800' | 'primary-bill-red-700';
|
|
7
|
+
/**
|
|
8
|
+
* [ID] : Tipe ukuran tombol.
|
|
9
|
+
* [EN] : Button size type.
|
|
10
|
+
*/
|
|
11
|
+
export type TButtonSize = 'large' | 'reguler' | 'small' | 'extra-small' | 'l' | 'm' | 's' | 'xs' | 'bill-l' | 'bill-m' | 'bill-s' | 'bill-xs';
|
|
12
|
+
/**
|
|
13
|
+
* [ID] : Interface untuk komponen Button.
|
|
14
|
+
* [EN] : Interface for Button component.
|
|
15
|
+
*/
|
|
4
16
|
export interface IButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
17
|
+
/**
|
|
18
|
+
* [ID] : Ukuran tombol (opsional).
|
|
19
|
+
* [EN] : Button size (optional).
|
|
20
|
+
*/
|
|
5
21
|
size?: TButtonSize;
|
|
22
|
+
/**
|
|
23
|
+
* [ID] : Varian gaya tombol (opsional).
|
|
24
|
+
* [EN] : Button style variant (optional).
|
|
25
|
+
*/
|
|
6
26
|
variants?: TButtonVariants;
|
|
27
|
+
/**
|
|
28
|
+
* [ID] : Ikon di awal tombol (opsional).
|
|
29
|
+
* [EN] : Icon at the start of the button (optional).
|
|
30
|
+
*/
|
|
7
31
|
startIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
|
|
32
|
+
/**
|
|
33
|
+
* [ID] : Ikon di akhir tombol (opsional).
|
|
34
|
+
* [EN] : Icon at the end of the button (optional).
|
|
35
|
+
*/
|
|
8
36
|
endIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
|
|
37
|
+
/**
|
|
38
|
+
* [ID] : Konten anak di dalam tombol.
|
|
39
|
+
* [EN] : Child content inside the button.
|
|
40
|
+
*/
|
|
9
41
|
children: ReactNode | ReactNode[];
|
|
42
|
+
/**
|
|
43
|
+
* [ID] : Nama kelas CSS tambahan (opsional).
|
|
44
|
+
* [EN] : Additional CSS class name (optional).
|
|
45
|
+
*/
|
|
10
46
|
className?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* [ID] : Menentukan apakah tombol dalam keadaan memuat (opsional).
|
|
49
|
+
* [EN] : Determines if the button is in loading state (optional).
|
|
50
|
+
*/
|
|
11
51
|
loading?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* [ID] : Nama kelas CSS untuk ikon loading (opsional).
|
|
54
|
+
* [EN] : CSS class name for loading icon (optional).
|
|
55
|
+
*/
|
|
12
56
|
classNameIconLoading?: string | undefined;
|
|
13
57
|
}
|
|
@@ -1,11 +1,47 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* [ID] : Tipe varian tombol ikon.
|
|
4
|
+
* [EN] : Button icon variant types.
|
|
5
|
+
*/
|
|
2
6
|
export type TButtonIcomVariants = 'primary-laba-blue-10' | 'primary-red-700-dsb_laba-grey-06' | 'primary-green-700' | 'filled-laba-white_laba-blue-10' | 'filled-laba-white_laba-red-05' | 'ghost-laba-blue-10' | 'ghost-red-700' | 'ghost-green-700' | 'ghost-blue-gray-100-bg_white' | 'ghost-laba-green-10' | 'nude-laba-blue-10' | 'nude-red-700' | 'nude-green-700' | 'nude-gray-500' | 'nude-laba-red-10' | 'nude-laba-red-05' | 'primary-blue-700' | 'primary-red-700' | 'secondary-blue-700' | 'secondary-red-600' | 'secondary-green-600' | 'tertiary-blue-700' | 'tertiary-red-300' | 'tertiary-red-600' | 'tertiary-gray-500' | 'secondary-red-700';
|
|
7
|
+
/**
|
|
8
|
+
* [ID] : Tipe ukuran tombol ikon.
|
|
9
|
+
* [EN] : Button icon size type.
|
|
10
|
+
*/
|
|
3
11
|
export type TButtonIconSize = 'large' | 'reguler' | 'small' | 'extra-small' | 'l' | 'm' | 's' | 'xs';
|
|
12
|
+
/**
|
|
13
|
+
* [ID] : Interface untuk komponen ButtonIcon.
|
|
14
|
+
* [EN] : Interface for ButtonIcon component.
|
|
15
|
+
*/
|
|
4
16
|
export interface IButtonIcon extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
17
|
+
/**
|
|
18
|
+
* [ID] : Ukuran tombol (opsional).
|
|
19
|
+
* [EN] : Button size (optional).
|
|
20
|
+
*/
|
|
5
21
|
size?: TButtonIconSize;
|
|
22
|
+
/**
|
|
23
|
+
* [ID] : Varian gaya tombol (opsional).
|
|
24
|
+
* [EN] : Button style variant (optional).
|
|
25
|
+
*/
|
|
6
26
|
variants?: TButtonIcomVariants;
|
|
27
|
+
/**
|
|
28
|
+
* [ID] : Konten anak (biasanya ikon).
|
|
29
|
+
* [EN] : Child content (usually icon).
|
|
30
|
+
*/
|
|
7
31
|
children: ReactNode | ReactNode[];
|
|
32
|
+
/**
|
|
33
|
+
* [ID] : Nama kelas CSS tambahan (opsional).
|
|
34
|
+
* [EN] : Additional CSS class name (optional).
|
|
35
|
+
*/
|
|
8
36
|
className?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* [ID] : Menentukan apakah tombol dalam keadaan memuat (opsional).
|
|
39
|
+
* [EN] : Determines if the button is in loading state (optional).
|
|
40
|
+
*/
|
|
9
41
|
loading?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* [ID] : Nama kelas CSS untuk ikon loading (opsional).
|
|
44
|
+
* [EN] : CSS class name for loading icon (optional).
|
|
45
|
+
*/
|
|
10
46
|
classNameIconLoading?: string | undefined;
|
|
11
47
|
}
|
|
@@ -1,23 +1,101 @@
|
|
|
1
1
|
import { OffsetOptions, UseFloatingOptions } from '@floating-ui/react';
|
|
2
2
|
import { IPopover } from '../Popover';
|
|
3
3
|
import { IButton } from '../Button';
|
|
4
|
+
/**
|
|
5
|
+
* [ID] : Interface untuk komponen ButtonPopover.
|
|
6
|
+
* [EN] : Interface for ButtonPopover component.
|
|
7
|
+
*/
|
|
4
8
|
export interface IButtonPopover extends IButton {
|
|
9
|
+
/**
|
|
10
|
+
* [ID] : Teks tombol (opsional).
|
|
11
|
+
* [EN] : Button text (optional).
|
|
12
|
+
*/
|
|
5
13
|
text?: string;
|
|
14
|
+
/**
|
|
15
|
+
* [ID] : Ikon yang ditampilkan di awal (opsional).
|
|
16
|
+
* [EN] : Icon shown at the start (optional).
|
|
17
|
+
*/
|
|
6
18
|
startIconShow?: React.ReactNode | React.ReactNode[];
|
|
19
|
+
/**
|
|
20
|
+
* [ID] : Ikon yang ditampilkan di akhir (opsional).
|
|
21
|
+
* [EN] : Icon shown at the end (optional).
|
|
22
|
+
*/
|
|
7
23
|
endIconShow?: React.ReactNode | React.ReactNode[];
|
|
24
|
+
/**
|
|
25
|
+
* [ID] : ID untuk popover (opsional).
|
|
26
|
+
* [EN] : ID for popover (optional).
|
|
27
|
+
*/
|
|
8
28
|
idPopover?: string;
|
|
29
|
+
/**
|
|
30
|
+
* [ID] : Nama kelas CSS untuk tombol (opsional).
|
|
31
|
+
* [EN] : CSS class name for button (optional).
|
|
32
|
+
*/
|
|
9
33
|
classNameButton?: string;
|
|
34
|
+
/**
|
|
35
|
+
* [ID] : Z-index untuk popover (opsional).
|
|
36
|
+
* [EN] : Z-index for popover (optional).
|
|
37
|
+
*/
|
|
10
38
|
zIndexPopover?: number;
|
|
39
|
+
/**
|
|
40
|
+
* [ID] : Opsi offset untuk posisi popover (opsional).
|
|
41
|
+
* [EN] : Offset options for popover position (optional).
|
|
42
|
+
*/
|
|
11
43
|
offset?: OffsetOptions;
|
|
44
|
+
/**
|
|
45
|
+
* [ID] : Properti tambahan untuk popover (opsional).
|
|
46
|
+
* [EN] : Additional properties for popover (optional).
|
|
47
|
+
*/
|
|
12
48
|
popoverProps?: Omit<IPopover, 'children'>;
|
|
49
|
+
/**
|
|
50
|
+
* [ID] : Penempatan popover (opsional).
|
|
51
|
+
* [EN] : Popover placement (optional).
|
|
52
|
+
*/
|
|
13
53
|
placement?: UseFloatingOptions['placement'];
|
|
54
|
+
/**
|
|
55
|
+
* [ID] : Handler saat popover ditutup (opsional).
|
|
56
|
+
* [EN] : Handler when popover is closed (optional).
|
|
57
|
+
*/
|
|
14
58
|
onClose?: () => void;
|
|
59
|
+
/**
|
|
60
|
+
* [ID] : Nama kelas CSS saat tombol aktif/ditampilkan (opsional).
|
|
61
|
+
* [EN] : CSS class name when button is active/shown (optional).
|
|
62
|
+
*/
|
|
15
63
|
classNameButtonShow?: string;
|
|
16
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* [ID] : Interface untuk referensi ButtonPopover.
|
|
67
|
+
* [EN] : Interface for ButtonPopover reference.
|
|
68
|
+
*/
|
|
17
69
|
export interface IRefButtonPopover {
|
|
70
|
+
/**
|
|
71
|
+
* [ID] : Status visibilitas popover.
|
|
72
|
+
* [EN] : Popover visibility status.
|
|
73
|
+
*/
|
|
18
74
|
show: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* [ID] : Fungsi untuk mengatur visibilitas popover.
|
|
77
|
+
* [EN] : Function to set popover visibility.
|
|
78
|
+
* @param e - [ID] : Status visibilitas baru. [EN] : New visibility status.
|
|
79
|
+
*/
|
|
19
80
|
setShow: (e: boolean) => void;
|
|
81
|
+
/**
|
|
82
|
+
* [ID] : Handler untuk menampilkan popover.
|
|
83
|
+
* [EN] : Handler to show popover.
|
|
84
|
+
* @param e - [ID] : Event mouse. [EN] : Mouse event.
|
|
85
|
+
*/
|
|
20
86
|
handlerShow: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
87
|
+
/**
|
|
88
|
+
* [ID] : Handler untuk menutup popover.
|
|
89
|
+
* [EN] : Handler to close popover.
|
|
90
|
+
*/
|
|
21
91
|
handlerClose: () => void;
|
|
22
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* [ID] : Tipe fungsi untuk mendapatkan ikon tombol popover.
|
|
95
|
+
* [EN] : Function type to get popover button icon.
|
|
96
|
+
* @param isShow - [ID] : Status apakah popover ditampilkan. [EN] : Status if popover is shown.
|
|
97
|
+
* @param iconShow - [ID] : Ikon saat ditampilkan. [EN] : Icon when shown.
|
|
98
|
+
* @param iconClose - [ID] : Ikon saat ditutup. [EN] : Icon when closed.
|
|
99
|
+
* @returns [ID] : Ikon yang sesuai. [EN] : Corresponding icon.
|
|
100
|
+
*/
|
|
23
101
|
export type TGetIconButtonPopover = (isShow: boolean, iconShow?: React.ReactNode | React.ReactNode[], iconClose?: IButton['startIcon'] | IButton['endIcon']) => IButton['startIcon'] | IButton['endIcon'];
|
|
@@ -2,89 +2,470 @@ import { CalendarDate } from '@internationalized/date';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { AriaButtonOptions, DateValue, RangeCalendarProps } from 'react-aria';
|
|
4
4
|
import { CalendarState, CalendarStateOptions, DateRangePickerStateOptions, RangeCalendarState } from 'react-stately';
|
|
5
|
+
/**
|
|
6
|
+
* [ID] : Tipe kalender (tanggal, bulan, tahun).
|
|
7
|
+
* [EN] : Calendar type (date, month, year).
|
|
8
|
+
*/
|
|
5
9
|
export type TCalendarType = 'date' | 'month' | 'year';
|
|
10
|
+
/**
|
|
11
|
+
* [ID] : Tipe data tanggal.
|
|
12
|
+
* [EN] : Date data type.
|
|
13
|
+
*/
|
|
6
14
|
export type TDateType = Date | string | null | undefined;
|
|
7
|
-
|
|
15
|
+
/**
|
|
16
|
+
* [ID] : Kunci lokal yang didukung.
|
|
17
|
+
* [EN] : Supported locale keys.
|
|
18
|
+
*/
|
|
19
|
+
export type TKeyLocale = 'id-ID' | 'en-US' | 'nl-NL' | 'zh-CN';
|
|
20
|
+
/**
|
|
21
|
+
* [ID] : Interface untuk ikon navigasi kalender.
|
|
22
|
+
* [EN] : Interface for calendar navigation icons.
|
|
23
|
+
*/
|
|
8
24
|
export interface ICalendarPrevNextIcon {
|
|
25
|
+
/**
|
|
26
|
+
* [ID] : Ikon sebelumnya (opsional).
|
|
27
|
+
* [EN] : Previous icon (optional).
|
|
28
|
+
*/
|
|
9
29
|
prevIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
|
|
30
|
+
/**
|
|
31
|
+
* [ID] : Ikon selanjutnya (opsional).
|
|
32
|
+
* [EN] : Next icon (optional).
|
|
33
|
+
*/
|
|
10
34
|
nextIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
|
|
11
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* [ID] : Interface untuk tombol konfirmasi kalender.
|
|
38
|
+
* [EN] : Interface for calendar confirmation buttons.
|
|
39
|
+
*/
|
|
12
40
|
export interface ICalendarButtonConfirm {
|
|
41
|
+
/**
|
|
42
|
+
* [ID] : Tombol reset (opsional).
|
|
43
|
+
* [EN] : Reset button (optional).
|
|
44
|
+
*/
|
|
13
45
|
buttonReset?: (() => ReactNode) | (() => ReactNode[]);
|
|
46
|
+
/**
|
|
47
|
+
* [ID] : Tombol submit (opsional).
|
|
48
|
+
* [EN] : Submit button (optional).
|
|
49
|
+
*/
|
|
14
50
|
buttonSubmit?: (() => ReactNode) | (() => ReactNode[]);
|
|
15
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* [ID] : Interface untuk waktu kalender.
|
|
54
|
+
* [EN] : Interface for calendar time.
|
|
55
|
+
*/
|
|
16
56
|
export interface ITimeCalendar {
|
|
57
|
+
/**
|
|
58
|
+
* [ID] : Jam (opsional).
|
|
59
|
+
* [EN] : Hour (optional).
|
|
60
|
+
*/
|
|
17
61
|
hour?: number;
|
|
62
|
+
/**
|
|
63
|
+
* [ID] : Menit (opsional).
|
|
64
|
+
* [EN] : Minute (optional).
|
|
65
|
+
*/
|
|
18
66
|
minut?: number;
|
|
67
|
+
/**
|
|
68
|
+
* [ID] : Detik (opsional).
|
|
69
|
+
* [EN] : Second (optional).
|
|
70
|
+
*/
|
|
19
71
|
second?: number;
|
|
20
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* [ID] : Interface untuk rentang waktu kalender.
|
|
75
|
+
* [EN] : Interface for calendar time range.
|
|
76
|
+
*/
|
|
77
|
+
export interface ITimeCalendarRange {
|
|
78
|
+
/**
|
|
79
|
+
* [ID] : Waktu mulai (opsional).
|
|
80
|
+
* [EN] : Start time (optional).
|
|
81
|
+
*/
|
|
82
|
+
start?: ITimeCalendar;
|
|
83
|
+
/**
|
|
84
|
+
* [ID] : Waktu selesai (opsional).
|
|
85
|
+
* [EN] : End time (optional).
|
|
86
|
+
*/
|
|
87
|
+
end?: ITimeCalendar;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* [ID] : Interface utama untuk komponen Kalender.
|
|
91
|
+
* [EN] : Main interface for Calendar component.
|
|
92
|
+
*/
|
|
21
93
|
export interface ICalendar extends CalendarStateOptions<DateValue>, ICalendarPrevNextIcon, ICalendarButtonConfirm {
|
|
94
|
+
/**
|
|
95
|
+
* [ID] : Menampilkan tombol konfirmasi (opsional).
|
|
96
|
+
* [EN] : Show confirm buttons (optional).
|
|
97
|
+
*/
|
|
22
98
|
withConfirm?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* [ID] : Menggunakan waktu kustom (opsional).
|
|
101
|
+
* [EN] : Use custom time (optional).
|
|
102
|
+
*/
|
|
23
103
|
isCustomTime?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* [ID] : Tanggal minimum (opsional).
|
|
106
|
+
* [EN] : Minimum date (optional).
|
|
107
|
+
*/
|
|
24
108
|
minDate?: TDateType;
|
|
109
|
+
/**
|
|
110
|
+
* [ID] : Tanggal maksimum (opsional).
|
|
111
|
+
* [EN] : Maximum date (optional).
|
|
112
|
+
*/
|
|
25
113
|
maxDate?: TDateType;
|
|
26
|
-
|
|
114
|
+
/**
|
|
115
|
+
* [ID] : Rentang waktu (opsional).
|
|
116
|
+
* [EN] : Time range (optional).
|
|
117
|
+
*/
|
|
118
|
+
time?: ITimeCalendarRange;
|
|
119
|
+
/**
|
|
120
|
+
* [ID] : Tipe kalender yang aktif (opsional).
|
|
121
|
+
* [EN] : Active calendar type (optional).
|
|
122
|
+
*/
|
|
27
123
|
activeType?: TCalendarType;
|
|
124
|
+
/**
|
|
125
|
+
* [ID] : Menampilkan pilihan tanggal (opsional).
|
|
126
|
+
* [EN] : Show date selection (optional).
|
|
127
|
+
*/
|
|
28
128
|
withDateSelect?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* [ID] : Tipe-tipe kalender yang tersedia.
|
|
131
|
+
* [EN] : Available calendar types.
|
|
132
|
+
*/
|
|
29
133
|
type: TCalendarType[];
|
|
134
|
+
/**
|
|
135
|
+
* [ID] : Tipe waktu (SINGLE atau RANGE) (opsional).
|
|
136
|
+
* [EN] : Time type (SINGLE or RANGE) (optional).
|
|
137
|
+
*/
|
|
138
|
+
typeTime?: 'SINGLE' | 'RANGE';
|
|
139
|
+
/**
|
|
140
|
+
* [ID] : Menyembunyikan header (opsional).
|
|
141
|
+
* [EN] : Hide header (optional).
|
|
142
|
+
*/
|
|
30
143
|
hiddenHeader?: boolean;
|
|
31
|
-
|
|
144
|
+
/**
|
|
145
|
+
* [ID] : Handler perubahan waktu (opsional).
|
|
146
|
+
* [EN] : Time change handler (optional).
|
|
147
|
+
* @param v - [ID] : Rentang waktu baru. [EN] : New time range.
|
|
148
|
+
*/
|
|
149
|
+
handlerChangeTime?: (v: ITimeCalendarRange) => void;
|
|
150
|
+
/**
|
|
151
|
+
* [ID] : Handler reset kalender.
|
|
152
|
+
* [EN] : Calendar reset handler.
|
|
153
|
+
* @param v - [ID] : State kalender. [EN] : Calendar state.
|
|
154
|
+
*/
|
|
32
155
|
handlerReset: (v: CalendarState) => void;
|
|
156
|
+
/**
|
|
157
|
+
* [ID] : Handler submit kalender.
|
|
158
|
+
* [EN] : Calendar submit handler.
|
|
159
|
+
*/
|
|
33
160
|
handlerSubmit: () => void;
|
|
34
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* [ID] : Interface untuk pilihan tanggal kalender.
|
|
164
|
+
* [EN] : Interface for calendar date selection.
|
|
165
|
+
*/
|
|
35
166
|
export interface ICalendarDateSelect extends CalendarStateOptions<DateValue>, ICalendarPrevNextIcon {
|
|
167
|
+
/**
|
|
168
|
+
* [ID] : State kalender.
|
|
169
|
+
* [EN] : Calendar state.
|
|
170
|
+
*/
|
|
36
171
|
state: CalendarState;
|
|
172
|
+
/**
|
|
173
|
+
* [ID] : Menyembunyikan header (opsional).
|
|
174
|
+
* [EN] : Hide header (optional).
|
|
175
|
+
*/
|
|
37
176
|
hiddenHeader?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* [ID] : Fungsi untuk mengatur tipe kalender aktif.
|
|
179
|
+
* [EN] : Function to set active calendar type.
|
|
180
|
+
* @param v - [ID] : Tipe kalender. [EN] : Calendar type.
|
|
181
|
+
*/
|
|
38
182
|
setActiveTypeCalendar: (v: TCalendarType) => void;
|
|
39
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* [ID] : Interface untuk waktu kustom kalender.
|
|
186
|
+
* [EN] : Interface for custom calendar time.
|
|
187
|
+
*/
|
|
40
188
|
export interface ICustomTimeCalendar {
|
|
189
|
+
/**
|
|
190
|
+
* [ID] : Waktu (opsional).
|
|
191
|
+
* [EN] : Time (optional).
|
|
192
|
+
*/
|
|
41
193
|
time?: ITimeCalendar;
|
|
194
|
+
/**
|
|
195
|
+
* [ID] : Nilai tanggal (opsional).
|
|
196
|
+
* [EN] : Date value (optional).
|
|
197
|
+
*/
|
|
42
198
|
value?: DateValue | null | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* [ID] : Tanggal minimum (opsional).
|
|
201
|
+
* [EN] : Minimum date (optional).
|
|
202
|
+
*/
|
|
43
203
|
minDate?: TDateType;
|
|
204
|
+
/**
|
|
205
|
+
* [ID] : Tanggal maksimum (opsional).
|
|
206
|
+
* [EN] : Maximum date (optional).
|
|
207
|
+
*/
|
|
44
208
|
maxDate?: TDateType;
|
|
209
|
+
/**
|
|
210
|
+
* [ID] : Label waktu (opsional).
|
|
211
|
+
* [EN] : Time label (optional).
|
|
212
|
+
*/
|
|
213
|
+
timeLabel?: string;
|
|
214
|
+
/**
|
|
215
|
+
* [ID] : Menyembunyikan header (opsional).
|
|
216
|
+
* [EN] : Hide header (optional).
|
|
217
|
+
*/
|
|
45
218
|
hiddenHeader?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* [ID] : Tipe waktu (mulai atau selesai).
|
|
221
|
+
* [EN] : Time type (start or end).
|
|
222
|
+
*/
|
|
223
|
+
type: 'start' | 'end';
|
|
224
|
+
/**
|
|
225
|
+
* [ID] : Handler perubahan waktu (opsional).
|
|
226
|
+
* [EN] : Time change handler (optional).
|
|
227
|
+
* @param v - [ID] : Waktu baru. [EN] : New time.
|
|
228
|
+
*/
|
|
46
229
|
handlerChangeTime?: (v: ITimeCalendar) => void;
|
|
47
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* [ID] : Interface untuk tombol kalender.
|
|
233
|
+
* [EN] : Interface for calendar button.
|
|
234
|
+
*/
|
|
48
235
|
export interface ICalendarButton extends AriaButtonOptions<'button'> {
|
|
236
|
+
/**
|
|
237
|
+
* [ID] : Konten anak tombol.
|
|
238
|
+
* [EN] : Button child content.
|
|
239
|
+
*/
|
|
49
240
|
children: ReactNode | ReactNode[];
|
|
50
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* [ID] : Interface untuk sel kalender.
|
|
244
|
+
* [EN] : Interface for calendar cell.
|
|
245
|
+
*/
|
|
51
246
|
export interface ICalendarCell {
|
|
247
|
+
/**
|
|
248
|
+
* [ID] : State kalender.
|
|
249
|
+
* [EN] : Calendar state.
|
|
250
|
+
*/
|
|
52
251
|
state: RangeCalendarState | CalendarState;
|
|
252
|
+
/**
|
|
253
|
+
* [ID] : Tanggal sel.
|
|
254
|
+
* [EN] : Cell date.
|
|
255
|
+
*/
|
|
53
256
|
date: CalendarDate;
|
|
54
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* [ID] : Interface untuk tampilan bulan kalender.
|
|
260
|
+
* [EN] : Interface for calendar month view.
|
|
261
|
+
*/
|
|
55
262
|
export interface ICalendarMonth extends ICalendarPrevNextIcon {
|
|
263
|
+
/**
|
|
264
|
+
* [ID] : State kalender.
|
|
265
|
+
* [EN] : Calendar state.
|
|
266
|
+
*/
|
|
56
267
|
state: CalendarState | RangeCalendarState;
|
|
268
|
+
/**
|
|
269
|
+
* [ID] : Tipe-tipe kalender yang tersedia.
|
|
270
|
+
* [EN] : Available calendar types.
|
|
271
|
+
*/
|
|
57
272
|
type: TCalendarType[];
|
|
273
|
+
/**
|
|
274
|
+
* [ID] : Fungsi untuk mengatur tipe kalender aktif.
|
|
275
|
+
* [EN] : Function to set active calendar type.
|
|
276
|
+
* @param v - [ID] : Tipe kalender. [EN] : Calendar type.
|
|
277
|
+
*/
|
|
58
278
|
setActiveTypeCalendar: (v: TCalendarType) => void;
|
|
279
|
+
/**
|
|
280
|
+
* [ID] : Menampilkan pilihan tanggal (opsional).
|
|
281
|
+
* [EN] : Show date selection (optional).
|
|
282
|
+
*/
|
|
59
283
|
withDateSelect?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* [ID] : Handler perubahan bulan (opsional).
|
|
286
|
+
* [EN] : Month change handler (optional).
|
|
287
|
+
* @param v - [ID] : Tanggal baru. [EN] : New date.
|
|
288
|
+
*/
|
|
60
289
|
onChangeMonth?: (v: CalendarDate) => void;
|
|
290
|
+
/**
|
|
291
|
+
* [ID] : Menyembunyikan header (opsional).
|
|
292
|
+
* [EN] : Hide header (optional).
|
|
293
|
+
*/
|
|
61
294
|
hiddenHeader?: boolean;
|
|
62
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* [ID] : Interface untuk pengaturan tahun.
|
|
298
|
+
* [EN] : Interface for year setup.
|
|
299
|
+
*/
|
|
63
300
|
export interface ISetUpYear {
|
|
301
|
+
/**
|
|
302
|
+
* [ID] : Tahun mulai.
|
|
303
|
+
* [EN] : Start year.
|
|
304
|
+
*/
|
|
64
305
|
startYear: number;
|
|
306
|
+
/**
|
|
307
|
+
* [ID] : Akhir setelah tahun ini.
|
|
308
|
+
* [EN] : End after this year.
|
|
309
|
+
*/
|
|
65
310
|
endAfterThisYear: number;
|
|
66
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* [ID] : Interface untuk tampilan tahun kalender.
|
|
314
|
+
* [EN] : Interface for calendar year view.
|
|
315
|
+
*/
|
|
67
316
|
export interface ICalendarYear {
|
|
317
|
+
/**
|
|
318
|
+
* [ID] : Judul tampilan tahun.
|
|
319
|
+
* [EN] : Year view title.
|
|
320
|
+
*/
|
|
68
321
|
title: string;
|
|
322
|
+
/**
|
|
323
|
+
* [ID] : State kalender.
|
|
324
|
+
* [EN] : Calendar state.
|
|
325
|
+
*/
|
|
69
326
|
state: CalendarState | RangeCalendarState;
|
|
327
|
+
/**
|
|
328
|
+
* [ID] : Pengaturan tahun (opsional).
|
|
329
|
+
* [EN] : Year setup (optional).
|
|
330
|
+
*/
|
|
70
331
|
setUpYear?: ISetUpYear;
|
|
332
|
+
/**
|
|
333
|
+
* [ID] : Tipe-tipe kalender yang tersedia.
|
|
334
|
+
* [EN] : Available calendar types.
|
|
335
|
+
*/
|
|
71
336
|
type: TCalendarType[];
|
|
337
|
+
/**
|
|
338
|
+
* [ID] : Fungsi untuk mengatur tipe kalender aktif.
|
|
339
|
+
* [EN] : Function to set active calendar type.
|
|
340
|
+
* @param v - [ID] : Tipe kalender. [EN] : Calendar type.
|
|
341
|
+
*/
|
|
72
342
|
setActiveTypeCalendar: (v: TCalendarType) => void;
|
|
343
|
+
/**
|
|
344
|
+
* [ID] : Handler perubahan tahun (opsional).
|
|
345
|
+
* [EN] : Year change handler (optional).
|
|
346
|
+
* @param v - [ID] : Tanggal baru. [EN] : New date.
|
|
347
|
+
*/
|
|
73
348
|
onChangeYear?: (v: CalendarDate) => void;
|
|
349
|
+
/**
|
|
350
|
+
* [ID] : Menyembunyikan header (opsional).
|
|
351
|
+
* [EN] : Hide header (optional).
|
|
352
|
+
*/
|
|
74
353
|
hiddenHeader?: boolean;
|
|
75
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* [ID] : Interface untuk rentang tanggal.
|
|
357
|
+
* [EN] : Interface for date range.
|
|
358
|
+
*/
|
|
76
359
|
export interface IDateRange {
|
|
360
|
+
/**
|
|
361
|
+
* [ID] : Tanggal mulai.
|
|
362
|
+
* [EN] : Start date.
|
|
363
|
+
*/
|
|
77
364
|
startDate: TDateType;
|
|
365
|
+
/**
|
|
366
|
+
* [ID] : Tanggal selesai.
|
|
367
|
+
* [EN] : End date.
|
|
368
|
+
*/
|
|
78
369
|
endDate: TDateType;
|
|
370
|
+
/**
|
|
371
|
+
* [ID] : Label rentang (opsional).
|
|
372
|
+
* [EN] : Range label (optional).
|
|
373
|
+
*/
|
|
79
374
|
label?: string;
|
|
80
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* [ID] : Interface untuk kalender rentang tanggal.
|
|
378
|
+
* [EN] : Interface for date range calendar.
|
|
379
|
+
*/
|
|
81
380
|
export interface ICalendarDateRange extends RangeCalendarProps<DateValue>, ICalendarPrevNextIcon, ICalendarButtonConfirm {
|
|
381
|
+
/**
|
|
382
|
+
* [ID] : Menampilkan tombol konfirmasi (opsional).
|
|
383
|
+
* [EN] : Show confirm buttons (optional).
|
|
384
|
+
*/
|
|
82
385
|
withConfirm?: boolean;
|
|
386
|
+
/**
|
|
387
|
+
* [ID] : Menggunakan waktu kustom (opsional).
|
|
388
|
+
* [EN] : Use custom time (optional).
|
|
389
|
+
*/
|
|
390
|
+
isCustomTime?: boolean;
|
|
391
|
+
/**
|
|
392
|
+
* [ID] : Tanggal minimum (opsional).
|
|
393
|
+
* [EN] : Minimum date (optional).
|
|
394
|
+
*/
|
|
395
|
+
minDate?: TDateType;
|
|
396
|
+
/**
|
|
397
|
+
* [ID] : Tanggal maksimum (opsional).
|
|
398
|
+
* [EN] : Maximum date (optional).
|
|
399
|
+
*/
|
|
400
|
+
maxDate?: TDateType;
|
|
401
|
+
/**
|
|
402
|
+
* [ID] : Rentang waktu (opsional).
|
|
403
|
+
* [EN] : Time range (optional).
|
|
404
|
+
*/
|
|
405
|
+
time?: ITimeCalendarRange;
|
|
406
|
+
/**
|
|
407
|
+
* [ID] : Handler perubahan rentang waktu (opsional).
|
|
408
|
+
* [EN] : Time range change handler (optional).
|
|
409
|
+
* @param v - [ID] : Rentang waktu baru. [EN] : New time range.
|
|
410
|
+
*/
|
|
411
|
+
handlerChangeTimeRange?: (v: ITimeCalendarRange) => void;
|
|
412
|
+
/**
|
|
413
|
+
* [ID] : Handler submit.
|
|
414
|
+
* [EN] : Submit handler.
|
|
415
|
+
*/
|
|
83
416
|
handlerSubmit: () => void;
|
|
417
|
+
/**
|
|
418
|
+
* [ID] : Handler reset.
|
|
419
|
+
* [EN] : Reset handler.
|
|
420
|
+
* @param v - [ID] : State kalender rentang. [EN] : Range calendar state.
|
|
421
|
+
*/
|
|
84
422
|
handlerReset: (v: RangeCalendarState) => void;
|
|
85
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* [ID] : Interface untuk kalender rentang.
|
|
426
|
+
* [EN] : Interface for range calendar.
|
|
427
|
+
*/
|
|
86
428
|
export interface ICalendarRange extends DateRangePickerStateOptions, ICalendarPrevNextIcon, ICalendarButtonConfirm {
|
|
429
|
+
/**
|
|
430
|
+
* [ID] : Menampilkan tombol konfirmasi (opsional).
|
|
431
|
+
* [EN] : Show confirm buttons (optional).
|
|
432
|
+
*/
|
|
87
433
|
withConfirm?: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* [ID] : Menggunakan waktu kustom (opsional).
|
|
436
|
+
* [EN] : Use custom time (optional).
|
|
437
|
+
*/
|
|
438
|
+
isCustomTime?: boolean;
|
|
439
|
+
/**
|
|
440
|
+
* [ID] : Tanggal minimum (opsional).
|
|
441
|
+
* [EN] : Minimum date (optional).
|
|
442
|
+
*/
|
|
443
|
+
minDate?: TDateType;
|
|
444
|
+
/**
|
|
445
|
+
* [ID] : Tanggal maksimum (opsional).
|
|
446
|
+
* [EN] : Maximum date (optional).
|
|
447
|
+
*/
|
|
448
|
+
maxDate?: TDateType;
|
|
449
|
+
/**
|
|
450
|
+
* [ID] : Rentang waktu (opsional).
|
|
451
|
+
* [EN] : Time range (optional).
|
|
452
|
+
*/
|
|
453
|
+
time?: ITimeCalendarRange;
|
|
454
|
+
/**
|
|
455
|
+
* [ID] : Handler perubahan rentang waktu (opsional).
|
|
456
|
+
* [EN] : Time range change handler (optional).
|
|
457
|
+
* @param v - [ID] : Rentang waktu baru. [EN] : New time range.
|
|
458
|
+
*/
|
|
459
|
+
handlerChangeTimeRange?: (v: ITimeCalendarRange) => void;
|
|
460
|
+
/**
|
|
461
|
+
* [ID] : Handler submit.
|
|
462
|
+
* [EN] : Submit handler.
|
|
463
|
+
*/
|
|
88
464
|
handlerSubmit: () => void;
|
|
465
|
+
/**
|
|
466
|
+
* [ID] : Handler reset.
|
|
467
|
+
* [EN] : Reset handler.
|
|
468
|
+
* @param v - [ID] : State kalender rentang. [EN] : Range calendar state.
|
|
469
|
+
*/
|
|
89
470
|
handlerReset: (v: RangeCalendarState) => void;
|
|
90
471
|
}
|