aio-popup 6.0.4 → 6.1.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 (3) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +12 -12
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -72,6 +72,7 @@ export type AP_highlight = {
72
72
  export type AP_confirm = {
73
73
  title?: string;
74
74
  subtitle?: string;
75
+ text: string;
75
76
  submitText?: string;
76
77
  canselText?: string;
77
78
  onSubmit?: () => Promise<boolean>;
package/index.js CHANGED
@@ -159,7 +159,7 @@ const usePopup = (props) => {
159
159
  const addHighlight = (highlight) => setHighlight(highlight);
160
160
  const removeHighlight = () => setHighlight(undefined);
161
161
  const addConfirm = (obj) => {
162
- let { title, subtitle, submitText = 'Yes', canselText = 'No', onSubmit, onCansel = () => { }, setAttrs = () => { return {}; } } = obj;
162
+ let { title, subtitle, text, submitText = 'Yes', canselText = 'No', onSubmit, onCansel = () => { }, setAttrs = () => { return {}; } } = obj;
163
163
  let config = {
164
164
  position: 'center',
165
165
  setAttrs: (key) => {
@@ -170,7 +170,7 @@ const usePopup = (props) => {
170
170
  return attrs;
171
171
  },
172
172
  header: { title, subtitle },
173
- body: _jsx(_Fragment, { children: "text" }),
173
+ body: _jsx(_Fragment, { children: text }),
174
174
  footer: (_jsxs(_Fragment, { children: [_jsx("button", { type: 'button', onClick: () => { onCansel(); removeModal(); }, children: canselText }), _jsx("button", { type: 'button', className: 'active', onClick: () => __awaiter(void 0, void 0, void 0, function* () {
175
175
  if (!onSubmit) {
176
176
  return;
@@ -718,16 +718,16 @@ function getEasing(highlight) {
718
718
  const { easing } = highlight;
719
719
  var easingNames = [
720
720
  'linear',
721
- 'easeInQuad',
722
- 'easeInSine',
723
- 'easeInCirc',
724
- 'easeInBack',
725
- 'easeOutQuad',
726
- 'easeOutSine',
727
- 'easeOutCirc',
728
- 'easeInOutQuad',
729
- 'easeInOutSine',
730
- 'easeInOutBack',
721
+ 'easeInQuad', //1
722
+ 'easeInSine', //5
723
+ 'easeInCirc', //7
724
+ 'easeInBack', //8
725
+ 'easeOutQuad', //9
726
+ 'easeOutSine', //13
727
+ 'easeOutCirc', //15
728
+ 'easeInOutQuad', //18
729
+ 'easeInOutSine', //22
730
+ 'easeInOutBack', //25
731
731
  'easeOutBounce', //27
732
732
  ];
733
733
  if (typeof easing === 'number') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-popup",
3
- "version": "6.0.4",
3
+ "version": "6.1.0",
4
4
  "description": "handle all types of popup and modals in react",
5
5
  "main": "index.js",
6
6
  "scripts": {