mood-ui 0.1.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/LICENSE +21 -0
- package/README.OLD.md +5 -0
- package/README.md +84 -0
- package/dist/components/ModoProvider.vue.d.ts +61 -0
- package/dist/components/data-display/Card.vue.d.ts +26 -0
- package/dist/components/data-display/Typography.vue.d.ts +21 -0
- package/dist/components/data-display/avatar/Avatar.vue.d.ts +9 -0
- package/dist/components/data-display/avatar/AvatarGroup.vue.d.ts +7 -0
- package/dist/components/data-display/calendar/AgendaView.vue.d.ts +76 -0
- package/dist/components/data-display/calendar/Calendar.vue.d.ts +25 -0
- package/dist/components/data-display/calendar/CalendarEventTooltip.vue.d.ts +34 -0
- package/dist/components/data-display/calendar/CalendarHeader.vue.d.ts +67 -0
- package/dist/components/data-display/calendar/DayView.vue.d.ts +91 -0
- package/dist/components/data-display/calendar/MonthView.vue.d.ts +71 -0
- package/dist/components/data-display/calendar/Scheduler.vue.d.ts +102 -0
- package/dist/components/data-display/calendar/WeekView.vue.d.ts +101 -0
- package/dist/components/data-display/date-picker/DateRangePicker.vue.d.ts +18 -0
- package/dist/components/data-display/date-picker/DateTimePicker.vue.d.ts +17 -0
- package/dist/components/data-display/table/Table.vue.d.ts +75 -0
- package/dist/components/data-display/table/TableColumn.vue.d.ts +26 -0
- package/dist/components/data-display/table/TablePagination.vue.d.ts +14 -0
- package/dist/components/feedback/Badge.vue.d.ts +24 -0
- package/dist/components/feedback/Banner.vue.d.ts +28 -0
- package/dist/components/feedback/Chip.vue.d.ts +22 -0
- package/dist/components/feedback/ConfirmDialog.vue.d.ts +4 -0
- package/dist/components/feedback/Drawer.vue.d.ts +43 -0
- package/dist/components/feedback/EmptyState.vue.d.ts +19 -0
- package/dist/components/feedback/Loader.vue.d.ts +7 -0
- package/dist/components/feedback/Modal.vue.d.ts +44 -0
- package/dist/components/feedback/ProgressBar.vue.d.ts +10 -0
- package/dist/components/feedback/Skeleton.vue.d.ts +10 -0
- package/dist/components/feedback/Toast.vue.d.ts +19 -0
- package/dist/components/feedback/ToastContainer.vue.d.ts +11 -0
- package/dist/components/feedback/Tooltip.vue.d.ts +35 -0
- package/dist/components/forms/Button.vue.d.ts +24 -0
- package/dist/components/forms/ButtonGroup.vue.d.ts +16 -0
- package/dist/components/forms/Checkbox.vue.d.ts +22 -0
- package/dist/components/forms/Combobox.vue.d.ts +48 -0
- package/dist/components/forms/DateField.vue.d.ts +30 -0
- package/dist/components/forms/DateRangeField.vue.d.ts +32 -0
- package/dist/components/forms/DateTimeField.vue.d.ts +34 -0
- package/dist/components/forms/FileInput.vue.d.ts +33 -0
- package/dist/components/forms/FormField.vue.d.ts +30 -0
- package/dist/components/forms/Input.vue.d.ts +33 -0
- package/dist/components/forms/MultiSelect.vue.d.ts +51 -0
- package/dist/components/forms/NumberInput.vue.d.ts +35 -0
- package/dist/components/forms/PasswordInput.vue.d.ts +40 -0
- package/dist/components/forms/Radio.vue.d.ts +16 -0
- package/dist/components/forms/RadioGroup.vue.d.ts +27 -0
- package/dist/components/forms/RangeSlider.vue.d.ts +27 -0
- package/dist/components/forms/SearchInput.vue.d.ts +37 -0
- package/dist/components/forms/Select.vue.d.ts +46 -0
- package/dist/components/forms/Slider.vue.d.ts +26 -0
- package/dist/components/forms/Switch.vue.d.ts +22 -0
- package/dist/components/forms/Textarea.vue.d.ts +36 -0
- package/dist/components/layout/AppShell.vue.d.ts +124 -0
- package/dist/components/layout/Canvas.vue.d.ts +21 -0
- package/dist/components/layout/Container.vue.d.ts +21 -0
- package/dist/components/layout/Divider.vue.d.ts +21 -0
- package/dist/components/layout/HStack.vue.d.ts +14 -0
- package/dist/components/layout/PageHeader.vue.d.ts +34 -0
- package/dist/components/layout/PopoverPanel.vue.d.ts +29 -0
- package/dist/components/layout/Sidebar.vue.d.ts +39 -0
- package/dist/components/layout/SidebarRow.vue.d.ts +31 -0
- package/dist/components/layout/SidebarRowContent.vue.d.ts +27 -0
- package/dist/components/layout/Stack.vue.d.ts +24 -0
- package/dist/components/layout/Topbar.vue.d.ts +36 -0
- package/dist/components/layout/VStack.vue.d.ts +14 -0
- package/dist/components/navigation/Breadcrumbs.vue.d.ts +13 -0
- package/dist/components/navigation/DropdownMenu.vue.d.ts +36 -0
- package/dist/components/navigation/Pagination.vue.d.ts +18 -0
- package/dist/components/navigation/Tabs.vue.d.ts +37 -0
- package/dist/composables/eventColors.d.ts +13 -0
- package/dist/composables/useAutoScroll.d.ts +11 -0
- package/dist/composables/useCalendar.d.ts +44 -0
- package/dist/composables/useCalendarKeyboard.d.ts +17 -0
- package/dist/composables/useCalendarTheme.d.ts +22 -0
- package/dist/composables/useColorMode.d.ts +28 -0
- package/dist/composables/useConfirm.d.ts +146 -0
- package/dist/composables/useCurrentTimeLine.d.ts +5 -0
- package/dist/composables/useEventHover.d.ts +29 -0
- package/dist/composables/useField.d.ts +89 -0
- package/dist/composables/useModoConfig.d.ts +29 -0
- package/dist/composables/usePopover.d.ts +59 -0
- package/dist/composables/useTable.d.ts +29 -0
- package/dist/composables/useTableColumnsState.d.ts +52 -0
- package/dist/composables/useTableFilter.d.ts +39 -0
- package/dist/composables/useTableKeyboard.d.ts +38 -0
- package/dist/composables/useTablePagination.d.ts +44 -0
- package/dist/composables/useTableQuery.d.ts +90 -0
- package/dist/composables/useTableSelection.d.ts +40 -0
- package/dist/composables/useTableSort.d.ts +41 -0
- package/dist/composables/useTableTree.d.ts +55 -0
- package/dist/composables/useTableUrlSync.d.ts +66 -0
- package/dist/composables/useTableVirtual.d.ts +43 -0
- package/dist/composables/useTimeGrid.d.ts +22 -0
- package/dist/composables/useToast.d.ts +176 -0
- package/dist/config/ModoConfig.d.ts +32 -0
- package/dist/config/ModoLocale.d.ts +212 -0
- package/dist/config/colorPrimitives.d.ts +13 -0
- package/dist/config/createModoUI.d.ts +85 -0
- package/dist/config/palettes.d.ts +30 -0
- package/dist/index.d.ts +130 -0
- package/dist/interfaces/data-display/Card.interface.d.ts +8 -0
- package/dist/interfaces/data-display/Typography.interface.d.ts +12 -0
- package/dist/interfaces/data-display/avatar/Avatar.interface.d.ts +24 -0
- package/dist/interfaces/data-display/avatar/AvatarGroup.interface.d.ts +8 -0
- package/dist/interfaces/data-display/calendar/AgendaView.interface.d.ts +29 -0
- package/dist/interfaces/data-display/calendar/Calendar.interface.d.ts +16 -0
- package/dist/interfaces/data-display/calendar/DayView.interface.d.ts +43 -0
- package/dist/interfaces/data-display/calendar/MonthView.interface.d.ts +41 -0
- package/dist/interfaces/data-display/calendar/Scheduler.interface.d.ts +63 -0
- package/dist/interfaces/data-display/calendar/WeekView.interface.d.ts +65 -0
- package/dist/interfaces/data-display/date-picker/DateRangePicker.interface.d.ts +20 -0
- package/dist/interfaces/data-display/date-picker/DateTimePicker.interface.d.ts +16 -0
- package/dist/interfaces/data-display/table/Table.interface.d.ts +615 -0
- package/dist/interfaces/data-display/table/TableColumn.interface.d.ts +10 -0
- package/dist/interfaces/data-display/table/TablePagination.interface.d.ts +33 -0
- package/dist/interfaces/feedback/Badge.interface.d.ts +14 -0
- package/dist/interfaces/feedback/Banner.interface.d.ts +14 -0
- package/dist/interfaces/feedback/Chip.interface.d.ts +35 -0
- package/dist/interfaces/feedback/ConfirmDialog.interface.d.ts +49 -0
- package/dist/interfaces/feedback/Drawer.interface.d.ts +49 -0
- package/dist/interfaces/feedback/EmptyState.interface.d.ts +31 -0
- package/dist/interfaces/feedback/Loader.interface.d.ts +7 -0
- package/dist/interfaces/feedback/Modal.interface.d.ts +50 -0
- package/dist/interfaces/feedback/ProgressBar.interface.d.ts +31 -0
- package/dist/interfaces/feedback/Skeleton.interface.d.ts +123 -0
- package/dist/interfaces/feedback/Toast.interface.d.ts +86 -0
- package/dist/interfaces/feedback/Tooltip.interface.d.ts +38 -0
- package/dist/interfaces/forms/Button.interface.d.ts +26 -0
- package/dist/interfaces/forms/ButtonGroup.interface.d.ts +9 -0
- package/dist/interfaces/forms/Checkbox.interface.d.ts +32 -0
- package/dist/interfaces/forms/Combobox.interface.d.ts +57 -0
- package/dist/interfaces/forms/DateField.interface.d.ts +39 -0
- package/dist/interfaces/forms/DateRangeField.interface.d.ts +41 -0
- package/dist/interfaces/forms/DateTimeField.interface.d.ts +44 -0
- package/dist/interfaces/forms/FileInput.interface.d.ts +105 -0
- package/dist/interfaces/forms/FormField.interface.d.ts +55 -0
- package/dist/interfaces/forms/Input.interface.d.ts +68 -0
- package/dist/interfaces/forms/NumberInput.interface.d.ts +77 -0
- package/dist/interfaces/forms/PasswordInput.interface.d.ts +84 -0
- package/dist/interfaces/forms/Radio.interface.d.ts +54 -0
- package/dist/interfaces/forms/RadioGroup.context.d.ts +13 -0
- package/dist/interfaces/forms/RangeSlider.interface.d.ts +30 -0
- package/dist/interfaces/forms/SearchInput.interface.d.ts +59 -0
- package/dist/interfaces/forms/Select.interface.d.ts +145 -0
- package/dist/interfaces/forms/Slider.interface.d.ts +36 -0
- package/dist/interfaces/forms/Switch.interface.d.ts +30 -0
- package/dist/interfaces/forms/Textarea.interface.d.ts +64 -0
- package/dist/interfaces/layout/AppShell.interface.d.ts +56 -0
- package/dist/interfaces/layout/Canvas.interface.d.ts +39 -0
- package/dist/interfaces/layout/Container.interface.d.ts +8 -0
- package/dist/interfaces/layout/Divider.interface.d.ts +53 -0
- package/dist/interfaces/layout/PageHeader.interface.d.ts +23 -0
- package/dist/interfaces/layout/Sidebar.interface.d.ts +88 -0
- package/dist/interfaces/layout/Stack.interface.d.ts +42 -0
- package/dist/interfaces/layout/Topbar.interface.d.ts +28 -0
- package/dist/interfaces/navigation/Breadcrumbs.interface.d.ts +38 -0
- package/dist/interfaces/navigation/DropdownMenu.interface.d.ts +72 -0
- package/dist/interfaces/navigation/Pagination.interface.d.ts +37 -0
- package/dist/interfaces/navigation/Tabs.interface.d.ts +74 -0
- package/dist/mood-ui.cjs +4 -0
- package/dist/mood-ui.cjs.map +1 -0
- package/dist/mood-ui.css +2 -0
- package/dist/mood-ui.mjs +19832 -0
- package/dist/mood-ui.mjs.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
export type SelectValue = string | number;
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: SelectValue;
|
|
5
|
+
label: string;
|
|
6
|
+
/** Texto secundario debajo del label. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Icono a la izquierda de la opción. */
|
|
9
|
+
icon?: Component;
|
|
10
|
+
/** Opción no seleccionable. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Nombre del grupo (las opciones con el mismo valor se agrupan). */
|
|
13
|
+
group?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Select {
|
|
16
|
+
/** v-model */
|
|
17
|
+
modelValue?: SelectValue | null;
|
|
18
|
+
/** Opciones disponibles. */
|
|
19
|
+
options: SelectOption[];
|
|
20
|
+
/** Etiqueta visible. */
|
|
21
|
+
label?: string;
|
|
22
|
+
/** Placeholder mostrado cuando no hay valor. @default 'Select…' */
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
/** Texto de ayuda (oculto si hay `errorText`). */
|
|
25
|
+
helperText?: string;
|
|
26
|
+
/** Mensaje de error. */
|
|
27
|
+
errorText?: string;
|
|
28
|
+
/** Estilo visual. */
|
|
29
|
+
variant?: 'outline' | 'filled' | 'ghost';
|
|
30
|
+
/** Familia semántica para foco/acento. */
|
|
31
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
32
|
+
/** Tamaño. */
|
|
33
|
+
size?: 'small' | 'medium' | 'large';
|
|
34
|
+
/** Radio de esquinas. */
|
|
35
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
36
|
+
/** Estilo del halo persistente. Hereda del ModoProvider si se omite. */
|
|
37
|
+
halo?: 'tinted' | 'neutral' | 'off';
|
|
38
|
+
/** Aplica w-full al root. */
|
|
39
|
+
fullWidth?: boolean;
|
|
40
|
+
/** Deshabilitado. */
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/** Solo lectura. */
|
|
43
|
+
readonly?: boolean;
|
|
44
|
+
/** Requerido. */
|
|
45
|
+
required?: boolean;
|
|
46
|
+
/** Estado cargando (muestra spinner en lugar del chevron). */
|
|
47
|
+
loading?: boolean;
|
|
48
|
+
/** Muestra botón X para limpiar el valor seleccionado. */
|
|
49
|
+
clearable?: boolean;
|
|
50
|
+
/** Muestra un input de búsqueda dentro del panel. */
|
|
51
|
+
searchable?: boolean;
|
|
52
|
+
/** Placeholder del input de búsqueda. @default 'Search…' */
|
|
53
|
+
searchPlaceholder?: string;
|
|
54
|
+
/** Mensaje cuando no hay resultados. @default 'No results.' */
|
|
55
|
+
emptyText?: string;
|
|
56
|
+
/** Icono a la izquierda del trigger. */
|
|
57
|
+
iconLeft?: Component;
|
|
58
|
+
/**
|
|
59
|
+
* Cómo se calcula el ancho del panel desplegable.
|
|
60
|
+
* - `'trigger'` (por defecto): el panel iguala el ancho del trigger.
|
|
61
|
+
* - `'auto'`: el panel se dimensiona a su contenido, independiente del trigger.
|
|
62
|
+
* @default 'trigger'
|
|
63
|
+
*/
|
|
64
|
+
panelWidth?: 'trigger' | 'auto';
|
|
65
|
+
/** Ancho mínimo del panel (px o cualquier unidad CSS). Útil con `panelWidth='auto'`. */
|
|
66
|
+
panelMinWidth?: number | string;
|
|
67
|
+
/** id (autogenerado si se omite). */
|
|
68
|
+
id?: string;
|
|
69
|
+
/** name HTML (oculto para integrarse con forms si se necesita). */
|
|
70
|
+
name?: string;
|
|
71
|
+
/** autofocus HTML. */
|
|
72
|
+
autofocus?: boolean;
|
|
73
|
+
/** Accessible name cuando no hay `label` visible. */
|
|
74
|
+
ariaLabel?: string;
|
|
75
|
+
/** Fuerza el estado inválido sin renderizar `errorText`. Útil al envolver con `FormField`. */
|
|
76
|
+
invalid?: boolean;
|
|
77
|
+
/** IDs adicionales para concatenar en `aria-describedby` (ej. provistos por `FormField`). */
|
|
78
|
+
ariaDescribedBy?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface MultiSelect {
|
|
81
|
+
/** v-model (array). */
|
|
82
|
+
modelValue?: SelectValue[];
|
|
83
|
+
/** Opciones disponibles. */
|
|
84
|
+
options: SelectOption[];
|
|
85
|
+
/** Etiqueta visible. */
|
|
86
|
+
label?: string;
|
|
87
|
+
/** Placeholder mostrado cuando no hay valores. @default 'Select…' */
|
|
88
|
+
placeholder?: string;
|
|
89
|
+
/** Texto de ayuda (oculto si hay `errorText`). */
|
|
90
|
+
helperText?: string;
|
|
91
|
+
/** Mensaje de error. */
|
|
92
|
+
errorText?: string;
|
|
93
|
+
/** Estilo visual. */
|
|
94
|
+
variant?: 'outline' | 'filled' | 'ghost';
|
|
95
|
+
/** Familia semántica para foco/acento. */
|
|
96
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
97
|
+
/** Tamaño. */
|
|
98
|
+
size?: 'small' | 'medium' | 'large';
|
|
99
|
+
/** Radio de esquinas. */
|
|
100
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
101
|
+
/** Estilo del halo persistente. Hereda del ModoProvider si se omite. */
|
|
102
|
+
halo?: 'tinted' | 'neutral' | 'off';
|
|
103
|
+
/** Aplica w-full al root. */
|
|
104
|
+
fullWidth?: boolean;
|
|
105
|
+
/** Deshabilitado. */
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
/** Solo lectura. */
|
|
108
|
+
readonly?: boolean;
|
|
109
|
+
/** Requerido. */
|
|
110
|
+
required?: boolean;
|
|
111
|
+
/** Estado cargando. */
|
|
112
|
+
loading?: boolean;
|
|
113
|
+
/** Muestra botón X para limpiar todas las selecciones. */
|
|
114
|
+
clearable?: boolean;
|
|
115
|
+
/** Muestra un toggle "Select all" en el panel. */
|
|
116
|
+
showSelectAll?: boolean;
|
|
117
|
+
/** Texto del botón select all. @default 'Select all' */
|
|
118
|
+
selectAllLabel?: string;
|
|
119
|
+
/** Texto cuando todo está seleccionado. @default 'Deselect all' */
|
|
120
|
+
deselectAllLabel?: string;
|
|
121
|
+
/** Máximo de opciones seleccionables. */
|
|
122
|
+
maxSelected?: number;
|
|
123
|
+
/** Muestra un input de búsqueda dentro del panel. */
|
|
124
|
+
searchable?: boolean;
|
|
125
|
+
/** Placeholder del input de búsqueda. @default 'Search…' */
|
|
126
|
+
searchPlaceholder?: string;
|
|
127
|
+
/** Mensaje cuando no hay resultados. @default 'No results.' */
|
|
128
|
+
emptyText?: string;
|
|
129
|
+
/** Icono a la izquierda del trigger. */
|
|
130
|
+
iconLeft?: Component;
|
|
131
|
+
/** Número máximo de chips a mostrar antes de colapsar en "+N". */
|
|
132
|
+
maxVisibleChips?: number;
|
|
133
|
+
/** id (autogenerado si se omite). */
|
|
134
|
+
id?: string;
|
|
135
|
+
/** name HTML (oculto para integrarse con forms, se emite 1 input por valor). */
|
|
136
|
+
name?: string;
|
|
137
|
+
/** autofocus HTML. */
|
|
138
|
+
autofocus?: boolean;
|
|
139
|
+
/** Accessible name cuando no hay `label` visible. */
|
|
140
|
+
ariaLabel?: string;
|
|
141
|
+
/** Fuerza el estado inválido sin renderizar `errorText`. Útil al envolver con `FormField`. */
|
|
142
|
+
invalid?: boolean;
|
|
143
|
+
/** IDs adicionales para concatenar en `aria-describedby` (ej. provistos por `FormField`). */
|
|
144
|
+
ariaDescribedBy?: string;
|
|
145
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface Slider {
|
|
2
|
+
/** Valor actual. v-model. */
|
|
3
|
+
modelValue?: number;
|
|
4
|
+
/** Valor mínimo. @default 0 */
|
|
5
|
+
min?: number;
|
|
6
|
+
/** Valor máximo. @default 100 */
|
|
7
|
+
max?: number;
|
|
8
|
+
/** Paso. @default 1 */
|
|
9
|
+
step?: number;
|
|
10
|
+
/** Muestra el valor actual como tooltip/label flotante. */
|
|
11
|
+
showValue?: boolean;
|
|
12
|
+
/** Formatea el valor mostrado. */
|
|
13
|
+
formatValue?: (v: number) => string;
|
|
14
|
+
/** Marcas discretas. True usa step; array usa valores específicos. */
|
|
15
|
+
marks?: boolean | number[] | {
|
|
16
|
+
value: number;
|
|
17
|
+
label?: string;
|
|
18
|
+
}[];
|
|
19
|
+
/** Orientación del slider. @default 'horizontal' */
|
|
20
|
+
orientation?: 'horizontal' | 'vertical';
|
|
21
|
+
/** Campo estándar. */
|
|
22
|
+
label?: string;
|
|
23
|
+
helperText?: string;
|
|
24
|
+
errorText?: string;
|
|
25
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
26
|
+
size?: 'small' | 'medium' | 'large';
|
|
27
|
+
/** Track radius. Cascades from `ModoProvider`. @default 'full' (pill) */
|
|
28
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
29
|
+
fullWidth?: boolean;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
readonly?: boolean;
|
|
32
|
+
required?: boolean;
|
|
33
|
+
id?: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
ariaLabel?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface Switch {
|
|
2
|
+
/** v-model (boolean). */
|
|
3
|
+
modelValue?: boolean;
|
|
4
|
+
/** Etiqueta visible a la derecha del control. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Texto descriptivo secundario bajo el label. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Texto de ayuda bajo el control (oculto si hay `errorText`). */
|
|
9
|
+
helperText?: string;
|
|
10
|
+
/** Mensaje de error bajo el control. */
|
|
11
|
+
errorText?: string;
|
|
12
|
+
/** Familia semántica para el estado "on". */
|
|
13
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
14
|
+
/** Tamaño. */
|
|
15
|
+
size?: 'small' | 'medium' | 'large';
|
|
16
|
+
/** Track radius. Cascades from `ModoProvider`. @default 'full' (pill) */
|
|
17
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
readonly?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
/** Posición del label respecto al control. */
|
|
23
|
+
labelPosition?: 'left' | 'right';
|
|
24
|
+
/** id del input (autogenerado si se omite). */
|
|
25
|
+
id?: string;
|
|
26
|
+
/** name HTML. */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** Accessible name cuando no hay `label` visible. */
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export interface Textarea {
|
|
2
|
+
/** v-model */
|
|
3
|
+
modelValue?: string | null;
|
|
4
|
+
/** Etiqueta visible encima del textarea. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Texto de placeholder. */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** Texto de ayuda bajo el textarea (oculto si hay `errorText`). */
|
|
9
|
+
helperText?: string;
|
|
10
|
+
/** Mensaje de error bajo el textarea. Si se provee, se marca como inválido. */
|
|
11
|
+
errorText?: string;
|
|
12
|
+
/** Estilo visual. */
|
|
13
|
+
variant?: 'outline' | 'filled' | 'ghost';
|
|
14
|
+
/** Familia semántica para el estado de foco/acento. */
|
|
15
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
16
|
+
/** Tamaño (afecta padding y tipografía). */
|
|
17
|
+
size?: 'small' | 'medium' | 'large';
|
|
18
|
+
/** Radio de esquinas. */
|
|
19
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
20
|
+
/** Estilo del halo persistente. Hereda del ModoProvider si se omite. */
|
|
21
|
+
halo?: 'tinted' | 'neutral' | 'off';
|
|
22
|
+
/** Aplica w-full al root. */
|
|
23
|
+
fullWidth?: boolean;
|
|
24
|
+
/** Deshabilitado. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Solo lectura. */
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
/** Requerido (añade indicador visual y atributo). */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
/** Estado cargando (muestra loader, textarea deshabilitado). */
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
/** Muestra botón "X" para limpiar el valor cuando hay contenido. */
|
|
33
|
+
clearable?: boolean;
|
|
34
|
+
/** Longitud máxima. Activa el contador si `showCounter`. */
|
|
35
|
+
maxLength?: number;
|
|
36
|
+
/** Muestra contador de caracteres (requiere `maxLength`). */
|
|
37
|
+
showCounter?: boolean;
|
|
38
|
+
/** Número mínimo de filas visibles. */
|
|
39
|
+
rows?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Si `true`, el textarea crece automáticamente con el contenido hasta
|
|
42
|
+
* `maxRows`. Cuando se alcanza, aparece scroll interno.
|
|
43
|
+
*/
|
|
44
|
+
autoresize?: boolean;
|
|
45
|
+
/** Máximo de filas cuando `autoresize=true`. */
|
|
46
|
+
maxRows?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Dirección permitida de redimensionamiento manual del navegador.
|
|
49
|
+
* Se ignora cuando `autoresize=true` (se fuerza a `none`).
|
|
50
|
+
*/
|
|
51
|
+
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
52
|
+
/** id del textarea (autogenerado si se omite). */
|
|
53
|
+
id?: string;
|
|
54
|
+
/** name HTML. */
|
|
55
|
+
name?: string;
|
|
56
|
+
/** autofocus HTML. */
|
|
57
|
+
autofocus?: boolean;
|
|
58
|
+
/** Accessible name cuando no hay `label` visible. */
|
|
59
|
+
ariaLabel?: string;
|
|
60
|
+
/** Fuerza el estado inválido sin renderizar `errorText`. Útil al envolver con `FormField`. */
|
|
61
|
+
invalid?: boolean;
|
|
62
|
+
/** IDs adicionales para concatenar en `aria-describedby` (ej. provistos por `FormField`). */
|
|
63
|
+
ariaDescribedBy?: string;
|
|
64
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AppShell — application frame layout.
|
|
3
|
+
*
|
|
4
|
+
* Three structural variants:
|
|
5
|
+
* - `standard` — single sidebar with main + footer.
|
|
6
|
+
* - `rail` — compact icon-only rail (no labels).
|
|
7
|
+
* - `dual` — persistent rail + expandable secondary sidebar panel
|
|
8
|
+
* (the "Flup pattern": rail always visible, panel collapses).
|
|
9
|
+
*
|
|
10
|
+
* Two appearances:
|
|
11
|
+
* - `flush` — the shell is the page (full-bleed).
|
|
12
|
+
* - `contained` — the shell sits inside a rounded card on a muted page
|
|
13
|
+
* background, with breathing room around it.
|
|
14
|
+
*/
|
|
15
|
+
export interface AppShell {
|
|
16
|
+
/** Polymorphic root tag. Defaults to `'div'`. */
|
|
17
|
+
as?: string;
|
|
18
|
+
/** Structural layout. */
|
|
19
|
+
variant?: 'standard' | 'rail' | 'dual';
|
|
20
|
+
/** Visual framing of the whole shell. */
|
|
21
|
+
appearance?: 'flush' | 'contained';
|
|
22
|
+
/** Side where the sidebar (or rail) lives. */
|
|
23
|
+
sidebarPosition?: 'left' | 'right';
|
|
24
|
+
/** Width preset of the expanded sidebar / secondary panel. */
|
|
25
|
+
sidebarWidth?: 'small' | 'medium' | 'large';
|
|
26
|
+
/** Width preset of the collapsed sidebar (icon-only column, only `standard`). */
|
|
27
|
+
collapsedWidth?: 'small' | 'medium';
|
|
28
|
+
/** Width of the rail in `rail` and `dual` variants. */
|
|
29
|
+
railWidth?: 'small' | 'medium';
|
|
30
|
+
/**
|
|
31
|
+
* v-model — desktop sidebar collapsed state.
|
|
32
|
+
* - `standard`: collapses width to `collapsedWidth`.
|
|
33
|
+
* - `dual`: hides the secondary panel (rail stays).
|
|
34
|
+
* - `rail`: ignored (rail is already collapsed).
|
|
35
|
+
*/
|
|
36
|
+
collapsed?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* v-model — mobile drawer open state. Below the breakpoint the
|
|
39
|
+
* sidebar / panel is hidden and toggled imperatively.
|
|
40
|
+
*/
|
|
41
|
+
mobileOpen?: boolean;
|
|
42
|
+
/** Tailwind breakpoint at which the sidebar becomes permanent. */
|
|
43
|
+
breakpoint?: 'md' | 'lg' | 'xl';
|
|
44
|
+
/** Stick the topbar to the top of the viewport. */
|
|
45
|
+
stickyTopbar?: boolean;
|
|
46
|
+
/** Stick the sidebar (desktop) so it scrolls with the viewport. */
|
|
47
|
+
stickySidebar?: boolean;
|
|
48
|
+
/** Render dividing borders between regions (sidebar/main, topbar/body…). */
|
|
49
|
+
divider?: boolean;
|
|
50
|
+
/** Padding around the main content area. */
|
|
51
|
+
mainPadding?: 'none' | 'small' | 'medium' | 'large';
|
|
52
|
+
/** Radius of the contained shell card. Ignored when `appearance="flush"`. */
|
|
53
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
54
|
+
/** Accessible label for the mobile navigation drawer (dialog). */
|
|
55
|
+
drawerAriaLabel?: string;
|
|
56
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<Canvas>` is a thin layout primitive that renders a Figma/Storybook-like
|
|
3
|
+
* patterned background. It pairs well as the preview area of a
|
|
4
|
+
* `PropsPlayground`, the drop zone of a `FileInput`, the body of an
|
|
5
|
+
* `EmptyState`, or any place where you want to hint "this is a workspace".
|
|
6
|
+
*
|
|
7
|
+
* It is purely visual — no JS, no listeners. Tokens drive the colors so it
|
|
8
|
+
* adapts automatically to light/dark and to the active palette.
|
|
9
|
+
*/
|
|
10
|
+
export interface Canvas {
|
|
11
|
+
/**
|
|
12
|
+
* Visual pattern.
|
|
13
|
+
* - `dots` (default): radial dots grid, classic playground feel.
|
|
14
|
+
* - `grid`: 1px line grid (graph paper).
|
|
15
|
+
* - `lines`: horizontal 1px rules (notebook).
|
|
16
|
+
* - `none`: flat surface, no pattern.
|
|
17
|
+
*/
|
|
18
|
+
pattern?: 'dots' | 'grid' | 'lines' | 'none';
|
|
19
|
+
/** Cell size in px. Bigger cell = more breathing room. @default 16 */
|
|
20
|
+
cellSize?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Pattern intensity (alpha applied on top of the surface).
|
|
23
|
+
* @default 'subtle'
|
|
24
|
+
*/
|
|
25
|
+
intensity?: 'subtle' | 'normal' | 'strong';
|
|
26
|
+
/**
|
|
27
|
+
* Background surface token.
|
|
28
|
+
* @default 'card'
|
|
29
|
+
*/
|
|
30
|
+
surface?: 'card' | 'background' | 'muted';
|
|
31
|
+
/**
|
|
32
|
+
* Corner radius. Inherits from `ModoProvider` if omitted.
|
|
33
|
+
*/
|
|
34
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
35
|
+
/** Adds a 1px token border. @default false */
|
|
36
|
+
bordered?: boolean;
|
|
37
|
+
/** Polymorphic root tag. @default 'div' */
|
|
38
|
+
as?: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface Container {
|
|
2
|
+
as?: 'div' | 'section' | 'article' | 'main' | 'aside' | 'header' | 'footer' | 'nav';
|
|
3
|
+
maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | 'none';
|
|
4
|
+
height?: 'auto' | 'screen' | 'fill' | 'full';
|
|
5
|
+
centered?: boolean;
|
|
6
|
+
centerContent?: boolean;
|
|
7
|
+
padding?: 'none' | 'small' | 'medium' | 'large';
|
|
8
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Visual orientation of the divider.
|
|
4
|
+
* - `horizontal` (default): a thin line across the available width
|
|
5
|
+
* - `vertical`: a thin line across the available height (host needs flex/grid)
|
|
6
|
+
*/
|
|
7
|
+
export type DividerOrientation = 'horizontal' | 'vertical';
|
|
8
|
+
/**
|
|
9
|
+
* Visual style of the divider line.
|
|
10
|
+
* - `solid` (default): single line
|
|
11
|
+
* - `dashed`: dashed pattern
|
|
12
|
+
* - `dotted`: dotted pattern
|
|
13
|
+
*/
|
|
14
|
+
export type DividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
15
|
+
/**
|
|
16
|
+
* Visual weight (intensity) of the divider.
|
|
17
|
+
* - `subtle` (default): low contrast — separates content blocks
|
|
18
|
+
* - `default`: standard `--border` token
|
|
19
|
+
* - `strong`: foreground/40 — emphasizes section breaks
|
|
20
|
+
*/
|
|
21
|
+
export type DividerEmphasis = 'subtle' | 'default' | 'strong';
|
|
22
|
+
/**
|
|
23
|
+
* Spacing applied along the perpendicular axis (top/bottom for horizontal,
|
|
24
|
+
* left/right for vertical). Maps to the system spacing scale.
|
|
25
|
+
*/
|
|
26
|
+
export type DividerSpacing = 'none' | 'small' | 'medium' | 'large';
|
|
27
|
+
/**
|
|
28
|
+
* Alignment of an inline label/icon along the divider.
|
|
29
|
+
* Only applies to `horizontal` orientation when a label or `#default` slot
|
|
30
|
+
* is provided.
|
|
31
|
+
*/
|
|
32
|
+
export type DividerLabelAlign = 'start' | 'center' | 'end';
|
|
33
|
+
export interface Divider {
|
|
34
|
+
/** @default 'horizontal' */
|
|
35
|
+
orientation?: DividerOrientation;
|
|
36
|
+
/** @default 'solid' */
|
|
37
|
+
variant?: DividerVariant;
|
|
38
|
+
/** @default 'default' */
|
|
39
|
+
emphasis?: DividerEmphasis;
|
|
40
|
+
/** Margin perpendicular to the line. @default 'medium' */
|
|
41
|
+
spacing?: DividerSpacing;
|
|
42
|
+
/** Optional inline label (horizontal only). */
|
|
43
|
+
label?: string;
|
|
44
|
+
/** Optional leading icon next to the label. */
|
|
45
|
+
icon?: Component;
|
|
46
|
+
/** Where to position the label. @default 'center' */
|
|
47
|
+
labelAlign?: DividerLabelAlign;
|
|
48
|
+
/**
|
|
49
|
+
* If `true`, the divider is purely decorative for assistive tech.
|
|
50
|
+
* If `false`, it gets `role="separator"`. @default false
|
|
51
|
+
*/
|
|
52
|
+
decorative?: boolean;
|
|
53
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
export interface PageHeader {
|
|
3
|
+
/** Visible title text. Use the `title` slot if you need rich content. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Secondary text under the title. Use the `subtitle` slot for rich content. */
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Show a back button to the left of the title. Emits `@back` on click. */
|
|
8
|
+
backButton?: boolean;
|
|
9
|
+
/** Icon component for the back button. Defaults to a chevron-left. */
|
|
10
|
+
backIcon?: Component;
|
|
11
|
+
/** Accessible name for the (icon-only) back button. */
|
|
12
|
+
backAriaLabel?: string;
|
|
13
|
+
/** Visual size of the title. Default `'medium'`. */
|
|
14
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
|
+
/** Render a bottom border separating the header from page content. */
|
|
16
|
+
divider?: boolean;
|
|
17
|
+
/** Make the header `position: sticky` to the top with a translucent background. */
|
|
18
|
+
sticky?: boolean;
|
|
19
|
+
/** Padding around the header content. */
|
|
20
|
+
padding?: 'none' | 'small' | 'medium' | 'large';
|
|
21
|
+
/** Polymorphic root tag. Defaults to `'header'`. */
|
|
22
|
+
as?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* A single navigation item.
|
|
4
|
+
*
|
|
5
|
+
* Items are rendered as `<a>` (when `href` is provided), `<router-link>`
|
|
6
|
+
* (when `to` is provided), or `<button>` (otherwise — fires `@select`).
|
|
7
|
+
*/
|
|
8
|
+
export interface SidebarItem {
|
|
9
|
+
/** Stable identifier; used for active matching, keyed render and selection. */
|
|
10
|
+
id: string | number;
|
|
11
|
+
/** Visible text label. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Leading icon component. */
|
|
14
|
+
icon?: Component;
|
|
15
|
+
/** Plain anchor target. */
|
|
16
|
+
href?: string;
|
|
17
|
+
/** Vue Router target (used as-is on `to=` of router-link). */
|
|
18
|
+
to?: string | Record<string, unknown>;
|
|
19
|
+
/** Open external links in a new tab. Sets `target="_blank" rel="noopener"`. */
|
|
20
|
+
external?: boolean;
|
|
21
|
+
/** Trailing badge content (string/number renders as `<Badge>` automatically). */
|
|
22
|
+
badge?: string | number;
|
|
23
|
+
/** Color of the auto-rendered badge. */
|
|
24
|
+
badgeColor?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
25
|
+
/** Disable the item (non-interactive, dimmed). */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Render as a danger item (e.g. logout). */
|
|
28
|
+
danger?: boolean;
|
|
29
|
+
/** Optional sub-items (one level of nesting). Renders a chevron and toggles on click. */
|
|
30
|
+
children?: SidebarItem[];
|
|
31
|
+
/** Forces the item to render as initially expanded when it has children. */
|
|
32
|
+
defaultExpanded?: boolean;
|
|
33
|
+
/** Free-form metadata for hosts that use slots. */
|
|
34
|
+
meta?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export interface SidebarSection {
|
|
37
|
+
/** Section identifier (for keys / aria-labelledby). */
|
|
38
|
+
id: string | number;
|
|
39
|
+
/** Optional uppercase section title. */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** Items in this section. */
|
|
42
|
+
items: SidebarItem[];
|
|
43
|
+
}
|
|
44
|
+
export interface Sidebar {
|
|
45
|
+
/** Polymorphic root tag. Defaults to `'nav'`. */
|
|
46
|
+
as?: string;
|
|
47
|
+
/** Sections to render. Use either `sections` or `items` (which becomes a single anonymous section). */
|
|
48
|
+
sections?: SidebarSection[];
|
|
49
|
+
/** Shortcut: a flat list of items rendered as a single section. */
|
|
50
|
+
items?: SidebarItem[];
|
|
51
|
+
/**
|
|
52
|
+
* Currently selected item id (v-model). When the user activates an item
|
|
53
|
+
* without `href`/`to`, it becomes the active id and `@update:activeId`
|
|
54
|
+
* is emitted alongside `@select`.
|
|
55
|
+
*/
|
|
56
|
+
activeId?: string | number | null;
|
|
57
|
+
/**
|
|
58
|
+
* Collapse the sidebar to icon-only mode. When `true`, labels, badges,
|
|
59
|
+
* sub-items and section titles hide; tooltips appear on hover/focus.
|
|
60
|
+
*/
|
|
61
|
+
collapsed?: boolean;
|
|
62
|
+
/** Visual size of the rows. */
|
|
63
|
+
size?: 'small' | 'medium' | 'large';
|
|
64
|
+
/** Radius of the row hit-area. */
|
|
65
|
+
radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
66
|
+
/** Color of the active state. */
|
|
67
|
+
color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
|
|
68
|
+
/**
|
|
69
|
+
* How the active state is rendered:
|
|
70
|
+
* - `'tonal'` — soft `bg-X/10 text-X` (default).
|
|
71
|
+
* - `'solid'` — filled `bg-X text-X-foreground`.
|
|
72
|
+
* - `'bar'` — a left/right vertical bar accent + tonal text.
|
|
73
|
+
*/
|
|
74
|
+
activeVariant?: 'tonal' | 'solid' | 'bar';
|
|
75
|
+
/** Side where the active `bar` accent renders (only if `activeVariant="bar"`). */
|
|
76
|
+
barSide?: 'start' | 'end';
|
|
77
|
+
/** Aria label for the root nav element. @default 'Sidebar' */
|
|
78
|
+
ariaLabel?: string;
|
|
79
|
+
/** Accessible label for the sub-items expander toggle (icon-only). */
|
|
80
|
+
expandAriaLabel?: string;
|
|
81
|
+
/** Padding around the inner list. */
|
|
82
|
+
padding?: 'none' | 'small' | 'medium' | 'large';
|
|
83
|
+
/**
|
|
84
|
+
* Render dividing borders between header / body / footer regions.
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
dividers?: boolean;
|
|
88
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout primitive that arranges children in a row or column with
|
|
3
|
+
* consistent spacing. `Stack` is the generic primitive; `HStack` and
|
|
4
|
+
* `VStack` are convenience wrappers that fix the direction.
|
|
5
|
+
*
|
|
6
|
+
* Inspired by Chakra/Radix/SwiftUI stacks. Uses `flex` under the hood.
|
|
7
|
+
*/
|
|
8
|
+
export type StackDirection = 'row' | 'column';
|
|
9
|
+
/**
|
|
10
|
+
* Spacing between children. Maps to the system spacing scale.
|
|
11
|
+
* Values map roughly to Tailwind's `gap-*` scale (`small` = `gap-2`,
|
|
12
|
+
* `medium` = `gap-4`, etc.). Use `none` to disable the gap entirely.
|
|
13
|
+
*/
|
|
14
|
+
export type StackSpacing = 'none' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
15
|
+
export type StackAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
16
|
+
export type StackJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
17
|
+
export type StackWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
18
|
+
export interface Stack {
|
|
19
|
+
/** Layout direction. @default 'column' */
|
|
20
|
+
direction?: StackDirection;
|
|
21
|
+
/** Gap between children. @default 'medium' */
|
|
22
|
+
spacing?: StackSpacing;
|
|
23
|
+
/** Cross-axis alignment (`align-items`). @default 'stretch' */
|
|
24
|
+
align?: StackAlign;
|
|
25
|
+
/** Main-axis justification (`justify-content`). @default 'start' */
|
|
26
|
+
justify?: StackJustify;
|
|
27
|
+
/** Wrap behavior. @default 'nowrap' */
|
|
28
|
+
wrap?: StackWrap;
|
|
29
|
+
/** Inline divider rendered between children. */
|
|
30
|
+
divider?: boolean;
|
|
31
|
+
/** When `true`, the stack fills the available width. @default false */
|
|
32
|
+
fullWidth?: boolean;
|
|
33
|
+
/** When `true`, the stack fills the available height. @default false */
|
|
34
|
+
fullHeight?: boolean;
|
|
35
|
+
/** Render as a different element (e.g. `'section'`). @default 'div' */
|
|
36
|
+
as?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* `HStack` and `VStack` accept the same props as `Stack` minus `direction`.
|
|
40
|
+
*/
|
|
41
|
+
export type HStack = Omit<Stack, 'direction'>;
|
|
42
|
+
export type VStack = Omit<Stack, 'direction'>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Topbar (L04 · layout) — application top bar with logo, navigation,
|
|
4
|
+
* search, actions and user menu slots. Designed to drop into the
|
|
5
|
+
* `#topbar` slot of `AppShell`, but usable standalone too.
|
|
6
|
+
*/
|
|
7
|
+
export interface Topbar {
|
|
8
|
+
/** Brand title shown next to the logo. Use the `title` slot for rich content. */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Secondary text under the title. Use the `subtitle` slot for rich content. */
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
/** Visual height of the bar. Default `'medium'`. */
|
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
|
+
/** Render a bottom border separating the bar from page content. */
|
|
15
|
+
divider?: boolean;
|
|
16
|
+
/** Make the bar `position: sticky` to the top with a translucent background. */
|
|
17
|
+
sticky?: boolean;
|
|
18
|
+
/** Horizontal padding token. Default `'medium'`. */
|
|
19
|
+
padding?: 'none' | 'small' | 'medium' | 'large';
|
|
20
|
+
/** Polymorphic root tag. Defaults to `'header'`. */
|
|
21
|
+
as?: string;
|
|
22
|
+
/** Show a hamburger menu button on the left side. Emits `@menu-toggle` on click. */
|
|
23
|
+
menuToggle?: boolean;
|
|
24
|
+
/** Icon for the menu toggle button. Defaults to a hamburger glyph. */
|
|
25
|
+
menuIcon?: Component;
|
|
26
|
+
/** Accessible name for the (icon-only) menu toggle button. */
|
|
27
|
+
menuAriaLabel?: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* One node in the breadcrumb trail. Either provide `to` (router-style
|
|
4
|
+
* link string) or `href` (regular anchor); leave both undefined for the
|
|
5
|
+
* current page (rendered as plain text with `aria-current="page"`).
|
|
6
|
+
*/
|
|
7
|
+
export interface BreadcrumbItem {
|
|
8
|
+
/** Visible label. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Optional leading icon. */
|
|
11
|
+
icon?: Component;
|
|
12
|
+
/** Internal route. Emits `navigate` with the item when clicked. */
|
|
13
|
+
to?: string;
|
|
14
|
+
/** External href — rendered as `<a>`. */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Disable the item (renders as muted text, not interactive). */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface Breadcrumbs {
|
|
20
|
+
/** The trail (root-first). The last item is the current page. */
|
|
21
|
+
items: BreadcrumbItem[];
|
|
22
|
+
/**
|
|
23
|
+
* Maximum visible items. When the trail is longer, the middle is
|
|
24
|
+
* collapsed into an ellipsis. The first and last items are always
|
|
25
|
+
* shown. @default 0 (no collapsing)
|
|
26
|
+
*/
|
|
27
|
+
max?: number;
|
|
28
|
+
/** Separator between items. @default 'chevron' */
|
|
29
|
+
separator?: 'chevron' | 'slash' | 'dot' | 'arrow';
|
|
30
|
+
/** Custom separator string (overrides `separator`). */
|
|
31
|
+
separatorText?: string;
|
|
32
|
+
/** Visual size. @default 'medium' */
|
|
33
|
+
size?: 'small' | 'medium' | 'large';
|
|
34
|
+
/** Show a Home icon on the first item when it has no own icon. @default false */
|
|
35
|
+
showHomeIcon?: boolean;
|
|
36
|
+
/** Accessible label for the nav landmark. @default 'Breadcrumb' */
|
|
37
|
+
ariaLabel?: string;
|
|
38
|
+
}
|