Repository navigation
Release v2.5.0
v2.5.0
Changelog
Locale tabs partial and accessible tabs runtime, one gap for form rows with form spacing tokens. See UPGRADING.
Added
locale_tabspartial (partials/_locale_tabs.html.twig): one in-page panel per locale behind a WAI-ARIA tab
list — the shared building block for per-locale CRUD fields (FormKit 2.13 renders itslocale_tabsoption and
TranslatableMapTypethrough it).panels: [{locale, content, label?, name?, invalid?, required?, dir?, attr?}],
id,label,default_locale(★, listed first),required_locales(*),active_locale(default: the request
locale),activate_invalid, markers,legend,progressive,stimulus,attr,bundle. Without JavaScript every
panel is a visible stacked<fieldset><legend>;lang/dirper panel; errors as!plus screen-reader text in
the tab name; no inline script / style. Translationslocale_tabs.*in every shipped locale.- Theme slot
tab_panel(nowo-ui-tabs__panel); tokens--nowo-ui-locale-tabs-gap,
--nowo-ui-locale-tabs-default. - Twig functions
nowo_ui_locale_name(locale, display_locale = null)(ext-intl display name in the request
locale, else the upper-cased code) andnowo_ui_locale_dir(locale)(rtl/ltr);Twig\LocaleNames. nowo-ui-tabs.js/ Stimulustabspeer: WAI-ARIA keyboard support forrole="tab"triggers (roving
tabindex,ArrowLeft/ArrowRightmirrored in RTL,ArrowUp/ArrowDownfor vertical lists,Home/
End); aninvalidcontrol in a hidden panel opens it (and its parent panels) so browser validation can focus it;
the bubblingnowo-ui:tabs:changeevent (detail: {tabId, previousTabId, trigger, panel, reason}) for editors
that mount on a visible panel; progressive roots (data-nowo-ui-tabs-upgrade,data-nowo-ui-tabs-list,
data-nowo-ui-tabs-ready); trigger class swap (data-nowo-ui-tabs-tab-class/-tab-active-class); re-sync after
DOM morphs (Live Component re-render, Turbo morph, inserted content) that keeps the tab the user chose. The peer
gains thelisttarget and the same behaviour standalone, and delegates to the script when both are present.- Kitchen sink demo: a locale tabs form (server error on one locale, required locales, an RTL panel).
- Form spacing tokens:
--nowo-ui-form-actions-gap(last row → actions row),--nowo-ui-form-label-gap
(.form-label/.nowo-ui-form__label→ control),--nowo-ui-form-column-gap/--nowo-ui-form-column-minand the
newform_columnsslot (nowo-ui-form__columns: side-by-side fields on an auto-fit grid).
Changed
- Form rows use one gap:
form.nowo-ui-form(and forms in dialog bodies) is a flex column with
gap: var(--nowo-ui-form-row-gap)instead of amargin-topbetween sibling rows, so a gap the host puts on the
formslot replaces the kit spacing instead of adding to it (Beacon login: 32px between fields but 16px before the
button). Bare buttons / links directly in the form keep their width (align-self: flex-start); rows of the
Bootstrap form theme (mb-3) do not add to the gap; the last descendants' bottom margins that used to collapse
into the row margin are trimmed, so the scaffolds keep the 2.4 look at default tokens. Inside@layer nowo-uiand in
nowo-ui.unlayered.css. - The
form_actionsslot dropped itsmt-3(Bootstrap) /mt-4(Tailwind) default: the space above the actions row is
--nowo-ui-form-actions-gap(default1rem), also for an actions row rendered after</form>.
Fixed
nowo-ui-tabs.jsdrove every trigger / panel under a root, including those of a nested tab set: each root now only
drives its own (the nearest[data-nowo-ui-tabs]).