@asafarim/react-themes 1.8.7 → 1.8.9
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.mts +37 -203
- package/dist/index.d.ts +37 -203
- package/dist/index.js +1 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -13
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +6 -166
- package/package.json +3 -2
package/dist/styles.css
CHANGED
|
@@ -1,173 +1,13 @@
|
|
|
1
|
-
/* @asafarim/react-themes -
|
|
1
|
+
/* @asafarim/react-themes - Uses ASafariM Design Tokens */
|
|
2
2
|
|
|
3
|
-
/*
|
|
4
|
-
|
|
5
|
-
/* Colors */
|
|
6
|
-
--theme-color-background: var(--theme-color-background, #ffffff);
|
|
7
|
-
--theme-color-background-secondary: var(--theme-color-background-secondary, #f8fafc);
|
|
8
|
-
--theme-color-background-tertiary: var(--theme-color-background-tertiary, #f1f5f9);
|
|
9
|
-
--theme-color-text: var(--theme-color-text, #112a0f);
|
|
10
|
-
--theme-color-text-secondary: var(--theme-color-text-secondary, #475569);
|
|
11
|
-
--theme-color-text-muted: var(--theme-color-text-muted, #64748b);
|
|
12
|
-
--theme-color-border: var(--theme-color-border, #e2e8f0);
|
|
13
|
-
--theme-color-border-light: var(--theme-color-border-light, #f1f5f9);
|
|
14
|
-
--theme-color-border-hover: var(--theme-color-border-hover, #cbd5e1);
|
|
15
|
-
--theme-color-primary: var(--theme-color-primary, #3b82f6);
|
|
16
|
-
--theme-color-primary-hover: var(--theme-color-primary-hover, #2563eb);
|
|
17
|
-
--theme-color-primary-active: var(--theme-color-primary-active, #1d4ed8);
|
|
18
|
-
--theme-color-hover: var(--theme-color-hover, #f8fafc);
|
|
19
|
-
--theme-color-active: var(--theme-color-active, #f1f5f9);
|
|
20
|
-
--theme-color-focus: var(--theme-color-focus, rgba(59, 130, 246, 0.1));
|
|
21
|
-
|
|
22
|
-
/* Spacing */
|
|
23
|
-
--theme-spacing-xs: var(--theme-spacing-xs, 0.25rem);
|
|
24
|
-
--theme-spacing-sm: var(--theme-spacing-sm, 0.5rem);
|
|
25
|
-
--theme-spacing-md: var(--theme-spacing-md, 1rem);
|
|
26
|
-
--theme-spacing-lg: var(--theme-spacing-lg, 1.5rem);
|
|
27
|
-
--theme-spacing-xl: var(--theme-spacing-xl, 2rem);
|
|
28
|
-
--theme-spacing-2xl: var(--theme-spacing-2xl, 3rem);
|
|
29
|
-
--theme-spacing-3xl: var(--theme-spacing-3xl, 4rem);
|
|
30
|
-
--theme-spacing-4xl: var(--theme-spacing-4xl, 6rem);
|
|
31
|
-
|
|
32
|
-
/* Border Radius */
|
|
33
|
-
--theme-radius-none: var(--theme-radius-none, 0);
|
|
34
|
-
--theme-radius-sm: var(--theme-radius-sm, 0.25rem);
|
|
35
|
-
--theme-radius-md: var(--theme-radius-md, 0.375rem);
|
|
36
|
-
--theme-radius-lg: var(--theme-radius-lg, 0.5rem);
|
|
37
|
-
--theme-radius-xl: var(--theme-radius-xl, 0.75rem);
|
|
38
|
-
--theme-radius-2xl: var(--theme-radius-2xl, 1rem);
|
|
39
|
-
--theme-radius-full: var(--theme-radius-full, 9999px);
|
|
40
|
-
|
|
41
|
-
/* Typography */
|
|
42
|
-
--theme-font-family-sans: var(--theme-font-family-sans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif);
|
|
43
|
-
--theme-font-family-serif: var(--theme-font-family-serif, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif);
|
|
44
|
-
--theme-font-family-mono: var(--theme-font-family-mono, ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace);
|
|
45
|
-
|
|
46
|
-
/* Font Sizes */
|
|
47
|
-
--theme-font-size-xs: var(--theme-font-size-xs, 0.75rem);
|
|
48
|
-
--theme-font-size-sm: var(--theme-font-size-sm, 0.875rem);
|
|
49
|
-
--theme-font-size-base: var(--theme-font-size-base, 1rem);
|
|
50
|
-
--theme-font-size-lg: var(--theme-font-size-lg, 1.125rem);
|
|
51
|
-
--theme-font-size-xl: var(--theme-font-size-xl, 1.25rem);
|
|
52
|
-
--theme-font-size-2xl: var(--theme-font-size-2xl, 1.5rem);
|
|
53
|
-
--theme-font-size-3xl: var(--theme-font-size-3xl, 1.875rem);
|
|
54
|
-
--theme-font-size-4xl: var(--theme-font-size-4xl, 2.25rem);
|
|
55
|
-
--theme-font-size-5xl: var(--theme-font-size-5xl, 3rem);
|
|
56
|
-
|
|
57
|
-
/* Transitions */
|
|
58
|
-
--theme-transition-fast: var(--theme-transition-fast, 150ms ease);
|
|
59
|
-
--theme-transition-normal: var(--theme-transition-normal, 250ms ease);
|
|
60
|
-
--theme-transition-slow: var(--theme-transition-slow, 350ms ease);
|
|
61
|
-
--theme-transition-bounce: var(--theme-transition-bounce, 250ms cubic-bezier(0.68, -0.55, 0.265, 1.55));
|
|
62
|
-
|
|
63
|
-
/* Z-Index */
|
|
64
|
-
--theme-z-index-dropdown: var(--theme-z-index-dropdown, 1000);
|
|
65
|
-
--theme-z-index-modal: var(--theme-z-index-modal, 1050);
|
|
66
|
-
--theme-z-index-tooltip: var(--theme-z-index-tooltip, 1100);
|
|
67
|
-
--theme-z-index-overlay: var(--theme-z-index-overlay, 1200);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* Optional Base Styles */
|
|
71
|
-
.theme-base {
|
|
72
|
-
font-family: var(--theme-font-family-sans);
|
|
73
|
-
font-size: var(--theme-font-size-base);
|
|
74
|
-
color: var(--theme-color-text);
|
|
75
|
-
background-color: var(--theme-color-background);
|
|
76
|
-
transition: color var(--theme-transition-normal), background-color var(--theme-transition-normal);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Theme Toggle Button Styles */
|
|
80
|
-
.theme-toggle {
|
|
81
|
-
display: inline-flex;
|
|
82
|
-
align-items: center;
|
|
83
|
-
justify-content: center;
|
|
84
|
-
padding: var(--theme-spacing-sm) var(--theme-spacing-md);
|
|
85
|
-
border: 1px solid var(--theme-color-border);
|
|
86
|
-
border-radius: var(--theme-radius-md);
|
|
87
|
-
background-color: var(--theme-color-background);
|
|
88
|
-
color: var(--theme-color-text);
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
transition: all var(--theme-transition-normal);
|
|
91
|
-
font-size: var(--theme-font-size-sm);
|
|
92
|
-
font-weight: 500;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.theme-toggle:hover {
|
|
96
|
-
background-color: var(--theme-color-hover);
|
|
97
|
-
border-color: var(--theme-color-border-hover);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.theme-toggle:focus {
|
|
101
|
-
outline: none;
|
|
102
|
-
background-color: var(--theme-color-hover);
|
|
103
|
-
border-color: var(--theme-color-primary);
|
|
104
|
-
box-shadow: 0 0 0 3px var(--theme-color-focus);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Theme Selector Styles */
|
|
108
|
-
.theme-selector {
|
|
109
|
-
padding: var(--theme-spacing-sm) var(--theme-spacing-md);
|
|
110
|
-
border: 1px solid var(--theme-color-border);
|
|
111
|
-
border-radius: var(--theme-radius-md);
|
|
112
|
-
background-color: var(--theme-color-background);
|
|
113
|
-
color: var(--theme-color-text);
|
|
114
|
-
font-size: var(--theme-font-size-sm);
|
|
115
|
-
transition: all var(--theme-transition-normal);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.theme-selector:focus {
|
|
119
|
-
outline: none;
|
|
120
|
-
border-color: var(--theme-color-primary);
|
|
121
|
-
box-shadow: 0 0 0 3px var(--theme-color-focus);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* Utility Classes */
|
|
125
|
-
.theme-bg-primary {
|
|
126
|
-
background-color: var(--theme-color-background);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.theme-bg-secondary {
|
|
130
|
-
background-color: var(--theme-color-background-secondary);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.theme-text-primary {
|
|
134
|
-
color: var(--theme-color-text);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.theme-text-secondary {
|
|
138
|
-
color: var(--theme-color-text-secondary);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.theme-text-muted {
|
|
142
|
-
color: var(--theme-color-text-muted);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.theme-border {
|
|
146
|
-
border: 1px solid var(--theme-color-border);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.theme-rounded {
|
|
150
|
-
border-radius: var(--theme-radius-md);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.theme-shadow {
|
|
154
|
-
box-shadow: var(--theme-color-shadow, 0 1px 3px 0 rgba(0, 0, 0, 0.1));
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/* Dark mode body class support */
|
|
158
|
-
body.theme-dark {
|
|
159
|
-
color-scheme: dark;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
body.theme-light {
|
|
163
|
-
color-scheme: light;
|
|
164
|
-
}
|
|
3
|
+
/* All theme variables are provided by @asafarim/design-tokens */
|
|
4
|
+
/* No custom --theme- variables to avoid conflicts */
|
|
165
5
|
|
|
166
6
|
/* Smooth transitions for theme changes */
|
|
167
7
|
* {
|
|
168
|
-
transition: background-color var(--
|
|
169
|
-
color var(--
|
|
170
|
-
border-color var(--
|
|
8
|
+
transition: background-color var(--asm-motion-duration-normal) var(--asm-motion-easing-standard),
|
|
9
|
+
color var(--asm-motion-duration-normal) var(--asm-motion-easing-standard),
|
|
10
|
+
border-color var(--asm-motion-duration-normal) var(--asm-motion-easing-standard);
|
|
171
11
|
}
|
|
172
12
|
|
|
173
13
|
/* Remove transitions for users who prefer reduced motion */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asafarim/react-themes",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.9",
|
|
4
4
|
"description": "A comprehensive theme management system for React applications with automatic dark/light mode detection, custom theme creation, and smooth transitions.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -87,7 +87,8 @@
|
|
|
87
87
|
]
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"lucide-react": "^0.562.0"
|
|
90
|
+
"lucide-react": "^0.562.0",
|
|
91
|
+
"@asafarim/design-tokens": "^0.5.0"
|
|
91
92
|
},
|
|
92
93
|
"scripts": {
|
|
93
94
|
"build": "tsup && pnpm run copy-assets",
|