@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.
- package/CHANGELOG.md +45 -0
- package/README.md +215 -0
- package/lib/all.css +6802 -0
- package/lib/all.min.css +1 -0
- package/lib/base/base.css +215 -0
- package/lib/base/base.min.css +1 -0
- package/lib/components/_breadcrumb-mixins.scss +173 -0
- package/lib/components/_button-mixin.scss +120 -0
- package/lib/components/_card-mixin.scss +196 -0
- package/lib/components/_checkbox-mixin.scss +208 -0
- package/lib/components/_footer-mixin.scss +385 -0
- package/lib/components/_header-mixin.scss +275 -0
- package/lib/components/_navigation-mixins.scss +270 -0
- package/lib/components/_notification-mixin.scss +239 -0
- package/lib/components/_pagination-mixins.scss +280 -0
- package/lib/components/_radio-button-mixin.scss +207 -0
- package/lib/components/_tag-mixin.scss +261 -0
- package/lib/components/_text-input-mixin.scss +203 -0
- package/lib/components/all.css +3005 -0
- package/lib/components/all.min.css +1 -0
- package/lib/components/breadcrumb/breadcrumb.css +141 -0
- package/lib/components/breadcrumb/breadcrumb.min.css +1 -0
- package/lib/components/button/button.css +221 -0
- package/lib/components/button/button.min.css +1 -0
- package/lib/components/card/card.css +236 -0
- package/lib/components/card/card.min.css +1 -0
- package/lib/components/checkbox/checkbox.css +305 -0
- package/lib/components/checkbox/checkbox.min.css +1 -0
- package/lib/components/footer/footer.css +466 -0
- package/lib/components/footer/footer.min.css +1 -0
- package/lib/components/header/header.css +274 -0
- package/lib/components/header/header.min.css +1 -0
- package/lib/components/navigation/navigation.css +214 -0
- package/lib/components/navigation/navigation.min.css +1 -0
- package/lib/components/notification/notification.css +253 -0
- package/lib/components/notification/notification.min.css +1 -0
- package/lib/components/pagination/pagination.css +221 -0
- package/lib/components/pagination/pagination.min.css +1 -0
- package/lib/components/radio-button/radio-button.css +326 -0
- package/lib/components/radio-button/radio-button.min.css +1 -0
- package/lib/components/tag/tag.css +367 -0
- package/lib/components/tag/tag.min.css +1 -0
- package/lib/components/text-input/text-input.css +243 -0
- package/lib/components/text-input/text-input.min.css +1 -0
- package/lib/icons/icon-arrow-left.css +139 -0
- package/lib/icons/icon-arrow-left.min.css +1 -0
- package/lib/icons/icon-arrow-right.css +139 -0
- package/lib/icons/icon-arrow-right.min.css +1 -0
- package/lib/icons/icon-check.css +139 -0
- package/lib/icons/icon-check.min.css +1 -0
- package/lib/icons/icon-close.css +140 -0
- package/lib/icons/icon-close.min.css +1 -0
- package/lib/icons/icon-error.css +140 -0
- package/lib/icons/icon-error.min.css +1 -0
- package/lib/icons/icon-info.css +140 -0
- package/lib/icons/icon-info.min.css +1 -0
- package/lib/icons/icon-success.css +139 -0
- package/lib/icons/icon-success.min.css +1 -0
- package/lib/icons/icon-warning.css +139 -0
- package/lib/icons/icon-warning.min.css +1 -0
- package/lib/icons/icons.css +1158 -0
- package/lib/icons/icons.min.css +1 -0
- package/lib/utils/_flex.scss +200 -0
- package/lib/utils/_grid.scss +211 -0
- package/lib/utils/_layout.scss +253 -0
- package/lib/utils/_spacing.scss +260 -0
- package/lib/utils/_typography.scss +111 -0
- package/lib/utils/utils.css +2434 -0
- package/lib/utils/utils.min.css +1 -0
- package/lib/utils-only.css +2801 -0
- package/lib/utils-only.min.css +1 -0
- package/lib/variables/variables.css +2 -0
- package/lib/variables/variables.min.css +0 -0
- package/package.json +194 -0
- package/src/__tests__/example.test.scss +12 -0
- package/src/accessibility.stories.js +416 -0
- package/src/all.scss +9 -0
- package/src/base/_layout.scss +97 -0
- package/src/base/_reset.scss +85 -0
- package/src/base/_typography.scss +105 -0
- package/src/base/base.scss +6 -0
- package/src/components/all.scss +22 -0
- package/src/components/breadcrumb/_breadcrumb-mixins.scss +173 -0
- package/src/components/breadcrumb/breadcrumb.scss +68 -0
- package/src/components/breadcrumb/breadcrumb.stories.js +483 -0
- package/src/components/button/__tests__/button-mixins.test.scss +35 -0
- package/src/components/button/_button-mixin.scss +120 -0
- package/src/components/button/button.scss +126 -0
- package/src/components/button/button.stories.js +364 -0
- package/src/components/card/__tests__/card-mixins.test.scss +36 -0
- package/src/components/card/_card-mixin.scss +196 -0
- package/src/components/card/card.scss +193 -0
- package/src/components/card/card.stories.js +635 -0
- package/src/components/checkbox/_checkbox-mixin.scss +208 -0
- package/src/components/checkbox/checkbox.scss +141 -0
- package/src/components/checkbox/checkbox.stories.js +303 -0
- package/src/components/footer/_footer-mixin.scss +385 -0
- package/src/components/footer/footer.scss +86 -0
- package/src/components/footer/footer.stories.js +740 -0
- package/src/components/header/_header-mixin.scss +275 -0
- package/src/components/header/header.scss +84 -0
- package/src/components/header/header.stories.js +450 -0
- package/src/components/navigation/_navigation-mixins.scss +270 -0
- package/src/components/navigation/navigation.scss +64 -0
- package/src/components/navigation/navigation.stories.js +410 -0
- package/src/components/notification/_notification-mixin.scss +239 -0
- package/src/components/notification/notification.scss +118 -0
- package/src/components/notification/notification.stories.js +378 -0
- package/src/components/overview.stories.js +473 -0
- package/src/components/pagination/_pagination-mixins.scss +280 -0
- package/src/components/pagination/pagination.scss +76 -0
- package/src/components/pagination/pagination.stories.js +729 -0
- package/src/components/radio-button/_radio-button-mixin.scss +207 -0
- package/src/components/radio-button/radio-button.scss +178 -0
- package/src/components/radio-button/radio-button.stories.js +379 -0
- package/src/components/tag/_tag-mixin.scss +261 -0
- package/src/components/tag/tag.scss +244 -0
- package/src/components/tag/tag.stories.js +482 -0
- package/src/components/text-input/_text-input-mixin.scss +203 -0
- package/src/components/text-input/text-input.scss +150 -0
- package/src/components/text-input/text-input.stories.js +723 -0
- package/src/icons/_icon.scss +121 -0
- package/src/icons/icon-arrow-left.scss +23 -0
- package/src/icons/icon-arrow-right.scss +23 -0
- package/src/icons/icon-check.scss +23 -0
- package/src/icons/icon-close.scss +24 -0
- package/src/icons/icon-error.scss +24 -0
- package/src/icons/icon-info.scss +24 -0
- package/src/icons/icon-success.scss +23 -0
- package/src/icons/icon-warning.scss +23 -0
- package/src/icons/icons.scss +12 -0
- package/src/icons/icons.stories.js +249 -0
- package/src/icons/svg/arrow-left.svg +3 -0
- package/src/icons/svg/arrow-right.svg +3 -0
- package/src/icons/svg/check.svg +3 -0
- package/src/icons/svg/close.svg +4 -0
- package/src/icons/svg/error.svg +5 -0
- package/src/icons/svg/info.svg +5 -0
- package/src/icons/svg/success.svg +4 -0
- package/src/icons/svg/warning.svg +5 -0
- package/src/utils/__tests__/utilities.test.scss +37 -0
- package/src/utils/_flex.scss +200 -0
- package/src/utils/_grid.scss +211 -0
- package/src/utils/_layout.scss +253 -0
- package/src/utils/_spacing.scss +260 -0
- package/src/utils/_typography.scss +111 -0
- package/src/utils/utils.scss +8 -0
- package/src/variables/_borders.scss +15 -0
- package/src/variables/_breakpoints.scss +11 -0
- package/src/variables/_colors.scss +97 -0
- package/src/variables/_shadows.scss +14 -0
- package/src/variables/_spacing.scss +24 -0
- package/src/variables/_typography.scss +47 -0
- package/src/variables/variables.scss +9 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// Tag component mixins and private styles
|
|
2
|
+
// This file contains mixins for tag variants, sizes, and internal utilities
|
|
3
|
+
|
|
4
|
+
@use '../../variables/variables' as vars;
|
|
5
|
+
|
|
6
|
+
// Base tag mixin with common styles
|
|
7
|
+
@mixin tag-base {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
font-family: var(--fontFamily-sans, system-ui, -apple-system, sans-serif);
|
|
11
|
+
font-weight: var(--fontWeight-medium, 500);
|
|
12
|
+
line-height: var(--lineHeight-tight, 1.25);
|
|
13
|
+
border-radius: var(--borderRadius-md, 0.375rem);
|
|
14
|
+
border: var(--borderWidth-1, 1px) solid transparent;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
transition: all 0.15s ease-in-out;
|
|
18
|
+
user-select: none;
|
|
19
|
+
|
|
20
|
+
&:focus-within {
|
|
21
|
+
outline: 2px solid var(--color-brand-primary-500, #0ea5e9);
|
|
22
|
+
outline-offset: 2px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Tag variant mixin
|
|
27
|
+
@mixin tag-variant($bg-color, $text-color, $border-color: transparent, $hover-bg: null, $hover-border: null) {
|
|
28
|
+
background-color: $bg-color;
|
|
29
|
+
color: $text-color;
|
|
30
|
+
border-color: $border-color;
|
|
31
|
+
|
|
32
|
+
@if $hover-bg {
|
|
33
|
+
&:hover {
|
|
34
|
+
background-color: $hover-bg;
|
|
35
|
+
|
|
36
|
+
@if $hover-border {
|
|
37
|
+
border-color: $hover-border;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Tag size mixin
|
|
44
|
+
@mixin tag-size($padding-y, $padding-x, $font-size, $min-height: null) {
|
|
45
|
+
padding: $padding-y $padding-x;
|
|
46
|
+
font-size: $font-size;
|
|
47
|
+
|
|
48
|
+
@if $min-height {
|
|
49
|
+
min-height: $min-height;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Tag with icon mixin
|
|
54
|
+
@mixin tag-with-icon($gap: var(--spacing-2, 0.5rem)) {
|
|
55
|
+
gap: $gap;
|
|
56
|
+
|
|
57
|
+
.ivds-tag__icon {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
|
|
63
|
+
svg {
|
|
64
|
+
width: 1em;
|
|
65
|
+
height: 1em;
|
|
66
|
+
fill: currentcolor;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Removable tag mixin
|
|
72
|
+
@mixin tag-removable {
|
|
73
|
+
padding-right: var(--spacing-1, 0.25rem);
|
|
74
|
+
|
|
75
|
+
.ivds-tag__remove {
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
margin-left: var(--spacing-2, 0.5rem);
|
|
80
|
+
padding: var(--spacing-1, 0.25rem);
|
|
81
|
+
background: transparent;
|
|
82
|
+
border: none;
|
|
83
|
+
border-radius: var(--borderRadius-sm, 0.25rem);
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
color: inherit;
|
|
86
|
+
opacity: 0.7;
|
|
87
|
+
transition: opacity 0.15s ease-in-out, background-color 0.15s ease-in-out;
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:focus {
|
|
95
|
+
outline: 2px solid var(--color-brand-primary-500, #0ea5e9);
|
|
96
|
+
outline-offset: 1px;
|
|
97
|
+
opacity: 1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:active {
|
|
101
|
+
transform: scale(0.95);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
svg {
|
|
105
|
+
width: 0.875em;
|
|
106
|
+
height: 0.875em;
|
|
107
|
+
fill: currentcolor;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Tag link mixin (for clickable tags)
|
|
113
|
+
@mixin tag-link {
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
text-decoration: none;
|
|
116
|
+
|
|
117
|
+
&:hover {
|
|
118
|
+
text-decoration: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:focus {
|
|
122
|
+
outline: 2px solid var(--color-brand-primary-500, #0ea5e9);
|
|
123
|
+
outline-offset: 2px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:active {
|
|
127
|
+
transform: translateY(1px);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Tag outlined variant mixin
|
|
132
|
+
@mixin tag-outlined($border-color, $text-color, $hover-bg: null) {
|
|
133
|
+
background-color: transparent;
|
|
134
|
+
border-color: $border-color;
|
|
135
|
+
color: $text-color;
|
|
136
|
+
|
|
137
|
+
@if $hover-bg {
|
|
138
|
+
&:hover {
|
|
139
|
+
background-color: $hover-bg;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Tag solid variant mixin (for high contrast)
|
|
145
|
+
@mixin tag-solid($bg-color, $text-color, $hover-bg: null) {
|
|
146
|
+
background-color: $bg-color;
|
|
147
|
+
color: $text-color;
|
|
148
|
+
border-color: $bg-color;
|
|
149
|
+
|
|
150
|
+
@if $hover-bg {
|
|
151
|
+
&:hover {
|
|
152
|
+
background-color: $hover-bg;
|
|
153
|
+
border-color: $hover-bg;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Tag group mixin
|
|
159
|
+
@mixin tag-group($gap: var(--spacing-2, 0.5rem)) {
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-wrap: wrap;
|
|
162
|
+
gap: $gap;
|
|
163
|
+
align-items: center;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Tag size variants
|
|
167
|
+
@mixin tag-small {
|
|
168
|
+
@include tag-size(var(--spacing-1, 0.25rem), var(--spacing-2, 0.5rem), var(--fontSize-xs, 0.75rem), 20px);
|
|
169
|
+
|
|
170
|
+
.ivds-tag__icon svg {
|
|
171
|
+
width: 0.875em;
|
|
172
|
+
height: 0.875em;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&.ivds-tag--removable {
|
|
176
|
+
.ivds-tag__remove {
|
|
177
|
+
margin-left: var(--spacing-1, 0.25rem);
|
|
178
|
+
padding: 2px;
|
|
179
|
+
|
|
180
|
+
svg {
|
|
181
|
+
width: 0.75em;
|
|
182
|
+
height: 0.75em;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@mixin tag-large {
|
|
189
|
+
@include tag-size(var(--spacing-2, 0.5rem), var(--spacing-4, 1rem), var(--fontSize-base, 1rem), 32px);
|
|
190
|
+
|
|
191
|
+
.ivds-tag__icon svg {
|
|
192
|
+
width: 1.125em;
|
|
193
|
+
height: 1.125em;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.ivds-tag--removable {
|
|
197
|
+
.ivds-tag__remove {
|
|
198
|
+
margin-left: var(--spacing-3, 0.75rem);
|
|
199
|
+
padding: var(--spacing-1, 0.25rem);
|
|
200
|
+
|
|
201
|
+
svg {
|
|
202
|
+
width: 1em;
|
|
203
|
+
height: 1em;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Tag status variants (for different semantic meanings)
|
|
210
|
+
@mixin tag-status-new {
|
|
211
|
+
position: relative;
|
|
212
|
+
|
|
213
|
+
&::after {
|
|
214
|
+
content: '';
|
|
215
|
+
position: absolute;
|
|
216
|
+
top: -2px;
|
|
217
|
+
right: -2px;
|
|
218
|
+
width: 6px;
|
|
219
|
+
height: 6px;
|
|
220
|
+
background-color: var(--color-semantic-success-500, #22c55e);
|
|
221
|
+
border-radius: 50%;
|
|
222
|
+
border: 1px solid var(--color-semantic-neutral-50, #f8fafc);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@mixin tag-status-updated {
|
|
227
|
+
position: relative;
|
|
228
|
+
|
|
229
|
+
&::after {
|
|
230
|
+
content: '';
|
|
231
|
+
position: absolute;
|
|
232
|
+
top: -2px;
|
|
233
|
+
right: -2px;
|
|
234
|
+
width: 6px;
|
|
235
|
+
height: 6px;
|
|
236
|
+
background-color: var(--color-semantic-info-500, #3b82f6);
|
|
237
|
+
border-radius: 50%;
|
|
238
|
+
border: 1px solid var(--color-semantic-neutral-50, #f8fafc);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Tag interactive states
|
|
243
|
+
@mixin tag-interactive {
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
|
|
246
|
+
&:hover {
|
|
247
|
+
transform: translateY(-1px);
|
|
248
|
+
box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&:active {
|
|
252
|
+
transform: translateY(0);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Tag disabled state
|
|
257
|
+
@mixin tag-disabled {
|
|
258
|
+
opacity: 0.5;
|
|
259
|
+
cursor: not-allowed;
|
|
260
|
+
pointer-events: none;
|
|
261
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// Text input component mixins and private styles
|
|
2
|
+
// This file contains mixins for input variants, sizes, states, and internal utilities
|
|
3
|
+
|
|
4
|
+
@use '../../variables/variables' as vars;
|
|
5
|
+
|
|
6
|
+
// Base input mixin with common styles
|
|
7
|
+
@mixin text-input-base {
|
|
8
|
+
display: block;
|
|
9
|
+
width: 100%;
|
|
10
|
+
border: var(--borderWidth-1, 1px) solid var(--color-semantic-neutral-300, #cbd5e1);
|
|
11
|
+
border-radius: var(--borderRadius-md, 0.375rem);
|
|
12
|
+
font-family: var(--fontFamily-sans, system-ui, -apple-system, sans-serif);
|
|
13
|
+
line-height: var(--lineHeight-normal, 1.5);
|
|
14
|
+
color: var(--color-semantic-neutral-900, #0f172a);
|
|
15
|
+
background-color: var(--color-semantic-neutral-50, #f8fafc);
|
|
16
|
+
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
17
|
+
|
|
18
|
+
&::placeholder {
|
|
19
|
+
color: var(--color-semantic-neutral-500, #64748b);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:focus {
|
|
23
|
+
outline: none;
|
|
24
|
+
border-color: var(--color-brand-primary-500, #f97316);
|
|
25
|
+
box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:disabled {
|
|
29
|
+
background-color: var(--color-semantic-neutral-100, #f1f5f9);
|
|
30
|
+
color: var(--color-semantic-neutral-500, #64748b);
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
opacity: 0.6;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Input size mixin
|
|
37
|
+
@mixin text-input-size($padding-y, $padding-x, $font-size, $min-height: null) {
|
|
38
|
+
padding: $padding-y $padding-x;
|
|
39
|
+
font-size: $font-size;
|
|
40
|
+
|
|
41
|
+
@if $min-height {
|
|
42
|
+
min-height: $min-height;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Input state mixin
|
|
47
|
+
@mixin text-input-state($border-color, $focus-border-color: null, $focus-shadow-color: null) {
|
|
48
|
+
border-color: $border-color;
|
|
49
|
+
|
|
50
|
+
@if $focus-border-color {
|
|
51
|
+
&:focus {
|
|
52
|
+
border-color: $focus-border-color;
|
|
53
|
+
|
|
54
|
+
@if $focus-shadow-color {
|
|
55
|
+
box-shadow: 0 0 0 3px $focus-shadow-color;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Input wrapper mixin
|
|
62
|
+
@mixin text-input-wrapper {
|
|
63
|
+
position: relative;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: var(--spacing-2, 0.5rem);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Input label mixin
|
|
70
|
+
@mixin text-input-label {
|
|
71
|
+
display: block;
|
|
72
|
+
font-size: var(--fontSize-sm, 0.875rem);
|
|
73
|
+
font-weight: var(--fontWeight-medium, 500);
|
|
74
|
+
color: var(--color-semantic-neutral-700, #374151);
|
|
75
|
+
margin-bottom: var(--spacing-1, 0.25rem);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Input helper text mixin
|
|
79
|
+
@mixin text-input-helper {
|
|
80
|
+
font-size: var(--fontSize-sm, 0.875rem);
|
|
81
|
+
color: var(--color-semantic-neutral-600, #4b5563);
|
|
82
|
+
margin-top: var(--spacing-1, 0.25rem);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Input error text mixin
|
|
86
|
+
@mixin text-input-error {
|
|
87
|
+
font-size: var(--fontSize-sm, 0.875rem);
|
|
88
|
+
color: var(--color-semantic-error-600, #dc2626);
|
|
89
|
+
margin-top: var(--spacing-1, 0.25rem);
|
|
90
|
+
|
|
91
|
+
&::before {
|
|
92
|
+
content: '⚠ ';
|
|
93
|
+
margin-right: var(--spacing-1, 0.25rem);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Input with left icon mixin
|
|
98
|
+
@mixin text-input-with-icon-left($icon-size: 20px, $padding-adjustment: 2.5rem) {
|
|
99
|
+
position: relative;
|
|
100
|
+
|
|
101
|
+
.ivds-text-input {
|
|
102
|
+
padding-left: $padding-adjustment;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ivds-text-input__icon {
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 50%;
|
|
108
|
+
left: var(--spacing-3, 0.75rem);
|
|
109
|
+
transform: translateY(-50%);
|
|
110
|
+
width: $icon-size;
|
|
111
|
+
height: $icon-size;
|
|
112
|
+
color: var(--color-semantic-neutral-500, #64748b);
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
|
|
115
|
+
svg {
|
|
116
|
+
width: 100%;
|
|
117
|
+
height: 100%;
|
|
118
|
+
fill: currentcolor;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Input with right icon mixin
|
|
124
|
+
@mixin text-input-with-icon-right($icon-size: 20px, $padding-adjustment: 2.5rem) {
|
|
125
|
+
position: relative;
|
|
126
|
+
|
|
127
|
+
.ivds-text-input {
|
|
128
|
+
padding-right: $padding-adjustment;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ivds-text-input__icon {
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 50%;
|
|
134
|
+
right: var(--spacing-3, 0.75rem);
|
|
135
|
+
transform: translateY(-50%);
|
|
136
|
+
width: $icon-size;
|
|
137
|
+
height: $icon-size;
|
|
138
|
+
color: var(--color-semantic-neutral-500, #64748b);
|
|
139
|
+
pointer-events: none;
|
|
140
|
+
|
|
141
|
+
svg {
|
|
142
|
+
width: 100%;
|
|
143
|
+
height: 100%;
|
|
144
|
+
fill: currentcolor;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Required field indicator mixin
|
|
150
|
+
@mixin text-input-required {
|
|
151
|
+
&::after {
|
|
152
|
+
content: ' *';
|
|
153
|
+
color: var(--color-semantic-error-500, #ef4444);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Input group mixin (for addons)
|
|
158
|
+
@mixin text-input-group {
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: stretch;
|
|
161
|
+
|
|
162
|
+
.ivds-text-input {
|
|
163
|
+
flex: 1;
|
|
164
|
+
border-radius: 0;
|
|
165
|
+
|
|
166
|
+
&:first-child {
|
|
167
|
+
border-top-left-radius: var(--borderRadius-md, 0.375rem);
|
|
168
|
+
border-bottom-left-radius: var(--borderRadius-md, 0.375rem);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&:last-child {
|
|
172
|
+
border-top-right-radius: var(--borderRadius-md, 0.375rem);
|
|
173
|
+
border-bottom-right-radius: var(--borderRadius-md, 0.375rem);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&:not(:first-child) {
|
|
177
|
+
border-left: 0;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ivds-text-input__addon {
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
padding: var(--spacing-3, 0.75rem);
|
|
185
|
+
background-color: var(--color-semantic-neutral-100, #f1f5f9);
|
|
186
|
+
border: var(--borderWidth-1, 1px) solid var(--color-semantic-neutral-300, #cbd5e1);
|
|
187
|
+
color: var(--color-semantic-neutral-600, #4b5563);
|
|
188
|
+
font-size: var(--fontSize-sm, 0.875rem);
|
|
189
|
+
white-space: nowrap;
|
|
190
|
+
|
|
191
|
+
&:first-child {
|
|
192
|
+
border-top-left-radius: var(--borderRadius-md, 0.375rem);
|
|
193
|
+
border-bottom-left-radius: var(--borderRadius-md, 0.375rem);
|
|
194
|
+
border-right: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:last-child {
|
|
198
|
+
border-top-right-radius: var(--borderRadius-md, 0.375rem);
|
|
199
|
+
border-bottom-right-radius: var(--borderRadius-md, 0.375rem);
|
|
200
|
+
border-left: 0;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|