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.
Files changed (158) hide show
  1. package/dist/assets/_colors.scss +80 -0
  2. package/dist/assets/_mixins.scss +32 -5
  3. package/dist/assets/_typography.scss +582 -0
  4. package/dist/assets/colors.css +40 -0
  5. package/dist/assets/core.css +1 -1
  6. package/dist/assets/fontfamily.css +1 -1
  7. package/dist/assets/fonts/PlusJakartaSans-Italic.ttf +0 -0
  8. package/dist/assets/fonts/PlusJakartaSans.ttf +0 -0
  9. package/dist/assets/style.css +1 -1
  10. package/dist/assets/typography.css +96 -0
  11. package/dist/index.cjs +108 -96
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.mjs +16743 -15220
  14. package/dist/package.json.d.ts +1 -1
  15. package/dist/src/components/Badges/Badges.config.d.ts +57 -0
  16. package/dist/src/components/Badges/Badges.stories.d.ts +115 -1
  17. package/dist/src/components/Breadcrumbs/Breadcrumbs.config.d.ts +113 -0
  18. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  19. package/dist/src/components/Breadcrumbs/Breadcrumbs.stories.d.ts +219 -5
  20. package/dist/src/components/Button/Button.config.d.ts +70 -0
  21. package/dist/src/components/Button/Button.stories.d.ts +127 -3
  22. package/dist/src/components/ButtonIcon/ButtonIcon.config.d.ts +53 -0
  23. package/dist/src/components/ButtonIcon/ButtonIcon.stories.d.ts +121 -3
  24. package/dist/src/components/ButtonPopover/ButtonPopover.stories.d.ts +256 -1
  25. package/dist/src/components/Calendar/Calendar.d.ts +2 -1
  26. package/dist/src/components/Calendar/Calendar.stories.d.ts +281 -1
  27. package/dist/src/components/Chart/GradientBarChart.stories.d.ts +67 -1
  28. package/dist/src/components/Chart/GradientLineChart.stories.d.ts +78 -1
  29. package/dist/src/components/Chart/LineChart.stories.d.ts +33 -1
  30. package/dist/src/components/Chips/Chips.config.d.ts +35 -0
  31. package/dist/src/components/Chips/Chips.stories.d.ts +135 -1
  32. package/dist/src/components/Collapse/Collapse.stories.d.ts +87 -1
  33. package/dist/src/components/Collapse/CollapseV2.stories.d.ts +57 -1
  34. package/dist/src/components/DatePicker/DatePicker.stories.d.ts +219 -1
  35. package/dist/src/components/DatePicker/FilterDate.d.ts +1 -1
  36. package/dist/src/components/DatePicker/FilterDate.stories.d.ts +230 -2
  37. package/dist/src/components/DatePicker/MonthYearPicker.stories.d.ts +196 -1
  38. package/dist/src/components/ErrorMessage/ErrorMessage.config.d.ts +8 -0
  39. package/dist/src/components/ErrorMessage/ErrorMessage.stories.d.ts +37 -1
  40. package/dist/src/components/FilterContainer/FilterContainer.stories.d.ts +164 -0
  41. package/dist/src/components/Input/InputFloatingInner.config.d.ts +9 -0
  42. package/dist/src/components/Input/InputFloatingInner.stories.d.ts +175 -5
  43. package/dist/src/components/Input/InputInnerLabel.config.d.ts +8 -0
  44. package/dist/src/components/Input/InputInnerLabel.d.ts +4 -0
  45. package/dist/src/components/Input/InputInnerLabel.stories.d.ts +204 -0
  46. package/dist/src/components/Input/InputNative.config.d.ts +9 -0
  47. package/dist/src/components/Input/InputNative.stories.d.ts +147 -4
  48. package/dist/src/components/Input/InputReguler.config.d.ts +9 -0
  49. package/dist/src/components/Input/InputReguler.stories.d.ts +175 -5
  50. package/dist/src/components/Modal/ModalDialog.config.d.ts +9 -0
  51. package/dist/src/components/Modal/ModalDialog.stories.d.ts +119 -1
  52. package/dist/src/components/NumberFormat/NumberFormat.stories.d.ts +371 -17
  53. package/dist/src/components/Pagination/Pagination.config.d.ts +5 -0
  54. package/dist/src/components/Pagination/Pagination.d.ts +1 -1
  55. package/dist/src/components/Pagination/Pagination.stories.d.ts +198 -2
  56. package/dist/src/components/Popover/Popover.stories.d.ts +212 -4
  57. package/dist/src/components/PortalComponent/PortalComponent.stories.d.ts +60 -0
  58. package/dist/src/components/RadioCheckbox/RadioCheckbox.config.d.ts +41 -0
  59. package/dist/src/components/RadioCheckbox/RadioCheckbox.stories.d.ts +228 -7
  60. package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.config.d.ts +25 -0
  61. package/dist/src/components/RadioCheckbox/RadioCheckboxLabel.stories.d.ts +194 -3
  62. package/dist/src/components/SelectDropdownContainer/SelectDropdownContainer.config.d.ts +26 -0
  63. package/dist/src/components/SelectDropdownContainer/styleConfig.d.ts +4 -1
  64. package/dist/src/components/Sidebar/ItemSidebar.config.d.ts +34 -0
  65. package/dist/src/components/Sidebar/Sidebar.config.d.ts +16 -0
  66. package/dist/src/components/Step/Step.stories.d.ts +133 -1
  67. package/dist/src/components/Step/StepIndicator.stories.d.ts +146 -1
  68. package/dist/src/components/Switch/Switch.config.d.ts +26 -0
  69. package/dist/src/components/Switch/Switch.stories.d.ts +126 -1
  70. package/dist/src/components/Table/Table.config.d.ts +4 -0
  71. package/dist/src/components/Table/Table.d.ts +2 -3
  72. package/dist/src/components/Table/Table.stories.d.ts +69 -51
  73. package/dist/src/components/Table/TableSubMobile.d.ts +3 -0
  74. package/dist/src/components/Tabs/Tabs.config.d.ts +31 -0
  75. package/dist/src/components/Tabs/Tabs.d.ts +1 -1
  76. package/dist/src/components/Tabs/Tabs.stories.d.ts +218 -2
  77. package/dist/src/components/TextEditor/TextEditor.stories.d.ts +57 -9
  78. package/dist/src/components/Textarea/Textarea.config.d.ts +31 -0
  79. package/dist/src/components/Textarea/Textarea.stories.d.ts +248 -2
  80. package/dist/src/components/Textarea/TextareaFloatingInner.config.d.ts +6 -0
  81. package/dist/src/components/Textarea/TextareaFloatingInner.stories.d.ts +258 -2
  82. package/dist/src/components/Textarea/TextareaInnerLabel.config.d.ts +7 -0
  83. package/dist/src/components/Textarea/TextareaInnerLabel.d.ts +4 -0
  84. package/dist/src/components/Textarea/TextareaInnerLabel.stories.d.ts +258 -0
  85. package/dist/src/components/TimeRange/TimeRange.d.ts +3 -0
  86. package/dist/src/components/TimeRange/TimeRange.stories.d.ts +185 -0
  87. package/dist/src/components/Timeline/Timeline.stories.d.ts +38 -1
  88. package/dist/src/components/Tooltip/Tooltip.stories.d.ts +157 -1
  89. package/dist/src/components/TruncateComponent/TruncateComponent.stories.d.ts +104 -1
  90. package/dist/src/components/Upload/UploadFile.stories.d.ts +125 -1
  91. package/dist/src/components/Upload/UploadImage.d.ts +1 -1
  92. package/dist/src/components/Upload/UploadImage.stories.d.ts +143 -2
  93. package/dist/src/components/Upload/UploadMultipleFile.d.ts +1 -1
  94. package/dist/src/components/Upload/UploadMultipleFile.stories.d.ts +188 -2
  95. package/dist/src/components/Virtualization/ListVirtualization.stories.d.ts +277 -1
  96. package/dist/src/components/Virtualization/TableVirtualization.stories.d.ts +294 -1
  97. package/dist/src/components/index.d.ts +14 -8
  98. package/dist/src/components/screens/Screens.stories.d.ts +13 -0
  99. package/dist/src/config/components/borderRadius.d.ts +1 -0
  100. package/dist/src/config/components/font.d.ts +7 -0
  101. package/dist/src/config/components/gap.d.ts +1 -0
  102. package/dist/src/config/components/typography.d.ts +3 -49
  103. package/dist/src/config/tailwind/index.d.ts +2 -1
  104. package/dist/src/config/tailwind/nativeScreen.d.ts +3 -0
  105. package/dist/src/config/tailwind/typography.d.ts +1 -0
  106. package/dist/src/hooks/index.d.ts +5 -3
  107. package/dist/src/hooks/useAsyncDebounce.d.ts +9 -0
  108. package/dist/src/hooks/useCombinedResizeObserver.d.ts +66 -0
  109. package/dist/src/hooks/useCountdown.d.ts +67 -3
  110. package/dist/src/hooks/useDeepCompareEffect.d.ts +13 -0
  111. package/dist/src/hooks/useElementOrWindowMediaQuery.d.ts +9 -0
  112. package/dist/src/hooks/useEventListener.d.ts +27 -0
  113. package/dist/src/hooks/useMasonry.d.ts +79 -0
  114. package/dist/src/hooks/useMergeRefs.d.ts +26 -0
  115. package/dist/src/hooks/useOtpInput.d.ts +199 -0
  116. package/dist/src/hooks/useStateRef.d.ts +8 -0
  117. package/dist/src/interfaces/components/Alert/index.d.ts +8 -0
  118. package/dist/src/interfaces/components/Badges/index.d.ts +30 -1
  119. package/dist/src/interfaces/components/Breadcrumbs/index.d.ts +85 -2
  120. package/dist/src/interfaces/components/Button/index.d.ts +46 -2
  121. package/dist/src/interfaces/components/ButtonIcon/index.d.ts +36 -0
  122. package/dist/src/interfaces/components/ButtonPopover/index.d.ts +78 -0
  123. package/dist/src/interfaces/components/Calendar/index.d.ts +384 -3
  124. package/dist/src/interfaces/components/Chart/index.d.ts +460 -0
  125. package/dist/src/interfaces/components/Checkbox/index.d.ts +12 -0
  126. package/dist/src/interfaces/components/Chips/index.d.ts +38 -1
  127. package/dist/src/interfaces/components/Collapse/index.d.ts +60 -0
  128. package/dist/src/interfaces/components/DatePicker/index.d.ts +277 -1
  129. package/dist/src/interfaces/components/ErrorMessage/index.d.ts +17 -1
  130. package/dist/src/interfaces/components/FilterContainer/index.d.ts +102 -0
  131. package/dist/src/interfaces/components/Input/index.d.ts +193 -0
  132. package/dist/src/interfaces/components/Modal/index.d.ts +45 -0
  133. package/dist/src/interfaces/components/NumberFormat/index.d.ts +25 -0
  134. package/dist/src/interfaces/components/Pagination/index.d.ts +83 -0
  135. package/dist/src/interfaces/components/Popover/index.d.ts +98 -1
  136. package/dist/src/interfaces/components/RadioCheckbox/RadioCheckbox.d.ts +59 -2
  137. package/dist/src/interfaces/components/RadioCheckbox/RadioCheckboxLabel.d.ts +46 -1
  138. package/dist/src/interfaces/components/SelectDropdownContainer/index.d.ts +196 -2
  139. package/dist/src/interfaces/components/Sidebar/index.d.ts +229 -1
  140. package/dist/src/interfaces/components/Step/index.d.ts +153 -0
  141. package/dist/src/interfaces/components/Switch/index.d.ts +54 -1
  142. package/dist/src/interfaces/components/Table/index.d.ts +402 -6
  143. package/dist/src/interfaces/components/Tabs/index.d.ts +130 -1
  144. package/dist/src/interfaces/components/TextEditor/index.d.ts +12 -0
  145. package/dist/src/interfaces/components/Textarea/index.d.ts +169 -0
  146. package/dist/src/interfaces/components/TimeRange/index.d.ts +128 -0
  147. package/dist/src/interfaces/components/Timeline/index.d.ts +36 -0
  148. package/dist/src/interfaces/components/Tooltip/index.d.ts +56 -0
  149. package/dist/src/interfaces/components/TruncateComponent/index.d.ts +34 -0
  150. package/dist/src/interfaces/components/UploadFile/index.d.ts +186 -0
  151. package/dist/src/interfaces/components/Virtualization/ListVirtualization.d.ts +138 -0
  152. package/dist/src/interfaces/components/Virtualization/TableVirtualization.d.ts +143 -0
  153. package/dist/src/utils/common.d.ts +4 -4
  154. package/dist/src/utils/constant.d.ts +1 -0
  155. package/dist/types-external/table.d.ts +3 -0
  156. package/package.json +1 -1
  157. package/dist/index.cjs.map +0 -1
  158. package/dist/index.mjs.map +0 -1
