1mpacto-react-ui 1.0.0 → 1.0.2

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 (139) hide show
  1. package/dist/assets/_mixins.scss +43 -43
  2. package/dist/assets/core.css +1 -1
  3. package/dist/assets/fontfamily.css +1 -1
  4. package/dist/assets/icons/arrow-narrow-down.svg +3 -3
  5. package/dist/index.cjs +65 -65
  6. package/dist/index.mjs +2104 -2091
  7. package/dist/package.json.d.ts +131 -131
  8. package/dist/src/components/Table/Table.d.ts +1 -1
  9. package/dist/src/components/Table/Table.stories.d.ts +16 -2
  10. package/dist/src/hooks/useAsyncDebounce.d.ts +9 -0
  11. package/dist/src/hooks/useCombinedResizeObserver.d.ts +66 -0
  12. package/dist/src/hooks/useCountdown.d.ts +61 -0
  13. package/dist/src/hooks/useDeepCompareEffect.d.ts +13 -0
  14. package/dist/src/hooks/useElementOrWindowMediaQuery.d.ts +9 -0
  15. package/dist/src/hooks/useEventListener.d.ts +27 -0
  16. package/dist/src/hooks/useMasonry.d.ts +79 -0
  17. package/dist/src/hooks/useMergeRefs.d.ts +26 -0
  18. package/dist/src/hooks/useOtpInput.d.ts +157 -0
  19. package/dist/src/hooks/useStateRef.d.ts +8 -0
  20. package/dist/src/interfaces/components/Alert/index.d.ts +9 -1
  21. package/dist/src/interfaces/components/Badges/index.d.ts +28 -0
  22. package/dist/src/interfaces/components/Breadcrumbs/index.d.ts +79 -0
  23. package/dist/src/interfaces/components/Button/index.d.ts +44 -0
  24. package/dist/src/interfaces/components/ButtonIcon/index.d.ts +36 -0
  25. package/dist/src/interfaces/components/ButtonPopover/index.d.ts +78 -0
  26. package/dist/src/interfaces/components/Calendar/index.d.ts +364 -0
  27. package/dist/src/interfaces/components/Chart/index.d.ts +460 -0
  28. package/dist/src/interfaces/components/Checkbox/index.d.ts +12 -0
  29. package/dist/src/interfaces/components/Chips/index.d.ts +36 -0
  30. package/dist/src/interfaces/components/Collapse/index.d.ts +60 -0
  31. package/dist/src/interfaces/components/DatePicker/index.d.ts +274 -0
  32. package/dist/src/interfaces/components/ErrorMessage/index.d.ts +16 -0
  33. package/dist/src/interfaces/components/FilterContainer/index.d.ts +102 -0
  34. package/dist/src/interfaces/components/Input/index.d.ts +180 -0
  35. package/dist/src/interfaces/components/Modal/index.d.ts +45 -0
  36. package/dist/src/interfaces/components/NumberFormat/index.d.ts +25 -0
  37. package/dist/src/interfaces/components/Pagination/index.d.ts +81 -0
  38. package/dist/src/interfaces/components/Popover/index.d.ts +95 -0
  39. package/dist/src/interfaces/components/RadioCheckbox/RadioCheckbox.d.ts +56 -0
  40. package/dist/src/interfaces/components/RadioCheckbox/RadioCheckboxLabel.d.ts +44 -0
  41. package/dist/src/interfaces/components/SelectDropdownContainer/index.d.ts +195 -1
  42. package/dist/src/interfaces/components/Sidebar/index.d.ts +226 -0
  43. package/dist/src/interfaces/components/Step/index.d.ts +153 -0
  44. package/dist/src/interfaces/components/Switch/index.d.ts +53 -0
  45. package/dist/src/interfaces/components/Table/index.d.ts +386 -1
  46. package/dist/src/interfaces/components/Tabs/index.d.ts +126 -0
  47. package/dist/src/interfaces/components/TextEditor/index.d.ts +12 -0
  48. package/dist/src/interfaces/components/Textarea/index.d.ts +156 -0
  49. package/dist/src/interfaces/components/TimeRange/index.d.ts +100 -0
  50. package/dist/src/interfaces/components/Timeline/index.d.ts +36 -0
  51. package/dist/src/interfaces/components/Tooltip/index.d.ts +56 -0
  52. package/dist/src/interfaces/components/TruncateComponent/index.d.ts +34 -0
  53. package/dist/src/interfaces/components/UploadFile/index.d.ts +184 -1
  54. package/dist/src/interfaces/components/Virtualization/ListVirtualization.d.ts +138 -0
  55. package/dist/src/interfaces/components/Virtualization/TableVirtualization.d.ts +143 -0
  56. package/dist/tinymce/CHANGELOG.md +3785 -3785
  57. package/dist/tinymce/js/tinymce/langs/README.md +3 -3
  58. package/dist/tinymce/js/tinymce/license.md +6 -6
  59. package/dist/tinymce/js/tinymce/notices.txt +21 -21
  60. package/dist/tinymce/js/tinymce/plugins/codesample/plugin.min.js +8 -8
  61. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/ar.js +92 -92
  62. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +92 -92
  63. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/ca.js +92 -92
  64. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/cs.js +92 -92
  65. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/da.js +92 -92
  66. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/de.js +92 -92
  67. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/el.js +92 -92
  68. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/en.js +92 -92
  69. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/es.js +92 -92
  70. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/eu.js +92 -92
  71. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/fa.js +92 -92
  72. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/fi.js +92 -92
  73. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +92 -92
  74. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/he_IL.js +92 -92
  75. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/hi.js +92 -92
  76. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/hr.js +92 -92
  77. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +92 -92
  78. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/id.js +92 -92
  79. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/it.js +92 -92
  80. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/ja.js +92 -92
  81. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/kk.js +92 -92
  82. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +92 -92
  83. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/ms.js +92 -92
  84. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +92 -92
  85. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/nl.js +92 -92
  86. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/pl.js +92 -92
  87. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +92 -92
  88. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +92 -92
  89. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/ro.js +92 -92
  90. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/ru.js +92 -92
  91. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/sk.js +92 -92
  92. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +92 -92
  93. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +92 -92
  94. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/th_TH.js +92 -92
  95. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/tr.js +92 -92
  96. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/uk.js +92 -92
  97. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/vi.js +92 -92
  98. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +86 -86
  99. package/dist/tinymce/js/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +92 -92
  100. package/dist/tinymce/js/tinymce/skins/content/dark/content.js +9 -9
  101. package/dist/tinymce/js/tinymce/skins/content/dark/content.min.css +10 -10
  102. package/dist/tinymce/js/tinymce/skins/content/default/content.js +9 -9
  103. package/dist/tinymce/js/tinymce/skins/content/default/content.min.css +10 -10
  104. package/dist/tinymce/js/tinymce/skins/content/document/content.js +9 -9
  105. package/dist/tinymce/js/tinymce/skins/content/document/content.min.css +10 -10
  106. package/dist/tinymce/js/tinymce/skins/content/tinymce-5/content.js +9 -9
  107. package/dist/tinymce/js/tinymce/skins/content/tinymce-5/content.min.css +10 -10
  108. package/dist/tinymce/js/tinymce/skins/content/tinymce-5-dark/content.js +9 -9
  109. package/dist/tinymce/js/tinymce/skins/content/tinymce-5-dark/content.min.css +10 -10
  110. package/dist/tinymce/js/tinymce/skins/content/writer/content.js +9 -9
  111. package/dist/tinymce/js/tinymce/skins/content/writer/content.min.css +10 -10
  112. package/dist/tinymce/js/tinymce/skins/ui/oxide/content.inline.js +9 -9
  113. package/dist/tinymce/js/tinymce/skins/ui/oxide/content.inline.min.css +10 -10
  114. package/dist/tinymce/js/tinymce/skins/ui/oxide/content.js +9 -9
  115. package/dist/tinymce/js/tinymce/skins/ui/oxide/content.min.css +10 -10
  116. package/dist/tinymce/js/tinymce/skins/ui/oxide/skin.min.css +1 -1
  117. package/dist/tinymce/js/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -1
  118. package/dist/tinymce/js/tinymce/skins/ui/oxide-dark/content.inline.js +9 -9
  119. package/dist/tinymce/js/tinymce/skins/ui/oxide-dark/content.inline.min.css +10 -10
  120. package/dist/tinymce/js/tinymce/skins/ui/oxide-dark/content.js +9 -9
  121. package/dist/tinymce/js/tinymce/skins/ui/oxide-dark/content.min.css +10 -10
  122. package/dist/tinymce/js/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  123. package/dist/tinymce/js/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
  124. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5/content.inline.js +9 -9
  125. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5/content.inline.min.css +10 -10
  126. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5/content.js +9 -9
  127. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5/content.min.css +10 -10
  128. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  129. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -1
  130. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5-dark/content.inline.js +9 -9
  131. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +10 -10
  132. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5-dark/content.js +9 -9
  133. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5-dark/content.min.css +10 -10
  134. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  135. package/dist/tinymce/js/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -1
  136. package/dist/tinymce/js/tinymce/tinymce.d.ts +3350 -3350
  137. package/dist/tinymce/js/tinymce/tinymce.min.js +10 -10
  138. package/dist/types-external/table.d.ts +15 -15
  139. package/package.json +131 -131
