@dfds-ui/colors 2.2.0-alpha.6caab7fc → 2.2.0-alpha.74ddaa53
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.js +2 -3
- package/cjs/hydro2.js +2 -4
- package/cjs/legacy.js +3 -5
- package/colorMap.js +5 -5
- package/package.json +2 -2
- package/css/colors.css +0 -72
- package/sass/colors.scss +0 -27
package/cjs/colorMap.js
CHANGED
|
@@ -14,7 +14,6 @@ const flatten = (object, nestingSeparator = '-', prefix = '') => Object.entries(
|
|
|
14
14
|
[`${prefix}${key}`]: val
|
|
15
15
|
} : typeof val === 'object' ? flatten(val, nestingSeparator, `${prefix}${key}${nestingSeparator}`) : {})
|
|
16
16
|
}), {});
|
|
17
|
-
var _default = flatten({
|
|
17
|
+
var _default = exports.default = flatten({
|
|
18
18
|
..._hydro.default
|
|
19
|
-
});
|
|
20
|
-
exports.default = _default;
|
|
19
|
+
});
|
package/cjs/hydro2.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.hydro2 = exports.default = void 0;
|
|
7
|
-
const hydro2 = {
|
|
7
|
+
const hydro2 = exports.hydro2 = {
|
|
8
8
|
surface: {
|
|
9
9
|
primary: '#FFFFFF',
|
|
10
10
|
secondary: '#eef0f1',
|
|
@@ -65,6 +65,4 @@ const hydro2 = {
|
|
|
65
65
|
dark: '#4d4e4c29'
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
exports.
|
|
69
|
-
var _default = hydro2;
|
|
70
|
-
exports.default = _default;
|
|
68
|
+
var _default = exports.default = hydro2;
|
package/cjs/legacy.js
CHANGED
|
@@ -21,7 +21,7 @@ const {
|
|
|
21
21
|
/** @deprecated */
|
|
22
22
|
|
|
23
23
|
/** @deprecated */
|
|
24
|
-
const legacyColorPalette = {
|
|
24
|
+
const legacyColorPalette = exports.legacyColorPalette = {
|
|
25
25
|
surface: {
|
|
26
26
|
backgroundGrey: surface.secondary,
|
|
27
27
|
// backgroundGrey.primary
|
|
@@ -71,11 +71,9 @@ const legacyColorPalette = {
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
/** @deprecated */
|
|
74
|
-
exports.
|
|
75
|
-
const legacyColors = {
|
|
74
|
+
const legacyColors = exports.legacyColors = {
|
|
76
75
|
...legacyColorPalette.surface,
|
|
77
76
|
...legacyColorPalette.static,
|
|
78
77
|
...legacyColorPalette.interaction,
|
|
79
78
|
...legacyColorPalette.status
|
|
80
|
-
};
|
|
81
|
-
exports.legacyColors = legacyColors;
|
|
79
|
+
};
|
package/colorMap.js
CHANGED
|
@@ -7,21 +7,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
8
|
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."); }
|
|
9
9
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++)
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0)
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
13
|
import hydro2 from './hydro2';
|
|
14
14
|
|
|
15
15
|
// TODO: Was annoying to type this function. Wait for typescript 4.1 and try again
|
|
16
16
|
// https://github.com/microsoft/TypeScript/pull/40002
|
|
17
|
-
var
|
|
17
|
+
var _flatten = function flatten(object) {
|
|
18
18
|
var nestingSeparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';
|
|
19
19
|
var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
20
20
|
return Object.entries(object).reduce(function (acc, _ref) {
|
|
21
21
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
22
22
|
key = _ref2[0],
|
|
23
23
|
val = _ref2[1];
|
|
24
|
-
return _objectSpread(_objectSpread({}, acc), typeof val === 'string' ? _defineProperty({}, "".concat(prefix).concat(key), val) : _typeof(val) === 'object' ?
|
|
24
|
+
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)) : {});
|
|
25
25
|
}, {});
|
|
26
26
|
};
|
|
27
|
-
export default
|
|
27
|
+
export default _flatten(_objectSpread({}, hydro2));
|
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.2.0-alpha.
|
|
6
|
+
"version": "2.2.0-alpha.74ddaa53",
|
|
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": "74ddaa53cb79230768b22b1caf6fc5c70565563e",
|
|
12
12
|
"esnext": "",
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
package/css/colors.css
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
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/sass/colors.scss
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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;
|