@@ -1,94 +1,482 @@
1
1
  import { Table as ITableTanstack, Row, ColumnDef } from '@tanstack/react-table';
2
2
  import { default as React } from 'react';
3
3
  import { ITableVirtualization, IWrapperProps } from '../Virtualization/TableVirtualization';
4
+ /**
5
+ * [ID] : Definisi kolom tabel.
6
+ * [EN] : Table column definition.
7
+ * @template T - [ID] : Tipe data baris. [EN] : Row data type.
8
+ */
4
9
  export type ITableColumnDef<T = unknown> = ColumnDef<T>;
10
+ /**
11
+ * [ID] : Interface untuk breakpoint kolom tabel.
12
+ * [EN] : Interface for table column breakpoint.
13
+ */
14
+ export interface ITableColumnBreakpoint {
15
+ /**
16
+ * [ID] : Lebar maksimum (opsional).
17
+ * [EN] : Maximum width (optional).
18
+ */
19
+ maxWidth?: number;
20
+ /**
21
+ * [ID] : Lebar minimum (opsional).
22
+ * [EN] : Minimum width (optional).
23
+ */
24
+ minWidth?: number;
25
+ /**
26
+ * [ID] : Daftar kolom.
27
+ * [EN] : List of columns.
28
+ */
29
+ columns: string[];
30
+ /**
31
+ * [ID] : Kolom nyata (opsional).
32
+ * [EN] : Real columns (optional).
33
+ */
34
+ realColumns?: string[];
35
+ /**
36
+ * [ID] : Reset ekspansi (opsional).
37
+ * [EN] : Reset expanded (optional).
38
+ */
39
+ resetExpanded?: boolean;
40
+ }
41
+ /**
42
+ * [ID] : Tipe fungsi render sub-komponen tabel.
43
+ * [EN] : Table sub-component render function type.
44
+ * @template T - [ID] : Tipe data baris. [EN] : Row data type.
45
+ * @param original - [ID] : Data asli. [EN] : Original data.
46
+ * @param row - [ID] : Objek baris. [EN] : Row object.
47
+ * @param other - [ID] : Properti lain. [EN] : Other properties.
48
+ * @returns [ID] : Node React. [EN] : React Node.
49
+ */
50
+ export type TTableRenderSubComponent<T = unknown> = (original: T, row: Row<T>, other: {
51
+ visibilityColumns: Pick<ITableColumnBreakpoint, 'columns' | 'realColumns'>;
52
+ classNameSubMobile: string;
53
+ }) => React.ReactNode | React.ReactNode[];
54
+ /**
55
+ * [ID] : Tipe handler klik baris tabel.
56
+ * [EN] : Table row click handler type.
57
+ * @template T - [ID] : Tipe data baris. [EN] : Row data type.
58
+ * @param original - [ID] : Data asli. [EN] : Original data.
59
+ * @param row - [ID] : Objek baris. [EN] : Row object.
60
+ */
61
+ export type TTableHandlerRowClick<T = unknown> = (original: T, row: Row<T>) => void;
62
+ /**
63
+ * [ID] : Interface untuk komponen Table.
64
+ * [EN] : Interface for Table component.
65
+ * @template T - [ID] : Tipe data baris. [EN] : Row data type.
66
+ */
5
67
  export interface ITable<T = unknown> {
68
+ /**
69
+ * [ID] : Instance tabel TanStack.
70
+ * [EN] : TanStack table instance.
71
+ */
6
72
  tableInstance: ITableTanstack<T>;
73
+ /**
74
+ * [ID] : Nama kelas CSS pembungkus tabel (opsional).
75
+ * [EN] : Table wrapper CSS class name (optional).
76
+ */
7
77
  classNameWrapperTable?: string;
78
+ /**
79
+ * [ID] : Nama kelas CSS tabel (opsional).
80
+ * [EN] : Table CSS class name (optional).
81
+ */
8
82
  classNameTable?: string;
83
+ /**
84
+ * [ID] : Collapse semua baris (opsional).
85
+ * [EN] : Collapse all rows (optional).
86
+ */
9
87
  collapseAll?: boolean;
88
+ /**
89
+ * [ID] : Handler klik baris (opsional).
90
+ * [EN] : Row click handler (optional).
91
+ * @param original - [ID] : Data asli. [EN] : Original data.
92
+ * @param row - [ID] : Objek baris. [EN] : Row object.
93
+ */
10
94
  handlerRowClick?: (original: T, row: Row<T>) => void;
95
+ /**
96
+ * [ID] : Hak istimewa klik baris (opsional).
97
+ * [EN] : Row click privilege (optional).
98
+ */
11
99
  privillageRowClick?: boolean;
100
+ /**
101
+ * [ID] : Mengaktifkan virtualisasi (opsional).
102
+ * [EN] : Enable virtualization (optional).
103
+ */
12
104
  virtualization?: boolean;
105
+ /**
106
+ * [ID] : Properti virtualisasi (opsional).
107
+ * [EN] : Virtualization properties (optional).
108
+ */
13
109
  virtualizationProps?: IVirtualizationProps;
110
+ /**
111
+ * [ID] : ID header (opsional).
112
+ * [EN] : Header ID (optional).
113
+ */
14
114
  headerId?: string;
115
+ /**
116
+ * [ID] : Fungsi ID baris body (opsional).
117
+ * [EN] : Body row ID function (optional).
118
+ * @param row - [ID] : Objek baris. [EN] : Row object.
119
+ * @returns [ID] : ID baris. [EN] : Row ID.
120
+ */
15
121
  tbodyTrId?: (row: Row<T>) => string | undefined;
122
+ /**
123
+ * [ID] : Tinggi maksimum (opsional).
124
+ * [EN] : Maximum height (optional).
125
+ */
16
126
  maxHeight?: number;
127
+ /**
128
+ * [ID] : ID perhitungan tinggi (opsional).
129
+ * [EN] : Height calculation ID (optional).
130
+ */
17
131
  idCalculateHeight?: string;
18
- kind?: 'laba-reguler' | 'payhere-reguler' | 'laba-small';
132
+ /**
133
+ * [ID] : Jenis tabel (opsional).
134
+ * [EN] : Table kind (optional).
135
+ */
136
+ kind?: 'laba-reguler' | 'payhere-reguler' | 'laba-small' | 'bill-reguler';
137
+ /**
138
+ * [ID] : Varian tabel (opsional).
139
+ * [EN] : Table variant (optional).
140
+ */
19
141
  variant?: 'laba-grey-02';
142
+ /**
143
+ * [ID] : Komponen urutkan menaik (opsional).
144
+ * [EN] : Sort ascending component (optional).
145
+ */
20
146
  componentSortASC?: Element | React.ReactNode | React.ReactNode[];
147
+ /**
148
+ * [ID] : Komponen urutkan menurun (opsional).
149
+ * [EN] : Sort descending component (optional).
150
+ */
21
151
  componentSortDESC?: Element | React.ReactNode | React.ReactNode[];
152
+ /**
153
+ * [ID] : Scroll ke atas (opsional).
154
+ * [EN] : Scroll top (optional).
155
+ */
22
156
  scrollTop?: boolean;
157
+ /**
158
+ * [ID] : Placeholder kosong (opsional).
159
+ * [EN] : Empty placeholder (optional).
160
+ */
23
161
  emptyPlaceholder?: Element | React.ReactNode | React.ReactNode[];
24
- renderSubComponent?: (original: T, row: Row<T>) => React.ReactNode | React.ReactNode[];
162
+ /**
163
+ * [ID] : Fungsi render sub-komponen (opsional).
164
+ * [EN] : Sub-component render function (optional).
165
+ */
166
+ renderSubComponent?: (original: T, row: Row<T>, other: {
167
+ visibilityColumns: Pick<ITableColumnBreakpoint, 'columns' | 'realColumns'>;
168
+ classNameSubMobile: string;
169
+ }) => React.ReactNode | React.ReactNode[];
170
+ /**
171
+ * [ID] : Breakpoint kolom (opsional).
172
+ * [EN] : Column breakpoints (optional).
173
+ */
174
+ columnBreakpoints?: ITableColumnBreakpoint[];
25
175
  }
