@leonardaustin/ui 0.21.0 → 0.23.0

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.
@@ -26,6 +26,11 @@ export interface PlacementOptions {
26
26
  gap: number;
27
27
  /** Cross-axis alignment against the anchor. Defaults to `center`. */
28
28
  align?: AnchorAlign;
29
+ /**
30
+ * `placePopup` only: set false to keep the box on its side even when it
31
+ * doesn't fit (the main axis is then left unclamped). Defaults to true.
32
+ */
33
+ flip?: boolean;
29
34
  }
30
35
  export interface PlacedBox {
31
36
  side: AnchorSide;
@@ -1 +1 @@
1
- {"version":3,"file":"anchorPlacement.d.ts","sourceRoot":"","sources":["../../src/lib/anchorPlacement.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,iDAAiD;IACjD,MAAM,EAAE,IAAI,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAYD,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,UAWtE;AAyDD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,gBAAgB,GACxB,SAAS,GAAG,IAAI,CAkBlB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,eAAe,EAC1B,MAAM,EAAE,IAAI,GAAG,IAAI,EACnB,OAAO,EAAE,gBAAgB,GACxB,SAAS,GAAG,IAAI,CAqBlB;AAOD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,gBAAgB,GACxB,SAAS,CAmBX"}
1
+ {"version":3,"file":"anchorPlacement.d.ts","sourceRoot":"","sources":["../../src/lib/anchorPlacement.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,CAAC;AAElD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,iDAAiD;IACjD,MAAM,EAAE,IAAI,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAYD,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,UAWtE;AAyDD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,gBAAgB,GACxB,SAAS,GAAG,IAAI,CAkBlB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,eAAe,EAC1B,MAAM,EAAE,IAAI,GAAG,IAAI,EACnB,OAAO,EAAE,gBAAgB,GACxB,SAAS,GAAG,IAAI,CAqBlB;AAOD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,gBAAgB,GACxB,SAAS,CAuBX"}
package/dist/styles.css CHANGED
@@ -9,7 +9,6 @@
9
9
  @layer utilities{.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-full{min-height:100%}.min-w-5{min-width:calc(var(--spacing) * 5)}.p-1{padding:calc(var(--spacing) * 1)}.pl-1{padding-left:calc(var(--spacing) * 1)}.self-start{align-self:flex-start}.focus-visible\:outline-none:focus-visible{--utility-outline-style:none;outline-style:none}}
10
10
  @layer utilities{.focus-visible\:opacity-100:focus-visible{opacity:1}}
11
11
  @layer utilities{.max-w-\[576px\]{max-width:576px}.max-w-\[768px\]{max-width:768px}.max-w-\[1024px\]{max-width:1024px}.self-center{align-self:center}}
12
- @layer utilities{.w-auto{width:auto}}
13
12
 
14
13
 
15
14
  /* ─── Theme: CSS Custom Properties ─── */
@@ -2559,67 +2558,97 @@ select:disabled + .ui-select-placeholder {
2559
2558
  }
2560
2559
  }
2561
2560
 
2562
- /* AudioPlayer draws its track, fill and thumb, with a transparent native range
2563
- input on top so pointer and keyboard seeking stay native and accessible. */
2564
- .ui-audio-play:disabled {
2565
- background: var(--border-strong);
2561
+ /* AudioPlayer: native-style controls with a transparent seek input. */
2562
+ /* Local reset: a consumer without Tailwind's preflight still gets correct controls. */
2563
+ :where(.ui-audio, .ui-audio *, .ui-audio *::before, .ui-audio *::after) {
2564
+ box-sizing: border-box;
2565
+ }
2566
+ :where(.ui-audio button, .ui-audio select, .ui-audio input) {
2567
+ font: inherit;
2568
+ color: inherit;
2569
+ margin: 0;
2570
+ }
2571
+ :where(.ui-audio button) {
2572
+ border: 0;
2573
+ background: none;
2574
+ padding: 0;
2575
+ }
2576
+ :where(.ui-audio p) {
2577
+ margin: 0;
2566
2578
  }
2567
2579
 
2568
- .ui-audio-times {
2569
- font-variant-numeric: tabular-nums;
2580
+ .ui-audio {
2581
+ display: flex;
2582
+ flex-direction: column;
2583
+ gap: 8px;
2584
+ }
2585
+ .ui-audio-row {
2586
+ display: flex;
2587
+ align-items: center;
2588
+ }
2589
+ .ui-audio-card {
2590
+ padding: 0.75rem;
2591
+ border: 1px solid var(--border);
2592
+ border-radius: var(--ui-radius-md);
2593
+ background: var(--bg-secondary);
2594
+ }
2595
+ .ui-audio-title {
2596
+ font-size: 0.8125rem;
2597
+ font-weight: 500;
2598
+ color: var(--text-primary);
2599
+ }
2600
+ .ui-audio audio {
2601
+ display: none;
2570
2602
  }
2571
2603
 
2604
+ /* Progress: drawn track, fill and thumb under a transparent native range */
2605
+ .ui-audio-progress {
2606
+ flex: 1 1 0%;
2607
+ min-width: 0;
2608
+ }
2572
2609
  .ui-audio-track {
2573
2610
  position: relative;
2574
- height: 0.5rem;
2575
- border-radius: var(--ui-radius-md);
2576
- background: var(--bg-active);
2611
+ height: 4px;
2612
+ border-radius: 9999px;
2613
+ background: var(--ui-audio-rest);
2577
2614
  }
2578
-
2579
2615
  .ui-audio-track:has(.ui-audio-seek:focus-visible) {
2580
2616
  outline: 2px solid var(--accent);
2581
2617
  outline-offset: 2px;
2582
2618
  }
2583
-
2584
2619
  .ui-audio-fill,
2585
2620
  .ui-audio-thumb {
2586
2621
  position: absolute;
2587
2622
  pointer-events: none;
2588
- background: var(--accent);
2623
+ background: var(--ui-audio-fill);
2589
2624
  }
2590
-
2591
- /* Track and fill follow the theme radius; the thumb stays circular. */
2592
2625
  .ui-audio-fill {
2593
2626
  top: 0;
2594
2627
  left: 0;
2595
2628
  height: 100%;
2596
- border-radius: var(--ui-radius-md);
2629
+ border-radius: 9999px;
2630
+ transition: none;
2597
2631
  }
2598
-
2599
2632
  .ui-audio-thumb {
2600
- border-radius: 9999px;
2601
2633
  top: 50%;
2602
- width: 0.75rem;
2603
- height: 0.75rem;
2634
+ width: var(--ui-audio-thumb);
2635
+ height: var(--ui-audio-thumb);
2636
+ border-radius: 9999px;
2604
2637
  transform: translateY(-50%);
2605
2638
  opacity: 0;
2606
2639
  transition: opacity 100ms;
2607
2640
  }
2608
-
2609
2641
  .ui-audio-track:hover .ui-audio-seek:not(:disabled) ~ .ui-audio-thumb,
2610
2642
  .ui-audio-seek:is(:focus-visible, :active):not(:disabled) ~ .ui-audio-thumb {
2611
2643
  opacity: 1;
2612
2644
  }
2613
-
2614
2645
  .ui-audio-seek {
2615
2646
  position: absolute;
2616
2647
  z-index: 1;
2617
- top: -0.25rem;
2618
- /* Overhang by half a thumb on each side so the native thumb's centre
2619
- travels the whole drawn track, matching the fill and drawn thumb. */
2620
- left: -0.375rem;
2621
- width: calc(100% + 0.75rem);
2622
- height: 1rem;
2648
+ top: -0.5rem;
2649
+ left: calc(var(--ui-audio-thumb) / -2);
2650
+ width: calc(100% + var(--ui-audio-thumb));
2651
+ height: 1.5rem;
2623
2652
  margin: 0;
2624
2653
  padding: 0;
2625
2654
  border: 0;
@@ -2628,25 +2657,358 @@ select:disabled + .ui-select-placeholder {
2628
2657
  cursor: pointer;
2629
2658
  opacity: 0;
2630
2659
  }
2631
-
2632
- /* Size the invisible native thumb like the drawn one so pointer positions map
2633
- to the same times. */
2634
2660
  .ui-audio-seek::-webkit-slider-thumb {
2635
- width: 0.75rem;
2636
- height: 0.75rem;
2661
+ width: var(--ui-audio-thumb);
2662
+ height: var(--ui-audio-thumb);
2637
2663
  appearance: none;
2638
2664
  }
2639
-
2640
2665
  .ui-audio-seek::-moz-range-thumb {
2641
- width: 0.75rem;
2642
- height: 0.75rem;
2666
+ width: var(--ui-audio-thumb);
2667
+ height: var(--ui-audio-thumb);
2643
2668
  border: 0;
2644
2669
  }
2645
-
2646
2670
  .ui-audio-seek:focus-visible {
2647
2671
  outline: none;
2648
2672
  }
2649
-
2650
2673
  .ui-audio-seek:disabled {
2651
2674
  cursor: not-allowed;
2652
2675
  }
2676
+
2677
+ .ui-audio-play,
2678
+ .ui-audio-icon-btn {
2679
+ display: inline-flex;
2680
+ flex-shrink: 0;
2681
+ align-items: center;
2682
+ justify-content: center;
2683
+ cursor: pointer;
2684
+ text-decoration: none;
2685
+ }
2686
+ .ui-audio-icon-btn:disabled {
2687
+ cursor: not-allowed;
2688
+ opacity: 0.5;
2689
+ }
2690
+ .ui-audio-play:disabled {
2691
+ cursor: not-allowed;
2692
+ }
2693
+ .ui-audio-select {
2694
+ flex-shrink: 0;
2695
+ }
2696
+ .ui-audio-select select {
2697
+ cursor: pointer;
2698
+ font-family: inherit;
2699
+ }
2700
+ .ui-audio-select select:disabled {
2701
+ cursor: not-allowed;
2702
+ opacity: 0.4;
2703
+ }
2704
+ .ui-audio-icon-btn:focus-visible,
2705
+ .ui-audio-play:focus-visible,
2706
+ .ui-audio-select select:focus-visible,
2707
+ .ui-audio-volume-slider:focus-visible {
2708
+ outline: 2px solid var(--accent);
2709
+ outline-offset: 2px;
2710
+ }
2711
+ .ui-audio-mute {
2712
+ display: inline-flex;
2713
+ flex-shrink: 0;
2714
+ }
2715
+ /* States */
2716
+ .ui-audio-status {
2717
+ display: flex;
2718
+ align-items: center;
2719
+ gap: 0.5rem;
2720
+ font-size: 0.75rem;
2721
+ color: var(--text-secondary);
2722
+ }
2723
+ .ui-audio-spinner {
2724
+ width: 0.875rem;
2725
+ height: 0.875rem;
2726
+ border-radius: 9999px;
2727
+ border: 2px solid var(--border-strong);
2728
+ border-top-color: var(--accent);
2729
+ animation: ui-audio-spin 1s linear infinite;
2730
+ }
2731
+ .ui-audio-error {
2732
+ padding: 1rem;
2733
+ text-align: center;
2734
+ font-size: 0.875rem;
2735
+ line-height: 1.25rem;
2736
+ color: var(--red);
2737
+ background: var(--red-muted);
2738
+ border: 1px solid var(--red);
2739
+ border-radius: var(--ui-radius-lg);
2740
+ }
2741
+ @keyframes ui-audio-spin {
2742
+ to {
2743
+ transform: rotate(360deg);
2744
+ }
2745
+ }
2746
+ .ui-audio-clock {
2747
+ flex-shrink: 0;
2748
+ white-space: nowrap;
2749
+ font-variant-numeric: tabular-nums;
2750
+ }
2751
+ .ui-audio-pill {
2752
+ --ui-audio-thumb: 12px;
2753
+ --ui-audio-bg: light-dark(#f1f3f4, #38393a);
2754
+ --ui-audio-fg: light-dark(#000, #fff);
2755
+ --ui-audio-fill: light-dark(#0b0b0b, #f5f5f5);
2756
+ --ui-audio-rest: light-dark(#585959, #b5b6b6);
2757
+ --ui-audio-hover: light-dark(rgb(0 0 0 / 0.1), rgb(255 255 255 / 0.15));
2758
+ gap: 8px;
2759
+ }
2760
+ .ui-audio-pill .ui-audio-row {
2761
+ flex-wrap: nowrap;
2762
+ gap: 0;
2763
+ height: var(--ui-audio-height, 54px);
2764
+ padding: 0 11px 0 9.5px;
2765
+ border-radius: 9999px;
2766
+ background: var(--ui-audio-bg);
2767
+ color: var(--ui-audio-fg);
2768
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
2769
+ }
2770
+ .ui-audio-pill .ui-audio-clock {
2771
+ font-size: 14px;
2772
+ line-height: 16px;
2773
+ color: var(--ui-audio-fg);
2774
+ font-variant-numeric: normal;
2775
+ margin-left: 5px;
2776
+ }
2777
+ .ui-audio-pill .ui-audio-clock + .ui-audio-clock {
2778
+ margin-left: 0;
2779
+ }
2780
+ .ui-audio-pill .ui-audio-progress {
2781
+ min-width: 0;
2782
+ margin: 0 16px 0 16px;
2783
+ }
2784
+ .ui-audio-pill .ui-audio-track {
2785
+ height: 4px;
2786
+ border-radius: 2px;
2787
+ background: var(--ui-audio-rest);
2788
+ }
2789
+ .ui-audio-pill .ui-audio-fill {
2790
+ border-radius: 2px;
2791
+ background: var(--ui-audio-fill);
2792
+ transition: none;
2793
+ }
2794
+ .ui-audio-pill .ui-audio-thumb {
2795
+ background: var(--ui-audio-fill);
2796
+ transition: none;
2797
+ }
2798
+ .ui-audio-pill .ui-audio-play,
2799
+ .ui-audio-pill .ui-audio-icon-btn,
2800
+ .ui-audio-pill .ui-audio-select select {
2801
+ width: 32px;
2802
+ height: 32px;
2803
+ border-radius: 9999px;
2804
+ background: transparent;
2805
+ color: var(--ui-audio-fg);
2806
+ }
2807
+ .ui-audio-pill .ui-audio-play:hover:not(:disabled),
2808
+ .ui-audio-pill .ui-audio-icon-btn:hover:not(:disabled),
2809
+ .ui-audio-pill .ui-audio-select select:hover:not(:disabled) {
2810
+ background: var(--ui-audio-hover);
2811
+ }
2812
+ .ui-audio-pill .ui-audio-play:disabled {
2813
+ background: transparent;
2814
+ opacity: 0.4;
2815
+ }
2816
+ .ui-audio-pill .ui-audio-icon-btn {
2817
+ color: var(--ui-audio-fg);
2818
+ }
2819
+ .ui-audio-pill .ui-audio-select select {
2820
+ appearance: none;
2821
+ width: 32px;
2822
+ padding: 0;
2823
+ border: 0;
2824
+ text-align: center;
2825
+ text-align-last: center;
2826
+ font-size: 12px;
2827
+ letter-spacing: -0.02em;
2828
+ font-family: inherit;
2829
+ line-height: 32px;
2830
+ }
2831
+
2832
+ .ui-audio-glass {
2833
+ --ui-audio-thumb: 9px;
2834
+ --ui-audio-fg: #fff;
2835
+ --ui-audio-hover: rgb(255 255 255 / 0.18);
2836
+ gap: 8px;
2837
+ }
2838
+ .ui-audio-glass .ui-audio-row {
2839
+ flex-wrap: nowrap;
2840
+ gap: 16px;
2841
+ height: var(--ui-audio-height, 31px);
2842
+ padding: 0 16px 0 15.5px;
2843
+ border-radius: 6px;
2844
+ /* Darker in light schemes so white text keeps about 6:1 contrast. */
2845
+ background: light-dark(rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.4));
2846
+ color: var(--ui-audio-fg);
2847
+ font-family:
2848
+ system-ui,
2849
+ -apple-system,
2850
+ "Helvetica Neue",
2851
+ Arial,
2852
+ sans-serif;
2853
+ }
2854
+ .ui-audio-glass .ui-audio-clock {
2855
+ font-size: 13px;
2856
+ line-height: 16px;
2857
+ font-weight: 500;
2858
+ letter-spacing: -0.6px;
2859
+ color: var(--ui-audio-fg);
2860
+ }
2861
+
2862
+ .ui-audio-glass .ui-audio-skip,
2863
+ .ui-audio-glass .ui-audio-play {
2864
+ margin: 0 -2.6px;
2865
+ }
2866
+ .ui-audio-glass
2867
+ .ui-audio-icon-btn:not(.ui-audio-skip)
2868
+ svg[viewBox="0 0 22 16"] {
2869
+ margin: 0 -2px;
2870
+ }
2871
+ .ui-audio-glass .ui-audio-select {
2872
+ margin: 0 -7px;
2873
+ }
2874
+ .ui-audio-glass .ui-audio-progress {
2875
+ min-width: 0;
2876
+ }
2877
+ .ui-audio-glass .ui-audio-clock + .ui-audio-progress {
2878
+ margin-left: -10px;
2879
+ }
2880
+ .ui-audio-glass .ui-audio-progress + .ui-audio-clock {
2881
+ margin-left: -10px;
2882
+ }
2883
+ .ui-audio-glass .ui-audio-track {
2884
+ height: 4.5px;
2885
+ border-radius: 3px;
2886
+ background: rgb(255 255 255 / 0.1);
2887
+ }
2888
+ .ui-audio-glass .ui-audio-fill {
2889
+ border-radius: 3px;
2890
+ background: rgb(255 255 255 / 0.42);
2891
+ transition: none;
2892
+ }
2893
+ .ui-audio-glass .ui-audio-thumb {
2894
+ background: #fff;
2895
+ opacity: 1;
2896
+ transition: none;
2897
+ }
2898
+ .ui-audio-glass .ui-audio-play,
2899
+ .ui-audio-glass .ui-audio-icon-btn,
2900
+ .ui-audio-glass .ui-audio-select select {
2901
+ width: auto;
2902
+ height: auto;
2903
+ min-width: 0;
2904
+ padding: 0;
2905
+ border-radius: 3px;
2906
+ background: transparent;
2907
+ color: var(--ui-audio-fg);
2908
+ display: inline-flex;
2909
+ align-items: center;
2910
+ justify-content: center;
2911
+ }
2912
+ .ui-audio-glass .ui-audio-play:hover:not(:disabled),
2913
+ .ui-audio-glass .ui-audio-icon-btn:hover:not(:disabled),
2914
+ .ui-audio-glass .ui-audio-select select:hover:not(:disabled) {
2915
+ background: transparent;
2916
+ opacity: 0.7;
2917
+ }
2918
+ .ui-audio-glass .ui-audio-play:disabled {
2919
+ background: transparent;
2920
+ opacity: 0.4;
2921
+ }
2922
+ .ui-audio-glass .ui-audio-icon-btn {
2923
+ color: var(--ui-audio-fg);
2924
+ }
2925
+ .ui-audio-glass .ui-audio-select select {
2926
+ appearance: none;
2927
+ border: 0;
2928
+ width: 30px;
2929
+ font-size: 12px;
2930
+ letter-spacing: -0.02em;
2931
+ font-weight: 500;
2932
+ font-family: inherit;
2933
+ text-align: center;
2934
+ text-align-last: center;
2935
+ }
2936
+
2937
+ .ui-audio-pill .ui-audio-track:has(.ui-audio-seek:focus-visible),
2938
+ .ui-audio-glass .ui-audio-track:has(.ui-audio-seek:focus-visible) {
2939
+ outline-offset: 3px;
2940
+ }
2941
+ .ui-audio-pill .ui-audio-select option,
2942
+ .ui-audio-glass .ui-audio-select option {
2943
+ color: initial;
2944
+ }
2945
+
2946
+ /* Collapsed rather than hidden so Tab can reach the native volume slider. */
2947
+ .ui-audio-volume {
2948
+ display: inline-flex;
2949
+ align-items: center;
2950
+ flex-shrink: 0;
2951
+ color: var(--ui-audio-fg);
2952
+ }
2953
+ .ui-audio-volume-popup {
2954
+ width: 0;
2955
+ overflow: hidden;
2956
+ display: flex;
2957
+ align-items: center;
2958
+ transition: width 100ms;
2959
+ }
2960
+ .ui-audio-volume:hover .ui-audio-volume-popup,
2961
+ .ui-audio-volume:focus-within .ui-audio-volume-popup {
2962
+ width: 72px;
2963
+ }
2964
+ .ui-audio-volume-slider {
2965
+ appearance: none;
2966
+ flex-shrink: 0;
2967
+ width: 60px;
2968
+ height: 4px;
2969
+ margin: 6px;
2970
+ padding: 0;
2971
+ border: 0;
2972
+ border-radius: 2px;
2973
+ background: var(--ui-audio-fg);
2974
+ cursor: pointer;
2975
+ }
2976
+ .ui-audio-volume-slider::-webkit-slider-thumb {
2977
+ appearance: none;
2978
+ width: 9px;
2979
+ height: 9px;
2980
+ border: 0;
2981
+ border-radius: 50%;
2982
+ background: var(--ui-audio-fg);
2983
+ }
2984
+ .ui-audio-volume-slider::-moz-range-thumb {
2985
+ width: 9px;
2986
+ height: 9px;
2987
+ border: 0;
2988
+ border-radius: 50%;
2989
+ background: var(--ui-audio-fg);
2990
+ }
2991
+ @media (prefers-reduced-motion: reduce) {
2992
+ .ui-audio-fill,
2993
+ .ui-audio-thumb,
2994
+ .ui-audio-play,
2995
+ .ui-audio-icon-btn,
2996
+ .ui-audio-spinner,
2997
+ .ui-audio-volume-popup {
2998
+ transition: none;
2999
+ animation: none;
3000
+ }
3001
+ }
3002
+
3003
+ /* A toggle Button (aria-pressed="true") reads as on: accent tint and an
3004
+ accent ring, from the theme tokens. Primary and danger keep their own look. */
3005
+ button.ui-sized-control:is(
3006
+ [data-variant="secondary"],
3007
+ [data-variant="ghost"],
3008
+ [data-variant="icon"]
3009
+ )[aria-pressed="true"] {
3010
+ background-color: var(--accent-muted);
3011
+ border-color: var(--accent);
3012
+ color: var(--text-primary);
3013
+ box-shadow: inset 0 0 0 1px var(--accent);
3014
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leonardaustin/ui",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Reusable React component library and application shell for Leonard Austin projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",