Releases: Merri/react-tabbordion
Releases · Merri/react-tabbordion
v2.0.0-beta.2
Added
- React Testing Library and JSDOM
- Lots of tests
useTabbordion
: booleanhydrate
option to allow App level control of hydrated state
Removed
- Enzyme
useTabbordion
:focusClick
option, use CSSfocus-visible
instead
Fixed
<TabPanel />
: no longer renderhasContent
into DOM
v2.0.0-beta.1
- Publish with beta tag in npm
v1.0.6
v2.0.0-beta.0b
This is an attempt to force GitHub Actions use the latest commit.
v2.0.0-beta.0
A beta for v2!
Rewrite to use modern React class syntax and Context API thus removing use of deprecated React APIs and legacy browser support. Compatible with v1, but your code may break if it has relied on undocumented edge cases or internal behavior.
Added
useTabbordion
hook as an alternate option for creating your own componentsTabbordion.resetSSR()
for server side render support when not using external unique ID generator<Tabbordion />
,<TabPanel />
,<TabLabel />
,<TabContent />
:forwardedRef
can be used to get reference to the actual DOM element<Tabbordion />
:onChange
now receives future panels (only a suggestion if in controlled state)updatePanelsByToggle()
is exposed
Changed
<Tabbordion />
:onChange
is no longer required for controlled state<Tabbordion />
:onChange
will now trigger in uncontrolled state<TabLabel />
:onClick
prop will now do the default behavior, useevent.preventDefault()
to prevent itbemClassName()
now ignores blockElements and modifiers that are not strings- Components no longer need to be direct children of their parent component
null
andundefined
are no longer considered equal in state equality checks- Use Microbundle for bundling (had custom Webpack setup)
- Use RITEway for tests (had react-test-renderer, Mocha, Sinon, Enzyme, Chai)
- Use Sucrase for faster tests/development (had Babel)
- Use
[fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal)
over custom implementation - Use ResizeObserver over unnecessarily backwards compatible legacy DOM tricks
Fixed
component
props use PropTypes.elementType as they should<TabPanel />
: prefer given prop fordisabled
andvisible
over state from context<TabLabel />
: has now ID and<TabPanel />
refers to it viaaria-labelledby
instead of the input element
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
- You can now make Tabbordion stateless, thus place the state where you want!
- Full state control: Tabbordion makes sure the state is correct for given mode.
- Viewport resize support: when using animateContent elements are now updated when window is resized.
- bemClassName is now exposed.
- Performance optimizations for minimal renders. All Tabbordion components now extend PureComponent.
- Expose
bemClassName
method - Remove support for extending BEM separator prefixed classes in
className
<Tabbordion />
- Allow controlling state via
panels
andonPanels
- Force state to be correct for the selected
mode
- Optimize performance by minimal renders
Removes
contentTag
andpanelTag
initialIndex
in favor ofinitialPanels
onAfterChange
in favor of new state providingonPanels
onBeforeChange
Renames
classModifiers
asbemModifiers
classNames
asblockModifiers
classSeparator
asbemSeparator
tag
ascomponent
- Modifiers
visibleBetween
,visibleFirst
andvisibleLast
renamed asbetween
,first
andlast
respectively
<Panel />
- Separated to three new components:
<TabPanel />
,<TabLabel />
and<TabContent />
title
is nowTabLabel
as a child ofTabPanel
- Other
children
needs to be wrapped aschildren
ofTabContent
TabPanel
no longer "inherits" nothing; the way props work has changed dramaticallyTabContent
detects viewport resizes and transitions quickly accordingly
Known issues
TabPanel
s must be direct children ofTabbordion
TabLabel
s andTabContent
s must be direct children ofTabPanel