@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,482 @@
|
|
|
1
|
+
// Tag component stories for Storybook
|
|
2
|
+
// Showcases all tag variants, sizes, removable functionality, and different styles
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Core/Tag',
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: 'CSS-only tag component using IVDS design tokens. Provides multiple color variants, sizes, and removable functionality for labeling and categorization.'
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
a11y: {
|
|
13
|
+
config: {
|
|
14
|
+
rules: [
|
|
15
|
+
{
|
|
16
|
+
id: 'color-contrast',
|
|
17
|
+
enabled: true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'focus-order-semantics',
|
|
21
|
+
enabled: true
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Basic tag variants
|
|
30
|
+
export const Default = () => `
|
|
31
|
+
<span class="ivds-tag">
|
|
32
|
+
<span class="ivds-tag__text">Default Tag</span>
|
|
33
|
+
</span>
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export const Primary = () => `
|
|
37
|
+
<span class="ivds-tag ivds-tag--primary">
|
|
38
|
+
<span class="ivds-tag__text">Primary Tag</span>
|
|
39
|
+
</span>
|
|
40
|
+
`;
|
|
41
|
+
|
|
42
|
+
export const Success = () => `
|
|
43
|
+
<span class="ivds-tag ivds-tag--success">
|
|
44
|
+
<span class="ivds-tag__text">Success Tag</span>
|
|
45
|
+
</span>
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
export const Warning = () => `
|
|
49
|
+
<span class="ivds-tag ivds-tag--warning">
|
|
50
|
+
<span class="ivds-tag__text">Warning Tag</span>
|
|
51
|
+
</span>
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export const Error = () => `
|
|
55
|
+
<span class="ivds-tag ivds-tag--error">
|
|
56
|
+
<span class="ivds-tag__text">Error Tag</span>
|
|
57
|
+
</span>
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
export const Info = () => `
|
|
61
|
+
<span class="ivds-tag ivds-tag--info">
|
|
62
|
+
<span class="ivds-tag__text">Info Tag</span>
|
|
63
|
+
</span>
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
// Tag sizes
|
|
67
|
+
export const Sizes = () => `
|
|
68
|
+
<div style="display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;">
|
|
69
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--small">
|
|
70
|
+
<span class="ivds-tag__text">Small Tag</span>
|
|
71
|
+
</span>
|
|
72
|
+
<span class="ivds-tag ivds-tag--primary">
|
|
73
|
+
<span class="ivds-tag__text">Default Tag</span>
|
|
74
|
+
</span>
|
|
75
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--large">
|
|
76
|
+
<span class="ivds-tag__text">Large Tag</span>
|
|
77
|
+
</span>
|
|
78
|
+
</div>
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
// Tag style variants
|
|
82
|
+
export const StyleVariants = () => `
|
|
83
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
84
|
+
<div>
|
|
85
|
+
<h4 style="margin-bottom: 0.5rem;">Default (Filled)</h4>
|
|
86
|
+
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
|
87
|
+
<span class="ivds-tag">Default</span>
|
|
88
|
+
<span class="ivds-tag ivds-tag--primary">Primary</span>
|
|
89
|
+
<span class="ivds-tag ivds-tag--success">Success</span>
|
|
90
|
+
<span class="ivds-tag ivds-tag--warning">Warning</span>
|
|
91
|
+
<span class="ivds-tag ivds-tag--error">Error</span>
|
|
92
|
+
<span class="ivds-tag ivds-tag--info">Info</span>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div>
|
|
97
|
+
<h4 style="margin-bottom: 0.5rem;">Outlined</h4>
|
|
98
|
+
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
|
99
|
+
<span class="ivds-tag ivds-tag--outlined">Default</span>
|
|
100
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--outlined">Primary</span>
|
|
101
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--outlined">Success</span>
|
|
102
|
+
<span class="ivds-tag ivds-tag--warning ivds-tag--outlined">Warning</span>
|
|
103
|
+
<span class="ivds-tag ivds-tag--error ivds-tag--outlined">Error</span>
|
|
104
|
+
<span class="ivds-tag ivds-tag--info ivds-tag--outlined">Info</span>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div>
|
|
109
|
+
<h4 style="margin-bottom: 0.5rem;">Solid</h4>
|
|
110
|
+
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
|
111
|
+
<span class="ivds-tag ivds-tag--solid">Default</span>
|
|
112
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--solid">Primary</span>
|
|
113
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--solid">Success</span>
|
|
114
|
+
<span class="ivds-tag ivds-tag--warning ivds-tag--solid">Warning</span>
|
|
115
|
+
<span class="ivds-tag ivds-tag--error ivds-tag--solid">Error</span>
|
|
116
|
+
<span class="ivds-tag ivds-tag--info ivds-tag--solid">Info</span>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
// Tags with icons
|
|
123
|
+
export const WithIcons = () => `
|
|
124
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
125
|
+
<span class="ivds-tag ivds-tag--success">
|
|
126
|
+
<span class="ivds-tag__icon">
|
|
127
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
128
|
+
<path d="M9 12L11 14L15 10M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
129
|
+
</svg>
|
|
130
|
+
</span>
|
|
131
|
+
<span class="ivds-tag__text">Verified</span>
|
|
132
|
+
</span>
|
|
133
|
+
|
|
134
|
+
<span class="ivds-tag ivds-tag--warning">
|
|
135
|
+
<span class="ivds-tag__icon">
|
|
136
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
137
|
+
<path d="M12 9V13M12 17H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
138
|
+
</svg>
|
|
139
|
+
</span>
|
|
140
|
+
<span class="ivds-tag__text">Pending</span>
|
|
141
|
+
</span>
|
|
142
|
+
|
|
143
|
+
<span class="ivds-tag ivds-tag--info">
|
|
144
|
+
<span class="ivds-tag__icon">
|
|
145
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
146
|
+
<path d="M16 21V5A2 2 0 0 0 14 3H10A2 2 0 0 0 8 5V21L12 19L16 21Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
147
|
+
</svg>
|
|
148
|
+
</span>
|
|
149
|
+
<span class="ivds-tag__text">Bookmarked</span>
|
|
150
|
+
</span>
|
|
151
|
+
|
|
152
|
+
<span class="ivds-tag ivds-tag--primary">
|
|
153
|
+
<span class="ivds-tag__icon">
|
|
154
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
155
|
+
<path d="M16 4H18A2 2 0 0 1 20 6V20A2 2 0 0 1 18 22H6A2 2 0 0 1 4 20V6A2 2 0 0 1 6 4H8M9 1H15A1 1 0 0 1 16 2V5A1 1 0 0 1 15 6H9A1 1 0 0 1 8 5V2A1 1 0 0 1 9 1Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
156
|
+
</svg>
|
|
157
|
+
</span>
|
|
158
|
+
<span class="ivds-tag__text">Draft</span>
|
|
159
|
+
</span>
|
|
160
|
+
</div>
|
|
161
|
+
`;
|
|
162
|
+
|
|
163
|
+
// Removable tags
|
|
164
|
+
export const RemovableTags = () => `
|
|
165
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
166
|
+
<div>
|
|
167
|
+
<h4 style="margin-bottom: 0.5rem;">Removable Tags</h4>
|
|
168
|
+
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
|
169
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--removable">
|
|
170
|
+
<span class="ivds-tag__text">JavaScript</span>
|
|
171
|
+
<button class="ivds-tag__remove" aria-label="Remove JavaScript tag">
|
|
172
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
173
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
174
|
+
</svg>
|
|
175
|
+
</button>
|
|
176
|
+
</span>
|
|
177
|
+
|
|
178
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--removable">
|
|
179
|
+
<span class="ivds-tag__text">React</span>
|
|
180
|
+
<button class="ivds-tag__remove" aria-label="Remove React tag">
|
|
181
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
182
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
183
|
+
</svg>
|
|
184
|
+
</button>
|
|
185
|
+
</span>
|
|
186
|
+
|
|
187
|
+
<span class="ivds-tag ivds-tag--info ivds-tag--removable">
|
|
188
|
+
<span class="ivds-tag__text">TypeScript</span>
|
|
189
|
+
<button class="ivds-tag__remove" aria-label="Remove TypeScript tag">
|
|
190
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
191
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
192
|
+
</svg>
|
|
193
|
+
</button>
|
|
194
|
+
</span>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<div>
|
|
199
|
+
<h4 style="margin-bottom: 0.5rem;">Removable Tags with Icons</h4>
|
|
200
|
+
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
|
201
|
+
<span class="ivds-tag ivds-tag--warning ivds-tag--removable">
|
|
202
|
+
<span class="ivds-tag__icon">
|
|
203
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
204
|
+
<path d="M9 19C-2 12 2 6 9 12C16 6 20 12 9 19Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
205
|
+
</svg>
|
|
206
|
+
</span>
|
|
207
|
+
<span class="ivds-tag__text">Favorite</span>
|
|
208
|
+
<button class="ivds-tag__remove" aria-label="Remove Favorite tag">
|
|
209
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
210
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
211
|
+
</svg>
|
|
212
|
+
</button>
|
|
213
|
+
</span>
|
|
214
|
+
|
|
215
|
+
<span class="ivds-tag ivds-tag--error ivds-tag--removable">
|
|
216
|
+
<span class="ivds-tag__icon">
|
|
217
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
218
|
+
<path d="M12 8V12M12 16H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
219
|
+
</svg>
|
|
220
|
+
</span>
|
|
221
|
+
<span class="ivds-tag__text">Critical</span>
|
|
222
|
+
<button class="ivds-tag__remove" aria-label="Remove Critical tag">
|
|
223
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
224
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
225
|
+
</svg>
|
|
226
|
+
</button>
|
|
227
|
+
</span>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
`;
|
|
232
|
+
|
|
233
|
+
// Clickable tags (links)
|
|
234
|
+
export const ClickableTags = () => `
|
|
235
|
+
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
|
236
|
+
<a href="#" class="ivds-tag ivds-tag--primary ivds-tag--link">
|
|
237
|
+
<span class="ivds-tag__text">Frontend</span>
|
|
238
|
+
</a>
|
|
239
|
+
|
|
240
|
+
<a href="#" class="ivds-tag ivds-tag--success ivds-tag--link">
|
|
241
|
+
<span class="ivds-tag__text">Backend</span>
|
|
242
|
+
</a>
|
|
243
|
+
|
|
244
|
+
<a href="#" class="ivds-tag ivds-tag--info ivds-tag--link">
|
|
245
|
+
<span class="ivds-tag__text">Full Stack</span>
|
|
246
|
+
</a>
|
|
247
|
+
|
|
248
|
+
<button class="ivds-tag ivds-tag--warning ivds-tag--interactive">
|
|
249
|
+
<span class="ivds-tag__text">Interactive</span>
|
|
250
|
+
</button>
|
|
251
|
+
</div>
|
|
252
|
+
`;
|
|
253
|
+
|
|
254
|
+
// Tag status indicators
|
|
255
|
+
export const StatusTags = () => `
|
|
256
|
+
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
257
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--new">
|
|
258
|
+
<span class="ivds-tag__text">New Feature</span>
|
|
259
|
+
</span>
|
|
260
|
+
|
|
261
|
+
<span class="ivds-tag ivds-tag--info ivds-tag--updated">
|
|
262
|
+
<span class="ivds-tag__text">Updated</span>
|
|
263
|
+
</span>
|
|
264
|
+
|
|
265
|
+
<span class="ivds-tag ivds-tag--primary">
|
|
266
|
+
<span class="ivds-tag__text">Stable</span>
|
|
267
|
+
</span>
|
|
268
|
+
|
|
269
|
+
<span class="ivds-tag ivds-tag--warning">
|
|
270
|
+
<span class="ivds-tag__text">Beta</span>
|
|
271
|
+
</span>
|
|
272
|
+
</div>
|
|
273
|
+
`;
|
|
274
|
+
|
|
275
|
+
// Tag groups
|
|
276
|
+
export const TagGroups = () => `
|
|
277
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
278
|
+
<div>
|
|
279
|
+
<h4 style="margin-bottom: 0.5rem;">Default Spacing</h4>
|
|
280
|
+
<div class="ivds-tag-group">
|
|
281
|
+
<span class="ivds-tag ivds-tag--primary">React</span>
|
|
282
|
+
<span class="ivds-tag ivds-tag--success">JavaScript</span>
|
|
283
|
+
<span class="ivds-tag ivds-tag--info">TypeScript</span>
|
|
284
|
+
<span class="ivds-tag ivds-tag--warning">CSS</span>
|
|
285
|
+
<span class="ivds-tag ivds-tag--error">HTML</span>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<div>
|
|
290
|
+
<h4 style="margin-bottom: 0.5rem;">Compact Spacing</h4>
|
|
291
|
+
<div class="ivds-tag-group ivds-tag-group--compact">
|
|
292
|
+
<span class="ivds-tag ivds-tag--small">Frontend</span>
|
|
293
|
+
<span class="ivds-tag ivds-tag--small">Backend</span>
|
|
294
|
+
<span class="ivds-tag ivds-tag--small">DevOps</span>
|
|
295
|
+
<span class="ivds-tag ivds-tag--small">Design</span>
|
|
296
|
+
<span class="ivds-tag ivds-tag--small">Testing</span>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
<div>
|
|
301
|
+
<h4 style="margin-bottom: 0.5rem;">Spacious Layout</h4>
|
|
302
|
+
<div class="ivds-tag-group ivds-tag-group--spacious">
|
|
303
|
+
<span class="ivds-tag ivds-tag--large ivds-tag--primary">Architecture</span>
|
|
304
|
+
<span class="ivds-tag ivds-tag--large ivds-tag--success">Performance</span>
|
|
305
|
+
<span class="ivds-tag ivds-tag--large ivds-tag--info">Security</span>
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
`;
|
|
310
|
+
|
|
311
|
+
// Disabled tags
|
|
312
|
+
export const DisabledTags = () => `
|
|
313
|
+
<div style="display: flex; gap: 0.5rem; flex-wrap: wrap;">
|
|
314
|
+
<span class="ivds-tag ivds-tag--disabled">
|
|
315
|
+
<span class="ivds-tag__text">Disabled Tag</span>
|
|
316
|
+
</span>
|
|
317
|
+
|
|
318
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--disabled">
|
|
319
|
+
<span class="ivds-tag__text">Disabled Primary</span>
|
|
320
|
+
</span>
|
|
321
|
+
|
|
322
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--removable ivds-tag--disabled">
|
|
323
|
+
<span class="ivds-tag__text">Disabled Removable</span>
|
|
324
|
+
<button class="ivds-tag__remove" aria-label="Remove tag" disabled>
|
|
325
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
326
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
327
|
+
</svg>
|
|
328
|
+
</button>
|
|
329
|
+
</span>
|
|
330
|
+
</div>
|
|
331
|
+
`;
|
|
332
|
+
|
|
333
|
+
// All variants showcase
|
|
334
|
+
export const AllVariants = () => `
|
|
335
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
336
|
+
<div class="ivds-tag-group">
|
|
337
|
+
<span class="ivds-tag">Default</span>
|
|
338
|
+
<span class="ivds-tag ivds-tag--primary">Primary</span>
|
|
339
|
+
<span class="ivds-tag ivds-tag--success">Success</span>
|
|
340
|
+
<span class="ivds-tag ivds-tag--warning">Warning</span>
|
|
341
|
+
<span class="ivds-tag ivds-tag--error">Error</span>
|
|
342
|
+
<span class="ivds-tag ivds-tag--info">Info</span>
|
|
343
|
+
</div>
|
|
344
|
+
|
|
345
|
+
<div class="ivds-tag-group">
|
|
346
|
+
<span class="ivds-tag ivds-tag--outlined">Outlined</span>
|
|
347
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--outlined">Primary</span>
|
|
348
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--outlined">Success</span>
|
|
349
|
+
<span class="ivds-tag ivds-tag--warning ivds-tag--outlined">Warning</span>
|
|
350
|
+
<span class="ivds-tag ivds-tag--error ivds-tag--outlined">Error</span>
|
|
351
|
+
<span class="ivds-tag ivds-tag--info ivds-tag--outlined">Info</span>
|
|
352
|
+
</div>
|
|
353
|
+
|
|
354
|
+
<div class="ivds-tag-group">
|
|
355
|
+
<span class="ivds-tag ivds-tag--solid">Solid</span>
|
|
356
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--solid">Primary</span>
|
|
357
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--solid">Success</span>
|
|
358
|
+
<span class="ivds-tag ivds-tag--warning ivds-tag--solid">Warning</span>
|
|
359
|
+
<span class="ivds-tag ivds-tag--error ivds-tag--solid">Error</span>
|
|
360
|
+
<span class="ivds-tag ivds-tag--info ivds-tag--solid">Info</span>
|
|
361
|
+
</div>
|
|
362
|
+
</div>
|
|
363
|
+
`;
|
|
364
|
+
|
|
365
|
+
// Real-world usage examples
|
|
366
|
+
export const UsageExamples = () => `
|
|
367
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
368
|
+
<div>
|
|
369
|
+
<h4 style="margin-bottom: 0.5rem;">Skills & Technologies</h4>
|
|
370
|
+
<div class="ivds-tag-group">
|
|
371
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--removable">
|
|
372
|
+
<span class="ivds-tag__text">React</span>
|
|
373
|
+
<button class="ivds-tag__remove" aria-label="Remove React tag">
|
|
374
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
375
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
376
|
+
</svg>
|
|
377
|
+
</button>
|
|
378
|
+
</span>
|
|
379
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--removable">
|
|
380
|
+
<span class="ivds-tag__text">Node.js</span>
|
|
381
|
+
<button class="ivds-tag__remove" aria-label="Remove Node.js tag">
|
|
382
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
383
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
384
|
+
</svg>
|
|
385
|
+
</button>
|
|
386
|
+
</span>
|
|
387
|
+
<span class="ivds-tag ivds-tag--info ivds-tag--removable">
|
|
388
|
+
<span class="ivds-tag__text">TypeScript</span>
|
|
389
|
+
<button class="ivds-tag__remove" aria-label="Remove TypeScript tag">
|
|
390
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
391
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
392
|
+
</svg>
|
|
393
|
+
</button>
|
|
394
|
+
</span>
|
|
395
|
+
<span class="ivds-tag ivds-tag--warning">
|
|
396
|
+
<span class="ivds-tag__text">Learning</span>
|
|
397
|
+
</span>
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
|
|
401
|
+
<div>
|
|
402
|
+
<h4 style="margin-bottom: 0.5rem;">Project Status</h4>
|
|
403
|
+
<div class="ivds-tag-group">
|
|
404
|
+
<span class="ivds-tag ivds-tag--success ivds-tag--new">
|
|
405
|
+
<span class="ivds-tag__icon">
|
|
406
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
407
|
+
<path d="M9 12L11 14L15 10M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
408
|
+
</svg>
|
|
409
|
+
</span>
|
|
410
|
+
<span class="ivds-tag__text">Completed</span>
|
|
411
|
+
</span>
|
|
412
|
+
<span class="ivds-tag ivds-tag--warning">
|
|
413
|
+
<span class="ivds-tag__icon">
|
|
414
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
415
|
+
<path d="M12 6V12L16 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
416
|
+
</svg>
|
|
417
|
+
</span>
|
|
418
|
+
<span class="ivds-tag__text">In Progress</span>
|
|
419
|
+
</span>
|
|
420
|
+
<span class="ivds-tag ivds-tag--error">
|
|
421
|
+
<span class="ivds-tag__icon">
|
|
422
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
423
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
424
|
+
</svg>
|
|
425
|
+
</span>
|
|
426
|
+
<span class="ivds-tag__text">Blocked</span>
|
|
427
|
+
</span>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
|
|
431
|
+
<div>
|
|
432
|
+
<h4 style="margin-bottom: 0.5rem;">Categories</h4>
|
|
433
|
+
<div class="ivds-tag-group">
|
|
434
|
+
<a href="#" class="ivds-tag ivds-tag--outlined ivds-tag--link">
|
|
435
|
+
<span class="ivds-tag__text">Frontend</span>
|
|
436
|
+
</a>
|
|
437
|
+
<a href="#" class="ivds-tag ivds-tag--outlined ivds-tag--link">
|
|
438
|
+
<span class="ivds-tag__text">Backend</span>
|
|
439
|
+
</a>
|
|
440
|
+
<a href="#" class="ivds-tag ivds-tag--outlined ivds-tag--link">
|
|
441
|
+
<span class="ivds-tag__text">DevOps</span>
|
|
442
|
+
</a>
|
|
443
|
+
<a href="#" class="ivds-tag ivds-tag--outlined ivds-tag--link">
|
|
444
|
+
<span class="ivds-tag__text">Design</span>
|
|
445
|
+
</a>
|
|
446
|
+
</div>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
`;
|
|
450
|
+
|
|
451
|
+
// Accessibility example
|
|
452
|
+
export const AccessibilityFeatures = () => `
|
|
453
|
+
<div style="display: flex; flex-direction: column; gap: 1rem; max-width: 500px;">
|
|
454
|
+
<div class="ivds-tag-group">
|
|
455
|
+
<span class="ivds-tag ivds-tag--primary ivds-tag--removable" role="listitem">
|
|
456
|
+
<span class="ivds-tag__text">Accessible Tag</span>
|
|
457
|
+
<button class="ivds-tag__remove" aria-label="Remove Accessible Tag from list">
|
|
458
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
459
|
+
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
460
|
+
</svg>
|
|
461
|
+
</button>
|
|
462
|
+
</span>
|
|
463
|
+
|
|
464
|
+
<a href="#" class="ivds-tag ivds-tag--success ivds-tag--link" aria-describedby="tag-help">
|
|
465
|
+
<span class="ivds-tag__text">Clickable Tag</span>
|
|
466
|
+
</a>
|
|
467
|
+
|
|
468
|
+
<span class="ivds-tag ivds-tag--info" title="This tag provides additional context">
|
|
469
|
+
<span class="ivds-tag__icon" aria-hidden="true">
|
|
470
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
471
|
+
<path d="M13 16H12V12H11M12 8H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
472
|
+
</svg>
|
|
473
|
+
</span>
|
|
474
|
+
<span class="ivds-tag__text">With Tooltip</span>
|
|
475
|
+
</span>
|
|
476
|
+
</div>
|
|
477
|
+
|
|
478
|
+
<p id="tag-help" style="font-size: 0.875rem; color: #6b7280;">
|
|
479
|
+
Tags can be interactive elements with proper ARIA labels and keyboard navigation support.
|
|
480
|
+
</p>
|
|
481
|
+
</div>
|
|
482
|
+
`;
|
|
@@ -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
|
+
}
|