@empathyco/x-components 5.0.0-alpha.21 → 5.0.0-alpha.23

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 (59) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/design-system/deprecated-full-theme.css +634 -634
  3. package/docs/API-reference/api/x-components.basemodal.md +51 -25
  4. package/docs/API-reference/api/x-components.basevariablecolumngrid.md +30 -11
  5. package/docs/API-reference/api/x-components.md +3 -3
  6. package/docs/API-reference/api/x-components.slidingpanel.md +46 -12
  7. package/docs/API-reference/components/common/modals/x-components.base-modal.md +9 -7
  8. package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +5 -5
  9. package/docs/API-reference/components/common/x-components.sliding-panel.md +2 -0
  10. package/js/components/animations/fade.vue.js +1 -1
  11. package/js/components/animations/fade.vue.js.map +1 -1
  12. package/js/components/animations/fade.vue3.js +1 -1
  13. package/js/components/base-variable-column-grid.vue.js +1 -1
  14. package/js/components/base-variable-column-grid.vue.js.map +1 -1
  15. package/js/components/base-variable-column-grid.vue2.js +63 -49
  16. package/js/components/base-variable-column-grid.vue2.js.map +1 -1
  17. package/js/components/dynamic-props.mixin.js +1 -1
  18. package/js/components/dynamic-props.mixin.js.map +1 -1
  19. package/js/components/modals/base-modal.vue.js +3 -3
  20. package/js/components/modals/base-modal.vue.js.map +1 -1
  21. package/js/components/modals/base-modal.vue2.js +160 -166
  22. package/js/components/modals/base-modal.vue2.js.map +1 -1
  23. package/js/components/modals/base-modal.vue3.js +1 -1
  24. package/js/components/sliding-panel.vue.js +6 -6
  25. package/js/components/sliding-panel.vue.js.map +1 -1
  26. package/js/components/sliding-panel.vue2.js +112 -136
  27. package/js/components/sliding-panel.vue2.js.map +1 -1
  28. package/js/components/sliding-panel.vue3.js +1 -1
  29. package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
  30. package/js/x-modules/facets/components/lists/sliced-filters.vue2.js +1 -7
  31. package/js/x-modules/facets/components/lists/sliced-filters.vue2.js.map +1 -1
  32. package/package.json +2 -2
  33. package/report/x-components.api.json +2339 -1293
  34. package/report/x-components.api.md +124 -81
  35. package/types/components/base-variable-column-grid.vue.d.ts +38 -17
  36. package/types/components/base-variable-column-grid.vue.d.ts.map +1 -1
  37. package/types/components/dynamic-props.mixin.d.ts +1 -1
  38. package/types/components/modals/base-modal.vue.d.ts +68 -97
  39. package/types/components/modals/base-modal.vue.d.ts.map +1 -1
  40. package/types/components/sliding-panel.vue.d.ts +50 -87
  41. package/types/components/sliding-panel.vue.d.ts.map +1 -1
  42. package/types/x-modules/facets/components/lists/sliced-filters.vue.d.ts +2 -14
  43. package/types/x-modules/facets/components/lists/sliced-filters.vue.d.ts.map +1 -1
  44. package/docs/API-reference/api/x-components.basemodal._refs.md +0 -14
  45. package/docs/API-reference/api/x-components.basemodal.animation.md +0 -13
  46. package/docs/API-reference/api/x-components.basemodal.focusonopen.md +0 -13
  47. package/docs/API-reference/api/x-components.basemodal.iswaitingforleave.md +0 -13
  48. package/docs/API-reference/api/x-components.basemodal.mounted.md +0 -15
  49. package/docs/API-reference/api/x-components.basemodal.open.md +0 -13
  50. package/docs/API-reference/api/x-components.basemodal.overlayanimation.md +0 -13
  51. package/docs/API-reference/api/x-components.basemodal.previousbodyoverflow.md +0 -13
  52. package/docs/API-reference/api/x-components.basemodal.previoushtmloverflow.md +0 -13
  53. package/docs/API-reference/api/x-components.basemodal.referenceelement.md +0 -13
  54. package/docs/API-reference/api/x-components.basemodal.referenceselector.md +0 -13
  55. package/docs/API-reference/api/x-components.basevariablecolumngrid.animation.md +0 -13
  56. package/docs/API-reference/api/x-components.basevariablecolumngrid.items.md +0 -18
  57. package/docs/API-reference/api/x-components.slidingpanel.resetoncontentchange.md +0 -13
  58. package/docs/API-reference/api/x-components.slidingpanel.scrollfactor.md +0 -13
  59. package/docs/API-reference/api/x-components.slidingpanel.showbuttons.md +0 -13
