Skip to content

Latest commit

 

History

History
1007 lines (717 loc) · 25.5 KB

CHANGELOG.md

File metadata and controls

1007 lines (717 loc) · 25.5 KB

@leafygreen-ui/tabs

14.0.2

Patch Changes

14.0.1

Patch Changes

14.0.0

Major Changes

  • 274d7e1a7: Removes prop-types from LeafyGreen UI

Patch Changes

13.1.1

Patch Changes

  • bca3969cf: Removes incorrect setSelectedd prop. setSelected is the correct prop.

13.1.0

Minor Changes

  • 30f111498: LG-4473 Updates the selected and setSelected props to accept both strings and numbers. The string must match the text content from the name prop on the Tab component.

      const [selectedTab, setSelectedTab] = useState<string | number>('Tab 4');
    
      return (
        <div>
          <Button onClick={() => setSelectedTab('Tab 2')}>
            Set second tab as active
          </Button>
          <Tabs
            selected={selectedTab}
            setSelected={setSelectedTab}
          >
            <Tab name="Tab 1">
              Content 1
            </Tab>
            <Tab name="Tab 2">
              Content 2
            </Tab>
            <Tab name="Tab 3">
              Content 3
            </Tab>
            <Tab name="Tab 4">
              Content 4
            </Tab>
          <Tabs>
        </div>
      );

Patch Changes

13.0.1

Patch Changes

  • e7bc12814: Adds more thorough test coverage for disabled inputs
  • Updated dependencies [c1b8b633b]
  • Updated dependencies [fe2483937]

13.0.0

Major Changes

  • d5cd7f552: LG-4253: Adds small size variant to tabs

    Additional styling updates:

    • [breaking] inlineChildren vertical alignment is centered and no longer requires a container element. Instead, pass in a fragment wrapping the children elements and use inlineChildrenContainerClassName to customize styling
    • Exports inlineChildrenContainerClassName for customizing div that contains inlineChildren
    • Extends bottom divider between inline children and visible tab panel

Patch Changes

12.0.3

Patch Changes

  • 4c04aa0ee: Updates Tabs to use latest Descendants API
  • Updated dependencies [4c04aa0ee]
  • Updated dependencies [66e5665e8]
  • Updated dependencies [4c04aa0ee]
  • Updated dependencies [4c04aa0ee]

12.0.2

Patch Changes

12.0.1

Patch Changes

12.0.0

