@atlaskit/editor-toolbar 0.19.21 → 0.19.23
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 +14 -0
- package/dist/cjs/ui/ToolbarButtonGroup.compiled.css +0 -3
- package/dist/cjs/ui/ToolbarButtonGroup.js +2 -16
- package/dist/es2019/ui/ToolbarButtonGroup.compiled.css +0 -3
- package/dist/es2019/ui/ToolbarButtonGroup.js +2 -16
- package/dist/esm/ui/ToolbarButtonGroup.compiled.css +0 -3
- package/dist/esm/ui/ToolbarButtonGroup.js +2 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.19.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.19.22
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d2ad12b4bee01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2ad12b4bee01) -
|
|
14
|
+
[ux] [EDITOR-5117] revert ToolbarButtonGroup padding changes for A11Y compliance
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 0.19.21
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
._zulpv77o{gap:var(--ds-space-025,2px)}
|
|
3
3
|
._19pe12x7 [data-toolbar-component=button]{padding-inline:var(--ds-space-075,6px)}
|
|
4
|
-
._19pe1b66 [data-toolbar-component=button]{padding-inline:var(--ds-space-050,4px)}
|
|
5
4
|
._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}._14jy1dpa:has([data-toolbar-component=button]:not([aria-pressed=true]):not([disabled]):hover) [data-toolbar-component=button]:not([aria-pressed=true]):not([disabled]):not(:hover){background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
6
5
|
._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
|
|
7
6
|
._1e0c1txw{display:flex}
|
|
8
7
|
._1jiyidpf button{border-bottom-left-radius:0}
|
|
9
8
|
._1qq0idpf [data-toolbar-component=button]{border-top-right-radius:0}
|
|
10
9
|
._3nesidpf [data-toolbar-component=button]{border-bottom-right-radius:0}
|
|
11
|
-
._eurs1b66 [data-toolbar-component=button]{padding-right:var(--ds-space-050,4px)}
|
|
12
10
|
._i84vidpf [data-toolbar-component=button]{border-bottom-left-radius:0}
|
|
13
|
-
._pdav12x7 [data-toolbar-component=button]{padding-left:var(--ds-space-075,6px)}
|
|
14
11
|
._t1diidpf button{border-top-right-radius:0}
|
|
15
12
|
._u6eridpf button{border-bottom-right-radius:0}
|
|
16
13
|
._xk07idpf button{border-top-left-radius:0}
|
|
@@ -15,34 +15,20 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
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
17
|
container: "_1e0c1txw",
|
|
18
|
+
containerNew: "_zulpv77o _1e0c1txw _14jy1dpa",
|
|
18
19
|
firstChild: "_fb2512x7 _t1diidpf _u6eridpf",
|
|
19
20
|
lastChild: "_fb2512x7 _xk07idpf _1jiyidpf",
|
|
20
21
|
firstChildNew: "_19pe12x7 _1qq0idpf _3nesidpf",
|
|
21
22
|
lastChildNew: "_19pe12x7 _15rdidpf _i84vidpf"
|
|
22
23
|
};
|
|
23
|
-
var stylesNew = {
|
|
24
|
-
container: "_zulpv77o _1e0c1txw _14jy1dpa",
|
|
25
|
-
firstChild: "_1qq0idpf _3nesidpf _pdav12x7 _eurs1b66",
|
|
26
|
-
lastChild: "_19pe1b66 _15rdidpf _i84vidpf"
|
|
27
|
-
};
|
|
28
24
|
var ToolbarButtonGroup = exports.ToolbarButtonGroup = function ToolbarButtonGroup(_ref) {
|
|
29
25
|
var children = _ref.children;
|
|
30
26
|
var items = _react.Children.toArray(children);
|
|
31
27
|
var FirstChild = items.at(0);
|
|
32
28
|
var LastChild = items.at(-1);
|
|
33
29
|
var middleChildren = items.slice(1, -1);
|
|
34
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_toolbar_split_button_ui', 'isEnabled', true)) {
|
|
35
|
-
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
36
|
-
xcss: stylesNew.container,
|
|
37
|
-
"data-toolbar-component": "button-group"
|
|
38
|
-
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className: (0, _runtime.ax)([stylesNew.firstChild])
|
|
40
|
-
}, FirstChild), middleChildren, /*#__PURE__*/React.createElement("div", {
|
|
41
|
-
className: (0, _runtime.ax)([stylesNew.lastChild])
|
|
42
|
-
}, LastChild)));
|
|
43
|
-
}
|
|
44
30
|
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
45
|
-
xcss: styles.container,
|
|
31
|
+
xcss: (0, _expValEquals.expValEquals)('platform_editor_toolbar_split_button_ui', 'isEnabled', true) ? styles.containerNew : styles.container,
|
|
46
32
|
"data-toolbar-component": "button-group"
|
|
47
33
|
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
48
34
|
className: (0, _runtime.ax)([styles.firstChildNew])
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
._zulpv77o{gap:var(--ds-space-025,2px)}
|
|
3
3
|
._19pe12x7 [data-toolbar-component=button]{padding-inline:var(--ds-space-075,6px)}
|
|
4
|
-
._19pe1b66 [data-toolbar-component=button]{padding-inline:var(--ds-space-050,4px)}
|
|
5
4
|
._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}._14jy1dpa:has([data-toolbar-component=button]:not([aria-pressed=true]):not([disabled]):hover) [data-toolbar-component=button]:not([aria-pressed=true]):not([disabled]):not(:hover){background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
6
5
|
._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
|
|
7
6
|
._1e0c1txw{display:flex}
|
|
8
7
|
._1jiyidpf button{border-bottom-left-radius:0}
|
|
9
8
|
._1qq0idpf [data-toolbar-component=button]{border-top-right-radius:0}
|
|
10
9
|
._3nesidpf [data-toolbar-component=button]{border-bottom-right-radius:0}
|
|
11
|
-
._eurs1b66 [data-toolbar-component=button]{padding-right:var(--ds-space-050,4px)}
|
|
12
10
|
._i84vidpf [data-toolbar-component=button]{border-bottom-left-radius:0}
|
|
13
|
-
._pdav12x7 [data-toolbar-component=button]{padding-left:var(--ds-space-075,6px)}
|
|
14
11
|
._t1diidpf button{border-top-right-radius:0}
|
|
15
12
|
._u6eridpf button{border-bottom-right-radius:0}
|
|
16
13
|
._xk07idpf button{border-top-left-radius:0}
|
|
@@ -7,16 +7,12 @@ import { Box } from '@atlaskit/primitives/compiled';
|
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
8
|
const styles = {
|
|
9
9
|
container: "_1e0c1txw",
|
|
10
|
+
containerNew: "_zulpv77o _1e0c1txw _14jy1dpa",
|
|
10
11
|
firstChild: "_fb2512x7 _t1diidpf _u6eridpf",
|
|
11
12
|
lastChild: "_fb2512x7 _xk07idpf _1jiyidpf",
|
|
12
13
|
firstChildNew: "_19pe12x7 _1qq0idpf _3nesidpf",
|
|
13
14
|
lastChildNew: "_19pe12x7 _15rdidpf _i84vidpf"
|
|
14
15
|
};
|
|
15
|
-
const stylesNew = {
|
|
16
|
-
container: "_zulpv77o _1e0c1txw _14jy1dpa",
|
|
17
|
-
firstChild: "_1qq0idpf _3nesidpf _pdav12x7 _eurs1b66",
|
|
18
|
-
lastChild: "_19pe1b66 _15rdidpf _i84vidpf"
|
|
19
|
-
};
|
|
20
16
|
export const ToolbarButtonGroup = ({
|
|
21
17
|
children
|
|
22
18
|
}) => {
|
|
@@ -24,18 +20,8 @@ export const ToolbarButtonGroup = ({
|
|
|
24
20
|
const FirstChild = items.at(0);
|
|
25
21
|
const LastChild = items.at(-1);
|
|
26
22
|
const middleChildren = items.slice(1, -1);
|
|
27
|
-
if (expValEquals('platform_editor_toolbar_split_button_ui', 'isEnabled', true)) {
|
|
28
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
29
|
-
xcss: stylesNew.container,
|
|
30
|
-
"data-toolbar-component": "button-group"
|
|
31
|
-
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
className: ax([stylesNew.firstChild])
|
|
33
|
-
}, FirstChild), middleChildren, /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
className: ax([stylesNew.lastChild])
|
|
35
|
-
}, LastChild)));
|
|
36
|
-
}
|
|
37
23
|
return /*#__PURE__*/React.createElement(Box, {
|
|
38
|
-
xcss: styles.container,
|
|
24
|
+
xcss: expValEquals('platform_editor_toolbar_split_button_ui', 'isEnabled', true) ? styles.containerNew : styles.container,
|
|
39
25
|
"data-toolbar-component": "button-group"
|
|
40
26
|
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
41
27
|
className: ax([styles.firstChildNew])
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
._zulpv77o{gap:var(--ds-space-025,2px)}
|
|
3
3
|
._19pe12x7 [data-toolbar-component=button]{padding-inline:var(--ds-space-075,6px)}
|
|
4
|
-
._19pe1b66 [data-toolbar-component=button]{padding-inline:var(--ds-space-050,4px)}
|
|
5
4
|
._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}._14jy1dpa:has([data-toolbar-component=button]:not([aria-pressed=true]):not([disabled]):hover) [data-toolbar-component=button]:not([aria-pressed=true]):not([disabled]):not(:hover){background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
6
5
|
._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
|
|
7
6
|
._1e0c1txw{display:flex}
|
|
8
7
|
._1jiyidpf button{border-bottom-left-radius:0}
|
|
9
8
|
._1qq0idpf [data-toolbar-component=button]{border-top-right-radius:0}
|
|
10
9
|
._3nesidpf [data-toolbar-component=button]{border-bottom-right-radius:0}
|
|
11
|
-
._eurs1b66 [data-toolbar-component=button]{padding-right:var(--ds-space-050,4px)}
|
|
12
10
|
._i84vidpf [data-toolbar-component=button]{border-bottom-left-radius:0}
|
|
13
|
-
._pdav12x7 [data-toolbar-component=button]{padding-left:var(--ds-space-075,6px)}
|
|
14
11
|
._t1diidpf button{border-top-right-radius:0}
|
|
15
12
|
._u6eridpf button{border-bottom-right-radius:0}
|
|
16
13
|
._xk07idpf button{border-top-left-radius:0}
|
|
@@ -7,34 +7,20 @@ import { Box } from '@atlaskit/primitives/compiled';
|
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
8
|
var styles = {
|
|
9
9
|
container: "_1e0c1txw",
|
|
10
|
+
containerNew: "_zulpv77o _1e0c1txw _14jy1dpa",
|
|
10
11
|
firstChild: "_fb2512x7 _t1diidpf _u6eridpf",
|
|
11
12
|
lastChild: "_fb2512x7 _xk07idpf _1jiyidpf",
|
|
12
13
|
firstChildNew: "_19pe12x7 _1qq0idpf _3nesidpf",
|
|
13
14
|
lastChildNew: "_19pe12x7 _15rdidpf _i84vidpf"
|
|
14
15
|
};
|
|
15
|
-
var stylesNew = {
|
|
16
|
-
container: "_zulpv77o _1e0c1txw _14jy1dpa",
|
|
17
|
-
firstChild: "_1qq0idpf _3nesidpf _pdav12x7 _eurs1b66",
|
|
18
|
-
lastChild: "_19pe1b66 _15rdidpf _i84vidpf"
|
|
19
|
-
};
|
|
20
16
|
export var ToolbarButtonGroup = function ToolbarButtonGroup(_ref) {
|
|
21
17
|
var children = _ref.children;
|
|
22
18
|
var items = Children.toArray(children);
|
|
23
19
|
var FirstChild = items.at(0);
|
|
24
20
|
var LastChild = items.at(-1);
|
|
25
21
|
var middleChildren = items.slice(1, -1);
|
|
26
|
-
if (expValEquals('platform_editor_toolbar_split_button_ui', 'isEnabled', true)) {
|
|
27
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
28
|
-
xcss: stylesNew.container,
|
|
29
|
-
"data-toolbar-component": "button-group"
|
|
30
|
-
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: ax([stylesNew.firstChild])
|
|
32
|
-
}, FirstChild), middleChildren, /*#__PURE__*/React.createElement("div", {
|
|
33
|
-
className: ax([stylesNew.lastChild])
|
|
34
|
-
}, LastChild)));
|
|
35
|
-
}
|
|
36
22
|
return /*#__PURE__*/React.createElement(Box, {
|
|
37
|
-
xcss: styles.container,
|
|
23
|
+
xcss: expValEquals('platform_editor_toolbar_split_button_ui', 'isEnabled', true) ? styles.containerNew : styles.container,
|
|
38
24
|
"data-toolbar-component": "button-group"
|
|
39
25
|
}, items.length <= 1 ? children : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
40
26
|
className: ax([styles.firstChildNew])
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.19.
|
|
6
|
+
"version": "0.19.23",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor: Jenga",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
31
31
|
"@atlaskit/popup": "^4.13.0",
|
|
32
32
|
"@atlaskit/primitives": "^18.0.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^23.0.0",
|
|
34
34
|
"@atlaskit/tokens": "^11.0.0",
|
|
35
35
|
"@atlaskit/tooltip": "^20.14.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|