@dfds-ui/colors 2.0.29-alpha.9a0ea182 → 2.0.29-alpha.a929e61e
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 -1
- package/cjs/colors.d.ts +1 -1
- package/cjs/hydro2.js +4 -2
- package/cjs/legacy.js +4 -2
- package/colorMap.js +5 -5
- package/colors.d.ts +1 -1
- package/package.json +2 -6
package/cjs/colorMap.js
CHANGED
|
@@ -16,4 +16,5 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
16
16
|
const flatten = (object, nestingSeparator = '-', prefix = '') => Object.entries(object).reduce((acc, [key, val]) => _objectSpread(_objectSpread({}, acc), typeof val === 'string' ? {
|
|
17
17
|
[`${prefix}${key}`]: val
|
|
18
18
|
} : typeof val === 'object' ? flatten(val, nestingSeparator, `${prefix}${key}${nestingSeparator}`) : {}), {});
|
|
19
|
-
var _default =
|
|
19
|
+
var _default = flatten(_objectSpread({}, _hydro.default));
|
|
20
|
+
exports.default = _default;
|
package/cjs/colors.d.ts
CHANGED
|
@@ -96,6 +96,6 @@ export interface Colors {
|
|
|
96
96
|
dark: string;
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
export type ColorPalette = Colors;
|
|
99
|
+
export declare type ColorPalette = Colors;
|
|
100
100
|
export { hydro2 };
|
|
101
101
|
export { legacyColorPalette, legacyColors, legacyColors as colors, legacyColorPalette as colorPalette };
|
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 = {
|
|
8
8
|
surface: {
|
|
9
9
|
primary: '#FFFFFF',
|
|
10
10
|
secondary: '#eef0f1',
|
|
@@ -65,4 +65,6 @@ const hydro2 = exports.hydro2 = {
|
|
|
65
65
|
dark: '#4d4e4c29'
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
exports.hydro2 = hydro2;
|
|
69
|
+
var _default = hydro2;
|
|
70
|
+
exports.default = _default;
|
package/cjs/legacy.js
CHANGED
|
@@ -22,7 +22,7 @@ const surface = _hydro.hydro2.surface,
|
|
|
22
22
|
/** @deprecated */
|
|
23
23
|
|
|
24
24
|
/** @deprecated */
|
|
25
|
-
const legacyColorPalette =
|
|
25
|
+
const legacyColorPalette = {
|
|
26
26
|
surface: {
|
|
27
27
|
backgroundGrey: surface.secondary,
|
|
28
28
|
// backgroundGrey.primary
|
|
@@ -72,4 +72,6 @@ const legacyColorPalette = exports.legacyColorPalette = {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
/** @deprecated */
|
|
75
|
-
|
|
75
|
+
exports.legacyColorPalette = legacyColorPalette;
|
|
76
|
+
const legacyColors = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, legacyColorPalette.surface), legacyColorPalette.static), legacyColorPalette.interaction), legacyColorPalette.status);
|
|
77
|
+
exports.legacyColors = legacyColors;
|
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++) 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; } }
|
|
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/colors.d.ts
CHANGED
|
@@ -96,6 +96,6 @@ export interface Colors {
|
|
|
96
96
|
dark: string;
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
export type ColorPalette = Colors;
|
|
99
|
+
export declare type ColorPalette = Colors;
|
|
100
100
|
export { hydro2 };
|
|
101
101
|
export { legacyColorPalette, legacyColors, legacyColors as colors, legacyColorPalette as colorPalette };
|
package/package.json
CHANGED
|
@@ -3,16 +3,12 @@
|
|
|
3
3
|
"description": "Shared colors within DFDS",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "2.0.29-alpha.
|
|
6
|
+
"version": "2.0.29-alpha.a929e61e",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./cjs/index.js",
|
|
9
9
|
"module": "./index.js",
|
|
10
10
|
"typings": "./index.d.ts",
|
|
11
|
-
"
|
|
12
|
-
"@types/react-syntax-highlighter": "^15.5.13",
|
|
13
|
-
"react-syntax-highlighter": "^15.6.6"
|
|
14
|
-
},
|
|
15
|
-
"gitHead": "9a0ea1821df447249363a38ea548ce565163e1c3",
|
|
11
|
+
"gitHead": "a929e61e7897d8b846ea8a930e2b5d97727964a6",
|
|
16
12
|
"esnext": "",
|
|
17
13
|
"publishConfig": {
|
|
18
14
|
"access": "public"
|