@atlaskit/jql-editor 4.3.0 → 4.3.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 +565 -561
- package/LICENSE.md +6 -8
- package/dist/cjs/accessibility/styled.js +3 -0
- package/dist/cjs/analytics/listener/analytics-web-client-wrapper.js +5 -5
- package/dist/cjs/analytics/util.js +1 -1
- package/dist/cjs/common/styled.js +7 -1
- package/dist/cjs/plugins/autocomplete/components/autocomplete-dropdown/styled.js +17 -2
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/styled.js +21 -2
- package/dist/cjs/plugins/rich-inline-nodes/nodes/user/styled.js +16 -2
- package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/styled.js +5 -0
- package/dist/cjs/ui/jql-editor-controls-content/base-search/index.js +3 -1
- package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/styled.js +6 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-editor-help/styled.js +15 -3
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/format/styled.js +6 -0
- package/dist/cjs/ui/jql-editor-layout/styled.js +44 -17
- package/dist/cjs/ui/tooltip-tag/styled.js +3 -0
- package/dist/es2019/accessibility/styled.js +3 -0
- package/dist/es2019/analytics/listener/analytics-web-client-wrapper.js +5 -5
- package/dist/es2019/analytics/util.js +1 -1
- package/dist/es2019/common/styled.js +5 -1
- package/dist/es2019/plugins/autocomplete/components/autocomplete-dropdown/styled.js +15 -2
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/styled.js +20 -2
- package/dist/es2019/plugins/rich-inline-nodes/nodes/user/styled.js +14 -2
- package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/styled.js +4 -0
- package/dist/es2019/ui/jql-editor-controls-content/base-search/index.js +3 -1
- package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-editor-help/styled.js +12 -2
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/format/styled.js +5 -0
- package/dist/es2019/ui/jql-editor-layout/styled.js +157 -129
- package/dist/es2019/ui/tooltip-tag/styled.js +3 -0
- package/dist/esm/accessibility/styled.js +3 -0
- package/dist/esm/analytics/listener/analytics-web-client-wrapper.js +5 -5
- package/dist/esm/analytics/util.js +1 -1
- package/dist/esm/common/styled.js +5 -1
- package/dist/esm/plugins/autocomplete/components/autocomplete-dropdown/styled.js +15 -2
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/styled.js +20 -2
- package/dist/esm/plugins/rich-inline-nodes/nodes/user/styled.js +14 -2
- package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/styled.js +4 -0
- package/dist/esm/ui/jql-editor-controls-content/base-search/index.js +3 -1
- package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-editor-help/styled.js +13 -3
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/format/styled.js +5 -0
- package/dist/esm/ui/jql-editor-layout/styled.js +44 -16
- package/dist/esm/ui/tooltip-tag/styled.js +3 -0
- package/dist/types/analytics/index.d.ts +2 -2
- package/dist/types/analytics/listener/analytics-web-client-wrapper.d.ts +3 -3
- package/dist/types/analytics/listener/handle-event.d.ts +3 -3
- package/dist/types/analytics/listener/jql-editor-analytics-listener.d.ts +3 -3
- package/dist/types/analytics/listener/process-event-payload.d.ts +2 -2
- package/dist/types/analytics/listener/types.d.ts +1 -1
- package/dist/types/analytics/types.d.ts +2 -2
- package/dist/types/analytics/util.d.ts +1 -1
- package/dist/types/async.d.ts +1 -1
- package/dist/types/commands/select-error-command/index.d.ts +1 -1
- package/dist/types/plugins/autocomplete/components/autocomplete/index.d.ts +1 -1
- package/dist/types/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +2 -2
- package/dist/types/plugins/autocomplete/components/autocomplete-option/index.d.ts +1 -1
- package/dist/types/plugins/autocomplete/components/types.d.ts +3 -3
- package/dist/types/plugins/autocomplete/constants.d.ts +1 -1
- package/dist/types/plugins/autocomplete/index.d.ts +1 -1
- package/dist/types/plugins/autocomplete/view.d.ts +6 -6
- package/dist/types/plugins/common/get-document-position/index.d.ts +1 -1
- package/dist/types/plugins/common/react-plugin-view.d.ts +3 -3
- package/dist/types/plugins/jql-ast/JQLEditorErrorStrategy.d.ts +4 -4
- package/dist/types/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.d.ts +1 -1
- package/dist/types/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.d.ts +4 -4
- package/dist/types/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.d.ts +2 -2
- package/dist/types/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.d.ts +2 -2
- package/dist/types/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.d.ts +2 -2
- package/dist/types/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.d.ts +5 -5
- package/dist/types/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.d.ts +2 -2
- package/dist/types/plugins/jql-ast/index.d.ts +4 -4
- package/dist/types/plugins/jql-ast/utils.d.ts +2 -2
- package/dist/types/plugins/jql-syntax-highlighting/index.d.ts +1 -1
- package/dist/types/plugins/jql-syntax-highlighting/visitor.d.ts +3 -3
- package/dist/types/plugins/rich-inline-nodes/index.d.ts +1 -1
- package/dist/types/plugins/rich-inline-nodes/nodes/types.d.ts +3 -3
- package/dist/types/plugins/rich-inline-nodes/nodes/user/index.d.ts +1 -1
- package/dist/types/plugins/rich-inline-nodes/types.d.ts +1 -1
- package/dist/types/plugins/rich-inline-nodes/util/create-node-spec.d.ts +1 -1
- package/dist/types/plugins/rich-inline-nodes/util/react-node-view.d.ts +4 -4
- package/dist/types/plugins/rich-inline-nodes/util/replace-nodes-transaction.d.ts +2 -2
- package/dist/types/plugins/validation-tooltip/view.d.ts +2 -2
- package/dist/types/schema/index.d.ts +6 -6
- package/dist/types/state/analytics/index.d.ts +2 -2
- package/dist/types/state/autocomplete/index.d.ts +2 -2
- package/dist/types/state/hydration/index.d.ts +2 -2
- package/dist/types/state/hydration/util.d.ts +1 -1
- package/dist/types/state/index.d.ts +13 -13
- package/dist/types/state/types.d.ts +10 -10
- package/dist/types/state/util.d.ts +7 -7
- package/dist/types/types.d.ts +1 -1
- package/dist/types/ui/error-boundary/index.d.ts +2 -2
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/ui/intl-provider/index.d.ts +1 -1
- package/dist/types/ui/jql-editor/index.d.ts +2 -2
- package/dist/types/ui/jql-editor/types.d.ts +4 -4
- package/dist/types/ui/jql-editor-controls-content/base-expand-toggle/index.d.ts +1 -1
- package/dist/types/ui/jql-editor-controls-content/base-search/index.d.ts +1 -1
- package/dist/types/ui/jql-editor-controls-content/base-syntax-help/index.d.ts +2 -2
- package/dist/types/ui/jql-editor-footer-content/jql-messages/format/index.d.ts +3 -3
- package/dist/types/ui/jql-editor-footer-content/jql-messages/infos/index.d.ts +1 -1
- package/dist/types/ui/jql-editor-footer-content/jql-messages/warnings/index.d.ts +1 -1
- package/dist/types/ui/jql-editor-layout/index.d.ts +1 -1
- package/dist/types/ui/jql-editor-portal-provider/context.d.ts +1 -1
- package/dist/types/ui/jql-editor-portal-provider/index.d.ts +2 -2
- package/dist/types/ui/jql-editor-portal-provider/types.d.ts +2 -2
- package/dist/types/ui/jql-editor-view/index.d.ts +1 -1
- package/dist/types/ui/types.d.ts +1 -1
- package/dist/types/utils/document-text/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/index.d.ts +2 -2
- package/dist/types-ts4.5/analytics/listener/analytics-web-client-wrapper.d.ts +3 -3
- package/dist/types-ts4.5/analytics/listener/handle-event.d.ts +3 -3
- package/dist/types-ts4.5/analytics/listener/jql-editor-analytics-listener.d.ts +3 -3
- package/dist/types-ts4.5/analytics/listener/process-event-payload.d.ts +2 -2
- package/dist/types-ts4.5/analytics/listener/types.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types.d.ts +2 -2
- package/dist/types-ts4.5/analytics/util.d.ts +1 -1
- package/dist/types-ts4.5/async.d.ts +1 -1
- package/dist/types-ts4.5/commands/select-error-command/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/autocomplete/components/types.d.ts +3 -3
- package/dist/types-ts4.5/plugins/autocomplete/constants.d.ts +1 -1
- package/dist/types-ts4.5/plugins/autocomplete/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/autocomplete/view.d.ts +6 -6
- package/dist/types-ts4.5/plugins/common/get-document-position/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/common/react-plugin-view.d.ts +3 -3
- package/dist/types-ts4.5/plugins/jql-ast/JQLEditorErrorStrategy.d.ts +4 -4
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.d.ts +1 -1
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.d.ts +4 -4
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.d.ts +2 -2
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.d.ts +2 -2
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.d.ts +2 -2
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.d.ts +5 -5
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.d.ts +2 -2
- package/dist/types-ts4.5/plugins/jql-ast/index.d.ts +4 -4
- package/dist/types-ts4.5/plugins/jql-ast/utils.d.ts +2 -2
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/visitor.d.ts +3 -3
- package/dist/types-ts4.5/plugins/rich-inline-nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/types.d.ts +3 -3
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/create-node-spec.d.ts +1 -1
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/react-node-view.d.ts +4 -4
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/replace-nodes-transaction.d.ts +2 -2
- package/dist/types-ts4.5/plugins/validation-tooltip/view.d.ts +2 -2
- package/dist/types-ts4.5/schema/index.d.ts +6 -6
- package/dist/types-ts4.5/state/analytics/index.d.ts +2 -2
- package/dist/types-ts4.5/state/autocomplete/index.d.ts +2 -2
- package/dist/types-ts4.5/state/hydration/index.d.ts +2 -2
- package/dist/types-ts4.5/state/hydration/util.d.ts +1 -1
- package/dist/types-ts4.5/state/index.d.ts +13 -13
- package/dist/types-ts4.5/state/types.d.ts +10 -10
- package/dist/types-ts4.5/state/util.d.ts +7 -7
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/error-boundary/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/intl-provider/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jql-editor/types.d.ts +4 -4
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-expand-toggle/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-search/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-syntax-help/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/format/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/infos/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/warnings/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor-layout/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/context.d.ts +1 -1
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/types.d.ts +2 -2
- package/dist/types-ts4.5/ui/jql-editor-view/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/types.d.ts +1 -1
- package/dist/types-ts4.5/utils/document-text/index.d.ts +1 -1
- package/package.json +124 -126
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
4
|
import styled from '@emotion/styled';
|
|
3
5
|
import { N200, N40, N50A, N60A } from '@atlaskit/theme/colors';
|
|
4
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
8
|
export const AutocompleteContainer = styled.div({
|
|
6
9
|
position: 'absolute',
|
|
7
10
|
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
@@ -17,22 +20,30 @@ export const AutocompleteContainer = styled.div({
|
|
|
17
20
|
},
|
|
18
21
|
marginLeft: "var(--ds-space-negative-100, -8px)",
|
|
19
22
|
marginTop: "var(--ds-space-200, 16px)"
|
|
20
|
-
},
|
|
23
|
+
},
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
25
|
+
({
|
|
21
26
|
isOpen
|
|
22
27
|
}) => isOpen ? css({
|
|
23
28
|
visibility: 'visible'
|
|
24
29
|
}) : css({
|
|
25
30
|
visibility: 'hidden'
|
|
26
31
|
}));
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
27
34
|
export const AutocompleteOptionsContainer = styled.div({
|
|
28
35
|
maxHeight: '288px',
|
|
29
36
|
overflow: 'auto'
|
|
30
37
|
});
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
31
40
|
export const OptionList = styled.ul({
|
|
32
41
|
listStyle: 'none',
|
|
33
42
|
margin: `${"var(--ds-space-0, 0)"}`,
|
|
34
43
|
padding: `${"var(--ds-space-0, 0)"}`
|
|
35
44
|
});
|
|
45
|
+
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
47
|
export const AutocompleteLoadingFooter = styled.div({
|
|
37
48
|
display: 'flex',
|
|
38
49
|
justifyContent: 'center',
|
|
@@ -40,7 +51,9 @@ export const AutocompleteLoadingFooter = styled.div({
|
|
|
40
51
|
fontStyle: 'italic',
|
|
41
52
|
padding: "var(--ds-space-150, 12px)",
|
|
42
53
|
textAlign: 'center'
|
|
43
|
-
},
|
|
54
|
+
},
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
56
|
+
({
|
|
44
57
|
hasOptions
|
|
45
58
|
}) => hasOptions && {
|
|
46
59
|
borderTop: `solid 1px ${`var(--ds-border, ${N40})`}`,
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
3
|
import { N100, N20, N50, N800 } from '@atlaskit/theme/colors';
|
|
3
4
|
import { codeFontFamily, fontFamily } from '@atlaskit/theme/constants';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
6
|
export const TooltipContent = styled.div({
|
|
5
7
|
fontFamily: fontFamily()
|
|
6
8
|
});
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
11
|
export const OptionListItem = styled.li({
|
|
8
12
|
cursor: 'pointer',
|
|
9
13
|
padding: `${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"}`,
|
|
10
14
|
fontFamily: codeFontFamily(),
|
|
11
15
|
lineHeight: '24px'
|
|
12
|
-
},
|
|
16
|
+
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
18
|
+
({
|
|
13
19
|
isSelected
|
|
14
20
|
}) => isSelected && {
|
|
15
21
|
background: `var(--ds-background-neutral-subtle-hovered, ${N20})`
|
|
16
|
-
},
|
|
22
|
+
},
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
24
|
+
({
|
|
17
25
|
isDeprecated
|
|
18
26
|
}) => isDeprecated && {
|
|
19
27
|
cursor: 'default',
|
|
20
28
|
color: `var(--ds-text-disabled, ${N50})`
|
|
21
29
|
});
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
22
32
|
export const OptionName = styled.div({
|
|
23
33
|
color: `var(--ds-text, ${N800})`,
|
|
24
34
|
overflow: 'hidden',
|
|
@@ -27,21 +37,29 @@ export const OptionName = styled.div({
|
|
|
27
37
|
// Added so that overflowed option names do not squish the deprecated info icon
|
|
28
38
|
flex: 1
|
|
29
39
|
});
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
30
42
|
export const DeprecatedOptionContainer = styled.div({
|
|
31
43
|
color: `var(--ds-text-disabled, ${N50})`,
|
|
32
44
|
display: 'flex',
|
|
33
45
|
justifyContent: 'space-between',
|
|
34
46
|
opacity: 0.6
|
|
35
47
|
});
|
|
48
|
+
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
50
|
export const OptionHighlight = styled.span({
|
|
37
51
|
fontWeight: 'bold'
|
|
38
52
|
});
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
39
55
|
export const FieldType = styled.div({
|
|
40
56
|
display: 'flex',
|
|
41
57
|
alignItems: 'center',
|
|
42
58
|
marginTop: "var(--ds-space-negative-025, -2px)",
|
|
43
59
|
color: `var(--ds-text-subtlest, ${N100})`
|
|
44
60
|
});
|
|
61
|
+
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
45
63
|
export const FieldTypeIcon = styled.span({
|
|
46
64
|
display: 'flex',
|
|
47
65
|
marginRight: "var(--ds-space-050, 4px)"
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
4
|
import styled from '@emotion/styled';
|
|
3
5
|
import { N0, N40, N50, N500, R400 } from '@atlaskit/theme/colors';
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
7
|
export const UserContainer = styled.span({
|
|
5
8
|
display: 'inline-flex',
|
|
6
9
|
alignItems: 'baseline',
|
|
@@ -8,12 +11,15 @@ export const UserContainer = styled.span({
|
|
|
8
11
|
borderRadius: '10px',
|
|
9
12
|
cursor: 'pointer',
|
|
10
13
|
userSelect: 'none'
|
|
11
|
-
},
|
|
14
|
+
},
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
16
|
+
({
|
|
12
17
|
selected,
|
|
13
18
|
error
|
|
14
19
|
}) => {
|
|
15
20
|
if (selected) {
|
|
16
21
|
if (error) {
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
17
23
|
return css({
|
|
18
24
|
color: `var(--ds-text-inverse, ${N0})`,
|
|
19
25
|
backgroundColor: `var(--ds-background-danger-bold, ${R400})`,
|
|
@@ -23,6 +29,7 @@ export const UserContainer = styled.span({
|
|
|
23
29
|
textDecorationColor: `var(--ds-text-inverse, ${N0})`
|
|
24
30
|
});
|
|
25
31
|
} else {
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
26
33
|
return css({
|
|
27
34
|
color: `var(--ds-text, ${N0})`,
|
|
28
35
|
backgroundColor: `var(--ds-background-selected, ${N500})`,
|
|
@@ -31,6 +38,7 @@ export const UserContainer = styled.span({
|
|
|
31
38
|
}
|
|
32
39
|
} else {
|
|
33
40
|
if (error) {
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
34
42
|
return css({
|
|
35
43
|
color: `var(--ds-text-subtle, ${N500})`,
|
|
36
44
|
backgroundColor: `var(--ds-background-neutral, ${N40})`,
|
|
@@ -43,6 +51,7 @@ export const UserContainer = styled.span({
|
|
|
43
51
|
}
|
|
44
52
|
});
|
|
45
53
|
} else {
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
46
55
|
return css({
|
|
47
56
|
color: `var(--ds-text-subtle, ${N500})`,
|
|
48
57
|
backgroundColor: `var(--ds-background-neutral, ${N40})`,
|
|
@@ -53,6 +62,8 @@ export const UserContainer = styled.span({
|
|
|
53
62
|
}
|
|
54
63
|
}
|
|
55
64
|
});
|
|
65
|
+
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
56
67
|
export const NameContainer = styled.span({
|
|
57
68
|
marginLeft: "var(--ds-space-075, 6px)",
|
|
58
69
|
marginRight: "var(--ds-space-100, 8px)",
|
|
@@ -60,11 +71,12 @@ export const NameContainer = styled.span({
|
|
|
60
71
|
});
|
|
61
72
|
|
|
62
73
|
/* Override Avatar styles to match design spec */
|
|
63
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
74
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
75
|
export const AvatarWrapper = styled.div({
|
|
65
76
|
height: "var(--ds-space-200, 16px)",
|
|
66
77
|
width: "var(--ds-space-200, 16px)",
|
|
67
78
|
alignSelf: 'center',
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
68
80
|
'> div span': {
|
|
69
81
|
margin: "var(--ds-space-0, 0px)"
|
|
70
82
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
3
|
import { N40, N50 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
3
5
|
export const ExpandToggleContainer = styled.div({
|
|
4
6
|
/* Override background styles for our button to match designs */
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
5
8
|
'> button': {
|
|
6
9
|
borderRadius: '100%',
|
|
7
10
|
/* Fill the remaining vertical space for a single line in our editor and space between buttons */
|
|
@@ -9,6 +12,7 @@ export const ExpandToggleContainer = styled.div({
|
|
|
9
12
|
'&:hover': {
|
|
10
13
|
background: `var(--ds-background-neutral-subtle-hovered, ${N40})`
|
|
11
14
|
},
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
12
16
|
"&:active, &[data-firefox-is-active='true']": {
|
|
13
17
|
background: `var(--ds-background-neutral-subtle-pressed, ${N50})`
|
|
14
18
|
}
|
|
@@ -20,7 +20,9 @@ export const BaseSearch = ({
|
|
|
20
20
|
return /*#__PURE__*/React.createElement(LoadingButton, {
|
|
21
21
|
"aria-label": label,
|
|
22
22
|
isDisabled: isDisabled,
|
|
23
|
-
testId: "jql-editor-search"
|
|
23
|
+
testId: "jql-editor-search"
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
25
|
+
,
|
|
24
26
|
style: style,
|
|
25
27
|
appearance: 'primary',
|
|
26
28
|
spacing: 'none',
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
3
|
import { N50, N500, N600, N70 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
3
5
|
export const SyntaxHelpContainer = styled.div({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
4
7
|
'> a': {
|
|
5
8
|
background: `var(--ds-background-neutral-bold, ${N70})`,
|
|
6
9
|
borderRadius: '100%',
|
|
@@ -11,9 +14,11 @@ export const SyntaxHelpContainer = styled.div({
|
|
|
11
14
|
'&:focus': {
|
|
12
15
|
background: `var(--ds-background-neutral-bold, ${N70})`
|
|
13
16
|
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
18
|
"&:active, &[data-firefox-is-active='true']": {
|
|
15
19
|
background: `var(--ds-background-neutral-bold-pressed, ${N600})`
|
|
16
20
|
},
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
22
|
'&[disabled]': {
|
|
18
23
|
background: `var(--ds-background-disabled, ${N50})`
|
|
19
24
|
}
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
4
|
import styled from '@emotion/styled';
|
|
3
5
|
import { hiddenMixin } from '../../../common/styled';
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
7
|
export const HelpContainer = styled.div({
|
|
5
8
|
display: 'flex',
|
|
6
9
|
marginLeft: 'auto',
|
|
7
10
|
marginRight: 0,
|
|
8
11
|
flexShrink: 0,
|
|
9
12
|
padding: `0 ${"var(--ds-space-100, 8px)"}`,
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
10
14
|
'> * + *': {
|
|
11
15
|
marginLeft: "var(--ds-space-200, 16px)"
|
|
12
16
|
}
|
|
13
|
-
},
|
|
17
|
+
},
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
19
|
+
props => props.isVisible ?
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
21
|
+
css({
|
|
14
22
|
visibility: 'visible',
|
|
15
23
|
opacity: 1,
|
|
16
24
|
transition: 'opacity 250ms cubic-bezier(0.15, 1, 0.3, 1)'
|
|
17
|
-
}) :
|
|
25
|
+
}) :
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
27
|
+
css(hiddenMixin, {
|
|
18
28
|
opacity: 0
|
|
19
29
|
}));
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
2
4
|
export const MessageContainer = styled.div(props => ({
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
3
6
|
paddingLeft: props.isSearch ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)"
|
|
4
7
|
}));
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
10
|
export const MessageList = styled.ul({
|
|
6
11
|
margin: 0,
|
|
7
12
|
paddingLeft: "var(--ds-space-300, 24px)"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css, keyframes } from '@emotion/react';
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
4
|
import styled from '@emotion/styled';
|
|
3
5
|
import { B200, B300, G300, N0, N10, N100, N30, N700, N800, N900, P400, R400 } from '@atlaskit/theme/colors';
|
|
4
6
|
import { codeFontFamily, fontFamily, fontSize,
|
|
@@ -23,44 +25,46 @@ const fadeOut = keyframes({
|
|
|
23
25
|
}
|
|
24
26
|
});
|
|
25
27
|
|
|
26
|
-
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression --
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-keyframes -- Ignored via go/DSP-18766
|
|
27
29
|
export const EditorMain = styled.div`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
30
|
+
/* CSS reset */
|
|
31
|
+
font-family: ${fontFamily()};
|
|
32
|
+
font-size: ${fontSize()}px;
|
|
33
|
+
flex-grow: 1;
|
|
34
|
+
|
|
35
|
+
/* These styles and animations are derived from @atlaskit/tooltip */
|
|
36
|
+
|
|
37
|
+
.${TOOLTIP_CLASSNAME} {
|
|
38
|
+
background-color: ${`var(--ds-background-neutral-bold, ${N800})`};
|
|
39
|
+
color: ${`var(--ds-text-inverse, ${N0})`};
|
|
40
|
+
border-radius: ${"var(--ds-border-radius-100, 3px)"};
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
line-height: 1.3;
|
|
44
|
+
max-width: 240px;
|
|
45
|
+
padding: ${"var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"};
|
|
46
|
+
word-wrap: break-word;
|
|
47
|
+
overflow-wrap: break-word;
|
|
48
|
+
z-index: ${layers.tooltip()};
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
position: absolute;
|
|
51
|
+
visibility: hidden;
|
|
52
|
+
|
|
53
|
+
/* Horizontally center and vertically position above the target element */
|
|
54
|
+
transform: translate(-50%, calc(-100% - ${"var(--ds-space-200, 16px)"}));
|
|
55
|
+
|
|
56
|
+
&.${TOOLTIP_ENTER_CLASSNAME} {
|
|
57
|
+
animation: ${fadeIn} 350ms cubic-bezier(0.15, 1, 0.3, 1);
|
|
58
|
+
visibility: visible;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.${TOOLTIP_EXIT_CLASSNAME} {
|
|
62
|
+
animation: ${fadeOut} 350ms cubic-bezier(0.15, 1, 0.3, 1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
63
65
|
`;
|
|
66
|
+
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
68
|
export const EditorFooter = styled.div({
|
|
65
69
|
display: 'flex',
|
|
66
70
|
justifyContent: 'space-between',
|
|
@@ -72,6 +76,7 @@ const rowHeight = gridSize() * 2.75;
|
|
|
72
76
|
// Vertical padding for the editor input
|
|
73
77
|
const getEditorInputVerticalPadding = isCompact => isCompact ? 3 : 7;
|
|
74
78
|
const editorInputHorizontalPadding = 6;
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
75
80
|
export const EditorViewContainer = styled.div({
|
|
76
81
|
backgroundColor: `var(--ds-background-input, ${N10})`,
|
|
77
82
|
borderStyle: 'solid',
|
|
@@ -84,143 +89,166 @@ export const EditorViewContainer = styled.div({
|
|
|
84
89
|
display: 'flex',
|
|
85
90
|
overflow: 'auto',
|
|
86
91
|
transition: 'background-color 0.2s ease-in-out, border-color 0.2s ease-in-out'
|
|
87
|
-
},
|
|
92
|
+
},
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
94
|
+
props => props.editorViewIsInvalid &&
|
|
95
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
96
|
+
css({
|
|
88
97
|
borderColor: `var(--ds-border-danger, ${R400})`,
|
|
89
98
|
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${`var(--ds-border-danger, ${R400})`}`
|
|
90
|
-
}),
|
|
99
|
+
}),
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
101
|
+
props => props.editorViewHasFocus ?
|
|
102
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
103
|
+
css({
|
|
91
104
|
backgroundColor: `var(--ds-surface, ${N0})`,
|
|
92
105
|
borderColor: `var(--ds-border-focused, ${B200})`,
|
|
93
106
|
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${`var(--ds-border-focused, ${B200})`}`
|
|
94
|
-
}) :
|
|
95
|
-
|
|
107
|
+
}) :
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
109
|
+
css({
|
|
110
|
+
'&:hover': {
|
|
96
111
|
backgroundColor: `var(--ds-background-input-hovered, ${N30})`
|
|
97
112
|
}
|
|
98
113
|
}));
|
|
114
|
+
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
99
116
|
export const ReadOnlyEditorViewContainer = styled(EditorViewContainer)({
|
|
100
117
|
backgroundColor: `var(--ds-background-disabled, ${N30})`,
|
|
101
118
|
color: `var(--ds-text-disabled, ${N100})`,
|
|
102
119
|
pointerEvents: 'none'
|
|
103
120
|
});
|
|
121
|
+
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
104
123
|
export const LineNumberToolbar = styled.div({
|
|
105
124
|
backgroundColor: `var(--ds-background-neutral, ${N30})`,
|
|
106
125
|
flexShrink: 0,
|
|
107
126
|
width: '30px',
|
|
108
127
|
position: 'sticky',
|
|
109
128
|
top: 0
|
|
110
|
-
},
|
|
129
|
+
},
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
131
|
+
props => !props.lineNumbersVisible &&
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
133
|
+
css({
|
|
111
134
|
display: 'none'
|
|
112
135
|
}));
|
|
113
136
|
|
|
114
137
|
/**
|
|
115
138
|
* The main div which the Prosemirror editor will be rendered into.
|
|
116
139
|
*/
|
|
117
|
-
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression --
|
|
140
|
+
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
118
141
|
export const EditorView = styled.div`
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
142
|
+
counter-reset: lineNumber;
|
|
143
|
+
flex-grow: 1;
|
|
144
|
+
|
|
145
|
+
transition:
|
|
146
|
+
height 250ms cubic-bezier(0.15, 1, 0.3, 1),
|
|
147
|
+
max-height 250ms cubic-bezier(0.15, 1, 0.3, 1);
|
|
148
|
+
max-height: ${props => rowHeight * props.defaultMaxRows + getEditorInputVerticalPadding(props.isCompact) * 2}px;
|
|
149
|
+
|
|
150
|
+
line-height: ${rowHeight / fontSize()};
|
|
151
|
+
font-family: ${codeFontFamily()};
|
|
152
|
+
word-break: break-word;
|
|
153
|
+
overflow-wrap: anywhere;
|
|
154
|
+
white-space: pre-wrap;
|
|
155
|
+
|
|
156
|
+
&[data-expanded] {
|
|
157
|
+
height: ${props => rowHeight * props.expandedRows + getEditorInputVerticalPadding(props.isCompact) * 2}px;
|
|
158
|
+
max-height: ${props => rowHeight * props.expandedRows + getEditorInputVerticalPadding(props.isCompact) * 2}px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.ProseMirror {
|
|
162
|
+
color: ${`var(--ds-text, ${N700})`};
|
|
163
|
+
padding: ${props => getEditorInputVerticalPadding(props.isCompact)}px
|
|
164
|
+
${editorInputHorizontalPadding}px;
|
|
165
|
+
|
|
166
|
+
&:focus {
|
|
167
|
+
outline: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.mark-token-keyword {
|
|
171
|
+
color: ${`var(--ds-text-accent-purple, ${P400})`};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.mark-token-field {
|
|
175
|
+
color: ${`var(--ds-text-accent-blue, ${B300})`};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.mark-token-operator {
|
|
179
|
+
color: ${`var(--ds-text-accent-green, ${G300})`};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.mark-token-error {
|
|
183
|
+
color: ${`var(--ds-text-danger, ${R400})`};
|
|
184
|
+
text-decoration: wavy underline;
|
|
185
|
+
text-decoration-thickness: 1px;
|
|
186
|
+
text-decoration-skip-ink: none;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
p {
|
|
191
|
+
margin: 0;
|
|
192
|
+
counter-increment: lineNumber;
|
|
193
|
+
position: relative;
|
|
194
|
+
|
|
195
|
+
/* Show the current line number before each paragraph block. */
|
|
196
|
+
|
|
197
|
+
&::before {
|
|
198
|
+
content: counter(lineNumber);
|
|
199
|
+
color: ${`var(--ds-text-subtlest, ${N100})`};
|
|
200
|
+
font-size: 10px;
|
|
201
|
+
line-height: ${rowHeight / 10};
|
|
202
|
+
padding: 0 ${"var(--ds-space-100, 8px)"} 0 ${"var(--ds-space-025, 2px)"};
|
|
203
|
+
position: absolute;
|
|
204
|
+
box-sizing: border-box;
|
|
205
|
+
/* Shift the line number tag 100% (plus 8px padding) to the left to position it inside the LineNumberToolbar */
|
|
206
|
+
transform: translateX(calc(-100% - ${"var(--ds-space-100, 8px)"}));
|
|
207
|
+
|
|
208
|
+
/* We can fit 3 digits before ellipses. This is not very responsive but saves us having to add expensive width
|
|
186
209
|
recalculation logic to the LineNumberToolbar for a scenario that *should* never happen. */
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
210
|
+
max-width: 30px;
|
|
211
|
+
text-overflow: ellipsis;
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
white-space: nowrap;
|
|
191
214
|
|
|
192
|
-
|
|
215
|
+
${props => !props.lineNumbersVisible &&
|
|
193
216
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
194
217
|
css`
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
218
|
+
display: none;
|
|
219
|
+
`}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
199
222
|
`;
|
|
200
223
|
|
|
201
224
|
// FIXME: convert-props-syntax rule doesn't catch this
|
|
202
|
-
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression
|
|
225
|
+
// eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
203
226
|
export const ReadOnlyEditorView = styled(EditorView)`
|
|
204
|
-
|
|
227
|
+
/* We need to replicate padding from the inner prosemirror element in our read only state. That means we also need
|
|
205
228
|
recompute max height excluding the child padding. */
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
229
|
+
padding: ${props => getEditorInputVerticalPadding(props.isCompact)}px
|
|
230
|
+
${editorInputHorizontalPadding}px;
|
|
231
|
+
max-height: ${props => rowHeight * props.defaultMaxRows}px;
|
|
232
|
+
|
|
233
|
+
> p {
|
|
234
|
+
/* Prevent collapsing empty paragraphs */
|
|
235
|
+
min-height: ${rowHeight}px;
|
|
236
|
+
}
|
|
214
237
|
`;
|
|
238
|
+
|
|
239
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
215
240
|
export const EditorControls = styled.div(props => ({
|
|
216
241
|
alignItems: 'center',
|
|
217
242
|
display: 'flex',
|
|
218
243
|
flexShrink: 0,
|
|
219
244
|
marginLeft: 'auto',
|
|
220
|
-
marginRight: `${
|
|
245
|
+
marginRight: `${
|
|
246
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
247
|
+
props.isSearch ? getEditorInputVerticalPadding(props.isCompact) - 1 // the search button needs the same vertical & horizontal spacing
|
|
221
248
|
: editorInputHorizontalPadding - 3}px`,
|
|
222
249
|
lineHeight: 'normal',
|
|
223
250
|
position: 'sticky',
|
|
224
251
|
top: 0,
|
|
252
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
225
253
|
height: `${rowHeight + 2 * getEditorInputVerticalPadding(props.isCompact)}px`
|
|
226
254
|
}));
|