@atlaskit/ds-explorations 2.4.0 → 3.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/index.js +0 -21
  3. package/dist/es2019/index.js +0 -3
  4. package/dist/esm/index.js +0 -3
  5. package/dist/types/components/surface-provider.d.ts +2 -2
  6. package/dist/types/index.d.ts +0 -6
  7. package/dist/types-ts4.5/components/surface-provider.d.ts +2 -2
  8. package/dist/types-ts4.5/index.d.ts +0 -6
  9. package/examples/02-text-advanced.tsx +11 -20
  10. package/examples/02-text.tsx +15 -10
  11. package/examples/06-section-message.tsx +2 -4
  12. package/examples/07-comment.tsx +1 -3
  13. package/examples/08-lozenge.tsx +8 -4
  14. package/examples/99-interactions.tsx +49 -33
  15. package/package.json +3 -5
  16. package/report.api.md +0 -465
  17. package/scripts/codegen-styles.tsx +16 -89
  18. package/src/components/__tests__/unit/interaction-suface.test.tsx +2 -2
  19. package/src/components/surface-provider.tsx +1 -1
  20. package/src/index.tsx +0 -6
  21. package/tmp/api-report-tmp.d.ts +0 -451
  22. package/tsconfig.app.json +3 -0
  23. package/tsconfig.dev.json +0 -9
  24. package/box/package.json +0 -15
  25. package/dist/cjs/components/box.partial.js +0 -620
  26. package/dist/cjs/components/inline.partial.js +0 -182
  27. package/dist/cjs/components/stack.partial.js +0 -148
  28. package/dist/es2019/components/box.partial.js +0 -614
  29. package/dist/es2019/components/inline.partial.js +0 -177
  30. package/dist/es2019/components/stack.partial.js +0 -144
  31. package/dist/esm/components/box.partial.js +0 -617
  32. package/dist/esm/components/inline.partial.js +0 -177
  33. package/dist/esm/components/stack.partial.js +0 -143
  34. package/dist/types/components/box.partial.d.ts +0 -357
  35. package/dist/types/components/inline.partial.d.ts +0 -108
  36. package/dist/types/components/stack.partial.d.ts +0 -92
  37. package/dist/types-ts4.5/components/box.partial.d.ts +0 -357
  38. package/dist/types-ts4.5/components/inline.partial.d.ts +0 -108
  39. package/dist/types-ts4.5/components/stack.partial.d.ts +0 -92
  40. package/examples/00-basic.tsx +0 -22
  41. package/examples/01-box.tsx +0 -171
  42. package/examples/03-stack.tsx +0 -99
  43. package/examples/04-inline.tsx +0 -99
  44. package/examples/05-badge.tsx +0 -23
  45. package/inline/package.json +0 -15
  46. package/src/components/__tests__/unit/box.test.tsx +0 -55
  47. package/src/components/__tests__/unit/inline.test.tsx +0 -43
  48. package/src/components/__tests__/unit/stack.test.tsx +0 -31
  49. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +0 -3
  50. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +0 -3
  51. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +0 -3
  52. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +0 -3
  53. package/src/components/__tests__/visual-regression/inline-snapshot-test.tsx +0 -28
  54. package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +0 -28
  55. package/src/components/__tests__/vr-tests/__snapshots__/box--default.png +0 -0
  56. package/src/components/__tests__/vr-tests/box-snapshot-test.vr.tsx +0 -6
  57. package/src/components/box.partial.tsx +0 -706
  58. package/src/components/inline.partial.tsx +0 -218
  59. package/src/components/stack.partial.tsx +0 -174
  60. package/stack/package.json +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/ds-explorations
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#41301](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41301) [`5f80fdb81a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f80fdb81a0) - Remove Box, Inline, Stack components. These components are deprecated in favour of @atlaskit/primitives.
8
+
3
9
  ## 2.4.0
4
10
 
5
11
  ### Minor Changes
