@atlaskit/editor-toolbar 0.19.18 → 0.19.19

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-toolbar
2
2
 
3
+ ## 0.19.19
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2126e50c0c9e4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2126e50c0c9e4) -
8
+ [ux] [EDITOR-4926] update ToolbarButtonGroup UI and remove unwanted tooltip from AI dropdown
9
+ - Updated dependencies
10
+
3
11
  ## 0.19.18
4
12
 
5
13
  ### Patch Changes
@@ -1,11 +1,16 @@
1
1
 
2
+ ._zulpv77o{gap:var(--ds-space-025,2px)}
2
3
  ._19pe12x7 [data-toolbar-component=button]{padding-inline:var(--ds-space-075,6px)}
3
- ._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
4
+ ._19pe1b66 [data-toolbar-component=button]{padding-inline:var(--ds-space-050,4px)}
5
+ ._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
+ ._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
4
7
  ._1e0c1txw{display:flex}
5
8
  ._1jiyidpf button{border-bottom-left-radius:0}
6
9
  ._1qq0idpf [data-toolbar-component=button]{border-top-right-radius:0}
7
10
  ._3nesidpf [data-toolbar-component=button]{border-bottom-right-radius:0}
11
+ ._eurs1b66 [data-toolbar-component=button]{padding-right:var(--ds-space-050,4px)}
8
12
  ._i84vidpf [data-toolbar-component=button]{border-bottom-left-radius:0}
13
+ ._pdav12x7 [data-toolbar-component=button]{padding-left:var(--ds-space-075,6px)}
9
14
  ._t1diidpf button{border-top-right-radius:0}
10
15
  ._u6eridpf button{border-bottom-right-radius:0}
11
16
  ._xk07idpf button{border-top-left-radius:0}
@@ -11,6 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
11
11
  var React = _react;
12
12
  var _runtime = require("@compiled/react/runtime");