@@ -1,6 +1,32 @@
1
1
  import { default as React } from 'react';
2
2
 
3
+ /**
4
+ * [ID] : Tipe referensi React (callback atau objek).
5
+ * [EN] : React reference type (callback or object).
6
+ * @template T - [ID] : Tipe elemen. [EN] : Element type.
7
+ */
3
8
  export type ReactRef<T> = React.RefCallback<T> | React.MutableRefObject<T>;
9
+ /**
10
+ * [ID] : Menetapkan nilai ke referensi.
11
+ * [EN] : Assigns a value to a reference.
12
+ * @template T - [ID] : Tipe nilai. [EN] : Value type.
13
+ * @param ref - [ID] : Referensi target. [EN] : Target reference.
14
+ * @param value - [ID] : Nilai yang akan ditetapkan. [EN] : Value to assign.
15
+ */
4
16
  export declare function assignRef<T = unknown>(ref: ReactRef<T> | null | undefined, value: T): void;
17
+ /**
18
+ * [ID] : Menggabungkan beberapa referensi menjadi satu fungsi callback.
19
+ * [EN] : Merges multiple references into a single callback function.
20
+ * @template T - [ID] : Tipe elemen. [EN] : Element type.
21
+ * @param refs - [ID] : Daftar referensi. [EN] : List of references.
22
+ * @returns [ID] : Fungsi callback referensi. [EN] : Reference callback function.
23
+ */
5
24
  export declare function mergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