176
+ /**
177
+ * [ID] : Interface untuk tabel non-virtualisasi.
178
+ * [EN] : Interface for non-virtualization table.
179
+ * @template T - [ID] : Tipe data baris. [EN] : Row data type.
180
+ */
26
181
  export interface INonVirtualization<T = unknown> {
182
+ /**
183
+ * [ID] : Instance tabel TanStack.
184
+ * [EN] : TanStack table instance.
185
+ */
27
186
  tableInstance: ITableTanstack<T>;
187
+ /**
188
+ * [ID] : Nama kelas CSS pembungkus tabel (opsional).
189
+ * [EN] : Table wrapper CSS class name (optional).
190
+ */
28
191
  classNameWrapperTable?: string;
192
+ /**
193
+ * [ID] : Nama kelas CSS tabel (opsional).
194
+ * [EN] : Table CSS class name (optional).
195
+ */
29
196
  classNameTable?: string;
30
- handlerRowClick?: (original: T, row: Row<T>) => void;
197
+ /**
198
+ * [ID] : Handler klik baris (opsional).
199
+ * [EN] : Row click handler (optional).
200
+ */
201
+ handlerRowClick?: ITable<T>['handlerRowClick'];
202
+ /**
203
+ * [ID] : Hak istimewa klik baris (opsional).
204
+ * [EN] : Row click privilege (optional).
205
+ */
31
206
  privillageRowClick?: boolean;
207
+ /**
208
+ * [ID] : ID header (opsional).
209
+ * [EN] : Header ID (optional).
210
+ */
32
211
  headerId?: string;
212
+ /**
213
+ * [ID] : Fungsi ID baris body.
214
+ * [EN] : Body row ID function.
215
+ * @param row - [ID] : Objek baris. [EN] : Row object.
216
+ * @returns [ID] : ID baris. [EN] : Row ID.
217
+ */
33
218
  tbodyTrId: (row: Row<T>) => string | undefined;
219
+ /**
220
+ * [ID] : Tinggi maksimum (opsional).
221
+ * [EN] : Maximum height (optional).
222
+ */
34
223
  maxHeight?: number;
224
+ /**
225
+ * [ID] : ID perhitungan tinggi (opsional).
226
+ * [EN] : Height calculation ID (optional).
227
+ */
35
228
  idCalculateHeight?: string;
229
+ /**
230
+ * [ID] : Komponen urutkan menaik.
231
+ * [EN] : Sort ascending component.
232
+ */
36
233
  componentSortASC: Element | React.ReactNode | React.ReactNode[];
234
+ /**
235
+ * [ID] : Komponen urutkan menurun.
236
+ * [EN] : Sort descending component.
237
+ */
37
238
  componentSortDESC: Element | React.ReactNode | React.ReactNode[];
239
+ /**
240
+ * [ID] : Nama kelas CSS pointer.
241
+ * [EN] : Pointer CSS class name.
242
+ */
38
243
  classNamePointer: string;
244
+ /**
245
+ * [ID] : Placeholder kosong (opsional).
246
+ * [EN] : Empty placeholder (optional).
247
+ */
39
248
  emptyPlaceholder?: Element | React.ReactNode | React.ReactNode[];
40
- renderSubComponent?: (original: T, row: Row<T>) => React.ReactNode | React.ReactNode[];
249
+ /**
250
+ * [ID] : Fungsi render sub-komponen (opsional).
251
+ * [EN] : Sub-component render function (optional).
252
+ */
253
+ renderSubComponent?: ITable<T>['renderSubComponent'];
254
+ /**
255
+ * [ID] : Kolom yang terlihat.
256
+ * [EN] : Visible columns.
257
+ */
258
+ visibilityColumns: Pick<ITableColumnBreakpoint, 'columns' | 'realColumns'>;
259
+ /**
260
+ * [ID] : Nama kelas CSS sub-mobile.
261
+ * [EN] : Sub-mobile CSS class name.
262
+ */
263
+ classNameSubMobile: string;
41
264
  }
