@zendeskgarden/react-theming 9.0.0-next.8 → 9.0.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/dist/index.cjs.js CHANGED
@@ -7,8 +7,8 @@
7
7
  'use strict';
8
8
 
9
9
  var React = require('react');
10
- var styledComponents = require('styled-components');
11
- var chromaJs = require('chroma-js');
10
+ var styled = require('styled-components');
11
+ var color2k = require('color2k');
12
12
  var polished = require('polished');
13
13
  var get = require('lodash.get');
14
14
  var memoize = require('lodash.memoize');
@@ -16,6 +16,7 @@ var memoize = require('lodash.memoize');
16
16
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
17
17
 
18
18
  var React__default = /*#__PURE__*/_interopDefault(React);
19
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
19
20
  var get__default = /*#__PURE__*/_interopDefault(get);
20
21
  var memoize__default = /*#__PURE__*/_interopDefault(memoize);
21
22
 
@@ -24,274 +25,250 @@ const PALETTE = {
24
25
  white: '#fff',
25
26
  product: {
26
27
  support: '#00a656',
27
- message: '#37b8af',
28
28
  explore: '#30aabc',
29
29
  gather: '#f6c8be',
30
30
  guide: '#eb4962',
31
- connect: '#ff6224',
32
31
  chat: '#f79a3e',
33
32
  talk: '#efc93d',
34
33
  sell: '#c38f00'
35
34
  },
36
35
  grey: {
37
- 100: '#f4f6f6',
38
- 200: '#e4e7e9',
39
- 300: '#c7cdd0',
40
- 400: '#afb7bd',
41
- 500: '#88929d',
42
- 600: '#7f8a95',
43
- 700: '#65707a',
44
- 800: '#4b565f',
45
- 900: '#2e373f',
46
- 1000: '#1e252a',
47
- 1100: '#171b1f',
48
- 1200: '#101316'
36
+ 100: '#f8f9f9',
37
+ 200: '#e8eaec',
38
+ 300: '#d8dcde',
39
+ 400: '#b0b8be',
40
+ 500: '#919ca5',
41
+ 600: '#848f99',
42
+ 700: '#5c6970',
43
+ 800: '#39434b',
44
+ 900: '#293239',
45
+ 1000: '#1c2227',
46
+ 1100: '#151a1e',
47
+ 1200: '#0a0d0e'
49
48
  },
50
49
  blue: {
51
50
  100: '#edf7ff',
52
- 200: '#d9eaf7',
53
- 300: '#b3d0e7',
54
- 400: '#92bbdb',
55
- 500: '#5896c9',
56
- 600: '#4b8ec5',
51
+ 200: '#ddecf8',
52
+ 300: '#cce0f1',
53
+ 400: '#93bcdc',
54
+ 500: '#66a0cd',
55
+ 600: '#2694d6',
57
56
  700: '#1f73b7',
58
- 800: '#18578b',
59
- 900: '#103859',
60
- 1000: '#0b253b',
61
- 1100: '#081c2d',
62
- 1200: '#061420'
57
+ 800: '#13456d',
58
+ 900: '#0f3655',
59
+ 1000: '#0a2338',
60
+ 1100: '#061420',
61
+ 1200: '#040d15'
63
62
  },
64
63
  red: {
65
64
  100: '#fff2f3',
66
- 200: '#fde1e3',
67
- 300: '#f5bfc4',
68
- 400: '#f2a0a6',
69
- 500: '#e76973',
70
- 600: '#e35c67',
65
+ 200: '#fee3e5',
66
+ 300: '#f5d5d8',
67
+ 400: '#f2a1a8',
68
+ 500: '#ea7881',
69
+ 600: '#eb5c69',
71
70
  700: '#cd3642',
72
- 800: '#9d2933',
73
- 900: '#6c1219',
74
- 1000: '#431418',
75
- 1100: '#2d1315',
76
- 1200: '#1b1011'
71
+ 800: '#7e1d25',
72
+ 900: '#671219',
73
+ 1000: '#3d1418',
74
+ 1100: '#1d1011',
75
+ 1200: '#100b0c'
77
76
  },
78
77
  yellow: {
79
78
  100: '#fff3e4',
80
- 200: '#ffe2c2',
81
- 300: '#ffc079',
82
- 400: '#fba246',
83
- 500: '#d87916',
84
- 600: '#ce7117',
79
+ 200: '#ffe6cb',
80
+ 300: '#fed6a9',
81
+ 400: '#fca347',
82
+ 500: '#e38215',
83
+ 600: '#d67305',
85
84
  700: '#ac5918',
86
- 800: '#874114',
87
- 900: '#512d17',
88
- 1000: '#312016',
89
- 1100: '#221913',
90
- 1200: '#17120f'
85
+ 800: '#673515',
86
+ 900: '#4c2c17',
87
+ 1000: '#2d1e15',
88
+ 1100: '#18120f',
89
+ 1200: '#0e0c0b'
91
90
  },
92
91
  green: {
93
92
  100: '#eef8f4',
94
- 200: '#d7ede4',
95
- 300: '#b4d3c6',
96
- 400: '#91bfae',
97
- 500: '#3fa17e',
98
- 600: '#329974',
93
+ 200: '#daeee6',
94
+ 300: '#cae3d9',
95
+ 400: '#94c1b0',
96
+ 500: '#4eab89',
97
+ 600: '#26a178',
99
98
  700: '#037f52',
100
- 800: '#186045',
101
- 900: '#0b3e2b',
102
- 1000: '#0c291e',
103
- 1100: '#0b1e17',
104
- 1200: '#0a1511'
99
+ 800: '#104b35',
100
+ 900: '#0b3b29',
101
+ 1000: '#0c261c',
102
+ 1100: '#0a1511',
103
+ 1200: '#080d0c'
105
104
  },
106
105
  kale: {
107
106
  100: '#ecf9f9',
108
- 200: '#d8ebeb',
109
- 300: '#b3d2d0',
110
- 400: '#94bebd',
111
- 500: '#5e9b9c',
112
- 600: '#579394',
107
+ 200: '#daeded',
108
+ 300: '#cbe2e1',
109
+ 400: '#97bfbf',
110
+ 500: '#6ba4a5',
111
+ 600: '#4a9999',
113
112
  700: '#40787a',
114
- 800: '#275c5f',
115
- 900: '#0a3c42',
116
- 1000: '#02282d',
117
- 1100: '#041e22',
118
- 1200: '#061517'
113
+ 800: '#16494f',
114
+ 900: '#063940',
115
+ 1000: '#03252a',
116
+ 1100: '#061517',
117
+ 1200: '#060e0e'
119
118
  },
120
119
  fuschia: {
121
120
  100: '#fbf3f8',
122
- 200: '#f6e2ef',
123
- 300: '#ecc0dc',
124
- 400: '#e3a2cc',
125
- 500: '#d36faf',
126
- 600: '#cf63a8',
121
+ 200: '#f7e6f1',
122
+ 300: '#f2d5e7',
123
+ 400: '#e3a4cc',
124
+ 500: '#d77db7',
125
+ 600: '#d16aac',
127
126
  700: '#b34496',
128
- 800: '#971688',
129
- 900: '#640e59',
130
- 1000: '#430a3d',
131
- 1100: '#34072f',
132
- 1200: '#260523',
133
- M400: '#cf62a8',
134
- M600: '#a8458c'
127
+ 800: '#78116c',
128
+ 900: '#5a0d51',
129
+ 1000: '#3f0939',
130
+ 1100: '#31072c',
131
+ 1200: '#1b0418'
135
132
  },
136
133
  pink: {
137
- 100: '#fcf4f5',
138
- 200: '#f7e3e8',
139
- 300: '#edc1ca',
140
- 400: '#e4a5b3',
141
- 500: '#d57388',
142
- 600: '#e35b72',
134
+ 100: '#fcf3f4',
135
+ 200: '#f7e5e8',
136
+ 300: '#f3d6dc',
137
+ 400: '#e5a6b4',
138
+ 500: '#d98193',
139
+ 600: '#d96b81',
143
140
  700: '#d62054',
144
- 800: '#94304e',
145
- 900: '#611f32',
146
- 1000: '#401522',
147
- 1100: '#31101a',
148
- 1200: '#230b12',
149
- M400: '#d57287',
150
- M600: '#b23a5d'
141
+ 800: '#75263d',
142
+ 900: '#561d2e',
143
+ 1000: '#3c141f',
144
+ 1100: '#2e0f18',
145
+ 1200: '#17080c'
151
146
  },
152
147
  crimson: {
153
- 100: '#fbf4f3',
154
- 200: '#f6e4e1',
155
- 300: '#eac3bc',
156
- 400: '#e1a89e',
157
- 500: '#d1796a',
158
- 600: '#cd6e5d',
148
+ 100: '#fbf3f2',
149
+ 200: '#f7e7e4',
150
+ 300: '#f1d7d2',
151
+ 400: '#e2aaa0',
152
+ 500: '#d58678',
153
+ 600: '#cf7464',
159
154
  700: '#be4938',
160
- 800: '#a32217',
161
- 900: '#6b160f',
162
- 1000: '#480f0a',
163
- 1100: '#370c08',
164
- 1200: '#280806',
165
- M400: '#cc6c5b',
166
- M600: '#b24a3c'
155
+ 800: '#811b12',
156
+ 900: '#61140d',
157
+ 1000: '#440e09',
158
+ 1100: '#340b07',
159
+ 1200: '#1c0604'
167
160
  },
168
161
  orange: {
169
162
  100: '#fdf3ed',
170
- 200: '#f9e3d3',
171
- 300: '#f2c39f',
172
- 400: '#eda671',
173
- 500: '#e2721e',
174
- 600: '#d26e20',
163
+ 200: '#fae7d8',
164
+ 300: '#f7d7be',
165
+ 400: '#eda875',
166
+ 500: '#e58035',
167
+ 600: '#d57428',
175
168
  700: '#af5626',
176
- 800: '#85421d',
177
- 900: '#562b13',
178
- 1000: '#3a1c0d',
179
- 1100: '#2c150a',
180
- 1200: '#1f0f07',
181
- M400: '#d4772c',
182
- M600: '#b35827'
169
+ 800: '#693317',
170
+ 900: '#4d2711',
171
+ 1000: '#361a0c',
172
+ 1100: '#291409',
173
+ 1200: '#150a04'
183
174
  },
184
175
  lemon: {
185
- 100: '#fff6cf',
186
- 200: '#ffe682',
187
- 300: '#ffc417',
188
- 400: '#eda900',
189
- 500: '#ba8900',
190
- 600: '#b08100',
176
+ 100: '#fff7d4',
177
+ 200: '#ffea97',
178
+ 300: '#ffdc4f',
179
+ 400: '#efab00',
180
+ 500: '#c79100',
181
+ 600: '#b68500',
191
182
  700: '#8f6900',
192
- 800: '#6d5000',
193
- 900: '#463300',
194
- 1000: '#2f2200',
195
- 1100: '#231a00',
196
- 1200: '#191200',
197
- M400: '#e7a500',
198
- M600: '#c38f00'
183
+ 800: '#563e00',
184
+ 900: '#3f2e00',
185
+ 1000: '#2b2000',
186
+ 1100: '#221800',
187
+ 1200: '#110c00'
199
188
  },
200
189
  lime: {
201
- 100: '#ebfae6',
202
- 200: '#c9f2bd',
203
- 300: '#88e270',
204
- 400: '#4ecf2a',
205
- 500: '#4da42a',
206
- 600: '#489b20',
190
+ 100: '#ecfae7',
191
+ 200: '#d1f3c7',
192
+ 300: '#b3eda3',
193
+ 400: '#4fd12b',
194
+ 500: '#45b025',
195
+ 600: '#509f2d',
207
196
  700: '#3d7e19',
208
- 800: '#385f23',
209
- 900: '#243c16',
210
- 1000: '#18280f',
211
- 1100: '#121e0b',
212
- 1200: '#0d1508',
213
- M400: '#519e2d',
214
- M600: '#47782c'
197
+ 800: '#2c491b',
198
+ 900: '#203614',
199
+ 1000: '#16250e',
200
+ 1100: '#111d0a',
201
+ 1200: '#090e05'
215
202
  },
216
203
  mint: {
217
204
  100: '#d6ffeb',
218
- 200: '#83ffc3',
219
- 300: '#00ea79',
220
- 400: '#00d16d',
221
- 500: '#00a756',
222
- 600: '#279b65',
223
- 700: '#2d7d55',
224
- 800: '#225f41',
225
- 900: '#163d2a',
226
- 1000: '#0f291c',
227
- 1100: '#0b1e15',
228
- 1200: '#08150f',
229
- M400: '#299c66',
230
- M600: '#2e8057'
205
+ 200: '#9affce',
206
+ 300: '#0afe89',
207
+ 400: '#00d26d',
208
+ 500: '#01b15c',
209
+ 600: '#16a260',
210
+ 700: '#2d7e55',
211
+ 800: '#1b4b33',
212
+ 900: '#143726',
213
+ 1000: '#0e261a',
214
+ 1100: '#0b1d14',
215
+ 1200: '#050e0a'
231
216
  },
232
217
  teal: {
233
- 100: '#d6fefa',
234
- 200: '#70fdef',
235
- 300: '#03e5ce',
236
- 400: '#03ccb8',
237
- 500: '#02a392',
238
- 600: '#1f998b',
218
+ 100: '#d4fefa',
219
+ 200: '#88fdf1',
220
+ 300: '#0bf8e1',
221
+ 400: '#03cdb8',
222
+ 500: '#02ad9c',
223
+ 600: '#2a9d8f',
239
224
  700: '#367a74',
240
- 800: '#2e5c59',
241
- 900: '#1e3b39',
242
- 1000: '#142726',
243
- 1100: '#0f1d1c',
244
- 1200: '#0a1514',
245
- M400: '#2d9e8f',
246
- M600: '#3c7873'
225
+ 800: '#254846',
226
+ 900: '#1b3534',
227
+ 1000: '#122423',
228
+ 1100: '#0e1c1a',
229
+ 1200: '#070d0d'
247
230
  },
248
231
  azure: {
249
- 100: '#f0f7fe',
250
- 200: '#d7eafb',
251
- 300: '#a8d1f7',
252
- 400: '#7fbbf3',
253
- 500: '#3795ed',
254
- 600: '#598ad0',
255
- 700: '#2770c4',
256
- 800: '#2c5689',
257
- 900: '#1d3758',
258
- 1000: '#13253a',
259
- 1100: '#0e1b2c',
260
- 1200: '#0a131f',
261
- M400: '#5f8dcf',
262
- M600: '#3a70b2'
232
+ 100: '#eff7fe',
233
+ 200: '#d9ecfc',
234
+ 300: '#c4e0fa',
235
+ 400: '#82bcf4',
236
+ 500: '#4b9fee',
237
+ 600: '#3191ea',
238
+ 700: '#2770c3',
239
+ 800: '#23446b',
240
+ 900: '#1a3250',
241
+ 1000: '#122238',
242
+ 1100: '#0e1a2a',
243
+ 1200: '#070d14'
263
244
  },
264
245
  royal: {
265
- 100: '#f5f6fc',
266
- 200: '#e3e6f7',
267
- 300: '#c5cbee',
268
- 400: '#abb3e7',
269
- 500: '#7f8cda',
270
- 600: '#7182e1',
271
- 700: '#4d67d3',
272
- 800: '#1f40d8',
273
- 900: '#142a8d',
274
- 1000: '#0e1c5f',
275
- 1100: '#0a1548',
276
- 1200: '#070f34',
277
- M400: '#7986d8',
278
- M600: '#4b61c3'
246
+ 100: '#f4f5fc',
247
+ 200: '#e7e9f8',
248
+ 300: '#d8dcf4',
249
+ 400: '#acb4e7',
250
+ 500: '#8a96dd',
251
+ 600: '#7a88d9',
252
+ 700: '#4c67d3',
253
+ 800: '#1833ab',
254
+ 900: '#122680',
255
+ 1000: '#0d1a5a',
256
+ 1100: '#0a1445',
257
+ 1200: '#050a25'
279
258
  },
280
259
  purple: {
281
- 100: '#f9f4fb',
282
- 200: '#efe3f5',
283
- 300: '#ddc3e9',
284
- 400: '#cea8e0',
285
- 500: '#b57acf',
286
- 600: '#b16ecf',
260
+ 100: '#f9f3fb',
261
+ 200: '#f2e7f6',
262
+ 300: '#e9d8f1',
263
+ 400: '#d0a9e0',
264
+ 500: '#bb86d3',
265
+ 600: '#b276cd',
287
266
  700: '#9256b1',
288
- 800: '#722eb8',
289
- 900: '#491b7f',
290
- 1000: '#311256',
291
- 1100: '#250e41',
292
- 1200: '#1b0a2e',
293
- M400: '#b072cc',
294
- M600: '#9358b0'
267
+ 800: '#58209a',
268
+ 900: '#411973',
269
+ 1000: '#2e1150',
270
+ 1100: '#230d3f',
271
+ 1200: '#120720'
295
272
  }
296
273
  };