13
13
  var _compiled = require("@atlaskit/primitives/compiled");
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
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); }
15
16
  var styles = {
16
17
  container: "_1e0c1txw",
@@ -19,12 +20,27 @@ var styles = {
19
20
  firstChildNew: "_19pe12x7 _1qq0idpf _3nesidpf",
20
21
  lastChildNew: "_19pe12x7 _15rdidpf _i84vidpf"
21
22
  };
23
+ var stylesNew = {
24
+ container: "_zulpv77o _1e0c1txw _14jy1dpa",
25
+ firstChild: "_1qq0idpf _3nesidpf _pdav12x7 _eurs1b66",
26
+ lastChild: "_19pe1b66 _15rdidpf _i84vidpf"
27
+ };
22
28
  var ToolbarButtonGroup = exports.ToolbarButtonGroup = function ToolbarButtonGroup(_ref) {
23
29
  var children = _ref.children;
24
30
  var items = _react.Children.toArray(children);
25
31
  var FirstChild = items.at(0);
26
32
  var LastChild = items.at(-1);
27
33
  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
+ }
28
44
  return /*#__PURE__*/React.createElement(_compiled.Box, {
29
45
  xcss: styles.container,
30
46
  "data-toolbar-component": "button-group"
@@ -1,11 +1,16 @@
1
1
 
2
+ ._zulpv77o{gap:var(--ds-space-025,2px)}
2
3
  ._19pe12x7 [data-toolbar-component=button]{padding-inline:var(--ds-space-075,6px)}
3
- ._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
4
+ ._19pe1b66 [data-toolbar-component=button]{padding-inline:var(--ds-space-050,4px)}
5
+ ._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
+ ._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
4
7
  ._1e0c1txw{display:flex}
5
8
  ._1jiyidpf button{border-bottom-left-radius:0}
6
9
  ._1qq0idpf [data-toolbar-component=button]{border-top-right-radius:0}
7
10
  ._3nesidpf [data-toolbar-component=button]{border-bottom-right-radius:0}
11
+ ._eurs1b66 [data-toolbar-component=button]{padding-right:var(--ds-space-050,4px)}
8
12
  ._i84vidpf [data-toolbar-component=button]{border-bottom-left-radius:0}
13
+ ._pdav12x7 [data-toolbar-component=button]{padding-left:var(--ds-space-075,6px)}
9
14
  ._t1diidpf button{border-top-right-radius:0}
10
15
  ._u6eridpf button{border-bottom-right-radius:0}
11
16
  ._xk07idpf button{border-top-left-radius:0}
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { Children, Fragment } from 'react';
6
6
  import { Box } from '@atlaskit/primitives/compiled';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
8
  const styles = {
8
9
  container: "_1e0c1txw",
9
10
  firstChild: "_fb2512x7 _t1diidpf _u6eridpf",
@@ -11,6 +12,11 @@ const styles = {
11
12
  firstChildNew: "_19pe12x7 _1qq0idpf _3nesidpf",
12
13
  lastChildNew: "_19pe12x7 _15rdidpf _i84vidpf"
13
14
  };
15
+ const stylesNew = {
16
+ container: "_zulpv77o _1e0c1txw _14jy1dpa",
17
+ firstChild: "_1qq0idpf _3nesidpf _pdav12x7 _eurs1b66",
18
+ lastChild: "_19pe1b66 _15rdidpf _i84vidpf"
19
+ };
14
20
  export const ToolbarButtonGroup = ({
15
21
  children
16
22
  }) => {
@@ -18,6 +24,16 @@ export const ToolbarButtonGroup = ({
18
24
  const FirstChild = items.at(0);
19
25
  const LastChild = items.at(-1);
20
26
  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
+ }
21
37
  return /*#__PURE__*/React.createElement(Box, {
22
38
  xcss: styles.container,
23
39
  "data-toolbar-component": "button-group"
@@ -1,11 +1,16 @@
1
1
 
2
+ ._zulpv77o{gap:var(--ds-space-025,2px)}
2
3
  ._19pe12x7 [data-toolbar-component=button]{padding-inline:var(--ds-space-075,6px)}
3
- ._fb2512x7 button{padding-inline:var(--ds-space-075,6px)}._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
4
+ ._19pe1b66 [data-toolbar-component=button]{padding-inline:var(--ds-space-050,4px)}
5
+ ._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
+ ._15rdidpf [data-toolbar-component=button]{border-top-left-radius:0}
4
7
  ._1e0c1txw{display:flex}
5
8
  ._1jiyidpf button{border-bottom-left-radius:0}
6
9
  ._1qq0idpf [data-toolbar-component=button]{border-top-right-radius:0}
7
10
  ._3nesidpf [data-toolbar-component=button]{border-bottom-right-radius:0}
11
+ ._eurs1b66 [data-toolbar-component=button]{padding-right:var(--ds-space-050,4px)}
8
12
  ._i84vidpf [data-toolbar-component=button]{border-bottom-left-radius:0}
13
+ ._pdav12x7 [data-toolbar-component=button]{padding-left:var(--ds-space-075,6px)}
9
14
  ._t1diidpf button{border-top-right-radius:0}
10
15
  ._u6eridpf button{border-bottom-right-radius:0}
11
16
  ._xk07idpf button{border-top-left-radius:0}
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { Children, Fragment } from 'react';
6
6
  import { Box } from '@atlaskit/primitives/compiled';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
8
  var styles = {
8
9
  container: "_1e0c1txw",
9
10
  firstChild: "_fb2512x7 _t1diidpf _u6eridpf",
@@ -11,12 +12,27 @@ var styles = {
11
12
  firstChildNew: "_19pe12x7 _1qq0idpf _3nesidpf",
12
13
  lastChildNew: "_19pe12x7 _15rdidpf _i84vidpf"
13
14
  };
15
+ var stylesNew = {
16
+ container: "_zulpv77o _1e0c1txw _14jy1dpa",
17
+ firstChild: "_1qq0idpf _3nesidpf _pdav12x7 _eurs1b66",
18
+ lastChild: "_19pe1b66 _15rdidpf _i84vidpf"
19
+ };
14
20
  export var ToolbarButtonGroup = function ToolbarButtonGroup(_ref) {
15
21
  var children = _ref.children;
16
22
  var items = Children.toArray(children);
17
23
  var FirstChild = items.at(0);
18
24
  var LastChild = items.at(-1);
19
25
  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
+ }
20
36
  return /*#__PURE__*/React.createElement(Box, {
21
37
  xcss: styles.container,
22
38
  "data-toolbar-component": "button-group"
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org/"
5
5
  },
6
- "version": "0.19.18",
6
+ "version": "0.19.19",
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": "^22.0.0",
33
+ "@atlaskit/tmp-editor-statsig": "^22.1.0",
34
34
  "@atlaskit/tokens": "^11.0.0",
35
35
  "@atlaskit/tooltip": "^20.14.0",
36
36
  "@babel/runtime": "^7.0.0",