@watermarkinsights/ripple-react 3.25.0 → 3.26.0-12

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 (35) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +31 -31
  3. package/dist/components/index.d.ts +1 -1
  4. package/dist/components/index.js +1 -1
  5. package/dist/components/stencil-generated/index.d.ts +1 -1
  6. package/dist/components/stencil-generated/index.js +28 -28
  7. package/dist/components.d.ts +40 -40
  8. package/dist/components.js +42 -42
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +3 -3
  11. package/dist/react-component-lib/ReactProps.d.ts +3 -3
  12. package/dist/react-component-lib/createComponent.d.ts +10 -10
  13. package/dist/react-component-lib/createComponent.js +105 -105
  14. package/dist/react-component-lib/createComponent.js.map +1 -1
  15. package/dist/react-component-lib/createControllerComponent.d.ts +43 -43
  16. package/dist/react-component-lib/createControllerComponent.js +145 -145
  17. package/dist/react-component-lib/createOverlayComponent.d.ts +21 -21
  18. package/dist/react-component-lib/createOverlayComponent.js +188 -199
  19. package/dist/react-component-lib/createOverlayComponent.js.map +1 -1
  20. package/dist/react-component-lib/index.d.ts +2 -2
  21. package/dist/react-component-lib/index.js +2 -2
  22. package/dist/react-component-lib/interfaces.d.ts +29 -29
  23. package/dist/react-component-lib/utils/attachEventProps.d.ts +8 -8
  24. package/dist/react-component-lib/utils/attachEventProps.js +78 -78
  25. package/dist/react-component-lib/utils/attachProps.d.ts +12 -12
  26. package/dist/react-component-lib/utils/attachProps.js +98 -98
  27. package/dist/react-component-lib/utils/case.d.ts +2 -2
  28. package/dist/react-component-lib/utils/case.js +8 -10
  29. package/dist/react-component-lib/utils/case.js.map +1 -1
  30. package/dist/react-component-lib/utils/dev.d.ts +2 -2
  31. package/dist/react-component-lib/utils/dev.js +12 -12
  32. package/dist/react-component-lib/utils/index.d.ts +10 -10
  33. package/dist/react-component-lib/utils/index.js +46 -48
  34. package/dist/react-component-lib/utils/index.js.map +1 -1
  35. package/package.json +48 -48
