@atlaskit/editor-toolbar 0.0.7 → 0.0.9

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/afm-dev-agents/tsconfig.json +54 -0
  3. package/dist/cjs/index.js +127 -1
  4. package/dist/cjs/ui/ToolbarButton.compiled.css +1 -0
  5. package/dist/cjs/ui/ToolbarButton.js +1 -1
  6. package/dist/cjs/ui/ToolbarDropdownDivider.js +5 -5
  7. package/dist/cjs/ui/ToolbarDropdownMenu.js +3 -2
  8. package/dist/cjs/ui/ToolbarNestedDropdownMenu.js +3 -2
  9. package/dist/cjs/ui/ToolbarTooltip.js +5 -2
  10. package/dist/cjs/ui/icons/AILengthenIcon.js +1 -1
  11. package/dist/cjs/ui/icons/AISummarizeIcon.js +13 -0
  12. package/dist/cjs/ui/icons/CodeIcon.js +13 -0
  13. package/dist/cjs/ui/icons/StrikeThroughIcon.js +13 -0
  14. package/dist/cjs/ui/icons/SubscriptIcon.js +36 -0
  15. package/dist/cjs/ui/icons/SuperscriptIcon.js +36 -0
  16. package/dist/cjs/ui/icons/UnderlineIcon.js +13 -0
  17. package/dist/es2019/index.js +19 -1
  18. package/dist/es2019/ui/ToolbarButton.compiled.css +1 -0
  19. package/dist/es2019/ui/ToolbarButton.js +1 -1
  20. package/dist/es2019/ui/ToolbarDropdownDivider.js +3 -4
  21. package/dist/es2019/ui/ToolbarDropdownMenu.js +3 -2
  22. package/dist/es2019/ui/ToolbarNestedDropdownMenu.js +3 -2
  23. package/dist/es2019/ui/ToolbarTooltip.js +4 -2
  24. package/dist/es2019/ui/icons/AILengthenIcon.js +1 -1
  25. package/dist/es2019/ui/icons/AISummarizeIcon.js +2 -0
  26. package/dist/es2019/ui/icons/CodeIcon.js +2 -0
  27. package/dist/es2019/ui/icons/StrikeThroughIcon.js +2 -0
  28. package/dist/es2019/ui/icons/SubscriptIcon.js +25 -0
  29. package/dist/es2019/ui/icons/SuperscriptIcon.js +25 -0
  30. package/dist/es2019/ui/icons/UnderlineIcon.js +2 -0
  31. package/dist/esm/index.js +19 -1
  32. package/dist/esm/ui/ToolbarButton.compiled.css +1 -0
  33. package/dist/esm/ui/ToolbarButton.js +1 -1
  34. package/dist/esm/ui/ToolbarDropdownDivider.js +3 -4
  35. package/dist/esm/ui/ToolbarDropdownMenu.js +3 -2
  36. package/dist/esm/ui/ToolbarNestedDropdownMenu.js +3 -2
  37. package/dist/esm/ui/ToolbarTooltip.js +5 -2
  38. package/dist/esm/ui/icons/AILengthenIcon.js +1 -1
  39. package/dist/esm/ui/icons/AISummarizeIcon.js +2 -0
  40. package/dist/esm/ui/icons/CodeIcon.js +2 -0
  41. package/dist/esm/ui/icons/StrikeThroughIcon.js +2 -0
  42. package/dist/esm/ui/icons/SubscriptIcon.js +28 -0
  43. package/dist/esm/ui/icons/SuperscriptIcon.js +28 -0
  44. package/dist/esm/ui/icons/UnderlineIcon.js +2 -0
  45. package/dist/types/index.d.ts +18 -0
  46. package/dist/types/ui/ToolbarColorSwatch.d.ts +1 -1
  47. package/dist/types/ui/ToolbarDropdownDivider.d.ts +2 -2
  48. package/dist/types/ui/ToolbarDropdownMenu.d.ts +2 -1
  49. package/dist/types/ui/ToolbarNestedDropdownMenu.d.ts +2 -1
  50. package/dist/types/ui/ToolbarTooltip.d.ts +3 -1
  51. package/dist/types/ui/icons/AILengthenIcon.d.ts +1 -1
  52. package/dist/types/ui/icons/AISummarizeIcon.d.ts +1 -0
  53. package/dist/types/ui/icons/CodeIcon.d.ts +1 -0
  54. package/dist/types/ui/icons/StrikeThroughIcon.d.ts +1 -0
  55. package/dist/types/ui/icons/SubscriptIcon.d.ts +2 -0
  56. package/dist/types/ui/icons/SuperscriptIcon.d.ts +2 -0
  57. package/dist/types/ui/icons/UnderlineIcon.d.ts +1 -0
  58. package/dist/types-ts4.5/index.d.ts +18 -0
  59. package/dist/types-ts4.5/ui/ToolbarColorSwatch.d.ts +1 -1
  60. package/dist/types-ts4.5/ui/ToolbarDropdownDivider.d.ts +2 -2
  61. package/dist/types-ts4.5/ui/ToolbarDropdownMenu.d.ts +2 -1
  62. package/dist/types-ts4.5/ui/ToolbarNestedDropdownMenu.d.ts +2 -1
  63. package/dist/types-ts4.5/ui/ToolbarTooltip.d.ts +3 -1
  64. package/dist/types-ts4.5/ui/icons/AILengthenIcon.d.ts +1 -1
  65. package/dist/types-ts4.5/ui/icons/AISummarizeIcon.d.ts +1 -0
  66. package/dist/types-ts4.5/ui/icons/CodeIcon.d.ts +1 -0
  67. package/dist/types-ts4.5/ui/icons/StrikeThroughIcon.d.ts +1 -0
  68. package/dist/types-ts4.5/ui/icons/SubscriptIcon.d.ts +2 -0
  69. package/dist/types-ts4.5/ui/icons/SuperscriptIcon.d.ts +2 -0
  70. package/dist/types-ts4.5/ui/icons/UnderlineIcon.d.ts +1 -0
  71. package/examples/toolbar/examples/ExampleManuallyComposedToolbar.tsx +2 -2
  72. package/package.json +2 -3
  73. package/src/index.ts +18 -0
  74. package/src/ui/ToolbarButton.tsx +1 -0
  75. package/src/ui/ToolbarColorSwatch.tsx +1 -4
  76. package/src/ui/ToolbarDropdownDivider.tsx +6 -3
  77. package/src/ui/ToolbarDropdownMenu.tsx +3 -1
  78. package/src/ui/ToolbarNestedDropdownMenu.tsx +3 -1
  79. package/src/ui/ToolbarTooltip.tsx +8 -2
  80. package/src/ui/icons/AILengthenIcon.tsx +1 -1
  81. package/src/ui/icons/AISummarizeIcon.tsx +2 -0
  82. package/src/ui/icons/CodeIcon.tsx +2 -0
  83. package/src/ui/icons/StrikeThroughIcon.tsx +2 -0
  84. package/src/ui/icons/SubscriptIcon.tsx +31 -0
  85. package/src/ui/icons/SuperscriptIcon.tsx +31 -0
  86. package/src/ui/icons/UnderlineIcon.tsx +2 -0
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { default as StrikeThroughIcon } from '@atlaskit/icon/core/text-strikethrough';
@@ -0,0 +1,25 @@
1
+ /* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
2
+ import React from 'react';
3
+ const SVGContainer = ({
4
+ children
5
+ }) => /*#__PURE__*/React.createElement("span", {
6
+ style: {
7
+ width: "var(--ds-space-200, 16px)",
8
+ height: "var(--ds-space-200, 16px)",
9
+ display: 'flex',
10
+ justifyContent: 'center',
11
+ alignItems: 'center'
12
+ }
13
+ }, children);
14
+ export const SubscriptIcon = () => /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
15
+ width: "16",
16
+ height: "16",
17
+ viewBox: "0 0 16 16",
18
+ fill: "none",
19
+ xmlns: "http://www.w3.org/2000/svg"
20
+ }, /*#__PURE__*/React.createElement("path", {
21
+ "fill-rule": "evenodd",
22
+ "clip-rule": "evenodd",
23
+ d: "M5.10609 6.54799L7.88895 2.09448L9.16102 2.88936L5.99047 7.9633L9.21219 13.1191L7.94012 13.914L5.10609 9.37861L2.27207 13.914L1 13.1191L4.2217 7.9633L1.05117 2.88939L2.32324 2.09451L5.10609 6.54799ZM10.858 15.0001V13.696H12.3499V10.3153L10.8418 11.4343V9.86413L12.3138 8.83114H13.8161V13.696H14.9999V15.0001H10.858Z",
24
+ fill: "currentColor"
25
+ })));
@@ -0,0 +1,25 @@
1
+ /* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
2
+ import React from 'react';
3
+ const SVGContainer = ({
4
+ children
5
+ }) => /*#__PURE__*/React.createElement("span", {
6
+ style: {
7
+ width: "var(--ds-space-200, 16px)",
8
+ height: "var(--ds-space-200, 16px)",
9
+ display: 'flex',
10
+ justifyContent: 'center',
11
+ alignItems: 'center'
12
+ }
13
+ }, children);
14
+ export const SuperscriptIcon = () => /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
15
+ width: "16",
16
+ height: "16",
17
+ viewBox: "0 0 16 16",
18
+ fill: "none",
19
+ xmlns: "http://www.w3.org/2000/svg"
20
+ }, /*#__PURE__*/React.createElement("path", {
21
+ "fill-rule": "evenodd",
22
+ "clip-rule": "evenodd",
23
+ d: "M10.858 7.16892V5.86487H12.3499V2.4842L10.8418 3.60312V2.03298L12.3138 1H13.8161V5.86487H14.9999V7.16892H10.858ZM5.10609 6.5479L7.88895 2.09439L9.16102 2.88927L5.99047 7.96321L9.21219 13.119L7.94012 13.9139L5.10609 9.37852L2.27207 13.9139L1 13.119L4.2217 7.96321L1.05117 2.8893L2.32324 2.09442L5.10609 6.5479Z",
24
+ fill: "currentColor"
25
+ })));
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { default as UnderlineIcon } from '@atlaskit/icon/core/text-underline';
package/dist/esm/index.js CHANGED
@@ -8,8 +8,20 @@ export { ToolbarDropdownItemSection } from './ui/ToolbarDropdownItemSection';
8
8
  export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
