@atlaskit/avatar 21.7.0 → 21.9.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 +16 -0
- package/dist/cjs/Avatar.js +1 -1
- package/dist/cjs/AvatarItem.js +26 -7
- package/dist/es2019/Avatar.js +1 -1
- package/dist/es2019/AvatarItem.js +25 -6
- package/dist/esm/Avatar.js +1 -1
- package/dist/esm/AvatarItem.js +25 -6
- package/dist/types/AvatarItem.d.ts +2 -2
- package/dist/types-ts4.5/AvatarItem.d.ts +2 -2
- package/package.json +17 -8
- package/dist/cjs/Text.js +0 -40
- package/dist/es2019/Text.js +0 -33
- package/dist/esm/Text.js +0 -34
- package/dist/types/Text.d.ts +0 -13
- package/dist/types-ts4.5/Text.d.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/avatar
|
|
2
2
|
|
|
3
|
+
## 21.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#96699](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96699)
|
|
8
|
+
[`65f87a3ac916`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/65f87a3ac916) -
|
|
9
|
+
[ux] Increase font size of secondary text from computed 11.9px to 12px.
|
|
10
|
+
|
|
11
|
+
## 21.8.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#98168](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98168)
|
|
16
|
+
[`bc3ef8133b6c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc3ef8133b6c) -
|
|
17
|
+
Add support for React 18.
|
|
18
|
+
|
|
3
19
|
## 21.7.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/cjs/Avatar.js
CHANGED
|
@@ -24,7 +24,7 @@ var _templateObject;
|
|
|
24
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
26
|
var packageName = "@atlaskit/avatar";
|
|
27
|
-
var packageVersion = "21.
|
|
27
|
+
var packageVersion = "21.9.0";
|
|
28
28
|
|
|
29
29
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
30
30
|
|
package/dist/cjs/AvatarItem.js
CHANGED
|
@@ -9,10 +9,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
var _primitives = require("@atlaskit/primitives");
|
|
12
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
15
|
var _constants = require("@atlaskit/theme/constants");
|
|
14
16
|
var _constants2 = require("./constants");
|
|
15
|
-
var _Text = _interopRequireDefault(require("./Text"));
|
|
16
17
|
var _utilities = require("./utilities");
|
|
17
18
|
var _templateObject;
|
|
18
19
|
/** @jsx jsx */
|
|
@@ -26,6 +27,19 @@ var avatarItemStyles = (0, _react2.css)({
|
|
|
26
27
|
lineHeight: '1.4',
|
|
27
28
|
paddingInlineStart: "var(--ds-space-100, 8px)"
|
|
28
29
|
});
|
|
30
|
+
var secondaryTextOldStyles = (0, _react2.css)({
|
|
31
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
32
|
+
fontSize: '0.85em'
|
|
33
|
+
});
|
|
34
|
+
var baseTextStyles = (0, _react2.css)({
|
|
35
|
+
display: 'block',
|
|
36
|
+
color: "var(--ds-text, #172B4D)"
|
|
37
|
+
});
|
|
38
|
+
var truncationStyles = (0, _react2.css)({
|
|
39
|
+
overflowX: 'hidden',
|
|
40
|
+
textOverflow: 'ellipsis',
|
|
41
|
+
whiteSpace: 'nowrap'
|
|
42
|
+
});
|
|
29
43
|
var getStyles = function getStyles(css, _ref) {
|
|
30
44
|
var backgroundColor = _ref.backgroundColor,
|
|
31
45
|
isInteractive = _ref.isInteractive,
|
|
@@ -90,12 +104,17 @@ var AvatarItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
|
90
104
|
}), {}, {
|
|
91
105
|
children: (0, _react2.jsx)(_react.Fragment, null, avatar, (0, _react2.jsx)("div", {
|
|
92
106
|
css: avatarItemStyles
|
|
93
|
-
}, (0, _react2.jsx)(
|
|
94
|
-
|
|
95
|
-
}, primaryText), (0, _react2.jsx)(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
107
|
+
}, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.avatar-item-font-size_830x6') ? (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_primitives.Text, {
|
|
108
|
+
maxLines: isTruncationDisabled ? undefined : 1
|
|
109
|
+
}, primaryText), (0, _react2.jsx)(_primitives.Text, {
|
|
110
|
+
color: "color.text.subtlest",
|
|
111
|
+
maxLines: isTruncationDisabled ? undefined : 1,
|
|
112
|
+
size: "UNSAFE_small"
|
|
113
|
+
}, secondaryText)) : (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("span", {
|
|
114
|
+
css: [baseTextStyles, !isTruncationDisabled && truncationStyles]
|
|
115
|
+
}, primaryText), (0, _react2.jsx)("span", {
|
|
116
|
+
css: [baseTextStyles, secondaryTextOldStyles, !isTruncationDisabled && truncationStyles]
|
|
117
|
+
}, secondaryText))))
|
|
99
118
|
});
|
|
100
119
|
return children ? children(props) : /*#__PURE__*/(0, _react.createElement)((0, _utilities.getCustomElement)(isDisabled, href, onClick), props);
|
|
101
120
|
});
|
package/dist/es2019/Avatar.js
CHANGED
|
@@ -12,7 +12,7 @@ import { PresenceWrapper } from './Presence';
|
|
|
12
12
|
import { StatusWrapper } from './Status';
|
|
13
13
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
14
14
|
const packageName = "@atlaskit/avatar";
|
|
15
|
-
const packageVersion = "21.
|
|
15
|
+
const packageVersion = "21.9.0";
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
18
18
|
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
3
3
|
import { createElement, forwardRef, Fragment } from 'react';
|
|
4
4
|
import { ClassNames, css, jsx } from '@emotion/react';
|
|
5
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { Text } from '@atlaskit/primitives';
|
|
5
7
|
import { B200, B50, N30 } from '@atlaskit/theme/colors';
|
|
6
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
9
|
import { BORDER_WIDTH } from './constants';
|
|
8
|
-
import Text from './Text';
|
|
9
10
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
10
11
|
const avatarItemStyles = css({
|
|
11
12
|
minWidth: 0,
|
|
@@ -14,6 +15,19 @@ const avatarItemStyles = css({
|
|
|
14
15
|
lineHeight: '1.4',
|
|
15
16
|
paddingInlineStart: "var(--ds-space-100, 8px)"
|
|
16
17
|
});
|
|
18
|
+
const secondaryTextOldStyles = css({
|
|
19
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
20
|
+
fontSize: '0.85em'
|
|
21
|
+
});
|
|
22
|
+
const baseTextStyles = css({
|
|
23
|
+
display: 'block',
|
|
24
|
+
color: "var(--ds-text, #172B4D)"
|
|
25
|
+
});
|
|
26
|
+
const truncationStyles = css({
|
|
27
|
+
overflowX: 'hidden',
|
|
28
|
+
textOverflow: 'ellipsis',
|
|
29
|
+
whiteSpace: 'nowrap'
|
|
30
|
+
});
|
|
17
31
|
const getStyles = (css, {
|
|
18
32
|
backgroundColor,
|
|
19
33
|
isInteractive,
|
|
@@ -122,12 +136,17 @@ const AvatarItem = /*#__PURE__*/forwardRef(({
|
|
|
122
136
|
}),
|
|
123
137
|
children: jsx(Fragment, null, avatar, jsx("div", {
|
|
124
138
|
css: avatarItemStyles
|
|
125
|
-
}, jsx(Text, {
|
|
126
|
-
|
|
139
|
+
}, getBooleanFF('platform.design-system-team.avatar-item-font-size_830x6') ? jsx(Fragment, null, jsx(Text, {
|
|
140
|
+
maxLines: isTruncationDisabled ? undefined : 1
|
|
127
141
|
}, primaryText), jsx(Text, {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
142
|
+
color: "color.text.subtlest",
|
|
143
|
+
maxLines: isTruncationDisabled ? undefined : 1,
|
|
144
|
+
size: "UNSAFE_small"
|
|
145
|
+
}, secondaryText)) : jsx(Fragment, null, jsx("span", {
|
|
146
|
+
css: [baseTextStyles, !isTruncationDisabled && truncationStyles]
|
|
147
|
+
}, primaryText), jsx("span", {
|
|
148
|
+
css: [baseTextStyles, secondaryTextOldStyles, !isTruncationDisabled && truncationStyles]
|
|
149
|
+
}, secondaryText))))
|
|
131
150
|
};
|
|
132
151
|
return children ? children(props) : /*#__PURE__*/createElement(getCustomElement(isDisabled, href, onClick), props);
|
|
133
152
|
});
|
package/dist/esm/Avatar.js
CHANGED
|
@@ -17,7 +17,7 @@ import { PresenceWrapper } from './Presence';
|
|
|
17
17
|
import { StatusWrapper } from './Status';
|
|
18
18
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
19
19
|
var packageName = "@atlaskit/avatar";
|
|
20
|
-
var packageVersion = "21.
|
|
20
|
+
var packageVersion = "21.9.0";
|
|
21
21
|
|
|
22
22
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
23
23
|
|
package/dist/esm/AvatarItem.js
CHANGED
|
@@ -7,10 +7,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
8
8
|
import { createElement, forwardRef, Fragment } from 'react';
|
|
9
9
|
import { ClassNames, css, jsx } from '@emotion/react';
|
|
10
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { Text } from '@atlaskit/primitives';
|
|
10
12
|
import { B200, B50, N30 } from '@atlaskit/theme/colors';
|
|
11
13
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
12
14
|
import { BORDER_WIDTH } from './constants';
|
|
13
|
-
import Text from './Text';
|
|
14
15
|
import { getButtonProps, getCustomElement, getLinkProps } from './utilities';
|
|
15
16
|
var avatarItemStyles = css({
|
|
16
17
|
minWidth: 0,
|
|
@@ -19,6 +20,19 @@ var avatarItemStyles = css({
|
|
|
19
20
|
lineHeight: '1.4',
|
|
20
21
|
paddingInlineStart: "var(--ds-space-100, 8px)"
|
|
21
22
|
});
|
|
23
|
+
var secondaryTextOldStyles = css({
|
|
24
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
25
|
+
fontSize: '0.85em'
|
|
26
|
+
});
|
|
27
|
+
var baseTextStyles = css({
|
|
28
|
+
display: 'block',
|
|
29
|
+
color: "var(--ds-text, #172B4D)"
|
|
30
|
+
});
|
|
31
|
+
var truncationStyles = css({
|
|
32
|
+
overflowX: 'hidden',
|
|
33
|
+
textOverflow: 'ellipsis',
|
|
34
|
+
whiteSpace: 'nowrap'
|
|
35
|
+
});
|
|
22
36
|
var getStyles = function getStyles(css, _ref) {
|
|
23
37
|
var backgroundColor = _ref.backgroundColor,
|
|
24
38
|
isInteractive = _ref.isInteractive,
|
|
@@ -83,12 +97,17 @@ var AvatarItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
83
97
|
}), {}, {
|
|
84
98
|
children: jsx(Fragment, null, avatar, jsx("div", {
|
|
85
99
|
css: avatarItemStyles
|
|
86
|
-
}, jsx(Text, {
|
|
87
|
-
|
|
100
|
+
}, getBooleanFF('platform.design-system-team.avatar-item-font-size_830x6') ? jsx(Fragment, null, jsx(Text, {
|
|
101
|
+
maxLines: isTruncationDisabled ? undefined : 1
|
|
88
102
|
}, primaryText), jsx(Text, {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
color: "color.text.subtlest",
|
|
104
|
+
maxLines: isTruncationDisabled ? undefined : 1,
|
|
105
|
+
size: "UNSAFE_small"
|
|
106
|
+
}, secondaryText)) : jsx(Fragment, null, jsx("span", {
|
|
107
|
+
css: [baseTextStyles, !isTruncationDisabled && truncationStyles]
|
|
108
|
+
}, primaryText), jsx("span", {
|
|
109
|
+
css: [baseTextStyles, secondaryTextOldStyles, !isTruncationDisabled && truncationStyles]
|
|
110
|
+
}, secondaryText))))
|
|
92
111
|
});
|
|
93
112
|
return children ? children(props) : /*#__PURE__*/createElement(getCustomElement(isDisabled, href, onClick), props);
|
|
94
113
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { MouseEventHandler, ReactNode, Ref } from 'react';
|
|
3
|
-
import { AvatarClickEventHandler } from './types';
|
|
2
|
+
import { type MouseEventHandler, type ReactNode, type Ref } from 'react';
|
|
3
|
+
import { type AvatarClickEventHandler } from './types';
|
|
4
4
|
export interface CustomAvatarItemProps {
|
|
5
5
|
testId?: string;
|
|
6
6
|
onClick?: MouseEventHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { MouseEventHandler, ReactNode, Ref } from 'react';
|
|
3
|
-
import { AvatarClickEventHandler } from './types';
|
|
2
|
+
import { type MouseEventHandler, type ReactNode, type Ref } from 'react';
|
|
3
|
+
import { type AvatarClickEventHandler } from './types';
|
|
4
4
|
export interface CustomAvatarItemProps {
|
|
5
5
|
testId?: string;
|
|
6
6
|
onClick?: MouseEventHandler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/avatar",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.9.0",
|
|
4
4
|
"description": "An avatar is a visual representation of a user or entity.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"website": {
|
|
32
32
|
"name": "Avatar",
|
|
33
33
|
"category": "Components"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"runReact18": true
|
|
35
36
|
},
|
|
36
37
|
"af:exports": {
|
|
37
38
|
"./AvatarItem": "./src/entry-points/avatar-item.ts",
|
|
@@ -44,23 +45,26 @@
|
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
47
|
-
"@atlaskit/icon": "^22.
|
|
48
|
-
"@atlaskit/
|
|
49
|
-
"@atlaskit/
|
|
48
|
+
"@atlaskit/icon": "^22.3.0",
|
|
49
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
50
|
+
"@atlaskit/primitives": "^6.1.0",
|
|
51
|
+
"@atlaskit/theme": "^12.8.0",
|
|
52
|
+
"@atlaskit/tokens": "^1.49.0",
|
|
50
53
|
"@babel/runtime": "^7.0.0",
|
|
51
54
|
"@emotion/react": "^11.7.1",
|
|
52
55
|
"@emotion/serialize": "^1.1.0",
|
|
53
56
|
"react-uid": "^2.2.0"
|
|
54
57
|
},
|
|
55
58
|
"peerDependencies": {
|
|
56
|
-
"react": "^16.8.0"
|
|
59
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
57
60
|
},
|
|
58
61
|
"devDependencies": {
|
|
59
62
|
"@af/accessibility-testing": "*",
|
|
60
63
|
"@af/visual-regression": "*",
|
|
61
64
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
62
65
|
"@atlaskit/ssr": "*",
|
|
63
|
-
"@atlaskit/
|
|
66
|
+
"@atlaskit/textfield": "^6.3.0",
|
|
67
|
+
"@atlaskit/tooltip": "^18.4.0",
|
|
64
68
|
"@atlaskit/visual-regression": "*",
|
|
65
69
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
66
70
|
"@emotion/styled": "^11.0.0",
|
|
@@ -99,5 +103,10 @@
|
|
|
99
103
|
}
|
|
100
104
|
},
|
|
101
105
|
"homepage": "https://atlassian.design/components/avatar/",
|
|
102
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
106
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
107
|
+
"platform-feature-flags": {
|
|
108
|
+
"platform.design-system-team.avatar-item-font-size_830x6": {
|
|
109
|
+
"type": "boolean"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
103
112
|
}
|
package/dist/cjs/Text.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("@emotion/react");
|
|
8
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
/** @jsx jsx */
|
|
10
|
-
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
11
|
-
|
|
12
|
-
var baseStyles = (0, _react.css)({
|
|
13
|
-
display: 'block',
|
|
14
|
-
margin: "var(--ds-space-0, 0px)",
|
|
15
|
-
color: "var(--ds-text, ".concat(_colors.N900, ")")
|
|
16
|
-
});
|
|
17
|
-
var truncateStyles = (0, _react.css)({
|
|
18
|
-
overflowX: 'hidden',
|
|
19
|
-
textOverflow: 'ellipsis',
|
|
20
|
-
whiteSpace: 'nowrap'
|
|
21
|
-
});
|
|
22
|
-
var secondaryStyles = (0, _react.css)({
|
|
23
|
-
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
|
|
24
|
-
fontSize: '0.85em'
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* __Text__
|
|
29
|
-
*
|
|
30
|
-
* Text is used internally only.
|
|
31
|
-
*/
|
|
32
|
-
var Text = function Text(_ref) {
|
|
33
|
-
var isSecondary = _ref.isSecondary,
|
|
34
|
-
children = _ref.children,
|
|
35
|
-
shouldTruncate = _ref.shouldTruncate;
|
|
36
|
-
return (0, _react.jsx)("span", {
|
|
37
|
-
css: [baseStyles, isSecondary && secondaryStyles, shouldTruncate && truncateStyles]
|
|
38
|
-
}, children);
|
|
39
|
-
};
|
|
40
|
-
var _default = exports.default = Text;
|
package/dist/es2019/Text.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import { N200, N900 } from '@atlaskit/theme/colors';
|
|
6
|
-
const baseStyles = css({
|
|
7
|
-
display: 'block',
|
|
8
|
-
margin: "var(--ds-space-0, 0px)",
|
|
9
|
-
color: `var(--ds-text, ${N900})`
|
|
10
|
-
});
|
|
11
|
-
const truncateStyles = css({
|
|
12
|
-
overflowX: 'hidden',
|
|
13
|
-
textOverflow: 'ellipsis',
|
|
14
|
-
whiteSpace: 'nowrap'
|
|
15
|
-
});
|
|
16
|
-
const secondaryStyles = css({
|
|
17
|
-
color: `var(--ds-text-subtlest, ${N200})`,
|
|
18
|
-
fontSize: '0.85em'
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* __Text__
|
|
23
|
-
*
|
|
24
|
-
* Text is used internally only.
|
|
25
|
-
*/
|
|
26
|
-
const Text = ({
|
|
27
|
-
isSecondary,
|
|
28
|
-
children,
|
|
29
|
-
shouldTruncate
|
|
30
|
-
}) => jsx("span", {
|
|
31
|
-
css: [baseStyles, isSecondary && secondaryStyles, shouldTruncate && truncateStyles]
|
|
32
|
-
}, children);
|
|
33
|
-
export default Text;
|
package/dist/esm/Text.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
// eslint-disable-next-line @repo/internal/fs/filename-pattern-match
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import { N200, N900 } from '@atlaskit/theme/colors';
|
|
6
|
-
var baseStyles = css({
|
|
7
|
-
display: 'block',
|
|
8
|
-
margin: "var(--ds-space-0, 0px)",
|
|
9
|
-
color: "var(--ds-text, ".concat(N900, ")")
|
|
10
|
-
});
|
|
11
|
-
var truncateStyles = css({
|
|
12
|
-
overflowX: 'hidden',
|
|
13
|
-
textOverflow: 'ellipsis',
|
|
14
|
-
whiteSpace: 'nowrap'
|
|
15
|
-
});
|
|
16
|
-
var secondaryStyles = css({
|
|
17
|
-
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
18
|
-
fontSize: '0.85em'
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* __Text__
|
|
23
|
-
*
|
|
24
|
-
* Text is used internally only.
|
|
25
|
-
*/
|
|
26
|
-
var Text = function Text(_ref) {
|
|
27
|
-
var isSecondary = _ref.isSecondary,
|
|
28
|
-
children = _ref.children,
|
|
29
|
-
shouldTruncate = _ref.shouldTruncate;
|
|
30
|
-
return jsx("span", {
|
|
31
|
-
css: [baseStyles, isSecondary && secondaryStyles, shouldTruncate && truncateStyles]
|
|
32
|
-
}, children);
|
|
33
|
-
};
|
|
34
|
-
export default Text;
|
package/dist/types/Text.d.ts
DELETED