@trackunit/css-component-tokens 0.0.43 → 0.0.44
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/index.cjs.js +4 -55
- package/index.esm.js +1 -56
- package/package.json +6 -5
package/index.cjs.js
CHANGED
|
@@ -3,62 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var cssTailwindCustomPropertiesPlugin = require('@trackunit/css-tailwind-custom-properties-plugin');
|
|
6
|
+
var plugin = require('tailwindcss/plugin');
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
(function (exports) {
|
|
12
|
-
Object.defineProperty(exports, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "default", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: ()=>_default
|
|
18
|
-
});
|
|
19
|
-
function createPlugin(plugin, config) {
|
|
20
|
-
return {
|
|
21
|
-
handler: plugin,
|
|
22
|
-
config
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
|
|
26
|
-
const optionsFunction = function(options) {
|
|
27
|
-
return {
|
|
28
|
-
__options: options,
|
|
29
|
-
handler: pluginFunction(options),
|
|
30
|
-
config: configFunction(options)
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
optionsFunction.__isOptionsFunction = true;
|
|
34
|
-
// Expose plugin dependencies so that `object-hash` returns a different
|
|
35
|
-
// value if anything here changes, to ensure a rebuild is triggered.
|
|
36
|
-
optionsFunction.__pluginFunction = pluginFunction;
|
|
37
|
-
optionsFunction.__configFunction = configFunction;
|
|
38
|
-
return optionsFunction;
|
|
39
|
-
};
|
|
40
|
-
const _default = createPlugin;
|
|
41
|
-
}(createPlugin$1));
|
|
42
|
-
|
|
43
|
-
(function (exports) {
|
|
44
|
-
Object.defineProperty(exports, "__esModule", {
|
|
45
|
-
value: true
|
|
46
|
-
});
|
|
47
|
-
Object.defineProperty(exports, "default", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: ()=>_default
|
|
50
|
-
});
|
|
51
|
-
const _createPlugin = /*#__PURE__*/ _interopRequireDefault(createPlugin$1);
|
|
52
|
-
function _interopRequireDefault(obj) {
|
|
53
|
-
return obj && obj.__esModule ? obj : {
|
|
54
|
-
default: obj
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
const _default = _createPlugin.default;
|
|
58
|
-
}(createPlugin$2));
|
|
59
|
-
|
|
60
|
-
let createPlugin = createPlugin$2;
|
|
61
|
-
var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
10
|
+
var plugin__default = /*#__PURE__*/_interopDefaultLegacy(plugin);
|
|
62
11
|
|
|
63
12
|
/** Returns object structure for Tailwind variable config for specified theme for ALL ComponentTokenDefinitions. */
|
|
64
13
|
const getComponentTokenVariablesByThemeName = (theme, componentTokenDefinitions) => {
|
|
@@ -307,7 +256,7 @@ const cssVariablesDefinition = cssTailwindCustomPropertiesPlugin.variablesToCSSR
|
|
|
307
256
|
component: getComponentTokenVariablesByThemeName("theme-marketing", componentTokenDefinitions),
|
|
308
257
|
},
|
|
309
258
|
});
|
|
310
|
-
const ComponentTokensPlugin =
|
|
259
|
+
const ComponentTokensPlugin = plugin__default["default"](function ({ addComponents }) {
|
|
311
260
|
addComponents(cssVariablesDefinition);
|
|
312
261
|
addComponents(getAllComponentTokenRules(componentTokenDefinitions));
|
|
313
262
|
});
|
package/index.esm.js
CHANGED
|
@@ -1,60 +1,5 @@
|
|
|
1
1
|
import { variablesToCSSRules } from '@trackunit/css-tailwind-custom-properties-plugin';
|
|
2
|
-
|
|
3
|
-
var createPlugin$2 = {};
|
|
4
|
-
|
|
5
|
-
var createPlugin$1 = {};
|
|
6
|
-
|
|
7
|
-
(function (exports) {
|
|
8
|
-
Object.defineProperty(exports, "__esModule", {
|
|
9
|
-
value: true
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, "default", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: ()=>_default
|
|
14
|
-
});
|
|
15
|
-
function createPlugin(plugin, config) {
|
|
16
|
-
return {
|
|
17
|
-
handler: plugin,
|
|
18
|
-
config
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
|
|
22
|
-
const optionsFunction = function(options) {
|
|
23
|
-
return {
|
|
24
|
-
__options: options,
|
|
25
|
-
handler: pluginFunction(options),
|
|
26
|
-
config: configFunction(options)
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
optionsFunction.__isOptionsFunction = true;
|
|
30
|
-
// Expose plugin dependencies so that `object-hash` returns a different
|
|
31
|
-
// value if anything here changes, to ensure a rebuild is triggered.
|
|
32
|
-
optionsFunction.__pluginFunction = pluginFunction;
|
|
33
|
-
optionsFunction.__configFunction = configFunction;
|
|
34
|
-
return optionsFunction;
|
|
35
|
-
};
|
|
36
|
-
const _default = createPlugin;
|
|
37
|
-
}(createPlugin$1));
|
|
38
|
-
|
|
39
|
-
(function (exports) {
|
|
40
|
-
Object.defineProperty(exports, "__esModule", {
|
|
41
|
-
value: true
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, "default", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: ()=>_default
|
|
46
|
-
});
|
|
47
|
-
const _createPlugin = /*#__PURE__*/ _interopRequireDefault(createPlugin$1);
|
|
48
|
-
function _interopRequireDefault(obj) {
|
|
49
|
-
return obj && obj.__esModule ? obj : {
|
|
50
|
-
default: obj
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const _default = _createPlugin.default;
|
|
54
|
-
}(createPlugin$2));
|
|
55
|
-
|
|
56
|
-
let createPlugin = createPlugin$2;
|
|
57
|
-
var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
2
|
+
import plugin from 'tailwindcss/plugin';
|
|
58
3
|
|
|
59
4
|
/** Returns object structure for Tailwind variable config for specified theme for ALL ComponentTokenDefinitions. */
|
|
60
5
|
const getComponentTokenVariablesByThemeName = (theme, componentTokenDefinitions) => {
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/css-component-tokens",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"main": "./index.cjs.js",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18.x"
|
|
9
9
|
},
|
|
10
|
-
"module": "./index.esm.js",
|
|
11
10
|
"dependencies": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"csstype": "3.1.1",
|
|
12
|
+
"tailwindcss": "3.2.4",
|
|
13
|
+
"@trackunit/css-tailwind-custom-properties-plugin": "*",
|
|
14
|
+
"jest-fetch-mock": "^3.0.3"
|
|
14
15
|
},
|
|
15
|
-
"
|
|
16
|
+
"module": "./index.esm.js"
|
|
16
17
|
}
|