9
9
  export { ToolbarSection } from './ui/ToolbarSection';
10
10
  export { ToolbarTooltip } from './ui/ToolbarTooltip';
11
+ export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
12
+ export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
11
13
  export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
12
14
  export { AIChatIcon } from './ui/icons/AIChatIcon';
15
+ export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
16
+ export { AICasualIcon } from './ui/icons/AICasualIcon';
17
+ export { AIHeartIcon } from './ui/icons/AIHeartIcon';
18
+ export { AIShortenIcon } from './ui/icons/AIShortenIcon';
19
+ export { AISpellcheckIcon } from './ui/icons/AISpellcheckIcon';
20
+ export { AIChangeToneIcon } from './ui/icons/AIChangeToneIcon';
21
+ export { AILengthenIcon } from './ui/icons/AILengthenIcon';
22
+ export { AISummarizeIcon } from './ui/icons/AISummarizeIcon';
23
+ export { AITranslateIcon } from './ui/icons/AITranslateIcon';
24
+ export { NestedDropdownRightIcon } from './ui/icons/NestedDropdownRightIcon';
13
25
  export { AICommandIcon } from './ui/icons/AICommandIcon';
14
26
  export { AddIcon } from './ui/icons/AddIcon';
15
27
  export { AppsIcon } from './ui/icons/AppsIcon';
