vueless 0.0.248 → 0.0.249
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
|
@@ -30,7 +30,7 @@ const DefaultTemplate = (args) => ({
|
|
|
30
30
|
},
|
|
31
31
|
template: `
|
|
32
32
|
<UAlert v-bind="args">
|
|
33
|
-
${args.slotTemplate || getSlotsFragment(
|
|
33
|
+
${args.slotTemplate || getSlotsFragment()}
|
|
34
34
|
</UAlert>
|
|
35
35
|
`,
|
|
36
36
|
});
|
|
@@ -38,17 +38,16 @@ const DefaultTemplate = (args) => ({
|
|
|
38
38
|
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
39
39
|
components: { UAlert, UCol },
|
|
40
40
|
setup() {
|
|
41
|
-
const options = argTypes[args.enum].options;
|
|
42
|
-
let prefixedOptions = options;
|
|
43
|
-
|
|
44
|
-
if (argTypes[args.enum].name === "size") {
|
|
45
|
-
prefixedOptions = options.map((option) => getText(option));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
41
|
function getText(value) {
|
|
49
42
|
return `This is Alert's ${value} size`;
|
|
50
43
|
}
|
|
51
44
|
|
|
45
|
+
let prefixedOptions = argTypes[args.enum].options;
|
|
46
|
+
|
|
47
|
+
if (argTypes[args.enum].name === "size") {
|
|
48
|
+
prefixedOptions = prefixedOptions.map((option) => getText(option));
|
|
49
|
+
}
|
|
50
|
+
|
|
52
51
|
return { args, options: argTypes[args.enum].options, prefixedOptions };
|
|
53
52
|
},
|
|
54
53
|
template: `
|
|
@@ -80,7 +79,7 @@ export const HTML = DefaultTemplate.bind({});
|
|
|
80
79
|
HTML.args = {
|
|
81
80
|
title: "",
|
|
82
81
|
description: "",
|
|
83
|
-
|
|
82
|
+
slotTemplate: `
|
|
84
83
|
<h3 class="text-lg font-medium mb-2">Important Security Update</h3>
|
|
85
84
|
<p class="mb-0.5">
|
|
86
85
|
<b>Your account password will expire in 10 days,</b> please update it to maintain account security.
|
|
@@ -60,11 +60,7 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
|
60
60
|
template: `
|
|
61
61
|
<URow>
|
|
62
62
|
<div class="${COMPONENT_CLASSES}" v-for="(option, index) in options" :key="index">
|
|
63
|
-
<UMoney v-bind="args" :[args.enum]="option"
|
|
64
|
-
<template v-for="(slot) in slots" v-slot:[slot]>
|
|
65
|
-
<template v-if="args[slot]">{{ args[slot] }}</template>
|
|
66
|
-
</template>
|
|
67
|
-
</UMoney>
|
|
63
|
+
<UMoney v-bind="args" :[args.enum]="option" />
|
|
68
64
|
</div>
|
|
69
65
|
</URow>
|
|
70
66
|
`,
|