25
+ /**
26
+ * [ID] : Hook untuk menggabungkan beberapa referensi.
27
+ * [EN] : Hook to merge multiple references.
28
+ * @template T - [ID] : Tipe elemen. [EN] : Element type.
29
+ * @param refs - [ID] : Daftar referensi. [EN] : List of references.
30
+ * @returns [ID] : Referensi gabungan yang di-memoize. [EN] : Memoized merged reference.
31
+ */
6
32
  export declare function useMergeRefs<T>(...refs: (ReactRef<T> | null | undefined)[]): (node: T | null) => void;
@@ -1,43 +1,200 @@
1
1
  import { default as React } from 'react';
2
2
 
3
+ /**
4
+ * [ID] : Interface untuk opsi hook useOtpInput.
5
+ * [EN] : Interface for useOtpInput hook options.
6
+ */
3
7
  export interface IUseOtpInput {
8
+ /**
9
+ * [ID] : ID komponen (opsional).
10
+ * [EN] : Component ID (optional).
11
+ */
4
12
  id?: string;
13
+ /**
14
+ * [ID] : Jumlah input OTP.
15
+ * [EN] : Number of OTP inputs.
16
+ */
5
17
  numInputs: number;
18
+ /**
19
+ * [ID] : Callback saat OTP lengkap (opsional).
20
+ * [EN] : Callback when OTP is complete (optional).
21
+ * @param otp - [ID] : String OTP lengkap. [EN] : Complete OTP string.
22
+ */
6
23
  onComplete?: (otp: string) => void;
24
+ /**
25
+ * [ID] : Nonaktifkan fokus saat edit (opsional).
26
+ * [EN] : Disable focus on edit (optional).
27
+ */
7
28
  disableFocusOnEdit?: boolean;
29
+ /**
30
+ * [ID] : Blur saat lengkap (opsional).
31
+ * [EN] : Blur on complete (optional).
32
+ */
8
33
  blurOnComplete?: boolean;
34
+ /**
35
+ * [ID] : Nonaktifkan input saat lengkap (opsional).
36
+ * [EN] : Disable input on complete (optional).
37
+ */
9
38
  disableOnComplete?: boolean;
10
39
  }
