@oddmash/ui 0.3.0 → 0.4.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.
package/dist/styles.css CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated from tokens JSON. Run npm run tokens. */
1
+ /* Generated from tokens JSON. Run pnpm run tokens. */
2
2
  :root, :host, [data-om-theme=light] {
3
3
  --om-primitive-color-white: #ffffff;
4
4
  --om-primitive-color-ink: #171717;
@@ -31,9 +31,11 @@
31
31
  --om-primitive-space-16: 16px;
32
32
  --om-primitive-space-24: 24px;
33
33
  --om-primitive-space-32: 32px;
34
- --om-primitive-radius-sm: 4px;
35
- --om-primitive-radius-md: 6px;
36
- --om-primitive-radius-lg: 8px;
34
+ --om-primitive-radius-sm: 6px;
35
+ --om-primitive-radius-md: 8px;
36
+ --om-primitive-radius-lg: 12px;
37
+ --om-primitive-radius-xl: 16px;
38
+ --om-primitive-radius-2xl: 24px;
37
39
  --om-primitive-radius-pill: 999px;
38
40
  --om-primitive-font-family: 'Geist Sans', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
39
41
  --om-primitive-font-size-sm: 13px;
@@ -73,6 +75,8 @@
73
75
  --om-semantic-radius-sm: var(--om-primitive-radius-sm);
74
76
  --om-semantic-radius-md: var(--om-primitive-radius-md);
75
77
  --om-semantic-radius-lg: var(--om-primitive-radius-lg);
78
+ --om-semantic-radius-xl: var(--om-primitive-radius-xl);
79
+ --om-semantic-radius-2xl: var(--om-primitive-radius-2xl);
76
80
  --om-semantic-radius-pill: var(--om-primitive-radius-pill);
77
81
  --om-semantic-font-family: var(--om-primitive-font-family);
78
82
  --om-semantic-font-size: var(--om-primitive-font-size-md);
@@ -120,9 +124,11 @@
120
124
  --om-primitive-space-16: 16px;
121
125
  --om-primitive-space-24: 24px;
122
126
  --om-primitive-space-32: 32px;
123
- --om-primitive-radius-sm: 4px;
124
- --om-primitive-radius-md: 6px;
125
- --om-primitive-radius-lg: 8px;
127
+ --om-primitive-radius-sm: 6px;
128
+ --om-primitive-radius-md: 8px;
129
+ --om-primitive-radius-lg: 12px;
130
+ --om-primitive-radius-xl: 16px;
131
+ --om-primitive-radius-2xl: 24px;
126
132
  --om-primitive-radius-pill: 999px;
127
133
  --om-primitive-font-family: 'Geist Sans', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
128
134
  --om-primitive-font-size-sm: 13px;
@@ -162,6 +168,8 @@
162
168
  --om-semantic-radius-sm: var(--om-primitive-radius-sm);
163
169
  --om-semantic-radius-md: var(--om-primitive-radius-md);
164
170
  --om-semantic-radius-lg: var(--om-primitive-radius-lg);
171
+ --om-semantic-radius-xl: var(--om-primitive-radius-xl);
172
+ --om-semantic-radius-2xl: var(--om-primitive-radius-2xl);
165
173
  --om-semantic-radius-pill: var(--om-primitive-radius-pill);
166
174
  --om-semantic-font-family: var(--om-primitive-font-family);
167
175
  --om-semantic-font-size: var(--om-primitive-font-size-md);
@@ -215,6 +223,12 @@
215
223
  color: var(--om-semantic-color-muted);
216
224
  }
217
225
 
226
+ select.om-select option,
227
+ select.om-select optgroup {
228
+ background: var(--om-semantic-color-surface);
229
+ color: var(--om-semantic-color-text);
230
+ }
231
+
218
232
  .om-progress {
219
233
  accent-color: var(--om-semantic-color-action);
220
234
  }
@@ -300,12 +314,14 @@
300
314
  height: 0.75rem;
301
315
  border-radius: 50%;
302
316
  background: var(--om-semantic-color-muted);
317
+ justify-self: start;
318
+ transition: transform 160ms var(--om-semantic-motion-ease), background-color 160ms ease-out;
303
319
  }
304
320
  .om-switch:checked {
305
321
  background: var(--om-semantic-color-action);
306
322
  }
