@atlaskit/ds-explorations 2.3.2 → 2.4.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/box/package.json +15 -0
  3. package/dist/cjs/components/box.partial.js +620 -0
  4. package/dist/cjs/components/inline.partial.js +182 -0
  5. package/dist/cjs/components/stack.partial.js +148 -0
  6. package/dist/cjs/index.js +21 -0
  7. package/dist/es2019/components/box.partial.js +614 -0
  8. package/dist/es2019/components/inline.partial.js +177 -0
  9. package/dist/es2019/components/stack.partial.js +144 -0
  10. package/dist/es2019/index.js +3 -0
  11. package/dist/esm/components/box.partial.js +617 -0
  12. package/dist/esm/components/inline.partial.js +177 -0
  13. package/dist/esm/components/stack.partial.js +143 -0
  14. package/dist/esm/index.js +3 -0
  15. package/dist/types/components/box.partial.d.ts +357 -0
  16. package/dist/types/components/inline.partial.d.ts +108 -0
  17. package/dist/types/components/stack.partial.d.ts +92 -0
  18. package/dist/types/components/surface-provider.d.ts +2 -2
  19. package/dist/types/index.d.ts +6 -0
  20. package/dist/types-ts4.5/components/box.partial.d.ts +357 -0
  21. package/dist/types-ts4.5/components/inline.partial.d.ts +108 -0
  22. package/dist/types-ts4.5/components/stack.partial.d.ts +92 -0
  23. package/dist/types-ts4.5/components/surface-provider.d.ts +2 -2
  24. package/dist/types-ts4.5/index.d.ts +6 -0
  25. package/examples/00-basic.tsx +22 -0
  26. package/examples/01-box.tsx +171 -0
  27. package/examples/02-text-advanced.tsx +20 -11
  28. package/examples/02-text.tsx +10 -15
  29. package/examples/03-stack.tsx +99 -0
  30. package/examples/04-inline.tsx +99 -0
  31. package/examples/05-badge.tsx +5 -9
  32. package/examples/06-section-message.tsx +4 -2
  33. package/examples/07-comment.tsx +3 -1
  34. package/examples/08-lozenge.tsx +4 -8
  35. package/examples/99-interactions.tsx +33 -49
  36. package/inline/package.json +15 -0
  37. package/package.json +5 -3
  38. package/report.api.md +465 -0
  39. package/scripts/codegen-styles.tsx +89 -16
  40. package/src/components/__tests__/unit/box.test.tsx +55 -0
  41. package/src/components/__tests__/unit/inline.test.tsx +43 -0
  42. package/src/components/__tests__/unit/interaction-suface.test.tsx +2 -2
  43. package/src/components/__tests__/unit/stack.test.tsx +31 -0
  44. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +3 -0
  45. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +3 -0
  46. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +3 -0
  47. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +3 -0
  48. package/src/components/__tests__/visual-regression/inline-snapshot-test.tsx +28 -0
  49. package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +28 -0
  50. package/src/components/__tests__/vr-tests/__snapshots__/box--default.png +0 -0
  51. package/src/components/__tests__/vr-tests/box-snapshot-test.vr.tsx +6 -0
  52. package/src/components/box.partial.tsx +706 -0
  53. package/src/components/inline.partial.tsx +218 -0
  54. package/src/components/stack.partial.tsx +174 -0
  55. package/src/components/surface-provider.tsx +1 -1
  56. package/src/index.tsx +6 -0
  57. package/stack/package.json +15 -0
  58. package/tmp/api-report-tmp.d.ts +451 -0
  59. package/tsconfig.app.json +0 -3
  60. package/tsconfig.dev.json +6 -0