265
+ /**
266
+ * [ID] : Interface untuk properti virtualisasi.
267
+ * [EN] : Interface for virtualization properties.
268
+ */
42
269
  export interface IVirtualizationProps extends Omit<ITableVirtualization, 'typeHight' | 'itemContent' | 'fixedHeaderContent' | 'itemSizeNames'> {
270
+ /**
271
+ * [ID] : Tipe tinggi (opsional).
272
+ * [EN] : Height type (optional).
273
+ */
43
274
  typeHight?: 'min-max' | 'container';
275
+ /**
276
+ * [ID] : Konten item (opsional).
277
+ * [EN] : Item content (optional).
278
+ */
44
279
  itemContent?: (Wrapper: React.ComponentType<IWrapperProps>, index: number, data: unknown, context: unknown) => React.ReactNode;
280
+ /**
281
+ * [ID] : Konten header tetap (opsional).
282
+ * [EN] : Fixed header content (optional).
283
+ */
45
284
  fixedHeaderContent?: (() => React.ReactNode) | (() => React.ReactNode[]);
285
+ /**
286
+ * [ID] : Nama ukuran item (opsional).
287
+ * [EN] : Item size names (optional).
288
+ */
46
289
  itemSizeNames?: string[];
47
290
  }
291
+ /**
292
+ * [ID] : Interface untuk tabel virtualisasi.
293
+ * [EN] : Interface for virtualization table.
294
+ * @template T - [ID] : Tipe data baris. [EN] : Row data type.
295
+ */
48
296
  export interface IVirtualization<T = unknown> {
297
+ /**
298
+ * [ID] : Instance tabel TanStack.
299
+ * [EN] : TanStack table instance.
300
+ */
49
301
  tableInstance: ITableTanstack<T>;
302
+ /**
303
+ * [ID] : Nama kelas CSS pembungkus tabel (opsional).
304
+ * [EN] : Table wrapper CSS class name (optional).
305
+ */
50
306
  classNameWrapperTable?: string;
51
- handlerRowClick?: (original: T, row: Row<T>) => void;
307
+ /**
308
+ * [ID] : Handler klik baris (opsional).
309
+ * [EN] : Row click handler (optional).
310
+ */
311
+ handlerRowClick?: ITable<T>['handlerRowClick'];
312
+ /**
313
+ * [ID] : Hak istimewa klik baris (opsional).
314
+ * [EN] : Row click privilege (optional).
315
+ */
52
316
  privillageRowClick?: boolean;
317
+ /**
318
+ * [ID] : Properti virtualisasi (opsional).
319
+ * [EN] : Virtualization properties (optional).
320
+ */
53
321
  virtualizationProps?: IVirtualizationProps;
322
+ /**
323
+ * [ID] : ID header (opsional).
324
+ * [EN] : Header ID (optional).
325
+ */
54
326
  headerId?: string;
327
+ /**
328
+ * [ID] : Fungsi ID baris body.
329
+ * [EN] : Body row ID function.
330
+ * @param row - [ID] : Objek baris. [EN] : Row object.
331
+ * @returns [ID] : ID baris. [EN] : Row ID.
332
+ */
55
333
  tbodyTrId: (row: Row<T>) => string | undefined;
334
+ /**
335
+ * [ID] : Nama kelas CSS tabel (opsional).
336
+ * [EN] : Table CSS class name (optional).
337
+ */
56
338
  classNameTable?: string;
339
+ /**
340
+ * [ID] : Komponen urutkan menaik.
341
+ * [EN] : Sort ascending component.
342
+ */
57
343
  componentSortASC: Element | React.ReactNode | React.ReactNode[];
344
+ /**
345
+ * [ID] : Komponen urutkan menurun.
346
+ * [EN] : Sort descending component.
347
+ */
58
348
  componentSortDESC: Element | React.ReactNode | React.ReactNode[];
349
+ /**
350
+ * [ID] : Nama kelas CSS pointer.
351
+ * [EN] : Pointer CSS class name.
352
+ */
59
353
  classNamePointer: string;
354
+ /**
355
+ * [ID] : Placeholder kosong (opsional).
356
+ * [EN] : Empty placeholder (optional).
357
+ */
60
358
  emptyPlaceholder?: Element | React.ReactNode | React.ReactNode[];
61
- renderSubComponent?: (original: T, row: Row<T>) => React.ReactNode | React.ReactNode[];
359
+ /**
360
+ * [ID] : Fungsi render sub-komponen (opsional).
361
+ * [EN] : Sub-component render function (optional).
362
+ */
363
+ renderSubComponent?: ITable<T>['renderSubComponent'];
364
+ /**
365
+ * [ID] : Kolom yang terlihat.
366
+ * [EN] : Visible columns.
367
+ */
368
+ visibilityColumns: Pick<ITableColumnBreakpoint, 'columns' | 'realColumns'>;
369
+ /**
370
+ * [ID] : Nama kelas CSS sub-mobile.
371
+ * [EN] : Sub-mobile CSS class name.
372
+ */
373
+ classNameSubMobile: string;
62
374
  }
