Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(lib): export getNextElement, getPreviousElement and focusAsync #981

Merged
merged 5 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Changed class names of the slots inside the `ListItem` (`ItemLayout`'s classnames were replaced with `ListItem`'s) @mnajdova ([#886](https://github.com/stardust-ui/react/pull/886))

### Features
- Add `delay` prop for `Loader` component @layershifter([#969](https://github.com/stardust-ui/react/pull/969))
- Add `delay` prop for `Loader` component @layershifter ([#969](https://github.com/stardust-ui/react/pull/969))
- Add `getNextElement`, `getPreviousElement` and `focusAsync` to exported as `focusZoneUtilities` @layershifter ([#981](https://github.com/stardust-ui/react/pull/981))

### Fixes
- Remove space between `Button.Group` items without `circular` prop @Bugaa92 ([#973](https://github.com/stardust-ui/react/pull/973))
Expand Down
18 changes: 15 additions & 3 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,23 @@ export {
ContentComponentProps,
SizeValue,
} from './lib'
export { ShorthandRenderer } from './types'
export { ShorthandValue, ShorthandRenderer } from './types'

//
// FocusZone
//
import { getFirstTabbable, getLastTabbable } from './lib/accessibility/FocusZone/focusUtilities'
export const FocusZoneUtilities = { getFirstTabbable, getLastTabbable }
import {
getFirstTabbable,
getLastTabbable,
getNextElement,
getPreviousElement,
focusAsync,
} from './lib/accessibility/FocusZone/focusUtilities'
export const focusZoneUtilities = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one thing - shouldn't it be a breaking change, given this code on the client's side:

import { FocusZoneUtilities, ... } from '@stardust-ui/react'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see, great catch 👍

getFirstTabbable,
getLastTabbable,
getNextElement,
getPreviousElement,
focusAsync,
}
export { FocusZoneDirection, FocusZoneProps } from './lib/accessibility/FocusZone/FocusZone.types'