@adyen/bento-vue2 0.0.7 → 0.0.9

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 (34) hide show
  1. package/README.md +31 -5
  2. package/dist/@types/components/alert/alert.types.d.ts +3 -3
  3. package/dist/@types/components/alert/alert.vue.d.ts +21 -8
  4. package/dist/@types/components/alert/index.d.ts +1 -1
  5. package/dist/@types/components/button/button.vue.d.ts +1 -0
  6. package/dist/@types/components/checkbox/checkbox.vue.d.ts +6 -4
  7. package/dist/@types/components/checkbox/components/checkbox-group/checkbox-group.types.d.ts +11 -0
  8. package/dist/@types/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +58 -0
  9. package/dist/@types/components/checkbox/components/checkbox-group/index.d.ts +2 -0
  10. package/dist/@types/components/checkbox/index.d.ts +1 -0
  11. package/dist/@types/components/data-grid/components/data-grid-columns.vue.d.ts +74 -0
  12. package/dist/@types/components/data-grid/components/index.d.ts +1 -0
  13. package/dist/@types/components/data-grid/composables/index.d.ts +4 -0
  14. package/dist/@types/components/data-grid/composables/useCalculateColumnWidth/useCalculateColumnWidth.d.ts +23 -4
  15. package/dist/@types/components/data-grid/composables/useResizer.d.ts +3 -12
  16. package/dist/@types/components/data-grid/composables/useSelector.d.ts +1 -1
  17. package/dist/@types/components/data-grid/composables/useSorter.d.ts +1 -1
  18. package/dist/@types/components/data-grid/data-grid.types.d.ts +11 -0
  19. package/dist/@types/components/data-grid/data-grid.vue.d.ts +23 -30
  20. package/dist/@types/components/{radio-button → radio-group/components/radio-button}/radio-button.vue.d.ts +5 -4
  21. package/dist/@types/components/radio-group/index.d.ts +2 -0
  22. package/dist/@types/components/radio-group/radio-group.types.d.ts +11 -0
  23. package/dist/@types/components/radio-group/radio-group.vue.d.ts +58 -0
  24. package/dist/@types/components.d.ts +6 -4
  25. package/dist/@types/index.d.ts +2 -1
  26. package/dist/@types/utils/ts/debounce/debounce.d.ts +2 -0
  27. package/dist/@types/utils/ts/debounce/index.d.ts +1 -0
  28. package/dist/@types/utils/ts/hasSlot.d.ts +2 -0
  29. package/dist/@types/utils/ts/i18n.d.ts +5 -0
  30. package/dist/index.js +1715 -1297
  31. package/dist/index.js.map +1 -1
  32. package/package.json +5 -5
  33. package/dist/@types/components/radio-button/index.d.ts +0 -1
  34. package/dist/@types/i18n/index.d.ts +0 -8
package/README.md CHANGED
@@ -30,7 +30,8 @@ In order to use the compoent via the `BentoVue` plugin, the following steps must
30
30
 
31
31
  1. Load the plugin globally in **Vue**
32
32
  2. Import the `font.css` file.
33
- 3. Use the library defined components in your application
33
+ 3. Initialize `vue-i18n`.
34
+ 4. Use the library defined components in your application
34
35
 
35
36
  #### Load plugin and register components
36
37
 
@@ -54,22 +55,47 @@ NOTE: make sure the builder your are using (e.g. `webpack` , `vite`, etc...) is
54
55
  import '@adyen/bento-vue2/fonts.css';
