@fakhrirafiki/theme-engine 0.4.2 → 0.4.4

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.
@@ -40,14 +40,80 @@
40
40
 
41
41
  /* ThemePresetButtons: lightweight CSS-based animations and hover affordances */
42
42
 
43
- /* ThemePresetButtons: hover affordance without motion library */
43
+ /* ThemePresetButtons: base button styling (no Tailwind required) */
44
44
  .theme-preset-button {
45
- transition: transform 0.2s ease-out;
45
+ width: 100%;
46
+ height: 56px;
47
+ padding: 0.75rem 0.875rem;
48
+
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: flex-start;
52
+ gap: 0.625rem;
53
+
54
+ border-radius: calc(var(--radius) + 0.25rem);
55
+ border: 1px solid hsl(var(--border) / 0.75);
56
+ background: hsl(var(--card) / 0.85);
57
+ color: hsl(var(--foreground));
58
+
59
+ box-shadow: 0 1px 0 hsl(var(--border) / 0.35);
60
+ cursor: pointer;
61
+
62
+ transition:
63
+ transform 0.2s ease-out,
64
+ background-color 0.2s ease-out,
65
+ border-color 0.2s ease-out,
66
+ box-shadow 0.2s ease-out;
67
+ }
68
+
69
+ .theme-preset-button:focus-visible {
70
+ outline: 2px solid hsl(var(--ring) / 0.75);
71
+ outline-offset: 2px;
72
+ }
73
+
74
+ .theme-preset-button:disabled {
75
+ opacity: 0.6;
76
+ cursor: not-allowed;
77
+ }
78
+
79
+ .theme-preset-button--selected {
80
+ background: hsl(var(--primary) / 0.06);
81
+ border-color: hsl(var(--primary) / 0.35);
82
+ box-shadow: 0 0 0 2px hsl(var(--primary) / 0.25);
83
+ }
84
+
85
+ .theme-preset-button__colors {
86
+ display: flex;
87
+ align-items: center;
88
+ gap: 0.25rem;
89
+ flex-shrink: 0;
90
+ }
91
+
92
+ .theme-preset-button__text {
93
+ min-width: 0;
94
+ flex: 1;
95
+ }
96
+
97
+ .theme-preset-button__label {
98
+ display: block;
99
+ white-space: nowrap;
100
+ overflow: hidden;
101
+ text-overflow: ellipsis;
102
+
103
+ line-height: 1.1;
104
+ font-size: 0.875rem;
105
+ font-weight: 500;
106
+ text-transform: capitalize;
46
107
  }
47
108
 
48
109
  .theme-preset-button:hover {
49
- transform: translateY(-3px) scale(1.02);
110
+ transform: translateY(-2px) scale(1.01);
50
111
  z-index: 20;
112
+ background: hsl(var(--card) / 0.95);
113
+ border-color: hsl(var(--primary) / 0.2);
114
+ box-shadow:
115
+ 0 10px 25px hsl(0 0% 0% / 0.12),
116
+ 0 0 0 1px hsl(var(--border) / 0.35);
51
117
  }
52
118
 
53
119
  /* Color boxes within preset buttons - fallback only */
@@ -55,11 +121,12 @@
55
121
  width: 12px;
56
122
  height: 12px;
57
123
  border-radius: calc(var(--radius) - 4px);
58
- border: 1px solid rgba(0, 0, 0, 0.1);
124
+ border: 1px solid hsl(var(--border) / 0.75);
125
+ box-shadow: 0 1px 0 hsl(var(--border) / 0.3);
59
126
  }
60
127
 
61
128
  .dark .theme-color-box {
62
- border-color: rgba(255, 255, 255, 0.1);
129
+ border-color: hsl(var(--border) / 0.4);
63
130
  }
64
131
 
65
132
  /* Theme status card - for debugging and demos */
@@ -7,58 +7,58 @@
7
7
 
