vueless 1.3.0 → 1.3.1-beta.1
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/icons/internal/info.svg +1 -0
- package/index.d.ts +1 -0
- package/index.ts +1 -0
- package/locales/en.json +1 -1
- package/package.json +1 -1
- package/ui.container-drawer/UDrawer.vue +3 -3
- package/ui.container-modal/UModal.vue +4 -4
- package/ui.form-input/UInput.vue +3 -1
- package/ui.form-input/storybook/stories.ts +3 -3
- package/ui.text-notify/UNotify.vue +14 -0
- package/ui.text-notify/config.ts +6 -0
- package/ui.text-notify/constants.ts +1 -0
- package/ui.text-notify/storybook/docs.mdx +3 -1
- package/ui.text-notify/storybook/stories.ts +12 -2
- package/ui.text-notify/tests/UNotify.test.ts +20 -0
- package/ui.text-notify/utilNotify.ts +17 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M450.37-277.37h65.26V-520h-65.26v242.63ZM480-590.41q15.55 0 26.07-10.23 10.52-10.24 10.52-25.36 0-16.24-10.52-26.92-10.51-10.67-26.05-10.67-15.81 0-26.21 10.67-10.4 10.68-10.4 26.8 0 15.27 10.52 25.49 10.52 10.22 26.07 10.22Zm.3 516.39q-84.2 0-158.04-31.88-73.84-31.88-129.16-87.2-55.32-55.32-87.2-129.2-31.88-73.88-31.88-158.17 0-84.28 31.88-158.2 31.88-73.91 87.16-128.74 55.28-54.84 129.18-86.82 73.9-31.99 158.21-31.99 84.3 0 158.25 31.97 73.94 31.97 128.75 86.77 54.82 54.8 86.79 128.88 31.98 74.08 31.98 158.33 0 84.24-31.99 158.07-31.98 73.84-86.82 128.95-54.83 55.1-128.87 87.17Q564.5-74.02 480.3-74.02Zm.2-68.13q140.54 0 238.95-98.75 98.4-98.76 98.4-239.6 0-140.54-98.22-238.95-98.21-98.4-239.75-98.4-140.16 0-238.95 98.22-98.78 98.21-98.78 239.75 0 140.16 98.75 238.95 98.76 98.78 239.6 98.78ZM480-480Z"/></svg>
|
package/index.d.ts
CHANGED
package/index.ts
CHANGED
package/locales/en.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"USelect":{"listIsEmpty":"List is empty.","noDataToShow":"No data to show.","clear":"clear","addMore":"Add more..."},"USwitch":{"switch":"Switch","inactive":"Off","active":"On"},"UInputFile":{"sizeError":"File size is too big.","formatError":"Format is not supported.","noFile":"No file selected","uploadFile":"Choose file"},"UListbox":{"noDataToShow":"No data to show.","add":"Add","search":"Search..."},"UModalConfirm":{"confirm":"Confirm","cancel":"Cancel"},"UTable":{"noData":"There is no data in the table.","checkbox":"Checkbox"},"UCalendar":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok","previousYear":"Previous Year","nextYear":"Next Year","previousMonth":"Previous Month","nextMonth":"Next Month"},"UDatePicker":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok","previousYear":"Previous Year","nextYear":"Next Year","previousMonth":"Previous Month","nextMonth":"Next Month"},"UDatePickerRange":{"ownRange":"Own range","week":"Week","month":"Month","quarter":"Quarter","year":"Year","dateFormatWithDot":"The date should be in format 'dd.mm.yyyy'.","notCorrectMonthNumber":"Wrong month number.","notCorrectDayNumber":"Wrong day in month.","fromDateGraterThanSecond":"The 'from' date should be less than the 'to' date.","toDateSmallerThanFirst":"The 'to' date should be greater than the 'from' date.","today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}}},"UDataList":{"emptyTitle":"","emptyDescription":"There is no data in the list."},"UNotify":{"success":{"default":"Operation successful."},"warning":{"default":"Operation warning."},"error":{"default":"Operation error."}}}
|
|
1
|
+
{"USelect":{"listIsEmpty":"List is empty.","noDataToShow":"No data to show.","clear":"clear","addMore":"Add more..."},"USwitch":{"switch":"Switch","inactive":"Off","active":"On"},"UInputFile":{"sizeError":"File size is too big.","formatError":"Format is not supported.","noFile":"No file selected","uploadFile":"Choose file"},"UListbox":{"noDataToShow":"No data to show.","add":"Add","search":"Search..."},"UModalConfirm":{"confirm":"Confirm","cancel":"Cancel"},"UTable":{"noData":"There is no data in the table.","checkbox":"Checkbox"},"UCalendar":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok","previousYear":"Previous Year","nextYear":"Next Year","previousMonth":"Previous Month","nextMonth":"Next Month"},"UDatePicker":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok","previousYear":"Previous Year","nextYear":"Next Year","previousMonth":"Previous Month","nextMonth":"Next Month"},"UDatePickerRange":{"ownRange":"Own range","week":"Week","month":"Month","quarter":"Quarter","year":"Year","dateFormatWithDot":"The date should be in format 'dd.mm.yyyy'.","notCorrectMonthNumber":"Wrong month number.","notCorrectDayNumber":"Wrong day in month.","fromDateGraterThanSecond":"The 'from' date should be less than the 'to' date.","toDateSmallerThanFirst":"The 'to' date should be greater than the 'from' date.","today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}}},"UDataList":{"emptyTitle":"","emptyDescription":"There is no data in the list."},"UNotify":{"success":{"default":"Operation successful."},"warning":{"default":"Operation warning."},"error":{"default":"Operation error."},"info":{"default":"Information."}}}
|
package/package.json
CHANGED
|
@@ -314,9 +314,9 @@ const {
|
|
|
314
314
|
<!-- @slot Use it to add something before the header title. -->
|
|
315
315
|
<slot name="before-title" />
|
|
316
316
|
<!--
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
@slot Use it to add something to the left side of the header.
|
|
318
|
+
@binding {string} title
|
|
319
|
+
-->
|
|
320
320
|
<slot name="title" :title="title">
|
|
321
321
|
<div v-bind="titleFallbackAttrs">
|
|
322
322
|
<UHeader :label="title" size="sm" v-bind="titleAttrs" />
|
|
@@ -268,10 +268,10 @@ const {
|
|
|
268
268
|
</div>
|
|
269
269
|
|
|
270
270
|
<!--
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
@slot Use it to add something instead of the close button.
|
|
272
|
+
@binding {string} icon-name
|
|
273
|
+
@binding {function} close
|
|
274
|
+
-->
|
|
275
275
|
<slot name="actions" :icon-name="config.defaults.closeIcon" :close="closeModal">
|
|
276
276
|
<UButton
|
|
277
277
|
v-if="closeOnCross"
|
package/ui.form-input/UInput.vue
CHANGED
|
@@ -176,7 +176,9 @@ function onKeydown(event: KeyboardEvent) {
|
|
|
176
176
|
emit("keydown", event);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
function onSlotClick() {
|
|
179
|
+
function onSlotClick(event: MouseEvent) {
|
|
180
|
+
if (event.target !== event.currentTarget) return;
|
|
181
|
+
|
|
180
182
|
inputRef.value?.focus();
|
|
181
183
|
}
|
|
182
184
|
|
|
@@ -193,9 +193,9 @@ export const Slots: StoryFn<UInputArgs> = (args) => ({
|
|
|
193
193
|
components: { UInput, URow, UDropdownButton, UText, UChip },
|
|
194
194
|
setup() {
|
|
195
195
|
const countryCodes = [
|
|
196
|
-
{ label: "+33",
|
|
197
|
-
{ label: "+44",
|
|
198
|
-
{ label: "+49",
|
|
196
|
+
{ label: "+33", value: "+33" },
|
|
197
|
+
{ label: "+44", value: "+44" },
|
|
198
|
+
{ label: "+49", value: "+49" },
|
|
199
199
|
];
|
|
200
200
|
|
|
201
201
|
const countryCode = ref("+33");
|
|
@@ -132,6 +132,10 @@ function getBodyAttrs(type: Notification["type"]) {
|
|
|
132
132
|
if (type === NotificationType.Error) {
|
|
133
133
|
return bodyErrorAttrs.value;
|
|
134
134
|
}
|
|
135
|
+
|
|
136
|
+
if (type === NotificationType.Info) {
|
|
137
|
+
return bodyInfoAttrs.value;
|
|
138
|
+
}
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
defineExpose({
|
|
@@ -153,12 +157,14 @@ const {
|
|
|
153
157
|
bodySuccessAttrs,
|
|
154
158
|
bodyWarningAttrs,
|
|
155
159
|
bodyErrorAttrs,
|
|
160
|
+
bodyInfoAttrs,
|
|
156
161
|
contentAttrs,
|
|
157
162
|
labelAttrs,
|
|
158
163
|
descriptionAttrs,
|
|
159
164
|
successIconAttrs,
|
|
160
165
|
warningIconAttrs,
|
|
161
166
|
errorIconAttrs,
|
|
167
|
+
infoIconAttrs,
|
|
162
168
|
closeIconAttrs,
|
|
163
169
|
} = useUI<Config>(defaultConfig);
|
|
164
170
|
</script>
|
|
@@ -201,6 +207,14 @@ const {
|
|
|
201
207
|
v-bind="errorIconAttrs"
|
|
202
208
|
/>
|
|
203
209
|
|
|
210
|
+
<UIcon
|
|
211
|
+
v-else-if="notification.type === NotificationType.Info"
|
|
212
|
+
:data-test="getDataTest('type-info')"
|
|
213
|
+
size="md"
|
|
214
|
+
:name="config.defaults.infoIcon"
|
|
215
|
+
v-bind="infoIconAttrs"
|
|
216
|
+
/>
|
|
217
|
+
|
|
204
218
|
<div v-bind="contentAttrs">
|
|
205
219
|
<span v-bind="labelAttrs" v-text="notification.label" />
|
|
206
220
|
<span
|
package/ui.text-notify/config.ts
CHANGED
|
@@ -14,6 +14,7 @@ export default /*tw*/ {
|
|
|
14
14
|
bodySuccess: "{>body} bg-radial-[circle_at_0%_50%] from-success/25 from-2.17% to-transparent",
|
|
15
15
|
bodyWarning: "{>body} bg-radial-[circle_at_0%_50%] from-warning/25 from-2.17% to-transparent",
|
|
16
16
|
bodyError: "{>body} bg-radial-[circle_at_0%_50%] from-error/25 from-2.17% to-transparent",
|
|
17
|
+
bodyInfo: "{>body} bg-radial-[circle_at_0%_50%] from-info/25 from-2.17% to-transparent",
|
|
17
18
|
content: "w-full flex flex-col max-w-full text-medium text-inverted",
|
|
18
19
|
label: "mb-0.5 font-medium",
|
|
19
20
|
description: "break-words font-normal",
|
|
@@ -21,6 +22,7 @@ export default /*tw*/ {
|
|
|
21
22
|
successIcon: "{UIcon} {>statusIcon} text-success",
|
|
22
23
|
warningIcon: "{UIcon} {>statusIcon} text-warning",
|
|
23
24
|
errorIcon: "{UIcon} {>statusIcon} text-error",
|
|
25
|
+
infoIcon: "{UIcon} {>statusIcon} text-info",
|
|
24
26
|
closeIcon: "{UIcon} !text-inverted opacity-75",
|
|
25
27
|
positionClasses: {
|
|
26
28
|
page: "UNotifyPage",
|
|
@@ -36,6 +38,9 @@ export default /*tw*/ {
|
|
|
36
38
|
error: {
|
|
37
39
|
default: "Operation error.",
|
|
38
40
|
},
|
|
41
|
+
info: {
|
|
42
|
+
default: "Information.",
|
|
43
|
+
},
|
|
39
44
|
},
|
|
40
45
|
defaults: {
|
|
41
46
|
xPosition: "center",
|
|
@@ -44,6 +49,7 @@ export default /*tw*/ {
|
|
|
44
49
|
successIcon: "check_circle",
|
|
45
50
|
warningIcon: "warning",
|
|
46
51
|
errorIcon: "error",
|
|
52
|
+
infoIcon: "info",
|
|
47
53
|
closeIcon: "close",
|
|
48
54
|
},
|
|
49
55
|
};
|
|
@@ -17,13 +17,14 @@ import defaultConfig from "../config?raw"
|
|
|
17
17
|
|
|
18
18
|
## Triggering notification
|
|
19
19
|
You can trigger notification using `notify` method.
|
|
20
|
-
Use `notifySuccess`, `notifyWarning`, `notifyError` shortcut methods to trigger notification of a specific type.
|
|
20
|
+
Use `notifySuccess`, `notifyWarning`, `notifyInfo`, `notifyError` shortcut methods to trigger notification of a specific type.
|
|
21
21
|
|
|
22
22
|
<Source code={`
|
|
23
23
|
import {
|
|
24
24
|
notify,
|
|
25
25
|
notifySuccess,
|
|
26
26
|
notifyWarning,
|
|
27
|
+
notifyInfo,
|
|
27
28
|
notifyError,
|
|
28
29
|
} from "vueless";
|
|
29
30
|
|
|
@@ -37,6 +38,7 @@ notify({
|
|
|
37
38
|
|
|
38
39
|
notifySuccess({ description: "The file successfully downloaded." });
|
|
39
40
|
notifyWarning({ description: "The file has been downloaded, but some data is missing." });
|
|
41
|
+
notifyInfo({ description: "Starting download..." });
|
|
40
42
|
notifyError({ description: "The file can't be downloaded, please check the fields and try again." });
|
|
41
43
|
`} language="jsx" dark />
|
|
42
44
|
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
notifySuccess,
|
|
11
11
|
notifyWarning,
|
|
12
12
|
notifyError,
|
|
13
|
+
notifyInfo,
|
|
13
14
|
clearNotifications,
|
|
14
15
|
setDelayedNotify,
|
|
15
16
|
getDelayedNotify,
|
|
@@ -64,7 +65,7 @@ const DefaultTemplate: StoryFn<UNotifyArgs> = (args: UNotifyArgs) => ({
|
|
|
64
65
|
|
|
65
66
|
const TypesTemplate: StoryFn<UNotifyArgs> = (args: UNotifyArgs) => ({
|
|
66
67
|
components: { UNotify, UButton, UCol },
|
|
67
|
-
setup: () => ({ args, notify, notifyWarning, notifyError }),
|
|
68
|
+
setup: () => ({ args, notify, notifyWarning, notifyError, notifyInfo }),
|
|
68
69
|
template: `
|
|
69
70
|
<UNotify class="m-4" notify-id="type" />
|
|
70
71
|
|
|
@@ -96,6 +97,15 @@ const TypesTemplate: StoryFn<UNotifyArgs> = (args: UNotifyArgs) => ({
|
|
|
96
97
|
notifyId: 'type'
|
|
97
98
|
})"
|
|
98
99
|
/>
|
|
100
|
+
<UButton
|
|
101
|
+
label="Info"
|
|
102
|
+
color="info"
|
|
103
|
+
@click="notifyInfo({
|
|
104
|
+
label: 'Information',
|
|
105
|
+
description: 'Downloading file...',
|
|
106
|
+
notifyId: 'type'
|
|
107
|
+
})"
|
|
108
|
+
/>
|
|
99
109
|
</UCol>
|
|
100
110
|
`,
|
|
101
111
|
});
|
|
@@ -175,7 +185,7 @@ Types.parameters = {
|
|
|
175
185
|
description: {
|
|
176
186
|
story: `
|
|
177
187
|
Control the predefined notification type using the \`type\` parameter in the \`notify\` function
|
|
178
|
-
<b>OR</b> using \`notifySuccess\`, \`notifyWarning\`, \`notifyError\` shortcut methods
|
|
188
|
+
<b>OR</b> using \`notifySuccess\`, \`notifyWarning\`, \`notifyError\`, \`notifyInfo\` shortcut methods
|
|
179
189
|
to trigger notification of a specific type.
|
|
180
190
|
`,
|
|
181
191
|
},
|
|
@@ -262,6 +262,26 @@ describe("UNotify.vue", () => {
|
|
|
262
262
|
|
|
263
263
|
expect(errorIcon).toBeDefined();
|
|
264
264
|
});
|
|
265
|
+
|
|
266
|
+
// Info notification
|
|
267
|
+
it("renders info notification with correct icon", async () => {
|
|
268
|
+
const component = mountWithLocale();
|
|
269
|
+
|
|
270
|
+
dispatchNotifyEvent("notifyStart", {
|
|
271
|
+
...mockNotification,
|
|
272
|
+
type: NotificationType.Info,
|
|
273
|
+
});
|
|
274
|
+
await component.vm.$nextTick();
|
|
275
|
+
|
|
276
|
+
const icons = component.findAllComponents(UIcon);
|
|
277
|
+
|
|
278
|
+
expect(icons.length).toBeGreaterThan(0);
|
|
279
|
+
|
|
280
|
+
// Find the info icon by its name prop
|
|
281
|
+
const infoIcon = icons.find((icon) => icon.props("name") === "info");
|
|
282
|
+
|
|
283
|
+
expect(infoIcon).toBeDefined();
|
|
284
|
+
});
|
|
265
285
|
});
|
|
266
286
|
|
|
267
287
|
// Exposed refs tests
|
|
@@ -133,6 +133,23 @@ export function notifyError({
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
export function notifyInfo({
|
|
137
|
+
label,
|
|
138
|
+
description,
|
|
139
|
+
duration,
|
|
140
|
+
ignoreDuplicates,
|
|
141
|
+
notifyId,
|
|
142
|
+
}: Omit<NotifyConfig, "type"> = {}): void {
|
|
143
|
+
notify({
|
|
144
|
+
label,
|
|
145
|
+
description,
|
|
146
|
+
ignoreDuplicates,
|
|
147
|
+
type: NotificationType.Info,
|
|
148
|
+
duration: duration || globalNotifyDuration?.medium || NotificationDuration.Medium,
|
|
149
|
+
notifyId,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
136
153
|
export function clearNotifications(notifyId?: string): void {
|
|
137
154
|
window.dispatchEvent(new CustomEvent("notifyClearAll", { detail: { notifyId } }));
|
|
138
155
|
}
|