@ttdk-design-system/library-vue 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI_GUIDE.md +6518 -0
- package/llms.txt +6518 -0
- package/package.json +1096 -4
- package/src/core/index.ts +2 -0
- package/src/core/tailwind-preset.cjs +62 -0
- package/src/core/tailwind-preset.ts +85 -0
- package/src/core/theme/tokens.css +663 -0
- package/src/core/types.ts +836 -0
- package/src/index.ts +17 -0
- package/src/tailwind-preset.cjs +62 -0
- package/src/tailwind-preset.ts +85 -0
- package/src/types.ts +1 -0
- package/src/web/accordion/AI_GUIDE.md +149 -0
- package/src/web/accordion/accordion.css +1 -0
- package/src/web/accordion/accordion.vue +432 -0
- package/src/web/accordion/accordion.vue.d.ts +227 -0
- package/src/web/accordion/index.ts +3 -0
- package/src/web/accordion/manifest.json +351 -0
- package/src/web/alert/AI_GUIDE.md +139 -0
- package/src/web/alert/alert.css +1 -0
- package/src/web/alert/alert.vue +290 -0
- package/src/web/alert/alert.vue.d.ts +154 -0
- package/src/web/alert/index.ts +3 -0
- package/src/web/alert/manifest.json +240 -0
- package/src/web/avatar/AI_GUIDE.md +118 -0
- package/src/web/avatar/avatar.css +1 -0
- package/src/web/avatar/avatar.vue +217 -0
- package/src/web/avatar/avatar.vue.d.ts +135 -0
- package/src/web/avatar/index.ts +3 -0
- package/src/web/avatar/manifest.json +195 -0
- package/src/web/badge/AI_GUIDE.md +94 -0
- package/src/web/badge/badge.css +1 -0
- package/src/web/badge/badge.vue +135 -0
- package/src/web/badge/badge.vue.d.ts +108 -0
- package/src/web/badge/index.ts +3 -0
- package/src/web/badge/manifest.json +141 -0
- package/src/web/banner/AI_GUIDE.md +130 -0
- package/src/web/banner/banner.css +1 -0
- package/src/web/banner/banner.vue +303 -0
- package/src/web/banner/banner.vue.d.ts +162 -0
- package/src/web/banner/index.ts +3 -0
- package/src/web/banner/manifest.json +240 -0
- package/src/web/breadcrumb/AI_GUIDE.md +120 -0
- package/src/web/breadcrumb/breadcrumb.css +1 -0
- package/src/web/breadcrumb/breadcrumb.vue +313 -0
- package/src/web/breadcrumb/breadcrumb.vue.d.ts +139 -0
- package/src/web/breadcrumb/index.ts +3 -0
- package/src/web/breadcrumb/manifest.json +225 -0
- package/src/web/button/AI_GUIDE.md +121 -0
- package/src/web/button/button.css +1 -0
- package/src/web/button/button.vue +283 -0
- package/src/web/button/button.vue.d.ts +147 -0
- package/src/web/button/index.ts +3 -0
- package/src/web/button/manifest.json +177 -0
- package/src/web/calendar/AI_GUIDE.md +151 -0
- package/src/web/calendar/calendar.css +1 -0
- package/src/web/calendar/calendar.vue +1536 -0
- package/src/web/calendar/calendar.vue.d.ts +261 -0
- package/src/web/calendar/index.ts +3 -0
- package/src/web/calendar/manifest.json +470 -0
- package/src/web/card/AI_GUIDE.md +133 -0
- package/src/web/card/card.css +1 -0
- package/src/web/card/card.vue +423 -0
- package/src/web/card/card.vue.d.ts +232 -0
- package/src/web/card/index.ts +3 -0
- package/src/web/card/manifest.json +357 -0
- package/src/web/checkbox/AI_GUIDE.md +146 -0
- package/src/web/checkbox/checkbox.css +1 -0
- package/src/web/checkbox/checkbox.vue +304 -0
- package/src/web/checkbox/checkbox.vue.d.ts +189 -0
- package/src/web/checkbox/index.ts +3 -0
- package/src/web/checkbox/manifest.json +294 -0
- package/src/web/chip/AI_GUIDE.md +186 -0
- package/src/web/chip/chip.css +1 -0
- package/src/web/chip/chip.vue +220 -0
- package/src/web/chip/chip.vue.d.ts +140 -0
- package/src/web/chip/index.ts +3 -0
- package/src/web/chip/manifest.json +186 -0
- package/src/web/dropdown/AI_GUIDE.md +167 -0
- package/src/web/dropdown/dropdown.css +1 -0
- package/src/web/dropdown/dropdown.vue +1257 -0
- package/src/web/dropdown/dropdown.vue.d.ts +381 -0
- package/src/web/dropdown/index.ts +3 -0
- package/src/web/dropdown/manifest.json +576 -0
- package/src/web/flex/AI_GUIDE.md +113 -0
- package/src/web/flex/flex-item.vue +94 -0
- package/src/web/flex/flex-item.vue.d.ts +84 -0
- package/src/web/flex/flex.css +1 -0
- package/src/web/flex/flex.vue +103 -0
- package/src/web/flex/flex.vue.d.ts +92 -0
- package/src/web/flex/index.ts +5 -0
- package/src/web/flex/manifest.json +162 -0
- package/src/web/form/index.ts +7 -0
- package/src/web/grid/AI_GUIDE.md +112 -0
- package/src/web/grid/grid-item.vue +109 -0
- package/src/web/grid/grid-item.vue.d.ts +99 -0
- package/src/web/grid/grid.css +1 -0
- package/src/web/grid/grid.vue +94 -0
- package/src/web/grid/grid.vue.d.ts +84 -0
- package/src/web/grid/index.ts +5 -0
- package/src/web/grid/manifest.json +153 -0
- package/src/web/index.ts +86 -0
- package/src/web/input/AI_GUIDE.md +159 -0
- package/src/web/input/index.ts +3 -0
- package/src/web/input/input.css +1 -0
- package/src/web/input/input.vue +521 -0
- package/src/web/input/input.vue.d.ts +274 -0
- package/src/web/input/manifest.json +465 -0
- package/src/web/input-number/AI_GUIDE.md +164 -0
- package/src/web/input-number/index.ts +3 -0
- package/src/web/input-number/input-number.css +1 -0
- package/src/web/input-number/input-number.vue +1153 -0
- package/src/web/input-number/input-number.vue.d.ts +343 -0
- package/src/web/input-number/manifest.json +575 -0
- package/src/web/modal/AI_GUIDE.md +171 -0
- package/src/web/modal/index.ts +3 -0
- package/src/web/modal/manifest.json +375 -0
- package/src/web/modal/modal.css +1 -0
- package/src/web/modal/modal.vue +344 -0
- package/src/web/modal/modal.vue.d.ts +64 -0
- package/src/web/pagination/AI_GUIDE.md +148 -0
- package/src/web/pagination/index.ts +21 -0
- package/src/web/pagination/manifest.json +432 -0
- package/src/web/pagination/pagination-content.vue +42 -0
- package/src/web/pagination/pagination-content.vue.d.ts +28 -0
- package/src/web/pagination/pagination-ellipsis.vue +55 -0
- package/src/web/pagination/pagination-ellipsis.vue.d.ts +28 -0
- package/src/web/pagination/pagination-first.vue +161 -0
- package/src/web/pagination/pagination-first.vue.d.ts +67 -0
- package/src/web/pagination/pagination-item.vue +42 -0
- package/src/web/pagination/pagination-item.vue.d.ts +28 -0
- package/src/web/pagination/pagination-last.vue +161 -0
- package/src/web/pagination/pagination-last.vue.d.ts +67 -0
- package/src/web/pagination/pagination-link.vue +118 -0
- package/src/web/pagination/pagination-link.vue.d.ts +61 -0
- package/src/web/pagination/pagination-next.vue +160 -0
- package/src/web/pagination/pagination-next.vue.d.ts +68 -0
- package/src/web/pagination/pagination-previous.vue +160 -0
- package/src/web/pagination/pagination-previous.vue.d.ts +68 -0
- package/src/web/pagination/pagination.css +1 -0
- package/src/web/pagination/pagination.vue +730 -0
- package/src/web/pagination/pagination.vue.d.ts +247 -0
- package/src/web/popover/AI_GUIDE.md +163 -0
- package/src/web/popover/index.ts +3 -0
- package/src/web/popover/manifest.json +396 -0
- package/src/web/popover/popover.css +1 -0
- package/src/web/popover/popover.vue +579 -0
- package/src/web/popover/popover.vue.d.ts +83 -0
- package/src/web/radio/AI_GUIDE.md +155 -0
- package/src/web/radio/index.ts +3 -0
- package/src/web/radio/manifest.json +294 -0
- package/src/web/radio/radio.css +1 -0
- package/src/web/radio/radio.vue +288 -0
- package/src/web/radio/radio.vue.d.ts +182 -0
- package/src/web/selectbox/AI_GUIDE.md +216 -0
- package/src/web/selectbox/index.ts +3 -0
- package/src/web/selectbox/manifest.json +477 -0
- package/src/web/selectbox/selectbox.css +1 -0
- package/src/web/selectbox/selectbox.vue +1024 -0
- package/src/web/selectbox/selectbox.vue.d.ts +300 -0
- package/src/web/sonner/AI_GUIDE.md +98 -0
- package/src/web/sonner/index.ts +114 -0
- package/src/web/sonner/manifest.json +132 -0
- package/src/web/sonner/sonner.css +1 -0
- package/src/web/sonner/sonner.vue +180 -0
- package/src/web/sonner/sonner.vue.d.ts +113 -0
- package/src/web/table/AI_GUIDE.md +145 -0
- package/src/web/table/index.ts +34 -0
- package/src/web/table/manifest.json +168 -0
- package/src/web/table/table-body.vue +42 -0
- package/src/web/table/table-body.vue.d.ts +28 -0
- package/src/web/table/table-caption.vue +42 -0
- package/src/web/table/table-caption.vue.d.ts +28 -0
- package/src/web/table/table-cell.vue +71 -0
- package/src/web/table/table-cell.vue.d.ts +49 -0
- package/src/web/table/table-empty.vue +105 -0
- package/src/web/table/table-empty.vue.d.ts +57 -0
- package/src/web/table/table-footer.vue +42 -0
- package/src/web/table/table-footer.vue.d.ts +28 -0
- package/src/web/table/table-head.vue +78 -0
- package/src/web/table/table-head.vue.d.ts +50 -0
- package/src/web/table/table-header.vue +42 -0
- package/src/web/table/table-header.vue.d.ts +28 -0
- package/src/web/table/table-row.vue +70 -0
- package/src/web/table/table-row.vue.d.ts +44 -0
- package/src/web/table/table.css +1 -0
- package/src/web/table/table.vue +298 -0
- package/src/web/table/table.vue.d.ts +119 -0
- package/src/web/tabs/AI_GUIDE.md +150 -0
- package/src/web/tabs/index.ts +2 -0
- package/src/web/tabs/manifest.json +315 -0
- package/src/web/tabs/tabs.css +1 -0
- package/src/web/tabs/tabs.vue +164 -0
- package/src/web/tabs/tabs.vue.d.ts +60 -0
- package/src/web/text/AI_GUIDE.md +129 -0
- package/src/web/text/index.ts +2 -0
- package/src/web/text/manifest.json +195 -0
- package/src/web/text/text.css +1 -0
- package/src/web/text/text.vue +195 -0
- package/src/web/text/text.vue.d.ts +161 -0
- package/src/web/textarea/AI_GUIDE.md +141 -0
- package/src/web/textarea/index.ts +3 -0
- package/src/web/textarea/manifest.json +438 -0
- package/src/web/textarea/textarea.css +1 -0
- package/src/web/textarea/textarea.vue +458 -0
- package/src/web/textarea/textarea.vue.d.ts +265 -0
- package/src/web/tooltip/AI_GUIDE.md +110 -0
- package/src/web/tooltip/index.ts +3 -0
- package/src/web/tooltip/manifest.json +222 -0
- package/src/web/tooltip/tooltip.css +1 -0
- package/src/web/tooltip/tooltip.vue +417 -0
- package/src/web/tooltip/tooltip.vue.d.ts +150 -0
- package/src/webview/bottomsheet/AI_GUIDE.md +141 -0
- package/src/webview/bottomsheet/bottomsheet.css +1 -0
- package/src/webview/bottomsheet/bottomsheet.vue +441 -0
- package/src/webview/bottomsheet/bottomsheet.vue.d.ts +178 -0
- package/src/webview/bottomsheet/index.ts +4 -0
- package/src/webview/bottomsheet/manifest.json +377 -0
- package/src/webview/button/AI_GUIDE.md +79 -0
- package/src/webview/button/button-ios.css +1 -0
- package/src/webview/button/button-ios.vue +138 -0
- package/src/webview/button/button-ios.vue.d.ts +102 -0
- package/src/webview/button/button-material.css +1 -0
- package/src/webview/button/button-material.vue +138 -0
- package/src/webview/button/button-material.vue.d.ts +102 -0
- package/src/webview/button/index.ts +7 -0
- package/src/webview/button/manifest.json +148 -0
- package/src/webview/index.ts +7 -0
- package/tailwind-preset.cjs +62 -0
- package/tailwind-preset.js +62 -0
- package/ttdk-manifest.json +10188 -0
- package/README.md +0 -3
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// Auto-generated by TTDK Design System Vue Type Generator
|
|
3
|
+
import type { DefineComponent } from "vue";
|
|
4
|
+
import {
|
|
5
|
+
computePosition,
|
|
6
|
+
autoUpdate,
|
|
7
|
+
flip,
|
|
8
|
+
shift,
|
|
9
|
+
offset,
|
|
10
|
+
size as floatingSize,
|
|
11
|
+
} from "@floating-ui/dom";
|
|
12
|
+
import { buildUiVars, UiProps } from "../../core/types";
|
|
13
|
+
|
|
14
|
+
export interface DropdownOption {
|
|
15
|
+
/**
|
|
16
|
+
* Teks label tampilan pilihan dropdown menu.
|
|
17
|
+
*/
|
|
18
|
+
label: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Nilai unik (value) dari item dropdown.
|
|
22
|
+
*/
|
|
23
|
+
value: string | number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Status apakah opsi ini dinonaktifkan dari pemilihan.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Ikon kustom di samping label item pilihan.
|
|
33
|
+
*/
|
|
34
|
+
icon?: any;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Deskripsi atau teks bantuan kecil di bawah label item pilihan.
|
|
38
|
+
*/
|
|
39
|
+
description?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Menandai item sebagai aksi berbahaya/destruktif (misal: "Hapus"), ditampilkan dengan warna aksen merah.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
danger?: boolean;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Menampilkan garis pemisah horizontal (divider) di atas item ini.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
divider?: boolean;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Callback event saat item ini diklik.
|
|
55
|
+
*/
|
|
56
|
+
onClick?: (option?: DropdownOption) => void;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type DropdownMenuItem = DropdownOption;
|
|
60
|
+
|
|
61
|
+
export type DropdownUiProps = UiProps;
|
|
62
|
+
|
|
63
|
+
export interface DropdownProps {
|
|
64
|
+
/**
|
|
65
|
+
* Teks label judul field yang ditampilkan di atas dropdown (14px Semibold, #141313).
|
|
66
|
+
*/
|
|
67
|
+
label?: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Menandai field sebagai opsi opsional dengan menambahkan teks '(Opsional)' (12px Regular, #9698A2).
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
optional?: boolean;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Kustomisasi teks keterangan opsional.
|
|
77
|
+
* @default '(Opsional)'
|
|
78
|
+
*/
|
|
79
|
+
optionalText?: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Teks petunjuk saat belum ada opsi yang dipilih.
|
|
83
|
+
* @default 'Pilih dropdown menu'
|
|
84
|
+
*/
|
|
85
|
+
placeholder?: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Nilai terpilih saat ini (single string/number atau array nilai untuk mode multiple).
|
|
89
|
+
*/
|
|
90
|
+
value?: any;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Nilai awal tidak terkontrol (uncontrolled initial value).
|
|
94
|
+
*/
|
|
95
|
+
defaultValue?: any;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Daftar pilihan opsi dropdown menu. Dapat berupa array of object `{ label, value }` atau array of string.
|
|
99
|
+
*/
|
|
100
|
+
options?: Array<DropdownOption | string>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Mode pemilihan jamak (multi-select) dengan tampilan chips/tag dan daftar checkbox.
|
|
104
|
+
* @default false
|
|
105
|
+
*/
|
|
106
|
+
multiple?: boolean;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Mengaktifkan kotak pencarian (search input) di dalam menu dropdown.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
searchable?: boolean;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Placeholder pada kotak pencarian di dalam dropdown.
|
|
116
|
+
* @default 'Cari'
|
|
117
|
+
*/
|
|
118
|
+
searchPlaceholder?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Teks tombol terapkan pada footer multi-select.
|
|
122
|
+
* @default 'Terapkan'
|
|
123
|
+
*/
|
|
124
|
+
applyText?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Teks tombol reset pada footer multi-select.
|
|
128
|
+
* @default 'Reset'
|
|
129
|
+
*/
|
|
130
|
+
resetText?: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Nama form field HTML.
|
|
134
|
+
*/
|
|
135
|
+
name?: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Identifier unik elemen dropdown.
|
|
139
|
+
*/
|
|
140
|
+
id?: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Status apakah dropdown sedang dalam kondisi error / tidak valid.
|
|
144
|
+
* @default false
|
|
145
|
+
*/
|
|
146
|
+
error?: boolean;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Pesan teks penjelasan kesalahan validasi di bawah field.
|
|
150
|
+
*/
|
|
151
|
+
errorMessage?: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Teks petunjuk atau keterangan bantuan di bawah field (12px Regular, #3C4245).
|
|
155
|
+
*/
|
|
156
|
+
helperText?: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Posisi teks helper
|
|
160
|
+
*/
|
|
161
|
+
helperTextPosition?: "top" | "bottom";
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Skala ukuran dropdown.
|
|
165
|
+
* - `'sm'`: 36px
|
|
166
|
+
* - `'md'`: 48px (standar desain)
|
|
167
|
+
* - `'lg'`: 56px
|
|
168
|
+
* @default 'md'
|
|
169
|
+
*/
|
|
170
|
+
size?: "sm" | "md" | "lg";
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Bentuk sudut kelengkungan dropdown.
|
|
174
|
+
* - `'none'`: 0px
|
|
175
|
+
* - `'sm'`: 4px
|
|
176
|
+
* - `'md'`: 8px (standar desain)
|
|
177
|
+
* - `'lg'`: 12px
|
|
178
|
+
* - `'full'`: 9999px (kapsul)
|
|
179
|
+
* @default 'md'
|
|
180
|
+
*/
|
|
181
|
+
rounded?: "none" | "sm" | "md" | "lg" | "full";
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Posisi penempatan panel menu dropdown popover terhadap elemen trigger.
|
|
185
|
+
* @default 'bottom-start'
|
|
186
|
+
*/
|
|
187
|
+
placement?:
|
|
188
|
+
| "bottom-start"
|
|
189
|
+
| "bottom-end"
|
|
190
|
+
| "bottom"
|
|
191
|
+
| "top-start"
|
|
192
|
+
| "top-end"
|
|
193
|
+
| "top";
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Menampilkan panah chevron indikator buka/tutup pada trigger.
|
|
197
|
+
* @default true
|
|
198
|
+
*/
|
|
199
|
+
arrow?: boolean;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Ikon kustom di awal teks trigger (leading icon).
|
|
203
|
+
*/
|
|
204
|
+
icon?: any;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Otomatis menutup menu popover setelah pengguna memilih opsi (pada single select).
|
|
208
|
+
* @default true
|
|
209
|
+
*/
|
|
210
|
+
closeOnSelect?: boolean;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Menjadikan lebar field dropdown memenuhi kontainer penuh (full-width 100%).
|
|
214
|
+
* @default false
|
|
215
|
+
*/
|
|
216
|
+
block?: boolean;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Status apakah dropdown dinonaktifkan (disabled).
|
|
220
|
+
* @default false
|
|
221
|
+
*/
|
|
222
|
+
disabled?: boolean;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Menandai field sebagai input wajib diisi (menampilkan tanda bintang merah *).
|
|
226
|
+
* @default false
|
|
227
|
+
*/
|
|
228
|
+
required?: boolean;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Ref instance elemen control dropdown untuk akses DOM langsung.
|
|
232
|
+
*/
|
|
233
|
+
inputRef?: any;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Menampilkan tombol × untuk menghapus pilihan yang sudah dipilih.
|
|
237
|
+
* @default false
|
|
238
|
+
*/
|
|
239
|
+
clearable?: boolean;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Menampilkan spinner loading dan menonaktifkan interaksi dropdown.
|
|
243
|
+
* @default false
|
|
244
|
+
*/
|
|
245
|
+
loading?: boolean;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Menjadikan dropdown hanya-baca (tidak bisa dibuka/diubah).
|
|
249
|
+
* @default false
|
|
250
|
+
*/
|
|
251
|
+
readOnly?: boolean;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Kustomisasi visual granular wrapper utama (UiProps).
|
|
255
|
+
*/
|
|
256
|
+
ui?: DropdownUiProps;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Style inline native untuk wrapper luar.
|
|
260
|
+
*/
|
|
261
|
+
style?: any;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Style kustom untuk elemen label (UiProps).
|
|
265
|
+
*/
|
|
266
|
+
labelStyle?: UiProps;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Class CSS kustom untuk elemen label (Tailwind / class kustom).
|
|
270
|
+
*/
|
|
271
|
+
labelClass?: string;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Style kustom untuk elemen kotak pemicu (control trigger) (UiProps).
|
|
275
|
+
*/
|
|
276
|
+
controlStyle?: UiProps;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Class CSS kustom untuk elemen kotak pemicu (control trigger) (Tailwind / class kustom).
|
|
280
|
+
*/
|
|
281
|
+
controlClass?: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Style kustom untuk panel popover / menu list opsi (UiProps).
|
|
285
|
+
*/
|
|
286
|
+
listStyle?: UiProps;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Class CSS kustom untuk panel popover / menu list opsi (Tailwind / class kustom).
|
|
290
|
+
*/
|
|
291
|
+
listClass?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Style kustom untuk pesan teks error validasi (UiProps).
|
|
295
|
+
*/
|
|
296
|
+
errorMessageStyle?: UiProps;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Class CSS kustom untuk pesan teks error validasi (Tailwind / class kustom).
|
|
300
|
+
*/
|
|
301
|
+
errorMessageClass?: string;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Style kustom untuk teks petunjuk bantuan (UiProps).
|
|
305
|
+
*/
|
|
306
|
+
helperTextStyle?: UiProps;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Class CSS kustom untuk teks petunjuk bantuan (Tailwind / class kustom).
|
|
310
|
+
*/
|
|
311
|
+
helperTextClass?: string;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Callback event saat nilai pilihan berubah.
|
|
315
|
+
*/
|
|
316
|
+
onChange?: (value: any) => void;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Callback event saat sebuah opsi dipilih dari menu.
|
|
320
|
+
*/
|
|
321
|
+
onSelect?: (option: DropdownOption) => void;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Callback event saat pengguna mengetik di kolom pencarian.
|
|
325
|
+
*/
|
|
326
|
+
onSearch?: (query: string) => void;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Callback event saat menu dropdown terbuka.
|
|
330
|
+
*/
|
|
331
|
+
onOpen?: () => void;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Callback event saat menu dropdown ditutup.
|
|
335
|
+
*/
|
|
336
|
+
onClose?: () => void;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Menonaktifkan middleware `shift` pada floating-ui sehingga posisi list popover
|
|
340
|
+
* tidak bergeser secara horizontal mengikuti tepi layar.
|
|
341
|
+
* Berguna saat ingin list tetap berada di tengah atau posisi placement yang ditentukan.
|
|
342
|
+
* @default false
|
|
343
|
+
*/
|
|
344
|
+
disableShift?: boolean;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Class CSS kustom wrapper luar.
|
|
348
|
+
*/
|
|
349
|
+
className?: string;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Elemen pemicu (trigger) kustom, tombol, ikon, atau komponen anak lainnya.
|
|
353
|
+
*/
|
|
354
|
+
children?: any;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Konten kustom yang ditampilkan di dalam panel popover menggantikan list opsi standar.
|
|
358
|
+
* Berguna untuk menampilkan komponen seperti Calendar, Color Picker, dsb. di dalam Dropdown.
|
|
359
|
+
* Ketika prop ini di-set, `options` tidak akan dirender.
|
|
360
|
+
* Menerima ReactNode atau render function `({ close }) => ReactNode`.
|
|
361
|
+
*/
|
|
362
|
+
panelContent?: any;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Label atau teks kustom untuk ditampilkan pada trigger dropdown.
|
|
366
|
+
* Sangat berguna saat menggunakan `panelContent` seperti Date Picker di mana nilai trigger diformat secara kustom.
|
|
367
|
+
*/
|
|
368
|
+
displayValue?: string;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Strategi positioning Floating UI ('fixed' atau 'absolute').
|
|
372
|
+
* Default 'fixed' agar dropdown tidak terpotong (clipped) oleh kontainer parent yang memiliki `overflow: hidden`.
|
|
373
|
+
* @default 'fixed'
|
|
374
|
+
*/
|
|
375
|
+
// strategy?: 'fixed' | 'absolute';
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export type DropdownMenuProps = DropdownProps;
|
|
379
|
+
|
|
380
|
+
declare const component: DefineComponent<DropdownProps>;
|
|
381
|
+
export default component;
|