@atlaskit/editor-toolbar 0.3.0 → 0.3.2
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 +22 -0
- package/dist/cjs/index.js +42 -7
- package/dist/cjs/ui/ToolbarButton.compiled.css +1 -13
- package/dist/cjs/ui/ToolbarButton.js +2 -6
- package/dist/cjs/ui/ToolbarButtonGroup.compiled.css +7 -1
- package/dist/cjs/ui/ToolbarButtonGroup.js +17 -5
- package/dist/cjs/ui/ToolbarDropdownItem.compiled.css +4 -2
- package/dist/cjs/ui/ToolbarDropdownItem.js +1 -1
- package/dist/cjs/ui/ToolbarDropdownItemSection.js +7 -10
- package/dist/cjs/ui/ToolbarDropdownMenu.compiled.css +1 -0
- package/dist/cjs/ui/ToolbarDropdownMenu.js +12 -6
- package/dist/cjs/ui/icons/EmojiIcon.js +13 -0
- package/dist/cjs/ui/icons/ImageIcon.js +13 -0
- package/dist/cjs/ui/icons/LayoutIcon.js +13 -0
- package/dist/cjs/ui/icons/MentionIcon.js +13 -0
- package/dist/cjs/ui/icons/TableIcon.js +13 -0
- package/dist/cjs/ui/icons/TaskIcon.js +13 -0
- package/dist/es2019/index.js +6 -1
- package/dist/es2019/ui/ToolbarButton.compiled.css +1 -13
- package/dist/es2019/ui/ToolbarButton.js +2 -6
- package/dist/es2019/ui/ToolbarButtonGroup.compiled.css +7 -1
- package/dist/es2019/ui/ToolbarButtonGroup.js +14 -3
- package/dist/es2019/ui/ToolbarDropdownItem.compiled.css +4 -2
- package/dist/es2019/ui/ToolbarDropdownItem.js +1 -1
- package/dist/es2019/ui/ToolbarDropdownItemSection.js +7 -10
- package/dist/es2019/ui/ToolbarDropdownMenu.compiled.css +1 -0
- package/dist/es2019/ui/ToolbarDropdownMenu.js +11 -6
- package/dist/es2019/ui/icons/EmojiIcon.js +2 -0
- package/dist/es2019/ui/icons/ImageIcon.js +2 -0
- package/dist/es2019/ui/icons/LayoutIcon.js +2 -0
- package/dist/es2019/ui/icons/MentionIcon.js +2 -0
- package/dist/es2019/ui/icons/TableIcon.js +2 -0
- package/dist/es2019/ui/icons/TaskIcon.js +2 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/ui/ToolbarButton.compiled.css +1 -13
- package/dist/esm/ui/ToolbarButton.js +2 -6
- package/dist/esm/ui/ToolbarButtonGroup.compiled.css +7 -1
- package/dist/esm/ui/ToolbarButtonGroup.js +14 -3
- package/dist/esm/ui/ToolbarDropdownItem.compiled.css +4 -2
- package/dist/esm/ui/ToolbarDropdownItem.js +1 -1
- package/dist/esm/ui/ToolbarDropdownItemSection.js +7 -10
- package/dist/esm/ui/ToolbarDropdownMenu.compiled.css +1 -0
- package/dist/esm/ui/ToolbarDropdownMenu.js +12 -6
- package/dist/esm/ui/icons/EmojiIcon.js +2 -0
- package/dist/esm/ui/icons/ImageIcon.js +2 -0
- package/dist/esm/ui/icons/LayoutIcon.js +2 -0
- package/dist/esm/ui/icons/MentionIcon.js +2 -0
- package/dist/esm/ui/icons/TableIcon.js +2 -0
- package/dist/esm/ui/icons/TaskIcon.js +2 -0
- package/dist/types/index.d.ts +7 -2
- package/dist/types/types.d.ts +0 -1
- package/dist/types/ui/ToolbarButton.d.ts +0 -2
- package/dist/types/ui/ToolbarButtonGroup.d.ts +6 -2
- package/dist/types/ui/ToolbarDropdownItemSection.d.ts +3 -1
- package/dist/types/ui/ToolbarDropdownMenu.d.ts +9 -6
- package/dist/types/ui/ToolbarDropdownMenuContext.d.ts +1 -1
- package/dist/types/ui/ToolbarTooltip.d.ts +1 -1
- package/dist/types/ui/icons/EmojiIcon.d.ts +1 -0
- package/dist/types/ui/icons/ImageIcon.d.ts +1 -0
- package/dist/types/ui/icons/LayoutIcon.d.ts +1 -0
- package/dist/types/ui/icons/MentionIcon.d.ts +1 -0
- package/dist/types/ui/icons/TableIcon.d.ts +1 -0
- package/dist/types/ui/icons/TaskIcon.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +7 -2
- package/dist/types-ts4.5/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/ToolbarButton.d.ts +0 -2
- package/dist/types-ts4.5/ui/ToolbarButtonGroup.d.ts +6 -2
- package/dist/types-ts4.5/ui/ToolbarDropdownItemSection.d.ts +3 -1
- package/dist/types-ts4.5/ui/ToolbarDropdownMenu.d.ts +9 -6
- package/dist/types-ts4.5/ui/ToolbarDropdownMenuContext.d.ts +1 -1
- package/dist/types-ts4.5/ui/ToolbarTooltip.d.ts +1 -1
- package/dist/types-ts4.5/ui/icons/EmojiIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/ImageIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/LayoutIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/MentionIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/TableIcon.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/TaskIcon.d.ts +1 -0
- package/examples/toolbar/examples/ExampleManuallyComposedToolbar.tsx +2 -12
- package/package.json +3 -3
- package/src/index.ts +7 -2
- package/src/types.ts +0 -1
- package/src/ui/ColorPalette/Color.tsx +64 -56
- package/src/ui/ToolbarButton.tsx +0 -28
- package/src/ui/ToolbarButtonGroup.tsx +42 -3
- package/src/ui/ToolbarDropdownItem.tsx +4 -2
- package/src/ui/ToolbarDropdownItemSection.tsx +13 -11
- package/src/ui/ToolbarDropdownMenu.tsx +28 -15
- package/src/ui/ToolbarDropdownMenuContext.tsx +4 -4
- package/src/ui/ToolbarTooltip.tsx +1 -1
- package/src/ui/icons/EmojiIcon.tsx +2 -0
- package/src/ui/icons/ImageIcon.tsx +2 -0
- package/src/ui/icons/LayoutIcon.tsx +2 -0
- package/src/ui/icons/MentionIcon.tsx +2 -0
- package/src/ui/icons/TableIcon.tsx +2 -0
- package/src/ui/icons/TaskIcon.tsx +2 -0
- package/dist/cjs/ui/ToolbarDropdownDivider.compiled.css +0 -3
- package/dist/cjs/ui/ToolbarDropdownDivider.js +0 -20
- package/dist/cjs/ui/ToolbarDropdownItemSection.compiled.css +0 -2
- package/dist/es2019/ui/ToolbarDropdownDivider.compiled.css +0 -3
- package/dist/es2019/ui/ToolbarDropdownDivider.js +0 -12
- package/dist/es2019/ui/ToolbarDropdownItemSection.compiled.css +0 -2
- package/dist/esm/ui/ToolbarDropdownDivider.compiled.css +0 -3
- package/dist/esm/ui/ToolbarDropdownDivider.js +0 -12
- package/dist/esm/ui/ToolbarDropdownItemSection.compiled.css +0 -2
- package/dist/types/ui/ToolbarDropdownDivider.d.ts +0 -1
- package/dist/types-ts4.5/ui/ToolbarDropdownDivider.d.ts +0 -1
- package/src/ui/ToolbarDropdownDivider.tsx +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c3b98666f3840`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c3b98666f3840) -
|
|
8
|
+
[ux] ED-28740 register insert block items to new toolbar behind platform_editor_toolbar_aifc
|
|
9
|
+
|
|
10
|
+
## 0.3.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`3145f278b1f7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3145f278b1f7a) -
|
|
15
|
+
[ux] [ED-28473] minor UI updates for editor-toolbar
|
|
16
|
+
|
|
17
|
+
- Use ADS ButtonGroup for ToolbarButtonGroup
|
|
18
|
+
- Remove groupLocation prop and use CSS instead
|
|
19
|
+
- Use DropdownItemGroup for ToolbarDropdownItemSection and expand props for section separator and
|
|
20
|
+
title
|
|
21
|
+
- Support ReactNode as content for ToolbarTooltip and add missing shortcuts in tooltips
|
|
22
|
+
- Center Icons for split buttons and make chevron icon 24px wide
|
|
23
|
+
- Align dropdown menu UI with current editor design
|
|
24
|
+
|
|
3
25
|
## 0.3.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -136,6 +136,12 @@ Object.defineProperty(exports, "CommentIcon", {
|
|
|
136
136
|
return _CommentIcon.CommentIcon;
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
|
+
Object.defineProperty(exports, "EmojiIcon", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function get() {
|
|
142
|
+
return _EmojiIcon.EmojiIcon;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
139
145
|
Object.defineProperty(exports, "HeadingFiveIcon", {
|
|
140
146
|
enumerable: true,
|
|
141
147
|
get: function get() {
|
|
@@ -172,6 +178,12 @@ Object.defineProperty(exports, "HeadingTwoIcon", {
|
|
|
172
178
|
return _HeadingTwoIcon.HeadingTwoIcon;
|
|
173
179
|
}
|
|
174
180
|
});
|
|
181
|
+
Object.defineProperty(exports, "ImageIcon", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function get() {
|
|
184
|
+
return _ImageIcon.ImageIcon;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
175
187
|
Object.defineProperty(exports, "IndentIcon", {
|
|
176
188
|
enumerable: true,
|
|
177
189
|
get: function get() {
|
|
@@ -184,6 +196,12 @@ Object.defineProperty(exports, "ItalicIcon", {
|
|
|
184
196
|
return _ItalicIcon.ItalicIcon;
|
|
185
197
|
}
|
|
186
198
|
});
|
|
199
|
+
Object.defineProperty(exports, "LayoutIcon", {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function get() {
|
|
202
|
+
return _LayoutIcon.LayoutIcon;
|
|
203
|
+
}
|
|
204
|
+
});
|
|
187
205
|
Object.defineProperty(exports, "LinkIcon", {
|
|
188
206
|
enumerable: true,
|
|
189
207
|
get: function get() {
|
|
@@ -202,6 +220,12 @@ Object.defineProperty(exports, "ListNumberedIcon", {
|
|
|
202
220
|
return _ListNumberedIcon.ListNumberedIcon;
|
|
203
221
|
}
|
|
204
222
|
});
|
|
223
|
+
Object.defineProperty(exports, "MentionIcon", {
|
|
224
|
+
enumerable: true,
|
|
225
|
+
get: function get() {
|
|
226
|
+
return _MentionIcon.MentionIcon;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
205
229
|
Object.defineProperty(exports, "MoreItemsIcon", {
|
|
206
230
|
enumerable: true,
|
|
207
231
|
get: function get() {
|
|
@@ -268,6 +292,18 @@ Object.defineProperty(exports, "SuperscriptIcon", {
|
|
|
268
292
|
return _SuperscriptIcon.SuperscriptIcon;
|
|
269
293
|
}
|
|
270
294
|
});
|
|
295
|
+
Object.defineProperty(exports, "TableIcon", {
|
|
296
|
+
enumerable: true,
|
|
297
|
+
get: function get() {
|
|
298
|
+
return _TableIcon.TableIcon;
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
Object.defineProperty(exports, "TaskIcon", {
|
|
302
|
+
enumerable: true,
|
|
303
|
+
get: function get() {
|
|
304
|
+
return _TaskIcon.TaskIcon;
|
|
305
|
+
}
|
|
306
|
+
});
|
|
271
307
|
Object.defineProperty(exports, "TextColorIcon", {
|
|
272
308
|
enumerable: true,
|
|
273
309
|
get: function get() {
|
|
@@ -304,12 +340,6 @@ Object.defineProperty(exports, "ToolbarColorSwatch", {
|
|
|
304
340
|
return _ToolbarColorSwatch.ToolbarColorSwatch;
|
|
305
341
|
}
|
|
306
342
|
});
|
|
307
|
-
Object.defineProperty(exports, "ToolbarDropdownDivider", {
|
|
308
|
-
enumerable: true,
|
|
309
|
-
get: function get() {
|
|
310
|
-
return _ToolbarDropdownDivider.ToolbarDropdownDivider;
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
343
|
Object.defineProperty(exports, "ToolbarDropdownItem", {
|
|
314
344
|
enumerable: true,
|
|
315
345
|
get: function get() {
|
|
@@ -386,7 +416,6 @@ var _ToolbarNestedDropdownMenu = require("./ui/ToolbarNestedDropdownMenu");
|
|
|
386
416
|
var _ToolbarKeyboardShortcutHint = require("./ui/ToolbarKeyboardShortcutHint");
|
|
387
417
|
var _ToolbarSection = require("./ui/ToolbarSection");
|
|
388
418
|
var _ToolbarTooltip = require("./ui/ToolbarTooltip");
|
|
389
|
-
var _ToolbarDropdownDivider = require("./ui/ToolbarDropdownDivider");
|
|
390
419
|
var _ToolbarColorSwatch = require("./ui/ToolbarColorSwatch");
|
|
391
420
|
var _ToolbarDropdownMenuContext = require("./ui/ToolbarDropdownMenuContext");
|
|
392
421
|
var _AIAdjustLengthIcon = require("./ui/icons/AIAdjustLengthIcon");
|
|
@@ -434,5 +463,11 @@ var _AlignTextCenterIcon = require("./ui/icons/AlignTextCenterIcon");
|
|
|
434
463
|
var _AlignTextRightIcon = require("./ui/icons/AlignTextRightIcon");
|
|
435
464
|
var _IndentIcon = require("./ui/icons/IndentIcon");
|
|
436
465
|
var _OutdentIcon = require("./ui/icons/OutdentIcon");
|
|
466
|
+
var _EmojiIcon = require("./ui/icons/EmojiIcon");
|
|
467
|
+
var _LayoutIcon = require("./ui/icons/LayoutIcon");
|
|
468
|
+
var _ImageIcon = require("./ui/icons/ImageIcon");
|
|
469
|
+
var _MentionIcon = require("./ui/icons/MentionIcon");
|
|
470
|
+
var _TableIcon = require("./ui/icons/TableIcon");
|
|
471
|
+
var _TaskIcon = require("./ui/icons/TaskIcon");
|
|
437
472
|
var _ColorPalette = _interopRequireDefault(require("./ui/ColorPalette"));
|
|
438
473
|
var _uiContext = require("./hooks/ui-context");
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}
|
|
3
|
-
._zulp12x7{gap:var(--ds-space-075,6px)}.
|
|
4
|
-
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
5
|
-
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
6
|
-
._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
7
|
-
._19bvv77o{padding-left:var(--ds-space-025,2px)}
|
|
3
|
+
._zulp12x7{gap:var(--ds-space-075,6px)}._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
8
4
|
._1bah1h6o{justify-content:center}
|
|
9
|
-
._1bah1y6m{justify-content:flex-start}
|
|
10
|
-
._1bahesu3{justify-content:flex-end}
|
|
11
5
|
._1e0c1txw{display:flex}
|
|
12
|
-
._1o0zidpf{border-bottom-right-radius:0}
|
|
13
6
|
._1tke1f4h{min-height:28px}
|
|
14
7
|
._4cvr1h6o{align-items:center}
|
|
15
8
|
._80om13gf{cursor:not-allowed}
|
|
16
9
|
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
17
10
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
18
11
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
19
|
-
._mrkbidpf{border-bottom-left-radius:0}
|
|
20
12
|
._o5721q9c{white-space:nowrap}
|
|
21
|
-
._qrwqidpf{border-top-right-radius:0}
|
|
22
13
|
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
23
14
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
24
15
|
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
25
|
-
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
26
|
-
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
27
16
|
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
28
|
-
._u5f3v77o{padding-right:var(--ds-space-025,2px)}
|
|
29
17
|
._1ah3idpf:focus-visible{outline-offset:0}
|
|
30
18
|
._g0pbkb7n:focus-visible{z-index:1}
|
|
31
19
|
._oh03h2mm:focus-visible{position:relative}
|
|
@@ -17,10 +17,7 @@ var styles = {
|
|
|
17
17
|
button: "_zulp12x7 _2rkoiti9 _1e0c1txw _bfhksm61 _o5721q9c _4cvr1h6o _1bah1h6o _1tke1f4h _syaz1gjq _k48p1wq8 _19bvu2gc _u5f3u2gc _1ah3idpf _g0pbkb7n _oh03h2mm",
|
|
18
18
|
enabled: "_irr3166n _1di61dty",
|
|
19
19
|
disabled: "_syaz1lh4 _80om13gf",
|
|
20
|
-
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru"
|
|
21
|
-
groupStart: "_qrwqidpf _1o0zidpf _1bahesu3 _19bv12x7 _u5f3v77o",
|
|
22
|
-
groupMiddle: "_13liidpf _mrkbidpf _qrwqidpf _1o0zidpf _19bv1b66 _u5f31b66",
|
|
23
|
-
groupEnd: "_13liidpf _mrkbidpf _1bah1y6m _19bvv77o _u5f312x7"
|
|
20
|
+
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru"
|
|
24
21
|
};
|
|
25
22
|
var ToolbarButton = exports.ToolbarButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
26
23
|
var iconBefore = _ref.iconBefore,
|
|
@@ -34,7 +31,6 @@ var ToolbarButton = exports.ToolbarButton = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
34
31
|
onBlur = _ref.onBlur,
|
|
35
32
|
onFocus = _ref.onFocus,
|
|
36
33
|
testId = _ref.testId,
|
|
37
|
-
groupLocation = _ref.groupLocation,
|
|
38
34
|
isDisabled = _ref.isDisabled,
|
|
39
35
|
ariaKeyshortcuts = _ref.ariaKeyshortcuts,
|
|
40
36
|
label = _ref.label;
|
|
@@ -42,7 +38,7 @@ var ToolbarButton = exports.ToolbarButton = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
42
38
|
preventDefaultOnMouseDown = _useToolbarUI.preventDefaultOnMouseDown;
|
|
43
39
|
return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
44
40
|
ref: ref,
|
|
45
|
-
xcss: (0, _css.cx)(styles.button, isDisabled ? styles.disabled : isSelected ? styles.selected : styles.enabled
|
|
41
|
+
xcss: (0, _css.cx)(styles.button, isDisabled ? styles.disabled : isSelected ? styles.selected : styles.enabled),
|
|
46
42
|
"aria-pressed": isSelected,
|
|
47
43
|
"aria-expanded": ariaExpanded,
|
|
48
44
|
"aria-haspopup": ariaHasPopup,
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}
|
|
3
|
+
._fb251b66 button{padding-inline:var(--ds-space-050,4px)}._1e0c1txw{display:flex}
|
|
4
|
+
._1jiyidpf button{border-bottom-left-radius:0}
|
|
5
|
+
._t1diidpf button{border-top-right-radius:0}
|
|
6
|
+
._u6eridpf button{border-bottom-right-radius:0}
|
|
7
|
+
._xk07idpf button{border-top-left-radius:0}
|
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
/* ToolbarButtonGroup.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.ToolbarButtonGroup = void 0;
|
|
9
9
|
require("./ToolbarButtonGroup.compiled.css");
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var React = _react;
|
|
10
12
|
var _runtime = require("@compiled/react/runtime");
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
13
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
|
+
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
15
|
var styles = {
|
|
14
|
-
container: "_1e0c1txw"
|
|
16
|
+
container: "_1e0c1txw",
|
|
17
|
+
firstChild: "_fb251b66 _t1diidpf _u6eridpf",
|
|
18
|
+
lastChild: "_fb2512x7 _xk07idpf _1jiyidpf"
|
|
15
19
|
};
|
|
16
20
|
var ToolbarButtonGroup = exports.ToolbarButtonGroup = function ToolbarButtonGroup(_ref) {
|
|
17
21
|
var children = _ref.children;
|
|
18
|
-
|
|
22
|
+
var items = _react.Children.toArray(children);
|
|
23
|
+
var FirstChild = items.at(0);
|
|
24
|
+
var LastChild = items.at(-1);
|
|
25
|
+
var middleChildren = items.slice(1, -1);
|
|
26
|
+
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
19
27
|
xcss: styles.container
|
|
20
|
-
}, children
|
|
28
|
+
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: (0, _runtime.ax)([styles.firstChild])
|
|
30
|
+
}, FirstChild), middleChildren, /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: (0, _runtime.ax)([styles.lastChild])
|
|
32
|
+
}, LastChild)));
|
|
21
33
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
.
|
|
1
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
2
|
+
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
|
|
2
3
|
._1bsb1osq{width:100%}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
3
5
|
._1tke14no{min-height:36px}
|
|
6
|
+
._1ul9163w{min-width:230px}
|
|
4
7
|
._80om13gf{cursor:not-allowed}
|
|
5
8
|
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
6
9
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
7
10
|
._kqswh2mm{position:relative}
|
|
8
11
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
9
12
|
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
10
|
-
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
11
13
|
._1basglpi:focus-visible{border-radius:var(--ds-border-radius,4px)}
|
|
12
14
|
._1ah31i6y:focus-visible{outline-offset:var(--ds-space-negative-025,-2px)}
|
|
13
15
|
._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
@@ -14,7 +14,7 @@ var _dropdownMenu = require("@atlaskit/dropdown-menu");
|
|
|
14
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
15
|
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); }
|
|
16
16
|
var styles = {
|
|
17
|
-
toolbarDropdownItem: "_kqswh2mm _bfhksm61 _1bsb1osq _1tke14no
|
|
17
|
+
toolbarDropdownItem: "_18zrpxbi _1rjcu2gc _1e0c1txw _kqswh2mm _bfhksm61 _1bsb1osq _1tke14no _1ul9163w _1basglpi _1ah31i6y",
|
|
18
18
|
enabled: "_irr3166n _1di61dty",
|
|
19
19
|
disabled: "_syaz1lh4 _80om13gf",
|
|
20
20
|
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* ToolbarDropdownItemSection.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,16 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.ToolbarDropdownItemSection = void 0;
|
|
9
|
-
require("./ToolbarDropdownItemSection.compiled.css");
|
|
10
|
-
var _runtime = require("@compiled/react/runtime");
|
|
11
8
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var
|
|
13
|
-
var styles = {
|
|
14
|
-
container: "_1e0c1txw _2lx21bp4"
|
|
15
|
-
};
|
|
9
|
+
var _dropdownMenu = require("@atlaskit/dropdown-menu");
|
|
16
10
|
var ToolbarDropdownItemSection = exports.ToolbarDropdownItemSection = function ToolbarDropdownItemSection(_ref) {
|
|
17
|
-
var children = _ref.children
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
var children = _ref.children,
|
|
12
|
+
hasSeparator = _ref.hasSeparator,
|
|
13
|
+
title = _ref.title;
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItemGroup, {
|
|
15
|
+
hasSeparator: hasSeparator,
|
|
16
|
+
title: title
|
|
20
17
|
}, children);
|
|
21
18
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1mou1b66{margin-block:var(--ds-space-050,4px)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* ToolbarDropdownMenu.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,15 +7,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.ToolbarDropdownMenu = void 0;
|
|
10
|
+
require("./ToolbarDropdownMenu.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
9
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
13
|
var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu"));
|
|
11
14
|
var _uiContext = require("../hooks/ui-context");
|
|
12
15
|
var _ToolbarButton = require("./ToolbarButton");
|
|
13
16
|
var _ToolbarDropdownMenuContext = require("./ToolbarDropdownMenuContext");
|
|
14
17
|
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); }
|
|
18
|
+
var styles = {
|
|
19
|
+
sectionMargin: "_1mou1b66"
|
|
20
|
+
};
|
|
15
21
|
var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
|
|
16
22
|
var iconBefore = _ref.iconBefore,
|
|
17
|
-
groupLocation = _ref.groupLocation,
|
|
18
23
|
children = _ref.children,
|
|
19
24
|
isDisabled = _ref.isDisabled,
|
|
20
25
|
testId = _ref.testId,
|
|
@@ -54,7 +59,6 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
|
|
|
54
59
|
onFocus: triggerProps.onFocus,
|
|
55
60
|
testId: testId,
|
|
56
61
|
iconBefore: iconBefore,
|
|
57
|
-
groupLocation: groupLocation,
|
|
58
62
|
isDisabled: isDisabled,
|
|
59
63
|
label: label
|
|
60
64
|
});
|
|
@@ -65,16 +69,18 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
|
|
|
65
69
|
};
|
|
66
70
|
var ToolbarDropdownMenu = exports.ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref2) {
|
|
67
71
|
var iconBefore = _ref2.iconBefore,
|
|
68
|
-
groupLocation = _ref2.groupLocation,
|
|
69
72
|
children = _ref2.children,
|
|
70
73
|
isDisabled = _ref2.isDisabled,
|
|
71
74
|
testId = _ref2.testId,
|
|
72
|
-
label = _ref2.label
|
|
75
|
+
label = _ref2.label,
|
|
76
|
+
_ref2$hasSectionMargi = _ref2.hasSectionMargin,
|
|
77
|
+
hasSectionMargin = _ref2$hasSectionMargi === void 0 ? true : _ref2$hasSectionMargi;
|
|
73
78
|
return /*#__PURE__*/_react.default.createElement(_ToolbarDropdownMenuContext.ToolbarDropdownMenuProvider, null, /*#__PURE__*/_react.default.createElement(ToolbarDropdownMenuContent, {
|
|
74
79
|
iconBefore: iconBefore,
|
|
75
|
-
groupLocation: groupLocation,
|
|
76
80
|
isDisabled: isDisabled,
|
|
77
81
|
testId: testId,
|
|
78
82
|
label: label
|
|
79
|
-
},
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
+
className: (0, _runtime.ax)([hasSectionMargin && styles.sectionMargin])
|
|
85
|
+
}, children)));
|
|
80
86
|
};
|
|
@@ -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, "EmojiIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _emoji.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _emoji = _interopRequireDefault(require("@atlaskit/icon/core/emoji"));
|
|
@@ -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, "ImageIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _image.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _image = _interopRequireDefault(require("@atlaskit/icon/core/image"));
|
|
@@ -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, "LayoutIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _layoutTwoColumns.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _layoutTwoColumns = _interopRequireDefault(require("@atlaskit/icon/core/layout-two-columns"));
|
|
@@ -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, "MentionIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _mention.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _mention = _interopRequireDefault(require("@atlaskit/icon/core/mention"));
|
|
@@ -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, "TableIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _grid.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _grid = _interopRequireDefault(require("@atlaskit/icon/core/grid"));
|
|
@@ -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, "TaskIcon", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _task.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _task = _interopRequireDefault(require("@atlaskit/icon/core/task"));
|
package/dist/es2019/index.js
CHANGED
|
@@ -9,7 +9,6 @@ export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
|
|
|
9
9
|
export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
|
|
10
10
|
export { ToolbarSection } from './ui/ToolbarSection';
|
|
11
11
|
export { ToolbarTooltip } from './ui/ToolbarTooltip';
|
|
12
|
-
export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
|
|
13
12
|
export { ToolbarColorSwatch } from './ui/ToolbarColorSwatch';
|
|
14
13
|
export { useToolbarDropdownMenu } from './ui/ToolbarDropdownMenuContext';
|
|
15
14
|
export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
|
|
@@ -57,5 +56,11 @@ export { AlignTextCenterIcon } from './ui/icons/AlignTextCenterIcon';
|
|
|
57
56
|
export { AlignTextRightIcon } from './ui/icons/AlignTextRightIcon';
|
|
58
57
|
export { IndentIcon } from './ui/icons/IndentIcon';
|
|
59
58
|
export { OutdentIcon } from './ui/icons/OutdentIcon';
|
|
59
|
+
export { EmojiIcon } from './ui/icons/EmojiIcon';
|
|
60
|
+
export { LayoutIcon } from './ui/icons/LayoutIcon';
|
|
61
|
+
export { ImageIcon } from './ui/icons/ImageIcon';
|
|
62
|
+
export { MentionIcon } from './ui/icons/MentionIcon';
|
|
63
|
+
export { TableIcon } from './ui/icons/TableIcon';
|
|
64
|
+
export { TaskIcon } from './ui/icons/TaskIcon';
|
|
60
65
|
export { default as ColorPalette } from './ui/ColorPalette';
|
|
61
66
|
export { useToolbarUI, ToolbarUIProvider } from './hooks/ui-context';
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}
|
|
3
|
-
._zulp12x7{gap:var(--ds-space-075,6px)}.
|
|
4
|
-
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
5
|
-
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
6
|
-
._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
7
|
-
._19bvv77o{padding-left:var(--ds-space-025,2px)}
|
|
3
|
+
._zulp12x7{gap:var(--ds-space-075,6px)}._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
8
4
|
._1bah1h6o{justify-content:center}
|
|
9
|
-
._1bah1y6m{justify-content:flex-start}
|
|
10
|
-
._1bahesu3{justify-content:flex-end}
|
|
11
5
|
._1e0c1txw{display:flex}
|
|
12
|
-
._1o0zidpf{border-bottom-right-radius:0}
|
|
13
6
|
._1tke1f4h{min-height:28px}
|
|
14
7
|
._4cvr1h6o{align-items:center}
|
|
15
8
|
._80om13gf{cursor:not-allowed}
|
|
16
9
|
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
17
10
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
18
11
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
19
|
-
._mrkbidpf{border-bottom-left-radius:0}
|
|
20
12
|
._o5721q9c{white-space:nowrap}
|
|
21
|
-
._qrwqidpf{border-top-right-radius:0}
|
|
22
13
|
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
23
14
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
24
15
|
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
25
|
-
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
26
|
-
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
27
16
|
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
28
|
-
._u5f3v77o{padding-right:var(--ds-space-025,2px)}
|
|
29
17
|
._1ah3idpf:focus-visible{outline-offset:0}
|
|
30
18
|
._g0pbkb7n:focus-visible{z-index:1}
|
|
31
19
|
._oh03h2mm:focus-visible{position:relative}
|
|
@@ -9,10 +9,7 @@ const styles = {
|
|
|
9
9
|
button: "_zulp12x7 _2rkoiti9 _1e0c1txw _bfhksm61 _o5721q9c _4cvr1h6o _1bah1h6o _1tke1f4h _syaz1gjq _k48p1wq8 _19bvu2gc _u5f3u2gc _1ah3idpf _g0pbkb7n _oh03h2mm",
|
|
10
10
|
enabled: "_irr3166n _1di61dty",
|
|
11
11
|
disabled: "_syaz1lh4 _80om13gf",
|
|
12
|
-
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru"
|
|
13
|
-
groupStart: "_qrwqidpf _1o0zidpf _1bahesu3 _19bv12x7 _u5f3v77o",
|
|
14
|
-
groupMiddle: "_13liidpf _mrkbidpf _qrwqidpf _1o0zidpf _19bv1b66 _u5f31b66",
|
|
15
|
-
groupEnd: "_13liidpf _mrkbidpf _1bah1y6m _19bvv77o _u5f312x7"
|
|
12
|
+
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru"
|
|
16
13
|
};
|
|
17
14
|
export const ToolbarButton = /*#__PURE__*/forwardRef(({
|
|
18
15
|
iconBefore,
|
|
@@ -26,7 +23,6 @@ export const ToolbarButton = /*#__PURE__*/forwardRef(({
|
|
|
26
23
|
onBlur,
|
|
27
24
|
onFocus,
|
|
28
25
|
testId,
|
|
29
|
-
groupLocation,
|
|
30
26
|
isDisabled,
|
|
31
27
|
ariaKeyshortcuts,
|
|
32
28
|
label
|
|
@@ -36,7 +32,7 @@ export const ToolbarButton = /*#__PURE__*/forwardRef(({
|
|
|
36
32
|
} = useToolbarUI();
|
|
37
33
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
38
34
|
ref: ref,
|
|
39
|
-
xcss: cx(styles.button, isDisabled ? styles.disabled : isSelected ? styles.selected : styles.enabled
|
|
35
|
+
xcss: cx(styles.button, isDisabled ? styles.disabled : isSelected ? styles.selected : styles.enabled),
|
|
40
36
|
"aria-pressed": isSelected,
|
|
41
37
|
"aria-expanded": ariaExpanded,
|
|
42
38
|
"aria-haspopup": ariaHasPopup,
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}
|
|
3
|
+
._fb251b66 button{padding-inline:var(--ds-space-050,4px)}._1e0c1txw{display:flex}
|
|
4
|
+
._1jiyidpf button{border-bottom-left-radius:0}
|
|
5
|
+
._t1diidpf button{border-top-right-radius:0}
|
|
6
|
+
._u6eridpf button{border-bottom-right-radius:0}
|
|
7
|
+
._xk07idpf button{border-top-left-radius:0}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
/* ToolbarButtonGroup.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./ToolbarButtonGroup.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import
|
|
5
|
+
import { Children, Fragment } from 'react';
|
|
5
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
7
|
const styles = {
|
|
7
|
-
container: "_1e0c1txw"
|
|
8
|
+
container: "_1e0c1txw",
|
|
9
|
+
firstChild: "_fb251b66 _t1diidpf _u6eridpf",
|
|
10
|
+
lastChild: "_fb2512x7 _xk07idpf _1jiyidpf"
|
|
8
11
|
};
|
|
9
12
|
export const ToolbarButtonGroup = ({
|
|
10
13
|
children
|
|
11
14
|
}) => {
|
|
15
|
+
const items = Children.toArray(children);
|
|
16
|
+
const FirstChild = items.at(0);
|
|
17
|
+
const LastChild = items.at(-1);
|
|
18
|
+
const middleChildren = items.slice(1, -1);
|
|
12
19
|
return /*#__PURE__*/React.createElement(Box, {
|
|
13
20
|
xcss: styles.container
|
|
14
|
-
}, children
|
|
21
|
+
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: ax([styles.firstChild])
|
|
23
|
+
}, FirstChild), middleChildren, /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: ax([styles.lastChild])
|
|
25
|
+
}, LastChild)));
|
|
15
26
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
.
|
|
1
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
2
|
+
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}
|
|
2
3
|
._1bsb1osq{width:100%}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
3
5
|
._1tke14no{min-height:36px}
|
|
6
|
+
._1ul9163w{min-width:230px}
|
|
4
7
|
._80om13gf{cursor:not-allowed}
|
|
5
8
|
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
6
9
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
7
10
|
._kqswh2mm{position:relative}
|
|
8
11
|
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
9
12
|
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
10
|
-
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
11
13
|
._1basglpi:focus-visible{border-radius:var(--ds-border-radius,4px)}
|
|
12
14
|
._1ah31i6y:focus-visible{outline-offset:var(--ds-space-negative-025,-2px)}
|
|
13
15
|
._irr3166n:hover{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
@@ -6,7 +6,7 @@ import { cx } from '@atlaskit/css';
|
|
|
6
6
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
7
7
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
8
8
|
const styles = {
|
|
9
|
-
toolbarDropdownItem: "_kqswh2mm _bfhksm61 _1bsb1osq _1tke14no
|
|
9
|
+
toolbarDropdownItem: "_18zrpxbi _1rjcu2gc _1e0c1txw _kqswh2mm _bfhksm61 _1bsb1osq _1tke14no _1ul9163w _1basglpi _1ah31i6y",
|
|
10
10
|
enabled: "_irr3166n _1di61dty",
|
|
11
11
|
disabled: "_syaz1lh4 _80om13gf",
|
|
12
12
|
selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru"
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
/* ToolbarDropdownItemSection.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import "./ToolbarDropdownItemSection.compiled.css";
|
|
3
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
4
1
|
import React from 'react';
|
|
5
|
-
import {
|
|
6
|
-
const styles = {
|
|
7
|
-
container: "_1e0c1txw _2lx21bp4"
|
|
8
|
-
};
|
|
2
|
+
import { DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
9
3
|
export const ToolbarDropdownItemSection = ({
|
|
10
|
-
children
|
|
4
|
+
children,
|
|
5
|
+
hasSeparator,
|
|
6
|
+
title
|
|
11
7
|
}) => {
|
|
12
|
-
return /*#__PURE__*/React.createElement(
|
|
13
|
-
|
|
8
|
+
return /*#__PURE__*/React.createElement(DropdownItemGroup, {
|
|
9
|
+
hasSeparator: hasSeparator,
|
|
10
|
+
title: title
|
|
14
11
|
}, children);
|
|
15
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1mou1b66{margin-block:var(--ds-space-050,4px)}
|