@atlaskit/primitives 1.0.3 → 1.0.5

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 (37) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/constellation/bleed/code.mdx +19 -0
  3. package/constellation/bleed/example.mdx +46 -0
  4. package/dist/cjs/components/bleed.js +79 -0
  5. package/dist/cjs/components/flex.js +0 -1
  6. package/dist/cjs/components/grid.js +43 -2
  7. package/dist/cjs/index.js +7 -0
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/cjs/xcss/style-maps.partial.js +2 -2
  10. package/dist/es2019/components/bleed.js +72 -0
  11. package/dist/es2019/components/flex.js +0 -1
  12. package/dist/es2019/components/grid.js +43 -2
  13. package/dist/es2019/index.js +1 -0
  14. package/dist/es2019/responsive/build-media-query-css.js +1 -1
  15. package/dist/es2019/version.json +1 -1
  16. package/dist/es2019/xcss/style-maps.partial.js +2 -2
  17. package/dist/esm/components/bleed.js +71 -0
  18. package/dist/esm/components/flex.js +0 -1
  19. package/dist/esm/components/grid.js +43 -2
  20. package/dist/esm/index.js +1 -0
  21. package/dist/esm/version.json +1 -1
  22. package/dist/esm/xcss/style-maps.partial.js +2 -2
  23. package/dist/types/components/bleed.d.ts +36 -0
  24. package/dist/types/components/grid.d.ts +44 -3
  25. package/dist/types/components/types.d.ts +4 -0
  26. package/dist/types/index.d.ts +16 -7
  27. package/dist/types/xcss/style-maps.partial.d.ts +1 -1
  28. package/dist/types-ts4.5/components/bleed.d.ts +36 -0
  29. package/dist/types-ts4.5/components/grid.d.ts +44 -3
  30. package/dist/types-ts4.5/components/types.d.ts +4 -0
  31. package/dist/types-ts4.5/index.d.ts +16 -7
  32. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +1 -1
  33. package/extract-react-types/bleed-props.tsx +34 -0
  34. package/package.json +11 -2
  35. package/report.api.md +72 -0
  36. package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +1 -1
  37. package/tmp/api-report-tmp.d.ts +808 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 1.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3fadbb8bf73`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fadbb8bf73) - Internal changes.
8
+
9
+ ## 1.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`74f7af9882b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/74f7af9882b) - [ux] correct fallback color of token color.border.focused to meet contrast requirement
14
+
3
15
  ## 1.0.3
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: Bleed
3
+ description: Bleed is a primitive layout component that controls negative whitespace.
4
+ order: 1
5
+ ---
6
+
7
+ import { CodeDocsHeader } from '@af/design-system-docs-ui';
8
+
9
+ <CodeDocsHeader
10
+ name="@atlaskit/primitives"
11
+ repository="https://bitbucket.org/atlassian/atlassian-frontend-mirror"
12
+ directoryName="primitives"
13
+ />
14
+
15
+ import BleedProps from '!!extract-react-types-loader!../../extract-react-types/bleed-props'
16
+
17
+ ## Props
18
+
19
+ <PropsTable heading="" props={BleedProps} />
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Bleed
3
+ description: Bleed is a primitive layout component that controls negative whitespace.
4
+ order: 0
5
+ ---
6
+
7
+ import BleedDefault from '../../examples/constellation/bleed/default';
8
+ import BleedBlock from '../../examples/constellation/bleed/block';
9
+ import BleedInline from '../../examples/constellation/bleed/inline';
10
+ import BleedAll from '../../examples/constellation/bleed/all';
11
+
12
+ import { CodeDocsHeader } from '@af/design-system-docs-ui';
13
+
14
+ <CodeDocsHeader
15
+ name="@atlaskit/primitives"
16
+ repository="https://bitbucket.org/atlassian/atlassian-frontend-mirror"
17
+ directoryName="primitives"
18
+ />
19
+
20
+ ## Using Bleed
21
+
22
+ Bleed is a component that allows its children to break the boundaries of its container. This is useful for content
23
+ that wants to negate the padding or whitespace applied by its parent in a controlled manner. For example in the below grid layout, the middle
24
+ item bleeds across the inline and block axes to overlap the gap set by the grid.
25
+
26
+ <Example Component={BleedAll} packageName="@atlaskit/primitives/bleed" />
27
+
28
+ ## Bleed and no bleed
29
+
30
+ Bleed might be utilised to create a stacking effect with a group of avatars. Here each avatar is laid out with the `Inline` parent
31
+ container. Without a bleed, each avatar would sit directly adjacent to its sibling. With `Bleed` we can negate the whitespace and force
32
+ each avatar to overlap its direct sibling and create our desired stack.
33
+
34
+ <Example Component={BleedDefault} packageName="@atlaskit/primitives/bleed" />
35
+
36
+ ## Block whitespace
37
+
38
+ Bleed can be controlled on the block axis (vertical) with the `block` property. The values of this property are tied to our spacing scale.
39
+
40
+ <Example Component={BleedBlock} packageName="@atlaskit/primitives/bleed" />
41
+
42
+ ## Inline whitespace
43
+
44
+ Bleed can also be controlled on the inline axis (horizontal) with the `inline` property. The values of this property are tied to our spacing scale.
45
+
46
+ <Example Component={BleedInline} packageName="@atlaskit/primitives/bleed" />
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ var _react2 = require("@emotion/react");
9
+ var _xcss = require("../xcss/xcss");
10
+ /* eslint-disable @atlaskit/design-system/use-primitives */
11
+ /**
12
+ * @jsxRuntime classic
13
+ * @jsx jsx
14
+ */
15
+
16
+ var baseStyles = (0, _react2.css)({
17
+ boxSizing: 'border-box'
18
+ });
19
+ var blockBleedMap = {
20
+ 'space.025': (0, _react2.css)({
21
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-050, 2px)", ")")
22
+ }),
23
+ 'space.050': (0, _react2.css)({
24
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-050, 4px)", ")")
25
+ }),
26
+ 'space.100': (0, _react2.css)({
27
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-100, 8px)", ")")
28
+ }),
29
+ 'space.200': (0, _react2.css)({
30
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-200, 16px)", ")")
31
+ }),
32
+ 'space.150': (0, _react2.css)({
33
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-150, 12px)", ")")
34
+ })
35
+ };
36
+ var inlineBleedMap = {
37
+ 'space.025': (0, _react2.css)({
38
+ marginInline: "calc(-1 * ".concat("var(--ds-space-025, 2px)", ")")
39
+ }),
40
+ 'space.050': (0, _react2.css)({
41
+ marginInline: "calc(-1 * ".concat("var(--ds-space-050, 4px)", ")")
42
+ }),
43
+ 'space.100': (0, _react2.css)({
44
+ marginInline: "calc(-1 * ".concat("var(--ds-space-100, 8px)", ")")
45
+ }),
46
+ 'space.200': (0, _react2.css)({
47
+ marginInline: "calc(-1 * ".concat("var(--ds-space-200, 16px)", ")")
48
+ }),
49
+ 'space.150': (0, _react2.css)({
50
+ marginInline: "calc(-1 * ".concat("var(--ds-space-150, 12px)", ")")
51
+ })
52
+ };
53
+
54
+ /**
55
+ * __Bleed__
56
+ *
57
+ * `Bleed` is a primitive layout component that controls negative whitespace.
58
+ *
59
+ * - [Examples](https://atlassian.design/components/primitives/bleed/examples)
60
+ * - [Code](https://atlassian.design/components/primitives/bleed/code)
61
+ */
62
+ var Bleed = /*#__PURE__*/(0, _react.memo)(function (_ref) {
63
+ var children = _ref.children,
64
+ testId = _ref.testId,
65
+ inline = _ref.inline,
66
+ block = _ref.block,
67
+ all = _ref.all,
68
+ xcss = _ref.xcss;
69
+ var xcssStyles = xcss && (0, _xcss.parseXcss)(xcss);
70
+ return (0, _react2.jsx)("div", {
71
+ css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
72
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
73
+ xcssStyles],
74
+ "data-testid": testId
75
+ }, children);
76
+ });
77
+ Bleed.displayName = 'Bleed';
78
+ var _default = Bleed;
79
+ exports.default = _default;
@@ -8,7 +8,6 @@ var _react = require("react");
8
8
  var _react2 = require("@emotion/react");
