@atlaskit/smart-card 43.20.8 → 43.21.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 +14 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +4 -4
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +3 -6
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +16 -7
- package/dist/cjs/view/FlexibleCard/external.js +5 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +4 -4
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +4 -7
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +15 -6
- package/dist/es2019/view/FlexibleCard/external.js +4 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +4 -4
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +3 -6
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +16 -7
- package/dist/esm/view/FlexibleCard/external.js +5 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +2 -6
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/type.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/external.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +2 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/type.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +3 -2
- package/package.json +7 -7
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
- /package/dist/es2019/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
- /package/dist/esm/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1dbb521f75d85`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1dbb521f75d85) -
|
|
8
|
+
[ux] Add maxWidth prop to FlexibleCard's State Lozenge, behind fg
|
|
9
|
+
platform_navx_sl_lozenge_max_width.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`451616e6c693d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/451616e6c693d) -
|
|
14
|
+
NAVX-3137 cleaning up navx-2185-smart-link-preview-modal-icon-role
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 43.20.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:4febc55bef67ab94fd67fbe34afb8efbe728b81605ec537fb8b97cc66f78780e
|
|
3
|
+
size 8404
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:fd4ce1e874bb5cef90c294ea4d3c15691e816b1077d7309a1cbebd588cbc838b
|
|
3
|
+
size 69991
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:37e1a1a35f2fa0001447c300169b583c490e89a4d27f6b1e605ec516889b8deb
|
|
3
|
+
size 70441
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "43.20.
|
|
14
|
+
packageVersion: "43.20.8"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -82,8 +82,8 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
82
82
|
label: _messages.messages.viewOriginal,
|
|
83
83
|
onClick: onViewButtonClick,
|
|
84
84
|
testId: "".concat(testId, "-url"),
|
|
85
|
-
role:
|
|
86
|
-
"aria-label":
|
|
85
|
+
role: 'link',
|
|
86
|
+
"aria-label": _messages.messages.viewOriginal
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -187,8 +187,8 @@ var LinkInfoNew = function LinkInfoNew(_ref2) {
|
|
|
187
187
|
label: _messages.messages.viewOriginal,
|
|
188
188
|
onClick: onViewButtonClick,
|
|
189
189
|
testId: "".concat(testId, "-url"),
|
|
190
|
-
role:
|
|
191
|
-
"aria-label":
|
|
190
|
+
role: 'link',
|
|
191
|
+
"aria-label": _messages.messages.viewOriginal
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _reactIntlNext = require("react-intl-next");
|
|
11
10
|
var _new = require("@atlaskit/button/new");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
11
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
12
|
var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
|
|
15
13
|
var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
@@ -27,15 +25,14 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
27
25
|
hideTooltipOnClick: true,
|
|
28
26
|
tag: "span",
|
|
29
27
|
testId: "".concat(testId, "-tooltip")
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(_new.IconButton,
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
31
29
|
appearance: "subtle",
|
|
32
30
|
icon: icon,
|
|
33
31
|
label: formatMessage(label),
|
|
34
32
|
onClick: onClick,
|
|
35
33
|
onMouseDown: onMouseDown,
|
|
36
|
-
testId: "".concat(testId, "-button")
|
|
37
|
-
}, (0, _platformFeatureFlags.fg)('navx-2185-smart-link-preview-modal-icon-role') ? {
|
|
34
|
+
testId: "".concat(testId, "-button"),
|
|
38
35
|
role: role
|
|
39
|
-
}
|
|
36
|
+
}));
|
|
40
37
|
};
|
|
41
38
|
var _default = exports.default = LinkInfoButton;
|
|
@@ -28,28 +28,34 @@ var BaseLozengeElement = function BaseLozengeElement(_ref) {
|
|
|
28
28
|
var action = _ref.action,
|
|
29
29
|
_ref$appearance = _ref.appearance,
|
|
30
30
|
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
31
|
-
name = _ref.name,
|
|
32
31
|
className = _ref.className,
|
|
32
|
+
maxWidth = _ref.maxWidth,
|
|
33
|
+
name = _ref.name,
|
|
34
|
+
onAfterChanged = _ref.onAfterChanged,
|
|
33
35
|
style = _ref.style,
|
|
34
36
|
text = _ref.text,
|
|
35
37
|
_ref$testId = _ref.testId,
|
|
36
|
-
testId = _ref$testId === void 0 ? 'smart-element-lozenge' : _ref$testId
|
|
37
|
-
onAfterChanged = _ref.onAfterChanged;
|
|
38
|
+
testId = _ref$testId === void 0 ? 'smart-element-lozenge' : _ref$testId;
|
|
38
39
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
39
40
|
if (!text) {
|
|
40
41
|
return null;
|
|
41
42
|
}
|
|
42
|
-
var lozenge = action ? /*#__PURE__*/React.createElement(_lozengeAction.default, {
|
|
43
|
+
var lozenge = action ? /*#__PURE__*/React.createElement(_lozengeAction.default, (0, _extends2.default)({
|
|
43
44
|
action: action,
|
|
44
|
-
appearance: appearance
|
|
45
|
+
appearance: appearance
|
|
46
|
+
}, (0, _platformFeatureFlags.fg)('platform_navx_sl_lozenge_max_width') ? {
|
|
47
|
+
maxWidth: maxWidth
|
|
48
|
+
} : undefined, {
|
|
45
49
|
testId: testId,
|
|
46
50
|
text: text,
|
|
47
51
|
zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex,
|
|
48
52
|
onAfterChanged: onAfterChanged
|
|
49
|
-
}) : /*#__PURE__*/React.createElement(_lozenge.default, (0, _extends2.default)({
|
|
53
|
+
})) : /*#__PURE__*/React.createElement(_lozenge.default, (0, _extends2.default)({
|
|
50
54
|
appearance: appearance
|
|
51
55
|
}, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? {
|
|
52
56
|
isBold: true
|
|
57
|
+
} : undefined, (0, _platformFeatureFlags.fg)('platform_navx_sl_lozenge_max_width') ? {
|
|
58
|
+
maxWidth: maxWidth
|
|
53
59
|
} : undefined, {
|
|
54
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
55
61
|
style: style,
|
|
@@ -38,6 +38,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
38
38
|
var _action$update;
|
|
39
39
|
var action = _ref.action,
|
|
40
40
|
appearance = _ref.appearance,
|
|
41
|
+
maxWidth = _ref.maxWidth,
|
|
41
42
|
_ref$testId = _ref.testId,
|
|
42
43
|
testId = _ref$testId === void 0 ? 'smart-element-lozenge-action' : _ref$testId,
|
|
43
44
|
text = _ref.text,
|
|
@@ -146,11 +147,14 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
146
147
|
var trigger = (0, _react.useCallback)(function (props) {
|
|
147
148
|
return /*#__PURE__*/_react.default.createElement(_lozengeActionTrigger.default, (0, _extends2.default)({}, props, {
|
|
148
149
|
appearance: selected.appearance,
|
|
149
|
-
isOpen: isOpen
|
|
150
|
+
isOpen: isOpen
|
|
151
|
+
}, (0, _platformFeatureFlags.fg)('platform_navx_sl_lozenge_max_width') ? {
|
|
152
|
+
maxWidth: maxWidth
|
|
153
|
+
} : undefined, {
|
|
150
154
|
testId: testId,
|
|
151
155
|
text: selected.text
|
|
152
156
|
}));
|
|
153
|
-
}, [selected.appearance, selected.text, isOpen, testId]);
|
|
157
|
+
}, [selected.appearance, selected.text, isOpen, maxWidth, testId]);
|
|
154
158
|
var handleItemClick = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
155
159
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id, text, appearance) {
|
|
156
160
|
var updateAction, request;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
14
14
|
._19bvidpf{padding-left:0}
|
|
15
15
|
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
16
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
16
17
|
._1e0c1txw{display:flex}
|
|
17
18
|
._1p1dn7od{text-transform:unset}
|
|
18
19
|
._1q2vglyw[aria-expanded=true]{outline-style:none}
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
._j8b81o36[aria-expanded=true]{outline-width:medium}
|
|
30
31
|
._k48pn7od{font-weight:unset}
|
|
31
32
|
._n3tdidpf{padding-bottom:0}
|
|
33
|
+
._o5721q9c{white-space:nowrap}
|
|
32
34
|
._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
|
|
33
35
|
._p8tl1r31[aria-expanded=true]{outline-color:currentColor}
|
|
34
36
|
._syazn7od{color:unset}
|
|
@@ -21,7 +21,7 @@ var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
|
21
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
22
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
23
|
var _messages = require("../../../../../../../../messages");
|
|
24
|
-
var _excluded = ["appearance", "isOpen", "testId", "text", "triggerRef"];
|
|
24
|
+
var _excluded = ["appearance", "isOpen", "maxWidth", "testId", "text", "triggerRef"];
|
|
25
25
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
26
26
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
27
27
|
var styles = {
|
|
@@ -29,11 +29,13 @@ var styles = {
|
|
|
29
29
|
lozengeContainer: "_kkk2n7od _2rko12b0 _1dqonqa1 _189ee4h9 _1h6d1j28 _bfhk1j28 _1e0c1txw _4cvr1h6o _4t3i7vkz",
|
|
30
30
|
lozengeContainerSelected: "_1reo15vq _18m915vq _1h6d1v1w"
|
|
31
31
|
};
|
|
32
|
+
var textStyles = null;
|
|
32
33
|
var triggerLozengeStyles = null;
|
|
33
34
|
var triggerButtonStyles = null;
|
|
34
35
|
var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
35
36
|
var appearance = _ref.appearance,
|
|
36
37
|
isOpen = _ref.isOpen,
|
|
38
|
+
maxWidth = _ref.maxWidth,
|
|
37
39
|
testId = _ref.testId,
|
|
38
40
|
text = _ref.text,
|
|
39
41
|
triggerRef = _ref.triggerRef,
|
|
@@ -87,18 +89,22 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
87
89
|
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
88
90
|
xcss: (0, _react2.cx)(styles.lozengeContainer, (isOpen || isPressing) && styles.lozengeContainerSelected),
|
|
89
91
|
as: "span"
|
|
90
|
-
}, /*#__PURE__*/React.createElement(_lozenge.default, {
|
|
92
|
+
}, /*#__PURE__*/React.createElement(_lozenge.default, (0, _extends2.default)({
|
|
91
93
|
appearance: appearance,
|
|
92
94
|
isBold: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? true : isHovering
|
|
95
|
+
}, (0, _platformFeatureFlags.fg)('platform_navx_sl_lozenge_max_width') ? {
|
|
96
|
+
maxWidth: maxWidth
|
|
97
|
+
} : undefined, {
|
|
93
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
94
|
-
,
|
|
95
99
|
style: {
|
|
96
100
|
backgroundColor: lozengeBackgroundColor,
|
|
97
101
|
color: lozengeForegroundColor
|
|
98
102
|
}
|
|
99
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
103
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
100
104
|
className: (0, _runtime.ax)(["_4cvr1h6o _1e0c1txw"])
|
|
101
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
105
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
106
|
+
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform_navx_sl_lozenge_max_width') && "_1reo15vq _18m915vq _1bto1l2s _o5721q9c"])
|
|
107
|
+
}, text), /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
102
108
|
as: "span",
|
|
103
109
|
xcss: styles.chevronDown
|
|
104
110
|
}, /*#__PURE__*/React.createElement(_chevronDown.default, {
|
|
@@ -107,12 +113,15 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
107
113
|
size: "small",
|
|
108
114
|
"aria-hidden": true
|
|
109
115
|
})))));
|
|
110
|
-
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
|
|
116
|
+
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor, maxWidth]);
|
|
111
117
|
return /*#__PURE__*/React.createElement("button", (0, _extends2.default)({
|
|
112
118
|
type: "button"
|
|
113
119
|
}, props, {
|
|
114
120
|
"data-action-open": isOpen,
|
|
115
|
-
"data-testid": "".concat(testId, "--trigger")
|
|
121
|
+
"data-testid": "".concat(testId, "--trigger"),
|
|
122
|
+
style: {
|
|
123
|
+
maxWidth: (0, _platformFeatureFlags.fg)('platform_navx_sl_lozenge_max_width') ? maxWidth : undefined
|
|
124
|
+
}
|
|
116
125
|
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
117
126
|
,
|
|
118
127
|
onMouseEnter: onMouseEnter
|
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "CustomUnresolvedAction", {
|
|
|
26
26
|
exports.toActionProps = exports.VoteCountElement = exports.ViewCountElement = exports.UnresolvedAction = exports.TitleElement = exports.TargetBranchElement = exports.SubscriberCountElement = exports.SubTasksProgressElement = exports.StoryPointsElement = exports.StateElement = exports.SourceBranchElement = exports.SnippetElement = exports.SentOnElement = exports.ReadTimeElement = exports.ReactCountElement = exports.ProviderElement = exports.ProgrammingLanguageElement = exports.PriorityElement = exports.PreviewElement = exports.PreviewAction = exports.OwnedByGroupElement = exports.OwnedByElement = exports.ModifiedOnElement = exports.ModifiedByElement = exports.LocationElement = exports.LinkIconElement = exports.LatestCommitElement = exports.FollowAction = exports.DueOnElement = exports.DownloadAction = void 0;
|
|
27
27
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
28
28
|
var _react = _interopRequireDefault(require("react"));
|
|
29
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
29
30
|
var _constants = require("../../constants");
|
|
30
31
|
var _actions = require("./components/actions");
|
|
31
32
|
var _elements = require("./components/elements");
|
|
@@ -144,8 +145,10 @@ var SnippetElement = exports.SnippetElement = function SnippetElement(props) {
|
|
|
144
145
|
var SourceBranchElement = exports.SourceBranchElement = function SourceBranchElement() {
|
|
145
146
|
return /*#__PURE__*/_react.default.createElement(_elements.SourceBranch, null);
|
|
146
147
|
};
|
|
147
|
-
var StateElement = exports.StateElement = function StateElement() {
|
|
148
|
-
return /*#__PURE__*/_react.default.createElement(_elements.State,
|
|
148
|
+
var StateElement = exports.StateElement = function StateElement(props) {
|
|
149
|
+
return /*#__PURE__*/_react.default.createElement(_elements.State, (0, _platformFeatureFlags.fg)('platform_navx_sl_lozenge_max_width') ? {
|
|
150
|
+
maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
|
|
151
|
+
} : undefined);
|
|
149
152
|
};
|
|
150
153
|
var StoryPointsElement = exports.StoryPointsElement = function StoryPointsElement() {
|
|
151
154
|
return /*#__PURE__*/_react.default.createElement(_elements.StoryPoints, null);
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "43.20.
|
|
25
|
+
packageVersion: "43.20.8",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:4febc55bef67ab94fd67fbe34afb8efbe728b81605ec537fb8b97cc66f78780e
|
|
3
|
+
size 8404
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:fd4ce1e874bb5cef90c294ea4d3c15691e816b1077d7309a1cbebd588cbc838b
|
|
3
|
+
size 69991
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:37e1a1a35f2fa0001447c300169b583c490e89a4d27f6b1e605ec516889b8deb
|
|
3
|
+
size 70441
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "43.20.
|
|
5
|
+
packageVersion: "43.20.8"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -72,8 +72,8 @@ const LinkInfo = ({
|
|
|
72
72
|
label: messages.viewOriginal,
|
|
73
73
|
onClick: onViewButtonClick,
|
|
74
74
|
testId: `${testId}-url`,
|
|
75
|
-
role:
|
|
76
|
-
"aria-label":
|
|
75
|
+
role: 'link',
|
|
76
|
+
"aria-label": messages.viewOriginal
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -172,8 +172,8 @@ const LinkInfoNew = ({
|
|
|
172
172
|
label: messages.viewOriginal,
|
|
173
173
|
onClick: onViewButtonClick,
|
|
174
174
|
testId: `${testId}-url`,
|
|
175
|
-
role:
|
|
176
|
-
"aria-label":
|
|
175
|
+
role: 'link',
|
|
176
|
+
"aria-label": messages.viewOriginal
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { useIntl } from 'react-intl-next';
|
|
4
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
5
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
8
6
|
const LinkInfoButton = ({
|
|
@@ -22,15 +20,14 @@ const LinkInfoButton = ({
|
|
|
22
20
|
hideTooltipOnClick: true,
|
|
23
21
|
tag: "span",
|
|
24
22
|
testId: `${testId}-tooltip`
|
|
25
|
-
}, /*#__PURE__*/React.createElement(IconButton,
|
|
23
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
26
24
|
appearance: "subtle",
|
|
27
25
|
icon: icon,
|
|
28
26
|
label: formatMessage(label),
|
|
29
27
|
onClick: onClick,
|
|
30
28
|
onMouseDown: onMouseDown,
|
|
31
|
-
testId: `${testId}-button
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} : {})));
|
|
29
|
+
testId: `${testId}-button`,
|
|
30
|
+
role: role
|
|
31
|
+
}));
|
|
35
32
|
};
|
|
36
33
|
export default LinkInfoButton;
|
package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js
CHANGED
|
@@ -18,28 +18,34 @@ const styles = null;
|
|
|
18
18
|
const BaseLozengeElement = ({
|
|
19
19
|
action,
|
|
20
20
|
appearance = 'default',
|
|
21
|
-
name,
|
|
22
21
|
className,
|
|
22
|
+
maxWidth,
|
|
23
|
+
name,
|
|
24
|
+
onAfterChanged,
|
|
23
25
|
style,
|
|
24
26
|
text,
|
|
25
|
-
testId = 'smart-element-lozenge'
|
|
26
|
-
onAfterChanged
|
|
27
|
+
testId = 'smart-element-lozenge'
|
|
27
28
|
}) => {
|
|
28
29
|
const ui = useFlexibleUiOptionContext();
|
|
29
30
|
if (!text) {
|
|
30
31
|
return null;
|
|
31
32
|
}
|
|
32
|
-
const lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, {
|
|
33
|
+
const lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, _extends({
|
|
33
34
|
action: action,
|
|
34
|
-
appearance: appearance
|
|
35
|
+
appearance: appearance
|
|
36
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
37
|
+
maxWidth
|
|
38
|
+
} : undefined, {
|
|
35
39
|
testId: testId,
|
|
36
40
|
text: text,
|
|
37
41
|
zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex,
|
|
38
42
|
onAfterChanged: onAfterChanged
|
|
39
|
-
}) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
|
|
43
|
+
})) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
|
|
40
44
|
appearance: appearance
|
|
41
45
|
}, fg('platform-component-visual-refresh') ? {
|
|
42
46
|
isBold: true
|
|
47
|
+
} : undefined, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
48
|
+
maxWidth
|
|
43
49
|
} : undefined, {
|
|
44
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
45
51
|
style: style,
|
|
@@ -21,6 +21,7 @@ const validateItems = (items = [], text) => {
|
|
|
21
21
|
const LozengeAction = ({
|
|
22
22
|
action,
|
|
23
23
|
appearance,
|
|
24
|
+
maxWidth,
|
|
24
25
|
testId = 'smart-element-lozenge-action',
|
|
25
26
|
text,
|
|
26
27
|
zIndex,
|
|
@@ -86,10 +87,13 @@ const LozengeAction = ({
|
|
|
86
87
|
}, [action.read, invoke, isLoaded, text, fireEvent]);
|
|
87
88
|
const trigger = useCallback(props => /*#__PURE__*/React.createElement(LozengeActionTrigger, _extends({}, props, {
|
|
88
89
|
appearance: selected.appearance,
|
|
89
|
-
isOpen: isOpen
|
|
90
|
+
isOpen: isOpen
|
|
91
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
92
|
+
maxWidth
|
|
93
|
+
} : undefined, {
|
|
90
94
|
testId: testId,
|
|
91
95
|
text: selected.text
|
|
92
|
-
})), [selected.appearance, selected.text, isOpen, testId]);
|
|
96
|
+
})), [selected.appearance, selected.text, isOpen, maxWidth, testId]);
|
|
93
97
|
const handleItemClick = useCallback(async (id, text, appearance) => {
|
|
94
98
|
try {
|
|
95
99
|
fireEvent('ui.button.clicked.smartLinkStatusListItem', {});
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
14
14
|
._19bvidpf{padding-left:0}
|
|
15
15
|
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
16
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
16
17
|
._1e0c1txw{display:flex}
|
|
17
18
|
._1p1dn7od{text-transform:unset}
|
|
18
19
|
._1q2vglyw[aria-expanded=true]{outline-style:none}
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
._j8b81o36[aria-expanded=true]{outline-width:medium}
|
|
30
31
|
._k48pn7od{font-weight:unset}
|
|
31
32
|
._n3tdidpf{padding-bottom:0}
|
|
33
|
+
._o5721q9c{white-space:nowrap}
|
|
32
34
|
._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
|
|
33
35
|
._p8tl1r31[aria-expanded=true]{outline-color:currentColor}
|
|
34
36
|
._syazn7od{color:unset}
|
|
@@ -18,11 +18,13 @@ const styles = {
|
|
|
18
18
|
lozengeContainer: "_kkk2n7od _2rko12b0 _1dqonqa1 _189ee4h9 _1h6d1j28 _bfhk1j28 _1e0c1txw _4cvr1h6o _4t3i7vkz",
|
|
19
19
|
lozengeContainerSelected: "_1reo15vq _18m915vq _1h6d1v1w"
|
|
20
20
|
};
|
|
21
|
+
const textStyles = null;
|
|
21
22
|
const triggerLozengeStyles = null;
|
|
22
23
|
const triggerButtonStyles = null;
|
|
23
24
|
const LozengeActionTrigger = ({
|
|
24
25
|
appearance,
|
|
25
26
|
isOpen,
|
|
27
|
+
maxWidth,
|
|
26
28
|
testId,
|
|
27
29
|
text,
|
|
28
30
|
triggerRef,
|
|
@@ -57,18 +59,22 @@ const LozengeActionTrigger = ({
|
|
|
57
59
|
return /*#__PURE__*/React.createElement(Box, {
|
|
58
60
|
xcss: cx(styles.lozengeContainer, (isOpen || isPressing) && styles.lozengeContainerSelected),
|
|
59
61
|
as: "span"
|
|
60
|
-
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Lozenge, _extends({
|
|
61
63
|
appearance: appearance,
|
|
62
64
|
isBold: fg('platform-component-visual-refresh') ? true : isHovering
|
|
65
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
66
|
+
maxWidth
|
|
67
|
+
} : undefined, {
|
|
63
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
64
|
-
,
|
|
65
69
|
style: {
|
|
66
70
|
backgroundColor: lozengeBackgroundColor,
|
|
67
71
|
color: lozengeForegroundColor
|
|
68
72
|
}
|
|
69
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
73
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
70
74
|
className: ax(["_4cvr1h6o _1e0c1txw"])
|
|
71
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
75
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
76
|
+
className: ax([fg('platform_navx_sl_lozenge_max_width') && "_1reo15vq _18m915vq _1bto1l2s _o5721q9c"])
|
|
77
|
+
}, text), /*#__PURE__*/React.createElement(Box, {
|
|
72
78
|
as: "span",
|
|
73
79
|
xcss: styles.chevronDown
|
|
74
80
|
}, /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
@@ -77,12 +83,15 @@ const LozengeActionTrigger = ({
|
|
|
77
83
|
size: "small",
|
|
78
84
|
"aria-hidden": true
|
|
79
85
|
})))));
|
|
80
|
-
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
|
|
86
|
+
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor, maxWidth]);
|
|
81
87
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
82
88
|
type: "button"
|
|
83
89
|
}, props, {
|
|
84
90
|
"data-action-open": isOpen,
|
|
85
|
-
"data-testid": `${testId}--trigger
|
|
91
|
+
"data-testid": `${testId}--trigger`,
|
|
92
|
+
style: {
|
|
93
|
+
maxWidth: fg('platform_navx_sl_lozenge_max_width') ? maxWidth : undefined
|
|
94
|
+
}
|
|
86
95
|
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
87
96
|
,
|
|
88
97
|
onMouseEnter: onMouseEnter
|
|
@@ -8,6 +8,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
8
8
|
* DO NOT add a new prop to these components until we are ready to support it externally.
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { SmartLinkSize } from '../../constants';
|
|
12
13
|
import { CopyLinkAction as CopyLinkActionComponent, CustomAction as CustomActionComponent, DownloadAction as DownloadActionComponent, FollowAction as FollowActionComponent, PreviewAction as PreviewActionComponent, UnresolvedAction as UnresolvedActionComponent } from './components/actions';
|
|
13
14
|
import { AssignedTo, AssignedToGroup, AttachmentCount, AuthorGroup, ChecklistProgress, CollaboratorGroup, CommentCount, CreatedBy, CreatedOn, DueOn, LatestCommit, LinkIcon, Location, ModifiedBy, ModifiedOn, OwnedBy, OwnedByGroup, Preview, Priority, ProgrammingLanguage, Provider, ReactCount, ReadTime, SentOn, Snippet, SourceBranch, State, StoryPoints, SubscriberCount, SubTasksProgress, TargetBranch, Title, ViewCount, VoteCount } from './components/elements';
|
|
@@ -80,7 +81,9 @@ export const SnippetElement = props => /*#__PURE__*/React.createElement(Snippet,
|
|
|
80
81
|
content: props === null || props === void 0 ? void 0 : props.text
|
|
81
82
|
});
|
|
82
83
|
export const SourceBranchElement = () => /*#__PURE__*/React.createElement(SourceBranch, null);
|
|
83
|
-
export const StateElement =
|
|
84
|
+
export const StateElement = props => /*#__PURE__*/React.createElement(State, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
85
|
+
maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
|
|
86
|
+
} : undefined);
|
|
84
87
|
export const StoryPointsElement = () => /*#__PURE__*/React.createElement(StoryPoints, null);
|
|
85
88
|
export const SubscriberCountElement = () => /*#__PURE__*/React.createElement(SubscriberCount, null);
|
|
86
89
|
export const SubTasksProgressElement = () => /*#__PURE__*/React.createElement(SubTasksProgress, null);
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "43.20.
|
|
15
|
+
packageVersion: "43.20.8",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:4febc55bef67ab94fd67fbe34afb8efbe728b81605ec537fb8b97cc66f78780e
|
|
3
|
+
size 8404
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:fd4ce1e874bb5cef90c294ea4d3c15691e816b1077d7309a1cbebd588cbc838b
|
|
3
|
+
size 69991
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:37e1a1a35f2fa0001447c300169b583c490e89a4d27f6b1e605ec516889b8deb
|
|
3
|
+
size 70441
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "43.20.
|
|
7
|
+
packageVersion: "43.20.8"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -73,8 +73,8 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
73
73
|
label: messages.viewOriginal,
|
|
74
74
|
onClick: onViewButtonClick,
|
|
75
75
|
testId: "".concat(testId, "-url"),
|
|
76
|
-
role:
|
|
77
|
-
"aria-label":
|
|
76
|
+
role: 'link',
|
|
77
|
+
"aria-label": messages.viewOriginal
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -178,8 +178,8 @@ var LinkInfoNew = function LinkInfoNew(_ref2) {
|
|
|
178
178
|
label: messages.viewOriginal,
|
|
179
179
|
onClick: onViewButtonClick,
|
|
180
180
|
testId: "".concat(testId, "-url"),
|
|
181
|
-
role:
|
|
182
|
-
"aria-label":
|
|
181
|
+
role: 'link',
|
|
182
|
+
"aria-label": messages.viewOriginal
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
}, [onViewButtonClick, providerName, testId]);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { useIntl } from 'react-intl-next';
|
|
4
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
5
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
8
6
|
var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
@@ -20,15 +18,14 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
20
18
|
hideTooltipOnClick: true,
|
|
21
19
|
tag: "span",
|
|
22
20
|
testId: "".concat(testId, "-tooltip")
|
|
23
|
-
}, /*#__PURE__*/React.createElement(IconButton,
|
|
21
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
24
22
|
appearance: "subtle",
|
|
25
23
|
icon: icon,
|
|
26
24
|
label: formatMessage(label),
|
|
27
25
|
onClick: onClick,
|
|
28
26
|
onMouseDown: onMouseDown,
|
|
29
|
-
testId: "".concat(testId, "-button")
|
|
30
|
-
}, fg('navx-2185-smart-link-preview-modal-icon-role') ? {
|
|
27
|
+
testId: "".concat(testId, "-button"),
|
|
31
28
|
role: role
|
|
32
|
-
}
|
|
29
|
+
}));
|
|
33
30
|
};
|
|
34
31
|
export default LinkInfoButton;
|
|
@@ -19,28 +19,34 @@ var BaseLozengeElement = function BaseLozengeElement(_ref) {
|
|
|
19
19
|
var action = _ref.action,
|
|
20
20
|
_ref$appearance = _ref.appearance,
|
|
21
21
|
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
22
|
-
name = _ref.name,
|
|
23
22
|
className = _ref.className,
|
|
23
|
+
maxWidth = _ref.maxWidth,
|
|
24
|
+
name = _ref.name,
|
|
25
|
+
onAfterChanged = _ref.onAfterChanged,
|
|
24
26
|
style = _ref.style,
|
|
25
27
|
text = _ref.text,
|
|
26
28
|
_ref$testId = _ref.testId,
|
|
27
|
-
testId = _ref$testId === void 0 ? 'smart-element-lozenge' : _ref$testId
|
|
28
|
-
onAfterChanged = _ref.onAfterChanged;
|
|
29
|
+
testId = _ref$testId === void 0 ? 'smart-element-lozenge' : _ref$testId;
|
|
29
30
|
var ui = useFlexibleUiOptionContext();
|
|
30
31
|
if (!text) {
|
|
31
32
|
return null;
|
|
32
33
|
}
|
|
33
|
-
var lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, {
|
|
34
|
+
var lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, _extends({
|
|
34
35
|
action: action,
|
|
35
|
-
appearance: appearance
|
|
36
|
+
appearance: appearance
|
|
37
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
38
|
+
maxWidth: maxWidth
|
|
39
|
+
} : undefined, {
|
|
36
40
|
testId: testId,
|
|
37
41
|
text: text,
|
|
38
42
|
zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex,
|
|
39
43
|
onAfterChanged: onAfterChanged
|
|
40
|
-
}) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
|
|
44
|
+
})) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
|
|
41
45
|
appearance: appearance
|
|
42
46
|
}, fg('platform-component-visual-refresh') ? {
|
|
43
47
|
isBold: true
|
|
48
|
+
} : undefined, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
49
|
+
maxWidth: maxWidth
|
|
44
50
|
} : undefined, {
|
|
45
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
46
52
|
style: style,
|
|
@@ -29,6 +29,7 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
29
29
|
var _action$update;
|
|
30
30
|
var action = _ref.action,
|
|
31
31
|
appearance = _ref.appearance,
|
|
32
|
+
maxWidth = _ref.maxWidth,
|
|
32
33
|
_ref$testId = _ref.testId,
|
|
33
34
|
testId = _ref$testId === void 0 ? 'smart-element-lozenge-action' : _ref$testId,
|
|
34
35
|
text = _ref.text,
|
|
@@ -137,11 +138,14 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
137
138
|
var trigger = useCallback(function (props) {
|
|
138
139
|
return /*#__PURE__*/React.createElement(LozengeActionTrigger, _extends({}, props, {
|
|
139
140
|
appearance: selected.appearance,
|
|
140
|
-
isOpen: isOpen
|
|
141
|
+
isOpen: isOpen
|
|
142
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
143
|
+
maxWidth: maxWidth
|
|
144
|
+
} : undefined, {
|
|
141
145
|
testId: testId,
|
|
142
146
|
text: selected.text
|
|
143
147
|
}));
|
|
144
|
-
}, [selected.appearance, selected.text, isOpen, testId]);
|
|
148
|
+
}, [selected.appearance, selected.text, isOpen, maxWidth, testId]);
|
|
145
149
|
var handleItemClick = useCallback( /*#__PURE__*/function () {
|
|
146
150
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, text, appearance) {
|
|
147
151
|
var updateAction, request;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
14
14
|
._19bvidpf{padding-left:0}
|
|
15
15
|
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
16
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
16
17
|
._1e0c1txw{display:flex}
|
|
17
18
|
._1p1dn7od{text-transform:unset}
|
|
18
19
|
._1q2vglyw[aria-expanded=true]{outline-style:none}
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
._j8b81o36[aria-expanded=true]{outline-width:medium}
|
|
30
31
|
._k48pn7od{font-weight:unset}
|
|
31
32
|
._n3tdidpf{padding-bottom:0}
|
|
33
|
+
._o5721q9c{white-space:nowrap}
|
|
32
34
|
._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
|
|
33
35
|
._p8tl1r31[aria-expanded=true]{outline-color:currentColor}
|
|
34
36
|
._syazn7od{color:unset}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["appearance", "isOpen", "testId", "text", "triggerRef"];
|
|
5
|
+
var _excluded = ["appearance", "isOpen", "maxWidth", "testId", "text", "triggerRef"];
|
|
6
6
|
import "./index.compiled.css";
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -21,11 +21,13 @@ var styles = {
|
|
|
21
21
|
lozengeContainer: "_kkk2n7od _2rko12b0 _1dqonqa1 _189ee4h9 _1h6d1j28 _bfhk1j28 _1e0c1txw _4cvr1h6o _4t3i7vkz",
|
|
22
22
|
lozengeContainerSelected: "_1reo15vq _18m915vq _1h6d1v1w"
|
|
23
23
|
};
|
|
24
|
+
var textStyles = null;
|
|
24
25
|
var triggerLozengeStyles = null;
|
|
25
26
|
var triggerButtonStyles = null;
|
|
26
27
|
var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
27
28
|
var appearance = _ref.appearance,
|
|
28
29
|
isOpen = _ref.isOpen,
|
|
30
|
+
maxWidth = _ref.maxWidth,
|
|
29
31
|
testId = _ref.testId,
|
|
30
32
|
text = _ref.text,
|
|
31
33
|
triggerRef = _ref.triggerRef,
|
|
@@ -79,18 +81,22 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
79
81
|
return /*#__PURE__*/React.createElement(Box, {
|
|
80
82
|
xcss: cx(styles.lozengeContainer, (isOpen || isPressing) && styles.lozengeContainerSelected),
|
|
81
83
|
as: "span"
|
|
82
|
-
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
84
|
+
}, /*#__PURE__*/React.createElement(Lozenge, _extends({
|
|
83
85
|
appearance: appearance,
|
|
84
86
|
isBold: fg('platform-component-visual-refresh') ? true : isHovering
|
|
87
|
+
}, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
88
|
+
maxWidth: maxWidth
|
|
89
|
+
} : undefined, {
|
|
85
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
86
|
-
,
|
|
87
91
|
style: {
|
|
88
92
|
backgroundColor: lozengeBackgroundColor,
|
|
89
93
|
color: lozengeForegroundColor
|
|
90
94
|
}
|
|
91
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
95
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
92
96
|
className: ax(["_4cvr1h6o _1e0c1txw"])
|
|
93
|
-
}, /*#__PURE__*/React.createElement("span",
|
|
97
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
98
|
+
className: ax([fg('platform_navx_sl_lozenge_max_width') && "_1reo15vq _18m915vq _1bto1l2s _o5721q9c"])
|
|
99
|
+
}, text), /*#__PURE__*/React.createElement(Box, {
|
|
94
100
|
as: "span",
|
|
95
101
|
xcss: styles.chevronDown
|
|
96
102
|
}, /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
@@ -99,12 +105,15 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
99
105
|
size: "small",
|
|
100
106
|
"aria-hidden": true
|
|
101
107
|
})))));
|
|
102
|
-
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
|
|
108
|
+
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor, maxWidth]);
|
|
103
109
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
104
110
|
type: "button"
|
|
105
111
|
}, props, {
|
|
106
112
|
"data-action-open": isOpen,
|
|
107
|
-
"data-testid": "".concat(testId, "--trigger")
|
|
113
|
+
"data-testid": "".concat(testId, "--trigger"),
|
|
114
|
+
style: {
|
|
115
|
+
maxWidth: fg('platform_navx_sl_lozenge_max_width') ? maxWidth : undefined
|
|
116
|
+
}
|
|
108
117
|
// eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
|
|
109
118
|
,
|
|
110
119
|
onMouseEnter: onMouseEnter
|
|
@@ -8,6 +8,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
8
8
|
* DO NOT add a new prop to these components until we are ready to support it externally.
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { SmartLinkSize } from '../../constants';
|
|
12
13
|
import { CopyLinkAction as CopyLinkActionComponent, CustomAction as CustomActionComponent, DownloadAction as DownloadActionComponent, FollowAction as FollowActionComponent, PreviewAction as PreviewActionComponent, UnresolvedAction as UnresolvedActionComponent } from './components/actions';
|
|
13
14
|
import { AssignedTo, AssignedToGroup, AttachmentCount, AuthorGroup, ChecklistProgress, CollaboratorGroup, CommentCount, CreatedBy, CreatedOn, DueOn, LatestCommit, LinkIcon, Location, ModifiedBy, ModifiedOn, OwnedBy, OwnedByGroup, Preview, Priority, ProgrammingLanguage, Provider, ReactCount, ReadTime, SentOn, Snippet, SourceBranch, State, StoryPoints, SubscriberCount, SubTasksProgress, TargetBranch, Title, ViewCount, VoteCount } from './components/elements';
|
|
@@ -118,8 +119,10 @@ export var SnippetElement = function SnippetElement(props) {
|
|
|
118
119
|
export var SourceBranchElement = function SourceBranchElement() {
|
|
119
120
|
return /*#__PURE__*/React.createElement(SourceBranch, null);
|
|
120
121
|
};
|
|
121
|
-
export var StateElement = function StateElement() {
|
|
122
|
-
return /*#__PURE__*/React.createElement(State,
|
|
122
|
+
export var StateElement = function StateElement(props) {
|
|
123
|
+
return /*#__PURE__*/React.createElement(State, fg('platform_navx_sl_lozenge_max_width') ? {
|
|
124
|
+
maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
|
|
125
|
+
} : undefined);
|
|
123
126
|
};
|
|
124
127
|
export var StoryPointsElement = function StoryPointsElement() {
|
|
125
128
|
return /*#__PURE__*/React.createElement(StoryPoints, null);
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "43.20.
|
|
18
|
+
packageVersion: "43.20.8",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge';
|
|
2
3
|
import { type ActionName, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
|
|
3
4
|
import { type ActionProps } from '../actions/action/types';
|
|
4
5
|
import type { AssignedToGroupElementProps } from '../elements/assigned-to-group-element';
|
|
@@ -389,7 +390,7 @@ export type SourceBranch = {
|
|
|
389
390
|
export type State = {
|
|
390
391
|
name: ElementName.State;
|
|
391
392
|
onAfterChanged?: () => void;
|
|
392
|
-
}
|
|
393
|
+
} & Pick<AtlaskitLozengeProps, 'maxWidth'>;
|
|
393
394
|
/**
|
|
394
395
|
* Represents the props available for a SubscriberCount element.
|
|
395
396
|
* @see SubscriberCount
|
package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts
CHANGED
|
@@ -15,21 +15,17 @@ export type BaseLozengeElementProps = ElementProps & {
|
|
|
15
15
|
* Callback fired after lozenge value has changed
|
|
16
16
|
*/
|
|
17
17
|
onAfterChanged?: () => void;
|
|
18
|
-
/**
|
|
19
|
-
* Determines the custom styles of the Atlaskit lozenge.
|
|
20
|
-
*/
|
|
21
|
-
style?: AtlaskitLozengeProps['style'];
|
|
22
18
|
/**
|
|
23
19
|
* The text to display within the lozenge.
|
|
24
20
|
*/
|
|
25
21
|
text?: string | React.ReactNode;
|
|
26
|
-
}
|
|
22
|
+
} & Pick<AtlaskitLozengeProps, 'maxWidth' | 'style'>;
|
|
27
23
|
/**
|
|
28
24
|
* A base element that displays a Lozenge.
|
|
29
25
|
* @internal
|
|
30
26
|
* @param {BaseLozengeElementProps} BaseLozengeElementProps - The props necessary for the Lozenge element.
|
|
31
27
|
* @see State
|
|
32
28
|
*/
|
|
33
|
-
declare const BaseLozengeElement: ({ action, appearance, name,
|
|
29
|
+
declare const BaseLozengeElement: ({ action, appearance, className, maxWidth, name, onAfterChanged, style, text, testId, }: BaseLozengeElementProps) => JSX.Element | null;
|
|
34
30
|
export default BaseLozengeElement;
|
|
35
31
|
export declare const toDateLozengeProps: (dateString?: string) => Partial<BaseLozengeElementProps> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type LozengeActionTriggerProps } from './type';
|
|
2
|
-
declare const LozengeActionTrigger: ({ appearance, isOpen, testId, text, triggerRef, ...props }: LozengeActionTriggerProps) => JSX.Element;
|
|
2
|
+
declare const LozengeActionTrigger: ({ appearance, isOpen, maxWidth, testId, text, triggerRef, ...props }: LozengeActionTriggerProps) => JSX.Element;
|
|
3
3
|
export default LozengeActionTrigger;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CustomTriggerProps } from '@atlaskit/dropdown-menu';
|
|
2
|
-
import type { ThemeAppearance } from '@atlaskit/lozenge';
|
|
2
|
+
import type { LozengeProps, ThemeAppearance } from '@atlaskit/lozenge';
|
|
3
3
|
export type LozengeActionTriggerProps = {
|
|
4
4
|
appearance?: ThemeAppearance;
|
|
5
5
|
isOpen?: boolean;
|
|
6
6
|
testId?: string;
|
|
7
7
|
text: string | React.ReactNode;
|
|
8
|
-
} & CustomTriggerProps<HTMLButtonElement>;
|
|
8
|
+
} & Pick<LozengeProps, 'maxWidth'> & CustomTriggerProps<HTMLButtonElement>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type LozengeProps, type ThemeAppearance } from '@atlaskit/lozenge';
|
|
2
2
|
import type { LinkLozengeInvokeActions } from '../../../../../../../extractors/common/lozenge/types';
|
|
3
3
|
export type LozengeItem = {
|
|
4
4
|
appearance?: ThemeAppearance;
|
|
@@ -12,4 +12,4 @@ export type LozengeActionProps = {
|
|
|
12
12
|
testId?: string;
|
|
13
13
|
text: string | React.ReactNode;
|
|
14
14
|
zIndex?: number;
|
|
15
|
-
}
|
|
15
|
+
} & Pick<LozengeProps, 'maxWidth'>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import type { Prettify } from '@atlaskit/linking-common';
|
|
11
|
-
import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, OwnedByGroup, Preview, ReactCount, Snippet, Title } from './components/elements';
|
|
11
|
+
import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, OwnedByGroup, Preview, ReactCount, Snippet, State, Title } from './components/elements';
|
|
12
12
|
export declare const AssignedToElement: () => React.JSX.Element;
|
|
13
13
|
export declare const AssignedToGroupElement: () => React.JSX.Element;
|
|
14
14
|
export declare const AttachmentCountElement: () => React.JSX.Element;
|
|
@@ -49,7 +49,8 @@ export type SnippetElementProps = Prettify<Pick<React.ComponentProps<typeof Snip
|
|
|
49
49
|
}>;
|
|
50
50
|
export declare const SnippetElement: (props?: SnippetElementProps) => React.JSX.Element;
|
|
51
51
|
export declare const SourceBranchElement: () => React.JSX.Element;
|
|
52
|
-
export
|
|
52
|
+
export type StateElementProps = Prettify<Pick<React.ComponentProps<typeof State>, 'maxWidth'>>;
|
|
53
|
+
export declare const StateElement: (props?: StateElementProps) => React.JSX.Element;
|
|
53
54
|
export declare const StoryPointsElement: () => React.JSX.Element;
|
|
54
55
|
export declare const SubscriberCountElement: () => React.JSX.Element;
|
|
55
56
|
export declare const SubTasksProgressElement: () => React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge';
|
|
2
3
|
import { type ActionName, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
|
|
3
4
|
import { type ActionProps } from '../actions/action/types';
|
|
4
5
|
import type { AssignedToGroupElementProps } from '../elements/assigned-to-group-element';
|
|
@@ -389,7 +390,7 @@ export type SourceBranch = {
|
|
|
389
390
|
export type State = {
|
|
390
391
|
name: ElementName.State;
|
|
391
392
|
onAfterChanged?: () => void;
|
|
392
|
-
}
|
|
393
|
+
} & Pick<AtlaskitLozengeProps, 'maxWidth'>;
|
|
393
394
|
/**
|
|
394
395
|
* Represents the props available for a SubscriberCount element.
|
|
395
396
|
* @see SubscriberCount
|
|
@@ -15,21 +15,17 @@ export type BaseLozengeElementProps = ElementProps & {
|
|
|
15
15
|
* Callback fired after lozenge value has changed
|
|
16
16
|
*/
|
|
17
17
|
onAfterChanged?: () => void;
|
|
18
|
-
/**
|
|
19
|
-
* Determines the custom styles of the Atlaskit lozenge.
|
|
20
|
-
*/
|
|
21
|
-
style?: AtlaskitLozengeProps['style'];
|
|
22
18
|
/**
|
|
23
19
|
* The text to display within the lozenge.
|
|
24
20
|
*/
|
|
25
21
|
text?: string | React.ReactNode;
|
|
26
|
-
}
|
|
22
|
+
} & Pick<AtlaskitLozengeProps, 'maxWidth' | 'style'>;
|
|
27
23
|
/**
|
|
28
24
|
* A base element that displays a Lozenge.
|
|
29
25
|
* @internal
|
|
30
26
|
* @param {BaseLozengeElementProps} BaseLozengeElementProps - The props necessary for the Lozenge element.
|
|
31
27
|
* @see State
|
|
32
28
|
*/
|
|
33
|
-
declare const BaseLozengeElement: ({ action, appearance, name,
|
|
29
|
+
declare const BaseLozengeElement: ({ action, appearance, className, maxWidth, name, onAfterChanged, style, text, testId, }: BaseLozengeElementProps) => JSX.Element | null;
|
|
34
30
|
export default BaseLozengeElement;
|
|
35
31
|
export declare const toDateLozengeProps: (dateString?: string) => Partial<BaseLozengeElementProps> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type LozengeActionTriggerProps } from './type';
|
|
2
|
-
declare const LozengeActionTrigger: ({ appearance, isOpen, testId, text, triggerRef, ...props }: LozengeActionTriggerProps) => JSX.Element;
|
|
2
|
+
declare const LozengeActionTrigger: ({ appearance, isOpen, maxWidth, testId, text, triggerRef, ...props }: LozengeActionTriggerProps) => JSX.Element;
|
|
3
3
|
export default LozengeActionTrigger;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CustomTriggerProps } from '@atlaskit/dropdown-menu';
|
|
2
|
-
import type { ThemeAppearance } from '@atlaskit/lozenge';
|
|
2
|
+
import type { LozengeProps, ThemeAppearance } from '@atlaskit/lozenge';
|
|
3
3
|
export type LozengeActionTriggerProps = {
|
|
4
4
|
appearance?: ThemeAppearance;
|
|
5
5
|
isOpen?: boolean;
|
|
6
6
|
testId?: string;
|
|
7
7
|
text: string | React.ReactNode;
|
|
8
|
-
} & CustomTriggerProps<HTMLButtonElement>;
|
|
8
|
+
} & Pick<LozengeProps, 'maxWidth'> & CustomTriggerProps<HTMLButtonElement>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type LozengeProps, type ThemeAppearance } from '@atlaskit/lozenge';
|
|
2
2
|
import type { LinkLozengeInvokeActions } from '../../../../../../../extractors/common/lozenge/types';
|
|
3
3
|
export type LozengeItem = {
|
|
4
4
|
appearance?: ThemeAppearance;
|
|
@@ -12,4 +12,4 @@ export type LozengeActionProps = {
|
|
|
12
12
|
testId?: string;
|
|
13
13
|
text: string | React.ReactNode;
|
|
14
14
|
zIndex?: number;
|
|
15
|
-
}
|
|
15
|
+
} & Pick<LozengeProps, 'maxWidth'>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import type { Prettify } from '@atlaskit/linking-common';
|
|
11
|
-
import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, OwnedByGroup, Preview, ReactCount, Snippet, Title } from './components/elements';
|
|
11
|
+
import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, OwnedByGroup, Preview, ReactCount, Snippet, State, Title } from './components/elements';
|
|
12
12
|
export declare const AssignedToElement: () => React.JSX.Element;
|
|
13
13
|
export declare const AssignedToGroupElement: () => React.JSX.Element;
|
|
14
14
|
export declare const AttachmentCountElement: () => React.JSX.Element;
|
|
@@ -49,7 +49,8 @@ export type SnippetElementProps = Prettify<Pick<React.ComponentProps<typeof Snip
|
|
|
49
49
|
}>;
|
|
50
50
|
export declare const SnippetElement: (props?: SnippetElementProps) => React.JSX.Element;
|
|
51
51
|
export declare const SourceBranchElement: () => React.JSX.Element;
|
|
52
|
-
export
|
|
52
|
+
export type StateElementProps = Prettify<Pick<React.ComponentProps<typeof State>, 'maxWidth'>>;
|
|
53
|
+
export declare const StateElement: (props?: StateElementProps) => React.JSX.Element;
|
|
53
54
|
export declare const StoryPointsElement: () => React.JSX.Element;
|
|
54
55
|
export declare const SubscriberCountElement: () => React.JSX.Element;
|
|
55
56
|
export declare const SubTasksProgressElement: () => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.21.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@atlaskit/textfield": "^8.2.0",
|
|
73
73
|
"@atlaskit/theme": "^21.0.0",
|
|
74
74
|
"@atlaskit/tile": "^1.0.0",
|
|
75
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
76
|
-
"@atlaskit/tokens": "^10.
|
|
75
|
+
"@atlaskit/tmp-editor-statsig": "^16.28.0",
|
|
76
|
+
"@atlaskit/tokens": "^10.1.0",
|
|
77
77
|
"@atlaskit/tooltip": "^20.14.0",
|
|
78
78
|
"@atlaskit/ufo": "^0.4.0",
|
|
79
79
|
"@babel/runtime": "^7.0.0",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@af/integration-testing": "workspace:^",
|
|
101
101
|
"@af/visual-regression": "workspace:^",
|
|
102
|
-
"@atlaskit/analytics-listeners": "^9.
|
|
102
|
+
"@atlaskit/analytics-listeners": "^9.3.0",
|
|
103
103
|
"@atlaskit/css-reset": "^7.3.0",
|
|
104
104
|
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
105
105
|
"@atlaskit/ssr": "workspace:^",
|
|
@@ -228,6 +228,9 @@
|
|
|
228
228
|
"platform_navx_sl_a11y_embed_modal": {
|
|
229
229
|
"type": "boolean"
|
|
230
230
|
},
|
|
231
|
+
"platform_navx_sl_lozenge_max_width": {
|
|
232
|
+
"type": "boolean"
|
|
233
|
+
},
|
|
231
234
|
"platform_navx_send_context_to_ugs_for_rel_links": {
|
|
232
235
|
"type": "boolean"
|
|
233
236
|
},
|
|
@@ -237,9 +240,6 @@
|
|
|
237
240
|
"navx-2811-smart-link-a11y-image-alt": {
|
|
238
241
|
"type": "boolean"
|
|
239
242
|
},
|
|
240
|
-
"navx-2185-smart-link-preview-modal-icon-role": {
|
|
241
|
-
"type": "boolean"
|
|
242
|
-
},
|
|
243
243
|
"ufo_hold_flexible_card": {
|
|
244
244
|
"type": "boolean"
|
|
245
245
|
}
|
|
File without changes
|
|
File without changes
|