@adyen/bento-vue2 0.10.1 → 1.0.0-rc-2
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 +189 -17
- package/dist/@types/components/alert/alert.vue.d.ts +1 -0
- package/dist/@types/components/button/button.types.d.ts +0 -1
- package/dist/@types/components/button/index.d.ts +0 -1
- package/dist/@types/components/card/card.vue.d.ts +7 -2
- package/dist/@types/components/checkbox/checkbox.types.d.ts +3 -0
- package/dist/@types/components/checkbox/checkbox.vue.d.ts +6 -5
- package/dist/@types/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +38 -2
- package/dist/@types/components/currency/currency.vue.d.ts +1 -1
- package/dist/@types/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +5 -1
- package/dist/@types/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -0
- package/dist/@types/components/data-grid/composables/index.d.ts +1 -0
- package/dist/@types/components/data-grid/composables/useKeyboardNavigator/useKeyboardNavigator.d.ts +6 -0
- package/dist/@types/components/data-grid/composables/useKeyboardNavigator/useKeyboardNavigator.types.d.ts +10 -0
- package/dist/@types/components/data-grid/composables/useSelector.d.ts +1 -1
- package/dist/@types/components/data-grid/data-grid.types.d.ts +5 -0
- package/dist/@types/components/data-grid/data-grid.vue.d.ts +21 -1
- package/dist/@types/components/date/date.vue.d.ts +1 -1
- package/dist/@types/components/date-picker/composables/use-date-picker-single-calendar-text.d.ts +1 -1
- package/dist/@types/components/date-picker/composables/use-date-picker-single-calendar-text.types.d.ts +10 -0
- package/dist/@types/components/date-picker/date-picker.types.d.ts +2 -21
- package/dist/@types/components/date-picker/date-picker.vue.d.ts +19 -34
- package/dist/@types/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +9 -0
- package/dist/@types/components/{date-picker/components/date-picker-calendar-range/date-picker-calendar-range.vue.d.ts → date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts} +21 -21
- package/dist/@types/components/date-range-picker/components/date-range-picker-calendar/index.d.ts +1 -0
- package/dist/@types/components/date-range-picker/composables/use-date-range-picker-calendar-text.d.ts +3 -0
- package/dist/@types/components/date-range-picker/composables/use-date-range-picker-calendar-text.types.d.ts +11 -0
- package/dist/@types/components/date-range-picker/date-range-picker.types.d.ts +5 -0
- package/dist/@types/components/date-range-picker/date-range-picker.vue.d.ts +131 -0
- package/dist/@types/components/date-range-picker/index.d.ts +2 -0
- package/dist/@types/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -0
- package/dist/@types/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +31 -2
- package/dist/@types/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +27 -0
- package/dist/@types/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +27 -0
- package/dist/@types/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +27 -0
- package/dist/@types/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +27 -0
- package/dist/@types/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +27 -0
- package/dist/@types/components/dropdown/dropdown.types.d.ts +1 -0
- package/dist/@types/components/dropdown/dropdown.vue.d.ts +32 -2
- package/dist/@types/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +144 -144
- package/dist/@types/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
- package/dist/@types/components/filter-bar/components/base-filter/components/filter-bar-filter-button/filter-bar-filter-button.vue.d.ts +1 -0
- package/dist/@types/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +4 -0
- package/dist/@types/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +9 -10
- package/dist/@types/components/filter-bar/components/select-filter/select-filter.vue.d.ts +1 -0
- package/dist/@types/components/filter-bar/filter-bar.types.d.ts +3 -2
- package/dist/@types/components/input-field/input-field.types.d.ts +1 -0
- package/dist/@types/components/input-field/input-field.vue.d.ts +31 -8
- package/dist/@types/components/internal/base-button/base-button.vue.d.ts +1 -0
- package/dist/@types/components/internal/calendar/calendar.types.d.ts +23 -0
- package/dist/@types/components/{date-picker/components/date-picker-calendar-pane/date-picker-calendar-pane.vue.d.ts → internal/calendar/calendar.vue.d.ts} +18 -17
- package/dist/@types/components/{date-picker/components/date-picker-calendar/date-picker-calendar.types.d.ts → internal/calendar/components/calendar-month/calendar-month.types.d.ts} +4 -4
- package/dist/@types/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +118 -0
- package/dist/@types/components/internal/calendar/components/calendar-month/components/calendar-month-day/__test__/calendar-month-day-stub.vue.d.ts +45 -0
- package/dist/@types/components/{date-picker/components/date-picker-calendar/components/date-picker-calendar-day/date-picker-calendar-day.types.d.ts → internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.types.d.ts} +3 -3
- package/dist/@types/components/{date-picker/components/date-picker-calendar/components/date-picker-calendar-day/date-picker-calendar-day.vue.d.ts → internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue.d.ts} +11 -11
- package/dist/@types/components/internal/calendar/components/calendar-month/components/calendar-month-day/index.d.ts +2 -0
- package/dist/@types/components/internal/calendar/components/calendar-month/composables/move-calendar-date.d.ts +155 -0
- package/dist/@types/components/internal/calendar/components/calendar-month/index.d.ts +2 -0
- package/dist/@types/components/internal/calendar/composables/use-range-pane.d.ts +2 -0
- package/dist/@types/components/internal/calendar/composables/use-single-pane.d.ts +2 -0
- package/dist/@types/components/internal/calendar/index.d.ts +2 -0
- package/dist/@types/components/internal/index.d.ts +2 -1
- package/dist/@types/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +1 -0
- package/dist/@types/components/internal/listbox/components/listbox-option/listbox-option.vue.d.ts +1 -1
- package/dist/@types/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts +1 -1
- package/dist/@types/components/internal/listbox/listbox.types.d.ts +0 -0
- package/dist/@types/components/internal/listbox/listbox.vue.d.ts +44 -3
- package/dist/@types/components/link/link.vue.d.ts +1 -0
- package/dist/@types/components/menu/components/menu-item-list/menu-item-list.vue.d.ts +0 -8
- package/dist/@types/components/menu/menu.vue.d.ts +1 -0
- package/dist/@types/components/modal/components/base-modal/base-modal.vue.d.ts +10 -0
- package/dist/@types/components/modal/components/modal-default/modal-default.vue.d.ts +9 -0
- package/dist/@types/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +9 -0
- package/dist/@types/components/modal/modal.vue.d.ts +11 -0
- package/dist/@types/components/popover/popover.vue.d.ts +5 -1
- package/dist/@types/components/popper-container/popper-container.vue.d.ts +1 -1
- package/dist/@types/components/radio-group/components/radio-button/radio-button.vue.d.ts +2 -1
- package/dist/@types/components/radio-group/radio-group.types.d.ts +3 -0
- package/dist/@types/components/radio-group/radio-group.vue.d.ts +5 -5
- package/dist/@types/components/search-bar/search-bar.vue.d.ts +49 -10
- package/dist/@types/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +5 -2
- package/dist/@types/components/structured-list/structured-list.keys.d.ts +1 -0
- package/dist/@types/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +24 -4
- package/dist/@types/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +30 -3
- package/dist/@types/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +30 -3
- package/dist/@types/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +30 -3
- package/dist/@types/components/tabs/tabs.types.d.ts +3 -0
- package/dist/@types/components/tabs/tabs.vue.d.ts +16 -2
- package/dist/@types/components/timeline/components/timeline-item/timeline-item.vue.d.ts +158 -0
- package/dist/@types/components/timeline/index.d.ts +3 -0
- package/dist/@types/components/timeline/timeline.keys.d.ts +2 -0
- package/dist/@types/components/timeline/timeline.types.d.ts +58 -0
- package/dist/@types/components/timeline/timeline.vue.d.ts +25 -0
- package/dist/@types/components/tooltip/tooltip.vue.d.ts +1 -1
- package/dist/@types/components.d.ts +12 -2
- package/dist/@types/index.d.ts +2 -0
- package/dist/@types/types/index.d.ts +3 -2
- package/dist/@types/types/keyboard-navigation.d.ts +16 -0
- package/dist/@types/types/listbox.d.ts +9 -0
- package/dist/@types/types/utils-events.d.ts +10 -1
- package/dist/accordion.js +1 -1
- package/dist/alert.js +31 -29
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/calendar.css +1 -0
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/chevron-right.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -0
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -0
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/loading-button.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +12 -107
- package/dist/button.js.map +1 -1
- package/dist/card.js +93 -79
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +30 -21
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/base-button.87f3607d.js +85 -0
- package/dist/chunks/base-button.87f3607d.js.map +1 -0
- package/dist/chunks/{button-actions.59406268.js → button-actions.f7d27f92.js} +2 -2
- package/dist/chunks/{button-actions.59406268.js.map → button-actions.f7d27f92.js.map} +1 -1
- package/dist/chunks/{button.31b757d1.js → button.fc6433d0.js} +17 -17
- package/dist/chunks/button.fc6433d0.js.map +1 -0
- package/dist/chunks/calendar.6c03045a.js +824 -0
- package/dist/chunks/calendar.6c03045a.js.map +1 -0
- package/dist/chunks/{checkbox.fab16cce.js → checkbox.7dfa26ff.js} +54 -51
- package/dist/chunks/checkbox.7dfa26ff.js.map +1 -0
- package/dist/chunks/{checkmark-circle-fill.d1aa324d.js → checkmark-circle-fill.2cd04f21.js} +3 -3
- package/dist/chunks/{checkmark-circle-fill.d1aa324d.js.map → checkmark-circle-fill.2cd04f21.js.map} +1 -1
- package/dist/chunks/{chevron-left.e3a49e62.js → chevron-right.e990e4a8.js} +8 -8
- package/dist/chunks/chevron-right.e990e4a8.js.map +1 -0
- package/dist/chunks/{copy.fa9aa27e.js → copy.6870e625.js} +3 -3
- package/dist/chunks/{copy.fa9aa27e.js.map → copy.6870e625.js.map} +1 -1
- package/dist/chunks/{cross-circle-fill.0a1d738c.js → cross-circle-fill.0ddeea99.js} +8 -8
- package/dist/chunks/{cross-circle-fill.0a1d738c.js.map → cross-circle-fill.0ddeea99.js.map} +1 -1
- package/dist/chunks/date-format.bc34d0e4.js +5 -0
- package/dist/chunks/date-format.bc34d0e4.js.map +1 -0
- package/dist/chunks/debounce.b5ef6acf.js +10 -0
- package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
- package/dist/chunks/dropdown-default-textbox.2640ad44.js +304 -0
- package/dist/chunks/dropdown-default-textbox.2640ad44.js.map +1 -0
- package/dist/chunks/dropdown.bd947b2a.js +521 -0
- package/dist/chunks/dropdown.bd947b2a.js.map +1 -0
- package/dist/chunks/events.01cb987e.js +46 -0
- package/dist/chunks/events.01cb987e.js.map +1 -0
- package/dist/chunks/index.5b04de6e.js +317 -0
- package/dist/chunks/index.5b04de6e.js.map +1 -0
- package/dist/chunks/index.86453263.js +22 -0
- package/dist/chunks/index.86453263.js.map +1 -0
- package/dist/chunks/index.a4ac6f26.js +107 -0
- package/dist/chunks/index.a4ac6f26.js.map +1 -0
- package/dist/chunks/{index.ad5e1dbd.js → index.b8b04696.js} +3 -3
- package/dist/chunks/{index.c8290b03.js.map → index.b8b04696.js.map} +1 -1
- package/dist/chunks/{index.1093d980.js → index.bcaac7fd.js} +2 -2
- package/dist/chunks/{index.91ac97d7.js.map → index.bcaac7fd.js.map} +1 -1
- package/dist/chunks/{index.8197ec6b.js → index.c30ee1f3.js} +2 -2
- package/dist/chunks/{index.8197ec6b.js.map → index.c30ee1f3.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.c6f5bbc9.js → listbox-option-tag.d97a13ef.js} +2 -2
- package/dist/chunks/{listbox-option-tag.c6f5bbc9.js.map → listbox-option-tag.d97a13ef.js.map} +1 -1
- package/dist/chunks/listbox.21d7b518.js +549 -0
- package/dist/chunks/listbox.21d7b518.js.map +1 -0
- package/dist/chunks/loading-button.c9d77472.js +85 -0
- package/dist/chunks/loading-button.c9d77472.js.map +1 -0
- package/dist/chunks/tooltip.c4445ab5.js +178 -0
- package/dist/chunks/tooltip.c4445ab5.js.map +1 -0
- package/dist/controls-group.js +1 -1
- package/dist/country.js +1 -1
- package/dist/data-grid.js +651 -551
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +178 -5
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +8 -0
- package/dist/date-range-picker.js.map +1 -0
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +456 -435
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header.js +76 -91
- package/dist/header.js.map +1 -1
- package/dist/index.js +198 -402
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +85 -63
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +14 -10
- package/dist/internal.js.map +1 -1
- package/dist/link.js +28 -26
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +73 -79
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +151 -122
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +22 -22
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +62 -53
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +2 -2
- package/dist/radio-group.js +54 -62
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +12 -12
- package/dist/search-bar.js.map +1 -1
- package/dist/segmented-control.js +177 -0
- package/dist/segmented-control.js.map +1 -0
- package/dist/status.js +1 -1
- package/dist/structured-list.js +3 -95
- package/dist/structured-list.js.map +1 -1
- package/dist/summary-grid.js +213 -118
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +83 -64
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +2 -2
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +304 -0
- package/dist/timeline.js.map +1 -0
- package/dist/toast.js +2 -2
- package/dist/toggle.js +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +704 -332
- package/package.json +2 -2
- package/dist/@types/components/button/components/button-group.vue.d.ts +0 -9
- package/dist/@types/components/date-picker/components/date-picker-calendar/components/date-picker-calendar-day/__test__/date-picker-calendar-day-stub.vue.d.ts +0 -45
- package/dist/@types/components/date-picker/components/date-picker-calendar/components/date-picker-calendar-day/index.d.ts +0 -2
- package/dist/@types/components/date-picker/components/date-picker-calendar/date-picker-calendar.vue.d.ts +0 -92
- package/dist/@types/components/date-picker/components/date-picker-calendar/index.d.ts +0 -2
- package/dist/@types/components/date-picker/components/date-picker-calendar-pane/composables/use-range-pane.d.ts +0 -2
- package/dist/@types/components/date-picker/components/date-picker-calendar-pane/composables/use-single-pane.d.ts +0 -2
- package/dist/@types/components/date-picker/components/date-picker-calendar-pane/date-picker-calendar-pane.types.d.ts +0 -21
- package/dist/@types/components/date-picker/components/date-picker-calendar-pane/index.d.ts +0 -1
- package/dist/@types/components/date-picker/components/date-picker-calendar-range/date-picker-calendar-range.types.d.ts +0 -5
- package/dist/@types/components/date-picker/components/date-picker-calendar-range/index.d.ts +0 -1
- package/dist/@types/components/date-picker/composables/use-date-picker-range-calendar-text.d.ts +0 -2
- package/dist/assets/chevron-left.css +0 -1
- package/dist/chunks/base-button.38651156.js +0 -83
- package/dist/chunks/base-button.38651156.js.map +0 -1
- package/dist/chunks/button.31b757d1.js.map +0 -1
- package/dist/chunks/checkbox.fab16cce.js.map +0 -1
- package/dist/chunks/chevron-left.e3a49e62.js.map +0 -1
- package/dist/chunks/dropdown.0d394d2f.js +0 -771
- package/dist/chunks/dropdown.0d394d2f.js.map +0 -1
- package/dist/chunks/index.0d093359.js +0 -801
- package/dist/chunks/index.0d093359.js.map +0 -1
- package/dist/chunks/index.1093d980.js.map +0 -1
- package/dist/chunks/index.35e8e1d4.js +0 -801
- package/dist/chunks/index.35e8e1d4.js.map +0 -1
- package/dist/chunks/index.8c38e06b.js +0 -441
- package/dist/chunks/index.8c38e06b.js.map +0 -1
- package/dist/chunks/index.91ac97d7.js +0 -86
- package/dist/chunks/index.ad5e1dbd.js.map +0 -1
- package/dist/chunks/index.c8290b03.js +0 -107
- package/dist/chunks/listbox-option-tag.bedb155a.js +0 -111
- package/dist/chunks/listbox-option-tag.bedb155a.js.map +0 -1
- package/dist/chunks/listbox.152dab0a.js +0 -485
- package/dist/chunks/listbox.152dab0a.js.map +0 -1
- package/dist/chunks/tooltip.a4625a7b.js +0 -220
- package/dist/chunks/tooltip.a4625a7b.js.map +0 -1
package/README.md
CHANGED
|
@@ -31,19 +31,32 @@ In order to use the compoent via the `BentoVue` plugin, the following steps must
|
|
|
31
31
|
1. Load the plugin globally in **Vue**
|
|
32
32
|
2. Import the `font.css` file.
|
|
33
33
|
3. Initialize `vue-i18n`.
|
|
34
|
-
4.
|
|
34
|
+
4. Add changes to your [bundler](#Bundlers) configuration e.g. [webpack](#webpack) or [vite](#vite).
|
|
35
|
+
5. Use the library defined components in your application
|
|
35
36
|
|
|
36
37
|
#### Load plugin and register components
|
|
37
38
|
|
|
38
39
|
Import the Bento Vue plugin to inject the theme by default to Vue in order to allow the components to use the Design
|
|
39
40
|
Token CSS variables:
|
|
40
41
|
|
|
42
|
+
##### Vue 2
|
|
43
|
+
|
|
41
44
|
```javascript
|
|
42
45
|
import BentoVue from '@adyen/bento-vue2';
|
|
43
46
|
|
|
44
47
|
Vue.use(BentoVue);
|
|
45
48
|
```
|
|
46
49
|
|
|
50
|
+
##### Vue 3
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
import BentoVue from '@adyen/bento-vue3';
|
|
54
|
+
|
|
55
|
+
const app = createApp()
|
|
56
|
+
.use(BentoVue, { withToast: true }) // this line installs Bento and includes the toast component
|
|
57
|
+
.mount('#app');
|
|
58
|
+
```
|
|
59
|
+
|
|
47
60
|
#### Import the fonts
|
|
48
61
|
|
|
49
62
|
When using the default theme, you will need to include the required `Inter` font in your project application. This can
|
|
@@ -51,15 +64,25 @@ easily be done by simply importing the `font.css` file.
|
|
|
51
64
|
|
|
52
65
|
NOTE: make sure the builder your are using (e.g. `webpack` , `vite`, etc...) is able to process font files.
|
|
53
66
|
|
|
67
|
+
##### Vue 2
|
|
68
|
+
|
|
54
69
|
```javascript
|
|
55
70
|
import '@adyen/bento-vue2/fonts.css';
|
|
56
71
|
```
|
|
57
72
|
|
|
73
|
+
##### Vue 3
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
import '@adyen/bento-vue3/fonts.css';
|
|
77
|
+
```
|
|
78
|
+
|
|
58
79
|
#### Initialize `vue-i18n`
|
|
59
80
|
|
|
60
81
|
Some Bento components require translations for which the `vue-i18n` package was used so it has to be initialized like
|
|
61
82
|
this:
|
|
62
83
|
|
|
84
|
+
##### Vue 2
|
|
85
|
+
|
|
63
86
|
```diff
|
|
64
87
|
import Vue from 'vue';
|
|
65
88
|
+ import VueI18n from 'vue-i18n';
|
|
@@ -80,34 +103,183 @@ const app = new Vue({
|
|
|
80
103
|
});
|
|
81
104
|
```
|
|
82
105
|
|
|
106
|
+
##### Vue 3
|
|
107
|
+
|
|
108
|
+
```diff
|
|
109
|
+
import BentoVue from '@adyen/bento-vue3';
|
|
110
|
+
+ import VueI18n from 'vue-i18n';
|
|
111
|
+
|
|
112
|
+
+ const i18n = createI18n({
|
|
113
|
+
+ locale: 'en-US',
|
|
114
|
+
+ fallbackLocale: 'en-US',
|
|
115
|
+
+ fallbackRoot: false,
|
|
116
|
+
+ allowComposition: true,
|
|
117
|
+
+ });
|
|
118
|
+
|
|
119
|
+
const app = createApp()
|
|
120
|
+
.use(BentoVue, { withToast: true }) // this line installs Bento
|
|
121
|
+
+ .use(i18n) // this line vue-i18n
|
|
122
|
+
.mount('#app');
|
|
123
|
+
```
|
|
124
|
+
|
|
83
125
|
#### Use the components
|
|
84
126
|
|
|
85
127
|
Inside the `.vue` components of your application, you can simply use the available components:
|
|
86
128
|
|
|
87
|
-
|
|
129
|
+
##### Vue 2
|
|
130
|
+
|
|
131
|
+
```html
|
|
132
|
+
<template>
|
|
133
|
+
<bento-button @click="onClickHandler"> {{ buttonLabel }} </bento-button>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<script lang="ts">
|
|
137
|
+
import { BentoButton } from '@adyen/bento-vue2';
|
|
138
|
+
|
|
139
|
+
export default {
|
|
140
|
+
components: { BentoButton },
|
|
141
|
+
setup() {
|
|
142
|
+
const buttonLabel = ref('Button text');
|
|
143
|
+
|
|
144
|
+
const onClickHandler = () => {
|
|
145
|
+
// click event handler logic
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
return { buttonLabel, onClickHandler };
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
</script>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
##### Vue 3
|
|
155
|
+
|
|
156
|
+
```html
|
|
88
157
|
<template>
|
|
89
|
-
<bento-button @click="onClickHandler">
|
|
90
|
-
{{ buttonLabel }}
|
|
91
|
-
</bento-button>
|
|
158
|
+
<bento-button @click="onClickHandler"> {{ buttonLabel }} </bento-button>
|
|
92
159
|
</template>
|
|
93
160
|
|
|
94
|
-
<script>
|
|
95
|
-
import { BentoButton } from '@adyen/bento-
|
|
161
|
+
<script lang="ts">
|
|
162
|
+
import { BentoButton } from '@adyen/bento-vue3';
|
|
96
163
|
|
|
97
164
|
export default {
|
|
98
165
|
components: { BentoButton },
|
|
99
|
-
|
|
100
|
-
buttonLabel
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
onClickHandler() {
|
|
166
|
+
setup() {
|
|
167
|
+
const buttonLabel = ref('Button text');
|
|
168
|
+
|
|
169
|
+
const onClickHandler = () => {
|
|
104
170
|
// click event handler logic
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
return { buttonLabel, onClickHandler };
|
|
174
|
+
},
|
|
175
|
+
};
|
|
108
176
|
</script>
|
|
109
177
|
```
|
|
110
178
|
|
|
179
|
+
### Bundlers
|
|
180
|
+
|
|
181
|
+
#### Webpack
|
|
182
|
+
|
|
183
|
+
To set things up you will need to make sure you have the following things in your webpack configuration.
|
|
184
|
+
[Full example of a webpack configuration file](https://github.com/Adyen/bento/blob/main/packages/vue2-e2e/webpack.config.ts))
|
|
185
|
+
|
|
186
|
+
NOTE: replace all occurrence of of `bento-vue2` with `bento-vue3` if using the Vue 3 package.
|
|
187
|
+
|
|
188
|
+
1. Alias redirects for the SVG libraries (this is temporary and will be resolved in a future update)
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
resolve: {
|
|
192
|
+
alias: {
|
|
193
|
+
// Other aliases
|
|
194
|
+
// Flag icons alias
|
|
195
|
+
'@adyen/ui-assets-flag-icons/svg': path.resolve(
|
|
196
|
+
__dirname,
|
|
197
|
+
'../../node_modules/@adyen/ui-assets-flag-icons/dist/svg'
|
|
198
|
+
),
|
|
199
|
+
// Payment method icon alias
|
|
200
|
+
'@adyen/ui-assets-payment-method-icons/svg': path.resolve(
|
|
201
|
+
__dirname,
|
|
202
|
+
'../../node_modules/@adyen/ui-assets-payment-method-icons/dist/svg'
|
|
203
|
+
),
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
2. Make sure to allow CSS to be loaded from the bento packages
|
|
209
|
+
|
|
210
|
+
e.g.
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
{
|
|
214
|
+
test: /\.css$/,
|
|
215
|
+
include: [
|
|
216
|
+
// Include the vue2 and design tokens package
|
|
217
|
+
utils.resolve('node_modules/@adyen/bento-vue2'),
|
|
218
|
+
utils.resolve('node_modules/@adyen/bento-design-tokens'),
|
|
219
|
+
],
|
|
220
|
+
use: ['vue-style-loader', 'css-loader'],
|
|
221
|
+
},
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
3. Make sure to allow SVGs to be loaded from the bento packages
|
|
225
|
+
|
|
226
|
+
e.g.
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
{
|
|
230
|
+
test: /\.svg$/,
|
|
231
|
+
include: [
|
|
232
|
+
// Include the vue2, flag and payment icons pacakges
|
|
233
|
+
utils.resolve('node_modules/@adyen/bento-vue2'),
|
|
234
|
+
utils.resolve('node_modules/@adyen/ui-assets-flag-icons'),
|
|
235
|
+
utils.resolve('node_modules/@adyen/ui-assets-payment-method-icons'),
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
4. Make sure to allow SCSS to be loaded from the bento packages e.g.
|
|
241
|
+
|
|
242
|
+
```typescript
|
|
243
|
+
{
|
|
244
|
+
test: /\.scss$/,
|
|
245
|
+
include: [
|
|
246
|
+
// Include all icon packages
|
|
247
|
+
utils.resolve('node_modules/@adyen/ui-assets-icons-16'),
|
|
248
|
+
utils.resolve('node_modules/@adyen/ui-assets-flag-icons'),
|
|
249
|
+
utils.resolve('node_modules/@adyen/ui-assets-payment-method-icons'),
|
|
250
|
+
],
|
|
251
|
+
use: ['vue-style-loader', 'css-loader', 'sass-loader'],
|
|
252
|
+
};
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
#### Vite
|
|
256
|
+
|
|
257
|
+
For vite the only thing required is to add the icon packages to the `optimizeDeps.exclude` vite configuration property.
|
|
258
|
+
|
|
259
|
+
e.g.
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
import { defineConfig } from 'vite';
|
|
263
|
+
import vue from '@vitejs/plugin-vue2';
|
|
264
|
+
import { resolve } from 'path';
|
|
265
|
+
|
|
266
|
+
export default defineConfig({
|
|
267
|
+
root: resolve(__dirname, '../src'),
|
|
268
|
+
plugins: [vue()],
|
|
269
|
+
envDir: resolve(__dirname),
|
|
270
|
+
// Add the flag and payment icon packages here
|
|
271
|
+
optimizeDeps: {
|
|
272
|
+
optimizeDeps: {
|
|
273
|
+
exclude: [
|
|
274
|
+
'@adyen/ui-assets-icons-16',
|
|
275
|
+
'@adyen/ui-assets-flag-icons',
|
|
276
|
+
'@adyen/ui-assets-payment-method-icons',
|
|
277
|
+
],
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
```
|
|
282
|
+
|
|
111
283
|
### Alternate Theme (ADL 1.0)
|
|
112
284
|
|
|
113
285
|
#### Set **legacy ADL** theme as default
|
|
@@ -116,7 +288,7 @@ The Design System requires the Design token CSS variables to be set in order to
|
|
|
116
288
|
only alternative style provided for now is the Legacy ADL theme (a.k.a. ADL 1.0). The **legacy ADL** theme variables
|
|
117
289
|
must be present for the whole app.
|
|
118
290
|
|
|
119
|
-
```
|
|
291
|
+
```typescript
|
|
120
292
|
import BentoVue, { BentoTheme } from '@adyen/bento-vue2';
|
|
121
293
|
|
|
122
294
|
Vue.use(BentoVue. { theme: BentoTheme.LEGACY });
|
|
@@ -133,7 +305,7 @@ The theme class overrides the default Design Token CSS variables.
|
|
|
133
305
|
|
|
134
306
|
To use an alternative theme, set the respective theme class in the main container inside the `App.vue` component.
|
|
135
307
|
|
|
136
|
-
```
|
|
308
|
+
```html
|
|
137
309
|
<template>
|
|
138
310
|
<transition name="navigation-fading" mode="out-in" appear>
|
|
139
311
|
<navigation-loading-indicator v-if="initialNavigation" />
|
|
@@ -22,6 +22,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
22
22
|
}>;
|
|
23
23
|
computedRole: import("vue").ComputedRef<"alert" | "status">;
|
|
24
24
|
onCloseButtonClick: () => void;
|
|
25
|
+
hasSlot: (name: string) => boolean;
|
|
25
26
|
BentoButtonVariant: typeof BentoButtonVariant;
|
|
26
27
|
BentoAlertSeverityOption: typeof BentoAlertSeverityOption;
|
|
27
28
|
BentoTypographyVariant: typeof BentoTypographyVariant;
|
|
@@ -55,10 +55,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
55
55
|
'b-card__actions--without-content': boolean;
|
|
56
56
|
'b-card__actions--without-content-and-with-header': boolean;
|
|
57
57
|
}>;
|
|
58
|
+
cardHeaderTitleConditionalClasses: import("vue").ComputedRef<{
|
|
59
|
+
'b-card__title--truncated': boolean;
|
|
60
|
+
}>;
|
|
58
61
|
showCardBody: import("vue").ComputedRef<boolean>;
|
|
59
62
|
showContent: import("vue").Ref<boolean>;
|
|
60
63
|
tabIndex: import("vue").ComputedRef<-1 | 0>;
|
|
61
64
|
showHeader: import("vue").ComputedRef<boolean>;
|
|
65
|
+
showTitleWrapper: import("vue").ComputedRef<boolean>;
|
|
62
66
|
typography: import("vue").ComputedRef<{
|
|
63
67
|
el: BentoTypographyElement;
|
|
64
68
|
variant: BentoTypographyVariant;
|
|
@@ -66,12 +70,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
70
|
strongest: boolean;
|
|
67
71
|
wide: boolean;
|
|
68
72
|
}>;
|
|
73
|
+
hasSlot: (name: string) => boolean;
|
|
69
74
|
onClick: () => void;
|
|
75
|
+
t: any;
|
|
70
76
|
toggleExpansion: () => void;
|
|
71
|
-
hasSlot: (name: string) => boolean;
|
|
72
77
|
BentoTypographyVariant: typeof BentoTypographyVariant;
|
|
73
78
|
BentoTypographyElement: typeof BentoTypographyElement;
|
|
74
|
-
}, {}, {}, {}, import("vue/types/v3-component-options
|
|
79
|
+
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("click" | "expanded")[], string, Readonly<import("vue").ExtractPropTypes<{
|
|
75
80
|
background: {
|
|
76
81
|
type: PropType<BentoCardBackground>;
|
|
77
82
|
default: BentoCardBackground;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { BentoCheckboxType } from './checkbox.types';
|
|
2
|
+
import { BentoCheckboxEvent, BentoCheckboxType } from './checkbox.types';
|
|
3
3
|
import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
|
|
4
|
+
import { BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';
|
|
4
5
|
declare const _default: import("vue").DefineComponent<{
|
|
5
6
|
value: {
|
|
6
7
|
type: (StringConstructor | NumberConstructor)[];
|
|
7
8
|
default: any;
|
|
8
9
|
};
|
|
9
10
|
modelValue: {
|
|
10
|
-
type: PropType<BentoCheckboxType>;
|
|
11
|
+
type: PropType<BentoCheckboxType | BentoCheckboxGroupItems>;
|
|
11
12
|
default: boolean;
|
|
12
13
|
};
|
|
13
14
|
disabled: {
|
|
@@ -44,13 +45,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
44
45
|
BentoTypographyElement: typeof BentoTypographyElement;
|
|
45
46
|
BentoTypographyVariant: typeof BentoTypographyVariant;
|
|
46
47
|
onChange: (event: Event) => void;
|
|
47
|
-
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin,
|
|
48
|
+
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, BentoCheckboxEvent[], string, Readonly<import("vue").ExtractPropTypes<{
|
|
48
49
|
value: {
|
|
49
50
|
type: (StringConstructor | NumberConstructor)[];
|
|
50
51
|
default: any;
|
|
51
52
|
};
|
|
52
53
|
modelValue: {
|
|
53
|
-
type: PropType<BentoCheckboxType>;
|
|
54
|
+
type: PropType<BentoCheckboxType | BentoCheckboxGroupItems>;
|
|
54
55
|
default: boolean;
|
|
55
56
|
};
|
|
56
57
|
disabled: {
|
|
@@ -73,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
74
|
value: string | number;
|
|
74
75
|
disabled: boolean;
|
|
75
76
|
ariaLabel: string;
|
|
76
|
-
modelValue: BentoCheckboxType;
|
|
77
|
+
modelValue: BentoCheckboxType | BentoCheckboxGroupItems;
|
|
77
78
|
hasError: boolean;
|
|
78
79
|
indeterminate: boolean;
|
|
79
80
|
}>;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { BentoCheckboxGroupItems, BentoCheckboxGroupVariant } from './checkbox-group.types';
|
|
3
|
+
import { BentoCheckboxEvent } from '../../checkbox.types';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
4
5
|
items: {
|
|
5
6
|
type: PropType<BentoCheckboxGroupItems>;
|
|
6
7
|
required: true;
|
|
7
8
|
};
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: {
|
|
11
|
+
(arrayLength: number): (string | number)[];
|
|
12
|
+
(...items: (string | number)[]): (string | number)[];
|
|
13
|
+
new (arrayLength: number): (string | number)[];
|
|
14
|
+
new (...items: (string | number)[]): (string | number)[];
|
|
15
|
+
isArray(arg: any): arg is any[];
|
|
16
|
+
readonly prototype: any[];
|
|
17
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
18
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
19
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
20
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
21
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
22
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
23
|
+
};
|
|
24
|
+
default: () => any[];
|
|
25
|
+
};
|
|
8
26
|
variant: {
|
|
9
27
|
type: PropType<BentoCheckboxGroupVariant>;
|
|
10
28
|
default: BentoCheckboxGroupVariant;
|
|
@@ -30,13 +48,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
48
|
conditionalClasses: import("vue").ComputedRef<{
|
|
31
49
|
'b-checkbox-group--horizontal': boolean;
|
|
32
50
|
}>;
|
|
33
|
-
|
|
51
|
+
inputValue: import("vue").Ref<(string | number)[]>;
|
|
34
52
|
onInput: (value: any) => void;
|
|
35
|
-
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin,
|
|
53
|
+
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, BentoCheckboxEvent[], string, Readonly<import("vue").ExtractPropTypes<{
|
|
36
54
|
items: {
|
|
37
55
|
type: PropType<BentoCheckboxGroupItems>;
|
|
38
56
|
required: true;
|
|
39
57
|
};
|
|
58
|
+
modelValue: {
|
|
59
|
+
type: {
|
|
60
|
+
(arrayLength: number): (string | number)[];
|
|
61
|
+
(...items: (string | number)[]): (string | number)[];
|
|
62
|
+
new (arrayLength: number): (string | number)[];
|
|
63
|
+
new (...items: (string | number)[]): (string | number)[];
|
|
64
|
+
isArray(arg: any): arg is any[];
|
|
65
|
+
readonly prototype: any[];
|
|
66
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
67
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
68
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
69
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
70
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
71
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
72
|
+
};
|
|
73
|
+
default: () => any[];
|
|
74
|
+
};
|
|
40
75
|
variant: {
|
|
41
76
|
type: PropType<BentoCheckboxGroupVariant>;
|
|
42
77
|
default: BentoCheckboxGroupVariant;
|
|
@@ -61,6 +96,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
96
|
}>>, {
|
|
62
97
|
variant: BentoCheckboxGroupVariant;
|
|
63
98
|
disabled: boolean;
|
|
99
|
+
modelValue: (string | number)[];
|
|
64
100
|
hasError: boolean;
|
|
65
101
|
formId: string;
|
|
66
102
|
}>;
|
package/dist/@types/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { BentoColumn, BentoDatagridAllItemsSelectedState, BentoDatagridSortByColumn, BentoDatagridSortDirection } from '../../data-grid.types';
|
|
2
|
+
import { BentoColumn, BentoDatagridAllItemsSelectedState, BentoDatagridAriaSortValue, BentoDatagridSortByColumn, BentoDatagridSortDirection } from '../../data-grid.types';
|
|
3
3
|
import { BentoTypographyElement } from '@/components/typography';
|
|
4
4
|
import { BentoDatagridDraggingColumnState, DatagridColumnsEvent } from './data-grid-columns-types';
|
|
5
5
|
import type { BentoMenuItem } from '@/components/menu/components';
|
|
@@ -73,8 +73,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
'b-data-grid-columns__column-sort-icon--sorted': boolean;
|
|
74
74
|
};
|
|
75
75
|
sortByColumnField: (field: string) => void;
|
|
76
|
+
getSortingColumnDirection: (column: BentoColumn) => BentoDatagridAriaSortValue;
|
|
76
77
|
startResize: (hasResizableColumns: boolean, field: string, event: MouseEvent) => void;
|
|
77
78
|
isResizing: import("vue").Ref<boolean>;
|
|
79
|
+
dataGridColumnEvents: (column: BentoColumn) => {
|
|
80
|
+
[eventName: string]: (e: Event) => void;
|
|
81
|
+
};
|
|
78
82
|
draggingEventsForColumn: import("vue").ComputedRef<(column: BentoColumn) => {
|
|
79
83
|
dragstart?: undefined;
|
|
80
84
|
dragover?: undefined;
|
|
@@ -15,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
};
|
|
16
16
|
}, {
|
|
17
17
|
configSettingsButtonRef: any;
|
|
18
|
+
popoverId: string;
|
|
18
19
|
isConfigSettingsPanelOpen: import("vue").Ref<boolean>;
|
|
19
20
|
allColumnsVisbilityToggleState: import("vue").Ref<boolean>;
|
|
20
21
|
filteredColumnVisibilityColumns: import("vue").ComputedRef<BentoColumn[]>;
|
|
@@ -2,5 +2,6 @@ export { default as useResizer } from './useResizer';
|
|
|
2
2
|
export { default as useCalculateColumnWidth, DATAGRID_SELECT_FIELD_NAME, } from './useCalculateColumnWidth/useCalculateColumnWidth';
|
|
3
3
|
export { useSorter } from './useSorter';
|
|
4
4
|
export { useSelector } from './useSelector';
|
|
5
|
+
export { useKeyboardNavigator } from './useKeyboardNavigator/useKeyboardNavigator';
|
|
5
6
|
export { useColumnReorderer } from './useColumnReorderer/useColumnReorderer';
|
|
6
7
|
export { useConfigSettings } from './useConfigSettings/useConfigSettings';
|
package/dist/@types/components/data-grid/composables/useKeyboardNavigator/useKeyboardNavigator.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { BentoDatagridNavigationKeyCode } from './useKeyboardNavigator.types';
|
|
3
|
+
export declare const useKeyboardNavigator: (gridcellRefs: Ref<HTMLDivElement[]>, columnsCount: Ref<number>) => {
|
|
4
|
+
focusOnNextGridcell: (target: EventTarget, keyCode: BentoDatagridNavigationKeyCode, ctrlKey: boolean) => void;
|
|
5
|
+
isNavigationKeyCode: (keyCode: number) => boolean;
|
|
6
|
+
};
|
|
@@ -2,7 +2,7 @@ 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
4
|
onAllRowSelect: (allItemsSelected: boolean) => void;
|
|
5
|
-
onRowSelect: () => void;
|
|
5
|
+
onRowSelect: (value: BentoDatagridDataItemId[]) => void;
|
|
6
6
|
allItemsSelectedState: {
|
|
7
7
|
allItemsSelected: boolean;
|
|
8
8
|
isIndeterminate: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { Booleanish } from '@/types';
|
|
2
3
|
import { BentoColumn, BentoColumnOverflow, BentoDatagridData, BentoDatagridDataItem, BentoDatagridDataItemId, BentoDatagridEvent, BentoDatagridGetDataItemIdFn, BentoDatagridIsDataItemDisabledFn, BentoDatagridSortByColumn, BentoDatagridSortDirection } from './data-grid.types';
|
|
3
4
|
import { BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';
|
|
4
5
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -131,6 +132,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
132
|
type: PropType<BentoDatagridDataItemId[]>;
|
|
132
133
|
default: () => any[];
|
|
133
134
|
};
|
|
135
|
+
highlightedRows: {
|
|
136
|
+
type: PropType<BentoDatagridDataItemId[]>;
|
|
137
|
+
default: () => any[];
|
|
138
|
+
};
|
|
134
139
|
sortBy: {
|
|
135
140
|
type: PropType<BentoDatagridSortByColumn[]>;
|
|
136
141
|
default: () => any[];
|
|
@@ -198,6 +203,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
198
203
|
id: string;
|
|
199
204
|
isFrozenColumns?: undefined;
|
|
200
205
|
})[]>;
|
|
206
|
+
gridcellRefs: import("vue").Ref<HTMLDivElement[]>;
|
|
207
|
+
slots: import("vue/types/v3-setup-context").Slots;
|
|
201
208
|
ariaGridHeaderText: import("vue").ComputedRef<string>;
|
|
202
209
|
conditionalTitleAttribute: (column: BentoColumn, content: unknown) => string;
|
|
203
210
|
getRowData: (rowData: unknown) => unknown;
|
|
@@ -211,6 +218,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
211
218
|
'b-data-grid__row--disabled': boolean;
|
|
212
219
|
'b-data-grid__row--row-clicks-enabled': boolean;
|
|
213
220
|
'b-data-grid__cell--is-re-ordering': boolean;
|
|
221
|
+
'b-data-grid__row--highlighted': boolean;
|
|
214
222
|
};
|
|
215
223
|
conditionalRowSetClasses: (isFrozenRowSet: boolean) => {
|
|
216
224
|
'b-data-grid__row-cell-set--frozen': boolean;
|
|
@@ -244,9 +252,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
244
252
|
};
|
|
245
253
|
selectedItems: import("vue").Ref<BentoDatagridDataItemId[]>;
|
|
246
254
|
onAllRowSelect: (allItemsSelected: boolean) => void;
|
|
247
|
-
onRowSelect: () => void;
|
|
255
|
+
onRowSelect: (value: BentoDatagridDataItemId[]) => void;
|
|
248
256
|
DATAGRID_SELECT_FIELD_NAME: string;
|
|
249
257
|
onRowClick: (row: BentoDatagridDataItem, event: MouseEvent) => void;
|
|
258
|
+
getRowAriaSelectedValue: (row: BentoDatagridDataItem) => Booleanish;
|
|
250
259
|
onConfigSettingsUpdate: (isCompactView: boolean) => void;
|
|
251
260
|
onConfigSettingsColumnsUpdate: (newColumns: BentoColumn[]) => void;
|
|
252
261
|
onConfigSettingsColumnUpdate: (updatedColumn: BentoColumn) => void;
|
|
@@ -322,6 +331,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
322
331
|
dragover: (e: DragEvent) => void;
|
|
323
332
|
}>;
|
|
324
333
|
computedColumnPanelAlignment: import("vue").ComputedRef<number>;
|
|
334
|
+
gridcellEvents: (column: any) => {
|
|
335
|
+
[eventName: string]: (e: Event) => void;
|
|
336
|
+
};
|
|
337
|
+
getCellindex: (rowIndex: number, colIndex: number, colSetIndex: number) => number;
|
|
338
|
+
getColIndex: (colIndex: number, colSetIndex: number) => number;
|
|
339
|
+
navigationInput: (event: KeyboardEvent) => void;
|
|
325
340
|
}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, (BentoDatagridEvent.COLUMNS | BentoDatagridEvent.COLUMN_RESIZE | BentoDatagridEvent.ITEMS_PAGE | BentoDatagridEvent.NAVIGATE | BentoDatagridEvent.FILTER_SEARCH_INPUT | BentoDatagridEvent.FILTER_SEARCH_CLEAR | BentoDatagridEvent.UPDATE_COLUMNS | BentoDatagridEvent.UPDATE_FILTERS | BentoDatagridEvent.UPDATE_FILTER_SEARCH_TERM | BentoDatagridEvent.UPDATE_SORT_BY | BentoDatagridEvent.ROW_CLICK | BentoDatagridEvent.SELECT | BentoDatagridEvent.SORT)[], string, Readonly<import("vue").ExtractPropTypes<{
|
|
326
341
|
allowRowClicks: {
|
|
327
342
|
type: BooleanConstructor;
|
|
@@ -452,6 +467,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
452
467
|
type: PropType<BentoDatagridDataItemId[]>;
|
|
453
468
|
default: () => any[];
|
|
454
469
|
};
|
|
470
|
+
highlightedRows: {
|
|
471
|
+
type: PropType<BentoDatagridDataItemId[]>;
|
|
472
|
+
default: () => any[];
|
|
473
|
+
};
|
|
455
474
|
sortBy: {
|
|
456
475
|
type: PropType<BentoDatagridSortByColumn[]>;
|
|
457
476
|
default: () => any[];
|
|
@@ -473,5 +492,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
473
492
|
stickyPagination: boolean;
|
|
474
493
|
selectable: boolean;
|
|
475
494
|
selection: BentoDatagridDataItemId[];
|
|
495
|
+
highlightedRows: BentoDatagridDataItemId[];
|
|
476
496
|
}>;
|
|
477
497
|
export default _default;
|
package/dist/@types/components/date-picker/composables/use-date-picker-single-calendar-text.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UseDateDisplayText } from '
|
|
1
|
+
import { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';
|
|
2
2
|
export declare const useDatePickerSingleCalendarText: UseDateDisplayText<Date>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
export interface UseDateDisplayTextProps<T> {
|
|
3
|
+
datePickerValue: Ref<T>;
|
|
4
|
+
isDateIncorrect: Ref<boolean>;
|
|
5
|
+
}
|
|
6
|
+
export type UseDateDisplayText<T> = (props: UseDateDisplayTextProps<T>) => {
|
|
7
|
+
dateDisplayValue: ComputedRef<string>;
|
|
8
|
+
textInputDisplayValue: Ref<string>;
|
|
9
|
+
formatTextInputDisplayValue: (dateToFormat?: Date) => void;
|
|
10
|
+
};
|