307
323
  .om-switch:checked::before {
308
- justify-self: end;
324
+ transform: translateX(1.125rem);
309
325
  background: var(--om-semantic-color-on-action);
310
326
  }
311
327
 
@@ -411,9 +427,25 @@
411
427
  }
412
428
 
413
429
  .om-accordion-content {
430
+ min-block-size: 0;
431
+ }
432
+ .om-accordion-content > div {
414
433
  padding: 0 var(--om-semantic-space-xs) var(--om-semantic-space-md);
415
434
  }
416
435
 
436
+ @media (prefers-reduced-motion: no-preference) {
437
+ @supports selector(::details-content) and (transition-behavior: allow-discrete) {
438
+ .om-accordion::details-content {
439
+ display: grid;
440
+ grid-template-rows: minmax(0, 0fr);
441
+ overflow: clip;
442
+ transition: grid-template-rows var(--om-semantic-motion-duration) var(--om-semantic-motion-ease), content-visibility var(--om-semantic-motion-duration) allow-discrete;
443
+ }
444
+ .om-accordion[open]::details-content {
445
+ grid-template-rows: minmax(0, 1fr);
446
+ }
447
+ }
448
+ }
417
449
  .om-table {
418
450
  width: 100%;
419
451
  border-collapse: collapse;
@@ -480,16 +512,14 @@
480
512
  text-align: center;
481
513
  }
482
514
 
