@vifui/styles 0.4.0-alpha.6
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/README.md +224 -0
- package/base/base.css +154 -0
- package/components/accordion.css +240 -0
- package/components/alert.css +213 -0
- package/components/avatar.css +140 -0
- package/components/badge.css +297 -0
- package/components/breadcrumb.css +250 -0
- package/components/button.css +564 -0
- package/components/card.css +393 -0
- package/components/checkbox.css +293 -0
- package/components/divider.css +282 -0
- package/components/index.css +10 -0
- package/components/spinner.css +594 -0
- package/index.css +24 -0
- package/package.json +99 -0
- package/themes/default.css +335 -0
- package/utilities/index.css +488 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert Component
|
|
3
|
+
*
|
|
4
|
+
* Built with modern Tailwind CSS and CSS variables
|
|
5
|
+
* Follows VifUI design system
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ============================================ */
|
|
9
|
+
/* Root */
|
|
10
|
+
/* ============================================ */
|
|
11
|
+
.vif-alert {
|
|
12
|
+
@apply relative w-full flex rounded-lg overflow-hidden gap-2.5 p-4;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* ============================================ */
|
|
16
|
+
/* Close */
|
|
17
|
+
/* ============================================ */
|
|
18
|
+
.vif-alert__close {
|
|
19
|
+
@apply absolute right-4 top-4 hover:bg-none! p-0 h-min;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* ============================================ */
|
|
23
|
+
/* Icon */
|
|
24
|
+
/* ============================================ */
|
|
25
|
+
.vif-alert__icon {
|
|
26
|
+
@apply shrink-0 w-4 h-lh text-inherit;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ============================================ */
|
|
30
|
+
/* Content */
|
|
31
|
+
/* ============================================ */
|
|
32
|
+
.vif-alert__content {
|
|
33
|
+
@apply flex-1 min-w-0 flex-col gap-2 flex;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.vif-alert__content-collapsible {
|
|
37
|
+
@apply cursor-(--cursor-interactive) hover:opacity-90;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ============================================ */
|
|
41
|
+
/* Content Header */
|
|
42
|
+
/* ============================================ */
|
|
43
|
+
.vif-alert__header {
|
|
44
|
+
@apply flex flex-col min-w-0 min-h-4 items-start;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ============================================ */
|
|
48
|
+
/* Content Header Title */
|
|
49
|
+
/* ============================================ */
|
|
50
|
+
.vif-alert__title {
|
|
51
|
+
@apply text-base font-medium;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ============================================ */
|
|
55
|
+
/* Content Header Description */
|
|
56
|
+
/* ============================================ */
|
|
57
|
+
.vif-alert__description {
|
|
58
|
+
@apply text-sm text-start opacity-90;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* ============================================ */
|
|
62
|
+
/* Content Body */
|
|
63
|
+
/* ============================================ */
|
|
64
|
+
.vif-alert__body {
|
|
65
|
+
@apply text-sm;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* ============================================ */
|
|
69
|
+
/* Content Footer */
|
|
70
|
+
/* ============================================ */
|
|
71
|
+
.vif-alert__footer {
|
|
72
|
+
@apply flex items-center justify-end gap-4;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ============================================ */
|
|
76
|
+
/* Variants(Color + Variant) */
|
|
77
|
+
/* ============================================ */
|
|
78
|
+
|
|
79
|
+
/* Brand */
|
|
80
|
+
.vif-alert-brand-primary {
|
|
81
|
+
@apply bg-primary text-primary-foreground;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.vif-alert-brand-outline {
|
|
85
|
+
@apply text-primary ring ring-inset ring-primary/25;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.vif-alert-brand-soft {
|
|
89
|
+
@apply bg-primary/10 text-primary;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.vif-alert-brand-secondary {
|
|
93
|
+
@apply bg-primary/10 text-primary ring ring-inset ring-primary/25;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Success */
|
|
97
|
+
.vif-alert-success-primary {
|
|
98
|
+
@apply bg-success text-success-foreground;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.vif-alert-success-outline {
|
|
102
|
+
@apply text-success ring ring-inset ring-success/25;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.vif-alert-success-soft {
|
|
106
|
+
@apply bg-success/10 text-success;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.vif-alert-success-secondary {
|
|
110
|
+
@apply bg-success/10 text-success ring ring-inset ring-success/25;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Warning */
|
|
114
|
+
.vif-alert-warning-primary {
|
|
115
|
+
@apply bg-warning text-warning-foreground;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.vif-alert-warning-outline {
|
|
119
|
+
@apply text-warning ring ring-inset ring-warning/25;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.vif-alert-warning-soft {
|
|
123
|
+
@apply bg-warning/10 text-warning;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.vif-alert-warning-secondary {
|
|
127
|
+
@apply bg-warning/10 text-warning ring ring-inset ring-warning/25;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Danger */
|
|
131
|
+
.vif-alert-danger-primary {
|
|
132
|
+
@apply bg-danger text-danger-foreground;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.vif-alert-danger-outline {
|
|
136
|
+
@apply text-danger ring ring-inset ring-danger/25;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.vif-alert-danger-soft {
|
|
140
|
+
@apply bg-danger/10 text-danger;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.vif-alert-danger-secondary {
|
|
144
|
+
@apply bg-danger/10 text-danger ring ring-inset ring-danger/25;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Neutral */
|
|
148
|
+
.vif-alert-neutral-primary {
|
|
149
|
+
background: var(--foreground);
|
|
150
|
+
color: var(--background);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.vif-alert-neutral-outline {
|
|
154
|
+
@apply ring ring-inset;
|
|
155
|
+
color: var(--foreground);
|
|
156
|
+
--tw-ring-color: var(--border);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.vif-alert-neutral-soft {
|
|
160
|
+
@apply bg-default text-default-foreground;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.vif-alert-neutral-secondary {
|
|
164
|
+
@apply bg-default ring ring-inset;
|
|
165
|
+
color: var(--foreground);
|
|
166
|
+
--tw-ring-color: var(--border);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* ============================================ */
|
|
170
|
+
/* Animations */
|
|
171
|
+
/* ============================================ */
|
|
172
|
+
|
|
173
|
+
/* Smooth collapse for body & footer */
|
|
174
|
+
.vif-collapse-enter-active,
|
|
175
|
+
.vif-collapse-leave-active {
|
|
176
|
+
transition: all 300ms var(--ease-smooth);
|
|
177
|
+
overflow: hidden;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.vif-collapse-enter-from,
|
|
181
|
+
.vif-collapse-leave-to {
|
|
182
|
+
max-height: 0;
|
|
183
|
+
opacity: 0;
|
|
184
|
+
margin-top: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.vif-collapse-enter-to,
|
|
188
|
+
.vif-collapse-leave-from {
|
|
189
|
+
max-height: 500px;
|
|
190
|
+
opacity: 1;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Smooth fade in/out for entire alert */
|
|
194
|
+
.vif-alert-fade-enter-active,
|
|
195
|
+
.vif-alert-fade-leave-active {
|
|
196
|
+
transition: all 250ms var(--ease-smooth);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.vif-alert-fade-enter-from {
|
|
200
|
+
opacity: 0;
|
|
201
|
+
transform: translateY(-8px);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.vif-alert-fade-leave-to {
|
|
205
|
+
opacity: 0;
|
|
206
|
+
transform: translateY(-4px);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.vif-alert-fade-enter-to,
|
|
210
|
+
.vif-alert-fade-leave-from {
|
|
211
|
+
opacity: 1;
|
|
212
|
+
transform: translateY(0);
|
|
213
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar and Avatar Group Component
|
|
3
|
+
*
|
|
4
|
+
* Architecture inspired by Vuesax v3 (MIT License)
|
|
5
|
+
* Built with modern Tailwind CSS and CSS variables
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ============================================ */
|
|
9
|
+
/* Root Styles */
|
|
10
|
+
/* ============================================ */
|
|
11
|
+
.vif-avatar {
|
|
12
|
+
@apply relative flex items-center justify-center transition-all overflow-hidden shrink-0 select-none align-middle bg-(--surface-3);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.vif-avatar[aria-disabled="true"] {
|
|
16
|
+
@apply opacity-(--disabled-opacity) cursor-(--cursor-disabled) pointer-events-none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Image */
|
|
20
|
+
.vif-avatar__image {
|
|
21
|
+
@apply h-full w-full rounded-[inherit] object-cover transition-transform;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Fallback */
|
|
25
|
+
.vif-avatar__fallback {
|
|
26
|
+
@apply font-medium leading-none text-(--muted) truncate;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Standalone: Image scale on hover */
|
|
30
|
+
.vif-avatar[data-standalone="true"]:hover .vif-avatar__image {
|
|
31
|
+
@apply scale-105;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Loader container */
|
|
35
|
+
.vif-avatar__loader {
|
|
36
|
+
@apply absolute inset-0 flex items-center justify-center pointer-events-none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* ============================================ */
|
|
40
|
+
/* Variant Variants */
|
|
41
|
+
/* ============================================ */
|
|
42
|
+
.vif-avatar--ringed {
|
|
43
|
+
@apply ring-offset-(--ring-offset-width) ring-2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* ============================================ */
|
|
47
|
+
/* Size Variants */
|
|
48
|
+
/* ============================================ */
|
|
49
|
+
.vif-avatar--xs {
|
|
50
|
+
@apply size-6;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.vif-avatar--xs .vif-avatar__fallback {
|
|
54
|
+
@apply text-xs;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.vif-avatar--sm {
|
|
58
|
+
@apply size-7;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.vif-avatar--sm .vif-avatar__fallback {
|
|
62
|
+
@apply text-sm;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vif-avatar--md {
|
|
66
|
+
@apply size-8;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.vif-avatar--md .vif-avatar__fallback {
|
|
70
|
+
@apply text-base;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.vif-avatar--lg {
|
|
74
|
+
@apply size-9;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.vif-avatar--lg .vif-avatar__fallback {
|
|
78
|
+
@apply text-lg;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.vif-avatar--xl {
|
|
82
|
+
@apply size-10;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.vif-avatar--xl .vif-avatar__fallback {
|
|
86
|
+
@apply text-xl;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* ============================================ */
|
|
90
|
+
/* Ring Color Variants */
|
|
91
|
+
/* ============================================ */
|
|
92
|
+
.vif-avatar--brand {
|
|
93
|
+
@apply ring-(--primary);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.vif-avatar--success {
|
|
97
|
+
@apply ring-(--success);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.vif-avatar--warning {
|
|
101
|
+
@apply ring-(--warning);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.vif-avatar--danger {
|
|
105
|
+
@apply ring-(--danger);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.vif-avatar--neutral {
|
|
109
|
+
@apply ring-(--neutral);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ============================================ */
|
|
113
|
+
/* Shape Variants */
|
|
114
|
+
/* ============================================ */
|
|
115
|
+
.vif-avatar--default {
|
|
116
|
+
@apply rounded-(--radius);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.vif-avatar--circle {
|
|
120
|
+
@apply rounded-(--radius-full);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* ============================================ */
|
|
124
|
+
/* Avatar Group */
|
|
125
|
+
/* ============================================ */
|
|
126
|
+
.vif-avatar-group {
|
|
127
|
+
@apply flex -space-x-2 relative isolate;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.vif-avatar-group > .vif-avatar {
|
|
131
|
+
@apply relative;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.vif-avatar-group > .vif-avatar:first-child:hover {
|
|
135
|
+
@apply -translate-x-1 -z-1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.vif-avatar-group > .vif-avatar:not(:first-child):hover {
|
|
139
|
+
@apply -translate-x-1;
|
|
140
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Badge Component
|
|
3
|
+
*
|
|
4
|
+
* Built with modern Tailwind CSS and CSS variables
|
|
5
|
+
* Follows VifUI design system
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ============================================ */
|
|
9
|
+
/* Base Badge */
|
|
10
|
+
/* ============================================ */
|
|
11
|
+
|
|
12
|
+
.vif-badge {
|
|
13
|
+
/* Layout */
|
|
14
|
+
@apply inline-flex items-center justify-center gap-1;
|
|
15
|
+
@apply whitespace-nowrap select-none;
|
|
16
|
+
|
|
17
|
+
/* Sizing */
|
|
18
|
+
@apply h-5 px-2;
|
|
19
|
+
@apply text-xs font-medium;
|
|
20
|
+
|
|
21
|
+
/* Borders */
|
|
22
|
+
border-radius: var(--radius);
|
|
23
|
+
border: 0;
|
|
24
|
+
|
|
25
|
+
/* Transitions */
|
|
26
|
+
transition:
|
|
27
|
+
background-color 150ms var(--ease-smooth),
|
|
28
|
+
color 150ms var(--ease-smooth),
|
|
29
|
+
border-color 150ms var(--ease-smooth);
|
|
30
|
+
|
|
31
|
+
/* Remove default styles */
|
|
32
|
+
background: transparent;
|
|
33
|
+
|
|
34
|
+
/* Icon styles */
|
|
35
|
+
& svg {
|
|
36
|
+
@apply size-3 shrink-0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ============================================ */
|
|
41
|
+
/* Icon Component Styles */
|
|
42
|
+
/* ============================================ */
|
|
43
|
+
|
|
44
|
+
.vif-badge__icon {
|
|
45
|
+
@apply inline-flex items-center justify-center shrink-0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Hide empty icons completely */
|
|
49
|
+
.vif-badge__icon:empty,
|
|
50
|
+
.vif-badge__icon svg:empty {
|
|
51
|
+
display: none !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ============================================ */
|
|
55
|
+
/* Size Variants */
|
|
56
|
+
/* ============================================ */
|
|
57
|
+
|
|
58
|
+
.vif-badge--xs {
|
|
59
|
+
@apply h-4 px-1.5 text-[10px];
|
|
60
|
+
|
|
61
|
+
& svg {
|
|
62
|
+
@apply size-2.5;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.vif-badge--sm {
|
|
67
|
+
@apply h-5 px-2 text-[0.65rem];
|
|
68
|
+
|
|
69
|
+
& svg {
|
|
70
|
+
@apply size-3;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.vif-badge--md {
|
|
75
|
+
@apply h-6 px-2.5 text-[0.65rem];
|
|
76
|
+
|
|
77
|
+
& svg {
|
|
78
|
+
@apply size-3.5;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.vif-badge--lg {
|
|
83
|
+
@apply h-7 px-3 text-sm;
|
|
84
|
+
|
|
85
|
+
& svg {
|
|
86
|
+
@apply size-4;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ============================================ */
|
|
91
|
+
/* Solid Variant (Default) */
|
|
92
|
+
/* ============================================ */
|
|
93
|
+
|
|
94
|
+
.vif-badge--solid {
|
|
95
|
+
@apply bg-primary text-primary-foreground;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Solid + Neutral */
|
|
99
|
+
.vif-badge--solid.vif-badge--neutral {
|
|
100
|
+
background-color: var(--color-neutral-200);
|
|
101
|
+
color: var(--color-neutral-900);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Solid + Brand */
|
|
105
|
+
.vif-badge--solid.vif-badge--brand {
|
|
106
|
+
@apply bg-primary text-primary-foreground;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Solid + Success */
|
|
110
|
+
.vif-badge--solid.vif-badge--success {
|
|
111
|
+
@apply bg-success text-success-foreground;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Solid + Warning */
|
|
115
|
+
.vif-badge--solid.vif-badge--warning {
|
|
116
|
+
@apply bg-warning text-warning-foreground;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Solid + Danger */
|
|
120
|
+
.vif-badge--solid.vif-badge--danger {
|
|
121
|
+
@apply bg-danger text-danger-foreground;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* ============================================ */
|
|
125
|
+
/* Soft Variant */
|
|
126
|
+
/* ============================================ */
|
|
127
|
+
|
|
128
|
+
.vif-badge--soft {
|
|
129
|
+
@apply bg-default text-foreground;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Soft + Neutral */
|
|
133
|
+
.vif-badge--soft.vif-badge--neutral {
|
|
134
|
+
background-color: var(--color-neutral-100);
|
|
135
|
+
color: var(--color-neutral-700);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Soft + Brand */
|
|
139
|
+
.vif-badge--soft.vif-badge--brand {
|
|
140
|
+
@apply bg-primary/10 text-primary;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Soft + Success */
|
|
144
|
+
.vif-badge--soft.vif-badge--success {
|
|
145
|
+
@apply bg-success/10 text-success;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Soft + Warning */
|
|
149
|
+
.vif-badge--soft.vif-badge--warning {
|
|
150
|
+
@apply bg-warning/10 text-warning;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Soft + Danger */
|
|
154
|
+
.vif-badge--soft.vif-badge--danger {
|
|
155
|
+
@apply bg-danger/10 text-danger;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* ============================================ */
|
|
159
|
+
/* Outline Variant */
|
|
160
|
+
/* ============================================ */
|
|
161
|
+
|
|
162
|
+
.vif-badge--outline {
|
|
163
|
+
@apply bg-transparent border border-primary text-primary;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Outline + Neutral */
|
|
167
|
+
.vif-badge--outline.vif-badge--neutral {
|
|
168
|
+
border-color: var(--color-neutral-400);
|
|
169
|
+
color: var(--color-neutral-700);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Outline + Brand */
|
|
173
|
+
.vif-badge--outline.vif-badge--brand {
|
|
174
|
+
@apply border-primary text-primary;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* Outline + Success */
|
|
178
|
+
.vif-badge--outline.vif-badge--success {
|
|
179
|
+
@apply border-success text-success;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Outline + Warning */
|
|
183
|
+
.vif-badge--outline.vif-badge--warning {
|
|
184
|
+
@apply border-warning text-warning;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Outline + Danger */
|
|
188
|
+
.vif-badge--outline.vif-badge--danger {
|
|
189
|
+
@apply border-danger text-danger;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* ============================================ */
|
|
193
|
+
/* Flat Variant */
|
|
194
|
+
/* ============================================ */
|
|
195
|
+
|
|
196
|
+
.vif-badge--flat {
|
|
197
|
+
@apply bg-default text-foreground;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Flat + Neutral */
|
|
201
|
+
.vif-badge--flat.vif-badge--neutral {
|
|
202
|
+
background-color: var(--color-neutral-100);
|
|
203
|
+
color: var(--color-neutral-600);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Flat + Brand */
|
|
207
|
+
.vif-badge--flat.vif-badge--brand {
|
|
208
|
+
@apply bg-primary/5 text-primary;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Flat + Success */
|
|
212
|
+
.vif-badge--flat.vif-badge--success {
|
|
213
|
+
@apply bg-success/5 text-success;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Flat + Warning */
|
|
217
|
+
.vif-badge--flat.vif-badge--warning {
|
|
218
|
+
@apply bg-warning/5 text-warning;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Flat + Danger */
|
|
222
|
+
.vif-badge--flat.vif-badge--danger {
|
|
223
|
+
@apply bg-danger/5 text-danger;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* ============================================ */
|
|
227
|
+
/* Modifiers */
|
|
228
|
+
/* ============================================ */
|
|
229
|
+
|
|
230
|
+
/* Rounded (fully circular) */
|
|
231
|
+
.vif-badge--rounded {
|
|
232
|
+
border-radius: var(--radius-full);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* With dot indicator */
|
|
236
|
+
.vif-badge--dot {
|
|
237
|
+
@apply gap-1.5;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.vif-badge__dot {
|
|
241
|
+
@apply size-1.5 rounded-full;
|
|
242
|
+
background-color: currentColor;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* Removable badge close button */
|
|
246
|
+
.vif-badge__close {
|
|
247
|
+
@apply -mr-0.5 ml-0.5;
|
|
248
|
+
@apply inline-flex items-center justify-center;
|
|
249
|
+
@apply size-3.5 rounded-sm;
|
|
250
|
+
@apply transition-colors;
|
|
251
|
+
cursor: var(--cursor-interactive);
|
|
252
|
+
|
|
253
|
+
&:hover {
|
|
254
|
+
background-color: color-mix(in srgb, currentColor 15%, transparent);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:active {
|
|
258
|
+
background-color: color-mix(in srgb, currentColor 25%, transparent);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
& svg {
|
|
262
|
+
@apply size-3;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* Adjust close button size per badge size */
|
|
267
|
+
.vif-badge--xs .vif-badge__close {
|
|
268
|
+
@apply size-3;
|
|
269
|
+
|
|
270
|
+
& svg {
|
|
271
|
+
@apply size-2.5;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.vif-badge--sm .vif-badge__close {
|
|
276
|
+
@apply size-3.5;
|
|
277
|
+
|
|
278
|
+
& svg {
|
|
279
|
+
@apply size-3;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.vif-badge--md .vif-badge__close {
|
|
284
|
+
@apply size-4;
|
|
285
|
+
|
|
286
|
+
& svg {
|
|
287
|
+
@apply size-3.5;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.vif-badge--lg .vif-badge__close {
|
|
292
|
+
@apply size-4;
|
|
293
|
+
|
|
294
|
+
& svg {
|
|
295
|
+
@apply size-3.5;
|
|
296
|
+
}
|
|
297
|
+
}
|