Major Changes

  • a29ec7d4: LG-4087

    • Removes @leafygreen-ui/portal dependency
      • In previous versions, tabs and their corresponding panels do not render on the server and instead portal content in the respective containers after hydration
      • Moving forward, tabs and their corresponding panels render normally on the server and render content in the respective containers during initial render cycle
    • Adds @leafygreen-ui/descendants dependency
      • Handles relationships between Tabs component and TabTitle descendants
      • Handles relationships between Tabs component and TabPanel descendants
    • Replaces @leafygreen-ui/box with `@leafygreen-ui/polymorphic
      • Allows tab elements to render as any element or component
      • Note: it is recommended to continue to use a button or link for accessibility purposes
    • Adds forceRenderAllTabPanels to Tabs component. By default, tab panels conditionally render in the DOM. Setting this prop to true will:
      • Render all non-disabled tab panels in the DOM
      • Hide the non-selected tab panels with CSS using display: none;. This will also remove the non-selected tab panels from the accessibility tree
    • Adds fixed height to tabs
    • Exports class names to customize styling on containers
      • tabListElementClassName can be used to select tab list container
      • tabPanelsElementClassName can be used to select tab panels container
    • Adds getAllTabPanelsInDOM test util
    • Updates getSelectedPanel test util. It now checks CSS display property to get the selected panel

Patch Changes

11.2.0

Minor Changes

  • 4cfd6dd5: LG-4250

    • Exports getTestUtils, a util to reliably interact with LG Tabs in a product test suite. For more details, check out the README

Patch Changes

11.1.15

Patch Changes

11.1.14

Patch Changes

11.1.13

Patch Changes

  • b708fe19: inlineChildren are now styled to attach to the bottom of the Tabs component
  • Updated dependencies [e3f4d9ce]
  • Updated dependencies [89f439e8]

11.1.12

Patch Changes

11.1.11

Patch Changes

  • 324d9730: Updates the text color of dark mode active tabs from green.base to gray.light2
  • Updated dependencies [324d9730]

11.1.10

Patch Changes

11.1.9

Patch Changes

  • Updated dependencies [a5770c15]
  • Updated dependencies [c89d17a4]

11.1.8

Patch Changes

11.1.7

Patch Changes

11.1.6

Patch Changes

11.1.5

Patch Changes

11.1.4

Patch Changes

11.1.3

Patch Changes

11.1.2

Patch Changes

  • 63b2deb0b: Upgrade button to v20.1.1

11.1.1

Patch Changes

11.1.0

Minor Changes

  • 2077235fe: Component now supports baseFontSize prop

11.0.10

Patch Changes

  • a3a52e131: Bumps to use new useIdAllocator hook
  • Updated dependencies [a3a52e131]
  • Updated dependencies [a3a52e131]

11.0.9

Patch Changes

  • 32b3d3146: Bumps to use new useIdAllocator hook
  • b54f9380f: Updates propTypes for as prop
  • 73cbbd02c: Uses fontWeight token from @leafygreen-ui/tokens
  • Updated dependencies [73cbbd02c]
  • Updated dependencies [32b3d3146]
  • Updated dependencies [8ece56980]
  • Updated dependencies [32b3d3146]

11.0.8

Patch Changes

  • ce0fcb3f6: Excludes children from story controls
  • Updated dependencies [55d33e435]
  • Updated dependencies [111b680c5]
  • Updated dependencies [55d33e435]
  • Updated dependencies [cf00160ec]
  • Updated dependencies [ce0fcb3f6]
  • Updated dependencies [111b680c5]
  • Updated dependencies [77320a6b8]

11.0.7

Patch Changes

11.0.6

Patch Changes

11.0.5

Patch Changes

11.0.4

Patch Changes

  • 64eee134d: TSDoc: Updates some exported TSDoc interfaces. Storybook: Updates story files.
  • Updated dependencies [64eee134d]

11.0.3

Patch Changes

11.0.2

Patch Changes

  • b7f7a4c95: Updates package dependencies & devDependencies, and ensures each package is appropriately listed. Ensures tsconfig has no circular dependencies
  • Updated dependencies [b7f7a4c95]

11.0.1

Patch Changes

  • ae5421cf6: Updates components to use internal transition tokens
  • Updated dependencies [ae5421cf6]

11.0.0

Patch Changes

10.0.1

Patch Changes

10.0.0

Patch Changes

  • Updated dependencies [e399f1b9]
  • Updated dependencies [e399f1b9]

9.2.1

Patch Changes

9.2.0

Minor Changes

  • 3690df49: Updates TypeScript annotations, type structures and export format of some components

Patch Changes

9.1.0

Minor Changes

  • c9346f93: Adds an inlineChildren prop to support inline children after the tabs

9.0.2

Patch Changes

9.0.1

Patch Changes

  • 699f8ba7: Add missing unit to TabTitle font-size
  • Updated dependencies [30e038a3]

9.0.0

Major Changes

  • 5aba12f1: - Updates Tabs for dark mode brand refresh
    • Adds disabled to TabTitle props

8.0.0

Patch Changes

7.0.1

Patch Changes

7.0.0

Major Changes

  • e13d2487: Moving leafygreen-provider to peerDependencies.
  • Updated dependencies [c48e943e]

Patch Changes

  • Updated dependencies [5f28fce1]
  • Updated dependencies [c48e943e]

6.0.3

Patch Changes

6.0.2

Patch Changes

  • acd6919: - Eliminates fuzzy text on hover in menu and tabs
  • Updated dependencies [acd6919]
  • Updated dependencies [acd6919]
  • Updated dependencies [acd6919]

6.0.1

Patch Changes

6.0.0

Major Changes

  • ab1fd9e: Updates Tabs component for Visual Brand Refresh

5.1.5

Patch Changes

  • cd9be9ec: Fixes a bug where Tabs with a non-string name prop would not be rendered accessibly

5.1.4

Patch Changes

5.1.3

Patch Changes

  • 14fa2fdb: Removes href from being spread on tabpanel div

5.1.2

Patch Changes

5.1.1

Patch Changes

5.1.0

Minor Changes

  • b9a8df1e: Export Props used by Tabs

Patch Changes

5.0.3

Patch Changes

  • b3508a2e: Addresses bug where multiple sets of Tabs on a page, controlled by the same state, would automatically move focus to the last set.

5.0.2

Patch Changes

  • eb1caf16: Disables hover state on selected tabs
  • Updated dependencies [c8aee7eb]

5.0.1

Patch Changes

  • 926e0a13: Ensures that props are properly spread on Tab element

5.0.0

Major Changes

  • 7454941e: - Requires that Tabs receive an aria-label or aria-labelledby prop.
    • Ensures that tabs and their corresponding panels are related properly. Specifically, this requires rendering empty tabpanel containers instead of rendering nothing at all when a tabpanel is not selected.

4.0.6

Patch Changes

  • b06ce7fd: Prevents onClick from being fired when Tab is clicked, as it should only be fired when the TabTitle is clicked

4.0.5

Patch Changes

  • ee7923d3: Changes how we extend the types of HTMLElements, and standardizes how we document this across readmes
  • dc88bac1: Ensures Tabs have an active state
  • d12fe9f7: Fixes bug where on new page load, browser would automatically scroll to Tabs due to prematurely manually focusing of the component
  • Updated dependencies [ee7923d3]

4.0.4

Patch Changes

  • 1e9d336c: Tabs now accepts an empty React element as children, which makes it easier to conditionally render individual Tab components
  • Updated dependencies [c9a0d89f]
  • Updated dependencies [9ee1d5fc]

4.0.3

Patch Changes

  • 6858240b: Previously, if multiple <Tabs /> were rendered, only the first on the page would be navigable via keyboard. Now, the currently focused <Tabs /> will be navigable via keyboard, regardless of location on page.
  • Updated dependencies [5cf0c95c]

4.0.2

Patch Changes

4.0.1

Patch Changes

  • 4c0587a0: Fixes issue where TypeScript types were not packaged.

4.0.0

Major Changes

  • 0267bfd2: The underlying structure of distributed module definition files have changed and now have official support for ES modules. Module definition files are now generated using Rollup instead of Webpack. This should not affect functionality, but some thorough testing and caution should be exercised when upgrading.

Patch Changes

3.0.1

Patch Changes

  • a550d645: Properly sets font-family of TabTitle and adds fallbacks in case the font is not available

3.0.0

Major Changes

  • cac8348a: Updates Tabs component to match new design spec and adds darkMode prop

2.1.6

Patch Changes

  • 3e32a2ee: Fixes bug where conditionally rendered Tab elements caused the component to try and read the width of a reference to a non-exisistant element.

2.1.5

Patch Changes

2.1.4

Patch Changes

  • e599707: Require lodash dependencies instead of inlining them.
  • Updated dependencies [e599707]
  • Updated dependencies [8c867bb]

2.1.3

Patch Changes

2.1.2

Patch Changes

2.1.1

Patch Changes

  • Updated dependencies [2eba736]
  • Updated dependencies [1aa26ee]
  • Updated dependencies [a571361]
  • Updated dependencies [d739511]

2.1.0

Minor Changes

  • c17a5e1: Changes how keyboard navigation is handled in Tabs componentt. Ensures that navigating browser history is not prevened by component internals

2.0.1

Patch Changes

  • 2a03117: Upgrades @testing-library/react to v10 and revises test suites to conform with new standards

2.0.0

Major Changes

  • 464c09d: Introduces SSR compatibility though a change to our build process and files

Patch Changes

1.0.5

Patch Changes

  • 2f9a300: Uses exported keyMap from lib
  • Updated dependencies [2f9a300]

1.0.4

Patch Changes

  • d85bd2c: Keyboard navigation responds to keyCode rather than key for more browser compatibility
  • Updated dependencies [9c45cb4]

1.0.3

Patch Changes

  • 4de039a: Further accessibility updates to make component compliant with a11y standards

1.0.2

Patch Changes

  • e1e42f0: Fixes Aria tags in Tab component to be accessible against a11y standards

1.0.1

Patch Changes

  • 37d690f: Fixes component dependency on theme to palette

1.0.0

Major Changes

  • 410c0d6: Initial release of Tabs