@webiny/ui 5.29.0 → 5.30.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/AutoComplete/MultiAutoComplete.js +2 -0
- package/AutoComplete/MultiAutoComplete.js.map +1 -1
- package/AutoComplete/utils.d.ts +1 -1
- package/Button/Button.js +3 -1
- package/Button/Button.js.map +1 -1
- package/Button/Button.styles.d.ts +6 -0
- package/Button/Button.styles.js +15 -0
- package/Button/Button.styles.js.map +1 -0
- package/Chips/Chips.stories.js +10 -6
- package/Chips/Chips.stories.js.map +1 -1
- package/Chips/index.d.ts +0 -1
- package/Chips/index.js +0 -13
- package/Chips/index.js.map +1 -1
- package/Chips/styles.js +7 -5
- package/Chips/styles.js.map +1 -1
- package/Dialog/Dialog.js +4 -2
- package/Dialog/Dialog.js.map +1 -1
- package/DynamicFieldset/Fieldset.js +4 -1
- package/DynamicFieldset/Fieldset.js.map +1 -1
- package/Grid/Grid.js +1 -1
- package/Grid/Grid.js.map +1 -1
- package/ImageEditor/ImageEditor.js +2 -0
- package/ImageEditor/ImageEditor.js.map +1 -1
- package/Input/Input.d.ts +1 -0
- package/Input/Input.js +13 -1
- package/Input/Input.js.map +1 -1
- package/List/DataList/DataList.js.map +1 -1
- package/List/DataList/DataListWithSections.d.ts +45 -0
- package/List/DataList/DataListWithSections.js +356 -0
- package/List/DataList/DataListWithSections.js.map +1 -0
- package/List/DataList/index.d.ts +1 -0
- package/List/DataList/index.js +16 -0
- package/List/DataList/index.js.map +1 -1
- package/List/List.d.ts +1 -1
- package/List/List.js.map +1 -1
- package/List/index.d.ts +1 -1
- package/List/index.js +14 -0
- package/List/index.js.map +1 -1
- package/Menu/Menu.d.ts +0 -2
- package/Menu/Menu.js +1 -4
- package/Menu/Menu.js.map +1 -1
- package/Select/Select.js +2 -1
- package/Select/Select.js.map +1 -1
- package/Tabs/Tab.js +23 -10
- package/Tabs/Tab.js.map +1 -1
- package/Tabs/Tabs.d.ts +37 -21
- package/Tabs/Tabs.js +115 -142
- package/Tabs/Tabs.js.map +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/TopAppBar/TopAppBarActionItem.d.ts +1 -1
- package/TopAppBar/TopAppBarActionItem.js.map +1 -1
- package/TopAppBar/TopAppBarNavigationIcon.d.ts +1 -1
- package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -1
- package/package.json +32 -44
- package/styles.scss +1 -1
- package/Chips/ChipIcon.d.ts +0 -4
- package/Chips/ChipIcon.js +0 -22
- package/Chips/ChipIcon.js.map +0 -1
- package/rmwc/base/LICENSE +0 -21
- package/rmwc/base/README.md +0 -3
- package/rmwc/base/code/component.d.ts +0 -18
- package/rmwc/base/code/component.js +0 -163
- package/rmwc/base/code/foundation-component.d.ts +0 -79
- package/rmwc/base/code/foundation-component.js +0 -354
- package/rmwc/base/code/index.d.ts +0 -16
- package/rmwc/base/code/index.js +0 -25
- package/rmwc/base/code/test-polyfill.d.ts +0 -3
- package/rmwc/base/code/test-polyfill.js +0 -33
- package/rmwc/base/code/utils/apply-passive.d.ts +0 -13
- package/rmwc/base/code/utils/apply-passive.js +0 -63
- package/rmwc/base/code/utils/debounce.d.ts +0 -2
- package/rmwc/base/code/utils/debounce.js +0 -17
- package/rmwc/base/code/utils/deprecation.d.ts +0 -10
- package/rmwc/base/code/utils/deprecation.js +0 -76
- package/rmwc/base/code/utils/emitter.d.ts +0 -13
- package/rmwc/base/code/utils/emitter.js +0 -120
- package/rmwc/base/code/utils/events-map.d.ts +0 -87
- package/rmwc/base/code/utils/events-map.js +0 -90
- package/rmwc/base/code/utils/index.d.ts +0 -10
- package/rmwc/base/code/utils/index.js +0 -19
- package/rmwc/base/code/utils/ponyfills.d.ts +0 -3
- package/rmwc/base/code/utils/ponyfills.js +0 -29
- package/rmwc/base/code/utils/random-id.d.ts +0 -6
- package/rmwc/base/code/utils/random-id.js +0 -14
- package/rmwc/base/code/utils/strings.d.ts +0 -3
- package/rmwc/base/code/utils/strings.js +0 -13
- package/rmwc/base/code/utils/use-knob.d.ts +0 -2
- package/rmwc/base/code/utils/use-knob.js +0 -64
- package/rmwc/base/code/utils/wrap-child.d.ts +0 -3
- package/rmwc/base/code/utils/wrap-child.js +0 -55
- package/rmwc/base/code/with-theme.d.ts +0 -15
- package/rmwc/base/code/with-theme.js +0 -106
- package/rmwc/base/package.json +0 -40
- package/rmwc/textfield/code/index.d.ts +0 -135
- package/rmwc/textfield/code/index.js +0 -571
- package/rmwc/textfield/next/index.d.ts +0 -135
- package/rmwc/textfield/next/index.js +0 -560
- package/rmwc/textfield/package.json +0 -45
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
"use strict";
|
|
3
|
-
var __extends =
|
|
4
|
-
(this && this.__extends) ||
|
|
5
|
-
(function () {
|
|
6
|
-
var extendStatics = function (d, b) {
|
|
7
|
-
extendStatics =
|
|
8
|
-
Object.setPrototypeOf ||
|
|
9
|
-
({ __proto__: [] } instanceof Array &&
|
|
10
|
-
function (d, b) {
|
|
11
|
-
d.__proto__ = b;
|
|
12
|
-
}) ||
|
|
13
|
-
function (d, b) {
|
|
14
|
-
for (var p in b) {
|
|
15
|
-
if (b.hasOwnProperty(p)) {
|
|
16
|
-
d[p] = b[p];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
extendStatics(d, b);
|
|
24
|
-
function __() {
|
|
25
|
-
this.constructor = d;
|
|
26
|
-
}
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __assign =
|
|
31
|
-
(this && this.__assign) ||
|
|
32
|
-
function () {
|
|
33
|
-
__assign =
|
|
34
|
-
Object.assign ||
|
|
35
|
-
function (t) {
|
|
36
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
37
|
-
s = arguments[i];
|
|
38
|
-
for (var p in s) {
|
|
39
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) {
|
|
40
|
-
t[p] = s[p];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return t;
|
|
45
|
-
};
|
|
46
|
-
return __assign.apply(this, arguments);
|
|
47
|
-
};
|
|
48
|
-
var __read =
|
|
49
|
-
(this && this.__read) ||
|
|
50
|
-
function (o, n) {
|
|
51
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
52
|
-
if (!m) {
|
|
53
|
-
return o;
|
|
54
|
-
}
|
|
55
|
-
var i = m.call(o),
|
|
56
|
-
r,
|
|
57
|
-
ar = [],
|
|
58
|
-
e;
|
|
59
|
-
try {
|
|
60
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
61
|
-
ar.push(r.value);
|
|
62
|
-
}
|
|
63
|
-
} catch (error) {
|
|
64
|
-
e = { error: error };
|
|
65
|
-
} finally {
|
|
66
|
-
try {
|
|
67
|
-
if (r && !r.done && (m = i["return"])) {
|
|
68
|
-
m.call(i);
|
|
69
|
-
}
|
|
70
|
-
} finally {
|
|
71
|
-
if (e) {
|
|
72
|
-
throw e.error;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return ar;
|
|
77
|
-
};
|
|
78
|
-
var __spread =
|
|
79
|
-
(this && this.__spread) ||
|
|
80
|
-
function () {
|
|
81
|
-
for (var ar = [], i = 0; i < arguments.length; i++) {
|
|
82
|
-
ar = ar.concat(__read(arguments[i]));
|
|
83
|
-
}
|
|
84
|
-
return ar;
|
|
85
|
-
};
|
|
86
|
-
var __importStar =
|
|
87
|
-
(this && this.__importStar) ||
|
|
88
|
-
function (mod) {
|
|
89
|
-
if (mod && mod.__esModule) {
|
|
90
|
-
return mod;
|
|
91
|
-
}
|
|
92
|
-
var result = {};
|
|
93
|
-
if (mod != null) {
|
|
94
|
-
for (var k in mod) {
|
|
95
|
-
if (Object.hasOwnProperty.call(mod, k)) {
|
|
96
|
-
result[k] = mod[k];
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
result["default"] = mod;
|
|
101
|
-
return result;
|
|
102
|
-
};
|
|
103
|
-
var __importDefault =
|
|
104
|
-
(this && this.__importDefault) ||
|
|
105
|
-
function (mod) {
|
|
106
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
107
|
-
};
|
|
108
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
109
|
-
var React = __importStar(require("react"));
|
|
110
|
-
var classnames_1 = __importDefault(require("classnames"));
|
|
111
|
-
var events_map_1 = require("./utils/events-map");
|
|
112
|
-
var debounce_1 = require("./utils/debounce");
|
|
113
|
-
var strings_1 = require("./utils/strings");
|
|
114
|
-
var reactPropFromEventName = function (evtName) {
|
|
115
|
-
return events_map_1.eventsMap[evtName] || evtName;
|
|
116
|
-
};
|
|
117
|
-
var FoundationElement = /** @class */ (function () {
|
|
118
|
-
function FoundationElement(onChange) {
|
|
119
|
-
this._classes = new Set();
|
|
120
|
-
this._events = {};
|
|
121
|
-
this._style = {};
|
|
122
|
-
this._props = {};
|
|
123
|
-
this._ref = null;
|
|
124
|
-
this._onChange = null;
|
|
125
|
-
this._onChange = onChange;
|
|
126
|
-
this.onChange = this.onChange.bind(this);
|
|
127
|
-
this.addClass = this.addClass.bind(this);
|
|
128
|
-
this.removeClass = this.removeClass.bind(this);
|
|
129
|
-
this.hasClass = this.hasClass.bind(this);
|
|
130
|
-
this.setProp = this.setProp.bind(this);
|
|
131
|
-
this.getProp = this.getProp.bind(this);
|
|
132
|
-
this.removeProp = this.removeProp.bind(this);
|
|
133
|
-
this.setStyle = this.setStyle.bind(this);
|
|
134
|
-
this.addEventListener = this.addEventListener.bind(this);
|
|
135
|
-
this.removeEventListener = this.removeEventListener.bind(this);
|
|
136
|
-
this.setRef = this.setRef.bind(this);
|
|
137
|
-
}
|
|
138
|
-
FoundationElement.prototype.onChange = function () {
|
|
139
|
-
this._onChange && this._onChange();
|
|
140
|
-
};
|
|
141
|
-
FoundationElement.prototype.destroy = function () {
|
|
142
|
-
this._onChange = null;
|
|
143
|
-
this._ref = null;
|
|
144
|
-
this._events = {};
|
|
145
|
-
this._style = {};
|
|
146
|
-
this._props = {};
|
|
147
|
-
this._classes = new Set();
|
|
148
|
-
};
|
|
149
|
-
/**************************************************
|
|
150
|
-
* Classes
|
|
151
|
-
**************************************************/
|
|
152
|
-
FoundationElement.prototype.addClass = function (className) {
|
|
153
|
-
if (!this._classes.has(className)) {
|
|
154
|
-
this._classes.add(className);
|
|
155
|
-
this.onChange();
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
FoundationElement.prototype.removeClass = function (className) {
|
|
159
|
-
if (this._classes.has(className)) {
|
|
160
|
-
this._classes.delete(className);
|
|
161
|
-
this.onChange();
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
FoundationElement.prototype.hasClass = function (className) {
|
|
165
|
-
return this._classes.has(className);
|
|
166
|
-
};
|
|
167
|
-
/**************************************************
|
|
168
|
-
* Props
|
|
169
|
-
**************************************************/
|
|
170
|
-
FoundationElement.prototype.setProp = function (propName, value) {
|
|
171
|
-
if (this._props[propName] !== value) {
|
|
172
|
-
this._props[propName] = value;
|
|
173
|
-
this.onChange();
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
FoundationElement.prototype.getProp = function (propName) {
|
|
177
|
-
return this._props[propName];
|
|
178
|
-
};
|
|
179
|
-
FoundationElement.prototype.removeProp = function (propName) {
|
|
180
|
-
if (this._props[propName] !== undefined) {
|
|
181
|
-
delete this._props[propName];
|
|
182
|
-
this.onChange();
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
FoundationElement.prototype.props = function (propsToMerge) {
|
|
186
|
-
var _this = this;
|
|
187
|
-
var _a = propsToMerge.className,
|
|
188
|
-
className = _a === void 0 ? "" : _a,
|
|
189
|
-
_b = propsToMerge.style,
|
|
190
|
-
style = _b === void 0 ? {} : _b;
|
|
191
|
-
// handle merging events
|
|
192
|
-
// the foundation should be able to pass something onClick as well as a user
|
|
193
|
-
// This wraps them in a function that calls both
|
|
194
|
-
var mergedEvents = Object.entries(propsToMerge).reduce(function (acc, _a) {
|
|
195
|
-
var _b = __read(_a, 2),
|
|
196
|
-
key = _b[0],
|
|
197
|
-
possibleCallback = _b[1];
|
|
198
|
-
var existingCallback = _this._events[key];
|
|
199
|
-
if (typeof possibleCallback === "function" && typeof existingCallback === "function") {
|
|
200
|
-
var wrappedCallback = function (evt) {
|
|
201
|
-
existingCallback(evt);
|
|
202
|
-
return possibleCallback(evt);
|
|
203
|
-
};
|
|
204
|
-
acc[key] = wrappedCallback;
|
|
205
|
-
}
|
|
206
|
-
return acc;
|
|
207
|
-
}, __assign({}, this._events));
|
|
208
|
-
// handle className
|
|
209
|
-
var mergedClasses = classnames_1.default(className, __spread(this._classes));
|
|
210
|
-
// handle styles
|
|
211
|
-
var mergedStyles = __assign({}, this._style, style);
|
|
212
|
-
return __assign({}, propsToMerge, this._props, mergedEvents, {
|
|
213
|
-
style: mergedStyles,
|
|
214
|
-
className: mergedClasses
|
|
215
|
-
});
|
|
216
|
-
};
|
|
217
|
-
/**************************************************
|
|
218
|
-
* Styles
|
|
219
|
-
**************************************************/
|
|
220
|
-
FoundationElement.prototype.setStyle = function (propertyName, value) {
|
|
221
|
-
propertyName = propertyName.startsWith("--")
|
|
222
|
-
? propertyName
|
|
223
|
-
: strings_1.toCamel(propertyName);
|
|
224
|
-
if (this._style[propertyName] !== value) {
|
|
225
|
-
this._style[propertyName] = value;
|
|
226
|
-
this.onChange();
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
/**************************************************
|
|
230
|
-
* Events
|
|
231
|
-
**************************************************/
|
|
232
|
-
FoundationElement.prototype.addEventListener = function (evtName, callback) {
|
|
233
|
-
var propName = reactPropFromEventName(evtName);
|
|
234
|
-
if (this._events[propName] !== callback) {
|
|
235
|
-
this._events[propName] = callback;
|
|
236
|
-
this.onChange();
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
FoundationElement.prototype.removeEventListener = function (evtName, callback) {
|
|
240
|
-
var propName = reactPropFromEventName(evtName);
|
|
241
|
-
if (this._events[propName]) {
|
|
242
|
-
delete this._events[propName];
|
|
243
|
-
this.onChange();
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
/**************************************************
|
|
247
|
-
* Refs
|
|
248
|
-
**************************************************/
|
|
249
|
-
FoundationElement.prototype.setRef = function (el) {
|
|
250
|
-
if (el) {
|
|
251
|
-
this._ref = el;
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
Object.defineProperty(FoundationElement.prototype, "ref", {
|
|
255
|
-
get: function () {
|
|
256
|
-
return this._ref;
|
|
257
|
-
},
|
|
258
|
-
enumerable: true,
|
|
259
|
-
configurable: true
|
|
260
|
-
});
|
|
261
|
-
return FoundationElement;
|
|
262
|
-
})();
|
|
263
|
-
exports.FoundationElement = FoundationElement;
|
|
264
|
-
var FoundationComponent = /** @class */ (function (_super) {
|
|
265
|
-
__extends(FoundationComponent, _super);
|
|
266
|
-
function FoundationComponent(props) {
|
|
267
|
-
var _this = _super.call(this, props) || this;
|
|
268
|
-
_this.elements = {};
|
|
269
|
-
//@ts-ignore
|
|
270
|
-
if (_this.constructor.shouldDebounce) {
|
|
271
|
-
_this.update = debounce_1.debounce(_this.update.bind(_this), 0);
|
|
272
|
-
} else {
|
|
273
|
-
_this.update = _this.update.bind(_this);
|
|
274
|
-
}
|
|
275
|
-
return _this;
|
|
276
|
-
}
|
|
277
|
-
FoundationComponent.prototype.componentDidMount = function () {
|
|
278
|
-
this.foundation = this.getDefaultFoundation();
|
|
279
|
-
this.foundation.init();
|
|
280
|
-
this.sync(this.props, {});
|
|
281
|
-
};
|
|
282
|
-
FoundationComponent.prototype.componentDidUpdate = function (prevProps) {
|
|
283
|
-
this.sync(this.props, prevProps);
|
|
284
|
-
};
|
|
285
|
-
FoundationComponent.prototype.componentWillUnmount = function () {
|
|
286
|
-
this.foundation && this.foundation.destroy();
|
|
287
|
-
// @ts-ignore
|
|
288
|
-
this.foundation = undefined;
|
|
289
|
-
Object.values(this.elements).forEach(function (el) {
|
|
290
|
-
return el.destroy();
|
|
291
|
-
});
|
|
292
|
-
};
|
|
293
|
-
FoundationComponent.prototype.createElement = function (elementName) {
|
|
294
|
-
var el = new FoundationElement(this.update);
|
|
295
|
-
this.elements[elementName] = el;
|
|
296
|
-
return el;
|
|
297
|
-
};
|
|
298
|
-
FoundationComponent.prototype.update = function () {
|
|
299
|
-
this.foundation && this.setState({});
|
|
300
|
-
};
|
|
301
|
-
FoundationComponent.prototype.sync = function (props, prevProps) {};
|
|
302
|
-
FoundationComponent.prototype.syncProp = function (prop, prevProp, callback) {
|
|
303
|
-
if (
|
|
304
|
-
(prop !== undefined || (prevProp !== undefined && prop === undefined)) &&
|
|
305
|
-
prop !== prevProp
|
|
306
|
-
) {
|
|
307
|
-
callback();
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
FoundationComponent.prototype.getDefaultFoundation = function () {
|
|
311
|
-
return {
|
|
312
|
-
init: function () {},
|
|
313
|
-
destroy: function () {}
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
/**
|
|
317
|
-
* Fires a cross-browser-compatible custom event from the component root of the given type,
|
|
318
|
-
*/
|
|
319
|
-
FoundationComponent.prototype.emit = function (evtType, evtData, shouldBubble) {
|
|
320
|
-
if (shouldBubble === void 0) {
|
|
321
|
-
shouldBubble = false;
|
|
322
|
-
}
|
|
323
|
-
var evt;
|
|
324
|
-
evt = new CustomEvent(evtType, {
|
|
325
|
-
detail: evtData,
|
|
326
|
-
bubbles: shouldBubble
|
|
327
|
-
});
|
|
328
|
-
// bugfix for events coming from form elements
|
|
329
|
-
// and also fits with reacts form pattern better...
|
|
330
|
-
// This should always otherwise be null since there is no target
|
|
331
|
-
// for Custom Events
|
|
332
|
-
Object.defineProperty(evt, "target", {
|
|
333
|
-
value: evtData,
|
|
334
|
-
writable: false
|
|
335
|
-
});
|
|
336
|
-
Object.defineProperty(evt, "currentTarget", {
|
|
337
|
-
value: evtData,
|
|
338
|
-
writable: false
|
|
339
|
-
});
|
|
340
|
-
// Custom handling for React
|
|
341
|
-
var propName = evtType;
|
|
342
|
-
// check to see if the foundation still exists. If not, we are
|
|
343
|
-
// probably unmounted or destroyed and dont want to call any more handlers
|
|
344
|
-
// This happens when MDC broadcasts certain events on timers
|
|
345
|
-
if (this.foundation) {
|
|
346
|
-
//@ts-ignore
|
|
347
|
-
this.props[propName] && this.props[propName](evt);
|
|
348
|
-
}
|
|
349
|
-
return evt;
|
|
350
|
-
};
|
|
351
|
-
FoundationComponent.shouldDebounce = false;
|
|
352
|
-
return FoundationComponent;
|
|
353
|
-
})(React.Component);
|
|
354
|
-
exports.FoundationComponent = FoundationComponent;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import { WithThemeProps as _WithThemeProps } from './with-theme';
|
|
3
|
-
import { FoundationProps as _FoundationProps } from './foundation-component';
|
|
4
|
-
import { FocusTrap as _FocusTrap } from 'focus-trap';
|
|
5
|
-
import _createFocusTrap from 'focus-trap';
|
|
6
|
-
export { default as classNames } from 'classnames';
|
|
7
|
-
export * from './with-theme';
|
|
8
|
-
export * from './utils';
|
|
9
|
-
export { FoundationComponent } from './foundation-component';
|
|
10
|
-
export { componentFactory } from './component';
|
|
11
|
-
export declare const createFocusTrap: typeof _createFocusTrap;
|
|
12
|
-
export declare type WithThemeProps = _WithThemeProps;
|
|
13
|
-
export interface FoundationProps extends _FoundationProps {
|
|
14
|
-
}
|
|
15
|
-
export interface FocusTrap extends _FocusTrap {
|
|
16
|
-
}
|
package/rmwc/base/code/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
"use strict";
|
|
3
|
-
function __export(m) {
|
|
4
|
-
for (var p in m) {
|
|
5
|
-
if (!exports.hasOwnProperty(p)) {
|
|
6
|
-
exports[p] = m[p];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
var __importDefault =
|
|
11
|
-
(this && this.__importDefault) ||
|
|
12
|
-
function (mod) {
|
|
13
|
-
return mod && mod.__esModule ? mod : { default: mod };
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
var focus_trap_1 = __importDefault(require("focus-trap"));
|
|
17
|
-
var classnames_1 = require("classnames");
|
|
18
|
-
exports.classNames = classnames_1.default;
|
|
19
|
-
__export(require("./with-theme"));
|
|
20
|
-
__export(require("./utils"));
|
|
21
|
-
var foundation_component_1 = require("./foundation-component");
|
|
22
|
-
exports.FoundationComponent = foundation_component_1.FoundationComponent;
|
|
23
|
-
var component_1 = require("./component");
|
|
24
|
-
exports.componentFactory = component_1.componentFactory;
|
|
25
|
-
exports.createFocusTrap = focus_trap_1.default;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.default = function () {
|
|
5
|
-
if (global["window"]) {
|
|
6
|
-
var hyperform = require("hyperform");
|
|
7
|
-
hyperform(window);
|
|
8
|
-
Object.defineProperty(window["HTMLElement"].prototype, "dataset", {
|
|
9
|
-
writable: true,
|
|
10
|
-
value: {}
|
|
11
|
-
});
|
|
12
|
-
if (!window["HTMLCanvasElement"]) {
|
|
13
|
-
Object.defineProperty(window["HTMLCanvasElement"].prototype, "getContext", {
|
|
14
|
-
writable: true,
|
|
15
|
-
value: function () {
|
|
16
|
-
return {
|
|
17
|
-
font: "",
|
|
18
|
-
measureText: function () {
|
|
19
|
-
return { width: 0 };
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
if (!window.scrollTo) {
|
|
26
|
-
Object.defineProperty(window, "scrollTo", {
|
|
27
|
-
writable: true,
|
|
28
|
-
value: function () {}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
window["MutationObserver"] = window["MutationObserver"] || require("mutation-observer");
|
|
32
|
-
}
|
|
33
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/**
|
|
3
|
-
* Determine whether the current browser supports passive event listeners, and
|
|
4
|
-
* if so, use them.
|
|
5
|
-
*/
|
|
6
|
-
export declare function applyPassive(
|
|
7
|
-
globalObj?: any,
|
|
8
|
-
forceRefresh?: any
|
|
9
|
-
):
|
|
10
|
-
| false
|
|
11
|
-
| {
|
|
12
|
-
passive: boolean;
|
|
13
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* @license
|
|
6
|
-
* Copyright 2019 Google Inc.
|
|
7
|
-
*
|
|
8
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
-
* in the Software without restriction, including without limitation the rights
|
|
11
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
-
*
|
|
15
|
-
* The above copyright notice and this permission notice shall be included in
|
|
16
|
-
* all copies or substantial portions of the Software.
|
|
17
|
-
*
|
|
18
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
-
* THE SOFTWARE.
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Stores result from applyPassive to avoid redundant processing to detect
|
|
28
|
-
* passive event listener support.
|
|
29
|
-
*/
|
|
30
|
-
var supportsPassive_;
|
|
31
|
-
/**
|
|
32
|
-
* Determine whether the current browser supports passive event listeners, and
|
|
33
|
-
* if so, use them.
|
|
34
|
-
*/
|
|
35
|
-
function applyPassive(globalObj, forceRefresh) {
|
|
36
|
-
if (globalObj === void 0) {
|
|
37
|
-
globalObj = window;
|
|
38
|
-
}
|
|
39
|
-
if (forceRefresh === void 0) {
|
|
40
|
-
forceRefresh = false;
|
|
41
|
-
}
|
|
42
|
-
if (supportsPassive_ === undefined || forceRefresh) {
|
|
43
|
-
var isSupported_1 = false;
|
|
44
|
-
try {
|
|
45
|
-
globalObj.document.addEventListener(
|
|
46
|
-
"test",
|
|
47
|
-
function () {
|
|
48
|
-
return undefined;
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
get passive() {
|
|
52
|
-
isSupported_1 = true;
|
|
53
|
-
return isSupported_1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
} catch (e) {} // tslint:disable-line:no-empty cannot throw error due to tests. tslint also disables console.log.
|
|
58
|
-
supportsPassive_ = isSupported_1;
|
|
59
|
-
}
|
|
60
|
-
return supportsPassive_ ? { passive: true } : false;
|
|
61
|
-
}
|
|
62
|
-
exports.applyPassive = applyPassive;
|
|
63
|
-
//# sourceMappingURL=events.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.debounce = function (func, wait) {
|
|
5
|
-
var timeout;
|
|
6
|
-
return function () {
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
var context = this,
|
|
9
|
-
args = arguments;
|
|
10
|
-
var later = function () {
|
|
11
|
-
timeout = null;
|
|
12
|
-
func.apply(context, args);
|
|
13
|
-
};
|
|
14
|
-
timeout !== null && clearTimeout(timeout);
|
|
15
|
-
timeout = setTimeout(later, wait);
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
export declare type DeprecateT = {
|
|
3
|
-
[oldPropName: string]: string | [string, (value: any) => void];
|
|
4
|
-
};
|
|
5
|
-
export declare const deprecationWarning: (message: string) => void;
|
|
6
|
-
export declare const handleDeprecations: (
|
|
7
|
-
props: any,
|
|
8
|
-
deprecate: DeprecateT,
|
|
9
|
-
displayName: string
|
|
10
|
-
) => any;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
"use strict";
|
|
3
|
-
var __assign =
|
|
4
|
-
(this && this.__assign) ||
|
|
5
|
-
function () {
|
|
6
|
-
__assign =
|
|
7
|
-
Object.assign ||
|
|
8
|
-
function (t) {
|
|
9
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10
|
-
s = arguments[i];
|
|
11
|
-
for (var p in s) {
|
|
12
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) {
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return t;
|
|
18
|
-
};
|
|
19
|
-
return __assign.apply(this, arguments);
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.deprecationWarning = function (message) {
|
|
23
|
-
if (process && process.env && process.env.NODE_ENV !== "production") {
|
|
24
|
-
console.warn("RMWC Deprecation Warning: " + message);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.handleDeprecations = function (props, deprecate, displayName) {
|
|
28
|
-
props = __assign({}, props);
|
|
29
|
-
for (var oldPropName in deprecate) {
|
|
30
|
-
var newProp = deprecate[oldPropName];
|
|
31
|
-
var newPropName = void 0;
|
|
32
|
-
var transformProp = function (value) {
|
|
33
|
-
return value;
|
|
34
|
-
};
|
|
35
|
-
if (Array.isArray(newProp)) {
|
|
36
|
-
newPropName = newProp[0];
|
|
37
|
-
transformProp = newProp[1];
|
|
38
|
-
} else {
|
|
39
|
-
newPropName = newProp;
|
|
40
|
-
}
|
|
41
|
-
if (props[oldPropName] !== undefined) {
|
|
42
|
-
if (newPropName === "") {
|
|
43
|
-
/* istanbul ignore next */
|
|
44
|
-
exports.deprecationWarning(
|
|
45
|
-
(displayName || "") +
|
|
46
|
-
" component prop '" +
|
|
47
|
-
oldPropName +
|
|
48
|
-
"' has been removed from and is no longer a valid prop."
|
|
49
|
-
);
|
|
50
|
-
} else {
|
|
51
|
-
props[newPropName] = transformProp(props[oldPropName]);
|
|
52
|
-
var propTransformMessage = "";
|
|
53
|
-
if (props[newPropName] !== props[oldPropName]) {
|
|
54
|
-
propTransformMessage =
|
|
55
|
-
" The old value has also been converted from '" +
|
|
56
|
-
props[oldPropName] +
|
|
57
|
-
"' to '" +
|
|
58
|
-
props[newPropName] +
|
|
59
|
-
"'";
|
|
60
|
-
}
|
|
61
|
-
/* istanbul ignore next */
|
|
62
|
-
exports.deprecationWarning(
|
|
63
|
-
(displayName || "") +
|
|
64
|
-
" component prop '" +
|
|
65
|
-
oldPropName +
|
|
66
|
-
"' has been replaced with '" +
|
|
67
|
-
newPropName +
|
|
68
|
-
"'. " +
|
|
69
|
-
propTransformMessage
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
delete props[oldPropName];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return props;
|
|
76
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
export declare class EventEmitter {
|
|
3
|
-
events_: {
|
|
4
|
-
[evtName: string]: Array<Function>;
|
|
5
|
-
};
|
|
6
|
-
on(event: string, cb: Function): void;
|
|
7
|
-
off(event: string, cb: Function): void;
|
|
8
|
-
trigger(event: string, ...args: any): void;
|
|
9
|
-
}
|
|
10
|
-
export declare class ArrayEmitter<T> extends EventEmitter {
|
|
11
|
-
array: T[];
|
|
12
|
-
push(...items: T[]): number;
|
|
13
|
-
}
|