@synopackageland/ui 0.20.3 → 0.20.5
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/CHANGELOG.md +35 -0
- package/LICENSES/THIRD_PARTY.md +2 -32
- package/LICENSES/ux-foundation.md +83 -0
- package/LICENSES/ux-grid-baserow.md +35 -0
- package/LICENSES/ux-grid-teable.md +48 -0
- package/README.md +3 -0
- package/dist/components/app/app-layout/AppLayout.vue.d.ts +52 -5
- package/dist/components/app/app-layout/pageTitle.d.ts +24 -0
- package/dist/components/app/app-root/AppRoot.vue.d.ts +9 -0
- package/dist/components/app/app-tab-bar/AppTabBar.vue.d.ts +1 -1
- package/dist/components/app/aside-panel/AsidePanel.vue.d.ts +69 -0
- package/dist/components/app/aside-panel/asidePreference.d.ts +28 -0
- package/dist/components/app/section-tabs/SectionTabs.vue.d.ts +22 -4
- package/dist/components/composite/about-dialog/AboutDialog.vue.d.ts +1 -1
- package/dist/components/composite/adaptive-panel/AdaptivePanel.vue.d.ts +61 -0
- package/dist/components/composite/connection-topology/ConnectionTopology.vue.d.ts +1 -1
- package/dist/components/composite/data-grid/DataGrid.vue.d.ts +19 -1
- package/dist/components/composite/data-grid/labels.d.ts +15 -0
- package/dist/components/composite/data-grid/listLayout.d.ts +26 -0
- package/dist/components/composite/data-table/DataTable.vue.d.ts +33 -7
- package/dist/components/composite/file-picker/FilePicker.vue.d.ts +2 -2
- package/dist/components/composite/form/FormGroup.vue.d.ts +1 -1
- package/dist/components/composite/form/context.d.ts +13 -0
- package/dist/components/composite/form-actions/FormActions.vue.d.ts +6 -2
- package/dist/components/composite/mention-list/MentionList.vue.d.ts +2 -2
- package/dist/components/composite/overflow-toolbar/OverflowToolbar.vue.d.ts +2 -2
- package/dist/components/composite/record-panel/RecordPanel.vue.d.ts +91 -0
- package/dist/components/composite/record-panel/recordPanelWidth.d.ts +54 -0
- package/dist/components/composite/settings-section/SettingsSection.vue.d.ts +1 -1
- package/dist/components/composite/summary-card/SummaryCard.vue.d.ts +1 -1
- package/dist/components/composite/tag-editor/TagEditor.vue.d.ts +4 -4
- package/dist/components/composite/tree-view/TreeView.vue.d.ts +4 -4
- package/dist/components/composite/wizard/Wizard.vue.d.ts +2 -2
- package/dist/components/composite/wizard/WizardDialog.vue.d.ts +4 -4
- package/dist/components/containers/card/Card.vue.d.ts +1 -1
- package/dist/components/containers/card/CardField.vue.d.ts +26 -0
- package/dist/components/containers/card-grid/CardCover.vue.d.ts +16 -0
- package/dist/components/containers/card-grid/CardGrid.vue.d.ts +1 -1
- package/dist/components/containers/card-grid/VirtualCardGrid.vue.d.ts +71 -0
- package/dist/components/containers/expandable-item/ExpandableItem.vue.d.ts +1 -1
- package/dist/components/containers/fieldset/Fieldset.vue.d.ts +1 -1
- package/dist/components/containers/list-detail/ListDetail.vue.d.ts +6 -4
- package/dist/components/containers/split-pane/SplitPane.vue.d.ts +1 -1
- package/dist/components/feedback/notification/Notification.vue.d.ts +1 -1
- package/dist/components/feedback/notification/NotificationProvider.vue.d.ts +1 -1
- package/dist/components/feedback/validation-popup/ValidationPopup.vue.d.ts +1 -1
- package/dist/components/primitives/breadcrumb/Breadcrumb.vue.d.ts +2 -2
- package/dist/components/primitives/color-picker/ColorPicker.vue.d.ts +4 -4
- package/dist/components/primitives/combobox/Combobox.vue.d.ts +4 -4
- package/dist/components/primitives/context-menu/ContextMenu.vue.d.ts +5 -2
- package/dist/components/primitives/context-menu/ContextMenuItems.vue.d.ts +4 -5
- package/dist/components/primitives/dialog/Dialog.vue.d.ts +16 -8
- package/dist/components/primitives/dropdown-menu/DropdownMenu.vue.d.ts +7 -3
- package/dist/components/primitives/dropdown-menu/DropdownMenuItems.vue.d.ts +6 -3
- package/dist/components/primitives/dropdown-menu/DropdownMenuSheet.vue.d.ts +28 -0
- package/dist/components/primitives/input/Input.vue.d.ts +8 -1
- package/dist/components/primitives/input/Textarea.vue.d.ts +1 -1
- package/dist/components/primitives/input-steppers/InputSteppers.vue.d.ts +1 -1
- package/dist/components/primitives/motion/PushTransition.vue.d.ts +38 -0
- package/dist/components/primitives/multiple-select/MultipleSelect.vue.d.ts +4 -4
- package/dist/components/primitives/pagination/Pagination.vue.d.ts +22 -9
- package/dist/components/primitives/pagination/PaginationSheet.vue.d.ts +27 -0
- package/dist/components/primitives/pagination/labels.d.ts +6 -0
- package/dist/components/primitives/popover/Popover.vue.d.ts +11 -3
- package/dist/components/primitives/popover/floating.d.ts +27 -0
- package/dist/components/primitives/popover/overlay.d.ts +36 -0
- package/dist/components/primitives/segment-control/SegmentControl.vue.d.ts +4 -1
- package/dist/components/primitives/segment-control/context.d.ts +3 -0
- package/dist/components/primitives/select/Select.vue.d.ts +4 -0
- package/dist/components/primitives/select/internal/ComboboxField.vue.d.ts +6 -5
- package/dist/components/primitives/select/internal/SelectSheet.vue.d.ts +42 -0
- package/dist/components/primitives/select/internal/types.d.ts +2 -0
- package/dist/components/primitives/sheet/BottomSheet.vue.d.ts +69 -0
- package/dist/components/primitives/sheet/Sheet.vue.d.ts +13 -5
- package/dist/components/primitives/sheet/phone.d.ts +7 -0
- package/dist/components/primitives/skeleton/SectionSkeleton.vue.d.ts +25 -4
- package/dist/components/primitives/skeleton/Skeleton.vue.d.ts +3 -0
- package/dist/components/primitives/superbox-select/SuperboxSelect.vue.d.ts +4 -4
- package/dist/components/primitives/tag/Tag.vue.d.ts +2 -2
- package/dist/components/primitives/toast/ToastProvider.vue.d.ts +0 -2
- package/dist/components/primitives/toast/toast.d.ts +21 -1
- package/dist/components/primitives/tooltip/Tooltip.vue.d.ts +8 -3
- package/dist/components/primitives/tooltip/tooltipStyle.d.ts +11 -1
- package/dist/components/rich-text-editor/RichTextEditor.vue.d.ts +1 -1
- package/dist/composables/backDismiss.d.ts +19 -0
- package/dist/composables/formControl.d.ts +18 -0
- package/dist/composables/phone.d.ts +8 -0
- package/dist/composables/phoneSurface.d.ts +35 -0
- package/dist/composables/softKeyboard.d.ts +26 -4
- package/dist/composables/visualViewport.d.ts +31 -0
- package/dist/dnd/autoScroll.d.ts +57 -0
- package/dist/dnd/dragKit.d.ts +111 -0
- package/dist/dnd/index.d.ts +4 -0
- package/dist/dnd/layout.d.ts +57 -0
- package/dist/dnd/vue.d.ts +16 -0
- package/dist/feedback/StatusSlot.vue.d.ts +24 -0
- package/dist/feedback/showAfter.d.ts +15 -0
- package/dist/feedback/stackMotion.d.ts +13 -0
- package/dist/feedback/timing.d.ts +23 -0
- package/dist/grid/cells/draw.d.ts +57 -0
- package/dist/grid/cells/images.d.ts +5 -0
- package/dist/grid/cells/index.d.ts +7 -0
- package/dist/grid/cells/number.d.ts +5 -0
- package/dist/grid/cells/registry.d.ts +56 -0
- package/dist/grid/cells/renderers.d.ts +8 -0
- package/dist/grid/cells/status.d.ts +6 -0
- package/dist/grid/cells/types.d.ts +200 -0
- package/dist/grid/cells/use.d.ts +7 -0
- package/dist/grid/clipboard/copy.d.ts +17 -0
- package/dist/grid/clipboard/index.d.ts +4 -0
- package/dist/grid/clipboard/proposal.d.ts +35 -0
- package/dist/grid/clipboard/tsv.d.ts +14 -0
- package/dist/grid/clipboard/write.d.ts +21 -0
- package/dist/grid/contracts.d.ts +200 -0
- package/dist/grid/edit/cell-status.d.ts +33 -0
- package/dist/grid/edit/edit-session.d.ts +97 -0
- package/dist/grid/edit/use-grid-edit.d.ts +48 -0
- package/dist/grid/focus/editor-style.d.ts +67 -0
- package/dist/grid/host/GridHost.vue.d.ts +137 -0
- package/dist/grid/host/controller.d.ts +219 -0
- package/dist/grid/host/dom.d.ts +10 -0
- package/dist/grid/index.d.ts +8 -0
- package/dist/grid/range/block.d.ts +30 -0
- package/dist/grid/range/fill.d.ts +27 -0
- package/dist/grid/range/index.d.ts +2 -0
- package/dist/grid/theme.d.ts +61 -0
- package/dist/grid-core/auto-scroll.d.ts +67 -0
- package/dist/grid-core/column-resize.d.ts +43 -0
- package/dist/grid-core/config.d.ts +39 -0
- package/dist/grid-core/coordinate.d.ts +64 -0
- package/dist/grid-core/drag.d.ts +46 -0
- package/dist/grid-core/freeze.d.ts +11 -0
- package/dist/grid-core/index.d.ts +17 -0
- package/dist/grid-core/keyboard.d.ts +34 -0
- package/dist/grid-core/keys.d.ts +38 -0
- package/dist/grid-core/lru.d.ts +10 -0
- package/dist/grid-core/range.d.ts +28 -0
- package/dist/grid-core/region.d.ts +73 -0
- package/dist/grid-core/renderer/base.d.ts +92 -0
- package/dist/grid-core/renderer/layout.d.ts +129 -0
- package/dist/grid-core/selection-controller.d.ts +62 -0
- package/dist/grid-core/selection.d.ts +35 -0
- package/dist/grid-core/theme.d.ts +81 -0
- package/dist/grid-core/types.d.ts +178 -0
- package/dist/grid.js +6272 -0
- package/dist/i18n/text.d.ts +17 -0
- package/dist/index.d.ts +39 -4
- package/dist/index.js +23037 -14390
- package/dist/interaction/editSession.d.ts +49 -0
- package/dist/interaction/focus.d.ts +28 -0
- package/dist/interaction/gesture.d.ts +49 -0
- package/dist/interaction/ime.d.ts +55 -0
- package/dist/interaction/index.d.ts +6 -0
- package/dist/interaction/outside.d.ts +40 -0
- package/dist/interaction/vue.d.ts +21 -0
- package/dist/json-ai-prompt.md +1 -1
- package/dist/json-preview/preview.js +16780 -11595
- package/dist/json.js +10 -10
- package/dist/lib/adaptiveLayout.d.ts +32 -2
- package/dist/lib/deviceViewport.d.ts +2 -1
- package/dist/lib/motion.d.ts +12 -0
- package/dist/reka-runtime.json +15 -12
- package/dist/rich-text.js +1 -1
- package/dist/theme.css +1 -1
- package/dist/themes/dsm7-embedded-reset.css +1 -1
- package/dist/themes/dsm7-embedded-theme.css +1 -1
- package/dist/themes/dsm7-embedded.css +1 -1
- package/dist/themes/dsm7.css +1 -1
- package/dist/virtual/cardHeight.d.ts +39 -0
- package/dist/virtual/galleryColumns.d.ts +11 -0
- package/dist/virtual/layoutMotion.d.ts +30 -0
- package/docs/adaptive-layout.md +148 -25
- package/docs/app-local-modal.md +1 -1
- package/docs/callout.md +22 -1
- package/docs/layout-rules.md +14 -0
- package/docs/list-detail.md +60 -0
- package/docs/mobile-native.md +502 -0
- package/docs/release-checks.md +28 -0
- package/docs/theme-hooks.md +28 -7
- package/docs/ux-foundation.md +133 -0
- package/docs/ux-grid.md +217 -0
- package/package.json +100 -2
|
@@ -29,7 +29,8 @@ type __VLS_Props = {
|
|
|
29
29
|
showTotal?: boolean;
|
|
30
30
|
/** Page-size choices; `false` hides the selector. Bind `v-model:page-size` to follow it. */
|
|
31
31
|
itemsPerPage?: false | PaginationPageSizeOption[];
|
|
32
|
-
|
|
32
|
+
/** `phone` is the `‹ Page 1 of N ›` pager with its page sheet; an app 640px or narrower uses it whatever the mode. */
|
|
33
|
+
mode?: 'normal' | 'less' | 'phone';
|
|
33
34
|
hasFirstBtn?: boolean;
|
|
34
35
|
hasLastBtn?: boolean;
|
|
35
36
|
/** Unknown total: no page numbers and no totals, only previous/next. */
|
|
@@ -54,13 +55,25 @@ declare var __VLS_1: {
|
|
|
54
55
|
pageCount: number;
|
|
55
56
|
start: number;
|
|
56
57
|
end: number;
|
|
57
|
-
},
|
|
58
|
+
}, __VLS_33: {}, __VLS_48: {}, __VLS_58: {
|
|
59
|
+
total: number;
|
|
60
|
+
page: number;
|
|
61
|
+
pageCount: number;
|
|
62
|
+
start: number;
|
|
63
|
+
end: number;
|
|
64
|
+
}, __VLS_116: {}, __VLS_138: {};
|
|
58
65
|
type __VLS_Slots = {} & {
|
|
59
66
|
total?: (props: typeof __VLS_1) => any;
|
|
60
67
|
} & {
|
|
61
|
-
right?: (props: typeof
|
|
68
|
+
right?: (props: typeof __VLS_33) => any;
|
|
69
|
+
} & {
|
|
70
|
+
'right-wrapper'?: (props: typeof __VLS_48) => any;
|
|
71
|
+
} & {
|
|
72
|
+
total?: (props: typeof __VLS_58) => any;
|
|
73
|
+
} & {
|
|
74
|
+
right?: (props: typeof __VLS_116) => any;
|
|
62
75
|
} & {
|
|
63
|
-
'right-wrapper'?: (props: typeof
|
|
76
|
+
'right-wrapper'?: (props: typeof __VLS_138) => any;
|
|
64
77
|
};
|
|
65
78
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
66
79
|
focusPrevious: () => void;
|
|
@@ -80,23 +93,23 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
|
80
93
|
}>, {
|
|
81
94
|
modelValue: number;
|
|
82
95
|
end: string | number;
|
|
83
|
-
mode: "normal" | "less";
|
|
96
|
+
mode: "normal" | "less" | "phone";
|
|
84
97
|
labels: Partial<PaginationLabels>;
|
|
85
98
|
start: string | number;
|
|
99
|
+
hasNext: boolean;
|
|
86
100
|
refresh: boolean;
|
|
87
|
-
|
|
101
|
+
endless: boolean;
|
|
88
102
|
pageSize: number;
|
|
89
|
-
|
|
103
|
+
itemsPerPage: false | PaginationPageSizeOption[];
|
|
104
|
+
total: string | number;
|
|
90
105
|
hasPrev: boolean;
|
|
91
106
|
selectedCount: string | number;
|
|
92
107
|
filteredCount: string | number;
|
|
93
108
|
switchPage: boolean;
|
|
94
109
|
pageShiftUnit: number;
|
|
95
110
|
showTotal: boolean;
|
|
96
|
-
itemsPerPage: false | PaginationPageSizeOption[];
|
|
97
111
|
hasFirstBtn: boolean;
|
|
98
112
|
hasLastBtn: boolean;
|
|
99
|
-
endless: boolean;
|
|
100
113
|
autoLess: boolean;
|
|
101
114
|
lessWidth: number;
|
|
102
115
|
maxPageButtons: number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
page: number;
|
|
4
|
+
pageCount: number;
|
|
5
|
+
/** Unknown total: no page field, only the sizes. */
|
|
6
|
+
endless: boolean;
|
|
7
|
+
pageSize: number;
|
|
8
|
+
sizes: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
title: string;
|
|
13
|
+
hint: string;
|
|
14
|
+
go: string;
|
|
15
|
+
itemsPerPage: string;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
"update:open": (open: boolean) => any;
|
|
19
|
+
page: (page: number) => any;
|
|
20
|
+
pageSize: (value: string) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
23
|
+
onPage?: ((page: number) => any) | undefined;
|
|
24
|
+
onPageSize?: ((value: string) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -12,6 +12,12 @@ export type PaginationLabels = {
|
|
|
12
12
|
/** Accessible name of an inactive page button. */
|
|
13
13
|
goToPage: (page: number) => string;
|
|
14
14
|
itemsPerPage: string;
|
|
15
|
+
/** The phone pager's middle label, `Page 1 of 24`; it opens the page sheet. */
|
|
16
|
+
pageOf: (page: number, pageCount: number) => string;
|
|
17
|
+
/** Title of the phone page sheet and its page field. */
|
|
18
|
+
goToPageTitle: string;
|
|
19
|
+
/** The page sheet's confirm button. */
|
|
20
|
+
go: string;
|
|
15
21
|
/** Templates for `totalTextMode`; `{total}`, `{start}`, `{end}`, `{filteredCount}` and `{selectedCount}` are replaced. */
|
|
16
22
|
totalText: Record<PaginationTotalTextMode, string>;
|
|
17
23
|
};
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
+
import { OverlayMotion } from './overlay';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
/** Controlled open state (`v-model:open`), so the caller can close it after a pick or open it from elsewhere. */
|
|
3
4
|
open?: boolean;
|
|
4
5
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
5
6
|
align?: 'start' | 'center' | 'end';
|
|
6
7
|
width?: string;
|
|
8
|
+
/** `none` drops the open and close motion (a grid editor's list); inherits `provideOverlayMotion`. */
|
|
9
|
+
motion?: OverlayMotion;
|
|
7
10
|
};
|
|
8
|
-
declare var __VLS_16: {},
|
|
11
|
+
declare var __VLS_16: {}, __VLS_34: {};
|
|
9
12
|
type __VLS_Slots = {} & {
|
|
10
13
|
trigger?: (props: typeof __VLS_16) => any;
|
|
11
14
|
} & {
|
|
12
|
-
default?: (props: typeof
|
|
15
|
+
default?: (props: typeof __VLS_34) => any;
|
|
13
16
|
};
|
|
14
17
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
openAutoFocus: (event: Event) => any;
|
|
19
|
+
closeAutoFocus: (event: Event) => any;
|
|
15
20
|
"update:open": (value: boolean) => any;
|
|
16
21
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
23
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
17
24
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
25
|
}>, {
|
|
26
|
+
open: boolean;
|
|
19
27
|
width: string;
|
|
20
28
|
side: "top" | "right" | "bottom" | "left";
|
|
21
29
|
align: "start" | "center" | "end";
|
|
22
|
-
|
|
30
|
+
motion: OverlayMotion;
|
|
23
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
25
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** Room kept between a popup and the edge of its boundary. */
|
|
3
|
+
export declare const FLOATING_GAP = 8;
|
|
4
|
+
/** The largest a popup may be: the room floating-ui found next to its anchor. */
|
|
5
|
+
export declare const FLOATING_SIZE_CLASS = "max-w-[var(--reka-popper-available-width)] max-h-[var(--reka-popper-available-height)]";
|
|
6
|
+
export interface FloatingPadding {
|
|
7
|
+
top: number;
|
|
8
|
+
right: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
}
|
|
12
|
+
/** 8px from each edge plus the safe area, and the soft keyboard at the bottom, as seen from `anchor`. */
|
|
13
|
+
export declare function floatingPadding(anchor: Element | null | undefined): FloatingPadding;
|
|
14
|
+
/**
|
|
15
|
+
* The collision props for a popup anchored at `anchor`, while `open`. The
|
|
16
|
+
* padding is read when it opens and again when the visual viewport changes
|
|
17
|
+
* (the keyboard opens or closes, the phone turns).
|
|
18
|
+
*/
|
|
19
|
+
export declare function useFloating(anchor: MaybeRefOrGetter<HTMLElement | null | undefined>, open: () => boolean): import('vue').ComputedRef<{
|
|
20
|
+
avoidCollisions: boolean;
|
|
21
|
+
collisionBoundary: HTMLElement | HTMLElement[];
|
|
22
|
+
collisionPadding: FloatingPadding;
|
|
23
|
+
sticky: "partial";
|
|
24
|
+
hideWhenDetached: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
/** True on a touch-first device (no fine pointer), where a tap stands in for hover. */
|
|
27
|
+
export declare function coarsePointer(): boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** `none`: the surface appears and leaves on the same frame (a grid editor's select, date or person list). */
|
|
3
|
+
export type OverlayMotion = 'auto' | 'none';
|
|
4
|
+
/** Popups opened inside this component (a grid cell editor) take `motion` unless they set their own. */
|
|
5
|
+
export declare function provideOverlayMotion(motion: MaybeRefOrGetter<OverlayMotion>): void;
|
|
6
|
+
/** The motion a popup uses: its own prop, else the nearest scope, else `auto`. */
|
|
7
|
+
export declare function useOverlayMotion(own: () => OverlayMotion | undefined): () => OverlayMotion;
|
|
8
|
+
/**
|
|
9
|
+
* True while an input method owns Escape: during composition, or the first
|
|
10
|
+
* Escape right after it ends (Safari sends compositionend first). One guard
|
|
11
|
+
* per window, kept for the window's life.
|
|
12
|
+
*/
|
|
13
|
+
export declare function imeOwnsEscape(event: KeyboardEvent): boolean;
|
|
14
|
+
/** For a Reka `escapeKeyDown`: an Escape that cancels a composition never closes the surface. */
|
|
15
|
+
export declare function keepEscapeForIme(event: KeyboardEvent): void;
|
|
16
|
+
/**
|
|
17
|
+
* Joins an open popup to the interaction core's layer stack, so Escape closes
|
|
18
|
+
* only the topmost surface (a popup opened from a record panel or a grid
|
|
19
|
+
* editor closes before them) and a press inside the popup is never outside
|
|
20
|
+
* them. Returns the attributes for the popup's content element.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useOverlayLayer(open: () => boolean, close: () => void): {
|
|
23
|
+
'data-ui-layer': string;
|
|
24
|
+
"data-ui-ignore-outside": string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* For a Reka `pointerDownOutside` / `interactOutside`: a press or focus inside
|
|
28
|
+
* a portal marked `data-ui-ignore-outside` (a grid editor, a popup another
|
|
29
|
+
* surface opened) belongs to that surface and never dismisses this one.
|
|
30
|
+
*/
|
|
31
|
+
export declare function keepForIgnoredPortal(event: Event): void;
|
|
32
|
+
/**
|
|
33
|
+
* For a Reka `openAutoFocus`: with a coarse pointer the surface takes no
|
|
34
|
+
* initial focus (interaction-spec §14), so a soft keyboard does not cover it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function skipAutoFocusOnTouch(event: Event): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SegmentVariant } from './context';
|
|
1
|
+
import { SegmentSize, SegmentVariant } from './context';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** Selected item value. */
|
|
4
4
|
modelValue?: string;
|
|
@@ -10,6 +10,8 @@ type __VLS_Props = {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
/** Toolbar view switcher; use RadioGroup for form choices. `sheet` draws joined tabs on a rule. */
|
|
12
12
|
variant?: SegmentVariant;
|
|
13
|
+
/** `sm` draws a 32px track of 24px tabs (12px labels), the selected one raised on the surface, for a panel's surface switch. Only for `variant="segment"`. */
|
|
14
|
+
size?: SegmentSize;
|
|
13
15
|
};
|
|
14
16
|
declare var __VLS_1: {};
|
|
15
17
|
type __VLS_Slots = {} & {
|
|
@@ -22,6 +24,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
22
24
|
onChange?: ((value: string) => any) | undefined;
|
|
23
25
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
24
26
|
}>, {
|
|
27
|
+
size: SegmentSize;
|
|
25
28
|
variant: SegmentVariant;
|
|
26
29
|
disabled: boolean;
|
|
27
30
|
modelValue: string;
|
|
@@ -8,10 +8,13 @@ export type SegmentItemHandle = {
|
|
|
8
8
|
export type SegmentMove = 'previous' | 'next' | 'first' | 'last';
|
|
9
9
|
/** `segment`: a segmented control; `sheet`: joined sheet tabs on a rule, the selected one open to the content below. */
|
|
10
10
|
export type SegmentVariant = 'segment' | 'sheet';
|
|
11
|
+
/** `md`: the toolbar switch; `sm`: a 32px track of 24px tabs that switches the surfaces of a panel (an aside's tabs). */
|
|
12
|
+
export type SegmentSize = 'md' | 'sm';
|
|
11
13
|
export type SegmentControlContext = {
|
|
12
14
|
selected: Ref<string>;
|
|
13
15
|
groupDisabled: Ref<boolean>;
|
|
14
16
|
variant: Ref<SegmentVariant>;
|
|
17
|
+
size: Ref<SegmentSize>;
|
|
15
18
|
select: (value: string) => void;
|
|
16
19
|
register: (handle: SegmentItemHandle) => void;
|
|
17
20
|
unregister: (handle: SegmentItemHandle) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SelectOptions, SelectSearch } from './internal/types';
|
|
2
|
+
import { OverlayMotion } from '../popover/overlay';
|
|
2
3
|
export type SelectOption = {
|
|
3
4
|
label: string;
|
|
4
5
|
value: string;
|
|
@@ -15,6 +16,8 @@ type __VLS_Props = {
|
|
|
15
16
|
searchPlaceholder?: string;
|
|
16
17
|
notFoundText?: string;
|
|
17
18
|
loadingText?: string;
|
|
19
|
+
/** `none` drops the list's open and close motion (a grid editor); inherits `provideOverlayMotion`. */
|
|
20
|
+
motion?: OverlayMotion;
|
|
18
21
|
};
|
|
19
22
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
23
|
"update:modelValue": (value: string) => any;
|
|
@@ -26,6 +29,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
29
|
options: SelectOptions;
|
|
27
30
|
minSearchChar: number;
|
|
28
31
|
caseSensitive: boolean;
|
|
32
|
+
motion: OverlayMotion;
|
|
29
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
34
|
declare const _default: typeof __VLS_export;
|
|
31
35
|
export default _default;
|
|
@@ -2,21 +2,21 @@ import { SelectFieldProps, SelectOption } from './types';
|
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<SelectFieldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
3
|
select: (option: SelectOption) => any;
|
|
4
4
|
blur: (event: FocusEvent) => any;
|
|
5
|
+
focus: (event: FocusEvent) => any;
|
|
5
6
|
invalid: (text: string) => any;
|
|
6
7
|
"update:modelValue": (value: string | string[]) => any;
|
|
7
|
-
focus: (event: FocusEvent) => any;
|
|
8
|
-
"update:loading": (loading: boolean) => any;
|
|
9
8
|
create: (value: string) => any;
|
|
9
|
+
"update:loading": (loading: boolean) => any;
|
|
10
10
|
"open-dropdown": () => any;
|
|
11
11
|
"close-dropdown": () => any;
|
|
12
12
|
}, string, import('vue').PublicProps, Readonly<SelectFieldProps> & Readonly<{
|
|
13
13
|
onSelect?: ((option: SelectOption) => any) | undefined;
|
|
14
14
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
15
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
15
16
|
onInvalid?: ((text: string) => any) | undefined;
|
|
16
17
|
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
17
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
18
|
-
"onUpdate:loading"?: ((loading: boolean) => any) | undefined;
|
|
19
18
|
onCreate?: ((value: string) => any) | undefined;
|
|
19
|
+
"onUpdate:loading"?: ((loading: boolean) => any) | undefined;
|
|
20
20
|
"onOpen-dropdown"?: (() => any) | undefined;
|
|
21
21
|
"onClose-dropdown"?: (() => any) | undefined;
|
|
22
22
|
}>, {
|
|
@@ -28,9 +28,10 @@ declare const __VLS_export: import('vue').DefineComponent<SelectFieldProps, {},
|
|
|
28
28
|
ariaLabelledby: string;
|
|
29
29
|
defaultValue: string | string[];
|
|
30
30
|
options: import('./types').SelectOptions;
|
|
31
|
+
multiple: boolean;
|
|
31
32
|
minSearchChar: number;
|
|
32
33
|
caseSensitive: boolean;
|
|
33
|
-
|
|
34
|
+
motion: "auto" | "none";
|
|
34
35
|
allowCreate: import('./types').SelectAllowCreate;
|
|
35
36
|
editable: boolean;
|
|
36
37
|
clearable: boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SelectGroup } from './options';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
groups: SelectGroup[];
|
|
6
|
+
/** The chosen value, or values with `multiple`. */
|
|
7
|
+
value?: string | string[];
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
/** Shows the search field. */
|
|
10
|
+
search?: boolean;
|
|
11
|
+
query?: string;
|
|
12
|
+
searchPlaceholder?: string;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
loadingText?: string;
|
|
15
|
+
notFoundText?: string;
|
|
16
|
+
/** A last row that adds what was typed, e.g. `Add "Lisbon"`. */
|
|
17
|
+
createText?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
"update:open": (value: boolean) => any;
|
|
21
|
+
"update:query": (value: string) => any;
|
|
22
|
+
pick: (value: string) => any;
|
|
23
|
+
create: () => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
26
|
+
"onUpdate:query"?: ((value: string) => any) | undefined;
|
|
27
|
+
onPick?: ((value: string) => any) | undefined;
|
|
28
|
+
onCreate?: (() => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
search: boolean;
|
|
31
|
+
title: string;
|
|
32
|
+
loading: boolean;
|
|
33
|
+
value: string | string[];
|
|
34
|
+
multiple: boolean;
|
|
35
|
+
query: string;
|
|
36
|
+
searchPlaceholder: string;
|
|
37
|
+
loadingText: string;
|
|
38
|
+
notFoundText: string;
|
|
39
|
+
createText: string;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
declare const _default: typeof __VLS_export;
|
|
42
|
+
export default _default;
|
|
@@ -41,4 +41,6 @@ export type SelectFieldProps = {
|
|
|
41
41
|
openLabel?: string;
|
|
42
42
|
clearLabel?: string;
|
|
43
43
|
removeTagLabel?: (label: string) => string;
|
|
44
|
+
/** `none` drops the list's open and close motion (a grid editor); inherits `provideOverlayMotion`. */
|
|
45
|
+
motion?: 'auto' | 'none';
|
|
44
46
|
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** `auto` fits the content up to 92%; `large` is 92% (a strip of the page stays, a tap there closes); `full` fills the screen. Any other value is a CSS height, capped at 92%. */
|
|
2
|
+
export type BottomSheetHeight = 'auto' | 'large' | 'full' | (string & {});
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
height?: BottomSheetHeight;
|
|
9
|
+
/** Resting points as fractions of the screen (or px), e.g. `[0.5, 0.92]`. */
|
|
10
|
+
snapPoints?: (number | string)[];
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
showClose?: boolean;
|
|
13
|
+
/** `false` keeps the sheet open on a press outside it. */
|
|
14
|
+
closeOnOutside?: boolean;
|
|
15
|
+
/** `false` leaves the page usable behind the sheet: no scrim, scroll lock or focus trap. */
|
|
16
|
+
modal?: boolean;
|
|
17
|
+
/** The mask behind: `dim` (default), `light` or `none`. */
|
|
18
|
+
scrim?: 'dim' | 'light' | 'none';
|
|
19
|
+
/** Drops the body's padding and scrolling, for content that scrolls itself. */
|
|
20
|
+
flush?: boolean;
|
|
21
|
+
/** Asks "Discard changes?" before a swipe, Back, Escape, an outside press or the close button closes it (set while a form is dirty). */
|
|
22
|
+
confirmClose?: boolean;
|
|
23
|
+
/** Whether Back closes the sheet. Default: on a phone. */
|
|
24
|
+
backDismiss?: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare var __VLS_16: {}, __VLS_71: {}, __VLS_90: {}, __VLS_98: {};
|
|
27
|
+
type __VLS_Slots = {} & {
|
|
28
|
+
trigger?: (props: typeof __VLS_16) => any;
|
|
29
|
+
} & {
|
|
30
|
+
header?: (props: typeof __VLS_71) => any;
|
|
31
|
+
} & {
|
|
32
|
+
default?: (props: typeof __VLS_90) => any;
|
|
33
|
+
} & {
|
|
34
|
+
footer?: (props: typeof __VLS_98) => any;
|
|
35
|
+
};
|
|
36
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
37
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
38
|
+
pointerDownOutside: (event: Event) => any;
|
|
39
|
+
interactOutside: (event: Event) => any;
|
|
40
|
+
openAutoFocus: (event: Event) => any;
|
|
41
|
+
closeAutoFocus: (event: Event) => any;
|
|
42
|
+
"update:open": (value: boolean) => any;
|
|
43
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
44
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
45
|
+
onPointerDownOutside?: ((event: Event) => any) | undefined;
|
|
46
|
+
onInteractOutside?: ((event: Event) => any) | undefined;
|
|
47
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
48
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
49
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
height: BottomSheetHeight;
|
|
52
|
+
open: boolean;
|
|
53
|
+
flush: boolean;
|
|
54
|
+
defaultOpen: boolean;
|
|
55
|
+
modal: boolean;
|
|
56
|
+
showClose: boolean;
|
|
57
|
+
closeOnOutside: boolean;
|
|
58
|
+
scrim: "dim" | "light" | "none";
|
|
59
|
+
confirmClose: boolean;
|
|
60
|
+
backDismiss: boolean;
|
|
61
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
62
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
63
|
+
declare const _default: typeof __VLS_export;
|
|
64
|
+
export default _default;
|
|
65
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -2,7 +2,9 @@ type SheetSide = 'left' | 'right' | 'top' | 'bottom';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
open?: boolean;
|
|
4
4
|
defaultOpen?: boolean;
|
|
5
|
+
/** `bottom` is the BottomSheet: a grabber, swipe down to close, keyboard aware. */
|
|
5
6
|
side?: SheetSide;
|
|
7
|
+
/** The width of a side sheet, or the height of a top or bottom one. Without it a bottom sheet fits its content. */
|
|
6
8
|
size?: string;
|
|
7
9
|
title?: string;
|
|
8
10
|
description?: string;
|
|
@@ -16,13 +18,19 @@ type __VLS_Props = {
|
|
|
16
18
|
/** Whether a press outside closes the sheet. Defaults to `modal`: a non-modal sheet stays while the page behind is used. */
|
|
17
19
|
closeOnOutside?: boolean;
|
|
18
20
|
};
|
|
19
|
-
declare var
|
|
21
|
+
declare var __VLS_15: {}, __VLS_17: {}, __VLS_20: {}, __VLS_35: {}, __VLS_83: {}, __VLS_91: {};
|
|
20
22
|
type __VLS_Slots = {} & {
|
|
21
|
-
trigger?: (props: typeof
|
|
23
|
+
trigger?: (props: typeof __VLS_15) => any;
|
|
22
24
|
} & {
|
|
23
|
-
default?: (props: typeof
|
|
25
|
+
default?: (props: typeof __VLS_17) => any;
|
|
24
26
|
} & {
|
|
25
|
-
footer?: (props: typeof
|
|
27
|
+
footer?: (props: typeof __VLS_20) => any;
|
|
28
|
+
} & {
|
|
29
|
+
trigger?: (props: typeof __VLS_35) => any;
|
|
30
|
+
} & {
|
|
31
|
+
default?: (props: typeof __VLS_83) => any;
|
|
32
|
+
} & {
|
|
33
|
+
footer?: (props: typeof __VLS_91) => any;
|
|
26
34
|
};
|
|
27
35
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
36
|
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
@@ -40,9 +48,9 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
40
48
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
41
49
|
}>, {
|
|
42
50
|
size: string;
|
|
51
|
+
open: boolean;
|
|
43
52
|
side: SheetSide;
|
|
44
53
|
defaultOpen: boolean;
|
|
45
|
-
open: boolean;
|
|
46
54
|
modal: boolean;
|
|
47
55
|
closeOnOutside: boolean;
|
|
48
56
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* True when the surface opens on a phone: the app's container is 640px or
|
|
4
|
+
* narrower (AppRoot/AppLayout presentation `mobile`). Outside an app root the
|
|
5
|
+
* viewport width decides instead. Call it in a component's setup.
|
|
6
|
+
*/
|
|
7
|
+
export declare function usePhonePresentation(): ComputedRef<boolean>;
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
variant?: 'lines' | 'figures' | 'rows';
|
|
2
|
+
variant?: 'lines' | 'figures' | 'rows' | 'grid' | 'cards' | 'fields';
|
|
3
3
|
/** The number of lines (`lines`). */
|
|
4
4
|
lines?: number;
|
|
5
|
-
/** The number of figures
|
|
5
|
+
/** The number of figures, rows, cards or fields. */
|
|
6
6
|
count?: number;
|
|
7
|
+
/** A row's height (`rows`, `grid`); a grid defaults to `--ui-grid-row-height`. */
|
|
8
|
+
rowHeight?: string;
|
|
9
|
+
/** `grid`: the number of equal columns, or each column's CSS width (`auto` takes the rest). */
|
|
10
|
+
columns?: number | readonly string[];
|
|
11
|
+
/** `grid`: false leaves out the header row. */
|
|
12
|
+
header?: boolean;
|
|
13
|
+
/** `cards`: a card's height, as the real card computes it. */
|
|
14
|
+
cardHeight?: string;
|
|
15
|
+
/** `cards`: the CardGrid's `minItemWidth`, `gap` and `fit`. */
|
|
16
|
+
cardMinWidth?: string;
|
|
17
|
+
gap?: string;
|
|
18
|
+
fit?: 'stretch' | 'fill';
|
|
19
|
+
/** Milliseconds before the shapes show; the reserved box shows at once. */
|
|
20
|
+
delay?: number;
|
|
7
21
|
};
|
|
8
22
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
-
|
|
10
|
-
|
|
23
|
+
header: boolean;
|
|
24
|
+
variant: "lines" | "figures" | "rows" | "grid" | "cards" | "fields";
|
|
25
|
+
delay: number;
|
|
11
26
|
count: number;
|
|
27
|
+
gap: string;
|
|
28
|
+
fit: "stretch" | "fill";
|
|
29
|
+
lines: number;
|
|
30
|
+
columns: number | readonly string[];
|
|
31
|
+
cardHeight: string;
|
|
32
|
+
cardMinWidth: string;
|
|
12
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
34
|
declare const _default: typeof __VLS_export;
|
|
14
35
|
export default _default;
|
|
@@ -2,11 +2,14 @@ type __VLS_Props = {
|
|
|
2
2
|
width?: string;
|
|
3
3
|
height?: string;
|
|
4
4
|
radius?: string;
|
|
5
|
+
/** False for a still shape, as a grid placeholder is. */
|
|
6
|
+
pulse?: boolean;
|
|
5
7
|
};
|
|
6
8
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
9
|
height: string;
|
|
8
10
|
width: string;
|
|
9
11
|
radius: string;
|
|
12
|
+
pulse: boolean;
|
|
10
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -6,21 +6,21 @@ type __VLS_Props = Omit<SelectFieldProps, 'multiple' | 'modelValue' | 'defaultVa
|
|
|
6
6
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
7
|
select: (option: SelectOption) => any;
|
|
8
8
|
blur: (event: FocusEvent) => any;
|
|
9
|
+
focus: (event: FocusEvent) => any;
|
|
9
10
|
invalid: (text: string) => any;
|
|
10
11
|
"update:modelValue": (value: string[]) => any;
|
|
11
|
-
focus: (event: FocusEvent) => any;
|
|
12
|
-
"update:loading": (loading: boolean) => any;
|
|
13
12
|
create: (value: string) => any;
|
|
13
|
+
"update:loading": (loading: boolean) => any;
|
|
14
14
|
"open-dropdown": () => any;
|
|
15
15
|
"close-dropdown": () => any;
|
|
16
16
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
17
|
onSelect?: ((option: SelectOption) => any) | undefined;
|
|
18
18
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
19
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
19
20
|
onInvalid?: ((text: string) => any) | undefined;
|
|
20
21
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
21
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
22
|
-
"onUpdate:loading"?: ((loading: boolean) => any) | undefined;
|
|
23
22
|
onCreate?: ((value: string) => any) | undefined;
|
|
23
|
+
"onUpdate:loading"?: ((loading: boolean) => any) | undefined;
|
|
24
24
|
"onOpen-dropdown"?: (() => any) | undefined;
|
|
25
25
|
"onClose-dropdown"?: (() => any) | undefined;
|
|
26
26
|
}>, {
|
|
@@ -37,11 +37,11 @@ type __VLS_Slots = {} & {
|
|
|
37
37
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
38
38
|
measure: typeof measure;
|
|
39
39
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
40
|
-
remove: () => any;
|
|
41
40
|
click: (event: MouseEvent | KeyboardEvent) => any;
|
|
41
|
+
remove: () => any;
|
|
42
42
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
43
|
-
onRemove?: (() => any) | undefined;
|
|
44
43
|
onClick?: ((event: MouseEvent | KeyboardEvent) => any) | undefined;
|
|
44
|
+
onRemove?: (() => any) | undefined;
|
|
45
45
|
}>, {
|
|
46
46
|
label: string;
|
|
47
47
|
disabled: boolean;
|
|
@@ -4,7 +4,6 @@ type __VLS_Props = {
|
|
|
4
4
|
announcementLabel?: string;
|
|
5
5
|
viewportLabel?: string;
|
|
6
6
|
closeLabel?: string;
|
|
7
|
-
duration?: number;
|
|
8
7
|
swipeDirection?: 'right' | 'left' | 'up' | 'down';
|
|
9
8
|
};
|
|
10
9
|
declare var __VLS_8: {};
|
|
@@ -12,7 +11,6 @@ type __VLS_Slots = {} & {
|
|
|
12
11
|
default?: (props: typeof __VLS_8) => any;
|
|
13
12
|
};
|
|
14
13
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, ToastController, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
-
duration: number;
|
|
16
14
|
swipeDirection: "right" | "left" | "up" | "down";
|
|
17
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
|
-
|
|
2
|
+
import { FeedbackTone } from '../../../feedback/timing';
|
|
3
|
+
export type ToastTone = FeedbackTone;
|
|
3
4
|
export type ToastOptions = {
|
|
4
5
|
title: string;
|
|
5
6
|
description?: string;
|
|
6
7
|
tone?: ToastTone;
|
|
8
|
+
/**
|
|
9
|
+
* Work in progress ("Deleting"): a spinner, no timer, and nothing shown
|
|
10
|
+
* unless it is still pending after 300 ms. Turn it into the result with
|
|
11
|
+
* `update` on the same id.
|
|
12
|
+
*/
|
|
13
|
+
pending?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Milliseconds it stays. By default success 3 s, info and warning 5 s, at
|
|
16
|
+
* least 5 s with an action, and danger until closed.
|
|
17
|
+
*/
|
|
7
18
|
duration?: number;
|
|
19
|
+
/** One action (Undo, Retry). A click runs `onAction` and closes the toast, unless `onAction` updated it. */
|
|
8
20
|
actionLabel?: string;
|
|
9
21
|
onAction?: () => void;
|
|
10
22
|
};
|
|
@@ -14,12 +26,20 @@ export type ToastMessage = ToastOptions & {
|
|
|
14
26
|
};
|
|
15
27
|
export type ToastController = {
|
|
16
28
|
show: (options: ToastOptions | string) => number;
|
|
29
|
+
/**
|
|
30
|
+
* Replaces what toast `id` says, in place: a pending toast becomes its
|
|
31
|
+
* result, an error becomes pending again on Retry. False when that toast
|
|
32
|
+
* has already closed.
|
|
33
|
+
*/
|
|
34
|
+
update: (id: number, options: ToastOptions | string) => boolean;
|
|
17
35
|
dismiss: (id: number) => void;
|
|
18
36
|
clear: () => void;
|
|
19
37
|
info: (title: string, description?: string) => number;
|
|
20
38
|
success: (title: string, description?: string) => number;
|
|
21
39
|
warning: (title: string, description?: string) => number;
|
|
22
40
|
danger: (title: string, description?: string) => number;
|
|
41
|
+
/** A pending toast; see ToastOptions.pending. */
|
|
42
|
+
pending: (title: string, description?: string) => number;
|
|
23
43
|
};
|
|
24
44
|
export declare const toastControllerKey: InjectionKey<ToastController>;
|
|
25
45
|
export declare function useToast(): ToastController;
|