osi-cards-lib 1.5.42 → 1.5.43

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 (38) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/osi-cards-lib.mjs +5176 -3720
  3. package/fesm2022/osi-cards-lib.mjs.map +1 -1
  4. package/index.d.ts +134 -272
  5. package/package.json +4 -3
  6. package/styles/bundles/_ai-card.scss +10 -3
  7. package/styles/bundles/_card-skeleton.scss +1 -1
  8. package/styles/components/_ai-card-renderer.scss +0 -2
  9. package/styles/components/_card-actions.scss +2 -4
  10. package/styles/components/sections/_all-sections.generated.scss +0 -3
  11. package/styles/components/sections/_all-sections.scss +88 -64
  12. package/styles/components/sections/_compact-mixins.scss +9 -8
  13. package/styles/components/sections/_component-mixins.scss +40 -11
  14. package/styles/components/sections/_design-system.scss +96 -11
  15. package/styles/components/sections/_master-compact-system.scss +0 -17
  16. package/styles/components/sections/_minimalistic-design.scss +1 -4
  17. package/styles/components/sections/_modern-effects.scss +1 -3
  18. package/styles/components/sections/_modern-sections.scss +13 -69
  19. package/styles/components/sections/_section-animations.scss +158 -77
  20. package/styles/components/sections/_section-shell.scss +38 -9
  21. package/styles/components/sections/_section-types.generated.scss +0 -3
  22. package/styles/components/sections/_sections-all.scss +7 -0
  23. package/styles/components/sections/_sections-base.scss +340 -64
  24. package/styles/components/sections/_unified-section-style.scss +17 -44
  25. package/styles/components/sections/_visual-effects-library.scss +3 -3
  26. package/styles/core/_global-unified.scss +2 -6
  27. package/styles/core/_mixins.scss +1 -1
  28. package/styles/core/_surface-layers.scss +20 -11
  29. package/styles/design-system/_section-base.scss +9 -32
  30. package/styles/design-system/_tokens.scss +67 -5
  31. package/styles/design-system/_unified-sections.scss +21 -21
  32. package/styles/layout/_masonry.scss +22 -22
  33. package/styles/layout/_tilt.scss +3 -3
  34. package/styles/mixins/_section-mixins.scss +2 -2
  35. package/styles/reset/_shadow-reset.scss +3 -7
  36. package/styles/responsive.scss +9 -7
  37. package/styles/tokens/_master.scss +259 -66
  38. package/styles/tokens/_section-tokens.generated.scss +0 -7
@@ -23,7 +23,7 @@
23
23
  @use "compact-mixins" as compact;
24
24
 
25
25
  // Import base styles (legacy compatibility)
26
- @import "sections-base";
26
+ @use "sections-base" as *;
27
27
 
28
28
  // =====================================================================
29
29
  // GRID LAYOUTS
@@ -71,7 +71,7 @@
71
71
 
72
72
  // Section heading text
