@nubisco/ui 3.2.0 → 3.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/dist/components/Button.vue.d.ts.map +1 -1
- package/dist/components/Charts/GanttChart.vue.d.ts.map +1 -1
- package/dist/components/Charts/InterpolationChart.vue.d.ts.map +1 -1
- package/dist/components/Charts/shared/palette.d.ts +76 -1
- package/dist/components/Charts/shared/palette.d.ts.map +1 -1
- package/dist/components/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Confirm.d.ts +199 -0
- package/dist/components/Confirm.env.d.ts +52 -0
- package/dist/components/Confirm.env.d.ts.map +1 -0
- package/dist/components/Confirm.vue.d.ts +61 -0
- package/dist/components/Confirm.vue.d.ts.map +1 -0
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/InlineLoading.d.ts +37 -0
- package/dist/components/InlineLoading.vue.d.ts +30 -0
- package/dist/components/InlineLoading.vue.d.ts.map +1 -0
- package/dist/components/MenuItem.vue.d.ts +1 -1
- package/dist/components/Modal.d.ts +35 -1
- package/dist/components/Modal.vue.d.ts +10 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter.d.ts +184 -0
- package/dist/components/NotificationCenter.vue.d.ts +130 -0
- package/dist/components/NotificationCenter.vue.d.ts.map +1 -0
- package/dist/components/NotificationCenterItem.d.ts +53 -0
- package/dist/components/NotificationCenterItem.vue.d.ts +36 -0
- package/dist/components/NotificationCenterItem.vue.d.ts.map +1 -0
- package/dist/components/ProgressBar.vue.d.ts.map +1 -1
- package/dist/components/Shell.d.ts +138 -8
- package/dist/components/Shell.vue.d.ts +30 -3
- package/dist/components/Shell.vue.d.ts.map +1 -1
- package/dist/components/ShellPanel.d.ts +16 -0
- package/dist/components/ShellPanel.vue.d.ts +1 -0
- package/dist/components/ShellPanel.vue.d.ts.map +1 -1
- package/dist/components/SidebarLink.d.ts +14 -1
- package/dist/components/Skeleton.d.ts +87 -0
- package/dist/components/Skeleton.vue.d.ts +17 -0
- package/dist/components/Skeleton.vue.d.ts.map +1 -0
- package/dist/components/Spinner.d.ts +80 -0
- package/dist/components/Spinner.overlay.d.ts +56 -0
- package/dist/components/Spinner.overlay.d.ts.map +1 -0
- package/dist/components/Spinner.vue.d.ts +25 -0
- package/dist/components/Spinner.vue.d.ts.map +1 -0
- package/dist/components/Stepper.context.d.ts +48 -0
- package/dist/components/Stepper.context.d.ts.map +1 -0
- package/dist/components/Stepper.d.ts +101 -0
- package/dist/components/Stepper.vue.d.ts +31 -0
- package/dist/components/Stepper.vue.d.ts.map +1 -0
- package/dist/components/StepperStep.vue.d.ts +24 -0
- package/dist/components/StepperStep.vue.d.ts.map +1 -0
- package/dist/components/TextInput.vue.d.ts +2 -2
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/components/Toast.vue.d.ts +43 -0
- package/dist/components/Toast.vue.d.ts.map +1 -1
- package/dist/components/Toaster.d.ts +93 -0
- package/dist/components/Toaster.vue.d.ts +30 -0
- package/dist/components/Toaster.vue.d.ts.map +1 -0
- package/dist/components/UserMenu.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/composables/useConfirm.composable.d.ts +45 -0
- package/dist/composables/useConfirm.composable.d.ts.map +1 -0
- package/dist/composables/useInlineLoading.composable.d.ts +43 -0
- package/dist/composables/useInlineLoading.composable.d.ts.map +1 -0
- package/dist/composables/useLoadingAnnouncer.composable.d.ts +63 -0
- package/dist/composables/useLoadingAnnouncer.composable.d.ts.map +1 -0
- package/dist/composables/useScrollLock.composable.d.ts +47 -0
- package/dist/composables/useScrollLock.composable.d.ts.map +1 -0
- package/dist/composables/useShellSlot.composable.d.ts +193 -0
- package/dist/composables/useShellSlot.composable.d.ts.map +1 -0
- package/dist/composables/useToast.composable.d.ts +325 -0
- package/dist/composables/useToast.composable.d.ts.map +1 -0
- package/dist/directives/ToolTip.content.d.ts +20 -0
- package/dist/directives/ToolTip.content.d.ts.map +1 -0
- package/dist/directives/ToolTip.directive.d.ts +94 -8
- package/dist/directives/ToolTip.directive.d.ts.map +1 -1
- package/dist/global.d.ts +18 -0
- package/dist/index.cjs +8 -9
- package/dist/index.mjs +17643 -14497
- package/dist/main.d.ts +43 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/src/styles/_theme.scss +171 -0
- package/src/styles/directives/_tooltip.scss +143 -21
|
@@ -30,4 +30,20 @@ export interface IShellPanelProps {
|
|
|
30
30
|
* @default false
|
|
31
31
|
*/
|
|
32
32
|
fluid?: boolean
|
|
33
|
+
/**
|
|
34
|
+
* Claim the parent's height and scroll internally. Same name and same
|
|
35
|
+
* semantics as `fill` on NbDataTable: the panel becomes a flex item that
|
|
36
|
+
* takes the space left in a bounded flex column, its header stays pinned,
|
|
37
|
+
* and the content region gets the scrollbar.
|
|
38
|
+
*
|
|
39
|
+
* Like the table, it claims a height rather than creating one: an ancestor
|
|
40
|
+
* has to bound it (a flex column with `min-height: 0`, which NbShell's
|
|
41
|
+
* `bottom` region and inspector column already are).
|
|
42
|
+
*
|
|
43
|
+
* Wins over `fluid` when both are set, and has no effect on a `collapsed`
|
|
44
|
+
* panel, which is header-only by definition.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
fill?: boolean
|
|
33
49
|
}
|
|
@@ -18,6 +18,7 @@ declare const __VLS_base: import("vue").DefineComponent<IShellPanelProps, {
|
|
|
18
18
|
"onUpdate:size"?: ((size: TShellPanelSize) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
20
|
size: TShellPanelSize;
|
|
21
|
+
fill: boolean;
|
|
21
22
|
title: string;
|
|
22
23
|
fluid: boolean;
|
|
23
24
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellPanel.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShellPanel.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShellPanel.vue.d.ts","sourceRoot":"","sources":["../../src/components/ShellPanel.vue"],"names":[],"mappings":"AAwWA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAyBvE,iBAAS,OAAO,CAAC,IAAI,EAAE,eAAe,QAErC;AAkND,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AACjF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;;;;;;6EAKd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -8,7 +8,20 @@ interface ISidebarLinkProps {
|
|
|
8
8
|
to?: string | Record<string, unknown>
|
|
9
9
|
/** External href — renders as a plain `<a>`. Used when `to` is not set. */
|
|
10
10
|
href?: string
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Tooltip text shown to the right of the sidebar on hover.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Use the `v-nb-tooltip` directive instead. This prop renders a
|
|
15
|
+
* CSS-only `::after` chip that is hover-only (a keyboard user tabbing the
|
|
16
|
+
* sidebar gets nothing), gives the link no accessible name, cannot flip or
|
|
17
|
+
* clamp against the viewport, and is fixed to the right of the anchor, so it
|
|
18
|
+
* is clipped by any sidebar that is not the shell's own. It works only on
|
|
19
|
+
* this one component, which is why three apps rebuilt the affordance by hand
|
|
20
|
+
* for their topbars. `v-nb-tooltip="{ body: 'Settings' }"` replaces it and
|
|
21
|
+
* additionally names the link for assistive technology. The prop still works
|
|
22
|
+
* and is not scheduled for removal, but new code should not use it.
|
|
23
|
+
* See /ui/directives/tooltip.
|
|
24
|
+
*/
|
|
12
25
|
tooltip?: string
|
|
13
26
|
/** Marks the link as the currently active route. */
|
|
14
27
|
active?: boolean
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { IDefaultProps } from '../types/Props.d'
|
|
2
|
+
|
|
3
|
+
enum ESkeletonVariant {
|
|
4
|
+
/** One or more body text lines, sized from a type set. */
|
|
5
|
+
Text = 'text',
|
|
6
|
+
/** A single line sized from a heading type set. */
|
|
7
|
+
Heading = 'heading',
|
|
8
|
+
/** A rectangle: cards, images, charts, map panes, table cells. */
|
|
9
|
+
Block = 'block',
|
|
10
|
+
/** A circle: avatars and round icon buttons. */
|
|
11
|
+
Circle = 'circle',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Type sets the text and heading variants can borrow their metrics from.
|
|
16
|
+
* These are the same names the `--nb-type-*` custom properties are generated
|
|
17
|
+
* from, so a skeleton line is exactly as tall as the text that replaces it.
|
|
18
|
+
*
|
|
19
|
+
* The code sets are here because monospaced blocks are the worst offenders for
|
|
20
|
+
* layout shift: a JSON viewer placeholder measured with body metrics is a
|
|
21
|
+
* different height from the code that lands in it. `display-01` and
|
|
22
|
+
* `display-02` are left out on purpose, since marketing hero type does not
|
|
23
|
+
* arrive asynchronously.
|
|
24
|
+
*/
|
|
25
|
+
type TSkeletonTypeSet =
|
|
26
|
+
| 'label-sm'
|
|
27
|
+
| 'label-md'
|
|
28
|
+
| 'label-lg'
|
|
29
|
+
| 'body-sm'
|
|
30
|
+
| 'body-md'
|
|
31
|
+
| 'body-lg'
|
|
32
|
+
| 'code-sm'
|
|
33
|
+
| 'code-md'
|
|
34
|
+
| 'code-lg'
|
|
35
|
+
| 'heading-01'
|
|
36
|
+
| 'heading-02'
|
|
37
|
+
| 'heading-03'
|
|
38
|
+
| 'heading-04'
|
|
39
|
+
| 'heading-05'
|
|
40
|
+
| 'heading-06'
|
|
41
|
+
|
|
42
|
+
interface ISkeletonProps extends IDefaultProps {
|
|
43
|
+
/** Shape family. */
|
|
44
|
+
variant?: `${ESkeletonVariant}`
|
|
45
|
+
/** Type set the line height is derived from. Text and heading variants only. */
|
|
46
|
+
type?: TSkeletonTypeSet
|
|
47
|
+
/** Number of text lines. Text variant only. */
|
|
48
|
+
lines?: number
|
|
49
|
+
/**
|
|
50
|
+
* Width of the last line when there is more than one, so a paragraph does
|
|
51
|
+
* not read as a solid rectangle. Any CSS length or percentage.
|
|
52
|
+
*/
|
|
53
|
+
lastLineWidth?: string
|
|
54
|
+
/** Width of the placeholder. A number is treated as pixels. */
|
|
55
|
+
width?: string | number
|
|
56
|
+
/**
|
|
57
|
+
* Height of the placeholder. Block and circle variants only: text sizes
|
|
58
|
+
* itself from `type`. A number is treated as pixels.
|
|
59
|
+
*/
|
|
60
|
+
height?: string | number
|
|
61
|
+
/** Corner radius step. Ignored by the circle variant. */
|
|
62
|
+
radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'pill'
|
|
63
|
+
/** Turns the shimmer off. Static placeholders still read as loading. */
|
|
64
|
+
animated?: boolean
|
|
65
|
+
/**
|
|
66
|
+
* Accessible announcement. Set it on ONE skeleton per loading region and
|
|
67
|
+
* leave the rest silent, otherwise a table of forty placeholders announces
|
|
68
|
+
* itself forty times.
|
|
69
|
+
*/
|
|
70
|
+
label?: string
|
|
71
|
+
/**
|
|
72
|
+
* Announced once, politely, when the skeleton unmounts ("Comments loaded").
|
|
73
|
+
* The swap from placeholder to content is silent otherwise: the live region
|
|
74
|
+
* that said "loading" is removed at the same moment the content arrives, so
|
|
75
|
+
* nothing is left to speak. Set it on the same single skeleton that carries
|
|
76
|
+
* `label`.
|
|
77
|
+
*
|
|
78
|
+
* It is announced on any unmount, because a component cannot read a prop
|
|
79
|
+
* changed by the same render that removed it. Where the load can fail, call
|
|
80
|
+
* `suppressLoadingAnnouncement()` in the catch (or drive the request through
|
|
81
|
+
* `useInlineLoading`, which does it for you) so a failure is not reported as
|
|
82
|
+
* an arrival.
|
|
83
|
+
*/
|
|
84
|
+
completeLabel?: string
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { ESkeletonVariant, ISkeletonProps, TSkeletonTypeSet }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ESkeletonVariant, ISkeletonProps, TSkeletonTypeSet } from './Skeleton.d';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<ISkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ISkeletonProps> & Readonly<{}>, {
|
|
3
|
+
label: string;
|
|
4
|
+
type: TSkeletonTypeSet;
|
|
5
|
+
height: string | number;
|
|
6
|
+
width: string | number;
|
|
7
|
+
id: string;
|
|
8
|
+
variant: `${ESkeletonVariant}`;
|
|
9
|
+
lines: number;
|
|
10
|
+
completeLabel: string;
|
|
11
|
+
lastLineWidth: string;
|
|
12
|
+
radius: "none" | "xs" | "sm" | "md" | "lg" | "pill";
|
|
13
|
+
animated: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=Skeleton.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.vue.d.ts","sourceRoot":"","sources":["../../src/components/Skeleton.vue"],"names":[],"mappings":"AAwYA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EACjB,MAAM,cAAc,CAAA;AAqPrB,QAAA,MAAM,YAAY;;;;;;;;;;;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IDefaultProps } from '../types/Props.d'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Diameter is derived from the field height scale: a spinner is always half
|
|
5
|
+
* the height of the field or button of the same size, so `size="md"` lines up
|
|
6
|
+
* optically inside an `md` control without any per-call-site nudging.
|
|
7
|
+
*/
|
|
8
|
+
enum ESpinnerSize {
|
|
9
|
+
ExtraSmall = 'xs',
|
|
10
|
+
Small = 'sm',
|
|
11
|
+
Medium = 'md',
|
|
12
|
+
Large = 'lg',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
enum ESpinnerOverlay {
|
|
16
|
+
/** Inline: the spinner sits in normal flow and takes only its own box. */
|
|
17
|
+
None = 'none',
|
|
18
|
+
/**
|
|
19
|
+
* Covers the nearest positioned ancestor, and blocks it: everything that was
|
|
20
|
+
* inside that ancestor when the spinner appeared is marked `inert` and the
|
|
21
|
+
* ancestor is marked `aria-busy` until it leaves. That ancestor must be
|
|
22
|
+
* positioned.
|
|
23
|
+
*/
|
|
24
|
+
Container = 'container',
|
|
25
|
+
/**
|
|
26
|
+
* Covers the viewport and blocks the application as it stood when it
|
|
27
|
+
* appeared. Anything opened afterwards (a dialog raised by the work itself)
|
|
28
|
+
* paints above it and stays usable.
|
|
29
|
+
*/
|
|
30
|
+
Page = 'page',
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
enum ESpinnerTone {
|
|
34
|
+
/** Brand primary. The default for standalone spinners. */
|
|
35
|
+
Primary = 'primary',
|
|
36
|
+
/** Inherits `color` from the parent, for spinners inside buttons or rows. */
|
|
37
|
+
Inherit = 'inherit',
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface ISpinnerProps extends IDefaultProps {
|
|
41
|
+
/** Diameter step, mapped to half the matching field height. */
|
|
42
|
+
size?: `${ESpinnerSize}`
|
|
43
|
+
/**
|
|
44
|
+
* Accessible name announced by the live region. Say what is loading
|
|
45
|
+
* ("Loading invoices"), not that something is loading.
|
|
46
|
+
*/
|
|
47
|
+
label?: string
|
|
48
|
+
/** Renders `label` as visible text beside the ring as well as announcing it. */
|
|
49
|
+
showLabel?: boolean
|
|
50
|
+
/** Where the spinner is placed: inline, over its container, or over the page. */
|
|
51
|
+
overlay?: `${ESpinnerOverlay}`
|
|
52
|
+
/** Ring colour source. */
|
|
53
|
+
tone?: `${ESpinnerTone}`
|
|
54
|
+
/**
|
|
55
|
+
* Milliseconds to wait before appearing. A spinner that flashes for 80ms is
|
|
56
|
+
* noise, so give fast operations a delay of 300 or so and they resolve
|
|
57
|
+
* before anything is drawn.
|
|
58
|
+
*/
|
|
59
|
+
delay?: number
|
|
60
|
+
/**
|
|
61
|
+
* Announced once, politely, when the spinner unmounts because the work
|
|
62
|
+
* finished ("Invoices loaded"). A spinner that simply disappears tells a
|
|
63
|
+
* screen reader user nothing, so pair this with `label` on any load the user
|
|
64
|
+
* is waiting on rather than watching. Skipped when the spinner never became
|
|
65
|
+
* visible (a `delay` that outlived the request) and when `decorative`.
|
|
66
|
+
*/
|
|
67
|
+
completeLabel?: string
|
|
68
|
+
/**
|
|
69
|
+
* Drops the role, the live region and the label. Use it only when an
|
|
70
|
+
* ancestor already announces the loading state (NbInlineLoading does this,
|
|
71
|
+
* and a button that swaps its own label for a spinner should too), so the
|
|
72
|
+
* same message is not announced twice.
|
|
73
|
+
*
|
|
74
|
+
* Ignored by `overlay="page"`: a full-viewport scrim is the element holding
|
|
75
|
+
* focus and nothing else is left to name it.
|
|
76
|
+
*/
|
|
77
|
+
decorative?: boolean
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { ESpinnerSize, ESpinnerOverlay, ESpinnerTone, ISpinnerProps }
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True for the overlay that arrived first, which is the only one allowed to
|
|
3
|
+
* paint the scrim. Reactive: if the bottom overlay leaves while a second is
|
|
4
|
+
* still up, the survivor takes over the paint rather than blocking invisibly.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isBasePageOverlay(key: symbol): boolean;
|
|
7
|
+
/** The overlay currently on top of the stack, for tests and debugging. */
|
|
8
|
+
export declare function topPageOverlay(): HTMLElement | null;
|
|
9
|
+
/**
|
|
10
|
+
* Marks a host that a blocking overlay must never inert.
|
|
11
|
+
*
|
|
12
|
+
* `inert` is deliberately blunt: it removes a subtree from hit testing, from
|
|
13
|
+
* the tab order AND from the accessibility tree. That is exactly right for the
|
|
14
|
+
* application, and exactly wrong for a node whose only job is to be read out.
|
|
15
|
+
* A toast raised while the page is blocked ("Session expired", "Import
|
|
16
|
+
* finished") is the message the blocked user most needs, and it paints above
|
|
17
|
+
* the scrim by token (`--nb-zindex-toast` is `--nb-zindex-modal` plus 50). If
|
|
18
|
+
* the region that speaks it is inert, the message is painted and silent, which
|
|
19
|
+
* is precisely the paint-and-focus disagreement this module claims to make
|
|
20
|
+
* impossible.
|
|
21
|
+
*
|
|
22
|
+
* So: put `data-nb-overlay-exempt` on any host that exists to announce rather
|
|
23
|
+
* than to be operated. In the library that is `NbToaster`'s announcer and its
|
|
24
|
+
* stack, plus the shared loading announcer. In an application it is any live
|
|
25
|
+
* region you own and mount at the top of the document. Nothing else should
|
|
26
|
+
* carry it: a form that opts itself out of blocking is a form the user can
|
|
27
|
+
* submit while the page says it cannot be used.
|
|
28
|
+
*/
|
|
29
|
+
export declare const NB_OVERLAY_EXEMPT_ATTR = "data-nb-overlay-exempt";
|
|
30
|
+
/**
|
|
31
|
+
* Marks an element as exempt and returns a function that puts it back.
|
|
32
|
+
*
|
|
33
|
+
* For application-owned live regions. Call it once, when the region is
|
|
34
|
+
* mounted; the attribute is read at claim time, so an overlay that is already
|
|
35
|
+
* up does not pick it up retroactively.
|
|
36
|
+
*/
|
|
37
|
+
export declare function markOverlayExempt(element: HTMLElement): () => void;
|
|
38
|
+
export declare function claimPageOverlay(key: symbol, element: HTMLElement): void;
|
|
39
|
+
export declare function releasePageOverlay(key: symbol): void;
|
|
40
|
+
/**
|
|
41
|
+
* Blocks one region rather than the page, for `overlay="container"`.
|
|
42
|
+
*
|
|
43
|
+
* A scrim over a panel stops the mouse and nothing else: the controls under it
|
|
44
|
+
* keep their place in the tab order, so a keyboard user tabs straight into a
|
|
45
|
+
* form that is visibly unavailable and submits it. The same snapshot rule
|
|
46
|
+
* applies here, scoped to the covered container: everything in it at the
|
|
47
|
+
* moment the spinner appeared is inert until the spinner leaves, the container
|
|
48
|
+
* is marked `aria-busy` so assistive tech reads it as being rebuilt, and both
|
|
49
|
+
* attributes are put back exactly as they were found.
|
|
50
|
+
*
|
|
51
|
+
* Returns the release function. Calling it twice is a no-op.
|
|
52
|
+
*/
|
|
53
|
+
export declare function containRegion(container: HTMLElement, exclude: HTMLElement): () => void;
|
|
54
|
+
/** Test helper: drops all state and puts every borrowed attribute back. */
|
|
55
|
+
export declare function resetPageOverlays(): void;
|
|
56
|
+
//# sourceMappingURL=Spinner.overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.overlay.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.overlay.ts"],"names":[],"mappings":"AAuEA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAInD;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,sBAAsB,2BAA2B,CAAA;AA8B9D;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI,CAMlE;AAqID,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CA6BxE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAgBpD;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW,GACnB,MAAM,IAAI,CAoBZ;AA6BD,2EAA2E;AAC3E,wBAAgB,iBAAiB,IAAI,IAAI,CAUxC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ESpinnerOverlay, ESpinnerSize, ESpinnerTone, ISpinnerProps } from './Spinner.d';
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<ISpinnerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ISpinnerProps> & Readonly<{}>, {
|
|
7
|
+
size: `${ESpinnerSize}`;
|
|
8
|
+
label: string;
|
|
9
|
+
id: string;
|
|
10
|
+
overlay: `${ESpinnerOverlay}`;
|
|
11
|
+
tone: `${ESpinnerTone}`;
|
|
12
|
+
showLabel: boolean;
|
|
13
|
+
delay: number;
|
|
14
|
+
completeLabel: string;
|
|
15
|
+
decorative: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=Spinner.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.vue.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.vue"],"names":[],"mappings":"AAifA,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EACd,MAAM,aAAa,CAAA;AAsVpB,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey, Ref } from 'vue';
|
|
2
|
+
import type { EStepStatus, IStepperLabels } from './Stepper.d';
|
|
3
|
+
/**
|
|
4
|
+
* One step's entry in the parent's registry.
|
|
5
|
+
*
|
|
6
|
+
* `el` is a getter rather than an element because a step registers during
|
|
7
|
+
* `setup()`, before its `<li>` exists. The parent calls it once the DOM is
|
|
8
|
+
* there, which is how the registry can be re-sorted into document order.
|
|
9
|
+
*/
|
|
10
|
+
export interface IStepperEntry {
|
|
11
|
+
uid: string;
|
|
12
|
+
disabled: ComputedRef<boolean>;
|
|
13
|
+
el: () => HTMLElement | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* What an `NbStepperStep` needs from the `NbStepper` around it.
|
|
17
|
+
*
|
|
18
|
+
* Lives in a `.ts` rather than the `.d.ts` beside it because `Symbol()` is a
|
|
19
|
+
* runtime value, matching `Accordion.context.ts`.
|
|
20
|
+
*/
|
|
21
|
+
export interface IStepperContext {
|
|
22
|
+
/** Index of the current step. */
|
|
23
|
+
current: Readonly<Ref<number>>;
|
|
24
|
+
/** Furthest index reached, which is the boundary `navigable` opens up. */
|
|
25
|
+
furthest: Readonly<Ref<number>>;
|
|
26
|
+
orientation: Readonly<Ref<string>>;
|
|
27
|
+
size: Readonly<Ref<string>>;
|
|
28
|
+
navigable: Readonly<Ref<boolean>>;
|
|
29
|
+
labels: ComputedRef<Required<IStepperLabels>>;
|
|
30
|
+
/**
|
|
31
|
+
* Registered step ids in **document order**, which is the single source of
|
|
32
|
+
* every step's number and derived status. Mount order is not document order
|
|
33
|
+
* once a step is added, removed or moved after the first render.
|
|
34
|
+
*/
|
|
35
|
+
order: Readonly<Ref<string[]>>;
|
|
36
|
+
/** Index of the one step that holds `tabindex="0"`, or -1 when none does. */
|
|
37
|
+
tabbable: ComputedRef<number>;
|
|
38
|
+
/** Add a step and get back its remover. */
|
|
39
|
+
register: (entry: IStepperEntry) => () => void;
|
|
40
|
+
/** Whether a step at `index` may be clicked back to. */
|
|
41
|
+
clickable: (index: number, disabled: boolean) => boolean;
|
|
42
|
+
/** Move to a step. Ignored unless `clickable` agrees. */
|
|
43
|
+
select: (index: number, disabled: boolean) => void;
|
|
44
|
+
}
|
|
45
|
+
/** Status resolution shared by the step and its tests. */
|
|
46
|
+
export type TStepStatus = `${EStepStatus}`;
|
|
47
|
+
export declare const NB_STEPPER_CONTEXT: InjectionKey<IStepperContext>;
|
|
48
|
+
//# sourceMappingURL=Stepper.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.context.d.ts","sourceRoot":"","sources":["../../src/components/Stepper.context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA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,CAAA;AAE1C,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,eAAe,CAC/B,CAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { IDefaultProps } from '../types/Props.d'
|
|
2
|
+
|
|
3
|
+
/** Reading direction of the step list. */
|
|
4
|
+
enum EStepperOrientation {
|
|
5
|
+
Horizontal = 'horizontal',
|
|
6
|
+
Vertical = 'vertical',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Marker and type scale. */
|
|
10
|
+
enum EStepperSize {
|
|
11
|
+
Small = 'sm',
|
|
12
|
+
Medium = 'md',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The state one step is in. Derived from position unless a step overrides it
|
|
17
|
+
* with `complete`, `invalid` or `disabled`.
|
|
18
|
+
*/
|
|
19
|
+
enum EStepStatus {
|
|
20
|
+
/** Behind the current step, or explicitly marked done. */
|
|
21
|
+
Complete = 'complete',
|
|
22
|
+
/** Where the user is now. */
|
|
23
|
+
Current = 'current',
|
|
24
|
+
/** Ahead of the current step. */
|
|
25
|
+
Incomplete = 'incomplete',
|
|
26
|
+
/** Cannot be reached at all, whatever the user has visited. */
|
|
27
|
+
Disabled = 'disabled',
|
|
28
|
+
/** Visited and left in a state the flow will not accept. */
|
|
29
|
+
Invalid = 'invalid',
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The words read out after a step's label, and the accessible name of the
|
|
34
|
+
* list. The only English in the component, so this is the localisation hook.
|
|
35
|
+
*/
|
|
36
|
+
interface IStepperLabels {
|
|
37
|
+
/** Accessible name of the list when `ariaLabel` is not given. */
|
|
38
|
+
progress?: string
|
|
39
|
+
/**
|
|
40
|
+
* Template announced politely when the current step changes.
|
|
41
|
+
* `{step}`, `{total}` and `{label}` are substituted.
|
|
42
|
+
*/
|
|
43
|
+
announcement?: string
|
|
44
|
+
complete?: string
|
|
45
|
+
current?: string
|
|
46
|
+
incomplete?: string
|
|
47
|
+
disabled?: string
|
|
48
|
+
invalid?: string
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface IStepperProps extends IDefaultProps {
|
|
52
|
+
/** Zero-based index of the current step. Omit to let the stepper own it. */
|
|
53
|
+
modelValue?: number
|
|
54
|
+
/** Layout direction. Vertical reads better when labels are long. */
|
|
55
|
+
orientation?: `${EStepperOrientation}`
|
|
56
|
+
/** Marker and type scale. */
|
|
57
|
+
size?: `${EStepperSize}`
|
|
58
|
+
/** Allow clicking back to a step the user has already reached. */
|
|
59
|
+
navigable?: boolean
|
|
60
|
+
/**
|
|
61
|
+
* Furthest index the user has reached, which is what `navigable` opens up.
|
|
62
|
+
* Omit and the stepper keeps its own high-water mark, so going back never
|
|
63
|
+
* closes the steps ahead. Pass it when the flow is resumed from storage.
|
|
64
|
+
*/
|
|
65
|
+
furthest?: number
|
|
66
|
+
/** Accessible name of the list. Falls back to `labels.progress`. */
|
|
67
|
+
ariaLabel?: string
|
|
68
|
+
/** Status words announced per step. Override to translate. */
|
|
69
|
+
labels?: IStepperLabels
|
|
70
|
+
/**
|
|
71
|
+
* Announce the new step in a polite live region when the flow advances.
|
|
72
|
+
* Turn it off when the flow already moves focus to the new step's heading,
|
|
73
|
+
* which would otherwise announce the move twice.
|
|
74
|
+
*/
|
|
75
|
+
announce?: boolean
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
interface IStepperStepProps extends IDefaultProps {
|
|
79
|
+
/** One or two words naming what the step accomplishes. */
|
|
80
|
+
label?: string
|
|
81
|
+
/** Optional second line: what the step needs, or why it is optional. */
|
|
82
|
+
description?: string
|
|
83
|
+
/**
|
|
84
|
+
* Force the complete state on a step that is not behind the current one,
|
|
85
|
+
* for a flow that lets an optional step be finished out of order.
|
|
86
|
+
*/
|
|
87
|
+
complete?: boolean
|
|
88
|
+
/** Visited and rejected. Stays reachable so the user can go back and fix it. */
|
|
89
|
+
invalid?: boolean
|
|
90
|
+
/** Not part of this run of the flow. Never reachable, never focusable. */
|
|
91
|
+
disabled?: boolean
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
EStepperOrientation,
|
|
96
|
+
EStepperSize,
|
|
97
|
+
EStepStatus,
|
|
98
|
+
IStepperLabels,
|
|
99
|
+
IStepperProps,
|
|
100
|
+
IStepperStepProps,
|
|
101
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EStepperOrientation, EStepperSize, IStepperProps } from './Stepper.d';
|
|
2
|
+
declare var __VLS_1: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_1) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<IStepperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (index: number) => any;
|
|
8
|
+
change: (index: number) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<IStepperProps> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((index: number) => any) | undefined;
|
|
11
|
+
onChange?: ((index: number) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
modelValue: number;
|
|
14
|
+
size: `${EStepperSize}`;
|
|
15
|
+
id: string;
|
|
16
|
+
orientation: `${EStepperOrientation}`;
|
|
17
|
+
ariaLabel: string;
|
|
18
|
+
labels: import("./Stepper.d").IStepperLabels;
|
|
19
|
+
navigable: boolean;
|
|
20
|
+
furthest: number;
|
|
21
|
+
announce: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Stepper.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.vue.d.ts","sourceRoot":"","sources":["../../src/components/Stepper.vue"],"names":[],"mappings":"AA0eA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AA2a9E,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAO/C,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IStepperStepProps } from './Stepper.d';
|
|
2
|
+
declare var __VLS_14: {}, __VLS_16: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
label?: (props: typeof __VLS_14) => any;
|
|
5
|
+
} & {
|
|
6
|
+
description?: (props: typeof __VLS_16) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<IStepperStepProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IStepperStepProps> & Readonly<{}>, {
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
label: string;
|
|
11
|
+
id: string;
|
|
12
|
+
invalid: boolean;
|
|
13
|
+
description: string;
|
|
14
|
+
complete: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=StepperStep.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepperStep.vue.d.ts","sourceRoot":"","sources":["../../src/components/StepperStep.vue"],"names":[],"mappings":"AAoaA,OAAO,EAAe,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAoS5D,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAOpD,QAAA,MAAM,UAAU;;;;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -63,11 +63,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
63
63
|
max: string | number;
|
|
64
64
|
helper: string;
|
|
65
65
|
placeholder: string;
|
|
66
|
-
readonly: boolean;
|
|
67
66
|
step: string | number;
|
|
68
|
-
highlight: (text: string) => string;
|
|
69
67
|
maxlength: number;
|
|
70
68
|
multiline: boolean;
|
|
69
|
+
highlight: (text: string) => string;
|
|
70
|
+
readonly: boolean;
|
|
71
71
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
72
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
73
73
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/TextInput.vue"],"names":[],"mappings":"AA8iBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAO9D,MAAM,WAAW,eAAgB,SAAQ,uBAAuB;IAC9D,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;CACrC;AAED,KAAK,WAAW,GAAG,eAAe,CAAC;AAyFnC,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA2BF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAkYxD,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACjI,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,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,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -7,18 +7,61 @@ type __VLS_Props = {
|
|
|
7
7
|
variant?: TToastVariant;
|
|
8
8
|
title?: string;
|
|
9
9
|
message: string;
|
|
10
|
+
/**
|
|
11
|
+
* Milliseconds the countdown bar represents. `0` draws no bar.
|
|
12
|
+
*
|
|
13
|
+
* When `managed` is false (a bare `NbToast`), this is also the toast's own
|
|
14
|
+
* auto-dismiss timer. When `managed` is true, `NbToaster` owns the clock
|
|
15
|
+
* and this value only sizes the bar.
|
|
16
|
+
*/
|
|
10
17
|
duration?: number;
|
|
11
18
|
cta?: IToastCta;
|
|
19
|
+
/**
|
|
20
|
+
* ARIA role. `NbToaster` sets `status` for success and info and `alert`
|
|
21
|
+
* for warning and error. Declared as a real prop rather than left to
|
|
22
|
+
* fallthrough attributes, so adding `inheritAttrs: false` or a wrapper
|
|
23
|
+
* element here can never silently revert every success toast to `alert`.
|
|
24
|
+
*/
|
|
25
|
+
role?: 'alert' | 'status' | 'none';
|
|
26
|
+
/** Politeness. Defaults to `assertive` for errors, `polite` otherwise. */
|
|
27
|
+
ariaLive?: 'assertive' | 'polite' | 'off';
|
|
28
|
+
/**
|
|
29
|
+
* Visually hidden severity word, read before the title. Defaults to the
|
|
30
|
+
* English name of the variant; pass your own for another language, or an
|
|
31
|
+
* empty string to suppress it.
|
|
32
|
+
*/
|
|
33
|
+
statusLabel?: string;
|
|
34
|
+
/** Accessible name of the close button. Translate it per application. */
|
|
35
|
+
closeLabel?: string;
|
|
36
|
+
/**
|
|
37
|
+
* `true` when a host owns the clock. The toast then runs no timer of its
|
|
38
|
+
* own and takes its pause state from `paused`, so a whole stack can stop
|
|
39
|
+
* together instead of each item counting down on its own.
|
|
40
|
+
*/
|
|
41
|
+
managed?: boolean;
|
|
42
|
+
/** Countdown held, when managed. Ignored otherwise. */
|
|
43
|
+
paused?: boolean;
|
|
44
|
+
/** Bump to restart the countdown bar after the message changed. */
|
|
45
|
+
cycle?: number;
|
|
12
46
|
};
|
|
13
47
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
|
+
action: () => any;
|
|
14
49
|
close: () => any;
|
|
15
50
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
51
|
+
onAction?: (() => any) | undefined;
|
|
16
52
|
onClose?: (() => any) | undefined;
|
|
17
53
|
}>, {
|
|
18
54
|
title: string;
|
|
55
|
+
role: "alert" | "status" | "none";
|
|
19
56
|
variant: TToastVariant;
|
|
57
|
+
closeLabel: string;
|
|
20
58
|
duration: number;
|
|
59
|
+
statusLabel: string;
|
|
21
60
|
cta: IToastCta;
|
|
61
|
+
ariaLive: "assertive" | "polite" | "off";
|
|
62
|
+
managed: boolean;
|
|
63
|
+
paused: boolean;
|
|
64
|
+
cycle: number;
|
|
22
65
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
66
|
declare const _default: typeof __VLS_export;
|
|
24
67
|
export default _default;
|