primer_view_components 0.0.112 → 0.0.113
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +3 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.json +1 -1
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.pcss +0 -15
- data/app/components/primer/alpha/auto_complete.css +1 -1
- data/app/components/primer/alpha/auto_complete.css.map +1 -1
- data/app/components/primer/alpha/auto_complete.pcss +1 -1
- data/app/components/primer/alpha/banner.css +1 -1
- data/app/components/primer/alpha/banner.css.map +1 -1
- data/app/components/primer/alpha/banner.pcss +2 -2
- data/app/components/primer/alpha/dialog/body.rb +3 -0
- data/app/components/primer/alpha/dialog/footer.rb +3 -0
- data/app/components/primer/alpha/dialog/header.rb +3 -0
- data/app/components/primer/alpha/dialog.css +1 -0
- data/app/components/primer/alpha/dialog.css.json +1 -0
- data/app/components/primer/alpha/dialog.css.map +1 -0
- data/app/components/primer/alpha/dialog.pcss +484 -0
- data/app/components/primer/alpha/dialog.rb +3 -0
- data/app/components/primer/alpha/segmented_control.css +1 -1
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/alpha/text_field.css +3 -0
- data/app/components/primer/alpha/text_field.css.json +1 -0
- data/app/components/primer/alpha/text_field.css.map +1 -0
- data/app/components/primer/alpha/text_field.pcss +683 -0
- data/app/components/primer/alpha/toggle_switch.d.ts +1 -1
- data/app/components/primer/alpha/toggle_switch.js +7 -4
- data/app/components/primer/alpha/toggle_switch.ts +7 -3
- data/app/components/primer/beta/button_group.css +1 -0
- data/app/components/primer/beta/button_group.css.json +1 -0
- data/app/components/primer/beta/button_group.css.map +1 -0
- data/app/components/primer/beta/button_group.pcss +92 -0
- data/app/components/primer/{clipboard_copy.d.ts → beta/clipboard_copy.d.ts} +0 -0
- data/app/components/primer/{clipboard_copy.html.erb → beta/clipboard_copy.html.erb} +0 -0
- data/app/components/primer/{clipboard_copy.js → beta/clipboard_copy.js} +0 -0
- data/app/components/primer/beta/clipboard_copy.rb +50 -0
- data/app/components/primer/{clipboard_copy.ts → beta/clipboard_copy.ts} +0 -0
- data/app/components/primer/beta/popover.css.map +1 -1
- data/app/components/primer/beta/popover.pcss +5 -5
- data/app/components/primer/beta/relative_time.rb +160 -0
- data/app/components/primer/button_component.css +1 -0
- data/app/components/primer/button_component.css.json +1 -0
- data/app/components/primer/button_component.css.map +1 -0
- data/app/components/primer/button_component.pcss +557 -0
- data/app/components/primer/button_component.rb +1 -1
- data/app/components/primer/clipboard_copy.rb +2 -43
- data/app/components/primer/component.rb +4 -0
- data/app/components/primer/local_time.d.ts +1 -1
- data/app/components/primer/local_time.js +1 -1
- data/app/components/primer/local_time.rb +3 -1
- data/app/components/primer/local_time.ts +1 -1
- data/app/components/primer/primer.d.ts +1 -1
- data/app/components/primer/primer.js +1 -1
- data/app/components/primer/primer.pcss +10 -0
- data/app/components/primer/primer.ts +1 -1
- data/app/components/primer/time_ago_component.d.ts +1 -1
- data/app/components/primer/time_ago_component.js +1 -1
- data/app/components/primer/time_ago_component.rb +2 -1
- data/app/components/primer/time_ago_component.ts +1 -1
- data/app/forms/submit_button_form.rb +8 -2
- data/app/helpers/primer/form_helper.rb +12 -0
- data/lib/postcss_mixins/clearfix.pcss +12 -0
- data/lib/primer/deprecations.rb +96 -26
- data/lib/primer/deprecations.yml +68 -0
- data/lib/primer/forms/base.rb +7 -20
- data/lib/primer/forms/base_component.rb +15 -1
- data/lib/primer/forms/button.html.erb +4 -0
- data/lib/primer/forms/button.rb +68 -0
- data/lib/primer/forms/check_box.html.erb +2 -2
- data/lib/primer/forms/check_box.rb +1 -1
- data/lib/primer/forms/check_box_group.html.erb +2 -2
- data/lib/primer/forms/dsl/button_input.rb +29 -0
- data/lib/primer/forms/dsl/input_methods.rb +7 -2
- data/lib/primer/forms/dsl/submit_button_input.rb +1 -0
- data/lib/primer/forms/dsl/text_field_input.rb +0 -7
- data/lib/primer/forms/radio_button.html.erb +2 -2
- data/lib/primer/forms/radio_button.rb +1 -1
- data/lib/primer/forms/radio_button_group.html.erb +2 -2
- data/lib/primer/forms/select_list.html.erb +1 -1
- data/lib/primer/forms/select_list.rb +4 -1
- data/lib/primer/forms/submit_button.html.erb +1 -4
- data/lib/primer/forms/submit_button.rb +1 -37
- data/lib/primer/forms/text_area.html.erb +1 -1
- data/lib/primer/forms/text_area.rb +5 -1
- data/lib/primer/forms/text_field.html.erb +1 -1
- data/lib/primer/forms/text_field.rb +11 -0
- data/lib/primer/forms/utils.rb +28 -0
- data/lib/primer/view_components/audited.rb +14 -0
- data/lib/primer/view_components/engine.rb +1 -0
- data/lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb +2 -2
- data/lib/primer/view_components/linters/helpers/deprecated_components_helpers.rb +3 -18
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/rubocop/cop/primer/component_name_migration.rb +2 -2
- data/lib/tasks/docs.rake +3 -2
- data/previews/primer/alpha/auto_complete_preview.rb +12 -0
- data/previews/primer/alpha/segmented_control_preview.rb +9 -6
- data/previews/primer/alpha/text_field_preview.rb +77 -52
- data/previews/primer/beta/clipboard_copy_preview/element.html.erb +2 -0
- data/previews/primer/beta/clipboard_copy_preview.rb +39 -0
- data/previews/primer/beta/relative_time_preview.rb +271 -0
- data/previews/primer/forms/forms_preview.rb +1 -0
- data/static/arguments.json +143 -33
- data/static/audited_at.json +6 -4
- data/static/constants.json +124 -0
- data/static/statuses.json +4 -2
- metadata +34 -8
- data/previews/primer/clipboard_copy_preview/element.html.erb +0 -2
- data/previews/primer/clipboard_copy_preview.rb +0 -37
@@ -0,0 +1,484 @@
|
|
1
|
+
/* Overlay */
|
2
|
+
|
3
|
+
.Overlay--hidden {
|
4
|
+
display: none !important;
|
5
|
+
}
|
6
|
+
|
7
|
+
.Overlay--visibilityHidden {
|
8
|
+
height: 0;
|
9
|
+
overflow: hidden;
|
10
|
+
visibility: hidden;
|
11
|
+
opacity: 0;
|
12
|
+
}
|
13
|
+
|
14
|
+
.Overlay {
|
15
|
+
display: flex;
|
16
|
+
width: min(var(--overlay-width), 100vw - 2rem);
|
17
|
+
min-width: 192px;
|
18
|
+
max-height: min(calc(100vh - 2rem), var(--overlay-height));
|
19
|
+
white-space: normal;
|
20
|
+
flex-direction: column;
|
21
|
+
background-color: var(--color-canvas-overlay);
|
22
|
+
border-radius: var(--primer-borderRadius-large, 12px);
|
23
|
+
box-shadow: var(--color-overlay-shadow);
|
24
|
+
opacity: 1;
|
25
|
+
|
26
|
+
&.Overlay--size-auto {
|
27
|
+
min-width: 192px;
|
28
|
+
max-width: calc(100vw - 2rem);
|
29
|
+
max-height: calc(100vh - 2rem);
|
30
|
+
}
|
31
|
+
|
32
|
+
&.Overlay--size-full {
|
33
|
+
width: 100vw;
|
34
|
+
height: 100vh;
|
35
|
+
}
|
36
|
+
|
37
|
+
&.Overlay--size-xsmall {
|
38
|
+
--overlay-width: 192px;
|
39
|
+
|
40
|
+
max-height: calc(100vh - 2rem);
|
41
|
+
}
|
42
|
+
|
43
|
+
&.Overlay--size-small {
|
44
|
+
--overlay-height: 256px;
|
45
|
+
--overlay-width: 320px;
|
46
|
+
}
|
47
|
+
|
48
|
+
&.Overlay--size-small-portrait {
|
49
|
+
--overlay-height: 432px;
|
50
|
+
--overlay-width: 320px;
|
51
|
+
}
|
52
|
+
|
53
|
+
&.Overlay--size-medium {
|
54
|
+
--overlay-height: 320px;
|
55
|
+
--overlay-width: 480px;
|
56
|
+
}
|
57
|
+
|
58
|
+
&.Overlay--size-medium-portrait {
|
59
|
+
--overlay-height: 600px;
|
60
|
+
--overlay-width: 480px;
|
61
|
+
}
|
62
|
+
|
63
|
+
&.Overlay--size-large {
|
64
|
+
--overlay-height: 432px;
|
65
|
+
--overlay-width: 640px;
|
66
|
+
}
|
67
|
+
|
68
|
+
&.Overlay--size-xlarge {
|
69
|
+
--overlay-height: 600px;
|
70
|
+
--overlay-width: 960px;
|
71
|
+
}
|
72
|
+
|
73
|
+
&.Overlay--height-auto {
|
74
|
+
height: auto;
|
75
|
+
}
|
76
|
+
|
77
|
+
/* start deprecate in favor of Alpha::Dialog */
|
78
|
+
&.Overlay--height-xsmall {
|
79
|
+
height: min(192px, 100vh - 2rem);
|
80
|
+
}
|
81
|
+
|
82
|
+
&.Overlay--height-small {
|
83
|
+
height: min(256px, 100vh - 2rem);
|
84
|
+
}
|
85
|
+
|
86
|
+
&.Overlay--height-medium {
|
87
|
+
height: min(320px, 100vh - 2rem);
|
88
|
+
}
|
89
|
+
|
90
|
+
&.Overlay--height-large {
|
91
|
+
height: min(432px, 100vh - 2rem);
|
92
|
+
}
|
93
|
+
|
94
|
+
&.Overlay--height-xlarge {
|
95
|
+
height: min(600px, 100vh - 2rem);
|
96
|
+
}
|
97
|
+
|
98
|
+
&.Overlay--width-auto {
|
99
|
+
width: auto;
|
100
|
+
}
|
101
|
+
|
102
|
+
&.Overlay--width-small {
|
103
|
+
width: min(256px, 100vw - 2rem);
|
104
|
+
}
|
105
|
+
|
106
|
+
&.Overlay--width-medium {
|
107
|
+
width: min(320px, 100vw - 2rem);
|
108
|
+
}
|
109
|
+
|
110
|
+
&.Overlay--width-large {
|
111
|
+
width: min(480px, 100vw - 2rem);
|
112
|
+
}
|
113
|
+
|
114
|
+
&.Overlay--width-xlarge {
|
115
|
+
width: min(640px, 100vw - 2rem);
|
116
|
+
}
|
117
|
+
|
118
|
+
&.Overlay--width-xxlarge {
|
119
|
+
width: min(960px, 100vw - 2rem);
|
120
|
+
}
|
121
|
+
|
122
|
+
/* end deprecate */
|
123
|
+
|
124
|
+
&.Overlay--motion-scaleFade {
|
125
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
126
|
+
animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-scaleFade;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
@keyframes Overlay--motion-scaleFade {
|
132
|
+
0% {
|
133
|
+
opacity: 0;
|
134
|
+
transform: scale(0.5);
|
135
|
+
}
|
136
|
+
|
137
|
+
100% {
|
138
|
+
opacity: 1;
|
139
|
+
transform: scale(1);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
/* for <form> element that wraps entire contents of overlay */
|
144
|
+
.Overlay-form {
|
145
|
+
display: flex;
|
146
|
+
overflow: auto;
|
147
|
+
flex-direction: column;
|
148
|
+
flex-grow: 1;
|
149
|
+
}
|
150
|
+
|
151
|
+
.Overlay-header {
|
152
|
+
z-index: 1;
|
153
|
+
display: flex;
|
154
|
+
flex-direction: column;
|
155
|
+
|
156
|
+
&.Overlay-header--divided {
|
157
|
+
padding-bottom: var(--primer-stack-padding-condensed, 8px);
|
158
|
+
box-shadow: inset 0 calc(var(--primer-borderWidth-thin, 1px) * -1) var(--color-border-default);
|
159
|
+
|
160
|
+
& + .Overlay-body {
|
161
|
+
padding-top: var(--primer-stack-padding-normal, 16px);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
&.Overlay-header--large {
|
166
|
+
& .Overlay-headerContentWrap {
|
167
|
+
& .Overlay-titleWrap {
|
168
|
+
gap: var(--primer-stack-gap-condensed, 8px);
|
169
|
+
|
170
|
+
& .Overlay-title {
|
171
|
+
font-size: var(--primer-text-title-size-medium, 20px);
|
172
|
+
}
|
173
|
+
|
174
|
+
& .Overlay-description {
|
175
|
+
font-size: var(--primer-text-body-size-medium, 14px);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
|
181
|
+
& .Overlay-headerContentWrap {
|
182
|
+
display: flex;
|
183
|
+
align-items: flex-start;
|
184
|
+
gap: var(--primer-stack-gap-condensed, 8px);
|
185
|
+
padding: var(--primer-stack-gap-condensed, 8px) var(--primer-stack-gap-condensed, 8px) 0 var(--primer-stack-gap-condensed, 8px);
|
186
|
+
|
187
|
+
& .Overlay-actionWrap {
|
188
|
+
display: flex;
|
189
|
+
flex-direction: row;
|
190
|
+
gap: var(--primer-stack-gap-condensed, 8px);
|
191
|
+
}
|
192
|
+
|
193
|
+
& .Overlay-titleWrap {
|
194
|
+
display: flex;
|
195
|
+
padding: calc(var(--primer-stack-gap-condensed, 8px) * 0.75) 0 calc(var(--primer-stack-gap-condensed, 8px) * 0.75) var(--primer-stack-gap-condensed, 8px);
|
196
|
+
flex-direction: column;
|
197
|
+
flex-grow: 1;
|
198
|
+
gap: var(--primer-control-small-gap, 4px);
|
199
|
+
|
200
|
+
& .Overlay-title {
|
201
|
+
margin: 0;
|
202
|
+
font-size: var(--primer-text-body-size-medium, 14px);
|
203
|
+
font-weight: var(--base-text-weight-semibold, 600);
|
204
|
+
}
|
205
|
+
|
206
|
+
& .Overlay-description {
|
207
|
+
margin: 0;
|
208
|
+
font-size: var(--primer-text-body-size-small, 12px);
|
209
|
+
font-weight: var(--base-text-weight-normal, 400);
|
210
|
+
color: var(--color-fg-muted);
|
211
|
+
}
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
|
216
|
+
/* generic body content slot */
|
217
|
+
.Overlay-body {
|
218
|
+
padding: var(--primer-stack-padding-normal, 16px);
|
219
|
+
padding-top: 0;
|
220
|
+
overflow-y: auto;
|
221
|
+
scrollbar-width: thin;
|
222
|
+
font-size: var(--primer-text-body-size-medium, 14px);
|
223
|
+
flex-grow: 1;
|
224
|
+
|
225
|
+
&.Overlay-body--paddingCondensed {
|
226
|
+
padding: var(--primer-stack-padding-condensed, 8px);
|
227
|
+
padding-top: 0;
|
228
|
+
}
|
229
|
+
|
230
|
+
&.Overlay-body--paddingNone {
|
231
|
+
padding: 0;
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
/* generic footer slot */
|
236
|
+
.Overlay-footer {
|
237
|
+
z-index: 1;
|
238
|
+
display: flex;
|
239
|
+
padding: 0 var(--primer-stack-padding-normal, 16px) var(--primer-stack-padding-normal, 16px) var(--primer-stack-padding-normal, 16px);
|
240
|
+
flex-direction: row;
|
241
|
+
flex-shrink: 0;
|
242
|
+
flex-wrap: wrap;
|
243
|
+
|
244
|
+
&.Overlay-footer--divided {
|
245
|
+
padding-top: var(--primer-stack-padding-normal, 16px);
|
246
|
+
box-shadow: inset 0 var(--primer-borderWidth-thin, 1px) var(--color-border-default);
|
247
|
+
}
|
248
|
+
|
249
|
+
&.Overlay-footer--alignStart {
|
250
|
+
justify-content: flex-start;
|
251
|
+
gap: var(--primer-stack-gap-condensed, 8px);
|
252
|
+
}
|
253
|
+
|
254
|
+
&.Overlay-footer--alignCenter {
|
255
|
+
justify-content: center;
|
256
|
+
gap: var(--primer-stack-gap-condensed, 8px);
|
257
|
+
}
|
258
|
+
|
259
|
+
&.Overlay-footer--alignEnd {
|
260
|
+
justify-content: flex-end;
|
261
|
+
gap: var(--primer-stack-gap-condensed, 8px);
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
265
|
+
/* TODO: replace with refactored IconButton */
|
266
|
+
.Overlay-closeButton {
|
267
|
+
position: relative;
|
268
|
+
display: grid;
|
269
|
+
width: var(--base-size-32, 32px);
|
270
|
+
height: var(--base-size-32, 32px);
|
271
|
+
padding: 0;
|
272
|
+
color: var(--color-fg-muted);
|
273
|
+
cursor: pointer;
|
274
|
+
user-select: none;
|
275
|
+
background-color: transparent;
|
276
|
+
border: var(--primer-borderWidth-thin, 1px) solid transparent;
|
277
|
+
border-radius: var(--primer-borderRadius-medium, 6px);
|
278
|
+
transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);
|
279
|
+
transition-property: color, background-color, border-color;
|
280
|
+
place-content: center;
|
281
|
+
align-self: flex-start;
|
282
|
+
flex-shrink: 0;
|
283
|
+
|
284
|
+
&:hover,
|
285
|
+
&:focus {
|
286
|
+
background-color: var(--color-btn-hover-bg);
|
287
|
+
border: var(--primer-borderWidth-thin, 1px) solid var(--color-btn-hover-bg);
|
288
|
+
}
|
289
|
+
|
290
|
+
/* Override .close-button's `border: 0` that triggers a border-color transition on hover */
|
291
|
+
&.close-button {
|
292
|
+
border: var(--primer-borderWidth-thin, 1px) solid transparent;
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
@define-mixin Overlay-backdrop {
|
297
|
+
position: fixed;
|
298
|
+
top: 0;
|
299
|
+
right: 0;
|
300
|
+
bottom: 0;
|
301
|
+
left: 0;
|
302
|
+
z-index: 999;
|
303
|
+
display: flex;
|
304
|
+
background-color: var(--color-neutral-muted);
|
305
|
+
}
|
306
|
+
|
307
|
+
@define-mixin Overlay-backdrop--transparent {
|
308
|
+
position: absolute;
|
309
|
+
z-index: 999;
|
310
|
+
background-color: transparent;
|
311
|
+
}
|
312
|
+
|
313
|
+
/* variants must be mixins so we can extend within a media query (@extend is not supported inside media queries) */
|
314
|
+
|
315
|
+
/* border-radius repeats within placement options to ensure the original radius is reset when two classes co-exist */
|
316
|
+
|
317
|
+
/* center */
|
318
|
+
@define-mixin Overlay-backdrop--center {
|
319
|
+
@mixin Overlay-backdrop;
|
320
|
+
|
321
|
+
align-items: center;
|
322
|
+
justify-content: center;
|
323
|
+
}
|
324
|
+
|
325
|
+
/* anchor */
|
326
|
+
@define-mixin Overlay-backdrop--anchor {
|
327
|
+
@mixin Overlay-backdrop--transparent;
|
328
|
+
|
329
|
+
& .Overlay {
|
330
|
+
width: auto;
|
331
|
+
}
|
332
|
+
}
|
333
|
+
|
334
|
+
/* anchor side(s) */
|
335
|
+
@define-mixin Overlay-backdrop--side $responsiveVariant {
|
336
|
+
@mixin Overlay-backdrop;
|
337
|
+
|
338
|
+
/* default left */
|
339
|
+
align-items: center;
|
340
|
+
justify-content: left;
|
341
|
+
|
342
|
+
&.Overlay-backdrop--placement-left$(responsiveVariant) {
|
343
|
+
align-items: center;
|
344
|
+
justify-content: left;
|
345
|
+
|
346
|
+
& > .Overlay$(responsiveVariant) {
|
347
|
+
height: 100vh;
|
348
|
+
max-height: unset;
|
349
|
+
border-radius: var(--primer-borderRadius-large, 12px);
|
350
|
+
border-top-left-radius: 0;
|
351
|
+
border-bottom-left-radius: 0;
|
352
|
+
|
353
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
354
|
+
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideInRight;
|
355
|
+
}
|
356
|
+
}
|
357
|
+
}
|
358
|
+
|
359
|
+
&.Overlay-backdrop--placement-right$(responsiveVariant) {
|
360
|
+
align-items: center;
|
361
|
+
justify-content: right;
|
362
|
+
|
363
|
+
& > .Overlay$(responsiveVariant) {
|
364
|
+
height: 100vh;
|
365
|
+
max-height: unset;
|
366
|
+
border-radius: var(--primer-borderRadius-large, 12px);
|
367
|
+
border-top-right-radius: 0;
|
368
|
+
border-bottom-right-radius: 0;
|
369
|
+
|
370
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
371
|
+
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideInLeft;
|
372
|
+
}
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
376
|
+
&.Overlay-backdrop--placement-bottom$(responsiveVariant) {
|
377
|
+
align-items: end;
|
378
|
+
justify-content: center;
|
379
|
+
|
380
|
+
& > .Overlay$(responsiveVariant) {
|
381
|
+
width: 100vw;
|
382
|
+
height: auto;
|
383
|
+
max-height: calc(100vh - 2rem);
|
384
|
+
border-radius: var(--primer-borderRadius-large, 12px);
|
385
|
+
border-bottom-right-radius: 0;
|
386
|
+
border-bottom-left-radius: 0;
|
387
|
+
|
388
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
389
|
+
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideUp;
|
390
|
+
}
|
391
|
+
}
|
392
|
+
}
|
393
|
+
|
394
|
+
&.Overlay-backdrop--placement-top$(responsiveVariant) {
|
395
|
+
align-items: start;
|
396
|
+
justify-content: center;
|
397
|
+
|
398
|
+
& > .Overlay$(responsiveVariant) {
|
399
|
+
border-radius: var(--primer-borderRadius-large, 12px);
|
400
|
+
border-top-left-radius: 0;
|
401
|
+
border-top-right-radius: 0;
|
402
|
+
|
403
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
404
|
+
animation: 250ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running Overlay--motion-slideDown;
|
405
|
+
}
|
406
|
+
}
|
407
|
+
}
|
408
|
+
}
|
409
|
+
|
410
|
+
/* full width */
|
411
|
+
@define-mixin Overlay-backdrop--full {
|
412
|
+
@mixin Overlay-backdrop;
|
413
|
+
|
414
|
+
& .Overlay {
|
415
|
+
width: 100%;
|
416
|
+
max-width: 100vw;
|
417
|
+
height: 100%;
|
418
|
+
max-height: 100vh;
|
419
|
+
border-radius: unset !important;
|
420
|
+
flex-grow: 1;
|
421
|
+
}
|
422
|
+
}
|
423
|
+
|
424
|
+
/* Overlay variant classnames */
|
425
|
+
.Overlay-backdrop--center {
|
426
|
+
@mixin Overlay-backdrop--center;
|
427
|
+
}
|
428
|
+
|
429
|
+
.Overlay-backdrop--anchor {
|
430
|
+
@mixin Overlay-backdrop--anchor;
|
431
|
+
}
|
432
|
+
|
433
|
+
.Overlay-backdrop--side {
|
434
|
+
@mixin Overlay-backdrop--side;
|
435
|
+
}
|
436
|
+
|
437
|
+
.Overlay-backdrop--full {
|
438
|
+
@mixin Overlay-backdrop--full;
|
439
|
+
}
|
440
|
+
|
441
|
+
/* responsive variants */
|
442
|
+
|
443
|
+
/* --primer-viewportRange-narrowLandscape */
|
444
|
+
@media (max-width: 767px) {
|
445
|
+
.Overlay-backdrop--center-whenNarrow {
|
446
|
+
@mixin Overlay-backdrop--center;
|
447
|
+
}
|
448
|
+
|
449
|
+
.Overlay-backdrop--anchor-whenNarrow {
|
450
|
+
@mixin Overlay-backdrop--anchor;
|
451
|
+
}
|
452
|
+
|
453
|
+
.Overlay-backdrop--side-whenNarrow {
|
454
|
+
@mixin Overlay-backdrop--side -whenNarrow;
|
455
|
+
}
|
456
|
+
|
457
|
+
.Overlay-backdrop--full-whenNarrow {
|
458
|
+
@mixin Overlay-backdrop--full;
|
459
|
+
}
|
460
|
+
}
|
461
|
+
|
462
|
+
@keyframes Overlay--motion-slideDown {
|
463
|
+
from {
|
464
|
+
transform: translateY(-100%);
|
465
|
+
}
|
466
|
+
}
|
467
|
+
|
468
|
+
@keyframes Overlay--motion-slideUp {
|
469
|
+
from {
|
470
|
+
transform: translateY(100%);
|
471
|
+
}
|
472
|
+
}
|
473
|
+
|
474
|
+
@keyframes Overlay--motion-slideInRight {
|
475
|
+
from {
|
476
|
+
transform: translateX(-100%);
|
477
|
+
}
|
478
|
+
}
|
479
|
+
|
480
|
+
@keyframes Overlay--motion-slideInLeft {
|
481
|
+
from {
|
482
|
+
transform: translateX(100%);
|
483
|
+
}
|
484
|
+
}
|
@@ -18,6 +18,9 @@ module Primer
|
|
18
18
|
# `aria-labelledby` relationship between the title and the unique id of
|
19
19
|
# the dialog.
|
20
20
|
class Dialog < Primer::Component
|
21
|
+
status :alpha
|
22
|
+
audited_at "2022-10-10"
|
23
|
+
|
21
24
|
DEFAULT_SIZE = :medium
|
22
25
|
SIZE_MAPPINGS = {
|
23
26
|
:small => "Overlay--size-small-portrait",
|
@@ -1 +1 @@
|
|
1
|
-
.SegmentedControl{background-color:var(--color-segmented-control-bg);border-radius:var(--primer-borderRadius-medium,6px);box-shadow:var(--primer-borderInset-thin,inset 0 0 0 max(1px,.0625rem)) var(--color-border-default);display:inline-flex;list-style:none}.SegmentedControl-item{border:var(--primer-borderWidth-thin,max(1px,.0625rem)) solid #0000;border-radius:var(--primer-borderRadius-medium,6px);display:inline-flex;padding:var(--primer-control-xsmall-paddingInline-condensed,4px);position:relative}.SegmentedControl-item.SegmentedControl-item--selected{background-color:var(--color-btn-bg);border-color:var(--color-segmented-control-button-selected-border)}.SegmentedControl-item.SegmentedControl-item--selected .Button{font-weight:var(--base-text-weight-semibold,600)}.SegmentedControl-item.SegmentedControl-item--selected .Button:hover{background-color:initial}.SegmentedControl-item.SegmentedControl-item--selected+.SegmentedControl-item:before,.SegmentedControl-item.SegmentedControl-item--selected:before{border-color:#0000}.SegmentedControl-item .Button-label[data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;visibility:hidden}.SegmentedControl-item:before{border-left:var(--primer-borderWidth-thin,max(1px,.0625rem)) solid var(--color-border-default);
|
1
|
+
.SegmentedControl{background-color:var(--color-segmented-control-bg);border-radius:var(--primer-borderRadius-medium,6px);box-shadow:var(--primer-borderInset-thin,inset 0 0 0 max(1px,.0625rem)) var(--color-border-default);display:inline-flex;list-style:none}.SegmentedControl-item{border:var(--primer-borderWidth-thin,max(1px,.0625rem)) solid #0000;border-radius:var(--primer-borderRadius-medium,6px);display:inline-flex;padding:var(--primer-control-xsmall-paddingInline-condensed,4px);position:relative}.SegmentedControl-item.SegmentedControl-item--selected{background-color:var(--color-btn-bg);border-color:var(--color-segmented-control-button-selected-border)}.SegmentedControl-item.SegmentedControl-item--selected .Button{font-weight:var(--base-text-weight-semibold,600)}.SegmentedControl-item.SegmentedControl-item--selected .Button:hover{background-color:initial}.SegmentedControl-item.SegmentedControl-item--selected+.SegmentedControl-item:before,.SegmentedControl-item.SegmentedControl-item--selected:before{border-color:#0000}.SegmentedControl-item .Button-label[data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;visibility:hidden}.SegmentedControl-item:before{border-left:var(--primer-borderWidth-thin,max(1px,.0625rem)) solid var(--color-border-default);content:"";inset:0 0 0 -1px;margin-bottom:var(--primer-control-medium-paddingBlock,6px);margin-top:var(--primer-control-medium-paddingBlock,6px);position:absolute}.SegmentedControl-item .Button{border:0;color:var(--color-btn-text);font-weight:var(--base-text-weight-normal,400);transition:none}.SegmentedControl-item .Button:focus-visible{border-radius:calc(var(--primer-borderRadius-medium, 6px) - 5px);outline-offset:calc(var(--primer-control-xsmall-paddingInline-condensed, 4px) - var(--primer-borderWidth-thin, 1px))}.SegmentedControl-item .Button--small{height:calc(var(--primer-control-small-size, 28px) - var(--primer-control-xsmall-paddingInline-condensed, 4px)*2 - var(--primer-borderWidth-thin, 1px)*2);padding:0 calc(var(--primer-control-small-paddingInline-condensed, 8px) - var(--primer-control-xsmall-paddingInline-condensed, 4px))}.SegmentedControl-item .Button--small.Button--iconOnly{width:calc(var(--primer-control-medium-size, 32px) - var(--primer-control-xsmall-paddingInline-condensed, 4px)*2 - var(--primer-borderWidth-thin, 1px)*2)}.SegmentedControl-item .Button--medium{height:calc(var(--primer-control-medium-size, 32px) - var(--primer-control-xsmall-paddingInline-condensed, 4px)*2 - var(--primer-borderWidth-thin, 1px)*2);padding:0 calc(var(--primer-control-medium-paddingInline-normal, 12px) - var(--primer-control-xsmall-paddingInline-condensed, 4px))}.SegmentedControl-item .Button--medium.Button--iconOnly{width:calc(var(--primer-control-medium-size, 32px) - var(--primer-control-xsmall-paddingInline-condensed, 4px)*2 - var(--primer-borderWidth-thin, 1px)*2)}.SegmentedControl-item .Button--large{height:calc(var(--primer-control-large-size, 40px) - var(--primer-control-xsmall-paddingInline-condensed, 4px)*2 - var(--primer-borderWidth-thin, 1px)*2);padding:0 calc(var(--primer-control-large-paddingInline-spacious, 16px) - var(--primer-control-xsmall-paddingInline-condensed, 4px))}.SegmentedControl-item .Button--large.Button--iconOnly{width:calc(var(--primer-control-large-size, 40px) - var(--primer-control-xsmall-paddingInline-condensed, 4px)*2 - var(--primer-borderWidth-thin, 1px)*2)}.SegmentedControl-item .Button--iconOnly{padding:initial}.SegmentedControl-item .Button--invisible.Button--invisible-noVisuals .Button-label{color:var(--color-btn-text)}.SegmentedControl--fullWidth{display:flex}.SegmentedControl--fullWidth .SegmentedControl-item{flex:1;justify-content:center}.SegmentedControl--fullWidth .Button--iconOnly,.SegmentedControl--fullWidth .Button-withTooltip{width:100%}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["segmented_control.pcss"],"names":[],"mappings":"AAEA,kBAGE,kDAAmD,CACnD,mDAAqD,CACrD,mGAAuG,CAJvG,mBAAoB,CACpB,eAIF,CAEA,uBAGE,mEAA6E,CAC7E,mDAAqD,CAFrD,mBAAoB,CAGpB,gEAAkE,CAJlE,iBA8FF,CAvFE,uDACE,oCAAqC,CACrC,kEAiBF,CAfE,+DACE,gDAKF,CAHE,qEACE,wBACF,CAOF,mJACE,kBACF,CAIF,0DAKE,0BAA2B,CAJ3B,aAAc,CAEd,gDAAkD,CADlD,QAAS,CAET,iBAEF,CAGA,8BAME,8FAAkG,
|
1
|
+
{"version":3,"sources":["segmented_control.pcss"],"names":[],"mappings":"AAEA,kBAGE,kDAAmD,CACnD,mDAAqD,CACrD,mGAAuG,CAJvG,mBAAoB,CACpB,eAIF,CAEA,uBAGE,mEAA6E,CAC7E,mDAAqD,CAFrD,mBAAoB,CAGpB,gEAAkE,CAJlE,iBA8FF,CAvFE,uDACE,oCAAqC,CACrC,kEAiBF,CAfE,+DACE,gDAKF,CAHE,qEACE,wBACF,CAOF,mJACE,kBACF,CAIF,0DAKE,0BAA2B,CAJ3B,aAAc,CAEd,gDAAkD,CADlD,QAAS,CAET,iBAEF,CAGA,8BAME,8FAAkG,CADlG,UAAW,CAHX,gBAAiB,CAEjB,2DAA6D,CAD7D,wDAA0D,CAF1D,iBAMF,CAGA,+BACE,QAAS,CAGT,2BAA4B,CAF5B,8CAAgD,CAChD,eAOF,CAJE,6CAEE,gEAAiE,CADjE,oHAEF,CAGF,sCACE,yJAA8J,CAC9J,oIAKF,CAHE,uDACE,yJACF,CAGF,uCACE,0JAA+J,CAC/J,mIAKF,CAHE,wDACE,yJACF,CAGF,sCACE,yJAA8J,CAC9J,oIAKF,CAHE,uDACE,wJACF,CAGF,yCACE,eACF,CAEA,oFACE,2BACF,CAIF,6BACE,YAYF,CAVE,oDACE,MAAO,CACP,sBACF,CAGA,gGAEE,UACF","file":"segmented_control.css","sourcesContent":["/* SegmentedControl */\n\n.SegmentedControl {\n display: inline-flex;\n list-style: none;\n background-color: var(--color-segmented-control-bg);\n border-radius: var(--primer-borderRadius-medium, 6px);\n box-shadow: var(--primer-borderInset-thin, inset 0 0 0 max(1px, 0.0625rem)) var(--color-border-default);\n}\n\n.SegmentedControl-item {\n position: relative;\n display: inline-flex;\n border: var(--primer-borderWidth-thin, max(1px, 0.0625rem)) solid transparent;\n border-radius: var(--primer-borderRadius-medium, 6px);\n padding: var(--primer-control-xsmall-paddingInline-condensed, 4px);\n\n /* Selected ---------------------------------------- */\n &.SegmentedControl-item--selected {\n background-color: var(--color-btn-bg);\n border-color: var(--color-segmented-control-button-selected-border);\n\n & .Button {\n font-weight: var(--base-text-weight-semibold, 600);\n\n &:hover {\n background-color: transparent;\n }\n }\n\n &::before {\n border-color: transparent;\n }\n\n & + .SegmentedControl-item::before {\n border-color: transparent;\n }\n }\n\n /* renders a visibly hidden \"copy\" of the text in bold, reserving box space for when text becomes bold on selected */\n & .Button-label[data-content]::before {\n display: block;\n height: 0;\n font-weight: var(--base-text-weight-semibold, 600);\n visibility: hidden;\n content: attr(data-content);\n }\n\n /* Separator lines */\n &::before {\n position: absolute;\n inset: 0 0 0 -1px;\n margin-top: var(--primer-control-medium-paddingBlock, 6px);\n margin-bottom: var(--primer-control-medium-paddingBlock, 6px);\n content: '';\n border-left: var(--primer-borderWidth-thin, max(1px, 0.0625rem)) solid var(--color-border-default);\n }\n\n /* Button ----------------------------------------- */\n & .Button {\n border: 0;\n font-weight: var(--base-text-weight-normal, 400);\n transition: none;\n color: var(--color-btn-text);\n\n &:focus-visible {\n outline-offset: calc(var(--primer-control-xsmall-paddingInline-condensed, 4px) - var(--primer-borderWidth-thin, 1px));\n border-radius: calc(var(--primer-borderRadius-medium, 6px) - 5px);\n }\n }\n\n & .Button--small {\n height: calc(var(--primer-control-small-size, 28px) - var(--primer-control-xsmall-paddingInline-condensed, 4px) * 2 - var(--primer-borderWidth-thin, 1px) * 2);\n padding: 0 calc(var(--primer-control-small-paddingInline-condensed, 8px) - var(--primer-control-xsmall-paddingInline-condensed, 4px));\n\n &.Button--iconOnly {\n width: calc(var(--primer-control-medium-size, 32px) - var(--primer-control-xsmall-paddingInline-condensed, 4px) * 2 - var(--primer-borderWidth-thin, 1px) * 2);\n }\n }\n\n & .Button--medium {\n height: calc(var(--primer-control-medium-size, 32px) - var(--primer-control-xsmall-paddingInline-condensed, 4px) * 2 - var(--primer-borderWidth-thin, 1px) * 2);\n padding: 0 calc(var(--primer-control-medium-paddingInline-normal, 12px) - var(--primer-control-xsmall-paddingInline-condensed, 4px));\n\n &.Button--iconOnly {\n width: calc(var(--primer-control-medium-size, 32px) - var(--primer-control-xsmall-paddingInline-condensed, 4px) * 2 - var(--primer-borderWidth-thin, 1px) * 2);\n }\n }\n\n & .Button--large {\n height: calc(var(--primer-control-large-size, 40px) - var(--primer-control-xsmall-paddingInline-condensed, 4px) * 2 - var(--primer-borderWidth-thin, 1px) * 2);\n padding: 0 calc(var(--primer-control-large-paddingInline-spacious, 16px) - var(--primer-control-xsmall-paddingInline-condensed, 4px));\n\n &.Button--iconOnly {\n width: calc(var(--primer-control-large-size, 40px) - var(--primer-control-xsmall-paddingInline-condensed, 4px) * 2 - var(--primer-borderWidth-thin, 1px) * 2);\n }\n }\n\n & .Button--iconOnly {\n padding: initial;\n }\n\n & .Button--invisible.Button--invisible-noVisuals .Button-label {\n color: var(--color-btn-text);\n }\n}\n\n/* fullWidth */\n.SegmentedControl--fullWidth {\n display: flex;\n\n & .SegmentedControl-item {\n flex: 1;\n justify-content: center;\n }\n\n /* is .Button-withTooltip used anywhere? can't find use of it */\n & .Button--iconOnly,\n & .Button-withTooltip {\n width: 100%;\n }\n}\n"]}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
.FormControl{display:inline-flex;flex-direction:column;gap:var(--base-size-4,4px)}.FormControl--fullWidth{display:flex}.FormControl-label{color:var(--color-fg-default);font-size:var(--primer-text-body-size-medium,14px);font-weight:var(--base-text-weight-semibold,600);line-height:var(--primer-text-body-lineHeight-medium,1.42857);-webkit-user-select:none;user-select:none}.FormControl-caption{color:var(--color-fg-muted);font-size:var(--primer-text-caption-size,12px);font-weight:var(--primer-text-caption-weight,400);line-height:var(--primer-text-caption-lineHeight,1.33333);margin-bottom:0}.FormControl-inlineValidation{fill:var(--color-danger-fg);align-items:center;color:var(--color-danger-fg);display:flex;flex-direction:row;font-size:var(--primer-text-caption-size,12px);font-weight:var(--base-text-weight-semibold,600);gap:var(--base-size-4,4px)}.FormControl-inlineValidation p{margin-bottom:0}.FormControl-input,.FormControl-select,.FormControl-textarea{background-color:var(--color-canvas-default);border:var(--primer-borderWidth-thin,1px) solid var(--color-border-default);color:var(--color-fg-default)}.FormControl-input[disabled],.FormControl-select[disabled],.FormControl-textarea[disabled]{-webkit-text-fill-color:var(--color-primer-fg-disabled);background-color:var(--color-input-disabled-bg);border-color:var(--color-border-default);color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}.FormControl-input[invalid]:not(:focus),.FormControl-select[invalid]:not(:focus),.FormControl-textarea[invalid]:not(:focus){border-color:var(--color-danger-emphasis)}.FormControl-input:not([type=checkbox],[type=radio]):focus,.FormControl-select:not([type=checkbox],[type=radio]):focus,.FormControl-textarea:not([type=checkbox],[type=radio]):focus{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}.FormControl-input:not([type=checkbox],[type=radio]):focus:not(:focus-visible),.FormControl-select:not([type=checkbox],[type=radio]):focus:not(:focus-visible),.FormControl-textarea:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px #0000 var(--color-accent-fg);outline:none}.FormControl-input:not([type=checkbox],[type=radio]):focus-visible,.FormControl-select:not([type=checkbox],[type=radio]):focus-visible,.FormControl-textarea:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}.FormControl-input,.FormControl-select,.FormControl-textarea{border-radius:var(--primer-borderRadius-medium,6px);font-size:var(--primer-text-body-size-medium,14px);line-height:var(--primer-text-body-lineHeight-medium,1.42857);padding-block:calc(var(--primer-control-medium-paddingBlock, 6px) - var(--primer-borderWidth-thin, 1px));padding-inline:var(--primer-control-medium-paddingInline-condensed,8px);transition:80ms cubic-bezier(.33,1,.68,1);transition-property:color,background-color,box-shadow,border-color;width:100%}.FormControl-input[disabled]::placeholder,.FormControl-select[disabled]::placeholder,.FormControl-textarea[disabled]::placeholder{color:var(--color-primer-fg-disabled)}.FormControl-input[readonly],.FormControl-select[readonly],.FormControl-textarea[readonly]{background-color:var(--color-input-disabled-bg)}.FormControl-input::placeholder,.FormControl-select::placeholder,.FormControl-textarea::placeholder{color:var(--color-fg-subtle);opacity:1}.FormControl-input.FormControl-small,.FormControl-select.FormControl-small,.FormControl-textarea.FormControl-small{font-size:var(--primer-text-body-size-small,12px);height:var(--primer-control-small-size,28px);padding-block:var(--primer-control-small-paddingBlock,4px);padding-inline:var(--primer-control-small-paddingInline-normal,8px)}.FormControl-input.FormControl-medium,.FormControl-select.FormControl-medium,.FormControl-textarea.FormControl-medium{height:var(--primer-control-medium-size,32px)}.FormControl-input.FormControl-large,.FormControl-select.FormControl-large,.FormControl-textarea.FormControl-large{height:var(--primer-control-large-size,40px);padding-block:var(--primer-control-large-paddingBlock,10px);padding-inline:var(--primer-control-large-paddingInline-normal,12px)}.FormControl-input.FormControl-inset,.FormControl-select.FormControl-inset,.FormControl-textarea.FormControl-inset{background-color:var(--color-canvas-inset)}.FormControl-input.FormControl-inset:focus,.FormControl-input.FormControl-inset:focus-visible,.FormControl-select.FormControl-inset:focus,.FormControl-select.FormControl-inset:focus-visible,.FormControl-textarea.FormControl-inset:focus,.FormControl-textarea.FormControl-inset:focus-visible{background-color:var(--color-canvas-default)}.FormControl-input.FormControl-monospace,.FormControl-select.FormControl-monospace,.FormControl-textarea.FormControl-monospace{font-family:var(
|
2
|
+
--primer-fontStack-monospace,"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"
|
3
|
+
)}.FormControl-input.FormControl-error,.FormControl-select.FormControl-error,.FormControl-textarea.FormControl-error{border-color:var(--color-danger-emphasis)}.FormControl-input.FormControl-success,.FormControl-select.FormControl-success,.FormControl-textarea.FormControl-success{border-color:var(--color-success-emphasis)}.FormControl-input.FormControl-warning,.FormControl-select.FormControl-warning,.FormControl-textarea.FormControl-warning{border-color:var(--color-attention-emphasis)}.FormControl-input-wrap{display:grid;position:relative}.FormControl-input-wrap .FormControl-input-leadingVisualWrap{color:var(--color-fg-muted);display:block;height:var(--base-size-16,16px);left:var(--base-size-8,8px);pointer-events:none;position:absolute;top:var(--base-size-8,8px);width:var(--base-size-16,16px)}.FormControl-input-wrap .FormControl-input-leadingVisualWrap .FormControl-input-leadingVisual{display:block;-webkit-user-select:none;user-select:none}.FormControl-input-wrap .FormControl-input-trailingAction{align-items:center;background:#0000;border:0;border-radius:var(--primer-borderRadius-small);color:var(--color-fg-muted);cursor:pointer;display:grid;height:var(--primer-control-xsmall-size,24px);justify-content:center;padding:0;position:absolute;right:var(--base-size-4,4px);top:var(--base-size-4,4px);transition:.2s cubic-bezier(.3,0,.5,1);transition-property:color,background-color,border-color;width:var(--primer-control-xsmall-size,24px);z-index:4}.FormControl-input-wrap .FormControl-input-trailingAction svg{-webkit-user-select:none;user-select:none}.FormControl-input-wrap .FormControl-input-trailingAction[disabled]{color:var(--color-primer-fg-disabled);pointer-events:none}.FormControl-input-wrap .FormControl-input-trailingAction:hover{background:var(--color-action-list-item-default-hover-bg)}.FormControl-input-wrap .FormControl-input-trailingAction:active{background:var(--color-action-list-item-default-active-bg)}.FormControl-input-wrap .FormControl-input-trailingAction.FormControl-input-trailingAction--divider:before{background:var(--color-border-default);content:"";display:block;height:var(--base-size-16);left:calc(var(--base-size-4, 4px)*-1);position:absolute;top:calc((var(--primer-control-xsmall-size) - var(--base-size-16))/2);width:var(--primer-borderWidth-thin)}.FormControl-input-wrap .FormControl-input-trailingAction:after{content:"";height:100%;left:50%;min-height:var(--primer-control-medium-size,32px) var(--primer-control-medium-size,32px);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}@media (pointer:coarse){.FormControl-input-wrap .FormControl-input-trailingAction:after{min-height:var(--primer-control-minTarget-coarse,44px);min-width:var(--primer-control-minTarget-coarse,44px)}}.FormControl-input-wrap.FormControl-input-wrap--leadingVisual .FormControl-input{padding-inline-start:calc(var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-medium-gap, 8px))}.FormControl-input-wrap.FormControl-input-wrap--trailingAction .FormControl-input{padding-inline-end:calc(var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-medium-gap, 8px))}.FormControl-input-wrap.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input{padding-inline-end:calc(var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-medium-gap, 8px) + var(--primer-borderWidth-thin, 1px))}.FormControl-input-wrap.FormControl-small .FormControl-input-leadingVisualWrap{left:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem);top:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem)}.FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-small{padding-inline-end:calc(var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-small-gap, 8px))}.FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-small{padding-inline-end:calc(var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) + var(--primer-control-small-gap, 8px) + var(--primer-borderWidth-thin, 1px))}.FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction{height:calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));width:calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px))}.FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction:before{top:calc((var(--primer-control-xsmall-size) - var(--base-size-16))/4)}.FormControl-input-wrap.FormControl-large .FormControl-input-leadingVisualWrap{left:var(--primer-control-medium-paddingInline-normal,12px);top:var(--primer-control-medium-paddingInline-normal,12px)}.FormControl-input-wrap.FormControl-large.FormControl-input-wrap--leadingVisual .FormControl-input.FormControl-large{padding-inline-start:calc(var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) + var(--primer-control-large-gap, 8px))}.FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-large{padding-inline-end:calc(var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) + var(--primer-control-large-gap, 8px))}.FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-large{padding-inline-end:calc(var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) + var(--primer-control-large-gap, 8px) + var(--primer-borderWidth-thin, 1px))}.FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction{height:var(--primer-control-small-size,28px);right:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem);top:calc(var(--primer-control-medium-paddingInline-condensed, 8px) - .125rem);width:var(--primer-control-small-size,28px)}.FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction:before{height:var(--base-size-20);top:unset}.FormControl-select-wrap{display:grid;grid-template-columns:minmax(0,auto) var(--base-size-16,16px)}.FormControl-select-wrap:after{background-color:var(--color-fg-muted);content:"";grid-column:2;grid-row:1;height:var(--base-size-16,16px);-webkit-mask:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IiM1ODYwNjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTQuNDI3IDkuNDI3IDMuMzk2IDMuMzk2YS4yNTEuMjUxIDAgMCAwIC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwIDAgMTEuMzk2IDlINC42MDRhLjI1LjI1IDAgMCAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3IDcuODIgMy4wNzJhLjI1LjI1IDAgMCAxIC4zNTQgMEwxMS41NyA2LjQ3YS4yNS4yNSAwIDAgMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMCAxLS4xNzctLjQyN3oiLz48L3N2Zz4=");mask:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IiM1ODYwNjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTQuNDI3IDkuNDI3IDMuMzk2IDMuMzk2YS4yNTEuMjUxIDAgMCAwIC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwIDAgMTEuMzk2IDlINC42MDRhLjI1LjI1IDAgMCAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3IDcuODIgMy4wNzJhLjI1LjI1IDAgMCAxIC4zNTQgMEwxMS41NyA2LjQ3YS4yNS4yNSAwIDAgMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMCAxLS4xNzctLjQyN3oiLz48L3N2Zz4=");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;padding-right:var(--base-size-4,4px);place-self:center end;pointer-events:none;width:var(--base-size-16,16px)}.FormControl-select-wrap .FormControl-select{-webkit-appearance:none;appearance:none;grid-column:1/-1;grid-row:1;padding-right:var(--base-size-20,20px)}.FormControl-checkbox-wrap,.FormControl-radio-wrap{display:inline-grid;gap:var(--base-size-8,8px);grid-template-columns:min-content auto}.FormControl-checkbox-wrap .FormControl-checkbox-labelWrap,.FormControl-checkbox-wrap .FormControl-radio-labelWrap,.FormControl-radio-wrap .FormControl-checkbox-labelWrap,.FormControl-radio-wrap .FormControl-radio-labelWrap{display:flex;flex-direction:column;gap:var(--base-size-4,4px)}.FormControl-checkbox-wrap .FormControl-label,.FormControl-radio-wrap .FormControl-label{cursor:pointer}input[type=checkbox].FormControl-checkbox{background-color:var(--color-canvas-default);border:var(--primer-borderWidth-thin,1px) solid var(--color-border-default);color:var(--color-fg-default)}input.FormControl-checkbox[type=checkbox][disabled]{-webkit-text-fill-color:var(--color-primer-fg-disabled);background-color:var(--color-input-disabled-bg);border-color:var(--color-border-default);color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}input.FormControl-checkbox[type=checkbox][invalid]:not(:focus){border-color:var(--color-danger-emphasis)}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px #0000 var(--color-accent-fg);outline:none}input.FormControl-checkbox[type=checkbox]:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input[type=checkbox].FormControl-checkbox{-webkit-appearance:none;appearance:none;border-color:var(--color-neutral-emphasis);border-radius:var(--primer-borderRadius-small,3px);cursor:pointer;display:grid;height:var(--base-size-16,16px);margin:.125rem 0 0;place-content:center;position:relative;transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1);width:var(--base-size-16,16px)}input.FormControl-checkbox[type=checkbox]:before{background-color:var(--color-fg-on-emphasis);clip-path:inset(var(--base-size-16,16px) 0 0 0);content:"";height:var(--base-size-16,16px);-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjc4LjIyYS43NS43NSAwIDAgMSAwIDEuMDYxTDQuNTIgOC41NDFhLjc1Mi43NTIgMCAwIDEtMS4wNjIgMEwuMjAyIDUuMjg1YS43NS43NSAwIDAgMSAxLjA2MS0xLjA2MWwyLjcyNSAyLjcyM0wxMC43MTguMjJhLjc1MS43NTEgMCAwIDEgMS4wNjIgMFoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjc4LjIyYS43NS43NSAwIDAgMSAwIDEuMDYxTDQuNTIgOC41NDFhLjc1Mi43NTIgMCAwIDEtMS4wNjIgMEwuMjAyIDUuMjg1YS43NS43NSAwIDAgMSAxLjA2MS0xLjA2MWwyLjcyNSAyLjcyM0wxMC43MTguMjJhLjc1MS43NTEgMCAwIDEgMS4wNjIgMFoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:75%;mask-size:75%;transition:visibility 0s linear .23s;visibility:hidden;width:var(--base-size-16,16px)}@media screen and (prefers-reduced-motion:no-preference){input.FormControl-checkbox[type=checkbox]:before{animation:checkmarkOut 80ms cubic-bezier(.65,0,.35,1) forwards}}input.FormControl-checkbox[type=checkbox]:after{content:"";height:100%;left:50%;min-height:var(--primer-control-medium-size,32px) var(--primer-control-medium-size,32px);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-checkbox-labelWrap .FormControl-label,input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-radio-labelWrap .FormControl-label{color:var(--color-primer-fg-disabled);cursor:not-allowed}input.FormControl-checkbox[type=checkbox]:checked{background:var(--color-accent-fg);border-color:var(--color-accent-fg);transition:background-color,border-color 80ms cubic-bezier(.32,0,.67,0) 0ms}input.FormControl-checkbox[type=checkbox]:checked:before{transition:visibility 0s linear 0s;visibility:visible}@media screen and (prefers-reduced-motion:no-preference){input.FormControl-checkbox[type=checkbox]:checked:before{animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards}}input.FormControl-checkbox[type=checkbox]:checked:disabled{background-color:var(--color-primer-fg-disabled);border-color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}input.FormControl-checkbox[type=checkbox]:checked:disabled:before{background-color:var(--color-fg-on-emphasis)}@media (forced-colors:active){input.FormControl-checkbox[type=checkbox]:checked{background-color:canvastext;border-color:canvastext}}input.FormControl-checkbox[type=checkbox]:focus-visible{box-shadow:none;outline:2px solid var(--color-accent-fg);outline-offset:2px}input.FormControl-checkbox[type=checkbox]:indeterminate:before{-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgMWExIDEgMCAwIDEgMS0xaDhhMSAxIDAgMSAxIDAgMkgxYTEgMSAwIDAgMS0xLTFaIiBmaWxsPSIjZmZmIi8+PC9zdmc+");mask-image:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgMWExIDEgMCAwIDEgMS0xaDhhMSAxIDAgMSAxIDAgMkgxYTEgMSAwIDAgMS0xLTFaIiBmaWxsPSIjZmZmIi8+PC9zdmc+");visibility:visible}input[type=radio].FormControl-radio{background-color:var(--color-canvas-default);border:var(--primer-borderWidth-thin,1px) solid var(--color-border-default);color:var(--color-fg-default)}input.FormControl-radio[type=radio][disabled]{-webkit-text-fill-color:var(--color-primer-fg-disabled);background-color:var(--color-input-disabled-bg);border-color:var(--color-border-default);color:var(--color-primer-fg-disabled);cursor:not-allowed;opacity:1}input.FormControl-radio[type=radio][invalid]:not(:focus){border-color:var(--color-danger-emphasis)}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus:not(:focus-visible){border-color:#0000;border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px #0000 var(--color-accent-fg);outline:none}input.FormControl-radio[type=radio]:not([type=checkbox],[type=radio]):focus-visible{border-color:var(--color-accent-fg);box-shadow:inset 0 0 0 1px var(--color-accent-fg);outline:none}input[type=radio].FormControl-radio{-webkit-appearance:none;appearance:none;border-color:var(--color-neutral-emphasis);border-radius:var(--primer-borderRadius-full,100vh);cursor:pointer;height:var(--base-size-16,16px);margin:.125rem 0 0;position:relative;transition:background-color,border-color 80ms cubic-bezier(.33,1,.68,1);width:var(--base-size-16,16px)}input.FormControl-radio[type=radio]:after{content:"";height:100%;left:50%;min-height:var(--primer-control-medium-size,32px) var(--primer-control-medium-size,32px);position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}input.FormControl-radio[type=radio]:checked{border-color:var(--color-accent-fg);border-width:var(--base-size-4,4px)}input.FormControl-radio[type=radio]:checked:disabled{border-color:var(--color-primer-fg-disabled);cursor:not-allowed}input.FormControl-radio[type=radio]:focus-visible{box-shadow:none;outline:2px solid var(--color-accent-fg);outline-offset:2px}@media (forced-colors:active){input[type=radio].FormControl-radio{background-color:canvastext;border-color:canvastext}}@keyframes checkmarkIn{0%{clip-path:inset(var(--base-size-16,16px) 0 0 0)}to{clip-path:inset(0 0 0 0)}}@keyframes checkmarkOut{0%{clip-path:inset(0 0 0 0)}to{clip-path:inset(var(--base-size-16,16px) 0 0 0)}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"alpha/text_field","selectors":[".FormControl",".FormControl--fullWidth",".FormControl-label",".FormControl-caption",".FormControl-inlineValidation",".FormControl-inlineValidation p",".FormControl-input",".FormControl-select",".FormControl-textarea",".FormControl-input[disabled]",".FormControl-select[disabled]",".FormControl-textarea[disabled]",".FormControl-input[invalid]:not(:focus)",".FormControl-select[invalid]:not(:focus)",".FormControl-textarea[invalid]:not(:focus)",".FormControl-input:not([type=checkbox]","[type=radio]):focus",".FormControl-select:not([type=checkbox]",".FormControl-textarea:not([type=checkbox]","[type=radio]):focus:not(:focus-visible)","[type=radio]):focus-visible",".FormControl-input[disabled]::placeholder",".FormControl-select[disabled]::placeholder",".FormControl-textarea[disabled]::placeholder",".FormControl-input[readonly]",".FormControl-select[readonly]",".FormControl-textarea[readonly]",".FormControl-input::placeholder",".FormControl-select::placeholder",".FormControl-textarea::placeholder",".FormControl-input.FormControl-small",".FormControl-select.FormControl-small",".FormControl-textarea.FormControl-small",".FormControl-input.FormControl-medium",".FormControl-select.FormControl-medium",".FormControl-textarea.FormControl-medium",".FormControl-input.FormControl-large",".FormControl-select.FormControl-large",".FormControl-textarea.FormControl-large",".FormControl-input.FormControl-inset",".FormControl-select.FormControl-inset",".FormControl-textarea.FormControl-inset",".FormControl-input.FormControl-inset:focus",".FormControl-input.FormControl-inset:focus-visible",".FormControl-select.FormControl-inset:focus",".FormControl-select.FormControl-inset:focus-visible",".FormControl-textarea.FormControl-inset:focus",".FormControl-textarea.FormControl-inset:focus-visible",".FormControl-input.FormControl-monospace",".FormControl-select.FormControl-monospace",".FormControl-textarea.FormControl-monospace",".FormControl-input.FormControl-error",".FormControl-select.FormControl-error",".FormControl-textarea.FormControl-error",".FormControl-input.FormControl-success",".FormControl-select.FormControl-success",".FormControl-textarea.FormControl-success",".FormControl-input.FormControl-warning",".FormControl-select.FormControl-warning",".FormControl-textarea.FormControl-warning",".FormControl-input-wrap",".FormControl-input-wrap .FormControl-input-leadingVisualWrap",".FormControl-input-wrap .FormControl-input-leadingVisualWrap .FormControl-input-leadingVisual",".FormControl-input-wrap .FormControl-input-trailingAction",".FormControl-input-wrap .FormControl-input-trailingAction svg",".FormControl-input-wrap .FormControl-input-trailingAction[disabled]",".FormControl-input-wrap .FormControl-input-trailingAction:hover",".FormControl-input-wrap .FormControl-input-trailingAction:active",".FormControl-input-wrap .FormControl-input-trailingAction.FormControl-input-trailingAction--divider:before",".FormControl-input-wrap .FormControl-input-trailingAction:after",".FormControl-input-wrap.FormControl-input-wrap--leadingVisual .FormControl-input",".FormControl-input-wrap.FormControl-input-wrap--trailingAction .FormControl-input",".FormControl-input-wrap.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input",".FormControl-input-wrap.FormControl-small .FormControl-input-leadingVisualWrap",".FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-small",".FormControl-input-wrap.FormControl-small.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-small",".FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction",".FormControl-input-wrap.FormControl-small .FormControl-input-trailingAction:before",".FormControl-input-wrap.FormControl-large .FormControl-input-leadingVisualWrap",".FormControl-input-wrap.FormControl-large.FormControl-input-wrap--leadingVisual .FormControl-input.FormControl-large",".FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction .FormControl-input.FormControl-large",".FormControl-input-wrap.FormControl-large.FormControl-input-wrap--trailingAction.FormControl-input-wrap-trailingAction--divider .FormControl-input.FormControl-large",".FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction",".FormControl-input-wrap.FormControl-large .FormControl-input-trailingAction:before",".FormControl-select-wrap",".FormControl-select-wrap:after",".FormControl-select-wrap .FormControl-select",".FormControl-checkbox-wrap",".FormControl-radio-wrap",".FormControl-checkbox-wrap .FormControl-checkbox-labelWrap",".FormControl-checkbox-wrap .FormControl-radio-labelWrap",".FormControl-radio-wrap .FormControl-checkbox-labelWrap",".FormControl-radio-wrap .FormControl-radio-labelWrap",".FormControl-checkbox-wrap .FormControl-label",".FormControl-radio-wrap .FormControl-label","input[type=checkbox].FormControl-checkbox","input.FormControl-checkbox[type=checkbox][disabled]","input.FormControl-checkbox[type=checkbox][invalid]:not(:focus)","input.FormControl-checkbox[type=checkbox]:not([type=checkbox]","input.FormControl-checkbox[type=checkbox]:before","input.FormControl-checkbox[type=checkbox]:after","input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-checkbox-labelWrap .FormControl-label","input.FormControl-checkbox[type=checkbox][disabled]~.FormControl-radio-labelWrap .FormControl-label","input.FormControl-checkbox[type=checkbox]:checked","input.FormControl-checkbox[type=checkbox]:checked:before","input.FormControl-checkbox[type=checkbox]:checked:disabled","input.FormControl-checkbox[type=checkbox]:checked:disabled:before","input.FormControl-checkbox[type=checkbox]:focus-visible","input.FormControl-checkbox[type=checkbox]:indeterminate:before","input[type=radio].FormControl-radio","input.FormControl-radio[type=radio][disabled]","input.FormControl-radio[type=radio][invalid]:not(:focus)","input.FormControl-radio[type=radio]:not([type=checkbox]","input.FormControl-radio[type=radio]:after","input.FormControl-radio[type=radio]:checked","input.FormControl-radio[type=radio]:checked:disabled","input.FormControl-radio[type=radio]:focus-visible","0%","to"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["text_field.pcss","../../../../lib/postcss_mixins/focusBoxShadowInset.pcss","<no source>","../../../../lib/postcss_mixins/focusOutline.pcss"],"names":[],"mappings":"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","file":"text_field.css","sourcesContent":["/* FormControl */\n\n/* groups label, field, caption and inline error message */\n.FormControl {\n display: inline-flex;\n flex-direction: column;\n gap: var(--base-size-4, 4px);\n}\n\n/* fill container */\n.FormControl--fullWidth {\n display: flex;\n}\n\n/* <label> */\n.FormControl-label {\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-semibold, 600);\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n color: var(--color-fg-default);\n user-select: none;\n}\n\n/* optional caption */\n.FormControl-caption {\n margin-bottom: 0;\n font-size: var(--primer-text-caption-size, 12px);\n font-weight: var(--primer-text-caption-weight, 400);\n line-height: var(--primer-text-caption-lineHeight, calc(16 / 12));\n color: var(--color-fg-muted);\n}\n\n/* inline validation message */\n.FormControl-inlineValidation {\n display: flex;\n font-size: var(--primer-text-caption-size, 12px);\n font-weight: var(--base-text-weight-semibold, 600);\n color: var(--color-danger-fg);\n fill: var(--color-danger-fg);\n flex-direction: row;\n align-items: center;\n gap: var(--base-size-4, 4px);\n\n & p {\n margin-bottom: 0;\n }\n}\n\n/* shared among all form control components (input, select, textarea, checkbox, radio) */\n@define-mixin Field {\n color: var(--color-fg-default);\n background-color: var(--color-canvas-default);\n border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);\n\n &[disabled] {\n color: var(--color-primer-fg-disabled);\n cursor: not-allowed;\n background-color: var(--color-input-disabled-bg);\n border-color: var(--color-border-default);\n opacity: 1;\n -webkit-text-fill-color: var(--color-primer-fg-disabled);\n }\n\n &:not(:focus)[invalid] {\n border-color: var(--color-danger-emphasis);\n }\n\n &:not([type='checkbox'], [type='radio']):focus {\n @mixin focusBoxShadowInset;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n border-color: transparent;\n\n @mixin focusBoxShadowInset 1px transparent;\n }\n }\n\n /* default focus state */\n &:not([type='checkbox'], [type='radio']):focus-visible {\n @mixin focusBoxShadowInset;\n }\n}\n\n/* TextInput structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** │ ├─ .FormControl-input-wrap\n** │ │ ├─ .FormControl-input-leadingVisualWrap\n** │ │ │ ├─ .FormControl-input-leadingVisual\n** │ │ ├─ .FormControl-input\n** │ │ ├─ .FormControl-input-trailingAction\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n/* // Select structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** │ ├─ .FormControl-select-wrap\n** │ │ ├─ .FormControl-select\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n/* // Textarea structure\n** ===================\n**\n** .FormControl\n** ├─ .FormControl-label\n** ├─ .FormControl-textarea\n** ├─ .FormControl-inlineValidation\n** ├─ .FormControl-caption */\n\n.FormControl-input,\n.FormControl-select,\n.FormControl-textarea {\n @mixin Field;\n\n width: 100%;\n font-size: var(--primer-text-body-size-medium, 14px);\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n border-radius: var(--primer-borderRadius-medium, 6px);\n transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);\n transition-property: color, background-color, box-shadow, border-color;\n padding-inline: var(--primer-control-medium-paddingInline-condensed, 8px);\n padding-block: calc(var(--primer-control-medium-paddingBlock, 6px) - var(--primer-borderWidth-thin, 1px));\n\n &[disabled] {\n &::placeholder {\n color: var(--color-primer-fg-disabled);\n }\n }\n\n &[readonly] {\n background-color: var(--color-input-disabled-bg);\n }\n\n &::placeholder {\n color: var(--color-fg-subtle);\n opacity: 1;\n }\n\n /* sizes */\n\n &.FormControl-small {\n height: var(--primer-control-small-size, 28px);\n padding-inline: var(--primer-control-small-paddingInline-normal, 8px);\n padding-block: var(--primer-control-small-paddingBlock, 4px);\n font-size: var(--primer-text-body-size-small, 12px);\n }\n\n &.FormControl-medium {\n height: var(--primer-control-medium-size, 32px);\n }\n\n &.FormControl-large {\n height: var(--primer-control-large-size, 40px);\n padding-inline: var(--primer-control-large-paddingInline-normal, 12px);\n padding-block: var(--primer-control-large-paddingBlock, 10px);\n }\n\n /* variants */\n\n &.FormControl-inset {\n background-color: var(--color-canvas-inset);\n\n &:focus-visible,\n &:focus {\n background-color: var(--color-canvas-default);\n }\n }\n\n &.FormControl-monospace {\n font-family:\n var(\n --primer-fontStack-monospace,\n 'ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace'\n );\n }\n\n /* validation states */\n\n &.FormControl-error {\n border-color: var(--color-danger-emphasis);\n }\n\n &.FormControl-success {\n border-color: var(--color-success-emphasis);\n }\n\n &.FormControl-warning {\n border-color: var(--color-attention-emphasis);\n }\n}\n\n/* positioning for leading/trailing items for TextInput */\n.FormControl-input-wrap {\n position: relative;\n display: grid;\n\n & .FormControl-input-leadingVisualWrap {\n position: absolute;\n top: var(--base-size-8, 8px);\n left: var(--base-size-8, 8px);\n display: block;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n color: var(--color-fg-muted);\n pointer-events: none;\n\n /* octicon */\n & .FormControl-input-leadingVisual {\n display: block;\n user-select: none;\n }\n }\n\n /* TODO: replace with new Button component */\n & .FormControl-input-trailingAction {\n position: absolute;\n top: var(--base-size-4, 4px);\n right: var(--base-size-4, 4px);\n z-index: 4;\n display: grid;\n width: var(--primer-control-xsmall-size, 24px);\n height: var(--primer-control-xsmall-size, 24px);\n padding: 0;\n color: var(--color-fg-muted);\n cursor: pointer;\n background: transparent;\n border: 0;\n border-radius: var(--primer-borderRadius-small);\n transition: 0.2s cubic-bezier(0.3, 0, 0.5, 1);\n transition-property: color, background-color, border-color;\n align-items: center;\n justify-content: center;\n\n & svg {\n user-select: none;\n }\n\n &[disabled] {\n color: var(--color-primer-fg-disabled);\n pointer-events: none;\n }\n\n &:hover {\n background: var(--color-action-list-item-default-hover-bg);\n }\n\n &:active {\n background: var(--color-action-list-item-default-active-bg);\n }\n\n /* show vertical divider line between field and button */\n &.FormControl-input-trailingAction--divider {\n &::before {\n position: absolute;\n top: calc((var(--primer-control-xsmall-size) - var(--base-size-16)) / 2);\n left: calc(var(--base-size-4, 4px) * -1);\n display: block;\n width: var(--primer-borderWidth-thin);\n height: var(--base-size-16);\n content: '';\n background: var(--color-border-default);\n }\n }\n\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n\n @media (pointer: coarse) {\n min-width: var(--primer-control-minTarget-coarse, 44px);\n min-height: var(--primer-control-minTarget-coarse, 44px);\n }\n }\n }\n\n /* if leadingVisual is present */\n\n /*\n\t┌──32px──┬────────────────────┐\n\t╎ ┌───┐ ┌────────────────┐ ╎\n\t╎ 16px 16px ╎\n\t╎ └───┘ └────────────────┘ ╎\n\t└───────8px───────────────────┘\n\t*/\n\n &.FormControl-input-wrap--leadingVisual {\n & .FormControl-input {\n padding-inline-start:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px)\n ); /* 32px */\n }\n }\n\n /*\n\t┌──────────────────┬──32px──┐\n\t╎ ┌──────────────┐ ┌────┐ ╎\n\t╎ 24px 24px ╎\n\t╎ └──────────────┘ └────┘ ╎\n\t└──────────────────┴────────┘\n */\n\n /* if trailingAction is present */\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input {\n padding-inline-end:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px)\n ); /* 32px */\n }\n\n /*\n\t\t32px + 1px border\n\t\t┌──────────────────┬──33px──┐\n\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t╎ 24px 24px ╎\n\t\t╎ └──────────────┘ └────┘ ╎\n\t\t└──────────────────┴────────┘\n\t\t*/\n\n /* if trailingAction divider is present, add 1px padding to accomodate input field text\n ** can be refactored to has(.FormControl-input-trailingAction--divider) */\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input {\n padding-inline-end:\n calc(\n var(--primer-control-medium-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-medium-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 33px */\n }\n }\n }\n\n /* size modifications can be refactored with :has() - FormControl-input-wrap:has(.FormControl-large)\n // sizes */\n &.FormControl-small {\n & .FormControl-input-leadingVisualWrap {\n top: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n left: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n }\n\n /*\n ┌──────────────────┬──28px──┐\n ╎ ┌──────────────┐ ┌────┐ ╎\n ╎ 20px 20px ╎\n ╎ └──────────────┘ └────┘ ╎\n └──────────────────┴────────┘\n */\n\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input.FormControl-small {\n padding-inline-end:\n calc(\n var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-small-gap, 8px)\n ); /* 28px */\n }\n\n /*\n\t\t\t28px + 1px border\n\t\t\t┌──────────────────┬──29px──┐\n\t\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t\t╎ 20px 20px ╎\n\t\t\t╎ └──────────────┘ └────┘ ╎\n\t\t\t└──────────────────┴────────┘\n\t\t\t*/\n\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input.FormControl-small {\n padding-inline-end:\n calc(\n var(--primer-control-small-paddingInline-condensed, 8px) + var(--base-size-16, 16px) +\n var(--primer-control-small-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 29px */\n }\n }\n }\n\n & .FormControl-input-trailingAction {\n width: calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));\n height: calc(var(--primer-control-small-size, 28px) - var(--base-size-8, 8px));\n\n &::before {\n top: calc((var(--primer-control-xsmall-size) - var(--base-size-16)) / 4); /* 2px */\n }\n }\n }\n\n &.FormControl-large {\n & .FormControl-input-leadingVisualWrap {\n top: var(--primer-control-medium-paddingInline-normal, 12px);\n left: var(--primer-control-medium-paddingInline-normal, 12px);\n }\n\n /*\n ┌──36px──┬───12px padding──────┐\n ╎ ┌───┐ ┌────────────────┐ ╎\n ╎ 16px 16px ╎\n ╎ └───┘ └────────────────┘ ╎\n └12px───8px───────────────────┘\n */\n\n &.FormControl-input-wrap--leadingVisual {\n & .FormControl-input.FormControl-large {\n padding-inline-start:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px)\n ); /* 36px */\n }\n }\n\n /*\n ┌──────────────────┬──36px──┐\n ╎ ┌──────────────┐ ┌────┐ ╎\n ╎ 28px 28px ╎\n ╎ └──────────────┘ └────┘ ╎\n └──────────────────┴────────┘\n */\n\n &.FormControl-input-wrap--trailingAction {\n & .FormControl-input.FormControl-large {\n padding-inline-end:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px)\n ); /* 36px */\n }\n\n /*\n\t\t\t┌──────────────────┬──37px──┐\n\t\t\t╎ ┌──────────────┐ ┌────┐ ╎\n\t\t\t╎ 28px 28px ╎\n\t\t\t╎ └──────────────┘ └────┘ ╎\n\t\t\t└──────────────────┴────────┘\n\t\t\t*/\n\n &.FormControl-input-wrap-trailingAction--divider {\n & .FormControl-input.FormControl-large {\n padding-inline-end:\n calc(\n var(--primer-control-large-paddingInline-normal, 12px) + var(--base-size-16, 16px) +\n var(--primer-control-large-gap, 8px) + var(--primer-borderWidth-thin, 1px)\n ); /* 37px */\n }\n }\n }\n\n & .FormControl-input-trailingAction {\n top: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n right: calc(var(--primer-control-medium-paddingInline-condensed, 8px) - 0.125rem); /* 6px */\n width: var(--primer-control-small-size, 28px);\n height: var(--primer-control-small-size, 28px);\n\n &::before {\n top: unset;\n height: var(--base-size-20);\n }\n }\n }\n}\n\n.FormControl-select-wrap {\n display: grid;\n grid-template-columns: minmax(0, auto) var(--base-size-16, 16px);\n\n /* mask allows for background-color to respect themes */\n &::after {\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n padding-right: var(--base-size-4, 4px);\n pointer-events: none;\n content: '';\n background-color: var(--color-fg-muted);\n mask: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0iIzU4NjA2OSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNC40MjcgOS40MjdsMy4zOTYgMy4zOTZhLjI1MS4yNTEgMCAwMC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwMDExLjM5NiA5SDQuNjA0YS4yNS4yNSAwIDAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3TDcuODIgMy4wNzJhLjI1LjI1IDAgMDEuMzU0IDBMMTEuNTcgNi40N2EuMjUuMjUgMCAwMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMDEtLjE3Ny0uNDI3eiIgLz48L3N2Zz4=');\n mask-size: contain;\n mask-repeat: no-repeat;\n grid-column: 2;\n grid-row: 1;\n place-self: center end;\n }\n\n /* spans entire grid below mask */\n & .FormControl-select {\n grid-column: 1/-1;\n grid-row: 1;\n appearance: none;\n padding-right: var(--base-size-20, 20px);\n }\n}\n\n/* checkbox + radio specific styles */\n\n/* // Checkbox + Radio structure\n** ===================\n**\n** .FormControl-radio-wrap\n** ├─ .FormControl-radio\n** ├─ .FormControl-radio-labelWrap\n** │ ├─ .FormControl-label\n** │ ├─ .FormControl-caption */\n\n.FormControl-checkbox-wrap,\n.FormControl-radio-wrap {\n display: inline-grid;\n grid-template-columns: min-content auto;\n gap: var(--base-size-8, 8px);\n\n & .FormControl-checkbox-labelWrap,\n & .FormControl-radio-labelWrap {\n display: flex;\n flex-direction: column;\n gap: var(--base-size-4, 4px);\n }\n\n & .FormControl-label {\n cursor: pointer;\n }\n}\n\n/* these selectors are temporary to override base.scss\n** once Field styles are widely adopted, we can adjust this and the global base styles */\ninput[type='checkbox'].FormControl-checkbox {\n @mixin Field;\n\n position: relative;\n display: grid;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n margin: 0;\n margin-top: 0.125rem; /* 2px to center align with label (20px line-height) */\n cursor: pointer;\n border-color: var(--color-neutral-emphasis);\n border-radius: var(--primer-borderRadius-small, 3px);\n transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n appearance: none;\n place-content: center;\n\n &::before {\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n visibility: hidden;\n content: '';\n background-color: var(--color-fg-on-emphasis);\n transition: visibility 0s linear 230ms;\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n\n /* octicon checkmark image */\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTEuNzgwMyAwLjIxOTYyNUMxMS45MjEgMC4zNjA0MjcgMTIgMC41NTEzMDUgMTIgMC43NTAzMTNDMTIgMC45NDkzMjEgMTEuOTIxIDEuMTQwMTkgMTEuNzgwMyAxLjI4MUw0LjUxODYgOC41NDA0MkM0LjM3Nzc1IDguNjgxIDQuMTg2ODIgOC43NiAzLjk4Nzc0IDguNzZDMy43ODg2NyA4Ljc2IDMuNTk3NzMgOC42ODEgMy40NTY4OSA4LjU0MDQyTDAuMjAxNjIyIDUuMjg2MkMwLjA2ODkyNzcgNS4xNDM4MyAtMC4wMDMzMDkwNSA0Ljk1NTU1IDAuMDAwMTE2NDkzIDQuNzYwOThDMC4wMDM1NTIwNSA0LjU2NjQzIDAuMDgyMzg5NCA0LjM4MDgxIDAuMjIwMDMyIDQuMjQzMjFDMC4zNTc2NjUgNC4xMDU2MiAwLjU0MzM1NSA0LjAyNjgxIDAuNzM3OTcgNC4wMjMzOEMwLjkzMjU4NCA0LjAxOTk0IDEuMTIwOTMgNC4wOTIxNyAxLjI2MzM0IDQuMjI0ODJMMy45ODc3NCA2Ljk0ODM1TDEwLjcxODYgMC4yMTk2MjVDMTAuODU5NSAwLjA3ODk5MjMgMTEuMDUwNCAwIDExLjI0OTUgMEMxMS40NDg1IDAgMTEuNjM5NSAwLjA3ODk5MjMgMTEuNzgwMyAwLjIxOTYyNVoiIGZpbGw9IndoaXRlIi8+Cjwvc3ZnPgo=');\n mask-size: 75%;\n mask-repeat: no-repeat;\n mask-position: center;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: checkmarkOut 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards; /* slightly snappier animation out */\n }\n }\n\n /* extend touch target */\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n }\n\n &[disabled] {\n & ~ .FormControl-checkbox-labelWrap,\n & ~ .FormControl-radio-labelWrap {\n & .FormControl-label {\n color: var(--color-primer-fg-disabled);\n cursor: not-allowed;\n }\n }\n }\n\n &:checked {\n background: var(--color-accent-fg);\n border-color: var(--color-accent-fg);\n transition: background-color, border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; /* unchecked -> checked */\n\n &::before {\n visibility: visible;\n transition: visibility 0s linear 0s;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;\n }\n }\n\n &:disabled {\n cursor: not-allowed;\n background-color: var(--color-primer-fg-disabled);\n border-color: var(--color-primer-fg-disabled);\n opacity: 1;\n\n &::before {\n background-color: var(--color-fg-on-emphasis);\n }\n }\n\n /* Windows High Contrast mode */\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n &:indeterminate {\n &::before {\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgdmlld0JveD0iMCAwIDEwIDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAxQzAgMC40NDc3MTUgMC40NDc3MTUgMCAxIDBIOUM5LjU1MjI5IDAgMTAgMC40NDc3MTUgMTAgMUMxMCAxLjU1MjI4IDkuNTUyMjkgMiA5IDJIMUMwLjQ0NzcxNSAyIDAgMS41NTIyOCAwIDFaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');\n visibility: visible;\n }\n }\n}\n\ninput[type='radio'].FormControl-radio {\n @mixin Field;\n\n position: relative;\n width: var(--base-size-16, 16px);\n height: var(--base-size-16, 16px);\n margin: 0;\n margin-top: 0.125rem; /* 2px to center align with label (20px line-height) */\n cursor: pointer;\n border-color: var(--color-neutral-emphasis);\n border-radius: var(--primer-borderRadius-full, 100vh);\n transition: background-color, border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); /* checked -> unchecked - add 120ms delay to fully see animation-out */\n appearance: none;\n\n &::after {\n @mixin minTouchTarget var(--primer-control-medium-size, 32px) var(--primer-control-medium-size, 32px);\n }\n\n &:checked {\n border-color: var(--color-accent-fg);\n border-width: var(--base-size-4, 4px);\n\n &:disabled {\n cursor: not-allowed;\n border-color: var(--color-primer-fg-disabled);\n }\n }\n\n &:focus-visible {\n @mixin focusOutline 2px;\n }\n\n /* Windows High Contrast mode */\n @media (forced-colors: active) {\n background-color: canvastext;\n border-color: canvastext;\n }\n}\n\n@keyframes checkmarkIn {\n from {\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n }\n\n to {\n clip-path: inset(0 0 0 0);\n }\n}\n\n@keyframes checkmarkOut {\n from {\n clip-path: inset(0 0 0 0);\n }\n\n to {\n clip-path: inset(var(--base-size-16, 16px) 0 0 0);\n }\n}\n","/* inset box-shadow for form controls */\n@define-mixin focusBoxShadowInset $outlineWidth: 1px, $outlineColor: var(--color-accent-fg) {\n border-color: var(--color-accent-fg);\n outline: none;\n box-shadow: inset 0 0 0 $outlineWidth $outlineColor;\n}\n",null,"@define-mixin focusOutline $outlineOffset: -2px, $outlineColor: var(--color-accent-fg) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: none;\n}\n"]}
|