@brightlayer-ui/colors 4.0.0-alpha.1 → 4.0.0-alpha.3

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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### Changed
6
6
 
7
- - Move Branding colors under `@brightlayer-ui/colors` package.
7
+ - Move Branding colors under `@brightlayer-ui/colors/branding` package.
8
8
  - Update UI colors and Branding colors as per new Material Design 3.
9
9
  - Remove dependency of `@brightlayer-ui/types` and moved type in `@brightlayer-ui/colors` package.
10
10
 
package/README.md CHANGED
@@ -79,8 +79,22 @@ background-color: $brand-lightGray;
79
79
  ### JSON Object
80
80
 
81
81
  ```
82
- import Colors, {BrandingColors} from '@brightlayer-ui/colors';
82
+ import Colors, {primary} from '@brightlayer-ui/colors';
83
+ import BrandingColors, {lightGray} from '@brightlayer-ui/colors/branding';
83
84
  ...
84
85
  <div style={{background: Colors.primary[10]}}/>
85
- <div style={{background: BrandingColors.teal}}/>
86
+ <div style={{background: primary[10]}}/>
87
+ <div style={{background: BrandingColors.lightGray}}/>
88
+ <div style={{background: lightGray}}/>
89
+ ```
90
+
91
+ ## Migration from v3 to v4
92
+
93
+ In version 4.0.0, we have updated the UI colors and branding colors palette.
94
+
95
+ We have deprecated `@brightlayer-ui/colors-branding` and `@brightlayer-ui/types` packages, as they will be part of the `@brightlayer-ui/colors` package.
96
+ The branding colors palette and individual branding colors now can be imported from `@brightlayer-ui/colors/branding`.
97
+
98
+ ```
99
+ import BrandingColors, {lightGray} from '@brightlayer-ui/colors/branding';
86
100
  ```
@@ -5,7 +5,7 @@ All rights reserved.
5
5
 
6
6
  This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
7
  **/
