@atlaskit/editor-toolbar 0.3.0 → 0.3.1
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 +15 -0
- package/dist/cjs/index.js +0 -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/es2019/index.js +0 -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/esm/index.js +0 -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/types/index.d.ts +1 -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-ts4.5/index.d.ts +1 -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/examples/toolbar/examples/ExampleManuallyComposedToolbar.tsx +2 -12
- package/package.json +1 -1
- package/src/index.ts +1 -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/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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3145f278b1f7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3145f278b1f7a) -
|
|
8
|
+
[ux] [ED-28473] minor UI updates for editor-toolbar
|
|
9
|
+
|
|
10
|
+
- Use ADS ButtonGroup for ToolbarButtonGroup
|
|
11
|
+
- Remove groupLocation prop and use CSS instead
|
|
12
|
+
- Use DropdownItemGroup for ToolbarDropdownItemSection and expand props for section separator and
|
|
13
|
+
title
|
|
14
|
+
- Support ReactNode as content for ToolbarTooltip and add missing shortcuts in tooltips
|
|
15
|
+
- Center Icons for split buttons and make chevron icon 24px wide
|
|
16
|
+
- Align dropdown menu UI with current editor design
|
|
17
|
+
|
|
3
18
|
## 0.3.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -304,12 +304,6 @@ Object.defineProperty(exports, "ToolbarColorSwatch", {
|
|
|
304
304
|
return _ToolbarColorSwatch.ToolbarColorSwatch;
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
|
-
Object.defineProperty(exports, "ToolbarDropdownDivider", {
|
|
308
|
-
enumerable: true,
|
|
309
|
-
get: function get() {
|
|
310
|
-
return _ToolbarDropdownDivider.ToolbarDropdownDivider;
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
307
|
Object.defineProperty(exports, "ToolbarDropdownItem", {
|
|
314
308
|
enumerable: true,
|
|
315
309
|
get: function get() {
|
|
@@ -386,7 +380,6 @@ var _ToolbarNestedDropdownMenu = require("./ui/ToolbarNestedDropdownMenu");
|
|
|
386
380
|
var _ToolbarKeyboardShortcutHint = require("./ui/ToolbarKeyboardShortcutHint");
|
|
387
381
|
var _ToolbarSection = require("./ui/ToolbarSection");
|
|
388
382
|
var _ToolbarTooltip = require("./ui/ToolbarTooltip");
|
|
389
|
-
var _ToolbarDropdownDivider = require("./ui/ToolbarDropdownDivider");
|
|
390
383
|
var _ToolbarColorSwatch = require("./ui/ToolbarColorSwatch");
|
|
391
384
|
var _ToolbarDropdownMenuContext = require("./ui/ToolbarDropdownMenuContext");
|
|
392
385
|
var _AIAdjustLengthIcon = require("./ui/icons/AIAdjustLengthIcon");
|
|
@@ -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
|
};
|
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';
|
|
@@ -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)}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
/* ToolbarDropdownMenu.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./ToolbarDropdownMenu.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
1
4
|
import React, { useCallback } from 'react';
|
|
2
5
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
3
6
|
import { useToolbarUI } from '../hooks/ui-context';
|
|
4
7
|
import { ToolbarButton } from './ToolbarButton';
|
|
5
8
|
import { ToolbarDropdownMenuProvider, useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
9
|
+
const styles = {
|
|
10
|
+
sectionMargin: "_1mou1b66"
|
|
11
|
+
};
|
|
6
12
|
const ToolbarDropdownMenuContent = ({
|
|
7
13
|
iconBefore,
|
|
8
|
-
groupLocation,
|
|
9
14
|
children,
|
|
10
15
|
isDisabled,
|
|
11
16
|
testId,
|
|
@@ -47,7 +52,6 @@ const ToolbarDropdownMenuContent = ({
|
|
|
47
52
|
onFocus: triggerProps.onFocus,
|
|
48
53
|
testId: testId,
|
|
49
54
|
iconBefore: iconBefore,
|
|
50
|
-
groupLocation: groupLocation,
|
|
51
55
|
isDisabled: isDisabled,
|
|
52
56
|
label: label
|
|
53
57
|
}),
|
|
@@ -57,17 +61,18 @@ const ToolbarDropdownMenuContent = ({
|
|
|
57
61
|
};
|
|
58
62
|
export const ToolbarDropdownMenu = ({
|
|
59
63
|
iconBefore,
|
|
60
|
-
groupLocation,
|
|
61
64
|
children,
|
|
62
65
|
isDisabled,
|
|
63
66
|
testId,
|
|
64
|
-
label
|
|
67
|
+
label,
|
|
68
|
+
hasSectionMargin = true
|
|
65
69
|
}) => {
|
|
66
70
|
return /*#__PURE__*/React.createElement(ToolbarDropdownMenuProvider, null, /*#__PURE__*/React.createElement(ToolbarDropdownMenuContent, {
|
|
67
71
|
iconBefore: iconBefore,
|
|
68
|
-
groupLocation: groupLocation,
|
|
69
72
|
isDisabled: isDisabled,
|
|
70
73
|
testId: testId,
|
|
71
74
|
label: label
|
|
72
|
-
},
|
|
75
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: ax([hasSectionMargin && styles.sectionMargin])
|
|
77
|
+
}, children)));
|
|
73
78
|
};
|
package/dist/esm/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';
|
|
@@ -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 @@ var 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 var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
18
15
|
var iconBefore = _ref.iconBefore,
|
|
@@ -26,7 +23,6 @@ export var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
26
23
|
onBlur = _ref.onBlur,
|
|
27
24
|
onFocus = _ref.onFocus,
|
|
28
25
|
testId = _ref.testId,
|
|
29
|
-
groupLocation = _ref.groupLocation,
|
|
30
26
|
isDisabled = _ref.isDisabled,
|
|
31
27
|
ariaKeyshortcuts = _ref.ariaKeyshortcuts,
|
|
32
28
|
label = _ref.label;
|
|
@@ -34,7 +30,7 @@ export var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
34
30
|
preventDefaultOnMouseDown = _useToolbarUI.preventDefaultOnMouseDown;
|
|
35
31
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
36
32
|
ref: ref,
|
|
37
|
-
xcss: cx(styles.button, isDisabled ? styles.disabled : isSelected ? styles.selected : styles.enabled
|
|
33
|
+
xcss: cx(styles.button, isDisabled ? styles.disabled : isSelected ? styles.selected : styles.enabled),
|
|
38
34
|
"aria-pressed": isSelected,
|
|
39
35
|
"aria-expanded": ariaExpanded,
|
|
40
36
|
"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,14 +1,25 @@
|
|
|
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
|
var styles = {
|
|
7
|
-
container: "_1e0c1txw"
|
|
8
|
+
container: "_1e0c1txw",
|
|
9
|
+
firstChild: "_fb251b66 _t1diidpf _u6eridpf",
|
|
10
|
+
lastChild: "_fb2512x7 _xk07idpf _1jiyidpf"
|
|
8
11
|
};
|
|
9
12
|
export var ToolbarButtonGroup = function ToolbarButtonGroup(_ref) {
|
|
10
13
|
var children = _ref.children;
|
|
14
|
+
var items = Children.toArray(children);
|
|
15
|
+
var FirstChild = items.at(0);
|
|
16
|
+
var LastChild = items.at(-1);
|
|
17
|
+
var middleChildren = items.slice(1, -1);
|
|
11
18
|
return /*#__PURE__*/React.createElement(Box, {
|
|
12
19
|
xcss: styles.container
|
|
13
|
-
}, children
|
|
20
|
+
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: ax([styles.firstChild])
|
|
22
|
+
}, FirstChild), middleChildren, /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: ax([styles.lastChild])
|
|
24
|
+
}, LastChild)));
|
|
14
25
|
};
|
|
@@ -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
|
var 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"
|