vueless 0.0.800 → 0.0.802
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.container-accordion/storybook/stories.ts +66 -23
- package/ui.container-card/UCard.vue +16 -10
- package/ui.container-card/config.ts +3 -1
- package/ui.container-card/storybook/stories.ts +67 -64
- package/ui.container-col/storybook/stories.ts +91 -14
- package/ui.container-divider/storybook/stories.ts +32 -9
- package/ui.container-divider/types.ts +1 -1
- package/ui.container-group/UGroup.vue +2 -2
- package/ui.container-group/storybook/stories.ts +58 -47
- package/ui.container-groups/storybook/stories.ts +39 -6
- package/ui.container-modal/UModal.vue +9 -16
- package/ui.container-modal/config.ts +0 -1
- package/ui.container-modal/storybook/stories.ts +164 -79
- package/ui.container-modal/types.ts +1 -1
- package/ui.container-modal-confirm/UModalConfirm.vue +8 -12
- package/ui.container-modal-confirm/storybook/stories.ts +165 -60
- package/ui.container-modal-confirm/types.ts +1 -1
- package/ui.container-page/UPage.vue +10 -23
- package/ui.container-page/storybook/stories.ts +106 -66
- package/ui.container-row/storybook/stories.ts +74 -41
- package/ui.container-row/types.ts +1 -1
- package/ui.data-table/config.ts +1 -1
- package/ui.data-table/storybook/stories.ts +30 -15
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
1
2
|
import {
|
|
2
3
|
getArgTypes,
|
|
3
4
|
getSlotNames,
|
|
@@ -6,10 +7,13 @@ import {
|
|
|
6
7
|
} from "../../utils/storybook.ts";
|
|
7
8
|
|
|
8
9
|
import UModalConfirm from "../../ui.container-modal-confirm/UModalConfirm.vue";
|
|
10
|
+
import UModal from "../../ui.container-modal/UModal.vue";
|
|
9
11
|
import UButton from "../../ui.button/UButton.vue";
|
|
10
12
|
import UHeader from "../../ui.text-header/UHeader.vue";
|
|
11
13
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
12
14
|
import URow from "../../ui.container-row/URow.vue";
|
|
15
|
+
import UCol from "../../ui.container-col/UCol.vue";
|
|
16
|
+
import UBadge from "../../ui.text-badge/UBadge.vue";
|
|
13
17
|
|
|
14
18
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
15
19
|
import type { Props } from "../types.ts";
|
|
@@ -26,7 +30,7 @@ export default {
|
|
|
26
30
|
title: "Containers / Modal Confirm",
|
|
27
31
|
component: UModalConfirm,
|
|
28
32
|
args: {
|
|
29
|
-
title: "
|
|
33
|
+
title: "Confirm Subscription Upgrade?",
|
|
30
34
|
confirmLabel: "Confirm",
|
|
31
35
|
modelValue: false,
|
|
32
36
|
},
|
|
@@ -44,12 +48,11 @@ export default {
|
|
|
44
48
|
} as Meta;
|
|
45
49
|
|
|
46
50
|
const defaultTemplate = `
|
|
47
|
-
|
|
48
|
-
All unsaved data will be lost.
|
|
51
|
+
<p>You are about to complete the subscription upgrade. Any unsaved changes or unfinished processes will be lost.</p>
|
|
49
52
|
`;
|
|
50
53
|
|
|
51
54
|
const DefaultTemplate: StoryFn<UModalConfirmArgs> = (args: UModalConfirmArgs) => ({
|
|
52
|
-
components: { UModalConfirm, UButton, UHeader, UIcon },
|
|
55
|
+
components: { UModalConfirm, UButton, UHeader, UIcon, UModal },
|
|
53
56
|
setup() {
|
|
54
57
|
function onClick() {
|
|
55
58
|
args.modelValue = true;
|
|
@@ -65,7 +68,7 @@ const DefaultTemplate: StoryFn<UModalConfirmArgs> = (args: UModalConfirmArgs) =>
|
|
|
65
68
|
${args.slotTemplate || getSlotsFragment(defaultTemplate)}
|
|
66
69
|
</UModalConfirm>
|
|
67
70
|
|
|
68
|
-
<UButton label="
|
|
71
|
+
<UButton label="Show modal" @click="onClick"/>
|
|
69
72
|
</div>
|
|
70
73
|
`,
|
|
71
74
|
});
|
|
@@ -111,73 +114,175 @@ const EnumVariantTemplate: StoryFn<UModalConfirmArgs> = (
|
|
|
111
114
|
export const Default = DefaultTemplate.bind({});
|
|
112
115
|
Default.args = {};
|
|
113
116
|
|
|
114
|
-
export const
|
|
115
|
-
|
|
117
|
+
export const Description = DefaultTemplate.bind({});
|
|
118
|
+
Description.args = {
|
|
119
|
+
description: "Are you sure you want to upgrade? Your new plan will take effect immediately.",
|
|
120
|
+
};
|
|
116
121
|
|
|
117
|
-
export const
|
|
118
|
-
|
|
122
|
+
export const ConfirmLabel = DefaultTemplate.bind({});
|
|
123
|
+
ConfirmLabel.args = { confirmLabel: "Upgrade" };
|
|
124
|
+
ConfirmLabel.parameters = {
|
|
125
|
+
docs: {
|
|
126
|
+
description: {
|
|
127
|
+
story: "Set confirm button label.",
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
};
|
|
119
131
|
|
|
120
|
-
export const
|
|
121
|
-
|
|
132
|
+
export const Inner: StoryFn<UModalConfirmArgs> = (args: UModalConfirmArgs) => ({
|
|
133
|
+
components: { UModalConfirm, UButton, UModal },
|
|
134
|
+
setup() {
|
|
135
|
+
const showMainModal = ref(false);
|
|
136
|
+
const showInnerModal = ref(false);
|
|
122
137
|
|
|
123
|
-
|
|
124
|
-
|
|
138
|
+
function openMainModal() {
|
|
139
|
+
showMainModal.value = true;
|
|
140
|
+
}
|
|
125
141
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<template #before-title>
|
|
130
|
-
<UIcon name="star" color="gray" />
|
|
131
|
-
</template>
|
|
132
|
-
${defaultTemplate}
|
|
133
|
-
`,
|
|
134
|
-
};
|
|
142
|
+
function openInnerModal() {
|
|
143
|
+
showInnerModal.value = true;
|
|
144
|
+
}
|
|
135
145
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
146
|
+
return { args, showMainModal, showInnerModal, openMainModal, openInnerModal };
|
|
147
|
+
},
|
|
148
|
+
template: `
|
|
149
|
+
<div>
|
|
150
|
+
<UModalConfirm v-bind="args" v-model="showMainModal">
|
|
151
|
+
<p>
|
|
152
|
+
Are you sure you want to cancel your subscription?
|
|
153
|
+
This action will remove access to premium features and cannot be undone.
|
|
154
|
+
</p>
|
|
155
|
+
<UButton label="View Plan Details" @click="openInnerModal"/>
|
|
145
156
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
157
|
+
<UModal
|
|
158
|
+
v-model="showInnerModal"
|
|
159
|
+
title="Current Plan Details"
|
|
160
|
+
description="
|
|
161
|
+
Your current plan includes unlimited access to premium content,
|
|
162
|
+
priority support, and exclusive features.
|
|
163
|
+
"
|
|
164
|
+
inner
|
|
165
|
+
>
|
|
166
|
+
<p>Consider downgrading instead of canceling</p>
|
|
167
|
+
</UModal>
|
|
168
|
+
</UModalConfirm>
|
|
169
|
+
|
|
170
|
+
<UButton label="Manage Subscription" @click="openMainModal"/>
|
|
171
|
+
</div>
|
|
153
172
|
`,
|
|
173
|
+
});
|
|
174
|
+
Inner.parameters = {
|
|
175
|
+
docs: {
|
|
176
|
+
description: {
|
|
177
|
+
story: "Add extra top margin for modal inside another modal.",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
154
180
|
};
|
|
155
181
|
|
|
156
|
-
export const
|
|
157
|
-
|
|
182
|
+
export const Divider = DefaultTemplate.bind({});
|
|
183
|
+
Divider.args = {
|
|
184
|
+
divider: true,
|
|
158
185
|
slotTemplate: `
|
|
159
|
-
<template #header-right>
|
|
160
|
-
<UButton label="I'm in the right slot" size="sm" color="gray" />
|
|
161
|
-
</template>
|
|
162
186
|
${defaultTemplate}
|
|
163
|
-
|
|
187
|
+
<template #footer-left>
|
|
188
|
+
<UButton label="Submit" />
|
|
189
|
+
</template>`,
|
|
164
190
|
};
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
</template>
|
|
172
|
-
`,
|
|
191
|
+
Divider.parameters = {
|
|
192
|
+
docs: {
|
|
193
|
+
description: {
|
|
194
|
+
story: "Show divider between content and footer.",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
173
197
|
};
|
|
174
198
|
|
|
175
|
-
export const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
199
|
+
export const WithoutCancelButton = DefaultTemplate.bind({});
|
|
200
|
+
WithoutCancelButton.args = { cancelHidden: true };
|
|
201
|
+
|
|
202
|
+
export const DisableConfirmButton = DefaultTemplate.bind({});
|
|
203
|
+
DisableConfirmButton.args = { confirmDisabled: true };
|
|
204
|
+
|
|
205
|
+
export const Sizes = EnumVariantTemplate.bind({});
|
|
206
|
+
Sizes.args = { enum: "size" };
|
|
207
|
+
|
|
208
|
+
export const Color = EnumVariantTemplate.bind({});
|
|
209
|
+
Color.args = { enum: "confirmColor" };
|
|
210
|
+
|
|
211
|
+
export const Slots: StoryFn<UModalConfirmArgs> = (args) => ({
|
|
212
|
+
components: { UModalConfirm, UIcon, UButton, UCol, UBadge, URow },
|
|
213
|
+
setup() {
|
|
214
|
+
const modalStates = ref({
|
|
215
|
+
beforeTitle: false,
|
|
216
|
+
title: false,
|
|
217
|
+
afterTitle: false,
|
|
218
|
+
actions: false,
|
|
219
|
+
footerLeft: false,
|
|
220
|
+
footerRight: false,
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
return { args, modalStates };
|
|
224
|
+
},
|
|
225
|
+
template: `
|
|
226
|
+
<UCol gap="lg">
|
|
227
|
+
<div>
|
|
228
|
+
<UModalConfirm v-bind="args" v-model="modalStates.beforeTitle">
|
|
229
|
+
<template #before-title>
|
|
230
|
+
<UIcon name="subscriptions" size="sm" />
|
|
231
|
+
</template>
|
|
232
|
+
${defaultTemplate}
|
|
233
|
+
</UModalConfirm>
|
|
234
|
+
<UButton label="Show before-title slot modal" @click="modalStates.beforeTitle = true"/>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<div>
|
|
238
|
+
<UModalConfirm v-bind="args" v-model="modalStates.title">
|
|
239
|
+
<template #title>
|
|
240
|
+
<UBadge label="Confirm Subscription Upgrade?" size="lg" />
|
|
241
|
+
</template>
|
|
242
|
+
${defaultTemplate}
|
|
243
|
+
</UModalConfirm>
|
|
244
|
+
<UButton label="Show title slot modal" @click="modalStates.title = true"/>
|
|
245
|
+
</div>
|
|
246
|
+
|
|
247
|
+
<div>
|
|
248
|
+
<UModalConfirm v-bind="args" v-model="modalStates.afterTitle">
|
|
249
|
+
<template #after-title>
|
|
250
|
+
<UIcon name="verified" size="sm" />
|
|
251
|
+
</template>
|
|
252
|
+
${defaultTemplate}
|
|
253
|
+
</UModalConfirm>
|
|
254
|
+
<UButton label="Show after-title slot modal" @click="modalStates.afterTitle = true"/>
|
|
255
|
+
</div>
|
|
256
|
+
|
|
257
|
+
<div>
|
|
258
|
+
<UModalConfirm v-bind="args" v-model="modalStates.actions">
|
|
259
|
+
<template #actions="{ close }">
|
|
260
|
+
<UButton size="sm" color="grayscale" label="Close" @click="close" />
|
|
261
|
+
</template>
|
|
262
|
+
${defaultTemplate}
|
|
263
|
+
</UModalConfirm>
|
|
264
|
+
<UButton label="Show actions slot modal" @click="modalStates.actions = true"/>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div>
|
|
268
|
+
<UModalConfirm v-bind="args" v-model="modalStates.footerLeft">
|
|
269
|
+
${defaultTemplate}
|
|
270
|
+
<template #footer-left>
|
|
271
|
+
<UButton label="Back" />
|
|
272
|
+
</template>
|
|
273
|
+
</UModalConfirm>
|
|
274
|
+
<UButton label="Show footer-left modal" @click="modalStates.footerLeft = true"/>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<div>
|
|
278
|
+
<UModalConfirm v-bind="args" v-model="modalStates.footerRight">
|
|
279
|
+
${defaultTemplate}
|
|
280
|
+
<template #footer-right>
|
|
281
|
+
<UButton label="Submit" />
|
|
282
|
+
</template>
|
|
283
|
+
</UModalConfirm>
|
|
284
|
+
<UButton label="Show footer-right modal" @click="modalStates.footerRight = true"/>
|
|
285
|
+
</div>
|
|
286
|
+
</UCol>
|
|
182
287
|
`,
|
|
183
|
-
};
|
|
288
|
+
});
|
|
@@ -37,10 +37,10 @@ const { isMobileBreakpoint } = useBreakpoint();
|
|
|
37
37
|
const isExistHeader = computed(() => {
|
|
38
38
|
return (
|
|
39
39
|
props.title ||
|
|
40
|
-
hasSlotContent(slots["header-left"]) ||
|
|
41
|
-
hasSlotContent(slots["header-right"]) ||
|
|
42
40
|
hasSlotContent(slots["before-title"]) ||
|
|
43
|
-
hasSlotContent(slots["
|
|
41
|
+
hasSlotContent(slots["title"]) ||
|
|
42
|
+
hasSlotContent(slots["after-title"]) ||
|
|
43
|
+
hasSlotContent(slots["actions"])
|
|
44
44
|
);
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -97,16 +97,13 @@ const {
|
|
|
97
97
|
<template>
|
|
98
98
|
<div v-bind="wrapperAttrs" :data-test="getDataTest()">
|
|
99
99
|
<div v-bind="pageAttrs">
|
|
100
|
-
<!-- @slot Use it to add something before the header. -->
|
|
101
|
-
<slot name="header-before" />
|
|
102
|
-
|
|
103
100
|
<div v-if="isExistHeader" v-bind="headerAttrs">
|
|
104
101
|
<div v-bind="headerLeftAttrs">
|
|
105
|
-
<!-- @slot Use it to add something
|
|
106
|
-
<slot name="
|
|
107
|
-
<!-- @slot Use it to add something before the header title. -->
|
|
108
|
-
<slot name="before-title" />
|
|
102
|
+
<!-- @slot Use it to add something before the header title. -->
|
|
103
|
+
<slot name="before-title" />
|
|
109
104
|
|
|
105
|
+
<!-- @slot Use it to add something to the left side of the header. -->
|
|
106
|
+
<slot name="title">
|
|
110
107
|
<div v-bind="headerLeftFallbackAttrs">
|
|
111
108
|
<div v-if="isShownArrowButton" v-bind="backLinkWrapperAttrs">
|
|
112
109
|
<UIcon
|
|
@@ -130,29 +127,22 @@ const {
|
|
|
130
127
|
<UHeader :label="title" :size="titleSize" v-bind="titleAttrs" />
|
|
131
128
|
<div v-if="description" v-bind="descriptionAttrs" v-text="description" />
|
|
132
129
|
</div>
|
|
133
|
-
|
|
134
|
-
<!-- @slot Use it to add something after the header title. -->
|
|
135
|
-
<slot name="after-title" />
|
|
136
130
|
</slot>
|
|
131
|
+
<!-- @slot Use it to add something after the header title. -->
|
|
132
|
+
<slot name="after-title" />
|
|
137
133
|
</div>
|
|
138
134
|
|
|
139
135
|
<div v-bind="headerRightAttrs">
|
|
140
136
|
<!-- @slot Use it to add something to the right side of the header. -->
|
|
141
|
-
<slot name="
|
|
137
|
+
<slot name="actions" />
|
|
142
138
|
</div>
|
|
143
139
|
</div>
|
|
144
140
|
|
|
145
|
-
<!-- @slot Use it to add something after the header. -->
|
|
146
|
-
<slot name="header-after" />
|
|
147
|
-
|
|
148
141
|
<div v-bind="bodyAttrs">
|
|
149
142
|
<!-- @slot Use it to add main content. -->
|
|
150
143
|
<slot />
|
|
151
144
|
</div>
|
|
152
145
|
|
|
153
|
-
<!-- @slot Use it to add something before the footer. -->
|
|
154
|
-
<slot name="footer-before" />
|
|
155
|
-
|
|
156
146
|
<div v-if="isExistFooter" v-bind="footerAttrs">
|
|
157
147
|
<div v-bind="footerLeftAttrs">
|
|
158
148
|
<!-- @slot Use it to add something to the left side of the footer. -->
|
|
@@ -164,9 +154,6 @@ const {
|
|
|
164
154
|
<slot name="footer-right" />
|
|
165
155
|
</div>
|
|
166
156
|
</div>
|
|
167
|
-
|
|
168
|
-
<!-- @slot Use it to add something after the footer. -->
|
|
169
|
-
<slot name="footer-after" />
|
|
170
157
|
</div>
|
|
171
158
|
|
|
172
159
|
<div v-if="!isMobileBreakpoint" v-bind="rightRoundingWrapperAttrs">
|
|
@@ -8,17 +8,20 @@ import {
|
|
|
8
8
|
import UPage from "../../ui.container-page/UPage.vue";
|
|
9
9
|
import UCard from "../../ui.container-card/UCard.vue";
|
|
10
10
|
import URow from "../../ui.container-row/URow.vue";
|
|
11
|
+
import UCol from "../../ui.container-col/UCol.vue";
|
|
11
12
|
import UInput from "../../ui.form-input/UInput.vue";
|
|
12
13
|
import UTextarea from "../../ui.form-textarea/UTextarea.vue";
|
|
13
14
|
import UButton from "../../ui.button/UButton.vue";
|
|
14
15
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
15
16
|
import UHeader from "../../ui.text-header/UHeader.vue";
|
|
17
|
+
import UBadge from "../../ui.text-badge/UBadge.vue";
|
|
16
18
|
|
|
17
19
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
18
20
|
import type { Props } from "../types.ts";
|
|
19
21
|
|
|
20
22
|
interface UPageArgs extends Props {
|
|
21
23
|
slotTemplate?: string;
|
|
24
|
+
enum: "size" | "titleSize";
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
export default {
|
|
@@ -26,7 +29,7 @@ export default {
|
|
|
26
29
|
title: "Containers / Page",
|
|
27
30
|
component: UPage,
|
|
28
31
|
args: {
|
|
29
|
-
title: "
|
|
32
|
+
title: "User Profile",
|
|
30
33
|
gray: true,
|
|
31
34
|
},
|
|
32
35
|
argTypes: {
|
|
@@ -40,12 +43,13 @@ export default {
|
|
|
40
43
|
} as Meta;
|
|
41
44
|
|
|
42
45
|
const defaultTemplate = `
|
|
43
|
-
<UCard title="
|
|
46
|
+
<UCard title="Profile Information">
|
|
44
47
|
<URow>
|
|
45
|
-
<UInput label="Name" />
|
|
46
|
-
<UInput label="
|
|
48
|
+
<UInput label="Full Name" placeholder="John Doe" />
|
|
49
|
+
<UInput label="Email Address" type="email" placeholder="john.doe@example.com" />
|
|
47
50
|
</URow>
|
|
48
|
-
|
|
51
|
+
|
|
52
|
+
<UTextarea class="mb-7 mt-4" label="Message" placeholder="Enter your message here..." rows="4" />
|
|
49
53
|
</UCard>
|
|
50
54
|
`;
|
|
51
55
|
|
|
@@ -72,82 +76,118 @@ const DefaultTemplate: StoryFn<UPageArgs> = (args: UPageArgs) => ({
|
|
|
72
76
|
`,
|
|
73
77
|
});
|
|
74
78
|
|
|
79
|
+
const EnumVariantTemplate: StoryFn<UPageArgs> = (args: UPageArgs, { argTypes }) => ({
|
|
80
|
+
components: { UPage, UCard, URow, UInput, UTextarea },
|
|
81
|
+
setup() {
|
|
82
|
+
return {
|
|
83
|
+
args,
|
|
84
|
+
options: argTypes?.[args.enum]?.options,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
template: `
|
|
88
|
+
<URow v-for="(option, index) in options" :key="index">
|
|
89
|
+
<UPage
|
|
90
|
+
v-bind="args"
|
|
91
|
+
:[args.enum]="option"
|
|
92
|
+
:description="option"
|
|
93
|
+
:config="{ wrapper: 'min-h-max', page: 'min-h-max' }"
|
|
94
|
+
>
|
|
95
|
+
${defaultTemplate}
|
|
96
|
+
</UPage>
|
|
97
|
+
</URow>
|
|
98
|
+
`,
|
|
99
|
+
});
|
|
100
|
+
|
|
75
101
|
export const Default = DefaultTemplate.bind({});
|
|
76
102
|
Default.args = {};
|
|
77
103
|
|
|
78
|
-
export const TitleSizeSm = DefaultTemplate.bind({});
|
|
79
|
-
TitleSizeSm.args = { titleSize: "sm" };
|
|
80
|
-
|
|
81
104
|
export const Description = DefaultTemplate.bind({});
|
|
82
|
-
Description.args = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Size.args = { size: "sm", title: "size = md" };
|
|
105
|
+
Description.args = {
|
|
106
|
+
description: "Manage your profile details and update your personal information.",
|
|
107
|
+
};
|
|
86
108
|
|
|
87
109
|
export const BackLink = DefaultTemplate.bind({});
|
|
88
110
|
BackLink.args = {
|
|
89
|
-
backLabel: "
|
|
111
|
+
backLabel: "Back",
|
|
90
112
|
backTo: {
|
|
91
113
|
path: "/",
|
|
92
114
|
},
|
|
93
115
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
${defaultTemplate}
|
|
102
|
-
`,
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const SlotBeforeTitle = DefaultTemplate.bind({});
|
|
106
|
-
SlotBeforeTitle.args = {
|
|
107
|
-
slotTemplate: `
|
|
108
|
-
<template #before-title>
|
|
109
|
-
<UIcon name="close" color="gray" />
|
|
110
|
-
</template>
|
|
111
|
-
${defaultTemplate}
|
|
112
|
-
`,
|
|
116
|
+
BackLink.parameters = {
|
|
117
|
+
docs: {
|
|
118
|
+
description: {
|
|
119
|
+
story:
|
|
120
|
+
"Use `backTo` and `backLabel` props to add a route object and a label to the back link.",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
113
123
|
};
|
|
114
124
|
|
|
115
|
-
export const
|
|
116
|
-
|
|
117
|
-
slotTemplate: `
|
|
118
|
-
<template #after-title>
|
|
119
|
-
<UIcon name="close" color="gray" />
|
|
120
|
-
</template>
|
|
121
|
-
${defaultTemplate}
|
|
122
|
-
`,
|
|
123
|
-
};
|
|
125
|
+
export const TitleSize = EnumVariantTemplate.bind({});
|
|
126
|
+
TitleSize.args = { enum: "titleSize" };
|
|
124
127
|
|
|
125
|
-
export const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
export const Size = EnumVariantTemplate.bind({});
|
|
129
|
+
Size.args = { enum: "size" };
|
|
130
|
+
Size.parameters = {
|
|
131
|
+
docs: {
|
|
132
|
+
description: {
|
|
133
|
+
story: "Page size (width).",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
133
136
|
};
|
|
134
137
|
|
|
135
|
-
export const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<template #footer-left>
|
|
140
|
-
<UButton label="button" />
|
|
141
|
-
</template>
|
|
142
|
-
`,
|
|
143
|
-
};
|
|
138
|
+
export const Slots: StoryFn<UPageArgs> = (args) => ({
|
|
139
|
+
components: { UPage, UIcon, URow, UCol, UButton, UBadge, UTextarea, UCard, UInput },
|
|
140
|
+
setup() {
|
|
141
|
+
args.config = { wrapper: "min-h-max", page: "min-h-max" };
|
|
144
142
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
143
|
+
return { args };
|
|
144
|
+
},
|
|
145
|
+
template: `
|
|
146
|
+
<UCol gap="lg">
|
|
147
|
+
<UPage v-bind="args" description="Before Title Slot">
|
|
148
|
+
<template #before-title>
|
|
149
|
+
<UIcon name="account_circle" />
|
|
150
|
+
</template>
|
|
151
|
+
${defaultTemplate}
|
|
152
|
+
</UPage>
|
|
153
|
+
|
|
154
|
+
<UPage v-bind="args">
|
|
155
|
+
<template #title>
|
|
156
|
+
<UBadge label="Title Slot" size="lg" />
|
|
157
|
+
</template>
|
|
158
|
+
${defaultTemplate}
|
|
159
|
+
</UPage>
|
|
160
|
+
|
|
161
|
+
<UPage v-bind="args" description="After Title Slot">
|
|
162
|
+
<template #after-title>
|
|
163
|
+
<UIcon name="verified" />
|
|
164
|
+
</template>
|
|
165
|
+
${defaultTemplate}
|
|
166
|
+
</UPage>
|
|
167
|
+
|
|
168
|
+
<UPage v-bind="args" description="Actions Slot">
|
|
169
|
+
<template #actions>
|
|
170
|
+
<URow class="max-w-fit">
|
|
171
|
+
<UButton size="sm" variant="secondary" label="Clear" />
|
|
172
|
+
<UButton size="sm" label="Submit" />
|
|
173
|
+
</URow>
|
|
174
|
+
</template>
|
|
175
|
+
${defaultTemplate}
|
|
176
|
+
</UPage>
|
|
177
|
+
|
|
178
|
+
<UPage v-bind="args" description="Footer Left Slot">
|
|
179
|
+
${defaultTemplate}
|
|
180
|
+
<template #footer-left>
|
|
181
|
+
<UButton size="sm" label="Cancel" />
|
|
182
|
+
</template>
|
|
183
|
+
</UPage>
|
|
184
|
+
|
|
185
|
+
<UPage v-bind="args" description="Footer Right Slot">
|
|
186
|
+
${defaultTemplate}
|
|
187
|
+
<template #footer-right>
|
|
188
|
+
<UButton size="sm" label="Save Changes" />
|
|
189
|
+
</template>
|
|
190
|
+
</UPage>
|
|
191
|
+
</UCol>
|
|
152
192
|
`,
|
|
153
|
-
};
|
|
193
|
+
});
|