@adyen/bento-vue2 0.1.0 → 0.1.1

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.
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { BentoAvatarVariant } from './avatar.types';
2
+ import { BentoAvatarColor, BentoAvatarVariant } from './avatar.types';
3
3
  import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  src: {
@@ -15,11 +15,16 @@ declare const _default: import("vue").DefineComponent<{
15
15
  default: BentoAvatarVariant;
16
16
  validator: (value: BentoAvatarVariant) => boolean;
17
17
  };
18
+ color: {
19
+ type: PropType<BentoAvatarColor>;
20
+ default: BentoAvatarColor;
21
+ validator: (value: BentoAvatarColor) => boolean;
22
+ };
18
23
  }, {
19
24
  BentoTypographyElement: typeof BentoTypographyElement;
20
25
  BentoTypographyVariant: typeof BentoTypographyVariant;
21
26
  conditionalClasses: import("vue").ComputedRef<{
22
- [x: string]: string | boolean;
27
+ [x: string]: boolean | BentoAvatarColor;
23
28
  }>;
24
29
  initials: import("vue").ComputedRef<string>;
25
30
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
@@ -36,7 +41,13 @@ declare const _default: import("vue").DefineComponent<{
36
41
  default: BentoAvatarVariant;
37
42
  validator: (value: BentoAvatarVariant) => boolean;
38
43
  };
44
+ color: {
45
+ type: PropType<BentoAvatarColor>;
46
+ default: BentoAvatarColor;
47
+ validator: (value: BentoAvatarColor) => boolean;
48
+ };
39
49
  }>>, {
50
+ color: BentoAvatarColor;
40
51
  src: string;
41
52
  variant: BentoAvatarVariant;
42
53
  username: string;
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
30
30
  conditionalClasses: import("vue").ComputedRef<{
31
31
  [x: string]: boolean;
32
32
  }>;
33
- onClickButton: () => void;
33
+ onClickButton: (e: MouseEvent) => void;
34
34
  hasSlot: (name: string) => boolean;
35
35
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("blur" | "click" | "focus" | "keydown.esc")[], string, Readonly<import("vue").ExtractPropTypes<{
36
36
  disabled: {
@@ -0,0 +1,170 @@
1
+ export declare enum BentoCurrencyISOCode {
2
+ AFA = "AFA",
3
+ ALL = "ALL",
4
+ DZD = "DZD",
5
+ AOA = "AOA",
6
+ ARS = "ARS",
7
+ AMD = "AMD",
8
+ AWG = "AWG",
9
+ AUD = "AUD",
10
+ AZN = "AZN",
11
+ BSD = "BSD",
12
+ BHD = "BHD",
13
+ BDT = "BDT",
14
+ BBD = "BBD",
15
+ BYR = "BYR",
16
+ BEF = "BEF",
17
+ BZD = "BZD",
18
+ BMD = "BMD",
19
+ BTN = "BTN",
20
+ BTC = "BTC",
21
+ BOB = "BOB",
22
+ BAM = "BAM",
23
+ BWP = "BWP",
24
+ BRL = "BRL",
25
+ GBP = "GBP",
26
+ BND = "BND",
27
+ BGN = "BGN",
28
+ BIF = "BIF",
29
+ KHR = "KHR",
30
+ CAD = "CAD",
31
+ CVE = "CVE",
32
+ KYD = "KYD",
33
+ XOF = "XOF",
34
+ XAF = "XAF",
35
+ XPF = "XPF",
36
+ CLP = "CLP",
37
+ CLF = "CLF",
38
+ CNY = "CNY",
39
+ COP = "COP",
40
+ KMF = "KMF",
41
+ CDF = "CDF",
42
+ CRC = "CRC",
43
+ HRK = "HRK",
44
+ CUC = "CUC",
45
+ CZK = "CZK",
46
+ DKK = "DKK",
47
+ DJF = "DJF",
48
+ DOP = "DOP",
49
+ XCD = "XCD",
50
+ EGP = "EGP",
51
+ ERN = "ERN",
52
+ EEK = "EEK",
53
+ ETB = "ETB",
54
+ EUR = "EUR",
55
+ FKP = "FKP",
56
+ FJD = "FJD",
57
+ GMD = "GMD",
58
+ GEL = "GEL",
59
+ DEM = "DEM",
60
+ GHS = "GHS",
61
+ GIP = "GIP",
62
+ GRD = "GRD",
63
+ GTQ = "GTQ",
64
+ GNF = "GNF",
65
+ GYD = "GYD",
66
+ HTG = "HTG",
67
+ HNL = "HNL",
68
+ HKD = "HKD",
69
+ HUF = "HUF",
70
+ ISK = "ISK",
71
+ INR = "INR",
72
+ IDR = "IDR",
73
+ IRR = "IRR",
74
+ IQD = "IQD",
75
+ ILS = "ILS",
76
+ ITL = "ITL",
77
+ JMD = "JMD",
78
+ JPY = "JPY",
79
+ JOD = "JOD",
80
+ KZT = "KZT",
81
+ KES = "KES",
82
+ KWD = "KWD",
83
+ KGS = "KGS",
84
+ LAK = "LAK",
85
+ LVL = "LVL",
86
+ LBP = "LBP",
87
+ LSL = "LSL",
88
+ LRD = "LRD",
89
+ LYD = "LYD",
90
+ LTC = "LTC",
91
+ LTL = "LTL",
92
+ MOP = "MOP",
93
+ MKD = "MKD",
94
+ MGA = "MGA",
95
+ MWK = "MWK",
96
+ MYR = "MYR",
97
+ MVR = "MVR",
98
+ MRO = "MRO",
99
+ MUR = "MUR",
100
+ MXN = "MXN",
101
+ MDL = "MDL",
102
+ MNT = "MNT",
103
+ MAD = "MAD",
104
+ MZM = "MZM",
105
+ MMK = "MMK",
106
+ NAD = "NAD",
107
+ NPR = "NPR",
108
+ ANG = "ANG",
109
+ TWD = "TWD",
110
+ NZD = "NZD",
111
+ NIO = "NIO",
112
+ NGN = "NGN",
113
+ KPW = "KPW",
114
+ NOK = "NOK",
115
+ OMR = "OMR",
116
+ PKR = "PKR",
117
+ PAB = "PAB",
118
+ PGK = "PGK",
119
+ PYG = "PYG",
120
+ PEN = "PEN",
121
+ PHP = "PHP",
122
+ PLN = "PLN",
123
+ QAR = "QAR",
124
+ RON = "RON",
125
+ RUB = "RUB",
126
+ RWF = "RWF",
127
+ SVC = "SVC",
128
+ WST = "WST",
129
+ STD = "STD",
130
+ SAR = "SAR",
131
+ RSD = "RSD",
132
+ SCR = "SCR",
133
+ SLL = "SLL",
134
+ SGD = "SGD",
135
+ SKK = "SKK",
136
+ SBD = "SBD",
137
+ SOS = "SOS",
138
+ ZAR = "ZAR",
139
+ KRW = "KRW",
140
+ SSP = "SSP",
141
+ XDR = "XDR",
142
+ LKR = "LKR",
143
+ SHP = "SHP",
144
+ SDG = "SDG",
145
+ SRD = "SRD",
146
+ SZL = "SZL",
147
+ SEK = "SEK",
148
+ CHF = "CHF",
149
+ SYP = "SYP",
150
+ TJS = "TJS",
151
+ TZS = "TZS",
152
+ THB = "THB",
153
+ TOP = "TOP",
154
+ TTD = "TTD",
155
+ TND = "TND",
156
+ TRY = "TRY",
157
+ TMT = "TMT",
158
+ UGX = "UGX",
159
+ UAH = "UAH",
160
+ AED = "AED",
161
+ UYU = "UYU",
162
+ USD = "USD",
163
+ UZS = "UZS",
164
+ VUV = "VUV",
165
+ VEF = "VEF",
166
+ VND = "VND",
167
+ YER = "YER",
168
+ ZMK = "ZMK",
169
+ ZWL = "ZWL"
170
+ }
@@ -0,0 +1,32 @@
1
+ import { PropType } from 'vue';
2
+ import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
3
+ import { BentoCurrencyISOCode } from '@/components/currency/currency.types';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ currency: {
6
+ type: PropType<BentoCurrencyISOCode>;
7
+ default: BentoCurrencyISOCode;
8
+ validator: (value: BentoCurrencyISOCode) => boolean;
9
+ };
10
+ shorthand: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }, {
15
+ formattedCurrency: import("vue").ComputedRef<string>;
16
+ BentoTypographyVariant: typeof BentoTypographyVariant;
17
+ BentoTypographyElement: typeof BentoTypographyElement;
18
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
19
+ currency: {
20
+ type: PropType<BentoCurrencyISOCode>;
21
+ default: BentoCurrencyISOCode;
22
+ validator: (value: BentoCurrencyISOCode) => boolean;
23
+ };
24
+ shorthand: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>>, {
29
+ currency: BentoCurrencyISOCode;
30
+ shorthand: boolean;
31
+ }>;
32
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as BentoCurrency } from './currency.vue';
2
+ export * from './currency.types';
@@ -0,0 +1,91 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ autoComplete: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ ariaControls: {
7
+ type: StringConstructor;
8
+ required: true;
9
+ };
10
+ ariaExpanded: {
11
+ type: StringConstructor;
12
+ required: true;
13
+ };
14
+ ariaLabelledby: {
15
+ type: StringConstructor;
16
+ default: any;
17
+ };
18
+ disabled: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ isInvalid: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ displayValue: {
27
+ type: StringConstructor;
28
+ default: any;
29
+ };
30
+ open: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ placeholder: {
35
+ type: StringConstructor;
36
+ default: any;
37
+ };
38
+ }, {
39
+ conditionalClasses: import("vue").ComputedRef<{
40
+ 'b-dropdown-default-textbox--error': boolean;
41
+ 'b-dropdown-default-textbox--disabled': boolean;
42
+ 'b-dropdown-default-textbox--opened': boolean;
43
+ }>;
44
+ isDropdownOpen: import("vue").ComputedRef<boolean>;
45
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
46
+ autoComplete: {
47
+ type: BooleanConstructor;
48
+ default: boolean;
49
+ };
50
+ ariaControls: {
51
+ type: StringConstructor;
52
+ required: true;
53
+ };
54
+ ariaExpanded: {
55
+ type: StringConstructor;
56
+ required: true;
57
+ };
58
+ ariaLabelledby: {
59
+ type: StringConstructor;
60
+ default: any;
61
+ };
62
+ disabled: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
66
+ isInvalid: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ displayValue: {
71
+ type: StringConstructor;
72
+ default: any;
73
+ };
74
+ open: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ placeholder: {
79
+ type: StringConstructor;
80
+ default: any;
81
+ };
82
+ }>>, {
83
+ open: boolean;
84
+ disabled: boolean;
85
+ placeholder: string;
86
+ displayValue: string;
87
+ autoComplete: boolean;
88
+ ariaLabelledby: string;
89
+ isInvalid: boolean;
90
+ }>;
91
+ export default _default;
@@ -0,0 +1,81 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ autoComplete: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ ariaControls: {
7
+ type: StringConstructor;
8
+ required: true;
9
+ };
10
+ ariaExpanded: {
11
+ type: StringConstructor;
12
+ required: true;
13
+ };
14
+ ariaLabelledby: {
15
+ type: StringConstructor;
16
+ default: any;
17
+ };
18
+ disabled: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ displayValue: {
23
+ type: StringConstructor;
24
+ default: any;
25
+ };
26
+ open: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ placeholder: {
31
+ type: StringConstructor;
32
+ default: any;
33
+ };
34
+ }, {
35
+ conditionalClasses: import("vue").ComputedRef<{
36
+ 'b-dropdown-small-textbox--disabled': boolean;
37
+ 'b-dropdown-small-textbox--opened': boolean;
38
+ }>;
39
+ isDropdownOpen: import("vue").ComputedRef<boolean>;
40
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
41
+ autoComplete: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ ariaControls: {
46
+ type: StringConstructor;
47
+ required: true;
48
+ };
49
+ ariaExpanded: {
50
+ type: StringConstructor;
51
+ required: true;
52
+ };
53
+ ariaLabelledby: {
54
+ type: StringConstructor;
55
+ default: any;
56
+ };
57
+ disabled: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ displayValue: {
62
+ type: StringConstructor;
63
+ default: any;
64
+ };
65
+ open: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ placeholder: {
70
+ type: StringConstructor;
71
+ default: any;
72
+ };
73
+ }>>, {
74
+ open: boolean;
75
+ disabled: boolean;
76
+ placeholder: string;
77
+ displayValue: string;
78
+ autoComplete: boolean;
79
+ ariaLabelledby: string;
80
+ }>;
81
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ amountAppliedValues: {
4
+ type: NumberConstructor;
5
+ default: any;
6
+ };
7
+ disabled: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ }, {
12
+ BentoTypographyElement: typeof BentoTypographyElement;
13
+ BentoTypographyVariant: typeof BentoTypographyVariant;
14
+ computedAriaLabel: import("vue").ComputedRef<string>;
15
+ conditionalClasses: import("vue").ComputedRef<{
16
+ "b-filter-button--with-counter": number;
17
+ }>;
18
+ onClickButton: () => void;
19
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, "click"[], string, Readonly<import("vue").ExtractPropTypes<{
20
+ amountAppliedValues: {
21
+ type: NumberConstructor;
22
+ default: any;
23
+ };
24
+ disabled: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ }>>, {
29
+ disabled: boolean;
30
+ amountAppliedValues: number;
31
+ }>;
32
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as BentoUserProfile } from './user-profile.vue';
@@ -0,0 +1,40 @@
1
+ import { BentoAvatarColor, BentoAvatarVariant } from '@/components/avatar';
2
+ import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ iconOnly: {
5
+ type: BooleanConstructor;
6
+ default: boolean;
7
+ };
8
+ username: {
9
+ type: StringConstructor;
10
+ required: true;
11
+ };
12
+ src: {
13
+ type: StringConstructor;
14
+ default: any;
15
+ };
16
+ }, {
17
+ BentoAvatarVariant: typeof BentoAvatarVariant;
18
+ BentoTypographyElement: typeof BentoTypographyElement;
19
+ BentoTypographyVariant: typeof BentoTypographyVariant;
20
+ computedAriaLabel: import("vue").ComputedRef<string>;
21
+ computedUsername: import("vue").ComputedRef<string>;
22
+ avatarColor: import("vue").ComputedRef<BentoAvatarColor>;
23
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
24
+ iconOnly: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ username: {
29
+ type: StringConstructor;
30
+ required: true;
31
+ };
32
+ src: {
33
+ type: StringConstructor;
34
+ default: any;
35
+ };
36
+ }>>, {
37
+ src: string;
38
+ iconOnly: boolean;
39
+ }>;
40
+ export default _default;
@@ -22,6 +22,7 @@ import {
22
22
  BentoCheckboxGroup,
23
23
  BentoClickOutside,
24
24
  BentoCountry,
25
+ BentoCurrency,
25
26
  BentoDataGrid,
26
27
  BentoInputField,
27
28
  BentoLink,
@@ -35,6 +36,7 @@ import {
35
36
  BentoTag,
36
37
  BentoToggle,
37
38
  BentoTypography,
39
+ BentoUserProfile,
38
40
  } from './index';
39
41
 
40
42
  declare module 'vue' {
@@ -62,6 +64,7 @@ declare module 'vue' {
62
64
  BentoCheckboxGroup: typeof BentoCheckboxGroup;
63
65
  BentoClickOutside: typeof BentoClickOutside;
64
66
  BentoCountry: typeof BentoCountry;
67
+ BentoCurrency: typeof BentoCurrency;
65
68
  BentoDataGrid: typeof BentoDataGrid;
66
69
  BentoInputField: typeof BentoInputField;
67
70
  BentoLink: typeof BentoLink;
@@ -75,5 +78,6 @@ declare module 'vue' {
75
78
  BentoTag: typeof BentoTag;
76
79
  BentoToggle: typeof BentoToggle;
77
80
  BentoTypography: typeof BentoTypography;
81
+ BentoUserProfile: typeof BentoUserProfile;
78
82
  }
79
83
  }
@@ -0,0 +1 @@
1
+ export * from './initials';
@@ -0,0 +1,3 @@
1
+ import { ComputedRef } from 'vue';
2
+ import { MaybeRef } from '../types';
3
+ export declare const useInitials: (username: MaybeRef<string | null>) => ComputedRef<string | null>;
@@ -5,6 +5,7 @@ export * from './components/data-grid';
5
5
  export * from './components/checkbox';
6
6
  export * from './components/click-outside';
7
7
  export * from './components/country';
8
+ export * from './components/currency';
8
9
  export * from './components/filter-bar';
9
10
  export * from './components/input-field';
10
11
  export * from './components/loading-indicator';
@@ -17,6 +18,7 @@ export * from './components/status';
17
18
  export * from './components/tag';
18
19
  export * from './components/toggle';
19
20
  export * from './components/typography';
21
+ export * from './components/user-profile';
20
22
  export * from './types';
21
23
  export * from './directives';
22
24
  export default BentoVue;
@@ -0,0 +1,4 @@
1
+ export declare const currencyExponentMap: {
2
+ exponent: number;
3
+ currencies: string[];
4
+ }[];
@@ -0,0 +1,6 @@
1
+ import { CurrencyAmount, CurrencyOptions, NumberFormatOptionsResult } from './currency.types';
2
+ export declare const getExponent: (currencyCode: string) => number;
3
+ export declare const getMinorUnitsAmount: (amount: CurrencyAmount) => number;
4
+ export declare const getNormalizedAmount: (amount: CurrencyAmount, exponent: number) => number;
5
+ export declare function getNumberFormatOptions(amount: CurrencyAmount, options?: CurrencyOptions): NumberFormatOptionsResult;
6
+ export declare const getLocalizedCurrencyValue: (amountValue: string, currency: string, isShort?: boolean) => string;
@@ -0,0 +1,24 @@
1
+ export interface CurrencyAmount {
2
+ value: number;
3
+ currency: string;
4
+ }
5
+ export interface CurrencyOptions {
6
+ style?: string;
7
+ exponent?: number;
8
+ optionalFractions?: boolean;
9
+ highPrecision?: boolean;
10
+ }
11
+ export interface CurrencyFormatOptions {
12
+ amount: CurrencyAmount;
13
+ options?: CurrencyOptions;
14
+ }
15
+ export interface NumberFormatOptionsResult {
16
+ value: number;
17
+ format: {
18
+ currency: string;
19
+ currencyDisplay: string;
20
+ maximumFractionDigits: number;
21
+ minimumFractionDigits: number;
22
+ style: string;
23
+ };
24
+ }
@@ -0,0 +1 @@
1
+ export declare function deepMerge(target: object, source: object): object;
@@ -0,0 +1 @@
1
+ export * from './deep-merge';