@atlaskit/editor-common 78.30.0 → 78.30.1
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 +7 -0
- package/dist/cjs/analytics/fire-analytics-event.js +5 -16
- package/dist/cjs/card/LinkToolbarButtonGroup.js +12 -6
- package/dist/cjs/element-browser/ViewMore.js +13 -5
- package/dist/cjs/element-browser/components/ElementBrowserLoader.js +9 -6
- package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +6 -4
- package/dist/cjs/element-browser/hooks/use-container-width.js +5 -4
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +38 -11
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/Caption/index.js +13 -6
- package/dist/cjs/ui/DropList/index.js +23 -6
- package/dist/cjs/ui/Expand/index.js +81 -9
- package/dist/cjs/ui/FloatingToolbar/Separator.js +8 -4
- package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
- package/dist/cjs/ui/MediaSingle/link.js +11 -4
- package/dist/cjs/ui/Messages/index.js +18 -6
- package/dist/cjs/ui/PanelTextInput/styles.js +30 -5
- package/dist/cjs/ui/UnsupportedBlock/index.js +19 -4
- package/dist/cjs/ui/WidthProvider/index.js +7 -4
- package/dist/cjs/ui-color/ColorPalette/styles.js +5 -4
- package/dist/cjs/ui-menu/DropdownMenu/index.js +15 -5
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +8 -6
- package/dist/cjs/ui-menu/ToolbarButton/index.js +8 -7
- package/dist/es2019/analytics/fire-analytics-event.js +5 -16
- package/dist/es2019/card/LinkToolbarButtonGroup.js +12 -12
- package/dist/es2019/element-browser/ViewMore.js +12 -12
- package/dist/es2019/element-browser/components/ElementBrowserLoader.js +7 -7
- package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +5 -5
- package/dist/es2019/element-browser/hooks/use-container-width.js +3 -3
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -37
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/Caption/index.js +12 -12
- package/dist/es2019/ui/DropList/index.js +23 -21
- package/dist/es2019/ui/Expand/index.js +71 -78
- package/dist/es2019/ui/FloatingToolbar/Separator.js +7 -7
- package/dist/es2019/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
- package/dist/es2019/ui/MediaSingle/link.js +11 -11
- package/dist/es2019/ui/Messages/index.js +17 -17
- package/dist/es2019/ui/PanelTextInput/styles.js +26 -30
- package/dist/es2019/ui/UnsupportedBlock/index.js +17 -17
- package/dist/es2019/ui/WidthProvider/index.js +5 -4
- package/dist/es2019/ui-color/ColorPalette/styles.js +4 -4
- package/dist/es2019/ui-menu/DropdownMenu/index.js +10 -8
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -5
- package/dist/es2019/ui-menu/ToolbarButton/index.js +4 -4
- package/dist/esm/analytics/fire-analytics-event.js +5 -16
- package/dist/esm/card/LinkToolbarButtonGroup.js +12 -6
- package/dist/esm/element-browser/ViewMore.js +12 -4
- package/dist/esm/element-browser/components/ElementBrowserLoader.js +7 -3
- package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +5 -3
- package/dist/esm/element-browser/hooks/use-container-width.js +3 -3
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -9
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/Caption/index.js +12 -4
- package/dist/esm/ui/DropList/index.js +23 -6
- package/dist/esm/ui/Expand/index.js +81 -9
- package/dist/esm/ui/FloatingToolbar/Separator.js +7 -3
- package/dist/esm/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
- package/dist/esm/ui/MediaSingle/link.js +11 -3
- package/dist/esm/ui/Messages/index.js +17 -6
- package/dist/esm/ui/PanelTextInput/styles.js +30 -4
- package/dist/esm/ui/UnsupportedBlock/index.js +17 -3
- package/dist/esm/ui/WidthProvider/index.js +5 -3
- package/dist/esm/ui-color/ColorPalette/styles.js +5 -3
- package/dist/esm/ui-menu/DropdownMenu/index.js +15 -5
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -3
- package/dist/esm/ui-menu/ToolbarButton/index.js +4 -3
- package/dist/types/types/feature-flags.d.ts +2 -0
- package/dist/types/ui/Caption/index.d.ts +1 -1
- package/dist/types/ui/UnsupportedBlock/index.d.ts +3 -3
- package/dist/types-ts4.5/types/feature-flags.d.ts +2 -0
- package/dist/types-ts4.5/ui/Caption/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/UnsupportedBlock/index.d.ts +3 -3
- package/package.json +2 -2
|
@@ -7,34 +7,36 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "78.30.
|
|
10
|
+
const packageVersion = "78.30.1";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
14
14
|
constructor(...args) {
|
|
15
15
|
super(...args);
|
|
16
|
-
_defineProperty(this, "wrapperStyles", css
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
_defineProperty(this, "wrapperStyles", css({
|
|
17
|
+
display: this.props.shouldFitContainer ? 'block' : 'inline-flex',
|
|
18
|
+
flex: this.props.shouldFitContainer ? '1 1 auto' : undefined,
|
|
19
|
+
transitionDuration: '0.2s',
|
|
20
|
+
transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)'
|
|
21
|
+
}));
|
|
22
|
+
_defineProperty(this, "triggerStyles", css({
|
|
23
|
+
transitionDuration: '0.2s',
|
|
24
|
+
transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
|
|
25
|
+
display: this.props.shouldFitContainer ? 'block' : 'inline-flex',
|
|
26
|
+
boxSizing: this.props.shouldFitContainer ? 'border-box' : undefined
|
|
27
|
+
}));
|
|
26
28
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
27
29
|
_defineProperty(this, "menuWrapper", () => {
|
|
28
|
-
return css
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
return css({
|
|
31
|
+
color: `var(--ds-text, ${N900})`,
|
|
32
|
+
backgroundColor: `var(--ds-surface-overlay, ${N0})`,
|
|
33
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
34
|
+
boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px calc(-1 * 2px) ${N50A}, 0 0 1px ${N60A}`})`,
|
|
35
|
+
boxSizing: 'border-box',
|
|
36
|
+
overflow: 'auto',
|
|
37
|
+
padding: `${"var(--ds-space-050, 4px)"} 0`,
|
|
38
|
+
maxHeight: '90vh'
|
|
39
|
+
});
|
|
38
40
|
});
|
|
39
41
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
40
42
|
_defineProperty(this, "componentDidMount", () => {
|
|
@@ -44,31 +44,29 @@ export const ExpandIconWrapper = ({
|
|
|
44
44
|
css: () => expanded ? [expandIconWrapperStyle(), expandIconWrapperExpandedStyle] : expandIconWrapperStyle()
|
|
45
45
|
}, children);
|
|
46
46
|
};
|
|
47
|
-
const expandIconWrapperStyle = () => css
|
|
48
|
-
cursor: pointer
|
|
49
|
-
display: flex
|
|
50
|
-
color:
|
|
51
|
-
|
|
52
|
-
width: 24px
|
|
53
|
-
height: 24px
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
svg {
|
|
60
|
-
transition: transform 0.2s ${akEditorSwoopCubicBezier};
|
|
47
|
+
const expandIconWrapperStyle = () => css({
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
display: 'flex',
|
|
50
|
+
color: `var(--ds-icon, ${N90})`,
|
|
51
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
52
|
+
width: '24px',
|
|
53
|
+
height: '24px',
|
|
54
|
+
'&:hover': {
|
|
55
|
+
background: `var(--ds-background-neutral-subtle-hovered, ${N30A})`
|
|
56
|
+
},
|
|
57
|
+
svg: {
|
|
58
|
+
transition: `transform 0.2s ${akEditorSwoopCubicBezier}`
|
|
61
59
|
}
|
|
62
|
-
|
|
63
|
-
const expandIconWrapperExpandedStyle = css
|
|
64
|
-
svg {
|
|
65
|
-
transform: rotate(90deg)
|
|
60
|
+
});
|
|
61
|
+
const expandIconWrapperExpandedStyle = css({
|
|
62
|
+
svg: {
|
|
63
|
+
transform: 'rotate(90deg)'
|
|
66
64
|
}
|
|
67
|
-
|
|
68
|
-
export const expandLayoutWrapperStyle = css
|
|
69
|
-
width:
|
|
70
|
-
height:
|
|
71
|
-
|
|
65
|
+
});
|
|
66
|
+
export const expandLayoutWrapperStyle = css({
|
|
67
|
+
width: "var(--ds-space-300, 24px)",
|
|
68
|
+
height: "var(--ds-space-300, 24px)"
|
|
69
|
+
});
|
|
72
70
|
export const ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef((props, ref) => {
|
|
73
71
|
const {
|
|
74
72
|
children,
|
|
@@ -91,34 +89,31 @@ const containerStyles = styleProps => {
|
|
|
91
89
|
// and is the root level expand.
|
|
92
90
|
const marginHorizontal = styleProps['data-node-type'] === 'expand' ? `-${akLayoutGutterOffset}px` : 0;
|
|
93
91
|
const margin = `${marginTop} ${marginHorizontal} ${marginBottom}`;
|
|
94
|
-
return () => css
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
background:
|
|
101
|
-
margin:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
padding: ${"var(--ds-space-100, 8px)"};
|
|
106
|
-
|
|
107
|
-
&:hover {
|
|
92
|
+
return () => css({
|
|
93
|
+
borderWidth: '1px',
|
|
94
|
+
borderStyle: 'solid',
|
|
95
|
+
borderColor: focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR : EXPAND_COLLAPSED_BORDER_COLOR,
|
|
96
|
+
borderRadius: BORDER_RADIUS,
|
|
97
|
+
minHeight: '25px',
|
|
98
|
+
background: !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND,
|
|
99
|
+
margin: margin,
|
|
100
|
+
transition: `background 0.3s ${akEditorSwoopCubicBezier}, border-color 0.3s ${akEditorSwoopCubicBezier}`,
|
|
101
|
+
padding: "var(--ds-space-100, 8px)",
|
|
102
|
+
'&:hover': {
|
|
108
103
|
// TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.
|
|
109
104
|
// This is because the default state already uses the same token and, as such, the hover style won't change anything.
|
|
110
105
|
// https://product-fabric.atlassian.net/browse/DSP-4152
|
|
111
|
-
border: 1px solid ${`var(--ds-border, ${N50A})`}
|
|
112
|
-
background:
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
td > style:first-child + * {
|
|
117
|
-
margin-top: 0;
|
|
106
|
+
border: `1px solid ${`var(--ds-border, ${N50A})`}`,
|
|
107
|
+
background: EXPAND_SELECTED_BACKGROUND
|
|
108
|
+
},
|
|
109
|
+
'td > :not(style):first-child, td > style:first-child + *': {
|
|
110
|
+
marginTop: 0
|
|
118
111
|
}
|
|
119
|
-
|
|
112
|
+
});
|
|
120
113
|
};
|
|
121
|
-
const contentStyles = styleProps => () =>
|
|
114
|
+
const contentStyles = styleProps => () =>
|
|
115
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
116
|
+
css`
|
|
122
117
|
padding-top: ${styleProps.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)"};
|
|
123
118
|
padding-right: ${"var(--ds-space-100, 8px)"};
|
|
124
119
|
padding-left: ${"var(--ds-space-300, 24px)"};
|
|
@@ -146,40 +141,38 @@ const contentStyles = styleProps => () => css`
|
|
|
146
141
|
}
|
|
147
142
|
` : ''}
|
|
148
143
|
`;
|
|
149
|
-
const titleInputStyles = () => css
|
|
150
|
-
outline: none
|
|
151
|
-
border: none
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
color:
|
|
156
|
-
background: transparent
|
|
157
|
-
display: flex
|
|
158
|
-
flex: 1
|
|
159
|
-
padding: 0 0 0 ${"var(--ds-space-050, 4px)"}
|
|
160
|
-
width: 100
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
144
|
+
const titleInputStyles = () => css({
|
|
145
|
+
outline: 'none',
|
|
146
|
+
border: 'none',
|
|
147
|
+
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
148
|
+
lineHeight: akEditorLineHeight,
|
|
149
|
+
fontWeight: 'normal',
|
|
150
|
+
color: `var(--ds-text-subtlest, ${N200A})`,
|
|
151
|
+
background: 'transparent',
|
|
152
|
+
display: 'flex',
|
|
153
|
+
flex: 1,
|
|
154
|
+
padding: `0 0 0 ${"var(--ds-space-050, 4px)"}`,
|
|
155
|
+
width: '100%',
|
|
156
|
+
'&::placeholder': {
|
|
157
|
+
opacity: 1,
|
|
158
|
+
color: `var(--ds-text-subtlest, ${N200})`
|
|
165
159
|
}
|
|
166
|
-
|
|
167
|
-
const titleContainerStyles = () => css
|
|
168
|
-
padding: 0
|
|
169
|
-
display: flex
|
|
170
|
-
|
|
171
|
-
background: none
|
|
172
|
-
border: none
|
|
173
|
-
|
|
174
|
-
width: 100
|
|
175
|
-
color:
|
|
176
|
-
overflow: hidden
|
|
177
|
-
cursor: pointer
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
outline: 0;
|
|
160
|
+
});
|
|
161
|
+
const titleContainerStyles = () => css({
|
|
162
|
+
padding: 0,
|
|
163
|
+
display: 'flex',
|
|
164
|
+
alignItems: 'flex-start',
|
|
165
|
+
background: 'none',
|
|
166
|
+
border: 'none',
|
|
167
|
+
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
168
|
+
width: '100%',
|
|
169
|
+
color: `var(--ds-text-subtle, ${N300A})`,
|
|
170
|
+
overflow: 'hidden',
|
|
171
|
+
cursor: 'pointer',
|
|
172
|
+
'&:focus': {
|
|
173
|
+
outline: 0
|
|
181
174
|
}
|
|
182
|
-
|
|
175
|
+
});
|
|
183
176
|
export const sharedExpandStyles = {
|
|
184
177
|
titleInputStyles,
|
|
185
178
|
titleContainerStyles,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { N30 } from '@atlaskit/theme/colors';
|
|
4
|
-
const separator = css
|
|
5
|
-
background:
|
|
6
|
-
width: 1px
|
|
7
|
-
height: 20px
|
|
8
|
-
margin: 0 ${"var(--ds-space-050, 4px)"}
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const separator = css({
|
|
5
|
+
background: `var(--ds-border, ${N30})`,
|
|
6
|
+
width: '1px',
|
|
7
|
+
height: '20px',
|
|
8
|
+
margin: `0 ${"var(--ds-space-050, 4px)"}`,
|
|
9
|
+
alignSelf: 'center'
|
|
10
|
+
});
|
|
11
11
|
export default (() => jsx("div", {
|
|
12
12
|
css: separator,
|
|
13
13
|
className: "separator"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import EditIcon from '@atlaskit/icon/glyph/edit';
|
|
4
|
-
const editIconStyles = css
|
|
5
|
-
width: 20px
|
|
6
|
-
|
|
4
|
+
const editIconStyles = css({
|
|
5
|
+
width: '20px'
|
|
6
|
+
});
|
|
7
7
|
|
|
8
8
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
9
9
|
export const SmallerEditIcon = () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
export const mediaLinkStyle = css
|
|
3
|
-
position: absolute
|
|
4
|
-
background: transparent
|
|
5
|
-
top: 0
|
|
6
|
-
right: 0
|
|
7
|
-
bottom: 0
|
|
8
|
-
left: 0
|
|
9
|
-
cursor: pointer
|
|
10
|
-
width: 100
|
|
11
|
-
height: 100
|
|
12
|
-
|
|
2
|
+
export const mediaLinkStyle = css({
|
|
3
|
+
position: 'absolute',
|
|
4
|
+
background: 'transparent',
|
|
5
|
+
top: 0,
|
|
6
|
+
right: 0,
|
|
7
|
+
bottom: 0,
|
|
8
|
+
left: 0,
|
|
9
|
+
cursor: 'pointer',
|
|
10
|
+
width: '100%',
|
|
11
|
+
height: '100%'
|
|
12
|
+
});
|
|
@@ -5,23 +5,23 @@ import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
|
5
5
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
6
6
|
import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
|
-
const errorColor = css
|
|
9
|
-
color:
|
|
10
|
-
|
|
11
|
-
const validColor = css
|
|
12
|
-
color:
|
|
13
|
-
|
|
14
|
-
const messageStyle = () => css
|
|
15
|
-
|
|
16
|
-
color:
|
|
17
|
-
|
|
18
|
-
display: flex
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const iconWrapperStyle = css
|
|
22
|
-
display: flex
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
const errorColor = css({
|
|
9
|
+
color: `var(--ds-text-danger, ${R400})`
|
|
10
|
+
});
|
|
11
|
+
const validColor = css({
|
|
12
|
+
color: `var(--ds-text-success, ${G400})`
|
|
13
|
+
});
|
|
14
|
+
const messageStyle = () => css(h200(), {
|
|
15
|
+
fontWeight: 'normal',
|
|
16
|
+
color: `var(--ds-text-subtlest, ${N200})`,
|
|
17
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
18
|
+
display: 'flex',
|
|
19
|
+
justifyContent: 'baseline'
|
|
20
|
+
});
|
|
21
|
+
const iconWrapperStyle = css({
|
|
22
|
+
display: 'flex',
|
|
23
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
24
|
+
});
|
|
25
25
|
export const HelperMessage = ({
|
|
26
26
|
children
|
|
27
27
|
}) => jsx("div", {
|
|
@@ -2,37 +2,33 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { B100, N100, N30, N400 } from '@atlaskit/theme/colors';
|
|
4
4
|
// Normal .className gets overridden by input[type=text] hence this hack to produce input.className
|
|
5
|
-
export const panelTextInput = css
|
|
6
|
-
input& {
|
|
7
|
-
background: transparent
|
|
8
|
-
border: 2px solid ${`var(--ds-border, ${N30})`}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
color:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
padding:
|
|
16
|
-
|
|
17
|
-
min-width: 145px;
|
|
18
|
-
|
|
5
|
+
export const panelTextInput = css({
|
|
6
|
+
'input&': {
|
|
7
|
+
background: 'transparent',
|
|
8
|
+
border: `2px solid ${`var(--ds-border, ${N30})`}`,
|
|
9
|
+
borderRadius: 0,
|
|
10
|
+
boxSizing: 'content-box',
|
|
11
|
+
color: `var(--ds-text-subtle, ${N400})`,
|
|
12
|
+
flexGrow: 1,
|
|
13
|
+
fontSize: relativeFontSizeToBase16(13),
|
|
14
|
+
lineHeight: '20px',
|
|
15
|
+
padding: `${"var(--ds-space-075, 6px)"} ${"var(--ds-space-400, 32px)"} ${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
16
|
+
minWidth: '145px',
|
|
19
17
|
/* Hides IE10+ built-in [x] clear input button */
|
|
20
|
-
&::-ms-clear {
|
|
21
|
-
display: none
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
&::placeholder {
|
|
30
|
-
color: ${`var(--ds-text-subtlest, ${N100})`};
|
|
18
|
+
'&::-ms-clear': {
|
|
19
|
+
display: 'none'
|
|
20
|
+
},
|
|
21
|
+
'&:focus': {
|
|
22
|
+
outline: 'none',
|
|
23
|
+
borderColor: `var(--ds-border-focused, ${B100})`
|
|
24
|
+
},
|
|
25
|
+
'&::placeholder': {
|
|
26
|
+
color: `var(--ds-text-subtlest, ${N100})`
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
|
-
|
|
34
|
-
export const panelTextInputWithCustomWidth = width => css
|
|
35
|
-
input& {
|
|
36
|
-
width:
|
|
29
|
+
});
|
|
30
|
+
export const panelTextInputWithCustomWidth = width => css({
|
|
31
|
+
'input&': {
|
|
32
|
+
width: `${width}px`
|
|
37
33
|
}
|
|
38
|
-
|
|
34
|
+
});
|
|
@@ -11,23 +11,23 @@ import { ACTION_SUBJECT_ID } from '../../analytics';
|
|
|
11
11
|
import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
12
12
|
import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
|
|
13
13
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
14
|
-
const blockNodeStyle = css
|
|
15
|
-
background:
|
|
16
|
-
border: 1px dashed ${`var(--ds-border-disabled, ${N50})`}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
cursor: default
|
|
20
|
-
display: flex
|
|
21
|
-
|
|
22
|
-
margin:
|
|
23
|
-
|
|
24
|
-
padding:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
const blockNodeStyle = css({
|
|
15
|
+
background: `var(--ds-background-disabled, ${N30})`,
|
|
16
|
+
border: `1px dashed ${`var(--ds-border-disabled, ${N50})`}`,
|
|
17
|
+
borderRadius: `${borderRadius()}px`,
|
|
18
|
+
boxSizing: 'border-box',
|
|
19
|
+
cursor: 'default',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
22
|
+
margin: `${"var(--ds-space-100, 8px)"} 0`,
|
|
23
|
+
minHeight: '24px',
|
|
24
|
+
padding: "var(--ds-space-150, 12px)",
|
|
25
|
+
textAlign: 'center',
|
|
26
|
+
verticalAlign: 'text-bottom',
|
|
27
|
+
minWidth: '120px',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center'
|
|
30
|
+
});
|
|
31
31
|
const UnsupportedBlockNode = ({
|
|
32
32
|
node,
|
|
33
33
|
intl,
|
|
@@ -3,6 +3,10 @@ import React, { Fragment } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import rafSchedule from 'raf-schd';
|
|
5
5
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
6
|
+
const styles = css({
|
|
7
|
+
position: 'relative',
|
|
8
|
+
width: '100%'
|
|
9
|
+
});
|
|
6
10
|
const SCROLLBAR_WIDTH = 30;
|
|
7
11
|
export function getBreakpoint(width = 0) {
|
|
8
12
|
const MAX_S = 1266;
|
|
@@ -42,10 +46,7 @@ export const WidthProvider = ({
|
|
|
42
46
|
});
|
|
43
47
|
const skipWidthDetection = shouldCheckExistingValue && existingContextValue.width > 0;
|
|
44
48
|
return jsx("div", {
|
|
45
|
-
css:
|
|
46
|
-
position: relative;
|
|
47
|
-
width: 100%;
|
|
48
|
-
`,
|
|
49
|
+
css: styles,
|
|
49
50
|
className: className
|
|
50
51
|
}, !skipWidthDetection && jsx(Fragment, null, jsx(WidthObserver, {
|
|
51
52
|
setWidth: updateWidth,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
export const colorPaletteWrapper = css
|
|
3
|
-
padding: 0 ${"var(--ds-space-100, 8px)"}
|
|
2
|
+
export const colorPaletteWrapper = css({
|
|
3
|
+
padding: `0 ${"var(--ds-space-100, 8px)"}`,
|
|
4
4
|
/* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
|
|
5
|
-
display: flex
|
|
6
|
-
|
|
5
|
+
display: 'flex'
|
|
6
|
+
});
|
|
@@ -16,21 +16,22 @@ import DropList from '../../ui/DropList';
|
|
|
16
16
|
import Popup from '../../ui/Popup';
|
|
17
17
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
18
18
|
import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
19
|
-
const wrapper = css
|
|
19
|
+
const wrapper = css({
|
|
20
20
|
/* tooltip in ToolbarButton is display:block */
|
|
21
|
-
& > div > div {
|
|
22
|
-
display: flex
|
|
21
|
+
'& > div > div': {
|
|
22
|
+
display: 'flex'
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
const focusedMenuItemStyle = css
|
|
26
|
-
|
|
27
|
-
outline: none
|
|
28
|
-
|
|
24
|
+
});
|
|
25
|
+
const focusedMenuItemStyle = css({
|
|
26
|
+
boxShadow: `inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`}`,
|
|
27
|
+
outline: 'none'
|
|
28
|
+
});
|
|
29
29
|
const buttonStyles = (isActive, submenuActive) => {
|
|
30
30
|
if (isActive) {
|
|
31
31
|
/**
|
|
32
32
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
33
33
|
*/
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
34
35
|
return css`
|
|
35
36
|
> span,
|
|
36
37
|
> span:hover,
|
|
@@ -47,6 +48,7 @@ const buttonStyles = (isActive, submenuActive) => {
|
|
|
47
48
|
}
|
|
48
49
|
`;
|
|
49
50
|
} else {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
50
52
|
return css`
|
|
51
53
|
> span:hover[aria-disabled='false'] {
|
|
52
54
|
color: ${`var(--ds-text, ${N900})`};
|
|
@@ -15,11 +15,11 @@ export const KeyDownHandlerContext = /*#__PURE__*/React.createContext({
|
|
|
15
15
|
handleArrowRight: () => {},
|
|
16
16
|
handleTab: () => {}
|
|
17
17
|
});
|
|
18
|
-
const centeredToolbarContainer = css
|
|
19
|
-
display: flex
|
|
20
|
-
width: 100
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const centeredToolbarContainer = css({
|
|
19
|
+
display: 'flex',
|
|
20
|
+
width: '100%',
|
|
21
|
+
alignItems: 'center'
|
|
22
|
+
});
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* This component is a wrapper of main toolbar which listens to keydown events of children
|
|
@@ -9,10 +9,10 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
9
9
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
|
|
10
10
|
import Button from './styles';
|
|
11
11
|
export const TOOLBAR_BUTTON = TOOLBAR_ACTION_SUBJECT_ID;
|
|
12
|
-
const buttonWrapper = css
|
|
13
|
-
display: flex
|
|
14
|
-
height: 100
|
|
15
|
-
|
|
12
|
+
const buttonWrapper = css({
|
|
13
|
+
display: 'flex',
|
|
14
|
+
height: '100%'
|
|
15
|
+
});
|
|
16
16
|
const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
17
17
|
const {
|
|
18
18
|
buttonId,
|
|
@@ -9,21 +9,10 @@ export var fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent
|
|
|
9
9
|
if (!createAnalyticsEvent) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (queueAnalytics) {
|
|
19
|
-
var queue = AnalyticsQueue.get();
|
|
20
|
-
queue.schedule(function () {
|
|
21
|
-
var _createAnalyticsEvent;
|
|
22
|
-
return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
var _createAnalyticsEvent2;
|
|
26
|
-
(_createAnalyticsEvent2 = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent2 === void 0 || _createAnalyticsEvent2.fire(channel);
|
|
27
|
-
}
|
|
12
|
+
var queue = AnalyticsQueue.get();
|
|
13
|
+
queue.schedule(function () {
|
|
14
|
+
var _createAnalyticsEvent;
|
|
15
|
+
return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
|
|
16
|
+
});
|
|
28
17
|
};
|
|
29
18
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
2
|
var _excluded = ["disabled"];
|
|
4
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import React from 'react';
|
|
7
5
|
import { css, jsx } from '@emotion/react';
|
|
@@ -11,8 +9,12 @@ import { FloatingToolbarButton as Button } from '../ui';
|
|
|
11
9
|
/**
|
|
12
10
|
* Applying `pointer-events: none;` when disabled allows the Tooltip to be displayed
|
|
13
11
|
*/
|
|
14
|
-
var buttonStyle = css(
|
|
15
|
-
|
|
12
|
+
var buttonStyle = css({
|
|
13
|
+
pointerEvents: 'auto'
|
|
14
|
+
});
|
|
15
|
+
var buttonStyleNoneEvent = css({
|
|
16
|
+
pointerEvents: 'none'
|
|
17
|
+
});
|
|
16
18
|
var DisallowedWrapper = function DisallowedWrapper(_ref) {
|
|
17
19
|
var disabled = _ref.disabled,
|
|
18
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -23,8 +25,12 @@ var DisallowedWrapper = function DisallowedWrapper(_ref) {
|
|
|
23
25
|
* The button requires `pointer-events: none;` in order to fix the tooltip, hence
|
|
24
26
|
* leaving us without a disabled cursor, the following fixes this:
|
|
25
27
|
*/
|
|
26
|
-
var defaultWrapperStyle = css(
|
|
27
|
-
|
|
28
|
+
var defaultWrapperStyle = css({
|
|
29
|
+
cursor: 'pointer'
|
|
30
|
+
});
|
|
31
|
+
var disallowedWrapperStyle = css({
|
|
32
|
+
cursor: 'not-allowed'
|
|
33
|
+
});
|
|
28
34
|
export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
|
|
29
35
|
var options = _ref2.options;
|
|
30
36
|
return jsx(ButtonGroup, null, options.map(function (_ref3) {
|