@ivds/core 0.1.1

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 (154) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +215 -0
  3. package/lib/all.css +6802 -0
  4. package/lib/all.min.css +1 -0
  5. package/lib/base/base.css +215 -0
  6. package/lib/base/base.min.css +1 -0
  7. package/lib/components/_breadcrumb-mixins.scss +173 -0
  8. package/lib/components/_button-mixin.scss +120 -0
  9. package/lib/components/_card-mixin.scss +196 -0
  10. package/lib/components/_checkbox-mixin.scss +208 -0
  11. package/lib/components/_footer-mixin.scss +385 -0
  12. package/lib/components/_header-mixin.scss +275 -0
  13. package/lib/components/_navigation-mixins.scss +270 -0
  14. package/lib/components/_notification-mixin.scss +239 -0
  15. package/lib/components/_pagination-mixins.scss +280 -0
  16. package/lib/components/_radio-button-mixin.scss +207 -0
  17. package/lib/components/_tag-mixin.scss +261 -0
  18. package/lib/components/_text-input-mixin.scss +203 -0
  19. package/lib/components/all.css +3005 -0
  20. package/lib/components/all.min.css +1 -0
  21. package/lib/components/breadcrumb/breadcrumb.css +141 -0
  22. package/lib/components/breadcrumb/breadcrumb.min.css +1 -0
  23. package/lib/components/button/button.css +221 -0
  24. package/lib/components/button/button.min.css +1 -0
  25. package/lib/components/card/card.css +236 -0
  26. package/lib/components/card/card.min.css +1 -0
  27. package/lib/components/checkbox/checkbox.css +305 -0
  28. package/lib/components/checkbox/checkbox.min.css +1 -0
  29. package/lib/components/footer/footer.css +466 -0
  30. package/lib/components/footer/footer.min.css +1 -0
  31. package/lib/components/header/header.css +274 -0
  32. package/lib/components/header/header.min.css +1 -0
  33. package/lib/components/navigation/navigation.css +214 -0
  34. package/lib/components/navigation/navigation.min.css +1 -0
  35. package/lib/components/notification/notification.css +253 -0
  36. package/lib/components/notification/notification.min.css +1 -0
  37. package/lib/components/pagination/pagination.css +221 -0
  38. package/lib/components/pagination/pagination.min.css +1 -0
  39. package/lib/components/radio-button/radio-button.css +326 -0
  40. package/lib/components/radio-button/radio-button.min.css +1 -0
  41. package/lib/components/tag/tag.css +367 -0
  42. package/lib/components/tag/tag.min.css +1 -0
  43. package/lib/components/text-input/text-input.css +243 -0
  44. package/lib/components/text-input/text-input.min.css +1 -0
  45. package/lib/icons/icon-arrow-left.css +139 -0
  46. package/lib/icons/icon-arrow-left.min.css +1 -0
  47. package/lib/icons/icon-arrow-right.css +139 -0
  48. package/lib/icons/icon-arrow-right.min.css +1 -0
  49. package/lib/icons/icon-check.css +139 -0
  50. package/lib/icons/icon-check.min.css +1 -0
  51. package/lib/icons/icon-close.css +140 -0
  52. package/lib/icons/icon-close.min.css +1 -0
  53. package/lib/icons/icon-error.css +140 -0
  54. package/lib/icons/icon-error.min.css +1 -0
  55. package/lib/icons/icon-info.css +140 -0
  56. package/lib/icons/icon-info.min.css +1 -0
  57. package/lib/icons/icon-success.css +139 -0
  58. package/lib/icons/icon-success.min.css +1 -0
  59. package/lib/icons/icon-warning.css +139 -0
  60. package/lib/icons/icon-warning.min.css +1 -0
  61. package/lib/icons/icons.css +1158 -0
  62. package/lib/icons/icons.min.css +1 -0
  63. package/lib/utils/_flex.scss +200 -0
  64. package/lib/utils/_grid.scss +211 -0
  65. package/lib/utils/_layout.scss +253 -0
  66. package/lib/utils/_spacing.scss +260 -0
  67. package/lib/utils/_typography.scss +111 -0
  68. package/lib/utils/utils.css +2434 -0
  69. package/lib/utils/utils.min.css +1 -0
  70. package/lib/utils-only.css +2801 -0
  71. package/lib/utils-only.min.css +1 -0
  72. package/lib/variables/variables.css +2 -0
  73. package/lib/variables/variables.min.css +0 -0
  74. package/package.json +194 -0
  75. package/src/__tests__/example.test.scss +12 -0
  76. package/src/accessibility.stories.js +416 -0
  77. package/src/all.scss +9 -0
  78. package/src/base/_layout.scss +97 -0
  79. package/src/base/_reset.scss +85 -0
  80. package/src/base/_typography.scss +105 -0
  81. package/src/base/base.scss +6 -0
  82. package/src/components/all.scss +22 -0
  83. package/src/components/breadcrumb/_breadcrumb-mixins.scss +173 -0
  84. package/src/components/breadcrumb/breadcrumb.scss +68 -0
  85. package/src/components/breadcrumb/breadcrumb.stories.js +483 -0
  86. package/src/components/button/__tests__/button-mixins.test.scss +35 -0
  87. package/src/components/button/_button-mixin.scss +120 -0
  88. package/src/components/button/button.scss +126 -0
  89. package/src/components/button/button.stories.js +364 -0
  90. package/src/components/card/__tests__/card-mixins.test.scss +36 -0
  91. package/src/components/card/_card-mixin.scss +196 -0
  92. package/src/components/card/card.scss +193 -0
  93. package/src/components/card/card.stories.js +635 -0
  94. package/src/components/checkbox/_checkbox-mixin.scss +208 -0
  95. package/src/components/checkbox/checkbox.scss +141 -0
  96. package/src/components/checkbox/checkbox.stories.js +303 -0
  97. package/src/components/footer/_footer-mixin.scss +385 -0
  98. package/src/components/footer/footer.scss +86 -0
  99. package/src/components/footer/footer.stories.js +740 -0
  100. package/src/components/header/_header-mixin.scss +275 -0
  101. package/src/components/header/header.scss +84 -0
  102. package/src/components/header/header.stories.js +450 -0
  103. package/src/components/navigation/_navigation-mixins.scss +270 -0
  104. package/src/components/navigation/navigation.scss +64 -0
  105. package/src/components/navigation/navigation.stories.js +410 -0
  106. package/src/components/notification/_notification-mixin.scss +239 -0
  107. package/src/components/notification/notification.scss +118 -0
  108. package/src/components/notification/notification.stories.js +378 -0
  109. package/src/components/overview.stories.js +473 -0
  110. package/src/components/pagination/_pagination-mixins.scss +280 -0
  111. package/src/components/pagination/pagination.scss +76 -0
  112. package/src/components/pagination/pagination.stories.js +729 -0
  113. package/src/components/radio-button/_radio-button-mixin.scss +207 -0
  114. package/src/components/radio-button/radio-button.scss +178 -0
  115. package/src/components/radio-button/radio-button.stories.js +379 -0
  116. package/src/components/tag/_tag-mixin.scss +261 -0
  117. package/src/components/tag/tag.scss +244 -0
  118. package/src/components/tag/tag.stories.js +482 -0
  119. package/src/components/text-input/_text-input-mixin.scss +203 -0
  120. package/src/components/text-input/text-input.scss +150 -0
  121. package/src/components/text-input/text-input.stories.js +723 -0
  122. package/src/icons/_icon.scss +121 -0
  123. package/src/icons/icon-arrow-left.scss +23 -0
  124. package/src/icons/icon-arrow-right.scss +23 -0
  125. package/src/icons/icon-check.scss +23 -0
  126. package/src/icons/icon-close.scss +24 -0
  127. package/src/icons/icon-error.scss +24 -0
  128. package/src/icons/icon-info.scss +24 -0
  129. package/src/icons/icon-success.scss +23 -0
  130. package/src/icons/icon-warning.scss +23 -0
  131. package/src/icons/icons.scss +12 -0
  132. package/src/icons/icons.stories.js +249 -0
  133. package/src/icons/svg/arrow-left.svg +3 -0
  134. package/src/icons/svg/arrow-right.svg +3 -0
  135. package/src/icons/svg/check.svg +3 -0
  136. package/src/icons/svg/close.svg +4 -0
  137. package/src/icons/svg/error.svg +5 -0
  138. package/src/icons/svg/info.svg +5 -0
  139. package/src/icons/svg/success.svg +4 -0
  140. package/src/icons/svg/warning.svg +5 -0
  141. package/src/utils/__tests__/utilities.test.scss +37 -0
  142. package/src/utils/_flex.scss +200 -0
  143. package/src/utils/_grid.scss +211 -0
  144. package/src/utils/_layout.scss +253 -0
  145. package/src/utils/_spacing.scss +260 -0
  146. package/src/utils/_typography.scss +111 -0
  147. package/src/utils/utils.scss +8 -0
  148. package/src/variables/_borders.scss +15 -0
  149. package/src/variables/_breakpoints.scss +11 -0
  150. package/src/variables/_colors.scss +97 -0
  151. package/src/variables/_shadows.scss +14 -0
  152. package/src/variables/_spacing.scss +24 -0
  153. package/src/variables/_typography.scss +47 -0
  154. package/src/variables/variables.scss +9 -0
