@aurora-ds/theme 1.6.0 → 2.0.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/dist/index.d.ts CHANGED
@@ -23,69 +23,45 @@ type BaseBreakpoints = {
23
23
  };
24
24
 
25
25
  /**
26
- * Base color tokens following modern design system semantics
26
+ * Base color tokens following modern design system semantics - V2
27
27
  */
28
28
  type BaseColors = {
29
+ background: string;
30
+ surface: string;
31
+ surfaceHover: string;
32
+ surfaceActive: string;
33
+ text: string;
34
+ textSecondary: string;
35
+ textTertiary: string;
29
36
  primary: string;
30
- onPrimary: string;
31
37
  primaryHover: string;
32
38
  primaryActive: string;
33
39
  primarySubtle: string;
34
40
  primaryDisabled: string;
41
+ onPrimary: string;
35
42
  secondary: string;
36
- onSecondary: string;
37
43
  secondaryHover: string;
38
44
  secondaryActive: string;
39
45
  secondarySubtle: string;
40
46
  secondaryDisabled: string;
41
- accent: string;
42
- onAccent: string;
43
- accentHover: string;
44
- accentActive: string;
45
- accentSubtle: string;
46
- tertiary: string;
47
- onTertiary: string;
48
- tertiaryHover: string;
49
- tertiaryActive: string;
50
- tertiarySubtle: string;
51
- tertiaryDisabled: string;
52
- background: string;
53
- surface: string;
54
- surfaceHover: string;
55
- surfaceActive: string;
56
- elevated: string;
57
- overlay: string;
58
- text: string;
59
- textSecondary: string;
60
- textTertiary: string;
61
- textInverse: string;
47
+ onSecondary: string;
62
48
  border: string;
63
- borderHover: string;
64
- borderFocus: string;
65
- borderSubtle: string;
49
+ disabled: string;
50
+ disabledText: string;
66
51
  success: string;
67
- onSuccess: string;
68
- successHover: string;
69
52
  successSubtle: string;
70
53
  warning: string;
71
- onWarning: string;
72
- warningHover: string;
73
54
  warningSubtle: string;
74
55
  error: string;
75
- onError: string;
76
56
  errorHover: string;
77
57
  errorSubtle: string;
58
+ onError: string;
78
59
  info: string;
79
- onInfo: string;
80
- infoHover: string;
81
60
  infoSubtle: string;
82
61
  link: string;
83
62
  linkHover: string;
84
63
  linkActive: string;
85
- linkVisited: string;
86
- focus: string;
87
- disabled: string;
88
- disabledText: string;
64
+ linkDisabled: string;
89
65
  };
90
66
 
91
67
  /**
@@ -379,11 +355,6 @@ type ColorName = 'gray' | 'slate' | 'stone' | 'red' | 'orange' | 'amber' | 'yell
379
355
  */
380
356
  type ColorShade = keyof ColorScale;
381
357
 
