@adyen/bento-vue2 1.12.0 → 1.13.1

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 (216) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +10 -22
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +23 -0
  4. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +2 -1
  5. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
  6. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +9 -0
  7. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +520 -0
  8. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
  9. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +4 -1
  10. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/index.d.ts +1 -0
  11. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +28 -0
  12. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -4
  13. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/useListboxKeyboardNavigation.d.ts +2 -2
  15. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +3 -2
  16. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.keys.d.ts +1 -0
  17. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/index.d.ts +2 -0
  18. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +1 -0
  19. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +22 -26
  20. package/dist/@types/packages/vue2/src/components/radio-group/index.d.ts +2 -1
  21. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +1 -0
  22. package/dist/accordion.js +2 -2
  23. package/dist/action-bar.js +5 -5
  24. package/dist/alert.js +17 -16
  25. package/dist/alert.js.map +1 -1
  26. package/dist/assets/base-modal.css +1 -1
  27. package/dist/assets/button.css +1 -1
  28. package/dist/assets/checkbox.css +1 -1
  29. package/dist/assets/controls-group.css +1 -1
  30. package/dist/assets/index.css +1 -1
  31. package/dist/assets/index10.css +1 -1
  32. package/dist/assets/index11.css +1 -1
  33. package/dist/assets/index12.css +1 -1
  34. package/dist/assets/index13.css +1 -1
  35. package/dist/assets/index14.css +1 -1
  36. package/dist/assets/index15.css +1 -1
  37. package/dist/assets/index16.css +1 -1
  38. package/dist/assets/index17.css +1 -1
  39. package/dist/assets/index18.css +1 -1
  40. package/dist/assets/index19.css +1 -1
  41. package/dist/assets/index2.css +1 -1
  42. package/dist/assets/index20.css +1 -1
  43. package/dist/assets/index21.css +1 -1
  44. package/dist/assets/index22.css +1 -1
  45. package/dist/assets/index23.css +1 -1
  46. package/dist/assets/index24.css +1 -1
  47. package/dist/assets/index25.css +1 -1
  48. package/dist/assets/index26.css +1 -1
  49. package/dist/assets/index28.css +1 -1
  50. package/dist/assets/index29.css +1 -1
  51. package/dist/assets/index3.css +1 -1
  52. package/dist/assets/index30.css +1 -1
  53. package/dist/assets/index31.css +1 -1
  54. package/dist/assets/index32.css +1 -1
  55. package/dist/assets/index33.css +1 -1
  56. package/dist/assets/index34.css +1 -1
  57. package/dist/assets/index35.css +1 -1
  58. package/dist/assets/index36.css +1 -1
  59. package/dist/assets/index37.css +1 -1
  60. package/dist/assets/index39.css +1 -1
  61. package/dist/assets/index4.css +1 -1
  62. package/dist/assets/index40.css +1 -1
  63. package/dist/assets/index41.css +1 -1
  64. package/dist/assets/index42.css +1 -1
  65. package/dist/assets/index43.css +1 -1
  66. package/dist/assets/index44.css +1 -1
  67. package/dist/assets/index45.css +1 -1
  68. package/dist/assets/index46.css +1 -1
  69. package/dist/assets/index5.css +1 -1
  70. package/dist/assets/index6.css +1 -1
  71. package/dist/assets/index7.css +1 -1
  72. package/dist/assets/index8.css +1 -1
  73. package/dist/assets/index9.css +1 -1
  74. package/dist/assets/listbox.css +1 -1
  75. package/dist/avatar-image.js +1 -1
  76. package/dist/badge.js +1 -1
  77. package/dist/button.js +45 -52
  78. package/dist/button.js.map +1 -1
  79. package/dist/card.js +2 -2
  80. package/dist/checkbox.js +6 -6
  81. package/dist/chunks/arrow-left.2db60716.js.map +1 -1
  82. package/dist/chunks/{base-button.1f07b7c1.js → base-button.f9080a52.js} +2 -2
  83. package/dist/chunks/{base-button.1f07b7c1.js.map → base-button.f9080a52.js.map} +1 -1
  84. package/dist/chunks/{base-modal.9d63bdaf.js → base-modal.a580438d.js} +42 -40
  85. package/dist/chunks/base-modal.a580438d.js.map +1 -0
  86. package/dist/chunks/{button-actions-with-menu.4c5091f4.js → button-actions-with-menu.a9087340.js} +3 -3
  87. package/dist/chunks/{button-actions-with-menu.4c5091f4.js.map → button-actions-with-menu.a9087340.js.map} +1 -1
  88. package/dist/chunks/{button.133f145e.js → button.bb0d7584.js} +7 -7
  89. package/dist/chunks/{button.133f145e.js.map → button.bb0d7584.js.map} +1 -1
  90. package/dist/chunks/{calendar.9a8605d1.js → calendar.17ab99de.js} +66 -66
  91. package/dist/chunks/{calendar.9a8605d1.js.map → calendar.17ab99de.js.map} +1 -1
  92. package/dist/chunks/{checkbox.d8b810c7.js → checkbox.51cdb397.js} +3 -3
  93. package/dist/chunks/checkbox.51cdb397.js.map +1 -0
  94. package/dist/chunks/checkmark-circle-fill.345311d2.js.map +1 -1
  95. package/dist/chunks/checkmark-small.520f01b1.js.map +1 -1
  96. package/dist/chunks/checkmark.a6ed8f47.js.map +1 -1
  97. package/dist/chunks/chevron-left.5edf02ac.js.map +1 -1
  98. package/dist/chunks/chevron-up.81185563.js.map +1 -1
  99. package/dist/chunks/{controls-group.bf152dea.js → controls-group.3716f4b4.js} +4 -4
  100. package/dist/chunks/{controls-group.bf152dea.js.map → controls-group.3716f4b4.js.map} +1 -1
  101. package/dist/chunks/{copy.68a7d416.js → copy.54cc3ab4.js} +4 -4
  102. package/dist/chunks/copy.54cc3ab4.js.map +1 -0
  103. package/dist/chunks/cross-circle-fill.27580c4b.js.map +1 -1
  104. package/dist/chunks/cross-small.e851e0de.js +26 -0
  105. package/dist/chunks/cross-small.e851e0de.js.map +1 -0
  106. package/dist/chunks/cross.04678d81.js.map +1 -1
  107. package/dist/chunks/{dropdown-default-textbox.c595fd31.js → dropdown-default-textbox.13b5054e.js} +2 -2
  108. package/dist/chunks/{dropdown-default-textbox.c595fd31.js.map → dropdown-default-textbox.13b5054e.js.map} +1 -1
  109. package/dist/chunks/{dropdown.eaee22a3.js → dropdown.4d800c61.js} +14 -14
  110. package/dist/chunks/dropdown.4d800c61.js.map +1 -0
  111. package/dist/chunks/{field-label.66f52c8f.js → field-label.7328b82b.js} +2 -2
  112. package/dist/chunks/{field-label.66f52c8f.js.map → field-label.7328b82b.js.map} +1 -1
  113. package/dist/chunks/{fixed-scroller.01fc96f7.js → fixed-scroller.d6c11166.js} +2 -2
  114. package/dist/chunks/{fixed-scroller.01fc96f7.js.map → fixed-scroller.d6c11166.js.map} +1 -1
  115. package/dist/chunks/{footer-actions.38e99891.js → footer-actions.bc0cb7e0.js} +3 -3
  116. package/dist/chunks/{footer-actions.38e99891.js.map → footer-actions.bc0cb7e0.js.map} +1 -1
  117. package/dist/chunks/{index.d90c5838.js → index.170ac16b.js} +3 -3
  118. package/dist/chunks/{index.d90c5838.js.map → index.170ac16b.js.map} +1 -1
  119. package/dist/chunks/{index.18773b0b.js → index.339f15c4.js} +26 -26
  120. package/dist/chunks/{index.18773b0b.js.map → index.339f15c4.js.map} +1 -1
  121. package/dist/chunks/{index.3b7d40b7.js → index.541cce1c.js} +2 -2
  122. package/dist/chunks/{index.3b7d40b7.js.map → index.541cce1c.js.map} +1 -1
  123. package/dist/chunks/{index.9b669c12.js → index.5742fba4.js} +7 -7
  124. package/dist/chunks/index.5742fba4.js.map +1 -0
  125. package/dist/chunks/{index.99a2184a.js → index.6ac01113.js} +2 -2
  126. package/dist/chunks/{index.99a2184a.js.map → index.6ac01113.js.map} +1 -1
  127. package/dist/chunks/{index.b38a191d.js → index.772a5595.js} +2 -2
  128. package/dist/chunks/{index.b38a191d.js.map → index.772a5595.js.map} +1 -1
  129. package/dist/chunks/{index.14758ff7.js → index.82ff40be.js} +3 -3
  130. package/dist/chunks/{index.14758ff7.js.map → index.82ff40be.js.map} +1 -1
  131. package/dist/chunks/{index.eb527b75.js → index.a4a820fd.js} +6 -6
  132. package/dist/chunks/{index.eb527b75.js.map → index.a4a820fd.js.map} +1 -1
  133. package/dist/chunks/{index.2cfe4a09.js → index.af238ed6.js} +2 -2
  134. package/dist/chunks/{index.2cfe4a09.js.map → index.af238ed6.js.map} +1 -1
  135. package/dist/chunks/index.d1f65246.js +80 -0
  136. package/dist/chunks/index.d1f65246.js.map +1 -0
  137. package/dist/chunks/{index.45aa17fc.js → index.ec0743da.js} +5 -5
  138. package/dist/chunks/{index.45aa17fc.js.map → index.ec0743da.js.map} +1 -1
  139. package/dist/chunks/{info-filled.27bd4bfb.js → info-filled.c37e091d.js} +12 -33
  140. package/dist/chunks/{info-filled.27bd4bfb.js.map → info-filled.c37e091d.js.map} +1 -1
  141. package/dist/chunks/{listbox-option-tag.168c794c.js → listbox-option-tag.6f3e922c.js} +3 -3
  142. package/dist/chunks/{listbox-option-tag.168c794c.js.map → listbox-option-tag.6f3e922c.js.map} +1 -1
  143. package/dist/chunks/{listbox.23c6b393.js → listbox.e5d70b9b.js} +471 -422
  144. package/dist/chunks/listbox.e5d70b9b.js.map +1 -0
  145. package/dist/chunks/{loading-button.44d698b9.js → loading-button.7301cc2e.js} +2 -2
  146. package/dist/chunks/{loading-button.44d698b9.js.map → loading-button.7301cc2e.js.map} +1 -1
  147. package/dist/chunks/refresh.71a03998.js.map +1 -1
  148. package/dist/chunks/search.471270fe.js.map +1 -1
  149. package/dist/chunks/sidepanel.keys.3f8d69c1.js +7 -0
  150. package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +1 -0
  151. package/dist/chunks/{tooltip.f91b2040.js → tooltip.46858ae6.js} +3 -3
  152. package/dist/chunks/{tooltip.f91b2040.js.map → tooltip.46858ae6.js.map} +1 -1
  153. package/dist/code-snippet.js +7 -7
  154. package/dist/code-snippet.js.map +1 -1
  155. package/dist/country.js +2 -2
  156. package/dist/currency.js +1 -1
  157. package/dist/data-grid.js +692 -683
  158. package/dist/data-grid.js.map +1 -1
  159. package/dist/date-picker.js +18 -18
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/date.js +1 -1
  162. package/dist/divider.js +1 -1
  163. package/dist/dropdown.js +6 -6
  164. package/dist/empty-state.js +3 -3
  165. package/dist/filter-bar.js +477 -471
  166. package/dist/filter-bar.js.map +1 -1
  167. package/dist/focus-trap.js +1 -1
  168. package/dist/form-layout.js +2 -2
  169. package/dist/header.js +3 -3
  170. package/dist/index.js +208 -205
  171. package/dist/info-icon.js +3 -3
  172. package/dist/info-icon.js.map +1 -1
  173. package/dist/input-field.js +4 -4
  174. package/dist/internal.js +7 -7
  175. package/dist/link.js +3 -56
  176. package/dist/link.js.map +1 -1
  177. package/dist/loading-indicator.js +1 -1
  178. package/dist/menu.js +1 -1
  179. package/dist/modal.js +4 -4
  180. package/dist/pagination.js +4 -4
  181. package/dist/pagination.js.map +1 -1
  182. package/dist/payment-method.js +2 -2
  183. package/dist/popover.js +1 -1
  184. package/dist/popper-container.js +1 -1
  185. package/dist/radio-group.js +84 -101
  186. package/dist/radio-group.js.map +1 -1
  187. package/dist/search-bar.js +1 -1
  188. package/dist/secondary-nav.js +2 -2
  189. package/dist/segmented-control.js +3 -3
  190. package/dist/sidepanel.js +73 -71
  191. package/dist/sidepanel.js.map +1 -1
  192. package/dist/status.js +2 -2
  193. package/dist/stepper.js +3 -3
  194. package/dist/stepper.js.map +1 -1
  195. package/dist/structured-list.js +1 -1
  196. package/dist/summary-grid.js +3 -3
  197. package/dist/tabs.js +3 -3
  198. package/dist/tag.js +3 -3
  199. package/dist/textarea.js +91 -87
  200. package/dist/textarea.js.map +1 -1
  201. package/dist/timeline.js +6 -6
  202. package/dist/timeline.js.map +1 -1
  203. package/dist/toast.js +8 -7
  204. package/dist/toast.js.map +1 -1
  205. package/dist/toggle.js +2 -2
  206. package/dist/tutorial.js +4 -4
  207. package/dist/tutorial.js.map +1 -1
  208. package/dist/typography.js +1 -1
  209. package/dist/web-types.json +139 -55
  210. package/package.json +2 -2
  211. package/dist/chunks/base-modal.9d63bdaf.js.map +0 -1
  212. package/dist/chunks/checkbox.d8b810c7.js.map +0 -1
  213. package/dist/chunks/copy.68a7d416.js.map +0 -1
  214. package/dist/chunks/dropdown.eaee22a3.js.map +0 -1
  215. package/dist/chunks/index.9b669c12.js.map +0 -1
  216. package/dist/chunks/listbox.23c6b393.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "@adyen/bento-vue2",
