aio-popup 6.0.4 → 6.2.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 (4) hide show
  1. package/index.css +5 -5
  2. package/index.d.ts +145 -144
  3. package/index.js +802 -802
  4. package/package.json +1 -1
package/index.css CHANGED
@@ -64,7 +64,7 @@
64
64
  .aio-popup-position-top>.aio-popup {
65
65
  width: 100%;
66
66
  max-height: 90vh;
67
- transform: translateY(0px);
67
+ transform: none;
68
68
  }
69
69
 
70
70
  /**********position (bottom)***********/
@@ -82,7 +82,7 @@
82
82
  width: 100%;
83
83
  bottom: 0;
84
84
  opacity: 1;
85
- transform: scaleY(1);
85
+ transform: none;
86
86
  }
87
87
 
88
88
  /**********position (left)*************/
@@ -97,7 +97,7 @@
97
97
  .aio-popup-position-left>.aio-popup {
98
98
  height: 100%;
99
99
  max-width: 90vh;
100
- transform: translateX(0px);
100
+ transform: none;
101
101
  }
102
102
 
103
103
  /**********position (right)************/
@@ -112,7 +112,7 @@
112
112
  .aio-popup-position-right>.aio-popup {
113
113
  height: 100%;
114
114
  max-width: 90vh;
115
- transform: translateX(0px) scaleX(1);
115
+ transform: none;
116
116
  ;
117
117
  }
118
118
 
@@ -136,7 +136,7 @@
136
136
  width: fit-content;
137
137
  opacity: 1;
138
138
  max-height: 100vh;
139
- transform: translateY(0px);
139
+ transform: none;
140
140
  transform-origin: top;
141
141
  }
142
142
 
