@tolle_/tolle-ui 0.0.6-beta → 0.0.7-beta

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.
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
2
  import * as i0 from "@angular/core";
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
5
  size?: "default" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  export type ButtonProps = VariantProps<typeof buttonVariants>;
@@ -8,19 +8,22 @@ export declare class ThemeService {
8
8
  private renderer;
9
9
  private isDarkSubject;
10
10
  isDark$: import("rxjs").Observable<boolean>;
11
+ private styleId;
11
12
  constructor(document: Document, platformId: Object, config: TolleConfig, rendererFactory: RendererFactory2);
12
13
  private initializeTheme;
13
14
  /**
14
- * Applies the brand identity variables.
15
- * These are applied to :root (html) so they ripple through all color-mix functions.
15
+ * Applies the brand identity variables with full shade palette
16
16
  */
17
17
  applyBrandConfig(config: TolleConfig): void;
18
+ /**
19
+ * Generates full primary color palette (50-900) based on base color
20
+ * Uses color-mix() for consistency with your existing approach
21
+ */
22
+ private generatePrimaryShades;
23
+ private injectDynamicStyles;
18
24
  toggleTheme(): void;
19
25
  private enableDarkMode;
20
26
  private disableDarkMode;
21
- /**
22
- * Helper to get current state for components that might need JS-based logic
23
- */
24
27
  get currentTheme(): 'dark' | 'light';
25
28
  static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, [null, null, { optional: true; }, null]>;
26
29
  static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolle_/tolle-ui",
3
- "version": "0.0.6-beta",
3
+ "version": "0.0.7-beta",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/preset.js CHANGED
@@ -3,11 +3,22 @@ module.exports = {
3
3
  theme: {
4
4
  extend: {
5
5
  colors: {
6
- // We map these to CSS variables we will define in Step 2
6
+ // Primary with full palette
7
7
  primary: {
8
- DEFAULT: 'var(--primary)',
8
+ 50: 'var(--primary-50)',
9
+ 100: 'var(--primary-100)',
10
+ 200: 'var(--primary-200)',
11
+ 300: 'var(--primary-300)',
12
+ 400: 'var(--primary-400)',
13
+ 500: 'var(--primary-500)',
14
+ 600: 'var(--primary-600)',
15
+ 700: 'var(--primary-700)',
16
+ 800: 'var(--primary-800)',
17
+ 900: 'var(--primary-900)',
18
+ DEFAULT: 'var(--primary-500)',
9
19
  foreground: 'var(--primary-foreground)',
10
20
  },
21
+ // Other colors
11
22
  secondary: {
12
23
  DEFAULT: 'var(--secondary)',
13
24
  foreground: 'var(--secondary-foreground)',
@@ -29,16 +40,16 @@ module.exports = {
29
40
  ring: 'var(--ring)',
30
41
  background: 'var(--background)',
31
42
  foreground: 'var(--foreground)',
43
+ popover: {
44
+ DEFAULT: 'var(--popover)',
45
+ foreground: 'var(--popover-foreground)',
46
+ },
32
47
  },
33
48
  borderRadius: {
34
49
  lg: 'var(--radius)',
35
50
  md: 'calc(var(--radius) - 2px)',
36
51
  sm: 'calc(var(--radius) - 4px)',
37
52
  },
38
- popover: {
39
- DEFAULT: 'var(--popover)',
40
- foreground: 'var(--popover-foreground)',
41
- },
42
53
  },
43
54
  },
44
55
  plugins: [],
package/theme.css CHANGED
@@ -6,25 +6,34 @@
6
6
  @tailwind utilities;
7
7
 
8
8
  /* -------------------------------------------------------------------------- */
9
- /* 2. THEME VARIABLES (The Engine) */
9
+ /* 2. THEME VARIABLES (The Engine) - WITH FULL PALETTE */
10
10
  /* -------------------------------------------------------------------------- */
11
11
  :root {
12
12
  /* --- Configuration (Source of Truth) --- */
13
13
  --primary: #2563eb;
14
14
  --radius: 0.5rem;
15
15
 
16
- /* --- Auto-Generated Colors (Dependent on --primary) --- */
16
+ /* --- Auto-Generated Full Palette (Defaults) --- */
17
+ --primary-50: #eff6ff;
18
+ --primary-100: #dbeafe;
19
+ --primary-200: #bfdbfe;
20
+ --primary-300: #93c5fd;
21
+ --primary-400: #60a5fa;
22
+ --primary-500: #3b82f6;
23
+ --primary-600: #2563eb;
24
+ --primary-700: #1d4ed8;
25
+ --primary-800: #1e40af;
26
+ --primary-900: #1e3a8a;
27
+
28
+ /* --- Derived Colors (will be overridden by dynamic styles) --- */
17
29
  --primary-foreground: #ffffff;
18
- --secondary: color-mix(in srgb, var(--primary), #ffffff 85%);
19
- --secondary-foreground: color-mix(in srgb, var(--primary), #000000 80%);
20
-
21
- --muted: color-mix(in srgb, var(--primary), #f3f4f6 92%);
22
- --muted-foreground: color-mix(in srgb, var(--primary), #4b5563 40%); /* Fixed double definition */
23
-
24
- --accent: color-mix(in srgb, var(--primary), transparent 90%);
25
- --accent-foreground: var(--primary);
26
-
27
- --ring: color-mix(in srgb, var(--primary), transparent 75%);
30
+ --secondary: color-mix(in srgb, var(--primary-200), transparent 40%);
31
+ --secondary-foreground: var(--primary-900);
32
+ --muted: color-mix(in srgb, var(--primary-50), #f3f4f6 50%);
33
+ --muted-foreground: color-mix(in srgb, var(--primary-400), #4b5563 60%);
34
+ --accent: color-mix(in srgb, var(--primary-100), transparent 70%);
35
+ --accent-foreground: var(--primary-700);
36
+ --ring: color-mix(in srgb, var(--primary-300), transparent 50%);
28
37
 
29
38
  /* --- Neutral/Layout Base --- */
30
39
  --background: #ffffff;
@@ -34,10 +43,23 @@
34
43
  --destructive: #ef4444;
35
44
  --destructive-foreground: #f8fafc;
36
45
  --input-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
46
+ --popover: #ffffff;
47
+ --popover-foreground: #020817;
37
48
  }
38
49
 
39
50
  /* --- Dark Mode (Google/Charcoal Palette) --- */
40
51
  .dark {
52
+ --primary-50: #1e3a8a;
53
+ --primary-100: #1e40af;
54
+ --primary-200: #1d4ed8;
55
+ --primary-300: #2563eb;
56
+ --primary-400: #3b82f6;
57
+ --primary-500: #60a5fa;
58
+ --primary-600: #93c5fd;
59
+ --primary-700: #bfdbfe;
60
+ --primary-800: #dbeafe;
61
+ --primary-900: #eff6ff;
62
+
41
63
  --background: #121212;
42
64
  --foreground: #e3e3e3;
43
65
  --secondary: #1f1f1f;
@@ -49,11 +71,14 @@
49
71
  --popover: #1f1f1f;
50
72
  --popover-foreground: #e3e3e3;
51
73
  --accent: rgba(255, 255, 255, 0.04);
52
- --accent-foreground: var(--primary);
53
- --ring: color-mix(in srgb, var(--primary), transparent 40%);
74
+ --accent-foreground: var(--primary-400);
75
+ --ring: color-mix(in srgb, var(--primary-500), transparent 60%);
54
76
  --input-shadow: 0 0 #0000;
77
+ --destructive: #dc2626;
78
+ --destructive-foreground: #f8fafc;
55
79
  }
56
80
 
81
+ /* [Rest of your existing CSS remains the same - everything below stays] */
57
82
  /* -------------------------------------------------------------------------- */
58
83
  /* 3. BASE LAYER (Icons & Typography) */
59
84
  /* -------------------------------------------------------------------------- */