@elastic/eui-theme-borealis 0.1.0 → 0.2.0
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/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/variables/_borders.js +1 -1
- package/lib/cjs/variables/_borders.js.map +1 -1
- package/lib/cjs/variables/_buttons.d.ts.map +1 -1
- package/lib/cjs/variables/_buttons.js +206 -83
- package/lib/cjs/variables/_buttons.js.map +1 -1
- package/lib/cjs/variables/_components.d.ts.map +1 -1
- package/lib/cjs/variables/_components.js +307 -125
- package/lib/cjs/variables/_components.js.map +1 -1
- package/lib/cjs/variables/_forms.d.ts +32 -32
- package/lib/cjs/variables/_forms.d.ts.map +1 -1
- package/lib/cjs/variables/_forms.js +91 -47
- package/lib/cjs/variables/_forms.js.map +1 -1
- package/lib/cjs/variables/_overrides.d.ts +3 -0
- package/lib/cjs/variables/_overrides.d.ts.map +1 -0
- package/lib/cjs/variables/_overrides.js +24 -0
- package/lib/cjs/variables/_overrides.js.map +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/variables/_borders.js +1 -1
- package/lib/esm/variables/_borders.js.map +1 -1
- package/lib/esm/variables/_buttons.js +40 -78
- package/lib/esm/variables/_buttons.js.map +1 -1
- package/lib/esm/variables/_components.js +64 -124
- package/lib/esm/variables/_components.js.map +1 -1
- package/lib/esm/variables/_forms.d.ts +32 -32
- package/lib/esm/variables/_forms.js +16 -35
- package/lib/esm/variables/_forms.js.map +1 -1
- package/lib/esm/variables/_overrides.d.ts +2 -0
- package/lib/esm/variables/_overrides.js +17 -0
- package/lib/esm/variables/_overrides.js.map +1 -0
- package/lib/eui_theme_borealis_dark.json +3 -3
- package/lib/eui_theme_borealis_light.json +3 -3
- package/package.json +2 -2
- package/src/variables/_borders.scss +11 -0
- package/src/variables/_index.scss +7 -0
|
@@ -6,46 +6,27 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import { computed, mathWithUnits } from '@elastic/eui-theme-common';
|
|
9
|
-
import { dark_background_colors, dark_border_colors, dark_text_colors, } from './colors/_colors_dark';
|
|
10
|
-
import { background_colors, border_colors, text_colors, } from './colors/_colors_light';
|
|
11
9
|
const _forms = {
|
|
12
|
-
background:
|
|
13
|
-
backgroundDisabled:
|
|
14
|
-
backgroundReadOnly:
|
|
15
|
-
backgroundFocused:
|
|
16
|
-
backgroundAutofilled:
|
|
17
|
-
prependBackground:
|
|
18
|
-
border:
|
|
19
|
-
borderDisabled:
|
|
20
|
-
borderAutofilled:
|
|
21
|
-
controlBorder:
|
|
22
|
-
controlBorderSelected:
|
|
23
|
-
controlBorderDisabled:
|
|
10
|
+
background: computed(([backgroundBasePlain]) => backgroundBasePlain, ['colors.backgroundBasePlain']),
|
|
11
|
+
backgroundDisabled: computed(([backgroundBaseDisabled]) => backgroundBaseDisabled, ['colors.backgroundBaseDisabled']),
|
|
12
|
+
backgroundReadOnly: computed(([backgroundBasePlain]) => backgroundBasePlain, ['colors.backgroundBasePlain']),
|
|
13
|
+
backgroundFocused: computed(([backgroundBasePlain]) => backgroundBasePlain, ['colors.backgroundBasePlain']),
|
|
14
|
+
backgroundAutofilled: computed(([backgroundBasePrimary]) => backgroundBasePrimary, ['colors.backgroundBasePrimary']),
|
|
15
|
+
prependBackground: computed(([backgroundBaseFormsPrepend]) => backgroundBaseFormsPrepend, ['colors.backgroundBaseFormsPrepend']),
|
|
16
|
+
border: computed(([borderBasePlain]) => borderBasePlain, ['colors.borderBasePlain']),
|
|
17
|
+
borderDisabled: computed(([borderBaseDisabled]) => borderBaseDisabled, ['colors.borderBaseDisabled']),
|
|
18
|
+
borderAutofilled: computed(([borderBasePrimary]) => borderBasePrimary, ['colors.borderBasePrimary']),
|
|
19
|
+
controlBorder: computed(([borderBaseFormsControl]) => borderBaseFormsControl, ['colors.borderBaseFormsControl']),
|
|
20
|
+
controlBorderSelected: computed(([borderStrongPrimary]) => borderStrongPrimary, ['colors.borderStrongPrimary']),
|
|
21
|
+
controlBorderDisabled: computed(([borderBaseDisabled]) => borderBaseDisabled, ['colors.borderBaseDisabled']),
|
|
24
22
|
controlBackgroundUnselected: 'transparent',
|
|
25
|
-
controlBackgroundDisabled:
|
|
26
|
-
colorHasPlaceholder:
|
|
27
|
-
colorDisabled:
|
|
28
|
-
iconDisabled:
|
|
23
|
+
controlBackgroundDisabled: computed(([backgroundBaseFormsControlDisabled]) => backgroundBaseFormsControlDisabled, ['colors.backgroundBaseFormsControlDisabled']),
|
|
24
|
+
colorHasPlaceholder: computed(([textSubdued]) => textSubdued, ['colors.textSubdued']),
|
|
25
|
+
colorDisabled: computed(([textDisabled]) => textDisabled, ['colors.textDisabled']),
|
|
26
|
+
iconDisabled: computed(([textDisabled]) => textDisabled, ['colors.textDisabled']),
|
|
29
27
|
};
|
|
30
28
|
const _dark_forms = {
|
|
31
29
|
..._forms,
|
|
32
|
-
background: dark_background_colors.backgroundBasePlain,
|
|
33
|
-
backgroundDisabled: dark_background_colors.backgroundBaseDisabled,
|
|
34
|
-
backgroundReadOnly: dark_background_colors.backgroundBasePlain,
|
|
35
|
-
backgroundFocused: dark_background_colors.backgroundBasePlain,
|
|
36
|
-
backgroundAutofilled: dark_background_colors.backgroundBasePrimary,
|
|
37
|
-
prependBackground: dark_background_colors.backgroundBaseFormsPrepend,
|
|
38
|
-
border: dark_border_colors.borderBasePlain,
|
|
39
|
-
borderDisabled: dark_border_colors.borderBaseDisabled,
|
|
40
|
-
borderAutofilled: dark_border_colors.borderBasePrimary,
|
|
41
|
-
controlBorder: dark_border_colors.borderBaseFormsControl,
|
|
42
|
-
controlBorderSelected: dark_border_colors.borderStrongPrimary,
|
|
43
|
-
controlBorderDisabled: dark_border_colors.borderBaseDisabled,
|
|
44
|
-
controlBackgroundUnselected: 'transparent',
|
|
45
|
-
controlBackgroundDisabled: dark_background_colors.backgroundBaseFormsControlDisabled,
|
|
46
|
-
colorHasPlaceholder: dark_text_colors.textSubdued,
|
|
47
|
-
colorDisabled: dark_text_colors.textDisabled,
|
|
48
|
-
iconDisabled: dark_text_colors.textDisabled,
|
|
49
30
|
};
|
|
50
31
|
export const forms = {
|
|
51
32
|
maxWidth: computed(([base]) => mathWithUnits(base, (x) => x * 25), ['size.base']),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_forms.js","sourceRoot":"","sources":["../../../src/variables/_forms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"_forms.js","sourceRoot":"","sources":["../../../src/variables/_forms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,MAAM,GAAG;IACb,UAAU,EAAE,QAAQ,CAClB,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAC,mBAAmB,EAC9C,CAAC,4BAA4B,CAAC,CAC/B;IACD,kBAAkB,EAAE,QAAQ,CAC1B,CAAC,CAAC,sBAAsB,CAAC,EAAE,EAAE,CAAC,sBAAsB,EACpD,CAAC,+BAA+B,CAAC,CAClC;IACD,kBAAkB,EAAE,QAAQ,CAC1B,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAC,mBAAmB,EAC9C,CAAC,4BAA4B,CAAC,CAC/B;IACD,iBAAiB,EAAE,QAAQ,CACzB,CAAC,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAC,mBAAmB,EAC9C,CAAC,4BAA4B,CAAC,CAC/B;IACD,oBAAoB,EAAE,QAAQ,CAC5B,CAAC,CAAC,qBAAqB,CAAC,EAAE,EAAE,CAAC,qBAAqB,EAClD,CAAC,8BAA8B,CAAC,CACjC;IACD,iBAAiB,EAAE,QAAQ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E,EAAE,CAAC,YAAY,EAChC,CAAC,qBAAqB,CAAC,CACxB;CACF,CAAC;AAEF,MAAM,WAAW,GAAG;IAClB,GAAG,MAAM;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,QAAQ,EAAE,QAAQ,CAChB,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,EAC9C,CAAC,WAAW,CAAC,CACd;IACD,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,WAAW;CAClB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { PRIMITIVE_COLORS } from './colors/_primitive_colors';
|
|
9
|
+
export const overrides = {
|
|
10
|
+
HCM: {
|
|
11
|
+
colors: {
|
|
12
|
+
ink: PRIMITIVE_COLORS.black,
|
|
13
|
+
ghost: PRIMITIVE_COLORS.white,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=_overrides.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_overrides.js","sourceRoot":"","sources":["../../../src/variables/_overrides.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,MAAM,SAAS,GAAuB;IAC3C,GAAG,EAAE;QACH,MAAM,EAAE;YACN,GAAG,EAAE,gBAAgB,CAAC,KAAK;YAC3B,KAAK,EAAE,gBAAgB,CAAC,KAAK;SAC9B;KACF;CACF,CAAC"}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"euiBorderWidthThin": "1px",
|
|
25
25
|
"euiBorderWidthThick": "2px",
|
|
26
26
|
"euiBorderColor": "#2B394F",
|
|
27
|
-
"euiBorderRadius": "
|
|
27
|
+
"euiBorderRadius": "4px",
|
|
28
28
|
"euiBorderRadiusSmall": "4px",
|
|
29
29
|
"euiBorderThick": "2px solid #2B394F",
|
|
30
30
|
"euiBorderThin": "1px solid #2B394F",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"euiFormControlCompressedHeight": "32px",
|
|
58
58
|
"euiFormControlPadding": "12px",
|
|
59
59
|
"euiFormControlCompressedPadding": "8px",
|
|
60
|
-
"euiFormControlBorderRadius": "
|
|
60
|
+
"euiFormControlBorderRadius": "4px",
|
|
61
61
|
"euiFormControlCompressedBorderRadius": "4px",
|
|
62
62
|
"euiRadioSize": "16px",
|
|
63
63
|
"euiCheckBoxSize": "16px",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
},
|
|
113
113
|
"euiPanelBorderRadiusModifiers": {
|
|
114
114
|
"borderRadiusNone": 0,
|
|
115
|
-
"borderRadiusMedium": "
|
|
115
|
+
"borderRadiusMedium": "4px"
|
|
116
116
|
},
|
|
117
117
|
"euiPanelBackgroundColorModifiers": {
|
|
118
118
|
"transparent": "rgba(0, 0, 0, 0)",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"euiBorderWidthThin": "1px",
|
|
25
25
|
"euiBorderWidthThick": "2px",
|
|
26
26
|
"euiBorderColor": "#E3E8F2",
|
|
27
|
-
"euiBorderRadius": "
|
|
27
|
+
"euiBorderRadius": "4px",
|
|
28
28
|
"euiBorderRadiusSmall": "4px",
|
|
29
29
|
"euiBorderThick": "2px solid #E3E8F2",
|
|
30
30
|
"euiBorderThin": "1px solid #E3E8F2",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"euiFormControlCompressedHeight": "32px",
|
|
58
58
|
"euiFormControlPadding": "12px",
|
|
59
59
|
"euiFormControlCompressedPadding": "8px",
|
|
60
|
-
"euiFormControlBorderRadius": "
|
|
60
|
+
"euiFormControlBorderRadius": "4px",
|
|
61
61
|
"euiFormControlCompressedBorderRadius": "4px",
|
|
62
62
|
"euiRadioSize": "16px",
|
|
63
63
|
"euiCheckBoxSize": "16px",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
},
|
|
113
113
|
"euiPanelBorderRadiusModifiers": {
|
|
114
114
|
"borderRadiusNone": 0,
|
|
115
|
-
"borderRadiusMedium": "
|
|
115
|
+
"borderRadiusMedium": "4px"
|
|
116
116
|
},
|
|
117
117
|
"euiPanelBackgroundColorModifiers": {
|
|
118
118
|
"transparent": "rgba(0, 0, 0, 0)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui-theme-borealis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A visual theme for EUI",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@babel/preset-env": "^7.21.5",
|
|
33
33
|
"@babel/preset-react": "^7.18.6",
|
|
34
34
|
"@babel/preset-typescript": "^7.21.5",
|
|
35
|
-
"@elastic/eui-theme-common": "0.
|
|
35
|
+
"@elastic/eui-theme-common": "0.2.0",
|
|
36
36
|
"@types/chroma-js": "^2.4.0",
|
|
37
37
|
"@types/jest": "^29.5.12",
|
|
38
38
|
"@types/prettier": "2.7.3",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Borders
|
|
2
|
+
|
|
3
|
+
$euiBorderWidthThin: 1px !default;
|
|
4
|
+
$euiBorderWidthThick: 2px !default;
|
|
5
|
+
|
|
6
|
+
$euiBorderColor: $euiColorBorderBaseSubdued !default;
|
|
7
|
+
$euiBorderRadius: $euiSizeS * .5 !default;
|
|
8
|
+
$euiBorderRadiusSmall: $euiSizeS * .5 !default;
|
|
9
|
+
$euiBorderThick: $euiBorderWidthThick solid $euiBorderColor !default;
|
|
10
|
+
$euiBorderThin: $euiBorderWidthThin solid $euiBorderColor !default;
|
|
11
|
+
$euiBorderEditable: $euiBorderWidthThick dotted $euiBorderColor !default;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
// Import base theme first, then override
|
|
2
|
+
|
|
3
|
+
// TODO: untangle border scss definitions by moving them and related usage to the theme
|
|
4
|
+
// package instead of the common one
|
|
5
|
+
|
|
6
|
+
@import 'node_modules/@elastic/eui-theme-common/src/global_styling/variables/size';
|
|
7
|
+
// borders are used in the common package, to define them on theme level we require the size variables first
|
|
8
|
+
@import 'borders';
|
|
2
9
|
@import 'node_modules/@elastic/eui-theme-common/src/global_styling/variables/index';
|
|
3
10
|
@import 'states';
|
|
4
11
|
|