vueless 0.0.207 → 0.0.209
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/composable.ui/index.js +1 -0
- package/package.json +1 -1
- package/service.storybook/index.js +9 -0
- package/ui.button/index.stories.js +6 -18
- package/ui.button/index.vue +6 -1
- package/ui.container-accordion/composables/attrs.composable.js +10 -11
- package/ui.container-accordion/index.vue +8 -2
- package/ui.container-card/composable/attrs.composable.js +36 -43
- package/ui.container-card/configs/default.config.js +2 -2
- package/ui.container-card/index.vue +1 -1
- package/ui.container-divider/composables/attrs.composable.js +22 -49
- package/ui.container-divider/index.vue +1 -1
- package/ui.container-group/composables/attrs.composable.js +23 -39
- package/ui.container-group/configs/default.config.js +3 -3
- package/ui.container-group/index.vue +4 -4
- package/ui.container-groups/composables/attrs.composable.js +20 -16
- package/ui.container-groups/index.vue +1 -1
- package/ui.container-modal/composables/attrs.composable.js +43 -66
- package/ui.container-modal/configs/default.config.js +6 -6
- package/ui.container-modal/index.vue +13 -2
- package/ui.container-modal-confirm/composable/attrs.composable.js +21 -40
- package/ui.container-modal-confirm/configs/default.config.js +3 -3
- package/ui.container-modal-confirm/index.vue +18 -2
- package/ui.container-page/composables/attrs.composable.js +48 -83
- package/ui.container-page/configs/default.config.js +3 -3
- package/ui.container-page/index.vue +1 -1
- package/ui.container-row/composables/attrs.composable.js +20 -17
- package/ui.container-row/index.vue +1 -1
- package/ui.form-date-picker-range/configs/default.config.js +2 -6
- package/ui.form-date-picker-range/index.vue +29 -12
- package/ui.form-input/index.stories.js +2 -5
- package/ui.form-radio-group/index.stories.js +19 -28
- package/ui.form-radio-group/index.vue +2 -2
- package/ui.form-select/composables/attrs.composable.js +16 -16
- package/ui.form-select/configs/default.config.js +39 -39
- package/ui.form-select/index.vue +19 -19
- package/ui.image-avatar/composables/attrs.composable.js +28 -24
- package/ui.image-avatar/configs/default.config.js +1 -1
- package/ui.image-avatar/index.vue +7 -2
- package/ui.image-icon/composables/attrs.composable.js +24 -49
- package/ui.image-icon/index.vue +17 -2
- package/ui.loader/index.stories.js +32 -2
- package/ui.navigation-progress/index.stories.js +48 -106
- package/ui.navigation-progress/index.vue +9 -1
- package/web-types.json +61 -18
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ULoader from "../ui.loader";
|
|
2
2
|
import URow from "../ui.container-row";
|
|
3
|
+
import UButton from "../ui.button";
|
|
3
4
|
|
|
4
5
|
import { getArgTypes } from "../service.storybook";
|
|
5
6
|
|
|
@@ -10,6 +11,9 @@ export default {
|
|
|
10
11
|
id: "9010",
|
|
11
12
|
title: "Loaders and Skeletons / Loader",
|
|
12
13
|
component: ULoader,
|
|
14
|
+
args: {
|
|
15
|
+
loading: true,
|
|
16
|
+
},
|
|
13
17
|
argTypes: {
|
|
14
18
|
...getArgTypes(ULoader.name),
|
|
15
19
|
},
|
|
@@ -37,9 +41,9 @@ const ColorsTemplate = (args, { argTypes } = {}) => ({
|
|
|
37
41
|
<URow class="flex-wrap">
|
|
38
42
|
<ULoader
|
|
39
43
|
v-for="(color, index) in colors"
|
|
40
|
-
:color="color"
|
|
41
|
-
v-bind="args"
|
|
42
44
|
:key="index"
|
|
45
|
+
v-bind="args"
|
|
46
|
+
:color="color"
|
|
43
47
|
/>
|
|
44
48
|
</URow>
|
|
45
49
|
`,
|
|
@@ -65,6 +69,29 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
65
69
|
`,
|
|
66
70
|
});
|
|
67
71
|
|
|
72
|
+
const LoadingTemplate = (args) => ({
|
|
73
|
+
components: { ULoader, UButton, URow },
|
|
74
|
+
setup() {
|
|
75
|
+
return { args };
|
|
76
|
+
},
|
|
77
|
+
data() {
|
|
78
|
+
return {
|
|
79
|
+
isLoading: false,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
methods: {
|
|
83
|
+
toggleLoader() {
|
|
84
|
+
this.isLoading = !this.isLoading;
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
template: `
|
|
88
|
+
<URow>
|
|
89
|
+
<ULoader v-bind="args" :loading="isLoading" />
|
|
90
|
+
<UButton @click="toggleLoader" size="sm">ToggleLoader</UButton>
|
|
91
|
+
</URow>
|
|
92
|
+
`,
|
|
93
|
+
});
|
|
94
|
+
|
|
68
95
|
export const Default = DefaultTemplate.bind({});
|
|
69
96
|
Default.args = {};
|
|
70
97
|
|
|
@@ -73,3 +100,6 @@ sizes.args = {};
|
|
|
73
100
|
|
|
74
101
|
export const colors = ColorsTemplate.bind({});
|
|
75
102
|
colors.args = {};
|
|
103
|
+
|
|
104
|
+
export const loading = LoadingTemplate.bind({});
|
|
105
|
+
loading.args = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { getArgTypes, allSlotsFragment, getSlotNames } from "../service.storybook";
|
|
2
|
+
|
|
1
3
|
import UProgress from "./index.vue";
|
|
2
|
-
import
|
|
4
|
+
import UGroup from "../ui.container-group";
|
|
5
|
+
import UButton from "../ui.button";
|
|
3
6
|
import UIcon from "../ui.image-icon";
|
|
4
|
-
import URow from "../ui.container-row";
|
|
5
|
-
|
|
6
|
-
import { getArgTypes } from "../service.storybook";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The `UProgress` component. | [View on GitHub](https://github.com/vuelessjs/vueless/tree/main/src/ui.navigation-progress)
|
|
@@ -18,131 +18,72 @@ export default {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const DefaultTemplate = (args) => ({
|
|
21
|
-
components: { UProgress, UButton, UIcon },
|
|
21
|
+
components: { UGroup, UProgress, UButton, UIcon },
|
|
22
22
|
setup() {
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
data() {
|
|
26
|
-
return {
|
|
27
|
-
progress: 10,
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
updateProgress() {
|
|
32
|
-
this.progress += 10;
|
|
33
|
-
|
|
34
|
-
if (this.progress > 100) {
|
|
35
|
-
this.progress = 0;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
template: `
|
|
40
|
-
<UProgress v-bind="args" :value="progress">
|
|
41
|
-
${args.slotTemplate}
|
|
42
|
-
</UProgress>
|
|
23
|
+
const slots = getSlotNames(UProgress.name);
|
|
43
24
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
25
|
+
args.value = args.max ? 1 : 10;
|
|
26
|
+
args.iterator = args.max ? 1 : 10;
|
|
47
27
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return { args };
|
|
52
|
-
},
|
|
53
|
-
data() {
|
|
54
|
-
return {
|
|
55
|
-
progress: 1,
|
|
56
|
-
max: ["Step 1", "Step 2", "Step 3"],
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
methods: {
|
|
60
|
-
updateProgress() {
|
|
61
|
-
this.progress += 1;
|
|
62
|
-
|
|
63
|
-
if (this.progress > 3) {
|
|
64
|
-
this.progress = 0;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
template: `
|
|
69
|
-
<UProgress v-bind="args" :max="max" :value="progress">
|
|
70
|
-
${args.slotTemplate}
|
|
71
|
-
</UProgress>
|
|
72
|
-
|
|
73
|
-
<UButton class="mt-4" @click="updateProgress">Update Progress</UButton>
|
|
74
|
-
`,
|
|
75
|
-
});
|
|
28
|
+
function updateProgress() {
|
|
29
|
+
args.value = args.value < (args.max?.length || 100) ? args.value + args.iterator : 0;
|
|
30
|
+
}
|
|
76
31
|
|
|
77
|
-
|
|
78
|
-
components: { UProgress, URow },
|
|
79
|
-
setup() {
|
|
80
|
-
return {
|
|
81
|
-
args,
|
|
82
|
-
colors: argTypes.color.options,
|
|
83
|
-
};
|
|
84
|
-
},
|
|
85
|
-
data() {
|
|
86
|
-
return {
|
|
87
|
-
progress: 10,
|
|
88
|
-
};
|
|
32
|
+
return { slots, args, updateProgress };
|
|
89
33
|
},
|
|
90
34
|
template: `
|
|
91
|
-
<
|
|
92
|
-
<UProgress
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
:color="color"
|
|
96
|
-
v-bind="args"
|
|
97
|
-
:value="progress"
|
|
98
|
-
/>
|
|
99
|
-
</URow>
|
|
35
|
+
<UGroup align="start">
|
|
36
|
+
<UProgress v-bind="args">${args.slotTemplate || allSlotsFragment}</UProgress>
|
|
37
|
+
<UButton label="Next →" size="sm" variant="thirdary" filled @click="updateProgress" />
|
|
38
|
+
</UGroup>
|
|
100
39
|
`,
|
|
101
40
|
});
|
|
102
41
|
|
|
103
|
-
const
|
|
104
|
-
components: {
|
|
42
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
43
|
+
components: { UGroup, UButton, UProgress },
|
|
105
44
|
setup() {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return {
|
|
113
|
-
progress: 10,
|
|
114
|
-
};
|
|
45
|
+
args.progress = 10;
|
|
46
|
+
|
|
47
|
+
function updateProgress() {
|
|
48
|
+
args.progress = args.progress < 100 ? args.progress + 10 : 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return { args, updateProgress, options: argTypes[args.enum].options };
|
|
115
52
|
},
|
|
116
53
|
template: `
|
|
117
|
-
<
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
54
|
+
<UGroup align="start">
|
|
55
|
+
<UGroup>
|
|
56
|
+
<UProgress
|
|
57
|
+
v-for="(option, index) in options"
|
|
58
|
+
:key="index"
|
|
59
|
+
:[args.enum]="option"
|
|
60
|
+
v-bind="args"
|
|
61
|
+
:value="args.progress"
|
|
62
|
+
/>
|
|
63
|
+
</UGroup>
|
|
64
|
+
|
|
65
|
+
<UButton label="Next →" size="sm" variant="thirdary" filled @click="updateProgress" />
|
|
66
|
+
</UGroup>
|
|
126
67
|
`,
|
|
127
68
|
});
|
|
128
69
|
|
|
129
70
|
export const Default = DefaultTemplate.bind({});
|
|
130
71
|
Default.args = {};
|
|
131
72
|
|
|
132
|
-
export const
|
|
133
|
-
|
|
73
|
+
export const VariantStepper = DefaultTemplate.bind({});
|
|
74
|
+
VariantStepper.args = { variant: "stepper", max: ["Step 1", "Step 2", "Step 3"] };
|
|
134
75
|
|
|
135
76
|
export const Indicator = DefaultTemplate.bind({});
|
|
136
77
|
Indicator.args = { indicator: true };
|
|
137
78
|
|
|
138
|
-
export const Steps =
|
|
139
|
-
Steps.args = {};
|
|
79
|
+
export const Steps = DefaultTemplate.bind({});
|
|
80
|
+
Steps.args = { max: ["Step 1", "Step 2", "Step 3"] };
|
|
140
81
|
|
|
141
|
-
export const Colors =
|
|
142
|
-
Colors.args = {};
|
|
82
|
+
export const Colors = EnumVariantTemplate.bind({});
|
|
83
|
+
Colors.args = { enum: "color" };
|
|
143
84
|
|
|
144
|
-
export const Sizes =
|
|
145
|
-
Sizes.args = {};
|
|
85
|
+
export const Sizes = EnumVariantTemplate.bind({});
|
|
86
|
+
Sizes.args = { enum: "size" };
|
|
146
87
|
|
|
147
88
|
export const IndicatorSlot = DefaultTemplate.bind({});
|
|
148
89
|
IndicatorSlot.args = {
|
|
@@ -157,8 +98,9 @@ IndicatorSlot.args = {
|
|
|
157
98
|
`,
|
|
158
99
|
};
|
|
159
100
|
|
|
160
|
-
export const stepSlot =
|
|
101
|
+
export const stepSlot = DefaultTemplate.bind({});
|
|
161
102
|
stepSlot.args = {
|
|
103
|
+
max: ["Step 1", "Step 2", "Step 3"],
|
|
162
104
|
slotTemplate: `
|
|
163
105
|
<template #step-0>
|
|
164
106
|
💻
|
|
@@ -104,7 +104,15 @@ const props = defineProps({
|
|
|
104
104
|
},
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* Component ui config object.
|
|
108
|
+
*/
|
|
109
|
+
config: {
|
|
110
|
+
type: Object,
|
|
111
|
+
default: () => ({}),
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Data-cy attribute for automated testing.
|
|
108
116
|
*/
|
|
109
117
|
dataCy: {
|
|
110
118
|
type: String,
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.209",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -399,7 +399,16 @@
|
|
|
399
399
|
],
|
|
400
400
|
"events": [
|
|
401
401
|
{
|
|
402
|
-
"name": "click"
|
|
402
|
+
"name": "click",
|
|
403
|
+
"description": "Triggers when the accordion item is toggled.",
|
|
404
|
+
"properties": [
|
|
405
|
+
{
|
|
406
|
+
"type": [
|
|
407
|
+
"string"
|
|
408
|
+
],
|
|
409
|
+
"name": "name"
|
|
410
|
+
}
|
|
411
|
+
]
|
|
403
412
|
}
|
|
404
413
|
],
|
|
405
414
|
"source": {
|
|
@@ -653,7 +662,8 @@
|
|
|
653
662
|
],
|
|
654
663
|
"events": [
|
|
655
664
|
{
|
|
656
|
-
"name": "click"
|
|
665
|
+
"name": "click",
|
|
666
|
+
"description": "Triggers when the avatar is clicked."
|
|
657
667
|
}
|
|
658
668
|
],
|
|
659
669
|
"source": {
|
|
@@ -3428,11 +3438,11 @@
|
|
|
3428
3438
|
},
|
|
3429
3439
|
{
|
|
3430
3440
|
"name": "before-title",
|
|
3431
|
-
"description": "Use it to add something before title."
|
|
3441
|
+
"description": "Use it to add something before the title."
|
|
3432
3442
|
},
|
|
3433
3443
|
{
|
|
3434
3444
|
"name": "after-title",
|
|
3435
|
-
"description": "Use it to add something after title."
|
|
3445
|
+
"description": "Use it to add something after the title."
|
|
3436
3446
|
},
|
|
3437
3447
|
{
|
|
3438
3448
|
"name": "right",
|
|
@@ -3440,7 +3450,7 @@
|
|
|
3440
3450
|
},
|
|
3441
3451
|
{
|
|
3442
3452
|
"name": "default",
|
|
3443
|
-
"description": "Use it to add something
|
|
3453
|
+
"description": "Use it to add something inside."
|
|
3444
3454
|
}
|
|
3445
3455
|
],
|
|
3446
3456
|
"source": {
|
|
@@ -3702,13 +3712,16 @@
|
|
|
3702
3712
|
],
|
|
3703
3713
|
"events": [
|
|
3704
3714
|
{
|
|
3705
|
-
"name": "click"
|
|
3715
|
+
"name": "click",
|
|
3716
|
+
"description": "Triggers when the icon is clicked."
|
|
3706
3717
|
},
|
|
3707
3718
|
{
|
|
3708
|
-
"name": "focus"
|
|
3719
|
+
"name": "focus",
|
|
3720
|
+
"description": "Triggers when the icon is focused."
|
|
3709
3721
|
},
|
|
3710
3722
|
{
|
|
3711
|
-
"name": "blur"
|
|
3723
|
+
"name": "blur",
|
|
3724
|
+
"description": "Triggers when the icon loses focus."
|
|
3712
3725
|
}
|
|
3713
3726
|
],
|
|
3714
3727
|
"source": {
|
|
@@ -5304,10 +5317,20 @@
|
|
|
5304
5317
|
],
|
|
5305
5318
|
"events": [
|
|
5306
5319
|
{
|
|
5307
|
-
"name": "update:modelValue"
|
|
5320
|
+
"name": "update:modelValue",
|
|
5321
|
+
"description": "Triggers when the modal is toggled.",
|
|
5322
|
+
"properties": [
|
|
5323
|
+
{
|
|
5324
|
+
"type": [
|
|
5325
|
+
"Boolean"
|
|
5326
|
+
],
|
|
5327
|
+
"name": "value"
|
|
5328
|
+
}
|
|
5329
|
+
]
|
|
5308
5330
|
},
|
|
5309
5331
|
{
|
|
5310
|
-
"name": "back"
|
|
5332
|
+
"name": "back",
|
|
5333
|
+
"description": "Triggers when back link in modal is clicked."
|
|
5311
5334
|
}
|
|
5312
5335
|
],
|
|
5313
5336
|
"slots": [
|
|
@@ -5433,13 +5456,24 @@
|
|
|
5433
5456
|
],
|
|
5434
5457
|
"events": [
|
|
5435
5458
|
{
|
|
5436
|
-
"name": "update:modelValue"
|
|
5459
|
+
"name": "update:modelValue",
|
|
5460
|
+
"description": "Triggers when the modal is toggled.",
|
|
5461
|
+
"properties": [
|
|
5462
|
+
{
|
|
5463
|
+
"type": [
|
|
5464
|
+
"Boolean"
|
|
5465
|
+
],
|
|
5466
|
+
"name": "value"
|
|
5467
|
+
}
|
|
5468
|
+
]
|
|
5437
5469
|
},
|
|
5438
5470
|
{
|
|
5439
|
-
"name": "confirm"
|
|
5471
|
+
"name": "confirm",
|
|
5472
|
+
"description": "Triggers when the action is confirmed."
|
|
5440
5473
|
},
|
|
5441
5474
|
{
|
|
5442
|
-
"name": "close"
|
|
5475
|
+
"name": "close",
|
|
5476
|
+
"description": "Triggers when the action is declined or modal is closed."
|
|
5443
5477
|
}
|
|
5444
5478
|
],
|
|
5445
5479
|
"slots": [
|
|
@@ -6030,9 +6064,18 @@
|
|
|
6030
6064
|
},
|
|
6031
6065
|
"default": "false"
|
|
6032
6066
|
},
|
|
6067
|
+
{
|
|
6068
|
+
"name": "config",
|
|
6069
|
+
"description": "Component ui config object.",
|
|
6070
|
+
"value": {
|
|
6071
|
+
"kind": "expression",
|
|
6072
|
+
"type": "object"
|
|
6073
|
+
},
|
|
6074
|
+
"default": "{}"
|
|
6075
|
+
},
|
|
6033
6076
|
{
|
|
6034
6077
|
"name": "dataCy",
|
|
6035
|
-
"description": "
|
|
6078
|
+
"description": "Data-cy attribute for automated testing.",
|
|
6036
6079
|
"value": {
|
|
6037
6080
|
"kind": "expression",
|
|
6038
6081
|
"type": "string"
|
|
@@ -6289,12 +6332,12 @@
|
|
|
6289
6332
|
},
|
|
6290
6333
|
{
|
|
6291
6334
|
"name": "name",
|
|
6292
|
-
"
|
|
6335
|
+
"required": true,
|
|
6336
|
+
"description": "Unique radio group name (sets for each radio).",
|
|
6293
6337
|
"value": {
|
|
6294
6338
|
"kind": "expression",
|
|
6295
6339
|
"type": "string"
|
|
6296
|
-
}
|
|
6297
|
-
"default": "\"\""
|
|
6340
|
+
}
|
|
6298
6341
|
},
|
|
6299
6342
|
{
|
|
6300
6343
|
"name": "disabled",
|