@adyen/bento-vue2 0.0.8 → 0.1.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.
Files changed (46) hide show
  1. package/dist/@types/components/accordion/accordion.vue.d.ts +1 -1
  2. package/dist/@types/components/avatar/avatar.types.d.ts +10 -0
  3. package/dist/@types/components/{profile-picture/profile-picture.vue.d.ts → avatar/avatar.vue.d.ts} +12 -10
  4. package/dist/@types/components/avatar/index.d.ts +2 -0
  5. package/dist/@types/components/button/button.vue.d.ts +2 -1
  6. package/dist/@types/components/country/composables/index.d.ts +4 -0
  7. package/dist/@types/components/country/composables/useCountryCapital/useCountryCapital.d.ts +4 -0
  8. package/dist/@types/components/country/composables/useCountryFlag.d.ts +2 -0
  9. package/dist/@types/components/country/composables/useCountryName/useCountryName.d.ts +2 -0
  10. package/dist/@types/components/country/composables/useCountryPhoneCode/useCountryPhoneCode.d.ts +3 -0
  11. package/dist/@types/components/country/country.types.d.ts +259 -0
  12. package/dist/@types/components/country/country.vue.d.ts +33 -0
  13. package/dist/@types/components/country/index.d.ts +2 -0
  14. package/dist/@types/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +74 -0
  15. package/dist/@types/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +43 -0
  16. package/dist/@types/components/data-grid/components/index.d.ts +2 -0
  17. package/dist/@types/components/data-grid/composables/index.d.ts +5 -0
  18. package/dist/@types/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +23 -4
  19. package/dist/@types/components/data-grid/composables/useConfigSettings.d.ts +5 -0
  20. package/dist/@types/components/data-grid/composables/useResizer.d.ts +3 -12
  21. package/dist/@types/components/data-grid/composables/useSelector.d.ts +1 -1
  22. package/dist/@types/components/data-grid/composables/useSorter.d.ts +1 -1
  23. package/dist/@types/components/data-grid/data-grid.types.d.ts +10 -0
  24. package/dist/@types/components/data-grid/data-grid.vue.d.ts +14 -31
  25. package/dist/@types/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +100 -0
  26. package/dist/@types/components/dropdown/dropdown.types.d.ts +2 -2
  27. package/dist/@types/components/input-field/index.d.ts +1 -0
  28. package/dist/@types/components/input-field/input-field.types.d.ts +4 -0
  29. package/dist/@types/components/input-field/input-field.vue.d.ts +28 -1
  30. package/dist/@types/components/search-bar/index.d.ts +3 -0
  31. package/dist/@types/components/search-bar/search-bar.types.d.ts +4 -0
  32. package/dist/@types/components/search-bar/search-bar.vue.d.ts +37 -0
  33. package/dist/@types/components/search-bar/useSearchBarDataFilter.d.ts +3 -0
  34. package/dist/@types/components/typography/typography.vue.d.ts +1 -1
  35. package/dist/@types/components.d.ts +4 -2
  36. package/dist/@types/index.d.ts +2 -0
  37. package/dist/@types/utils/ts/debounce/debounce.d.ts +2 -0
  38. package/dist/@types/utils/ts/debounce/index.d.ts +1 -0
  39. package/dist/@types/utils/ts/hasSlot.d.ts +2 -0
  40. package/dist/@types/utils/ts/i18n.d.ts +10 -1
  41. package/dist/index.js +8203 -1943
  42. package/dist/index.js.map +1 -1
  43. package/package.json +5 -4
  44. package/dist/@types/components/profile-picture/index.d.ts +0 -2
  45. package/dist/@types/components/profile-picture/profile-picture.types.d.ts +0 -4
  46. package/dist/@types/i18n/index.d.ts +0 -8
@@ -116,7 +116,8 @@ declare const _default: import("vue").DefineComponent<{
116
116
  default: () => any[];
117
117
  };
