vueless 0.0.808 → 0.0.810
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/package.json +1 -1
- package/ui.data-list/UDataList.vue +36 -100
- package/ui.data-list/config.ts +2 -10
- package/ui.data-list/storybook/docs.mdx +14 -22
- package/ui.data-list/storybook/stories.ts +123 -40
- package/ui.data-list/types.ts +3 -16
- package/ui.data-table/UTable.vue +17 -23
- package/ui.data-table/config.ts +2 -0
- package/ui.data-table/storybook/stories.ts +275 -228
- package/ui.form-input-rating/storybook/stories.ts +0 -1
- package/ui.image-avatar/storybook/stories.ts +55 -41
- package/ui.image-icon/storybook/stories.ts +19 -1
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import UAvatar from "../../ui.image-avatar/UAvatar.vue";
|
|
9
9
|
import URow from "../../ui.container-row/URow.vue";
|
|
10
|
-
import UCol from "../../ui.container-col/UCol.vue";
|
|
11
10
|
import ULoader from "../../ui.loader/ULoader.vue";
|
|
11
|
+
import tooltip from "../../directives/tooltip/vTooltip.ts";
|
|
12
12
|
|
|
13
13
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
14
14
|
import type { UAvatarProps } from "../types.ts";
|
|
@@ -47,7 +47,8 @@ const DefaultTemplate: StoryFn<UAvatarArgs> = (args: UAvatarArgs) => ({
|
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
const EnumVariantTemplate: StoryFn<UAvatarArgs> = (args: UAvatarArgs, { argTypes }) => ({
|
|
50
|
-
components: {
|
|
50
|
+
components: { URow, UAvatar },
|
|
51
|
+
directives: { tooltip },
|
|
51
52
|
setup() {
|
|
52
53
|
return {
|
|
53
54
|
args,
|
|
@@ -55,26 +56,16 @@ const EnumVariantTemplate: StoryFn<UAvatarArgs> = (args: UAvatarArgs, { argTypes
|
|
|
55
56
|
};
|
|
56
57
|
},
|
|
57
58
|
template: `
|
|
58
|
-
<
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<URow>
|
|
69
|
-
<UAvatar
|
|
70
|
-
v-for="(option, index) in options"
|
|
71
|
-
:key="index"
|
|
72
|
-
v-bind="args"
|
|
73
|
-
:[args.enum]="option"
|
|
74
|
-
:label="''"
|
|
75
|
-
/>
|
|
76
|
-
</URow>
|
|
77
|
-
</UCol>
|
|
59
|
+
<URow>
|
|
60
|
+
<UAvatar
|
|
61
|
+
v-for="(option, index) in options"
|
|
62
|
+
:key="index"
|
|
63
|
+
v-bind="args"
|
|
64
|
+
:[args.enum]="option"
|
|
65
|
+
:label="option"
|
|
66
|
+
v-tooltip="option"
|
|
67
|
+
/>
|
|
68
|
+
</URow>
|
|
78
69
|
`,
|
|
79
70
|
});
|
|
80
71
|
|
|
@@ -83,43 +74,66 @@ Default.args = { size: "3xl" };
|
|
|
83
74
|
|
|
84
75
|
export const Src = DefaultTemplate.bind({});
|
|
85
76
|
Src.args = {
|
|
86
|
-
src: "https://
|
|
77
|
+
src: "https://i.pravatar.cc/300?img=67",
|
|
78
|
+
size: "3xl",
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const PlaceholderIcon = DefaultTemplate.bind({});
|
|
82
|
+
PlaceholderIcon.args = {
|
|
83
|
+
placeholderIcon: "account_circle",
|
|
87
84
|
size: "3xl",
|
|
88
85
|
};
|
|
89
86
|
|
|
90
87
|
export const Label = DefaultTemplate.bind({});
|
|
91
88
|
Label.args = { label: "Name Surname", size: "3xl" };
|
|
92
89
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
export const Size = EnumVariantTemplate.bind({});
|
|
91
|
+
Size.args = { enum: "size" };
|
|
92
|
+
Size.parameters = {
|
|
93
|
+
docs: {
|
|
94
|
+
description: {
|
|
95
|
+
story: "Hold cursor above an avatar to see the value.",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
|
98
99
|
|
|
99
|
-
/**
|
|
100
|
-
* Hold cursor above an avatar to see value.
|
|
101
|
-
*/
|
|
102
100
|
export const Rounded = EnumVariantTemplate.bind({});
|
|
103
101
|
Rounded.args = { enum: "rounded", label: "John Doe", color: "orange" };
|
|
102
|
+
Rounded.parameters = {
|
|
103
|
+
docs: {
|
|
104
|
+
description: {
|
|
105
|
+
story: "Hold cursor above an avatar to see the value.",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
104
109
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
export const Color = EnumVariantTemplate.bind({});
|
|
111
|
+
Color.args = { enum: "color" };
|
|
112
|
+
Color.parameters = {
|
|
113
|
+
docs: {
|
|
114
|
+
description: {
|
|
115
|
+
story: "Hold cursor above an avatar to see the value.",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
110
119
|
|
|
111
|
-
/**
|
|
112
|
-
* Hold cursor above an avatar to see value.
|
|
113
|
-
*/
|
|
114
120
|
export const Bordered = EnumVariantTemplate.bind({});
|
|
115
121
|
Bordered.args = { enum: "color", bordered: true };
|
|
122
|
+
Bordered.parameters = {
|
|
123
|
+
docs: {
|
|
124
|
+
description: {
|
|
125
|
+
story: "Hold cursor above an avatar to see the value.",
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
};
|
|
116
129
|
|
|
117
130
|
export const SlotPlaceholder = DefaultTemplate.bind({});
|
|
118
131
|
SlotPlaceholder.args = {
|
|
132
|
+
color: "green",
|
|
119
133
|
size: "3xl",
|
|
120
134
|
slotTemplate: `
|
|
121
|
-
<template #placeholder>
|
|
122
|
-
<ULoader loading />
|
|
135
|
+
<template #placeholder="{ iconColor }">
|
|
136
|
+
<ULoader loading :color="iconColor" />
|
|
123
137
|
</template>
|
|
124
138
|
`,
|
|
125
139
|
};
|
|
@@ -7,6 +7,9 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
9
9
|
import URow from "../../ui.container-row/URow.vue";
|
|
10
|
+
import tooltip from "../../directives/tooltip/vTooltip.ts";
|
|
11
|
+
|
|
12
|
+
import Beverage from "../../assets/icons/vueless/emoji_food_beverage.svg?component";
|
|
10
13
|
|
|
11
14
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
12
15
|
import type { Props } from "../types.ts";
|
|
@@ -35,6 +38,7 @@ export default {
|
|
|
35
38
|
|
|
36
39
|
const DefaultTemplate: StoryFn<UIconArgs> = (args: UIconArgs) => ({
|
|
37
40
|
components: { UIcon },
|
|
41
|
+
directives: { tooltip },
|
|
38
42
|
setup() {
|
|
39
43
|
const slots = getSlotNames(UIcon.__name);
|
|
40
44
|
|
|
@@ -49,6 +53,7 @@ const DefaultTemplate: StoryFn<UIconArgs> = (args: UIconArgs) => ({
|
|
|
49
53
|
|
|
50
54
|
const EnumVariantTemplate: StoryFn<UIconArgs> = (args: UIconArgs, { argTypes }) => ({
|
|
51
55
|
components: { UIcon, URow },
|
|
56
|
+
directives: { tooltip },
|
|
52
57
|
setup() {
|
|
53
58
|
return {
|
|
54
59
|
args,
|
|
@@ -62,6 +67,7 @@ const EnumVariantTemplate: StoryFn<UIconArgs> = (args: UIconArgs, { argTypes })
|
|
|
62
67
|
:key="index"
|
|
63
68
|
v-bind="args"
|
|
64
69
|
:[args.enum]="option"
|
|
70
|
+
v-tooltip="option"
|
|
65
71
|
/>
|
|
66
72
|
</URow>
|
|
67
73
|
`,
|
|
@@ -70,6 +76,18 @@ const EnumVariantTemplate: StoryFn<UIconArgs> = (args: UIconArgs, { argTypes })
|
|
|
70
76
|
export const Default = DefaultTemplate.bind({});
|
|
71
77
|
Default.args = {};
|
|
72
78
|
|
|
79
|
+
export const Src = DefaultTemplate.bind({});
|
|
80
|
+
Src.args = { src: Beverage };
|
|
81
|
+
Src.parameters = {
|
|
82
|
+
docs: {
|
|
83
|
+
description: {
|
|
84
|
+
story:
|
|
85
|
+
// eslint-disable-next-line vue/max-len
|
|
86
|
+
"To use a custom icon, import it with the suffix `?component` and pass the imported component in the `src` prop, like this: <br/> `import Beverage from '../../assets/icons/vueless/emoji_food_beverage.svg?component'`",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
|
|
73
91
|
export const Colors = EnumVariantTemplate.bind({});
|
|
74
92
|
Colors.args = { enum: "color" };
|
|
75
93
|
|
|
@@ -77,7 +95,7 @@ export const Sizes = EnumVariantTemplate.bind({});
|
|
|
77
95
|
Sizes.args = { enum: "size" };
|
|
78
96
|
|
|
79
97
|
export const Variants = EnumVariantTemplate.bind({});
|
|
80
|
-
Variants.args = { enum: "variant", color: "
|
|
98
|
+
Variants.args = { enum: "variant", color: "green" };
|
|
81
99
|
|
|
82
100
|
export const Interactive = DefaultTemplate.bind({});
|
|
83
101
|
Interactive.args = { interactive: true };
|