@eldrajs/ui 0.3.19 → 0.3.20

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.
package/CHANGELOG.md CHANGED
@@ -178,6 +178,7 @@ Release-please writes the generated notes from commit messages and does not repl
178
178
 
179
179
  ### Fixed
180
180
 
181
+ - **`SearchBar` `autofocus` focuses after the page's own mount updates have rendered (WS-1277).** It focused inside `onMounted`, before updates other blocks queue in their mounted hooks had drawn, so the field was scrolled into view against a layout about to change and could end a pixel away from where the settled page puts it. It now focuses on the next tick.
181
182
  - **`SearchModal` shows its results in Safari, and long results scroll.** The results area took no height in Safari, so the dialog drew only the field and the footer. In every browser, results taller than the dialog's max height were cut off instead of scrolling. The `results` part is now a flex column sized by its content (`flex-auto`, was `flex-1`), and the panel inside it fills it and scrolls (`flex-auto`, was `h-full`).
182
183
  - **Opening a `Dialog`, `Drawer`, `Lightbox` or `SearchModal` no longer shifts the page sideways.** The scroll lock hid the page's scrollbar and the content widened into its space; `<html>` is now padded on the right by the scrollbar's width while a modal is open, added to any padding it already has and restored on close. Nothing changes with overlay scrollbars or on a page that does not scroll. A `position: fixed` element that spans the window pads itself with `--eldra-scrollbar-width` (under Added) to stay still too.
183
184
  - **`Input` follows a `leadingIcon`, `prefix` or `suffix` slot given or taken away after mount.** The end padding and the slot's row were decided from the slots the field was mounted with, so a `<template #suffix v-if="…">` toggled later was not drawn.