4
- "version": "1.12.0",
4
+ "version": "1.13.1",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -861,43 +861,6 @@
861
861
  "symbol": "default"
862
862
  }
863
863
  },
864
- {
865
- "name": "bento-button-actions",
866
- "description": "",
867
- "attributes": [
868
- {
869
- "name": "actions",
870
- "required": true,
871
- "description": "List of actions that will be used to render the buttons.\nFirst element in the list will be rendered as \"primary\".\nAll elements after the first will be rendered as \"secondary\".\n\nEach object in the list should have a `title`, an `event` and\n(optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n\n`title`: Button's text.\n\n`event`: Event triggered when clicking the Button.\n\n`icon` (optional): Vue Icon from the library `@adyen/ui-assets-icons-16`.",
872
- "value": {
873
- "kind": "expression",
874
- "type": "BentoButtonActionsList"
875
- }
876
- },
877
- {
878
- "name": "layout",
879
- "description": "Defines the layout in which the button actions is presented.\nIt can be one of:",
880
- "value": {
881
- "kind": "expression",
882
- "type": "BentoButtonActionsLayout | `${BentoButtonActionsLayout}`"
883
- },
884
- "default": "BentoButtonActionsLayout.BUTTONS_END"
885
- },
886
- {
887
- "name": "inverse",
888
- "description": "Sets the Button Actions to color scheme inverse",
889
- "value": {
890
- "kind": "expression",
891
- "type": "boolean"
892
- },
893
- "default": "false"
894
- }
895
- ],
896
- "source": {
897
- "module": "./src/components/button/components/button-actions/button-actions.vue",
898
- "symbol": "default"
899
- }
900
- },
901
864
  {
902
865
  "name": "bento-card",
903
866
  "description": "A card is a flexible and composable container.\nUse cards to represent a single object or to visually group certain content, like legal information within company settings.",
@@ -4244,6 +4207,43 @@
4244
4207
  "symbol": "default"
4245
4208
  }
