@atlaskit/primitives 1.4.3 → 1.5.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 (45) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/constellation/heading/code.mdx +19 -0
  3. package/constellation/heading/examples.mdx +28 -0
  4. package/constellation/heading/usage.mdx +21 -0
  5. package/constellation/responsive/usage.mdx +1 -1
  6. package/dist/cjs/components/box.js +1 -1
  7. package/dist/cjs/components/heading-context.js +44 -0
  8. package/dist/cjs/components/heading.js +95 -0
  9. package/dist/cjs/components/internal/surface-provider.js +27 -0
  10. package/dist/cjs/components/text.js +131 -0
  11. package/dist/cjs/xcss/style-maps.partial.js +114 -6
  12. package/dist/es2019/components/box.js +2 -2
  13. package/dist/es2019/components/heading-context.js +35 -0
  14. package/dist/es2019/components/heading.js +87 -0
  15. package/dist/es2019/components/internal/surface-provider.js +19 -0
  16. package/dist/es2019/components/text.js +127 -0
  17. package/dist/es2019/xcss/style-maps.partial.js +92 -4
  18. package/dist/esm/components/box.js +2 -2
  19. package/dist/esm/components/heading-context.js +34 -0
  20. package/dist/esm/components/heading.js +87 -0
  21. package/dist/esm/components/internal/surface-provider.js +19 -0
  22. package/dist/esm/components/text.js +128 -0
  23. package/dist/esm/xcss/style-maps.partial.js +94 -4
  24. package/dist/types/components/heading-context.d.ts +31 -0
  25. package/dist/types/components/heading.d.ts +45 -0
  26. package/dist/types/components/internal/surface-provider.d.ts +15 -0
  27. package/dist/types/components/text.d.ts +57 -0
  28. package/dist/types/xcss/style-maps.partial.d.ts +114 -2
  29. package/dist/types-ts4.5/components/heading-context.d.ts +31 -0
  30. package/dist/types-ts4.5/components/heading.d.ts +45 -0
  31. package/dist/types-ts4.5/components/internal/surface-provider.d.ts +15 -0
  32. package/dist/types-ts4.5/components/text.d.ts +63 -0
  33. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +114 -2
  34. package/extract-react-types/box-props.tsx +3 -1
  35. package/extract-react-types/heading-props.tsx +3 -0
  36. package/heading/package.json +15 -0
  37. package/heading-context/package.json +15 -0
  38. package/package.json +17 -4
  39. package/report.api.md +1 -0
  40. package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +34 -0
  41. package/scripts/__tests__/codegen.test.tsx +4 -0
  42. package/scripts/codegen-styles.tsx +12 -0
  43. package/scripts/color-codegen-template.tsx +9 -0
  44. package/scripts/typography-codegen-template.tsx +107 -0
  45. package/tmp/api-report-tmp.d.ts +1 -0
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { css } from '@emotion/react';
3
+ import { CURRENT_SURFACE_CSS_VAR } from '@atlaskit/tokens';
4
+
3
5
  /**
4
6
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
5
7
  * @codegen <<SignedSource::7af6097e56f7fb03635b6f8aaf121b02>>
@@ -49,10 +51,10 @@ export var spaceMap = {
49
51
  */
50
52
  /**
51
53
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
52
- * @codegen <<SignedSource::3f4d926ce14cda107d25c697f3a0c200>>
54
+ * @codegen <<SignedSource::3db44f53b728773bb3ba1473d4567724>>
53
55
  * @codegenId colors
54
56
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
55
- * @codegenParams ["border", "background", "shadow", "text", "fill"]
57
+ * @codegenParams ["border", "background", "shadow", "text", "fill", "surface"]
56
58
  * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::815ddd719715ae06521cad06e1921e40>>
57
59
  */
