@atlaskit/primitives 6.1.0 → 6.1.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 +8 -0
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/components/text.js +7 -1
- package/dist/cjs/index.js +15 -1
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/components/text.js +7 -1
- package/dist/es2019/index.js +3 -1
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/components/text.js +7 -1
- package/dist/esm/index.js +3 -1
- package/dist/types/components/text.d.ts +3 -3
- package/dist/types/index.d.ts +2 -0
- package/dist/types-ts4.5/components/text.d.ts +3 -3
- package/dist/types-ts4.5/index.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 6.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#97580](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97580)
|
|
8
|
+
[`496e5da89b3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/496e5da89b3b) -
|
|
9
|
+
Export unsafe surface APIs for use in heading component.
|
|
10
|
+
|
|
3
11
|
## 6.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -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.1.
|
|
79
|
+
packageVersion: "6.1.1",
|
|
80
80
|
analyticsData: analyticsContext,
|
|
81
81
|
actionSubject: 'link'
|
|
82
82
|
});
|
|
@@ -80,7 +80,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
80
80
|
action: 'clicked',
|
|
81
81
|
componentName: componentName || 'Pressable',
|
|
82
82
|
packageName: "@atlaskit/primitives",
|
|
83
|
-
packageVersion: "6.1.
|
|
83
|
+
packageVersion: "6.1.1",
|
|
84
84
|
analyticsData: analyticsContext,
|
|
85
85
|
actionSubject: 'button'
|
|
86
86
|
});
|
|
@@ -99,7 +99,13 @@ var Text = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
99
99
|
var color = useColor(colorProp, hasTextAncestor);
|
|
100
100
|
var component = (0, _react2.jsx)(Component, {
|
|
101
101
|
ref: ref,
|
|
102
|
-
css: [resetStyles,
|
|
102
|
+
css: [resetStyles,
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
104
|
+
_styleMaps.fontStylesMap[size],
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
106
|
+
color && _styleMaps.textColorStylesMap[color], maxLines && truncationStyles, maxLines === 1 && wordBreakMap.breakAll, align && textAlignMap[align],
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
108
|
+
weight && _styleMaps.fontWeightStylesMap[weight], Component === 'em' && emStyles, Component === 'strong' && strongStyles],
|
|
103
109
|
style: {
|
|
104
110
|
WebkitLineClamp: maxLines
|
|
105
111
|
},
|
package/dist/cjs/index.js
CHANGED
|
@@ -64,12 +64,24 @@ Object.defineProperty(exports, "UNSAFE_BREAKPOINTS_CONFIG", {
|
|
|
64
64
|
return _responsive.UNSAFE_BREAKPOINTS_CONFIG;
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
+
Object.defineProperty(exports, "UNSAFE_inverseColorMap", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function get() {
|
|
70
|
+
return _styleMaps.inverseColorMap;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
67
73
|
Object.defineProperty(exports, "UNSAFE_media", {
|
|
68
74
|
enumerable: true,
|
|
69
75
|
get: function get() {
|
|
70
76
|
return _responsive.UNSAFE_media;
|
|
71
77
|
}
|
|
72
78
|
});
|
|
79
|
+
Object.defineProperty(exports, "UNSAFE_useSurface", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function get() {
|
|
82
|
+
return _surfaceProvider.useSurface;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
73
85
|
Object.defineProperty(exports, "media", {
|
|
74
86
|
enumerable: true,
|
|
75
87
|
get: function get() {
|
|
@@ -98,4 +110,6 @@ var _bleed = _interopRequireDefault(require("./components/bleed"));
|
|
|
98
110
|
var _text = _interopRequireDefault(require("./components/text"));
|
|
99
111
|
var _pressable = _interopRequireDefault(require("./components/pressable"));
|
|
100
112
|
var _anchor = _interopRequireDefault(require("./components/anchor"));
|
|
101
|
-
var _responsive = require("./responsive");
|
|
113
|
+
var _responsive = require("./responsive");
|
|
114
|
+
var _surfaceProvider = require("./components/internal/surface-provider");
|
|
115
|
+
var _styleMaps = require("./xcss/style-maps.partial");
|
|
@@ -66,7 +66,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
66
66
|
action: 'clicked',
|
|
67
67
|
componentName: componentName || 'Pressable',
|
|
68
68
|
packageName: "@atlaskit/primitives",
|
|
69
|
-
packageVersion: "6.1.
|
|
69
|
+
packageVersion: "6.1.1",
|
|
70
70
|
analyticsData: analyticsContext,
|
|
71
71
|
actionSubject: 'button'
|
|
72
72
|
});
|
|
@@ -88,7 +88,13 @@ const Text = /*#__PURE__*/forwardRef(({
|
|
|
88
88
|
const color = useColor(colorProp, hasTextAncestor);
|
|
89
89
|
const component = jsx(Component, {
|
|
90
90
|
ref: ref,
|
|
91
|
-
css: [resetStyles,
|
|
91
|
+
css: [resetStyles,
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
93
|
+
fontStylesMap[size],
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
95
|
+
color && textColorStylesMap[color], maxLines && truncationStyles, maxLines === 1 && wordBreakMap.breakAll, align && textAlignMap[align],
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
97
|
+
weight && fontWeightStylesMap[weight], Component === 'em' && emStyles, Component === 'strong' && strongStyles],
|
|
92
98
|
style: {
|
|
93
99
|
WebkitLineClamp: maxLines
|
|
94
100
|
},
|
package/dist/es2019/index.js
CHANGED
|
@@ -8,4 +8,6 @@ export { default as Bleed } from './components/bleed';
|
|
|
8
8
|
export { default as Text } from './components/text';
|
|
9
9
|
export { default as Pressable } from './components/pressable';
|
|
10
10
|
export { default as UNSAFE_ANCHOR } from './components/anchor';
|
|
11
|
-
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
11
|
+
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
12
|
+
export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
|
|
13
|
+
export { inverseColorMap as UNSAFE_inverseColorMap } from './xcss/style-maps.partial';
|
|
@@ -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.1.
|
|
69
|
+
packageVersion: "6.1.1",
|
|
70
70
|
analyticsData: analyticsContext,
|
|
71
71
|
actionSubject: 'link'
|
|
72
72
|
});
|
|
@@ -70,7 +70,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
70
70
|
action: 'clicked',
|
|
71
71
|
componentName: componentName || 'Pressable',
|
|
72
72
|
packageName: "@atlaskit/primitives",
|
|
73
|
-
packageVersion: "6.1.
|
|
73
|
+
packageVersion: "6.1.1",
|
|
74
74
|
analyticsData: analyticsContext,
|
|
75
75
|
actionSubject: 'button'
|
|
76
76
|
});
|
|
@@ -91,7 +91,13 @@ var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
91
91
|
var color = useColor(colorProp, hasTextAncestor);
|
|
92
92
|
var component = jsx(Component, {
|
|
93
93
|
ref: ref,
|
|
94
|
-
css: [resetStyles,
|
|
94
|
+
css: [resetStyles,
|
|
95
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
96
|
+
fontStylesMap[size],
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
98
|
+
color && textColorStylesMap[color], maxLines && truncationStyles, maxLines === 1 && wordBreakMap.breakAll, align && textAlignMap[align],
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
100
|
+
weight && fontWeightStylesMap[weight], Component === 'em' && emStyles, Component === 'strong' && strongStyles],
|
|
95
101
|
style: {
|
|
96
102
|
WebkitLineClamp: maxLines
|
|
97
103
|
},
|
package/dist/esm/index.js
CHANGED
|
@@ -8,4 +8,6 @@ export { default as Bleed } from './components/bleed';
|
|
|
8
8
|
export { default as Text } from './components/text';
|
|
9
9
|
export { default as Pressable } from './components/pressable';
|
|
10
10
|
export { default as UNSAFE_ANCHOR } from './components/anchor';
|
|
11
|
-
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
11
|
+
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
12
|
+
export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
|
|
13
|
+
export { inverseColorMap as UNSAFE_inverseColorMap } from './xcss/style-maps.partial';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
3
|
-
import { FontSize, FontWeight, TextColor } from '../xcss/style-maps.partial';
|
|
2
|
+
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
3
|
+
import { type FontSize, type FontWeight, type TextColor } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { BasePrimitiveProps } from './types';
|
|
5
5
|
declare const asAllowlist: readonly ["span", "p", "strong", "em"];
|
|
6
6
|
type AsElement = (typeof asAllowlist)[number];
|
|
@@ -16,7 +16,7 @@ type TextPropsBase<T extends ElementType = 'span'> = {
|
|
|
16
16
|
/**
|
|
17
17
|
* Token representing text color with a built-in fallback value.
|
|
18
18
|
* Will apply inverse text color automatically if placed within a Box with bold background color.
|
|
19
|
-
* Defaults to `text
|
|
19
|
+
* Defaults to `color.text` if not nested in other Text components.
|
|
20
20
|
*/
|
|
21
21
|
color?: TextColor | 'inherit';
|
|
22
22
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -21,3 +21,5 @@ export { default as UNSAFE_ANCHOR } from './components/anchor';
|
|
|
21
21
|
export type { AnchorProps as UNSAFE_AnchorProps } from './components/anchor';
|
|
22
22
|
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
23
23
|
export type { Breakpoint, MediaQuery } from './responsive';
|
|
24
|
+
export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
|
|
25
|
+
export { inverseColorMap as UNSAFE_inverseColorMap } from './xcss/style-maps.partial';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
3
|
-
import { FontSize, FontWeight, TextColor } from '../xcss/style-maps.partial';
|
|
2
|
+
import { type ComponentPropsWithRef, type ElementType, type ReactNode } from 'react';
|
|
3
|
+
import { type FontSize, type FontWeight, type TextColor } from '../xcss/style-maps.partial';
|
|
4
4
|
import type { BasePrimitiveProps } from './types';
|
|
5
5
|
declare const asAllowlist: readonly [
|
|
6
6
|
"span",
|
|
@@ -21,7 +21,7 @@ type TextPropsBase<T extends ElementType = 'span'> = {
|
|
|
21
21
|
/**
|
|
22
22
|
* Token representing text color with a built-in fallback value.
|
|
23
23
|
* Will apply inverse text color automatically if placed within a Box with bold background color.
|
|
24
|
-
* Defaults to `text
|
|
24
|
+
* Defaults to `color.text` if not nested in other Text components.
|
|
25
25
|
*/
|
|
26
26
|
color?: TextColor | 'inherit';
|
|
27
27
|
/**
|
|
@@ -21,3 +21,5 @@ export { default as UNSAFE_ANCHOR } from './components/anchor';
|
|
|
21
21
|
export type { AnchorProps as UNSAFE_AnchorProps } from './components/anchor';
|
|
22
22
|
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
23
23
|
export type { Breakpoint, MediaQuery } from './responsive';
|
|
24
|
+
export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
|
|
25
|
+
export { inverseColorMap as UNSAFE_inverseColorMap } from './xcss/style-maps.partial';
|