@atlaskit/primitives 6.3.0 → 6.4.0
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 +585 -578
- package/constellation/anchor/usage.mdx +2 -2
- package/constellation/pressable/usage.mdx +2 -2
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/bleed.js +1 -0
- package/dist/cjs/components/box.js +10 -3
- package/dist/cjs/components/flex.js +3 -1
- package/dist/cjs/components/grid.js +6 -2
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/responsive/hide.js +3 -1
- package/dist/cjs/responsive/show.js +3 -1
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/bleed.js +1 -0
- package/dist/es2019/components/box.js +10 -3
- package/dist/es2019/components/flex.js +3 -1
- package/dist/es2019/components/grid.js +6 -2
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/responsive/hide.js +3 -1
- package/dist/es2019/responsive/show.js +3 -1
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/bleed.js +1 -0
- package/dist/esm/components/box.js +10 -3
- package/dist/esm/components/flex.js +3 -1
- package/dist/esm/components/grid.js +6 -2
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/responsive/hide.js +3 -1
- package/dist/esm/responsive/show.js +3 -1
- package/dist/types/components/bleed.d.ts +1 -1
- package/dist/types/components/box.d.ts +3 -3
- package/dist/types/components/flex.d.ts +1 -1
- package/dist/types/components/inline.d.ts +1 -1
- package/dist/types/components/stack.d.ts +1 -1
- package/dist/types/responsive/build-media-query-css.d.ts +1 -1
- package/dist/types/responsive/types.d.ts +3 -3
- package/dist/types/xcss/style-maps.partial.d.ts +21 -21
- package/dist/types/xcss/xcss.d.ts +1 -1
- package/dist/types-ts4.5/components/bleed.d.ts +1 -1
- package/dist/types-ts4.5/components/box.d.ts +3 -3
- package/dist/types-ts4.5/components/flex.d.ts +1 -1
- package/dist/types-ts4.5/components/inline.d.ts +1 -1
- package/dist/types-ts4.5/components/stack.d.ts +1 -1
- package/dist/types-ts4.5/responsive/build-media-query-css.d.ts +1 -1
- package/dist/types-ts4.5/responsive/types.d.ts +3 -3
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +21 -21
- package/dist/types-ts4.5/xcss/xcss.d.ts +1 -1
- package/extract-react-types/bleed-props.tsx +2 -2
- package/extract-react-types/box-props.tsx +6 -3
- package/extract-react-types/flex-props.tsx +2 -2
- package/extract-react-types/grid-props.tsx +2 -2
- package/extract-react-types/hide-props.tsx +2 -2
- package/extract-react-types/inline-props.tsx +1 -1
- package/extract-react-types/show-props.tsx +2 -2
- package/extract-react-types/stack-props.tsx +1 -1
- package/package.json +2 -4
- package/scripts/color-codegen-template.tsx +1 -1
- package/scripts/elevation-codegen-template.tsx +1 -1
|
@@ -68,7 +68,7 @@ Make link text size at least 12px. Smaller text is harder to read and interact w
|
|
|
68
68
|
|
|
69
69
|
Anchors are for navigation and URL changes, while buttons are for on-page actions such as form submissions or opening modals. These elements are treated differently by assistive technologies, so avoid using one in place of the other.
|
|
70
70
|
|
|
71
|
-
More details on [when to use links and buttons](/components/button/
|
|
71
|
+
More details on [when to use links and buttons](/components/button/usage#use-buttons-for-actions-and-links-for-navigation).
|
|
72
72
|
|
|
73
73
|
## Content guidelines
|
|
74
74
|
|
|
@@ -94,7 +94,7 @@ Only include the verb in the linked text if it better describes the purpose the
|
|
|
94
94
|
|
|
95
95
|
For example:
|
|
96
96
|
|
|
97
|
-
> Update [Jira settings](
|
|
97
|
+
> Update [Jira settings](/components/button/usage#use-buttons-for-actions-and-links-for-navigation) to turn off notifications. To upgrade, [sign up for Jira](/components/button/usage#use-buttons-for-actions-and-links-for-navigation).
|
|
98
98
|
|
|
99
99
|
If only Jira was linked, it wouldn't be clear that this was a sign up page.
|
|
100
100
|
|
|
@@ -64,7 +64,7 @@ Pressable creates buttons that are available in focus order, and provides a visu
|
|
|
64
64
|
|
|
65
65
|
### Avoid disabling buttons
|
|
66
66
|
|
|
67
|
-
Disabled buttons can cause accessibility problems. Avoid disabling buttons and [follow our disabled and tooltip button guidance](/components/button/
|
|
67
|
+
Disabled buttons can cause accessibility problems. Avoid disabling buttons and [follow our disabled and tooltip button guidance](/components/button/usage#avoid-disabling-buttons).
|
|
68
68
|
|
|
69
69
|
## Best practices
|
|
70
70
|
|
|
@@ -93,7 +93,7 @@ For example, _Change issue color to yellow_ instead of _yellow_.
|
|
|
93
93
|
|
|
94
94
|
### Follow other label and UI content guidance
|
|
95
95
|
|
|
96
|
-
Follow label and content guidelines for [buttons](/components/button/
|
|
96
|
+
Follow label and content guidelines for [buttons](/components/button/usage#content-guidelines). Review our [general UI text guidance](/foundations/accessibility/#meaningful-text) for specific question.
|
|
97
97
|
|
|
98
98
|
## Related
|
|
99
99
|
|
|
@@ -76,7 +76,7 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
76
76
|
action: 'clicked',
|
|
77
77
|
componentName: componentName || 'Anchor',
|
|
78
78
|
packageName: "@atlaskit/primitives",
|
|
79
|
-
packageVersion: "6.
|
|
79
|
+
packageVersion: "6.4.0",
|
|
80
80
|
analyticsData: analyticsContext,
|
|
81
81
|
actionSubject: 'link'
|
|
82
82
|
});
|
|
@@ -65,6 +65,7 @@ var Bleed = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
65
65
|
xcss = _ref.xcss;
|
|
66
66
|
var resolvedStyles = (0, _xcss.parseXcss)(xcss);
|
|
67
67
|
return (0, _react2.jsx)("div", {
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
68
69
|
className: resolvedStyles.static,
|
|
69
70
|
css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
|
|
70
71
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -53,11 +53,15 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
53
53
|
var resolvedStyles = (0, _xcss.parseXcss)(xcss);
|
|
54
54
|
var node =
|
|
55
55
|
// @ts-expect-error Expression produces a union type that is too complex to represent. I think this is unavoidable
|
|
56
|
-
(0, _react2.jsx)(Component
|
|
56
|
+
(0, _react2.jsx)(Component
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
58
|
+
, (0, _extends2.default)({
|
|
57
59
|
style: style
|
|
58
60
|
// @ts-expect-error Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
|
|
59
61
|
,
|
|
60
|
-
ref: ref
|
|
62
|
+
ref: ref
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
64
|
+
,
|
|
61
65
|
className: resolvedStyles.static
|
|
62
66
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
63
67
|
}, safeHtmlAttributes, {
|
|
@@ -69,7 +73,10 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
|
69
73
|
return backgroundColor ? (0, _react2.jsx)(_surfaceProvider.SurfaceContext.Provider, {
|
|
70
74
|
value: backgroundColor
|
|
71
75
|
}, node) : node;
|
|
72
|
-
}
|
|
76
|
+
}
|
|
77
|
+
// @ts-ignore This typescript error has been surpessed while locally enrolling `@atlaskit/primitives` into Jira
|
|
78
|
+
// The return type of `BoxComponent` does not match the return type of `forwardRef` in React 18
|
|
79
|
+
);
|
|
73
80
|
var _default = exports.default = Box;
|
|
74
81
|
var baseStyles = (0, _react2.css)({
|
|
75
82
|
boxSizing: 'border-box',
|
|
@@ -107,7 +107,9 @@ var Flex = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
107
107
|
xcss = _ref.xcss;
|
|
108
108
|
var resolvedStyles = (0, _xcss.parseXcss)(xcss);
|
|
109
109
|
return (0, _react2.jsx)(Component, {
|
|
110
|
-
role: role
|
|
110
|
+
role: role
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
112
|
+
,
|
|
111
113
|
className: resolvedStyles.static,
|
|
112
114
|
css: [baseStyles, gap && _styleMaps.spaceStylesMap.gap[gap], columnGap && _styleMaps.spaceStylesMap.columnGap[columnGap], rowGap && _styleMaps.spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
|
|
113
115
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -170,8 +170,12 @@ var Grid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
170
170
|
}, [gridTemplateAreas, gridTemplateColumns, gridTemplateRows]);
|
|
171
171
|
return (0, _react2.jsx)(Component, {
|
|
172
172
|
id: id,
|
|
173
|
-
role: role
|
|
174
|
-
style
|
|
173
|
+
role: role
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
175
|
+
,
|
|
176
|
+
style: style
|
|
177
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
178
|
+
,
|
|
175
179
|
className: resolvedStyles.static,
|
|
176
180
|
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],
|
|
177
181
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -78,7 +78,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
78
78
|
action: 'clicked',
|
|
79
79
|
componentName: componentName || 'Pressable',
|
|
80
80
|
packageName: "@atlaskit/primitives",
|
|
81
|
-
packageVersion: "6.
|
|
81
|
+
packageVersion: "6.4.0",
|
|
82
82
|
analyticsData: analyticsContext,
|
|
83
83
|
actionSubject: 'button'
|
|
84
84
|
});
|
|
@@ -31,7 +31,9 @@ var Hide = exports.Hide = function Hide(_ref) {
|
|
|
31
31
|
AsElement = _ref$as === void 0 ? 'div' : _ref$as,
|
|
32
32
|
xcss = _ref.xcss;
|
|
33
33
|
var resolvedStyles = (0, _xcss.parseXcss)(xcss);
|
|
34
|
-
return (0, _react.jsx)(AsElement
|
|
34
|
+
return (0, _react.jsx)(AsElement
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
36
|
+
, {
|
|
35
37
|
className: resolvedStyles.static,
|
|
36
38
|
css: [above && hideAboveQueries[above], below && hideBelowQueries[below], resolvedStyles.emotion]
|
|
37
39
|
}, children);
|
|
@@ -34,7 +34,9 @@ var Show = exports.Show = function Show(_ref) {
|
|
|
34
34
|
AsElement = _ref$as === void 0 ? 'div' : _ref$as,
|
|
35
35
|
xcss = _ref.xcss;
|
|
36
36
|
var resolvedStyles = (0, _xcss.parseXcss)(xcss);
|
|
37
|
-
return (0, _react.jsx)(AsElement
|
|
37
|
+
return (0, _react.jsx)(AsElement
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
|
+
, {
|
|
38
40
|
className: resolvedStyles.static,
|
|
39
41
|
css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below], resolvedStyles.emotion]
|
|
40
42
|
}, children);
|
|
@@ -58,6 +58,7 @@ const Bleed = /*#__PURE__*/React.memo(({
|
|
|
58
58
|
}) => {
|
|
59
59
|
const resolvedStyles = parseXcss(xcss);
|
|
60
60
|
return jsx("div", {
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
61
62
|
className: resolvedStyles.static,
|
|
62
63
|
css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
|
|
63
64
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -46,11 +46,15 @@ export const Box = /*#__PURE__*/forwardRef(({
|
|
|
46
46
|
const resolvedStyles = parseXcss(xcss);
|
|
47
47
|
const node =
|
|
48
48
|
// @ts-expect-error Expression produces a union type that is too complex to represent. I think this is unavoidable
|
|
49
|
-
jsx(Component
|
|
49
|
+
jsx(Component
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
51
|
+
, _extends({
|
|
50
52
|
style: style
|
|
51
53
|
// @ts-expect-error Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
|
|
52
54
|
,
|
|
53
|
-
ref: ref
|
|
55
|
+
ref: ref
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
57
|
+
,
|
|
54
58
|
className: resolvedStyles.static
|
|
55
59
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
56
60
|
}, safeHtmlAttributes, {
|
|
@@ -62,7 +66,10 @@ export const Box = /*#__PURE__*/forwardRef(({
|
|
|
62
66
|
return backgroundColor ? jsx(SurfaceContext.Provider, {
|
|
63
67
|
value: backgroundColor
|
|
64
68
|
}, node) : node;
|
|
65
|
-
}
|
|
69
|
+
}
|
|
70
|
+
// @ts-ignore This typescript error has been surpessed while locally enrolling `@atlaskit/primitives` into Jira
|
|
71
|
+
// The return type of `BoxComponent` does not match the return type of `forwardRef` in React 18
|
|
72
|
+
);
|
|
66
73
|
export default Box;
|
|
67
74
|
const baseStyles = css({
|
|
68
75
|
boxSizing: 'border-box',
|
|
@@ -100,7 +100,9 @@ const Flex = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
100
100
|
}, ref) => {
|
|
101
101
|
const resolvedStyles = parseXcss(xcss);
|
|
102
102
|
return jsx(Component, {
|
|
103
|
-
role: role
|
|
103
|
+
role: role
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
105
|
+
,
|
|
104
106
|
className: resolvedStyles.static,
|
|
105
107
|
css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
|
|
106
108
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -161,8 +161,12 @@ const Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
161
161
|
}), [gridTemplateAreas, gridTemplateColumns, gridTemplateRows]);
|
|
162
162
|
return jsx(Component, {
|
|
163
163
|
id: id,
|
|
164
|
-
role: role
|
|
165
|
-
style
|
|
164
|
+
role: role
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
166
|
+
,
|
|
167
|
+
style: style
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
169
|
+
,
|
|
166
170
|
className: resolvedStyles.static,
|
|
167
171
|
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],
|
|
168
172
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -64,7 +64,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
64
64
|
action: 'clicked',
|
|
65
65
|
componentName: componentName || 'Pressable',
|
|
66
66
|
packageName: "@atlaskit/primitives",
|
|
67
|
-
packageVersion: "6.
|
|
67
|
+
packageVersion: "6.4.0",
|
|
68
68
|
analyticsData: analyticsContext,
|
|
69
69
|
actionSubject: 'button'
|
|
70
70
|
});
|
|
@@ -25,7 +25,9 @@ export const Hide = ({
|
|
|
25
25
|
xcss
|
|
26
26
|
}) => {
|
|
27
27
|
const resolvedStyles = parseXcss(xcss);
|
|
28
|
-
return jsx(AsElement
|
|
28
|
+
return jsx(AsElement
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
30
|
+
, {
|
|
29
31
|
className: resolvedStyles.static,
|
|
30
32
|
css: [above && hideAboveQueries[above], below && hideBelowQueries[below], resolvedStyles.emotion]
|
|
31
33
|
}, children);
|
|
@@ -28,7 +28,9 @@ export const Show = ({
|
|
|
28
28
|
xcss
|
|
29
29
|
}) => {
|
|
30
30
|
const resolvedStyles = parseXcss(xcss);
|
|
31
|
-
return jsx(AsElement
|
|
31
|
+
return jsx(AsElement
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
33
|
+
, {
|
|
32
34
|
className: resolvedStyles.static,
|
|
33
35
|
css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below], resolvedStyles.emotion]
|
|
34
36
|
}, children);
|
|
@@ -66,7 +66,7 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
66
66
|
action: 'clicked',
|
|
67
67
|
componentName: componentName || 'Anchor',
|
|
68
68
|
packageName: "@atlaskit/primitives",
|
|
69
|
-
packageVersion: "6.
|
|
69
|
+
packageVersion: "6.4.0",
|
|
70
70
|
analyticsData: analyticsContext,
|
|
71
71
|
actionSubject: 'link'
|
|
72
72
|
});
|
|
@@ -57,6 +57,7 @@ var Bleed = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
57
57
|
xcss = _ref.xcss;
|
|
58
58
|
var resolvedStyles = parseXcss(xcss);
|
|
59
59
|
return jsx("div", {
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
60
61
|
className: resolvedStyles.static,
|
|
61
62
|
css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
|
|
62
63
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -47,11 +47,15 @@ export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
47
47
|
var resolvedStyles = parseXcss(xcss);
|
|
48
48
|
var node =
|
|
49
49
|
// @ts-expect-error Expression produces a union type that is too complex to represent. I think this is unavoidable
|
|
50
|
-
jsx(Component
|
|
50
|
+
jsx(Component
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
52
|
+
, _extends({
|
|
51
53
|
style: style
|
|
52
54
|
// @ts-expect-error Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
|
|
53
55
|
,
|
|
54
|
-
ref: ref
|
|
56
|
+
ref: ref
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
58
|
+
,
|
|
55
59
|
className: resolvedStyles.static
|
|
56
60
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
57
61
|
}, safeHtmlAttributes, {
|
|
@@ -63,7 +67,10 @@ export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
63
67
|
return backgroundColor ? jsx(SurfaceContext.Provider, {
|
|
64
68
|
value: backgroundColor
|
|
65
69
|
}, node) : node;
|
|
66
|
-
}
|
|
70
|
+
}
|
|
71
|
+
// @ts-ignore This typescript error has been surpessed while locally enrolling `@atlaskit/primitives` into Jira
|
|
72
|
+
// The return type of `BoxComponent` does not match the return type of `forwardRef` in React 18
|
|
73
|
+
);
|
|
67
74
|
export default Box;
|
|
68
75
|
var baseStyles = css({
|
|
69
76
|
boxSizing: 'border-box',
|
|
@@ -100,7 +100,9 @@ var Flex = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
100
100
|
xcss = _ref.xcss;
|
|
101
101
|
var resolvedStyles = parseXcss(xcss);
|
|
102
102
|
return jsx(Component, {
|
|
103
|
-
role: role
|
|
103
|
+
role: role
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
105
|
+
,
|
|
104
106
|
className: resolvedStyles.static,
|
|
105
107
|
css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
|
|
106
108
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -162,8 +162,12 @@ var Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
162
162
|
}, [gridTemplateAreas, gridTemplateColumns, gridTemplateRows]);
|
|
163
163
|
return jsx(Component, {
|
|
164
164
|
id: id,
|
|
165
|
-
role: role
|
|
166
|
-
style
|
|
165
|
+
role: role
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
167
|
+
,
|
|
168
|
+
style: style
|
|
169
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
170
|
+
,
|
|
167
171
|
className: resolvedStyles.static,
|
|
168
172
|
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],
|
|
169
173
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -68,7 +68,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
68
68
|
action: 'clicked',
|
|
69
69
|
componentName: componentName || 'Pressable',
|
|
70
70
|
packageName: "@atlaskit/primitives",
|
|
71
|
-
packageVersion: "6.
|
|
71
|
+
packageVersion: "6.4.0",
|
|
72
72
|
analyticsData: analyticsContext,
|
|
73
73
|
actionSubject: 'button'
|
|
74
74
|
});
|
|
@@ -25,7 +25,9 @@ export var Hide = function Hide(_ref) {
|
|
|
25
25
|
AsElement = _ref$as === void 0 ? 'div' : _ref$as,
|
|
26
26
|
xcss = _ref.xcss;
|
|
27
27
|
var resolvedStyles = parseXcss(xcss);
|
|
28
|
-
return jsx(AsElement
|
|
28
|
+
return jsx(AsElement
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
30
|
+
, {
|
|
29
31
|
className: resolvedStyles.static,
|
|
30
32
|
css: [above && hideAboveQueries[above], below && hideBelowQueries[below], resolvedStyles.emotion]
|
|
31
33
|
}, children);
|
|
@@ -28,7 +28,9 @@ export var Show = function Show(_ref) {
|
|
|
28
28
|
AsElement = _ref$as === void 0 ? 'div' : _ref$as,
|
|
29
29
|
xcss = _ref.xcss;
|
|
30
30
|
var resolvedStyles = parseXcss(xcss);
|
|
31
|
-
return jsx(AsElement
|
|
31
|
+
return jsx(AsElement
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
33
|
+
, {
|
|
32
34
|
className: resolvedStyles.static,
|
|
33
35
|
css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below], resolvedStyles.emotion]
|
|
34
36
|
}, children);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ComponentPropsWithoutRef, ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
4
|
-
import { SVGElements } from './internal/types';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import { type BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
4
|
+
import { type SVGElements } from './internal/types';
|
|
5
5
|
import type { BasePrimitiveProps, StyleProp } from './types';
|
|
6
6
|
type AllowedElements = Exclude<keyof JSX.IntrinsicElements, SVGElements>;
|
|
7
7
|
type CustomElementType<P = any> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { type ElementType, type ReactNode } from 'react';
|
|
3
3
|
import { type Space } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { BasePrimitiveProps } from './types';
|
|
5
5
|
export type FlexProps<T extends ElementType = 'div'> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { type ElementType, type ReactNode } from 'react';
|
|
3
3
|
import { type Space } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
5
5
|
export type InlineProps<T extends ElementType = 'div'> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { type ElementType, type ReactNode } from 'react';
|
|
3
3
|
import { type Space } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
5
5
|
export type StackProps<T extends ElementType = 'div'> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SerializedStyles } from '@emotion/react';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
|
-
import { media } from './media-helper';
|
|
1
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { type token } from '@atlaskit/tokens';
|
|
3
|
+
import { type media } from './media-helper';
|
|
4
4
|
/**
|
|
5
5
|
* The breakpoints we have for responsiveness.
|
|
6
6
|
*/
|
|
@@ -555,35 +555,35 @@ export type TokenisedProps = {
|
|
|
555
555
|
blockSize?: AutoComplete<Dimension>;
|
|
556
556
|
borderBlockColor?: AutoComplete<BorderColor>;
|
|
557
557
|
borderBlockEndColor?: AutoComplete<BorderColor>;
|
|
558
|
-
borderBlockEndWidth?:
|
|
558
|
+
borderBlockEndWidth?: BorderWidth | string;
|
|
559
559
|
borderBlockStartColor?: AutoComplete<BorderColor>;
|
|
560
|
-
borderBlockStartWidth?:
|
|
561
|
-
borderBlockWidth?:
|
|
560
|
+
borderBlockStartWidth?: BorderWidth | string;
|
|
561
|
+
borderBlockWidth?: BorderWidth | string;
|
|
562
562
|
borderBottomColor?: AutoComplete<BorderColor>;
|
|
563
|
-
borderBottomLeftRadius?:
|
|
564
|
-
borderBottomRightRadius?:
|
|
565
|
-
borderBottomWidth?:
|
|
563
|
+
borderBottomLeftRadius?: BorderRadius | string;
|
|
564
|
+
borderBottomRightRadius?: BorderRadius | string;
|
|
565
|
+
borderBottomWidth?: BorderWidth | string;
|
|
566
566
|
borderColor?: BorderColor;
|
|
567
|
-
borderEndEndRadius?:
|
|
568
|
-
borderEndStartRadius?:
|
|
567
|
+
borderEndEndRadius?: BorderRadius | string;
|
|
568
|
+
borderEndStartRadius?: BorderRadius | string;
|
|
569
569
|
borderInlineColor?: AutoComplete<BorderColor>;
|
|
570
570
|
borderInlineEndColor?: AutoComplete<BorderColor>;
|
|
571
|
-
borderInlineEndWidth?:
|
|
571
|
+
borderInlineEndWidth?: BorderWidth | string;
|
|
572
572
|
borderInlineStartColor?: AutoComplete<BorderColor>;
|
|
573
|
-
borderInlineStartWidth?:
|
|
574
|
-
borderInlineWidth?:
|
|
573
|
+
borderInlineStartWidth?: BorderWidth | string;
|
|
574
|
+
borderInlineWidth?: BorderWidth | string;
|
|
575
575
|
borderLeftColor?: AutoComplete<BorderColor>;
|
|
576
|
-
borderLeftWidth?:
|
|
577
|
-
borderRadius?: BorderRadius;
|
|
576
|
+
borderLeftWidth?: BorderWidth | string;
|
|
577
|
+
borderRadius?: BorderRadius | string;
|
|
578
578
|
borderRightColor?: AutoComplete<BorderColor>;
|
|
579
|
-
borderRightWidth?:
|
|
580
|
-
borderStartEndRadius?:
|
|
581
|
-
borderStartStartRadius?:
|
|
579
|
+
borderRightWidth?: BorderWidth | string;
|
|
580
|
+
borderStartEndRadius?: BorderRadius | string;
|
|
581
|
+
borderStartStartRadius?: BorderRadius | string;
|
|
582
582
|
borderTopColor?: AutoComplete<BorderColor>;
|
|
583
|
-
borderTopLeftRadius?:
|
|
584
|
-
borderTopRightRadius?:
|
|
585
|
-
borderTopWidth?:
|
|
586
|
-
borderWidth?: BorderWidth;
|
|
583
|
+
borderTopLeftRadius?: BorderRadius | string;
|
|
584
|
+
borderTopRightRadius?: BorderRadius | string;
|
|
585
|
+
borderTopWidth?: BorderWidth | string;
|
|
586
|
+
borderWidth?: BorderWidth | string;
|
|
587
587
|
bottom?: AutoComplete<AllSpace>;
|
|
588
588
|
boxShadow?: Shadow;
|
|
589
589
|
color?: TextColor;
|
|
@@ -621,7 +621,7 @@ export type TokenisedProps = {
|
|
|
621
621
|
opacity?: AutoComplete<Opacity> | number;
|
|
622
622
|
outlineColor?: BorderColor;
|
|
623
623
|
outlineOffset?: Space;
|
|
624
|
-
outlineWidth?: BorderWidth;
|
|
624
|
+
outlineWidth?: BorderWidth | string;
|
|
625
625
|
padding?: Space;
|
|
626
626
|
paddingBlock?: Space;
|
|
627
627
|
paddingBlockEnd?: Space;
|
|
@@ -2,7 +2,7 @@ import type { CSSPropertiesWithMultiValues, SerializedStyles } from '@emotion/se
|
|
|
2
2
|
import type * as CSS from 'csstype';
|
|
3
3
|
import type { StrictXCSSProp, XCSSAllProperties, XCSSAllPseudos } from '@atlaskit/css';
|
|
4
4
|
import type { MediaQuery } from '../responsive/types';
|
|
5
|
-
import { TokenisedProps } from './style-maps.partial';
|
|
5
|
+
import { type TokenisedProps } from './style-maps.partial';
|
|
6
6
|
export declare const tokensMap: {
|
|
7
7
|
readonly backgroundColor: {
|
|
8
8
|
readonly 'color.background.accent.lime.subtlest': "var(--ds-background-accent-lime-subtlest)";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ComponentPropsWithoutRef, ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
4
|
-
import { SVGElements } from './internal/types';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import { type BackgroundColor, type Space } from '../xcss/style-maps.partial';
|
|
4
|
+
import { type SVGElements } from './internal/types';
|
|
5
5
|
import type { BasePrimitiveProps, StyleProp } from './types';
|
|
6
6
|
type AllowedElements = Exclude<keyof JSX.IntrinsicElements, SVGElements>;
|
|
7
7
|
type CustomElementType<P = any> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { type ElementType, type ReactNode } from 'react';
|
|
3
3
|
import { type Space } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { BasePrimitiveProps } from './types';
|
|
5
5
|
export type FlexProps<T extends ElementType = 'div'> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { type ElementType, type ReactNode } from 'react';
|
|
3
3
|
import { type Space } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
5
5
|
export type InlineProps<T extends ElementType = 'div'> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { type ElementType, type ReactNode } from 'react';
|
|
3
3
|
import { type Space } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { AlignBlock, AlignInline, BasePrimitiveProps, Grow, Spread } from './types';
|
|
5
5
|
export type StackProps<T extends ElementType = 'div'> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SerializedStyles } from '@emotion/react';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
|
-
import { media } from './media-helper';
|
|
1
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { type token } from '@atlaskit/tokens';
|
|
3
|
+
import { type media } from './media-helper';
|
|
4
4
|
/**
|
|
5
5
|
* The breakpoints we have for responsiveness.
|
|
6
6
|
*/
|