@@ -0,0 +1,121 @@
1
+ // Base icon styles
2
+ // Provides foundational styling for the IVDS icon system with SVG support
3
+
4
+ @use '../variables/variables' as vars;
5
+
6
+ // Base icon mixin for consistent styling
7
+ @mixin icon-base {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ width: 1em;
12
+ height: 1em;
13
+ fill: currentcolor;
14
+ flex-shrink: 0;
15
+ vertical-align: middle;
16
+
17
+ // SVG specific styles
18
+ svg {
19
+ width: 100%;
20
+ height: 100%;
21
+ fill: inherit;
22
+ display: block;
23
+ }
24
+
25
+ // Fallback for text-based icons
26
+ &::before {
27
+ font-style: normal;
28
+ font-variant: normal;
29
+ text-rendering: auto;
30
+ line-height: 1;
31
+ }
32
+ }
33
+
34
+ // Size mixin for consistent icon sizing
35
+ @mixin icon-size($size) {
36
+ width: $size;
37
+ height: $size;
38
+ font-size: $size;
39
+ }
40
+
41
+ .ivds-icon {
42
+ @include icon-base;
43
+
44
+ // Default size using design tokens
45
+ @include icon-size(var(--fontSize-base, 1rem));
46
+
47
+ // Size variations using design tokens
48
+ &--xs {
49
+ @include icon-size(var(--fontSize-xs, 0.75rem));
50
+ }
51
+
52
+ &--sm {
53
+ @include icon-size(var(--fontSize-sm, 0.875rem));
54
+ }
55
+
56
+ &--md {
57
+ @include icon-size(var(--fontSize-base, 1rem));
58
+ }
59
+
60
+ &--lg {
61
+ @include icon-size(var(--fontSize-lg, 1.125rem));
62
+ }
63
+
64
+ &--xl {
65
+ @include icon-size(var(--fontSize-xl, 1.25rem));
66
+ }
67
+
68
+ &--2xl {
69
+ @include icon-size(var(--fontSize-2xl, 1.5rem));
70
+ }
71
+
72
+ &--3xl {
73
+ @include icon-size(var(--fontSize-3xl, 1.875rem));
74
+ }
75
+
76
+ // Color variations
77
+ &--primary {
78
+ color: var(--color-brand-primary-500, #0ea5e9);
79
+ }
80
+
81
+ &--secondary {
82
+ color: var(--color-semantic-neutral-600, #6b7280);
83
+ }
84
+
85
+ &--success {
86
+ color: var(--color-semantic-success-500, #10b981);
87
+ }
88
+
89
+ &--warning {
90
+ color: var(--color-semantic-warning-500, #f59e0b);
91
+ }
92
+
93
+ &--error {
94
+ color: var(--color-semantic-error-500, #ef4444);
95
+ }
96
+
97
+ &--info {
98
+ color: var(--color-brand-primary-500, #0ea5e9);
99
+ }
100
+
101
+ // Interactive states
102
+ &--interactive {
103
+ cursor: pointer;
104
+ transition: color 0.15s ease-in-out, transform 0.15s ease-in-out;
105
+
106
+ &:hover {
107
+ transform: scale(1.1);
108
+ }
109
+
110
+ &:active {
111
+ transform: scale(0.95);
112
+ }
113
+ }
114
+
115
+ // Disabled state
116
+ &--disabled {
117
+ opacity: 0.5;
118
+ cursor: not-allowed;
119
+ pointer-events: none;
120
+ }
121
+ }
@@ -0,0 +1,23 @@
1
+ // Arrow left icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--arrow-left {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('arrow-left.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: '←';
16
+ font-size: inherit;
17
+ }
18
+
19
+ // Hide text when SVG is available
20
+ &:not(.ivds-icon--no-svg)::before {
21
+ display: none;
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ // Arrow right icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--arrow-right {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('arrow-right.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: '→';
16
+ font-size: inherit;
17
+ }
18
+
19
+ // Hide text when SVG is available
20
+ &:not(.ivds-icon--no-svg)::before {
21
+ display: none;
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ // Check icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--check {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('check.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: '✓';
16
+ font-size: inherit;
17
+ }
18
+
19
+ // Hide text when SVG is available
20
+ &:not(.ivds-icon--no-svg)::before {
21
+ display: none;
22
+ }
23
+ }
@@ -0,0 +1,24 @@
1
+ // Close icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--close {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('close.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: '×';
16
+ font-size: inherit;
17
+ font-weight: bold;
18
+ }
19
+
20
+ // Hide text when SVG is available
21
+ &:not(.ivds-icon--no-svg)::before {
22
+ display: none;
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ // Error icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--error {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('error.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: '✕';
16
+ font-size: inherit;
17
+ font-weight: bold;
18
+ }
19
+
20
+ // Hide text when SVG is available
21
+ &:not(.ivds-icon--no-svg)::before {
22
+ display: none;
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ // Info icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--info {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('info.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: 'ℹ';
16
+ font-size: inherit;
17
+ font-weight: bold;
18
+ }
19
+
20
+ // Hide text when SVG is available
21
+ &:not(.ivds-icon--no-svg)::before {
22
+ display: none;
23
+ }
24
+ }
@@ -0,0 +1,23 @@
1
+ // Success icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--success {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('success.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: '✓';
16
+ font-size: inherit;
17
+ }
18
+
19
+ // Hide text when SVG is available
20
+ &:not(.ivds-icon--no-svg)::before {
21
+ display: none;
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ // Warning icon
2
+ @import 'icon';
3
+
4
+ .ivds-icon--warning {
5
+ @include icon-base;
6
+
7
+ // SVG icon using PostCSS inline-svg (fallback to Unicode)
8
+ background-image: svg-load('warning.svg', fill=currentcolor);
9
+ background-repeat: no-repeat;
10
+ background-position: center;
11
+ background-size: contain;
12
+
13
+ // Unicode fallback
14
+ &::before {
15
+ content: '⚠';
16
+ font-size: inherit;
17
+ }
18
+
19
+ // Hide text when SVG is available
20
+ &:not(.ivds-icon--no-svg)::before {
21
+ display: none;
22
+ }
23
+ }
@@ -0,0 +1,12 @@
1
+ // All icons bundle
2
+ // This file imports all icon styles for the IVDS Core package
3
+
4
+ @use 'icon';
5
+ @use 'icon-arrow-left';
6
+ @use 'icon-arrow-right';
7
+ @use 'icon-check';
8
+ @use 'icon-close';
9
+ @use 'icon-info';
10
+ @use 'icon-warning';
11
+ @use 'icon-error';
12
+ @use 'icon-success';
@@ -0,0 +1,249 @@
1
+ export default {
2
+ title: 'Core/Icons',
3
+ parameters: {
4
+ docs: {
5
+ description: {
6
+ component: 'Icon system for the IVDS Core package. Icons support both SVG and Unicode fallbacks, with multiple sizes and color variants.'
7
+ }
8
+ },
9
+ a11y: {
10
+ config: {
11
+ rules: [
12
+ {
13
+ id: 'color-contrast',
14
+ enabled: true
15
+ }
16
+ ]
17
+ }
18
+ }
19
+ }
20
+ };
21
+
22
+ export const AllIcons = () => `
23
+ <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding: 1rem;">
24
+ <div style="text-align: center;">
25
+ <div style="margin-bottom: 0.5rem;">
26
+ <span class="ivds-icon ivds-icon--arrow-left ivds-icon--2xl"></span>
27
+ </div>
28
+ <div style="font-size: 0.875rem; color: #6b7280;">arrow-left</div>
29
+ </div>
30
+
31
+ <div style="text-align: center;">
32
+ <div style="margin-bottom: 0.5rem;">
33
+ <span class="ivds-icon ivds-icon--arrow-right ivds-icon--2xl"></span>
34
+ </div>
35
+ <div style="font-size: 0.875rem; color: #6b7280;">arrow-right</div>
36
+ </div>
37
+
38
+ <div style="text-align: center;">
39
+ <div style="margin-bottom: 0.5rem;">
40
+ <span class="ivds-icon ivds-icon--check ivds-icon--2xl ivds-icon--success"></span>
41
+ </div>
42
+ <div style="font-size: 0.875rem; color: #6b7280;">check</div>
43
+ </div>
44
+
45
+ <div style="text-align: center;">
46
+ <div style="margin-bottom: 0.5rem;">
47
+ <span class="ivds-icon ivds-icon--close ivds-icon--2xl"></span>
48
+ </div>
49
+ <div style="font-size: 0.875rem; color: #6b7280;">close</div>
50
+ </div>
51
+
52
+ <div style="text-align: center;">
53
+ <div style="margin-bottom: 0.5rem;">
54
+ <span class="ivds-icon ivds-icon--info ivds-icon--2xl ivds-icon--info"></span>
55
+ </div>
56
+ <div style="font-size: 0.875rem; color: #6b7280;">info</div>
57
+ </div>
58
+
59
+ <div style="text-align: center;">
60
+ <div style="margin-bottom: 0.5rem;">
61
+ <span class="ivds-icon ivds-icon--warning ivds-icon--2xl ivds-icon--warning"></span>
62
+ </div>
63
+ <div style="font-size: 0.875rem; color: #6b7280;">warning</div>
64
+ </div>
65
+
66
+ <div style="text-align: center;">
67
+ <div style="margin-bottom: 0.5rem;">
68
+ <span class="ivds-icon ivds-icon--error ivds-icon--2xl ivds-icon--error"></span>
69
+ </div>
70
+ <div style="font-size: 0.875rem; color: #6b7280;">error</div>
71
+ </div>
72
+
73
+ <div style="text-align: center;">
74
+ <div style="margin-bottom: 0.5rem;">
75
+ <span class="ivds-icon ivds-icon--success ivds-icon--2xl ivds-icon--success"></span>
76
+ </div>
77
+ <div style="font-size: 0.875rem; color: #6b7280;">success</div>
78
+ </div>
79
+ </div>
80
+ `;
81
+
82
+ export const Sizes = () => `
83
+ <div style="display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;">
84
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
85
+ <span class="ivds-icon ivds-icon--check ivds-icon--xs"></span>
86
+ <span style="font-size: 0.75rem; color: #6b7280;">xs</span>
87
+ </div>
88
+
89
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
90
+ <span class="ivds-icon ivds-icon--check ivds-icon--sm"></span>
91
+ <span style="font-size: 0.75rem; color: #6b7280;">sm</span>
92
+ </div>
93
+
94
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
95
+ <span class="ivds-icon ivds-icon--check ivds-icon--md"></span>
96
+ <span style="font-size: 0.75rem; color: #6b7280;">md</span>
97
+ </div>
98
+
99
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
100
+ <span class="ivds-icon ivds-icon--check ivds-icon--lg"></span>
101
+ <span style="font-size: 0.75rem; color: #6b7280;">lg</span>
102
+ </div>
103
+
104
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
105
+ <span class="ivds-icon ivds-icon--check ivds-icon--xl"></span>
106
+ <span style="font-size: 0.75rem; color: #6b7280;">xl</span>
107
+ </div>
108
+
109
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
110
+ <span class="ivds-icon ivds-icon--check ivds-icon--2xl"></span>
111
+ <span style="font-size: 0.75rem; color: #6b7280;">2xl</span>
112
+ </div>
113
+
114
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
115
+ <span class="ivds-icon ivds-icon--check ivds-icon--3xl"></span>
116
+ <span style="font-size: 0.75rem; color: #6b7280;">3xl</span>
117
+ </div>
118
+ </div>
119
+ `;
120
+
121
+ export const Colors = () => `
122
+ <div style="display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;">
123
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
124
+ <span class="ivds-icon ivds-icon--check ivds-icon--2xl"></span>
125
+ <span style="font-size: 0.75rem; color: #6b7280;">default</span>
126
+ </div>
127
+
128
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
129
+ <span class="ivds-icon ivds-icon--check ivds-icon--2xl ivds-icon--primary"></span>
130
+ <span style="font-size: 0.75rem; color: #6b7280;">primary</span>
131
+ </div>
132
+
133
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
134
+ <span class="ivds-icon ivds-icon--check ivds-icon--2xl ivds-icon--secondary"></span>
135
+ <span style="font-size: 0.75rem; color: #6b7280;">secondary</span>
136
+ </div>
137
+
138
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
139
+ <span class="ivds-icon ivds-icon--check ivds-icon--2xl ivds-icon--success"></span>
140
+ <span style="font-size: 0.75rem; color: #6b7280;">success</span>
141
+ </div>
142
+
143
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
144
+ <span class="ivds-icon ivds-icon--warning ivds-icon--2xl ivds-icon--warning"></span>
145
+ <span style="font-size: 0.75rem; color: #6b7280;">warning</span>
146
+ </div>
147
+
148
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
149
+ <span class="ivds-icon ivds-icon--error ivds-icon--2xl ivds-icon--error"></span>
150
+ <span style="font-size: 0.75rem; color: #6b7280;">error</span>
151
+ </div>
152
+
153
+ <div style="display: flex; flex-direction: column; align-items: center; gap: 0.5rem;">
154
+ <span class="ivds-icon ivds-icon--info ivds-icon--2xl ivds-icon--info"></span>
155
+ <span style="font-size: 0.75rem; color: #6b7280;">info</span>
156
+ </div>
157
+ </div>
158
+ `;
159
+
160
+ export const Interactive = () => `
161
+ <div style="display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;">
162
+ <button style="background: none; border: none; cursor: pointer; padding: 0.5rem;">
163
+ <span class="ivds-icon ivds-icon--check ivds-icon--2xl ivds-icon--interactive ivds-icon--success"></span>
164
+ </button>
165
+
166
+ <button style="background: none; border: none; cursor: pointer; padding: 0.5rem;">
167
+ <span class="ivds-icon ivds-icon--close ivds-icon--2xl ivds-icon--interactive"></span>
168
+ </button>
169
+
170
+ <button style="background: none; border: none; cursor: pointer; padding: 0.5rem;">
171
+ <span class="ivds-icon ivds-icon--arrow-right ivds-icon--2xl ivds-icon--interactive ivds-icon--primary"></span>
172
+ </button>
173
+
174
+ <button style="background: none; border: none; cursor: not-allowed; padding: 0.5rem;" disabled>
175
+ <span class="ivds-icon ivds-icon--info ivds-icon--2xl ivds-icon--disabled"></span>
176
+ </button>
177
+ </div>
178
+ <p style="margin-top: 1rem; font-size: 0.875rem; color: #6b7280;">
179
+ Hover over the interactive icons to see the scale effect. The last icon is disabled.
180
+ </p>
181
+ `;
182
+
183
+ export const InContext = () => `
184
+ <div style="display: flex; flex-direction: column; gap: 1.5rem;">
185
+ <!-- Button with icon -->
186
+ <button style="display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: #0ea5e9; color: white; border: none; border-radius: 0.375rem; cursor: pointer;">
187
+ <span class="ivds-icon ivds-icon--check ivds-icon--sm"></span>
188
+ Save Changes
189
+ </button>
190
+
191
+ <!-- Alert with icon -->
192
+ <div style="display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; background: #fef3c7; border: 1px solid #f59e0b; border-radius: 0.375rem;">
193
+ <span class="ivds-icon ivds-icon--warning ivds-icon--warning"></span>
194
+ <div>
195
+ <h4 style="margin: 0 0 0.25rem 0; font-weight: 600; color: #92400e;">Warning</h4>
196
+ <p style="margin: 0; color: #92400e;">This action cannot be undone.</p>
197
+ </div>
198
+ </div>
199
+
200
+ <!-- Navigation with icons -->
201
+ <nav style="display: flex; gap: 1rem;">
202
+ <a href="#" style="display: flex; align-items: center; gap: 0.5rem; color: #374151; text-decoration: none;">
203
+ <span class="ivds-icon ivds-icon--arrow-left ivds-icon--sm"></span>
204
+ Previous
205
+ </a>
206
+ <a href="#" style="display: flex; align-items: center; gap: 0.5rem; color: #374151; text-decoration: none;">
207
+ Next
208
+ <span class="ivds-icon ivds-icon--arrow-right ivds-icon--sm"></span>
209
+ </a>
210
+ </nav>
211
+
212
+ <!-- Input with icon -->
213
+ <div style="position: relative; max-width: 300px;">
214
+ <span class="ivds-icon ivds-icon--info ivds-icon--sm" style="position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: #6b7280;"></span>
215
+ <input type="text" placeholder="Enter information..." style="width: 100%; padding: 0.75rem 0.75rem 0.75rem 2.5rem; border: 1px solid #d1d5db; border-radius: 0.375rem;">
216
+ </div>
217
+ </div>
218
+ `;
219
+
220
+ export const UsageExamples = () => `
221
+ <div style="font-family: monospace; background: #f9fafb; padding: 1rem; border-radius: 0.375rem;">
222
+ <h3 style="margin-top: 0;">HTML Usage Examples:</h3>
223
+
224
+ <div style="margin-bottom: 1rem;">
225
+ <strong>Basic icon:</strong><br>
226
+ <code>&lt;span class="ivds-icon ivds-icon--check"&gt;&lt;/span&gt;</code>
227
+ </div>
228
+
229
+ <div style="margin-bottom: 1rem;">
230
+ <strong>Icon with size and color:</strong><br>
231
+ <code>&lt;span class="ivds-icon ivds-icon--warning ivds-icon--lg ivds-icon--warning"&gt;&lt;/span&gt;</code>
232
+ </div>
233
+
234
+ <div style="margin-bottom: 1rem;">
235
+ <strong>Interactive icon:</strong><br>
236
+ <code>&lt;button&gt;&lt;span class="ivds-icon ivds-icon--close ivds-icon--interactive"&gt;&lt;/span&gt;&lt;/button&gt;</code>
237
+ </div>
238
+
239
+ <div style="margin-bottom: 1rem;">
240
+ <strong>Disabled icon:</strong><br>
241
+ <code>&lt;span class="ivds-icon ivds-icon--info ivds-icon--disabled"&gt;&lt;/span&gt;</code>
242
+ </div>
243
+
244
+ <div>
245
+ <strong>Force Unicode fallback (no SVG):</strong><br>
246
+ <code>&lt;span class="ivds-icon ivds-icon--check ivds-icon--no-svg"&gt;&lt;/span&gt;</code>
247
+ </div>
248
+ </div>
249
+ `;
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <path d="m15 18-6-6 6-6"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <path d="m9 18 6-6-6-6"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <path d="M20 6 9 17l-5-5"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <path d="M18 6 6 18"/>
3
+ <path d="m6 6 12 12"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="12" cy="12" r="10"/>
3
+ <path d="M15 9l-6 6"/>
4
+ <path d="M9 9l6 6"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="12" cy="12" r="10"/>
3
+ <path d="M12 16v-4"/>
4
+ <path d="M12 8h.01"/>
5
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <circle cx="12" cy="12" r="10"/>
3
+ <path d="M9 12l2 2 4-4"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
3
+ <path d="M12 9v4"/>
4
+ <path d="M12 17h.01"/>
5
+ </svg>
@@ -0,0 +1,37 @@
1
+ // SCSS compilation test for utility classes
2
+
3
+ // Test basic utility classes compilation
4
+ .test-spacing {
5
+ margin: var(--spacing-4, 1rem) !important;
6
+ padding: var(--spacing-2, 0.5rem) !important;
7
+ margin-left: auto !important;
8
+ margin-right: auto !important;
9
+ }
10
+
11
+ .test-grid {
12
+ display: grid !important;
13
+ gap: var(--spacing-4, 1rem);
14
+ grid-template-columns: repeat(3, 1fr) !important;
15
+ }
16
+
17
+ .test-flex {
18
+ display: flex !important;
19
+ justify-content: center !important;
20
+ align-items: center !important;
21
+ gap: var(--spacing-4, 1rem) !important;
22
+ }
23
+
24
+ .test-typography {
25
+ font-size: var(--fontSize-lg, 1.125rem) !important;
26
+ font-weight: var(--fontWeight-semibold, 600) !important;
27
+ text-align: center !important;
28
+ }
29
+
30
+ .test-layout {
31
+ width: 100% !important;
32
+ margin-left: auto !important;
33
+ margin-right: auto !important;
34
+ padding-left: var(--spacing-4, 1rem) !important;
35
+ padding-right: var(--spacing-4, 1rem) !important;
36
+ max-width: 1024px !important;
37
+ }