package/dist/cjs/index.js CHANGED
@@ -4,38 +4,17 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "UNSAFE_Box", {
8
- enumerable: true,
9
- get: function get() {
10
- return _box.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "UNSAFE_Inline", {
14
- enumerable: true,
15
- get: function get() {
16
- return _inline.default;
17
- }
18
- });
19
7
  Object.defineProperty(exports, "UNSAFE_InteractionSurface", {
20
8
  enumerable: true,
21
9
  get: function get() {
22
10
  return _interactionSurface.default;
23
11
  }
24
12
  });
25
- Object.defineProperty(exports, "UNSAFE_Stack", {
26
- enumerable: true,
27
- get: function get() {
28
- return _stack.default;
29
- }
30
- });
31
13
  Object.defineProperty(exports, "UNSAFE_Text", {
32
14
  enumerable: true,
33
15
  get: function get() {
34
16
  return _text.default;
35
17
  }
36
18
  });
37
- var _box = _interopRequireDefault(require("./components/box.partial"));
38
19
  var _text = _interopRequireDefault(require("./components/text.partial"));
39
- var _inline = _interopRequireDefault(require("./components/inline.partial"));
40
- var _stack = _interopRequireDefault(require("./components/stack.partial"));
41
20
  var _interactionSurface = _interopRequireDefault(require("./components/interaction-surface.partial"));
@@ -1,5 +1,2 @@
1
- export { default as UNSAFE_Box } from './components/box.partial';
2
1
  export { default as UNSAFE_Text } from './components/text.partial';
3
- export { default as UNSAFE_Inline } from './components/inline.partial';
4
- export { default as UNSAFE_Stack } from './components/stack.partial';
5
2
  export { default as UNSAFE_InteractionSurface } from './components/interaction-surface.partial';
package/dist/esm/index.js CHANGED
@@ -1,5 +1,2 @@
1
- export { default as UNSAFE_Box } from './components/box.partial';
2
1
  export { default as UNSAFE_Text } from './components/text.partial';
3
- export { default as UNSAFE_Inline } from './components/inline.partial';
4
- export { default as UNSAFE_Stack } from './components/stack.partial';
5
2
  export { default as UNSAFE_InteractionSurface } from './components/interaction-surface.partial';
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * A surface context provides context information on the current background (if set).
6
6
  */
7
- export declare const SurfaceContext: import("react").Context<"color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.overlay" | "elevation.surface.raised" | "elevation.surface.sunken" | "disabled" | "input" | "inverse.subtle" | "neutral" | "neutral.subtle" | "neutral.bold" | "selected" | "selected.bold" | "brand.subtlest" | "brand.bold" | "brand.boldest" | "danger" | "danger.bold" | "warning" | "warning.bold" | "success" | "success.bold" | "discovery" | "discovery.bold" | "information" | "information.bold">;
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
8
  /**
9
9
  * __useSurface__
10
10
  *
@@ -12,4 +12,4 @@ export declare const SurfaceContext: import("react").Context<"color.blanket" | "
12
12
  *
13
13
  * @see SurfaceContext
14
14
  */
15
- export declare const useSurface: () => "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.overlay" | "elevation.surface.raised" | "elevation.surface.sunken" | "disabled" | "input" | "inverse.subtle" | "neutral" | "neutral.subtle" | "neutral.bold" | "selected" | "selected.bold" | "brand.subtlest" | "brand.bold" | "brand.boldest" | "danger" | "danger.bold" | "warning" | "warning.bold" | "success" | "success.bold" | "discovery" | "discovery.bold" | "information" | "information.bold";
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";
@@ -1,9 +1,3 @@
1
- export { default as UNSAFE_Box } from './components/box.partial';
2
1
  export { default as UNSAFE_Text } from './components/text.partial';
3
- export { default as UNSAFE_Inline } from './components/inline.partial';
4
- export { default as UNSAFE_Stack } from './components/stack.partial';
5
2
  export { default as UNSAFE_InteractionSurface } from './components/interaction-surface.partial';
6
- export type { BoxProps as UNSAFE_BoxProps } from './components/box.partial';
7
3
  export type { TextProps as UNSAFE_TextProps } from './components/text.partial';
8
- export type { InlineProps as UNSAFE_InlineProps } from './components/inline.partial';
9
- export type { StackProps as UNSAFE_StackProps } from './components/stack.partial';
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * A surface context provides context information on the current background (if set).
6
6
  */
7
- export declare const SurfaceContext: import("react").Context<"color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.overlay" | "elevation.surface.raised" | "elevation.surface.sunken" | "disabled" | "input" | "inverse.subtle" | "neutral" | "neutral.subtle" | "neutral.bold" | "selected" | "selected.bold" | "brand.subtlest" | "brand.bold" | "brand.boldest" | "danger" | "danger.bold" | "warning" | "warning.bold" | "success" | "success.bold" | "discovery" | "discovery.bold" | "information" | "information.bold">;
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
8
  /**
9
9
  * __useSurface__
10
10
  *
@@ -12,4 +12,4 @@ export declare const SurfaceContext: import("react").Context<"color.blanket" | "
12
12
  *
13
13
  * @see SurfaceContext
14
14
  */
15
- export declare const useSurface: () => "color.blanket" | "color.blanket.selected" | "color.blanket.danger" | "elevation.surface" | "elevation.surface.overlay" | "elevation.surface.raised" | "elevation.surface.sunken" | "disabled" | "input" | "inverse.subtle" | "neutral" | "neutral.subtle" | "neutral.bold" | "selected" | "selected.bold" | "brand.subtlest" | "brand.bold" | "brand.boldest" | "danger" | "danger.bold" | "warning" | "warning.bold" | "success" | "success.bold" | "discovery" | "discovery.bold" | "information" | "information.bold";
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";
@@ -1,9 +1,3 @@
1
- export { default as UNSAFE_Box } from './components/box.partial';
2
1
  export { default as UNSAFE_Text } from './components/text.partial';
3
- export { default as UNSAFE_Inline } from './components/inline.partial';
4
- export { default as UNSAFE_Stack } from './components/stack.partial';
5
2
  export { default as UNSAFE_InteractionSurface } from './components/interaction-surface.partial';
6
- export type { BoxProps as UNSAFE_BoxProps } from './components/box.partial';
7
3
  export type { TextProps as UNSAFE_TextProps } from './components/text.partial';
8
- export type { InlineProps as UNSAFE_InlineProps } from './components/inline.partial';
9
- export type { StackProps as UNSAFE_StackProps } from './components/stack.partial';
@@ -1,37 +1,28 @@
1
1
  import React from 'react';
2
2
 
3
- import Inline from '@atlaskit/primitives/inline';
3
+ import { Box, Inline, xcss } from '@atlaskit/primitives';
4
4
 
5
- import Box from '../src/components/box.partial';
6
5
  import Text from '../src/components/text.partial';
7
6
 
7
+ const boxStyles = xcss({
8
+ display: 'flex',
9
+ paddingBlock: 'space.400',
10
+ paddingInline: 'space.400',
11
+ alignItems: 'center',
12
+ });
13
+
8
14
  export default () => {
9
15
  return (
10
16
  <Inline space="space.100">
11
- <Box
12
- paddingBlock="space.400"
13
- paddingInline="space.400"
14
- alignItems="center"
15
- backgroundColor="information"
16
- >
17
+ <Box xcss={boxStyles} backgroundColor="color.background.information">
17
18
  <Text>
18
19
  <Text>Text that deletes its redundant wrapping</Text>
19
20
  </Text>
20
21
  </Box>
21
- <Box
22
- paddingBlock="space.400"
23
- paddingInline="space.400"
24
- alignItems="center"
25
- backgroundColor="information"
26
- >
22
+ <Box xcss={boxStyles} backgroundColor="color.background.information">
27
23
  <Text fontWeight="semibold">Text on information</Text>
28
24
  </Box>
29
- <Box
30
- paddingBlock="space.400"
31
- paddingInline="space.400"
32
- alignItems="center"
33
- backgroundColor="brand.bold"
34
- >
25
+ <Box xcss={boxStyles} backgroundColor="color.background.brand.bold">
35
26
  <Text fontWeight="semibold">Text on brand bold</Text>
36
27
  </Box>
37
28
  </Inline>
@@ -1,10 +1,15 @@
1
1
  import React from 'react';
2
2
 
3
3
  import Heading from '@atlaskit/heading';
4
- import Inline from '@atlaskit/primitives/inline';
5
- import Stack from '@atlaskit/primitives/stack';
4
+ import { Box, Inline, Stack, xcss } from '@atlaskit/primitives';
6
5
 
7
- import { UNSAFE_Box as Box, UNSAFE_Text as Text } from '../src';
6
+ import { UNSAFE_Text as Text } from '../src';
7
+
8
+ const fixedWidthStyles = xcss({ display: 'flex', width: '200px' });
9
+
10
+ const lineHeightContainerStyles = xcss({
11
+ display: 'inline-flex',
12
+ });
8
13
 
9
14
  export default () => {
10
15
  return (
@@ -13,7 +18,7 @@ export default () => {
13
18
  Text examples
14
19
  </Heading>
15
20
  <Stack space="space.200">
16
- <Box display="block">
21
+ <Box>
17
22
  <Heading level="h300">Font size</Heading>
18
23
  <Inline space="space.200" testId="font-sizes">
19
24
  {(
@@ -34,7 +39,7 @@ export default () => {
34
39
  ))}
35
40
  </Inline>
36
41
  </Box>
37
- <Box display="block">
42
+ <Box>
38
43
  <Heading level="h300" as="h4">
39
44
  Font weight
40
45
  </Heading>
@@ -48,7 +53,7 @@ export default () => {
48
53
  )}
49
54
  </Inline>
50
55
  </Box>
51
- <Box display="block">
56
+ <Box>
52
57
  <Heading level="h300" as="h4">
53
58
  Line height
54
59
  </Heading>
@@ -65,15 +70,15 @@ export default () => {
65
70
  ).map((lineHeight) => (
66
71
  <Box
67
72
  key={lineHeight}
68
- display="inlineFlex"
69
- backgroundColor="neutral"
73
+ xcss={lineHeightContainerStyles}
74
+ backgroundColor="color.background.neutral"
70
75
  >
71
76
  <Text lineHeight={lineHeight}>lineHeight {lineHeight}</Text>
72
77
  </Box>
73
78
  ))}
74
79
  </Inline>
75
80
  </Box>
76
- <Box display="block">
81
+ <Box>
77
82
  <Heading level="h300" as="h4">
78
83
  Testing
79
84
  </Heading>
@@ -92,7 +97,7 @@ export default () => {
92
97
  >
93
98
  Text with various props
94
99
  </Text>
95
- <Box UNSAFE_style={{ width: '200px' }}>
100
+ <Box xcss={fixedWidthStyles}>
96
101
  <Text shouldTruncate>Long truncated text that is cut off.</Text>
97
102
  </Box>
98
103
  </Stack>
@@ -6,14 +6,12 @@ import Button from '@atlaskit/button';
6
6
  import __noop from '@atlaskit/ds-lib/noop';
7
7
  import Heading from '@atlaskit/heading';
8
8
  import InfoIcon from '@atlaskit/icon/glyph/info';
9
- import Inline from '@atlaskit/primitives/inline';
10
- import Stack from '@atlaskit/primitives/stack';
9
+ import { Box, Inline, Stack } from '@atlaskit/primitives';
11
10
  import SectionMessage, {
12
11
  SectionMessageAction,
13
12
  } from '@atlaskit/section-message';
14
13
  import { token } from '@atlaskit/tokens';
15
14
 
16
- import { UNSAFE_Box as Box } from '../src';
17
15
  import Text from '../src/components/text.partial';
18
16
 
19
17
  export default () => {
@@ -22,7 +20,7 @@ export default () => {
22
20
  <Box
23
21
  paddingBlock="space.200"
24
22
  paddingInline="space.200"
25
- backgroundColor="information"
23
+ backgroundColor="color.background.information"
26
24
  >
27
25
  <Inline space="space.200">
28
26
  <InfoIcon
@@ -2,10 +2,8 @@
2
2
  import { jsx } from '@emotion/react';
3
3
 
4
4
  import Lozenge from '@atlaskit/lozenge';
5
- import Inline from '@atlaskit/primitives/inline';
6
- import Stack from '@atlaskit/primitives/stack';
5
+ import { Box, Inline, Stack } from '@atlaskit/primitives';
7
6
 
8
- import { UNSAFE_Box as Box } from '../src';
9
7
  import Text from '../src/components/text.partial';
10
8
 
11
9
  const Author = ({ children }: any) => {
@@ -2,18 +2,22 @@
2
2
  import { jsx } from '@emotion/react';
3
3
 
4
4
  import Lozenge from '@atlaskit/lozenge';
5
- import Inline from '@atlaskit/primitives/inline';
5
+ import { Box, Inline, xcss } from '@atlaskit/primitives';
6
6
 
7
- import { UNSAFE_Box as Box, UNSAFE_Text as Text } from '../src';
7
+ import { UNSAFE_Text as Text } from '../src';
8
+
9
+ const boxStyles = xcss({
10
+ borderRadius: 'border.radius',
11
+ });
8
12
 
9
13
  export default () => {
10
14
  return (
11
15
  <Inline space="space.200">
12
16
  <Lozenge>Default</Lozenge>
13
17
  <Box
14
- backgroundColor="neutral"
15
- borderRadius="normal"
16
18
  as="span"
19
+ xcss={boxStyles}
20
+ backgroundColor="color.background.neutral"
17
21
  paddingInline="space.050"
18
22
  >
19
23
  <Text
@@ -1,42 +1,55 @@
1
1
  /** @jsx jsx */
2
2
  import { Fragment } from 'react';
3
3
 
4
- import { css, jsx } from '@emotion/react';
4
+ import { jsx } from '@emotion/react';
5
5
 
6
6
  import Button from '@atlaskit/button';
7
7
  import { Code } from '@atlaskit/code';
8
8
  import FocusRing from '@atlaskit/focus-ring';
9
9
  import Heading from '@atlaskit/heading';
10
10
  import WarningIcon from '@atlaskit/icon/glyph/warning';
11
- import Inline from '@atlaskit/primitives/inline';
12
- import Stack from '@atlaskit/primitives/stack';
11
+ import { Box, Inline, Stack, xcss } from '@atlaskit/primitives';
13
12
  import Textfield from '@atlaskit/textfield';
14
- import { B200 } from '@atlaskit/theme/colors';
15
13
  import { token } from '@atlaskit/tokens';
16
14
 
17
15
  import {
18
- UNSAFE_Box as Box,
19
16
  UNSAFE_InteractionSurface as InteractionSurface,
20
17
  UNSAFE_Text as Text,
21
18
  } from '../src';
22
19
 
23
- const fieldsetStyles = css({
20
+ const containerStyles = xcss({
21
+ width: 'size.500',
22
+ });
23
+
24
+ const fieldsetStyles = xcss({
24
25
  flex: '1 1 100%',
26
+ borderStyle: 'solid',
27
+ borderWidth: 'border.width',
28
+ borderColor: 'color.border',
25
29
  ':hover': {
26
- backgroundColor: token('color.background.input.hovered', '#bbb'),
30
+ backgroundColor: 'color.background.input.hovered',
27
31
  },
28
32
  ':invalid': {
29
- borderColor: token('color.border.danger', 'red'),
33
+ borderColor: 'color.border.danger',
34
+ },
35
+ ':focus': {
36
+ backgroundColor: 'color.background.input',
37
+ borderColor: 'color.border.focused',
30
38
  },
31
- ':focus, :focus-within': {
32
- backgroundColor: token('color.background.input', '#FAFBFC'),
33
- borderColor: token('color.border.focused', B200),
39
+ ':focus-within': {
40
+ backgroundColor: 'color.background.input',
41
+ borderColor: 'color.border.focused',
34
42
  },
35
43
  });
36
44
 
45
+ const focusRingBoxStyles = xcss({
46
+ borderRadius: 'border.radius',
47
+ position: 'relative',
48
+ });
49
+
37
50
  export default () => {
38
51
  return (
39
- <Box width="size.500" padding="space.100" testId="all">
52
+ <Box xcss={containerStyles} padding="space.100" testId="all">
40
53
  <Stack space="space.200">
41
54
  <Heading level="h400">Current ADS Buttons</Heading>
42
55
  <Inline space="space.200">
@@ -48,13 +61,18 @@ export default () => {
48
61
  Buttons with <Code>InteractionSurface</Code>
49
62
  </Heading>
50
63
  <Inline space="space.200" testId="buttons">
51
- {(['brand.bold', 'neutral', 'warning.bold'] as const).map((app) => (
64
+ {(
65
+ [
66
+ 'color.background.brand.bold',
67
+ 'color.background.neutral',
68
+ 'color.background.warning.bold',
69
+ ] as const
70
+ ).map((app) => (
52
71
  <FocusRing key={app}>
53
72
  <Box
54
73
  as="button"
55
74
  onClick={() => console.log('hello')}
56
- borderRadius="normal"
57
- position="relative"
75
+ xcss={focusRingBoxStyles}
58
76
  paddingInline="space.150"
59
77
  backgroundColor={app}
60
78
  >
@@ -79,11 +97,10 @@ export default () => {
79
97
  <FocusRing>
80
98
  <Box
81
99
  as="button"
82
- backgroundColor="brand.bold"
100
+ backgroundColor="color.background.brand.bold"
83
101
  onClick={() => console.log('hello')}
84
- borderRadius="normal"
85
- position="relative"
86
102
  padding="space.050"
103
+ xcss={focusRingBoxStyles}
87
104
  >
88
105
  <InteractionSurface>
89
106
  <WarningIcon
@@ -97,10 +114,9 @@ export default () => {
97
114
  <FocusRing>
98
115
  <Box
99
116
  as="button"
100
- backgroundColor="neutral"
117
+ backgroundColor="color.background.neutral"
101
118
  onClick={() => console.log('hello')}
102
- borderRadius="normal"
103
- position="relative"
119
+ xcss={focusRingBoxStyles}
104
120
  padding="space.050"
105
121
  >
106
122
  <InteractionSurface>
@@ -111,10 +127,9 @@ export default () => {
111
127
  <FocusRing>
112
128
  <Box
113
129
  as="button"
114
- backgroundColor="warning.bold"
130
+ backgroundColor="color.background.warning.bold"
115
131
  onClick={() => console.log('hello')}
116
- borderRadius="normal"
117
- position="relative"
132
+ xcss={focusRingBoxStyles}
118
133
  padding="space.050"
119
134
  >
120
135
  <InteractionSurface>
@@ -131,15 +146,20 @@ export default () => {
131
146
  Progress Indicator with <Code>InteractionSurface</Code>
132
147
  </Heading>
133
148
  <Inline space="space.200" testId="progress-indicators">
134
- {(['brand.bold', 'neutral', 'warning.bold'] as const).map((app) => (
149
+ {(
150
+ [
151
+ 'color.background.brand.bold',
152
+ 'color.background.neutral',
153
+ 'color.background.warning.bold',
154
+ ] as const
155
+ ).map((app) => (
135
156
  <FocusRing>
136
157
  <Box
137
158
  key={app}
138
159
  as="button"
139
160
  backgroundColor={app}
140
161
  onClick={() => console.log('hello')}
141
- borderRadius="rounded"
142
- position="relative"
162
+ xcss={focusRingBoxStyles}
143
163
  padding="space.050"
144
164
  >
145
165
  <InteractionSurface>
@@ -154,14 +174,10 @@ export default () => {
154
174
  <Textfield />
155
175
  <Box
156
176
  as="fieldset"
157
- borderRadius="normal"
158
- borderStyle="solid"
159
- borderWidth="2px"
160
177
  padding="space.100"
161
178
  tabIndex={-1}
162
- borderColor="color.border"
163
- backgroundColor="input"
164
- css={fieldsetStyles}
179
+ backgroundColor="color.background.input"
180
+ xcss={fieldsetStyles}
165
181
  >
166
182
  <input
167
183
  id="textfield"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ds-explorations",
3
- "version": "2.4.0",
3
+ "version": "3.0.0",
4
4
  "description": "An experimental package for exploration and validation of spacing / typography foundations.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,6 +35,7 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@atlaskit/ds-lib": "*",
38
+ "@atlaskit/primitives": "^1.6.0",
38
39
  "@atlaskit/visual-regression": "*",
39
40
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
40
41
  "@atlassian/codegen": "^0.1.0",
@@ -73,10 +74,7 @@
73
74
  },
74
75
  "af:exports": {
75
76
  ".": "./src/index.tsx",
76
- "./box": "./src/components/box.partial.tsx",
77
- "./text": "./src/components/text.partial.tsx",
78
- "./stack": "./src/components/stack.partial.tsx",
79
- "./inline": "./src/components/inline.partial.tsx"
77
+ "./text": "./src/components/text.partial.tsx"
80
78
  },
81
79
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
82
80
  "homepage": "https://atlaskit.atlassian.com"