8
- export declare enum BrandingColors {
8
+ declare enum BrandingColors {
9
9
  lightGray = "#98A4AE",
10
10
  gray = "#5B6770",
11
11
  darkGray = "#333F48",
@@ -28,3 +28,5 @@ export declare enum BrandingColors {
28
28
  wine = "#9D2235"
29
29
  }
30
30
  export declare const chartColors: BrandingColors[];
31
+ export declare const lightGray: BrandingColors, gray: BrandingColors, darkGray: BrandingColors, sky: BrandingColors, eatonBlue: BrandingColors, navy: BrandingColors, ash: BrandingColors, teal: BrandingColors, pine: BrandingColors, sage: BrandingColors, citrus: BrandingColors, emerald: BrandingColors, butter: BrandingColors, goldenrod: BrandingColors, toad: BrandingColors, trophy: BrandingColors, sunset: BrandingColors, rust: BrandingColors, crimson: BrandingColors, wine: BrandingColors;
32
+ export default BrandingColors;
@@ -7,7 +7,7 @@ All rights reserved.
7
7
  This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
8
8
  **/
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.chartColors = exports.BrandingColors = void 0;
10
+ exports.wine = exports.crimson = exports.rust = exports.sunset = exports.trophy = exports.toad = exports.goldenrod = exports.butter = exports.emerald = exports.citrus = exports.sage = exports.pine = exports.teal = exports.ash = exports.navy = exports.eatonBlue = exports.sky = exports.darkGray = exports.gray = exports.lightGray = exports.chartColors = void 0;
11
11
  var BrandingColors;
12
12
  (function (BrandingColors) {
13
13
  BrandingColors["lightGray"] = "#98A4AE";
@@ -30,7 +30,7 @@ var BrandingColors;
30
30
  BrandingColors["rust"] = "#B94700";
31
31
  BrandingColors["crimson"] = "#D22730";
32
32
  BrandingColors["wine"] = "#9D2235";
33
- })(BrandingColors || (exports.BrandingColors = BrandingColors = {}));
33
+ })(BrandingColors || (BrandingColors = {}));
34
34
  exports.chartColors = [
35
35
  BrandingColors.teal,
36
36
  BrandingColors.citrus,
@@ -43,3 +43,5 @@ exports.chartColors = [
43
43
  BrandingColors.navy,
44
44
  BrandingColors.sky,
45
45
  ];
46
+ exports.lightGray = BrandingColors.lightGray, exports.gray = BrandingColors.gray, exports.darkGray = BrandingColors.darkGray, exports.sky = BrandingColors.sky, exports.eatonBlue = BrandingColors.eatonBlue, exports.navy = BrandingColors.navy, exports.ash = BrandingColors.ash, exports.teal = BrandingColors.teal, exports.pine = BrandingColors.pine, exports.sage = BrandingColors.sage, exports.citrus = BrandingColors.citrus, exports.emerald = BrandingColors.emerald, exports.butter = BrandingColors.butter, exports.goldenrod = BrandingColors.goldenrod, exports.toad = BrandingColors.toad, exports.trophy = BrandingColors.trophy, exports.sunset = BrandingColors.sunset, exports.rust = BrandingColors.rust, exports.crimson = BrandingColors.crimson, exports.wine = BrandingColors.wine;
47
+ exports.default = BrandingColors;
@@ -0,0 +1,3 @@
1
+ export * from './branding-palette';
2
+ import BrandingColors from './branding-palette';
3
+ export default BrandingColors;
@@ -14,8 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ChartColors = exports.BrandingColors = void 0;
18
- __exportStar(require("./palette"), exports);
17
+ __exportStar(require("./branding-palette"), exports);
19
18
  var branding_palette_1 = require("./branding-palette");
20
- Object.defineProperty(exports, "BrandingColors", { enumerable: true, get: function () { return branding_palette_1.BrandingColors; } });
21
- Object.defineProperty(exports, "ChartColors", { enumerable: true, get: function () { return branding_palette_1.chartColors; } });
19
+ exports.default = branding_palette_1.default;
@@ -0,0 +1,3 @@
1
+ export * from './palette';
2
+ import Colors from './palette';
3
+ export default Colors;
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./palette"), exports);
18
+ var palette_1 = require("./palette");
19
+ exports.default = palette_1.default;
@@ -14,3 +14,14 @@ export declare const warning: Warning;
14
14
  export declare const success: Success;
15
15
  export declare const orange: Orange;
16
16
  export declare const purple: Purple;
17
+ declare const Colors: {
18
+ primary: Primary;
19
+ neutral: Neutral;
20
+ neutralVariant: NeutralVariant;
21
+ error: Error;
22
+ warning: Warning;
23
+ success: Success;
24
+ orange: Orange;
25
+ purple: Purple;
26
+ };
27
+ export default Colors;
@@ -133,3 +133,14 @@ exports.purple = {
133
133
  98: '#FFF7FF',
134
134
  100: '#FFFFFF',
135
135
  };
136
+ var Colors = {
137
+ primary: exports.primary,
138
+ neutral: exports.neutral,
139
+ neutralVariant: exports.neutralVariant,
140
+ error: exports.error,
141
+ warning: exports.warning,
142
+ success: exports.success,
143
+ orange: exports.orange,
144
+ purple: exports.purple,
145
+ };
146
+ exports.default = Colors;
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@brightlayer-ui/colors",
3
- "version": "4.0.0-alpha.1",
3
+ "version": "4.0.0-alpha.3",
4
4
  "description": "Brightlayer UI colors for Eaton applications",
5
- "main": "./dist/commonjs/index.js",
6
- "types": "./dist/commonjs/index.d.ts",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "./buildTest.sh",
9
- "build": "yarn && tsc --module commonjs --outDir dist/commonjs && tsc --module ES2015 --outDir dist/es2015",
9
+ "clear:build": "rm -rf dist && rm -rf branding",
10
+ "move:branding": "cp -r ./dist/branding branding && rm -rf ./dist/branding",
11
+ "build": "yarn clear:build && yarn tsc && yarn move:branding",
10
12
  "prettier": "prettier \"**/**.{ts,tsx,js,jsx,json,css,scss,html,md}\" --write",
11
13
  "precommit": "yarn && yarn prettier && yarn build && yarn test",
12
14
  "publish:package": "set npm_config_yes=true && npx -p @brightlayer-ui/publish blui-publish",
@@ -42,7 +44,8 @@
42
44
  "LICENSE",
43
45
  "CHANGELOG.md",
44
46
  "dist/",
45
- "branding-pallete.scss",
46
- "palette.scss"
47
+ "branding-palette.scss",
48
+ "palette.scss",
49
+ "branding/"
47
50
  ]
48
51
  }
