@atlaskit/editor-toolbar 0.0.5 → 0.0.6

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 (70) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/afm-rovo-extension/tsconfig.json +54 -0
  3. package/afm-townsquare/tsconfig.json +54 -0
  4. package/dist/cjs/ui/Toolbar.compiled.css +1 -1
  5. package/dist/cjs/ui/Toolbar.js +1 -1
  6. package/dist/cjs/ui/ToolbarButton.compiled.css +1 -1
  7. package/dist/cjs/ui/ToolbarButton.js +3 -14
  8. package/dist/cjs/ui/ToolbarColorSwatch.compiled.css +9 -0
  9. package/dist/cjs/ui/ToolbarColorSwatch.js +25 -0
  10. package/dist/cjs/ui/ToolbarDropdownMenu.js +2 -4
  11. package/dist/cjs/ui/icons/AIChatIcon.compiled.css +5 -0
  12. package/dist/cjs/ui/icons/AIChatIcon.js +12 -3
  13. package/dist/cjs/ui/icons/TextColorIcon.compiled.css +1 -0
  14. package/dist/cjs/ui/icons/TextColorIcon.js +30 -7
  15. package/dist/es2019/ui/Toolbar.compiled.css +1 -1
  16. package/dist/es2019/ui/Toolbar.js +1 -1
  17. package/dist/es2019/ui/ToolbarButton.compiled.css +1 -1
  18. package/dist/es2019/ui/ToolbarButton.js +3 -14
  19. package/dist/es2019/ui/ToolbarColorSwatch.compiled.css +9 -0
  20. package/dist/es2019/ui/ToolbarColorSwatch.js +19 -0
  21. package/dist/es2019/ui/ToolbarDropdownMenu.js +2 -4
  22. package/dist/es2019/ui/icons/AIChatIcon.compiled.css +5 -0
  23. package/dist/es2019/ui/icons/AIChatIcon.js +12 -3
  24. package/dist/es2019/ui/icons/TextColorIcon.compiled.css +1 -0
  25. package/dist/es2019/ui/icons/TextColorIcon.js +30 -2
  26. package/dist/esm/ui/Toolbar.compiled.css +1 -1
  27. package/dist/esm/ui/Toolbar.js +1 -1
  28. package/dist/esm/ui/ToolbarButton.compiled.css +1 -1
  29. package/dist/esm/ui/ToolbarButton.js +3 -14
  30. package/dist/esm/ui/ToolbarColorSwatch.compiled.css +9 -0
  31. package/dist/esm/ui/ToolbarColorSwatch.js +18 -0
  32. package/dist/esm/ui/ToolbarDropdownMenu.js +2 -4
  33. package/dist/esm/ui/icons/AIChatIcon.compiled.css +5 -0
  34. package/dist/esm/ui/icons/AIChatIcon.js +12 -3
  35. package/dist/esm/ui/icons/TextColorIcon.compiled.css +1 -0
  36. package/dist/esm/ui/icons/TextColorIcon.js +29 -2
  37. package/dist/types/ui/ToolbarButton.d.ts +2 -3
  38. package/dist/types/ui/ToolbarColorSwatch.d.ts +7 -0
  39. package/dist/types/ui/ToolbarDropdownMenu.d.ts +3 -4
  40. package/dist/types/ui/icons/TextColorIcon.d.ts +9 -1
  41. package/dist/types-ts4.5/ui/ToolbarButton.d.ts +2 -3
  42. package/dist/types-ts4.5/ui/ToolbarColorSwatch.d.ts +7 -0
  43. package/dist/types-ts4.5/ui/ToolbarDropdownMenu.d.ts +3 -4
  44. package/dist/types-ts4.5/ui/icons/TextColorIcon.d.ts +9 -1
  45. package/examples/toolbar/examples/ExampleManuallyComposedToolbar.tsx +62 -58
  46. package/package.json +3 -3
  47. package/src/ui/Toolbar.tsx +1 -1
  48. package/src/ui/ToolbarButton.tsx +5 -18
  49. package/src/ui/ToolbarColorSwatch.tsx +40 -0
  50. package/src/ui/ToolbarDropdownMenu.tsx +4 -7
  51. package/src/ui/icons/AIChatIcon.tsx +15 -1
  52. package/src/ui/icons/TextColorIcon.tsx +43 -2
  53. package/dist/cjs/ui/ColorIndicatorWrapper.compiled.css +0 -4
  54. package/dist/cjs/ui/ColorIndicatorWrapper.js +0 -26
  55. package/dist/cjs/ui/ToolbarDivider.compiled.css +0 -6
  56. package/dist/cjs/ui/ToolbarDivider.js +0 -20
  57. package/dist/es2019/ui/ColorIndicatorWrapper.compiled.css +0 -4
  58. package/dist/es2019/ui/ColorIndicatorWrapper.js +0 -18
  59. package/dist/es2019/ui/ToolbarDivider.compiled.css +0 -6
  60. package/dist/es2019/ui/ToolbarDivider.js +0 -13
  61. package/dist/esm/ui/ColorIndicatorWrapper.compiled.css +0 -4
  62. package/dist/esm/ui/ColorIndicatorWrapper.js +0 -19
  63. package/dist/esm/ui/ToolbarDivider.compiled.css +0 -6
  64. package/dist/esm/ui/ToolbarDivider.js +0 -13
  65. package/dist/types/ui/ColorIndicatorWrapper.d.ts +0 -7
  66. package/dist/types/ui/ToolbarDivider.d.ts +0 -2
  67. package/dist/types-ts4.5/ui/ColorIndicatorWrapper.d.ts +0 -7
  68. package/dist/types-ts4.5/ui/ToolbarDivider.d.ts +0 -2
  69. package/src/ui/ColorIndicatorWrapper.tsx +0 -25
  70. package/src/ui/ToolbarDivider.tsx +0 -20
