vueless 0.0.391 → 0.0.392
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
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<!-- @slot Use it to customise left side of the header. -->
|
|
9
9
|
<slot name="header-left">
|
|
10
10
|
<div v-bind="headerLeftFallbackAttrs">
|
|
11
|
-
<UHeader :label="title" size="
|
|
11
|
+
<UHeader :label="title" size="xs" v-bind="titleAttrs" />
|
|
12
12
|
<div v-if="description" v-bind="descriptionAttrs" v-text="description" />
|
|
13
13
|
</div>
|
|
14
14
|
</slot>
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
<slot name="header-right" />
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
|
-
<!-- @slot Use it to add something inside. -->
|
|
25
24
|
<div v-bind="contentAttrs">
|
|
25
|
+
<!-- @slot Use it to add something inside. -->
|
|
26
26
|
<slot />
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<UDivider v-if="isShownFooter" no-
|
|
29
|
+
<UDivider v-if="isShownFooter" no-padding v-bind="dividerAttrs" />
|
|
30
30
|
|
|
31
31
|
<div v-if="isShownFooter" v-bind="footerAttrs">
|
|
32
32
|
<!-- @slot Use it to add something to the left side of the footer. -->
|
|
@@ -41,14 +41,10 @@
|
|
|
41
41
|
<script setup>
|
|
42
42
|
import { computed, useSlots } from "vue";
|
|
43
43
|
|
|
44
|
-
import { getDefault } from "../utils/utilUI.js";
|
|
45
44
|
import UHeader from "../ui.text-header/UHeader.vue";
|
|
46
45
|
import UDivider from "../ui.container-divider/UDivider.vue";
|
|
47
46
|
|
|
48
|
-
import { UCard } from "./constants.js";
|
|
49
|
-
import defaultConfig from "./config.js";
|
|
50
47
|
import useAttrs from "./useAttrs.js";
|
|
51
|
-
import useBreakpoint from "../composables/useBreakpoint.js";
|
|
52
48
|
|
|
53
49
|
defineOptions({ inheritAttrs: false });
|
|
54
50
|
|
|
@@ -71,23 +67,6 @@ const props = defineProps({
|
|
|
71
67
|
default: "",
|
|
72
68
|
},
|
|
73
69
|
|
|
74
|
-
/**
|
|
75
|
-
* Card padding.
|
|
76
|
-
* @values sm, md, lg
|
|
77
|
-
*/
|
|
78
|
-
padding: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: getDefault(defaultConfig, UCard).padding,
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Reverse left and right footer blocks (in a mobile version only).
|
|
85
|
-
*/
|
|
86
|
-
mobileFooterReverse: {
|
|
87
|
-
type: Boolean,
|
|
88
|
-
default: getDefault(defaultConfig, UCard).mobileFooterReverse,
|
|
89
|
-
},
|
|
90
|
-
|
|
91
70
|
/**
|
|
92
71
|
* Component ui config object.
|
|
93
72
|
*/
|
|
@@ -116,8 +95,6 @@ const isShownFooter = computed(() => {
|
|
|
116
95
|
return hasSlotContent(slots["footer-left"]) || hasSlotContent(slots["footer-right"]);
|
|
117
96
|
});
|
|
118
97
|
|
|
119
|
-
const { isMobileBreakpoint } = useBreakpoint();
|
|
120
|
-
|
|
121
98
|
const {
|
|
122
99
|
hasSlotContent,
|
|
123
100
|
wrapperAttrs,
|
|
@@ -129,5 +106,5 @@ const {
|
|
|
129
106
|
descriptionAttrs,
|
|
130
107
|
contentAttrs,
|
|
131
108
|
footerAttrs,
|
|
132
|
-
} = useAttrs(props
|
|
109
|
+
} = useAttrs(props);
|
|
133
110
|
</script>
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
wrapper:
|
|
3
|
-
base: "border rounded-dynamic border-gray-200 bg-white space-y-4 md:space-y-6 w-full",
|
|
4
|
-
variants: {
|
|
5
|
-
padding: {
|
|
6
|
-
sm: "p-2 md:p-4",
|
|
7
|
-
md: "p-4 md:p-6",
|
|
8
|
-
lg: "p-6 md:p-8",
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
},
|
|
2
|
+
wrapper: "p-4 md:p-5 border rounded-dynamic border-gray-200 bg-white space-y-4 w-full",
|
|
12
3
|
header: "flex justify-between",
|
|
13
|
-
headerLeft: "flex items-center
|
|
14
|
-
headerLeftFallback: "flex flex-col w-
|
|
4
|
+
headerLeft: "flex items-center gap-2 w-fit",
|
|
5
|
+
headerLeftFallback: "flex flex-col w-fit",
|
|
15
6
|
title: "{UHeader}",
|
|
16
|
-
description: "mt-1
|
|
17
|
-
content: "",
|
|
7
|
+
description: "mt-1 text-sm font-normal text-gray-500",
|
|
8
|
+
content: "text-sm",
|
|
18
9
|
divider: "{UDivider}",
|
|
19
10
|
footer: "flex justify-between",
|
|
20
|
-
footerMobileReverse: "flex flex-col-reverse space-y-reverse",
|
|
21
11
|
defaults: {
|
|
22
|
-
|
|
23
|
-
mobileFooterReverse: false,
|
|
12
|
+
//
|
|
24
13
|
},
|
|
25
14
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getArgTypes, getSlotNames, getSlotsFragment } from "../../utils/utilStorybook.js";
|
|
2
2
|
|
|
3
3
|
import UCard from "../../ui.container-card/UCard.vue";
|
|
4
|
-
import URow from "../../ui.container-row/URow.vue";
|
|
5
4
|
import UInput from "../../ui.form-input/UInput.vue";
|
|
6
5
|
import UButton from "../../ui.button/UButton.vue";
|
|
7
6
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
@@ -49,37 +48,12 @@ const DefaultTemplate = (args) => ({
|
|
|
49
48
|
`,
|
|
50
49
|
});
|
|
51
50
|
|
|
52
|
-
const EnumVariantTemplate = (args, { argTypes } = {}) => ({
|
|
53
|
-
components: { UCard, URow },
|
|
54
|
-
setup() {
|
|
55
|
-
return {
|
|
56
|
-
args,
|
|
57
|
-
options: argTypes[args.enum].options,
|
|
58
|
-
};
|
|
59
|
-
},
|
|
60
|
-
template: `
|
|
61
|
-
<URow>
|
|
62
|
-
<UCard
|
|
63
|
-
v-for="(option, index) in options"
|
|
64
|
-
:key="index"
|
|
65
|
-
v-bind="args"
|
|
66
|
-
:[args.enum]="option"
|
|
67
|
-
>
|
|
68
|
-
${defaultTemplate}
|
|
69
|
-
</UCard>
|
|
70
|
-
</URow>
|
|
71
|
-
`,
|
|
72
|
-
});
|
|
73
|
-
|
|
74
51
|
export const Default = DefaultTemplate.bind({});
|
|
75
52
|
Default.args = {};
|
|
76
53
|
|
|
77
54
|
export const Description = DefaultTemplate.bind({});
|
|
78
55
|
Description.args = { description: "Card description" };
|
|
79
56
|
|
|
80
|
-
export const Padding = EnumVariantTemplate.bind({});
|
|
81
|
-
Padding.args = { enum: "padding" };
|
|
82
|
-
|
|
83
57
|
export const SlotHeaderLeftBefore = DefaultTemplate.bind({});
|
|
84
58
|
SlotHeaderLeftBefore.args = {
|
|
85
59
|
slotTemplate: `
|
|
@@ -125,7 +99,7 @@ SlotFooterLeft.args = {
|
|
|
125
99
|
slotTemplate: `
|
|
126
100
|
${defaultTemplate}
|
|
127
101
|
<template #footer-left>
|
|
128
|
-
<UButton label="Read more" />
|
|
102
|
+
<UButton size="sm" label="Read more" />
|
|
129
103
|
</template>
|
|
130
104
|
`,
|
|
131
105
|
};
|
|
@@ -135,7 +109,7 @@ SlotFooterRight.args = {
|
|
|
135
109
|
slotTemplate: `
|
|
136
110
|
${defaultTemplate}
|
|
137
111
|
<template #footer-right>
|
|
138
|
-
<UButton label="Read more" />
|
|
112
|
+
<UButton size="sm" label="Read more" />
|
|
139
113
|
</template>
|
|
140
114
|
`,
|
|
141
115
|
};
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
import { computed } from "vue";
|
|
2
1
|
import useUI from "../composables/useUI.js";
|
|
3
2
|
|
|
4
3
|
import defaultConfig from "./config.js";
|
|
5
4
|
|
|
6
|
-
export default function useAttrs(props
|
|
7
|
-
const { config, getKeysAttrs, hasSlotContent
|
|
8
|
-
defaultConfig,
|
|
9
|
-
() => props.config,
|
|
10
|
-
);
|
|
5
|
+
export default function useAttrs(props) {
|
|
6
|
+
const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
|
|
11
7
|
|
|
12
|
-
const
|
|
13
|
-
const extendingKeysClasses = getExtendingKeysClasses(extendingKeys);
|
|
14
|
-
|
|
15
|
-
const keysAttrs = getKeysAttrs({}, extendingKeys, {
|
|
16
|
-
footer: {
|
|
17
|
-
extend: computed(() => [
|
|
18
|
-
props.mobileFooterReverse &&
|
|
19
|
-
isMobileBreakpoint.value &&
|
|
20
|
-
extendingKeysClasses.footerMobileReverse.value,
|
|
21
|
-
]),
|
|
22
|
-
},
|
|
23
|
-
});
|
|
8
|
+
const keysAttrs = getKeysAttrs();
|
|
24
9
|
|
|
25
10
|
return {
|
|
26
11
|
config,
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.392",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -1365,24 +1365,6 @@
|
|
|
1365
1365
|
},
|
|
1366
1366
|
"default": "\"\""
|
|
1367
1367
|
},
|
|
1368
|
-
{
|
|
1369
|
-
"name": "padding",
|
|
1370
|
-
"description": "Card padding.",
|
|
1371
|
-
"value": {
|
|
1372
|
-
"kind": "expression",
|
|
1373
|
-
"type": "'sm' | 'md' | 'lg'"
|
|
1374
|
-
},
|
|
1375
|
-
"default": "md"
|
|
1376
|
-
},
|
|
1377
|
-
{
|
|
1378
|
-
"name": "mobileFooterReverse",
|
|
1379
|
-
"description": "Reverse left and right footer blocks (in a mobile version only).",
|
|
1380
|
-
"value": {
|
|
1381
|
-
"kind": "expression",
|
|
1382
|
-
"type": "boolean"
|
|
1383
|
-
},
|
|
1384
|
-
"default": "false"
|
|
1385
|
-
},
|
|
1386
1368
|
{
|
|
1387
1369
|
"name": "config",
|
|
1388
1370
|
"description": "Component ui config object.",
|
|
@@ -1420,7 +1402,8 @@
|
|
|
1420
1402
|
"description": "Use it to customise right side of the header."
|
|
1421
1403
|
},
|
|
1422
1404
|
{
|
|
1423
|
-
"name": "default"
|
|
1405
|
+
"name": "default",
|
|
1406
|
+
"description": "Use it to add something inside."
|
|
1424
1407
|
},
|
|
1425
1408
|
{
|
|
1426
1409
|
"name": "footer-left",
|