@@ -611,45 +611,57 @@ export class BaseKeyboardNavigation extends Vue_2 {
611
611
  triggerNavigation(eventPayload: ArrowKey, metadata: WireMetadata): void;
612
612
  }
613
613
 
614
- // Warning: (ae-forgotten-export) The symbol "BaseModal_base" needs to be exported by the entry point index.d.ts
615
- //
616
614
  // @public
617
- export class BaseModal extends BaseModal_base {
618
- // (undocumented)
619
- $refs: {
620
- modal: HTMLDivElement;
621
- modalContent: HTMLDivElement;
622
- };
623
- // @internal
624
- protected addBodyListeners(): void;
625
- animation: Vue_2 | string;
626
- // @internal
627
- protected disableScroll(): void;
628
- // @internal
629
- protected emitFocusInBody(event: FocusEvent): void;
630
- // @internal
631
- protected emitOverlayClicked(event: MouseEvent): void;
632
- // @internal
633
- protected enableScroll(): void;
634
- focusOnOpen: boolean;
635
- protected isWaitingForLeave: boolean;
636
- // (undocumented)
637
- protected mounted(): void;
638
- open: boolean;
639
- overlayAnimation: Vue_2 | string;
640
- protected previousBodyOverflow: string;
641
- protected previousHTMLOverflow: string;
642
- protected referenceElement: HTMLElement;
643
- referenceSelector?: string;
644
- // @internal
645
- protected removeBodyListeners(): void;
646
- // @internal
647
- protected setFocus(): void;
648
- // @internal
649
- protected syncBody(isOpen: boolean): void;
650
- // @internal
651
- updatePosition(): void;
652
- }
615
+ export const BaseModal: DefineComponent< {
616
+ open: {
617
+ type: BooleanConstructor;
618
+ required: true;
619
+ };
620
+ focusOnOpen: {
621
+ type: BooleanConstructor;
622
+ default: boolean;
623
+ };
624
+ referenceSelector: StringConstructor;
625
+ animation: {
626
+ type: PropType<string | VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>>;
627
+ default: () => DefineComponent< {}, () => VNode | VNode[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
628
+ };
629
+ overlayAnimation: {
630
+ type: PropType<string | VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>>;
631
+ default: () => VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>;
632
+ };
633
+ contentClass: StringConstructor;
634
+ overlayClass: StringConstructor;
635
+ }, {
636
+ emitOverlayClicked: (event: MouseEvent) => void;
637
+ isWaitingForLeave: Ref<boolean>;
638
+ modalContentRef: Ref<HTMLDivElement | undefined>;
639
+ modalRef: Ref<HTMLDivElement | undefined>;
640
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("click:overlay" | "focusin:body")[], string, Readonly<ExtractPropTypes< {
641
+ open: {
642
+ type: BooleanConstructor;
643
+ required: true;
644
+ };
645
+ focusOnOpen: {
646
+ type: BooleanConstructor;
647
+ default: boolean;
648
+ };
649
+ referenceSelector: StringConstructor;
650
+ animation: {
651
+ type: PropType<string | VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>>;
652
+ default: () => DefineComponent< {}, () => VNode | VNode[], {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>;
653
+ };
654
+ overlayAnimation: {
655
+ type: PropType<string | VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>>;
656
+ default: () => VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>;
657
+ };
658
+ contentClass: StringConstructor;
659
+ overlayClass: StringConstructor;
660
+ }>>, {
661
+ focusOnOpen: boolean;
662
+ animation: string | VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>;
663
+ overlayAnimation: string | VueConstructor<Vue_2<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue_2<Record<string, any>, Record<string, any>, never, never, any>>>;
664
+ }>;
653
665
 
654
666
  // @public (undocumented)
655
667
  export const BasePlaceholderImage: {};
@@ -1065,18 +1077,35 @@ props: {};
1065
1077
  }>;
1066
1078
 
1067
1079
  // @public
1068
- export class BaseVariableColumnGrid extends Vue_2 {
1069
- protected animation: Vue_2 | string;
1070
- // @internal
1071
- protected columns: number;
1072
- // @internal
1073
- protected get columnsToRender(): number;
1074
- protected items?: ListItem[];
1075
- // @internal
1076
- protected providedColumns: number | null;
1077
- // @internal
1078
- setColumns(newColumns: number): void;
1079
- }
1080
+ export const BaseVariableColumnGrid: DefineComponent< {
1081
+ animation: {
1082
+ type: PropType<string | DefineComponent< {}, {}, {}, ComponentComputedOptions, ComponentMethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>>;
1083
+ default: string;
1084
+ };
1085
+ items: PropType<ListItem[]>;
1086
+ columns: {
1087
+ type: NumberConstructor;
1088
+ default: number;
1089
+ };
1090
+ }, {
1091
+ columnsToRender: ComputedRef<number>;
1092
+ slots: Slots;
1093
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
1094
+ animation: {
1095
+ type: PropType<string | DefineComponent< {}, {}, {}, ComponentComputedOptions, ComponentMethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}>>;
1096
+ default: string;
1097
+ };
1098
+ items: PropType<ListItem[]>;
1099
+ columns: {
1100
+ type: NumberConstructor;
1101
+ default: number;
1102
+ };
1103
+ }>>, {
1104
+ animation: string | DefineComponent< {}, {}, {}, ComponentComputedOptions, ComponentMethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {}>>, {}> | (ComponentPublicInstanceConstructor<Vue3Instance< {}, Readonly<ExtractPropTypes< {}>>, Readonly<ExtractPropTypes< {}>>, {}, {}, true, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<ExtractPropTypes< {}>>> & ShallowUnwrapRef< {}> & ExtractComputedReturns<ComponentComputedOptions> & ComponentMethodOptions & ComponentCustomProperties & Readonly<ExtractPropTypes< {}>>, any, any, any, ComponentComputedOptions, ComponentMethodOptions> & ComponentOptionsBase<Readonly<ExtractPropTypes< {}>>, {}, {}, ComponentComputedOptions, ComponentMethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}> & {
1105
+ props: {};
1106
+ });
1107
+ columns: number;
1108
+ }>;
1080
1109
 
