@tolle_/tolle-ui 0.0.3-beta → 0.0.5-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.
- package/esm2022/lib/theme.service.mjs +19 -7
- package/esm2022/lib/tolle-config.mjs +8 -4
- package/fesm2022/tolle_-tolle-ui.mjs +25 -9
- package/fesm2022/tolle_-tolle-ui.mjs.map +1 -1
- package/lib/theme.service.d.ts +9 -1
- package/package.json +20 -14
- package/theme.css +69 -103
package/lib/theme.service.d.ts
CHANGED
|
@@ -10,10 +10,18 @@ export declare class ThemeService {
|
|
|
10
10
|
isDark$: import("rxjs").Observable<boolean>;
|
|
11
11
|
constructor(document: Document, platformId: Object, config: TolleConfig, rendererFactory: RendererFactory2);
|
|
12
12
|
private initializeTheme;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Applies the brand identity variables.
|
|
15
|
+
* These are applied to :root (html) so they ripple through all color-mix functions.
|
|
16
|
+
*/
|
|
17
|
+
applyBrandConfig(config: TolleConfig): void;
|
|
14
18
|
toggleTheme(): void;
|
|
15
19
|
private enableDarkMode;
|
|
16
20
|
private disableDarkMode;
|
|
21
|
+
/**
|
|
22
|
+
* Helper to get current state for components that might need JS-based logic
|
|
23
|
+
*/
|
|
24
|
+
get currentTheme(): 'dark' | 'light';
|
|
17
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, [null, null, { optional: true; }, null]>;
|
|
18
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
19
27
|
}
|
package/package.json
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolle_/tolle-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5-beta",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
+
"exports": {
|
|
8
|
+
"./theme.css": {
|
|
9
|
+
"default": "./theme.css"
|
|
10
|
+
},
|
|
11
|
+
"./package.json": {
|
|
12
|
+
"default": "./package.json"
|
|
13
|
+
},
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"esm2022": "./esm2022/tolle_-tolle-ui.mjs",
|
|
17
|
+
"esm": "./esm2022/tolle_-tolle-ui.mjs",
|
|
18
|
+
"default": "./fesm2022/tolle_-tolle-ui.mjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
7
21
|
"description": "A high-performance Angular UI library.",
|
|
8
22
|
"author": "Bernard Kojo Ossei-Agyei <bernard.ossei@gmail.com>",
|
|
9
23
|
"license": "MIT",
|
|
10
24
|
"peerDependencies": {
|
|
11
25
|
"@angular/common": "^18.2.0",
|
|
12
26
|
"@angular/core": "^18.2.0",
|
|
13
|
-
"@floating-ui/dom": "^1.7.4"
|
|
27
|
+
"@floating-ui/dom": "^1.7.4",
|
|
28
|
+
"class-variance-authority": "^0.7.1",
|
|
29
|
+
"tailwind-merge": "^3.4.0",
|
|
30
|
+
"clsx": "^2.1.1"
|
|
14
31
|
},
|
|
15
32
|
"dependencies": {
|
|
16
33
|
"tslib": "^2.3.0"
|
|
17
34
|
},
|
|
18
35
|
"sideEffects": false,
|
|
19
36
|
"module": "fesm2022/tolle_-tolle-ui.mjs",
|
|
20
|
-
"typings": "index.d.ts"
|
|
21
|
-
"exports": {
|
|
22
|
-
"./package.json": {
|
|
23
|
-
"default": "./package.json"
|
|
24
|
-
},
|
|
25
|
-
".": {
|
|
26
|
-
"types": "./index.d.ts",
|
|
27
|
-
"esm2022": "./esm2022/tolle_-tolle-ui.mjs",
|
|
28
|
-
"esm": "./esm2022/tolle_-tolle-ui.mjs",
|
|
29
|
-
"default": "./fesm2022/tolle_-tolle-ui.mjs"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
37
|
+
"typings": "index.d.ts"
|
|
32
38
|
}
|
package/theme.css
CHANGED
|
@@ -1,120 +1,91 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* -------------------------------------------------------------------------- */
|
|
2
|
+
/* 1. TAILWIND & CDK CORE IMPORTS */
|
|
3
|
+
/* -------------------------------------------------------------------------- */
|
|
2
4
|
@tailwind base;
|
|
3
5
|
@tailwind components;
|
|
4
6
|
@tailwind utilities;
|
|
5
7
|
|
|
8
|
+
/* -------------------------------------------------------------------------- */
|
|
9
|
+
/* 2. THEME VARIABLES (The Engine) */
|
|
10
|
+
/* -------------------------------------------------------------------------- */
|
|
6
11
|
:root {
|
|
7
|
-
/* ---
|
|
8
|
-
/* Blue-600 as default primary */
|
|
12
|
+
/* --- Configuration (Source of Truth) --- */
|
|
9
13
|
--primary: #2563eb;
|
|
10
14
|
--radius: 0.5rem;
|
|
11
15
|
|
|
12
|
-
/* ---
|
|
13
|
-
|
|
14
|
-
/* Foreground: White text on primary */
|
|
16
|
+
/* --- Auto-Generated Colors (Dependent on --primary) --- */
|
|
15
17
|
--primary-foreground: #ffffff;
|
|
16
|
-
/* Secondary: Mix Primary with 85% White */
|
|
17
18
|
--secondary: color-mix(in srgb, var(--primary), #ffffff 85%);
|
|
18
19
|
--secondary-foreground: color-mix(in srgb, var(--primary), #000000 80%);
|
|
19
20
|
|
|
20
|
-
/* Muted: Mix Primary with 92% Light Gray */
|
|
21
21
|
--muted: color-mix(in srgb, var(--primary), #f3f4f6 92%);
|
|
22
|
-
--muted-foreground: color-mix(in srgb, var(--primary), #4b5563 40%);
|
|
23
|
-
|
|
24
|
-
/* Accent: Very light wash of primary (for hovers) */
|
|
22
|
+
--muted-foreground: color-mix(in srgb, var(--primary), #4b5563 40%); /* Fixed double definition */
|
|
23
|
+
|
|
25
24
|
--accent: color-mix(in srgb, var(--primary), transparent 90%);
|
|
26
25
|
--accent-foreground: var(--primary);
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
--border: #dddddd;
|
|
30
|
-
--input: #e4e4e7;
|
|
27
|
+
--ring: color-mix(in srgb, var(--primary), transparent 75%);
|
|
31
28
|
|
|
32
|
-
/* Base */
|
|
29
|
+
/* --- Neutral/Layout Base --- */
|
|
33
30
|
--background: #ffffff;
|
|
34
31
|
--foreground: #020817;
|
|
35
|
-
--
|
|
32
|
+
--border: #dddddd;
|
|
33
|
+
--input: #e4e4e7;
|
|
36
34
|
--destructive: #ef4444;
|
|
37
35
|
--destructive-foreground: #f8fafc;
|
|
38
36
|
--input-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
39
37
|
}
|
|
40
38
|
|
|
39
|
+
/* --- Dark Mode (Google/Charcoal Palette) --- */
|
|
41
40
|
.dark {
|
|
42
|
-
|
|
43
|
-
--
|
|
44
|
-
--foreground: #e3e3e3; /* Soft white/gray text */
|
|
45
|
-
|
|
46
|
-
/* Secondary: Elevated surface (Google's "Surface" color) */
|
|
41
|
+
--background: #121212;
|
|
42
|
+
--foreground: #e3e3e3;
|
|
47
43
|
--secondary: #1f1f1f;
|
|
48
44
|
--secondary-foreground: #ffffff;
|
|
49
|
-
|
|
50
|
-
/* Muted: Used for tags or inactive backgrounds */
|
|
51
45
|
--muted: #2a2a2a;
|
|
52
|
-
--muted-foreground: #9aa0a6;
|
|
53
|
-
|
|
54
|
-
/* Borders: Very subtle against the charcoal background */
|
|
46
|
+
--muted-foreground: #9aa0a6;
|
|
55
47
|
--border: #3c4043;
|
|
56
48
|
--input: #3c4043;
|
|
57
|
-
|
|
58
|
-
/* Popover/Dropdown: Matches elevated surfaces */
|
|
59
49
|
--popover: #1f1f1f;
|
|
60
50
|
--popover-foreground: #e3e3e3;
|
|
61
|
-
|
|
62
|
-
/* Accent: Hover states */
|
|
63
51
|
--accent: rgba(255, 255, 255, 0.04);
|
|
64
52
|
--accent-foreground: var(--primary);
|
|
65
|
-
|
|
66
|
-
/* Primary Ring: Lower opacity for charcoal backgrounds */
|
|
67
53
|
--ring: color-mix(in srgb, var(--primary), transparent 40%);
|
|
68
54
|
--input-shadow: 0 0 #0000;
|
|
69
55
|
}
|
|
70
56
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.dark tolle-input, .dark tolle-select button {
|
|
77
|
-
background-color: transparent; /* Google inputs often have a transparent or very dark base */
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
tolle-button svg {
|
|
81
|
-
@apply w-4 h-4; /* Default Lucide/Radix icon size */
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.h-8 svg {
|
|
85
|
-
@apply w-3.5 h-3.5;
|
|
86
|
-
}
|
|
87
|
-
|
|
57
|
+
/* -------------------------------------------------------------------------- */
|
|
58
|
+
/* 3. BASE LAYER (Icons & Typography) */
|
|
59
|
+
/* -------------------------------------------------------------------------- */
|
|
88
60
|
@layer base {
|
|
89
|
-
/*
|
|
61
|
+
/* Remix Icons Standardization */
|
|
90
62
|
i[class^="ri-"], i[class*=" ri-"] {
|
|
91
63
|
display: inline-flex;
|
|
92
64
|
align-items: center;
|
|
93
65
|
justify-content: center;
|
|
94
66
|
vertical-align: middle;
|
|
95
67
|
line-height: 1;
|
|
96
|
-
/* Standardized icon size for buttons/inputs */
|
|
97
68
|
font-size: 1.2rem;
|
|
98
69
|
}
|
|
99
70
|
|
|
100
|
-
/*
|
|
71
|
+
/* Scale icons for XS/SM containers */
|
|
72
|
+
.size-xs i[class^="ri-"], .size-xs i[class*=" ri-"],
|
|
73
|
+
.size-sm i[class^="ri-"], .size-sm i[class*=" ri-"] {
|
|
74
|
+
font-size: 1rem;
|
|
75
|
+
}
|
|
76
|
+
|
|
101
77
|
.tolle-button-content {
|
|
102
78
|
display: flex;
|
|
103
79
|
align-items: center;
|
|
104
80
|
gap: 0.5rem;
|
|
105
81
|
}
|
|
106
|
-
|
|
107
|
-
/* Scale icons down for XS and SM containers */
|
|
108
|
-
.size-xs i[class^="ri-"],
|
|
109
|
-
.size-xs i[class*=" ri-"],
|
|
110
|
-
.size-sm i[class^="ri-"],
|
|
111
|
-
.size-sm i[class*=" ri-"] {
|
|
112
|
-
font-size: 1rem;
|
|
113
|
-
}
|
|
114
82
|
}
|
|
115
83
|
|
|
84
|
+
/* -------------------------------------------------------------------------- */
|
|
85
|
+
/* 4. COMPONENT OVERRIDES */
|
|
86
|
+
/* -------------------------------------------------------------------------- */
|
|
116
87
|
@layer components {
|
|
117
|
-
/*
|
|
88
|
+
/* Interactive Element Transitions */
|
|
118
89
|
tolle-input input,
|
|
119
90
|
tolle-select button,
|
|
120
91
|
tolle-masked-input input,
|
|
@@ -123,41 +94,35 @@ tolle-button svg {
|
|
|
123
94
|
transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
124
95
|
}
|
|
125
96
|
|
|
126
|
-
/* Remove shadow on focus to let the 'ring' effect take over cleanly */
|
|
127
97
|
tolle-input input:focus,
|
|
128
98
|
tolle-select button:focus,
|
|
129
99
|
tolle-masked-input input:focus {
|
|
130
100
|
box-shadow: 0 0 #0000;
|
|
131
101
|
}
|
|
132
|
-
}
|
|
133
102
|
|
|
134
|
-
/*
|
|
135
|
-
.
|
|
136
|
-
|
|
103
|
+
/* Dark Mode specific component adjustments */
|
|
104
|
+
.dark tolle-card {
|
|
105
|
+
background-color: var(--secondary);
|
|
106
|
+
border-color: var(--border);
|
|
107
|
+
}
|
|
137
108
|
|
|
109
|
+
.dark tolle-input,
|
|
110
|
+
.dark tolle-select button {
|
|
111
|
+
background-color: transparent;
|
|
112
|
+
}
|
|
138
113
|
|
|
114
|
+
/* Icon sizing inside buttons */
|
|
115
|
+
tolle-button svg { @apply w-4 h-4; }
|
|
116
|
+
.h-8 svg { @apply w-3.5 h-3.5; }
|
|
139
117
|
|
|
140
|
-
/*
|
|
141
|
-
.
|
|
142
|
-
|
|
143
|
-
top: 0;
|
|
144
|
-
left: 0;
|
|
145
|
-
right: 0;
|
|
146
|
-
bottom: 0;
|
|
147
|
-
pointer-events: auto;
|
|
148
|
-
-webkit-tap-highlight-color: transparent;
|
|
149
|
-
transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
118
|
+
/* Compact Select Items */
|
|
119
|
+
.size-xs tolle-select-item > div { padding: 4px 8px 4px 32px; font-size: 12px; }
|
|
120
|
+
.size-sm tolle-select-item > div { padding: 6px 12px 6px 32px; }
|
|
150
121
|
}
|
|
151
122
|
|
|
152
|
-
/*
|
|
153
|
-
.
|
|
154
|
-
|
|
155
|
-
backdrop-filter: blur(4px);
|
|
156
|
-
z-index: 50;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
/* --- Core Overlay Container --- */
|
|
123
|
+
/* -------------------------------------------------------------------------- */
|
|
124
|
+
/* 5. CDK OVERLAY & MODAL SYSTEM (Structural) */
|
|
125
|
+
/* -------------------------------------------------------------------------- */
|
|
161
126
|
.cdk-overlay-container {
|
|
162
127
|
position: fixed;
|
|
163
128
|
z-index: 1000;
|
|
@@ -168,26 +133,33 @@ tolle-button svg {
|
|
|
168
133
|
pointer-events: none;
|
|
169
134
|
}
|
|
170
135
|
|
|
171
|
-
|
|
136
|
+
.cdk-global-overlay-wrapper {
|
|
137
|
+
display: flex;
|
|
138
|
+
position: absolute;
|
|
139
|
+
z-index: 1001;
|
|
140
|
+
top: 0;
|
|
141
|
+
left: 0;
|
|
142
|
+
width: 100%;
|
|
143
|
+
height: 100%;
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
172
147
|
.cdk-overlay-pane {
|
|
173
148
|
position: absolute;
|
|
174
149
|
pointer-events: auto;
|
|
175
150
|
box-sizing: border-box;
|
|
176
|
-
z-index: 1001;
|
|
151
|
+
z-index: 1001;
|
|
177
152
|
display: flex;
|
|
178
153
|
flex-direction: column;
|
|
179
154
|
align-items: center;
|
|
180
155
|
justify-content: center;
|
|
181
156
|
}
|
|
182
157
|
|
|
183
|
-
/*
|
|
158
|
+
/* Backdrop Styles */
|
|
184
159
|
.cdk-overlay-backdrop {
|
|
185
160
|
position: absolute;
|
|
186
|
-
top: 0;
|
|
187
|
-
|
|
188
|
-
left: 0;
|
|
189
|
-
right: 0;
|
|
190
|
-
z-index: 1000; /* Must be LOWER than the pane */
|
|
161
|
+
top: 0; bottom: 0; left: 0; right: 0;
|
|
162
|
+
z-index: 1000;
|
|
191
163
|
pointer-events: auto;
|
|
192
164
|
-webkit-tap-highlight-color: transparent;
|
|
193
165
|
transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
@@ -198,14 +170,8 @@ tolle-button svg {
|
|
|
198
170
|
opacity: 1;
|
|
199
171
|
}
|
|
200
172
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
z-index: 1001;
|
|
206
|
-
top: 0;
|
|
207
|
-
left: 0;
|
|
208
|
-
width: 100%;
|
|
209
|
-
height: 100%;
|
|
210
|
-
pointer-events: none;
|
|
173
|
+
.tolle-modal-backdrop {
|
|
174
|
+
background-color: rgba(0, 0, 0, 0.8);
|
|
175
|
+
backdrop-filter: blur(4px);
|
|
176
|
+
z-index: 50;
|
|
211
177
|
}
|