@@ -30,4 +42,10 @@ export { PinIcon } from './ui/icons/PinIcon';
30
42
  export { PinnedIcon } from './ui/icons/PinnedIcon';
31
43
  export { QuoteIcon } from './ui/icons/QuoteIcon';
32
44
  export { TextColorIcon } from './ui/icons/TextColorIcon';
33
- export { TextIcon } from './ui/icons/TextIcon';
45
+ export { TextIcon } from './ui/icons/TextIcon';
46
+ export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
47
+ export { UnderlineIcon } from './ui/icons/UnderlineIcon';
48
+ export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
49
+ export { CodeIcon } from './ui/icons/CodeIcon';
50
+ export { SubscriptIcon } from './ui/icons/SubscriptIcon';
51
+ export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
@@ -21,6 +21,7 @@
21
21
  ._qrwqidpf{border-top-right-radius:0}
22
22
  ._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
23
23
  ._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
24
+ ._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
24
25
  ._u5f312x7{padding-right:var(--ds-space-075,6px)}
25
26
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
26
27
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
@@ -8,7 +8,7 @@ var styles = {
8
8
  button: "_zulp12x7 _2rkoiti9 _1e0c1txw _bfhksm61 _o5721q9c _4cvr1h6o _1bah1h6o _1tke1f4h _syaz1gjq _k48p1wq8 _19bvu2gc _u5f3u2gc _1ah3idpf _g0pbkb7n _oh03h2mm",
9
9
  enabled: "_irr3166n _1di61dty",
10
10
  disabled: "_syaz1lh4 _80om13gf",
11
- selected: "_bfhkfg4m _irr3i1yw _1di619ru",
11
+ selected: "_bfhkfg4m _syazaqb7 _irr3i1yw _1di619ru",
12
12
  groupStart: "_qrwqidpf _1o0zidpf _1bahesu3 _19bv12x7 _u5f3v77o",
13
13
  groupMiddle: "_13liidpf _mrkbidpf _qrwqidpf _1o0zidpf _19bv1b66 _u5f31b66",
14
14
  groupEnd: "_13liidpf _mrkbidpf _1bah1y6m _19bvv77o _u5f312x7"
@@ -1,13 +1,12 @@
1
1
  /* ToolbarDropdownDivider.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import "./ToolbarDropdownDivider.compiled.css";
3
+ import * as React from 'react';
3
4
  import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
- import { Box } from '@atlaskit/primitives/compiled';
6
5
  var styles = {
7
6
  divider: "_1o3imuej _1il9nqa1 _1doce4h9"
8
7
  };
9
8
  export var ToolbarDropdownDivider = function ToolbarDropdownDivider() {
10
- return /*#__PURE__*/React.createElement(Box, {
11
- xcss: styles.divider
9
+ return /*#__PURE__*/React.createElement("div", {
10
+ className: ax([styles.divider])
12
11
  });
13
12
  };
@@ -5,7 +5,8 @@ export var ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref) {
5
5
  var iconBefore = _ref.iconBefore,
6
6
  groupLocation = _ref.groupLocation,
7
7
  children = _ref.children,
8
- isDisabled = _ref.isDisabled;
8
+ isDisabled = _ref.isDisabled,
9
+ testId = _ref.testId;
9
10
  return /*#__PURE__*/React.createElement(DropdownMenu, {
10
11
  trigger: function trigger(triggerProps) {
11
12
  return /*#__PURE__*/React.createElement(ToolbarButton, {
@@ -17,7 +18,7 @@ export var ToolbarDropdownMenu = function ToolbarDropdownMenu(_ref) {
17
18
  onBlur: triggerProps.onBlur,
18
19
  onClick: triggerProps.onClick,
19
20
  onFocus: triggerProps.onFocus,
20
- testId: triggerProps.testId,
21
+ testId: testId,
21
22
  iconBefore: iconBefore,
22
23
  groupLocation: groupLocation,
23
24
  isDisabled: isDisabled
@@ -6,7 +6,8 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
6
6
  text = _ref.text,
7
7
  elemAfter = _ref.elemAfter,
8
8
  children = _ref.children,
9
- isDisabled = _ref.isDisabled;
9
+ isDisabled = _ref.isDisabled,
10
+ testId = _ref.testId;
10
11
  return /*#__PURE__*/React.createElement(DropdownMenu, {
11
12
  placement: "right-start",
12
13
  trigger: function trigger(triggerProps) {
@@ -15,7 +16,7 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
15
16
  elemAfter: elemAfter,
16
17
  isSelected: triggerProps.isSelected,
17
18
  onClick: triggerProps.onClick,
18
- testId: triggerProps.testId,
19
+ testId: testId,
19
20
  triggerRef: triggerProps.triggerRef,
20
21
  hasNestedDropdownMenu: true,
21
22
  isDisabled: isDisabled
@@ -2,8 +2,11 @@ import React from 'react';
2
2
  import Tooltip from '@atlaskit/tooltip';
3
3
  export var ToolbarTooltip = function ToolbarTooltip(_ref) {
4
4
  var content = _ref.content,
5
- children = _ref.children;
5
+ children = _ref.children,
6
+ _ref$position = _ref.position,
7
+ position = _ref$position === void 0 ? 'top' : _ref$position;
6
8
  return /*#__PURE__*/React.createElement(Tooltip, {
7
- content: content
9
+ content: content,
10
+ position: position
8
11
  }, children);
9
12
  };
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { default as AILenghtenIcon } from '@atlaskit/icon-lab/core/text-lengthen';
2
+ export { default as AILengthenIcon } from '@atlaskit/icon-lab/core/text-lengthen';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { default as AISummarizeIcon } from '@atlaskit/icon/core/ai-generative-text-summary';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { default as CodeIcon } from '@atlaskit/icon/core/angle-brackets';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { default as StrikeThroughIcon } from '@atlaskit/icon/core/text-strikethrough';
@@ -0,0 +1,28 @@
1
+ /* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
2
+ import React from 'react';
3
+ var SVGContainer = function SVGContainer(_ref) {
4
+ var children = _ref.children;
5
+ return /*#__PURE__*/React.createElement("span", {
6
+ style: {
7
+ width: "var(--ds-space-200, 16px)",
8
+ height: "var(--ds-space-200, 16px)",
9
+ display: 'flex',
10
+ justifyContent: 'center',
11
+ alignItems: 'center'
12
+ }
13
+ }, children);
14
+ };
15
+ export var SubscriptIcon = function SubscriptIcon() {
16
+ return /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
17
+ width: "16",
18
+ height: "16",
19
+ viewBox: "0 0 16 16",
20
+ fill: "none",
21
+ xmlns: "http://www.w3.org/2000/svg"
22
+ }, /*#__PURE__*/React.createElement("path", {
23
+ "fill-rule": "evenodd",
24
+ "clip-rule": "evenodd",
25
+ d: "M5.10609 6.54799L7.88895 2.09448L9.16102 2.88936L5.99047 7.9633L9.21219 13.1191L7.94012 13.914L5.10609 9.37861L2.27207 13.914L1 13.1191L4.2217 7.9633L1.05117 2.88939L2.32324 2.09451L5.10609 6.54799ZM10.858 15.0001V13.696H12.3499V10.3153L10.8418 11.4343V9.86413L12.3138 8.83114H13.8161V13.696H14.9999V15.0001H10.858Z",
26
+ fill: "currentColor"
27
+ })));
28
+ };
@@ -0,0 +1,28 @@
1
+ /* eslint-disable @atlaskit/ui-styling-standard/enforce-style-prop */
2
+ import React from 'react';
3
+ var SVGContainer = function SVGContainer(_ref) {
4
+ var children = _ref.children;
5
+ return /*#__PURE__*/React.createElement("span", {
6
+ style: {
7
+ width: "var(--ds-space-200, 16px)",
8
+ height: "var(--ds-space-200, 16px)",
9
+ display: 'flex',
10
+ justifyContent: 'center',
11
+ alignItems: 'center'
12
+ }
13
+ }, children);
14
+ };
15
+ export var SuperscriptIcon = function SuperscriptIcon() {
16
+ return /*#__PURE__*/React.createElement(SVGContainer, null, /*#__PURE__*/React.createElement("svg", {
17
+ width: "16",
18
+ height: "16",
19
+ viewBox: "0 0 16 16",
20
+ fill: "none",
21
+ xmlns: "http://www.w3.org/2000/svg"
22
+ }, /*#__PURE__*/React.createElement("path", {
23
+ "fill-rule": "evenodd",
24
+ "clip-rule": "evenodd",
25
+ d: "M10.858 7.16892V5.86487H12.3499V2.4842L10.8418 3.60312V2.03298L12.3138 1H13.8161V5.86487H14.9999V7.16892H10.858ZM5.10609 6.5479L7.88895 2.09439L9.16102 2.88927L5.99047 7.96321L9.21219 13.119L7.94012 13.9139L5.10609 9.37852L2.27207 13.9139L1 13.119L4.2217 7.96321L1.05117 2.8893L2.32324 2.09442L5.10609 6.5479Z",
26
+ fill: "currentColor"
27
+ })));
28
+ };
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { default as UnderlineIcon } from '@atlaskit/icon/core/text-underline';
@@ -7,8 +7,20 @@ export { ToolbarDropdownItemSection } from './ui/ToolbarDropdownItemSection';
7
7
  export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
8
8
  export { ToolbarSection } from './ui/ToolbarSection';
9
9
  export { ToolbarTooltip } from './ui/ToolbarTooltip';
10
+ export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
11
+ export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
10
12
  export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
11
13
  export { AIChatIcon } from './ui/icons/AIChatIcon';
14
+ export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
15
+ export { AICasualIcon } from './ui/icons/AICasualIcon';
16
+ export { AIHeartIcon } from './ui/icons/AIHeartIcon';
17
+ export { AIShortenIcon } from './ui/icons/AIShortenIcon';
18
+ export { AISpellcheckIcon } from './ui/icons/AISpellcheckIcon';
19
+ export { AIChangeToneIcon } from './ui/icons/AIChangeToneIcon';
20
+ export { AILengthenIcon } from './ui/icons/AILengthenIcon';
21
+ export { AISummarizeIcon } from './ui/icons/AISummarizeIcon';
22
+ export { AITranslateIcon } from './ui/icons/AITranslateIcon';
23
+ export { NestedDropdownRightIcon } from './ui/icons/NestedDropdownRightIcon';
12
24
  export { AICommandIcon } from './ui/icons/AICommandIcon';
13
25
  export { AddIcon } from './ui/icons/AddIcon';
14
26
  export { AppsIcon } from './ui/icons/AppsIcon';
@@ -30,4 +42,10 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
30
42
  export { QuoteIcon } from './ui/icons/QuoteIcon';
31
43
  export { TextColorIcon } from './ui/icons/TextColorIcon';
32
44
  export { TextIcon } from './ui/icons/TextIcon';
45
+ export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
46
+ export { UnderlineIcon } from './ui/icons/UnderlineIcon';
47
+ export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
48
+ export { CodeIcon } from './ui/icons/CodeIcon';
49
+ export { SubscriptIcon } from './ui/icons/SubscriptIcon';
50
+ export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
33
51
  export type { IconComponent, ToolbarButtonGroupLocation } from './types';
@@ -3,5 +3,5 @@ type ToolbarColorSwatchProps = {
3
3
  children?: ReactNode;
4
4
  highlightColor?: string;
5
5
  };
6
- export declare const ToolbarColorSwatch: ({ children, highlightColor, }: ToolbarColorSwatchProps) => React.JSX.Element;
6
+ export declare const ToolbarColorSwatch: ({ children, highlightColor }: ToolbarColorSwatchProps) => React.JSX.Element;
7
7
  export {};
@@ -1,2 +1,2 @@
1
- import React from 'react';
2
- export declare const ToolbarDropdownDivider: () => React.JSX.Element;
1
+ /// <reference types="react" />
2
+ export declare const ToolbarDropdownDivider: () => JSX.Element;
@@ -5,6 +5,7 @@ type ToolbarDropdownMenuProps = {
5
5
  children?: ReactNode;
6
6
  groupLocation?: ToolbarButtonGroupLocation;
7
7
  isDisabled?: boolean;
8
+ testId?: string;
8
9
  };
9
- export declare const ToolbarDropdownMenu: ({ iconBefore, groupLocation, children, isDisabled, }: ToolbarDropdownMenuProps) => React.JSX.Element;
10
+ export declare const ToolbarDropdownMenu: ({ iconBefore, groupLocation, children, isDisabled, testId, }: ToolbarDropdownMenuProps) => React.JSX.Element;
10
11
  export {};
@@ -5,6 +5,7 @@ type ToolbarNestedDropdownMenuProps = {
5
5
  text?: string;
6
6
  children?: ReactNode;
7
7
  isDisabled?: boolean;
8
+ testId?: string;
8
9
  };
9
- export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, }: ToolbarNestedDropdownMenuProps) => React.JSX.Element;
10
+ export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, testId, }: ToolbarNestedDropdownMenuProps) => React.JSX.Element;
10
11
  export {};
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
+ import type { PositionType } from '@atlaskit/tooltip';
2
3
  type ToolbarTooltipProps = {
3
4
  content: string;
4
5
  children: React.ReactNode;
6
+ position?: PositionType;
5
7
  };
6
- export declare const ToolbarTooltip: ({ content, children }: ToolbarTooltipProps) => React.JSX.Element;
8
+ export declare const ToolbarTooltip: ({ content, children, position }: ToolbarTooltipProps) => React.JSX.Element;
7
9
  export {};
@@ -1 +1 @@
1
- export { default as AILenghtenIcon } from '@atlaskit/icon-lab/core/text-lengthen';
1
+ export { default as AILengthenIcon } from '@atlaskit/icon-lab/core/text-lengthen';
@@ -0,0 +1 @@
1
+ export { default as AISummarizeIcon } from '@atlaskit/icon/core/ai-generative-text-summary';
@@ -0,0 +1 @@
1
+ export { default as CodeIcon } from '@atlaskit/icon/core/angle-brackets';
@@ -0,0 +1 @@
1
+ export { default as StrikeThroughIcon } from '@atlaskit/icon/core/text-strikethrough';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SubscriptIcon: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SuperscriptIcon: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export { default as UnderlineIcon } from '@atlaskit/icon/core/text-underline';
@@ -7,8 +7,20 @@ export { ToolbarDropdownItemSection } from './ui/ToolbarDropdownItemSection';
7
7
  export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
8
8
  export { ToolbarSection } from './ui/ToolbarSection';
9
9
  export { ToolbarTooltip } from './ui/ToolbarTooltip';
10
+ export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
11
+ export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
10
12
  export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
11
13
  export { AIChatIcon } from './ui/icons/AIChatIcon';
14
+ export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
15
+ export { AICasualIcon } from './ui/icons/AICasualIcon';
16
+ export { AIHeartIcon } from './ui/icons/AIHeartIcon';
17
+ export { AIShortenIcon } from './ui/icons/AIShortenIcon';
18
+ export { AISpellcheckIcon } from './ui/icons/AISpellcheckIcon';
19
+ export { AIChangeToneIcon } from './ui/icons/AIChangeToneIcon';
20
+ export { AILengthenIcon } from './ui/icons/AILengthenIcon';
21
+ export { AISummarizeIcon } from './ui/icons/AISummarizeIcon';
22
+ export { AITranslateIcon } from './ui/icons/AITranslateIcon';
23
+ export { NestedDropdownRightIcon } from './ui/icons/NestedDropdownRightIcon';
12
24
  export { AICommandIcon } from './ui/icons/AICommandIcon';
13
25
  export { AddIcon } from './ui/icons/AddIcon';
14
26
  export { AppsIcon } from './ui/icons/AppsIcon';
@@ -30,4 +42,10 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
30
42
  export { QuoteIcon } from './ui/icons/QuoteIcon';
31
43
  export { TextColorIcon } from './ui/icons/TextColorIcon';
32
44
  export { TextIcon } from './ui/icons/TextIcon';
45
+ export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
46
+ export { UnderlineIcon } from './ui/icons/UnderlineIcon';
47
+ export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
48
+ export { CodeIcon } from './ui/icons/CodeIcon';
49
+ export { SubscriptIcon } from './ui/icons/SubscriptIcon';
50
+ export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
33
51
  export type { IconComponent, ToolbarButtonGroupLocation } from './types';
@@ -3,5 +3,5 @@ type ToolbarColorSwatchProps = {
3
3
  children?: ReactNode;
4
4
  highlightColor?: string;
5
5
  };
6
- export declare const ToolbarColorSwatch: ({ children, highlightColor, }: ToolbarColorSwatchProps) => React.JSX.Element;
6
+ export declare const ToolbarColorSwatch: ({ children, highlightColor }: ToolbarColorSwatchProps) => React.JSX.Element;
7
7
  export {};
@@ -1,2 +1,2 @@
1
- import React from 'react';
2
- export declare const ToolbarDropdownDivider: () => React.JSX.Element;
1
+ /// <reference types="react" />
2
+ export declare const ToolbarDropdownDivider: () => JSX.Element;
@@ -5,6 +5,7 @@ type ToolbarDropdownMenuProps = {
5
5
  children?: ReactNode;
6
6
  groupLocation?: ToolbarButtonGroupLocation;
7
7
  isDisabled?: boolean;
8
+ testId?: string;
8
9
  };
9
- export declare const ToolbarDropdownMenu: ({ iconBefore, groupLocation, children, isDisabled, }: ToolbarDropdownMenuProps) => React.JSX.Element;
10
+ export declare const ToolbarDropdownMenu: ({ iconBefore, groupLocation, children, isDisabled, testId, }: ToolbarDropdownMenuProps) => React.JSX.Element;
10
11
  export {};
@@ -5,6 +5,7 @@ type ToolbarNestedDropdownMenuProps = {
5
5
  text?: string;
6
6
  children?: ReactNode;
7
7
  isDisabled?: boolean;
8
+ testId?: string;
8
9
  };
9
- export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, }: ToolbarNestedDropdownMenuProps) => React.JSX.Element;
10
+ export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, testId, }: ToolbarNestedDropdownMenuProps) => React.JSX.Element;
10
11
  export {};
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
+ import type { PositionType } from '@atlaskit/tooltip';
2
3
  type ToolbarTooltipProps = {
3
4
  content: string;
4
5
  children: React.ReactNode;
6
+ position?: PositionType;
5
7
  };
