aloha-vue 1.2.273 → 1.2.275

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 CHANGED
@@ -7,6 +7,14 @@
7
7
  ---
8
8
  # Versions
9
9
 
10
+ ## 1.2.275
11
+
12
+ - Improved the `AModal` component by managing `z-index` for multiple modal windows, ensuring proper stacking order.
13
+
14
+ ## 1.2.274
15
+
16
+ - Added translations for the `ARequired` component to support multiple languages.
17
+
10
18
  ## 1.2.273
11
19
 
12
20
  - Added `text-break` `CSS` styling to the `AModal` component to improve text handling and prevent overflow issues.
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.273",
17
+ "version": "1.2.275",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -1,272 +1,272 @@
1
- import {
2
- h,
3
- } from "vue";
4
-
5
- import AButton from "../AButton/AButton";
6
- import ATranslation from "../ATranslation/ATranslation";
7
-
8
- import BtnAttributesAPI from "./compositionAPI/BtnAttributesAPI";
9
- import IsOpenAPI from "./compositionAPI/IsOpenAPI";
10
- import TextOrHtmlAPI from "./compositionAPI/TextOrHtmlAPI";
11
- import ToggleAPI from "./compositionAPI/ToggleAPI";
12
-
13
- import {
14
- uniqueId,
15
- } from "lodash-es";
16
-
17
- // @vue/component
18
- export default {
19
- name: "ADisclosure",
20
- inheritAttrs: true,
21
- props: {
22
- alwaysTranslate: {
23
- type: Boolean,
24
- required: false,
25
- },
26
- btnAttributes: {
27
- type: Object,
28
- required: false,
29
- default: () => ({}),
30
- },
31
- btnClass: {
32
- type: [String, Object],
33
- required: false,
34
- default: "a_btn a_btn_link a_p_0",
35
- },
36
- btnIconLeftLess: {
37
- type: String,
38
- required: false,
39
- default: undefined,
40
- },
41
- btnIconLeftMore: {
42
- type: String,
43
- required: false,
44
- default: undefined,
45
- },
46
- btnIconRightLess: {
47
- type: String,
48
- required: false,
49
- default: undefined,
50
- },
51
- btnIconRightMore: {
52
- type: String,
53
- required: false,
54
- default: undefined,
55
- },
56
- btnId: {
57
- type: String,
58
- required: false,
59
- default: undefined,
60
- },
61
- btnParentClass: {
62
- type: String,
63
- required: false,
64
- default: "a_text_center",
65
- },
66
- btnTextLess: {
67
- type: String,
68
- required: false,
69
- default: "_A_DISCLOSURE_LESS_",
70
- },
71
- btnTextMore: {
72
- type: String,
73
- required: false,
74
- default: "_A_DISCLOSURE_MORE_",
75
- },
76
- btnTitleLess: {
77
- type: String,
78
- required: false,
79
- default: undefined,
80
- },
81
- btnTitleMore: {
82
- type: String,
83
- required: false,
84
- default: undefined,
85
- },
86
- btnTitlePlacement: {
87
- type: String,
88
- required: false,
89
- default: undefined,
90
- },
91
- disabled: {
92
- type: Boolean,
93
- required: false,
94
- default: false,
95
- },
96
- htmlLess: {
97
- type: String,
98
- required: false,
99
- default: undefined,
100
- },
101
- htmlMore: {
102
- type: String,
103
- required: false,
104
- default: undefined,
105
- },
106
- id: {
107
- type: String,
108
- required: false,
109
- default: () => uniqueId("a_disclosure_"),
110
- },
111
- isBtnTitleHtml: {
112
- type: Boolean,
113
- required: false,
114
- },
115
- isOpenDefault: {
116
- type: Boolean,
117
- required: false,
118
- default: false,
119
- },
120
- safeHtmlLess: {
121
- type: String,
122
- required: false,
123
- default: undefined,
124
- },
125
- safeHtmlMore: {
126
- type: String,
127
- required: false,
128
- default: undefined,
129
- },
130
- showLess: {
131
- type: Boolean,
132
- required: false,
133
- default: true,
134
- },
135
- textLess: {
136
- type: String,
137
- required: false,
138
- default: undefined,
139
- },
140
- textMore: {
141
- type: String,
142
- required: false,
143
- default: undefined,
144
- },
145
- },
146
- emits: [
147
- "toggle",
148
- ],
149
- setup(props, context) {
150
- const {
151
- expose,
152
- } = context;
153
-
154
- const {
155
- isOpen,
156
- } = IsOpenAPI(props);
157
-
158
- const {
159
- htmlLocal,
160
- isTextOrHtmlVisible,
161
- safeHtmlLocal,
162
- textLocal,
163
- } = TextOrHtmlAPI(props, {
164
- isOpen,
165
- });
166
-
167
- const {
168
- containerRef,
169
- toggleButton,
170
- } = ToggleAPI(props, context, {
171
- isOpen,
172
- });
173
-
174
- const {
175
- btnIconLeft,
176
- btnIconRight,
177
- btnText,
178
- btnTitle,
179
- buttonRef,
180
- isButtonVisible,
181
- } = BtnAttributesAPI(props, {
182
- isOpen,
183
- });
184
-
185
- expose({
186
- buttonRef,
187
- containerRef,
188
- isOpen,
189
- toggleButton,
190
- });
191
-
192
- return {
193
- btnIconLeft,
194
- btnIconRight,
195
- btnText,
196
- btnTitle,
197
- buttonRef,
198
- containerRef,
199
- htmlLocal,
200
- isButtonVisible,
201
- isOpen,
202
- isTextOrHtmlVisible,
203
- safeHtmlLocal,
204
- textLocal,
205
- toggleButton,
206
- };
207
- },
208
- render() {
209
- return h("div", {
210
- class: [
211
- "a_show_more",
212
- {
213
- a_show_more_open: this.isOpen,
214
- },
215
- ],
216
- }, [
217
- h("div", {
218
- class: "a_show_more__wrapper",
219
- }, [
220
- h("div", {
221
- ref: "containerRef",
222
- id: this.id,
223
- ariaExpanded: this.isOpen,
224
- ...this.$attrs,
225
- }, [
226
- this.isTextOrHtmlVisible && h(ATranslation, {
227
- alwaysTranslate: this.alwaysTranslate,
228
- html: this.htmlLocal,
229
- safeHtml: this.safeHtmlLocal,
230
- tag: "div",
231
- text: this.textLocal,
232
- }),
233
- this.isOpen ?
234
- this.$slots.more && this.$slots.more({
235
- isButtonVisible: this.isButtonVisible,
236
- isOpen: this.isOpen,
237
- }) :
238
- this.$slots.less && this.$slots.less({
239
- isButtonVisible: this.isButtonVisible,
240
- isOpen: this.isOpen,
241
- }),
242
- ]),
243
- ]),
244
- this.isButtonVisible && h("div", {
245
- class: this.btnParentClass,
246
- }, [
247
- h(AButton, {
248
- ref: "buttonRef",
249
- id: this.btnId,
250
- alwaysTranslate: this.alwaysTranslate,
251
- "aria-controls": this.id,
252
- class: [
253
- "a_show_more__button",
254
- this.btnClass,
255
- ],
256
- disabled: this.disabled,
257
- iconLeft: this.btnIconLeft,
258
- iconRight: this.btnIconRight,
259
- isTitleHtml: this.isBtnTitleHtml,
260
- text: this.btnText,
261
- title: this.btnTitle,
262
- titlePlacement: this.btnTitlePlacement,
263
- ...this.btnAttributes,
264
- onClick: this.toggleButton,
265
- }, () => this.$slots.button && this.$slots.button({
266
- isButtonVisible: this.isButtonVisible,
267
- isOpen: this.isOpen,
268
- })),
269
- ]),
270
- ]);
271
- },
272
- };
1
+ import {
2
+ h,
3
+ } from "vue";
4
+
5
+ import AButton from "../AButton/AButton";
6
+ import ATranslation from "../ATranslation/ATranslation";
7
+
8
+ import BtnAttributesAPI from "./compositionAPI/BtnAttributesAPI";
9
+ import IsOpenAPI from "./compositionAPI/IsOpenAPI";
10
+ import TextOrHtmlAPI from "./compositionAPI/TextOrHtmlAPI";
11
+ import ToggleAPI from "./compositionAPI/ToggleAPI";
12
+
13
+ import {
14
+ uniqueId,
15
+ } from "lodash-es";
16
+
17
+ // @vue/component
18
+ export default {
19
+ name: "ADisclosure",
20
+ inheritAttrs: true,
21
+ props: {
22
+ alwaysTranslate: {
23
+ type: Boolean,
24
+ required: false,
25
+ },
26
+ btnAttributes: {
27
+ type: Object,
28
+ required: false,
29
+ default: () => ({}),
30
+ },
31
+ btnClass: {
32
+ type: [String, Object],
33
+ required: false,
34
+ default: "a_btn a_btn_link a_p_0",
35
+ },
36
+ btnIconLeftLess: {
37
+ type: String,
38
+ required: false,
39
+ default: undefined,
40
+ },
41
+ btnIconLeftMore: {
42
+ type: String,
43
+ required: false,
44
+ default: undefined,
45
+ },
46
+ btnIconRightLess: {
47
+ type: String,
48
+ required: false,
49
+ default: undefined,
50
+ },
51
+ btnIconRightMore: {
52
+ type: String,
53
+ required: false,
54
+ default: undefined,
55
+ },
56
+ btnId: {
57
+ type: String,
58
+ required: false,
59
+ default: undefined,
60
+ },
61
+ btnParentClass: {
62
+ type: String,
63
+ required: false,
64
+ default: "a_text_center",
65
+ },
66
+ btnTextLess: {
67
+ type: String,
68
+ required: false,
69
+ default: "_A_DISCLOSURE_LESS_",
70
+ },
71
+ btnTextMore: {
72
+ type: String,
73
+ required: false,
74
+ default: "_A_DISCLOSURE_MORE_",
75
+ },
76
+ btnTitleLess: {
77
+ type: String,
78
+ required: false,
79
+ default: undefined,
80
+ },
81
+ btnTitleMore: {
82
+ type: String,
83
+ required: false,
84
+ default: undefined,
85
+ },
86
+ btnTitlePlacement: {
87
+ type: String,
88
+ required: false,
89
+ default: undefined,
90
+ },
91
+ disabled: {
92
+ type: Boolean,
93
+ required: false,
94
+ default: false,
95
+ },
96
+ htmlLess: {
97
+ type: String,
98
+ required: false,
99
+ default: undefined,
100
+ },
101
+ htmlMore: {
102
+ type: String,
103
+ required: false,
104
+ default: undefined,
105
+ },
106
+ id: {
107
+ type: String,
108
+ required: false,
109
+ default: () => uniqueId("a_disclosure_"),
110
+ },
111
+ isBtnTitleHtml: {
112
+ type: Boolean,
113
+ required: false,
114
+ },
115
+ isOpenDefault: {
116
+ type: Boolean,
117
+ required: false,
118
+ default: false,
119
+ },
120
+ safeHtmlLess: {
121
+ type: String,
122
+ required: false,
123
+ default: undefined,
124
+ },
125
+ safeHtmlMore: {
126
+ type: String,
127
+ required: false,
128
+ default: undefined,
129
+ },
130
+ showLess: {
131
+ type: Boolean,
132
+ required: false,
133
+ default: true,
134
+ },
135
+ textLess: {
136
+ type: String,
137
+ required: false,
138
+ default: undefined,
139
+ },
140
+ textMore: {
141
+ type: String,
142
+ required: false,
143
+ default: undefined,
144
+ },
145
+ },
146
+ emits: [
147
+ "toggle",
148
+ ],
149
+ setup(props, context) {
150
+ const {
151
+ expose,
152
+ } = context;
153
+
154
+ const {
155
+ isOpen,
156
+ } = IsOpenAPI(props);
157
+
158
+ const {
159
+ htmlLocal,
160
+ isTextOrHtmlVisible,
161
+ safeHtmlLocal,
162
+ textLocal,
163
+ } = TextOrHtmlAPI(props, {
164
+ isOpen,
165
+ });
166
+
167
+ const {
168
+ containerRef,
169
+ toggleButton,
170
+ } = ToggleAPI(props, context, {
171
+ isOpen,
172
+ });
173
+
174
+ const {
175
+ btnIconLeft,
176
+ btnIconRight,
177
+ btnText,
178
+ btnTitle,
179
+ buttonRef,
180
+ isButtonVisible,
181
+ } = BtnAttributesAPI(props, {
182
+ isOpen,
183
+ });
184
+
185
+ expose({
186
+ buttonRef,
187
+ containerRef,
188
+ isOpen,
189
+ toggleButton,
190
+ });
191
+
192
+ return {
193
+ btnIconLeft,
194
+ btnIconRight,
195
+ btnText,
196
+ btnTitle,
197
+ buttonRef,
198
+ containerRef,
199
+ htmlLocal,
200
+ isButtonVisible,
201
+ isOpen,
202
+ isTextOrHtmlVisible,
203
+ safeHtmlLocal,
204
+ textLocal,
205
+ toggleButton,
206
+ };
207
+ },
208
+ render() {
209
+ return h("div", {
210
+ class: [
211
+ "a_show_more",
212
+ {
213
+ a_show_more_open: this.isOpen,
214
+ },
215
+ ],
216
+ }, [
217
+ h("div", {
218
+ class: "a_show_more__wrapper",
219
+ }, [
220
+ h("div", {
221
+ ref: "containerRef",
222
+ id: this.id,
223
+ ariaExpanded: this.isOpen,
224
+ ...this.$attrs,
225
+ }, [
226
+ this.isTextOrHtmlVisible && h(ATranslation, {
227
+ alwaysTranslate: this.alwaysTranslate,
228
+ html: this.htmlLocal,
229
+ safeHtml: this.safeHtmlLocal,
230
+ tag: "div",
231
+ text: this.textLocal,
232
+ }),
233
+ this.isOpen ?
234
+ this.$slots.more && this.$slots.more({
235
+ isButtonVisible: this.isButtonVisible,
236
+ isOpen: this.isOpen,
237
+ }) :
238
+ this.$slots.less && this.$slots.less({
239
+ isButtonVisible: this.isButtonVisible,
240
+ isOpen: this.isOpen,
241
+ }),
242
+ ]),
243
+ ]),
244
+ this.isButtonVisible && h("div", {
245
+ class: this.btnParentClass,
246
+ }, [
247
+ h(AButton, {
248
+ ref: "buttonRef",
249
+ id: this.btnId,
250
+ alwaysTranslate: this.alwaysTranslate,
251
+ "aria-controls": this.id,
252
+ class: [
253
+ "a_show_more__button",
254
+ this.btnClass,
255
+ ],
256
+ disabled: this.disabled,
257
+ iconLeft: this.btnIconLeft,
258
+ iconRight: this.btnIconRight,
259
+ isTitleHtml: this.isBtnTitleHtml,
260
+ text: this.btnText,
261
+ title: this.btnTitle,
262
+ titlePlacement: this.btnTitlePlacement,
263
+ ...this.btnAttributes,
264
+ onClick: this.toggleButton,
265
+ }, () => this.$slots.button && this.$slots.button({
266
+ isButtonVisible: this.isButtonVisible,
267
+ isOpen: this.isOpen,
268
+ })),
269
+ ]),
270
+ ]);
271
+ },
272
+ };