diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a5e6c02c..07175fb41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### BREAKING CHANGES - Fix `firstFocusableSelector` in `FocusTrapZone` and `AutoFocusZone` @sophieH29 ([#1732](https://github.com/stardust-ui/react/pull/1732)) +- Rename Popup `shouldTriggerBeTabbable` prop to `tabbableTrigger` @jurokapsiar ([#1696](https://github.com/stardust-ui/react/pull/1696)) - `StackableEventListener` is removed @layershifter ([#1755](https://github.com/stardust-ui/react/pull/1755)) - Rename `Tree` to `HierarchicalTree` @silviuavram ([#1752](https://github.com/stardust-ui/react/pull/1752)) @@ -36,6 +37,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Export `call-blocked` icon to Teams theme @francescopalmiotto ([#1736](https://github.com/stardust-ui/react/pull/1736)) - Add support for component styles debugging @kuzhelov ([#1726](https://github.com/stardust-ui/react/pull/1726)) - Use FocusZone in selectable list @jurokapsiar ([#1757](https://github.com/stardust-ui/react/pull/1757)) +- Add `MenuButton` component @jurokapsiar ([#1696](https://github.com/stardust-ui/react/pull/1696)) - Add `useEventListener` hook @layershifter ([#1755](https://github.com/stardust-ui/react/pull/1755)) ### Documentation diff --git a/docs/src/components/ComponentPlayground/ComponentPlayground.tsx b/docs/src/components/ComponentPlayground/ComponentPlayground.tsx index ef45dedfa..cbd66f669 100644 --- a/docs/src/components/ComponentPlayground/ComponentPlayground.tsx +++ b/docs/src/components/ComponentPlayground/ComponentPlayground.tsx @@ -23,6 +23,7 @@ const unsupportedComponents = [ 'ItemLayout', 'Layout', 'List', + 'MenuButton', 'Portal', 'Provider', 'RadioGroup', diff --git a/docs/src/components/DocsBehaviorRoot.tsx b/docs/src/components/DocsBehaviorRoot.tsx index ea1e3ecd4..a1b9c41f0 100644 --- a/docs/src/components/DocsBehaviorRoot.tsx +++ b/docs/src/components/DocsBehaviorRoot.tsx @@ -29,14 +29,15 @@ class DocsBehaviorRoot extends React.Component { } const { match } = this.props - const pageTitle = `${_.capitalize(match.params.name)} accessibility behaviors` + const componentName = _.upperFirst(_.camelCase(match.params.name)) + const pageTitle = `${componentName} accessibility behaviors` return (
{behaviorMenuItems - .find(behavior => behavior.displayName === _.capitalize(match.params.name)) + .find(behavior => behavior.displayName === componentName) .variations.map((variation, keyValue) => ( builder.click(`.${Button.className}`).snapshot('RTL: Shows menuButton')], +} + +export default config diff --git a/docs/src/examples/components/MenuButton/Rtl/MenuButtonExample.rtl.tsx b/docs/src/examples/components/MenuButton/Rtl/MenuButtonExample.rtl.tsx new file mode 100644 index 000000000..a072a116a --- /dev/null +++ b/docs/src/examples/components/MenuButton/Rtl/MenuButtonExample.rtl.tsx @@ -0,0 +1,11 @@ +import * as React from 'react' +import { Button, MenuButton } from '@stardust-ui/react' + +const MenuButtonExampleRtl = () => ( + } + menu={['English text!', 'غالباً ونرفض الشعور']} + /> +) + +export default MenuButtonExampleRtl diff --git a/docs/src/examples/components/MenuButton/Rtl/index.tsx b/docs/src/examples/components/MenuButton/Rtl/index.tsx new file mode 100644 index 000000000..4c792149b --- /dev/null +++ b/docs/src/examples/components/MenuButton/Rtl/index.tsx @@ -0,0 +1,12 @@ +import * as React from 'react' + +import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample' +import NonPublicSection from 'docs/src/components/ComponentDoc/NonPublicSection' + +const Rtl = () => ( + + + +) + +export default Rtl diff --git a/docs/src/examples/components/MenuButton/State/MenuButtonExampleOpen.shorthand.tsx b/docs/src/examples/components/MenuButton/State/MenuButtonExampleOpen.shorthand.tsx new file mode 100644 index 000000000..2b3370301 --- /dev/null +++ b/docs/src/examples/components/MenuButton/State/MenuButtonExampleOpen.shorthand.tsx @@ -0,0 +1,18 @@ +import { useBooleanKnob } from '@stardust-ui/docs-components' +import * as React from 'react' +import { Button, MenuButton } from '@stardust-ui/react' + +const MenuButtonOpenExample = () => { + const [open, setOpen] = useBooleanKnob({ name: 'open', initialValue: true }) + + return ( + setOpen(open)} + trigger={