8
8
  @theme inline {
9
9
  /* Color mappings - Bridge between CSS variables and Tailwind classes */
10
- --color-background: var(--background);
11
- --color-foreground: var(--foreground);
12
- --color-card: var(--card);
13
- --color-card-foreground: var(--card-foreground);
14
- --color-popover: var(--popover);
15
- --color-popover-foreground: var(--popover-foreground);
16
- --color-primary: var(--primary);
17
- --color-primary-foreground: var(--primary-foreground);
18
- --color-secondary: var(--secondary);
19
- --color-secondary-foreground: var(--secondary-foreground);
20
- --color-muted: var(--muted);
21
- --color-muted-foreground: var(--muted-foreground);
22
- --color-accent: var(--accent);
23
- --color-accent-foreground: var(--accent-foreground);
24
- --color-destructive: var(--destructive);
25
- --color-destructive-foreground: var(--destructive-foreground);
26
- --color-border: var(--border);
27
- --color-input: var(--input);
28
- --color-ring: var(--ring);
10
+ --color-background: hsl(var(--background));
11
+ --color-foreground: hsl(var(--foreground));
12
+ --color-card: hsl(var(--card));
13
+ --color-card-foreground: hsl(var(--card-foreground));
14
+ --color-popover: hsl(var(--popover));
15
+ --color-popover-foreground: hsl(var(--popover-foreground));
16
+ --color-primary: hsl(var(--primary));
17
+ --color-primary-foreground: hsl(var(--primary-foreground));
18
+ --color-secondary: hsl(var(--secondary));
19
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
20
+ --color-muted: hsl(var(--muted));
21
+ --color-muted-foreground: hsl(var(--muted-foreground));
22
+ --color-accent: hsl(var(--accent));
23
+ --color-accent-foreground: hsl(var(--accent-foreground));
24
+ --color-destructive: hsl(var(--destructive));
25
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
26
+ --color-border: hsl(var(--border));
27
+ --color-input: hsl(var(--input));
28
+ --color-ring: hsl(var(--ring));
29
29
 
30
30
  /* Chart colors for data visualization */
31
- --color-chart-1: var(--chart-1);
32
- --color-chart-2: var(--chart-2);
33
- --color-chart-3: var(--chart-3);
34
- --color-chart-4: var(--chart-4);
35
- --color-chart-5: var(--chart-5);
31
+ --color-chart-1: hsl(var(--chart-1));
32
+ --color-chart-2: hsl(var(--chart-2));
33
+ --color-chart-3: hsl(var(--chart-3));
34
+ --color-chart-4: hsl(var(--chart-4));
35
+ --color-chart-5: hsl(var(--chart-5));
36
36
 
37
37
  /* Sidebar colors for dashboard layouts */
38
- --color-sidebar: var(--sidebar);
39
- --color-sidebar-foreground: var(--sidebar-foreground);
40
- --color-sidebar-primary: var(--sidebar-primary);
41
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
42
- --color-sidebar-accent: var(--sidebar-accent);
43
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
44
- --color-sidebar-border: var(--sidebar-border);
45
- --color-sidebar-ring: var(--sidebar-ring);
38
+ --color-sidebar: hsl(var(--sidebar));
39
+ --color-sidebar-foreground: hsl(var(--sidebar-foreground));
40
+ --color-sidebar-primary: hsl(var(--sidebar-primary));
41
+ --color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground));
42
+ --color-sidebar-accent: hsl(var(--sidebar-accent));
43
+ --color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
44
+ --color-sidebar-border: hsl(var(--sidebar-border));
45
+ --color-sidebar-ring: hsl(var(--sidebar-ring));
46
46
 
47
47
  /* Semantic accent colors for status and feedback */
48
- --color-accent-info: var(--accent-info);
49
- --color-accent-info-foreground: var(--accent-info-foreground);
50
- --color-accent-success: var(--accent-success);
51
- --color-accent-success-foreground: var(--accent-success-foreground);
52
- --color-accent-warning: var(--accent-warning);
53
- --color-accent-warning-foreground: var(--accent-warning-foreground);
54
- --color-accent-danger: var(--accent-danger);
55
- --color-accent-danger-foreground: var(--accent-danger-foreground);
56
- --color-accent-brand: var(--accent-brand);
57
- --color-accent-brand-foreground: var(--accent-brand-foreground);
58
- --color-accent-feature: var(--accent-feature);
59
- --color-accent-feature-foreground: var(--accent-feature-foreground);
60
- --color-accent-highlight: var(--accent-highlight);
61
- --color-accent-highlight-foreground: var(--accent-highlight-foreground);
48
+ --color-accent-info: hsl(var(--accent-info));
49
+ --color-accent-info-foreground: hsl(var(--accent-info-foreground));
50
+ --color-accent-success: hsl(var(--accent-success));
51
+ --color-accent-success-foreground: hsl(var(--accent-success-foreground));
52
+ --color-accent-warning: hsl(var(--accent-warning));
53
+ --color-accent-warning-foreground: hsl(var(--accent-warning-foreground));
54
+ --color-accent-danger: hsl(var(--accent-danger));
55
+ --color-accent-danger-foreground: hsl(var(--accent-danger-foreground));
56
+ --color-accent-brand: hsl(var(--accent-brand));
57
+ --color-accent-brand-foreground: hsl(var(--accent-brand-foreground));
58
+ --color-accent-feature: hsl(var(--accent-feature));
59
+ --color-accent-feature-foreground: hsl(var(--accent-feature-foreground));
60
+ --color-accent-highlight: hsl(var(--accent-highlight));
61
+ --color-accent-highlight-foreground: hsl(var(--accent-highlight-foreground));
62
62
 
63
63
  /* Dynamic border radius system */
64
64
  --radius-sm: calc(var(--radius) - 4px);
@@ -83,7 +83,7 @@
83
83
  --size-spacing: var(--spacing);
84
84
 
85
85
  /* Shadow system integration */
86
- --color-shadow: var(--shadow-color);
86
+ --color-shadow: hsl(var(--shadow-color));
87
87
  --shadow-opacity: var(--shadow-opacity);
88
88
  --shadow-blur: var(--shadow-blur);
89
89
  --shadow-spread: var(--shadow-spread);
@@ -118,4 +118,4 @@
118
118
  -webkit-font-smoothing: antialiased;
119
119
  -moz-osx-font-smoothing: grayscale;
120
120
  }
121
- }
121
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fakhrirafiki/theme-engine",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Elegant theming system with smooth transitions, custom presets, semantic accent colors, and complete shadcn/ui support for modern React applications",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",