@atlaskit/editor-plugin-floating-toolbar 1.14.3 → 1.14.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 +8 -0
- package/dist/cjs/ui/Toolbar.js +11 -2
- package/dist/es2019/ui/Toolbar.js +11 -2
- package/dist/esm/ui/Toolbar.js +11 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 1.14.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#161539](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161539)
|
|
8
|
+
[`a3538a83b5e02`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a3538a83b5e02) -
|
|
9
|
+
set floating toolbar icon color when active
|
|
10
|
+
|
|
3
11
|
## 1.14.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -103,6 +103,15 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
+
var getIconColor = function getIconColor(disabled, selected) {
|
|
107
|
+
if (disabled) {
|
|
108
|
+
return "var(--ds-icon-disabled, #091E424F)";
|
|
109
|
+
}
|
|
110
|
+
if (selected) {
|
|
111
|
+
return "var(--ds-icon-selected, #0C66E4)";
|
|
112
|
+
}
|
|
113
|
+
return "var(--ds-icon, #44546F)";
|
|
114
|
+
};
|
|
106
115
|
return (0, _react2.jsx)(_ui.FloatingToolbarButton
|
|
107
116
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
108
117
|
, {
|
|
@@ -111,7 +120,7 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
111
120
|
title: item.title,
|
|
112
121
|
href: item.href,
|
|
113
122
|
icon: item.icon ? item.iconFallback ? (0, _react2.jsx)(ButtonIcon, {
|
|
114
|
-
color: item.disabled
|
|
123
|
+
color: getIconColor(item.disabled, item.selected),
|
|
115
124
|
spacing: "spacious",
|
|
116
125
|
label: item.title,
|
|
117
126
|
LEGACY_fallbackIcon: item.iconFallback,
|
|
@@ -150,7 +159,7 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
150
159
|
spotlightConfig: item.spotlightConfig
|
|
151
160
|
}, item.showTitle && item.title);
|
|
152
161
|
case 'input':
|
|
153
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
162
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2_v2')) {
|
|
154
163
|
return (0, _react2.jsx)(_Input.InputNew, {
|
|
155
164
|
key: idx,
|
|
156
165
|
mountPoint: popupsMountPoint,
|
|
@@ -91,6 +91,15 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
+
const getIconColor = (disabled, selected) => {
|
|
95
|
+
if (disabled) {
|
|
96
|
+
return "var(--ds-icon-disabled, #091E424F)";
|
|
97
|
+
}
|
|
98
|
+
if (selected) {
|
|
99
|
+
return "var(--ds-icon-selected, #0C66E4)";
|
|
100
|
+
}
|
|
101
|
+
return "var(--ds-icon, #44546F)";
|
|
102
|
+
};
|
|
94
103
|
return jsx(Button
|
|
95
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
96
105
|
, {
|
|
@@ -99,7 +108,7 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
99
108
|
title: item.title,
|
|
100
109
|
href: item.href,
|
|
101
110
|
icon: item.icon ? item.iconFallback ? jsx(ButtonIcon, {
|
|
102
|
-
color: item.disabled
|
|
111
|
+
color: getIconColor(item.disabled, item.selected),
|
|
103
112
|
spacing: "spacious",
|
|
104
113
|
label: item.title,
|
|
105
114
|
LEGACY_fallbackIcon: item.iconFallback,
|
|
@@ -130,7 +139,7 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
130
139
|
spotlightConfig: item.spotlightConfig
|
|
131
140
|
}, item.showTitle && item.title);
|
|
132
141
|
case 'input':
|
|
133
|
-
if (fg('
|
|
142
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
134
143
|
return jsx(InputNew, {
|
|
135
144
|
key: idx,
|
|
136
145
|
mountPoint: popupsMountPoint,
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -96,6 +96,15 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
+
var getIconColor = function getIconColor(disabled, selected) {
|
|
100
|
+
if (disabled) {
|
|
101
|
+
return "var(--ds-icon-disabled, #091E424F)";
|
|
102
|
+
}
|
|
103
|
+
if (selected) {
|
|
104
|
+
return "var(--ds-icon-selected, #0C66E4)";
|
|
105
|
+
}
|
|
106
|
+
return "var(--ds-icon, #44546F)";
|
|
107
|
+
};
|
|
99
108
|
return jsx(Button
|
|
100
109
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
101
110
|
, {
|
|
@@ -104,7 +113,7 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
104
113
|
title: item.title,
|
|
105
114
|
href: item.href,
|
|
106
115
|
icon: item.icon ? item.iconFallback ? jsx(ButtonIcon, {
|
|
107
|
-
color: item.disabled
|
|
116
|
+
color: getIconColor(item.disabled, item.selected),
|
|
108
117
|
spacing: "spacious",
|
|
109
118
|
label: item.title,
|
|
110
119
|
LEGACY_fallbackIcon: item.iconFallback,
|
|
@@ -143,7 +152,7 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
143
152
|
spotlightConfig: item.spotlightConfig
|
|
144
153
|
}, item.showTitle && item.title);
|
|
145
154
|
case 'input':
|
|
146
|
-
if (fg('
|
|
155
|
+
if (fg('platform_editor_react18_phase2_v2')) {
|
|
147
156
|
return jsx(InputNew, {
|
|
148
157
|
key: idx,
|
|
149
158
|
mountPoint: popupsMountPoint,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.4",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
".": "./src/index.ts"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@atlaskit/adf-utils": "^19.
|
|
26
|
+
"@atlaskit/adf-utils": "^19.11.0",
|
|
27
27
|
"@atlaskit/button": "^20.3.0",
|
|
28
28
|
"@atlaskit/checkbox": "^15.1.0",
|
|
29
|
-
"@atlaskit/editor-common": "^94.
|
|
29
|
+
"@atlaskit/editor-common": "^94.14.0",
|
|
30
30
|
"@atlaskit/editor-palette": "1.6.3",
|
|
31
31
|
"@atlaskit/editor-plugin-block-controls": "^2.13.0",
|
|
32
32
|
"@atlaskit/editor-plugin-context-panel": "^1.3.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-emoji": "^2.7.0",
|
|
38
|
-
"@atlaskit/editor-plugin-extension": "^1.
|
|
38
|
+
"@atlaskit/editor-plugin-extension": "^1.16.0",
|
|
39
39
|
"@atlaskit/editor-plugin-table": "^7.30.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
41
41
|
"@atlaskit/emoji": "^67.9.0",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@atlaskit/modal-dialog": "^12.17.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
46
|
"@atlaskit/primitives": "^13.0.0",
|
|
47
|
-
"@atlaskit/select": "^18.
|
|
47
|
+
"@atlaskit/select": "^18.5.0",
|
|
48
48
|
"@atlaskit/theme": "^14.0.0",
|
|
49
|
-
"@atlaskit/tokens": "^2.
|
|
49
|
+
"@atlaskit/tokens": "^2.2.0",
|
|
50
50
|
"@atlaskit/tooltip": "^18.8.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"platform-feature-flags": {
|
|
113
|
-
"
|
|
113
|
+
"platform_editor_react18_phase2_v2": {
|
|
114
114
|
"type": "boolean"
|
|
115
115
|
},
|
|
116
116
|
"platform_editor_advanced_layouts_pre_release_2": {
|