@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,1913 @@
1
+ @layer cratis-components {
2
+ /* @cratis/components/SchemaEditor/styles — requires @cratis/components/styles/base. Areas: Common, DataTables, Display, Dropdown, Notifications, SchemaEditor. */
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
+ /* ── ./DataTables/ColumnFilterMenu.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-filter-trigger {
1093
+ display: inline-flex;
1094
+ align-items: center;
1095
+ justify-content: center;
1096
+ padding: 0.25rem;
1097
+ border: none;
1098
+ background: transparent;
1099
+ color: var(--cratis-text-color-secondary);
1100
+ cursor: pointer;
1101
+ border-radius: 0.25rem;
1102
+ }
1103
+
1104
+ .cratis-filter-trigger:hover {
1105
+ background: var(--cratis-surface-hover);
1106
+ color: var(--cratis-text-color);
1107
+ }
1108
+
1109
+ .cratis-filter-trigger[data-active='true'] {
1110
+ color: var(--cratis-primary-color);
1111
+ }
1112
+
1113
+ .cratis-filter-trigger:focus-visible {
1114
+ outline: none;
1115
+ box-shadow: var(--cratis-focus-ring);
1116
+ }
1117
+
1118
+ .cratis-filter-popover {
1119
+ z-index: var(--cratis-z-index-filter);
1120
+ }
1121
+
1122
+ .cratis-filter-menu {
1123
+ display: flex;
1124
+ flex-direction: column;
1125
+ gap: 0.5rem;
1126
+ min-width: 14rem;
1127
+ padding: 0.5rem;
1128
+ background: var(--cratis-surface-overlay);
1129
+ border: 1px solid var(--cratis-surface-border);
1130
+ border-radius: var(--cratis-border-radius);
1131
+ box-shadow: var(--cratis-shadow-overlay);
1132
+ }
1133
+
1134
+ .cratis-filter-menu__input {
1135
+ box-sizing: border-box;
1136
+ min-height: var(--cratis-control-height);
1137
+ padding: 0.625rem 0.75rem;
1138
+ border: 1px solid var(--cratis-control-border);
1139
+ border-radius: var(--cratis-border-radius);
1140
+ background: var(--cratis-control-background);
1141
+ color: var(--cratis-text-color);
1142
+ font: inherit;
1143
+ }
1144
+
1145
+ .cratis-filter-menu__input:focus-visible {
1146
+ outline: none;
1147
+ border-color: var(--cratis-primary-color);
1148
+ box-shadow: var(--cratis-focus-ring);
1149
+ }
1150
+
1151
+ .cratis-filter-menu-actions {
1152
+ display: flex;
1153
+ justify-content: space-between;
1154
+ gap: 0.5rem;
1155
+ }
1156
+
1157
+ /* ── ./DataTables/DataTableCore.css ─────────────────────────────────────── */
1158
+ /* Copyright (c) Cratis. All rights reserved. */
1159
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1160
+
1161
+ .cratis-datatable__sr-only {
1162
+ position: absolute;
1163
+ width: 1px;
1164
+ height: 1px;
1165
+ padding: 0;
1166
+ margin: -1px;
1167
+ overflow: hidden;
1168
+ clip: rect(0, 0, 0, 0);
1169
+ white-space: nowrap;
1170
+ border: 0;
1171
+ }
1172
+
1173
+ .cratis-datatable {
1174
+ width: 100%;
1175
+ color: var(--cratis-text-color);
1176
+ }
1177
+
1178
+ /* The bounded scroll container is sized with a percentage `max-height`, which CSS resolves
1179
+ to `none` whenever the containing block has no definite height (CSS 2.1 10.7). The root
1180
+ is `height: auto` by default, so a scrollable table would grow past its parent and get
1181
+ clipped instead of scrolling. Giving the scrollable root a definite height re-establishes
1182
+ the chain, and the flex child absorbs the remaining space. */
1183
+ .cratis-datatable--scrollable {
1184
+ display: flex;
1185
+ flex-direction: column;
1186
+ height: 100%;
1187
+ min-height: 0;
1188
+ }
1189
+
1190
+ .cratis-datatable--scrollable .cratis-datatable__container {
1191
+ flex: 1 1 auto;
1192
+ min-height: 0;
1193
+ }
1194
+ .cratis-datatable-header-cell {
1195
+ display: flex;
1196
+ min-width: 0;
1197
+ align-items: center;
1198
+ justify-content: space-between;
1199
+ gap: 0.35rem;
1200
+ }
1201
+ .cratis-datatable-search {
1202
+ padding: 0.5rem;
1203
+ border-bottom: 1px solid var(--cratis-surface-border);
1204
+ }
1205
+ .cratis-datatable-search__input {
1206
+ width: 100%;
1207
+ box-sizing: border-box;
1208
+ min-height: var(--cratis-control-height);
1209
+ padding: 0.625rem 0.75rem;
1210
+ border: 1px solid var(--cratis-control-border);
1211
+ border-radius: var(--cratis-border-radius);
1212
+ background: var(--cratis-control-background);
1213
+ color: var(--cratis-text-color);
1214
+ font: inherit;
1215
+ }
1216
+ .cratis-datatable-search__input:focus-visible {
1217
+ outline: none;
1218
+ border-color: var(--cratis-primary-color);
1219
+ box-shadow: var(--cratis-focus-ring);
1220
+ }
1221
+ .cratis-datatable__container {
1222
+ width: 100%;
1223
+ overflow-x: auto;
1224
+ }
1225
+ .cratis-datatable__table {
1226
+ width: 100%;
1227
+ border-spacing: 0;
1228
+ border-collapse: collapse;
1229
+ }
1230
+ .cratis-datatable__header-cell {
1231
+ position: sticky;
1232
+ top: 0;
1233
+ z-index: 1;
1234
+ padding: 0.875rem 1rem;
1235
+ border-bottom: 1px solid var(--cratis-surface-border);
1236
+ background: var(--cratis-surface-section);
1237
+ color: var(--cratis-text-color);
1238
+ text-align: start;
1239
+ font-size: 0.875rem;
1240
+ font-weight: 700;
1241
+ }
1242
+ .cratis-datatable__sort {
1243
+ display: inline-flex;
1244
+ padding: 0;
1245
+ align-items: center;
1246
+ gap: 0.35rem;
1247
+ border: 0;
1248
+ background: transparent;
1249
+ color: inherit;
1250
+ font: inherit;
1251
+ font-weight: inherit;
1252
+ cursor: pointer;
1253
+ }
1254
+ .cratis-datatable__sort:focus-visible {
1255
+ outline: none;
1256
+ border-radius: 0.2rem;
1257
+ box-shadow: var(--cratis-focus-ring);
1258
+ }
1259
+ .cratis-datatable__cell {
1260
+ padding: 0.875rem 1rem;
1261
+ border-bottom: 1px solid var(--cratis-surface-border);
1262
+ vertical-align: middle;
1263
+ }
1264
+ .cratis-datatable__row {
1265
+ background: var(--cratis-surface-card);
1266
+ transition: background-color 100ms ease;
1267
+ }
1268
+ .cratis-datatable__row[data-interactive='true']:hover {
1269
+ background: var(--cratis-surface-hover);
1270
+ }
1271
+ .cratis-datatable__row:focus-visible {
1272
+ outline: none;
1273
+ box-shadow: inset var(--cratis-focus-ring);
1274
+ }
1275
+ .cratis-datatable__row[data-selected='true'] {
1276
+ background: var(--cratis-highlight-bg);
1277
+ color: var(--cratis-highlight-text-color);
1278
+ }
1279
+ .cratis-datatable__empty-cell {
1280
+ padding: 2rem 1rem;
1281
+ color: var(--cratis-text-color-secondary);
1282
+ text-align: center;
1283
+ }
1284
+
1285
+ @media (prefers-reduced-motion: reduce) {
1286
+ .cratis-datatable__row {
1287
+ transition: none;
1288
+ }
1289
+ }
1290
+ @media (forced-colors: active) {
1291
+ .cratis-datatable-search__input,
1292
+ .cratis-datatable__header-cell,
1293
+ .cratis-datatable__cell {
1294
+ border-color: CanvasText;
1295
+ }
1296
+ .cratis-datatable__row[data-selected='true'] {
1297
+ outline: 2px solid Highlight;
1298
+ }
1299
+ }
1300
+
1301
+ /* ── ./DataTables/TablePaginator.css ─────────────────────────────────────── */
1302
+ /* Copyright (c) Cratis. All rights reserved. */
1303
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1304
+
1305
+ .cratis-table-paginator {
1306
+ display: flex;
1307
+ align-items: center;
1308
+ justify-content: center;
1309
+ gap: 0.25rem;
1310
+ padding: 0.25rem;
1311
+ }
1312
+
1313
+ .cratis-table-paginator-info {
1314
+ font-size: 0.875rem;
1315
+ color: var(--cratis-text-color-secondary);
1316
+ padding: 0 0.5rem;
1317
+ }
1318
+
1319
+ .cratis-table-paginator-range {
1320
+ font-size: 0.8125rem;
1321
+ color: var(--cratis-text-color-secondary);
1322
+ margin-right: auto;
1323
+ padding: 0 0.5rem;
1324
+ }
1325
+
1326
+ /* ── ./Display/Display.css ─────────────────────────────────────── */
1327
+ /* Copyright (c) Cratis. All rights reserved. */
1328
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1329
+
1330
+ .cratis-avatar {
1331
+ display: inline-flex;
1332
+ width: 2rem;
1333
+ height: 2rem;
1334
+ overflow: hidden;
1335
+ align-items: center;
1336
+ justify-content: center;
1337
+ flex: 0 0 auto;
1338
+ border-radius: 50%;
1339
+ background: var(--cratis-surface-100);
1340
+ color: var(--cratis-text-color);
1341
+ }
1342
+ .cratis-avatar[data-size='large'] {
1343
+ width: 3rem;
1344
+ height: 3rem;
1345
+ }
1346
+ .cratis-avatar[data-size='xlarge'] {
1347
+ width: 4rem;
1348
+ height: 4rem;
1349
+ }
1350
+ .cratis-avatar__image {
1351
+ width: 100%;
1352
+ height: 100%;
1353
+ object-fit: cover;
1354
+ }
1355
+ .cratis-avatar__fallback {
1356
+ display: inline-flex;
1357
+ align-items: center;
1358
+ justify-content: center;
1359
+ font-weight: 600;
1360
+ }
1361
+
1362
+ .cratis-badge,
1363
+ .cratis-tag,
1364
+ .cratis-chip {
1365
+ display: inline-flex;
1366
+ align-items: center;
1367
+ justify-content: center;
1368
+ gap: 0.35rem;
1369
+ border-radius: var(--cratis-border-radius);
1370
+ background: var(--cratis-surface-100);
1371
+ color: var(--cratis-text-color);
1372
+ line-height: 1;
1373
+ }
1374
+ .cratis-badge {
1375
+ min-width: 1.5rem;
1376
+ min-height: 1.5rem;
1377
+ padding: 0.2rem 0.35rem;
1378
+ font-size: 0.75rem;
1379
+ font-weight: 700;
1380
+ }
1381
+ .cratis-badge[data-size='large'] {
1382
+ min-width: 1.75rem;
1383
+ min-height: 1.75rem;
1384
+ font-size: 0.875rem;
1385
+ }
1386
+ .cratis-badge[data-size='xlarge'] {
1387
+ min-width: 2.25rem;
1388
+ min-height: 2.25rem;
1389
+ font-size: 1rem;
1390
+ }
1391
+ .cratis-badge[data-shape='circle'] {
1392
+ padding: 0;
1393
+ border-radius: 50%;
1394
+ }
1395
+ .cratis-tag {
1396
+ padding: 0.35rem 0.55rem;
1397
+ font-size: 0.75rem;
1398
+ font-weight: 600;
1399
+ }
1400
+ .cratis-tag[data-rounded='true'] {
1401
+ border-radius: 999px;
1402
+ }
1403
+ .cratis-chip {
1404
+ padding: 0.35rem 0.5rem;
1405
+ font-size: 0.875rem;
1406
+ }
1407
+
1408
+ .cratis-badge[data-severity='info'],
1409
+ .cratis-tag[data-severity='info'] {
1410
+ background: var(--cratis-info-background);
1411
+ color: var(--cratis-info-text);
1412
+ }
1413
+ .cratis-badge[data-severity='success'],
1414
+ .cratis-tag[data-severity='success'] {
1415
+ background: var(--cratis-success-background);
1416
+ color: var(--cratis-success-text);
1417
+ }
1418
+ .cratis-badge[data-severity='warn'],
1419
+ .cratis-tag[data-severity='warn'] {
1420
+ background: var(--cratis-warning-background);
1421
+ color: var(--cratis-warning-text);
1422
+ }
1423
+ .cratis-badge[data-severity='danger'],
1424
+ .cratis-tag[data-severity='danger'] {
1425
+ background: var(--cratis-danger-background);
1426
+ color: var(--cratis-danger-text);
1427
+ }
1428
+ .cratis-badge[data-severity='contrast'],
1429
+ .cratis-tag[data-severity='contrast'] {
1430
+ background: var(--cratis-text-color);
1431
+ color: var(--cratis-surface-0);
1432
+ }
1433
+
1434
+ .cratis-chip__remove {
1435
+ display: inline-flex;
1436
+ width: 1.25rem;
1437
+ height: 1.25rem;
1438
+ padding: 0;
1439
+ align-items: center;
1440
+ justify-content: center;
1441
+ border: 0;
1442
+ border-radius: 50%;
1443
+ background: transparent;
1444
+ color: inherit;
1445
+ cursor: pointer;
1446
+ }
1447
+ .cratis-chip__remove:hover {
1448
+ background: var(--cratis-surface-hover);
1449
+ }
1450
+ .cratis-chip__remove:focus-visible {
1451
+ outline: none;
1452
+ box-shadow: var(--cratis-focus-ring);
1453
+ }
1454
+
1455
+ .cratis-message {
1456
+ display: flex;
1457
+ align-items: flex-start;
1458
+ gap: 0.6rem;
1459
+ padding: 0.75rem 0.9rem;
1460
+ border: 1px solid var(--cratis-surface-border);
1461
+ border-radius: var(--cratis-border-radius);
1462
+ background: var(--cratis-surface-section);
1463
+ color: var(--cratis-text-color);
1464
+ }
1465
+ .cratis-message[data-severity='info'] {
1466
+ border-color: var(--cratis-primary-color);
1467
+ }
1468
+ .cratis-message[data-severity='success'] {
1469
+ border-color: var(--cratis-green-500);
1470
+ }
1471
+ .cratis-message[data-severity='warn'] {
1472
+ border-color: var(--cratis-orange-500);
1473
+ }
1474
+ .cratis-message[data-severity='error'] {
1475
+ border-color: var(--cratis-red-500);
1476
+ }
1477
+ .cratis-message__icon {
1478
+ flex: 0 0 auto;
1479
+ }
1480
+ .cratis-message__text {
1481
+ min-width: 0;
1482
+ }
1483
+
1484
+ .cratis-progress-bar {
1485
+ position: relative;
1486
+ height: 1.5rem;
1487
+ overflow: hidden;
1488
+ border-radius: 999px;
1489
+ background: var(--cratis-surface-100);
1490
+ }
1491
+ .cratis-progress-bar__indicator {
1492
+ display: flex;
1493
+ height: 100%;
1494
+ min-width: 0;
1495
+ align-items: center;
1496
+ justify-content: center;
1497
+ background: var(--cratis-action-background);
1498
+ color: var(--cratis-action-text);
1499
+ transition: width 160ms ease;
1500
+ }
1501
+ .cratis-progress-bar[data-mode='indeterminate'] .cratis-progress-bar__indicator {
1502
+ width: 40%;
1503
+ animation: cratis-progress-indeterminate 1.2s ease-in-out infinite;
1504
+ }
1505
+ .cratis-progress-bar__label {
1506
+ padding-inline: 0.35rem;
1507
+ font-size: 0.7rem;
1508
+ }
1509
+
1510
+ .cratis-progress-spinner {
1511
+ display: inline-flex;
1512
+ width: 2rem;
1513
+ height: 2rem;
1514
+ }
1515
+ .cratis-progress-spinner__svg {
1516
+ width: 100%;
1517
+ height: 100%;
1518
+ animation: cratis-spinner-rotate 1s linear infinite;
1519
+ }
1520
+ .cratis-progress-spinner__track,
1521
+ .cratis-progress-spinner__range {
1522
+ fill: none;
1523
+ stroke-width: 4;
1524
+ }
1525
+ .cratis-progress-spinner__track {
1526
+ stroke: var(--cratis-surface-100);
1527
+ }
1528
+ .cratis-progress-spinner__range {
1529
+ stroke: var(--cratis-primary-color);
1530
+ stroke-linecap: round;
1531
+ stroke-dasharray: 90 150;
1532
+ }
1533
+
1534
+ .cratis-skeleton {
1535
+ display: block;
1536
+ background: linear-gradient(
1537
+ 90deg,
1538
+ var(--cratis-surface-100),
1539
+ var(--cratis-surface-hover),
1540
+ var(--cratis-surface-100)
1541
+ );
1542
+ background-size: 200% 100%;
1543
+ animation: cratis-skeleton-pulse 1.4s ease-in-out infinite;
1544
+ }
1545
+
1546
+ @keyframes cratis-progress-indeterminate {
1547
+ from {
1548
+ transform: translateX(-120%);
1549
+ }
1550
+ to {
1551
+ transform: translateX(350%);
1552
+ }
1553
+ }
1554
+ @keyframes cratis-spinner-rotate {
1555
+ to {
1556
+ transform: rotate(360deg);
1557
+ }
1558
+ }
1559
+ @keyframes cratis-skeleton-pulse {
1560
+ from {
1561
+ background-position: 200% 0;
1562
+ }
1563
+ to {
1564
+ background-position: -200% 0;
1565
+ }
1566
+ }
1567
+
1568
+ @media (prefers-reduced-motion: reduce) {
1569
+ .cratis-progress-bar__indicator,
1570
+ .cratis-progress-spinner__svg,
1571
+ .cratis-skeleton {
1572
+ animation: none;
1573
+ transition: none;
1574
+ }
1575
+ }
1576
+
1577
+ @media (forced-colors: active) {
1578
+ .cratis-message,
1579
+ .cratis-chip,
1580
+ .cratis-tag,
1581
+ .cratis-badge {
1582
+ border: 1px solid CanvasText;
1583
+ }
1584
+ .cratis-progress-bar__indicator,
1585
+ .cratis-progress-spinner__range {
1586
+ background: Highlight;
1587
+ stroke: Highlight;
1588
+ }
1589
+ }
1590
+
1591
+ /* ── ./Dropdown/Dropdown.css ─────────────────────────────────────── */
1592
+ /* Copyright (c) Cratis. All rights reserved. */
1593
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1594
+
1595
+ .cratis-dropdown {
1596
+ position: relative;
1597
+ display: inline-flex;
1598
+ min-width: 10rem;
1599
+ color: var(--cratis-text-color);
1600
+ }
1601
+ .cratis-dropdown__select,
1602
+ .cratis-dropdown__combobox {
1603
+ position: relative;
1604
+ display: flex;
1605
+ width: 100%;
1606
+ }
1607
+ .cratis-dropdown__trigger,
1608
+ .cratis-dropdown__filter,
1609
+ .cratis-dropdown__multiple {
1610
+ width: 100%;
1611
+ box-sizing: border-box;
1612
+ min-height: var(--cratis-control-height);
1613
+ border: 1px solid var(--cratis-control-border);
1614
+ border-radius: var(--cratis-border-radius);
1615
+ background: var(--cratis-control-background);
1616
+ color: var(--cratis-text-color);
1617
+ font: inherit;
1618
+ }
1619
+ .cratis-dropdown__trigger {
1620
+ display: flex;
1621
+ padding: 0.625rem 2.25rem 0.625rem 0.75rem;
1622
+ align-items: center;
1623
+ justify-content: space-between;
1624
+ gap: 0.5rem;
1625
+ text-align: start;
1626
+ cursor: pointer;
1627
+ }
1628
+ .cratis-dropdown__filter {
1629
+ padding: 0.625rem 4rem 0.625rem 0.75rem;
1630
+ }
1631
+ .cratis-dropdown:not([data-disabled='true'])
1632
+ :is(.cratis-dropdown__trigger, .cratis-dropdown__filter):hover {
1633
+ border-color: var(--cratis-primary-300);
1634
+ background: var(--cratis-surface-hover);
1635
+ }
1636
+ .cratis-dropdown__trigger[data-pressed] {
1637
+ background: var(--cratis-highlight-bg);
1638
+ }
1639
+ .cratis-dropdown__multiple {
1640
+ padding: 0.4rem;
1641
+ }
1642
+ .cratis-dropdown__trigger:focus-visible,
1643
+ .cratis-dropdown__filter:focus-visible,
1644
+ .cratis-dropdown__multiple:focus-visible {
1645
+ outline: none;
1646
+ box-shadow: var(--cratis-focus-ring);
1647
+ border-color: var(--cratis-primary-color);
1648
+ }
1649
+ .cratis-dropdown[data-invalid='true']
1650
+ :is(.cratis-dropdown__trigger, .cratis-dropdown__filter, .cratis-dropdown__multiple) {
1651
+ border-color: var(--cratis-red-500);
1652
+ }
1653
+ .cratis-dropdown[data-disabled='true'] {
1654
+ opacity: var(--cratis-disabled-opacity);
1655
+ }
1656
+ .cratis-dropdown__value {
1657
+ min-width: 0;
1658
+ overflow: hidden;
1659
+ text-overflow: ellipsis;
1660
+ white-space: nowrap;
1661
+ }
1662
+ .cratis-dropdown__indicator {
1663
+ position: absolute;
1664
+ inset-inline-end: 0.55rem;
1665
+ top: 50%;
1666
+ display: inline-flex;
1667
+ width: 1.5rem;
1668
+ height: 1.5rem;
1669
+ padding: 0;
1670
+ align-items: center;
1671
+ justify-content: center;
1672
+ transform: translateY(-50%);
1673
+ border: 0;
1674
+ background: transparent;
1675
+ color: var(--cratis-text-color-secondary);
1676
+ }
1677
+ .cratis-dropdown__clear {
1678
+ position: absolute;
1679
+ inset-inline-end: 2.15rem;
1680
+ top: 50%;
1681
+ z-index: 1;
1682
+ display: inline-flex;
1683
+ width: 1.5rem;
1684
+ height: 1.5rem;
1685
+ padding: 0;
1686
+ align-items: center;
1687
+ justify-content: center;
1688
+ transform: translateY(-50%);
1689
+ border: 0;
1690
+ border-radius: 50%;
1691
+ background: transparent;
1692
+ color: var(--cratis-text-color-secondary);
1693
+ cursor: pointer;
1694
+ }
1695
+ .cratis-dropdown__clear:hover {
1696
+ background: var(--cratis-surface-hover);
1697
+ color: var(--cratis-text-color);
1698
+ }
1699
+ .cratis-dropdown__clear:focus-visible {
1700
+ outline: none;
1701
+ box-shadow: var(--cratis-focus-ring);
1702
+ }
1703
+ .cratis-dropdown__popover {
1704
+ z-index: var(--cratis-z-index-overlay);
1705
+ min-width: var(--trigger-width);
1706
+ max-height: min(20rem, var(--available-height));
1707
+ overflow: auto;
1708
+ border: 1px solid var(--cratis-surface-border);
1709
+ border-radius: var(--cratis-border-radius);
1710
+ background: var(--cratis-surface-overlay);
1711
+ color: var(--cratis-text-color);
1712
+ box-shadow: var(--cratis-shadow-overlay);
1713
+ }
1714
+ .cratis-dropdown__listbox {
1715
+ padding: 0.3rem;
1716
+ outline: none;
1717
+ }
1718
+ .cratis-dropdown__option {
1719
+ display: flex;
1720
+ min-height: var(--cratis-control-height);
1721
+ padding: 0.75rem 1.25rem;
1722
+ align-items: center;
1723
+ border-radius: calc(var(--cratis-border-radius) * 0.75);
1724
+ outline: none;
1725
+ cursor: default;
1726
+ }
1727
+ .cratis-dropdown__option[data-focused] {
1728
+ background: var(--cratis-surface-hover);
1729
+ }
1730
+ .cratis-dropdown__option[data-selected] {
1731
+ background: var(--cratis-highlight-bg);
1732
+ color: var(--cratis-highlight-text-color);
1733
+ }
1734
+ .cratis-dropdown__option[data-focus-visible] {
1735
+ box-shadow: inset var(--cratis-focus-ring);
1736
+ }
1737
+ .cratis-dropdown__option[data-disabled] {
1738
+ opacity: 0.5;
1739
+ }
1740
+
1741
+ @media (forced-colors: active) {
1742
+ .cratis-dropdown__trigger,
1743
+ .cratis-dropdown__filter,
1744
+ .cratis-dropdown__multiple,
1745
+ .cratis-dropdown__popover {
1746
+ border-color: CanvasText;
1747
+ }
1748
+ .cratis-dropdown__option[data-focused],
1749
+ .cratis-dropdown__option[data-selected] {
1750
+ outline: 2px solid Highlight;
1751
+ }
1752
+ }
1753
+
1754
+ /* ── ./Notifications/Toaster.css ─────────────────────────────────────── */
1755
+ /* Copyright (c) Cratis. All rights reserved. */
1756
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1757
+
1758
+ .cratis-toaster {
1759
+ position: fixed;
1760
+ z-index: var(--cratis-z-index-toast);
1761
+ display: flex;
1762
+ width: min(26rem, calc(100vw - 2rem));
1763
+ flex-direction: column;
1764
+ gap: 0.75rem;
1765
+ pointer-events: none;
1766
+ }
1767
+ .cratis-toaster[data-position^='top'] {
1768
+ top: 1rem;
1769
+ }
1770
+ .cratis-toaster[data-position^='bottom'] {
1771
+ bottom: 1rem;
1772
+ }
1773
+ .cratis-toaster[data-position$='left'] {
1774
+ left: 1rem;
1775
+ }
1776
+ .cratis-toaster[data-position$='right'] {
1777
+ right: 1rem;
1778
+ }
1779
+ .cratis-toaster[data-position$='center'] {
1780
+ left: 50%;
1781
+ transform: translateX(-50%);
1782
+ }
1783
+
1784
+ .cratis-toast {
1785
+ display: flex;
1786
+ min-width: 18rem;
1787
+ max-width: 26rem;
1788
+ padding: 0.75rem 1rem;
1789
+ align-items: flex-start;
1790
+ gap: 0.625rem;
1791
+ border: 1px solid var(--cratis-surface-border);
1792
+ border-inline-start: 4px solid var(--cratis-surface-border);
1793
+ border-radius: var(--cratis-border-radius);
1794
+ background: var(--cratis-surface-overlay);
1795
+ color: var(--cratis-text-color);
1796
+ box-shadow: var(--cratis-shadow-toast);
1797
+ pointer-events: auto;
1798
+ }
1799
+ .cratis-toast__content {
1800
+ display: flex;
1801
+ min-width: 0;
1802
+ flex: 1;
1803
+ flex-direction: column;
1804
+ gap: 0.125rem;
1805
+ }
1806
+ .cratis-toast__title {
1807
+ font-weight: 600;
1808
+ }
1809
+ .cratis-toast__description {
1810
+ color: var(--cratis-text-color-secondary);
1811
+ font-size: 0.875rem;
1812
+ white-space: pre-line;
1813
+ }
1814
+ .cratis-toast__icon {
1815
+ flex: 0 0 auto;
1816
+ }
1817
+ .cratis-toast__close {
1818
+ display: inline-flex;
1819
+ width: 1.75rem;
1820
+ height: 1.75rem;
1821
+ padding: 0;
1822
+ align-items: center;
1823
+ justify-content: center;
1824
+ border: 0;
1825
+ border-radius: 50%;
1826
+ background: transparent;
1827
+ color: var(--cratis-text-color-secondary);
1828
+ cursor: pointer;
1829
+ }
1830
+ .cratis-toast__close:hover {
1831
+ background: var(--cratis-surface-hover);
1832
+ color: var(--cratis-text-color);
1833
+ }
1834
+ .cratis-toast__close:focus-visible {
1835
+ outline: none;
1836
+ box-shadow: var(--cratis-focus-ring);
1837
+ }
1838
+ .cratis-toast__action {
1839
+ align-self: flex-start;
1840
+ margin-top: 0.4rem;
1841
+ }
1842
+ .cratis-toast[data-loading='true'] .cratis-toast__icon {
1843
+ animation: cratis-toast-spin 800ms linear infinite;
1844
+ }
1845
+ .cratis-toast[data-severity='success'] {
1846
+ border-inline-start-color: var(--cratis-green-500);
1847
+ }
1848
+ .cratis-toast[data-severity='info'] {
1849
+ border-inline-start-color: var(--cratis-primary-color);
1850
+ }
1851
+ .cratis-toast[data-severity='warn'] {
1852
+ border-inline-start-color: var(--cratis-orange-500);
1853
+ }
1854
+ .cratis-toast[data-severity='error'] {
1855
+ border-inline-start-color: var(--cratis-red-500);
1856
+ }
1857
+ .cratis-toast[data-severity='success'] .cratis-toast__icon {
1858
+ color: var(--cratis-green-500);
1859
+ }
1860
+ .cratis-toast[data-severity='info'] .cratis-toast__icon {
1861
+ color: var(--cratis-primary-color);
1862
+ }
1863
+ .cratis-toast[data-severity='warn'] .cratis-toast__icon {
1864
+ color: var(--cratis-orange-500);
1865
+ }
1866
+ .cratis-toast[data-severity='error'] .cratis-toast__icon {
1867
+ color: var(--cratis-red-500);
1868
+ }
1869
+
1870
+ @keyframes cratis-toast-spin {
1871
+ to {
1872
+ transform: rotate(360deg);
1873
+ }
1874
+ }
1875
+ @media (prefers-reduced-motion: reduce) {
1876
+ .cratis-toast__icon {
1877
+ animation: none !important;
1878
+ }
1879
+ }
1880
+ @media (forced-colors: active) {
1881
+ .cratis-toast {
1882
+ border-color: CanvasText;
1883
+ }
1884
+ .cratis-toast__close:focus-visible {
1885
+ outline: 2px solid Highlight;
1886
+ outline-offset: 2px;
1887
+ box-shadow: none;
1888
+ }
1889
+ }
1890
+
1891
+ /* ── ./SchemaEditor/SchemaEditor.css ─────────────────────────────────────── */
1892
+ /* Copyright (c) Cratis. All rights reserved. */
1893
+ /* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
1894
+
1895
+ /* Was a CSS Module (`SchemaEditor.module.css`). A CSS Module is a *value* import in the JavaScript
1896
+ graph, so Node could not load the SchemaEditor subpath at all (Cratis/Components#118) and no
1897
+ bundler-free consumer could either. Rewritten as plain, explicitly prefixed class names that ship
1898
+ through `@cratis/components/styles` like every other component stylesheet. */
1899
+
1900
+ .cratis-schema-editor-navigable-row {
1901
+ cursor: pointer;
1902
+ transition: background-color 0.15s;
1903
+ }
1904
+
1905
+ .cratis-schema-editor-navigable-row:hover {
1906
+ background-color: var(--cratis-surface-hover) !important;
1907
+ }
1908
+
1909
+ .cratis-schema-editor-bottom-border {
1910
+ border-bottom: 1px solid var(--cratis-surface-border);
1911
+ }
1912
+
1913
+ }