@salesql/sql_components_vue3 3.32.0 → 3.34.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/composables/usePickerOrganizer.d.ts +15 -0
- package/dist/constants/events.d.ts +10 -0
- package/dist/constants/pickers.d.ts +13 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -7
- package/dist/index.es.js +5288 -4376
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsAccountMenu/DsAccountMenu.types.d.ts +22 -12
- package/dist/ui/DsAccountMenu/DsAccountMenu.vue.d.ts +16 -3
- package/dist/ui/DsActionMenu/DsActionMenu.types.d.ts +8 -0
- package/dist/ui/DsColumnList/DsColumnList.types.d.ts +26 -0
- package/dist/ui/DsColumnList/DsColumnList.vue.d.ts +66 -0
- package/dist/ui/DsColumnList/index.d.ts +2 -0
- package/dist/ui/DsConfirmDialog/DsConfirmDialog.types.d.ts +24 -0
- package/dist/ui/DsConfirmDialog/DsConfirmDialog.vue.d.ts +91 -0
- package/dist/ui/DsConfirmDialog/index.d.ts +2 -0
- package/dist/ui/DsContactCard/DsContactCard.types.d.ts +30 -0
- package/dist/ui/DsContactCard/DsContactCard.vue.d.ts +103 -0
- package/dist/ui/DsContactCard/index.d.ts +2 -0
- package/dist/ui/DsCreditsChip/DsCreditsChip.types.d.ts +23 -0
- package/dist/ui/DsCreditsChip/DsCreditsChip.vue.d.ts +56 -0
- package/dist/ui/DsCreditsChip/index.d.ts +2 -0
- package/dist/ui/DsCreditsNotice/DsCreditsNotice.types.d.ts +15 -0
- package/dist/ui/DsCreditsNotice/DsCreditsNotice.vue.d.ts +46 -0
- package/dist/ui/DsCreditsNotice/index.d.ts +2 -0
- package/dist/ui/DsCreditsPopover/DsCreditsPopover.types.d.ts +46 -0
- package/dist/ui/DsCreditsPopover/DsCreditsPopover.vue.d.ts +108 -0
- package/dist/ui/DsCreditsPopover/index.d.ts +2 -0
- package/dist/ui/DsCreditsSummary/DsCreditsSummary.types.d.ts +42 -0
- package/dist/ui/DsCreditsSummary/DsCreditsSummary.vue.d.ts +51 -0
- package/dist/ui/DsCreditsSummary/creditsLevel.d.ts +13 -0
- package/dist/ui/DsCreditsSummary/index.d.ts +3 -0
- package/dist/ui/DsEmptyState/DsEmptyState.types.d.ts +11 -0
- package/dist/ui/DsEmptyState/DsEmptyState.vue.d.ts +29 -0
- package/dist/ui/DsItemSelectorButton/DsItemSelectorButton.types.d.ts +6 -0
- package/dist/ui/DsItemSelectorButton/DsItemSelectorButton.vue.d.ts +9 -0
- package/dist/ui/DsModal/DsModal.types.d.ts +8 -0
- package/dist/ui/DsModal/DsModal.vue.d.ts +25 -0
- package/dist/ui/DsModal/modalStack.d.ts +9 -0
- package/dist/ui/DsPopover/DsPopover.types.d.ts +8 -0
- package/dist/ui/DsPopover/DsPopover.vue.d.ts +18 -0
- package/dist/ui/DsSavedButton/DsSavedButton.types.d.ts +8 -2
- package/dist/ui/DsSavedButton/DsSavedButton.vue.d.ts +33 -4
- package/dist/ui/DsTagPicker/DsTagPicker.types.d.ts +6 -1
- package/dist/ui/DsTagPicker/DsTagPicker.vue.d.ts +12 -2
- package/llms-full.txt +421 -67
- package/llms.txt +7 -0
- package/package.json +1 -1
- package/src/icons/manifest.json +3 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { DsCreditsChipCopy } from '../../ui/DsCreditsChip';
|
|
2
|
+
import type { DsCredits, DsCreditsCopy, DsCreditsLevel } from '../../ui/DsCreditsSummary';
|
|
3
|
+
export declare const DS_CREDITS_ACTION_KINDS: {
|
|
4
|
+
readonly UPGRADE: "upgrade";
|
|
5
|
+
readonly SEE_PLANS: "see_plans";
|
|
6
|
+
readonly UPDATE_PAYMENT: "update_payment";
|
|
7
|
+
};
|
|
8
|
+
export type DsCreditsActionKind = (typeof DS_CREDITS_ACTION_KINDS)[keyof typeof DS_CREDITS_ACTION_KINDS];
|
|
9
|
+
export interface DsCreditsAction {
|
|
10
|
+
kind: DsCreditsActionKind;
|
|
11
|
+
/** The button text («Upgrade», «See plans», «Update payment»). App copy. */
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
/** Every string of the chip and the popover. Pass a partial: it overrides only its keys. */
|
|
15
|
+
export interface DsCreditsPopoverCopy extends DsCreditsCopy {
|
|
16
|
+
/** The chip's accessible name. */
|
|
17
|
+
chipLabel: DsCreditsChipCopy['label'];
|
|
18
|
+
/** The dialog's accessible name. */
|
|
19
|
+
dialog: string;
|
|
20
|
+
/** The amber notice at level `low`. `resetsOn` may be empty. */
|
|
21
|
+
lowNotice: (available: number, resetsOn: string) => string;
|
|
22
|
+
/** The red notice at level `out`. `resetsOn` may be empty. */
|
|
23
|
+
outNotice: (resetsOn: string) => string;
|
|
24
|
+
}
|
|
25
|
+
export declare const DS_CREDITS_POPOVER_COPY: DsCreditsPopoverCopy;
|
|
26
|
+
export interface DsCreditsPopoverProps {
|
|
27
|
+
/** Visibility. Omit it and the popover manages itself; bind `v-model:open` to control it. */
|
|
28
|
+
open?: boolean;
|
|
29
|
+
credits: DsCredits;
|
|
30
|
+
/** Colours the chip, the balance and the meter, and shows the low / out notice. */
|
|
31
|
+
level?: DsCreditsLevel;
|
|
32
|
+
/** The plan chip («Pro plan»). Empty = none. */
|
|
33
|
+
planLabel?: string;
|
|
34
|
+
/** The button under the summary. `null` = none. */
|
|
35
|
+
action?: DsCreditsAction | null;
|
|
36
|
+
/** A line instead of a button, with the `group` icon («Your team admin manages the plan»). */
|
|
37
|
+
note?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Panel width, also its max (DsPopover's 320 cap does not apply; the viewport's does): a number
|
|
40
|
+
* is px, a string any CSS length. Default 264.
|
|
41
|
+
*/
|
|
42
|
+
width?: number | string;
|
|
43
|
+
/** The chip's tooltip. Empty = none. */
|
|
44
|
+
tooltip?: string;
|
|
45
|
+
copy?: Partial<DsCreditsPopoverCopy>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type DsCredits, type DsCreditsLevel } from '../../ui/DsCreditsSummary';
|
|
3
|
+
import { type DsCreditsAction, type DsCreditsPopoverCopy } from './DsCreditsPopover.types';
|
|
4
|
+
declare var __VLS_11: {
|
|
5
|
+
open: boolean;
|
|
6
|
+
}, __VLS_25: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
trigger?: (props: typeof __VLS_11) => any;
|
|
9
|
+
} & {
|
|
10
|
+
notice?: (props: typeof __VLS_25) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
+
open: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
credits: {
|
|
18
|
+
type: PropType<DsCredits>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
level: {
|
|
22
|
+
type: PropType<DsCreditsLevel>;
|
|
23
|
+
default: "normal";
|
|
24
|
+
};
|
|
25
|
+
planLabel: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
action: {
|
|
30
|
+
type: PropType<DsCreditsAction | null>;
|
|
31
|
+
default: null;
|
|
32
|
+
};
|
|
33
|
+
note: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
width: {
|
|
38
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
39
|
+
default: number;
|
|
40
|
+
};
|
|
41
|
+
tooltip: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
copy: {
|
|
46
|
+
type: PropType<Partial<DsCreditsPopoverCopy>>;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
|
+
"update:open": (...args: any[]) => void;
|
|
51
|
+
action: (...args: any[]) => void;
|
|
52
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
|
+
open: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
57
|
+
credits: {
|
|
58
|
+
type: PropType<DsCredits>;
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
level: {
|
|
62
|
+
type: PropType<DsCreditsLevel>;
|
|
63
|
+
default: "normal";
|
|
64
|
+
};
|
|
65
|
+
planLabel: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
action: {
|
|
70
|
+
type: PropType<DsCreditsAction | null>;
|
|
71
|
+
default: null;
|
|
72
|
+
};
|
|
73
|
+
note: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
width: {
|
|
78
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
79
|
+
default: number;
|
|
80
|
+
};
|
|
81
|
+
tooltip: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
copy: {
|
|
86
|
+
type: PropType<Partial<DsCreditsPopoverCopy>>;
|
|
87
|
+
default: undefined;
|
|
88
|
+
};
|
|
89
|
+
}>> & Readonly<{
|
|
90
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
91
|
+
onAction?: ((...args: any[]) => any) | undefined;
|
|
92
|
+
}>, {
|
|
93
|
+
width: string | number;
|
|
94
|
+
copy: Partial<DsCreditsPopoverCopy>;
|
|
95
|
+
action: DsCreditsAction | null;
|
|
96
|
+
open: boolean;
|
|
97
|
+
tooltip: string;
|
|
98
|
+
level: DsCreditsLevel;
|
|
99
|
+
planLabel: string;
|
|
100
|
+
note: string;
|
|
101
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
102
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
103
|
+
export default _default;
|
|
104
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
105
|
+
new (): {
|
|
106
|
+
$slots: S;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** How the balance reads: `normal`, `low` (amber) or `out` (red). See `getCreditsLevel`. */
|
|
2
|
+
export declare const DS_CREDITS_LEVELS: {
|
|
3
|
+
readonly NORMAL: "normal";
|
|
4
|
+
readonly LOW: "low";
|
|
5
|
+
readonly OUT: "out";
|
|
6
|
+
};
|
|
7
|
+
export type DsCreditsLevel = (typeof DS_CREDITS_LEVELS)[keyof typeof DS_CREDITS_LEVELS];
|
|
8
|
+
export interface DsCredits {
|
|
9
|
+
/** Used this period. Only read with a `total`. Omitted = `total - available` (not below 0), else 0. */
|
|
10
|
+
used?: number | null;
|
|
11
|
+
/** The period's allowance. `null`, `0` or omitted = unknown: no bar and no «X of Y used». */
|
|
12
|
+
total?: number | null;
|
|
13
|
+
/** «N available», never below 0. Omitted = `total - used`. Given, it wins, even above `total`. */
|
|
14
|
+
available?: number | null;
|
|
15
|
+
/** Reset date, already formatted by the app («Dec 1»). Empty = no reset text. */
|
|
16
|
+
resetsOn?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Every string of the block. Pass a partial: it overrides only its keys. */
|
|
19
|
+
export interface DsCreditsCopy {
|
|
20
|
+
title: string;
|
|
21
|
+
/** The row layout's «N available». */
|
|
22
|
+
available: (available: number) => string;
|
|
23
|
+
/** The word next to the prominent figure. */
|
|
24
|
+
availableLabel: string;
|
|
25
|
+
used: (used: number, total: number) => string;
|
|
26
|
+
/** Never «Renews»: the credits reset. */
|
|
27
|
+
resets: (date: string) => string;
|
|
28
|
+
/** The progress bar's accessible name. */
|
|
29
|
+
progress: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const formatCredits: (n: number) => string;
|
|
32
|
+
export declare const DS_CREDITS_COPY: DsCreditsCopy;
|
|
33
|
+
export interface DsCreditsSummaryProps {
|
|
34
|
+
credits: DsCredits;
|
|
35
|
+
/** Colours the balance and makes the meter solid (amber / red). Default `normal`. */
|
|
36
|
+
level?: DsCreditsLevel;
|
|
37
|
+
/** The popover layout: «Credits» + plan chip, then the balance as a 26px figure. */
|
|
38
|
+
prominent?: boolean;
|
|
39
|
+
/** The plan chip of the prominent header («Pro plan»). Empty = no chip. Prominent only. */
|
|
40
|
+
planLabel?: string;
|
|
41
|
+
copy?: Partial<DsCreditsCopy>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import { type DsCredits, type DsCreditsCopy, type DsCreditsLevel } from './DsCreditsSummary.types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
credits: {
|
|
5
|
+
type: PropType<DsCredits>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
level: {
|
|
9
|
+
type: PropType<DsCreditsLevel>;
|
|
10
|
+
default: "normal";
|
|
11
|
+
};
|
|
12
|
+
prominent: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
planLabel: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
copy: {
|
|
21
|
+
type: PropType<Partial<DsCreditsCopy>>;
|
|
22
|
+
default: undefined;
|
|
23
|
+
};
|
|
24
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
credits: {
|
|
26
|
+
type: PropType<DsCredits>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
level: {
|
|
30
|
+
type: PropType<DsCreditsLevel>;
|
|
31
|
+
default: "normal";
|
|
32
|
+
};
|
|
33
|
+
prominent: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
planLabel: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
copy: {
|
|
42
|
+
type: PropType<Partial<DsCreditsCopy>>;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
}>> & Readonly<{}>, {
|
|
46
|
+
copy: Partial<DsCreditsCopy>;
|
|
47
|
+
level: DsCreditsLevel;
|
|
48
|
+
prominent: boolean;
|
|
49
|
+
planLabel: string;
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DsCreditsLevel } from './DsCreditsSummary.types';
|
|
2
|
+
/** Below this share of the base the balance turns amber (Free 50: 9 or less). */
|
|
3
|
+
export declare const CREDITS_LOW_SHARE = 0.2;
|
|
4
|
+
export interface CreditsLevelInput {
|
|
5
|
+
available?: number | null;
|
|
6
|
+
/** What «low» is measured against: the plan's monthly credits, else the period's total. */
|
|
7
|
+
base?: number | null;
|
|
8
|
+
lowShare?: number;
|
|
9
|
+
/** A free plan still being set up: never coloured, not even at 0. */
|
|
10
|
+
pendingSetup?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** `out` at 0 or below (with or without a base), `low` under `base × lowShare`, else `normal`. */
|
|
13
|
+
export declare function getCreditsLevel({ available, base, lowShare, pendingSetup, }: CreditsLevelInput): DsCreditsLevel;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
/** Size of the round holder of `icon`: medium 56px (28px glyph), large 64px (32px glyph). */
|
|
2
|
+
export declare const DS_EMPTY_STATE_ICON_SIZES: {
|
|
3
|
+
readonly MEDIUM: "medium";
|
|
4
|
+
readonly LARGE: "large";
|
|
5
|
+
};
|
|
6
|
+
export type DsEmptyStateIconSize = (typeof DS_EMPTY_STATE_ICON_SIZES)[keyof typeof DS_EMPTY_STATE_ICON_SIZES];
|
|
1
7
|
export interface DsEmptyStateProps {
|
|
2
8
|
/** Illustration URL rendered above the title. Decorative — always renders with alt="". */
|
|
3
9
|
image?: string;
|
|
10
|
+
/** Material Symbols name of a glyph in a round holder above the title. An alternative to `image`: when both are set, `image` wins. */
|
|
11
|
+
icon?: string;
|
|
12
|
+
/** Colour of the glyph (any CSS colour). Default: the muted grey of the holder. */
|
|
13
|
+
iconColor?: string;
|
|
14
|
+
iconSize?: DsEmptyStateIconSize;
|
|
4
15
|
/** Empty-state heading. Rendered as a styled `<p>`, never an `<h1>` — a reusable
|
|
5
16
|
* component must not hardcode a heading level, or it would corrupt the consuming
|
|
6
17
|
* page's heading outline. */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import { type DsEmptyStateIconSize } from './DsEmptyState.types';
|
|
1
3
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
2
4
|
type __VLS_Slots = {} & {
|
|
3
5
|
'table-header'?: (props: typeof __VLS_1) => any;
|
|
@@ -9,6 +11,18 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
9
11
|
type: StringConstructor;
|
|
10
12
|
default: string;
|
|
11
13
|
};
|
|
14
|
+
icon: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
iconColor: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
iconSize: {
|
|
23
|
+
type: PropType<DsEmptyStateIconSize>;
|
|
24
|
+
default: "medium";
|
|
25
|
+
};
|
|
12
26
|
title: {
|
|
13
27
|
type: StringConstructor;
|
|
14
28
|
default: string;
|
|
@@ -26,6 +40,18 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
26
40
|
type: StringConstructor;
|
|
27
41
|
default: string;
|
|
28
42
|
};
|
|
43
|
+
icon: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
iconColor: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
iconSize: {
|
|
52
|
+
type: PropType<DsEmptyStateIconSize>;
|
|
53
|
+
default: "medium";
|
|
54
|
+
};
|
|
29
55
|
title: {
|
|
30
56
|
type: StringConstructor;
|
|
31
57
|
default: string;
|
|
@@ -41,6 +67,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
41
67
|
}>> & Readonly<{}>, {
|
|
42
68
|
title: string;
|
|
43
69
|
image: string;
|
|
70
|
+
iconSize: DsEmptyStateIconSize;
|
|
71
|
+
icon: string;
|
|
72
|
+
iconColor: string;
|
|
44
73
|
subtitle: string;
|
|
45
74
|
roundedBorder: boolean;
|
|
46
75
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -19,4 +19,10 @@ export interface DsItemSelectorButtonProps {
|
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
/** Max width of the label before it truncates (default 200px). A number is px. */
|
|
21
21
|
labelMaxWidth?: number | string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Shows only the icon (no gap, symmetric padding: a 42px chip). The label stays
|
|
24
|
+
* visually hidden, so `item.name` (or `ariaLabel`) still names the button. Without `icon`
|
|
25
|
+
* it has no effect: the label stays visible.
|
|
26
|
+
*/
|
|
27
|
+
iconOnly?: boolean;
|
|
22
28
|
}
|
|
@@ -22,6 +22,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
22
22
|
type: (NumberConstructor | StringConstructor)[];
|
|
23
23
|
default: null;
|
|
24
24
|
};
|
|
25
|
+
iconOnly: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
25
29
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
30
|
click: (...args: any[]) => void;
|
|
27
31
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -46,6 +50,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
46
50
|
type: (NumberConstructor | StringConstructor)[];
|
|
47
51
|
default: null;
|
|
48
52
|
};
|
|
53
|
+
iconOnly: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
49
57
|
}>> & Readonly<{
|
|
50
58
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
51
59
|
}>, {
|
|
@@ -55,5 +63,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
55
63
|
item: DsSelectorItem | null;
|
|
56
64
|
emptyTitle: string;
|
|
57
65
|
labelMaxWidth: string | number;
|
|
66
|
+
iconOnly: boolean;
|
|
58
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
59
68
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** `alertdialog` for a question that interrupts the flow (DsConfirmDialog). */
|
|
2
|
+
export type DsModalRole = 'dialog' | 'alertdialog';
|
|
1
3
|
export interface DsModalProps {
|
|
2
4
|
open?: boolean;
|
|
3
5
|
title?: string;
|
|
@@ -18,4 +20,10 @@ export interface DsModalProps {
|
|
|
18
20
|
/** Whether pressing Escape emits close (portal mode). Default true. */
|
|
19
21
|
closeOnEscape?: boolean;
|
|
20
22
|
closeLabel?: string;
|
|
23
|
+
/** Work in flight: the × is disabled and the dialog is `aria-busy`. Default false. */
|
|
24
|
+
busy?: boolean;
|
|
25
|
+
/** Id of the element that describes the dialog (`aria-describedby`). Empty (default) = none. */
|
|
26
|
+
describedby?: string;
|
|
27
|
+
/** Default `dialog`. */
|
|
28
|
+
role?: DsModalRole;
|
|
21
29
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { DsModalRole } from './DsModal.types';
|
|
1
3
|
declare var __VLS_17: {}, __VLS_19: {};
|
|
2
4
|
type __VLS_Slots = {} & {
|
|
3
5
|
default?: (props: typeof __VLS_17) => any;
|
|
@@ -43,6 +45,16 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
43
45
|
type: StringConstructor;
|
|
44
46
|
default: string;
|
|
45
47
|
};
|
|
48
|
+
busy: BooleanConstructor;
|
|
49
|
+
describedby: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
role: {
|
|
54
|
+
type: PropType<DsModalRole>;
|
|
55
|
+
default: string;
|
|
56
|
+
validator: (v: string) => v is "dialog" | "alertdialog";
|
|
57
|
+
};
|
|
46
58
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
59
|
close: (...args: any[]) => void;
|
|
48
60
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -84,20 +96,33 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
84
96
|
type: StringConstructor;
|
|
85
97
|
default: string;
|
|
86
98
|
};
|
|
99
|
+
busy: BooleanConstructor;
|
|
100
|
+
describedby: {
|
|
101
|
+
type: StringConstructor;
|
|
102
|
+
default: string;
|
|
103
|
+
};
|
|
104
|
+
role: {
|
|
105
|
+
type: PropType<DsModalRole>;
|
|
106
|
+
default: string;
|
|
107
|
+
validator: (v: string) => v is "dialog" | "alertdialog";
|
|
108
|
+
};
|
|
87
109
|
}>> & Readonly<{
|
|
88
110
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
89
111
|
}>, {
|
|
90
112
|
title: string;
|
|
91
113
|
width: string;
|
|
92
114
|
height: string;
|
|
115
|
+
role: DsModalRole;
|
|
93
116
|
open: boolean;
|
|
94
117
|
closeLabel: string;
|
|
95
118
|
center: boolean;
|
|
96
119
|
top: string;
|
|
97
120
|
fixed: boolean;
|
|
121
|
+
describedby: string;
|
|
98
122
|
showClose: boolean;
|
|
99
123
|
closeOnBackdrop: boolean;
|
|
100
124
|
closeOnEscape: boolean;
|
|
125
|
+
busy: boolean;
|
|
101
126
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
102
127
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
103
128
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function pushModal(token: symbol, returnFocus: HTMLElement | null): void;
|
|
2
|
+
/**
|
|
3
|
+
* Takes the layer out and returns where the focus goes back. A layer below the top returns
|
|
4
|
+
* nothing: the one above it inherits its target, so the focus stays in the top dialog.
|
|
5
|
+
*/
|
|
6
|
+
export declare function removeModal(token: symbol): HTMLElement | null;
|
|
7
|
+
export declare const isTopModal: (token: symbol) => boolean;
|
|
8
|
+
export declare function lockPageScroll(): void;
|
|
9
|
+
export declare function unlockPageScroll(): void;
|
|
@@ -98,4 +98,12 @@ export interface DsPopoverProps {
|
|
|
98
98
|
* `teleported` inside tables and scrollers. Off (default) = no layer. Additive (SALESQL-4183).
|
|
99
99
|
*/
|
|
100
100
|
modal?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* A box the `modal` layer leaves uncovered (same shape as `boundary`): what is there keeps the
|
|
103
|
+
* pointer (hover, clicks), and a press on it still counts as outside for `closeOnOutside`.
|
|
104
|
+
* Re-measured on open, resize and scroll. `null` (default) = the layer covers everything.
|
|
105
|
+
*/
|
|
106
|
+
modalExclude?: DsPopoverBoundary;
|
|
107
|
+
/** Accessible name of the `dialog` panel. Empty = none. Additive. */
|
|
108
|
+
ariaLabel?: string;
|
|
101
109
|
}
|
|
@@ -58,6 +58,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
58
58
|
type: BooleanConstructor;
|
|
59
59
|
default: boolean;
|
|
60
60
|
};
|
|
61
|
+
modalExclude: {
|
|
62
|
+
type: PropType<DsPopoverBoundary>;
|
|
63
|
+
default: null;
|
|
64
|
+
};
|
|
65
|
+
ariaLabel: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
61
69
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
62
70
|
"update:open": (...args: any[]) => void;
|
|
63
71
|
"backdrop-click": (...args: any[]) => void;
|
|
@@ -111,12 +119,21 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
111
119
|
type: BooleanConstructor;
|
|
112
120
|
default: boolean;
|
|
113
121
|
};
|
|
122
|
+
modalExclude: {
|
|
123
|
+
type: PropType<DsPopoverBoundary>;
|
|
124
|
+
default: null;
|
|
125
|
+
};
|
|
126
|
+
ariaLabel: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: string;
|
|
129
|
+
};
|
|
114
130
|
}>> & Readonly<{
|
|
115
131
|
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
116
132
|
"onBackdrop-click"?: ((...args: any[]) => any) | undefined;
|
|
117
133
|
}>, {
|
|
118
134
|
width: string;
|
|
119
135
|
open: boolean;
|
|
136
|
+
ariaLabel: string;
|
|
120
137
|
block: boolean;
|
|
121
138
|
flush: boolean;
|
|
122
139
|
closeOnEscape: boolean;
|
|
@@ -128,6 +145,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
128
145
|
triggerOnClick: boolean;
|
|
129
146
|
boundary: DsPopoverBoundary;
|
|
130
147
|
modal: boolean;
|
|
148
|
+
modalExclude: DsPopoverBoundary;
|
|
131
149
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
132
150
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
133
151
|
export default _default;
|
|
@@ -10,7 +10,7 @@ export interface DsSavedButtonCopy extends DsPickerOrganizerCopy {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const DS_SAVED_BUTTON_COPY: DsSavedButtonCopy;
|
|
12
12
|
export interface DsSavedButtonProps {
|
|
13
|
-
/** The neutral label ("Saved", or "Save" before the first save). App copy. */
|
|
13
|
+
/** The neutral label ("Saved", or "Save" before the first save); a table cell passes the folder name. It ellipsizes at the width it is given. App copy. */
|
|
14
14
|
label: string;
|
|
15
15
|
/** "Saved in {folder} · change folder". Shown whenever non-empty, and hidden while the panel is open. */
|
|
16
16
|
tooltip?: string;
|
|
@@ -19,6 +19,8 @@ export interface DsSavedButtonProps {
|
|
|
19
19
|
/** Material Symbols ligature for the folder glyph. */
|
|
20
20
|
icon?: string;
|
|
21
21
|
size?: DsPickerSize;
|
|
22
|
+
/** While the panel is open the trigger takes the accent tint (`accent-bg`, `accent-mid` border). The table's Folder cell. */
|
|
23
|
+
tintOpen?: boolean;
|
|
22
24
|
/** Fully round trigger (`DsButton pill`) for the bulk bar beside `DsItemSelectorButton`. Off = the design's table / profile trigger. */
|
|
23
25
|
pill?: boolean;
|
|
24
26
|
align?: DsPickerAlign;
|
|
@@ -37,8 +39,12 @@ export interface DsSavedButtonProps {
|
|
|
37
39
|
colors?: readonly string[];
|
|
38
40
|
/** Swatch the create form (and Edit of a folder without colour) starts at. Empty (default) = the first of `colors`. */
|
|
39
41
|
defaultColor?: string;
|
|
40
|
-
/** The app is saving the form: its submit button shows the spinner and is blocked. */
|
|
42
|
+
/** The app is saving the form: its submit button shows the spinner and is blocked. On success it calls `closeForm(created, session)` on the instance (`session` from `submitSession()` in the submit handler): with `selectOnCreate` and the folder it just created, the picker emits `pick` with it, closes and returns `'taken'`; `'not-taken'` = it did not (no `selectOnCreate`, or the panel closed, the form was left or another form opened during the save), so the app selects it itself; `'stale'` = a newer submit or pick superseded that save, so the app only lists it. `closeForm()` only goes back to the list. */
|
|
41
43
|
formLoading?: boolean;
|
|
44
|
+
/** `closeForm(created)` also picks the new folder and closes («Create & select»). Default `false`. */
|
|
45
|
+
selectOnCreate?: boolean;
|
|
46
|
+
/** Clicking the checked folder (mouse, Space or Enter) also emits `pick` with it and closes, e.g. to move a selection into the current destination. Default `false`: the checked folder emits nothing. */
|
|
47
|
+
repick?: boolean;
|
|
42
48
|
/** A failed save, shown under the name field. */
|
|
43
49
|
formError?: string;
|
|
44
50
|
copy?: Partial<DsSavedButtonCopy>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
2
|
import { type DsTooltipPlacement } from '../../ui/DsTooltip';
|
|
3
|
-
import { type DsPickerAlign, type DsPickerCreateMode, type DsPickerOption, type DsPickerRowActionsMode, type DsPickerSize } from '../../constants/pickers';
|
|
3
|
+
import { type DsPickerAlign, type DsPickerCreateMode, type DsPickerOption, type DsPickerRowActionsMode, type DsPickerSaveResult, type DsPickerSize } from '../../constants/pickers';
|
|
4
4
|
import { type DsSavedButtonCopy } from './DsSavedButton.types';
|
|
5
5
|
declare function toggle(): void;
|
|
6
6
|
declare function openCreateForm(name?: string): void;
|
|
7
|
+
declare function closeForm(created?: DsPickerOption, session?: number): DsPickerSaveResult;
|
|
7
8
|
declare var __VLS_9: {
|
|
8
9
|
open: boolean;
|
|
9
10
|
toggle: typeof toggle;
|
|
10
11
|
disabled: boolean;
|
|
11
|
-
},
|
|
12
|
+
}, __VLS_61: {
|
|
12
13
|
query: string;
|
|
13
14
|
openCreateForm: typeof openCreateForm;
|
|
14
15
|
};
|
|
15
16
|
type __VLS_Slots = {} & {
|
|
16
17
|
trigger?: (props: typeof __VLS_9) => any;
|
|
17
18
|
} & {
|
|
18
|
-
footer?: (props: typeof
|
|
19
|
+
footer?: (props: typeof __VLS_61) => any;
|
|
19
20
|
};
|
|
20
21
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
21
22
|
label: {
|
|
@@ -50,6 +51,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
50
51
|
type: BooleanConstructor;
|
|
51
52
|
default: boolean;
|
|
52
53
|
};
|
|
54
|
+
tintOpen: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
53
58
|
align: {
|
|
54
59
|
type: PropType<DsPickerAlign>;
|
|
55
60
|
default: "end";
|
|
@@ -84,6 +89,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
84
89
|
type: BooleanConstructor;
|
|
85
90
|
default: boolean;
|
|
86
91
|
};
|
|
92
|
+
selectOnCreate: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
default: boolean;
|
|
95
|
+
};
|
|
96
|
+
repick: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
87
100
|
formError: {
|
|
88
101
|
type: StringConstructor;
|
|
89
102
|
default: string;
|
|
@@ -153,7 +166,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
153
166
|
default: undefined;
|
|
154
167
|
};
|
|
155
168
|
}>, {
|
|
156
|
-
closeForm:
|
|
169
|
+
closeForm: typeof closeForm;
|
|
170
|
+
submitSession: () => number | undefined;
|
|
157
171
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
158
172
|
search: (...args: any[]) => void;
|
|
159
173
|
edit: (...args: any[]) => void;
|
|
@@ -198,6 +212,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
198
212
|
type: BooleanConstructor;
|
|
199
213
|
default: boolean;
|
|
200
214
|
};
|
|
215
|
+
tintOpen: {
|
|
216
|
+
type: BooleanConstructor;
|
|
217
|
+
default: boolean;
|
|
218
|
+
};
|
|
201
219
|
align: {
|
|
202
220
|
type: PropType<DsPickerAlign>;
|
|
203
221
|
default: "end";
|
|
@@ -232,6 +250,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
232
250
|
type: BooleanConstructor;
|
|
233
251
|
default: boolean;
|
|
234
252
|
};
|
|
253
|
+
selectOnCreate: {
|
|
254
|
+
type: BooleanConstructor;
|
|
255
|
+
default: boolean;
|
|
256
|
+
};
|
|
257
|
+
repick: {
|
|
258
|
+
type: BooleanConstructor;
|
|
259
|
+
default: boolean;
|
|
260
|
+
};
|
|
235
261
|
formError: {
|
|
236
262
|
type: StringConstructor;
|
|
237
263
|
default: string;
|
|
@@ -335,10 +361,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
335
361
|
deleteLabel: string;
|
|
336
362
|
createFormTitle: string;
|
|
337
363
|
editFormTitle: string;
|
|
364
|
+
tintOpen: boolean;
|
|
338
365
|
align: DsPickerAlign;
|
|
339
366
|
rowActions: boolean | DsPickerRowActionsMode;
|
|
340
367
|
defaultColor: string;
|
|
341
368
|
formLoading: boolean;
|
|
369
|
+
selectOnCreate: boolean;
|
|
370
|
+
repick: boolean;
|
|
342
371
|
formError: string;
|
|
343
372
|
createSubmitLabel: string;
|
|
344
373
|
editSubmitLabel: string;
|