@thekestongroup/ui 0.2.1 → 0.3.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 +90 -32
- package/dist/components/Age/Age.vue.d.ts +19 -0
- package/dist/components/AppShell/AppShell.vue.d.ts +108 -0
- package/dist/components/Avatar/Avatar.vue.d.ts +34 -0
- package/dist/components/AvatarGroup/AvatarGroup.vue.d.ts +25 -0
- package/dist/components/Badge/Badge.vue.d.ts +41 -0
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +39 -0
- package/dist/components/Button/Button.vue.d.ts +69 -0
- package/dist/components/Calendar/Calendar.vue.d.ts +34 -0
- package/dist/components/Card/Card.vue.d.ts +56 -0
- package/dist/components/Checkbox/Checkbox.vue.d.ts +40 -0
- package/dist/components/Checklist/Checklist.vue.d.ts +18 -0
- package/dist/components/Chip/Chip.vue.d.ts +44 -0
- package/dist/components/Divider/Divider.vue.d.ts +36 -0
- package/dist/components/{ToastItem.vue.d.ts → FormField/FieldMessage.vue.d.ts} +10 -2
- package/dist/components/FormField/FormField.vue.d.ts +61 -0
- package/dist/components/Header/Header.vue.d.ts +104 -0
- package/dist/components/InfoTip/InfoTip.vue.d.ts +20 -0
- package/dist/components/Input/Input.vue.d.ts +56 -0
- package/dist/components/InputCode/InputCode.vue.d.ts +53 -0
- package/dist/components/InputDate/InputDate.vue.d.ts +49 -0
- package/dist/components/InputNumber/InputNumber.vue.d.ts +44 -0
- package/dist/components/InputPassword/InputPassword.vue.d.ts +51 -0
- package/dist/components/InputRichText/InputRichText.vue.d.ts +44 -0
- package/dist/components/Link/Link.vue.d.ts +39 -0
- package/dist/components/Notification/Notification.vue.d.ts +62 -0
- package/dist/components/Notification/NotificationPane.vue.d.ts +38 -0
- package/dist/components/Notification/Toaster.vue.d.ts +51 -0
- package/dist/components/Notification/notification.samples.d.ts +3 -0
- package/dist/components/Notification/notifications.d.ts +115 -0
- package/dist/components/PageHeader/PageHeader.vue.d.ts +43 -0
- package/dist/components/Popover/Popover.vue.d.ts +83 -0
- package/dist/components/Popover/popover.d.ts +16 -0
- package/dist/components/Progress/Progress.vue.d.ts +26 -0
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts +45 -0
- package/dist/components/RelativeTime/RelativeTime.vue.d.ts +22 -0
- package/dist/components/Select/Select.vue.d.ts +110 -0
- package/dist/components/Sidebar/Sidebar.vue.d.ts +106 -0
- package/dist/components/Sidebar/sidebar.d.ts +10 -0
- package/dist/components/Slideover/Slideover.vue.d.ts +125 -0
- package/dist/components/Spinner/Spinner.vue.d.ts +30 -0
- package/dist/components/StatTile/StatTile.vue.d.ts +46 -0
- package/dist/components/SummaryList/SummaryList.vue.d.ts +62 -0
- package/dist/components/Switch/Switch.vue.d.ts +39 -0
- package/dist/components/Table/Table.vue.d.ts +82 -0
- package/dist/components/Table/table.d.ts +36 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts +46 -0
- package/dist/index.d.ts +89 -25
- package/dist/keston-ui.js +4963 -14785
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/dates.d.ts +27 -0
- package/dist/lib/initials.d.ts +2 -0
- package/dist/lib/parseDate.d.ts +44 -0
- package/dist/lib/useNow.d.ts +3 -0
- package/package.json +53 -24
- package/src/components/.gitkeep +0 -0
- package/src/components/Age/Age.stories.ts +24 -0
- package/src/components/Age/Age.vue +56 -0
- package/src/components/AppShell/AppShell.stories.ts +124 -0
- package/src/components/AppShell/AppShell.vue +212 -0
- package/src/components/Avatar/Avatar.stories.ts +56 -0
- package/src/components/Avatar/Avatar.vue +118 -0
- package/src/components/AvatarGroup/AvatarGroup.stories.ts +47 -0
- package/src/components/AvatarGroup/AvatarGroup.vue +97 -0
- package/src/components/Badge/Badge.stories.ts +92 -0
- package/src/components/Badge/Badge.vue +67 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.ts +58 -0
- package/src/components/Breadcrumb/Breadcrumb.vue +109 -0
- package/src/components/Button/Button.mdx +79 -0
- package/src/components/Button/Button.stories.ts +207 -0
- package/src/components/Button/Button.vue +266 -0
- package/src/components/Calendar/Calendar.stories.ts +51 -0
- package/src/components/Calendar/Calendar.vue +364 -0
- package/src/components/Card/Card.stories.ts +109 -0
- package/src/components/Card/Card.vue +115 -0
- package/src/components/Checkbox/Checkbox.stories.ts +102 -0
- package/src/components/Checkbox/Checkbox.vue +102 -0
- package/src/components/Checklist/Checklist.stories.ts +67 -0
- package/src/components/Checklist/Checklist.vue +38 -0
- package/src/components/Chip/Chip.stories.ts +71 -0
- package/src/components/Chip/Chip.vue +86 -0
- package/src/components/Divider/Divider.stories.ts +57 -0
- package/src/components/Divider/Divider.vue +58 -0
- package/src/components/FormField/FieldMessage.vue +81 -0
- package/src/components/FormField/FormField.stories.ts +55 -0
- package/src/components/FormField/FormField.vue +160 -0
- package/src/components/Header/Header.stories.ts +168 -0
- package/src/components/Header/Header.vue +232 -0
- package/src/components/InfoTip/InfoTip.stories.ts +63 -0
- package/src/components/InfoTip/InfoTip.vue +50 -0
- package/src/components/Input/Input.stories.ts +206 -0
- package/src/components/Input/Input.vue +90 -0
- package/src/components/InputCode/InputCode.stories.ts +85 -0
- package/src/components/InputCode/InputCode.vue +145 -0
- package/src/components/InputDate/InputDate.stories.ts +58 -0
- package/src/components/InputDate/InputDate.vue +258 -0
- package/src/components/InputNumber/InputNumber.stories.ts +63 -0
- package/src/components/InputNumber/InputNumber.vue +109 -0
- package/src/components/InputPassword/InputPassword.stories.ts +105 -0
- package/src/components/InputPassword/InputPassword.vue +132 -0
- package/src/components/InputRichText/InputRichText.stories.ts +100 -0
- package/src/components/InputRichText/InputRichText.vue +194 -0
- package/src/components/Link/Link.stories.ts +73 -0
- package/src/components/Link/Link.vue +56 -0
- package/src/components/Notification/Notification.stories.ts +196 -0
- package/src/components/Notification/Notification.vue +136 -0
- package/src/components/Notification/NotificationPane.vue +187 -0
- package/src/components/Notification/Toaster.vue +446 -0
- package/src/components/Notification/notification.samples.ts +45 -0
- package/src/components/Notification/notifications.test.ts +99 -0
- package/src/components/Notification/notifications.ts +172 -0
- package/src/components/PageHeader/PageHeader.stories.ts +79 -0
- package/src/components/PageHeader/PageHeader.vue +66 -0
- package/src/components/Popover/Popover.stories.ts +135 -0
- package/src/components/Popover/Popover.vue +192 -0
- package/src/components/Popover/popover.ts +20 -0
- package/src/components/Progress/Progress.stories.ts +74 -0
- package/src/components/Progress/Progress.vue +75 -0
- package/src/components/RadioGroup/RadioGroup.stories.ts +90 -0
- package/src/components/RadioGroup/RadioGroup.vue +132 -0
- package/src/components/RelativeTime/RelativeTime.stories.ts +74 -0
- package/src/components/RelativeTime/RelativeTime.vue +51 -0
- package/src/components/Select/Select.mdx +202 -0
- package/src/components/Select/Select.stories.ts +223 -0
- package/src/components/Select/Select.vue +630 -0
- package/src/components/Sidebar/Sidebar.stories.ts +192 -0
- package/src/components/Sidebar/Sidebar.vue +382 -0
- package/src/components/Sidebar/sidebar.ts +20 -0
- package/src/components/Slideover/Slideover.stories.ts +225 -0
- package/src/components/Slideover/Slideover.vue +365 -0
- package/src/components/Spinner/Spinner.stories.ts +79 -0
- package/src/components/Spinner/Spinner.vue +97 -0
- package/src/components/StatTile/StatTile.stories.ts +75 -0
- package/src/components/StatTile/StatTile.vue +89 -0
- package/src/components/SummaryList/SummaryList.stories.ts +103 -0
- package/src/components/SummaryList/SummaryList.vue +127 -0
- package/src/components/Switch/Switch.stories.ts +100 -0
- package/src/components/Switch/Switch.vue +96 -0
- package/src/components/Table/Table.stories.ts +206 -0
- package/src/components/Table/Table.vue +220 -0
- package/src/components/Table/table.test.ts +65 -0
- package/src/components/Table/table.ts +70 -0
- package/src/components/Tooltip/Tooltip.stories.ts +57 -0
- package/src/components/Tooltip/Tooltip.vue +86 -0
- package/src/examples/AppPages.stories.ts +500 -0
- package/src/examples/FormLayout.stories.ts +185 -0
- package/src/examples/KestonIdPages.stories.ts +415 -0
- package/src/examples/SchoolPages.stories.ts +665 -0
- package/src/index.ts +114 -36
- package/src/lib/cn.ts +4 -0
- package/src/lib/dates.test.ts +68 -0
- package/src/lib/dates.ts +86 -0
- package/src/lib/initials.ts +8 -0
- package/src/lib/parseDate.test.ts +331 -0
- package/src/lib/parseDate.ts +561 -0
- package/src/lib/useNow.ts +20 -0
- package/src/styles/theme.css +101 -0
- package/dist/components/AppLauncher.vue.d.ts +0 -10
- package/dist/components/Avatar.vue.d.ts +0 -16
- package/dist/components/Button.vue.d.ts +0 -27
- package/dist/components/Checkbox.vue.d.ts +0 -18
- package/dist/components/CloseButton.vue.d.ts +0 -6
- package/dist/components/Dialog.vue.d.ts +0 -23
- package/dist/components/Drawer.vue.d.ts +0 -34
- package/dist/components/DropdownMenu.vue.d.ts +0 -21
- package/dist/components/DropdownMenuItem.vue.d.ts +0 -19
- package/dist/components/DropdownMenuSeparator.vue.d.ts +0 -6
- package/dist/components/Input.vue.d.ts +0 -14
- package/dist/components/Label.vue.d.ts +0 -16
- package/dist/components/NotificationsMenu.vue.d.ts +0 -3
- package/dist/components/Popover.vue.d.ts +0 -23
- package/dist/components/ProfileSwitcher.vue.d.ts +0 -24
- package/dist/components/Select.vue.d.ts +0 -28
- package/dist/components/Separator.vue.d.ts +0 -11
- package/dist/components/ToastRenderer.vue.d.ts +0 -3
- package/dist/components/Toaster.vue.d.ts +0 -3
- package/dist/components/Tooltip.vue.d.ts +0 -23
- package/dist/components/TopBar.vue.d.ts +0 -34
- package/dist/favicon-old.svg +0 -1
- package/dist/favicon.svg +0 -1
- package/dist/keston-ui.cjs +0 -15
- package/dist/lib/toast.d.ts +0 -29
- package/dist/lib/types.d.ts +0 -5
- package/src/components/AppLauncher.vue +0 -63
- package/src/components/Avatar.vue +0 -51
- package/src/components/Button.vue +0 -54
- package/src/components/Checkbox.vue +0 -47
- package/src/components/CloseButton.vue +0 -24
- package/src/components/Dialog.vue +0 -65
- package/src/components/Drawer.vue +0 -202
- package/src/components/DropdownMenu.vue +0 -41
- package/src/components/DropdownMenuItem.vue +0 -28
- package/src/components/DropdownMenuSeparator.vue +0 -12
- package/src/components/Input.vue +0 -21
- package/src/components/Label.vue +0 -15
- package/src/components/NotificationsMenu.vue +0 -115
- package/src/components/Popover.vue +0 -46
- package/src/components/ProfileSwitcher.vue +0 -113
- package/src/components/Select.vue +0 -97
- package/src/components/Separator.vue +0 -30
- package/src/components/ToastItem.vue +0 -158
- package/src/components/ToastRenderer.vue +0 -113
- package/src/components/Toaster.vue +0 -11
- package/src/components/Tooltip.vue +0 -48
- package/src/components/TopBar.vue +0 -52
- package/src/lib/toast.ts +0 -95
- package/src/lib/types.ts +0 -5
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Component, HTMLAttributes } from 'vue';
|
|
2
|
+
import { BadgeProps } from '../Badge/Badge.vue';
|
|
3
|
+
export interface SidebarItem {
|
|
4
|
+
label: string;
|
|
5
|
+
/** A Lucide (or any) icon component. Needed for the item to make sense when collapsed. */
|
|
6
|
+
icon?: Component;
|
|
7
|
+
/** Link with a plain <a href>. */
|
|
8
|
+
href?: string;
|
|
9
|
+
/** Link through `linkComponent` (e.g. RouterLink), which receives `to`. */
|
|
10
|
+
to?: unknown;
|
|
11
|
+
/** The current page. Shown highlighted, and announced as aria-current="page". */
|
|
12
|
+
active?: boolean;
|
|
13
|
+
/** A count or short note on the right, e.g. unread messages. */
|
|
14
|
+
badge?: string | number;
|
|
15
|
+
/** Colour of the badge (default basic), e.g. red for something overdue. */
|
|
16
|
+
badgeColor?: BadgeProps['color'];
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Called when the item is chosen (for items that aren't links, or as well as navigating). */
|
|
19
|
+
onSelect?: (event: MouseEvent) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Sub-pages. Choosing this item shows them in place of the list, with a
|
|
22
|
+
* back row (‹ and this item's label) at the top, instead of navigating.
|
|
23
|
+
* e.g. School › School Structure › New School Year Setup.
|
|
24
|
+
*/
|
|
25
|
+
children?: SidebarItem[];
|
|
26
|
+
}
|
|
27
|
+
export interface SidebarSection {
|
|
28
|
+
/** Heading above the section's items. */
|
|
29
|
+
label?: string;
|
|
30
|
+
items: SidebarItem[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The app's main navigation, down the left of the page. Items can be links
|
|
34
|
+
* (`href`, or `to` with a router link component) or buttons (`onSelect`), and
|
|
35
|
+
* can be grouped into labelled sections, and nested (`children`): choosing
|
|
36
|
+
* an item with children shows them, with a back row to return. Opens at the
|
|
37
|
+
* level of the current page. Can collapse to a narrow strip of icons.
|
|
38
|
+
*
|
|
39
|
+
* For a Breadcrumb that follows it, use `sidebarTrail(items, sections)`.
|
|
40
|
+
*
|
|
41
|
+
* On small screens, put it inside a Slideover (`side="left"`) opened from the
|
|
42
|
+
* Header's menu button. See Examples/App shell.
|
|
43
|
+
*
|
|
44
|
+
* Slots: header (top, e.g. a logo), footer (bottom, e.g. settings or a
|
|
45
|
+
* profile), item (replaces each item's content: `{ item, active, collapsed }`).
|
|
46
|
+
*/
|
|
47
|
+
export interface SidebarProps {
|
|
48
|
+
/** Items in a single section. Use `sections` for headings. */
|
|
49
|
+
items?: SidebarItem[];
|
|
50
|
+
/** Groups of items, each with an optional heading. Shown after `items`. */
|
|
51
|
+
sections?: SidebarSection[];
|
|
52
|
+
/** Accessible name of the navigation landmark. */
|
|
53
|
+
label?: string;
|
|
54
|
+
/** Show the collapse / expand button in the footer. */
|
|
55
|
+
collapsible?: boolean;
|
|
56
|
+
/** Component used for items with `to`, e.g. RouterLink or NuxtLink. */
|
|
57
|
+
linkComponent?: string | Component;
|
|
58
|
+
class?: HTMLAttributes['class'];
|
|
59
|
+
/** Extra classes for the parts. */
|
|
60
|
+
ui?: {
|
|
61
|
+
header?: HTMLAttributes['class'];
|
|
62
|
+
body?: HTMLAttributes['class'];
|
|
63
|
+
footer?: HTMLAttributes['class'];
|
|
64
|
+
item?: HTMLAttributes['class'];
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
type __VLS_Props = SidebarProps;
|
|
68
|
+
type __VLS_Slots = {
|
|
69
|
+
header?(props: {
|
|
70
|
+
collapsed: boolean;
|
|
71
|
+
}): unknown;
|
|
72
|
+
footer?(props: {
|
|
73
|
+
collapsed: boolean;
|
|
74
|
+
}): unknown;
|
|
75
|
+
item?(props: {
|
|
76
|
+
item: SidebarItem;
|
|
77
|
+
active: boolean;
|
|
78
|
+
collapsed: boolean;
|
|
79
|
+
}): unknown;
|
|
80
|
+
};
|
|
81
|
+
type __VLS_ModelProps = {
|
|
82
|
+
/** Narrow, icons only. Optional: use v-model:collapsed to control it. */
|
|
83
|
+
'collapsed'?: boolean;
|
|
84
|
+
};
|
|
85
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
86
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
87
|
+
select: (item: SidebarItem, event: MouseEvent) => any;
|
|
88
|
+
"update:collapsed": (value: boolean) => any;
|
|
89
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
90
|
+
onSelect?: ((item: SidebarItem, event: MouseEvent) => any) | undefined;
|
|
91
|
+
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
92
|
+
}>, {
|
|
93
|
+
label: string;
|
|
94
|
+
items: SidebarItem[];
|
|
95
|
+
sections: SidebarSection[];
|
|
96
|
+
collapsible: boolean;
|
|
97
|
+
linkComponent: string | Component;
|
|
98
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
99
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
100
|
+
declare const _default: typeof __VLS_export;
|
|
101
|
+
export default _default;
|
|
102
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
103
|
+
new (): {
|
|
104
|
+
$slots: S;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SidebarItem, SidebarSection } from './Sidebar.vue';
|
|
2
|
+
/**
|
|
3
|
+
* The path to the current page (the item marked `active`) through nested
|
|
4
|
+
* items, top level first, e.g. [School, School Structure, New School Year
|
|
5
|
+
* Setup]. Empty when no item is active. Takes the same `items` and
|
|
6
|
+
* `sections` as the Sidebar, so a Breadcrumb can follow it:
|
|
7
|
+
*
|
|
8
|
+
* <Breadcrumb :items="sidebarTrail(items, sections)" />
|
|
9
|
+
*/
|
|
10
|
+
export declare function sidebarTrail(items?: SidebarItem[], sections?: SidebarSection[]): SidebarItem[];
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { DialogContentProps } from 'reka-ui';
|
|
3
|
+
/**
|
|
4
|
+
* A full-height panel that slides in from the side of the screen, e.g. to edit
|
|
5
|
+
* a record without leaving the page. Built on Reka UI's Dialog: focus is kept
|
|
6
|
+
* inside while open, Escape and clicking the overlay close it, the page behind
|
|
7
|
+
* doesn't scroll, and it is announced as a dialog.
|
|
8
|
+
*
|
|
9
|
+
* Slots: default (the trigger, e.g. a Button), header (replaces title,
|
|
10
|
+
* description and close), title, description, body (the scrolling middle),
|
|
11
|
+
* footer (e.g. Cancel / Save), content (replaces everything inside the panel).
|
|
12
|
+
* Slots that close it get `{ close }`.
|
|
13
|
+
*
|
|
14
|
+
* Multi-step forms: pass `steps` (one name per step) and show the current
|
|
15
|
+
* step's fields in the body slot, which gets `{ step }`. The header shows a
|
|
16
|
+
* segment per step and "Step 2 of 4: Contact details"; the footer gets
|
|
17
|
+
* Cancel / Previous and Next / Finish, unless you fill the footer slot.
|
|
18
|
+
* Enter in a text field presses Next / Finish.
|
|
19
|
+
*/
|
|
20
|
+
export interface SlideoverProps {
|
|
21
|
+
/** Heading of the panel. Also its accessible name, so always set it (or the title slot). */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Text under the title. */
|
|
24
|
+
description?: string;
|
|
25
|
+
/** Edge it slides in from. */
|
|
26
|
+
side?: 'right' | 'left' | 'top' | 'bottom';
|
|
27
|
+
/** Dim the page behind it. */
|
|
28
|
+
overlay?: boolean;
|
|
29
|
+
/** Show the × close button in the header. */
|
|
30
|
+
close?: boolean;
|
|
31
|
+
/** Close on Escape and on clicking outside. If false, emits close:prevent instead. */
|
|
32
|
+
dismissible?: boolean;
|
|
33
|
+
/** Block interaction with the page behind while open. */
|
|
34
|
+
modal?: boolean;
|
|
35
|
+
/** Open when first shown. */
|
|
36
|
+
defaultOpen?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Where focus goes when it opens:
|
|
39
|
+
* - none (default): the panel itself, so screen readers announce the title
|
|
40
|
+
* and description and read from the top. Tab then moves to the first
|
|
41
|
+
* control.
|
|
42
|
+
* - auto: an element marked `autofocus`, else the first form field, else
|
|
43
|
+
* the × button. On touch screens it skips text fields, so the keyboard
|
|
44
|
+
* doesn't pop up before the panel has been seen.
|
|
45
|
+
* - close: the × button (or the first button, if there's no ×).
|
|
46
|
+
*/
|
|
47
|
+
initialFocus?: 'auto' | 'close' | 'none';
|
|
48
|
+
/** Render at the end of the page (true), inside a given element, or in place (false). */
|
|
49
|
+
portal?: boolean | string | HTMLElement;
|
|
50
|
+
/** Passed to Reka's DialogContent. */
|
|
51
|
+
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>;
|
|
52
|
+
/** Names of the steps, for a multi-step form. Adds the segments, step name and Previous / Next. */
|
|
53
|
+
steps?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Checks the current step before moving on (Next) or finishing (Finish).
|
|
56
|
+
* Return false to stay, e.g. after showing field errors. Can be async, e.g.
|
|
57
|
+
* to save on the last step; the button shows a spinner meanwhile.
|
|
58
|
+
*/
|
|
59
|
+
validateStep?: (step: number) => boolean | Promise<boolean>;
|
|
60
|
+
/** Text of the last step's button. */
|
|
61
|
+
finishLabel?: string;
|
|
62
|
+
/** Extra classes for the parts. */
|
|
63
|
+
ui?: {
|
|
64
|
+
overlay?: HTMLAttributes['class'];
|
|
65
|
+
content?: HTMLAttributes['class'];
|
|
66
|
+
header?: HTMLAttributes['class'];
|
|
67
|
+
title?: HTMLAttributes['class'];
|
|
68
|
+
body?: HTMLAttributes['class'];
|
|
69
|
+
footer?: HTMLAttributes['class'];
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
type __VLS_Props = SlideoverProps;
|
|
73
|
+
type __VLS_Slots = {
|
|
74
|
+
default?(): unknown;
|
|
75
|
+
header?(props: {
|
|
76
|
+
close: () => void;
|
|
77
|
+
}): unknown;
|
|
78
|
+
title?(): unknown;
|
|
79
|
+
description?(): unknown;
|
|
80
|
+
body?(props: {
|
|
81
|
+
close: () => void;
|
|
82
|
+
step: number;
|
|
83
|
+
}): unknown;
|
|
84
|
+
footer?(props: {
|
|
85
|
+
close: () => void;
|
|
86
|
+
}): unknown;
|
|
87
|
+
content?(props: {
|
|
88
|
+
close: () => void;
|
|
89
|
+
}): unknown;
|
|
90
|
+
};
|
|
91
|
+
type __VLS_ModelProps = {
|
|
92
|
+
/** Whether it is open. Optional: use v-model:open to control it. */
|
|
93
|
+
'open'?: boolean | undefined;
|
|
94
|
+
/** Current step, from 0. Optional: use v-model:step to control it. Back to 0 each time it opens. */
|
|
95
|
+
'step'?: number;
|
|
96
|
+
};
|
|
97
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
98
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
99
|
+
"close:prevent": () => any;
|
|
100
|
+
"update:open": (value: boolean | undefined) => any;
|
|
101
|
+
finish: () => any;
|
|
102
|
+
"update:step": (value: number) => any;
|
|
103
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
104
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
105
|
+
"onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
|
|
106
|
+
onFinish?: (() => any) | undefined;
|
|
107
|
+
"onUpdate:step"?: ((value: number) => any) | undefined;
|
|
108
|
+
}>, {
|
|
109
|
+
side: "bottom" | "top" | "right" | "left";
|
|
110
|
+
portal: string | boolean | HTMLElement;
|
|
111
|
+
dismissible: boolean;
|
|
112
|
+
modal: boolean;
|
|
113
|
+
close: boolean;
|
|
114
|
+
overlay: boolean;
|
|
115
|
+
initialFocus: "none" | "close" | "auto";
|
|
116
|
+
finishLabel: string;
|
|
117
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
118
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
119
|
+
declare const _default: typeof __VLS_export;
|
|
120
|
+
export default _default;
|
|
121
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
122
|
+
new (): {
|
|
123
|
+
$slots: S;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* A circular progress indicator.
|
|
4
|
+
*
|
|
5
|
+
* - No `value` (or `null`): continuous spinner, for waits of unknown length.
|
|
6
|
+
* - `value` from 0 to `max`: a ring that fills as the value goes up.
|
|
7
|
+
*
|
|
8
|
+
* It takes the surrounding text colour, like an icon, so put a text colour
|
|
9
|
+
* class on it or its parent (e.g. `class="text-primary"`).
|
|
10
|
+
*/
|
|
11
|
+
export interface SpinnerProps {
|
|
12
|
+
/** Progress from 0 to `max`. Leave out (or null) for a continuous spinner. */
|
|
13
|
+
value?: number | null;
|
|
14
|
+
/** The value that means complete. */
|
|
15
|
+
max?: number;
|
|
16
|
+
/** sm 16px (button icon size) · md 24px · lg 48px */
|
|
17
|
+
size?: 'sm' | 'md' | 'lg';
|
|
18
|
+
/** What is loading, read by screen readers, e.g. "Uploading report". */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Show the percentage in the middle. Only on `lg`, and only with a value. */
|
|
21
|
+
showValue?: boolean;
|
|
22
|
+
class?: HTMLAttributes['class'];
|
|
23
|
+
}
|
|
24
|
+
declare const __VLS_export: import('vue').DefineComponent<SpinnerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpinnerProps> & Readonly<{}>, {
|
|
25
|
+
max: number;
|
|
26
|
+
size: "sm" | "md" | "lg";
|
|
27
|
+
label: string;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, HTMLAttributes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* One number that matters, in a small Card: "Open applications 48".
|
|
4
|
+
* Put several in a grid. Optionally with how it's changed ("+12% on last
|
|
5
|
+
* year") and a short description.
|
|
6
|
+
*
|
|
7
|
+
* Slots: value (e.g. a value with a unit in smaller text), description,
|
|
8
|
+
* footer (e.g. a "View all" link).
|
|
9
|
+
*/
|
|
10
|
+
export interface StatTileProps {
|
|
11
|
+
/** What the number is, e.g. "Open applications". */
|
|
12
|
+
label: string;
|
|
13
|
+
/** The number, already formatted, e.g. "1,204" or "96%". */
|
|
14
|
+
value?: string | number;
|
|
15
|
+
/** Icon before the label. Decorative. */
|
|
16
|
+
icon?: Component;
|
|
17
|
+
/** How it's changed, already formatted, e.g. "+12%" or "−3". */
|
|
18
|
+
change?: string;
|
|
19
|
+
/** What the change is against, e.g. "on last year". Read after the change. */
|
|
20
|
+
changeLabel?: string;
|
|
21
|
+
/** Which way it went. Sets the arrow. */
|
|
22
|
+
trend?: 'up' | 'down' | 'flat';
|
|
23
|
+
/**
|
|
24
|
+
* Whether the change is good, which sets the colour: green good, red bad,
|
|
25
|
+
* grey neutral. Defaults to up good, down bad, flat neutral. Set it when
|
|
26
|
+
* down is good, e.g. absences.
|
|
27
|
+
*/
|
|
28
|
+
sentiment?: 'positive' | 'negative' | 'neutral';
|
|
29
|
+
/** Grey text under the value. */
|
|
30
|
+
description?: string;
|
|
31
|
+
class?: HTMLAttributes['class'];
|
|
32
|
+
}
|
|
33
|
+
type __VLS_Slots = {
|
|
34
|
+
value?(): unknown;
|
|
35
|
+
description?(): unknown;
|
|
36
|
+
footer?(): unknown;
|
|
37
|
+
};
|
|
38
|
+
declare const __VLS_base: import('vue').DefineComponent<StatTileProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StatTileProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Labelled values, e.g. a record's details or a summary before you submit:
|
|
4
|
+
* "Email office@keston.school". A description list (`<dl>`) underneath.
|
|
5
|
+
*
|
|
6
|
+
* Layouts:
|
|
7
|
+
* - rows (default): label on the left, value beside it, a line between rows.
|
|
8
|
+
* Stacks the label above the value when the container is narrow (under
|
|
9
|
+
* 384px). With an action per row (e.g. Change) for check-your-answers pages.
|
|
10
|
+
* - compact: label left, value right-aligned, no lines. For figures in a
|
|
11
|
+
* sidebar or summary card ("Moving up a year 1,204").
|
|
12
|
+
* - stacked: label above value, in a grid of up to 3 columns as space
|
|
13
|
+
* allows. For a lot of short facts.
|
|
14
|
+
*
|
|
15
|
+
* Slots: value (scoped `{ item, index }`, for a Badge, link, etc.), action
|
|
16
|
+
* (scoped, e.g. a Change button).
|
|
17
|
+
*/
|
|
18
|
+
export interface SummaryListItem {
|
|
19
|
+
label: string;
|
|
20
|
+
/** Shown as text. Empty shows "—" (read as "Not set"). Use the value slot for anything richer. */
|
|
21
|
+
value?: string | number | null;
|
|
22
|
+
/** Smaller grey text under the value. */
|
|
23
|
+
description?: string;
|
|
24
|
+
/** Bold value, e.g. a total. */
|
|
25
|
+
emphasis?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface SummaryListProps<Item extends SummaryListItem = SummaryListItem> {
|
|
28
|
+
items: Item[];
|
|
29
|
+
layout?: 'rows' | 'compact' | 'stacked';
|
|
30
|
+
/** Width of the label column in the rows layout. */
|
|
31
|
+
labelWidth?: 'sm' | 'md' | 'lg';
|
|
32
|
+
/** What an empty value is read as. */
|
|
33
|
+
emptyLabel?: string;
|
|
34
|
+
class?: HTMLAttributes['class'];
|
|
35
|
+
}
|
|
36
|
+
declare const __VLS_export: <Item extends SummaryListItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
37
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<SummaryListProps<Item>> & (typeof globalThis extends {
|
|
38
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
39
|
+
} ? P : {});
|
|
40
|
+
expose: (exposed: {}) => void;
|
|
41
|
+
attrs: any;
|
|
42
|
+
slots: {
|
|
43
|
+
value?(props: {
|
|
44
|
+
item: Item;
|
|
45
|
+
index: number;
|
|
46
|
+
}): unknown;
|
|
47
|
+
action?(props: {
|
|
48
|
+
item: Item;
|
|
49
|
+
index: number;
|
|
50
|
+
}): unknown;
|
|
51
|
+
};
|
|
52
|
+
emit: {};
|
|
53
|
+
}>) => import('vue').VNode & {
|
|
54
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
55
|
+
};
|
|
56
|
+
declare const _default: typeof __VLS_export;
|
|
57
|
+
export default _default;
|
|
58
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
59
|
+
[K in keyof T]: T[K];
|
|
60
|
+
} : {
|
|
61
|
+
[K in keyof T as K]: T[K];
|
|
62
|
+
}) & {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { FieldStatus } from '../FormField/FieldMessage.vue';
|
|
3
|
+
/**
|
|
4
|
+
* Turns a setting on or off straight away, with no Save button, e.g. "Email
|
|
5
|
+
* me when an application arrives". For an answer that's sent with a form,
|
|
6
|
+
* use Checkbox.
|
|
7
|
+
*
|
|
8
|
+
* As the change saves immediately, it can show how that went: `status`
|
|
9
|
+
* 'loading' with "Saving…", then 'success' or 'error'.
|
|
10
|
+
*/
|
|
11
|
+
export interface SwitchProps {
|
|
12
|
+
/** Visible label, beside the switch. Pressing it flips the switch too. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** More detail, in smaller text under the label. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Error message. Overrides `status` and `statusText`. */
|
|
17
|
+
errorText?: string;
|
|
18
|
+
/** Colours the status text: e.g. 'loading' while the change saves. */
|
|
19
|
+
status?: FieldStatus;
|
|
20
|
+
/** Message under the switch, e.g. "Saving…" or "Couldn't save. Try again." */
|
|
21
|
+
statusText?: string;
|
|
22
|
+
/** Name for native form submission. */
|
|
23
|
+
name?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
class?: HTMLAttributes['class'];
|
|
26
|
+
}
|
|
27
|
+
type __VLS_Props = SwitchProps;
|
|
28
|
+
type __VLS_ModelProps = {
|
|
29
|
+
/** On or off. */
|
|
30
|
+
modelValue?: boolean;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
33
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
"update:modelValue": (value: boolean) => any;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { TableColumn, TableSort } from './table';
|
|
3
|
+
/**
|
|
4
|
+
* Rows of data with column headings: applicants, classes, invoices.
|
|
5
|
+
*
|
|
6
|
+
* No border or background of its own: put it in a `<Card padding="none">`,
|
|
7
|
+
* which gives the white panel, and the table runs to its edges.
|
|
8
|
+
*
|
|
9
|
+
* Cells show `row[column.key]` as text. For anything else (a Badge, a link,
|
|
10
|
+
* a menu) use the slot `#cell-{key}`, which gets `{ row, value, index }`.
|
|
11
|
+
*
|
|
12
|
+
* Sorting: mark columns `sortable`. The table sorts the rows itself; with
|
|
13
|
+
* `manualSort` it only reports the sort (`v-model:sort`) so you can sort on
|
|
14
|
+
* the server.
|
|
15
|
+
*
|
|
16
|
+
* Slots: cell-{key}, header-{key}, empty, footer (rows for a `<tfoot>`,
|
|
17
|
+
* e.g. totals), caption.
|
|
18
|
+
*/
|
|
19
|
+
export interface TableProps<Row = Record<string, any>> {
|
|
20
|
+
columns: TableColumn<Row>[];
|
|
21
|
+
rows: Row[];
|
|
22
|
+
/** Unique field on each row, or a function returning one. Used to keep rows stable when sorting. */
|
|
23
|
+
rowKey?: (keyof Row & string) | ((row: Row, index: number) => string | number);
|
|
24
|
+
/**
|
|
25
|
+
* What the table shows, e.g. "Applications for September 2027". The
|
|
26
|
+
* table's accessible name. Hidden unless `showCaption`.
|
|
27
|
+
*/
|
|
28
|
+
caption?: string;
|
|
29
|
+
showCaption?: boolean;
|
|
30
|
+
/** Shown when there are no rows. */
|
|
31
|
+
emptyText?: string;
|
|
32
|
+
/** Show a spinner (no rows yet), or dim the rows (refreshing). */
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
/** md (default) 12px above and below each cell, sm 8px for dense tables. */
|
|
35
|
+
size?: 'sm' | 'md';
|
|
36
|
+
/** Keep the header row in view while the table scrolls. Give the table a max height (`class="max-h-96"`). */
|
|
37
|
+
stickyHeader?: boolean;
|
|
38
|
+
/** Don't sort the rows: just update `sort`, e.g. to sort on the server. */
|
|
39
|
+
manualSort?: boolean;
|
|
40
|
+
class?: HTMLAttributes['class'];
|
|
41
|
+
ui?: {
|
|
42
|
+
table?: HTMLAttributes['class'];
|
|
43
|
+
header?: HTMLAttributes['class'];
|
|
44
|
+
row?: HTMLAttributes['class'];
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
declare const __VLS_export: <Row extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
48
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<(TableProps<Row> & {
|
|
49
|
+
sort?: TableSort | null;
|
|
50
|
+
}) & {
|
|
51
|
+
"onUpdate:sort"?: ((value: TableSort | null) => any) | undefined;
|
|
52
|
+
}> & (typeof globalThis extends {
|
|
53
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
54
|
+
} ? P : {});
|
|
55
|
+
expose: (exposed: {}) => void;
|
|
56
|
+
attrs: any;
|
|
57
|
+
slots: {
|
|
58
|
+
caption?(): unknown;
|
|
59
|
+
empty?(): unknown;
|
|
60
|
+
footer?(): unknown;
|
|
61
|
+
} & {
|
|
62
|
+
[key: `cell-${string}`]: ((props: {
|
|
63
|
+
row: Row;
|
|
64
|
+
value: any;
|
|
65
|
+
index: number;
|
|
66
|
+
}) => unknown) | undefined;
|
|
67
|
+
} & {
|
|
68
|
+
[key: `header-${string}`]: ((props: {
|
|
69
|
+
column: TableColumn<Row>;
|
|
70
|
+
}) => unknown) | undefined;
|
|
71
|
+
};
|
|
72
|
+
emit: (event: "update:sort", value: TableSort | null) => void;
|
|
73
|
+
}>) => import('vue').VNode & {
|
|
74
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
75
|
+
};
|
|
76
|
+
declare const _default: typeof __VLS_export;
|
|
77
|
+
export default _default;
|
|
78
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
79
|
+
[K in keyof T]: T[K];
|
|
80
|
+
} : {
|
|
81
|
+
[K in keyof T as K]: T[K];
|
|
82
|
+
}) & {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type SortDirection = 'asc' | 'desc';
|
|
2
|
+
export interface TableSort {
|
|
3
|
+
key: string;
|
|
4
|
+
direction: SortDirection;
|
|
5
|
+
}
|
|
6
|
+
export interface TableColumn<Row = Record<string, unknown>> {
|
|
7
|
+
/** Field on each row, and the name of the cell slot (`#cell-{key}`). */
|
|
8
|
+
key: string;
|
|
9
|
+
/** Header text. */
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Visually hide the header (it's still read out), e.g. for an actions
|
|
13
|
+
* column. The label is still required.
|
|
14
|
+
*/
|
|
15
|
+
hideLabel?: boolean;
|
|
16
|
+
/** start (default) or end. Use end for numbers, so the digits line up. */
|
|
17
|
+
align?: 'start' | 'end';
|
|
18
|
+
/** Let people sort by this column. */
|
|
19
|
+
sortable?: boolean;
|
|
20
|
+
/** What to sort by, when it isn't `row[key]` (e.g. a date's timestamp). */
|
|
21
|
+
sortValue?: (row: Row) => unknown;
|
|
22
|
+
/** The row's heading: its first cell is a `<th scope="row">`. One column at most. */
|
|
23
|
+
rowHeader?: boolean;
|
|
24
|
+
/** Keep the text on one line. Default true; turn off for long text. */
|
|
25
|
+
nowrap?: boolean;
|
|
26
|
+
/** Extra classes for this column's header and cells, e.g. a width. */
|
|
27
|
+
class?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Sorts a copy of `rows`. Stable, so rows that tie keep their order. Text
|
|
31
|
+
* sorts naturally ("Year 2" before "Year 10") and ignores case; empty values
|
|
32
|
+
* go last in both directions.
|
|
33
|
+
*/
|
|
34
|
+
export declare function sortRows<Row>(rows: readonly Row[], columns: readonly TableColumn<Row>[], sort?: TableSort | null): Row[];
|
|
35
|
+
/** Clicking a header: ascending, then descending, then back to unsorted. */
|
|
36
|
+
export declare function nextSort(current: TableSort | null | undefined, key: string): TableSort | null;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { TooltipContentProps } from 'reka-ui';
|
|
3
|
+
/**
|
|
4
|
+
* A short label that appears on hover or keyboard focus: the exact date
|
|
5
|
+
* behind "3 hours ago", a birthday behind an age, the name of an icon
|
|
6
|
+
* button.
|
|
7
|
+
*
|
|
8
|
+
* Only for extra, non-essential detail: it doesn't open on touch screens,
|
|
9
|
+
* so anything people need must be on the page too. Nothing interactive
|
|
10
|
+
* inside it (use a Popover).
|
|
11
|
+
*
|
|
12
|
+
* The trigger (default slot) must be focusable, so keyboard users can open
|
|
13
|
+
* it: a Button, a link, or an element with `tabindex="0"`. The tooltip is
|
|
14
|
+
* linked to it with `aria-describedby`, so screen readers read it after the
|
|
15
|
+
* trigger's name.
|
|
16
|
+
*
|
|
17
|
+
* Slots: default (the trigger), content (instead of `text`).
|
|
18
|
+
*/
|
|
19
|
+
export interface TooltipProps {
|
|
20
|
+
/** The tooltip's text. */
|
|
21
|
+
text?: string;
|
|
22
|
+
/** Which side of the trigger. */
|
|
23
|
+
side?: TooltipContentProps['side'];
|
|
24
|
+
align?: TooltipContentProps['align'];
|
|
25
|
+
/** Wait this long before showing, in ms. Moving to another tooltip soon after shows it at once. */
|
|
26
|
+
delay?: number;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
class?: HTMLAttributes['class'];
|
|
29
|
+
}
|
|
30
|
+
type __VLS_Slots = {
|
|
31
|
+
default?(): unknown;
|
|
32
|
+
content?(): unknown;
|
|
33
|
+
};
|
|
34
|
+
declare const __VLS_base: import('vue').DefineComponent<TooltipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TooltipProps> & Readonly<{}>, {
|
|
35
|
+
side: "bottom" | "top" | "right" | "left";
|
|
36
|
+
align: "end" | "start" | "center";
|
|
37
|
+
delay: number;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|