vueless 1.2.15-beta.9 → 1.3.1-beta.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/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.dropdown-badge/storybook/stories.ts +15 -15
- package/ui.dropdown-button/storybook/stories.ts +20 -20
- package/ui.dropdown-link/storybook/stories.ts +12 -12
- package/ui.form-checkbox-group/storybook/stories.ts +4 -4
- package/ui.form-radio-group/storybook/stories.ts +4 -4
- package/ui.form-select/storybook/stories.ts +56 -56
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1-beta.0",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -283,9 +283,9 @@ DefaultSlot.args = {
|
|
|
283
283
|
round: true,
|
|
284
284
|
toggleIcon: false,
|
|
285
285
|
options: [
|
|
286
|
-
{ label: "Change avatar",
|
|
287
|
-
{ label: "Profile settings",
|
|
288
|
-
{ label: "Delete profile",
|
|
286
|
+
{ label: "Change avatar", value: "avatar" },
|
|
287
|
+
{ label: "Profile settings", value: "settings" },
|
|
288
|
+
{ label: "Delete profile", value: "delete" },
|
|
289
289
|
],
|
|
290
290
|
slotTemplate: `
|
|
291
291
|
<template #default>
|
|
@@ -345,7 +345,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
345
345
|
:options="[
|
|
346
346
|
{
|
|
347
347
|
label: 'John Doe',
|
|
348
|
-
|
|
348
|
+
value: '1',
|
|
349
349
|
role: 'Developer',
|
|
350
350
|
avatar: johnDoe,
|
|
351
351
|
status: 'online',
|
|
@@ -353,7 +353,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
353
353
|
},
|
|
354
354
|
{
|
|
355
355
|
label: 'Jane Smith',
|
|
356
|
-
|
|
356
|
+
value: '2',
|
|
357
357
|
role: 'Designer',
|
|
358
358
|
avatar: emilyDavis,
|
|
359
359
|
status: 'away',
|
|
@@ -361,7 +361,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
363
|
label: 'Mike Johnson',
|
|
364
|
-
|
|
364
|
+
value: '3',
|
|
365
365
|
role: 'Product Manager',
|
|
366
366
|
avatar: alexJohnson,
|
|
367
367
|
status: 'offline',
|
|
@@ -369,7 +369,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
371
|
label: 'Sarah Wilson',
|
|
372
|
-
|
|
372
|
+
value: '4',
|
|
373
373
|
role: 'QA Engineer',
|
|
374
374
|
avatar: patMorgan,
|
|
375
375
|
status: 'online',
|
|
@@ -388,7 +388,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
388
388
|
:options="[
|
|
389
389
|
{
|
|
390
390
|
label: 'John Doe',
|
|
391
|
-
|
|
391
|
+
value: '1',
|
|
392
392
|
role: 'Developer',
|
|
393
393
|
avatar: johnDoe,
|
|
394
394
|
status: 'online',
|
|
@@ -396,7 +396,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
396
396
|
},
|
|
397
397
|
{
|
|
398
398
|
label: 'Jane Smith',
|
|
399
|
-
|
|
399
|
+
value: '2',
|
|
400
400
|
role: 'Designer',
|
|
401
401
|
avatar: emilyDavis,
|
|
402
402
|
status: 'away',
|
|
@@ -404,7 +404,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
404
404
|
},
|
|
405
405
|
{
|
|
406
406
|
label: 'Mike Johnson',
|
|
407
|
-
|
|
407
|
+
value: '3',
|
|
408
408
|
role: 'Product Manager',
|
|
409
409
|
avatar: alexJohnson,
|
|
410
410
|
status: 'offline',
|
|
@@ -412,7 +412,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
412
412
|
},
|
|
413
413
|
{
|
|
414
414
|
label: 'Sarah Wilson',
|
|
415
|
-
|
|
415
|
+
value: '4',
|
|
416
416
|
role: 'QA Engineer',
|
|
417
417
|
avatar: patMorgan,
|
|
418
418
|
status: 'online',
|
|
@@ -442,7 +442,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
442
442
|
:options="[
|
|
443
443
|
{
|
|
444
444
|
label: 'John Doe',
|
|
445
|
-
|
|
445
|
+
value: '1',
|
|
446
446
|
role: 'Developer',
|
|
447
447
|
avatar: johnDoe,
|
|
448
448
|
status: 'online',
|
|
@@ -450,7 +450,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
450
450
|
},
|
|
451
451
|
{
|
|
452
452
|
label: 'Jane Smith',
|
|
453
|
-
|
|
453
|
+
value: '2',
|
|
454
454
|
role: 'Designer',
|
|
455
455
|
avatar: emilyDavis,
|
|
456
456
|
status: 'away',
|
|
@@ -458,7 +458,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
458
458
|
},
|
|
459
459
|
{
|
|
460
460
|
label: 'Mike Johnson',
|
|
461
|
-
|
|
461
|
+
value: '3',
|
|
462
462
|
role: 'Product Manager',
|
|
463
463
|
avatar: alexJohnson,
|
|
464
464
|
status: 'offline',
|
|
@@ -466,7 +466,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownBadgeArgs> = (args) => ({
|
|
|
466
466
|
},
|
|
467
467
|
{
|
|
468
468
|
label: 'Sarah Wilson',
|
|
469
|
-
|
|
469
|
+
value: '4',
|
|
470
470
|
role: 'QA Engineer',
|
|
471
471
|
avatar: patMorgan,
|
|
472
472
|
status: 'online',
|
|
@@ -185,9 +185,9 @@ export const NoCloseOnSelect = SelectableTemplate.bind({});
|
|
|
185
185
|
NoCloseOnSelect.args = {
|
|
186
186
|
modelValue: "pending",
|
|
187
187
|
options: [
|
|
188
|
-
{ label: "Active",
|
|
189
|
-
{ label: "Pending",
|
|
190
|
-
{ label: "Archived",
|
|
188
|
+
{ label: "Active", value: "active" },
|
|
189
|
+
{ label: "Pending", value: "pending" },
|
|
190
|
+
{ label: "Archived", value: "archived" },
|
|
191
191
|
],
|
|
192
192
|
closeOnSelect: false,
|
|
193
193
|
};
|
|
@@ -197,9 +197,9 @@ OptionSelection.args = {
|
|
|
197
197
|
label: "Select status",
|
|
198
198
|
modelValue: "active",
|
|
199
199
|
options: [
|
|
200
|
-
{ label: "Active",
|
|
201
|
-
{ label: "Pending",
|
|
202
|
-
{ label: "Archived",
|
|
200
|
+
{ label: "Active", value: "active" },
|
|
201
|
+
{ label: "Pending", value: "pending" },
|
|
202
|
+
{ label: "Archived", value: "archived" },
|
|
203
203
|
],
|
|
204
204
|
};
|
|
205
205
|
|
|
@@ -209,9 +209,9 @@ MultipleOptionSelection.args = {
|
|
|
209
209
|
modelValue: ["active", "pending", "archived"],
|
|
210
210
|
multiple: true,
|
|
211
211
|
options: [
|
|
212
|
-
{ label: "Active",
|
|
213
|
-
{ label: "Pending",
|
|
214
|
-
{ label: "Archived",
|
|
212
|
+
{ label: "Active", value: "active" },
|
|
213
|
+
{ label: "Pending", value: "pending" },
|
|
214
|
+
{ label: "Archived", value: "archived" },
|
|
215
215
|
],
|
|
216
216
|
};
|
|
217
217
|
|
|
@@ -303,9 +303,9 @@ DefaultSlot.args = {
|
|
|
303
303
|
toggleIcon: false,
|
|
304
304
|
square: true,
|
|
305
305
|
options: [
|
|
306
|
-
{ label: "Change avatar",
|
|
307
|
-
{ label: "Profile settings",
|
|
308
|
-
{ label: "Delete profile",
|
|
306
|
+
{ label: "Change avatar", value: "avatar" },
|
|
307
|
+
{ label: "Profile settings", value: "settings" },
|
|
308
|
+
{ label: "Delete profile", value: "delete" },
|
|
309
309
|
],
|
|
310
310
|
slotTemplate: `
|
|
311
311
|
<template #default>
|
|
@@ -408,7 +408,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
408
408
|
:options="[
|
|
409
409
|
{
|
|
410
410
|
label: 'John Doe',
|
|
411
|
-
|
|
411
|
+
value: '1',
|
|
412
412
|
role: 'Developer',
|
|
413
413
|
avatar: johnDoe,
|
|
414
414
|
status: 'online',
|
|
@@ -416,7 +416,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
label: 'Jane Smith',
|
|
419
|
-
|
|
419
|
+
value: '2',
|
|
420
420
|
role: 'Designer',
|
|
421
421
|
avatar: emilyDavis,
|
|
422
422
|
status: 'away',
|
|
@@ -424,7 +424,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
424
424
|
},
|
|
425
425
|
{
|
|
426
426
|
label: 'Mike Johnson',
|
|
427
|
-
|
|
427
|
+
value: '3',
|
|
428
428
|
role: 'Product Manager',
|
|
429
429
|
avatar: alexJohnson,
|
|
430
430
|
status: 'offline',
|
|
@@ -432,7 +432,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
432
432
|
},
|
|
433
433
|
{
|
|
434
434
|
label: 'Sarah Wilson',
|
|
435
|
-
|
|
435
|
+
value: '4',
|
|
436
436
|
role: 'QA Engineer',
|
|
437
437
|
avatar: patMorgan,
|
|
438
438
|
status: 'online',
|
|
@@ -462,7 +462,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
462
462
|
:options="[
|
|
463
463
|
{
|
|
464
464
|
label: 'John Doe',
|
|
465
|
-
|
|
465
|
+
value: '1',
|
|
466
466
|
role: 'Developer',
|
|
467
467
|
avatar: johnDoe,
|
|
468
468
|
status: 'online',
|
|
@@ -470,7 +470,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
470
470
|
},
|
|
471
471
|
{
|
|
472
472
|
label: 'Jane Smith',
|
|
473
|
-
|
|
473
|
+
value: '2',
|
|
474
474
|
role: 'Designer',
|
|
475
475
|
avatar: emilyDavis,
|
|
476
476
|
status: 'away',
|
|
@@ -478,7 +478,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
478
478
|
},
|
|
479
479
|
{
|
|
480
480
|
label: 'Mike Johnson',
|
|
481
|
-
|
|
481
|
+
value: '3',
|
|
482
482
|
role: 'Product Manager',
|
|
483
483
|
avatar: alexJohnson,
|
|
484
484
|
status: 'offline',
|
|
@@ -486,7 +486,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownButtonArgs> = (args) => ({
|
|
|
486
486
|
},
|
|
487
487
|
{
|
|
488
488
|
label: 'Sarah Wilson',
|
|
489
|
-
|
|
489
|
+
value: '4',
|
|
490
490
|
role: 'QA Engineer',
|
|
491
491
|
avatar: patMorgan,
|
|
492
492
|
status: 'online',
|
|
@@ -331,7 +331,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
331
331
|
:options="[
|
|
332
332
|
{
|
|
333
333
|
label: 'John Doe',
|
|
334
|
-
|
|
334
|
+
value: '1',
|
|
335
335
|
role: 'Developer',
|
|
336
336
|
avatar: johnDoe,
|
|
337
337
|
status: 'online',
|
|
@@ -339,7 +339,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
label: 'Jane Smith',
|
|
342
|
-
|
|
342
|
+
value: '2',
|
|
343
343
|
role: 'Designer',
|
|
344
344
|
avatar: emilyDavis,
|
|
345
345
|
status: 'away',
|
|
@@ -347,7 +347,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
349
|
label: 'Mike Johnson',
|
|
350
|
-
|
|
350
|
+
value: '3',
|
|
351
351
|
role: 'Product Manager',
|
|
352
352
|
avatar: alexJohnson,
|
|
353
353
|
status: 'offline',
|
|
@@ -355,7 +355,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
label: 'Sarah Wilson',
|
|
358
|
-
|
|
358
|
+
value: '4',
|
|
359
359
|
role: 'QA Engineer',
|
|
360
360
|
avatar: patMorgan,
|
|
361
361
|
status: 'online',
|
|
@@ -374,7 +374,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
374
374
|
:options="[
|
|
375
375
|
{
|
|
376
376
|
label: 'John Doe',
|
|
377
|
-
|
|
377
|
+
value: '1',
|
|
378
378
|
role: 'Developer',
|
|
379
379
|
avatar: johnDoe,
|
|
380
380
|
status: 'online',
|
|
@@ -382,7 +382,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
382
382
|
},
|
|
383
383
|
{
|
|
384
384
|
label: 'Jane Smith',
|
|
385
|
-
|
|
385
|
+
value: '2',
|
|
386
386
|
role: 'Designer',
|
|
387
387
|
avatar: emilyDavis,
|
|
388
388
|
status: 'away',
|
|
@@ -390,7 +390,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
392
|
label: 'Mike Johnson',
|
|
393
|
-
|
|
393
|
+
value: '3',
|
|
394
394
|
role: 'Product Manager',
|
|
395
395
|
avatar: alexJohnson,
|
|
396
396
|
status: 'offline',
|
|
@@ -398,7 +398,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
398
398
|
},
|
|
399
399
|
{
|
|
400
400
|
label: 'Sarah Wilson',
|
|
401
|
-
|
|
401
|
+
value: '4',
|
|
402
402
|
role: 'QA Engineer',
|
|
403
403
|
avatar: patMorgan,
|
|
404
404
|
status: 'online',
|
|
@@ -428,7 +428,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
428
428
|
:options="[
|
|
429
429
|
{
|
|
430
430
|
label: 'John Doe',
|
|
431
|
-
|
|
431
|
+
value: '1',
|
|
432
432
|
role: 'Developer',
|
|
433
433
|
avatar: johnDoe,
|
|
434
434
|
status: 'online',
|
|
@@ -436,7 +436,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
436
436
|
},
|
|
437
437
|
{
|
|
438
438
|
label: 'Jane Smith',
|
|
439
|
-
|
|
439
|
+
value: '2',
|
|
440
440
|
role: 'Designer',
|
|
441
441
|
avatar: emilyDavis,
|
|
442
442
|
status: 'away',
|
|
@@ -444,7 +444,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
444
444
|
},
|
|
445
445
|
{
|
|
446
446
|
label: 'Mike Johnson',
|
|
447
|
-
|
|
447
|
+
value: '3',
|
|
448
448
|
role: 'Product Manager',
|
|
449
449
|
avatar: alexJohnson,
|
|
450
450
|
status: 'offline',
|
|
@@ -452,7 +452,7 @@ export const OptionSlots: StoryFn<DefaultUDropdownLinkArgs> = (args) => ({
|
|
|
452
452
|
},
|
|
453
453
|
{
|
|
454
454
|
label: 'Sarah Wilson',
|
|
455
|
-
|
|
455
|
+
value: '4',
|
|
456
456
|
role: 'QA Engineer',
|
|
457
457
|
avatar: patMorgan,
|
|
458
458
|
status: 'online',
|
|
@@ -33,9 +33,9 @@ export default {
|
|
|
33
33
|
args: {
|
|
34
34
|
label: "Select your preferred communication methods:",
|
|
35
35
|
options: [
|
|
36
|
-
{ label: "Email Notifications",
|
|
37
|
-
{ label: "SMS Alerts",
|
|
38
|
-
{ label: "Push Notifications",
|
|
36
|
+
{ label: "Email Notifications", value: "email" },
|
|
37
|
+
{ label: "SMS Alerts", value: "sms" },
|
|
38
|
+
{ label: "Push Notifications", value: "push" },
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
41
|
argTypes: {
|
|
@@ -121,7 +121,7 @@ Options.args = {
|
|
|
121
121
|
{ label: "String", value: "Subscribed" },
|
|
122
122
|
{ label: "Number", value: 42 },
|
|
123
123
|
{ label: "Boolean", value: true },
|
|
124
|
-
{ label: "Object", value: {
|
|
124
|
+
{ label: "Object", value: { value: 101, status: "active" } },
|
|
125
125
|
{ label: "Array", value: ["Admin", "Editor"] },
|
|
126
126
|
],
|
|
127
127
|
};
|
|
@@ -29,9 +29,9 @@ export default {
|
|
|
29
29
|
args: {
|
|
30
30
|
label: "Select your preferred delivery option:",
|
|
31
31
|
options: [
|
|
32
|
-
{
|
|
33
|
-
{
|
|
34
|
-
{
|
|
32
|
+
{ value: "standard", label: "Standard Shipping (3-5 business days)" },
|
|
33
|
+
{ value: "express", label: "Express Shipping (1-2 business days)" },
|
|
34
|
+
{ value: "pickup", label: "In-Store Pickup (Available same day)" },
|
|
35
35
|
],
|
|
36
36
|
},
|
|
37
37
|
argTypes: {
|
|
@@ -103,7 +103,7 @@ Options.args = {
|
|
|
103
103
|
{ label: "String", value: "Subscribed" },
|
|
104
104
|
{ label: "Number", value: 42 },
|
|
105
105
|
{ label: "Boolean", value: true },
|
|
106
|
-
{ label: "Object", value: {
|
|
106
|
+
{ label: "Object", value: { value: 101, status: "active" } },
|
|
107
107
|
{ label: "Array", value: ["Admin", "Editor"] },
|
|
108
108
|
],
|
|
109
109
|
};
|
|
@@ -39,11 +39,11 @@ export default {
|
|
|
39
39
|
label: "Choose a city",
|
|
40
40
|
modelValue: null,
|
|
41
41
|
options: [
|
|
42
|
-
{ label: "New York",
|
|
43
|
-
{ label: "Los Angeles",
|
|
44
|
-
{ label: "Chicago",
|
|
45
|
-
{ label: "Houston",
|
|
46
|
-
{ label: "San Francisco",
|
|
42
|
+
{ label: "New York", value: 1 },
|
|
43
|
+
{ label: "Los Angeles", value: 2 },
|
|
44
|
+
{ label: "Chicago", value: 3 },
|
|
45
|
+
{ label: "Houston", value: 4 },
|
|
46
|
+
{ label: "San Francisco", value: 5 },
|
|
47
47
|
],
|
|
48
48
|
},
|
|
49
49
|
argTypes: {
|
|
@@ -181,7 +181,7 @@ Sizes.args = { enum: "size", multiple: true, modelValue: [], label: "{enumValue}
|
|
|
181
181
|
export const LargeItemList = DefaultTemplate.bind({});
|
|
182
182
|
LargeItemList.args = {
|
|
183
183
|
options: [...new Array(1000)].map((_, index) => {
|
|
184
|
-
return {
|
|
184
|
+
return { value: index + 1, label: `value ${index + 1}`, badge: "badge" };
|
|
185
185
|
}),
|
|
186
186
|
};
|
|
187
187
|
|
|
@@ -272,16 +272,16 @@ AddOption.parameters = {
|
|
|
272
272
|
export const OptionSettings = DefaultTemplate.bind({});
|
|
273
273
|
OptionSettings.args = {
|
|
274
274
|
options: [
|
|
275
|
-
{ label: "1. New York",
|
|
276
|
-
{ label: "2. Los Angeles",
|
|
275
|
+
{ label: "1. New York", value: "1" },
|
|
276
|
+
{ label: "2. Los Angeles", value: "2", isHvalueden: true },
|
|
277
277
|
{
|
|
278
278
|
label: "3. Chicago",
|
|
279
|
-
|
|
279
|
+
value: "3",
|
|
280
280
|
onClick: (option) =>
|
|
281
281
|
alert("onClick function for the third option: " + JSON.stringify(option)),
|
|
282
282
|
},
|
|
283
|
-
{ label: "4. Houston",
|
|
284
|
-
{ label: "5. San Francisco",
|
|
283
|
+
{ label: "4. Houston", value: "4" },
|
|
284
|
+
{ label: "5. San Francisco", value: "5" },
|
|
285
285
|
],
|
|
286
286
|
};
|
|
287
287
|
OptionSettings.parameters = {
|
|
@@ -298,17 +298,17 @@ export const IconProps: StoryFn<USelectArgs> = (args) => ({
|
|
|
298
298
|
components: { USelect, URow },
|
|
299
299
|
setup() {
|
|
300
300
|
const levelOptions = [
|
|
301
|
-
{ label: "Awesome",
|
|
302
|
-
{ label: "Good",
|
|
303
|
-
{ label: "Could be better",
|
|
304
|
-
{ label: "Terrible",
|
|
301
|
+
{ label: "Awesome", value: "1" },
|
|
302
|
+
{ label: "Good", value: "2" },
|
|
303
|
+
{ label: "Could be better", value: "3" },
|
|
304
|
+
{ label: "Terrible", value: "4" },
|
|
305
305
|
];
|
|
306
306
|
|
|
307
307
|
const roleOptions = [
|
|
308
|
-
{ label: "Admin",
|
|
309
|
-
{ label: "CEO",
|
|
310
|
-
{ label: "Manager",
|
|
311
|
-
{ label: "Guest",
|
|
308
|
+
{ label: "Admin", value: "1" },
|
|
309
|
+
{ label: "CEO", value: "2" },
|
|
310
|
+
{ label: "Manager", value: "3" },
|
|
311
|
+
{ label: "Guest", value: "4" },
|
|
312
312
|
];
|
|
313
313
|
|
|
314
314
|
return { args, levelOptions, roleOptions };
|
|
@@ -342,10 +342,10 @@ export const Slots: StoryFn<USelectArgs> = (args) => ({
|
|
|
342
342
|
v-model="leftSlotModel"
|
|
343
343
|
label="Select Payment Method"
|
|
344
344
|
:options="[
|
|
345
|
-
{ label: 'Visa',
|
|
346
|
-
{ label: 'PayPal',
|
|
347
|
-
{ label: 'Bank Transfer',
|
|
348
|
-
{ label: 'Apple Pay',
|
|
345
|
+
{ label: 'Visa', value: 'visa', icon: 'credit_card', details: '•••• 4242' },
|
|
346
|
+
{ label: 'PayPal', value: 'paypal', icon: 'payments', details: 'user@example.com' },
|
|
347
|
+
{ label: 'Bank Transfer', value: 'bank', icon: 'account_balance', details: 'Acct **** 1234' },
|
|
348
|
+
{ label: 'Apple Pay', value: 'apple', icon: 'phone_iphone', details: 'iPhone 15' },
|
|
349
349
|
]"
|
|
350
350
|
>
|
|
351
351
|
<template #left="{ options }">
|
|
@@ -362,10 +362,10 @@ export const Slots: StoryFn<USelectArgs> = (args) => ({
|
|
|
362
362
|
v-model="rightSlotModel"
|
|
363
363
|
label="Select Payment Method"
|
|
364
364
|
:options="[
|
|
365
|
-
{ label: 'Visa',
|
|
366
|
-
{ label: 'PayPal',
|
|
367
|
-
{ label: 'Bank Transfer',
|
|
368
|
-
{ label: 'Apple Pay',
|
|
365
|
+
{ label: 'Visa', value: 'visa', icon: 'credit_card', details: '•••• 4242' },
|
|
366
|
+
{ label: 'PayPal', value: 'paypal', icon: 'payments', details: 'user@example.com' },
|
|
367
|
+
{ label: 'Bank Transfer', value: 'bank', icon: 'account_balance', details: 'Acct **** 1234' },
|
|
368
|
+
{ label: 'Apple Pay', value: 'apple', icon: 'phone_iphone', details: 'iPhone 15' },
|
|
369
369
|
]"
|
|
370
370
|
>
|
|
371
371
|
<template #right="{ options }">
|
|
@@ -398,9 +398,9 @@ export const ToggleSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
398
398
|
v-model="beforeToggleModel"
|
|
399
399
|
label="Before Toggle Slot"
|
|
400
400
|
:options="[
|
|
401
|
-
{ label: 'John Doe',
|
|
402
|
-
{ label: 'Jane Smith',
|
|
403
|
-
{ label: 'Mike Johnson',
|
|
401
|
+
{ label: 'John Doe', value: '1' },
|
|
402
|
+
{ label: 'Jane Smith', value: '2' },
|
|
403
|
+
{ label: 'Mike Johnson', value: '3' },
|
|
404
404
|
]"
|
|
405
405
|
>
|
|
406
406
|
<template #before-toggle>
|
|
@@ -416,9 +416,9 @@ export const ToggleSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
416
416
|
v-model="toggleModel"
|
|
417
417
|
label="Toggle Slot"
|
|
418
418
|
:options="[
|
|
419
|
-
{ label: 'High',
|
|
420
|
-
{ label: 'Medium',
|
|
421
|
-
{ label: 'Low',
|
|
419
|
+
{ label: 'High', value: 'high' },
|
|
420
|
+
{ label: 'Medium', value: 'medium' },
|
|
421
|
+
{ label: 'Low', value: 'low' }
|
|
422
422
|
]"
|
|
423
423
|
>
|
|
424
424
|
<template #toggle="{ opened }">
|
|
@@ -435,9 +435,9 @@ export const ToggleSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
435
435
|
v-model="afterToggleModel"
|
|
436
436
|
label="After Toggle Slot"
|
|
437
437
|
:options="[
|
|
438
|
-
{ label: 'In Progress',
|
|
439
|
-
{ label: 'Done',
|
|
440
|
-
{ label: 'Blocked',
|
|
438
|
+
{ label: 'In Progress', value: 'in_progress' },
|
|
439
|
+
{ label: 'Done', value: 'done' },
|
|
440
|
+
{ label: 'Blocked', value: 'blocked' }
|
|
441
441
|
]"
|
|
442
442
|
>
|
|
443
443
|
<template #after-toggle>
|
|
@@ -470,10 +470,10 @@ export const SelectedOptionsSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
470
470
|
v-model="args.selectedOption"
|
|
471
471
|
label="Selected option slot"
|
|
472
472
|
:options="[
|
|
473
|
-
{ label: 'Paris',
|
|
474
|
-
{ label: 'Venice',
|
|
475
|
-
{ label: 'Rome',
|
|
476
|
-
{ label: 'Milan',
|
|
473
|
+
{ label: 'Paris', value: '1', icon: 'flight' },
|
|
474
|
+
{ label: 'Venice', value: '2', icon: 'sailing' },
|
|
475
|
+
{ label: 'Rome', value: '3', icon: 'directions_car' },
|
|
476
|
+
{ label: 'Milan', value: '4', icon: 'directions_bike' },
|
|
477
477
|
]"
|
|
478
478
|
>
|
|
479
479
|
<template #selected-option="{ option }">
|
|
@@ -492,10 +492,10 @@ export const SelectedOptionsSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
492
492
|
v-model="args.selectedOptions"
|
|
493
493
|
label="Selected options slot"
|
|
494
494
|
:options="[
|
|
495
|
-
{ label: 'Paris',
|
|
496
|
-
{ label: 'Venice',
|
|
497
|
-
{ label: 'Rome',
|
|
498
|
-
{ label: 'Milan',
|
|
495
|
+
{ label: 'Paris', value: '1', icon: 'flight' },
|
|
496
|
+
{ label: 'Venice', value: '2', icon: 'sailing' },
|
|
497
|
+
{ label: 'Rome', value: '3', icon: 'directions_car' },
|
|
498
|
+
{ label: 'Milan', value: '4', icon: 'directions_bike' },
|
|
499
499
|
]"
|
|
500
500
|
multiple
|
|
501
501
|
>
|
|
@@ -568,7 +568,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
568
568
|
:options="[
|
|
569
569
|
{
|
|
570
570
|
label: 'John Doe',
|
|
571
|
-
|
|
571
|
+
value: '1',
|
|
572
572
|
role: 'Developer',
|
|
573
573
|
avatar: johnDoe,
|
|
574
574
|
status: 'online',
|
|
@@ -576,7 +576,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
576
576
|
},
|
|
577
577
|
{
|
|
578
578
|
label: 'Jane Smith',
|
|
579
|
-
|
|
579
|
+
value: '2',
|
|
580
580
|
role: 'Designer',
|
|
581
581
|
avatar: emilyDavis,
|
|
582
582
|
status: 'away',
|
|
@@ -584,7 +584,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
584
584
|
},
|
|
585
585
|
{
|
|
586
586
|
label: 'Mike Johnson',
|
|
587
|
-
|
|
587
|
+
value: '3',
|
|
588
588
|
role: 'Product Manager',
|
|
589
589
|
avatar: alexJohnson,
|
|
590
590
|
status: 'offline',
|
|
@@ -592,7 +592,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
592
592
|
},
|
|
593
593
|
{
|
|
594
594
|
label: 'Sarah Wilson',
|
|
595
|
-
|
|
595
|
+
value: '4',
|
|
596
596
|
role: 'QA Engineer',
|
|
597
597
|
avatar: patMorgan,
|
|
598
598
|
status: 'online',
|
|
@@ -611,7 +611,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
611
611
|
:options="[
|
|
612
612
|
{
|
|
613
613
|
label: 'John Doe',
|
|
614
|
-
|
|
614
|
+
value: '1',
|
|
615
615
|
role: 'Developer',
|
|
616
616
|
avatar: johnDoe,
|
|
617
617
|
status: 'online',
|
|
@@ -619,7 +619,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
619
619
|
},
|
|
620
620
|
{
|
|
621
621
|
label: 'Jane Smith',
|
|
622
|
-
|
|
622
|
+
value: '2',
|
|
623
623
|
role: 'Designer',
|
|
624
624
|
avatar: emilyDavis,
|
|
625
625
|
status: 'away',
|
|
@@ -627,7 +627,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
629
|
label: 'Mike Johnson',
|
|
630
|
-
|
|
630
|
+
value: '3',
|
|
631
631
|
role: 'Product Manager',
|
|
632
632
|
avatar: alexJohnson,
|
|
633
633
|
status: 'offline',
|
|
@@ -635,7 +635,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
635
635
|
},
|
|
636
636
|
{
|
|
637
637
|
label: 'Sarah Wilson',
|
|
638
|
-
|
|
638
|
+
value: '4',
|
|
639
639
|
role: 'QA Engineer',
|
|
640
640
|
avatar: patMorgan,
|
|
641
641
|
status: 'online',
|
|
@@ -665,7 +665,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
665
665
|
:options="[
|
|
666
666
|
{
|
|
667
667
|
label: 'John Doe',
|
|
668
|
-
|
|
668
|
+
value: '1',
|
|
669
669
|
role: 'Developer',
|
|
670
670
|
avatar: johnDoe,
|
|
671
671
|
status: 'online',
|
|
@@ -673,7 +673,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
673
673
|
},
|
|
674
674
|
{
|
|
675
675
|
label: 'Jane Smith',
|
|
676
|
-
|
|
676
|
+
value: '2',
|
|
677
677
|
role: 'Designer',
|
|
678
678
|
avatar: emilyDavis,
|
|
679
679
|
status: 'away',
|
|
@@ -681,7 +681,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
681
681
|
},
|
|
682
682
|
{
|
|
683
683
|
label: 'Mike Johnson',
|
|
684
|
-
|
|
684
|
+
value: '3',
|
|
685
685
|
role: 'Product Manager',
|
|
686
686
|
avatar: alexJohnson,
|
|
687
687
|
status: 'offline',
|
|
@@ -689,7 +689,7 @@ export const OptionSlots: StoryFn<USelectArgs> = (args) => ({
|
|
|
689
689
|
},
|
|
690
690
|
{
|
|
691
691
|
label: 'Sarah Wilson',
|
|
692
|
-
|
|
692
|
+
value: '4',
|
|
693
693
|
role: 'QA Engineer',
|
|
694
694
|
avatar: patMorgan,
|
|
695
695
|
status: 'online',
|
|
@@ -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
|
}
|