@cleartrip/ct-design-accordion
Advanced tools
Comparing version 3.13.0 to 3.13.1-SNAPSHOT-mevc-common.0
@@ -120,30 +120,41 @@ (function (global, factory) { | ||
function classNames() { | ||
var classes = []; | ||
var classes = ''; | ||
for (var i = 0; i < arguments.length; i++) { | ||
var arg = arguments[i]; | ||
if (!arg) continue; | ||
var argType = typeof arg; | ||
if (argType === 'string' || argType === 'number') { | ||
classes.push(arg); | ||
} else if (Array.isArray(arg)) { | ||
if (arg.length) { | ||
var inner = classNames.apply(null, arg); | ||
if (inner) { | ||
classes.push(inner); | ||
} | ||
} | ||
} else if (argType === 'object') { | ||
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { | ||
classes.push(arg.toString()); | ||
continue; | ||
} | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes.push(key); | ||
} | ||
} | ||
if (arg) { | ||
classes = appendClass(classes, parseValue(arg)); | ||
} | ||
} | ||
return classes.join(' '); | ||
return classes; | ||
} | ||
function parseValue(arg) { | ||
if (typeof arg === 'string' || typeof arg === 'number') { | ||
return arg; | ||
} | ||
if (typeof arg !== 'object') { | ||
return ''; | ||
} | ||
if (Array.isArray(arg)) { | ||
return classNames.apply(null, arg); | ||
} | ||
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { | ||
return arg.toString(); | ||
} | ||
var classes = ''; | ||
for (var key in arg) { | ||
if (hasOwn.call(arg, key) && arg[key]) { | ||
classes = appendClass(classes, key); | ||
} | ||
} | ||
return classes; | ||
} | ||
function appendClass(value, newClass) { | ||
if (!newClass) { | ||
return value; | ||
} | ||
if (value) { | ||
return value + ' ' + newClass; | ||
} | ||
return value + newClass; | ||
} | ||
if (module.exports) { | ||
@@ -150,0 +161,0 @@ classNames.default = classNames; |
{ | ||
"name": "@cleartrip/ct-design-accordion", | ||
"version": "3.13.0", | ||
"version": "3.13.1-SNAPSHOT-mevc-common.0", | ||
"description": "Accordion Component", | ||
@@ -18,10 +18,10 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@cleartrip/ct-design-transition": "3.13.0", | ||
"@cleartrip/ct-design-icons": "31.0.1-SNAPSHOT-mevc-common.0", | ||
"@cleartrip/ct-design-container": "3.13.0", | ||
"@cleartrip/ct-design-typography": "3.13.0", | ||
"@cleartrip/ct-design-icons": "31.0.0", | ||
"@cleartrip/ct-design-theme": "3.13.0" | ||
"@cleartrip/ct-design-typography": "3.14.0-SNAPSHOT-mevc-common.0", | ||
"@cleartrip/ct-design-theme": "3.14.0-SNAPSHOT-mevc-common.0", | ||
"@cleartrip/ct-design-transition": "3.13.1-SNAPSHOT-mevc-common.0" | ||
}, | ||
"devDependencies": { | ||
"@cleartrip/ct-design-types": "3.13.0" | ||
"@cleartrip/ct-design-types": "3.13.1-SNAPSHOT-mevc-common.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89703
458
4
+ Added@cleartrip/ct-design-common-utils@3.13.1-SNAPSHOT-mevc-common.0(transitive)
+ Added@cleartrip/ct-design-icons@31.0.1-SNAPSHOT-mevc-common.0(transitive)
+ Added@cleartrip/ct-design-theme@3.14.0-SNAPSHOT-mevc-common.0(transitive)
+ Added@cleartrip/ct-design-tooltip-v2@3.13.1-SNAPSHOT-mevc-common.0(transitive)
+ Added@cleartrip/ct-design-transition@3.13.1-SNAPSHOT-mevc-common.0(transitive)
+ Added@cleartrip/ct-design-types@3.13.1-SNAPSHOT-mevc-common.0(transitive)
+ Added@cleartrip/ct-design-typography@3.14.0-SNAPSHOT-mevc-common.0(transitive)
- Removed@cleartrip/ct-design-common-utils@3.13.0(transitive)
- Removed@cleartrip/ct-design-icons@31.0.0(transitive)
- Removed@cleartrip/ct-design-theme@3.13.0(transitive)
- Removed@cleartrip/ct-design-tooltip-v2@3.13.0(transitive)
- Removed@cleartrip/ct-design-transition@3.13.0(transitive)
- Removed@cleartrip/ct-design-types@3.13.0(transitive)
- Removed@cleartrip/ct-design-typography@3.13.0(transitive)
Updated@cleartrip/ct-design-icons@31.0.1-SNAPSHOT-mevc-common.0
Updated@cleartrip/ct-design-theme@3.14.0-SNAPSHOT-mevc-common.0
Updated@cleartrip/ct-design-transition@3.13.1-SNAPSHOT-mevc-common.0
Updated@cleartrip/ct-design-typography@3.14.0-SNAPSHOT-mevc-common.0