@wpic/ui 0.9.86 → 0.9.147
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/CHANGELOG.md +81 -0
- package/COMPONENTS.md +56 -1
- package/dist/components/WAutocomplete.vue.d.ts +14 -0
- package/dist/components/WBadge.vue.d.ts +4 -2
- package/dist/components/WBanner.vue.d.ts +10 -3
- package/dist/components/WCard.vue.d.ts +2 -0
- package/dist/components/WChatComposer.vue.d.ts +22 -1
- package/dist/components/WChatEditor.vue.d.ts +17 -0
- package/dist/components/WChatPanel.vue.d.ts +66 -5
- package/dist/components/WDateRangePicker.vue.d.ts +4 -0
- package/dist/components/WEditableText.vue.d.ts +1 -1
- package/dist/components/WInput.vue.d.ts +1 -0
- package/dist/components/WSelect.vue.d.ts +11 -2
- package/dist/components/WSpreadsheet.vue.d.ts +5 -5
- package/dist/components/WTable.vue.d.ts +82 -2
- package/dist/components/WTableCell.vue.d.ts +20 -0
- package/dist/components/WTag.vue.d.ts +3 -1
- package/dist/components/semantic/styles.d.ts +15 -0
- package/dist/composables/menuKeys.d.ts +2 -0
- package/dist/composables/scrollReveal.d.ts +8 -0
- package/dist/index.d.ts +6 -1
- package/dist/stores/toast.d.ts +69 -40
- package/dist/wpic-ui.cjs +89 -68
- package/dist/wpic-ui.css +143 -24
- package/dist/wpic-ui.js +10437 -5530
- package/package.json +5 -3
- package/src/style.css +142 -23
|
@@ -77,8 +77,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
|
77
77
|
toggleExpanded: () => void;
|
|
78
78
|
download: typeof download;
|
|
79
79
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
80
|
-
"update:expanded": (value: boolean) => any;
|
|
81
|
-
"update:columnWidths": (value: Record<string, number>) => any;
|
|
82
80
|
"cell-change": (payload: {
|
|
83
81
|
rowKey: string;
|
|
84
82
|
cellKey: string;
|
|
@@ -86,9 +84,9 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
|
86
84
|
row: WSpreadsheetRow;
|
|
87
85
|
cell: WSpreadsheetCell;
|
|
88
86
|
}) => any;
|
|
87
|
+
"update:columnWidths": (value: Record<string, number>) => any;
|
|
88
|
+
"update:expanded": (value: boolean) => any;
|
|
89
89
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
90
|
-
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
91
|
-
"onUpdate:columnWidths"?: ((value: Record<string, number>) => any) | undefined;
|
|
92
90
|
"onCell-change"?: ((payload: {
|
|
93
91
|
rowKey: string;
|
|
94
92
|
cellKey: string;
|
|
@@ -96,12 +94,14 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
|
96
94
|
row: WSpreadsheetRow;
|
|
97
95
|
cell: WSpreadsheetCell;
|
|
98
96
|
}) => any) | undefined;
|
|
97
|
+
"onUpdate:columnWidths"?: ((value: Record<string, number>) => any) | undefined;
|
|
98
|
+
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
99
99
|
}>, {
|
|
100
100
|
minWidth: string;
|
|
101
|
+
maxHeight: string;
|
|
101
102
|
showAxes: boolean;
|
|
102
103
|
showColumnLetters: boolean;
|
|
103
104
|
showRowNumbers: boolean;
|
|
104
|
-
maxHeight: string;
|
|
105
105
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
106
106
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
107
107
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,12 +6,24 @@ export type WTableColumn = {
|
|
|
6
6
|
minWidth?: string;
|
|
7
7
|
sortable?: boolean;
|
|
8
8
|
searchable?: boolean;
|
|
9
|
+
/** Double-click editor. Requires editable permission on the row. */
|
|
10
|
+
editor?: 'textarea' | 'select';
|
|
11
|
+
options?: string[];
|
|
12
|
+
/** Free text with suggestions, optionally scoped to the current row. */
|
|
13
|
+
suggestions?: string[] | ((row: Record<string, unknown>) => string[]);
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
/** Marks body cells people can edit in place with a pale yellow fill, as in WSpreadsheet. */
|
|
16
|
+
editable?: boolean | ((row: Record<string, unknown>) => boolean);
|
|
9
17
|
};
|
|
10
18
|
declare const _default: typeof __VLS_export;
|
|
11
19
|
export default _default;
|
|
12
20
|
declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
13
21
|
data?: Record<string, unknown>[];
|
|
14
22
|
columns: WTableColumn[];
|
|
23
|
+
/** Keep body cells on one line; double-click or Enter opens full content. */
|
|
24
|
+
singleLine?: boolean;
|
|
25
|
+
/** Maximum automatic body-content width; explicit and manually resized widths take precedence. */
|
|
26
|
+
maxColumnWidth?: number;
|
|
15
27
|
loading?: boolean;
|
|
16
28
|
loadingSpinner?: boolean;
|
|
17
29
|
labels?: {
|
|
@@ -22,10 +34,19 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
22
34
|
items?: string;
|
|
23
35
|
previous?: string;
|
|
24
36
|
next?: string;
|
|
37
|
+
counting?: string;
|
|
38
|
+
horizontalScroll?: string;
|
|
39
|
+
tableScroll?: string;
|
|
40
|
+
save?: string;
|
|
41
|
+
cancel?: string;
|
|
25
42
|
};
|
|
26
43
|
emptyText?: string;
|
|
27
44
|
pageSize?: number;
|
|
28
|
-
|
|
45
|
+
/** null means the server count is not available yet. */
|
|
46
|
+
serverTotal?: number | null;
|
|
47
|
+
serverTotalCapped?: boolean;
|
|
48
|
+
/** Whether another page may exist while the count is unknown. */
|
|
49
|
+
serverHasNext?: boolean;
|
|
29
50
|
serverPage?: number;
|
|
30
51
|
/** Controlled sorting: emit changes and preserve the server row order. */
|
|
31
52
|
serverSort?: {
|
|
@@ -34,6 +55,12 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
34
55
|
};
|
|
35
56
|
searchPlaceholder?: string;
|
|
36
57
|
rowClickable?: boolean;
|
|
58
|
+
/** Pin column headers inside the bounded table scroll area. */
|
|
59
|
+
stickyHeader?: boolean;
|
|
60
|
+
/** CSS maximum height of the scroll area; stickyHeader defaults to 60vh. */
|
|
61
|
+
maxHeight?: string;
|
|
62
|
+
/** Show a synchronized horizontal scrollbar above overflowing tables. */
|
|
63
|
+
topScrollbar?: boolean;
|
|
37
64
|
showHeader?: boolean;
|
|
38
65
|
expandable?: boolean;
|
|
39
66
|
/** Accessible name of a row's expand toggle. Omitted: "Expand row" / "Collapse row". */
|
|
@@ -42,6 +69,10 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
42
69
|
selectedKeys?: (string | number)[];
|
|
43
70
|
rowKey?: string;
|
|
44
71
|
flushEdges?: boolean;
|
|
72
|
+
/** Draw an enclosing border with rounded corners for inset tables. */
|
|
73
|
+
bordered?: boolean;
|
|
74
|
+
/** Draw a top rule in the same colour as the table's row dividers, including when wrapped inside a card. */
|
|
75
|
+
topDivider?: boolean;
|
|
45
76
|
rowClass?: (row: Record<string, unknown>) => string | Record<string, boolean> | undefined;
|
|
46
77
|
rowStyle?: (row: Record<string, unknown>) => Record<string, string> | undefined;
|
|
47
78
|
/** Style the complete body cell, including its padding. */
|
|
@@ -58,10 +89,21 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
58
89
|
showFooter?: boolean;
|
|
59
90
|
/** Draw a vertical rule between adjacent cells, in the row divider colour. */
|
|
60
91
|
columnDividers?: boolean;
|
|
92
|
+
/** Drag a header's right edge, or use Left/Right on its handle, to resize that column. */
|
|
93
|
+
resizableColumns?: boolean;
|
|
94
|
+
/** Column widths in pixels by field; use with `v-model:columnWidths` to keep them across remounts. */
|
|
95
|
+
columnWidths?: Record<string, number>;
|
|
96
|
+
/** Accessible name prefix of each resize handle. Omitted: "Resize column". */
|
|
97
|
+
resizeColumnLabel?: string;
|
|
61
98
|
}, {
|
|
62
99
|
filteredCount: import('vue').ComputedRef<number>;
|
|
63
100
|
searchQuery: import('vue').Ref<string, string>;
|
|
64
101
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
102
|
+
"cell-change": (payload: {
|
|
103
|
+
row: Record<string, unknown>;
|
|
104
|
+
column: WTableColumn;
|
|
105
|
+
value: string;
|
|
106
|
+
}) => any;
|
|
65
107
|
"row-click": (row: Record<string, unknown>) => any;
|
|
66
108
|
"update:selectedKeys": (keys: (string | number)[]) => any;
|
|
67
109
|
"row-select": (row: Record<string, unknown>, selected: boolean) => any;
|
|
@@ -70,9 +112,14 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
70
112
|
field: string;
|
|
71
113
|
direction: "asc" | "desc";
|
|
72
114
|
}) => any;
|
|
115
|
+
"update:columnWidths": (value: Record<string, number>) => any;
|
|
73
116
|
}, string, import('vue').PublicProps, Readonly<{
|
|
74
117
|
data?: Record<string, unknown>[];
|
|
75
118
|
columns: WTableColumn[];
|
|
119
|
+
/** Keep body cells on one line; double-click or Enter opens full content. */
|
|
120
|
+
singleLine?: boolean;
|
|
121
|
+
/** Maximum automatic body-content width; explicit and manually resized widths take precedence. */
|
|
122
|
+
maxColumnWidth?: number;
|
|
76
123
|
loading?: boolean;
|
|
77
124
|
loadingSpinner?: boolean;
|
|
78
125
|
labels?: {
|
|
@@ -83,10 +130,19 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
83
130
|
items?: string;
|
|
84
131
|
previous?: string;
|
|
85
132
|
next?: string;
|
|
133
|
+
counting?: string;
|
|
134
|
+
horizontalScroll?: string;
|
|
135
|
+
tableScroll?: string;
|
|
136
|
+
save?: string;
|
|
137
|
+
cancel?: string;
|
|
86
138
|
};
|
|
87
139
|
emptyText?: string;
|
|
88
140
|
pageSize?: number;
|
|
89
|
-
|
|
141
|
+
/** null means the server count is not available yet. */
|
|
142
|
+
serverTotal?: number | null;
|
|
143
|
+
serverTotalCapped?: boolean;
|
|
144
|
+
/** Whether another page may exist while the count is unknown. */
|
|
145
|
+
serverHasNext?: boolean;
|
|
90
146
|
serverPage?: number;
|
|
91
147
|
/** Controlled sorting: emit changes and preserve the server row order. */
|
|
92
148
|
serverSort?: {
|
|
@@ -95,6 +151,12 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
95
151
|
};
|
|
96
152
|
searchPlaceholder?: string;
|
|
97
153
|
rowClickable?: boolean;
|
|
154
|
+
/** Pin column headers inside the bounded table scroll area. */
|
|
155
|
+
stickyHeader?: boolean;
|
|
156
|
+
/** CSS maximum height of the scroll area; stickyHeader defaults to 60vh. */
|
|
157
|
+
maxHeight?: string;
|
|
158
|
+
/** Show a synchronized horizontal scrollbar above overflowing tables. */
|
|
159
|
+
topScrollbar?: boolean;
|
|
98
160
|
showHeader?: boolean;
|
|
99
161
|
expandable?: boolean;
|
|
100
162
|
/** Accessible name of a row's expand toggle. Omitted: "Expand row" / "Collapse row". */
|
|
@@ -103,6 +165,10 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
103
165
|
selectedKeys?: (string | number)[];
|
|
104
166
|
rowKey?: string;
|
|
105
167
|
flushEdges?: boolean;
|
|
168
|
+
/** Draw an enclosing border with rounded corners for inset tables. */
|
|
169
|
+
bordered?: boolean;
|
|
170
|
+
/** Draw a top rule in the same colour as the table's row dividers, including when wrapped inside a card. */
|
|
171
|
+
topDivider?: boolean;
|
|
106
172
|
rowClass?: (row: Record<string, unknown>) => string | Record<string, boolean> | undefined;
|
|
107
173
|
rowStyle?: (row: Record<string, unknown>) => Record<string, string> | undefined;
|
|
108
174
|
/** Style the complete body cell, including its padding. */
|
|
@@ -119,7 +185,18 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
119
185
|
showFooter?: boolean;
|
|
120
186
|
/** Draw a vertical rule between adjacent cells, in the row divider colour. */
|
|
121
187
|
columnDividers?: boolean;
|
|
188
|
+
/** Drag a header's right edge, or use Left/Right on its handle, to resize that column. */
|
|
189
|
+
resizableColumns?: boolean;
|
|
190
|
+
/** Column widths in pixels by field; use with `v-model:columnWidths` to keep them across remounts. */
|
|
191
|
+
columnWidths?: Record<string, number>;
|
|
192
|
+
/** Accessible name prefix of each resize handle. Omitted: "Resize column". */
|
|
193
|
+
resizeColumnLabel?: string;
|
|
122
194
|
}> & Readonly<{
|
|
195
|
+
"onCell-change"?: ((payload: {
|
|
196
|
+
row: Record<string, unknown>;
|
|
197
|
+
column: WTableColumn;
|
|
198
|
+
value: string;
|
|
199
|
+
}) => any) | undefined;
|
|
123
200
|
"onRow-click"?: ((row: Record<string, unknown>) => any) | undefined;
|
|
124
201
|
"onUpdate:selectedKeys"?: ((keys: (string | number)[]) => any) | undefined;
|
|
125
202
|
"onRow-select"?: ((row: Record<string, unknown>, selected: boolean) => any) | undefined;
|
|
@@ -128,7 +205,9 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
128
205
|
field: string;
|
|
129
206
|
direction: "asc" | "desc";
|
|
130
207
|
}) => any) | undefined;
|
|
208
|
+
"onUpdate:columnWidths"?: ((value: Record<string, number>) => any) | undefined;
|
|
131
209
|
}>, {
|
|
210
|
+
maxColumnWidth: number;
|
|
132
211
|
loadingSpinner: boolean;
|
|
133
212
|
searchPlaceholder: string;
|
|
134
213
|
rowClickable: boolean;
|
|
@@ -137,6 +216,7 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
137
216
|
selectable: boolean;
|
|
138
217
|
rowKey: string;
|
|
139
218
|
flushEdges: boolean;
|
|
219
|
+
topDivider: boolean;
|
|
140
220
|
summaryPosition: "top" | "bottom" | "both";
|
|
141
221
|
showFooter: boolean;
|
|
142
222
|
columnDividers: boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value?: string | null;
|
|
3
|
+
label: string;
|
|
4
|
+
multiline?: boolean;
|
|
5
|
+
editable?: boolean;
|
|
6
|
+
options?: string[];
|
|
7
|
+
suggestions?: string[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
saveLabel?: string;
|
|
10
|
+
cancelLabel?: string;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
align?: 'left' | 'center' | 'right';
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
change: (value: string) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onChange?: ((value: string) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PopoverOption } from './WOptionPopover.vue';
|
|
2
|
-
import { WTheme, WSemanticVariant } from './semantic/styles';
|
|
2
|
+
import { WSemanticColor, WTheme, WSemanticVariant } from './semantic/styles';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
variant?: 'default' | 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'overlay' | 'teal' | 'meta';
|
|
5
|
+
/** Custom CSS hue or explicit light/dark color pairs; semantic variants remain the default. */
|
|
6
|
+
color?: WSemanticColor;
|
|
5
7
|
size?: 'sm' | 'md';
|
|
6
8
|
theme?: WTheme;
|
|
7
9
|
/** Controlled selection via v-model:checked. Checkable takes precedence over editable. */
|
|
@@ -3,6 +3,21 @@ export type WTheme = 'auto' | 'light' | 'dark';
|
|
|
3
3
|
export type WSemanticVariant = 'neutral' | 'info' | 'warning' | 'success' | 'error';
|
|
4
4
|
export type ThemeClasses = Record<WTheme, string>;
|
|
5
5
|
export declare function themed(classes: ThemeClasses, theme?: WTheme): string;
|
|
6
|
+
/** A CSS color, or explicit accessible foreground/background pairs for both themes. */
|
|
7
|
+
export type WSemanticColor = string | {
|
|
8
|
+
light: {
|
|
9
|
+
background: string;
|
|
10
|
+
text: string;
|
|
11
|
+
border?: string;
|
|
12
|
+
};
|
|
13
|
+
dark: {
|
|
14
|
+
background: string;
|
|
15
|
+
text: string;
|
|
16
|
+
border?: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare function customColorClass(theme?: WTheme): string;
|
|
20
|
+
export declare function customColorStyle(color: WSemanticColor): Record<string, string>;
|
|
6
21
|
export declare const bannerStyles: {
|
|
7
22
|
neutral: {
|
|
8
23
|
light: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const SCROLL_REVEAL_ROOT_CLASS = "wpic-scroll-reveal-root";
|
|
2
|
+
/**
|
|
3
|
+
* Thin scrollbars across the page, shown while their element scrolls and faded out afterwards
|
|
4
|
+
* (or shown while the pointer is on the thumb). Adds the root class to <html> and one capturing
|
|
5
|
+
* scroll listener; the CSS reads a non-inherited opacity variable set on the scrolling element.
|
|
6
|
+
* Returns a function that removes both.
|
|
7
|
+
*/
|
|
8
|
+
export declare function installWpicScrollReveal(root?: Document): () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as WButton } from './components/WButton.vue';
|
|
2
2
|
export { default as WButtonGroup } from './components/WButtonGroup.vue';
|
|
3
3
|
export { default as WFilter } from './components/WFilter.vue';
|
|
4
|
+
export { default as WTableCell } from './components/WTableCell.vue';
|
|
4
5
|
export { default as WTable } from './components/WTable.vue';
|
|
5
6
|
export type { WTableColumn } from './components/WTable.vue';
|
|
6
7
|
export { default as WSpreadsheet } from './components/WSpreadsheet.vue';
|
|
@@ -8,6 +9,7 @@ export type { WSpreadsheetCell, WSpreadsheetCellVariant, WSpreadsheetColumn, WSp
|
|
|
8
9
|
export { default as WCheckbox } from './components/WCheckbox.vue';
|
|
9
10
|
export { default as WChatPanel } from './components/WChatPanel.vue';
|
|
10
11
|
export type { WChatActionProposal, WChatAttachment, WChatInlineAction, WChatMessage, WChatProject, WChatSession } from './components/WChatPanel.vue';
|
|
12
|
+
export { default as WAutocomplete } from './components/WAutocomplete.vue';
|
|
11
13
|
export { default as WInput } from './components/WInput.vue';
|
|
12
14
|
export { default as WComboInput } from './components/WComboInput.vue';
|
|
13
15
|
export { default as WPagination } from './components/WPagination.vue';
|
|
@@ -52,6 +54,7 @@ export type { WTagItem } from './components/WTagInput.vue';
|
|
|
52
54
|
export { default as SearchSelect } from './components/SearchSelect.vue';
|
|
53
55
|
export { default as TreeSelect } from './components/TreeSelect.vue';
|
|
54
56
|
export { useToastStore } from './stores/toast';
|
|
57
|
+
export type { ToastItem, ToastOptions, ToastType } from './stores/toast';
|
|
55
58
|
export { default as WFileList } from './components/WFileList.vue';
|
|
56
59
|
export { default as WStatCard } from './components/WStatCard.vue';
|
|
57
60
|
export { default as WEmptyState } from './components/WEmptyState.vue';
|
|
@@ -73,6 +76,7 @@ export type { WSplitButtonOption } from './components/WSplitButton.vue';
|
|
|
73
76
|
export { default as WTailwindColorPicker } from './components/WTailwindColorPicker.vue';
|
|
74
77
|
export type { WTailwindColorOption } from './components/WTailwindColorPicker.vue';
|
|
75
78
|
export { useRecentItems } from './composables/useRecentItems';
|
|
79
|
+
export { installWpicScrollReveal, SCROLL_REVEAL_ROOT_CLASS } from './composables/scrollReveal';
|
|
76
80
|
export { default as WDateRangePicker } from './components/WDateRangePicker.vue';
|
|
77
81
|
export type { DateRange, DateRangePreset } from './components/WDateRangePicker.vue';
|
|
78
82
|
export { default as WDatePicker } from './components/WDatePicker.vue';
|
|
@@ -82,7 +86,7 @@ export { default as WSegmentedControl } from './components/WSegmentedControl.vue
|
|
|
82
86
|
export type { WSegmentedControlOption } from './components/WSegmentedControl.vue';
|
|
83
87
|
export { default as MarketplaceIcon } from './components/icons/MarketplaceIcon.vue';
|
|
84
88
|
export { default as ProviderLogo } from './components/icons/ProviderLogo.vue';
|
|
85
|
-
export type { WTheme, WSemanticVariant } from './components/semantic/styles';
|
|
89
|
+
export type { WTheme, WSemanticVariant, WSemanticColor } from './components/semantic/styles';
|
|
86
90
|
export { default as WThemeProvider } from './components/WThemeProvider.vue';
|
|
87
91
|
export { default as WPageHeader } from './components/WPageHeader.vue';
|
|
88
92
|
export { ui5Theme, themeVariables, chartPalettes, useWTheme } from './theme';
|
|
@@ -93,3 +97,4 @@ export { default as WBottomSheet } from './components/WBottomSheet.vue';
|
|
|
93
97
|
export { default as WChatEditor } from './components/WChatEditor.vue';
|
|
94
98
|
export { default as WChatComposer } from './components/WChatComposer.vue';
|
|
95
99
|
export type { WChatComposerSession } from './components/WChatComposer.vue';
|
|
100
|
+
export { menuKeydown } from './composables/menuKeys';
|
package/dist/stores/toast.d.ts
CHANGED
|
@@ -1,34 +1,62 @@
|
|
|
1
|
+
export type ToastType = 'success' | 'error' | 'info' | 'message';
|
|
2
|
+
export interface ToastItem {
|
|
3
|
+
id: number;
|
|
4
|
+
message: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string | null;
|
|
7
|
+
type: ToastType;
|
|
8
|
+
action: {
|
|
9
|
+
label: string;
|
|
10
|
+
fn: () => void;
|
|
11
|
+
} | null;
|
|
12
|
+
/** Toasts with the same key replace each other instead of stacking. */
|
|
13
|
+
key: string | null;
|
|
14
|
+
/** Makes the whole toast a button; the close button still only closes it. */
|
|
15
|
+
onClick: (() => void) | null;
|
|
16
|
+
/** Clamps the description to this many lines. */
|
|
17
|
+
lines: number | null;
|
|
18
|
+
}
|
|
19
|
+
export interface ToastOptions {
|
|
20
|
+
title: string;
|
|
21
|
+
description?: string | null;
|
|
22
|
+
type?: ToastType;
|
|
23
|
+
/** Milliseconds before the toast closes; 0 keeps it until closed. Hovering pauses it. */
|
|
24
|
+
duration?: number;
|
|
25
|
+
action?: {
|
|
26
|
+
label: string;
|
|
27
|
+
fn: () => void;
|
|
28
|
+
} | null;
|
|
29
|
+
key?: string | null;
|
|
30
|
+
onClick?: (() => void) | null;
|
|
31
|
+
lines?: number | null;
|
|
32
|
+
}
|
|
1
33
|
export declare const useToastStore: import('pinia').StoreDefinition<"wpic-toast", Pick<{
|
|
2
34
|
toasts: import('vue').Ref<{
|
|
3
35
|
id: number;
|
|
4
36
|
message: string;
|
|
5
37
|
title: string;
|
|
6
38
|
description: string | null;
|
|
7
|
-
type:
|
|
8
|
-
action: {
|
|
9
|
-
label: string;
|
|
10
|
-
fn: () => void;
|
|
11
|
-
} | null;
|
|
12
|
-
}[], {
|
|
13
|
-
id: number;
|
|
14
|
-
message: string;
|
|
15
|
-
title: string;
|
|
16
|
-
description: string | null;
|
|
17
|
-
type: "success" | "error" | "info";
|
|
39
|
+
type: ToastType;
|
|
18
40
|
action: {
|
|
19
41
|
label: string;
|
|
20
42
|
fn: () => void;
|
|
21
43
|
} | null;
|
|
22
|
-
|
|
44
|
+
key: string | null;
|
|
45
|
+
onClick: (() => void) | null;
|
|
46
|
+
lines: number | null;
|
|
47
|
+
}[], ToastItem[] | {
|
|
23
48
|
id: number;
|
|
24
49
|
message: string;
|
|
25
50
|
title: string;
|
|
26
51
|
description: string | null;
|
|
27
|
-
type:
|
|
52
|
+
type: ToastType;
|
|
28
53
|
action: {
|
|
29
54
|
label: string;
|
|
30
55
|
fn: () => void;
|
|
31
56
|
} | null;
|
|
57
|
+
key: string | null;
|
|
58
|
+
onClick: (() => void) | null;
|
|
59
|
+
lines: number | null;
|
|
32
60
|
}[]>;
|
|
33
61
|
show: (message: string | {
|
|
34
62
|
title: string;
|
|
@@ -37,7 +65,10 @@ export declare const useToastStore: import('pinia').StoreDefinition<"wpic-toast"
|
|
|
37
65
|
label: string;
|
|
38
66
|
fn: () => void;
|
|
39
67
|
} | null, description?: string | null) => void;
|
|
68
|
+
notify: (options: ToastOptions) => number;
|
|
40
69
|
remove: (id: number) => void;
|
|
70
|
+
pause: (id: number) => void;
|
|
71
|
+
resume: (id: number) => void;
|
|
41
72
|
success: (msg: string, duration?: number, action?: {
|
|
42
73
|
label: string;
|
|
43
74
|
fn: () => void;
|
|
@@ -53,31 +84,27 @@ export declare const useToastStore: import('pinia').StoreDefinition<"wpic-toast"
|
|
|
53
84
|
message: string;
|
|
54
85
|
title: string;
|
|
55
86
|
description: string | null;
|
|
56
|
-
type:
|
|
57
|
-
action: {
|
|
58
|
-
label: string;
|
|
59
|
-
fn: () => void;
|
|
60
|
-
} | null;
|
|
61
|
-
}[], {
|
|
62
|
-
id: number;
|
|
63
|
-
message: string;
|
|
64
|
-
title: string;
|
|
65
|
-
description: string | null;
|
|
66
|
-
type: "success" | "error" | "info";
|
|
87
|
+
type: ToastType;
|
|
67
88
|
action: {
|
|
68
89
|
label: string;
|
|
69
90
|
fn: () => void;
|
|
70
91
|
} | null;
|
|
71
|
-
|
|
92
|
+
key: string | null;
|
|
93
|
+
onClick: (() => void) | null;
|
|
94
|
+
lines: number | null;
|
|
95
|
+
}[], ToastItem[] | {
|
|
72
96
|
id: number;
|
|
73
97
|
message: string;
|
|
74
98
|
title: string;
|
|
75
99
|
description: string | null;
|
|
76
|
-
type:
|
|
100
|
+
type: ToastType;
|
|
77
101
|
action: {
|
|
78
102
|
label: string;
|
|
79
103
|
fn: () => void;
|
|
80
104
|
} | null;
|
|
105
|
+
key: string | null;
|
|
106
|
+
onClick: (() => void) | null;
|
|
107
|
+
lines: number | null;
|
|
81
108
|
}[]>;
|
|
82
109
|
show: (message: string | {
|
|
83
110
|
title: string;
|
|
@@ -86,7 +113,10 @@ export declare const useToastStore: import('pinia').StoreDefinition<"wpic-toast"
|
|
|
86
113
|
label: string;
|
|
87
114
|
fn: () => void;
|
|
88
115
|
} | null, description?: string | null) => void;
|
|
116
|
+
notify: (options: ToastOptions) => number;
|
|
89
117
|
remove: (id: number) => void;
|
|
118
|
+
pause: (id: number) => void;
|
|
119
|
+
resume: (id: number) => void;
|
|
90
120
|
success: (msg: string, duration?: number, action?: {
|
|
91
121
|
label: string;
|
|
92
122
|
fn: () => void;
|
|
@@ -102,31 +132,27 @@ export declare const useToastStore: import('pinia').StoreDefinition<"wpic-toast"
|
|
|
102
132
|
message: string;
|
|
103
133
|
title: string;
|
|
104
134
|
description: string | null;
|
|
105
|
-
type:
|
|
106
|
-
action: {
|
|
107
|
-
label: string;
|
|
108
|
-
fn: () => void;
|
|
109
|
-
} | null;
|
|
110
|
-
}[], {
|
|
111
|
-
id: number;
|
|
112
|
-
message: string;
|
|
113
|
-
title: string;
|
|
114
|
-
description: string | null;
|
|
115
|
-
type: "success" | "error" | "info";
|
|
135
|
+
type: ToastType;
|
|
116
136
|
action: {
|
|
117
137
|
label: string;
|
|
118
138
|
fn: () => void;
|
|
119
139
|
} | null;
|
|
120
|
-
|
|
140
|
+
key: string | null;
|
|
141
|
+
onClick: (() => void) | null;
|
|
142
|
+
lines: number | null;
|
|
143
|
+
}[], ToastItem[] | {
|
|
121
144
|
id: number;
|
|
122
145
|
message: string;
|
|
123
146
|
title: string;
|
|
124
147
|
description: string | null;
|
|
125
|
-
type:
|
|
148
|
+
type: ToastType;
|
|
126
149
|
action: {
|
|
127
150
|
label: string;
|
|
128
151
|
fn: () => void;
|
|
129
152
|
} | null;
|
|
153
|
+
key: string | null;
|
|
154
|
+
onClick: (() => void) | null;
|
|
155
|
+
lines: number | null;
|
|
130
156
|
}[]>;
|
|
131
157
|
show: (message: string | {
|
|
132
158
|
title: string;
|
|
@@ -135,7 +161,10 @@ export declare const useToastStore: import('pinia').StoreDefinition<"wpic-toast"
|
|
|
135
161
|
label: string;
|
|
136
162
|
fn: () => void;
|
|
137
163
|
} | null, description?: string | null) => void;
|
|
164
|
+
notify: (options: ToastOptions) => number;
|
|
138
165
|
remove: (id: number) => void;
|
|
166
|
+
pause: (id: number) => void;
|
|
167
|
+
resume: (id: number) => void;
|
|
139
168
|
success: (msg: string, duration?: number, action?: {
|
|
140
169
|
label: string;
|
|
141
170
|
fn: () => void;
|
|
@@ -145,4 +174,4 @@ export declare const useToastStore: import('pinia').StoreDefinition<"wpic-toast"
|
|
|
145
174
|
label: string;
|
|
146
175
|
fn: () => void;
|
|
147
176
|
} | null) => void;
|
|
148
|
-
}, "
|
|
177
|
+
}, "error" | "pause" | "success" | "show" | "info" | "remove" | "notify" | "resume">>;
|