40
+ /**
41
+ * [ID] : Interface untuk properti input.
42
+ * [EN] : Interface for input properties.
43
+ */
11
44
  export interface IInputProps {
45
+ /**
46
+ * [ID] : ID input.
47
+ * [EN] : Input ID.
48
+ */
12
49
  id: string;
50
+ /**
51
+ * [ID] : Fungsi referensi input.
52
+ * [EN] : Input reference function.
53
+ * @param el - [ID] : Elemen input. [EN] : Input element.
54
+ */
13
55
  ref: (el: HTMLInputElement | null) => void;
56
+ /**
57
+ * [ID] : Nilai input.
58
+ * [EN] : Input value.
59
+ */
14
60
  value: string;
61
+ /**
62
+ * [ID] : Handler perubahan input.
63
+ * [EN] : Input change handler.
64
+ * @param e - [ID] : Event perubahan. [EN] : Change event.
65
+ */
15
66
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
67
+ /**
68
+ * [ID] : Handler tombol ditekan.
69
+ * [EN] : Key down handler.
70
+ * @param e - [ID] : Event keyboard. [EN] : Keyboard event.
71
+ */
16
72
  onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
73
+ /**
74
+ * [ID] : Handler paste.
75
+ * [EN] : Paste handler.
76
+ * @param e - [ID] : Event clipboard. [EN] : Clipboard event.
77
+ */
17
78
  onPaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
79
+ /**
80
+ * [ID] : Handler fokus.
81
+ * [EN] : Focus handler.
82
+ * @param e - [ID] : Event fokus. [EN] : Focus event.
83
+ */
18
84
  onFocus: (e: React.FocusEvent<HTMLInputElement>) => void;
85
+ /**
86
+ * [ID] : Status non-aktif.
87
+ * [EN] : Disabled status.
88
+ */
19
89
  disabled: boolean;
90
+ /**
91
+ * [ID] : Tipe input.
92
+ * [EN] : Input type.
93
+ */
20
94
  type: 'text';
95
+ /**
96
+ * [ID] : Mode input.
97
+ * [EN] : Input mode.
98
+ */
21
99
  inputMode: 'numeric';
100
+ /**
101
+ * [ID] : Auto complete.
102
+ * [EN] : Auto complete.
103
+ */
22
104
  autoComplete: 'one-time-code';
105
+ /**
106
+ * [ID] : Label ARIA.
107
+ * [EN] : ARIA label.
108
+ */
23
109
  'aria-label': string;
24
110
  }
111
+ /**
112
+ * [ID] : Interface untuk data input.
113
+ * [EN] : Interface for input data.
114
+ */
25
115
  export interface IInputData {
116
+ /**
117
+ * [ID] : ID input.
118
+ * [EN] : Input ID.
119
+ */
26
120
  id: string;
121
+ /**
122
+ * [ID] : Fungsi referensi input.
123
+ * [EN] : Input reference function.
124
+ * @param el - [ID] : Elemen input. [EN] : Input element.
125
+ */
27
126
  ref: (el: HTMLInputElement | null) => void;
127
+ /**
128
+ * [ID] : Nilai input.
129
+ * [EN] : Input value.
130
+ */
28
131
  value: string;
132
+ /**
133
+ * [ID] : Status non-aktif.
134
+ * [EN] : Disabled status.
135
+ */
29
136
  disabled: boolean;
137
+ /**
138
+ * [ID] : Tipe input.
139
+ * [EN] : Input type.
140
+ */
30
141
  type: 'text';
142
+ /**
143
+ * [ID] : Mode input.
144
+ * [EN] : Input mode.
145
+ */
31
146
  inputMode: 'numeric';
147
+ /**
148
+ * [ID] : Status apakah OTP terisi.
149
+ * [EN] : Status whether OTP is filled.
150
+ */
32
151
  isOtpFilled: boolean;
33
152
  }
153
+ /**
154
+ * [ID] : Interface untuk nilai kembalian hook useOtpInput.
155
+ * [EN] : Interface for useOtpInput hook return value.
156
+ */
34
157
  export interface IUseOtpInputReturn {
158
+ /**
159
+ * [ID] : Fungsi mendapatkan properti input berdasarkan indeks.
160
+ * [EN] : Function to get input properties by index.
161
+ * @param index - [ID] : Indeks input. [EN] : Input index.
162
+ * @returns [ID] : Properti input. [EN] : Input properties.
163
+ */
35
164
  getInputProps: (index: number) => IInputProps;
165
+ /**
166
+ * [ID] : Fungsi mendapatkan data input berdasarkan indeks.
167
+ * [EN] : Function to get input data by index.
168
+ * @param index - [ID] : Indeks input. [EN] : Input index.
169
+ * @returns [ID] : Data input. [EN] : Input data.
170
+ */
36
171
  getInputData: (index: number) => IInputData;
172
+ /**
173
+ * [ID] : Fungsi membersihkan OTP.
174
+ * [EN] : Function to clear OTP.
175
+ */
37
176
  clearOtp: () => void;
177
+ /**
178
+ * [ID] : Array nilai OTP.
179
+ * [EN] : OTP values array.
180
+ */
38
181
  otpValues: string[];
182
+ /**
183
+ * [ID] : String OTP gabungan.
184
+ * [EN] : Joined OTP string.
185
+ */
39
186
  otpString: string;
187
+ /**
188
+ * [ID] : Status apakah OTP lengkap.
189
+ * [EN] : Status whether OTP is complete.
190
+ */
40
191
  isOtpComplete: boolean;
41
192
  }
