loseta 0.16.0 → 0.17.0
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/package.json +1 -1
- package/registry/components/badge.css +4 -7
- package/registry/components/breadcrumb.css +9 -1
- package/registry/components/calendar.css +39 -0
- package/registry/components/card.css +5 -0
- package/registry/components/input-otp.css +103 -10
- package/registry/components/kbd.css +8 -0
- package/registry/components/native-select.css +6 -0
- package/registry/components/select.css +3 -0
- package/registry/components/tooltip.css +295 -144
- package/registry/examples/badge.html +37 -0
- package/registry/examples/breadcrumb.html +86 -6
- package/registry/examples/calendar.html +687 -51
- package/registry/examples/card.html +190 -4
- package/registry/examples/input-otp.html +116 -11
- package/registry/examples/kbd.html +90 -2
- package/registry/examples/native-select.html +83 -2
- package/registry/examples/select.html +199 -6
- package/registry/examples/sidebar.html +10 -10
- package/registry/examples/tooltip.html +75 -70
- package/registry/primitives/menu.css +15 -3
- package/registry/registry.json +36 -9
- package/registry/styles/luma/badge.css +28 -0
- package/registry/styles/luma/breadcrumb.css +2 -1
- package/registry/styles/luma/calendar.css +62 -0
- package/registry/styles/luma/card.css +9 -27
- package/registry/styles/luma/input-otp.css +79 -36
- package/registry/styles/luma/native-select.css +9 -2
- package/registry/styles/luma/primitives/listbox.css +8 -0
- package/registry/styles/luma/select.css +7 -2
- package/registry/styles/luma/tooltip.css +29 -16
- package/registry/styles/lyra/badge.css +28 -0
- package/registry/styles/lyra/breadcrumb.css +2 -1
- package/registry/styles/lyra/calendar.css +62 -0
- package/registry/styles/lyra/card.css +9 -27
- package/registry/styles/lyra/input-otp.css +79 -36
- package/registry/styles/lyra/native-select.css +6 -1
- package/registry/styles/lyra/primitives/listbox.css +8 -0
- package/registry/styles/lyra/select.css +6 -1
- package/registry/styles/lyra/tooltip.css +29 -16
- package/registry/styles/maia/badge.css +29 -0
- package/registry/styles/maia/breadcrumb.css +2 -1
- package/registry/styles/maia/calendar.css +62 -0
- package/registry/styles/maia/card.css +9 -27
- package/registry/styles/maia/input-otp.css +79 -36
- package/registry/styles/maia/native-select.css +9 -2
- package/registry/styles/maia/primitives/listbox.css +8 -0
- package/registry/styles/maia/select.css +7 -2
- package/registry/styles/maia/tooltip.css +29 -16
- package/registry/styles/mira/badge.css +32 -0
- package/registry/styles/mira/breadcrumb.css +2 -1
- package/registry/styles/mira/calendar.css +62 -0
- package/registry/styles/mira/card.css +9 -27
- package/registry/styles/mira/input-otp.css +79 -36
- package/registry/styles/mira/native-select.css +7 -2
- package/registry/styles/mira/primitives/listbox.css +8 -0
- package/registry/styles/mira/select.css +7 -2
- package/registry/styles/mira/tooltip.css +29 -16
- package/registry/styles/nova/badge.css +28 -0
- package/registry/styles/nova/breadcrumb.css +2 -1
- package/registry/styles/nova/calendar.css +62 -0
- package/registry/styles/nova/card.css +9 -27
- package/registry/styles/nova/input-otp.css +79 -36
- package/registry/styles/nova/native-select.css +9 -2
- package/registry/styles/nova/primitives/listbox.css +8 -0
- package/registry/styles/nova/select.css +7 -2
- package/registry/styles/nova/tooltip.css +29 -16
- package/registry/styles/rhea/badge.css +28 -0
- package/registry/styles/rhea/breadcrumb.css +2 -1
- package/registry/styles/rhea/calendar.css +62 -0
- package/registry/styles/rhea/card.css +9 -27
- package/registry/styles/rhea/input-otp.css +79 -36
- package/registry/styles/rhea/native-select.css +9 -2
- package/registry/styles/rhea/primitives/listbox.css +8 -0
- package/registry/styles/rhea/select.css +7 -2
- package/registry/styles/rhea/tooltip.css +29 -16
- package/registry/styles/sera/badge.css +29 -1
- package/registry/styles/sera/breadcrumb.css +2 -1
- package/registry/styles/sera/calendar.css +66 -0
- package/registry/styles/sera/card.css +9 -27
- package/registry/styles/sera/input-otp.css +80 -37
- package/registry/styles/sera/native-select.css +9 -2
- package/registry/styles/sera/primitives/listbox.css +8 -0
- package/registry/styles/sera/select.css +7 -2
- package/registry/styles/sera/tooltip.css +29 -16
- package/registry/styles/vega/badge.css +28 -0
- package/registry/styles/vega/breadcrumb.css +2 -1
- package/registry/styles/vega/calendar.css +62 -0
- package/registry/styles/vega/card.css +9 -27
- package/registry/styles/vega/input-otp.css +79 -36
- package/registry/styles/vega/native-select.css +9 -2
- package/registry/styles/vega/primitives/listbox.css +8 -0
- package/registry/styles/vega/select.css +7 -2
- package/registry/styles/vega/tooltip.css +29 -16
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/* Tooltip */
|
|
2
2
|
@layer loseta.components {
|
|
3
|
-
.tooltip
|
|
3
|
+
.tooltip {
|
|
4
4
|
position: relative;
|
|
5
|
+
display: inline-block;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
&[data-tooltip]::before,
|
|
8
|
+
& > [data-slot='content'] {
|
|
7
9
|
pointer-events: none;
|
|
8
10
|
visibility: hidden;
|
|
9
11
|
position: absolute;
|
|
@@ -16,267 +18,416 @@
|
|
|
16
18
|
transition-property: opacity, scale, visibility;
|
|
17
19
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
18
20
|
transition-duration: 150ms;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&[data-tooltip]::before {
|
|
19
24
|
content: attr(data-tooltip);
|
|
20
25
|
}
|
|
21
26
|
|
|
22
|
-
&:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
&:has(> [data-slot='content'])[data-tooltip]::before {
|
|
28
|
+
content: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&::after {
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
visibility: hidden;
|
|
34
|
+
position: absolute;
|
|
35
|
+
z-index: 60;
|
|
36
|
+
width: 0.625rem;
|
|
37
|
+
height: 0.25rem;
|
|
38
|
+
opacity: 0%;
|
|
39
|
+
scale: 95% 95%;
|
|
40
|
+
transition-property: opacity, scale, visibility;
|
|
41
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
42
|
+
transition-duration: 150ms;
|
|
43
|
+
-webkit-mask-image: var(--tooltip-tail);
|
|
44
|
+
mask-image: var(--tooltip-tail);
|
|
45
|
+
-webkit-mask-repeat: no-repeat;
|
|
46
|
+
mask-repeat: no-repeat;
|
|
47
|
+
-webkit-mask-position: -1px 0;
|
|
48
|
+
mask-position: -1px 0;
|
|
49
|
+
--tooltip-tail: url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");
|
|
50
|
+
content: '';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:is(
|
|
54
|
+
:has(> [data-slot='content']:not(:empty)),
|
|
55
|
+
:not(:has(> [data-slot='content']))[data-tooltip]:not([data-tooltip=''])
|
|
56
|
+
):is(:hover, :has(:focus-visible)) {
|
|
57
|
+
&::before,
|
|
58
|
+
& > [data-slot='content'] {
|
|
59
|
+
visibility: visible;
|
|
60
|
+
opacity: 100%;
|
|
61
|
+
scale: 100% 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&::after {
|
|
65
|
+
visibility: visible;
|
|
66
|
+
opacity: 100%;
|
|
67
|
+
scale: 100% 100%;
|
|
68
|
+
}
|
|
26
69
|
}
|
|
27
70
|
|
|
28
71
|
&:not([data-side]),
|
|
29
72
|
&[data-side='top'] {
|
|
30
|
-
&::before
|
|
73
|
+
&::before,
|
|
74
|
+
& > [data-slot='content'] {
|
|
31
75
|
bottom: 100%;
|
|
32
76
|
margin-bottom: 0.375rem;
|
|
77
|
+
transform-origin: bottom;
|
|
33
78
|
}
|
|
34
79
|
|
|
35
80
|
&:not([data-align]),
|
|
36
81
|
&[data-align='center'] {
|
|
37
|
-
&::before
|
|
38
|
-
|
|
82
|
+
&::before,
|
|
83
|
+
& > [data-slot='content'] {
|
|
84
|
+
inset-inline-start: 50%;
|
|
39
85
|
translate: -50%;
|
|
40
86
|
}
|
|
41
87
|
}
|
|
42
88
|
|
|
43
|
-
&[data-align='start']
|
|
44
|
-
|
|
89
|
+
&[data-align='start'] {
|
|
90
|
+
&::before,
|
|
91
|
+
& > [data-slot='content'] {
|
|
92
|
+
inset-inline-start: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&[data-align='end'] {
|
|
97
|
+
&::before,
|
|
98
|
+
& > [data-slot='content'] {
|
|
99
|
+
inset-inline-end: 0;
|
|
100
|
+
}
|
|
45
101
|
}
|
|
46
102
|
|
|
47
|
-
|
|
48
|
-
|
|
103
|
+
&::after {
|
|
104
|
+
bottom: calc(100% + 0.25rem);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:not([data-align]),
|
|
108
|
+
&[data-align='center'] {
|
|
109
|
+
&::after {
|
|
110
|
+
inset-inline-start: 50%;
|
|
111
|
+
translate: -50%;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&[data-align='start']::after {
|
|
116
|
+
inset-inline-start: max(0.75rem, var(--tooltip-radius, 0px));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&[data-align='end']::after {
|
|
120
|
+
inset-inline-end: max(0.75rem, var(--tooltip-radius, 0px));
|
|
49
121
|
}
|
|
50
122
|
}
|
|
51
123
|
|
|
52
124
|
&[data-side='bottom'] {
|
|
53
|
-
&::before
|
|
125
|
+
&::before,
|
|
126
|
+
& > [data-slot='content'] {
|
|
54
127
|
top: 100%;
|
|
55
128
|
margin-top: 0.375rem;
|
|
129
|
+
transform-origin: top;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:not([data-align]),
|
|
133
|
+
&[data-align='center'] {
|
|
134
|
+
&::before,
|
|
135
|
+
& > [data-slot='content'] {
|
|
136
|
+
inset-inline-start: 50%;
|
|
137
|
+
translate: -50%;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&[data-align='start'] {
|
|
142
|
+
&::before,
|
|
143
|
+
& > [data-slot='content'] {
|
|
144
|
+
inset-inline-start: 0;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&[data-align='end'] {
|
|
149
|
+
&::before,
|
|
150
|
+
& > [data-slot='content'] {
|
|
151
|
+
inset-inline-end: 0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&::after {
|
|
156
|
+
top: calc(100% + 0.25rem);
|
|
157
|
+
rotate: 180deg;
|
|
56
158
|
}
|
|
57
159
|
|
|
58
160
|
&:not([data-align]),
|
|
59
161
|
&[data-align='center'] {
|
|
60
|
-
&::
|
|
61
|
-
|
|
162
|
+
&::after {
|
|
163
|
+
inset-inline-start: 50%;
|
|
62
164
|
translate: -50%;
|
|
63
165
|
}
|
|
64
166
|
}
|
|
65
167
|
|
|
66
|
-
&[data-align='start']::
|
|
67
|
-
|
|
168
|
+
&[data-align='start']::after {
|
|
169
|
+
inset-inline-start: max(0.75rem, var(--tooltip-radius, 0px));
|
|
68
170
|
}
|
|
69
171
|
|
|
70
|
-
&[data-align='end']::
|
|
71
|
-
|
|
172
|
+
&[data-align='end']::after {
|
|
173
|
+
inset-inline-end: max(0.75rem, var(--tooltip-radius, 0px));
|
|
72
174
|
}
|
|
73
175
|
}
|
|
74
176
|
|
|
75
|
-
&[data-side='left']
|
|
76
|
-
|
|
77
|
-
|
|
177
|
+
&[data-side='left'] {
|
|
178
|
+
&::before,
|
|
179
|
+
& > [data-slot='content'] {
|
|
78
180
|
right: 100%;
|
|
79
181
|
margin-right: 0.375rem;
|
|
182
|
+
transform-origin: right;
|
|
80
183
|
}
|
|
81
184
|
|
|
82
185
|
&:not([data-align]),
|
|
83
186
|
&[data-align='center'] {
|
|
84
|
-
&::before
|
|
85
|
-
|
|
187
|
+
&::before,
|
|
188
|
+
& > [data-slot='content'] {
|
|
189
|
+
inset-block-start: 50%;
|
|
86
190
|
translate: 0 -50%;
|
|
87
191
|
}
|
|
88
192
|
}
|
|
89
193
|
|
|
90
|
-
&[data-align='start']
|
|
91
|
-
|
|
194
|
+
&[data-align='start'] {
|
|
195
|
+
&::before,
|
|
196
|
+
& > [data-slot='content'] {
|
|
197
|
+
inset-block-start: 0;
|
|
198
|
+
}
|
|
92
199
|
}
|
|
93
200
|
|
|
94
|
-
&[data-align='end']
|
|
95
|
-
|
|
201
|
+
&[data-align='end'] {
|
|
202
|
+
&::before,
|
|
203
|
+
& > [data-slot='content'] {
|
|
204
|
+
inset-block-end: 0;
|
|
205
|
+
}
|
|
96
206
|
}
|
|
97
|
-
}
|
|
98
207
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
208
|
+
&::after {
|
|
209
|
+
right: calc(100% + 1px);
|
|
210
|
+
inset-block-start: 50%;
|
|
211
|
+
translate: 0 -50%;
|
|
212
|
+
rotate: -90deg;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&[data-align='start']::after {
|
|
216
|
+
inset-block-start: calc(
|
|
217
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
218
|
+
);
|
|
219
|
+
inset-block-end: auto;
|
|
220
|
+
translate: 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&[data-align='end']::after {
|
|
224
|
+
inset-block-start: auto;
|
|
225
|
+
inset-block-end: calc(
|
|
226
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
227
|
+
);
|
|
228
|
+
translate: 0;
|
|
105
229
|
}
|
|
106
230
|
}
|
|
107
231
|
|
|
108
|
-
&[data-side='right']
|
|
109
|
-
|
|
110
|
-
|
|
232
|
+
&[data-side='right'] {
|
|
233
|
+
&::before,
|
|
234
|
+
& > [data-slot='content'] {
|
|
111
235
|
left: 100%;
|
|
112
236
|
margin-left: 0.375rem;
|
|
237
|
+
transform-origin: left;
|
|
113
238
|
}
|
|
114
239
|
|
|
115
240
|
&:not([data-align]),
|
|
116
241
|
&[data-align='center'] {
|
|
117
|
-
&::before
|
|
118
|
-
|
|
242
|
+
&::before,
|
|
243
|
+
& > [data-slot='content'] {
|
|
244
|
+
inset-block-start: 50%;
|
|
119
245
|
translate: 0 -50%;
|
|
120
246
|
}
|
|
121
247
|
}
|
|
122
248
|
|
|
123
|
-
&[data-align='start']
|
|
124
|
-
|
|
249
|
+
&[data-align='start'] {
|
|
250
|
+
&::before,
|
|
251
|
+
& > [data-slot='content'] {
|
|
252
|
+
inset-block-start: 0;
|
|
253
|
+
}
|
|
125
254
|
}
|
|
126
255
|
|
|
127
|
-
&[data-align='end']
|
|
128
|
-
|
|
256
|
+
&[data-align='end'] {
|
|
257
|
+
&::before,
|
|
258
|
+
& > [data-slot='content'] {
|
|
259
|
+
inset-block-end: 0;
|
|
260
|
+
}
|
|
129
261
|
}
|
|
130
|
-
}
|
|
131
262
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
margin-left: 0;
|
|
263
|
+
&::after {
|
|
264
|
+
left: calc(100% + 1px);
|
|
265
|
+
inset-block-start: 50%;
|
|
266
|
+
translate: 0 -50%;
|
|
267
|
+
rotate: 90deg;
|
|
138
268
|
}
|
|
139
|
-
}
|
|
140
269
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
rotate: 45deg;
|
|
149
|
-
opacity: 0%;
|
|
150
|
-
transition-property: opacity, visibility;
|
|
151
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
152
|
-
transition-duration: 150ms;
|
|
153
|
-
content: '';
|
|
154
|
-
}
|
|
270
|
+
&[data-align='start']::after {
|
|
271
|
+
inset-block-start: calc(
|
|
272
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
273
|
+
);
|
|
274
|
+
inset-block-end: auto;
|
|
275
|
+
translate: 0;
|
|
276
|
+
}
|
|
155
277
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
278
|
+
&[data-align='end']::after {
|
|
279
|
+
inset-block-start: auto;
|
|
280
|
+
inset-block-end: calc(
|
|
281
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
282
|
+
);
|
|
283
|
+
translate: 0;
|
|
284
|
+
}
|
|
159
285
|
}
|
|
160
286
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
&[data-
|
|
164
|
-
|
|
165
|
-
|
|
287
|
+
&[data-side='inline-start'] {
|
|
288
|
+
&::before,
|
|
289
|
+
& > [data-slot='content'] {
|
|
290
|
+
inset-inline-end: 100%;
|
|
291
|
+
margin-inline-end: 0.375rem;
|
|
292
|
+
transform-origin: right;
|
|
166
293
|
}
|
|
167
294
|
|
|
168
|
-
|
|
169
|
-
&[data-
|
|
170
|
-
|
|
171
|
-
|
|
295
|
+
&:not([data-align]),
|
|
296
|
+
&[data-align='center'] {
|
|
297
|
+
&::before,
|
|
298
|
+
& > [data-slot='content'] {
|
|
299
|
+
inset-block-start: 50%;
|
|
300
|
+
translate: 0 -50%;
|
|
301
|
+
}
|
|
172
302
|
}
|
|
173
303
|
|
|
174
|
-
&[data-
|
|
175
|
-
|
|
304
|
+
&[data-align='start'] {
|
|
305
|
+
&::before,
|
|
306
|
+
& > [data-slot='content'] {
|
|
307
|
+
inset-block-start: 0;
|
|
308
|
+
}
|
|
176
309
|
}
|
|
177
310
|
|
|
178
|
-
&[data-
|
|
179
|
-
|
|
311
|
+
&[data-align='end'] {
|
|
312
|
+
&::before,
|
|
313
|
+
& > [data-slot='content'] {
|
|
314
|
+
inset-block-end: 0;
|
|
315
|
+
}
|
|
180
316
|
}
|
|
181
|
-
}
|
|
182
317
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
318
|
+
&::after {
|
|
319
|
+
inset-inline-end: calc(100% + 1px);
|
|
320
|
+
inset-block-start: 50%;
|
|
186
321
|
translate: 0 -50%;
|
|
322
|
+
rotate: -90deg;
|
|
187
323
|
}
|
|
188
324
|
|
|
189
|
-
&[data-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
325
|
+
&[data-align='start']::after {
|
|
326
|
+
inset-block-start: calc(
|
|
327
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
328
|
+
);
|
|
329
|
+
inset-block-end: auto;
|
|
330
|
+
translate: 0;
|
|
193
331
|
}
|
|
194
332
|
|
|
195
|
-
&[data-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
333
|
+
&[data-align='end']::after {
|
|
334
|
+
inset-block-start: auto;
|
|
335
|
+
inset-block-end: calc(
|
|
336
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
337
|
+
);
|
|
338
|
+
translate: 0;
|
|
201
339
|
}
|
|
202
340
|
}
|
|
203
341
|
|
|
204
|
-
&[data-side='
|
|
205
|
-
|
|
206
|
-
&[data-
|
|
207
|
-
|
|
208
|
-
top: 50%;
|
|
209
|
-
translate: 50% -50%;
|
|
342
|
+
&[data-side='inline-start']:dir(rtl) {
|
|
343
|
+
&::before,
|
|
344
|
+
& > [data-slot='content'] {
|
|
345
|
+
transform-origin: left;
|
|
210
346
|
}
|
|
211
347
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
translate: 50% 0;
|
|
348
|
+
&::after {
|
|
349
|
+
rotate: 90deg;
|
|
215
350
|
}
|
|
351
|
+
}
|
|
216
352
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
353
|
+
&[data-side='inline-end'] {
|
|
354
|
+
&::before,
|
|
355
|
+
& > [data-slot='content'] {
|
|
356
|
+
inset-inline-start: 100%;
|
|
357
|
+
margin-inline-start: 0.375rem;
|
|
358
|
+
transform-origin: left;
|
|
221
359
|
}
|
|
222
|
-
}
|
|
223
360
|
|
|
224
|
-
|
|
225
|
-
&[data-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
361
|
+
&:not([data-align]),
|
|
362
|
+
&[data-align='center'] {
|
|
363
|
+
&::before,
|
|
364
|
+
& > [data-slot='content'] {
|
|
365
|
+
inset-block-start: 50%;
|
|
366
|
+
translate: 0 -50%;
|
|
367
|
+
}
|
|
229
368
|
}
|
|
230
369
|
|
|
231
|
-
&[data-
|
|
232
|
-
|
|
370
|
+
&[data-align='start'] {
|
|
371
|
+
&::before,
|
|
372
|
+
& > [data-slot='content'] {
|
|
373
|
+
inset-block-start: 0;
|
|
374
|
+
}
|
|
233
375
|
}
|
|
234
376
|
|
|
235
|
-
&[data-
|
|
236
|
-
|
|
377
|
+
&[data-align='end'] {
|
|
378
|
+
&::before,
|
|
379
|
+
& > [data-slot='content'] {
|
|
380
|
+
inset-block-end: 0;
|
|
381
|
+
}
|
|
237
382
|
}
|
|
238
|
-
}
|
|
239
383
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
translate: -50% -50%;
|
|
384
|
+
&::after {
|
|
385
|
+
inset-inline-start: calc(100% + 1px);
|
|
386
|
+
inset-block-start: 50%;
|
|
387
|
+
translate: 0 -50%;
|
|
388
|
+
rotate: 90deg;
|
|
246
389
|
}
|
|
247
390
|
|
|
248
|
-
&[data-
|
|
249
|
-
|
|
250
|
-
|
|
391
|
+
&[data-align='start']::after {
|
|
392
|
+
inset-block-start: calc(
|
|
393
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
394
|
+
);
|
|
395
|
+
inset-block-end: auto;
|
|
396
|
+
translate: 0;
|
|
251
397
|
}
|
|
252
398
|
|
|
253
|
-
&[data-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
399
|
+
&[data-align='end']::after {
|
|
400
|
+
inset-block-start: auto;
|
|
401
|
+
inset-block-end: calc(
|
|
402
|
+
max(0.75rem, var(--tooltip-radius, 0px)) + 3px
|
|
403
|
+
);
|
|
404
|
+
translate: 0;
|
|
257
405
|
}
|
|
258
406
|
}
|
|
259
407
|
|
|
260
408
|
&[data-side='inline-end']:dir(rtl) {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
translate: 50% -50%;
|
|
409
|
+
&::before,
|
|
410
|
+
& > [data-slot='content'] {
|
|
411
|
+
transform-origin: right;
|
|
265
412
|
}
|
|
266
413
|
|
|
267
|
-
|
|
268
|
-
|
|
414
|
+
&::after {
|
|
415
|
+
rotate: -90deg;
|
|
269
416
|
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
270
419
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
420
|
+
@media (forced-colors: active) {
|
|
421
|
+
.tooltip[data-tooltip]::before,
|
|
422
|
+
.tooltip > [data-slot='content'] {
|
|
423
|
+
outline: 1px solid;
|
|
274
424
|
}
|
|
275
425
|
}
|
|
276
426
|
|
|
277
427
|
@media (prefers-reduced-motion: reduce) {
|
|
278
428
|
.tooltip[data-tooltip]::before,
|
|
279
|
-
.tooltip[data-
|
|
429
|
+
.tooltip > [data-slot='content'],
|
|
430
|
+
.tooltip::after {
|
|
280
431
|
transition-duration: 0s;
|
|
281
432
|
}
|
|
282
433
|
}
|
|
@@ -10,3 +10,40 @@
|
|
|
10
10
|
<span class="badge" data-variant="ghost">Ghost</span>
|
|
11
11
|
<span class="badge" data-variant="link">Link</span>
|
|
12
12
|
</div>
|
|
13
|
+
|
|
14
|
+
<!-- With icons -->
|
|
15
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem">
|
|
16
|
+
<span class="badge" data-variant="secondary"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-icon="inline-start"><path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"/><path d="m9 12 2 2 4-4"/></svg>Verified</span>
|
|
17
|
+
<span class="badge" data-variant="outline">Bookmark<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-icon="inline-end"><path d="M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z"/></svg></span>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<!-- With spinner -->
|
|
21
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem">
|
|
22
|
+
<span class="badge" data-variant="destructive" aria-busy="true"><span class="spinner" data-size="sm" data-icon="inline-start" aria-hidden="true"></span>Deleting</span>
|
|
23
|
+
<span class="badge" data-variant="secondary" aria-busy="true">Generating<span class="spinner" data-size="sm" data-icon="inline-end" aria-hidden="true"></span></span>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<!-- As link -->
|
|
27
|
+
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem">
|
|
28
|
+
<a class="badge" href="#">Open link<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-icon="inline-end"><path d="M7 7h10v10"/><path d="M7 17 17 7"/></svg></a>
|
|
29
|
+
<a class="badge" data-variant="outline" href="#">Read the docs<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-icon="inline-end"><path d="M7 7h10v10"/><path d="M7 17 17 7"/></svg></a>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- In a field -->
|
|
33
|
+
<div class="field" style="max-width: 24rem">
|
|
34
|
+
<label class="label" for="demo-badge-webhook" style="width: 100%">
|
|
35
|
+
Webhook URL
|
|
36
|
+
<span class="badge" data-variant="secondary" style="margin-inline-start: auto">Beta</span>
|
|
37
|
+
</label>
|
|
38
|
+
<input class="input" id="demo-badge-webhook" type="url" placeholder="https://api.example.com/webhook">
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<!-- Right-to-left -->
|
|
42
|
+
<div dir="rtl" lang="ar" style="display: flex; flex-wrap: wrap; gap: 0.5rem">
|
|
43
|
+
<span class="badge">شارة</span>
|
|
44
|
+
<span class="badge" data-variant="secondary">ثانوي</span>
|
|
45
|
+
<span class="badge" data-variant="outline">مخطط</span>
|
|
46
|
+
<span class="badge" data-variant="destructive">مدمر</span>
|
|
47
|
+
<span class="badge" data-variant="secondary"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-icon="inline-start"><path d="M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"/><path d="m9 12 2 2 4-4"/></svg>متحقق</span>
|
|
48
|
+
<span class="badge" data-variant="outline">إشارة مرجعية<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-icon="inline-end"><path d="M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z"/></svg></span>
|
|
49
|
+
</div>
|