55
56
  ```
56
57
 
58
+ #### Initialize `vue-i18n`
59
+
60
+ Some Bento components require translations for which the `vue-i18n` package was used so it has to be initialized like
61
+ this:
62
+
63
+ ```diff
64
+ import Vue from 'vue';
65
+ + import VueI18n from 'vue-i18n';
66
+ +
67
+ + Vue.use(VueI18n);
68
+ +
69
+ + const i18n = new VueI18n({
70
+ + locale: 'en-US',
71
+ + fallbackLocale: 'en-US',
72
+ + fallbackRoot: false,
73
+ + });
74
+
75
+ const app = new Vue({
76
+ el: '#app',
77
+ router,
78
+ template: '<router-view />',
79
+ + i18n,
80
+ });
81
+ ```
82
+
57
83
  #### Use the components
58
84
 
59
85
  Inside the `.vue` components of your application, you can simply use the available components:
60
86
 
61
87
  ```javascript
62
88
  <template>
63
- <b-button @click="onClickHandler">
89
+ <bento-button @click="onClickHandler">
64
90
  {{ buttonLabel }}
65
- </b-button>
91
+ </bento-button>
66
92
  </template>
67
93
 
68
94
  <script>
69
- import { BButton } from '@adyen/bento-vue2'
95
+ import { BentoButton } from '@adyen/bento-vue2'
70
96
 
