@moda/tokens 5.5.0 → 5.5.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
@@ -3,6 +3,27 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.5.3](https://github.com/ModaOperandi/tokens/compare/v5.5.2...v5.5.3) (2022-07-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **config:** put root dir back to "src" ([bbe7eb5](https://github.com/ModaOperandi/tokens/commit/bbe7eb5a0efb21d86bd7e97fc89fa14dc01f7db2))
12
+
13
+ ## [5.5.2](https://github.com/ModaOperandi/tokens/compare/v5.5.1...v5.5.2) (2022-07-01)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **storybook:** fix the reference to root package ([81b90cc](https://github.com/ModaOperandi/tokens/commit/81b90cc5664b1037f115a18d9bd96f237884ffa9))
19
+
20
+ ## [5.5.1](https://github.com/ModaOperandi/tokens/compare/v5.5.0...v5.5.1) (2021-10-27)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * rename black to coal ([b9040c3](https://github.com/ModaOperandi/tokens/commit/b9040c36565e13a6b09aff100f46a78f388c91c8))
26
+
6
27
  # [5.5.0](https://github.com/ModaOperandi/tokens/compare/v5.4.4...v5.5.0) (2021-10-27)
7
28
 
8
29
 
package/dist/colors.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare const colors: {
2
2
  all: {
3
- black: string;
3
+ coal: string;
4
4
  ink: string;
5
5
  cement: string;
6
6
  fog: string;
@@ -58,7 +58,7 @@ export declare const colors: {
58
58
  "dark-fuchsia": string;
59
59
  };
60
60
  greyscale: {
61
- black: string;
61
+ coal: string;
62
62
  ink: string;
63
63
  cement: string;
64
64
  fog: string;
package/dist/colors.js CHANGED
@@ -4,7 +4,7 @@ exports.colors = void 0;
4
4
  // THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
5
5
  exports.colors = {
6
6
  "all": {
7
- "black": "rgb(0, 0, 0)",
7
+ "coal": "rgb(0, 0, 0)",
8
8
  "ink": "rgb(25, 26, 27)",
9
9
  "cement": "rgb(101, 101, 102)",
10
10
  "fog": "rgb(151, 152, 153)",
@@ -62,7 +62,7 @@ exports.colors = {
62
62
  "dark-fuchsia": "rgb(180, 60, 160)"
63
63
  },
64
64
  "greyscale": {
65
- "black": "rgb(0, 0, 0)",
65
+ "coal": "rgb(0, 0, 0)",
66
66
  "ink": "rgb(25, 26, 27)",
67
67
  "cement": "rgb(101, 101, 102)",
68
68
  "fog": "rgb(151, 152, 153)",
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC/B,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE;QACL,OAAO,EAAE,cAAc;QACvB,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,oBAAoB;QAC9B,KAAK,EAAE,oBAAoB;QAC3B,UAAU,EAAE,oBAAoB;QAChC,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE,oBAAoB;QAC5B,YAAY,EAAE,oBAAoB;QAClC,UAAU,EAAE,gBAAgB;QAC5B,MAAM,EAAE,oBAAoB;QAC5B,YAAY,EAAE,gBAAgB;QAC9B,SAAS,EAAE,mBAAmB;QAC9B,cAAc,EAAE,mBAAmB;QACnC,YAAY,EAAE,kBAAkB;QAChC,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,mBAAmB;QAChC,SAAS,EAAE,oBAAoB;QAC/B,OAAO,EAAE,oBAAoB;QAC7B,cAAc,EAAE,mBAAmB;QACnC,OAAO,EAAE,oBAAoB;QAC7B,cAAc,EAAE,gBAAgB;QAChC,OAAO,EAAE,oBAAoB;QAC7B,iBAAiB,EAAE,oBAAoB;QACvC,YAAY,EAAE,mBAAmB;QACjC,OAAO,EAAE,oBAAoB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AE,mBAAmB;KACpC;IACD,WAAW,EAAE;QACX,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,oBAAoB;QAC9B,KAAK,EAAE,oBAAoB;QAC3B,UAAU,EAAE,oBAAoB;QAChC,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE,oBAAoB;KAC7B;CACF,CAAC"}
package/dist/helpers.d.ts CHANGED
@@ -1,66 +1,66 @@
1
- import { colors } from "./colors";
2
- import { typography } from "./typography";
1
+ import { colors } from './colors';
2
+ import { typography } from './typography';
3
3
  export declare type Font = keyof typeof typography.fonts;
4
- export declare type TextTreatment = keyof typeof typography["text-treatments"];
4
+ export declare type TextTreatment = keyof typeof typography['text-treatments'];
5
5
  export declare type Color = keyof typeof colors.all;
6
- export declare const text: (name: TextTreatment, font?: "serif" | "sans" | "code") => {
7
- "font-family": string;
8
- "line-height": string;
6
+ export declare const text: (name: TextTreatment, font?: "code" | "serif" | "sans") => {
7
+ 'font-family': string;
8
+ 'line-height': string;
9
9
  "font-size": string;
10
10
  "letter-spacing": number;
11
11
  } | {
12
- "font-family": string;
13
- "line-height": string;
12
+ 'font-family': string;
13
+ 'line-height': string;
14
14
  "font-size": string;
15
15
  "letter-spacing": number;
16
16
  } | {
17
- "font-family": string;
18
- "line-height": string;
17
+ 'font-family': string;
18
+ 'line-height': string;
19
19
  "font-size": string;
20
20
  "letter-spacing": number;
21
21
  } | {
22
- "font-family": string;
23
- "line-height": string;
22
+ 'font-family': string;
23
+ 'line-height': string;
24
24
  "font-size": string;
25
25
  "letter-spacing": number;
26
26
  } | {
27
- "font-family": string;
28
- "line-height": string;
27
+ 'font-family': string;
28
+ 'line-height': string;
29
29
  "font-size": string;
30
30
  "letter-spacing": number;
31
31
  } | {
32
- "font-family": string;
33
- "line-height": string;
32
+ 'font-family': string;
33
+ 'line-height': string;
34
34
  "font-size": string;
35
35
  "letter-spacing": string;
36
36
  } | {
37
- "font-family": string;
38
- "line-height": string;
37
+ 'font-family': string;
38
+ 'line-height': string;
39
39
  "font-size": string;
40
40
  "letter-spacing": string;
41
41
  } | {
42
- "font-family": string;
43
- "line-height": string;
42
+ 'font-family': string;
43
+ 'line-height': string;
44
44
  "font-size": string;
45
45
  "letter-spacing": string;
46
46
  } | {
47
- "font-family": string;
48
- "line-height": string;
47
+ 'font-family': string;
48
+ 'line-height': string;
49
49
  "font-size": string;
50
50
  "letter-spacing": string;
51
51
  "font-weight": string;
52
52
  } | {
53
- "font-family": string;
54
- "line-height": string;
53
+ 'font-family': string;
54
+ 'line-height': string;
55
55
  "font-size": string;
56
56
  "letter-spacing": string;
57
57
  } | {
58
- "font-family": string;
59
- "line-height": string;
58
+ 'font-family': string;
59
+ 'line-height': string;
60
60
  "font-size": string;
61
61
  "letter-spacing": string;
62
62
  "text-transform": string;
63
63
  };
64
64
  export declare const remToUnitlessPx: (value: string) => number;
65
- export declare const color: (name: Color, alpha?: number | undefined) => string;
66
- export declare const spacing: (ty: number | string, rx?: string | number | undefined, b?: string | number | undefined, l?: string | number | undefined) => string | number | undefined;
65
+ export declare const color: (name: Color, alpha?: number) => string;
66
+ export declare const spacing: (topY: number | string, rightX?: number | string, bottom?: number | string, left?: number | string) => string | number | undefined;
package/dist/helpers.js CHANGED
@@ -26,28 +26,31 @@ var colors_1 = require("./colors");
26
26
  var space_1 = require("./space");
27
27
  var typography_1 = require("./typography");
28
28
  var text = function (name, font) {
29
- if (font === void 0) { font = "sans"; }
30
- var treatment = typography_1.typography["text-treatments"][name];
31
- return __assign(__assign({}, treatment), { "font-family": typography_1.typography.fonts[font].join(","), "line-height": "" + treatment["line-height"] });
29
+ if (font === void 0) { font = 'sans'; }
30
+ var treatment = typography_1.typography['text-treatments'][name];
31
+ return __assign(__assign({}, treatment), { 'font-family': typography_1.typography.fonts[font].join(','), 'line-height': "".concat(treatment['line-height']) });
32
32
  };
33
33
  exports.text = text;
34
34
  var remToUnitlessPx = function (value) {
35
- return parseFloat(value) * parseInt(typography_1.typography["root-font-size"], 0);
35
+ return parseFloat(value) * parseInt(typography_1.typography['root-font-size'], 10);
36
36
  };
37
37
  exports.remToUnitlessPx = remToUnitlessPx;
38
38
  var color = function (name, alpha) {
39
39
  var _a;
40
40
  var color = colors_1.colors.all[name];
41
- return alpha != null ? colorString.to.rgb(__spreadArray(__spreadArray([], (((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || []), true), [alpha], false)) : color;
41
+ return alpha != null
42
+ ? // eslint-disable-next-line @typescript-eslint/no-magic-numbers
43
+ colorString.to.rgb(__spreadArray(__spreadArray([], (((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || []), true), [alpha], false))
44
+ : color;
42
45
  };
43
46
  exports.color = color;
44
- var spacing = function (ty, rx, b, l) {
45
- return [ty, rx, b, l].reduce(function (acc, v) {
47
+ var spacing = function (topY, rightX, bottom, left) {
48
+ return [topY, rightX, bottom, left].reduce(function (acc, value) {
46
49
  var _a;
47
- if (v === undefined)
50
+ if (value === undefined)
48
51
  return acc;
49
- return [acc, (_a = space_1.space.scale[v]) !== null && _a !== void 0 ? _a : v].join(" ");
50
- }, "");
52
+ return [acc, (_a = space_1.space.scale[value]) !== null && _a !== void 0 ? _a : value].join(' ');
53
+ }, '');
51
54
  };
52
55
  exports.spacing = spacing;
53
56
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA4C;AAC5C,mCAAkC;AAClC,iCAAgC;AAChC,2CAA0C;AAMnC,IAAM,IAAI,GAAG,UAAC,IAAmB,EAAE,IAAqB;IAArB,qBAAA,EAAA,OAAO,MAAc;IAC7D,IAAM,SAAS,GAAG,uBAAU,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,CAAC;IACtD,6BACK,SAAS,KACZ,aAAa,EAAE,uBAAU,C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,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,KAAK;;QAC7C,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,GAAG,CAAC;QACpC,OAAO,CAAC,GAAG,EAAE,MAAA,aAAK,CAAC,KAAK,CAAC,KAAK,CAAC,mCAAI,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtD,CAAC,EAAE,EAAE,CAAC;AAHN,CAGM,CAAC;AATI,QAAA,OAAO,WASX"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.includePaths = void 0;
4
4
  var path = require("path");
5
- exports.includePaths = [path.join(__dirname, "../lib/assets/stylesheets")];
5
+ exports.includePaths = [path.join(__dirname, '../lib/assets/stylesheets')];
6
6
  //# sourceMappingURL=includePaths.js.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { colors } from "./colors";
2
- export { typography } from "./typography";
3
- export { space } from "./space";
4
- export { breakpoints } from "./breakpoints";
5
- export * from "./helpers";
1
+ export { colors } from './colors';
2
+ export { typography } from './typography';
3
+ export { space } from './space';
4
+ export { breakpoints } from './breakpoints';
5
+ export * from './helpers';
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,4CAA0B"}
@@ -1,5 +1,5 @@
1
1
  $colors-greyscale: (
2
- "black": #000000,
2
+ "coal": #000000,
3
3
  "ink": #191a1b,
4
4
  "cement": #656566,
5
5
  "fog": #979899,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda/tokens",
3
- "version": "5.5.0",
3
+ "version": "5.5.3",
4
4
  "description": "Constant values for modaoperandi.com",
5
5
  "repository": "git@github.com:ModaOperandi/tokens.git",
6
6
  "author": "Moda Operandi",
@@ -27,19 +27,29 @@
27
27
  "postpublish": "pinst --enable"
28
28
  },
29
29
  "devDependencies": {
30
- "@commitlint/cli": "^13.1.0",
31
- "@commitlint/config-conventional": "^13.1.0",
30
+ "@commitlint/cli": "^17.0.0",
31
+ "@commitlint/config-conventional": "^17.0.0",
32
32
  "@jedmao/semantic-release-npm-github-config": "^1.0.9",
33
33
  "@types/color-string": "^1.5.0",
34
- "@types/node": "^16.0.0",
34
+ "@types/node": "^17.0.0",
35
+ "@types/node-sass": "^4.11.3",
36
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
37
+ "@typescript-eslint/parser": "^5.30.0",
35
38
  "cz-conventional-changelog": "3.3.0",
36
- "gh-pages": "3.2.3",
37
- "husky": "^7.0.0",
38
- "jest": "^27.0.1",
39
- "node-sass": "^6.0.0",
39
+ "eslint": "^8.18.0",
40
+ "eslint-config-prettier": "^8.5.0",
41
+ "eslint-plugin-import": "^2.26.0",
42
+ "eslint-plugin-no-loops": "^0.3.0",
43
+ "eslint-plugin-node": "^11.1.0",
44
+ "eslint-plugin-prettier": "^4.2.1",
45
+ "gh-pages": "4.0.0",
46
+ "husky": "^8.0.1",
47
+ "jest": "^28.0.2",
48
+ "node-sass": "^7.0.0",
40
49
  "node-sass-export": "^0.0.7",
41
- "pinst": "^2.1.4",
42
- "semantic-release": "^18.0.0",
50
+ "pinst": "^3.0.0",
51
+ "prettier": "^2.7.1",
52
+ "semantic-release": "^19.0.2",
43
53
  "typescript": "^4.0.2"
44
54
  },
45
55
  "config": {
package/src/colors.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // THIS FILE IS AUTO-GENERATED. DO NOT EDIT.
2
2
  export const colors = {
3
3
  "all": {
4
- "black": "rgb(0, 0, 0)",
4
+ "coal": "rgb(0, 0, 0)",
5
5
  "ink": "rgb(25, 26, 27)",
6
6
  "cement": "rgb(101, 101, 102)",
7
7
  "fog": "rgb(151, 152, 153)",
@@ -59,7 +59,7 @@ export const colors = {
59
59
  "dark-fuchsia": "rgb(180, 60, 160)"
60
60
  },
61
61
  "greyscale": {
62
- "black": "rgb(0, 0, 0)",
62
+ "coal": "rgb(0, 0, 0)",
63
63
  "ink": "rgb(25, 26, 27)",
64
64
  "cement": "rgb(101, 101, 102)",
65
65
  "fog": "rgb(151, 152, 153)",
package/src/helpers.ts CHANGED
@@ -1,36 +1,39 @@
1
1
  import * as colorString from 'color-string';
2
- import { colors } from "./colors";
3
- import { space } from "./space";
4
- import { typography } from "./typography";
2
+ import { colors } from './colors';
3
+ import { space } from './space';
4
+ import { typography } from './typography';
5
5
 
6
6
  export type Font = keyof typeof typography.fonts;
7
- export type TextTreatment = keyof typeof typography["text-treatments"];
7
+ export type TextTreatment = keyof typeof typography['text-treatments'];
8
8
  export type Color = keyof typeof colors.all;
9
9
 
10
- export const text = (name: TextTreatment, font = "sans" as Font) => {
11
- const treatment = typography["text-treatments"][name];
10
+ export const text = (name: TextTreatment, font = 'sans' as Font) => {
11
+ const treatment = typography['text-treatments'][name];
12
12
  return {
13
13
  ...treatment,
14
- "font-family": typography.fonts[font].join(","),
15
- "line-height": `${treatment["line-height"]}`,
14
+ 'font-family': typography.fonts[font].join(','),
15
+ 'line-height': `${treatment['line-height']}`
16
16
  };
17
17
  };
18
18
 
19
19
  export const remToUnitlessPx = (value: string) =>
20
- parseFloat(value) * parseInt(typography["root-font-size"], 0);
20
+ parseFloat(value) * parseInt(typography['root-font-size'], 10);
21
21
 
22
22
  export const color = (name: Color, alpha?: number) => {
23
23
  const color = colors.all[name];
24
- return alpha != null ? colorString.to.rgb([...(colorString.get.rgb(color)?.slice(0, 3) || []), alpha]) : color;
25
- }
24
+ return alpha != null
25
+ ? // eslint-disable-next-line @typescript-eslint/no-magic-numbers
26
+ colorString.to.rgb([...(colorString.get.rgb(color)?.slice(0, 3) || []), alpha])
27
+ : color;
28
+ };
26
29
 
27
30
  export const spacing = (
28
- ty: number | string,
29
- rx?: number | string,
30
- b?: number | string,
31
- l?: number | string
31
+ topY: number | string,
32
+ rightX?: number | string,
33
+ bottom?: number | string,
34
+ left?: number | string
32
35
  ) =>
33
- [ty, rx, b, l].reduce((acc, v) => {
34
- if (v === undefined) return acc;
35
- return [acc, space.scale[v] ?? v].join(" ");
36
- }, "");
36
+ [topY, rightX, bottom, left].reduce((acc, value) => {
37
+ if (value === undefined) return acc;
38
+ return [acc, space.scale[value] ?? value].join(' ');
39
+ }, '');
@@ -2,4 +2,4 @@
2
2
  exports.__esModule = true;
3
3
  exports.includePaths = void 0;
4
4
  var path = require("path");
5
- exports.includePaths = [path.join(__dirname, "../lib/assets/stylesheets")];
5
+ exports.includePaths = [path.join(__dirname, '../lib/assets/stylesheets')];
@@ -1,3 +1,3 @@
1
- import * as path from "path";
1
+ import * as path from 'path';
2
2
 
3
- export const includePaths = [path.join(__dirname, "../lib/assets/stylesheets")];
3
+ export const includePaths = [path.join(__dirname, '../lib/assets/stylesheets')];
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { colors } from "./colors";
2
- export { typography } from "./typography";
3
- export { space } from "./space";
4
- export { breakpoints } from "./breakpoints";
5
- export * from "./helpers";
1
+ export { colors } from './colors';
2
+ export { typography } from './typography';
3
+ export { space } from './space';
4
+ export { breakpoints } from './breakpoints';
5
+ export * from './helpers';