@maxio-com/design-tokens 4.1.0 → 4.1.2
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/README.md +2 -2
- package/dist/config/colors.js +15 -10
- package/dist/config/fontFamily.js +3 -1
- package/dist/config/fontSize.js +3 -1
- package/dist/config/index.js +16 -5
- package/dist/config/lineHeight.js +3 -1
- package/dist/config/semanticColors.js +3 -1
- package/dist/config/semanticColors.spec.js +11 -6
- package/dist/index.js +8 -2
- package/dist/tailwindTheme.js +9 -7
- package/dist/tailwindTheme.spec.js +7 -2
- package/dist/utils/generateColorSet.js +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Learn more about the **Design Tokens** [here](https://www.notion.so/maxioevoluti
|
|
|
15
15
|
Design tokens are distributed as an npm package. You can install them using npm, yarn, or pnpm:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
pnpm install @maxio/design-tokens
|
|
18
|
+
pnpm install @maxio-com/design-tokens
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
To use the design tokens in your project, you can import the CSS file into your project:
|
|
@@ -27,7 +27,7 @@ To use the design tokens in your project, you can import the CSS file into your
|
|
|
27
27
|
To leverage the Tailwind Theme, you can import the config file into your project:
|
|
28
28
|
|
|
29
29
|
```ts
|
|
30
|
-
import { tailwindTheme } from '@maxio/design-tokens';
|
|
30
|
+
import { tailwindTheme } from '@maxio-com/design-tokens';
|
|
31
31
|
|
|
32
32
|
// your tailwind config
|
|
33
33
|
export default {
|
package/dist/config/colors.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,15 +10,19 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var generateColorSet_1 = __importDefault(require("../utils/generateColorSet"));
|
|
13
18
|
var colors = {
|
|
14
|
-
black: __assign({ DEFAULT: 'var(--maxio-black-opaque)' },
|
|
15
|
-
white: __assign({ DEFAULT: 'var(--maxio-white-opaque)' },
|
|
16
|
-
gray:
|
|
17
|
-
blue:
|
|
18
|
-
green:
|
|
19
|
-
purple:
|
|
20
|
-
red:
|
|
21
|
-
yellow:
|
|
19
|
+
black: __assign({ DEFAULT: 'var(--maxio-black-opaque)' }, (0, generateColorSet_1.default)('maxio-black-alpha')),
|
|
20
|
+
white: __assign({ DEFAULT: 'var(--maxio-white-opaque)' }, (0, generateColorSet_1.default)('maxio-white-alpha')),
|
|
21
|
+
gray: (0, generateColorSet_1.default)('maxio-gray'),
|
|
22
|
+
blue: (0, generateColorSet_1.default)('maxio-blue'),
|
|
23
|
+
green: (0, generateColorSet_1.default)('maxio-green'),
|
|
24
|
+
purple: (0, generateColorSet_1.default)('maxio-purple'),
|
|
25
|
+
red: (0, generateColorSet_1.default)('maxio-red'),
|
|
26
|
+
yellow: (0, generateColorSet_1.default)('maxio-yellow'),
|
|
22
27
|
};
|
|
23
|
-
|
|
28
|
+
exports.default = colors;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
var fontFamily = {
|
|
2
4
|
sans: 'var(--maxio-font-sans)',
|
|
3
5
|
icon: 'var(--maxio-font-icons)',
|
|
4
6
|
display: 'var(--maxio-font-display)',
|
|
5
7
|
mono: 'var(--maxio-font-mono)',
|
|
6
8
|
};
|
|
7
|
-
|
|
9
|
+
exports.default = fontFamily;
|
package/dist/config/fontSize.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
var fontSize = {
|
|
2
4
|
1: 'var(--maxio-font-size-1)',
|
|
3
5
|
2: 'var(--maxio-font-size-2)',
|
|
@@ -9,4 +11,4 @@ var fontSize = {
|
|
|
9
11
|
8: 'var(--maxio-font-size-8)',
|
|
10
12
|
9: 'var(--maxio-font-size-9)',
|
|
11
13
|
};
|
|
12
|
-
|
|
14
|
+
exports.default = fontSize;
|
package/dist/config/index.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.semanticColors = exports.fontSize = exports.fontFamily = exports.lineHeight = exports.colors = void 0;
|
|
7
|
+
var colors_1 = require("./colors");
|
|
8
|
+
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return __importDefault(colors_1).default; } });
|
|
9
|
+
var lineHeight_1 = require("./lineHeight");
|
|
10
|
+
Object.defineProperty(exports, "lineHeight", { enumerable: true, get: function () { return __importDefault(lineHeight_1).default; } });
|
|
11
|
+
var fontFamily_1 = require("./fontFamily");
|
|
12
|
+
Object.defineProperty(exports, "fontFamily", { enumerable: true, get: function () { return __importDefault(fontFamily_1).default; } });
|
|
13
|
+
var fontSize_1 = require("./fontSize");
|
|
14
|
+
Object.defineProperty(exports, "fontSize", { enumerable: true, get: function () { return __importDefault(fontSize_1).default; } });
|
|
15
|
+
var semanticColors_1 = require("./semanticColors");
|
|
16
|
+
Object.defineProperty(exports, "semanticColors", { enumerable: true, get: function () { return __importDefault(semanticColors_1).default; } });
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
var lineHeight = {
|
|
2
4
|
none: 'var(--maxio-line-height-none)',
|
|
3
5
|
1: 'var(--maxio-line-height-1)',
|
|
@@ -10,4 +12,4 @@ var lineHeight = {
|
|
|
10
12
|
8: 'var(--maxio-line-height-8)',
|
|
11
13
|
9: 'var(--maxio-line-height-9)',
|
|
12
14
|
};
|
|
13
|
-
|
|
15
|
+
exports.default = lineHeight;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,6 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
14
|
var semanticColors = {
|
|
13
15
|
backgroundColor: function (_a) {
|
|
14
16
|
var theme = _a.theme;
|
|
@@ -31,4 +33,4 @@ var semanticColors = {
|
|
|
31
33
|
return (__assign(__assign({}, theme('colors')), { focus: 'var(--maxio-color-border-focus)', 'focus-inset': 'var(--maxio-color-border-focus-inset)' }));
|
|
32
34
|
},
|
|
33
35
|
};
|
|
34
|
-
|
|
36
|
+
exports.default = semanticColors;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var semanticColors_1 = __importDefault(require("./semanticColors"));
|
|
2
7
|
describe('semantic colors', function () {
|
|
3
8
|
it('matches snapshot', function () {
|
|
4
|
-
expect(
|
|
5
|
-
expect(
|
|
6
|
-
expect(
|
|
7
|
-
expect(
|
|
8
|
-
expect(
|
|
9
|
+
expect(semanticColors_1.default.backgroundColor({ theme: function () { return ({}); } })).toMatchSnapshot();
|
|
10
|
+
expect(semanticColors_1.default.borderColor({ theme: function () { return ({}); } })).toMatchSnapshot();
|
|
11
|
+
expect(semanticColors_1.default.ringColor({ theme: function () { return ({}); } })).toMatchSnapshot();
|
|
12
|
+
expect(semanticColors_1.default.ringOffsetColor({ theme: function () { return ({}); } })).toMatchSnapshot();
|
|
13
|
+
expect(semanticColors_1.default.textColor({ theme: function () { return ({}); } })).toMatchSnapshot();
|
|
9
14
|
});
|
|
10
15
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.tailwindTheme = void 0;
|
|
7
|
+
var tailwindTheme_1 = __importDefault(require("./tailwindTheme"));
|
|
8
|
+
exports.tailwindTheme = tailwindTheme_1.default;
|
package/dist/tailwindTheme.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,13 +10,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var config_1 = require("./config");
|
|
15
|
+
exports.default = {
|
|
16
|
+
fontFamily: config_1.fontFamily,
|
|
17
|
+
fontSize: config_1.fontSize,
|
|
18
|
+
lineHeight: config_1.lineHeight,
|
|
19
|
+
colors: __assign({ current: 'currentColor', inherit: 'inherit', transparent: 'transparent' }, config_1.colors),
|
|
18
20
|
extend: __assign({ boxShadow: {
|
|
19
21
|
dropdown: '0px 4px 4px rgba(0, 0, 0, 0.25)',
|
|
20
|
-
} }, semanticColors),
|
|
22
|
+
} }, config_1.semanticColors),
|
|
21
23
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var tailwindTheme_1 = __importDefault(require("./tailwindTheme"));
|
|
2
7
|
describe('tailwind theme', function () {
|
|
3
8
|
it('matches snapshot', function () {
|
|
4
|
-
expect(
|
|
9
|
+
expect(tailwindTheme_1.default).toMatchSnapshot();
|
|
5
10
|
});
|
|
6
11
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
var COLOR_KEYS = [
|
|
2
4
|
'05',
|
|
3
5
|
'10',
|
|
@@ -19,4 +21,4 @@ var generateColorSet = function (variablePrefix) {
|
|
|
19
21
|
});
|
|
20
22
|
return set;
|
|
21
23
|
};
|
|
22
|
-
|
|
24
|
+
exports.default = generateColorSet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxio-com/design-tokens",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.2",
|
|
4
4
|
"description": "Design Tokens definition",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "4ebfd8f667cccfc1428f825c3e9fe727ed882505"
|
|
32
32
|
}
|