4246
4209
  },
4210
+ {
4211
+ "name": "button-actions",
4212
+ "description": "",
4213
+ "attributes": [
4214
+ {
4215
+ "name": "actions",
4216
+ "required": true,
4217
+ "description": "List of actions that will be used to render the buttons.\nFirst element in the list will be rendered as \"primary\".\nAll elements after the first will be rendered as \"secondary\".\n\nEach object in the list should have a `title`, an `event` and\n(optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n\n`title`: Button's text.\n\n`event`: Event triggered when clicking the Button.\n\n`icon` (optional): Vue Icon from the library `@adyen/ui-assets-icons-16`.",
4218
+ "value": {
4219
+ "kind": "expression",
4220
+ "type": "BentoButtonActionsList"
4221
+ }
4222
+ },
4223
+ {
4224
+ "name": "inverse",
4225
+ "description": "Sets the Button Actions to color scheme inverse",
4226
+ "value": {
4227
+ "kind": "expression",
4228
+ "type": "boolean"
4229
+ },
4230
+ "default": "false"
4231
+ },
4232
+ {
4233
+ "name": "layout",
4234
+ "description": "Defines the layout in which the button actions is presented.\nIt can be one of:",
4235
+ "value": {
4236
+ "kind": "expression",
4237
+ "type": "BentoButtonActionsLayout | `${BentoButtonActionsLayout}`"
4238
+ },
4239
+ "default": "BentoButtonActionsLayout.BUTTONS_END"
4240
+ }
4241
+ ],
4242
+ "source": {
4243
+ "module": "./src/components/button/components/button-actions/button-actions.vue",
4244
+ "symbol": "default"
4245
+ }
4246
+ },
4247
4247
  {
4248
4248
  "name": "button-actions-icons-stub",
4249
4249
  "description": "",
@@ -5127,6 +5127,15 @@
5127
5127
  "type": "string"
5128
5128
  },
5129
5129
  "default": "null"
5130
+ },
5131
+ {
5132
+ "name": "truncateColumnHeaders",
5133
+ "description": "Truncates all data grid column headers",
5134
+ "value": {
5135
+ "kind": "expression",
5136
+ "type": "boolean"
5137
+ },
5138
+ "default": "false"
5130
5139
  }
5131
5140
  ],
5132
5141
  "events": [
@@ -5267,6 +5276,15 @@
5267
5276
  },
5268
5277
  "default": "false"
5269
5278
  },
5279
+ {
5280
+ "name": "hasLeftOverflow",
5281
+ "description": "If the data grid has overflow on the left side",
5282
+ "value": {
5283
+ "kind": "expression",
5284
+ "type": "boolean"
5285
+ },
5286
+ "default": "false"
5287
+ },
5270
5288
  {
5271
5289
  "name": "isOnlyOneVisibleColumn",
5272
5290
  "description": "Used to disable hiding the last visible column.",
@@ -5320,6 +5338,15 @@
5320
5338
  "type": "BentoDatagridSortByColumn[]"
5321
5339
  },
5322
5340
  "default": "() => []"
5341
+ },
5342
+ {
5343
+ "name": "truncateColumnHeaders",
5344
+ "description": "Truncates all data grid column headers",
5345
+ "value": {
5346
+ "kind": "expression",
5347
+ "type": "boolean"
5348
+ },
5349
+ "default": "false"
5323
5350
  }
5324
5351
  ],
