@dfds-ui/colors 2.0.8-alpha.bbb0ff54 → 2.0.8-alpha.be86dfcc
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/cjs/colorMap.d.ts +2 -0
- package/cjs/colorMap.js +18 -0
- package/cjs/colors.d.ts +101 -0
- package/cjs/colors.js +37 -0
- package/cjs/hydro2.d.ts +3 -0
- package/cjs/hydro2.js +70 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +16 -0
- package/cjs/legacy.d.ts +151 -0
- package/cjs/legacy.js +75 -0
- package/colorMap.d.ts +2 -0
- package/colorMap.js +25 -0
- package/colors.d.ts +101 -0
- package/colors.js +7 -0
- package/css/colors.css +72 -0
- package/hydro2.d.ts +3 -0
- package/hydro2.js +62 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/legacy.d.ts +151 -0
- package/legacy.js +68 -0
- package/package.json +2 -2
- package/sass/colors.scss +27 -0
package/cjs/colorMap.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _hydro = _interopRequireDefault(require("./hydro2"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
// TODO: Was annoying to type this function. Wait for typescript 4.1 and try again
|
|
13
|
+
// https://github.com/microsoft/TypeScript/pull/40002
|
|
14
|
+
const flatten = (object, nestingSeparator = '-', prefix = '') => Object.entries(object).reduce((acc, [key, val]) => _objectSpread(_objectSpread({}, acc), typeof val === 'string' ? {
|
|
15
|
+
[`${prefix}${key}`]: val
|
|
16
|
+
} : typeof val === 'object' ? flatten(val, nestingSeparator, `${prefix}${key}${nestingSeparator}`) : {}), {});
|
|
17
|
+
var _default = flatten(_objectSpread({}, _hydro.default));
|
|
18
|
+
exports.default = _default;
|
package/cjs/colors.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { hydro2 } from './hydro2';
|
|
2
|
+
import { legacyColorPalette, legacyColors } from './legacy';
|
|
3
|
+
export interface Colors {
|
|
4
|
+
surface: {
|
|
5
|
+
/** Hydro: #FFFFFF */
|
|
6
|
+
primary: string;
|
|
7
|
+
/** Hydro: #eef0f1 */
|
|
8
|
+
secondary: string;
|
|
9
|
+
/** Hydro: #002b45 */
|
|
10
|
+
tertiary: string;
|
|
11
|
+
/** @deprecated use surface.primary */
|
|
12
|
+
main: string;
|
|
13
|
+
/** @deprecated use surface.secondary */
|
|
14
|
+
dark: string;
|
|
15
|
+
/** @deprecated use surface.tertiary */
|
|
16
|
+
inverted: string;
|
|
17
|
+
};
|
|
18
|
+
primary: {
|
|
19
|
+
/** Hydro: #345370 */
|
|
20
|
+
light: string;
|
|
21
|
+
/** Hydro: #002b45 */
|
|
22
|
+
main: string;
|
|
23
|
+
/** Hydro: #00001e */
|
|
24
|
+
dark: string;
|
|
25
|
+
};
|
|
26
|
+
secondary: {
|
|
27
|
+
/** Hydro: #bbddf3 */
|
|
28
|
+
light: string;
|
|
29
|
+
/** Hydro: #49a2df */
|
|
30
|
+
main: string;
|
|
31
|
+
/** Hydro: #1874bc */
|
|
32
|
+
dark: string;
|
|
33
|
+
};
|
|
34
|
+
tertiary: {
|
|
35
|
+
/** Hydro: #ED8800 */
|
|
36
|
+
main: string;
|
|
37
|
+
/** Hydro: #e16900 */
|
|
38
|
+
dark: string;
|
|
39
|
+
};
|
|
40
|
+
status: {
|
|
41
|
+
/** Hydro: #002b45 */
|
|
42
|
+
info: string;
|
|
43
|
+
/** Hydro: #bbddf3 */
|
|
44
|
+
infomuted: string;
|
|
45
|
+
/** Hydro: #4caf50 */
|
|
46
|
+
success: string;
|
|
47
|
+
/** Hydro: #B8E0B9 */
|
|
48
|
+
successmuted: string;
|
|
49
|
+
/** Hydro: #ED8800 */
|
|
50
|
+
warning: string;
|
|
51
|
+
/** Hydro: #FFD399 */
|
|
52
|
+
warningmuted: string;
|
|
53
|
+
/** Hydro: #be1e2d */
|
|
54
|
+
alert: string;
|
|
55
|
+
/** Hydro: #F1A7AE */
|
|
56
|
+
alertmuted: string;
|
|
57
|
+
};
|
|
58
|
+
text: {
|
|
59
|
+
dark: {
|
|
60
|
+
/** Hydro: #4d4e4c */
|
|
61
|
+
primary: string;
|
|
62
|
+
/** Hydro: #4d4e4cb3 */
|
|
63
|
+
secondary: string;
|
|
64
|
+
/** Hydro: #4d4e4c4d */
|
|
65
|
+
disabled: string;
|
|
66
|
+
};
|
|
67
|
+
primary: {
|
|
68
|
+
/** Hydro: #002b45 */
|
|
69
|
+
primary: string;
|
|
70
|
+
/** Hydro: #002b45b3 */
|
|
71
|
+
secondary: string;
|
|
72
|
+
/** Hydro: #002b454d */
|
|
73
|
+
disabled: string;
|
|
74
|
+
};
|
|
75
|
+
secondary: {
|
|
76
|
+
/** Hydro: #49a2df */
|
|
77
|
+
primary: string;
|
|
78
|
+
/** Hydro: #49a2dfb3 */
|
|
79
|
+
secondary: string;
|
|
80
|
+
/** Hydro: #49a2df4d */
|
|
81
|
+
disabled: string;
|
|
82
|
+
};
|
|
83
|
+
light: {
|
|
84
|
+
/** Hydro: #ffffff */
|
|
85
|
+
primary: string;
|
|
86
|
+
/** Hydro: #ffffffb3 */
|
|
87
|
+
secondary: string;
|
|
88
|
+
/** Hydro: #ffffff4d */
|
|
89
|
+
disabled: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
divider: {
|
|
93
|
+
/** Hydro: #ffffff29 */
|
|
94
|
+
light: string;
|
|
95
|
+
/** Hydro: #4d4e4c29 */
|
|
96
|
+
dark: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export declare type ColorPalette = Colors;
|
|
100
|
+
export { hydro2 };
|
|
101
|
+
export { legacyColorPalette, legacyColors, legacyColors as colors, legacyColorPalette as colorPalette };
|
package/cjs/colors.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "colorPalette", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _legacy.legacyColorPalette;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "colors", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _legacy.legacyColors;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "hydro2", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _hydro.hydro2;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "legacyColorPalette", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _legacy.legacyColorPalette;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "legacyColors", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _legacy.legacyColors;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
var _hydro = require("./hydro2");
|
|
37
|
+
var _legacy = require("./legacy");
|
package/cjs/hydro2.d.ts
ADDED
package/cjs/hydro2.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.hydro2 = exports.default = void 0;
|
|
7
|
+
const hydro2 = {
|
|
8
|
+
surface: {
|
|
9
|
+
primary: '#FFFFFF',
|
|
10
|
+
secondary: '#eef0f1',
|
|
11
|
+
tertiary: '#002b45',
|
|
12
|
+
main: '#FFFFFF',
|
|
13
|
+
dark: '#eef0f1',
|
|
14
|
+
inverted: '#002b45'
|
|
15
|
+
},
|
|
16
|
+
primary: {
|
|
17
|
+
light: '#345370',
|
|
18
|
+
main: '#002b45',
|
|
19
|
+
dark: '#00001e'
|
|
20
|
+
},
|
|
21
|
+
secondary: {
|
|
22
|
+
light: '#bbddf3',
|
|
23
|
+
main: '#49a2df',
|
|
24
|
+
dark: '#1874bc'
|
|
25
|
+
},
|
|
26
|
+
tertiary: {
|
|
27
|
+
main: '#ED8800',
|
|
28
|
+
//TODO: Added this to not reference the status.warning color for Button color
|
|
29
|
+
dark: '#e16900'
|
|
30
|
+
},
|
|
31
|
+
status: {
|
|
32
|
+
info: '#002b45',
|
|
33
|
+
infomuted: '#bbddf3',
|
|
34
|
+
success: '#4caf50',
|
|
35
|
+
successmuted: '#B8E0B9',
|
|
36
|
+
warning: '#ED8800',
|
|
37
|
+
warningmuted: '#FFD399',
|
|
38
|
+
alert: '#be1e2d',
|
|
39
|
+
alertmuted: '#F1A7AE'
|
|
40
|
+
},
|
|
41
|
+
text: {
|
|
42
|
+
dark: {
|
|
43
|
+
primary: '#4d4e4c',
|
|
44
|
+
secondary: '#4d4e4cb3',
|
|
45
|
+
disabled: '#4d4e4c4d'
|
|
46
|
+
},
|
|
47
|
+
primary: {
|
|
48
|
+
primary: '#002b45',
|
|
49
|
+
secondary: '#002b45b3',
|
|
50
|
+
disabled: '#002b454d'
|
|
51
|
+
},
|
|
52
|
+
secondary: {
|
|
53
|
+
primary: '#49a2df',
|
|
54
|
+
secondary: '#49a2dfb3',
|
|
55
|
+
disabled: '#49a2df4d'
|
|
56
|
+
},
|
|
57
|
+
light: {
|
|
58
|
+
primary: '#ffffff',
|
|
59
|
+
secondary: '#ffffffb3',
|
|
60
|
+
disabled: '#ffffff4d'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
divider: {
|
|
64
|
+
light: '#ffffff29',
|
|
65
|
+
dark: '#4d4e4c29'
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.hydro2 = hydro2;
|
|
69
|
+
var _default = hydro2;
|
|
70
|
+
exports.default = _default;
|
package/cjs/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors';
|
package/cjs/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _colors = require("./colors");
|
|
7
|
+
Object.keys(_colors).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _colors[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _colors[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/cjs/legacy.d.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/** @deprecated */
|
|
2
|
+
export interface LegacyColors {
|
|
3
|
+
surface: {
|
|
4
|
+
/** @deprecated use surface.secondary */
|
|
5
|
+
backgroundGrey: string;
|
|
6
|
+
/** @deprecated use surface.primary */
|
|
7
|
+
white: string;
|
|
8
|
+
/** @deprecated use surface.secondary*/
|
|
9
|
+
whiteHover: string;
|
|
10
|
+
};
|
|
11
|
+
static: {
|
|
12
|
+
/** @deprecated use text.dark.primary */
|
|
13
|
+
textGrey: string;
|
|
14
|
+
/** @deprecated use text.dark.secondary */
|
|
15
|
+
textMedium: string;
|
|
16
|
+
/** @deprecated use text.dark.disabled */
|
|
17
|
+
textLight: string;
|
|
18
|
+
/** @deprecated use primary.main */
|
|
19
|
+
groupBlue: string;
|
|
20
|
+
/** @deprecated */
|
|
21
|
+
groupMedium: string;
|
|
22
|
+
/** @deprecated use primary.light */
|
|
23
|
+
groupLight: string;
|
|
24
|
+
};
|
|
25
|
+
interaction: {
|
|
26
|
+
/** @deprecated use secondary.main */
|
|
27
|
+
linkBlue: string;
|
|
28
|
+
/** @deprecated use secondary.dark */
|
|
29
|
+
linkHover: string;
|
|
30
|
+
/** @deprecated use secondary.main */
|
|
31
|
+
actionBlue: string;
|
|
32
|
+
/** @deprecated use secondary.dark */
|
|
33
|
+
actionHover: string;
|
|
34
|
+
/** @deprecated use secondary.light */
|
|
35
|
+
actionMedium: string;
|
|
36
|
+
/** @deprecated use secondary.light */
|
|
37
|
+
actionLight: string;
|
|
38
|
+
/** @deprecated use tertiary.main */
|
|
39
|
+
primaryOrange: string;
|
|
40
|
+
/** @deprecated use tertiary.dark */
|
|
41
|
+
primaryHover: string;
|
|
42
|
+
/** @deprecated use text.dark.secondary */
|
|
43
|
+
uiEnabled: string;
|
|
44
|
+
/** @deprecated use text.dark.disabled */
|
|
45
|
+
uiDisabled: string;
|
|
46
|
+
};
|
|
47
|
+
status: {
|
|
48
|
+
/** @deprecated use status.success */
|
|
49
|
+
yesGreen: string;
|
|
50
|
+
/** @deprecated use status.warning */
|
|
51
|
+
cautionAmber: string;
|
|
52
|
+
/** @deprecated use status.alert */
|
|
53
|
+
noRed: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** @deprecated */
|
|
57
|
+
export interface LegacyColorsFlat {
|
|
58
|
+
/** @deprecated use surface.secondary */
|
|
59
|
+
backgroundGrey: string;
|
|
60
|
+
/** @deprecated use surface.primary */
|
|
61
|
+
white: string;
|
|
62
|
+
/** @deprecated use surface.secondary*/
|
|
63
|
+
whiteHover: string;
|
|
64
|
+
/** @deprecated use text.dark.primary */
|
|
65
|
+
textGrey: string;
|
|
66
|
+
/** @deprecated use text.dark.secondary */
|
|
67
|
+
textMedium: string;
|
|
68
|
+
/** @deprecated use text.dark.disabled */
|
|
69
|
+
textLight: string;
|
|
70
|
+
/** @deprecated use primary.main */
|
|
71
|
+
groupBlue: string;
|
|
72
|
+
/** @deprecated */
|
|
73
|
+
groupMedium: string;
|
|
74
|
+
/** @deprecated use primary.light */
|
|
75
|
+
groupLight: string;
|
|
76
|
+
/** @deprecated use secondary.main */
|
|
77
|
+
linkBlue: string;
|
|
78
|
+
/** @deprecated use secondary.dark */
|
|
79
|
+
linkHover: string;
|
|
80
|
+
/** @deprecated use secondary.main */
|
|
81
|
+
actionBlue: string;
|
|
82
|
+
/** @deprecated use secondary.dark */
|
|
83
|
+
actionHover: string;
|
|
84
|
+
/** @deprecated use secondary.light */
|
|
85
|
+
actionMedium: string;
|
|
86
|
+
/** @deprecated use secondary.light */
|
|
87
|
+
actionLight: string;
|
|
88
|
+
/** @deprecated use tertiary.main */
|
|
89
|
+
primaryOrange: string;
|
|
90
|
+
/** @deprecated use tertiary.dark */
|
|
91
|
+
primaryHover: string;
|
|
92
|
+
/** @deprecated use text.dark.secondary */
|
|
93
|
+
uiEnabled: string;
|
|
94
|
+
/** @deprecated use text.dark.disabled */
|
|
95
|
+
uiDisabled: string;
|
|
96
|
+
/** @deprecated use status.success */
|
|
97
|
+
yesGreen: string;
|
|
98
|
+
/** @deprecated use status.warning */
|
|
99
|
+
cautionAmber: string;
|
|
100
|
+
/** @deprecated use status.alert */
|
|
101
|
+
noRed: string;
|
|
102
|
+
}
|
|
103
|
+
/** @deprecated */
|
|
104
|
+
export declare const legacyColorPalette: LegacyColors;
|
|
105
|
+
/** @deprecated */
|
|
106
|
+
export declare const legacyColors: {
|
|
107
|
+
/** @deprecated use status.success */
|
|
108
|
+
yesGreen: string;
|
|
109
|
+
/** @deprecated use status.warning */
|
|
110
|
+
cautionAmber: string;
|
|
111
|
+
/** @deprecated use status.alert */
|
|
112
|
+
noRed: string;
|
|
113
|
+
/** @deprecated use secondary.main */
|
|
114
|
+
linkBlue: string;
|
|
115
|
+
/** @deprecated use secondary.dark */
|
|
116
|
+
linkHover: string;
|
|
117
|
+
/** @deprecated use secondary.main */
|
|
118
|
+
actionBlue: string;
|
|
119
|
+
/** @deprecated use secondary.dark */
|
|
120
|
+
actionHover: string;
|
|
121
|
+
/** @deprecated use secondary.light */
|
|
122
|
+
actionMedium: string;
|
|
123
|
+
/** @deprecated use secondary.light */
|
|
124
|
+
actionLight: string;
|
|
125
|
+
/** @deprecated use tertiary.main */
|
|
126
|
+
primaryOrange: string;
|
|
127
|
+
/** @deprecated use tertiary.dark */
|
|
128
|
+
primaryHover: string;
|
|
129
|
+
/** @deprecated use text.dark.secondary */
|
|
130
|
+
uiEnabled: string;
|
|
131
|
+
/** @deprecated use text.dark.disabled */
|
|
132
|
+
uiDisabled: string;
|
|
133
|
+
/** @deprecated use text.dark.primary */
|
|
134
|
+
textGrey: string;
|
|
135
|
+
/** @deprecated use text.dark.secondary */
|
|
136
|
+
textMedium: string;
|
|
137
|
+
/** @deprecated use text.dark.disabled */
|
|
138
|
+
textLight: string;
|
|
139
|
+
/** @deprecated use primary.main */
|
|
140
|
+
groupBlue: string;
|
|
141
|
+
/** @deprecated */
|
|
142
|
+
groupMedium: string;
|
|
143
|
+
/** @deprecated use primary.light */
|
|
144
|
+
groupLight: string;
|
|
145
|
+
/** @deprecated use surface.secondary */
|
|
146
|
+
backgroundGrey: string;
|
|
147
|
+
/** @deprecated use surface.primary */
|
|
148
|
+
white: string;
|
|
149
|
+
/** @deprecated use surface.secondary*/
|
|
150
|
+
whiteHover: string;
|
|
151
|
+
};
|
package/cjs/legacy.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.legacyColors = exports.legacyColorPalette = void 0;
|
|
7
|
+
var _hydro = require("./hydro2");
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
const surface = _hydro.hydro2.surface,
|
|
12
|
+
primary = _hydro.hydro2.primary,
|
|
13
|
+
secondary = _hydro.hydro2.secondary,
|
|
14
|
+
tertiary = _hydro.hydro2.tertiary,
|
|
15
|
+
text = _hydro.hydro2.text,
|
|
16
|
+
status = _hydro.hydro2.status;
|
|
17
|
+
|
|
18
|
+
/** @deprecated */
|
|
19
|
+
|
|
20
|
+
/** @deprecated */
|
|
21
|
+
const legacyColorPalette = {
|
|
22
|
+
surface: {
|
|
23
|
+
backgroundGrey: surface.secondary,
|
|
24
|
+
// backgroundGrey.primary
|
|
25
|
+
white: surface.primary,
|
|
26
|
+
// white.primary
|
|
27
|
+
whiteHover: surface.secondary // backgroundGrey.hover
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
static: {
|
|
31
|
+
textGrey: text.dark.primary,
|
|
32
|
+
// textGrey.primary
|
|
33
|
+
textMedium: text.dark.secondary,
|
|
34
|
+
// textGrey.medium
|
|
35
|
+
textLight: text.dark.disabled,
|
|
36
|
+
// textGrey.light
|
|
37
|
+
groupBlue: primary.main,
|
|
38
|
+
// groupBlue.primary
|
|
39
|
+
groupMedium: primary.light,
|
|
40
|
+
// groupBlue.medium
|
|
41
|
+
groupLight: primary.light // groupBlue.light
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
interaction: {
|
|
45
|
+
linkBlue: secondary.main,
|
|
46
|
+
// linkBlue.primary
|
|
47
|
+
linkHover: secondary.dark,
|
|
48
|
+
// actionBlue.hover
|
|
49
|
+
actionBlue: secondary.main,
|
|
50
|
+
// actionBlue.primary
|
|
51
|
+
actionHover: secondary.dark,
|
|
52
|
+
// actionBlue.hover
|
|
53
|
+
actionMedium: secondary.light,
|
|
54
|
+
// actionBlue.medium
|
|
55
|
+
actionLight: secondary.light,
|
|
56
|
+
primaryOrange: tertiary.main,
|
|
57
|
+
// primaryOrange.primary
|
|
58
|
+
primaryHover: tertiary.dark,
|
|
59
|
+
// primaryOrange.hover
|
|
60
|
+
uiEnabled: text.dark.secondary,
|
|
61
|
+
uiDisabled: text.dark.disabled
|
|
62
|
+
},
|
|
63
|
+
status: {
|
|
64
|
+
yesGreen: status.success,
|
|
65
|
+
// new green
|
|
66
|
+
cautionAmber: status.warning,
|
|
67
|
+
// new yellow
|
|
68
|
+
noRed: status.alert // noRed.primary
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** @deprecated */
|
|
73
|
+
exports.legacyColorPalette = legacyColorPalette;
|
|
74
|
+
const legacyColors = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, legacyColorPalette.surface), legacyColorPalette.static), legacyColorPalette.interaction), legacyColorPalette.status);
|
|
75
|
+
exports.legacyColors = legacyColors;
|
package/colorMap.d.ts
ADDED
package/colorMap.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import hydro2 from './hydro2';
|
|
12
|
+
|
|
13
|
+
// TODO: Was annoying to type this function. Wait for typescript 4.1 and try again
|
|
14
|
+
// https://github.com/microsoft/TypeScript/pull/40002
|
|
15
|
+
var flatten = function flatten(object) {
|
|
16
|
+
var nestingSeparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';
|
|
17
|
+
var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
18
|
+
return Object.entries(object).reduce(function (acc, _ref) {
|
|
19
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
20
|
+
key = _ref2[0],
|
|
21
|
+
val = _ref2[1];
|
|
22
|
+
return _objectSpread(_objectSpread({}, acc), typeof val === 'string' ? _defineProperty({}, "".concat(prefix).concat(key), val) : _typeof(val) === 'object' ? flatten(val, nestingSeparator, "".concat(prefix).concat(key).concat(nestingSeparator)) : {});
|
|
23
|
+
}, {});
|
|
24
|
+
};
|
|
25
|
+
export default flatten(_objectSpread({}, hydro2));
|
package/colors.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { hydro2 } from './hydro2';
|
|
2
|
+
import { legacyColorPalette, legacyColors } from './legacy';
|
|
3
|
+
export interface Colors {
|
|
4
|
+
surface: {
|
|
5
|
+
/** Hydro: #FFFFFF */
|
|
6
|
+
primary: string;
|
|
7
|
+
/** Hydro: #eef0f1 */
|
|
8
|
+
secondary: string;
|
|
9
|
+
/** Hydro: #002b45 */
|
|
10
|
+
tertiary: string;
|
|
11
|
+
/** @deprecated use surface.primary */
|
|
12
|
+
main: string;
|
|
13
|
+
/** @deprecated use surface.secondary */
|
|
14
|
+
dark: string;
|
|
15
|
+
/** @deprecated use surface.tertiary */
|
|
16
|
+
inverted: string;
|
|
17
|
+
};
|
|
18
|
+
primary: {
|
|
19
|
+
/** Hydro: #345370 */
|
|
20
|
+
light: string;
|
|
21
|
+
/** Hydro: #002b45 */
|
|
22
|
+
main: string;
|
|
23
|
+
/** Hydro: #00001e */
|
|
24
|
+
dark: string;
|
|
25
|
+
};
|
|
26
|
+
secondary: {
|
|
27
|
+
/** Hydro: #bbddf3 */
|
|
28
|
+
light: string;
|
|
29
|
+
/** Hydro: #49a2df */
|
|
30
|
+
main: string;
|
|
31
|
+
/** Hydro: #1874bc */
|
|
32
|
+
dark: string;
|
|
33
|
+
};
|
|
34
|
+
tertiary: {
|
|
35
|
+
/** Hydro: #ED8800 */
|
|
36
|
+
main: string;
|
|
37
|
+
/** Hydro: #e16900 */
|
|
38
|
+
dark: string;
|
|
39
|
+
};
|
|
40
|
+
status: {
|
|
41
|
+
/** Hydro: #002b45 */
|
|
42
|
+
info: string;
|
|
43
|
+
/** Hydro: #bbddf3 */
|
|
44
|
+
infomuted: string;
|
|
45
|
+
/** Hydro: #4caf50 */
|
|
46
|
+
success: string;
|
|
47
|
+
/** Hydro: #B8E0B9 */
|
|
48
|
+
successmuted: string;
|
|
49
|
+
/** Hydro: #ED8800 */
|
|
50
|
+
warning: string;
|
|
51
|
+
/** Hydro: #FFD399 */
|
|
52
|
+
warningmuted: string;
|
|
53
|
+
/** Hydro: #be1e2d */
|
|
54
|
+
alert: string;
|
|
55
|
+
/** Hydro: #F1A7AE */
|
|
56
|
+
alertmuted: string;
|
|
57
|
+
};
|
|
58
|
+
text: {
|
|
59
|
+
dark: {
|
|
60
|
+
/** Hydro: #4d4e4c */
|
|
61
|
+
primary: string;
|
|
62
|
+
/** Hydro: #4d4e4cb3 */
|
|
63
|
+
secondary: string;
|
|
64
|
+
/** Hydro: #4d4e4c4d */
|
|
65
|
+
disabled: string;
|
|
66
|
+
};
|
|
67
|
+
primary: {
|
|
68
|
+
/** Hydro: #002b45 */
|
|
69
|
+
primary: string;
|
|
70
|
+
/** Hydro: #002b45b3 */
|
|
71
|
+
secondary: string;
|
|
72
|
+
/** Hydro: #002b454d */
|
|
73
|
+
disabled: string;
|
|
74
|
+
};
|
|
75
|
+
secondary: {
|
|
76
|
+
/** Hydro: #49a2df */
|
|
77
|
+
primary: string;
|
|
78
|
+
/** Hydro: #49a2dfb3 */
|
|
79
|
+
secondary: string;
|
|
80
|
+
/** Hydro: #49a2df4d */
|
|
81
|
+
disabled: string;
|
|
82
|
+
};
|
|
83
|
+
light: {
|
|
84
|
+
/** Hydro: #ffffff */
|
|
85
|
+
primary: string;
|
|
86
|
+
/** Hydro: #ffffffb3 */
|
|
87
|
+
secondary: string;
|
|
88
|
+
/** Hydro: #ffffff4d */
|
|
89
|
+
disabled: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
divider: {
|
|
93
|
+
/** Hydro: #ffffff29 */
|
|
94
|
+
light: string;
|
|
95
|
+
/** Hydro: #4d4e4c29 */
|
|
96
|
+
dark: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export declare type ColorPalette = Colors;
|
|
100
|
+
export { hydro2 };
|
|
101
|
+
export { legacyColorPalette, legacyColors, legacyColors as colors, legacyColorPalette as colorPalette };
|
package/colors.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { hydro2 } from './hydro2';
|
|
2
|
+
import { legacyColorPalette, legacyColors } from './legacy';
|
|
3
|
+
export { hydro2 };
|
|
4
|
+
|
|
5
|
+
// Legacy exports
|
|
6
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
7
|
+
export { legacyColorPalette, legacyColors, legacyColors as colors, legacyColorPalette as colorPalette };
|
package/css/colors.css
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */
|
|
2
|
+
:root {
|
|
3
|
+
/* surface */
|
|
4
|
+
--color-background-grey: #eef0f1;
|
|
5
|
+
--color-background-grey-rgb: 238, 240, 241;
|
|
6
|
+
|
|
7
|
+
--color-white: #ffffff;
|
|
8
|
+
--color-white-rgb: 255, 255, 255;
|
|
9
|
+
|
|
10
|
+
--color-white-hover: #eef0f1;
|
|
11
|
+
--color-white-hover-rgb: 238, 240, 241;
|
|
12
|
+
|
|
13
|
+
/* static */
|
|
14
|
+
--color-text-grey: #4d4e4c;
|
|
15
|
+
--color-text-grey-rgb: 77, 78, 76;
|
|
16
|
+
|
|
17
|
+
--color-text-medium: #4d4e4cb3;
|
|
18
|
+
--color-text-medium-rgb: 77, 78, 76;
|
|
19
|
+
|
|
20
|
+
--color-text-light: #4d4e4c4d;
|
|
21
|
+
--color-text-light-rgb: 77, 78, 76;
|
|
22
|
+
|
|
23
|
+
--color-group-blue: #002b45;
|
|
24
|
+
--color-group-blue-rgb: 0, 43, 69;
|
|
25
|
+
|
|
26
|
+
--color-group-medium: #345370;
|
|
27
|
+
--color-group-medium-rgb: 52, 83, 112;
|
|
28
|
+
|
|
29
|
+
--color-group-light: #345370;
|
|
30
|
+
--color-group-light-rgb: 52, 83, 112;
|
|
31
|
+
|
|
32
|
+
/* interaction */
|
|
33
|
+
--color-link-blue: #49a2df;
|
|
34
|
+
--color-link-blue-rgb: 73, 162, 223;
|
|
35
|
+
|
|
36
|
+
--color-link-hover: #1874bc;
|
|
37
|
+
--color-link-hover-rgb: 24, 116, 188;
|
|
38
|
+
|
|
39
|
+
--color-action-blue: #49a2df;
|
|
40
|
+
--color-action-blue-rgb: 73, 162, 223;
|
|
41
|
+
|
|
42
|
+
--color-action-hover: #1874bc;
|
|
43
|
+
--color-action-hover-rgb: 24, 116, 188;
|
|
44
|
+
|
|
45
|
+
--color-action-medium: #bbddf3;
|
|
46
|
+
--color-action-medium-rgb: 187, 221, 243;
|
|
47
|
+
|
|
48
|
+
--color-action-light: #bbddf3;
|
|
49
|
+
--color-action-light-rgb: 187, 221, 243;
|
|
50
|
+
|
|
51
|
+
--color-primary-orange: #ed8800;
|
|
52
|
+
--color-primary-orange-rgb: 237, 136, 0;
|
|
53
|
+
|
|
54
|
+
--color-primary-hover: #e16900;
|
|
55
|
+
--color-primary-hover-rgb: 225, 105, 0;
|
|
56
|
+
|
|
57
|
+
--color-ui-enabled: #4d4e4cb3;
|
|
58
|
+
--color-ui-enabled-rgb: 77, 78, 76;
|
|
59
|
+
|
|
60
|
+
--color-ui-disabled: #4d4e4c4d;
|
|
61
|
+
--color-ui-disabled-rgb: 77, 78, 76;
|
|
62
|
+
|
|
63
|
+
/* status */
|
|
64
|
+
--color-yes-green: #4caf50;
|
|
65
|
+
--color-yes-green-rgb: 76, 175, 80;
|
|
66
|
+
|
|
67
|
+
--color-caution-amber: #ed8800;
|
|
68
|
+
--color-caution-amber-rgb: 237, 136, 0;
|
|
69
|
+
|
|
70
|
+
--color-no-red: #be1e2d;
|
|
71
|
+
--color-no-red-rgb: 190, 30, 45;
|
|
72
|
+
}
|
package/hydro2.d.ts
ADDED
package/hydro2.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export var hydro2 = {
|
|
2
|
+
surface: {
|
|
3
|
+
primary: '#FFFFFF',
|
|
4
|
+
secondary: '#eef0f1',
|
|
5
|
+
tertiary: '#002b45',
|
|
6
|
+
main: '#FFFFFF',
|
|
7
|
+
dark: '#eef0f1',
|
|
8
|
+
inverted: '#002b45'
|
|
9
|
+
},
|
|
10
|
+
primary: {
|
|
11
|
+
light: '#345370',
|
|
12
|
+
main: '#002b45',
|
|
13
|
+
dark: '#00001e'
|
|
14
|
+
},
|
|
15
|
+
secondary: {
|
|
16
|
+
light: '#bbddf3',
|
|
17
|
+
main: '#49a2df',
|
|
18
|
+
dark: '#1874bc'
|
|
19
|
+
},
|
|
20
|
+
tertiary: {
|
|
21
|
+
main: '#ED8800',
|
|
22
|
+
//TODO: Added this to not reference the status.warning color for Button color
|
|
23
|
+
dark: '#e16900'
|
|
24
|
+
},
|
|
25
|
+
status: {
|
|
26
|
+
info: '#002b45',
|
|
27
|
+
infomuted: '#bbddf3',
|
|
28
|
+
success: '#4caf50',
|
|
29
|
+
successmuted: '#B8E0B9',
|
|
30
|
+
warning: '#ED8800',
|
|
31
|
+
warningmuted: '#FFD399',
|
|
32
|
+
alert: '#be1e2d',
|
|
33
|
+
alertmuted: '#F1A7AE'
|
|
34
|
+
},
|
|
35
|
+
text: {
|
|
36
|
+
dark: {
|
|
37
|
+
primary: '#4d4e4c',
|
|
38
|
+
secondary: '#4d4e4cb3',
|
|
39
|
+
disabled: '#4d4e4c4d'
|
|
40
|
+
},
|
|
41
|
+
primary: {
|
|
42
|
+
primary: '#002b45',
|
|
43
|
+
secondary: '#002b45b3',
|
|
44
|
+
disabled: '#002b454d'
|
|
45
|
+
},
|
|
46
|
+
secondary: {
|
|
47
|
+
primary: '#49a2df',
|
|
48
|
+
secondary: '#49a2dfb3',
|
|
49
|
+
disabled: '#49a2df4d'
|
|
50
|
+
},
|
|
51
|
+
light: {
|
|
52
|
+
primary: '#ffffff',
|
|
53
|
+
secondary: '#ffffffb3',
|
|
54
|
+
disabled: '#ffffff4d'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
divider: {
|
|
58
|
+
light: '#ffffff29',
|
|
59
|
+
dark: '#4d4e4c29'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
export default hydro2;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors';
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors';
|
package/legacy.d.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/** @deprecated */
|
|
2
|
+
export interface LegacyColors {
|
|
3
|
+
surface: {
|
|
4
|
+
/** @deprecated use surface.secondary */
|
|
5
|
+
backgroundGrey: string;
|
|
6
|
+
/** @deprecated use surface.primary */
|
|
7
|
+
white: string;
|
|
8
|
+
/** @deprecated use surface.secondary*/
|
|
9
|
+
whiteHover: string;
|
|
10
|
+
};
|
|
11
|
+
static: {
|
|
12
|
+
/** @deprecated use text.dark.primary */
|
|
13
|
+
textGrey: string;
|
|
14
|
+
/** @deprecated use text.dark.secondary */
|
|
15
|
+
textMedium: string;
|
|
16
|
+
/** @deprecated use text.dark.disabled */
|
|
17
|
+
textLight: string;
|
|
18
|
+
/** @deprecated use primary.main */
|
|
19
|
+
groupBlue: string;
|
|
20
|
+
/** @deprecated */
|
|
21
|
+
groupMedium: string;
|
|
22
|
+
/** @deprecated use primary.light */
|
|
23
|
+
groupLight: string;
|
|
24
|
+
};
|
|
25
|
+
interaction: {
|
|
26
|
+
/** @deprecated use secondary.main */
|
|
27
|
+
linkBlue: string;
|
|
28
|
+
/** @deprecated use secondary.dark */
|
|
29
|
+
linkHover: string;
|
|
30
|
+
/** @deprecated use secondary.main */
|
|
31
|
+
actionBlue: string;
|
|
32
|
+
/** @deprecated use secondary.dark */
|
|
33
|
+
actionHover: string;
|
|
34
|
+
/** @deprecated use secondary.light */
|
|
35
|
+
actionMedium: string;
|
|
36
|
+
/** @deprecated use secondary.light */
|
|
37
|
+
actionLight: string;
|
|
38
|
+
/** @deprecated use tertiary.main */
|
|
39
|
+
primaryOrange: string;
|
|
40
|
+
/** @deprecated use tertiary.dark */
|
|
41
|
+
primaryHover: string;
|
|
42
|
+
/** @deprecated use text.dark.secondary */
|
|
43
|
+
uiEnabled: string;
|
|
44
|
+
/** @deprecated use text.dark.disabled */
|
|
45
|
+
uiDisabled: string;
|
|
46
|
+
};
|
|
47
|
+
status: {
|
|
48
|
+
/** @deprecated use status.success */
|
|
49
|
+
yesGreen: string;
|
|
50
|
+
/** @deprecated use status.warning */
|
|
51
|
+
cautionAmber: string;
|
|
52
|
+
/** @deprecated use status.alert */
|
|
53
|
+
noRed: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** @deprecated */
|
|
57
|
+
export interface LegacyColorsFlat {
|
|
58
|
+
/** @deprecated use surface.secondary */
|
|
59
|
+
backgroundGrey: string;
|
|
60
|
+
/** @deprecated use surface.primary */
|
|
61
|
+
white: string;
|
|
62
|
+
/** @deprecated use surface.secondary*/
|
|
63
|
+
whiteHover: string;
|
|
64
|
+
/** @deprecated use text.dark.primary */
|
|
65
|
+
textGrey: string;
|
|
66
|
+
/** @deprecated use text.dark.secondary */
|
|
67
|
+
textMedium: string;
|
|
68
|
+
/** @deprecated use text.dark.disabled */
|
|
69
|
+
textLight: string;
|
|
70
|
+
/** @deprecated use primary.main */
|
|
71
|
+
groupBlue: string;
|
|
72
|
+
/** @deprecated */
|
|
73
|
+
groupMedium: string;
|
|
74
|
+
/** @deprecated use primary.light */
|
|
75
|
+
groupLight: string;
|
|
76
|
+
/** @deprecated use secondary.main */
|
|
77
|
+
linkBlue: string;
|
|
78
|
+
/** @deprecated use secondary.dark */
|
|
79
|
+
linkHover: string;
|
|
80
|
+
/** @deprecated use secondary.main */
|
|
81
|
+
actionBlue: string;
|
|
82
|
+
/** @deprecated use secondary.dark */
|
|
83
|
+
actionHover: string;
|
|
84
|
+
/** @deprecated use secondary.light */
|
|
85
|
+
actionMedium: string;
|
|
86
|
+
/** @deprecated use secondary.light */
|
|
87
|
+
actionLight: string;
|
|
88
|
+
/** @deprecated use tertiary.main */
|
|
89
|
+
primaryOrange: string;
|
|
90
|
+
/** @deprecated use tertiary.dark */
|
|
91
|
+
primaryHover: string;
|
|
92
|
+
/** @deprecated use text.dark.secondary */
|
|
93
|
+
uiEnabled: string;
|
|
94
|
+
/** @deprecated use text.dark.disabled */
|
|
95
|
+
uiDisabled: string;
|
|
96
|
+
/** @deprecated use status.success */
|
|
97
|
+
yesGreen: string;
|
|
98
|
+
/** @deprecated use status.warning */
|
|
99
|
+
cautionAmber: string;
|
|
100
|
+
/** @deprecated use status.alert */
|
|
101
|
+
noRed: string;
|
|
102
|
+
}
|
|
103
|
+
/** @deprecated */
|
|
104
|
+
export declare const legacyColorPalette: LegacyColors;
|
|
105
|
+
/** @deprecated */
|
|
106
|
+
export declare const legacyColors: {
|
|
107
|
+
/** @deprecated use status.success */
|
|
108
|
+
yesGreen: string;
|
|
109
|
+
/** @deprecated use status.warning */
|
|
110
|
+
cautionAmber: string;
|
|
111
|
+
/** @deprecated use status.alert */
|
|
112
|
+
noRed: string;
|
|
113
|
+
/** @deprecated use secondary.main */
|
|
114
|
+
linkBlue: string;
|
|
115
|
+
/** @deprecated use secondary.dark */
|
|
116
|
+
linkHover: string;
|
|
117
|
+
/** @deprecated use secondary.main */
|
|
118
|
+
actionBlue: string;
|
|
119
|
+
/** @deprecated use secondary.dark */
|
|
120
|
+
actionHover: string;
|
|
121
|
+
/** @deprecated use secondary.light */
|
|
122
|
+
actionMedium: string;
|
|
123
|
+
/** @deprecated use secondary.light */
|
|
124
|
+
actionLight: string;
|
|
125
|
+
/** @deprecated use tertiary.main */
|
|
126
|
+
primaryOrange: string;
|
|
127
|
+
/** @deprecated use tertiary.dark */
|
|
128
|
+
primaryHover: string;
|
|
129
|
+
/** @deprecated use text.dark.secondary */
|
|
130
|
+
uiEnabled: string;
|
|
131
|
+
/** @deprecated use text.dark.disabled */
|
|
132
|
+
uiDisabled: string;
|
|
133
|
+
/** @deprecated use text.dark.primary */
|
|
134
|
+
textGrey: string;
|
|
135
|
+
/** @deprecated use text.dark.secondary */
|
|
136
|
+
textMedium: string;
|
|
137
|
+
/** @deprecated use text.dark.disabled */
|
|
138
|
+
textLight: string;
|
|
139
|
+
/** @deprecated use primary.main */
|
|
140
|
+
groupBlue: string;
|
|
141
|
+
/** @deprecated */
|
|
142
|
+
groupMedium: string;
|
|
143
|
+
/** @deprecated use primary.light */
|
|
144
|
+
groupLight: string;
|
|
145
|
+
/** @deprecated use surface.secondary */
|
|
146
|
+
backgroundGrey: string;
|
|
147
|
+
/** @deprecated use surface.primary */
|
|
148
|
+
white: string;
|
|
149
|
+
/** @deprecated use surface.secondary*/
|
|
150
|
+
whiteHover: string;
|
|
151
|
+
};
|
package/legacy.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
/* eslint-disable deprecation/deprecation */
|
|
5
|
+
import { hydro2 } from './hydro2';
|
|
6
|
+
var surface = hydro2.surface,
|
|
7
|
+
primary = hydro2.primary,
|
|
8
|
+
secondary = hydro2.secondary,
|
|
9
|
+
tertiary = hydro2.tertiary,
|
|
10
|
+
text = hydro2.text,
|
|
11
|
+
status = hydro2.status;
|
|
12
|
+
|
|
13
|
+
/** @deprecated */
|
|
14
|
+
|
|
15
|
+
/** @deprecated */
|
|
16
|
+
export var legacyColorPalette = {
|
|
17
|
+
surface: {
|
|
18
|
+
backgroundGrey: surface.secondary,
|
|
19
|
+
// backgroundGrey.primary
|
|
20
|
+
white: surface.primary,
|
|
21
|
+
// white.primary
|
|
22
|
+
whiteHover: surface.secondary // backgroundGrey.hover
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"static": {
|
|
26
|
+
textGrey: text.dark.primary,
|
|
27
|
+
// textGrey.primary
|
|
28
|
+
textMedium: text.dark.secondary,
|
|
29
|
+
// textGrey.medium
|
|
30
|
+
textLight: text.dark.disabled,
|
|
31
|
+
// textGrey.light
|
|
32
|
+
groupBlue: primary.main,
|
|
33
|
+
// groupBlue.primary
|
|
34
|
+
groupMedium: primary.light,
|
|
35
|
+
// groupBlue.medium
|
|
36
|
+
groupLight: primary.light // groupBlue.light
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
interaction: {
|
|
40
|
+
linkBlue: secondary.main,
|
|
41
|
+
// linkBlue.primary
|
|
42
|
+
linkHover: secondary.dark,
|
|
43
|
+
// actionBlue.hover
|
|
44
|
+
actionBlue: secondary.main,
|
|
45
|
+
// actionBlue.primary
|
|
46
|
+
actionHover: secondary.dark,
|
|
47
|
+
// actionBlue.hover
|
|
48
|
+
actionMedium: secondary.light,
|
|
49
|
+
// actionBlue.medium
|
|
50
|
+
actionLight: secondary.light,
|
|
51
|
+
primaryOrange: tertiary.main,
|
|
52
|
+
// primaryOrange.primary
|
|
53
|
+
primaryHover: tertiary.dark,
|
|
54
|
+
// primaryOrange.hover
|
|
55
|
+
uiEnabled: text.dark.secondary,
|
|
56
|
+
uiDisabled: text.dark.disabled
|
|
57
|
+
},
|
|
58
|
+
status: {
|
|
59
|
+
yesGreen: status.success,
|
|
60
|
+
// new green
|
|
61
|
+
cautionAmber: status.warning,
|
|
62
|
+
// new yellow
|
|
63
|
+
noRed: status.alert // noRed.primary
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @deprecated */
|
|
68
|
+
export var legacyColors = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, legacyColorPalette.surface), legacyColorPalette["static"]), legacyColorPalette.interaction), legacyColorPalette.status);
|
package/package.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"description": "Shared colors within DFDS",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "2.0.8-alpha.
|
|
6
|
+
"version": "2.0.8-alpha.be86dfcc",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./cjs/index.js",
|
|
9
9
|
"module": "./index.js",
|
|
10
10
|
"typings": "./index.d.ts",
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "be86dfccedbe4af7fcf3319d02c95cde5e3de599",
|
|
12
12
|
"esnext": "",
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
package/sass/colors.scss
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */
|
|
2
|
+
/* surface */
|
|
3
|
+
$color-background-grey: #eef0f1 !default;
|
|
4
|
+
$color-white: #ffffff !default;
|
|
5
|
+
$color-white-hover: #eef0f1 !default;
|
|
6
|
+
/* static */
|
|
7
|
+
$color-text-grey: #4d4e4c !default;
|
|
8
|
+
$color-text-medium: #4d4e4cb3 !default;
|
|
9
|
+
$color-text-light: #4d4e4c4d !default;
|
|
10
|
+
$color-group-blue: #002b45 !default;
|
|
11
|
+
$color-group-medium: #345370 !default;
|
|
12
|
+
$color-group-light: #345370 !default;
|
|
13
|
+
/* interaction */
|
|
14
|
+
$color-link-blue: #49a2df !default;
|
|
15
|
+
$color-link-hover: #1874bc !default;
|
|
16
|
+
$color-action-blue: #49a2df !default;
|
|
17
|
+
$color-action-hover: #1874bc !default;
|
|
18
|
+
$color-action-medium: #bbddf3 !default;
|
|
19
|
+
$color-action-light: #bbddf3 !default;
|
|
20
|
+
$color-primary-orange: #ed8800 !default;
|
|
21
|
+
$color-primary-hover: #e16900 !default;
|
|
22
|
+
$color-ui-enabled: #4d4e4cb3 !default;
|
|
23
|
+
$color-ui-disabled: #4d4e4c4d !default;
|
|
24
|
+
/* status */
|
|
25
|
+
$color-yes-green: #4caf50 !default;
|
|
26
|
+
$color-caution-amber: #ed8800 !default;
|
|
27
|
+
$color-no-red: #be1e2d !default;
|