Skip to content

Releases: code-sherpas/pharos-react

@code-sherpas/pharos-react@0.19.0

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 15 Jul 21:35
Immutable release. Only release title and notes can be modified.

Minor Changes

  • 9781926: Add RadioGroup + RadioGroupItem, a set of mutually exclusive options (the
    shadcn RadioGroup contract) over Base UI's RadioGroup + Radio
    role="radiogroup" / role="radio", arrow-key navigation, single selection,
    and the shared Button / Input / Checkbox / Switch focus ring. Completes the
    boolean/choice form-control family (Checkbox → Switch → Radio). Compound
    (group + item) because the selection semantics live on the group. Label-less by
    design (D11): pair the group with a <label> / aria-labelledby and each item
    with a <label htmlFor>; error via aria-invalid on the group. The selected
    dot is a CSS <span> — no icon dependency.

@code-sherpas/pharos-react@0.18.0

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 15 Jul 16:07
Immutable release. Only release title and notes can be modified.

Minor Changes

  • 414d5a0: Add Switch, a single on/off toggle (the shadcn Switch contract) over Base
    UI's Switchrole="switch", Space to toggle, and the shared Button / Input
    / Checkbox focus ring. Sibling to Checkbox in the boolean form-control
    family: same checked / onCheckedChange / disabled API, no third
    indeterminate state (a toggle is binary). Label-less by design (D11): pair
    with a <label htmlFor>; error via aria-invalid. Geometry is fully
    token-derived (40×24 track, 16px thumb, spacing-4 travel); no icon dependency.

@code-sherpas/pharos-react@0.17.0

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 11 Jul 05:55
Immutable release. Only release title and notes can be modified.

