@atlaskit/primitives 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 0.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3f273cdd54f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3f273cdd54f) - Allow for an Inline list item.
8
+
9
+ ## 0.12.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`407853b7b26`](https://bitbucket.org/atlassian/atlassian-frontend/commits/407853b7b26) - Inline now has a new default value for the `alignBlock` prop: `start` - the previous default, `stretch`, is now an option that can be set explicitly as well.
14
+
3
15
  ## 0.11.0
4
16
 
5
17
  ### Minor Changes
@@ -22,6 +22,9 @@ var alignItemsMap = {
22
22
  }),
23
23
  end: (0, _react2.css)({
24
24
  alignItems: 'flex-end'
25
+ }),
26
+ stretch: (0, _react2.css)({
27
+ alignItems: 'stretch'
25
28
  })
26
29
  };
27
30
  var justifyContentMap = {
@@ -87,7 +90,8 @@ var Separator = function Separator(_ref) {
87
90
  var Inline = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
88
91
  var as = _ref2.as,
89
92
  alignInline = _ref2.alignInline,
90
- alignItems = _ref2.alignBlock,
93
+ _ref2$alignBlock = _ref2.alignBlock,
94
+ alignItems = _ref2$alignBlock === void 0 ? 'start' : _ref2$alignBlock,
91
95
  _ref2$shouldWrap = _ref2.shouldWrap,
92
96
  shouldWrap = _ref2$shouldWrap === void 0 ? false : _ref2$shouldWrap,
93
97
  spread = _ref2.spread,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "sideEffects": false
5
5
  }
@@ -15,6 +15,9 @@ const alignItemsMap = {
15
15
  }),
16
16
  end: css({
17
17
  alignItems: 'flex-end'
18
+ }),
19
+ stretch: css({
20
+ alignItems: 'stretch'
18
21
  })
19
22
  };
20
23
  const justifyContentMap = {
@@ -79,7 +82,7 @@ const Separator = ({
79
82
  const Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
80
83
  as,
81
84
  alignInline,
82
- alignBlock: alignItems,
85
+ alignBlock: alignItems = 'start',
83
86
  shouldWrap = false,
84
87
  spread,
85
88
  grow,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "sideEffects": false
5
5
  }
@@ -15,6 +15,9 @@ var alignItemsMap = {
15
15
  }),
16
16
  end: css({
17
17
  alignItems: 'flex-end'
18
+ }),
19
+ stretch: css({
20
+ alignItems: 'stretch'
18
21
  })
19
22
  };
