@dfds-ui/colors 2.2.0-alpha.eae7bbcd → 2.2.0-alpha.f7123bed
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/colors.d.ts +1 -1
- package/cjs/hydro2.js +2 -4
- package/cjs/legacy.js +4 -6
- package/colorMap.js +5 -5
- package/colors.d.ts +1 -1
- package/colors.js +1 -1
- package/legacy.js +1 -1
- package/package.json +2 -2
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/colors.d.ts
CHANGED
|
@@ -96,6 +96,6 @@ export interface Colors {
|
|
|
96
96
|
dark: string;
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
export
|
|
99
|
+
export 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 = 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
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.legacyColors = exports.legacyColorPalette = void 0;
|
|
7
7
|
var _hydro = require("./hydro2");
|
|
8
|
-
/* eslint-disable
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
9
9
|
|
|
10
10
|
const {
|
|
11
11
|
surface,
|
|
@@ -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/colors.d.ts
CHANGED
|
@@ -96,6 +96,6 @@ export interface Colors {
|
|
|
96
96
|
dark: string;
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
export
|
|
99
|
+
export type ColorPalette = Colors;
|
|
100
100
|
export { hydro2 };
|
|
101
101
|
export { legacyColorPalette, legacyColors, legacyColors as colors, legacyColorPalette as colorPalette };
|
package/colors.js
CHANGED
|
@@ -3,5 +3,5 @@ import { legacyColorPalette, legacyColors } from './legacy';
|
|
|
3
3
|
export { hydro2 };
|
|
4
4
|
|
|
5
5
|
// Legacy exports
|
|
6
|
-
// eslint-disable-next-line
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
7
7
|
export { legacyColorPalette, legacyColors, legacyColors as colors, legacyColorPalette as colorPalette };
|
package/legacy.js
CHANGED
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
/* eslint-disable
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
8
8
|
import { hydro2 } from './hydro2';
|
|
9
9
|
var surface = hydro2.surface,
|
|
10
10
|
primary = hydro2.primary,
|
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.f7123bed",
|
|
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": "f7123bed7cb57ab8ca85c291e5c5c620b5e9fd04",
|
|
12
12
|
"esnext": "",
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|