375
+ /**
376
+ * [ID] : Interface untuk header virtualisasi.
377
+ * [EN] : Interface for virtualization head.
378
+ */
63
379
  export interface IVirtualizationHead extends React.HTMLAttributes<HTMLTableSectionElement> {
380
+ /**
381
+ * [ID] : Konteks (opsional).
382
+ * [EN] : Context (optional).
383
+ */
64
384
  context?: {
385
+ /**
386
+ * [ID] : ID header (opsional).
387
+ * [EN] : Header ID (optional).
388
+ */
65
389
  headerId?: string;
390
+ /**
391
+ * [ID] : Properti dinamis lainnya.
392
+ * [EN] : Other dynamic properties.
393
+ */
66
394
  [key: string]: unknown;
67
395
  };
396
+ /**
397
+ * [ID] : Properti dinamis lainnya.
398
+ * [EN] : Other dynamic properties.
399
+ */
68
400
  [key: string]: unknown;
69
401
  }
402
+ /**
403
+ * [ID] : Interface untuk tabel virtualisasi.
404
+ * [EN] : Interface for virtualization table.
405
+ */
70
406
  export interface IVirtualizationTable extends React.HTMLAttributes<HTMLTableElement> {
407
+ /**
408
+ * [ID] : Konteks (opsional).
409
+ * [EN] : Context (optional).
410
+ */
71
411
  context?: {
412
+ /**
413
+ * [ID] : Nama kelas CSS tabel (opsional).
414
+ * [EN] : Table CSS class name (optional).
415
+ */
72
416
  classNameTable?: string;
417
+ /**
418
+ * [ID] : Lebar tabel.
419
+ * [EN] : Table width.
420
+ */
73
421
  width: string | number;
422
+ /**
423
+ * [ID] : Properti dinamis lainnya.
424
+ * [EN] : Other dynamic properties.
425
+ */
74
426
  [key: string]: unknown;
75
427
  };
428
+ /**
429
+ * [ID] : Properti dinamis lainnya.
430
+ * [EN] : Other dynamic properties.
431
+ */
76
432
  [key: string]: unknown;
77
433
  }
