tailwind-styled-v4 1.0.0 → 1.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/README.md +467 -189
- package/dist/cli/init.js +208 -0
- package/dist/index.d.mts +63 -34
- package/dist/index.d.ts +63 -34
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -77
package/dist/cli/init.js
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
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
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/cli/init.ts
|
|
32
|
+
var init_exports = {};
|
|
33
|
+
__export(init_exports, {
|
|
34
|
+
runInit: () => runInit
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(init_exports);
|
|
37
|
+
var import_fs = __toESM(require("fs"));
|
|
38
|
+
var import_path = __toESM(require("path"));
|
|
39
|
+
var GREEN = (s) => `\x1B[32m${s}\x1B[0m`;
|
|
40
|
+
var YELLOW = (s) => `\x1B[33m${s}\x1B[0m`;
|
|
41
|
+
var CYAN = (s) => `\x1B[36m${s}\x1B[0m`;
|
|
42
|
+
var BOLD = (s) => `\x1B[1m${s}\x1B[0m`;
|
|
43
|
+
var DIM = (s) => `\x1B[2m${s}\x1B[0m`;
|
|
44
|
+
function writeFile(absPath, content, force) {
|
|
45
|
+
const dir = import_path.default.dirname(absPath);
|
|
46
|
+
if (!import_fs.default.existsSync(dir)) import_fs.default.mkdirSync(dir, { recursive: true });
|
|
47
|
+
if (import_fs.default.existsSync(absPath) && !force) return "skipped";
|
|
48
|
+
import_fs.default.writeFileSync(absPath, content, "utf-8");
|
|
49
|
+
return "written";
|
|
50
|
+
}
|
|
51
|
+
function fileExists(cwd, ...parts) {
|
|
52
|
+
return import_fs.default.existsSync(import_path.default.join(cwd, ...parts));
|
|
53
|
+
}
|
|
54
|
+
function readJson(cwd, file) {
|
|
55
|
+
try {
|
|
56
|
+
return JSON.parse(import_fs.default.readFileSync(import_path.default.join(cwd, file), "utf-8"));
|
|
57
|
+
} catch {
|
|
58
|
+
return {};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function detectFramework(cwd) {
|
|
62
|
+
const pkg = readJson(cwd, "package.json");
|
|
63
|
+
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
64
|
+
if (deps["next"]) return "next";
|
|
65
|
+
if (deps["vite"]) return "vite";
|
|
66
|
+
if (deps["@remix-run/react"]) return "remix";
|
|
67
|
+
if (deps["astro"]) return "astro";
|
|
68
|
+
return "generic";
|
|
69
|
+
}
|
|
70
|
+
var VSCODE_SETTINGS = JSON.stringify({
|
|
71
|
+
"tailwindCSS.experimental.classRegex": [
|
|
72
|
+
["tw\\.\\w+`([^`]*)`", "([^`]*)"],
|
|
73
|
+
["tw\\.\\w+\\(([^)]*)\\)", '"([^"]*)"'],
|
|
74
|
+
["cv\\(([^)]*)\\)", '"([^"]*)"'],
|
|
75
|
+
["\\.extend`([^`]*)`", "([^`]*)"],
|
|
76
|
+
['withTw\\([^,]+,\\s*"([^"]*)', '([^"]*)'],
|
|
77
|
+
["cls`([^`]*)`", "([^`]*)"],
|
|
78
|
+
["(?:cx|clsx|cn|cxm)\\(([^)]*)\\)", '"([^"]*)"']
|
|
79
|
+
],
|
|
80
|
+
"tailwindCSS.includeLanguages": {
|
|
81
|
+
"typescript": "html",
|
|
82
|
+
"typescriptreact": "html"
|
|
83
|
+
},
|
|
84
|
+
"editor.quickSuggestions": { "strings": "on" },
|
|
85
|
+
"files.associations": { "*.css": "tailwindcss" }
|
|
86
|
+
}, null, 2);
|
|
87
|
+
var VSCODE_EXTENSIONS = JSON.stringify({
|
|
88
|
+
recommendations: [
|
|
89
|
+
"bradlc.vscode-tailwindcss",
|
|
90
|
+
"esbenp.prettier-vscode",
|
|
91
|
+
"dbaeumer.vscode-eslint",
|
|
92
|
+
"styled-components.vscode-styled-components"
|
|
93
|
+
]
|
|
94
|
+
}, null, 2);
|
|
95
|
+
function getNextConfig(_hasTs) {
|
|
96
|
+
return `/** @type {import('next').NextConfig} */
|
|
97
|
+
// tailwind-styled-v4: wrap your config with withTailwindStyled
|
|
98
|
+
// File: next.config.ts
|
|
99
|
+
|
|
100
|
+
import { withTailwindStyled } from "tailwind-styled-v4/compiler"
|
|
101
|
+
|
|
102
|
+
const nextConfig = {
|
|
103
|
+
// your existing config here
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export default withTailwindStyled(nextConfig)
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
function getViteConfig(_hasTs) {
|
|
110
|
+
return `import { defineConfig } from "vite"
|
|
111
|
+
import react from "@vitejs/plugin-react"
|
|
112
|
+
import { tailwindStyledVite } from "tailwind-styled-v4/compiler"
|
|
113
|
+
|
|
114
|
+
// tailwind-styled-v4: add tailwindStyledVite() to plugins
|
|
115
|
+
export default defineConfig({
|
|
116
|
+
plugins: [
|
|
117
|
+
react(),
|
|
118
|
+
tailwindStyledVite(),
|
|
119
|
+
],
|
|
120
|
+
})
|
|
121
|
+
`;
|
|
122
|
+
}
|
|
123
|
+
var TAILWIND_CSS = `/* Tailwind CSS v4 \u2014 generated by tailwind-styled-v4 init */
|
|
124
|
+
@import "tailwindcss";
|
|
125
|
+
|
|
126
|
+
@theme {
|
|
127
|
+
--font-sans: "Inter", system-ui, sans-serif;
|
|
128
|
+
--font-mono: "JetBrains Mono", monospace;
|
|
129
|
+
|
|
130
|
+
/* Brand colors \u2014 customize as needed */
|
|
131
|
+
--color-brand: #2563eb;
|
|
132
|
+
--color-brand-hover: #1d4ed8;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@layer base {
|
|
136
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
137
|
+
body { @apply antialiased; }
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
async function runInit(options) {
|
|
141
|
+
const { cwd, framework, force } = options;
|
|
142
|
+
const written = [];
|
|
143
|
+
const skipped = [];
|
|
144
|
+
function write(relPath, content) {
|
|
145
|
+
const result = writeFile(import_path.default.join(cwd, relPath), content, force);
|
|
146
|
+
if (result === "written") written.push(relPath);
|
|
147
|
+
else skipped.push(relPath);
|
|
148
|
+
}
|
|
149
|
+
console.info(BOLD("\n tailwind-styled-v4 init\n"));
|
|
150
|
+
console.info(` Framework: ${CYAN(framework)}`);
|
|
151
|
+
console.info(` Directory: ${DIM(cwd)}
|
|
152
|
+
`);
|
|
153
|
+
const _hasTs = fileExists(cwd, "tsconfig.json");
|
|
154
|
+
write(".vscode/settings.json", VSCODE_SETTINGS);
|
|
155
|
+
write(".vscode/extensions.json", VSCODE_EXTENSIONS);
|
|
156
|
+
const configHintPath = framework === "next" ? ".tailwind-styled-v4.next-config-hint.md" : framework === "vite" ? ".tailwind-styled-v4.vite-config-hint.md" : null;
|
|
157
|
+
if (configHintPath) {
|
|
158
|
+
const content = framework === "next" ? getNextConfig(_hasTs) : getViteConfig(_hasTs);
|
|
159
|
+
write(configHintPath, content);
|
|
160
|
+
}
|
|
161
|
+
if (framework === "next") {
|
|
162
|
+
const cssPath = fileExists(cwd, "app") ? "app/globals.css" : "src/app/globals.css";
|
|
163
|
+
if (!fileExists(cwd, cssPath)) write(cssPath, TAILWIND_CSS);
|
|
164
|
+
else skipped.push(cssPath + " (exists)");
|
|
165
|
+
} else if (framework === "vite" || framework === "remix") {
|
|
166
|
+
if (!fileExists(cwd, "src/index.css")) write("src/index.css", TAILWIND_CSS);
|
|
167
|
+
else skipped.push("src/index.css (exists)");
|
|
168
|
+
}
|
|
169
|
+
console.info(" " + BOLD("Files created:"));
|
|
170
|
+
written.forEach((f) => console.info(" " + GREEN("\u2713") + " " + f));
|
|
171
|
+
if (skipped.length > 0) {
|
|
172
|
+
console.info("\n " + YELLOW("Skipped (already exists):"));
|
|
173
|
+
skipped.forEach((f) => console.info(" " + DIM("\u2022 " + f)));
|
|
174
|
+
console.info(" " + DIM("Run with --force to overwrite\n"));
|
|
175
|
+
}
|
|
176
|
+
console.info("\n " + BOLD("Next steps:"));
|
|
177
|
+
if (framework === "next") {
|
|
178
|
+
console.info(` 1. Add ${CYAN("withTailwindStyled")} to your ${CYAN("next.config.ts")}:`);
|
|
179
|
+
console.info(` ${DIM('import { withTailwindStyled } from "tailwind-styled-v4/compiler"')}`);
|
|
180
|
+
console.info(` ${DIM("export default withTailwindStyled(nextConfig)")}`);
|
|
181
|
+
} else if (framework === "vite") {
|
|
182
|
+
console.info(` 1. Add ${CYAN("tailwindStyledVite()")} to your ${CYAN("vite.config.ts")} plugins`);
|
|
183
|
+
}
|
|
184
|
+
console.info(` ${framework === "next" || framework === "vite" ? 2 : 1}. Install VSCode extension: ${CYAN("bradlc.vscode-tailwindcss")}`);
|
|
185
|
+
console.info(` ${framework === "next" || framework === "vite" ? 3 : 2}. Start using:`);
|
|
186
|
+
console.info(` ${DIM('import { tw } from "tailwind-styled-v4"')}`);
|
|
187
|
+
console.info(` ${DIM("const Box = tw.div`p-4 bg-blue-500 rounded`")}
|
|
188
|
+
`);
|
|
189
|
+
}
|
|
190
|
+
var args = process.argv.slice(2);
|
|
191
|
+
var command = args[0];
|
|
192
|
+
if (command === "init" || command === void 0) {
|
|
193
|
+
const cwd = process.cwd();
|
|
194
|
+
const framework = args.find((a) => a.startsWith("--framework="))?.split("=")[1] ?? detectFramework(cwd);
|
|
195
|
+
const force = args.includes("--force");
|
|
196
|
+
runInit({ cwd, framework, force }).catch((err) => {
|
|
197
|
+
console.error(err);
|
|
198
|
+
process.exit(1);
|
|
199
|
+
});
|
|
200
|
+
} else {
|
|
201
|
+
console.error(`Unknown command: ${command}`);
|
|
202
|
+
console.info("Usage: npx tailwind-styled-v4 init [--framework=next|vite|remix|astro] [--force]");
|
|
203
|
+
process.exit(1);
|
|
204
|
+
}
|
|
205
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
206
|
+
0 && (module.exports = {
|
|
207
|
+
runInit
|
|
208
|
+
});
|
package/dist/index.d.mts
CHANGED
|
@@ -37,39 +37,55 @@ interface ExtendableComponent {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* tailwind-styled-v4 — tw
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* ③ Extend existing components:
|
|
62
|
-
* const Card = tw.div`p-6 rounded-2xl bg-zinc-900`
|
|
63
|
-
* const HeroCard = Card.extend`border border-zinc-700 shadow-xl`
|
|
64
|
-
*
|
|
65
|
-
* ④ Wrap existing styled / React components:
|
|
66
|
-
* const StyledLink = tw(Link)`underline text-blue-400`
|
|
40
|
+
* tailwind-styled-v4 v2 — tw
|
|
41
|
+
*
|
|
42
|
+
* ── Changelog v2 ──────────────────────────────────────────────────────────────
|
|
43
|
+
*
|
|
44
|
+
* FIX 1 — import { tw } undefined in Next.js / Vite
|
|
45
|
+
* BEFORE: export const tw = new Proxy(fn, { get })
|
|
46
|
+
* tsup splitting:true + Proxy = tw resolves undefined after chunk split
|
|
47
|
+
* AFTER: Object.assign(callable, { div, button, ... })
|
|
48
|
+
* Plain object, pre-built at module load, transparent to all bundlers
|
|
49
|
+
*
|
|
50
|
+
* FIX 2 — tw.div<Props>`${({ $isHover }) => ...}` TypeScript generic
|
|
51
|
+
* BEFORE: TwTagFactory not generic → "Binding element '$isHover' implicitly has 'any' type"
|
|
52
|
+
* AFTER: TwTagFactory<P> is a generic function → full type inference on template interpolations
|
|
53
|
+
*
|
|
54
|
+
* API (unchanged, backward compatible):
|
|
55
|
+
* tw.div`p-4 bg-zinc-900`
|
|
56
|
+
* tw.div<BadgeProps>`${({ $isHover }) => $isHover ? "opacity-100" : "opacity-0"}`
|
|
57
|
+
* tw.button({ base, variants, compoundVariants, defaultVariants })
|
|
58
|
+
* tw.div`...`.extend`extra`
|
|
59
|
+
* tw(Link)`underline text-blue-400`
|
|
60
|
+
* tw(Button)({ base, variants })
|
|
67
61
|
*/
|
|
68
62
|
|
|
69
|
-
|
|
70
|
-
type
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
/** Valid values inside a tw template literal interpolation */
|
|
64
|
+
type Interpolation<P extends object> = string | number | boolean | null | undefined | ((props: P) => string | number | boolean | null | undefined | Interpolation<P>) | Interpolation<P>[];
|
|
65
|
+
interface TwStyledComponent<P extends object = Record<string, any>> extends React$1.ForwardRefExoticComponent<P & Record<string, any>> {
|
|
66
|
+
/** Chain extra classes: Card.extend`shadow-2xl ring-1` */
|
|
67
|
+
extend<EP extends object = P>(strings: TemplateStringsArray, ...exprs: Interpolation<EP>[]): TwStyledComponent<EP>;
|
|
68
|
+
/** Merge new variants onto existing component */
|
|
69
|
+
withVariants(config: Pick<ComponentConfig, "variants" | "compoundVariants" | "defaultVariants">): TwStyledComponent<P>;
|
|
70
|
+
}
|
|
71
|
+
interface TwTagFactory<E extends keyof JSX.IntrinsicElements = "div"> {
|
|
72
|
+
(strings: TemplateStringsArray, ...exprs: Interpolation<JSX.IntrinsicElements[E]>[]): TwStyledComponent<JSX.IntrinsicElements[E]>;
|
|
73
|
+
<P extends object>(strings: TemplateStringsArray, ...exprs: Interpolation<JSX.IntrinsicElements[E] & P>[]): TwStyledComponent<JSX.IntrinsicElements[E] & P>;
|
|
74
|
+
(config: ComponentConfig): TwStyledComponent<JSX.IntrinsicElements[E]>;
|
|
75
|
+
<P extends object>(config: ComponentConfig): TwStyledComponent<JSX.IntrinsicElements[E] & P>;
|
|
76
|
+
}
|
|
77
|
+
type TwObject = {
|
|
78
|
+
[K in keyof JSX.IntrinsicElements]: TwTagFactory<K>;
|
|
79
|
+
} & {
|
|
80
|
+
<C extends React$1.ComponentType<any>>(component: C): TwComponentFactory<C>;
|
|
81
|
+
};
|
|
82
|
+
/** Factory for wrapped React components — preserves original component's prop types */
|
|
83
|
+
interface TwComponentFactory<C extends React$1.ComponentType<any>> {
|
|
84
|
+
(strings: TemplateStringsArray, ...exprs: Interpolation<React$1.ComponentPropsWithRef<C>>[]): TwStyledComponent<React$1.ComponentPropsWithRef<C>>;
|
|
85
|
+
<P extends object>(strings: TemplateStringsArray, ...exprs: Interpolation<React$1.ComponentPropsWithRef<C> & P>[]): TwStyledComponent<React$1.ComponentPropsWithRef<C> & P>;
|
|
86
|
+
(config: ComponentConfig): TwStyledComponent<React$1.ComponentPropsWithRef<C>>;
|
|
87
|
+
}
|
|
88
|
+
declare const tw: TwObject;
|
|
73
89
|
|
|
74
90
|
/**
|
|
75
91
|
* tailwind-styled-v4 — cv() (Class Variants)
|
|
@@ -250,6 +266,7 @@ declare function loadBuiltinPlugins(): void;
|
|
|
250
266
|
*
|
|
251
267
|
* Converts React props → Tailwind class strings.
|
|
252
268
|
* Supports responsive objects: p={{ sm: 2, md: 4, lg: 8 }}
|
|
269
|
+
* Supports theme tokens: bg="brand" → bg-blue-600
|
|
253
270
|
*/
|
|
254
271
|
type PropResolver$1 = (value: any) => string;
|
|
255
272
|
declare const TW_PROP_KEYS: ReadonlySet<string>;
|
|
@@ -266,18 +283,26 @@ declare function resolveProps(props: Record<string, any>): string;
|
|
|
266
283
|
* tailwind-styled-v4 — Responsive Engine
|
|
267
284
|
*
|
|
268
285
|
* Converts a value or responsive object into Tailwind prefix classes.
|
|
286
|
+
* Optionally resolves design token aliases before interpolation.
|
|
269
287
|
*
|
|
270
288
|
* @example
|
|
271
289
|
* resolveResponsive("p", 4) → "p-4"
|
|
272
290
|
* resolveResponsive("p", { sm:2, lg:8 }) → "sm:p-2 lg:p-8"
|
|
273
291
|
* resolveResponsive("p", { base:1, md:4 })→ "p-1 md:p-4"
|
|
292
|
+
*
|
|
293
|
+
* // With token resolver:
|
|
294
|
+
* resolveResponsive("bg", "brand", resolveColor) → "bg-blue-600"
|
|
295
|
+
* resolveResponsive("bg", { base:"brand", md:"primary" }, resolveColor)
|
|
296
|
+
* → "bg-blue-600 md:bg-blue-600"
|
|
274
297
|
*/
|
|
275
298
|
declare const SCREENS: readonly ["sm", "md", "lg", "xl", "2xl"];
|
|
276
299
|
type Screen = (typeof SCREENS)[number];
|
|
277
300
|
type ResponsiveValue<T = string | number> = T | ({
|
|
278
301
|
base?: T;
|
|
279
302
|
} & Partial<Record<Screen, T>>);
|
|
280
|
-
declare function resolveResponsive(key: string, value: ResponsiveValue
|
|
303
|
+
declare function resolveResponsive(key: string, value: ResponsiveValue,
|
|
304
|
+
/** Optional design-token resolver — called on every scalar value */
|
|
305
|
+
tokenResolver?: (v: string) => string): string;
|
|
281
306
|
|
|
282
307
|
/**
|
|
283
308
|
* tailwind-styled-v4 — Variant Engine
|
|
@@ -308,13 +333,17 @@ declare function resolveVariants(variants: VariantMap, props: Record<string, any
|
|
|
308
333
|
* ]
|
|
309
334
|
*/
|
|
310
335
|
|
|
311
|
-
declare function resolveCompound(compounds: CompoundVariant[], props: Record<string, any>): string;
|
|
336
|
+
declare function resolveCompound(compounds: CompoundVariant[], props: Record<string, any>, defaultVariants?: Record<string, any>): string;
|
|
312
337
|
|
|
313
338
|
/**
|
|
314
339
|
* tailwind-styled-v4 — Class Resolver
|
|
315
340
|
*
|
|
316
341
|
* Central resolver that combines all engines into a final className string.
|
|
317
342
|
* Uses tailwind-merge to resolve class conflicts correctly.
|
|
343
|
+
*
|
|
344
|
+
* This is the canonical single-call API used externally (e.g. headless
|
|
345
|
+
* components, server-side rendering, testing). createComponent() uses the
|
|
346
|
+
* same engines directly for performance — keep the two in sync.
|
|
318
347
|
*/
|
|
319
348
|
|
|
320
349
|
interface ResolveConfig {
|
|
@@ -773,7 +802,7 @@ interface ValidationResult {
|
|
|
773
802
|
warnings: string[];
|
|
774
803
|
}
|
|
775
804
|
declare const VALID_SCREENS: Set<string>;
|
|
776
|
-
declare const KNOWN_TW_PROPS:
|
|
805
|
+
declare const KNOWN_TW_PROPS: ReadonlySet<string>;
|
|
777
806
|
/**
|
|
778
807
|
* Validate variant props against a schema.
|
|
779
808
|
* Pure no-op in production.
|
package/dist/index.d.ts
CHANGED
|
@@ -37,39 +37,55 @@ interface ExtendableComponent {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* tailwind-styled-v4 — tw
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* ③ Extend existing components:
|
|
62
|
-
* const Card = tw.div`p-6 rounded-2xl bg-zinc-900`
|
|
63
|
-
* const HeroCard = Card.extend`border border-zinc-700 shadow-xl`
|
|
64
|
-
*
|
|
65
|
-
* ④ Wrap existing styled / React components:
|
|
66
|
-
* const StyledLink = tw(Link)`underline text-blue-400`
|
|
40
|
+
* tailwind-styled-v4 v2 — tw
|
|
41
|
+
*
|
|
42
|
+
* ── Changelog v2 ──────────────────────────────────────────────────────────────
|
|
43
|
+
*
|
|
44
|
+
* FIX 1 — import { tw } undefined in Next.js / Vite
|
|
45
|
+
* BEFORE: export const tw = new Proxy(fn, { get })
|
|
46
|
+
* tsup splitting:true + Proxy = tw resolves undefined after chunk split
|
|
47
|
+
* AFTER: Object.assign(callable, { div, button, ... })
|
|
48
|
+
* Plain object, pre-built at module load, transparent to all bundlers
|
|
49
|
+
*
|
|
50
|
+
* FIX 2 — tw.div<Props>`${({ $isHover }) => ...}` TypeScript generic
|
|
51
|
+
* BEFORE: TwTagFactory not generic → "Binding element '$isHover' implicitly has 'any' type"
|
|
52
|
+
* AFTER: TwTagFactory<P> is a generic function → full type inference on template interpolations
|
|
53
|
+
*
|
|
54
|
+
* API (unchanged, backward compatible):
|
|
55
|
+
* tw.div`p-4 bg-zinc-900`
|
|
56
|
+
* tw.div<BadgeProps>`${({ $isHover }) => $isHover ? "opacity-100" : "opacity-0"}`
|
|
57
|
+
* tw.button({ base, variants, compoundVariants, defaultVariants })
|
|
58
|
+
* tw.div`...`.extend`extra`
|
|
59
|
+
* tw(Link)`underline text-blue-400`
|
|
60
|
+
* tw(Button)({ base, variants })
|
|
67
61
|
*/
|
|
68
62
|
|
|
69
|
-
|
|
70
|
-
type
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
/** Valid values inside a tw template literal interpolation */
|
|
64
|
+
type Interpolation<P extends object> = string | number | boolean | null | undefined | ((props: P) => string | number | boolean | null | undefined | Interpolation<P>) | Interpolation<P>[];
|
|
65
|
+
interface TwStyledComponent<P extends object = Record<string, any>> extends React$1.ForwardRefExoticComponent<P & Record<string, any>> {
|
|
66
|
+
/** Chain extra classes: Card.extend`shadow-2xl ring-1` */
|
|
67
|
+
extend<EP extends object = P>(strings: TemplateStringsArray, ...exprs: Interpolation<EP>[]): TwStyledComponent<EP>;
|
|
68
|
+
/** Merge new variants onto existing component */
|
|
69
|
+
withVariants(config: Pick<ComponentConfig, "variants" | "compoundVariants" | "defaultVariants">): TwStyledComponent<P>;
|
|
70
|
+
}
|
|
71
|
+
interface TwTagFactory<E extends keyof JSX.IntrinsicElements = "div"> {
|
|
72
|
+
(strings: TemplateStringsArray, ...exprs: Interpolation<JSX.IntrinsicElements[E]>[]): TwStyledComponent<JSX.IntrinsicElements[E]>;
|
|
73
|
+
<P extends object>(strings: TemplateStringsArray, ...exprs: Interpolation<JSX.IntrinsicElements[E] & P>[]): TwStyledComponent<JSX.IntrinsicElements[E] & P>;
|
|
74
|
+
(config: ComponentConfig): TwStyledComponent<JSX.IntrinsicElements[E]>;
|
|
75
|
+
<P extends object>(config: ComponentConfig): TwStyledComponent<JSX.IntrinsicElements[E] & P>;
|
|
76
|
+
}
|
|
77
|
+
type TwObject = {
|
|
78
|
+
[K in keyof JSX.IntrinsicElements]: TwTagFactory<K>;
|
|
79
|
+
} & {
|
|
80
|
+
<C extends React$1.ComponentType<any>>(component: C): TwComponentFactory<C>;
|
|
81
|
+
};
|
|
82
|
+
/** Factory for wrapped React components — preserves original component's prop types */
|
|
83
|
+
interface TwComponentFactory<C extends React$1.ComponentType<any>> {
|
|
84
|
+
(strings: TemplateStringsArray, ...exprs: Interpolation<React$1.ComponentPropsWithRef<C>>[]): TwStyledComponent<React$1.ComponentPropsWithRef<C>>;
|
|
85
|
+
<P extends object>(strings: TemplateStringsArray, ...exprs: Interpolation<React$1.ComponentPropsWithRef<C> & P>[]): TwStyledComponent<React$1.ComponentPropsWithRef<C> & P>;
|
|
86
|
+
(config: ComponentConfig): TwStyledComponent<React$1.ComponentPropsWithRef<C>>;
|
|
87
|
+
}
|
|
88
|
+
declare const tw: TwObject;
|
|
73
89
|
|
|
74
90
|
/**
|
|
75
91
|
* tailwind-styled-v4 — cv() (Class Variants)
|
|
@@ -250,6 +266,7 @@ declare function loadBuiltinPlugins(): void;
|
|
|
250
266
|
*
|
|
251
267
|
* Converts React props → Tailwind class strings.
|
|
252
268
|
* Supports responsive objects: p={{ sm: 2, md: 4, lg: 8 }}
|
|
269
|
+
* Supports theme tokens: bg="brand" → bg-blue-600
|
|
253
270
|
*/
|
|
254
271
|
type PropResolver$1 = (value: any) => string;
|
|
255
272
|
declare const TW_PROP_KEYS: ReadonlySet<string>;
|
|
@@ -266,18 +283,26 @@ declare function resolveProps(props: Record<string, any>): string;
|
|
|
266
283
|
* tailwind-styled-v4 — Responsive Engine
|
|
267
284
|
*
|
|
268
285
|
* Converts a value or responsive object into Tailwind prefix classes.
|
|
286
|
+
* Optionally resolves design token aliases before interpolation.
|
|
269
287
|
*
|
|
270
288
|
* @example
|
|
271
289
|
* resolveResponsive("p", 4) → "p-4"
|
|
272
290
|
* resolveResponsive("p", { sm:2, lg:8 }) → "sm:p-2 lg:p-8"
|
|
273
291
|
* resolveResponsive("p", { base:1, md:4 })→ "p-1 md:p-4"
|
|
292
|
+
*
|
|
293
|
+
* // With token resolver:
|
|
294
|
+
* resolveResponsive("bg", "brand", resolveColor) → "bg-blue-600"
|
|
295
|
+
* resolveResponsive("bg", { base:"brand", md:"primary" }, resolveColor)
|
|
296
|
+
* → "bg-blue-600 md:bg-blue-600"
|
|
274
297
|
*/
|
|
275
298
|
declare const SCREENS: readonly ["sm", "md", "lg", "xl", "2xl"];
|
|
276
299
|
type Screen = (typeof SCREENS)[number];
|
|
277
300
|
type ResponsiveValue<T = string | number> = T | ({
|
|
278
301
|
base?: T;
|
|
279
302
|
} & Partial<Record<Screen, T>>);
|
|
280
|
-
declare function resolveResponsive(key: string, value: ResponsiveValue
|
|
303
|
+
declare function resolveResponsive(key: string, value: ResponsiveValue,
|
|
304
|
+
/** Optional design-token resolver — called on every scalar value */
|
|
305
|
+
tokenResolver?: (v: string) => string): string;
|
|
281
306
|
|
|
282
307
|
/**
|
|
283
308
|
* tailwind-styled-v4 — Variant Engine
|
|
@@ -308,13 +333,17 @@ declare function resolveVariants(variants: VariantMap, props: Record<string, any
|
|
|
308
333
|
* ]
|
|
309
334
|
*/
|
|
310
335
|
|
|
311
|
-
declare function resolveCompound(compounds: CompoundVariant[], props: Record<string, any>): string;
|
|
336
|
+
declare function resolveCompound(compounds: CompoundVariant[], props: Record<string, any>, defaultVariants?: Record<string, any>): string;
|
|
312
337
|
|
|
313
338
|
/**
|
|
314
339
|
* tailwind-styled-v4 — Class Resolver
|
|
315
340
|
*
|
|
316
341
|
* Central resolver that combines all engines into a final className string.
|
|
317
342
|
* Uses tailwind-merge to resolve class conflicts correctly.
|
|
343
|
+
*
|
|
344
|
+
* This is the canonical single-call API used externally (e.g. headless
|
|
345
|
+
* components, server-side rendering, testing). createComponent() uses the
|
|
346
|
+
* same engines directly for performance — keep the two in sync.
|
|
318
347
|
*/
|
|
319
348
|
|
|
320
349
|
interface ResolveConfig {
|
|
@@ -773,7 +802,7 @@ interface ValidationResult {
|
|
|
773
802
|
warnings: string[];
|
|
774
803
|
}
|
|
775
804
|
declare const VALID_SCREENS: Set<string>;
|
|
776
|
-
declare const KNOWN_TW_PROPS:
|
|
805
|
+
declare const KNOWN_TW_PROPS: ReadonlySet<string>;
|
|
777
806
|
/**
|
|
778
807
|
* Validate variant props against a schema.
|
|
779
808
|
* Pure no-op in production.
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
var
|
|
3
|
-
`).map(o=>o.trim()).filter(Boolean).join(" ").replace(/\s{2,}/g," ").trim()}function se(e,...r){return R(e,r)}var ae=new Set(["variant","size","intent","color","shape","tone"]);function le(e){return !(ae.has(e)||y.has(e))}function v(e,r){let t=typeof r=="string",o=t?r:r.base??"",i=t?{}:r.variants??{},s=t?[]:r.compoundVariants??[],m=t?{}:r.defaultVariants??{},u=B__default.default(e).withConfig({shouldForwardProp:le})``,l=B__default.default(u).attrs(a=>{let c=x(a),d=h(i,a,m),g=b(s,a),k=w(a);return {className:tailwindMerge.twMerge(o,d,g,c,k,a.className)}})``;return l.extend=(a,...c)=>{let d=R(a,c);return v(l,{...t?{}:r,base:tailwindMerge.twMerge(o,d)})},l.withVariants=a=>v(e,{base:o,variants:{...i,...a.variants??{}},compoundVariants:[...s,...a.compoundVariants??[]],defaultVariants:{...m,...a.defaultVariants??{}}}),l}function O(e){return function(r,...t){if(!Array.isArray(r)&&typeof r=="object"&&r!==null)return v(e,r);let o=R(r,t);return v(e,o)}}var ce=new Proxy(function(e){return O(e)},{get(e,r){return O(r)}});function ue(e){let{base:r="",variants:t={},compoundVariants:o=[],defaultVariants:i={}}=e;return function(s){let m={...i,...s??{}},u=h(t,m),l=b(o,m);return tailwindMerge.twMerge(r,u,l,s?.className)}}function D(e,r=""){let t=typeof r=="string"?r:r.base??"",o=typeof r=="object"?r.displayName??`withTw(${e.displayName??e.name??"Component"})`:`withTw(${e.displayName??e.name??"Component"})`,i=de.forwardRef((s,m)=>{let u={},l={};for(let g in s)y.has(g)?u[g]=s[g]:l[g]=s[g];let a=x(u),c=w(u),d=tailwindMerge.twMerge(t,a,c,s.className);return de__default.default.createElement(e,{...l,ref:m,className:d})});return i.displayName=o,i}function ge(e,r=""){return D(e,r)}function p(e){if(!e.name||typeof e.name!="string")throw new Error("[tailwind-styled-v4] Plugin must have a non-empty string name");if(!e.props||typeof e.props!="object")throw new Error(`[tailwind-styled-v4] Plugin "${e.name}" must define a props object`);M(e);}function ye(){p({name:"animation",props:{animate:e=>`animate-${e}`,duration:e=>`duration-${e}`,delay:e=>`delay-${e}`,ease:e=>`ease-${e}`}}),p({name:"grid",props:{grid:e=>e===true?"grid":`grid-cols-${e}`,gridCols:e=>`grid-cols-${e}`,gridRows:e=>`grid-rows-${e}`,autoRows:e=>`auto-rows-${e}`,autoCols:e=>`auto-cols-${e}`}}),p({name:"backdrop",props:{backdropBlur:e=>`backdrop-blur-${e}`,backdropBrightness:e=>`backdrop-brightness-${e}`,backdropContrast:e=>`backdrop-contrast-${e}`,backdropSaturate:e=>`backdrop-saturate-${e}`}}),p({name:"gradient",props:{gradientFrom:e=>`from-${e}`,gradientVia:e=>`via-${e}`,gradientTo:e=>`to-${e}`,gradient:e=>`bg-gradient-to-${e}`}}),p({name:"scroll",props:{scrollSmooth:e=>e===true?"scroll-smooth":"",scrollAuto:e=>e===true?"scroll-auto":"",snapAlign:e=>`snap-${e}`,snapType:e=>`snap-${e}`}}),p({name:"print",props:{printHidden:e=>e===true?"print:hidden":"",printBlock:e=>e===true?"print:block":""}});}function he(e,r){let{base:t,variants:o={},compoundVariants:i=[],defaultVariants:s={}}=e,m=x(r),u=h(o,r,s),l=b(i,r),a=w(r);return tailwindMerge.twMerge(t,u,l,m,a,r.className)}var f={},$=new Set;function C(e){for(let r in e){let t=e[r];t&&(f[r]={...f[r]??{},...t});}$.forEach(r=>r(f));}function be(e){f={...e},$.forEach(r=>r(f));}function we(){return {...f}}function ve(e){return {...f[e]??{}}}function Te(){f={},$.forEach(e=>e(f));}function Re(e){return $.add(e),()=>$.delete(e)}function E(e,r){let t=f[e];return t?t[r]??r:r}function $e(e,r){return !!f[e]?.[r]}function P(e,r){return E(e,r)}function Ce(e){return P("colors",e)}function Pe(e){return typeof e=="number"?String(e):P("spacing",e)}function Se(e){return P("radius",e)}function ke(){C({colors:{primary:"blue-600","primary-hover":"blue-700","primary-light":"blue-100",secondary:"violet-600","secondary-hover":"violet-700",success:"emerald-500",warning:"amber-500",danger:"red-500",info:"sky-500",foreground:"white",background:"zinc-950",surface:"zinc-900","surface-2":"zinc-800","surface-3":"zinc-700",muted:"zinc-500",subtle:"zinc-400",border:"zinc-700","border-light":"zinc-200","text-primary":"zinc-50","text-secondary":"zinc-400","text-muted":"zinc-600",link:"blue-400","link-hover":"blue-300"},spacing:{xs:"2",sm:"4",md:"6",lg:"8",xl:"12","2xl":"16","3xl":"24",section:"16",page:"24"},radius:{none:"none",xs:"sm",sm:"md",md:"lg",lg:"xl",xl:"2xl",card:"2xl",button:"lg",badge:"full",pill:"full",input:"md"},shadow:{xs:"sm",sm:"md",md:"lg",lg:"xl",xl:"2xl",card:"xl",modal:"2xl",none:"none"},font:{sans:"sans",mono:"mono",serif:"serif"},fontSize:{caption:"xs",small:"sm",body:"base",lead:"lg",title:"xl",heading:"2xl",display:"4xl"},duration:{fast:"150",normal:"200",slow:"300",slower:"500"},opacity:{disabled:"50",muted:"70",subtle:"40"}});}function Ve(){C({colors:{primary:"blue-500",secondary:"indigo-500",accent:"cyan-400",background:"zinc-950",surface:"zinc-900","surface-2":"zinc-800",foreground:"zinc-50",muted:"zinc-500",border:"zinc-800",success:"emerald-400",warning:"amber-400",danger:"red-400"},radius:{card:"xl",button:"lg",badge:"full",input:"md"}});}function I(e){let r=5381;for(let t=0;t<e.length;t++)r=(r<<5)+r^e.charCodeAt(t),r=r>>>0;return r}function F(e){return "tw-"+I(e).toString(16).slice(0,5).padStart(5,"0")}function Ne(e){return I(e)}function j(e,r){let t=F(`${e}:${r}`);return `Tw${e.charAt(0).toUpperCase()+e.slice(1)}-${t.replace("tw-","")}`}var z=new Set(["variant","size","intent","color","shape","tone","weight","hierarchy","emphasis","status","appearance","base","as","_ref"]);function L(e){return e.startsWith("$")?true:!(z.has(e)||y.has(e))}function je(e){z.add(e);}function ze(e){z.delete(e),y.delete(e);}function Ae(e,r=""){let t=B__default.default(e).withConfig({shouldForwardProp:L});if(process.env.NODE_ENV!=="production"&&typeof e=="string"&&r){let o=j(e,r);t.displayName=o;}return t}function _e(...e){return tailwindMerge.twMerge(...e.filter(Boolean))}function S(e){return Array.from(new Set(e.split(/\s+/).map(r=>r.trim()).filter(Boolean)))}function Be(e){return S(e).sort().join(" ")}function We(e){let r=S(e),t=[],o=[];for(let i of r)i.includes(":")?o.push(i):t.push(i);return {base:t,modifiers:o}}function Oe(e){return /^!?[-a-z0-9]+(?:[:/[\]().#,]+[-a-z0-9_]+)*$/.test(e)}function K(e){let r=e.indexOf(":");return r>-1?e.slice(0,r):null}function Y(e){let r=e.indexOf(":");return r>-1?e.slice(r+1):e}function De(e){let r=S(e),t={};for(let o of r){let i=K(o)??"",s=Y(o);t[i]||(t[i]=[]),t[i].push(s);}return t}function A(...e){let r=[];return X(e,r),r.join(" ")}function X(e,r){for(let t of e)if(t){if(typeof t=="string"){r.push(t);continue}if(typeof t=="number"){r.push(String(t));continue}if(Array.isArray(t)){X(t,r);continue}if(typeof t=="object")for(let o in t)t[o]&&r.push(o);}}function Ie(...e){try{let{twMerge:r}=re("tailwind-merge");return r(A(...e))}catch{return A(...e)}}var H=typeof process<"u"&&process.env.NODE_ENV!=="production",q=new Set(["base","sm","md","lg","xl","2xl"]),Fe=new Set(["p","px","py","pt","pb","pl","pr","m","mx","my","mt","mb","ml","mr","gap","gapX","gapY","spaceX","spaceY","w","h","size","minW","maxW","minH","maxH","bg","text","border","ring","fill","stroke","accent","caret","divide","font","fontSize","leading","tracking","align","truncate","lineClamp","flex","flexDir","items","justify","wrap","grow","shrink","basis","self","place","cols","rows","colSpan","rowSpan","colStart","colEnd","rowStart","rowEnd","display","overflow","overflowX","overflowY","pos","z","top","right","bottom","left","inset","rounded","roundedT","roundedB","roundedL","roundedR","borderWidth","borderStyle","outline","opacity","shadow","blur","brightness","contrast","saturate","grayscale","invert","backdrop","transition","duration","ease","delay","animate","cursor","select","pointer","touch","sr","hidden","visible","aspect","object","scroll","container","flex","grid","block","inline","hidden","truncate","underline","italic"]);function Le(e,r){if(!H)return {valid:true,errors:[],warnings:[]};let t=[],o=[],{tag:i,variants:s={},customValidators:m={}}=r;for(let[l,a]of Object.entries(s)){let c=e[l];if(c==null)continue;let d=String(c),g=Object.keys(a);g.includes(d)||t.push(`[tw-error] Invalid prop "${l}"="${d}" on <${i}>
|
|
4
|
-
Expected one of: ${g.map(k=>`"${k}"`).join(" | ")}
|
|
5
|
-
Got: "${d}"
|
|
6
|
-
Hint: Add "${d}" to the variants config, or fix the typo.`);}for(let[l,a]of Object.entries(m)){let c=a(e[l]);c&&t.push(`[tw-error] ${c}`);}let u=new Set(["p","px","py","pt","pb","pl","pr","m","mx","my","mt","mb","ml","mr","gap"]);for(let l of u){let a=e[l];typeof a=="number"&&a>96&&o.push(`[tw-warn] Prop "${l}"=${a} exceeds Tailwind spacing scale max (96).
|
|
7
|
-
Use arbitrary values: ${l}="[${a}px]" for custom sizes.`);}for(let[l,a]of Object.entries(e)){if(typeof a!="object"||!a||Array.isArray(a))continue;let c=Object.keys(a).filter(d=>!q.has(d));c.length>0&&o.push(`[tw-warn] Unknown screen(s) in "${l}" responsive object: ${c.map(d=>`"${d}"`).join(", ")}
|
|
8
|
-
Valid screens: "base" | "sm" | "md" | "lg" | "xl" | "2xl"`);}return H&&(t.forEach(l=>console.error(l)),o.forEach(l=>console.warn(l))),{valid:t.length===0,errors:t,warnings:o}}function Ke(e,r={}){return {tag:e,variants:r}}function U(){p({name:"typography",props:{prose:e=>e===true||e==="base"||e===""?"prose":typeof e=="string"?`prose prose-${e}`:"prose",proseColor:e=>`prose-${e}`,proseDark:e=>e===true?"dark:prose-invert":"",proseMaxW:e=>e===false?"max-w-none":"",proseLeading:e=>`leading-${e}`}});}function G(){p({name:"forms",props:{formInput:e=>e?"form-input":"",formSelect:e=>e?"form-select":"",formTextarea:e=>e?"form-textarea":"",formCheckbox:e=>e?"form-checkbox":"",formRadio:e=>e?"form-radio":"",formRange:e=>e?"form-range":"",form:e=>({input:"form-input",select:"form-select",textarea:"form-textarea",checkbox:"form-checkbox",radio:"form-radio",range:"form-range"})[e]??`form-${e}`}});}function J(){p({name:"aspect",props:{aspectRatio:e=>{let r={video:"aspect-video",square:"aspect-square",auto:"aspect-auto","4/3":"aspect-[4/3]","3/2":"aspect-[3/2]","1/1":"aspect-square"};return typeof e=="number"?Math.abs(e-16/9)<.01?"aspect-video":Math.abs(e-1)<.01?"aspect-square":`aspect-[${e}]`:r[e]??`aspect-${e}`}}});}function Q(){p({name:"container-queries",props:{container:e=>e===true?"@container":`@container/${e}`,containerName:e=>`@container/${e}`,cq:e=>e?`@${e}:block`:""}});}function Z(){p({name:"animations-v4",props:{enterAnim:e=>({fade:"animate-in fade-in","fade-up":"animate-in fade-in slide-in-from-bottom-4","fade-down":"animate-in fade-in slide-in-from-top-4","fade-left":"animate-in fade-in slide-in-from-right-4","fade-right":"animate-in fade-in slide-in-from-left-4",zoom:"animate-in zoom-in-95","slide-up":"animate-in slide-in-from-bottom-4","slide-down":"animate-in slide-in-from-top-4","spin-in":"animate-in spin-in-180"})[e]??`animate-in ${e}`,exitAnim:e=>({fade:"animate-out fade-out","fade-up":"animate-out fade-out slide-out-to-top-4","fade-down":"animate-out fade-out slide-out-to-bottom-4",zoom:"animate-out zoom-out-95","slide-up":"animate-out slide-out-to-top-4","slide-down":"animate-out slide-out-to-bottom-4"})[e]??`animate-out ${e}`,animFill:e=>`fill-mode-${e}`,animDuration:e=>`duration-${e}`,animDelay:e=>`delay-${e}`,animRepeat:e=>e==="infinite"?"repeat-infinite":`repeat-${e}`,animDirection:e=>`direction-${e}`}});}function ee(){p({name:"interactivity",props:{hoverBg:e=>`hover:bg-${e}`,hoverText:e=>`hover:text-${e}`,hoverBorder:e=>`hover:border-${e}`,hoverShadow:e=>`hover:shadow-${e}`,hoverOpacity:e=>`hover:opacity-${e}`,hoverScale:e=>e===true?"hover:scale-105":`hover:scale-${e}`,focusRing:e=>e===true?"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2":`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-${e} focus-visible:ring-offset-2`,focusBg:e=>`focus:bg-${e}`,activeScale:e=>e===true?"active:scale-95":`active:scale-${e}`,activeBg:e=>`active:bg-${e}`,activeOpacity:e=>`active:opacity-${e}`,groupHoverBg:e=>`group-hover:bg-${e}`,groupHoverText:e=>`group-hover:text-${e}`,groupHoverScale:e=>`group-hover:scale-${e}`,peerCheckedBg:e=>`peer-checked:bg-${e}`}});}function Ye(){U(),G(),J(),Q(),Z(),ee();}exports.KNOWN_TW_PROPS=Fe;exports.TW_PROP_KEYS=y;exports.VALID_SCREENS=q;exports.allowProp=ze;exports.attachTw=ge;exports.blockProp=je;exports.buildSchema=Ke;exports.cls=se;exports.componentName=j;exports.createComponent=v;exports.cv=ue;exports.cx=A;exports.cxm=Ie;exports.getModifier=K;exports.getPlugin=oe;exports.getTheme=we;exports.getThemeNamespace=ve;exports.groupByModifier=De;exports.hashClass=F;exports.hashNumber=Ne;exports.isObject=V;exports.isThemeToken=$e;exports.isValidClass=Oe;exports.listPlugins=ie;exports.loadAllV4Plugins=Ye;exports.loadAnimationPlugin=Z;exports.loadAspectPlugin=J;exports.loadBuiltinPlugins=ye;exports.loadContainerQueryPlugin=Q;exports.loadDarkTheme=Ve;exports.loadDefaultTheme=ke;exports.loadFormsPlugin=G;exports.loadInteractivityPlugin=ee;exports.loadTypographyPlugin=U;exports.mergeClasses=_e;exports.normalizeClasses=Be;exports.onThemeChange=Re;exports.parseClassString=S;exports.registerPlugin=p;exports.registerProp=te;exports.replaceTheme=be;exports.resetTheme=Te;exports.resolveClasses=he;exports.resolveColor=Ce;exports.resolveCompound=b;exports.resolveProps=x;exports.resolveRadius=Se;exports.resolveResponsive=n;exports.resolveSpacing=Pe;exports.resolveThemeToken=E;exports.resolveToken=P;exports.resolveVariants=h;exports.setTheme=C;exports.shouldForwardProp=L;exports.splitModifiers=We;exports.stripModifier=Y;exports.styledFactory=Ae;exports.tw=ce;exports.validateVariantProps=Le;exports.withTw=D;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';var O=require('styled-components'),tailwindMerge=require('tailwind-merge'),Re=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var O__default=/*#__PURE__*/_interopDefault(O);var Re__default=/*#__PURE__*/_interopDefault(Re);/* tailwind-styled-v4 | MIT */
|
|
2
|
+
var se=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function N(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ae=["sm","md","lg","xl","2xl"];function A(e,t){let n=String(e);return t?t(n):n}function r(e,t,n){if(!N(t))return `${e}-${A(t,n)}`;let o=[],i=t;i.base!==void 0&&o.push(`${e}-${A(i.base,n)}`);for(let s of ae)i[s]!==void 0&&o.push(`${s}:${e}-${A(i[s],n)}`);return o.join(" ")}var y={},S=new Set;function V(e){for(let t in e){let n=e[t];n&&(y[t]={...y[t]??{},...n});}S.forEach(t=>t(y));}function le(e){y={...e},S.forEach(t=>t(y));}function ce(){return {...y}}function pe(e){return {...y[e]??{}}}function me(){y={},S.forEach(e=>e(y));}function ue(e){return S.add(e),()=>S.delete(e)}function z(e,t){let n=y[e];return n?n[t]??t:t}function de(e,t){return !!y[e]?.[t]}function b(e,t){return z(e,t)}function m(e){return b("colors",e)}function p(e){return typeof e=="number"?String(e):b("spacing",e)}function w(e){return b("radius",e)}var I={p:e=>r("p",e,p),px:e=>r("px",e,p),py:e=>r("py",e,p),pt:e=>r("pt",e,p),pb:e=>r("pb",e,p),pl:e=>r("pl",e,p),pr:e=>r("pr",e,p),m:e=>r("m",e,p),mx:e=>r("mx",e,p),my:e=>r("my",e,p),mt:e=>r("mt",e,p),mb:e=>r("mb",e,p),ml:e=>r("ml",e,p),mr:e=>r("mr",e,p),gap:e=>r("gap",e,p),gapX:e=>r("gap-x",e,p),gapY:e=>r("gap-y",e,p),spaceX:e=>r("space-x",e,p),spaceY:e=>r("space-y",e,p),w:e=>r("w",e),h:e=>r("h",e),size:e=>r("size",e),minW:e=>r("min-w",e),maxW:e=>r("max-w",e),minH:e=>r("min-h",e),maxH:e=>r("max-h",e),bg:e=>r("bg",e,m),text:e=>r("text",e,m),border:e=>e===true?"border":r("border",e,m),ring:e=>e===true?"ring":r("ring",e,m),ringColor:e=>r("ring",e,m),fill:e=>r("fill",e,m),stroke:e=>r("stroke",e,m),accent:e=>r("accent",e,m),caret:e=>r("caret",e,m),divide:e=>r("divide",e,m),font:e=>r("font",e,t=>b("font",t)),fontSize:e=>r("text",e,t=>b("fontSize",t)),leading:e=>r("leading",e),tracking:e=>r("tracking",e),align:e=>`text-${e}`,whitespace:e=>`whitespace-${e}`,truncate:e=>e===true?"truncate":"",lineClamp:e=>`line-clamp-${e}`,flex:e=>e===true?"flex":e===false?"":r("flex",e),flexDir:e=>`flex-${e}`,flexRow:e=>e===true?"flex-row":"flex-col",flexCol:e=>e===true?"flex-col":"flex-row",items:e=>r("items",e),justify:e=>r("justify",e),content:e=>r("content",e),wrap:e=>e===true?"flex-wrap":e===false?"flex-nowrap":`flex-${e}`,grow:e=>e===true?"grow":e===false?"grow-0":`grow-${e}`,shrink:e=>e===true?"shrink":e===false?"shrink-0":`shrink-${e}`,basis:e=>r("basis",e),self:e=>r("self",e),place:e=>r("place-items",e),cols:e=>r("grid-cols",e),rows:e=>r("grid-rows",e),colSpan:e=>r("col-span",e),rowSpan:e=>r("row-span",e),colStart:e=>`col-start-${e}`,colEnd:e=>`col-end-${e}`,rowStart:e=>`row-start-${e}`,rowEnd:e=>`row-end-${e}`,display:e=>`${e}`,overflow:e=>r("overflow",e),overflowX:e=>`overflow-x-${e}`,overflowY:e=>`overflow-y-${e}`,pos:e=>`${e}`,position:e=>`${e}`,z:e=>r("z",e),top:e=>r("top",e),right:e=>r("right",e),bottom:e=>r("bottom",e),left:e=>r("left",e),inset:e=>r("inset",e),insetX:e=>r("inset-x",e),insetY:e=>r("inset-y",e),rounded:e=>e===true?"rounded":r("rounded",e,w),roundedT:e=>r("rounded-t",e,w),roundedB:e=>r("rounded-b",e,w),roundedL:e=>r("rounded-l",e,w),roundedR:e=>r("rounded-r",e,w),borderWidth:e=>r("border",e),borderStyle:e=>`border-${e}`,outline:e=>e==="none"?"outline-none":`outline-${e}`,outlineColor:e=>`outline-${e}`,opacity:e=>r("opacity",e,t=>b("opacity",t)),shadow:e=>e===true?"shadow":r("shadow",e,t=>b("shadow",t)),shadowColor:e=>`shadow-${m(String(e))}`,blur:e=>e===true?"blur":r("blur",e),brightness:e=>r("brightness",e),contrast:e=>r("contrast",e),saturate:e=>r("saturate",e),grayscale:e=>e===true?"grayscale":"",invert:e=>e===true?"invert":"",backdrop:e=>r("backdrop-blur",e),transition:e=>e===true?"transition":`transition-${e}`,duration:e=>r("duration",e,t=>b("duration",t)),ease:e=>`ease-${e}`,delay:e=>r("delay",e),animate:e=>`animate-${e}`,cursor:e=>`cursor-${e}`,select:e=>`select-${e}`,pointer:e=>e===true?"pointer-events-auto":"pointer-events-none",touch:e=>`touch-${e}`,sr:e=>e===true?"sr-only":"not-sr-only",hidden:e=>e===true?"hidden":"",visible:e=>e===true?"visible":"invisible",aspect:e=>`aspect-${e}`,object:e=>`object-${e}`,scroll:e=>`scroll-${e}`,container:e=>e===true?"container":""},x=new Set(Object.keys(I));function fe(e,t){I[e]=t,x.add(e);}function T(e){let t=[];for(let n in e){let o=I[n];if(!o)continue;let i=e[n];if(i==null||i===false)continue;let s=o(i);s&&t.push(s);}return t.join(" ").trim()}function v(e,t,n){if(!e)return "";let o=[];for(let i in e){let s=t[i]??n?.[i];if(s==null)continue;let c=e[i][String(s)];c&&o.push(c);}return o.join(" ").trim()}function C(e,t,n){if(!e||e.length===0)return "";let o=[],i=n?{...n,...t}:t;for(let s of e){let d=true;for(let c in s)if(!(c==="class"||c==="className")&&i[c]!==s[c]){d=false;break}if(d){let c=s.class??s.className;c&&o.push(c);}}return o.join(" ").trim()}var $=new Map;function W(e){$.has(e.name)&&console.warn(`[tailwind-styled-v4] Plugin "${e.name}" already registered \u2014 overwriting`),$.set(e.name,e),e.onRegister?.();}function ge(e){return $.get(e)}function ye(){return Array.from($.keys())}function P(e){let t=[];for(let n of $.values())for(let o in n.props)if(e[o]!==void 0){let i=n.props[o](e[o]);i&&t.push(i);}return t.join(" ").trim()}function F(e){if(e==null||e===false)return "";if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(F).filter(Boolean).join(" ");if(typeof e=="object"){let t=e;return Object.keys(t).filter(n=>t[n]).join(" ")}return ""}function k(e,t){let n="";for(let o=0;o<e.length;o++)if(n+=e[o],o<t.length){let i=F(t[o]);i&&(n+=" "+i);}return n.split(`
|
|
3
|
+
`).map(o=>o.trim()).filter(Boolean).join(" ").replace(/\s{2,}/g," ").trim()}function xe(e,...t){return k(e,t)}var he=new Set(["variant","size","intent","color","shape","tone"]);function be(e){return !(he.has(e)||x.has(e))}function R(e,t){let n=typeof t=="string",o=n?t:t.base??"",i=n?{}:t.variants??{},s=n?[]:t.compoundVariants??[],d=n?{}:t.defaultVariants??{},c=O__default.default(e).withConfig({shouldForwardProp:be})``,l=O__default.default(c).attrs(a=>{let u=T(a),g=v(i,a,d),h=C(s,a),j=P(a);return {className:tailwindMerge.twMerge(o,g,h,u,j,a.className)}})``;return l.extend=(a,...u)=>{let g=k(a,u);return R(l,{...n?{}:t,base:tailwindMerge.twMerge(o,g)})},l.withVariants=a=>R(e,{base:o,variants:{...i,...a.variants??{}},compoundVariants:[...s,...a.compoundVariants??[]],defaultVariants:{...d,...a.defaultVariants??{}}}),l}function X(e){return function(t,...n){return !Array.isArray(t)&&typeof t=="object"&&t!==null?R(e,t):R(e,k(t,n))}}var we=["div","section","article","aside","header","footer","main","nav","figure","figcaption","details","summary","h1","h2","h3","h4","h5","h6","p","span","strong","em","b","i","s","u","small","mark","abbr","cite","code","kbd","samp","var","time","address","blockquote","q","del","ins","sub","sup","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","img","picture","video","audio","source","track","canvas","svg","path","circle","rect","line","polyline","polygon","g","defs","use","symbol","form","input","textarea","select","option","optgroup","button","label","fieldset","legend","output","progress","meter","datalist","a","area","map","iframe","embed","object","pre","hr","br","wbr","dialog","menu","template","slot"],D={};for(let e of we)D[e]=X(e);var Te=function(e){return X(e)},ve=Object.assign(Te,D);function Pe(e){let{base:t="",variants:n={},compoundVariants:o=[],defaultVariants:i={}}=e;return function(s){let d={...i,...s??{}},c=v(n,d),l=C(o,d);return tailwindMerge.twMerge(t,c,l,s?.className)}}function K(e,t=""){let n=typeof t=="string"?t:t.base??"",o=typeof t=="object"?t.displayName??`withTw(${e.displayName??e.name??"Component"})`:`withTw(${e.displayName??e.name??"Component"})`,i=Re.forwardRef((s,d)=>{let c={},l={};for(let h in s)x.has(h)?c[h]=s[h]:l[h]=s[h];let a=T(c),u=P(c),g=tailwindMerge.twMerge(n,a,u,s.className);return Re__default.default.createElement(e,{...l,ref:d,className:g})});return i.displayName=o,i}function ke(e,t=""){return K(e,t)}function f(e){if(!e.name||typeof e.name!="string")throw new Error("[tailwind-styled-v4] Plugin must have a non-empty string name");if(!e.props||typeof e.props!="object")throw new Error(`[tailwind-styled-v4] Plugin "${e.name}" must define a props object`);W(e);}var J=false;function Ve(){J||(J=true,f({name:"animation",props:{motionSafe:e=>e===true?"motion-safe:transition-all":"",motionReduce:e=>e===true?"motion-reduce:transition-none":"",willChange:e=>`will-change-${e}`}}),f({name:"grid",props:{autoRows:e=>`auto-rows-${e}`,autoCols:e=>`auto-cols-${e}`}}),f({name:"backdrop",props:{backdropBlur:e=>`backdrop-blur-${e}`,backdropBrightness:e=>`backdrop-brightness-${e}`,backdropContrast:e=>`backdrop-contrast-${e}`,backdropSaturate:e=>`backdrop-saturate-${e}`}}),f({name:"gradient",props:{gradientFrom:e=>`from-${e}`,gradientVia:e=>`via-${e}`,gradientTo:e=>`to-${e}`,gradient:e=>`bg-gradient-to-${e}`}}),f({name:"scroll",props:{scrollSmooth:e=>e===true?"scroll-smooth":"",scrollAuto:e=>e===true?"scroll-auto":"",snapAlign:e=>`snap-${e}`,snapType:e=>`snap-${e}`}}),f({name:"print",props:{printHidden:e=>e===true?"print:hidden":"",printBlock:e=>e===true?"print:block":""}}));}function je(e,t){let{base:n,variants:o={},compoundVariants:i=[],defaultVariants:s={}}=e,d={...s,...t},c=v(o,d,s),l=C(i,d),a=T(t),u=P(t);return tailwindMerge.twMerge(n,c,l,a,u,t.className)}function Ne(){V({colors:{primary:"blue-600","primary-hover":"blue-700","primary-light":"blue-100",secondary:"violet-600","secondary-hover":"violet-700",success:"emerald-500",warning:"amber-500",danger:"red-500",info:"sky-500",foreground:"white",background:"zinc-950",surface:"zinc-900","surface-2":"zinc-800","surface-3":"zinc-700",muted:"zinc-500",subtle:"zinc-400",border:"zinc-700","border-light":"zinc-200","text-primary":"zinc-50","text-secondary":"zinc-400","text-muted":"zinc-600",link:"blue-400","link-hover":"blue-300"},spacing:{xs:"2",sm:"4",md:"6",lg:"8",xl:"12","2xl":"16","3xl":"24",section:"16",page:"24"},radius:{none:"none",xs:"sm",sm:"md",md:"lg",lg:"xl",xl:"2xl",card:"2xl",button:"lg",badge:"full",pill:"full",input:"md"},shadow:{xs:"sm",sm:"md",md:"lg",lg:"xl",xl:"2xl",card:"xl",modal:"2xl",none:"none"},font:{sans:"sans",mono:"mono",serif:"serif"},fontSize:{caption:"xs",small:"sm",body:"base",lead:"lg",title:"xl",heading:"2xl",display:"4xl"},duration:{fast:"150",normal:"200",slow:"300",slower:"500"},opacity:{disabled:"50",muted:"70",subtle:"40"}});}function Ae(){V({colors:{primary:"blue-500",secondary:"indigo-500",accent:"cyan-400",background:"zinc-950",surface:"zinc-900","surface-2":"zinc-800",foreground:"zinc-50",muted:"zinc-500",border:"zinc-800",success:"emerald-400",warning:"amber-400",danger:"red-400"},radius:{card:"xl",button:"lg",badge:"full",input:"md"}});}function L(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n),t=t>>>0;return t}function Y(e){return "tw-"+L(e).toString(16).slice(0,5).padStart(5,"0")}function ze(e){return L(e)}function Ie(e,t){let n=Y(`${e}:${t}`);return `Tw${e.charAt(0).toUpperCase()+e.slice(1)}-${n.replace("tw-","")}`}var M=new Set(["variant","size","intent","color","shape","tone","weight","hierarchy","emphasis","status","appearance","base","as","_ref"]);function q(e){return e.startsWith("$")?true:!(M.has(e)||x.has(e))}function _e(e){M.add(e);}function We(e){M.delete(e),x.delete(e);}function Fe(e,t=""){return O__default.default(e).withConfig({shouldForwardProp:q})}function Be(...e){return tailwindMerge.twMerge(...e.filter(Boolean))}function E(e){return Array.from(new Set(e.split(/\s+/).map(t=>t.trim()).filter(Boolean)))}function Xe(e){return E(e).sort().join(" ")}function De(e){let t=E(e),n=[],o=[];for(let i of t)i.includes(":")?o.push(i):n.push(i);return {base:n,modifiers:o}}function Ke(e){return /^!?[-a-z0-9]+(?:[:/[\]().#,]+[-a-z0-9_]+)*$/.test(e)}function H(e){let t=e.indexOf(":");return t>-1?e.slice(0,t):null}function G(e){let t=e.indexOf(":");return t>-1?e.slice(t+1):e}function Je(e){let t=E(e),n={};for(let o of t){let i=H(o)??"",s=G(o);n[i]||(n[i]=[]),n[i].push(s);}return n}function _(...e){let t=[];return U(e,t),t.join(" ")}function U(e,t){for(let n of e)if(n){if(typeof n=="string"){t.push(n);continue}if(typeof n=="number"){t.push(String(n));continue}if(Array.isArray(n)){U(n,t);continue}if(typeof n=="object")for(let o in n)n[o]&&t.push(o);}}function Le(...e){try{let{twMerge:t}=se("tailwind-merge");return t(_(...e))}catch{return _(...e)}}var Z=new Set(["base","sm","md","lg","xl","2xl"]),Ye=x;function qe(e,t){return {valid:true,errors:[],warnings:[]};}function He(e,t={}){return {tag:e,variants:t}}function ee(){f({name:"typography",props:{prose:e=>e===true||e==="base"||e===""?"prose":typeof e=="string"?`prose prose-${e}`:"prose",proseColor:e=>`prose-${e}`,proseDark:e=>e===true?"dark:prose-invert":"",proseMaxW:e=>e===false?"max-w-none":"",proseLeading:e=>`leading-${e}`}});}function te(){f({name:"forms",props:{formInput:e=>e?"form-input":"",formSelect:e=>e?"form-select":"",formTextarea:e=>e?"form-textarea":"",formCheckbox:e=>e?"form-checkbox":"",formRadio:e=>e?"form-radio":"",formRange:e=>e?"form-range":"",form:e=>({input:"form-input",select:"form-select",textarea:"form-textarea",checkbox:"form-checkbox",radio:"form-radio",range:"form-range"})[e]??`form-${e}`}});}function ne(){f({name:"aspect",props:{aspectRatio:e=>{let t={video:"aspect-video",square:"aspect-square",auto:"aspect-auto","4/3":"aspect-[4/3]","3/2":"aspect-[3/2]","1/1":"aspect-square"};return typeof e=="number"?Math.abs(e-16/9)<.01?"aspect-video":Math.abs(e-1)<.01?"aspect-square":`aspect-[${e}]`:t[e]??`aspect-${e}`}}});}function re(){f({name:"container-queries",props:{container:e=>e===true?"@container":`@container/${e}`,containerName:e=>`@container/${e}`,cq:e=>e?`@${e}:block`:""}});}function oe(){f({name:"animations-v4",props:{enterAnim:e=>({fade:"animate-in fade-in","fade-up":"animate-in fade-in slide-in-from-bottom-4","fade-down":"animate-in fade-in slide-in-from-top-4","fade-left":"animate-in fade-in slide-in-from-right-4","fade-right":"animate-in fade-in slide-in-from-left-4",zoom:"animate-in zoom-in-95","slide-up":"animate-in slide-in-from-bottom-4","slide-down":"animate-in slide-in-from-top-4","spin-in":"animate-in spin-in-180"})[e]??`animate-in ${e}`,exitAnim:e=>({fade:"animate-out fade-out","fade-up":"animate-out fade-out slide-out-to-top-4","fade-down":"animate-out fade-out slide-out-to-bottom-4",zoom:"animate-out zoom-out-95","slide-up":"animate-out slide-out-to-top-4","slide-down":"animate-out slide-out-to-bottom-4"})[e]??`animate-out ${e}`,animFill:e=>`fill-mode-${e}`,animDuration:e=>`duration-${e}`,animDelay:e=>`delay-${e}`,animRepeat:e=>e==="infinite"?"repeat-infinite":`repeat-${e}`,animDirection:e=>`direction-${e}`}});}function ie(){f({name:"interactivity",props:{hoverBg:e=>`hover:bg-${m(String(e))}`,hoverText:e=>`hover:text-${m(String(e))}`,hoverBorder:e=>`hover:border-${m(String(e))}`,hoverShadow:e=>`hover:shadow-${e}`,hoverOpacity:e=>`hover:opacity-${e}`,hoverScale:e=>e===true?"hover:scale-105":`hover:scale-${e}`,focusRing:e=>e===true?"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2":`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-${e} focus-visible:ring-offset-2`,focusBg:e=>`focus:bg-${e}`,activeScale:e=>e===true?"active:scale-95":`active:scale-${e}`,activeBg:e=>`active:bg-${e}`,activeOpacity:e=>`active:opacity-${e}`,groupHoverBg:e=>`group-hover:bg-${m(String(e))}`,groupHoverText:e=>`group-hover:text-${e}`,groupHoverScale:e=>`group-hover:scale-${e}`,peerCheckedBg:e=>`peer-checked:bg-${e}`}});}function Ge(){ee(),te(),ne(),re(),oe(),ie();}exports.KNOWN_TW_PROPS=Ye;exports.TW_PROP_KEYS=x;exports.VALID_SCREENS=Z;exports.allowProp=We;exports.attachTw=ke;exports.blockProp=_e;exports.buildSchema=He;exports.cls=xe;exports.componentName=Ie;exports.createComponent=R;exports.cv=Pe;exports.cx=_;exports.cxm=Le;exports.getModifier=H;exports.getPlugin=ge;exports.getTheme=ce;exports.getThemeNamespace=pe;exports.groupByModifier=Je;exports.hashClass=Y;exports.hashNumber=ze;exports.isObject=N;exports.isThemeToken=de;exports.isValidClass=Ke;exports.listPlugins=ye;exports.loadAllV4Plugins=Ge;exports.loadAnimationPlugin=oe;exports.loadAspectPlugin=ne;exports.loadBuiltinPlugins=Ve;exports.loadContainerQueryPlugin=re;exports.loadDarkTheme=Ae;exports.loadDefaultTheme=Ne;exports.loadFormsPlugin=te;exports.loadInteractivityPlugin=ie;exports.loadTypographyPlugin=ee;exports.mergeClasses=Be;exports.normalizeClasses=Xe;exports.onThemeChange=ue;exports.parseClassString=E;exports.registerPlugin=f;exports.registerProp=fe;exports.replaceTheme=le;exports.resetTheme=me;exports.resolveClasses=je;exports.resolveColor=m;exports.resolveCompound=C;exports.resolveProps=T;exports.resolveRadius=w;exports.resolveResponsive=r;exports.resolveSpacing=p;exports.resolveThemeToken=z;exports.resolveToken=b;exports.resolveVariants=v;exports.setTheme=V;exports.shouldForwardProp=q;exports.splitModifiers=De;exports.stripModifier=G;exports.styledFactory=Fe;exports.tw=ve;exports.validateVariantProps=qe;exports.withTw=K;//# sourceMappingURL=index.js.map
|
|
9
4
|
//# sourceMappingURL=index.js.map
|