@adyen/bento-vue2 0.0.6 → 0.0.7
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/README.md +13 -1
- package/dist/@types/components/card/card.vue.d.ts +1 -1
- package/dist/@types/components/controls-group/controls-group.vue.d.ts +49 -0
- package/dist/@types/components/controls-group/index.d.ts +1 -0
- package/dist/@types/components/focus-trap/focus-trap.types.d.ts +4 -4
- package/dist/@types/components/focus-trap/focus-trap.utils.d.ts +2 -2
- package/dist/@types/components/focus-trap/focus-trap.vue.d.ts +5 -5
- package/dist/@types/components/focus-trap/index.d.ts +1 -1
- package/dist/@types/components/popper-container/popper-container.vue.d.ts +9 -0
- package/dist/@types/components/textarea/textarea.vue.d.ts +3 -3
- package/dist/index.js +1352 -919
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,7 +29,8 @@ npm install @adyen/bento-vue2
|
|
|
29
29
|
In order to use the compoent via the `BentoVue` plugin, the following steps must be reproduced:
|
|
30
30
|
|
|
31
31
|
1. Load the plugin globally in **Vue**
|
|
32
|
-
2.
|
|
32
|
+
2. Import the `font.css` file.
|
|
33
|
+
3. Use the library defined components in your application
|
|
33
34
|
|
|
34
35
|
#### Load plugin and register components
|
|
35
36
|
|
|
@@ -42,6 +43,17 @@ import BentoVue from '@adyen/bento-vue2';
|
|
|
42
43
|
Vue.use(BentoVue);
|
|
43
44
|
```
|
|
44
45
|
|
|
46
|
+
#### Import the fonts
|
|
47
|
+
|
|
48
|
+
When using the default theme, you will need to include the required `Inter` font in your project application. This can
|
|
49
|
+
easily be done by simply importing the `font.css` file.
|
|
50
|
+
|
|
51
|
+
NOTE: make sure the builder your are using (e.g. `webpack` , `vite`, etc...) is able to process font files.
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
import '@adyen/bento-vue2/fonts.css';
|
|
55
|
+
```
|
|
56
|
+
|
|
45
57
|
#### Use the components
|
|
46
58
|
|
|
47
59
|
Inside the `.vue` components of your application, you can simply use the available components:
|
|
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
showImage: import("vue").ComputedRef<boolean>;
|
|
23
23
|
showFooter: import("vue").ComputedRef<boolean>;
|
|
24
24
|
onClickCard: () => void;
|
|
25
|
-
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin,
|
|
25
|
+
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, "click"[], string, Readonly<import("vue").ExtractPropTypes<{
|
|
26
26
|
title: {
|
|
27
27
|
type: StringConstructor;
|
|
28
28
|
required: true;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BentoTypographyElement } from '@/components/typography';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
label: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
showLabel: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
form: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: any;
|
|
14
|
+
};
|
|
15
|
+
disabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
BentoTypographyElement: typeof BentoTypographyElement;
|
|
21
|
+
conditionalClasses: import("vue").ComputedRef<{
|
|
22
|
+
'b-controls-group--disabled': boolean;
|
|
23
|
+
}>;
|
|
24
|
+
legendConditionalClasses: import("vue").ComputedRef<{
|
|
25
|
+
'b-controls-group__label--hidden': boolean;
|
|
26
|
+
}>;
|
|
27
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
label: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
showLabel: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
form: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: any;
|
|
39
|
+
};
|
|
40
|
+
disabled: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
}>>, {
|
|
45
|
+
form: string;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
showLabel: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ControlsGroup } from './controls-group.vue';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum BentoFocusTrapArrowNavigationDirection {
|
|
2
2
|
VERTICAL = "vertical",
|
|
3
3
|
HORIZONTAL = "horizontal"
|
|
4
4
|
}
|
|
5
|
-
export declare enum
|
|
5
|
+
export declare enum BentoFocusTrapVerticalNavigationEvent {
|
|
6
6
|
ARROW_UP = "arrowup",
|
|
7
7
|
ARROW_DOWN = "arrowdown"
|
|
8
8
|
}
|
|
9
|
-
export declare enum
|
|
9
|
+
export declare enum BentoFocusTrapHorizontalNavigationEvent {
|
|
10
10
|
ARROW_LEFT = "arrowleft",
|
|
11
11
|
ARROW_RIGHT = "arrowright"
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface BentoFocusTrapFocusableIn {
|
|
14
14
|
node: HTMLElement;
|
|
15
15
|
index: number;
|
|
16
16
|
lockItem: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BentoFocusTrapHorizontalNavigationEvent, BentoFocusTrapVerticalNavigationEvent } from './focus-trap.types';
|
|
2
2
|
export declare const deferAction: (callback: FrameRequestCallback) => number;
|
|
3
3
|
export declare const getNextFocusableElement: (factor: any, element: any) => HTMLElement;
|
|
4
|
-
export declare const getArrowType: (event: KeyboardEvent, arrowOrder:
|
|
4
|
+
export declare const getArrowType: (event: KeyboardEvent, arrowOrder: BentoFocusTrapVerticalNavigationEvent[] | BentoFocusTrapHorizontalNavigationEvent[]) => {
|
|
5
5
|
isArrowNext: boolean;
|
|
6
6
|
isArrowPrev: boolean;
|
|
7
7
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { BentoFocusTrapArrowNavigationDirection, BentoFocusTrapHorizontalNavigationEvent, BentoFocusTrapVerticalNavigationEvent } from './focus-trap.types';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
arrowNavigation: {
|
|
5
|
-
type: PropType<
|
|
5
|
+
type: PropType<BentoFocusTrapArrowNavigationDirection>;
|
|
6
6
|
default: any;
|
|
7
7
|
validator: (value: unknown) => boolean;
|
|
8
8
|
};
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
}, {
|
|
16
16
|
isHorizontalArrowNavigation(): boolean;
|
|
17
17
|
isVerticalArrowNavigation(): boolean;
|
|
18
|
-
arrowOrder():
|
|
18
|
+
arrowOrder(): BentoFocusTrapVerticalNavigationEvent[] | BentoFocusTrapHorizontalNavigationEvent[];
|
|
19
19
|
}, {
|
|
20
20
|
setFocusInside(): Promise<void>;
|
|
21
21
|
onBlur(): void;
|
|
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
24
24
|
disable(): void;
|
|
25
25
|
}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
|
26
26
|
arrowNavigation: {
|
|
27
|
-
type: PropType<
|
|
27
|
+
type: PropType<BentoFocusTrapArrowNavigationDirection>;
|
|
28
28
|
default: any;
|
|
29
29
|
validator: (value: unknown) => boolean;
|
|
30
30
|
};
|
|
@@ -34,6 +34,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
};
|
|
35
35
|
}>>, {
|
|
36
36
|
disabled: boolean;
|
|
37
|
-
arrowNavigation:
|
|
37
|
+
arrowNavigation: BentoFocusTrapArrowNavigationDirection;
|
|
38
38
|
}>;
|
|
39
39
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as BentoFocusTrap } from './focus-trap.vue';
|
|
@@ -37,6 +37,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
37
|
type: BooleanConstructor;
|
|
38
38
|
default: boolean;
|
|
39
39
|
};
|
|
40
|
+
disabledFocusTrap: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
40
44
|
modifiers: {
|
|
41
45
|
type: ArrayConstructor;
|
|
42
46
|
default: any;
|
|
@@ -97,6 +101,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
97
101
|
type: BooleanConstructor;
|
|
98
102
|
default: boolean;
|
|
99
103
|
};
|
|
104
|
+
disabledFocusTrap: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: boolean;
|
|
107
|
+
};
|
|
100
108
|
modifiers: {
|
|
101
109
|
type: ArrayConstructor;
|
|
102
110
|
default: any;
|
|
@@ -119,6 +127,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
119
127
|
arrow: any;
|
|
120
128
|
matchWidth: boolean;
|
|
121
129
|
fixedPositioning: boolean;
|
|
130
|
+
disabledFocusTrap: boolean;
|
|
122
131
|
fallbackPosition: FallbackPositionProp;
|
|
123
132
|
ariaRole: PopperContainerAriaRole;
|
|
124
133
|
}>;
|
|
@@ -15,9 +15,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: StringConstructor;
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
|
-
}, {
|
|
19
|
-
onInput(event: Event)
|
|
20
|
-
}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin,
|
|
18
|
+
}, {
|
|
19
|
+
onInput: (event: Event) => void;
|
|
20
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, "input"[], string, Readonly<import("vue").ExtractPropTypes<{
|
|
21
21
|
label: {
|
|
22
22
|
type: StringConstructor;
|
|
23
23
|
default: string;
|