1081
1110
  // @public
1082
1111
  export class BaseXAPI implements XAPI {
@@ -5871,38 +5900,52 @@ required: true;
5871
5900
  buttonClass: StringConstructor;
5872
5901
  }>>, {}>;
5873
5902
 
5874
- // Warning: (ae-forgotten-export) The symbol "SlidingPanel_base" needs to be exported by the entry point index.d.ts
5875
- //
5876
5903
  // @public
5877
- export class SlidingPanel extends SlidingPanel_base {
5878
- // @internal
5879
- $refs: {
5880
- scrollContainer: HTMLElement;
5881
- };
5882
- // @internal
5883
- protected get cssClasses(): VueCSSClasses;
5884
- // @internal
5885
- debouncedUpdateScrollPosition(): void;
5886
- // @internal
5887
- protected isScrollAtEnd: boolean;
5888
- // @internal
5889
- protected isScrollAtStart: boolean;
5890
- // @internal
5891
- mounted(): void;
5892
- resetOnContentChange: boolean;
5893
- // @internal
5894
- restoreAndUpdateScroll(): void;
5895
- scrollFactor: number;
5896
- // @internal
5897
- protected scrollLeft(): void;
5898
- // @internal
5899
- protected scrollRight(): void;
5900
- // @internal
5901
- protected scrollTo(scrollValue: number): void;
5902
- showButtons: boolean;
5903
- // @internal
5904
- protected updateScrollPosition(): void;
5905
- }
5904
+ export const SlidingPanel: DefineComponent< {
5905
+ scrollFactor: {
5906
+ type: NumberConstructor;
5907
+ default: number;
5908
+ };
5909
+ showButtons: {
5910
+ type: BooleanConstructor;
5911
+ default: boolean;
5912
+ };
5913
+ resetOnContentChange: {
5914
+ type: BooleanConstructor;
5915
+ default: boolean;
5916
+ };
5917
+ buttonClass: StringConstructor;
5918
+ scrollContainerClass: StringConstructor;
5919
+ }, {
5920
+ cssClasses: ComputedRef< {
5921
+ 'x-sliding-panel-at-start': boolean;
5922
+ 'x-sliding-panel-at-end': boolean;
5923
+ }>;
5924
+ debouncedUpdateScroll: DebouncedFunction<[]>;
5925
+ scrollContainerRef: Ref<HTMLDivElement | undefined>;
5926
+ scrollLeft: () => void;
5927
+ scrollRight: () => void;
5928
+ slots: Slots;
5929
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
5930
+ scrollFactor: {
5931
+ type: NumberConstructor;
5932
+ default: number;
5933
+ };
5934
+ showButtons: {
5935
+ type: BooleanConstructor;
5936
+ default: boolean;
5937
+ };
5938
+ resetOnContentChange: {
5939
+ type: BooleanConstructor;
5940
+ default: boolean;
5941
+ };
5942
+ buttonClass: StringConstructor;
5943
+ scrollContainerClass: StringConstructor;
5944
+ }>>, {
5945
+ scrollFactor: number;
5946
+ showButtons: boolean;
5947
+ resetOnContentChange: boolean;
5948
+ }>;
5906
5949
 
