aloha-vue 2.55.0 → 2.56.0
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/CHANGELOG.md +4 -0
- package/dist/aloha-vue.css +4 -15
- package/dist/aloha-vue.css.map +1 -1
- package/dist/aloha-vue.es.js +1781 -1771
- package/dist/aloha-vue.umd.js +48 -48
- package/package.json +1 -1
- package/scss/utils/acordion.scss +4 -25
- package/src/AAccordion/AAccordion.js +1 -1
- package/src/AAccordion/AAccordionItem/AAccordionItem.js +14 -2
- package/src/AAccordion/AAccordionItem/compositionAPI/AttributesAPI.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aloha-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.56.0",
|
|
4
4
|
"description": "Aloha-vue is a JavaScript library that provides a wide range of accessible components and directives for Vue.js. Accessibility is of paramount importance to us, and we have designed all our components to meet accessibility compliance criteria. This library is a valuable tool for frontend developers and has already been used in three projects, including two large-scale ones",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility compliance criteria",
|
package/scss/utils/acordion.scss
CHANGED
|
@@ -38,13 +38,6 @@ $a_accordion_button_focus_box_shadow: $a_btn_focus_box_shadow !default;
|
|
|
38
38
|
$a_accordion_button_hover_bg: var(--#{aloha.$aloha-prefix}color_gray_100) !default;
|
|
39
39
|
|
|
40
40
|
$a_accordion_icon_width: 1.25rem !default;
|
|
41
|
-
$a_accordion_icon_color: $a_accordion_button_color !default;
|
|
42
|
-
$a_accordion_icon_active_color: $a_accordion_button_active_color !default;
|
|
43
|
-
$a_accordion_icon_transition: transform .2s ease-in-out !default;
|
|
44
|
-
$a_accordion_icon_transform: rotate(-180deg) !default;
|
|
45
|
-
|
|
46
|
-
$a_accordion_button_icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$a_accordion_icon_color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>") !default;
|
|
47
|
-
$a_accordion_button_active_icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$a_accordion_icon_active_color}'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>") !default;
|
|
48
41
|
|
|
49
42
|
|
|
50
43
|
//
|
|
@@ -62,11 +55,7 @@ $a_accordion_button_active_icon: url("data:image/svg+xml,<svg xmlns='http://www
|
|
|
62
55
|
--a_accordion_btn_padding_y: #{$a_accordion_button_padding_y};
|
|
63
56
|
--a_accordion_btn_color: #{$a_accordion_color};
|
|
64
57
|
--a_accordion_btn_bg: #{$a_accordion_button_bg};
|
|
65
|
-
--a_accordion_btn_icon: #{funktions.escape-svg($a_accordion_button_icon)};
|
|
66
58
|
--a_accordion_btn_icon_width: #{$a_accordion_icon_width};
|
|
67
|
-
--a_accordion_btn_icon_transform: #{$a_accordion_icon_transform};
|
|
68
|
-
--a_accordion_btn_icon_transition: #{$a_accordion_icon_transition};
|
|
69
|
-
--a_accordion_btn_active_icon: #{funktions.escape-svg($a_accordion_button_active_icon)};
|
|
70
59
|
--a_accordion_btn_focus_border_color: #{$a_accordion_button_focus_border_color};
|
|
71
60
|
--a_accordion_btn_focus_box_shadow: #{$a_accordion_button_focus_box_shadow};
|
|
72
61
|
--a_accordion_btn_hover_bg: #{$a_accordion_button_hover_bg};
|
|
@@ -82,6 +71,7 @@ $a_accordion_button_active_icon: url("data:image/svg+xml,<svg xmlns='http://www
|
|
|
82
71
|
.#{aloha.$aloha-prefix}accordion__button {
|
|
83
72
|
position: relative;
|
|
84
73
|
display: flex;
|
|
74
|
+
gap: .5rem;
|
|
85
75
|
align-items: center;
|
|
86
76
|
width: 100%;
|
|
87
77
|
padding: var(--a_accordion_btn_padding_y) var(--a_accordion_btn_padding_x);
|
|
@@ -97,27 +87,17 @@ $a_accordion_button_active_icon: url("data:image/svg+xml,<svg xmlns='http://www
|
|
|
97
87
|
cursor: inherit;
|
|
98
88
|
}
|
|
99
89
|
|
|
100
|
-
&:not(.#{aloha.$aloha-prefix}
|
|
90
|
+
&:not(.#{aloha.$aloha-prefix}accordion__button_close) {
|
|
101
91
|
color: var(--a_accordion_active_color);
|
|
102
92
|
background-color: var(--a_accordion_active_bg);
|
|
103
93
|
box-shadow: inset 0 calc(var(--a_accordion_border_width) * -1) 0 var(--a_accordion_border_color); // stylelint-disable-line function-disallowed-list
|
|
104
|
-
|
|
105
|
-
&:not(.#{aloha.$aloha-prefix}accordion__button_has_not_caret)::after {
|
|
106
|
-
background-image: var(--a_accordion_btn_active_icon);
|
|
107
|
-
transform: var(--a_accordion_btn_icon_transform);
|
|
108
|
-
}
|
|
109
94
|
}
|
|
110
95
|
|
|
111
|
-
|
|
112
|
-
&:not(.#{aloha.$aloha-prefix}accordion__button_has_not_caret)::after {
|
|
96
|
+
.#{aloha.$aloha-prefix}accordion__button__icon {
|
|
113
97
|
flex-shrink: 0;
|
|
114
98
|
width: var(--a_accordion_btn_icon_width);
|
|
115
99
|
height: var(--a_accordion_btn_icon_width);
|
|
116
100
|
margin-left: auto;
|
|
117
|
-
content: "";
|
|
118
|
-
background-image: var(--a_accordion_btn_icon);
|
|
119
|
-
background-repeat: no-repeat;
|
|
120
|
-
background-size: var(--a_accordion_btn_icon_width);
|
|
121
101
|
}
|
|
122
102
|
|
|
123
103
|
&:hover {
|
|
@@ -159,7 +139,7 @@ $a_accordion_button_active_icon: url("data:image/svg+xml,<svg xmlns='http://www
|
|
|
159
139
|
&:last-of-type {
|
|
160
140
|
border-bottom-right-radius: var(--a_accordion_border_radius);
|
|
161
141
|
border-bottom-left-radius: var(--a_accordion_border_radius);
|
|
162
|
-
.#{aloha.$aloha-prefix}
|
|
142
|
+
.#{aloha.$aloha-prefix}accordion__button_close {
|
|
163
143
|
border-bottom-right-radius: var(--a_accordion_border_radius);
|
|
164
144
|
border-bottom-left-radius: var(--a_accordion_border_radius);
|
|
165
145
|
}
|
|
@@ -191,4 +171,3 @@ $a_accordion_button_active_icon: url("data:image/svg+xml,<svg xmlns='http://www
|
|
|
191
171
|
border-radius: var(--a_accordion_border_radius);
|
|
192
172
|
}
|
|
193
173
|
}
|
|
194
|
-
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
191
191
|
},
|
|
192
192
|
render() {
|
|
193
193
|
return h("div", {
|
|
194
|
-
class: ["a_accordion"],
|
|
194
|
+
class: ["a_accordion", { a_accordion_one_always_open: this.oneItemAlwaysOpen && !this.alwaysOpen }],
|
|
195
195
|
}, [
|
|
196
196
|
this.dataWithIds.map((item, itemIndex) => {
|
|
197
197
|
return h(AAccordionItem, {
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
withDirectives,
|
|
7
7
|
} from "vue";
|
|
8
8
|
|
|
9
|
+
import AIcon from "../../AIcon/AIcon";
|
|
10
|
+
|
|
9
11
|
import AttributesAPI from "./compositionAPI/AttributesAPI";
|
|
10
12
|
import ChildrenAPI from "./compositionAPI/ChildrenAPI";
|
|
11
13
|
import ClassAPI from "./compositionAPI/ClassAPI";
|
|
@@ -13,6 +15,8 @@ import ToggleAPI from "./compositionAPI/ToggleAPI";
|
|
|
13
15
|
import VisibleAPI from "./compositionAPI/VisibleAPI";
|
|
14
16
|
|
|
15
17
|
import ASafeHtml from "../../directives/ASafeHtml";
|
|
18
|
+
import ChevronDown from "aloha-svg/dist/js/bootstrap/ChevronDown";
|
|
19
|
+
import ChevronUp from "aloha-svg/dist/js/bootstrap/ChevronUp";
|
|
16
20
|
import {
|
|
17
21
|
AKeyId,
|
|
18
22
|
} from "../../const/AKeys";
|
|
@@ -86,6 +90,7 @@ export default {
|
|
|
86
90
|
buttonTag,
|
|
87
91
|
contentLocal,
|
|
88
92
|
idForCollapse,
|
|
93
|
+
isCaretLocal,
|
|
89
94
|
labelLocal,
|
|
90
95
|
} = AttributesAPI(props, {
|
|
91
96
|
classButtonLocal,
|
|
@@ -117,6 +122,7 @@ export default {
|
|
|
117
122
|
currentId,
|
|
118
123
|
hasChildren,
|
|
119
124
|
idForCollapse,
|
|
125
|
+
isCaretLocal,
|
|
120
126
|
isBodyVisible,
|
|
121
127
|
isOpen,
|
|
122
128
|
isRender,
|
|
@@ -137,8 +143,8 @@ export default {
|
|
|
137
143
|
parentIndexes: this.parentIndexes,
|
|
138
144
|
id: this.id,
|
|
139
145
|
currentId: this.currentId,
|
|
140
|
-
})
|
|
141
|
-
|
|
146
|
+
}) :
|
|
147
|
+
this.$slots.accordionContent ?
|
|
142
148
|
this.$slots.accordionContent({
|
|
143
149
|
item: this.item,
|
|
144
150
|
itemIndex: this.itemIndex,
|
|
@@ -174,6 +180,8 @@ export default {
|
|
|
174
180
|
"a_accordion__item",
|
|
175
181
|
{
|
|
176
182
|
a_accordion__item_with_gap: this.withGap,
|
|
183
|
+
a_accordion__item_open: this.isOpen,
|
|
184
|
+
a_accordion__item_close: !this.isOpen,
|
|
177
185
|
},
|
|
178
186
|
],
|
|
179
187
|
}, [
|
|
@@ -201,6 +209,10 @@ export default {
|
|
|
201
209
|
this.labelLocal && withDirectives(h("span"), [
|
|
202
210
|
[ASafeHtml, this.labelLocal],
|
|
203
211
|
]),
|
|
212
|
+
this.isCaretLocal && h(AIcon, {
|
|
213
|
+
class: "a_accordion__button__icon",
|
|
214
|
+
icon: this.isOpen ? ChevronUp : ChevronDown,
|
|
215
|
+
}),
|
|
204
216
|
]),
|
|
205
217
|
]),
|
|
206
218
|
h("div", {
|
|
@@ -58,7 +58,8 @@ export default function AttributesAPI(props, {
|
|
|
58
58
|
const buttonAttributes = computed(() => {
|
|
59
59
|
const ATTRIBUTES = {
|
|
60
60
|
class: ["a_accordion__button", classButton.value, classButtonLocal.value, {
|
|
61
|
-
|
|
61
|
+
a_accordion__button_open: isOpen.value,
|
|
62
|
+
a_accordion__button_close: !isOpen.value,
|
|
62
63
|
a_accordion__button_has_not_caret: !isCaretLocal.value,
|
|
63
64
|
a_accordion__button_with_gap: withGap.value,
|
|
64
65
|
readonly: readonlyLocal.value,
|
|
@@ -102,6 +103,7 @@ export default function AttributesAPI(props, {
|
|
|
102
103
|
buttonTag,
|
|
103
104
|
contentLocal,
|
|
104
105
|
idForCollapse,
|
|
106
|
+
isCaretLocal,
|
|
105
107
|
labelLocal,
|
|
106
108
|
};
|
|
107
109
|
}
|