Package detail

@restart/ui

react-restart3.4mMIT1.9.4

Utilities for creating robust overlay components

react-overlays, react-component, react, overlay

readme

Restart UI

A set of full featured, extensible, and accessible UI components, designed to integrate into any styling framework or system. Restart components, are "headless", meaning they don't provide any styles. Components encapsulate the complicated logic and and state without being prescriptive about their look and feel.

Documentation

https://react-restart.github.io/ui/

Installation

npm install --save @restart/ui

Contributing

Checkout the repo and setup the project:

  1. Bootstrap your environment yarn bootstrap
  2. Start the development server yarn start

changelog

1.9.4 (2025-01-30)

Bug Fixes

1.9.3 (2025-01-19)

Bug Fixes

  • Overlay: fix target type for react 19 refs (#115) (c7aab07)

1.9.2 (2024-12-15)

Bug Fixes

  • bump hooks dependency for strict mode fixes (3b73c01)
  • replace deprecated JSX global types (#113) (62ea59f)

1.9.1 (2024-11-25)

Bug Fixes

  • bump hooks dependency for strict mode fixes (3b73c01)

1.9.0 (2024-11-20)

Bug Fixes

  • useClickOutside: reset waitingForTrigger if clicking outside target (#112) (730a174)

Features

1.8.0 (2024-08-01)

Bug Fixes

Features

  • add isTopModal on the modal ref handle (#105) (2f7acc8)

1.6.9 (2024-05-08)

Bug Fixes

  • DropdownMenu: remove defaultProps (#103) (42943d8)
  • useRTGTransitionProps: fix ref warning for react 18.3+ (#102) (ba3d534)

1.6.8 (2024-03-18)

Bug Fixes

  • useRTGTransitionProps: only add transition callbacks if user passed (#99) (c606485)

1.6.7 (2024-03-15)

Bug Fixes

1.6.6 (2023-06-02)

Bug Fixes

  • use correct document for activeElement (#87) (ceafd14)

1.6.5 (2023-05-22)

Bug Fixes

  • bump uncontrollable to latest again (d05cf52)

1.6.4 (2023-05-22)

Bug Fixes

  • point node to the common js build (#85) (6731f29)
  • useOutsideClick: fix a case where click outside fired twice in a row in an iframe (#86) (0677a13)

1.6.3 (2023-04-15)

Bug Fixes

  • downgrade uncontrollable to 7.2.1 (#79) (d77682a)

1.6.2 (2023-03-17)

Bug Fixes

1.6.1 (2023-02-10)

Bug Fixes

1.6.0 (2023-02-10)

Features

  • add exports field in package.json (#73) (f0baebd)

1.5.4 (2023-02-01)

Bug Fixes

  • imperative transition sometimes would get stuck never exiting (50994f3)
  • Modal: use layout effect for transitions if possible (e2166e8)

Reverts

  • Revert "Publish v1.5.3" (e9f0471)

1.5.3 (2023-01-25)

Bug Fixes

  • imperative transition sometimes would get stuck never exiting (50994f3)

Reverts

  • Revert "Publish v1.5.3" (e9f0471)

1.5.2 (2023-01-20)

Bug Fixes

  • Modal,Overlay: elements exit according to their transition (#72) (3d3f89a)

1.5.1 (2023-01-16)

Bug Fixes

1.5.0 (2023-01-16)

Features

1.4.1 (2022-11-06)

Bug Fixes

  • forward eventListeners options to popper config (#69) (bbeaadd)

1.4.0 (2022-09-05)

Bug Fixes

  • usePopper: adjust types to enable TypeScript 4.8 compatibility (#66) (c267a0a)

Features

  • Overlay: allow popper virtual elements as targets (#64) (de7ce33)

1.3.1 (2022-07-22)

Bug Fixes

  • Anchor: don't check role when applying button props (#62) (a18e665)

1.3.0 (2022-06-22)

Bug Fixes

  • NavItem: inactive tabs should have aria-selected=“false” (#59) (0db76bb)
  • Portal: remove proptypes (#56) (1db951a)
  • update dependencies (#60) (dea531a)
  • useTabPanel: move react-transition-group functions to metadata (#55) (60ea5c5)

Features

  • useClickOutside: ensure clicks are fully outside (#54) (2e89ca8)

1.2.0 (2022-03-25)

Bug Fixes

  • Portal: remove proptypes (#56) (1db951a)
  • useTabPanel: move react-transition-group functions to metadata (#55) (60ea5c5)

Features

  • useClickOutside: ensure clicks are fully outside (#54) (2e89ca8)

1.1.0 (2022-03-16)

Features

  • useClickOutside: ensure clicks are fully outside (#54) (2e89ca8)

1.0.2 (2022-03-04)

Bug Fixes

  • issue 5711 from React-Bootstrap (#53) (a81ec97)
  • NavItem: do not include aria-controls if the related element is not mounted (#40) (1aeaaf3)

1.0.1 (2022-01-31)

Bug Fixes

  • Button: add href="#" when no href provided for anchors (#46) (fc33f85)
  • TabPanel: export role from useTabPanel hook (#45) (32f21c7)

0.2.6 (2022-01-18)

Bug Fixes

  • remove window reference in render breaking SSR (43738cd), closes #39

0.2.5 (2021-12-09)

Bug Fixes

  • remove window reference in render breaking SSR (43738cd), closes #39

0.2.4 (2021-12-08)

Features

  • add support for iframe and differing owner documents (#38) (e4e7170)
  • types: Add proper dynamic function component type (#37) (1ad4213)

0.2.3 (2021-09-20)

Bug Fixes

0.2.2 (2021-08-11)

Bug Fixes

  • don't prevent default on button clicks (#33) (5100ed6)

0.2.1 (2021-08-09)

Features

  • ModalManager: export ModalManagerOptions type (#32) (a0defd1)

0.2.0 (2021-08-06)

Bug Fixes

  • NavItem: prevent active from appearing in DOM (c010a7e)
  • NavItem: render user-specified role (ac922a4)
  • refactor(DropdownItem)!: rename active to isActive in metadata (#30) (7dc472a), closes #30
  • feat(TabPanel)!: expose useTabPanel hook and simplify code (#29) (8e7cdbd), closes #29

BREAKING CHANGES

  • rename active to isActive in metadata
  • rename useTabContext to useTabPanel and return props and metadata

0.1.1 (2021-07-29)

Bug Fixes

0.1.0 (2021-07-23)

Bug Fixes

  • Dropdown: fix onToggle callback for Anchor (e0a993b)
  • feat!: make Overlay render prop consistent with Dropdown (#26) (b3b2eac), closes #26

Features

  • clean up dropdown props (5b4cf8a)

BREAKING CHANGES

  • Overlay now passes two arguments like DropdownMenu, props and metadata

0.0.6 (2021-07-21)

Features

  • export react-aria SSR utils (58eb7b9)

0.0.5 (2021-07-20)

Bug Fixes

  • Button: use stricter tagName type (1fafb35)
  • Dropdown: allow KeyboardEvent in toggle's originalEvent type (56cd1f4)

Features

0.0.4 (2021-07-14)

Bug Fixes

  • clean up and export some more types (1ff2841)
  • Anchor: fix onKeyDown when href is non-trivial (#7) (e4733b6)
  • Dropdown: avoid calling onToggle if menu hidden (#14) (84e4934)
  • types: fix various types (#6) (2bc0639)

Features

  • DropdownToggle: only add aria-haspopup, when approriate (84e5450)
  • clean up Button and simplify type, update docs/tests (#19) (b2f392b)
  • DropdownItem: add href to useDropdownItem (#15) (5062b4e)
  • Modal: split modal types for ease of export (#13) (9ea30fa)
  • useWayypoint: handle zero dimension or invisible root (#18) (f1e43b8)
  • add Waypoint and useWaypoint components (#10) (831a86f)
  • ModalManager: support left padding adjustment for RTL (#12) (c7464be)

0.0.3 (2021-05-12)

Bug Fixes

  • move dev dep to right place (5245a1d)

0.0.2 (2021-04-23)

Features

  • process new popper modifiers (b0747d8)

0.0.1 (2021-04-22)

Features

  • various dropdown improvements (b00f23d)

5.0.0 (2021-03-01)

  • feat!: Make DropdownAPI consistent and fix keyboard handling (#843) (3ed2d85), closes #843

BREAKING CHANGES

  • Dropdown does not inject props or accept a children render function (it just works)

4.1.1 (2020-10-29)

Bug Fixes

  • Popper: Prevent duplicate ids in aria-describedby (#883) (48bb128)
  • root-close firing immediately in react 17 (#880) (fa8c878)

4.1.0 (2020-07-20)

Bug Fixes

  • deps: bump lodash from 4.17.15 to 4.17.19 (#840) (e718175)

Features

  • add aria-describedby modifier for tooltips (#842) (941a5dc)

4.0.0 (2020-07-10)

Features

BREAKING CHANGES

  • popperConfig longer accept object forms of modifiers, pass an array instead
  • overlay and dropdown menu injected values are different
  • overlay no longer triggers an update when placement change due to auto or flip placements

  • address feedback

3.2.0 (2020-05-14)

Bug Fixes

Features

  • Modal: Prevent onHide when keyboard event defaultPrevented is true (#816) (b4ffcec)

3.1.3 (2020-04-22)

Bug Fixes

3.1.2 (2020-04-20)

Bug Fixes

  • esm imports in cjs build (933b159)

3.1.1 (2020-04-20)

Bug Fixes

3.1.0 (2020-04-20)

Bug Fixes

Features

3.0.1 (2020-03-16)

Bug Fixes

3.0.0 (2020-02-19)

Features

BREAKING CHANGES

  • popper upgrade to v2, slightly different modifiers format now

2.1.1 (2020-02-03)

Bug Fixes

  • Compute scrollbar size dynamically on need (#297) (e022e9c)

2.1.0 (2019-10-11)

Bug Fixes

  • github: correct name of bug report template (30ab079)

Features

  • github: add issue templates (4fc4e52)

2.0.0 (2019-10-03)

No changes from 2.0.0-1

2.0.0-1 (2019-09-18)

Bug Fixes

  • mismatch between Modal.dialog and hideSiblings parameters (#389) (202c96b)
  • ci: add git attributes that prevents formatter from failing (b343193)
  • ci: add safeguard for running CodeCov on non-linux container (b29b594)
  • ci: container action can only be run on linux containers fix (c0be34e)
  • ci: merge upload test coverage step into main testing job (0671fa8)
  • ci: missing import due to not installing parent package (93059c8)
  • ci: potential fix for linting issue on windows ci build (a54f2b6)
  • ci: remove macOS CI build (b2f7225)
  • ci: run upload test results as a separate job (d601e7e)
  • docs: compilation issues when building production files (#412) (3867655)
  • readme: correct badge link (85ad01e)
  • readme: incorrect naming for github actions badge (e4b47b8)

Features

  • ci: only trigger test build on pushes and prs to master (723f91e)

2.0.0-0 (2019-08-17)

Bug Fixes

Features

BREAKING CHANGES

  • removes RootCloseWrapper for useRootClose

1.2.0 (2019-03-07)

Features

  • allow configurable menu focus behavior (#286) (76a63d4)

1.1.2 (2019-02-13)

Bug Fixes

1.1.1 (2019-01-04)

Bug Fixes

1.1.0 (2019-01-03)

Bug Fixes

Features

  • add RootCloseWrapper's disabled support to Overlay (#273) (2e316d1)

v0.8.3

2017-10-24

  • Bugfix: Support React v16 portal API (#208)
  • Bugfix: Only call onRendered in <LegacyPortal> on initial render (#218)
  • Bugfix: Use more robust method of getting <Modal> dialog element (#220)
  • Bugfix: Remove broken getOverlayDOMNode from <Portal> (#222)

v0.8.2

2017-10-06

  • Bugfix: Fix detecting escape keyboard event on IE (#211)

v0.8.1

2017-09-13

  • Bugfix: Use keydown instead of incorrect keyup for <Modal> close keyboard event (#195)

v0.8.0

2017-07-03

  • Feature: Remove <Transition> and depend on react-transition-group@2.0.0 (#184)

v0.7.0

2017-04-22

  • Chore: Update dependencies to avoid React deprecation warnings
  • Chore: Use function refs (#159)

v0.6.12

2017-03-06

  • Feature: Add mountOnEnter to <Transition> (#144)
  • Feature: Add restoreFocus to <Modal> (#145)

v0.6.11

2017-02-13

  • Feature: Allow accessibility attributes on <Modal> root element (#114)
  • Feature: Expose triggering event in onRootClose callback (#142)

v0.6.10

2016-10-03

  • Bugfix: Don't fire onRootClose in capture phase to avoid race conditions with React events (#118)

v0.6.9

2016-10-01

  • Bugfix: Don't spuriously trigger onRootClose when React event handler unmounts event target (#117)

v0.6.8

2016-09-30

  • Feature: Remove wrapping DOM element in <RootCloseWrapper> (#116)
  • Bugfix: Do not bind listeners for <RootCloseWrapper> when disabled is set (#116)

v0.6.7

2016-09-29

  • Feature: Allow opt-out of <Modal> container styling (#113)
  • Feature: Add renderBackdrop to <Modal> (#113)

v0.6.6

2016-08-01

  • Bugfix: Don't trigger PropTypes warning (#105)

v0.6.5

2016-07-13

  • Bugfix: Make target on <Portal> work like container (#102)

v0.6.4

2016-07-11

  • Feature: Add disabled prop to <RootCloseWrapper> (#93)
  • Feature: Add event prop to <RootCloseWrapper> to control mouse event that triggers root close behavior (#95)
  • Bugfix: Fix restoring focus on closing <Modal> (#82)
  • Bugfix: Do not pass unknown props to children (#99)
  • Chore: Upgrade to Babel 6 (#100)

v0.6.3

2016-04-07

  • Minor: Update React peer dependency (#76)

v0.6.2

2016-04-03

  • Bugfix: Fix unmounting <Portal> when parent is unmounted (#74)

v0.6.1

2016-03-28

  • Bugfix: Flush new props to DOM before initiating transitions (#60)
  • Bugfix: Update <Portal> container node when container prop changes (#66)
  • Bugfix: Don't invoke close in <RootCloseWrapper> on right clicks (#69)

v0.6.0 - Fri, 15 Jan 2016 16:15:50 GMT

  • c0b5890 [fixed] Don't forward own props from <Position>
  • 742c3c1 [fixed] Modal does not fire show callback

v0.5.4 - Tue, 17 Nov 2015 20:03:06 GMT

  • 4eabbfc [added] affix state callbacks

v0.5.3 - Mon, 16 Nov 2015 19:52:03 GMT

  • d064667 [fixed] AutoAffix nnot passing width or updating

v0.5.2 - Mon, 16 Nov 2015 17:32:27 GMT

  • 823d0f8 [fixed] fix missing warning dep
  • 1857449 [changed] Friendlier default for AutoAffix
  • f633476 [fixed] clean up modal styles if unmounted during exit transition

v0.5.1 - Mon, 02 Nov 2015 16:07:44 GMT

  • e965152 [added] Affix and AutoAffix

v0.5.0 - Wed, 07 Oct 2015 19:40:23 GMT

  • 044100b [added] React 0.14 support
  • edd316a [added] aria-hidden, by default, to modal container siblings.

v0.4.4 - Mon, 24 Aug 2015 18:34:19 GMT

v0.4.3 - Sun, 23 Aug 2015 22:54:52 GMT

  • 4f7823e [changed] focus target of the modal to its content

v0.4.2 - Mon, 10 Aug 2015 19:04:31 GMT

v0.4.1 - Tue, 04 Aug 2015 23:48:08 GMT