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.
Files changed (168) hide show
  1. package/LICENSE +21 -0
  2. package/README.OLD.md +5 -0
  3. package/README.md +84 -0
  4. package/dist/components/ModoProvider.vue.d.ts +61 -0
  5. package/dist/components/data-display/Card.vue.d.ts +26 -0
  6. package/dist/components/data-display/Typography.vue.d.ts +21 -0
  7. package/dist/components/data-display/avatar/Avatar.vue.d.ts +9 -0
  8. package/dist/components/data-display/avatar/AvatarGroup.vue.d.ts +7 -0
  9. package/dist/components/data-display/calendar/AgendaView.vue.d.ts +76 -0
  10. package/dist/components/data-display/calendar/Calendar.vue.d.ts +25 -0
  11. package/dist/components/data-display/calendar/CalendarEventTooltip.vue.d.ts +34 -0
  12. package/dist/components/data-display/calendar/CalendarHeader.vue.d.ts +67 -0
  13. package/dist/components/data-display/calendar/DayView.vue.d.ts +91 -0
  14. package/dist/components/data-display/calendar/MonthView.vue.d.ts +71 -0
  15. package/dist/components/data-display/calendar/Scheduler.vue.d.ts +102 -0
  16. package/dist/components/data-display/calendar/WeekView.vue.d.ts +101 -0
  17. package/dist/components/data-display/date-picker/DateRangePicker.vue.d.ts +18 -0
  18. package/dist/components/data-display/date-picker/DateTimePicker.vue.d.ts +17 -0
  19. package/dist/components/data-display/table/Table.vue.d.ts +75 -0
  20. package/dist/components/data-display/table/TableColumn.vue.d.ts +26 -0
  21. package/dist/components/data-display/table/TablePagination.vue.d.ts +14 -0
  22. package/dist/components/feedback/Badge.vue.d.ts +24 -0
  23. package/dist/components/feedback/Banner.vue.d.ts +28 -0
  24. package/dist/components/feedback/Chip.vue.d.ts +22 -0
  25. package/dist/components/feedback/ConfirmDialog.vue.d.ts +4 -0
  26. package/dist/components/feedback/Drawer.vue.d.ts +43 -0
  27. package/dist/components/feedback/EmptyState.vue.d.ts +19 -0
  28. package/dist/components/feedback/Loader.vue.d.ts +7 -0
  29. package/dist/components/feedback/Modal.vue.d.ts +44 -0
  30. package/dist/components/feedback/ProgressBar.vue.d.ts +10 -0
  31. package/dist/components/feedback/Skeleton.vue.d.ts +10 -0
  32. package/dist/components/feedback/Toast.vue.d.ts +19 -0
  33. package/dist/components/feedback/ToastContainer.vue.d.ts +11 -0
  34. package/dist/components/feedback/Tooltip.vue.d.ts +35 -0
  35. package/dist/components/forms/Button.vue.d.ts +24 -0
  36. package/dist/components/forms/ButtonGroup.vue.d.ts +16 -0
  37. package/dist/components/forms/Checkbox.vue.d.ts +22 -0
  38. package/dist/components/forms/Combobox.vue.d.ts +48 -0
  39. package/dist/components/forms/DateField.vue.d.ts +30 -0
  40. package/dist/components/forms/DateRangeField.vue.d.ts +32 -0
  41. package/dist/components/forms/DateTimeField.vue.d.ts +34 -0
  42. package/dist/components/forms/FileInput.vue.d.ts +33 -0
  43. package/dist/components/forms/FormField.vue.d.ts +30 -0
  44. package/dist/components/forms/Input.vue.d.ts +33 -0
  45. package/dist/components/forms/MultiSelect.vue.d.ts +51 -0
  46. package/dist/components/forms/NumberInput.vue.d.ts +35 -0
  47. package/dist/components/forms/PasswordInput.vue.d.ts +40 -0
  48. package/dist/components/forms/Radio.vue.d.ts +16 -0
  49. package/dist/components/forms/RadioGroup.vue.d.ts +27 -0
  50. package/dist/components/forms/RangeSlider.vue.d.ts +27 -0
  51. package/dist/components/forms/SearchInput.vue.d.ts +37 -0
  52. package/dist/components/forms/Select.vue.d.ts +46 -0
  53. package/dist/components/forms/Slider.vue.d.ts +26 -0
  54. package/dist/components/forms/Switch.vue.d.ts +22 -0
  55. package/dist/components/forms/Textarea.vue.d.ts +36 -0
  56. package/dist/components/layout/AppShell.vue.d.ts +124 -0
  57. package/dist/components/layout/Canvas.vue.d.ts +21 -0
  58. package/dist/components/layout/Container.vue.d.ts +21 -0
  59. package/dist/components/layout/Divider.vue.d.ts +21 -0
  60. package/dist/components/layout/HStack.vue.d.ts +14 -0
  61. package/dist/components/layout/PageHeader.vue.d.ts +34 -0
  62. package/dist/components/layout/PopoverPanel.vue.d.ts +29 -0
  63. package/dist/components/layout/Sidebar.vue.d.ts +39 -0
  64. package/dist/components/layout/SidebarRow.vue.d.ts +31 -0
  65. package/dist/components/layout/SidebarRowContent.vue.d.ts +27 -0
  66. package/dist/components/layout/Stack.vue.d.ts +24 -0
  67. package/dist/components/layout/Topbar.vue.d.ts +36 -0
  68. package/dist/components/layout/VStack.vue.d.ts +14 -0
  69. package/dist/components/navigation/Breadcrumbs.vue.d.ts +13 -0
  70. package/dist/components/navigation/DropdownMenu.vue.d.ts +36 -0
  71. package/dist/components/navigation/Pagination.vue.d.ts +18 -0
  72. package/dist/components/navigation/Tabs.vue.d.ts +37 -0
  73. package/dist/composables/eventColors.d.ts +13 -0
  74. package/dist/composables/useAutoScroll.d.ts +11 -0
  75. package/dist/composables/useCalendar.d.ts +44 -0
  76. package/dist/composables/useCalendarKeyboard.d.ts +17 -0
  77. package/dist/composables/useCalendarTheme.d.ts +22 -0
  78. package/dist/composables/useColorMode.d.ts +28 -0
  79. package/dist/composables/useConfirm.d.ts +146 -0
  80. package/dist/composables/useCurrentTimeLine.d.ts +5 -0
  81. package/dist/composables/useEventHover.d.ts +29 -0
  82. package/dist/composables/useField.d.ts +89 -0
  83. package/dist/composables/useModoConfig.d.ts +29 -0
  84. package/dist/composables/usePopover.d.ts +59 -0
  85. package/dist/composables/useTable.d.ts +29 -0
  86. package/dist/composables/useTableColumnsState.d.ts +52 -0
  87. package/dist/composables/useTableFilter.d.ts +39 -0
  88. package/dist/composables/useTableKeyboard.d.ts +38 -0
  89. package/dist/composables/useTablePagination.d.ts +44 -0
  90. package/dist/composables/useTableQuery.d.ts +90 -0
  91. package/dist/composables/useTableSelection.d.ts +40 -0
  92. package/dist/composables/useTableSort.d.ts +41 -0
  93. package/dist/composables/useTableTree.d.ts +55 -0
  94. package/dist/composables/useTableUrlSync.d.ts +66 -0
  95. package/dist/composables/useTableVirtual.d.ts +43 -0
  96. package/dist/composables/useTimeGrid.d.ts +22 -0
  97. package/dist/composables/useToast.d.ts +176 -0
  98. package/dist/config/ModoConfig.d.ts +32 -0
  99. package/dist/config/ModoLocale.d.ts +212 -0
  100. package/dist/config/colorPrimitives.d.ts +13 -0
  101. package/dist/config/createModoUI.d.ts +85 -0
  102. package/dist/config/palettes.d.ts +30 -0
  103. package/dist/index.d.ts +130 -0
  104. package/dist/interfaces/data-display/Card.interface.d.ts +8 -0
  105. package/dist/interfaces/data-display/Typography.interface.d.ts +12 -0
  106. package/dist/interfaces/data-display/avatar/Avatar.interface.d.ts +24 -0
  107. package/dist/interfaces/data-display/avatar/AvatarGroup.interface.d.ts +8 -0
  108. package/dist/interfaces/data-display/calendar/AgendaView.interface.d.ts +29 -0
  109. package/dist/interfaces/data-display/calendar/Calendar.interface.d.ts +16 -0
  110. package/dist/interfaces/data-display/calendar/DayView.interface.d.ts +43 -0
  111. package/dist/interfaces/data-display/calendar/MonthView.interface.d.ts +41 -0
  112. package/dist/interfaces/data-display/calendar/Scheduler.interface.d.ts +63 -0
  113. package/dist/interfaces/data-display/calendar/WeekView.interface.d.ts +65 -0
  114. package/dist/interfaces/data-display/date-picker/DateRangePicker.interface.d.ts +20 -0
  115. package/dist/interfaces/data-display/date-picker/DateTimePicker.interface.d.ts +16 -0
  116. package/dist/interfaces/data-display/table/Table.interface.d.ts +615 -0
  117. package/dist/interfaces/data-display/table/TableColumn.interface.d.ts +10 -0
  118. package/dist/interfaces/data-display/table/TablePagination.interface.d.ts +33 -0
  119. package/dist/interfaces/feedback/Badge.interface.d.ts +14 -0
  120. package/dist/interfaces/feedback/Banner.interface.d.ts +14 -0
  121. package/dist/interfaces/feedback/Chip.interface.d.ts +35 -0
  122. package/dist/interfaces/feedback/ConfirmDialog.interface.d.ts +49 -0
  123. package/dist/interfaces/feedback/Drawer.interface.d.ts +49 -0
  124. package/dist/interfaces/feedback/EmptyState.interface.d.ts +31 -0
  125. package/dist/interfaces/feedback/Loader.interface.d.ts +7 -0
  126. package/dist/interfaces/feedback/Modal.interface.d.ts +50 -0
  127. package/dist/interfaces/feedback/ProgressBar.interface.d.ts +31 -0
  128. package/dist/interfaces/feedback/Skeleton.interface.d.ts +123 -0
  129. package/dist/interfaces/feedback/Toast.interface.d.ts +86 -0
  130. package/dist/interfaces/feedback/Tooltip.interface.d.ts +38 -0
  131. package/dist/interfaces/forms/Button.interface.d.ts +26 -0
  132. package/dist/interfaces/forms/ButtonGroup.interface.d.ts +9 -0
  133. package/dist/interfaces/forms/Checkbox.interface.d.ts +32 -0
  134. package/dist/interfaces/forms/Combobox.interface.d.ts +57 -0
  135. package/dist/interfaces/forms/DateField.interface.d.ts +39 -0
  136. package/dist/interfaces/forms/DateRangeField.interface.d.ts +41 -0
  137. package/dist/interfaces/forms/DateTimeField.interface.d.ts +44 -0
  138. package/dist/interfaces/forms/FileInput.interface.d.ts +105 -0
  139. package/dist/interfaces/forms/FormField.interface.d.ts +55 -0
  140. package/dist/interfaces/forms/Input.interface.d.ts +68 -0
  141. package/dist/interfaces/forms/NumberInput.interface.d.ts +77 -0
  142. package/dist/interfaces/forms/PasswordInput.interface.d.ts +84 -0
  143. package/dist/interfaces/forms/Radio.interface.d.ts +54 -0
  144. package/dist/interfaces/forms/RadioGroup.context.d.ts +13 -0
  145. package/dist/interfaces/forms/RangeSlider.interface.d.ts +30 -0
  146. package/dist/interfaces/forms/SearchInput.interface.d.ts +59 -0
  147. package/dist/interfaces/forms/Select.interface.d.ts +145 -0
  148. package/dist/interfaces/forms/Slider.interface.d.ts +36 -0
  149. package/dist/interfaces/forms/Switch.interface.d.ts +30 -0
  150. package/dist/interfaces/forms/Textarea.interface.d.ts +64 -0
  151. package/dist/interfaces/layout/AppShell.interface.d.ts +56 -0
  152. package/dist/interfaces/layout/Canvas.interface.d.ts +39 -0
  153. package/dist/interfaces/layout/Container.interface.d.ts +8 -0
  154. package/dist/interfaces/layout/Divider.interface.d.ts +53 -0
  155. package/dist/interfaces/layout/PageHeader.interface.d.ts +23 -0
  156. package/dist/interfaces/layout/Sidebar.interface.d.ts +88 -0
  157. package/dist/interfaces/layout/Stack.interface.d.ts +42 -0
  158. package/dist/interfaces/layout/Topbar.interface.d.ts +28 -0
  159. package/dist/interfaces/navigation/Breadcrumbs.interface.d.ts +38 -0
  160. package/dist/interfaces/navigation/DropdownMenu.interface.d.ts +72 -0
  161. package/dist/interfaces/navigation/Pagination.interface.d.ts +37 -0
  162. package/dist/interfaces/navigation/Tabs.interface.d.ts +74 -0
  163. package/dist/mood-ui.cjs +4 -0
  164. package/dist/mood-ui.cjs.map +1 -0
  165. package/dist/mood-ui.css +2 -0
  166. package/dist/mood-ui.mjs +19832 -0
  167. package/dist/mood-ui.mjs.map +1 -0
  168. package/package.json +72 -0
