@eccenca/gui-elements 23.7.0-rc.1 → 23.7.0-rc.2
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 +20 -0
- package/dist/cjs/cmem/markdown/Markdown.js +1 -1
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +3 -3
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Breadcrumb/BreadcrumbList.js +1 -1
- package/dist/cjs/components/Breadcrumb/BreadcrumbList.js.map +1 -1
- package/dist/cjs/components/Card/Card.js +3 -1
- package/dist/cjs/components/Card/Card.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +3 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/TextField/TextArea.js +85 -8
- package/dist/cjs/components/TextField/TextArea.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js +1 -1
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js +3 -3
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/esm/components/Breadcrumb/BreadcrumbList.js +1 -1
- package/dist/esm/components/Breadcrumb/BreadcrumbList.js.map +1 -1
- package/dist/esm/components/Card/Card.js +4 -2
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +3 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/TextField/TextArea.js +86 -9
- package/dist/esm/components/TextField/TextArea.js.map +1 -1
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +1 -1
- package/dist/types/components/Breadcrumb/BreadcrumbList.d.ts +2 -1
- package/dist/types/components/Card/Card.d.ts +8 -2
- package/dist/types/components/TextField/TextArea.d.ts +28 -3
- package/package.json +1 -1
- package/src/cmem/markdown/Markdown.tsx +1 -1
- package/src/components/Application/application.scss +0 -1
- package/src/components/AutocompleteField/AutoCompleteField.tsx +4 -4
- package/src/components/Breadcrumb/BreadcrumbList.tsx +3 -3
- package/src/components/Card/Card.tsx +15 -3
- package/src/components/Card/card.scss +6 -1
- package/src/components/Icon/stories/Icon.stories.tsx +1 -1
- package/src/components/MultiSelect/MultiSelect.tsx +5 -0
- package/src/components/TextField/TextArea.tsx +174 -12
- package/src/components/TextField/stories/TextArea.stories.tsx +39 -12
- package/src/components/TextField/textfield.scss +78 -11
- package/src/includes/blueprintjs/_requisits.scss +1 -1
- package/src/includes/blueprintjs/_variables.scss +3 -172
- package/src/includes/carbon-components/_requisits.scss +1 -0
|
@@ -1,35 +1,63 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import {
|
|
3
|
+
Classes as BlueprintClassNames,
|
|
3
4
|
Intent as BlueprintIntent,
|
|
5
|
+
MaybeElement,
|
|
4
6
|
TextArea as BlueprintTextArea,
|
|
5
7
|
TextAreaProps as BlueprintTextAreaProps,
|
|
6
8
|
} from "@blueprintjs/core";
|
|
7
9
|
|
|
10
|
+
import { Definitions as IntentDefinitions, IntentTypes } from "../../common/Intent";
|
|
8
11
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
12
|
+
import { Icon } from "../Icon";
|
|
13
|
+
import { ValidIconName } from "../Icon/canonicalIconNames";
|
|
9
14
|
|
|
10
15
|
import { InvisibleCharacterWarningProps, useTextValidation } from "./useTextValidation";
|
|
11
16
|
|
|
12
|
-
export interface TextAreaProps extends
|
|
17
|
+
export interface TextAreaProps extends Omit<BlueprintTextAreaProps, "intent"> {
|
|
13
18
|
/**
|
|
14
19
|
* when set to true the input takes a blue border color
|
|
20
|
+
* @deprecated Use the `intent` property.
|
|
15
21
|
*/
|
|
16
22
|
hasStatePrimary?: boolean;
|
|
17
23
|
/**
|
|
18
24
|
* when set to true the input takes a green border color
|
|
25
|
+
* @deprecated Use the `intent` property.
|
|
19
26
|
*/
|
|
20
27
|
hasStateSuccess?: boolean;
|
|
21
28
|
/**
|
|
22
29
|
* when set to true the input takes an orange border color
|
|
30
|
+
* @deprecated Use the `intent` property.
|
|
23
31
|
*/
|
|
24
32
|
hasStateWarning?: boolean;
|
|
25
33
|
/**
|
|
26
34
|
* when set to true the input takes a red border color
|
|
35
|
+
* @deprecated Use the `intent` property.
|
|
27
36
|
*/
|
|
28
37
|
hasStateDanger?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Intent state of the text area.
|
|
40
|
+
*/
|
|
41
|
+
intent?: IntentTypes | "edited" | "removed";
|
|
29
42
|
/**
|
|
30
43
|
* If set, allows to be informed of invisible, hard to spot characters in the string value.
|
|
31
44
|
*/
|
|
32
45
|
invisibleCharacterWarning?: InvisibleCharacterWarningProps;
|
|
46
|
+
/**
|
|
47
|
+
* Left aligned icon, can be a canonical icon name or an `Icon` element.
|
|
48
|
+
* This will update left padding on the text area.
|
|
49
|
+
*/
|
|
50
|
+
leftIcon?: ValidIconName | MaybeElement;
|
|
51
|
+
/**
|
|
52
|
+
* Element to render on right side of text area. Should be not too large.
|
|
53
|
+
* This will update right padding on the text area.
|
|
54
|
+
*/
|
|
55
|
+
rightElement?: JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Add HTML properties to the wrapper element.
|
|
58
|
+
* The element wraps `TextArea` in case of a given `wrapperDivProps`, `leftIcon` or `rightElement` property.
|
|
59
|
+
*/
|
|
60
|
+
wrapperDivProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "children">;
|
|
33
61
|
}
|
|
34
62
|
|
|
35
63
|
export const TextArea = ({
|
|
@@ -40,38 +68,172 @@ export const TextArea = ({
|
|
|
40
68
|
hasStateDanger = false,
|
|
41
69
|
rows = 5,
|
|
42
70
|
invisibleCharacterWarning,
|
|
71
|
+
leftIcon,
|
|
72
|
+
rightElement,
|
|
73
|
+
wrapperDivProps,
|
|
43
74
|
...otherProps
|
|
44
75
|
}: TextAreaProps) => {
|
|
45
|
-
|
|
76
|
+
const textAreaCallback = React.useCallback(
|
|
77
|
+
(textAreaElement: HTMLTextAreaElement) => {
|
|
78
|
+
if (textAreaElement && typeof textAreaElement === "object") {
|
|
79
|
+
let textAreaStyle: CSSStyleDeclaration;
|
|
80
|
+
if (!textAreaElement.dataset.processed) {
|
|
81
|
+
textAreaStyle = getComputedStyle(textAreaElement);
|
|
82
|
+
textAreaElement.dataset.processed = "yes";
|
|
83
|
+
textAreaElement.dataset.paddingtop = textAreaStyle.paddingTop ?? "0px";
|
|
84
|
+
textAreaElement.dataset.paddingleft = textAreaStyle.paddingLeft ?? "0px";
|
|
85
|
+
textAreaElement.dataset.paddingright = textAreaStyle.paddingRight ?? "0px";
|
|
86
|
+
} else {
|
|
87
|
+
textAreaStyle = {
|
|
88
|
+
paddingTop: textAreaElement.dataset.paddingtop ?? "0px",
|
|
89
|
+
paddingLeft: textAreaElement.dataset.paddingleft ?? "0px",
|
|
90
|
+
paddingRight: textAreaElement.dataset.paddingright ?? "0px",
|
|
91
|
+
} as CSSStyleDeclaration;
|
|
92
|
+
}
|
|
93
|
+
const textAreaElementRect = textAreaElement.getBoundingClientRect();
|
|
94
|
+
const wrapperElement = textAreaElement.parentElement;
|
|
95
|
+
|
|
96
|
+
if (leftIcon && wrapperElement) {
|
|
97
|
+
const leftIconElement = wrapperElement.querySelector(`.${eccgui}-textarea__icon`) as HTMLElement;
|
|
98
|
+
const leftIconElementRect = leftIconElement.getBoundingClientRect();
|
|
99
|
+
if (
|
|
100
|
+
parseInt(textAreaStyle.paddingTop, 10) * 2 + (leftIconElementRect.height ?? 0) <=
|
|
101
|
+
(textAreaElementRect.height ?? 0)
|
|
102
|
+
) {
|
|
103
|
+
leftIconElement.style.setProperty("top", textAreaStyle.paddingTop);
|
|
104
|
+
} else {
|
|
105
|
+
leftIconElement.style.setProperty(
|
|
106
|
+
"top",
|
|
107
|
+
`${((textAreaElementRect.height ?? 0) - (leftIconElementRect.height ?? 0)) * 0.5}px`
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
leftIconElement.style.setProperty("left", textAreaStyle.paddingLeft);
|
|
111
|
+
textAreaElement.style.setProperty(
|
|
112
|
+
"padding-left",
|
|
113
|
+
`calc(${leftIconElementRect.width ? 2 : 1} * ${textAreaStyle.paddingLeft} + ${
|
|
114
|
+
leftIconElementRect.width ?? 0
|
|
115
|
+
}px)`
|
|
116
|
+
);
|
|
117
|
+
leftIconElement.addEventListener("click", (_event: MouseEvent) => {
|
|
118
|
+
textAreaElement.focus();
|
|
119
|
+
}); //onclick((_event: MouseEvent) => {textAreaElement.dispatchEvent("click")})
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (rightElement && wrapperElement) {
|
|
123
|
+
const rightElementElement = wrapperElement.querySelector(
|
|
124
|
+
`.${eccgui}-textarea__options`
|
|
125
|
+
) as HTMLElement;
|
|
126
|
+
const rightElementElementRect = rightElementElement.getBoundingClientRect();
|
|
127
|
+
if (
|
|
128
|
+
parseInt(textAreaStyle.paddingTop, 10) * 2 + (rightElementElementRect.height ?? 0) <=
|
|
129
|
+
(textAreaElementRect.height ?? 0)
|
|
130
|
+
) {
|
|
131
|
+
rightElementElement.style.setProperty("top", textAreaStyle.paddingTop);
|
|
132
|
+
} else {
|
|
133
|
+
rightElementElement.style.setProperty(
|
|
134
|
+
"top",
|
|
135
|
+
`${((textAreaElementRect.height ?? 0) - (rightElementElementRect.height ?? 0)) * 0.5}px`
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
rightElementElement.style.setProperty("right", textAreaStyle.paddingRight);
|
|
139
|
+
textAreaElement.style.setProperty(
|
|
140
|
+
"padding-right",
|
|
141
|
+
`calc(${rightElementElementRect.width ? 2 : 1} * ${textAreaStyle.paddingRight} + ${
|
|
142
|
+
rightElementElementRect.width ?? 0
|
|
143
|
+
}px)`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
[leftIcon, rightElement]
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
let deprecatedIntent;
|
|
46
152
|
switch (true) {
|
|
47
153
|
case hasStatePrimary:
|
|
48
|
-
|
|
154
|
+
deprecatedIntent = IntentDefinitions.PRIMARY;
|
|
49
155
|
break;
|
|
50
156
|
case hasStateSuccess:
|
|
51
|
-
|
|
157
|
+
deprecatedIntent = IntentDefinitions.SUCCESS;
|
|
52
158
|
break;
|
|
53
159
|
case hasStateWarning:
|
|
54
|
-
|
|
160
|
+
deprecatedIntent = IntentDefinitions.WARNING;
|
|
55
161
|
break;
|
|
56
162
|
case hasStateDanger:
|
|
57
|
-
|
|
163
|
+
deprecatedIntent = IntentDefinitions.DANGER;
|
|
58
164
|
break;
|
|
59
165
|
default:
|
|
60
166
|
break;
|
|
61
167
|
}
|
|
62
168
|
|
|
63
|
-
const
|
|
169
|
+
const { intent = deprecatedIntent, ...otherBlueprintTextAreaProps } = otherProps;
|
|
64
170
|
|
|
65
|
-
|
|
171
|
+
let iconIntent;
|
|
172
|
+
switch (intent) {
|
|
173
|
+
case "edited":
|
|
174
|
+
iconIntent = IntentDefinitions.INFO;
|
|
175
|
+
break;
|
|
176
|
+
case "removed":
|
|
177
|
+
iconIntent = IntentDefinitions.DANGER;
|
|
178
|
+
break;
|
|
179
|
+
default:
|
|
180
|
+
iconIntent = intent as IntentTypes;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const maybeWrappedOnChange = useTextValidation({ ...otherBlueprintTextAreaProps, invisibleCharacterWarning });
|
|
185
|
+
|
|
186
|
+
const textarea = (
|
|
66
187
|
<BlueprintTextArea
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
188
|
+
inputRef={textAreaCallback}
|
|
189
|
+
className={
|
|
190
|
+
`${eccgui}-textarea` +
|
|
191
|
+
(intent ? ` ${eccgui}-intent--${intent}` : "") +
|
|
192
|
+
(className ? ` ${className}` : "")
|
|
193
|
+
}
|
|
194
|
+
intent={
|
|
195
|
+
intent && !["info", "edited", "removed", "neutral"].includes(intent)
|
|
196
|
+
? (intent as BlueprintIntent)
|
|
197
|
+
: undefined
|
|
198
|
+
}
|
|
199
|
+
spellCheck={intent === "removed" ? false : undefined}
|
|
200
|
+
rows={
|
|
201
|
+
rows && !otherBlueprintTextAreaProps.autoResize && !otherBlueprintTextAreaProps.growVertically
|
|
202
|
+
? rows
|
|
203
|
+
: 1
|
|
204
|
+
}
|
|
205
|
+
{...otherBlueprintTextAreaProps}
|
|
71
206
|
dir={"auto"}
|
|
72
207
|
onChange={maybeWrappedOnChange}
|
|
73
208
|
/>
|
|
74
209
|
);
|
|
210
|
+
|
|
211
|
+
const { className: wrapperClassName, ...otherWrapperDivProps } = wrapperDivProps ?? {};
|
|
212
|
+
|
|
213
|
+
return wrapperDivProps || leftIcon || rightElement ? (
|
|
214
|
+
<div
|
|
215
|
+
className={`${eccgui}-textarea__wrapper` + (wrapperClassName ? ` ${wrapperClassName}` : "")}
|
|
216
|
+
{...otherWrapperDivProps}
|
|
217
|
+
>
|
|
218
|
+
{textarea}
|
|
219
|
+
{leftIcon && (
|
|
220
|
+
<div className={`${eccgui}-textarea__icon`}>
|
|
221
|
+
{typeof leftIcon === "string" ? (
|
|
222
|
+
<Icon
|
|
223
|
+
name={leftIcon as ValidIconName}
|
|
224
|
+
className={BlueprintClassNames.ICON}
|
|
225
|
+
intent={iconIntent as IntentTypes | undefined}
|
|
226
|
+
/>
|
|
227
|
+
) : (
|
|
228
|
+
<span className={BlueprintClassNames.ICON}>{leftIcon}</span>
|
|
229
|
+
)}
|
|
230
|
+
</div>
|
|
231
|
+
)}
|
|
232
|
+
{rightElement && <div className={`${eccgui}-textarea__options`}>{rightElement}</div>}
|
|
233
|
+
</div>
|
|
234
|
+
) : (
|
|
235
|
+
textarea
|
|
236
|
+
);
|
|
75
237
|
};
|
|
76
238
|
|
|
77
239
|
export default TextArea;
|
|
@@ -1,22 +1,49 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { helpersArgTypes } from "../../../../.storybook/helpers";
|
|
5
|
+
|
|
6
|
+
import { Button, IconButton, TextArea } from "./../../../../index";
|
|
7
|
+
type TextAreaType = typeof TextArea;
|
|
6
8
|
|
|
7
9
|
export default {
|
|
8
10
|
title: "Forms/TextArea",
|
|
9
|
-
component:
|
|
10
|
-
argTypes: {
|
|
11
|
-
|
|
11
|
+
component: TextArea,
|
|
12
|
+
argTypes: {
|
|
13
|
+
leftIcon: {
|
|
14
|
+
...helpersArgTypes.exampleIcon,
|
|
15
|
+
},
|
|
16
|
+
rightElement: {
|
|
17
|
+
control: helpersArgTypes.exampleIcon.control,
|
|
18
|
+
options: [...helpersArgTypes.exampleIcon.options, "Button element", "2 Icon buttons"],
|
|
19
|
+
mapping: {
|
|
20
|
+
...helpersArgTypes.exampleIcon.mapping,
|
|
21
|
+
"Button element": (
|
|
22
|
+
<Button small onClick={() => alert("clicked")}>
|
|
23
|
+
Button label
|
|
24
|
+
</Button>
|
|
25
|
+
),
|
|
26
|
+
"2 Icon buttons": (
|
|
27
|
+
<>
|
|
28
|
+
<IconButton name={"item-comment"} onClick={() => alert("1 clicked")} text="Button 1" />
|
|
29
|
+
<IconButton name={"item-edit"} onClick={() => alert("2 clicked")} text="Button 2" />
|
|
30
|
+
</>
|
|
31
|
+
),
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
intent: {
|
|
35
|
+
...helpersArgTypes.exampleIntent,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
} as Meta<TextAreaType>;
|
|
12
39
|
|
|
13
|
-
const Template:
|
|
40
|
+
const Template: StoryFn<TextAreaType> = (args) => <TextArea {...args}></TextArea>;
|
|
14
41
|
|
|
15
42
|
export const Default = Template.bind({});
|
|
16
43
|
Default.args = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
44
|
+
rows: 10,
|
|
45
|
+
wrapperDivProps: {
|
|
46
|
+
"data-test-id": "textarea-test-id",
|
|
47
|
+
"data-testid": "textarea-testid",
|
|
48
|
+
},
|
|
22
49
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "sass:math";
|
|
2
|
+
@use "sass:color";
|
|
2
3
|
|
|
3
4
|
// own vars
|
|
4
5
|
$eccgui-size-textfield-height-small: $eccgui-size-block-whitespace * 2 !default;
|
|
@@ -57,23 +58,31 @@ $input-button-height-small: math.div($eccgui-size-textfield-height-small, $eccgu
|
|
|
57
58
|
|
|
58
59
|
// enhancements
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
$eccgui-map-intent-bgcolors: (
|
|
62
|
+
"primary": $eccgui-color-info-background,
|
|
63
|
+
"success": $eccgui-color-success-background,
|
|
64
|
+
"warning": $eccgui-color-warning-background,
|
|
65
|
+
"danger": $eccgui-color-danger-background,
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
@mixin intent-state-flash-animation($state, $bgcolor, $mixratio: 24%) {
|
|
61
69
|
@keyframes intent-state-flash-#{$state} {
|
|
62
70
|
0% {
|
|
63
|
-
background-color: mix($bgcolor, $eccgui-color-textfield-background, $mixratio);
|
|
71
|
+
background-color: color.mix($bgcolor, $eccgui-color-textfield-background, $mixratio);
|
|
64
72
|
}
|
|
73
|
+
|
|
65
74
|
39% {
|
|
66
75
|
background-color: $bgcolor;
|
|
67
76
|
}
|
|
77
|
+
|
|
68
78
|
100% {
|
|
69
|
-
background-color: mix($bgcolor, $eccgui-color-textfield-background, $mixratio);
|
|
79
|
+
background-color: color.mix($bgcolor, $eccgui-color-textfield-background, $mixratio);
|
|
70
80
|
}
|
|
71
81
|
}
|
|
82
|
+
}
|
|
72
83
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
animation-name: intent-state-flash-#{$state};
|
|
76
|
-
}
|
|
84
|
+
@each $each-intent, $each-bgcolor in $eccgui-map-intent-bgcolors {
|
|
85
|
+
@include intent-state-flash-animation($each-intent, $each-bgcolor);
|
|
77
86
|
}
|
|
78
87
|
|
|
79
88
|
.#{$ns}-input {
|
|
@@ -82,10 +91,12 @@ $input-button-height-small: math.div($eccgui-size-textfield-height-small, $eccgu
|
|
|
82
91
|
animation-delay: 0.5s;
|
|
83
92
|
}
|
|
84
93
|
|
|
85
|
-
@
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
@each $each-intent, $each-bgcolor in $eccgui-map-intent-bgcolors {
|
|
95
|
+
.#{$ns}-input-group.#{$ns}-intent-#{$each-intent} & {
|
|
96
|
+
background-color: color.mix($each-bgcolor, $eccgui-color-textfield-background, 24%);
|
|
97
|
+
animation-name: intent-state-flash-#{$each-intent};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
89
100
|
|
|
90
101
|
.#{$ns}-input-group.#{$eccgui}-intent--info & {
|
|
91
102
|
@include pt-input-intent($eccgui-color-info-text);
|
|
@@ -114,6 +125,62 @@ $input-button-height-small: math.div($eccgui-size-textfield-height-small, $eccgu
|
|
|
114
125
|
|
|
115
126
|
.#{$eccgui}-textarea {
|
|
116
127
|
width: 100%;
|
|
128
|
+
|
|
129
|
+
&[class*="#{$eccgui}-intent--"] {
|
|
130
|
+
animation-duration: 1s;
|
|
131
|
+
animation-delay: 0.5s;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@each $each-intent, $each-bgcolor in $eccgui-map-intent-bgcolors {
|
|
135
|
+
&.#{$eccgui}-intent--#{$each-intent} {
|
|
136
|
+
background-color: color.mix($each-bgcolor, $eccgui-color-textfield-background, 24%);
|
|
137
|
+
animation-name: intent-state-flash-#{$each-intent};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&.#{$eccgui}-intent--info {
|
|
142
|
+
@include pt-input-intent($eccgui-color-info-text);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.#{$eccgui}-intent--accent {
|
|
146
|
+
@include pt-input-intent($eccgui-color-primary);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.#{$eccgui}-intent--neutral {
|
|
150
|
+
@include pt-input-intent($eccgui-color-workspace-text);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.#{$eccgui}-intent--edited {
|
|
154
|
+
@include pt-input-intent($eccgui-color-info-text);
|
|
155
|
+
|
|
156
|
+
color: $eccgui-color-info-text;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.#{$eccgui}-intent--removed {
|
|
160
|
+
@include pt-input-intent($eccgui-color-danger-text);
|
|
161
|
+
|
|
162
|
+
text-decoration: line-through $eccgui-color-danger-text 2px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&.#{$ns}-text-area-auto-resize {
|
|
166
|
+
height: unset;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.#{$eccgui}-textarea__wrapper {
|
|
171
|
+
position: relative;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.#{$eccgui}-textarea__icon {
|
|
175
|
+
position: absolute;
|
|
176
|
+
top: 0;
|
|
177
|
+
left: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.#{$eccgui}-textarea__options {
|
|
181
|
+
position: absolute;
|
|
182
|
+
top: 0;
|
|
183
|
+
right: 0;
|
|
117
184
|
}
|
|
118
185
|
|
|
119
186
|
.#{$eccgui}-textfield--justifyclearance {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@import "~@blueprintjs/colors/src/colors";
|
|
2
|
-
@import "~@blueprintjs/core/src/common/variables";
|
|
2
|
+
@import "~@blueprintjs/core/src/common/variables-extended";
|
|
3
3
|
|
|
4
4
|
// future home for $icon-classes var @import "~@blueprintjs/core/src/common/variables-extended";
|
|
5
5
|
@import "~@blueprintjs/core/src/common/react-transition";
|
|
@@ -1,83 +1,21 @@
|
|
|
1
1
|
@use "sass:math";
|
|
2
2
|
|
|
3
3
|
// Stack of BlueprintJS variables that are necessary to use their framework
|
|
4
|
-
//
|
|
4
|
+
// calculate them from own configuration variables here
|
|
5
|
+
// see blueprint import for variables that need to be overwritten with other values
|
|
5
6
|
|
|
6
7
|
$icon-font-path: "~@blueprintjs/icons/resources/icons" !default;
|
|
7
8
|
|
|
8
|
-
// Gray scale
|
|
9
|
-
|
|
10
|
-
// $black: #10161a !default;
|
|
11
|
-
|
|
12
|
-
// $dark-gray1: #182026 !default;
|
|
13
|
-
// $dark-gray2: #202b33 !default;
|
|
14
|
-
// $dark-gray3: #293742 !default;
|
|
15
|
-
// $dark-gray4: #30404d !default;
|
|
16
|
-
// $dark-gray5: #394b59 !default;
|
|
17
|
-
|
|
18
|
-
// $gray1: #5c7080 !default;
|
|
19
|
-
// $gray2: #738694 !default;
|
|
20
|
-
// $gray3: #8a9ba8 !default;
|
|
21
|
-
// $gray4: #a7b6c2 !default;
|
|
22
|
-
// $gray5: #bfccd6 !default;
|
|
23
|
-
|
|
24
|
-
// $light-gray1: #ced9e0 !default;
|
|
25
|
-
// $light-gray2: #d8e1e8 !default;
|
|
26
|
-
// $light-gray3: #e1e8ed !default;
|
|
27
|
-
// $light-gray4: #ebf1f5 !default;
|
|
28
|
-
// $light-gray5: #f5f8fa !default;
|
|
29
|
-
|
|
30
|
-
// $white: #ffffff !default;
|
|
31
|
-
|
|
32
|
-
// Other colors
|
|
33
|
-
// @import '~@blueprintjs/core/src/common/colors';
|
|
34
|
-
|
|
35
9
|
// Color aliases
|
|
36
10
|
|
|
37
11
|
$pt-intent-primary: $eccgui-color-accent !default;
|
|
38
12
|
$pt-intent-success: $eccgui-color-success-text !default;
|
|
39
13
|
$pt-intent-warning: $eccgui-color-warning-text !default;
|
|
40
14
|
$pt-intent-danger: $eccgui-color-danger-text !default;
|
|
41
|
-
|
|
42
|
-
// $pt-app-background-color: $light-gray5 !default;
|
|
43
|
-
// $pt-dark-app-background-color: $dark-gray3 !default;
|
|
44
|
-
|
|
45
15
|
$pt-outline-color: rgba($eccgui-color-accent, 0.6);
|
|
46
16
|
$pt-text-color: $eccgui-color-application-text !default;
|
|
47
17
|
|
|
48
|
-
//
|
|
49
|
-
// $pt-text-color-disabled: rgba($pt-text-color-muted, 0.6) !default;
|
|
50
|
-
// $pt-heading-color: $pt-text-color !default;
|
|
51
|
-
// $pt-link-color: $pt-intent-primary !default;
|
|
52
|
-
// $pt-dark-text-color: $light-gray5 !default;
|
|
53
|
-
// $pt-dark-text-color-muted: $gray4 !default;
|
|
54
|
-
// $pt-dark-text-color-disabled: rgba($pt-dark-text-color-muted, 0.6) !default;
|
|
55
|
-
// $pt-dark-heading-color: $pt-dark-text-color !default;
|
|
56
|
-
// $pt-dark-link-color: $blue5 !default;
|
|
57
|
-
// Default text selection color using #7dbcff
|
|
58
|
-
// $pt-text-selection-color: rgba(125, 188, 255, 0.6) !default;
|
|
59
|
-
|
|
60
|
-
// $pt-icon-color: $pt-text-color-muted !default;
|
|
61
|
-
// $pt-icon-color-hover: $pt-text-color !default;
|
|
62
|
-
// $pt-icon-color-disabled: $pt-text-color-disabled !default;
|
|
63
|
-
// $pt-icon-color-selected: $pt-intent-primary !default;
|
|
64
|
-
// $pt-dark-icon-color: $pt-dark-text-color-muted !default;
|
|
65
|
-
// $pt-dark-icon-color-hover: $pt-dark-text-color !default;
|
|
66
|
-
// $pt-dark-icon-color-disabled: $pt-dark-text-color-disabled !default;
|
|
67
|
-
// $pt-dark-icon-color-selected: $pt-intent-primary !default;
|
|
68
|
-
|
|
69
|
-
// $pt-divider-black: rgba($black, 0.15) !default;
|
|
70
|
-
// $pt-dark-divider-black: rgba($black, 0.4) !default;
|
|
71
|
-
// $pt-dark-divider-white: rgba($white, 0.15) !default;
|
|
72
|
-
|
|
73
|
-
// $pt-code-text-color: $pt-text-color-muted !default;
|
|
74
|
-
// $pt-dark-code-text-color: $pt-dark-text-color-muted !default;
|
|
75
|
-
// $pt-code-background-color: rgba($white, 0.7) !default;
|
|
76
|
-
// $pt-dark-code-background-color: rgba($black, 0.3) !default;
|
|
77
|
-
|
|
78
|
-
// Namespace appended to the beginning of each CSS class: `.#{$ns}-button`.
|
|
79
|
-
// Do not quote this value, for Less consumers.
|
|
80
|
-
$ns: bp5 !default;
|
|
18
|
+
// Size aliases
|
|
81
19
|
|
|
82
20
|
// easily the most important variable, so it comes up top
|
|
83
21
|
// (so other variables can use it to define themselves)
|
|
@@ -89,112 +27,5 @@ $pt-font-size-large: $eccgui-size-typo-subtitle !default;
|
|
|
89
27
|
$pt-font-size-small: $eccgui-size-typo-caption !default;
|
|
90
28
|
$pt-line-height: $eccgui-size-typo-text-lineheight !default;
|
|
91
29
|
|
|
92
|
-
// tag: (font-size, line-height)
|
|
93
|
-
|
|
94
|
-
/*
|
|
95
|
-
$headings: (
|
|
96
|
-
"h1": (36px, 40px),
|
|
97
|
-
"h2": (28px, 32px),
|
|
98
|
-
"h3": (22px, 25px),
|
|
99
|
-
"h4": (18px, 21px),
|
|
100
|
-
"h5": (16px, 19px),
|
|
101
|
-
"h6": (14px, 16px)
|
|
102
|
-
) !default;
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
// Icon variables
|
|
106
|
-
// $icons16-family: "Icons16" !default;
|
|
107
|
-
// $icons20-family: "Icons20" !default;
|
|
108
30
|
$pt-icon-size-standard: 20px !default;
|
|
109
31
|
$pt-icon-size-large: 32px !default;
|
|
110
|
-
|
|
111
|
-
// Grids & dimensions
|
|
112
|
-
|
|
113
|
-
// $pt-border-radius: floor($pt-grid-size / 3) !default;
|
|
114
|
-
|
|
115
|
-
// Buttons
|
|
116
|
-
// $pt-button-height: $pt-grid-size * 3 !default;
|
|
117
|
-
// $pt-button-height-small: $pt-grid-size * 2.4 !default;
|
|
118
|
-
// $pt-button-height-smaller: $pt-grid-size * 2 !default;
|
|
119
|
-
// $pt-button-height-large: $pt-grid-size * 4 !default;
|
|
120
|
-
|
|
121
|
-
// Inputs
|
|
122
|
-
// $pt-input-height: $pt-grid-size * 3 !default;
|
|
123
|
-
// $pt-input-height-large: $pt-grid-size * 4 !default;
|
|
124
|
-
// $pt-input-height-small: $pt-grid-size * 2.4 !default;
|
|
125
|
-
|
|
126
|
-
// Others
|
|
127
|
-
// $pt-navbar-height: $pt-grid-size * 5 !default;
|
|
128
|
-
|
|
129
|
-
// Z-indices
|
|
130
|
-
// $pt-z-index-base: 0 !default;
|
|
131
|
-
// $pt-z-index-content: $pt-z-index-base + 10 !default;
|
|
132
|
-
// $pt-z-index-overlay: $pt-z-index-content + 10 !default;
|
|
133
|
-
|
|
134
|
-
// Shadow opacities
|
|
135
|
-
// $pt-border-shadow-opacity: 0.1 !default;
|
|
136
|
-
// $pt-drop-shadow-opacity: 0.2 !default;
|
|
137
|
-
// $pt-dark-border-shadow-opacity: $pt-border-shadow-opacity * 2 !default;
|
|
138
|
-
// $pt-dark-drop-shadow-opacity: $pt-drop-shadow-opacity * 2 !default;
|
|
139
|
-
|
|
140
|
-
// Elevations
|
|
141
|
-
// all shadow lists must be the same length to avoid flicker in transitions.
|
|
142
|
-
|
|
143
|
-
/*
|
|
144
|
-
$pt-elevation-shadow-0: 0 0 0 1px $pt-divider-black,
|
|
145
|
-
0 0 0 rgba($black, 0),
|
|
146
|
-
0 0 0 rgba($black, 0) !default;
|
|
147
|
-
$pt-elevation-shadow-1: border-shadow($pt-border-shadow-opacity),
|
|
148
|
-
0 0 0 rgba($black, 0),
|
|
149
|
-
0 1px 1px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
150
|
-
$pt-elevation-shadow-2: border-shadow($pt-border-shadow-opacity),
|
|
151
|
-
0 1px 1px rgba($black, $pt-drop-shadow-opacity),
|
|
152
|
-
0 2px 6px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
153
|
-
$pt-elevation-shadow-3: border-shadow($pt-border-shadow-opacity),
|
|
154
|
-
0 2px 4px rgba($black, $pt-drop-shadow-opacity),
|
|
155
|
-
0 8px 24px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
156
|
-
$pt-elevation-shadow-4: border-shadow($pt-border-shadow-opacity),
|
|
157
|
-
0 4px 8px rgba($black, $pt-drop-shadow-opacity),
|
|
158
|
-
0 18px 46px 6px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
159
|
-
|
|
160
|
-
$pt-dark-elevation-shadow-0: 0 0 0 1px $pt-dark-divider-black,
|
|
161
|
-
0 0 0 rgba($black, 0),
|
|
162
|
-
0 0 0 rgba($black, 0) !default;
|
|
163
|
-
$pt-dark-elevation-shadow-1: border-shadow($pt-dark-border-shadow-opacity),
|
|
164
|
-
0 0 0 rgba($black, 0),
|
|
165
|
-
0 1px 1px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
166
|
-
$pt-dark-elevation-shadow-2: border-shadow($pt-dark-border-shadow-opacity),
|
|
167
|
-
0 1px 1px rgba($black, $pt-dark-drop-shadow-opacity),
|
|
168
|
-
0 2px 6px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
169
|
-
$pt-dark-elevation-shadow-3: border-shadow($pt-dark-border-shadow-opacity),
|
|
170
|
-
0 2px 4px rgba($black, $pt-dark-drop-shadow-opacity),
|
|
171
|
-
0 8px 24px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
172
|
-
$pt-dark-elevation-shadow-4: border-shadow($pt-dark-border-shadow-opacity),
|
|
173
|
-
0 4px 8px rgba($black, $pt-dark-drop-shadow-opacity),
|
|
174
|
-
0 18px 46px 6px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
175
|
-
*/
|
|
176
|
-
|
|
177
|
-
// Transitions
|
|
178
|
-
// $pt-transition-ease: cubic-bezier(0.4, 1, 0.75, 0.9) !default;
|
|
179
|
-
// $pt-transition-ease-bounce: cubic-bezier(0.54, 1.12, 0.38, 1.11) !default;
|
|
180
|
-
// $pt-transition-duration: 100ms !default;
|
|
181
|
-
|
|
182
|
-
// Light theme styles
|
|
183
|
-
|
|
184
|
-
/*
|
|
185
|
-
$pt-input-box-shadow: inset border-shadow(0.15),
|
|
186
|
-
inset 0 1px 1px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
187
|
-
*/
|
|
188
|
-
// $pt-dialog-box-shadow: $pt-elevation-shadow-4 !default;
|
|
189
|
-
// $pt-popover-box-shadow: $pt-elevation-shadow-3 !default;
|
|
190
|
-
// $pt-tooltip-box-shadow: $pt-popover-box-shadow !default;
|
|
191
|
-
|
|
192
|
-
// Dark theme styles
|
|
193
|
-
|
|
194
|
-
/*
|
|
195
|
-
$pt-dark-input-box-shadow: inset border-shadow(0.3),
|
|
196
|
-
inset 0 1px 1px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
197
|
-
*/
|
|
198
|
-
// $pt-dark-dialog-box-shadow: $pt-dark-elevation-shadow-4 !default;
|
|
199
|
-
// $pt-dark-popover-box-shadow: $pt-dark-elevation-shadow-3 !default;
|
|
200
|
-
// $pt-dark-tooltip-box-shadow: $pt-dark-popover-box-shadow !default;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
$use-flexbox-grid: $use-flexbox-grid
|
|
9
9
|
);
|
|
10
10
|
@use "~@carbon/styles/scss/utilities/_visually-hidden";
|
|
11
|
+
@import "~@carbon/styles/scss/components/ui-shell/functions";
|
|
11
12
|
@import "~@carbon/styles/scss/feature-flags";
|
|
12
13
|
@import "~@carbon/styles/scss/colors";
|
|
13
14
|
@import "~@carbon/styles/scss/theme";
|