@atlaskit/smart-card 26.3.3 → 26.3.4
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/version.json +1 -1
- package/dist/cjs/view/BlockCard/index.js +1 -1
- package/dist/cjs/view/EmbedCard/components/styled.js +10 -6
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/styled.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/cjs/view/InlineCard/Icon.js +2 -2
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +4 -4
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/index.js +1 -1
- package/dist/es2019/view/EmbedCard/components/styled.js +14 -8
- package/dist/es2019/view/EmbedModal/components/link-info/styled.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/styled.js +7 -3
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/es2019/view/InlineCard/Icon.js +2 -2
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +5 -6
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/index.js +1 -1
- package/dist/esm/view/EmbedCard/components/styled.js +10 -6
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +3 -2
- package/dist/esm/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js +2 -0
- package/dist/esm/view/FlexibleCard/components/common/lozenge-action/styled.js +5 -3
- package/dist/esm/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/esm/view/InlineCard/Icon.js +2 -2
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +4 -5
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d86bc75af82`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d86bc75af82) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
|
|
8
|
+
|
|
3
9
|
## 26.3.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -86,7 +86,7 @@ var _linkProvider = require("@atlaskit/link-provider");
|
|
|
86
86
|
var _PreviewAction = _interopRequireDefault(require("./actions/PreviewAction"));
|
|
87
87
|
var _templateObject;
|
|
88
88
|
/** @jsx jsx */
|
|
89
|
-
var flexibleBlockCardElevationStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 1.5px;\n box-shadow: ", ";\n margin:
|
|
89
|
+
var flexibleBlockCardElevationStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 1.5px;\n box-shadow: ", ";\n margin: ", ";\n"])), _token.tokens.elevation, "var(--ds-space-025, 2px)");
|
|
90
90
|
var BlockCard = function BlockCard(_ref) {
|
|
91
91
|
var _details$meta, _forbiddenViewProps$c;
|
|
92
92
|
var id = _ref.id,
|
|
@@ -73,6 +73,8 @@ function visible(_ref6) {
|
|
|
73
73
|
var LinkWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", " &:hover {\n text-decoration: none;\n }\n"])), function (props) {
|
|
74
74
|
return wrapperStyles(props);
|
|
75
75
|
});
|
|
76
|
+
|
|
77
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
76
78
|
exports.LinkWrapper = LinkWrapper;
|
|
77
79
|
var Wrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n margin-top: 10px;\n"])), function (props) {
|
|
78
80
|
return wrapperStyles(props);
|
|
@@ -125,24 +127,26 @@ var Image = _styled.default.img(_templateObject7 || (_templateObject7 = (0, _tag
|
|
|
125
127
|
exports.Image = Image;
|
|
126
128
|
var maxAvatarCount = 6;
|
|
127
129
|
exports.maxAvatarCount = maxAvatarCount;
|
|
128
|
-
var ContentWrapper = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding:
|
|
130
|
+
var ContentWrapper = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding: ", " ", "\n ", " ", ";\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)");
|
|
129
131
|
exports.ContentWrapper = ContentWrapper;
|
|
130
132
|
var Title = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N900, ")"), 20 / 16, 20 * 4);
|
|
131
133
|
exports.Title = Title;
|
|
132
|
-
var Byline = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-top:
|
|
134
|
+
var Byline = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), "var(--ds-space-050, 4px)", "var(--ds-text-subtlest, ".concat(colors.N300, ")"), 16 / 12, ellipsis('100%'));
|
|
135
|
+
|
|
136
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
133
137
|
exports.Byline = Byline;
|
|
134
138
|
var Description = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N800, ")"), 18 / 12, 18 * 3);
|
|
135
139
|
exports.Description = Description;
|
|
136
|
-
var ResolvedViewIconWrapper = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin-top:
|
|
140
|
+
var ResolvedViewIconWrapper = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
137
141
|
exports.ResolvedViewIconWrapper = ResolvedViewIconWrapper;
|
|
138
|
-
var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin:
|
|
142
|
+
var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref13) {
|
|
139
143
|
var src = _ref13.src;
|
|
140
144
|
return src;
|
|
141
145
|
});
|
|
142
146
|
exports.Thumbnail = Thumbnail;
|
|
143
|
-
var UsersWrapper = _styled.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin-top:
|
|
147
|
+
var UsersWrapper = _styled.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
144
148
|
exports.UsersWrapper = UsersWrapper;
|
|
145
|
-
var ActionsWrapper = _styled.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n margin-top:
|
|
149
|
+
var ActionsWrapper = _styled.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n text-align: right;\n\n > * {\n margin-top: ", ";\n }\n\n > * + * {\n margin-left: ", ";\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
|
|
146
150
|
exports.ActionsWrapper = ActionsWrapper;
|
|
147
151
|
var AlertWrapper = _styled.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n pointer-events: none;\n /* z-index has to be 1 higher than the number of avatars in the avatar stack */\n z-index: ", ";\n"])), maxAvatarCount + 1);
|
|
148
152
|
exports.AlertWrapper = AlertWrapper;
|
|
@@ -8,7 +8,8 @@ exports.titleCss = exports.iconCss = exports.containerStyles = exports.actionCss
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
11
|
-
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
12
|
+
var containerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n gap: ", ";\n justify-content: space-between;\n // AK ModalBody has 2px padding top and bottom.\n // Using 14px here to create 16px gap between\n // link info and iframe\n padding: ", " ", " 14px\n ", ";\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)");
|
|
12
13
|
exports.containerStyles = containerStyles;
|
|
13
14
|
var iconSize = '24px';
|
|
14
15
|
var iconCss = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n img,\n span,\n svg {\n height: ", ";\n min-height: ", ";\n max-height: ", ";\n width: ", ";\n min-width: ", ";\n max-width: ", ";\n }\n"])), iconSize, iconSize, iconSize, iconSize, iconSize, iconSize);
|
|
@@ -16,5 +17,5 @@ exports.iconCss = iconCss;
|
|
|
16
17
|
var height = '20px';
|
|
17
18
|
var titleCss = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1 1 auto;\n\n h3 {\n flex: 1 1 auto;\n font-size: 16px;\n font-weight: 400;\n line-height: ", ";\n\n display: -webkit-box;\n margin-bottom: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n // Fallback options\n @supports not (-webkit-line-clamp: 1) {\n max-height: ", ";\n }\n }\n"])), height, height);
|
|
18
19
|
exports.titleCss = titleCss;
|
|
19
|
-
var actionCss = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex: 0 0 auto;\n gap:
|
|
20
|
+
var actionCss = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex: 0 0 auto;\n gap: ", ";\n line-height: ", ";\n span {\n line-height: ", ";\n }\n\n @media only screen and (max-width: 980px) {\n // Hide resize button if the screen is smaller than the min width\n // or too small to have enough impact to matter.\n .smart-link-resize-button {\n display: none;\n }\n }\n"])), "var(--ds-space-050, 4px)", height, height);
|
|
20
21
|
exports.actionCss = actionCss;
|
package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js
CHANGED
|
@@ -14,6 +14,8 @@ var dropdownItemGroupStyles = (0, _react.css)(_templateObject || (_templateObjec
|
|
|
14
14
|
exports.dropdownItemGroupStyles = dropdownItemGroupStyles;
|
|
15
15
|
var sharedBlockStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 0.5rem;\n line-height: 1rem;\n min-width: 0;\n overflow: hidden;\n flex-direction: row;\n align-items: center;\n"])));
|
|
16
16
|
var contentStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n\n margin-top: ", ";\n align-items: flex-start;\n\n > span,\n > div {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: ", ";\n }\n"])), sharedBlockStyles, "var(--ds-space-025, 2px)", "var(--ds-text, ".concat(_colors.N800, ")"));
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
17
19
|
exports.contentStyles = contentStyles;
|
|
18
20
|
var linkStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n\n cursor: pointer;\n font-size: 0.875rem;\n margin-top: 10px;\n margin-left: ", ";\n margin-bottom: ", ";\n"])), sharedBlockStyles, "var(--ds-space-400, 32px)", "var(--ds-space-025, 2px)");
|
|
19
21
|
exports.linkStyles = linkStyles;
|
|
@@ -8,9 +8,11 @@ exports.triggerLozengeStyles = exports.triggerButtonStyles = exports.dropdownIte
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3;
|
|
11
|
-
var triggerButtonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n all: unset;\n background-color: transparent;\n color: unset;\n cursor: pointer;\n font-family: unset;\n font-size: unset;\n font-style: unset;\n font-weight: unset;\n font-variant: unset;\n line-height: 0;\n padding: 0;\n text-transform: unset;\n\n border: 2px solid transparent;\n margin:
|
|
11
|
+
var triggerButtonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n all: unset;\n background-color: transparent;\n color: unset;\n cursor: pointer;\n font-family: unset;\n font-size: unset;\n font-style: unset;\n font-weight: unset;\n font-variant: unset;\n line-height: 0;\n padding: 0;\n text-transform: unset;\n\n border: 2px solid transparent;\n margin: ", ";\n\n &:focus-visible,\n &:focus-within,\n &[aria-expanded='true'] {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n border-radius: 5px;\n }\n"])), "var(--ds-space-025, 2px)", "var(--ds-border-focused, #388BFF)");
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
12
14
|
exports.triggerButtonStyles = triggerButtonStyles;
|
|
13
|
-
var triggerLozengeStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: -
|
|
15
|
+
var triggerLozengeStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: calc(-1 * ", ")\n calc(-1 * ", ")\n calc(-1 * ", ") -1px;\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)");
|
|
14
16
|
exports.triggerLozengeStyles = triggerLozengeStyles;
|
|
15
|
-
var dropdownItemGroupStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n max-height: 300px;\n overflow-y: auto;\n\n button {\n padding:
|
|
17
|
+
var dropdownItemGroupStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n max-height: 300px;\n overflow-y: auto;\n\n button {\n padding: ", " ", ";\n min-height: 28px;\n width: 220px;\n\n &:hover {\n background-color: inherit;\n }\n\n &:focus,\n &:focus-visible {\n background-color: ", ";\n box-sizing: border-box;\n box-shadow: inset 2px 0 0 ", ";\n outline: none;\n }\n }\n"])), "var(--ds-space-075, 6px)", "var(--ds-space-150, 12px)", "var(--ds-background-neutral-subtle-hovered, #091E420F)", "var(--ds-border-selected, #0C66E4)");
|
|
16
18
|
exports.dropdownItemGroupStyles = dropdownItemGroupStyles;
|
|
@@ -21,7 +21,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
21
21
|
/** @jsx jsx */
|
|
22
22
|
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); }
|
|
23
23
|
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; }
|
|
24
|
-
var elevationStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid transparent;\n border-radius: 1.5px;\n box-shadow: ", ";\n margin:
|
|
24
|
+
var elevationStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid transparent;\n border-radius: 1.5px;\n box-shadow: ", ";\n margin: ", ";\n"])), _token.tokens.elevation, "var(--ds-space-025, 2px)");
|
|
25
25
|
var getGap = function getGap(size) {
|
|
26
26
|
switch (size) {
|
|
27
27
|
case _constants.SmartLinkSize.XLarge:
|
|
@@ -15,13 +15,13 @@ var _templateObject, _templateObject2;
|
|
|
15
15
|
// Current rationale: vertically positioned at the top of
|
|
16
16
|
// the smart card container (when set to 0). Offset this
|
|
17
17
|
// to position it with appropriate whitespace from the top.
|
|
18
|
-
var Icon = _styled.default.img(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 14px;\n width: 14px;\n margin-right:
|
|
18
|
+
var Icon = _styled.default.img(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 14px;\n width: 14px;\n margin-right: ", ";\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])), "var(--ds-space-050, 4px)");
|
|
19
19
|
|
|
20
20
|
// Used for 'untrue' icons which claim to be 16x16 but
|
|
21
21
|
// are less than that in height/width.
|
|
22
22
|
// TODO: Replace this override with proper AtlasKit solution.
|
|
23
23
|
exports.Icon = Icon;
|
|
24
|
-
var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: -
|
|
24
|
+
var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
|
|
25
25
|
exports.AKIconWrapper = AKIconWrapper;
|
|
26
26
|
var Shimmer = function Shimmer(_ref) {
|
|
27
27
|
var testId = _ref.testId;
|
|
@@ -25,7 +25,7 @@ var IconWrapper = _styled.default.span(_templateObject || (_templateObject = (0,
|
|
|
25
25
|
|
|
26
26
|
// Wraps all emoji in Inline Links similar to icon
|
|
27
27
|
exports.IconWrapper = IconWrapper;
|
|
28
|
-
var EmojiWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n margin-right:
|
|
28
|
+
var EmojiWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n margin-right: ", ";\n user-select: none;\n ", "\n ", "\n"])), "var(--ds-space-025, 2px)", IconOverrides, IconObjectOverrides);
|
|
29
29
|
|
|
30
30
|
// The main 'wrapping' element, title of the content.
|
|
31
31
|
// NB: `white-space` adds little whitespace before wrapping.
|
|
@@ -38,15 +38,15 @@ exports.IconTitleWrapper = IconTitleWrapper;
|
|
|
38
38
|
var LozengeWrapper = _styled.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n vertical-align: 1px;\n"])));
|
|
39
39
|
// TODO: Replace overrides with proper AtlasKit solution.
|
|
40
40
|
exports.LozengeWrapper = LozengeWrapper;
|
|
41
|
-
var LozengeBlockWrapper = _styled.default.span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n & > span {\n margin-left:
|
|
41
|
+
var LozengeBlockWrapper = _styled.default.span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n & > span {\n margin-left: ", ";\n }\n"])), "var(--ds-space-050, 4px)");
|
|
42
42
|
exports.LozengeBlockWrapper = LozengeBlockWrapper;
|
|
43
|
-
var RightIconPositionWrapper = _styled.default.span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-left:
|
|
43
|
+
var RightIconPositionWrapper = _styled.default.span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n margin-right: ", ";\n position: relative;\n display: inline-block;\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)");
|
|
44
44
|
|
|
45
45
|
// The following components are used to absolutely position icons in the vertical center.
|
|
46
46
|
// - IconPositionWrapper: the `relative` parent which has no height in itself.
|
|
47
47
|
// - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
|
|
48
48
|
exports.RightIconPositionWrapper = RightIconPositionWrapper;
|
|
49
|
-
var IconPositionWrapper = _styled.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-right:
|
|
49
|
+
var IconPositionWrapper = _styled.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n position: relative;\n display: inline-block;\n"])), "var(--ds-space-050, 4px)");
|
|
50
50
|
exports.IconPositionWrapper = IconPositionWrapper;
|
|
51
51
|
var IconEmptyWrapper = _styled.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n width: 14px;\n height: 100%;\n display: inline-block;\n opacity: 0;\n"])));
|
|
52
52
|
|
|
@@ -9,5 +9,5 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
10
|
var _styled2 = require("../IconAndTitleLayout/styled");
|
|
11
11
|
var _templateObject;
|
|
12
|
-
var SpinnerWrapper = (0, _styled.default)(_styled2.IconTitleWrapper)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n vertical-align: text-top;\n margin-left:
|
|
12
|
+
var SpinnerWrapper = (0, _styled.default)(_styled2.IconTitleWrapper)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n vertical-align: text-top;\n margin-left: ", ";\n"])), "var(--ds-space-025, 2px)");
|
|
13
13
|
exports.SpinnerWrapper = SpinnerWrapper;
|
package/dist/es2019/version.json
CHANGED
|
@@ -28,7 +28,7 @@ export { ForbiddenAction, AuthorizeAction, BlockCardResolvedView, BlockCardResol
|
|
|
28
28
|
const flexibleBlockCardElevationStyle = css`
|
|
29
29
|
border-radius: 1.5px;
|
|
30
30
|
box-shadow: ${tokens.elevation};
|
|
31
|
-
margin: 2px;
|
|
31
|
+
margin: ${"var(--ds-space-025, 2px)"};
|
|
32
32
|
`;
|
|
33
33
|
export const BlockCard = ({
|
|
34
34
|
id,
|
|
@@ -127,6 +127,8 @@ export const LinkWrapper = styled.div`
|
|
|
127
127
|
text-decoration: none;
|
|
128
128
|
}
|
|
129
129
|
`;
|
|
130
|
+
|
|
131
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
130
132
|
export const Wrapper = styled.div`
|
|
131
133
|
${props => wrapperStyles(props)};
|
|
132
134
|
margin-top: 10px;
|
|
@@ -239,7 +241,8 @@ export const ContentWrapper = styled.div`
|
|
|
239
241
|
display: flex;
|
|
240
242
|
flex-direction: row;
|
|
241
243
|
box-sizing: border-box;
|
|
242
|
-
padding: 8px
|
|
244
|
+
padding: ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-150, 12px)"}
|
|
245
|
+
${"var(--ds-space-150, 12px)"} ${"var(--ds-space-150, 12px)"};
|
|
243
246
|
`;
|
|
244
247
|
export const Title = styled.div`
|
|
245
248
|
color: ${`var(--ds-text, ${colors.N900})`};
|
|
@@ -250,13 +253,15 @@ export const Title = styled.div`
|
|
|
250
253
|
overflow: hidden;
|
|
251
254
|
`;
|
|
252
255
|
export const Byline = styled.div`
|
|
253
|
-
margin-top: 4px;
|
|
256
|
+
margin-top: ${"var(--ds-space-050, 4px)"};
|
|
254
257
|
color: ${`var(--ds-text-subtlest, ${colors.N300})`};
|
|
255
258
|
font-size: 12px;
|
|
256
259
|
font-weight: normal;
|
|
257
260
|
line-height: ${16 / 12};
|
|
258
261
|
${ellipsis('100%')};
|
|
259
262
|
`;
|
|
263
|
+
|
|
264
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
260
265
|
export const Description = styled.div`
|
|
261
266
|
margin-top: 7px;
|
|
262
267
|
color: ${`var(--ds-text, ${colors.N800})`};
|
|
@@ -267,13 +272,14 @@ export const Description = styled.div`
|
|
|
267
272
|
overflow: hidden;
|
|
268
273
|
`;
|
|
269
274
|
export const ResolvedViewIconWrapper = styled.div`
|
|
270
|
-
margin-top: 4px;
|
|
275
|
+
margin-top: ${"var(--ds-space-050, 4px)"};
|
|
271
276
|
`;
|
|
272
277
|
export const Thumbnail = styled.div`
|
|
273
278
|
${borderRadius}
|
|
274
279
|
${csssize(48)}
|
|
275
280
|
float: right;
|
|
276
|
-
margin: 4px 0
|
|
281
|
+
margin: ${"var(--ds-space-050, 4px)"} 0 ${"var(--ds-space-150, 12px)"}
|
|
282
|
+
${"var(--ds-space-150, 12px)"};
|
|
277
283
|
background-color: ${`var(--ds-skeleton, ${colors.N30})`};
|
|
278
284
|
background-image: url(${({
|
|
279
285
|
src
|
|
@@ -281,18 +287,18 @@ export const Thumbnail = styled.div`
|
|
|
281
287
|
background-size: cover;
|
|
282
288
|
`;
|
|
283
289
|
export const UsersWrapper = styled.div`
|
|
284
|
-
margin-top: 8px;
|
|
290
|
+
margin-top: ${"var(--ds-space-100, 8px)"};
|
|
285
291
|
`;
|
|
286
292
|
export const ActionsWrapper = styled.div`
|
|
287
|
-
margin-top: 8px;
|
|
293
|
+
margin-top: ${"var(--ds-space-100, 8px)"};
|
|
288
294
|
text-align: right;
|
|
289
295
|
|
|
290
296
|
> * {
|
|
291
|
-
margin-top: 4px;
|
|
297
|
+
margin-top: ${"var(--ds-space-050, 4px)"};
|
|
292
298
|
}
|
|
293
299
|
|
|
294
300
|
> * + * {
|
|
295
|
-
margin-left: 4px;
|
|
301
|
+
margin-left: ${"var(--ds-space-050, 4px)"};
|
|
296
302
|
}
|
|
297
303
|
`;
|
|
298
304
|
export const AlertWrapper = styled.div`
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
2
3
|
export const containerStyles = css`
|
|
3
4
|
align-items: center;
|
|
4
5
|
display: flex;
|
|
5
|
-
gap: 8px;
|
|
6
|
+
gap: ${"var(--ds-space-100, 8px)"};
|
|
6
7
|
justify-content: space-between;
|
|
7
8
|
// AK ModalBody has 2px padding top and bottom.
|
|
8
9
|
// Using 14px here to create 16px gap between
|
|
9
10
|
// link info and iframe
|
|
10
|
-
padding: 24px 24px 14px
|
|
11
|
+
padding: ${"var(--ds-space-300, 24px)"} ${"var(--ds-space-300, 24px)"} 14px
|
|
12
|
+
${"var(--ds-space-300, 24px)"};
|
|
11
13
|
`;
|
|
12
14
|
const iconSize = '24px';
|
|
13
15
|
export const iconCss = css`
|
|
@@ -48,7 +50,7 @@ export const titleCss = css`
|
|
|
48
50
|
export const actionCss = css`
|
|
49
51
|
display: flex;
|
|
50
52
|
flex: 0 0 auto;
|
|
51
|
-
gap: 4px;
|
|
53
|
+
gap: ${"var(--ds-space-050, 4px)"};
|
|
52
54
|
line-height: ${height};
|
|
53
55
|
span {
|
|
54
56
|
line-height: ${height};
|
|
@@ -14,7 +14,7 @@ export const triggerButtonStyles = css`
|
|
|
14
14
|
text-transform: unset;
|
|
15
15
|
|
|
16
16
|
border: 2px solid transparent;
|
|
17
|
-
margin: 2px;
|
|
17
|
+
margin: ${"var(--ds-space-025, 2px)"};
|
|
18
18
|
|
|
19
19
|
&:focus-visible,
|
|
20
20
|
&:focus-within,
|
|
@@ -24,12 +24,16 @@ export const triggerButtonStyles = css`
|
|
|
24
24
|
border-radius: 5px;
|
|
25
25
|
}
|
|
26
26
|
`;
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
27
29
|
export const triggerLozengeStyles = css`
|
|
28
30
|
align-items: center;
|
|
29
31
|
display: flex;
|
|
30
32
|
|
|
31
33
|
span[role='img'] {
|
|
32
|
-
margin: -
|
|
34
|
+
margin: calc(-1 * ${"var(--ds-space-050, 4px)"})
|
|
35
|
+
calc(-1 * ${"var(--ds-space-100, 8px)"})
|
|
36
|
+
calc(-1 * ${"var(--ds-space-050, 4px)"}) -1px;
|
|
33
37
|
}
|
|
34
38
|
`;
|
|
35
39
|
export const dropdownItemGroupStyles = css`
|
|
@@ -37,7 +41,7 @@ export const dropdownItemGroupStyles = css`
|
|
|
37
41
|
overflow-y: auto;
|
|
38
42
|
|
|
39
43
|
button {
|
|
40
|
-
padding: 6px 12px;
|
|
44
|
+
padding: ${"var(--ds-space-075, 6px)"} ${"var(--ds-space-150, 12px)"};
|
|
41
45
|
min-height: 28px;
|
|
42
46
|
width: 220px;
|
|
43
47
|
|
|
@@ -10,7 +10,7 @@ import React from 'react';
|
|
|
10
10
|
export const Icon = styled.img`
|
|
11
11
|
height: 14px;
|
|
12
12
|
width: 14px;
|
|
13
|
-
margin-right: 4px;
|
|
13
|
+
margin-right: ${"var(--ds-space-050, 4px)"};
|
|
14
14
|
border-radius: 2px;
|
|
15
15
|
user-select: none;
|
|
16
16
|
position: absolute;
|
|
@@ -23,7 +23,7 @@ export const Icon = styled.img`
|
|
|
23
23
|
// are less than that in height/width.
|
|
24
24
|
// TODO: Replace this override with proper AtlasKit solution.
|
|
25
25
|
export const AKIconWrapper = styled.span`
|
|
26
|
-
margin-right: -2px;
|
|
26
|
+
margin-right: calc(-1 * ${"var(--ds-space-025, 2px)"});
|
|
27
27
|
`;
|
|
28
28
|
export const Shimmer = ({
|
|
29
29
|
testId
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
|
|
3
2
|
// TODO: remove this override behaviour for @atlaskit/icon-object
|
|
4
3
|
export const IconObjectOverrides = `
|
|
5
4
|
& > span {
|
|
@@ -49,7 +48,7 @@ export const IconWrapper = styled.span`
|
|
|
49
48
|
// Wraps all emoji in Inline Links similar to icon
|
|
50
49
|
export const EmojiWrapper = styled.span`
|
|
51
50
|
display: inline-block;
|
|
52
|
-
margin-right: 2px;
|
|
51
|
+
margin-right: ${"var(--ds-space-025, 2px)"};
|
|
53
52
|
user-select: none;
|
|
54
53
|
${IconOverrides}
|
|
55
54
|
${IconObjectOverrides}
|
|
@@ -71,12 +70,12 @@ export const LozengeWrapper = styled.span`
|
|
|
71
70
|
// TODO: Replace overrides with proper AtlasKit solution.
|
|
72
71
|
export const LozengeBlockWrapper = styled.span`
|
|
73
72
|
& > span {
|
|
74
|
-
margin-left: 4px;
|
|
73
|
+
margin-left: ${"var(--ds-space-050, 4px)"};
|
|
75
74
|
}
|
|
76
75
|
`;
|
|
77
76
|
export const RightIconPositionWrapper = styled.span`
|
|
78
|
-
margin-left: 2px;
|
|
79
|
-
margin-right: 4px;
|
|
77
|
+
margin-left: ${"var(--ds-space-025, 2px)"};
|
|
78
|
+
margin-right: ${"var(--ds-space-050, 4px)"};
|
|
80
79
|
position: relative;
|
|
81
80
|
display: inline-block;
|
|
82
81
|
`;
|
|
@@ -85,7 +84,7 @@ export const RightIconPositionWrapper = styled.span`
|
|
|
85
84
|
// - IconPositionWrapper: the `relative` parent which has no height in itself.
|
|
86
85
|
// - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
|
|
87
86
|
export const IconPositionWrapper = styled.span`
|
|
88
|
-
margin-right: 4px;
|
|
87
|
+
margin-right: ${"var(--ds-space-050, 4px)"};
|
|
89
88
|
position: relative;
|
|
90
89
|
display: inline-block;
|
|
91
90
|
`;
|
package/dist/esm/version.json
CHANGED
|
@@ -27,7 +27,7 @@ import { handleClickCommon } from './utils/handlers';
|
|
|
27
27
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
28
28
|
export { default as PreviewAction } from './actions/PreviewAction';
|
|
29
29
|
export { ForbiddenAction, AuthorizeAction, BlockCardResolvedView, BlockCardResolvingView, BlockCardUnauthorisedView, BlockCardForbiddenView, BlockCardErroredView, BlockCardNotFoundView };
|
|
30
|
-
var flexibleBlockCardElevationStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 1.5px;\n box-shadow: ", ";\n margin:
|
|
30
|
+
var flexibleBlockCardElevationStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 1.5px;\n box-shadow: ", ";\n margin: ", ";\n"])), tokens.elevation, "var(--ds-space-025, 2px)");
|
|
31
31
|
export var BlockCard = function BlockCard(_ref) {
|
|
32
32
|
var _details$meta, _forbiddenViewProps$c;
|
|
33
33
|
var id = _ref.id,
|
|
@@ -58,6 +58,8 @@ function visible(_ref6) {
|
|
|
58
58
|
export var LinkWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", " &:hover {\n text-decoration: none;\n }\n"])), function (props) {
|
|
59
59
|
return wrapperStyles(props);
|
|
60
60
|
});
|
|
61
|
+
|
|
62
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
61
63
|
export var Wrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n margin-top: 10px;\n"])), function (props) {
|
|
62
64
|
return wrapperStyles(props);
|
|
63
65
|
});
|
|
@@ -101,15 +103,17 @@ export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTem
|
|
|
101
103
|
return csssize(size);
|
|
102
104
|
}, borderRadius);
|
|
103
105
|
export var maxAvatarCount = 6;
|
|
104
|
-
export var ContentWrapper = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding:
|
|
106
|
+
export var ContentWrapper = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n padding: ", " ", "\n ", " ", ";\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)");
|
|
105
107
|
export var Title = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N900, ")"), 20 / 16, 20 * 4);
|
|
106
|
-
export var Byline = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top:
|
|
108
|
+
export var Byline = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: ", ";\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), "var(--ds-space-050, 4px)", "var(--ds-text-subtlest, ".concat(colors.N300, ")"), 16 / 12, ellipsis('100%'));
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
107
111
|
export var Description = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N800, ")"), 18 / 12, 18 * 3);
|
|
108
|
-
export var ResolvedViewIconWrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-top:
|
|
109
|
-
export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin:
|
|
112
|
+
export var ResolvedViewIconWrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
113
|
+
export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref13) {
|
|
110
114
|
var src = _ref13.src;
|
|
111
115
|
return src;
|
|
112
116
|
});
|
|
113
|
-
export var UsersWrapper = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-top:
|
|
114
|
-
export var ActionsWrapper = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-top:
|
|
117
|
+
export var UsersWrapper = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
118
|
+
export var ActionsWrapper = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n margin-top: ", ";\n text-align: right;\n\n > * {\n margin-top: ", ";\n }\n\n > * + * {\n margin-left: ", ";\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)", "var(--ds-space-050, 4px)");
|
|
115
119
|
export var AlertWrapper = styled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n pointer-events: none;\n /* z-index has to be 1 higher than the number of avatars in the avatar stack */\n z-index: ", ";\n"])), maxAvatarCount + 1);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
5
|
+
export var containerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n gap: ", ";\n justify-content: space-between;\n // AK ModalBody has 2px padding top and bottom.\n // Using 14px here to create 16px gap between\n // link info and iframe\n padding: ", " ", " 14px\n ", ";\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)");
|
|
5
6
|
var iconSize = '24px';
|
|
6
7
|
export var iconCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n img,\n span,\n svg {\n height: ", ";\n min-height: ", ";\n max-height: ", ";\n width: ", ";\n min-width: ", ";\n max-width: ", ";\n }\n"])), iconSize, iconSize, iconSize, iconSize, iconSize, iconSize);
|
|
7
8
|
var height = '20px';
|
|
8
9
|
export var titleCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n\n h3 {\n flex: 1 1 auto;\n font-size: 16px;\n font-weight: 400;\n line-height: ", ";\n\n display: -webkit-box;\n margin-bottom: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n // Fallback options\n @supports not (-webkit-line-clamp: 1) {\n max-height: ", ";\n }\n }\n"])), height, height);
|
|
9
|
-
export var actionCss = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex: 0 0 auto;\n gap:
|
|
10
|
+
export var actionCss = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex: 0 0 auto;\n gap: ", ";\n line-height: ", ";\n span {\n line-height: ", ";\n }\n\n @media only screen and (max-width: 980px) {\n // Hide resize button if the screen is smaller than the min width\n // or too small to have enough impact to matter.\n .smart-link-resize-button {\n display: none;\n }\n }\n"])), "var(--ds-space-050, 4px)", height, height);
|
package/dist/esm/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js
CHANGED
|
@@ -6,6 +6,8 @@ import { getTruncateStyles } from '../../../utils';
|
|
|
6
6
|
export var dropdownItemGroupStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n button {\n width: 220px;\n\n &:hover {\n background-color: inherit;\n cursor: default;\n }\n }\n"])));
|
|
7
7
|
var sharedBlockStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n gap: 0.5rem;\n line-height: 1rem;\n min-width: 0;\n overflow: hidden;\n flex-direction: row;\n align-items: center;\n"])));
|
|
8
8
|
export var contentStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", ";\n\n margin-top: ", ";\n align-items: flex-start;\n\n > span,\n > div {\n font-size: 0.875rem;\n line-height: 1.25rem;\n color: ", ";\n }\n"])), sharedBlockStyles, "var(--ds-space-025, 2px)", "var(--ds-text, ".concat(N800, ")"));
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
9
11
|
export var linkStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n\n cursor: pointer;\n font-size: 0.875rem;\n margin-top: 10px;\n margin-left: ", ";\n margin-bottom: ", ";\n"])), sharedBlockStyles, "var(--ds-space-400, 32px)", "var(--ds-space-025, 2px)");
|
|
10
12
|
export var textStyles = function textStyles(maxLines) {
|
|
11
13
|
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n line-height: 1rem;\n white-space: normal;\n ", ";\n"])), getTruncateStyles(maxLines));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
export var triggerButtonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n all: unset;\n background-color: transparent;\n color: unset;\n cursor: pointer;\n font-family: unset;\n font-size: unset;\n font-style: unset;\n font-weight: unset;\n font-variant: unset;\n line-height: 0;\n padding: 0;\n text-transform: unset;\n\n border: 2px solid transparent;\n margin:
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export var triggerButtonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n all: unset;\n background-color: transparent;\n color: unset;\n cursor: pointer;\n font-family: unset;\n font-size: unset;\n font-style: unset;\n font-weight: unset;\n font-variant: unset;\n line-height: 0;\n padding: 0;\n text-transform: unset;\n\n border: 2px solid transparent;\n margin: ", ";\n\n &:focus-visible,\n &:focus-within,\n &[aria-expanded='true'] {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n border-radius: 5px;\n }\n"])), "var(--ds-space-025, 2px)", "var(--ds-border-focused, #388BFF)");
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
7
|
+
export var triggerLozengeStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n\n span[role='img'] {\n margin: calc(-1 * ", ")\n calc(-1 * ", ")\n calc(-1 * ", ") -1px;\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)");
|
|
8
|
+
export var dropdownItemGroupStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n max-height: 300px;\n overflow-y: auto;\n\n button {\n padding: ", " ", ";\n min-height: 28px;\n width: 220px;\n\n &:hover {\n background-color: inherit;\n }\n\n &:focus,\n &:focus-visible {\n background-color: ", ";\n box-sizing: border-box;\n box-shadow: inset 2px 0 0 ", ";\n outline: none;\n }\n }\n"])), "var(--ds-space-075, 6px)", "var(--ds-space-150, 12px)", "var(--ds-background-neutral-subtle-hovered, #091E420F)", "var(--ds-border-selected, #0C66E4)");
|
|
@@ -11,7 +11,7 @@ import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
|
11
11
|
import LayeredLink from './layered-link';
|
|
12
12
|
import { HoverCard } from '../../../HoverCard';
|
|
13
13
|
import { isFlexUiPreviewPresent } from '../../../../state/flexible-ui-context/utils';
|
|
14
|
-
var elevationStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid transparent;\n border-radius: 1.5px;\n box-shadow: ", ";\n margin:
|
|
14
|
+
var elevationStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid transparent;\n border-radius: 1.5px;\n box-shadow: ", ";\n margin: ", ";\n"])), tokens.elevation, "var(--ds-space-025, 2px)");
|
|
15
15
|
var getGap = function getGap(size) {
|
|
16
16
|
switch (size) {
|
|
17
17
|
case SmartLinkSize.XLarge:
|
|
@@ -9,12 +9,12 @@ import React from 'react';
|
|
|
9
9
|
// Current rationale: vertically positioned at the top of
|
|
10
10
|
// the smart card container (when set to 0). Offset this
|
|
11
11
|
// to position it with appropriate whitespace from the top.
|
|
12
|
-
export var Icon = styled.img(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 14px;\n width: 14px;\n margin-right:
|
|
12
|
+
export var Icon = styled.img(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 14px;\n width: 14px;\n margin-right: ", ";\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])), "var(--ds-space-050, 4px)");
|
|
13
13
|
|
|
14
14
|
// Used for 'untrue' icons which claim to be 16x16 but
|
|
15
15
|
// are less than that in height/width.
|
|
16
16
|
// TODO: Replace this override with proper AtlasKit solution.
|
|
17
|
-
export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: -
|
|
17
|
+
export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
|
|
18
18
|
export var Shimmer = function Shimmer(_ref) {
|
|
19
19
|
var testId = _ref.testId;
|
|
20
20
|
var skeletonCustomStyles = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
|
|
5
4
|
// TODO: remove this override behaviour for @atlaskit/icon-object
|
|
6
5
|
export var IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n line-height: 14px;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
|
|
7
6
|
// TODO: remove this override behaviour for @atlaskit/icon
|
|
@@ -16,7 +15,7 @@ export var IconOverrides = "\n & > * > span {\n height: 16px;\n width: 14
|
|
|
16
15
|
export var IconWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n user-select: none;\n ", "\n ", "\n"])), IconOverrides, IconObjectOverrides);
|
|
17
16
|
|
|
18
17
|
// Wraps all emoji in Inline Links similar to icon
|
|
19
|
-
export var EmojiWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n margin-right:
|
|
18
|
+
export var EmojiWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n margin-right: ", ";\n user-select: none;\n ", "\n ", "\n"])), "var(--ds-space-025, 2px)", IconOverrides, IconObjectOverrides);
|
|
20
19
|
|
|
21
20
|
// The main 'wrapping' element, title of the content.
|
|
22
21
|
// NB: `white-space` adds little whitespace before wrapping.
|
|
@@ -26,13 +25,13 @@ export var IconTitleWrapper = styled.span(_templateObject3 || (_templateObject3
|
|
|
26
25
|
// TODO: Replace overrides with proper AtlasKit solution.
|
|
27
26
|
export var LozengeWrapper = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: 1px;\n"])));
|
|
28
27
|
// TODO: Replace overrides with proper AtlasKit solution.
|
|
29
|
-
export var LozengeBlockWrapper = styled.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n & > span {\n margin-left:
|
|
30
|
-
export var RightIconPositionWrapper = styled.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left:
|
|
28
|
+
export var LozengeBlockWrapper = styled.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n & > span {\n margin-left: ", ";\n }\n"])), "var(--ds-space-050, 4px)");
|
|
29
|
+
export var RightIconPositionWrapper = styled.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: ", ";\n margin-right: ", ";\n position: relative;\n display: inline-block;\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)");
|
|
31
30
|
|
|
32
31
|
// The following components are used to absolutely position icons in the vertical center.
|
|
33
32
|
// - IconPositionWrapper: the `relative` parent which has no height in itself.
|
|
34
33
|
// - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
|
|
35
|
-
export var IconPositionWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right:
|
|
34
|
+
export var IconPositionWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: ", ";\n position: relative;\n display: inline-block;\n"])), "var(--ds-space-050, 4px)");
|
|
36
35
|
export var IconEmptyWrapper = styled.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 14px;\n height: 100%;\n display: inline-block;\n opacity: 0;\n"])));
|
|
37
36
|
|
|
38
37
|
// With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
|
|
@@ -2,4 +2,4 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { IconTitleWrapper } from '../IconAndTitleLayout/styled';
|
|
5
|
-
export var SpinnerWrapper = styled(IconTitleWrapper)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n vertical-align: text-top;\n margin-left:
|
|
5
|
+
export var SpinnerWrapper = styled(IconTitleWrapper)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n vertical-align: text-top;\n margin-left: ", ";\n"])), "var(--ds-space-025, 2px)");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.3.
|
|
3
|
+
"version": "26.3.4",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@atlaskit/radio": "^5.6.0",
|
|
94
94
|
"@atlaskit/range": "^7.1.0",
|
|
95
95
|
"@atlaskit/section-message": "^6.4.0",
|
|
96
|
-
"@atlaskit/select": "^16.
|
|
96
|
+
"@atlaskit/select": "^16.3.0",
|
|
97
97
|
"@atlaskit/table-tree": "^9.4.0",
|
|
98
98
|
"@atlaskit/tabs": "^13.4.0",
|
|
99
99
|
"@atlaskit/textarea": "^4.6.0",
|
|
@@ -150,7 +150,8 @@
|
|
|
150
150
|
"techstack": {
|
|
151
151
|
"@repo/internal": {
|
|
152
152
|
"design-tokens": [
|
|
153
|
-
"color"
|
|
153
|
+
"color",
|
|
154
|
+
"spacing"
|
|
154
155
|
]
|
|
155
156
|
}
|
|
156
157
|
}
|