@@ -1,2 +1,43 @@
1
- /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { default as TextColorIcon } from '@atlaskit/icon/core/text-style';
1
+ import React from 'react';
2
+
3
+ import { cssMap } from '@atlaskit/css';
4
+ import Icon from '@atlaskit/icon/core/text-style';
5
+ import { type NewCoreIconProps } from '@atlaskit/icon/types';
6
+ import { Box } from '@atlaskit/primitives/compiled';
7
+ import { token } from '@atlaskit/tokens';
8
+ import { type IconColor } from '@atlaskit/tokens/css-type-schema';
9
+
10
+ type TextColorIconProps = NewCoreIconProps & {
11
+ iconColor?: IconColor;
12
+ isDisabled?: boolean;
13
+ };
14
+
15
+ const styles = cssMap({
16
+ icon: {
17
+ marginTop: token('space.050'),
18
+ },
19
+ });
20
+
21
+ export const TextColorIcon = ({
22
+ label,
23
+ shouldRecommendSmallIcon,
24
+ size,
25
+ spacing,
26
+ testId,
27
+ iconColor,
28
+ isDisabled,
29
+ }: TextColorIconProps) => {
30
+ return (
31
+ // for the moment the Icon is not truely centered - adding margin top as a workaround
32
+ <Box as="span" xcss={styles.icon}>
33
+ <Icon
34
+ label={label}
35
+ testId={testId}
36
+ color={isDisabled ? token('color.icon.disabled') : iconColor}
37
+ shouldRecommendSmallIcon={shouldRecommendSmallIcon}
38
+ spacing={spacing}
39
+ size={size}
40
+ />
41
+ </Box>
42
+ );
43
+ };
@@ -1,4 +0,0 @@
1
- ._1docjfq9{border-bottom-width:var(--ds-border-width-indicator,3px)}
2
- ._1il9nqa1{border-bottom-style:solid}
3
- ._1o3i7jlr{border-bottom-color:var(--ds-border-bold,#758195)}
4
- ._4t3i7vkz{height:1pc}
@@ -1,26 +0,0 @@
1
- /* ColorIndicatorWrapper.tsx generated by @compiled/babel-plugin v0.36.1 */
2
- "use strict";
3
-
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.ColorIndicatorWrapper = void 0;
9
- require("./ColorIndicatorWrapper.compiled.css");
10
- var _runtime = require("@compiled/react/runtime");
11
- var _react = _interopRequireDefault(require("react"));
12
- var _compiled = require("@atlaskit/primitives/compiled");
13
- var styles = {
14
- indicator: "_4t3i7vkz _1o3i7jlr _1il9nqa1 _1docjfq9"
15
- };
16
- var ColorIndicatorWrapper = exports.ColorIndicatorWrapper = function ColorIndicatorWrapper(_ref) {
17
- var color = _ref.color,
18
- children = _ref.children;
19
- return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
20
- xcss: styles.indicator,
21
- style: {
22
- borderBottomColor: color
23
- },
24
- as: "span"
25
- }, children);
26
- };
@@ -1,6 +0,0 @@
1
- ._18u01b66{margin-left:var(--ds-space-050,4px)}
2
- ._1p3lnqa1{border-left-style:solid}
3
- ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
4
- ._4t3i7vkz{height:1pc}
5
- ._5wramuej{border-left-color:var(--ds-border,#091e4224)}
6
- ._t6vde4h9{border-left-width:var(--ds-border-width,1px)}
@@ -1,20 +0,0 @@
1
- /* ToolbarDivider.tsx generated by @compiled/babel-plugin v0.36.1 */
2
- "use strict";
3
-
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.ToolbarDivider = void 0;
9
- require("./ToolbarDivider.compiled.css");
10
- var _runtime = require("@compiled/react/runtime");
11
- var _react = _interopRequireDefault(require("react"));
12
- var _compiled = require("@atlaskit/primitives/compiled");
13
- var styles = {
14
- divider: "_4t3i7vkz _5wramuej _1p3lnqa1 _t6vde4h9 _18u01b66 _2hwx1b66"
15
- };
16
- var ToolbarDivider = exports.ToolbarDivider = function ToolbarDivider() {
17
- return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
18
- xcss: styles.divider
19
- });
20
- };
@@ -1,4 +0,0 @@
1
- ._1docjfq9{border-bottom-width:var(--ds-border-width-indicator,3px)}
2
- ._1il9nqa1{border-bottom-style:solid}
3
- ._1o3i7jlr{border-bottom-color:var(--ds-border-bold,#758195)}
4
- ._4t3i7vkz{height:1pc}
@@ -1,18 +0,0 @@
1
- /* ColorIndicatorWrapper.tsx generated by @compiled/babel-plugin v0.36.1 */
2
- import "./ColorIndicatorWrapper.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
- import { Box } from '@atlaskit/primitives/compiled';
6
- const styles = {
7
- indicator: "_4t3i7vkz _1o3i7jlr _1il9nqa1 _1docjfq9"
8
- };
9
- export const ColorIndicatorWrapper = ({
10
- color,
11
- children
12
- }) => /*#__PURE__*/React.createElement(Box, {
13
- xcss: styles.indicator,
14
- style: {
15
- borderBottomColor: color
16
- },
17
- as: "span"
18
- }, children);
@@ -1,6 +0,0 @@
1
- ._18u01b66{margin-left:var(--ds-space-050,4px)}
2
- ._1p3lnqa1{border-left-style:solid}
3
- ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
4
- ._4t3i7vkz{height:1pc}
5
- ._5wramuej{border-left-color:var(--ds-border,#091e4224)}
6
- ._t6vde4h9{border-left-width:var(--ds-border-width,1px)}
@@ -1,13 +0,0 @@
1
- /* ToolbarDivider.tsx generated by @compiled/babel-plugin v0.36.1 */
2
- import "./ToolbarDivider.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
- import { Box } from '@atlaskit/primitives/compiled';
6
- const styles = {
7
- divider: "_4t3i7vkz _5wramuej _1p3lnqa1 _t6vde4h9 _18u01b66 _2hwx1b66"
8
- };
9
- export const ToolbarDivider = () => {
10
- return /*#__PURE__*/React.createElement(Box, {
11
- xcss: styles.divider
12
- });
13
- };
@@ -1,4 +0,0 @@
1
- ._1docjfq9{border-bottom-width:var(--ds-border-width-indicator,3px)}
2
- ._1il9nqa1{border-bottom-style:solid}
3
- ._1o3i7jlr{border-bottom-color:var(--ds-border-bold,#758195)}
4
- ._4t3i7vkz{height:1pc}
@@ -1,19 +0,0 @@
1
- /* ColorIndicatorWrapper.tsx generated by @compiled/babel-plugin v0.36.1 */
2
- import "./ColorIndicatorWrapper.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
- import { Box } from '@atlaskit/primitives/compiled';
6
- var styles = {
7
- indicator: "_4t3i7vkz _1o3i7jlr _1il9nqa1 _1docjfq9"
8
- };
9
- export var ColorIndicatorWrapper = function ColorIndicatorWrapper(_ref) {
10
- var color = _ref.color,
11
- children = _ref.children;
12
- return /*#__PURE__*/React.createElement(Box, {
13
- xcss: styles.indicator,
14
- style: {
15
- borderBottomColor: color
16
- },
17
- as: "span"
18
- }, children);
19
- };
@@ -1,6 +0,0 @@
1
- ._18u01b66{margin-left:var(--ds-space-050,4px)}
2
- ._1p3lnqa1{border-left-style:solid}
3
- ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
4
- ._4t3i7vkz{height:1pc}
5
- ._5wramuej{border-left-color:var(--ds-border,#091e4224)}
6
- ._t6vde4h9{border-left-width:var(--ds-border-width,1px)}
@@ -1,13 +0,0 @@
1
- /* ToolbarDivider.tsx generated by @compiled/babel-plugin v0.36.1 */
2
- import "./ToolbarDivider.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
- import { Box } from '@atlaskit/primitives/compiled';
6
- var styles = {
7
- divider: "_4t3i7vkz _5wramuej _1p3lnqa1 _t6vde4h9 _18u01b66 _2hwx1b66"
8
- };
9
- export var ToolbarDivider = function ToolbarDivider() {
10
- return /*#__PURE__*/React.createElement(Box, {
11
- xcss: styles.divider
12
- });
13
- };
@@ -1,7 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
- type ColorIndicatorWrapperProps = {
3
- children?: ReactNode;
4
- color?: string;
5
- };
6
- export declare const ColorIndicatorWrapper: ({ color, children }: ColorIndicatorWrapperProps) => React.JSX.Element;
7
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ToolbarDivider: () => React.JSX.Element;
@@ -1,7 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
- type ColorIndicatorWrapperProps = {
3
- children?: ReactNode;
4
- color?: string;
5
- };
6
- export declare const ColorIndicatorWrapper: ({ color, children }: ColorIndicatorWrapperProps) => React.JSX.Element;
7
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ToolbarDivider: () => React.JSX.Element;
@@ -1,25 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
-
3
- import { cssMap } from '@atlaskit/css';
4
- import { Box } from '@atlaskit/primitives/compiled';
5
- import { token } from '@atlaskit/tokens';
6
-
7
- type ColorIndicatorWrapperProps = {
8
- children?: ReactNode;
9
- color?: string;
10
- };
11
-
12
- const styles = cssMap({
13
- indicator: {
14
- height: '16px',
15
- borderBottomColor: token('color.border.bold'),
16
- borderBottomStyle: 'solid',
17
- borderBottomWidth: token('border.width.indicator'),
18
- },
19
- });
20
-
21
- export const ColorIndicatorWrapper = ({ color, children }: ColorIndicatorWrapperProps) => (
22
- <Box xcss={styles.indicator} style={{ borderBottomColor: color }} as="span">
23
- {children}
24
- </Box>
25
- );
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
-
3
- import { cssMap } from '@atlaskit/css';
4
- import { Box } from '@atlaskit/primitives/compiled';
5
- import { token } from '@atlaskit/tokens';
6
-
7
- const styles = cssMap({
8
- divider: {
9
- height: '16px',
10
- borderLeftColor: token('color.border'),
11
- borderLeftStyle: 'solid',
12
- borderLeftWidth: token('border.width'),
13
- marginLeft: token('space.050'),
14
- marginRight: token('space.050'),
15
- },
16
- });
17
-
18
- export const ToolbarDivider = () => {
19
- return <Box xcss={styles.divider} />;
20
- };