@atlaskit/smart-card 21.0.3 → 21.0.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/FlexibleCard/components/blocks/block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +4 -2
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +11 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +2 -1
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 21.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4347099f4ba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4347099f4ba) - [ux] Blue highlight is removed for when a user right-clicks on a Flex UI Smart Link
|
|
8
|
+
|
|
3
9
|
## 21.0.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -20,7 +20,7 @@ var _utils = require("../utils");
|
|
|
20
20
|
var _templateObject;
|
|
21
21
|
|
|
22
22
|
var getBlockStyles = function getBlockStyles(direction, size) {
|
|
23
|
-
return (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n justify-content: flex-start;\n [data-separator] + [data-separator]:before {\n content: '\u2022';\n margin-right: ", "rem;\n }\n // Pull request elements: source branch \u2192 target branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2192';\n }\n // Pull request elements: target branch \u2190 source branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2190';\n }\n"])), (0, _utils.getBaseStyles)(direction, size), (0, _utils.getGapSize)(size), _constants.ElementName.SourceBranch, _constants.ElementName.TargetBranch, _constants.ElementName.TargetBranch, _constants.ElementName.SourceBranch);
|
|
23
|
+
return (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n justify-content: flex-start;\n [data-separator] + [data-separator]:before {\n content: '\u2022';\n margin-right: ", "rem;\n }\n // Pull request elements: source branch \u2192 target branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2192';\n }\n // Pull request elements: target branch \u2190 source branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2190';\n }\n"])), (0, _utils.getBaseStyles)(direction, size), _utils.highlightRemoveStyles, (0, _utils.getGapSize)(size), _constants.ElementName.SourceBranch, _constants.ElementName.TargetBranch, _constants.ElementName.TargetBranch, _constants.ElementName.SourceBranch);
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* A block represents a collection of elements and actions that are arranged
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.renderElementItems = exports.renderChildren = exports.renderActionItems = exports.getGapSize = exports.getBaseStyles = exports.ElementDisplaySchema = void 0;
|
|
10
|
+
exports.renderElementItems = exports.renderChildren = exports.renderActionItems = exports.highlightRemoveStyles = exports.getGapSize = exports.getBaseStyles = exports.ElementDisplaySchema = void 0;
|
|
11
11
|
|
|
12
12
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
13
|
|
|
@@ -38,7 +38,7 @@ var _elementGroup = _interopRequireDefault(require("./element-group"));
|
|
|
38
38
|
var _excluded = ["name"],
|
|
39
39
|
_excluded2 = ["name", "hideContent", "hideIcon", "onClick"];
|
|
40
40
|
|
|
41
|
-
var _ElementDisplaySchema, _templateObject, _templateObject2, _templateObject3;
|
|
41
|
+
var _ElementDisplaySchema, _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
42
42
|
|
|
43
43
|
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); }
|
|
44
44
|
|
|
@@ -86,6 +86,8 @@ var getBaseStyles = function getBaseStyles(direction, size) {
|
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
exports.getBaseStyles = getBaseStyles;
|
|
89
|
+
var highlightRemoveStyles = (0, _core.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n outline: none !important;\n outline-color: inherit;\n color: inherit;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n"])));
|
|
90
|
+
exports.highlightRemoveStyles = highlightRemoveStyles;
|
|
89
91
|
|
|
90
92
|
var isActionGroup = function isActionGroup(node) {
|
|
91
93
|
return /*#__PURE__*/_react.default.isValidElement(node) && node.type === _actionGroup.default;
|
package/dist/es2019/version.json
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/core';
|
|
4
4
|
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
5
|
-
import { getBaseStyles, getGapSize, renderChildren } from '../utils';
|
|
5
|
+
import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
|
|
6
6
|
|
|
7
7
|
const getBlockStyles = (direction, size) => css`
|
|
8
8
|
${getBaseStyles(direction, size)}
|
|
9
|
+
${highlightRemoveStyles}
|
|
9
10
|
justify-content: flex-start;
|
|
10
11
|
[data-separator] + [data-separator]:before {
|
|
11
12
|
content: '•';
|
|
@@ -84,6 +84,17 @@ export const getBaseStyles = (direction, size) => css`
|
|
|
84
84
|
min-width: fit-content;
|
|
85
85
|
}
|
|
86
86
|
`;
|
|
87
|
+
export const highlightRemoveStyles = css`
|
|
88
|
+
outline: none !important;
|
|
89
|
+
outline-color: inherit;
|
|
90
|
+
color: inherit;
|
|
91
|
+
-webkit-tap-highlight-color: transparent;
|
|
92
|
+
-webkit-touch-callout: none;
|
|
93
|
+
-webkit-user-select: none;
|
|
94
|
+
-moz-user-select: none;
|
|
95
|
+
-ms-user-select: none;
|
|
96
|
+
user-select: none;
|
|
97
|
+
`;
|
|
87
98
|
|
|
88
99
|
const isActionGroup = node => /*#__PURE__*/React.isValidElement(node) && node.type === ActionGroup;
|
|
89
100
|
|
package/dist/esm/version.json
CHANGED
|
@@ -6,10 +6,10 @@ var _templateObject;
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { css, jsx } from '@emotion/core';
|
|
8
8
|
import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
|
|
9
|
-
import { getBaseStyles, getGapSize, renderChildren } from '../utils';
|
|
9
|
+
import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
|
|
10
10
|
|
|
11
11
|
var getBlockStyles = function getBlockStyles(direction, size) {
|
|
12
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n justify-content: flex-start;\n [data-separator] + [data-separator]:before {\n content: '\u2022';\n margin-right: ", "rem;\n }\n // Pull request elements: source branch \u2192 target branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2192';\n }\n // Pull request elements: target branch \u2190 source branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2190';\n }\n"])), getBaseStyles(direction, size), getGapSize(size), ElementName.SourceBranch, ElementName.TargetBranch, ElementName.TargetBranch, ElementName.SourceBranch);
|
|
12
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n justify-content: flex-start;\n [data-separator] + [data-separator]:before {\n content: '\u2022';\n margin-right: ", "rem;\n }\n // Pull request elements: source branch \u2192 target branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2192';\n }\n // Pull request elements: target branch \u2190 source branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2190';\n }\n"])), getBaseStyles(direction, size), highlightRemoveStyles, getGapSize(size), ElementName.SourceBranch, ElementName.TargetBranch, ElementName.TargetBranch, ElementName.SourceBranch);
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* A block represents a collection of elements and actions that are arranged
|
|
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
6
6
|
var _excluded = ["name"],
|
|
7
7
|
_excluded2 = ["name", "hideContent", "hideIcon", "onClick"];
|
|
8
8
|
|
|
9
|
-
var _ElementDisplaySchema, _templateObject, _templateObject2, _templateObject3;
|
|
9
|
+
var _ElementDisplaySchema, _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
10
10
|
|
|
11
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
12
|
|
|
@@ -52,6 +52,7 @@ export var getGapSize = function getGapSize(size) {
|
|
|
52
52
|
export var getBaseStyles = function getBaseStyles(direction, size) {
|
|
53
53
|
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n gap: ", "rem;\n line-height: 1rem;\n min-width: 0;\n overflow: hidden;\n ", ";\n &:empty {\n display: none;\n }\n & > * {\n min-width: 0;\n }\n & > [data-fit-to-content] {\n min-width: fit-content;\n }\n"])), getGapSize(size), getDirectionStyles(direction));
|
|
54
54
|
};
|
|
55
|
+
export var highlightRemoveStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n outline: none !important;\n outline-color: inherit;\n color: inherit;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n"])));
|
|
55
56
|
|
|
56
57
|
var isActionGroup = function isActionGroup(node) {
|
|
57
58
|
return /*#__PURE__*/React.isValidElement(node) && node.type === ActionGroup;
|
|
@@ -7,6 +7,7 @@ export declare type ElementDisplaySchemaType = 'inline' | 'block';
|
|
|
7
7
|
export declare const ElementDisplaySchema: Record<ElementName, ElementDisplaySchemaType[]>;
|
|
8
8
|
export declare const getGapSize: (size: SmartLinkSize) => number;
|
|
9
9
|
export declare const getBaseStyles: (direction: SmartLinkDirection, size: SmartLinkSize) => SerializedStyles;
|
|
10
|
+
export declare const highlightRemoveStyles: SerializedStyles;
|
|
10
11
|
export declare const renderChildren: (children: React.ReactNode, size: SmartLinkSize) => React.ReactNode;
|
|
11
12
|
export declare const renderElementItems: (items?: ElementItem[], display?: ElementDisplaySchemaType) => React.ReactNode | undefined;
|
|
12
13
|
export declare const renderActionItems: (items?: ActionItem[], size?: SmartLinkSize, appearance?: Appearance | undefined, asDropDownItems?: boolean | undefined, onActionItemClick?: (() => void) | undefined) => React.ReactNode | undefined;
|