@plexui/vue 0.10.0 → 0.11.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/dist/es/components/ButtonGroup/ButtonGroup.js +7 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/es/components/ButtonGroup/index.js.map +1 -1
- package/dist/es/components/ContextMenu/shared.js +3 -2
- package/dist/es/components/ContextMenu/shared.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +135 -18
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/dialogSteps.js +85 -0
- package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
- package/dist/es/components/Dialog/dialogViewport.js +74 -0
- package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
- package/dist/es/components/Dialog/index.js +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/Dialog/sheetDrag.js +2 -1
- package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
- package/dist/es/components/IndexBar/IndexBar.js +215 -0
- package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
- package/dist/es/components/IndexBar/index.js +2 -0
- package/dist/es/components/IndexBar/index.js.map +1 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js +149 -1
- package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +10 -6
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/Page/Page.js +2 -2
- package/dist/es/components/Page/Page.js.map +1 -1
- package/dist/es/components/PhoneLayout/PhoneLayout.js +50 -0
- package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
- package/dist/es/components/PhoneLayout/index.js +2 -0
- package/dist/es/components/PhoneLayout/index.js.map +1 -0
- package/dist/es/components/Popover/Popover.js +1 -1
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/Popover/deferredPointerDownOutside.js +59 -4
- package/dist/es/components/Popover/deferredPointerDownOutside.js.map +1 -1
- package/dist/es/components/Select/Select.js +2 -2
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +34 -3
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/SwipeActions/SwipeActions.js +374 -0
- package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
- package/dist/es/components/SwipeActions/index.js +2 -0
- package/dist/es/components/SwipeActions/index.js.map +1 -0
- package/dist/es/components/Switch/Switch.js +3 -1
- package/dist/es/components/Switch/Switch.js.map +1 -1
- package/dist/es/components/TabBar/TabBar.js +23 -8
- package/dist/es/components/TabBar/TabBar.js.map +1 -1
- package/dist/es/components/TabBar/index.js.map +1 -1
- package/dist/es/components/Tabs/Tabs.js +1 -0
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/TagInput/TagInput.js +3 -46
- package/dist/es/components/TagInput/TagInput.js.map +1 -1
- package/dist/es/components/Textarea/Textarea.js +1 -0
- package/dist/es/components/Textarea/Textarea.js.map +1 -1
- package/dist/es/components/Tip/Tip.js +276 -0
- package/dist/es/components/Tip/Tip.js.map +1 -0
- package/dist/es/components/Tip/index.js +2 -0
- package/dist/es/components/Tip/index.js.map +1 -0
- package/dist/es/components/Toast/ToastRenderer.js +30 -13
- package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
- package/dist/es/components/Toast/Toaster.js +17 -6
- package/dist/es/components/Toast/Toaster.js.map +1 -1
- package/dist/es/components/Toast/toastLifecycle.js +113 -1
- package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js +3 -3
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/composables/useEscCloseStack.js +8 -4
- package/dist/es/composables/useEscCloseStack.js.map +1 -1
- package/dist/es/lib/floatingBoundary.js +3 -1
- package/dist/es/lib/floatingBoundary.js.map +1 -1
- package/dist/es/lib/helpers.js +21 -0
- package/dist/es/lib/helpers.js.map +1 -1
- package/dist/es/lib/phoneLayout.js +16 -0
- package/dist/es/lib/phoneLayout.js.map +1 -0
- package/dist/es/lib/toastRegion.js +6 -0
- package/dist/es/lib/toastRegion.js.map +1 -0
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +1 -1
- package/dist/types/components/ContextMenu/shared.d.ts +3 -2
- package/dist/types/components/Dialog/Dialog.d.ts +93 -3
- package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
- package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
- package/dist/types/components/Dialog/index.d.ts +1 -1
- package/dist/types/components/IndexBar/IndexBar.d.ts +112 -0
- package/dist/types/components/IndexBar/index.d.ts +1 -0
- package/dist/types/components/Menu/Menu.d.ts +14 -15
- package/dist/types/components/Page/Page.d.ts +2 -2
- package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +21 -0
- package/dist/types/components/PhoneLayout/index.d.ts +1 -0
- package/dist/types/components/Popover/deferredPointerDownOutside.d.ts +1 -1
- package/dist/types/components/SwipeActions/SwipeActions.d.ts +135 -0
- package/dist/types/components/SwipeActions/index.d.ts +1 -0
- package/dist/types/components/TabBar/TabBar.d.ts +55 -6
- package/dist/types/components/TabBar/index.d.ts +1 -1
- package/dist/types/components/Tip/Tip.d.ts +146 -0
- package/dist/types/components/Tip/index.d.ts +1 -0
- package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
- package/dist/types/components/Toolbar/Toolbar.d.ts +9 -7
- package/dist/types/composables/useEscCloseStack.d.ts +2 -2
- package/dist/types/lib/helpers.d.ts +6 -0
- package/dist/types/lib/phoneLayout.d.ts +11 -0
- package/dist/types/lib/toastRegion.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLAttributes, type PropType, type VNode } from "vue";
|
|
1
|
+
import { type CSSProperties, type HTMLAttributes, type PropType, type VNode } from "vue";
|
|
2
2
|
import { type BarBackground } from "../Toolbar/Toolbar.js";
|
|
3
3
|
/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */
|
|
4
4
|
export declare const Dialog: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -64,6 +64,27 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
|
|
|
64
64
|
onOpenAutoFocus: PropType<(event: Event) => void>;
|
|
65
65
|
/** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */
|
|
66
66
|
onCloseAutoFocus: PropType<(event: Event) => void>;
|
|
67
|
+
/**
|
|
68
|
+
* Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with
|
|
69
|
+
* unsaved changes.
|
|
70
|
+
*/
|
|
71
|
+
onEscapeKeyDown: PropType<(event: KeyboardEvent) => void>;
|
|
72
|
+
/**
|
|
73
|
+
* Called on a press or a focus outside the dialog before it closes; `event.preventDefault()` keeps it open, such
|
|
74
|
+
* as for a press on a developer panel over the page.
|
|
75
|
+
*/
|
|
76
|
+
onInteractOutside: PropType<(event: DialogInteractOutsideEvent) => void>;
|
|
77
|
+
/** Stack order of the overlay and the dialog. @default 50 */
|
|
78
|
+
zIndex: NumberConstructor;
|
|
79
|
+
/** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */
|
|
80
|
+
rootProps: PropType<DialogLayerProps>;
|
|
81
|
+
/** Class, style and data attributes for the overlay. */
|
|
82
|
+
overlayProps: PropType<DialogLayerProps>;
|
|
83
|
+
/** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default "auto" */
|
|
84
|
+
layout: {
|
|
85
|
+
type: PropType<"auto" | "phone">;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
67
88
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
68
89
|
[key: string]: any;
|
|
69
90
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -107,8 +128,30 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
|
|
|
107
128
|
onOpenAutoFocus: PropType<(event: Event) => void>;
|
|
108
129
|
/** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */
|
|
109
130
|
onCloseAutoFocus: PropType<(event: Event) => void>;
|
|
131
|
+
/**
|
|
132
|
+
* Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with
|
|
133
|
+
* unsaved changes.
|
|
134
|
+
*/
|
|
135
|
+
onEscapeKeyDown: PropType<(event: KeyboardEvent) => void>;
|
|
136
|
+
/**
|
|
137
|
+
* Called on a press or a focus outside the dialog before it closes; `event.preventDefault()` keeps it open, such
|
|
138
|
+
* as for a press on a developer panel over the page.
|
|
139
|
+
*/
|
|
140
|
+
onInteractOutside: PropType<(event: DialogInteractOutsideEvent) => void>;
|
|
141
|
+
/** Stack order of the overlay and the dialog. @default 50 */
|
|
142
|
+
zIndex: NumberConstructor;
|
|
143
|
+
/** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */
|
|
144
|
+
rootProps: PropType<DialogLayerProps>;
|
|
145
|
+
/** Class, style and data attributes for the overlay. */
|
|
146
|
+
overlayProps: PropType<DialogLayerProps>;
|
|
147
|
+
/** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default "auto" */
|
|
148
|
+
layout: {
|
|
149
|
+
type: PropType<"auto" | "phone">;
|
|
150
|
+
default: string;
|
|
151
|
+
};
|
|
110
152
|
}>> & Readonly<{}>, {
|
|
111
153
|
width: string | number;
|
|
154
|
+
layout: "auto" | "phone";
|
|
112
155
|
pill: boolean;
|
|
113
156
|
placement: DialogPlacement;
|
|
114
157
|
showClose: boolean;
|
|
@@ -117,7 +160,7 @@ export declare const DialogContent: import("vue").DefineComponent<import("vue").
|
|
|
117
160
|
/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. */
|
|
118
161
|
export type DialogBarBackground = BarBackground;
|
|
119
162
|
export declare const DialogHeader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
120
|
-
/** How the bar meets the content scrolled under it in a phone Sheet. @default "
|
|
163
|
+
/** How the bar meets the content scrolled under it in a phone Sheet. @default "glass" */
|
|
121
164
|
background: {
|
|
122
165
|
type: PropType<DialogBarBackground>;
|
|
123
166
|
default: string;
|
|
@@ -125,7 +168,7 @@ export declare const DialogHeader: import("vue").DefineComponent<import("vue").E
|
|
|
125
168
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
126
169
|
[key: string]: any;
|
|
127
170
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
|
-
/** How the bar meets the content scrolled under it in a phone Sheet. @default "
|
|
171
|
+
/** How the bar meets the content scrolled under it in a phone Sheet. @default "glass" */
|
|
129
172
|
background: {
|
|
130
173
|
type: PropType<DialogBarBackground>;
|
|
131
174
|
default: string;
|
|
@@ -170,11 +213,58 @@ export declare const DialogDescription: import("vue").DefineComponent<{}, () =>
|
|
|
170
213
|
export declare const DialogClose: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
171
214
|
[key: string]: any;
|
|
172
215
|
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
216
|
+
/** The steps of a flow inside a dialog, such as a sign-in that asks for an email and then a code. */
|
|
217
|
+
export declare const DialogSteps: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
218
|
+
/** The step on screen. A new value brings its content in. */
|
|
219
|
+
step: {
|
|
220
|
+
type: PropType<string | number>;
|
|
221
|
+
required: true;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns
|
|
225
|
+
* to a step before it.
|
|
226
|
+
* @default "forward"
|
|
227
|
+
*/
|
|
228
|
+
direction: {
|
|
229
|
+
type: PropType<"forward" | "back">;
|
|
230
|
+
default: string;
|
|
231
|
+
};
|
|
232
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
233
|
+
[key: string]: any;
|
|
234
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
235
|
+
/** The step on screen. A new value brings its content in. */
|
|
236
|
+
step: {
|
|
237
|
+
type: PropType<string | number>;
|
|
238
|
+
required: true;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns
|
|
242
|
+
* to a step before it.
|
|
243
|
+
* @default "forward"
|
|
244
|
+
*/
|
|
245
|
+
direction: {
|
|
246
|
+
type: PropType<"forward" | "back">;
|
|
247
|
+
default: string;
|
|
248
|
+
};
|
|
249
|
+
}>> & Readonly<{}>, {
|
|
250
|
+
direction: "back" | "forward";
|
|
251
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
173
252
|
export type DialogProps = InstanceType<typeof Dialog>["$props"];
|
|
174
253
|
export type DialogPlacement = "center" | "top" | "bottom" | "start" | "end" | "fullscreen";
|
|
254
|
+
/** A press or a focus outside the dialog; `event.detail.originalEvent` is the browser's event. */
|
|
255
|
+
export type DialogInteractOutsideEvent = CustomEvent<{
|
|
256
|
+
originalEvent: PointerEvent | FocusEvent;
|
|
257
|
+
}>;
|
|
258
|
+
/** Class, style and data attributes for one of the dialog's layers. */
|
|
259
|
+
export type DialogLayerProps = {
|
|
260
|
+
class?: HTMLAttributes["class"];
|
|
261
|
+
style?: string | CSSProperties;
|
|
262
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
263
|
+
};
|
|
175
264
|
/** DialogContent props; `class` lands on the panel, like `className` in React. */
|
|
176
265
|
export type DialogContentProps = InstanceType<typeof DialogContent>["$props"] & {
|
|
177
266
|
class?: HTMLAttributes["class"];
|
|
178
267
|
};
|
|
179
268
|
export type DialogHeaderProps = InstanceType<typeof DialogHeader>["$props"];
|
|
180
269
|
export type DialogFooterProps = InstanceType<typeof DialogFooter>["$props"];
|
|
270
|
+
export type DialogStepsProps = InstanceType<typeof DialogSteps>["$props"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const STEP_TIMING: {
|
|
2
|
+
enterDuration: number;
|
|
3
|
+
exitDuration: number;
|
|
4
|
+
};
|
|
5
|
+
type TransitionElement = HTMLElement | SVGElement;
|
|
6
|
+
export declare const enterStep: (element: TransitionElement) => void;
|
|
7
|
+
export declare const leaveStep: (element: TransitionElement) => void;
|
|
8
|
+
export declare const settleStepHeight: (element: TransitionElement) => void;
|
|
9
|
+
export declare const releaseStepHeight: (element: TransitionElement) => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const watchDialogViewport: (content: HTMLElement, container: HTMLElement | null) => (() => void);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderAction, DialogTitle, DialogTrigger, type DialogBarBackground, type DialogHeaderProps, type DialogFooterProps, type DialogContentProps, type DialogPlacement, type DialogProps, } from "./Dialog.js";
|
|
1
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderAction, DialogSteps, DialogTitle, DialogTrigger, type DialogBarBackground, type DialogHeaderProps, type DialogFooterProps, type DialogContentProps, type DialogInteractOutsideEvent, type DialogLayerProps, type DialogPlacement, type DialogProps, type DialogStepsProps, } from "./Dialog.js";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* What the bar shows: the index of each title, or `null` for a dot. Every title shows while they fit in `capacity`
|
|
4
|
+
* lines, or while `capacity` is not known (`undefined`). Otherwise the first and the last title keep their places
|
|
5
|
+
* and titles spread evenly between them, a dot in each line between two, as UIKit's index shortens itself on a
|
|
6
|
+
* short screen; two lines hold the first and the last title, one the first, none nothing.
|
|
7
|
+
*/
|
|
8
|
+
export declare const indexBarSlots: (count: number, capacity?: number) => Array<number | null>;
|
|
9
|
+
declare const IndexBarComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
/** The `id` of the index bar. */
|
|
11
|
+
id: StringConstructor;
|
|
12
|
+
/** The titles of the sections, in order: usually letters, such as `"A"` to `"Z"` and `"#"`. */
|
|
13
|
+
items: {
|
|
14
|
+
type: PropType<string[]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
/** Accessible name of the index bar. @default "Section index" */
|
|
18
|
+
ariaLabel: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
/** The `id` of the list the index scrolls. */
|
|
23
|
+
ariaControls: StringConstructor;
|
|
24
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
/** The section to show: on a press, on each new letter while dragging, and from the keys (React `onSelect`) */
|
|
28
|
+
select: (item: string, index: number) => boolean;
|
|
29
|
+
/** The index bar gained focus */
|
|
30
|
+
focus: (event: FocusEvent) => boolean;
|
|
31
|
+
/** The index bar lost focus */
|
|
32
|
+
blur: (event: FocusEvent) => boolean;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
/** The `id` of the index bar. */
|
|
35
|
+
id: StringConstructor;
|
|
36
|
+
/** The titles of the sections, in order: usually letters, such as `"A"` to `"Z"` and `"#"`. */
|
|
37
|
+
items: {
|
|
38
|
+
type: PropType<string[]>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
/** Accessible name of the index bar. @default "Section index" */
|
|
42
|
+
ariaLabel: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
/** The `id` of the list the index scrolls. */
|
|
47
|
+
ariaControls: StringConstructor;
|
|
48
|
+
}>> & Readonly<{
|
|
49
|
+
onSelect?: ((item: string, index: number) => any) | undefined;
|
|
50
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
51
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
52
|
+
}>, {
|
|
53
|
+
ariaLabel: string;
|
|
54
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
55
|
+
type IndexBarOwnProps = InstanceType<typeof IndexBarComponent>["$props"];
|
|
56
|
+
/** IndexBar props. */
|
|
57
|
+
export type IndexBarProps = IndexBarOwnProps;
|
|
58
|
+
/**
|
|
59
|
+
* The section index of a phone list, as the iOS section index: a column of letters at the trailing edge of the
|
|
60
|
+
* nearest positioned container (a Page), centred between the bars of the Page. A press shows the section of the letter under the
|
|
61
|
+
* finger, and a drag moves through the sections letter by letter. On a short screen every other letter gives
|
|
62
|
+
* way to a dot. It is one slider for assistive technology: Down and Up (or Right and Left) move one section, Home
|
|
63
|
+
* and End go to the first and the last, and Enter or Space shows the current one again. A desktop list has no
|
|
64
|
+
* index, so the bar renders under 768px only.
|
|
65
|
+
*/
|
|
66
|
+
export declare const IndexBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
67
|
+
/** The `id` of the index bar. */
|
|
68
|
+
id: StringConstructor;
|
|
69
|
+
/** The titles of the sections, in order: usually letters, such as `"A"` to `"Z"` and `"#"`. */
|
|
70
|
+
items: {
|
|
71
|
+
type: PropType<string[]>;
|
|
72
|
+
required: true;
|
|
73
|
+
};
|
|
74
|
+
/** Accessible name of the index bar. @default "Section index" */
|
|
75
|
+
ariaLabel: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
/** The `id` of the list the index scrolls. */
|
|
80
|
+
ariaControls: StringConstructor;
|
|
81
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
84
|
+
/** The section to show: on a press, on each new letter while dragging, and from the keys (React `onSelect`) */
|
|
85
|
+
select: (item: string, index: number) => boolean;
|
|
86
|
+
/** The index bar gained focus */
|
|
87
|
+
focus: (event: FocusEvent) => boolean;
|
|
88
|
+
/** The index bar lost focus */
|
|
89
|
+
blur: (event: FocusEvent) => boolean;
|
|
90
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
91
|
+
/** The `id` of the index bar. */
|
|
92
|
+
id: StringConstructor;
|
|
93
|
+
/** The titles of the sections, in order: usually letters, such as `"A"` to `"Z"` and `"#"`. */
|
|
94
|
+
items: {
|
|
95
|
+
type: PropType<string[]>;
|
|
96
|
+
required: true;
|
|
97
|
+
};
|
|
98
|
+
/** Accessible name of the index bar. @default "Section index" */
|
|
99
|
+
ariaLabel: {
|
|
100
|
+
type: StringConstructor;
|
|
101
|
+
default: string;
|
|
102
|
+
};
|
|
103
|
+
/** The `id` of the list the index scrolls. */
|
|
104
|
+
ariaControls: StringConstructor;
|
|
105
|
+
}>> & Readonly<{
|
|
106
|
+
onSelect?: ((item: string, index: number) => any) | undefined;
|
|
107
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
108
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
109
|
+
}>, {
|
|
110
|
+
ariaLabel: string;
|
|
111
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
112
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IndexBar, indexBarSlots, type IndexBarProps } from "./IndexBar.js";
|
|
@@ -104,8 +104,8 @@ export declare const MenuContent: import("vue").DefineComponent<import("vue").Ex
|
|
|
104
104
|
*/
|
|
105
105
|
alignOffset: NumberConstructor;
|
|
106
106
|
/**
|
|
107
|
-
* Defines the `width` property of the content
|
|
108
|
-
*
|
|
107
|
+
* Defines the `width` property of the content. Without it the menu fits its content, or with `touch.css` on a phone
|
|
108
|
+
* is the 250px panel of an iOS menu; `"auto"` fits its content there too.
|
|
109
109
|
*/
|
|
110
110
|
width: PropType<SizeValue>;
|
|
111
111
|
/**
|
|
@@ -178,8 +178,8 @@ export declare const MenuContent: import("vue").DefineComponent<import("vue").Ex
|
|
|
178
178
|
*/
|
|
179
179
|
alignOffset: NumberConstructor;
|
|
180
180
|
/**
|
|
181
|
-
* Defines the `width` property of the content
|
|
182
|
-
*
|
|
181
|
+
* Defines the `width` property of the content. Without it the menu fits its content, or with `touch.css` on a phone
|
|
182
|
+
* is the 250px panel of an iOS menu; `"auto"` fits its content there too.
|
|
183
183
|
*/
|
|
184
184
|
width: PropType<SizeValue>;
|
|
185
185
|
/**
|
|
@@ -473,11 +473,11 @@ export declare const MenuSubContent: import("vue").DefineComponent<import("vue")
|
|
|
473
473
|
type: NumberConstructor;
|
|
474
474
|
default: number;
|
|
475
475
|
};
|
|
476
|
-
/**
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
476
|
+
/**
|
|
477
|
+
* The width of the submenu. Without it the submenu fits its content, or with `touch.css` on a phone is the 250px
|
|
478
|
+
* of a menu; `"auto"` fits its content there too.
|
|
479
|
+
*/
|
|
480
|
+
width: PropType<SizeValue>;
|
|
481
481
|
/** Defines the `min-width` property of the content. @default "auto" */
|
|
482
482
|
minWidth: PropType<SizeValue>;
|
|
483
483
|
/** Defines the `max-height` property of the content, in pixels. */
|
|
@@ -503,11 +503,11 @@ export declare const MenuSubContent: import("vue").DefineComponent<import("vue")
|
|
|
503
503
|
type: NumberConstructor;
|
|
504
504
|
default: number;
|
|
505
505
|
};
|
|
506
|
-
/**
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
506
|
+
/**
|
|
507
|
+
* The width of the submenu. Without it the submenu fits its content, or with `touch.css` on a phone is the 250px
|
|
508
|
+
* of a menu; `"auto"` fits its content there too.
|
|
509
|
+
*/
|
|
510
|
+
width: PropType<SizeValue>;
|
|
511
511
|
/** Defines the `min-width` property of the content. @default "auto" */
|
|
512
512
|
minWidth: PropType<SizeValue>;
|
|
513
513
|
/** Defines the `max-height` property of the content, in pixels. */
|
|
@@ -521,7 +521,6 @@ export declare const MenuSubContent: import("vue").DefineComponent<import("vue")
|
|
|
521
521
|
default: boolean;
|
|
522
522
|
};
|
|
523
523
|
}>> & Readonly<{}>, {
|
|
524
|
-
width: SizeValue;
|
|
525
524
|
pill: boolean;
|
|
526
525
|
sideOffset: number;
|
|
527
526
|
alignOffset: number;
|
|
@@ -66,7 +66,7 @@ export declare const PageHeader: import("vue").DefineComponent<import("vue").Ext
|
|
|
66
66
|
type: BooleanConstructor;
|
|
67
67
|
default: boolean;
|
|
68
68
|
};
|
|
69
|
-
/** How the bar meets the content scrolled under it on a phone. @default "
|
|
69
|
+
/** How the bar meets the content scrolled under it on a phone. @default "glass" */
|
|
70
70
|
background: {
|
|
71
71
|
type: PropType<PageBarBackground>;
|
|
72
72
|
default: string;
|
|
@@ -85,7 +85,7 @@ export declare const PageHeader: import("vue").DefineComponent<import("vue").Ext
|
|
|
85
85
|
type: BooleanConstructor;
|
|
86
86
|
default: boolean;
|
|
87
87
|
};
|
|
88
|
-
/** How the bar meets the content scrolled under it on a phone. @default "
|
|
88
|
+
/** How the bar meets the content scrolled under it on a phone. @default "glass" */
|
|
89
89
|
background: {
|
|
90
90
|
type: PropType<PageBarBackground>;
|
|
91
91
|
default: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComputedRef, type InjectionKey, type Ref } from "vue";
|
|
2
|
+
export type PhoneLayoutValue = {
|
|
3
|
+
/** Where dialogs inside the layout portal to: the PhoneLayout box, or null for the document body. */
|
|
4
|
+
container: Ref<HTMLElement | null>;
|
|
5
|
+
/** Whether what is inside is laid out as on a phone: always inside a PhoneLayout, as its `layout` says in a Dialog. */
|
|
6
|
+
phone: Readonly<Ref<boolean>>;
|
|
7
|
+
};
|
|
8
|
+
/** Provided inside a PhoneLayout and a Dialog. */
|
|
9
|
+
export declare const PHONE_LAYOUT: InjectionKey<PhoneLayoutValue>;
|
|
10
|
+
/**
|
|
11
|
+
* Lays out what it holds as on a phone at any window width, such as a phone frame on a desktop page: components take
|
|
12
|
+
* their phone presentation inside it, and a Dialog opened inside it covers the box instead of the window.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PhoneLayout: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
/**
|
|
18
|
+
* Whether components here are laid out as on a phone: inside a PhoneLayout (or a Dialog with `layout="phone"`), or
|
|
19
|
+
* in a window 767px wide or narrower. The server answers false outside a PhoneLayout.
|
|
20
|
+
*/
|
|
21
|
+
export declare const usePhoneLayout: () => ComputedRef<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PHONE_LAYOUT, PhoneLayout, usePhoneLayout, type PhoneLayoutValue } from "./PhoneLayout.js";
|
|
@@ -11,7 +11,7 @@ export declare const dismissableSurfaces: Set<Element>;
|
|
|
11
11
|
* runs on the click that completes a deferred press. `reset` drops a pending
|
|
12
12
|
* press (the layer closed some other way); unmounting does it too.
|
|
13
13
|
*/
|
|
14
|
-
export declare const useDeferredPointerDownOutside: (dismiss: (originalEvent: PointerEvent) => void) => {
|
|
14
|
+
export declare const useDeferredPointerDownOutside: (dismiss: (originalEvent: PointerEvent) => void, layer?: () => Element | null | undefined) => {
|
|
15
15
|
onPointerDownOutside: (event: OutsideEvent) => void;
|
|
16
16
|
onFocusOutside: (event: Event) => void;
|
|
17
17
|
reset: () => void;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { type Component, type PropType } from "vue";
|
|
2
|
+
export type SwipeActionColor = "primary" | "secondary" | "danger" | "success" | "info" | "discovery" | "caution" | "warning";
|
|
3
|
+
export type SwipeAction = {
|
|
4
|
+
/** Unique ID of the action within its side */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Name of the action: shown with `labelPlacement` `"inside"` or `"below"` (and on an action without an icon), and its accessible name always */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Icon of the action */
|
|
9
|
+
Icon?: Component;
|
|
10
|
+
/** Solid color of the action. @default "secondary" */
|
|
11
|
+
color?: SwipeActionColor;
|
|
12
|
+
/** Called when the action is pressed, or by a full swipe when it is the first action of its side */
|
|
13
|
+
onSelect?: () => void;
|
|
14
|
+
};
|
|
15
|
+
export type SwipeActionsSide = "leading" | "trailing";
|
|
16
|
+
/**
|
|
17
|
+
* Where the content goes for a swipe of `raw` px toward the trailing edge (negative: toward the leading edge), and
|
|
18
|
+
* whether that is a full swipe. A side without actions stays shut. Past its actions the content follows the finger
|
|
19
|
+
* where a full swipe is allowed, and a third as fast where it is not; past the middle between the open actions and
|
|
20
|
+
* the far edge of the row the swipe is full.
|
|
21
|
+
*/
|
|
22
|
+
export declare const swipeActionsOffset: (raw: number, widths: Record<SwipeActionsSide, number>, rowWidth: number, fullSwipe: boolean) => {
|
|
23
|
+
offset: number;
|
|
24
|
+
full: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare const SwipeActionsComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
27
|
+
/** Actions revealed by a swipe toward the trailing edge, the first one at the leading edge */
|
|
28
|
+
leading: {
|
|
29
|
+
type: PropType<SwipeAction[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
/** Actions revealed by a swipe toward the leading edge, the first one at the trailing edge */
|
|
33
|
+
trailing: {
|
|
34
|
+
type: PropType<SwipeAction[]>;
|
|
35
|
+
default: () => never[];
|
|
36
|
+
};
|
|
37
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 68px and taller). @default "hidden" */
|
|
38
|
+
labelPlacement: {
|
|
39
|
+
type: PropType<"hidden" | "inside" | "below">;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
/** A swipe past the middle between the open actions and the far edge runs the first action of that side. @default true */
|
|
43
|
+
fullSwipe: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
50
|
+
/** Actions revealed by a swipe toward the trailing edge, the first one at the leading edge */
|
|
51
|
+
leading: {
|
|
52
|
+
type: PropType<SwipeAction[]>;
|
|
53
|
+
default: () => never[];
|
|
54
|
+
};
|
|
55
|
+
/** Actions revealed by a swipe toward the leading edge, the first one at the trailing edge */
|
|
56
|
+
trailing: {
|
|
57
|
+
type: PropType<SwipeAction[]>;
|
|
58
|
+
default: () => never[];
|
|
59
|
+
};
|
|
60
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 68px and taller). @default "hidden" */
|
|
61
|
+
labelPlacement: {
|
|
62
|
+
type: PropType<"hidden" | "inside" | "below">;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
/** A swipe past the middle between the open actions and the far edge runs the first action of that side. @default true */
|
|
66
|
+
fullSwipe: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{}>, {
|
|
71
|
+
labelPlacement: "hidden" | "inside" | "below";
|
|
72
|
+
leading: SwipeAction[];
|
|
73
|
+
trailing: SwipeAction[];
|
|
74
|
+
fullSwipe: boolean;
|
|
75
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
76
|
+
type SwipeActionsOwnProps = InstanceType<typeof SwipeActionsComponent>["$props"];
|
|
77
|
+
/** SwipeActions props. */
|
|
78
|
+
export type SwipeActionsProps = SwipeActionsOwnProps;
|
|
79
|
+
/**
|
|
80
|
+
* Actions behind a row of a list, as the swipe actions of an iOS list: a swipe toward the leading edge reveals the
|
|
81
|
+
* trailing actions, a swipe toward the trailing edge the leading ones, and a full swipe runs the first action of
|
|
82
|
+
* that side. The row is a `data-row` of a FieldGroup. Each action is also a button in the order of the screen, and
|
|
83
|
+
* the focus on one shows its side.
|
|
84
|
+
*/
|
|
85
|
+
export declare const SwipeActions: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
86
|
+
/** Actions revealed by a swipe toward the trailing edge, the first one at the leading edge */
|
|
87
|
+
leading: {
|
|
88
|
+
type: PropType<SwipeAction[]>;
|
|
89
|
+
default: () => never[];
|
|
90
|
+
};
|
|
91
|
+
/** Actions revealed by a swipe toward the leading edge, the first one at the trailing edge */
|
|
92
|
+
trailing: {
|
|
93
|
+
type: PropType<SwipeAction[]>;
|
|
94
|
+
default: () => never[];
|
|
95
|
+
};
|
|
96
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 68px and taller). @default "hidden" */
|
|
97
|
+
labelPlacement: {
|
|
98
|
+
type: PropType<"hidden" | "inside" | "below">;
|
|
99
|
+
default: string;
|
|
100
|
+
};
|
|
101
|
+
/** A swipe past the middle between the open actions and the far edge runs the first action of that side. @default true */
|
|
102
|
+
fullSwipe: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
107
|
+
[key: string]: any;
|
|
108
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
109
|
+
/** Actions revealed by a swipe toward the trailing edge, the first one at the leading edge */
|
|
110
|
+
leading: {
|
|
111
|
+
type: PropType<SwipeAction[]>;
|
|
112
|
+
default: () => never[];
|
|
113
|
+
};
|
|
114
|
+
/** Actions revealed by a swipe toward the leading edge, the first one at the trailing edge */
|
|
115
|
+
trailing: {
|
|
116
|
+
type: PropType<SwipeAction[]>;
|
|
117
|
+
default: () => never[];
|
|
118
|
+
};
|
|
119
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 68px and taller). @default "hidden" */
|
|
120
|
+
labelPlacement: {
|
|
121
|
+
type: PropType<"hidden" | "inside" | "below">;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
124
|
+
/** A swipe past the middle between the open actions and the far edge runs the first action of that side. @default true */
|
|
125
|
+
fullSwipe: {
|
|
126
|
+
type: BooleanConstructor;
|
|
127
|
+
default: boolean;
|
|
128
|
+
};
|
|
129
|
+
}>> & Readonly<{}>, {
|
|
130
|
+
labelPlacement: "hidden" | "inside" | "below";
|
|
131
|
+
leading: SwipeAction[];
|
|
132
|
+
trailing: SwipeAction[];
|
|
133
|
+
fullSwipe: boolean;
|
|
134
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
135
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SwipeActions, swipeActionsOffset, type SwipeAction, type SwipeActionColor, type SwipeActionsProps, type SwipeActionsSide, } from "./SwipeActions.js";
|