@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.
Files changed (155) hide show
  1. package/README.md +60 -6
  2. package/dist/@types/index.d.ts +218 -159
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/checkbox-input.css +1 -1
  9. package/dist/assets/checkbox.css +1 -1
  10. package/dist/assets/data-grid.css +1 -1
  11. package/dist/assets/date-range-picker.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/info-icon.css +1 -1
  14. package/dist/assets/inspector.css +1 -1
  15. package/dist/assets/loading-indicator.css +1 -1
  16. package/dist/assets/menu.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/pagination.css +1 -1
  19. package/dist/assets/popover.css +1 -1
  20. package/dist/assets/sidepanel.css +1 -1
  21. package/dist/button.js +2 -2
  22. package/dist/card.js +1 -1
  23. package/dist/checkbox.js +3 -3
  24. package/dist/chunks/{action-bar.CjdRoIjd.js → action-bar.D4-U6Fkb.js} +4 -4
  25. package/dist/chunks/{action-bar.CjdRoIjd.js.map → action-bar.D4-U6Fkb.js.map} +1 -1
  26. package/dist/chunks/{base-modal.D9nvAFwb.js → base-modal.O-Xbv58a.js} +2 -2
  27. package/dist/chunks/{base-modal.D9nvAFwb.js.map → base-modal.O-Xbv58a.js.map} +1 -1
  28. package/dist/chunks/{button-actions-with-menu.BraBlJ_T.js → button-actions-with-menu.MEx5L6Sg.js} +4 -4
  29. package/dist/chunks/{button-actions-with-menu.BraBlJ_T.js.map → button-actions-with-menu.MEx5L6Sg.js.map} +1 -1
  30. package/dist/chunks/{button-actions.22PlNl4O.js → button-actions.Daj6TvUt.js} +2 -2
  31. package/dist/chunks/{button-actions.22PlNl4O.js.map → button-actions.Daj6TvUt.js.map} +1 -1
  32. package/dist/chunks/{card.7EiG0W8f.js → card.CQTvuu6n.js} +2 -2
  33. package/dist/chunks/{card.7EiG0W8f.js.map → card.CQTvuu6n.js.map} +1 -1
  34. package/dist/chunks/{checkbox-group.BKDaJocG.js → checkbox-group.BEI5FPnW.js} +4 -4
  35. package/dist/chunks/{checkbox-group.BKDaJocG.js.map → checkbox-group.BEI5FPnW.js.map} +1 -1
  36. package/dist/chunks/{checkbox-input.DgfJgZaI.js → checkbox-input.Bo4NxNOh.js} +43 -39
  37. package/dist/chunks/checkbox-input.Bo4NxNOh.js.map +1 -0
  38. package/dist/chunks/{checkbox.DNsPAfq5.js → checkbox.5uVM-HLg.js} +53 -59
  39. package/dist/chunks/{checkbox.DNsPAfq5.js.map → checkbox.5uVM-HLg.js.map} +1 -1
  40. package/dist/chunks/{code-snippet.BPKC0Bxs.js → code-snippet.BweusD-1.js} +4 -4
  41. package/dist/chunks/{code-snippet.BPKC0Bxs.js.map → code-snippet.BweusD-1.js.map} +1 -1
  42. package/dist/chunks/{controls-group.Dx66LdfN.js → controls-group.Sni8leS5.js} +2 -2
  43. package/dist/chunks/{controls-group.Dx66LdfN.js.map → controls-group.Sni8leS5.js.map} +1 -1
  44. package/dist/chunks/{dashboard-section.CilMYHUI.js → dashboard-section.C42qpyhm.js} +2 -2
  45. package/dist/chunks/{dashboard-section.CilMYHUI.js.map → dashboard-section.C42qpyhm.js.map} +1 -1
  46. package/dist/chunks/{dashed-underline.3xCL30uf.js → dashed-underline.Dd9CWaDw.js} +2 -2
  47. package/dist/chunks/{dashed-underline.3xCL30uf.js.map → dashed-underline.Dd9CWaDw.js.map} +1 -1
  48. package/dist/chunks/{data-grid-template.DV7r3myJ.js → data-grid-template.DSFF6tTv.js} +2 -2
  49. package/dist/chunks/{data-grid-template.DV7r3myJ.js.map → data-grid-template.DSFF6tTv.js.map} +1 -1
  50. package/dist/chunks/{data-grid.CAs5qLq1.js → data-grid.Bs1AeOdW.js} +460 -440
  51. package/dist/chunks/data-grid.Bs1AeOdW.js.map +1 -0
  52. package/dist/chunks/{date-picker.Ce5xoP6x.js → date-picker.D9EWIMKc.js} +14 -14
  53. package/dist/chunks/{date-picker.Ce5xoP6x.js.map → date-picker.D9EWIMKc.js.map} +1 -1
  54. package/dist/chunks/date-range-picker.Dl7IDQX7.js +833 -0
  55. package/dist/chunks/{date-range-picker.WFZu39Kj.js.map → date-range-picker.Dl7IDQX7.js.map} +1 -1
  56. package/dist/chunks/{dropdown-tag.Df5CcYQ0.js → dropdown-tag.C8NnThcn.js} +2 -2
  57. package/dist/chunks/{dropdown-tag.Df5CcYQ0.js.map → dropdown-tag.C8NnThcn.js.map} +1 -1
  58. package/dist/chunks/{dropdown.DpiHAE1l.js → dropdown.D-z8R4hr.js} +17 -17
  59. package/dist/chunks/{dropdown.DpiHAE1l.js.map → dropdown.D-z8R4hr.js.map} +1 -1
  60. package/dist/chunks/{error-message.Btn_7Igx.js → error-message.Bk2maRF8.js} +2 -2
  61. package/dist/chunks/{error-message.Btn_7Igx.js.map → error-message.Bk2maRF8.js.map} +1 -1
  62. package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
  63. package/dist/chunks/{filter-bar.BSWkjktr.js → filter-bar.DQJ7y-B4.js} +12 -12
  64. package/dist/chunks/{filter-bar.BSWkjktr.js.map → filter-bar.DQJ7y-B4.js.map} +1 -1
  65. package/dist/chunks/{footer-actions.BL59SNj4.js → footer-actions.C33u1bdy.js} +2 -2
  66. package/dist/chunks/{footer-actions.BL59SNj4.js.map → footer-actions.C33u1bdy.js.map} +1 -1
  67. package/dist/chunks/{header.DGuyhMle.js → header.C9phQQdd.js} +4 -4
  68. package/dist/chunks/{header.DGuyhMle.js.map → header.C9phQQdd.js.map} +1 -1
  69. package/dist/chunks/{info-icon.BxWBisWG.js → info-icon.CCR-cAFR.js} +2 -2
  70. package/dist/chunks/{info-icon.BxWBisWG.js.map → info-icon.CCR-cAFR.js.map} +1 -1
  71. package/dist/chunks/{input-field.CT0_xKvJ.js → input-field.D8GdzKoR.js} +3 -3
  72. package/dist/chunks/{input-field.CT0_xKvJ.js.map → input-field.D8GdzKoR.js.map} +1 -1
  73. package/dist/chunks/{inspector.types.D1HKmbsJ.js → inspector.types.B8ma6aEp.js} +2 -2
  74. package/dist/chunks/{inspector.types.D1HKmbsJ.js.map → inspector.types.B8ma6aEp.js.map} +1 -1
  75. package/dist/chunks/{loading-button.CgiFM_c7.js → loading-button.DG5CBOC6.js} +2 -2
  76. package/dist/chunks/{loading-button.CgiFM_c7.js.map → loading-button.DG5CBOC6.js.map} +1 -1
  77. package/dist/chunks/{loading-indicator.DXc7I1Lm.js → loading-indicator.z8COalOc.js} +2 -2
  78. package/dist/chunks/loading-indicator.z8COalOc.js.map +1 -0
  79. package/dist/chunks/{menu.DEgYSQA2.js → menu.CRSCf_7g.js} +2 -2
  80. package/dist/chunks/{menu.DEgYSQA2.js.map → menu.CRSCf_7g.js.map} +1 -1
  81. package/dist/chunks/{modal-fullscreen.DsJnp4i6.js → modal-fullscreen.CHk3iiWD.js} +2 -2
  82. package/dist/chunks/{modal-fullscreen.DsJnp4i6.js.map → modal-fullscreen.CHk3iiWD.js.map} +1 -1
  83. package/dist/chunks/{modal.B1WqZZpr.js → modal.CZ7IpM0s.js} +4 -4
  84. package/dist/chunks/{modal.B1WqZZpr.js.map → modal.CZ7IpM0s.js.map} +1 -1
  85. package/dist/chunks/pagination.D1Eq93AU.js +344 -0
  86. package/dist/chunks/pagination.D1Eq93AU.js.map +1 -0
  87. package/dist/chunks/{popover.hzeFBXzL.js → popover.Dgrhz6Ty.js} +2 -2
  88. package/dist/chunks/{popover.hzeFBXzL.js.map → popover.Dgrhz6Ty.js.map} +1 -1
  89. package/dist/chunks/{radio-group.CZaVmmUe.js → radio-group.DtlPzh_w.js} +3 -3
  90. package/dist/chunks/{radio-group.CZaVmmUe.js.map → radio-group.DtlPzh_w.js.map} +1 -1
  91. package/dist/chunks/{search-bar.osJS8Cs-.js → search-bar.CKz-FPCl.js} +2 -2
  92. package/dist/chunks/{search-bar.osJS8Cs-.js.map → search-bar.CKz-FPCl.js.map} +1 -1
  93. package/dist/chunks/{secondary-nav.o_1YCWAx.js → secondary-nav.DDg3jyak.js} +2 -2
  94. package/dist/chunks/{secondary-nav.o_1YCWAx.js.map → secondary-nav.DDg3jyak.js.map} +1 -1
  95. package/dist/chunks/{selection-card-group.BRFV5iQl.js → selection-card-group.CW7c72r2.js} +4 -4
  96. package/dist/chunks/{selection-card-group.BRFV5iQl.js.map → selection-card-group.CW7c72r2.js.map} +1 -1
  97. package/dist/chunks/{sidepanel.GSooM2yT.js → sidepanel.Beqpqgzb.js} +2 -2
  98. package/dist/chunks/{sidepanel.GSooM2yT.js.map → sidepanel.Beqpqgzb.js.map} +1 -1
  99. package/dist/chunks/{structured-list-item.JDICCHjN.js → structured-list-item.CEvVHuPw.js} +2 -2
  100. package/dist/chunks/{structured-list-item.JDICCHjN.js.map → structured-list-item.CEvVHuPw.js.map} +1 -1
  101. package/dist/chunks/{summary-grid-item-custom.C-8hXJcP.js → summary-grid-item-custom.Mh4w6dXl.js} +2 -2
  102. package/dist/chunks/{summary-grid-item-custom.C-8hXJcP.js.map → summary-grid-item-custom.Mh4w6dXl.js.map} +1 -1
  103. package/dist/chunks/{textarea.CrYT_JJ-.js → textarea.DPL1yV7o.js} +2 -2
  104. package/dist/chunks/{textarea.CrYT_JJ-.js.map → textarea.DPL1yV7o.js.map} +1 -1
  105. package/dist/chunks/{timeline-item.BS_P9oEW.js → timeline-item.D1VPSSGb.js} +4 -4
  106. package/dist/chunks/{timeline-item.BS_P9oEW.js.map → timeline-item.D1VPSSGb.js.map} +1 -1
  107. package/dist/chunks/{tutorial.D_38Tuq-.js → tutorial.RhC117bN.js} +4 -4
  108. package/dist/chunks/{tutorial.D_38Tuq-.js.map → tutorial.RhC117bN.js.map} +1 -1
  109. package/dist/chunks/{use-cached-selected-values.DxHmVtct.js → use-cached-selected-values.DYwPtMZL.js} +4 -4
  110. package/dist/chunks/{use-cached-selected-values.DxHmVtct.js.map → use-cached-selected-values.DYwPtMZL.js.map} +1 -1
  111. package/dist/code-snippet.js +1 -1
  112. package/dist/dashboard-template.js +1 -1
  113. package/dist/dashed-underline.js +1 -1
  114. package/dist/data-grid-template.js +1 -1
  115. package/dist/data-grid.js +1 -1
  116. package/dist/date-picker.js +1 -1
  117. package/dist/date-range-picker.js +1 -1
  118. package/dist/dropdown.js +3 -3
  119. package/dist/filter-bar.js +1 -1
  120. package/dist/header.js +1 -1
  121. package/dist/index.js +39 -39
  122. package/dist/index.js.map +1 -1
  123. package/dist/info-icon.js +1 -1
  124. package/dist/input-field.js +1 -1
  125. package/dist/inspector.js +1 -1
  126. package/dist/internal.js +3 -3
  127. package/dist/loading-indicator.js +1 -1
  128. package/dist/menu.js +1 -1
  129. package/dist/modal-fullscreen.js +1 -1
  130. package/dist/modal.js +2 -2
  131. package/dist/pagination.js +1 -1
  132. package/dist/popover.js +1 -1
  133. package/dist/radio-group.js +1 -1
  134. package/dist/search-bar.js +2 -2
  135. package/dist/secondary-nav.js +1 -1
  136. package/dist/selection-card.js +1 -1
  137. package/dist/sidepanel.js +1 -1
  138. package/dist/structured-list.js +1 -1
  139. package/dist/styles/bento-dark.css +3 -0
  140. package/dist/styles/bento-light.css +3 -0
  141. package/dist/styles/bento.css +3 -0
  142. package/dist/styles/legacy.css +3 -0
  143. package/dist/styles/styleguide.css +3 -0
  144. package/dist/summary-grid.js +1 -1
  145. package/dist/textarea.js +1 -1
  146. package/dist/timeline.js +1 -1
  147. package/dist/tutorial.js +1 -1
  148. package/dist/web-types.json +244 -207
  149. package/package.json +2 -2
  150. package/dist/chunks/checkbox-input.DgfJgZaI.js.map +0 -1
  151. package/dist/chunks/data-grid.CAs5qLq1.js.map +0 -1
  152. package/dist/chunks/date-range-picker.WFZu39Kj.js +0 -775
  153. package/dist/chunks/loading-indicator.DXc7I1Lm.js.map +0 -1
  154. package/dist/chunks/pagination.8BZz-h13.js +0 -500
  155. 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 `bento.css` stylesheet is deprecated. It will be removed in v2.0.0. Please use the `bento-light.css` instead.
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. At the current
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
- More extensive out-of-the-box theming support is planned and will come soon.
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