20
23
  var justifyContentMap = {
@@ -80,7 +83,8 @@ var Separator = function Separator(_ref) {
80
83
  var Inline = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref2, ref) {
81
84
  var as = _ref2.as,
82
85
  alignInline = _ref2.alignInline,
83
- alignItems = _ref2.alignBlock,
86
+ _ref2$alignBlock = _ref2.alignBlock,
87
+ alignItems = _ref2$alignBlock === void 0 ? 'start' : _ref2$alignBlock,
84
88
  _ref2$shouldWrap = _ref2.shouldWrap,
85
89
  shouldWrap = _ref2$shouldWrap === void 0 ? false : _ref2$shouldWrap,
86
90
  spread = _ref2.spread,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "sideEffects": false
5
5
  }
@@ -5,7 +5,7 @@ export interface InlineProps<T extends ElementType = 'div'> {
5
5
  /**
6
6
  * The DOM element to render as the Inline. Defaults to `div`.
7
7
  */
8
- as?: 'div' | 'span' | 'ul' | 'ol';
8
+ as?: 'div' | 'span' | 'ul' | 'ol' | 'li';
9
9
  /**
10
10
  * Used to align children along the main axis.
11
11
  */
@@ -53,7 +53,7 @@ export interface InlineProps<T extends ElementType = 'div'> {
53
53
  ref?: React.ComponentPropsWithRef<T>['ref'];
54
54
  }
55
55
  export type AlignInline = 'start' | 'center' | 'end';
56
- export type AlignBlock = 'start' | 'center' | 'end' | 'baseline';
56
+ export type AlignBlock = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
57
57
  export type Spread = 'space-between';
58
58
  export type Grow = 'hug' | 'fill';
59
59
  /**
@@ -5,7 +5,7 @@ export interface InlineProps<T extends ElementType = 'div'> {
5
5
  /**
6
6
  * The DOM element to render as the Inline. Defaults to `div`.
7
7
  */
8
- as?: 'div' | 'span' | 'ul' | 'ol';
8
+ as?: 'div' | 'span' | 'ul' | 'ol' | 'li';
9
9
  /**
10
10
  * Used to align children along the main axis.
11
11
  */
@@ -53,7 +53,7 @@ export interface InlineProps<T extends ElementType = 'div'> {
53
53
  ref?: React.ComponentPropsWithRef<T>['ref'];
54
54
  }
55
55
  export type AlignInline = 'start' | 'center' | 'end';
56
- export type AlignBlock = 'start' | 'center' | 'end' | 'baseline';
56
+ export type AlignBlock = 'start' | 'center' | 'end' | 'baseline' | 'stretch';
57
57
  export type Spread = 'space-between';
58
58
  export type Grow = 'hug' | 'fill';
59
59
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -122,7 +122,7 @@
122
122
  "@atlaskit/visual-regression": "*",
123
123
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
124
124
  "@atlassian/codegen": "^0.1.0",
125
- "@atlassian/gemini-visual-regression": "^0.0.27",
125
+ "@atlassian/gemini-visual-regression": "^0.0.28",
126
126
  "@testing-library/react": "^12.1.5",
127
127
  "csstype": "^3.1.0",
128
128
  "prettier": "^2.8.0",
package/report.api.md CHANGED
@@ -32,7 +32,7 @@ import { RefAttributes } from 'react';
32
32
  import { SerializedStyles } from '@emotion/serialize';
33
33
 
34
34
  // @public (undocumented)
35
- type AlignBlock = 'baseline' | 'center' | 'end' | 'start';
35
+ type AlignBlock = 'baseline' | 'center' | 'end' | 'start' | 'stretch';
36
36
 
37
37
  // @public (undocumented)
38
38
  type AlignBlock_2 = 'center' | 'end' | 'start';
@@ -454,7 +454,7 @@ export const Inline: MemoExoticComponent<
454
454
  export interface InlineProps<T extends ElementType = 'div'> {
455
455
  alignBlock?: AlignBlock;
456
456
  alignInline?: AlignInline;
457
- as?: 'div' | 'ol' | 'span' | 'ul';
457
+ as?: 'div' | 'li' | 'ol' | 'span' | 'ul';
458
458
  children: ReactNode;
459
459
  grow?: Grow;
460
460
  ref?: React.ComponentPropsWithRef<T>['ref'];
@@ -21,7 +21,7 @@ import { RefAttributes } from 'react';
21
21
  import { SerializedStyles } from '@emotion/serialize';
22
22
 
23
23
  // @public (undocumented)
24
- type AlignBlock = 'baseline' | 'center' | 'end' | 'start';
24
+ type AlignBlock = 'baseline' | 'center' | 'end' | 'start' | 'stretch';
25
25
 
26
26
  // @public (undocumented)
27
27
  type AlignBlock_2 = 'center' | 'end' | 'start';
@@ -398,7 +398,7 @@ export const Inline: MemoExoticComponent<ForwardRefExoticComponent<Pick<InlinePr
398
398
  export interface InlineProps<T extends ElementType = 'div'> {
399
399
  alignBlock?: AlignBlock;
400
400
  alignInline?: AlignInline;
401
- as?: 'div' | 'ol' | 'span' | 'ul';
401
+ as?: 'div' | 'li' | 'ol' | 'span' | 'ul';
402
402
  children: ReactNode;
403
403
  grow?: Grow;
404
404
  ref?: React.ComponentPropsWithRef<T>['ref'];