use-wc 1.0.0-pre.52 → 1.0.0-pre.54

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.
@@ -106,8 +106,9 @@
106
106
  `::part()` inside a `:where()`/`:is()` argument list is invalid and silently dropped by the
107
107
  browser, taking the whole alternative down with it. Stands alone instead. */
108
108
  use-listbox-input:not(.appearance-native)::part(listbox) {
109
- border: var(--usewc-layout-input-border) var(--usewc-effect-input-border-style)
110
- var(--usewc-color-input-border-static);
109
+ --usewc-color-input-border: var(--usewc-color-input-border-static);
110
+
111
+ border: var(--usewc-layout-input-border) var(--usewc-effect-input-border-style) var(--usewc-color-input-border);
111
112
  padding: var(--usewc-layout-popover-menu-padding);
112
113
  background: var(--usewc-color-input-background-static);
113
114
  font-family: var(--usewc-font-input-family);
@@ -115,12 +116,39 @@
115
116
  font-weight: var(--usewc-font-weight-normal);
116
117
  color: var(--usewc-color-input-text-static);
117
118
  border-radius: var(--usewc-effect-input-border-radius);
119
+ outline: 0 var(--usewc-effect-outline-style) var(--usewc-color-outline);
120
+ outline-offset: var(--usewc-effect-outline-offset-flush);
121
+ transition: var(--usewc-effect-outline-transition);
118
122
  }
119
123
 
120
124
  use-theme-escape use-listbox-input:not(.appearance-native)::part(listbox) {
121
125
  all: revert-layer;
122
126
  }
123
127
 
128
+ use-listbox-input:not(.appearance-native)::part(listbox):hover {
129
+ --usewc-color-input-border: var(--usewc-color-input-border-hover);
130
+ }
131
+
132
+ use-theme-escape use-listbox-input:not(.appearance-native)::part(listbox):hover {
133
+ all: revert-layer;
134
+ }
135
+
136
+ /* The actually-focused element with `delegatesFocus` is this inner part, not the host —
137
+ Chromium's `:focus-visible` heuristic doesn't reliably propagate to the host through
138
+ delegation, so the ring has to be driven from here or the browser's native default outline
139
+ shows on the part instead. Border flips to the same focus color as the outline (matching the
140
+ shared input pattern above) so the two read as one seamless ring instead of a gray border
141
+ inside a mismatched blue ring. */
142
+ use-listbox-input:not(.appearance-native)::part(listbox):focus-visible {
143
+ --usewc-color-input-border: var(--usewc-color-input-border-focus);
144
+
145
+ outline-width: var(--usewc-effect-outline-size);
146
+ }
147
+
148
+ use-theme-escape use-listbox-input:not(.appearance-native)::part(listbox):focus-visible {
149
+ all: revert-layer;
150
+ }
151
+
124
152
  select:not(.appearance-native) {
125
153
  appearance: none;
126
154
  }
@@ -724,6 +752,7 @@
724
752
  all: unset;
725
753
  box-sizing: content-box;
726
754
  appearance: none;
755
+ -moz-appearance: textfield;
727
756
  field-sizing: content;
728
757
  outline: none;
729
758
  border-radius: var(--usewc-effect-input-border-radius);
@@ -755,12 +784,12 @@
755
784
  --usewc-color-input-segment-text: var(--usewc-color-input-segment-text-focus);
756
785
  }
757
786
 
758
- &::selection {
787
+ &::part(segment-input)::selection {
759
788
  background: var(--usewc-color-input-segment-background-focus);
760
789
  color: var(--usewc-color-input-segment-text-focus);
761
790
  }
762
791
 
763
- use-theme-escape &::selection {
792
+ use-theme-escape &::part(segment-input)::selection {
764
793
  all: revert-layer;
765
794
  }
766
795
  }
@@ -910,7 +939,7 @@
910
939
  }
911
940
  }
912
941
 
913
- use-listbox-input:is(:hover, :focus) use-option:state(active) {
942
+ use-listbox-input:not(:has(use-option:hover)):focus use-option:state(active) {
914
943
  --usewc-color-popover-menu-item-background: var(--usewc-color-popover-menu-item-background-active);
915
944
  }
916
945
 
package/dist/use-wc.mjs CHANGED
@@ -660,17 +660,22 @@ let UseDurationInput = class UseDurationInput extends UseLocaleElement {
660
660
  }
661
661
  static {
662
662
  this.styles = css`
663
- :host([format="digital"]) {
664
- display: inline-flex;
665
- align-items: center;
666
- gap: 0.5ch;
667
-
663
+ :host {
668
664
  input {
665
+ -moz-appearance: textfield;
666
+ font-variant-numeric: tabular-nums;
669
667
  field-sizing: content;
670
668
  text-align: end;
669
+ min-width: 2ch;
671
670
  }
672
671
  }
673
672
 
673
+ :host([format="digital"]) {
674
+ display: inline-flex;
675
+ align-items: center;
676
+ gap: 0.5ch;
677
+ }
678
+
674
679
  input::-webkit-outer-spin-button,
675
680
  input::-webkit-inner-spin-button {
676
681
  -webkit-appearance: none;
@@ -1247,11 +1252,11 @@ let UseTimeInput = class UseTimeInput extends UseLocaleElement {
1247
1252
  gap: 0.5ch;
1248
1253
 
1249
1254
  input {
1255
+ -moz-appearance: textfield;
1250
1256
  font-variant-numeric: tabular-nums;
1251
1257
  field-sizing: content;
1252
1258
  text-align: end;
1253
1259
  min-width: 2ch;
1254
- text-align: end;
1255
1260
  }
1256
1261
 
1257
1262
  input::part(segment-input-fractionalSecond) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-wc",
3
- "version": "1.0.0-pre.52",
3
+ "version": "1.0.0-pre.54",
4
4
  "private": false,
5
5
  "homepage": "https://usewc.com",
6
6
  "bugs": "https://github.com/dang-rabbits/use-wc/issues",