Releases: code-sherpas/pharos-react
Release list
@code-sherpas/pharos-react@0.19.0
Minor Changes
- 9781926: Add
RadioGroup+RadioGroupItem, a set of mutually exclusive options (the
shadcn RadioGroup contract) over Base UI'sRadioGroup+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-labelledbyand each item
with a<label htmlFor>; error viaaria-invalidon the group. The selected
dot is a CSS<span>— no icon dependency.
@code-sherpas/pharos-react@0.18.0
Minor Changes
- 414d5a0: Add
Switch, a single on/off toggle (the shadcn Switch contract) over Base
UI'sSwitch—role="switch", Space to toggle, and the shared Button / Input
/ Checkbox focus ring. Sibling toCheckboxin the boolean form-control
family: samechecked/onCheckedChange/disabledAPI, no third
indeterminatestate (a toggle is binary). Label-less by design (D11): pair
with a<label htmlFor>; error viaaria-invalid. Geometry is fully
token-derived (40×24 track, 16px thumb, spacing-4 travel); no icon dependency.
@code-sherpas/pharos-react@0.17.0
Minor Changes
-
c443585: Add
Checkbox— a single square selection control (the shadcn Checkbox contract over Base UI'sCheckbox:role="checkbox"witharia-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 viaaria-invalid. Indeterminate is a booleanindeterminateprop (Base UI's shape, not shadcn'schecked="indeterminate"union). Check/dash marks are inline SVG — no icon dependency added to the bundle.
@code-sherpas/pharos-react@0.16.0
Minor Changes
-
330128c: Add
Dialog— a centered modal panel (the shadcn Dialog contract over Base UI'sDialog: 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 ofSheet(same Base UI primitive) — Dialog is the centered modal, Sheet the edge-docked panel.DialogContentcollapses Base UI'sPortal+Backdrop+Popupand shares the--pharos-z-index-popoveroverlay layer so aSelect/Popoveropened from inside the dialog still stacks above it.
@code-sherpas/pharos-react@0.15.0
Minor Changes
-
ae08347: Add
Sheet— a modal panel that docks to a viewport edge and slides in (the shadcn Sheet contract over Base UI'sDialog: focus trap, scroll lock, backdrop, Escape / backdrop-click dismiss, focus return to the trigger).Compound parts:
Sheet,SheetTrigger,SheetContent(with asideaxis:top | right | bottom | left, defaultright),SheetHeader,SheetTitle,SheetDescription,SheetFooter,SheetClose, plus thesheetVariantshelper.SheetContentcollapses Base UI'sPortal+Backdrop+Popupand shares the--pharos-z-index-popoveroverlay layer so aSelect/Popoveropened from inside the sheet still stacks above it. Distinct fromPopover(non-modal, anchored) andDropdownMenu(menu-button).
v0.14.3
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'sInputGroup
(ComboboxControl), so the popup anchored to the full-width control. But
multi-select usesCombobox.Chips(ComboboxChips) as the bordered box, and
Chipsregisters noinputGroupElement— 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.ComboboxChipsnow publishes its DOM node through an internal context that
ComboboxContentreads and passes as thePositioner'sanchor, 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
ComboboxControlas before.No public TypeScript API change. Surfaced in Alexandria's
AddUsers/
AddSkillsmulti-select pickers.
v0.14.2
Patch Changes
-
d70eb1a: fix(overlays): give the anchored popups a configurable z-index so they clear host-app overlays
Combobox,Select,DropdownMenuandPopoverportal their popup to the end
of<body>, which floats it above in-flow content — but not above a
host-app overlay that carries its ownz-index(a drawer, a modal). Worse, a
z-indexset on the popup surface (*Content) is inert: Base UI'sPositioner
anchors withtransform, which creates a stacking context that traps any
z-indexon its descendants. So a consumer could not lift the popup from the
outside at all.The
z-indexnow lives on the Positioner (where it is not trapped), sourced
fromvar(--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-popoverin: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, whoseAddSkillspicker lives inside az-index: 9999
drawer and had its listbox rendering behind the drawer.
v0.14.1
Patch Changes
-
a9605d8: fix(Select): anchor the listbox below the trigger instead of overlapping it
SelectContentnow forces Base UI'salignItemWithTriggertofalse. Base UI's
Select.Positionerdefaults it totrue— the native-<select>/ macOS
behaviour that floats the popup over the trigger and, as a side effect,
silently ignores theside/align/sideOffsetprops (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 8pxsideOffset, matching the dominant web convention (shadcn
position="popper", Ant, Mantine) and — decisively — makingSelectconsistent
withCombobox, 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:
SelectSeparatorre-exported Base UI's genericSeparator(role="separator"),
which is not a permitted child of thelistboxrole and failed axe's
aria-required-childrenon 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
Minor Changes
-
6345498: Add the
SelectandComboboxatoms — 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'sSelect.*. 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'sCombobox.*. Parts:Combobox,ComboboxControl,
ComboboxChips,ComboboxInput,ComboboxTrigger,ComboboxClear,
ComboboxChip,ComboboxChipRemove,ComboboxContent,ComboboxList,
ComboboxItem,ComboboxEmpty,ComboboxGroup,ComboboxGroupLabel,
ComboboxSeparator.
Multi-select is the
multipleaxis on each root (not a separate atom);
single-select closes on pick, multi-select keeps the popup open. Both popups
takemin-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/lgsize grid). Following Escuela 1 (D11) neither
atom owns label/helper/error — compose those and convey error via
aria-invalid.
v0.13.0
Minor Changes
-
0cb3869: Add the
Popovercompound 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
Popoverparts. The surface
collapses Base UI'sPortal+Positioner+Popupinto a single
PopoverContentexposingside/align/sideOffset/alignOffset
(aligndefaults tocenter, unlike DropdownMenu'sstart). Parts shipped
in v1:Popover,PopoverTrigger,PopoverContent,PopoverTitle,
PopoverDescription,PopoverClose.Deliberately distinct from the
DropdownMenuatom (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
(MenuvsPopover) and share no machinery — 7 of 8 surveyed top-tier
design systems separate them.PopoverArrow, a non-triggerPopoverAnchor
(the future Combobox will want it) and a modalBackdropare deferred — no
consumer exercises them yet and the compound API makes them additive without
a breaking change.