@jsenv/navi 0.29.154 → 0.29.155

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.
@@ -7073,12 +7073,19 @@ const ARROW_SPACING = 8;
7073
7073
  // (closest "[aria-expanded]", see commands.js): a button inside the callout
7074
7074
  // closes the callout, not the picker or dialog around it. Never "false" — a
7075
7075
  // closed callout is removed, not kept.
7076
+ //
7077
+ // role="status" is the floor, not the final value: a message appearing without
7078
+ // the user asking for it is a live region, and a callout carrying no status at
7079
+ // all still owes one. A status raises it (the addStatusEffect swapping in
7080
+ // "alert" for warning/error), and it is also the name a test reaches the
7081
+ // callout by — navi's classes and ids are not a contract (docs/testid.md).
7076
7082
  const calloutTemplate = /* html */`
7077
7083
  <div
7078
7084
  class="navi_callout"
7079
7085
  popover="manual"
7080
7086
  navi-out-of-flow=""
7081
7087
  aria-expanded="true"
7088
+ role="status"
7082
7089
  >
7083
7090
  <div class="navi_callout_box">
7084
7091
  <div class="navi_callout_frame"></div>
@@ -66945,6 +66952,10 @@ installImportMetaCssBuild(import.meta);const css$t = /* css */`@layer navi {
66945
66952
  --x-picker-padding-right: var(--picker-padding-right, var(--picker-padding-x, var(--picker-padding, var(--picker-padding-x-default))));
66946
66953
  --x-picker-padding-left: var(--picker-padding-left, var(--picker-padding-x, var(--picker-padding, var(--picker-padding-x-default))));
66947
66954
  --x-picker-padding-bottom: var(--picker-padding-bottom, var(--picker-padding-y, var(--picker-padding, var(--picker-padding-y-default))));
66955
+ --x-picker-press-padding-top: var(--picker-press-padding-top, var(--picker-press-padding-y, var(--picker-press-padding, 0px)));
66956
+ --x-picker-press-padding-right: var(--picker-press-padding-right, var(--picker-press-padding-x, var(--picker-press-padding, 0px)));
66957
+ --x-picker-press-padding-bottom: var(--picker-press-padding-bottom, var(--picker-press-padding-y, var(--picker-press-padding, 0px)));
66958
+ --x-picker-press-padding-left: var(--picker-press-padding-left, var(--picker-press-padding-x, var(--picker-press-padding, 0px)));
66948
66959
  --x-picker-color: var(--picker-color);
66949
66960
  --x-picker-icon-color: var(--picker-icon-color);
66950
66961
  --x-picker-align-x: var(--picker-align-x, var(--picker-align-x-default));
@@ -67091,14 +67102,17 @@ installImportMetaCssBuild(import.meta);const css$t = /* css */`@layer navi {
67091
67102
 
67092
67103
  &[navi-ui-custom] {
67093
67104
  & .navi_picker_input {
67094
- top: calc(-1 * var(--picker-border-width));
67095
- right: calc(-1 * var(--picker-border-width));
67096
- bottom: calc(-1 * var(--picker-border-width));
67097
- left: calc(-1 * var(--picker-border-width));
67098
- opacity: 0;
67099
- appearance: none;
67105
+ top: calc(-1 * (var(--picker-border-width) + var(--x-picker-press-padding-top)));
67106
+ right: calc(-1 *
67107
+ (var(--picker-border-width) + var(--x-picker-press-padding-right)));
67108
+ bottom: calc(-1 *
67109
+ (var(--picker-border-width) + var(--x-picker-press-padding-bottom)));
67110
+ left: calc(-1 * (var(--picker-border-width) + var(--x-picker-press-padding-left)));
67100
67111
  width: auto;
67101
67112
  height: auto;
67113
+ font: inherit;
67114
+ opacity: 0;
67115
+ appearance: none;
67102
67116
  position: absolute;
67103
67117
  }
67104
67118
  }
@@ -67278,6 +67292,12 @@ const PickerButton = props => {
67278
67292
  // keywords have to become lengths here — "s" reaching CSS untouched makes
67279
67293
  // the declaration invalid, silently, and the gap just goes away.
67280
67294
  props.slotSpacing = resolveSpacingSize(props.slotSpacing);
67295
+ for (const pressPaddingPropName of PRESS_PADDING_PROP_NAMES) {
67296
+ const pressPadding = props[pressPaddingPropName];
67297
+ if (pressPadding !== undefined) {
67298
+ props[pressPaddingPropName] = stringifySpacingStyle(pressPadding);
67299
+ }
67300
+ }
67281
67301
  const {
67282
67302
  ref,
67283
67303
  variant,
@@ -67836,6 +67856,13 @@ const isOpeningKeyboardOnMobile = type => {
67836
67856
  const NON_MOBILE_KEYBOARD_TYPES = new Set(["date", "month", "week", "time", "datetime-local", "color"]);
67837
67857
  const PICKER_BUTTON_PSEUDO_CLASSES = [":hover", ":focus", ":focus-visible", ":focus-within", ":read-only", ":disabled", ":-navi-loading", ":-navi-expanded", ":-navi-has-value"];
67838
67858
  const PickerInputPseudoClasses = [":focus", ":focus-visible", ":read-only", ":disabled", ":-navi-loading", ":-navi-has-value", ":-navi-expanded"];
67859
+
67860
+ // Spacing props that are not the names of real CSS styles, so Box hands them to
67861
+ // the custom property untouched: a size keyword would reach CSS as the word "s"
67862
+ // and a number as a unitless one, either of which makes the calc() using it
67863
+ // invalid and drops the press area back to the box. Hence the pass in
67864
+ // PickerButton, which turns them into lengths.
67865
+ const PRESS_PADDING_PROP_NAMES = ["pressPadding", "pressPaddingX", "pressPaddingY", "pressPaddingTop", "pressPaddingRight", "pressPaddingBottom", "pressPaddingLeft"];
67839
67866
  const PickerStyleCSSVars = {
67840
67867
  "outlineWidth": "--picker-outline-width",
67841
67868
  "borderWidth": "--picker-border-width",
@@ -67849,6 +67876,13 @@ const PickerStyleCSSVars = {
67849
67876
  "popupBorderRadius": "--picker-popup-border-radius",
67850
67877
  "dialogBorderWidth": "--picker-dialog-border-width",
67851
67878
  "slotSpacing": "--picker-slot-spacing",
67879
+ "pressPadding": "--picker-press-padding",
67880
+ "pressPaddingX": "--picker-press-padding-x",
67881
+ "pressPaddingY": "--picker-press-padding-y",
67882
+ "pressPaddingTop": "--picker-press-padding-top",
67883
+ "pressPaddingRight": "--picker-press-padding-right",
67884
+ "pressPaddingBottom": "--picker-press-padding-bottom",
67885
+ "pressPaddingLeft": "--picker-press-padding-left",
67852
67886
  // alignX/alignY resolve to these two on a flex-x box; naming the CSS style
67853
67887
  // (not the prop) is what styleCSSVars matches, so justifyContent/alignItems
67854
67888
  // passed directly land in the same variables.