This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
Releases: nrkno/core-components
Releases · nrkno/core-components
v10.0.0
What's Changed
- Released @nrk/[email protected]
- Core toggle data prefix for popup attribute by @skjalgepalg in #650
- Major release to address error logged in developer console in Chrome (v104) due to Open-UI pop-up API adoption (see #649)
Migration guide for @nrk/[email protected]
- Add
data-
prefix topopup
attribute
Plain JS:
<core-toggle class="my-dropdown" popup hidden>
-> <core-toggle class="my-dropdown" data-popup hidden>
React:
<CoreToggle className='my-dropdown' popup='Example picker' hidden>
-> <CoreToggle className='my-dropdown' data-popup='Example picker' hidden>
DevDependencies
- Bump deps by @skjalgepalg in #651
Full Changelog: v9.3.0...v10.0.0
v9.3.0
v9.2.2
What's Changed
- Fix typo in core-dialog tab-cycling
- Patch released @nrk/[email protected]
Full Changelog: v9.2.1...v9.2.2
v9.2.1
What's Changed
- core-dialog no longer focuses elements with
tabindex="-1"
when tab-cycling through all elements inside dialog by @skjalgepalg in #646
Full Changelog: v9.2.0...v9.2.1
v9.2.0
What's Changed
@nrk/[email protected]
Enhancements
- Notify screen readers when core-suggest displays suggestions
- Supplement with updates when suggestions are filtered
- Supplement with update when all suggestions are hidden by filter
- Add attributes to override default values for screen reader notifications
- Note that defaults are in Norwegian Bokmål
- Add optional support for reading textContent when no suggestions are present
- Useful for conveying load/error-state to screen readers
- Support custom updates to screen reader with
pushToLiveRegion
for complex implementations - Guarantee id on core-suggest element with uuid when not set
Fixes
- Set
aria-controls
along witharia-expanded
to conform with WAI-ARIA examples - Set role
combobox
on input consistently across all devices
Docs
- Add section, Notes on accessibility, to document screen reader compatibility
- Add instructions for aria-live region
- Add note on how to disable default filtering
- Consolidate examples for plain js and react under respective headers
- Update examples for legibility and to better showcase available features
- Fix bad URL for ajax- and lazy- examples
Tests
- Add tests for aria-live behavior
Full Changelog: v9.1.2...v9.2.0
v9.1.2
What's Changed
- Added section to docs for Core dialog on how to prevent background scrolling by @skjalgepalg in #643
- Updated various (dev)dependencies
Full Changelog: v9.1.1...v9.1.2
v9.1.1
Releases
- @nrk/[email protected] (patch)
What's Changed
- fix: Handle decimal values for scroll-directions when browser is zoomed
Full Changelog: v9.1.0...v9.1.1
v9.1.0
What's Changed
[email protected]
Enhancements
- Optional attribute
tab
to set active tab - Added support for fewer
panels
thantabs
- Added support for no
panels
, mainly for robustness
Fixes
- No longer dispatches a
tabs.toggle
-event on initialization - Panels referenced by multiple tabs (through
data-for
) has correctaria-labelledBy
to active (referencing) tab aria-labelledBy
is updated when tab is toggled.- Improvements to reliability of getter-functions
New Contributors
- @ingvilddev made their first contribution in #636
Full Changelog: v9.0.0...v9.1.0
[email protected]
[email protected]
Breaking
- The
timestamp
-attribute has been deprecated in favor of thedate
-attribute- Note: Limited support is kept help aid with migration; value is treated like
date
(see below) but logs to console.warn on initialisation to help identify where migration is necessary.timestamp
-attribute is removed from DOM to avoid confusion withdate
.
- Note: Limited support is kept help aid with migration; value is treated like
- New optional
date
-attribute takes any value supported by simple-date-parse- if
date
is set tonull
the attribute is treated the same as if removed throughremoveAttribute
.
- if
- When no
date
(or deprecatedtimestamp
) -attribute is present, core-datepicker has no value (see below)
Migration guide
- Replace uses of deprecated
timestamp
-attribute to usedate
- Consider if using the values supported through simple-date-parse can make it easier to convey intention or just reduce overhead (e.g. simply setting attribute value to
date="now + 1 day"
can save you a separate calculation of the value for relative tomorrow). - Use of deprecated
timestamp
-attribute will make a log toconsole.warn
to help identify where you need to migrate. Note that the attribute has been removed in the DOM to avoid confusion with thedate
attribute'
- Consider if using the values supported through simple-date-parse can make it easier to convey intention or just reduce overhead (e.g. simply setting attribute value to
- If no
date
(or deprecatedtimestamp
) is supplied, core-datepicker will no longer fallback tonew Date()
. Try it without any , as no value may be what you actually need, if not set attribute todate="now"
to mimic the old fallback.
Enhancement
- Support for core-datepicker to explicitly have no value
When date has no value:
- All getters return
null
- Selecting the current date will dispatch a
datepicker.change
event - If a table (calendar view) is drawn:
- The current month is drawn
autofocus
andtabindex
are set to the button with the current date in calendar- Keyboard navigation (up/down/left/right arrow) start from the current date.
Fixes
- Support for external input/select/table -elements using
data-for
(and deprecatedfor
) -attribute is back
Docs
- Organized examples using tabs
- Added example for functional React
- Examples now use
type="button"
in buttons - English language is used in examples
Full Changelog: v8.0.0...v9.0.0
[email protected]
[email protected]
Breaking
- Changed signature on backdrop-attribute
- Replaces boolean true/false or "custom-ID" with "on", "off" or "custom-ID"
Migration guide
- For plain JS, replace use of
backdrop="false"
withbackdrop="off"
- For React/JSX, replace
backdrop={true/false}
withbackdrop={'off'}
- core-dialog will print a
console.warn
when a custom ID is passed tobackdrop
and no matching element is found
Fixes
backdrop
now renders as an HTML-attribute on the underlying custom-element for more consistent behavior.
Docs
- Simplified examples by removing bloat
- Added matching examples for plain JS and React/JSX
- Examples now use
type="button"
in buttons
Full Changelog: v7.3.0...v8.0.0