297
274
 
@@ -333,26 +310,27 @@ const colors = {
333
310
  recessed: 'neutralHue.1200',
334
311
  subtle: 'neutralHue.1000',
335
312
  emphasis: 'neutralHue.600',
336
- primary: 'primaryHue.900',
337
313
  success: 'successHue.1000',
338
314
  warning: 'warningHue.1000',
339
315
  danger: 'dangerHue.1000',
340
316
  primaryEmphasis: 'primaryHue.600',
341
317
  successEmphasis: 'successHue.600',
342
318
  warningEmphasis: 'warningHue.600',
343
- dangerEmphasis: 'dangerHue.600'
319
+ dangerEmphasis: 'dangerHue.600',
320
+ disabled: 'rgba(neutralHue.500, 100)'
344
321
  },
345
322
  border: {
346
323
  default: 'neutralHue.800',
347
324
  emphasis: 'neutralHue.600',
348
325
  subtle: 'neutralHue.900',
349
- success: 'successHue.800',
350
- warning: 'warningHue.800',
351
- danger: 'dangerHue.800',
326
+ success: 'successHue.900',
327
+ warning: 'warningHue.900',
328
+ danger: 'dangerHue.900',
352
329
  primaryEmphasis: 'primaryHue.600',
353
330
  successEmphasis: 'successHue.600',
354
331
  warningEmphasis: 'warningHue.600',
355
- dangerEmphasis: 'dangerHue.600'
332
+ dangerEmphasis: 'dangerHue.600',
333
+ disabled: 'neutralHue.800'
356
334
  },
