osi-cards-lib 1.5.31 → 1.5.32
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 +58 -20
- package/package.json +13 -25
- package/postcss.config.js +81 -0
- package/section-registry.json +3864 -0
- package/section-registry.schema.json +264 -0
- package/fesm2022/osi-cards-lib.mjs +0 -31878
- package/fesm2022/osi-cards-lib.mjs.map +0 -1
- package/index.d.ts +0 -11522
- package/scripts/setup-angular-styles.js +0 -169
- package/styles/_components.scss +0 -38
- package/styles/_index.scss +0 -25
- package/styles/_osi-cards-mixins.scss +0 -459
- package/styles/_osi-cards-tokens.scss +0 -333
- package/styles/_styles-scoped.scss +0 -81
- package/styles/_styles.scss +0 -26
- package/styles/bundles/_ai-card.scss +0 -245
- package/styles/bundles/_all.scss +0 -68
- package/styles/bundles/_base.scss +0 -60
- package/styles/bundles/_card-skeleton.scss +0 -290
- package/styles/bundles/_index.scss +0 -25
- package/styles/bundles/_sections.scss +0 -48
- package/styles/bundles/_tokens-only.scss +0 -139
- package/styles/components/_ai-card-renderer.scss +0 -104
- package/styles/components/_badges.scss +0 -317
- package/styles/components/_card-actions.scss +0 -169
- package/styles/components/_card-footer.scss +0 -47
- package/styles/components/_component-styles.scss +0 -205
- package/styles/components/_empty-state.scss +0 -630
- package/styles/components/_hero-card.scss +0 -422
- package/styles/components/_image-fallback.scss +0 -28
- package/styles/components/_streaming-effects.scss +0 -518
- package/styles/components/cards/_ai-card.scss +0 -718
- package/styles/components/sections/_all-sections.generated.scss +0 -41
- package/styles/components/sections/_all-sections.scss +0 -1086
- package/styles/components/sections/_balanced-compact-system.scss +0 -186
- package/styles/components/sections/_compact-mixins.scss +0 -180
- package/styles/components/sections/_component-mixins.scss +0 -454
- package/styles/components/sections/_design-system.scss +0 -477
- package/styles/components/sections/_design-tokens.scss +0 -308
- package/styles/components/sections/_enhanced-design-variables.scss +0 -147
- package/styles/components/sections/_master-compact-system.scss +0 -302
- package/styles/components/sections/_master-dense-system.scss +0 -239
- package/styles/components/sections/_minimalistic-design.scss +0 -268
- package/styles/components/sections/_modern-effects.scss +0 -392
- package/styles/components/sections/_modern-sections.scss +0 -351
- package/styles/components/sections/_perfect-system.scss +0 -204
- package/styles/components/sections/_section-animations.scss +0 -331
- package/styles/components/sections/_section-shell.scss +0 -337
- package/styles/components/sections/_section-types.generated.scss +0 -30
- package/styles/components/sections/_sections-all.scss +0 -26
- package/styles/components/sections/_sections-base.scss +0 -334
- package/styles/components/sections/_typography-system.scss +0 -327
- package/styles/components/sections/_ultra-compact-tokens.scss +0 -375
- package/styles/components/sections/_unified-section-style.scss +0 -157
- package/styles/components/sections/_utility-classes.scss +0 -567
- package/styles/components/sections/_visual-effects-library.scss +0 -374
- package/styles/core/_animations.scss +0 -1498
- package/styles/core/_bootstrap-reset.scss +0 -445
- package/styles/core/_color-helpers.scss +0 -46
- package/styles/core/_global-unified.scss +0 -118
- package/styles/core/_global.scss +0 -73
- package/styles/core/_mixins.scss +0 -491
- package/styles/core/_surface-layers.scss +0 -76
- package/styles/core/_utilities.scss +0 -326
- package/styles/core/_variables-unified.scss +0 -57
- package/styles/core/_variables.scss +0 -36
- package/styles/core/variables/_colors-source.scss +0 -34
- package/styles/core/variables/_colors-unified.scss +0 -26
- package/styles/core/variables/_colors.scss +0 -21
- package/styles/critical.scss +0 -353
- package/styles/design-system/_compact-theme.scss +0 -159
- package/styles/design-system/_section-base.scss +0 -426
- package/styles/design-system/_tokens.scss +0 -237
- package/styles/design-system/_unified-sections.scss +0 -215
- package/styles/layout/_feature-grid.scss +0 -322
- package/styles/layout/_masonry.scss +0 -734
- package/styles/layout/_tilt.scss +0 -244
- package/styles/micro-interactions.scss +0 -583
- package/styles/mixins/_section-mixins.scss +0 -280
- package/styles/non-critical.scss +0 -643
- package/styles/reset/_framework-reset.scss +0 -457
- package/styles/reset/_index.scss +0 -14
- package/styles/reset/_shadow-reset.scss +0 -383
- package/styles/responsive.scss +0 -326
- package/styles/themes.scss +0 -573
- package/styles/tokens/_index.scss +0 -92
- package/styles/tokens/_master.scss +0 -1404
- package/styles/tokens/_section-tokens.generated.scss +0 -140
package/README.md
CHANGED
|
@@ -159,21 +159,43 @@ This is the **most reliable method**, especially for SASS files. The styles are
|
|
|
159
159
|
|
|
160
160
|
**Important**:
|
|
161
161
|
- ⚠️ **Case sensitive**: Use `osi-cards-lib` (lowercase), NOT `osi-cards-Lib`
|
|
162
|
-
- ⚠️ **REQUIRED**: You must wrap your components in a container
|
|
162
|
+
- ⚠️ **REQUIRED**: You must wrap your components in a container. **RECOMMENDED: Use `<osi-cards-container>` component** (automatically handles theme and tilt):
|
|
163
163
|
|
|
164
164
|
```html
|
|
165
|
-
<!--
|
|
165
|
+
<!-- ✅ RECOMMENDED: Use osi-cards-container component -->
|
|
166
|
+
<osi-cards-container [theme]="'day'">
|
|
167
|
+
<app-ai-card-renderer [cardConfig]="card"></app-ai-card-renderer>
|
|
168
|
+
</osi-cards-container>
|
|
169
|
+
|
|
170
|
+
<!-- ✅ Also works with dynamic theme -->
|
|
171
|
+
<osi-cards-container [theme]="cardTheme" *ngIf="cardConfig">
|
|
172
|
+
<app-ai-card-renderer [cardConfig]="cardConfig"></app-ai-card-renderer>
|
|
173
|
+
</osi-cards-container>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Why use the component?**
|
|
177
|
+
- ✅ Automatically sets `data-theme` attribute correctly
|
|
178
|
+
- ✅ Automatically adds `perspective: 1200px` for 3D tilt effects
|
|
179
|
+
- ✅ Preserves 3D transform context (`transform-style: preserve-3d`)
|
|
180
|
+
- ✅ Handles all container styling automatically
|
|
181
|
+
- ✅ More reliable than manual div setup
|
|
182
|
+
|
|
183
|
+
**Alternative (Manual Setup):**
|
|
184
|
+
If you prefer a plain div, you must manually set both the class and `data-theme` attribute:
|
|
185
|
+
|
|
186
|
+
```html
|
|
187
|
+
<!-- ⚠️ Manual setup - requires both class and data-theme -->
|
|
166
188
|
<div class="osi-cards-container" data-theme="day">
|
|
167
189
|
<app-ai-card-renderer [cardConfig]="card"></app-ai-card-renderer>
|
|
168
190
|
</div>
|
|
169
191
|
|
|
170
|
-
<!-- Dynamic theme
|
|
192
|
+
<!-- Dynamic theme with manual setup -->
|
|
171
193
|
<div class="osi-cards-container" [attr.data-theme]="theme" *ngIf="cardConfig">
|
|
172
194
|
<app-ai-card-renderer [cardConfig]="cardConfig"></app-ai-card-renderer>
|
|
173
195
|
</div>
|
|
174
196
|
```
|
|
175
197
|
|
|
176
|
-
**The `data-theme` attribute is REQUIRED** - without it, styles will not apply correctly. Use `"day"` for light theme or `"night"` for dark theme.
|
|
198
|
+
**The `data-theme` attribute is REQUIRED** - without it, styles will not apply correctly. Use `"day"` for light theme or `"night"` for dark theme. The component handles this automatically.
|
|
177
199
|
|
|
178
200
|
#### Option B: Global Styles (For Standalone Apps)
|
|
179
201
|
|
|
@@ -236,32 +258,36 @@ export class StaticCardComponent {
|
|
|
236
258
|
}
|
|
237
259
|
```
|
|
238
260
|
|
|
239
|
-
**HTML (
|
|
261
|
+
**HTML (RECOMMENDED - using OsiCardsContainerComponent):**
|
|
240
262
|
|
|
241
263
|
```html
|
|
242
|
-
<
|
|
264
|
+
<osi-cards-container [theme]="cardTheme">
|
|
243
265
|
<app-ai-card-renderer
|
|
244
266
|
[cardConfig]="card"
|
|
245
267
|
[streamingStage]="'complete'"
|
|
246
268
|
[showLoadingByDefault]="false"
|
|
269
|
+
[tiltEnabled]="true"
|
|
247
270
|
(cardInteraction)="onCardAction($event)">
|
|
248
271
|
</app-ai-card-renderer>
|
|
249
|
-
</
|
|
272
|
+
</osi-cards-container>
|
|
250
273
|
```
|
|
251
274
|
|
|
252
|
-
**HTML (
|
|
275
|
+
**HTML (Alternative - manual div setup):**
|
|
253
276
|
|
|
254
277
|
```html
|
|
255
|
-
<osi-cards-container [theme]="cardTheme">
|
|
278
|
+
<div class="osi-cards-container" [attr.data-theme]="cardTheme">
|
|
256
279
|
<app-ai-card-renderer
|
|
257
280
|
[cardConfig]="card"
|
|
258
281
|
[streamingStage]="'complete'"
|
|
259
282
|
[showLoadingByDefault]="false"
|
|
283
|
+
[tiltEnabled]="true"
|
|
260
284
|
(cardInteraction)="onCardAction($event)">
|
|
261
285
|
</app-ai-card-renderer>
|
|
262
|
-
</
|
|
286
|
+
</div>
|
|
263
287
|
```
|
|
264
288
|
|
|
289
|
+
**Note**: The component approach is recommended because it automatically handles theme, perspective for tilt, and 3D transform context.
|
|
290
|
+
|
|
265
291
|
**Key Settings:**
|
|
266
292
|
- `[streamingStage]="'complete'"` → Card is fully loaded
|
|
267
293
|
- `[showLoadingByDefault]="false"` → No loading spinner
|
|
@@ -354,14 +380,14 @@ export class StreamingCardComponent {
|
|
|
354
380
|
}
|
|
355
381
|
```
|
|
356
382
|
|
|
357
|
-
**HTML (
|
|
383
|
+
**HTML (RECOMMENDED - using OsiCardsContainerComponent):**
|
|
358
384
|
|
|
359
385
|
```html
|
|
360
386
|
<button (click)="generateCard()" [disabled]="isStreaming">
|
|
361
387
|
{{ isStreaming ? 'Generating...' : 'Generate Card' }}
|
|
362
388
|
</button>
|
|
363
389
|
|
|
364
|
-
<
|
|
390
|
+
<osi-cards-container [theme]="cardTheme">
|
|
365
391
|
<app-ai-card-renderer
|
|
366
392
|
[cardConfig]="card"
|
|
367
393
|
[isStreaming]="isStreaming"
|
|
@@ -370,19 +396,20 @@ export class StreamingCardComponent {
|
|
|
370
396
|
[showLoadingByDefault]="true"
|
|
371
397
|
[loadingMessages]="loadingMessages"
|
|
372
398
|
[loadingTitle]="'AI Analysis'"
|
|
399
|
+
[tiltEnabled]="true"
|
|
373
400
|
(cardInteraction)="onCardAction($event)">
|
|
374
401
|
</app-ai-card-renderer>
|
|
375
|
-
</
|
|
402
|
+
</osi-cards-container>
|
|
376
403
|
```
|
|
377
404
|
|
|
378
|
-
**HTML (
|
|
405
|
+
**HTML (Alternative - manual div setup):**
|
|
379
406
|
|
|
380
407
|
```html
|
|
381
408
|
<button (click)="generateCard()" [disabled]="isStreaming">
|
|
382
409
|
{{ isStreaming ? 'Generating...' : 'Generate Card' }}
|
|
383
410
|
</button>
|
|
384
411
|
|
|
385
|
-
<osi-cards-container [theme]="cardTheme">
|
|
412
|
+
<div class="osi-cards-container" [attr.data-theme]="cardTheme">
|
|
386
413
|
<app-ai-card-renderer
|
|
387
414
|
[cardConfig]="card"
|
|
388
415
|
[isStreaming]="isStreaming"
|
|
@@ -391,9 +418,10 @@ export class StreamingCardComponent {
|
|
|
391
418
|
[showLoadingByDefault]="true"
|
|
392
419
|
[loadingMessages]="loadingMessages"
|
|
393
420
|
[loadingTitle]="'AI Analysis'"
|
|
421
|
+
[tiltEnabled]="true"
|
|
394
422
|
(cardInteraction)="onCardAction($event)">
|
|
395
423
|
</app-ai-card-renderer>
|
|
396
|
-
</
|
|
424
|
+
</div>
|
|
397
425
|
```
|
|
398
426
|
|
|
399
427
|
**Key Settings:**
|
|
@@ -1095,14 +1123,23 @@ If you want to keep the import in your styles file:
|
|
|
1095
1123
|
```
|
|
1096
1124
|
Then remove the `@import` from your `styles.scss`.
|
|
1097
1125
|
|
|
1098
|
-
3. **Wrap components in container** - You MUST wrap your components:
|
|
1126
|
+
3. **Wrap components in container** - You MUST wrap your components. **RECOMMENDED: Use `<osi-cards-container>` component** (automatically handles theme and tilt):
|
|
1127
|
+
```html
|
|
1128
|
+
<!-- ✅ RECOMMENDED: Component automatically handles theme and tilt -->
|
|
1129
|
+
<osi-cards-container [theme]="'day'">
|
|
1130
|
+
<app-ai-card-renderer [cardConfig]="card"></app-ai-card-renderer>
|
|
1131
|
+
</osi-cards-container>
|
|
1132
|
+
```
|
|
1133
|
+
|
|
1134
|
+
**Alternative (Manual Setup):**
|
|
1099
1135
|
```html
|
|
1136
|
+
<!-- ⚠️ Manual setup - requires both class and data-theme -->
|
|
1100
1137
|
<div class="osi-cards-container" data-theme="day">
|
|
1101
1138
|
<app-ai-card-renderer [cardConfig]="card"></app-ai-card-renderer>
|
|
1102
1139
|
</div>
|
|
1103
1140
|
```
|
|
1104
1141
|
|
|
1105
|
-
4. **Set theme attribute** -
|
|
1142
|
+
4. **Set theme attribute** - The component handles this automatically via `[theme]` input. For manual setup, add `data-theme="day"` or `data-theme="night"`:
|
|
1106
1143
|
```html
|
|
1107
1144
|
<div class="osi-cards-container" data-theme="day">
|
|
1108
1145
|
```
|
|
@@ -1131,8 +1168,9 @@ Import styles in your `styles.scss`:
|
|
|
1131
1168
|
|
|
1132
1169
|
**Common Issues:**
|
|
1133
1170
|
- ❌ **Wrong import path**: `@import 'osi-cards-Lib/styles/_styles-scoped'` (wrong casing)
|
|
1134
|
-
- ❌ **Missing container**: Components not wrapped in `.osi-cards-container`
|
|
1135
|
-
- ❌ **Missing theme**: No `data-theme` attribute on container
|
|
1171
|
+
- ❌ **Missing container**: Components not wrapped in `.osi-cards-container` or `<osi-cards-container>` component
|
|
1172
|
+
- ❌ **Missing theme**: No `data-theme` attribute on container (use `<osi-cards-container [theme]="'day'">` to fix automatically)
|
|
1173
|
+
- ❌ **Tilt not working**: Missing `perspective` on container (use `<osi-cards-container>` component which adds it automatically)
|
|
1136
1174
|
- ❌ **SCSS not compiled**: Check that your build process compiles SCSS files
|
|
1137
1175
|
|
|
1138
1176
|
### Icons not showing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "osi-cards-lib",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.32",
|
|
4
4
|
"description": "Standalone OSI Cards library for Angular applications with CSS Layer support for easy style overrides",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -12,35 +12,26 @@
|
|
|
12
12
|
],
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/Inutilepat83/OSI-Cards.git"
|
|
18
|
-
},
|
|
19
|
-
"bugs": {
|
|
20
|
-
"url": "https://github.com/Inutilepat83/OSI-Cards/issues"
|
|
21
|
-
},
|
|
22
|
-
"homepage": "https://github.com/Inutilepat83/OSI-Cards#readme",
|
|
23
15
|
"peerDependencies": {
|
|
24
|
-
"@angular/core": "^18.0.0 || ^20.0.0",
|
|
25
16
|
"@angular/common": "^18.0.0 || ^20.0.0",
|
|
26
|
-
"@angular/
|
|
27
|
-
"@angular/
|
|
17
|
+
"@angular/core": "^18.0.0 || ^20.0.0",
|
|
18
|
+
"@angular/animations": "^18.0.0 || ^20.0.0",
|
|
28
19
|
"@angular/platform-browser": "^18.0.0 || ^20.0.0",
|
|
29
|
-
"@ngrx/store": "^17.0.0 || ^18.0.0",
|
|
30
|
-
"@ngrx/effects": "^17.0.0 || ^18.0.0",
|
|
31
|
-
"@ngrx/entity": "^17.0.0 || ^18.0.0",
|
|
32
|
-
"rxjs": "~7.8.0",
|
|
33
|
-
"zone.js": "~0.14.0 || ~0.15.0"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
20
|
"lucide-angular": "^0.548.0",
|
|
37
|
-
"
|
|
38
|
-
"tslib": "^2.3.0"
|
|
21
|
+
"rxjs": "~7.8.0"
|
|
39
22
|
},
|
|
40
23
|
"optionalDependencies": {
|
|
41
24
|
"chart.js": "^4.4.0",
|
|
42
25
|
"leaflet": "^1.9.4"
|
|
43
26
|
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/Inutilepat83/OSI-Cards.git"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/Inutilepat83/OSI-Cards#readme",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/Inutilepat83/OSI-Cards/issues"
|
|
34
|
+
},
|
|
44
35
|
"exports": {
|
|
45
36
|
"./package.json": {
|
|
46
37
|
"default": "./package.json"
|
|
@@ -88,11 +79,8 @@
|
|
|
88
79
|
"default": "./styles/osi-cards-standalone.css"
|
|
89
80
|
}
|
|
90
81
|
},
|
|
91
|
-
"main": "./fesm2022/osi-cards-lib.mjs",
|
|
92
|
-
"module": "./fesm2022/osi-cards-lib.mjs",
|
|
93
|
-
"typings": "./index.d.ts",
|
|
94
82
|
"sideEffects": [
|
|
95
83
|
"*.css",
|
|
96
84
|
"*.scss"
|
|
97
85
|
]
|
|
98
|
-
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostCSS Configuration for OSI Cards Library
|
|
3
|
+
*
|
|
4
|
+
* Processes CSS for:
|
|
5
|
+
* - Autoprefixer: Cross-browser compatibility
|
|
6
|
+
* - cssnano: Production minification
|
|
7
|
+
* - postcss-custom-properties: CSS variable fallbacks
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
plugins: [
|
|
12
|
+
// Autoprefixer for cross-browser support
|
|
13
|
+
require('autoprefixer')({
|
|
14
|
+
// Support last 2 versions of major browsers
|
|
15
|
+
overrideBrowserslist: [
|
|
16
|
+
'last 2 Chrome versions',
|
|
17
|
+
'last 2 Firefox versions',
|
|
18
|
+
'last 2 Safari versions',
|
|
19
|
+
'last 2 Edge versions',
|
|
20
|
+
'last 2 iOS versions',
|
|
21
|
+
'last 2 Android versions'
|
|
22
|
+
],
|
|
23
|
+
// Enable grid prefixes for IE11 support if needed
|
|
24
|
+
grid: 'autoplace'
|
|
25
|
+
}),
|
|
26
|
+
|
|
27
|
+
// CSS variable fallbacks for older browsers
|
|
28
|
+
require('postcss-custom-properties')({
|
|
29
|
+
preserve: true, // Keep CSS variables in output
|
|
30
|
+
warnings: false
|
|
31
|
+
}),
|
|
32
|
+
|
|
33
|
+
// Minification for production (only in production mode)
|
|
34
|
+
...(process.env.NODE_ENV === 'production' ? [
|
|
35
|
+
require('cssnano')({
|
|
36
|
+
preset: ['default', {
|
|
37
|
+
// Don't remove CSS comments starting with /*! (license headers)
|
|
38
|
+
discardComments: {
|
|
39
|
+
removeAll: false,
|
|
40
|
+
remove: (comment) => !comment.startsWith('!')
|
|
41
|
+
},
|
|
42
|
+
// Keep @keyframes names intact (they might be referenced in JS)
|
|
43
|
+
reduceIdents: false,
|
|
44
|
+
// Keep z-index values intact
|
|
45
|
+
zindex: false,
|
|
46
|
+
// Preserve CSS custom properties
|
|
47
|
+
colormin: false,
|
|
48
|
+
// Don't merge rules aggressively (can break specificity)
|
|
49
|
+
mergeRules: false
|
|
50
|
+
}]
|
|
51
|
+
})
|
|
52
|
+
] : []),
|
|
53
|
+
|
|
54
|
+
// Add CSS layer fallback for older browsers
|
|
55
|
+
{
|
|
56
|
+
postcssPlugin: 'postcss-layer-fallback',
|
|
57
|
+
Once(root) {
|
|
58
|
+
// Add a comment indicating layer support
|
|
59
|
+
root.prepend({
|
|
60
|
+
text: ' CSS Layers are used. If your browser doesn\'t support @layer, styles may not cascade correctly. '
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|