@atlaskit/editor-toolbar 0.0.5 → 0.0.7
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/afm-rovo-extension/tsconfig.json +54 -0
- package/afm-townsquare/tsconfig.json +54 -0
- package/dist/cjs/ui/Toolbar.compiled.css +1 -1
- package/dist/cjs/ui/Toolbar.js +1 -1
- package/dist/cjs/ui/ToolbarButton.compiled.css +1 -1
- package/dist/cjs/ui/ToolbarButton.js +3 -14
- package/dist/cjs/ui/ToolbarColorSwatch.compiled.css +9 -0
- package/dist/cjs/ui/ToolbarColorSwatch.js +25 -0
- package/dist/cjs/ui/ToolbarDropdownMenu.js +2 -4
- package/dist/cjs/ui/icons/AIChatIcon.compiled.css +5 -0
- package/dist/cjs/ui/icons/AIChatIcon.js +12 -3
- package/dist/cjs/ui/icons/TextColorIcon.compiled.css +1 -0
- package/dist/cjs/ui/icons/TextColorIcon.js +30 -7
- package/dist/es2019/ui/Toolbar.compiled.css +1 -1
- package/dist/es2019/ui/Toolbar.js +1 -1
- package/dist/es2019/ui/ToolbarButton.compiled.css +1 -1
- package/dist/es2019/ui/ToolbarButton.js +3 -14
- package/dist/es2019/ui/ToolbarColorSwatch.compiled.css +9 -0
- package/dist/es2019/ui/ToolbarColorSwatch.js +19 -0
- package/dist/es2019/ui/ToolbarDropdownMenu.js +2 -4
- package/dist/es2019/ui/icons/AIChatIcon.compiled.css +5 -0
- package/dist/es2019/ui/icons/AIChatIcon.js +12 -3
- package/dist/es2019/ui/icons/TextColorIcon.compiled.css +1 -0
- package/dist/es2019/ui/icons/TextColorIcon.js +30 -2
- package/dist/esm/ui/Toolbar.compiled.css +1 -1
- package/dist/esm/ui/Toolbar.js +1 -1
- package/dist/esm/ui/ToolbarButton.compiled.css +1 -1
- package/dist/esm/ui/ToolbarButton.js +3 -14
- package/dist/esm/ui/ToolbarColorSwatch.compiled.css +9 -0
- package/dist/esm/ui/ToolbarColorSwatch.js +18 -0
- package/dist/esm/ui/ToolbarDropdownMenu.js +2 -4
- package/dist/esm/ui/icons/AIChatIcon.compiled.css +5 -0
- package/dist/esm/ui/icons/AIChatIcon.js +12 -3
- package/dist/esm/ui/icons/TextColorIcon.compiled.css +1 -0
- package/dist/esm/ui/icons/TextColorIcon.js +29 -2
- package/dist/types/ui/ToolbarButton.d.ts +2 -3
- package/dist/types/ui/ToolbarColorSwatch.d.ts +7 -0
- package/dist/types/ui/ToolbarDropdownMenu.d.ts +3 -4
- package/dist/types/ui/icons/TextColorIcon.d.ts +9 -1
- package/dist/types-ts4.5/ui/ToolbarButton.d.ts +2 -3
- package/dist/types-ts4.5/ui/ToolbarColorSwatch.d.ts +7 -0
- package/dist/types-ts4.5/ui/ToolbarDropdownMenu.d.ts +3 -4
- package/dist/types-ts4.5/ui/icons/TextColorIcon.d.ts +9 -1
- package/examples/toolbar/examples/ExampleManuallyComposedToolbar.tsx +62 -58
- package/package.json +4 -4
- package/src/ui/Toolbar.tsx +1 -1
- package/src/ui/ToolbarButton.tsx +5 -18
- package/src/ui/ToolbarColorSwatch.tsx +40 -0
- package/src/ui/ToolbarDropdownMenu.tsx +4 -7
- package/src/ui/icons/AIChatIcon.tsx +15 -1
- package/src/ui/icons/TextColorIcon.tsx +43 -2
- package/dist/cjs/ui/ColorIndicatorWrapper.compiled.css +0 -4
- package/dist/cjs/ui/ColorIndicatorWrapper.js +0 -26
- package/dist/cjs/ui/ToolbarDivider.compiled.css +0 -6
- package/dist/cjs/ui/ToolbarDivider.js +0 -20
- package/dist/es2019/ui/ColorIndicatorWrapper.compiled.css +0 -4
- package/dist/es2019/ui/ColorIndicatorWrapper.js +0 -18
- package/dist/es2019/ui/ToolbarDivider.compiled.css +0 -6
- package/dist/es2019/ui/ToolbarDivider.js +0 -13
- package/dist/esm/ui/ColorIndicatorWrapper.compiled.css +0 -4
- package/dist/esm/ui/ColorIndicatorWrapper.js +0 -19
- package/dist/esm/ui/ToolbarDivider.compiled.css +0 -6
- package/dist/esm/ui/ToolbarDivider.js +0 -13
- package/dist/types/ui/ColorIndicatorWrapper.d.ts +0 -7
- package/dist/types/ui/ToolbarDivider.d.ts +0 -2
- package/dist/types-ts4.5/ui/ColorIndicatorWrapper.d.ts +0 -7
- package/dist/types-ts4.5/ui/ToolbarDivider.d.ts +0 -2
- package/src/ui/ColorIndicatorWrapper.tsx +0 -25
- package/src/ui/ToolbarDivider.tsx +0 -20
|
@@ -1,2 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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,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,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,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,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
|
-
};
|