- Re-export
ATabPanel
andATab
classes from the package. Fixes #7. - Updated dev dependencies.
- Do not add
placement="top"
attribute to host element when connected to DOM if is not set by the user intentionally. This change is made to avoid unnecessary attribute mutations. Fixes #5. - Updated dev dependencies.
- Added
no-tab-cycling
attribute toa-tab-group
element, which disables tab cycling when the user reaches the first or last tab using the keyboard.
- Handled navigation with arrow keys appropriately according to directionality of the element, eg. when the orientation is
horizontal
and the directionality isrtl
, theLeft
arrow key should navigate to the next tab and theRight
arrow key should navigate to the previous tab. - Limited the execution rate of resize observer callback to the refresh rate of the browser to avoid
ResizeObserver loop completed with undelivered notifications.
warning in Safari.
- Refactored arrow keys navigation to use the "Left" and "Right" keys for horizontal navigation and the "Up" and "Down" keys for vertical navigation.
- Updated arrow keys navigation to use
KeyboardEvent.key
instead ofKeyboardEvent.code
for better support in different keyboard layouts. - Remove
nav--scrollable
CSS Part from navigation container and replace it withnav--has-scroll-controls
CSS Part, which is added when scroll controls are enabled and visible.
- Removed
a-tab-select
event froma-tab
element. Usea-tab-show
event instead. - Removed experimental view transitions on panels via
panel-transition
attribute. It was not working as expected and it will be re-evaluated in the future.
- Added default display values to host elements (
a-tab
,a-tab-panel
). - Added
contain: content
to host elements (a-tab-group
,a-tab
,a-tab-panel
) to prevent layout thrashing. - Provided better ergonomics by automatically setting the
slot
attribute toa-tab
anda-tab-panel
respectively, if not provided. - Added
nav--scrollable
CSS Part to navigation container when tabs are scrollable, to allow for more specific styling. - Added
a-tab-show
event toa-tab
element, which is fired when the tab is shown. - Added
a-tab-hide
event toa-tab
element, which is fired when the tab is hidden. - Added
selectTabById()
method toa-tab-group
element, which selects the tab with the given id. - Generate types declarations for the components.
- Update dev dependencies.
- Added missing
nav
CSS Part toa-tab-group
element. - Fixed navigation scrolling issues on iOS.
- Fixed navigation scroll buttons bug on iOS that caused the buttons to not be visible when the tabs were scrollable.
- Added experimental view transitions on panels via
panel-transition
attribute. - Updated dev dependencies.
- Added Shadow DOM to
a-tab
anda-tab-panel
to prevent global styles from affecting the default styles of the elements. - Removed hardcoded
font-size
froma-tab
anda-tab-panel
to allow inherit the font size from the parent element. - Used relative size units for scroll button icons and tab close button icons, to allow inherit the font size from the parent element.
- Initial release