@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,1388 @@
1
+ @layer cratis-components {
2
+ /* @cratis/components/Dropdown/styles — requires @cratis/components/styles/base. Areas: Common, Dropdown, 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
+ /* ── ./Dropdown/Dropdown.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-dropdown {
1093
+ position: relative;
1094
+ display: inline-flex;
1095
+ min-width: 10rem;
1096
+ color: var(--cratis-text-color);
1097
+ }
1098
+ .cratis-dropdown__select,
1099
+ .cratis-dropdown__combobox {
1100
+ position: relative;
1101
+ display: flex;
1102
+ width: 100%;
1103
+ }
1104
+ .cratis-dropdown__trigger,
1105
+ .cratis-dropdown__filter,
1106
+ .cratis-dropdown__multiple {
1107
+ width: 100%;
1108
+ box-sizing: border-box;
1109
+ min-height: var(--cratis-control-height);
1110
+ border: 1px solid var(--cratis-control-border);
1111
+ border-radius: var(--cratis-border-radius);
1112
+ background: var(--cratis-control-background);
1113
+ color: var(--cratis-text-color);
1114
+ font: inherit;
1115
+ }
1116
+ .cratis-dropdown__trigger {
1117
+ display: flex;
1118
+ padding: 0.625rem 2.25rem 0.625rem 0.75rem;
1119
+ align-items: center;
1120
+ justify-content: space-between;
1121
+ gap: 0.5rem;
1122
+ text-align: start;
1123
+ cursor: pointer;
1124
+ }
1125
+ .cratis-dropdown__filter {
1126
+ padding: 0.625rem 4rem 0.625rem 0.75rem;
1127
+ }
1128
+ .cratis-dropdown:not([data-disabled='true'])
1129
+ :is(.cratis-dropdown__trigger, .cratis-dropdown__filter):hover {
1130
+ border-color: var(--cratis-primary-300);
1131
+ background: var(--cratis-surface-hover);
1132
+ }
1133
+ .cratis-dropdown__trigger[data-pressed] {
1134
+ background: var(--cratis-highlight-bg);
1135
+ }
1136
+ .cratis-dropdown__multiple {
1137
+ padding: 0.4rem;
1138
+ }
1139
+ .cratis-dropdown__trigger:focus-visible,
1140
+ .cratis-dropdown__filter:focus-visible,
1141
+ .cratis-dropdown__multiple:focus-visible {
1142
+ outline: none;
1143
+ box-shadow: var(--cratis-focus-ring);
1144
+ border-color: var(--cratis-primary-color);
1145
+ }
1146
+ .cratis-dropdown[data-invalid='true']
1147
+ :is(.cratis-dropdown__trigger, .cratis-dropdown__filter, .cratis-dropdown__multiple) {
1148
+ border-color: var(--cratis-red-500);
1149
+ }
1150
+ .cratis-dropdown[data-disabled='true'] {
1151
+ opacity: var(--cratis-disabled-opacity);
1152
+ }
1153
+ .cratis-dropdown__value {
1154
+ min-width: 0;
1155
+ overflow: hidden;
1156
+ text-overflow: ellipsis;
1157
+ white-space: nowrap;
1158
+ }
1159
+ .cratis-dropdown__indicator {
1160
+ position: absolute;
1161
+ inset-inline-end: 0.55rem;
1162
+ top: 50%;
1163
+ display: inline-flex;
1164
+ width: 1.5rem;
1165
+ height: 1.5rem;
1166
+ padding: 0;
1167
+ align-items: center;
1168
+ justify-content: center;
1169
+ transform: translateY(-50%);
1170
+ border: 0;
1171
+ background: transparent;
1172
+ color: var(--cratis-text-color-secondary);
1173
+ }
1174
+ .cratis-dropdown__clear {
1175
+ position: absolute;
1176
+ inset-inline-end: 2.15rem;
1177
+ top: 50%;
1178
+ z-index: 1;
1179
+ display: inline-flex;
1180
+ width: 1.5rem;
1181
+ height: 1.5rem;
1182
+ padding: 0;
1183
+ align-items: center;
1184
+ justify-content: center;
1185
+ transform: translateY(-50%);
1186
+ border: 0;
1187
+ border-radius: 50%;
1188
+ background: transparent;
1189
+ color: var(--cratis-text-color-secondary);
1190
+ cursor: pointer;
1191
+ }
1192
+ .cratis-dropdown__clear:hover {
1193
+ background: var(--cratis-surface-hover);
1194
+ color: var(--cratis-text-color);
1195
+ }
1196
+ .cratis-dropdown__clear:focus-visible {
1197
+ outline: none;
1198
+ box-shadow: var(--cratis-focus-ring);
1199
+ }
1200
+ .cratis-dropdown__popover {
1201
+ z-index: var(--cratis-z-index-overlay);
1202
+ min-width: var(--trigger-width);
1203
+ max-height: min(20rem, var(--available-height));
1204
+ overflow: auto;
1205
+ border: 1px solid var(--cratis-surface-border);
1206
+ border-radius: var(--cratis-border-radius);
1207
+ background: var(--cratis-surface-overlay);
1208
+ color: var(--cratis-text-color);
1209
+ box-shadow: var(--cratis-shadow-overlay);
1210
+ }
1211
+ .cratis-dropdown__listbox {
1212
+ padding: 0.3rem;
1213
+ outline: none;
1214
+ }
1215
+ .cratis-dropdown__option {
1216
+ display: flex;
1217
+ min-height: var(--cratis-control-height);
1218
+ padding: 0.75rem 1.25rem;
1219
+ align-items: center;
1220
+ border-radius: calc(var(--cratis-border-radius) * 0.75);
1221
+ outline: none;
1222
+ cursor: default;
1223
+ }
1224
+ .cratis-dropdown__option[data-focused] {
1225
+ background: var(--cratis-surface-hover);
1226
+ }
1227
+ .cratis-dropdown__option[data-selected] {
1228
+ background: var(--cratis-highlight-bg);
1229
+ color: var(--cratis-highlight-text-color);
1230
+ }
1231
+ .cratis-dropdown__option[data-focus-visible] {
1232
+ box-shadow: inset var(--cratis-focus-ring);
1233
+ }
1234
+ .cratis-dropdown__option[data-disabled] {
1235
+ opacity: 0.5;
1236
+ }
1237
+
1238
+ @media (forced-colors: active) {
1239
+ .cratis-dropdown__trigger,
1240
+ .cratis-dropdown__filter,
1241
+ .cratis-dropdown__multiple,
1242
+ .cratis-dropdown__popover {
1243
+ border-color: CanvasText;
1244
+ }
1245
+ .cratis-dropdown__option[data-focused],
1246
+ .cratis-dropdown__option[data-selected] {
1247
+ outline: 2px solid Highlight;
1248
+ }
1249
+ }
1250
+
1251
+ /* ── ./Notifications/Toaster.css ─────────────────────────────────────── */
1252
+ /* Copyright (c) Cratis. All rights reserved. */
1253
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1254
+
1255
+ .cratis-toaster {
1256
+ position: fixed;
1257
+ z-index: var(--cratis-z-index-toast);
1258
+ display: flex;
1259
+ width: min(26rem, calc(100vw - 2rem));
1260
+ flex-direction: column;
1261
+ gap: 0.75rem;
1262
+ pointer-events: none;
1263
+ }
1264
+ .cratis-toaster[data-position^='top'] {
1265
+ top: 1rem;
1266
+ }
1267
+ .cratis-toaster[data-position^='bottom'] {
1268
+ bottom: 1rem;
1269
+ }
1270
+ .cratis-toaster[data-position$='left'] {
1271
+ left: 1rem;
1272
+ }
1273
+ .cratis-toaster[data-position$='right'] {
1274
+ right: 1rem;
1275
+ }
1276
+ .cratis-toaster[data-position$='center'] {
1277
+ left: 50%;
1278
+ transform: translateX(-50%);
1279
+ }
1280
+
1281
+ .cratis-toast {
1282
+ display: flex;
1283
+ min-width: 18rem;
1284
+ max-width: 26rem;
1285
+ padding: 0.75rem 1rem;
1286
+ align-items: flex-start;
1287
+ gap: 0.625rem;
1288
+ border: 1px solid var(--cratis-surface-border);
1289
+ border-inline-start: 4px solid var(--cratis-surface-border);
1290
+ border-radius: var(--cratis-border-radius);
1291
+ background: var(--cratis-surface-overlay);
1292
+ color: var(--cratis-text-color);
1293
+ box-shadow: var(--cratis-shadow-toast);
1294
+ pointer-events: auto;
1295
+ }
1296
+ .cratis-toast__content {
1297
+ display: flex;
1298
+ min-width: 0;
1299
+ flex: 1;
1300
+ flex-direction: column;
1301
+ gap: 0.125rem;
1302
+ }
1303
+ .cratis-toast__title {
1304
+ font-weight: 600;
1305
+ }
1306
+ .cratis-toast__description {
1307
+ color: var(--cratis-text-color-secondary);
1308
+ font-size: 0.875rem;
1309
+ white-space: pre-line;
1310
+ }
1311
+ .cratis-toast__icon {
1312
+ flex: 0 0 auto;
1313
+ }
1314
+ .cratis-toast__close {
1315
+ display: inline-flex;
1316
+ width: 1.75rem;
1317
+ height: 1.75rem;
1318
+ padding: 0;
1319
+ align-items: center;
1320
+ justify-content: center;
1321
+ border: 0;
1322
+ border-radius: 50%;
1323
+ background: transparent;
1324
+ color: var(--cratis-text-color-secondary);
1325
+ cursor: pointer;
1326
+ }
1327
+ .cratis-toast__close:hover {
1328
+ background: var(--cratis-surface-hover);
1329
+ color: var(--cratis-text-color);
1330
+ }
1331
+ .cratis-toast__close:focus-visible {
1332
+ outline: none;
1333
+ box-shadow: var(--cratis-focus-ring);
1334
+ }
1335
+ .cratis-toast__action {
1336
+ align-self: flex-start;
1337
+ margin-top: 0.4rem;
1338
+ }
1339
+ .cratis-toast[data-loading='true'] .cratis-toast__icon {
1340
+ animation: cratis-toast-spin 800ms linear infinite;
1341
+ }
1342
+ .cratis-toast[data-severity='success'] {
1343
+ border-inline-start-color: var(--cratis-green-500);
1344
+ }
1345
+ .cratis-toast[data-severity='info'] {
1346
+ border-inline-start-color: var(--cratis-primary-color);
1347
+ }
1348
+ .cratis-toast[data-severity='warn'] {
1349
+ border-inline-start-color: var(--cratis-orange-500);
1350
+ }
1351
+ .cratis-toast[data-severity='error'] {
1352
+ border-inline-start-color: var(--cratis-red-500);
1353
+ }
1354
+ .cratis-toast[data-severity='success'] .cratis-toast__icon {
1355
+ color: var(--cratis-green-500);
1356
+ }
1357
+ .cratis-toast[data-severity='info'] .cratis-toast__icon {
1358
+ color: var(--cratis-primary-color);
1359
+ }
1360
+ .cratis-toast[data-severity='warn'] .cratis-toast__icon {
1361
+ color: var(--cratis-orange-500);
1362
+ }
1363
+ .cratis-toast[data-severity='error'] .cratis-toast__icon {
1364
+ color: var(--cratis-red-500);
1365
+ }
1366
+
1367
+ @keyframes cratis-toast-spin {
1368
+ to {
1369
+ transform: rotate(360deg);
1370
+ }
1371
+ }
1372
+ @media (prefers-reduced-motion: reduce) {
1373
+ .cratis-toast__icon {
1374
+ animation: none !important;
1375
+ }
1376
+ }
1377
+ @media (forced-colors: active) {
1378
+ .cratis-toast {
1379
+ border-color: CanvasText;
1380
+ }
1381
+ .cratis-toast__close:focus-visible {
1382
+ outline: 2px solid Highlight;
1383
+ outline-offset: 2px;
1384
+ box-shadow: none;
1385
+ }
1386
+ }
1387
+
1388
+ }