Repository navigation
Releases
Releases · bacon-delight/react-ecosphere
v1.3.0
The stylesheet of vue-ecosphere 1.3.0.
No component API changed.
Added
- Dark theme. Set
data-theme="dark"on the root element, ordata-theme="auto"to follow the
system setting. Every colour and elevation token has a dark value (darkintokens.json). - Tokens
--border-hover,--scrollbar,--veil-surfaceand--scrim-blur.
Changed
- The scrims behind dialogs, drawers, the compose modal and confirmations blur the page behind
them, and the drawer's scrim covers the app shell's sidebar too.
Fixed
- Avatars used as buttons or links no longer show the browser's button border.
- Disabled phone, OTP and search fields read as disabled (grey ground, muted text).
- A dialog without a body leaves space under its subtitle.
v1.2.2
Pinned to vue-ecosphere 1.2.2.
Added
EcoDialog:alert(defaultfalse) rendersrole="alertdialog", for a dialog that interrupts to
ask for a decision.
Fixed
EcoTabs(and the notification tabs): a row of tabs wider than its container scrolls sideways
inside it instead of widening the page (stylesheet from vue-ecosphere 1.2.2).EcoDialog: the subtitle describes the dialog (aria-describedby), so it is read with the title.useConfirm()/EcoConfirmHost: a confirmation is analertdialogdescribed by itstext.EcoCheckboxandEcoSwitch: a label with no hint is wrapped in a<span>, so inline links in it
stay in one line of text instead of each becoming a row.
v1.2.1
Pinned to vue-ecosphere 1.2.1; the same bug fixes, with parity kept.
Added
EcoTreeView:renderMore(node)replaces the "show more" button of every branch that hasmore
(vue-ecosphere's#moreslot), e.g. with a link to the next page.
Fixed
- Charts: the width observer follows the figure, so a chart that starts empty sizes itself once data
arrives. Area, bar, diverging, line and step-line charts are one tab stop (roving tabindex): arrow
keys, Home and End move between periods. EcoLineChart: a line's<title>names the period of its own last point, and the hover dot no
longer doubles the end dot. Chart legends are keyed by position, so repeated names don't collide.EcoRowGroup: rows withoutsavedshowaria-pressed="false".EcoTreeView(selectable): Enter and Space on a Retry or Show-more button stay with the button.EcoTable: the server render no longer writes anindeterminateattribute on select-all.EcoFindings: a passedaria-labelledbynames the list instead of the default "Findings".EcoLeaderRow:onClickreaches the plain row too, not only the selectable button.EcoListRow: with a nodetitle, the star and actions buttons are named by the title element.EcoTimeline: the group variant has a wrapperdiv, soclassNameand other attributes land.EcoNotifications: closing returns focus to arenderTriggerbutton; the unread dot is
role="img"so its "Unread" name is read.EcoMenu: noaria-labelledbypointing at a trigger that isn't rendered.EcoSelectButton: without a label, the menu is named byaria-labelor by its trigger.EcoSearchField: the filter button's tooltip isfilterLabel.EcoTimePicker: sections are labelled groups, unchosen options reportaria-selected="false", and
the list has one tab stop.EcoDatePicker: a controlledopenthat starts or turns true sets the panel up on the chosen
month and focuses the day, like the field's own button.EcoFilterChips: Clear filters callsonFilterChangefor each filter it clears.EcoTabs: only the current tab carriesaria-controls.EcoAppShell: a drawer that mounts open moves focus into it and closes on Escape.
v1.2.0
Matches vue-ecosphere 1.2.0: the stylesheet is copied from it, and the components carry its
additions and fixes.
Added
EcoButton,EcoLink,EcoTabsitems andEcoProgressStepssteps taketo. Pass your router's
link component asas(react-router'sLink), as onEcoNavItem: the link renders through it.
Withoutas, a stringtobecomes thehref. A disabled or loading button still renders a
<button>. The router decides the current page: passaria-current="page"to a button, and the
current route's key asEcoTabs'value(routed tabs have no first-tab fallback).EcoProgressSteps(horizontal):reachablemarks an upcoming step people may skip ahead to; with
hrefortoit links too, keeping its number.EcoDialog:closable(defaulttrue).falsedrops the × and makes Escape and the scrim do
nothing, for a dialog that must be answered.EcoAppShell:contentTag("main"by default;"div"when the children render their own
<main>).EcoToast:live(defaulttrue);EcoToastersets it tofalse.
Fixed
EcoAppShell: the work area is a<main>landmark.EcoToaster: the always-present.toastslist is thearia-live="polite"region, so toasts are
read out reliably; the toasts inside it are no longerrole="status"regions of their own.- Dialogs stack above an open drawer, and
.pagecarries the right gutter (stylesheet). EcoMeteris arole="meter"with its value on the bar or ring, named by the ring'slabelor an
aria-label/aria-labelledbyyou pass.EcoNumberField: a typed figure outsidemin/maxis pulled back to the nearest bound on blur;
text that is not a number reportsnulland setsaria-invalid; a fractionalstepuses
inputMode="decimal", and aninputModeyou pass wins.EcoTextField,EcoEmailField,EcoNumberField,EcoTextareaandEcoSwitchmerge an
aria-describedbyyou pass after their own hint or error id.EcoSearchField: attributes other thanclassNameandstyle(id,role,aria-*, handlers)
go to the<input>, so it can be a combobox's input; anonKeyDownthat calls
preventDefault()keeps Enter and Escape for itself. Its props type now extends the input's
attributes.EcoPhoneFieldwithoutcodesshows the dial code as text (phonefield__cc--fixed) that
describes the number, instead of a button that opened nothing.EcoTimeline(trail): a stage status shows its badge dot unlessdotisfalse.
v1.1.0
First release: the Ecosphere Design System for React, matching vue-ecosphere 1.1.0.
- All 97 components, with vue-ecosphere's props and markup. Vue's
v-modelbecomes controlled
props (value/onChange,foo/onFooChange), emits becomeon…callbacks, and slots
becomechildren, ReactNode props andrender…props. useToast()with<EcoToaster />,useConfirm()with<EcoConfirmHost />, anduseEcoId().- The stylesheet (
react-ecosphere/styles.css), fonts andtokens.json, identical to
vue-ecosphere 1.1.0's. - React 18.2 and 19; server rendering;
"use client"for React Server Components. - Parity tests render every component in both packages and compare the markup.
Where the React API is not the mechanical translation of the Vue one:
EcoCheckboxandEcoSwitchtakechecked/defaultChecked/onChange(checked).EcoFieldtakeshtmlFor; its props type isEcoFieldComponentProps.EcoNavItemrenders a plain<a>; pass your router's link asasand setactivefrom the
router's match (there is noexact).- Where Vue has a prop and a slot of the same name (a dialog's
title, a toast'saction), React
has one ReactNode prop.EcoSearchField's#filterslot isfilterButton, and
EcoComposeModal's#toslot istoField. useToast()anduseConfirm()can be called anywhere, not only in components.