Minor Changes

  • c443585: Add Checkbox — a single square selection control (the shadcn Checkbox contract over Base UI's Checkbox: role="checkbox" with aria-checked="mixed" for the indeterminate state, a hidden form input, Space to toggle, and the shared Button/Input focus ring).

    First of the form-control family (Checkbox → Switch → Radio). Label-less by design (Escuela 1) — pair with a <label htmlFor>; error via aria-invalid. Indeterminate is a boolean indeterminate prop (Base UI's shape, not shadcn's checked="indeterminate" union). Check/dash marks are inline SVG — no icon dependency added to the bundle.

@code-sherpas/pharos-react@0.16.0

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 10 Jul 22:39
Immutable release. Only release title and notes can be modified.

Minor Changes

  • 330128c: Add Dialog — a centered modal panel (the shadcn Dialog contract over Base UI's Dialog: focus trap, scroll lock, backdrop, Escape / backdrop-click dismiss, focus return to the trigger).

    Compound parts: Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose. Sibling of Sheet (same Base UI primitive) — Dialog is the centered modal, Sheet the edge-docked panel. DialogContent collapses Base UI's Portal + Backdrop + Popup and shares the --pharos-z-index-popover overlay layer so a Select / Popover opened from inside the dialog still stacks above it.

@code-sherpas/pharos-react@0.15.0

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 10 Jul 00:02
Immutable release. Only release title and notes can be modified.

Minor Changes

  • ae08347: Add Sheet — a modal panel that docks to a viewport edge and slides in (the shadcn Sheet contract over Base UI's Dialog: focus trap, scroll lock, backdrop, Escape / backdrop-click dismiss, focus return to the trigger).

    Compound parts: Sheet, SheetTrigger, SheetContent (with a side axis: top | right | bottom | left, default right), SheetHeader, SheetTitle, SheetDescription, SheetFooter, SheetClose, plus the sheetVariants helper. SheetContent collapses Base UI's Portal + Backdrop + Popup and shares the --pharos-z-index-popover overlay layer so a Select / Popover opened from inside the sheet still stacks above it. Distinct from Popover (non-modal, anchored) and DropdownMenu (menu-button).

v0.14.3

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 18 Jun 02:47
Immutable release. Only release title and notes can be modified.

Patch Changes

  • d67e70c: fix(Combobox): anchor the multi-select popup to the chips control box, not the input

    In a Combobox multiple, Base UI resolves the popup anchor as
    inputGroupElement ?? inputElement. Single-select wraps Base UI's InputGroup
    (ComboboxControl), so the popup anchored to the full-width control. But
    multi-select uses Combobox.Chips (ComboboxChips) as the bordered box, and
    Chips registers no inputGroupElement — so the anchor fell back to the
    Input, which floats at the end of the chip row. Once several chips pushed the
    input toward the right edge, the popup opened narrow and shifted right
    (anchored at the typing caret) instead of keeping the control width.

    ComboboxChips now publishes its DOM node through an internal context that
    ComboboxContent reads and passes as the Positioner's anchor, so the popup
    keeps a constant width = the control (width: var(--anchor-width)),
    left-aligned, regardless of where the input sits. Single-select is unchanged:
    no chips box means no anchor override, so Base UI keeps anchoring to the
    ComboboxControl as before.

    No public TypeScript API change. Surfaced in Alexandria's AddUsers /
    AddSkills multi-select pickers.

v0.14.2

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 18 Jun 00:26
Immutable release. Only release title and notes can be modified.

Patch Changes

  • d70eb1a: fix(overlays): give the anchored popups a configurable z-index so they clear host-app overlays

    Combobox, Select, DropdownMenu and Popover portal their popup to the end
    of <body>, which floats it above in-flow content — but not above a
    host-app overlay that carries its own z-index (a drawer, a modal). Worse, a
    z-index set on the popup surface (*Content) is inert: Base UI's Positioner
    anchors with transform, which creates a stacking context that traps any
    z-index on its descendants. So a consumer could not lift the popup from the
    outside at all.

    The z-index now lives on the Positioner (where it is not trapped), sourced
    from var(--pharos-z-index-popover, 1000). Apps with no high z-index scale get
    a sensible default; an app whose own overlays sit higher (e.g. a drawer at
    z-index: 10000) raises every Pharos popup at once by overriding
    --pharos-z-index-popover in :root — no per-call-site className. This closes
    the long-standing "shared --pharos-z-index-* scale" follow-up the four
    overlay modules carried.

    No public TypeScript API change. Surfaced while adopting the Combobox-multiple
    pickers in Alexandria, whose AddSkills picker lives inside a z-index: 9999
    drawer and had its listbox rendering behind the drawer.

v0.14.1

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 17 Jun 02:57
Immutable release. Only release title and notes can be modified.

Patch Changes

  • a9605d8: fix(Select): anchor the listbox below the trigger instead of overlapping it

    SelectContent now forces Base UI's alignItemWithTrigger to false. Base UI's
    Select.Positioner defaults it to true — the native-<select> / macOS
    behaviour that floats the popup over the trigger and, as a side effect,
    silently ignores the side / align / sideOffset props (it forces
    renderedSide = 'none'). The listbox therefore covered the trigger box, and the
    documented "opens below the trigger, 8px away" defaults never applied.

    With alignItemWithTrigger={false} the listbox opens below the trigger with
    the 8px sideOffset, matching the dominant web convention (shadcn
    position="popper", Ant, Mantine) and — decisively — making Select consistent
    with Combobox, whose Base UI primitive has no item-alignment mode and always
    anchors adjacent. No public API change. D17 refinement; see NAMING-decisions § Select + Combobox.

    Also fixes a pre-existing critical a11y issue surfaced by the same change:
    SelectSeparator re-exported Base UI's generic Separator (role="separator"),
    which is not a permitted child of the listbox role and failed axe's
    aria-required-children on a grouped Select. It now renders decoratively
    (aria-hidden, role="none") — the grouping semantics already live on
    SelectGroup / SelectLabel, matching Radix / shadcn.

v0.14.0

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 13 Jun 07:19
Immutable release. Only release title and notes can be modified.

Minor Changes

  • 6345498: Add the Select and Combobox atoms — the selection family (Decision D17).

    Two atoms split by interaction contract, matching the shadcn / Base UI / ARIA
    APG consensus:

    • Select — pick from a known set of options (the ARIA listbox pattern,
      no text input). Wraps Base UI's Select.*. Parts: Select, SelectTrigger,
      SelectValue, SelectContent, SelectItem, SelectGroup, SelectLabel,
      SelectSeparator.
    • Combobox — a text input that filters a known set (the APG combobox
      pattern). Wraps Base UI's Combobox.*. Parts: Combobox, ComboboxControl,
      ComboboxChips, ComboboxInput, ComboboxTrigger, ComboboxClear,
      ComboboxChip, ComboboxChipRemove, ComboboxContent, ComboboxList,
      ComboboxItem, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel,
      ComboboxSeparator.

    Multi-select is the multiple axis on each root (not a separate atom);
    single-select closes on pick, multi-select keeps the popup open. Both popups
    take min-width: var(--anchor-width) so they are never narrower than their
    control. The trigger/control share the Input chrome (WCAG 1.4.11 border tone,
    brand focus ring, sm/md/lg size grid). Following Escuela 1 (D11) neither
    atom owns label/helper/error — compose those and convey error via
    aria-invalid.

v0.13.0

Choose a tag to compare

@code-sherpas-releases code-sherpas-releases released this 13 Jun 03:17
Immutable release. Only release title and notes can be modified.

Minor Changes

  • 0cb3869: Add the Popover compound atom (Decision D16).

    Free-form content anchored to a trigger, wrapping Base UI's Popover.*
    parts, which implement the ARIA dialog pattern as a non-modal
    disclosure: role="dialog" on the popup, focus moves into it on open and
    returns to the trigger on close, Escape and outside-click dismiss it, and
    focus is NOT trapped (the rest of the page stays interactive).

    Naming follows shadcn rather than Base UI's Popover parts. The surface
    collapses Base UI's Portal + Positioner + Popup into a single
    PopoverContent exposing side / align / sideOffset / alignOffset
    (align defaults to center, unlike DropdownMenu's start). Parts shipped
    in v1: Popover, PopoverTrigger, PopoverContent, PopoverTitle,
    PopoverDescription, PopoverClose.

    Deliberately distinct from the DropdownMenu atom (D15): a DropdownMenu is
    for commands (menu-button contract — role="menu"/menuitem, roving
    focus); a Popover holds arbitrary content (forms, navigation, panels) under
    the disclosure/dialog contract. The two wrap different Base UI primitives
    (Menu vs Popover) and share no machinery — 7 of 8 surveyed top-tier
    design systems separate them. PopoverArrow, a non-trigger PopoverAnchor
    (the future Combobox will want it) and a modal Backdrop are deferred — no
    consumer exercises them yet and the compound API makes them additive without
    a breaking change.