@atlaskit/editor-toolbar 0.0.8 → 0.0.10
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 +21 -0
- package/dist/cjs/index.js +50 -1
- package/dist/cjs/ui/Toolbar.compiled.css +1 -0
- package/dist/cjs/ui/Toolbar.js +1 -1
- package/dist/cjs/ui/ToolbarButton.compiled.css +1 -0
- package/dist/cjs/ui/ToolbarButton.js +1 -1
- package/dist/cjs/ui/ToolbarDropdownDivider.js +5 -5
- package/dist/cjs/ui/ToolbarTooltip.js +5 -2
- package/dist/cjs/ui/icons/CodeIcon.js +13 -0
- package/dist/cjs/ui/icons/StrikeThroughIcon.js +13 -0
- package/dist/cjs/ui/icons/SubscriptIcon.js +36 -0
- package/dist/cjs/ui/icons/SuperscriptIcon.js +36 -0
- package/dist/cjs/ui/icons/UnderlineIcon.js +13 -0
- package/dist/es2019/index.js +8 -1
- package/dist/es2019/ui/Toolbar.compiled.css +1 -0
- package/dist/es2019/ui/Toolbar.js +1 -1
- package/dist/es2019/ui/ToolbarButton.compiled.css +1 -0
- package/dist/es2019/ui/ToolbarButton.js +1 -1
- package/dist/es2019/ui/ToolbarDropdownDivider.js +3 -4
- package/dist/es2019/ui/ToolbarTooltip.js +4 -2
- package/dist/es2019/ui/icons/CodeIcon.js +2 -0
- package/dist/es2019/ui/icons/StrikeThroughIcon.js +2 -0
- package/dist/es2019/ui/icons/SubscriptIcon.js +25 -0
- package/dist/es2019/ui/icons/SuperscriptIcon.js +25 -0
- package/dist/es2019/ui/icons/UnderlineIcon.js +2 -0
- package/dist/esm/index.js +8 -1
- package/dist/esm/ui/Toolbar.compiled.css +1 -0
- package/dist/esm/ui/Toolbar.js +1 -1
- package/dist/esm/ui/ToolbarButton.compiled.css +1 -0
- package/dist/esm/ui/ToolbarButton.js +1 -1
- package/dist/esm/ui/ToolbarDropdownDivider.js +3 -4
- package/dist/esm/ui/ToolbarTooltip.js +5 -2
- package/dist/esm/ui/icons/CodeIcon.js +2 -0
- package/dist/esm/ui/icons/StrikeThroughIcon.js +2 -0
- package/dist/esm/ui/icons/SubscriptIcon.js +28 -0
- package/dist/esm/ui/icons/SuperscriptIcon.js +28 -0
- package/dist/esm/ui/icons/UnderlineIcon.js +2 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/ui/ToolbarDropdownDivider.d.ts +2 -2
- package/dist/types/ui/ToolbarTooltip.d.ts +3 -1
- package/dist/types/ui/icons/CodeIcon.d.ts +1 -0
- package/dist/types/ui/icons/StrikeThroughIcon.d.ts +1 -0
- package/dist/types/ui/icons/SubscriptIcon.d.ts +2 -0
- package/dist/types/ui/icons/SuperscriptIcon.d.ts +2 -0
- package/dist/types/ui/icons/UnderlineIcon.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +7 -0
- package/dist/types-ts4.5/ui/ToolbarDropdownDivider.d.ts +2 -2
- package/dist/types-ts4.5/ui/ToolbarTooltip.d.ts +3 -1
- package/dist/types-ts4.5/ui/icons/CodeIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/StrikeThroughIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/SubscriptIcon.d.ts +2 -0
- package/dist/types-ts4.5/ui/icons/SuperscriptIcon.d.ts +2 -0
- package/dist/types-ts4.5/ui/icons/UnderlineIcon.d.ts +1 -0
- package/package.json +2 -3
- package/src/index.ts +7 -0
- package/src/ui/Toolbar.tsx +1 -0
- package/src/ui/ToolbarButton.tsx +1 -0
- package/src/ui/ToolbarDropdownDivider.tsx +6 -3
- package/src/ui/ToolbarTooltip.tsx +8 -2
- package/src/ui/icons/CodeIcon.tsx +2 -0
- package/src/ui/icons/StrikeThroughIcon.tsx +2 -0
- package/src/ui/icons/SubscriptIcon.tsx +31 -0
- package/src/ui/icons/SuperscriptIcon.tsx +31 -0
- package/src/ui/icons/UnderlineIcon.tsx +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#197019](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/197019)
|
|
8
|
+
[`96717455eea97`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/96717455eea97) -
|
|
9
|
+
Add background colour to Toolbar component in editor-toolbar, add EditorToolbarProvider to the
|
|
10
|
+
selection Toolbar
|
|
11
|
+
|
|
12
|
+
## 0.0.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#195899](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/195899)
|
|
17
|
+
[`345c0b6478f73`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/345c0b6478f73) -
|
|
18
|
+
[ED-28682]
|
|
19
|
+
|
|
20
|
+
- Export more formatting icons
|
|
21
|
+
- Add optional position props to ToolbarTooltip dictating tooltip position
|
|
22
|
+
- Fix selected state for icon in ToolbarButton
|
|
23
|
+
|
|
3
24
|
## 0.0.8
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -93,6 +93,18 @@ Object.defineProperty(exports, "BoldIcon", {
|
|
|
93
93
|
return _BoldIcon.BoldIcon;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
+
Object.defineProperty(exports, "ClearFormattingIcon", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function get() {
|
|
99
|
+
return _ClearFormattingIcon.ClearFormattingIcon;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "CodeIcon", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function get() {
|
|
105
|
+
return _CodeIcon.CodeIcon;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
96
108
|
Object.defineProperty(exports, "CommentIcon", {
|
|
97
109
|
enumerable: true,
|
|
98
110
|
get: function get() {
|
|
@@ -189,6 +201,24 @@ Object.defineProperty(exports, "QuoteIcon", {
|
|
|
189
201
|
return _QuoteIcon.QuoteIcon;
|
|
190
202
|
}
|
|
191
203
|
});
|
|
204
|
+
Object.defineProperty(exports, "StrikeThroughIcon", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function get() {
|
|
207
|
+
return _StrikeThroughIcon.StrikeThroughIcon;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "SubscriptIcon", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function get() {
|
|
213
|
+
return _SubscriptIcon.SubscriptIcon;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "SuperscriptIcon", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function get() {
|
|
219
|
+
return _SuperscriptIcon.SuperscriptIcon;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
192
222
|
Object.defineProperty(exports, "TextColorIcon", {
|
|
193
223
|
enumerable: true,
|
|
194
224
|
get: function get() {
|
|
@@ -219,6 +249,12 @@ Object.defineProperty(exports, "ToolbarButtonGroup", {
|
|
|
219
249
|
return _ToolbarButtonGroup.ToolbarButtonGroup;
|
|
220
250
|
}
|
|
221
251
|
});
|
|
252
|
+
Object.defineProperty(exports, "ToolbarDropdownDivider", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function get() {
|
|
255
|
+
return _ToolbarDropdownDivider.ToolbarDropdownDivider;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
222
258
|
Object.defineProperty(exports, "ToolbarDropdownItem", {
|
|
223
259
|
enumerable: true,
|
|
224
260
|
get: function get() {
|
|
@@ -261,6 +297,12 @@ Object.defineProperty(exports, "ToolbarTooltip", {
|
|
|
261
297
|
return _ToolbarTooltip.ToolbarTooltip;
|
|
262
298
|
}
|
|
263
299
|
});
|
|
300
|
+
Object.defineProperty(exports, "UnderlineIcon", {
|
|
301
|
+
enumerable: true,
|
|
302
|
+
get: function get() {
|
|
303
|
+
return _UnderlineIcon.UnderlineIcon;
|
|
304
|
+
}
|
|
305
|
+
});
|
|
264
306
|
var _Toolbar = require("./ui/Toolbar");
|
|
265
307
|
var _ToolbarButton = require("./ui/ToolbarButton");
|
|
266
308
|
var _ToolbarButtonGroup = require("./ui/ToolbarButtonGroup");
|
|
@@ -271,6 +313,7 @@ var _ToolbarKeyboardShortcutHint = require("./ui/ToolbarKeyboardShortcutHint");
|
|
|
271
313
|
var _ToolbarSection = require("./ui/ToolbarSection");
|
|
272
314
|
var _ToolbarTooltip = require("./ui/ToolbarTooltip");
|
|
273
315
|
var _ToolbarNestedDropdownMenu = require("./ui/ToolbarNestedDropdownMenu");
|
|
316
|
+
var _ToolbarDropdownDivider = require("./ui/ToolbarDropdownDivider");
|
|
274
317
|
var _AIAdjustLengthIcon = require("./ui/icons/AIAdjustLengthIcon");
|
|
275
318
|
var _AIChatIcon = require("./ui/icons/AIChatIcon");
|
|
276
319
|
var _AIProfessionalIcon = require("./ui/icons/AIProfessionalIcon");
|
|
@@ -303,4 +346,10 @@ var _PinIcon = require("./ui/icons/PinIcon");
|
|
|
303
346
|
var _PinnedIcon = require("./ui/icons/PinnedIcon");
|
|
304
347
|
var _QuoteIcon = require("./ui/icons/QuoteIcon");
|
|
305
348
|
var _TextColorIcon = require("./ui/icons/TextColorIcon");
|
|
306
|
-
var _TextIcon = require("./ui/icons/TextIcon");
|
|
349
|
+
var _TextIcon = require("./ui/icons/TextIcon");
|
|
350
|
+
var _ClearFormattingIcon = require("./ui/icons/ClearFormattingIcon");
|
|
351
|
+
var _UnderlineIcon = require("./ui/icons/UnderlineIcon");
|
|
352
|
+
var _StrikeThroughIcon = require("./ui/icons/StrikeThroughIcon");
|
|
353
|
+
var _CodeIcon = require("./ui/icons/CodeIcon");
|
|
354
|
+
var _SubscriptIcon = require("./ui/icons/SubscriptIcon");
|
|
355
|
+
var _SuperscriptIcon = require("./ui/icons/SuperscriptIcon");
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -11,7 +11,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
13
13
|
var styles = {
|
|
14
|
-
toolbar: "_2rkoi2wt _u5f31b66 _19bv1b66 _16qs1cd0 _4t3i14no _1bsb184x _1e0c1txw _4cvr1h6o"
|
|
14
|
+
toolbar: "_2rkoi2wt _bfhkvuon _u5f31b66 _19bv1b66 _16qs1cd0 _4t3i14no _1bsb184x _1e0c1txw _4cvr1h6o"
|
|
15
15
|
};
|
|
16
16
|
var Toolbar = exports.Toolbar = function Toolbar(_ref) {
|
|
17
17
|
var children = _ref.children,
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
._qrwqidpf{border-top-right-radius:0}
|
|
22
22
|
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
23
23
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
24
|
+
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
24
25
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
25
26
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
26
27
|
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
@@ -16,7 +16,7 @@ var styles = {
|
|
|
16
16
|
button: "_zulp12x7 _2rkoiti9 _1e0c1txw _bfhksm61 _o5721q9c _4cvr1h6o _1bah1h6o _1tke1f4h _syaz1gjq _k48p1wq8 _19bvu2gc _u5f3u2gc _1ah3idpf _g0pbkb7n _oh03h2mm",
|
|
17
17
|
enabled: "_irr3166n _1di61dty",
|
|
18
18
|
disabled: "_syaz1lh4 _80om13gf",
|
|
19
|
-
selected: "_bfhkfg4m _irr3i1yw _1di619ru",
|
|
19
|
+
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru",
|
|
20
20
|
groupStart: "_qrwqidpf _1o0zidpf _1bahesu3 _19bv12x7 _u5f3v77o",
|
|
21
21
|
groupMiddle: "_13liidpf _mrkbidpf _qrwqidpf _1o0zidpf _19bv1b66 _u5f31b66",
|
|
22
22
|
groupEnd: "_13liidpf _mrkbidpf _1bah1y6m _19bvv77o _u5f312x7"
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/* ToolbarDropdownDivider.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.ToolbarDropdownDivider = void 0;
|
|
9
9
|
require("./ToolbarDropdownDivider.compiled.css");
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _runtime = require("@compiled/react/runtime");
|
|
11
|
-
var
|
|
12
|
-
var _compiled = require("@atlaskit/primitives/compiled");
|
|
12
|
+
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); }
|
|
13
13
|
var styles = {
|
|
14
14
|
divider: "_1o3imuej _1il9nqa1 _1doce4h9"
|
|
15
15
|
};
|
|
16
16
|
var ToolbarDropdownDivider = exports.ToolbarDropdownDivider = function ToolbarDropdownDivider() {
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: (0, _runtime.ax)([styles.divider])
|
|
19
19
|
});
|
|
20
20
|
};
|
|
@@ -9,8 +9,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
10
10
|
var ToolbarTooltip = exports.ToolbarTooltip = function ToolbarTooltip(_ref) {
|
|
11
11
|
var content = _ref.content,
|
|
12
|
-
children = _ref.children
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
_ref$position = _ref.position,
|
|
14
|
+
position = _ref$position === void 0 ? 'top' : _ref$position;
|
|
13
15
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
14
|
-
content: content
|
|
16
|
+
content: content,
|
|
17
|
+
position: position
|
|
15
18
|
}, children);
|
|
16
19
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "CodeIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _angleBrackets.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _angleBrackets = _interopRequireDefault(require("@atlaskit/icon/core/angle-brackets"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "StrikeThroughIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _textStrikethrough.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _textStrikethrough = _interopRequireDefault(require("@atlaskit/icon/core/text-strikethrough"));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SubscriptIcon = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
10
|
+
|
|
11
|
+
var SVGContainer = function SVGContainer(_ref) {
|
|
12
|
+
var children = _ref.children;
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
14
|
+
style: {
|
|
15
|
+
width: "var(--ds-space-200, 16px)",
|
|
16
|
+
height: "var(--ds-space-200, 16px)",
|
|
17
|
+
display: 'flex',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
alignItems: 'center'
|
|
20
|
+
}
|
|
21
|
+
}, children);
|
|
22
|
+
};
|
|
23
|
+
var SubscriptIcon = exports.SubscriptIcon = function SubscriptIcon() {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(SVGContainer, null, /*#__PURE__*/_react.default.createElement("svg", {
|
|
25
|
+
width: "16",
|
|
26
|
+
height: "16",
|
|
27
|
+
viewBox: "0 0 16 16",
|
|
28
|
+
fill: "none",
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
31
|
+
"fill-rule": "evenodd",
|
|
32
|
+
"clip-rule": "evenodd",
|
|
33
|
+
d: "M5.10609 6.54799L7.88895 2.09448L9.16102 2.88936L5.99047 7.9633L9.21219 13.1191L7.94012 13.914L5.10609 9.37861L2.27207 13.914L1 13.1191L4.2217 7.9633L1.05117 2.88939L2.32324 2.09451L5.10609 6.54799ZM10.858 15.0001V13.696H12.3499V10.3153L10.8418 11.4343V9.86413L12.3138 8.83114H13.8161V13.696H14.9999V15.0001H10.858Z",
|
|
34
|
+
fill: "currentColor"
|
|
35
|
+
})));
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SuperscriptIcon = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
10
|
+
|
|
11
|
+
var SVGContainer = function SVGContainer(_ref) {
|
|
12
|
+
var children = _ref.children;
|
|
13
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
14
|
+
style: {
|
|
15
|
+
width: "var(--ds-space-200, 16px)",
|
|
16
|
+
height: "var(--ds-space-200, 16px)",
|
|
17
|
+
display: 'flex',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
alignItems: 'center'
|
|
20
|
+
}
|
|
21
|
+
}, children);
|
|
22
|
+
};
|
|
23
|
+
var SuperscriptIcon = exports.SuperscriptIcon = function SuperscriptIcon() {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(SVGContainer, null, /*#__PURE__*/_react.default.createElement("svg", {
|
|
25
|
+
width: "16",
|
|
26
|
+
height: "16",
|
|
27
|
+
viewBox: "0 0 16 16",
|
|
28
|
+
fill: "none",
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
31
|
+
"fill-rule": "evenodd",
|
|
32
|
+
"clip-rule": "evenodd",
|
|
33
|
+
d: "M10.858 7.16892V5.86487H12.3499V2.4842L10.8418 3.60312V2.03298L12.3138 1H13.8161V5.86487H14.9999V7.16892H10.858ZM5.10609 6.5479L7.88895 2.09439L9.16102 2.88927L5.99047 7.96321L9.21219 13.119L7.94012 13.9139L5.10609 9.37852L2.27207 13.9139L1 13.119L4.2217 7.96321L1.05117 2.8893L2.32324 2.09442L5.10609 6.5479Z",
|
|
34
|
+
fill: "currentColor"
|
|
35
|
+
})));
|
|
36
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "UnderlineIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _textUnderline.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _textUnderline = _interopRequireDefault(require("@atlaskit/icon/core/text-underline"));
|
package/dist/es2019/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
|
|
|
9
9
|
export { ToolbarSection } from './ui/ToolbarSection';
|
|
10
10
|
export { ToolbarTooltip } from './ui/ToolbarTooltip';
|
|
11
11
|
export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
|
|
12
|
+
export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
|
|
12
13
|
export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
|
|
13
14
|
export { AIChatIcon } from './ui/icons/AIChatIcon';
|
|
14
15
|
export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
|
|
@@ -41,4 +42,10 @@ export { PinIcon } from './ui/icons/PinIcon';
|
|
|
41
42
|
export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
42
43
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
43
44
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
44
|
-
export { TextIcon } from './ui/icons/TextIcon';
|
|
45
|
+
export { TextIcon } from './ui/icons/TextIcon';
|
|
46
|
+
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
47
|
+
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
48
|
+
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
49
|
+
export { CodeIcon } from './ui/icons/CodeIcon';
|
|
50
|
+
export { SubscriptIcon } from './ui/icons/SubscriptIcon';
|
|
51
|
+
export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
6
|
const styles = {
|
|
7
|
-
toolbar: "_2rkoi2wt _u5f31b66 _19bv1b66 _16qs1cd0 _4t3i14no _1bsb184x _1e0c1txw _4cvr1h6o"
|
|
7
|
+
toolbar: "_2rkoi2wt _bfhkvuon _u5f31b66 _19bv1b66 _16qs1cd0 _4t3i14no _1bsb184x _1e0c1txw _4cvr1h6o"
|
|
8
8
|
};
|
|
9
9
|
export const Toolbar = ({
|
|
10
10
|
children,
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
._qrwqidpf{border-top-right-radius:0}
|
|
22
22
|
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
23
23
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
24
|
+
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
24
25
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
25
26
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
26
27
|
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
@@ -8,7 +8,7 @@ const styles = {
|
|
|
8
8
|
button: "_zulp12x7 _2rkoiti9 _1e0c1txw _bfhksm61 _o5721q9c _4cvr1h6o _1bah1h6o _1tke1f4h _syaz1gjq _k48p1wq8 _19bvu2gc _u5f3u2gc _1ah3idpf _g0pbkb7n _oh03h2mm",
|
|
9
9
|
enabled: "_irr3166n _1di61dty",
|
|
10
10
|
disabled: "_syaz1lh4 _80om13gf",
|
|
11
|
-
selected: "_bfhkfg4m _irr3i1yw _1di619ru",
|
|
11
|
+
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru",
|
|
12
12
|
groupStart: "_qrwqidpf _1o0zidpf _1bahesu3 _19bv12x7 _u5f3v77o",
|
|
13
13
|
groupMiddle: "_13liidpf _mrkbidpf _qrwqidpf _1o0zidpf _19bv1b66 _u5f31b66",
|
|
14
14
|
groupEnd: "_13liidpf _mrkbidpf _1bah1y6m _19bvv77o _u5f312x7"
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/* ToolbarDropdownDivider.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./ToolbarDropdownDivider.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
5
|
const styles = {
|
|
7
6
|
divider: "_1o3imuej _1il9nqa1 _1doce4h9"
|
|
8
7
|
};
|
|
9
8
|
export const ToolbarDropdownDivider = () => {
|
|
10
|
-
return /*#__PURE__*/React.createElement(
|
|
11
|
-
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: ax([styles.divider])
|
|
12
11
|
});
|
|
13
12
|
};
|
|
@@ -2,9 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import Tooltip from '@atlaskit/tooltip';
|
|
3
3
|
export const ToolbarTooltip = ({
|
|
4
4
|
content,
|
|
5
|
-
children
|
|
5
|
+
children,
|
|
6
|
+
position = 'top'
|
|
6
7
|
}) => {
|
|
7
8
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
8
|
-
content: content
|
|
9
|
+
content: content,
|
|
10
|
+
position: position
|
|
9
11
|
}, children);
|
|
10
12
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const SVGContainer = ({
|
|
4
|
+
children
|
|
5
|
+
}) => /*#__PURE__*/React.createElement("span", {
|
|
6
|
+
style: {
|
|
7
|
+
width: "var(--ds-space-200, 16px)",
|
|
8
|
+
height: "var(--ds-space-200, 16px)",
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center'
|
|
12
|
+
}
|
|
13
|
+
}, children);
|
|
14
|
+
export const SubscriptIcon = () => /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
|
|
15
|
+
width: "16",
|
|
16
|
+
height: "16",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
fill: "none",
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
"fill-rule": "evenodd",
|
|
22
|
+
"clip-rule": "evenodd",
|
|
23
|
+
d: "M5.10609 6.54799L7.88895 2.09448L9.16102 2.88936L5.99047 7.9633L9.21219 13.1191L7.94012 13.914L5.10609 9.37861L2.27207 13.914L1 13.1191L4.2217 7.9633L1.05117 2.88939L2.32324 2.09451L5.10609 6.54799ZM10.858 15.0001V13.696H12.3499V10.3153L10.8418 11.4343V9.86413L12.3138 8.83114H13.8161V13.696H14.9999V15.0001H10.858Z",
|
|
24
|
+
fill: "currentColor"
|
|
25
|
+
})));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
const SVGContainer = ({
|
|
4
|
+
children
|
|
5
|
+
}) => /*#__PURE__*/React.createElement("span", {
|
|
6
|
+
style: {
|
|
7
|
+
width: "var(--ds-space-200, 16px)",
|
|
8
|
+
height: "var(--ds-space-200, 16px)",
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center'
|
|
12
|
+
}
|
|
13
|
+
}, children);
|
|
14
|
+
export const SuperscriptIcon = () => /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
|
|
15
|
+
width: "16",
|
|
16
|
+
height: "16",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
fill: "none",
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
"fill-rule": "evenodd",
|
|
22
|
+
"clip-rule": "evenodd",
|
|
23
|
+
d: "M10.858 7.16892V5.86487H12.3499V2.4842L10.8418 3.60312V2.03298L12.3138 1H13.8161V5.86487H14.9999V7.16892H10.858ZM5.10609 6.5479L7.88895 2.09439L9.16102 2.88927L5.99047 7.96321L9.21219 13.119L7.94012 13.9139L5.10609 9.37852L2.27207 13.9139L1 13.119L4.2217 7.96321L1.05117 2.8893L2.32324 2.09442L5.10609 6.5479Z",
|
|
24
|
+
fill: "currentColor"
|
|
25
|
+
})));
|
package/dist/esm/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
|
|
|
9
9
|
export { ToolbarSection } from './ui/ToolbarSection';
|
|
10
10
|
export { ToolbarTooltip } from './ui/ToolbarTooltip';
|
|
11
11
|
export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
|
|
12
|
+
export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
|
|
12
13
|
export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
|
|
13
14
|
export { AIChatIcon } from './ui/icons/AIChatIcon';
|
|
14
15
|
export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
|
|
@@ -41,4 +42,10 @@ export { PinIcon } from './ui/icons/PinIcon';
|
|
|
41
42
|
export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
42
43
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
43
44
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
44
|
-
export { TextIcon } from './ui/icons/TextIcon';
|
|
45
|
+
export { TextIcon } from './ui/icons/TextIcon';
|
|
46
|
+
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
47
|
+
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
48
|
+
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
49
|
+
export { CodeIcon } from './ui/icons/CodeIcon';
|
|
50
|
+
export { SubscriptIcon } from './ui/icons/SubscriptIcon';
|
|
51
|
+
export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
6
|
var styles = {
|
|
7
|
-
toolbar: "_2rkoi2wt _u5f31b66 _19bv1b66 _16qs1cd0 _4t3i14no _1bsb184x _1e0c1txw _4cvr1h6o"
|
|
7
|
+
toolbar: "_2rkoi2wt _bfhkvuon _u5f31b66 _19bv1b66 _16qs1cd0 _4t3i14no _1bsb184x _1e0c1txw _4cvr1h6o"
|
|
8
8
|
};
|
|
9
9
|
export var Toolbar = function Toolbar(_ref) {
|
|
10
10
|
var children = _ref.children,
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
._qrwqidpf{border-top-right-radius:0}
|
|
22
22
|
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
23
23
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
24
|
+
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
24
25
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
25
26
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
26
27
|
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
@@ -8,7 +8,7 @@ var styles = {
|
|
|
8
8
|
button: "_zulp12x7 _2rkoiti9 _1e0c1txw _bfhksm61 _o5721q9c _4cvr1h6o _1bah1h6o _1tke1f4h _syaz1gjq _k48p1wq8 _19bvu2gc _u5f3u2gc _1ah3idpf _g0pbkb7n _oh03h2mm",
|
|
9
9
|
enabled: "_irr3166n _1di61dty",
|
|
10
10
|
disabled: "_syaz1lh4 _80om13gf",
|
|
11
|
-
selected: "_bfhkfg4m _irr3i1yw _1di619ru",
|
|
11
|
+
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru",
|
|
12
12
|
groupStart: "_qrwqidpf _1o0zidpf _1bahesu3 _19bv12x7 _u5f3v77o",
|
|
13
13
|
groupMiddle: "_13liidpf _mrkbidpf _qrwqidpf _1o0zidpf _19bv1b66 _u5f31b66",
|
|
14
14
|
groupEnd: "_13liidpf _mrkbidpf _1bah1y6m _19bvv77o _u5f312x7"
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/* ToolbarDropdownDivider.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./ToolbarDropdownDivider.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
5
|
var styles = {
|
|
7
6
|
divider: "_1o3imuej _1il9nqa1 _1doce4h9"
|
|
8
7
|
};
|
|
9
8
|
export var ToolbarDropdownDivider = function ToolbarDropdownDivider() {
|
|
10
|
-
return /*#__PURE__*/React.createElement(
|
|
11
|
-
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: ax([styles.divider])
|
|
12
11
|
});
|
|
13
12
|
};
|
|
@@ -2,8 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import Tooltip from '@atlaskit/tooltip';
|
|
3
3
|
export var ToolbarTooltip = function ToolbarTooltip(_ref) {
|
|
4
4
|
var content = _ref.content,
|
|
5
|
-
children = _ref.children
|
|
5
|
+
children = _ref.children,
|
|
6
|
+
_ref$position = _ref.position,
|
|
7
|
+
position = _ref$position === void 0 ? 'top' : _ref$position;
|
|
6
8
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
7
|
-
content: content
|
|
9
|
+
content: content,
|
|
10
|
+
position: position
|
|
8
11
|
}, children);
|
|
9
12
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
var SVGContainer = function SVGContainer(_ref) {
|
|
4
|
+
var children = _ref.children;
|
|
5
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
6
|
+
style: {
|
|
7
|
+
width: "var(--ds-space-200, 16px)",
|
|
8
|
+
height: "var(--ds-space-200, 16px)",
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center'
|
|
12
|
+
}
|
|
13
|
+
}, children);
|
|
14
|
+
};
|
|
15
|
+
export var SubscriptIcon = function SubscriptIcon() {
|
|
16
|
+
return /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
|
|
17
|
+
width: "16",
|
|
18
|
+
height: "16",
|
|
19
|
+
viewBox: "0 0 16 16",
|
|
20
|
+
fill: "none",
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
"fill-rule": "evenodd",
|
|
24
|
+
"clip-rule": "evenodd",
|
|
25
|
+
d: "M5.10609 6.54799L7.88895 2.09448L9.16102 2.88936L5.99047 7.9633L9.21219 13.1191L7.94012 13.914L5.10609 9.37861L2.27207 13.914L1 13.1191L4.2217 7.9633L1.05117 2.88939L2.32324 2.09451L5.10609 6.54799ZM10.858 15.0001V13.696H12.3499V10.3153L10.8418 11.4343V9.86413L12.3138 8.83114H13.8161V13.696H14.9999V15.0001H10.858Z",
|
|
26
|
+
fill: "currentColor"
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
var SVGContainer = function SVGContainer(_ref) {
|
|
4
|
+
var children = _ref.children;
|
|
5
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
6
|
+
style: {
|
|
7
|
+
width: "var(--ds-space-200, 16px)",
|
|
8
|
+
height: "var(--ds-space-200, 16px)",
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center'
|
|
12
|
+
}
|
|
13
|
+
}, children);
|
|
14
|
+
};
|
|
15
|
+
export var SuperscriptIcon = function SuperscriptIcon() {
|
|
16
|
+
return /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
|
|
17
|
+
width: "16",
|
|
18
|
+
height: "16",
|
|
19
|
+
viewBox: "0 0 16 16",
|
|
20
|
+
fill: "none",
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
"fill-rule": "evenodd",
|
|
24
|
+
"clip-rule": "evenodd",
|
|
25
|
+
d: "M10.858 7.16892V5.86487H12.3499V2.4842L10.8418 3.60312V2.03298L12.3138 1H13.8161V5.86487H14.9999V7.16892H10.858ZM5.10609 6.5479L7.88895 2.09439L9.16102 2.88927L5.99047 7.96321L9.21219 13.119L7.94012 13.9139L5.10609 9.37852L2.27207 13.9139L1 13.119L4.2217 7.96321L1.05117 2.8893L2.32324 2.09442L5.10609 6.5479Z",
|
|
26
|
+
fill: "currentColor"
|
|
27
|
+
})));
|
|
28
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
|
|
|
8
8
|
export { ToolbarSection } from './ui/ToolbarSection';
|
|
9
9
|
export { ToolbarTooltip } from './ui/ToolbarTooltip';
|
|
10
10
|
export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
|
|
11
|
+
export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
|
|
11
12
|
export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
|
|
12
13
|
export { AIChatIcon } from './ui/icons/AIChatIcon';
|
|
13
14
|
export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
|
|
@@ -41,4 +42,10 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
|
41
42
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
42
43
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
43
44
|
export { TextIcon } from './ui/icons/TextIcon';
|
|
45
|
+
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
46
|
+
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
47
|
+
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
48
|
+
export { CodeIcon } from './ui/icons/CodeIcon';
|
|
49
|
+
export { SubscriptIcon } from './ui/icons/SubscriptIcon';
|
|
50
|
+
export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
|
|
44
51
|
export type { IconComponent, ToolbarButtonGroupLocation } from './types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ToolbarDropdownDivider: () =>
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ToolbarDropdownDivider: () => JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { PositionType } from '@atlaskit/tooltip';
|
|
2
3
|
type ToolbarTooltipProps = {
|
|
3
4
|
content: string;
|
|
4
5
|
children: React.ReactNode;
|
|
6
|
+
position?: PositionType;
|
|
5
7
|
};
|
|
6
|
-
export declare const ToolbarTooltip: ({ content, children }: ToolbarTooltipProps) => React.JSX.Element;
|
|
8
|
+
export declare const ToolbarTooltip: ({ content, children, position }: ToolbarTooltipProps) => React.JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CodeIcon } from '@atlaskit/icon/core/angle-brackets';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StrikeThroughIcon } from '@atlaskit/icon/core/text-strikethrough';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UnderlineIcon } from '@atlaskit/icon/core/text-underline';
|
|
@@ -8,6 +8,7 @@ export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
|
|
|
8
8
|
export { ToolbarSection } from './ui/ToolbarSection';
|
|
9
9
|
export { ToolbarTooltip } from './ui/ToolbarTooltip';
|
|
10
10
|
export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
|
|
11
|
+
export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
|
|
11
12
|
export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
|
|
12
13
|
export { AIChatIcon } from './ui/icons/AIChatIcon';
|
|
13
14
|
export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
|
|
@@ -41,4 +42,10 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
|
41
42
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
42
43
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
43
44
|
export { TextIcon } from './ui/icons/TextIcon';
|
|
45
|
+
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
46
|
+
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
47
|
+
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
48
|
+
export { CodeIcon } from './ui/icons/CodeIcon';
|
|
49
|
+
export { SubscriptIcon } from './ui/icons/SubscriptIcon';
|
|
50
|
+
export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
|
|
44
51
|
export type { IconComponent, ToolbarButtonGroupLocation } from './types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ToolbarDropdownDivider: () =>
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ToolbarDropdownDivider: () => JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { PositionType } from '@atlaskit/tooltip';
|
|
2
3
|
type ToolbarTooltipProps = {
|
|
3
4
|
content: string;
|
|
4
5
|
children: React.ReactNode;
|
|
6
|
+
position?: PositionType;
|
|
5
7
|
};
|
|
6
|
-
export declare const ToolbarTooltip: ({ content, children }: ToolbarTooltipProps) => React.JSX.Element;
|
|
8
|
+
export declare const ToolbarTooltip: ({ content, children, position }: ToolbarTooltipProps) => React.JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CodeIcon } from '@atlaskit/icon/core/angle-brackets';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StrikeThroughIcon } from '@atlaskit/icon/core/text-strikethrough';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UnderlineIcon } from '@atlaskit/icon/core/text-underline';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.10",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor: Jenga",
|
|
@@ -47,8 +47,7 @@
|
|
|
47
47
|
"@atlaskit/ssr": "workspace:^",
|
|
48
48
|
"@atlaskit/visual-regression": "workspace:^",
|
|
49
49
|
"@testing-library/react": "^13.4.0",
|
|
50
|
-
"react-dom": "^18.2.0"
|
|
51
|
-
"typescript": "~5.4.2"
|
|
50
|
+
"react-dom": "^18.2.0"
|
|
52
51
|
},
|
|
53
52
|
"techstack": {
|
|
54
53
|
"@atlassian/frontend": {
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
|
|
|
9
9
|
export { ToolbarSection } from './ui/ToolbarSection';
|
|
10
10
|
export { ToolbarTooltip } from './ui/ToolbarTooltip';
|
|
11
11
|
export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
|
|
12
|
+
export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
|
|
12
13
|
|
|
13
14
|
export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
|
|
14
15
|
export { AIChatIcon } from './ui/icons/AIChatIcon';
|
|
@@ -43,5 +44,11 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
|
43
44
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
44
45
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
45
46
|
export { TextIcon } from './ui/icons/TextIcon';
|
|
47
|
+
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
48
|
+
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
49
|
+
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
50
|
+
export { CodeIcon } from './ui/icons/CodeIcon';
|
|
51
|
+
export { SubscriptIcon } from './ui/icons/SubscriptIcon';
|
|
52
|
+
export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
|
|
46
53
|
|
|
47
54
|
export type { IconComponent, ToolbarButtonGroupLocation } from './types';
|
package/src/ui/Toolbar.tsx
CHANGED
package/src/ui/ToolbarButton.tsx
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { jsx } from '@compiled/react';
|
|
2
6
|
|
|
3
7
|
import { cssMap } from '@atlaskit/css';
|
|
4
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
8
|
import { token } from '@atlaskit/tokens';
|
|
6
9
|
|
|
7
10
|
const styles = cssMap({
|
|
@@ -13,5 +16,5 @@ const styles = cssMap({
|
|
|
13
16
|
});
|
|
14
17
|
|
|
15
18
|
export const ToolbarDropdownDivider = () => {
|
|
16
|
-
return <
|
|
19
|
+
return <div css={styles.divider} />;
|
|
17
20
|
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import type { PositionType } from '@atlaskit/tooltip';
|
|
3
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
5
|
|
|
5
6
|
type ToolbarTooltipProps = {
|
|
6
7
|
content: string;
|
|
7
8
|
children: React.ReactNode;
|
|
9
|
+
position?: PositionType;
|
|
8
10
|
};
|
|
9
11
|
|
|
10
|
-
export const ToolbarTooltip = ({ content, children }: ToolbarTooltipProps) => {
|
|
11
|
-
return
|
|
12
|
+
export const ToolbarTooltip = ({ content, children, position = 'top' }: ToolbarTooltipProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<Tooltip content={content} position={position}>
|
|
15
|
+
{children}
|
|
16
|
+
</Tooltip>
|
|
17
|
+
);
|
|
12
18
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
5
|
+
|
|
6
|
+
const SVGContainer = ({ children }: React.PropsWithChildren<object>) => (
|
|
7
|
+
<span
|
|
8
|
+
style={{
|
|
9
|
+
width: token('space.200', '16px'),
|
|
10
|
+
height: token('space.200', '16px'),
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</span>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const SubscriptIcon = () => (
|
|
21
|
+
<SVGContainer>
|
|
22
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
+
<path
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
clip-rule="evenodd"
|
|
26
|
+
d="M5.10609 6.54799L7.88895 2.09448L9.16102 2.88936L5.99047 7.9633L9.21219 13.1191L7.94012 13.914L5.10609 9.37861L2.27207 13.914L1 13.1191L4.2217 7.9633L1.05117 2.88939L2.32324 2.09451L5.10609 6.54799ZM10.858 15.0001V13.696H12.3499V10.3153L10.8418 11.4343V9.86413L12.3138 8.83114H13.8161V13.696H14.9999V15.0001H10.858Z"
|
|
27
|
+
fill="currentColor"
|
|
28
|
+
/>
|
|
29
|
+
</svg>
|
|
30
|
+
</SVGContainer>
|
|
31
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
5
|
+
|
|
6
|
+
const SVGContainer = ({ children }: React.PropsWithChildren<object>) => (
|
|
7
|
+
<span
|
|
8
|
+
style={{
|
|
9
|
+
width: token('space.200', '16px'),
|
|
10
|
+
height: token('space.200', '16px'),
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
{children}
|
|
17
|
+
</span>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const SuperscriptIcon = () => (
|
|
21
|
+
<SVGContainer>
|
|
22
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
+
<path
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
clip-rule="evenodd"
|
|
26
|
+
d="M10.858 7.16892V5.86487H12.3499V2.4842L10.8418 3.60312V2.03298L12.3138 1H13.8161V5.86487H14.9999V7.16892H10.858ZM5.10609 6.5479L7.88895 2.09439L9.16102 2.88927L5.99047 7.96321L9.21219 13.119L7.94012 13.9139L5.10609 9.37852L2.27207 13.9139L1 13.119L4.2217 7.96321L1.05117 2.8893L2.32324 2.09442L5.10609 6.5479Z"
|
|
27
|
+
fill="currentColor"
|
|
28
|
+
/>
|
|
29
|
+
</svg>
|
|
30
|
+
</SVGContainer>
|
|
31
|
+
);
|