193
+ /**
194
+ * [ID] : Hook untuk mengelola input OTP.
195
+ * [EN] : Hook to manage OTP input.
196
+ * @param options - [ID] : Opsi hook. [EN] : Hook options.
197
+ * @returns [ID] : Objek kontrol OTP. [EN] : OTP control object.
198
+ */
42
199
  export declare const useOtpInput: ({ id, numInputs, onComplete, disableFocusOnEdit, blurOnComplete, disableOnComplete, }: IUseOtpInput) => IUseOtpInputReturn;
43
200
  export default useOtpInput;
@@ -1,4 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
 
3
+ /**
4
+ * [ID] : Hook untuk menggunakan state dengan referensi mutable.
5
+ * [EN] : Hook to use state with mutable reference.
6
+ * @template T - [ID] : Tipe nilai state. [EN] : State value type.
7
+ * @param initialValue - [ID] : Nilai awal. [EN] : Initial value.
8
+ * @returns [ID] : Tuple berisi nilai, fungsi setter, dan referensi.
9
+ * [EN] : Tuple containing value, setter function, and reference.
10
+ */
3
11
  declare function useStateRef<T>(initialValue: T): [T, React.Dispatch<React.SetStateAction<T>>, React.MutableRefObject<T>];
4
12
  export default useStateRef;
@@ -1,5 +1,13 @@
1
1
  import { ToastOptions } from 'react-toastify';
2
2
 
3
+ /**
4
+ * [ID] : Interface untuk opsi komponen Alert.
5
+ * [EN] : Interface for Alert component options.
6
+ */
3
7
  export interface IOptionAlert extends ToastOptions {
4
- kind?: 'laba' | 'payhere';
8
+ /**
9
+ * [ID] : Variant alert (opsional).
10
+ * [EN] : Alert variant (optional).
11
+ */
12
+ variant?: 'solid' | 'outline';
5
13
  }
@@ -3,11 +3,39 @@ import { IBorderRadius } from '../../../config/components/borderRadius';
3
3
  import { Itypography } from '../../../config/components/typography';
4
4
  import { TFont } from '../../../config/components/font';
5
5
 
6
+ /**
7
+ * [ID] : Interface untuk komponen Badges.
8
+ * [EN] : Interface for Badges component.
9
+ */
6
10
  export interface IBadges extends React.HTMLAttributes<HTMLSpanElement> {
11
+ /**
12
+ * [ID] : Konten anak di dalam badge.
13
+ * [EN] : Child content inside the badge.
14
+ */
7
15
  children: ReactNode | ReactNode[];
16
+ /**
17
+ * [ID] : Nama kelas CSS tambahan (opsional).
18
+ * [EN] : Additional CSS class name (optional).
19
+ */
8
20
  className?: string | undefined;
21
+ /**
22
+ * [ID] : Konfigurasi radius sudut badge (opsional).
23
+ * [EN] : Badge border radius configuration (optional).
24
+ */
9
25
  rounded?: IBorderRadius;
26
+ /**
27
+ * [ID] : Varian gaya badge (opsional).
28
+ * [EN] : Badge style variant (optional).
29
+ */
10
30
  variants?: 'filled-gray-600' | 'filled-green-600' | 'filled-green-50' | 'filled-blue-gray-50' | 'filled-red-500' | 'filled-blue-600' | 'filled-amber-800' | 'filled-pink-600' | 'filled-lime-700' | 'filled-lime-900-bg_lime-100' | 'filled-red-900' | 'filled-laba-green-10' | 'filled-cyan-800-bg_cyan-100' | 'ghost-gray-200' | 'ghost-green-100' | 'ghost-red-100' | 'ghost-blue-100' | 'ghost-amber-100' | 'ghost-laba-orange-01' | 'ghost-laba-green-01' | 'ghost-laba-green-02' | 'ghost-laba-blue-02' | 'ghost-laba-blue-01' | 'ghost-laba-grey-05' | 'ghost-laba-red-01' | 'outline-gray-600' | 'outline-green-600' | 'outline-red-500' | 'outline-blue-600' | 'outline-amber-800' | 'outline-laba-blue-01' | 'outline-laba-orange-06' | 'outline-laba-orange-06-bg_laba-orange-01' | 'outline-laba-red-06' | 'outline-laba-green-06';
31
+ /**
32
+ * [ID] : Konfigurasi font (opsional).
33
+ * [EN] : Font configuration (optional).
34
+ */
11
35
  fonts?: TFont;
36
+ /**
37
+ * [ID] : Konfigurasi tipografi (opsional).
38
+ * [EN] : Typography configuration (optional).
39
+ */
12
40
  typography?: Itypography;
13
41
  }