483
- :is(.om-textarea,
484
- .om-select,
485
- .om-checkbox,
515
+ :is(.om-checkbox,
486
516
  .om-radio,
487
517
  .om-switch,
488
518
  .om-accordion > summary,
489
519
  .om-breadcrumbs a,
490
520
  .om-pagination > :is(a, button)):focus-visible {
491
521
  outline: 2px solid var(--om-semantic-color-focus);
492
- outline-offset: 3px;
522
+ outline-offset: -1px;
493
523
  }
494
524
 
495
525
  @media (prefers-reduced-motion: reduce) {
@@ -533,23 +563,59 @@
533
563
  font: var(--om-semantic-font-size)/var(--om-semantic-font-line) var(--om-semantic-font-family);
534
564
  }
535
565
  .om-select-dropdown > [role=listbox] > [role=option] {
566
+ display: flex;
567
+ justify-content: space-between;
568
+ align-items: center;
569
+ gap: var(--om-semantic-space-sm);
570
+ min-block-size: var(--om-semantic-control-small);
536
571
  padding: var(--om-semantic-space-xs) var(--om-semantic-space-sm);
537
572
  border-radius: var(--om-semantic-radius-sm);
538
573
  overflow-wrap: anywhere;
539
574
  cursor: pointer;
540
575
  }
576
+ .om-select-dropdown > [role=listbox] > [role=option]::after {
577
+ content: "";
578
+ flex: none;
579
+ inline-size: 0.6em;
580
+ block-size: 0.35em;
581
+ border-inline-start: 2px solid currentColor;
582
+ border-block-end: 2px solid currentColor;
583
+ transform: rotate(-45deg);
584
+ visibility: hidden;
585
+ }
541
586
  .om-select-dropdown > [role=listbox] > [role=option][aria-disabled=true] {
542
587
  color: var(--om-semantic-color-muted);
543
588
  cursor: not-allowed;
544
589
  }
545
- .om-select-dropdown > [role=listbox] > [role=option][data-active], .om-select-dropdown > [role=listbox] > [role=option]:hover:not([aria-disabled=true]) {
546
- outline: 1px solid currentColor;
547
- outline-offset: -1px;
548
- }
549
590
  .om-select-dropdown > [role=listbox] > [role=option][aria-selected=true] {
550
- font-weight: 700;
591
+ background: color-mix(in srgb, var(--om-semantic-color-text) 10%, var(--om-semantic-color-surface));
592
+ }
593
+ .om-select-dropdown > [role=listbox] > [role=option][aria-selected=true]::after {
594
+ visibility: visible;
595
+ }
596
+ .om-select-dropdown > [role=listbox] > [role=option]:hover:not([aria-disabled=true]) {
597
+ background: color-mix(in srgb, var(--om-semantic-color-text) 18%, var(--om-semantic-color-surface));
598
+ }
599
+ .om-select-dropdown > [role=listbox] > [role=option][data-active] {
600
+ background: color-mix(in srgb, var(--om-semantic-color-text) 18%, var(--om-semantic-color-surface));
601
+ outline: 2px solid var(--om-semantic-color-focus);
602
+ outline-offset: -2px;
551
603
  }
552
604
 
605
+ @media (forced-colors: active) {
606
+ .om-select-dropdown > [role=listbox] > [role=option][aria-selected=true] {
607
+ forced-color-adjust: none;
608
+ background: Highlight;
609
+ color: HighlightText;
610
+ }
611
+ .om-select-dropdown > [role=listbox] > [role=option][data-active], .om-select-dropdown > [role=listbox] > [role=option]:hover:not([aria-disabled=true]) {
612
+ outline: 1px solid Highlight;
613
+ outline-offset: -1px;
614
+ }
615
+ .om-select-dropdown > [role=listbox] > [role=option][aria-selected=true][data-active], .om-select-dropdown > [role=listbox] > [role=option][aria-selected=true]:hover {
616
+ outline-color: HighlightText;
617
+ }
618
+ }
553
619
  .om-select-dropdown-trigger {
554
620
  display: flex;
555
621
  align-items: center;
@@ -573,49 +639,225 @@
573
639
  position: fixed;
574
640
  z-index: 900;
575
641
  inset: auto var(--om-semantic-space-lg) var(--om-semantic-space-lg) auto;
576
- inline-size: min(22rem, 100vw - 2 * var(--om-semantic-space-lg));
642
+ inline-size: min(22rem, 100% - 2 * var(--om-semantic-space-lg));
577
643
  pointer-events: none;
578
644
  }
579
645
 
646
+ .om-toast-viewport {
647
+ position: fixed;
648
+ z-index: 900;
649
+ inset: auto var(--om-semantic-space-lg) var(--om-semantic-space-lg) auto;
650
+ inline-size: min(22rem, 100% - 2 * var(--om-semantic-space-lg));
651
+ max-block-size: calc(100dvh - 2 * var(--om-semantic-space-lg));
652
+ display: flex;
653
+ flex-direction: column;
654
+ gap: var(--om-semantic-space-sm);
655
+ overflow-y: auto;
656
+ pointer-events: none;
657
+ }
658
+ .om-toast-viewport > .om-toast-region {
659
+ position: static;
660
+ inline-size: auto;
661
+ flex: none;
662
+ }
663
+ .om-toast-viewport > .om-toast-region[data-state=closed] {
664
+ block-size: 0;
665
+ margin-block-end: calc(-1 * var(--om-semantic-space-sm));
666
+ }
667
+ .om-toast-viewport[data-stack-ready=true]:not([data-stack-overflow=true]) {
668
+ display: block;
669
+ overflow: visible;
670
+ block-size: var(--om-toast-stack-height, 0);
671
+ transition: block-size 240ms cubic-bezier(0.22, 0.8, 0.3, 1);
672
+ }
673
+ .om-toast-viewport[data-stack-ready=true]:not([data-stack-overflow=true]) > .om-toast-region {
674
+ position: absolute;
675
+ inset: auto 0 0;
676
+ z-index: var(--om-toast-layer, 0);
677
+ transform: translateY(calc(-1 * var(--om-toast-offset, 0px))) scale(var(--om-toast-scale, 1));
678
+ transform-origin: center bottom;
679
+ transition: transform 240ms cubic-bezier(0.22, 0.8, 0.3, 1), opacity 180ms ease-out;
680
+ }
681
+ .om-toast-viewport[data-stack-ready=true]:not([data-stack-overflow=true]) > .om-toast-region[data-stack-back=true][data-state=open] {
682
+ max-block-size: var(--om-toast-front-height);
683
+ overflow: clip;
684
+ }
685
+ .om-toast-viewport[data-stack-ready=true]:not([data-stack-overflow=true]) > .om-toast-region[data-stack-hidden=true][data-state=open] {
686
+ opacity: 0;
687
+ }
688
+ .om-toast-viewport[data-stack-ready=true]:not([data-stack-overflow=true]) > .om-toast-region[data-stack-hidden=true][data-state=open] .om-toast {
689
+ pointer-events: none;
690
+ }
691
+ .om-toast-viewport[data-stack-active=true][data-stack-expanded=true] {
692
+ pointer-events: auto;
693
+ }
694
+
580
695
  .om-toast {
696
+ box-sizing: border-box;
581
697
  pointer-events: auto;
698
+ position: relative;
582
699
  display: flex;
583
- align-items: start;
584
- gap: var(--om-semantic-space-md);
585
- justify-content: space-between;
586
- padding: var(--om-semantic-space-md);
700
+ align-items: center;
701
+ gap: var(--om-semantic-space-sm);
702
+ padding: var(--om-semantic-space-md) var(--om-semantic-space-lg);
587
703
  border: 1px solid var(--om-semantic-color-border);
588
- border-inline-start: 3px solid var(--om-semantic-color-text);
589
- border-radius: var(--om-semantic-radius-md);
704
+ border-radius: var(--om-semantic-radius-lg);
590
705
  background: var(--om-semantic-color-surface);
591
706
  color: var(--om-semantic-color-text);
592
707
  box-shadow: var(--om-semantic-shadow);
593
708
  font: var(--om-semantic-font-size)/var(--om-semantic-font-line) var(--om-semantic-font-family);
594
709
  overflow-wrap: anywhere;
595
710
  }
596
- .om-toast[data-tone=danger] {
597
- border-inline-start-color: var(--om-semantic-color-danger);
711
+ .om-toast[data-tone=danger] .om-toast-icon, .om-toast[data-tone=error] .om-toast-icon {
712
+ color: var(--om-semantic-color-danger);
598
713
  }
599
- .om-toast > button {
714
+ .om-toast .om-toast-icon {
600
715
  flex: none;
601
- width: 32px;
602
- height: 32px;
603
- border: 1px solid var(--om-semantic-color-border-subtle);
716
+ inline-size: 20px;
717
+ block-size: 20px;
718
+ display: grid;
719
+ place-items: center;
720
+ }
721
+ .om-toast .om-toast-icon > svg {
722
+ inline-size: 100%;
723
+ block-size: 100%;
724
+ }
725
+ .om-toast > [role], .om-toast > .om-toast-exit-copy {
726
+ flex: 1;
727
+ min-inline-size: 0;
728
+ }
729
+ .om-toast > [role] > strong, .om-toast > .om-toast-exit-copy > strong {
730
+ font-weight: 600;
731
+ }
732
+ .om-toast > [role] > div, .om-toast > .om-toast-exit-copy > div {
733
+ color: var(--om-semantic-color-muted);
734
+ font-size: var(--om-semantic-font-small);
735
+ margin-block-start: 2px;
736
+ }
737
+ .om-toast > button, .om-toast > .om-toast-close-placeholder {
738
+ box-sizing: border-box;
739
+ flex: none;
740
+ inline-size: 28px;
741
+ block-size: 28px;
742
+ }
743
+ .om-toast > button {
744
+ display: grid;
745
+ place-items: center;
746
+ margin-inline-end: -5px;
747
+ padding: 0;
748
+ border: 1px solid transparent;
604
749
  border-radius: var(--om-semantic-radius-sm);
605
- background: var(--om-semantic-color-bg);
606
- color: inherit;
607
- font: inherit;
750
+ background: transparent;
751
+ color: var(--om-semantic-color-muted);
608
752
  cursor: pointer;
753
+ transition: background-color 120ms ease-out, color 120ms ease-out;
754
+ }
755
+ .om-toast > button > svg {
756
+ inline-size: 16px;
757
+ block-size: 16px;
758
+ }
759
+ .om-toast > button:hover {
760
+ background: var(--om-semantic-color-bg);
761
+ color: var(--om-semantic-color-text);
609
762
  }
610
763
  .om-toast > button:focus-visible {
611
764
  outline: 2px solid var(--om-semantic-color-focus);
612
- outline-offset: 2px;
765
+ outline-offset: -1px;
766
+ }
767
+ .om-toast[data-state=closing] {
768
+ pointer-events: none;
769
+ }
770
+ .om-toast[data-state=closing] > [role] {
771
+ position: absolute;
772
+ inline-size: 1px;
773
+ block-size: 1px;
774
+ overflow: hidden;
775
+ clip-path: inset(50%);
776
+ }
777
+ .om-toast[data-state=closing] > .om-toast-close-placeholder {
778
+ margin-inline-end: -5px;
779
+ }
780
+
781
+ @media (prefers-reduced-motion: no-preference) {
782
+ .om-toast[data-state=open] [data-icon=loading] {
783
+ animation: om-spinner-turn 0.9s linear infinite;
784
+ }
785
+ .om-toast[data-state=open] {
786
+ animation: om-toast-in 240ms cubic-bezier(0.22, 0.8, 0.3, 1) both;
787
+ }
788
+ .om-toast[data-state=closing] {
789
+ animation: om-toast-out 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
790
+ }
791
+ @keyframes om-toast-in {
792
+ from {
793
+ opacity: 0;
794
+ transform: translateY(12px) scale(0.97);
795
+ }
796
+ to {
797
+ opacity: 1;
798
+ transform: translateY(0) scale(1);
799
+ }
800
+ }
801
+ @keyframes om-toast-out {
802
+ from {
803
+ opacity: 1;
804
+ transform: translateY(0) scale(1);
805
+ }
806
+ to {
807
+ opacity: 0;
808
+ transform: translateY(8px) scale(0.97);
809
+ }
810
+ }
811
+ }
812
+ @media (prefers-reduced-motion: reduce) {
813
+ .om-toast-viewport, .om-toast-viewport > .om-toast-region, .om-toast > button {
814
+ transition: none !important;
815
+ }
816
+ }
817
+ @media (forced-colors: active) {
818
+ .om-toast {
819
+ border-color: CanvasText;
820
+ }
821
+ .om-toast > button {
822
+ border-color: ButtonText;
823
+ color: ButtonText;
824
+ }
825
+ }
826
+ .om-dialog-content.om-alert-dialog {
827
+ width: min(360px, 100vw - 32px);
828
+ }
829
+
830
+ .om-alert-dialog h2 {
831
+ margin: 0 0 var(--om-semantic-space-sm);
832
+ font-size: var(--om-semantic-font-heading);
833
+ }
834
+
835
+ .om-alert-dialog-description {
836
+ margin: 0;
837
+ color: var(--om-semantic-color-muted);
838
+ }
839
+
840
+ .om-alert-dialog-actions {
841
+ display: flex;
842
+ justify-content: flex-end;
843
+ margin-block-start: var(--om-semantic-space-xl);
613
844
  }
614
845
 
615
846
  @media (prefers-reduced-motion: no-preference) {
616
- .om-toast, .om-alert[role=alert], .om-select-dropdown > [role=listbox]:not([hidden]) {
847
+ .om-alert[role=alert] {
617
848
  animation: om-enter var(--om-semantic-motion-duration) var(--om-semantic-motion-ease) both;
618
849
  }
850
+ .om-select-dropdown > [role=listbox]:not([hidden]) {
851
+ animation: om-dropdown-reveal var(--om-semantic-motion-duration) var(--om-semantic-motion-ease);
852
+ }
853
+ @keyframes om-dropdown-reveal {
854
+ from {
855
+ clip-path: inset(0 0 100% 0);
856
+ }
857
+ to {
858
+ clip-path: inset(0);
859
+ }
860
+ }
619
861
  @keyframes om-enter {
620
862
  from {
621
863
  translate: 0 5px;
@@ -625,6 +867,88 @@
625
867
  }
626
868
  }
627
869
  }
870
+ .om-switch:dir(rtl):checked::before {
871
+ transform: translateX(-1.125rem);
872
+ }
873
+
874
+ :is(.om-checkbox, .om-radio, .om-switch):not(:disabled):hover {
875
+ border-color: var(--om-semantic-color-muted);
876
+ }
877
+
878
+ .om-pagination > :is(a, button) {
879
+ box-sizing: border-box;
880
+ cursor: pointer;
881
+ }
882
+
883
+ .om-pagination > :is(a, button):not(:disabled):not([aria-current=page]):hover {
884
+ background: var(--om-semantic-color-bg);
885
+ border-color: var(--om-semantic-color-border);
886
+ }
887
+
888
+ .om-pagination > button:disabled {
889
+ opacity: 0.5;
890
+ cursor: not-allowed;
891
+ }
892
+
893
+ .om-breadcrumbs button {
894
+ border: 0;
895
+ padding: var(--om-semantic-space-xs);
896
+ border-radius: var(--om-semantic-radius-sm);
897
+ background: transparent;
898
+ font: inherit;
899
+ color: inherit;
900
+ cursor: pointer;
901
+ }
902
+
903
+ .om-breadcrumbs button:hover:not(:disabled) {
904
+ background: var(--om-semantic-color-surface);
905
+ }
906
+
907
+ .om-breadcrumbs button:focus-visible {
908
+ outline: 2px solid var(--om-semantic-color-focus);
909
+ outline-offset: -1px;
910
+ }
911
+
912
+ .om-breadcrumbs button[aria-current=page] {
913
+ font-weight: 600;
914
+ }
915
+
916
+ .om-breadcrumbs button:disabled {
917
+ opacity: 0.5;
918
+ cursor: not-allowed;
919
+ }
920
+
921
+ .om-accordion > summary:hover {
922
+ background: var(--om-semantic-color-surface);
923
+ }
924
+
925
+ .om-progress {
926
+ border: 0;
927
+ border-radius: var(--om-semantic-radius-pill);
928
+ overflow: hidden;
929
+ }
930
+
931
+ @media (prefers-reduced-motion: no-preference) {
932
+ :is(.om-checkbox, .om-radio, .om-switch, .om-pagination > :is(a, button), .om-breadcrumbs button, .om-accordion > summary) {
933
+ transition: background-color 140ms var(--om-semantic-motion-ease), border-color 140ms var(--om-semantic-motion-ease), color 140ms var(--om-semantic-motion-ease);
934
+ }
935
+ .om-skeleton {
936
+ animation: om-skeleton-pulse 1.6s ease-in-out 2 alternate;
937
+ }
938
+ @keyframes om-skeleton-pulse {
939
+ from {
940
+ opacity: 0.65;
941
+ }
942
+ to {
943
+ opacity: 1;
944
+ }
945
+ }
946
+ }
947
+ @media (prefers-reduced-motion: reduce) {
948
+ .om-switch::before {
949
+ transition: none;
950
+ }
951
+ }
628
952
  .om-button,
629
953
  .om-input,
630
954
  .om-card,
@@ -652,7 +976,7 @@
652
976
  font-weight: var(--om-semantic-font-weight);
653
977
  cursor: pointer;
654
978
  gap: var(--om-semantic-space-sm);
655
- transition: opacity var(--om-semantic-motion-duration) var(--om-semantic-motion-ease);
979
+ transition: background-color var(--om-semantic-motion-duration) var(--om-semantic-motion-ease), border-color var(--om-semantic-motion-duration) var(--om-semantic-motion-ease), color var(--om-semantic-motion-duration) var(--om-semantic-motion-ease), opacity var(--om-semantic-motion-duration) var(--om-semantic-motion-ease);
656
980
  }
657
981
  .om-button:disabled,
658
982
  .om-tabs-trigger:disabled {
@@ -797,6 +1121,7 @@
797
1121
  width: min(440px, 100vw - 32px);
798
1122
  max-height: calc(100dvh - 32px);
799
1123
  overflow: auto;
1124
+ overscroll-behavior: contain;
800
1125
  padding: var(--om-semantic-space-xl);
801
1126
  background: var(--om-semantic-color-surface);
802
1127
  border: var(--om-semantic-border-width) var(--om-semantic-border-style) var(--om-semantic-color-border);
@@ -805,12 +1130,19 @@
805
1130
  }
806
1131
 
807
1132
  :is(.om-button,
808
- .om-input,
809
1133
  .om-tabs-trigger,
810
1134
  .om-tabs-content,
811
1135
  .om-dialog-content):focus-visible {
812
1136
  outline: 2px solid var(--om-semantic-color-focus);
813
- outline-offset: 3px;
1137
+ outline-offset: -1px;
1138
+ }
1139
+
1140
+ :is(.om-input, .om-textarea, .om-select):focus-visible {
1141
+ outline: 2px solid var(--om-semantic-color-focus);
1142
+ outline-offset: -1px;
1143
+ }
1144
+ :is(.om-input, .om-textarea, .om-select):focus-visible[aria-invalid=true], :is(.om-input, .om-textarea, .om-select):focus-visible:user-invalid {
1145
+ outline-offset: -3px;
814
1146
  }
815
1147
 
816
1148
  @media (prefers-reduced-motion: reduce) {
@@ -845,3 +1177,62 @@
845
1177
  }
846
1178
  }
847
1179
  }
1180
+ .om-slider {
1181
+ box-sizing: border-box;
1182
+ width: 100%;
1183
+ min-width: 0;
1184
+ min-height: var(--om-semantic-control-height);
1185
+ accent-color: var(--om-semantic-color-action);
1186
+ cursor: pointer;
1187
+ }
1188
+
1189
+ .om-slider:disabled {
1190
+ cursor: not-allowed;
1191
+ opacity: 0.5;
1192
+ }
1193
+
1194
+ .om-slider:focus-visible {
1195
+ outline: 2px solid var(--om-semantic-color-focus);
1196
+ outline-offset: -1px;
1197
+ }
1198
+
1199
+ .om-command-palette {
1200
+ max-height: min(70vh, 480px);
1201
+ overflow: auto;
1202
+ }
1203
+
1204
+ .om-command-list {
1205
+ display: grid;
1206
+ gap: var(--om-semantic-space-xs);
1207
+ margin-top: var(--om-semantic-space-sm);
1208
+ max-height: 240px;
1209
+ overflow: auto;
1210
+ }
1211
+
1212
+ .om-command-list [role=option] {
1213
+ padding: var(--om-semantic-space-sm);
1214
+ border-radius: var(--om-semantic-radius-sm);
1215
+ cursor: pointer;
1216
+ }
1217
+
1218
+ .om-command-list [aria-selected=true] {
1219
+ background: var(--om-semantic-color-action);
1220
+ color: var(--om-semantic-color-on-action);
1221
+ }
1222
+
1223
+ .om-command-list [aria-disabled=true] {
1224
+ opacity: 0.5;
1225
+ cursor: not-allowed;
1226
+ }
1227
+
1228
+ .om-input:not(:disabled):not([aria-invalid=true]):not(:user-invalid):hover,
1229
+ .om-textarea:not(:disabled):not([aria-invalid=true]):not(:user-invalid):hover,
1230
+ .om-select-dropdown-trigger:not(:disabled):not([aria-invalid=true]):not(:user-invalid):hover {
1231
+ border-color: var(--om-semantic-color-muted);
1232
+ }
1233
+
1234
+ @media (prefers-reduced-motion: no-preference) {
1235
+ .om-button:active:not(:disabled) {
1236
+ transform: translateY(1px);
1237
+ }
1238
+ }
package/dist/toast.d.ts CHANGED
@@ -1,20 +1,23 @@
1
1
  import * as react from 'react';
2
- import { ComponentPropsWithoutRef } from 'react';
2
+ import { ReactNode, ComponentPropsWithoutRef } from 'react';
3
3
 
4
+ declare const ToastViewport: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
4
5
  type ToastProps = Omit<ComponentPropsWithoutRef<'div'>, 'title'> & {
5
6
  open: boolean;
6
7
  title: string;
7
8
  onDismiss: () => void;
8
9
  dismissLabel?: string;
9
- tone?: 'neutral' | 'danger';
10
+ tone?: 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'error' | 'loading';
11
+ icon?: ReactNode;
10
12
  };
11
13
  declare const Toast: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "title"> & {
12
14
  open: boolean;
13
15
  title: string;
14
16
  onDismiss: () => void;
15
17
  dismissLabel?: string;
16
- tone?: "neutral" | "danger";
18
+ tone?: "neutral" | "success" | "info" | "warning" | "danger" | "error" | "loading";
19
+ icon?: ReactNode;
17
20
  } & react.RefAttributes<HTMLDivElement>>;
18
21
 
19
- export { Toast };
22
+ export { Toast, ToastViewport };
20
23
  export type { ToastProps };
package/dist/toast.js CHANGED
@@ -1,8 +1,10 @@
1
1
  "use client";
2
2
  import {
3
- Toast
4
- } from "./chunk-WJ7V6SRX.js";
3
+ Toast,
4
+ ToastViewport
5
+ } from "./chunk-ITEJEMEF.js";
5
6
  import "./chunk-54STG2JB.js";
6
7
  export {
7
- Toast
8
+ Toast,
9
+ ToastViewport
8
10
  };