@@ -1,200 +1,189 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- var __generator = (this && this.__generator) || function (thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
- function verb(n) { return function (v) { return step([n, v]); }; }
38
- function step(op) {
39
- if (f) throw new TypeError("Generator is already executing.");
40
- while (_) try {
41
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
- if (y = 0, t) op = [op[0] & 2, t.value];
43
- switch (op[0]) {
44
- case 0: case 1: t = op; break;
45
- case 4: _.label++; return { value: op[1], done: false };
46
- case 5: _.label++; y = op[1]; op = [0]; continue;
47
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
- default:
49
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
- if (t[2]) _.ops.pop();
54
- _.trys.pop(); continue;
55
- }
56
- op = body.call(thisArg, _);
57
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
- }
60
- };
61
- var __rest = (this && this.__rest) || function (s, e) {
62
- var t = {};
63
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
64
- t[p] = s[p];
65
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
66
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
67
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
68
- t[p[i]] = s[p[i]];
69
- }
70
- return t;
71
- };
72
- import React from "react";
73
- import ReactDOM from "react-dom";
74
- import { attachProps, dashToPascalCase, defineCustomElement, setRef, } from "./utils";
75
- export var createOverlayComponent = function (tagName, controller, customElement) {
76
- defineCustomElement(tagName, customElement);
77
- var displayName = dashToPascalCase(tagName);
78
- var didDismissEventName = "on" + displayName + "DidDismiss";
79
- var didPresentEventName = "on" + displayName + "DidPresent";
80
- var willDismissEventName = "on" + displayName + "WillDismiss";
81
- var willPresentEventName = "on" + displayName + "WillPresent";
82
- var isDismissing = false;
83
- var Overlay = /** @class */ (function (_super) {
84
- __extends(Overlay, _super);
85
- function Overlay(props) {
86
- var _this = _super.call(this, props) || this;
87
- if (typeof document !== "undefined") {
88
- _this.el = document.createElement("div");
89
- }
90
- _this.handleDismiss = _this.handleDismiss.bind(_this);
91
- return _this;
92
- }
93
- Object.defineProperty(Overlay, "displayName", {
94
- get: function () {
95
- return displayName;
96
- },
97
- enumerable: false,
98
- configurable: true
99
- });
100
- Overlay.prototype.componentDidMount = function () {
101
- if (this.props.isOpen) {
102
- this.present();
103
- }
104
- };
105
- Overlay.prototype.componentWillUnmount = function () {
106
- if (this.overlay) {
107
- this.overlay.dismiss();
108
- }
109
- };
110
- Overlay.prototype.handleDismiss = function (event) {
111
- if (this.props.onDidDismiss) {
112
- this.props.onDidDismiss(event);
113
- }
114
- setRef(this.props.forwardedRef, null);
115
- };
116
- Overlay.prototype.shouldComponentUpdate = function (nextProps) {
117
- // Check if the overlay component is about to dismiss
118
- if (this.overlay &&
119
- nextProps.isOpen !== this.props.isOpen &&
120
- nextProps.isOpen === false) {
121
- isDismissing = true;
122
- }
123
- return true;
124
- };
125
- Overlay.prototype.componentDidUpdate = function (prevProps) {
126
- return __awaiter(this, void 0, void 0, function () {
127
- return __generator(this, function (_a) {
128
- switch (_a.label) {
129
- case 0:
130
- if (this.overlay) {
131
- attachProps(this.overlay, this.props, prevProps);
132
- }
133
- if (prevProps.isOpen !== this.props.isOpen &&
134
- this.props.isOpen === true) {
135
- this.present(prevProps);
136
- }
137
- if (!(this.overlay &&
138
- prevProps.isOpen !== this.props.isOpen &&
139
- this.props.isOpen === false)) return [3 /*break*/, 2];
140
- return [4 /*yield*/, this.overlay.dismiss()];
141
- case 1:
142
- _a.sent();
143
- isDismissing = false;
144
- /**
145
- * Now that the overlay is dismissed
146
- * we need to render again so that any
147
- * inner components will be unmounted
148
- */
149
- this.forceUpdate();
150
- _a.label = 2;
151
- case 2: return [2 /*return*/];
152
- }
153
- });
154
- });
155
- };
156
- Overlay.prototype.present = function (prevProps) {
157
- return __awaiter(this, void 0, void 0, function () {
158
- var _a, children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, cProps, elementProps, _b;
159
- var _c;
160
- var _this = this;
161
- return __generator(this, function (_d) {
162
- switch (_d.label) {
163
- case 0:
164
- _a = this.props, children = _a.children, isOpen = _a.isOpen, onDidDismiss = _a.onDidDismiss, onDidPresent = _a.onDidPresent, onWillDismiss = _a.onWillDismiss, onWillPresent = _a.onWillPresent, cProps = __rest(_a, ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"]);
165
- elementProps = __assign(__assign({}, cProps), (_c = { ref: this.props.forwardedRef }, _c[didDismissEventName] = this.handleDismiss, _c[didPresentEventName] = function (e) {
166
- return _this.props.onDidPresent && _this.props.onDidPresent(e);
167
- }, _c[willDismissEventName] = function (e) {
168
- return _this.props.onWillDismiss && _this.props.onWillDismiss(e);
169
- }, _c[willPresentEventName] = function (e) {
170
- return _this.props.onWillPresent && _this.props.onWillPresent(e);
171
- }, _c));
172
- _b = this;
173
- return [4 /*yield*/, controller.create(__assign(__assign({}, elementProps), { component: this.el, componentProps: {} }))];
174
- case 1:
175
- _b.overlay = _d.sent();
176
- setRef(this.props.forwardedRef, this.overlay);
177
- attachProps(this.overlay, elementProps, prevProps);
178
- return [4 /*yield*/, this.overlay.present()];
179
- case 2:
180
- _d.sent();
181
- return [2 /*return*/];
182
- }
183
- });
184
- });
185
- };
186
- Overlay.prototype.render = function () {
187
- /**
188
- * Continue to render the component even when
189
- * overlay is dismissing otherwise component
190
- * will be hidden before animation is done.
191
- */
192
- return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
193
- };
194
- return Overlay;
195
- }(React.Component));
196
- return React.forwardRef(function (props, ref) {
197
- return React.createElement(Overlay, __assign({}, props, { forwardedRef: ref }));
198
- });
199
- };
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __assign = (this && this.__assign) || function () {
15
+ __assign = Object.assign || function(t) {
16
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
17
+ s = arguments[i];
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
+ t[p] = s[p];
20
+ }
21
+ return t;
22
+ };
23
+ return __assign.apply(this, arguments);
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (_) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ var __rest = (this && this.__rest) || function (s, e) {
62
+ var t = {};
63
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
64
+ t[p] = s[p];
65
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
66
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
67
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
68
+ t[p[i]] = s[p[i]];
69
+ }
70
+ return t;
71
+ };
72
+ import React from 'react';
73
+ import ReactDOM from 'react-dom';
74
+ import { attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils';
75
+ export var createOverlayComponent = function (tagName, controller, customElement) {
76
+ defineCustomElement(tagName, customElement);
77
+ var displayName = dashToPascalCase(tagName);
78
+ var didDismissEventName = "on" + displayName + "DidDismiss";
79
+ var didPresentEventName = "on" + displayName + "DidPresent";
80
+ var willDismissEventName = "on" + displayName + "WillDismiss";
81
+ var willPresentEventName = "on" + displayName + "WillPresent";
82
+ var isDismissing = false;
83
+ var Overlay = /** @class */ (function (_super) {
84
+ __extends(Overlay, _super);
85
+ function Overlay(props) {
86
+ var _this = _super.call(this, props) || this;
87
+ if (typeof document !== 'undefined') {
88
+ _this.el = document.createElement('div');
89
+ }
90
+ _this.handleDismiss = _this.handleDismiss.bind(_this);
91
+ return _this;
92
+ }
93
+ Object.defineProperty(Overlay, "displayName", {
94
+ get: function () {
95
+ return displayName;
96
+ },
97
+ enumerable: false,
98
+ configurable: true
99
+ });
100
+ Overlay.prototype.componentDidMount = function () {
101
+ if (this.props.isOpen) {
102
+ this.present();
103
+ }
104
+ };
105
+ Overlay.prototype.componentWillUnmount = function () {
106
+ if (this.overlay) {
107
+ this.overlay.dismiss();
108
+ }
109
+ };
110
+ Overlay.prototype.handleDismiss = function (event) {
111
+ if (this.props.onDidDismiss) {
112
+ this.props.onDidDismiss(event);
113
+ }
114
+ setRef(this.props.forwardedRef, null);
115
+ };
116
+ Overlay.prototype.shouldComponentUpdate = function (nextProps) {
117
+ // Check if the overlay component is about to dismiss
118
+ if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {
119
+ isDismissing = true;
120
+ }
121
+ return true;
122
+ };
123
+ Overlay.prototype.componentDidUpdate = function (prevProps) {
124
+ return __awaiter(this, void 0, void 0, function () {
125
+ return __generator(this, function (_a) {
126
+ switch (_a.label) {
127
+ case 0:
128
+ if (this.overlay) {
129
+ attachProps(this.overlay, this.props, prevProps);
130
+ }
131
+ if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
132
+ this.present(prevProps);
133
+ }
134
+ if (!(this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false)) return [3 /*break*/, 2];
135
+ return [4 /*yield*/, this.overlay.dismiss()];
136
+ case 1:
137
+ _a.sent();
138
+ isDismissing = false;
139
+ /**
140
+ * Now that the overlay is dismissed
141
+ * we need to render again so that any
142
+ * inner components will be unmounted
143
+ */
144
+ this.forceUpdate();
145
+ _a.label = 2;
146
+ case 2: return [2 /*return*/];
147
+ }
148
+ });
149
+ });
150
+ };
151
+ Overlay.prototype.present = function (prevProps) {
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var _a, children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, cProps, elementProps, _b;
154
+ var _c;
155
+ var _this = this;
156
+ return __generator(this, function (_d) {
157
+ switch (_d.label) {
158
+ case 0:
159
+ _a = this.props, children = _a.children, isOpen = _a.isOpen, onDidDismiss = _a.onDidDismiss, onDidPresent = _a.onDidPresent, onWillDismiss = _a.onWillDismiss, onWillPresent = _a.onWillPresent, cProps = __rest(_a, ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"]);
160
+ elementProps = __assign(__assign({}, cProps), (_c = { ref: this.props.forwardedRef }, _c[didDismissEventName] = this.handleDismiss, _c[didPresentEventName] = function (e) { return _this.props.onDidPresent && _this.props.onDidPresent(e); }, _c[willDismissEventName] = function (e) { return _this.props.onWillDismiss && _this.props.onWillDismiss(e); }, _c[willPresentEventName] = function (e) { return _this.props.onWillPresent && _this.props.onWillPresent(e); }, _c));
161
+ _b = this;
162
+ return [4 /*yield*/, controller.create(__assign(__assign({}, elementProps), { component: this.el, componentProps: {} }))];
163
+ case 1:
164
+ _b.overlay = _d.sent();
165
+ setRef(this.props.forwardedRef, this.overlay);
166
+ attachProps(this.overlay, elementProps, prevProps);
167
+ return [4 /*yield*/, this.overlay.present()];
168
+ case 2:
169
+ _d.sent();
170
+ return [2 /*return*/];
171
+ }
172
+ });
173
+ });
174
+ };
175
+ Overlay.prototype.render = function () {
176
+ /**
177
+ * Continue to render the component even when
178
+ * overlay is dismissing otherwise component
179
+ * will be hidden before animation is done.
180
+ */
181
+ return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
182
+ };
183
+ return Overlay;
184
+ }(React.Component));
185
+ return React.forwardRef(function (props, ref) {
186
+ return React.createElement(Overlay, __assign({}, props, { forwardedRef: ref }));
187
+ });
188
+ };
200
189
  //# sourceMappingURL=createOverlayComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOverlayComponent.js","sourceRoot":"","sources":["../../src/react-component-lib/createOverlayComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AAGjC,OAAO,EAEL,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,MAAM,GACP,MAAM,SAAS,CAAC;AAgBjB,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAIpC,OAAe,EACf,UAA8D,EAC9D,aAAmB;IAEnB,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAE5C,IAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAM,mBAAmB,GAAG,OAAK,WAAW,eAAY,CAAC;IACzD,IAAM,mBAAmB,GAAG,OAAK,WAAW,eAAY,CAAC;IACzD,IAAM,oBAAoB,GAAG,OAAK,WAAW,gBAAa,CAAC;IAC3D,IAAM,oBAAoB,GAAG,OAAK,WAAW,gBAAa,CAAC;IAO3D,IAAI,YAAY,GAAG,KAAK,CAAC;IAEzB;QAAsB,2BAAsB;QAI1C,iBAAY,KAAY;YAAxB,YACE,kBAAM,KAAK,CAAC,SAKb;YAJC,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;gBACnC,KAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;aACzC;YACD,KAAI,CAAC,aAAa,GAAG,KAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;;QACrD,CAAC;QAED,sBAAW,sBA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,CAAC"}