382
- /**
383
- * Available palette preset names
384
- */
385
- type PaletteName = 'indigo' | 'blue' | 'rose' | 'emerald' | 'teal' | 'violet' | 'amber' | 'cyan' | 'slate' | 'gray';
386
-
387
358
  type ThemeProviderProps<T extends Theme = Theme> = {
388
359
  theme: T;
389
360
  children?: ReactNode;
@@ -464,21 +435,9 @@ declare const defaultOpacity: Theme['opacity'];
464
435
  */
465
436
  declare const defaultBreakpoints: Theme['breakpoints'];
466
437
  /**
467
- * Default colors (using indigo palette)
468
- */
469
- declare const defaultColors: BaseColors;
470
- /**
471
- * Default dark colors (using indigo palette)
472
- */
473
- declare const defaultDarkColors: BaseColors;
474
- /**
475
- * Complete default light theme
438
+ * Complete default theme V2
476
439
  */
477
440
  declare const defaultTheme: Theme;
478
- /**
479
- * Complete default dark theme
480
- */
481
- declare const defaultDarkTheme: Theme;
482
441
 
483
442
  /**
484
443
  * Create a theme by merging a base theme with overrides
@@ -599,52 +558,23 @@ declare const createCustomTheme: <TColors extends Record<string, string>, TSpaci
599
558
  breakpoints?: TBreakpoints;
600
559
  }) => CustomTheme<TColors, TSpacing, TRadius, TShadows, TFontSize, TFontWeight, TLineHeight, TZIndex, TTransition, TOpacity, TBreakpoints>;
601
560
 
602
- declare const gray: ColorScale;
603
-
604
- declare const slate: ColorScale;
605
-
606
- declare const stone: ColorScale;
607
-
608
- declare const red: ColorScale;
609
-
610
- declare const orange: ColorScale;
611
-
612
- declare const amber: ColorScale;
613
-
614
- declare const yellow: ColorScale;
615
-
616
- declare const lime: ColorScale;
617
-
618
- declare const green: ColorScale;
619
-
620
- declare const emerald: ColorScale;
621
-
622
- declare const teal: ColorScale;
623
-
624
- declare const cyan: ColorScale;
625
-
626
- declare const sky: ColorScale;
627
-
628
- declare const blue: ColorScale;
629
-
630
- declare const indigo: ColorScale;
631
-
632
- declare const violet: ColorScale;
633
-
634
- declare const purple: ColorScale;
635
-
636
- declare const fuchsia: ColorScale;
637
-
638
- declare const pink: ColorScale;
639
-
640
- declare const rose: ColorScale;
641
-
642
- declare const white = "#ffffff";
643
- declare const black = "#000000";
644
- declare const transparent = "transparent";
645
- declare const current = "currentColor";
561
+ /**
562
+ * Color Scales - Modern color palettes with shades from 25 to 950
563
+ *
564
+ * Scales are only accessible via the colors object to maintain consistency
565
+ *
566
+ * @example
567
+ * ```ts
568
+ * import { colors } from '@aurora-ui/theme'
569
+ *
570
+ * colors.indigo[500] // '#6366f1'
571
+ * colors.emerald[400] // '#34d399'
572
+ * colors.gray[900] // '#18181b'
573
+ * ```
574
+ */
646
575
  /**
647
576
  * All color scales organized by name
577
+ * All scales and special values are only accessible via this object
648
578
  */
649
579
  declare const colors: {
650
580
  readonly gray: ColorScale;
@@ -673,171 +603,11 @@ declare const colors: {
673
603
  readonly current: "currentColor";
674
604
  };
675
605
 
676
- type ColorPalette$9 = Theme['colors'];
677
606
  /**
678
- * Indigo light palette - Modern, accessible color scheme
679
- * Follows WCAG AA contrast guidelines
607
+ * Default light theme palette - V2
608
+ * A clean, modern palette using Indigo as primary and Slate as neutral
680
609
  */
681
- declare const indigoLight: ColorPalette$9;
682
- /**
683
- * Indigo dark palette - Modern, accessible color scheme
684
- * Follows WCAG AA contrast guidelines
685
- */
686
- declare const indigoDark: ColorPalette$9;
687
-
688
- type ColorPalette$8 = Theme['colors'];
689
- /**
690
- * Blue light palette - Classic, accessible color scheme
691
- * Follows WCAG AA contrast guidelines
692
- */
693
- declare const blueLight: ColorPalette$8;
694
- /**
695
- * Blue dark palette - Classic, accessible color scheme
696
- * Follows WCAG AA contrast guidelines
697
- */
698
- declare const blueDark: ColorPalette$8;
699
-
700
- type ColorPalette$7 = Theme['colors'];
701
- /**
702
- * Rose light palette - Elegant, accessible color scheme
703
- * Follows WCAG AA contrast guidelines
704
- */
705
- declare const roseLight: ColorPalette$7;
706
- /**
707
- * Rose dark palette - Elegant, accessible color scheme
708
- * Follows WCAG AA contrast guidelines
709
- */
710
- declare const roseDark: ColorPalette$7;
711
-
712
- type ColorPalette$6 = Theme['colors'];
713
- /**
714
- * Emerald light palette - Fresh, accessible color scheme
715
- * Follows WCAG AA contrast guidelines
716
- */
717
- declare const emeraldLight: ColorPalette$6;
718
- /**
719
- * Emerald dark palette - Fresh, accessible color scheme
720
- * Follows WCAG AA contrast guidelines
721
- */
722
- declare const emeraldDark: ColorPalette$6;
723
-
724
- type ColorPalette$5 = Theme['colors'];
725
- /**
726
- * Teal light palette - Cool, accessible color scheme
727
- * Follows WCAG AA contrast guidelines
728
- */
729
- declare const tealLight: ColorPalette$5;
730
- /**
731
- * Teal dark palette - Cool, accessible color scheme
732
- * Follows WCAG AA contrast guidelines
733
- */
734
- declare const tealDark: ColorPalette$5;
735
-
736
- type ColorPalette$4 = Theme['colors'];
737
- /**
738
- * Violet light palette - Creative, accessible color scheme
739
- * Follows WCAG AA contrast guidelines
740
- */
741
- declare const violetLight: ColorPalette$4;
742
- /**
743
- * Violet dark palette - Creative, accessible color scheme
744
- * Follows WCAG AA contrast guidelines
745
- */
746
- declare const violetDark: ColorPalette$4;
747
-
748
- type ColorPalette$3 = Theme['colors'];
749
- /**
750
- * Amber light palette - Warm, accessible color scheme
751
- * Follows WCAG AA contrast guidelines
752
- */
753
- declare const amberLight: ColorPalette$3;
754
- /**
755
- * Amber dark palette - Warm, accessible color scheme
756
- * Follows WCAG AA contrast guidelines
757
- */
758
- declare const amberDark: ColorPalette$3;
759
-
760
- type ColorPalette$2 = Theme['colors'];
761
- /**
762
- * Cyan light palette - Fresh, accessible color scheme
763
- * Follows WCAG AA contrast guidelines
764
- */
765
- declare const cyanLight: ColorPalette$2;
766
- /**
767
- * Cyan dark palette - Fresh, accessible color scheme
768
- * Follows WCAG AA contrast guidelines
769
- */
770
- declare const cyanDark: ColorPalette$2;
771
-
772
- type ColorPalette$1 = Theme['colors'];
773
- /**
774
- * Slate light palette - Professional, accessible color scheme
775
- * Follows WCAG AA contrast guidelines
776
- */
777
- declare const slateLight: ColorPalette$1;
778
- /**
779
- * Slate dark palette - Professional, accessible color scheme
780
- * Follows WCAG AA contrast guidelines
781
- */
782
- declare const slateDark: ColorPalette$1;
783
-
784
- type ColorPalette = Theme['colors'];
785
- /**
786
- * Gray light palette - Clean, accessible color scheme
787
- * Follows WCAG AA contrast guidelines
788
- */
789
- declare const grayLight: ColorPalette;
790
- /**
791
- * Gray dark palette - Clean, accessible color scheme
792
- * Follows WCAG AA contrast guidelines
793
- */
794
- declare const grayDark: ColorPalette;
795
-
796
- /**
797
- * All available color palettes organized by name
798
- */
799
- declare const palettes: {
800
- readonly indigo: {
801
- readonly light: BaseColors;
802
- readonly dark: BaseColors;
803
- };
804
- readonly blue: {
805
- readonly light: BaseColors;
806
- readonly dark: BaseColors;
807
- };
808
- readonly rose: {
809
- readonly light: BaseColors;
810
- readonly dark: BaseColors;
811
- };
812
- readonly emerald: {
813
- readonly light: BaseColors;
814
- readonly dark: BaseColors;
815
- };
816
- readonly teal: {
817
- readonly light: BaseColors;
818
- readonly dark: BaseColors;
819
- };
820
- readonly violet: {
821
- readonly light: BaseColors;
822
- readonly dark: BaseColors;
823
- };
824
- readonly amber: {
825
- readonly light: BaseColors;
826
- readonly dark: BaseColors;
827
- };
828
- readonly cyan: {
829
- readonly light: BaseColors;
830
- readonly dark: BaseColors;
831
- };
832
- readonly slate: {
833
- readonly light: BaseColors;
834
- readonly dark: BaseColors;
835
- };
836
- readonly gray: {
837
- readonly light: BaseColors;
838
- readonly dark: BaseColors;
839
- };
840
- };
610
+ declare const defaultPalette: BaseColors;
841
611
 
842
612
  /**
843
613
  * Extended type to support pseudo-classes, media queries, container queries, supports and complex selectors
@@ -1039,159 +809,4 @@ declare const insertRule: (rule: string) => void;
1039
809
  */
1040
810
  declare const sanitizeCssValue: (value: string) => string;
1041
811
 
1042
- /**
1043
- * WCAG Contrast Utilities
1044
- *
1045
- * Utilities for checking color contrast ratios according to WCAG 2.1 guidelines.
1046
- *
1047
- * @example
1048
- * ```ts
1049
- * import { getContrastRatio, meetsWCAG, checkThemeContrast } from '@aurora-ds/theme'
1050
- *
1051
- * // Check contrast between two colors
1052
- * const ratio = getContrastRatio('#ffffff', '#000000') // 21
1053
- *
1054
- * // Check if colors meet WCAG standards
1055
- * meetsWCAG('#ffffff', '#767676', 'AA') // true for large text
1056
- * meetsWCAG('#ffffff', '#767676', 'AAA') // false
1057
- *
1058
- * // Check all theme color pairs
1059
- * const issues = checkThemeContrast(myTheme)
1060
- * ```
1061
- */
1062
- /**
1063
- * WCAG contrast level requirements
1064
- * - AA: 4.5:1 for normal text, 3:1 for large text
1065
- * - AAA: 7:1 for normal text, 4.5:1 for large text
1066
- */
1067
- type WCAGLevel = 'AA' | 'AAA';
1068
- /**
1069
- * Result of a contrast check
1070
- */
1071
- type ContrastResult = {
1072
- /** The two colors being compared */
1073
- colors: [string, string];
1074
- /** The contrast ratio (1-21) */
1075
- ratio: number;
1076
- /** Whether it passes WCAG AA for normal text (4.5:1) */
1077
- passesAA: boolean;
1078
- /** Whether it passes WCAG AA for large text (3:1) */
1079
- passesAALarge: boolean;
1080
- /** Whether it passes WCAG AAA for normal text (7:1) */
1081
- passesAAA: boolean;
1082
- /** Whether it passes WCAG AAA for large text (4.5:1) */
1083
- passesAAALarge: boolean;
1084
- };
1085
- /**
1086
- * Theme contrast check result
1087
- */
1088
- type ThemeContrastIssue = {
1089
- /** Name of the color pair (e.g., "primary/onPrimary") */
1090
- pair: string;
1091
- /** Foreground color name */
1092
- foreground: string;
1093
- /** Background color name */
1094
- background: string;
1095
- /** The contrast ratio */
1096
- ratio: number;
1097
- /** Required minimum ratio */
1098
- required: number;
1099
- /** WCAG level that failed */
1100
- level: 'AA' | 'AALarge';
1101
- };
1102
- /**
1103
- * Calculate the contrast ratio between two colors
1104
- * @see https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio
1105
- *
1106
- * @param foreground - Foreground color (hex)
1107
- * @param background - Background color (hex)
1108
- * @returns Contrast ratio (1-21), or null if colors are invalid
1109
- *
1110
- * @example
1111
- * ```ts
1112
- * getContrastRatio('#ffffff', '#000000') // 21
1113
- * getContrastRatio('#ffffff', '#ffffff') // 1
1114
- * getContrastRatio('#6366f1', '#ffffff') // ~4.5
1115
- * ```
1116
- */
1117
- declare const getContrastRatio: (foreground: string, background: string) => number | null;
1118
- /**
1119
- * Check if two colors meet WCAG contrast requirements
1120
- *
1121
- * @param foreground - Foreground color (hex)
1122
- * @param background - Background color (hex)
1123
- * @param level - WCAG level to check ('AA' or 'AAA')
1124
- * @param largeText - Whether this is for large text (14pt bold or 18pt+)
1125
- * @returns Whether the contrast meets the specified WCAG level
1126
- *
1127
- * @example
1128
- * ```ts
1129
- * meetsWCAG('#ffffff', '#6366f1', 'AA') // true
1130
- * meetsWCAG('#ffffff', '#6366f1', 'AAA') // false
1131
- * meetsWCAG('#ffffff', '#94a3b8', 'AA', true) // true (large text)
1132
- * ```
1133
- */
1134
- declare const meetsWCAG: (foreground: string, background: string, level?: WCAGLevel, largeText?: boolean) => boolean;
1135
- /**
1136
- * Get detailed contrast information between two colors
1137
- *
1138
- * @param foreground - Foreground color (hex)
1139
- * @param background - Background color (hex)
1140
- * @returns Detailed contrast result or null if colors are invalid
1141
- *
1142
- * @example
1143
- * ```ts
1144
- * const result = checkContrast('#ffffff', '#6366f1')
1145
- * // {
1146
- * // colors: ['#ffffff', '#6366f1'],
1147
- * // ratio: 4.54,
1148
- * // passesAA: true,
1149
- * // passesAALarge: true,
1150
- * // passesAAA: false,
1151
- * // passesAAALarge: true
1152
- * // }
1153
- * ```
1154
- */
1155
- declare const checkContrast: (foreground: string, background: string) => ContrastResult | null;
1156
- /**
1157
- * Check all important color pairs in a theme for WCAG compliance
1158
- *
1159
- * @param theme - The theme to check
1160
- * @param level - Minimum WCAG level to require ('AA' or 'AAA')
1161
- * @returns Array of contrast issues found
1162
- *
1163
- * @example
1164
- * ```ts
1165
- * import { checkThemeContrast, defaultTheme } from '@aurora-ds/theme'
1166
- *
1167
- * const issues = checkThemeContrast(defaultTheme)
1168
- * if (issues.length > 0) {
1169
- * console.warn('Theme has contrast issues:', issues)
1170
- * }
1171
- *
1172
- * // Check for AAA compliance
1173
- * const strictIssues = checkThemeContrast(defaultTheme, 'AAA')
1174
- * ```
1175
- */
1176
- declare const checkThemeContrast: (theme: {
1177
- colors: Record<string, string>;
1178
- }, level?: WCAGLevel) => ThemeContrastIssue[];
1179
- /**
1180
- * Get a suggested color that meets WCAG contrast requirements
1181
- * Adjusts the lightness of the foreground color to meet the target ratio
1182
- *
1183
- * @param foreground - Current foreground color (hex)
1184
- * @param background - Background color (hex)
1185
- * @param targetRatio - Desired contrast ratio (default 4.5 for AA)
1186
- * @returns Adjusted foreground color or null if adjustment isn't possible
1187
- *
1188
- * @example
1189
- * ```ts
1190
- * // If #94a3b8 on #ffffff doesn't meet AA
1191
- * const suggested = suggestContrastColor('#94a3b8', '#ffffff', 4.5)
1192
- * // Returns a darker shade that meets the requirement
1193
- * ```
1194
- */
1195
- declare const suggestContrastColor: (foreground: string, background: string, targetRatio?: number) => string | null;
1196
-
1197
- export { type BaseBreakpoints, type BaseColors, type BaseFontSize, type BaseFontWeight, type BaseLineHeight, type BaseOpacity, type BaseRadius, type BaseShadows, type BaseSpacing, type BaseTransition, type BaseZIndex, type ColorName, type ColorScale, type ColorShade, type ContrastResult, type CreateCustomThemeOptions, type CreateThemeOptions, type CustomTheme, type CustomThemeBase, type DeepPartial, type ExtendTheme, type ExtendedTheme, type FontFaceOptions, type PaletteName, type StyleFunction, type StyleWithPseudos, type Theme, type ThemeContrastIssue, type ThemeOverride, ThemeProvider, type ThemeProviderProps, type WCAGLevel, amber, amberDark, amberLight, black, blue, blueDark, blueLight, checkContrast, checkThemeContrast, clearSSRRules, colors, createCustomTheme, createStyles, createTheme, createThemeVariant, createTypedStyles, cssVar, cssVariables, current, cyan, cyanDark, cyanLight, defaultBreakpoints, defaultColors, defaultDarkColors, defaultDarkTheme, defaultFontSize, defaultFontWeight, defaultLineHeight, defaultOpacity, defaultRadius, defaultShadows, defaultSpacing, defaultTheme, defaultTransition, defaultZIndex, emerald, emeraldDark, emeraldLight, fontFace, fuchsia, getContrastRatio, getSSRRulesArray, getSSRStyleTag, getSSRStyles, getTheme, gray, grayDark, grayLight, green, indigo, indigoDark, indigoLight, injectCssVariables, insertRule, keyframes, lime, meetsWCAG, mergeThemes, orange, palettes, pink, purple, red, rose, roseDark, roseLight, sanitizeCssValue, setThemeContextGetter, sky, slate, slateDark, slateLight, stone, suggestContrastColor, teal, tealDark, tealLight, transparent, useTheme, violet, violetDark, violetLight, white, yellow };
812
+ export { type BaseBreakpoints, type BaseColors, type BaseFontSize, type BaseFontWeight, type BaseLineHeight, type BaseOpacity, type BaseRadius, type BaseShadows, type BaseSpacing, type BaseTransition, type BaseZIndex, type ColorName, type ColorScale, type ColorShade, type CreateCustomThemeOptions, type CreateThemeOptions, type CustomTheme, type CustomThemeBase, type DeepPartial, type ExtendTheme, type ExtendedTheme, type FontFaceOptions, type StyleFunction, type StyleWithPseudos, type Theme, type ThemeOverride, ThemeProvider, type ThemeProviderProps, clearSSRRules, colors, createCustomTheme, createStyles, createTheme, createThemeVariant, createTypedStyles, cssVar, cssVariables, defaultBreakpoints, defaultFontSize, defaultFontWeight, defaultLineHeight, defaultOpacity, defaultPalette, defaultRadius, defaultShadows, defaultSpacing, defaultTheme, defaultTransition, defaultZIndex, fontFace, getSSRRulesArray, getSSRStyleTag, getSSRStyles, getTheme, injectCssVariables, insertRule, keyframes, mergeThemes, sanitizeCssValue, setThemeContextGetter, useTheme };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import {createContext,useLayoutEffect,useContext}from'react';import {jsx}from'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=createContext(void 0),yr=({theme:r,children:n})=>{let a=B(()=>r);return useLayoutEffect(()=>()=>{B(a);},[a]),jsx(Je.Provider,{value:r,children:n})},gr=()=>{let r=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};export{yr as ThemeProvider,o as amber,oe as amberDark,te as amberLight,Sr as black,t as blue,G as blueDark,Z as blueLight,Or as checkContrast,Br as checkThemeContrast,Vr as clearSSRRules,xr as colors,Dr as createCustomTheme,tr as createStyles,er as createTheme,wr as createThemeVariant,Rr as createTypedStyles,Ir as cssVar,Wr as cssVariables,vr as current,u as cyan,ae as cyanDark,ne as cyanLight,he as defaultBreakpoints,Ue as defaultColors,Xe as defaultDarkColors,kr as defaultDarkTheme,pe as defaultFontSize,me as defaultFontWeight,ye as defaultLineHeight,Se as defaultOpacity,ue as defaultRadius,de as defaultShadows,fe as defaultSpacing,Qe as defaultTheme,be as defaultTransition,ge as defaultZIndex,k as emerald,X as emeraldDark,U as emeraldLight,$r as fontFace,j as fuchsia,W as getContrastRatio,zr as getSSRRulesArray,Er as getSSRStyleTag,nr as getSSRStyles,we as getTheme,S as gray,le as grayDark,ce as grayLight,c as green,d as indigo,I as indigoDark,F as indigoLight,Fr as injectCssVariables,L as insertRule,Lr as keyframes,_ as lime,Kr as meetsWCAG,Cr as mergeThemes,x as orange,Tr as palettes,H as pink,v as purple,s as red,h as rose,J as roseDark,q as roseLight,Ve as sanitizeCssValue,B as setThemeContextGetter,T as sky,e as slate,se as slateDark,ie as slateLight,N as stone,Nr as suggestContrastColor,m as teal,Y as tealDark,Q as tealLight,hr as transparent,gr as useTheme,p as violet,re as violetDark,ee as violetLight,l as white,P as yellow};//# sourceMappingURL=index.js.map
1
+ import {createContext,useLayoutEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var L=typeof document>"u",A=null,m=null,I=[],V=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"]]),z=new Map,p=new Set,W=new Set,K=new Set,N=0,Fe=new Set(["animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","fontWeight","lineHeight","opacity","order","orphans","widows","zIndex","zoom"]),Z=100;if(!L){let e=document.getElementById("aurora-styles");if(e)m=e.sheet;else {let t=document.createElement("style");t.id="aurora-styles",document.head.appendChild(t),m=t.sheet;}}var y=e=>{let t=A;return A=e,t},E=()=>A?.(),l=e=>{if(L)I.push(e);else if(m)try{m.insertRule(e,m.cssRules.length);}catch{}},g=e=>{let t=V.get(e);return t||(t=e.replace(/([A-Z])/g,"-$1").toLowerCase(),V.set(e,t)),t},h=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").toLowerCase(),Ae=/expression\s*\(|javascript\s*:|data\s*:\s*text\/html|behavior\s*:|@import|<\s*\/?\s*style/i,_=e=>{let t=e.replace(/\0/g,"");return Ae.test(t)?"unset":t},D=(e,t)=>typeof t=="number"&&!Fe.has(e)?`${t}px`:_(String(t)),u=e=>{let t="";for(let r in e){let o=e[r];o!=null&&typeof o!="object"&&(t+=`${g(r)}:${D(r,o)};`);}return t};var M=e=>{let t=e.length;if(t===0)return "";if(t===1){let r=e[0];if(r===void 0)return "u";if(r===null)return "n";if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return String(r)}if(t<=4){let r="";for(let o=0;o<t;o++){let n=e[o],s=typeof n;if(n===void 0)r+=o?"|u":"u";else if(n===null)r+=o?"|n":"n";else if(s==="string"||s==="number"||s==="boolean")r+=o?"|"+n:String(n);else return JSON.stringify(e)}return r}return JSON.stringify(e)},G=e=>{let t=e.charCodeAt(0);if(e.length<20){if(t>=97&&t<=122||t>=65&&t<=90){let n=true;for(let s=1;s<e.length;s++){let i=e.charCodeAt(s);if(!(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)){n=false;break}}if(n)return h(e)}else if(t===45||t>=48&&t<=57){let n=true;for(let s=1;s<e.length;s++)if(e.charCodeAt(s)<48||e.charCodeAt(s)>57){n=false;break}if(n)return e}}let r=5381,o=e.length;for(let n=0;n<o;n++)r=(r<<5)+r^e.charCodeAt(n);return (r>>>0).toString(36)},J=e=>{let t=new Map;return {getOrSet(r,o){let n=t.get(r);if(n!==void 0)return t.delete(r),t.set(r,n),n;let s=o();if(t.size>=e){let i=t.keys().next().value;i!==void 0&&t.delete(i);}return t.set(r,s),s}}},j=e=>{let t=JSON.stringify(e),r=5381,o=t.length;for(let n=0;n<o;n++)r=(r<<5)+r^t.charCodeAt(n);return (r>>>0).toString(36)},U=e=>{let t=5381,r=e.length;for(let o=0;o<r;o++)t=(t<<5)+t^e.charCodeAt(o);return (t>>>0).toString(36)},ze=e=>{if(!p.has(e))return p.add(e),e;let t=2;for(;p.has(`${e}-${t}`);)t++;let r=`${e}-${t}`;return p.add(r),r},B=(e,t,r=false)=>{if(r){let i=j(e),f=z.get(i);if(f)return f}let o=ze(t),n="",s="";for(let i in e){let f=e[i],d=i[0];if(d==="@"){let c=u(f);c&&(s+=`${i}{.${o}{${c}}}`);}else if(d==="&"){let c=u(f);c&&(s+=`${i.replace(/&/g,`.${o}`)}{${c}}`);}else if(d===":"){let c=u(f);c&&(s+=`.${o}${i}{${c}}`);}else f!=null&&typeof f!="object"&&(n+=`${g(i)}:${D(i,f)};`);}return n&&l(`.${o}{${n}}`),s&&l(s),r&&z.set(j(e),o),o},X=e=>W.has(e),q=e=>{W.add(e);},Q=()=>(++N).toString(36),Y=e=>K.has(e),ee=e=>{K.add(e);},H=()=>I,te=()=>{I=[],z.clear(),p.clear(),W.clear(),K.clear(),N=0;};var re=createContext(void 0),Ee=({theme:e,children:t})=>{let r=y(()=>e);return useLayoutEffect(()=>()=>{y(r);},[r]),jsx(re.Provider,{value:e,children:t})},Be=()=>{let e=useContext(re);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};var oe={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 ne={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 se={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 ae={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 ie={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 fe={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 ce={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 le={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 de={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 pe={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 me={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 ue={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 ge={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 he={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 xe={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 ye={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 Te={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 Se={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 be={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 Ce={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 a={gray:fe,slate:ye,stone:Te,red:ge,orange:pe,amber:oe,yellow:Ce,lime:de,green:ce,emerald:ae,teal:Se,cyan:se,sky:xe,blue:ne,indigo:le,violet:be,purple:ue,fuchsia:ie,pink:me,rose:he,white:"#ffffff",black:"#000000",transparent:"transparent",current:"currentColor"};var T={background:a.slate[25],surface:a.white,surfaceHover:a.slate[100],surfaceActive:a.slate[200],text:a.slate[800],textSecondary:a.slate[500],textTertiary:a.slate[400],primary:a.indigo[600],primaryHover:a.indigo[700],primaryActive:a.indigo[800],primarySubtle:a.indigo[50],primaryDisabled:a.indigo[300],onPrimary:a.white,secondary:a.slate[100],secondaryHover:a.slate[200],secondaryActive:a.slate[300],secondarySubtle:a.slate[50],secondaryDisabled:a.slate[200],onSecondary:a.slate[700],border:a.slate[200],disabledText:a.slate[400],disabled:a.slate[300],success:a.emerald[600],successSubtle:a.emerald[50],warning:a.amber[500],warningSubtle:a.amber[50],error:a.red[600],errorHover:a.red[700],errorSubtle:a.red[50],onError:a.white,info:a.blue[600],infoSubtle:a.blue[50],link:a.indigo[600],linkHover:a.indigo[700],linkActive:a.indigo[800],linkDisabled:a.indigo[300]};var S={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"},b={none:"0",xs:"0.125rem",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"},C={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)"},R={"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"},w={light:300,regular:400,medium:500,semibold:600,bold:700},$={none:1,tight:1.25,normal:1.5,relaxed:1.75,loose:2},k={behind:-1,base:0,dropdown:1e3,sticky:1100,overlay:1300,modal:1400,popover:1500,tooltip:1600,toast:1700},v={fast:"150ms ease-out",normal:"250ms ease-out",slow:"350ms ease-out"},P={none:0,lowest:.05,low:.1,medium:.25,high:.5,higher:.75,full:1},F={xs:"480px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},Oe={colors:T,spacing:S,radius:b,shadows:C,fontSize:R,fontWeight:w,lineHeight:$,zIndex:k,transition:v,opacity:P,breakpoints:F};var Re=e=>{let t=JSON.stringify(e),r=5381,o=t.length;for(let n=0;n<o;n++)r=(r<<5)+r^t.charCodeAt(n);return (r>>>0).toString(36)},x=new Map,Ve=50;var O=(e,t)=>{let r={...e};for(let o in t){let n=t[o];if(n===void 0)continue;let s=e[o];n!==null&&typeof n=="object"&&!Array.isArray(n)&&s!==null&&typeof s=="object"?r[o]=O(s,n):r[o]=n;}return r},je=(e,t)=>({...e,...t}),we=(e,t,r={})=>{let{mode:o="merge"}=r,n=`${Re(e)}_${Re(t)}_${o}`,s=x.get(n);if(s)return s;let i=o==="replace"?je(e,t):O(e,t);if(x.size>=Ve){let f=x.keys().next().value;f&&x.delete(f);}return x.set(n,i),i},Le=(e,...t)=>t.reduce((r,o)=>O(r,o),e),Ne=e=>t=>we(t,e),Ze=e=>({colors:e.colors,spacing:e.spacing??S,radius:e.radius??b,shadows:e.shadows??C,fontSize:e.fontSize??R,fontWeight:e.fontWeight??w,lineHeight:e.lineHeight??$,zIndex:e.zIndex??k,transition:e.transition??v,opacity:e.opacity??P,breakpoints:e.breakpoints??F});var _e=()=>{let e=new Error().stack||"",t=e.match(/([A-Za-z0-9_]+)\.styles\.[tj]s/);if(t?.[1])return h(t[1]);let r=e.match(/\/([A-Za-z0-9_]+)\.[tj]sx?[:\d]*\)?$/m);return r?.[1]&&r[1]!=="createStyles"?h(r[1]):"style"},$e=(e,t)=>{let r={};for(let o in e){let n=e[o];if(n){let s=`${t}-${h(o)}`;if(typeof n=="function"){let i=J(Z);r[o]=(...f)=>{let d=M(f);return i.getOrSet(d,()=>{let c=n(...f);return B(c,`${s}-${G(d)}`)})};}else r[o]=B(n,s,true);}}return r},ke=e=>{let t=_e();if(typeof e=="function"){let r=null,o;return new Proxy({},{get(n,s){let i=E();if(!i)throw new Error("createStyles: Theme context not found. Make sure you are using this inside a ThemeProvider.");return (i!==o||!r)&&(r=$e(e(i),t),o=i),r[s]}})}return $e(e,t)},De=()=>e=>ke(e);var Me=e=>{let t="";for(let o in e)t+=`${o}{${u(e[o])}}`;if(X(t))return `aurora-kf-${U(t)}`;let r=`aurora-kf-${Q()}`;return l(`@keyframes ${r}{${t}}`),q(t),r};var Ge=e=>{let{fontFamily:t,src:r,fontStyle:o="normal",fontWeight:n=400,fontDisplay:s="swap",unicodeRange:i}=e,f=`font-family:"${t}";`;return f+=`src:${r};`,f+=`font-style:${o};`,f+=`font-weight:${n};`,f+=`font-display:${s};`,i&&(f+=`unicode-range:${i};`),Y(f)||(l(`@font-face{${f}}`),ee(f)),t};var ve=(e,t)=>{let r="";for(let o in e){let n=e[o],s=g(o);n&&typeof n=="object"?r+=ve(n,`${t}-${s}`):n!=null&&(r+=`--${t}-${s}:${n};`);}return r},Je=(e,t="theme")=>{let r=ve(e,t);l(`:root{${r}}`);},Ue=(e,t)=>{let r=`--theme-${e.replace(/\./g,"-")}`;return t?`var(${r}, ${t})`:`var(${r})`},Xe=(e,t={})=>{let{prefix:r="",inject:o=false}=t,n={},s="";for(let i in e){let f=g(i),d=r?`--${r}-${f}`:`--${f}`;n[i]=`var(${d})`,o&&(s+=`${d}:${e[i]};`);}return o&&s&&l(`:root{${s}}`),n};var Pe=()=>H().join(""),qe=()=>{let e=Pe();return e?`<style id="aurora-styles">${e}</style>`:""},Qe=()=>{te();},Ye=()=>[...H()];export{Ee as ThemeProvider,Qe as clearSSRRules,a as colors,Ze as createCustomTheme,ke as createStyles,we as createTheme,Ne as createThemeVariant,De as createTypedStyles,Ue as cssVar,Xe as cssVariables,F as defaultBreakpoints,R as defaultFontSize,w as defaultFontWeight,$ as defaultLineHeight,P as defaultOpacity,T as defaultPalette,b as defaultRadius,C as defaultShadows,S as defaultSpacing,Oe as defaultTheme,v as defaultTransition,k as defaultZIndex,Ge as fontFace,Ye as getSSRRulesArray,qe as getSSRStyleTag,Pe as getSSRStyles,E as getTheme,Je as injectCssVariables,l as insertRule,Me as keyframes,Le as mergeThemes,_ as sanitizeCssValue,y as setThemeContextGetter,Be as useTheme};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map