vueless 0.0.287 → 0.0.289
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/composable.ui/index.js +3 -2
- package/constants/index.js +2 -1
- package/directive.tooltip/index.js +1 -2
- package/package.json +3 -3
- package/service.ui/index.js +3 -6
- package/ui.button/configs/default.config.js +4 -4
- package/ui.button/index.vue +1 -1
- package/ui.button-link/composables/attrs.composable.js +18 -28
- package/ui.button-link/configs/default.config.js +9 -7
- package/ui.button-link/index.stories.js +20 -1
- package/ui.button-link/index.vue +21 -28
- package/ui.button-toggle/configs/default.config.js +1 -1
- package/ui.button-toggle-item/configs/default.config.js +1 -1
- package/ui.container-accordion/configs/default.config.js +1 -1
- package/ui.container-card/configs/default.config.js +1 -1
- package/ui.container-card/index.stories.js +2 -2
- package/ui.container-col/configs/default.config.js +1 -1
- package/ui.container-divider/configs/default.config.js +1 -1
- package/ui.container-group/configs/default.config.js +1 -1
- package/ui.container-modal/configs/default.config.js +1 -1
- package/ui.container-modal/index.vue +1 -1
- package/ui.container-modal-confirm/configs/default.config.js +1 -1
- package/ui.container-page/configs/default.config.js +2 -2
- package/ui.container-page/index.stories.js +2 -2
- package/ui.container-page/index.vue +22 -11
- package/ui.container-row/configs/default.config.js +1 -1
- package/ui.data-list/configs/default.config.js +1 -1
- package/ui.data-table/configs/default.config.js +1 -1
- package/ui.data-table/index.stories.js +1 -1
- package/ui.dropdown-badge/composables/attrs.composable.js +4 -4
- package/ui.dropdown-badge/configs/default.config.js +14 -4
- package/ui.dropdown-badge/index.vue +4 -4
- package/ui.dropdown-button/composables/attrs.composable.js +4 -4
- package/ui.dropdown-button/configs/default.config.js +3 -3
- package/ui.dropdown-link/composables/attrs.composable.js +4 -4
- package/ui.dropdown-link/configs/default.config.js +3 -3
- package/ui.dropdown-list/configs/default.config.js +1 -1
- package/ui.form-calendar/configs/default.config.js +1 -1
- package/ui.form-checkbox/configs/default.config.js +1 -1
- package/ui.form-checkbox-group/configs/default.config.js +1 -1
- package/ui.form-checkbox-multi-state/configs/default.config.js +1 -1
- package/ui.form-color-picker/configs/default.config.js +1 -1
- package/ui.form-date-picker/configs/default.config.js +1 -1
- package/ui.form-date-picker-range/configs/default.config.js +1 -1
- package/ui.form-input/configs/default.config.js +1 -1
- package/ui.form-input-file/configs/default.config.js +2 -2
- package/ui.form-input-file/index.vue +14 -13
- package/ui.form-input-money/configs/default.config.js +1 -1
- package/ui.form-input-number/configs/default.config.js +1 -1
- package/ui.form-input-rating/configs/default.config.js +1 -1
- package/ui.form-input-search/configs/default.config.js +1 -1
- package/ui.form-label/configs/default.config.js +1 -1
- package/ui.form-radio/configs/default.config.js +1 -1
- package/ui.form-radio-group/configs/default.config.js +1 -1
- package/ui.form-select/composables/attrs.composable.js +10 -22
- package/ui.form-select/configs/default.config.js +7 -10
- package/ui.form-select/index.vue +37 -36
- package/ui.form-switch/configs/default.config.js +1 -1
- package/ui.form-textarea/configs/default.config.js +1 -1
- package/ui.image-avatar/configs/default.config.js +1 -1
- package/ui.image-icon/configs/default.config.js +4 -48
- package/ui.image-icon/index.stories.js +0 -3
- package/ui.image-icon/index.vue +14 -42
- package/ui.loader/configs/default.config.js +1 -1
- package/ui.loader-rendering/configs/default.config.js +1 -1
- package/ui.loader-top/configs/default.config.js +1 -1
- package/ui.navigation-pagination/configs/default.config.js +1 -1
- package/ui.navigation-progress/configs/default.config.js +1 -1
- package/ui.navigation-tab/configs/default.config.js +1 -1
- package/ui.navigation-tabs/configs/default.config.js +1 -1
- package/ui.other-dot/configs/default.config.js +1 -1
- package/ui.text-alert/configs/default.config.js +5 -8
- package/ui.text-alert/index.vue +27 -11
- package/ui.text-badge/configs/default.config.js +8 -8
- package/ui.text-badge/index.vue +3 -3
- package/ui.text-block/configs/default.config.js +1 -1
- package/ui.text-empty/configs/default.config.js +14 -4
- package/ui.text-empty/index.stories.js +0 -1
- package/ui.text-empty/index.vue +19 -10
- package/ui.text-file/configs/default.config.js +2 -2
- package/ui.text-file/index.vue +1 -1
- package/ui.text-files/configs/default.config.js +1 -1
- package/ui.text-header/configs/default.config.js +1 -1
- package/ui.text-money/configs/default.config.js +1 -1
- package/ui.text-notify/configs/default.config.js +1 -1
- package/ui.text-notify/index.vue +2 -2
- package/web-types.json +38 -46
package/composable.ui/index.js
CHANGED
|
@@ -83,7 +83,7 @@ export default function useUI(defaultConfig = {}, propsConfigGetter = null, topL
|
|
|
83
83
|
|
|
84
84
|
const configAttrs = {
|
|
85
85
|
config: configKeyValue,
|
|
86
|
-
...configKeyValue?.
|
|
86
|
+
...configKeyValue?.defaults,
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
const isTopLevelClassKey = configKey === (topLevelClassKey || firstClassKey);
|
|
@@ -192,6 +192,7 @@ function mergeConfigs({
|
|
|
192
192
|
|
|
193
193
|
const {
|
|
194
194
|
i18n,
|
|
195
|
+
defaults,
|
|
195
196
|
strategy,
|
|
196
197
|
safelist,
|
|
197
198
|
component,
|
|
@@ -217,7 +218,7 @@ function mergeConfigs({
|
|
|
217
218
|
}
|
|
218
219
|
} else if (key === strategy) {
|
|
219
220
|
config[key] = propsConfig[key] || globalConfig[key] || defaultConfig[key];
|
|
220
|
-
} else if (key === defaultVariants) {
|
|
221
|
+
} else if (key === defaults || key === defaultVariants) {
|
|
221
222
|
config[key] = { ...defaultConfig[key], ...globalConfig[key], ...propsConfig[key] };
|
|
222
223
|
} else if (key === compoundVariants) {
|
|
223
224
|
config[key] = mergeCompoundVariants({
|
package/constants/index.js
CHANGED
|
@@ -56,11 +56,12 @@ export const CVA_CONFIG_KEY = {
|
|
|
56
56
|
/* Vueless default config keys */
|
|
57
57
|
export const SYSTEM_CONFIG_KEY = {
|
|
58
58
|
i18n: "i18n",
|
|
59
|
+
defaults: "defaults",
|
|
59
60
|
strategy: "strategy",
|
|
60
61
|
safelist: "safelist",
|
|
61
62
|
component: "component",
|
|
62
|
-
safelistColors: "safelistColors",
|
|
63
63
|
transition: "transition",
|
|
64
|
+
safelistColors: "safelistColors",
|
|
64
65
|
iconName: "iconName",
|
|
65
66
|
...CVA_CONFIG_KEY,
|
|
66
67
|
};
|
|
@@ -16,14 +16,13 @@ const defaultSettings = {
|
|
|
16
16
|
theme: "light",
|
|
17
17
|
animation: "shift-away",
|
|
18
18
|
};
|
|
19
|
+
|
|
19
20
|
const mergedSettings = merge(defaultSettings, globalSettings);
|
|
20
21
|
|
|
21
22
|
tippy.setDefaultProps(mergedSettings);
|
|
22
23
|
|
|
23
24
|
export default {
|
|
24
25
|
mounted(el, bindings) {
|
|
25
|
-
if (!bindings.value.content) return;
|
|
26
|
-
|
|
27
26
|
tippy(el, merge(mergedSettings, bindings.value || {}));
|
|
28
27
|
},
|
|
29
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.289",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless Component Framework.",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@release-it/bumper": "^6.0.1",
|
|
38
38
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
39
39
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
40
|
-
"@vueless/plugin-vite": "^0.0.
|
|
40
|
+
"@vueless/plugin-vite": "^0.0.54",
|
|
41
41
|
"@vueless/storybook": "^0.0.34",
|
|
42
|
-
"@vueless/web-types": "^0.0.
|
|
42
|
+
"@vueless/web-types": "^0.0.14",
|
|
43
43
|
"autoprefixer": "^10.4.19",
|
|
44
44
|
"cssnano": "^6.1.2",
|
|
45
45
|
"eslint": "^8.55.0",
|
package/service.ui/index.js
CHANGED
|
@@ -132,14 +132,11 @@ function setFavicon(faviconPath) {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
function getDefault(defaultConfig, name) {
|
|
135
|
-
const
|
|
136
|
-
cloneDeep(defaultConfig.defaultVariants),
|
|
137
|
-
globalComponentConfig[name]?.defaultVariants,
|
|
138
|
-
);
|
|
135
|
+
const defaults = merge(cloneDeep(defaultConfig.defaults), globalComponentConfig[name]?.defaults);
|
|
139
136
|
|
|
140
|
-
|
|
137
|
+
defaults.color = getColor(defaults.color);
|
|
141
138
|
|
|
142
|
-
return
|
|
139
|
+
return defaults;
|
|
143
140
|
}
|
|
144
141
|
|
|
145
142
|
function getColor(color) {
|
|
@@ -115,9 +115,9 @@ export default /*tw*/ {
|
|
|
115
115
|
variant: "thirdary",
|
|
116
116
|
class: `
|
|
117
117
|
text-gray-900
|
|
118
|
-
hover:text-gray-800 hover:bg-white
|
|
119
|
-
focus:text-gray-800 focus:bg-white
|
|
120
|
-
active:text-gray-700 active:bg-white
|
|
118
|
+
hover:text-gray-800 hover:bg-white/15
|
|
119
|
+
focus:text-gray-800 focus:bg-white/15
|
|
120
|
+
active:text-gray-700 active:bg-white/20
|
|
121
121
|
`,
|
|
122
122
|
},
|
|
123
123
|
{ filled: true, variant: "thirdary", class: "bg-{color}-600/10" },
|
|
@@ -147,7 +147,7 @@ export default /*tw*/ {
|
|
|
147
147
|
leftIcon: "{UIcon}",
|
|
148
148
|
rightIcon: "{UIcon}",
|
|
149
149
|
centerIcon: "{UIcon}",
|
|
150
|
-
|
|
150
|
+
defaults: {
|
|
151
151
|
color: "brand",
|
|
152
152
|
variant: "primary",
|
|
153
153
|
tag: "button",
|
package/ui.button/index.vue
CHANGED
|
@@ -33,39 +33,29 @@ export default function useAttrs(props, { isActive, isExactActive }) {
|
|
|
33
33
|
if (key === "wrapper") {
|
|
34
34
|
const wrapperAttrs = attrs[`${key}Attrs`];
|
|
35
35
|
|
|
36
|
-
attrs[`${key}Attrs`] = computed(() => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(hasDefaultSlot || hasLeftSlot || hasRightSlot) && config.value.withSlots,
|
|
46
|
-
isActive.value && props.wrapperActiveClass,
|
|
47
|
-
isExactActive.value && props.wrapperExactActiveClass,
|
|
48
|
-
]),
|
|
49
|
-
};
|
|
50
|
-
});
|
|
36
|
+
attrs[`${key}Attrs`] = computed(() => ({
|
|
37
|
+
...wrapperAttrs.value,
|
|
38
|
+
class: cx([
|
|
39
|
+
wrapperAttrs.value.class,
|
|
40
|
+
hasSlotContent(slots["default"]) && config.value.withChild,
|
|
41
|
+
isActive.value && props.wrapperActiveClass,
|
|
42
|
+
isExactActive.value && props.wrapperExactActiveClass,
|
|
43
|
+
]),
|
|
44
|
+
}));
|
|
51
45
|
}
|
|
52
46
|
|
|
53
47
|
if (key === "link") {
|
|
54
48
|
const linkAttrs = attrs[`${key}Attrs`];
|
|
55
49
|
|
|
56
|
-
attrs[`${key}Attrs`] = computed(() => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
isExactActive.value && props.exactActiveClass,
|
|
66
|
-
]),
|
|
67
|
-
};
|
|
68
|
-
});
|
|
50
|
+
attrs[`${key}Attrs`] = computed(() => ({
|
|
51
|
+
...linkAttrs.value,
|
|
52
|
+
class: cx([
|
|
53
|
+
linkAttrs.value.class,
|
|
54
|
+
hasSlotContent(slots["default"]) && config.value.withChild,
|
|
55
|
+
isActive.value && props.activeClass,
|
|
56
|
+
isExactActive.value && props.exactActiveClass,
|
|
57
|
+
]),
|
|
58
|
+
}));
|
|
69
59
|
}
|
|
70
60
|
}
|
|
71
61
|
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: {
|
|
3
3
|
base: `
|
|
4
|
-
w-fit inline-flex rounded transition focus-visible:outline-none
|
|
4
|
+
w-fit inline-flex items-center rounded transition focus-visible:outline-none
|
|
5
5
|
focus-within:ring-dynamic focus-within:ring-offset-4 focus-within:ring-{color}-700/15
|
|
6
6
|
`,
|
|
7
7
|
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: "gap-1",
|
|
10
|
+
md: "gap-1",
|
|
11
|
+
lg: "gap-1.5",
|
|
12
|
+
},
|
|
8
13
|
color: {
|
|
9
14
|
grayscale: "focus-within:ring-gray-700/15",
|
|
10
15
|
white: "focus-within:ring-white/15",
|
|
@@ -22,7 +27,7 @@ export default /*tw*/ {
|
|
|
22
27
|
},
|
|
23
28
|
link: {
|
|
24
29
|
base: `
|
|
25
|
-
|
|
30
|
+
inline-block cursor-pointer !leading-none transition
|
|
26
31
|
text-{color}-600 decoration-{color}-600 underline-offset-4
|
|
27
32
|
hover:text-{color}-700 hover:decoration-{color}-700
|
|
28
33
|
focus:text-{color}-700 focus:decoration-{color}-700 focus:outline-0
|
|
@@ -56,11 +61,8 @@ export default /*tw*/ {
|
|
|
56
61
|
},
|
|
57
62
|
},
|
|
58
63
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
leftSlot: "mr-1",
|
|
62
|
-
rightSlot: "ml-1",
|
|
63
|
-
defaultVariants: {
|
|
64
|
+
withChild: "flex items-center no-underline hover:no-underline focus-within:ring-0 focus-within:ring-offset-0",
|
|
65
|
+
defaults: {
|
|
64
66
|
color: "brand",
|
|
65
67
|
type: "link",
|
|
66
68
|
size: "md",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import ULink from "../ui.button-link";
|
|
4
|
+
import UIcon from "../ui.image-icon";
|
|
4
5
|
import UButton from "../ui.button";
|
|
5
6
|
import URow from "../ui.container-row";
|
|
6
7
|
|
|
@@ -21,7 +22,7 @@ export default {
|
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
const DefaultTemplate = (args) => ({
|
|
24
|
-
components: { ULink, UButton },
|
|
25
|
+
components: { ULink, UButton, UIcon },
|
|
25
26
|
setup() {
|
|
26
27
|
const slots = getSlotNames(ULink.name);
|
|
27
28
|
|
|
@@ -106,3 +107,21 @@ slotDefault.args = {
|
|
|
106
107
|
</template>
|
|
107
108
|
`,
|
|
108
109
|
};
|
|
110
|
+
|
|
111
|
+
export const slotLeft = DefaultTemplate.bind({});
|
|
112
|
+
slotLeft.args = {
|
|
113
|
+
slotTemplate: `
|
|
114
|
+
<template #left>
|
|
115
|
+
<UIcon name="star" size="xs" />
|
|
116
|
+
</template>
|
|
117
|
+
`,
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const slotRight = DefaultTemplate.bind({});
|
|
121
|
+
slotRight.args = {
|
|
122
|
+
slotTemplate: `
|
|
123
|
+
<template #right>
|
|
124
|
+
<UIcon name="star" size="xs" />
|
|
125
|
+
</template>
|
|
126
|
+
`,
|
|
127
|
+
};
|
package/ui.button-link/index.vue
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-bind="wrapperAttrs" ref="wrapperRef" tabindex="-1">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<slot name="left" />
|
|
6
|
-
</div>
|
|
3
|
+
<!-- @slot Use it to add something before the label. -->
|
|
4
|
+
<slot name="left" />
|
|
7
5
|
|
|
8
6
|
<router-link
|
|
9
7
|
v-if="isPresentRoute"
|
|
10
8
|
:to="route"
|
|
11
9
|
:target="targetValue"
|
|
12
|
-
:data-test="dataTest"
|
|
13
10
|
v-bind="linkAttrs"
|
|
11
|
+
:data-test="dataTest"
|
|
14
12
|
tabindex="0"
|
|
15
13
|
@blur="onBlur"
|
|
16
14
|
@focus="onFocus"
|
|
@@ -18,18 +16,18 @@
|
|
|
18
16
|
@keydown="onKeydown"
|
|
19
17
|
@mouseover="onMouseover"
|
|
20
18
|
>
|
|
21
|
-
<!-- @slot Use it replace the
|
|
19
|
+
<!-- @slot Use it replace the label. -->
|
|
22
20
|
<slot>
|
|
23
|
-
|
|
21
|
+
{{ label }}
|
|
24
22
|
</slot>
|
|
25
23
|
</router-link>
|
|
26
24
|
|
|
27
25
|
<a
|
|
28
26
|
v-else
|
|
29
|
-
:href="
|
|
27
|
+
:href="prefixedHref"
|
|
30
28
|
:target="targetValue"
|
|
31
|
-
:data-test="dataTest"
|
|
32
29
|
v-bind="linkAttrs"
|
|
30
|
+
:data-test="dataTest"
|
|
33
31
|
tabindex="0"
|
|
34
32
|
@blur="onBlur"
|
|
35
33
|
@focus="onFocus"
|
|
@@ -37,16 +35,12 @@
|
|
|
37
35
|
@keydown="onKeydown"
|
|
38
36
|
@mouseover="onMouseover"
|
|
39
37
|
>
|
|
40
|
-
<!-- @slot Use it replace the
|
|
41
|
-
<slot>
|
|
42
|
-
<span v-if="!hasSlotContent($slots['default'])" v-bind="textAttrs" v-text="label" />
|
|
43
|
-
</slot>
|
|
38
|
+
<!-- @slot Use it replace the label. -->
|
|
39
|
+
<slot>{{ label }}</slot>
|
|
44
40
|
</a>
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<slot name="right" />
|
|
49
|
-
</div>
|
|
42
|
+
<!-- @slot Use it to add something after the label. -->
|
|
43
|
+
<slot name="right" />
|
|
50
44
|
</div>
|
|
51
45
|
</template>
|
|
52
46
|
|
|
@@ -99,17 +93,17 @@ const props = defineProps({
|
|
|
99
93
|
},
|
|
100
94
|
|
|
101
95
|
/**
|
|
102
|
-
* Link url.
|
|
96
|
+
* Link href url.
|
|
103
97
|
*/
|
|
104
|
-
|
|
98
|
+
href: {
|
|
105
99
|
type: String,
|
|
106
100
|
default: "",
|
|
107
101
|
},
|
|
108
102
|
|
|
109
103
|
/**
|
|
110
|
-
* Vue route object.
|
|
104
|
+
* Vue-router route object.
|
|
111
105
|
*/
|
|
112
|
-
|
|
106
|
+
to: {
|
|
113
107
|
type: Object,
|
|
114
108
|
default: () => ({}),
|
|
115
109
|
},
|
|
@@ -142,7 +136,7 @@ const props = defineProps({
|
|
|
142
136
|
},
|
|
143
137
|
|
|
144
138
|
/**
|
|
145
|
-
* Open link in new
|
|
139
|
+
* Open link in the new tab.
|
|
146
140
|
*/
|
|
147
141
|
targetBlank: {
|
|
148
142
|
type: Boolean,
|
|
@@ -263,7 +257,7 @@ const props = defineProps({
|
|
|
263
257
|
});
|
|
264
258
|
|
|
265
259
|
const isPresentRoute = computed(() => {
|
|
266
|
-
for (let key in props.
|
|
260
|
+
for (let key in props.to) return true;
|
|
267
261
|
|
|
268
262
|
return false;
|
|
269
263
|
});
|
|
@@ -274,28 +268,27 @@ const { route, isActive, isExactActive } = useLink({
|
|
|
274
268
|
exactActiveClass: props.exactActiveClass,
|
|
275
269
|
custom: props.custom,
|
|
276
270
|
replace: props.replace,
|
|
277
|
-
to: isPresentRoute.value ? props.
|
|
271
|
+
to: isPresentRoute.value ? props.to : "/",
|
|
278
272
|
});
|
|
279
273
|
|
|
280
274
|
const wrapperRef = ref(null);
|
|
281
275
|
|
|
282
276
|
defineExpose({ wrapperRef });
|
|
283
277
|
|
|
284
|
-
const { wrapperAttrs, linkAttrs
|
|
285
|
-
useAttrs(props, { isActive, isExactActive });
|
|
278
|
+
const { wrapperAttrs, linkAttrs } = useAttrs(props, { isActive, isExactActive });
|
|
286
279
|
|
|
287
280
|
const targetValue = computed(() => {
|
|
288
281
|
return props.targetBlank ? "_blank" : "_self";
|
|
289
282
|
});
|
|
290
283
|
|
|
291
|
-
const
|
|
284
|
+
const prefixedHref = computed(() => {
|
|
292
285
|
const types = {
|
|
293
286
|
phone: "tel:",
|
|
294
287
|
email: "mailto:",
|
|
295
288
|
link: "",
|
|
296
289
|
};
|
|
297
290
|
|
|
298
|
-
return props.
|
|
291
|
+
return props.href ? `${types[props.type]}${props.href}` : null;
|
|
299
292
|
});
|
|
300
293
|
|
|
301
294
|
function onClick(event) {
|
|
@@ -84,7 +84,7 @@ export const slotHeaderLeftBefore = DefaultTemplate.bind({});
|
|
|
84
84
|
slotHeaderLeftBefore.args = {
|
|
85
85
|
slotTemplate: `
|
|
86
86
|
<template #header-left-before>
|
|
87
|
-
<UIcon name="star" size="sm"
|
|
87
|
+
<UIcon name="star" size="sm" />
|
|
88
88
|
</template>
|
|
89
89
|
${defaultTemplate}
|
|
90
90
|
`,
|
|
@@ -104,7 +104,7 @@ export const slotHeaderLeftAfter = DefaultTemplate.bind({});
|
|
|
104
104
|
slotHeaderLeftAfter.args = {
|
|
105
105
|
slotTemplate: `
|
|
106
106
|
<template #header-left-after>
|
|
107
|
-
<UIcon name="star" size="sm"
|
|
107
|
+
<UIcon name="star" size="sm" />
|
|
108
108
|
</template>
|
|
109
109
|
${defaultTemplate}
|
|
110
110
|
`,
|
|
@@ -38,7 +38,7 @@ export default /*tw*/ {
|
|
|
38
38
|
header: "flex items-start justify-between mb-4 md:mb-6",
|
|
39
39
|
headerLeft: "flex items-center space-x-4",
|
|
40
40
|
headerLeftFallback: "flex flex-col",
|
|
41
|
-
backLink: "{ULink}
|
|
41
|
+
backLink: "{ULink}",
|
|
42
42
|
backLinkIcon: "{UIcon}",
|
|
43
43
|
backLinkIconName: "arrow_back",
|
|
44
44
|
title: "{UHeader}",
|
|
@@ -61,7 +61,7 @@ export default /*tw*/ {
|
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
defaults: {
|
|
65
65
|
titleSize: "lg",
|
|
66
66
|
width: "wide",
|
|
67
67
|
gray: false,
|
|
@@ -14,19 +14,22 @@
|
|
|
14
14
|
<div v-bind="headerLeftFallbackAttrs">
|
|
15
15
|
<ULink
|
|
16
16
|
v-if="isShownArrowButton"
|
|
17
|
-
|
|
17
|
+
no-ring
|
|
18
|
+
size="sm"
|
|
18
19
|
color="gray"
|
|
19
|
-
:
|
|
20
|
+
:to="backRoute"
|
|
21
|
+
:label="backLabel"
|
|
20
22
|
v-bind="backLinkAttrs"
|
|
21
23
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
<template #left>
|
|
25
|
+
<UIcon
|
|
26
|
+
internal
|
|
27
|
+
size="xs"
|
|
28
|
+
color="gray"
|
|
29
|
+
:name="config.backLinkIconName"
|
|
30
|
+
v-bind="backLinkIconAttrs"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
30
33
|
</ULink>
|
|
31
34
|
|
|
32
35
|
<UHeader :label="title" :size="titleSize" v-bind="titleAttrs" />
|
|
@@ -133,13 +136,21 @@ const props = defineProps({
|
|
|
133
136
|
},
|
|
134
137
|
|
|
135
138
|
/**
|
|
136
|
-
*
|
|
139
|
+
* Back link vue-router route object.
|
|
137
140
|
*/
|
|
138
141
|
backRoute: {
|
|
139
142
|
type: Object,
|
|
140
143
|
default: () => ({}),
|
|
141
144
|
},
|
|
142
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Back link label.
|
|
148
|
+
*/
|
|
149
|
+
backLabel: {
|
|
150
|
+
type: String,
|
|
151
|
+
default: "",
|
|
152
|
+
},
|
|
153
|
+
|
|
143
154
|
/**
|
|
144
155
|
* Set gray background color.
|
|
145
156
|
*/
|
|
@@ -366,7 +366,7 @@ cellSlots.args = {
|
|
|
366
366
|
</template>
|
|
367
367
|
|
|
368
368
|
<template #cell-email="{ value }">
|
|
369
|
-
<ULink :label="value" :url="value" type="email"
|
|
369
|
+
<ULink :label="value" :url="value" type="email" />
|
|
370
370
|
</template>
|
|
371
371
|
|
|
372
372
|
<template #cell-tags="{ value }">
|