@idds/vue 1.6.20 → 1.6.22

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/AGENT.md ADDED
@@ -0,0 +1,352 @@
1
+ # INA Digital Design System (IDDS) - Vue Comprehensive Agent Manual
2
+
3
+ This manual provides complete documentation for AI Coding Agents (such as GitHub Copilot, Cursor, Claude, Gemini) and human developers implementing `@idds/vue` components within Vue 3 applications. It details every available component, its complete set of Vue props, reactive `v-model` binding rules, template named slots, allowed parameter values, and clear usage code snippets.
4
+
5
+ ---
6
+
7
+ ## Core Setup & Global Integration
8
+
9
+ ### 1. Stylesheet Registration
10
+ The application MUST import the global stylesheet once at the application's root layer (typically `main.ts` or `App.vue` setup):
11
+ ```typescript
12
+ import '@idds/vue/index.css';
13
+ ```
14
+
15
+ ### 2. Component Import Rules
16
+ Always import components cleanly inside standard `<script setup>` blocks directly from the package root:
17
+ ```vue
18
+ <script setup lang="ts">
19
+ import { Button, TextField, Modal, SelectDropdown } from '@idds/vue';
20
+ </script>
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Exhaustive Component Reference
26
+
27
+ ### 1. Layout, Indicators & Generic Containers
28
+
29
+ #### `Button`
30
+ Trigger element supporting slot additions and interaction hierarchies.
31
+ - **Props**:
32
+ - `variant`: `'primary' | 'secondary' | 'tertiary' | 'link' | 'custom'` (Default: `'primary'`)
33
+ - `size`: `'2xl' | 'xl' | 'lg' | 'md' | 'sm'` (Default: `'md'`)
34
+ - `disabled`: `boolean` (Default: `false`)
35
+ - `loading`: `boolean` (Default: `false`)
36
+ - **Slots**: `#default` (text content), `#icon-left` (leading icon), `#icon-right` (trailing icon)
37
+ - **Usage**:
38
+ ```vue
39
+ <template>
40
+ <Button variant="primary" size="lg" @click="onSubmit">
41
+ <template #icon-left><IconCheck /></template>
42
+ Simpan Perubahan
43
+ </Button>
44
+ </template>
45
+ ```
46
+
47
+ #### `ButtonGroup`
48
+ Wraps consecutive multiple buttons ensuring integrated boundary aesthetics.
49
+ - **Slots**: `#default` containing `<Button>` children.
50
+ - **Usage**:
51
+ ```vue
52
+ <ButtonGroup>
53
+ <Button variant="secondary">Kiri</Button>
54
+ <Button variant="primary">Kanan</Button>
55
+ </ButtonGroup>
56
+ ```
57
+
58
+ #### `Card`
59
+ Standardized visual structural wrapper.
60
+ - **Props**: `clickable`: `boolean`
61
+ - **Slots**: `#default`, `#header`, `#footer`
62
+ - **Usage**:
63
+ ```vue
64
+ <Card class="p-4 border border-stroke-primary">
65
+ <h3>Konten Utama</h3>
66
+ </Card>
67
+ ```
68
+
69
+ #### `CardPlain`
70
+ Clean minimalist semantic div wrapper container.
71
+ - **Slots**: `#default`
72
+
73
+ #### `Divider`
74
+ Horizontal or vertical breakline divider.
75
+ - **Props**: `orientation`: `'horizontal' | 'vertical'` (Default: `'horizontal'`)
76
+
77
+ #### `Skeleton`
78
+ Placeholder preview indicators rendered during processing.
79
+ - **Props**:
80
+ - `variant`: `'circular' | 'rectangular' | 'rounded'` (Default: `'rounded'`)
81
+ - `width`, `height`: `string | number`
82
+ - **Usage**:
83
+ ```vue
84
+ <Skeleton variant="rounded" :height="40" width="100%" />
85
+ ```
86
+
87
+ #### `Spinner`
88
+ Indeterminate graphic circle loader.
89
+ - **Props**: `size`: `'sm' | 'md' | 'lg'`, `color`: `string`
90
+
91
+ #### `Avatar`
92
+ Displays profile thumbnails.
93
+ - **Props**:
94
+ - `src`: `string`
95
+ - `alt`: `string`
96
+ - `size`: `'sm' | 'md' | 'lg' | 'xl'`
97
+ - `fallbackText`: `string` (Displays initials cleanly)
98
+
99
+ #### `Badge`
100
+ Contextual status tracker.
101
+ - **Props**:
102
+ - `text`: `string`
103
+ - `variant`: `'success' | 'danger' | 'warning' | 'info' | 'neutral'`
104
+ - `type`: `'solid' | 'soft' | 'outline'`
105
+ - **Slots**: `#icon`
106
+ - **Usage**:
107
+ ```vue
108
+ <Badge text="Aktif" variant="success" type="solid" />
109
+ ```
110
+
111
+ #### `CircleProgressBar` / `ProgressBar` / `LinearProgressIndicator` / `TableProgressBar`
112
+ Progress tracker displays.
113
+ - **Props**: `progress`: `number` (0-100), `status`: `'default' | 'success' | 'error'`
114
+
115
+ ---
116
+
117
+ ### 2. Form Inputs (v-model Integration)
118
+
119
+ #### `TextField`
120
+ Robust input field leveraging integrated debounce and direct resets.
121
+ - **Bindings**: Bound directly using reactive `v-model` (or `v-model:modelValue`).
122
+ - **Props**:
123
+ - `label`: `string`
124
+ - `placeholder`: `string`
125
+ - `helperText`: `string`
126
+ - `errorMessage`: `string`
127
+ - `status`: `'neutral' | 'error' | 'warning' | 'success'`
128
+ - `size`: `'sm' | 'md' | 'lg'`
129
+ - `disabled`, `readonly`: `boolean`
130
+ - `maxlength`: `number`
131
+ - `showCharCount`: `boolean`
132
+ - `showClearButton`: `boolean` (Default: `true`)
133
+ - **Slots**: `#prefix`, `#suffix`
134
+ - **Usage**:
135
+ ```vue
136
+ <template>
137
+ <TextField
138
+ v-model="username"
139
+ label="Nama Pengguna"
140
+ placeholder="Masukkan nama"
141
+ :status="hasError ? 'error' : 'neutral'"
142
+ :errorMessage="hasError ? 'Wajib diisi' : ''"
143
+ showClearButton
144
+ />
145
+ </template>
146
+ ```
147
+
148
+ #### `TextArea`
149
+ Multi-line block wrapper.
150
+ - **Bindings**: `v-model`
151
+ - **Props**: `rows`: `number`, `label`, `placeholder`, `errorMessage`, `status`, `maxlength`
152
+
153
+ #### `PasswordInput`
154
+ Input displaying text masks embedding direct visibility switch icons.
155
+ - **Bindings**: `v-model`
156
+ - **Props**: Matches `TextField` parameters natively.
157
+
158
+ #### `InputSearch`
159
+ Optimized quick query entry block.
160
+ - **Bindings**: `v-model`
161
+ - **Props**: Automatically encapsulates leading search graphics and immediate clear action support.
162
+
163
+ #### `PhoneInput`
164
+ Handles auto-formatting country inputs natively.
165
+ - **Bindings**: `v-model`
166
+ - **Props**: `defaultCountry`: `string` (e.g., `'ID'`), `disabled`: `boolean`. Supports keyboard space/enter triggers cleanly on embedded reset controls.
167
+
168
+ #### `Checkbox`
169
+ Single option boolean toggle.
170
+ - **Bindings**: `v-model` (Boolean or array push tracking)
171
+ - **Props**: `label`: `string`, `disabled`: `boolean`, `indeterminate`: `boolean`
172
+ - **Usage**:
173
+ ```vue
174
+ <Checkbox v-model="isChecked" label="Setuju syarat dan ketentuan" />
175
+ ```
176
+
177
+ #### `RadioInput`
178
+ Grouped list selector.
179
+ - **Bindings**: `v-model`
180
+ - **Props**:
181
+ - `options`: `Array<{ label: string; value: string | number; disabled?: boolean }>`
182
+ - `orientation`: `'horizontal' | 'vertical'`
183
+ - `label`: `string`
184
+ - `disabled`: `boolean`
185
+
186
+ #### `Toggle`
187
+ Switch layout toggle.
188
+ - **Bindings**: `v-model`
189
+ - **Props**: `label`: `string`, `disabled`: `boolean`
190
+
191
+ #### `OneTimePassword`
192
+ Code sequence field inputs.
193
+ - **Bindings**: `v-model`
194
+ - **Props**: `length`: `number` (Default: `6`), `@complete`: `(val: string) => void`
195
+
196
+ ---
197
+
198
+ ### 3. Selection, Pickers & Uploading
199
+
200
+ #### `SelectDropdown`
201
+ Robust feature-rich remote loaded list drop menu.
202
+ - **Bindings**: `v-model` (Handles string/number single values or arrays when `multiple` is active).
203
+ - **Props**:
204
+ - `options`: `Array<{ label: string; value: any; disabled?: boolean }>`
205
+ - `placeholder`: `string`
206
+ - `size`: `'sm' | 'md' | 'lg'`
207
+ - `multiple`: `boolean` (Default: `false`)
208
+ - `searchable`: `boolean` (Default: `true`)
209
+ - `hasMore`, `loading`: `boolean`
210
+ - `mandatorySelected`: `boolean` (Forces at least one choice to remain actively locked)
211
+ - **Events**: `@search="onSearchTerm"`, `@load-more="onPageTrigger"`
212
+ - **Usage**:
213
+ ```vue
214
+ <SelectDropdown
215
+ v-model="selectedData"
216
+ :options="itemsList"
217
+ mandatorySelected
218
+ placeholder="Pilih kategori..."
219
+ />
220
+ ```
221
+
222
+ #### `ActionDropdown` / `BasicDropdown`
223
+ Trigger floating contextual items.
224
+ - **Props**: `items`: `Array<{ label: string; action: () => void; disabled?: boolean }>`
225
+
226
+ #### `Chip`
227
+ Compact thematic tags supporting navigation indices.
228
+ - **Props**: `label`: `string`, `selected`: `boolean`, `multiple`: `boolean`, `disabled`: `boolean`
229
+ - **Events**: `@click`, `@remove`
230
+ - Supports keyboard roving arrow navigation seamlessly.
231
+
232
+ #### `MultipleChoiceGrid`
233
+ Option grids map setup wrapper.
234
+ - **Bindings**: `v-model` array
235
+
236
+ #### `DatePicker`
237
+ Fluid layer selector managing exact standard timelines.
238
+ - **Bindings**: `v-model` (Date object, range array `[start, end]`, or multiple Date arrays).
239
+ - **Props**: `mode`: `'single' | 'range' | 'multiple'`, `minDate`, `maxDate`, `disabled`
240
+ - **Usage**:
241
+ ```vue
242
+ <DatePicker v-model="selectedDate" mode="single" placeholder="Pilih tanggal" />
243
+ ```
244
+
245
+ #### `MonthPicker` / `YearPicker`
246
+ Targeted timeline drills.
247
+ - **Bindings**: `v-model` (Year/Month numeric tracking).
248
+
249
+ #### `TimePicker`
250
+ Time tracking entries.
251
+ - **Bindings**: `v-model` (Format string: `'HH:mm'`).
252
+ - Fully wraps internal automated colons injection logic (`:`) during continuous keypad input strokes. Includes keyboard accessibility rules for embedded clear buttons.
253
+
254
+ #### `FileUpload` / `SingleFileUpload`
255
+ Drag and drop structural media blocks.
256
+ - **Events**: `@update:files="onFiles"` (or `@update:file` for single modes).
257
+ - **Props**: `maxSize`: `number`, `acceptedFormats`: `string`
258
+
259
+ ---
260
+
261
+ ### 4. Navigation, View Structures & Feedback
262
+
263
+ #### `Accordion` / `AccordionGroup` / `AccordionCard`
264
+ Collapsible block structure views.
265
+ - **Props**: `title`: `string`, `modelValue`: `boolean` (expanded state)
266
+ - Fully accessible via native Keyboard navigation mappings.
267
+
268
+ #### `Breadcrumb`
269
+ Path tracing trackers.
270
+ - **Props**: `items`: `Array<{ label: string; href?: string }>`
271
+ - **Events**: `@item-click="(item) => handleCustomRoute(item)"` (Supports native SPA framework push handlers directly).
272
+
273
+ #### `TabHorizontal` / `TabVertical`
274
+ Context view group control tab arrays.
275
+ - **Bindings**: `v-model` (Tracks active target ID).
276
+ - **Props**: `tabs`: `Array<{ id: string; label: string; disabled?: boolean }>`
277
+
278
+ #### `Pagination`
279
+ Table row paging indicators.
280
+ - **Bindings**: `v-model:currentPage`
281
+ - **Props**: `totalPages`: `number`
282
+
283
+ #### `Stepper`
284
+ Step progress tracker displays.
285
+ - **Props**: `steps`: `Array`, `activeStep`: `number`
286
+
287
+ #### `Table` / `FieldInputTable`
288
+ High-performance rendering grids.
289
+ - **Props**: `columns`: `Array`, `data`: `Array`
290
+ - **Slots**: Dynamic column naming mappings supported directly.
291
+
292
+ #### `Modal`
293
+ Portal wrapper overlays featuring direct dynamic flex scroll limits.
294
+ - **Bindings**: `v-model` (Governs visible state flag).
295
+ - **Props**: `title`: `string`, `size`: `'sm' | 'md' | 'lg' | 'xl' | 'full'`, `hideHeader`: `boolean`
296
+ - **Usage**:
297
+ ```vue
298
+ <Modal v-model="showDialog" title="Konfirmasi Tindakan" size="md">
299
+ <p>Data yang dihapus tidak dapat dipulihkan.</p>
300
+ <template #footer>
301
+ <ButtonGroup>
302
+ <Button variant="secondary" @click="showDialog = false">Batal</Button>
303
+ <Button variant="danger" @click="commitAction">Hapus</Button>
304
+ </ButtonGroup>
305
+ </template>
306
+ </Modal>
307
+ ```
308
+
309
+ #### `Drawer` / `BottomSheet`
310
+ Side and bottom view slider layouts.
311
+ - **Bindings**: `v-model`
312
+
313
+ #### `Collapse`
314
+ Smooth height expansion wrappers.
315
+ - **Bindings**: `v-model`
316
+
317
+ #### `Tooltip`
318
+ Floating target context cue elements.
319
+ - **Props**: `content`: `string`, `placement`: Exposes 12 placement targets (`top-start`, `bottom-end`, etc.)
320
+
321
+ #### `Toast` / `ToastProvider`
322
+ Contextual messaging engines.
323
+ - **Usage**:
324
+ Register `<ToastProvider>` once at root application layers. Access trigger mechanisms using custom setup framework utilities:
325
+ ```vue
326
+ <script setup lang="ts">
327
+ import { useToast } from '@idds/vue';
328
+ const { toast } = useToast();
329
+
330
+ const trigger = () => toast({ state: 'positive', title: 'Sukses', description: 'Tersimpan' });
331
+ </script>
332
+ ```
333
+
334
+ #### `Alert`
335
+ Static message box wrapper.
336
+ - **Props**: `state`: `'info' | 'positive' | 'warning' | 'destructive'`, `title`: `string`
337
+
338
+ #### `ThemeToggle`
339
+ Standard dynamic global dark-light toggle button widget.
340
+
341
+ ---
342
+
343
+ ## Global Theme Commands
344
+ IDDS configures reactive root layer CSS context natively based on DOM targets.
345
+ - Implementor scripts can invoke state changes securely:
346
+ ```typescript
347
+ import { setThemeMode, getThemeMode, toggleThemeMode } from '@idds/vue';
348
+ ```
349
+
350
+ ## AI Implementor Guidelines
351
+ 1. **Rely on native framework attributes**: Prefer using reactive `errorMessage` binding targets over writing manual floating DOM tags under standard view forms.
352
+ 2. **Preserve component scope variant logic**: Let existing tokens handle component interface variants exactly. Do not force inline overriding directives.
@@ -5,7 +5,7 @@ export interface ModalProps {
5
5
  size?: 'sm' | 'md' | 'lg' | 'xl' | 'full' | '';
6
6
  variant?: 'default' | 'centered' | 'fullscreen';
7
7
  showCloseButton?: boolean;
8
- showHeader?: boolean;
8
+ hideHeader?: boolean;
9
9
  showFooter?: boolean;
10
10
  closeLabel?: string;
11
11
  closeOnBackdrop?: boolean;
@@ -39,9 +39,9 @@ declare const __VLS_component: import('vue').DefineComponent<ModalProps, {}, {},
39
39
  variant: "default" | "centered" | "fullscreen";
40
40
  size: "sm" | "md" | "lg" | "xl" | "full" | "";
41
41
  modelValue: boolean;
42
- showHeader: boolean;
43
42
  showFooter: boolean;
44
43
  showCloseButton: boolean;
44
+ hideHeader: boolean;
45
45
  closeLabel: string;
46
46
  closeOnBackdrop: boolean;
47
47
  closeOnEscape: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../src/components/Modal.vue"],"names":[],"mappings":"AA2DA;AAs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