mood-ui 0.14.1 → 0.15.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/README.md +1 -1
- package/dist/components/data-display/table/Table.cjs +1 -1
- package/dist/components/data-display/table/Table.cjs.map +1 -1
- package/dist/components/data-display/table/Table.mjs +1 -1
- package/dist/components/data-display/table/Table.mjs.map +1 -1
- package/dist/components/data-display/table/Table.vue_vue_type_script_setup_true_lang.cjs +37 -1
- package/dist/components/data-display/table/Table.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/data-display/table/Table.vue_vue_type_script_setup_true_lang.mjs +38 -2
- package/dist/components/data-display/table/Table.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/data-display/table/TablePagination.cjs.map +1 -1
- package/dist/components/data-display/table/TablePagination.mjs.map +1 -1
- package/dist/components/data-display/table/TablePagination.vue_vue_type_script_setup_true_lang.cjs +24 -16
- package/dist/components/data-display/table/TablePagination.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/data-display/table/TablePagination.vue_vue_type_script_setup_true_lang.mjs +24 -16
- package/dist/components/data-display/table/TablePagination.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/feedback/EmptyState.cjs.map +1 -1
- package/dist/components/feedback/EmptyState.mjs.map +1 -1
- package/dist/components/feedback/EmptyState.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/feedback/EmptyState.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/feedback/EmptyState.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/feedback/EmptyState.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/feedback/tour/Tour.vue_vue_type_script_setup_true_lang.cjs +369 -0
- package/dist/components/feedback/tour/Tour.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/components/feedback/tour/Tour.vue_vue_type_script_setup_true_lang.mjs +368 -0
- package/dist/components/feedback/tour/Tour.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/dist/components/feedback/tour/Tour2.cjs +6 -0
- package/dist/components/feedback/tour/Tour2.cjs.map +1 -0
- package/dist/components/feedback/tour/Tour2.mjs +7 -0
- package/dist/components/feedback/tour/Tour2.mjs.map +1 -0
- package/dist/components/feedback/tour/TourCard.cjs +6 -0
- package/dist/components/feedback/tour/TourCard.cjs.map +1 -0
- package/dist/components/feedback/tour/TourCard.mjs +7 -0
- package/dist/components/feedback/tour/TourCard.mjs.map +1 -0
- package/dist/components/feedback/tour/TourCard.vue_vue_type_script_setup_true_lang.cjs +102 -0
- package/dist/components/feedback/tour/TourCard.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/components/feedback/tour/TourCard.vue_vue_type_script_setup_true_lang.mjs +101 -0
- package/dist/components/feedback/tour/TourCard.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
- package/dist/components/feedback/tour/tourAnchor.cjs +75 -0
- package/dist/components/feedback/tour/tourAnchor.cjs.map +1 -0
- package/dist/components/feedback/tour/tourAnchor.mjs +72 -0
- package/dist/components/feedback/tour/tourAnchor.mjs.map +1 -0
- package/dist/components/feedback/tour/tourPlace.cjs +108 -0
- package/dist/components/feedback/tour/tourPlace.cjs.map +1 -0
- package/dist/components/feedback/tour/tourPlace.mjs +107 -0
- package/dist/components/feedback/tour/tourPlace.mjs.map +1 -0
- package/dist/components/feedback/tour/tourShape.cjs +121 -0
- package/dist/components/feedback/tour/tourShape.cjs.map +1 -0
- package/dist/components/feedback/tour/tourShape.mjs +118 -0
- package/dist/components/feedback/tour/tourShape.mjs.map +1 -0
- package/dist/components/feedback/tour/useTourSpotlight.cjs +60 -0
- package/dist/components/feedback/tour/useTourSpotlight.cjs.map +1 -0
- package/dist/components/feedback/tour/useTourSpotlight.mjs +59 -0
- package/dist/components/feedback/tour/useTourSpotlight.mjs.map +1 -0
- package/dist/components/feedback/tour/useTourSteps.cjs +108 -0
- package/dist/components/feedback/tour/useTourSteps.cjs.map +1 -0
- package/dist/components/feedback/tour/useTourSteps.mjs +107 -0
- package/dist/components/feedback/tour/useTourSteps.mjs.map +1 -0
- package/dist/components/forms/Button.cjs +1 -1
- package/dist/components/forms/Button.cjs.map +1 -1
- package/dist/components/forms/Button.mjs +1 -1
- package/dist/components/forms/Button.mjs.map +1 -1
- package/dist/components/forms/Button.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/forms/Button.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/forms/Button.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/forms/Button.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/forms/FileInput.cjs +1 -1
- package/dist/components/forms/FileInput.cjs.map +1 -1
- package/dist/components/forms/FileInput.mjs +1 -1
- package/dist/components/forms/FileInput.mjs.map +1 -1
- package/dist/components/forms/FileInput.vue_vue_type_script_setup_true_lang.cjs +34 -17
- package/dist/components/forms/FileInput.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/forms/FileInput.vue_vue_type_script_setup_true_lang.mjs +34 -17
- package/dist/components/forms/FileInput.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/forms/MultiSelect.cjs +1 -1
- package/dist/components/forms/MultiSelect.cjs.map +1 -1
- package/dist/components/forms/MultiSelect.mjs +1 -1
- package/dist/components/forms/MultiSelect.mjs.map +1 -1
- package/dist/components/forms/MultiSelect.vue_vue_type_script_setup_true_lang.cjs +2 -1
- package/dist/components/forms/MultiSelect.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/forms/MultiSelect.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/dist/components/forms/MultiSelect.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/forms/TagInput.cjs.map +1 -1
- package/dist/components/forms/TagInput.mjs.map +1 -1
- package/dist/components/forms/TagInput.vue_vue_type_script_setup_true_lang.cjs +1 -0
- package/dist/components/forms/TagInput.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/forms/TagInput.vue_vue_type_script_setup_true_lang.mjs +1 -0
- package/dist/components/forms/TagInput.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/forms/Textarea.cjs.map +1 -1
- package/dist/components/forms/Textarea.mjs.map +1 -1
- package/dist/components/forms/Textarea.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/forms/Textarea.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/forms/Textarea.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/forms/Textarea.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/layout/Canvas.cjs +1 -1
- package/dist/components/layout/Canvas.cjs.map +1 -1
- package/dist/components/layout/Canvas.mjs +1 -1
- package/dist/components/layout/Canvas.mjs.map +1 -1
- package/dist/components/layout/Canvas.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/layout/Canvas.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/layout/Canvas.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/layout/Canvas.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/layout/PopoverPanel.cjs +1 -1
- package/dist/components/layout/PopoverPanel.cjs.map +1 -1
- package/dist/components/layout/PopoverPanel.mjs +1 -1
- package/dist/components/layout/PopoverPanel.mjs.map +1 -1
- package/dist/components/layout/PopoverPanel.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/layout/PopoverPanel.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/layout/PopoverPanel.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/layout/PopoverPanel.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/layout/popover/PopoverTrigger.cjs.map +1 -1
- package/dist/components/layout/popover/PopoverTrigger.mjs.map +1 -1
- package/dist/components/layout/popover/PopoverTrigger.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/layout/popover/PopoverTrigger.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/layout/popover/PopoverTrigger.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/layout/popover/PopoverTrigger.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/navigation/DropdownMenu.cjs +1 -1
- package/dist/components/navigation/DropdownMenu.cjs.map +1 -1
- package/dist/components/navigation/DropdownMenu.mjs +1 -1
- package/dist/components/navigation/DropdownMenu.mjs.map +1 -1
- package/dist/components/navigation/DropdownMenu.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/navigation/DropdownMenu.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/navigation/DropdownMenu.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/navigation/DropdownMenu.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/navigation/Switcher.cjs.map +1 -1
- package/dist/components/navigation/Switcher.mjs.map +1 -1
- package/dist/components/navigation/Switcher.vue_vue_type_script_setup_true_lang.cjs +77 -45
- package/dist/components/navigation/Switcher.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/navigation/Switcher.vue_vue_type_script_setup_true_lang.mjs +77 -45
- package/dist/components/navigation/Switcher.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/components/navigation/menu/MenuTrigger.cjs.map +1 -1
- package/dist/components/navigation/menu/MenuTrigger.mjs.map +1 -1
- package/dist/components/navigation/menu/MenuTrigger.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/components/navigation/menu/MenuTrigger.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/components/navigation/menu/MenuTrigger.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/dist/components/navigation/menu/MenuTrigger.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/dist/composables/useField.cjs +28 -8
- package/dist/composables/useField.cjs.map +1 -1
- package/dist/composables/useField.mjs +28 -8
- package/dist/composables/useField.mjs.map +1 -1
- package/dist/config/ModoLocale.cjs +10 -1
- package/dist/config/ModoLocale.cjs.map +1 -1
- package/dist/config/ModoLocale.mjs +10 -1
- package/dist/config/ModoLocale.mjs.map +1 -1
- package/dist/config/locales/es.cjs +10 -1
- package/dist/config/locales/es.cjs.map +1 -1
- package/dist/config/locales/es.mjs +10 -1
- package/dist/config/locales/es.mjs.map +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.mjs +3 -1
- package/dist/mood-ui.css +289 -103
- package/dist/types/components/data-display/surface-card/SurfaceCardBody.vue.d.ts +1 -1
- package/dist/types/components/data-display/surface-card/SurfaceCardFooter.vue.d.ts +1 -1
- package/dist/types/components/data-display/surface-card/SurfaceCardHeader.vue.d.ts +1 -1
- package/dist/types/components/feedback/dialog/DialogContent.vue.d.ts +1 -1
- package/dist/types/components/feedback/tour/Tour.vue.d.ts +31 -0
- package/dist/types/components/feedback/tour/TourCard.vue.d.ts +25 -0
- package/dist/types/components/feedback/tour/index.d.ts +2 -0
- package/dist/types/components/feedback/tour/tourAnchor.d.ts +12 -0
- package/dist/types/components/feedback/tour/tourPlace.d.ts +60 -0
- package/dist/types/components/feedback/tour/tourShape.d.ts +36 -0
- package/dist/types/components/feedback/tour/useTourSpotlight.d.ts +14 -0
- package/dist/types/components/feedback/tour/useTourSteps.d.ts +31 -0
- package/dist/types/components/layout/Canvas.vue.d.ts +1 -1
- package/dist/types/components/layout/popover/PopoverContent.vue.d.ts +1 -1
- package/dist/types/components/navigation/menu/MenuContent.vue.d.ts +1 -1
- package/dist/types/composables/useField.d.ts +23 -0
- package/dist/types/config/ModoLocale.d.ts +14 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interfaces/feedback/Tour.interface.d.ts +73 -0
- package/dist/types/interfaces/navigation/Switcher.interface.d.ts +5 -0
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_8) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<SurfaceCardBodyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SurfaceCardBodyProps> & Readonly<{}>, {
|
|
7
|
-
as: "div" | "section";
|
|
8
7
|
surface: import('../../..').SurfaceCardSectionSurface;
|
|
8
|
+
as: "div" | "section";
|
|
9
9
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
@@ -4,9 +4,9 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_8) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<SurfaceCardFooterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SurfaceCardFooterProps> & Readonly<{}>, {
|
|
7
|
+
surface: import('../../..').SurfaceCardSectionSurface;
|
|
7
8
|
as: "footer" | "div";
|
|
8
9
|
align: import('../../..').SurfaceCardFooterAlign;
|
|
9
|
-
surface: import('../../..').SurfaceCardSectionSurface;
|
|
10
10
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
12
|
declare const _default: typeof __VLS_export;
|
|
@@ -4,8 +4,8 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_8) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<SurfaceCardHeaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SurfaceCardHeaderProps> & Readonly<{}>, {
|
|
7
|
-
as: "div" | "header" | "hgroup";
|
|
8
7
|
surface: import('../../..').SurfaceCardSectionSurface;
|
|
8
|
+
as: "div" | "header" | "hgroup";
|
|
9
9
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,10 +7,10 @@ declare const __VLS_base: import('vue').DefineComponent<DialogContentProps, {},
|
|
|
7
7
|
dismissable: boolean;
|
|
8
8
|
placement: import('../../..').DialogPlacement;
|
|
9
9
|
width: import('../../..').DialogWidth;
|
|
10
|
+
surface: import('../../..').DialogSurface;
|
|
10
11
|
align: import('../../..').DialogAlign;
|
|
11
12
|
alert: boolean;
|
|
12
13
|
side: import('../../..').DialogSide;
|
|
13
|
-
surface: import('../../..').DialogSurface;
|
|
14
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Tour, TourCardSlot, TourEnd, TourLabels } from '../../../interfaces/feedback/Tour.interface';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
card?: (props: TourCardSlot) => unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import('vue').DefineComponent<Tour, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
end: (end: TourEnd) => any;
|
|
7
|
+
"update:open": (open: boolean) => any;
|
|
8
|
+
step: (index: number, id: string, total: number) => any;
|
|
9
|
+
"update:index": (index: number) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<Tour> & Readonly<{
|
|
11
|
+
onEnd?: ((end: TourEnd) => any) | undefined;
|
|
12
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
13
|
+
onStep?: ((index: number, id: string, total: number) => any) | undefined;
|
|
14
|
+
"onUpdate:index"?: ((index: number) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
open: boolean;
|
|
17
|
+
index: number;
|
|
18
|
+
labels: Partial<TourLabels>;
|
|
19
|
+
chrome: () => import('../../..').TourChrome;
|
|
20
|
+
resolveTarget: import('../../..').TourTargetResolver;
|
|
21
|
+
blockTarget: boolean;
|
|
22
|
+
anchorTimeout: number;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TourLabels } from '../../../interfaces/feedback/Tour.interface';
|
|
2
|
+
/**
|
|
3
|
+
* The default card of a Tour: the title (which names the dialog), the body, "2 of 5", and two actions, Back (from the second step) and
|
|
4
|
+
* Next ("Done" on the last), as a dialog has at most; skipping is the close icon.
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
titleId: string;
|
|
8
|
+
title: string;
|
|
9
|
+
body: string;
|
|
10
|
+
current: number;
|
|
11
|
+
total: number;
|
|
12
|
+
last: boolean;
|
|
13
|
+
labels: TourLabels;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
next: () => any;
|
|
17
|
+
back: () => any;
|
|
18
|
+
skip: () => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
onNext?: (() => any) | undefined;
|
|
21
|
+
onBack?: (() => any) | undefined;
|
|
22
|
+
onSkip?: (() => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TourItem, TourTargetResolver } from '../../../interfaces/feedback/Tour.interface';
|
|
2
|
+
/** How long a step waits for its target (the page's data, a tab its `before` opened) before it is left out. */
|
|
3
|
+
export declare const TOUR_ANCHOR_TIMEOUT = 1500;
|
|
4
|
+
/**
|
|
5
|
+
* The element that draws a target: itself, or for a wrapper with `display: contents` its first child that has a box; for one marked
|
|
6
|
+
* `data-tour-frame="tablist"` (a Tabs root, which holds the panels too) only its line of tabs. Null for one that is hidden, inert or has no size.
|
|
7
|
+
*/
|
|
8
|
+
export declare function tourAnchorBox(element: HTMLElement): HTMLElement | null;
|
|
9
|
+
/** The element a step points at right now, as `tourAnchorBox` measures it, or null: no target, none on the page, one that does not show. */
|
|
10
|
+
export declare function findTourTarget(step: TourItem, resolve?: TourTargetResolver): HTMLElement | null;
|
|
11
|
+
/** The target once `find` gives it, or null after `timeout`: the page may still be loading what it points at. */
|
|
12
|
+
export declare function waitForTourTarget(find: () => HTMLElement | null, timeout?: number): Promise<HTMLElement | null>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface PlaceInput {
|
|
2
|
+
/** The target's box, against the viewport. */
|
|
3
|
+
box: {
|
|
4
|
+
top: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
};
|
|
9
|
+
/** The viewport's size. */
|
|
10
|
+
viewport: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
/** The card's size. */
|
|
15
|
+
card: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
/** Where the page's content starts: the bottom of the top bar and the right edge of the menu, which the card must not cover. */
|
|
20
|
+
inset: {
|
|
21
|
+
top: number;
|
|
22
|
+
left: number;
|
|
23
|
+
};
|
|
24
|
+
/** The target sits in the top bar itself (fixed or sticky): it needs no scroll and the card goes below it. */
|
|
25
|
+
chrome: boolean;
|
|
26
|
+
/** On a phone the card is always pinned to the bottom. */
|
|
27
|
+
phone: boolean;
|
|
28
|
+
/** The page has already been scrolled for this step, so it has nothing more to give. */
|
|
29
|
+
scrolled: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `below` or `above` the target, `right` or `left` of it (then `at` is the card's corner), or `pinned` to the bottom of the viewport.
|
|
33
|
+
* `cover` is the corner of the screen the pinned card holds, with its air: whatever of the target lies at or right of `left` and at or
|
|
34
|
+
* below `top` is not cut. Set only when the card really sits over the target, so a target the card does not cover is cut whole.
|
|
35
|
+
*/
|
|
36
|
+
export interface Place {
|
|
37
|
+
mode: "below" | "above" | "right" | "left" | "pinned";
|
|
38
|
+
/** How far to scroll the page, positive down, before the card is placed (0: none). */
|
|
39
|
+
scroll: number;
|
|
40
|
+
at?: {
|
|
41
|
+
top: number;
|
|
42
|
+
left: number;
|
|
43
|
+
};
|
|
44
|
+
cover: {
|
|
45
|
+
left: number;
|
|
46
|
+
top: number;
|
|
47
|
+
} | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Where a step's card goes: below the target when it fits, else beside it (right, then left, level with its top) inside the content,
|
|
51
|
+
* else above when the target sits in the lower half (never over the top bar or the page's head), else the page scrolls so the
|
|
52
|
+
* target's top sits under the top bar and the card fits below it. A target too tall for that, or one the page cannot scroll enough,
|
|
53
|
+
* gets the card pinned to the bottom (right corner, the whole width on a phone) and only what the card covers cut away. A target in
|
|
54
|
+
* the top bar needs no scroll; one scrolled out of sight is brought back.
|
|
55
|
+
*/
|
|
56
|
+
export declare function placeStep({ box, viewport, card, inset, chrome, phone, scrolled }: PlaceInput): Place;
|
|
57
|
+
/** The scrollable ancestor of an element (the page's own panel, or the document). */
|
|
58
|
+
export declare function scrollerOf(element: HTMLElement): HTMLElement | Element;
|
|
59
|
+
/** Scrolls the target's page by `delta` pixels and resolves when it has stopped (or after a moment, where scrollend is missing). */
|
|
60
|
+
export declare function scrollPageBy(element: HTMLElement, delta: number): Promise<void>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface Viewport {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
export interface Hole {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
radius: number;
|
|
11
|
+
/** A card sits over the hole's foot: what lies at or right of `x` and at or below `y` (screen pixels) is not cut. */
|
|
12
|
+
notch?: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** The corner's radius in pixels of mood-ui's radius name; medium when there is none. */
|
|
18
|
+
export declare function radiusOf(radius: string | undefined): number;
|
|
19
|
+
/**
|
|
20
|
+
* The cut around a target's box: padded, kept inside the screen, its corners never rounder than half its side. `cover` is the corner of
|
|
21
|
+
* the screen a card holds: the cut loses only what lies there (a step down for a card under the target's right part, a plain trim when
|
|
22
|
+
* the card spans the target's whole width or height), so the rest of a wide target stays lit.
|
|
23
|
+
*/
|
|
24
|
+
export declare function holeAround(box: {
|
|
25
|
+
left: number;
|
|
26
|
+
top: number;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
}, radius: number, viewport: Viewport, cover?: {
|
|
30
|
+
left: number;
|
|
31
|
+
top: number;
|
|
32
|
+
} | null): Hole;
|
|
33
|
+
/** The shade over the screen with the hole cut out (drawn after it, for `fill-rule="evenodd"`), or the whole screen without one. */
|
|
34
|
+
export declare function spotlightPath(viewport: Viewport, hole: Hole | null): string;
|
|
35
|
+
/** The line round the cut, `inset` pixels inside it (half the stroke's width keeps a stroke wholly inside the cut), or null with no cut. */
|
|
36
|
+
export declare function ringPath(hole: Hole | null, inset: number): string | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The tour's shade over the screen, the target cut out at the provider's corners; it follows scrolls, resizes and the target's size.
|
|
4
|
+
* `cover` (the corner a pinned card holds) is what the cut does not take: only the part of the target the card sits over goes dark.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useTourSpotlight(target: Ref<HTMLElement | null>, cover?: Ref<{
|
|
7
|
+
left: number;
|
|
8
|
+
top: number;
|
|
9
|
+
} | null>): {
|
|
10
|
+
path: import('vue').ComputedRef<string>;
|
|
11
|
+
hole: import('vue').ComputedRef<import('./tourShape').Hole | null>;
|
|
12
|
+
ring: import('vue').ComputedRef<string | null>;
|
|
13
|
+
measure: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TourItem } from '../../../interfaces/feedback/Tour.interface';
|
|
2
|
+
export interface TourStepsOptions {
|
|
3
|
+
/** The steps as the app gave them, asked each time a tour starts. */
|
|
4
|
+
steps: () => TourItem[];
|
|
5
|
+
/** The element of a step that has a target, once it shows; null when it never does. */
|
|
6
|
+
locate: (item: TourItem) => Promise<HTMLElement | null>;
|
|
7
|
+
/** A step is on screen. `total` is how many will show, which falls when a step turns out not to. */
|
|
8
|
+
onShow?: (at: number, item: TourItem, total: number) => void;
|
|
9
|
+
}
|
|
10
|
+
/** `shown`: a step is up. `stale`: a newer move won. `empty`: no step is left to show. `nothing`: no step could show, so the tour never began. */
|
|
11
|
+
export type TourMove = "shown" | "stale" | "empty" | "nothing";
|
|
12
|
+
/**
|
|
13
|
+
* The machine of a tour, with no screen in it. `start` keeps the steps that can show (their `when`, and for a step with no `before` a
|
|
14
|
+
* target that is there after a short wait), `next` and `back` show one at a time and drop a step that cannot show when its turn
|
|
15
|
+
* comes, and `stop` ends it. A newer move wins over one still waiting for its target, and a tour with nothing to show does not begin.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useTourSteps(options: TourStepsOptions): {
|
|
18
|
+
running: import('vue').Ref<boolean, boolean>;
|
|
19
|
+
step: import('vue').ComputedRef<TourItem | null>;
|
|
20
|
+
index: import('vue').Ref<number, number>;
|
|
21
|
+
total: import('vue').ComputedRef<number>;
|
|
22
|
+
target: import('vue').ShallowRef<HTMLElement | null, HTMLElement | null>;
|
|
23
|
+
start: () => Promise<TourMove>;
|
|
24
|
+
show: (at: number) => Promise<TourMove>;
|
|
25
|
+
next: () => Promise<TourMove>;
|
|
26
|
+
back: () => Promise<TourMove>;
|
|
27
|
+
stop: () => {
|
|
28
|
+
shown: number;
|
|
29
|
+
lastId: string | null;
|
|
30
|
+
} | null;
|
|
31
|
+
};
|
|
@@ -5,9 +5,9 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<Canvas, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Canvas> & Readonly<{}>, {
|
|
7
7
|
pattern: "dots" | "grid" | "lines" | "none";
|
|
8
|
+
surface: "card" | "background" | "muted";
|
|
8
9
|
as: string;
|
|
9
10
|
bordered: boolean;
|
|
10
|
-
surface: "card" | "background" | "muted";
|
|
11
11
|
cellSize: number;
|
|
12
12
|
intensity: "subtle" | "normal" | "strong";
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -5,9 +5,9 @@ type __VLS_Slots = {} & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<PopoverContentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PopoverContentProps> & Readonly<{}>, {
|
|
7
7
|
dismissable: boolean;
|
|
8
|
+
surface: import('../../..').PopoverSurface;
|
|
8
9
|
align: import('../../..').PopoverAlign;
|
|
9
10
|
side: import('../../..').PopoverSide;
|
|
10
|
-
surface: import('../../..').PopoverSurface;
|
|
11
11
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
@@ -4,9 +4,9 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_7) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import('vue').DefineComponent<MenuContentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MenuContentProps> & Readonly<{}>, {
|
|
7
|
+
surface: import('../../..').MenuSurface;
|
|
7
8
|
align: import('../../..').MenuAlign;
|
|
8
9
|
side: import('../../..').MenuSide;
|
|
9
|
-
surface: import('../../..').MenuSurface;
|
|
10
10
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
12
|
declare const _default: typeof __VLS_export;
|
|
@@ -63,6 +63,20 @@ export declare function useFieldState(props: FieldStateSource, options: UseField
|
|
|
63
63
|
describedBy: ComputedRef<string | undefined>;
|
|
64
64
|
};
|
|
65
65
|
export type FieldVariant = 'outline' | 'filled' | 'ghost';
|
|
66
|
+
export type FieldRadiusName = 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
67
|
+
/**
|
|
68
|
+
* What a field's box is, for the radius scale:
|
|
69
|
+
* - `control`: one row (Input, Select, Date…). `full` is a true pill.
|
|
70
|
+
* - `grow`: a row that gets taller as it fills (chips in MultiSelect/TagInput).
|
|
71
|
+
* `full` is a pill at one row and settles into a rounded rectangle after.
|
|
72
|
+
* - `surface`: a large box (Textarea, drop zone). `full` is capped at a
|
|
73
|
+
* card-like radius: a big pill is never a good shape.
|
|
74
|
+
*/
|
|
75
|
+
export type FieldRadiusKind = 'control' | 'grow' | 'surface';
|
|
76
|
+
/** What `radius="full"` becomes for each kind of field box. */
|
|
77
|
+
export declare const FIELD_FULL_RADIUS_CLASS: Record<FieldRadiusKind, string>;
|
|
78
|
+
/** Radius utility of a field box for a `radius` prop value and a box kind. */
|
|
79
|
+
export declare function fieldRadiusClass(radius: FieldRadiusName, kind?: FieldRadiusKind, fullRadiusClass?: string): string;
|
|
66
80
|
export interface UseFieldClassesSource {
|
|
67
81
|
variant: MaybeRefOrGetter<FieldVariant>;
|
|
68
82
|
stateColor: MaybeRefOrGetter<'default' | 'primary' | 'danger' | 'success' | 'warning'>;
|
|
@@ -70,6 +84,8 @@ export interface UseFieldClassesSource {
|
|
|
70
84
|
radius: MaybeRefOrGetter<'none' | 'small' | 'medium' | 'large' | 'full'>;
|
|
71
85
|
/** radius utility para 'full' (Input usa 'full', Textarea usa '2xl'). */
|
|
72
86
|
fullRadiusClass?: string;
|
|
87
|
+
/** Kind of box, to cap `radius="full"` on large surfaces. @default 'control' */
|
|
88
|
+
radiusKind?: MaybeRefOrGetter<FieldRadiusKind>;
|
|
73
89
|
/**
|
|
74
90
|
* Cuando es true, fuerza los estilos de focus (halo + borde) aunque
|
|
75
91
|
* el foco esté fuera del wrapper. Útil para Select/Combobox cuando
|
|
@@ -87,6 +103,13 @@ export interface UseFieldClassesSource {
|
|
|
87
103
|
}
|
|
88
104
|
export declare const FIELD_AFFORDANCE_ICON_BY_COLOR: Record<string, string>;
|
|
89
105
|
export declare const FIELD_AFFORDANCE_ACTION_BY_COLOR: Record<string, string>;
|
|
106
|
+
/**
|
|
107
|
+
* Hover border of every field and field-like control (the `input-hover` colour
|
|
108
|
+
* token in style.css). It is ONLY applied at rest: not while focused (the focus
|
|
109
|
+
* border wins), not when invalid (the error border wins), not when disabled.
|
|
110
|
+
* `not-[.cursor-not-allowed]` is the disabled marker every field wrapper carries.
|
|
111
|
+
*/
|
|
112
|
+
export declare const FIELD_HOVER_BORDER = "not-[.cursor-not-allowed]:not-focus-within:hover:border-input-hover";
|
|
90
113
|
/**
|
|
91
114
|
* THE single focus indicator for the whole system. Every interactive component
|
|
92
115
|
* uses this exact ring so tabbing through a form/toolbar shows one consistent
|
|
@@ -225,6 +225,8 @@ export interface ModoLocale {
|
|
|
225
225
|
last: string;
|
|
226
226
|
/** `Page {current} of {total}` when both numbers are known. */
|
|
227
227
|
page: string;
|
|
228
|
+
/** Compact page readout (narrow containers): `{current} / {total}`. */
|
|
229
|
+
pageCompact: string;
|
|
228
230
|
rowsPerPage: string;
|
|
229
231
|
/** Range readout: `{from}-{to} of {total}`. */
|
|
230
232
|
range: string;
|
|
@@ -282,6 +284,18 @@ export interface ModoLocale {
|
|
|
282
284
|
/** Default aria-label of the color-mode toggle. */
|
|
283
285
|
toggle: string;
|
|
284
286
|
};
|
|
287
|
+
tour: {
|
|
288
|
+
next: string;
|
|
289
|
+
back: string;
|
|
290
|
+
/** The last step's action. */
|
|
291
|
+
done: string;
|
|
292
|
+
/** The aria-label and tooltip of the close icon. */
|
|
293
|
+
skip: string;
|
|
294
|
+
/** `{current}` and `{total}` placeholders. */
|
|
295
|
+
progress: string;
|
|
296
|
+
/** Screen-reader announcement of each step: `{current}`, `{total}` and `{title}` placeholders. */
|
|
297
|
+
announce: string;
|
|
298
|
+
};
|
|
285
299
|
}
|
|
286
300
|
/** Default locale (English). Serves as the non-breaking fallback. */
|
|
287
301
|
export declare const defaultLocale: ModoLocale;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -198,8 +198,10 @@ export { default as LiquidToast } from './components/feedback/liquid-toast/Liqui
|
|
|
198
198
|
export { default as LiquidToaster } from './components/feedback/liquid-toast/LiquidToaster.vue';
|
|
199
199
|
export { liquidToast, createLiquidToast, type LiquidToastController } from './components/feedback/liquid-toast/liquidToast';
|
|
200
200
|
export { MorphTooltip, MorphTooltipTrigger, MorphTooltipContent, MorphTooltipTitle, MorphTooltipDescription } from './components/feedback/morph-tooltip';
|
|
201
|
+
export { Tour, tourAnchorBox } from './components/feedback/tour';
|
|
201
202
|
export { MorphSelect, MorphSelectTrigger, MorphSelectContent } from './components/forms/morph-select';
|
|
202
203
|
export type * from './interfaces/forms/GlassSwitch.interface';
|
|
203
204
|
export type * from './interfaces/forms/MorphSelect.interface';
|
|
204
205
|
export type * from './interfaces/feedback/LiquidToast.interface';
|
|
205
206
|
export type * from './interfaces/feedback/MorphTooltip.interface';
|
|
207
|
+
export type * from './interfaces/feedback/Tour.interface';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PopoverPlacement } from '../../composables/usePopover';
|
|
2
|
+
/** What a step points at: a CSS selector (or, with `resolveTarget`, whatever the app's resolver understands), an element, or a getter. */
|
|
3
|
+
export type TourTarget = string | HTMLElement | (() => HTMLElement | null);
|
|
4
|
+
/** One card of a tour. */
|
|
5
|
+
export interface TourItem {
|
|
6
|
+
/** Unique within the tour. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** What the card points at. None: a card in the middle of the screen. */
|
|
9
|
+
target?: TourTarget;
|
|
10
|
+
/** Already translated. */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Already translated. */
|
|
13
|
+
body: string;
|
|
14
|
+
/** Where the card goes against the target; it flips when it does not fit. @default 'bottom-start' */
|
|
15
|
+
placement?: PopoverPlacement;
|
|
16
|
+
/** False (or a throw) leaves the step out. */
|
|
17
|
+
when?: () => boolean;
|
|
18
|
+
/** Runs before the step shows (open a tab, a section); a failure leaves the step out. */
|
|
19
|
+
before?: () => void | Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
/** The words of the default card and of the screen reader's announcement. `progress` takes `{current}` and `{total}`; `announce` also `{title}`. */
|
|
22
|
+
export interface TourLabels {
|
|
23
|
+
next: string;
|
|
24
|
+
back: string;
|
|
25
|
+
done: string;
|
|
26
|
+
skip: string;
|
|
27
|
+
progress: string;
|
|
28
|
+
announce: string;
|
|
29
|
+
}
|
|
30
|
+
export type TourEndReason = "done" | "skip" | "closed";
|
|
31
|
+
/** What `end` carries: how the tour stopped, how many different steps showed, and the last one. */
|
|
32
|
+
export interface TourEnd {
|
|
33
|
+
reason: TourEndReason;
|
|
34
|
+
shown: number;
|
|
35
|
+
lastId: string | null;
|
|
36
|
+
}
|
|
37
|
+
/** The space a fixed header (`top`: its bottom edge) and a sidebar (`left`: its right edge) take. `bar` is the header itself: a target inside it needs no scroll. */
|
|
38
|
+
export interface TourChrome {
|
|
39
|
+
top: number;
|
|
40
|
+
left: number;
|
|
41
|
+
bar?: Element | null;
|
|
42
|
+
}
|
|
43
|
+
export type TourTargetResolver = (target: string, step: TourItem) => HTMLElement | null;
|
|
44
|
+
export interface Tour {
|
|
45
|
+
/** v-model:open. True starts the tour; false ends it (reason `closed`). @default false */
|
|
46
|
+
open?: boolean;
|
|
47
|
+
/** v-model:index. The step shown, from 0, counting only the steps that can show. A different value moves to that step. @default 0 */
|
|
48
|
+
index?: number;
|
|
49
|
+
steps: TourItem[];
|
|
50
|
+
/** Overrides the provider's `tour` words, word by word. */
|
|
51
|
+
labels?: Partial<TourLabels>;
|
|
52
|
+
/** Finds the element of a string target; without it a string is a CSS selector. */
|
|
53
|
+
resolveTarget?: TourTargetResolver;
|
|
54
|
+
/** The room a fixed header and sidebar take, asked each time a card is placed. */
|
|
55
|
+
chrome?: () => TourChrome;
|
|
56
|
+
/** The shade swallows clicks, so the target cannot be used mid tour. @default true */
|
|
57
|
+
blockTarget?: boolean;
|
|
58
|
+
/** How long a step waits for its target before it is left out (ms). @default 1500 */
|
|
59
|
+
anchorTimeout?: number;
|
|
60
|
+
}
|
|
61
|
+
/** What the `#card` slot gets. `index` counts from 0, `position` from 1. */
|
|
62
|
+
export interface TourCardSlot {
|
|
63
|
+
step: TourItem;
|
|
64
|
+
index: number;
|
|
65
|
+
position: number;
|
|
66
|
+
total: number;
|
|
67
|
+
last: boolean;
|
|
68
|
+
titleId: string;
|
|
69
|
+
labels: TourLabels;
|
|
70
|
+
next: () => void;
|
|
71
|
+
back: () => void;
|
|
72
|
+
skip: () => void;
|
|
73
|
+
}
|
|
@@ -43,6 +43,11 @@ export interface Switcher {
|
|
|
43
43
|
disabled?: boolean;
|
|
44
44
|
color?: ModoColor;
|
|
45
45
|
radius?: ModoRadius;
|
|
46
|
+
/**
|
|
47
|
+
* Trigger size: `xsmall` | `small` | `medium` | `large`, same heights as
|
|
48
|
+
* Button / Input / Select (32/36/40/48 px). Unset keeps the original
|
|
49
|
+
* two-line trigger; set, the trigger is a single-line control (no subtitle).
|
|
50
|
+
*/
|
|
46
51
|
size?: ModoSize;
|
|
47
52
|
ariaLabel?: string;
|
|
48
53
|
}
|