@@ -1,2 +1,2 @@
1
- export { createReactComponent } from './createComponent';
2
- export { createOverlayComponent } from './createOverlayComponent';
1
+ export { createReactComponent } from './createComponent';
2
+ export { createOverlayComponent } from './createOverlayComponent';
@@ -1,3 +1,3 @@
1
- export { createReactComponent } from './createComponent';
2
- export { createOverlayComponent } from './createOverlayComponent';
1
+ export { createReactComponent } from './createComponent';
2
+ export { createOverlayComponent } from './createOverlayComponent';
3
3
  //# sourceMappingURL=index.js.map
@@ -1,29 +1,29 @@
1
- export interface EventEmitter<T = any> {
2
- emit: (data?: T) => CustomEvent<T>;
3
- }
4
- export interface StyleReactProps {
5
- class?: string;
6
- className?: string;
7
- style?: {
8
- [key: string]: any;
9
- };
10
- }
11
- export interface OverlayEventDetail<T = any> {
12
- data?: T;
13
- role?: string;
14
- }
15
- export interface OverlayInterface {
16
- el: HTMLElement;
17
- animated: boolean;
18
- keyboardClose: boolean;
19
- overlayIndex: number;
20
- presented: boolean;
21
- enterAnimation?: any;
22
- leaveAnimation?: any;
23
- didPresent: EventEmitter<void>;
24
- willPresent: EventEmitter<void>;
25
- willDismiss: EventEmitter<OverlayEventDetail>;
26
- didDismiss: EventEmitter<OverlayEventDetail>;
27
- present(): Promise<void>;
28
- dismiss(data?: any, role?: string): Promise<boolean>;
29
- }
1
+ export interface EventEmitter<T = any> {
2
+ emit: (data?: T) => CustomEvent<T>;
3
+ }
4
+ export interface StyleReactProps {
5
+ class?: string;
6
+ className?: string;
7
+ style?: {
8
+ [key: string]: any;
9
+ };
10
+ }
11
+ export interface OverlayEventDetail<T = any> {
12
+ data?: T;
13
+ role?: string;
14
+ }
15
+ export interface OverlayInterface {
16
+ el: HTMLElement;
17
+ animated: boolean;
18
+ keyboardClose: boolean;
19
+ overlayIndex: number;
20
+ presented: boolean;
21
+ enterAnimation?: any;
22
+ leaveAnimation?: any;
23
+ didPresent: EventEmitter<void>;
24
+ willPresent: EventEmitter<void>;
25
+ willDismiss: EventEmitter<OverlayEventDetail>;
26
+ didDismiss: EventEmitter<OverlayEventDetail>;
27
+ present(): Promise<void>;
28
+ dismiss(data?: any, role?: string): Promise<boolean>;
29
+ }
@@ -1,8 +1,8 @@
1
- export declare function attachEventProps(node: HTMLElement, newProps: any, oldProps?: any): void;
2
- export declare function getClassName(classList: DOMTokenList, newProps: any, oldProps: any): string;
3
- /**
4
- * Checks if an event is supported in the current execution environment.
5
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
6
- */
7
- export declare function isCoveredByReact(eventNameSuffix: string, doc?: Document): boolean;
8
- export declare function syncEvent(node: Element, eventName: string, newEventHandler: (e: Event) => any): void;
1
+ export declare function attachEventProps(node: HTMLElement, newProps: any, oldProps?: any): void;
2
+ export declare function getClassName(classList: DOMTokenList, newProps: any, oldProps: any): string;
3
+ /**
4
+ * Checks if an event is supported in the current execution environment.
5
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
6
+ */
7
+ export declare function isCoveredByReact(eventNameSuffix: string, doc?: Document): boolean;
8
+ export declare function syncEvent(node: Element, eventName: string, newEventHandler: (e: Event) => any): void;