73
73
  @mixin section-heading-text {
74
- font-size: var(--section-title-font-size, 1.1rem);
74
+ font-size: var(--section-title-font-size, 0.9375rem); // 15px (reduced from 17.6px by 2px)
75
75
  font-weight: var(--section-title-font-weight, 700);
76
76
  letter-spacing: var(--section-title-letter-spacing, -0.02em);
77
77
  line-height: var(--section-title-line-height, 1.3);
@@ -81,10 +81,10 @@
81
81
 
82
82
  // Section description text
83
83
  @mixin section-description-text {
84
- font-size: var(--section-description-font-size, calc(0.8rem - 1px));
84
+ font-size: var(--section-description-font-size, 0.75rem);
85
85
  font-weight: 400;
86
86
  color: var(--card-text-secondary, #{$foreground-60});
87
- line-height: 1.4;
87
+ line-height: 1.3; // Reduced from 1.4 for tighter spacing
88
88
  margin: 0;
89
89
  }
90
90
 
@@ -182,15 +182,16 @@
182
182
  font-size: var(--card-title-font-size);
183
183
  font-weight: 600;
184
184
  color: var(--foreground);
185
- line-height: 1.4;
185
+ line-height: 1.3; // Reduced from 1.4 for tighter spacing
186
186
  font-family: inherit;
187
+ margin-bottom: 0.05em; // Reduced gap between title and content
187
188
  }
188
189
 
189
190
  @mixin card-subtitle-text {
190
191
  font-size: var(--card-subtitle-font-size);
191
192
  font-weight: 400;
192
193
  color: var(--muted-foreground);
193
- line-height: 1.5;
194
+ line-height: 1.3; // Reduced from 1.5 for tighter spacing
194
195
  font-family: inherit;
195
196
  }
196
197
 
@@ -216,11 +217,29 @@
216
217
  display: flex;
217
218
  flex-direction: column;
218
219
  gap: var(--section-card-gap);
219
- padding: var(--section-padding);
220
+ padding: 0 !important; // No padding - sections should use 100% width
220
221
  border-radius: var(--osi-section-item-border-radius);
221
222
  background: var(--section-background);
222
223
  border: var(--section-border);
223
224
  box-shadow: var(--section-box-shadow);
225
+ width: 100% !important; // Ensure full width
226
+ max-width: 100% !important; // Ensure full width
227
+ box-sizing: border-box !important; // Include border in width calculation
228
+
229
+ // Smooth transitions for hover effects
230
+ transition:
231
+ border-color var(--osi-card-transition-normal, 0.22s) cubic-bezier(0.4, 0, 0.2, 1),
232
+ box-shadow var(--osi-card-transition-normal, 0.22s) cubic-bezier(0.4, 0, 0.2, 1);
233
+
234
+ // Hover state: gentle shadow with 30% more contrasty cool color and 20% more contrasty border
235
+ &:hover {
236
+ border-color: var(--osi-section-border-hover-enhanced-color);
237
+ box-shadow: var(--osi-section-shadow-hover-enhanced);
238
+ }
239
+
240
+ @media (prefers-reduced-motion: reduce) {
241
+ transition: none;
242
+ }
224
243
  }
225
244
 
226
245
  // =====================================================================
@@ -364,12 +383,13 @@
364
383
  // =====================================================================
365
384
 
366
385
  // Modern card variants
367
- @mixin card-elevated {
368
- @include components.card-elevated;
386
+ // Quick access aliases for card variants
387
+ @mixin card-elevated($spacing: "normal") {
388
+ @include components.card-elevated($spacing);
369
389
  }
370
390
 
371
- @mixin card-glass {
372
- @include components.card-glass;
391
+ @mixin card-glass($spacing: "normal") {
392
+ @include components.card-glass($spacing);
373
393
  }
374
394
 
375
395
  // Typography quick access
@@ -475,3 +495,68 @@
475
495
  // ```
476
496
  //
477
497
  // =====================================================================
498
+ // GLOBAL TITLE/PARAGRAPH GAP REDUCTION
499
+ // =====================================================================
500
+ // Reduce gaps between titles and paragraphs across all sections
501
+
502
+ .ai-section {
503
+ // Reduce gaps for common title/paragraph patterns
504
+ h1,
505
+ h2,
506
+ h3,
507
+ h4,
508
+ h5,
509
+ h6,
510
+ [class*="title"],
511
+ [class*="heading"],
512
+ [class*="header"] {
513
+ margin-bottom: 0.05em !important; // Minimized gap between title and paragraph
514
+ line-height: 1.3 !important;
515
+ }
516
+
517
+ // Reduce line breaks spacing
518
+ br {
519
+ margin-top: 0.05em !important; // Minimized gap between paragraphs
520
+ line-height: 1.3 !important;
521
+ }
522
+
523
+ // Reduce spacing for paragraphs following titles
524
+ p,
525
+ div,
526
+ span {
527
+ line-height: 1.3 !important;
528
+ }
529
+
530
+ // When paragraphs/content immediately follow a title/heading
531
+ h1 + p,
532
+ h1 + div,
533
+ h1 + span,
534
+ h2 + p,
535
+ h2 + div,
536
+ h2 + span,
537
+ h3 + p,
538
+ h3 + div,
539
+ h3 + span,
540
+ h4 + p,
541
+ h4 + div,
542
+ h4 + span,
543
+ h5 + p,
544
+ h5 + div,
545
+ h5 + span,
546
+ h6 + p,
547
+ h6 + div,
548
+ h6 + span,
549
+ [class*="title"] + p,
550
+ [class*="title"] + div,
551
+ [class*="title"] + span,
552
+ [class*="heading"] + p,
553
+ [class*="heading"] + div,
554
+ [class*="heading"] + span,
555
+ [class*="header"] + p,
556
+ [class*="header"] + div,
557
+ [class*="header"] + span {
558
+ margin-top: 0.05em !important;
559
+ }
560
+ }
561
+
562
+ // =====================================================================
@@ -141,27 +141,10 @@
141
141
  transition: all 200ms ease-out;
142
142
  box-sizing: border-box;
143
143
 
144
- // Accent line (consistent across all cards)
145
- &::before {
146
- content: "";
147
- position: absolute;
148
- top: 0;
149
- left: 0;
150
- right: 0;
151
- height: 1px;
152
- background: var(--accent, #ff7900);
153
- opacity: 0;
154
- transition: opacity 200ms ease-out;
155
- }
156
-
157
144
  &:hover {
158
145
  border-color: rgba(255, 255, 255, 0.12);
159
146
  transform: translateY(-1px);
160
147
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
161
-
162
- &::before {
163
- opacity: 0.6;
164
- }
165
148
  }
166
149
  }
167
150
 
@@ -72,18 +72,15 @@
72
72
  }
73
73
  }
