@atlaskit/editor-plugin-card 6.6.7 → 6.6.8
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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 6.6.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#172583](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172583)
|
|
8
|
+
[`40f387a0c0962`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40f387a0c0962) -
|
|
9
|
+
Clean up platform_editor_controls_patch_2
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 6.6.7
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -61,15 +61,13 @@ var linkStyles = (0, _primitives.xcss)({
|
|
|
61
61
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
62
62
|
color: 'color.text.subtle',
|
|
63
63
|
textDecoration: 'none',
|
|
64
|
+
whiteSpace: 'nowrap',
|
|
64
65
|
':hover': {
|
|
65
66
|
backgroundColor: 'elevation.surface.hovered',
|
|
66
67
|
color: 'color.text.subtle',
|
|
67
68
|
textDecoration: 'none'
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
|
-
var linkStylesFix = (0, _primitives.xcss)({
|
|
71
|
-
whiteSpace: 'nowrap'
|
|
72
|
-
});
|
|
73
71
|
var MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY = 45;
|
|
74
72
|
var ICON_WIDTH = 16;
|
|
75
73
|
var DEFAULT_OPEN_TEXT_WIDTH = 28; // Default open text width in English
|
|
@@ -150,12 +148,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
150
148
|
return;
|
|
151
149
|
}
|
|
152
150
|
var openTextWidth = openTextWidthRef.current || DEFAULT_OPEN_TEXT_WIDTH;
|
|
153
|
-
var canShowLabel =
|
|
154
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_2')) {
|
|
155
|
-
canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
156
|
-
} else {
|
|
157
|
-
canShowLabel = cardWidth - openButtonWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY;
|
|
158
|
-
}
|
|
151
|
+
var canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
159
152
|
setShowLabel(canShowLabel);
|
|
160
153
|
}, [isVisible, isHovered]);
|
|
161
154
|
var handleOverlayChange = function handleOverlayChange(isHovered) {
|
|
@@ -187,7 +180,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
187
180
|
onMouseLeave: function onMouseLeave() {
|
|
188
181
|
return handleOverlayChange(false);
|
|
189
182
|
}
|
|
190
|
-
}, children, (0,
|
|
183
|
+
}, children, (0, _react2.jsx)("span", {
|
|
191
184
|
css: hiddenTextStyle,
|
|
192
185
|
"aria-hidden": "true"
|
|
193
186
|
}, (0, _react2.jsx)(_primitives.Text, {
|
|
@@ -196,7 +189,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
196
189
|
maxLines: 1
|
|
197
190
|
}, label)), isHovered && (0, _react2.jsx)(_primitives.Anchor, {
|
|
198
191
|
ref: openButtonRef,
|
|
199
|
-
xcss:
|
|
192
|
+
xcss: linkStyles,
|
|
200
193
|
href: url,
|
|
201
194
|
target: "_blank",
|
|
202
195
|
style: {
|
|
@@ -47,15 +47,13 @@ const linkStyles = xcss({
|
|
|
47
47
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
48
48
|
color: 'color.text.subtle',
|
|
49
49
|
textDecoration: 'none',
|
|
50
|
+
whiteSpace: 'nowrap',
|
|
50
51
|
':hover': {
|
|
51
52
|
backgroundColor: 'elevation.surface.hovered',
|
|
52
53
|
color: 'color.text.subtle',
|
|
53
54
|
textDecoration: 'none'
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
|
-
const linkStylesFix = xcss({
|
|
57
|
-
whiteSpace: 'nowrap'
|
|
58
|
-
});
|
|
59
57
|
const MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY = 45;
|
|
60
58
|
const ICON_WIDTH = 16;
|
|
61
59
|
const DEFAULT_OPEN_TEXT_WIDTH = 28; // Default open text width in English
|
|
@@ -131,12 +129,7 @@ const OpenButtonOverlay = ({
|
|
|
131
129
|
return;
|
|
132
130
|
}
|
|
133
131
|
const openTextWidth = openTextWidthRef.current || DEFAULT_OPEN_TEXT_WIDTH;
|
|
134
|
-
|
|
135
|
-
if (fg('platform_editor_controls_patch_2')) {
|
|
136
|
-
canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
137
|
-
} else {
|
|
138
|
-
canShowLabel = cardWidth - openButtonWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY;
|
|
139
|
-
}
|
|
132
|
+
const canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
140
133
|
setShowLabel(canShowLabel);
|
|
141
134
|
}, [isVisible, isHovered]);
|
|
142
135
|
const handleOverlayChange = isHovered => {
|
|
@@ -164,7 +157,7 @@ const OpenButtonOverlay = ({
|
|
|
164
157
|
onDoubleClick: handleDoubleClick,
|
|
165
158
|
onMouseEnter: () => handleOverlayChange(true),
|
|
166
159
|
onMouseLeave: () => handleOverlayChange(false)
|
|
167
|
-
}, children,
|
|
160
|
+
}, children, jsx("span", {
|
|
168
161
|
css: hiddenTextStyle,
|
|
169
162
|
"aria-hidden": "true"
|
|
170
163
|
}, jsx(Text, {
|
|
@@ -173,7 +166,7 @@ const OpenButtonOverlay = ({
|
|
|
173
166
|
maxLines: 1
|
|
174
167
|
}, label)), isHovered && jsx(Anchor, {
|
|
175
168
|
ref: openButtonRef,
|
|
176
|
-
xcss:
|
|
169
|
+
xcss: linkStyles,
|
|
177
170
|
href: url,
|
|
178
171
|
target: "_blank",
|
|
179
172
|
style: {
|
|
@@ -48,15 +48,13 @@ var linkStyles = xcss({
|
|
|
48
48
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
49
49
|
color: 'color.text.subtle',
|
|
50
50
|
textDecoration: 'none',
|
|
51
|
+
whiteSpace: 'nowrap',
|
|
51
52
|
':hover': {
|
|
52
53
|
backgroundColor: 'elevation.surface.hovered',
|
|
53
54
|
color: 'color.text.subtle',
|
|
54
55
|
textDecoration: 'none'
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
|
-
var linkStylesFix = xcss({
|
|
58
|
-
whiteSpace: 'nowrap'
|
|
59
|
-
});
|
|
60
58
|
var MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY = 45;
|
|
61
59
|
var ICON_WIDTH = 16;
|
|
62
60
|
var DEFAULT_OPEN_TEXT_WIDTH = 28; // Default open text width in English
|
|
@@ -137,12 +135,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
137
135
|
return;
|
|
138
136
|
}
|
|
139
137
|
var openTextWidth = openTextWidthRef.current || DEFAULT_OPEN_TEXT_WIDTH;
|
|
140
|
-
var canShowLabel =
|
|
141
|
-
if (fg('platform_editor_controls_patch_2')) {
|
|
142
|
-
canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
143
|
-
} else {
|
|
144
|
-
canShowLabel = cardWidth - openButtonWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY;
|
|
145
|
-
}
|
|
138
|
+
var canShowLabel = cardWidth - openTextWidth > MIN_AVAILABLE_SPACE_WITH_LABEL_OVERLAY + ICON_WIDTH;
|
|
146
139
|
setShowLabel(canShowLabel);
|
|
147
140
|
}, [isVisible, isHovered]);
|
|
148
141
|
var handleOverlayChange = function handleOverlayChange(isHovered) {
|
|
@@ -174,7 +167,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
174
167
|
onMouseLeave: function onMouseLeave() {
|
|
175
168
|
return handleOverlayChange(false);
|
|
176
169
|
}
|
|
177
|
-
}, children,
|
|
170
|
+
}, children, jsx("span", {
|
|
178
171
|
css: hiddenTextStyle,
|
|
179
172
|
"aria-hidden": "true"
|
|
180
173
|
}, jsx(Text, {
|
|
@@ -183,7 +176,7 @@ var OpenButtonOverlay = function OpenButtonOverlay(_ref) {
|
|
|
183
176
|
maxLines: 1
|
|
184
177
|
}, label)), isHovered && jsx(Anchor, {
|
|
185
178
|
ref: openButtonRef,
|
|
186
|
-
xcss:
|
|
179
|
+
xcss: linkStyles,
|
|
187
180
|
href: url,
|
|
188
181
|
target: "_blank",
|
|
189
182
|
style: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.8",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
"@atlaskit/link-analytics": "^10.0.0",
|
|
57
57
|
"@atlaskit/link-client-extension": "^5.0.0",
|
|
58
58
|
"@atlaskit/link-datasource": "^4.11.0",
|
|
59
|
-
"@atlaskit/linking-common": "^9.
|
|
59
|
+
"@atlaskit/linking-common": "^9.1.0",
|
|
60
60
|
"@atlaskit/linking-types": "^12.0.0",
|
|
61
61
|
"@atlaskit/menu": "^8.0.0",
|
|
62
62
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
63
|
-
"@atlaskit/primitives": "^14.
|
|
63
|
+
"@atlaskit/primitives": "^14.9.0",
|
|
64
64
|
"@atlaskit/smart-card": "^38.10.0",
|
|
65
65
|
"@atlaskit/theme": "^18.0.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^7.
|
|
67
|
-
"@atlaskit/tokens": "^5.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^7.2.0",
|
|
67
|
+
"@atlaskit/tokens": "^5.3.0",
|
|
68
68
|
"@babel/runtime": "^7.0.0",
|
|
69
69
|
"@emotion/react": "^11.7.1",
|
|
70
70
|
"lodash": "^4.17.21",
|
|
@@ -126,15 +126,9 @@
|
|
|
126
126
|
"platform_ssr_smartlinks_editor": {
|
|
127
127
|
"type": "boolean"
|
|
128
128
|
},
|
|
129
|
-
"platform_editor_controls_patch_2": {
|
|
130
|
-
"type": "boolean"
|
|
131
|
-
},
|
|
132
129
|
"platform_editor_controls_patch_3": {
|
|
133
130
|
"type": "boolean"
|
|
134
131
|
},
|
|
135
|
-
"platform_editor_controls_patch_5": {
|
|
136
|
-
"type": "boolean"
|
|
137
|
-
},
|
|
138
132
|
"platform_editor_controls_patch_9": {
|
|
139
133
|
"type": "boolean"
|
|
140
134
|
},
|