package/index.d.ts CHANGED
@@ -1,144 +1,145 @@
1
- import { ReactNode } from 'react';
2
- import './index.css';
3
- export type AP_position = 'fullscreen' | 'center' | 'popover' | 'left' | 'right' | 'top' | 'bottom';
4
- export type AP_attrsKey = 'backdrop' | 'modal' | 'header' | 'body' | 'footer';
5
- export type AP_header = ((p: {
6
- removeModal: () => void;
7
- state: any;
8
- setState: any;
9
- }) => ReactNode) | {
10
- title?: string;
11
- subtitle?: string;
12
- before?: ReactNode;
13
- after?: ReactNode;
14
- onClose?: boolean | ((p: {
15
- state: any;
16
- setState: (state: any) => void;
17
- }) => void);
18
- };
19
- type AP_setAttrs = (mode: AP_attrsKey) => any;
20
- export type AP_modal = {
21
- getTarget?: () => any;
22
- limitTo?: string;
23
- rtl?: boolean;
24
- id?: string;
25
- onClose?: boolean | (() => void);
26
- position?: AP_position;
27
- header?: AP_header;
28
- state?: any;
29
- footer?: ReactNode;
30
- body: ReactNode;
31
- animate?: boolean;
32
- fitHorizontal?: boolean;
33
- setAttrs?: AP_setAttrs;
34
- };
35
- export type AP_alert = {
36
- rtl?: boolean;
37
- icon?: false | ReactNode;
38
- type: 'success' | 'error' | 'warning' | 'info';
39
- title?: ReactNode;
40
- text: string;
41
- time?: number;
42
- className?: string;
43
- closeText?: string;
44
- animate?: boolean;
45
- onClose?: boolean | (() => void);
46
- };
47
- export type AP_snackebar = {
48
- id?: string;
49
- text: string;
50
- subtext?: string;
51
- icon?: ReactNode;
52
- time?: number;
53
- action?: {
54
- text: string;
55
- onClick: () => void;
56
- };
57
- type: 'success' | 'error' | 'warning' | 'info';
58
- align?: ['left' | 'center' | 'right', 'top' | 'bottom'];
59
- onClose?: boolean | (() => void);
60
- attrs?: any;
61
- };
62
- export type AP_highlight = {
63
- dom: any;
64
- html: ReactNode;
65
- onClick?: () => void;
66
- mouseAccess?: boolean;
67
- attrs?: any;
68
- padding?: number;
69
- easing?: number | AP_easing;
70
- duration?: number;
71
- };
72
- export type AP_confirm = {
73
- title?: string;
74
- subtitle?: string;
75
- submitText?: string;
76
- canselText?: string;
77
- onSubmit?: () => Promise<boolean>;
78
- onCansel?: () => void;
79
- setAttrs?: AP_setAttrs;
80
- };
81
- export type AP_prompt = {
82
- title?: string;
83
- subtitle?: string;
84
- submitText?: string;
85
- canselText?: string;
86
- onSubmit?: (text: string) => Promise<boolean>;
87
- onCansel?: () => void;
88
- setAttrs?: AP_setAttrs;
89
- };
90
- type AP_removeModal = (arg?: string) => void;
91
- type AP_addAlert = (p: AP_alert) => void;
92
- type AP_addSnackebar = (item: AP_snackebar) => void;
93
- type AP_addModal = (o: AP_modal) => void;
94
- type AP_addHighlight = (highlight: AP_highlight) => void;
95
- type AP_removeHighlight = () => void;
96
- type AP_getModals = () => AP_modal[];
97
- type AP_addConfirm = (item: AP_confirm) => void;
98
- type AP_addPrompt = (item: AP_prompt) => void;
99
- type AP_render = (caller?: string) => ReactNode;
100
- export type AP_usePopup = {
101
- addAlert: AP_addAlert;
102
- addSnackebar: AP_addSnackebar;
103
- removeModal: AP_removeModal;
104
- addModal: AP_addModal;
105
- getModals: AP_getModals;
106
- addHighlight: AP_addHighlight;
107
- removeHighlight: AP_removeHighlight;
108
- render: AP_render;
109
- addConfirm: AP_addConfirm;
110
- addPrompt: AP_addPrompt;
111
- };
112
- export type I_usePopup = {
113
- addAlert: AP_addAlert;
114
- addSnackebar: AP_addSnackebar;
115
- removeModal: AP_removeModal;
116
- addModal: AP_addModal;
117
- getModals: AP_getModals;
118
- addHighlight: AP_addHighlight;
119
- removeHighlight: AP_removeHighlight;
120
- render: AP_render;
121
- addConfirm: AP_addConfirm;
122
- addPrompt: AP_addPrompt;
123
- portal: () => void;
124
- };
125
- declare const usePopup: (props?: {
126
- rtl?: boolean;
127
- id?: string;
128
- }) => I_usePopup;
129
- export default usePopup;
130
- export type AP_SnackebarItem = {
131
- item: AP_snackebar;
132
- index: number;
133
- };
134
- export declare function Alert(props: AP_alert): void;
135
- type AP_easing = 'linear' | 'easeInQuad' | 'easeInCubic' | 'easeInQuart' | 'easeInQuint' | 'easeInSine' | 'easeInExpo' | 'easeInCirc' | 'easeInBack' | 'easeOutQuad' | 'easeOutCubic' | 'easeOutQuart' | 'easeOutQuint' | 'easeOutSine' | 'easeOutExpo' | 'easeOutCirc' | 'easeOutBack' | 'easeInBounce' | 'easeInOutQuad' | 'easeInOutCubic' | 'easeInOutQuart' | 'easeInOutQuint' | 'easeInOutSine' | 'easeInOutExpo' | 'easeInOutCirc' | 'easeInOutBack' | 'easeInOutBounce' | 'easeOutBounce' | 'easeOutInQuad' | 'easeOutInCubic' | 'easeOutInQuart' | 'easeOutInQuint' | 'easeOutInSine' | 'easeOutInExpo' | 'easeOutInCirc' | 'easeOutInBack' | 'easeOutInBounce';
136
- export declare class Loading {
137
- loader: any;
138
- constructor(loader?: string);
139
- private getLoader_0;
140
- private getLoaderItem_0;
141
- getLoader: (id: string) => string;
142
- show: (id: string, parentSelector?: string) => void;
143
- hide: (id: string) => void;
144
- }
1
+ import { ReactNode } from 'react';
2
+ import './index.css';
3
+ export type AP_position = 'fullscreen' | 'center' | 'popover' | 'left' | 'right' | 'top' | 'bottom';
4
+ export type AP_attrsKey = 'backdrop' | 'modal' | 'header' | 'body' | 'footer';
5
+ export type AP_header = ((p: {
6
+ removeModal: () => void;
7
+ state: any;
8
+ setState: any;
9
+ }) => ReactNode) | {
10
+ title?: string;
11
+ subtitle?: string;
12
+ before?: ReactNode;
13
+ after?: ReactNode;
14
+ onClose?: boolean | ((p: {
15
+ state: any;
16
+ setState: (state: any) => void;
17
+ }) => void);
18
+ };
19
+ type AP_setAttrs = (mode: AP_attrsKey) => any;
20
+ export type AP_modal = {
21
+ getTarget?: () => any;
22
+ limitTo?: string;
23
+ rtl?: boolean;
24
+ id?: string;
25
+ onClose?: boolean | (() => void);
26
+ position?: AP_position;
27
+ header?: AP_header;
28
+ state?: any;
29
+ footer?: ReactNode;
30
+ body: ReactNode;
31
+ animate?: boolean;
32
+ fitHorizontal?: boolean;
33
+ setAttrs?: AP_setAttrs;
34
+ };
35
+ export type AP_alert = {
36
+ rtl?: boolean;
37
+ icon?: false | ReactNode;
38
+ type: 'success' | 'error' | 'warning' | 'info';
39
+ title?: ReactNode;
40
+ text: string;
41
+ time?: number;
42
+ className?: string;
43
+ closeText?: string;
44
+ animate?: boolean;
45
+ onClose?: boolean | (() => void);
46
+ };
47
+ export type AP_snackebar = {
48
+ id?: string;
49
+ text: string;
50
+ subtext?: string;
51
+ icon?: ReactNode;
52
+ time?: number;
53
+ action?: {
54
+ text: string;
55
+ onClick: () => void;
56
+ };
57
+ type: 'success' | 'error' | 'warning' | 'info';
58
+ align?: ['left' | 'center' | 'right', 'top' | 'bottom'];
59
+ onClose?: boolean | (() => void);
60
+ attrs?: any;
61
+ };
62
+ export type AP_highlight = {
63
+ dom: any;
64
+ html: ReactNode;
65
+ onClick?: () => void;
66
+ mouseAccess?: boolean;
67
+ attrs?: any;
68
+ padding?: number;
69
+ easing?: number | AP_easing;
70
+ duration?: number;
71
+ };
72
+ export type AP_confirm = {
73
+ title?: string;
74
+ subtitle?: string;
75
+ text: string;
76
+ submitText?: string;
77
+ canselText?: string;
78
+ onSubmit?: () => Promise<boolean>;
79
+ onCansel?: () => void;
80
+ setAttrs?: AP_setAttrs;
81
+ };
82
+ export type AP_prompt = {
83
+ title?: string;
84
+ subtitle?: string;
85
+ submitText?: string;
86
+ canselText?: string;
87
+ onSubmit?: (text: string) => Promise<boolean>;
88
+ onCansel?: () => void;
89
+ setAttrs?: AP_setAttrs;
90
+ };
91
+ type AP_removeModal = (arg?: string) => void;
92
+ type AP_addAlert = (p: AP_alert) => void;
93
+ type AP_addSnackebar = (item: AP_snackebar) => void;
94
+ type AP_addModal = (o: AP_modal) => void;
95
+ type AP_addHighlight = (highlight: AP_highlight) => void;
96
+ type AP_removeHighlight = () => void;
97
+ type AP_getModals = () => AP_modal[];
98
+ type AP_addConfirm = (item: AP_confirm) => void;
99
+ type AP_addPrompt = (item: AP_prompt) => void;
100
+ type AP_render = (caller?: string) => ReactNode;
101
+ export type AP_usePopup = {
102
+ addAlert: AP_addAlert;
103
+ addSnackebar: AP_addSnackebar;
104
+ removeModal: AP_removeModal;
105
+ addModal: AP_addModal;
106
+ getModals: AP_getModals;
107
+ addHighlight: AP_addHighlight;
108
+ removeHighlight: AP_removeHighlight;
109
+ render: AP_render;
110
+ addConfirm: AP_addConfirm;
111
+ addPrompt: AP_addPrompt;
112
+ };
113
+ export type I_usePopup = {
114
+ addAlert: AP_addAlert;
115
+ addSnackebar: AP_addSnackebar;
116
+ removeModal: AP_removeModal;
117
+ addModal: AP_addModal;
118
+ getModals: AP_getModals;
119
+ addHighlight: AP_addHighlight;
120
+ removeHighlight: AP_removeHighlight;
121
+ render: AP_render;
122
+ addConfirm: AP_addConfirm;
123
+ addPrompt: AP_addPrompt;
124
+ portal: () => void;
125
+ };
126
+ declare const usePopup: (props?: {
127
+ rtl?: boolean;
128
+ id?: string;
129
+ }) => I_usePopup;
130
+ export default usePopup;
131
+ export type AP_SnackebarItem = {
132
+ item: AP_snackebar;
133
+ index: number;
134
+ };
135
+ export declare function Alert(props: AP_alert): void;
136
+ type AP_easing = 'linear' | 'easeInQuad' | 'easeInCubic' | 'easeInQuart' | 'easeInQuint' | 'easeInSine' | 'easeInExpo' | 'easeInCirc' | 'easeInBack' | 'easeOutQuad' | 'easeOutCubic' | 'easeOutQuart' | 'easeOutQuint' | 'easeOutSine' | 'easeOutExpo' | 'easeOutCirc' | 'easeOutBack' | 'easeInBounce' | 'easeInOutQuad' | 'easeInOutCubic' | 'easeInOutQuart' | 'easeInOutQuint' | 'easeInOutSine' | 'easeInOutExpo' | 'easeInOutCirc' | 'easeInOutBack' | 'easeInOutBounce' | 'easeOutBounce' | 'easeOutInQuad' | 'easeOutInCubic' | 'easeOutInQuart' | 'easeOutInQuint' | 'easeOutInSine' | 'easeOutInExpo' | 'easeOutInCirc' | 'easeOutInBack' | 'easeOutInBounce';
137
+ export declare class Loading {
138
+ loader: any;
139
+ constructor(loader?: string);
140
+ private getLoader_0;
141
+ private getLoaderItem_0;
142
+ getLoader: (id: string) => string;
143
+ show: (id: string, parentSelector?: string) => void;
144
+ hide: (id: string) => void;
145
+ }