@adyen/bento-vue3 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +7 -2
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +25 -13
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +25 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +13 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +153 -12
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +319 -96
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +18 -24
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +146 -116
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +53 -51
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.7897a95e.js → base-button.aa085dfa.js} +2 -2
- package/dist/chunks/{base-button.7897a95e.js.map → base-button.aa085dfa.js.map} +1 -1
- package/dist/chunks/{base-modal.0c85e7cb.js → base-modal.3dcf8376.js} +119 -105
- package/dist/chunks/base-modal.3dcf8376.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.fa35390c.js → button-actions-with-menu.3f52ea2d.js} +7 -7
- package/dist/chunks/{button-actions-with-menu.fa35390c.js.map → button-actions-with-menu.3f52ea2d.js.map} +1 -1
- package/dist/chunks/{button.e5177388.js → button.82ed953e.js} +2 -2
- package/dist/chunks/button.82ed953e.js.map +1 -0
- package/dist/chunks/calendar.d4ab387d.js +1037 -0
- package/dist/chunks/calendar.d4ab387d.js.map +1 -0
- package/dist/chunks/checkbox.03c4b0fe.js +265 -0
- package/dist/chunks/checkbox.03c4b0fe.js.map +1 -0
- package/dist/chunks/controls-group.807b5fb0.js +95 -0
- package/dist/chunks/controls-group.807b5fb0.js.map +1 -0
- package/dist/chunks/{copy.86236c8d.js → copy.28bd4298.js} +4 -4
- package/dist/chunks/{copy.86236c8d.js.map → copy.28bd4298.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.0b38fac3.js → dropdown-default-textbox.74c4584a.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.0b38fac3.js.map → dropdown-default-textbox.74c4584a.js.map} +1 -1
- package/dist/chunks/{dropdown.afff433b.js → dropdown.502e1f5c.js} +314 -337
- package/dist/chunks/dropdown.502e1f5c.js.map +1 -0
- package/dist/chunks/field-label.61679178.js +132 -0
- package/dist/chunks/field-label.61679178.js.map +1 -0
- package/dist/chunks/{fixed-scroller.e5aa7b00.js → fixed-scroller.92bb77a6.js} +2 -2
- package/dist/chunks/{fixed-scroller.e5aa7b00.js.map → fixed-scroller.92bb77a6.js.map} +1 -1
- package/dist/chunks/{footer-actions.1ce44374.js → footer-actions.cefaf1e2.js} +3 -3
- package/dist/chunks/{footer-actions.1ce44374.js.map → footer-actions.cefaf1e2.js.map} +1 -1
- package/dist/chunks/{grid-layout.7c919507.js → grid-layout.c2fe3057.js} +43 -34
- package/dist/chunks/grid-layout.c2fe3057.js.map +1 -0
- package/dist/chunks/{index.fa7b44f1.js → index.0ee895e0.js} +2 -2
- package/dist/chunks/{index.fa7b44f1.js.map → index.0ee895e0.js.map} +1 -1
- package/dist/chunks/{index.bcc58fdd.js → index.7262642e.js} +3 -3
- package/dist/chunks/{index.bcc58fdd.js.map → index.7262642e.js.map} +1 -1
- package/dist/chunks/index.726e2f3c.js +339 -0
- package/dist/chunks/index.726e2f3c.js.map +1 -0
- package/dist/chunks/{index.2bd3812b.js → index.75f3672e.js} +2 -2
- package/dist/chunks/{index.2bd3812b.js.map → index.75f3672e.js.map} +1 -1
- package/dist/chunks/{index.6a665ade.js → index.abb2a1d5.js} +3 -3
- package/dist/chunks/{index.6a665ade.js.map → index.abb2a1d5.js.map} +1 -1
- package/dist/chunks/index.b043371e.js +150 -0
- package/dist/chunks/index.b043371e.js.map +1 -0
- package/dist/chunks/{index.e579bc02.js → index.cf0d3be3.js} +19 -17
- package/dist/chunks/{index.e579bc02.js.map → index.cf0d3be3.js.map} +1 -1
- package/dist/chunks/{index.c207e9ab.js → index.d2542c6a.js} +132 -135
- package/dist/chunks/index.d2542c6a.js.map +1 -0
- package/dist/chunks/index.d80206ed.js +10 -0
- package/dist/chunks/index.d80206ed.js.map +1 -0
- package/dist/chunks/index.e9156fe3.js +817 -0
- package/dist/chunks/index.e9156fe3.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.809ec40e.js → listbox-option-tag.5b00c85f.js} +3 -3
- package/dist/chunks/{listbox-option-tag.809ec40e.js.map → listbox-option-tag.5b00c85f.js.map} +1 -1
- package/dist/chunks/{listbox.f6e5a11d.js → listbox.d07c24e6.js} +4 -4
- package/dist/chunks/{listbox.f6e5a11d.js.map → listbox.d07c24e6.js.map} +1 -1
- package/dist/chunks/loading-button.ad7cfaee.js +108 -0
- package/dist/chunks/loading-button.ad7cfaee.js.map +1 -0
- package/dist/chunks/{tooltip.f769eb14.js → tooltip.054d2eb6.js} +3 -3
- package/dist/chunks/{tooltip.f769eb14.js.map → tooltip.054d2eb6.js.map} +1 -1
- package/dist/code-snippet.js +6 -6
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +847 -820
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +114 -138
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +17 -16
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +76 -80
- package/dist/header.js.map +1 -1
- package/dist/index.js +207 -205
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +136 -158
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +14 -13
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +4 -4
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +3 -359
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +4 -4
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +125 -149
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +312 -229
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +49 -49
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -120
- package/dist/assets/error-message.css +0 -1
- package/dist/chunks/base-modal.0c85e7cb.js.map +0 -1
- package/dist/chunks/button.e5177388.js.map +0 -1
- package/dist/chunks/calendar.c83d4e99.js +0 -898
- package/dist/chunks/calendar.c83d4e99.js.map +0 -1
- package/dist/chunks/checkbox.3cdbdd52.js +0 -235
- package/dist/chunks/checkbox.3cdbdd52.js.map +0 -1
- package/dist/chunks/controls-group.38b436f6.js +0 -136
- package/dist/chunks/controls-group.38b436f6.js.map +0 -1
- package/dist/chunks/dropdown.afff433b.js.map +0 -1
- package/dist/chunks/error-message.64e1964b.js +0 -49
- package/dist/chunks/error-message.64e1964b.js.map +0 -1
- package/dist/chunks/grid-layout.7c919507.js.map +0 -1
- package/dist/chunks/index.369b0e66.js +0 -734
- package/dist/chunks/index.369b0e66.js.map +0 -1
- package/dist/chunks/index.77f35162.js +0 -134
- package/dist/chunks/index.77f35162.js.map +0 -1
- package/dist/chunks/index.c207e9ab.js.map +0 -1
- package/dist/chunks/loading-button.746b7fa1.js +0 -109
- package/dist/chunks/loading-button.746b7fa1.js.map +0 -1
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { PropType } from "../../../../../../../vue3/node_modules/vue";
|
|
2
|
-
import { BentoModalColumnLayoutVariant, BentoModalEvent, BentoModalRole, BentoModalSize } from "../../../modal.types";
|
|
3
|
-
declare const _default: import("../../../../../../../vue3/node_modules/vue").DefineComponent<{
|
|
4
|
-
modalRole: {
|
|
5
|
-
type: StringConstructor;
|
|
6
|
-
default: BentoModalRole;
|
|
7
|
-
};
|
|
8
|
-
isDismissible: {
|
|
9
|
-
type: BooleanConstructor;
|
|
10
|
-
required: true;
|
|
11
|
-
};
|
|
12
|
-
hideCloseButton: {
|
|
13
|
-
type: BooleanConstructor;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
customPadding: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default: any;
|
|
19
|
-
};
|
|
20
|
-
withColumnLayout: {
|
|
21
|
-
type: BooleanConstructor;
|
|
22
|
-
default: boolean;
|
|
23
|
-
};
|
|
24
|
-
columnsSize: {
|
|
25
|
-
type: PropType<BentoModalColumnLayoutVariant>;
|
|
26
|
-
default: BentoModalColumnLayoutVariant;
|
|
27
|
-
};
|
|
28
|
-
isOpen: {
|
|
29
|
-
type: BooleanConstructor;
|
|
30
|
-
required: true;
|
|
31
|
-
};
|
|
32
|
-
size: {
|
|
33
|
-
type: PropType<BentoModalSize>;
|
|
34
|
-
default: BentoModalSize;
|
|
35
|
-
};
|
|
36
|
-
initiallyOpen: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
}, {
|
|
41
|
-
modal: any;
|
|
42
|
-
computedAriaLabel: import("../../../../../../../vue3/node_modules/vue").ComputedRef<string>;
|
|
43
|
-
openModal: () => void;
|
|
44
|
-
closeModalOnClickOutside: ({ target }: Event) => void;
|
|
45
|
-
onCloseButtonClick: () => void;
|
|
46
|
-
hasSlot: (name: string) => boolean;
|
|
47
|
-
emitCloseEvent: () => void;
|
|
48
|
-
modalConditionalClasses: import("../../../../../../../vue3/node_modules/vue").ComputedRef<{
|
|
49
|
-
[x: string]: boolean | BentoModalSize;
|
|
50
|
-
"b-modal-base__container--visible": boolean;
|
|
51
|
-
}>;
|
|
52
|
-
modalContentConditionalClasses: import("../../../../../../../vue3/node_modules/vue").ComputedRef<{
|
|
53
|
-
'b-modal-base__content--column-layout': boolean;
|
|
54
|
-
}>;
|
|
55
|
-
wrapperStyles: import("../../../../../../../vue3/node_modules/vue").ComputedRef<{
|
|
56
|
-
padding: string;
|
|
57
|
-
} | {
|
|
58
|
-
padding?: undefined;
|
|
59
|
-
}>;
|
|
60
|
-
dividerStyles: import("../../../../../../../vue3/node_modules/vue").ComputedRef<{
|
|
61
|
-
marginLeft: string;
|
|
62
|
-
width: string;
|
|
63
|
-
} | {
|
|
64
|
-
marginLeft?: undefined;
|
|
65
|
-
width?: undefined;
|
|
66
|
-
}>;
|
|
67
|
-
hasColumnLayout: import("../../../../../../../vue3/node_modules/vue").ComputedRef<boolean>;
|
|
68
|
-
computedColumnWidth: import("../../../../../../../vue3/node_modules/vue").ComputedRef<{
|
|
69
|
-
small: number;
|
|
70
|
-
medium: number;
|
|
71
|
-
large: number;
|
|
72
|
-
}[]>;
|
|
73
|
-
}, unknown, {}, {}, import("../../../../../../../vue3/node_modules/vue").ComponentOptionsMixin, import("../../../../../../../vue3/node_modules/vue").ComponentOptionsMixin, BentoModalEvent[], BentoModalEvent, import("../../../../../../../vue3/node_modules/vue").VNodeProps & import("../../../../../../../vue3/node_modules/vue").AllowedComponentProps & import("../../../../../../../vue3/node_modules/vue").ComponentCustomProps, Readonly<import("../../../../../../../vue3/node_modules/vue").ExtractPropTypes<{
|
|
74
|
-
modalRole: {
|
|
75
|
-
type: StringConstructor;
|
|
76
|
-
default: BentoModalRole;
|
|
77
|
-
};
|
|
78
|
-
isDismissible: {
|
|
79
|
-
type: BooleanConstructor;
|
|
80
|
-
required: true;
|
|
81
|
-
};
|
|
82
|
-
hideCloseButton: {
|
|
83
|
-
type: BooleanConstructor;
|
|
84
|
-
required: true;
|
|
85
|
-
};
|
|
86
|
-
customPadding: {
|
|
87
|
-
type: StringConstructor;
|
|
88
|
-
default: any;
|
|
89
|
-
};
|
|
90
|
-
withColumnLayout: {
|
|
91
|
-
type: BooleanConstructor;
|
|
92
|
-
default: boolean;
|
|
93
|
-
};
|
|
94
|
-
columnsSize: {
|
|
95
|
-
type: PropType<BentoModalColumnLayoutVariant>;
|
|
96
|
-
default: BentoModalColumnLayoutVariant;
|
|
97
|
-
};
|
|
98
|
-
isOpen: {
|
|
99
|
-
type: BooleanConstructor;
|
|
100
|
-
required: true;
|
|
101
|
-
};
|
|
102
|
-
size: {
|
|
103
|
-
type: PropType<BentoModalSize>;
|
|
104
|
-
default: BentoModalSize;
|
|
105
|
-
};
|
|
106
|
-
initiallyOpen: {
|
|
107
|
-
type: BooleanConstructor;
|
|
108
|
-
default: boolean;
|
|
109
|
-
};
|
|
110
|
-
}>> & {
|
|
111
|
-
"onClose-modal"?: (...args: any[]) => any;
|
|
112
|
-
}, {
|
|
113
|
-
size: BentoModalSize;
|
|
114
|
-
columnsSize: BentoModalColumnLayoutVariant;
|
|
115
|
-
customPadding: string;
|
|
116
|
-
initiallyOpen: boolean;
|
|
117
|
-
modalRole: string;
|
|
118
|
-
withColumnLayout: boolean;
|
|
119
|
-
}>;
|
|
120
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.b-error-message[data-v-024e50b0]{scrollbar-color:var(--b-color-background-quaternary) transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;align-items:flex-start;color:var(--b-error-message-color);display:flex}.b-error-message[data-v-024e50b0],.b-error-message[data-v-024e50b0]:before,.b-error-message[data-v-024e50b0]:after{box-sizing:border-box}.b-error-message *[data-v-024e50b0],.b-error-message *[data-v-024e50b0]:before,.b-error-message *[data-v-024e50b0]:after{box-sizing:border-box}.b-error-message[data-v-024e50b0] ::-webkit-scrollbar{height:14px;width:14px}.b-error-message[data-v-024e50b0] ::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:var(--b-color-background-quaternary);border:3px solid transparent;border-radius:var(--b-border-radius-l)}.b-error-message__icon[data-v-024e50b0]{align-items:center;display:flex;height:var(--b-error-message-icon-height);margin-right:var(--b-error-message-icon-margin-right)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-modal.0c85e7cb.js","sources":["../../../vue2/src/components/modal/modal.types.ts","../../../vue2/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>\n <div class=\"b-modal-base__wrapper\">\n <div\n v-if=\"hasSlot('default') || !hideCloseButton\"\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=\"!hideCloseButton\"\n class=\"b-modal-base__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"internalModalActionClose\"\n >\n <cross-icon svg-title=\"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 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 lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref, useAttrs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalEvent,\n BentoModalRole,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n\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 export default defineComponent({\n i18n: { messages },\n name: 'base-modal',\n components: { CrossIcon, BentoTypography, BentoButton, BentoDivider, BentoFocusTrap, GridLayout },\n props: {\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 emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const modal = ref(null);\n const isClosing = ref(false);\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(\n () => (attrs['aria-label'] as string) ?? (t('ariaLabelFallback') as string)\n );\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(BentoModalEvent.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 // If the user has pressed escape, clicked outside or clicked the close icon\n const internalModalActionClose = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!props.isDismissible) {\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 [{ small: 4, medium: 4, large: 4 }];\n }\n if (props.columnsSize === BentoModalColumnLayoutVariant.BIGGER) {\n return [{ small: 8, medium: 8, large: 8 }];\n }\n return [{ small: 6, medium: 6, large: 6 }];\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 return {\n // Refs\n modal,\n computedAriaLabel,\n\n // Handling the state\n openModal,\n closeModalOnClickOutside,\n closeModalAfterAnimation,\n startCloseModalAnimation,\n\n // Methods\n internalModalActionClose,\n hasSlot,\n emitCloseEvent,\n t,\n\n // Styles\n modalConditionalClasses,\n modalContentConditionalClasses,\n customPaddingStyles,\n hasColumnLayout,\n computedColumnWidth,\n\n // Enums\n GridLayoutContainerType,\n };\n },\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","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","_sfc_main","defineComponent","messages","CrossIcon","BentoTypography","BentoButton","BentoDivider","BentoFocusTrap","GridLayout","props","slots","emit","t","useI18n","attrs","useAttrs","hasSlot","useHasSlot","modal","ref","isClosing","customPaddingStyles","computed","xPadding","content","computedAriaLabel","hasColumnLayout","openModal","emitCloseEvent","closeModalAfterAnimation","startCloseModalAnimation","internalModalActionClose","event","closeModalOnClickOutside","target","modalConditionalClasses","modalContentConditionalClasses","computedColumnWidth","watch","newIsOpen","newModalValue","oldModalValue","_b","_a","onMounted","GridLayoutContainerType","_hoisted_2","_hoisted_4","createElementVNode","_ctx","normalizeClass","_cache","args","$event","withCtx","_hoisted_3","openBlock","createElementBlock","normalizeStyle","createVNode","_component_bento_typography","renderSlot","createCommentVNode","createBlock","_component_grid_layout","_hoisted_5"],"mappings":";;;;;;;;;;;AAGY,IAAAA,KAAA,kBAAAC,OACRA,EAAA,UAAA,qBACAA,EAAA,SAAA,oBAFQA,IAAAD,MAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GASAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAA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,EAAAZ,EAAA,QAAA,iBAAA,CAAA,GAAA,QAAA,EAAA;AAAA,oBAAwC,CAAA;AAAA;;;oBAEvD,GAAA;AAAA,kBAAA,GAAA,GAAA,CAAA,gBAAA,gBAAA,CAAA,KAAAY,EAAAZ,EAAA,QAAA,WAAA,EAAA,KAAA,EAAA,GAAA,QAAA,EAAA;AAAA;;;YAKS,GAAA,CAAA;AAAA;cAC0B,KAAA;AAAA,cACjC,OAAA;AAAA;YAE8B,GAAA;AAAA;gBAA+B,KAAA;AAAA;cAEnE,CAAA,KAAAa,EAAA,IAAA,EAAA;AAAA,cAC2Bd,EAAA,OAAAiB,IAAA;AAAA;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.e5177388.js","sources":["../../../core/src/components/button/button.types.ts","../../../vue2/src/components/button/button.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoButtonVariant {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n TERTIARY = 'tertiary',\n}\n\nexport enum BentoButtonPropClass {\n CONDENSED = 'condensed',\n DESTRUCTIVE = 'critical',\n DISABLED = 'disabled',\n ICON_ONLY = 'icon-only',\n INVERSE = 'inverse',\n}\n\nexport interface BentoButtonProps {\n condensed?: boolean;\n critical?: boolean;\n disabled?: boolean;\n inverse?: boolean;\n variant?: BentoButtonVariant;\n type?: string;\n link?: object;\n}\n","<template>\n <component\n :is=\"componentType\"\n v-bind=\"componentProps\"\n class=\"b-button\"\n :class=\"conditionalClasses\"\n @click.capture=\"onClickButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoButtonPropClass, BentoButtonVariant } from '@/core/components/button/button.types';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { Booleanish } from '@/types/prop-types';\n import type { RouterLinkProps } from 'vue-router/types/router';\n import type { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'vue/types/jsx';\n import { BentoLink, BentoLinkVariant } from '@/components/link';\n\n // TODO: replace all this code when migrated to Vue 3 is complete as this is the only\n // current way to extend the `router-link` component in Vue 2 and Vue Router 3\n export interface LinkProps extends RouterLinkProps, AnchorHTMLAttributes {\n // eslint-disable-next-line vue/require-default-prop\n args?: { props: RouterLinkProps };\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n external: boolean;\n }\n\n /**\n * Button component for all the various types of bento buttons.\n *\n * @usage\n * import { BentoButton, AdlIconPosition } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoButton },\n * template: `\n * <bento-button\n * disabled\n * :icon-position=\"AdlIconPosition.AFTER\"\n * >\n * Button text\n * </bento-button>\n * `,\n * }\n */\n export default defineComponent({\n name: 'bento-button',\n components: { BentoTypography },\n props: {\n /**\n * Reduces sizing of button\n */\n condensed: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets color set to inverse\n */\n inverse: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Object containing props passed on to the BentoLink component. @see BentoLink documentation for which properties you can pass.\n */\n link: {\n type: Object,\n default: undefined,\n },\n\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n\n /**\n * Types of flavour of Button\n * @values primary, secondary, tertiary\n */\n variant: {\n type: String as PropType<BentoButtonVariant | `${BentoButtonVariant}`>,\n default: BentoButtonVariant.PRIMARY,\n validator: (value: BentoButtonVariant) => Object.values(BentoButtonVariant).includes(value),\n },\n },\n emits: ['click', 'focus', 'blur', 'keydown.esc'],\n setup(props, { slots, emit, attrs }) {\n const componentType = computed(() => {\n if (props?.link !== undefined) {\n return BentoLink;\n }\n return 'button';\n });\n const ariaAttributes = computed(() => ({\n 'aria-controls': attrs['aria-controls']?.toString() as string,\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const componentProps = computed(() =>\n componentType.value === 'button'\n ? {\n ...ariaAttributes.value,\n disabled: props.disabled,\n type: props.type,\n }\n : { ...props.link, disableTypography: true, variant: BentoLinkVariant.DEFAULT }\n );\n\n const variantClass = computed((): { [x: string]: boolean } => ({\n [`b-button--${props.variant}${props.critical ? `-${BentoButtonPropClass.DESTRUCTIVE}` : ''}`]: true,\n }));\n\n const conditionalClasses = computed(\n (): {\n [x: string]: boolean;\n } => ({\n ...variantClass.value,\n [`b-button--${BentoButtonPropClass.CONDENSED}`]: props.condensed,\n [`b-button--${BentoButtonPropClass.DISABLED}`]: props.disabled,\n [`b-button--${BentoButtonPropClass.ICON_ONLY}`]: !slots.default,\n [`b-button--${BentoButtonPropClass.INVERSE}`]: props.inverse,\n })\n );\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit('click', e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n componentType,\n componentProps,\n\n // Methods\n onClickButton,\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/button/button.scss\" />\n"],"names":["BentoButtonVariant","BentoButtonVariant2","BentoButtonPropClass","BentoButtonPropClass2","_sfc_main","defineComponent","BentoTypography","value","props","slots","emit","attrs","componentType","computed","BentoLink","ariaAttributes","_a","_b","componentProps","BentoLinkVariant","variantClass","conditionalClasses","useHasSlot","_ctx","withCtx","openBlock","createElementBlock","_hoisted_1","createCommentVNode","createBlock","_component_bento_typography","_hoisted_2"],"mappings":";;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aACAA,EAAA,WAAA,YAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,cAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WALQA,IAAAD,KAAA,CAAA,CAAA;ACmDR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,WAAA;AAAA,MAIQ,MAAA;AAAA,MACD,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAKU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAKU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,SAAA;AAAA,MAKS,MAAA;AAAA,MACC,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,MAAA;AAAA,MAKM,MAAA;AAAA,MACI,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,MAAA;AAAA,MAMM,MAAA;AAAA,MACI,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,IACb,SAAA;AAAA,MAMS,MAAA;AAAA,MACC,SAAAN,EAAA;AAAA,MACsB,WAAA,CAAAO,MAAA,OAAA,OAAAP,CAAA,EAAA,SAAAO,CAAA;AAAA,IAC8D;AAAA,EAC9F;AAAA,EACJ,OAAA,CAAA,SAAA,SAAA,QAAA,aAAA;AAAA,EAC+C,MAAAC,GAAA,EAAA,OAAAC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