emoji-picker-react 4.5.3 → 4.5.4

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.
@@ -19,3 +19,4 @@ export declare enum ClassNames {
19
19
  variationPicker = "epr-emoji-variation-picker"
20
20
  }
21
21
  export declare function asSelectors(...classNames: ClassNames[]): string;
22
+ export declare function clsx(...args: any[]): string;
@@ -6,7 +6,6 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var React = require('react');
8
8
  var React__default = _interopDefault(React);
9
- var clsx = _interopDefault(require('clsx'));
10
9
 
11
10
  var ClassNames;
12
11
 
@@ -40,6 +39,35 @@ function asSelectors() {
40
39
  return "." + c;
41
40
  }).join('');
42
41
  }
42
+ function clsx() {
43
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
44
+ args[_key2] = arguments[_key2];
45
+ }
46
+
47
+ var classes = args.reduce(function (classes, arg) {
48
+ if (typeof arg === 'string') {
49
+ classes.push(arg);
50
+ }
51
+
52
+ if (Array.isArray(arg)) {
53
+ classes.push(clsx.apply(void 0, arg));
54
+ }
55
+
56
+ if (typeof arg === 'object') {
57
+ Object.entries(arg).forEach(function (_ref) {
58
+ var key = _ref[0],
59
+ value = _ref[1];
60
+
61
+ if (value) {
62
+ classes.push(key);
63
+ }
64
+ });
65
+ }
66
+
67
+ return classes;
68
+ }, []);
69
+ return classes.filter(Boolean).join(' ');
70
+ }
43
71
 
44
72
  function focusElement(element) {
45
73
  if (!element) {