@atlaskit/primitives 0.2.0 → 0.2.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,11 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5b886634089`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5b886634089) - [ux] Change Box to be the default export from `@atlaskit/primitives/box`. Fix the negative value of `margin-inline` in Inline `separator` not being applied properly.
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Box = void 0;
8
+ exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = _interopRequireWildcard(require("react"));
@@ -14,6 +14,17 @@ var _excluded = ["as", "children", "color", "backgroundColor", "shadow", "border
14
14
  _excluded2 = ["style", "className"];
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
18
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
19
+ /**
20
+ * __Box__
21
+ *
22
+ * A box {description}.
23
+ *
24
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
25
+ * - [Code](https://atlassian.design/components/{packageName}/code)
26
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
27
+ */
17
28
  var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
18
29
  var as = _ref.as,
19
30
  children = _ref.children,
@@ -84,4 +95,5 @@ var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
84
95
  ref: ref
85
96
  }, safeHtmlAttributes), children);
86
97
  });
87
- exports.Box = Box;
98
+ var _default = Box;
99
+ exports.default = _default;
@@ -88,7 +88,7 @@ var baseStyles = (0, _react2.css)({
88
88
  var separatorStyles = (0, _react2.css)({
89
89
  color: "var(--ds-text-subtle, #42526E)",
90
90
  marginBlock: "var(--ds-space-0, 0px)",
91
- marginInline: "-".concat("var(--ds-space-025, 2px)"),
91
+ marginInline: "calc(-1 * ".concat("var(--ds-space-025, 2px)", ")"),
92
92
  pointerEvents: 'none',
93
93
  userSelect: 'none'
94
94
  });
package/dist/cjs/index.js CHANGED
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  Object.defineProperty(exports, "Box", {
8
8
  enumerable: true,
9
9
  get: function get() {
10
- return _box.Box;
10
+ return _box.default;
11
11
  }
12
12
  });
13
13
  Object.defineProperty(exports, "Inline", {
@@ -22,6 +22,6 @@ Object.defineProperty(exports, "Stack", {
22
22
  return _stack.default;
23
23
  }
24
24
  });
25
- var _box = require("./components/box");
25
+ var _box = _interopRequireDefault(require("./components/box"));
26
26
  var _inline = _interopRequireDefault(require("./components/inline.partial"));
27
27
  var _stack = _interopRequireDefault(require("./components/stack.partial"));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,17 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
3
  import { BaseBox } from './internal/base-box.partial';
4
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
5
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
6
+ /**
7
+ * __Box__
8
+ *
9
+ * A box {description}.
10
+ *
11
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
12
+ * - [Code](https://atlassian.design/components/{packageName}/code)
13
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
14
+ */
4
15
  const Box = /*#__PURE__*/forwardRef(({
5
16
  as,
6
17
  children,
@@ -72,4 +83,4 @@ const Box = /*#__PURE__*/forwardRef(({
72
83
  ref: ref
73
84
  }, safeHtmlAttributes), children);
74
85
  });
75
- export { Box };
86
+ export default Box;
@@ -105,7 +105,7 @@ const baseStyles = css({
105
105
  const separatorStyles = css({
106
106
  color: "var(--ds-text-subtle, #42526E)",
107
107
  marginBlock: "var(--ds-space-0, 0px)",
108
- marginInline: `-${"var(--ds-space-025, 2px)"}`,
108
+ marginInline: `calc(-1 * ${"var(--ds-space-025, 2px)"})`,
109
109
  pointerEvents: 'none',
110
110
  userSelect: 'none'
111
111
  });
@@ -1,3 +1,3 @@
1
- export { Box } from './components/box';
1
+ export { default as Box } from './components/box';
2
2
  export { default as Inline } from './components/inline.partial';
3
3
  export { default as Stack } from './components/stack.partial';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -4,6 +4,17 @@ var _excluded = ["as", "children", "color", "backgroundColor", "shadow", "border
4
4
  _excluded2 = ["style", "className"];
5
5
  import React, { forwardRef } from 'react';
6
6
  import { BaseBox } from './internal/base-box.partial';
7
+ // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
8
+ // Remove links that the component does not have (such as usage). If there are no links remove them all.
9
+ /**
10
+ * __Box__
11
+ *
12
+ * A box {description}.
13
+ *
14
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
15
+ * - [Code](https://atlassian.design/components/{packageName}/code)
16
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
17
+ */
7
18
  var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
8
19
  var as = _ref.as,
9
20
  children = _ref.children,
@@ -74,4 +85,4 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
74
85
  ref: ref
75
86
  }, safeHtmlAttributes), children);
76
87
  });
77
- export { Box };
88
+ export default Box;
@@ -80,7 +80,7 @@ var baseStyles = css({
80
80
  var separatorStyles = css({
81
81
  color: "var(--ds-text-subtle, #42526E)",
82
82
  marginBlock: "var(--ds-space-0, 0px)",
83
- marginInline: "-".concat("var(--ds-space-025, 2px)"),
83
+ marginInline: "calc(-1 * ".concat("var(--ds-space-025, 2px)", ")"),
84
84
  pointerEvents: 'none',
85
85
  userSelect: 'none'
86
86
  });
package/dist/esm/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Box } from './components/box';
1
+ export { default as Box } from './components/box';
2
2
  export { default as Inline } from './components/inline.partial';
3
3
  export { default as Stack } from './components/stack.partial';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -6,5 +6,14 @@ declare type BoxPropsBase = {
6
6
  };
7
7
  export declare type BoxProps<T extends ElementType = 'div'> = Omit<BaseBoxProps<T>, 'className' | 'UNSAFE_style'> & BoxPropsBase;
8
8
  declare type BoxComponent<T extends ElementType = 'div'> = (<T extends ElementType = 'div'>(props: BoxProps<T>) => ReactElement | null) & FC<BoxProps<T>>;
9
+ /**
10
+ * __Box__
11
+ *
12
+ * A box {description}.
13
+ *
14
+ * - [Examples](https://atlassian.design/components/{packageName}/examples)
15
+ * - [Code](https://atlassian.design/components/{packageName}/code)
16
+ * - [Usage](https://atlassian.design/components/{packageName}/usage)
17
+ */
9
18
  declare const Box: BoxComponent;
10
- export { Box };
19
+ export default Box;
@@ -136,7 +136,7 @@ declare type BaseBoxPropsFoundation<T extends ElementType> = {
136
136
  */
137
137
  height?: Height;
138
138
  /**
139
- * Defines display type and layout. Defaults to `flex`.
139
+ * Defines display type and layout. Defaults to `block`.
140
140
  */
141
141
  display?: Display;
142
142
  /**
@@ -1,3 +1,3 @@
1
- export { Box, type BoxProps } from './components/box';
1
+ export { default as Box, type BoxProps } from './components/box';
2
2
  export { default as Inline, type InlineProps, } from './components/inline.partial';
3
3
  export { default as Stack, type StackProps } from './components/stack.partial';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
package/report.api.md CHANGED
@@ -227,7 +227,7 @@ const borderWidthMap: {
227
227
  readonly 'size.100': SerializedStyles;
228
228
  };
229
229
 
230
- // @public (undocumented)
230
+ // @public
231
231
  export const Box: BoxComponent;
232
232
 
233
233
  // @public (undocumented)
@@ -211,7 +211,7 @@ const borderWidthMap: {
211
211
  readonly 'size.100': SerializedStyles;
212
212
  };
213
213
 
214
- // @public (undocumented)
214
+ // @public
215
215
  export const Box: BoxComponent;
216
216
 
217
217
  // @public (undocumented)