71
97
  export default {
72
- components: { BButton },
98
+ components: { BentoButton },
73
99
  data: () => ({
74
100
  buttonLabel: 'Button text'
75
101
  }),
@@ -1,6 +1,6 @@
1
- export declare enum AdlAlertSeverityOption {
1
+ export declare enum BentoAlertSeverityOption {
2
2
  WARNING = "warning",
3
- ERROR = "error",
4
- INFO = "info",
3
+ CRITICAL = "critical",
4
+ HIGHLIGHT = "highlight",
5
5
  SUCCESS = "success"
6
6
  }
@@ -1,34 +1,47 @@
1
1
  import { PropType } from 'vue';
2
- import { AdlAlertSeverityOption } from '@/components/alert/alert.types';
2
+ import { BentoAlertSeverityOption } from '@/components/alert/alert.types';
3
3
  import { BentoButtonVariant } from '@/components/button/button.types';
4
+ import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
4
5
  declare const _default: import("vue").DefineComponent<{
5
6
  severity: {
6
- type: PropType<AdlAlertSeverityOption>;
7
- default: AdlAlertSeverityOption;
7
+ type: PropType<BentoAlertSeverityOption>;
8
+ default: BentoAlertSeverityOption;
8
9
  };
9
10
  closeButton: {
10
11
  type: BooleanConstructor;
11
12
  default: boolean;
12
13
  };
14
+ inline: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
13
18
  }, {
14
19
  alertConditionalClasses: import("vue").ComputedRef<{
15
- [x: string]: AdlAlertSeverityOption;
20
+ [x: string]: boolean | BentoAlertSeverityOption;
21
+ 'b-alert--inline': boolean;
16
22
  }>;
17
23
  computedRole: import("vue").ComputedRef<"alert" | "status">;
18
24
  onCloseButtonClick: () => void;
19
25
  BentoButtonVariant: typeof BentoButtonVariant;
20
- AdlAlertSeverityOption: typeof AdlAlertSeverityOption;
26
+ BentoAlertSeverityOption: typeof BentoAlertSeverityOption;
27
+ BentoTypographyVariant: typeof BentoTypographyVariant;
28
+ BentoTypographyElement: typeof BentoTypographyElement;
21
29
  }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, "close-alert"[], string, Readonly<import("vue").ExtractPropTypes<{
22
30
  severity: {
23
- type: PropType<AdlAlertSeverityOption>;
24
- default: AdlAlertSeverityOption;
31
+ type: PropType<BentoAlertSeverityOption>;
32
+ default: BentoAlertSeverityOption;
25
33
  };
26
34
  closeButton: {
27
35
  type: BooleanConstructor;
28
36
  default: boolean;
29
37
  };
38
+ inline: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
30
42
  }>>, {
31
- severity: AdlAlertSeverityOption;
43
+ inline: boolean;
44
+ severity: BentoAlertSeverityOption;
32
45
  closeButton: boolean;
33
46
  }>;
34
47
  export default _default;
@@ -1,2 +1,2 @@
1
- export { default as AdlAlert } from './alert.vue';
1
+ export { default as BentoAlert } from './alert.vue';
2
2
  export * from './alert.types';
@@ -31,6 +31,7 @@ declare const _default: import("vue").DefineComponent<{
31
31
  [x: string]: boolean;
32
32
  }>;
33
33
  onClickButton: () => void;
34
+ hasSlot: (name: string) => boolean;
34
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<{
35
36
  disabled: {
36
37
  type: BooleanConstructor;
@@ -23,17 +23,19 @@ declare const _default: import("vue").DefineComponent<{
23
23
  default: any;
24
24
  };
25
25
  }, {
26
- computedAriaLabel: import("vue").ComputedRef<string>;
27
26
  ariaChecked: import("vue").ComputedRef<"mixed" | (boolean | "false" | "true")>;
28
- isCheckboxGroup: import("vue").ComputedRef<boolean>;
29
- isChecked: import("vue").ComputedRef<boolean>;
30
- isIndeterminate: import("vue").ComputedRef<boolean>;
27
+ computedAriaLabel: import("vue").ComputedRef<string>;
31
28
  conditionalClass: import("vue").ComputedRef<{
32
29
  'b-checkbox--disabled': boolean;
33
30
  }>;
34
31
  conditionalClassOutline: import("vue").ComputedRef<{
35
32
  'b-checkbox__outline--unchecked': boolean;
36
33
  }>;
34
+ defaultSlot: import("vue").ComputedRef<string>;
35
+ descriptionSlot: import("vue").ComputedRef<string>;
36
+ isCheckboxGroup: import("vue").ComputedRef<boolean>;
37
+ isChecked: import("vue").ComputedRef<boolean>;
38
+ isIndeterminate: import("vue").ComputedRef<boolean>;
37
39
  BentoTypographyElement: typeof BentoTypographyElement;
38
40
  BentoTypographyVariant: typeof BentoTypographyVariant;
39
41
  onChange: (event: Event) => void;
@@ -0,0 +1,11 @@
1
+ export declare enum BentoCheckboxGroupVariant {
2
+ HORIZONTAL = "horizontal",
3
+ VERTICAL = "vertical"
4
+ }
5
+ export interface BentoCheckboxGroupItem {
6
+ value: string | number;
7
+ label: string;
8
+ description?: string;
9
+ disabled?: boolean;
10
+ }
11
+ export type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;
@@ -0,0 +1,58 @@
1
+ import { PropType } from 'vue';
2
+ import { BentoCheckboxGroupItems, BentoCheckboxGroupVariant } from './checkbox-group.types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ items: {
5
+ type: PropType<BentoCheckboxGroupItems>;
6
+ required: true;
7
+ };
8
+ variant: {
9
+ type: PropType<BentoCheckboxGroupVariant>;
10
+ default: BentoCheckboxGroupVariant;
11
+ validator: (value: BentoCheckboxGroupVariant) => boolean;
12
+ };
13
+ formId: {
14
+ type: StringConstructor;
15
+ default: any;
16
+ };
17
+ disabled: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ label: {
22
+ type: StringConstructor;
23
+ required: true;
24
+ };
25
+ }, {
26
+ conditionalClasses: import("vue").ComputedRef<{
27
+ 'b-checkbox-group--horizontal': boolean;
28
+ }>;
29
+ modelValue: import("vue").Ref<any[]>;
30
+ onInput: (value: any) => void;
31
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, "input"[], string, Readonly<import("vue").ExtractPropTypes<{
32
+ items: {
33
+ type: PropType<BentoCheckboxGroupItems>;
34
+ required: true;
35
+ };
36
+ variant: {
37
+ type: PropType<BentoCheckboxGroupVariant>;
38
+ default: BentoCheckboxGroupVariant;
39
+ validator: (value: BentoCheckboxGroupVariant) => boolean;
40
+ };
41
+ formId: {
42
+ type: StringConstructor;
43
+ default: any;
44
+ };
45
+ disabled: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ label: {
50
+ type: StringConstructor;
51
+ required: true;
52
+ };
53
+ }>>, {
54
+ disabled: boolean;
55
+ variant: BentoCheckboxGroupVariant;
56
+ formId: string;
57
+ }>;
58
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as BentoCheckboxGroup } from './checkbox-group.vue';
2
+ export { BentoCheckboxGroupVariant } from './checkbox-group.types';
@@ -1,2 +1,3 @@
1
1
  export { default as BentoCheckbox } from './checkbox.vue';
2
2
  export * from './checkbox.types';
3
+ export * from './components/checkbox-group';
@@ -0,0 +1,74 @@
1
+ import { PropType } from 'vue';
2
+ import { BentoColumn, BentoDatagridAllItemsSelectedState, BentoDatagridSortByColumn, BentoDatagridSortDirection } from '../data-grid.types';
3
+ import { BentoTypographyElement } from '@/components/typography';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ columns: {
6
+ type: PropType<BentoColumn[]>;
7
+ required: true;
8
+ };
9
+ hasResizableColumns: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ allItemsSelectedState: {
14
+ type: PropType<BentoDatagridAllItemsSelectedState>;
15
+ default: any;
16
+ };
17
+ sortBy: {
18
+ type: PropType<BentoDatagridSortByColumn[]>;
19
+ default: () => any[];
20
+ };
21
+ gridColumnWidthStyle: {
22
+ type: ObjectConstructor;
23
+ required: true;
24
+ };
25
+ }, {
26
+ DATAGRID_SELECT_FIELD_NAME: string;
27
+ conditionalColumnClasses: (column: BentoColumn) => {
28
+ 'b-data-grid-columns__column--sortable': boolean;
29
+ 'b-data-grid-columns__column--padding-left-unset': boolean;
30
+ 'b-data-grid-columns__column--padding-right-unset': boolean;
31
+ 'b-data-grid-columns__column--numeric': boolean;
32
+ };
33
+ conditionalColumnSeperatorClasses: import("vue").ComputedRef<{
34
+ 'b-data-grid-columns__column-seperator-container--is-resizeable': boolean;
35
+ }>;
36
+ allItemsSelectedCheckboxState: import("vue").Ref<{
37
+ allItemsSelected: boolean;
38
+ isIndeterminate: boolean;
39
+ }>;
40
+ onAllRowSelect: (areAllItemsSelected: boolean) => void;
41
+ conditionalSortDirectionClasses: (field: string, direction: BentoDatagridSortDirection) => {
42
+ 'b-data-grid-columns__column-sort-icon--sorted': boolean;
43
+ };
44
+ sortByColumnField: (field: string) => void;
45
+ startResize: (hasResizableColumns: boolean, field: string, event: MouseEvent) => void;
46
+ BentoDatagridSortDirection: typeof BentoDatagridSortDirection;
47
+ BentoTypographyElement: typeof BentoTypographyElement;
48
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("sort" | "column-resize" | "select-all-rows")[], string, Readonly<import("vue").ExtractPropTypes<{
49
+ columns: {
50
+ type: PropType<BentoColumn[]>;
51
+ required: true;
52
+ };
53
+ hasResizableColumns: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ allItemsSelectedState: {
58
+ type: PropType<BentoDatagridAllItemsSelectedState>;
59
+ default: any;
60
+ };
61
+ sortBy: {
62
+ type: PropType<BentoDatagridSortByColumn[]>;
63
+ default: () => any[];
64
+ };
65
+ gridColumnWidthStyle: {
66
+ type: ObjectConstructor;
67
+ required: true;
68
+ };
69
+ }>>, {
70
+ hasResizableColumns: boolean;
71
+ allItemsSelectedState: BentoDatagridAllItemsSelectedState;
72
+ sortBy: BentoDatagridSortByColumn[];
73
+ }>;
74
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as BentoDataGridColumns } from './data-grid-columns.vue';
@@ -0,0 +1,4 @@
1
+ export { default as useResizer } from './useResizer';
2
+ export { default as useCalculateColumnWidth, DATAGRID_SELECT_FIELD_NAME, } from './useCalculateColumnWidth/useCalculateColumnWidth';
3
+ export { useSorter } from './useSorter';
4
+ export { useSelector } from './useSelector';
@@ -1,10 +1,29 @@
1
- import { MaybeRef } from '../../../../types';
2
- import { BentoColumn } from '../../data-grid.types';
1
+ import { BentoColumn, BentoColumnWidthOverridesLookup } from '../../data-grid.types';
3
2
  import { CalculateColumnWidthOptions } from './useCalculateColumnWidth.types';
3
+ import { MaybeRef } from '../../../../types';
4
4
  export declare const DEFAULT_COLUMN_WIDTH = 100;
5
5
  export declare const DEFAULT_COLUMN_MIN_WIDTH = 50;
6
6
  export declare const DATAGRID_SELECT_FIELD_NAME = "b-select";
7
- export declare const useCalculateColumnWidth: (newColumns: MaybeRef<BentoColumn[]>, newGridWidth: MaybeRef<number>, options?: CalculateColumnWidthOptions) => {
8
- caclulatedWidths: import("vue").ComputedRef<BentoColumn[]>;
7
+ export declare const useCalculateColumnWidth: (newColumns: MaybeRef<BentoColumn[]>, bodyRef: MaybeRef<HTMLDivElement | undefined>, options?: CalculateColumnWidthOptions) => {
8
+ columnDefs: import("vue").ComputedRef<{
9
+ width: number;
10
+ field: string;
11
+ label: string;
12
+ minWidth?: number;
13
+ flex?: number;
14
+ sortable?: boolean;
15
+ numeric?: boolean;
16
+ padding?: {
17
+ left?: boolean;
18
+ right?: boolean;
19
+ };
20
+ overflow?: import("../../data-grid.types").BentoColumnOverflow;
21
+ }[]>;
22
+ gridColumnWidthStyle: import("vue").ComputedRef<{
23
+ gridTemplateColumns: string;
24
+ gridColumnEnd: number;
25
+ width: string;
26
+ }>;
27
+ onColumnWidthOverride: (newColumnWidthOverridesLookup: BentoColumnWidthOverridesLookup) => void;
9
28
  };
10
29
  export default useCalculateColumnWidth;
@@ -1,17 +1,8 @@
1
1
  import { Ref } from 'vue';
2
- import { BentoColumn } from '../data-grid.types';
2
+ import { BentoColumn, BentoColumnWidthOverridesLookup } from '../data-grid.types';
3
3
  export declare const useResizer: (columns: Ref<BentoColumn[]>, emit: (event: string, ...args: unknown[]) => void) => {
4
- resizeData: {
5
- resizingColumnField: string;
6
- offsetLeft: number;
7
- stepPositionX: number;
8
- resizedColumnsWidths: {
9
- [k: string]: {
10
- width: number;
11
- minWidth: number;
12
- };
13
- };
14
- };
4
+ resizeData: Ref<BentoColumnWidthOverridesLookup>;
15
5
  allColumnRefs: import("vue").ToRefs<{}>;
16
6
  startResize: (hasResizableColumns: boolean, field: BentoColumn['field'], event: MouseEvent) => void;
17
7
  };
8
+ export default useResizer;
@@ -1,7 +1,7 @@
1
1
  import { Ref } from 'vue';
2
2
  import { BentoDatagridData, BentoDatagridDataItemId, BentoDatagridGetDataItemIdFn, BentoDatagridIsDataItemDisabledFn } from '../data-grid.types';
3
3
  export declare const useSelector: (selection: Ref<BentoDatagridDataItemId[]>, emit: (event: string, emitedSelectedItems: BentoDatagridDataItemId[]) => void, data: Ref<BentoDatagridData>, getDataItemId: BentoDatagridGetDataItemIdFn, isDataItemDisabled: BentoDatagridIsDataItemDisabledFn) => {
4
- onAllRowSelect: () => void;
4
+ onAllRowSelect: (allItemsSelected: boolean) => void;
5
5
  onRowSelect: () => void;
6
6
  allItemsSelectedState: {
7
7
  allItemsSelected: boolean;
@@ -2,7 +2,7 @@ import { Ref } from 'vue';
2
2
  import { BentoColumn, BentoDatagridSortByColumn, BentoDatagridSortDirection } from '../data-grid.types';
3
3
  export declare const useSorter: (sortBy: Ref<BentoDatagridSortByColumn[]>, columns: Ref<BentoColumn[]>, emit: (event: string, updatedSortBy: BentoDatagridSortByColumn[]) => void) => {
4
4
  conditionalSortDirectionClasses: (field: string, direction: BentoDatagridSortDirection) => {
5
- 'b-data-grid__column-sort-icon--sorted': boolean;
5
+ 'b-data-grid-columns__column-sort-icon--sorted': boolean;
6
6
  };
7
7
  sortByColumnField: (field: string) => void;
8
8
  };
@@ -10,6 +10,7 @@ export interface BentoColumn {
10
10
  minWidth?: number;
11
11
  flex?: number;
12
12
  sortable?: boolean;
13
+ numeric?: boolean;
13
14
  padding?: {
14
15
  left?: boolean;
15
16
  right?: boolean;
@@ -36,3 +37,13 @@ export type BentoDatagridDataItemId = string | number;
36
37
  export type BentoDatagridGetDataItemIdFn = (item: BentoDatagridDataItem) => BentoDatagridDataItemId;
37
38
  export type BentoDatagridIsDataItemDisabledFn = (item: BentoDatagridDataItem) => boolean;
38
39
  export type BentoDatagridPaginationProps = InstanceType<typeof BentoPagination>['$props'];
40
+ export interface BentoColumnWidthOverridesLookup {
41
+ [field: string]: {
42
+ width: BentoColumn['width'];
43
+ minWidth: BentoColumn['minWidth'];
44
+ };
45
+ }
46
+ export interface BentoDatagridAllItemsSelectedState {
47
+ allItemsSelected: boolean;
48
+ isIndeterminate: boolean;
49
+ }
@@ -30,6 +30,10 @@ declare const _default: import("vue").DefineComponent<{
30
30
  type: PropType<BentoDatagridIsDataItemDisabledFn>;
31
31
  default: () => false;
32
32
  };
33
+ loading: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
33
37
  outline: {
34
38
  type: BooleanConstructor;
35
39
  default: boolean;
@@ -112,13 +116,15 @@ declare const _default: import("vue").DefineComponent<{
112
116
  default: () => any[];
113
117
  };
114
118
  }, {
115
- processedColumns: import("vue").ComputedRef<{
119
+ body: import("vue").Ref<HTMLDivElement>;
120
+ columnDefs: import("vue").ComputedRef<{
116
121
  width: number;
117
122
  field: string;
118
123
  label: string;
119
124
  minWidth?: number;
120
125
  flex?: number;
121
126
  sortable?: boolean;
127
+ numeric?: boolean;
122
128
  padding?: {
123
129
  left?: boolean;
124
130
  right?: boolean;
@@ -135,11 +141,6 @@ declare const _default: import("vue").DefineComponent<{
135
141
  conditionalGridClasses: import("vue").ComputedRef<{
136
142
  [x: string]: boolean;
137
143
  }>;
138
- conditionalColumnClasses: (column: BentoColumn) => {
139
- 'b-data-grid__column--sortable': boolean;
140
- 'b-data-grid__column--padding-left-unset': boolean;
141
- 'b-data-grid__column--padding-right-unset': boolean;
142
- };
143
144
  conditionalRowClasses: (row: BentoDatagridDataItem) => {
144
145
  'b-data-grid__row--disabled': boolean;
145
146
  };
@@ -147,45 +148,32 @@ declare const _default: import("vue").DefineComponent<{
147
148
  [x: string]: boolean;
148
149
  'b-data-grid__cell--padding-left-unset': boolean;
149
150
  'b-data-grid__cell--padding-right-unset': boolean;
151
+ 'b-data-grid__cell--numeric': boolean;
150
152
  'b-data-grid__cell--condensed': boolean;
151
153
  };
152
- conditionalColumnSeperatorClasses: import("vue").ComputedRef<{
153
- 'b-data-grid__column-seperator-container--is-resizeable': boolean;
154
- }>;
155
154
  conditionalPaginationClasses: import("vue").ComputedRef<{
156
155
  'b-data-grid__pagination--padding-left-unset': boolean;
157
156
  'b-data-grid__pagination--padding-right-unset': boolean;
158
157
  }>;
159
- resizeData: {
160
- resizingColumnField: string;
161
- offsetLeft: number;
162
- stepPositionX: number;
163
- resizedColumnsWidths: {
164
- [k: string]: {
165
- width: number;
166
- minWidth: number;
167
- };
168
- };
169
- };
170
- startResize: (hasResizableColumns: boolean, field: string, event: MouseEvent) => void;
171
- conditionalSortDirectionClasses: (field: string, direction: BentoDatagridSortDirection) => {
172
- 'b-data-grid__column-sort-icon--sorted': boolean;
173
- };
174
- 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;
175
164
  allItemsSelectedState: {
176
165
  allItemsSelected: boolean;
177
166
  isIndeterminate: boolean;
178
167
  };
179
168
  selectedItems: import("vue").Ref<BentoDatagridDataItemId[]>;
180
- onAllRowSelect: () => void;
169
+ onAllRowSelect: (allItemsSelected: boolean) => void;
181
170
  onRowSelect: () => void;
182
171
  DATAGRID_SELECT_FIELD_NAME: string;
183
172
  BentoDatagridSortDirection: typeof BentoDatagridSortDirection;
184
173
  BentoTypographyElement: typeof BentoTypographyElement;
185
174
  BentoTypographyVariant: typeof BentoTypographyVariant;
186
- paginationNavigate: (page: number) => void;
175
+ onPaginationNavigate: (page: number) => void;
187
176
  onItemsPerPageChange: (itemsPerPage: number) => void;
188
- body: any;
189
177
  }, {}, {}, {}, 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<{
190
178
  condensed: {
191
179
  type: BooleanConstructor;
@@ -215,6 +203,10 @@ declare const _default: import("vue").DefineComponent<{
215
203
  type: PropType<BentoDatagridIsDataItemDisabledFn>;
216
204
  default: () => false;
217
205
  };
206
+ loading: {
207
+ type: BooleanConstructor;
208
+ default: boolean;
209
+ };
218
210
  outline: {
219
211
  type: BooleanConstructor;
220
212
  default: boolean;
@@ -298,14 +290,15 @@ declare const _default: import("vue").DefineComponent<{
298
290
  };
299
291
  }>>, {
300
292
  outline: boolean;
293
+ loading: boolean;
301
294
  condensed: boolean;
302
295
  filters: import("../filter-bar").BentoFilterBarModel;
303
- getDataItemId: BentoDatagridGetDataItemIdFn;
304
296
  hasResizableColumns: boolean;
297
+ sortBy: BentoDatagridSortByColumn[];
298
+ getDataItemId: BentoDatagridGetDataItemIdFn;
305
299
  isDataItemDisabled: BentoDatagridIsDataItemDisabledFn;
306
300
  pagination: any;
307
301
  selectable: boolean;
308
302
  selection: BentoDatagridDataItemId[];
309
- sortBy: BentoDatagridSortByColumn[];
310
303
  }>;
311
304
  export default _default;
@@ -16,12 +16,13 @@ declare const _default: import("vue").DefineComponent<{
16
16
  }, {
17
17
  ariaLabel: ComputedRef<string>;
18
18
  isChecked: ComputedRef<boolean>;
19
- shouldShowDescription: ComputedRef<boolean>;
20
- shouldShowLabel: ComputedRef<boolean>;
21
- shouldShowSubLabel: ComputedRef<boolean>;
19
+ shouldShowDescription: ComputedRef<string>;
20
+ shouldShowLabel: ComputedRef<string>;
21
+ shouldShowSubLabel: ComputedRef<string>;
22
22
  conditionalClass: ComputedRef<{
23
- 'b-input-radio--disabled': boolean;
23
+ 'b-radio-button--disabled': boolean;
24
24
  }>;
25
+ radioButtonId: string;
25
26
  onClick: () => void;
26
27
  BentoTypographyVariant: typeof BentoTypographyVariant;
27
28
  BentoTypographyElement: typeof BentoTypographyElement;
@@ -0,0 +1,2 @@
1
+ export { default as BentoRadioGroup } from './radio-group.vue';
2
+ export { BentoRadioGroupVariant } from './radio-group.types';
@@ -0,0 +1,11 @@
1
+ export declare enum BentoRadioGroupVariant {
2
+ HORIZONTAL = "horizontal",
3
+ VERTICAL = "vertical"
4
+ }
5
+ export interface BentoRadioGroupItem {
6
+ value: string | number;
7
+ label: string;
8
+ description?: string;
9
+ disabled?: boolean;
10
+ }
11
+ export type BentoRadioGroupItems = Array<BentoRadioGroupItem>;
@@ -0,0 +1,58 @@
1
+ import { PropType } from 'vue';
2
+ import { BentoRadioGroupItems, BentoRadioGroupVariant } from './radio-group.types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ items: {
5
+ type: PropType<BentoRadioGroupItems>;
6
+ required: true;
7
+ };
8
+ variant: {
9
+ type: PropType<BentoRadioGroupVariant>;
10
+ default: BentoRadioGroupVariant;
11
+ validator: (value: BentoRadioGroupVariant) => boolean;
12
+ };
13
+ formId: {
14
+ type: StringConstructor;
15
+ default: any;
16
+ };
17
+ disabled: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ label: {
22
+ type: StringConstructor;
23
+ required: true;
24
+ };
25
+ }, {
26
+ conditionalClasses: import("vue").ComputedRef<{
27
+ 'b-radio-group--horizontal': boolean;
28
+ }>;
29
+ inputValue: import("vue").Ref<string | number>;
30
+ onInput: (value: any) => void;
31
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, "input"[], string, Readonly<import("vue").ExtractPropTypes<{
32
+ items: {
33
+ type: PropType<BentoRadioGroupItems>;
34
+ required: true;
35
+ };
36
+ variant: {
37
+ type: PropType<BentoRadioGroupVariant>;
38
+ default: BentoRadioGroupVariant;
39
+ validator: (value: BentoRadioGroupVariant) => boolean;
40
+ };
41
+ formId: {
42
+ type: StringConstructor;
43
+ default: any;
44
+ };
45
+ disabled: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ label: {
50
+ type: StringConstructor;
51
+ required: true;
52
+ };
53
+ }>>, {
54
+ disabled: boolean;
55
+ variant: BentoRadioGroupVariant;
56
+ formId: string;
57
+ }>;
58
+ export default _default;