@pegasusheavy/ngx-tailwindcss 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,9 +1,18 @@
1
1
  {
2
2
  "name": "@pegasusheavy/ngx-tailwindcss",
3
- "version": "0.1.0",
4
- "type": "module",
3
+ "version": "0.1.1",
5
4
  "description": "A highly customizable Angular component library for Tailwind CSS 4+. Build beautiful, accessible UI components with full theming support, intelligent class merging, and zero bundled CSS. Features 30+ components including buttons, cards, modals, forms, tables, and more.",
6
5
  "license": "MIT",
6
+ "exports": {
7
+ "./styles/theme.css": "./styles/theme.css",
8
+ "./package.json": {
9
+ "default": "./package.json"
10
+ },
11
+ ".": {
12
+ "types": "./types/pegasusheavy-ngx-tailwindcss.d.ts",
13
+ "default": "./fesm2022/pegasusheavy-ngx-tailwindcss.mjs"
14
+ }
15
+ },
7
16
  "author": {
8
17
  "name": "Pegasus Heavy Industries LLC",
9
18
  "url": "https://pegasusheavy.github.io/ngx-tailwindcss"
@@ -16,6 +25,13 @@
16
25
  "bugs": {
17
26
  "url": "https://github.com/pegasusheavy/ngx-tailwindcss/issues"
18
27
  },
28
+ "publishConfig": {
29
+ "access": "public",
30
+ "registry": "https://registry.npmjs.org/"
31
+ },
32
+ "engines": {
33
+ "node": ">=18.0.0"
34
+ },
19
35
  "keywords": [
20
36
  "angular",
21
37
  "tailwindcss",
@@ -68,77 +84,16 @@
68
84
  "stepper"
69
85
  ],
70
86
  "peerDependencies": {
71
- "@angular/animations": "^19.0.0 || ^20.0.0 || ^21.0.0",
72
- "@angular/cdk": "^19.0.0 || ^20.0.0 || ^21.0.0",
73
87
  "@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0",
74
88
  "@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0",
75
- "@angular/forms": "^19.0.0 || ^20.0.0 || ^21.0.0"
76
- },
77
- "devDependencies": {
78
- "@analogjs/vite-plugin-angular": "^2.1.3",
79
- "@angular-devkit/build-angular": "^20.0.0",
80
- "@angular/animations": "^20.0.0",
81
- "@angular/build": "^20.0.0",
82
- "@angular/cdk": "^20.0.0",
83
- "@angular/cli": "^20.0.0",
84
- "@angular/common": "^20.0.0",
85
- "@angular/compiler": "^20.0.0",
86
- "@angular/compiler-cli": "^20.0.0",
87
- "@angular/core": "^20.0.0",
88
- "@angular/forms": "^20.0.0",
89
- "@angular/platform-browser": "^20.0.0",
90
- "@angular/platform-browser-dynamic": "^20.0.0",
91
- "@eslint/js": "^9.0.0",
92
- "@pegasusheavy/eslint-typescript-access": "^1.0.0",
93
- "@testing-library/angular": "^17.0.0",
94
- "@testing-library/dom": "^10.0.0",
95
- "@testing-library/jest-dom": "^6.0.0",
96
- "@testing-library/user-event": "^14.0.0",
97
- "@typescript-eslint/eslint-plugin": "^8.0.0",
98
- "@typescript-eslint/parser": "^8.0.0",
99
- "@typescript-eslint/utils": "^8.0.0",
100
- "@vitest/coverage-v8": "^3.0.0",
101
- "angular-eslint": "^19.0.0",
102
- "concurrently": "^9.0.0",
103
- "eslint": "^9.0.0",
104
- "eslint-config-prettier": "^9.1.0",
105
- "eslint-plugin-jsdoc": "^50.0.0",
106
- "eslint-plugin-unicorn": "^56.0.0",
107
- "jsdom": "^26.0.0",
108
- "ng-packagr": "^20.0.0",
109
- "prettier": "^3.4.0",
110
- "rxjs": "~7.8.0",
111
- "tslib": "^2.6.0",
112
- "typescript": "~5.8.0",
113
- "typescript-eslint": "^8.0.0",
114
- "vitest": "^3.0.0",
115
- "zone.js": "~0.15.0",
116
- "@commitlint/cli": "^18.1.0",
117
- "@commitlint/config-conventional": "^18.0.0",
118
- "husky": "^9.0.0"
119
- },
120
- "exports": {
121
- ".": {
122
- "types": "./index.d.ts",
123
- "default": "./fesm2022/pegasus-heavy-ngx-tailwindcss.mjs"
124
- }
89
+ "@angular/cdk": "^19.0.0 || ^20.0.0 || ^21.0.0",
90
+ "@angular/forms": "^19.0.0 || ^20.0.0 || ^21.0.0",
91
+ "@angular/animations": "^19.0.0 || ^20.0.0 || ^21.0.0"
125
92
  },
126
93
  "sideEffects": false,
127
- "scripts": {
128
- "ng": "ng",
129
- "build": "ng build ngx-tailwindcss --configuration production",
130
- "build:watch": "ng build ngx-tailwindcss --watch",
131
- "dev": "concurrently -n lib,docs -c cyan,green \"pnpm run build:watch\" \"pnpm run docs:dev\"",
132
- "docs:dev": "cd docs && pnpm run dev",
133
- "docs:start": "cd docs && pnpm run start",
134
- "test": "vitest",
135
- "test:run": "vitest run",
136
- "test:coverage": "vitest run --coverage",
137
- "test:ui": "vitest --ui",
138
- "lint": "eslint projects/",
139
- "lint:fix": "eslint projects/ --fix",
140
- "format": "prettier --write \"projects/**/*.{ts,html,scss,css,json}\"",
141
- "format:check": "prettier --check \"projects/**/*.{ts,html,scss,css,json}\"",
142
- "commitlint": "commitlint"
94
+ "module": "fesm2022/pegasusheavy-ngx-tailwindcss.mjs",
95
+ "typings": "types/pegasusheavy-ngx-tailwindcss.d.ts",
96
+ "dependencies": {
97
+ "tslib": "^2.3.0"
143
98
  }
144
99
  }
@@ -0,0 +1,362 @@
1
+ /**
2
+ * ngx-tailwindcss Theme System
3
+ *
4
+ * This file provides CSS custom properties (variables) for theming the component library.
5
+ * The library uses Tailwind CSS classes by default, but you can override colors using
6
+ * these CSS variables.
7
+ *
8
+ * USAGE:
9
+ * ======
10
+ * 1. Import this file in your application's global styles:
11
+ *
12
+ * @import '@pegasus-heavy/ngx-tailwindcss/styles/theme.css';
13
+ *
14
+ * 2. Override any variables in your own CSS to customize colors:
15
+ *
16
+ * :root {
17
+ * --tw-color-primary: #6366f1;
18
+ * --tw-color-primary-hover: #4f46e5;
19
+ * }
20
+ *
21
+ * .dark {
22
+ * --tw-color-primary: #818cf8;
23
+ * --tw-color-primary-hover: #a5b4fc;
24
+ * }
25
+ *
26
+ * DARK MODE:
27
+ * ==========
28
+ * The library supports dark mode via the 'dark' class on the <html> element.
29
+ * Use the TwThemeService or your own implementation to toggle dark mode:
30
+ *
31
+ * // In your app
32
+ * document.documentElement.classList.toggle('dark');
33
+ *
34
+ * Or use the provided service:
35
+ *
36
+ * import { TwThemeService } from '@pegasus-heavy/ngx-tailwindcss';
37
+ * themeService.setColorMode('dark');
38
+ *
39
+ * CUSTOMIZATION LEVELS:
40
+ * =====================
41
+ * 1. CSS Variables (this file) - Override semantic colors
42
+ * 2. Tailwind Config - Extend/override Tailwind's color palette
43
+ * 3. Component Props - Use classOverride/classReplace on individual components
44
+ * 4. TwThemeService - Programmatically set theme at runtime
45
+ */
46
+
47
+ :root {
48
+ /* =====================================================
49
+ BRAND COLORS
50
+ These are semantic color tokens. Override these to
51
+ change colors throughout the library.
52
+ ===================================================== */
53
+
54
+ /* Primary - Main brand color used for primary actions, links, focus states */
55
+ --tw-color-primary: #3b82f6;
56
+ --tw-color-primary-hover: #2563eb;
57
+ --tw-color-primary-active: #1d4ed8;
58
+ --tw-color-primary-light: #dbeafe;
59
+ --tw-color-primary-dark: #1e40af;
60
+
61
+ /* Secondary - Used for secondary actions and less prominent UI elements */
62
+ --tw-color-secondary: #64748b;
63
+ --tw-color-secondary-hover: #475569;
64
+ --tw-color-secondary-active: #334155;
65
+ --tw-color-secondary-light: #f1f5f9;
66
+ --tw-color-secondary-dark: #1e293b;
67
+
68
+ /* =====================================================
69
+ SEMANTIC COLORS
70
+ ===================================================== */
71
+
72
+ /* Success - Positive actions, confirmations, success states */
73
+ --tw-color-success: #10b981;
74
+ --tw-color-success-hover: #059669;
75
+ --tw-color-success-bg: #ecfdf5;
76
+ --tw-color-success-text: #065f46;
77
+ --tw-color-success-border: #a7f3d0;
78
+
79
+ /* Warning - Cautionary states, warnings */
80
+ --tw-color-warning: #f59e0b;
81
+ --tw-color-warning-hover: #d97706;
82
+ --tw-color-warning-bg: #fffbeb;
83
+ --tw-color-warning-text: #92400e;
84
+ --tw-color-warning-border: #fcd34d;
85
+
86
+ /* Danger - Destructive actions, errors, critical states */
87
+ --tw-color-danger: #ef4444;
88
+ --tw-color-danger-hover: #dc2626;
89
+ --tw-color-danger-bg: #fef2f2;
90
+ --tw-color-danger-text: #991b1b;
91
+ --tw-color-danger-border: #fecaca;
92
+
93
+ /* Info - Informational content, help text */
94
+ --tw-color-info: #06b6d4;
95
+ --tw-color-info-hover: #0891b2;
96
+ --tw-color-info-bg: #ecfeff;
97
+ --tw-color-info-text: #155e75;
98
+ --tw-color-info-border: #a5f3fc;
99
+
100
+ /* =====================================================
101
+ NEUTRAL PALETTE
102
+ ===================================================== */
103
+
104
+ /* Background - Page and container backgrounds */
105
+ --tw-color-background: #ffffff;
106
+ --tw-color-background-alt: #f8fafc;
107
+
108
+ /* Surface - Card, modal, dropdown backgrounds */
109
+ --tw-color-surface: #ffffff;
110
+ --tw-color-surface-alt: #f1f5f9;
111
+ --tw-color-surface-hover: #f8fafc;
112
+
113
+ /* =====================================================
114
+ TEXT COLORS
115
+ ===================================================== */
116
+
117
+ --tw-color-text: #0f172a;
118
+ --tw-color-text-secondary: #475569;
119
+ --tw-color-text-muted: #94a3b8;
120
+ --tw-color-text-disabled: #cbd5e1;
121
+ --tw-color-text-inverse: #ffffff;
122
+ --tw-color-text-link: var(--tw-color-primary);
123
+ --tw-color-text-link-hover: var(--tw-color-primary-hover);
124
+
125
+ /* =====================================================
126
+ BORDER COLORS
127
+ ===================================================== */
128
+
129
+ --tw-color-border: #e2e8f0;
130
+ --tw-color-border-light: #f1f5f9;
131
+ --tw-color-border-dark: #cbd5e1;
132
+ --tw-color-border-focus: var(--tw-color-primary);
133
+
134
+ /* =====================================================
135
+ INTERACTIVE STATES
136
+ ===================================================== */
137
+
138
+ --tw-color-hover: #f1f5f9;
139
+ --tw-color-active: #e2e8f0;
140
+ --tw-color-disabled-bg: #f1f5f9;
141
+ --tw-color-disabled-text: #94a3b8;
142
+
143
+ /* Focus ring */
144
+ --tw-color-focus-ring: rgba(59, 130, 246, 0.5);
145
+ --tw-color-focus-ring-offset: #ffffff;
146
+
147
+ /* =====================================================
148
+ OVERLAY & BACKDROP
149
+ ===================================================== */
150
+
151
+ --tw-color-overlay: rgba(0, 0, 0, 0.5);
152
+ --tw-backdrop-blur: blur(4px);
153
+
154
+ /* =====================================================
155
+ SHADOWS
156
+ ===================================================== */
157
+
158
+ --tw-shadow-color: rgba(0, 0, 0, 0.1);
159
+ --tw-elevation-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
160
+ --tw-elevation: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
161
+ --tw-elevation-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
162
+ --tw-elevation-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
163
+ --tw-elevation-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
164
+
165
+ /* =====================================================
166
+ COMPONENT-SPECIFIC VARIABLES
167
+ Override these to customize individual components.
168
+ ===================================================== */
169
+
170
+ /* Button */
171
+ --tw-button-border-radius: 0.5rem;
172
+ --tw-button-font-weight: 500;
173
+ --tw-button-primary-bg: var(--tw-color-primary);
174
+ --tw-button-primary-text: var(--tw-color-text-inverse);
175
+ --tw-button-primary-hover: var(--tw-color-primary-hover);
176
+ --tw-button-secondary-bg: var(--tw-color-secondary);
177
+ --tw-button-secondary-text: var(--tw-color-text-inverse);
178
+ --tw-button-secondary-hover: var(--tw-color-secondary-hover);
179
+
180
+ /* Card */
181
+ --tw-card-bg: var(--tw-color-surface);
182
+ --tw-card-border: var(--tw-color-border);
183
+ --tw-card-border-radius: 0.75rem;
184
+ --tw-card-shadow: var(--tw-elevation);
185
+
186
+ /* Input */
187
+ --tw-input-bg: var(--tw-color-surface);
188
+ --tw-input-text: var(--tw-color-text);
189
+ --tw-input-border: var(--tw-color-border);
190
+ --tw-input-border-radius: 0.5rem;
191
+ --tw-input-placeholder: var(--tw-color-text-muted);
192
+ --tw-input-focus-border: var(--tw-color-border-focus);
193
+ --tw-input-focus-ring: var(--tw-color-focus-ring);
194
+
195
+ /* Modal */
196
+ --tw-modal-bg: var(--tw-color-surface);
197
+ --tw-modal-border-radius: 0.75rem;
198
+ --tw-modal-shadow: var(--tw-elevation-xl);
199
+ --tw-modal-overlay: var(--tw-color-overlay);
200
+
201
+ /* Dropdown */
202
+ --tw-dropdown-bg: var(--tw-color-surface);
203
+ --tw-dropdown-border: var(--tw-color-border);
204
+ --tw-dropdown-border-radius: 0.5rem;
205
+ --tw-dropdown-shadow: var(--tw-elevation-lg);
206
+ --tw-dropdown-item-hover: var(--tw-color-hover);
207
+
208
+ /* Tooltip */
209
+ --tw-tooltip-bg: #1e293b;
210
+ --tw-tooltip-text: #ffffff;
211
+ --tw-tooltip-border-radius: 0.375rem;
212
+
213
+ /* Badge */
214
+ --tw-badge-border-radius: 9999px;
215
+
216
+ /* Alert */
217
+ --tw-alert-border-radius: 0.5rem;
218
+
219
+ /* Tabs */
220
+ --tw-tab-bg: transparent;
221
+ --tw-tab-text: var(--tw-color-text-secondary);
222
+ --tw-tab-active-text: var(--tw-color-primary);
223
+ --tw-tab-active-indicator: var(--tw-color-primary);
224
+ --tw-tab-hover-bg: var(--tw-color-hover);
225
+
226
+ /* Select */
227
+ --tw-select-bg: var(--tw-color-surface);
228
+ --tw-select-text: var(--tw-color-text);
229
+ --tw-select-border: var(--tw-color-border);
230
+ --tw-select-option-hover: var(--tw-color-hover);
231
+ --tw-select-option-selected: var(--tw-color-primary-light);
232
+
233
+ /* Switch */
234
+ --tw-switch-track-off: var(--tw-color-border-dark);
235
+ --tw-switch-track-on: var(--tw-color-primary);
236
+ --tw-switch-thumb: var(--tw-color-surface);
237
+
238
+ /* Checkbox / Radio */
239
+ --tw-checkbox-border: var(--tw-color-border-dark);
240
+ --tw-checkbox-checked: var(--tw-color-primary);
241
+ --tw-checkbox-checkmark: var(--tw-color-text-inverse);
242
+
243
+ /* Progress */
244
+ --tw-progress-track: var(--tw-color-border);
245
+ --tw-progress-bar: var(--tw-color-primary);
246
+
247
+ /* Slider */
248
+ --tw-slider-track: var(--tw-color-border);
249
+ --tw-slider-range: var(--tw-color-primary);
250
+ --tw-slider-thumb: var(--tw-color-surface);
251
+ --tw-slider-thumb-border: var(--tw-color-primary);
252
+
253
+ /* Table */
254
+ --tw-table-header-bg: var(--tw-color-surface-alt);
255
+ --tw-table-row-hover: var(--tw-color-hover);
256
+ --tw-table-border: var(--tw-color-border);
257
+
258
+ /* Sidebar */
259
+ --tw-sidebar-bg: var(--tw-color-surface);
260
+ --tw-sidebar-border: var(--tw-color-border);
261
+ --tw-sidebar-item-hover: var(--tw-color-hover);
262
+ --tw-sidebar-item-active: var(--tw-color-primary-light);
263
+
264
+ /* Accordion */
265
+ --tw-accordion-bg: var(--tw-color-surface);
266
+ --tw-accordion-border: var(--tw-color-border);
267
+ --tw-accordion-header-hover: var(--tw-color-hover);
268
+ }
269
+
270
+ /* =====================================================
271
+ DARK MODE OVERRIDES
272
+ Apply .dark class to <html> element to enable.
273
+ ===================================================== */
274
+
275
+ .dark {
276
+ /* Brand colors */
277
+ --tw-color-primary: #60a5fa;
278
+ --tw-color-primary-hover: #93c5fd;
279
+ --tw-color-primary-active: #bfdbfe;
280
+ --tw-color-primary-light: rgba(59, 130, 246, 0.2);
281
+ --tw-color-primary-dark: #3b82f6;
282
+
283
+ --tw-color-secondary: #94a3b8;
284
+ --tw-color-secondary-hover: #cbd5e1;
285
+ --tw-color-secondary-active: #e2e8f0;
286
+ --tw-color-secondary-light: rgba(100, 116, 139, 0.2);
287
+ --tw-color-secondary-dark: #64748b;
288
+
289
+ /* Semantic colors */
290
+ --tw-color-success: #34d399;
291
+ --tw-color-success-hover: #6ee7b7;
292
+ --tw-color-success-bg: rgba(16, 185, 129, 0.15);
293
+ --tw-color-success-text: #6ee7b7;
294
+ --tw-color-success-border: rgba(16, 185, 129, 0.3);
295
+
296
+ --tw-color-warning: #fbbf24;
297
+ --tw-color-warning-hover: #fcd34d;
298
+ --tw-color-warning-bg: rgba(245, 158, 11, 0.15);
299
+ --tw-color-warning-text: #fcd34d;
300
+ --tw-color-warning-border: rgba(245, 158, 11, 0.3);
301
+
302
+ --tw-color-danger: #f87171;
303
+ --tw-color-danger-hover: #fca5a5;
304
+ --tw-color-danger-bg: rgba(239, 68, 68, 0.15);
305
+ --tw-color-danger-text: #fca5a5;
306
+ --tw-color-danger-border: rgba(239, 68, 68, 0.3);
307
+
308
+ --tw-color-info: #22d3ee;
309
+ --tw-color-info-hover: #67e8f9;
310
+ --tw-color-info-bg: rgba(6, 182, 212, 0.15);
311
+ --tw-color-info-text: #67e8f9;
312
+ --tw-color-info-border: rgba(6, 182, 212, 0.3);
313
+
314
+ /* Neutral palette */
315
+ --tw-color-background: #0f172a;
316
+ --tw-color-background-alt: #1e293b;
317
+
318
+ --tw-color-surface: #1e293b;
319
+ --tw-color-surface-alt: #334155;
320
+ --tw-color-surface-hover: #334155;
321
+
322
+ /* Text colors */
323
+ --tw-color-text: #f8fafc;
324
+ --tw-color-text-secondary: #94a3b8;
325
+ --tw-color-text-muted: #64748b;
326
+ --tw-color-text-disabled: #475569;
327
+ --tw-color-text-inverse: #0f172a;
328
+
329
+ /* Border colors */
330
+ --tw-color-border: #334155;
331
+ --tw-color-border-light: #475569;
332
+ --tw-color-border-dark: #1e293b;
333
+
334
+ /* Interactive states */
335
+ --tw-color-hover: #334155;
336
+ --tw-color-active: #475569;
337
+ --tw-color-disabled-bg: #1e293b;
338
+ --tw-color-disabled-text: #475569;
339
+
340
+ /* Focus ring */
341
+ --tw-color-focus-ring: rgba(96, 165, 250, 0.5);
342
+ --tw-color-focus-ring-offset: #0f172a;
343
+
344
+ /* Overlay */
345
+ --tw-color-overlay: rgba(0, 0, 0, 0.7);
346
+
347
+ /* Shadows (darker for dark mode) */
348
+ --tw-shadow-color: rgba(0, 0, 0, 0.4);
349
+ --tw-elevation-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
350
+ --tw-elevation: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
351
+ --tw-elevation-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
352
+ --tw-elevation-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
353
+ --tw-elevation-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
354
+
355
+ /* Component-specific dark mode overrides */
356
+ --tw-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
357
+ --tw-tooltip-bg: #f1f5f9;
358
+ --tw-tooltip-text: #0f172a;
359
+ --tw-select-option-selected: rgba(59, 130, 246, 0.3);
360
+ --tw-sidebar-item-active: rgba(59, 130, 246, 0.2);
361
+ }
362
+