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