9
9
  var _styleMaps = require("../xcss/style-maps.partial");
10
10
  var _xcss = require("../xcss/xcss");
11
- /* eslint-disable @repo/internal/styles/no-exported-styles */
12
11
  /** @jsx jsx */
13
12
 
14
13
  var justifyContentMap = {
@@ -8,7 +8,6 @@ var _react = require("react");
8
8
  var _react2 = require("@emotion/react");
9
9
  var _styleMaps = require("../xcss/style-maps.partial");
10
10
  var _xcss = require("../xcss/xcss");
11
- /* eslint-disable @repo/internal/styles/no-exported-styles */
12
11
  /** @jsx jsx */
13
12
 
14
13
  var justifyContentMap = {
@@ -34,6 +33,43 @@ var justifyContentMap = {
34
33
  justifyContent: 'stretch'
35
34
  })
36
35
  };
36
+ var justifyItemsMap = {
37
+ start: (0, _react2.css)({
38
+ justifyItems: 'start'
39
+ }),
40
+ center: (0, _react2.css)({
41
+ justifyItems: 'center'
42
+ }),
43
+ end: (0, _react2.css)({
44
+ justifyItems: 'end'
45
+ }),
46
+ stretch: (0, _react2.css)({
47
+ justifyItems: 'stretch'
48
+ })
49
+ };
50
+ var alignContentMap = {
51
+ start: (0, _react2.css)({
52
+ alignContent: 'start'
53
+ }),
54
+ center: (0, _react2.css)({
55
+ alignContent: 'center'
56
+ }),
57
+ end: (0, _react2.css)({
58
+ alignContent: 'end'
59
+ }),
60
+ 'space-between': (0, _react2.css)({
61
+ alignContent: 'space-between'
62
+ }),
63
+ 'space-around': (0, _react2.css)({
64
+ alignContent: 'space-around'
65
+ }),
66
+ 'space-evenly': (0, _react2.css)({
67
+ alignContent: 'space-evenly'
68
+ }),
69
+ stretch: (0, _react2.css)({
70
+ alignContent: 'stretch'
71
+ })
72
+ };
37
73
  var alignItemsMap = {
38
74
  start: (0, _react2.css)({
39
75
  alignItems: 'start'
@@ -93,11 +129,14 @@ var gridAutoFlowMap = {
93
129
  var Grid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
94
130
  var as = _ref.as,
95
131
  alignItems = _ref.alignItems,
132
+ alignContent = _ref.alignContent,
96
133
  justifyContent = _ref.justifyContent,
97
134
  gap = _ref.gap,
98
135
  columnGap = _ref.columnGap,
99
136
  rowGap = _ref.rowGap,
100
137
  children = _ref.children,
138
+ id = _ref.id,
139
+ role = _ref.role,
101
140
  testId = _ref.testId,
102
141
  autoFlow = _ref.autoFlow,
103
142
  gridTemplateAreas = _ref.templateAreas,
@@ -114,8 +153,10 @@ var Grid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
114
153
  gridTemplateRows: gridTemplateRows
115
154
  }) : undefined;
116
155
  return (0, _react2.jsx)(Component, {
156
+ id: id,
157
+ role: role,
117
158
  style: style,
118
- css: [baseStyles, gap && _styleMaps.spaceStylesMap.gap[gap], columnGap && _styleMaps.spaceStylesMap.columnGap[columnGap], rowGap && _styleMaps.spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
159
+ css: [baseStyles, gap && _styleMaps.spaceStylesMap.gap[gap], columnGap && _styleMaps.spaceStylesMap.columnGap[columnGap], rowGap && _styleMaps.spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
119
160
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
120
161
  xcssClassName && xcssClassName],
121
162
  "data-testid": testId,
package/dist/cjs/index.js CHANGED
@@ -4,6 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ Object.defineProperty(exports, "Bleed", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _bleed.default;
11
+ }
12
+ });
7
13
  Object.defineProperty(exports, "Box", {
8
14
  enumerable: true,
9
15
  get: function get() {
@@ -71,4 +77,5 @@ var _xcss = require("./xcss/xcss");
71
77
  var _stack = _interopRequireDefault(require("./components/stack"));
72
78
  var _flex = _interopRequireDefault(require("./components/flex"));
73
79
  var _grid = _interopRequireDefault(require("./components/grid"));
80
+ var _bleed = _interopRequireDefault(require("./components/bleed"));
74
81
  var _responsive = require("./responsive");
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "sideEffects": false
5
5
  }
@@ -60,7 +60,7 @@ exports.spaceMap = spaceMap;
60
60
 
61
61
  /**
62
62
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
63
- * @codegen <<SignedSource::ce1e2114942246d556d0b102fe77b724>>
63
+ * @codegen <<SignedSource::58f7acf912c1f55cbaa7a5be887f1b44>>
64
64
  * @codegenId colors
65
65
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
66
66
  * @codegenParams ["border", "background", "shadow", "text", "fill"]
@@ -79,7 +79,7 @@ var borderColorMap = {
79
79
  'color.border.accent.magenta': "var(--ds-border-accent-magenta, #CD519D)",
80
80
  'color.border.accent.gray': "var(--ds-border-accent-gray, #5E6C84)",
81
81
  'color.border.disabled': "var(--ds-border-disabled, #FAFBFC)",
82
- 'color.border.focused': "var(--ds-border-focused, #4C9AFF)",
82
+ 'color.border.focused': "var(--ds-border-focused, #2684FF)",
83
83
  'color.border.input': "var(--ds-border-input, #FAFBFC)",
84
84
  'color.border.inverse': "var(--ds-border-inverse, #FFFFFF)",
85
85
  'color.border.selected': "var(--ds-border-selected, #0052CC)",
@@ -0,0 +1,72 @@
1
+ /* eslint-disable @atlaskit/design-system/use-primitives */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+ import { memo } from 'react';
7
+ import { css, jsx } from '@emotion/react';
8
+ import { parseXcss } from '../xcss/xcss';
9
+ const baseStyles = css({
10
+ boxSizing: 'border-box'
11
+ });
12
+ const blockBleedMap = {
13
+ 'space.025': css({
14
+ marginBlock: `calc(-1 * ${"var(--ds-space-050, 2px)"})`
15
+ }),
16
+ 'space.050': css({
17
+ marginBlock: `calc(-1 * ${"var(--ds-space-050, 4px)"})`
18
+ }),
19
+ 'space.100': css({
20
+ marginBlock: `calc(-1 * ${"var(--ds-space-100, 8px)"})`
21
+ }),
22
+ 'space.200': css({
23
+ marginBlock: `calc(-1 * ${"var(--ds-space-200, 16px)"})`
24
+ }),
25
+ 'space.150': css({
26
+ marginBlock: `calc(-1 * ${"var(--ds-space-150, 12px)"})`
27
+ })
28
+ };
29
+ const inlineBleedMap = {
30
+ 'space.025': css({
31
+ marginInline: `calc(-1 * ${"var(--ds-space-025, 2px)"})`
32
+ }),
33
+ 'space.050': css({
34
+ marginInline: `calc(-1 * ${"var(--ds-space-050, 4px)"})`
35
+ }),
36
+ 'space.100': css({
37
+ marginInline: `calc(-1 * ${"var(--ds-space-100, 8px)"})`
38
+ }),
39
+ 'space.200': css({
40
+ marginInline: `calc(-1 * ${"var(--ds-space-200, 16px)"})`
41
+ }),
42
+ 'space.150': css({
43
+ marginInline: `calc(-1 * ${"var(--ds-space-150, 12px)"})`
44
+ })
45
+ };
46
+
47
+ /**
48
+ * __Bleed__
49
+ *
50
+ * `Bleed` is a primitive layout component that controls negative whitespace.
51
+ *
52
+ * - [Examples](https://atlassian.design/components/primitives/bleed/examples)
53
+ * - [Code](https://atlassian.design/components/primitives/bleed/code)
54
+ */
55
+ const Bleed = /*#__PURE__*/memo(({
56
+ children,
57
+ testId,
58
+ inline,
59
+ block,
60
+ all,
61
+ xcss
62
+ }) => {
63
+ const xcssStyles = xcss && parseXcss(xcss);
64
+ return jsx("div", {
65
+ css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
66
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
67
+ xcssStyles],
68
+ "data-testid": testId
69
+ }, children);
70
+ });
71
+ Bleed.displayName = 'Bleed';
72
+ export default Bleed;
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/styles/no-exported-styles */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef, memo } from 'react';
4
3
  import { css, jsx } from '@emotion/react';
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/styles/no-exported-styles */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef, memo } from 'react';
4
3
  import { css, jsx } from '@emotion/react';
@@ -27,6 +26,43 @@ const justifyContentMap = {
27
26
  justifyContent: 'stretch'
28
27
  })
29
28
  };
