@opensourcekd/ng-common-libs 2.0.10 → 2.1.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/README.md +51 -0
- package/dist/index.cjs +369 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +215 -2
- package/dist/index.mjs +369 -10
- package/dist/index.mjs.map +1 -1
- package/dist/styles/tokens.css +311 -0
- package/package.json +5 -3
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @opensourcekd/ng-common-libs — Design Tokens
|
|
3
|
+
*
|
|
4
|
+
* CSS custom properties (variables) for consistent styling across all
|
|
5
|
+
* micro-frontends and applications that consume this library.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* In your global stylesheet (e.g. styles.css / styles.scss), add:
|
|
9
|
+
*
|
|
10
|
+
* @import '@opensourcekd/ng-common-libs/styles/tokens.css';
|
|
11
|
+
*
|
|
12
|
+
* All tokens are defined on :root so they are available globally.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
:root {
|
|
16
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
17
|
+
* COLOR PALETTE
|
|
18
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
19
|
+
|
|
20
|
+
/* Primary */
|
|
21
|
+
--color-primary-50: #eff6ff;
|
|
22
|
+
--color-primary-100: #dbeafe;
|
|
23
|
+
--color-primary-200: #bfdbfe;
|
|
24
|
+
--color-primary-300: #93c5fd;
|
|
25
|
+
--color-primary-400: #60a5fa;
|
|
26
|
+
--color-primary-500: #3b82f6;
|
|
27
|
+
--color-primary-600: #2563eb;
|
|
28
|
+
--color-primary-700: #1d4ed8;
|
|
29
|
+
--color-primary-800: #1e40af;
|
|
30
|
+
--color-primary-900: #1e3a8a;
|
|
31
|
+
--color-primary-950: #172554;
|
|
32
|
+
|
|
33
|
+
/* Secondary / Neutral */
|
|
34
|
+
--color-neutral-0: #ffffff;
|
|
35
|
+
--color-neutral-50: #f8fafc;
|
|
36
|
+
--color-neutral-100: #f1f5f9;
|
|
37
|
+
--color-neutral-200: #e2e8f0;
|
|
38
|
+
--color-neutral-300: #cbd5e1;
|
|
39
|
+
--color-neutral-400: #94a3b8;
|
|
40
|
+
--color-neutral-500: #64748b;
|
|
41
|
+
--color-neutral-600: #475569;
|
|
42
|
+
--color-neutral-700: #334155;
|
|
43
|
+
--color-neutral-800: #1e293b;
|
|
44
|
+
--color-neutral-900: #0f172a;
|
|
45
|
+
--color-neutral-950: #020617;
|
|
46
|
+
|
|
47
|
+
/* Success */
|
|
48
|
+
--color-success-50: #f0fdf4;
|
|
49
|
+
--color-success-100: #dcfce7;
|
|
50
|
+
--color-success-200: #bbf7d0;
|
|
51
|
+
--color-success-300: #86efac;
|
|
52
|
+
--color-success-400: #4ade80;
|
|
53
|
+
--color-success-500: #22c55e;
|
|
54
|
+
--color-success-600: #16a34a;
|
|
55
|
+
--color-success-700: #15803d;
|
|
56
|
+
--color-success-800: #166534;
|
|
57
|
+
--color-success-900: #14532d;
|
|
58
|
+
|
|
59
|
+
/* Warning */
|
|
60
|
+
--color-warning-50: #fffbeb;
|
|
61
|
+
--color-warning-100: #fef3c7;
|
|
62
|
+
--color-warning-200: #fde68a;
|
|
63
|
+
--color-warning-300: #fcd34d;
|
|
64
|
+
--color-warning-400: #fbbf24;
|
|
65
|
+
--color-warning-500: #f59e0b;
|
|
66
|
+
--color-warning-600: #d97706;
|
|
67
|
+
--color-warning-700: #b45309;
|
|
68
|
+
--color-warning-800: #92400e;
|
|
69
|
+
--color-warning-900: #78350f;
|
|
70
|
+
|
|
71
|
+
/* Error / Danger */
|
|
72
|
+
--color-error-50: #fef2f2;
|
|
73
|
+
--color-error-100: #fee2e2;
|
|
74
|
+
--color-error-200: #fecaca;
|
|
75
|
+
--color-error-300: #fca5a5;
|
|
76
|
+
--color-error-400: #f87171;
|
|
77
|
+
--color-error-500: #ef4444;
|
|
78
|
+
--color-error-600: #dc2626;
|
|
79
|
+
--color-error-700: #b91c1c;
|
|
80
|
+
--color-error-800: #991b1b;
|
|
81
|
+
--color-error-900: #7f1d1d;
|
|
82
|
+
|
|
83
|
+
/* Info */
|
|
84
|
+
--color-info-50: #ecfeff;
|
|
85
|
+
--color-info-100: #cffafe;
|
|
86
|
+
--color-info-200: #a5f3fc;
|
|
87
|
+
--color-info-300: #67e8f9;
|
|
88
|
+
--color-info-400: #22d3ee;
|
|
89
|
+
--color-info-500: #06b6d4;
|
|
90
|
+
--color-info-600: #0891b2;
|
|
91
|
+
--color-info-700: #0e7490;
|
|
92
|
+
--color-info-800: #155e75;
|
|
93
|
+
--color-info-900: #164e63;
|
|
94
|
+
|
|
95
|
+
/* Semantic color aliases */
|
|
96
|
+
--color-brand: var(--color-primary-600);
|
|
97
|
+
--color-brand-hover: var(--color-primary-700);
|
|
98
|
+
--color-brand-active: var(--color-primary-800);
|
|
99
|
+
--color-brand-subtle: var(--color-primary-50);
|
|
100
|
+
|
|
101
|
+
--color-text-primary: var(--color-neutral-900);
|
|
102
|
+
--color-text-secondary: var(--color-neutral-600);
|
|
103
|
+
--color-text-disabled: var(--color-neutral-400);
|
|
104
|
+
--color-text-inverse: var(--color-neutral-0);
|
|
105
|
+
--color-text-on-brand: var(--color-neutral-0);
|
|
106
|
+
|
|
107
|
+
--color-bg-page: var(--color-neutral-50);
|
|
108
|
+
--color-bg-surface: var(--color-neutral-0);
|
|
109
|
+
--color-bg-overlay: var(--color-neutral-100);
|
|
110
|
+
--color-bg-disabled: var(--color-neutral-200);
|
|
111
|
+
|
|
112
|
+
--color-border-default: var(--color-neutral-200);
|
|
113
|
+
--color-border-strong: var(--color-neutral-400);
|
|
114
|
+
--color-border-focus: var(--color-primary-500);
|
|
115
|
+
|
|
116
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
117
|
+
* TYPOGRAPHY
|
|
118
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
119
|
+
|
|
120
|
+
/* Font families */
|
|
121
|
+
--font-family-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
122
|
+
--font-family-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
123
|
+
--font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
124
|
+
|
|
125
|
+
/* Base font */
|
|
126
|
+
--font-family-base: var(--font-family-sans);
|
|
127
|
+
--font-family-code: var(--font-family-mono);
|
|
128
|
+
|
|
129
|
+
/* Font sizes (rem) */
|
|
130
|
+
--font-size-xs: 0.75rem; /* 12px */
|
|
131
|
+
--font-size-sm: 0.875rem; /* 14px */
|
|
132
|
+
--font-size-md: 1rem; /* 16px */
|
|
133
|
+
--font-size-lg: 1.125rem; /* 18px */
|
|
134
|
+
--font-size-xl: 1.25rem; /* 20px */
|
|
135
|
+
--font-size-2xl: 1.5rem; /* 24px */
|
|
136
|
+
--font-size-3xl: 1.875rem; /* 30px */
|
|
137
|
+
--font-size-4xl: 2.25rem; /* 36px */
|
|
138
|
+
--font-size-5xl: 3rem; /* 48px */
|
|
139
|
+
--font-size-6xl: 3.75rem; /* 60px */
|
|
140
|
+
|
|
141
|
+
/* Font weights */
|
|
142
|
+
--font-weight-thin: 100;
|
|
143
|
+
--font-weight-extralight: 200;
|
|
144
|
+
--font-weight-light: 300;
|
|
145
|
+
--font-weight-normal: 400;
|
|
146
|
+
--font-weight-medium: 500;
|
|
147
|
+
--font-weight-semibold: 600;
|
|
148
|
+
--font-weight-bold: 700;
|
|
149
|
+
--font-weight-extrabold: 800;
|
|
150
|
+
--font-weight-black: 900;
|
|
151
|
+
|
|
152
|
+
/* Line heights */
|
|
153
|
+
--line-height-none: 1;
|
|
154
|
+
--line-height-tight: 1.25;
|
|
155
|
+
--line-height-snug: 1.375;
|
|
156
|
+
--line-height-normal: 1.5;
|
|
157
|
+
--line-height-relaxed: 1.625;
|
|
158
|
+
--line-height-loose: 2;
|
|
159
|
+
|
|
160
|
+
/* Letter spacing */
|
|
161
|
+
--letter-spacing-tighter: -0.05em;
|
|
162
|
+
--letter-spacing-tight: -0.025em;
|
|
163
|
+
--letter-spacing-normal: 0em;
|
|
164
|
+
--letter-spacing-wide: 0.025em;
|
|
165
|
+
--letter-spacing-wider: 0.05em;
|
|
166
|
+
--letter-spacing-widest: 0.1em;
|
|
167
|
+
|
|
168
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
169
|
+
* SPACING
|
|
170
|
+
* Follows a 4px base grid (0.25rem per unit).
|
|
171
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
172
|
+
|
|
173
|
+
--space-0: 0;
|
|
174
|
+
--space-px: 1px;
|
|
175
|
+
--space-0-5: 0.125rem; /* 2px */
|
|
176
|
+
--space-1: 0.25rem; /* 4px */
|
|
177
|
+
--space-1-5: 0.375rem; /* 6px */
|
|
178
|
+
--space-2: 0.5rem; /* 8px */
|
|
179
|
+
--space-2-5: 0.625rem; /* 10px */
|
|
180
|
+
--space-3: 0.75rem; /* 12px */
|
|
181
|
+
--space-3-5: 0.875rem; /* 14px */
|
|
182
|
+
--space-4: 1rem; /* 16px */
|
|
183
|
+
--space-5: 1.25rem; /* 20px */
|
|
184
|
+
--space-6: 1.5rem; /* 24px */
|
|
185
|
+
--space-7: 1.75rem; /* 28px */
|
|
186
|
+
--space-8: 2rem; /* 32px */
|
|
187
|
+
--space-9: 2.25rem; /* 36px */
|
|
188
|
+
--space-10: 2.5rem; /* 40px */
|
|
189
|
+
--space-11: 2.75rem; /* 44px */
|
|
190
|
+
--space-12: 3rem; /* 48px */
|
|
191
|
+
--space-14: 3.5rem; /* 56px */
|
|
192
|
+
--space-16: 4rem; /* 64px */
|
|
193
|
+
--space-20: 5rem; /* 80px */
|
|
194
|
+
--space-24: 6rem; /* 96px */
|
|
195
|
+
--space-28: 7rem; /* 112px */
|
|
196
|
+
--space-32: 8rem; /* 128px */
|
|
197
|
+
--space-36: 9rem; /* 144px */
|
|
198
|
+
--space-40: 10rem; /* 160px */
|
|
199
|
+
--space-44: 11rem; /* 176px */
|
|
200
|
+
--space-48: 12rem; /* 192px */
|
|
201
|
+
--space-52: 13rem; /* 208px */
|
|
202
|
+
--space-56: 14rem; /* 224px */
|
|
203
|
+
--space-60: 15rem; /* 240px */
|
|
204
|
+
--space-64: 16rem; /* 256px */
|
|
205
|
+
--space-72: 18rem; /* 288px */
|
|
206
|
+
--space-80: 20rem; /* 320px */
|
|
207
|
+
--space-96: 24rem; /* 384px */
|
|
208
|
+
|
|
209
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
210
|
+
* BORDER RADIUS
|
|
211
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
212
|
+
|
|
213
|
+
--radius-none: 0;
|
|
214
|
+
--radius-sm: 0.125rem; /* 2px */
|
|
215
|
+
--radius-md: 0.375rem; /* 6px */
|
|
216
|
+
--radius-lg: 0.5rem; /* 8px */
|
|
217
|
+
--radius-xl: 0.75rem; /* 12px */
|
|
218
|
+
--radius-2xl: 1rem; /* 16px */
|
|
219
|
+
--radius-3xl: 1.5rem; /* 24px */
|
|
220
|
+
--radius-full: 9999px;
|
|
221
|
+
|
|
222
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
223
|
+
* SHADOWS
|
|
224
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
225
|
+
|
|
226
|
+
--shadow-none: none;
|
|
227
|
+
--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
228
|
+
--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.10), 0 1px 2px -1px rgb(0 0 0 / 0.10);
|
|
229
|
+
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10);
|
|
230
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10);
|
|
231
|
+
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.10), 0 8px 10px -6px rgb(0 0 0 / 0.10);
|
|
232
|
+
--shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
233
|
+
--shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
|
|
234
|
+
--shadow-focus: 0 0 0 3px rgb(59 130 246 / 0.45);
|
|
235
|
+
|
|
236
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
237
|
+
* Z-INDEX
|
|
238
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
239
|
+
|
|
240
|
+
--z-index-hide: -1;
|
|
241
|
+
--z-index-base: 0;
|
|
242
|
+
--z-index-raised: 1;
|
|
243
|
+
--z-index-dropdown: 1000;
|
|
244
|
+
--z-index-sticky: 1100;
|
|
245
|
+
--z-index-banner: 1200;
|
|
246
|
+
--z-index-overlay: 1300;
|
|
247
|
+
--z-index-modal: 1400;
|
|
248
|
+
--z-index-popover: 1500;
|
|
249
|
+
--z-index-toast: 1600;
|
|
250
|
+
--z-index-tooltip: 1700;
|
|
251
|
+
|
|
252
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
253
|
+
* TRANSITIONS & ANIMATIONS
|
|
254
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
255
|
+
|
|
256
|
+
/* Durations */
|
|
257
|
+
--duration-instant: 0ms;
|
|
258
|
+
--duration-fast: 100ms;
|
|
259
|
+
--duration-normal: 200ms;
|
|
260
|
+
--duration-slow: 300ms;
|
|
261
|
+
--duration-slower: 500ms;
|
|
262
|
+
--duration-slowest: 700ms;
|
|
263
|
+
|
|
264
|
+
/* Easing functions */
|
|
265
|
+
--easing-linear: linear;
|
|
266
|
+
--easing-ease: ease;
|
|
267
|
+
--easing-ease-in: ease-in;
|
|
268
|
+
--easing-ease-out: ease-out;
|
|
269
|
+
--easing-ease-in-out: ease-in-out;
|
|
270
|
+
--easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
271
|
+
|
|
272
|
+
/* Shorthand transition presets */
|
|
273
|
+
--transition-fast: all var(--duration-fast) var(--easing-ease-in-out);
|
|
274
|
+
--transition-normal: all var(--duration-normal) var(--easing-ease-in-out);
|
|
275
|
+
--transition-slow: all var(--duration-slow) var(--easing-ease-in-out);
|
|
276
|
+
--transition-colors: color var(--duration-normal) var(--easing-ease-in-out),
|
|
277
|
+
background-color var(--duration-normal) var(--easing-ease-in-out),
|
|
278
|
+
border-color var(--duration-normal) var(--easing-ease-in-out);
|
|
279
|
+
|
|
280
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
281
|
+
* BREAKPOINTS
|
|
282
|
+
* Note: CSS custom properties cannot be used in media query conditions.
|
|
283
|
+
* These are provided as reference values and for use in JS via getComputedStyle.
|
|
284
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
285
|
+
|
|
286
|
+
--breakpoint-sm: 640px;
|
|
287
|
+
--breakpoint-md: 768px;
|
|
288
|
+
--breakpoint-lg: 1024px;
|
|
289
|
+
--breakpoint-xl: 1280px;
|
|
290
|
+
--breakpoint-2xl: 1536px;
|
|
291
|
+
|
|
292
|
+
/* ─────────────────────────────────────────────────────────────────────────
|
|
293
|
+
* OPACITY
|
|
294
|
+
* ───────────────────────────────────────────────────────────────────────── */
|
|
295
|
+
|
|
296
|
+
--opacity-0: 0;
|
|
297
|
+
--opacity-5: 0.05;
|
|
298
|
+
--opacity-10: 0.1;
|
|
299
|
+
--opacity-20: 0.2;
|
|
300
|
+
--opacity-25: 0.25;
|
|
301
|
+
--opacity-30: 0.3;
|
|
302
|
+
--opacity-40: 0.4;
|
|
303
|
+
--opacity-50: 0.5;
|
|
304
|
+
--opacity-60: 0.6;
|
|
305
|
+
--opacity-70: 0.7;
|
|
306
|
+
--opacity-75: 0.75;
|
|
307
|
+
--opacity-80: 0.8;
|
|
308
|
+
--opacity-90: 0.9;
|
|
309
|
+
--opacity-95: 0.95;
|
|
310
|
+
--opacity-100: 1;
|
|
311
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensourcekd/ng-common-libs",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Angular 18 shareable utility library with framework-agnostic core and Angular wrappers for event emitter, authorization, storage, and more",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -31,14 +31,16 @@
|
|
|
31
31
|
"import": "./dist/index.mjs",
|
|
32
32
|
"require": "./dist/index.cjs",
|
|
33
33
|
"types": "./dist/index.d.ts"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"./styles/tokens.css": "./dist/styles/tokens.css"
|
|
35
36
|
},
|
|
36
37
|
"files": [
|
|
37
38
|
"dist"
|
|
38
39
|
],
|
|
39
40
|
"scripts": {
|
|
40
41
|
"clean": "rimraf dist",
|
|
41
|
-
"
|
|
42
|
+
"copy:css": "node -e \"const{mkdirSync,copyFileSync}=require('fs');mkdirSync('dist/styles',{recursive:true});copyFileSync('src/styles/tokens.css','dist/styles/tokens.css');\"",
|
|
43
|
+
"build": "npm run clean && rollup -c && npm run copy:css",
|
|
42
44
|
"lint": "eslint .",
|
|
43
45
|
"test": "jest",
|
|
44
46
|
"test:watch": "jest --watch",
|