vueless 0.0.396 → 0.0.398
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/UAccordion.vue +5 -5
- package/ui.container-accordion/config.js +1 -1
- package/ui.container-accordion/storybook/stories.js +3 -3
- package/ui.container-divider/UDivider.vue +1 -1
- package/ui.container-divider/config.js +1 -3
- package/ui.container-group/UGroup.vue +9 -9
- package/ui.container-group/config.js +5 -5
- package/ui.container-modal/UModal.vue +68 -65
- package/ui.container-modal/config.js +8 -10
- package/ui.container-modal/storybook/stories.js +23 -23
- package/ui.container-modal/useAttrs.js +3 -17
- package/ui.container-modal-confirm/UModalConfirm.vue +98 -23
- package/ui.container-modal-confirm/config.js +9 -3
- package/ui.container-modal-confirm/storybook/stories.js +19 -22
- package/ui.container-page/UPage.vue +29 -97
- package/ui.container-page/config.js +5 -9
- package/ui.container-page/storybook/stories.js +17 -33
- package/ui.container-page/useAttrs.js +2 -8
- package/ui.form-label/config.js +1 -1
- package/web-types.json +156 -84
|
@@ -1,34 +1,53 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<UModal
|
|
3
|
+
:id="id"
|
|
3
4
|
v-model="isShownModal"
|
|
4
|
-
:
|
|
5
|
+
:size="size"
|
|
5
6
|
:title="title"
|
|
7
|
+
:description="description"
|
|
8
|
+
:inner="inner"
|
|
9
|
+
:close-on-esc="closeOnEsc"
|
|
10
|
+
:close-on-cross="closeOnCross"
|
|
11
|
+
:close-on-overlay="closeOnOverlay"
|
|
12
|
+
:mobile-stick-bottom="mobileStickBottom"
|
|
6
13
|
no-divider
|
|
7
14
|
mobile-bottom-align
|
|
8
15
|
:data-test="dataTest"
|
|
9
|
-
v-bind="
|
|
16
|
+
v-bind="confirmModalAttrs"
|
|
10
17
|
>
|
|
11
|
-
<template #header-left-before>
|
|
12
|
-
<slot name="header-left-before" />
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
18
|
<template #header-left>
|
|
19
|
+
<!-- @slot Use it to add something to the left side of the header. -->
|
|
16
20
|
<slot name="header-left" />
|
|
17
21
|
</template>
|
|
18
22
|
|
|
19
|
-
<template #
|
|
20
|
-
|
|
23
|
+
<template #before-title>
|
|
24
|
+
<!-- @slot Use it to add something before the header title. -->
|
|
25
|
+
<slot name="before-title" />
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<template #after-title>
|
|
29
|
+
<!-- @slot Use it to add something after the header title. -->
|
|
30
|
+
<slot name="after-title" />
|
|
21
31
|
</template>
|
|
22
32
|
|
|
23
33
|
<template #header-right>
|
|
34
|
+
<!-- @slot Use it to add something to the right side of the header. -->
|
|
24
35
|
<slot name="header-right" />
|
|
25
36
|
</template>
|
|
26
37
|
|
|
27
|
-
<template #
|
|
28
|
-
|
|
38
|
+
<template #close-button="{ iconName }">
|
|
39
|
+
<!--
|
|
40
|
+
@slot Use it to add something instead of the close button.
|
|
41
|
+
@binding {string} icon-name
|
|
42
|
+
-->
|
|
43
|
+
<slot name="close-button" :icon-name="iconName" />
|
|
29
44
|
</template>
|
|
30
45
|
|
|
46
|
+
<!-- @slot Use it to add something into the modal body. -->
|
|
47
|
+
<slot />
|
|
48
|
+
|
|
31
49
|
<template #footer-left>
|
|
50
|
+
<!-- @slot Use it to add something to the left side of the footer. -->
|
|
32
51
|
<slot v-if="hasSlotContent($slots['footer-left'])" name="footer-left" />
|
|
33
52
|
|
|
34
53
|
<div v-else v-bind="footerLeftFallbackAttrs">
|
|
@@ -36,25 +55,25 @@
|
|
|
36
55
|
:label="confirmLabel || currentLocale.confirm"
|
|
37
56
|
:color="confirmColor"
|
|
38
57
|
:disabled="confirmDisabled"
|
|
39
|
-
:data-test="`${dataTest}-accept`"
|
|
40
58
|
v-bind="confirmButtonAttrs"
|
|
59
|
+
:data-test="`${dataTest}-confirm`"
|
|
41
60
|
@click="emitConfirmAction"
|
|
42
61
|
/>
|
|
43
62
|
|
|
44
63
|
<UButton
|
|
45
|
-
v-if="
|
|
64
|
+
v-if="!cancelHidden"
|
|
46
65
|
:label="currentLocale.cancel"
|
|
47
|
-
variant="
|
|
66
|
+
variant="secondary"
|
|
48
67
|
color="gray"
|
|
49
|
-
filled
|
|
50
|
-
:data-test="`${dataTest}-close`"
|
|
51
68
|
v-bind="cancelButtonAttrs"
|
|
69
|
+
:data-test="`${dataTest}-close`"
|
|
52
70
|
@click="onCloseModal"
|
|
53
71
|
/>
|
|
54
72
|
</div>
|
|
55
73
|
</template>
|
|
56
74
|
|
|
57
75
|
<template #footer-right>
|
|
76
|
+
<!-- @slot Use it to add something to the right side of the footer. -->
|
|
58
77
|
<slot name="footer-right" />
|
|
59
78
|
</template>
|
|
60
79
|
</UModal>
|
|
@@ -78,7 +97,7 @@ defineOptions({ inheritAttrs: false });
|
|
|
78
97
|
|
|
79
98
|
const props = defineProps({
|
|
80
99
|
/**
|
|
81
|
-
*
|
|
100
|
+
* Set modal state (hidden / shown).
|
|
82
101
|
*/
|
|
83
102
|
modelValue: {
|
|
84
103
|
type: Boolean,
|
|
@@ -93,6 +112,14 @@ const props = defineProps({
|
|
|
93
112
|
default: "",
|
|
94
113
|
},
|
|
95
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Modal description.
|
|
117
|
+
*/
|
|
118
|
+
description: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: "",
|
|
121
|
+
},
|
|
122
|
+
|
|
96
123
|
/**
|
|
97
124
|
* Confirm button label.
|
|
98
125
|
*/
|
|
@@ -119,20 +146,68 @@ const props = defineProps({
|
|
|
119
146
|
},
|
|
120
147
|
|
|
121
148
|
/**
|
|
122
|
-
*
|
|
149
|
+
* Hide cancel button.
|
|
123
150
|
*/
|
|
124
|
-
|
|
151
|
+
cancelHidden: {
|
|
125
152
|
type: Boolean,
|
|
126
|
-
default: getDefault(defaultConfig, UModalConfirm).
|
|
153
|
+
default: getDefault(defaultConfig, UModalConfirm).cancelHidden,
|
|
127
154
|
},
|
|
128
155
|
|
|
129
156
|
/**
|
|
130
|
-
* Modal width.
|
|
157
|
+
* Modal size (width).
|
|
131
158
|
* @values xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl
|
|
132
159
|
*/
|
|
133
|
-
|
|
160
|
+
size: {
|
|
161
|
+
type: String,
|
|
162
|
+
default: getDefault(defaultConfig, UModalConfirm).size,
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Allow closing modal by clicking on close cross.
|
|
167
|
+
*/
|
|
168
|
+
closeOnCross: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: getDefault(defaultConfig, UModalConfirm).closeOnCross,
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Allow closing modal by clicking on overlay.
|
|
175
|
+
*/
|
|
176
|
+
closeOnOverlay: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
default: getDefault(defaultConfig, UModalConfirm).closeOnOverlay,
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Allow closing modal by pressing escape (esc) on the keyboard.
|
|
183
|
+
*/
|
|
184
|
+
closeOnEsc: {
|
|
185
|
+
type: Boolean,
|
|
186
|
+
default: getDefault(defaultConfig, UModalConfirm).closeOnEsc,
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Add extra top margin for modal inside another modal.
|
|
191
|
+
*/
|
|
192
|
+
inner: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: getDefault(defaultConfig, UModalConfirm).inner,
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Attach small modal to the bottom of the screen (mobile version only).
|
|
199
|
+
*/
|
|
200
|
+
mobileStickBottom: {
|
|
201
|
+
type: Boolean,
|
|
202
|
+
default: getDefault(defaultConfig, UModalConfirm).mobileStickBottom,
|
|
203
|
+
},
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Unique element id.
|
|
207
|
+
*/
|
|
208
|
+
id: {
|
|
134
209
|
type: String,
|
|
135
|
-
default:
|
|
210
|
+
default: "",
|
|
136
211
|
},
|
|
137
212
|
|
|
138
213
|
/**
|
|
@@ -175,7 +250,7 @@ const { tm } = useLocale();
|
|
|
175
250
|
const {
|
|
176
251
|
hasSlotContent,
|
|
177
252
|
footerLeftFallbackAttrs,
|
|
178
|
-
|
|
253
|
+
confirmModalAttrs,
|
|
179
254
|
confirmButtonAttrs,
|
|
180
255
|
cancelButtonAttrs,
|
|
181
256
|
} = useAttrs(props);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
|
|
2
|
+
confirmModal: "{UModal}",
|
|
3
3
|
footerLeftFallback: "flex space-x-4",
|
|
4
4
|
confirmButton: "{UButton} w-full",
|
|
5
5
|
cancelButton: "{UButton} w-full",
|
|
@@ -8,9 +8,15 @@ export default /*tw*/ {
|
|
|
8
8
|
cancel: "Cancel",
|
|
9
9
|
},
|
|
10
10
|
defaults: {
|
|
11
|
-
|
|
11
|
+
size: "sm",
|
|
12
12
|
confirmColor: "brand",
|
|
13
|
+
inner: false,
|
|
14
|
+
noDivider: false,
|
|
15
|
+
closeOnEsc: true,
|
|
16
|
+
closeOnCross: true,
|
|
17
|
+
closeOnOverlay: true,
|
|
18
|
+
mobileStickBottom: false,
|
|
13
19
|
confirmDisabled: false,
|
|
14
|
-
|
|
20
|
+
cancelHidden: false,
|
|
15
21
|
},
|
|
16
22
|
};
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
title: "Containers / Modal Confirm",
|
|
15
15
|
component: UModalConfirm,
|
|
16
16
|
args: {
|
|
17
|
-
title: "
|
|
17
|
+
title: "Complete the transfer?",
|
|
18
18
|
confirmLabel: "Confirm",
|
|
19
19
|
modelValue: false,
|
|
20
20
|
},
|
|
@@ -30,7 +30,10 @@ export default {
|
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const defaultTemplate =
|
|
33
|
+
const defaultTemplate = `
|
|
34
|
+
It looks like you going to complete the transaction before the process will finished.
|
|
35
|
+
All unsaved data will be lost.
|
|
36
|
+
`;
|
|
34
37
|
|
|
35
38
|
const DefaultTemplate = (args) => ({
|
|
36
39
|
components: { UModalConfirm, UButton, UHeader, UIcon },
|
|
@@ -93,48 +96,42 @@ export const Default = DefaultTemplate.bind({});
|
|
|
93
96
|
Default.args = {};
|
|
94
97
|
|
|
95
98
|
export const WithoutCancelButton = DefaultTemplate.bind({});
|
|
96
|
-
WithoutCancelButton.args = {
|
|
99
|
+
WithoutCancelButton.args = { cancelHidden: false };
|
|
97
100
|
|
|
98
101
|
export const DisableAcceptButton = DefaultTemplate.bind({});
|
|
99
102
|
DisableAcceptButton.args = { confirmDisabled: true };
|
|
100
103
|
|
|
101
104
|
export const Sizes = EnumVariantTemplate.bind({});
|
|
102
|
-
Sizes.args = { enum: "
|
|
105
|
+
Sizes.args = { enum: "size" };
|
|
103
106
|
|
|
104
107
|
export const Color = EnumVariantTemplate.bind({});
|
|
105
108
|
Color.args = { enum: "confirmColor" };
|
|
106
109
|
|
|
107
|
-
export const
|
|
108
|
-
|
|
110
|
+
export const SlotBeforeTitle = DefaultTemplate.bind({});
|
|
111
|
+
SlotBeforeTitle.args = {
|
|
109
112
|
slotTemplate: `
|
|
110
|
-
<template #
|
|
111
|
-
<UIcon
|
|
112
|
-
name="star"
|
|
113
|
-
color="gray"
|
|
114
|
-
/>
|
|
113
|
+
<template #before-title>
|
|
114
|
+
<UIcon name="star" color="gray" />
|
|
115
115
|
</template>
|
|
116
116
|
${defaultTemplate}
|
|
117
117
|
`,
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
export const
|
|
121
|
-
|
|
120
|
+
export const SlotAfterTitle = DefaultTemplate.bind({});
|
|
121
|
+
SlotAfterTitle.args = {
|
|
122
122
|
slotTemplate: `
|
|
123
|
-
<template #
|
|
124
|
-
<
|
|
123
|
+
<template #after-title>
|
|
124
|
+
<UIcon name="star" color="gray" />
|
|
125
125
|
</template>
|
|
126
126
|
${defaultTemplate}
|
|
127
127
|
`,
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
-
export const
|
|
131
|
-
|
|
130
|
+
export const SlotHeaderLeft = DefaultTemplate.bind({});
|
|
131
|
+
SlotHeaderLeft.args = {
|
|
132
132
|
slotTemplate: `
|
|
133
|
-
<template #header-left
|
|
134
|
-
<
|
|
135
|
-
name="star"
|
|
136
|
-
color="gray"
|
|
137
|
-
/>
|
|
133
|
+
<template #header-left>
|
|
134
|
+
<UHeader size="lg" label="Large title" />
|
|
138
135
|
</template>
|
|
139
136
|
${defaultTemplate}
|
|
140
137
|
`,
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
<!-- @slot Use it to add something before the header. -->
|
|
5
5
|
<slot name="header-before" />
|
|
6
6
|
|
|
7
|
-
<div v-if="
|
|
7
|
+
<div v-if="isExistHeader" v-bind="headerAttrs">
|
|
8
8
|
<div v-bind="headerLeftAttrs">
|
|
9
|
-
<!-- @slot Use it to add something
|
|
10
|
-
<slot name="header-left-before" />
|
|
11
|
-
|
|
12
|
-
<!-- @slot Use it to customise left side of the header. -->
|
|
9
|
+
<!-- @slot Use it to add something to the left side of the header. -->
|
|
13
10
|
<slot name="header-left">
|
|
11
|
+
<!-- @slot Use it to add something before the header title. -->
|
|
12
|
+
<slot name="before-title" />
|
|
13
|
+
|
|
14
14
|
<div v-bind="headerLeftFallbackAttrs">
|
|
15
15
|
<ULink
|
|
16
16
|
v-if="isShownArrowButton"
|
|
17
17
|
no-ring
|
|
18
18
|
size="sm"
|
|
19
19
|
color="gray"
|
|
20
|
-
:to="
|
|
20
|
+
:to="backTo"
|
|
21
21
|
:label="backLabel"
|
|
22
22
|
v-bind="backLinkAttrs"
|
|
23
23
|
>
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
<UHeader :label="title" :size="titleSize" v-bind="titleAttrs" />
|
|
36
36
|
<div v-if="description" v-bind="descriptionAttrs" v-text="description" />
|
|
37
37
|
</div>
|
|
38
|
-
</slot>
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
<!-- @slot Use it to add something after the header title. -->
|
|
40
|
+
<slot name="after-title" />
|
|
41
|
+
</slot>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
44
|
<div v-bind="headerRightAttrs">
|
|
45
|
-
<!-- @slot Use it to
|
|
45
|
+
<!-- @slot Use it to add something to the right side of the header. -->
|
|
46
46
|
<slot name="header-right" />
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<!-- @slot Use it to add something after the header. -->
|
|
51
51
|
<slot name="header-after" />
|
|
52
52
|
|
|
53
|
-
<div>
|
|
53
|
+
<div v-bind="bodyAttrs">
|
|
54
54
|
<!-- @slot Use it to add main content. -->
|
|
55
55
|
<slot />
|
|
56
56
|
</div>
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
<!-- @slot Use it to add something before the footer. -->
|
|
59
59
|
<slot name="footer-before" />
|
|
60
60
|
|
|
61
|
-
<div v-if="
|
|
62
|
-
<div
|
|
61
|
+
<div v-if="isExistFooter" v-bind="footerAttrs">
|
|
62
|
+
<div v-bind="footerLeftAttrs">
|
|
63
63
|
<!-- @slot Use it to add something to the left side of the footer. -->
|
|
64
64
|
<slot name="footer-left" />
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
|
-
<div
|
|
67
|
+
<div v-bind="footerRightAttrs">
|
|
68
68
|
<!-- @slot Use it to add something to the right side of the footer. -->
|
|
69
69
|
<slot name="footer-right" />
|
|
70
70
|
</div>
|
|
@@ -101,16 +101,16 @@ defineOptions({ inheritAttrs: false });
|
|
|
101
101
|
|
|
102
102
|
const props = defineProps({
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Page size (width).
|
|
105
105
|
* @values xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl, wide
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
size: {
|
|
108
108
|
type: String,
|
|
109
|
-
default: getDefault(defaultConfig, UPage).
|
|
109
|
+
default: getDefault(defaultConfig, UPage).size,
|
|
110
110
|
},
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Page title.
|
|
114
114
|
*/
|
|
115
115
|
title: {
|
|
116
116
|
type: String,
|
|
@@ -118,7 +118,7 @@ const props = defineProps({
|
|
|
118
118
|
},
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Page title size.
|
|
122
122
|
* @values xs, sm, md, lg, xl, 2xl
|
|
123
123
|
*/
|
|
124
124
|
titleSize: {
|
|
@@ -137,7 +137,7 @@ const props = defineProps({
|
|
|
137
137
|
/**
|
|
138
138
|
* Back link vue-router route object.
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
backTo: {
|
|
141
141
|
type: Object,
|
|
142
142
|
default: () => ({}),
|
|
143
143
|
},
|
|
@@ -151,21 +151,13 @@ const props = defineProps({
|
|
|
151
151
|
},
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
154
|
+
* Sets background light gray (useful if the page contains nested cards).
|
|
155
155
|
*/
|
|
156
156
|
gray: {
|
|
157
157
|
type: Boolean,
|
|
158
158
|
default: getDefault(defaultConfig, UPage).gray,
|
|
159
159
|
},
|
|
160
160
|
|
|
161
|
-
/**
|
|
162
|
-
* Reverse left and right footer blocks (in a mobile version only).
|
|
163
|
-
*/
|
|
164
|
-
mobileFooterReverse: {
|
|
165
|
-
type: Boolean,
|
|
166
|
-
default: getDefault(defaultConfig, UPage).mobileFooterReverse,
|
|
167
|
-
},
|
|
168
|
-
|
|
169
161
|
/**
|
|
170
162
|
* Stick right page rounding.
|
|
171
163
|
*/
|
|
@@ -206,6 +198,7 @@ const {
|
|
|
206
198
|
descriptionAttrs,
|
|
207
199
|
headerLeftAttrs,
|
|
208
200
|
headerRightAttrs,
|
|
201
|
+
bodyAttrs,
|
|
209
202
|
footerAttrs,
|
|
210
203
|
footerLeftAttrs,
|
|
211
204
|
footerRightAttrs,
|
|
@@ -213,27 +206,22 @@ const {
|
|
|
213
206
|
hasSlotContent,
|
|
214
207
|
} = useAttrs(props, { isMobileBreakpoint });
|
|
215
208
|
|
|
216
|
-
const
|
|
217
|
-
const isHeaderLeftSlot = hasSlotContent(slots["header-left"]);
|
|
218
|
-
const isHeaderRightSlot = hasSlotContent(slots["header-right"]);
|
|
219
|
-
const isHeaderLeftBeforeSlot = hasSlotContent(slots["header-left-before"]);
|
|
220
|
-
const isHeaderLeftAfterSlot = hasSlotContent(slots["header-left-after"]);
|
|
221
|
-
|
|
209
|
+
const isExistHeader = computed(() => {
|
|
222
210
|
return (
|
|
223
211
|
props.title ||
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
212
|
+
hasSlotContent(slots["header-left"]) ||
|
|
213
|
+
hasSlotContent(slots["header-right"]) ||
|
|
214
|
+
hasSlotContent(slots["before-title"]) ||
|
|
215
|
+
hasSlotContent(slots["after-title"])
|
|
228
216
|
);
|
|
229
217
|
});
|
|
230
218
|
|
|
231
|
-
const
|
|
219
|
+
const isExistFooter = computed(() => {
|
|
232
220
|
return hasSlotContent(slots["footer-left"]) || hasSlotContent(slots["footer-right"]);
|
|
233
221
|
});
|
|
234
222
|
|
|
235
223
|
const isShownArrowButton = computed(() => {
|
|
236
|
-
return Boolean(Object.keys(props.
|
|
224
|
+
return Boolean(Object.keys(props.backTo).length);
|
|
237
225
|
});
|
|
238
226
|
|
|
239
227
|
onMounted(() => {
|
|
@@ -244,59 +232,3 @@ onMounted(() => {
|
|
|
244
232
|
document.querySelector("body").classList.add(...classes);
|
|
245
233
|
});
|
|
246
234
|
</script>
|
|
247
|
-
|
|
248
|
-
<!--style lang="postcss" scoped>
|
|
249
|
-
/**
|
|
250
|
-
* TODO: Move this styles to global vueless config using tailwind group class and remove footer classes
|
|
251
|
-
*
|
|
252
|
-
.vueless-page {
|
|
253
|
-
&-footer {
|
|
254
|
-
&-left:deep(.vueless-dropdown-button) {
|
|
255
|
-
@apply !block;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
&-right,
|
|
259
|
-
&-left {
|
|
260
|
-
:deep(.vueless-dropdown-button) {
|
|
261
|
-
.dropdown-block,
|
|
262
|
-
.vueless-dropdown-button-list {
|
|
263
|
-
@apply max-md:w-full;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.vueless-dropdown-item {
|
|
267
|
-
@apply max-md:text-center;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.dropdown-list {
|
|
271
|
-
@apply xmb-[calc(theme("spacing.mobile-menu-height")+3rem)];
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
&:deep(.vueless-dropdown-tag, .vueless-dropdown-link, .vueless-dropdown-button) {
|
|
276
|
-
@apply w-full md:w-auto;
|
|
277
|
-
|
|
278
|
-
.dropdown-wrapper-list {
|
|
279
|
-
@apply mb-2 md:mb-0;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.dropdown-block {
|
|
283
|
-
@apply relative md:absolute;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.dropdown-list-right {
|
|
287
|
-
@apply w-full text-center;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.dropdown-wrapper {
|
|
291
|
-
@apply block w-full;
|
|
292
|
-
|
|
293
|
-
.vueless-svg-icon {
|
|
294
|
-
@apply right-auto;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
*/
|
|
302
|
-
</style-->
|
|
@@ -4,7 +4,7 @@ export default /*tw*/ {
|
|
|
4
4
|
wrapper: {
|
|
5
5
|
base: "min-h-screen UNotifyPage",
|
|
6
6
|
variants: {
|
|
7
|
-
|
|
7
|
+
size: {
|
|
8
8
|
xs: "md:w-[25rem] md:max-[500px]:!w-full",
|
|
9
9
|
sm: "md:w-[31.25rem] md:max-[600px]:!w-full",
|
|
10
10
|
md: "md:w-[37.5rem] md:max-[700px]:!w-full",
|
|
@@ -43,13 +43,10 @@ export default /*tw*/ {
|
|
|
43
43
|
title: "{UHeader}",
|
|
44
44
|
description: "mt-1.5 text-base font-normal text-gray-500",
|
|
45
45
|
headerRight: "",
|
|
46
|
+
body: "",
|
|
46
47
|
footer: `mb-0 mt-14 justify-between pt-8 md:flex md:items-baseline space-y-4 md:space-y-0 border-t border-gray-200`,
|
|
47
48
|
footerLeft: "md:flex space-y-4 md:space-x-4 md:space-y-0",
|
|
48
|
-
footerRight:
|
|
49
|
-
md:flex space-y-4 md:space-x-4 md:space-y-0 group-[]/reversed-footer:flex
|
|
50
|
-
group-[]/reversed-footer:flex-col-reverse group-[]/reversed-footer:space-y-reverse
|
|
51
|
-
`,
|
|
52
|
-
footerMobileReverse: "flex flex-col-reverse space-y-reverse group/reversed-footer",
|
|
49
|
+
footerRight: "md:flex space-y-4 md:space-x-4 md:space-y-0",
|
|
53
50
|
rightRoundingWrapper: "absolute right-4",
|
|
54
51
|
rightRounding: {
|
|
55
52
|
base: "fixed top-0 w-4 rounded-r-2xl bg-white h-screen",
|
|
@@ -61,11 +58,10 @@ export default /*tw*/ {
|
|
|
61
58
|
},
|
|
62
59
|
},
|
|
63
60
|
defaults: {
|
|
64
|
-
titleSize: "
|
|
65
|
-
|
|
61
|
+
titleSize: "md",
|
|
62
|
+
size: "wide",
|
|
66
63
|
gray: false,
|
|
67
64
|
fixedRounding: false,
|
|
68
|
-
mobileFooterReverse: false,
|
|
69
65
|
/* icons */
|
|
70
66
|
backIcon: "arrow_back",
|
|
71
67
|
},
|
|
@@ -64,62 +64,46 @@ Default.args = {};
|
|
|
64
64
|
export const TitleSizeSm = DefaultTemplate.bind({});
|
|
65
65
|
TitleSizeSm.args = { titleSize: "sm" };
|
|
66
66
|
|
|
67
|
-
export const Classes = DefaultTemplate.bind({});
|
|
68
|
-
Classes.args = {
|
|
69
|
-
classes: {
|
|
70
|
-
header: "text-violet-300",
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
|
|
74
67
|
export const Description = DefaultTemplate.bind({});
|
|
75
68
|
Description.args = { description: "Page description" };
|
|
76
69
|
|
|
77
|
-
export const
|
|
78
|
-
|
|
70
|
+
export const Size = DefaultTemplate.bind({});
|
|
71
|
+
Size.args = { size: "sm", title: "size = md" };
|
|
79
72
|
|
|
80
|
-
export const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
export const BackRoute = DefaultTemplate.bind({});
|
|
84
|
-
BackRoute.args = {
|
|
73
|
+
export const BackLink = DefaultTemplate.bind({});
|
|
74
|
+
BackLink.args = {
|
|
85
75
|
backLabel: "back",
|
|
86
|
-
|
|
76
|
+
backTo: {
|
|
87
77
|
path: "/",
|
|
88
78
|
params: {},
|
|
89
79
|
},
|
|
90
80
|
};
|
|
91
81
|
|
|
92
|
-
export const
|
|
93
|
-
|
|
82
|
+
export const SlotHeaderLeft = DefaultTemplate.bind({});
|
|
83
|
+
SlotHeaderLeft.args = {
|
|
94
84
|
slotTemplate: `
|
|
95
|
-
<template #header-left
|
|
96
|
-
<
|
|
97
|
-
name="close"
|
|
98
|
-
color="gray"
|
|
99
|
-
/>
|
|
85
|
+
<template #header-left>
|
|
86
|
+
<UHeader size="lg" label="Large title" />
|
|
100
87
|
</template>
|
|
101
88
|
${defaultTemplate}
|
|
102
89
|
`,
|
|
103
90
|
};
|
|
104
91
|
|
|
105
|
-
export const
|
|
106
|
-
|
|
92
|
+
export const SlotBeforeTitle = DefaultTemplate.bind({});
|
|
93
|
+
SlotBeforeTitle.args = {
|
|
107
94
|
slotTemplate: `
|
|
108
|
-
<template #
|
|
109
|
-
<
|
|
95
|
+
<template #before-title>
|
|
96
|
+
<UIcon name="close" color="gray" />
|
|
110
97
|
</template>
|
|
111
98
|
${defaultTemplate}
|
|
112
99
|
`,
|
|
113
100
|
};
|
|
114
101
|
|
|
115
|
-
export const
|
|
116
|
-
|
|
102
|
+
export const SlotAfterTitle = DefaultTemplate.bind({});
|
|
103
|
+
SlotAfterTitle.args = {
|
|
117
104
|
slotTemplate: `
|
|
118
|
-
<template #
|
|
119
|
-
<UIcon
|
|
120
|
-
name="close"
|
|
121
|
-
color="gray"
|
|
122
|
-
/>
|
|
105
|
+
<template #after-title>
|
|
106
|
+
<UIcon name="close" color="gray" />
|
|
123
107
|
</template>
|
|
124
108
|
${defaultTemplate}
|
|
125
109
|
`,
|
|
@@ -8,9 +8,10 @@ export default function useAttrs(props, { isMobileBreakpoint }) {
|
|
|
8
8
|
const { config, getKeysAttrs, hasSlotContent, getExtendingKeysClasses } = useUI(
|
|
9
9
|
defaultConfig,
|
|
10
10
|
() => props.config,
|
|
11
|
+
"wrapper",
|
|
11
12
|
);
|
|
12
13
|
|
|
13
|
-
const extendingKeys = ["wrapperMobile"
|
|
14
|
+
const extendingKeys = ["wrapperMobile"];
|
|
14
15
|
const extendingKeysClasses = getExtendingKeysClasses(extendingKeys);
|
|
15
16
|
|
|
16
17
|
const keysAttrs = getKeysAttrs({}, extendingKeys, {
|
|
@@ -19,13 +20,6 @@ export default function useAttrs(props, { isMobileBreakpoint }) {
|
|
|
19
20
|
isMobileBreakpoint.value && !isMobileApp && extendingKeysClasses.wrapperMobile.value,
|
|
20
21
|
]),
|
|
21
22
|
},
|
|
22
|
-
footer: {
|
|
23
|
-
extend: computed(() => [
|
|
24
|
-
props.mobileFooterReverse &&
|
|
25
|
-
isMobileBreakpoint.value &&
|
|
26
|
-
extendingKeysClasses.footerMobileReverse.value,
|
|
27
|
-
]),
|
|
28
|
-
},
|
|
29
23
|
});
|
|
30
24
|
|
|
31
25
|
return {
|