@anguszhu/kroma-ui 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/dist/kroma.css +0 -804
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anguszhu/kroma-ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A small, themeable UI component library with React and Vue support.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  "import": "./dist/kroma-react.js",
25
25
  "require": "./dist/kroma-react.cjs"
26
26
  },
27
- "./style.css": "./dist/kroma.css",
27
+ "./style.css": "./dist/kroma-ui.css",
28
28
  "./package.json": "./package.json"
29
29
  },
30
30
  "scripts": {
package/dist/kroma.css DELETED
@@ -1,804 +0,0 @@
1
- @layer kroma.tokens, kroma.base, kroma.theme, kroma.components;
2
-
3
- /*
4
- * Design tokens. Every value here is a CSS custom property, so any of them
5
- * can be overridden by a consumer at any scope (:root, a theme wrapper,
6
- * or a single component instance) without touching this file.
7
- */
8
- @layer kroma.tokens {
9
- :root {
10
- --kr-grey-100: #f1f3f4;
11
- --kr-grey-200: #e8eaed;
12
- --kr-grey-300: #dadce0;
13
- --kr-grey-400: #bdc1c6;
14
- --kr-grey-500: #9aa0a6;
15
- --kr-grey-600: #80868b;
16
- --kr-grey-700: #5f6368;
17
- --kr-grey-800: #3c4043;
18
- --kr-grey-900: #202124;
19
-
20
- --kr-accent-300: #8ab4f8;
21
- --kr-accent-500: #4285ff;
22
- --kr-accent-600: #1a73e8;
23
-
24
- --kr-red-400: #b3261e;
25
-
26
- --kr-spacing-1: 4px;
27
- --kr-spacing-2: 8px;
28
- --kr-spacing-3: 16px;
29
-
30
- --kr-font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
31
- }
32
- }
33
-
34
- /*
35
- * Base semantic tokens, resolved from the palette above. Components only
36
- * ever reference these --kr-* semantic names, never the raw palette.
37
- * Override any of them to reskin the library.
38
- */
39
- @layer kroma.base {
40
- :root {
41
- --kr-theme: light-dark(var(--kr-accent-600), var(--kr-accent-300));
42
- --kr-theme-secondary: light-dark(var(--kr-accent-300), var(--kr-accent-600));
43
- --kr-ripple: light-dark(color-mix(in oklab, var(--kr-theme) 10%, transparent), color-mix(in oklab, var(--kr-theme) 40%, transparent));
44
-
45
- --kr-surface: light-dark(#fff, #292a2d);
46
- --kr-surface-invert: light-dark(var(--kr-grey-800), var(--kr-grey-100));
47
-
48
- --kr-on-theme: light-dark(var(--kr-grey-100), var(--kr-grey-900));
49
- --kr-on-surface: light-dark(var(--kr-grey-900), var(--kr-grey-100));
50
- --kr-on-surface-invert: light-dark(var(--kr-grey-100), var(--kr-grey-900));
51
- --kr-on-surface-secondary: light-dark(var(--kr-grey-700), var(--kr-grey-500));
52
- --kr-on-surface-tertiary: light-dark(var(--kr-grey-400), var(--kr-grey-700));
53
-
54
- --kr-error: light-dark(var(--kr-red-400), var(--kr-red-400));
55
- --kr-separator: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.15));
56
-
57
- --kr-button-primary-hover-background: light-dark(color-mix(in oklab, var(--kr-theme) 90%, transparent), color-mix(in oklab, var(--kr-theme) 80%, transparent));
58
- --kr-button-secondary-hover-background: light-dark(color-mix(in oklab, var(--kr-theme) 4%, transparent), color-mix(in oklab, var(--kr-theme) 10%, transparent));
59
- --kr-button-secondary-border-color: light-dark(var(--kr-grey-300), var(--kr-grey-700));
60
-
61
- --kr-textfield-background: light-dark(rgba(0, 0, 0, .06), rgba(0, 0, 0, .3));
62
- --kr-textfield-border: light-dark(var(--kr-grey-300), var(--kr-grey-700));
63
-
64
- --kr-switch-track-background-unchecked: light-dark(var(--kr-grey-200), var(--kr-grey-700));
65
- --kr-switch-track-background-checked: var(--kr-theme);
66
- --kr-switch-thumb-background-unchecked: light-dark(var(--kr-grey-600), var(--kr-grey-400));
67
- --kr-switch-thumb-background-checked: light-dark(#fff, color-mix(in oklab, var(--kr-theme) 45%, #000));
68
- }
69
-
70
- [data-kr-color-scheme="auto"] {
71
- color-scheme: light dark;
72
- }
73
-
74
- [data-kr-color-scheme="light"] {
75
- color-scheme: light only;
76
- }
77
-
78
- [data-kr-color-scheme="dark"] {
79
- color-scheme: dark only;
80
- }
81
- }
82
- /* Named <Transition> classes shared by KrOverlay, KrToast and friends. */
83
-
84
- .kr-fade-in-down-enter-active {
85
- transition: var(--kr-transition-duration, 0.2s) ease-out;
86
- transition-property: opacity, transform, filter;
87
- }
88
-
89
- .kr-fade-in-down-leave-active {
90
- transition: 0.1s cubic-bezier(1, 0.5, 0.8, 1);
91
- transition-property: opacity, transform, filter;
92
- }
93
-
94
- .kr-fade-in-down-enter-from,
95
- .kr-fade-in-down-leave-to {
96
- transform: translateY(50%);
97
- opacity: 0;
98
- filter: blur(6px);
99
- }
100
-
101
- .kr-fade-in-up-enter-active,
102
- .kr-fade-in-up-leave-active {
103
- transition: var(--kr-transition-duration, 0.2s) ease-out;
104
- transition-property: opacity, transform, filter;
105
- }
106
-
107
- .kr-fade-in-up-enter-from,
108
- .kr-fade-in-up-leave-to {
109
- transform: translateY(50%);
110
- filter: blur(6px);
111
- opacity: 0;
112
- }
113
-
114
- .kr-fade-in-enter-active,
115
- .kr-fade-in-leave-active {
116
- transition: opacity var(--kr-transition-duration, 0.2s);
117
- }
118
-
119
- .kr-fade-in-enter-from,
120
- .kr-fade-in-leave-to {
121
- opacity: 0;
122
- }
123
-
124
- .kr-slide-in-up-enter-active {
125
- transition-delay: 0.25s;
126
- }
127
-
128
- .kr-slide-in-up-enter-active,
129
- .kr-slide-in-up-leave-active {
130
- transition: transform var(--kr-transition-duration, 0.2s) ease;
131
- }
132
-
133
- .kr-slide-in-up-enter-from,
134
- .kr-slide-in-up-leave-to {
135
- transform: translateX(100%);
136
- }
137
- .kr-chevron {
138
- --r: 0.5px; /* corner radius */
139
-
140
- width: 4px;
141
- aspect-ratio: 1 / 2;
142
- --_g: calc(var(--r) / tan(22.5deg)) left var(--r), #000 98%, #0000 101%;
143
- -webkit-mask: conic-gradient(from 67.5deg at calc(var(--r) / (3 * sqrt(2) - 4) - 100% / tan(22.5deg)) 50%, #000 45deg, #0000 0)
144
- 0 0 / calc(100% - var(--r) / sqrt(2)) no-repeat,
145
- radial-gradient(var(--r) at calc(100% - var(--r) * sqrt(2)) 50%, #000 98%, #0000 101%),
146
- radial-gradient(var(--r) at top var(--_g)),
147
- radial-gradient(var(--r) at bottom var(--_g));
148
- clip-path: polygon(100% 50%, 0 100%, 0 0);
149
- background: currentColor;
150
- }
151
- .kr-empty {
152
- width: 100%;
153
- display: flex;
154
- flex-direction: column;
155
- align-items: center;
156
- text-align: center;
157
- font-family: var(--kr-font-family);
158
- }
159
-
160
- .kr-empty__icon {
161
- width: 64px;
162
- height: 64px;
163
- margin-bottom: clamp(var(--kr-spacing-3), 20%, calc(var(--kr-spacing-3) * 3));
164
- }
165
-
166
- .kr-empty__icon svg {
167
- width: 100%;
168
- height: 100%;
169
- }
170
-
171
- .kr-empty__title {
172
- margin: 0;
173
- font-size: 18px;
174
- color: var(--kr-on-surface);
175
- font-weight: normal;
176
- margin-bottom: var(--kr-spacing-1);
177
- }
178
-
179
- .kr-empty__description {
180
- padding: 0;
181
- margin: 0;
182
- font-size: 14px;
183
- color: var(--kr-on-surface-secondary);
184
- }
185
- .kr-section {
186
- padding: var(--kr-spacing-3);
187
- font-family: var(--kr-font-family);
188
- }
189
-
190
- .kr-section__header {
191
- padding-left: var(--kr-spacing-1);
192
- padding-bottom: var(--kr-spacing-3);
193
- }
194
-
195
- .kr-section__title {
196
- font-size: 14px;
197
- font-weight: 600;
198
- color: var(--kr-on-surface);
199
- margin: 0;
200
- }
201
-
202
- .kr-section__subtitle {
203
- font-size: 12px;
204
- font-weight: normal;
205
- color: var(--kr-on-surface-secondary);
206
- margin: 0;
207
- }
208
-
209
- .kr-section__content {
210
- background: var(--kr-surface);
211
- border-radius: 16px;
212
- overflow: hidden;
213
- border: 1px solid var(--kr-separator);
214
- }
215
- .kr-menu-item {
216
- color: var(--kr-on-surface);
217
- padding: var(--kr-spacing-2) var(--kr-spacing-3);
218
- cursor: default;
219
- display: grid;
220
- grid-template-columns: 1fr auto;
221
- align-items: center;
222
- grid-gap: var(--kr-spacing-3);
223
- border: 0;
224
- margin: 0;
225
- background: none;
226
- font-family: var(--kr-font-family);
227
- width: 100%;
228
- text-align: left;
229
- }
230
-
231
- .kr-menu-item:not(:disabled):hover,
232
- .kr-menu-item:not(:disabled):focus {
233
- background: var(--kr-ripple);
234
- }
235
-
236
- .kr-menu-item:disabled {
237
- opacity: 0.35;
238
- }
239
-
240
- .kr-menu-item__icon {
241
- font-size: 18px;
242
- width: 18px;
243
- height: 18px;
244
- display: flex;
245
- place-items: center;
246
- }
247
-
248
- .kr-menu-item__content {
249
- font-size: 14px;
250
- line-height: 18px;
251
- }
252
-
253
- .kr-menu-item--divider {
254
- background: var(--kr-separator);
255
- height: 1px;
256
- border: 0;
257
- transform: scaleY(0.5);
258
- margin: var(--kr-spacing-1) var(--kr-spacing-3);
259
- }
260
- .kr-button {
261
- border-radius: 8px;
262
- corner-shape: squircle;
263
- font-size: 14px;
264
- font-weight: 500;
265
- padding: 6px 16px;
266
- margin: 0;
267
- font-family: var(--kr-font-family);
268
- cursor: pointer;
269
- }
270
-
271
- .kr-button--primary {
272
- background: var(--kr-theme);
273
- color: var(--kr-on-theme);
274
- border: 0;
275
- }
276
-
277
- .kr-button--primary:hover {
278
- background: var(--kr-button-primary-hover-background);
279
- }
280
-
281
- .kr-button--primary:active {
282
- opacity: 0.8;
283
- box-shadow: 0 1px 2px color-mix(in oklab, var(--kr-theme) 5%, transparent), 0 3px 6px 2px color-mix(in oklab, var(--kr-theme) 5%, transparent);
284
- }
285
-
286
- .kr-button--secondary {
287
- background: transparent;
288
- color: var(--kr-theme);
289
- border: 1px solid var(--kr-button-secondary-border-color);
290
- }
291
-
292
- .kr-button--secondary:hover {
293
- background: var(--kr-button-secondary-hover-background);
294
- }
295
-
296
- .kr-button--secondary:active {
297
- background: var(--kr-ripple);
298
- }
299
-
300
- .kr-button--link {
301
- background: transparent;
302
- color: var(--kr-theme);
303
- border: 0;
304
- padding: 6px 4px;
305
- }
306
-
307
- .kr-button--link:hover {
308
- text-decoration: underline;
309
- }
310
-
311
- .kr-button:disabled {
312
- opacity: 0.5;
313
- cursor: not-allowed;
314
- }
315
- .kr-switch {
316
- --track-height: 16px;
317
- --track-width: 26px;
318
- --thumb-size: 8px;
319
-
320
- display: inline-flex;
321
- position: relative;
322
- }
323
-
324
- .kr-switch--inset {
325
- --track-height: 22px;
326
- --track-width: 44px;
327
- --thumb-size: 18px;
328
- }
329
-
330
- .kr-switch[data-checked="true"] .kr-switch__track {
331
- background: var(--kr-switch-track-background-checked);
332
- box-shadow: none;
333
- }
334
-
335
- .kr-switch[data-checked="true"] .kr-switch__thumb {
336
- background: var(--kr-switch-thumb-background-checked);
337
- transform: translateX(calc(var(--track-width) - var(--track-height))) scale(1.5);
338
- }
339
-
340
- .kr-switch__track {
341
- position: relative;
342
- width: var(--track-width);
343
- height: var(--track-height);
344
- background: var(--kr-switch-track-background-unchecked);
345
- border-radius: 999px;
346
- transition: background 0.2s ease-out;
347
- box-shadow: inset 0 0 0 1px var(--kr-switch-thumb-background-unchecked);
348
- }
349
-
350
- .kr-switch__thumb {
351
- position: absolute;
352
- top: calc(var(--track-height) / 2 - var(--thumb-size) / 2);
353
- left: calc(var(--track-height) / 2 - var(--thumb-size) / 2);
354
- background: var(--kr-switch-thumb-background-unchecked);
355
- width: var(--thumb-size);
356
- height: var(--thumb-size);
357
- border-radius: 50%;
358
- transition: transform 0.12s ease-out, background 0.12s ease-out;
359
- }
360
-
361
- .kr-switch[data-disabled="true"] {
362
- opacity: 0.5;
363
- cursor: not-allowed;
364
- }
365
- .kr-toggle-row {
366
- box-sizing: border-box;
367
- position: relative;
368
- padding: 16px;
369
- display: flex;
370
- align-items: center;
371
- touch-action: none;
372
- cursor: pointer;
373
- user-select: none;
374
- font-family: var(--kr-font-family);
375
- }
376
-
377
- .kr-toggle-row--with-separator {
378
- border-bottom: 1px solid var(--kr-separator);
379
- }
380
-
381
- .kr-toggle-row--disabled {
382
- cursor: not-allowed;
383
- }
384
-
385
- .kr-toggle-row:focus-within .kr-switch__track {
386
- outline: 2px solid color-mix(in oklab, var(--kr-theme) 35%, transparent);
387
- outline-offset: 2px;
388
- }
389
-
390
- .kr-toggle-row__label {
391
- flex: 1;
392
- }
393
-
394
- .kr-toggle-row__title {
395
- font-size: 14px;
396
- font-weight: 500;
397
- color: var(--kr-on-surface);
398
- }
399
-
400
- .kr-toggle-row__subtitle {
401
- font-size: 12px;
402
- color: var(--kr-on-surface-secondary);
403
- }
404
-
405
- .kr-toggle-row__native {
406
- position: absolute;
407
- width: 1px;
408
- height: 1px;
409
- margin: 0;
410
- opacity: 0;
411
- }
412
- .kr-textfield {
413
- display: flex;
414
- flex-direction: column;
415
- gap: var(--kr-spacing-2);
416
- font-family: var(--kr-font-family);
417
- }
418
-
419
- .kr-textfield__label-text {
420
- color: var(--kr-on-surface-secondary);
421
- font-size: 12px;
422
- font-weight: 600;
423
- }
424
-
425
- .kr-textfield__input {
426
- flex: 1;
427
- box-sizing: border-box;
428
- width: 100%;
429
- padding: var(--kr-spacing-2);
430
- font-size: 14px;
431
- color: var(--kr-on-surface);
432
- background: var(--kr-textfield-background);
433
- border-radius: 4px;
434
- border: 0;
435
- caret-color: var(--kr-theme);
436
- }
437
-
438
- .kr-textfield__input:focus:not(.kr-textfield__input--error) {
439
- outline: 2px solid var(--kr-theme);
440
- }
441
-
442
- .kr-textfield__input--error {
443
- outline: 1px solid var(--kr-error);
444
- caret-color: var(--kr-error);
445
- animation: kr-textfield-shake 0.2s ease-in-out 1 running;
446
- }
447
-
448
- @keyframes kr-textfield-shake {
449
- 0% { transform: translateX(0); }
450
- 25% { transform: translateX(-4px); }
451
- 50% { transform: translateX(4px); }
452
- 75% { transform: translateX(-4px); }
453
- 100% { transform: translateX(0); }
454
- }
455
- .kr-search-input {
456
- --kr-search-input-icon-size: 18px;
457
- --kr-search-input-padding: var(--kr-spacing-2);
458
-
459
- font-family: var(--kr-font-family);
460
- display: grid;
461
- grid-template-columns: auto 1fr auto;
462
- align-items: center;
463
- gap: 4px;
464
- border-radius: 999px;
465
- background: var(--kr-textfield-background);
466
- }
467
-
468
- .kr-search-input:focus-within .kr-search-input__icon {
469
- opacity: 0.6;
470
- }
471
-
472
- .kr-search-input__icon {
473
- display: grid;
474
- place-items: center;
475
- padding: var(--kr-search-input-padding);
476
- box-sizing: content-box;
477
- width: var(--kr-search-input-icon-size);
478
- height: var(--kr-search-input-icon-size);
479
- font-size: var(--kr-search-input-icon-size);
480
- color: var(--kr-on-surface);
481
- opacity: 0.35;
482
- transition: opacity 0.15s ease;
483
- cursor: default;
484
- }
485
-
486
- .kr-search-input__icon--clear {
487
- cursor: pointer;
488
- }
489
-
490
- .kr-search-input__input {
491
- border: none;
492
- outline: none;
493
- background-color: transparent;
494
- font-size: 14px;
495
- color: var(--kr-on-surface);
496
- }
497
-
498
- .kr-search-input__input:focus {
499
- outline: none;
500
- }
501
- .kr-select-item {
502
- display: flex;
503
- flex-direction: column;
504
- align-items: center;
505
- position: relative;
506
- cursor: pointer;
507
- user-select: none;
508
- font-family: var(--kr-font-family);
509
- }
510
-
511
- .kr-select-item__input {
512
- position: absolute;
513
- width: 1px;
514
- height: 1px;
515
- margin: 0;
516
- opacity: 0;
517
- }
518
-
519
- .kr-select-item__content {
520
- display: flex;
521
- align-items: center;
522
- justify-content: center;
523
- border: 1px solid var(--kr-separator);
524
- background: var(--kr-surface);
525
- transition: background 0.15s ease-out;
526
- overflow: hidden;
527
- }
528
-
529
- .kr-select-item__label {
530
- font-size: 12px;
531
- color: var(--kr-on-surface-secondary);
532
- padding-top: 6px;
533
- text-align: center;
534
- transition: color 0.15s ease;
535
- }
536
-
537
- .kr-select-item--square .kr-select-item__content {
538
- border-radius: 4px;
539
- }
540
-
541
- .kr-select-item--rounded .kr-select-item__content {
542
- border-radius: 8px;
543
- }
544
-
545
- .kr-select-item--circle .kr-select-item__content {
546
- border-radius: 50%;
547
- aspect-ratio: 1;
548
- }
549
-
550
- .kr-select-item--color .kr-select-item__content {
551
- min-height: 26px;
552
- min-width: 26px;
553
- }
554
-
555
- .kr-select-item--image .kr-select-item__content {
556
- background: var(--kr-surface);
557
- }
558
-
559
- .kr-select-item--icon .kr-select-item__content {
560
- padding: 8px;
561
- }
562
-
563
- .kr-select-item--text .kr-select-item__content {
564
- box-sizing: border-box;
565
- width: 100%;
566
- padding: 8px 16px;
567
- }
568
-
569
- .kr-select-item--card .kr-select-item__content {
570
- flex-direction: column;
571
- padding: 16px;
572
- text-align: center;
573
- min-height: 80px;
574
- border-radius: 12px;
575
- }
576
-
577
- .kr-select-item--selected .kr-select-item__content {
578
- border-color: var(--kr-theme);
579
- box-shadow: 0 0 0 1px var(--kr-theme);
580
- background: var(--kr-select-item-selected-background, color-mix(in oklab, var(--kr-theme) 8%, var(--kr-surface)));
581
- }
582
-
583
- .kr-select-item--selected .kr-select-item__label {
584
- font-weight: 500;
585
- color: var(--kr-theme);
586
- }
587
-
588
- .kr-select-item--disabled {
589
- opacity: 0.5;
590
- cursor: not-allowed;
591
- pointer-events: none;
592
- }
593
-
594
- .kr-select-item--stretch {
595
- width: 100%;
596
- }
597
-
598
- .kr-select-item--stretch .kr-select-item__content {
599
- width: 100%;
600
- }
601
-
602
- .kr-select-item:focus-within .kr-select-item__content,
603
- .kr-select-item:hover .kr-select-item__content {
604
- outline: 2px solid color-mix(in oklab, var(--kr-theme) 20%, transparent);
605
- outline-offset: 2px;
606
- }
607
- .kr-select-group {
608
- font-family: var(--kr-font-family);
609
- }
610
-
611
- .kr-select-group--with-separator {
612
- border-bottom: 1px solid var(--kr-separator);
613
- }
614
-
615
- .kr-select-group__header {
616
- box-sizing: border-box;
617
- padding: 16px 16px 6px;
618
- display: flex;
619
- align-items: center;
620
- }
621
-
622
- .kr-select-group__header__title {
623
- font-size: 14px;
624
- font-weight: 500;
625
- color: var(--kr-on-surface);
626
- }
627
-
628
- .kr-select-group__header__subtitle {
629
- font-size: 12px;
630
- color: var(--kr-on-surface-secondary);
631
- margin-left: 8px;
632
- }
633
-
634
- .kr-select-group__items {
635
- padding: 6px 16px 16px;
636
- align-items: center;
637
- }
638
-
639
- .kr-color-swatch {
640
- width: 24px;
641
- height: 24px;
642
- border-radius: inherit;
643
- }
644
-
645
- .kr-select-item-icon {
646
- width: 32px;
647
- height: 32px;
648
- fill: currentColor;
649
- }
650
- .kr-overlay {
651
- display: flex;
652
- position: fixed;
653
- top: 0;
654
- left: 0;
655
- bottom: 0;
656
- right: 0;
657
- pointer-events: none;
658
- isolation: isolate;
659
- z-index: 9999;
660
- }
661
-
662
- .kr-overlay__scrim {
663
- pointer-events: auto;
664
- background: var(--kr-overlay-background, rgba(0, 0, 0, 0.6));
665
- position: fixed;
666
- top: 0;
667
- left: 0;
668
- bottom: 0;
669
- right: 0;
670
- }
671
-
672
- .kr-overlay--centered .kr-overlay__content {
673
- top: 50%;
674
- left: 50%;
675
- transform: translate(-50%, -50%);
676
- }
677
-
678
- .kr-overlay__content {
679
- pointer-events: auto;
680
- position: absolute;
681
- contain: layout;
682
- outline: none;
683
- }
684
-
685
- /* The whole overlay (scrim + content) always fades by opacity... */
686
- [class*="-content-enter-active"],
687
- [class*="-content-leave-active"] {
688
- transition: opacity var(--kr-transition-duration, 0.2s);
689
- }
690
-
691
- [class*="-content-enter-from"],
692
- [class*="-content-leave-to"] {
693
- opacity: 0;
694
- }
695
-
696
- /* ...and content-transition="fade-in-up" adds motion to the content panel only. */
697
- .kr-fade-in-up-content-enter-active .kr-overlay__content,
698
- .kr-fade-in-up-content-leave-active .kr-overlay__content {
699
- transition: var(--kr-transition-duration, 0.2s) ease-out;
700
- transition-property: opacity, transform, filter;
701
- }
702
-
703
- .kr-fade-in-up-content-enter-from .kr-overlay__content,
704
- .kr-fade-in-up-content-leave-to .kr-overlay__content {
705
- transform: translateY(50%);
706
- filter: blur(6px);
707
- opacity: 0;
708
- }
709
- .kr-toast {
710
- position: absolute;
711
- bottom: var(--kr-spacing-2);
712
- display: flex;
713
- align-items: center;
714
- gap: var(--kr-spacing-2);
715
- margin: 0 var(--kr-spacing-2);
716
- width: calc(100% - var(--kr-spacing-2) * 2);
717
- border-radius: 4px;
718
- color: var(--kr-on-surface-invert);
719
- background: var(--kr-surface-invert);
720
- font-family: var(--kr-font-family);
721
- font-size: 14px;
722
- padding: var(--kr-spacing-3);
723
- isolation: isolate;
724
- z-index: 1;
725
- box-sizing: border-box;
726
- }
727
-
728
- .kr-toast__icon {
729
- display: flex;
730
- aspect-ratio: 1;
731
- }
732
-
733
- .kr-toast__text {
734
- flex: 1;
735
- cursor: default;
736
- }
737
-
738
- .kr-toast__actions {
739
- display: flex;
740
- align-items: center;
741
- gap: var(--kr-spacing-2);
742
- }
743
-
744
- .kr-toast__action {
745
- border: 0;
746
- border-radius: 4px;
747
- color: var(--kr-theme-secondary);
748
- background: transparent;
749
- font: inherit;
750
- font-weight: 600;
751
- padding: var(--kr-spacing-1) var(--kr-spacing-2);
752
- cursor: pointer;
753
- }
754
-
755
- .kr-toast__action:hover,
756
- .kr-toast__action:focus-visible {
757
- background: color-mix(in oklab, currentColor 12%, transparent);
758
- }
759
-
760
- .kr-toast__countdown {
761
- min-width: 2ch;
762
- color: color-mix(in oklab, currentColor 70%, transparent);
763
- font-variant-numeric: tabular-nums;
764
- text-align: right;
765
- }
766
- .kr-dialog {
767
- position: relative;
768
- width: clamp(160px, 85vw, 500px);
769
- border: 0;
770
- background: var(--kr-surface);
771
- color: var(--kr-on-surface);
772
- border-radius: 8px;
773
- box-sizing: border-box;
774
- padding: var(--kr-spacing-3);
775
- font-family: var(--kr-font-family);
776
- }
777
-
778
- .kr-dialog__title {
779
- margin: 0;
780
- font-size: 18px;
781
- font-weight: 500;
782
- }
783
-
784
- .kr-dialog__content {
785
- padding-top: var(--kr-spacing-3);
786
- }
787
-
788
- .kr-dialog__content__form {
789
- display: flex;
790
- flex-direction: column;
791
- gap: var(--kr-spacing-3);
792
- }
793
-
794
- .kr-dialog__content__text {
795
- font-size: 14px;
796
- }
797
-
798
- .kr-dialog__actions {
799
- display: flex;
800
- gap: var(--kr-spacing-2);
801
- padding-top: var(--kr-spacing-3);
802
- justify-content: flex-end;
803
- }
804
- /*$vite$:1*/