@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,244 @@
1
+ // Tag component styles
2
+ // Provides styling for the IVDS tag component with all variants, sizes, and removable functionality
3
+
4
+ @use '_tag-mixin' as tag;
5
+
6
+ // Tag Base
7
+ .ivds-tag {
8
+ @include tag.tag-base;
9
+ @include tag.tag-size(var(--spacing-1, 0.25rem), var(--spacing-3, 0.75rem), var(--fontSize-sm, 0.875rem), 24px);
10
+ @include tag.tag-with-icon;
11
+ @include tag.tag-variant(
12
+ var(--color-semantic-neutral-100, #f1f5f9),
13
+ var(--color-semantic-neutral-700, #334155),
14
+ transparent,
15
+ var(--color-semantic-neutral-200, #e2e8f0)
16
+ );
17
+
18
+ // Tag elements
19
+ &__icon {
20
+ display: inline-flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ flex-shrink: 0;
24
+
25
+ svg {
26
+ width: 1em;
27
+ height: 1em;
28
+ fill: currentcolor;
29
+ }
30
+ }
31
+
32
+ &__text {
33
+ flex: 1;
34
+ }
35
+
36
+ &__remove {
37
+ display: inline-flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ flex-shrink: 0;
41
+
42
+ svg {
43
+ width: 0.875em;
44
+ height: 0.875em;
45
+ fill: currentcolor;
46
+ }
47
+ }
48
+ }
49
+
50
+ // Tag Color Variants
51
+ .ivds-tag--primary {
52
+ @include tag.tag-variant(
53
+ var(--color-brand-primary-100, #ffedd5),
54
+ var(--color-brand-primary-700, #c2410c),
55
+ transparent,
56
+ var(--color-brand-primary-200, #fed7aa)
57
+ );
58
+ }
59
+
60
+ .ivds-tag--success {
61
+ @include tag.tag-variant(
62
+ var(--color-semantic-success-100, #dcfce7),
63
+ var(--color-semantic-success-700, #15803d),
64
+ transparent,
65
+ var(--color-semantic-success-200, #bbf7d0)
66
+ );
67
+ }
68
+
69
+ .ivds-tag--warning {
70
+ @include tag.tag-variant(
71
+ var(--color-semantic-warning-100, #fef3c7),
72
+ var(--color-semantic-warning-700, #b45309),
73
+ transparent,
74
+ var(--color-semantic-warning-200, #fed7aa)
75
+ );
76
+ }
77
+
78
+ .ivds-tag--error {
79
+ @include tag.tag-variant(
80
+ var(--color-semantic-error-100, #fee2e2),
81
+ var(--color-semantic-error-700, #b91c1c),
82
+ transparent,
83
+ var(--color-semantic-error-200, #fecaca)
84
+ );
85
+ }
86
+
87
+ .ivds-tag--info {
88
+ @include tag.tag-variant(
89
+ var(--color-semantic-info-100, #dbeafe),
90
+ var(--color-semantic-info-700, #1d4ed8),
91
+ transparent,
92
+ var(--color-semantic-info-200, #bfdbfe)
93
+ );
94
+ }
95
+
96
+ // Tag Style Variants
97
+ .ivds-tag--outlined {
98
+ &.ivds-tag {
99
+ @include tag.tag-outlined(
100
+ var(--color-semantic-neutral-300, #cbd5e1),
101
+ var(--color-semantic-neutral-700, #334155),
102
+ var(--color-semantic-neutral-50, #f8fafc)
103
+ );
104
+ }
105
+
106
+ &.ivds-tag--primary {
107
+ @include tag.tag-outlined(
108
+ var(--color-brand-primary-300, #fdba74),
109
+ var(--color-brand-primary-700, #c2410c),
110
+ var(--color-brand-primary-50, #fff7ed)
111
+ );
112
+ }
113
+
114
+ &.ivds-tag--success {
115
+ @include tag.tag-outlined(
116
+ var(--color-semantic-success-300, #86efac),
117
+ var(--color-semantic-success-700, #15803d),
118
+ var(--color-semantic-success-50, #f0fdf4)
119
+ );
120
+ }
121
+
122
+ &.ivds-tag--warning {
123
+ @include tag.tag-outlined(
124
+ var(--color-semantic-warning-300, #fcd34d),
125
+ var(--color-semantic-warning-700, #b45309),
126
+ var(--color-semantic-warning-50, #fffbeb)
127
+ );
128
+ }
129
+
130
+ &.ivds-tag--error {
131
+ @include tag.tag-outlined(
132
+ var(--color-semantic-error-300, #fca5a5),
133
+ var(--color-semantic-error-700, #b91c1c),
134
+ var(--color-semantic-error-50, #fef2f2)
135
+ );
136
+ }
137
+
138
+ &.ivds-tag--info {
139
+ @include tag.tag-outlined(
140
+ var(--color-semantic-info-300, #93c5fd),
141
+ var(--color-semantic-info-700, #1d4ed8),
142
+ var(--color-semantic-info-50, #eff6ff)
143
+ );
144
+ }
145
+ }
146
+
147
+ .ivds-tag--solid {
148
+ &.ivds-tag {
149
+ @include tag.tag-solid(
150
+ var(--color-semantic-neutral-600, #475569),
151
+ var(--color-semantic-neutral-50, #f8fafc),
152
+ var(--color-semantic-neutral-700, #334155)
153
+ );
154
+ }
155
+
156
+ &.ivds-tag--primary {
157
+ @include tag.tag-solid(
158
+ var(--color-brand-primary-600, #ea580c),
159
+ var(--color-semantic-neutral-50, #fafafa),
160
+ var(--color-brand-primary-700, #c2410c)
161
+ );
162
+ }
163
+
164
+ &.ivds-tag--success {
165
+ @include tag.tag-solid(
166
+ var(--color-semantic-success-600, #16a34a),
167
+ var(--color-semantic-neutral-50, #f8fafc),
168
+ var(--color-semantic-success-700, #15803d)
169
+ );
170
+ }
171
+
172
+ &.ivds-tag--warning {
173
+ @include tag.tag-solid(
174
+ var(--color-semantic-warning-600, #d97706),
175
+ var(--color-semantic-neutral-50, #f8fafc),
176
+ var(--color-semantic-warning-700, #b45309)
177
+ );
178
+ }
179
+
180
+ &.ivds-tag--error {
181
+ @include tag.tag-solid(
182
+ var(--color-semantic-error-600, #dc2626),
183
+ var(--color-semantic-neutral-50, #f8fafc),
184
+ var(--color-semantic-error-700, #b91c1c)
185
+ );
186
+ }
187
+
188
+ &.ivds-tag--info {
189
+ @include tag.tag-solid(
190
+ var(--color-semantic-info-600, #2563eb),
191
+ var(--color-semantic-neutral-50, #f8fafc),
192
+ var(--color-semantic-info-700, #1d4ed8)
193
+ );
194
+ }
195
+ }
196
+
197
+ // Tag Size Variants
198
+ .ivds-tag--small {
199
+ @include tag.tag-small;
200
+ }
201
+
202
+ .ivds-tag--large {
203
+ @include tag.tag-large;
204
+ }
205
+
206
+ // Tag Functionality Variants
207
+ .ivds-tag--removable {
208
+ @include tag.tag-removable;
209
+ }
210
+
211
+ .ivds-tag--link {
212
+ @include tag.tag-link;
213
+ }
214
+
215
+ .ivds-tag--interactive {
216
+ @include tag.tag-interactive;
217
+ }
218
+
219
+ // Tag Status Variants
220
+ .ivds-tag--new {
221
+ @include tag.tag-status-new;
222
+ }
223
+
224
+ .ivds-tag--updated {
225
+ @include tag.tag-status-updated;
226
+ }
227
+
228
+ // Tag State Variants
229
+ .ivds-tag--disabled {
230
+ @include tag.tag-disabled;
231
+ }
232
+
233
+ // Tag Group
234
+ .ivds-tag-group {
235
+ @include tag.tag-group;
236
+
237
+ &--compact {
238
+ @include tag.tag-group(var(--spacing-1, 0.25rem));
239
+ }
240
+
241
+ &--spacious {
242
+ @include tag.tag-group(var(--spacing-3, 0.75rem));
243
+ }
244
+ }