|
90 | 90 |
|
91 | 91 | /* Method Tags */
|
92 | 92 | .openapi-method {
|
93 |
| - @apply rounded uppercase font-mono font-bold text-xs px-1 py-0.5 mr-2 text-tint-12/8 leading-tight align-middle inline-flex ring-1 ring-inset ring-tint-12/1 dark:ring-tint-1/1 whitespace-nowrap; |
| 93 | + @apply rounded uppercase font-mono shrink-0 font-bold text-xs px-1 py-0.5 mr-2 text-tint-12/8 leading-tight align-middle inline-flex ring-1 ring-inset ring-tint-12/1 dark:ring-tint-1/1 whitespace-nowrap; |
94 | 94 | }
|
95 | 95 |
|
96 | 96 | .openapi-method-get {
|
|
423 | 423 | @apply flex flex-row items-center;
|
424 | 424 | }
|
425 | 425 |
|
| 426 | +.openapi-codesample-header .openapi-select > button { |
| 427 | + @apply border-none; |
| 428 | +} |
| 429 | + |
426 | 430 | .openapi-codesample-header-content {
|
427 |
| - @apply flex flex-row items-center h-fit; |
| 431 | + @apply flex flex-row items-center justify-between h-fit p-2.5; |
| 432 | +} |
| 433 | + |
| 434 | +.openapi-codesample-header-content .openapi-path { |
| 435 | + @apply flex items-center font-mono *:text-[0.813rem] gap-2 h-fit *:truncate overflow-x-auto min-w-0 max-w-full font-normal text-tint-strong; |
| 436 | +} |
| 437 | + |
| 438 | +.openapi-codesample-header-content .openapi-path .openapi-path-variable { |
| 439 | + @apply text-[0.813rem]; |
428 | 440 | }
|
429 | 441 |
|
430 | 442 | .openapi-codesample-footer {
|
|
437 | 449 |
|
438 | 450 | /* Path */
|
439 | 451 | .openapi-path {
|
440 |
| - @apply flex items-start text-sm gap-2 h-fit overflow-x-auto min-w-0 max-w-full; |
| 452 | + @apply flex items-center text-sm gap-2 h-fit overflow-x-auto min-w-0 max-w-full; |
441 | 453 | scrollbar-width: none;
|
442 | 454 | -ms-overflow-style: none;
|
443 | 455 | }
|
|
451 | 463 | }
|
452 | 464 |
|
453 | 465 | .openapi-path .openapi-method {
|
454 |
| - @apply text-[0.813rem] m-0 mt-0.5 items-center flex px-2; |
| 466 | + @apply text-[0.813rem] m-0 mt-0.5 items-center flex px-1; |
455 | 467 | }
|
456 | 468 |
|
457 | 469 | .openapi-path-title {
|
458 | 470 | @apply flex-1 relative font-normal text-left font-mono text-tint-strong/10;
|
459 |
| - @apply py-0.5 px-1 rounded hover:bg-tint cursor-pointer transition-colors; |
| 471 | + @apply py-0.5 px-1 rounded hover:bg-tint transition-colors; |
460 | 472 | @apply whitespace-nowrap md:whitespace-normal;
|
461 | 473 | }
|
462 | 474 |
|
|
468 | 480 | display: none;
|
469 | 481 | }
|
470 | 482 |
|
471 |
| -/* .openapi-path-copy { |
472 |
| - @apply absolute opacity-0 h-fit right-0 top-1/2 -translate-y-1/2 bg-light dark:bg-dark border rounded-md border-tint-subtle px-1.5 py-0; |
473 |
| -} |
474 |
| -
|
475 |
| -.openapi-path-title:hover .openapi-path-copy { |
476 |
| - @apply opacity-11; |
477 |
| -} */ |
478 |
| - |
479 | 483 | .openapi-path-title em {
|
480 | 484 | @apply not-italic text-primary font-medium;
|
481 | 485 | }
|
|
502 | 506 | @apply before:w-full before:h-px before:absolute before:bg-tint-6 before:-top-px before:z-10;
|
503 | 507 | }
|
504 | 508 |
|
505 |
| -.openapi-panel-footer { |
| 509 | +.openapi-panel-footer, |
| 510 | +.openapi-codesample-footer { |
506 | 511 | @apply px-3 py-2 pt-2.5 border-t border-tint-subtle text-[0.813rem] text-tint;
|
507 | 512 | }
|
508 | 513 |
|
|
517 | 522 |
|
518 | 523 | /* Common Elements */
|
519 | 524 | .openapi-select {
|
520 |
| - @apply max-w-60 rounded font-mono text-xs leading-6 px-1 py-0.5 truncate border border-tint-subtle bg-tint; |
| 525 | + /* unstyled */ |
| 526 | +} |
| 527 | + |
| 528 | +/* Prevent react-aria popover from setting overflow:auto on body */ |
| 529 | +body:has(.openapi-select-popover) { |
| 530 | + overflow: unset !important; |
| 531 | +} |
| 532 | + |
| 533 | +.openapi-select > button { |
| 534 | + @apply flex items-center cursor-pointer gap-1.5 text-tint-strong max-w-60 rounded text-xs leading-6 px-1.5 truncate border border-tint-subtle bg-tint; |
| 535 | + @apply hover:bg-tint-hover transition-all; |
| 536 | +} |
| 537 | + |
| 538 | +.openapi-select > button > span.react-aria-SelectValue { |
| 539 | + @apply shrink truncate; |
| 540 | +} |
| 541 | + |
| 542 | +.openapi-select > button > .gb-icon { |
| 543 | + @apply shrink-0; |
| 544 | +} |
| 545 | + |
| 546 | +.openapi-select > button svg { |
| 547 | + @apply size-2.5; |
| 548 | +} |
| 549 | + |
| 550 | +.openapi-select-popover { |
| 551 | + @apply min-w-32 max-w-fit w-auto max-h-52 overflow-y-auto p-1.5 border border-tint-subtle bg-tint-base backdrop-blur-xl rounded-md; |
| 552 | + @apply shadow-md shadow-tint-12/1 dark:shadow-tint-1/1; |
| 553 | +} |
| 554 | + |
| 555 | +.openapi-select-popover[data-entering] { |
| 556 | + animation: popover-enter 0.2s ease-in-out; |
| 557 | +} |
| 558 | + |
| 559 | +.openapi-select-popover[data-exiting] { |
| 560 | + animation: popover-leave 0.2s ease-in-out; |
| 561 | +} |
| 562 | + |
| 563 | +.openapi-select-item { |
| 564 | + @apply text-sm cursor-pointer px-1.5 py-0.5 truncate text-tint ring-0 border-none rounded !outline-none; |
| 565 | + @apply hover:bg-tint-hover theme-gradient:hover:bg-tint-12/1 hover:text-tint-strong contrast-more:hover:ring-1 contrast-more:hover:ring-inset contrast-more:hover:ring-current; |
| 566 | +} |
| 567 | + |
| 568 | +.openapi-select-item-selected { |
| 569 | + @apply text-primary-subtle hover:text-primary hover:bg-primary-hover; |
| 570 | + @apply theme-muted:hover:bg-primary-active theme-gradient:hover:bg-primary-active tint:font-semibold; |
| 571 | + @apply contrast-more:text-primary contrast-more:hover:text-primary-strong contrast-more:font-semibold; |
| 572 | +} |
| 573 | + |
| 574 | +.openapi-select-listbox { |
| 575 | + @apply flex flex-col gap-1 focus:ring-0 focus:outline-none; |
521 | 576 | }
|
522 | 577 |
|
523 | 578 | .openapi-select:focus {
|
|
580 | 635 | @apply text-primary after:absolute after:-bottom-[calc(0.375rem_+_1px)] after:z-20 after:left-0 after:w-full after:h-px after:bg-primary-solid after:transition-all;
|
581 | 636 | }
|
582 | 637 |
|
583 |
| -.openapi-tabs-panel { |
| 638 | +.openapi-tabs-panel, |
| 639 | +.openapi-codesample-panel { |
584 | 640 | @apply flex-1 text-sm relative focus-visible:outline-none;
|
| 641 | + @apply before:w-full before:h-px before:absolute before:bg-tint-6 before:-top-px before:z-10; |
585 | 642 | }
|
586 | 643 |
|
587 | 644 | /* Disclosure group */
|
|
731 | 788 | }
|
732 | 789 | }
|
733 | 790 |
|
| 791 | +@keyframes popover-enter { |
| 792 | + 0% { |
| 793 | + opacity: 0; |
| 794 | + transform: translateY(4px) scale(0.95); |
| 795 | + } |
| 796 | + 100% { |
| 797 | + opacity: 1; |
| 798 | + transform: translateY(0) scale(1); |
| 799 | + } |
| 800 | +} |
| 801 | + |
| 802 | +@keyframes popover-leave { |
| 803 | + 0% { |
| 804 | + opacity: 1; |
| 805 | + transform: translateY(0) scale(1); |
| 806 | + } |
| 807 | + 100% { |
| 808 | + opacity: 0; |
| 809 | + transform: translateY(4px) scale(0.95); |
| 810 | + } |
| 811 | +} |
| 812 | + |
734 | 813 | .openapi-copy-button {
|
735 |
| - @apply hover:brightness-95; |
| 814 | + @apply hover:brightness-95 cursor-pointer; |
| 815 | +} |
| 816 | + |
| 817 | +.openapi-copy-button[data-disabled="true"] { |
| 818 | + @apply cursor-default; |
736 | 819 | }
|
0 commit comments