vueless 0.0.390 → 0.0.391
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.button-link/config.js +1 -1
- package/ui.button-link/useAttrs.js +4 -3
- package/ui.container-accordion/UAccordion.vue +9 -15
- package/ui.container-accordion/config.js +2 -2
- package/ui.container-accordion/storybook/stories.js +3 -3
- package/ui.container-accordion/useAttrs.js +2 -2
- package/web-types.json +11 -13
package/package.json
CHANGED
package/ui.button-link/config.js
CHANGED
|
@@ -61,7 +61,7 @@ export default /*tw*/ {
|
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
linkWithChild: "flex items-center no-underline hover:no-underline focus-within:ring-0 focus-within:ring-offset-0",
|
|
65
65
|
defaults: {
|
|
66
66
|
color: "brand",
|
|
67
67
|
type: "link",
|
|
@@ -7,23 +7,24 @@ export default function useAttrs(props, { isActive, isExactActive }) {
|
|
|
7
7
|
const { config, getKeysAttrs, hasSlotContent, getExtendingKeysClasses } = useUI(
|
|
8
8
|
defaultConfig,
|
|
9
9
|
() => props.config,
|
|
10
|
+
"link",
|
|
10
11
|
);
|
|
11
12
|
const slots = useSlots();
|
|
12
13
|
|
|
13
|
-
const extendingKeys = ["
|
|
14
|
+
const extendingKeys = ["linkWithChild"];
|
|
14
15
|
const extendingKeysClasses = getExtendingKeysClasses(extendingKeys);
|
|
15
16
|
|
|
16
17
|
const keysAttrs = getKeysAttrs({}, extendingKeys, {
|
|
17
18
|
wrapper: {
|
|
18
19
|
extend: computed(() => [
|
|
19
|
-
hasSlotContent(slots["default"]) && extendingKeysClasses.
|
|
20
|
+
hasSlotContent(slots["default"]) && extendingKeysClasses.linkWithChild.value,
|
|
20
21
|
isActive.value && props.wrapperActiveClass,
|
|
21
22
|
isExactActive.value && props.wrapperExactActiveClass,
|
|
22
23
|
]),
|
|
23
24
|
},
|
|
24
25
|
link: {
|
|
25
26
|
extend: computed(() => [
|
|
26
|
-
hasSlotContent(slots["default"]) && extendingKeysClasses.
|
|
27
|
+
hasSlotContent(slots["default"]) && extendingKeysClasses.linkWithChild.value,
|
|
27
28
|
isActive.value && props.activeClass,
|
|
28
29
|
isExactActive.value && props.exactActiveClass,
|
|
29
30
|
]),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :data-test="dataTest" v-bind="wrapperAttrs" @click="onClickItem">
|
|
3
3
|
<div v-bind="bodyAttrs">
|
|
4
|
-
<div v-bind="
|
|
5
|
-
{{
|
|
4
|
+
<div v-bind="labelAttrs">
|
|
5
|
+
{{ label }}
|
|
6
6
|
<!--
|
|
7
7
|
@slot Use it to add something instead of the toggle icon.
|
|
8
|
+
@binding {string} icon-name
|
|
8
9
|
@binding {string} icon-size
|
|
9
10
|
@binding {boolean} opened
|
|
10
11
|
-->
|
|
@@ -35,9 +36,9 @@ defineOptions({ inheritAttrs: false });
|
|
|
35
36
|
|
|
36
37
|
const props = defineProps({
|
|
37
38
|
/**
|
|
38
|
-
* Accordion
|
|
39
|
+
* Accordion label.
|
|
39
40
|
*/
|
|
40
|
-
|
|
41
|
+
label: {
|
|
41
42
|
type: String,
|
|
42
43
|
required: true,
|
|
43
44
|
},
|
|
@@ -50,14 +51,6 @@ const props = defineProps({
|
|
|
50
51
|
required: true,
|
|
51
52
|
},
|
|
52
53
|
|
|
53
|
-
/**
|
|
54
|
-
* Unique block name.
|
|
55
|
-
*/
|
|
56
|
-
name: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: "",
|
|
59
|
-
},
|
|
60
|
-
|
|
61
54
|
/**
|
|
62
55
|
* Accordion size.
|
|
63
56
|
* @values sm, md, lg
|
|
@@ -87,7 +80,8 @@ const props = defineProps({
|
|
|
87
80
|
const emit = defineEmits([
|
|
88
81
|
/**
|
|
89
82
|
* Triggers when the accordion item is toggled.
|
|
90
|
-
* @property {string}
|
|
83
|
+
* @property {string} elementId
|
|
84
|
+
* @property {boolean} isOpened
|
|
91
85
|
*/
|
|
92
86
|
"click",
|
|
93
87
|
]);
|
|
@@ -101,7 +95,7 @@ const {
|
|
|
101
95
|
wrapperAttrs,
|
|
102
96
|
descriptionAttrs,
|
|
103
97
|
bodyAttrs,
|
|
104
|
-
|
|
98
|
+
labelAttrs,
|
|
105
99
|
toggleIconAttrs,
|
|
106
100
|
dividerAttrs,
|
|
107
101
|
} = useAttrs(props, { isOpened });
|
|
@@ -123,6 +117,6 @@ const dividerSize = computed(() => {
|
|
|
123
117
|
function onClickItem() {
|
|
124
118
|
isOpened.value = !isOpened.value;
|
|
125
119
|
|
|
126
|
-
emit("click",
|
|
120
|
+
emit("click", elementId, isOpened.value);
|
|
127
121
|
}
|
|
128
122
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: "group cursor-pointer",
|
|
3
3
|
body: "",
|
|
4
|
-
|
|
4
|
+
label: {
|
|
5
5
|
base: "flex items-center justify-between font-medium text-gray-900",
|
|
6
6
|
variants: {
|
|
7
7
|
size: {
|
|
@@ -21,7 +21,7 @@ export default /*tw*/ {
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
descriptionShown: "pt-2 h-fit opacity-100",
|
|
25
25
|
toggleIcon: "{UIcon}",
|
|
26
26
|
divider: "{UDivider} group-last:hidden",
|
|
27
27
|
defaults: {
|
|
@@ -14,19 +14,19 @@ export default {
|
|
|
14
14
|
accordions: [
|
|
15
15
|
{
|
|
16
16
|
name: "Excellence",
|
|
17
|
-
|
|
17
|
+
label: "Excellence by necessity",
|
|
18
18
|
description: `As creators and maintainers of the technologies you are using,
|
|
19
19
|
our services are here to showcase the full power of our softwares.`,
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
name: "Innovation",
|
|
23
|
-
|
|
23
|
+
label: "Driving innovation forward",
|
|
24
24
|
description: `All the people that will be involved in delivering your project are contributing
|
|
25
25
|
to the technologies you are using, when they are not the creators themselves.`,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
name: "Collaboration",
|
|
29
|
-
|
|
29
|
+
label: "Fostering collaboration",
|
|
30
30
|
description: `By working with us, you are directly supporting the open source community,
|
|
31
31
|
ensuring the ecosystem continuity and enabling Nuxt development.`,
|
|
32
32
|
},
|
|
@@ -9,12 +9,12 @@ export default function useAttrs(props, { isOpened }) {
|
|
|
9
9
|
() => props.config,
|
|
10
10
|
);
|
|
11
11
|
|
|
12
|
-
const extendingKeys = ["
|
|
12
|
+
const extendingKeys = ["descriptionShown"];
|
|
13
13
|
const extendingKeysClasses = getExtendingKeysClasses(extendingKeys);
|
|
14
14
|
|
|
15
15
|
const keysAttrs = getKeysAttrs({}, extendingKeys, {
|
|
16
16
|
description: {
|
|
17
|
-
extend: computed(() => [isOpened.value && extendingKeysClasses.
|
|
17
|
+
extend: computed(() => [isOpened.value && extendingKeysClasses.descriptionShown.value]),
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
|
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.391",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"description": "",
|
|
64
64
|
"attributes": [
|
|
65
65
|
{
|
|
66
|
-
"name": "
|
|
66
|
+
"name": "label",
|
|
67
67
|
"required": true,
|
|
68
|
-
"description": "Accordion
|
|
68
|
+
"description": "Accordion label.",
|
|
69
69
|
"value": {
|
|
70
70
|
"kind": "expression",
|
|
71
71
|
"type": "string"
|
|
@@ -80,15 +80,6 @@
|
|
|
80
80
|
"type": "string"
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
{
|
|
84
|
-
"name": "name",
|
|
85
|
-
"description": "Unique block name.",
|
|
86
|
-
"value": {
|
|
87
|
-
"kind": "expression",
|
|
88
|
-
"type": "string"
|
|
89
|
-
},
|
|
90
|
-
"default": "\"\""
|
|
91
|
-
},
|
|
92
83
|
{
|
|
93
84
|
"name": "size",
|
|
94
85
|
"description": "Accordion size.",
|
|
@@ -126,7 +117,13 @@
|
|
|
126
117
|
"type": [
|
|
127
118
|
"string"
|
|
128
119
|
],
|
|
129
|
-
"name": "
|
|
120
|
+
"name": "elementId"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": [
|
|
124
|
+
"boolean"
|
|
125
|
+
],
|
|
126
|
+
"name": "isOpened"
|
|
130
127
|
}
|
|
131
128
|
]
|
|
132
129
|
}
|
|
@@ -138,6 +135,7 @@
|
|
|
138
135
|
"description": "Use it to add something instead of the toggle icon.",
|
|
139
136
|
"bindings": [
|
|
140
137
|
{
|
|
138
|
+
"type": "string",
|
|
141
139
|
"name": "icon-name"
|
|
142
140
|
},
|
|
143
141
|
{
|