osi-cards-lib 1.5.32 → 1.5.33
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 +20 -58
- package/fesm2022/osi-cards-lib.mjs +31878 -0
- package/fesm2022/osi-cards-lib.mjs.map +1 -0
- package/index.d.ts +11522 -0
- package/package.json +24 -12
- package/scripts/setup-angular-styles.js +169 -0
- package/styles/_components.scss +38 -0
- package/styles/_index.scss +25 -0
- package/styles/_osi-cards-mixins.scss +459 -0
- package/styles/_osi-cards-tokens.scss +333 -0
- package/styles/_styles-scoped.scss +81 -0
- package/styles/_styles.scss +26 -0
- package/styles/bundles/_ai-card.scss +245 -0
- package/styles/bundles/_all.scss +68 -0
- package/styles/bundles/_base.scss +60 -0
- package/styles/bundles/_card-skeleton.scss +290 -0
- package/styles/bundles/_index.scss +25 -0
- package/styles/bundles/_sections.scss +48 -0
- package/styles/bundles/_tokens-only.scss +139 -0
- package/styles/components/_ai-card-renderer.scss +104 -0
- package/styles/components/_badges.scss +317 -0
- package/styles/components/_card-actions.scss +169 -0
- package/styles/components/_card-footer.scss +47 -0
- package/styles/components/_component-styles.scss +205 -0
- package/styles/components/_empty-state.scss +630 -0
- package/styles/components/_hero-card.scss +422 -0
- package/styles/components/_image-fallback.scss +28 -0
- package/styles/components/_streaming-effects.scss +518 -0
- package/styles/components/cards/_ai-card.scss +718 -0
- package/styles/components/sections/_all-sections.generated.scss +41 -0
- package/styles/components/sections/_all-sections.scss +1086 -0
- package/styles/components/sections/_balanced-compact-system.scss +186 -0
- package/styles/components/sections/_compact-mixins.scss +180 -0
- package/styles/components/sections/_component-mixins.scss +454 -0
- package/styles/components/sections/_design-system.scss +477 -0
- package/styles/components/sections/_design-tokens.scss +308 -0
- package/styles/components/sections/_enhanced-design-variables.scss +147 -0
- package/styles/components/sections/_master-compact-system.scss +302 -0
- package/styles/components/sections/_master-dense-system.scss +239 -0
- package/styles/components/sections/_minimalistic-design.scss +268 -0
- package/styles/components/sections/_modern-effects.scss +392 -0
- package/styles/components/sections/_modern-sections.scss +351 -0
- package/styles/components/sections/_perfect-system.scss +204 -0
- package/styles/components/sections/_section-animations.scss +331 -0
- package/styles/components/sections/_section-shell.scss +337 -0
- package/styles/components/sections/_section-types.generated.scss +30 -0
- package/styles/components/sections/_sections-all.scss +26 -0
- package/styles/components/sections/_sections-base.scss +334 -0
- package/styles/components/sections/_typography-system.scss +327 -0
- package/styles/components/sections/_ultra-compact-tokens.scss +375 -0
- package/styles/components/sections/_unified-section-style.scss +157 -0
- package/styles/components/sections/_utility-classes.scss +567 -0
- package/styles/components/sections/_visual-effects-library.scss +374 -0
- package/styles/core/_animations.scss +1498 -0
- package/styles/core/_bootstrap-reset.scss +445 -0
- package/styles/core/_color-helpers.scss +46 -0
- package/styles/core/_global-unified.scss +118 -0
- package/styles/core/_global.scss +73 -0
- package/styles/core/_mixins.scss +491 -0
- package/styles/core/_surface-layers.scss +76 -0
- package/styles/core/_utilities.scss +326 -0
- package/styles/core/_variables-unified.scss +57 -0
- package/styles/core/_variables.scss +36 -0
- package/styles/core/variables/_colors-source.scss +34 -0
- package/styles/core/variables/_colors-unified.scss +26 -0
- package/styles/core/variables/_colors.scss +21 -0
- package/styles/critical.scss +353 -0
- package/styles/design-system/_compact-theme.scss +159 -0
- package/styles/design-system/_section-base.scss +426 -0
- package/styles/design-system/_tokens.scss +237 -0
- package/styles/design-system/_unified-sections.scss +215 -0
- package/styles/layout/_feature-grid.scss +322 -0
- package/styles/layout/_masonry.scss +734 -0
- package/styles/layout/_tilt.scss +244 -0
- package/styles/micro-interactions.scss +583 -0
- package/styles/mixins/_section-mixins.scss +280 -0
- package/styles/non-critical.scss +643 -0
- package/styles/reset/_framework-reset.scss +457 -0
- package/styles/reset/_index.scss +14 -0
- package/styles/reset/_shadow-reset.scss +383 -0
- package/styles/responsive.scss +326 -0
- package/styles/themes.scss +573 -0
- package/styles/tokens/_index.scss +92 -0
- package/styles/tokens/_master.scss +1404 -0
- package/styles/tokens/_section-tokens.generated.scss +140 -0
- package/postcss.config.js +0 -81
- package/section-registry.json +0 -3864
- package/section-registry.schema.json +0 -264
package/README.md
CHANGED
|
@@ -159,43 +159,21 @@ 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 with the `osi-cards-container` class and `data-theme` attribute:
|
|
163
163
|
|
|
164
164
|
```html
|
|
165
|
-
<!--
|
|
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 -->
|
|
165
|
+
<!-- Static theme -->
|
|
188
166
|
<div class="osi-cards-container" data-theme="day">
|
|
189
167
|
<app-ai-card-renderer [cardConfig]="card"></app-ai-card-renderer>
|
|
190
168
|
</div>
|
|
191
169
|
|
|
192
|
-
<!-- Dynamic theme
|
|
170
|
+
<!-- Dynamic theme (Angular) -->
|
|
193
171
|
<div class="osi-cards-container" [attr.data-theme]="theme" *ngIf="cardConfig">
|
|
194
172
|
<app-ai-card-renderer [cardConfig]="cardConfig"></app-ai-card-renderer>
|
|
195
173
|
</div>
|
|
196
174
|
```
|
|
197
175
|
|
|
198
|
-
**The `data-theme` attribute is REQUIRED** - without it, styles will not apply correctly. Use `"day"` for light theme or `"night"` for dark theme.
|
|
176
|
+
**The `data-theme` attribute is REQUIRED** - without it, styles will not apply correctly. Use `"day"` for light theme or `"night"` for dark theme.
|
|
199
177
|
|
|
200
178
|
#### Option B: Global Styles (For Standalone Apps)
|
|
201
179
|
|
|
@@ -258,36 +236,32 @@ export class StaticCardComponent {
|
|
|
258
236
|
}
|
|
259
237
|
```
|
|
260
238
|
|
|
261
|
-
**HTML (
|
|
239
|
+
**HTML (with scoped styles):**
|
|
262
240
|
|
|
263
241
|
```html
|
|
264
|
-
<osi-cards-container [theme]="cardTheme">
|
|
242
|
+
<div class="osi-cards-container" [attr.data-theme]="cardTheme">
|
|
265
243
|
<app-ai-card-renderer
|
|
266
244
|
[cardConfig]="card"
|
|
267
245
|
[streamingStage]="'complete'"
|
|
268
246
|
[showLoadingByDefault]="false"
|
|
269
|
-
[tiltEnabled]="true"
|
|
270
247
|
(cardInteraction)="onCardAction($event)">
|
|
271
248
|
</app-ai-card-renderer>
|
|
272
|
-
</
|
|
249
|
+
</div>
|
|
273
250
|
```
|
|
274
251
|
|
|
275
|
-
**HTML (
|
|
252
|
+
**HTML (with global styles or using OsiCardsContainerComponent):**
|
|
276
253
|
|
|
277
254
|
```html
|
|
278
|
-
<
|
|
255
|
+
<osi-cards-container [theme]="cardTheme">
|
|
279
256
|
<app-ai-card-renderer
|
|
280
257
|
[cardConfig]="card"
|
|
281
258
|
[streamingStage]="'complete'"
|
|
282
259
|
[showLoadingByDefault]="false"
|
|
283
|
-
[tiltEnabled]="true"
|
|
284
260
|
(cardInteraction)="onCardAction($event)">
|
|
285
261
|
</app-ai-card-renderer>
|
|
286
|
-
</
|
|
262
|
+
</osi-cards-container>
|
|
287
263
|
```
|
|
288
264
|
|
|
289
|
-
**Note**: The component approach is recommended because it automatically handles theme, perspective for tilt, and 3D transform context.
|
|
290
|
-
|
|
291
265
|
**Key Settings:**
|
|
292
266
|
- `[streamingStage]="'complete'"` → Card is fully loaded
|
|
293
267
|
- `[showLoadingByDefault]="false"` → No loading spinner
|
|
@@ -380,14 +354,14 @@ export class StreamingCardComponent {
|
|
|
380
354
|
}
|
|
381
355
|
```
|
|
382
356
|
|
|
383
|
-
**HTML (
|
|
357
|
+
**HTML (with scoped styles):**
|
|
384
358
|
|
|
385
359
|
```html
|
|
386
360
|
<button (click)="generateCard()" [disabled]="isStreaming">
|
|
387
361
|
{{ isStreaming ? 'Generating...' : 'Generate Card' }}
|
|
388
362
|
</button>
|
|
389
363
|
|
|
390
|
-
<osi-cards-container [theme]="cardTheme">
|
|
364
|
+
<div class="osi-cards-container" [attr.data-theme]="cardTheme">
|
|
391
365
|
<app-ai-card-renderer
|
|
392
366
|
[cardConfig]="card"
|
|
393
367
|
[isStreaming]="isStreaming"
|
|
@@ -396,20 +370,19 @@ export class StreamingCardComponent {
|
|
|
396
370
|
[showLoadingByDefault]="true"
|
|
397
371
|
[loadingMessages]="loadingMessages"
|
|
398
372
|
[loadingTitle]="'AI Analysis'"
|
|
399
|
-
[tiltEnabled]="true"
|
|
400
373
|
(cardInteraction)="onCardAction($event)">
|
|
401
374
|
</app-ai-card-renderer>
|
|
402
|
-
</
|
|
375
|
+
</div>
|
|
403
376
|
```
|
|
404
377
|
|
|
405
|
-
**HTML (
|
|
378
|
+
**HTML (with global styles or using OsiCardsContainerComponent):**
|
|
406
379
|
|
|
407
380
|
```html
|
|
408
381
|
<button (click)="generateCard()" [disabled]="isStreaming">
|
|
409
382
|
{{ isStreaming ? 'Generating...' : 'Generate Card' }}
|
|
410
383
|
</button>
|
|
411
384
|
|
|
412
|
-
<
|
|
385
|
+
<osi-cards-container [theme]="cardTheme">
|
|
413
386
|
<app-ai-card-renderer
|
|
414
387
|
[cardConfig]="card"
|
|
415
388
|
[isStreaming]="isStreaming"
|
|
@@ -418,10 +391,9 @@ export class StreamingCardComponent {
|
|
|
418
391
|
[showLoadingByDefault]="true"
|
|
419
392
|
[loadingMessages]="loadingMessages"
|
|
420
393
|
[loadingTitle]="'AI Analysis'"
|
|
421
|
-
[tiltEnabled]="true"
|
|
422
394
|
(cardInteraction)="onCardAction($event)">
|
|
423
395
|
</app-ai-card-renderer>
|
|
424
|
-
</
|
|
396
|
+
</osi-cards-container>
|
|
425
397
|
```
|
|
426
398
|
|
|
427
399
|
**Key Settings:**
|
|
@@ -1123,23 +1095,14 @@ If you want to keep the import in your styles file:
|
|
|
1123
1095
|
```
|
|
1124
1096
|
Then remove the `@import` from your `styles.scss`.
|
|
1125
1097
|
|
|
1126
|
-
3. **Wrap components in container** - You MUST wrap your components
|
|
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):**
|
|
1098
|
+
3. **Wrap components in container** - You MUST wrap your components:
|
|
1135
1099
|
```html
|
|
1136
|
-
<!-- ⚠️ Manual setup - requires both class and data-theme -->
|
|
1137
1100
|
<div class="osi-cards-container" data-theme="day">
|
|
1138
1101
|
<app-ai-card-renderer [cardConfig]="card"></app-ai-card-renderer>
|
|
1139
1102
|
</div>
|
|
1140
1103
|
```
|
|
1141
1104
|
|
|
1142
|
-
4. **Set theme attribute** -
|
|
1105
|
+
4. **Set theme attribute** - Add `data-theme="day"` or `data-theme="night"`:
|
|
1143
1106
|
```html
|
|
1144
1107
|
<div class="osi-cards-container" data-theme="day">
|
|
1145
1108
|
```
|
|
@@ -1168,9 +1131,8 @@ Import styles in your `styles.scss`:
|
|
|
1168
1131
|
|
|
1169
1132
|
**Common Issues:**
|
|
1170
1133
|
- ❌ **Wrong import path**: `@import 'osi-cards-Lib/styles/_styles-scoped'` (wrong casing)
|
|
1171
|
-
- ❌ **Missing container**: Components not wrapped in `.osi-cards-container`
|
|
1172
|
-
- ❌ **Missing theme**: No `data-theme` attribute on container
|
|
1173
|
-
- ❌ **Tilt not working**: Missing `perspective` on container (use `<osi-cards-container>` component which adds it automatically)
|
|
1134
|
+
- ❌ **Missing container**: Components not wrapped in `.osi-cards-container`
|
|
1135
|
+
- ❌ **Missing theme**: No `data-theme` attribute on container
|
|
1174
1136
|
- ❌ **SCSS not compiled**: Check that your build process compiles SCSS files
|
|
1175
1137
|
|
|
1176
1138
|
### Icons not showing
|