@lumx/react 3.5.2 → 3.5.3
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/index.js +15 -8
- package/index.js.map +1 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -279,9 +279,9 @@ function commonjsRequire () {
|
|
|
279
279
|
|
|
280
280
|
var classnames = createCommonjsModule(function (module) {
|
|
281
281
|
/*!
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
Copyright (c) 2018 Jed Watson.
|
|
283
|
+
Licensed under the MIT License (MIT), see
|
|
284
|
+
http://jedwatson.github.io/classnames
|
|
285
285
|
*/
|
|
286
286
|
/* global define */
|
|
287
287
|
|
|
@@ -289,7 +289,7 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
289
289
|
|
|
290
290
|
var hasOwn = {}.hasOwnProperty;
|
|
291
291
|
|
|
292
|
-
function classNames
|
|
292
|
+
function classNames() {
|
|
293
293
|
var classes = [];
|
|
294
294
|
|
|
295
295
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -300,12 +300,19 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
300
300
|
|
|
301
301
|
if (argType === 'string' || argType === 'number') {
|
|
302
302
|
classes.push(arg);
|
|
303
|
-
} else if (Array.isArray(arg)
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
303
|
+
} else if (Array.isArray(arg)) {
|
|
304
|
+
if (arg.length) {
|
|
305
|
+
var inner = classNames.apply(null, arg);
|
|
306
|
+
if (inner) {
|
|
307
|
+
classes.push(inner);
|
|
308
|
+
}
|
|
307
309
|
}
|
|
308
310
|
} else if (argType === 'object') {
|
|
311
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
312
|
+
classes.push(arg.toString());
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
|
|
309
316
|
for (var key in arg) {
|
|
310
317
|
if (hasOwn.call(arg, key) && arg[key]) {
|
|
311
318
|
classes.push(key);
|