@jsenv/navi 0.27.74 → 0.27.76

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.
@@ -3,7 +3,7 @@ import { isValidElement, createContext, h, toChildArray, render, Fragment, clone
3
3
  import { useErrorBoundary, useLayoutEffect, useEffect, useContext, useMemo, useRef, useState, useCallback, useId } from "preact/hooks";
4
4
  import { jsxs, jsx, Fragment as Fragment$1 } from "preact/jsx-runtime";
5
5
  import { signal, effect, computed, batch, useSignal } from "@preact/signals";
6
- import { createIterableWeakSet, createEventGroupLogger, normalizeStyle, mergeOneStyle, createPubSub, findEvent, dispatchInternalCustomEvent, mergeTwoStyles, normalizeStyles, createGroupTransitionController, getElementSignature, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, dispatchCustomEvent, createValueEffect, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, findFocusDelegateTarget, findFocusable, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, getKeyboardEventDefaultAction, chainEvent, findBefore, findAfter, resolveCSSSize, hasCSSSizeUnit, resolveOklchLightness, contrastColor, activeElementSignal, initFocusGroup, elementIsFocusable, parsePositionArea, getPositionedParent, snapToPixel, trapFocusInside, trapScrollInside, scrollIntoViewScoped, measureWidestChildRow, performTabNavigation, dragAfterThreshold, getScrollContainer, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement } from "@jsenv/dom";
6
+ import { createIterableWeakSet, createEventGroupLogger, normalizeStyle, mergeOneStyle, createPubSub, findEvent, dispatchInternalCustomEvent, mergeTwoStyles, normalizeStyles, createGroupTransitionController, getElementSignature, getBorderRadius, preventIntermediateScrollbar, createOpacityTransition, dispatchCustomEvent, createValueEffect, getVisuallyVisibleInfo, getFirstVisuallyVisibleAncestor, findFocusDelegateTarget, findFocusable, allowWheelThrough, dispatchPublicCustomEvent, resolveCSSColor, visibleRectEffect, pickPositionRelativeTo, getBorderSizes, getPaddingSizes, applyNewPosition, measureLongestVisualLineWidth, getKeyboardEventDefaultAction, chainEvent, findBefore, findAfter, resolveCSSSize, hasCSSSizeUnit, resolveOklchLightness, contrastColor, activeElementSignal, initFocusGroup, elementIsFocusable, parsePositionArea, getPositionedParent, snapToPixel, trapFocusInside, trapScrollInside, scrollIntoViewScoped, measureWidestChildRow, performTabNavigation, dragAfterThreshold, getScrollContainer, stickyAsRelativeCoords, createDragToMoveGestureController, getDropTargetInfo, setStyles, useActiveElement, stringifyStyle as stringifyStyle$1 } from "@jsenv/dom";
7
7
  export { contrastColor, startDragToReorder } from "@jsenv/dom";
8
8
  import { prefixFirstAndIndentRemainingLines } from "@jsenv/humanize";
9
9
  import { createValidity, parseDuration, durationContainsNaN, compareTwoDurations, durationToSeconds, durationToISOString } from "@jsenv/validity";
@@ -40532,6 +40532,7 @@ const ListItemHeader = props => {
40532
40532
  }, []);
40533
40533
  return jsx(Next, {
40534
40534
  ...props,
40535
+ header: undefined,
40535
40536
  role: "presentation",
40536
40537
  baseClassName: "navi_list_item_header"
40537
40538
  });
@@ -40549,6 +40550,7 @@ const ListItemFooter = props => {
40549
40550
  }, []);
40550
40551
  return jsx(Next, {
40551
40552
  ...props,
40553
+ footer: undefined,
40552
40554
  role: "presentation",
40553
40555
  baseClassName: "navi_list_item_footer"
40554
40556
  });
@@ -41505,6 +41507,15 @@ const css$m = /* css */`
41505
41507
  grid-column: 1 / -1;
41506
41508
  }
41507
41509
 
41510
+ /* Same reasoning as the filler rule above, for the separator (the default
41511
+ Separator rendered between items when List's own separator prop is
41512
+ set): a grid track only ever spans the single column it is placed in
41513
+ by default, so without this it would collapse into just the first
41514
+ column's width instead of the full row. */
41515
+ .navi_list[navi-box-flow="grid"] > .navi_separator {
41516
+ grid-column: 1 / -1;
41517
+ }
41518
+
41508
41519
  /* Empty state — hidden by default, shown when no list items are rendered.
41509
41520
  order: 1 pushes fallbacks after all regular items in flex column layout.
41510
41521
  The list children are open-ended (headers, presentation items, real items),
@@ -41870,7 +41881,8 @@ const LIST_STYLE_CSS_VARS = {
41870
41881
  maxWidth: "--list-max-width",
41871
41882
  borderColor: "--list-border-color",
41872
41883
  borderRadius: "--list-border-radius",
41873
- borderWidth: "--list-border-width"
41884
+ borderWidth: "--list-border-width",
41885
+ backgroundColor: "--list-background-color"
41874
41886
  };
41875
41887
  const LIST_PSEUDO_CLASSES = [":hover", ":focus", ":focus-visible", ":focus-within", ":read-only", ":disabled", ":-navi-void", ":-navi-expanded"];
41876
41888
  const useListScrollSync = ({
@@ -50009,17 +50021,17 @@ const SidePanel = ({
50009
50021
  className: withPropsClassName("navi_side_panel", className),
50010
50022
  "navi-side": side,
50011
50023
  style: {
50012
- "--navi-side-panel-width": toCssLength(width),
50013
- "--navi-side-panel-height": toCssLength(height)
50024
+ "--navi-side-panel-width": toCssLength(width, "width"),
50025
+ "--navi-side-panel-height": toCssLength(height, "height")
50014
50026
  },
50015
50027
  ...rest,
50016
50028
  children: children
50017
50029
  });
50018
50030
  };
50019
- // Preact doesn't auto-append "px" to bare numeric style values the way React
50020
- // does an unsuffixed number is an invalid CSS length, silently rejected by
50021
- // the browser (leaving the property unset instead of sized).
50022
- const toCssLength = value => value === undefined || value === null ? undefined : typeof value === "number" ? `${value}px` : value;
50031
+ // Same width/height normalization Box itself uses for its own styleCSSVars
50032
+ // props (see box_style_util.js's own getStringifier) bare numbers become
50033
+ // px, percentages/calc()/CSS keywords pass through untouched.
50034
+ const toCssLength = (value, propertyName) => value === undefined || value === null ? undefined : stringifyStyle$1(value, propertyName);
50023
50035
 
50024
50036
  /**
50025
50037
  * Stuck to the top of the panel's own scrollable area (`position: sticky`)