58
60
  export var borderColorMap = {
@@ -274,7 +276,8 @@ export var backgroundColorMap = {
274
276
  'elevation.surface.raised': "var(--ds-surface-raised, #FFFFFF)",
275
277
  'elevation.surface.raised.hovered': "var(--ds-surface-raised-hovered, #FAFBFC)",
276
278
  'elevation.surface.raised.pressed': "var(--ds-surface-raised-pressed, #F4F5F7)",
277
- 'elevation.surface.sunken': "var(--ds-surface-sunken, #F4F5F7)"
279
+ 'elevation.surface.sunken': "var(--ds-surface-sunken, #F4F5F7)",
280
+ 'utility.elevation.surface.current': "var(--ds-elevation-surface-current, #FFFFFF)"
278
281
  };
279
282
  export var shadowMap = {
280
283
  'elevation.shadow.overflow': "var(--ds-shadow-overflow, 0px 0px 8px #091e423f, 0px 0px 1px #091e424f)",
@@ -344,6 +347,18 @@ export var fillMap = {
344
347
  'color.icon.information': "var(--ds-icon-information, #0747A6)",
345
348
  'color.icon.subtle': "var(--ds-icon-subtle, #6B778C)"
346
349
  };
350
+ export var surfaceColorMap = {
351
+ 'elevation.surface': "var(--ds-surface, #FFFFFF)",
352
+ 'elevation.surface.hovered': "var(--ds-surface-hovered, #FAFBFC)",
353
+ 'elevation.surface.pressed': "var(--ds-surface-pressed, #F4F5F7)",
354
+ 'elevation.surface.overlay': "var(--ds-surface-overlay, #FFFFFF)",
355
+ 'elevation.surface.overlay.hovered': "var(--ds-surface-overlay-hovered, #FAFBFC)",
356
+ 'elevation.surface.overlay.pressed': "var(--ds-surface-overlay-pressed, #F4F5F7)",
357
+ 'elevation.surface.raised': "var(--ds-surface-raised, #FFFFFF)",
358
+ 'elevation.surface.raised.hovered': "var(--ds-surface-raised-hovered, #FAFBFC)",
359
+ 'elevation.surface.raised.pressed': "var(--ds-surface-raised-pressed, #F4F5F7)",
360
+ 'elevation.surface.sunken': "var(--ds-surface-sunken, #F4F5F7)"
361
+ };
347
362
  /**
348
363
  * @codegenEnd
349
364
  */
@@ -393,6 +408,69 @@ export var borderRadiusMap = {
393
408
  'border.radius.400': "var(--ds-border-radius-400, 16px)",
394
409
  'border.radius.circle': "var(--ds-border-radius-circle, 32032px)"
395
410
  };
411
+ /**
412
+ * @codegenEnd
413
+ */
414
+ /**
415
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
416
+ * @codegen <<SignedSource::752c1b8bdc7db62e519dd729222d57ad>>
417
+ * @codegenId typography
418
+ * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
419
+ * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "heading", "ui"]
420
+ * @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
421
+ * @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
422
+ */
423
+ export var fontSizeMap = {
424
+ 'font.size.050': "var(--ds-font-size-050, 11px)",
425
+ 'font.size.075': "var(--ds-font-size-075, 12px)",
426
+ 'font.size.100': "var(--ds-font-size-100, 14px)",
427
+ 'font.size.200': "var(--ds-font-size-200, 16px)",
428
+ 'font.size.300': "var(--ds-font-size-300, 20px)",
429
+ 'font.size.400': "var(--ds-font-size-400, 24px)",
430
+ 'font.size.500': "var(--ds-font-size-500, 29px)",
431
+ 'font.size.600': "var(--ds-font-size-600, 35px)"
432
+ };
433
+ export var fontWeightMap = {
434
+ 'font.weight.bold': "var(--ds-font-weight-bold, 700)",
435
+ 'font.weight.medium': "var(--ds-font-weight-medium, 500)",
436
+ 'font.weight.regular': "var(--ds-font-weight-regular, 400)",
437
+ 'font.weight.semibold': "var(--ds-font-weight-semibold, 600)"
438
+ };
439
+ export var fontFamilyMap = {
440
+ 'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", system-ui, Ubuntu, \"Helvetica Neue\", sans-serif)",
441
+ 'font.family.brand': "var(--ds-font-family-brand, Charlie Sans)",
442
+ 'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
443
+ 'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", system-ui, Ubuntu, \"Helvetica Neue\", sans-serif)",
444
+ 'font.family.monospace': "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
445
+ 'font.family.sans': "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
446
+ };
447
+ export var lineHeightMap = {
448
+ 'font.lineHeight.1': "var(--ds-font-lineHeight-1, 1)",
449
+ 'font.lineHeight.100': "var(--ds-font-lineHeight-100, 16px)",
450
+ 'font.lineHeight.200': "var(--ds-font-lineHeight-200, 20px)",
451
+ 'font.lineHeight.300': "var(--ds-font-lineHeight-300, 24px)",
452
+ 'font.lineHeight.400': "var(--ds-font-lineHeight-400, 28px)",
453
+ 'font.lineHeight.500': "var(--ds-font-lineHeight-500, 32px)",
454
+ 'font.lineHeight.600': "var(--ds-font-lineHeight-600, 40px)"
455
+ };
456
+ export var bodyTextMap = {
457
+ body: "var(--ds-font-body, normal 400 14px/20px var(--ds-font-family-body))",
458
+ 'body.lg': "var(--ds-font-body-lg, normal 400 16px/24px var(--ds-font-family-body))",
459
+ 'body.sm': "var(--ds-font-body-sm, normal 400 11px/20px var(--ds-font-family-body))"
460
+ };
461
+ export var headingTextMap = {
462
+ 'heading.lg': "var(--ds-font-heading-lg, normal 500 24px/28px var(--ds-font-family-heading))",
463
+ 'heading.md': "var(--ds-font-heading-md, normal 500 20px/24px var(--ds-font-family-heading))",
464
+ 'heading.sm': "var(--ds-font-heading-sm, normal 600 16px/20px var(--ds-font-family-heading))",
465
+ 'heading.xl': "var(--ds-font-heading-xl, normal 600 29px/32px var(--ds-font-family-heading))",
466
+ 'heading.xs': "var(--ds-font-heading-xs, normal 600 14px/16px var(--ds-font-family-heading))",
467
+ 'heading.xxl': "var(--ds-font-heading-xxl, normal 500 35px/40px var(--ds-font-family-heading))",
468
+ 'heading.xxs': "var(--ds-font-heading-xxs, normal 600 12px/16px var(--ds-font-family-heading))"
469
+ };
470
+ export var uiTextMap = {
471
+ ui: "var(--ds-font-ui, normal 400 14px/1 var(--ds-font-family-body))",
472
+ 'ui.sm': "var(--ds-font-ui-sm, normal 400 11px/1 var(--ds-font-family-body))"
473
+ };
396
474
 
397
475
  /**
398
476
  * @codegenEnd
@@ -418,4 +496,16 @@ export var spaceStylesMap = spacingProperties.reduce(function (styleMap, spacing
418
496
  styleMap[spacingProperty] = getSerializedStylesMap(spacingProperty, spaceMap);
419
497
  return styleMap;
420
498
  }, {});
421
- export var backgroundColorStylesMap = getSerializedStylesMap('backgroundColor', backgroundColorMap);
499
+ export var backgroundColorStylesMap = getSerializedStylesMap('backgroundColor', backgroundColorMap);
500
+ export var textColorStylesMap = getSerializedStylesMap('color', textColorMap);
501
+ export var fontSizeStylesMap = getSerializedStylesMap('fontSize', fontSizeMap);
502
+ export var fontWeightStylesMap = getSerializedStylesMap('fontWeight', fontWeightMap);
503
+ export var fontFamilyStylesMap = getSerializedStylesMap('fontFamily', fontFamilyMap);
504
+ export var lineHeightStylesMap = getSerializedStylesMap('lineHeight', lineHeightMap);
505
+ export var headingTextStylesMap = getSerializedStylesMap('font', headingTextMap);
506
+ export var bodyTextStylesMap = getSerializedStylesMap('font', bodyTextMap);
507
+ export var uiTextStylesMap = getSerializedStylesMap('font', uiTextMap);
508
+ export var surfaceColorStylesMap = getSerializedStylesMap(CURRENT_SURFACE_CSS_VAR, surfaceColorMap);
509
+ export var isSurfaceColorToken = function isSurfaceColorToken(color) {
510
+ return surfaceColorMap[color] !== undefined;
511
+ };
@@ -0,0 +1,31 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type HeadingElement = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
3
+ export declare const useHeadingElement: () => HeadingElement;
4
+ export interface HeadingContextProps {
5
+ /**
6
+ * Optional - only apply this value if the intent is to reset the heading context outside the normal content flow, for example inside a `section`.
7
+ */
8
+ value?: HeadingElement;
9
+ /**
10
+ * Semantic heirarchy of content below the heading context.
11
+ */
12
+ children: ReactNode;
13
+ }
14
+ /**
15
+ * __Heading context__
16
+ *
17
+ * The HeadingContext
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * // Will correctly infer the heading level
22
+ * <HeadingContext value={1}>
23
+ * <Heading>H1</Heading>
24
+ * <HeadingContext>
25
+ * <Heading>H2</Heading>
26
+ * </HeadingContext>
27
+ * </HeadingContext>
28
+ * ```
29
+ */
30
+ declare const HeadingContextProvider: FC<HeadingContextProps>;
31
+ export default HeadingContextProvider;
@@ -0,0 +1,45 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
4
+ import { BasePrimitiveProps } from './types';
5
+ export type TypographyLevel = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
6
+ type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
7
+ export type HeadingProps = {
8
+ /**
9
+ * The heading text for the element.
10
+ */
11
+ children: React.ReactNode;
12
+ /**
13
+ * The HTML element to render.
14
+ */
15
+ as?: HeadingElement;
16
+ /**
17
+ * The HTML id attribute.
18
+ */
19
+ id?: string;
20
+ /**
21
+ * The level of the heading element.
22
+ */
23
+ level: TypographyLevel;
24
+ /**
25
+ * The color of the heading text.
26
+ */
27
+ color?: 'default' | 'inverse';
28
+ } & Pick<BasePrimitiveProps, 'testId'>;
29
+ /**
30
+ * __Heading__
31
+ *
32
+ * A heading is a typography component used to display text in different sizes and formats.
33
+ *
34
+ * @example
35
+ *
36
+ * ```jsx
37
+ * import Heading from '@atlaskit/heading';
38
+ *
39
+ * const HeadingXXL = () => (
40
+ * <Heading level="xxl">XXL</Heading>
41
+ * );
42
+ * ```
43
+ */
44
+ declare const Heading: ({ children, level, id, testId, as, color, }: HeadingProps) => jsx.JSX.Element;
45
+ export default Heading;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * __Surface context__
4
+ *
5
+ * A surface context provides context information on the current background (if set).
6
+ */
7
+ export declare const SurfaceContext: import("react").Context<"color.background.accent.lime.subtlest" | "color.background.accent.lime.subtlest.hovered" | "color.background.accent.lime.subtlest.pressed" | "color.background.accent.lime.subtler" | "color.background.accent.lime.subtler.hovered" | "color.background.accent.lime.subtler.pressed" | "color.background.accent.lime.subtle" | "color.background.accent.lime.subtle.hovered" | "color.background.accent.lime.subtle.pressed" | "color.background.accent.lime.bolder" | "color.background.accent.lime.bolder.hovered" | "color.background.accent.lime.bolder.pressed" | "color.background.accent.red.subtlest" | "color.background.accent.red.subtlest.hovered" | "color.background.accent.red.subtlest.pressed" | "color.background.accent.red.subtler" | "color.background.accent.red.subtler.hovered" | "color.background.accent.red.subtler.pressed" | "color.background.accent.red.subtle" | "color.background.accent.red.subtle.hovered" | "color.background.accent.red.subtle.pressed" | "color.background.accent.red.bolder" | "color.background.accent.red.bolder.hovered" | "color.background.accent.red.bolder.pressed" | "color.background.accent.orange.subtlest" | "color.background.accent.orange.subtlest.hovered" | "color.background.accent.orange.subtlest.pressed" | "color.background.accent.orange.subtler" | "color.background.accent.orange.subtler.hovered" | "color.background.accent.orange.subtler.pressed" | "color.background.accent.orange.subtle" | "color.background.accent.orange.subtle.hovered" | "color.background.accent.orange.subtle.pressed" | "color.background.accent.orange.bolder" | "color.background.accent.orange.bolder.hovered" | "color.background.accent.orange.bolder.pressed" | "color.background.accent.yellow.subtlest" | "color.background.accent.yellow.subtlest.hovered" | "color.background.accent.yellow.subtlest.pressed" | "color.background.accent.yellow.subtler" | "color.background.accent.yellow.subtler.hovered" | "color.background.accent.yellow.subtler.pressed" | "color.background.accent.yellow.subtle" | "color.background.accent.yellow.subtle.hovered" | "color.background.accent.yellow.subtle.pressed" | "color.background.accent.yellow.bolder" | "color.background.accent.yellow.bolder.hovered" | "color.background.accent.yellow.bolder.pressed" | "color.background.accent.green.subtlest" | "color.background.accent.green.subtlest.hovered" | "color.background.accent.green.subtlest.pressed" | "color.background.accent.green.subtler" | "color.background.accent.green.subtler.hovered" | "color.background.accent.green.subtler.pressed" | "color.background.accent.green.subtle" | "color.background.accent.green.subtle.hovered" | "color.background.accent.green.subtle.pressed" | "color.background.accent.green.bolder" | "color.background.accent.green.bolder.hovered" | "color.background.accent.green.bolder.pressed" | "color.background.accent.teal.subtlest" | "color.background.accent.teal.subtlest.hovered" | "color.background.accent.teal.subtlest.pressed" | "color.background.accent.teal.subtler" | "color.background.accent.teal.subtler.hovered" | "color.background.accent.teal.subtler.pressed" | "color.background.accent.teal.subtle" | "color.background.accent.teal.subtle.hovered" | "color.background.accent.teal.subtle.pressed" | "color.background.accent.teal.bolder" | "color.background.accent.teal.bolder.hovered" | "color.background.accent.teal.bolder.pressed" | "color.background.accent.blue.subtlest" | "color.background.accent.blue.subtlest.hovered" | "color.background.accent.blue.subtlest.pressed" | "color.background.accent.blue.subtler" | "color.background.accent.blue.subtler.hovered" | "color.background.accent.blue.subtler.pressed" | "color.background.accent.blue.subtle" | "color.background.accent.blue.subtle.hovered" | "color.background.accent.blue.subtle.pressed" | "color.background.accent.blue.bolder" | "color.background.accent.blue.bolder.hovered" | "color.background.accent.blue.bolder.pressed" | "color.background.accent.purple.subtlest" | "color.background.accent.purple.subtlest.hovered" | "color.background.accent.purple.subtlest.pressed" | "color.background.accent.purple.subtler" | "color.background.accent.purple.subtler.hovered" | "color.background.accent.purple.subtler.pressed" | "color.background.accent.purple.subtle" | "color.background.accent.purple.subtle.hovered" | "color.background.accent.purple.subtle.pressed" | "color.background.accent.purple.bolder" | "color.background.accent.purple.bolder.hovered" | "color.background.accent.purple.bolder.pressed" | "color.background.accent.magenta.subtlest" | "color.background.accent.magenta.subtlest.hovered" | "color.background.accent.magenta.subtlest.pressed" | "color.background.accent.magenta.subtler" | "color.background.accent.magenta.subtler.hovered" | "color.background.accent.magenta.subtler.pressed" | "color.background.accent.magenta.subtle" | "color.background.accent.magenta.subtle.hovered" | "color.background.accent.magenta.subtle.pressed" | "color.background.accent.magenta.bolder" | "color.background.accent.magenta.bolder.hovered" | "color.background.accent.magenta.bolder.pressed" | "color.background.accent.gray.subtlest" | "color.background.accent.gray.subtlest.hovered" | "color.background.accent.gray.subtlest.pressed" | "color.background.accent.gray.subtler" | "color.background.accent.gray.subtler.hovered" | "color.background.accent.gray.subtler.pressed" | "color.background.accent.gray.subtle" | "color.background.accent.gray.subtle.hovered" | "color.background.accent.gray.subtle.pressed" | "color.background.accent.gray.bolder" | "color.background.accent.gray.bolder.hovered" | "color.background.accent.gray.bolder.pressed" | "color.background.disabled" | "color.background.input" | "color.background.input.hovered" | "color.background.input.pressed" | "color.background.inverse.subtle" | "color.background.inverse.subtle.hovered" | "color.background.inverse.subtle.pressed" | "color.background.neutral" | "color.background.neutral.hovered" | "color.background.neutral.pressed" | "color.background.neutral.subtle" | "color.background.neutral.subtle.hovered" | "color.background.neutral.subtle.pressed" | "color.background.neutral.bold" | "color.background.neutral.bold.hovered" | "color.background.neutral.bold.pressed" | "color.background.selected" | "color.background.selected.hovered" | "color.background.selected.pressed" | "color.background.selected.bold" | "color.background.selected.bold.hovered" | "color.background.selected.bold.pressed" | "color.background.brand.subtlest" | "color.background.brand.subtlest.hovered" | "color.background.brand.subtlest.pressed" | "color.background.brand.bold" | "color.background.brand.bold.hovered" | "color.background.brand.bold.pressed" | "color.background.brand.boldest" | "color.background.brand.boldest.hovered" | "color.background.brand.boldest.pressed" | "color.background.danger" | "color.background.danger.hovered" | "color.background.danger.pressed" | "color.background.danger.bold" | "color.background.danger.bold.hovered" | "color.background.danger.bold.pressed" | "color.background.warning" | "color.background.warning.hovered" | "color.background.warning.pressed" | "color.background.warning.bold" | "color.background.warning.bold.hovered" | "color.background.warning.bold.pressed" | "color.background.success" | "color.background.success.hovered" | "color.background.success.pressed" | "color.background.success.bold" | "color.background.success.bold.hovered" | "color.background.success.bold.pressed" | "color.background.discovery" | "color.background.discovery.hovered" | "color.background.discovery.pressed" | "color.background.discovery.bold" | "color.background.discovery.bold.hovered" | "color.background.discovery.bold.pressed" | "color.background.information" | "color.background.information.hovered" | "color.background.information.pressed" | "color.background.information.bold" | "color.background.information.bold.hovered" | "color.background.information.bold.pressed" | "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.hovered" | "elevation.surface.pressed" | "elevation.surface.overlay" | "elevation.surface.overlay.hovered" | "elevation.surface.overlay.pressed" | "elevation.surface.raised" | "elevation.surface.raised.hovered" | "elevation.surface.raised.pressed" | "elevation.surface.sunken" | "utility.elevation.surface.current">;
8
+ /**
9
+ * __useSurface__
10
+ *
11
+ * Return the current surface. If no parent sets a surface color it falls back to the default surface.
12
+ *
13
+ * @see SurfaceContext
14
+ */
15
+ export declare const useSurface: () => "color.background.accent.lime.subtlest" | "color.background.accent.lime.subtlest.hovered" | "color.background.accent.lime.subtlest.pressed" | "color.background.accent.lime.subtler" | "color.background.accent.lime.subtler.hovered" | "color.background.accent.lime.subtler.pressed" | "color.background.accent.lime.subtle" | "color.background.accent.lime.subtle.hovered" | "color.background.accent.lime.subtle.pressed" | "color.background.accent.lime.bolder" | "color.background.accent.lime.bolder.hovered" | "color.background.accent.lime.bolder.pressed" | "color.background.accent.red.subtlest" | "color.background.accent.red.subtlest.hovered" | "color.background.accent.red.subtlest.pressed" | "color.background.accent.red.subtler" | "color.background.accent.red.subtler.hovered" | "color.background.accent.red.subtler.pressed" | "color.background.accent.red.subtle" | "color.background.accent.red.subtle.hovered" | "color.background.accent.red.subtle.pressed" | "color.background.accent.red.bolder" | "color.background.accent.red.bolder.hovered" | "color.background.accent.red.bolder.pressed" | "color.background.accent.orange.subtlest" | "color.background.accent.orange.subtlest.hovered" | "color.background.accent.orange.subtlest.pressed" | "color.background.accent.orange.subtler" | "color.background.accent.orange.subtler.hovered" | "color.background.accent.orange.subtler.pressed" | "color.background.accent.orange.subtle" | "color.background.accent.orange.subtle.hovered" | "color.background.accent.orange.subtle.pressed" | "color.background.accent.orange.bolder" | "color.background.accent.orange.bolder.hovered" | "color.background.accent.orange.bolder.pressed" | "color.background.accent.yellow.subtlest" | "color.background.accent.yellow.subtlest.hovered" | "color.background.accent.yellow.subtlest.pressed" | "color.background.accent.yellow.subtler" | "color.background.accent.yellow.subtler.hovered" | "color.background.accent.yellow.subtler.pressed" | "color.background.accent.yellow.subtle" | "color.background.accent.yellow.subtle.hovered" | "color.background.accent.yellow.subtle.pressed" | "color.background.accent.yellow.bolder" | "color.background.accent.yellow.bolder.hovered" | "color.background.accent.yellow.bolder.pressed" | "color.background.accent.green.subtlest" | "color.background.accent.green.subtlest.hovered" | "color.background.accent.green.subtlest.pressed" | "color.background.accent.green.subtler" | "color.background.accent.green.subtler.hovered" | "color.background.accent.green.subtler.pressed" | "color.background.accent.green.subtle" | "color.background.accent.green.subtle.hovered" | "color.background.accent.green.subtle.pressed" | "color.background.accent.green.bolder" | "color.background.accent.green.bolder.hovered" | "color.background.accent.green.bolder.pressed" | "color.background.accent.teal.subtlest" | "color.background.accent.teal.subtlest.hovered" | "color.background.accent.teal.subtlest.pressed" | "color.background.accent.teal.subtler" | "color.background.accent.teal.subtler.hovered" | "color.background.accent.teal.subtler.pressed" | "color.background.accent.teal.subtle" | "color.background.accent.teal.subtle.hovered" | "color.background.accent.teal.subtle.pressed" | "color.background.accent.teal.bolder" | "color.background.accent.teal.bolder.hovered" | "color.background.accent.teal.bolder.pressed" | "color.background.accent.blue.subtlest" | "color.background.accent.blue.subtlest.hovered" | "color.background.accent.blue.subtlest.pressed" | "color.background.accent.blue.subtler" | "color.background.accent.blue.subtler.hovered" | "color.background.accent.blue.subtler.pressed" | "color.background.accent.blue.subtle" | "color.background.accent.blue.subtle.hovered" | "color.background.accent.blue.subtle.pressed" | "color.background.accent.blue.bolder" | "color.background.accent.blue.bolder.hovered" | "color.background.accent.blue.bolder.pressed" | "color.background.accent.purple.subtlest" | "color.background.accent.purple.subtlest.hovered" | "color.background.accent.purple.subtlest.pressed" | "color.background.accent.purple.subtler" | "color.background.accent.purple.subtler.hovered" | "color.background.accent.purple.subtler.pressed" | "color.background.accent.purple.subtle" | "color.background.accent.purple.subtle.hovered" | "color.background.accent.purple.subtle.pressed" | "color.background.accent.purple.bolder" | "color.background.accent.purple.bolder.hovered" | "color.background.accent.purple.bolder.pressed" | "color.background.accent.magenta.subtlest" | "color.background.accent.magenta.subtlest.hovered" | "color.background.accent.magenta.subtlest.pressed" | "color.background.accent.magenta.subtler" | "color.background.accent.magenta.subtler.hovered" | "color.background.accent.magenta.subtler.pressed" | "color.background.accent.magenta.subtle" | "color.background.accent.magenta.subtle.hovered" | "color.background.accent.magenta.subtle.pressed" | "color.background.accent.magenta.bolder" | "color.background.accent.magenta.bolder.hovered" | "color.background.accent.magenta.bolder.pressed" | "color.background.accent.gray.subtlest" | "color.background.accent.gray.subtlest.hovered" | "color.background.accent.gray.subtlest.pressed" | "color.background.accent.gray.subtler" | "color.background.accent.gray.subtler.hovered" | "color.background.accent.gray.subtler.pressed" | "color.background.accent.gray.subtle" | "color.background.accent.gray.subtle.hovered" | "color.background.accent.gray.subtle.pressed" | "color.background.accent.gray.bolder" | "color.background.accent.gray.bolder.hovered" | "color.background.accent.gray.bolder.pressed" | "color.background.disabled" | "color.background.input" | "color.background.input.hovered" | "color.background.input.pressed" | "color.background.inverse.subtle" | "color.background.inverse.subtle.hovered" | "color.background.inverse.subtle.pressed" | "color.background.neutral" | "color.background.neutral.hovered" | "color.background.neutral.pressed" | "color.background.neutral.subtle" | "color.background.neutral.subtle.hovered" | "color.background.neutral.subtle.pressed" | "color.background.neutral.bold" | "color.background.neutral.bold.hovered" | "color.background.neutral.bold.pressed" | "color.background.selected" | "color.background.selected.hovered" | "color.background.selected.pressed" | "color.background.selected.bold" | "color.background.selected.bold.hovered" | "color.background.selected.bold.pressed" | "color.background.brand.subtlest" | "color.background.brand.subtlest.hovered" | "color.background.brand.subtlest.pressed" | "color.background.brand.bold" | "color.background.brand.bold.hovered" | "color.background.brand.bold.pressed" | "color.background.brand.boldest" | "color.background.brand.boldest.hovered" | "color.background.brand.boldest.pressed" | "color.background.danger" | "color.background.danger.hovered" | "color.background.danger.pressed" | "color.background.danger.bold" | "color.background.danger.bold.hovered" | "color.background.danger.bold.pressed" | "color.background.warning" | "color.background.warning.hovered" | "color.background.warning.pressed" | "color.background.warning.bold" | "color.background.warning.bold.hovered" | "color.background.warning.bold.pressed" | "color.background.success" | "color.background.success.hovered" | "color.background.success.pressed" | "color.background.success.bold" | "color.background.success.bold.hovered" | "color.background.success.bold.pressed" | "color.background.discovery" | "color.background.discovery.hovered" | "color.background.discovery.pressed" | "color.background.discovery.bold" | "color.background.discovery.bold.hovered" | "color.background.discovery.bold.pressed" | "color.background.information" | "color.background.information.hovered" | "color.background.information.pressed" | "color.background.information.bold" | "color.background.information.bold.hovered" | "color.background.information.bold.pressed" | "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.hovered" | "elevation.surface.pressed" | "elevation.surface.overlay" | "elevation.surface.overlay.hovered" | "elevation.surface.overlay.pressed" | "elevation.surface.raised" | "elevation.surface.raised.hovered" | "elevation.surface.raised.pressed" | "elevation.surface.sunken" | "utility.elevation.surface.current";
@@ -0,0 +1,57 @@
1
+ /** @jsx jsx */
2
+ import { FC, ReactNode } from 'react';
3
+ import { BodyText, TextColor, UiText } from '../xcss/style-maps.partial';
4
+ import type { BasePrimitiveProps } from './types';
5
+ declare const asAllowlist: readonly ["span", "p", "strong", "em", "label"];
6
+ type AsElement = (typeof asAllowlist)[number];
7
+ type Variant = BodyText | UiText;
8
+ export interface TextProps extends BasePrimitiveProps {
9
+ /**
10
+ * HTML tag to be rendered. Defaults to `span`.
11
+ */
12
+ as?: AsElement;
13
+ /**
14
+ * Elements rendered within the Text element
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * Text variant
19
+ */
20
+ variant: Variant;
21
+ /**
22
+ * Text color
23
+ * Pending colour exploration
24
+ */
25
+ color?: TextColor;
26
+ /**
27
+ * The HTML id attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
28
+ */
29
+ id?: string;
30
+ /**
31
+ * Truncates text with an ellipsis when text overflows its parent container
32
+ * (i.e. `width` has been set on parent that is shorter than text length).
33
+ * Pending truncation exploration -- remove for now?
34
+ */
35
+ shouldTruncate?: boolean;
36
+ /**
37
+ * Text align https://developer.mozilla.org/en-US/docs/Web/CSS/text-align
38
+ */
39
+ textAlign?: TextAlign;
40
+ }
41
+ type TextAlign = keyof typeof textAlignMap;
42
+ declare const textAlignMap: {
43
+ center: import("@emotion/react").SerializedStyles;
44
+ end: import("@emotion/react").SerializedStyles;
45
+ start: import("@emotion/react").SerializedStyles;
46
+ };
47
+ /**
48
+ * __Text__
49
+ *
50
+ * Text is a primitive component that has the Atlassian Design System's design guidelines baked in.
51
+ * This includes considerations for text attributes such as color, font size, font weight, and line height.
52
+ * It renders a `span` by default.
53
+ *
54
+ * @internal
55
+ */
56
+ declare const Text: FC<TextProps>;
57
+ export default Text;
@@ -50,10 +50,10 @@ export type Space = keyof typeof spaceMap;
50
50
  */
51
51
  /**
52
52
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
53
- * @codegen <<SignedSource::3f4d926ce14cda107d25c697f3a0c200>>
53
+ * @codegen <<SignedSource::3db44f53b728773bb3ba1473d4567724>>
54
54
  * @codegenId colors
55
55
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
56
- * @codegenParams ["border", "background", "shadow", "text", "fill"]
56
+ * @codegenParams ["border", "background", "shadow", "text", "fill", "surface"]
57
57
  * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::815ddd719715ae06521cad06e1921e40>>
58
58
  */
59
59
  export declare const borderColorMap: {
@@ -277,6 +277,7 @@ export declare const backgroundColorMap: {
277
277
  readonly 'elevation.surface.raised.hovered': "var(--ds-surface-raised-hovered)";
278
278
  readonly 'elevation.surface.raised.pressed': "var(--ds-surface-raised-pressed)";
279
279
  readonly 'elevation.surface.sunken': "var(--ds-surface-sunken)";
280
+ readonly 'utility.elevation.surface.current': "var(--ds-elevation-surface-current)";
280
281
  };
281
282
  export type BackgroundColor = keyof typeof backgroundColorMap;
282
283
  export declare const shadowMap: {
@@ -350,6 +351,19 @@ export declare const fillMap: {
350
351
  readonly 'color.icon.subtle': "var(--ds-icon-subtle)";
351
352
  };
352
353
  export type Fill = keyof typeof fillMap;
354
+ export declare const surfaceColorMap: {
355
+ readonly 'elevation.surface': "var(--ds-surface)";
356
+ readonly 'elevation.surface.hovered': "var(--ds-surface-hovered)";
357
+ readonly 'elevation.surface.pressed': "var(--ds-surface-pressed)";
358
+ readonly 'elevation.surface.overlay': "var(--ds-surface-overlay)";
359
+ readonly 'elevation.surface.overlay.hovered': "var(--ds-surface-overlay-hovered)";
360
+ readonly 'elevation.surface.overlay.pressed': "var(--ds-surface-overlay-pressed)";
361
+ readonly 'elevation.surface.raised': "var(--ds-surface-raised)";
362
+ readonly 'elevation.surface.raised.hovered': "var(--ds-surface-raised-hovered)";
363
+ readonly 'elevation.surface.raised.pressed': "var(--ds-surface-raised-pressed)";
364
+ readonly 'elevation.surface.sunken': "var(--ds-surface-sunken)";
365
+ };
366
+ export type SurfaceColor = keyof typeof surfaceColorMap;
353
367
  /**
354
368
  * @codegenEnd
355
369
  */
@@ -402,6 +416,76 @@ export declare const borderRadiusMap: {
402
416
  readonly 'border.radius.circle': "var(--ds-border-radius-circle)";
403
417
  };
404
418
  export type BorderRadius = keyof typeof borderRadiusMap;
419
+ /**
420
+ * @codegenEnd
421
+ */
422
+ /**
423
+ * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
424
+ * @codegen <<SignedSource::752c1b8bdc7db62e519dd729222d57ad>>
425
+ * @codegenId typography
426
+ * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
427
+ * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "heading", "ui"]
428
+ * @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::0cd422575c3f2a3784eeef767abe71f4>>
429
+ * @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::79d24a1e558f12d671c06a7609f90dc1>>
430
+ */
431
+ export declare const fontSizeMap: {
432
+ 'font.size.050': "var(--ds-font-size-050)";
433
+ 'font.size.075': "var(--ds-font-size-075)";
434
+ 'font.size.100': "var(--ds-font-size-100)";
435
+ 'font.size.200': "var(--ds-font-size-200)";
436
+ 'font.size.300': "var(--ds-font-size-300)";
437
+ 'font.size.400': "var(--ds-font-size-400)";
438
+ 'font.size.500': "var(--ds-font-size-500)";
439
+ 'font.size.600': "var(--ds-font-size-600)";
440
+ };
441
+ export type FontSize = keyof typeof fontSizeMap;
442
+ export declare const fontWeightMap: {
443
+ 'font.weight.bold': "var(--ds-font-weight-bold)";
444
+ 'font.weight.medium': "var(--ds-font-weight-medium)";
445
+ 'font.weight.regular': "var(--ds-font-weight-regular)";
446
+ 'font.weight.semibold': "var(--ds-font-weight-semibold)";
447
+ };
448
+ export type FontWeight = keyof typeof fontWeightMap;
449
+ export declare const fontFamilyMap: {
450
+ 'font.family.body': "var(--ds-font-family-body)";
451
+ 'font.family.brand': "var(--ds-font-family-brand)";
452
+ 'font.family.code': "var(--ds-font-family-code)";
453
+ 'font.family.heading': "var(--ds-font-family-heading)";
454
+ 'font.family.monospace': "var(--ds-font-family-monospace)";
455
+ 'font.family.sans': "var(--ds-font-family-sans)";
456
+ };
457
+ export type FontFamily = keyof typeof fontFamilyMap;
458
+ export declare const lineHeightMap: {
459
+ 'font.lineHeight.1': "var(--ds-font-lineHeight-1)";
460
+ 'font.lineHeight.100': "var(--ds-font-lineHeight-100)";
461
+ 'font.lineHeight.200': "var(--ds-font-lineHeight-200)";
462
+ 'font.lineHeight.300': "var(--ds-font-lineHeight-300)";
463
+ 'font.lineHeight.400': "var(--ds-font-lineHeight-400)";
464
+ 'font.lineHeight.500': "var(--ds-font-lineHeight-500)";
465
+ 'font.lineHeight.600': "var(--ds-font-lineHeight-600)";
466
+ };
467
+ export type LineHeight = keyof typeof lineHeightMap;
468
+ export declare const bodyTextMap: {
469
+ body: "var(--ds-font-body)";
470
+ 'body.lg': "var(--ds-font-body-lg)";
471
+ 'body.sm': "var(--ds-font-body-sm)";
472
+ };
473
+ export type BodyText = keyof typeof bodyTextMap;
474
+ export declare const headingTextMap: {
475
+ 'heading.lg': "var(--ds-font-heading-lg)";
476
+ 'heading.md': "var(--ds-font-heading-md)";
477
+ 'heading.sm': "var(--ds-font-heading-sm)";
478
+ 'heading.xl': "var(--ds-font-heading-xl)";
479
+ 'heading.xs': "var(--ds-font-heading-xs)";
480
+ 'heading.xxl': "var(--ds-font-heading-xxl)";
481
+ 'heading.xxs': "var(--ds-font-heading-xxs)";
482
+ };
483
+ export type HeadingText = keyof typeof headingTextMap;
484
+ export declare const uiTextMap: {
485
+ ui: "var(--ds-font-ui)";
486
+ 'ui.sm': "var(--ds-font-ui-sm)";
487
+ };
488
+ export type UiText = keyof typeof uiTextMap;
405
489
  /**
406
490
  * @codegenEnd
407
491
  */
@@ -471,9 +555,37 @@ declare const spacingProperties: readonly ["padding", "paddingBlock", "paddingBl
471
555
  type SpacingProperty = (typeof spacingProperties)[number];
472
556
  type SpacingToken = keyof typeof spaceMap;
473
557
  type BackgroundColorToken = keyof typeof backgroundColorMap;
558
+ type SurfaceColorToken = keyof typeof surfaceColorMap;
559
+ type TextColorToken = keyof typeof textColorMap;
560
+ type FontSizeToken = keyof typeof fontSizeMap;
561
+ type FontWeightToken = keyof typeof fontWeightMap;
562
+ type FontFamilyToken = keyof typeof fontFamilyMap;
563
+ type LineHeightToken = keyof typeof lineHeightMap;
564
+ type HeadingTextToken = keyof typeof headingTextMap;
565
+ type BodyTextToken = keyof typeof bodyTextMap;
566
+ type UITextToken = keyof typeof uiTextMap;
474
567
  type SpacingStyleMap = Record<SpacingProperty, Record<SpacingToken, SerializedStyles>>;
475
568
  type BackgroundColorStyleMap = Record<BackgroundColorToken, SerializedStyles>;
569
+ type SurfaceColorStyleMap = Record<SurfaceColorToken, SerializedStyles>;
570
+ type TextColorStyleMap = Record<TextColorToken, SerializedStyles>;
571
+ type FontSizeStyleMap = Record<FontSizeToken, SerializedStyles>;
572
+ type FontWeightStyleMap = Record<FontWeightToken, SerializedStyles>;
573
+ type FontFamilyStyleMap = Record<FontFamilyToken, SerializedStyles>;
574
+ type LineHeightStyleMap = Record<LineHeightToken, SerializedStyles>;
575
+ type HeadingTextStyleMap = Record<HeadingTextToken, SerializedStyles>;
576
+ type BodyTextStyleMap = Record<BodyTextToken, SerializedStyles>;
577
+ type UITextStyleMap = Record<UITextToken, SerializedStyles>;
476
578
  export declare const paddingStylesMap: SpacingStyleMap;
477
579
  export declare const spaceStylesMap: SpacingStyleMap;
478
580
  export declare const backgroundColorStylesMap: BackgroundColorStyleMap;
581
+ export declare const textColorStylesMap: TextColorStyleMap;
582
+ export declare const fontSizeStylesMap: FontSizeStyleMap;
583
+ export declare const fontWeightStylesMap: FontWeightStyleMap;
584
+ export declare const fontFamilyStylesMap: FontFamilyStyleMap;
585
+ export declare const lineHeightStylesMap: LineHeightStyleMap;
586
+ export declare const headingTextStylesMap: HeadingTextStyleMap;
587
+ export declare const bodyTextStylesMap: BodyTextStyleMap;
588
+ export declare const uiTextStylesMap: UITextStyleMap;
589
+ export declare const surfaceColorStylesMap: SurfaceColorStyleMap;
590
+ export declare const isSurfaceColorToken: (color: unknown) => color is "elevation.surface" | "elevation.surface.hovered" | "elevation.surface.pressed" | "elevation.surface.overlay" | "elevation.surface.overlay.hovered" | "elevation.surface.overlay.pressed" | "elevation.surface.raised" | "elevation.surface.raised.hovered" | "elevation.surface.raised.pressed" | "elevation.surface.sunken";
479
591
  export {};
@@ -0,0 +1,31 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type HeadingElement = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
3
+ export declare const useHeadingElement: () => HeadingElement;
4
+ export interface HeadingContextProps {
5
+ /**
6
+ * Optional - only apply this value if the intent is to reset the heading context outside the normal content flow, for example inside a `section`.
7
+ */
8
+ value?: HeadingElement;
9
+ /**
10
+ * Semantic heirarchy of content below the heading context.
11
+ */
12
+ children: ReactNode;
13
+ }
14
+ /**
15
+ * __Heading context__
16
+ *
17
+ * The HeadingContext
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * // Will correctly infer the heading level
22
+ * <HeadingContext value={1}>
23
+ * <Heading>H1</Heading>
24
+ * <HeadingContext>
25
+ * <Heading>H2</Heading>
26
+ * </HeadingContext>
27
+ * </HeadingContext>
28
+ * ```
29
+ */
30
+ declare const HeadingContextProvider: FC<HeadingContextProps>;
31
+ export default HeadingContextProvider;
@@ -0,0 +1,45 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
4
+ import { BasePrimitiveProps } from './types';
5
+ export type TypographyLevel = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
6
+ type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div';
7
+ export type HeadingProps = {
8
+ /**
9
+ * The heading text for the element.
10
+ */
11
+ children: React.ReactNode;
12
+ /**
13
+ * The HTML element to render.
14
+ */
15
+ as?: HeadingElement;
16
+ /**
17
+ * The HTML id attribute.
18
+ */
19
+ id?: string;
20
+ /**
21
+ * The level of the heading element.
22
+ */
23
+ level: TypographyLevel;
24
+ /**
25
+ * The color of the heading text.
26
+ */
27
+ color?: 'default' | 'inverse';
28
+ } & Pick<BasePrimitiveProps, 'testId'>;
29
+ /**
30
+ * __Heading__
31
+ *
32
+ * A heading is a typography component used to display text in different sizes and formats.
33
+ *
34
+ * @example
35
+ *
36
+ * ```jsx
37
+ * import Heading from '@atlaskit/heading';
38
+ *
39
+ * const HeadingXXL = () => (
40
+ * <Heading level="xxl">XXL</Heading>
41
+ * );
42
+ * ```
43
+ */
44
+ declare const Heading: ({ children, level, id, testId, as, color, }: HeadingProps) => jsx.JSX.Element;
45
+ export default Heading;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * __Surface context__
4
+ *
5
+ * A surface context provides context information on the current background (if set).
6
+ */
7
+ export declare const SurfaceContext: import("react").Context<"color.background.accent.lime.subtlest" | "color.background.accent.lime.subtlest.hovered" | "color.background.accent.lime.subtlest.pressed" | "color.background.accent.lime.subtler" | "color.background.accent.lime.subtler.hovered" | "color.background.accent.lime.subtler.pressed" | "color.background.accent.lime.subtle" | "color.background.accent.lime.subtle.hovered" | "color.background.accent.lime.subtle.pressed" | "color.background.accent.lime.bolder" | "color.background.accent.lime.bolder.hovered" | "color.background.accent.lime.bolder.pressed" | "color.background.accent.red.subtlest" | "color.background.accent.red.subtlest.hovered" | "color.background.accent.red.subtlest.pressed" | "color.background.accent.red.subtler" | "color.background.accent.red.subtler.hovered" | "color.background.accent.red.subtler.pressed" | "color.background.accent.red.subtle" | "color.background.accent.red.subtle.hovered" | "color.background.accent.red.subtle.pressed" | "color.background.accent.red.bolder" | "color.background.accent.red.bolder.hovered" | "color.background.accent.red.bolder.pressed" | "color.background.accent.orange.subtlest" | "color.background.accent.orange.subtlest.hovered" | "color.background.accent.orange.subtlest.pressed" | "color.background.accent.orange.subtler" | "color.background.accent.orange.subtler.hovered" | "color.background.accent.orange.subtler.pressed" | "color.background.accent.orange.subtle" | "color.background.accent.orange.subtle.hovered" | "color.background.accent.orange.subtle.pressed" | "color.background.accent.orange.bolder" | "color.background.accent.orange.bolder.hovered" | "color.background.accent.orange.bolder.pressed" | "color.background.accent.yellow.subtlest" | "color.background.accent.yellow.subtlest.hovered" | "color.background.accent.yellow.subtlest.pressed" | "color.background.accent.yellow.subtler" | "color.background.accent.yellow.subtler.hovered" | "color.background.accent.yellow.subtler.pressed" | "color.background.accent.yellow.subtle" | "color.background.accent.yellow.subtle.hovered" | "color.background.accent.yellow.subtle.pressed" | "color.background.accent.yellow.bolder" | "color.background.accent.yellow.bolder.hovered" | "color.background.accent.yellow.bolder.pressed" | "color.background.accent.green.subtlest" | "color.background.accent.green.subtlest.hovered" | "color.background.accent.green.subtlest.pressed" | "color.background.accent.green.subtler" | "color.background.accent.green.subtler.hovered" | "color.background.accent.green.subtler.pressed" | "color.background.accent.green.subtle" | "color.background.accent.green.subtle.hovered" | "color.background.accent.green.subtle.pressed" | "color.background.accent.green.bolder" | "color.background.accent.green.bolder.hovered" | "color.background.accent.green.bolder.pressed" | "color.background.accent.teal.subtlest" | "color.background.accent.teal.subtlest.hovered" | "color.background.accent.teal.subtlest.pressed" | "color.background.accent.teal.subtler" | "color.background.accent.teal.subtler.hovered" | "color.background.accent.teal.subtler.pressed" | "color.background.accent.teal.subtle" | "color.background.accent.teal.subtle.hovered" | "color.background.accent.teal.subtle.pressed" | "color.background.accent.teal.bolder" | "color.background.accent.teal.bolder.hovered" | "color.background.accent.teal.bolder.pressed" | "color.background.accent.blue.subtlest" | "color.background.accent.blue.subtlest.hovered" | "color.background.accent.blue.subtlest.pressed" | "color.background.accent.blue.subtler" | "color.background.accent.blue.subtler.hovered" | "color.background.accent.blue.subtler.pressed" | "color.background.accent.blue.subtle" | "color.background.accent.blue.subtle.hovered" | "color.background.accent.blue.subtle.pressed" | "color.background.accent.blue.bolder" | "color.background.accent.blue.bolder.hovered" | "color.background.accent.blue.bolder.pressed" | "color.background.accent.purple.subtlest" | "color.background.accent.purple.subtlest.hovered" | "color.background.accent.purple.subtlest.pressed" | "color.background.accent.purple.subtler" | "color.background.accent.purple.subtler.hovered" | "color.background.accent.purple.subtler.pressed" | "color.background.accent.purple.subtle" | "color.background.accent.purple.subtle.hovered" | "color.background.accent.purple.subtle.pressed" | "color.background.accent.purple.bolder" | "color.background.accent.purple.bolder.hovered" | "color.background.accent.purple.bolder.pressed" | "color.background.accent.magenta.subtlest" | "color.background.accent.magenta.subtlest.hovered" | "color.background.accent.magenta.subtlest.pressed" | "color.background.accent.magenta.subtler" | "color.background.accent.magenta.subtler.hovered" | "color.background.accent.magenta.subtler.pressed" | "color.background.accent.magenta.subtle" | "color.background.accent.magenta.subtle.hovered" | "color.background.accent.magenta.subtle.pressed" | "color.background.accent.magenta.bolder" | "color.background.accent.magenta.bolder.hovered" | "color.background.accent.magenta.bolder.pressed" | "color.background.accent.gray.subtlest" | "color.background.accent.gray.subtlest.hovered" | "color.background.accent.gray.subtlest.pressed" | "color.background.accent.gray.subtler" | "color.background.accent.gray.subtler.hovered" | "color.background.accent.gray.subtler.pressed" | "color.background.accent.gray.subtle" | "color.background.accent.gray.subtle.hovered" | "color.background.accent.gray.subtle.pressed" | "color.background.accent.gray.bolder" | "color.background.accent.gray.bolder.hovered" | "color.background.accent.gray.bolder.pressed" | "color.background.disabled" | "color.background.input" | "color.background.input.hovered" | "color.background.input.pressed" | "color.background.inverse.subtle" | "color.background.inverse.subtle.hovered" | "color.background.inverse.subtle.pressed" | "color.background.neutral" | "color.background.neutral.hovered" | "color.background.neutral.pressed" | "color.background.neutral.subtle" | "color.background.neutral.subtle.hovered" | "color.background.neutral.subtle.pressed" | "color.background.neutral.bold" | "color.background.neutral.bold.hovered" | "color.background.neutral.bold.pressed" | "color.background.selected" | "color.background.selected.hovered" | "color.background.selected.pressed" | "color.background.selected.bold" | "color.background.selected.bold.hovered" | "color.background.selected.bold.pressed" | "color.background.brand.subtlest" | "color.background.brand.subtlest.hovered" | "color.background.brand.subtlest.pressed" | "color.background.brand.bold" | "color.background.brand.bold.hovered" | "color.background.brand.bold.pressed" | "color.background.brand.boldest" | "color.background.brand.boldest.hovered" | "color.background.brand.boldest.pressed" | "color.background.danger" | "color.background.danger.hovered" | "color.background.danger.pressed" | "color.background.danger.bold" | "color.background.danger.bold.hovered" | "color.background.danger.bold.pressed" | "color.background.warning" | "color.background.warning.hovered" | "color.background.warning.pressed" | "color.background.warning.bold" | "color.background.warning.bold.hovered" | "color.background.warning.bold.pressed" | "color.background.success" | "color.background.success.hovered" | "color.background.success.pressed" | "color.background.success.bold" | "color.background.success.bold.hovered" | "color.background.success.bold.pressed" | "color.background.discovery" | "color.background.discovery.hovered" | "color.background.discovery.pressed" | "color.background.discovery.bold" | "color.background.discovery.bold.hovered" | "color.background.discovery.bold.pressed" | "color.background.information" | "color.background.information.hovered" | "color.background.information.pressed" | "color.background.information.bold" | "color.background.information.bold.hovered" | "color.background.information.bold.pressed" | "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.hovered" | "elevation.surface.pressed" | "elevation.surface.overlay" | "elevation.surface.overlay.hovered" | "elevation.surface.overlay.pressed" | "elevation.surface.raised" | "elevation.surface.raised.hovered" | "elevation.surface.raised.pressed" | "elevation.surface.sunken" | "utility.elevation.surface.current">;
8
+ /**
9
+ * __useSurface__
10
+ *
11
+ * Return the current surface. If no parent sets a surface color it falls back to the default surface.
12
+ *
13
+ * @see SurfaceContext
14
+ */
15
+ export declare const useSurface: () => "color.background.accent.lime.subtlest" | "color.background.accent.lime.subtlest.hovered" | "color.background.accent.lime.subtlest.pressed" | "color.background.accent.lime.subtler" | "color.background.accent.lime.subtler.hovered" | "color.background.accent.lime.subtler.pressed" | "color.background.accent.lime.subtle" | "color.background.accent.lime.subtle.hovered" | "color.background.accent.lime.subtle.pressed" | "color.background.accent.lime.bolder" | "color.background.accent.lime.bolder.hovered" | "color.background.accent.lime.bolder.pressed" | "color.background.accent.red.subtlest" | "color.background.accent.red.subtlest.hovered" | "color.background.accent.red.subtlest.pressed" | "color.background.accent.red.subtler" | "color.background.accent.red.subtler.hovered" | "color.background.accent.red.subtler.pressed" | "color.background.accent.red.subtle" | "color.background.accent.red.subtle.hovered" | "color.background.accent.red.subtle.pressed" | "color.background.accent.red.bolder" | "color.background.accent.red.bolder.hovered" | "color.background.accent.red.bolder.pressed" | "color.background.accent.orange.subtlest" | "color.background.accent.orange.subtlest.hovered" | "color.background.accent.orange.subtlest.pressed" | "color.background.accent.orange.subtler" | "color.background.accent.orange.subtler.hovered" | "color.background.accent.orange.subtler.pressed" | "color.background.accent.orange.subtle" | "color.background.accent.orange.subtle.hovered" | "color.background.accent.orange.subtle.pressed" | "color.background.accent.orange.bolder" | "color.background.accent.orange.bolder.hovered" | "color.background.accent.orange.bolder.pressed" | "color.background.accent.yellow.subtlest" | "color.background.accent.yellow.subtlest.hovered" | "color.background.accent.yellow.subtlest.pressed" | "color.background.accent.yellow.subtler" | "color.background.accent.yellow.subtler.hovered" | "color.background.accent.yellow.subtler.pressed" | "color.background.accent.yellow.subtle" | "color.background.accent.yellow.subtle.hovered" | "color.background.accent.yellow.subtle.pressed" | "color.background.accent.yellow.bolder" | "color.background.accent.yellow.bolder.hovered" | "color.background.accent.yellow.bolder.pressed" | "color.background.accent.green.subtlest" | "color.background.accent.green.subtlest.hovered" | "color.background.accent.green.subtlest.pressed" | "color.background.accent.green.subtler" | "color.background.accent.green.subtler.hovered" | "color.background.accent.green.subtler.pressed" | "color.background.accent.green.subtle" | "color.background.accent.green.subtle.hovered" | "color.background.accent.green.subtle.pressed" | "color.background.accent.green.bolder" | "color.background.accent.green.bolder.hovered" | "color.background.accent.green.bolder.pressed" | "color.background.accent.teal.subtlest" | "color.background.accent.teal.subtlest.hovered" | "color.background.accent.teal.subtlest.pressed" | "color.background.accent.teal.subtler" | "color.background.accent.teal.subtler.hovered" | "color.background.accent.teal.subtler.pressed" | "color.background.accent.teal.subtle" | "color.background.accent.teal.subtle.hovered" | "color.background.accent.teal.subtle.pressed" | "color.background.accent.teal.bolder" | "color.background.accent.teal.bolder.hovered" | "color.background.accent.teal.bolder.pressed" | "color.background.accent.blue.subtlest" | "color.background.accent.blue.subtlest.hovered" | "color.background.accent.blue.subtlest.pressed" | "color.background.accent.blue.subtler" | "color.background.accent.blue.subtler.hovered" | "color.background.accent.blue.subtler.pressed" | "color.background.accent.blue.subtle" | "color.background.accent.blue.subtle.hovered" | "color.background.accent.blue.subtle.pressed" | "color.background.accent.blue.bolder" | "color.background.accent.blue.bolder.hovered" | "color.background.accent.blue.bolder.pressed" | "color.background.accent.purple.subtlest" | "color.background.accent.purple.subtlest.hovered" | "color.background.accent.purple.subtlest.pressed" | "color.background.accent.purple.subtler" | "color.background.accent.purple.subtler.hovered" | "color.background.accent.purple.subtler.pressed" | "color.background.accent.purple.subtle" | "color.background.accent.purple.subtle.hovered" | "color.background.accent.purple.subtle.pressed" | "color.background.accent.purple.bolder" | "color.background.accent.purple.bolder.hovered" | "color.background.accent.purple.bolder.pressed" | "color.background.accent.magenta.subtlest" | "color.background.accent.magenta.subtlest.hovered" | "color.background.accent.magenta.subtlest.pressed" | "color.background.accent.magenta.subtler" | "color.background.accent.magenta.subtler.hovered" | "color.background.accent.magenta.subtler.pressed" | "color.background.accent.magenta.subtle" | "color.background.accent.magenta.subtle.hovered" | "color.background.accent.magenta.subtle.pressed" | "color.background.accent.magenta.bolder" | "color.background.accent.magenta.bolder.hovered" | "color.background.accent.magenta.bolder.pressed" | "color.background.accent.gray.subtlest" | "color.background.accent.gray.subtlest.hovered" | "color.background.accent.gray.subtlest.pressed" | "color.background.accent.gray.subtler" | "color.background.accent.gray.subtler.hovered" | "color.background.accent.gray.subtler.pressed" | "color.background.accent.gray.subtle" | "color.background.accent.gray.subtle.hovered" | "color.background.accent.gray.subtle.pressed" | "color.background.accent.gray.bolder" | "color.background.accent.gray.bolder.hovered" | "color.background.accent.gray.bolder.pressed" | "color.background.disabled" | "color.background.input" | "color.background.input.hovered" | "color.background.input.pressed" | "color.background.inverse.subtle" | "color.background.inverse.subtle.hovered" | "color.background.inverse.subtle.pressed" | "color.background.neutral" | "color.background.neutral.hovered" | "color.background.neutral.pressed" | "color.background.neutral.subtle" | "color.background.neutral.subtle.hovered" | "color.background.neutral.subtle.pressed" | "color.background.neutral.bold" | "color.background.neutral.bold.hovered" | "color.background.neutral.bold.pressed" | "color.background.selected" | "color.background.selected.hovered" | "color.background.selected.pressed" | "color.background.selected.bold" | "color.background.selected.bold.hovered" | "color.background.selected.bold.pressed" | "color.background.brand.subtlest" | "color.background.brand.subtlest.hovered" | "color.background.brand.subtlest.pressed" | "color.background.brand.bold" | "color.background.brand.bold.hovered" | "color.background.brand.bold.pressed" | "color.background.brand.boldest" | "color.background.brand.boldest.hovered" | "color.background.brand.boldest.pressed" | "color.background.danger" | "color.background.danger.hovered" | "color.background.danger.pressed" | "color.background.danger.bold" | "color.background.danger.bold.hovered" | "color.background.danger.bold.pressed" | "color.background.warning" | "color.background.warning.hovered" | "color.background.warning.pressed" | "color.background.warning.bold" | "color.background.warning.bold.hovered" | "color.background.warning.bold.pressed" | "color.background.success" | "color.background.success.hovered" | "color.background.success.pressed" | "color.background.success.bold" | "color.background.success.bold.hovered" | "color.background.success.bold.pressed" | "color.background.discovery" | "color.background.discovery.hovered" | "color.background.discovery.pressed" | "color.background.discovery.bold" | "color.background.discovery.bold.hovered" | "color.background.discovery.bold.pressed" | "color.background.information" | "color.background.information.hovered" | "color.background.information.pressed" | "color.background.information.bold" | "color.background.information.bold.hovered" | "color.background.information.bold.pressed" | "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.hovered" | "elevation.surface.pressed" | "elevation.surface.overlay" | "elevation.surface.overlay.hovered" | "elevation.surface.overlay.pressed" | "elevation.surface.raised" | "elevation.surface.raised.hovered" | "elevation.surface.raised.pressed" | "elevation.surface.sunken" | "utility.elevation.surface.current";