6
- export declare const ToolbarTooltip: ({ content, children }: ToolbarTooltipProps) => React.JSX.Element;
8
+ export declare const ToolbarTooltip: ({ content, children, position }: ToolbarTooltipProps) => React.JSX.Element;
7
9
  export {};
@@ -1 +1 @@
1
- export { default as AILenghtenIcon } from '@atlaskit/icon-lab/core/text-lengthen';
1
+ export { default as AILengthenIcon } from '@atlaskit/icon-lab/core/text-lengthen';
@@ -0,0 +1 @@
1
+ export { default as AISummarizeIcon } from '@atlaskit/icon/core/ai-generative-text-summary';
@@ -0,0 +1 @@
1
+ export { default as CodeIcon } from '@atlaskit/icon/core/angle-brackets';
@@ -0,0 +1 @@
1
+ export { default as StrikeThroughIcon } from '@atlaskit/icon/core/text-strikethrough';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SubscriptIcon: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SuperscriptIcon: () => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export { default as UnderlineIcon } from '@atlaskit/icon/core/text-underline';
@@ -12,7 +12,7 @@ import { AIChangeToneIcon } from '../../../src/ui/icons/AIChangeToneIcon';
12
12
  import { AIChatIcon } from '../../../src/ui/icons/AIChatIcon';