@@ -0,0 +1,706 @@
1
+ /** @jsx jsx */
2
+ import {
3
+ ComponentPropsWithoutRef,
4
+ ComponentPropsWithRef,
5
+ ElementType,
6
+ FC,
7
+ forwardRef,
8
+ ReactElement,
9
+ ReactNode,
10
+ } from 'react';
11
+
12
+ import { css, jsx } from '@emotion/react';
13
+
14
+ import { token } from '@atlaskit/tokens';
15
+
16
+ import { Layer, LAYERS } from '../constants';
17
+
18
+ import { SurfaceContext } from './surface-provider';
19
+ import type { BasePrimitiveProps } from './types';
20
+
21
+ /**
22
+ * @private
23
+ * @deprecated DSP-8009: This type is scheduled for deletion.
24
+ * Please use `Box` from `@atlaskit/primitives` instead.
25
+ */
26
+ export type BoxProps<T extends ElementType = 'div'> = Omit<
27
+ ComponentPropsWithoutRef<T>,
28
+ 'as' | 'className' | 'style'
29
+ > &
30
+ BasePrimitiveProps &
31
+ BoxPropsBase<T>;
32
+
33
+ type BoxPropsBase<T extends ElementType> = {
34
+ /**
35
+ * The DOM element to render as the Box. Defaults to `div`.
36
+ */
37
+ as?: T;
38
+ /**
39
+ * Elements to be rendered inside the Box.
40
+ */
41
+ children?: ReactNode;
42
+ /**
43
+ * The HTML className attribute.
44
+ *
45
+ * Before using this prop please ensure:
46
+ * - The styles cannot otherwise be achieved through `Box` directly.
47
+ * - The use case needs custom styles that cannot be designed or implemented differently
48
+ *
49
+ * Ensure you're using the `@atlaskit/eslint-plugin-design-system` with this prop to prevent unbounded usage.
50
+ *
51
+ * @see `@atlaskit/eslint-plugin-design-system`
52
+ */
53
+ className?: string;
54
+ /**
55
+ * Token representing background color with a fallback.
56
+ */
57
+ backgroundColor?: BackgroundColor;
58
+ /**
59
+ * Token representing shadow with a fallback
60
+ */
61
+ shadow?: Shadow;
62
+ /**
63
+ * Defines border style.
64
+ */
65
+ borderStyle?: BorderStyle;
66
+ /**
67
+ * Defines border width.
68
+ */
69
+ borderWidth?: BorderWidth;
70
+ /**
71
+ * Token representing border color with a fallback.
72
+ */
73
+ borderColor?: BorderColor;
74
+ /**
75
+ * Defines border radius.
76
+ */
77
+ borderRadius?: BorderRadius;
78
+ /**
79
+ * Used for providing a z-index.
80
+ */
81
+ layer?: Layer;
82
+ /**
83
+ * Defines the main axis direction.
84
+ * @deprecated
85
+ */
86
+ flexDirection?: FlexDirection;
87
+ /**
88
+ * Used to align children along the cross axis.
89
+ * @deprecated
90
+ */
91
+ alignItems?: FlexAlignItems;
92
+ /**
93
+ * Used to align children along the main axis.
94
+ * @deprecated
95
+ */
96
+ justifyContent?: FlexJustifyContent;
97
+ /**
98
+ * Defines what happens if content overflows the box.
99
+ */
100
+ overflow?: Overflow;
101
+ /**
102
+ * Shorthand for `paddingBlock` and `paddingInline` together.
103
+ *
104
+ * @see paddingBlock
105
+ * @see paddingInline
106
+ */
107
+ padding?: Padding;
108
+ /**
109
+ * Token representing CSS `paddingBlock`.
110
+ */
111
+ paddingBlock?: PaddingBlock;
112
+ /**
113
+ * Token representing CSS `paddingInline`.
114
+ */
115
+ paddingInline?: PaddingInline;
116
+ /**
117
+ * Token representing width.
118
+ * @experimental The existing tokens will be replaced to better reflect dimensions.
119
+ */
120
+ width?: Width;
121
+ /**
122
+ * Token representing height.
123
+ * @experimental The existing tokens will be replaced to better reflect dimensions.
124
+ */
125
+ height?: Height;
126
+ /**
127
+ * Defines display type and layout. Defaults to `flex`.
128
+ */
129
+ display?: Display;
130
+ /**
131
+ * CSS position property.
132
+ */
133
+ position?: Position;
134
+ ref?: ComponentPropsWithRef<T>['ref'];
135
+ };
136
+
137
+ // Without this type annotation on Box we don't get autocomplete for props due to forwardRef types
138
+ type BoxComponent<T extends ElementType = 'div'> = (<
139
+ T extends ElementType = 'div',
140
+ >(
141
+ props: BoxProps<T>,
142
+ ) => ReactElement | null) &
143
+ FC<BoxProps<T>>;
144
+
145
+ /**
146
+ * __Box__
147
+ *
148
+ * Box is a primitive component that has the design decisions of the Atlassian Design System baked in.
149
+ * Renders a `div` by default.
150
+ *
151
+ * @private
152
+ * @deprecated DSP-8009: This primitive is scheduled for deletion.
153
+ * Please use `Box` from `@atlaskit/primitives` instead.
154
+ */
155
+ export const Box: BoxComponent = forwardRef(
156
+ <T extends ElementType = 'div'>(
157
+ {
158
+ children,
159
+ as,
160
+ className,
161
+ display = 'flex',
162
+ flexDirection,
163
+ alignItems,
164
+ justifyContent,
165
+ backgroundColor,
166
+ borderColor,
167
+ borderStyle,
168
+ borderWidth,
169
+ borderRadius,
170
+ shadow,
171
+ layer,
172
+ padding,
173
+ paddingBlock,
174
+ paddingInline,
175
+ position = 'relative',
176
+ height,
177
+ overflow,
178
+ width,
179
+ UNSAFE_style,
180
+ testId,
181
+ ...htmlAttributes
182
+ }: BoxProps<T>,
183
+ ref?: ComponentPropsWithRef<T>['ref'],
184
+ ) => {
185
+ const Component = as || 'div';
186
+ const node = (
187
+ <Component
188
+ style={UNSAFE_style}
189
+ ref={ref}
190
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
191
+ {...htmlAttributes}
192
+ className={className}
193
+ css={[
194
+ baseStyles,
195
+ display && displayMap[display],
196
+ padding && paddingMap[padding],
197
+ position && positionMap[position],
198
+ paddingBlock && paddingBlockMap[paddingBlock],
199
+ paddingInline && paddingInlineMap[paddingInline],
200
+ alignItems && flexAlignItemsMap[alignItems],
201
+ justifyContent && flexJustifyContentMap[justifyContent],
202
+ backgroundColor && backgroundColorMap[backgroundColor],
203
+ borderColor && borderColorMap[borderColor],
204
+ borderStyle && borderStyleMap[borderStyle],
205
+ borderWidth && borderWidthMap[borderWidth],
206
+ borderRadius && borderRadiusMap[borderRadius],
207
+ shadow && shadowMap[shadow],
208
+ layer && layerMap[layer],
209
+ flexDirection && flexDirectionMap[flexDirection],
210
+ overflow && overflowMap[overflow],
211
+ width && widthMap[width],
212
+ height && heightMap[height],
213
+ ]}
214
+ data-testid={testId}
215
+ >
216
+ {children}
217
+ </Component>
218
+ );
219
+
220
+ return backgroundColor ? (
221
+ <SurfaceContext.Provider value={backgroundColor}>
222
+ {node}
223
+ </SurfaceContext.Provider>
224
+ ) : (
225
+ node
226
+ );
227
+ },
228
+ );
229
+
230
+ Box.displayName = 'Box';
231
+
232
+ export default Box;
233
+
234
+ // <<< STYLES GO HERE >>>
235
+ type BorderStyle = keyof typeof borderStyleMap;
236
+ const borderStyleMap = {
237
+ none: css({ borderStyle: 'none' }),
238
+ solid: css({ borderStyle: 'solid' }),
239
+ dashed: css({ borderStyle: 'dashed' }),
240
+ dotted: css({ borderStyle: 'dotted' }),
241
+ };
242
+
243
+ type BorderWidth = keyof typeof borderWidthMap;
244
+ const borderWidthMap = {
245
+ '0px': css({ borderWidth: '0px' }),
246
+ '1px': css({ borderWidth: '1px' }),
247
+ '2px': css({ borderWidth: '2px' }),
248
+ '3px': css({ borderWidth: '3px' }),
249
+ };
250
+
251
+ type BorderRadius = keyof typeof borderRadiusMap;
252
+ const borderRadiusMap = {
253
+ normal: css({ borderRadius: '3px' }),
254
+ rounded: css({ borderRadius: '50%' }),
255
+ badge: css({ borderRadius: '8px' }),
256
+ };
257
+
258
+ /**
259
+ * @experimental - this is likely to be removed
260
+ */
261
+ type FlexDirection = keyof typeof flexDirectionMap;
262
+ const flexDirectionMap = {
263
+ column: css({ flexDirection: 'column' }),
264
+ row: css({ flexDirection: 'row' }),
265
+ };
266
+
267
+ /**
268
+ * @experimental - this is likely to be removed
269
+ */
270
+ type FlexAlignItems = keyof typeof flexAlignItemsMap;
271
+ const flexAlignItemsMap = {
272
+ center: css({ alignItems: 'center' }),
273
+ baseline: css({ alignItems: 'baseline' }),
274
+ flexStart: css({ alignItems: 'flex-start' }),
275
+ flexEnd: css({ alignItems: 'flex-end' }),
276
+ start: css({ alignItems: 'start' }),
277
+ end: css({ alignItems: 'end' }),
278
+ };
279
+
280
+ /**
281
+ * @experimental - this is likely to be removed
282
+ */
283
+ type FlexJustifyContent = keyof typeof flexJustifyContentMap;
284
+ const flexJustifyContentMap = {
285
+ center: css({ justifyContent: 'center' }),
286
+ flexStart: css({ justifyContent: 'flex-start' }),
287
+ flexEnd: css({ justifyContent: 'flex-end' }),
288
+ start: css({ justifyContent: 'start' }),
289
+ end: css({ justifyContent: 'end' }),
290
+ };
291
+
292
+ type Display = keyof typeof displayMap;
293
+ const displayMap = {
294
+ block: css({ display: 'block' }),
295
+ inline: css({ display: 'inline' }),
296
+ flex: css({ display: 'flex' }),
297
+ inlineFlex: css({ display: 'inline-flex' }),
298
+ inlineBlock: css({ display: 'inline-block' }),
299
+ };
300
+
301
+ type Position = keyof typeof positionMap;
302
+ const positionMap = {
303
+ absolute: css({ position: 'absolute' }),
304
+ fixed: css({ position: 'fixed' }),
305
+ relative: css({ position: 'relative' }),
306
+ static: css({ position: 'static' }),
307
+ };
308
+
309
+ type Overflow = keyof typeof overflowMap;
310
+ const overflowMap = {
311
+ auto: css({ overflow: 'auto' }),
312
+ hidden: css({ overflow: 'hidden' }),
313
+ };
314
+
315
+ const baseStyles = css({
316
+ boxSizing: 'border-box',
317
+ appearance: 'none',
318
+ border: 'none',
319
+ });
320
+
321
+ /**
322
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
323
+ * @codegen <<SignedSource::327e769aaa3da9422a919a0ca9490070>>
324
+ * @codegenId dimensions
325
+ * @codegenCommand yarn codegen-styles
326
+ * @codegenParams ["width", "height"]
327
+ */
328
+ const widthMap = {
329
+ '100%': css({ width: '100%' }),
330
+ 'size.100': css({ width: '16px' }),
331
+ 'size.1000': css({ width: '192px' }),
332
+ 'size.200': css({ width: '24px' }),
333
+ 'size.300': css({ width: '32px' }),
334
+ 'size.400': css({ width: '40px' }),
335
+ 'size.500': css({ width: '48px' }),
336
+ 'size.600': css({ width: '96px' }),
337
+ };
338
+
339
+ export type Width = keyof typeof widthMap;
340
+
341
+ const heightMap = {
342
+ '100%': css({ height: '100%' }),
343
+ 'size.100': css({ height: '16px' }),
344
+ 'size.1000': css({ height: '192px' }),
345
+ 'size.200': css({ height: '24px' }),
346
+ 'size.300': css({ height: '32px' }),
347
+ 'size.400': css({ height: '40px' }),
348
+ 'size.500': css({ height: '48px' }),
349
+ 'size.600': css({ height: '96px' }),
350
+ };
351
+
352
+ export type Height = keyof typeof heightMap;
353
+
354
+ /**
355
+ * @codegenEnd
356
+ */
357
+
358
+ /**
359
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
360
+ * @codegen <<SignedSource::8aa9e47916dc6f6d72f32999f48fbd27>>
361
+ * @codegenId spacing
362
+ * @codegenCommand yarn codegen-styles
363
+ * @codegenParams ["padding", "paddingBlock", "paddingInline"]
364
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::298080e8024fb3eb37589721413e0156>>
365
+ */
366
+ const paddingMap = {
367
+ 'space.0': css({
368
+ padding: token('space.0', '0px'),
369
+ }),
370
+ 'space.025': css({
371
+ padding: token('space.025', '2px'),
372
+ }),
373
+ 'space.050': css({
374
+ padding: token('space.050', '4px'),
375
+ }),
376
+ 'space.075': css({
377
+ padding: token('space.075', '6px'),
378
+ }),
379
+ 'space.100': css({
380
+ padding: token('space.100', '8px'),
381
+ }),
382
+ 'space.1000': css({
383
+ padding: token('space.1000', '80px'),
384
+ }),
385
+ 'space.150': css({
386
+ padding: token('space.150', '12px'),
387
+ }),
388
+ 'space.200': css({
389
+ padding: token('space.200', '16px'),
390
+ }),
391
+ 'space.250': css({
392
+ padding: token('space.250', '20px'),
393
+ }),
394
+ 'space.300': css({
395
+ padding: token('space.300', '24px'),
396
+ }),
397
+ 'space.400': css({
398
+ padding: token('space.400', '32px'),
399
+ }),
400
+ 'space.500': css({
401
+ padding: token('space.500', '40px'),
402
+ }),
403
+ 'space.600': css({
404
+ padding: token('space.600', '48px'),
405
+ }),
406
+ 'space.800': css({
407
+ padding: token('space.800', '64px'),
408
+ }),
409
+ };
410
+
411
+ export type Padding = keyof typeof paddingMap;
412
+
413
+ const paddingBlockMap = {
414
+ 'space.0': css({
415
+ paddingBlock: token('space.0', '0px'),
416
+ }),
417
+ 'space.025': css({
418
+ paddingBlock: token('space.025', '2px'),
419
+ }),
420
+ 'space.050': css({
421
+ paddingBlock: token('space.050', '4px'),
422
+ }),
423
+ 'space.075': css({
424
+ paddingBlock: token('space.075', '6px'),
425
+ }),
426
+ 'space.100': css({
427
+ paddingBlock: token('space.100', '8px'),
428
+ }),
429
+ 'space.1000': css({
430
+ paddingBlock: token('space.1000', '80px'),
431
+ }),
432
+ 'space.150': css({
433
+ paddingBlock: token('space.150', '12px'),
434
+ }),
435
+ 'space.200': css({
436
+ paddingBlock: token('space.200', '16px'),
437
+ }),
438
+ 'space.250': css({
439
+ paddingBlock: token('space.250', '20px'),
440
+ }),
441
+ 'space.300': css({
442
+ paddingBlock: token('space.300', '24px'),
443
+ }),
444
+ 'space.400': css({
445
+ paddingBlock: token('space.400', '32px'),
446
+ }),
447
+ 'space.500': css({
448
+ paddingBlock: token('space.500', '40px'),
449
+ }),
450
+ 'space.600': css({
451
+ paddingBlock: token('space.600', '48px'),
452
+ }),
453
+ 'space.800': css({
454
+ paddingBlock: token('space.800', '64px'),
455
+ }),
456
+ };
457
+
458
+ export type PaddingBlock = keyof typeof paddingBlockMap;
459
+
460
+ const paddingInlineMap = {
461
+ 'space.0': css({
462
+ paddingInline: token('space.0', '0px'),
463
+ }),
464
+ 'space.025': css({
465
+ paddingInline: token('space.025', '2px'),
466
+ }),
467
+ 'space.050': css({
468
+ paddingInline: token('space.050', '4px'),
469
+ }),
470
+ 'space.075': css({
471
+ paddingInline: token('space.075', '6px'),
472
+ }),
473
+ 'space.100': css({
474
+ paddingInline: token('space.100', '8px'),
475
+ }),
476
+ 'space.1000': css({
477
+ paddingInline: token('space.1000', '80px'),
478
+ }),
479
+ 'space.150': css({
480
+ paddingInline: token('space.150', '12px'),
481
+ }),
482
+ 'space.200': css({
483
+ paddingInline: token('space.200', '16px'),
484
+ }),
485
+ 'space.250': css({
486
+ paddingInline: token('space.250', '20px'),
487
+ }),
488
+ 'space.300': css({
489
+ paddingInline: token('space.300', '24px'),
490
+ }),
491
+ 'space.400': css({
492
+ paddingInline: token('space.400', '32px'),
493
+ }),
494
+ 'space.500': css({
495
+ paddingInline: token('space.500', '40px'),
496
+ }),
497
+ 'space.600': css({
498
+ paddingInline: token('space.600', '48px'),
499
+ }),
500
+ 'space.800': css({
501
+ paddingInline: token('space.800', '64px'),
502
+ }),
503
+ };
504
+
505
+ export type PaddingInline = keyof typeof paddingInlineMap;
506
+
507
+ /**
508
+ * @codegenEnd
509
+ */
510
+
511
+ /**
512
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
513
+ * @codegen <<SignedSource::1c951d1c65e5ffddea3f0a92075d4614>>
514
+ * @codegenId colors
515
+ * @codegenCommand yarn codegen-styles
516
+ * @codegenParams ["border", "background", "shadow"]
517
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f6a616f7ea03ec40c148fc83050d073b>>
518
+ */
519
+ const borderColorMap = {
520
+ 'color.border': css({
521
+ borderColor: token('color.border', '#091e4221'),
522
+ }),
523
+ disabled: css({
524
+ borderColor: token('color.border.disabled', '#FAFBFC'),
525
+ }),
526
+ focused: css({
527
+ borderColor: token('color.border.focused', '#2684FF'),
528
+ }),
529
+ input: css({
530
+ borderColor: token('color.border.input', '#FAFBFC'),
531
+ }),
532
+ inverse: css({
533
+ borderColor: token('color.border.inverse', '#FFFFFF'),
534
+ }),
535
+ selected: css({
536
+ borderColor: token('color.border.selected', '#0052CC'),
537
+ }),
538
+ brand: css({
539
+ borderColor: token('color.border.brand', '#0052CC'),
540
+ }),
541
+ danger: css({
542
+ borderColor: token('color.border.danger', '#FF5630'),
543
+ }),
544
+ warning: css({
545
+ borderColor: token('color.border.warning', '#FFC400'),
546
+ }),
547
+ success: css({
548
+ borderColor: token('color.border.success', '#00875A'),
549
+ }),
550
+ discovery: css({
551
+ borderColor: token('color.border.discovery', '#998DD9'),
552
+ }),
553
+ information: css({
554
+ borderColor: token('color.border.information', '#0065FF'),
555
+ }),
556
+ bold: css({
557
+ borderColor: token('color.border.bold', '#344563'),
558
+ }),
559
+ } as const;
560
+
561
+ export type BorderColor = keyof typeof borderColorMap;
562
+
563
+ const backgroundColorMap = {
564
+ disabled: css({
565
+ backgroundColor: token('color.background.disabled', '#091e4289'),
566
+ }),
567
+ input: css({
568
+ backgroundColor: token('color.background.input', '#FAFBFC'),
569
+ }),
570
+ 'inverse.subtle': css({
571
+ backgroundColor: token('color.background.inverse.subtle', '#00000029'),
572
+ }),
573
+ neutral: css({
574
+ backgroundColor: token('color.background.neutral', '#DFE1E6'),
575
+ }),
576
+ 'neutral.subtle': css({
577
+ backgroundColor: token('color.background.neutral.subtle', 'transparent'),
578
+ }),
579
+ 'neutral.bold': css({
580
+ backgroundColor: token('color.background.neutral.bold', '#42526E'),
581
+ }),
582
+ selected: css({
583
+ backgroundColor: token('color.background.selected', '#DEEBFF'),
584
+ }),
585
+ 'selected.bold': css({
586
+ backgroundColor: token('color.background.selected.bold', '#0052CC'),
587
+ }),
588
+ 'brand.subtlest': css({
589
+ backgroundColor: token('color.background.brand.subtlest', '#B3D4FF'),
590
+ }),
591
+ 'brand.bold': css({
592
+ backgroundColor: token('color.background.brand.bold', '#0052CC'),
593
+ }),
594
+ 'brand.boldest': css({
595
+ backgroundColor: token('color.background.brand.boldest', '#0747A6'),
596
+ }),
597
+ danger: css({
598
+ backgroundColor: token('color.background.danger', '#FFEBE6'),
599
+ }),
600
+ 'danger.bold': css({
601
+ backgroundColor: token('color.background.danger.bold', '#DE350B'),
602
+ }),
603
+ warning: css({
604
+ backgroundColor: token('color.background.warning', '#FFFAE6'),
605
+ }),
606
+ 'warning.bold': css({
607
+ backgroundColor: token('color.background.warning.bold', '#FFAB00'),
608
+ }),
609
+ success: css({
610
+ backgroundColor: token('color.background.success', '#E3FCEF'),
611
+ }),
612
+ 'success.bold': css({
613
+ backgroundColor: token('color.background.success.bold', '#00875A'),
614
+ }),
615
+ discovery: css({
616
+ backgroundColor: token('color.background.discovery', '#EAE6FF'),
617
+ }),
618
+ 'discovery.bold': css({
619
+ backgroundColor: token('color.background.discovery.bold', '#5243AA'),
620
+ }),
621
+ information: css({
622
+ backgroundColor: token('color.background.information', '#DEEBFF'),
623
+ }),
624
+ 'information.bold': css({
625
+ backgroundColor: token('color.background.information.bold', '#0052CC'),
626
+ }),
627
+ 'color.blanket': css({
628
+ backgroundColor: token('color.blanket', '#091e4289'),
629
+ }),
630
+ 'color.blanket.selected': css({
631
+ backgroundColor: token('color.blanket.selected', '#388BFF14'),
632
+ }),
633
+ 'color.blanket.danger': css({
634
+ backgroundColor: token('color.blanket.danger', '#EF5C4814'),
635
+ }),
636
+ 'elevation.surface': css({
637
+ backgroundColor: token('elevation.surface', '#FFFFFF'),
638
+ }),
639
+ 'elevation.surface.overlay': css({
640
+ backgroundColor: token('elevation.surface.overlay', '#FFFFFF'),
641
+ }),
642
+ 'elevation.surface.raised': css({
643
+ backgroundColor: token('elevation.surface.raised', '#FFFFFF'),
644
+ }),
645
+ 'elevation.surface.sunken': css({
646
+ backgroundColor: token('elevation.surface.sunken', '#F4F5F7'),
647
+ }),
648
+ } as const;
649
+
650
+ export type BackgroundColor = keyof typeof backgroundColorMap;
651
+
652
+ const shadowMap = {
653
+ overflow: css({
654
+ boxShadow: token(
655
+ 'elevation.shadow.overflow',
656
+ '0px 0px 8px #091e423f, 0px 0px 1px #091e424f',
657
+ ),
658
+ }),
659
+ 'overflow.perimeter': css({
660
+ boxShadow: token('elevation.shadow.overflow.perimeter', '#091e421f'),
661
+ }),
662
+ 'overflow.spread': css({
663
+ boxShadow: token('elevation.shadow.overflow.spread', '#091e4229'),
664
+ }),
665
+ overlay: css({
666
+ boxShadow: token(
667
+ 'elevation.shadow.overlay',
668
+ '0px 8px 12px #091e423f, 0px 0px 1px #091e424f',
669
+ ),
670
+ }),
671
+ raised: css({
672
+ boxShadow: token(
673
+ 'elevation.shadow.raised',
674
+ '0px 1px 1px #091e423f, 0px 0px 1px #091e4221',
675
+ ),
676
+ }),
677
+ } as const;
678
+
679
+ export type Shadow = keyof typeof shadowMap;
680
+
681
+ /**
682
+ * @codegenEnd
683
+ */
684
+
685
+ /**
686
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
687
+ * @codegen <<SignedSource::bacbea271b30ec7d2f61306c9a8a9e63>>
688
+ * @codegenId misc
689
+ * @codegenCommand yarn codegen-styles
690
+ * @codegenParams ["layer"]
691
+ */
692
+ const layerMap = {
693
+ card: css({ zIndex: LAYERS['card'] }),
694
+ navigation: css({ zIndex: LAYERS['navigation'] }),
695
+ dialog: css({ zIndex: LAYERS['dialog'] }),
696
+ layer: css({ zIndex: LAYERS['layer'] }),
697
+ blanket: css({ zIndex: LAYERS['blanket'] }),
698
+ modal: css({ zIndex: LAYERS['modal'] }),
699
+ flag: css({ zIndex: LAYERS['flag'] }),
700
+ spotlight: css({ zIndex: LAYERS['spotlight'] }),
701
+ tooltip: css({ zIndex: LAYERS['tooltip'] }),
702
+ };
703
+
704
+ /**
705
+ * @codegenEnd
706
+ */