@jsenv/navi 0.29.367 → 0.29.368

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.
@@ -73229,6 +73229,7 @@ const css$t = /* css */`@layer navi {
73229
73229
  var(--picker-icon-color) 45%,
73230
73230
  transparent);
73231
73231
  --picker-icon-color-disabled: var(--picker-icon-color-readonly);
73232
+ --picker-icon-color-hover: var(--picker-icon-color);
73232
73233
  --picker-align-x-default: flex-start;
73233
73234
  --picker-align-y-default: center;
73234
73235
  --picker-text-align-default: initial;
@@ -73246,6 +73247,7 @@ const css$t = /* css */`@layer navi {
73246
73247
  --x-picker-press-padding-right: var(--picker-press-padding-right, var(--picker-press-padding-x, var(--picker-press-padding, 0px)));
73247
73248
  --x-picker-press-padding-bottom: var(--picker-press-padding-bottom, var(--picker-press-padding-y, var(--picker-press-padding, 0px)));
73248
73249
  --x-picker-press-padding-left: var(--picker-press-padding-left, var(--picker-press-padding-x, var(--picker-press-padding, 0px)));
73250
+ --x-picker-chevron-reach: 0px;
73249
73251
  --x-picker-color: var(--picker-color);
73250
73252
  --x-picker-icon-color: var(--picker-icon-color);
73251
73253
  --x-picker-align-x: var(--picker-align-x, var(--picker-align-x-default));
@@ -73414,7 +73416,10 @@ const css$t = /* css */`@layer navi {
73414
73416
  & > .navi_picker_box > .navi_picker_input {
73415
73417
  top: calc(-1 * (var(--picker-border-width) + var(--x-picker-press-padding-top)));
73416
73418
  right: calc(-1 *
73417
- (var(--picker-border-width) + var(--x-picker-press-padding-right)));
73419
+ (
73420
+ var(--picker-border-width) + var(--x-picker-press-padding-right) +
73421
+ var(--x-picker-chevron-reach)
73422
+ ));
73418
73423
  bottom: calc(-1 *
73419
73424
  (var(--picker-border-width) + var(--x-picker-press-padding-bottom)));
73420
73425
  left: calc(-1 * (var(--picker-border-width) + var(--x-picker-press-padding-left)));
@@ -73460,6 +73465,7 @@ const css$t = /* css */`@layer navi {
73460
73465
  &[data-hover] {
73461
73466
  --x-picker-background-color: var(--picker-background-color-hover);
73462
73467
  --x-picker-border-color: var(--picker-border-color-hover);
73468
+ --x-picker-icon-color: var(--picker-icon-color-hover);
73463
73469
  }
73464
73470
 
73465
73471
  &[data-readonly] {
@@ -73569,6 +73575,30 @@ const css$t = /* css */`@layer navi {
73569
73575
  align-items: var(--x-picker-align-y);
73570
73576
  display: flex;
73571
73577
  }
73578
+
73579
+ & > .navi_picker_box > .navi_picker_right_slot {
73580
+ margin-right: 0;
73581
+ margin-left: var(--picker-slot-spacing, var(--navi-xxs));
73582
+ align-self: center;
73583
+ }
73584
+
73585
+ &[data-chevron="start"] > .navi_picker_box > .navi_picker_right_slot {
73586
+ margin-right: var(--picker-slot-spacing, var(--navi-xxs));
73587
+ order: -1;
73588
+ margin-left: 0;
73589
+ }
73590
+
73591
+ &[data-chevron="hang-end"] > .navi_picker_box {
73592
+ --x-picker-chevron-reach: calc(var(--x-picker-chevron-size) +
73593
+ var(--picker-slot-spacing, var(--navi-xxs)));
73594
+
73595
+ & > .navi_picker_right_slot {
73596
+ position: absolute;
73597
+ top: 50%;
73598
+ left: 100%;
73599
+ transform: translateY(-50%);
73600
+ }
73601
+ }
73572
73602
  }
73573
73603
 
73574
73604
  &[data-variant="button"] {
@@ -73646,6 +73676,9 @@ const PickerButton = props => {
73646
73676
  // an <Icon>, which is aria-hidden, and a focusable node under aria-hidden is
73647
73677
  // invisible to assistive tech while still being reachable by tab.
73648
73678
  rightSlot,
73679
+ // A bare picker's chevron, and where it goes so the drawing keeps its box
73680
+ // (see the `chevron` doc). Left out, a bare picker draws no slot at all.
73681
+ chevron,
73649
73682
  placeholder,
73650
73683
  ui,
73651
73684
  maxLines: maxLinesProp = 1,
@@ -73706,11 +73739,20 @@ const PickerButton = props => {
73706
73739
  // icon, a headless one draws nothing, a button says what it opens with its
73707
73740
  // label, a word in a sentence has no room for furniture. Nor a picker
73708
73741
  // rendering the browser's own control ("default").
73709
- // Nor a bare one: the picker is that drawing's box to the pixel, so anything
73710
- // navi adds beside it either grows the box or covers what the caller drew.
73711
- // The pieces are the caller's to place there instead — a <Picker.Clear /> in
73712
- // their own layout (see warnOnClearableWithoutSlot).
73713
- const hasRightSlot = !picksNothing && rightSlot !== null && !isIcon && variant !== "headless" && variant !== "button" && variant !== "text" && variant !== "bare" && ui !== "default";
73742
+ // Nor a bare one, unless `chevron` says where: the picker is that drawing's
73743
+ // box to the pixel, so anything navi adds beside it either grows the box or
73744
+ // covers what the caller drew. The pieces are the caller's to place there
73745
+ // instead — a <Picker.Clear /> in their own layout (see
73746
+ // warnOnClearableWithoutSlot) — or the slot goes where the drawing is not:
73747
+ // after it, before it, or out of the flow altogether.
73748
+ const isBare = variant === "bare";
73749
+ const bareChevron = isBare && chevron !== undefined ? chevron : undefined;
73750
+ const hasRightSlot = !picksNothing && rightSlot !== null && !isIcon && variant !== "headless" && variant !== "button" && variant !== "text" && (!isBare || bareChevron !== undefined) && ui !== "default";
73751
+ // How far the press must follow a hanging chevron: its size, as a length the
73752
+ // input's inset can add up. "inherit" is 1em of the picker's own font, which
73753
+ // the input shares (font: inherit), so the em the icon is drawn in and the
73754
+ // em the reach is measured in are the same.
73755
+ const hangingChevronSize = bareChevron === "hang-end" && hasRightSlot ? rightSlotIconSize === "inherit" ? "1em" : stringifyStyleValue(rightSlotIconSize, "fontSize") : undefined;
73714
73756
  const inputRef = useRef(null);
73715
73757
  const [pickerRemainingProps, inputProps, facadeChildrenProps] = useControlFacadeProps({
73716
73758
  ...props,
@@ -73794,6 +73836,7 @@ const PickerButton = props => {
73794
73836
  pseudoClasses: PICKER_BUTTON_PSEUDO_CLASSES,
73795
73837
  "data-variant": variant,
73796
73838
  "data-icon": isIcon ? "" : undefined,
73839
+ "data-chevron": hasRightSlot ? bareChevron : undefined,
73797
73840
  "navi-picker": "",
73798
73841
  "navi-single-line": isSingleLine ? "" : undefined,
73799
73842
  "navi-ui-custom": ui === "default" ? undefined : "",
@@ -73807,6 +73850,7 @@ const PickerButton = props => {
73807
73850
  rightSlotIcon: undefined,
73808
73851
  rightSlotIconSize: undefined,
73809
73852
  rightSlot: undefined,
73853
+ chevron: undefined,
73810
73854
  clearConfirm: undefined,
73811
73855
  picksNothing: undefined,
73812
73856
  openWhileReadOnly: undefined,
@@ -73843,6 +73887,9 @@ const PickerButton = props => {
73843
73887
  },
73844
73888
  children: [jsx("span", {
73845
73889
  className: "navi_picker_box",
73890
+ style: hangingChevronSize === undefined ? undefined : {
73891
+ "--x-picker-chevron-size": hangingChevronSize
73892
+ },
73846
73893
  children: jsxs(PickerContext.Provider, {
73847
73894
  value: pickerContext,
73848
73895
  children: [variant === "headless" ? null : jsx(LoadingOutline, {