@adyen/bento-vue2 1.37.0 → 1.38.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.
- package/README.md +60 -6
- package/dist/@types/index.d.ts +218 -159
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-input.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/info-icon.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/loading-indicator.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/pagination.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +3 -3
- package/dist/chunks/{action-bar.CjdRoIjd.js → action-bar.D4-U6Fkb.js} +4 -4
- package/dist/chunks/{action-bar.CjdRoIjd.js.map → action-bar.D4-U6Fkb.js.map} +1 -1
- package/dist/chunks/{base-modal.D9nvAFwb.js → base-modal.O-Xbv58a.js} +2 -2
- package/dist/chunks/{base-modal.D9nvAFwb.js.map → base-modal.O-Xbv58a.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BraBlJ_T.js → button-actions-with-menu.MEx5L6Sg.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.BraBlJ_T.js.map → button-actions-with-menu.MEx5L6Sg.js.map} +1 -1
- package/dist/chunks/{button-actions.22PlNl4O.js → button-actions.Daj6TvUt.js} +2 -2
- package/dist/chunks/{button-actions.22PlNl4O.js.map → button-actions.Daj6TvUt.js.map} +1 -1
- package/dist/chunks/{card.7EiG0W8f.js → card.CQTvuu6n.js} +2 -2
- package/dist/chunks/{card.7EiG0W8f.js.map → card.CQTvuu6n.js.map} +1 -1
- package/dist/chunks/{checkbox-group.BKDaJocG.js → checkbox-group.BEI5FPnW.js} +4 -4
- package/dist/chunks/{checkbox-group.BKDaJocG.js.map → checkbox-group.BEI5FPnW.js.map} +1 -1
- package/dist/chunks/{checkbox-input.DgfJgZaI.js → checkbox-input.Bo4NxNOh.js} +43 -39
- package/dist/chunks/checkbox-input.Bo4NxNOh.js.map +1 -0
- package/dist/chunks/{checkbox.DNsPAfq5.js → checkbox.5uVM-HLg.js} +53 -59
- package/dist/chunks/{checkbox.DNsPAfq5.js.map → checkbox.5uVM-HLg.js.map} +1 -1
- package/dist/chunks/{code-snippet.BPKC0Bxs.js → code-snippet.BweusD-1.js} +4 -4
- package/dist/chunks/{code-snippet.BPKC0Bxs.js.map → code-snippet.BweusD-1.js.map} +1 -1
- package/dist/chunks/{controls-group.Dx66LdfN.js → controls-group.Sni8leS5.js} +2 -2
- package/dist/chunks/{controls-group.Dx66LdfN.js.map → controls-group.Sni8leS5.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CilMYHUI.js → dashboard-section.C42qpyhm.js} +2 -2
- package/dist/chunks/{dashboard-section.CilMYHUI.js.map → dashboard-section.C42qpyhm.js.map} +1 -1
- package/dist/chunks/{dashed-underline.3xCL30uf.js → dashed-underline.Dd9CWaDw.js} +2 -2
- package/dist/chunks/{dashed-underline.3xCL30uf.js.map → dashed-underline.Dd9CWaDw.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DV7r3myJ.js → data-grid-template.DSFF6tTv.js} +2 -2
- package/dist/chunks/{data-grid-template.DV7r3myJ.js.map → data-grid-template.DSFF6tTv.js.map} +1 -1
- package/dist/chunks/{data-grid.CAs5qLq1.js → data-grid.Bs1AeOdW.js} +460 -440
- package/dist/chunks/data-grid.Bs1AeOdW.js.map +1 -0
- package/dist/chunks/{date-picker.Ce5xoP6x.js → date-picker.D9EWIMKc.js} +14 -14
- package/dist/chunks/{date-picker.Ce5xoP6x.js.map → date-picker.D9EWIMKc.js.map} +1 -1
- package/dist/chunks/date-range-picker.Dl7IDQX7.js +833 -0
- package/dist/chunks/{date-range-picker.WFZu39Kj.js.map → date-range-picker.Dl7IDQX7.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.Df5CcYQ0.js → dropdown-tag.C8NnThcn.js} +2 -2
- package/dist/chunks/{dropdown-tag.Df5CcYQ0.js.map → dropdown-tag.C8NnThcn.js.map} +1 -1
- package/dist/chunks/{dropdown.DpiHAE1l.js → dropdown.D-z8R4hr.js} +17 -17
- package/dist/chunks/{dropdown.DpiHAE1l.js.map → dropdown.D-z8R4hr.js.map} +1 -1
- package/dist/chunks/{error-message.Btn_7Igx.js → error-message.Bk2maRF8.js} +2 -2
- package/dist/chunks/{error-message.Btn_7Igx.js.map → error-message.Bk2maRF8.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
- package/dist/chunks/{filter-bar.BSWkjktr.js → filter-bar.DQJ7y-B4.js} +12 -12
- package/dist/chunks/{filter-bar.BSWkjktr.js.map → filter-bar.DQJ7y-B4.js.map} +1 -1
- package/dist/chunks/{footer-actions.BL59SNj4.js → footer-actions.C33u1bdy.js} +2 -2
- package/dist/chunks/{footer-actions.BL59SNj4.js.map → footer-actions.C33u1bdy.js.map} +1 -1
- package/dist/chunks/{header.DGuyhMle.js → header.C9phQQdd.js} +4 -4
- package/dist/chunks/{header.DGuyhMle.js.map → header.C9phQQdd.js.map} +1 -1
- package/dist/chunks/{info-icon.BxWBisWG.js → info-icon.CCR-cAFR.js} +2 -2
- package/dist/chunks/{info-icon.BxWBisWG.js.map → info-icon.CCR-cAFR.js.map} +1 -1
- package/dist/chunks/{input-field.CT0_xKvJ.js → input-field.D8GdzKoR.js} +3 -3
- package/dist/chunks/{input-field.CT0_xKvJ.js.map → input-field.D8GdzKoR.js.map} +1 -1
- package/dist/chunks/{inspector.types.D1HKmbsJ.js → inspector.types.B8ma6aEp.js} +2 -2
- package/dist/chunks/{inspector.types.D1HKmbsJ.js.map → inspector.types.B8ma6aEp.js.map} +1 -1
- package/dist/chunks/{loading-button.CgiFM_c7.js → loading-button.DG5CBOC6.js} +2 -2
- package/dist/chunks/{loading-button.CgiFM_c7.js.map → loading-button.DG5CBOC6.js.map} +1 -1
- package/dist/chunks/{loading-indicator.DXc7I1Lm.js → loading-indicator.z8COalOc.js} +2 -2
- package/dist/chunks/loading-indicator.z8COalOc.js.map +1 -0
- package/dist/chunks/{menu.DEgYSQA2.js → menu.CRSCf_7g.js} +2 -2
- package/dist/chunks/{menu.DEgYSQA2.js.map → menu.CRSCf_7g.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.DsJnp4i6.js → modal-fullscreen.CHk3iiWD.js} +2 -2
- package/dist/chunks/{modal-fullscreen.DsJnp4i6.js.map → modal-fullscreen.CHk3iiWD.js.map} +1 -1
- package/dist/chunks/{modal.B1WqZZpr.js → modal.CZ7IpM0s.js} +4 -4
- package/dist/chunks/{modal.B1WqZZpr.js.map → modal.CZ7IpM0s.js.map} +1 -1
- package/dist/chunks/pagination.D1Eq93AU.js +344 -0
- package/dist/chunks/pagination.D1Eq93AU.js.map +1 -0
- package/dist/chunks/{popover.hzeFBXzL.js → popover.Dgrhz6Ty.js} +2 -2
- package/dist/chunks/{popover.hzeFBXzL.js.map → popover.Dgrhz6Ty.js.map} +1 -1
- package/dist/chunks/{radio-group.CZaVmmUe.js → radio-group.DtlPzh_w.js} +3 -3
- package/dist/chunks/{radio-group.CZaVmmUe.js.map → radio-group.DtlPzh_w.js.map} +1 -1
- package/dist/chunks/{search-bar.osJS8Cs-.js → search-bar.CKz-FPCl.js} +2 -2
- package/dist/chunks/{search-bar.osJS8Cs-.js.map → search-bar.CKz-FPCl.js.map} +1 -1
- package/dist/chunks/{secondary-nav.o_1YCWAx.js → secondary-nav.DDg3jyak.js} +2 -2
- package/dist/chunks/{secondary-nav.o_1YCWAx.js.map → secondary-nav.DDg3jyak.js.map} +1 -1
- package/dist/chunks/{selection-card-group.BRFV5iQl.js → selection-card-group.CW7c72r2.js} +4 -4
- package/dist/chunks/{selection-card-group.BRFV5iQl.js.map → selection-card-group.CW7c72r2.js.map} +1 -1
- package/dist/chunks/{sidepanel.GSooM2yT.js → sidepanel.Beqpqgzb.js} +2 -2
- package/dist/chunks/{sidepanel.GSooM2yT.js.map → sidepanel.Beqpqgzb.js.map} +1 -1
- package/dist/chunks/{structured-list-item.JDICCHjN.js → structured-list-item.CEvVHuPw.js} +2 -2
- package/dist/chunks/{structured-list-item.JDICCHjN.js.map → structured-list-item.CEvVHuPw.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.C-8hXJcP.js → summary-grid-item-custom.Mh4w6dXl.js} +2 -2
- package/dist/chunks/{summary-grid-item-custom.C-8hXJcP.js.map → summary-grid-item-custom.Mh4w6dXl.js.map} +1 -1
- package/dist/chunks/{textarea.CrYT_JJ-.js → textarea.DPL1yV7o.js} +2 -2
- package/dist/chunks/{textarea.CrYT_JJ-.js.map → textarea.DPL1yV7o.js.map} +1 -1
- package/dist/chunks/{timeline-item.BS_P9oEW.js → timeline-item.D1VPSSGb.js} +4 -4
- package/dist/chunks/{timeline-item.BS_P9oEW.js.map → timeline-item.D1VPSSGb.js.map} +1 -1
- package/dist/chunks/{tutorial.D_38Tuq-.js → tutorial.RhC117bN.js} +4 -4
- package/dist/chunks/{tutorial.D_38Tuq-.js.map → tutorial.RhC117bN.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.DxHmVtct.js → use-cached-selected-values.DYwPtMZL.js} +4 -4
- package/dist/chunks/{use-cached-selected-values.DxHmVtct.js.map → use-cached-selected-values.DYwPtMZL.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +39 -39
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +3 -3
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +3 -0
- package/dist/styles/bento-light.css +3 -0
- package/dist/styles/bento.css +3 -0
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +3 -0
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +244 -207
- package/package.json +2 -2
- package/dist/chunks/checkbox-input.DgfJgZaI.js.map +0 -1
- package/dist/chunks/data-grid.CAs5qLq1.js.map +0 -1
- package/dist/chunks/date-range-picker.WFZu39Kj.js +0 -775
- package/dist/chunks/loading-indicator.DXc7I1Lm.js.map +0 -1
- package/dist/chunks/pagination.8BZz-h13.js +0 -500
- package/dist/chunks/pagination.8BZz-h13.js.map +0 -1
package/README.md
CHANGED
|
@@ -40,6 +40,9 @@ Bento Vue contains foundational Vue 2.x (and Vue 3.x) UI components for shipping
|
|
|
40
40
|
- [Stylelint](#stylelint)
|
|
41
41
|
- [Theming](#theming)
|
|
42
42
|
- [⚠️ `BentoTheme.BENTO` deprecated ⚠️](#️-bentothemebento-deprecated-️)
|
|
43
|
+
- [Light and dark themes](#light-and-dark-themes)
|
|
44
|
+
- [Setting a default theme](#setting-a-default-theme)
|
|
45
|
+
- [Toggling a theme](#toggling-a-theme)
|
|
43
46
|
- [ADL theme](#adl-theme)
|
|
44
47
|
- [Set **legacy ADL** theme as default](#set-legacy-adl-theme-as-default)
|
|
45
48
|
- [Setting themes without the Bento Plugin](#setting-themes-without-the-bento-plugin)
|
|
@@ -160,7 +163,8 @@ default value of `withDesignTokensCSSInjection` in the next major version of Ben
|
|
|
160
163
|
|
|
161
164
|
We currently export the following styles:
|
|
162
165
|
|
|
163
|
-
- Bento (default): `@adyen/bento-vue2/styles/bento`
|
|
166
|
+
- Bento light (default): `@adyen/bento-vue2/styles/bento-light`
|
|
167
|
+
- Bento dark: `@adyen/bento-vue2/styles/bento-dark`
|
|
164
168
|
- Legacy i.e. ADL (deprecated): `@adyen/bento-vue2/styles/legacy`
|
|
165
169
|
- Utility classes: `@adyen/bento-vue2/styles/utility`
|
|
166
170
|
|
|
@@ -168,7 +172,8 @@ NOTE: This way of importing bento styles will be mandatory in Bento 2.X
|
|
|
168
172
|
|
|
169
173
|
##### ⚠️ `bento.css` deprecated ⚠️
|
|
170
174
|
|
|
171
|
-
The
|
|
175
|
+
The `@adyen/bento-vue2/styles/bento.css` stylesheet is deprecated. It will be removed in v2.0.0. Please use the
|
|
176
|
+
`@adyen/bento-vue2/styles/bento-light.css` instead.
|
|
172
177
|
|
|
173
178
|
##### Vue 2
|
|
174
179
|
|
|
@@ -433,11 +438,10 @@ extends: [
|
|
|
433
438
|
|
|
434
439
|
## Theming
|
|
435
440
|
|
|
436
|
-
Bento components can be themed with both themes provided out-of-the-box and with custom classes applied.
|
|
437
|
-
Bento component support themes. At present, there is only one alternative style provided out of the box: ADL theme (also
|
|
438
|
-
known as Legacy theme).
|
|
441
|
+
Bento components can be themed with both themes provided out-of-the-box and with custom classes applied.
|
|
439
442
|
|
|
440
|
-
|
|
443
|
+
> Note: It is not recommended to scope themes to individual components or page sections. The component library is
|
|
444
|
+
> designed to be used with a consistent theme applied globally.
|
|
441
445
|
|
|
442
446
|
### ⚠️ `BentoTheme.BENTO` deprecated ⚠️
|
|
443
447
|
|
|
@@ -460,6 +464,56 @@ Vue.use(BentoVue, { theme: BentoTheme.BENTO_LIGHT });
|
|
|
460
464
|
|
|
461
465
|
The Bento plugin defaults to `BentoTheme.BENTO_LIGHT` if unset.
|
|
462
466
|
|
|
467
|
+
### Light and dark themes
|
|
468
|
+
|
|
469
|
+
Starting from version v1.37.0, variables for the dark theme have been introduced, along with the `useBentoTheme`
|
|
470
|
+
composable. This must be used together with the `BentoVue` plugin for theme toggling and configuration to function
|
|
471
|
+
properly.
|
|
472
|
+
|
|
473
|
+
#### Setting a default theme
|
|
474
|
+
|
|
475
|
+
To set a default theme at the application level, ensure that the BentoVue plugin is properly integrated.
|
|
476
|
+
|
|
477
|
+
```typescript
|
|
478
|
+
// set default to light theme
|
|
479
|
+
Vue.use(BentoVue, { theme: BentoTheme.BENTO_LIGHT });
|
|
480
|
+
|
|
481
|
+
// set default to dark theme
|
|
482
|
+
Vue.use(BentoVue, { theme: BentoTheme.BENTO_DARK });
|
|
483
|
+
|
|
484
|
+
// set default to follow user preference
|
|
485
|
+
// this is implemented using window.matchMedia(), so the behavior may vary across different browsers and systems
|
|
486
|
+
Vue.use(BentoVue, { theme: BentoTheme.BENTO_SYSTEM });
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
#### Toggling a theme
|
|
490
|
+
|
|
491
|
+
In your component logic, import the `useBentoTheme()` composable to manage theme switching.
|
|
492
|
+
|
|
493
|
+
```html
|
|
494
|
+
<template>
|
|
495
|
+
<button @click="toggleTheme">Change theme</button>
|
|
496
|
+
</template>
|
|
497
|
+
|
|
498
|
+
<script setup lang="ts">
|
|
499
|
+
import { BentoTheme, useBentoTheme } from '@adyen/bento-vue2';
|
|
500
|
+
|
|
501
|
+
const { getTheme, setTheme } = useBentoTheme();
|
|
502
|
+
|
|
503
|
+
const toggleTheme = () => {
|
|
504
|
+
if (getTheme() === BentoTheme.BENTO_DARK) {
|
|
505
|
+
setTheme(BentoTheme.BENTO_LIGHT);
|
|
506
|
+
} else {
|
|
507
|
+
setTheme(BentoTheme.BENTO_DARK);
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
</script>
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
For enhanced accessibility, consider storing the user's theme preferences in `localStorage`, or respect the system’s
|
|
514
|
+
theme settings by using `BentoTheme.BENTO_SYSTEM`. This ensures that the theme aligns with the user's browser or system
|
|
515
|
+
preferences.
|
|
516
|
+
|
|
463
517
|
### ADL theme
|
|
464
518
|
|
|
465
519
|
#### Set **legacy ADL** theme as default
|