1mpacto-react-ui 0.2.0-beta.9 → 1.0.1
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/toast.css +98 -194
- package/dist/assets/typography.css +96 -0
- package/dist/index.cjs +120 -117
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +27703 -27059
- package/dist/package.json.d.ts +46 -47
- package/dist/src/components/Alert/index.d.ts +1 -0
- package/dist/src/components/Badges/Badges.config.d.ts +57 -0
- package/dist/src/components/Badges/Badges.d.ts +1 -0
- package/dist/src/components/Badges/Badges.stories.d.ts +117 -2
- package/dist/src/components/Breadcrumbs/Breadcrumbs.config.d.ts +113 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +2 -1
- package/dist/src/components/Breadcrumbs/Breadcrumbs.stories.d.ts +221 -6
- package/dist/src/components/Button/Button.config.d.ts +70 -0
- package/dist/src/components/Button/Button.d.ts +1 -0
- package/dist/src/components/Button/Button.stories.d.ts +129 -4
- package/dist/src/components/ButtonIcon/ButtonIcon.config.d.ts +53 -0
- package/dist/src/components/ButtonIcon/ButtonIcon.d.ts +1 -0
- package/dist/src/components/ButtonIcon/ButtonIcon.stories.d.ts +123 -4
- package/dist/src/components/ButtonPopover/ButtonPopover.d.ts +1 -0
- package/dist/src/components/ButtonPopover/ButtonPopover.stories.d.ts +258 -2
- package/dist/src/components/Calendar/Calendar.d.ts +3 -1
- package/dist/src/components/Calendar/Calendar.stories.d.ts +283 -2
- package/dist/src/components/Calendar/CalendarButton.d.ts +1 -0
- package/dist/src/components/Calendar/CalendarCell.d.ts +1 -0
- package/dist/src/components/Calendar/CalendarMonth.d.ts +1 -0
- package/dist/src/components/Calendar/CalendarRange.d.ts +1 -0
- package/dist/src/components/Calendar/CalendarYear.d.ts +1 -0
- package/dist/src/components/Chart/DoughnutChart.d.ts +1 -0
- package/dist/src/components/Chart/GradientBarChart.d.ts +1 -0
- package/dist/src/components/Chart/GradientBarChart.stories.d.ts +71 -4
- package/dist/src/components/Chart/GradientLineChart.d.ts +1 -0
- package/dist/src/components/Chart/GradientLineChart.stories.d.ts +82 -4
- package/dist/src/components/Chart/LineChart.d.ts +1 -0
- package/dist/src/components/Chart/LineChart.stories.d.ts +35 -2
- package/dist/src/components/Chips/Chips.config.d.ts +35 -0
- package/dist/src/components/Chips/Chips.d.ts +1 -0
- package/dist/src/components/Chips/Chips.stories.d.ts +137 -2
- package/dist/src/components/Collapse/Collapse.d.ts +1 -0
- package/dist/src/components/Collapse/Collapse.stories.d.ts +89 -2
- package/dist/src/components/Collapse/CollapseV2.d.ts +1 -0
- package/dist/src/components/Collapse/CollapseV2.stories.d.ts +59 -2
- package/dist/src/components/Colors/Colors.stories.d.ts +2 -1
- package/dist/src/components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/src/components/DatePicker/DatePicker.stories.d.ts +221 -2
- package/dist/src/components/DatePicker/DateRangePicker.d.ts +1 -0
- package/dist/src/components/DatePicker/FilterDate.d.ts +2 -1
- package/dist/src/components/DatePicker/FilterDate.stories.d.ts +232 -3
- package/dist/src/components/DatePicker/MonthYearPicker.d.ts +1 -0
- package/dist/src/components/DatePicker/MonthYearPicker.stories.d.ts +198 -2
- package/dist/src/components/ErrorMessage/ErrorMessage.config.d.ts +8 -0
- package/dist/src/components/ErrorMessage/ErrorMessage.d.ts +1 -0
- package/dist/src/components/ErrorMessage/ErrorMessage.stories.d.ts +39 -2
- package/dist/src/components/FilterContainer/FilterContainer.d.ts +1 -0
- package/dist/src/components/FilterContainer/FilterContainer.stories.d.ts +165 -0
- package/dist/src/components/Input/InputFloatingInner.config.d.ts +9 -0
- package/dist/src/components/Input/InputFloatingInner.d.ts +1 -0
- package/dist/src/components/Input/InputFloatingInner.stories.d.ts +177 -6
- package/dist/src/components/Input/InputInnerLabel.config.d.ts +8 -0
- package/dist/src/components/Input/InputInnerLabel.d.ts +5 -0
- package/dist/src/components/Input/InputInnerLabel.stories.d.ts +205 -0
- package/dist/src/components/Input/InputNative.config.d.ts +9 -0
- package/dist/src/components/Input/InputNative.d.ts +1 -0
- package/dist/src/components/Input/InputNative.stories.d.ts +149 -5
- package/dist/src/components/Input/InputReguler.config.d.ts +9 -0
- package/dist/src/components/Input/InputReguler.d.ts +1 -0
- package/dist/src/components/Input/InputReguler.stories.d.ts +177 -6
- package/dist/src/components/Modal/ModalDialog.config.d.ts +9 -0
- package/dist/src/components/Modal/ModalDialog.d.ts +1 -0
- package/dist/src/components/Modal/ModalDialog.stories.d.ts +121 -2
- package/dist/src/components/NumberFormat/NumberFormat.d.ts +1 -0
- package/dist/src/components/NumberFormat/NumberFormat.stories.d.ts +373 -18
- package/dist/src/components/Pagination/Pagination.config.d.ts +5 -0
- package/dist/src/components/Pagination/Pagination.d.ts +2 -1
- package/dist/src/components/Pagination/Pagination.stories.d.ts +200 -3
- package/dist/src/components/Popover/Popover.d.ts +1 -0
- package/dist/src/components/Popover/Popover.stories.d.ts +216 -7
- package/dist/src/components/PortalComponent/PortalComponent.d.ts +1 -0
- package/dist/src/components/PortalComponent/PortalComponent.stories.d.ts +61 -0
- package/dist/src/components/RadioCheckbox/CheckboxTable.d.ts +1 -0
- package/dist/src/components/RadioCheckbox/RadioCheckbox.config.d.ts +41 -0
- package/dist/src/components/RadioCheckbox/RadioCheckbox.d.ts +1 -0
- package/dist/src/components/RadioCheckbox/RadioCheckbox.stories.d.ts +230 -8
- package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.config.d.ts +25 -0
- package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.d.ts +1 -0
- package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.stories.d.ts +196 -4
- package/dist/src/components/SelectDropdownContainer/SelectDropdownContainer.config.d.ts +26 -0
- package/dist/src/components/SelectDropdownContainer/SelectDropdownContainer.d.ts +2 -1
- package/dist/src/components/SelectDropdownContainer/SelectDropdownContainer.stories.d.ts +5 -4
- package/dist/src/components/SelectDropdownContainer/styleConfig.d.ts +5 -1
- package/dist/src/components/Sidebar/ItemSidebar.config.d.ts +34 -0
- package/dist/src/components/Sidebar/ItemSidebar.d.ts +1 -0
- package/dist/src/components/Sidebar/Sidebar.config.d.ts +16 -0
- package/dist/src/components/Sidebar/Sidebar.d.ts +2 -1
- package/dist/src/components/Sidebar/Sidebar.stories.d.ts +6 -5
- package/dist/src/components/Step/Step.d.ts +1 -0
- package/dist/src/components/Step/Step.stories.d.ts +135 -2
- package/dist/src/components/Step/StepIndicator.d.ts +1 -0
- package/dist/src/components/Step/StepIndicator.stories.d.ts +148 -2
- package/dist/src/components/Switch/Switch.config.d.ts +26 -0
- package/dist/src/components/Switch/Switch.d.ts +1 -0
- package/dist/src/components/Switch/Switch.stories.d.ts +128 -2
- package/dist/src/components/Table/Table.config.d.ts +5 -0
- package/dist/src/components/Table/Table.d.ts +3 -3
- package/dist/src/components/Table/Table.stories.d.ts +71 -52
- package/dist/src/components/Table/TableSubMobile.d.ts +4 -0
- package/dist/src/components/Tabs/TabPanel.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.config.d.ts +31 -0
- package/dist/src/components/Tabs/Tabs.d.ts +2 -1
- package/dist/src/components/Tabs/Tabs.stories.d.ts +220 -3
- package/dist/src/components/TextEditor/TextEditor.d.ts +1 -0
- package/dist/src/components/TextEditor/TextEditor.stories.d.ts +59 -10
- package/dist/src/components/Textarea/Textarea.config.d.ts +31 -0
- package/dist/src/components/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/Textarea/Textarea.stories.d.ts +250 -3
- package/dist/src/components/Textarea/TextareaFloatingInner.config.d.ts +6 -0
- package/dist/src/components/Textarea/TextareaFloatingInner.d.ts +1 -0
- package/dist/src/components/Textarea/TextareaFloatingInner.stories.d.ts +260 -3
- package/dist/src/components/Textarea/TextareaInnerLabel.config.d.ts +7 -0
- package/dist/src/components/Textarea/TextareaInnerLabel.d.ts +5 -0
- package/dist/src/components/Textarea/TextareaInnerLabel.stories.d.ts +259 -0
- package/dist/src/components/TimeRange/TimeRange.d.ts +4 -0
- package/dist/src/components/TimeRange/TimeRange.stories.d.ts +186 -0
- package/dist/src/components/Timeline/Timeline.d.ts +1 -0
- package/dist/src/components/Timeline/Timeline.stories.d.ts +40 -2
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.stories.d.ts +159 -2
- package/dist/src/components/TruncateComponent/TruncateComponent.d.ts +1 -0
- package/dist/src/components/TruncateComponent/TruncateComponent.stories.d.ts +106 -2
- package/dist/src/components/Typography/Typography.stories.d.ts +2 -1
- package/dist/src/components/Upload/UploadFile.d.ts +1 -0
- package/dist/src/components/Upload/UploadFile.stories.d.ts +127 -2
- package/dist/src/components/Upload/UploadImage.d.ts +2 -1
- package/dist/src/components/Upload/UploadImage.stories.d.ts +145 -3
- package/dist/src/components/Upload/UploadMultipleFile.d.ts +2 -1
- package/dist/src/components/Upload/UploadMultipleFile.stories.d.ts +190 -3
- package/dist/src/components/Virtualization/ListVirtualization.d.ts +1 -0
- package/dist/src/components/Virtualization/ListVirtualization.stories.d.ts +279 -2
- package/dist/src/components/Virtualization/TableVirtualization.d.ts +1 -0
- package/dist/src/components/Virtualization/TableVirtualization.stories.d.ts +296 -2
- package/dist/src/components/index.d.ts +15 -8
- package/dist/src/components/screens/Screens.stories.d.ts +14 -0
- package/dist/src/config/bigNumber/index.d.ts +1 -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/tinymce.d.ts +1 -0
- package/dist/src/config/components/typography.d.ts +3 -49
- package/dist/src/config/tailwind/index.d.ts +3 -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 +6 -3
- package/dist/src/hooks/useAsyncDebounce.d.ts +9 -0
- package/dist/src/hooks/useCombinedResizeObserver.d.ts +67 -0
- package/dist/src/hooks/useCountdown.d.ts +67 -3
- package/dist/src/hooks/useDeepCompareEffect.d.ts +14 -0
- package/dist/src/hooks/useElementOrWindowMediaQuery.d.ts +9 -0
- package/dist/src/hooks/useEventListener.d.ts +28 -0
- package/dist/src/hooks/useMasonry.d.ts +80 -0
- package/dist/src/hooks/useMergeRefs.d.ts +27 -0
- package/dist/src/hooks/useOtpInput.d.ts +200 -0
- package/dist/src/hooks/useStateRef.d.ts +9 -0
- package/dist/src/interfaces/components/Alert/index.d.ts +9 -0
- package/dist/src/interfaces/components/Badges/index.d.ts +31 -1
- package/dist/src/interfaces/components/Breadcrumbs/index.d.ts +86 -2
- package/dist/src/interfaces/components/Button/index.d.ts +47 -2
- package/dist/src/interfaces/components/ButtonIcon/index.d.ts +37 -0
- package/dist/src/interfaces/components/ButtonPopover/index.d.ts +79 -0
- package/dist/src/interfaces/components/Calendar/index.d.ts +385 -3
- package/dist/src/interfaces/components/Chart/index.d.ts +461 -0
- package/dist/src/interfaces/components/Checkbox/index.d.ts +13 -0
- package/dist/src/interfaces/components/Chips/index.d.ts +39 -1
- package/dist/src/interfaces/components/Collapse/index.d.ts +61 -0
- package/dist/src/interfaces/components/DatePicker/index.d.ts +278 -1
- package/dist/src/interfaces/components/ErrorMessage/index.d.ts +17 -1
- package/dist/src/interfaces/components/FilterContainer/index.d.ts +103 -0
- package/dist/src/interfaces/components/Input/index.d.ts +194 -0
- package/dist/src/interfaces/components/Modal/index.d.ts +46 -0
- package/dist/src/interfaces/components/NumberFormat/index.d.ts +26 -0
- package/dist/src/interfaces/components/Pagination/index.d.ts +84 -0
- package/dist/src/interfaces/components/Popover/index.d.ts +99 -1
- package/dist/src/interfaces/components/RadioCheckbox/RadioCheckbox.d.ts +60 -2
- package/dist/src/interfaces/components/RadioCheckbox/RadioCheckboxLabel.d.ts +47 -1
- package/dist/src/interfaces/components/SelectDropdownContainer/index.d.ts +197 -2
- package/dist/src/interfaces/components/Sidebar/index.d.ts +230 -1
- package/dist/src/interfaces/components/Step/index.d.ts +154 -0
- package/dist/src/interfaces/components/Switch/index.d.ts +54 -1
- package/dist/src/interfaces/components/Table/index.d.ts +403 -6
- package/dist/src/interfaces/components/Tabs/index.d.ts +131 -1
- package/dist/src/interfaces/components/TextEditor/index.d.ts +13 -0
- package/dist/src/interfaces/components/Textarea/index.d.ts +170 -0
- package/dist/src/interfaces/components/TimeRange/index.d.ts +129 -0
- package/dist/src/interfaces/components/Timeline/index.d.ts +37 -0
- package/dist/src/interfaces/components/Tooltip/index.d.ts +57 -0
- package/dist/src/interfaces/components/TruncateComponent/index.d.ts +34 -0
- package/dist/src/interfaces/components/UploadFile/index.d.ts +187 -0
- package/dist/src/interfaces/components/Virtualization/ListVirtualization.d.ts +139 -0
- package/dist/src/interfaces/components/Virtualization/TableVirtualization.d.ts +144 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/utils/common.d.ts +5 -4
- package/dist/src/utils/constant.d.ts +1 -0
- package/dist/types-external/table.d.ts +3 -0
- package/package.json +46 -47
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -1,30 +1,200 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* [ID] : Interface untuk komponen Textarea.
|
|
5
|
+
* [EN] : Interface for Textarea component.
|
|
6
|
+
*/
|
|
2
7
|
export interface ITextarea extends React.InputHTMLAttributes<HTMLTextAreaElement> {
|
|
8
|
+
/**
|
|
9
|
+
* [ID] : Nama kelas CSS untuk kontainer (opsional).
|
|
10
|
+
* [EN] : CSS class name for container (optional).
|
|
11
|
+
*/
|
|
3
12
|
classNameContainer?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* [ID] : ID elemen (opsional).
|
|
15
|
+
* [EN] : Element ID (optional).
|
|
16
|
+
*/
|
|
4
17
|
id?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* [ID] : Label textarea (opsional).
|
|
20
|
+
* [EN] : Textarea label (optional).
|
|
21
|
+
*/
|
|
5
22
|
label?: string;
|
|
23
|
+
/**
|
|
24
|
+
* [ID] : Tipe input (opsional).
|
|
25
|
+
* [EN] : Input type (optional).
|
|
26
|
+
*/
|
|
6
27
|
type?: string;
|
|
28
|
+
/**
|
|
29
|
+
* [ID] : Menandakan wajib diisi (opsional).
|
|
30
|
+
* [EN] : Indicates required (optional).
|
|
31
|
+
*/
|
|
7
32
|
isRequired?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* [ID] : Pesan error (opsional).
|
|
35
|
+
* [EN] : Error message (optional).
|
|
36
|
+
*/
|
|
8
37
|
error?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* [ID] : Ukuran input (opsional).
|
|
40
|
+
* [EN] : Input size (optional).
|
|
41
|
+
*/
|
|
9
42
|
sizeInput?: 'medium' | 'm' | 'medium-border-bottom';
|
|
43
|
+
/**
|
|
44
|
+
* [ID] : Varian gaya (opsional).
|
|
45
|
+
* [EN] : Style variant (optional).
|
|
46
|
+
*/
|
|
10
47
|
variant?: 'solid-blue-300' | 'dashed-blue-300' | 'solid-laba-blue-10' | 'dashed-laba-blue-10' | 'border-bottom-laba-blue-08';
|
|
48
|
+
/**
|
|
49
|
+
* [ID] : Nama kelas CSS untuk label (opsional).
|
|
50
|
+
* [EN] : CSS class name for label (optional).
|
|
51
|
+
*/
|
|
11
52
|
classNameLabel?: string | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* [ID] : Nama kelas CSS untuk label error (opsional).
|
|
55
|
+
* [EN] : CSS class name for error label (optional).
|
|
56
|
+
*/
|
|
12
57
|
classNameLabelError?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* [ID] : Tinggi maksimum (opsional).
|
|
60
|
+
* [EN] : Maximum height (optional).
|
|
61
|
+
*/
|
|
13
62
|
maxHeight?: number;
|
|
63
|
+
/**
|
|
64
|
+
* [ID] : Tinggi minimum (opsional).
|
|
65
|
+
* [EN] : Minimum height (optional).
|
|
66
|
+
*/
|
|
14
67
|
minHeight?: number;
|
|
15
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* [ID] : Interface untuk textarea dengan label mengambang di dalam.
|
|
71
|
+
* [EN] : Interface for textarea with floating inner label.
|
|
72
|
+
*/
|
|
16
73
|
export interface ITextareaFloatingInner extends React.InputHTMLAttributes<HTMLTextAreaElement> {
|
|
74
|
+
/**
|
|
75
|
+
* [ID] : Nama kelas CSS untuk kontainer (opsional).
|
|
76
|
+
* [EN] : CSS class name for container (optional).
|
|
77
|
+
*/
|
|
17
78
|
classNameContainer?: string | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* [ID] : ID elemen (opsional).
|
|
81
|
+
* [EN] : Element ID (optional).
|
|
82
|
+
*/
|
|
18
83
|
id?: string | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* [ID] : Label textarea (opsional).
|
|
86
|
+
* [EN] : Textarea label (optional).
|
|
87
|
+
*/
|
|
19
88
|
label?: string;
|
|
89
|
+
/**
|
|
90
|
+
* [ID] : Tipe input (opsional).
|
|
91
|
+
* [EN] : Input type (optional).
|
|
92
|
+
*/
|
|
20
93
|
type?: string;
|
|
94
|
+
/**
|
|
95
|
+
* [ID] : Menandakan wajib diisi (opsional).
|
|
96
|
+
* [EN] : Indicates required (optional).
|
|
97
|
+
*/
|
|
21
98
|
isRequired?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* [ID] : Pesan error (opsional).
|
|
101
|
+
* [EN] : Error message (optional).
|
|
102
|
+
*/
|
|
22
103
|
error?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* [ID] : Ukuran input (opsional).
|
|
106
|
+
* [EN] : Input size (optional).
|
|
107
|
+
*/
|
|
23
108
|
sizeInput?: 'medium';
|
|
109
|
+
/**
|
|
110
|
+
* [ID] : Nama kelas CSS untuk label (opsional).
|
|
111
|
+
* [EN] : CSS class name for label (optional).
|
|
112
|
+
*/
|
|
24
113
|
classNameLabel?: string | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* [ID] : Nama kelas CSS untuk label error (opsional).
|
|
116
|
+
* [EN] : CSS class name for error label (optional).
|
|
117
|
+
*/
|
|
25
118
|
classNameLabelError?: string | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* [ID] : Tinggi maksimum (opsional).
|
|
121
|
+
* [EN] : Maximum height (optional).
|
|
122
|
+
*/
|
|
26
123
|
maxHeight?: number;
|
|
124
|
+
/**
|
|
125
|
+
* [ID] : Tinggi minimum (opsional).
|
|
126
|
+
* [EN] : Minimum height (optional).
|
|
127
|
+
*/
|
|
27
128
|
minHeight?: number;
|
|
129
|
+
/**
|
|
130
|
+
* [ID] : Nilai translasi label (opsional).
|
|
131
|
+
* [EN] : Label translation value (optional).
|
|
132
|
+
*/
|
|
28
133
|
translateLabel?: number;
|
|
134
|
+
/**
|
|
135
|
+
* [ID] : Translasi label otomatis (opsional).
|
|
136
|
+
* [EN] : Auto translate label (optional).
|
|
137
|
+
*/
|
|
29
138
|
autoTranslateLabel?: boolean;
|
|
30
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* [ID] : Interface untuk textarea dengan label di dalam.
|
|
142
|
+
* [EN] : Interface for textarea with inner label.
|
|
143
|
+
*/
|
|
144
|
+
export interface ITextareaInnerLabel extends React.InputHTMLAttributes<HTMLTextAreaElement> {
|
|
145
|
+
/**
|
|
146
|
+
* [ID] : Nama kelas CSS untuk kontainer (opsional).
|
|
147
|
+
* [EN] : CSS class name for container (optional).
|
|
148
|
+
*/
|
|
149
|
+
classNameContainer?: string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* [ID] : ID elemen (opsional).
|
|
152
|
+
* [EN] : Element ID (optional).
|
|
153
|
+
*/
|
|
154
|
+
id?: string | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* [ID] : Label textarea (opsional).
|
|
157
|
+
* [EN] : Textarea label (optional).
|
|
158
|
+
*/
|
|
159
|
+
label?: string;
|
|
160
|
+
/**
|
|
161
|
+
* [ID] : Tipe input (opsional).
|
|
162
|
+
* [EN] : Input type (optional).
|
|
163
|
+
*/
|
|
164
|
+
type?: string;
|
|
165
|
+
/**
|
|
166
|
+
* [ID] : Menandakan wajib diisi (opsional).
|
|
167
|
+
* [EN] : Indicates required (optional).
|
|
168
|
+
*/
|
|
169
|
+
isRequired?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* [ID] : Pesan error (opsional).
|
|
172
|
+
* [EN] : Error message (optional).
|
|
173
|
+
*/
|
|
174
|
+
error?: string | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* [ID] : Ukuran input (opsional).
|
|
177
|
+
* [EN] : Input size (optional).
|
|
178
|
+
*/
|
|
179
|
+
sizeInput?: 'large' | 'small';
|
|
180
|
+
/**
|
|
181
|
+
* [ID] : Nama kelas CSS untuk label (opsional).
|
|
182
|
+
* [EN] : CSS class name for label (optional).
|
|
183
|
+
*/
|
|
184
|
+
classNameLabel?: string | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* [ID] : Nama kelas CSS untuk label error (opsional).
|
|
187
|
+
* [EN] : CSS class name for error label (optional).
|
|
188
|
+
*/
|
|
189
|
+
classNameLabelError?: string | undefined;
|
|
190
|
+
/**
|
|
191
|
+
* [ID] : Tinggi maksimum (opsional).
|
|
192
|
+
* [EN] : Maximum height (optional).
|
|
193
|
+
*/
|
|
194
|
+
maxHeight?: number;
|
|
195
|
+
/**
|
|
196
|
+
* [ID] : Tinggi minimum (opsional).
|
|
197
|
+
* [EN] : Minimum height (optional).
|
|
198
|
+
*/
|
|
199
|
+
minHeight?: number;
|
|
200
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { UseFloatingOptions } from '@floating-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TKeyLocale } from '../Calendar';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* [ID] : Tipe nilai rentang waktu.
|
|
7
|
+
* [EN] : Time range value type.
|
|
8
|
+
*/
|
|
9
|
+
export type TTimeRangeValue = [[string, string], [string, string]];
|
|
10
|
+
/**
|
|
11
|
+
* [ID] : Interface untuk komponen TimeRange.
|
|
12
|
+
* [EN] : Interface for TimeRange component.
|
|
13
|
+
*/
|
|
14
|
+
export interface ITimeRange {
|
|
15
|
+
/**
|
|
16
|
+
* [ID] : ID elemen (opsional).
|
|
17
|
+
* [EN] : Element ID (optional).
|
|
18
|
+
*/
|
|
19
|
+
id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* [ID] : Nilai rentang waktu (opsional).
|
|
22
|
+
* [EN] : Time range value (optional).
|
|
23
|
+
*/
|
|
24
|
+
value?: TTimeRangeValue;
|
|
25
|
+
/**
|
|
26
|
+
* [ID] : Z-index popper (opsional).
|
|
27
|
+
* [EN] : Popper z-index (optional).
|
|
28
|
+
*/
|
|
29
|
+
zIndexPopper?: number;
|
|
30
|
+
/**
|
|
31
|
+
* [ID] : Offset popover (opsional).
|
|
32
|
+
* [EN] : Popover offset (optional).
|
|
33
|
+
*/
|
|
34
|
+
offsetPopover?: number;
|
|
35
|
+
/**
|
|
36
|
+
* [ID] : Nama kelas CSS kontainer (opsional).
|
|
37
|
+
* [EN] : Container CSS class name (optional).
|
|
38
|
+
*/
|
|
39
|
+
classNameContainer?: string;
|
|
40
|
+
/**
|
|
41
|
+
* [ID] : Nama kelas CSS (opsional).
|
|
42
|
+
* [EN] : CSS class name (optional).
|
|
43
|
+
*/
|
|
44
|
+
className?: string;
|
|
45
|
+
/**
|
|
46
|
+
* [ID] : Fungsi render tombol klik (opsional).
|
|
47
|
+
* [EN] : Click button render function (optional).
|
|
48
|
+
* @param value - [ID] : Nilai rentang waktu. [EN] : Time range value.
|
|
49
|
+
* @param formatValue - [ID] : Nilai terformat. [EN] : Formatted value.
|
|
50
|
+
* @returns [ID] : Node React. [EN] : React Node.
|
|
51
|
+
*/
|
|
52
|
+
buttonClick?: (value: TTimeRangeValue, formatValue: string) => ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* [ID] : Handler perubahan nilai (opsional).
|
|
55
|
+
* [EN] : Value change handler (optional).
|
|
56
|
+
* @param value - [ID] : Nilai rentang waktu baru. [EN] : New time range value.
|
|
57
|
+
*/
|
|
58
|
+
onChange?: (value: TTimeRangeValue) => void;
|
|
59
|
+
/**
|
|
60
|
+
* [ID] : Opsi floating UI (opsional).
|
|
61
|
+
* [EN] : Floating UI options (optional).
|
|
62
|
+
*/
|
|
63
|
+
floatingOptions?: UseFloatingOptions;
|
|
64
|
+
/**
|
|
65
|
+
* [ID] : Lokal bahasa (opsional).
|
|
66
|
+
* [EN] : Locale (optional).
|
|
67
|
+
*/
|
|
68
|
+
locale?: TKeyLocale;
|
|
69
|
+
/**
|
|
70
|
+
* [ID] : Tombol reset (opsional).
|
|
71
|
+
* [EN] : Reset button (optional).
|
|
72
|
+
*/
|
|
73
|
+
buttonReset?: (() => ReactNode) | (() => ReactNode[]);
|
|
74
|
+
/**
|
|
75
|
+
* [ID] : Tombol kirim (opsional).
|
|
76
|
+
* [EN] : Submit button (optional).
|
|
77
|
+
*/
|
|
78
|
+
buttonSubmit?: (() => ReactNode) | (() => ReactNode[]);
|
|
79
|
+
/**
|
|
80
|
+
* [ID] : Nonaktifkan validasi (opsional).
|
|
81
|
+
* [EN] : Disable validation (optional).
|
|
82
|
+
*/
|
|
83
|
+
disableValidation?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* [ID] : Interface untuk daftar waktu TimeRange.
|
|
87
|
+
* [EN] : Interface for TimeRange time list.
|
|
88
|
+
*/
|
|
89
|
+
export interface ITimeRangeListTime {
|
|
90
|
+
/**
|
|
91
|
+
* [ID] : Tipe waktu (mulai/akhir).
|
|
92
|
+
* [EN] : Time type (start/end).
|
|
93
|
+
*/
|
|
94
|
+
type: 'start' | 'end';
|
|
95
|
+
/**
|
|
96
|
+
* [ID] : Nilai waktu tunggal.
|
|
97
|
+
* [EN] : Single time value.
|
|
98
|
+
*/
|
|
99
|
+
value: TTimeRangeValue[0];
|
|
100
|
+
/**
|
|
101
|
+
* [ID] : Nilai rentang waktu lengkap.
|
|
102
|
+
* [EN] : Complete time range values.
|
|
103
|
+
*/
|
|
104
|
+
values: TTimeRangeValue;
|
|
105
|
+
/**
|
|
106
|
+
* [ID] : Handler perubahan nilai.
|
|
107
|
+
* [EN] : Value change handler.
|
|
108
|
+
* @param value - [ID] : Nilai waktu baru. [EN] : New time value.
|
|
109
|
+
*/
|
|
110
|
+
onChange: (value: TTimeRangeValue[0]) => void;
|
|
111
|
+
/**
|
|
112
|
+
* [ID] : Lokal bahasa.
|
|
113
|
+
* [EN] : Locale.
|
|
114
|
+
*/
|
|
115
|
+
locale: TKeyLocale;
|
|
116
|
+
/**
|
|
117
|
+
* [ID] : Nonaktifkan validasi.
|
|
118
|
+
* [EN] : Disable validation.
|
|
119
|
+
*/
|
|
120
|
+
disableValidation: boolean;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* [ID] : Tipe fungsi render teks TimeRange.
|
|
124
|
+
* [EN] : TimeRange text render function type.
|
|
125
|
+
* @param value - [ID] : Nilai rentang waktu. [EN] : Time range value.
|
|
126
|
+
* @param locale - [ID] : Lokal bahasa. [EN] : Locale.
|
|
127
|
+
* @returns [ID] : String teks. [EN] : Text string.
|
|
128
|
+
*/
|
|
129
|
+
export type TRenderTimeRageText = (value: TTimeRangeValue, locale: TKeyLocale) => string;
|
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* [ID] : Interface untuk layout timeline.
|
|
5
|
+
* [EN] : Interface for timeline layout.
|
|
6
|
+
*/
|
|
2
7
|
export interface ITimelineLayout {
|
|
8
|
+
/**
|
|
9
|
+
* [ID] : Konten anak timeline.
|
|
10
|
+
* [EN] : Timeline child content.
|
|
11
|
+
*/
|
|
3
12
|
children: ReactNode | ReactNode[];
|
|
13
|
+
/**
|
|
14
|
+
* [ID] : ID elemen (opsional).
|
|
15
|
+
* [EN] : Element ID (optional).
|
|
16
|
+
*/
|
|
4
17
|
id?: string;
|
|
18
|
+
/**
|
|
19
|
+
* [ID] : Menyembunyikan waktu (opsional).
|
|
20
|
+
* [EN] : Hide time (optional).
|
|
21
|
+
*/
|
|
5
22
|
noTime?: boolean;
|
|
6
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* [ID] : Interface untuk konten timeline.
|
|
26
|
+
* [EN] : Interface for timeline content.
|
|
27
|
+
*/
|
|
7
28
|
export interface ITimelineContent {
|
|
29
|
+
/**
|
|
30
|
+
* [ID] : Konten anak.
|
|
31
|
+
* [EN] : Child content.
|
|
32
|
+
*/
|
|
8
33
|
children: ReactNode | ReactNode[];
|
|
34
|
+
/**
|
|
35
|
+
* [ID] : Waktu (opsional).
|
|
36
|
+
* [EN] : Time (optional).
|
|
37
|
+
*/
|
|
9
38
|
time?: string;
|
|
39
|
+
/**
|
|
40
|
+
* [ID] : Nama kelas CSS (opsional).
|
|
41
|
+
* [EN] : CSS class name (optional).
|
|
42
|
+
*/
|
|
10
43
|
clasName?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* [ID] : Menyembunyikan waktu (opsional).
|
|
46
|
+
* [EN] : Hide time (optional).
|
|
47
|
+
*/
|
|
11
48
|
noTime?: boolean;
|
|
12
49
|
}
|
|
@@ -2,18 +2,75 @@ import { FloatingArrowProps, UseFloatingOptions } from '@floating-ui/react';
|
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { IColor } from '../../../config/tailwind/colors';
|
|
4
4
|
import { IPopover } from '../Popover';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* [ID] : Interface untuk komponen Tooltip.
|
|
8
|
+
* [EN] : Interface for Tooltip component.
|
|
9
|
+
*/
|
|
5
10
|
export interface ITooltip {
|
|
11
|
+
/**
|
|
12
|
+
* [ID] : ID elemen (opsional).
|
|
13
|
+
* [EN] : Element ID (optional).
|
|
14
|
+
*/
|
|
6
15
|
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* [ID] : Konten anak tooltip.
|
|
18
|
+
* [EN] : Tooltip child content.
|
|
19
|
+
*/
|
|
7
20
|
children: string | React.ReactNode | React.ReactNode[];
|
|
21
|
+
/**
|
|
22
|
+
* [ID] : Teks tooltip.
|
|
23
|
+
* [EN] : Tooltip text.
|
|
24
|
+
*/
|
|
8
25
|
text: string;
|
|
26
|
+
/**
|
|
27
|
+
* [ID] : Handler saat ditutup (opsional).
|
|
28
|
+
* [EN] : On close handler (optional).
|
|
29
|
+
*/
|
|
9
30
|
onClose?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* [ID] : Handler saat ditampilkan (opsional).
|
|
33
|
+
* [EN] : On show handler (optional).
|
|
34
|
+
*/
|
|
10
35
|
onShow?: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* [ID] : Penundaan (ms) (opsional).
|
|
38
|
+
* [EN] : Delay (ms) (optional).
|
|
39
|
+
*/
|
|
11
40
|
delay?: number;
|
|
41
|
+
/**
|
|
42
|
+
* [ID] : Z-index popover (opsional).
|
|
43
|
+
* [EN] : Popover z-index (optional).
|
|
44
|
+
*/
|
|
12
45
|
zIndexPopover?: number;
|
|
46
|
+
/**
|
|
47
|
+
* [ID] : Properti popover (opsional).
|
|
48
|
+
* [EN] : Popover properties (optional).
|
|
49
|
+
*/
|
|
13
50
|
popoverProps?: Omit<IPopover, 'children'>;
|
|
51
|
+
/**
|
|
52
|
+
* [ID] : Properti panah (opsional).
|
|
53
|
+
* [EN] : Arrow properties (optional).
|
|
54
|
+
*/
|
|
14
55
|
arrowProps?: Partial<FloatingArrowProps>;
|
|
56
|
+
/**
|
|
57
|
+
* [ID] : Penempatan tooltip (opsional).
|
|
58
|
+
* [EN] : Tooltip placement (optional).
|
|
59
|
+
*/
|
|
15
60
|
placement?: UseFloatingOptions['placement'];
|
|
61
|
+
/**
|
|
62
|
+
* [ID] : Nama kelas CSS (opsional).
|
|
63
|
+
* [EN] : CSS class name (optional).
|
|
64
|
+
*/
|
|
16
65
|
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* [ID] : Warna latar belakang (opsional).
|
|
68
|
+
* [EN] : Background color (optional).
|
|
69
|
+
*/
|
|
17
70
|
backgroundColor?: keyof IColor;
|
|
71
|
+
/**
|
|
72
|
+
* [ID] : Status hover (opsional).
|
|
73
|
+
* [EN] : Hover status (optional).
|
|
74
|
+
*/
|
|
18
75
|
isHover?: boolean;
|
|
19
76
|
}
|
|
@@ -1,9 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [ID] : Interface untuk komponen TruncateComponent.
|
|
3
|
+
* [EN] : Interface for TruncateComponent component.
|
|
4
|
+
*/
|
|
1
5
|
export interface ITruncateComponent extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* [ID] : Konten anak.
|
|
8
|
+
* [EN] : Child content.
|
|
9
|
+
*/
|
|
2
10
|
children: React.ReactNode[] | React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* [ID] : Lebar maksimum (opsional).
|
|
13
|
+
* [EN] : Maximum width (optional).
|
|
14
|
+
*/
|
|
3
15
|
maxWidth?: string;
|
|
16
|
+
/**
|
|
17
|
+
* [ID] : Fungsi untuk merender elemen 'more'.
|
|
18
|
+
* [EN] : Function to render 'more' element.
|
|
19
|
+
* @param count - [ID] : Jumlah item tersisa. [EN] : Remaining item count.
|
|
20
|
+
* @returns [ID] : Node React. [EN] : React Node.
|
|
21
|
+
*/
|
|
4
22
|
moreElement: (count: number) => React.ReactNode | React.ReactNode[];
|
|
23
|
+
/**
|
|
24
|
+
* [ID] : Gaya CSS (opsional).
|
|
25
|
+
* [EN] : CSS style (optional).
|
|
26
|
+
*/
|
|
5
27
|
style?: React.CSSProperties;
|
|
28
|
+
/**
|
|
29
|
+
* [ID] : Nama kelas CSS (opsional).
|
|
30
|
+
* [EN] : CSS class name (optional).
|
|
31
|
+
*/
|
|
6
32
|
className?: string;
|
|
33
|
+
/**
|
|
34
|
+
* [ID] : Jarak antar item (opsional).
|
|
35
|
+
* [EN] : Gap between items (optional).
|
|
36
|
+
*/
|
|
7
37
|
gap?: number;
|
|
38
|
+
/**
|
|
39
|
+
* [ID] : Gaya jarak (opsional).
|
|
40
|
+
* [EN] : Gap style (optional).
|
|
41
|
+
*/
|
|
8
42
|
gapStyle?: string;
|
|
9
43
|
}
|