@atlaskit/primitives 1.0.7 → 1.0.8
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/constellation/grid/examples.mdx +18 -0
- package/dist/cjs/components/box.js +5 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.js +2 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.js +5 -3
- package/dist/esm/version.json +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,8 @@ order: 0
|
|
|
7
7
|
import GridBasic from '../../examples/constellation/grid/basic';
|
|
8
8
|
import GridGap from '../../examples/constellation/grid/gap';
|
|
9
9
|
import GridTemplate from '../../examples/constellation/grid/template';
|
|
10
|
+
import GridTemplateArea from '../../examples/constellation/grid/template-area';
|
|
11
|
+
import GridTemplateRow from '../../examples/constellation/grid/template-row';
|
|
10
12
|
import GridAutoFlow from '../../examples/constellation/grid/auto-flow';
|
|
11
13
|
|
|
12
14
|
import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
@@ -36,8 +38,24 @@ and keep the whitespace of the grid harmonious with our spacing system.
|
|
|
36
38
|
Grid-prefixed template properties in CSS do not have this prefix in the component API.
|
|
37
39
|
For example `grid-template-*` are instead applied as `templateColumns`, `templateRows` and `templateArea` properties.
|
|
38
40
|
|
|
41
|
+
### Template columns
|
|
42
|
+
|
|
43
|
+
Template columns enables grid to declare the way columns are applied in the template.
|
|
44
|
+
|
|
39
45
|
<Example Component={GridTemplate} packageName="@atlaskit/primitives/grid" />
|
|
40
46
|
|
|
47
|
+
### Template rows
|
|
48
|
+
|
|
49
|
+
Template rows enables grid to declare the way row are applied in the template.
|
|
50
|
+
|
|
51
|
+
<Example Component={GridTemplateRow} packageName="@atlaskit/primitives/grid" />
|
|
52
|
+
|
|
53
|
+
### Template areas
|
|
54
|
+
|
|
55
|
+
Template areas enables grid to declare the grid areas are applied in the template.
|
|
56
|
+
|
|
57
|
+
<Example Component={GridTemplateArea} packageName="@atlaskit/primitives/grid" />
|
|
58
|
+
|
|
41
59
|
## Autoflow syntax
|
|
42
60
|
|
|
43
61
|
Grid-prefixed properties in CSS do not have this prefix in the component API. `grid-auto-flow` is instead applied via `autoFlow`.
|
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
10
|
var _react = require("react");
|
|
12
11
|
var _react2 = require("@emotion/react");
|
|
13
12
|
var _xcss = require("../xcss/xcss");
|
|
14
13
|
var _baseBox = require("./internal/base-box");
|
|
15
|
-
var _excluded = ["as", "children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "style", "testId", "xcss"]
|
|
14
|
+
var _excluded = ["as", "children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "style", "testId", "xcss"],
|
|
15
|
+
_excluded2 = ["className"];
|
|
16
16
|
/** @jsx jsx */
|
|
17
17
|
// Ideally we'd just Omit className from BaseBoxProps however that isn't working as expected
|
|
18
18
|
// So, we're reconstructing the type: this should be the same as BaseBoxProps minus className
|
|
@@ -42,7 +42,9 @@ var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
42
42
|
testId = _ref.testId,
|
|
43
43
|
xcss = _ref.xcss,
|
|
44
44
|
htmlAttributes = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
45
|
-
|
|
45
|
+
// This is to remove className from safeHtmlAttributes
|
|
46
|
+
var _spreadClass = htmlAttributes.className,
|
|
47
|
+
safeHtmlAttributes = (0, _objectWithoutProperties2.default)(htmlAttributes, _excluded2);
|
|
46
48
|
var className = xcss && (0, _xcss.parseXcss)(xcss);
|
|
47
49
|
return (0, _react2.jsx)(_baseBox.BaseBox, (0, _extends2.default)({
|
|
48
50
|
as: as,
|
package/dist/cjs/version.json
CHANGED
|
@@ -34,7 +34,9 @@ const Box = /*#__PURE__*/forwardRef(({
|
|
|
34
34
|
xcss,
|
|
35
35
|
...htmlAttributes
|
|
36
36
|
}, ref) => {
|
|
37
|
+
// This is to remove className from safeHtmlAttributes
|
|
37
38
|
const {
|
|
39
|
+
className: _spreadClass,
|
|
38
40
|
...safeHtmlAttributes
|
|
39
41
|
} = htmlAttributes;
|
|
40
42
|
const className = xcss && parseXcss(xcss);
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["as", "children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "style", "testId", "xcss"]
|
|
3
|
+
var _excluded = ["as", "children", "backgroundColor", "padding", "paddingBlock", "paddingBlockStart", "paddingBlockEnd", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "style", "testId", "xcss"],
|
|
4
|
+
_excluded2 = ["className"];
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
@@ -36,7 +36,9 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
36
36
|
testId = _ref.testId,
|
|
37
37
|
xcss = _ref.xcss,
|
|
38
38
|
htmlAttributes = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
-
|
|
39
|
+
// This is to remove className from safeHtmlAttributes
|
|
40
|
+
var _spreadClass = htmlAttributes.className,
|
|
41
|
+
safeHtmlAttributes = _objectWithoutProperties(htmlAttributes, _excluded2);
|
|
40
42
|
var className = xcss && parseXcss(xcss);
|
|
41
43
|
return jsx(BaseBox, _extends({
|
|
42
44
|
as: as,
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"atlaskit:src": "src/index.tsx",
|
|
17
17
|
"atlassian": {
|
|
18
|
-
"team": "Design System
|
|
18
|
+
"team": "Design System Team",
|
|
19
19
|
"inPublicMirror": false,
|
|
20
20
|
"releaseModel": "continuous",
|
|
21
21
|
"website": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"slug": "primitives/bleed",
|
|
86
86
|
"id": "@atlaskit/primitives/bleed",
|
|
87
87
|
"status": {
|
|
88
|
-
"type": "
|
|
88
|
+
"type": "closed-beta"
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
{
|
|
@@ -181,4 +181,4 @@
|
|
|
181
181
|
"./responsive": "./src/responsive/index.tsx"
|
|
182
182
|
},
|
|
183
183
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
184
|
-
}
|
|
184
|
+
}
|