13
13
  import { AICommandIcon } from '../../../src/ui/icons/AICommandIcon';
14
14
  import { AIHeartIcon } from '../../../src/ui/icons/AIHeartIcon';
15
- import { AILenghtenIcon } from '../../../src/ui/icons/AILengthenIcon';
15
+ import { AILengthenIcon } from '../../../src/ui/icons/AILengthenIcon';
16
16
  import { AIBriefcaseIcon } from '../../../src/ui/icons/AIProfessionalIcon';
17
17
  import { AIShortenIcon } from '../../../src/ui/icons/AIShortenIcon';
18
18
  import { AISpellcheckIcon } from '../../../src/ui/icons/AISpellcheckIcon';
@@ -165,7 +165,7 @@ export const ExampleManuallyComposedToolbar = () => {
165
165
  Make shorter
166
166
  </ToolbarDropdownItem>
167
167
  <ToolbarDropdownItem
168
- elemBefore={<AILenghtenIcon label="Make longer" />}
168
+ elemBefore={<AILengthenIcon label="Make longer" />}
169
169
  onClick={onClick('Make longer')}
170
170
  >
171
171
  Make longer
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org/"
5
5
  },
6
- "version": "0.0.7",
6
+ "version": "0.0.9",
7
7
  "description": "Common UI for Toolbars across the platform",
