@adyen/bento-vue2 0.1.4 → 0.2.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 (83) hide show
  1. package/dist/@types/components/button/components/button-actions/button-actions.types.d.ts +1 -0
  2. package/dist/@types/components/checkbox/checkbox.vue.d.ts +2 -2
  3. package/dist/@types/components/country/country.types.d.ts +2 -1
  4. package/dist/@types/components/country/country.vue.d.ts +10 -1
  5. package/dist/@types/components/country/index.d.ts +1 -0
  6. package/dist/@types/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +1 -0
  7. package/dist/@types/components/data-grid/data-grid.types.d.ts +1 -0
  8. package/dist/@types/components/data-grid/data-grid.vue.d.ts +13 -1
  9. package/dist/@types/components/date/date.types.d.ts +17 -0
  10. package/dist/@types/components/date/date.vue.d.ts +30 -0
  11. package/dist/@types/components/date/index.d.ts +2 -0
  12. package/dist/@types/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +19 -1
  13. package/dist/@types/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +19 -0
  14. package/dist/@types/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +13 -13
  15. package/dist/@types/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.types.d.ts +5 -0
  16. package/dist/@types/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +114 -0
  17. package/dist/@types/components/dropdown/components/variants/dropdown-country/composables/useCountryItems.d.ts +5 -0
  18. package/dist/@types/components/dropdown/components/variants/dropdown-country/dropdown-country.types.d.ts +7 -0
  19. package/dist/@types/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +123 -0
  20. package/dist/@types/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types.d.ts +6 -0
  21. package/dist/@types/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +109 -0
  22. package/dist/@types/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types.d.ts +6 -0
  23. package/dist/@types/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +109 -0
  24. package/dist/@types/components/dropdown/dropdown.vue.d.ts +13 -12
  25. package/dist/@types/components/dropdown/index.d.ts +4 -1
  26. package/dist/@types/components/filter-bar/components/base-filter/base-filter.vue.d.ts +33 -10
  27. package/dist/@types/components/filter-bar/components/base-filter/composables/use-base-filter.d.ts +6 -0
  28. package/dist/@types/components/filter-bar/components/base-filter/index.d.ts +1 -0
  29. package/dist/@types/components/filter-bar/components/listbox-filter/index.d.ts +1 -0
  30. package/dist/@types/components/filter-bar/components/listbox-filter/listbox-filter.vue.d.ts +53 -0
  31. package/dist/@types/components/filter-bar/components/text-filter/text-filter.vue.d.ts +4 -5
  32. package/dist/@types/components/filter-bar/filter-bar.types.d.ts +12 -4
  33. package/dist/@types/components/filter-bar/filter-bar.vue.d.ts +19 -4
  34. package/dist/@types/components/info-icon/index.d.ts +1 -0
  35. package/dist/@types/components/info-icon/info-icon.vue.d.ts +12 -0
  36. package/dist/@types/components/internal/index.d.ts +1 -0
  37. package/dist/@types/components/internal/listbox/components/listbox-multi-select/index.d.ts +1 -0
  38. package/dist/@types/components/{dropdown/components/dropdown-options-container/components/dropdown-multi-select/dropdown-multi-select.vue.d.ts → internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts} +13 -13
  39. package/dist/@types/components/internal/listbox/components/listbox-option/index.d.ts +1 -0
  40. package/dist/@types/components/{dropdown/components/dropdown-options-container/components/dropdown-option/dropdown-option.vue.d.ts → internal/listbox/components/listbox-option/listbox-option.vue.d.ts} +2 -2
  41. package/dist/@types/components/internal/listbox/components/listbox-option-currency/index.d.ts +1 -0
  42. package/dist/@types/components/internal/listbox/components/listbox-option-currency/listbox-option-currency.vue.d.ts +17 -0
  43. package/dist/@types/components/internal/listbox/components/listbox-single-select-option/index.d.ts +1 -0
  44. package/dist/@types/components/{dropdown/components/dropdown-options-container/components/dropdown-single-select-option/dropdown-single-select-option.vue.d.ts → internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts} +5 -22
  45. package/dist/@types/components/internal/listbox/index.d.ts +2 -0
  46. package/dist/@types/components/internal/listbox/listbox.vue.d.ts +61 -0
  47. package/dist/@types/components/page-header/components/title-item/title-item.vue.d.ts +11 -1
  48. package/dist/@types/components/page-header/page-header.vue.d.ts +11 -1
  49. package/dist/@types/components/pagination/components/pagination-context/pagination-context.vue.d.ts +2 -2
  50. package/dist/@types/components/payment-method/composables/index.d.ts +1 -0
  51. package/dist/@types/components/payment-method/composables/usePaymentIcon.d.ts +3 -0
  52. package/dist/@types/components/payment-method/index.d.ts +2 -0
  53. package/dist/@types/components/payment-method/payment-method.types.d.ts +1079 -0
  54. package/dist/@types/components/payment-method/payment-method.vue.d.ts +28 -0
  55. package/dist/@types/components/popover/popover.vue.d.ts +1 -1
  56. package/dist/@types/components/radio-group/components/radio-button/radio-button.vue.d.ts +2 -3
  57. package/dist/@types/components/search-bar/search-bar.vue.d.ts +2 -2
  58. package/dist/@types/components/toast/components/toast-item/index.d.ts +2 -0
  59. package/dist/@types/components/toast/components/toast-item/toast-item.types.d.ts +9 -0
  60. package/dist/@types/components/toast/components/toast-item/toast-item.vue.d.ts +32 -0
  61. package/dist/@types/components/toast/index.d.ts +2 -0
  62. package/dist/@types/components/toast/toast.vue.d.ts +13 -0
  63. package/dist/@types/components/toggle/toggle.vue.d.ts +2 -2
  64. package/dist/@types/components.d.ts +16 -0
  65. package/dist/@types/composables/index.d.ts +1 -0
  66. package/dist/@types/composables/use-checkbox-select-all/use-checkbox-select-all.d.ts +2 -2
  67. package/dist/@types/composables/use-default-slot-validator.d.ts +1 -0
  68. package/dist/@types/composables/useDynamicImport.d.ts +2 -0
  69. package/dist/@types/index.d.ts +4 -0
  70. package/dist/@types/install.d.ts +1 -0
  71. package/dist/@types/plugins/toastController.d.ts +12 -0
  72. package/dist/@types/types/index.d.ts +2 -0
  73. package/dist/@types/types/listbox.d.ts +11 -0
  74. package/dist/@types/types/omit-strict.d.ts +1 -0
  75. package/dist/@types/utils/ts/toastController.d.ts +3 -0
  76. package/dist/@types/utils/ts/use-slot-text.d.ts +2 -0
  77. package/dist/index.js +7111 -4317
  78. package/dist/index.js.map +1 -1
  79. package/package.json +9 -7
  80. package/dist/@types/components/dropdown/components/dropdown-options-container/components/dropdown-multi-select/index.d.ts +0 -1
  81. package/dist/@types/components/dropdown/components/dropdown-options-container/components/dropdown-option/index.d.ts +0 -1
  82. package/dist/@types/components/dropdown/components/dropdown-options-container/components/dropdown-single-select-option/index.d.ts +0 -1
  83. package/dist/@types/components/dropdown/dropdown.types.d.ts +0 -10
