@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 +6 -0
- package/dist/cjs/components/box.js +14 -2
- package/dist/cjs/components/inline.partial.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.js +12 -1
- package/dist/es2019/components/inline.partial.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.js +12 -1
- package/dist/esm/components/inline.partial.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.d.ts +10 -1
- package/dist/types/components/internal/base-box.partial.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +1 -1
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.
|
|
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
|
-
|
|
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.
|
|
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"));
|
package/dist/cjs/version.json
CHANGED
|
@@ -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
|
|
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:
|
|
108
|
+
marginInline: `calc(-1 * ${"var(--ds-space-025, 2px)"})`,
|
|
109
109
|
pointerEvents: 'none',
|
|
110
110
|
userSelect: 'none'
|
|
111
111
|
});
|
package/dist/es2019/index.js
CHANGED
package/dist/es2019/version.json
CHANGED
|
@@ -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
|
|
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
package/dist/esm/version.json
CHANGED
|
@@ -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
|
|
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 `
|
|
139
|
+
* Defines display type and layout. Defaults to `block`.
|
|
140
140
|
*/
|
|
141
141
|
display?: Display;
|
|
142
142
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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
package/report.api.md
CHANGED