@avenirs-esr/avenirs-dsav 0.1.58 → 0.1.59
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/dist/avenirs-dsav.css +1 -1
- package/dist/components/overlay/dropdowns/AvDropdown/AvDropdown.stories.d.ts +61 -0
- package/dist/components/overlay/dropdowns/AvDropdown/AvDropdown.stub.d.ts +19 -0
- package/dist/components/overlay/dropdowns/AvDropdown/AvDropdown.vue.d.ts +81 -0
- package/dist/components/overlay/index.d.ts +1 -0
- package/dist/index.cjs.js +8 -8
- package/dist/index.es.js +623 -568
- package/dist/test-utils.cjs.js +19 -8
- package/dist/test-utils.es.js +33 -16
- package/dist/tests/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/test-utils.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./injection-key.cjs.js");require("@vue/test-utils");const s=e.defineComponent({name:"AvBadge",template:'<div class="av-badge-stub" />',props:{label:String,small:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!1},color:String,backgroundColor:String,iconPath:String}}),c=e.defineComponent({name:"AvTag",template:'<div class="av-tag-stub" />',props:["label","link","tagName","icon","disabled","small","iconOnly","selectable","selected","value"]}),d=e.defineComponent({name:"AvFieldset",props:["id","legend","legendId","class","ariaLive"],template:"<fieldset><slot /></fieldset>"}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./injection-key.cjs.js");require("@vue/test-utils");const s=e.defineComponent({name:"AvBadge",template:'<div class="av-badge-stub" />',props:{label:String,small:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!1},color:String,backgroundColor:String,iconPath:String}}),c=e.defineComponent({name:"AvTag",template:'<div class="av-tag-stub" />',props:["label","link","tagName","icon","disabled","small","iconOnly","selectable","selected","value"]}),d=e.defineComponent({name:"AvFieldset",props:["id","legend","legendId","class","ariaLive"],template:"<fieldset><slot /></fieldset>"}),r=e.defineComponent({name:"AvIcon",props:["name","color","size","title","animation"],template:'<div class="av-vicon-stub" />'}),p=e.defineComponent({name:"AvAccordion",props:["title","icon"],template:`
|
|
2
2
|
<div class="av-accordion">
|
|
3
3
|
<button
|
|
4
4
|
class="fr-accordion__btn"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<slot />
|
|
10
10
|
</button>
|
|
11
11
|
</div>
|
|
12
|
-
`,setup(n){const t=e.inject(l.registerAccordionKey);if(!t){const
|
|
12
|
+
`,setup(n){const t=e.inject(l.registerAccordionKey);if(!t){const i=e.ref(!1);return{isActive:i,expand:()=>{i.value=!i.value}}}const{isActive:o,expand:a}=t(e.toRef(n,"title"));return{isActive:o,expand:a}}}),u=e.defineComponent({name:"AvButton",props:["label","variant","type","disabled","isLoading","size"],emits:["click"],template:`
|
|
13
13
|
<button
|
|
14
14
|
class="av-button-stub"
|
|
15
15
|
:disabled="disabled"
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
`}),b=e.defineComponent({name:"AvList",props:["size"],template:`
|
|
52
52
|
<div class="av-list-stub">
|
|
53
53
|
<slot />
|
|
54
|
-
</div>`}),
|
|
54
|
+
</div>`}),g=e.defineComponent({name:"AvListItem",props:["clickable","hoverBackgroundColor","selected","icon","iconSize","iconColor","colorOnHover"],emits:["click"],template:`
|
|
55
55
|
<div
|
|
56
56
|
class="av-list-item-stub"
|
|
57
57
|
@click="$emit('click')"
|
|
58
58
|
>
|
|
59
59
|
<slot />
|
|
60
|
-
</div>`}),
|
|
60
|
+
</div>`}),A=e.defineComponent({name:"AvTagPicker",props:["label","options","selected","handleSelectChange"],template:`
|
|
61
61
|
<div class="av-tag-picker-stub">
|
|
62
62
|
<button
|
|
63
63
|
v-for="option in options"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
{{ option.label }}
|
|
69
69
|
</button>
|
|
70
70
|
</div>
|
|
71
|
-
`}),
|
|
71
|
+
`}),S=e.defineComponent({name:"AvAutocomplete",props:["modelValue","options","loading","inputOptions","getOptionLabel","getOptionKey","multiSelect","serverSideFiltering","enableLoadMore","maxDropdownHeight"],emits:["update:modelValue","search","clear","loadMore"],template:`
|
|
72
72
|
<div class="av-autocomplete-stub">
|
|
73
73
|
<slot
|
|
74
74
|
name="item"
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
{{ option.text }}
|
|
100
100
|
</option>
|
|
101
101
|
</select>
|
|
102
|
-
`}),
|
|
102
|
+
`}),k=e.defineComponent({name:"AvToggle",props:["id","name","modelValue","description","activeText","inactiveText","disabled"],emits:["update:modelValue"],template:`
|
|
103
103
|
<div class="av-toggle">
|
|
104
104
|
<input
|
|
105
105
|
type="checkbox"
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
<span class="inactive-text">
|
|
118
118
|
{{ inactiveText }}
|
|
119
119
|
</span>
|
|
120
|
-
</div>`}),
|
|
120
|
+
</div>`}),C=e.defineComponent({name:"AvBreadcrumb",template:'<div class="av-breadcrumb-stub" />',props:["links","navigationLabel","showBreadcrumbLabel"]}),h=e.defineComponent({name:"AvSideNavigation",props:{items:Array,selectedItem:String,isSideMenuCollapsed:Boolean,collapsedWidth:String},emits:["update:selectedItem","update:isSideMenuCollapsed"],template:`
|
|
121
121
|
<div
|
|
122
122
|
class="av-side-navigation-stub"
|
|
123
123
|
@click="$emit('update:isSideMenuCollapsed', !isSideMenuCollapsed)"
|
|
@@ -138,4 +138,15 @@
|
|
|
138
138
|
<slot />
|
|
139
139
|
<slot name="footer" />
|
|
140
140
|
</div>
|
|
141
|
-
`})
|
|
141
|
+
`}),B=e.defineComponent({name:"AvDropdown",props:["items","triggerAriaLabel","triggerIcon","triggerLabel","triggerVariant","triggerSize","padding"],emits:["itemSelected"],template:`
|
|
142
|
+
<div class="av-dropdown-stub">
|
|
143
|
+
<button
|
|
144
|
+
v-for="item in items"
|
|
145
|
+
:key="item.name"
|
|
146
|
+
:data-name="item.name"
|
|
147
|
+
@click="$emit('itemSelected', item.name)"
|
|
148
|
+
>
|
|
149
|
+
{{ item.label }}
|
|
150
|
+
</button>
|
|
151
|
+
</div>
|
|
152
|
+
`});function L(){return{given(n,t){return describe(`🔵 GIVEN ${n}`,t),this},when(n,t){return describe(`🔶 WHEN ${n}`,t),this},and(n,t){return describe(`➕ AND ${n}`,t),this},then(n,t){return it(`🟩 THEN ${n}`,t),this}}}exports.AvAccordionStub=p;exports.AvAutocompleteStub=S;exports.AvBadgeStub=s;exports.AvBreadcrumbStub=C;exports.AvButtonStub=u;exports.AvCancelConfirmButtonsStub=v;exports.AvCheckboxStub=m;exports.AvDrawerStub=y;exports.AvDropdownStub=B;exports.AvFieldsetStub=d;exports.AvIconStub=r;exports.AvListItemStub=g;exports.AvListStub=b;exports.AvSelectStub=f;exports.AvSideNavigationStub=h;exports.AvStepperStub=x;exports.AvTagPickerStub=A;exports.AvTagStub=c;exports.AvToggleStub=k;exports.BddTest=L;
|
package/dist/test-utils.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as e, inject as
|
|
1
|
+
import { defineComponent as e, inject as l, ref as s, toRef as c } from "vue";
|
|
2
2
|
import { r as d } from "./injection-key.es.js";
|
|
3
3
|
import "@vue/test-utils";
|
|
4
|
-
const
|
|
4
|
+
const v = e({
|
|
5
5
|
name: "AvBadge",
|
|
6
6
|
template: '<div class="av-badge-stub" />',
|
|
7
7
|
props: {
|
|
@@ -57,15 +57,15 @@ const m = e({
|
|
|
57
57
|
</div>
|
|
58
58
|
`,
|
|
59
59
|
setup(a) {
|
|
60
|
-
const t =
|
|
60
|
+
const t = l(d);
|
|
61
61
|
if (!t) {
|
|
62
62
|
const i = s(!1);
|
|
63
63
|
return { isActive: i, expand: () => {
|
|
64
64
|
i.value = !i.value;
|
|
65
65
|
} };
|
|
66
66
|
}
|
|
67
|
-
const { isActive: o, expand:
|
|
68
|
-
return { isActive: o, expand:
|
|
67
|
+
const { isActive: o, expand: n } = t(c(a, "title"));
|
|
68
|
+
return { isActive: o, expand: n };
|
|
69
69
|
}
|
|
70
70
|
}), f = e({
|
|
71
71
|
name: "AvButton",
|
|
@@ -174,7 +174,7 @@ const m = e({
|
|
|
174
174
|
</button>
|
|
175
175
|
</div>
|
|
176
176
|
`
|
|
177
|
-
}),
|
|
177
|
+
}), L = e({
|
|
178
178
|
name: "AvAutocomplete",
|
|
179
179
|
props: [
|
|
180
180
|
"modelValue",
|
|
@@ -201,7 +201,7 @@ const m = e({
|
|
|
201
201
|
/>
|
|
202
202
|
</div>
|
|
203
203
|
`
|
|
204
|
-
}),
|
|
204
|
+
}), B = e({
|
|
205
205
|
name: "AvSelect",
|
|
206
206
|
props: {
|
|
207
207
|
modelValue: [String, Number],
|
|
@@ -231,7 +231,7 @@ const m = e({
|
|
|
231
231
|
</option>
|
|
232
232
|
</select>
|
|
233
233
|
`
|
|
234
|
-
}),
|
|
234
|
+
}), C = e({
|
|
235
235
|
name: "AvToggle",
|
|
236
236
|
props: ["id", "name", "modelValue", "description", "activeText", "inactiveText", "disabled"],
|
|
237
237
|
emits: ["update:modelValue"],
|
|
@@ -297,7 +297,7 @@ const m = e({
|
|
|
297
297
|
</div>
|
|
298
298
|
</div>
|
|
299
299
|
`
|
|
300
|
-
}),
|
|
300
|
+
}), w = e({
|
|
301
301
|
name: "AvDrawer",
|
|
302
302
|
props: ["show", "position", "width"],
|
|
303
303
|
emits: ["escape-pressed"],
|
|
@@ -307,8 +307,24 @@ const m = e({
|
|
|
307
307
|
<slot name="footer" />
|
|
308
308
|
</div>
|
|
309
309
|
`
|
|
310
|
+
}), N = e({
|
|
311
|
+
name: "AvDropdown",
|
|
312
|
+
props: ["items", "triggerAriaLabel", "triggerIcon", "triggerLabel", "triggerVariant", "triggerSize", "padding"],
|
|
313
|
+
emits: ["itemSelected"],
|
|
314
|
+
template: `
|
|
315
|
+
<div class="av-dropdown-stub">
|
|
316
|
+
<button
|
|
317
|
+
v-for="item in items"
|
|
318
|
+
:key="item.name"
|
|
319
|
+
:data-name="item.name"
|
|
320
|
+
@click="$emit('itemSelected', item.name)"
|
|
321
|
+
>
|
|
322
|
+
{{ item.label }}
|
|
323
|
+
</button>
|
|
324
|
+
</div>
|
|
325
|
+
`
|
|
310
326
|
});
|
|
311
|
-
function
|
|
327
|
+
function D() {
|
|
312
328
|
return {
|
|
313
329
|
given(a, t) {
|
|
314
330
|
return describe(`🔵 GIVEN ${a}`, t), this;
|
|
@@ -326,22 +342,23 @@ function w() {
|
|
|
326
342
|
}
|
|
327
343
|
export {
|
|
328
344
|
S as AvAccordionStub,
|
|
329
|
-
|
|
330
|
-
|
|
345
|
+
L as AvAutocompleteStub,
|
|
346
|
+
v as AvBadgeStub,
|
|
331
347
|
T as AvBreadcrumbStub,
|
|
332
348
|
f as AvButtonStub,
|
|
333
349
|
k as AvCancelConfirmButtonsStub,
|
|
334
350
|
h as AvCheckboxStub,
|
|
335
|
-
|
|
351
|
+
w as AvDrawerStub,
|
|
352
|
+
N as AvDropdownStub,
|
|
336
353
|
g as AvFieldsetStub,
|
|
337
354
|
A as AvIconStub,
|
|
338
355
|
y as AvListItemStub,
|
|
339
356
|
x as AvListStub,
|
|
340
|
-
|
|
357
|
+
B as AvSelectStub,
|
|
341
358
|
$ as AvSideNavigationStub,
|
|
342
359
|
I as AvStepperStub,
|
|
343
360
|
V as AvTagPickerStub,
|
|
344
361
|
b as AvTagStub,
|
|
345
|
-
|
|
346
|
-
|
|
362
|
+
C as AvToggleStub,
|
|
363
|
+
D as BddTest
|
|
347
364
|
};
|
package/dist/tests/index.d.ts
CHANGED
|
@@ -16,5 +16,6 @@ import { AvBreadcrumbStub } from '@/components/navigation/AvBreadcrumb/AvBreadcr
|
|
|
16
16
|
import { AvSideNavigationStub } from '@/components/navigation/AvSideNavigation/AvSideNavigation.stub';
|
|
17
17
|
import { AvStepperStub } from '@/components/navigation/AvStepper/AvStepper.stub';
|
|
18
18
|
import { AvDrawerStub } from '@/components/overlay/drawers/AvDrawer/AvDrawer.stub';
|
|
19
|
+
import { AvDropdownStub } from '@/components/overlay/dropdowns/AvDropdown/AvDropdown.stub';
|
|
19
20
|
import { BddTest } from '@/tests/utils';
|
|
20
|
-
export { AvAccordionStub, AvAutocompleteStub, AvBadgeStub, AvBreadcrumbStub, AvButtonStub, AvCancelConfirmButtonsStub, AvCheckboxStub, AvDrawerStub, AvFieldsetStub, AvIconStub, AvListItemStub, AvListStub, AvSelectStub, AvSideNavigationStub, AvStepperStub, AvTagPickerStub, AvTagStub, AvToggleStub, BddTest, };
|
|
21
|
+
export { AvAccordionStub, AvAutocompleteStub, AvBadgeStub, AvBreadcrumbStub, AvButtonStub, AvCancelConfirmButtonsStub, AvCheckboxStub, AvDrawerStub, AvDropdownStub, AvFieldsetStub, AvIconStub, AvListItemStub, AvListStub, AvSelectStub, AvSideNavigationStub, AvStepperStub, AvTagPickerStub, AvTagStub, AvToggleStub, BddTest, };
|