5907
5950
  // @public
5908
5951
  export const SnippetCallbacks: DefineComponent< {}, {
@@ -1,4 +1,4 @@
1
- import Vue from 'vue';
1
+ import { PropType } from 'vue';
2
2
  import { ListItem } from '../utils/types';
3
3
  /**
4
4
  * The `BaseVariableColumnGrid` component is a wrapper of the `BaseGrid` component that listens to
@@ -8,13 +8,16 @@ import { ListItem } from '../utils/types';
8
8
  *
9
9
  * @public
10
10
  */
11
- export default class BaseVariableColumnGrid extends Vue {
11
+ declare const _default: import("vue").DefineComponent<{
12
12
  /**
13
13
  * Animation component that will be used to animate the grid.
14
14
  *
15
15
  * @public
16
16
  */
17
- protected animation: Vue | string;
17
+ animation: {
18
+ type: PropType<string | import("vue").DefineComponent<{}, {}, {}, import("vue").ComponentComputedOptions, import("vue").ComponentMethodOptions, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
19
+ default: string;
20
+ };
18
21
  /**
19
22
  * The list of items to be rendered.
20
23
  *
@@ -22,35 +25,53 @@ export default class BaseVariableColumnGrid extends Vue {
22
25
  *
23
26
  * @public
24
27
  */
25
- protected items?: ListItem[];
28
+ items: PropType<ListItem[]>;
26
29
  /**
27
30
  * The columns to render by default in the grid. This property is used when the user has not
28
31
  * selected any value in the column picker.
29
32
  *
30
33
  * @internal
31
34
  */
32
- protected columns: number;
35
+ columns: {
36
+ type: NumberConstructor;
37
+ default: number;
38
+ };
39
+ }, {
40
+ columnsToRender: import("vue").ComputedRef<number>;
41
+ slots: import("vue/types/v3-setup-context").Slots;
42
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
33
43
  /**
34
- * The number of columns provided by a user interaction.
44
+ * Animation component that will be used to animate the grid.
35
45
  *
36
- * @internal
46
+ * @public
37
47
  */
38
- protected providedColumns: number | null;
48
+ animation: {
49
+ type: PropType<string | import("vue").DefineComponent<{}, {}, {}, import("vue").ComponentComputedOptions, import("vue").ComponentMethodOptions, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
50
+ default: string;
51
+ };
39
52
  /**
40
- * The number of columns to render in the grid.
53
+ * The list of items to be rendered.
41
54
  *
42
- * @returns The number of columns.
55
+ * @remarks The items must have an id property.
43
56
  *
44
- * @internal
57
+ * @public
45
58
  */
46
- protected get columnsToRender(): number;
59
+ items: PropType<ListItem[]>;
47
60
  /**
48
- * Handler to update the number of columns when the user selects a new value.
49
- *
50
- * @param newColumns - The new columns value.
61
+ * The columns to render by default in the grid. This property is used when the user has not
62
+ * selected any value in the column picker.
51
63
  *
52
64
  * @internal
53
65
  */
54
- setColumns(newColumns: number): void;
55
- }
66
+ columns: {
67
+ type: NumberConstructor;
68
+ default: number;
69
+ };
70
+ }>>, {
71
+ animation: string | import("vue").DefineComponent<{}, {}, {}, import("vue").ComponentComputedOptions, import("vue").ComponentMethodOptions, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}> | (import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue").ExtractPropTypes<{}>>, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue").ExtractPropTypes<{}>>> & import("vue").ShallowUnwrapRef<{}> & import("vue/types/v3-component-options").ExtractComputedReturns<import("vue").ComponentComputedOptions> & import("vue").ComponentMethodOptions & import("vue").ComponentCustomProperties & Readonly<import("vue").ExtractPropTypes<{}>>, any, any, any, import("vue").ComponentComputedOptions, import("vue").ComponentMethodOptions> & import("vue/types/v3-component-options").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, import("vue").ComponentComputedOptions, import("vue").ComponentMethodOptions, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, {}> & {
72
+ props: {};
73
+ });
74
+ columns: number;
75
+ }>;
76
+ export default _default;
56
77
  //# sourceMappingURL=base-variable-column-grid.vue?rollup-plugin-vue=script.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-variable-column-grid.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../src/components/base-variable-column-grid.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAcE,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI1C;;;;;;;GAOG;AAMH,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,GAAG;IACrD;;;;OAIG;IAEH,SAAS,CAAC,SAAS,EAAG,GAAG,GAAG,MAAM,CAAC;IAEnC;;;;;;OAMG;IAEH,SAAS,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IAE7B;;;;;OAKG;IAEH,SAAS,CAAC,OAAO,EAAG,MAAM,CAAC;IAE3B;;;;OAIG;IACH,SAAS,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEhD;;;;;;OAMG;IACH,SAAS,KAAK,eAAe,IAAI,MAAM,CAEtC;IAED;;;;;;OAMG;IAEH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;CAGrC"}
