@trackunit/css-tailwind 0.0.14 → 0.0.18
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/package.json +1 -1
- package/tailwind-base.generated.js +311 -2
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __defProps = Object.defineProperties;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
8
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
11
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
12
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -20,6 +22,9 @@ var __spreadValues = (a, b) => {
|
|
|
20
22
|
return a;
|
|
21
23
|
};
|
|
22
24
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
26
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
27
|
+
};
|
|
23
28
|
var __export = (target, all) => {
|
|
24
29
|
for (var name in all)
|
|
25
30
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -32,8 +37,75 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
32
37
|
}
|
|
33
38
|
return to;
|
|
34
39
|
};
|
|
40
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
41
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
42
|
+
mod
|
|
43
|
+
));
|
|
35
44
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
45
|
|
|
46
|
+
// node_modules/tailwindcss/lib/util/createPlugin.js
|
|
47
|
+
var require_createPlugin = __commonJS({
|
|
48
|
+
"node_modules/tailwindcss/lib/util/createPlugin.js"(exports) {
|
|
49
|
+
"use strict";
|
|
50
|
+
Object.defineProperty(exports, "__esModule", {
|
|
51
|
+
value: true
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "default", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: () => _default
|
|
56
|
+
});
|
|
57
|
+
function createPlugin(plugin3, config) {
|
|
58
|
+
return {
|
|
59
|
+
handler: plugin3,
|
|
60
|
+
config
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
|
|
64
|
+
const optionsFunction = function(options) {
|
|
65
|
+
return {
|
|
66
|
+
__options: options,
|
|
67
|
+
handler: pluginFunction(options),
|
|
68
|
+
config: configFunction(options)
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
optionsFunction.__isOptionsFunction = true;
|
|
72
|
+
optionsFunction.__pluginFunction = pluginFunction;
|
|
73
|
+
optionsFunction.__configFunction = configFunction;
|
|
74
|
+
return optionsFunction;
|
|
75
|
+
};
|
|
76
|
+
var _default = createPlugin;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// node_modules/tailwindcss/lib/public/create-plugin.js
|
|
81
|
+
var require_create_plugin = __commonJS({
|
|
82
|
+
"node_modules/tailwindcss/lib/public/create-plugin.js"(exports) {
|
|
83
|
+
"use strict";
|
|
84
|
+
Object.defineProperty(exports, "__esModule", {
|
|
85
|
+
value: true
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "default", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: () => _default
|
|
90
|
+
});
|
|
91
|
+
var _createPlugin = /* @__PURE__ */ _interopRequireDefault(require_createPlugin());
|
|
92
|
+
function _interopRequireDefault(obj) {
|
|
93
|
+
return obj && obj.__esModule ? obj : {
|
|
94
|
+
default: obj
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
var _default = _createPlugin.default;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// node_modules/tailwindcss/plugin.js
|
|
102
|
+
var require_plugin = __commonJS({
|
|
103
|
+
"node_modules/tailwindcss/plugin.js"(exports, module2) {
|
|
104
|
+
var createPlugin = require_create_plugin();
|
|
105
|
+
module2.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
37
109
|
// libs/css/tailwind/src/lib/tailwind-base.ts
|
|
38
110
|
var tailwind_base_exports = {};
|
|
39
111
|
__export(tailwind_base_exports, {
|
|
@@ -41,6 +113,201 @@ __export(tailwind_base_exports, {
|
|
|
41
113
|
});
|
|
42
114
|
module.exports = __toCommonJS(tailwind_base_exports);
|
|
43
115
|
|
|
116
|
+
// libs/css/tailwind-custom-properties-plugin/src/plugin.ts
|
|
117
|
+
var import_plugin = __toESM(require_plugin());
|
|
118
|
+
|
|
119
|
+
// libs/css/tailwind-custom-properties-plugin/src/variablesToCSSRules.ts
|
|
120
|
+
var keysToCssVariableName = (keys) => `--${keys.join("-")}`.replace(/[^a-zA-Z0-9]/g, "-");
|
|
121
|
+
var flattenVariablesDeclerationValues = (values, output = {}, keys = []) => {
|
|
122
|
+
for (const [key, value] of Object.entries(values)) {
|
|
123
|
+
let flattend = {};
|
|
124
|
+
if (typeof value === "object") {
|
|
125
|
+
flattend = flattenVariablesDeclerationValues(value, output, [...keys, key]);
|
|
126
|
+
} else {
|
|
127
|
+
flattend[keysToCssVariableName([...keys, key])] = value;
|
|
128
|
+
}
|
|
129
|
+
output = __spreadValues(__spreadValues({}, flattend), output);
|
|
130
|
+
}
|
|
131
|
+
return output;
|
|
132
|
+
};
|
|
133
|
+
var variablesToCSSRules = (variablesDecleration) => {
|
|
134
|
+
if (!variablesDecleration) {
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
const cssRules = Object.entries(variablesDecleration).map(([key, value]) => ({
|
|
138
|
+
[key === "DEFAULT" ? ":root" : `.${key}`]: flattenVariablesDeclerationValues(value)
|
|
139
|
+
}));
|
|
140
|
+
return cssRules;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// libs/css/tailwind-custom-properties-plugin/src/plugin.ts
|
|
144
|
+
var CssTailwindCustomPropertiesPlugin = (0, import_plugin.default)(({ addBase, theme }) => {
|
|
145
|
+
const variablesDeclerationFromThemeConfig = theme("variables", {});
|
|
146
|
+
const cssRules = variablesToCSSRules(variablesDeclerationFromThemeConfig);
|
|
147
|
+
addBase(cssRules);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// libs/css/component-tokens/src/plugin.ts
|
|
151
|
+
var import_plugin2 = __toESM(require_plugin());
|
|
152
|
+
|
|
153
|
+
// libs/css/component-tokens/src/component-tokens/ComponentTokenDefinition.ts
|
|
154
|
+
var AsComponentTokenDefinition = (designTokens) => designTokens;
|
|
155
|
+
|
|
156
|
+
// libs/css/component-tokens/src/component-tokens/components/Card.tokens.ts
|
|
157
|
+
var CardTokenDefinition = AsComponentTokenDefinition({
|
|
158
|
+
DEFAULT: {
|
|
159
|
+
border: { borderColor: "rgb(var(--color-slate-200))", borderRadius: "var(--border-radius-DEFAULT)" },
|
|
160
|
+
shadow: { boxShadow: "var(--box-shadow-DEFAULT)" }
|
|
161
|
+
},
|
|
162
|
+
"theme-marketing": {
|
|
163
|
+
border: { borderColor: "rgba(0, 0, 0, 0)", borderRadius: "2rem" },
|
|
164
|
+
shadow: { boxShadow: "0px 20px 48px rgba(73, 55, 54, 0.1)" }
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// libs/css/component-tokens/src/component-tokens/components/Search.tokens.ts
|
|
169
|
+
var SearchTokenDefinition = AsComponentTokenDefinition({
|
|
170
|
+
DEFAULT: {
|
|
171
|
+
width: { width: "9rem" },
|
|
172
|
+
background: { backgroundColor: "" },
|
|
173
|
+
borderless: { borderStyle: "hidden" },
|
|
174
|
+
"focus-hover": {
|
|
175
|
+
borderWidth: "1px",
|
|
176
|
+
borderBottomWidth: "1px",
|
|
177
|
+
borderColor: "rgb(var(--color-gray-400))",
|
|
178
|
+
borderBottomColor: "rgb(var(--color-gray-400))",
|
|
179
|
+
backgroundColor: "rgb(var(--color-slate-50))"
|
|
180
|
+
},
|
|
181
|
+
border: {
|
|
182
|
+
borderStyle: "solid",
|
|
183
|
+
borderWidth: "1px",
|
|
184
|
+
borderBottomWidth: "1px",
|
|
185
|
+
borderColor: "rgb(var(--color-gray-200))",
|
|
186
|
+
borderBottomColor: "rgb(var(--color-gray-200))",
|
|
187
|
+
borderRadius: "0.5rem"
|
|
188
|
+
},
|
|
189
|
+
"focus-within": {
|
|
190
|
+
borderColor: "rgb(var(--color-slate-400))",
|
|
191
|
+
boxShadow: "var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)"
|
|
192
|
+
},
|
|
193
|
+
widen: { borderBottomColor: "rgb(var(--color-white-DEFAULT))" },
|
|
194
|
+
"widen-focus": { borderBottomColor: "rgb(var(--color-black-DEFAULT))" },
|
|
195
|
+
prefix: {
|
|
196
|
+
color: "rgb(var(--color-slate-400))",
|
|
197
|
+
cursor: "default"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"theme-marketing": {
|
|
201
|
+
width: { width: "0px" },
|
|
202
|
+
background: { backgroundColor: "transparent" },
|
|
203
|
+
borderless: {
|
|
204
|
+
borderStyle: "hidden"
|
|
205
|
+
},
|
|
206
|
+
"focus-hover": {
|
|
207
|
+
borderWidth: "0px",
|
|
208
|
+
borderBottomWidth: "2px",
|
|
209
|
+
borderColor: "rgb(var(--color-black-DEFAULT))",
|
|
210
|
+
borderBottomColor: "rgb(var(--color-black-DEFAULT))",
|
|
211
|
+
backgroundColor: "transparent"
|
|
212
|
+
},
|
|
213
|
+
border: {
|
|
214
|
+
borderStyle: "solid",
|
|
215
|
+
borderWidth: "0px",
|
|
216
|
+
borderBottomWidth: "2px",
|
|
217
|
+
borderColor: "rgb(var(--color-white-DEFAULT))",
|
|
218
|
+
borderBottomColor: "rgb(var(--color-black-DEFAULT))",
|
|
219
|
+
borderRadius: "0px"
|
|
220
|
+
},
|
|
221
|
+
"focus-within": {
|
|
222
|
+
borderColor: "none",
|
|
223
|
+
boxShadow: "none"
|
|
224
|
+
},
|
|
225
|
+
widen: {
|
|
226
|
+
borderBottomColor: "rgb(var(--color-white-DEFAULT))"
|
|
227
|
+
},
|
|
228
|
+
"widen-focus": {
|
|
229
|
+
borderBottomColor: "rgb(var(--color-black-DEFAULT))"
|
|
230
|
+
},
|
|
231
|
+
prefix: {
|
|
232
|
+
color: "rgb(var(--color-slate-600))",
|
|
233
|
+
cursor: "pointer"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// libs/css/component-tokens/src/component-tokens/components/Button.tokens.ts
|
|
239
|
+
var ButtonTokenDefinition = AsComponentTokenDefinition({
|
|
240
|
+
DEFAULT: {
|
|
241
|
+
border: { borderRadius: "var(--border-radius-lg)" },
|
|
242
|
+
height: { height: "min-content", maxHeight: "32px" },
|
|
243
|
+
width: { width: "min-content", minWidth: "min-content" }
|
|
244
|
+
},
|
|
245
|
+
"theme-marketing": {
|
|
246
|
+
border: { borderRadius: "50px" },
|
|
247
|
+
height: { height: "55px", maxHeight: "" },
|
|
248
|
+
width: { width: "min-content", minWidth: "158px" }
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
// libs/css/component-tokens/src/component-tokens/ComponentTokens.ts
|
|
253
|
+
var componentTokenDefinitions = {
|
|
254
|
+
card: CardTokenDefinition,
|
|
255
|
+
button: ButtonTokenDefinition,
|
|
256
|
+
search: SearchTokenDefinition
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// libs/css/component-tokens/src/component-tokens/ComponentTokenVariablesByThemeName.ts
|
|
260
|
+
var getComponentTokenVariablesByThemeName = (theme, componentTokenDefinitions2) => {
|
|
261
|
+
const themeTokenObject = Object.fromEntries(
|
|
262
|
+
Object.entries(componentTokenDefinitions2).map(([componentName, componentThemes]) => [
|
|
263
|
+
componentName,
|
|
264
|
+
componentThemes[theme]
|
|
265
|
+
])
|
|
266
|
+
);
|
|
267
|
+
return themeTokenObject;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
// libs/css/component-tokens/src/component-tokens/pluginUtilityFunctions.ts
|
|
271
|
+
var PREFIX = "component";
|
|
272
|
+
var componentTokenAsCssVariableString = (component, token, cssProperty) => `var(--${PREFIX}-${component}-${token}-${cssProperty})`;
|
|
273
|
+
var componentTokenToCSSProperties = (component, token, tokenObject) => {
|
|
274
|
+
return Object.fromEntries(
|
|
275
|
+
Object.keys(tokenObject).map((key) => [
|
|
276
|
+
key,
|
|
277
|
+
componentTokenAsCssVariableString(component, token, key)
|
|
278
|
+
])
|
|
279
|
+
);
|
|
280
|
+
};
|
|
281
|
+
var getAllComponentTokenRules = (componentDefinitions) => {
|
|
282
|
+
const components = {};
|
|
283
|
+
Object.entries(componentDefinitions).forEach(
|
|
284
|
+
([componentName, themes]) => Object.entries(themes.DEFAULT).forEach(([tokenName, value]) => {
|
|
285
|
+
const typedComponentName = componentName;
|
|
286
|
+
const typedTokenName = tokenName;
|
|
287
|
+
const selector = `.${PREFIX}-${typedComponentName}-${typedTokenName}`;
|
|
288
|
+
components[selector] = componentTokenToCSSProperties(typedComponentName, typedTokenName, value);
|
|
289
|
+
})
|
|
290
|
+
);
|
|
291
|
+
return components;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
// libs/css/component-tokens/src/plugin.ts
|
|
295
|
+
var cssVariablesDefinition = variablesToCSSRules({
|
|
296
|
+
DEFAULT: {
|
|
297
|
+
component: getComponentTokenVariablesByThemeName("DEFAULT", componentTokenDefinitions)
|
|
298
|
+
},
|
|
299
|
+
"theme-marketing": {
|
|
300
|
+
component: getComponentTokenVariablesByThemeName("theme-marketing", componentTokenDefinitions)
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
var ComponentTokensPlugin = (0, import_plugin2.default)(function({ addComponents }) {
|
|
304
|
+
addComponents(cssVariablesDefinition);
|
|
305
|
+
addComponents(getAllComponentTokenRules(componentTokenDefinitions));
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
// libs/css/component-tokens/src/index.ts
|
|
309
|
+
var src_default = ComponentTokensPlugin;
|
|
310
|
+
|
|
44
311
|
// libs/ui/design-tokens/src/tokens/colors/tailwindPalette.ts
|
|
45
312
|
var tailwindPalette = {
|
|
46
313
|
slate: {
|
|
@@ -628,9 +895,51 @@ var tailwindBaseConfig = {
|
|
|
628
895
|
popover: withCustomPropertyValueAsComment("--z-popover"),
|
|
629
896
|
toast: withCustomPropertyValueAsComment("--z-toast")
|
|
630
897
|
}
|
|
631
|
-
})
|
|
898
|
+
}),
|
|
899
|
+
variables: {
|
|
900
|
+
"theme-marketing": {
|
|
901
|
+
color: {
|
|
902
|
+
primary: {
|
|
903
|
+
50: "254 236 235",
|
|
904
|
+
100: "254 236 235",
|
|
905
|
+
200: "254 217 215",
|
|
906
|
+
300: "253 180 176",
|
|
907
|
+
400: "251 142 136",
|
|
908
|
+
500: "250 104 97",
|
|
909
|
+
600: "249 66 58",
|
|
910
|
+
700: "238 19 7",
|
|
911
|
+
800: "178 14 5",
|
|
912
|
+
900: "119 9 4"
|
|
913
|
+
},
|
|
914
|
+
secondary: {
|
|
915
|
+
50: "238 243 246",
|
|
916
|
+
100: "238 243 246",
|
|
917
|
+
200: "222 231 237",
|
|
918
|
+
300: "189 208 219",
|
|
919
|
+
400: "155 184 202",
|
|
920
|
+
500: "122 160 184",
|
|
921
|
+
600: "89 137 166",
|
|
922
|
+
700: "71 109 133",
|
|
923
|
+
800: "53 82 100",
|
|
924
|
+
900: "36 55 66"
|
|
925
|
+
},
|
|
926
|
+
accent: {
|
|
927
|
+
50: "255 246 240",
|
|
928
|
+
100: "255 246 240",
|
|
929
|
+
200: "255 238 224",
|
|
930
|
+
300: "255 223 199",
|
|
931
|
+
400: "255 206 168",
|
|
932
|
+
500: "255 191 143",
|
|
933
|
+
600: "255 173 112",
|
|
934
|
+
700: "255 134 41",
|
|
935
|
+
800: "219 95 0",
|
|
936
|
+
900: "148 64 0"
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
}
|
|
632
941
|
},
|
|
633
|
-
plugins: []
|
|
942
|
+
plugins: [CssTailwindCustomPropertiesPlugin, src_default]
|
|
634
943
|
};
|
|
635
944
|
var tailwind_base_default = tailwindBaseConfig;
|
|
636
945
|
// Annotate the CommonJS export names for ESM import in node:
|