@aurora-ds/theme 1.4.0 → 1.6.0
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 +195 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +259 -51
- package/dist/index.d.ts +259 -51
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -225,6 +225,188 @@ const myTheme = createTheme(defaultTheme, {
|
|
|
225
225
|
|
|
226
226
|
---
|
|
227
227
|
|
|
228
|
+
## Custom Themes (Complete Token Replacement)
|
|
229
|
+
|
|
230
|
+
Need a completely different color token structure? Aurora supports **full customization** where you can define your own semantic tokens without inheriting `BaseColors`.
|
|
231
|
+
|
|
232
|
+
### Option 1: Replace Mode
|
|
233
|
+
|
|
234
|
+
Use `{ mode: 'replace' }` to completely replace a token category instead of deep-merging:
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
import { createTheme, defaultTheme } from '@aurora-ds/theme'
|
|
238
|
+
|
|
239
|
+
// Replace the entire colors object (no merge with defaults)
|
|
240
|
+
const myTheme = createTheme(defaultTheme, {
|
|
241
|
+
colors: {
|
|
242
|
+
brand: '#007bff',
|
|
243
|
+
brandHover: '#0056b3',
|
|
244
|
+
surface: '#ffffff',
|
|
245
|
+
text: '#212529',
|
|
246
|
+
},
|
|
247
|
+
}, { mode: 'replace' })
|
|
248
|
+
|
|
249
|
+
// Result: theme.colors = { brand, brandHover, surface, text }
|
|
250
|
+
// Note: theme.colors.primary no longer exists!
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Option 2: Custom Theme Function
|
|
254
|
+
|
|
255
|
+
For full type safety with your own color tokens, use `createCustomTheme`:
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import { createCustomTheme } from '@aurora-ds/theme'
|
|
259
|
+
import type { CustomTheme } from '@aurora-ds/theme'
|
|
260
|
+
|
|
261
|
+
// 1. Define your own color token structure
|
|
262
|
+
type MyBrandColors = {
|
|
263
|
+
brand: string
|
|
264
|
+
brandHover: string
|
|
265
|
+
brandActive: string
|
|
266
|
+
surface: string
|
|
267
|
+
surfaceElevated: string
|
|
268
|
+
textPrimary: string
|
|
269
|
+
textSecondary: string
|
|
270
|
+
border: string
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// 2. Create your theme with full type safety
|
|
274
|
+
const myTheme = createCustomTheme<MyBrandColors>({
|
|
275
|
+
colors: {
|
|
276
|
+
brand: '#007bff',
|
|
277
|
+
brandHover: '#0056b3',
|
|
278
|
+
brandActive: '#004085',
|
|
279
|
+
surface: '#ffffff',
|
|
280
|
+
surfaceElevated: '#f8f9fa',
|
|
281
|
+
textPrimary: '#212529',
|
|
282
|
+
textSecondary: '#6c757d',
|
|
283
|
+
border: '#dee2e6',
|
|
284
|
+
},
|
|
285
|
+
// Other tokens use defaults, or provide your own:
|
|
286
|
+
// spacing: { ... },
|
|
287
|
+
// radius: { ... },
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
// 3. TypeScript knows your exact token structure!
|
|
291
|
+
myTheme.colors.brand // ✅ OK - string
|
|
292
|
+
myTheme.colors.primary // ❌ Error - property doesn't exist
|
|
293
|
+
|
|
294
|
+
// 4. Type your theme for components
|
|
295
|
+
type MyTheme = typeof myTheme
|
|
296
|
+
// or: type MyTheme = CustomTheme<MyBrandColors>
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Use Custom Theme in Components
|
|
300
|
+
|
|
301
|
+
```tsx
|
|
302
|
+
import { ThemeProvider, createTypedStyles, useTheme } from '@aurora-ds/theme'
|
|
303
|
+
|
|
304
|
+
// ✨ Create a pre-typed createStyles function ONCE
|
|
305
|
+
export const createStyles = createTypedStyles<MyTheme>()
|
|
306
|
+
|
|
307
|
+
// Now use it everywhere WITHOUT specifying the type!
|
|
308
|
+
const STYLES = createStyles((theme) => ({
|
|
309
|
+
button: {
|
|
310
|
+
backgroundColor: theme.colors.brand, // ✅ TypeScript knows!
|
|
311
|
+
color: theme.colors.textPrimary, // ✅ Works
|
|
312
|
+
// backgroundColor: theme.colors.primary, // ❌ Would error
|
|
313
|
+
},
|
|
314
|
+
}))
|
|
315
|
+
|
|
316
|
+
// Access in components
|
|
317
|
+
function MyComponent() {
|
|
318
|
+
const theme = useTheme<MyTheme>()
|
|
319
|
+
return <div style={{ color: theme.colors.textSecondary }}>Hello</div>
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Wrap your app
|
|
323
|
+
<ThemeProvider theme={myTheme}>
|
|
324
|
+
<App />
|
|
325
|
+
</ThemeProvider>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Project Setup (Recommended)
|
|
329
|
+
|
|
330
|
+
Create a `theme.ts` file in your project to centralize your custom theme:
|
|
331
|
+
|
|
332
|
+
```tsx
|
|
333
|
+
// src/theme.ts
|
|
334
|
+
import {
|
|
335
|
+
createCustomTheme,
|
|
336
|
+
createTypedStyles,
|
|
337
|
+
ThemeProvider as BaseThemeProvider,
|
|
338
|
+
useTheme as baseUseTheme,
|
|
339
|
+
} from '@aurora-ds/theme'
|
|
340
|
+
import type { CustomTheme } from '@aurora-ds/theme'
|
|
341
|
+
|
|
342
|
+
// 1. Define your color tokens
|
|
343
|
+
type MyColors = {
|
|
344
|
+
brand: string
|
|
345
|
+
brandHover: string
|
|
346
|
+
brandActive: string
|
|
347
|
+
surface: string
|
|
348
|
+
surfaceElevated: string
|
|
349
|
+
textPrimary: string
|
|
350
|
+
textSecondary: string
|
|
351
|
+
border: string
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// 2. Create your theme
|
|
355
|
+
export const theme = createCustomTheme<MyColors>({
|
|
356
|
+
colors: {
|
|
357
|
+
brand: '#007bff',
|
|
358
|
+
brandHover: '#0056b3',
|
|
359
|
+
brandActive: '#004085',
|
|
360
|
+
surface: '#ffffff',
|
|
361
|
+
surfaceElevated: '#f8f9fa',
|
|
362
|
+
textPrimary: '#212529',
|
|
363
|
+
textSecondary: '#6c757d',
|
|
364
|
+
border: '#dee2e6',
|
|
365
|
+
},
|
|
366
|
+
})
|
|
367
|
+
|
|
368
|
+
// 3. Export typed utilities (use these throughout your app!)
|
|
369
|
+
export type MyTheme = typeof theme
|
|
370
|
+
export const createStyles = createTypedStyles<MyTheme>()
|
|
371
|
+
export const useTheme = () => baseUseTheme<MyTheme>()
|
|
372
|
+
export const ThemeProvider = BaseThemeProvider
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Then use in your components:
|
|
376
|
+
|
|
377
|
+
```tsx
|
|
378
|
+
// src/components/Button.tsx
|
|
379
|
+
import { createStyles } from '../theme'
|
|
380
|
+
|
|
381
|
+
// No need to specify <MyTheme> - it's already typed!
|
|
382
|
+
const STYLES = createStyles((theme) => ({
|
|
383
|
+
root: {
|
|
384
|
+
backgroundColor: theme.colors.brand,
|
|
385
|
+
color: theme.colors.textPrimary,
|
|
386
|
+
padding: theme.spacing.md,
|
|
387
|
+
borderRadius: theme.radius.md,
|
|
388
|
+
':hover': {
|
|
389
|
+
backgroundColor: theme.colors.brandHover,
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
}))
|
|
393
|
+
|
|
394
|
+
export const Button = ({ children }) => (
|
|
395
|
+
<button className={STYLES.root}>{children}</button>
|
|
396
|
+
)
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### When to Use Each Approach
|
|
400
|
+
|
|
401
|
+
| Approach | Use Case |
|
|
402
|
+
|----------|----------|
|
|
403
|
+
| `createTheme()` (default merge) | Extend default tokens, keep compatibility |
|
|
404
|
+
| `createTheme()` with `{ mode: 'replace' }` | Quick replacement without type safety |
|
|
405
|
+
| `createCustomTheme<T>()` | Full type safety with custom token structure |
|
|
406
|
+
| `createTypedStyles<T>()` | Pre-type your `createStyles` for DX (recommended with custom themes) |
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
228
410
|
## Theme Structure
|
|
229
411
|
|
|
230
412
|
### Colors
|
|
@@ -372,6 +554,9 @@ clearSSRRules() // Reset for next request
|
|
|
372
554
|
| `PaletteName` | Union of palette names |
|
|
373
555
|
| `ExtendTheme<T>` | Helper to extend theme |
|
|
374
556
|
| `DeepPartial<T>` | For partial overrides |
|
|
557
|
+
| `CustomTheme<TColors, ...>` | Generic type for fully custom themes |
|
|
558
|
+
| `CustomThemeBase<TColors>` | Base type for custom color themes |
|
|
559
|
+
| `CreateThemeOptions` | Options for `createTheme()` (`{ mode: 'merge' \| 'replace' }`) |
|
|
375
560
|
|
|
376
561
|
### Components & Hooks
|
|
377
562
|
|
|
@@ -380,11 +565,21 @@ clearSSRRules() // Reset for next request
|
|
|
380
565
|
| `ThemeProvider` | Theme context provider |
|
|
381
566
|
| `useTheme<T>()` | Access current theme |
|
|
382
567
|
|
|
568
|
+
### Theme Creation
|
|
569
|
+
|
|
570
|
+
| Export | Description |
|
|
571
|
+
|--------|-------------|
|
|
572
|
+
| `createTheme(base, overrides, options?)` | Create theme by merging/replacing base with overrides |
|
|
573
|
+
| `createCustomTheme<TColors>(config)` | Create theme with fully custom color tokens |
|
|
574
|
+
| `mergeThemes(base, ...overrides)` | Merge multiple theme overrides |
|
|
575
|
+
| `createThemeVariant(overrides)` | Create a reusable theme variant factory |
|
|
576
|
+
|
|
383
577
|
### Styling
|
|
384
578
|
|
|
385
579
|
| Export | Description |
|
|
386
580
|
|--------|-------------|
|
|
387
581
|
| `createStyles<T>()` | Create themed styles |
|
|
582
|
+
| `createTypedStyles<T>()` | Create a pre-typed `createStyles` function for custom themes |
|
|
388
583
|
| `keyframes()` | CSS keyframe animations |
|
|
389
584
|
| `fontFace()` | @font-face rules |
|
|
390
585
|
| `cssVariables()` | CSS custom properties |
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var He=typeof document>"u",ye=null,K=null,de=[],ke=new Map([["backgroundColor","background-color"],["borderRadius","border-radius"],["fontSize","font-size"],["fontWeight","font-weight"],["lineHeight","line-height"],["marginTop","margin-top"],["marginBottom","margin-bottom"],["marginLeft","margin-left"],["marginRight","margin-right"],["paddingTop","padding-top"],["paddingBottom","padding-bottom"],["paddingLeft","padding-left"],["paddingRight","padding-right"],["textAlign","text-align"],["justifyContent","justify-content"],["alignItems","align-items"],["flexDirection","flex-direction"],["flexWrap","flex-wrap"],["boxShadow","box-shadow"],["zIndex","z-index"]]),me=new Map,V=new Set,pe=new Set,ge=new Set,Te=0,ir=new Set(["animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","fontWeight","lineHeight","opacity","order","orphans","widows","zIndex","zoom"]),Ce=100;if(!He){let r=document.getElementById("aurora-styles");if(r)K=r.sheet;else {let n=document.createElement("style");n.id="aurora-styles",document.head.appendChild(n),K=n.sheet;}}var _=r=>{let n=ye;return ye=r,n},be=()=>ye?.(),R=r=>{if(He)de.push(r);else if(K)try{K.insertRule(r,K.cssRules.length);}catch{}},$=r=>{let n=ke.get(r);return n||(n=r.replace(/([A-Z])/g,"-$1").toLowerCase(),ke.set(r,n)),n},N=r=>r.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase(),sr=/expression\s*\(|javascript\s*:|data\s*:\s*text\/html|behavior\s*:|@import|<\s*\/?\s*style/i,we=r=>{let n=r.replace(/\0/g,"");return sr.test(n)?(cr&&console.warn(`[Aurora] Potentially dangerous CSS value blocked: "${r.slice(0,50)}..."`),"unset"):n},cr=typeof process<"u"&&process.env?.NODE_ENV!=="production",De=(r,n)=>typeof n=="number"&&!ir.has(r)?`${n}px`:we(String(n)),M=r=>{let n=[];for(let a in r){let c=r[a];c!=null&&typeof c!="object"&&n.push(`${$(a)}:${De(a,c)}`);}return n.join(";")+(n.length?";":"")};var Pe=r=>{let n=r.length;if(n<=4){let a="";for(let c=0;c<n;c++){let f=r[c],p=typeof f;if(f===void 0)a+=c?"|u":"u";else if(f===null)a+=c?"|n":"n";else if(p==="string"||p==="number"||p==="boolean")a+=c?"|"+f:String(f);else return JSON.stringify(r)}return a}return JSON.stringify(r)},Le=r=>{if(r==="true"||r==="false"||/^-?\d+$/.test(r))return r;if(/^[a-z][a-z0-9]*$/i.test(r))return N(r);let n=5381;for(let a=0;a<r.length;a++)n=(n<<5)+n^r.charCodeAt(a);return (n>>>0).toString(36)},Re=r=>{let n=new Map;return {getOrSet(a,c){let f=n.get(a);if(f!==void 0)return n.delete(a),n.set(a,f),f;let p=c();if(n.size>=r){let b=n.keys().next().value;b!==void 0&&n.delete(b);}return n.set(a,p),p}}},Ae=r=>{let n=JSON.stringify(r),a=5381;for(let c=0;c<n.length;c++)a=(a<<5)+a^n.charCodeAt(c);return (a>>>0).toString(36)},$e=r=>{let n=5381;for(let a=0;a<r.length;a++)n=(n<<5)+n^r.charCodeAt(a);return (n>>>0).toString(36)},lr=r=>{if(!V.has(r))return V.add(r),r;let n=2,a=`${r}-${n}`;for(;V.has(a);)a=`${r}-${++n}`;return V.add(a),a},Se=(r,n,a=false)=>{if(a){let b=Ae(r),S=me.get(b);if(S)return S}let c=lr(n),f=[],p=[];for(let b in r){let S=r[b],D=b[0];if(D==="@"){let w=M(S);w&&p.push(`${b}{.${c}{${w}}}`);}else if(D==="&"){let w=M(S);if(w){let L=b.replace(/&/g,`.${c}`);p.push(`${L}{${w}}`);}}else if(D===":"){let w=M(S);w&&p.push(`.${c}${b}{${w}}`);}else S!=null&&typeof S!="object"&&f.push(`${$(b)}:${De(b,S)}`);}f.length&&R(`.${c}{${f.join(";")}}`);for(let b of p)R(b);return a&&me.set(Ae(r),c),c},Ee=r=>pe.has(r),Ie=r=>{pe.add(r);},Fe=()=>(++Te).toString(36),We=r=>ge.has(r),Ve=r=>{ge.add(r);},ve=()=>de,Ke=()=>{de=[],me.clear(),V.clear(),pe.clear(),ge.clear(),Te=0;};var Me=react.createContext(void 0),mr=({theme:r,children:n})=>{let a=_(()=>r);return react.useLayoutEffect(()=>()=>{_(a);},[a]),jsxRuntime.jsx(Me.Provider,{value:r,children:n})},dr=()=>{let r=react.useContext(Me);if(!r)throw new Error("useTheme must be used within a ThemeProvider");return r};var Ne=r=>{let n=JSON.stringify(r),a=5381;for(let c=0;c<n.length;c++)a=(a<<5)+a^n.charCodeAt(c);return (a>>>0).toString(36)},z=new Map,gr=50;var he=(r,n)=>{let a={...r};for(let c in n){let f=n[c],p=r[c];f!==void 0&&typeof f=="object"&&f!==null&&!Array.isArray(f)&&typeof p=="object"&&p!==null?a[c]=he(p,f):f!==void 0&&(a[c]=f);}return a},ze=(r,n)=>{let a=`${Ne(r)}_${Ne(n)}`,c=z.get(a);if(c)return c;let f=he(r,n);if(z.size>=gr){let p=z.keys().next().value;p&&z.delete(p);}return z.set(a,f),f},br=(r,...n)=>n.reduce((a,c)=>he(a,c),r),Sr=r=>n=>ze(n,r);var g={25:"#fcfcfc",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"};var e={25:"#fcfcfd",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"};var j={25:"#fcfcfb",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"};var i={25:"#fffbfb",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"};var x={25:"#fffcfa",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"};var o={25:"#fffdfb",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"};var P={25:"#fefef9",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"};var O={25:"#fbfef8",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"};var s={25:"#f6fef9",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"};var A={25:"#f5fefc",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"};var d={25:"#f4fefe",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"};var u={25:"#f3fefe",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"};var k={25:"#f5faff",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"};var t={25:"#f5f8ff",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"};var y={25:"#f5f7ff",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"};var m={25:"#f8f5ff",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"};var h={25:"#faf5ff",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"};var B={25:"#fef5ff",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"};var H={25:"#fef5f9",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"};var v={25:"#fff5f6",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"};var l="#ffffff",vr="#000000",hr="transparent",xr="currentColor",kr={gray:g,slate:e,stone:j,red:i,orange:x,amber:o,yellow:P,lime:O,green:s,emerald:A,teal:d,cyan:u,sky:k,blue:t,indigo:y,violet:m,purple:h,fuchsia:B,pink:H,rose:v,white:"#ffffff",black:"#000000",transparent:"transparent",current:"currentColor"};var T={background:e[25],surface:l,surfaceHover:e[100],surfaceActive:e[200],elevated:l,overlay:"rgba(15, 23, 42, 0.6)",text:e[800],textSecondary:e[500],textTertiary:e[400],textInverse:l,border:e[200],borderHover:e[300],borderSubtle:e[100],disabled:e[300],disabledText:e[400]},C={background:e[900],surface:e[800],surfaceHover:e[700],surfaceActive:e[600],elevated:e[700],overlay:"rgba(0, 0, 0, 0.7)",text:e[100],textSecondary:e[400],textTertiary:e[500],textInverse:e[900],border:e[600],borderHover:e[500],borderSubtle:e[700],disabled:e[600],disabledText:e[500]};var E={...T,primary:y[600],onPrimary:l,primaryHover:y[700],primaryActive:y[800],primarySubtle:y[50],primaryDisabled:y[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:h[600],onTertiary:l,tertiaryHover:h[700],tertiaryActive:h[800],tertiarySubtle:h[50],tertiaryDisabled:h[300],accent:u[500],onAccent:l,accentHover:u[600],accentActive:u[700],accentSubtle:u[50],borderFocus:y[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:y[600],linkHover:y[700],linkActive:y[800],linkVisited:m[700],focus:y[500]},I={...C,primary:y[400],onPrimary:y[950],primaryHover:y[300],primaryActive:y[500],primarySubtle:y[950],primaryDisabled:y[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:h[400],onTertiary:h[950],tertiaryHover:h[300],tertiaryActive:h[500],tertiarySubtle:h[950],tertiaryDisabled:h[700],accent:u[400],onAccent:u[950],accentHover:u[300],accentActive:u[500],accentSubtle:u[950],borderFocus:y[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:y[400],linkHover:y[300],linkActive:y[500],linkVisited:m[400],focus:y[400]};var G={...T,primary:t[600],onPrimary:l,primaryHover:t[700],primaryActive:t[800],primarySubtle:t[50],primaryDisabled:t[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:k[500],onTertiary:l,tertiaryHover:k[600],tertiaryActive:k[700],tertiarySubtle:k[50],tertiaryDisabled:k[300],accent:u[500],onAccent:l,accentHover:u[600],accentActive:u[700],accentSubtle:u[50],borderFocus:t[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:t[600],linkHover:t[700],linkActive:t[800],linkVisited:m[700],focus:t[500]},Z={...C,primary:t[400],onPrimary:t[950],primaryHover:t[300],primaryActive:t[500],primarySubtle:t[950],primaryDisabled:t[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:k[400],onTertiary:k[950],tertiaryHover:k[300],tertiaryActive:k[500],tertiarySubtle:k[950],tertiaryDisabled:k[700],accent:u[400],onAccent:u[950],accentHover:u[300],accentActive:u[500],accentSubtle:u[950],borderFocus:t[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:t[400],linkHover:t[300],linkActive:t[500],linkVisited:m[400],focus:t[400]};var q={...T,primary:v[600],onPrimary:l,primaryHover:v[700],primaryActive:v[800],primarySubtle:v[50],primaryDisabled:v[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:H[500],onTertiary:l,tertiaryHover:H[600],tertiaryActive:H[700],tertiarySubtle:H[50],tertiaryDisabled:H[300],accent:m[600],onAccent:l,accentHover:m[700],accentActive:m[800],accentSubtle:m[50],borderFocus:v[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:v[600],linkHover:v[700],linkActive:v[800],linkVisited:h[700],focus:v[500]},J={...C,primary:v[400],onPrimary:v[950],primaryHover:v[300],primaryActive:v[500],primarySubtle:v[950],primaryDisabled:v[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:H[400],onTertiary:H[950],tertiaryHover:H[300],tertiaryActive:H[500],tertiarySubtle:H[950],tertiaryDisabled:H[700],accent:m[400],onAccent:m[950],accentHover:m[300],accentActive:m[500],accentSubtle:m[950],borderFocus:v[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:v[400],linkHover:v[300],linkActive:v[500],linkVisited:h[400],focus:v[400]};var U={...T,primary:A[600],onPrimary:l,primaryHover:A[700],primaryActive:A[800],primarySubtle:A[50],primaryDisabled:A[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:d[500],onTertiary:l,tertiaryHover:d[600],tertiaryActive:d[700],tertiarySubtle:d[50],tertiaryDisabled:d[300],accent:o[500],onAccent:o[950],accentHover:o[600],accentActive:o[700],accentSubtle:o[50],borderFocus:A[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:A[600],linkHover:A[700],linkActive:A[800],linkVisited:d[700],focus:A[500]},X={...C,primary:A[400],onPrimary:A[950],primaryHover:A[300],primaryActive:A[500],primarySubtle:A[950],primaryDisabled:A[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:d[400],onTertiary:d[950],tertiaryHover:d[300],tertiaryActive:d[500],tertiarySubtle:d[950],tertiaryDisabled:d[700],accent:o[400],onAccent:o[950],accentHover:o[300],accentActive:o[500],accentSubtle:o[950],borderFocus:A[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:A[400],linkHover:A[300],linkActive:A[500],linkVisited:d[400],focus:A[400]};var Q={...T,primary:d[600],onPrimary:l,primaryHover:d[700],primaryActive:d[800],primarySubtle:d[50],primaryDisabled:d[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:u[500],onTertiary:l,tertiaryHover:u[600],tertiaryActive:u[700],tertiarySubtle:u[50],tertiaryDisabled:u[300],accent:x[500],onAccent:l,accentHover:x[600],accentActive:x[700],accentSubtle:x[50],borderFocus:d[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:d[600],linkHover:d[700],linkActive:d[800],linkVisited:u[700],focus:d[500]},Y={...C,primary:d[400],onPrimary:d[950],primaryHover:d[300],primaryActive:d[500],primarySubtle:d[950],primaryDisabled:d[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:u[400],onTertiary:u[950],tertiaryHover:u[300],tertiaryActive:u[500],tertiarySubtle:u[950],tertiaryDisabled:u[700],accent:x[400],onAccent:x[950],accentHover:x[300],accentActive:x[500],accentSubtle:x[950],borderFocus:d[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:d[400],linkHover:d[300],linkActive:d[500],linkVisited:u[400],focus:d[400]};var ee={...T,primary:m[600],onPrimary:l,primaryHover:m[700],primaryActive:m[800],primarySubtle:m[50],primaryDisabled:m[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:h[500],onTertiary:l,tertiaryHover:h[600],tertiaryActive:h[700],tertiarySubtle:h[50],tertiaryDisabled:h[300],accent:H[500],onAccent:l,accentHover:H[600],accentActive:H[700],accentSubtle:H[50],borderFocus:m[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:m[600],linkHover:m[700],linkActive:m[800],linkVisited:h[700],focus:m[500]},re={...C,primary:m[400],onPrimary:m[950],primaryHover:m[300],primaryActive:m[500],primarySubtle:m[950],primaryDisabled:m[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:h[400],onTertiary:h[950],tertiaryHover:h[300],tertiaryActive:h[500],tertiarySubtle:h[950],tertiaryDisabled:h[700],accent:H[400],onAccent:H[950],accentHover:H[300],accentActive:H[500],accentSubtle:H[950],borderFocus:m[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:m[400],linkHover:m[300],linkActive:m[500],linkVisited:h[400],focus:m[400]};var te={...T,primary:o[500],onPrimary:o[950],primaryHover:o[600],primaryActive:o[700],primarySubtle:o[50],primaryDisabled:o[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:x[500],onTertiary:l,tertiaryHover:x[600],tertiaryActive:x[700],tertiarySubtle:x[50],tertiaryDisabled:x[300],accent:y[600],onAccent:l,accentHover:y[700],accentActive:y[800],accentSubtle:y[50],borderFocus:o[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:P[500],onWarning:P[950],warningHover:P[600],warningSubtle:P[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:o[700],linkHover:o[800],linkActive:o[900],linkVisited:x[700],focus:o[500]},oe={...C,primary:o[400],onPrimary:o[950],primaryHover:o[300],primaryActive:o[500],primarySubtle:o[950],primaryDisabled:o[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:x[400],onTertiary:x[950],tertiaryHover:x[300],tertiaryActive:x[500],tertiarySubtle:x[950],tertiaryDisabled:x[700],accent:y[400],onAccent:y[950],accentHover:y[300],accentActive:y[500],accentSubtle:y[950],borderFocus:o[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:P[400],onWarning:P[950],warningHover:P[300],warningSubtle:P[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:o[400],linkHover:o[300],linkActive:o[500],linkVisited:x[400],focus:o[400]};var ne={...T,primary:u[600],onPrimary:l,primaryHover:u[700],primaryActive:u[800],primarySubtle:u[50],primaryDisabled:u[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:k[500],onTertiary:l,tertiaryHover:k[600],tertiaryActive:k[700],tertiarySubtle:k[50],tertiaryDisabled:k[300],accent:v[500],onAccent:l,accentHover:v[600],accentActive:v[700],accentSubtle:v[50],borderFocus:u[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:u[600],linkHover:u[700],linkActive:u[800],linkVisited:d[700],focus:u[500]},ae={...C,primary:u[400],onPrimary:u[950],primaryHover:u[300],primaryActive:u[500],primarySubtle:u[950],primaryDisabled:u[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:k[400],onTertiary:k[950],tertiaryHover:k[300],tertiaryActive:k[500],tertiarySubtle:k[950],tertiaryDisabled:k[700],accent:v[400],onAccent:v[950],accentHover:v[300],accentActive:v[500],accentSubtle:v[950],borderFocus:u[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:u[400],linkHover:u[300],linkActive:u[500],linkVisited:d[400],focus:u[400]};var ie={...T,primary:e[700],onPrimary:l,primaryHover:e[800],primaryActive:e[900],primarySubtle:e[100],primaryDisabled:e[400],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:e[600],onTertiary:l,tertiaryHover:e[700],tertiaryActive:e[800],tertiarySubtle:e[100],tertiaryDisabled:e[400],accent:t[600],onAccent:l,accentHover:t[700],accentActive:t[800],accentSubtle:t[50],borderFocus:t[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:t[600],linkHover:t[700],linkActive:t[800],linkVisited:y[700],focus:t[500]},se={...C,primary:e[200],onPrimary:e[900],primaryHover:e[100],primaryActive:e[300],primarySubtle:e[900],primaryDisabled:e[600],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:e[400],onTertiary:e[950],tertiaryHover:e[300],tertiaryActive:e[500],tertiarySubtle:e[900],tertiaryDisabled:e[600],accent:t[400],onAccent:t[950],accentHover:t[300],accentActive:t[500],accentSubtle:t[950],borderFocus:t[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:t[400],linkHover:t[300],linkActive:t[500],linkVisited:y[400],focus:t[400]};var ce={...T,primary:g[800],onPrimary:l,primaryHover:g[900],primaryActive:g[950],primarySubtle:g[100],primaryDisabled:g[400],secondary:g[100],onSecondary:g[700],secondaryHover:g[200],secondaryActive:g[300],secondarySubtle:g[50],secondaryDisabled:g[100],tertiary:g[600],onTertiary:l,tertiaryHover:g[700],tertiaryActive:g[800],tertiarySubtle:g[100],tertiaryDisabled:g[400],accent:y[600],onAccent:l,accentHover:y[700],accentActive:y[800],accentSubtle:y[50],borderFocus:y[500],success:s[600],onSuccess:l,successHover:s[700],successSubtle:s[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:i[500],onError:l,errorHover:i[600],errorSubtle:i[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:y[600],linkHover:y[700],linkActive:y[800],linkVisited:m[700],focus:y[500]},le={...C,primary:g[100],onPrimary:g[900],primaryHover:g[50],primaryActive:g[200],primarySubtle:g[900],primaryDisabled:g[600],secondary:g[700],onSecondary:g[100],secondaryHover:g[600],secondaryActive:g[500],secondarySubtle:g[800],secondaryDisabled:g[800],tertiary:g[400],onTertiary:g[950],tertiaryHover:g[300],tertiaryActive:g[500],tertiarySubtle:g[900],tertiaryDisabled:g[600],accent:y[400],onAccent:y[950],accentHover:y[300],accentActive:y[500],accentSubtle:y[950],borderFocus:y[400],success:s[400],onSuccess:s[950],successHover:s[300],successSubtle:s[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:i[400],onError:i[950],errorHover:i[300],errorSubtle:i[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:y[400],linkHover:y[300],linkActive:y[500],linkVisited:m[400],focus:y[400]};var Ar={indigo:{light:E,dark:I},blue:{light:G,dark:Z},rose:{light:q,dark:J},emerald:{light:U,dark:X},teal:{light:Q,dark:Y},violet:{light:ee,dark:re},amber:{light:te,dark:oe},cyan:{light:ne,dark:ae},slate:{light:ie,dark:se},gray:{light:ce,dark:le}};var _e={none:"0","2xs":"0.125rem",xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem","5xl":"8rem"},je={none:"0",xs:"0.125rem",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"},Oe={none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",focus:"0 0 0 3px rgb(99 102 241 / 0.4)"},Be={"2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.25rem",xl:"1.5rem","2xl":"2rem","3xl":"2.5rem","4xl":"3rem","5xl":"4rem"},Ge={light:300,regular:400,medium:500,semibold:600,bold:700},Ze={none:1,tight:1.25,normal:1.5,relaxed:1.75,loose:2},qe={behind:-1,base:0,dropdown:1e3,sticky:1100,overlay:1300,modal:1400,popover:1500,tooltip:1600,toast:1700},Je={fast:"150ms ease-out",normal:"250ms ease-out",slow:"350ms ease-out"},Ue={none:0,lowest:.05,low:.1,medium:.25,high:.5,higher:.75,full:1},Xe=E,Qe=I,Ye={colors:Xe,spacing:_e,radius:je,shadows:Oe,fontSize:Be,fontWeight:Ge,lineHeight:Ze,zIndex:qe,transition:Je,opacity:Ue},Hr={...Ye,colors:Qe};var Tr=()=>{let r=new Error().stack||"",n=r.match(/([A-Za-z0-9_]+)\.styles\.[tj]s/);if(n?.[1])return N(n[1]);let a=r.match(/\/([A-Za-z0-9_]+)\.[tj]sx?[:\d]*\)?$/m);return a?.[1]&&a[1]!=="createStyles"?N(a[1]):"style"},er=(r,n)=>{let a={};for(let c in r){let f=r[c];if(f){let p=`${n}-${N(c)}`;if(typeof f=="function"){let b=Re(Ce);a[c]=(...S)=>{let D=Pe(S);return b.getOrSet(D,()=>{let w=f(...S);return Se(w,`${p}-${Le(D)}`)})};}else a[c]=Se(f,p,true);}}return a},Cr=r=>{let n=Tr();if(typeof r=="function"){let a=null,c;return new Proxy({},{get(f,p){let b=be();if(!b)throw new Error("createStyles: Theme context not found. Make sure you are using this inside a ThemeProvider.");return (b!==c||!a)&&(a=er(r(b),n),c=b),a[p]}})}return er(r,n)};var wr=r=>{let n="";for(let c in r)n+=`${c}{${M(r[c])}}`;if(Ee(n))return `aurora-kf-${$e(n)}`;let a=`aurora-kf-${Fe()}`;return R(`@keyframes ${a}{${n}}`),Ie(n),a};var Dr=r=>{let{fontFamily:n,src:a,fontStyle:c="normal",fontWeight:f=400,fontDisplay:p="swap",unicodeRange:b}=r,S=`font-family:"${n}";`;return S+=`src:${a};`,S+=`font-style:${c};`,S+=`font-weight:${f};`,S+=`font-display:${p};`,b&&(S+=`unicode-range:${b};`),We(S)||(R(`@font-face{${S}}`),Ve(S)),n};var rr=(r,n)=>{let a="";for(let c in r){let f=r[c],p=`--${n}-${$(c)}`;f&&typeof f=="object"?a+=rr(f,`${n}-${$(c)}`):f!=null&&(a+=`${p}:${f};`);}return a},Pr=(r,n="theme")=>{let a=rr(r,n);R(`:root{${a}}`);},Lr=(r,n)=>{let a=`--theme-${r.replace(/\./g,"-")}`;return n?`var(${a}, ${n})`:`var(${a})`},Rr=(r,n={})=>{let{prefix:a="",inject:c=false}=n,f={},p="";for(let b in r){let S=$(b),D=a?`--${a}-${S}`:`--${S}`;f[b]=`var(${D})`,c&&(p+=`${D}:${r[b]};`);}return c&&p&&R(`:root{${p}}`),f};var tr=()=>ve().join(""),$r=()=>{let r=tr();return r?`<style id="aurora-styles">${r}</style>`:""},Er=()=>{Ke();},Ir=()=>[...ve()];var fe=r=>{let n=r.replace(/^#/,""),a=n.length===3?n.split("").map(f=>f+f).join(""):n;if(a.length!==6)return null;let c=parseInt(a,16);return isNaN(c)?null:{r:c>>16&255,g:c>>8&255,b:c&255}},xe=(r,n,a)=>{let[c,f,p]=[r,n,a].map(b=>{let S=b/255;return S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4)});return .2126*c+.7152*f+.0722*p},F=(r,n)=>{let a=fe(r),c=fe(n);if(!a||!c)return null;let f=xe(a.r,a.g,a.b),p=xe(c.r,c.g,c.b),b=Math.max(f,p),S=Math.min(f,p);return (b+.05)/(S+.05)},Fr=(r,n,a="AA",c=false)=>{let f=F(r,n);return f===null?false:f>={AA:c?3:4.5,AAA:c?4.5:7}[a]},Wr=(r,n)=>{let a=F(r,n);return a===null?null:{colors:[r,n],ratio:Math.round(a*100)/100,passesAA:a>=4.5,passesAALarge:a>=3,passesAAA:a>=7,passesAAALarge:a>=4.5}},Vr=[["onPrimary","primary","primary/onPrimary"],["text","primarySubtle","primarySubtle/text"],["onSecondary","secondary","secondary/onSecondary"],["text","secondarySubtle","secondarySubtle/text"],["onTertiary","tertiary","tertiary/onTertiary"],["text","tertiarySubtle","tertiarySubtle/text"],["onAccent","accent","accent/onAccent"],["text","accentSubtle","accentSubtle/text"],["text","background","background/text"],["text","surface","surface/text"],["textSecondary","surface","surface/textSecondary"],["textTertiary","surface","surface/textTertiary"],["onSuccess","success","success/onSuccess"],["text","successSubtle","successSubtle/text"],["onWarning","warning","warning/onWarning"],["text","warningSubtle","warningSubtle/text"],["onError","error","error/onError"],["text","errorSubtle","errorSubtle/text"],["onInfo","info","info/onInfo"],["text","infoSubtle","infoSubtle/text"],["link","surface","surface/link"],["link","background","background/link"]],Kr=(r,n="AA")=>{let a=[],c=n==="AAA"?7:4.5,f=n==="AAA"?4.5:3;for(let[p,b,S]of Vr){let D=r.colors[p],w=r.colors[b];if(!D||!w||!D.startsWith("#")||!w.startsWith("#"))continue;let L=F(D,w);L!==null&&(L<c?a.push({pair:S,foreground:p,background:b,ratio:Math.round(L*100)/100,required:c,level:"AA"}):L<f&&a.push({pair:S,foreground:p,background:b,ratio:Math.round(L*100)/100,required:f,level:"AALarge"}));}return a},Mr=(r,n,a=4.5)=>{let c=fe(r),f=fe(n);if(!c||!f)return null;let b=xe(f.r,f.g,f.b)>.5,S=r,D=F(r,n)||0;for(let w=0;w<=100;w+=5){let L=b?(100-w)/100:(100+w)/100,or=Math.min(255,Math.max(0,Math.round(c.r*L))),nr=Math.min(255,Math.max(0,Math.round(c.g*L))),ar=Math.min(255,Math.max(0,Math.round(c.b*L))),ue=`#${or.toString(16).padStart(2,"0")}${nr.toString(16).padStart(2,"0")}${ar.toString(16).padStart(2,"0")}`,W=F(ue,n);if(W&&W>=a)return ue;W&&W>D&&(S=ue,D=W);}return D>=a?S:null};exports.ThemeProvider=mr;exports.amber=o;exports.amberDark=oe;exports.amberLight=te;exports.black=vr;exports.blue=t;exports.blueDark=Z;exports.blueLight=G;exports.checkContrast=Wr;exports.checkThemeContrast=Kr;exports.clearSSRRules=Er;exports.colors=kr;exports.createStyles=Cr;exports.createTheme=ze;exports.createThemeVariant=Sr;exports.cssVar=Lr;exports.cssVariables=Rr;exports.current=xr;exports.cyan=u;exports.cyanDark=ae;exports.cyanLight=ne;exports.defaultColors=Xe;exports.defaultDarkColors=Qe;exports.defaultDarkTheme=Hr;exports.defaultFontSize=Be;exports.defaultFontWeight=Ge;exports.defaultLineHeight=Ze;exports.defaultOpacity=Ue;exports.defaultRadius=je;exports.defaultShadows=Oe;exports.defaultSpacing=_e;exports.defaultTheme=Ye;exports.defaultTransition=Je;exports.defaultZIndex=qe;exports.emerald=A;exports.emeraldDark=X;exports.emeraldLight=U;exports.fontFace=Dr;exports.fuchsia=B;exports.getContrastRatio=F;exports.getSSRRulesArray=Ir;exports.getSSRStyleTag=$r;exports.getSSRStyles=tr;exports.getTheme=be;exports.gray=g;exports.grayDark=le;exports.grayLight=ce;exports.green=s;exports.indigo=y;exports.indigoDark=I;exports.indigoLight=E;exports.injectCssVariables=Pr;exports.insertRule=R;exports.keyframes=wr;exports.lime=O;exports.meetsWCAG=Fr;exports.mergeThemes=br;exports.orange=x;exports.palettes=Ar;exports.pink=H;exports.purple=h;exports.red=i;exports.rose=v;exports.roseDark=J;exports.roseLight=q;exports.sanitizeCssValue=we;exports.setThemeContextGetter=_;exports.sky=k;exports.slate=e;exports.slateDark=se;exports.slateLight=ie;exports.stone=j;exports.suggestContrastColor=Mr;exports.teal=d;exports.tealDark=Y;exports.tealLight=Q;exports.transparent=hr;exports.useTheme=dr;exports.violet=m;exports.violetDark=re;exports.violetLight=ee;exports.white=l;exports.yellow=P;//# sourceMappingURL=index.cjs.map
|
|
1
|
+
'use strict';var react=require('react'),jsxRuntime=require('react/jsx-runtime');var Ie=typeof document>"u",Te=null,z=null,He=[],$e=new Map([["backgroundColor","background-color"],["borderRadius","border-radius"],["fontSize","font-size"],["fontWeight","font-weight"],["lineHeight","line-height"],["marginTop","margin-top"],["marginBottom","margin-bottom"],["marginLeft","margin-left"],["marginRight","margin-right"],["paddingTop","padding-top"],["paddingBottom","padding-bottom"],["paddingLeft","padding-left"],["paddingRight","padding-right"],["textAlign","text-align"],["justifyContent","justify-content"],["alignItems","align-items"],["flexDirection","flex-direction"],["flexWrap","flex-wrap"],["boxShadow","box-shadow"],["zIndex","z-index"]]),ke=new Map,V=new Set,Ae=new Set,Ce=new Set,We=0,cr=new Set(["animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","fontWeight","lineHeight","opacity","order","orphans","widows","zIndex","zoom"]),Ee=100;if(!Ie){let r=document.getElementById("aurora-styles");if(r)z=r.sheet;else {let n=document.createElement("style");n.id="aurora-styles",document.head.appendChild(n),z=n.sheet;}}var B=r=>{let n=Te;return Te=r,n},we=()=>Te?.(),L=r=>{if(Ie)He.push(r);else if(z)try{z.insertRule(r,z.cssRules.length);}catch{}},$=r=>{let n=$e.get(r);return n||(n=r.replace(/([A-Z])/g,"-$1").toLowerCase(),$e.set(r,n)),n},O=r=>r.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase(),lr=/expression\s*\(|javascript\s*:|data\s*:\s*text\/html|behavior\s*:|@import|<\s*\/?\s*style/i,Ve=r=>{let n=r.replace(/\0/g,"");return lr.test(n)?(fr&&console.warn(`[Aurora] Potentially dangerous CSS value blocked: "${r.slice(0,50)}..."`),"unset"):n},fr=typeof process<"u"&&process.env?.NODE_ENV!=="production",ze=(r,n)=>typeof n=="number"&&!cr.has(r)?`${n}px`:Ve(String(n)),K=r=>{let n=[];for(let a in r){let i=r[a];i!=null&&typeof i!="object"&&n.push(`${$(a)}:${ze(a,i)}`);}return n.join(";")+(n.length?";":"")};var Ke=r=>{let n=r.length;if(n<=4){let a="";for(let i=0;i<n;i++){let f=r[i],y=typeof f;if(f===void 0)a+=i?"|u":"u";else if(f===null)a+=i?"|n":"n";else if(y==="string"||y==="number"||y==="boolean")a+=i?"|"+f:String(f);else return JSON.stringify(r)}return a}return JSON.stringify(r)},Oe=r=>{if(r==="true"||r==="false"||/^-?\d+$/.test(r))return r;if(/^[a-z][a-z0-9]*$/i.test(r))return O(r);let n=5381;for(let a=0;a<r.length;a++)n=(n<<5)+n^r.charCodeAt(a);return (n>>>0).toString(36)},Me=r=>{let n=new Map;return {getOrSet(a,i){let f=n.get(a);if(f!==void 0)return n.delete(a),n.set(a,f),f;let y=i();if(n.size>=r){let g=n.keys().next().value;g!==void 0&&n.delete(g);}return n.set(a,y),y}}},Fe=r=>{let n=JSON.stringify(r),a=5381;for(let i=0;i<n.length;i++)a=(a<<5)+a^n.charCodeAt(i);return (a>>>0).toString(36)},Be=r=>{let n=5381;for(let a=0;a<r.length;a++)n=(n<<5)+n^r.charCodeAt(a);return (n>>>0).toString(36)},ur=r=>{if(!V.has(r))return V.add(r),r;let n=2,a=`${r}-${n}`;for(;V.has(a);)a=`${r}-${++n}`;return V.add(a),a},De=(r,n,a=false)=>{if(a){let g=Fe(r),b=ke.get(g);if(b)return b}let i=ur(n),f=[],y=[];for(let g in r){let b=r[g],D=g[0];if(D==="@"){let w=K(b);w&&y.push(`${g}{.${i}{${w}}}`);}else if(D==="&"){let w=K(b);if(w){let R=g.replace(/&/g,`.${i}`);y.push(`${R}{${w}}`);}}else if(D===":"){let w=K(b);w&&y.push(`.${i}${g}{${w}}`);}else b!=null&&typeof b!="object"&&f.push(`${$(g)}:${ze(g,b)}`);}f.length&&L(`.${i}{${f.join(";")}}`);for(let g of y)L(g);return a&&ke.set(Fe(r),i),i},Ne=r=>Ae.has(r),_e=r=>{Ae.add(r);},je=()=>(++We).toString(36),Ze=r=>Ce.has(r),Ge=r=>{Ce.add(r);},Pe=()=>He,qe=()=>{He=[],ke.clear(),V.clear(),Ae.clear(),Ce.clear(),We=0;};var Je=react.createContext(void 0),yr=({theme:r,children:n})=>{let a=B(()=>r);return react.useLayoutEffect(()=>()=>{B(a);},[a]),jsxRuntime.jsx(Je.Provider,{value:r,children:n})},gr=()=>{let r=react.useContext(Je);if(!r)throw new Error("useTheme must be used within a ThemeProvider");return r};var S={25:"#fcfcfc",50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"};var e={25:"#fcfcfd",50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"};var N={25:"#fcfcfb",50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"};var s={25:"#fffbfb",50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"};var x={25:"#fffcfa",50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"};var o={25:"#fffdfb",50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"};var P={25:"#fefef9",50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"};var _={25:"#fbfef8",50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"};var c={25:"#f6fef9",50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"};var k={25:"#f5fefc",50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"};var m={25:"#f4fefe",50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"};var u={25:"#f3fefe",50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"};var T={25:"#f5faff",50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"};var t={25:"#f5f8ff",50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"};var d={25:"#f5f7ff",50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"};var p={25:"#f8f5ff",50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"};var v={25:"#faf5ff",50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"};var j={25:"#fef5ff",50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"};var H={25:"#fef5f9",50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"};var h={25:"#fff5f6",50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"};var l="#ffffff",Sr="#000000",hr="transparent",vr="currentColor",xr={gray:S,slate:e,stone:N,red:s,orange:x,amber:o,yellow:P,lime:_,green:c,emerald:k,teal:m,cyan:u,sky:T,blue:t,indigo:d,violet:p,purple:v,fuchsia:j,pink:H,rose:h,white:"#ffffff",black:"#000000",transparent:"transparent",current:"currentColor"};var A={background:e[25],surface:l,surfaceHover:e[100],surfaceActive:e[200],elevated:l,overlay:"rgba(15, 23, 42, 0.6)",text:e[800],textSecondary:e[500],textTertiary:e[400],textInverse:l,border:e[200],borderHover:e[300],borderSubtle:e[100],disabled:e[300],disabledText:e[400]},C={background:e[900],surface:e[800],surfaceHover:e[700],surfaceActive:e[600],elevated:e[700],overlay:"rgba(0, 0, 0, 0.7)",text:e[100],textSecondary:e[400],textTertiary:e[500],textInverse:e[900],border:e[600],borderHover:e[500],borderSubtle:e[700],disabled:e[600],disabledText:e[500]};var F={...A,primary:d[600],onPrimary:l,primaryHover:d[700],primaryActive:d[800],primarySubtle:d[50],primaryDisabled:d[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:v[600],onTertiary:l,tertiaryHover:v[700],tertiaryActive:v[800],tertiarySubtle:v[50],tertiaryDisabled:v[300],accent:u[500],onAccent:l,accentHover:u[600],accentActive:u[700],accentSubtle:u[50],borderFocus:d[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:d[600],linkHover:d[700],linkActive:d[800],linkVisited:p[700],focus:d[500]},I={...C,primary:d[400],onPrimary:d[950],primaryHover:d[300],primaryActive:d[500],primarySubtle:d[950],primaryDisabled:d[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:v[400],onTertiary:v[950],tertiaryHover:v[300],tertiaryActive:v[500],tertiarySubtle:v[950],tertiaryDisabled:v[700],accent:u[400],onAccent:u[950],accentHover:u[300],accentActive:u[500],accentSubtle:u[950],borderFocus:d[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:d[400],linkHover:d[300],linkActive:d[500],linkVisited:p[400],focus:d[400]};var Z={...A,primary:t[600],onPrimary:l,primaryHover:t[700],primaryActive:t[800],primarySubtle:t[50],primaryDisabled:t[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:T[500],onTertiary:l,tertiaryHover:T[600],tertiaryActive:T[700],tertiarySubtle:T[50],tertiaryDisabled:T[300],accent:u[500],onAccent:l,accentHover:u[600],accentActive:u[700],accentSubtle:u[50],borderFocus:t[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:t[600],linkHover:t[700],linkActive:t[800],linkVisited:p[700],focus:t[500]},G={...C,primary:t[400],onPrimary:t[950],primaryHover:t[300],primaryActive:t[500],primarySubtle:t[950],primaryDisabled:t[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:T[400],onTertiary:T[950],tertiaryHover:T[300],tertiaryActive:T[500],tertiarySubtle:T[950],tertiaryDisabled:T[700],accent:u[400],onAccent:u[950],accentHover:u[300],accentActive:u[500],accentSubtle:u[950],borderFocus:t[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:t[400],linkHover:t[300],linkActive:t[500],linkVisited:p[400],focus:t[400]};var q={...A,primary:h[600],onPrimary:l,primaryHover:h[700],primaryActive:h[800],primarySubtle:h[50],primaryDisabled:h[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:H[500],onTertiary:l,tertiaryHover:H[600],tertiaryActive:H[700],tertiarySubtle:H[50],tertiaryDisabled:H[300],accent:p[600],onAccent:l,accentHover:p[700],accentActive:p[800],accentSubtle:p[50],borderFocus:h[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:h[600],linkHover:h[700],linkActive:h[800],linkVisited:v[700],focus:h[500]},J={...C,primary:h[400],onPrimary:h[950],primaryHover:h[300],primaryActive:h[500],primarySubtle:h[950],primaryDisabled:h[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:H[400],onTertiary:H[950],tertiaryHover:H[300],tertiaryActive:H[500],tertiarySubtle:H[950],tertiaryDisabled:H[700],accent:p[400],onAccent:p[950],accentHover:p[300],accentActive:p[500],accentSubtle:p[950],borderFocus:h[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:h[400],linkHover:h[300],linkActive:h[500],linkVisited:v[400],focus:h[400]};var U={...A,primary:k[600],onPrimary:l,primaryHover:k[700],primaryActive:k[800],primarySubtle:k[50],primaryDisabled:k[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:m[500],onTertiary:l,tertiaryHover:m[600],tertiaryActive:m[700],tertiarySubtle:m[50],tertiaryDisabled:m[300],accent:o[500],onAccent:o[950],accentHover:o[600],accentActive:o[700],accentSubtle:o[50],borderFocus:k[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:k[600],linkHover:k[700],linkActive:k[800],linkVisited:m[700],focus:k[500]},X={...C,primary:k[400],onPrimary:k[950],primaryHover:k[300],primaryActive:k[500],primarySubtle:k[950],primaryDisabled:k[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:m[400],onTertiary:m[950],tertiaryHover:m[300],tertiaryActive:m[500],tertiarySubtle:m[950],tertiaryDisabled:m[700],accent:o[400],onAccent:o[950],accentHover:o[300],accentActive:o[500],accentSubtle:o[950],borderFocus:k[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:k[400],linkHover:k[300],linkActive:k[500],linkVisited:m[400],focus:k[400]};var Q={...A,primary:m[600],onPrimary:l,primaryHover:m[700],primaryActive:m[800],primarySubtle:m[50],primaryDisabled:m[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:u[500],onTertiary:l,tertiaryHover:u[600],tertiaryActive:u[700],tertiarySubtle:u[50],tertiaryDisabled:u[300],accent:x[500],onAccent:l,accentHover:x[600],accentActive:x[700],accentSubtle:x[50],borderFocus:m[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:m[600],linkHover:m[700],linkActive:m[800],linkVisited:u[700],focus:m[500]},Y={...C,primary:m[400],onPrimary:m[950],primaryHover:m[300],primaryActive:m[500],primarySubtle:m[950],primaryDisabled:m[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:u[400],onTertiary:u[950],tertiaryHover:u[300],tertiaryActive:u[500],tertiarySubtle:u[950],tertiaryDisabled:u[700],accent:x[400],onAccent:x[950],accentHover:x[300],accentActive:x[500],accentSubtle:x[950],borderFocus:m[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:m[400],linkHover:m[300],linkActive:m[500],linkVisited:u[400],focus:m[400]};var ee={...A,primary:p[600],onPrimary:l,primaryHover:p[700],primaryActive:p[800],primarySubtle:p[50],primaryDisabled:p[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:v[500],onTertiary:l,tertiaryHover:v[600],tertiaryActive:v[700],tertiarySubtle:v[50],tertiaryDisabled:v[300],accent:H[500],onAccent:l,accentHover:H[600],accentActive:H[700],accentSubtle:H[50],borderFocus:p[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:p[600],linkHover:p[700],linkActive:p[800],linkVisited:v[700],focus:p[500]},re={...C,primary:p[400],onPrimary:p[950],primaryHover:p[300],primaryActive:p[500],primarySubtle:p[950],primaryDisabled:p[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:v[400],onTertiary:v[950],tertiaryHover:v[300],tertiaryActive:v[500],tertiarySubtle:v[950],tertiaryDisabled:v[700],accent:H[400],onAccent:H[950],accentHover:H[300],accentActive:H[500],accentSubtle:H[950],borderFocus:p[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:p[400],linkHover:p[300],linkActive:p[500],linkVisited:v[400],focus:p[400]};var te={...A,primary:o[500],onPrimary:o[950],primaryHover:o[600],primaryActive:o[700],primarySubtle:o[50],primaryDisabled:o[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:x[500],onTertiary:l,tertiaryHover:x[600],tertiaryActive:x[700],tertiarySubtle:x[50],tertiaryDisabled:x[300],accent:d[600],onAccent:l,accentHover:d[700],accentActive:d[800],accentSubtle:d[50],borderFocus:o[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:P[500],onWarning:P[950],warningHover:P[600],warningSubtle:P[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:o[700],linkHover:o[800],linkActive:o[900],linkVisited:x[700],focus:o[500]},oe={...C,primary:o[400],onPrimary:o[950],primaryHover:o[300],primaryActive:o[500],primarySubtle:o[950],primaryDisabled:o[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:x[400],onTertiary:x[950],tertiaryHover:x[300],tertiaryActive:x[500],tertiarySubtle:x[950],tertiaryDisabled:x[700],accent:d[400],onAccent:d[950],accentHover:d[300],accentActive:d[500],accentSubtle:d[950],borderFocus:o[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:P[400],onWarning:P[950],warningHover:P[300],warningSubtle:P[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:o[400],linkHover:o[300],linkActive:o[500],linkVisited:x[400],focus:o[400]};var ne={...A,primary:u[600],onPrimary:l,primaryHover:u[700],primaryActive:u[800],primarySubtle:u[50],primaryDisabled:u[300],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:T[500],onTertiary:l,tertiaryHover:T[600],tertiaryActive:T[700],tertiarySubtle:T[50],tertiaryDisabled:T[300],accent:h[500],onAccent:l,accentHover:h[600],accentActive:h[700],accentSubtle:h[50],borderFocus:u[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:u[600],linkHover:u[700],linkActive:u[800],linkVisited:m[700],focus:u[500]},ae={...C,primary:u[400],onPrimary:u[950],primaryHover:u[300],primaryActive:u[500],primarySubtle:u[950],primaryDisabled:u[700],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:T[400],onTertiary:T[950],tertiaryHover:T[300],tertiaryActive:T[500],tertiarySubtle:T[950],tertiaryDisabled:T[700],accent:h[400],onAccent:h[950],accentHover:h[300],accentActive:h[500],accentSubtle:h[950],borderFocus:u[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:u[400],linkHover:u[300],linkActive:u[500],linkVisited:m[400],focus:u[400]};var ie={...A,primary:e[700],onPrimary:l,primaryHover:e[800],primaryActive:e[900],primarySubtle:e[100],primaryDisabled:e[400],secondary:e[100],onSecondary:e[700],secondaryHover:e[200],secondaryActive:e[300],secondarySubtle:e[50],secondaryDisabled:e[100],tertiary:e[600],onTertiary:l,tertiaryHover:e[700],tertiaryActive:e[800],tertiarySubtle:e[100],tertiaryDisabled:e[400],accent:t[600],onAccent:l,accentHover:t[700],accentActive:t[800],accentSubtle:t[50],borderFocus:t[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:t[600],linkHover:t[700],linkActive:t[800],linkVisited:d[700],focus:t[500]},se={...C,primary:e[200],onPrimary:e[900],primaryHover:e[100],primaryActive:e[300],primarySubtle:e[900],primaryDisabled:e[600],secondary:e[700],onSecondary:e[100],secondaryHover:e[600],secondaryActive:e[500],secondarySubtle:e[800],secondaryDisabled:e[800],tertiary:e[400],onTertiary:e[950],tertiaryHover:e[300],tertiaryActive:e[500],tertiarySubtle:e[900],tertiaryDisabled:e[600],accent:t[400],onAccent:t[950],accentHover:t[300],accentActive:t[500],accentSubtle:t[950],borderFocus:t[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:t[400],linkHover:t[300],linkActive:t[500],linkVisited:d[400],focus:t[400]};var ce={...A,primary:S[800],onPrimary:l,primaryHover:S[900],primaryActive:S[950],primarySubtle:S[100],primaryDisabled:S[400],secondary:S[100],onSecondary:S[700],secondaryHover:S[200],secondaryActive:S[300],secondarySubtle:S[50],secondaryDisabled:S[100],tertiary:S[600],onTertiary:l,tertiaryHover:S[700],tertiaryActive:S[800],tertiarySubtle:S[100],tertiaryDisabled:S[400],accent:d[600],onAccent:l,accentHover:d[700],accentActive:d[800],accentSubtle:d[50],borderFocus:d[500],success:c[600],onSuccess:l,successHover:c[700],successSubtle:c[50],warning:o[500],onWarning:o[950],warningHover:o[600],warningSubtle:o[50],error:s[500],onError:l,errorHover:s[600],errorSubtle:s[50],info:t[500],onInfo:l,infoHover:t[600],infoSubtle:t[50],link:d[600],linkHover:d[700],linkActive:d[800],linkVisited:p[700],focus:d[500]},le={...C,primary:S[100],onPrimary:S[900],primaryHover:S[50],primaryActive:S[200],primarySubtle:S[900],primaryDisabled:S[600],secondary:S[700],onSecondary:S[100],secondaryHover:S[600],secondaryActive:S[500],secondarySubtle:S[800],secondaryDisabled:S[800],tertiary:S[400],onTertiary:S[950],tertiaryHover:S[300],tertiaryActive:S[500],tertiarySubtle:S[900],tertiaryDisabled:S[600],accent:d[400],onAccent:d[950],accentHover:d[300],accentActive:d[500],accentSubtle:d[950],borderFocus:d[400],success:c[400],onSuccess:c[950],successHover:c[300],successSubtle:c[950],warning:o[400],onWarning:o[950],warningHover:o[300],warningSubtle:o[950],error:s[400],onError:s[950],errorHover:s[300],errorSubtle:s[950],info:t[400],onInfo:t[950],infoHover:t[300],infoSubtle:t[950],link:d[400],linkHover:d[300],linkActive:d[500],linkVisited:p[400],focus:d[400]};var Tr={indigo:{light:F,dark:I},blue:{light:Z,dark:G},rose:{light:q,dark:J},emerald:{light:U,dark:X},teal:{light:Q,dark:Y},violet:{light:ee,dark:re},amber:{light:te,dark:oe},cyan:{light:ne,dark:ae},slate:{light:ie,dark:se},gray:{light:ce,dark:le}};var fe={none:"0","2xs":"0.125rem",xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem","5xl":"8rem"},ue={none:"0",xs:"0.125rem",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"},de={none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",focus:"0 0 0 3px rgb(99 102 241 / 0.4)"},pe={"2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.25rem",xl:"1.5rem","2xl":"2rem","3xl":"2.5rem","4xl":"3rem","5xl":"4rem"},me={light:300,regular:400,medium:500,semibold:600,bold:700},ye={none:1,tight:1.25,normal:1.5,relaxed:1.75,loose:2},ge={behind:-1,base:0,dropdown:1e3,sticky:1100,overlay:1300,modal:1400,popover:1500,tooltip:1600,toast:1700},be={fast:"150ms ease-out",normal:"250ms ease-out",slow:"350ms ease-out"},Se={none:0,lowest:.05,low:.1,medium:.25,high:.5,higher:.75,full:1},he={xs:"480px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},Ue=F,Xe=I,Qe={colors:Ue,spacing:fe,radius:ue,shadows:de,fontSize:pe,fontWeight:me,lineHeight:ye,zIndex:ge,transition:be,opacity:Se,breakpoints:he},kr={...Qe,colors:Xe};var Ye=r=>{let n=JSON.stringify(r),a=5381;for(let i=0;i<n.length;i++)a=(a<<5)+a^n.charCodeAt(i);return (a>>>0).toString(36)},M=new Map,Hr=50;var Re=(r,n)=>{let a={...r};for(let i in n){let f=n[i],y=r[i];f!==void 0&&typeof f=="object"&&f!==null&&!Array.isArray(f)&&typeof y=="object"&&y!==null?a[i]=Re(y,f):f!==void 0&&(a[i]=f);}return a},Ar=(r,n)=>{let a={...r};for(let i in n){let f=n[i];f!==void 0&&(a[i]=f);}return a},er=(r,n,a={})=>{let{mode:i="merge"}=a,f=`${Ye(r)}_${Ye(n)}_${i}`,y=M.get(f);if(y)return y;let g=i==="replace"?Ar(r,n):Re(r,n);if(M.size>=Hr){let b=M.keys().next().value;b&&M.delete(b);}return M.set(f,g),g},Cr=(r,...n)=>n.reduce((a,i)=>Re(a,i),r),wr=r=>n=>er(n,r),Dr=r=>({colors:r.colors,spacing:r.spacing??fe,radius:r.radius??ue,shadows:r.shadows??de,fontSize:r.fontSize??pe,fontWeight:r.fontWeight??me,lineHeight:r.lineHeight??ye,zIndex:r.zIndex??ge,transition:r.transition??be,opacity:r.opacity??Se,breakpoints:r.breakpoints??he});var Pr=()=>{let r=new Error().stack||"",n=r.match(/([A-Za-z0-9_]+)\.styles\.[tj]s/);if(n?.[1])return O(n[1]);let a=r.match(/\/([A-Za-z0-9_]+)\.[tj]sx?[:\d]*\)?$/m);return a?.[1]&&a[1]!=="createStyles"?O(a[1]):"style"},rr=(r,n)=>{let a={};for(let i in r){let f=r[i];if(f){let y=`${n}-${O(i)}`;if(typeof f=="function"){let g=Me(Ee);a[i]=(...b)=>{let D=Ke(b);return g.getOrSet(D,()=>{let w=f(...b);return De(w,`${y}-${Oe(D)}`)})};}else a[i]=De(f,y,true);}}return a},tr=r=>{let n=Pr();if(typeof r=="function"){let a=null,i;return new Proxy({},{get(f,y){let g=we();if(!g)throw new Error("createStyles: Theme context not found. Make sure you are using this inside a ThemeProvider.");return (g!==i||!a)&&(a=rr(r(g),n),i=g),a[y]}})}return rr(r,n)},Rr=()=>r=>tr(r);var Lr=r=>{let n="";for(let i in r)n+=`${i}{${K(r[i])}}`;if(Ne(n))return `aurora-kf-${Be(n)}`;let a=`aurora-kf-${je()}`;return L(`@keyframes ${a}{${n}}`),_e(n),a};var $r=r=>{let{fontFamily:n,src:a,fontStyle:i="normal",fontWeight:f=400,fontDisplay:y="swap",unicodeRange:g}=r,b=`font-family:"${n}";`;return b+=`src:${a};`,b+=`font-style:${i};`,b+=`font-weight:${f};`,b+=`font-display:${y};`,g&&(b+=`unicode-range:${g};`),Ze(b)||(L(`@font-face{${b}}`),Ge(b)),n};var or=(r,n)=>{let a="";for(let i in r){let f=r[i],y=`--${n}-${$(i)}`;f&&typeof f=="object"?a+=or(f,`${n}-${$(i)}`):f!=null&&(a+=`${y}:${f};`);}return a},Fr=(r,n="theme")=>{let a=or(r,n);L(`:root{${a}}`);},Ir=(r,n)=>{let a=`--theme-${r.replace(/\./g,"-")}`;return n?`var(${a}, ${n})`:`var(${a})`},Wr=(r,n={})=>{let{prefix:a="",inject:i=false}=n,f={},y="";for(let g in r){let b=$(g),D=a?`--${a}-${b}`:`--${b}`;f[g]=`var(${D})`,i&&(y+=`${D}:${r[g]};`);}return i&&y&&L(`:root{${y}}`),f};var nr=()=>Pe().join(""),Er=()=>{let r=nr();return r?`<style id="aurora-styles">${r}</style>`:""},Vr=()=>{qe();},zr=()=>[...Pe()];var ve=r=>{let n=r.replace(/^#/,""),a=n.length===3?n.split("").map(f=>f+f).join(""):n;if(a.length!==6)return null;let i=parseInt(a,16);return isNaN(i)?null:{r:i>>16&255,g:i>>8&255,b:i&255}},Le=(r,n,a)=>{let[i,f,y]=[r,n,a].map(g=>{let b=g/255;return b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4)});return .2126*i+.7152*f+.0722*y},W=(r,n)=>{let a=ve(r),i=ve(n);if(!a||!i)return null;let f=Le(a.r,a.g,a.b),y=Le(i.r,i.g,i.b),g=Math.max(f,y),b=Math.min(f,y);return (g+.05)/(b+.05)},Kr=(r,n,a="AA",i=false)=>{let f=W(r,n);return f===null?false:f>={AA:i?3:4.5,AAA:i?4.5:7}[a]},Or=(r,n)=>{let a=W(r,n);return a===null?null:{colors:[r,n],ratio:Math.round(a*100)/100,passesAA:a>=4.5,passesAALarge:a>=3,passesAAA:a>=7,passesAAALarge:a>=4.5}},Mr=[["onPrimary","primary","primary/onPrimary"],["text","primarySubtle","primarySubtle/text"],["onSecondary","secondary","secondary/onSecondary"],["text","secondarySubtle","secondarySubtle/text"],["onTertiary","tertiary","tertiary/onTertiary"],["text","tertiarySubtle","tertiarySubtle/text"],["onAccent","accent","accent/onAccent"],["text","accentSubtle","accentSubtle/text"],["text","background","background/text"],["text","surface","surface/text"],["textSecondary","surface","surface/textSecondary"],["textTertiary","surface","surface/textTertiary"],["onSuccess","success","success/onSuccess"],["text","successSubtle","successSubtle/text"],["onWarning","warning","warning/onWarning"],["text","warningSubtle","warningSubtle/text"],["onError","error","error/onError"],["text","errorSubtle","errorSubtle/text"],["onInfo","info","info/onInfo"],["text","infoSubtle","infoSubtle/text"],["link","surface","surface/link"],["link","background","background/link"]],Br=(r,n="AA")=>{let a=[],i=n==="AAA"?7:4.5,f=n==="AAA"?4.5:3;for(let[y,g,b]of Mr){let D=r.colors[y],w=r.colors[g];if(!D||!w||!D.startsWith("#")||!w.startsWith("#"))continue;let R=W(D,w);R!==null&&(R<i?a.push({pair:b,foreground:y,background:g,ratio:Math.round(R*100)/100,required:i,level:"AA"}):R<f&&a.push({pair:b,foreground:y,background:g,ratio:Math.round(R*100)/100,required:f,level:"AALarge"}));}return a},Nr=(r,n,a=4.5)=>{let i=ve(r),f=ve(n);if(!i||!f)return null;let g=Le(f.r,f.g,f.b)>.5,b=r,D=W(r,n)||0;for(let w=0;w<=100;w+=5){let R=g?(100-w)/100:(100+w)/100,ar=Math.min(255,Math.max(0,Math.round(i.r*R))),ir=Math.min(255,Math.max(0,Math.round(i.g*R))),sr=Math.min(255,Math.max(0,Math.round(i.b*R))),xe=`#${ar.toString(16).padStart(2,"0")}${ir.toString(16).padStart(2,"0")}${sr.toString(16).padStart(2,"0")}`,E=W(xe,n);if(E&&E>=a)return xe;E&&E>D&&(b=xe,D=E);}return D>=a?b:null};exports.ThemeProvider=yr;exports.amber=o;exports.amberDark=oe;exports.amberLight=te;exports.black=Sr;exports.blue=t;exports.blueDark=G;exports.blueLight=Z;exports.checkContrast=Or;exports.checkThemeContrast=Br;exports.clearSSRRules=Vr;exports.colors=xr;exports.createCustomTheme=Dr;exports.createStyles=tr;exports.createTheme=er;exports.createThemeVariant=wr;exports.createTypedStyles=Rr;exports.cssVar=Ir;exports.cssVariables=Wr;exports.current=vr;exports.cyan=u;exports.cyanDark=ae;exports.cyanLight=ne;exports.defaultBreakpoints=he;exports.defaultColors=Ue;exports.defaultDarkColors=Xe;exports.defaultDarkTheme=kr;exports.defaultFontSize=pe;exports.defaultFontWeight=me;exports.defaultLineHeight=ye;exports.defaultOpacity=Se;exports.defaultRadius=ue;exports.defaultShadows=de;exports.defaultSpacing=fe;exports.defaultTheme=Qe;exports.defaultTransition=be;exports.defaultZIndex=ge;exports.emerald=k;exports.emeraldDark=X;exports.emeraldLight=U;exports.fontFace=$r;exports.fuchsia=j;exports.getContrastRatio=W;exports.getSSRRulesArray=zr;exports.getSSRStyleTag=Er;exports.getSSRStyles=nr;exports.getTheme=we;exports.gray=S;exports.grayDark=le;exports.grayLight=ce;exports.green=c;exports.indigo=d;exports.indigoDark=I;exports.indigoLight=F;exports.injectCssVariables=Fr;exports.insertRule=L;exports.keyframes=Lr;exports.lime=_;exports.meetsWCAG=Kr;exports.mergeThemes=Cr;exports.orange=x;exports.palettes=Tr;exports.pink=H;exports.purple=v;exports.red=s;exports.rose=h;exports.roseDark=J;exports.roseLight=q;exports.sanitizeCssValue=Ve;exports.setThemeContextGetter=B;exports.sky=T;exports.slate=e;exports.slateDark=se;exports.slateLight=ie;exports.stone=N;exports.suggestContrastColor=Nr;exports.teal=m;exports.tealDark=Y;exports.tealLight=Q;exports.transparent=hr;exports.useTheme=gr;exports.violet=p;exports.violetDark=re;exports.violetLight=ee;exports.white=l;exports.yellow=P;//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|