@@ -1,30 +0,0 @@
1
- /**
2
- Copyright (c) 2018-present, Eaton
3
-
4
- All rights reserved.
5
-
6
- This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
- **/
8
- export declare enum BrandingColors {
9
- lightGray = "#98A4AE",
10
- gray = "#5B6770",
11
- darkGray = "#333F48",
12
- sky = "#71B2C9",
13
- eatonBlue = "#005EB8",
14
- navy = "#003865",
15
- ash = "#A3B2A4",
16
- teal = "#00B2A9",
17
- pine = "#43695B",
18
- sage = "#B7CE95",
19
- citrus = "#B5BD00",
20
- emerald = "#4C8D2B",
21
- butter = "#F3DD6D",
22
- goldenrod = "#FFC72C",
23
- toad = "#AD841F",
24
- trophy = "#F0B323",
25
- sunset = "#ED8B00",
26
- rust = "#B94700",
27
- crimson = "#D22730",
28
- wine = "#9D2235"
29
- }
30
- export declare const chartColors: BrandingColors[];
@@ -1,2 +0,0 @@
1
- export * from './palette';
2
- export { BrandingColors, chartColors as ChartColors } from './branding-palette';
@@ -1,16 +0,0 @@
1
- /**
2
- Copyright (c) 2018-present, Eaton
3
-
4
- All rights reserved.
5
-
6
- This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
- **/
8
- import { Error, Neutral, NeutralVariant, Orange, Primary, Purple, Success, Warning } from './colorType';
9
- export declare const primary: Primary;
10
- export declare const neutral: Neutral;
11
- export declare const neutralVariant: NeutralVariant;
12
- export declare const error: Error;
13
- export declare const warning: Warning;
14
- export declare const success: Success;
15
- export declare const orange: Orange;
16
- export declare const purple: Purple;
@@ -1,42 +0,0 @@
1
- /**
2
- Copyright (c) 2018-present, Eaton
3
-
4
- All rights reserved.
5
-
6
- This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
- **/
8
- export var BrandingColors;
9
- (function (BrandingColors) {
10
- BrandingColors["lightGray"] = "#98A4AE";
11
- BrandingColors["gray"] = "#5B6770";
12
- BrandingColors["darkGray"] = "#333F48";
13
- BrandingColors["sky"] = "#71B2C9";
14
- BrandingColors["eatonBlue"] = "#005EB8";
15
- BrandingColors["navy"] = "#003865";
16
- BrandingColors["ash"] = "#A3B2A4";
17
- BrandingColors["teal"] = "#00B2A9";
18
- BrandingColors["pine"] = "#43695B";
19
- BrandingColors["sage"] = "#B7CE95";
20
- BrandingColors["citrus"] = "#B5BD00";
21
- BrandingColors["emerald"] = "#4C8D2B";
22
- BrandingColors["butter"] = "#F3DD6D";
23
- BrandingColors["goldenrod"] = "#FFC72C";
24
- BrandingColors["toad"] = "#AD841F";
25
- BrandingColors["trophy"] = "#F0B323";
26
- BrandingColors["sunset"] = "#ED8B00";
27
- BrandingColors["rust"] = "#B94700";
28
- BrandingColors["crimson"] = "#D22730";
29
- BrandingColors["wine"] = "#9D2235";
30
- })(BrandingColors || (BrandingColors = {}));
31
- export var chartColors = [
32
- BrandingColors.teal,
33
- BrandingColors.citrus,
34
- BrandingColors.pine,
35
- BrandingColors.emerald,
36
- BrandingColors.wine,
37
- BrandingColors.crimson,
38
- BrandingColors.sunset,
39
- BrandingColors.rust,
40
- BrandingColors.navy,
41
- BrandingColors.sky,
42
- ];
@@ -1,62 +0,0 @@
1
- /**
2
- Copyright (c) 2018-present, Eaton
3
-
4
- All rights reserved.
5
-
6
- This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
- **/
8
- export declare type BLUIColor = {
9
- 0: string;
10
- 10: string;
11
- 20: string;
12
- 30: string;
13
- 40: string;
14
- 50: string;
15
- 60: string;
16
- 70: string;
17
- 80: string;
18
- 90: string;
19
- 100: string;
20
- };
21
- export declare type Primary = BLUIColor & {
22
- 95: string;
23
- 99: string;
24
- };
25
- export declare type Neutral = BLUIColor & {
26
- 4: string;
27
- 6: string;
28
- 12: string;
29
- 17: string;
30
- 87: string;
31
- 92: string;
32
- 94: string;
33
- 95: string;
34
- 97: string;
35
- 98: string;
36
- 99: string;
37
- };
38
- export declare type NeutralVariant = BLUIColor & {
39
- 95: string;
40
- 99: string;
41
- };
42
- export declare type Error = BLUIColor & {
43
- 95: string;
44
- 99: string;
45
- };
46
- export declare type Warning = BLUIColor & {
47
- 95: string;
48
- 98: string;
49
- };
50
- export declare type Success = BLUIColor & {
51
- 4: string;
52
- 95: string;
53
- 98: string;
54
- };
55
- export declare type Orange = BLUIColor & {
56
- 95: string;
57
- 98: string;
58
- };
59
- export declare type Purple = BLUIColor & {
60
- 95: string;
61
- 98: string;
62
- };
@@ -1,8 +0,0 @@
1
- /**
2
- Copyright (c) 2018-present, Eaton
3
-
4
- All rights reserved.
5
-
6
- This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause.
7
- **/
8
- export {};
@@ -1,2 +0,0 @@
1
- export * from './palette';
2
- export { BrandingColors, chartColors as ChartColors } from './branding-palette';
@@ -1,2 +0,0 @@
1
- export * from './palette';
2
- export { BrandingColors, chartColors as ChartColors } from './branding-palette';
@@ -1,132 +0,0 @@
1
- /* Primary Colors / User Interface Colors */
2
- export var primary = {
3
- 0: '#000000',
4
- 10: '#001B3D',
5
- 20: '#003063',
6
- 30: '#00468C',
7
- 40: '#005EB8',
8
- 50: '#1C77CC',
9
- 60: '#4D9FEC',
10
- 70: '#79BFFF',
11
- 80: '#B1DAFF',
12
- 90: '#D0EAFD',
13
- 95: '#E5F5FF',
14
- 99: '#FDFBFF',
15
- 100: '#FFFFFF',
16
- };
17
- export var neutral = {
18
- 0: '#000000',
19
- 4: '#0D1317',
20
- 6: '#141C1F',
21
- 10: '#192024',
22
- 12: '#1E262A',
23
- 17: '#293338',
24
- 20: '#333F48',
25
- 30: '#414E54',
26
- 40: '#4F5B63',
27
- 50: '#5B6770',
28
- 60: '#737F87',
29
- 70: '#98A4AE',
30
- 80: '#BDCAD1',
31
- 87: '#CED8DE',
32
- 90: '#D7E0E5',
33
- 92: '#E0E7EB',
34
- 94: '#E5ECF0',
35
- 95: '#EBF1F4',
36
- 97: '#F2F6F8',
37
- 98: '#F4F8FA',
38
- 99: '#F8FCFC',
39
- 100: '#FFFFFF',
40
- };
41
- export var neutralVariant = {
42
- 0: '#000000',
43
- 10: '#181C22',
44
- 20: '#2D3038',
45
- 30: '#44474E',
46
- 40: '#5B5E66',
47
- 50: '#74777F',
48
- 60: '#8E9099',
49
- 70: '#A8ABB4',
50
- 80: '#C4C6CF',
51
- 90: '#E0E2EC',
52
- 95: '#EEF0FA',
53
- 99: '#FDFBFF',
54
- 100: '#FFFFFF',
55
- };
56
- /* Status Colors */
57
- export var error = {
58
- 0: '#000000',
59
- 10: '#410002',
60
- 20: '#690005',
61
- 30: '#93000A',
62
- 40: '#BA1A1A',
63
- 50: '#DE3730',
64
- 60: '#FF5449',
65
- 70: '#FF897D',
66
- 80: '#FFB4AB',
67
- 90: '#FFDAD6',
68
- 95: '#FFEDEA',
69
- 99: '#FFFBFF',
70
- 100: '#FFFFFF',
71
- };
72
- export var warning = {
73
- 0: '#000000',
74
- 10: '#211B00',
75
- 20: '#383000',
76
- 30: '#524700',
77
- 40: '#6C5E00',
78
- 50: '#887700',
79
- 60: '#A59116',
80
- 70: '#C1AB33',
81
- 80: '#DDC437',
82
- 90: '#FBE365',
83
- 95: '#FFF1B6',
84
- 98: '#FFF9EC',
85
- 100: '#FFFFFF',
86
- };
87
- export var success = {
88
- 0: '#000000',
89
- 4: '#022100',
90
- 10: '#022100',
91
- 20: '#053900',
92
- 30: '#0B5300',
93
- 40: '#126E00',
94
- 50: '#198900',
95
- 60: '#27A70B',
96
- 70: '#48C32E',
97
- 80: '#65E049',
98
- 90: '#95F77D',
99
- 95: '#CBFFB6',
100
- 98: '#EDFFE1',
101
- 100: '#FFFFFF',
102
- };
103
- export var orange = {
104
- 0: '#000000',
105
- 10: '#2D1600',
106
- 20: '#4B2800',
107
- 30: '#6B3B00',
108
- 40: '#8D4F00',
109
- 50: '#B06400',
110
- 60: '#D37B15',
111
- 70: '#ED8B00',
112
- 80: '#FFB876',
113
- 90: '#FFDCC0',
114
- 95: '#FFEEE1',
115
- 98: '#FFF8F5',
116
- 100: '#FFFFFF',
117
- };
118
- export var purple = {
119
- 0: '#000000',
120
- 10: '#2C0051',
121
- 20: '#480081',
122
- 30: '#6700B5',
123
- 40: '#8424DB',
124
- 50: '#9F45F6',
125
- 60: '#B56EFF',
126
- 70: '#C994FF',
127
- 80: '#DCB8FF',
128
- 90: '#F0DBFF',
129
- 95: '#F9ECFF',
130
- 98: '#FFF7FF',
131
- 100: '#FFFFFF',
132
- };
File without changes