@@ -0,0 +1,35 @@
1
+ import { Component } from 'vue';
2
+ export type ChipPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
3
+ export interface Chip {
4
+ /** Contenido visible del chip (número, string corto). Ignorado si `dot`. */
5
+ content?: string | number;
6
+ /** Modo punto: renderiza un indicador pequeño sin contenido. */
7
+ dot?: boolean;
8
+ /** Si hay contenido numérico, cap al superar este valor (ej. 99 → "99+"). */
9
+ max?: number;
10
+ /** Oculta el chip (útil cuando el valor es 0). */
11
+ invisible?: boolean;
12
+ /** Si `true`, mostrar aun si `content` es 0 (por defecto se oculta). */
13
+ showZero?: boolean;
14
+ /** Estilo visual. */
15
+ variant?: 'solid' | 'outline' | 'subtle';
16
+ /** Familia semántica. */
17
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
18
+ /** Tamaño. */
19
+ size?: 'small' | 'medium' | 'large';
20
+ /** Radio de esquinas. */
21
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
22
+ /**
23
+ * Si hay `default` slot o children, el chip se posiciona en absolute
24
+ * sobre el contenido en esta esquina. Si no hay children, se
25
+ * renderiza en flujo como un pill.
26
+ */
27
+ placement?: ChipPlacement;
28
+ /** Icono decorativo opcional (ignorado en modo `dot`). */
29
+ icon?: Component;
30
+ /**
31
+ * Accessible name del chip. Si solo contiene número/dot conviene
32
+ * describir su significado (ej. "3 notificaciones sin leer").
33
+ */
34
+ ariaLabel?: string;
35
+ }
@@ -0,0 +1,49 @@
1
+ import { Component } from 'vue';
2
+ import { ModalSize } from './Modal.interface';
3
+ /**
4
+ * Color of the confirm action. Mirrors the Action/Content set used by
5
+ * `Button` and `Modal` (§12.2 of MODO_UI_RULES). Use `default` for
6
+ * neutral confirms, `primary` for happy-path actions, and `danger` for
7
+ * destructive operations.
8
+ */
9
+ export type ConfirmColor = 'default' | 'primary' | 'danger' | 'warning' | 'success';
10
+ /**
11
+ * Public input accepted by `useConfirm().confirm()`. Every field is
12
+ * optional — passing only `title` is enough for a yes/no prompt.
13
+ */
14
+ export interface ConfirmInput {
15
+ /** Heading shown at the top of the dialog. */
16
+ title?: string;
17
+ /** Supporting copy under the title. Plain text only — pass HTML via slot in custom usage. */
18
+ description?: string;
19
+ /** Custom leading icon next to the title. Defaults to a per-color icon. */
20
+ icon?: Component;
21
+ /** Hide the icon entirely. */
22
+ hideIcon?: boolean;
23
+ /** Label for the confirm button. @default 'Confirm' */
24
+ confirmLabel?: string;
25
+ /** Label for the cancel button. @default 'Cancel' */
26
+ cancelLabel?: string;
27
+ /** Color of the confirm button. @default 'primary' */
28
+ color?: ConfirmColor;
29
+ /** Modal size. @default 'small' */
30
+ size?: ModalSize;
31
+ /** Radius override (otherwise inherits ModoProvider). */
32
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
33
+ /** Hide the cancel button (turns into an alert dialog). @default false */
34
+ hideCancel?: boolean;
35
+ /** Allow dismiss via overlay click / Escape. @default true */
36
+ dismissable?: boolean;
37
+ /** Auto-focus the confirm button when opened. @default true */
38
+ autoFocusConfirm?: boolean;
39
+ }
40
+ /** Internal queue entry — `ConfirmInput` plus the promise resolver. */
41
+ export interface ConfirmRequest extends ConfirmInput {
42
+ id: string;
43
+ resolve: (value: boolean) => void;
44
+ }
45
+ /** Props of the `<ConfirmDialog>` host. Mount once near the app root. */
46
+ export interface ConfirmDialog {
47
+ /** Default radius for confirm dialogs that don't specify one. */
48
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
49
+ }
@@ -0,0 +1,49 @@
1
+ export type DrawerSide = 'left' | 'right' | 'top' | 'bottom';
2
+ export type DrawerSize = 'small' | 'medium' | 'large' | 'full';
3
+ export type DrawerOverlay = 'blur' | 'solid' | 'transparent' | 'dark' | 'dim' | 'glass';
4
+ export interface Drawer {
5
+ /** Visibilidad. v-model. */
6
+ modelValue?: boolean;
7
+ /**
8
+ * Lado desde el que entra el panel.
9
+ * @default 'right'
10
+ */
11
+ side?: DrawerSide;
12
+ /**
13
+ * Tamaño del panel en su eje principal.
14
+ * - `small | medium | large` se mapean a anchos/altos discretos.
15
+ * - `full` ocupa el viewport completo en su eje.
16
+ * @default 'medium'
17
+ */
18
+ size?: DrawerSize;
19
+ /**
20
+ * Radius del panel. Si se omite cascadea del provider. El lado opuesto
21
+ * a `side` no se redondea (queda pegado al borde).
22
+ */
23
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
24
+ /** Título accesible (renderizado en header si no hay slot). */
25
+ title?: string;
26
+ /** Descripción opcional debajo del título. */
27
+ description?: string;
28
+ /** Cierra al hacer click en el backdrop. @default true */
29
+ closeOnOverlay?: boolean;
30
+ /** Cierra al presionar Escape. @default true */
31
+ closeOnEscape?: boolean;
32
+ /** Muestra botón de cerrar (X) en la esquina del header. @default true */
33
+ showClose?: boolean;
34
+ /** Bloquea el scroll del body mientras está abierto. @default true */
35
+ lockScroll?: boolean;
36
+ /** Color de acento para borde/ring. Default cascade del provider. */
37
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
38
+ /** Estilo del backdrop. @default 'blur' */
39
+ overlay?: DrawerOverlay;
40
+ /**
41
+ * Renderiza un borde interior sutil dentro del borde principal.
42
+ * @default false
43
+ */
44
+ innerBorder?: boolean;
45
+ /** ID opcional. */
46
+ id?: string;
47
+ /** aria-label cuando no hay title. */
48
+ ariaLabel?: string;
49
+ }
@@ -0,0 +1,31 @@
1
+ import { Component } from 'vue';
2
+ /**
3
+ * Visual size of the empty state. Larger sizes are appropriate when the
4
+ * empty state takes the full page; smaller sizes fit inside cards/panels.
5
+ */
6
+ export type EmptyStateSize = 'small' | 'medium' | 'large';
7
+ /**
8
+ * Visual treatment.
9
+ * - `subtle` (default): no border, just spacing — for inline use
10
+ * - `solid`: bordered surface with `bg-card`
11
+ * - `outline`: dashed border, transparent — for drop-zone affordances
12
+ *
13
+ * Matches the Surface preset in MODO_UI_RULES §12.1.
14
+ */
15
+ export type EmptyStateVariant = 'subtle' | 'solid' | 'outline';
16
+ export interface EmptyState {
17
+ /** Heading. */
18
+ title?: string;
19
+ /** Supporting copy under the title. */
20
+ description?: string;
21
+ /** Leading icon. Shown above the title. */
22
+ icon?: Component;
23
+ /** @default 'medium' */
24
+ size?: EmptyStateSize;
25
+ /** @default 'subtle' */
26
+ variant?: EmptyStateVariant;
27
+ /** Center-align the contents. @default true */
28
+ centered?: boolean;
29
+ /** Radius override for the card/outlined surface. */
30
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
31
+ }
@@ -0,0 +1,7 @@
1
+ export interface Loader {
2
+ variant?: 'normal' | 'outline' | 'ghost' | 'text';
3
+ size?: 'small' | 'medium' | 'large';
4
+ color?: string;
5
+ /** Visually-hidden screen-reader label. Defaults to "Loading". */
6
+ label?: string;
7
+ }
@@ -0,0 +1,50 @@
1
+ export type ModalSize = 'small' | 'medium' | 'large' | 'xlarge' | 'full';
2
+ export type ModalPosition = 'center' | 'top';
3
+ export type ModalOverlay = 'blur' | 'solid' | 'transparent' | 'dark' | 'dim' | 'glass';
4
+ export interface Modal {
5
+ /** Visibilidad. v-model. */
6
+ modelValue?: boolean;
7
+ /** Tamaño del panel. @default 'medium' */
8
+ size?: ModalSize;
9
+ /** Posición vertical. @default 'center' */
10
+ position?: ModalPosition;
11
+ /** Radius. Si no se pasa, cascadea del provider. */
12
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
13
+ /** Título accesible (se renderiza en header si no hay slot). */
14
+ title?: string;
15
+ /** Descripción opcional debajo del título. */
16
+ description?: string;
17
+ /** Cierra al hacer click en el backdrop. @default true */
18
+ closeOnOverlay?: boolean;
19
+ /** Cierra al presionar Escape. @default true */
20
+ closeOnEscape?: boolean;
21
+ /** Muestra botón de cerrar (X) en la esquina. @default true */
22
+ showClose?: boolean;
23
+ /**
24
+ * Bloquea el scroll del body mientras está abierto. @default true
25
+ */
26
+ lockScroll?: boolean;
27
+ /** Color de acento para borde/ring. Default cascade del provider. */
28
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
29
+ /** Estilo del backdrop. @default 'blur' */
30
+ overlay?: ModalOverlay;
31
+ /**
32
+ * Renderiza un borde interior sutil dentro del borde principal. @default true
33
+ */
34
+ innerBorder?: boolean;
35
+ /**
36
+ * Elemento de origen para la animación "emergente" (FLIP-style).
37
+ * Si no se provee, se usa `document.activeElement` al momento de abrir
38
+ * (normalmente el botón que abrió el modal).
39
+ */
40
+ origin?: HTMLElement | null;
41
+ /**
42
+ * Deshabilita la animación origen→modal y usa un fade+scale genérico.
43
+ * @default false
44
+ */
45
+ disableOriginAnimation?: boolean;
46
+ /** ID opcional del modal. */
47
+ id?: string;
48
+ /** aria-label cuando no hay title. */
49
+ ariaLabel?: string;
50
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Linear progress indicator. Supports determinate (with `value`) and
3
+ * indeterminate (omit `value`) modes.
4
+ */
5
+ export type ProgressBarColor = 'default' | 'primary' | 'success' | 'warning' | 'danger';
6
+ export type ProgressBarSize = 'small' | 'medium' | 'large';
7
+ export interface ProgressBar {
8
+ /**
9
+ * Current progress value, between `min` and `max`. Omit for an
10
+ * indeterminate animation.
11
+ */
12
+ value?: number;
13
+ /** @default 0 */
14
+ min?: number;
15
+ /** @default 100 */
16
+ max?: number;
17
+ /** Track color. @default 'primary' */
18
+ color?: ProgressBarColor;
19
+ /** Bar thickness. @default 'medium' */
20
+ size?: ProgressBarSize;
21
+ /** Track radius. Cascades from `ModoProvider`. @default 'full' (pill shape) */
22
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
23
+ /** Display the numeric percentage next to the bar. @default false */
24
+ showValue?: boolean;
25
+ /** Optional label rendered above the bar. */
26
+ label?: string;
27
+ /** Accessible label when `label` is omitted. */
28
+ ariaLabel?: string;
29
+ /** Animated stripes — useful for "uploading…" feel. @default false */
30
+ striped?: boolean;
31
+ }
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Skeleton — low-attention placeholder shown while content is loading.
3
+ *
4
+ * Skeletons act as a standalone *shape* primitive: they mirror the footprint
5
+ * of a real component (size + radius) without rendering any of its content.
6
+ * The idea is that replacing `<Input size="large" radius="full" />` with
7
+ * `<Skeleton shape="input" size="large" radius="full" />` produces the same
8
+ * visual box — so the layout doesn't jump when data arrives.
9
+ *
10
+ * Resolution order (strongest wins):
11
+ * 1. Explicit `width` / `height` props.
12
+ * 2. The `shape` preset (per-size heights + forced-radius rules).
13
+ * 3. `radius` prop.
14
+ * 4. `ModoProvider` radius.
15
+ * 5. Generic default (rounded-md).
16
+ */
17
+ export interface Skeleton {
18
+ /**
19
+ * Visual preset that determines the default footprint (height, width,
20
+ * radius behavior).
21
+ *
22
+ * Primitives:
23
+ * - `text` — short horizontal bar. Use with `lines` for paragraphs.
24
+ * - `title` — taller bar suitable for headings.
25
+ * - `rect` — raw rectangle, no forced radius. Width: 100%.
26
+ * - `circle` — square made fully round via `radius: full`.
27
+ * - `avatar` — circle sized to match `Avatar` per `size`.
28
+ * - `button` — bar matching `Button` height per `size`.
29
+ *
30
+ * Form fields (match the real component pixel-for-pixel, 32/40/48 per
31
+ * `size`):
32
+ * - `input`, `select`, `multiSelect`, `combobox`, `numberInput`,
33
+ * `searchInput`, `passwordInput`, `dateField`, `dateTimeField`,
34
+ * `dateRangeField` — single-line field.
35
+ * - `fileInput` — compact file trigger (same height as input).
36
+ * - `textarea` — tall multi-line area (≈ 3 rows).
37
+ * - `fileInputArea` — drop-zone (120/180/240 px per size).
38
+ *
39
+ * Selection controls (compact; `withLabel` renders the label *inline
40
+ * on the right*, matching the real component):
41
+ * - `checkbox` — small rounded square (16/20/24 px).
42
+ * - `radio` — small circle (16/20/24 px).
43
+ * - `switch` — pill-shaped track (32×20 / 40×24 / 56×32 px).
44
+ *
45
+ * Range controls (composite: horizontal track + thumb(s); `withLabel`
46
+ * places the label above the track):
47
+ * - `slider` — thin track + single thumb.
48
+ * - `rangeSlider` — thin track + two thumbs.
49
+ *
50
+ * Display chips & containers:
51
+ * - `chip` — pill-shaped inline token (20/24/28 px tall).
52
+ * - `badge` — tiny rounded token (16/20/24 px tall). Always `full`.
53
+ * - `banner` — full-width horizontal strip (~48 px).
54
+ * - `card` — generic card box (128/192/256 px tall), respects radius.
55
+ *
56
+ * Composite layouts (ignore `withLabel`; render a curated arrangement):
57
+ * - `profileRow` — avatar + 2 stacked text lines, horizontal.
58
+ * - `mediaCard` — media rect + title + 2 body lines, stacked.
59
+ * - `listRow` — small circle + title + meta, horizontal.
60
+ *
61
+ * @default 'rect'
62
+ */
63
+ shape?: 'text' | 'title' | 'rect' | 'circle' | 'avatar' | 'button' | 'input' | 'textarea' | 'select' | 'multiSelect' | 'combobox' | 'numberInput' | 'searchInput' | 'passwordInput' | 'fileInput' | 'fileInputArea' | 'dateField' | 'dateTimeField' | 'dateRangeField' | 'checkbox' | 'radio' | 'switch' | 'slider' | 'rangeSlider' | 'chip' | 'badge' | 'banner' | 'card' | 'profileRow' | 'mediaCard' | 'listRow';
64
+ /**
65
+ * Component size — mirrors the `size` prop of the real component so the
66
+ * skeleton keeps pixel-parity. For shapes without a size scale
67
+ * (`text`, `title`, `rect`), this is a hint used when no explicit
68
+ * height is given.
69
+ *
70
+ * @default 'medium'
71
+ */
72
+ size?: 'small' | 'medium' | 'large';
73
+ /**
74
+ * Corner radius.
75
+ *
76
+ * - `circle` / `avatar` always force `full` regardless of this prop.
77
+ * - Other shapes: this wins over the `ModoProvider` radius.
78
+ * - If omitted: provider radius → generic `rounded-md` fallback.
79
+ */
80
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
81
+ /**
82
+ * Explicit width. Accepts any CSS length (`'6rem'`, `240`, `'50%'`).
83
+ * Overrides the shape preset.
84
+ */
85
+ width?: string | number;
86
+ /**
87
+ * Explicit height. Same rules as `width`. Overrides the size preset.
88
+ */
89
+ height?: string | number;
90
+ /**
91
+ * When true, `width` collapses to `100%`. Useful when the skeleton
92
+ * replaces a `fullWidth` form field so the footprint matches.
93
+ * @default false
94
+ */
95
+ fullWidth?: boolean;
96
+ /**
97
+ * When true, renders a small label bar above the main shape (mirroring a
98
+ * labeled form field). The label is a mini text skeleton (~30% width,
99
+ * ~0.75rem tall). Ignored for `text` and `title`.
100
+ * @default false
101
+ */
102
+ withLabel?: boolean;
103
+ /**
104
+ * For `shape="text"`: render N stacked lines with slightly varying widths
105
+ * so the block reads like a paragraph. Ignored for other shapes.
106
+ * @default 1
107
+ */
108
+ lines?: number;
109
+ /**
110
+ * Animation style.
111
+ * - `shimmer` (default): moving light gradient.
112
+ * - `pulse`: opacity breathing.
113
+ * - `none`: static bar (still visible, useful for tests).
114
+ * @default 'shimmer'
115
+ */
116
+ animation?: 'shimmer' | 'pulse' | 'none';
117
+ /**
118
+ * Optional accessible label. Skeletons announce themselves as
119
+ * `aria-busy` + `role="status"`; use this to describe what is loading
120
+ * (e.g. `"Loading profile"`).
121
+ */
122
+ ariaLabel?: string;
123
+ }
@@ -0,0 +1,86 @@
1
+ import { Component } from 'vue';
2
+ /**
3
+ * Visual flavor of a toast. Mirrors the `Banner` color scale so visual
4
+ * recognition transfers across the system.
5
+ */
6
+ export type ToastColor = 'info' | 'success' | 'warning' | 'danger';
7
+ /**
8
+ * Visual variant. Toasts default to `subtle` because they overlay other
9
+ * content; `filled` is for bolder system messages.
10
+ */
11
+ export type ToastVariant = 'filled' | 'subtle' | 'outline';
12
+ /**
13
+ * Where the stack lives on screen. `top-right` is the most common choice;
14
+ * mobile-first apps tend to prefer `top-center` or `bottom-center`.
15
+ */
16
+ export type ToastPlacement = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
17
+ /**
18
+ * Optional inline action shown on the right side of a toast (e.g. "Undo").
19
+ * Clicking it dismisses the toast unless `keepOpen: true`.
20
+ */
21
+ export interface ToastAction {
22
+ label: string;
23
+ onClick?: (close: () => void) => void;
24
+ keepOpen?: boolean;
25
+ }
26
+ /**
27
+ * Public input accepted by `useToast().push()`. Fields are intentionally
28
+ * forgiving — you can pass just a `title` for a 90 % use case.
29
+ */
30
+ export interface ToastInput {
31
+ title?: string;
32
+ description?: string;
33
+ color?: ToastColor;
34
+ variant?: ToastVariant;
35
+ /** Custom leading icon. Defaults to a per-color icon. */
36
+ icon?: Component;
37
+ /** Hide the icon entirely. */
38
+ hideIcon?: boolean;
39
+ /** Auto-close timeout in ms. Use `0` to keep the toast pinned. */
40
+ duration?: number;
41
+ /** Inline call-to-action button. */
42
+ action?: ToastAction;
43
+ /** Allow the user to dismiss with the close button. @default true */
44
+ dismissable?: boolean;
45
+ /** Pause the auto-close timer while the pointer is over the toast. @default true */
46
+ pauseOnHover?: boolean;
47
+ /** Stable id. If you re-push with the same id, the toast is updated in place. */
48
+ id?: string | number;
49
+ /** Custom radius override (otherwise inherits ModoProvider). */
50
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
51
+ /** Per-toast placement override. Defaults to the container's `placement`. */
52
+ placement?: ToastPlacement;
53
+ }
54
+ /** Internal queue item — `ToastInput` after defaults are merged. */
55
+ export interface ToastEntry extends Required<Pick<ToastInput, 'duration' | 'dismissable' | 'pauseOnHover'>> {
56
+ id: string | number;
57
+ title?: string;
58
+ description?: string;
59
+ color: ToastColor;
60
+ variant: ToastVariant;
61
+ icon?: Component;
62
+ hideIcon?: boolean;
63
+ action?: ToastAction;
64
+ radius?: ToastInput['radius'];
65
+ placement?: ToastPlacement;
66
+ /** Internal: timestamp when the toast was pushed (used for animations). */
67
+ pushedAt: number;
68
+ }
69
+ /**
70
+ * Props of the `<ToastContainer>`. Mount once near the root of your app
71
+ * (e.g. inside `<AppShell>`'s default slot or right after `<ModoProvider>`).
72
+ */
73
+ export interface ToastContainer {
74
+ /** Stack placement on the viewport. @default 'top-right' */
75
+ placement?: ToastPlacement;
76
+ /** Maximum visible toasts; older ones are evicted. @default 5 */
77
+ max?: number;
78
+ /** Default `duration` for toasts that don't specify one. @default 4500 */
79
+ defaultDuration?: number;
80
+ /** Default `variant` for `push()` calls. @default 'subtle' */
81
+ defaultVariant?: ToastVariant;
82
+ /** Distance from the viewport edge in px. @default 16 */
83
+ offset?: number;
84
+ /** When the user prefers reduced motion, animations collapse to a fade. */
85
+ reducedMotion?: 'auto' | 'force';
86
+ }
@@ -0,0 +1,38 @@
1
+ export type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
2
+ export type TooltipTrigger = 'hover' | 'focus' | 'click' | 'manual';
3
+ export interface Tooltip {
4
+ /** Contenido textual. Si se necesita markup usar slot `#content`. */
5
+ content?: string;
6
+ /** Posición del tooltip respecto al trigger. @default 'top' */
7
+ placement?: TooltipPlacement;
8
+ /** Offset en px desde el trigger. @default 8 */
9
+ offset?: number;
10
+ /** Cómo se abre el tooltip. @default ['hover','focus'] */
11
+ trigger?: TooltipTrigger | TooltipTrigger[];
12
+ /** Delay al abrir (ms). @default 200 */
13
+ openDelay?: number;
14
+ /** Delay al cerrar (ms). @default 100 */
15
+ closeDelay?: number;
16
+ /** Muestra flecha apuntando al trigger. @default true */
17
+ arrow?: boolean;
18
+ /** Color del tooltip. @default 'default' (foreground oscuro) */
19
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning' | 'inverted';
20
+ /** Tamaño. @default 'medium' */
21
+ size?: 'small' | 'medium' | 'large';
22
+ /** Radius. @default 'medium' */
23
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
24
+ /** Deshabilitado — no se abre. */
25
+ disabled?: boolean;
26
+ /** v-model:open — permite controlarlo externamente (trigger='manual'). */
27
+ open?: boolean;
28
+ /** Ancho máximo en px. @default 260 */
29
+ maxWidth?: number;
30
+ /** ID opcional — útil para aria-describedby. */
31
+ id?: string;
32
+ /**
33
+ * Extra classes for the trigger wrapper `<span>`. Useful when the
34
+ * trigger needs to fill its parent (e.g. `'!flex !w-full'`) since
35
+ * the wrapper defaults to `inline-flex` for natural sizing.
36
+ */
37
+ wrapperClass?: string;
38
+ }
@@ -0,0 +1,26 @@
1
+ import { Component } from 'vue';
2
+ export interface Button {
3
+ label?: string;
4
+ type?: 'button' | 'submit' | 'reset';
5
+ disabled?: boolean;
6
+ loading?: boolean;
7
+ loadingText?: string;
8
+ variant?: 'normal' | 'outline' | 'ghost' | 'text';
9
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
10
+ gradient?: boolean;
11
+ size?: 'xs' | 'small' | 'medium' | 'large';
12
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
13
+ fullWidth?: boolean;
14
+ icon?: Component;
15
+ iconPosition?: 'left' | 'right';
16
+ /** Accessible name. Required when the button has no visible text (icon-only). */
17
+ ariaLabel?: string;
18
+ /**
19
+ * When true, renders a `Skeleton` placeholder with the same footprint
20
+ * (size + radius + fullWidth) instead of the real button content. Use
21
+ * this while the surrounding data is loading so the layout does not
22
+ * shift when the button activates.
23
+ * @default false
24
+ */
25
+ skeleton?: boolean;
26
+ }
@@ -0,0 +1,9 @@
1
+ export interface ButtonGroup {
2
+ orientation?: 'horizontal' | 'vertical';
3
+ variant?: 'normal' | 'outline' | 'ghost' | 'text';
4
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
5
+ size?: 'small' | 'medium' | 'large';
6
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
7
+ disabled?: boolean;
8
+ gradient?: boolean;
9
+ }
@@ -0,0 +1,32 @@
1
+ export interface Checkbox {
2
+ /** v-model (boolean). Cuando `indeterminate` es true, el valor no cambia visualmente. */
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 checked. */
13
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
14
+ /** Tamaño. */
15
+ size?: 'small' | 'medium' | 'large';
16
+ /** Radio del cuadro. */
17
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
18
+ /** Estado tri-estado (muestra guión horizontal). */
19
+ indeterminate?: boolean;
20
+ disabled?: boolean;
21
+ readonly?: boolean;
22
+ required?: boolean;
23
+ loading?: boolean;
24
+ /** id del input (autogenerado si se omite). */
25
+ id?: string;
26
+ /** name HTML. */
27
+ name?: string;
28
+ /** value HTML — útil cuando es hijo de un grupo. */
29
+ value?: string | number;
30
+ /** Accessible name cuando no hay `label` visible. */
31
+ ariaLabel?: string;
32
+ }
@@ -0,0 +1,57 @@
1
+ import { Component } from 'vue';
2
+ import { SelectOption } from './Select.interface';
3
+ export type { SelectOption };
4
+ export interface Combobox {
5
+ /** v-model — texto actual del input. Puede coincidir o no con un option.value. */
6
+ modelValue?: string | null;
7
+ /** Opciones estáticas. Si se define `loadOptions`, se ignora. */
8
+ options?: SelectOption[];
9
+ /**
10
+ * Fuente async de opciones. Se invoca en cada cambio del query (debounceado).
11
+ * Devuelve una promesa con la lista filtrada por el backend.
12
+ */
13
+ loadOptions?: (query: string) => Promise<SelectOption[]>;
14
+ /** Delay del loadOptions (ms). */
15
+ debounce?: number;
16
+ /** Mínimo de caracteres antes de disparar la búsqueda async. */
17
+ minChars?: number;
18
+ /**
19
+ * Si true, acepta cualquier texto como valor (combobox real).
20
+ * Si false, sólo acepta values de `options` (autocomplete estricto) —
21
+ * al blur el texto se resetea al último valor válido.
22
+ */
23
+ freeSolo?: boolean;
24
+ /** Etiqueta, placeholder, helper, error (estándar). */
25
+ label?: string;
26
+ placeholder?: string;
27
+ helperText?: string;
28
+ errorText?: string;
29
+ /** Texto cuando no hay opciones que mostrar. */
30
+ emptyText?: string;
31
+ /** Texto mientras carga async. */
32
+ loadingText?: string;
33
+ /** Estilo visual. */
34
+ variant?: 'outline' | 'filled' | 'ghost';
35
+ color?: 'default' | 'primary' | 'danger' | 'success' | 'warning';
36
+ size?: 'small' | 'medium' | 'large';
37
+ radius?: 'none' | 'small' | 'medium' | 'large' | 'full';
38
+ /** Estilo del halo persistente. Hereda del ModoProvider si se omite. */
39
+ halo?: 'tinted' | 'neutral' | 'off';
40
+ fullWidth?: boolean;
41
+ disabled?: boolean;
42
+ readonly?: boolean;
43
+ required?: boolean;
44
+ loading?: boolean;
45
+ /** Botón "X" para limpiar. */
46
+ clearable?: boolean;
47
+ /** Máximo de caracteres. */
48
+ maxLength?: number;
49
+ showCounter?: boolean;
50
+ /** Icono a la izquierda del input. */
51
+ iconLeft?: Component;
52
+ id?: string;
53
+ name?: string;
54
+ autocomplete?: string;
55
+ autofocus?: boolean;
56
+ ariaLabel?: string;
57
+ }