118
118
  }, {
119
- processedColumns: import("vue").ComputedRef<{
119
+ body: import("vue").Ref<HTMLDivElement>;
120
+ columnDefs: import("vue").ComputedRef<{
120
121
  width: number;
121
122
  field: string;
122
123
  label: string;
@@ -140,12 +141,6 @@ declare const _default: import("vue").DefineComponent<{
140
141
  conditionalGridClasses: import("vue").ComputedRef<{
141
142
  [x: string]: boolean;
142
143
  }>;
143
- conditionalColumnClasses: (column: BentoColumn) => {
144
- 'b-data-grid__column--sortable': boolean;
145
- 'b-data-grid__column--padding-left-unset': boolean;
146
- 'b-data-grid__column--padding-right-unset': boolean;
147
- 'b-data-grid__column--numeric': boolean;
148
- };
149
144
  conditionalRowClasses: (row: BentoDatagridDataItem) => {
150
145
  'b-data-grid__row--disabled': boolean;
151
146
  };
@@ -156,43 +151,31 @@ declare const _default: import("vue").DefineComponent<{
156
151
  'b-data-grid__cell--numeric': boolean;
157
152
  'b-data-grid__cell--condensed': boolean;
158
153
  };
159
- conditionalColumnSeperatorClasses: import("vue").ComputedRef<{
160
- 'b-data-grid__column-seperator-container--is-resizeable': boolean;
161
- }>;
162
154
  conditionalPaginationClasses: import("vue").ComputedRef<{
163
155
  'b-data-grid__pagination--padding-left-unset': boolean;
164
156
  'b-data-grid__pagination--padding-right-unset': boolean;
165
157
  }>;
166
- resizeData: {
167
- resizingColumnField: string;
168
- offsetLeft: number;
169
- stepPositionX: number;
170
- resizedColumnsWidths: {
171
- [k: string]: {
172
- width: number;
173
- minWidth: number;
174
- };
175
- };
176
- };
177
- startResize: (hasResizableColumns: boolean, field: string, event: MouseEvent) => void;
178
- conditionalSortDirectionClasses: (field: string, direction: BentoDatagridSortDirection) => {
179
- 'b-data-grid__column-sort-icon--sorted': boolean;
180
- };
181
- sortByColumnField: (field: string) => void;
158
+ onColumnWidthOverride: (newColumnWidthOverridesLookup: import("./data-grid.types").BentoColumnWidthOverridesLookup) => void;
159
+ onColumnResized: (resizeEvent: {
160
+ field: string;
161
+ width: number;
162
+ }) => void;
163
+ onSort: (updatedSortBy: BentoDatagridSortByColumn[]) => void;
182
164
  allItemsSelectedState: {
183
165
  allItemsSelected: boolean;
184
166
  isIndeterminate: boolean;
185
167
  };
186
168
  selectedItems: import("vue").Ref<BentoDatagridDataItemId[]>;
187
- onAllRowSelect: () => void;
169
+ onAllRowSelect: (allItemsSelected: boolean) => void;
188
170
  onRowSelect: () => void;
189
171
  DATAGRID_SELECT_FIELD_NAME: string;
172
+ compactView: import("vue").Ref<boolean>;
173
+ onConfigSettingsUpdate: (isCompactView: boolean) => boolean;
190
174
  BentoDatagridSortDirection: typeof BentoDatagridSortDirection;
191
175
  BentoTypographyElement: typeof BentoTypographyElement;
192
176
  BentoTypographyVariant: typeof BentoTypographyVariant;
193
- paginationNavigate: (page: number) => void;
177
+ onPaginationNavigate: (page: number) => void;
194
178
  onItemsPerPageChange: (itemsPerPage: number) => void;
195
- body: any;
196
179
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("sort" | "navigate" | "select" | "items-page" | "column-resize" | "update:filters")[], string, Readonly<import("vue").ExtractPropTypes<{
197
180
  condensed: {
198
181
  type: BooleanConstructor;
@@ -312,12 +295,12 @@ declare const _default: import("vue").DefineComponent<{
312
295
  loading: boolean;
313
296
  condensed: boolean;
314
297
  filters: import("../filter-bar").BentoFilterBarModel;
315
- getDataItemId: BentoDatagridGetDataItemIdFn;
316
298
  hasResizableColumns: boolean;
299
+ sortBy: BentoDatagridSortByColumn[];
300
+ getDataItemId: BentoDatagridGetDataItemIdFn;
317
301
  isDataItemDisabled: BentoDatagridIsDataItemDisabledFn;
318
302
  pagination: any;
319
303
  selectable: boolean;
320
304
  selection: BentoDatagridDataItemId[];
321
- sortBy: BentoDatagridSortByColumn[];
322
305
  }>;
323
306
  export default _default;
@@ -0,0 +1,100 @@
1
+ import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ autoComplete: {
4
+ type: BooleanConstructor;
5
+ default: boolean;
6
+ };
7
+ ariaControls: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ ariaExpanded: {
12
+ type: StringConstructor;
13
+ required: true;
14
+ };
15
+ ariaLabelledby: {
16
+ type: StringConstructor;
17
+ default: any;
18
+ };
19
+ disabled: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ isInvalid: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ displayValue: {
28
+ type: StringConstructor;
29
+ default: any;
30
+ };
31
+ open: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ placeholder: {
36
+ type: StringConstructor;
37
+ default: any;
38
+ };
39
+ }, {
40
+ BentoTypographyElement: typeof BentoTypographyElement;
41
+ BentoTypographyVariant: typeof BentoTypographyVariant;
42
+ conditionalClasses: import("vue").ComputedRef<{
43
+ 'b-dropdown-base-textbox--disabled': boolean;
44
+ }>;
45
+ computedDisplayValue: import("vue").ComputedRef<string>;
46
+ computedDropdownTextbox: import("vue").ComputedRef<"div" | "input">;
47
+ isInputField: import("vue").ComputedRef<boolean>;
48
+ shouldShowPlaceholder: import("vue").ComputedRef<boolean>;
49
+ textboxId: string;
50
+ textbox: any;
51
+ onCloseDropdown: () => void;
52
+ onToggleDropdown: () => void;
53
+ hasSlot: (name: string) => boolean;
54
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, ("open" | "close")[], string, Readonly<import("vue").ExtractPropTypes<{
55
+ autoComplete: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ ariaControls: {
60
+ type: StringConstructor;
61
+ required: true;
62
+ };
63
+ ariaExpanded: {
64
+ type: StringConstructor;
65
+ required: true;
66
+ };
67
+ ariaLabelledby: {
68
+ type: StringConstructor;
69
+ default: any;
70
+ };
71
+ disabled: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ isInvalid: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ displayValue: {
80
+ type: StringConstructor;
81
+ default: any;
82
+ };
83
+ open: {
84
+ type: BooleanConstructor;
85
+ default: boolean;
86
+ };
87
+ placeholder: {
88
+ type: StringConstructor;
89
+ default: any;
90
+ };
91
+ }>>, {
92
+ open: boolean;
93
+ disabled: boolean;
94
+ placeholder: string;
95
+ displayValue: string;
96
+ autoComplete: boolean;
97
+ ariaLabelledby: string;
98
+ isInvalid: boolean;
99
+ }>;
100
+ export default _default;
@@ -1,6 +1,6 @@
1
+ import { BentoSearchBarItem } from '../search-bar';
1
2
  export type AdlDropdownValue = string | number;
2
- export interface AdlDropdownOptionItem {
3
- label: string;
3
+ export interface AdlDropdownOptionItem extends BentoSearchBarItem {
4
4
  value: AdlDropdownValue;
5
5
  }
6
6
  export type AdlDropdownSelectedValue = AdlDropdownValue;
@@ -1 +1,2 @@
1
1
  export { default as BentoInputField } from './input-field.vue';
2
+ export * from './input-field.types';
@@ -11,3 +11,7 @@ export declare enum BentoInputFieldStateClass {
11
11
  DISABLED = "disabled",
12
12
  ERROR = "error"
13
13
  }
14
+ export declare enum BentoInputFieldType {
15
+ SEARCH = "search",
16
+ TEXT = "text"
17
+ }
@@ -1,7 +1,15 @@
1
1
  import { PropType } from 'vue';
2
- import { BentoInputFieldStaticValuePosition, BentoInputFieldVariant } from '@/components/input-field/input-field.types';
2
+ import { BentoInputFieldStaticValuePosition, BentoInputFieldType, BentoInputFieldVariant } from '@/components/input-field/input-field.types';
3
3
  import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
4
4
  declare const _default: import("vue").DefineComponent<{
5
+ ariaHidden: {
6
+ type: BooleanConstructor;
7
+ default: boolean;
8
+ };
9
+ ariaLabel: {
10
+ type: StringConstructor;
11
+ default: any;
12
+ };
5
13
  disabled: {
6
14
  type: BooleanConstructor;
7
15
  default: boolean;
@@ -18,6 +26,10 @@ declare const _default: import("vue").DefineComponent<{
18
26
  type: PropType<BentoInputFieldStaticValuePosition>;
19
27
  default: BentoInputFieldStaticValuePosition;
20
28
  };
29
+ type: {
30
+ type: PropType<BentoInputFieldType>;
31
+ default: BentoInputFieldType;
32
+ };
21
33
  value: {
22
34
  type: StringConstructor;
23
35
  default: string;
@@ -39,6 +51,14 @@ declare const _default: import("vue").DefineComponent<{
39
51
  shouldDisplayStaticValueAtStart: import("vue").ComputedRef<boolean>;
40
52
  shouldDisplayStaticValueAtEnd: import("vue").ComputedRef<boolean>;
41
53
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, "input"[], string, Readonly<import("vue").ExtractPropTypes<{
54
+ ariaHidden: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ ariaLabel: {
59
+ type: StringConstructor;
60
+ default: any;
61
+ };
42
62
  disabled: {
43
63
  type: BooleanConstructor;
44
64
  default: boolean;
@@ -55,6 +75,10 @@ declare const _default: import("vue").DefineComponent<{
55
75
  type: PropType<BentoInputFieldStaticValuePosition>;
56
76
  default: BentoInputFieldStaticValuePosition;
57
77
  };
78
+ type: {
79
+ type: PropType<BentoInputFieldType>;
80
+ default: BentoInputFieldType;
81
+ };
58
82
  value: {
59
83
  type: StringConstructor;
60
84
  default: string;
@@ -64,8 +88,11 @@ declare const _default: import("vue").DefineComponent<{
64
88
  default: BentoInputFieldVariant;
65
89
  };
66
90
  }>>, {
91
+ type: BentoInputFieldType;
67
92
  error: boolean;
68
93
  value: string;
94
+ ariaHidden: boolean;
95
+ ariaLabel: string;
69
96
  disabled: boolean;
70
97
  variant: BentoInputFieldVariant;
71
98
  staticValue: string;
@@ -0,0 +1,3 @@
1
+ export { default as BentoSearchBar } from './search-bar.vue';
2
+ export * from './useSearchBarDataFilter';
3
+ export * from './search-bar.types';
@@ -0,0 +1,4 @@
1
+ export interface BentoSearchBarItem {
2
+ label: string;
3
+ }
4
+ export type BentoSearchBarData = Array<BentoSearchBarItem>;
@@ -0,0 +1,37 @@
1
+ import { BentoInputFieldType } from '@/components/input-field';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ ariaLabel: {
4
+ type: StringConstructor;
5
+ required: true;
6
+ };
7
+ debounceTime: {
8
+ type: NumberConstructor;
9
+ default: number;
10
+ };
11
+ value: {
12
+ type: StringConstructor;
13
+ default: any;
14
+ };
15
+ }, {
16
+ searchTerm: import("vue").Ref<string>;
17
+ onClearSearch: () => void;
18
+ onInputEvent: (...args: void[]) => void;
19
+ BentoInputFieldType: typeof BentoInputFieldType;
20
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("input" | "clear")[], string, Readonly<import("vue").ExtractPropTypes<{
21
+ ariaLabel: {
22
+ type: StringConstructor;
23
+ required: true;
24
+ };
25
+ debounceTime: {
26
+ type: NumberConstructor;
27
+ default: number;
28
+ };
29
+ value: {
30
+ type: StringConstructor;
31
+ default: any;
32
+ };
33
+ }>>, {
34
+ value: string;
35
+ debounceTime: number;
36
+ }>;
37
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { Ref } from 'vue';
2
+ import { BentoSearchBarData } from './search-bar.types';
3
+ export declare const useSearchBarFilter: (searchTerm: Ref<string>, data: Ref<BentoSearchBarData>) => import("vue").ComputedRef<import("./search-bar.types").BentoSearchBarItem[]>;
@@ -70,9 +70,9 @@ declare const _default: import("vue").DefineComponent<{
70
70
  medium: boolean;
71
71
  el: BentoTypographyElement;
72
72
  large: boolean;
73
+ wide: boolean;
73
74
  stronger: boolean;
74
75
  strongest: boolean;
75
76
  variant: BentoTypographyVariant;
76
- wide: boolean;
77
77
  }>;
78
78
  export default _default;
@@ -7,7 +7,6 @@ import {
7
7
  // AdlCardImage,
8
8
  // AdlDropdown,
9
9
  // AdlPageHeader,
10
- // AdlProfilePicture,
11
10
  // AdlSegmentedControl,
12
11
  // AdlSegmentedOption,
13
12
  // AdlTab,
@@ -22,6 +21,7 @@ import {
22
21
  BentoCheckbox,
23
22
  BentoCheckboxGroup,
24
23
  BentoClickOutside,
24
+ BentoCountry,
25
25
  BentoDataGrid,
26
26
  BentoInputField,
27
27
  BentoLink,
@@ -30,6 +30,7 @@ import {
30
30
  BentoPagination,
31
31
  BentoPopover,
32
32
  BentoRadioGroup,
33
+ BentoSearchBar,
33
34
  BentoStatus,
34
35
  BentoTag,
35
36
  BentoToggle,
@@ -45,7 +46,6 @@ declare module 'vue' {
45
46
  // AdlCard: typeof AdlCard;
46
47
  // AdlCardImage: typeof AdlCardImage;
47
48
  // AdlDropdown: typeof AdlDropdown;
48
- // AdlProfilePicture: typeof AdlProfilePicture;
49
49
  // AdlPageHeader: typeof AdlPageHeader;
50
50
  // AdlSegmentedControl: typeof AdlSegmentedControl;
51
51
  // AdlSegmentedOption: typeof AdlSegmentedOption;
@@ -61,6 +61,7 @@ declare module 'vue' {
61
61
  BentoCheckbox: typeof BentoCheckbox;
62
62
  BentoCheckboxGroup: typeof BentoCheckboxGroup;
63
63
  BentoClickOutside: typeof BentoClickOutside;
64
+ BentoCountry: typeof BentoCountry;
64
65
  BentoDataGrid: typeof BentoDataGrid;
65
66
  BentoInputField: typeof BentoInputField;
66
67
  BentoLink: typeof BentoLink;
@@ -69,6 +70,7 @@ declare module 'vue' {
69
70
  BentoPagination: typeof BentoPagination;
70
71
  BentoPopover: typeof BentoPopover;
71
72
  BentoRadioGroup: typeof BentoRadioGroup;
73
+ BentoSearchBar: typeof BentoSearchBar;
72
74
  BentoStatus: typeof BentoStatus;
73
75
  BentoTag: typeof BentoTag;
74
76
  BentoToggle: typeof BentoToggle;
@@ -4,6 +4,7 @@ export * from './components/button';
4
4
  export * from './components/data-grid';
5
5
  export * from './components/checkbox';
6
6
  export * from './components/click-outside';
7
+ export * from './components/country';
7
8
  export * from './components/filter-bar';
8
9
  export * from './components/input-field';
9
10
  export * from './components/loading-indicator';
@@ -11,6 +12,7 @@ export * from './components/link';
11
12
  export * from './components/pagination';
12
13
  export * from './components/popover';
13
14
  export * from './components/radio-group';
15
+ export * from './components/search-bar';
14
16
  export * from './components/status';
15
17
  export * from './components/tag';
16
18
  export * from './components/toggle';
@@ -0,0 +1,2 @@
1
+ import { AnyFn } from '../../../types';
2
+ export declare const debounce: <T>(callback: AnyFn<T>, debounceTime: number) => (...args: T[]) => void;
@@ -0,0 +1 @@
1
+ export * from './debounce';
@@ -0,0 +1,2 @@
1
+ import type { Slots } from 'vue/types/v3-setup-context';
2
+ export declare const hasSlot: (slots: Slots) => (name: string) => boolean;
@@ -1,6 +1,15 @@
1
1
  import type { WritableComputedRef } from 'vue';
2
2
  import VueI18n from 'vue-i18n';
3
- export declare function createI18n(options?: VueI18n.I18nOptions): VueI18n;
3
+ export declare const defaultI18nOptions: {
4
+ locale: string;
5
+ fallbackLocale: string;
6
+ fallbackRoot: boolean;
7
+ };
8
+ export declare function createI18n(options?: {
9
+ locale: string;
10
+ fallbackLocale: string;
11
+ fallbackRoot: boolean;
12
+ }): VueI18n;
4
13
  export interface Composer {
5
14
  locale: WritableComputedRef<string>;
6
15
  t: typeof VueI18n.prototype.t;