@nubisco/ui 3.1.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/BlueprintCard.vue.d.ts.map +1 -1
- 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 +17653 -14503
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"AAsqDA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EAEd,oBAAoB,EACpB,iBAAiB,EAIlB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAsiChE,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;AAK/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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.vue.d.ts","sourceRoot":"","sources":["../../src/components/Button.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.vue.d.ts","sourceRoot":"","sources":["../../src/components/Button.vue"],"names":[],"mappings":"AAgfA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAwMtD,QAAA,IAAI,QAAQ,IAAW,CAAE;AACzB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GanttChart.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/GanttChart.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GanttChart.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/GanttChart.vue"],"names":[],"mappings":"AA29BA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AAy8BvB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InterpolationChart.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/InterpolationChart.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InterpolationChart.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Charts/InterpolationChart.vue"],"names":[],"mappings":"AAyiBA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AA6kB/B,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;6EAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,4 +1,79 @@
|
|
|
1
|
+
/** Number of categorical roles before `colorAt` wraps. */
|
|
2
|
+
declare const CHART_ROLE_COUNT = 8;
|
|
3
|
+
/**
|
|
4
|
+
* Categorical roles, in assignment order.
|
|
5
|
+
*
|
|
6
|
+
* The order is the contract, not an accident of listing: the earlier roles are
|
|
7
|
+
* the better separated ones, so a two-series chart gets the strongest pair
|
|
8
|
+
* available and an eight-series chart degrades predictably. Reordering this
|
|
9
|
+
* array recolours every chart in every consuming app.
|
|
10
|
+
*/
|
|
1
11
|
declare const DEFAULT_PALETTE: string[];
|
|
12
|
+
/**
|
|
13
|
+
* The colour for series `index`, wrapping at the end of the palette.
|
|
14
|
+
*
|
|
15
|
+
* Wrapping is deliberate: a chart handed twelve series still renders. It also
|
|
16
|
+
* means series 1 and series 9 are indistinguishable, which is a legibility
|
|
17
|
+
* failure, not a feature. Above five series, encode with something other than
|
|
18
|
+
* colour (direct labels, small multiples, facets), or pass `seriesColors()`.
|
|
19
|
+
*
|
|
20
|
+
* An empty `palette` falls back to the roles rather than returning `undefined`,
|
|
21
|
+
* because the chart components default their `colors` prop to `[]` and an
|
|
22
|
+
* `undefined` fill paints black.
|
|
23
|
+
*/
|
|
2
24
|
declare const colorAt: (index: number, palette?: string[]) => string;
|
|
3
|
-
|
|
25
|
+
/** The `var()` reference for one categorical role, 1-based as the token is. */
|
|
26
|
+
declare const chartRole: (role: number) => string;
|
|
27
|
+
/** Which channel a mark uses, which decides how much contrast the role needs. */
|
|
28
|
+
type TChartMark = 'fill' | 'line';
|
|
29
|
+
/**
|
|
30
|
+
* `count` categorical colours, best-separated set first.
|
|
31
|
+
*
|
|
32
|
+
* Use this when the chart knows how many series it has. `colorAt()` and the
|
|
33
|
+
* default `colors` prop assign roles in role order, which is the compatible
|
|
34
|
+
* choice and not the legible one; this picks the subset that survives colour
|
|
35
|
+
* vision deficiency best at that exact count.
|
|
36
|
+
*
|
|
37
|
+
* Pass `{ mark: 'line' }` for strokes, points and sparkline-thin marks, which
|
|
38
|
+
* need 3:1 contrast against the surface as well as separation from each other.
|
|
39
|
+
* The default, `'fill'`, is for bars, slices, areas and legend chips.
|
|
40
|
+
*
|
|
41
|
+
* Above eight it wraps, same as `colorAt()`, and is just as much a legibility
|
|
42
|
+
* failure there. A non-positive or non-finite `count` returns an empty array,
|
|
43
|
+
* which is what the `colors` prop wants for "use the default".
|
|
44
|
+
*/
|
|
45
|
+
declare const seriesColors: (count: number, options?: {
|
|
46
|
+
mark?: TChartMark;
|
|
47
|
+
}) => string[];
|
|
48
|
+
/**
|
|
49
|
+
* A point on the sequential ramp, `t` from 0 (lowest value) to 1 (highest).
|
|
50
|
+
*
|
|
51
|
+
* One hue, lightness carrying magnitude. Use it when the quantity is ordered
|
|
52
|
+
* and one-directional: heat cells, choropleths, a bar chart shaded by size.
|
|
53
|
+
* Never use it for unordered categories, it invents a ranking.
|
|
54
|
+
*
|
|
55
|
+
* The low end sits close to the page ground by design, so a lone low cell has
|
|
56
|
+
* little contrast against the surface. Give sequential marks a `stroke` of
|
|
57
|
+
* `var(--nb-c-border)` and a value label, or a legend with numeric bounds.
|
|
58
|
+
*/
|
|
59
|
+
declare const sequentialAt: (t: number) => string;
|
|
60
|
+
/**
|
|
61
|
+
* A point on the diverging ramp, `t` from 0 (low pole) through 0.5 (the
|
|
62
|
+
* neutral midpoint) to 1 (high pole).
|
|
63
|
+
*
|
|
64
|
+
* Use it only when the midpoint means something: zero, a target, a baseline
|
|
65
|
+
* being beaten or missed. Map the domain symmetrically around that midpoint,
|
|
66
|
+
* otherwise the neutral band lands somewhere arbitrary and the chart lies.
|
|
67
|
+
*/
|
|
68
|
+
declare const divergingAt: (t: number) => string;
|
|
69
|
+
/**
|
|
70
|
+
* `steps` evenly spaced stops of a ramp, for a legend or a binned scale.
|
|
71
|
+
*
|
|
72
|
+
* Bin before you shade. Five to seven steps is the most a reader can match
|
|
73
|
+
* back to a legend swatch; a continuous ramp is for dense fields (thousands of
|
|
74
|
+
* cells) where individual lookup is not the point.
|
|
75
|
+
*/
|
|
76
|
+
declare const rampSteps: (steps: number, at?: (t: number) => string) => string[];
|
|
77
|
+
export type { TChartMark };
|
|
78
|
+
export { CHART_ROLE_COUNT, DEFAULT_PALETTE, colorAt, chartRole, seriesColors, sequentialAt, divergingAt, rampSteps, };
|
|
4
79
|
//# sourceMappingURL=palette.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/shared/palette.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../../src/components/Charts/shared/palette.ts"],"names":[],"mappings":"AA2BA,0DAA0D;AAC1D,QAAA,MAAM,gBAAgB,IAAI,CAAA;AAE1B;;;;;;;GAOG;AACH,QAAA,MAAM,eAAe,EAAE,MAAM,EAS5B,CAAA;AAED;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,OAAO,GACX,OAAO,MAAM,EACb,UAAS,MAAM,EAAoB,KAClC,MAIF,CAAA;AAED,+EAA+E;AAC/E,QAAA,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,MACyD,CAAA;AAE3F,iFAAiF;AACjF,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;AA2BjC;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,YAAY,GAChB,OAAO,MAAM,EACb,UAAS;IAAE,IAAI,CAAC,EAAE,UAAU,CAAA;CAAO,KAClC,MAAM,EAKR,CAAA;AAaD;;;;;;;;;;GAUG;AACH,QAAA,MAAM,YAAY,GAAI,GAAG,MAAM,KAAG,MAC8C,CAAA;AAEhF;;;;;;;GAOG;AACH,QAAA,MAAM,WAAW,GAAI,GAAG,MAAM,KAAG,MAahC,CAAA;AAED;;;;;;GAMG;AACH,QAAA,MAAM,SAAS,GACb,OAAO,MAAM,EACb,KAAI,CAAC,CAAC,EAAE,MAAM,KAAK,MAAqB,KACvC,MAAM,EAKR,CAAA;AAED,YAAY,EAAE,UAAU,EAAE,CAAA;AAC1B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,OAAO,EACP,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,GACV,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPalette.vue.d.ts","sourceRoot":"","sources":["../../src/components/CommandPalette.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPalette.vue.d.ts","sourceRoot":"","sources":["../../src/components/CommandPalette.vue"],"names":[],"mappings":"AAshBA,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,oBAAoB,CAAA;AAkd3B,QAAA,MAAM,YAAY;;;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import type { VNodeChild } from 'vue'
|
|
2
|
+
import type { TModalSize } from './Modal.d'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* How hard the dialog leans on the user.
|
|
6
|
+
*
|
|
7
|
+
* `danger` is the default because the audited fleet's confirmations are
|
|
8
|
+
* overwhelmingly destructive: deleting an environment and its content,
|
|
9
|
+
* regenerating a client secret, clearing local storage, deleting someone
|
|
10
|
+
* else's comment. Making the safe tone the default would mean every
|
|
11
|
+
* destructive call site has to remember to opt in, which is exactly the
|
|
12
|
+
* decision this component exists to remove.
|
|
13
|
+
*
|
|
14
|
+
* `neutral` is for a consequential but non-destructive commit (publishing,
|
|
15
|
+
* inviting, transferring ownership): same button order, same focus rules, a
|
|
16
|
+
* primary confirm instead of a red one.
|
|
17
|
+
*
|
|
18
|
+
* It also decides the ARIA role: `danger` renders `role="alertdialog"`
|
|
19
|
+
* (an interruption, whose description is announced on entry), `neutral`
|
|
20
|
+
* renders `role="dialog"`.
|
|
21
|
+
*/
|
|
22
|
+
type TConfirmTone = 'danger' | 'neutral'
|
|
23
|
+
|
|
24
|
+
interface IConfirmProps {
|
|
25
|
+
/** Whether the dialog is on screen. `useConfirm()` drives this for you. */
|
|
26
|
+
open?: boolean
|
|
27
|
+
/**
|
|
28
|
+
* The question, phrased as the action. "Delete environment", not
|
|
29
|
+
* "Are you sure?". The title is the only line a hurried user reads.
|
|
30
|
+
*/
|
|
31
|
+
title: string
|
|
32
|
+
/**
|
|
33
|
+
* What happens when they confirm, in one sentence. State the consequence
|
|
34
|
+
* and its reach ("Every entry, release and API key in it is deleted"),
|
|
35
|
+
* not the mechanics.
|
|
36
|
+
*/
|
|
37
|
+
message?: string
|
|
38
|
+
/**
|
|
39
|
+
* The name of the exact record being acted on, rendered verbatim in its own
|
|
40
|
+
* strip. This is the difference between "delete this environment?" and
|
|
41
|
+
* "delete `production`?", and it is the single cheapest defence against a
|
|
42
|
+
* confirmed mistake.
|
|
43
|
+
*/
|
|
44
|
+
subject?: string
|
|
45
|
+
/** What kind of thing `subject` is: "Environment", "Client", "Comment". */
|
|
46
|
+
subjectLabel?: string
|
|
47
|
+
/**
|
|
48
|
+
* The confirm verb. Name the action ("Delete environment", "Regenerate
|
|
49
|
+
* secret"), never "OK" or "Yes": the fleet uses Save, Done, Apply and
|
|
50
|
+
* Create interchangeably, and a naked "Yes" makes the user re-read the
|
|
51
|
+
* title to find out what they are agreeing to.
|
|
52
|
+
*/
|
|
53
|
+
confirmLabel?: string
|
|
54
|
+
/** The exit label. "Cancel" unless you are localising it. */
|
|
55
|
+
cancelLabel?: string
|
|
56
|
+
/** Destructive (`danger`, the default) or consequential (`neutral`). */
|
|
57
|
+
tone?: TConfirmTone
|
|
58
|
+
/**
|
|
59
|
+
* Arms a type-to-confirm gate: the confirm button stays disabled until the
|
|
60
|
+
* user types this string exactly (leading and trailing whitespace ignored,
|
|
61
|
+
* case sensitive). Reserve it for actions whose blast radius is bigger than
|
|
62
|
+
* the thing being clicked: an environment and all its content, a production
|
|
63
|
+
* secret, a tenant. Usually the same value as `subject`.
|
|
64
|
+
*/
|
|
65
|
+
typeToConfirm?: string
|
|
66
|
+
/**
|
|
67
|
+
* Overrides the gate's field label. Defaults to
|
|
68
|
+
* `Type <typeToConfirm> to confirm`. Supply your own for i18n.
|
|
69
|
+
*/
|
|
70
|
+
typeToConfirmLabel?: string
|
|
71
|
+
/** Helper text under the gate field. */
|
|
72
|
+
typeToConfirmHelper?: string
|
|
73
|
+
/**
|
|
74
|
+
* Pending state: the confirm button spins, both buttons and the gate field
|
|
75
|
+
* lock, and Escape, the overlay and the close button stop dismissing. An
|
|
76
|
+
* action that has already been fired cannot be un-fired by closing the
|
|
77
|
+
* dialog, so the dialog refuses to lie about it.
|
|
78
|
+
*/
|
|
79
|
+
busy?: boolean
|
|
80
|
+
/**
|
|
81
|
+
* The text of the pending line. It sits in a `role="status"` region that is
|
|
82
|
+
* deliberately OUTSIDE the element `aria-describedby` points at: an
|
|
83
|
+
* alertdialog announces its description on entry, and text inserted into
|
|
84
|
+
* that same subtree a moment later is at the mercy of how the screen reader
|
|
85
|
+
* merges the two. Kept separate, the pending line is an ordinary polite
|
|
86
|
+
* update to a region that was empty, which is a case assistive technology
|
|
87
|
+
* handles the same way everywhere.
|
|
88
|
+
*/
|
|
89
|
+
busyLabel?: string
|
|
90
|
+
/**
|
|
91
|
+
* The finished beat: the work succeeded and the dialog is about to close.
|
|
92
|
+
* Both buttons and the gate stay locked, and nothing dismisses, because the
|
|
93
|
+
* question has already been answered. `useConfirm()` sets this for you, and
|
|
94
|
+
* only when `successLabel` is supplied.
|
|
95
|
+
*/
|
|
96
|
+
succeeded?: boolean
|
|
97
|
+
/**
|
|
98
|
+
* The line shown while `succeeded`. Leave it unset and there is no finished
|
|
99
|
+
* beat at all: the dialog closes the moment the work returns. Set it
|
|
100
|
+
* ("Environment deleted") when the action is slow enough that a dialog
|
|
101
|
+
* vanishing on its own reads as a glitch rather than a result.
|
|
102
|
+
*/
|
|
103
|
+
successLabel?: string
|
|
104
|
+
/**
|
|
105
|
+
* Failure text from the last attempt. Shown in the body; the dialog stays
|
|
106
|
+
* open so the user can retry or cancel with the error still visible.
|
|
107
|
+
*/
|
|
108
|
+
error?: string
|
|
109
|
+
/** Dialog size, forwarded to NbModal. `sm` unless the body is unusually long. */
|
|
110
|
+
size?: TModalSize
|
|
111
|
+
/**
|
|
112
|
+
* Extra selectors for popups that teleport out of the dialog and must not
|
|
113
|
+
* be treated as "outside" it by the focus trap or by Escape. Our own
|
|
114
|
+
* overlays are known already; this is for a third-party combobox whose
|
|
115
|
+
* markup you cannot annotate with `[data-nb-confirm-floating]`.
|
|
116
|
+
*
|
|
117
|
+
* Use `registerConfirmFloatingSelector()` instead when the exemption
|
|
118
|
+
* applies to every dialog in the application rather than this one.
|
|
119
|
+
*/
|
|
120
|
+
floatingSelectors?: string[]
|
|
121
|
+
/**
|
|
122
|
+
* A class on the dialog's content region (the message, the subject strip,
|
|
123
|
+
* the gate and the status line). The component's root is NbModal, which
|
|
124
|
+
* teleports to `<body>`, so attribute fallthrough reaches nothing a
|
|
125
|
+
* consumer can style: this is the hook that does.
|
|
126
|
+
*
|
|
127
|
+
* It is also the practical way to scope the `--nb-confirm-*` custom
|
|
128
|
+
* properties, which are otherwise set on `:root` because a teleported node
|
|
129
|
+
* inherits from `<body>` and not from the component that asked for it.
|
|
130
|
+
*/
|
|
131
|
+
contentClass?: string
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* What `confirm()` accepts. Same shape as the component, minus the three
|
|
136
|
+
* props the composable owns (`open`, `busy`, `error`), plus the work itself.
|
|
137
|
+
*/
|
|
138
|
+
interface IConfirmOptions extends Omit<
|
|
139
|
+
IConfirmProps,
|
|
140
|
+
'open' | 'busy' | 'error' | 'succeeded'
|
|
141
|
+
> {
|
|
142
|
+
/**
|
|
143
|
+
* The action to run when the user confirms. While the returned promise is
|
|
144
|
+
* pending the dialog is locked, so the user cannot fire it twice; the
|
|
145
|
+
* promise returned by `confirm()` resolves `true` only after it settles.
|
|
146
|
+
*
|
|
147
|
+
* If it rejects, the dialog stays open with the failure shown and nothing
|
|
148
|
+
* resolves yet: the user retries or cancels (which resolves `false`).
|
|
149
|
+
* Omit it and `confirm()` resolves as soon as the button is pressed.
|
|
150
|
+
*/
|
|
151
|
+
onConfirm?: () => unknown | Promise<unknown>
|
|
152
|
+
/**
|
|
153
|
+
* Body content as a render function, for the cases `message` cannot carry:
|
|
154
|
+
* a list of the things about to be deleted, a link to what will break, a
|
|
155
|
+
* count that needs emphasis. It fills the component's default slot.
|
|
156
|
+
*
|
|
157
|
+
* ```ts
|
|
158
|
+
* confirm({
|
|
159
|
+
* title: 'Delete environment',
|
|
160
|
+
* body: () => h('ul', items.map((i) => h('li', i.name))),
|
|
161
|
+
* })
|
|
162
|
+
* ```
|
|
163
|
+
*
|
|
164
|
+
* It renders inside the dialog's own Vue app, which is not your
|
|
165
|
+
* application's: it has no router, no i18n and no provides. Resolve
|
|
166
|
+
* anything you need from those before calling `confirm()` and close over
|
|
167
|
+
* the result. Plain text belongs in `message`.
|
|
168
|
+
*/
|
|
169
|
+
body?: () => VNodeChild
|
|
170
|
+
/**
|
|
171
|
+
* Turns a rejection from `onConfirm` into the text shown in the dialog.
|
|
172
|
+
* Defaults to the error's `message`, falling back to `String(error)`.
|
|
173
|
+
*/
|
|
174
|
+
formatError?: (error: unknown) => string
|
|
175
|
+
/**
|
|
176
|
+
* How long, in milliseconds, `onConfirm` is given to settle before the
|
|
177
|
+
* dialog treats it as failed and shows `timeoutMessage`.
|
|
178
|
+
*
|
|
179
|
+
* A promise that never settles is the one state this dialog cannot recover
|
|
180
|
+
* from on its own: cancel, confirm, the gate and the close control are all
|
|
181
|
+
* locked while the work is in flight, precisely so nobody can fire a second
|
|
182
|
+
* DELETE, which means a hung request leaves a dialog that cannot be
|
|
183
|
+
* dismissed by any means. A timeout turns that into an error the user can
|
|
184
|
+
* read, retry or cancel out of.
|
|
185
|
+
*
|
|
186
|
+
* It does not abort the work: nothing here can cancel a request it did not
|
|
187
|
+
* make. The dialog stops waiting; the request may still land. Pass your own
|
|
188
|
+
* AbortSignal inside `onConfirm` if the call has to be stopped too.
|
|
189
|
+
*
|
|
190
|
+
* Unset by default, because a long-running action that is genuinely
|
|
191
|
+
* expected to take minutes should not be declared failed by a library
|
|
192
|
+
* guess. Set it wherever the call has a service-level expectation.
|
|
193
|
+
*/
|
|
194
|
+
timeout?: number
|
|
195
|
+
/** The failure text used when `timeout` elapses. */
|
|
196
|
+
timeoutMessage?: string
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export type { IConfirmProps, IConfirmOptions, TConfirmTone }
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two facts about NbConfirm's surroundings that are not the component:
|
|
3
|
+
* how long its exit takes, and which teleported popups count as being inside
|
|
4
|
+
* it. Both are shared between NbConfirm and `useConfirm()`, and both used to
|
|
5
|
+
* be duplicated in the two files with nothing keeping them in step.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* How long the dialog takes to leave, in milliseconds.
|
|
9
|
+
*
|
|
10
|
+
* This is not a reading of NbModal's stylesheet. NbModal declares its own
|
|
11
|
+
* `0.2s` transition, and an earlier version of this file copied that number
|
|
12
|
+
* by hand into the queue's delay, which meant editing the SCSS silently
|
|
13
|
+
* desynchronised the queue: the next question appeared before the last one
|
|
14
|
+
* had faded, or the dialog sat blank waiting for a transition that had
|
|
15
|
+
* already finished.
|
|
16
|
+
*
|
|
17
|
+
* So NbConfirm stopped reading the number and started writing it.
|
|
18
|
+
* `applyConfirmMotion` puts this duration on the overlay and the dialog box
|
|
19
|
+
* as an inline `transition-duration`, which wins over the stylesheet, so the
|
|
20
|
+
* animation the user sees and the delay the queue waits are the same value by
|
|
21
|
+
* construction. Change it here and both move together.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CONFIRM_LEAVE_MS = 200;
|
|
24
|
+
/**
|
|
25
|
+
* Teaches every NbConfirm about a popup that teleports out of the dialog and
|
|
26
|
+
* cannot carry `[data-nb-confirm-floating]` itself, which is the usual case
|
|
27
|
+
* for a third-party combobox or date picker whose markup you do not own.
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* registerConfirmFloatingSelector('.tomselect-dropdown')
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* Call it once at application start. It is additive and idempotent; use the
|
|
34
|
+
* `floatingSelectors` prop instead when only one dialog needs the exemption.
|
|
35
|
+
* Returns a function that removes the selector again, for a plugin that has
|
|
36
|
+
* to clean up after itself.
|
|
37
|
+
*/
|
|
38
|
+
export declare function registerConfirmFloatingSelector(selector: string): () => void;
|
|
39
|
+
/** Every selector currently treated as "still inside the dialog". */
|
|
40
|
+
export declare function floatingSelector(extra?: readonly string[]): string;
|
|
41
|
+
/**
|
|
42
|
+
* Writes the exit duration onto the nodes NbModal animates.
|
|
43
|
+
*
|
|
44
|
+
* Under `prefers-reduced-motion` the duration is zero rather than
|
|
45
|
+
* `transition: none`, for two reasons. It is a value, so flipping the
|
|
46
|
+
* preference back mid-session restores the animation instead of leaving a
|
|
47
|
+
* dead `none` on a recycled node. And it is the same property the queue
|
|
48
|
+
* reads, so a user with reduced motion gets the shorter queue delay too
|
|
49
|
+
* rather than waiting out an animation that never ran.
|
|
50
|
+
*/
|
|
51
|
+
export declare function applyConfirmMotion(dialog: HTMLElement | null, reduced: boolean): void;
|
|
52
|
+
//# sourceMappingURL=Confirm.env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirm.env.d.ts","sourceRoot":"","sources":["../../src/components/Confirm.env.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAA;AAoBnC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,IAAI,CAO5E;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,CAKtE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,GAAG,IAAI,EAC1B,OAAO,EAAE,OAAO,GACf,IAAI,CAON"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { IConfirmProps } from './Confirm.d';
|
|
2
|
+
/**
|
|
3
|
+
* Whether this dialog is the last aria-modal surface in the document, which
|
|
4
|
+
* for teleported overlays is the one painted on top.
|
|
5
|
+
*
|
|
6
|
+
* Without this test, two NbConfirms open at once (two components rendered
|
|
7
|
+
* from route or store state, which is a supported way to use this) both
|
|
8
|
+
* answer one Escape, and the older instance answers first: the user cancels
|
|
9
|
+
* a question they cannot see while the one in front of them stays put.
|
|
10
|
+
*/
|
|
11
|
+
declare function isTopmost(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Hands focus back to whatever opened the dialog. Called on close and again
|
|
14
|
+
* on unmount, because `dismissConfirms()` destroys the host outright and a
|
|
15
|
+
* close that is never rendered has no transition to hang a restore on. Losing
|
|
16
|
+
* this drops a keyboard user at the top of the document.
|
|
17
|
+
*/
|
|
18
|
+
declare function restoreFocus(): void;
|
|
19
|
+
declare var __VLS_16: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
default?: (props: typeof __VLS_16) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<IConfirmProps, {
|
|
24
|
+
focusCancel: () => void | undefined;
|
|
25
|
+
restoreFocus: typeof restoreFocus;
|
|
26
|
+
isTopmost: typeof isTopmost;
|
|
27
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
cancel: () => any;
|
|
29
|
+
confirm: () => any;
|
|
30
|
+
}, string, import("vue").PublicProps, Readonly<IConfirmProps> & Readonly<{
|
|
31
|
+
onCancel?: (() => any) | undefined;
|
|
32
|
+
onConfirm?: (() => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
size: import("./Modal").TModalSize;
|
|
35
|
+
error: string;
|
|
36
|
+
message: string;
|
|
37
|
+
open: boolean;
|
|
38
|
+
busy: boolean;
|
|
39
|
+
subject: string;
|
|
40
|
+
subjectLabel: string;
|
|
41
|
+
confirmLabel: string;
|
|
42
|
+
cancelLabel: string;
|
|
43
|
+
tone: import("./Confirm.d").TConfirmTone;
|
|
44
|
+
typeToConfirm: string;
|
|
45
|
+
typeToConfirmLabel: string;
|
|
46
|
+
typeToConfirmHelper: string;
|
|
47
|
+
busyLabel: string;
|
|
48
|
+
succeeded: boolean;
|
|
49
|
+
successLabel: string;
|
|
50
|
+
floatingSelectors: string[];
|
|
51
|
+
contentClass: string;
|
|
52
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
|
+
declare const _default: typeof __VLS_export;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=Confirm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Confirm.vue.d.ts","sourceRoot":"","sources":["../../src/components/Confirm.vue"],"names":[],"mappings":"AAmuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAkHhD;;;;;;;;GAQG;AACH,iBAAS,SAAS,IAAI,OAAO,CAK5B;AAsFD;;;;;GAKG;AACH,iBAAS,YAAY,SAIpB;AA8iBD,QAAA,IAAI,QAAQ,IAAiC,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAShD,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"}
|
|
@@ -37,13 +37,13 @@ declare const __VLS_base: import("vue").DefineComponent<IDatePickerProps, {
|
|
|
37
37
|
locale: string;
|
|
38
38
|
helper: string;
|
|
39
39
|
placeholder: string;
|
|
40
|
+
readonly: boolean;
|
|
40
41
|
endValue: string | null;
|
|
41
42
|
endPlaceholder: string;
|
|
42
43
|
endLabel: string;
|
|
43
44
|
endError: string;
|
|
44
45
|
endWarning: string;
|
|
45
46
|
disabledDates: string[] | ((date: string) => boolean);
|
|
46
|
-
readonly: boolean;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
48
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
49
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IDefaultProps } from '../types/Props.d'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The four states a single action moves through. `inactive` is not "hidden":
|
|
5
|
+
* the component still renders its (empty) live region so that assistive tech
|
|
6
|
+
* is watching the node before the first update lands in it.
|
|
7
|
+
*/
|
|
8
|
+
enum EInlineLoadingStatus {
|
|
9
|
+
Inactive = 'inactive',
|
|
10
|
+
Active = 'active',
|
|
11
|
+
Finished = 'finished',
|
|
12
|
+
Error = 'error',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface IInlineLoadingProps extends IDefaultProps {
|
|
16
|
+
/** Current state of the action. */
|
|
17
|
+
status?: `${EInlineLoadingStatus}`
|
|
18
|
+
/** Text shown while `status` is `active`. Present tense: "Saving". */
|
|
19
|
+
label?: string
|
|
20
|
+
/** Text shown while `status` is `finished`. Past tense: "Saved". */
|
|
21
|
+
finishedLabel?: string
|
|
22
|
+
/** Text shown while `status` is `error`. Say what failed, not "Error". */
|
|
23
|
+
errorLabel?: string
|
|
24
|
+
/**
|
|
25
|
+
* Milliseconds the finished state stays on screen before `success` is
|
|
26
|
+
* emitted. Below roughly 1000 the confirmation is gone before it is read.
|
|
27
|
+
*/
|
|
28
|
+
dwell?: number
|
|
29
|
+
/**
|
|
30
|
+
* Reserves horizontal space for the longest of the three labels so the
|
|
31
|
+
* controls beside it do not jump when the text changes. Turn off when the
|
|
32
|
+
* component is the last thing in its row and nothing can be pushed.
|
|
33
|
+
*/
|
|
34
|
+
reserveSpace?: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { EInlineLoadingStatus, IInlineLoadingProps }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EInlineLoadingStatus, IInlineLoadingProps } from './InlineLoading.d';
|
|
2
|
+
declare var __VLS_11: {
|
|
3
|
+
status: "error" | "active" | "inactive" | "finished";
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_11) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<IInlineLoadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
success: () => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<IInlineLoadingProps> & Readonly<{
|
|
12
|
+
onSuccess?: (() => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
label: string;
|
|
15
|
+
id: string;
|
|
16
|
+
status: `${EInlineLoadingStatus}`;
|
|
17
|
+
finishedLabel: string;
|
|
18
|
+
errorLabel: string;
|
|
19
|
+
dwell: number;
|
|
20
|
+
reserveSpace: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=InlineLoading.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineLoading.vue.d.ts","sourceRoot":"","sources":["../../src/components/InlineLoading.vue"],"names":[],"mappings":"AA+KA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AA4L7E,QAAA,IAAI,QAAQ;;;CAAY,CAAE;AAC1B,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,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"}
|
|
@@ -16,8 +16,8 @@ declare const __VLS_base: import("vue").DefineComponent<IMenuItemProps, {
|
|
|
16
16
|
icon: string;
|
|
17
17
|
selected: boolean;
|
|
18
18
|
shortcut: string;
|
|
19
|
-
selectable: boolean;
|
|
20
19
|
danger: boolean;
|
|
20
|
+
selectable: boolean;
|
|
21
21
|
radioGroup: string;
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -15,11 +15,45 @@ import { ESizeShort } from '../types/Size.d'
|
|
|
15
15
|
*/
|
|
16
16
|
type TModalSize = `${ESizeShort}` | 'xl' | 'immersive'
|
|
17
17
|
|
|
18
|
+
/** `dialog` for a place the user chose to go, `alertdialog` for an interruption. */
|
|
19
|
+
type TModalRole = 'dialog' | 'alertdialog'
|
|
20
|
+
|
|
18
21
|
interface IModalProps {
|
|
19
22
|
open?: boolean
|
|
20
23
|
title?: string
|
|
21
24
|
size?: TModalSize
|
|
22
25
|
closeOnOverlay?: boolean
|
|
26
|
+
/**
|
|
27
|
+
* ARIA role for the dialog box. `alertdialog` is for a surface that
|
|
28
|
+
* interrupts to report a condition or ask for a decision that cannot wait
|
|
29
|
+
* (NbConfirm's destructive tone uses it); screen readers announce its
|
|
30
|
+
* description on entry rather than waiting to be asked.
|
|
31
|
+
*/
|
|
32
|
+
role?: TModalRole
|
|
33
|
+
/**
|
|
34
|
+
* Id of the element that names the dialog. Defaults to the built-in title
|
|
35
|
+
* when `title` or the header slot is used, so the common case needs nothing.
|
|
36
|
+
* Pass your own when the accessible name lives inside the header slot.
|
|
37
|
+
*/
|
|
38
|
+
labelledBy?: string
|
|
39
|
+
/** Id of the element that describes the dialog, usually its body. */
|
|
40
|
+
describedBy?: string
|
|
41
|
+
/**
|
|
42
|
+
* Marks the dialog `aria-busy` while work it started is in flight.
|
|
43
|
+
*/
|
|
44
|
+
busy?: boolean
|
|
45
|
+
/**
|
|
46
|
+
* Disables the header close control. A dialog that has fired something
|
|
47
|
+
* irreversible must not offer a control that pretends to undo it, and a
|
|
48
|
+
* live button that does nothing is worse than a visibly unavailable one.
|
|
49
|
+
*/
|
|
50
|
+
closeDisabled?: boolean
|
|
51
|
+
/**
|
|
52
|
+
* Whether Escape emits `close`. Escape is answered only by the topmost
|
|
53
|
+
* open dialog either way, so a modal underneath keeps its state; set this
|
|
54
|
+
* to `false` when a wrapper (NbConfirm) answers the key itself.
|
|
55
|
+
*/
|
|
56
|
+
closeOnEscape?: boolean
|
|
23
57
|
}
|
|
24
58
|
|
|
25
|
-
export { IModalProps, TModalSize }
|
|
59
|
+
export { IModalProps, TModalSize, TModalRole }
|
|
@@ -7,15 +7,24 @@ type __VLS_Slots = {} & {
|
|
|
7
7
|
} & {
|
|
8
8
|
footer?: (props: typeof __VLS_28) => any;
|
|
9
9
|
};
|
|
10
|
-
declare const __VLS_base: import("vue").DefineComponent<IModalProps, {
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<IModalProps, {
|
|
11
|
+
dialogEl: () => HTMLElement | null;
|
|
12
|
+
bodyEl: () => HTMLElement | null;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
14
|
close: () => any;
|
|
12
15
|
}, string, import("vue").PublicProps, Readonly<IModalProps> & Readonly<{
|
|
13
16
|
onClose?: (() => any) | undefined;
|
|
14
17
|
}>, {
|
|
15
18
|
size: import("./Modal.d").TModalSize;
|
|
16
19
|
title: string;
|
|
20
|
+
role: import("./Modal.d").TModalRole;
|
|
17
21
|
open: boolean;
|
|
18
22
|
closeOnOverlay: boolean;
|
|
23
|
+
labelledBy: string;
|
|
24
|
+
describedBy: string;
|
|
25
|
+
busy: boolean;
|
|
26
|
+
closeDisabled: boolean;
|
|
27
|
+
closeOnEscape: boolean;
|
|
19
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../src/components/Modal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.vue.d.ts","sourceRoot":"","sources":["../../src/components/Modal.vue"],"names":[],"mappings":"AAsZA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAkV5C,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACpE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAQ/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"}
|