osi-cards-lib 1.5.40 → 1.5.42
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/fesm2022/osi-cards-lib.mjs +1749 -172
- package/fesm2022/osi-cards-lib.mjs.map +1 -1
- package/index.d.ts +212 -10
- package/package.json +1 -1
- package/scripts/setup-angular-styles.js +1 -0
- package/styles/bundles/_ai-card.scss +1 -1
- package/styles/components/_badges.scss +1 -2
- package/styles/components/_card-actions.scss +3 -0
- package/styles/components/_component-styles.scss +1 -1
- package/styles/components/cards/_ai-card.scss +7 -13
- package/styles/components/sections/_design-system.scss +1 -1
- package/styles/components/sections/_design-tokens.scss +1 -1
- package/styles/components/sections/_section-shell.scss +37 -1
- package/styles/components/sections/_sections-base.scss +102 -0
- package/styles/core/_bootstrap-reset.scss +1 -1
- package/styles/core/_mixins.scss +3 -3
- package/styles/design-system/_tokens.scss +1 -1
- package/styles/design-system/_unified-sections.scss +2 -23
- package/styles/layout/_masonry.scss +12 -10
- package/styles/tokens/_master.scss +17 -18
|
@@ -18,6 +18,14 @@
|
|
|
18
18
|
grid-template-columns: repeat(auto-fit, minmax($min-width, 1fr));
|
|
19
19
|
min-height: 0;
|
|
20
20
|
box-sizing: border-box;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
overflow-x: hidden;
|
|
23
|
+
word-wrap: break-word;
|
|
24
|
+
overflow-wrap: break-word;
|
|
25
|
+
|
|
26
|
+
@media (max-width: 600px) {
|
|
27
|
+
grid-template-columns: 1fr;
|
|
28
|
+
}
|
|
21
29
|
|
|
22
30
|
@media (max-width: 420px) {
|
|
23
31
|
grid-template-columns: 1fr;
|
|
@@ -34,10 +42,100 @@
|
|
|
34
42
|
grid-template-columns: repeat(auto-fit, minmax($min-width, 1fr));
|
|
35
43
|
min-height: 0;
|
|
36
44
|
box-sizing: border-box;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
overflow-x: hidden;
|
|
47
|
+
word-wrap: break-word;
|
|
48
|
+
overflow-wrap: break-word;
|
|
37
49
|
|
|
38
50
|
@media (max-width: $tablet-breakpoint) {
|
|
39
51
|
grid-template-columns: 1fr;
|
|
40
52
|
}
|
|
53
|
+
|
|
54
|
+
@media (max-width: 600px) {
|
|
55
|
+
grid-template-columns: 1fr;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// =====================================================================
|
|
60
|
+
// RESPONSIVE SINGLE COLUMN MIXIN
|
|
61
|
+
// =====================================================================
|
|
62
|
+
|
|
63
|
+
@mixin responsive-single-column($breakpoint: 600px) {
|
|
64
|
+
@media (max-width: $breakpoint) {
|
|
65
|
+
grid-template-columns: 1fr !important;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// =====================================================================
|
|
70
|
+
// TEXT OVERFLOW ELLIPSIS MIXIN
|
|
71
|
+
// =====================================================================
|
|
72
|
+
|
|
73
|
+
@mixin text-overflow-ellipsis($lines: 1) {
|
|
74
|
+
@if $lines == unset {
|
|
75
|
+
display: block;
|
|
76
|
+
-webkit-line-clamp: unset;
|
|
77
|
+
overflow: visible;
|
|
78
|
+
} @else {
|
|
79
|
+
display: -webkit-box;
|
|
80
|
+
-webkit-line-clamp: $lines;
|
|
81
|
+
-webkit-box-orient: vertical;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
text-overflow: ellipsis;
|
|
84
|
+
}
|
|
85
|
+
word-break: break-word;
|
|
86
|
+
overflow-wrap: break-word;
|
|
87
|
+
word-wrap: break-word;
|
|
88
|
+
max-width: 100%;
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// =====================================================================
|
|
93
|
+
// EXPANDABLE TEXT MIXIN
|
|
94
|
+
// =====================================================================
|
|
95
|
+
|
|
96
|
+
@mixin expandable-text($max-lines: 3) {
|
|
97
|
+
display: -webkit-box;
|
|
98
|
+
-webkit-line-clamp: $max-lines;
|
|
99
|
+
-webkit-box-orient: vertical;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
word-break: break-word;
|
|
102
|
+
overflow-wrap: break-word;
|
|
103
|
+
word-wrap: break-word;
|
|
104
|
+
max-width: 100%;
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
|
|
107
|
+
&--expanded {
|
|
108
|
+
display: block;
|
|
109
|
+
-webkit-line-clamp: unset;
|
|
110
|
+
overflow: visible;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// =====================================================================
|
|
115
|
+
// BUTTON TEXT MINIMAL MIXIN
|
|
116
|
+
// =====================================================================
|
|
117
|
+
|
|
118
|
+
@mixin button-text-minimal {
|
|
119
|
+
align-self: flex-start;
|
|
120
|
+
background: none;
|
|
121
|
+
border: none;
|
|
122
|
+
color: var(--accent);
|
|
123
|
+
font-size: 0.7rem;
|
|
124
|
+
font-weight: var(--font-medium);
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
padding: var(--osi-spacing-compact-xs, 2px) 0;
|
|
127
|
+
transition: opacity 200ms var(--ease-out);
|
|
128
|
+
|
|
129
|
+
&:hover {
|
|
130
|
+
text-decoration: underline;
|
|
131
|
+
opacity: 0.8;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:focus-visible {
|
|
135
|
+
outline: 2px solid var(--accent);
|
|
136
|
+
outline-offset: 2px;
|
|
137
|
+
border-radius: 2px;
|
|
138
|
+
}
|
|
41
139
|
}
|
|
42
140
|
|
|
43
141
|
// =====================================================================
|
|
@@ -59,8 +157,12 @@
|
|
|
59
157
|
cursor: pointer;
|
|
60
158
|
position: relative;
|
|
61
159
|
overflow: hidden;
|
|
160
|
+
overflow-x: hidden; /* Prevent horizontal scrolling */
|
|
161
|
+
max-width: 100%;
|
|
62
162
|
box-sizing: border-box;
|
|
63
163
|
text-align: left;
|
|
164
|
+
word-wrap: break-word;
|
|
165
|
+
overflow-wrap: break-word;
|
|
64
166
|
|
|
65
167
|
transition:
|
|
66
168
|
background var(--duration-base) var(--ease-out),
|
|
@@ -339,7 +339,7 @@ article.ai-card-surface {
|
|
|
339
339
|
/* Section card variables */
|
|
340
340
|
--section-card-min-height: 110px;
|
|
341
341
|
--section-card-compact-height: 90px;
|
|
342
|
-
--section-header-gap:
|
|
342
|
+
--section-header-gap: 2px;
|
|
343
343
|
--section-content-gap: var(--spacing-sm);
|
|
344
344
|
--section-card-gap: var(--spacing-md);
|
|
345
345
|
--section-card-padding: var(--spacing-md);
|
package/styles/core/_mixins.scss
CHANGED
|
@@ -299,7 +299,7 @@ $osi-use-important: true !default;
|
|
|
299
299
|
/// @param {Length} $gap - Gap between items
|
|
300
300
|
@mixin osi-grid(
|
|
301
301
|
$min-width: var(--section-grid-min-width, 200px),
|
|
302
|
-
$gap: var(--section-card-gap,
|
|
302
|
+
$gap: var(--section-card-gap, 8px)
|
|
303
303
|
) {
|
|
304
304
|
@include display(grid);
|
|
305
305
|
@include grid-columns(repeat(auto-fit, minmax($min-width, 1fr)));
|
|
@@ -315,7 +315,7 @@ $osi-use-important: true !default;
|
|
|
315
315
|
|
|
316
316
|
/// Flex column stack for vertical lists
|
|
317
317
|
/// @param {Length} $gap - Gap between items
|
|
318
|
-
@mixin osi-stack($gap: var(--section-stack-gap,
|
|
318
|
+
@mixin osi-stack($gap: var(--section-stack-gap, 8px)) {
|
|
319
319
|
@include display(flex);
|
|
320
320
|
@include flex-direction(column);
|
|
321
321
|
@include gap($gap);
|
|
@@ -326,7 +326,7 @@ $osi-use-important: true !default;
|
|
|
326
326
|
/// Fixed column grid
|
|
327
327
|
/// @param {Number} $columns - Number of columns
|
|
328
328
|
/// @param {Length} $gap - Gap between items
|
|
329
|
-
@mixin osi-grid-fixed($columns: 2, $gap: var(--section-card-gap,
|
|
329
|
+
@mixin osi-grid-fixed($columns: 2, $gap: var(--section-card-gap, 8px)) {
|
|
330
330
|
@include display(grid);
|
|
331
331
|
@include grid-columns(repeat($columns, 1fr));
|
|
332
332
|
@include gap($gap);
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--osi-spacing-3xl: 48px;
|
|
18
18
|
|
|
19
19
|
// Section-specific spacing (More compact by default)
|
|
20
|
-
--osi-section-header-gap:
|
|
20
|
+
--osi-section-header-gap: 2px; // Reduced gap between title and subtitle
|
|
21
21
|
--osi-section-padding: var(--osi-spacing-sm); // 8px (was 12px)
|
|
22
22
|
--osi-section-gap: var(--osi-spacing-md); // 12px (was 16px)
|
|
23
23
|
--osi-item-padding: var(--osi-spacing-sm); // 8px (was 12px)
|
|
@@ -16,24 +16,16 @@
|
|
|
16
16
|
font-weight: var(--osi-font-semibold); // 600
|
|
17
17
|
line-height: var(--osi-leading-snug); // 1.375
|
|
18
18
|
color: var(--osi-foreground);
|
|
19
|
-
|
|
20
|
-
@include mobile {
|
|
21
|
-
font-size: var(--osi-text-sm); // Keep same on mobile
|
|
22
|
-
}
|
|
23
19
|
}
|
|
24
20
|
|
|
25
21
|
// Item labels (small uppercase text)
|
|
26
22
|
@mixin unified-item-label {
|
|
27
|
-
font-size: 0.7rem; // 11.2px - Compact
|
|
23
|
+
font-size: 0.7rem; // 11.2px - Compact, fixed size
|
|
28
24
|
font-weight: var(--osi-font-medium); // 500
|
|
29
25
|
line-height: var(--osi-leading-tight); // 1.25
|
|
30
26
|
color: var(--osi-muted-foreground);
|
|
31
27
|
text-transform: uppercase;
|
|
32
28
|
letter-spacing: 0.04em;
|
|
33
|
-
|
|
34
|
-
@include mobile {
|
|
35
|
-
font-size: 0.65rem; // 10.4px on mobile
|
|
36
|
-
}
|
|
37
29
|
}
|
|
38
30
|
|
|
39
31
|
// Item values (prominent text/numbers)
|
|
@@ -42,10 +34,6 @@
|
|
|
42
34
|
font-weight: var(--osi-font-semibold); // 600
|
|
43
35
|
line-height: var(--osi-leading-normal); // 1.5
|
|
44
36
|
color: var(--osi-foreground);
|
|
45
|
-
|
|
46
|
-
@include mobile {
|
|
47
|
-
font-size: var(--osi-text-sm); // Keep same on mobile
|
|
48
|
-
}
|
|
49
37
|
}
|
|
50
38
|
|
|
51
39
|
// Item descriptions (secondary text)
|
|
@@ -54,25 +42,16 @@
|
|
|
54
42
|
font-weight: var(--osi-font-normal); // 400
|
|
55
43
|
line-height: var(--osi-leading-relaxed); // 1.625
|
|
56
44
|
color: var(--osi-muted-foreground);
|
|
57
|
-
|
|
58
|
-
@include mobile {
|
|
59
|
-
font-size: var(--osi-text-xs); // Keep same on mobile
|
|
60
|
-
line-height: var(--osi-leading-normal); // Tighter on mobile
|
|
61
|
-
}
|
|
62
45
|
}
|
|
63
46
|
|
|
64
47
|
// Number displays (metrics, analytics)
|
|
65
48
|
@mixin unified-number-display {
|
|
66
|
-
font-size: var(--osi-text-xl); // 24px -
|
|
49
|
+
font-size: var(--osi-text-xl); // 24px - Fixed size for all screen sizes
|
|
67
50
|
font-weight: var(--osi-font-bold); // 700
|
|
68
51
|
line-height: 1;
|
|
69
52
|
letter-spacing: var(--osi-tracking-tight);
|
|
70
53
|
font-variant-numeric: tabular-nums;
|
|
71
54
|
color: var(--osi-foreground);
|
|
72
|
-
|
|
73
|
-
@include mobile {
|
|
74
|
-
font-size: var(--osi-text-lg); // 20px on mobile
|
|
75
|
-
}
|
|
76
55
|
}
|
|
77
56
|
|
|
78
57
|
// ═══════════════════════════════════════════════════════════════════
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
display: grid !important;
|
|
18
18
|
grid-template-columns: repeat(auto-fill, minmax(var(--section-grid-min-width, 260px), 1fr));
|
|
19
19
|
grid-template-rows: masonry;
|
|
20
|
-
gap: var(--section-card-gap,
|
|
20
|
+
gap: var(--section-card-gap, 8px);
|
|
21
21
|
align-tracks: stretch;
|
|
22
22
|
|
|
23
23
|
/* Native masonry doesn't need absolute positioning */
|
|
@@ -116,14 +116,17 @@
|
|
|
116
116
|
height: fit-content;
|
|
117
117
|
min-height: fit-content;
|
|
118
118
|
width: 100%;
|
|
119
|
+
max-width: 100%;
|
|
119
120
|
break-inside: avoid;
|
|
120
121
|
page-break-inside: avoid;
|
|
121
122
|
display: flex;
|
|
122
123
|
flex-direction: column;
|
|
123
124
|
overflow: visible;
|
|
125
|
+
overflow-x: hidden; /* Prevent horizontal scrolling */
|
|
124
126
|
box-sizing: border-box;
|
|
125
127
|
overflow-wrap: break-word;
|
|
126
128
|
word-wrap: break-word;
|
|
129
|
+
word-break: break-word; /* Break long unbreakable strings */
|
|
127
130
|
|
|
128
131
|
/* Performance optimization: CSS containment */
|
|
129
132
|
contain: layout style paint;
|
|
@@ -155,6 +158,11 @@
|
|
|
155
158
|
height: auto !important;
|
|
156
159
|
min-height: fit-content !important;
|
|
157
160
|
max-height: none !important;
|
|
161
|
+
max-width: 100% !important;
|
|
162
|
+
box-sizing: border-box !important;
|
|
163
|
+
word-wrap: break-word !important;
|
|
164
|
+
overflow-wrap: break-word !important;
|
|
165
|
+
overflow-x: hidden !important;
|
|
158
166
|
}
|
|
159
167
|
|
|
160
168
|
/* ============================================================
|
|
@@ -284,12 +292,6 @@
|
|
|
284
292
|
}
|
|
285
293
|
}
|
|
286
294
|
|
|
287
|
-
.masonry-item[data-priority="2"],
|
|
288
|
-
.masonry-item[data-priority="3"] {
|
|
289
|
-
/* Priority 2 and 3 sections - no special border, use unified styling */
|
|
290
|
-
/* Left accent border removed for consistency */
|
|
291
|
-
}
|
|
292
|
-
|
|
293
295
|
/* Flex grow sections - expand to fill space */
|
|
294
296
|
.masonry-item--flex-grow {
|
|
295
297
|
flex-grow: 1 !important;
|
|
@@ -551,17 +553,17 @@
|
|
|
551
553
|
}
|
|
552
554
|
|
|
553
555
|
.masonry-skeleton--single {
|
|
554
|
-
width: calc((100% - var(--masonry-gap,
|
|
556
|
+
width: calc((100% - var(--masonry-gap, 8px) * 3) / 4);
|
|
555
557
|
height: 180px;
|
|
556
558
|
}
|
|
557
559
|
|
|
558
560
|
.masonry-skeleton--double {
|
|
559
|
-
width: calc((100% - var(--masonry-gap,
|
|
561
|
+
width: calc((100% - var(--masonry-gap, 8px) * 3) / 4 * 2 + var(--masonry-gap, 8px));
|
|
560
562
|
height: 200px;
|
|
561
563
|
}
|
|
562
564
|
|
|
563
565
|
.masonry-skeleton--triple {
|
|
564
|
-
width: calc((100% - var(--masonry-gap,
|
|
566
|
+
width: calc((100% - var(--masonry-gap, 8px) * 3) / 4 * 3 + var(--masonry-gap, 8px) * 2);
|
|
565
567
|
height: 220px;
|
|
566
568
|
}
|
|
567
569
|
|
|
@@ -466,15 +466,14 @@ $breakpoints: (
|
|
|
466
466
|
@mixin osi-card-typography($variant: "demo") {
|
|
467
467
|
// Both demo and integration now use the same compact values
|
|
468
468
|
// Section Titles
|
|
469
|
-
--section-title-font-size: 0.92rem;
|
|
469
|
+
--section-title-font-size: calc(0.92rem - 6px);
|
|
470
470
|
--section-title-font-weight: 700;
|
|
471
471
|
--section-title-letter-spacing: -0.02em;
|
|
472
472
|
--section-title-line-height: 1.3;
|
|
473
473
|
--section-title-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
|
|
474
474
|
|
|
475
475
|
// Card Header Title (main card title - larger)
|
|
476
|
-
--card-header-title-font-size:
|
|
477
|
-
--card-header-title-font-size-mobile: 1rem; /* 16px - mobile (reduced by 2px from 18px) */
|
|
476
|
+
--card-header-title-font-size: 1rem; /* 16px - fixed size for all screen sizes */
|
|
478
477
|
--card-header-title-font-weight: 700;
|
|
479
478
|
--card-header-title-letter-spacing: -0.02em;
|
|
480
479
|
--card-header-title-line-height: 1.3;
|
|
@@ -526,23 +525,23 @@ $breakpoints: (
|
|
|
526
525
|
|
|
527
526
|
/// Generate card layout tokens
|
|
528
527
|
@mixin osi-card-layout() {
|
|
529
|
-
--card-main-padding:
|
|
528
|
+
--card-main-padding: 8px;
|
|
530
529
|
--card-padding-vertical: 12px;
|
|
531
|
-
--card-padding-horizontal:
|
|
532
|
-
--card-padding:
|
|
530
|
+
--card-padding-horizontal: 12px;
|
|
531
|
+
--card-padding: 12px;
|
|
533
532
|
--card-padding-large: 20px;
|
|
534
533
|
--section-padding: 12px;
|
|
535
|
-
--section-container-padding:
|
|
534
|
+
--section-container-padding: 16px;
|
|
536
535
|
--card-min-height: auto;
|
|
537
536
|
--card-gap: 6px;
|
|
538
537
|
--card-gap-large: 10px;
|
|
539
538
|
--card-nested-gap: 3px;
|
|
540
|
-
--section-header-gap:
|
|
539
|
+
--section-header-gap: 2px;
|
|
541
540
|
--section-header-padding-bottom: 0px;
|
|
542
541
|
--section-title-margin-bottom: 0;
|
|
543
542
|
--card-border-radius: 12px;
|
|
544
543
|
--card-border-radius-large: 16px;
|
|
545
|
-
--section-card-gap:
|
|
544
|
+
--section-card-gap: 8px;
|
|
546
545
|
--section-card-border-radius: 10px;
|
|
547
546
|
|
|
548
547
|
// Element gaps within cards
|
|
@@ -649,11 +648,11 @@ $breakpoints: (
|
|
|
649
648
|
--osi-card-shadow-fullscreen: none;
|
|
650
649
|
|
|
651
650
|
// Card Spacing - Padding
|
|
652
|
-
--osi-card-padding: var(--card-main-padding,
|
|
653
|
-
--osi-card-padding-top: var(--card-main-padding,
|
|
654
|
-
--osi-card-padding-bottom: var(--card-main-padding,
|
|
655
|
-
--osi-card-padding-left: var(--card-main-padding,
|
|
656
|
-
--osi-card-padding-right: var(--card-main-padding,
|
|
651
|
+
--osi-card-padding: var(--card-main-padding, 8px);
|
|
652
|
+
--osi-card-padding-top: var(--card-main-padding, 8px);
|
|
653
|
+
--osi-card-padding-bottom: var(--card-main-padding, 8px);
|
|
654
|
+
--osi-card-padding-left: var(--card-main-padding, 8px);
|
|
655
|
+
--osi-card-padding-right: var(--card-main-padding, 8px);
|
|
657
656
|
--osi-card-padding-mobile: 4px; // Fixed padding - no responsive behavior
|
|
658
657
|
|
|
659
658
|
// Card Spacing - Margins
|
|
@@ -663,9 +662,9 @@ $breakpoints: (
|
|
|
663
662
|
--osi-card-margin-right: 0;
|
|
664
663
|
|
|
665
664
|
// Card Spacing - Gaps
|
|
666
|
-
--osi-card-gap: var(--section-card-gap,
|
|
667
|
-
--osi-card-body-gap: var(--space-
|
|
668
|
-
--osi-card-grid-gap: var(--section-card-gap,
|
|
665
|
+
--osi-card-gap: var(--section-card-gap, 8px);
|
|
666
|
+
--osi-card-body-gap: var(--space-4, 8px);
|
|
667
|
+
--osi-card-grid-gap: var(--section-card-gap, 8px);
|
|
669
668
|
|
|
670
669
|
// Card Border Radius
|
|
671
670
|
--osi-card-border-radius: var(--card-border-radius);
|
|
@@ -801,7 +800,7 @@ $breakpoints: (
|
|
|
801
800
|
--osi-section-border-radius: var(--section-card-border-radius);
|
|
802
801
|
|
|
803
802
|
// Section Typography
|
|
804
|
-
--osi-section-title-font-size:
|
|
803
|
+
--osi-section-title-font-size: calc(1.1rem - 4px);
|
|
805
804
|
--osi-section-title-font-weight: var(--section-title-font-weight, 700);
|
|
806
805
|
--osi-section-title-letter-spacing: var(--section-title-letter-spacing, -0.02em);
|
|
807
806
|
--osi-section-title-line-height: var(--section-title-line-height, 1.3);
|