8
8
  "atlassian": {
9
9
  "team": "Editor: Jenga",
@@ -47,8 +47,7 @@
47
47
  "@atlaskit/ssr": "workspace:^",
48
48
  "@atlaskit/visual-regression": "workspace:^",
49
49
  "@testing-library/react": "^13.4.0",
50
- "react-dom": "^18.2.0",
51
- "typescript": "~5.4.2"
50
+ "react-dom": "^18.2.0"
52
51
  },
53
52
  "techstack": {
54
53
  "@atlassian/frontend": {
package/src/index.ts CHANGED
@@ -8,9 +8,21 @@ export { ToolbarDropdownItemSection } from './ui/ToolbarDropdownItemSection';
8
8
  export { ToolbarKeyboardShortcutHint } from './ui/ToolbarKeyboardShortcutHint';
9
9
  export { ToolbarSection } from './ui/ToolbarSection';
10
10
  export { ToolbarTooltip } from './ui/ToolbarTooltip';
11
+ export { ToolbarNestedDropdownMenu } from './ui/ToolbarNestedDropdownMenu';
12
+ export { ToolbarDropdownDivider } from './ui/ToolbarDropdownDivider';
11
13
 
12
14
  export { AIAdjustLengthIcon } from './ui/icons/AIAdjustLengthIcon';
13
15
  export { AIChatIcon } from './ui/icons/AIChatIcon';
16
+ export { AIBriefcaseIcon } from './ui/icons/AIProfessionalIcon';
17
+ export { AICasualIcon } from './ui/icons/AICasualIcon';
18
+ export { AIHeartIcon } from './ui/icons/AIHeartIcon';
19
+ export { AIShortenIcon } from './ui/icons/AIShortenIcon';
20
+ export { AISpellcheckIcon } from './ui/icons/AISpellcheckIcon';
21
+ export { AIChangeToneIcon } from './ui/icons/AIChangeToneIcon';
22
+ export { AILengthenIcon } from './ui/icons/AILengthenIcon';
23
+ export { AISummarizeIcon } from './ui/icons/AISummarizeIcon';
24
+ export { AITranslateIcon } from './ui/icons/AITranslateIcon';
25
+ export { NestedDropdownRightIcon } from './ui/icons/NestedDropdownRightIcon';
14
26
  export { AICommandIcon } from './ui/icons/AICommandIcon';
15
27
  export { AddIcon } from './ui/icons/AddIcon';
16
28
  export { AppsIcon } from './ui/icons/AppsIcon';
@@ -32,5 +44,11 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
32
44
  export { QuoteIcon } from './ui/icons/QuoteIcon';
33
45
  export { TextColorIcon } from './ui/icons/TextColorIcon';
34
46
  export { TextIcon } from './ui/icons/TextIcon';
47
+ export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
48
+ export { UnderlineIcon } from './ui/icons/UnderlineIcon';
49
+ export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
50
+ export { CodeIcon } from './ui/icons/CodeIcon';
51
+ export { SubscriptIcon } from './ui/icons/SubscriptIcon';
52
+ export { SuperscriptIcon } from './ui/icons/SuperscriptIcon';
35
53
 
36
54
  export type { IconComponent, ToolbarButtonGroupLocation } from './types';
@@ -41,6 +41,7 @@ const styles = cssMap({
41
41
  },
42
42
  selected: {
43
43
  backgroundColor: token('color.background.selected'),
44
+ color: token('color.text.selected'),
44
45
  '&:hover': {
45
46
  backgroundColor: token('color.background.selected.hovered'),
46
47
  },
@@ -23,10 +23,7 @@ const styles = cssMap({
23
23
  },
24
24
  });
25
25
 
26
- export const ToolbarColorSwatch = ({
27
- children,
28
- highlightColor,
29
- }: ToolbarColorSwatchProps) => {
26
+ export const ToolbarColorSwatch = ({ children, highlightColor }: ToolbarColorSwatchProps) => {
30
27
  return (
31
28
  <Box
32
29
  xcss={styles.colorSwatch}
@@ -1,7 +1,10 @@
1
- import React from 'react';
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { jsx } from '@compiled/react';
2
6
 
3
7
  import { cssMap } from '@atlaskit/css';
4
- import { Box } from '@atlaskit/primitives/compiled';
5
8
  import { token } from '@atlaskit/tokens';
6
9
 
7
10
  const styles = cssMap({
@@ -13,5 +16,5 @@ const styles = cssMap({
13
16
  });
14
17
 
15
18
  export const ToolbarDropdownDivider = () => {
16
- return <Box xcss={styles.divider} />;
19
+ return <div css={styles.divider} />;
17
20
  };
@@ -11,6 +11,7 @@ type ToolbarDropdownMenuProps = {
11
11
  children?: ReactNode;
12
12
  groupLocation?: ToolbarButtonGroupLocation;
13
13
  isDisabled?: boolean;
14
+ testId?: string;
14
15
  };
15
16
 
16
17
  export const ToolbarDropdownMenu = ({
@@ -18,6 +19,7 @@ export const ToolbarDropdownMenu = ({
18
19
  groupLocation,
19
20
  children,
20
21
  isDisabled,
22
+ testId,
21
23
  }: ToolbarDropdownMenuProps) => {
22
24
  return (
23
25
  <DropdownMenu<HTMLButtonElement>
@@ -31,7 +33,7 @@ export const ToolbarDropdownMenu = ({
31
33
  onBlur={triggerProps.onBlur}
32
34
  onClick={triggerProps.onClick}
33
35
  onFocus={triggerProps.onFocus}
34
- testId={triggerProps.testId}
36
+ testId={testId}
35
37
  iconBefore={iconBefore}
36
38
  groupLocation={groupLocation}
37
39
  isDisabled={isDisabled}