@loafmarkets/tailwind-config 0.0.1
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/dist/index.cjs +156 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +80 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +151 -0
- package/dist/index.js.map +1 -0
- package/package.json +37 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tokens = require('@loafmarkets/tokens');
|
|
4
|
+
|
|
5
|
+
var __create = Object.create;
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from))
|
|
17
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
18
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
30
|
+
|
|
31
|
+
// ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/util/createPlugin.js
|
|
32
|
+
var require_createPlugin = __commonJS({
|
|
33
|
+
"../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/util/createPlugin.js"(exports$1) {
|
|
34
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
35
|
+
value: true
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports$1, "default", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function() {
|
|
40
|
+
return _default;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
function createPlugin(plugin2, config) {
|
|
44
|
+
return {
|
|
45
|
+
handler: plugin2,
|
|
46
|
+
config
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
|
|
50
|
+
const optionsFunction = function(options) {
|
|
51
|
+
return {
|
|
52
|
+
__options: options,
|
|
53
|
+
handler: pluginFunction(options),
|
|
54
|
+
config: configFunction(options)
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
optionsFunction.__isOptionsFunction = true;
|
|
58
|
+
optionsFunction.__pluginFunction = pluginFunction;
|
|
59
|
+
optionsFunction.__configFunction = configFunction;
|
|
60
|
+
return optionsFunction;
|
|
61
|
+
};
|
|
62
|
+
var _default = createPlugin;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/public/create-plugin.js
|
|
67
|
+
var require_create_plugin = __commonJS({
|
|
68
|
+
"../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/public/create-plugin.js"(exports$1) {
|
|
69
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
70
|
+
value: true
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports$1, "default", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function() {
|
|
75
|
+
return _default;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var _createPlugin = /* @__PURE__ */ _interop_require_default(require_createPlugin());
|
|
79
|
+
function _interop_require_default(obj) {
|
|
80
|
+
return obj && obj.__esModule ? obj : {
|
|
81
|
+
default: obj
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
var _default = _createPlugin.default;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/plugin.js
|
|
89
|
+
var require_plugin = __commonJS({
|
|
90
|
+
"../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/plugin.js"(exports$1, module) {
|
|
91
|
+
var createPlugin = require_create_plugin();
|
|
92
|
+
module.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// src/index.ts
|
|
97
|
+
var import_plugin = __toESM(require_plugin());
|
|
98
|
+
var rounded = {
|
|
99
|
+
none: tokens.loafRadii.none,
|
|
100
|
+
xs: tokens.loafRadii.xs,
|
|
101
|
+
sm: tokens.loafRadii.sm,
|
|
102
|
+
md: tokens.loafRadii.md,
|
|
103
|
+
lg: tokens.loafRadii.lg,
|
|
104
|
+
pill: tokens.loafRadii.pill
|
|
105
|
+
};
|
|
106
|
+
var loafPreset = {
|
|
107
|
+
content: [],
|
|
108
|
+
theme: {
|
|
109
|
+
extend: {
|
|
110
|
+
colors: {
|
|
111
|
+
...tokens.loafPalette,
|
|
112
|
+
primary: tokens.loafPalette.cobalt,
|
|
113
|
+
secondary: tokens.loafPalette.sand,
|
|
114
|
+
accent: tokens.loafPalette.gold
|
|
115
|
+
},
|
|
116
|
+
fontFamily: {
|
|
117
|
+
display: tokens.loafTypography.fontFamilies.display.split(",").map((font) => font.trim().replaceAll("'", "")),
|
|
118
|
+
sans: tokens.loafTypography.fontFamilies.body.split(",").map((font) => font.trim().replaceAll("'", "")),
|
|
119
|
+
mono: tokens.loafTypography.fontFamilies.mono.split(",").map((font) => font.trim().replaceAll("'", ""))
|
|
120
|
+
},
|
|
121
|
+
fontSize: tokens.loafTypography.fontSizes,
|
|
122
|
+
lineHeight: tokens.loafTypography.lineHeights,
|
|
123
|
+
boxShadow: {
|
|
124
|
+
subtle: tokens.loafShadows.subtle,
|
|
125
|
+
medium: tokens.loafShadows.medium,
|
|
126
|
+
bold: tokens.loafShadows.bold
|
|
127
|
+
},
|
|
128
|
+
spacing: tokens.loafSpacing,
|
|
129
|
+
borderRadius: rounded
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
plugins: [
|
|
133
|
+
(0, import_plugin.default)(({ addBase }) => {
|
|
134
|
+
addBase({
|
|
135
|
+
":root": {
|
|
136
|
+
"--color-accent": tokens.loafPalette.gold,
|
|
137
|
+
"--color-accent-hover": "#f8d12f",
|
|
138
|
+
"--loaf-gradient": `linear-gradient(135deg, ${tokens.loafPalette.cobalt}, ${tokens.loafPalette.azure}, ${tokens.loafPalette.coral})`
|
|
139
|
+
},
|
|
140
|
+
body: {
|
|
141
|
+
fontFamily: tokens.loafTypography.fontFamilies.body,
|
|
142
|
+
color: tokens.loafPalette.midnight,
|
|
143
|
+
backgroundColor: tokens.loafPalette.bone
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
Object.defineProperty(exports, "loafTokens", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function () { return tokens.loafTokens; }
|
|
153
|
+
});
|
|
154
|
+
exports.loafPreset = loafPreset;
|
|
155
|
+
//# sourceMappingURL=index.cjs.map
|
|
156
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/util/createPlugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/public/create-plugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/plugin.js","../src/index.ts"],"names":["exports","plugin","loafRadii","loafPalette","loafTypography","loafShadows","loafSpacing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,oBAAA,GAAA,UAAA,CAAA;AAAA,EAAA,+FAAA,CAAAA,SAAA,EAAA;AACA,IAAA,MAAA,CAAO,cAAA,CAAeA,WAAS,YAAA,EAAc;AAAA,MACzC,KAAA,EAAO;AAAA,KACV,CAAA;AACD,IAAA,MAAA,CAAO,cAAA,CAAeA,WAAS,SAAA,EAAW;AAAA,MACtC,UAAA,EAAY,IAAA;AAAA,MACZ,KAAK,WAAW;AACZ,QAAA,OAAO,QAAA;AAAA,MACX;AAAA,KACH,CAAA;AACD,IAAA,SAAS,YAAA,CAAaC,SAAQ,MAAA,EAAQ;AAClC,MAAA,OAAO;AAAA,QACH,OAAA,EAASA,OAAAA;AAAA,QACT;AAAA,OACJ;AAAA,IACJ;AACA,IAAA,YAAA,CAAa,cAAc,SAAS,cAAA,EAAgB,cAAA,GAAiB,OAAK,EAAC,CAAA,EAAI;AAC3E,MAAA,MAAM,eAAA,GAAkB,SAAS,OAAA,EAAS;AACtC,QAAA,OAAO;AAAA,UACH,SAAA,EAAW,OAAA;AAAA,UACX,OAAA,EAAS,eAAe,OAAO,CAAA;AAAA,UAC/B,MAAA,EAAQ,eAAe,OAAO;AAAA,SAClC;AAAA,MACJ,CAAA;AACA,MAAA,eAAA,CAAgB,mBAAA,GAAsB,IAAA;AAGtC,MAAA,eAAA,CAAgB,gBAAA,GAAmB,cAAA;AACnC,MAAA,eAAA,CAAgB,gBAAA,GAAmB,cA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P,aAAA,CAAAL,OAAAA,EAAO,CAAC,EAAE,SAAQ,KAAM;AACtB,MAAA,OAAA,CAAQ;AAAA,QACN,OAAA,EAAS;AAAA,UACP,kBAAkBE,kBAAA,CAAY,IAAA;AAAA,UAC9B,sBAAA,EAAwB,SAAA;AAAA,UACxB,iBAAA,EAAmB,2BAA2BA,kBAAA,CAAY,MAAM,KAAKA,kBAAA,CAAY,KAAK,CAAA,EAAA,EAAKA,kBAAA,CAAY,KAAK,CAAA,CAAA;AAAA,SAC9G;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,UAAA,EAAYC,sBAAe,YAAA,CAAa,IAAA;AAAA,UACxC,OAAOD,kBAAA,CAAY,QAAA;AAAA,UACnB,iBAAiBA,kBAAA,CAAY;AAAA;AAC/B,OACD,CAAA;AAAA,IACH,CAAC;AAAA;AAEL","file":"index.cjs","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import type { Config } from \"tailwindcss\";\nimport plugin from \"tailwindcss/plugin\";\nimport {\n loafRadii,\n loafPalette,\n loafShadows,\n loafSpacing,\n loafTokens,\n loafTypography\n} from \"@loafmarkets/tokens\";\n\nconst rounded = {\n none: loafRadii.none,\n xs: loafRadii.xs,\n sm: loafRadii.sm,\n md: loafRadii.md,\n lg: loafRadii.lg,\n pill: loafRadii.pill\n};\n\nconst loafPreset = {\n content: [],\n theme: {\n extend: {\n colors: {\n ...loafPalette,\n primary: loafPalette.cobalt,\n secondary: loafPalette.sand,\n accent: loafPalette.gold\n },\n fontFamily: {\n display: loafTypography.fontFamilies.display.split(\",\").map((font) => font.trim().replaceAll(\"'\", \"\")),\n sans: loafTypography.fontFamilies.body.split(\",\").map((font) => font.trim().replaceAll(\"'\", \"\")),\n mono: loafTypography.fontFamilies.mono.split(\",\").map((font) => font.trim().replaceAll(\"'\", \"\"))\n },\n fontSize: loafTypography.fontSizes,\n lineHeight: loafTypography.lineHeights,\n boxShadow: {\n subtle: loafShadows.subtle,\n medium: loafShadows.medium,\n bold: loafShadows.bold\n },\n spacing: loafSpacing,\n borderRadius: rounded\n }\n },\n plugins: [\n plugin(({ addBase }) => {\n addBase({\n \":root\": {\n \"--color-accent\": loafPalette.gold,\n \"--color-accent-hover\": \"#f8d12f\",\n \"--loaf-gradient\": `linear-gradient(135deg, ${loafPalette.cobalt}, ${loafPalette.azure}, ${loafPalette.coral})`\n },\n body: {\n fontFamily: loafTypography.fontFamilies.body,\n color: loafPalette.midnight,\n backgroundColor: loafPalette.bone\n }\n });\n })\n ]\n} satisfies Config;\n\nexport type LoafTailwindPreset = typeof loafPreset;\n\nexport { loafPreset, loafTokens };\n"]}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
|
2
|
+
export { loafTokens } from '@loafmarkets/tokens';
|
|
3
|
+
|
|
4
|
+
declare const loafPreset: {
|
|
5
|
+
content: never[];
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {
|
|
8
|
+
colors: {
|
|
9
|
+
primary: "#1B4B73";
|
|
10
|
+
secondary: "#F4E7D4";
|
|
11
|
+
accent: "#e6c87e";
|
|
12
|
+
midnight: "#04050C";
|
|
13
|
+
ocean: "#0D2239";
|
|
14
|
+
cobalt: "#1B4B73";
|
|
15
|
+
azure: "#3A76B1";
|
|
16
|
+
sky: "#7EB3E6";
|
|
17
|
+
sand: "#F4E7D4";
|
|
18
|
+
wheat: "#F8F1E5";
|
|
19
|
+
bone: "#FDFBF7";
|
|
20
|
+
gold: "#e6c87e";
|
|
21
|
+
coral: "#FF6F61";
|
|
22
|
+
apricot: "#FFB997";
|
|
23
|
+
lime: "#D3F36B";
|
|
24
|
+
};
|
|
25
|
+
fontFamily: {
|
|
26
|
+
display: string[];
|
|
27
|
+
sans: string[];
|
|
28
|
+
mono: string[];
|
|
29
|
+
};
|
|
30
|
+
fontSize: {
|
|
31
|
+
readonly xs: "0.75rem";
|
|
32
|
+
readonly sm: "0.875rem";
|
|
33
|
+
readonly md: "1rem";
|
|
34
|
+
readonly lg: "1.125rem";
|
|
35
|
+
readonly xl: "1.25rem";
|
|
36
|
+
readonly "2xl": "1.5rem";
|
|
37
|
+
readonly "3xl": "1.875rem";
|
|
38
|
+
readonly "4xl": "2.25rem";
|
|
39
|
+
readonly "5xl": "3rem";
|
|
40
|
+
};
|
|
41
|
+
lineHeight: {
|
|
42
|
+
readonly tight: "1.1";
|
|
43
|
+
readonly snug: "1.2";
|
|
44
|
+
readonly normal: "1.5";
|
|
45
|
+
};
|
|
46
|
+
boxShadow: {
|
|
47
|
+
subtle: "0 10px 25px rgba(4, 5, 12, 0.08)";
|
|
48
|
+
medium: "0 20px 45px rgba(4, 5, 12, 0.12)";
|
|
49
|
+
bold: "0 30px 60px rgba(4, 5, 12, 0.18)";
|
|
50
|
+
};
|
|
51
|
+
spacing: {
|
|
52
|
+
readonly 0: "0px";
|
|
53
|
+
readonly 1: "4px";
|
|
54
|
+
readonly 2: "8px";
|
|
55
|
+
readonly 3: "12px";
|
|
56
|
+
readonly 4: "16px";
|
|
57
|
+
readonly 5: "20px";
|
|
58
|
+
readonly 6: "24px";
|
|
59
|
+
readonly 8: "32px";
|
|
60
|
+
readonly 10: "40px";
|
|
61
|
+
readonly 12: "48px";
|
|
62
|
+
};
|
|
63
|
+
borderRadius: {
|
|
64
|
+
none: "0px";
|
|
65
|
+
xs: "4px";
|
|
66
|
+
sm: "6px";
|
|
67
|
+
md: "10px";
|
|
68
|
+
lg: "16px";
|
|
69
|
+
pill: "999px";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
plugins: {
|
|
74
|
+
handler: tailwindcss_types_config.PluginCreator;
|
|
75
|
+
config?: Partial<tailwindcss_types_config.Config>;
|
|
76
|
+
}[];
|
|
77
|
+
};
|
|
78
|
+
type LoafTailwindPreset = typeof loafPreset;
|
|
79
|
+
|
|
80
|
+
export { type LoafTailwindPreset, loafPreset };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
|
2
|
+
export { loafTokens } from '@loafmarkets/tokens';
|
|
3
|
+
|
|
4
|
+
declare const loafPreset: {
|
|
5
|
+
content: never[];
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {
|
|
8
|
+
colors: {
|
|
9
|
+
primary: "#1B4B73";
|
|
10
|
+
secondary: "#F4E7D4";
|
|
11
|
+
accent: "#e6c87e";
|
|
12
|
+
midnight: "#04050C";
|
|
13
|
+
ocean: "#0D2239";
|
|
14
|
+
cobalt: "#1B4B73";
|
|
15
|
+
azure: "#3A76B1";
|
|
16
|
+
sky: "#7EB3E6";
|
|
17
|
+
sand: "#F4E7D4";
|
|
18
|
+
wheat: "#F8F1E5";
|
|
19
|
+
bone: "#FDFBF7";
|
|
20
|
+
gold: "#e6c87e";
|
|
21
|
+
coral: "#FF6F61";
|
|
22
|
+
apricot: "#FFB997";
|
|
23
|
+
lime: "#D3F36B";
|
|
24
|
+
};
|
|
25
|
+
fontFamily: {
|
|
26
|
+
display: string[];
|
|
27
|
+
sans: string[];
|
|
28
|
+
mono: string[];
|
|
29
|
+
};
|
|
30
|
+
fontSize: {
|
|
31
|
+
readonly xs: "0.75rem";
|
|
32
|
+
readonly sm: "0.875rem";
|
|
33
|
+
readonly md: "1rem";
|
|
34
|
+
readonly lg: "1.125rem";
|
|
35
|
+
readonly xl: "1.25rem";
|
|
36
|
+
readonly "2xl": "1.5rem";
|
|
37
|
+
readonly "3xl": "1.875rem";
|
|
38
|
+
readonly "4xl": "2.25rem";
|
|
39
|
+
readonly "5xl": "3rem";
|
|
40
|
+
};
|
|
41
|
+
lineHeight: {
|
|
42
|
+
readonly tight: "1.1";
|
|
43
|
+
readonly snug: "1.2";
|
|
44
|
+
readonly normal: "1.5";
|
|
45
|
+
};
|
|
46
|
+
boxShadow: {
|
|
47
|
+
subtle: "0 10px 25px rgba(4, 5, 12, 0.08)";
|
|
48
|
+
medium: "0 20px 45px rgba(4, 5, 12, 0.12)";
|
|
49
|
+
bold: "0 30px 60px rgba(4, 5, 12, 0.18)";
|
|
50
|
+
};
|
|
51
|
+
spacing: {
|
|
52
|
+
readonly 0: "0px";
|
|
53
|
+
readonly 1: "4px";
|
|
54
|
+
readonly 2: "8px";
|
|
55
|
+
readonly 3: "12px";
|
|
56
|
+
readonly 4: "16px";
|
|
57
|
+
readonly 5: "20px";
|
|
58
|
+
readonly 6: "24px";
|
|
59
|
+
readonly 8: "32px";
|
|
60
|
+
readonly 10: "40px";
|
|
61
|
+
readonly 12: "48px";
|
|
62
|
+
};
|
|
63
|
+
borderRadius: {
|
|
64
|
+
none: "0px";
|
|
65
|
+
xs: "4px";
|
|
66
|
+
sm: "6px";
|
|
67
|
+
md: "10px";
|
|
68
|
+
lg: "16px";
|
|
69
|
+
pill: "999px";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
plugins: {
|
|
74
|
+
handler: tailwindcss_types_config.PluginCreator;
|
|
75
|
+
config?: Partial<tailwindcss_types_config.Config>;
|
|
76
|
+
}[];
|
|
77
|
+
};
|
|
78
|
+
type LoafTailwindPreset = typeof loafPreset;
|
|
79
|
+
|
|
80
|
+
export { type LoafTailwindPreset, loafPreset };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { loafRadii, loafPalette, loafTypography, loafShadows, loafSpacing } from '@loafmarkets/tokens';
|
|
2
|
+
export { loafTokens } from '@loafmarkets/tokens';
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
|
|
30
|
+
// ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/util/createPlugin.js
|
|
31
|
+
var require_createPlugin = __commonJS({
|
|
32
|
+
"../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/util/createPlugin.js"(exports$1) {
|
|
33
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports$1, "default", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function() {
|
|
39
|
+
return _default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
function createPlugin(plugin2, config) {
|
|
43
|
+
return {
|
|
44
|
+
handler: plugin2,
|
|
45
|
+
config
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
createPlugin.withOptions = function(pluginFunction, configFunction = () => ({})) {
|
|
49
|
+
const optionsFunction = function(options) {
|
|
50
|
+
return {
|
|
51
|
+
__options: options,
|
|
52
|
+
handler: pluginFunction(options),
|
|
53
|
+
config: configFunction(options)
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
optionsFunction.__isOptionsFunction = true;
|
|
57
|
+
optionsFunction.__pluginFunction = pluginFunction;
|
|
58
|
+
optionsFunction.__configFunction = configFunction;
|
|
59
|
+
return optionsFunction;
|
|
60
|
+
};
|
|
61
|
+
var _default = createPlugin;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/public/create-plugin.js
|
|
66
|
+
var require_create_plugin = __commonJS({
|
|
67
|
+
"../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/public/create-plugin.js"(exports$1) {
|
|
68
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
69
|
+
value: true
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports$1, "default", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function() {
|
|
74
|
+
return _default;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
var _createPlugin = /* @__PURE__ */ _interop_require_default(require_createPlugin());
|
|
78
|
+
function _interop_require_default(obj) {
|
|
79
|
+
return obj && obj.__esModule ? obj : {
|
|
80
|
+
default: obj
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
var _default = _createPlugin.default;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/plugin.js
|
|
88
|
+
var require_plugin = __commonJS({
|
|
89
|
+
"../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/plugin.js"(exports$1, module) {
|
|
90
|
+
var createPlugin = require_create_plugin();
|
|
91
|
+
module.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// src/index.ts
|
|
96
|
+
var import_plugin = __toESM(require_plugin());
|
|
97
|
+
var rounded = {
|
|
98
|
+
none: loafRadii.none,
|
|
99
|
+
xs: loafRadii.xs,
|
|
100
|
+
sm: loafRadii.sm,
|
|
101
|
+
md: loafRadii.md,
|
|
102
|
+
lg: loafRadii.lg,
|
|
103
|
+
pill: loafRadii.pill
|
|
104
|
+
};
|
|
105
|
+
var loafPreset = {
|
|
106
|
+
content: [],
|
|
107
|
+
theme: {
|
|
108
|
+
extend: {
|
|
109
|
+
colors: {
|
|
110
|
+
...loafPalette,
|
|
111
|
+
primary: loafPalette.cobalt,
|
|
112
|
+
secondary: loafPalette.sand,
|
|
113
|
+
accent: loafPalette.gold
|
|
114
|
+
},
|
|
115
|
+
fontFamily: {
|
|
116
|
+
display: loafTypography.fontFamilies.display.split(",").map((font) => font.trim().replaceAll("'", "")),
|
|
117
|
+
sans: loafTypography.fontFamilies.body.split(",").map((font) => font.trim().replaceAll("'", "")),
|
|
118
|
+
mono: loafTypography.fontFamilies.mono.split(",").map((font) => font.trim().replaceAll("'", ""))
|
|
119
|
+
},
|
|
120
|
+
fontSize: loafTypography.fontSizes,
|
|
121
|
+
lineHeight: loafTypography.lineHeights,
|
|
122
|
+
boxShadow: {
|
|
123
|
+
subtle: loafShadows.subtle,
|
|
124
|
+
medium: loafShadows.medium,
|
|
125
|
+
bold: loafShadows.bold
|
|
126
|
+
},
|
|
127
|
+
spacing: loafSpacing,
|
|
128
|
+
borderRadius: rounded
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
plugins: [
|
|
132
|
+
(0, import_plugin.default)(({ addBase }) => {
|
|
133
|
+
addBase({
|
|
134
|
+
":root": {
|
|
135
|
+
"--color-accent": loafPalette.gold,
|
|
136
|
+
"--color-accent-hover": "#f8d12f",
|
|
137
|
+
"--loaf-gradient": `linear-gradient(135deg, ${loafPalette.cobalt}, ${loafPalette.azure}, ${loafPalette.coral})`
|
|
138
|
+
},
|
|
139
|
+
body: {
|
|
140
|
+
fontFamily: loafTypography.fontFamilies.body,
|
|
141
|
+
color: loafPalette.midnight,
|
|
142
|
+
backgroundColor: loafPalette.bone
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export { loafPreset };
|
|
150
|
+
//# sourceMappingURL=index.js.map
|
|
151
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/util/createPlugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/lib/public/create-plugin.js","../../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/plugin.js","../src/index.ts"],"names":["exports","plugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,oBAAA,GAAA,UAAA,CAAA;AAAA,EAAA,+FAAA,CAAAA,SAAA,EAAA;AACA,IAAA,MAAA,CAAO,cAAA,CAAeA,WAAS,YAAA,EAAc;AAAA,MACzC,KAAA,EAAO;AAAA,KACV,CAAA;AACD,IAAA,MAAA,CAAO,cAAA,CAAeA,WAAS,SAAA,EAAW;AAAA,MACtC,UAAA,EAAY,IAAA;AAAA,MACZ,KAAK,WAAW;AACZ,QAAA,OAAO,QAAA;AAAA,MACX;AAAA,KACH,CAAA;AACD,IAAA,SAAS,YAAA,CAAaC,SAAQ,MAAA,EAAQ;AAClC,MAAA,OAAO;AAAA,QACH,OAAA,EAASA,OAAAA;AAAA,QACT;AAAA,OACJ;AAAA,IACJ;AACA,IAAA,YAAA,CAAa,cAAc,SAAS,cAAA,EAAgB,cAAA,GAAiB,OAAK,EAAC,CAAA,EAAI;AAC3E,MAAA,MAAM,eAAA,GAAkB,SAAS,OAAA,EAAS;AACtC,QAAA,OAAO;AAAA,UACH,SAAA,EAAW,OAAA;AAAA,UACX,OAAA,EAAS,eAAe,OAAO,CAAA;AAAA,UAC/B,MAAA,EAAQ,eAAe,OAAO;AAAA,SAClC;AAAA,MACJ,CAAA;AACA,MAAA,eAAA,CAAgB,mBAAA,GAAsB,IAAA;AAGtC,MAAA,eAAA,CAAgB,gBAAA,GAAmB,cAAA;AACnC,MAAA,eAAA,CAAgB,gBAAA,GAAmB,cAAA;AACnC,MAAA,OAAO,eAAA;AAAA,IACX,CAAA;AACA,IAAA,IAAM,QAAA,GAAW,YAAA;AAAA,EAAA;AAAA,CAAA,CAAA;;;AC/BjB,IAAA,qBAAA,GAAA,UAAA,CAAA;AAAA,EAAA,kGAAA,CAAAD,SAAA,EAAA;AACA,IAAA,MAAA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,KAAK,CAAA,EAAA,EAAK,WAAA,CAAY,KAAK,CAAA,CAAA;AAAA,SAC9G;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,UAAA,EAAY,eAAe,YAAA,CAAa,IAAA;AAAA,UACxC,OAAO,WAAA,CAAY,QAAA;AAAA,UACnB,iBAAiB,WAAA,CAAY;AAAA;AAC/B,OACD,CAAA;AAAA,IACH,CAAC;AAAA;AAEL","file":"index.js","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nfunction createPlugin(plugin, config) {\n return {\n handler: plugin,\n config\n };\n}\ncreatePlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {\n const optionsFunction = function(options) {\n return {\n __options: options,\n handler: pluginFunction(options),\n config: configFunction(options)\n };\n };\n optionsFunction.__isOptionsFunction = true;\n // Expose plugin dependencies so that `object-hash` returns a different\n // value if anything here changes, to ensure a rebuild is triggered.\n optionsFunction.__pluginFunction = pluginFunction;\n optionsFunction.__configFunction = configFunction;\n return optionsFunction;\n};\nconst _default = createPlugin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function() {\n return _default;\n }\n});\nconst _createPlugin = /*#__PURE__*/ _interop_require_default(require(\"../util/createPlugin\"));\nfunction _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nconst _default = _createPlugin.default;\n","let createPlugin = require('./lib/public/create-plugin')\nmodule.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default\n","import type { Config } from \"tailwindcss\";\nimport plugin from \"tailwindcss/plugin\";\nimport {\n loafRadii,\n loafPalette,\n loafShadows,\n loafSpacing,\n loafTokens,\n loafTypography\n} from \"@loafmarkets/tokens\";\n\nconst rounded = {\n none: loafRadii.none,\n xs: loafRadii.xs,\n sm: loafRadii.sm,\n md: loafRadii.md,\n lg: loafRadii.lg,\n pill: loafRadii.pill\n};\n\nconst loafPreset = {\n content: [],\n theme: {\n extend: {\n colors: {\n ...loafPalette,\n primary: loafPalette.cobalt,\n secondary: loafPalette.sand,\n accent: loafPalette.gold\n },\n fontFamily: {\n display: loafTypography.fontFamilies.display.split(\",\").map((font) => font.trim().replaceAll(\"'\", \"\")),\n sans: loafTypography.fontFamilies.body.split(\",\").map((font) => font.trim().replaceAll(\"'\", \"\")),\n mono: loafTypography.fontFamilies.mono.split(\",\").map((font) => font.trim().replaceAll(\"'\", \"\"))\n },\n fontSize: loafTypography.fontSizes,\n lineHeight: loafTypography.lineHeights,\n boxShadow: {\n subtle: loafShadows.subtle,\n medium: loafShadows.medium,\n bold: loafShadows.bold\n },\n spacing: loafSpacing,\n borderRadius: rounded\n }\n },\n plugins: [\n plugin(({ addBase }) => {\n addBase({\n \":root\": {\n \"--color-accent\": loafPalette.gold,\n \"--color-accent-hover\": \"#f8d12f\",\n \"--loaf-gradient\": `linear-gradient(135deg, ${loafPalette.cobalt}, ${loafPalette.azure}, ${loafPalette.coral})`\n },\n body: {\n fontFamily: loafTypography.fontFamilies.body,\n color: loafPalette.midnight,\n backgroundColor: loafPalette.bone\n }\n });\n })\n ]\n} satisfies Config;\n\nexport type LoafTailwindPreset = typeof loafPreset;\n\nexport { loafPreset, loafTokens };\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loafmarkets/tailwind-config",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Shared Tailwind preset for Loaf component surfaces",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "dist/index.cjs",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"require": "./dist/index.cjs",
|
|
16
|
+
"types": "./dist/index.d.ts"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "restricted"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@loafmarkets/tokens": "0.0.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"tailwindcss": "3.4.13",
|
|
27
|
+
"tsup": "8.3.0",
|
|
28
|
+
"typescript": "5.6.3",
|
|
29
|
+
"vitest": "2.1.4"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
33
|
+
"dev": "tsup src/index.ts --format esm,cjs --dts --watch",
|
|
34
|
+
"lint": "biome check \"src/**/*.ts\"",
|
|
35
|
+
"test": "vitest run"
|
|
36
|
+
}
|
|
37
|
+
}
|