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.
Files changed (88) hide show
  1. package/README.md +20 -58
  2. package/fesm2022/osi-cards-lib.mjs +31878 -0
  3. package/fesm2022/osi-cards-lib.mjs.map +1 -0
  4. package/index.d.ts +11522 -0
  5. package/package.json +24 -12
  6. package/scripts/setup-angular-styles.js +169 -0
  7. package/styles/_components.scss +38 -0
  8. package/styles/_index.scss +25 -0
  9. package/styles/_osi-cards-mixins.scss +459 -0
  10. package/styles/_osi-cards-tokens.scss +333 -0
  11. package/styles/_styles-scoped.scss +81 -0
  12. package/styles/_styles.scss +26 -0
  13. package/styles/bundles/_ai-card.scss +245 -0
  14. package/styles/bundles/_all.scss +68 -0
  15. package/styles/bundles/_base.scss +60 -0
  16. package/styles/bundles/_card-skeleton.scss +290 -0
  17. package/styles/bundles/_index.scss +25 -0
  18. package/styles/bundles/_sections.scss +48 -0
  19. package/styles/bundles/_tokens-only.scss +139 -0
  20. package/styles/components/_ai-card-renderer.scss +104 -0
  21. package/styles/components/_badges.scss +317 -0
  22. package/styles/components/_card-actions.scss +169 -0
  23. package/styles/components/_card-footer.scss +47 -0
  24. package/styles/components/_component-styles.scss +205 -0
  25. package/styles/components/_empty-state.scss +630 -0
  26. package/styles/components/_hero-card.scss +422 -0
  27. package/styles/components/_image-fallback.scss +28 -0
  28. package/styles/components/_streaming-effects.scss +518 -0
  29. package/styles/components/cards/_ai-card.scss +718 -0
  30. package/styles/components/sections/_all-sections.generated.scss +41 -0
  31. package/styles/components/sections/_all-sections.scss +1086 -0
  32. package/styles/components/sections/_balanced-compact-system.scss +186 -0
  33. package/styles/components/sections/_compact-mixins.scss +180 -0
  34. package/styles/components/sections/_component-mixins.scss +454 -0
  35. package/styles/components/sections/_design-system.scss +477 -0
  36. package/styles/components/sections/_design-tokens.scss +308 -0
  37. package/styles/components/sections/_enhanced-design-variables.scss +147 -0
  38. package/styles/components/sections/_master-compact-system.scss +302 -0
  39. package/styles/components/sections/_master-dense-system.scss +239 -0
  40. package/styles/components/sections/_minimalistic-design.scss +268 -0
  41. package/styles/components/sections/_modern-effects.scss +392 -0
  42. package/styles/components/sections/_modern-sections.scss +351 -0
  43. package/styles/components/sections/_perfect-system.scss +204 -0
  44. package/styles/components/sections/_section-animations.scss +331 -0
  45. package/styles/components/sections/_section-shell.scss +337 -0
  46. package/styles/components/sections/_section-types.generated.scss +30 -0
  47. package/styles/components/sections/_sections-all.scss +26 -0
  48. package/styles/components/sections/_sections-base.scss +334 -0
  49. package/styles/components/sections/_typography-system.scss +327 -0
  50. package/styles/components/sections/_ultra-compact-tokens.scss +375 -0
  51. package/styles/components/sections/_unified-section-style.scss +157 -0
  52. package/styles/components/sections/_utility-classes.scss +567 -0
  53. package/styles/components/sections/_visual-effects-library.scss +374 -0
  54. package/styles/core/_animations.scss +1498 -0
  55. package/styles/core/_bootstrap-reset.scss +445 -0
  56. package/styles/core/_color-helpers.scss +46 -0
  57. package/styles/core/_global-unified.scss +118 -0
  58. package/styles/core/_global.scss +73 -0
  59. package/styles/core/_mixins.scss +491 -0
  60. package/styles/core/_surface-layers.scss +76 -0
  61. package/styles/core/_utilities.scss +326 -0
  62. package/styles/core/_variables-unified.scss +57 -0
  63. package/styles/core/_variables.scss +36 -0
  64. package/styles/core/variables/_colors-source.scss +34 -0
  65. package/styles/core/variables/_colors-unified.scss +26 -0
  66. package/styles/core/variables/_colors.scss +21 -0
  67. package/styles/critical.scss +353 -0
  68. package/styles/design-system/_compact-theme.scss +159 -0
  69. package/styles/design-system/_section-base.scss +426 -0
  70. package/styles/design-system/_tokens.scss +237 -0
  71. package/styles/design-system/_unified-sections.scss +215 -0
  72. package/styles/layout/_feature-grid.scss +322 -0
  73. package/styles/layout/_masonry.scss +734 -0
  74. package/styles/layout/_tilt.scss +244 -0
  75. package/styles/micro-interactions.scss +583 -0
  76. package/styles/mixins/_section-mixins.scss +280 -0
  77. package/styles/non-critical.scss +643 -0
  78. package/styles/reset/_framework-reset.scss +457 -0
  79. package/styles/reset/_index.scss +14 -0
  80. package/styles/reset/_shadow-reset.scss +383 -0
  81. package/styles/responsive.scss +326 -0
  82. package/styles/themes.scss +573 -0
  83. package/styles/tokens/_index.scss +92 -0
  84. package/styles/tokens/_master.scss +1404 -0
  85. package/styles/tokens/_section-tokens.generated.scss +140 -0
  86. package/postcss.config.js +0 -81
  87. package/section-registry.json +0 -3864
  88. 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. **RECOMMENDED: Use `<osi-cards-container>` component** (automatically handles theme and tilt):
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
- <!-- 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 -->
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 with manual setup -->
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. The component handles this automatically.
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 (RECOMMENDED - using OsiCardsContainerComponent):**
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
- </osi-cards-container>
249
+ </div>
273
250
  ```
274
251
 
275
- **HTML (Alternative - manual div setup):**
252
+ **HTML (with global styles or using OsiCardsContainerComponent):**
276
253
 
277
254
  ```html
278
- <div class="osi-cards-container" [attr.data-theme]="cardTheme">
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
- </div>
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 (RECOMMENDED - using OsiCardsContainerComponent):**
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
- </osi-cards-container>
375
+ </div>
403
376
  ```
404
377
 
405
- **HTML (Alternative - manual div setup):**
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
- <div class="osi-cards-container" [attr.data-theme]="cardTheme">
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
- </div>
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. **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):**
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** - The component handles this automatically via `[theme]` input. For manual setup, add `data-theme="day"` or `data-theme="night"`:
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` 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)
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