29
+ const justifyItemsMap = {
30
+ start: css({
31
+ justifyItems: 'start'
32
+ }),
33
+ center: css({
34
+ justifyItems: 'center'
35
+ }),
36
+ end: css({
37
+ justifyItems: 'end'
38
+ }),
39
+ stretch: css({
40
+ justifyItems: 'stretch'
41
+ })
42
+ };
43
+ const alignContentMap = {
44
+ start: css({
45
+ alignContent: 'start'
46
+ }),
47
+ center: css({
48
+ alignContent: 'center'
49
+ }),
50
+ end: css({
51
+ alignContent: 'end'
52
+ }),
53
+ 'space-between': css({
54
+ alignContent: 'space-between'
55
+ }),
56
+ 'space-around': css({
57
+ alignContent: 'space-around'
58
+ }),
59
+ 'space-evenly': css({
60
+ alignContent: 'space-evenly'
61
+ }),
62
+ stretch: css({
63
+ alignContent: 'stretch'
64
+ })
65
+ };
30
66
  const alignItemsMap = {
31
67
  start: css({
32
68
  alignItems: 'start'
@@ -86,11 +122,14 @@ const gridAutoFlowMap = {
86
122
  const Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
87
123
  as,
88
124
  alignItems,
125
+ alignContent,
89
126
  justifyContent,
90
127
  gap,
91
128
  columnGap,
92
129
  rowGap,
93
130
  children,
131
+ id,
132
+ role,
94
133
  testId,
95
134
  autoFlow,
96
135
  templateAreas: gridTemplateAreas,
@@ -106,8 +145,10 @@ const Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
106
145
  gridTemplateRows
107
146
  }) : undefined;
108
147
  return jsx(Component, {
148
+ id: id,
149
+ role: role,
109
150
  style: style,
110
- css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
151
+ css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
111
152
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
112
153
  xcssClassName && xcssClassName],
113
154
  "data-testid": testId,
@@ -5,4 +5,5 @@ export { xcss } from './xcss/xcss';
5
5
  export { default as Stack } from './components/stack';
6
6
  export { default as Flex } from './components/flex';
7
7
  export { default as Grid } from './components/grid';
8
+ export { default as Bleed } from './components/bleed';
8
9
  export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
@@ -67,7 +67,7 @@ export const UNSAFE_buildBelowMediaQueryCSS = input => {
67
67
  return {
68
68
  ...acc,
69
69
  [breakpoint]: css({
70
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
70
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
71
71
  [UNSAFE_media.below[breakpoint]]: typeof input === 'function' ? input(breakpoint) : input
72
72
  })
73
73
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "sideEffects": false
5
5
  }
@@ -48,7 +48,7 @@ export const spaceMap = {
48
48
  */
49
49
  /**
50
50
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
51
- * @codegen <<SignedSource::ce1e2114942246d556d0b102fe77b724>>
51
+ * @codegen <<SignedSource::58f7acf912c1f55cbaa7a5be887f1b44>>
52
52
  * @codegenId colors
53
53
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
54
54
  * @codegenParams ["border", "background", "shadow", "text", "fill"]
@@ -67,7 +67,7 @@ export const borderColorMap = {
67
67
  'color.border.accent.magenta': "var(--ds-border-accent-magenta, #CD519D)",
68
68
  'color.border.accent.gray': "var(--ds-border-accent-gray, #5E6C84)",
69
69
  'color.border.disabled': "var(--ds-border-disabled, #FAFBFC)",
70
- 'color.border.focused': "var(--ds-border-focused, #4C9AFF)",
70
+ 'color.border.focused': "var(--ds-border-focused, #2684FF)",
71
71
  'color.border.input': "var(--ds-border-input, #FAFBFC)",
72
72
  'color.border.inverse': "var(--ds-border-inverse, #FFFFFF)",
73
73
  'color.border.selected': "var(--ds-border-selected, #0052CC)",
@@ -0,0 +1,71 @@
1
+ /* eslint-disable @atlaskit/design-system/use-primitives */
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+ import { memo } from 'react';
7
+ import { css, jsx } from '@emotion/react';
8
+ import { parseXcss } from '../xcss/xcss';
9
+ var baseStyles = css({
10
+ boxSizing: 'border-box'
11
+ });
12
+ var blockBleedMap = {
13
+ 'space.025': css({
14
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-050, 2px)", ")")
15
+ }),
16
+ 'space.050': css({
17
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-050, 4px)", ")")
18
+ }),
19
+ 'space.100': css({
20
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-100, 8px)", ")")
21
+ }),
22
+ 'space.200': css({
23
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-200, 16px)", ")")
24
+ }),
25
+ 'space.150': css({
26
+ marginBlock: "calc(-1 * ".concat("var(--ds-space-150, 12px)", ")")
27
+ })
28
+ };
29
+ var inlineBleedMap = {
30
+ 'space.025': css({
31
+ marginInline: "calc(-1 * ".concat("var(--ds-space-025, 2px)", ")")
32
+ }),
33
+ 'space.050': css({
34
+ marginInline: "calc(-1 * ".concat("var(--ds-space-050, 4px)", ")")
35
+ }),
36
+ 'space.100': css({
37
+ marginInline: "calc(-1 * ".concat("var(--ds-space-100, 8px)", ")")
38
+ }),
39
+ 'space.200': css({
40
+ marginInline: "calc(-1 * ".concat("var(--ds-space-200, 16px)", ")")
41
+ }),
42
+ 'space.150': css({
43
+ marginInline: "calc(-1 * ".concat("var(--ds-space-150, 12px)", ")")
44
+ })
45
+ };
46
+
47
+ /**
48
+ * __Bleed__
49
+ *
50
+ * `Bleed` is a primitive layout component that controls negative whitespace.
51
+ *
52
+ * - [Examples](https://atlassian.design/components/primitives/bleed/examples)
53
+ * - [Code](https://atlassian.design/components/primitives/bleed/code)
54
+ */
55
+ var Bleed = /*#__PURE__*/memo(function (_ref) {
56
+ var children = _ref.children,
57
+ testId = _ref.testId,
58
+ inline = _ref.inline,
59
+ block = _ref.block,
60
+ all = _ref.all,
61
+ xcss = _ref.xcss;
62
+ var xcssStyles = xcss && parseXcss(xcss);
63
+ return jsx("div", {
64
+ css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
65
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
66
+ xcssStyles],
67
+ "data-testid": testId
68
+ }, children);
69
+ });
70
+ Bleed.displayName = 'Bleed';
71
+ export default Bleed;
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/styles/no-exported-styles */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef, memo } from 'react';
4
3
  import { css, jsx } from '@emotion/react';