74
74
 
75
- // Minimal card accent - left border only
75
+ // Minimal card accent - no left border
76
76
  @mixin minimal-card-accent {
77
77
  background: transparent;
78
78
  border: none;
79
- border-left: var(--minimal-accent-line) solid var(--accent);
80
79
  padding: var(--minimal-card-padding);
81
- padding-left: calc(var(--minimal-card-padding) + 4px);
82
80
  transition: all 200ms var(--ease-out);
83
81
 
84
82
  &:hover {
85
83
  background: var(--minimal-surface-hover);
86
- padding-left: calc(var(--minimal-card-padding) + 6px);
87
84
  }
88
85
  }
89
86
 
@@ -157,9 +157,7 @@
157
157
 
158
158
  // Focus state (keyboard navigation)
159
159
  &:focus-visible {
160
- outline: 2px solid var(--accent);
161
- outline-offset: 2px;
162
- box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
160
+ outline: none;
163
161
  }
164
162
 
165
163
  // Disabled state
@@ -13,44 +13,15 @@
13
13
  // UNIFIED CARD - Single Source
14
14
  // =====================================================================
15
15
 
16
- @mixin unified-card {
17
- // Background & Border - from CSS vars
18
- background: var(--osi-section-item-background);
19
- border: var(--osi-section-item-border);
20
- border-radius: var(--osi-section-item-border-radius);
21
-
22
- // Layout
23
- display: flex;
24
- flex-direction: column;
25
- gap: var(--card-element-gap-md);
26
- padding: var(--space-3) var(--space-4);
27
-
28
- // Interaction
29
- cursor: pointer;
30
- position: relative;
31
- overflow: hidden;
32
- box-sizing: border-box;
33
-
34
- // Smooth transitions - subtle
35
- transition:
36
- background var(--duration-normal) var(--ease-out-smooth),
37
- border-color var(--duration-normal) var(--ease-out-smooth),
38
- box-shadow var(--duration-normal) var(--ease-out-smooth);
39
-
40
- &:hover {
41
- background: var(--osi-section-item-background-hover);
42
- border-color: var(--osi-section-item-border-hover);
43
- box-shadow: var(--osi-section-item-shadow-hover);
44
- }
45
-
46
- &:focus-visible {
47
- outline: var(--border-width-accent-sm) solid var(--accent);
48
- outline-offset: var(--border-width-accent-sm);
49
- }
16
+ // =====================================================================
17
+ // UNIFIED CARD MIXIN - DEPRECATED
18
+ // =====================================================================
19
+ // @deprecated Use @include card instead
20
+ // This mixin is kept for backward compatibility but simply redirects to the base card mixin.
50
21
 
51
- @media (prefers-reduced-motion: reduce) {
52
- transition: none;
53
- }
22
+ @mixin unified-card {
23
+ @include card("normal");
24
+ @warn "unified-card mixin is deprecated. Use @include card instead.";
54
25
  }
55
26
 
56
27
  // =====================================================================
@@ -313,39 +284,12 @@
313
284
  }
