@cratis/components 4.10.4 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1710 @@
1
+ @layer cratis-components {
2
+ /* @cratis/components/CommandForm/styles — requires @cratis/components/styles/base. Areas: CommandForm, Common, Dropdown, Notifications. */
3
+ /* ── ./CommandForm/fields/Fields.css ─────────────────────────────────────── */
4
+ /* Copyright (c) Cratis. All rights reserved. */
5
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
6
+
7
+ .cratis-field-sr-only {
8
+ position: absolute;
9
+ width: 1px;
10
+ height: 1px;
11
+ padding: 0;
12
+ margin: -1px;
13
+ overflow: hidden;
14
+ clip: rect(0, 0, 0, 0);
15
+ white-space: nowrap;
16
+ border: 0;
17
+ }
18
+
19
+ .cratis-field-input {
20
+ box-sizing: border-box;
21
+ min-height: var(--cratis-control-height);
22
+ padding: 0.625rem 0.75rem;
23
+ border: 1px solid var(--cratis-control-border);
24
+ border-radius: var(--cratis-border-radius);
25
+ background: var(--cratis-control-background);
26
+ color: var(--cratis-text-color);
27
+ font: inherit;
28
+ box-shadow: var(--cratis-shadow-subtle);
29
+ }
30
+ .cratis-field-input::placeholder {
31
+ color: var(--cratis-text-color-secondary);
32
+ }
33
+ .cratis-field-input:focus-visible {
34
+ outline: none;
35
+ border-color: var(--cratis-primary-color);
36
+ box-shadow: var(--cratis-focus-ring);
37
+ }
38
+ .cratis-field-input:disabled {
39
+ cursor: not-allowed;
40
+ opacity: var(--cratis-disabled-opacity);
41
+ }
42
+ .cratis-field-input[data-invalid='true'],
43
+ .cratis-field-input[aria-invalid='true'] {
44
+ border-color: var(--cratis-red-500);
45
+ }
46
+ .cratis-field-textarea {
47
+ resize: vertical;
48
+ }
49
+ .cratis-number-field,
50
+ .cratis-password-field {
51
+ position: relative;
52
+ display: flex;
53
+ }
54
+ .cratis-password-field .cratis-field-input {
55
+ padding-inline-end: 2.75rem;
56
+ }
57
+ .cratis-password-field__toggle {
58
+ position: absolute;
59
+ inset-inline-end: 0.35rem;
60
+ top: 50%;
61
+ display: inline-flex;
62
+ width: 2rem;
63
+ height: 2rem;
64
+ padding: 0;
65
+ align-items: center;
66
+ justify-content: center;
67
+ transform: translateY(-50%);
68
+ border: 0;
69
+ border-radius: 50%;
70
+ background: transparent;
71
+ color: var(--cratis-text-color-secondary);
72
+ cursor: pointer;
73
+ }
74
+ .cratis-password-field__toggle:hover {
75
+ background: var(--cratis-surface-hover);
76
+ }
77
+ .cratis-password-field__toggle:focus-visible {
78
+ outline: none;
79
+ box-shadow: var(--cratis-focus-ring);
80
+ }
81
+
82
+ .cratis-choice-field {
83
+ position: relative;
84
+ display: inline-flex;
85
+ align-items: center;
86
+ gap: 0.5rem;
87
+ cursor: pointer;
88
+ }
89
+ .cratis-choice-field:has(.cratis-choice-field__native:disabled) {
90
+ cursor: not-allowed;
91
+ opacity: var(--cratis-disabled-opacity);
92
+ }
93
+ .cratis-choice-field__native {
94
+ position: absolute;
95
+ width: 1px;
96
+ height: 1px;
97
+ overflow: hidden;
98
+ opacity: 0;
99
+ }
100
+ .cratis-checkbox__box {
101
+ display: inline-flex;
102
+ width: 1.25rem;
103
+ height: 1.25rem;
104
+ align-items: center;
105
+ justify-content: center;
106
+ border: 1px solid var(--cratis-control-border);
107
+ border-radius: var(--cratis-border-radius);
108
+ background: var(--cratis-control-background);
109
+ }
110
+ .cratis-checkbox__indicator {
111
+ opacity: 0;
112
+ color: var(--cratis-primary-color-text);
113
+ font-size: 0.85rem;
114
+ }
115
+ .cratis-choice-field__native:checked + .cratis-checkbox__box {
116
+ border-color: var(--cratis-primary-color);
117
+ background: var(--cratis-primary-color);
118
+ }
119
+ .cratis-choice-field__native:checked + .cratis-checkbox__box .cratis-checkbox__indicator {
120
+ opacity: 1;
121
+ }
122
+ .cratis-choice-field__native:focus-visible
123
+ + :is(.cratis-checkbox__box, .cratis-switch__control) {
124
+ box-shadow: var(--cratis-focus-ring);
125
+ }
126
+ .cratis-choice-field[data-invalid='true']
127
+ :is(.cratis-checkbox__box, .cratis-switch__control) {
128
+ border-color: var(--cratis-red-500);
129
+ }
130
+
131
+ .cratis-switch__control {
132
+ display: inline-flex;
133
+ width: 2.5rem;
134
+ height: 1.4rem;
135
+ padding: 0.15rem;
136
+ align-items: center;
137
+ border: 1px solid var(--cratis-control-border);
138
+ border-radius: 999px;
139
+ background: var(--cratis-surface-100);
140
+ transition: background-color 140ms ease;
141
+ }
142
+ .cratis-switch__handle {
143
+ width: 1rem;
144
+ height: 1rem;
145
+ border-radius: 50%;
146
+ background: var(--cratis-control-background);
147
+ box-shadow: var(--cratis-shadow-subtle);
148
+ transition: transform 140ms ease;
149
+ }
150
+ .cratis-choice-field__native:checked + .cratis-switch__control {
151
+ border-color: var(--cratis-primary-color);
152
+ background: var(--cratis-primary-color);
153
+ }
154
+ .cratis-choice-field__native:checked + .cratis-switch__control .cratis-switch__handle {
155
+ transform: translateX(1.05rem);
156
+ }
157
+
158
+ .cratis-radio__box {
159
+ display: inline-flex;
160
+ width: 1.25rem;
161
+ height: 1.25rem;
162
+ align-items: center;
163
+ justify-content: center;
164
+ border: 1px solid var(--cratis-control-border);
165
+ border-radius: 50%;
166
+ background: var(--cratis-control-background);
167
+ }
168
+ .cratis-radio__indicator {
169
+ width: 0.65rem;
170
+ height: 0.65rem;
171
+ border-radius: 50%;
172
+ background: var(--cratis-primary-color);
173
+ opacity: 0;
174
+ }
175
+ .cratis-choice-field__native:checked + .cratis-radio__box {
176
+ border-color: var(--cratis-primary-color);
177
+ }
178
+ .cratis-choice-field__native:checked + .cratis-radio__box .cratis-radio__indicator {
179
+ opacity: 1;
180
+ }
181
+ .cratis-radio-group {
182
+ display: flex;
183
+ }
184
+ .cratis-radio-group--vertical {
185
+ flex-direction: column;
186
+ gap: 0.5rem;
187
+ }
188
+ .cratis-radio-group--horizontal {
189
+ flex-direction: row;
190
+ flex-wrap: wrap;
191
+ gap: 1rem;
192
+ }
193
+
194
+ .cratis-slider-field {
195
+ display: grid;
196
+ grid-template-columns: 1fr auto;
197
+ align-items: center;
198
+ gap: 0.75rem;
199
+ }
200
+ .cratis-slider-field__input {
201
+ width: 100%;
202
+ accent-color: var(--cratis-primary-color);
203
+ }
204
+ .cratis-slider-field__input:focus-visible {
205
+ outline: none;
206
+ box-shadow: var(--cratis-focus-ring);
207
+ }
208
+ .cratis-slider-field__value {
209
+ min-width: 2.5rem;
210
+ text-align: end;
211
+ font-weight: 600;
212
+ font-variant-numeric: tabular-nums;
213
+ }
214
+
215
+ .cratis-chips-field {
216
+ display: flex;
217
+ box-sizing: border-box;
218
+ min-height: var(--cratis-control-height);
219
+ padding: 0.4rem;
220
+ align-items: center;
221
+ flex-wrap: wrap;
222
+ gap: 0.35rem;
223
+ border: 1px solid var(--cratis-control-border);
224
+ border-radius: var(--cratis-border-radius);
225
+ background: var(--cratis-control-background);
226
+ }
227
+ .cratis-chips-field:focus-within {
228
+ border-color: var(--cratis-primary-color);
229
+ box-shadow: var(--cratis-focus-ring);
230
+ }
231
+ .cratis-chips-field[data-invalid='true'] {
232
+ border-color: var(--cratis-red-500);
233
+ }
234
+ .cratis-chips-field__item {
235
+ display: inline-flex;
236
+ padding: 0.3rem 0.45rem;
237
+ align-items: center;
238
+ gap: 0.3rem;
239
+ border-radius: 999px;
240
+ background: var(--cratis-surface-100);
241
+ }
242
+ .cratis-chips-field__remove {
243
+ border: 0;
244
+ background: transparent;
245
+ color: inherit;
246
+ cursor: pointer;
247
+ }
248
+ .cratis-chips-field__remove:focus-visible {
249
+ outline: none;
250
+ border-radius: 50%;
251
+ box-shadow: var(--cratis-focus-ring);
252
+ }
253
+ .cratis-chips-field__input {
254
+ min-width: 7rem;
255
+ padding: 0.3rem;
256
+ flex: 1;
257
+ border: 0;
258
+ outline: none;
259
+ background: transparent;
260
+ color: var(--cratis-text-color);
261
+ font: inherit;
262
+ }
263
+
264
+ .cratis-color-field {
265
+ display: inline-flex;
266
+ align-items: center;
267
+ gap: 0.6rem;
268
+ }
269
+ .cratis-color-field__input {
270
+ width: 3rem;
271
+ height: var(--cratis-control-height);
272
+ padding: 0.2rem;
273
+ border: 1px solid var(--cratis-control-border);
274
+ border-radius: var(--cratis-border-radius);
275
+ background: var(--cratis-control-background);
276
+ }
277
+ .cratis-color-field__input:focus-visible {
278
+ outline: none;
279
+ box-shadow: var(--cratis-focus-ring);
280
+ }
281
+ .cratis-color-field__value {
282
+ font-family: ui-monospace, monospace;
283
+ }
284
+
285
+ .cratis-rating-field {
286
+ display: inline-flex;
287
+ align-items: center;
288
+ }
289
+ .cratis-rating-field__option {
290
+ position: relative;
291
+ cursor: pointer;
292
+ }
293
+ .cratis-rating-field__star {
294
+ color: var(--cratis-surface-border);
295
+ font-size: 1.4rem;
296
+ line-height: 1;
297
+ }
298
+ .cratis-rating-field__star[data-selected='true'] {
299
+ color: var(--cratis-orange-500);
300
+ }
301
+ .cratis-rating-field__option:focus-within .cratis-rating-field__star {
302
+ border-radius: 0.2rem;
303
+ box-shadow: var(--cratis-focus-ring);
304
+ }
305
+
306
+ @media (prefers-reduced-motion: reduce) {
307
+ .cratis-switch__control,
308
+ .cratis-switch__handle {
309
+ transition: none;
310
+ }
311
+ }
312
+
313
+ @media (forced-colors: active) {
314
+ .cratis-field-input,
315
+ .cratis-checkbox__box,
316
+ .cratis-switch__control {
317
+ border-color: CanvasText;
318
+ }
319
+ .cratis-choice-field__native:checked
320
+ + :is(.cratis-checkbox__box, .cratis-switch__control) {
321
+ background: Highlight;
322
+ }
323
+ }
324
+
325
+ /* ── ./Common/ActionMenubar.css ─────────────────────────────────────── */
326
+ /* Copyright (c) Cratis. All rights reserved. */
327
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
328
+
329
+ .cratis-action-menubar {
330
+ display: flex;
331
+ align-items: center;
332
+ gap: 0.25rem;
333
+ flex-wrap: wrap;
334
+ }
335
+
336
+ /* ── ./Common/Button.css ─────────────────────────────────────── */
337
+ /* Copyright (c) Cratis. All rights reserved. */
338
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
339
+
340
+ .cratis-button {
341
+ display: inline-flex;
342
+ box-sizing: border-box;
343
+ min-height: var(--cratis-control-height);
344
+ padding: 0.75rem 1.25rem;
345
+ align-items: center;
346
+ justify-content: center;
347
+ gap: 0.45rem;
348
+ border: 1px solid var(--cratis-action-background);
349
+ border-radius: var(--cratis-border-radius);
350
+ background: var(--cratis-action-background);
351
+ color: var(--cratis-action-text);
352
+ font: inherit;
353
+ font-weight: 600;
354
+ line-height: 1;
355
+ cursor: pointer;
356
+ transition:
357
+ background-color 140ms ease,
358
+ border-color 140ms ease,
359
+ color 140ms ease,
360
+ opacity 140ms ease;
361
+ }
362
+ .cratis-button:not([data-tone])[data-variant='solid']:hover:not(:disabled) {
363
+ border-color: var(--cratis-action-background-hover);
364
+ background: var(--cratis-action-background-hover);
365
+ }
366
+ .cratis-button:not([data-tone])[data-variant='solid']:active:not(:disabled) {
367
+ border-color: var(--cratis-action-background-active);
368
+ background: var(--cratis-action-background-active);
369
+ }
370
+ .cratis-button:is([data-variant='outline'], [data-variant='ghost']):hover:not(:disabled) {
371
+ background: color-mix(in srgb, currentColor 4%, transparent);
372
+ }
373
+ .cratis-button:is([data-variant='outline'], [data-variant='ghost']):active:not(
374
+ :disabled
375
+ ) {
376
+ background: color-mix(in srgb, currentColor 16%, transparent);
377
+ }
378
+ .cratis-button:focus-visible {
379
+ outline: none;
380
+ box-shadow: var(--cratis-focus-ring);
381
+ }
382
+ .cratis-button:disabled {
383
+ cursor: not-allowed;
384
+ opacity: var(--cratis-disabled-opacity);
385
+ }
386
+ .cratis-button[data-size='small'] {
387
+ min-height: var(--cratis-control-height-small);
388
+ padding: 0.5rem 0.75rem;
389
+ font-size: 0.8rem;
390
+ }
391
+ .cratis-button[data-size='large'] {
392
+ min-height: var(--cratis-control-height-large);
393
+ padding: 0.875rem 1.5rem;
394
+ font-size: 1rem;
395
+ }
396
+ .cratis-button[data-shape='pill'],
397
+ .cratis-button[data-icon-only='true'] {
398
+ border-radius: 999px;
399
+ }
400
+ .cratis-button[data-icon-only='true'] {
401
+ width: var(--cratis-control-height);
402
+ padding: 0;
403
+ }
404
+ .cratis-button[data-size='small'][data-icon-only='true'] {
405
+ width: var(--cratis-control-height-small);
406
+ }
407
+ .cratis-button[data-size='large'][data-icon-only='true'] {
408
+ width: var(--cratis-control-height-large);
409
+ }
410
+
411
+ .cratis-button[data-variant='outline'] {
412
+ border-color: currentColor;
413
+ background: transparent;
414
+ color: var(--cratis-primary-color);
415
+ }
416
+ .cratis-button[data-variant='ghost'] {
417
+ border-color: transparent;
418
+ background: transparent;
419
+ color: var(--cratis-text-color);
420
+ }
421
+ .cratis-button[data-variant='link'] {
422
+ min-height: auto;
423
+ padding: 0;
424
+ border-color: transparent;
425
+ background: transparent;
426
+ color: var(--cratis-primary-color);
427
+ text-decoration: underline;
428
+ }
429
+
430
+ .cratis-button[data-tone='neutral'] {
431
+ --cratis-button-tone: var(--cratis-text-color);
432
+ --cratis-button-fill: var(--cratis-surface-100);
433
+ --cratis-button-fill-text: var(--cratis-text-color);
434
+ }
435
+ .cratis-button[data-tone='accent'] {
436
+ --cratis-button-tone: var(--cratis-info-background);
437
+ --cratis-button-fill: var(--cratis-info-background);
438
+ --cratis-button-fill-text: var(--cratis-info-text);
439
+ }
440
+ .cratis-button[data-tone='positive'] {
441
+ --cratis-button-tone: var(--cratis-success-background);
442
+ --cratis-button-fill: var(--cratis-success-background);
443
+ --cratis-button-fill-text: var(--cratis-success-text);
444
+ }
445
+ .cratis-button[data-tone='caution'] {
446
+ --cratis-button-tone: var(--cratis-warning-background);
447
+ --cratis-button-fill: var(--cratis-warning-background);
448
+ --cratis-button-fill-text: var(--cratis-warning-text);
449
+ }
450
+ .cratis-button[data-tone='critical'] {
451
+ --cratis-button-tone: var(--cratis-danger-background);
452
+ --cratis-button-fill: var(--cratis-danger-background);
453
+ --cratis-button-fill-text: var(--cratis-danger-text);
454
+ }
455
+ .cratis-button[data-tone='accent'][data-severity='help'] {
456
+ --cratis-button-tone: var(--cratis-primary-600);
457
+ --cratis-button-fill: var(--cratis-primary-600);
458
+ --cratis-button-fill-text: var(--cratis-primary-600-text);
459
+ }
460
+ .cratis-button[data-tone='neutral'][data-severity='contrast'] {
461
+ --cratis-button-tone: var(--cratis-text-color);
462
+ --cratis-button-fill: var(--cratis-text-color);
463
+ --cratis-button-fill-text: var(--cratis-surface-0);
464
+ }
465
+ .cratis-button[data-tone][data-variant='solid'] {
466
+ border-color: var(--cratis-button-fill);
467
+ background: var(--cratis-button-fill);
468
+ color: var(--cratis-button-fill-text);
469
+ }
470
+ .cratis-button[data-tone][data-variant='solid']:hover:not(:disabled) {
471
+ border-color: color-mix(in srgb, var(--cratis-button-fill) 88%, black);
472
+ background: color-mix(in srgb, var(--cratis-button-fill) 88%, black);
473
+ }
474
+ .cratis-button[data-tone][data-variant='solid']:active:not(:disabled) {
475
+ border-color: color-mix(in srgb, var(--cratis-button-fill) 76%, black);
476
+ background: color-mix(in srgb, var(--cratis-button-fill) 76%, black);
477
+ }
478
+ .cratis-button[data-tone]:is(
479
+ [data-variant='outline'],
480
+ [data-variant='ghost'],
481
+ [data-variant='link']
482
+ ) {
483
+ color: var(--cratis-button-tone);
484
+ }
485
+
486
+ .cratis-button__icon,
487
+ .cratis-button__spinner {
488
+ display: inline-flex;
489
+ flex: 0 0 auto;
490
+ }
491
+ .cratis-button__spinner {
492
+ width: 1em;
493
+ height: 1em;
494
+ border: 2px solid currentColor;
495
+ border-right-color: transparent;
496
+ border-radius: 50%;
497
+ animation: cratis-button-spin 700ms linear infinite;
498
+ }
499
+
500
+ @keyframes cratis-button-spin {
501
+ to {
502
+ transform: rotate(360deg);
503
+ }
504
+ }
505
+
506
+ @media (prefers-reduced-motion: reduce) {
507
+ .cratis-button,
508
+ .cratis-button__spinner {
509
+ transition: none;
510
+ animation: none;
511
+ }
512
+ }
513
+
514
+ @media (forced-colors: active) {
515
+ .cratis-button {
516
+ border-color: ButtonText;
517
+ }
518
+ .cratis-button:focus-visible {
519
+ outline: 2px solid Highlight;
520
+ outline-offset: 2px;
521
+ box-shadow: none;
522
+ }
523
+ }
524
+
525
+ /* ── ./Common/ComboBox.css ─────────────────────────────────────── */
526
+ /* Copyright (c) Cratis. All rights reserved. */
527
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
528
+
529
+ .cratis-combobox {
530
+ display: inline-flex;
531
+ flex-direction: column;
532
+ min-width: 10rem;
533
+ color: var(--cratis-text-color);
534
+ }
535
+ .cratis-combobox__control {
536
+ display: flex;
537
+ min-height: var(--cratis-control-height);
538
+ border: 1px solid var(--cratis-control-border);
539
+ border-radius: var(--cratis-border-radius);
540
+ background: var(--cratis-control-background);
541
+ }
542
+ .cratis-combobox__control:focus-within {
543
+ border-color: var(--cratis-primary-color);
544
+ box-shadow: var(--cratis-focus-ring);
545
+ }
546
+ .cratis-combobox[data-invalid='true'] .cratis-combobox__control {
547
+ border-color: var(--cratis-red-500);
548
+ }
549
+ .cratis-combobox[data-disabled='true'] {
550
+ cursor: not-allowed;
551
+ opacity: var(--cratis-disabled-opacity);
552
+ }
553
+ .cratis-combobox__input,
554
+ .cratis-combobox__trigger {
555
+ border: 0;
556
+ background: transparent;
557
+ color: inherit;
558
+ font: inherit;
559
+ }
560
+ .cratis-combobox__input {
561
+ flex: 1 1 auto;
562
+ min-width: 0;
563
+ padding: 0.625rem 0.75rem;
564
+ outline: 0;
565
+ }
566
+ .cratis-combobox__trigger {
567
+ padding: 0 0.75rem;
568
+ color: var(--cratis-text-color-secondary);
569
+ }
570
+ .cratis-combobox__popover {
571
+ width: var(--trigger-width);
572
+ overflow: auto;
573
+ border: 1px solid var(--cratis-surface-border);
574
+ border-radius: var(--cratis-border-radius);
575
+ background: var(--cratis-surface-overlay);
576
+ box-shadow: var(--cratis-shadow-overlay);
577
+ }
578
+ .cratis-combobox__listbox {
579
+ max-height: 18rem;
580
+ padding: 0.25rem;
581
+ }
582
+ .cratis-combobox__option,
583
+ .cratis-combobox__action,
584
+ .cratis-combobox__message {
585
+ display: flex;
586
+ gap: 0.5rem;
587
+ padding: 0.5rem 0.75rem;
588
+ border-radius: var(--cratis-border-radius);
589
+ }
590
+ .cratis-combobox__listbox[data-option-layout='stacked'] .cratis-combobox__option {
591
+ flex-direction: column;
592
+ }
593
+ .cratis-combobox__option[data-focused],
594
+ .cratis-combobox__action[data-focused] {
595
+ background: var(--cratis-surface-hover);
596
+ }
597
+ .cratis-combobox__option[data-selected='true'] {
598
+ background: var(--cratis-highlight-bg);
599
+ color: var(--cratis-highlight-text-color);
600
+ }
601
+ .cratis-combobox__option[data-disabled='true'] {
602
+ opacity: var(--cratis-disabled-opacity);
603
+ }
604
+ .cratis-combobox__option-description,
605
+ .cratis-combobox__message,
606
+ .cratis-combobox__description {
607
+ color: var(--cratis-text-color-secondary);
608
+ }
609
+ .cratis-combobox__action {
610
+ border-top: 1px solid var(--cratis-surface-border);
611
+ color: var(--cratis-primary-color);
612
+ }
613
+ .cratis-combobox__description,
614
+ .cratis-combobox__error {
615
+ margin-top: 0.25rem;
616
+ font-size: 0.875em;
617
+ }
618
+ .cratis-combobox__error {
619
+ color: var(--cratis-red-500);
620
+ }
621
+
622
+ /* ── ./Common/Collections.css ─────────────────────────────────────── */
623
+ /* Copyright (c) Cratis. All rights reserved. */
624
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
625
+
626
+ /* Toggle group, tabs, tag group and breadcrumbs share a token vocabulary and a focus treatment, so
627
+ they share one stylesheet rather than repeating it four times in the published aggregate. */
628
+
629
+ .cratis-toggle-group,
630
+ .cratis-tabs__list,
631
+ .cratis-tag-group,
632
+ .cratis-breadcrumbs {
633
+ display: flex;
634
+ align-items: center;
635
+ color: var(--cratis-text-color);
636
+ }
637
+ .cratis-toggle-group__option:focus-visible,
638
+ .cratis-tabs__tab:focus-visible,
639
+ .cratis-tag-group__tag:focus-visible,
640
+ .cratis-tag-group__remove:focus-visible,
641
+ .cratis-tag-group__input:focus-visible,
642
+ .cratis-breadcrumbs__link:focus-visible {
643
+ outline: none;
644
+ box-shadow: var(--cratis-focus-ring);
645
+ }
646
+ .cratis-toggle-group[data-disabled],
647
+ .cratis-tabs[data-disabled] {
648
+ cursor: not-allowed;
649
+ opacity: var(--cratis-disabled-opacity);
650
+ }
651
+ /* A disabled tag group keeps its values readable — they are information, not an inactive control,
652
+ and fading them takes their contrast below the threshold. Only the affordances dim. */
653
+ .cratis-tag-group[data-disabled] {
654
+ cursor: not-allowed;
655
+ background: var(--cratis-surface-ground);
656
+ }
657
+ .cratis-tag-group[data-disabled] .cratis-tag-group__tag {
658
+ border-style: dashed;
659
+ }
660
+
661
+ /* Toggle group */
662
+ .cratis-toggle-group {
663
+ gap: 0.125rem;
664
+ padding: 0.125rem;
665
+ border: 1px solid var(--cratis-surface-border);
666
+ border-radius: var(--cratis-border-radius);
667
+ background: var(--cratis-surface-ground);
668
+ }
669
+ .cratis-toggle-group__option {
670
+ display: inline-flex;
671
+ align-items: center;
672
+ gap: 0.35rem;
673
+ padding: 0.25rem 0.75rem;
674
+ border: 0;
675
+ border-radius: calc(var(--cratis-border-radius) - 1px);
676
+ background: transparent;
677
+ color: inherit;
678
+ font: inherit;
679
+ cursor: pointer;
680
+ }
681
+ .cratis-toggle-group__option[data-selected] {
682
+ background: var(--cratis-surface-card);
683
+ box-shadow: var(--cratis-shadow-card, none);
684
+ font-weight: 600;
685
+ }
686
+ .cratis-toggle-group__option[data-disabled] {
687
+ cursor: not-allowed;
688
+ opacity: var(--cratis-disabled-opacity);
689
+ }
690
+ .cratis-toggle-group__icon {
691
+ display: inline-flex;
692
+ }
693
+ .cratis-toggle-group[data-invalid] {
694
+ border-color: var(--cratis-red-500);
695
+ }
696
+
697
+ /* Tabs */
698
+ .cratis-tabs {
699
+ display: flex;
700
+ flex-direction: column;
701
+ }
702
+ .cratis-tabs__list {
703
+ gap: 0.25rem;
704
+ border-bottom: 1px solid var(--cratis-surface-border);
705
+ }
706
+ .cratis-tabs__tab {
707
+ padding: 0.5rem 0.75rem;
708
+ border: 0;
709
+ border-bottom: 2px solid transparent;
710
+ background: transparent;
711
+ color: var(--cratis-text-color-secondary);
712
+ font: inherit;
713
+ cursor: pointer;
714
+ }
715
+ .cratis-tabs__tab[data-selected] {
716
+ border-bottom-color: var(--cratis-primary-color);
717
+ color: var(--cratis-text-color);
718
+ font-weight: 600;
719
+ }
720
+ .cratis-tabs__tab[data-disabled] {
721
+ cursor: not-allowed;
722
+ opacity: var(--cratis-disabled-opacity);
723
+ }
724
+ .cratis-tabs__panel {
725
+ padding: 0.75rem 0;
726
+ outline: none;
727
+ }
728
+
729
+ /* Tag group */
730
+ .cratis-tag-group {
731
+ flex-wrap: wrap;
732
+ gap: 0.35rem;
733
+ min-height: var(--cratis-control-height);
734
+ padding: 0.25rem 0.5rem;
735
+ border: 1px solid var(--cratis-control-border);
736
+ border-radius: var(--cratis-border-radius);
737
+ background: var(--cratis-control-background);
738
+ }
739
+ .cratis-tag-group:focus-within {
740
+ border-color: var(--cratis-primary-color);
741
+ box-shadow: var(--cratis-focus-ring);
742
+ }
743
+ .cratis-tag-group[data-invalid] {
744
+ border-color: var(--cratis-red-500);
745
+ }
746
+ .cratis-tag-group__group,
747
+ .cratis-tag-group__list {
748
+ display: contents;
749
+ }
750
+ .cratis-tag-group__tag {
751
+ display: inline-flex;
752
+ align-items: center;
753
+ gap: 0.25rem;
754
+ padding: 0.1rem 0.5rem;
755
+ border: 1px solid var(--cratis-surface-border);
756
+ border-radius: 999px;
757
+ background: var(--cratis-surface-ground);
758
+ font-size: 0.9em;
759
+ }
760
+ .cratis-tag-group__remove {
761
+ display: inline-flex;
762
+ align-items: center;
763
+ justify-content: center;
764
+ padding: 0;
765
+ border: 0;
766
+ background: transparent;
767
+ color: var(--cratis-text-color-secondary);
768
+ line-height: 1;
769
+ cursor: pointer;
770
+ }
771
+ .cratis-tag-group__remove:hover {
772
+ color: var(--cratis-text-color);
773
+ }
774
+ .cratis-tag-group__input {
775
+ flex: 1 1 6rem;
776
+ min-width: 4rem;
777
+ border: 0;
778
+ background: transparent;
779
+ color: inherit;
780
+ font: inherit;
781
+ outline: none;
782
+ }
783
+
784
+ /* Breadcrumbs */
785
+ .cratis-breadcrumbs {
786
+ flex-wrap: wrap;
787
+ gap: 0.35rem;
788
+ padding: 0;
789
+ margin: 0;
790
+ list-style: none;
791
+ }
792
+ .cratis-breadcrumbs__item {
793
+ display: inline-flex;
794
+ align-items: center;
795
+ gap: 0.35rem;
796
+ }
797
+ .cratis-breadcrumbs__link {
798
+ border-radius: var(--cratis-border-radius);
799
+ color: var(--cratis-text-color-secondary);
800
+ text-decoration: none;
801
+ cursor: pointer;
802
+ }
803
+ .cratis-breadcrumbs__link:hover {
804
+ color: var(--cratis-text-color);
805
+ text-decoration: underline;
806
+ }
807
+ .cratis-breadcrumbs__item[data-selected] {
808
+ color: var(--cratis-text-color);
809
+ font-weight: 600;
810
+ }
811
+ .cratis-breadcrumbs__separator {
812
+ color: var(--cratis-text-color-secondary);
813
+ }
814
+
815
+ @media (forced-colors: active) {
816
+ .cratis-toggle-group__option[data-selected],
817
+ .cratis-tabs__tab[data-selected] {
818
+ forced-color-adjust: none;
819
+ background: Highlight;
820
+ color: HighlightText;
821
+ }
822
+ }
823
+
824
+ /* ── ./Common/DatePickerInput.css ─────────────────────────────────────── */
825
+ /* Copyright (c) Cratis. All rights reserved. */
826
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
827
+
828
+ .cratis-date-picker {
829
+ display: inline-flex;
830
+ width: 100%;
831
+ color: var(--cratis-text-color);
832
+ }
833
+ .cratis-date-picker__picker {
834
+ width: 100%;
835
+ }
836
+ .cratis-date-picker__group {
837
+ position: relative;
838
+ display: flex;
839
+ width: 100%;
840
+ box-sizing: border-box;
841
+ min-height: var(--cratis-control-height);
842
+ align-items: center;
843
+ overflow: hidden;
844
+ border: 1px solid var(--cratis-control-border);
845
+ border-radius: var(--cratis-border-radius);
846
+ background: var(--cratis-control-background);
847
+ }
848
+ .cratis-date-picker__group[data-focus-within] {
849
+ border-color: var(--cratis-primary-color);
850
+ box-shadow: var(--cratis-focus-ring);
851
+ }
852
+ .cratis-date-picker[data-invalid='true'] .cratis-date-picker__group {
853
+ border-color: var(--cratis-red-500);
854
+ }
855
+ .cratis-date-picker[data-disabled='true'] {
856
+ opacity: var(--cratis-disabled-opacity);
857
+ }
858
+ .cratis-date-picker__input {
859
+ display: flex;
860
+ flex: 1;
861
+ flex-wrap: wrap;
862
+ min-width: 0;
863
+ padding: 0.625rem 0.75rem;
864
+ }
865
+ .cratis-date-picker__group[data-empty='true']:not([data-focus-within])
866
+ .cratis-date-picker__input {
867
+ opacity: 0;
868
+ }
869
+ .cratis-date-picker__placeholder {
870
+ position: absolute;
871
+ inset-inline-start: 0.7rem;
872
+ color: var(--cratis-text-color-secondary);
873
+ pointer-events: none;
874
+ }
875
+ .cratis-date-picker__group[data-focus-within] .cratis-date-picker__placeholder {
876
+ display: none;
877
+ }
878
+ .cratis-date-picker__segment {
879
+ padding: 0 0.1rem;
880
+ border-radius: 0.2rem;
881
+ outline: none;
882
+ font-variant-numeric: tabular-nums;
883
+ }
884
+ .cratis-date-picker__segment:not([data-type='literal']) {
885
+ display: flex;
886
+ min-width: 24px;
887
+ min-height: 24px;
888
+ align-items: center;
889
+ justify-content: center;
890
+ }
891
+ .cratis-date-picker__segment[data-placeholder] {
892
+ color: var(--cratis-text-color-secondary);
893
+ }
894
+ .cratis-date-picker__segment[data-focused] {
895
+ background: var(--cratis-highlight-bg);
896
+ color: var(--cratis-highlight-text-color);
897
+ }
898
+ .cratis-date-picker__trigger {
899
+ align-self: stretch;
900
+ min-width: var(--cratis-control-height);
901
+ border: 0;
902
+ border-inline-start: 1px solid var(--cratis-control-border);
903
+ background: transparent;
904
+ color: var(--cratis-text-color-secondary);
905
+ cursor: pointer;
906
+ }
907
+ .cratis-date-picker__trigger:hover {
908
+ background: var(--cratis-surface-hover);
909
+ color: var(--cratis-text-color);
910
+ }
911
+ .cratis-date-picker__trigger:focus-visible {
912
+ outline: none;
913
+ box-shadow: inset var(--cratis-focus-ring);
914
+ }
915
+ .cratis-date-picker__popover {
916
+ z-index: var(--cratis-z-index-overlay);
917
+ overflow: auto;
918
+ border: 1px solid var(--cratis-surface-border);
919
+ border-radius: var(--cratis-border-radius);
920
+ background: var(--cratis-surface-overlay);
921
+ color: var(--cratis-text-color);
922
+ box-shadow: var(--cratis-shadow-overlay);
923
+ }
924
+ .cratis-date-picker__dialog {
925
+ padding: 0.75rem;
926
+ outline: none;
927
+ }
928
+ .cratis-date-picker__calendar {
929
+ width: max-content;
930
+ }
931
+ .cratis-date-picker__header {
932
+ display: grid;
933
+ grid-template-columns: 2rem 1fr 2rem;
934
+ align-items: center;
935
+ gap: 0.5rem;
936
+ margin-bottom: 0.5rem;
937
+ }
938
+ .cratis-date-picker__heading {
939
+ margin: 0;
940
+ text-align: center;
941
+ font-size: 0.95rem;
942
+ }
943
+ .cratis-date-picker__nav,
944
+ .cratis-date-picker__action {
945
+ min-height: 2rem;
946
+ border: 1px solid var(--cratis-surface-border);
947
+ border-radius: calc(var(--cratis-border-radius) * 0.75);
948
+ background: transparent;
949
+ color: inherit;
950
+ cursor: pointer;
951
+ }
952
+ .cratis-date-picker__nav:hover,
953
+ .cratis-date-picker__action:hover {
954
+ background: var(--cratis-surface-hover);
955
+ }
956
+ .cratis-date-picker__nav:focus-visible,
957
+ .cratis-date-picker__action:focus-visible {
958
+ outline: none;
959
+ box-shadow: var(--cratis-focus-ring);
960
+ }
961
+ .cratis-date-picker__grid {
962
+ border-collapse: collapse;
963
+ }
964
+ .cratis-date-picker__grid th {
965
+ width: 2.25rem;
966
+ height: 2rem;
967
+ color: var(--cratis-text-color-secondary);
968
+ font-size: 0.75rem;
969
+ font-weight: 500;
970
+ }
971
+ .cratis-date-picker__cell {
972
+ display: flex;
973
+ width: 2.5rem;
974
+ height: 2.5rem;
975
+ align-items: center;
976
+ justify-content: center;
977
+ border-radius: 50%;
978
+ outline: none;
979
+ cursor: default;
980
+ }
981
+ .cratis-date-picker__cell[data-hovered] {
982
+ background: var(--cratis-surface-hover);
983
+ }
984
+ .cratis-date-picker__cell[data-selected] {
985
+ background: var(--cratis-action-background);
986
+ color: var(--cratis-action-text);
987
+ }
988
+ .cratis-date-picker__cell[data-focused] {
989
+ box-shadow: var(--cratis-focus-ring);
990
+ }
991
+ .cratis-date-picker__cell[data-disabled],
992
+ .cratis-date-picker__cell[data-outside-month] {
993
+ opacity: 0.45;
994
+ }
995
+ .cratis-date-picker__button-bar {
996
+ display: flex;
997
+ justify-content: flex-end;
998
+ gap: 0.5rem;
999
+ margin-top: 0.6rem;
1000
+ padding-top: 0.6rem;
1001
+ border-top: 1px solid var(--cratis-surface-border);
1002
+ }
1003
+ .cratis-date-picker__action {
1004
+ padding: 0.35rem 0.65rem;
1005
+ }
1006
+
1007
+ @media (forced-colors: active) {
1008
+ .cratis-date-picker__group,
1009
+ .cratis-date-picker__popover,
1010
+ .cratis-date-picker__nav,
1011
+ .cratis-date-picker__action {
1012
+ border-color: CanvasText;
1013
+ }
1014
+ .cratis-date-picker__cell[data-selected] {
1015
+ background: Highlight;
1016
+ color: HighlightText;
1017
+ }
1018
+ }
1019
+
1020
+ /* ── ./Common/FormElement.css ─────────────────────────────────────── */
1021
+ /* Copyright (c) Cratis. All rights reserved. */
1022
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1023
+
1024
+ .cratis-form-element {
1025
+ display: flex;
1026
+ flex: 1 1 auto;
1027
+ align-items: stretch;
1028
+ }
1029
+
1030
+ .cratis-form-element__addon {
1031
+ display: inline-flex;
1032
+ align-items: center;
1033
+ justify-content: center;
1034
+ padding: 0 0.75rem;
1035
+ color: var(--cratis-text-color-secondary);
1036
+ background: var(--cratis-surface-100);
1037
+ border: 1px solid var(--cratis-control-border);
1038
+ border-right: 0;
1039
+ border-top-left-radius: var(--cratis-border-radius);
1040
+ border-bottom-left-radius: var(--cratis-border-radius);
1041
+ }
1042
+
1043
+ .cratis-form-element > *:not(.cratis-form-element__addon) {
1044
+ flex: 1 1 auto;
1045
+ min-width: 0;
1046
+ }
1047
+
1048
+ /* ── ./Common/NumberInput.css ─────────────────────────────────────── */
1049
+ /* Copyright (c) Cratis. All rights reserved. */
1050
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1051
+
1052
+ .cratis-number-input {
1053
+ box-sizing: border-box;
1054
+ width: 100%;
1055
+ max-width: 100%;
1056
+ color: var(--cratis-text-color);
1057
+ }
1058
+ .cratis-number-input__group {
1059
+ display: flex;
1060
+ box-sizing: border-box;
1061
+ min-width: 0;
1062
+ min-height: var(--cratis-control-height);
1063
+ align-items: stretch;
1064
+ overflow: hidden;
1065
+ border: 1px solid var(--cratis-control-border);
1066
+ border-radius: var(--cratis-border-radius);
1067
+ background: var(--cratis-control-background);
1068
+ box-shadow: var(--cratis-shadow-subtle);
1069
+ }
1070
+ .cratis-number-input__control,
1071
+ .cratis-number-input__steps {
1072
+ display: flex;
1073
+ min-width: 0;
1074
+ align-items: stretch;
1075
+ }
1076
+ .cratis-number-input__control {
1077
+ flex: 1 1 auto;
1078
+ }
1079
+ .cratis-number-input__steps {
1080
+ flex: 0 0 auto;
1081
+ }
1082
+ .cratis-number-input__group:focus-within {
1083
+ border-color: var(--cratis-primary-color);
1084
+ box-shadow: var(--cratis-focus-ring);
1085
+ }
1086
+ .cratis-number-input[data-invalid='true'] .cratis-number-input__group {
1087
+ border-color: var(--cratis-red-500);
1088
+ }
1089
+ .cratis-number-input[data-disabled='true'] {
1090
+ cursor: not-allowed;
1091
+ opacity: var(--cratis-disabled-opacity);
1092
+ }
1093
+ .cratis-number-input:is([data-disabled='true'], [data-readonly='true'])
1094
+ .cratis-number-input__group {
1095
+ background: var(--cratis-surface-100);
1096
+ }
1097
+ .cratis-number-input__input {
1098
+ box-sizing: border-box;
1099
+ width: 100%;
1100
+ min-width: 0;
1101
+ min-height: var(--cratis-control-height);
1102
+ padding: 0.625rem 0.75rem;
1103
+ flex: 1 1 auto;
1104
+ border: 0;
1105
+ outline: 0;
1106
+ background: transparent;
1107
+ color: var(--cratis-text-color);
1108
+ font: inherit;
1109
+ font-variant-numeric: tabular-nums;
1110
+ }
1111
+ .cratis-number-input__input::placeholder {
1112
+ color: var(--cratis-text-color-secondary);
1113
+ }
1114
+ .cratis-number-input__adornment {
1115
+ display: inline-flex;
1116
+ min-width: 0;
1117
+ padding-inline: 0.75rem;
1118
+ align-items: center;
1119
+ color: var(--cratis-number-input-adornment-color);
1120
+ white-space: nowrap;
1121
+ }
1122
+ .cratis-number-input__prefix {
1123
+ padding-inline-end: 0;
1124
+ }
1125
+ .cratis-number-input__suffix {
1126
+ padding-inline-start: 0;
1127
+ }
1128
+ .cratis-number-input__step {
1129
+ display: inline-flex;
1130
+ box-sizing: border-box;
1131
+ width: var(--cratis-control-height);
1132
+ min-width: 2.75rem;
1133
+ min-height: var(--cratis-control-height);
1134
+ padding: 0;
1135
+ align-items: center;
1136
+ justify-content: center;
1137
+ border: 0;
1138
+ border-inline-start: 1px solid var(--cratis-control-border);
1139
+ background: var(--cratis-number-input-step-background);
1140
+ color: var(--cratis-text-color);
1141
+ font: inherit;
1142
+ cursor: pointer;
1143
+ }
1144
+ .cratis-number-input__step:hover:not(:disabled) {
1145
+ background: var(--cratis-number-input-step-background-hover);
1146
+ }
1147
+ .cratis-number-input__step:focus-visible {
1148
+ outline: 2px solid var(--cratis-primary-color);
1149
+ outline-offset: -3px;
1150
+ }
1151
+ .cratis-number-input__step:disabled {
1152
+ cursor: not-allowed;
1153
+ opacity: var(--cratis-disabled-opacity);
1154
+ }
1155
+ .cratis-number-input__description,
1156
+ .cratis-number-input__error {
1157
+ display: block;
1158
+ margin-block-start: 0.35rem;
1159
+ line-height: 1.4;
1160
+ }
1161
+ .cratis-number-input__description {
1162
+ color: var(--cratis-text-color-secondary);
1163
+ }
1164
+ .cratis-number-input__error {
1165
+ color: var(--cratis-red-500);
1166
+ }
1167
+
1168
+ @media (max-width: 24rem) {
1169
+ .cratis-number-input__group {
1170
+ flex-wrap: wrap;
1171
+ }
1172
+ .cratis-number-input__control,
1173
+ .cratis-number-input__steps {
1174
+ width: 100%;
1175
+ flex-basis: 100%;
1176
+ border-block-start: 1px solid var(--cratis-control-border);
1177
+ }
1178
+ .cratis-number-input__step {
1179
+ width: 50%;
1180
+ min-width: 0;
1181
+ flex: 1 1 50%;
1182
+ }
1183
+ .cratis-number-input__step:first-child {
1184
+ border-inline-start: 0;
1185
+ }
1186
+ }
1187
+
1188
+ @media (forced-colors: active) {
1189
+ .cratis-number-input__group,
1190
+ .cratis-number-input__step {
1191
+ border-color: CanvasText;
1192
+ }
1193
+ .cratis-number-input__group:focus-within,
1194
+ .cratis-number-input__step:focus-visible {
1195
+ outline: 2px solid Highlight;
1196
+ outline-offset: 2px;
1197
+ box-shadow: none;
1198
+ }
1199
+ }
1200
+
1201
+ /* ── ./Common/Primitives.css ─────────────────────────────────────── */
1202
+ /* Copyright (c) Cratis. All rights reserved. */
1203
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1204
+
1205
+ .cratis-text-input,
1206
+ .cratis-text-area {
1207
+ box-sizing: border-box;
1208
+ min-height: var(--cratis-control-height);
1209
+ padding: 0.625rem 0.75rem;
1210
+ border: 1px solid var(--cratis-control-border);
1211
+ border-radius: var(--cratis-border-radius);
1212
+ background: var(--cratis-control-background);
1213
+ color: var(--cratis-text-color);
1214
+ font: inherit;
1215
+ box-shadow: var(--cratis-shadow-subtle);
1216
+ }
1217
+ .cratis-text-area {
1218
+ resize: vertical;
1219
+ }
1220
+ .cratis-text-input::placeholder,
1221
+ .cratis-text-area::placeholder {
1222
+ color: var(--cratis-text-color-secondary);
1223
+ }
1224
+ .cratis-text-input:focus-visible,
1225
+ .cratis-text-area:focus-visible {
1226
+ outline: none;
1227
+ border-color: var(--cratis-primary-color);
1228
+ box-shadow: var(--cratis-focus-ring);
1229
+ }
1230
+ .cratis-text-input:is(:disabled, [data-readonly='true']),
1231
+ .cratis-text-area:is(:disabled, [data-readonly='true']) {
1232
+ background: var(--cratis-surface-100);
1233
+ }
1234
+ .cratis-text-input:disabled,
1235
+ .cratis-text-area:disabled {
1236
+ cursor: not-allowed;
1237
+ opacity: var(--cratis-disabled-opacity);
1238
+ }
1239
+ .cratis-text-input[data-invalid='true'],
1240
+ .cratis-text-area[data-invalid='true'] {
1241
+ border-color: var(--cratis-red-500);
1242
+ }
1243
+
1244
+ .cratis-choice {
1245
+ position: relative;
1246
+ display: inline-flex;
1247
+ align-items: center;
1248
+ gap: 0.5rem;
1249
+ color: var(--cratis-text-color);
1250
+ cursor: pointer;
1251
+ }
1252
+ .cratis-choice[data-disabled='true'] {
1253
+ cursor: not-allowed;
1254
+ opacity: var(--cratis-disabled-opacity);
1255
+ }
1256
+ .cratis-choice[data-readonly='true']:not([data-disabled='true']) {
1257
+ cursor: default;
1258
+ }
1259
+ .cratis-choice__input {
1260
+ position: absolute;
1261
+ width: 1px;
1262
+ height: 1px;
1263
+ margin: -1px;
1264
+ overflow: hidden;
1265
+ clip: rect(0 0 0 0);
1266
+ clip-path: inset(50%);
1267
+ white-space: nowrap;
1268
+ }
1269
+ .cratis-checkbox__box,
1270
+ .cratis-radio__box,
1271
+ .cratis-switch__control {
1272
+ display: inline-flex;
1273
+ box-sizing: border-box;
1274
+ flex: 0 0 auto;
1275
+ align-items: center;
1276
+ border: 1px solid var(--cratis-control-border);
1277
+ background: var(--cratis-control-background);
1278
+ }
1279
+ .cratis-checkbox__box,
1280
+ .cratis-radio__box {
1281
+ width: 1.25rem;
1282
+ height: 1.25rem;
1283
+ justify-content: center;
1284
+ }
1285
+ .cratis-checkbox__box {
1286
+ border-radius: var(--cratis-border-radius);
1287
+ }
1288
+ .cratis-checkbox__indicator {
1289
+ color: var(--cratis-primary-color-text);
1290
+ font-size: 0.85rem;
1291
+ line-height: 1;
1292
+ opacity: 0;
1293
+ }
1294
+ .cratis-radio__box {
1295
+ border-radius: 50%;
1296
+ }
1297
+ .cratis-radio__indicator {
1298
+ width: 0.65rem;
1299
+ height: 0.65rem;
1300
+ border-radius: 50%;
1301
+ background: var(--cratis-primary-color);
1302
+ opacity: 0;
1303
+ }
1304
+ .cratis-switch__control {
1305
+ width: 2.5rem;
1306
+ height: 1.4rem;
1307
+ padding: 0.15rem;
1308
+ border-radius: 999px;
1309
+ background: var(--cratis-surface-100);
1310
+ transition: background-color 140ms ease;
1311
+ }
1312
+ .cratis-switch__handle {
1313
+ width: 1rem;
1314
+ height: 1rem;
1315
+ border-radius: 50%;
1316
+ background: var(--cratis-control-background);
1317
+ box-shadow: var(--cratis-shadow-subtle);
1318
+ transition: transform 140ms ease;
1319
+ }
1320
+ .cratis-choice__input:focus-visible
1321
+ + :is(.cratis-checkbox__box, .cratis-radio__box, .cratis-switch__control) {
1322
+ box-shadow: var(--cratis-focus-ring);
1323
+ }
1324
+ .cratis-choice__input:checked + .cratis-checkbox__box,
1325
+ .cratis-choice__input:checked + .cratis-switch__control {
1326
+ border-color: var(--cratis-primary-color);
1327
+ background: var(--cratis-primary-color);
1328
+ }
1329
+ .cratis-choice__input:checked + .cratis-checkbox__box .cratis-checkbox__indicator,
1330
+ .cratis-choice__input:checked + .cratis-radio__box .cratis-radio__indicator {
1331
+ opacity: 1;
1332
+ }
1333
+ .cratis-choice__input:checked + .cratis-radio__box {
1334
+ border-color: var(--cratis-primary-color);
1335
+ }
1336
+ .cratis-choice__input:checked + .cratis-switch__control .cratis-switch__handle {
1337
+ transform: translateX(1.05rem);
1338
+ }
1339
+ .cratis-choice:dir(rtl)
1340
+ .cratis-choice__input:checked
1341
+ + .cratis-switch__control
1342
+ .cratis-switch__handle {
1343
+ transform: translateX(-1.05rem);
1344
+ }
1345
+ .cratis-choice[data-invalid='true']
1346
+ :is(.cratis-checkbox__box, .cratis-radio__box, .cratis-switch__control) {
1347
+ border-color: var(--cratis-red-500);
1348
+ }
1349
+
1350
+ .cratis-surface {
1351
+ box-sizing: border-box;
1352
+ border: 1px solid var(--cratis-surface-border);
1353
+ border-radius: var(--cratis-border-radius);
1354
+ background: var(--cratis-surface-card);
1355
+ color: var(--cratis-text-color);
1356
+ box-shadow: var(--cratis-shadow-subtle);
1357
+ }
1358
+
1359
+ @media (prefers-reduced-motion: reduce) {
1360
+ .cratis-switch__control,
1361
+ .cratis-switch__handle {
1362
+ transition: none;
1363
+ }
1364
+ }
1365
+
1366
+ @media (forced-colors: active) {
1367
+ .cratis-text-input,
1368
+ .cratis-text-area,
1369
+ .cratis-checkbox__box,
1370
+ .cratis-radio__box,
1371
+ .cratis-switch__control,
1372
+ .cratis-surface {
1373
+ border-color: CanvasText;
1374
+ }
1375
+ .cratis-choice__input:checked
1376
+ + :is(.cratis-checkbox__box, .cratis-switch__control) {
1377
+ background: Highlight;
1378
+ }
1379
+ .cratis-choice__input:checked + .cratis-radio__box .cratis-radio__indicator {
1380
+ background: Highlight;
1381
+ }
1382
+ .cratis-choice__input:focus-visible
1383
+ + :is(.cratis-checkbox__box, .cratis-radio__box, .cratis-switch__control),
1384
+ .cratis-text-input:focus-visible,
1385
+ .cratis-text-area:focus-visible {
1386
+ outline: 2px solid Highlight;
1387
+ outline-offset: 2px;
1388
+ box-shadow: none;
1389
+ }
1390
+ }
1391
+
1392
+ /* ── ./Common/Tooltip.css ─────────────────────────────────────── */
1393
+ /* Copyright (c) Cratis. All rights reserved. */
1394
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1395
+
1396
+ /* ── Tooltip bubble ──────────────────────────────────────────────────────── */
1397
+ .cratis-tooltip-popup {
1398
+ background: var(--cratis-surface-100);
1399
+ color: var(--cratis-text-color);
1400
+ border: 1px solid var(--cratis-surface-border);
1401
+ box-shadow: var(--cratis-shadow-overlay);
1402
+ border-radius: var(--cratis-border-radius);
1403
+ padding: 0.25rem 0.5rem;
1404
+ font-size: 0.75rem;
1405
+ font-family: inherit;
1406
+ max-width: 24rem;
1407
+ z-index: var(--cratis-z-index-tooltip);
1408
+ }
1409
+
1410
+ /* ── ./Dropdown/Dropdown.css ─────────────────────────────────────── */
1411
+ /* Copyright (c) Cratis. All rights reserved. */
1412
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1413
+
1414
+ .cratis-dropdown {
1415
+ position: relative;
1416
+ display: inline-flex;
1417
+ min-width: 10rem;
1418
+ color: var(--cratis-text-color);
1419
+ }
1420
+ .cratis-dropdown__select,
1421
+ .cratis-dropdown__combobox {
1422
+ position: relative;
1423
+ display: flex;
1424
+ width: 100%;
1425
+ }
1426
+ .cratis-dropdown__trigger,
1427
+ .cratis-dropdown__filter,
1428
+ .cratis-dropdown__multiple {
1429
+ width: 100%;
1430
+ box-sizing: border-box;
1431
+ min-height: var(--cratis-control-height);
1432
+ border: 1px solid var(--cratis-control-border);
1433
+ border-radius: var(--cratis-border-radius);
1434
+ background: var(--cratis-control-background);
1435
+ color: var(--cratis-text-color);
1436
+ font: inherit;
1437
+ }
1438
+ .cratis-dropdown__trigger {
1439
+ display: flex;
1440
+ padding: 0.625rem 2.25rem 0.625rem 0.75rem;
1441
+ align-items: center;
1442
+ justify-content: space-between;
1443
+ gap: 0.5rem;
1444
+ text-align: start;
1445
+ cursor: pointer;
1446
+ }
1447
+ .cratis-dropdown__filter {
1448
+ padding: 0.625rem 4rem 0.625rem 0.75rem;
1449
+ }
1450
+ .cratis-dropdown:not([data-disabled='true'])
1451
+ :is(.cratis-dropdown__trigger, .cratis-dropdown__filter):hover {
1452
+ border-color: var(--cratis-primary-300);
1453
+ background: var(--cratis-surface-hover);
1454
+ }
1455
+ .cratis-dropdown__trigger[data-pressed] {
1456
+ background: var(--cratis-highlight-bg);
1457
+ }
1458
+ .cratis-dropdown__multiple {
1459
+ padding: 0.4rem;
1460
+ }
1461
+ .cratis-dropdown__trigger:focus-visible,
1462
+ .cratis-dropdown__filter:focus-visible,
1463
+ .cratis-dropdown__multiple:focus-visible {
1464
+ outline: none;
1465
+ box-shadow: var(--cratis-focus-ring);
1466
+ border-color: var(--cratis-primary-color);
1467
+ }
1468
+ .cratis-dropdown[data-invalid='true']
1469
+ :is(.cratis-dropdown__trigger, .cratis-dropdown__filter, .cratis-dropdown__multiple) {
1470
+ border-color: var(--cratis-red-500);
1471
+ }
1472
+ .cratis-dropdown[data-disabled='true'] {
1473
+ opacity: var(--cratis-disabled-opacity);
1474
+ }
1475
+ .cratis-dropdown__value {
1476
+ min-width: 0;
1477
+ overflow: hidden;
1478
+ text-overflow: ellipsis;
1479
+ white-space: nowrap;
1480
+ }
1481
+ .cratis-dropdown__indicator {
1482
+ position: absolute;
1483
+ inset-inline-end: 0.55rem;
1484
+ top: 50%;
1485
+ display: inline-flex;
1486
+ width: 1.5rem;
1487
+ height: 1.5rem;
1488
+ padding: 0;
1489
+ align-items: center;
1490
+ justify-content: center;
1491
+ transform: translateY(-50%);
1492
+ border: 0;
1493
+ background: transparent;
1494
+ color: var(--cratis-text-color-secondary);
1495
+ }
1496
+ .cratis-dropdown__clear {
1497
+ position: absolute;
1498
+ inset-inline-end: 2.15rem;
1499
+ top: 50%;
1500
+ z-index: 1;
1501
+ display: inline-flex;
1502
+ width: 1.5rem;
1503
+ height: 1.5rem;
1504
+ padding: 0;
1505
+ align-items: center;
1506
+ justify-content: center;
1507
+ transform: translateY(-50%);
1508
+ border: 0;
1509
+ border-radius: 50%;
1510
+ background: transparent;
1511
+ color: var(--cratis-text-color-secondary);
1512
+ cursor: pointer;
1513
+ }
1514
+ .cratis-dropdown__clear:hover {
1515
+ background: var(--cratis-surface-hover);
1516
+ color: var(--cratis-text-color);
1517
+ }
1518
+ .cratis-dropdown__clear:focus-visible {
1519
+ outline: none;
1520
+ box-shadow: var(--cratis-focus-ring);
1521
+ }
1522
+ .cratis-dropdown__popover {
1523
+ z-index: var(--cratis-z-index-overlay);
1524
+ min-width: var(--trigger-width);
1525
+ max-height: min(20rem, var(--available-height));
1526
+ overflow: auto;
1527
+ border: 1px solid var(--cratis-surface-border);
1528
+ border-radius: var(--cratis-border-radius);
1529
+ background: var(--cratis-surface-overlay);
1530
+ color: var(--cratis-text-color);
1531
+ box-shadow: var(--cratis-shadow-overlay);
1532
+ }
1533
+ .cratis-dropdown__listbox {
1534
+ padding: 0.3rem;
1535
+ outline: none;
1536
+ }
1537
+ .cratis-dropdown__option {
1538
+ display: flex;
1539
+ min-height: var(--cratis-control-height);
1540
+ padding: 0.75rem 1.25rem;
1541
+ align-items: center;
1542
+ border-radius: calc(var(--cratis-border-radius) * 0.75);
1543
+ outline: none;
1544
+ cursor: default;
1545
+ }
1546
+ .cratis-dropdown__option[data-focused] {
1547
+ background: var(--cratis-surface-hover);
1548
+ }
1549
+ .cratis-dropdown__option[data-selected] {
1550
+ background: var(--cratis-highlight-bg);
1551
+ color: var(--cratis-highlight-text-color);
1552
+ }
1553
+ .cratis-dropdown__option[data-focus-visible] {
1554
+ box-shadow: inset var(--cratis-focus-ring);
1555
+ }
1556
+ .cratis-dropdown__option[data-disabled] {
1557
+ opacity: 0.5;
1558
+ }
1559
+
1560
+ @media (forced-colors: active) {
1561
+ .cratis-dropdown__trigger,
1562
+ .cratis-dropdown__filter,
1563
+ .cratis-dropdown__multiple,
1564
+ .cratis-dropdown__popover {
1565
+ border-color: CanvasText;
1566
+ }
1567
+ .cratis-dropdown__option[data-focused],
1568
+ .cratis-dropdown__option[data-selected] {
1569
+ outline: 2px solid Highlight;
1570
+ }
1571
+ }
1572
+
1573
+ /* ── ./Notifications/Toaster.css ─────────────────────────────────────── */
1574
+ /* Copyright (c) Cratis. All rights reserved. */
1575
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1576
+
1577
+ .cratis-toaster {
1578
+ position: fixed;
1579
+ z-index: var(--cratis-z-index-toast);
1580
+ display: flex;
1581
+ width: min(26rem, calc(100vw - 2rem));
1582
+ flex-direction: column;
1583
+ gap: 0.75rem;
1584
+ pointer-events: none;
1585
+ }
1586
+ .cratis-toaster[data-position^='top'] {
1587
+ top: 1rem;
1588
+ }
1589
+ .cratis-toaster[data-position^='bottom'] {
1590
+ bottom: 1rem;
1591
+ }
1592
+ .cratis-toaster[data-position$='left'] {
1593
+ left: 1rem;
1594
+ }
1595
+ .cratis-toaster[data-position$='right'] {
1596
+ right: 1rem;
1597
+ }
1598
+ .cratis-toaster[data-position$='center'] {
1599
+ left: 50%;
1600
+ transform: translateX(-50%);
1601
+ }
1602
+
1603
+ .cratis-toast {
1604
+ display: flex;
1605
+ min-width: 18rem;
1606
+ max-width: 26rem;
1607
+ padding: 0.75rem 1rem;
1608
+ align-items: flex-start;
1609
+ gap: 0.625rem;
1610
+ border: 1px solid var(--cratis-surface-border);
1611
+ border-inline-start: 4px solid var(--cratis-surface-border);
1612
+ border-radius: var(--cratis-border-radius);
1613
+ background: var(--cratis-surface-overlay);
1614
+ color: var(--cratis-text-color);
1615
+ box-shadow: var(--cratis-shadow-toast);
1616
+ pointer-events: auto;
1617
+ }
1618
+ .cratis-toast__content {
1619
+ display: flex;
1620
+ min-width: 0;
1621
+ flex: 1;
1622
+ flex-direction: column;
1623
+ gap: 0.125rem;
1624
+ }
1625
+ .cratis-toast__title {
1626
+ font-weight: 600;
1627
+ }
1628
+ .cratis-toast__description {
1629
+ color: var(--cratis-text-color-secondary);
1630
+ font-size: 0.875rem;
1631
+ white-space: pre-line;
1632
+ }
1633
+ .cratis-toast__icon {
1634
+ flex: 0 0 auto;
1635
+ }
1636
+ .cratis-toast__close {
1637
+ display: inline-flex;
1638
+ width: 1.75rem;
1639
+ height: 1.75rem;
1640
+ padding: 0;
1641
+ align-items: center;
1642
+ justify-content: center;
1643
+ border: 0;
1644
+ border-radius: 50%;
1645
+ background: transparent;
1646
+ color: var(--cratis-text-color-secondary);
1647
+ cursor: pointer;
1648
+ }
1649
+ .cratis-toast__close:hover {
1650
+ background: var(--cratis-surface-hover);
1651
+ color: var(--cratis-text-color);
1652
+ }
1653
+ .cratis-toast__close:focus-visible {
1654
+ outline: none;
1655
+ box-shadow: var(--cratis-focus-ring);
1656
+ }
1657
+ .cratis-toast__action {
1658
+ align-self: flex-start;
1659
+ margin-top: 0.4rem;
1660
+ }
1661
+ .cratis-toast[data-loading='true'] .cratis-toast__icon {
1662
+ animation: cratis-toast-spin 800ms linear infinite;
1663
+ }
1664
+ .cratis-toast[data-severity='success'] {
1665
+ border-inline-start-color: var(--cratis-green-500);
1666
+ }
1667
+ .cratis-toast[data-severity='info'] {
1668
+ border-inline-start-color: var(--cratis-primary-color);
1669
+ }
1670
+ .cratis-toast[data-severity='warn'] {
1671
+ border-inline-start-color: var(--cratis-orange-500);
1672
+ }
1673
+ .cratis-toast[data-severity='error'] {
1674
+ border-inline-start-color: var(--cratis-red-500);
1675
+ }
1676
+ .cratis-toast[data-severity='success'] .cratis-toast__icon {
1677
+ color: var(--cratis-green-500);
1678
+ }
1679
+ .cratis-toast[data-severity='info'] .cratis-toast__icon {
1680
+ color: var(--cratis-primary-color);
1681
+ }
1682
+ .cratis-toast[data-severity='warn'] .cratis-toast__icon {
1683
+ color: var(--cratis-orange-500);
1684
+ }
1685
+ .cratis-toast[data-severity='error'] .cratis-toast__icon {
1686
+ color: var(--cratis-red-500);
1687
+ }
1688
+
1689
+ @keyframes cratis-toast-spin {
1690
+ to {
1691
+ transform: rotate(360deg);
1692
+ }
1693
+ }
1694
+ @media (prefers-reduced-motion: reduce) {
1695
+ .cratis-toast__icon {
1696
+ animation: none !important;
1697
+ }
1698
+ }
1699
+ @media (forced-colors: active) {
1700
+ .cratis-toast {
1701
+ border-color: CanvasText;
1702
+ }
1703
+ .cratis-toast__close:focus-visible {
1704
+ outline: 2px solid Highlight;
1705
+ outline-offset: 2px;
1706
+ box-shadow: none;
1707
+ }
1708
+ }
1709
+
1710
+ }