5325
5352
  "events": [
@@ -7548,28 +7575,27 @@
7548
7575
  }
7549
7576
  },
7550
7577
  {
7551
- "name": "external",
7578
+ "name": "disableTypography",
7552
7579
  "required": false,
7553
- "description": "Set the rendered link to a regular external anchor link.",
7580
+ "description": "Disable the default typography for the component. Only use this when the component is inside another typography component.",
7554
7581
  "value": {
7555
7582
  "kind": "expression",
7556
7583
  "type": "boolean"
7557
7584
  }
7558
7585
  },
7559
7586
  {
7560
- "name": "variant",
7587
+ "name": "external",
7561
7588
  "required": false,
7562
- "description": "Link variant type affecting visual style.",
7589
+ "description": "Set the rendered link to a regular external anchor link.",
7563
7590
  "value": {
7564
7591
  "kind": "expression",
7565
- "type": "union"
7566
- },
7567
- "default": "BentoLinkVariant.DEFAULT"
7592
+ "type": "boolean"
7593
+ }
7568
7594
  },
7569
7595
  {
7570
- "name": "disableTypography",
7596
+ "name": "isButton",
7571
7597
  "required": false,
7572
- "description": "Disable the default typography for the component. Only use this when the component is inside another typography component.",
7598
+ "description": "Set to true if used inside a `BentoButton` component.",
7573
7599
  "value": {
7574
7600
  "kind": "expression",
7575
7601
  "type": "boolean"
@@ -7584,6 +7610,16 @@
7584
7610
  "type": "string"
7585
7611
  },
7586
7612
  "default": "null"
7613
+ },
7614
+ {
7615
+ "name": "variant",
7616
+ "required": false,
7617
+ "description": "Link variant type affecting visual style.",
7618
+ "value": {
7619
+ "kind": "expression",
7620
+ "type": "union"
7621
+ },
7622
+ "default": "BentoLinkVariant.DEFAULT"
7587
7623
  }
7588
7624
  ],
7589
7625
  "events": [
@@ -7601,6 +7637,44 @@
7601
7637
  "symbol": "default"
7602
7638
  }
7603
7639
  },
7640
+ {
7641
+ "name": "listbox-multi-select-chips",
7642
+ "description": "",
7643
+ "attributes": [
7644
+ {
7645
+ "name": "isOptionDisabled",
7646
+ "description": "Function that defines the options to be disabled",
7647
+ "value": {
7648
+ "kind": "expression",
7649
+ "type": "BentoListboxIsOptionDisabled"
7650
+ },
7651
+ "default": "() => false"
7652
+ },
7653
+ {
7654
+ "name": "items",
7655
+ "required": true,
7656
+ "description": "The option elements to populate the listbox with.\nIt must be an array of {@see BentoListboxOptionItem }.",
7657
+ "value": {
7658
+ "kind": "expression",
7659
+ "type": "BentoListboxOptions"
7660
+ }
7661
+ }
7662
+ ],
7663
+ "events": [
7664
+ {
7665
+ "name": "unselect-item",
7666
+ "description": "Emits the value of the item to uncheck"
7667
+ },
7668
+ {
7669
+ "name": "unselect-category",
7670
+ "description": "Emits the option of the category being unselected"
7671
+ }
7672
+ ],
7673
+ "source": {
7674
+ "module": "./src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue",
7675
+ "symbol": "default"
7676
+ }
7677
+ },
7604
7678
  {
7605
7679
  "name": "listbox-multi-select-options",
7606
7680
  "description": "Listbox multi-select options list",
@@ -8870,7 +8944,7 @@
8870
8944
  },