314
285
 
315
286
  // =====================================================================
316
- // STREAMING ANIMATIONS
287
+ // STREAMING ANIMATIONS - DEPRECATED
317
288
  // =====================================================================
318
-
319
- @keyframes unified-stream-in {
320
- 0% {
321
- opacity: 0;
322
- transform: translate3d(0, var(--motion-distance-sm), 0);
323
- }
324
- 100% {
325
- opacity: 1;
326
- transform: translate3d(0, 0, 0);
327
- }
328
- }
289
+ // @deprecated Use @include item-animation from _sections-base.scss instead
290
+ // This mixin is kept for backward compatibility but redirects to the standard animation mixin.
329
291
 
330
292
  @mixin stream-animation {
331
- &.section-item-streaming,
332
- &.item-streaming,
333
- &.field-streaming {
334
- animation: unified-stream-in var(--duration-moderate) var(--ease-out-smooth)
335
- var(--animation-fill-mode);
336
- }
337
-
338
- &.section-item-entered,
339
- &.item-entered,
340
- &.field-entered {
341
- animation: none;
342
- }
343
-
344
- @for $i from 0 through 15 {
345
- &.section-item-stagger-#{$i},
346
- &.item-stagger-#{$i},
347
- &.field-stagger-#{$i} {
348
- animation-delay: calc(#{$i} * var(--stagger-delay-base));
349
- }
350
- }
293
+ @include item-animation;
294
+ @warn "stream-animation is deprecated. Use @include item-animation instead.";
351
295
  }
@@ -10,6 +10,127 @@
10
10
 
11
11
  @use "design-tokens" as *;
12
12
 
13
+ // =====================================================================
14
+ // METAL REFLECTION EFFECT
15
+ // =====================================================================
16
+ //
17
+ // Adds a subtle metallic reflection effect on hover with sweeping animation.
18
+ // Direction can be left-to-right (ltr) or right-to-left (rtl).
19
+ // The effect sweeps across the element like light on metal.
20
+ //
21
+
22
+ // Keyframe animation for metal sweep effect - fully vertical, more discrete
23
+ @keyframes metal-sweep-ltr {
24
+ 0% {
25
+ transform: translateX(-100%);
26
+ opacity: 0;
27
+ }
28
+ 20% {
29
+ opacity: 0.3;
30
+ }
31
+ 50% {
32
+ opacity: 0.5;
33
+ }
34
+ 80% {
35
+ opacity: 0.3;
36
+ }
37
+ 100% {
38
+ transform: translateX(200%);
39
+ opacity: 0;
40
+ }
41
+ }
42
+
43
+ @keyframes metal-sweep-rtl {
44
+ 0% {
45
+ transform: translateX(200%);
46
+ opacity: 0;
47
+ }
48
+ 20% {
49
+ opacity: 0.3;
50
+ }
51
+ 50% {
52
+ opacity: 0.5;
53
+ }
54
+ 80% {
55
+ opacity: 0.3;
56
+ }
57
+ 100% {
58
+ transform: translateX(-100%);
59
+ opacity: 0;
60
+ }
61
+ }
62
+
63
+ @mixin section-metal-reflection($direction: "ltr") {
64
+ position: relative;
65
+ overflow: hidden;
66
+
67
+ // Use ::before for metal reflection to avoid conflicts with ::after used by components
68
+ &::before {
69
+ content: "";
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ right: 0;
74
+ bottom: 0;
75
+ pointer-events: none;
76
+ z-index: 1;
77
+ opacity: 0;
78
+ border-radius: inherit;
79
+ // Reset animation state
80
+ animation: none;
81
+
82
+ @if $direction == "ltr" {
83
+ // Left-to-right reflection with sweep animation - more discrete
84
+ background: linear-gradient(
85
+ 90deg,
86
+ transparent 0%,
87
+ rgba(255, 255, 255, 0.2) 20%,
88
+ rgba(255, 255, 255, 0.3) 40%,
89
+ rgba(255, 255, 255, 0.2) 60%,
90
+ transparent 100%
91
+ );
92
+ width: 50%;
93
+ } @else {
94
+ // Right-to-left reflection with sweep animation - more discrete
95
+ background: linear-gradient(
96
+ 270deg,
97
+ transparent 0%,
98
+ rgba(255, 255, 255, 0.2) 20%,
99
+ rgba(255, 255, 255, 0.3) 40%,
100
+ rgba(255, 255, 255, 0.2) 60%,
101
+ transparent 100%
102
+ );
103
+ width: 50%;
104
+ }
105
+
106
+ // Use overlay blend mode for metallic appearance
107
+ mix-blend-mode: overlay;
108
+ }
109
+
110
+ // Trigger animation on hover - each item independently
111
+ &:hover::before {
112
+ opacity: 1;
113
+ // Play animation on hover - restart animation each time for this specific item
114
+ @if $direction == "ltr" {
115
+ animation: metal-sweep-ltr 0.23s ease-out forwards;
116
+ } @else {
117
+ animation: metal-sweep-rtl 0.23s ease-out forwards;
118
+ }
119
+ }
120
+
121
+ // Reset animation when hover ends so it can play again
122
+ &:not(:hover)::before {
123
+ animation: none;
124
+ opacity: 0;
125
+ }
126
+
127
+ @media (prefers-reduced-motion: reduce) {
128
+ &::before {
129
+ display: none;
130
+ }
131
+ }
132
+ }
133
+
13
134
  // =====================================================================