@@ -2,22 +2,101 @@ import { ReactNode, ElementType, HTMLAttributes } from 'react';
2
2
  import { IGap } from '../../../config/components/gap';
3
3
  import { TFont } from '../../../config/components/font';
4
4
 
5
+ /**
6
+ * [ID] : Interface untuk komponen Breadcrumbs.
7
+ * [EN] : Interface for Breadcrumbs component.
8
+ * @template T - [ID] : Tipe elemen HTML. [EN] : HTML element type.
9
+ */
5
10
  export interface IBreadcrumbs<T extends ElementType> extends HTMLAttributes<HTMLDivElement> {
11
+ /**
12
+ * [ID] : Elemen HTML yang akan dirender (opsional).
13
+ * [EN] : HTML element to be rendered (optional).
14
+ */
6
15
  as?: T;
16
+ /**
17
+ * [ID] : Konfigurasi font (opsional).
18
+ * [EN] : Font configuration (optional).
19
+ */
7
20
  fonts?: TFont;
21
+ /**
22
+ * [ID] : Varian gaya breadcrumbs (opsional).
23
+ * [EN] : Breadcrumbs style variant (optional).
24
+ */
8
25
  variants?: 'laba-blue-10' | 'blue-700' | 'bill-secondary-800';
26
+ /**
27
+ * [ID] : Daftar URL untuk setiap breadcrumb.
28
+ * [EN] : List of URLs for each breadcrumb.
29
+ */
9
30
  urls: string[];
31
+ /**
32
+ * [ID] : Teks label untuk setiap breadcrumb.
33
+ * [EN] : Label text for each breadcrumb.
34
+ */
10
35
  textBreadcrumbs: string[];
36
+ /**
37
+ * [ID] : Handler klik untuk setiap breadcrumb (opsional).
38
+ * [EN] : Click handler for each breadcrumb (optional).
39
+ */
11
40
  onClickBreadcrumbs?: (() => void | undefined)[];
41
+ /**
42
+ * [ID] : Handler klik untuk aksi tambahan (opsional).
43
+ * [EN] : Click handler for additional action (optional).
44
+ */
12
45
  onClickAction?: () => void;
46
+ /**
47
+ * [ID] : Handler klik global untuk URL (opsional).
48
+ * [EN] : Global click handler for URLs (optional).
49
+ * @param url - [ID] : URL yang diklik. [EN] : Clicked URL.
50
+ */
13
51
  onClickUrls?: (url: string) => void;
52
+ /**
53
+ * [ID] : Jarak untuk elemen aksi (opsional).
54
+ * [EN] : Gap for action element (optional).
55
+ */
14
56
  gapAction?: IGap;
57
+ /**
58
+ * [ID] : Jarak antar URL (opsional).
59
+ * [EN] : Gap between URLs (optional).
60
+ */
15
61
  gapUrls?: IGap;
62
+ /**
63
+ * [ID] : Teks untuk tombol aksi (opsional).
64
+ * [EN] : Text for action button (optional).
65
+ */
16
66
  textAction?: string;
67
+ /**
68
+ * [ID] : Ikon untuk tombol aksi (opsional).
69
+ * [EN] : Icon for action button (optional).
70
+ */
17
71
  iconAction?: ReactNode | ReactNode[];
72
+ /**
73
+ * [ID] : Pemisah antar breadcrumb (opsional).
74
+ * [EN] : Separator between breadcrumbs (optional).
75
+ */
18
76
  separator?: ReactNode | ReactNode[] | string;
77
+ /**
78
+ * [ID] : Fungsi untuk menghasilkan properti link kustom (opsional).
79
+ * [EN] : Function to generate custom link properties (optional).
80
+ * @param value - [ID] : Nilai teks breadcrumb. [EN] : Breadcrumb text value.
81
+ * @param index - [ID] : Indeks breadcrumb. [EN] : Breadcrumb index.
82
+ * @param urls - [ID] : Array semua URL. [EN] : Array of all URLs.
83
+ * @returns [ID] : Objek properti. [EN] : Property object.
84
+ */
19
85
  propsLink?: (value: string, index: number, urls: string[]) => object;
86
+ /**
87
+ * [ID] : Nama kelas CSS untuk elemen aksi (opsional).
88
+ * [EN] : CSS class name for action element (optional).
89
+ */
20
90
  classNameAction?: string;
91
+ /**
92
+ * [ID] : Nama kelas CSS untuk URL (opsional).
93
+ * [EN] : CSS class name for URL (optional).
94
+ */
21
95
  classNameUrl?: string;
96
+ /**
97
+ * [ID] : Fungsi render kustom untuk aksi (opsional).
98
+ * [EN] : Custom render function for action (optional).
99
+ * @returns [ID] : Elemen React. [EN] : React element.
100
+ */
22
101
  renderAction?: () => ReactNode | ReactNode[];
23
102
  }
