vueless 0.0.243 → 0.0.244
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UPagination from "../ui.navigation-pagination";
|
|
4
4
|
|
|
@@ -21,10 +21,14 @@ export default {
|
|
|
21
21
|
const DefaultTemplate = (args) => ({
|
|
22
22
|
components: { UPagination },
|
|
23
23
|
setup() {
|
|
24
|
-
|
|
24
|
+
const slots = getSlotNames(UPagination.name);
|
|
25
|
+
|
|
26
|
+
return { args, slots };
|
|
25
27
|
},
|
|
26
28
|
template: `
|
|
27
|
-
<UPagination v-bind="args" v-model="args.
|
|
29
|
+
<UPagination v-bind="args" v-model="args.modelValue">
|
|
30
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
31
|
+
</UPagination>
|
|
28
32
|
`,
|
|
29
33
|
});
|
|
30
34
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes,
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UProgress from "./index.vue";
|
|
4
4
|
import UCol from "../ui.container-col";
|
|
@@ -33,7 +33,7 @@ const DefaultTemplate = (args) => ({
|
|
|
33
33
|
},
|
|
34
34
|
template: `
|
|
35
35
|
<UCol align="start">
|
|
36
|
-
<UProgress v-bind="args">${args.slotTemplate ||
|
|
36
|
+
<UProgress v-bind="args">${args.slotTemplate || getSlotsFragment()}</UProgress>
|
|
37
37
|
<UButton label="Next →" size="sm" variant="thirdary" filled @click="updateProgress" />
|
|
38
38
|
</UCol>
|
|
39
39
|
`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UTab from "../ui.navigation-tab";
|
|
4
4
|
import UIcon from "../ui.image-icon";
|
|
@@ -19,23 +19,15 @@ export default {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const DefaultTemplate = (args) => ({
|
|
22
|
-
components: { UTab },
|
|
23
|
-
setup() {
|
|
24
|
-
return { args };
|
|
25
|
-
},
|
|
26
|
-
template: `
|
|
27
|
-
<UTab v-bind="args" />
|
|
28
|
-
`,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
const SlotTemplate = (args) => ({
|
|
32
22
|
components: { UTab, UIcon },
|
|
33
23
|
setup() {
|
|
34
|
-
|
|
24
|
+
const slots = getSlotNames(UTab.name);
|
|
25
|
+
|
|
26
|
+
return { args, slots };
|
|
35
27
|
},
|
|
36
28
|
template: `
|
|
37
29
|
<UTab v-bind="args">
|
|
38
|
-
${args.slotTemplate}
|
|
30
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
39
31
|
</UTab>
|
|
40
32
|
`,
|
|
41
33
|
});
|
|
@@ -46,7 +38,7 @@ defaultTemplate.args = {};
|
|
|
46
38
|
export const disabled = DefaultTemplate.bind({});
|
|
47
39
|
disabled.args = { disabled: true };
|
|
48
40
|
|
|
49
|
-
export const slotDefault =
|
|
41
|
+
export const slotDefault = DefaultTemplate.bind({});
|
|
50
42
|
slotDefault.args = {
|
|
51
43
|
label: "Tag",
|
|
52
44
|
slotTemplate: `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UTabs from "../ui.navigation-tabs";
|
|
4
4
|
|
|
@@ -25,28 +25,32 @@ export default {
|
|
|
25
25
|
const DefaultTemplate = (args) => ({
|
|
26
26
|
components: { UTabs },
|
|
27
27
|
setup() {
|
|
28
|
-
|
|
28
|
+
const slots = getSlotNames(UTabs.name);
|
|
29
|
+
|
|
30
|
+
return { args, slots };
|
|
29
31
|
},
|
|
30
32
|
template: `
|
|
31
|
-
<UTabs v-model="args.modelValue" v-bind="args"
|
|
33
|
+
<UTabs v-model="args.modelValue" v-bind="args">
|
|
34
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
35
|
+
</UTabs>
|
|
32
36
|
`,
|
|
33
37
|
});
|
|
34
38
|
|
|
35
|
-
const
|
|
39
|
+
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
36
40
|
components: { UTabs },
|
|
37
41
|
setup() {
|
|
38
42
|
return {
|
|
39
43
|
args,
|
|
40
|
-
|
|
44
|
+
options: argTypes[args.enum].options,
|
|
41
45
|
};
|
|
42
46
|
},
|
|
43
47
|
template: `
|
|
44
48
|
<div class="space-y-16">
|
|
45
49
|
<UTabs
|
|
46
50
|
v-model="args.modelValue"
|
|
47
|
-
v-for="(
|
|
51
|
+
v-for="(option, index) in options"
|
|
48
52
|
v-bind="args"
|
|
49
|
-
:
|
|
53
|
+
:[args.enum]="option"
|
|
50
54
|
:key="index"
|
|
51
55
|
/>
|
|
52
56
|
</div>
|
|
@@ -56,8 +60,8 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
56
60
|
export const Default = DefaultTemplate.bind({});
|
|
57
61
|
Default.args = {};
|
|
58
62
|
|
|
59
|
-
export const sizes =
|
|
60
|
-
sizes.args = {};
|
|
63
|
+
export const sizes = EnumVariantTemplate.bind({});
|
|
64
|
+
sizes.args = { enum: "size" };
|
|
61
65
|
|
|
62
66
|
export const bottomLine = DefaultTemplate.bind({});
|
|
63
67
|
bottomLine.args = { underlined: true };
|