osi-cards-lib 1.5.30 → 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.
Files changed (88) hide show
  1. package/README.md +58 -20
  2. package/package.json +13 -25
  3. package/postcss.config.js +81 -0
  4. package/section-registry.json +3864 -0
  5. package/section-registry.schema.json +264 -0
  6. package/fesm2022/osi-cards-lib.mjs +0 -31878
  7. package/fesm2022/osi-cards-lib.mjs.map +0 -1
  8. package/index.d.ts +0 -11522
  9. package/scripts/setup-angular-styles.js +0 -169
  10. package/styles/_components.scss +0 -38
  11. package/styles/_index.scss +0 -25
  12. package/styles/_osi-cards-mixins.scss +0 -459
  13. package/styles/_osi-cards-tokens.scss +0 -333
  14. package/styles/_styles-scoped.scss +0 -81
  15. package/styles/_styles.scss +0 -26
  16. package/styles/bundles/_ai-card.scss +0 -245
  17. package/styles/bundles/_all.scss +0 -68
  18. package/styles/bundles/_base.scss +0 -60
  19. package/styles/bundles/_card-skeleton.scss +0 -290
  20. package/styles/bundles/_index.scss +0 -25
  21. package/styles/bundles/_sections.scss +0 -48
  22. package/styles/bundles/_tokens-only.scss +0 -139
  23. package/styles/components/_ai-card-renderer.scss +0 -104
  24. package/styles/components/_badges.scss +0 -317
  25. package/styles/components/_card-actions.scss +0 -169
  26. package/styles/components/_card-footer.scss +0 -47
  27. package/styles/components/_component-styles.scss +0 -205
  28. package/styles/components/_empty-state.scss +0 -630
  29. package/styles/components/_hero-card.scss +0 -422
  30. package/styles/components/_image-fallback.scss +0 -28
  31. package/styles/components/_streaming-effects.scss +0 -518
  32. package/styles/components/cards/_ai-card.scss +0 -718
  33. package/styles/components/sections/_all-sections.generated.scss +0 -41
  34. package/styles/components/sections/_all-sections.scss +0 -1086
  35. package/styles/components/sections/_balanced-compact-system.scss +0 -186
  36. package/styles/components/sections/_compact-mixins.scss +0 -180
  37. package/styles/components/sections/_component-mixins.scss +0 -454
  38. package/styles/components/sections/_design-system.scss +0 -477
  39. package/styles/components/sections/_design-tokens.scss +0 -308
  40. package/styles/components/sections/_enhanced-design-variables.scss +0 -147
  41. package/styles/components/sections/_master-compact-system.scss +0 -302
  42. package/styles/components/sections/_master-dense-system.scss +0 -239
  43. package/styles/components/sections/_minimalistic-design.scss +0 -268
  44. package/styles/components/sections/_modern-effects.scss +0 -392
  45. package/styles/components/sections/_modern-sections.scss +0 -351
  46. package/styles/components/sections/_perfect-system.scss +0 -204
  47. package/styles/components/sections/_section-animations.scss +0 -331
  48. package/styles/components/sections/_section-shell.scss +0 -337
  49. package/styles/components/sections/_section-types.generated.scss +0 -30
  50. package/styles/components/sections/_sections-all.scss +0 -26
  51. package/styles/components/sections/_sections-base.scss +0 -334
  52. package/styles/components/sections/_typography-system.scss +0 -327
  53. package/styles/components/sections/_ultra-compact-tokens.scss +0 -375
  54. package/styles/components/sections/_unified-section-style.scss +0 -157
  55. package/styles/components/sections/_utility-classes.scss +0 -567
  56. package/styles/components/sections/_visual-effects-library.scss +0 -374
  57. package/styles/core/_animations.scss +0 -1498
  58. package/styles/core/_bootstrap-reset.scss +0 -445
  59. package/styles/core/_color-helpers.scss +0 -46
  60. package/styles/core/_global-unified.scss +0 -118
  61. package/styles/core/_global.scss +0 -73
  62. package/styles/core/_mixins.scss +0 -491
  63. package/styles/core/_surface-layers.scss +0 -76
  64. package/styles/core/_utilities.scss +0 -326
  65. package/styles/core/_variables-unified.scss +0 -57
  66. package/styles/core/_variables.scss +0 -36
  67. package/styles/core/variables/_colors-source.scss +0 -34
  68. package/styles/core/variables/_colors-unified.scss +0 -26
  69. package/styles/core/variables/_colors.scss +0 -21
  70. package/styles/critical.scss +0 -353
  71. package/styles/design-system/_compact-theme.scss +0 -159
  72. package/styles/design-system/_section-base.scss +0 -426
  73. package/styles/design-system/_tokens.scss +0 -237
  74. package/styles/design-system/_unified-sections.scss +0 -215
  75. package/styles/layout/_feature-grid.scss +0 -322
  76. package/styles/layout/_masonry.scss +0 -734
  77. package/styles/layout/_tilt.scss +0 -244
  78. package/styles/micro-interactions.scss +0 -583
  79. package/styles/mixins/_section-mixins.scss +0 -280
  80. package/styles/non-critical.scss +0 -643
  81. package/styles/reset/_framework-reset.scss +0 -457
  82. package/styles/reset/_index.scss +0 -14
  83. package/styles/reset/_shadow-reset.scss +0 -383
  84. package/styles/responsive.scss +0 -326
  85. package/styles/themes.scss +0 -573
  86. package/styles/tokens/_index.scss +0 -92
  87. package/styles/tokens/_master.scss +0 -1404
  88. package/styles/tokens/_section-tokens.generated.scss +0 -140