434
+ /**
435
+ * [ID] : Interface untuk konfigurasi tabel.
436
+ * [EN] : Interface for table configuration.
437
+ */
78
438
  export interface ITableConfig {
439
+ /**
440
+ * [ID] : Konfigurasi jenis.
441
+ * [EN] : Kind configuration.
442
+ */
79
443
  kind: {
80
444
  'payhere-reguler': string;
81
445
  'laba-reguler': string;
82
446
  'laba-small': string;
447
+ 'bill-reguler': string;
448
+ };
449
+ /**
450
+ * [ID] : Konfigurasi sub-mobile.
451
+ * [EN] : Sub-mobile configuration.
452
+ */
453
+ subMobile: {
454
+ 'payhere-reguler': string;
455
+ 'laba-reguler': string;
456
+ 'laba-small': string;
457
+ 'bill-reguler': string;
83
458
  };
459
+ /**
460
+ * [ID] : Konfigurasi pointer.
461
+ * [EN] : Pointer configuration.
462
+ */
84
463
  pointer: {
85
464
  'payhere-reguler': string;
86
465
  'laba-reguler': string;
87
466
  'laba-small': string;
467
+ 'bill-reguler': string;
88
468
  };
469
+ /**
470
+ * [ID] : Konfigurasi utilitas.
471
+ * [EN] : Utility configuration.
472
+ */
89
473
  utility: {
90
474
  'table-scroll-top': string;
91
475
  };
476
+ /**
477
+ * [ID] : Konfigurasi ikon pengurutan.
478
+ * [EN] : Sorting icon configuration.
479
+ */
92
480
  sortingIcon: {
93
481
  'payhere-reguler': {
94
482
  asc: Element | React.ReactNode | React.ReactNode[];
@@ -102,7 +490,15 @@ export interface ITableConfig {
102
490
  asc: Element | React.ReactNode | React.ReactNode[];
103
491
  desc: Element | React.ReactNode | React.ReactNode[];
104
492
  };
493
+ 'bill-reguler': {
494
+ asc: Element | React.ReactNode | React.ReactNode[];
495
+ desc: Element | React.ReactNode | React.ReactNode[];
496
+ };
105
497
  };
498
+ /**
499
+ * [ID] : Konfigurasi varian.
500
+ * [EN] : Variant configuration.
501
+ */
106
502
  variant: {
107
503
  'laba-grey-02': string;
108
504
  };
@@ -1,33 +1,162 @@
1
1
  import { IBorderRadius } from '../../../config/components/borderRadius';
2
- export type TVariantTabs = 'original-laba-blue-10' | 'container-payhere-brand-base' | 'container-laba-blue-10' | 'container-laba-blue-10-bg_white';
2
+ import { TKeyLocale } from '../Calendar';
3
+ /**
4
+ * [ID] : Tipe varian tab.
5
+ * [EN] : Tab variant type.
6
+ */
7
+ export type TVariantTabs = 'original-laba-blue-10' | 'container-payhere-brand-base' | 'container-payhere-brand-base-bg_white' | 'container-laba-blue-10' | 'container-laba-blue-10-bg_white' | 'original-bill-secondary-800';
8
+ /**
9
+ * [ID] : Tipe ukuran tab.
10
+ * [EN] : Tab size type.
11
+ */
3
12
  export type TSizeTabs = 'tabs-m' | 'tabs-s' | 'tabs-medium' | 'tabs-small';
13
+ /**
14
+ * [ID] : Tipe event tab.
15
+ * [EN] : Tab event type.
16
+ */
4
17
  export type TTypeEventTabs = 'change' | 'mounted';
18
+ /**
19
+ * [ID] : Interface untuk item daftar tab.
20
+ * [EN] : Interface for tab list item.
21
+ */
5
22
  export interface ITabsList {
23
+ /**
24
+ * [ID] : ID tab.
25
+ * [EN] : Tab ID.
26
+ */
6
27
  id: string | number;
28
+ /**
29
+ * [ID] : Label tab.
30
+ * [EN] : Tab label.
31
+ */
7
32
  label: string | number;
33
+ /**
34
+ * [ID] : Status disembunyikan (opsional).
35
+ * [EN] : Is hidden status (optional).
36
+ */
8
37
  isHide?: boolean;
38
+ /**
39
+ * [ID] : Nama kelas CSS (opsional).
40
+ * [EN] : CSS class name (optional).
41
+ */
9
42
  className?: string;
43
+ /**
44
+ * [ID] : Warna aktif (opsional).
45
+ * [EN] : Active color (optional).
46
+ */
10
47
  activeColor?: string;
48
+ /**
49
+ * [ID] : Lokal bahasa (opsional).
50
+ * [EN] : Locale (optional).
51
+ */
52
+ locale?: Partial<Record<TKeyLocale, string>>;
11
53
  }
54
+ /**
55
+ * [ID] : Interface untuk komponen Tabs.
56
+ * [EN] : Interface for Tabs component.
57
+ */
12
58
  export interface ITabs {
59
+ /**
60
+ * [ID] : ID elemen (opsional).
61
+ * [EN] : Element ID (optional).
62
+ */
13
63
  id?: string;
64
+ /**
65
+ * [ID] : Nilai tab aktif (opsional).
66
+ * [EN] : Active tab value (optional).
67
+ */
14
68
  value?: string | number;
69
+ /**
70
+ * [ID] : Daftar tab.
71
+ * [EN] : Tab list.
72
+ */
15
73
  tabsList: ITabsList[];
74
+ /**
75
+ * [ID] : Kunci nilai tab (opsional).
76
+ * [EN] : Tab value key (optional).
77
+ */
16
78
  keyValueTab?: string;
79
+ /**
80
+ * [ID] : Nama kelas CSS kontainer (opsional).
81
+ * [EN] : Container CSS class name (optional).
82
+ */
17
83
  classNameContainer?: string;
84
+ /**
85
+ * [ID] : Nama kelas CSS (opsional).
86
+ * [EN] : CSS class name (optional).
87
+ */
18
88
  className?: string;
89
+ /**
90
+ * [ID] : Nama kelas CSS tombol (opsional).
91
+ * [EN] : Button CSS class name (optional).
92
+ */
19
93
  classNameButton?: string;
94
+ /**
95
+ * [ID] : Varian tab (opsional).
96
+ * [EN] : Tab variant (optional).
97
+ */
20
98
  variant?: TVariantTabs;
99
+ /**
100
+ * [ID] : Ukuran tab (opsional).
101
+ * [EN] : Tab size (optional).
102
+ */
21
103
  size?: TSizeTabs;
104
+ /**
105
+ * [ID] : Radius sudut (opsional).
106
+ * [EN] : Border radius (optional).
107
+ */
22
108
  borderRadius?: IBorderRadius;
109
+ /**
110
+ * [ID] : Status non-aktif (opsional).
111
+ * [EN] : Disabled status (optional).
112
+ */
23
113
  disabled?: boolean;
114
+ /**
115
+ * [ID] : Animasi (opsional).
116
+ * [EN] : Animation (optional).
117
+ */
24
118
  animation?: boolean;
119
+ /**
120
+ * [ID] : Eksekusi perubahan saat mounted (opsional).
121
+ * [EN] : Execute change on mounted (optional).
122
+ */
25
123
  mountedExecuteChange?: boolean;
124
+ /**
125
+ * [ID] : Handler perubahan tab (opsional).
126
+ * [EN] : Tab change handler (optional).
127
+ * @param v - [ID] : Tab yang dipilih. [EN] : Selected tab.
128
+ * @param sourceEvent - [ID] : Sumber event. [EN] : Event source.
129
+ */
26
130
  onChange?: (v: ITabsList, sourceEvent: TTypeEventTabs) => void;
131
+ /**
132
+ * [ID] : Tipe tombol (opsional).
133
+ * [EN] : Button type (optional).
134
+ */
27
135
  typeButton?: 'button' | 'submit';
136
+ /**
137
+ * [ID] : Lokal bahasa (opsional).
138
+ * [EN] : Locale (optional).
139
+ */
140
+ locale?: TKeyLocale;
28
141
  }
142
+ /**
143
+ * [ID] : Interface untuk gaya tab.
144
+ * [EN] : Interface for tab style.
145
+ */
29
146
  export interface IStyleTabs {
147
+ /**
148
+ * [ID] : Lebar.
149
+ * [EN] : Width.
150
+ */
30
151
  width: number;
152
+ /**
153
+ * [ID] : Tinggi.
154
+ * [EN] : Height.
155
+ */
31
156
  height: number;
157
+ /**
158
+ * [ID] : Posisi kiri.
159
+ * [EN] : Left position.
160
+ */
32
161
  left: number;
33
162
  }
@@ -1,5 +1,17 @@
1
1
  import { IAllProps } from '@tinymce/tinymce-react';
2
+ /**
3
+ * [ID] : Interface untuk komponen TextEditor.
4
+ * [EN] : Interface for TextEditor component.
5
+ */
2
6
  export interface ITextEditorProps extends IAllProps {
7
+ /**
8
+ * [ID] : ID editor.
9
+ * [EN] : Editor ID.
10
+ */
3
11
  id: string;
12
+ /**
13
+ * [ID] : Label editor (opsional).
14
+ * [EN] : Editor label (optional).
15
+ */
4
16
  label?: string;
5
17
  }