@@ -7245,7 +7245,7 @@ var SearchBar_default = /* @__PURE__ */ defineComponent({
7245
7245
  }
7246
7246
  onMounted(() => {
7247
7247
  if (props.recent === void 0) storedRecent.value = readStoredRecent();
7248
- if (props.autofocus) fieldRef.value?.focus();
7248
+ if (props.autofocus) nextTick(() => fieldRef.value?.focus());
7249
7249
  });
7250
7250
  const recentList = computed(() => {
7251
7251
  if (!props.showRecent || recentCleared.value) return [];
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $ as FIELD_KEY, A as ICON_STROKE_WIDTH$6, G as FIELD_SEARCH_APPEARANCE, I as FIELD_CLEAR_BUTTON_BOX, K as FIELD_SIZE, N as FIELD_BASE, R as FIELD_DISABLED, V as FIELD_LIVE, _ as useFloating, a as CURRENCY_KEY, c as provideEldraUiCurrency, d as useEldraUiLocale, et as mergeClass, f as Spinner_default, g as useTeleportTarget, h as topLayerDialog, k as ICON_SIZE_CLASS, l as provideEldraUiLocale, m as useOverlay, n as matchRange, nt as joinIds, o as DEFAULT_UI_LOCALE, p as usePopover, rt as useUiId, s as LOCALE_KEY, tt as useControllableModel, u as useEldraUiCurrency, v as normalizeText, y as useListbox } from "./useOptionList-UMUMayec.js";
2
2
  import { n as provideEldraScope, r as useEldraScope, t as ELDRA_SCOPE_KEY } from "./useEldraScope-BDbGzt7R.js";
3
- import { $ as applyMask, A as defaultUnitFormat, B as tagPadding, C as filterNumericBeforeInput, D as createNumberFormat, E as UnitInput_default, F as parseLocaleNumber, G as FieldError_default, H as Checkbox_default, I as toMinorUnits, J as FORM_LAYOUT_KEY, K as Button_default, L as useHeadingTag, M as formatNumber, N as formatUnit, O as currencyFractionDigits, P as localeSeparators, Q as useSlotPresence, R as TAG_FILL, S as Switch_default, T as CurrencyInput_default, U as VisuallyHidden_default, V as CheckboxGroup_default, W as RequiredMark_default, X as Autocomplete_default, Y as FORM_SUBMITTING_KEY, Z as Input_default, _ as radioRecipe, a as ownsShortcut, b as FormLayout_default, c as RadioGroup_default, d as PLAIN_BOX_ONLY, et as defaultCharacterMeaning, f as PLAIN_COLUMNS, g as optionCursor, h as labelRecipe, i as claimShortcut, j as formatCurrency, k as currencySymbol, l as HINT, m as dotRecipe, n as Textarea_default, o as releaseShortcut, p as PLAIN_OPTION, q as Icon_default, r as SearchBar_default, s as SearchResultsPanel_default, t as VariantPicker_default, tt as stripMask, u as INPUT, v as QuantityStepper_default, w as Select_default, x as focusInvalid, y as MultiSelect_default, z as TAG_SHAPE } from "./VariantPicker-CrKQ7jpB.js";
3
+ import { $ as applyMask, A as defaultUnitFormat, B as tagPadding, C as filterNumericBeforeInput, D as createNumberFormat, E as UnitInput_default, F as parseLocaleNumber, G as FieldError_default, H as Checkbox_default, I as toMinorUnits, J as FORM_LAYOUT_KEY, K as Button_default, L as useHeadingTag, M as formatNumber, N as formatUnit, O as currencyFractionDigits, P as localeSeparators, Q as useSlotPresence, R as TAG_FILL, S as Switch_default, T as CurrencyInput_default, U as VisuallyHidden_default, V as CheckboxGroup_default, W as RequiredMark_default, X as Autocomplete_default, Y as FORM_SUBMITTING_KEY, Z as Input_default, _ as radioRecipe, a as ownsShortcut, b as FormLayout_default, c as RadioGroup_default, d as PLAIN_BOX_ONLY, et as defaultCharacterMeaning, f as PLAIN_COLUMNS, g as optionCursor, h as labelRecipe, i as claimShortcut, j as formatCurrency, k as currencySymbol, l as HINT, m as dotRecipe, n as Textarea_default, o as releaseShortcut, p as PLAIN_OPTION, q as Icon_default, r as SearchBar_default, s as SearchResultsPanel_default, t as VariantPicker_default, tt as stripMask, u as INPUT, v as QuantityStepper_default, w as Select_default, x as focusInvalid, y as MultiSelect_default, z as TAG_SHAPE } from "./VariantPicker-BLuaCwee.js";
4
4
  import { i as enUS, n as provideEldraUiMessages, r as useMessages, t as MESSAGES_KEY } from "./useMessages-BdN9F1cW.js";
5
5
  import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onServerPrefetch, onUnmounted, onUpdated, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useSlots, useTemplateRef, vModelText, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
6
6
  import { dateTimeFormat } from "@eldrajs/sdk/format/date";
@@ -1,4 +1,4 @@
1
- import { E as UnitInput_default, H as Checkbox_default, S as Switch_default, T as CurrencyInput_default, V as CheckboxGroup_default, X as Autocomplete_default, Z as Input_default, b as FormLayout_default, c as RadioGroup_default, n as Textarea_default, r as SearchBar_default, t as VariantPicker_default, v as QuantityStepper_default, w as Select_default, x as focusInvalid, y as MultiSelect_default } from "./VariantPicker-CrKQ7jpB.js";
1
+ import { E as UnitInput_default, H as Checkbox_default, S as Switch_default, T as CurrencyInput_default, V as CheckboxGroup_default, X as Autocomplete_default, Z as Input_default, b as FormLayout_default, c as RadioGroup_default, n as Textarea_default, r as SearchBar_default, t as VariantPicker_default, v as QuantityStepper_default, w as Select_default, x as focusInvalid, y as MultiSelect_default } from "./VariantPicker-BLuaCwee.js";
2
2
  import { r as useMessages } from "./useMessages-BdN9F1cW.js";
3
3
  import { a as useControlProps, c as FIELD_ANCHORS_KEY, i as FIELD_VALIDATION_PROPS, l as FIELD_MESSAGES_KEY, n as FIELD_ONLY, o as useFieldControl, r as FIELD_VALIDATION_DEFAULTS, s as API_ERRORS_KEY, t as FIELD_CHOICE_VALIDATION_DEFAULTS } from "./useFieldControl-B1JvPEeM.js";
4
4
  import { r as useEldraScope } from "./useEldraScope-BDbGzt7R.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eldrajs/ui",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "Accessible Vue 3 core components for Eldra storefronts: buttons, forms, selects, cards, overlays and navigation, themed through CSS design tokens.",
5
5
  "keywords": [
6
6
  "accessible",