8871
8945
  {
8872
8946
  "name": "radio-button",
8873
- "description": "Radio buttons are used when two or more options are mutually exclusive,\nthe user can only select a single option from a list of pre-defined options.\nThe label tag area is also clickable.\nOnly to be used internally.",
8947
+ "description": "",
8874
8948
  "attributes": [
8875
8949
  {
8876
8950
  "name": "disabled",
@@ -8883,7 +8957,7 @@
8883
8957
  },
8884
8958
  {
8885
8959
  "name": "hasError",
8886
- "description": "Shows radio-button in error state (optional)",
8960
+ "description": "Shows bento-radio-button in error state (optional)",
8887
8961
  "value": {
8888
8962
  "kind": "expression",
8889
8963
  "type": "boolean"
@@ -8895,7 +8969,7 @@
8895
8969
  "description": "This property should not be used directly.\nIt will be used by v-model directive on radio component.",
8896
8970
  "value": {
8897
8971
  "kind": "expression",
8898
- "type": "string|number"
8972
+ "type": "BentoRadioButtonValue"
8899
8973
  },
8900
8974
  "default": "null"
8901
8975
  },
@@ -8914,10 +8988,20 @@
8914
8988
  "description": "Indicates the value of the input that will be returned when it's checked",
8915
8989
  "value": {
8916
8990
  "kind": "expression",
8917
- "type": "string|number"
8991
+ "type": "BentoRadioButtonValue"
8918
8992
  }
8919
8993
  }
8920
8994
  ],
8995
+ "events": [
8996
+ {
8997
+ "name": "input",
8998
+ "description": "Emitted when the radio button is clicked. Enables Vue2 \"v-model\""
8999
+ },
9000
+ {
9001
+ "name": "update:model-value",
9002
+ "description": "Emitted when the radio button is clicked. Enables Vue3 \"v-model\""
9003
+ }
9004
+ ],
8921
9005
  "slots": [
8922
9006
  {
8923
9007
  "name": "default"
@@ -8949,7 +9033,7 @@
8949
9033
  },
8950
9034
  {
8951
9035
  "name": "disabled",
8952
- "description": "If set to true, renders all radio-buttons in the group in a disabled state.",
9036
+ "description": "If set to true, renders all bento-radio-buttons in the group in a disabled state.",
8953
9037
  "value": {
8954
9038
  "kind": "expression",
8955
9039
  "type": "boolean"
@@ -8958,7 +9042,7 @@
8958
9042
  },
8959
9043
  {
8960
9044
  "name": "errorMessage",
8961
- "description": "If string is passed, all radio-buttons in an error state and renders the string beneath the buttons.",
9045
+ "description": "If string is passed, all bento-radio-buttons in an error state and renders the string beneath the buttons.",
8962
9046
  "value": {
8963
9047
  "kind": "expression",
8964
9048
  "type": "string"
@@ -8976,7 +9060,7 @@
8976
9060
  },
8977
9061
  {
8978
9062
  "name": "hasError",
8979
- "description": "If set to true, renders all radio-buttons in the group in an error state.",
9063
+ "description": "If set to true, renders all bento-radio-buttons in the group in an error state.",
8980
9064
  "value": {
8981
9065
  "kind": "expression",
8982
9066
  "type": "boolean"
@@ -9030,7 +9114,7 @@
9030
9114
  },
9031
9115
  {
9032
9116
  "name": "readonly",
9033
- "description": "If set to true, renders all radio-buttons in the group in a readonly state.",
9117
+ "description": "If set to true, renders all bento-radio-button in the group in a readonly state.",
9034
9118
  "value": {
9035
9119
  "kind": "expression",
9036
9120
  "type": "boolean"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/bento-vue2",
3
- "version": "1.12.0",
3
+ "version": "1.13.1",
4
4
  "description": "Adyen Bento Vue2 components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -60,7 +60,7 @@
60
60
  "url": "git@github.com:Adyen/bento.git"
61
61
  },
62
62
  "dependencies": {
63
- "@adyen/bento-design-tokens": "1.12.0",
63
+ "@adyen/bento-design-tokens": "1.13.1",
64
64
  "@adyen/ui-assets-icons-16": "4.1.0",
65
65
  "@adyen/ui-assets-payment-method-icons": "6.1.0",
66
66
  "@codemirror/commands": "6.3.3",
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-modal.9d63bdaf.js","sources":["../../src/components/modal/modal.types.ts","../../src/components/modal/components/base-modal/base-modal.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalVariant {\n DEFAULT = 'BentoModalDefault',\n DIALOG = 'BentoModalDialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalColumnLayoutVariant {\n SMALLER = 'smaller',\n EQUAL = 'equal',\n BIGGER = 'bigger',\n}\n\nexport enum BentoModalRole {\n DIALOG = 'dialog',\n ALERT_DIALOG = 'alertdialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalDialogType {\n CONFIRMATION = 'confirmation',\n DESTRUCTIVE = 'destructive',\n INFO = 'info',\n ACKNOWLEDGEMENT = 'acknowledgement',\n}\n\nexport enum BentoModalEvent {\n CLOSE_MODAL = 'close-modal',\n}\n","<template>\n <div class=\"b-modal-base\">\n <dialog\n ref=\"modal\"\n :role=\"modalRole\"\n :aria-label=\"computedAriaLabel\"\n class=\"b-modal-base__container\"\n :class=\"modalConditionalClasses\"\n :open=\"initiallyOpen\"\n @animationend=\"closeModalAfterAnimation\"\n @click=\"isDismissible && closeModalOnClickOutside($event)\"\n @keydown.esc=\"internalModalActionClose\"\n >\n <bento-focus-trap v-if=\"isOpen || initiallyOpen\">\n <div class=\"b-modal-base__wrapper\">\n <div\n v-if=\"hasSlot('default') || showCloseButton\"\n class=\"b-modal-base__header-container\"\n :style=\"customPaddingStyles.header\"\n >\n <div class=\"b-modal-base__header\">\n <bento-typography\n class=\"b-modal-base__title\"\n aria-label=\"base modal title\"\n el=\"span\"\n variant=\"title\"\n stronger\n >\n <slot v-if=\"hasSlot('default')\" />\n </bento-typography>\n <bento-button\n v-if=\"showCloseButton\"\n class=\"b-modal-base__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"internalModalActionClose\"\n >\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n\n <bento-divider v-if=\"hasColumnLayout\" class=\"b-modal-base__divider\" />\n </div>\n\n <div\n class=\"b-modal-base__content\"\n :class=\"modalContentConditionalClasses\"\n :style=\"customPaddingStyles.content\"\n >\n <bento-typography\n v-if=\"hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))\"\n aria-label=\"base modal content\"\n el=\"div\"\n variant=\"body\"\n stronger\n >\n <grid-layout\n v-if=\"hasColumnLayout\"\n :column-width=\"computedColumnWidth\"\n :container-type=\"GridLayoutContainerType.NORMAL\"\n no-gap\n class=\"b-modal-base__grid\"\n >\n <template #col-1><slot name=\"content-col-1\"></slot></template>\n <template #col-2><slot name=\"content-col-2\"></slot></template>\n </grid-layout>\n <slot v-else name=\"content\" />\n </bento-typography>\n </div>\n\n <div\n v-if=\"hasSlot('actions')\"\n class=\"b-modal-base__actions-container\"\n :style=\"customPaddingStyles.actions\"\n >\n <bento-divider v-if=\"hasColumnLayout\" class=\"b-modal-base__divider\" />\n\n <div aria-label=\"modal actions\" class=\"b-modal-base__actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </bento-focus-trap>\n </dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref, useAttrs, useSlots, watch } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalRole, BentoModalSize } from '@/components/modal/modal.types';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton, BentoButtonActionsList } from '@/components/button';\n import { BentoDivider } from '@/components/divider';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import { GridLayout, GridLayoutContainerType } from '@/internal';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const modal = ref<HTMLDialogElement>(null);\n const isClosing = ref(false);\n\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed.\n */\n (e: 'close-modal');\n }>();\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, required: true },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * Defines whether the modal will be an alert modal\n */\n modalRole: { type: String, default: BentoModalRole.DIALOG },\n\n /**\n * Allows the inner elments to overflow the dialog\n */\n overflowVisible: { type: Boolean, default: false },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const showCloseButton = computed(() => props.isDismissible && !props.hideCloseButton);\n\n const customPaddingStyles = computed(() => {\n if (!props.customPadding) {\n return {};\n }\n\n const xPadding = {\n paddingLeft: props.customPadding,\n paddingRight: props.customPadding,\n };\n\n const content = { ...xPadding, paddingTop: undefined, paddingBottom: undefined };\n\n if (!hasSlot('default')) {\n content.paddingTop = props.customPadding;\n }\n\n if (!hasSlot('actions')) {\n content.paddingBottom = props.customPadding;\n }\n\n return {\n header: { ...xPadding, paddingTop: props.customPadding },\n content,\n actions: { ...xPadding, paddingBottom: props.customPadding },\n };\n });\n\n const computedAriaLabel = computed(() => (attrs['aria-label'] as string) ?? (t('ariaLabelFallback') as string));\n const hasColumnLayout = computed(() => props.withColumnLayout && props.size === BentoModalSize.LARGE);\n\n const openModal = (): void => {\n modal.value.showModal();\n };\n\n const emitCloseEvent = (): void => {\n emit('close-modal');\n };\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value) {\n modal.value.close();\n emitCloseEvent();\n isClosing.value = false;\n }\n };\n\n const startCloseModalAnimation = () => {\n if (!modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * If the user has pressed escape, clicked outside or clicked the close icon.\n * Needs to be called from outside, following the \"dialog.close()\" pattern,\n * when the closing event is triggered outside of the \"base-modal\"\n * component (e.g. from a closing action).\n */\n const internalModalActionClose = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!props.isDismissible && props.modalRole === BentoModalRole.DIALOG) {\n return;\n }\n startCloseModalAnimation();\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeModalOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === BentoModalRole.DIALOG.toUpperCase()) {\n internalModalActionClose();\n }\n };\n\n const modalConditionalClasses = computed(() => ({\n [`b-modal-base__container--${props.size}`]: props.size,\n 'b-modal-base__container--hide': isClosing.value,\n 'b-modal-base__container--overflow-visible': props.overflowVisible,\n 'b-modal-base__container--column-layout': hasColumnLayout.value,\n }));\n\n const modalContentConditionalClasses = computed(() => ({\n 'b-modal-base__content--column-layout': hasColumnLayout.value,\n 'b-modal-base__content--with-header': hasSlot('default'),\n 'b-modal-base__content--with-actions': hasSlot('actions'),\n }));\n\n const computedColumnWidth = computed(() => {\n if (props.columnsSize === BentoModalColumnLayoutVariant.SMALLER) {\n return [\n { small: 4, medium: 4, large: 4 },\n { small: 8, medium: 8, large: 8 },\n ];\n }\n if (props.columnsSize === BentoModalColumnLayoutVariant.BIGGER) {\n return [\n { small: 8, medium: 8, large: 8 },\n { small: 4, medium: 4, large: 4 },\n ];\n }\n return [\n { small: 6, medium: 6, large: 6 },\n { small: 6, medium: 6, large: 6 },\n ];\n });\n\n watch(\n () => [props.isOpen, modal.value],\n ([newIsOpen, newModalValue], [, oldModalValue]): void => {\n if (!newModalValue) {\n return;\n }\n\n const isFirstMutation = !oldModalValue;\n if (newIsOpen) {\n openModal();\n } else if (!isFirstMutation) {\n startCloseModalAnimation();\n }\n }\n );\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(startCloseModalAnimation, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n },\n { deep: true }\n );\n\n onMounted(() => {\n if (props.isOpen && modal.value) {\n openModal();\n }\n });\n\n /**\n * Expose methods through its 'ref'\n */\n defineExpose({\n internalModalActionClose,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dialog container. It creates a dialog HTML element for the modal to use.\n *\n * @example\n * import BaseModal from './components/base-modal/base-modal.vue';\n *\n * export default {\n * components: { BaseModal },\n * template: `\n * <base-modal\n * :hide-close-button=\"true\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </base-modal>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'base-modal',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-modal.scss\" />\n"],"names":["BentoModalVariant","BentoModalVariant2","BentoModalSize","BentoModalSize2","BentoModalColumnLayoutVariant","BentoModalColumnLayoutVariant2","BentoModalRole","BentoModalRole2","BentoModalDialogType","BentoModalDialogType2","BentoModalEvent","BentoModalEvent2","__default__","defineComponent","messages","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","t","useI18n","slots","useSlots","attrs","useAttrs","hasSlot","useHasSlot","modal","ref","isClosing","showCloseButton","computed","props","customPaddingStyles","xPadding","content","computedAriaLabel","hasColumnLayout","openModal","emitCloseEvent","emit","closeModalAfterAnimation","startCloseModalAnimation","internalModalActionClose","event","closeModalOnClickOutside","target","modalConditionalClasses","modalContentConditionalClasses","computedColumnWidth","watch","newIsOpen","newModalValue","oldModalValue","_b","_a","onMounted","expose"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAA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ue/minus-small.vue","../../src/components/checkbox/checkbox.vue"],"sourcesContent":["export type BentoMultiCheckboxType = Array<string | number>;\nexport type BentoCheckboxType = boolean | BentoMultiCheckboxType;\n\nexport enum BentoCheckboxState {\n UNCHECKED = 'unchecked',\n DISABLED = 'disabled',\n ERROR = 'error',\n READONLY = 'readonly',\n}\n\nexport enum BentoCheckboxEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M4.25 7.25H11.75V8.75H4.25V7.25Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <label class=\"b-checkbox\" :class=\"conditionalClass\">\n <div class=\"b-checkbox__input-container\">\n <!-- Don't change order because it matters for CSS. Icons first -->\n <minus-small-icon v-if=\"isIndeterminate\" class=\"b-checkbox__icon\" svg-title=\"intermediate\" />\n <checkmark-small-icon v-else-if=\"isChecked\" class=\"b-checkbox__icon\" svg-title=\"checked\" />\n <input\n ref=\"input\"\n role=\"checkbox\"\n class=\"b-checkbox__outline\"\n type=\"checkbox\"\n v-bind=\"$attrs\"\n :aria-label=\"computedAriaLabel\"\n :aria-checked=\"ariaChecked\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-invalid=\"ariaInvalid\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :indeterminate.prop=\"isIndeterminate\"\n :value=\"value\"\n :class=\"conditionalClassOutline\"\n :aria-readonly=\"readonly\"\n @change=\"onChange\"\n @click=\"onClick\"\n />\n </div>\n <span v-if=\"hasSlot('default') || shouldShowErrorMessage\" class=\"b-checkbox__text\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-checkbox__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n <bento-typography v-if=\"optional\" class=\"b-checkbox__text-requirement\" el=\"span\">\n ({{ t('optional') }})\n </bento-typography>\n <bento-typography v-else-if=\"required\" class=\"b-checkbox__text-requirement\" el=\"span\">\n ({{ t('required') }})\n </bento-typography>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-checkbox__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <error-message v-if=\"shouldShowErrorMessage\" :id=\"errorId\" :error-message=\"errorMessage\" />\n\n <bento-typography v-if=\"contentSlotAvailable\" class=\"b-checkbox__content\" el=\"span\" variant=\"body\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import {\n BentoCheckboxEvent,\n BentoCheckboxState,\n BentoCheckboxType,\n BentoMultiCheckboxType,\n } from './checkbox.types';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage } from '@/components/internal/error-message';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import CheckmarkSmallIcon from '@adyen/ui-assets-icons-16/vue/checkmark-small';\n import MinusSmallIcon from '@adyen/ui-assets-icons-16/vue/minus-small';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useI18n } from '@/utils/ts/i18n';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { BentoCheckboxGroupItems } from './components/checkbox-group/checkbox-group.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Checkboxes are used to make a binary choice about an option.\n * The label tag area is also clickable.\n *\n * @usage\n * import { BentoCheckbox } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckbox },\n * template: `\n * <bento-checkbox>\n * Label text\n * <template #description>Sub label text</template>\n * </bento-checkbox>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-checkbox',\n i18n: { messages },\n components: {\n BentoTypography,\n ErrorMessage,\n CheckmarkSmallIcon,\n MinusSmallIcon,\n },\n model: { prop: 'modelValue' },\n props: {\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n *\n * In the case of multiple checkboxes this value is used as a unique key.\n */\n value: { type: [String, Number], default: null },\n\n /**\n * When handling a single checkbox with a singular state, use a boolean.\n *\n * When handling multiple checkboxes, use an array of keys.\n * These keys exist as a set \"value\" prop for each checkbox.\n */\n modelValue: {\n type: [Boolean, Array] as PropType<BentoCheckboxType | BentoCheckboxGroupItems>,\n default: false,\n },\n\n /**\n * Setting this property to true will disable the checkbox in your form.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Highlights the checkbox is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the checkbox to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will show the checkbox in error state.\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Renders the checkbox in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The :indeterminate CSS pseudo-class represents any form element\n * whose state is indeterminate, such as checkboxes which have their HTML indeterminate attribute\n * set to true, radio buttons which are members of a group in which all radio buttons are unchecked,\n * and indeterminate <progress> elements. https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate\n * This property lets you control the input.indeterminate native property.\n */\n indeterminate: { type: Boolean, default: false },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Accessible name for the radio button component. It is strongly recommended to pas this value in case this component is used without a label.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Highlights the checkbox is optional.\n */\n optional: { type: Boolean, default: false },\n },\n emits: [BentoCheckboxEvent.UPDATE, BentoCheckboxEvent.INPUT],\n setup(props, { attrs, emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const descriptionId = generateUid('description');\n const errorId = generateUid('error');\n const hasSlot = useHasSlot(slots);\n\n const { disabled, indeterminate, modelValue, readonly, value } = toRefs(props);\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('bento-checkbox', slots.default, slots.description);\n\n const isCheckboxGroup = computed(() => Array.isArray(modelValue.value));\n const isChecked = computed(() => {\n if (!isCheckboxGroup.value) {\n return modelValue.value as boolean;\n }\n\n return (modelValue.value as BentoMultiCheckboxType).some(item => item === value.value);\n });\n const isIndeterminate = computed(() => indeterminate.value);\n\n const shouldShowError = computed(\n () => !props.disabled && !props.readonly && (props.hasError || !!props.errorMessage)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !props.readonly && !!props.errorMessage);\n\n // Content slot logic\n const hasContentSlot = computed(() => hasSlot('content'));\n const isCheckedOrIntermediate = computed(() => isIndeterminate?.value || isChecked?.value);\n const contentSlotAvailable = computed(\n () => hasContentSlot?.value && isCheckboxGroup?.value && isCheckedOrIntermediate?.value\n );\n\n // ARIA fields\n const ariaChecked = computed<HTMLAttributes['aria-checked']>(() =>\n isIndeterminate.value ? 'mixed' : `${!!isChecked.value}`\n );\n\n const ariaDescribedBy = computed<HTMLAttributes['aria-describedby']>(\n () =>\n `${shouldShowErrorMessage.value ? errorId : ''} ${\n defaultSlotValue && descriptionSlotValue ? descriptionId : ''\n }`.trim() || null\n );\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default')\n ? (getSlotText(slots)('default') as string)\n : t('ariaLabelFallback'),\n });\n\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => shouldShowError.value);\n\n const conditionalClass = computed(() => ({\n [`b-checkbox--${BentoCheckboxState.DISABLED}`]: disabled.value,\n [`b-checkbox--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n const conditionalClassOutline = computed(() => ({\n [`b-checkbox__outline--${BentoCheckboxState.UNCHECKED}`]: !isChecked.value && !isIndeterminate.value,\n [`b-checkbox__outline--${BentoCheckboxState.ERROR}`]: shouldShowError.value,\n [`b-checkbox__outline--${BentoCheckboxState.READONLY}`]: readonly.value,\n }));\n\n // readonly attr doesn't work with checkbox, so we need to manually ignore the click instead\n const onClick = (event: Event) => {\n if (readonly.value) {\n event.preventDefault();\n }\n };\n\n const onChange = (event: Event) => {\n if (disabled.value) {\n return;\n }\n\n const newValue: boolean = (event.target as HTMLInputElement).checked;\n\n if (isCheckboxGroup.value) {\n const newCheckedList = [...(modelValue.value as BentoMultiCheckboxType)];\n const index = newCheckedList.indexOf(value.value);\n\n if (index === -1) {\n newCheckedList.push(value.value);\n } else {\n newCheckedList.splice(index, 1);\n }\n emit(BentoCheckboxEvent.UPDATE, newCheckedList);\n emit(BentoCheckboxEvent.INPUT, newCheckedList);\n } else {\n emit(BentoCheckboxEvent.UPDATE, newValue);\n emit(BentoCheckboxEvent.INPUT, newValue);\n }\n };\n\n return {\n // Values\n descriptionId,\n errorId,\n ariaChecked,\n ariaDescribedBy,\n ariaInvalid,\n computedAriaLabel,\n conditionalClass,\n conditionalClassOutline,\n defaultSlotValue,\n descriptionSlotValue,\n isCheckboxGroup,\n isChecked,\n isIndeterminate,\n shouldShowErrorMessage,\n contentSlotAvailable,\n hasContentSlot,\n\n // Methods\n hasSlot,\n onChange,\n onClick,\n\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox.scss\" />\n"],"names":["BentoCheckboxState","BentoCheckboxState2","BentoCheckboxEvent","BentoCheckboxEvent2","uuid","_sfc_main$1","_sfc_main","defineComponent","messages","BentoTypography","ErrorMessage","CheckmarkSmallIcon","MinusSmallIcon","props","attrs","emit","slots","t","useI18n","descriptionId","generateUid","errorId","hasSlot","useHasSlot","disabled","indeterminate","modelValue","readonly","value","toRefs","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","isCheckboxGroup","computed","isChecked","item","isIndeterminate","shouldShowError","shouldShowErrorMessage","hasContentSlot","isCheckedOrIntermediate","contentSlotAvailable","ariaChecked","ariaDescribedBy","ariaLabelAttribute","ref","ariaLabel","computedAriaLabel","useAriaLabel","ariaInvalid","conditionalClass","conditionalClassOutline","event","newValue","newCheckedList","index"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACLZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;GCkFAE,KAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,MAAA,EAAA,UAAAC,GAAA;AAAA,EACA,YAAA;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EACA,OAAA,EAAA,MAAA,aAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,OAAA,EAAA,MAAA,CAAA,QAAA,MAAA,GAAA,SAAA,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MAQA,MAAA,CAAA,SAAA,KAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;A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AAAuC,EAAA;AAAA,MACA,CAAA,wBAAAvC,EAAA,UAAA,GAAA2B,EAAA;AAAA,IACA,EAAA;AAkCA,WAAA;AAAA;AAAA,MAAA,eAAAR;AAAA,MAEA,SAAAE;AAAA,MACA,aAAAuB;AAAA,MACA,iBAAAC;AAAA,MACA,aAAAM;AAAA,MACA,mBAAAF;AAAA,MACA,kBAAAG;AAAA,MACA,yBAAAC;AAAA,MACA,kBAAAvB;AAAA,MACA,sBAAAE;AAAA,MACA,iBAAAE;AAAA,MACA,WAAAE;AAAA,MACA,iBAAAE;AAAA,MACA,wBAAAE;AAAA,MACA,sBAAAG;AAAA,MACA,gBAAAF;AAAA;AAAA,MACA,SAAAnB;AAAA,MAGA,UA5CA,CAAAgC,MAAA;AACA,YAAA9B,EAAA;AACA;AAGA,cAAA+B,IAAAD,EAAA,OAAA;AAEA,YAAApB,EAAA,OAAA;AACA,gBAAAsB,IAAA,CAAA,GAAA9B,EAAA,KAAA,GACA+B,IAAAD,EAAA,QAAA5B,EAAA,KAAA;AAEA,UAAA6B,MAAA,KACAD,EAAA,KAAA5B,EAAA,KAAA,IAEA4B,EAAA,OAAAC,GAAA,CAAA,GAEA1C,EAAAb,EAAA,QAAAsD,CAAA,GACAzC,EAAAb,EAAA,OAAAsD,CAAA;AAAA;AAEA,UAAAzC,EAAAb,EAAA,QAAAqD,CAAA,GACAxC,EAAAb,EAAA,OAAAqD,CAAA;AAAA,MACA;AAAA,MAwBA,SAnDA,CAAAD,MAAA;AACA,QAAA3B,EAAA,SACA2B,EAAA,eAAA;AAAA,MACA;AAAA,MAiDA,GAAArC;AAAA,IAEA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy.68a7d416.js","sources":["../../src/components/internal/copy/copy.types.ts","../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../src/components/internal/copy/copy.vue"],"sourcesContent":["import type { BentoButton } from '../../button';\n\nexport enum CopyTooltipState {\n DEFAULT = 'default',\n COPYING = 'copying',\n ERROR = 'error',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\nexport type BentoCopyButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25H7.5C6.25736 5.25 5.25 6.25736 5.25 7.5V9.25H3.5C3.08579 9.25 2.75 8.91421 2.75 8.5V3.5C2.75 3.08579 3.08579 2.75 3.5 2.75H8.5C8.91421 2.75 9.25 3.08579 9.25 3.5V5.25ZM6.75 12.5V7.5C6.75 7.08579 7.08579 6.75 7.5 6.75H12.5C12.9142 6.75 13.25 7.08579 13.25 7.5V12.5C13.25 12.9142 12.9142 13.25 12.5 13.25H7.5C7.08579 13.25 6.75 12.9142 6.75 12.5Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-copy\" @mouseleave=\"resetText\" @focusout=\"resetText\">\n <span v-if=\"$slots.default\" v-bento-tooltip-directive:[tooltipPosition]=\"copyText\" @click=\"onClickCopy\">\n <slot />\n </span>\n <bento-button\n v-else\n v-bento-tooltip-directive:[tooltipPosition]=\"copyText\"\n v-bind=\"button\"\n @click=\"onClickCopy\"\n >\n <template #iconLeft>\n <copy-icon :svg-title=\"svgTitle\" />\n </template>\n <template v-if=\"buttonText\" #default>\n {{ buttonText }}\n </template>\n </bento-button>\n <div v-if=\"showScreenReaderAlert\" role=\"alert\" class=\"b-copy__screen-reader-alert\">{{ $t('copied') }}</div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoCopyButtonProps, CopyTooltipState } from './copy.types';\n import CopyIcon from '@adyen/ui-assets-icons-16/vue/copy';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An internal button component that copies text to the user's clipboard.\n *\n * @example\n * import { Copy } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { Copy },\n * template: `\n * <copy :text=\"textToCopy\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'copy',\n components: { BentoButton, CopyIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button: {\n type: Object as PropType<BentoCopyButtonProps>,\n default: () =>\n ({\n variant: 'tertiary',\n } as BentoCopyButtonProps),\n },\n\n /**\n * Sets the button text of the copy button.\n */\n buttonText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Defines the string that will get copied to the clipboard\n */\n text: {\n type: String,\n required: true,\n },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'top'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition>,\n default: PopperContainerPosition.TOP,\n },\n },\n setup(props) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const copyState = ref<CopyTooltipState>(CopyTooltipState.DEFAULT);\n\n const showScreenReaderAlert = ref(false);\n const onClickCopy = async () => {\n try {\n await navigator.clipboard.writeText(props.text);\n copyState.value = CopyTooltipState.COPYING;\n showScreenReaderAlert.value = true;\n } catch (e) {\n copyState.value = CopyTooltipState.ERROR;\n }\n };\n\n const resetText = () => {\n copyState.value = CopyTooltipState.DEFAULT;\n showScreenReaderAlert.value = false;\n };\n\n const copyText = computed(() => {\n switch (copyState.value) {\n case CopyTooltipState.COPYING:\n return t('copied');\n case CopyTooltipState.ERROR:\n return t('copyFailed');\n case CopyTooltipState.DEFAULT:\n default:\n return t('copy');\n }\n });\n\n const svgTitle = computed(() => (props?.buttonText ? undefined : t('copy')));\n\n return {\n copyText,\n onClickCopy,\n resetText,\n showScreenReaderAlert,\n svgTitle,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./copy.scss\" />\n"],"names":["CopyTooltipState","CopyTooltipState2","uuid","_sfc_main$1","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","copyText","computed","svgTitle"],"mappings":";;;;;;;AAEY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACGZ,IAAAE,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;GCmCAE,IAAAC,EAAA;AAAA,EAAA,MAAA,EAAA,UAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,aAAAC,GAAA,UAAAC,EAAA;AAAA,EACA,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,QAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA,OAAA;AAAA,QAEA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;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