@@ -1,14 +1,58 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
+ /**
4
+ * [ID] : Tipe varian tombol yang tersedia.
5
+ * [EN] : Available button variant types.
6
+ */
3
7
  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';
8
+ /**
9
+ * [ID] : Tipe ukuran tombol.
10
+ * [EN] : Button size type.
11
+ */
4
12
  export type TButtonSize = 'large' | 'reguler' | 'small' | 'extra-small' | 'l' | 'm' | 's' | 'xs' | 'bill-l' | 'bill-m' | 'bill-s' | 'bill-xs';
13
+ /**
14
+ * [ID] : Interface untuk komponen Button.
15
+ * [EN] : Interface for Button component.
16
+ */
5
17
  export interface IButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
+ /**
19
+ * [ID] : Ukuran tombol (opsional).
20
+ * [EN] : Button size (optional).
21
+ */
6
22
  size?: TButtonSize;
23
+ /**
24
+ * [ID] : Varian gaya tombol (opsional).
25
+ * [EN] : Button style variant (optional).
26
+ */
7
27
  variants?: TButtonVariants;
28
+ /**
29
+ * [ID] : Ikon di awal tombol (opsional).
30
+ * [EN] : Icon at the start of the button (optional).
31
+ */
8
32
  startIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
33
+ /**
34
+ * [ID] : Ikon di akhir tombol (opsional).
35
+ * [EN] : Icon at the end of the button (optional).
36
+ */
9
37
  endIcon?: ReactNode | ReactNode[] | (() => ReactNode) | (() => ReactNode[]);
38
+ /**
39
+ * [ID] : Konten anak di dalam tombol.
40
+ * [EN] : Child content inside the button.
41
+ */
10
42
  children: ReactNode | ReactNode[];
43
+ /**
44
+ * [ID] : Nama kelas CSS tambahan (opsional).
45
+ * [EN] : Additional CSS class name (optional).
46
+ */
11
47
  className?: string | undefined;
48
+ /**
49
+ * [ID] : Menentukan apakah tombol dalam keadaan memuat (opsional).
50
+ * [EN] : Determines if the button is in loading state (optional).
51
+ */
12
52
  loading?: boolean;
53
+ /**
54
+ * [ID] : Nama kelas CSS untuk ikon loading (opsional).
55
+ * [EN] : CSS class name for loading icon (optional).
56
+ */
13
57
  classNameIconLoading?: string | undefined;
14
58
  }
@@ -1,12 +1,48 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
+ /**
4
+ * [ID] : Tipe varian tombol ikon.
5
+ * [EN] : Button icon variant types.
6
+ */
3
7
  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';
8
+ /**
9
+ * [ID] : Tipe ukuran tombol ikon.
10
+ * [EN] : Button icon size type.
11
+ */
4
12
  export type TButtonIconSize = 'large' | 'reguler' | 'small' | 'extra-small' | 'l' | 'm' | 's' | 'xs';
13
+ /**
14
+ * [ID] : Interface untuk komponen ButtonIcon.
15
+ * [EN] : Interface for ButtonIcon component.
16
+ */
5
17
  export interface IButtonIcon extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
+ /**
19
+ * [ID] : Ukuran tombol (opsional).
20
+ * [EN] : Button size (optional).
21
+ */
6
22
  size?: TButtonIconSize;
23
+ /**
24
+ * [ID] : Varian gaya tombol (opsional).
25
+ * [EN] : Button style variant (optional).
26
+ */
7
27
  variants?: TButtonIcomVariants;
28
+ /**
29
+ * [ID] : Konten anak (biasanya ikon).
30
+ * [EN] : Child content (usually icon).
31
+ */
8
32
  children: ReactNode | ReactNode[];
33
+ /**
34
+ * [ID] : Nama kelas CSS tambahan (opsional).
35
+ * [EN] : Additional CSS class name (optional).
36
+ */
9
37
  className?: string | undefined;
38
+ /**
39
+ * [ID] : Menentukan apakah tombol dalam keadaan memuat (opsional).
40
+ * [EN] : Determines if the button is in loading state (optional).
41
+ */
10
42
  loading?: boolean;
43
+ /**
44
+ * [ID] : Nama kelas CSS untuk ikon loading (opsional).
45
+ * [EN] : CSS class name for loading icon (optional).
46
+ */
11
47
  classNameIconLoading?: string | undefined;
12
48
  }
@@ -2,23 +2,101 @@ import { OffsetOptions, UseFloatingOptions } from '@floating-ui/react';
2
2
  import { IPopover } from '../Popover';