@@ -0,0 +1,28 @@
1
+ import { PropType } from 'vue';
2
+ import { BentoTypographyElement } from '../typography';
3
+ import { BentoPaymentMethodType } from './payment-method.types';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ type: {
6
+ type: PropType<BentoPaymentMethodType>;
7
+ default: BentoPaymentMethodType;
8
+ };
9
+ label: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ }, {
14
+ paymentMethodIconSrc: import("vue").Ref<string>;
15
+ BentoTypographyElement: typeof BentoTypographyElement;
16
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
17
+ type: {
18
+ type: PropType<BentoPaymentMethodType>;
19
+ default: BentoPaymentMethodType;
20
+ };
21
+ label: {
22
+ type: StringConstructor;
23
+ required: true;
24
+ };
25
+ }>>, {
26
+ type: BentoPaymentMethodType;
27
+ }>;
28
+ export default _default;
@@ -132,8 +132,8 @@ declare const _default: import("vue").DefineComponent<{
132
132
  modifiers: unknown[];
133
133
  large: boolean;
134
134
  actions: BentoButtonActionsList;
135
- fixedPositioning: boolean;
136
135
  actionsLayout: BentoButtonActionsLayout;
136
+ fixedPositioning: boolean;
137
137
  divider: boolean;
138
138
  disableFocusTrap: boolean;
139
139
  dismissible: boolean;
@@ -16,9 +16,8 @@ declare const _default: import("vue").DefineComponent<{
16
16
  }, {
17
17
  ariaLabel: ComputedRef<string>;
18
18
  isChecked: ComputedRef<boolean>;
19
- shouldShowDescription: ComputedRef<string>;
20
- shouldShowLabel: ComputedRef<string>;
21
- shouldShowSubLabel: ComputedRef<string>;
19
+ defaultSlotValue: string;
20
+ subLabelSlotValue: string;
22
21
  conditionalClass: ComputedRef<{
23
22
  'b-radio-button--disabled': boolean;
24
23
  }>;
@@ -1,6 +1,6 @@
1
1
  import { BentoInputFieldType } from '@/components/input-field';
2
2
  declare const _default: import("vue").DefineComponent<{
3
- ariaLabel: {
3
+ inputFieldAriaLabel: {
4
4
  type: StringConstructor;
5
5
  required: true;
6
6
  };
@@ -190,7 +190,7 @@ declare const _default: import("vue").DefineComponent<{
190
190
  onInputEvent: () => void;
191
191
  BentoInputFieldType: typeof BentoInputFieldType;
192
192
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("input" | "clear" | "escape-pressed")[], string, Readonly<import("vue").ExtractPropTypes<{
193
- ariaLabel: {
193
+ inputFieldAriaLabel: {
194
194
  type: StringConstructor;
195
195
  required: true;
196
196
  };
@@ -0,0 +1,2 @@
1
+ export { default as ToastItem } from './toast-item.vue';
2
+ export * from './toast-item.types';
@@ -0,0 +1,9 @@
1
+ export interface BentoToastItemAction {
2
+ handler: () => void;
3
+ text: string;
4
+ }
5
+ export interface BentoToastItem {
6
+ action?: BentoToastItemAction;
7
+ text: string;
8
+ dismiss?: () => void;
9
+ }
@@ -0,0 +1,32 @@
1
+ import { PropType } from 'vue';
2
+ import { BentoToastItemAction } from './toast-item.types';
3
+ import { BentoButtonVariant } from '@/components/button';
4
+ import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
5
+ declare const _default: import("vue").DefineComponent<{
6
+ text: {
7
+ type: StringConstructor;
8
+ required: true;
9
+ };
10
+ action: {
11
+ type: PropType<BentoToastItemAction>;
12
+ default: any;
13
+ };
14
+ }, {
15
+ BentoButtonVariant: typeof BentoButtonVariant;
16
+ BentoTypographyElement: typeof BentoTypographyElement;
17
+ BentoTypographyVariant: typeof BentoTypographyVariant;
18
+ dismissButtonClicked: () => void;
19
+ hasSlot: (name: string) => boolean;
20
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("click" | "dismiss")[], string, Readonly<import("vue").ExtractPropTypes<{
21
+ text: {
22
+ type: StringConstructor;
23
+ required: true;
24
+ };
25
+ action: {
26
+ type: PropType<BentoToastItemAction>;
27
+ default: any;
28
+ };
29
+ }>>, {
30
+ action: BentoToastItemAction;
31
+ }>;
32
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as BentoToast } from './toast.vue';
2
+ export { useBentoToastController } from '@/utils/ts/toastController';
@@ -0,0 +1,13 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ computedPositioning: import("vue").ComputedRef<{
3
+ top: string;
4
+ width: string;
5
+ }[]>;
6
+ computedHeight: import("vue").ComputedRef<{
7
+ bottom: string;
8
+ height: string;
9
+ }>;
10
+ toastsToShow: import("vue").ComputedRef<import("./components/toast-item").BentoToastItem[]>;
11
+ toast: any;
12
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
13
+ export default _default;
@@ -25,8 +25,8 @@ declare const _default: import("vue").DefineComponent<{
25
25
  BentoTypographyVariant: typeof BentoTypographyVariant;
26
26
  computedAriaLabel: import("vue").ComputedRef<string>;
27
27
  computedDescription: import("vue").ComputedRef<string>;
28
- shouldDisplayLabelSlot: import("vue").ComputedRef<boolean>;
29
- shouldDisplaySubLabelSlot: import("vue").ComputedRef<boolean>;
28
+ defaultSlotValue: string;
29
+ subLabelSlotValue: string;
30
30
  conditionalClasses: import("vue").ComputedRef<{
31
31
  [key: string]: boolean;
32
32
  }>;
@@ -23,17 +23,25 @@ import {
23
23
  BentoCountry,
24
24
  BentoCurrency,
25
25
  BentoDataGrid,
26
+ BentoDate,
26
27
  BentoDropdown,
28
+ BentoDropdownAvatar,
29
+ BentoDropdownCountry,
30
+ BentoDropdownCurrency,
31
+ BentoDropdownPaymentMethod,
32
+ BentoInfoIcon,
27
33
  BentoInputField,
28
34
  BentoLink,
29
35
  BentoLoadingButton,
30
36
  BentoLoadingIndicator,
31
37
  BentoPagination,
38
+ BentoPaymentMethod,
32
39
  BentoPopover,
33
40
  BentoRadioGroup,
34
41
  BentoSearchBar,
35
42
  BentoStatus,
36
43
  BentoTag,
44
+ BentoToast,
37
45
  BentoToggle,
38
46
  BentoTypography,
39
47
  } from './index';
@@ -64,17 +72,25 @@ declare module 'vue' {
64
72
  BentoCountry: typeof BentoCountry;
65
73
  BentoCurrency: typeof BentoCurrency;
66
74
  BentoDataGrid: typeof BentoDataGrid;
75
+ BentoDate: typeof BentoDate;
67
76
  BentoDropdown: typeof BentoDropdown;
77
+ BentoDropdownAvatar: typeof BentoDropdownAvatar;
78
+ BentoDropdownCountry: typeof BentoDropdownCountry;
79
+ BentoInfoIcon: typeof BentoInfoIcon;
80
+ BentoDropdownCurrency: typeof BentoDropdownCurrency;
81
+ BentoDropdownPaymentMethod: typeof BentoDropdownPaymentMethod;
68
82
  BentoInputField: typeof BentoInputField;
69
83
  BentoLink: typeof BentoLink;
70
84
  BentoLoadingButton: typeof BentoLoadingButton;
71
85
  BentoLoadingIndicator: typeof BentoLoadingIndicator;
72
86
  BentoPagination: typeof BentoPagination;
87
+ BentoPaymentMethod: typeof BentoPaymentMethod;
73
88
  BentoPopover: typeof BentoPopover;
74
89
  BentoRadioGroup: typeof BentoRadioGroup;
75
90
  BentoSearchBar: typeof BentoSearchBar;
76
91
  BentoStatus: typeof BentoStatus;
77
92
  BentoTag: typeof BentoTag;
93
+ BentoToast: typeof BentoToast;
78
94
  BentoToggle: typeof BentoToggle;
79
95
  BentoTypography: typeof BentoTypography;
80
96
  }
@@ -1,2 +1,3 @@
1
1
  export * from './initials';
2
+ export * from './use-default-slot-validator';
2
3
  export * from './use-checkbox-select-all/use-checkbox-select-all';
@@ -1,7 +1,7 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { Fn } from '../../types';
3
- import { BentoDropdownMultiSelectValue, BentoDropdownOptions } from '../../components/dropdown';
4
- export declare const useCheckboxSelectAll: (selectedItemsList: Ref<BentoDropdownMultiSelectValue>, items: ComputedRef<BentoDropdownOptions>, selectAll: Fn, unselectAll: Fn) => {
3
+ import { BentoListboxMultiSelectValue, BentoListboxOptions } from '../../types';
4
+ export declare const useCheckboxSelectAll: (selectedItemsList: Ref<BentoListboxMultiSelectValue>, items: ComputedRef<BentoListboxOptions>, selectAll: Fn, unselectAll: Fn) => {
5
5
  isAllSelected: ComputedRef<boolean>;
6
6
  isIndeterminate: ComputedRef<boolean>;
7
7
  toggleSelectAll: (selectedValue: boolean) => void;
@@ -0,0 +1 @@
1
+ export declare const useDefaultSlotValidator: (componentName: string, defaultSlotValue: string, ...optionalSlotsValue: string[]) => void;
@@ -0,0 +1,2 @@
1
+ import { MaybeRef } from '../types';
2
+ export declare const useDynamicIconImport: (packageName: string, suffixSvgSrc: MaybeRef<string>, fallBackSrc: string) => import("vue").Ref<string>;
@@ -9,16 +9,20 @@ export * from './components/checkbox';
9
9
  export * from './components/click-outside';
10
10
  export * from './components/country';
11
11
  export * from './components/currency';
12
+ export * from './components/date';
12
13
  export * from './components/filter-bar';
14
+ export * from './components/info-icon';
13
15
  export * from './components/input-field';
14
16
  export * from './components/loading-indicator';
15
17
  export * from './components/link';
16
18
  export * from './components/pagination';
19
+ export * from './components/payment-method';
17
20
  export * from './components/popover';
18
21
  export * from './components/radio-group';
19
22
  export * from './components/search-bar';
20
23
  export * from './components/status';
21
24
  export * from './components/tag';
25
+ export * from './components/toast';
22
26
  export * from './components/toggle';
23
27
  export * from './components/typography';
24
28
  export * from './types';
@@ -5,6 +5,7 @@ export declare enum BentoTheme {
5
5
  }
6
6
  interface BentoVuePlugin {
7
7
  theme: BentoTheme;
8
+ withToast: boolean;
8
9
  }
9
10
  declare const _default: PluginObject<BentoVuePlugin>;
10
11
  export default _default;
@@ -0,0 +1,12 @@
1
+ import { BentoToastItem } from '../components/toast/components/toast-item';
2
+ export default class ToastController {
3
+ get state(): {
4
+ queue: Array<BentoToastItem>;
5
+ };
6
+ private _state;
7
+ constructor();
8
+ private dismissToast;
9
+ addToast(params: BentoToastItem): {
10
+ dismiss: () => void;
11
+ };
12
+ }
@@ -1,5 +1,7 @@
1
1
  export * from './elements';
2
2
  export * from './functions';
3
3
  export * from './label-position';
4
+ export * from './omit-strict';
4
5
  export * from './prop-types';
5
6
  export * from './refs';
7
+ export * from './listbox';
@@ -0,0 +1,11 @@
1
+ import { BentoSearchBarItem } from '../components/search-bar';
2
+ export type BentoListboxValue = string | number;
3
+ export type BentoListboxMultiSelectValue = BentoListboxValue[];
4
+ export interface BentoListboxOptionItem extends BentoSearchBarItem {
5
+ data?: unknown;
6
+ description?: string;
7
+ value: BentoListboxValue;
8
+ }
9
+ export type BentoListboxSelectedValue = BentoListboxValue | BentoListboxMultiSelectValue;
10
+ export type BentoListboxOptions = Array<BentoListboxOptionItem>;
11
+ export type BentoListboxIsOptionDisabled = (optionValue: BentoListboxOptionItem) => boolean | undefined;
@@ -0,0 +1 @@
1
+ export type OmitStrict<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
@@ -0,0 +1,3 @@
1
+ import BentoToastController from '../../plugins/toastController';
2
+ export declare function useBentoToastController(): BentoToastController;
3
+ export declare function installToastControllerPlugin(): void;
@@ -0,0 +1,2 @@
1
+ import type { Slot } from 'vue/types/v3-setup-context';
2
+ export declare const useSlotText: (slot: Slot) => string;