Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds new component TabPanels (#4241)
* Early prototype of TabPanels * Linting * selected property is optional * Stop if complaining about types for aria-selected * Fix initial select * Adds tests for TabPanels * Move npm dep to packages/react * version semver format change * Add styling to match as close as I can to PVC version * Fix Playground * Linting * Delete TabWrapper and move styling to tablist * Add more docs * Format * Changeset * Add to the docs nav * Adds e2e tests * More scaffolding stuff * Fix error with docs reference * Update @github/tab-container-element so we can use it with SSR * Use type imports for type imports * More type imports * Fix TabPanels tests * test(vrt): update snapshots * Update test snapshot * Use the new shadowdom version of tab-container-element * Adds styles to tab-container * Remove test which is no longer required * Add margin to panels to match react * Upgrade tab-container-element to v4.1.0 * Update TabPanels to use better styling * Update docs to include events * Linting * Fix type error * Fix tests * test(vrt): update snapshots * Ignore axe test that fails because of shadow dom * Fix roll-up error * Move to drafts (and consequently experimental) * aria-labelledby option (required) on tab panels and id on tabs * Linting * Hide panels before JS kicks in * Minimise content flash when JS is slow * Demonstrate limitation with 11+ tabs * Linting again * Add required props to tests etc * npm run format * test(vrt): update snapshots * test(vrt): update snapshots * Add suppressHydrationWarning to elements on TabPanels * Update snapshot for update semver test * Add required props to docs example * Cherry-pick the change from my other PR * Delete dialog snapshots * Fix format * Upgrade tab-container-element to 4.1.2 * Update tab-container-element to v4.1.3 * Removes the need for specifying ids on children and makes them autogenerate * Linting * Move to draft directory * Fix docs build * Fix TabPanels in docs page * Coplete move to drafts area * Change API to use selectedTab on the parent and store it in state * Use new createComponent function * Add new selectedTabIndex prop support * Add selectedTabIndex prop to docs * Linting * Update docs * Fix formatting * Fix e2e test after move to draft * Simplify styled call on TabContainerElement * Fix types for linting * test(vrt): update snapshots * Shouldn't need to skip aria test now * Remove unused commented code * Fix typing on custom-elements * Type change to fix linting * Change type to SxProp * Use latest tab-container-element * Use onChange(d) aliases in docs * Automatically generate the parent id if it's not defined * Add aria requirements to TabPanels * Linting etc * Use defaultTabIndex which doesn't set the focus * Linting * Use the role instead of the type * child.props.type didn't work * We don't want the consumer to override the id or aria-labelledby * Updgrade tab-container-element to v4.5.0 * Better types for label/labelledby * Linting * test(vrt): update snapshots * Workaround infinite type issue --------- Co-authored-by: owenniblock <owenniblock@users.noreply.github.com> Co-authored-by: Keith Cirkel <keithamus@users.noreply.github.com>
- Loading branch information