Skip to content

v0.14.0

Choose a tag to compare

@daopk daopk released this 03 Oct 03:42
· 32 commits to main since this release

The composables, and that is the one to read: ropav exported every composable module whole, so a
component's state engine, its test resets and its internal constants were all public API by
accident. The surface is now 43 functions chosen to build with, down from 98 exports. Every type a
component's props name is still exported from ropav.

Breaking

A component's state engine is no longer exported

- import { useSelectState, type SelectedValue } from "ropav";
+ import { type SelectedValue } from "ropav";

These only ever made sense paired with the component's own parts, and are gone from the main entry:
useCalendarState, useCheckboxGroupState, useColorAreaState, useColorChannelFieldState,
useColorFieldState, useColorPickerState, useColorSliderState, useComboBoxState,
useDateFieldState, useDatePickerState, useDateRangePickerState, useDisclosureGroup,
useMenuTriggerState, useNumberFieldState, useRadioGroupState, useRangeCalendarState,
useSelectState, useSingleSelectListState, useSliderState, useSubmenuTriggerState,
useTabListState, useTimeFieldState, useToggleGroupState and useTooltipTriggerState.

A type a prop, a slot or a public context names stays exported, now from the component that names
it — SelectedValue, DateSegment, PageBehavior, RootMenuTriggerState and the rest — so
import type { … } from "ropav" and each family's subpath keep working. The options and state
types no prop names go with their engines: CalendarState, DateFieldState, MenuTriggerState,
UseSelectStateOptions and 43 others.

Helpers written for the library's own use are no longer exported

  • Validation: VALID_VALIDITY_STATE, CUSTOM_VALIDITY_STATE, MISSING_VALIDITY_STATE,
    DEFAULT_VALIDATION_RESULT, mergeValidation, getNativeValidation, missingValueMessage,
    isValueMissing, isEqualValidation. useFormValidationState and its types stay.
  • Contexts: useFormContext, provideFormContext, useLocaleContext, provideLocaleContext.
    Use Form, and useLocale / provideLocale / I18nProvider.
  • Interaction: getInteractionModality, setInteractionModality, retainInteractionModality,
    isFocusVisible, isVirtualClick, isVirtualPointerEvent, isElementInAnyFocusScope,
    LONG_PRESS_THRESHOLD_MS.
  • Other: useDefaultLocale, useLocalizedStringDictionary, usePageSize, useLabels,
    useCssVariable, clearCssVariableCache, resetTooltipWarmup, getRegisteredTooltipCount,
    defaultItemTextValue, parseColorValue.

Added

  • A Composables page in the guide, with every
    exported composable, its signature and an example.
  • Tabs takes :full-width="false", which sizes each tab to its label instead of an equal
    share of the row.

Fixed

  • A field stays level with a button under any field border. With --rp-field-border-width
    above 0, fields stood 2px taller than buttons of the same size; each now gives its border back out
    of its padding.
  • A DropdownMenu's size reaches its rows. It was accepted and dropped, so
    <DropdownMenu size="xs"> stood its rows at 36px.

Built and tested against vue 3.6.0-rc.10; the peer range still starts at rc.8.

npm i ropav@0.14.0

Full changelog: v0.13.0...v0.14.0