@adyen/bento-vue3 1.14.0 → 1.15.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 (203) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.types.d.ts +1 -0
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +19 -2
  4. package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +1 -7
  6. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +1 -7
  7. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -7
  8. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -7
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +1 -7
  10. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +1 -7
  11. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +2 -2
  12. package/dist/@types/packages/vue2/src/components/header/components/info-icon-with-popover/index.d.ts +1 -0
  13. package/dist/@types/packages/vue2/src/components/header/components/info-icon-with-popover/info-icon-with-popover.vue.d.ts +32 -0
  14. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +34 -23
  15. package/dist/@types/packages/vue2/src/components/input-field/input-field.keys.d.ts +1 -0
  16. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +0 -9
  17. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +0 -9
  18. package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +0 -9
  19. package/dist/@types/packages/vue2/src/components/modal/modal.types.d.ts +4 -0
  20. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +7 -16
  21. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +1 -7
  22. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  23. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +3 -1
  24. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +39 -26
  25. package/dist/@types/packages/vue2/src/utils/ts/i18n.d.ts +7 -33
  26. package/dist/accordion.js +2 -2
  27. package/dist/action-bar.js +154 -121
  28. package/dist/action-bar.js.map +1 -1
  29. package/dist/alert.js +4 -4
  30. package/dist/assets/base-modal.css +1 -1
  31. package/dist/assets/dropdown.css +1 -1
  32. package/dist/assets/index.css +1 -1
  33. package/dist/assets/index10.css +1 -1
  34. package/dist/assets/index11.css +1 -1
  35. package/dist/assets/index12.css +1 -1
  36. package/dist/assets/index13.css +1 -1
  37. package/dist/assets/index14.css +1 -1
  38. package/dist/assets/index16.css +1 -1
  39. package/dist/assets/index17.css +1 -1
  40. package/dist/assets/index18.css +1 -1
  41. package/dist/assets/index19.css +1 -1
  42. package/dist/assets/index2.css +1 -1
  43. package/dist/assets/index20.css +1 -1
  44. package/dist/assets/index21.css +1 -1
  45. package/dist/assets/index22.css +1 -1
  46. package/dist/assets/index23.css +1 -1
  47. package/dist/assets/index24.css +1 -1
  48. package/dist/assets/index25.css +1 -1
  49. package/dist/assets/index26.css +1 -1
  50. package/dist/assets/index27.css +1 -1
  51. package/dist/assets/index28.css +1 -1
  52. package/dist/assets/index29.css +1 -1
  53. package/dist/assets/index3.css +1 -1
  54. package/dist/assets/index30.css +1 -1
  55. package/dist/assets/index31.css +1 -1
  56. package/dist/assets/index32.css +1 -1
  57. package/dist/assets/index33.css +1 -1
  58. package/dist/assets/index34.css +1 -1
  59. package/dist/assets/index35.css +1 -1
  60. package/dist/assets/index36.css +1 -1
  61. package/dist/assets/index37.css +1 -1
  62. package/dist/assets/index38.css +1 -1
  63. package/dist/assets/index39.css +1 -1
  64. package/dist/assets/index4.css +1 -1
  65. package/dist/assets/index40.css +1 -1
  66. package/dist/assets/index41.css +1 -1
  67. package/dist/assets/index42.css +1 -1
  68. package/dist/assets/index43.css +1 -1
  69. package/dist/assets/index44.css +1 -1
  70. package/dist/assets/index45.css +1 -1
  71. package/dist/assets/index46.css +1 -1
  72. package/dist/assets/index47.css +1 -1
  73. package/dist/assets/index5.css +1 -1
  74. package/dist/assets/index6.css +1 -1
  75. package/dist/assets/index7.css +1 -1
  76. package/dist/assets/index8.css +1 -1
  77. package/dist/assets/index9.css +1 -1
  78. package/dist/avatar-image.js +1 -1
  79. package/dist/badge.js +1 -1
  80. package/dist/button.js +5 -5
  81. package/dist/card.js +3 -3
  82. package/dist/checkbox.js +6 -6
  83. package/dist/chunks/{base-button.ac438bab.js → base-button.f3056e4d.js} +2 -2
  84. package/dist/chunks/{base-button.ac438bab.js.map → base-button.f3056e4d.js.map} +1 -1
  85. package/dist/chunks/{base-modal.4e2fbaca.js → base-modal.b6123c24.js} +84 -88
  86. package/dist/chunks/base-modal.b6123c24.js.map +1 -0
  87. package/dist/chunks/{button-actions-with-menu.5b323fdc.js → button-actions-with-menu.e97544cd.js} +3 -3
  88. package/dist/chunks/{button-actions-with-menu.5b323fdc.js.map → button-actions-with-menu.e97544cd.js.map} +1 -1
  89. package/dist/chunks/{button.3cd15884.js → button.0717d615.js} +3 -3
  90. package/dist/chunks/{button.3cd15884.js.map → button.0717d615.js.map} +1 -1
  91. package/dist/chunks/{calendar.dd2810ab.js → calendar.ba74ca93.js} +5 -5
  92. package/dist/chunks/{calendar.dd2810ab.js.map → calendar.ba74ca93.js.map} +1 -1
  93. package/dist/chunks/{checkbox.c3991e35.js → checkbox.1a24b8a2.js} +4 -4
  94. package/dist/chunks/{checkbox.c3991e35.js.map → checkbox.1a24b8a2.js.map} +1 -1
  95. package/dist/chunks/{controls-group.8eb3ea41.js → controls-group.dc4dcb9a.js} +3 -3
  96. package/dist/chunks/{controls-group.8eb3ea41.js.map → controls-group.dc4dcb9a.js.map} +1 -1
  97. package/dist/chunks/{copy.22b5bd6d.js → copy.e206c0c8.js} +11 -11
  98. package/dist/chunks/{copy.22b5bd6d.js.map → copy.e206c0c8.js.map} +1 -1
  99. package/dist/chunks/{dropdown-default-textbox.ff3381f9.js → dropdown-default-textbox.e377f440.js} +2 -2
  100. package/dist/chunks/{dropdown-default-textbox.ff3381f9.js.map → dropdown-default-textbox.e377f440.js.map} +1 -1
  101. package/dist/chunks/{dropdown.49bb7d48.js → dropdown.4a879fe7.js} +242 -242
  102. package/dist/chunks/dropdown.4a879fe7.js.map +1 -0
  103. package/dist/chunks/{field-label.a290f971.js → field-label.74e665ce.js} +3 -3
  104. package/dist/chunks/{field-label.a290f971.js.map → field-label.74e665ce.js.map} +1 -1
  105. package/dist/chunks/{fixed-scroller.b9c23b0f.js → fixed-scroller.a94c55d3.js} +3 -3
  106. package/dist/chunks/{fixed-scroller.b9c23b0f.js.map → fixed-scroller.a94c55d3.js.map} +1 -1
  107. package/dist/chunks/{footer-actions.e956f9f9.js → footer-actions.284cdd8f.js} +3 -3
  108. package/dist/chunks/{footer-actions.e956f9f9.js.map → footer-actions.284cdd8f.js.map} +1 -1
  109. package/dist/chunks/{i18n.6c402773.js → i18n.f7e6533e.js} +2 -1
  110. package/dist/chunks/{i18n.6c402773.js.map → i18n.f7e6533e.js.map} +1 -1
  111. package/dist/chunks/{index.9d87a92b.js → index.00c93811.js} +3 -3
  112. package/dist/chunks/{index.9d87a92b.js.map → index.00c93811.js.map} +1 -1
  113. package/dist/chunks/{index.740c8202.js → index.1b100eb9.js} +5 -5
  114. package/dist/chunks/{index.740c8202.js.map → index.1b100eb9.js.map} +1 -1
  115. package/dist/chunks/{index.1e5ee8f7.js → index.332c1c17.js} +2 -2
  116. package/dist/chunks/{index.1e5ee8f7.js.map → index.332c1c17.js.map} +1 -1
  117. package/dist/chunks/{index.4fe3f6f6.js → index.446c1a27.js} +3 -3
  118. package/dist/chunks/{index.4fe3f6f6.js.map → index.446c1a27.js.map} +1 -1
  119. package/dist/chunks/{index.60914215.js → index.49d44eb6.js} +10 -10
  120. package/dist/chunks/{index.60914215.js.map → index.49d44eb6.js.map} +1 -1
  121. package/dist/chunks/index.4bcac6ef.js +2270 -0
  122. package/dist/chunks/index.4bcac6ef.js.map +1 -0
  123. package/dist/chunks/{index.d04c2a47.js → index.67ad1ad7.js} +4 -4
  124. package/dist/chunks/index.67ad1ad7.js.map +1 -0
  125. package/dist/chunks/{index.50be665a.js → index.7f9f9088.js} +9 -9
  126. package/dist/chunks/{index.50be665a.js.map → index.7f9f9088.js.map} +1 -1
  127. package/dist/chunks/{index.3c0c8d62.js → index.855484e4.js} +2 -2
  128. package/dist/chunks/{index.3c0c8d62.js.map → index.855484e4.js.map} +1 -1
  129. package/dist/chunks/{index.c2888e08.js → index.8e4a98c9.js} +7 -7
  130. package/dist/chunks/{index.c2888e08.js.map → index.8e4a98c9.js.map} +1 -1
  131. package/dist/chunks/{index.c8040001.js → index.b3ded042.js} +2 -2
  132. package/dist/chunks/{index.c8040001.js.map → index.b3ded042.js.map} +1 -1
  133. package/dist/chunks/{index.5b061519.js → index.b58411f4.js} +3 -3
  134. package/dist/chunks/{index.5b061519.js.map → index.b58411f4.js.map} +1 -1
  135. package/dist/chunks/info.550f9511.js +44 -0
  136. package/dist/chunks/info.550f9511.js.map +1 -0
  137. package/dist/chunks/{listbox-option-tag.10d47bf8.js → listbox-option-tag.a6ed36d6.js} +3 -3
  138. package/dist/chunks/{listbox-option-tag.10d47bf8.js.map → listbox-option-tag.a6ed36d6.js.map} +1 -1
  139. package/dist/chunks/{listbox.0b1de1d5.js → listbox.5b8d5885.js} +6 -6
  140. package/dist/chunks/{listbox.0b1de1d5.js.map → listbox.5b8d5885.js.map} +1 -1
  141. package/dist/chunks/{loading-button.7be8c4fd.js → loading-button.41d1af82.js} +2 -2
  142. package/dist/chunks/{loading-button.7be8c4fd.js.map → loading-button.41d1af82.js.map} +1 -1
  143. package/dist/chunks/{tooltip.fdc251e3.js → tooltip.4fdf4ec4.js} +6 -6
  144. package/dist/chunks/{tooltip.fdc251e3.js.map → tooltip.4fdf4ec4.js.map} +1 -1
  145. package/dist/chunks/{use-country-items.d2a1f224.js → use-country-items.32e30471.js} +2 -2
  146. package/dist/chunks/{use-country-items.d2a1f224.js.map → use-country-items.32e30471.js.map} +1 -1
  147. package/dist/code-snippet.js +8 -8
  148. package/dist/code-snippet.js.map +1 -1
  149. package/dist/country.js +3 -3
  150. package/dist/currency.js +1 -1
  151. package/dist/data-grid.js +7 -2265
  152. package/dist/data-grid.js.map +1 -1
  153. package/dist/date-picker.js +9 -9
  154. package/dist/date-range-picker.js +2 -2
  155. package/dist/date.js +1 -1
  156. package/dist/divider.js +1 -1
  157. package/dist/dropdown.js +7 -7
  158. package/dist/empty-state.js +3 -3
  159. package/dist/filter-bar.js +18 -18
  160. package/dist/focus-trap.js +1 -1
  161. package/dist/form-layout.js +2 -2
  162. package/dist/header.js +230 -131
  163. package/dist/header.js.map +1 -1
  164. package/dist/index.js +371 -282
  165. package/dist/index.js.map +1 -1
  166. package/dist/info-icon.js +22 -57
  167. package/dist/info-icon.js.map +1 -1
  168. package/dist/input-field.js +93 -93
  169. package/dist/input-field.js.map +1 -1
  170. package/dist/internal.js +7 -7
  171. package/dist/link.js +1 -1
  172. package/dist/loading-indicator.js +1 -1
  173. package/dist/menu.js +1 -1
  174. package/dist/modal.js +137 -146
  175. package/dist/modal.js.map +1 -1
  176. package/dist/pagination.js +5 -5
  177. package/dist/payment-method.js +1 -1
  178. package/dist/popover.js +1 -1
  179. package/dist/popper-container.js +1 -1
  180. package/dist/radio-group.js +94 -93
  181. package/dist/radio-group.js.map +1 -1
  182. package/dist/search-bar.js +3 -3
  183. package/dist/secondary-nav.js +2 -2
  184. package/dist/segmented-control.js +4 -4
  185. package/dist/sidepanel.js +8 -8
  186. package/dist/sidepanel.js.map +1 -1
  187. package/dist/status.js +2 -2
  188. package/dist/stepper.js +4 -4
  189. package/dist/structured-list.js +1 -1
  190. package/dist/summary-grid.js +3 -3
  191. package/dist/tabs.js +3 -3
  192. package/dist/tag.js +7 -7
  193. package/dist/textarea.js +5 -5
  194. package/dist/timeline.js +7 -7
  195. package/dist/toast.js +3 -3
  196. package/dist/toggle.js +2 -2
  197. package/dist/tutorial.js +6 -6
  198. package/dist/typography.js +1 -1
  199. package/dist/web-types.json +10 -1
  200. package/package.json +2 -2
  201. package/dist/chunks/base-modal.4e2fbaca.js.map +0 -1
  202. package/dist/chunks/dropdown.49bb7d48.js.map +0 -1
  203. package/dist/chunks/index.d04c2a47.js.map +0 -1
