@jsenv/navi 0.29.487 → 0.29.488

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.
@@ -75911,11 +75911,6 @@ const PickerCustom = props => {
75911
75911
  // button) hangs its popup off the whole control instead.
75912
75912
  anchor: props.anchor || props.ref,
75913
75913
  openController,
75914
- // Before the content is built and shown, so it is laid out and placed
75915
- // at the size it is read at (see .navi_picker_content in picker.jsx).
75916
- onOpen: () => {
75917
- writeContainerFont(ref.current, popupRef.current);
75918
- },
75919
75914
  // A picker whose value was never given to it reads it off the control in
75920
75915
  // its popup (see useUIFacadeStateController), so that control is built as
75921
75916
  // soon as something reads the value: at mount when the picker sees the
@@ -76739,30 +76734,6 @@ const showNativePicker = (pickerInput, event) => {
76739
76734
  }
76740
76735
  };
76741
76736
 
76742
- // The popup of a picker is opened where the picker stands, so it writes at the
76743
- // size and weight of what is around it — the ones a Dialog rendered there
76744
- // inherits — and never at the ones the trigger is drawn at. CSS cannot reach
76745
- // past the picker's own: its root holds the popup and sets both. Written on the
76746
- // holder only when they differ, so an opening that changes nothing invalidates
76747
- // no style.
76748
- const writeContainerFont = (pickerEl, popupEl) => {
76749
- const container = pickerEl?.parentElement;
76750
- const holder = popupEl?.closest("[data-picker-content]");
76751
- if (!container || !holder) {
76752
- return;
76753
- }
76754
- const {
76755
- fontSize,
76756
- fontWeight
76757
- } = getComputedStyle(container);
76758
- if (holder.style.fontSize !== fontSize) {
76759
- holder.style.fontSize = fontSize;
76760
- }
76761
- if (holder.style.fontWeight !== fontWeight) {
76762
- holder.style.fontWeight = fontWeight;
76763
- }
76764
- };
76765
-
76766
76737
  installImportMetaCssBuild(import.meta);
76767
76738
  const css$y = /* css */`.navi_picker_confirm_body {
76768
76739
  min-width: 180px;
@@ -87226,7 +87197,17 @@ const PickerFileUI = /*#__PURE__*/asPickerOwnUI(() => {
87226
87197
  });
87227
87198
 
87228
87199
  installImportMetaCssBuild(import.meta);
87229
- const css$r = /* css */`@layer navi {
87200
+ const css$r = /* css */`@property --navi-picker-container-font-size {
87201
+ syntax: "<length>";
87202
+ inherits: true;
87203
+ initial-value: 16px;
87204
+ }
87205
+
87206
+ @layer navi {
87207
+ :where(:has( > .navi_picker)) {
87208
+ --navi-picker-container-font-size: 1em;
87209
+ }
87210
+
87230
87211
  .navi_picker {
87231
87212
  --picker-border-radius: var(--navi-control-border-radius);
87232
87213
  --picker-border-width: var(--navi-control-border-width);
@@ -87237,6 +87218,7 @@ const css$r = /* css */`@layer navi {
87237
87218
  --picker-padding-x-default: var(--navi-picker-padding-x-default);
87238
87219
  --picker-padding-y-default: var(--navi-picker-padding-y-default);
87239
87220
  --picker-font-size: var(--navi-control-font-size);
87221
+ --picker-font-weight: initial;
87240
87222
  --picker-font-family: var(--navi-control-font-family, inherit);
87241
87223
  --picker-loader-color: var(--navi-loader-color);
87242
87224
  --picker-cta-background-color: var(--navi-accent-color);
@@ -87463,6 +87445,7 @@ const css$r = /* css */`@layer navi {
87463
87445
  padding-bottom: var(--x-picker-padding-bottom);
87464
87446
  align-items: var(--x-picker-align-y);
87465
87447
  justify-content: var(--x-picker-align-x);
87448
+ font-weight: var(--picker-font-weight, inherit);
87466
87449
  background-color: var(--x-picker-background-color);
87467
87450
  border-width: var(--picker-border-width);
87468
87451
  border-style: solid;
@@ -87641,9 +87624,8 @@ const css$r = /* css */`@layer navi {
87641
87624
  --x-corner-top-right-radius: initial;
87642
87625
  --x-corner-bottom-right-radius: initial;
87643
87626
  --x-corner-bottom-left-radius: initial;
87644
- font-weight: initial;
87627
+ font-size: var(--navi-picker-container-font-size);
87645
87628
  text-align: initial;
87646
- font-size: 1rem;
87647
87629
  display: contents;
87648
87630
  }
87649
87631
 
@@ -88444,6 +88426,9 @@ const PickerInputPseudoClasses = [":focus", ":focus-visible", ":read-only", ":di
88444
88426
  // picker_custom.jsx: a variable on the root inherits into everything the popup
88445
88427
  // holds, and the pickers in there would read it as their own.
88446
88428
  const PickerStyleCSSVars = {
88429
+ // Onto the trigger's frame rather than the root, which holds the popup too
88430
+ // (see --picker-font-weight).
88431
+ "fontWeight": "--picker-font-weight",
88447
88432
  "outlineWidth": "--picker-outline-width",
88448
88433
  "borderWidth": "--picker-border-width",
88449
88434
  "borderRadius": "--picker-border-radius",