@@ -1,4 +1,3 @@
1
- /* eslint-disable @repo/internal/styles/no-exported-styles */
2
1
  /** @jsx jsx */
3
2
  import { forwardRef, memo } from 'react';
4
3
  import { css, jsx } from '@emotion/react';
@@ -27,6 +26,43 @@ var justifyContentMap = {
27
26
  justifyContent: 'stretch'
28
27
  })
29
28
  };
29
+ var justifyItemsMap = {
30
+ start: css({
31
+ justifyItems: 'start'
32
+ }),
33
+ center: css({
34
+ justifyItems: 'center'
35
+ }),
36
+ end: css({
37
+ justifyItems: 'end'
38
+ }),
39
+ stretch: css({
40
+ justifyItems: 'stretch'
41
+ })
42
+ };
43
+ var alignContentMap = {
44
+ start: css({
45
+ alignContent: 'start'
46
+ }),
47
+ center: css({
48
+ alignContent: 'center'
49
+ }),
50
+ end: css({
51
+ alignContent: 'end'
52
+ }),
53
+ 'space-between': css({
54
+ alignContent: 'space-between'
55
+ }),
56
+ 'space-around': css({
57
+ alignContent: 'space-around'
58
+ }),
59
+ 'space-evenly': css({
60
+ alignContent: 'space-evenly'
61
+ }),
62
+ stretch: css({
63
+ alignContent: 'stretch'
64
+ })
65
+ };
30
66
  var alignItemsMap = {
31
67
  start: css({
32
68
  alignItems: 'start'
@@ -86,11 +122,14 @@ var gridAutoFlowMap = {
86
122
  var Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
87
123
  var as = _ref.as,
88
124
  alignItems = _ref.alignItems,
125
+ alignContent = _ref.alignContent,
89
126
  justifyContent = _ref.justifyContent,
90
127
  gap = _ref.gap,
91
128
  columnGap = _ref.columnGap,
92
129
  rowGap = _ref.rowGap,
93
130
  children = _ref.children,
131
+ id = _ref.id,
132
+ role = _ref.role,
94
133
  testId = _ref.testId,
95
134
  autoFlow = _ref.autoFlow,
96
135
  gridTemplateAreas = _ref.templateAreas,
@@ -107,8 +146,10 @@ var Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
107
146
  gridTemplateRows: gridTemplateRows
108
147
  }) : undefined;
109
148
  return jsx(Component, {
149
+ id: id,
150
+ role: role,
110
151
  style: style,
111
- css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
152
+ css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
112
153
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
113
154
  xcssClassName && xcssClassName],
114
155
  "data-testid": testId,
package/dist/esm/index.js CHANGED
@@ -5,4 +5,5 @@ export { xcss } from './xcss/xcss';
5
5
  export { default as Stack } from './components/stack';
6
6
  export { default as Flex } from './components/flex';
7
7
  export { default as Grid } from './components/grid';
8
+ export { default as Bleed } from './components/bleed';
8
9
  export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "sideEffects": false
5
5
  }