357
335
  foreground: {
358
336
  default: 'neutralHue.300',
@@ -364,7 +342,13 @@ const colors = {
364
342
  danger: 'dangerHue.400',
365
343
  successEmphasis: 'successHue.300',
366
344
  warningEmphasis: 'warningHue.300',
367
- dangerEmphasis: 'dangerHue.300'
345
+ dangerEmphasis: 'dangerHue.300',
346
+ disabled: 'neutralHue.700'
347
+ },
348
+ shadow: {
349
+ small: 'rgba(neutralHue.1200, 1100)',
350
+ medium: 'rgba(neutralHue.1200, 800)',
351
+ large: 'rgba(neutralHue.1200, 1000)'
368
352
  }
369
353
  },
370
354
  light: {
@@ -374,14 +358,14 @@ const colors = {
374
358
  recessed: 'neutralHue.100',
375
359
  subtle: 'neutralHue.100',
376
360
  emphasis: 'neutralHue.700',
377
- primary: 'primaryHue.100',
378
361
  success: 'successHue.100',
379
362
  warning: 'warningHue.100',
380
363
  danger: 'dangerHue.100',
381
364
  primaryEmphasis: 'primaryHue.700',
382
365
  successEmphasis: 'successHue.700',
383
366
  warningEmphasis: 'warningHue.700',
384
- dangerEmphasis: 'dangerHue.700'
367
+ dangerEmphasis: 'dangerHue.700',
368
+ disabled: 'rgba(neutralHue.700, 100)'
385
369
  },
386
370
  border: {
387
371
  default: 'neutralHue.300',
@@ -393,7 +377,8 @@ const colors = {
393
377
  primaryEmphasis: 'primaryHue.700',
394
378
  successEmphasis: 'successHue.700',
395
379
  warningEmphasis: 'warningHue.700',
396
- dangerEmphasis: 'dangerHue.700'
380
+ dangerEmphasis: 'dangerHue.700',
381
+ disabled: 'neutralHue.300'
397
382
  },
398
383
  foreground: {
399
384
  default: 'neutralHue.900',
@@ -405,7 +390,13 @@ const colors = {
405
390
  danger: 'dangerHue.700',
406
391
  successEmphasis: 'successHue.900',
407
392
  warningEmphasis: 'warningHue.900',
408
- dangerEmphasis: 'dangerHue.900'
393
+ dangerEmphasis: 'dangerHue.900',
394
+ disabled: 'neutralHue.600'
395
+ },
396
+ shadow: {
397
+ small: 'rgba(neutralHue.1200, 200)',
398
+ medium: 'rgba(neutralHue.1200, 200)',
399
+ large: 'rgba(neutralHue.1200, 200)'
409
400
  }
410
401
  }
411
402
  }
@@ -447,6 +438,20 @@ const lineHeights = {
447
438
  xxl: `${BASE * 8}px`,
448
439
  xxxl: `${BASE * 11}px`
449
440
  };
441
+ const opacity = {
442
+ 100: 0.08,
443
+ 200: 0.16,
444
+ 300: 0.24,
445
+ 400: 0.32,
446
+ 500: 0.4,
447
+ 600: 0.48,
448
+ 700: 0.56,
449
+ 800: 0.64,
450
+ 900: 0.72,
451
+ 1000: 0.8,
452
+ 1100: 0.88,
453
+ 1200: 0.96
454
+ };
450
455
  const palette = {
451
456
  ...PALETTE
452
457
  };
@@ -488,6 +493,7 @@ const DEFAULT_THEME = {
488
493
  fontWeights,
489
494
  iconSizes,
490
495
  lineHeights,
496
+ opacity,
491
497
  palette,
492
498
  rtl: false,
493
499
  shadowWidths,
@@ -497,158 +503,13 @@ const DEFAULT_THEME = {
497
503
 
498
504
  const ThemeProvider = _ref => {
499
505
  let {
500
- theme,
506
+ theme = DEFAULT_THEME,
501
507
  ...other
502
508
  } = _ref;
503
- return React__default.default.createElement(styledComponents.ThemeProvider, Object.assign({
509
+ return React__default.default.createElement(styled.ThemeProvider, Object.assign({
504
510
  theme: theme
505
511
  }, other));
506
512
  };
507
- ThemeProvider.defaultProps = {
508
- theme: DEFAULT_THEME
509
- };
510
-
511
- const PALETTE_V8 = {
512
- black: '#000',
513
- white: '#fff',
514
- product: {
515
- support: '#00a656',
516
- message: '#37b8af',
517
- explore: '#30aabc',
518
- gather: '#f6c8be',
519
- guide: '#eb4962',
520
- connect: '#ff6224',
521
- chat: '#f79a3e',
522
- talk: '#efc93d',
523
- sell: '#c38f00'
524
- },
525
- grey: {
526
- 100: '#f8f9f9',
527
- 200: '#e9ebed',
528
- 300: '#d8dcde',
529
- 400: '#c2c8cc',
530
- 500: '#87929d',
531
- 600: '#68737d',
532
- 700: '#49545c',
533
- 800: '#2f3941'
534
- },
535
- blue: {
536
- 100: '#edf7ff',
537
- 200: '#cee2f2',
538
- 300: '#adcce4',
539
- 400: '#5293c7',
540
- 500: '#337fbd',
541
- 600: '#1f73b7',
542
- 700: '#144a75',
543
- 800: '#0f3554'
544
- },
545
- red: {
546
- 100: '#fff0f1',
547
- 200: '#f5d5d8',
548
- 300: '#f5b5ba',
549
- 400: '#e35b66',
550
- 500: '#d93f4c',
551
- 600: '#cc3340',
552
- 700: '#8c232c',
553
- 800: '#681219'
554
- },
555
- yellow: {
556
- 100: '#fff7ed',
557
- 200: '#ffeedb',
558
- 300: '#fed6a8',
559
- 400: '#ffb057',
560
- 500: '#f79a3e',
561
- 600: '#ed8f1c',
562
- 700: '#ad5918',
563
- 800: '#703815'
564
- },
565
- green: {
566
- 100: '#edf8f4',
567
- 200: '#d1e8df',
568
- 300: '#aecfc2',
569
- 400: '#5eae91',
570
- 500: '#228f67',
571
- 600: '#038153',
572
- 700: '#186146',
573
- 800: '#0b3b29'
574
- },
575
- kale: {
576
- 100: '#f5fcfc',
577
- 200: '#daeded',
578
- 300: '#bdd9d7',
579
- 400: '#90bbbb',
580
- 500: '#498283',
581
- 600: '#17494d',
582
- 700: '#03363d',
583
- 800: '#012b30'
584
- },
585
- fuschia: {
586
- 400: '#d653c2',
587
- 600: '#a81897',
588
- M400: '#cf62a8',
589
- M600: '#a8458c'
590
- },
591
- pink: {
592
- 400: '#ec4d63',
593
- 600: '#d42054',
594
- M400: '#d57287',
595
- M600: '#b23a5d'
596
- },
597
- crimson: {
598
- 400: '#e34f32',
599
- 600: '#c72a1c',
600
- M400: '#cc6c5b',
601
- M600: '#b24a3c'
602
- },
603
- orange: {
604
- 400: '#de701d',
605
- 600: '#bf5000',
606
- M400: '#d4772c',
607
- M600: '#b35827'
608
- },
609
- lemon: {
610
- 400: '#ffd424',
611
- 600: '#ffbb10',
612
- M400: '#e7a500',
613
- M600: '#c38f00'
614
- },
615
- lime: {
616
- 400: '#43b324',
617
- 600: '#2e8200',
618
- M400: '#519e2d',
619
- M600: '#47782c'
620
- },
621
- mint: {
622
- 400: '#00a656',
623
- 600: '#058541',
624
- M400: '#299c66',
625
- M600: '#2e8057'
626
- },
627
- teal: {
628
- 400: '#02a191',
629
- 600: '#028079',
630
- M400: '#2d9e8f',
631
- M600: '#3c7873'
632
- },
633
- azure: {
634
- 400: '#3091ec',
635
- 600: '#1371d6',
636
- M400: '#5f8dcf',
637
- M600: '#3a70b2'
638
- },
639
- royal: {
640
- 400: '#5d7df5',
641
- 600: '#3353e2',
642
- M400: '#7986d8',
643
- M600: '#4b61c3'
644
- },
645
- purple: {
646
- 400: '#b552e2',
647
- 600: '#6a27b8',
648
- M400: '#b072cc',
649
- M600: '#9358b0'
650
- }
651
- };
652
513
 
653
514
  function retrieveComponentStyles(componentId, props) {
654
515
  const components = props.theme && props.theme.components;
@@ -690,7 +551,6 @@ const getArrowPosition = (theme, placement) => {
690
551
  return retVal;
691
552
  };
692
553
 
693
- const PALETTE_SIZE = Object.keys(PALETTE.blue).length;
694
554
  const adjust$1 = (color, expected, actual) => {
695
555
  if (expected !== actual) {
696
556
  const amount = Math.abs(expected - actual) / 100 * 0.05;
@@ -721,7 +581,79 @@ const toHex = (hue, shade, offset, scheme) => {
721
581
  }
722
582
  return retVal;
723
583
  };
724
- const toColor = (colors, palette, scheme, hue, shade, offset, transparency) => {
584
+ const isValidColor = maybeColor => {
585
+ let retVal = ['currentcolor', 'inherit', 'transparent'].includes(maybeColor);
586
+ if (!retVal) {
587
+ try {
588
+ retVal = !!color2k.parseToRgba(maybeColor);
589
+ } catch {
590
+ retVal = false;
591
+ }
592
+ }
593
+ return retVal;
594
+ };
595
+ function findNearestIndex(target, arr) {
596
+ let startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
597
+ if (typeof target !== 'number' || isNaN(target)) {
598
+ throw new Error('Target must be a number.');
599
+ }
600
+ if (!Array.isArray(arr)) {
601
+ throw new Error('Second argument must be an array.');
602
+ }
603
+ let left = startIndex;
604
+ let right = arr.length - 1;
605
+ if (target < arr[left]) return left;
606
+ if (target > arr[right]) return right;
607
+ while (left <= right) {
608
+ const mid = Math.floor((left + right) / 2);
609
+ if (arr[mid] === target) {
610
+ return mid;
611
+ } else if (arr[mid] < target) {
612
+ left = mid + 1;
613
+ } else {
614
+ right = mid - 1;
615
+ }
616
+ }
617
+ return arr[left] - target < target - arr[right] ? left : right;
618
+ }
619
+ const OFFSET_TO_TARGET_RATIO = {
620
+ 100: 1.08,
621
+ 200: 1.2,
622
+ 300: 1.35,
623
+ 400: 2,
624
+ 500: 2.8,
625
+ 600: 3.3,
626
+ 700: 5,
627
+ 800: 10,
628
+ 900: 13,
629
+ 1000: 16,
630
+ 1100: 17.5,
631
+ 1200: 19
632
+ };
633
+ const generateColorScale = memoize__default.default(color => {
634
+ const scaleSize = 200;
635
+ const _scale = color2k.getScale('#FFF', color, '#000');
636
+ const scale = x => _scale(x / scaleSize);
637
+ const colors = [];
638
+ const contrastRatios = [];
639
+ for (let i = 0; i <= scaleSize; i++) {
640
+ const _color = scale(i);
641
+ colors.push(_color);
642
+ contrastRatios.push(polished.getContrast('#FFF', _color));
643
+ }
644
+ const palette = {};
645
+ let startIndex = 0;
646
+ for (const offset in OFFSET_TO_TARGET_RATIO) {
647
+ if (Object.prototype.hasOwnProperty.call(OFFSET_TO_TARGET_RATIO, offset)) {
648
+ const ratio = OFFSET_TO_TARGET_RATIO[offset];
649
+ const nearestIndex = findNearestIndex(ratio, contrastRatios, startIndex);
650
+ startIndex = nearestIndex + 1;
651
+ palette[offset] = colors[nearestIndex];
652
+ }
653
+ }
654
+ return palette;
655
+ });
656
+ const toColor = (colors, palette, opacity, scheme, hue, shade, offset, transparency) => {
725
657
  let retVal;
726
658
  let _hue = colors[hue] || hue;
727
659
  if (Object.hasOwn(palette, _hue)) {
@@ -729,22 +661,20 @@ const toColor = (colors, palette, scheme, hue, shade, offset, transparency) => {
729
661
  }
730
662
  if (typeof _hue === 'object') {
731
663
  retVal = toHex(_hue, shade, offset, scheme);
732
- } else if (_hue === 'transparent' || chromaJs.valid(_hue)) {
664
+ } else if (isValidColor(_hue)) {
733
665
  if (shade === undefined) {
734
666
  retVal = _hue;
735
667
  } else {
736
- const _colors = chromaJs.scale([PALETTE.white, _hue, PALETTE.black]).correctLightness().colors(PALETTE_SIZE + 2);
737
- _hue = _colors.reduce((_retVal, color, index) => {
738
- if (index > 0 && index <= PALETTE_SIZE) {
739
- _retVal[index * 100] = color;
740
- }
741
- return _retVal;
742
- }, {});
668
+ _hue = generateColorScale(_hue);
743
669
  retVal = toHex(_hue, shade, offset, scheme);
744
670
  }
745
671
  }
746
672
  if (retVal && transparency) {
747
- retVal = polished.rgba(retVal, transparency);
673
+ const alpha = transparency > 1 ? opacity[transparency] : transparency;
674
+ if (alpha === undefined) {
675
+ throw new Error('Error: invalid `transparency` parameter');
676
+ }
677
+ retVal = polished.rgba(retVal, alpha);
748
678
  }
749
679
  return retVal;
750
680
  };
@@ -758,6 +688,41 @@ const toProperty = (object, path) => {
758
688
  throw new TypeError(`Error: unexpected '${typeof retVal}' type for color variable "${path}"`);
759
689
  }
760
690
  };
691
+ const fromRgba = value => {
692
+ let retVal;
693
+ const regex = /rgba\s*\(\s*(?<property>[#\w.]+)\s*,\s*(?<alpha>[\w.]+)\s*\)/gu;
694
+ const _rgba = regex.exec(value);
695
+ if (_rgba && _rgba.groups) {
696
+ const property = _rgba.groups.property;
697
+ const transparency = parseFloat(_rgba.groups.alpha);
698
+ retVal = {
699
+ property,
700
+ transparency
701
+ };
702
+ } else {
703
+ throw new Error(`Error: invalid \`rgba\` value "${value}"`);
704
+ }
705
+ return retVal;
706
+ };
707
+ const fromVariable = (variable, variables, palette) => {
708
+ const retVal = {};
709
+ let property = toProperty(variables, variable);
710
+ if (property.startsWith('rgba')) {
711
+ const value = fromRgba(property);
712
+ property = value.property;
713
+ retVal.transparency = value.transparency;
714
+ }
715
+ const [key, value] = property.split(/\.(?<value>.*)/u);
716
+ if (key === 'palette') {
717
+ retVal.hue = toProperty(palette, value);
718
+ } else {
719
+ retVal.hue = key;
720
+ if (value !== undefined) {
721
+ retVal.shade = parseInt(value, 10);
722
+ }
723
+ }
724
+ return retVal;
725
+ };
761
726
  const getColor = memoize__default.default(_ref => {
762
727
  let {
763
728
  dark,
@@ -781,20 +746,17 @@ const getColor = memoize__default.default(_ref => {
781
746
  let _hue = mode?.hue || hue;
782
747
  let _shade = mode?.shade === undefined ? shade : mode.shade;
783
748
  const _offset = mode?.offset === undefined ? offset : mode.offset;
784
- const _transparency = mode?.transparency === undefined ? transparency : mode.transparency;
749
+ let _transparency = mode?.transparency === undefined ? transparency : mode.transparency;
785
750
  if (variable) {
786
751
  const _variables = variables?.[scheme] ? variables[scheme] : DEFAULT_THEME.colors.variables[scheme];
787
- const property = toProperty(_variables, variable);
788
- const [key, value] = property.split(/\.(?<value>.*)/u);
789
- if (key === 'palette') {
790
- _hue = toProperty(palette, value);
791
- } else {
792
- _hue = key;
793
- _shade = parseInt(value, 10);
794
- }
752
+ const value = fromVariable(variable, _variables, palette);
753
+ _hue = value.hue;
754
+ _shade = value.shade;
755
+ _transparency = _transparency === undefined ? value.transparency : _transparency;
795
756
  }
796
757
  if (_hue) {
797
- retVal = toColor(colors, palette, scheme, _hue, _shade, _offset, _transparency);
758
+ const opacity = theme.opacity && Object.keys(theme.opacity).length > 0 ? theme.opacity : DEFAULT_THEME.opacity;
759
+ retVal = toColor(colors, palette, opacity, scheme, _hue, _shade, _offset, _transparency);
798
760
  }
799
761
  if (retVal === undefined) {
800
762
  throw new Error('Error: invalid `getColor` parameters');
@@ -819,11 +781,185 @@ const getColor = memoize__default.default(_ref => {
819
781
  shade,
820
782
  colors: theme.colors,
821
783
  palette: theme.palette,
784
+ opacity: theme.opacity,
822
785
  transparency,
823
786
  variable
824
787
  });
825
788
  });
826
789
 
790
+ const getCheckeredBackground = _ref => {
791
+ let {
792
+ theme,
793
+ size,
794
+ overlay,
795
+ positionY = 0,
796
+ repeat = 'repeat'
797
+ } = _ref;
798
+ const color = getColor({
799
+ theme,
800
+ variable: 'border.default'
801
+ });
802
+ const dimensions = `${size}px ${size}px`;
803
+ const positionX1 = theme.rtl ? '100%' : '0';
804
+ const positionX2 = theme.rtl ? `calc(100% - ${size / 2}px)` : `${size / 2}px`;
805
+ const position1 = `${positionX1} ${positionY}px`;
806
+ const position2 = `${positionX2} ${size / 2 + positionY}px`;
807
+ const position3 = `${positionX2} ${positionY}px`;
808
+ const position4 = `${positionX1} ${size / -2 + positionY}px`;
809
+ let retVal = `
810
+ linear-gradient(45deg, ${color} 25%, transparent 25%) ${position1} / ${dimensions} ${repeat},
811
+ linear-gradient(45deg, transparent 75%, ${color} 75%) ${position2} / ${dimensions} ${repeat},
812
+ linear-gradient(135deg, ${color} 25%, transparent 25%) ${position3} / ${dimensions} ${repeat},
813
+ linear-gradient(135deg, transparent 75%, ${color} 75%) ${position4} / ${dimensions} ${repeat}
814
+ `;
815
+ if (overlay) {
816
+ retVal = overlay.startsWith('linear-gradient') ? `${overlay}, ${retVal}` : `linear-gradient(${overlay}, ${overlay}), ${retVal}`;
817
+ }
818
+ return retVal;
819
+ };
820
+
821
+ const PALETTE_V8 = {
822
+ black: '#000',
823
+ white: '#fff',
824
+ product: {
825
+ support: '#00a656',
826
+ message: '#37b8af',
827
+ explore: '#30aabc',
828
+ gather: '#f6c8be',
829
+ guide: '#eb4962',
830
+ connect: '#ff6224',
831
+ chat: '#f79a3e',
832
+ talk: '#efc93d',
833
+ sell: '#c38f00'
834
+ },
835
+ grey: {
836
+ 100: '#f8f9f9',
837
+ 200: '#e9ebed',
838
+ 300: '#d8dcde',
839
+ 400: '#c2c8cc',
840
+ 500: '#87929d',
841
+ 600: '#68737d',
842
+ 700: '#49545c',
843
+ 800: '#2f3941'
844
+ },
845
+ blue: {
846
+ 100: '#edf7ff',
847
+ 200: '#cee2f2',
848
+ 300: '#adcce4',
849
+ 400: '#5293c7',
850
+ 500: '#337fbd',
851
+ 600: '#1f73b7',
852
+ 700: '#144a75',
853
+ 800: '#0f3554'
854
+ },
855
+ red: {
856
+ 100: '#fff0f1',
857
+ 200: '#f5d5d8',
858
+ 300: '#f5b5ba',
859
+ 400: '#e35b66',
860
+ 500: '#d93f4c',
861
+ 600: '#cc3340',
862
+ 700: '#8c232c',
863
+ 800: '#681219'
864
+ },
865
+ yellow: {
866
+ 100: '#fff7ed',
867
+ 200: '#ffeedb',
868
+ 300: '#fed6a8',
869
+ 400: '#ffb057',
870
+ 500: '#f79a3e',
871
+ 600: '#ed8f1c',
872
+ 700: '#ad5918',
873
+ 800: '#703815'
874
+ },
875
+ green: {
876
+ 100: '#edf8f4',
877
+ 200: '#d1e8df',
878
+ 300: '#aecfc2',
879
+ 400: '#5eae91',
880
+ 500: '#228f67',
881
+ 600: '#038153',
882
+ 700: '#186146',
883
+ 800: '#0b3b29'
884
+ },
885
+ kale: {
886
+ 100: '#f5fcfc',
887
+ 200: '#daeded',
888
+ 300: '#bdd9d7',
889
+ 400: '#90bbbb',
890
+ 500: '#498283',
891
+ 600: '#17494d',
892
+ 700: '#03363d',
893
+ 800: '#012b30'
894
+ },
895
+ fuschia: {
896
+ 400: '#d653c2',
897
+ 600: '#a81897',
898
+ M400: '#cf62a8',
899
+ M600: '#a8458c'
900
+ },
901
+ pink: {
902
+ 400: '#ec4d63',
903
+ 600: '#d42054',
904
+ M400: '#d57287',
905
+ M600: '#b23a5d'
906
+ },
907
+ crimson: {
908
+ 400: '#e34f32',
909
+ 600: '#c72a1c',
910
+ M400: '#cc6c5b',
911
+ M600: '#b24a3c'
912
+ },
913
+ orange: {
914
+ 400: '#de701d',
915
+ 600: '#bf5000',
916
+ M400: '#d4772c',
917
+ M600: '#b35827'
918
+ },
919
+ lemon: {
920
+ 400: '#ffd424',
921
+ 600: '#ffbb10',
922
+ M400: '#e7a500',
923
+ M600: '#c38f00'
924
+ },
925
+ lime: {
926
+ 400: '#43b324',
927
+ 600: '#2e8200',
928
+ M400: '#519e2d',
929
+ M600: '#47782c'
930
+ },
931
+ mint: {
932
+ 400: '#00a656',
933
+ 600: '#058541',
934
+ M400: '#299c66',
935
+ M600: '#2e8057'
936
+ },
937
+ teal: {
938
+ 400: '#02a191',
939
+ 600: '#028079',
940
+ M400: '#2d9e8f',
941
+ M600: '#3c7873'
942
+ },
943
+ azure: {
944
+ 400: '#3091ec',
945
+ 600: '#1371d6',
946
+ M400: '#5f8dcf',
947
+ M600: '#3a70b2'
948
+ },
949
+ royal: {
950
+ 400: '#5d7df5',
951
+ 600: '#3353e2',
952
+ M400: '#7986d8',
953
+ M600: '#4b61c3'
954
+ },
955
+ purple: {
956
+ 400: '#b552e2',
957
+ 600: '#6a27b8',
958
+ M400: '#b072cc',
959
+ M600: '#9358b0'
960
+ }
961
+ };
962
+
827
963
  const DEFAULT_SHADE = 600;
828
964
  const adjust = (color, expected, actual) => {
829
965
  if (expected !== actual) {
@@ -1032,58 +1168,47 @@ function mediaQuery(query, breakpoint, theme) {
1032
1168
  return retVal;
1033
1169
  }
1034
1170
 
1035
- const exponentialSymbols = {
1036
- symbols: {
1037
- sqrt: {
1038
- func: {
1039
- symbol: 'sqrt',
1040
- f: a => Math.sqrt(a),
1041
- notation: 'func',
1042
- precedence: 0,
1043
- rightToLeft: 0,
1044
- argCount: 1
1045
- },
1046
- symbol: 'sqrt',
1047
- regSymbol: 'sqrt\\b'
1048
- }
1049
- }
1050
- };
1051
1171
  const animationStyles$1 = (position, modifier) => {
1052
1172
  const property = position.split('-')[0];
1053
- const animationName = styledComponents.keyframes(["0%,66%{", ":2px;border:transparent;}"], property);
1054
- return styledComponents.css(["&", "::before,&", "::after{animation:0.3s ease-in-out ", ";}"], modifier, modifier, animationName);
1173
+ const animationName = styled.keyframes(["0%,66%{", ":2px;border:transparent;}"], property);
1174
+ return styled.css(["&", "::before,&", "::after{animation:0.3s ease-in-out ", ";}"], modifier, modifier, animationName);
1055
1175
  };
1056
- const positionStyles = (position, size, inset) => {
1057
- const margin = polished.math(`${size} / -2`);
1058
- const placement = polished.math(`${margin} + ${inset}`);
1059
- let clipPath;
1176
+ const positionStyles = (position, size, inset, shift) => {
1177
+ const defaultInset = 0.3;
1178
+ const margin = size / -2;
1179
+ const placement = Math.round((margin + inset + defaultInset) * 100) / 100;
1180
+ const marginPx = `${margin}px`;
1181
+ const placementPx = `${placement}px`;
1182
+ const offsetPx = `${size + shift}px`;
1060
1183
  let positionCss;
1061
- let propertyRadius;
1184
+ let transform;
1062
1185
  if (position.startsWith('top')) {
1063
- propertyRadius = 'border-bottom-right-radius';
1064
- clipPath = 'polygon(100% 0, 100% 1px, 1px 100%, 0 100%, 0 0)';
1065
- positionCss = styledComponents.css(["top:", ";right:", ";left:", ";margin-left:", ";"], placement, position === 'top-right' && size, position === 'top' ? '50%' : position === 'top-left' && size, position === 'top' && margin);
1186
+ transform = 'rotate(-135deg)';
1187
+ positionCss = styled.css(["top:", ";right:", ";left:", ";margin-left:", ";"], placementPx, position === 'top-right' && offsetPx, position === 'top' ? '50%' : position === 'top-left' && offsetPx, position === 'top' && marginPx);
1066
1188
  } else if (position.startsWith('right')) {
1067
- propertyRadius = 'border-bottom-left-radius';
1068
- clipPath = 'polygon(100% 0, 100% 100%, calc(100% - 1px) 100%, 0 1px, 0 0)';
1069
- positionCss = styledComponents.css(["top:", ";right:", ";bottom:", ";margin-top:", ";"], position === 'right' ? '50%' : position === 'right-top' && size, placement, position === 'right-bottom' && size, position === 'right' && margin);
1189
+ transform = 'rotate(-45deg)';
1190
+ positionCss = styled.css(["top:", ";right:", ";bottom:", ";margin-top:", ";"], position === 'right' ? '50%' : position === 'right-top' && offsetPx, placementPx, position === 'right-bottom' && offsetPx, position === 'right' && marginPx);
1070
1191
  } else if (position.startsWith('bottom')) {
1071
- propertyRadius = 'border-top-left-radius';
1072
- clipPath = 'polygon(100% 0, calc(100% - 1px) 0, 0 calc(100% - 1px), 0 100%, 100% 100%)';
1073
- positionCss = styledComponents.css(["right:", ";bottom:", ";left:", ";margin-left:", ";"], position === 'bottom-right' && size, placement, position === 'bottom' ? '50%' : position === 'bottom-left' && size, position === 'bottom' && margin);
1192
+ transform = 'rotate(45deg)';
1193
+ positionCss = styled.css(["right:", ";bottom:", ";left:", ";margin-left:", ";"], position === 'bottom-right' && offsetPx, placementPx, position === 'bottom' ? '50%' : position === 'bottom-left' && offsetPx, position === 'bottom' && marginPx);
1074
1194
  } else if (position.startsWith('left')) {
1075
- propertyRadius = 'border-top-right-radius';
1076
- clipPath = 'polygon(0 100%, 100% 100%, 100% calc(100% - 1px), 1px 0, 0 0)';
1077
- positionCss = styledComponents.css(["top:", ";bottom:", ";left:", ";margin-top:", ";"], position === 'left' ? '50%' : position === 'left-top' && size, size, placement, position === 'left' && margin);
1195
+ transform = 'rotate(135deg)';
1196
+ positionCss = styled.css(["top:", ";bottom:", ";left:", ";margin-top:", ";"], position === 'left' ? '50%' : position === 'left-top' && offsetPx, offsetPx, placementPx, position === 'left' && marginPx);
1078
1197
  }
1079
- return styledComponents.css(["&::before{", ":100%;clip-path:", ";}&::before,&::after{", "}"], propertyRadius, clipPath, positionCss);
1198
+ return styled.css(["&::before,&::after{transform:", ";", ";}"], transform, positionCss);
1080
1199
  };
1081
1200
  function arrowStyles(position) {
1082
1201
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1083
- const size = options.size || '6px';
1084
- const inset = options.inset || '0';
1085
- const squareSize = polished.math(`${size} * 2 / sqrt(2)`, exponentialSymbols);
1086
- return styledComponents.css(["position:relative;&::before{border-width:inherit;border-style:inherit;border-color:transparent;background-clip:content-box;}&::after{z-index:-1;border:inherit;box-shadow:inherit;}&::before,&::after{position:absolute;transform:rotate(45deg);background-color:inherit;box-sizing:inherit;width:", ";height:", ";content:'';}", ";", ";"], squareSize, squareSize, positionStyles(position, squareSize, inset), options.animationModifier && animationStyles$1(position, options.animationModifier));
1202
+ const inset = polished.stripUnit(options.inset || '0');
1203
+ const size = polished.stripUnit(options.size || '6');
1204
+ const shift = polished.stripUnit(options.shift || '0');
1205
+ const sizeOffset = 2;
1206
+ const squareSize = size * 2 / Math.sqrt(2) + sizeOffset;
1207
+ const squareSizeRounded = Math.round(squareSize * 100) / 100;
1208
+ const squareSizePx = `${squareSizeRounded}px`;
1209
+ const afterOffset = 0;
1210
+ const beforeOffset = afterOffset + 2;
1211
+ return styled.css(["position:relative;&::before,&::after{position:absolute;border-width:inherit;border-style:inherit;background-color:inherit;width:", ";height:", ";content:'';box-sizing:inherit;}&::before{border-color:inherit;clip-path:polygon(100% ", "px,", "px 100%,100% 100%);}&::after{border-color:transparent;background-clip:content-box;clip-path:polygon(100% ", "px,", "px 100%,100% 100%);}", ";", ";"], squareSizePx, squareSizePx, beforeOffset, beforeOffset, afterOffset, afterOffset, positionStyles(position, squareSizeRounded, inset, shift), options.animationModifier && animationStyles$1(position, options.animationModifier));
1087
1212
  }
1088
1213
 
1089
1214
  const useDocument = theme => {
@@ -1145,12 +1270,33 @@ const animationStyles = (position, options) => {
1145
1270
  } else {
1146
1271
  transformFunction = 'translateX';
1147
1272
  }
1148
- const animationName = styledComponents.keyframes(["0%{transform:", "(", ");}"], transformFunction, translateValue);
1149
- return styledComponents.css(["&", " ", "{animation:0.2s cubic-bezier(0.15,0.85,0.35,1.2) ", ";}"], options.animationModifier, options.childSelector || '> *', animationName);
1273
+ const animationName = styled.keyframes(["0%{transform:", "(", ");pointer-events:none;}100%{pointer-events:auto;}"], transformFunction, translateValue);
1274
+ return styled.css(["&", " ", "{animation:0.2s cubic-bezier(0.15,0.85,0.35,1.2) ", ";}"], options.animationModifier, options.childSelector || '> *', animationName);
1275
+ };
1276
+ const colorStyles = theme => {
1277
+ const backgroundColor = getColor({
1278
+ theme,
1279
+ variable: 'background.raised'
1280
+ });
1281
+ const borderColor = getColor({
1282
+ theme,
1283
+ variable: 'border.default'
1284
+ });
1285
+ const boxShadowColor = getColor({
1286
+ variable: 'shadow.medium',
1287
+ theme
1288
+ });
1289
+ const boxShadowBlurRadius = `${theme.space.base * (theme.colors.base === 'dark' ? 5 : 6)}px`;
1290
+ const boxShadowOffsetY = `${theme.space.base * (theme.colors.base === 'dark' ? 4 : 5)}px`;
1291
+ const foregroundColor = getColor({
1292
+ theme,
1293
+ variable: 'foreground.default'
1294
+ });
1295
+ return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";color:", ";"], borderColor, theme.shadows.lg(boxShadowOffsetY, boxShadowBlurRadius, boxShadowColor), backgroundColor, foregroundColor);
1150
1296
  };
1151
1297
  const hiddenStyles = options => {
1152
1298
  const transition = 'opacity 0.2s ease-in-out, 0.2s visibility 0s linear';
1153
- return styledComponents.css(["transition:", ";visibility:hidden;opacity:0;"], options.animationModifier && transition);
1299
+ return styled.css(["transition:", ";visibility:hidden;opacity:0;"], options.animationModifier && transition);
1154
1300
  };
1155
1301
  function menuStyles(position) {
1156
1302
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -1165,21 +1311,7 @@ function menuStyles(position) {
1165
1311
  } else {
1166
1312
  marginProperty = 'margin-right';
1167
1313
  }
1168
- return styledComponents.css(["position:absolute;z-index:", ";", ":", ";line-height:0;font-size:0.01px;& ", "{display:inline-block;position:relative;margin:0;box-sizing:border-box;border:", " ", ";border-radius:", ";box-shadow:", ";background-color:", ";cursor:default;padding:0;text-align:", ";white-space:normal;color:", ";font-size:", ";font-weight:", ";direction:", ";:focus{outline:none;}}", ";", ";"], options.zIndex || 0, marginProperty, options.margin, options.childSelector || '> *', theme.borders.sm, getColor({
1169
- theme,
1170
- variable: 'border.default'
1171
- }), theme.borderRadii.md, theme.shadows.lg(`${theme.space.base * 5}px`, `${theme.space.base * 7.5}px`, getColor({
1172
- theme,
1173
- hue: 'chromeHue',
1174
- shade: 600,
1175
- transparency: 0.15
1176
- })), getColor({
1177
- theme,
1178
- variable: 'background.raised'
1179
- }), theme.rtl ? 'right' : 'left', getColor({
1180
- theme,
1181
- variable: 'foreground.default'
1182
- }), theme.fontSizes.md, theme.fontWeights.regular, theme.rtl && 'rtl', options.animationModifier && animationStyles(position, options), options.hidden && hiddenStyles(options));
1314
+ return styled.css(["position:absolute;z-index:", ";", ":", ";line-height:0;font-size:0.01px;color-scheme:only ", ";& ", "{display:inline-block;position:relative;margin:0;box-sizing:border-box;border:", ";border-radius:", ";cursor:default;padding:0;text-align:", ";white-space:normal;font-size:", ";font-weight:", ";direction:", ";", ";:focus{outline:none;}}", ";", ";"], options.zIndex || 0, marginProperty, options.margin, p => p.theme.colors.base, options.childSelector || '> *', theme.borders.sm, theme.borderRadii.md, theme.rtl ? 'right' : 'left', theme.fontSizes.md, theme.fontWeights.regular, theme.rtl && 'rtl', colorStyles(theme), options.animationModifier && animationStyles(position, options), options.hidden && hiddenStyles(options));
1183
1315
  }
1184
1316
 
1185
1317
  const SELECTOR_FOCUS_VISIBLE = '&:focus-visible';
@@ -1211,9 +1343,21 @@ const focusStyles = _ref => {
1211
1343
  outline = `${polished.math(`${theme.shadowWidths[shadowWidth]} - ${theme.shadowWidths[spacerWidth]}`)} solid transparent`;
1212
1344
  outlineOffset = theme.shadowWidths[spacerWidth];
1213
1345
  }
1214
- return styledComponents.css(["&:focus{outline:none;}", "{outline:", ";outline-offset:", ";box-shadow:", ";", "}"], selector, outline, outlineOffset, _boxShadow, styles);
1346
+ return styled.css(["&:focus{outline:none;}", "{outline:", ";outline-offset:", ";box-shadow:", ";", "}"], selector, outline, outlineOffset, _boxShadow, styles);
1215
1347
  };
1216
1348
 
1349
+ const StyledBaseIcon = styled__default.default(_ref => {
1350
+ let {
1351
+ children,
1352
+ theme,
1353
+ ...props
1354
+ } = _ref;
1355
+ return React__default.default.cloneElement(React.Children.only(children), props);
1356
+ }).withConfig({
1357
+ displayName: "StyledBaseIcon",
1358
+ componentId: "sc-1moykgb-0"
1359
+ })([""]);
1360
+
1217
1361
  const ARROW_POSITION = ['top', 'top-left', 'top-right', 'right', 'right-top', 'right-bottom', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-top', 'left-bottom'];
1218
1362
  const MENU_POSITION = ['top', 'right', 'bottom', 'left'];
1219
1363
  const PLACEMENT = ['top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'end', 'end-top', 'end-bottom', 'start', 'start-top', 'start-bottom'];
@@ -1222,13 +1366,14 @@ exports.ARROW_POSITION = ARROW_POSITION;
1222
1366
  exports.DEFAULT_THEME = DEFAULT_THEME;
1223
1367
  exports.MENU_POSITION = MENU_POSITION;
1224
1368
  exports.PALETTE = PALETTE;
1225
- exports.PALETTE_V8 = PALETTE_V8;
1226
1369
  exports.PLACEMENT = PLACEMENT;
1227
1370
  exports.SELECTOR_FOCUS_VISIBLE = SELECTOR_FOCUS_VISIBLE;
1371
+ exports.StyledBaseIcon = StyledBaseIcon;
1228
1372
  exports.ThemeProvider = ThemeProvider;
1229
1373
  exports.arrowStyles = arrowStyles;
1230
1374
  exports.focusStyles = focusStyles;
1231
1375
  exports.getArrowPosition = getArrowPosition;
1376
+ exports.getCheckeredBackground = getCheckeredBackground;
1232
1377
  exports.getColor = getColor;
1233
1378
  exports.getColorV8 = getColorV8;
1234
1379
  exports.getFloatingPlacements = getFloatingPlacements;