@vc-shell/vc-app-skill 2.11.0 → 2.12.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/package.json +1 -1
- package/runtime/VERSION +1 -1
- package/runtime/knowledge/components.json +6396 -0
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/blade-navigation/table-query-state/useTableQueryState.docs.md +1 -1
- package/runtime/knowledge/docs/core/plugins/i18n/i18n.docs.md +34 -8
- package/runtime/knowledge/docs/modules/assets/assets-details.docs.md +107 -40
- package/runtime/knowledge/docs/modules/assets-manager/assets-folder-manager.docs.md +201 -0
- package/runtime/knowledge/docs/modules/assets-manager/assets-manager.docs.md +1 -0
- package/runtime/knowledge/docs/ui/components/atoms/vc-badge/vc-badge.docs.md +16 -14
- package/runtime/knowledge/docs/ui/components/atoms/vc-button/vc-button.docs.md +24 -11
- package/runtime/knowledge/docs/ui/components/molecules/vc-accordion/vc-accordion.docs.md +18 -4
- package/runtime/knowledge/docs/ui/components/molecules/vc-dropdown/vc-dropdown.docs.md +71 -43
- package/runtime/knowledge/docs/ui/components/molecules/vc-input/vc-input.docs.md +56 -46
- package/runtime/knowledge/docs/ui/components/molecules/vc-popover/vc-popover.docs.md +2 -0
- package/runtime/knowledge/docs/ui/components/molecules/vc-switch/vc-switch.docs.md +4 -3
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +140 -26
- package/runtime/knowledge/docs/ui/components/organisms/vc-search-bar/vc-search-bar.docs.md +284 -0
- package/runtime/knowledge/docs/ui/components/organisms/vc-sidebar/vc-sidebar.docs.md +46 -28
- package/runtime/knowledge/index.md +14 -0
|
@@ -240,12 +240,25 @@ interface AccordionItem {
|
|
|
240
240
|
| --------- | ---------------------------------------------------------------- |
|
|
241
241
|
| `default` | Place `VcAccordionItem` components directly for custom rendering |
|
|
242
242
|
|
|
243
|
+
### VcAccordionItem Props
|
|
244
|
+
|
|
245
|
+
| Prop | Type | Default | Description |
|
|
246
|
+
| ------------------- | ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
247
|
+
| `title` | `string` | -- | Header text |
|
|
248
|
+
| `isExpanded` | `boolean` | `false` | Open state; the item also emits `toggle` and `update:isExpanded` |
|
|
249
|
+
| `collapsedHeight` | `number` | `0` | Height in px shown while closed |
|
|
250
|
+
| `maxExpandedHeight` | `number` | -- | Maximum open height in px; taller content scrolls |
|
|
251
|
+
| `disabled` | `boolean` | `false` | Disables the header |
|
|
252
|
+
| `lazy` | `boolean` | `false` | Mounts the content only while open: on open, and until the close animation ends. The item stays expandable with nothing mounted to measure, and the closed panel is inert |
|
|
253
|
+
| `iconPosition` | `"start" \| "end"` | `"end"` | Chevron after the title, or before it (pointing to the text while closed, down while open) |
|
|
254
|
+
|
|
243
255
|
### VcAccordionItem Slots
|
|
244
256
|
|
|
245
|
-
| Slot | Description
|
|
246
|
-
| --------- |
|
|
247
|
-
| `title` | Custom title rendering (replaces the `title` prop text)
|
|
248
|
-
| `default` | Content body of the accordion item
|
|
257
|
+
| Slot | Description |
|
|
258
|
+
| --------- | -------------------------------------------------------------------------------------------------------------- |
|
|
259
|
+
| `title` | Custom title rendering (replaces the `title` prop text) |
|
|
260
|
+
| `default` | Content body of the accordion item |
|
|
261
|
+
| `actions` | Controls next to the header button, outside it (e.g. a remove button). Without it the header renders as before |
|
|
249
262
|
|
|
250
263
|
## CSS Variables
|
|
251
264
|
|
|
@@ -269,6 +282,7 @@ interface AccordionItem {
|
|
|
269
282
|
| `--accordion-item-header-gap` | `0` | Gap between header label and icon |
|
|
270
283
|
| `--accordion-item-icon-margin-left` | `12px` | Left margin of the chevron icon |
|
|
271
284
|
| `--accordion-item-icon-size` | `20px` | Chevron icon size |
|
|
285
|
+
| `--accordion-item-icon-color` | `currentColor` | Chevron color |
|
|
272
286
|
| `--accordion-item-content-color` | `var(--secondary-950)` | Content body text color |
|
|
273
287
|
| `--accordion-item-content-font-size` | `14px` | Content body font size |
|
|
274
288
|
| `--accordion-item-content-line-height` | `20px` | Content body line height |
|
|
@@ -203,6 +203,29 @@ By default the panel is unmounted while closed. Set `forceMount` to keep it in t
|
|
|
203
203
|
</VcDropdown>
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
+
### Combobox Mode
|
|
207
|
+
|
|
208
|
+
A text field that suggests values keeps the focus while its list is open: the field's own keys move the active option, and the list only shows it. Set `combobox`, put the field in the `trigger` slot, mark the active option with `isItemActive`, and name it on the field with the slot's `itemId`:
|
|
209
|
+
|
|
210
|
+
```vue
|
|
211
|
+
<VcDropdown :model-value="open" :items="suggestions" role="listbox" combobox floating :teleport="false" placement="bottom-start" :auto-focus-panel="false" :close-on-escape="false" :close-on-click-outside="false" :is-item-active="(s) => suggestions.indexOf(s) === active" @item-click="pick">
|
|
212
|
+
<template #trigger="{ panelId, itemId }">
|
|
213
|
+
<VcInput
|
|
214
|
+
v-model="text"
|
|
215
|
+
:input-attrs="{
|
|
216
|
+
role: 'combobox',
|
|
217
|
+
'aria-expanded': open,
|
|
218
|
+
'aria-controls': open ? panelId : undefined,
|
|
219
|
+
'aria-activedescendant': open ? itemId(active) : undefined,
|
|
220
|
+
}"
|
|
221
|
+
@keydown="onArrowKeys"
|
|
222
|
+
/>
|
|
223
|
+
</template>
|
|
224
|
+
</VcDropdown>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The panel is not focusable and a mouse press on it is cancelled, so the field keeps the focus (and its caret) while an option is clicked.
|
|
228
|
+
|
|
206
229
|
## Recipes
|
|
207
230
|
|
|
208
231
|
### Confirmation Dropdown
|
|
@@ -322,31 +345,32 @@ By default the panel is unmounted while closed. Set `forceMount` to keep it in t
|
|
|
322
345
|
|
|
323
346
|
## Props
|
|
324
347
|
|
|
325
|
-
| Prop | Type | Default | Description
|
|
326
|
-
| --------------------- | ---------------------------------------------- | ------------------------------- |
|
|
327
|
-
| `modelValue` | `boolean` | `false` | Controls open/closed state via `v-model`
|
|
328
|
-
| `items` | `T[]` | `[]` | Items to render in the dropdown
|
|
329
|
-
| `emptyText` | `string` | `""` | Text shown when items array is empty
|
|
330
|
-
| `itemText` | `(item: T) => string` | -- | Maps an item to display text (default renderer only)
|
|
331
|
-
| `isItemActive` | `(item: T) => boolean` | -- | Marks the currently active item (highlighted state)
|
|
332
|
-
| `isItemDisabled` | `(item: T) => boolean` | -- | Marks an item `aria-disabled`: focusable, cannot be chosen
|
|
333
|
-
| `itemKey` | `(item: T, index: number) => string \| number` | index | Unique key function for items
|
|
334
|
-
| `floating` | `boolean` | `false` | Enable floating positioning via `@floating-ui`
|
|
335
|
-
| `teleport` | `boolean` | -- | Force teleport to body (defaults to match `floating`)
|
|
336
|
-
| `teleportTo` | `string \| HTMLElement` | -- | Custom teleport target
|
|
337
|
-
| `placement` | `Placement` | `"bottom"` | Floating UI placement
|
|
338
|
-
| `offset` | `{ mainAxis?: number; crossAxis?: number }` | `{ mainAxis: 0, crossAxis: 0 }` | Offset from the trigger element
|
|
339
|
-
| `variant` | `"default" \| "secondary"` | `"default"` | Visual style variant
|
|
340
|
-
| `maxHeight` | `number \| string` | `300` | Maximum panel height (number = px, string = CSS value)
|
|
341
|
-
| `role` | `"menu" \| "listbox"` | `"menu"` | ARIA role for the dropdown panel
|
|
342
|
-
| `ariaLabel` | `string` | -- | Accessible name for the panel. Required for a named `listbox`.
|
|
343
|
-
| `closeOnClickOutside` | `boolean` | `true` | Close when clicking outside the dropdown
|
|
344
|
-
| `closeOnEscape` | `boolean` | `true` | Close on Escape key press
|
|
345
|
-
| `closeOnSelect` | `boolean` | `false` | Close after selecting an item
|
|
346
|
-
| `autoFocusPanel` | `boolean` | `true` | Focus the panel element when opened
|
|
347
|
-
| `padded` | `boolean` | `true` | Apply compact padding and rounded item backgrounds
|
|
348
|
-
| `zIndex` | `number` | `9300` | Z-index for the floating panel
|
|
349
|
-
| `forceMount` | `boolean` | `false` | Keep the panel content mounted (hidden, inert) while closed
|
|
348
|
+
| Prop | Type | Default | Description |
|
|
349
|
+
| --------------------- | ---------------------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
350
|
+
| `modelValue` | `boolean` | `false` | Controls open/closed state via `v-model` |
|
|
351
|
+
| `items` | `T[]` | `[]` | Items to render in the dropdown |
|
|
352
|
+
| `emptyText` | `string` | `""` | Text shown when items array is empty |
|
|
353
|
+
| `itemText` | `(item: T) => string` | -- | Maps an item to display text (default renderer only) |
|
|
354
|
+
| `isItemActive` | `(item: T) => boolean` | -- | Marks the currently active item (highlighted state) |
|
|
355
|
+
| `isItemDisabled` | `(item: T) => boolean` | -- | Marks an item `aria-disabled`: focusable, cannot be chosen |
|
|
356
|
+
| `itemKey` | `(item: T, index: number) => string \| number` | index | Unique key function for items |
|
|
357
|
+
| `floating` | `boolean` | `false` | Enable floating positioning via `@floating-ui` |
|
|
358
|
+
| `teleport` | `boolean` | -- | Force teleport to body (defaults to match `floating`) |
|
|
359
|
+
| `teleportTo` | `string \| HTMLElement` | -- | Custom teleport target |
|
|
360
|
+
| `placement` | `Placement` | `"bottom"` | Floating UI placement |
|
|
361
|
+
| `offset` | `{ mainAxis?: number; crossAxis?: number }` | `{ mainAxis: 0, crossAxis: 0 }` | Offset from the trigger element |
|
|
362
|
+
| `variant` | `"default" \| "secondary"` | `"default"` | Visual style variant |
|
|
363
|
+
| `maxHeight` | `number \| string` | `300` | Maximum panel height (number = px, string = CSS value) |
|
|
364
|
+
| `role` | `"menu" \| "listbox"` | `"menu"` | ARIA role for the dropdown panel |
|
|
365
|
+
| `ariaLabel` | `string` | -- | Accessible name for the panel. Required for a named `listbox`. |
|
|
366
|
+
| `closeOnClickOutside` | `boolean` | `true` | Close when clicking outside the dropdown |
|
|
367
|
+
| `closeOnEscape` | `boolean` | `true` | Close on Escape key press |
|
|
368
|
+
| `closeOnSelect` | `boolean` | `false` | Close after selecting an item |
|
|
369
|
+
| `autoFocusPanel` | `boolean` | `true` | Focus the panel element when opened |
|
|
370
|
+
| `padded` | `boolean` | `true` | Apply compact padding and rounded item backgrounds |
|
|
371
|
+
| `zIndex` | `number` | `9300` | Z-index for the floating panel |
|
|
372
|
+
| `forceMount` | `boolean` | `false` | Keep the panel content mounted (hidden, inert) while closed |
|
|
373
|
+
| `combobox` | `boolean` | `false` | The trigger is a text field that keeps the focus while the panel is open: the panel leaves the tab order, a press on it does not take the focus, and the field names the active option (see [Combobox Mode](#combobox-mode)) |
|
|
350
374
|
|
|
351
375
|
## Events
|
|
352
376
|
|
|
@@ -359,33 +383,37 @@ By default the panel is unmounted while closed. Set `forceMount` to keep it in t
|
|
|
359
383
|
|
|
360
384
|
## Slots
|
|
361
385
|
|
|
362
|
-
| Slot | Props
|
|
363
|
-
| ----------------- |
|
|
364
|
-
| `trigger` | `{ isActive: boolean, toggle: () => void, open: () => void, close: () => void, panelId: string }` | Custom trigger element. Render a real interactive control (e.g. `VcButton`) that calls `toggle` — the wrapper is a passive container, so nesting a button inside a `role="button"` wrapper is avoided. Use `panelId` to wire `aria-controls`/`aria-expanded` on your control
|
|
365
|
-
| `item` | `{ item: T, click: () => void }`
|
|
366
|
-
| `empty` | --
|
|
367
|
-
| `items-container` | `{ items: T[], close: () => void }`
|
|
386
|
+
| Slot | Props | Description |
|
|
387
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
388
|
+
| `trigger` | `{ isActive: boolean, toggle: () => void, open: () => void, close: () => void, panelId: string, itemId: (index: number) => string }` | Custom trigger element. Render a real interactive control (e.g. `VcButton`) that calls `toggle` — the wrapper is a passive container, so nesting a button inside a `role="button"` wrapper is avoided. Use `panelId` to wire `aria-controls`/`aria-expanded` on your control, and `itemId` for a combobox field's `aria-activedescendant`. |
|
|
389
|
+
| `item` | `{ item: T, click: () => void }` | Custom item rendering |
|
|
390
|
+
| `empty` | -- | Content when items array is empty |
|
|
391
|
+
| `items-container` | `{ items: T[], close: () => void }` | Full control over the items list |
|
|
392
|
+
| `header` | -- | Content above the items, e.g. a title. Not part of the item list or its keyboard navigation |
|
|
368
393
|
|
|
369
394
|
## CSS Variables
|
|
370
395
|
|
|
371
|
-
| Variable | Default
|
|
372
|
-
| ----------------------------------------- |
|
|
373
|
-
| `--vc-dropdown-bg` | `var(--additional-50)`
|
|
374
|
-
| `--vc-dropdown-text` | `var(--neutrals-950)`
|
|
375
|
-
| `--vc-dropdown-border` | `var(--neutrals-200)`
|
|
376
|
-
| `--vc-dropdown-accent` | `var(--neutrals-100)`
|
|
377
|
-
| `--vc-dropdown-accent-foreground` | `var(--neutrals-900)`
|
|
378
|
-
| `--vc-dropdown-divider` | `var(--neutrals-200)`
|
|
379
|
-
| `--vc-dropdown-trigger-focus-ring-width` | `2px`
|
|
380
|
-
| `--vc-dropdown-trigger-focus-ring-offset` | `1px`
|
|
381
|
-
| `--vc-dropdown-trigger-focus-ring-color` | `var(--primary-300)`
|
|
396
|
+
| Variable | Default | Description |
|
|
397
|
+
| ----------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
398
|
+
| `--vc-dropdown-bg` | `var(--additional-50)` | Panel background color |
|
|
399
|
+
| `--vc-dropdown-text` | `var(--neutrals-950)` | Default text color |
|
|
400
|
+
| `--vc-dropdown-border` | `var(--neutrals-200)` | Floating panel border color |
|
|
401
|
+
| `--vc-dropdown-accent` | `var(--neutrals-100)` | Hover/focus background color |
|
|
402
|
+
| `--vc-dropdown-accent-foreground` | `var(--neutrals-900)` | Hover/focus text color |
|
|
403
|
+
| `--vc-dropdown-divider` | `var(--neutrals-200)` | Mobile item divider color |
|
|
404
|
+
| `--vc-dropdown-trigger-focus-ring-width` | `2px` | Trigger focus ring width |
|
|
405
|
+
| `--vc-dropdown-trigger-focus-ring-offset` | `1px` | Trigger focus ring offset |
|
|
406
|
+
| `--vc-dropdown-trigger-focus-ring-color` | `var(--primary-300)` | Trigger focus ring color |
|
|
407
|
+
| `--vc-dropdown-trigger-flex` | `initial` | `flex` of the trigger wrapper; `1 1 auto` lets a field in the trigger fill the dropdown's width |
|
|
408
|
+
| `--vc-dropdown-radius` | `6px` | Corner radius of a floating panel |
|
|
409
|
+
| `--vc-dropdown-shadow` | `0 4px 16px rgba(0, 0, 0, 0.08)` | Shadow of a floating panel |
|
|
382
410
|
|
|
383
411
|
## Accessibility
|
|
384
412
|
|
|
385
413
|
- **Trigger element**: a passive wrapper — the interactive control lives in the `#trigger` slot. Render a real `<button>` (e.g. `VcButton`) that calls `toggle`; wire `aria-expanded`/`aria-haspopup`/`aria-controls` (via the slot's `panelId`) on it. This avoids nesting interactive controls (WCAG 4.1.2).
|
|
386
414
|
- **Panel**: uses the specified `role` attribute (`"menu"` or `"listbox"`), is keyboard-focusable (`tabindex="0"`), and takes an accessible name from `ariaLabel`
|
|
387
415
|
- **Items**: use `role="menuitem"` (menu mode) or `role="option"` (listbox mode)
|
|
388
|
-
- **Active item tracking**: `aria-activedescendant` on the panel tracks the currently focused item
|
|
416
|
+
- **Active item tracking**: `aria-activedescendant` on the panel tracks the currently focused item. In `combobox` mode the panel drops it and leaves the tab order: the field carries `aria-activedescendant` (`itemId` from the trigger slot)
|
|
389
417
|
- **Listbox selection**: `aria-selected` is set on items when `role="listbox"` and `isItemActive` returns `true`
|
|
390
418
|
- **Keyboard navigation**:
|
|
391
419
|
- **Arrow Down / Arrow Up** -- move focus between items (wraps around)
|
|
@@ -671,33 +671,34 @@ VcInput blocks the minus key for both `number` and `integer` types. If you need
|
|
|
671
671
|
|
|
672
672
|
### Props
|
|
673
673
|
|
|
674
|
-
| Prop | Type | Default | Description
|
|
675
|
-
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
676
|
-
| `modelValue` | `string \| number \| Date \| null` | `undefined` | Bound value via `v-model`
|
|
677
|
-
| `type` | `"text" \| "password" \| "email" \| "tel" \| "url" \| "time" \| "number" \| "integer" \| "date" \| "datetime-local" \| "color"` | `"text"` | Input type. `date`/`datetime-local` delegate to VcDatePicker; `color` delegates to VcColorInput
|
|
678
|
-
| `label` | `string` | -- | Label text displayed above the field
|
|
679
|
-
| `placeholder` | `string` | -- | Placeholder text inside the field
|
|
680
|
-
| `hint` | `string` | -- | Help text displayed below the field
|
|
681
|
-
| `tooltip` | `string` | -- | Tooltip text shown on hover next to the label
|
|
682
|
-
| `prefix` | `string` | -- | Static text rendered before the input value
|
|
683
|
-
| `suffix` | `string` | -- | Static text rendered after the input value
|
|
684
|
-
| `name` | `string` | `"Field"` | HTML `name` attribute on the native input
|
|
685
|
-
| `clearable` | `boolean` | `false` | Shows a clear (x) button when the field has a value
|
|
686
|
-
| `disabled` | `boolean` | `false` | Disables the input (also inherits from `VcInputGroup` context)
|
|
687
|
-
| `required` | `boolean` | `false` | Adds a red asterisk to the label (visual only, no validation)
|
|
688
|
-
| `loading` | `boolean` | `false` | Shows a spinning loader icon inside the field
|
|
689
|
-
| `autofocus` | `boolean` | `false` | Auto-focuses the input on mount
|
|
690
|
-
| `autocomplete` | `string` | -- | Autofill hint set on the native input (e.g. `"username"`, `"current-password"`)
|
|
691
|
-
| `ariaLabel` | `string` | -- | Accessible name used when no visible `label` is provided; forwarded to the delegated date picker and color input too
|
|
692
|
-
| `error` | `boolean` | `false` | Activates error styling (red border and ring)
|
|
693
|
-
| `errorMessage` | `string` | -- | Error text shown below the field; also activates error styling when truthy
|
|
694
|
-
| `debounce` | `string \| number` | -- | Delay in ms before emitting model updates
|
|
695
|
-
| `maxlength` | `string \| number` | `"1024"` | Maximum character length
|
|
696
|
-
| `step` | `string` | — | Step granularity, set on the native input only when given
|
|
697
|
-
| `size` | `"default" \| "small"` | `"default"` | Field height variant (36px / 32px)
|
|
698
|
-
| `multilanguage` | `boolean` | `false` | Shows a language indicator badge on the label
|
|
699
|
-
| `currentLanguage` | `string` | -- | Language code to display in the multilanguage badge
|
|
700
|
-
| `datePickerOptions` | `VueDatePickerProps` | -- | Options forwarded to VcDatePicker (only when `type` is `date` or `datetime-local`)
|
|
674
|
+
| Prop | Type | Default | Description |
|
|
675
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
676
|
+
| `modelValue` | `string \| number \| Date \| null` | `undefined` | Bound value via `v-model` |
|
|
677
|
+
| `type` | `"text" \| "password" \| "email" \| "tel" \| "url" \| "time" \| "number" \| "integer" \| "date" \| "datetime-local" \| "color"` | `"text"` | Input type. `date`/`datetime-local` delegate to VcDatePicker; `color` delegates to VcColorInput |
|
|
678
|
+
| `label` | `string` | -- | Label text displayed above the field |
|
|
679
|
+
| `placeholder` | `string` | -- | Placeholder text inside the field |
|
|
680
|
+
| `hint` | `string` | -- | Help text displayed below the field |
|
|
681
|
+
| `tooltip` | `string` | -- | Tooltip text shown on hover next to the label |
|
|
682
|
+
| `prefix` | `string` | -- | Static text rendered before the input value |
|
|
683
|
+
| `suffix` | `string` | -- | Static text rendered after the input value |
|
|
684
|
+
| `name` | `string` | `"Field"` | HTML `name` attribute on the native input |
|
|
685
|
+
| `clearable` | `boolean` | `false` | Shows a clear (x) button when the field has a value |
|
|
686
|
+
| `disabled` | `boolean` | `false` | Disables the input (also inherits from `VcInputGroup` context) |
|
|
687
|
+
| `required` | `boolean` | `false` | Adds a red asterisk to the label (visual only, no validation) |
|
|
688
|
+
| `loading` | `boolean` | `false` | Shows a spinning loader icon inside the field |
|
|
689
|
+
| `autofocus` | `boolean` | `false` | Auto-focuses the input on mount |
|
|
690
|
+
| `autocomplete` | `string` | -- | Autofill hint set on the native input (e.g. `"username"`, `"current-password"`) |
|
|
691
|
+
| `ariaLabel` | `string` | -- | Accessible name used when no visible `label` is provided; forwarded to the delegated date picker and color input too |
|
|
692
|
+
| `error` | `boolean` | `false` | Activates error styling (red border and ring) |
|
|
693
|
+
| `errorMessage` | `string` | -- | Error text shown below the field; also activates error styling when truthy |
|
|
694
|
+
| `debounce` | `string \| number` | -- | Delay in ms before emitting model updates |
|
|
695
|
+
| `maxlength` | `string \| number` | `"1024"` | Maximum character length |
|
|
696
|
+
| `step` | `string` | — | Step granularity, set on the native input only when given |
|
|
697
|
+
| `size` | `"default" \| "small"` | `"default"` | Field height variant (36px / 32px) |
|
|
698
|
+
| `multilanguage` | `boolean` | `false` | Shows a language indicator badge on the label |
|
|
699
|
+
| `currentLanguage` | `string` | -- | Language code to display in the multilanguage badge |
|
|
700
|
+
| `datePickerOptions` | `VueDatePickerProps` | -- | Options forwarded to VcDatePicker (only when `type` is `date` or `datetime-local`) |
|
|
701
|
+
| `inputAttrs` | `Record<string, string \| number \| boolean \| undefined>` | -- | Attributes bound to the native `<input>` rather than the root, e.g. `role="combobox"` and the `aria-*` state of a field with a suggestion list. Not used with the date and color types |
|
|
701
702
|
|
|
702
703
|
### Events
|
|
703
704
|
|
|
@@ -707,6 +708,12 @@ VcInput blocks the minus key for both `number` and `integer` types. If you need
|
|
|
707
708
|
| `blur` | `Event` | Emitted when the native input loses focus |
|
|
708
709
|
| `focus` | -- | Emitted when the native input receives focus |
|
|
709
710
|
|
|
711
|
+
### Exposed Methods
|
|
712
|
+
|
|
713
|
+
| Method | Description |
|
|
714
|
+
| --------- | ----------------------------------- |
|
|
715
|
+
| `focus()` | Moves the focus to the native input |
|
|
716
|
+
|
|
710
717
|
### Slots
|
|
711
718
|
|
|
712
719
|
| Slot | Scope | Description |
|
|
@@ -725,25 +732,28 @@ VcInput blocks the minus key for both `number` and `integer` types. If you need
|
|
|
725
732
|
|
|
726
733
|
VcInput uses CSS custom properties for theming, defined on `:root`. Override these to customize the appearance across your application.
|
|
727
734
|
|
|
728
|
-
| Variable | Default | Description
|
|
729
|
-
| ----------------------------- | ---------------------- |
|
|
730
|
-
| `--input-height` | `36px` | Height of the default size field
|
|
731
|
-
| `--input-height-small` | `32px` | Height of the small size field
|
|
732
|
-
| `--input-border-radius` | `6px` | Border radius of the field wrapper
|
|
733
|
-
| `--input-border-color` | `var(--neutrals-300)` | Border color in the normal state
|
|
734
|
-
| `--input-padding` | `12px` | Horizontal padding inside the field
|
|
735
|
-
| `--input-
|
|
736
|
-
| `--input-
|
|
737
|
-
| `--input-
|
|
738
|
-
| `--input-
|
|
739
|
-
| `--input-
|
|
740
|
-
| `--input-
|
|
741
|
-
| `--input-
|
|
742
|
-
| `--input-
|
|
743
|
-
| `--input-
|
|
744
|
-
| `--input-
|
|
745
|
-
| `--input-
|
|
746
|
-
| `--input-
|
|
735
|
+
| Variable | Default | Description |
|
|
736
|
+
| ----------------------------- | ---------------------- | -------------------------------------------------------------------------------------- |
|
|
737
|
+
| `--input-height` | `36px` | Height of the default size field |
|
|
738
|
+
| `--input-height-small` | `32px` | Height of the small size field |
|
|
739
|
+
| `--input-border-radius` | `6px` | Border radius of the field wrapper |
|
|
740
|
+
| `--input-border-color` | `var(--neutrals-300)` | Border color in the normal state |
|
|
741
|
+
| `--input-padding` | `12px` | Horizontal padding inside the field |
|
|
742
|
+
| `--input-padding-start` | `var(--input-padding)` | Padding at the field's start (not defined by default: falls back to `--input-padding`) |
|
|
743
|
+
| `--input-padding-end` | `var(--input-padding)` | Padding at the field's end (not defined by default: falls back to `--input-padding`) |
|
|
744
|
+
| `--input-adornment-gap` | `12px` | Space between the input and the `prepend-inner` / `append-inner` content |
|
|
745
|
+
| `--input-background-color` | `var(--additional-50)` | Background color of the field |
|
|
746
|
+
| `--input-placeholder-color` | `var(--neutrals-400)` | Color of placeholder text |
|
|
747
|
+
| `--input-text-color` | `var(--neutrals-800)` | Color of the input text |
|
|
748
|
+
| `--input-clear-color` | `var(--neutrals-400)` | Color of the clear and show/hide buttons |
|
|
749
|
+
| `--input-clear-color-hover` | `var(--neutrals-600)` | Hover color of the clear and show/hide buttons |
|
|
750
|
+
| `--input-disabled-text-color` | `var(--neutrals-500)` | Text color when disabled |
|
|
751
|
+
| `--input-disabled-bg-color` | `var(--neutrals-200)` | Background color when disabled |
|
|
752
|
+
| `--input-text-color-error` | `var(--danger-500)` | Text color in error state |
|
|
753
|
+
| `--input-border-color-error` | `var(--danger-500)` | Border color in error state |
|
|
754
|
+
| `--input-border-color-focus` | `var(--primary-500)` | Border color when focused |
|
|
755
|
+
| `--input-focus-ring-color` | `var(--primary-100)` | Focus ring color (3px outline) |
|
|
756
|
+
| `--input-error-ring-color` | `var(--danger-100)` | Error ring color (3px outline) |
|
|
747
757
|
|
|
748
758
|
### Theming Example
|
|
749
759
|
|
|
@@ -56,10 +56,12 @@ const open = ref(false);
|
|
|
56
56
|
| `width` | `string` | `"280px"` | Panel min-width |
|
|
57
57
|
| `maxWidth` | `string` | `"400px"` | Panel max-width |
|
|
58
58
|
| `maxHeight` | `number` | `350` | Max height in pixels (clamped by viewport) |
|
|
59
|
+
| `offset` | `number` | `4` | Gap between the anchor and the panel, in pixels |
|
|
59
60
|
| `contentScrollable` | `boolean` | `true` | Enable scrolling in the content area |
|
|
60
61
|
| `closeOnClickOutside` | `boolean` | `true` | Close when clicking outside |
|
|
61
62
|
| `closeOnEscape` | `boolean` | `true` | Close on Escape key |
|
|
62
63
|
| `inert` | `boolean` | `false` | Hide the panel from assistive technology and keyboard focus while something covers it. The panel is teleported, so it does not inherit `inert` from an ancestor — pass it explicitly |
|
|
64
|
+
| `panelClass` | `string` | — | Extra class on the teleported panel (`.vc-popover`), to style one popover without `:has()` selectors |
|
|
63
65
|
|
|
64
66
|
## Events
|
|
65
67
|
|
|
@@ -264,9 +264,10 @@ const isActive = ref(true);
|
|
|
264
264
|
|
|
265
265
|
## Slots
|
|
266
266
|
|
|
267
|
-
| Slot
|
|
268
|
-
|
|
|
269
|
-
| `error`
|
|
267
|
+
| Slot | Description |
|
|
268
|
+
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
269
|
+
| `error` | Custom error message markup. Replaces the default `VcHint` error. |
|
|
270
|
+
| `default` | Inline label after the track, in the same row. It is a `<label>` for the switch: it names it (without `ariaLabel`) and toggles it on click. Long text truncates. |
|
|
270
271
|
|
|
271
272
|
## CSS Variables
|
|
272
273
|
|