14
135
  // STANDARD CARD HOVER EFFECT
15
136
  // =====================================================================
@@ -19,15 +140,17 @@
19
140
  //
20
141
 
21
142
  @mixin section-card-hover {
22
- transition:
23
- box-shadow var(--duration-base) var(--ease-out),
24
- background var(--duration-base) var(--ease-out),
25
- border-color var(--duration-base) var(--ease-out);
143
+ // Use standardized transition token
144
+ transition: var(--osi-section-item-transition);
145
+
146
+ // Add metal reflection effect (default left-to-right)
147
+ @include section-metal-reflection("ltr");
26
148
 
27
149
  &:hover {
28
- box-shadow: var(--shadow-lg);
29
- background: var(--osi-section-item-background-hover);
30
- border-color: var(--osi-section-item-border-hover);
150
+ // Keep background unchanged - only border and shadow change
151
+ // background: var(--osi-section-item-background-hover); // Removed - background stays the same
152
+ border-color: var(--osi-section-item-border-hover-enhanced-color);
153
+ box-shadow: var(--osi-section-item-shadow-hover-enhanced);
31
154
  }
32
155
 
33
156
  &:focus-visible {
@@ -60,6 +183,9 @@
60
183
  background var(--duration-slow) var(--ease-out),
61
184
  border-color var(--duration-slow) var(--ease-out);
62
185
 
186
+ // Add metal reflection effect (default left-to-right)
187
+ @include section-metal-reflection("ltr");
188
+
63
189
  &:hover {
64
190
  box-shadow: var(--shadow-xl);
65
191
  background: var(--osi-section-item-background-hover);
@@ -83,6 +209,9 @@
83
209
  box-shadow var(--duration-base) var(--ease-out),
84
210
  background var(--duration-base) var(--ease-out);
85
211
 
212
+ // Add metal reflection effect (default left-to-right)
213
+ @include section-metal-reflection("ltr");
214
+
86
215
  &:hover {
87
216
  box-shadow: var(--shadow-md);
88
217
  background: var(--osi-section-item-background-hover);
@@ -101,15 +230,16 @@
101
230
  //
102
231
 
103
232
  @mixin section-list-item-hover {
104
- transition:
105
- background var(--duration-base) var(--ease-out),
106
- color var(--duration-base) var(--ease-out),
107
- border-color var(--duration-base) var(--ease-out);
233
+ // Use standardized transition token
234
+ transition: var(--osi-section-item-transition);
235
+
236
+ // Add metal reflection effect (default left-to-right)
237
+ @include section-metal-reflection("ltr");
108
238
 
109
239
  &:hover {
110
- background: var(--surface-raised);
240
+ background: var(--osi-section-item-background-hover);
111
241
  color: var(--foreground);
112
- border-color: var(--border-strong);
242
+ border-color: var(--osi-section-item-border-hover);
113
243
  }
114
244
 
115
245
  @media (prefers-reduced-motion: reduce) {
@@ -203,20 +333,10 @@
203
333
  }
204
334
 
205
335
  // =====================================================================
206
- // ENTRANCE ANIMATIONS
336
+ // ENTRANCE ANIMATIONS - DEPRECATED
207
337
  // =====================================================================
208
- //
209
- // Keyframe animations for section/item entrance.
210
- //
211
-
212
- @keyframes section-item-stream {
213
- 0% {
214
- opacity: 0;
215
- }
216
- 100% {
217
- opacity: 1;
218
- }
219
- }
338
+ // @deprecated Use @keyframes item-stream from _sections-base.scss instead
339
+ // This keyframe is kept for backward compatibility.
220
340
 
221
341
  @keyframes section-fade-in {
222
342
  from {
@@ -243,64 +363,25 @@
243
363
  // For animating lists of items with staggered delays.
244
364
  //
245
365
 
246
- @mixin section-item-animation {
247
- &.section-item-streaming {
248
- animation: section-item-stream var(--duration-base) var(--ease-out) forwards;
249
- }
250
-
251
- &.section-item-entered {
252
- animation: none;
253
- }
254
-
255
- @for $i from 0 through 15 {
256
- &.section-item-stagger-#{$i} {
257
- animation-delay: calc(#{$i} * 30ms);
258
- }
259
- }
366
+ // =====================================================================
367
+ // ANIMATION MIXINS - DEPRECATED
368
+ // =====================================================================
369
+ // @deprecated Use @include item-animation from _sections-base.scss instead
370
+ // These mixins are kept for backward compatibility but redirect to the standard mixin.
260
371
 
261
- @media (prefers-reduced-motion: reduce) {
262
- animation: none !important;
263
- }
372
+ @mixin section-item-animation {
373
+ @include item-animation;
374
+ @warn "section-item-animation from _section-animations.scss is deprecated. Use @include item-animation from _sections-base.scss instead.";
264
375
  }
265
376
 
266
377
  @mixin legacy-item-animation {
267
- &.item-streaming {
268
- animation: section-item-stream var(--duration-base) var(--ease-out) forwards;
269
- }
270
-
271
- &.item-entered {
272
- animation: none;
273
- }
274
-
275
- @for $i from 0 through 15 {
276
- &.item-stagger-#{$i} {
277
- animation-delay: calc(#{$i} * 30ms);
278
- }
279
- }
280
-
281
- @media (prefers-reduced-motion: reduce) {
282
- animation: none !important;
283
- }
378
+ @include item-animation;
379
+ @warn "legacy-item-animation from _section-animations.scss is deprecated. Use @include item-animation from _sections-base.scss instead.";
284
380
  }
285
381
 
286
382
  @mixin legacy-field-animation {
287
- &.field-streaming {
288
- animation: section-item-stream var(--duration-base) var(--ease-out) forwards;
289
- }
290
-
291
- &.field-entered {
292
- animation: none;
293
- }
294
-
295
- @for $i from 0 through 15 {
296
- &.field-stagger-#{$i} {
297
- animation-delay: calc(#{$i} * 30ms);
298
- }
299
- }
300
-
301
- @media (prefers-reduced-motion: reduce) {
302
- animation: none !important;
303
- }
383
+ @include item-animation;
384
+ @warn "legacy-field-animation from _section-animations.scss is deprecated. Use @include item-animation from _sections-base.scss instead.";
304
385
  }
305
386
 
306
387
  // =====================================================================