1
+ {"version":3,"file":"base-variable-column-grid.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../src/components/base-variable-column-grid.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAcE,OAAO,EAA6B,QAAQ,EAAO,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK1C;;;;;;;GAOG;;IAOC;;;;OAIG;;;;;IAKH;;;;;;OAMG;;IAEH;;;;;OAKG;;;;;;;;;IAtBH;;;;OAIG;;;;;IAKH;;;;;;OAMG;;IAEH;;;;;OAKG;;;;;;;;;;;AA5BP,wBAsEG"}
@@ -17,7 +17,7 @@ import { ExtendedVue } from 'vue/types/vue';
17
17
  * }
18
18
  * ```
19
19
  * @returns Mixin for the component.
20
- *
20
+ * @deprecated Use props.
21
21
  */
22
22
  export declare function dynamicPropsMixin<PropNames extends string>(propNames: PropNames[]): ExtendedVue<Vue, unknown, unknown, unknown, Partial<Record<PropNames, string>>>;
23
23
  //# sourceMappingURL=dynamic-props.mixin.d.ts.map
@@ -1,122 +1,93 @@
1
- import Vue from 'vue';
2
- declare const BaseModal_base: import("vue-class-component/lib/declarations").VueClass<object & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & Record<never, any> & Partial<Record<"contentClass" | "overlayClass", string>> & import("vue").ShallowUnwrapRef<{}>>;
1
+ import Vue, { PropType } from 'vue';
3
2
  /**
4
3
  * Base component with no XPlugin dependencies that serves as a utility for constructing more
5
4
  * complex modals.
6
5
  *
7
6
  * @public
8
7
  */
9
- export default class BaseModal extends BaseModal_base {
10
- /**
11
- * Animation to use for opening/closing the modal. This animation only affects the content.
12
- */
13
- animation: Vue | string;
14
- /**
15
- * Animation to use for the overlay (backdrop) part of the modal. By default, it uses
16
- * a fade transition.
17
- */
18
- overlayAnimation: Vue | string;
19
- /**
20
- * Determines if the modal is open or not.
21
- */
22
- open: boolean;
8
+ declare const _default: import("vue").DefineComponent<{
9
+ /** Determines if the modal is open or not. */
10
+ open: {
11
+ type: BooleanConstructor;
12
+ required: true;
13
+ };
23
14
  /**
24
15
  * Determines if the focused element changes to one inside the modal when it opens. Either the
25
16
  * first element with a positive tabindex or just the first focusable element.
26
17
  */
27
- focusOnOpen: boolean;
18
+ focusOnOpen: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
28
22
  /**
29
23
  * The reference selector of a DOM element to use as reference to position the modal.
30
24
  * This selector can be an ID or a class, if it is a class, it will use the first
31
25
  * element that matches.
32
26
  */
33
- referenceSelector?: string;
34
- /**
35
- * The previous value of the body overflow style.
36
- */
37
- protected previousBodyOverflow: string;
38
- /**
39
- * The previous value of the HTML element overflow style.
40
- */
41
- protected previousHTMLOverflow: string;
42
- /**
43
- * Boolean to delay the leave animation until it has completed.
44
- */
45
- protected isWaitingForLeave: boolean;
46
- /**
47
- * The reference element to use to find the modal's position.
48
- */
49
- protected referenceElement: HTMLElement;
50
- $refs: {
51
- /**
52
- * Reference to the modal element in the DOM.
53
- */
54
- modal: HTMLDivElement;
55
- /**
56
- * Reference to the modal content element in the DOM.
57
- */
58
- modalContent: HTMLDivElement;
27
+ referenceSelector: StringConstructor;
28
+ /** Animation to use for opening/closing the modal.This animation only affects the content. */
29
+ animation: {
30
+ type: PropType<string | import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>>;
31
+ default: () => import("vue").DefineComponent<{}, () => import("vue").VNode | import("vue").VNode[], {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
59
32
  };
60
- protected mounted(): void;
61
- /**
62
- * Updates the position of the modal setting the top of the element depending
63
- * on the selector. The modal will be placed under this selector.
64
- *
65
- * @internal
66
- */
67
- updatePosition(): void;
68
- /**
69
- * Syncs the body to the open state of the modal, adding or removing styles and listeners.
70
- *
71
- * @param isOpen - True when the modal is opened.
72
- * @internal
73
- */
74
- protected syncBody(isOpen: boolean): void;
75
- /**
76
- * Disables the scroll of both the body and the window.
77
- *
78
- * @internal
79
- */
80
- protected disableScroll(): void;
81
33
  /**
82
- * Restores the scroll of both the body and the window.
83
- *
84
- * @internal
85
- */
86
- protected enableScroll(): void;
87
- /**
88
- * Adds listeners to the body element ot detect if the modal should be closed.
89
- *
90
- * @internal
91
- */
92
- protected addBodyListeners(): void;
93
- /**
94
- * Removes the body listeners.
95
- *
96
- * @internal
34
+ * Animation to use for the overlay (backdrop) part of the modal. By default, it uses
35
+ * a fade transition.
97
36
  */
98
- protected removeBodyListeners(): void;
37
+ overlayAnimation: {
38
+ type: PropType<string | import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>>;
39
+ default: () => import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>;
40
+ };
41
+ /** Class inherited by content element. */
42
+ contentClass: StringConstructor;
43
+ /** Class inherited by overlay element. */
44
+ overlayClass: StringConstructor;
45
+ }, {
46
+ emitOverlayClicked: (event: MouseEvent) => void;
47
+ isWaitingForLeave: import("vue").Ref<boolean>;
48
+ modalContentRef: import("vue").Ref<HTMLDivElement | undefined>;
49
+ modalRef: import("vue").Ref<HTMLDivElement | undefined>;
50
+ }, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, ("click:overlay" | "focusin:body")[], string, Readonly<import("vue").ExtractPropTypes<{
51
+ /** Determines if the modal is open or not. */
52
+ open: {
53
+ type: BooleanConstructor;
54
+ required: true;
55
+ };
99
56
  /**
100
- * Emits the `click:overlay` event if the click has been triggered in the overlay layer.
101
- *
102
- * @param event - The click event.
103
- * @internal
57
+ * Determines if the focused element changes to one inside the modal when it opens. Either the
58
+ * first element with a positive tabindex or just the first focusable element.
104
59
  */
105
- protected emitOverlayClicked(event: MouseEvent): void;
60
+ focusOnOpen: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
106
64
  /**
107
- * Emits the `focusin:body` event if a focus event has been triggered outside the modal.
108
- *
109
- * @param event - The focusin event.
110
- * @internal
65
+ * The reference selector of a DOM element to use as reference to position the modal.
66
+ * This selector can be an ID or a class, if it is a class, it will use the first
67
+ * element that matches.
111
68
  */
112
- protected emitFocusInBody(event: FocusEvent): void;
69
+ referenceSelector: StringConstructor;
70
+ /** Animation to use for opening/closing the modal.This animation only affects the content. */
71
+ animation: {
72
+ type: PropType<string | import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>>;
73
+ default: () => import("vue").DefineComponent<{}, () => import("vue").VNode | import("vue").VNode[], {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
74
+ };
113
75
  /**
114
- * Sets the focused element to the first element either the first element with a positive
115
- * tabindex or, if there isn't any, the first focusable element inside the modal.
116
- *
117
- * @internal
76
+ * Animation to use for the overlay (backdrop) part of the modal. By default, it uses
77
+ * a fade transition.
118
78
  */
119
- protected setFocus(): void;
120
- }
121
- export {};
79
+ overlayAnimation: {
80
+ type: PropType<string | import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>>;
81
+ default: () => import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>;
82
+ };
83
+ /** Class inherited by content element. */
84
+ contentClass: StringConstructor;
85
+ /** Class inherited by overlay element. */
86
+ overlayClass: StringConstructor;
87
+ }>>, {
88
+ focusOnOpen: boolean;
89
+ animation: string | import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>;
90
+ overlayAnimation: string | import("vue").VueConstructor<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>>;
91
+ }>;
92
+ export default _default;
122
93
  //# sourceMappingURL=base-modal.vue?rollup-plugin-vue=script.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-modal.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../src/components/modals/base-modal.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAiCE,OAAO,GAAG,MAAM,KAAK,CAAC;;AAStB;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,cAEtC;IACC;;OAEG;IAEI,SAAS,EAAG,GAAG,GAAG,MAAM,CAAC;IAEhC;;;OAGG;IAEI,gBAAgB,EAAG,GAAG,GAAG,MAAM,CAAC;IAEvC;;OAEG;IAEI,IAAI,EAAG,OAAO,CAAC;IAEtB;;;OAGG;IAEI,WAAW,EAAG,OAAO,CAAC;IAE7B;;;;OAIG;IAEI,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAElC;;OAEG;IACH,SAAS,CAAC,oBAAoB,SAAM;IACpC;;OAEG;IACH,SAAS,CAAC,oBAAoB,SAAM;IACpC;;OAEG;IACH,SAAS,CAAC,iBAAiB,UAAS;IACpC;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAG,WAAW,CAAC;IAElC,KAAK,EAAG;QACb;;WAEG;QACH,KAAK,EAAE,cAAc,CAAC;QACtB;;WAEG;QACH,YAAY,EAAE,cAAc,CAAC;KAC9B,CAAC;IAEF,SAAS,CAAC,OAAO,IAAI,IAAI;IA8BzB;;;;;OAKG;IAEH,cAAc,IAAI,IAAI;IAOtB;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAqBzC;;;;OAIG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAM/B;;;;OAIG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI;IAK9B;;;;OAIG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAalC;;;;OAIG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAMrC;;;;;OAKG;IACH,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAIrD;;;;;OAKG;IACH,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAMlD;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,IAAI,IAAI;CAU3B"}
1
+ {"version":3,"file":"base-modal.vue?rollup-plugin-vue=script.d.ts","sourceRoot":"","sources":["../../../../src/components/modals/base-modal.vue?rollup-plugin-vue=script.ts"],"names":[],"mappings":"AAiCE,OAAO,GAAG,EAAE,EAKV,QAAQ,EAGT,MAAM,KAAK,CAAC;AAOb;;;;;GAKG;;IAKC,8CAA8C;;;;;IAK9C;;;OAGG;;;;;IAKH;;;;OAIG;;IAEH,8FAA8F;;;;;IAK9F;;;OAGG;;;;;IAKH,0CAA0C;;IAE1C,0CAA0C;;;gCAqCP,UAAU;;;;;IAvE7C,8CAA8C;;;;;IAK9C;;;OAGG;;;;;IAKH;;;;OAIG;;IAEH,8FAA8F;;;;;IAK9F;;;OAGG;;;;;IAKH,0CAA0C;;IAE1C,0CAA0C;;;;;;;AAtC9C,wBAiMG"}