@@ -5,31 +5,37 @@ declare const _default: __VLS_WithTemplateSlots<import("../../../../vue3/node_mo
5
5
  type: PropType<Partial<{
6
6
  variant: "component" | "page" | import("../../components/header/header.types").BentoHeaderVariant;
7
7
  actions: import("../..").BentoButtonActionsList;
8
- infoIconTooltipText: string;
8
+ infoIconTooltipText: any;
9
9
  lastUpdated: number | Date;
10
+ infoIconPopoverPosition: any;
10
11
  }> & Omit<Readonly<import("../../../../vue3/node_modules/vue").ExtractPropTypes<{
11
- variant: {
12
- type: PropType<"component" | "page" | import("../../components/header/header.types").BentoHeaderVariant>;
13
- default: import("../../components/header/header.types").BentoHeaderVariant;
14
- validator: (value: import("../../components/header/header.types").BentoHeaderVariant) => boolean;
15
- };
16
- title: {
17
- type: StringConstructor;
18
- required: true;
12
+ actions: {
13
+ type: PropType<import("../..").BentoButtonActionsList>;
14
+ default: any;
19
15
  };
20
16
  infoIconTooltipText: {
21
- type: StringConstructor;
17
+ type: any;
22
18
  default: any;
23
19
  };
24
- actions: {
25
- type: PropType<import("../..").BentoButtonActionsList>;
20
+ infoIconPopoverPosition: {
21
+ type: any;
26
22
  default: any;
23
+ validator: any;
27
24
  };
28
25
  lastUpdated: {
29
26
  type: (DateConstructor | NumberConstructor)[];
30
27
  default: any;
31
28
  };
32
- }>> & import("../../../../vue3/node_modules/vue").VNodeProps & import("../../../../vue3/node_modules/vue").AllowedComponentProps & import("../../../../vue3/node_modules/vue").ComponentCustomProps, "variant" | "actions" | "infoIconTooltipText" | "lastUpdated">>;
29
+ variant: {
30
+ type: PropType<"component" | "page" | import("../../components/header/header.types").BentoHeaderVariant>;
31
+ default: import("../../components/header/header.types").BentoHeaderVariant;
32
+ validator: (value: import("../../components/header/header.types").BentoHeaderVariant) => boolean;
33
+ };
34
+ title: {
35
+ type: StringConstructor;
36
+ required: true;
37
+ };
38
+ }>> & import("../../../../vue3/node_modules/vue").VNodeProps & import("../../../../vue3/node_modules/vue").AllowedComponentProps & import("../../../../vue3/node_modules/vue").ComponentCustomProps, "variant" | "actions" | "infoIconTooltipText" | "lastUpdated" | "infoIconPopoverPosition">>;
33
39
  required: true;
34
40
  };
35
41
  tabs: {
@@ -45,31 +51,37 @@ declare const _default: __VLS_WithTemplateSlots<import("../../../../vue3/node_mo
45
51
  type: PropType<Partial<{
46
52
  variant: "component" | "page" | import("../../components/header/header.types").BentoHeaderVariant;
47
53
  actions: import("../..").BentoButtonActionsList;
48
- infoIconTooltipText: string;
54
+ infoIconTooltipText: any;
49
55
  lastUpdated: number | Date;
56
+ infoIconPopoverPosition: any;
50
57
  }> & Omit<Readonly<import("../../../../vue3/node_modules/vue").ExtractPropTypes<{
51
- variant: {
52
- type: PropType<"component" | "page" | import("../../components/header/header.types").BentoHeaderVariant>;
53
- default: import("../../components/header/header.types").BentoHeaderVariant;
54
- validator: (value: import("../../components/header/header.types").BentoHeaderVariant) => boolean;
55
- };
56
- title: {
57
- type: StringConstructor;
58
- required: true;
58
+ actions: {
59
+ type: PropType<import("../..").BentoButtonActionsList>;
60
+ default: any;
59
61
  };
60
62
  infoIconTooltipText: {
61
- type: StringConstructor;
63
+ type: any;
62
64
  default: any;
63
65
  };
64
- actions: {
65
- type: PropType<import("../..").BentoButtonActionsList>;
66
+ infoIconPopoverPosition: {
67
+ type: any;
66
68
  default: any;
69
+ validator: any;
67
70
  };
68
71
  lastUpdated: {
69
72
  type: (DateConstructor | NumberConstructor)[];
70
73
  default: any;
71
74
  };
72
- }>> & import("../../../../vue3/node_modules/vue").VNodeProps & import("../../../../vue3/node_modules/vue").AllowedComponentProps & import("../../../../vue3/node_modules/vue").ComponentCustomProps, "variant" | "actions" | "infoIconTooltipText" | "lastUpdated">>;
75
+ variant: {
76
+ type: PropType<"component" | "page" | import("../../components/header/header.types").BentoHeaderVariant>;
77
+ default: import("../../components/header/header.types").BentoHeaderVariant;
78
+ validator: (value: import("../../components/header/header.types").BentoHeaderVariant) => boolean;
79
+ };
80
+ title: {
81
+ type: StringConstructor;
82
+ required: true;
83
+ };
84
+ }>> & import("../../../../vue3/node_modules/vue").VNodeProps & import("../../../../vue3/node_modules/vue").AllowedComponentProps & import("../../../../vue3/node_modules/vue").ComponentCustomProps, "variant" | "actions" | "infoIconTooltipText" | "lastUpdated" | "infoIconPopoverPosition">>;
73
85
  required: true;
74
86
  };
75
87
  tabs: {
@@ -84,6 +96,7 @@ declare const _default: __VLS_WithTemplateSlots<import("../../../../vue3/node_mo
84
96
  tabs: BentoDataGridTemplateTabs;
85
97
  stickyTabs: boolean;
86
98
  }>, Record<string, (_: {}) => any> & {
99
+ infoIconTooltipContent: (_: {}) => any;
87
100
  additionalContent: (_: {}) => any;
88
101
  default: (_: {}) => any;
89
102
  }>;
@@ -12,12 +12,12 @@ export declare function createI18n(options?: {
12
12
  }): VueI18n;
13
13
  export interface Composer<MessageKey> {
14
14
  locale: WritableComputedRef<string>;
15
- t(key: MessageKey, values?: VueI18n.Values): string;
16
- tc(key: MessageKey, choice?: VueI18n.Choice, values?: VueI18n.Values): string;
17
- tc(key: MessageKey, choice: VueI18n.Choice, locale: VueI18n.Locale, values?: VueI18n.Values): string;
18
- te(key: MessageKey, locale?: VueI18n.Locale): boolean;
19
- d: typeof VueI18n.prototype.d;
20
- n: typeof VueI18n.prototype.n;
15
+ t?(key: MessageKey, values?: VueI18n.Values): string;
16
+ tc?(key: MessageKey, choice?: VueI18n.Choice, values?: VueI18n.Values): string;
17
+ tc?(key: MessageKey, choice: VueI18n.Choice, locale: VueI18n.Locale, values?: VueI18n.Values): string;
18
+ te?(key: MessageKey, locale?: VueI18n.Locale): boolean;
19
+ d?: typeof VueI18n.prototype.d;
20
+ n?: typeof VueI18n.prototype.n;
21
21
  }
22
22
  export type MessageKeys = {
23
23
  [key: string]: string;
@@ -34,33 +34,7 @@ export declare const useI18n: <T extends {
34
34
  message: MessageKeys;
35
35
  }>(params?: {
36
36
  messages?: i18nMessages;
37
- } | undefined, onlyLocale?: boolean) => Composer<keyof T["message"]> | {
38
- locale: WritableComputedRef<Locales>;
39
- t: import("vue-i18n-bridge").ComposerTranslation<i18nMessages, string, import("@intlify/core-base").RemoveIndexSignature<{
40
- [x: string]: import("vue-i18n-bridge").LocaleMessageValue<import("vue-i18n-bridge").VueMessageType>;
41
- }>, never, import("@intlify/core-base")._ResourcePath<{
42
- [key: string]: string;
43
- }>, import("@intlify/core-base")._ResourcePath<{
44
- [key: string]: string;
45
- }>>;
46
- d: import("vue-i18n-bridge").ComposerDateTimeFormatting<{}, string, import("@intlify/core-base").RemoveIndexSignature<{
47
- [x: string]: import("@intlify/core-base").DateTimeFormatOptions;
48
- }>, never, never, never>;
49
- te: <Str extends string, Key extends import("@intlify/core-base")._ResourcePath<{
50
- [key: string]: string;
51
- }> = import("@intlify/core-base")._ResourcePath<{
52
- [key: string]: string;
53
- }>>(key: Str | Key, locale?: string) => boolean;
54
- n: import("vue-i18n-bridge").ComposerNumberFormatting<{}, string, import("@intlify/core-base").RemoveIndexSignature<{
55
- [x: string]: import("@intlify/core-base").NumberFormatOptions;
56
- }>, never, never, never>;
57
- } | {
58
- locale: WritableComputedRef<string>;
59
- t?: undefined;
60
- d?: undefined;
61
- te?: undefined;
62
- n?: undefined;
63
- };
37
+ } | undefined, onlyLocale?: boolean) => Composer<keyof T["message"]>;
64
38
  export declare const getI18nComponent: () => "i18n-t" | "i18n";
65
39
  export declare const getI18nProps: (path: string) => {
66
40
  path: string;
package/dist/accordion.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as C, provide as k, toRef as B, openBlock as a, createElementBlock as r, renderSlot as E, ref as b, inject as O, computed as $, watch as s, createVNode as y, unref as e, withCtx as g, createElementVNode as h, createBlock as I, createTextVNode as z, toDisplayString as A, Transition as D, normalizeStyle as H, createCommentVNode as V } from "vue";
2
2
  import { _ as N } from "./chunks/_plugin-vue_export-helper.dad06003.js";
3
- import { B as w } from "./chunks/index.c8040001.js";
3
+ import { B as w } from "./chunks/index.b3ded042.js";
4
4
  import { a as R, C as j } from "./chunks/chevron-up.46afb34c.js";
5
5
  import { g as x } from "./chunks/unique-id.a2a2b458.js";
6
6
  import { o as M } from "./chunks/resize.a041304d.js";
7
7
  import { u as U } from "./chunks/use-expandable-content-height.62fc84e5.js";
8
- import "./assets/index23.css";
8
+ import "./assets/index34.css";
9
9
  const S = Symbol("accordion title size injection key"), q = { class: "b-accordion" }, J = {}, K = /* @__PURE__ */ C({
10
10
  ...J,
11
11
  __name: "accordion",
@@ -1,111 +1,119 @@
1
- import { onMounted as L, nextTick as g, getCurrentScope as F, onScopeDispose as R, unref as p, getCurrentInstance as M, ref as _, watch as A, watchEffect as j, computed as S, defineComponent as D, toRefs as G, provide as z, openBlock as H, createBlock as U, Transition as Y, withCtx as I, createElementVNode as B, normalizeClass as q, createVNode as E, createTextVNode as K, toDisplayString as T } from "vue";
2
- import { a as Q } from "./chunks/button.3cd15884.js";
3
- import { B as $ } from "./chunks/index.c8040001.js";
4
- import { B as J } from "./chunks/button-actions-with-menu.5b323fdc.js";
5
- import { C as Z } from "./chunks/cross.26509efc.js";
6
- import { u as X } from "./chunks/i18n.6c402773.js";
7
- import { P as ee } from "./chunks/index.740c8202.js";
8
- import { _ as te } from "./chunks/_plugin-vue_export-helper.dad06003.js";
9
- import "./assets/index26.css";
10
- function W(e) {
11
- return F() ? (R(e), !0) : !1;
1
+ import { onMounted as k, nextTick as A, getCurrentScope as z, onScopeDispose as H, unref as o, getCurrentInstance as x, ref as _, watch as B, watchEffect as U, computed as y, defineComponent as Y, toRefs as K, provide as Q, openBlock as S, createBlock as I, Transition as $, withCtx as w, createElementVNode as V, normalizeClass as q, createElementBlock as J, createVNode as N, createCommentVNode as Z, createTextVNode as X, toDisplayString as W } from "vue";
2
+ import { a as ee } from "./chunks/button.0717d615.js";
3
+ import { B as te } from "./chunks/index.b3ded042.js";
4
+ import { B as ne } from "./chunks/button-actions-with-menu.e97544cd.js";
5
+ import { C as ae } from "./chunks/cross.26509efc.js";
6
+ import { u as oe } from "./chunks/i18n.f7e6533e.js";
7
+ import { P as ie } from "./chunks/index.1b100eb9.js";
8
+ import { BentoButtonActions as se } from "./button.js";
9
+ import { _ as ce } from "./chunks/_plugin-vue_export-helper.dad06003.js";
10
+ import "./assets/index33.css";
11
+ function P(e) {
12
+ return z() ? (H(e), !0) : !1;
12
13
  }
13
- function w(e) {
14
- return typeof e == "function" ? e() : p(e);
14
+ function O(e) {
15
+ return typeof e == "function" ? e() : o(e);
15
16
  }
16
- const ne = typeof window < "u" && typeof document < "u";
17
+ const re = typeof window < "u" && typeof document < "u";
17
18
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
18
- const oe = Object.prototype.toString, ie = (e) => oe.call(e) === "[object Object]", ae = () => {
19
+ const le = Object.prototype.toString, ue = (e) => le.call(e) === "[object Object]", de = () => {
19
20
  };
20
- function se(e) {
21
- return e || M();
21
+ function fe(e) {
22
+ return e || x();
22
23
  }
23
- function re(e, n = !0, t) {
24
- se() ? L(e, t) : n ? e() : g(e);
24
+ function pe(e, n = !0, t) {
25
+ fe() ? k(e, t) : n ? e() : A(e);
25
26
  }
26
- function ce(e) {
27
+ function ve(e) {
27
28
  var n;
28
- const t = w(e);
29
+ const t = O(e);
29
30
  return (n = t == null ? void 0 : t.$el) != null ? n : t;
30
31
  }
31
- const N = ne ? window : void 0;
32
- function le(...e) {
33
- let n, t, s, o;
34
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, s, o] = e, n = N) : [n, t, s, o] = e, !n)
35
- return ae;
36
- Array.isArray(t) || (t = [t]), Array.isArray(s) || (s = [s]);
37
- const c = [], i = () => {
38
- c.forEach((d) => d()), c.length = 0;
39
- }, r = (d, m, f, a) => (d.addEventListener(m, f, a), () => d.removeEventListener(m, f, a)), u = A(
40
- () => [ce(n), w(o)],
41
- ([d, m]) => {
42
- if (i(), !d)
32
+ const T = re ? window : void 0;
33
+ function me(...e) {
34
+ let n, t, c, a;
35
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, c, a] = e, n = T) : [n, t, c, a] = e, !n)
36
+ return de;
37
+ Array.isArray(t) || (t = [t]), Array.isArray(c) || (c = [c]);
38
+ const l = [], i = () => {
39
+ l.forEach((r) => r()), l.length = 0;
40
+ }, s = (r, v, b, f) => (r.addEventListener(v, b, f), () => r.removeEventListener(v, b, f)), d = B(
41
+ () => [ve(n), O(a)],
42
+ ([r, v]) => {
43
+ if (i(), !r)
43
44
  return;
44
- const f = ie(m) ? { ...m } : m;
45
- c.push(
46
- ...t.flatMap((a) => s.map((h) => r(d, a, h, f)))
45
+ const b = ue(v) ? { ...v } : v;
46
+ l.push(
47
+ ...t.flatMap((f) => c.map((u) => s(r, f, u, b)))
47
48
  );
48
49
  },
49
50
  { immediate: !0, flush: "post" }
50
- ), l = () => {
51
- u(), i();
51
+ ), p = () => {
52
+ d(), i();
52
53
  };
53
- return W(l), l;
54
+ return P(p), p;
54
55
  }
55
- function ue() {
56
+ function _e() {
56
57
  const e = _(!1);
57
- return M() && L(() => {
58
+ return x() && k(() => {
58
59
  e.value = !0;
59
60
  }), e;
60
61
  }
61
- function de(e) {
62
- const n = ue();
63
- return S(() => (n.value, !!e()));
62
+ function be(e) {
63
+ const n = _e();
64
+ return y(() => (n.value, !!e()));
64
65
  }
65
- function fe(e, n = {}) {
66
- const { window: t = N } = n, s = de(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
67
- let o;
68
- const c = _(!1), i = (l) => {
69
- c.value = l.matches;
70
- }, r = () => {
71
- o && ("removeEventListener" in o ? o.removeEventListener("change", i) : o.removeListener(i));
72
- }, u = j(() => {
73
- s.value && (r(), o = t.matchMedia(w(e)), "addEventListener" in o ? o.addEventListener("change", i) : o.addListener(i), c.value = o.matches);
66
+ function he(e, n = {}) {
67
+ const { window: t = T } = n, c = be(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
68
+ let a;
69
+ const l = _(!1), i = (p) => {
70
+ l.value = p.matches;
71
+ }, s = () => {
72
+ a && ("removeEventListener" in a ? a.removeEventListener("change", i) : a.removeListener(i));
73
+ }, d = U(() => {
74
+ c.value && (s(), a = t.matchMedia(O(e)), "addEventListener" in a ? a.addEventListener("change", i) : a.addListener(i), l.value = a.matches);
74
75
  });
75
- return W(() => {
76
- u(), r(), o = void 0;
77
- }), c;
76
+ return P(() => {
77
+ d(), s(), a = void 0;
78
+ }), l;
78
79
  }
79
- function pe(e = {}) {
80
+ function ye(e = {}) {
80
81
  const {
81
- window: n = N,
82
+ window: n = T,
82
83
  initialWidth: t = Number.POSITIVE_INFINITY,
83
- initialHeight: s = Number.POSITIVE_INFINITY,
84
- listenOrientation: o = !0,
85
- includeScrollbar: c = !0
86
- } = e, i = _(t), r = _(s), u = () => {
87
- n && (c ? (i.value = n.innerWidth, r.value = n.innerHeight) : (i.value = n.document.documentElement.clientWidth, r.value = n.document.documentElement.clientHeight));
84
+ initialHeight: c = Number.POSITIVE_INFINITY,
85
+ listenOrientation: a = !0,
86
+ includeScrollbar: l = !0
87
+ } = e, i = _(t), s = _(c), d = () => {
88
+ n && (l ? (i.value = n.innerWidth, s.value = n.innerHeight) : (i.value = n.document.documentElement.clientWidth, s.value = n.document.documentElement.clientHeight));
88
89
  };
89
- if (u(), re(u), le("resize", u, { passive: !0 }), o) {
90
- const l = fe("(orientation: portrait)");
91
- A(l, () => u());
90
+ if (d(), pe(d), me("resize", d, { passive: !0 }), a) {
91
+ const p = he("(orientation: portrait)");
92
+ B(p, () => d());
92
93
  }
93
- return { width: i, height: r };
94
+ return { width: i, height: s };
94
95
  }
95
- const x = {
96
+ const F = {
96
97
  "en-US": {
97
98
  actionBar: "Action bar",
99
+ cancel: "Cancel",
98
100
  close: "Close",
99
- selected: "selected"
101
+ save: "Save",
102
+ selected: "selected",
103
+ unsavedChanges: "unsaved change | unsaved changes"
100
104
  }
101
- }, me = ["aria-label"], ve = { class: "b-action-bar__close-button" }, _e = {
102
- i18n: { messages: x }
103
- }, be = /* @__PURE__ */ D({
104
- ..._e,
105
+ }, ge = ["aria-label"], Ee = {
106
+ key: 0,
107
+ class: "b-action-bar__close-button"
108
+ }, Se = {
109
+ i18n: { messages: F }
110
+ }, Ae = /* @__PURE__ */ Y({
111
+ ...Se,
105
112
  __name: "action-bar",
106
113
  props: {
107
114
  /**
108
115
  * List of actions that will be used to render the buttons.
116
+ * Required and used for the `default` variant.
109
117
  *
110
118
  * Each object in the list should have a `title`, an `event` and,
111
119
  * optionally, an `icon`.
@@ -116,7 +124,7 @@ const x = {
116
124
  */
117
125
  actions: {
118
126
  type: Array,
119
- required: !0
127
+ default: () => []
120
128
  },
121
129
  /**
122
130
  * How many actions should be visible outside the menu, cannot be more than 4
@@ -146,95 +154,120 @@ const x = {
146
154
  selectionLabel: {
147
155
  type: String,
148
156
  default: null
157
+ },
158
+ /**
159
+ * Variant for the action bar
160
+ * @values default, confirmation
161
+ */
162
+ variant: {
163
+ type: String,
164
+ default: "default"
149
165
  }
150
166
  },
151
- emits: ["close"],
167
+ emits: ["close", "cancel", "save"],
152
168
  setup(e, { emit: n }) {
153
- const t = e, s = 100, o = 7, c = 500, i = 32, { t: r } = X({ messages: x }), u = S(() => t.selectionLabel ? t.selectionLabel : r("selected")), l = _(null), { extraBottomSpacing: d, visibleActions: m } = G(t), { width: f } = pe(), a = _(null), h = _(null);
154
- A(
155
- () => m.value,
156
- (v) => {
157
- h.value = v <= 4 ? v : 4, a.value = h.value;
169
+ const t = e, c = 100, a = 7, l = 500, i = 32, { t: s, tc: d } = oe({ messages: F }), p = y(() => t.selectionLabel ? t.selectionLabel : s("selected")), r = _(null), { extraBottomSpacing: v, visibleActions: b } = K(t), { width: f } = ye(), u = _(null), C = _(null), g = y(() => t.variant === "confirmation");
170
+ B(
171
+ () => b.value,
172
+ (m) => {
173
+ C.value = m <= 4 ? m : 4, u.value = C.value;
158
174
  },
159
175
  { immediate: !0 }
160
176
  );
161
- const V = S(() => ({
162
- "b-action-bar--extra-spacing": d.value
177
+ const R = y(() => ({
178
+ "b-action-bar--extra-spacing": v.value,
179
+ "b-action-bar--confirmation": g.value
163
180
  }));
164
- z(ee, o);
165
- const P = S(() => {
166
- const v = t.actions.map((k) => ({
167
- ...k,
181
+ Q(ie, a);
182
+ const j = y(() => {
183
+ const m = t.actions.map((G) => ({
184
+ ...G,
168
185
  variant: "secondary"
169
- })), b = v.slice(0, a.value).reverse(), y = v.slice(a.value);
170
- return [...b, ...y];
171
- }), C = async () => {
172
- await g(), f.value > l.value.clientWidth + i + s && a.value < h.value && (a.value += 1, C());
173
- }, O = async () => {
174
- await g(), f.value < l.value.clientWidth + i && a.value > 0 && (a.value -= 1, O());
186
+ })), h = m.slice(0, u.value).reverse(), E = m.slice(u.value);
187
+ return [...h, ...E];
188
+ }), D = y(() => [
189
+ {
190
+ title: s("save"),
191
+ event: () => n("save")
192
+ },
193
+ {
194
+ title: s("cancel"),
195
+ variant: "secondary",
196
+ event: () => n("cancel")
197
+ }
198
+ ]), L = async () => {
199
+ await A(), f.value > r.value.clientWidth + i + c && u.value < C.value && (u.value += 1, L());
200
+ }, M = async () => {
201
+ await A(), f.value < r.value.clientWidth + i && u.value > 0 && (u.value -= 1, M());
175
202
  };
176
- return A(
203
+ return B(
177
204
  () => f.value,
178
- async (v, b) => {
179
- if (await g(), !l.value)
205
+ async (m, h) => {
206
+ if (await A(), !r.value)
180
207
  return;
181
- const y = v > b;
182
- f.value < c ? a.value = 0 : y ? C() : O();
208
+ const E = m > h;
209
+ f.value < l ? u.value = 0 : E ? L() : M();
183
210
  },
184
211
  { immediate: !0 }
185
- ), (v, b) => (H(), U(Y, {
212
+ ), (m, h) => (S(), I($, {
186
213
  name: "b-action-bar__animation",
187
214
  appear: ""
188
215
  }, {
189
- default: I(() => [
190
- B("section", {
191
- class: q(["b-action-bar", p(V)]),
192
- "aria-label": p(r)("actionBar")
216
+ default: w(() => [
217
+ V("section", {
218
+ class: q(["b-action-bar", o(R)]),
219
+ "aria-label": o(s)("actionBar")
193
220
  }, [
194
- B("div", {
221
+ V("div", {
195
222
  ref_key: "actionBar",
196
- ref: l,
223
+ ref: r,
197
224
  class: "b-action-bar__container"
198
225
  }, [
199
- B("div", ve, [
200
- E(p(Q), {
226
+ o(g) ? Z("", !0) : (S(), J("div", Ee, [
227
+ N(o(ee), {
201
228
  variant: "tertiary",
202
229
  inverse: "",
203
- "aria-label": p(r)("close"),
204
- onClick: b[0] || (b[0] = (y) => n("close"))
230
+ "aria-label": o(s)("close"),
231
+ onClick: h[0] || (h[0] = (E) => n("close"))
205
232
  }, {
206
- iconLeft: I(() => [
207
- E(p(Z), { "aria-hidden": !0 })
233
+ iconLeft: w(() => [
234
+ N(o(ae), { "aria-hidden": !0 })
208
235
  ]),
209
236
  _: 1
210
237
  }, 8, ["aria-label"])
211
- ]),
212
- E(p($), {
238
+ ])),
239
+ N(o(te), {
213
240
  el: "span",
214
241
  stronger: "",
215
242
  class: "b-action-bar__selection"
216
243
  }, {
217
- default: I(() => [
218
- K(T(e.itemCounter) + " " + T(p(u)), 1)
244
+ default: w(() => [
245
+ X(W(e.itemCounter) + " " + W(o(g) ? o(d)("unsavedChanges", e.itemCounter) : o(p)), 1)
219
246
  ]),
220
247
  _: 1
221
248
  }),
222
- E(J, {
223
- actions: p(P),
249
+ o(g) ? (S(), I(o(se), {
250
+ key: 1,
251
+ actions: o(D),
252
+ class: "b-action-bar__actions",
253
+ inverse: ""
254
+ }, null, 8, ["actions"])) : (S(), I(ne, {
255
+ key: 2,
256
+ actions: o(j),
224
257
  class: "b-action-bar__actions",
225
- "displayed-actions": a.value,
258
+ "displayed-actions": u.value,
226
259
  "menu-position": "top-end",
227
260
  inverse: ""
228
- }, null, 8, ["actions", "displayed-actions"])
261
+ }, null, 8, ["actions", "displayed-actions"]))
229
262
  ], 512)
230
- ], 10, me)
263
+ ], 10, ge)
231
264
  ]),
232
265
  _: 1
233
266
  }));
234
267
  }
235
268
  });
236
- const we = /* @__PURE__ */ te(be, [["__scopeId", "data-v-59086ee6"]]);
269
+ const Ve = /* @__PURE__ */ ce(Ae, [["__scopeId", "data-v-191a2ab0"]]);
237
270
  export {
238
- we as BentoActionBar
271
+ Ve as BentoActionBar
239
272
  };
240
273
  //# sourceMappingURL=action-bar.js.map