@@ -1,169 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Setup Script for OSI Cards Library
5
- *
6
- * Automatically adds library styles to angular.json
7
- * This script can be run manually or as a post-install hook
8
- *
9
- * Usage:
10
- * node scripts/setup-angular-styles.js
11
- * OR
12
- * npm run setup:styles (if added to package.json)
13
- */
14
-
15
- const fs = require('fs');
16
- const path = require('path');
17
-
18
- const colors = {
19
- reset: '\x1b[0m',
20
- green: '\x1b[32m',
21
- red: '\x1b[31m',
22
- yellow: '\x1b[33m',
23
- blue: '\x1b[34m',
24
- };
25
-
26
- function log(msg, color = colors.reset) {
27
- console.log(`${color}${msg}${colors.reset}`);
28
- }
29
-
30
- function findAngularJson(startPath = process.cwd()) {
31
- let currentPath = startPath;
32
- const rootPath = path.parse(currentPath).root;
33
-
34
- while (currentPath !== rootPath) {
35
- const angularJsonPath = path.join(currentPath, 'angular.json');
36
- if (fs.existsSync(angularJsonPath)) {
37
- return angularJsonPath;
38
- }
39
- currentPath = path.dirname(currentPath);
40
- }
41
-
42
- return null;
43
- }
44
-
45
- function updateAngularJson(angularJsonPath) {
46
- try {
47
- const angularJson = JSON.parse(fs.readFileSync(angularJsonPath, 'utf8'));
48
- let modified = false;
49
-
50
- // Find all projects
51
- for (const projectName in angularJson.projects) {
52
- const project = angularJson.projects[projectName];
53
-
54
- if (project.projectType === 'application' && project.architect?.build?.options) {
55
- const buildOptions = project.architect.build.options;
56
-
57
- // Check if styles array exists
58
- if (!buildOptions.styles) {
59
- buildOptions.styles = [];
60
- }
61
-
62
- // Check if library styles are already added
63
- const libraryStylePath = 'node_modules/osi-cards-lib/styles/_styles-scoped.scss';
64
- const hasLibraryStyles = buildOptions.styles.some(
65
- (style) => style.includes('osi-cards-lib') && style.includes('_styles-scoped')
66
- );
67
-
68
- if (!hasLibraryStyles) {
69
- // Add library styles after the main styles file
70
- const mainStyleIndex = buildOptions.styles.findIndex(
71
- (style) =>
72
- style.includes('styles.sass') ||
73
- style.includes('styles.scss') ||
74
- style.includes('styles.css')
75
- );
76
-
77
- if (mainStyleIndex >= 0) {
78
- buildOptions.styles.splice(mainStyleIndex + 1, 0, libraryStylePath);
79
- } else {
80
- buildOptions.styles.unshift(libraryStylePath);
81
- }
82
- modified = true;
83
- log(`✓ Added library styles to project: ${projectName}`, colors.green);
84
- } else {
85
- log(`ℹ Library styles already configured in project: ${projectName}`, colors.blue);
86
- }
87
-
88
- // Ensure stylePreprocessorOptions exists
89
- if (!buildOptions.stylePreprocessorOptions) {
90
- buildOptions.stylePreprocessorOptions = {};
91
- }
92
-
93
- // Add includePaths if not present
94
- if (!buildOptions.stylePreprocessorOptions.includePaths) {
95
- buildOptions.stylePreprocessorOptions.includePaths = [];
96
- }
97
-
98
- const hasIncludePath = buildOptions.stylePreprocessorOptions.includePaths.some((path) =>
99
- path.includes('osi-cards-lib')
100
- );
101
-
102
- if (!hasIncludePath) {
103
- buildOptions.stylePreprocessorOptions.includePaths.push(
104
- 'node_modules/osi-cards-lib/styles'
105
- );
106
- modified = true;
107
- log(`✓ Added includePaths to project: ${projectName}`, colors.green);
108
- }
109
-
110
- // Ensure sass options exist
111
- if (!buildOptions.stylePreprocessorOptions.sass) {
112
- buildOptions.stylePreprocessorOptions.sass = {};
113
- }
114
-
115
- if (!buildOptions.stylePreprocessorOptions.sass.silenceDeprecations) {
116
- buildOptions.stylePreprocessorOptions.sass.silenceDeprecations = ['import'];
117
- modified = true;
118
- log(`✓ Added SASS deprecation silence to project: ${projectName}`, colors.green);
119
- }
120
- }
121
- }
122
-
123
- if (modified) {
124
- // Write back with proper formatting
125
- fs.writeFileSync(angularJsonPath, JSON.stringify(angularJson, null, 2) + '\n', 'utf8');
126
- log('\n✅ Successfully updated angular.json!', colors.green);
127
- log('\nNext steps:', colors.blue);
128
- log('1. Remove the @import from your styles.sass/scss file if present', colors.yellow);
129
- log('2. Rebuild your app: ng build or npm start', colors.yellow);
130
- return true;
131
- } else {
132
- log('\nℹ angular.json is already configured correctly.', colors.blue);
133
- return false;
134
- }
135
- } catch (error) {
136
- log(`\n✗ Error updating angular.json: ${error.message}`, colors.red);
137
- return false;
138
- }
139
- }
140
-
141
- function main() {
142
- log('\n═══════════════════════════════════════════════════════', colors.blue);
143
- log(' OSI Cards Library - Angular Styles Setup', colors.blue);
144
- log('═══════════════════════════════════════════════════════\n', colors.blue);
145
-
146
- const angularJsonPath = findAngularJson();
147
-
148
- if (!angularJsonPath) {
149
- log("✗ angular.json not found. Make sure you're in an Angular project directory.", colors.red);
150
- process.exit(1);
151
- }
152
-
153
- log(`Found angular.json at: ${angularJsonPath}\n`, colors.blue);
154
-
155
- const success = updateAngularJson(angularJsonPath);
156
-
157
- if (success) {
158
- process.exit(0);
159
- } else {
160
- process.exit(0); // Still exit successfully if already configured
161
- }
162
- }
163
-
164
- // Run if called directly
165
- if (require.main === module) {
166
- main();
167
- }
168
-
169
- module.exports = { updateAngularJson, findAngularJson };
@@ -1,38 +0,0 @@
1
- /* ===================================================================
2
- SHARED COMPONENT STYLES BUNDLE
3
-
4
- This file contains all component imports shared across all entry points:
5
- - _styles.scss (demo app, :root scope)
6
- - _styles-scoped.scss (integration, .osi-cards-container scope)
7
- - _styles-standalone.scss (full isolation with Bootstrap reset)
8
-
9
- Each entry point imports this bundle after setting up its scope and variables.
10
-
11
- Note: Using @import here as Sass @use/@forward requires restructuring
12
- the entire SCSS architecture. These warnings can be safely ignored
13
- until Dart Sass 3.0.0 when migration will be required.
14
- =================================================================== */
15
-
16
- // Core styles (must come first, after variables)
17
- @import "core/mixins";
18
- @import "core/surface-layers";
19
- @import "core/global";
20
- @import "core/utilities";
21
- @import "core/animations";
22
-
23
- // Streaming effects (must come after animations)
24
- @import "components/streaming-effects";
25
-
26
- // Layout styles
27
- @import "layout/tilt";
28
- @import "layout/masonry";
29
- @import "layout/feature-grid";
30
-
31
- // Hero card and feature card styles
32
- @import "components/hero-card";
33
-
34
- // Component styles
35
- @import "components/cards/ai-card";
36
-
37
- // All section styles (consolidated)
38
- @import "components/sections/sections-all";
@@ -1,25 +0,0 @@
1
- /**
2
- * OSI Cards Style System
3
- * Single entry point for all styles
4
- *
5
- * Usage in applications:
6
- * @use 'osi-cards-lib/styles' as osi;
7
- *
8
- * Or import individual parts:
9
- * @use 'osi-cards-lib/styles/tokens' as tokens;
10
- * @use 'osi-cards-lib/styles/mixins' as mixins;
11
- */
12
-
13
- // Design tokens (CSS custom properties)
14
- @forward "osi-cards-tokens";
15
-
16
- // SCSS mixins and utilities
17
- @forward "osi-cards-mixins";
18
-
19
- // Component styles
20
- @forward "components/card" as card-*;
21
- @forward "components/section" as section-*;
22
-
23
- // Optional: Theme utilities
24
- @forward "themes/light" as light-*;
25
- @forward "themes/dark" as dark-*;
@@ -1,459 +0,0 @@
1
- /**
2
- * OSI Cards SCSS Mixins
3
- * Reusable style patterns for components
4
- *
5
- * Usage:
6
- * @use 'osi-cards-mixins' as mixins;
7
- *
8
- * .my-component {
9
- * @include mixins.card-base;
10
- * }
11
- */
12
-
13
- // ============================================================================
14
- // CARD MIXINS
15
- // ============================================================================
16
-
17
- /// Base card styles
18
- @mixin card-base {
19
- background: var(--osi-card-bg, white);
20
- border: 1px solid var(--osi-card-border, var(--osi-neutral-200));
21
- border-radius: var(--osi-card-radius, var(--osi-radius-xl));
22
- box-shadow: var(--osi-card-shadow, var(--osi-shadow-md));
23
- }
24
-
25
- /// Card hover state
26
- @mixin card-hover {
27
- transition:
28
- transform var(--osi-duration-200) var(--osi-ease-out),
29
- box-shadow var(--osi-duration-200) var(--osi-ease-out);
30
-
31
- &:hover {
32
- transform: translateY(-2px);
33
- box-shadow: var(--osi-shadow-lg);
34
- }
35
- }
36
-
37
- /// Card interactive (clickable)
38
- @mixin card-interactive {
39
- @include card-hover;
40
- cursor: pointer;
41
-
42
- &:active {
43
- transform: translateY(0);
44
- box-shadow: var(--osi-shadow-sm);
45
- }
46
-
47
- &:focus-visible {
48
- outline: 2px solid var(--osi-primary-500);
49
- outline-offset: 2px;
50
- }
51
- }
52
-
53
- // ============================================================================
54
- // SECTION MIXINS
55
- // ============================================================================
56
-
57
- /// Base section styles
58
- @mixin section-base {
59
- padding: var(--osi-spacing-4);
60
-
61
- & + & {
62
- border-top: 1px solid var(--osi-border-default);
63
- }
64
- }
65
-
66
- /// Section header styles
67
- @mixin section-header {
68
- display: flex;
69
- align-items: center;
70
- gap: var(--osi-spacing-2);
71
- margin-bottom: var(--osi-spacing-3);
72
- font-size: var(--osi-text-sm);
73
- font-weight: var(--osi-font-semibold);
74
- color: var(--osi-section-header-color);
75
- text-transform: uppercase;
76
- letter-spacing: 0.05em;
77
- }
78
-
79
- /// Section content styles
80
- @mixin section-content {
81
- color: var(--osi-section-content-color);
82
- font-size: var(--osi-text-sm);
83
- line-height: var(--osi-leading-relaxed);
84
- }
85
-
86
- // ============================================================================
87
- // FIELD MIXINS
88
- // ============================================================================
89
-
90
- /// Field container
91
- @mixin field-container {
92
- display: flex;
93
- flex-direction: column;
94
- gap: var(--osi-field-gap);
95
- }
96
-
97
- /// Field label
98
- @mixin field-label {
99
- font-size: var(--osi-text-xs);
100
- font-weight: var(--osi-font-medium);
101
- color: var(--osi-field-label-color);
102
- text-transform: uppercase;
103
- letter-spacing: 0.05em;
104
- }
105
-
106
- /// Field value
107
- @mixin field-value {
108
- font-size: var(--osi-text-base);
109
- font-weight: var(--osi-font-medium);
110
- color: var(--osi-field-value-color);
111
- }
112
-
113
- /// Field value large (for metrics)
114
- @mixin field-value-lg {
115
- font-size: var(--osi-text-2xl);
116
- font-weight: var(--osi-font-bold);
117
- color: var(--osi-field-value-color);
118
- line-height: var(--osi-leading-tight);
119
- }
120
-
121
- // ============================================================================
122
- // GRID MIXINS
123
- // ============================================================================
124
-
125
- /// Responsive grid container
126
- @mixin grid-container($min-column: 200px, $gap: var(--osi-grid-gap)) {
127
- display: grid;
128
- grid-template-columns: repeat(auto-fit, minmax($min-column, 1fr));
129
- gap: $gap;
130
- }
131
-
132
- /// Fixed column grid
133
- @mixin grid-fixed($columns: 2, $gap: var(--osi-grid-gap)) {
134
- display: grid;
135
- grid-template-columns: repeat($columns, 1fr);
136
- gap: $gap;
137
- }
138
-
139
- /// Masonry-like grid (using CSS grid)
140
- @mixin masonry-grid($min-column: 250px) {
141
- display: grid;
142
- grid-template-columns: repeat(auto-fill, minmax($min-column, 1fr));
143
- grid-auto-rows: 20px;
144
- gap: var(--osi-spacing-4);
145
- }
146
-
147
- // ============================================================================
148
- // TYPOGRAPHY MIXINS
149
- // ============================================================================
150
-
151
- /// Heading styles
152
- @mixin heading($level: 1) {
153
- font-family: var(--osi-font-sans);
154
- font-weight: var(--osi-font-bold);
155
- line-height: var(--osi-leading-tight);
156
- color: var(--osi-text-primary);
157
-
158
- @if $level == 1 {
159
- font-size: var(--osi-text-3xl);
160
- } @else if $level == 2 {
161
- font-size: var(--osi-text-2xl);
162
- } @else if $level == 3 {
163
- font-size: var(--osi-text-xl);
164
- } @else if $level == 4 {
165
- font-size: var(--osi-text-lg);
166
- } @else {
167
- font-size: var(--osi-text-base);
168
- }
169
- }
170
-
171
- /// Body text
172
- @mixin body-text {
173
- font-family: var(--osi-font-sans);
174
- font-size: var(--osi-text-base);
175
- font-weight: var(--osi-font-normal);
176
- line-height: var(--osi-leading-normal);
177
- color: var(--osi-text-secondary);
178
- }
179
-
180
- /// Small text
181
- @mixin small-text {
182
- font-size: var(--osi-text-sm);
183
- color: var(--osi-text-tertiary);
184
- }
185
-
186
- /// Truncate text with ellipsis
187
- @mixin truncate {
188
- overflow: hidden;
189
- text-overflow: ellipsis;
190
- white-space: nowrap;
191
- }
192
-
193
- /// Multi-line truncate
194
- @mixin line-clamp($lines: 2) {
195
- display: -webkit-box;
196
- -webkit-line-clamp: $lines;
197
- -webkit-box-orient: vertical;
198
- overflow: hidden;
199
- }
200
-
201
- // ============================================================================
202
- // BUTTON MIXINS
203
- // ============================================================================
204
-
205
- /// Base button styles
206
- @mixin button-base {
207
- display: inline-flex;
208
- align-items: center;
209
- justify-content: center;
210
- gap: var(--osi-spacing-2);
211
- padding: var(--osi-btn-padding-y) var(--osi-btn-padding-x);
212
- font-size: var(--osi-btn-font-size);
213
- font-weight: var(--osi-btn-font-weight);
214
- border-radius: var(--osi-btn-radius);
215
- border: none;
216
- cursor: pointer;
217
- transition: all var(--osi-duration-150) var(--osi-ease-out);
218
-
219
- &:disabled {
220
- opacity: 0.5;
221
- cursor: not-allowed;
222
- }
223
-
224
- &:focus-visible {
225
- outline: 2px solid var(--osi-primary-500);
226
- outline-offset: 2px;
227
- }
228
- }
229
-
230
- /// Primary button
231
- @mixin button-primary {
232
- @include button-base;
233
- background: var(--osi-primary-500);
234
- color: white;
235
-
236
- &:hover:not(:disabled) {
237
- background: var(--osi-primary-600);
238
- }
239
-
240
- &:active:not(:disabled) {
241
- background: var(--osi-primary-700);
242
- }
243
- }
244
-
245
- /// Secondary button
246
- @mixin button-secondary {
247
- @include button-base;
248
- background: var(--osi-neutral-100);
249
- color: var(--osi-text-primary);
250
-
251
- &:hover:not(:disabled) {
252
- background: var(--osi-neutral-200);
253
- }
254
-
255
- &:active:not(:disabled) {
256
- background: var(--osi-neutral-300);
257
- }
258
- }
259
-
260
- /// Ghost button
261
- @mixin button-ghost {
262
- @include button-base;
263
- background: transparent;
264
- color: var(--osi-text-secondary);
265
-
266
- &:hover:not(:disabled) {
267
- background: var(--osi-neutral-100);
268
- color: var(--osi-text-primary);
269
- }
270
- }
271
-
272
- // ============================================================================
273
- // UTILITY MIXINS
274
- // ============================================================================
275
-
276
- /// Visually hidden (for screen readers)
277
- @mixin visually-hidden {
278
- position: absolute !important;
279
- width: 1px !important;
280
- height: 1px !important;
281
- padding: 0 !important;
282
- margin: -1px !important;
283
- overflow: hidden !important;
284
- clip: rect(0, 0, 0, 0) !important;
285
- white-space: nowrap !important;
286
- border: 0 !important;
287
- }
288
-
289
- /// Reset list styles
290
- @mixin list-reset {
291
- list-style: none;
292
- margin: 0;
293
- padding: 0;
294
- }
295
-
296
- /// Reset button styles
297
- @mixin button-reset {
298
- appearance: none;
299
- background: none;
300
- border: none;
301
- padding: 0;
302
- margin: 0;
303
- font: inherit;
304
- color: inherit;
305
- cursor: pointer;
306
- }
307
-
308
- /// Flexbox center
309
- @mixin flex-center {
310
- display: flex;
311
- align-items: center;
312
- justify-content: center;
313
- }
314
-
315
- /// Flex column
316
- @mixin flex-column {
317
- display: flex;
318
- flex-direction: column;
319
- }
320
-
321
- /// Flex between
322
- @mixin flex-between {
323
- display: flex;
324
- align-items: center;
325
- justify-content: space-between;
326
- }
327
-
328
- /// Absolute fill (position absolute, fill container)
329
- @mixin absolute-fill {
330
- position: absolute;
331
- inset: 0;
332
- }
333
-
334
- /// Fixed fill (position fixed, fill viewport)
335
- @mixin fixed-fill {
336
- position: fixed;
337
- inset: 0;
338
- }
339
-
340
- // ============================================================================
341
- // RESPONSIVE MIXINS
342
- // ============================================================================
343
-
344
- /// Mobile-first breakpoint
345
- @mixin breakpoint($size) {
346
- @if $size == "sm" {
347
- @media (min-width: 640px) {
348
- @content;
349
- }
350
- } @else if $size == "md" {
351
- @media (min-width: 768px) {
352
- @content;
353
- }
354
- } @else if $size == "lg" {
355
- @media (min-width: 1024px) {
356
- @content;
357
- }
358
- } @else if $size == "xl" {
359
- @media (min-width: 1280px) {
360
- @content;
361
- }
362
- } @else if $size == "2xl" {
363
- @media (min-width: 1536px) {
364
- @content;
365
- }
366
- }
367
- }
368
-
369
- /// Max-width breakpoint
370
- @mixin breakpoint-down($size) {
371
- @if $size == "sm" {
372
- @media (max-width: 639px) {
373
- @content;
374
- }
375
- } @else if $size == "md" {
376
- @media (max-width: 767px) {
377
- @content;
378
- }
379
- } @else if $size == "lg" {
380
- @media (max-width: 1023px) {
381
- @content;
382
- }
383
- } @else if $size == "xl" {
384
- @media (max-width: 1279px) {
385
- @content;
386
- }
387
- }
388
- }
389
-
390
- // ============================================================================
391
- // ANIMATION MIXINS
392
- // ============================================================================
393
-
394
- /// Fade in animation
395
- @mixin fade-in($duration: var(--osi-duration-200)) {
396
- animation: osi-fade-in $duration var(--osi-ease-out);
397
- }
398
-
399
- /// Slide up animation
400
- @mixin slide-up($duration: var(--osi-duration-300)) {
401
- animation: osi-slide-up $duration var(--osi-ease-out);
402
- }
403
-
404
- /// Pulse animation
405
- @mixin pulse($duration: 2s) {
406
- animation: osi-pulse $duration infinite;
407
- }
408
-
409
- /// Loading shimmer
410
- @mixin loading-shimmer {
411
- background: linear-gradient(
412
- 90deg,
413
- var(--osi-neutral-200) 25%,
414
- var(--osi-neutral-100) 50%,
415
- var(--osi-neutral-200) 75%
416
- );
417
- background-size: 200% 100%;
418
- animation: osi-shimmer 1.5s infinite;
419
- }
420
-
421
- // Keyframe definitions
422
- @keyframes osi-fade-in {
423
- from {
424
- opacity: 0;
425
- }
426
- to {
427
- opacity: 1;
428
- }
429
- }
430
-
431
- @keyframes osi-slide-up {
432
- from {
433
- opacity: 0;
434
- transform: translate3d(0, 10px, 0);
435
- }
436
- to {
437
- opacity: 1;
438
- transform: translate3d(0, 0, 0);
439
- }
440
- }
441
-
442
- @keyframes osi-pulse {
443
- 0%,
444
- 100% {
445
- opacity: 1;
446
- }
447
- 50% {
448
- opacity: 0.5;
449
- }
450
- }
451
-
452
- @keyframes osi-shimmer {
453
- 0% {
454
- background-position: 200% 0;
455
- }
456
- 100% {
457
- background-position: -200% 0;
458
- }
459
- }