timvir 0.2.1 → 0.2.2

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.
@@ -18,27 +18,36 @@ import { useImmer } from 'use-immer';
18
18
  * @returns the combined, space separated class names that can be applied directly to the class attribute
19
19
  */
20
20
  const cx = function cx() {
21
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
21
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
22
+ .call(arguments).filter(Boolean);
22
23
  const atomicClasses = {};
23
24
  const nonAtomicClasses = [];
24
-
25
- for (const className of presentClassNames) {
25
+ presentClassNames.forEach(arg => {
26
26
  // className could be the output of a previous cx call, so split by ' ' first
27
- const individualClassNames = className.split(' ');
28
-
29
- for (const className of individualClassNames) {
27
+ const individualClassNames = arg ? arg.split(' ') : [];
28
+ individualClassNames.forEach(className => {
30
29
  if (className.startsWith('atm_')) {
31
30
  const [, keyHash] = className.split('_');
32
31
  atomicClasses[keyHash] = className;
33
32
  } else {
34
33
  nonAtomicClasses.push(className);
35
34
  }
35
+ });
36
+ });
37
+ const result = []; // eslint-disable-next-line no-restricted-syntax
38
+
39
+ for (const keyHash in atomicClasses) {
40
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
41
+ result.push(atomicClasses[keyHash]);
36
42
  }
37
43
  }
38
44
 
39
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
45
+ result.push(...nonAtomicClasses);
46
+ return result.join(' ');
40
47
  };
41
48
 
49
+ var cx$1 = cx;
50
+
42
51
  const bytesToHex = (() => {
43
52
  const s = Array.from({
44
53
  length: 256
@@ -151,7 +160,7 @@ function Arbitrary(props, ref) {
151
160
  value: value
152
161
  }, /*#__PURE__*/React.createElement(Root, {
153
162
  ref: ref,
154
- className: cx(classes.root, className),
163
+ className: cx$1(classes.root, className),
155
164
  ...rest
156
165
  }, /*#__PURE__*/React.createElement("div", {
157
166
  className: classes.controls
@@ -20,27 +20,36 @@ import { useImmer } from 'use-immer';
20
20
  * @returns the combined, space separated class names that can be applied directly to the class attribute
21
21
  */
22
22
  const cx = function cx() {
23
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
23
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
24
+ .call(arguments).filter(Boolean);
24
25
  const atomicClasses = {};
25
26
  const nonAtomicClasses = [];
26
-
27
- for (const className of presentClassNames) {
27
+ presentClassNames.forEach(arg => {
28
28
  // className could be the output of a previous cx call, so split by ' ' first
29
- const individualClassNames = className.split(' ');
30
-
31
- for (const className of individualClassNames) {
29
+ const individualClassNames = arg ? arg.split(' ') : [];
30
+ individualClassNames.forEach(className => {
32
31
  if (className.startsWith('atm_')) {
33
32
  const [, keyHash] = className.split('_');
34
33
  atomicClasses[keyHash] = className;
35
34
  } else {
36
35
  nonAtomicClasses.push(className);
37
36
  }
37
+ });
38
+ });
39
+ const result = []; // eslint-disable-next-line no-restricted-syntax
40
+
41
+ for (const keyHash in atomicClasses) {
42
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
43
+ result.push(atomicClasses[keyHash]);
38
44
  }
39
45
  }
40
46
 
41
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
47
+ result.push(...nonAtomicClasses);
48
+ return result.join(' ');
42
49
  };
43
50
 
51
+ var cx$1 = cx;
52
+
44
53
  var theme = "tac6gx6";
45
54
 
46
55
  /**
@@ -77,7 +86,7 @@ function Code(props, ref) {
77
86
  });
78
87
  return /*#__PURE__*/React.createElement(Root, {
79
88
  ref: ref,
80
- className: cx(classes.root, fullWidth && Page.fullWidth),
89
+ className: cx$1(classes.root, fullWidth && Page.fullWidth),
81
90
  ...rest
82
91
  }, /*#__PURE__*/React.createElement(Highlight, { ...defaultProps,
83
92
  code: children.trim(),
@@ -90,7 +99,7 @@ function Code(props, ref) {
90
99
  getLineProps,
91
100
  getTokenProps
92
101
  }) => /*#__PURE__*/React.createElement("pre", {
93
- className: cx(className, theme, classes.code, fullWidth && classes.fullWidth),
102
+ className: cx$1(className, theme, classes.code, fullWidth && classes.fullWidth),
94
103
  style: style
95
104
  }, /*#__PURE__*/React.createElement("div", {
96
105
  className: "d1513p2s",
@@ -112,7 +121,7 @@ function Code(props, ref) {
112
121
  draft.copiedToClipboard = true;
113
122
  });
114
123
  },
115
- className: cx("b157mkz", state.mouseOver && "b10oxtfo")
124
+ className: cx$1("b157mkz", state.mouseOver && "b10oxtfo")
116
125
  }, /*#__PURE__*/React.createElement("svg", {
117
126
  width: 48,
118
127
  height: 48,
@@ -125,7 +134,7 @@ function Code(props, ref) {
125
134
  }) : /*#__PURE__*/React.createElement(Icons.Copy, {
126
135
  size: "16px"
127
136
  })), /*#__PURE__*/React.createElement("div", {
128
- className: cx(fullWidth ? "d17pltln" : "d793q8f")
137
+ className: cx$1(fullWidth ? "d17pltln" : "d793q8f")
129
138
  }, tokens.map((line, i) => {
130
139
  const {
131
140
  className,
@@ -137,7 +146,7 @@ function Code(props, ref) {
137
146
  return /*#__PURE__*/React.createElement("div", {
138
147
  key: i,
139
148
  ...lineProps,
140
- className: cx(className, classes.line, isHighlightedLine(i + 1) && classes.highlightedLine)
149
+ className: cx$1(className, classes.line, isHighlightedLine(i + 1) && classes.highlightedLine)
141
150
  }, line.map((token, key) => /*#__PURE__*/React.createElement("span", {
142
151
  key: key,
143
152
  ...getTokenProps({
@@ -17,27 +17,36 @@ import * as React from 'react';
17
17
  * @returns the combined, space separated class names that can be applied directly to the class attribute
18
18
  */
19
19
  const cx = function cx() {
20
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
20
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
21
+ .call(arguments).filter(Boolean);
21
22
  const atomicClasses = {};
22
23
  const nonAtomicClasses = [];
23
-
24
- for (const className of presentClassNames) {
24
+ presentClassNames.forEach(arg => {
25
25
  // className could be the output of a previous cx call, so split by ' ' first
26
- const individualClassNames = className.split(' ');
27
-
28
- for (const className of individualClassNames) {
26
+ const individualClassNames = arg ? arg.split(' ') : [];
27
+ individualClassNames.forEach(className => {
29
28
  if (className.startsWith('atm_')) {
30
29
  const [, keyHash] = className.split('_');
31
30
  atomicClasses[keyHash] = className;
32
31
  } else {
33
32
  nonAtomicClasses.push(className);
34
33
  }
34
+ });
35
+ });
36
+ const result = []; // eslint-disable-next-line no-restricted-syntax
37
+
38
+ for (const keyHash in atomicClasses) {
39
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
40
+ result.push(atomicClasses[keyHash]);
35
41
  }
36
42
  }
37
43
 
38
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
44
+ result.push(...nonAtomicClasses);
45
+ return result.join(' ');
39
46
  };
40
47
 
48
+ var cx$1 = cx;
49
+
41
50
  /**
42
51
  * The underlying DOM element which is rendered by this component.
43
52
  */
@@ -56,7 +65,7 @@ function ColorBar(props, ref) {
56
65
  const [selected, setSelected] = React.useState(undefined);
57
66
  return /*#__PURE__*/React.createElement(Root, {
58
67
  ref: ref,
59
- className: cx(className, classes.root, selected && tweaks.selected),
68
+ className: cx$1(className, classes.root, selected && tweaks.selected),
60
69
  ...rest
61
70
  }, /*#__PURE__*/React.createElement("div", {
62
71
  className: classes.bar,
@@ -15,27 +15,36 @@ import * as React from 'react';
15
15
  * @returns the combined, space separated class names that can be applied directly to the class attribute
16
16
  */
17
17
  const cx = function cx() {
18
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
18
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
19
+ .call(arguments).filter(Boolean);
19
20
  const atomicClasses = {};
20
21
  const nonAtomicClasses = [];
21
-
22
- for (const className of presentClassNames) {
22
+ presentClassNames.forEach(arg => {
23
23
  // className could be the output of a previous cx call, so split by ' ' first
24
- const individualClassNames = className.split(' ');
25
-
26
- for (const className of individualClassNames) {
24
+ const individualClassNames = arg ? arg.split(' ') : [];
25
+ individualClassNames.forEach(className => {
27
26
  if (className.startsWith('atm_')) {
28
27
  const [, keyHash] = className.split('_');
29
28
  atomicClasses[keyHash] = className;
30
29
  } else {
31
30
  nonAtomicClasses.push(className);
32
31
  }
32
+ });
33
+ });
34
+ const result = []; // eslint-disable-next-line no-restricted-syntax
35
+
36
+ for (const keyHash in atomicClasses) {
37
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
38
+ result.push(atomicClasses[keyHash]);
33
39
  }
34
40
  }
35
41
 
36
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
42
+ result.push(...nonAtomicClasses);
43
+ return result.join(' ');
37
44
  };
38
45
 
46
+ var cx$1 = cx;
47
+
39
48
  /**
40
49
  * The underlying DOM element which is rendered by this component.
41
50
  */
@@ -53,7 +62,7 @@ function ColorBook(props, ref) {
53
62
  return /*#__PURE__*/React.createElement(Root, {
54
63
  ref: ref,
55
64
  ...rest,
56
- className: cx(className, "rmv2wrl")
65
+ className: cx$1(className, "rmv2wrl")
57
66
  }, chapters.map(({
58
67
  name,
59
68
  values
@@ -63,7 +72,7 @@ function ColorBook(props, ref) {
63
72
  gridColumn: i + 1
64
73
  }
65
74
  }, /*#__PURE__*/React.createElement("div", {
66
- className: cx(chapter, i === selectedChapter && activeChapter),
75
+ className: cx$1(chapter, i === selectedChapter && activeChapter),
67
76
  onClick: () => {
68
77
  if (onSelectChapter) {
69
78
  onSelectChapter(i);
@@ -76,7 +85,7 @@ function ColorBook(props, ref) {
76
85
  },
77
86
  className: "d1l94wnr"
78
87
  }))), name && /*#__PURE__*/React.createElement("div", {
79
- className: cx("d1uopbb", i === selectedChapter && "d1vwzhoa")
88
+ className: cx$1("d1uopbb", i === selectedChapter && "d1vwzhoa")
80
89
  }, name))));
81
90
  }
82
91
 
@@ -16,27 +16,36 @@ import { fullWidth } from 'timvir/core';
16
16
  * @returns the combined, space separated class names that can be applied directly to the class attribute
17
17
  */
18
18
  const cx = function cx() {
19
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
19
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
20
+ .call(arguments).filter(Boolean);
20
21
  const atomicClasses = {};
21
22
  const nonAtomicClasses = [];
22
-
23
- for (const className of presentClassNames) {
23
+ presentClassNames.forEach(arg => {
24
24
  // className could be the output of a previous cx call, so split by ' ' first
25
- const individualClassNames = className.split(' ');
26
-
27
- for (const className of individualClassNames) {
25
+ const individualClassNames = arg ? arg.split(' ') : [];
26
+ individualClassNames.forEach(className => {
28
27
  if (className.startsWith('atm_')) {
29
28
  const [, keyHash] = className.split('_');
30
29
  atomicClasses[keyHash] = className;
31
30
  } else {
32
31
  nonAtomicClasses.push(className);
33
32
  }
33
+ });
34
+ });
35
+ const result = []; // eslint-disable-next-line no-restricted-syntax
36
+
37
+ for (const keyHash in atomicClasses) {
38
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
39
+ result.push(atomicClasses[keyHash]);
34
40
  }
35
41
  }
36
42
 
37
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
43
+ result.push(...nonAtomicClasses);
44
+ return result.join(' ');
38
45
  };
39
46
 
47
+ var cx$1 = cx;
48
+
40
49
  /**
41
50
  * The underlying DOM element which is rendered by this component.
42
51
  */
@@ -53,7 +62,7 @@ function Cover(props, ref) {
53
62
  } = props;
54
63
  return /*#__PURE__*/React.createElement(Root, {
55
64
  ref: ref,
56
- className: cx(className, fullWidth),
65
+ className: cx$1(className, fullWidth),
57
66
  ...rest
58
67
  }, /*#__PURE__*/React.createElement("picture", null, sources.map((p, i) => /*#__PURE__*/React.createElement("source", {
59
68
  key: i,
@@ -17,27 +17,36 @@ import * as React from 'react';
17
17
  * @returns the combined, space separated class names that can be applied directly to the class attribute
18
18
  */
19
19
  const cx = function cx() {
20
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
20
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
21
+ .call(arguments).filter(Boolean);
21
22
  const atomicClasses = {};
22
23
  const nonAtomicClasses = [];
23
-
24
- for (const className of presentClassNames) {
24
+ presentClassNames.forEach(arg => {
25
25
  // className could be the output of a previous cx call, so split by ' ' first
26
- const individualClassNames = className.split(' ');
27
-
28
- for (const className of individualClassNames) {
26
+ const individualClassNames = arg ? arg.split(' ') : [];
27
+ individualClassNames.forEach(className => {
29
28
  if (className.startsWith('atm_')) {
30
29
  const [, keyHash] = className.split('_');
31
30
  atomicClasses[keyHash] = className;
32
31
  } else {
33
32
  nonAtomicClasses.push(className);
34
33
  }
34
+ });
35
+ });
36
+ const result = []; // eslint-disable-next-line no-restricted-syntax
37
+
38
+ for (const keyHash in atomicClasses) {
39
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
40
+ result.push(atomicClasses[keyHash]);
35
41
  }
36
42
  }
37
43
 
38
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
44
+ result.push(...nonAtomicClasses);
45
+ return result.join(' ');
39
46
  };
40
47
 
48
+ var cx$1 = cx;
49
+
41
50
  /**
42
51
  * The underlying DOM element which is rendered by this component.
43
52
  */
@@ -62,7 +71,7 @@ function Exhibit(props, ref) {
62
71
  } = block.props;
63
72
  return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(components.h3, null, title), /*#__PURE__*/React.createElement(Root, {
64
73
  ref: ref,
65
- className: cx(className, classes.root),
74
+ className: cx$1(className, classes.root),
66
75
  style: { ...style,
67
76
  [cssVariables.bleed]: typeof bleed === "number" ? `${bleed}px` : bleed
68
77
  },
@@ -17,27 +17,36 @@ import * as Icons from 'react-feather';
17
17
  * @returns the combined, space separated class names that can be applied directly to the class attribute
18
18
  */
19
19
  const cx = function cx() {
20
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
20
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
21
+ .call(arguments).filter(Boolean);
21
22
  const atomicClasses = {};
22
23
  const nonAtomicClasses = [];
23
-
24
- for (const className of presentClassNames) {
24
+ presentClassNames.forEach(arg => {
25
25
  // className could be the output of a previous cx call, so split by ' ' first
26
- const individualClassNames = className.split(' ');
27
-
28
- for (const className of individualClassNames) {
26
+ const individualClassNames = arg ? arg.split(' ') : [];
27
+ individualClassNames.forEach(className => {
29
28
  if (className.startsWith('atm_')) {
30
29
  const [, keyHash] = className.split('_');
31
30
  atomicClasses[keyHash] = className;
32
31
  } else {
33
32
  nonAtomicClasses.push(className);
34
33
  }
34
+ });
35
+ });
36
+ const result = []; // eslint-disable-next-line no-restricted-syntax
37
+
38
+ for (const keyHash in atomicClasses) {
39
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
40
+ result.push(atomicClasses[keyHash]);
35
41
  }
36
42
  }
37
43
 
38
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
44
+ result.push(...nonAtomicClasses);
45
+ return result.join(' ');
39
46
  };
40
47
 
48
+ var cx$1 = cx;
49
+
41
50
  /**
42
51
  * The underlying DOM element which is rendered by this component.
43
52
  */
@@ -82,7 +91,7 @@ function Font(props, ref) {
82
91
  }, [name, contentRef]);
83
92
  return /*#__PURE__*/React.createElement(Root, {
84
93
  ref: ref,
85
- className: cx(className, "rc7ivp5"),
94
+ className: cx$1(className, "rc7ivp5"),
86
95
  ...rest
87
96
  }, /*#__PURE__*/React.createElement("div", {
88
97
  className: classes.meta
@@ -131,7 +140,7 @@ function Font(props, ref) {
131
140
  ref: setContentRef,
132
141
  contentEditable: true,
133
142
  spellCheck: "false",
134
- className: cx(font.className, "dx3nfmc"),
143
+ className: cx$1(font.className, "dx3nfmc"),
135
144
  style: font.style
136
145
  }, children || "The quick brown fox jumps over the lazy dog"))));
137
146
  }
@@ -15,27 +15,36 @@ import * as React from 'react';
15
15
  * @returns the combined, space separated class names that can be applied directly to the class attribute
16
16
  */
17
17
  const cx = function cx() {
18
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
18
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
19
+ .call(arguments).filter(Boolean);
19
20
  const atomicClasses = {};
20
21
  const nonAtomicClasses = [];
21
-
22
- for (const className of presentClassNames) {
22
+ presentClassNames.forEach(arg => {
23
23
  // className could be the output of a previous cx call, so split by ' ' first
24
- const individualClassNames = className.split(' ');
25
-
26
- for (const className of individualClassNames) {
24
+ const individualClassNames = arg ? arg.split(' ') : [];
25
+ individualClassNames.forEach(className => {
27
26
  if (className.startsWith('atm_')) {
28
27
  const [, keyHash] = className.split('_');
29
28
  atomicClasses[keyHash] = className;
30
29
  } else {
31
30
  nonAtomicClasses.push(className);
32
31
  }
32
+ });
33
+ });
34
+ const result = []; // eslint-disable-next-line no-restricted-syntax
35
+
36
+ for (const keyHash in atomicClasses) {
37
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
38
+ result.push(atomicClasses[keyHash]);
33
39
  }
34
40
  }
35
41
 
36
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
42
+ result.push(...nonAtomicClasses);
43
+ return result.join(' ');
37
44
  };
38
45
 
46
+ var cx$1 = cx;
47
+
39
48
  /**
40
49
  * The underlying DOM element which is rendered by this component.
41
50
  */
@@ -50,7 +59,7 @@ function Grid(props, ref) {
50
59
  } = props;
51
60
  return /*#__PURE__*/React.createElement(Root, {
52
61
  ref: ref,
53
- className: cx(className, classes.root),
62
+ className: cx$1(className, classes.root),
54
63
  ...rest
55
64
  }, children);
56
65
  }
@@ -16,27 +16,36 @@ import * as React from 'react';
16
16
  * @returns the combined, space separated class names that can be applied directly to the class attribute
17
17
  */
18
18
  const cx = function cx() {
19
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
19
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
20
+ .call(arguments).filter(Boolean);
20
21
  const atomicClasses = {};
21
22
  const nonAtomicClasses = [];
22
-
23
- for (const className of presentClassNames) {
23
+ presentClassNames.forEach(arg => {
24
24
  // className could be the output of a previous cx call, so split by ' ' first
25
- const individualClassNames = className.split(' ');
26
-
27
- for (const className of individualClassNames) {
25
+ const individualClassNames = arg ? arg.split(' ') : [];
26
+ individualClassNames.forEach(className => {
28
27
  if (className.startsWith('atm_')) {
29
28
  const [, keyHash] = className.split('_');
30
29
  atomicClasses[keyHash] = className;
31
30
  } else {
32
31
  nonAtomicClasses.push(className);
33
32
  }
33
+ });
34
+ });
35
+ const result = []; // eslint-disable-next-line no-restricted-syntax
36
+
37
+ for (const keyHash in atomicClasses) {
38
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
39
+ result.push(atomicClasses[keyHash]);
34
40
  }
35
41
  }
36
42
 
37
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
43
+ result.push(...nonAtomicClasses);
44
+ return result.join(' ');
38
45
  };
39
46
 
47
+ var cx$1 = cx;
48
+
40
49
  const Root$1 = "div";
41
50
  const classes$1 = {
42
51
  backdrop: "b1a0xzv7",
@@ -144,7 +153,7 @@ function Icon(props, ref) {
144
153
  const width = roe === null || roe === void 0 ? void 0 : roe.contentRect.width;
145
154
  return /*#__PURE__*/React.createElement(Root, {
146
155
  ref: ref,
147
- className: cx(className, "r1k0w618"),
156
+ className: cx$1(className, "r1k0w618"),
148
157
  ...rest
149
158
  }, /*#__PURE__*/React.createElement("div", {
150
159
  ref: roRef
@@ -16,27 +16,36 @@ import * as Icons from 'react-feather';
16
16
  * @returns the combined, space separated class names that can be applied directly to the class attribute
17
17
  */
18
18
  const cx = function cx() {
19
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
19
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
20
+ .call(arguments).filter(Boolean);
20
21
  const atomicClasses = {};
21
22
  const nonAtomicClasses = [];
22
-
23
- for (const className of presentClassNames) {
23
+ presentClassNames.forEach(arg => {
24
24
  // className could be the output of a previous cx call, so split by ' ' first
25
- const individualClassNames = className.split(' ');
26
-
27
- for (const className of individualClassNames) {
25
+ const individualClassNames = arg ? arg.split(' ') : [];
26
+ individualClassNames.forEach(className => {
28
27
  if (className.startsWith('atm_')) {
29
28
  const [, keyHash] = className.split('_');
30
29
  atomicClasses[keyHash] = className;
31
30
  } else {
32
31
  nonAtomicClasses.push(className);
33
32
  }
33
+ });
34
+ });
35
+ const result = []; // eslint-disable-next-line no-restricted-syntax
36
+
37
+ for (const keyHash in atomicClasses) {
38
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
39
+ result.push(atomicClasses[keyHash]);
34
40
  }
35
41
  }
36
42
 
37
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
43
+ result.push(...nonAtomicClasses);
44
+ return result.join(' ');
38
45
  };
39
46
 
47
+ var cx$1 = cx;
48
+
40
49
  /**
41
50
  * The underlying DOM element which is rendered by this component.
42
51
  */
@@ -52,7 +61,7 @@ function Message(props, ref) {
52
61
  } = props;
53
62
  return /*#__PURE__*/React.createElement(Root, {
54
63
  ref: ref,
55
- className: cx(className, "r1ssql2z", variant !== undefined && variantStyles[variant]),
64
+ className: cx$1(className, "r1ssql2z", variant !== undefined && variantStyles[variant]),
56
65
  ...rest
57
66
  }, variant && /*#__PURE__*/React.createElement("div", {
58
67
  className: icon
@@ -16,27 +16,36 @@ import * as React from 'react';
16
16
  * @returns the combined, space separated class names that can be applied directly to the class attribute
17
17
  */
18
18
  const cx = function cx() {
19
- const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
19
+ const presentClassNames = Array.prototype.slice // eslint-disable-next-line prefer-rest-params
20
+ .call(arguments).filter(Boolean);
20
21
  const atomicClasses = {};
21
22
  const nonAtomicClasses = [];
22
-
23
- for (const className of presentClassNames) {
23
+ presentClassNames.forEach(arg => {
24
24
  // className could be the output of a previous cx call, so split by ' ' first
25
- const individualClassNames = className.split(' ');
26
-
27
- for (const className of individualClassNames) {
25
+ const individualClassNames = arg ? arg.split(' ') : [];
26
+ individualClassNames.forEach(className => {
28
27
  if (className.startsWith('atm_')) {
29
28
  const [, keyHash] = className.split('_');
30
29
  atomicClasses[keyHash] = className;
31
30
  } else {
32
31
  nonAtomicClasses.push(className);
33
32
  }
33
+ });
34
+ });
35
+ const result = []; // eslint-disable-next-line no-restricted-syntax
36
+
37
+ for (const keyHash in atomicClasses) {
38
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
39
+ result.push(atomicClasses[keyHash]);
34
40
  }
35
41
  }
36
42
 
37
- return [...Object.values(atomicClasses), ...nonAtomicClasses].join(' ');
43
+ result.push(...nonAtomicClasses);
44
+ return result.join(' ');
38
45
  };
39
46
 
47
+ var cx$1 = cx;
48
+
40
49
  /**
41
50
  * The underlying DOM element which is rendered by this component.
42
51
  */
@@ -66,7 +75,7 @@ function Swatch(props, ref) {
66
75
  style: {
67
76
  height: ancestry ? 48 : 36
68
77
  },
69
- className: cx(className, "r19bcggb"),
78
+ className: cx$1(className, "r19bcggb"),
70
79
  onClick: ev => {
71
80
  navigator.clipboard.writeText(value);
72
81
  setLabel("Copied to clipboard");