3
3
  import { IButton } from '../Button';
4
4
 
5
+ /**
6
+ * [ID] : Interface untuk komponen ButtonPopover.
7
+ * [EN] : Interface for ButtonPopover component.
8
+ */
5
9
  export interface IButtonPopover extends IButton {
10
+ /**
11
+ * [ID] : Teks tombol (opsional).
12
+ * [EN] : Button text (optional).
13
+ */
6
14
  text?: string;
15
+ /**
16
+ * [ID] : Ikon yang ditampilkan di awal (opsional).
17
+ * [EN] : Icon shown at the start (optional).
18
+ */
7
19
  startIconShow?: React.ReactNode | React.ReactNode[];
20
+ /**
21
+ * [ID] : Ikon yang ditampilkan di akhir (opsional).
22
+ * [EN] : Icon shown at the end (optional).
23
+ */
8
24
  endIconShow?: React.ReactNode | React.ReactNode[];
25
+ /**
26
+ * [ID] : ID untuk popover (opsional).
27
+ * [EN] : ID for popover (optional).
28
+ */
9
29
  idPopover?: string;
30
+ /**
31
+ * [ID] : Nama kelas CSS untuk tombol (opsional).
32
+ * [EN] : CSS class name for button (optional).
33
+ */
10
34
  classNameButton?: string;
35
+ /**
36
+ * [ID] : Z-index untuk popover (opsional).
37
+ * [EN] : Z-index for popover (optional).
38
+ */
11
39
  zIndexPopover?: number;
40
+ /**
41
+ * [ID] : Opsi offset untuk posisi popover (opsional).
42
+ * [EN] : Offset options for popover position (optional).
43
+ */
12
44
  offset?: OffsetOptions;
45
+ /**
46
+ * [ID] : Properti tambahan untuk popover (opsional).
47
+ * [EN] : Additional properties for popover (optional).
48
+ */
13
49
  popoverProps?: Omit<IPopover, 'children'>;
50
+ /**
51
+ * [ID] : Penempatan popover (opsional).
52
+ * [EN] : Popover placement (optional).
53
+ */
14
54
  placement?: UseFloatingOptions['placement'];
55
+ /**
56
+ * [ID] : Handler saat popover ditutup (opsional).
57
+ * [EN] : Handler when popover is closed (optional).
58
+ */
15
59
  onClose?: () => void;
60
+ /**
61
+ * [ID] : Nama kelas CSS saat tombol aktif/ditampilkan (opsional).
62
+ * [EN] : CSS class name when button is active/shown (optional).
63
+ */
16
64
  classNameButtonShow?: string;
17
65
  }
66
+ /**
67
+ * [ID] : Interface untuk referensi ButtonPopover.
68
+ * [EN] : Interface for ButtonPopover reference.
69
+ */
18
70
  export interface IRefButtonPopover {
71
+ /**
72
+ * [ID] : Status visibilitas popover.
73
+ * [EN] : Popover visibility status.
74
+ */
19
75
  show: boolean;
76
+ /**
77
+ * [ID] : Fungsi untuk mengatur visibilitas popover.
78
+ * [EN] : Function to set popover visibility.
79
+ * @param e - [ID] : Status visibilitas baru. [EN] : New visibility status.
80
+ */
20
81
  setShow: (e: boolean) => void;
82
+ /**
83
+ * [ID] : Handler untuk menampilkan popover.
84
+ * [EN] : Handler to show popover.
85
+ * @param e - [ID] : Event mouse. [EN] : Mouse event.
86
+ */
21
87
  handlerShow: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
88
+ /**
89
+ * [ID] : Handler untuk menutup popover.
90
+ * [EN] : Handler to close popover.
91
+ */
22
92
  handlerClose: () => void;
23
93
  }
94
+ /**
95
+ * [ID] : Tipe fungsi untuk mendapatkan ikon tombol popover.
96
+ * [EN] : Function type to get popover button icon.
97
+ * @param isShow - [ID] : Status apakah popover ditampilkan. [EN] : Status if popover is shown.
98
+ * @param iconShow - [ID] : Ikon saat ditampilkan. [EN] : Icon when shown.
99
+ * @param iconClose - [ID] : Ikon saat ditutup. [EN] : Icon when closed.
100
+ * @returns [ID] : Ikon yang sesuai. [EN] : Corresponding icon.
101
+ */
24
102
  export type TGetIconButtonPopover = (isShow: boolean, iconShow?: React.ReactNode | React.ReactNode[], iconClose?: IButton['startIcon'] | IButton['endIcon']) => IButton['startIcon'] | IButton['endIcon'];