@primer/components 31.2.1-rc.f73a0f8c → 32.0.1-rc.c4c2c50a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +0 -1
- package/.github/workflows/release_canary.yml +0 -1
- package/CHANGELOG.md +72 -4
- package/dist/browser.esm.js +299 -361
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +294 -356
- package/dist/browser.umd.js.map +1 -1
- package/docs/content/ActionList2.mdx +8 -7
- package/docs/content/Breadcrumbs.md +11 -16
- package/docs/content/Buttons.md +7 -17
- package/docs/content/CircleBadge.md +0 -10
- package/docs/content/CounterLabel.md +0 -10
- package/docs/content/Dialog.md +15 -18
- package/docs/content/Dialog2.mdx +1 -0
- package/docs/content/Dropdown.md +11 -18
- package/docs/content/FilterList.md +10 -17
- package/docs/content/FilteredSearch.md +4 -11
- package/docs/content/Flash.md +5 -14
- package/docs/content/FormGroup.md +9 -17
- package/docs/content/Header.md +14 -16
- package/docs/content/Label.md +32 -25
- package/docs/content/LabelGroup.md +4 -14
- package/docs/content/Link.md +8 -17
- package/docs/content/Overlay.mdx +1 -10
- package/docs/content/Pagehead.md +4 -13
- package/docs/content/Pagination.md +10 -19
- package/docs/content/Popover.md +11 -19
- package/docs/content/SelectMenu.md +50 -114
- package/docs/content/SideNav.md +15 -23
- package/docs/content/StateLabel.md +5 -14
- package/docs/content/StyledOcticon.md +7 -16
- package/docs/content/SubNav.md +19 -21
- package/docs/content/TabNav.md +10 -18
- package/docs/content/Timeline.md +34 -24
- package/docs/content/Tooltip.md +8 -17
- package/docs/content/Truncate.md +7 -16
- package/docs/content/UnderlineNav.md +13 -21
- package/docs/package-lock.json +269 -158
- package/docs/package.json +1 -1
- package/lib/ActionList2/Group.d.ts +28 -2
- package/lib/ActionList2/Group.js +55 -6
- package/lib/ActionList2/Group.jsx +33 -4
- package/lib/ActionList2/List.d.ts +1 -1
- package/lib/Autocomplete/Autocomplete.d.ts +3 -3
- package/lib/Autocomplete/AutocompleteInput.d.ts +3 -3
- package/lib/Breadcrumbs.d.ts +8 -7
- package/lib/Breadcrumbs.js +7 -12
- package/lib/Breadcrumbs.jsx +3 -6
- package/lib/Button/Button.d.ts +2 -3
- package/lib/Button/Button.js +2 -6
- package/lib/Button/Button.jsx +1 -21
- package/lib/Button/ButtonBase.d.ts +5 -8
- package/lib/Button/ButtonBase.js +1 -5
- package/lib/Button/ButtonBase.jsx +0 -3
- package/lib/Button/ButtonClose.d.ts +3 -46
- package/lib/Button/ButtonClose.js +1 -1
- package/lib/Button/ButtonClose.jsx +0 -2
- package/lib/Button/ButtonDanger.d.ts +2 -3
- package/lib/Button/ButtonDanger.js +2 -6
- package/lib/Button/ButtonDanger.jsx +1 -21
- package/lib/Button/ButtonInvisible.d.ts +2 -3
- package/lib/Button/ButtonInvisible.js +2 -6
- package/lib/Button/ButtonInvisible.jsx +1 -21
- package/lib/Button/ButtonOutline.d.ts +2 -3
- package/lib/Button/ButtonOutline.js +2 -6
- package/lib/Button/ButtonOutline.jsx +1 -21
- package/lib/Button/ButtonPrimary.d.ts +2 -3
- package/lib/Button/ButtonPrimary.js +2 -6
- package/lib/Button/ButtonPrimary.jsx +1 -21
- package/lib/Button/ButtonTableList.d.ts +1 -2
- package/lib/Button/ButtonTableList.js +1 -1
- package/lib/Button/ButtonTableList.jsx +0 -3
- package/lib/CircleBadge.d.ts +4 -5
- package/lib/CircleBadge.js +1 -1
- package/lib/CircleBadge.jsx +0 -1
- package/lib/CircleOcticon.d.ts +1 -1
- package/lib/CounterLabel.d.ts +1 -2
- package/lib/CounterLabel.js +1 -1
- package/lib/CounterLabel.jsx +0 -1
- package/lib/Dialog/Dialog.d.ts +5 -9
- package/lib/Dialog/Dialog.js +17 -11
- package/lib/Dialog/Dialog.jsx +13 -7
- package/lib/Dialog.d.ts +4 -5
- package/lib/Dialog.js +1 -1
- package/lib/Dialog.jsx +0 -2
- package/lib/Dropdown.d.ts +10 -99
- package/lib/Dropdown.js +3 -3
- package/lib/Dropdown.jsx +0 -3
- package/lib/DropdownMenu/DropdownButton.d.ts +3 -47
- package/lib/DropdownMenu/DropdownButton.js +3 -1
- package/lib/DropdownMenu/DropdownButton.jsx +1 -1
- package/lib/FilterList.d.ts +264 -303
- package/lib/FilterList.js +2 -6
- package/lib/FilterList.jsx +2 -6
- package/lib/FilteredSearch.d.ts +1 -2
- package/lib/FilteredSearch.js +1 -1
- package/lib/FilteredSearch.jsx +0 -1
- package/lib/Flash.d.ts +1 -2
- package/lib/Flash.js +1 -1
- package/lib/Flash.jsx +0 -1
- package/lib/FormGroup.d.ts +4 -5
- package/lib/FormGroup.js +2 -2
- package/lib/FormGroup.jsx +0 -3
- package/lib/Header.d.ts +6 -7
- package/lib/Header.js +4 -4
- package/lib/Header.jsx +0 -7
- package/lib/Label.d.ts +1 -2
- package/lib/Label.js +2 -3
- package/lib/Label.jsx +1 -3
- package/lib/LabelGroup.d.ts +1 -2
- package/lib/LabelGroup.js +1 -1
- package/lib/LabelGroup.jsx +0 -1
- package/lib/Link.d.ts +1 -2
- package/lib/Link.js +1 -1
- package/lib/Link.jsx +0 -2
- package/lib/NewButton/button.js +34 -42
- package/lib/NewButton/button.jsx +24 -23
- package/lib/Overlay.d.ts +11 -10
- package/lib/Overlay.js +3 -4
- package/lib/Overlay.jsx +1 -3
- package/lib/Pagehead.d.ts +1 -2
- package/lib/Pagehead.js +1 -1
- package/lib/Pagehead.jsx +0 -1
- package/lib/Pagination/Pagination.js +1 -1
- package/lib/Pagination/Pagination.jsx +0 -2
- package/lib/Popover.d.ts +4 -5
- package/lib/Popover.js +4 -5
- package/lib/Popover.jsx +1 -9
- package/lib/Position.d.ts +4 -4
- package/lib/SelectMenu/SelectMenu.d.ts +21 -189
- package/lib/SelectMenu/SelectMenu.js +1 -3
- package/lib/SelectMenu/SelectMenu.jsx +0 -2
- package/lib/SelectMenu/SelectMenuDivider.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuDivider.js +1 -1
- package/lib/SelectMenu/SelectMenuDivider.jsx +0 -1
- package/lib/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib/SelectMenu/SelectMenuFilter.jsx +0 -1
- package/lib/SelectMenu/SelectMenuFooter.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib/SelectMenu/SelectMenuFooter.jsx +0 -1
- package/lib/SelectMenu/SelectMenuHeader.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuHeader.js +1 -1
- package/lib/SelectMenu/SelectMenuHeader.jsx +0 -2
- package/lib/SelectMenu/SelectMenuItem.d.ts +2 -3
- package/lib/SelectMenu/SelectMenuItem.js +1 -1
- package/lib/SelectMenu/SelectMenuItem.jsx +0 -1
- package/lib/SelectMenu/SelectMenuList.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuList.js +1 -1
- package/lib/SelectMenu/SelectMenuList.jsx +0 -1
- package/lib/SelectMenu/SelectMenuLoadingAnimation.d.ts +2 -2
- package/lib/SelectMenu/SelectMenuLoadingAnimation.js +3 -1
- package/lib/SelectMenu/SelectMenuLoadingAnimation.jsx +2 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +2 -3
- package/lib/SelectMenu/SelectMenuModal.js +1 -1
- package/lib/SelectMenu/SelectMenuModal.jsx +0 -1
- package/lib/SelectMenu/SelectMenuTab.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuTab.js +1 -1
- package/lib/SelectMenu/SelectMenuTab.jsx +0 -1
- package/lib/SelectMenu/SelectMenuTabPanel.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib/SelectMenu/SelectMenuTabPanel.jsx +0 -1
- package/lib/SelectMenu/SelectMenuTabs.d.ts +1 -2
- package/lib/SelectMenu/SelectMenuTabs.js +1 -1
- package/lib/SelectMenu/SelectMenuTabs.jsx +0 -1
- package/lib/SideNav.d.ts +11 -8
- package/lib/SideNav.js +8 -15
- package/lib/SideNav.jsx +2 -6
- package/lib/StateLabel.d.ts +1 -2
- package/lib/StateLabel.js +6 -5
- package/lib/StateLabel.jsx +1 -2
- package/lib/StyledOcticon.d.ts +1 -2
- package/lib/StyledOcticon.js +1 -3
- package/lib/StyledOcticon.jsx +0 -2
- package/lib/SubNav.d.ts +5 -11
- package/lib/SubNav.js +7 -12
- package/lib/SubNav.jsx +4 -7
- package/lib/TabNav.d.ts +3 -4
- package/lib/TabNav.js +2 -2
- package/lib/TabNav.jsx +0 -2
- package/lib/TextInputWithTokens.d.ts +3 -3
- package/lib/Timeline.d.ts +19 -393
- package/lib/Timeline.js +16 -13
- package/lib/Timeline.jsx +9 -10
- package/lib/Token/Token.d.ts +1 -1
- package/lib/Tooltip.d.ts +1 -2
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.jsx +1 -1
- package/lib/Truncate.d.ts +1 -2
- package/lib/Truncate.js +1 -3
- package/lib/Truncate.jsx +0 -3
- package/lib/UnderlineNav.d.ts +2 -3
- package/lib/UnderlineNav.js +2 -2
- package/lib/UnderlineNav.jsx +0 -2
- package/lib/__tests__/Breadcrumbs.test.js +4 -1
- package/lib/__tests__/Breadcrumbs.test.jsx +1 -1
- package/lib/__tests__/Breadcrumbs.types.test.d.ts +3 -0
- package/lib/__tests__/Breadcrumbs.types.test.js +25 -0
- package/lib/__tests__/Breadcrumbs.types.test.jsx +24 -0
- package/lib/__tests__/Button.test.js +6 -2
- package/lib/__tests__/Button.test.jsx +2 -2
- package/lib/__tests__/CircleBadge.types.test.d.ts +3 -0
- package/lib/__tests__/CircleBadge.types.test.js +28 -0
- package/lib/__tests__/CircleBadge.types.test.jsx +17 -0
- package/lib/__tests__/CounterLabel.types.test.d.ts +3 -0
- package/lib/__tests__/CounterLabel.types.test.js +28 -0
- package/lib/__tests__/CounterLabel.types.test.jsx +17 -0
- package/lib/__tests__/Dialog.types.test.d.ts +3 -0
- package/lib/__tests__/Dialog.types.test.js +28 -0
- package/lib/__tests__/Dialog.types.test.jsx +17 -0
- package/lib/__tests__/Dialog2.types.test.d.ts +3 -0
- package/lib/__tests__/Dialog2.types.test.js +31 -0
- package/lib/__tests__/Dialog2.types.test.jsx +17 -0
- package/lib/__tests__/Dropdown.types.test.d.ts +3 -0
- package/lib/__tests__/Dropdown.types.test.js +31 -0
- package/lib/__tests__/Dropdown.types.test.jsx +25 -0
- package/lib/__tests__/FilterList.types.test.d.ts +3 -0
- package/lib/__tests__/FilterList.types.test.js +27 -0
- package/lib/__tests__/FilterList.types.test.jsx +21 -0
- package/lib/__tests__/FilteredSearch.types.test.d.ts +3 -0
- package/lib/__tests__/FilteredSearch.types.test.js +28 -0
- package/lib/__tests__/FilteredSearch.types.test.jsx +17 -0
- package/lib/__tests__/Flash.types.test.d.ts +3 -0
- package/lib/__tests__/Flash.types.test.js +28 -0
- package/lib/__tests__/Flash.types.test.jsx +17 -0
- package/lib/__tests__/FormGroup.types.test.d.ts +3 -0
- package/lib/__tests__/FormGroup.types.test.js +28 -0
- package/lib/__tests__/FormGroup.types.test.jsx +17 -0
- package/lib/__tests__/Header.types.test.d.ts +3 -0
- package/lib/__tests__/Header.types.test.js +29 -0
- package/lib/__tests__/Header.types.test.jsx +23 -0
- package/lib/__tests__/Label.types.test.d.ts +3 -0
- package/lib/__tests__/Label.types.test.js +28 -0
- package/lib/__tests__/Label.types.test.jsx +17 -0
- package/lib/__tests__/LabelGroup.types.test.d.ts +3 -0
- package/lib/__tests__/LabelGroup.types.test.js +28 -0
- package/lib/__tests__/LabelGroup.types.test.jsx +17 -0
- package/lib/__tests__/Link.test.js +11 -5
- package/lib/__tests__/Link.test.jsx +5 -5
- package/lib/__tests__/Link.types.test.d.ts +3 -0
- package/lib/__tests__/Link.types.test.js +28 -0
- package/lib/__tests__/Link.types.test.jsx +17 -0
- package/lib/__tests__/Overlay.types.test.d.ts +3 -0
- package/lib/__tests__/Overlay.types.test.js +35 -0
- package/lib/__tests__/Overlay.types.test.jsx +18 -0
- package/lib/__tests__/Pagehead.types.test.d.ts +3 -0
- package/lib/__tests__/Pagehead.types.test.js +28 -0
- package/lib/__tests__/Pagehead.types.test.jsx +17 -0
- package/lib/__tests__/Pagination.types.test.d.ts +3 -0
- package/lib/__tests__/Pagination.types.test.js +33 -0
- package/lib/__tests__/Pagination.types.test.jsx +17 -0
- package/lib/__tests__/Popover.types.test.d.ts +3 -0
- package/lib/__tests__/Popover.types.test.js +27 -0
- package/lib/__tests__/Popover.types.test.jsx +21 -0
- package/lib/__tests__/SelectMenu.types.test.d.ts +3 -0
- package/lib/__tests__/SelectMenu.types.test.js +47 -0
- package/lib/__tests__/SelectMenu.types.test.jsx +41 -0
- package/lib/__tests__/SideNav.types.test.d.ts +3 -0
- package/lib/__tests__/SideNav.types.test.js +28 -0
- package/lib/__tests__/SideNav.types.test.jsx +17 -0
- package/lib/__tests__/StateLabel.types.test.d.ts +3 -0
- package/lib/__tests__/StateLabel.types.test.js +28 -0
- package/lib/__tests__/StateLabel.types.test.jsx +17 -0
- package/lib/__tests__/StyledOcticon.types.test.d.ts +3 -0
- package/lib/__tests__/StyledOcticon.types.test.js +32 -0
- package/lib/__tests__/StyledOcticon.types.test.jsx +18 -0
- package/lib/__tests__/SubNav.types.test.d.ts +3 -0
- package/lib/__tests__/SubNav.types.test.js +27 -0
- package/lib/__tests__/SubNav.types.test.jsx +27 -0
- package/lib/__tests__/TabNav.types.test.d.ts +3 -0
- package/lib/__tests__/TabNav.types.test.js +25 -0
- package/lib/__tests__/TabNav.types.test.jsx +24 -0
- package/lib/__tests__/Timeline.types.test.d.ts +3 -0
- package/lib/__tests__/Timeline.types.test.js +31 -0
- package/lib/__tests__/Timeline.types.test.jsx +33 -0
- package/lib/__tests__/Tooltip.types.test.d.ts +3 -0
- package/lib/__tests__/Tooltip.types.test.js +28 -0
- package/lib/__tests__/Tooltip.types.test.jsx +17 -0
- package/lib/__tests__/Truncate.types.test.d.ts +3 -0
- package/lib/__tests__/Truncate.types.test.js +31 -0
- package/lib/__tests__/Truncate.types.test.jsx +17 -0
- package/lib/__tests__/UnderlineNav.types.test.d.ts +3 -0
- package/lib/__tests__/UnderlineNav.types.test.js +25 -0
- package/lib/__tests__/UnderlineNav.types.test.jsx +24 -0
- package/lib/stories/ActionList2.stories.js +4 -3
- package/lib/stories/ActionMenu.stories.js +1 -3
- package/lib/stories/ConfirmationDialog.stories.js +16 -8
- package/lib/stories/Dialog.stories.js +6 -2
- package/lib/stories/useFocusTrap.stories.js +6 -2
- package/lib/stories/useFocusZone.stories.js +13 -5
- package/lib/utils/testing.d.ts +1 -1
- package/lib-esm/ActionList2/Group.d.ts +28 -2
- package/lib-esm/ActionList2/Group.js +52 -5
- package/lib-esm/ActionList2/List.d.ts +1 -1
- package/lib-esm/Autocomplete/Autocomplete.d.ts +3 -3
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +3 -3
- package/lib-esm/Breadcrumbs.d.ts +8 -7
- package/lib-esm/Breadcrumbs.js +8 -13
- package/lib-esm/Button/Button.d.ts +2 -3
- package/lib-esm/Button/Button.js +2 -2
- package/lib-esm/Button/ButtonBase.d.ts +5 -8
- package/lib-esm/Button/ButtonBase.js +1 -3
- package/lib-esm/Button/ButtonClose.d.ts +3 -46
- package/lib-esm/Button/ButtonClose.js +2 -2
- package/lib-esm/Button/ButtonDanger.d.ts +2 -3
- package/lib-esm/Button/ButtonDanger.js +2 -2
- package/lib-esm/Button/ButtonInvisible.d.ts +2 -3
- package/lib-esm/Button/ButtonInvisible.js +2 -2
- package/lib-esm/Button/ButtonOutline.d.ts +2 -3
- package/lib-esm/Button/ButtonOutline.js +2 -2
- package/lib-esm/Button/ButtonPrimary.d.ts +2 -3
- package/lib-esm/Button/ButtonPrimary.js +2 -2
- package/lib-esm/Button/ButtonTableList.d.ts +1 -2
- package/lib-esm/Button/ButtonTableList.js +2 -2
- package/lib-esm/CircleBadge.d.ts +4 -5
- package/lib-esm/CircleBadge.js +2 -2
- package/lib-esm/CircleOcticon.d.ts +1 -1
- package/lib-esm/CounterLabel.d.ts +1 -2
- package/lib-esm/CounterLabel.js +2 -2
- package/lib-esm/Dialog/Dialog.d.ts +5 -9
- package/lib-esm/Dialog/Dialog.js +12 -12
- package/lib-esm/Dialog.d.ts +4 -5
- package/lib-esm/Dialog.js +2 -2
- package/lib-esm/Dropdown.d.ts +10 -99
- package/lib-esm/Dropdown.js +4 -4
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +3 -47
- package/lib-esm/DropdownMenu/DropdownButton.js +3 -1
- package/lib-esm/FilterList.d.ts +264 -303
- package/lib-esm/FilterList.js +3 -7
- package/lib-esm/FilteredSearch.d.ts +1 -2
- package/lib-esm/FilteredSearch.js +2 -2
- package/lib-esm/Flash.d.ts +1 -2
- package/lib-esm/Flash.js +2 -2
- package/lib-esm/FormGroup.d.ts +4 -5
- package/lib-esm/FormGroup.js +3 -3
- package/lib-esm/Header.d.ts +6 -7
- package/lib-esm/Header.js +5 -5
- package/lib-esm/Label.d.ts +1 -2
- package/lib-esm/Label.js +3 -4
- package/lib-esm/LabelGroup.d.ts +1 -2
- package/lib-esm/LabelGroup.js +2 -2
- package/lib-esm/Link.d.ts +1 -2
- package/lib-esm/Link.js +2 -2
- package/lib-esm/NewButton/button.js +31 -42
- package/lib-esm/Overlay.d.ts +11 -10
- package/lib-esm/Overlay.js +2 -3
- package/lib-esm/Pagehead.d.ts +1 -2
- package/lib-esm/Pagehead.js +2 -2
- package/lib-esm/Pagination/Pagination.js +2 -2
- package/lib-esm/Popover.d.ts +4 -5
- package/lib-esm/Popover.js +4 -5
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/SelectMenu/SelectMenu.d.ts +21 -189
- package/lib-esm/SelectMenu/SelectMenu.js +1 -2
- package/lib-esm/SelectMenu/SelectMenuDivider.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuDivider.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuFilter.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuFooter.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuFooter.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuHeader.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuHeader.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +2 -3
- package/lib-esm/SelectMenu/SelectMenuItem.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuList.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuList.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.d.ts +2 -2
- package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.js +3 -2
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +2 -3
- package/lib-esm/SelectMenu/SelectMenuModal.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuTab.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuTab.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuTabPanel.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuTabPanel.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuTabs.d.ts +1 -2
- package/lib-esm/SelectMenu/SelectMenuTabs.js +2 -2
- package/lib-esm/SideNav.d.ts +11 -8
- package/lib-esm/SideNav.js +8 -16
- package/lib-esm/StateLabel.d.ts +1 -2
- package/lib-esm/StateLabel.js +7 -6
- package/lib-esm/StyledOcticon.d.ts +1 -2
- package/lib-esm/StyledOcticon.js +1 -2
- package/lib-esm/SubNav.d.ts +5 -11
- package/lib-esm/SubNav.js +8 -13
- package/lib-esm/TabNav.d.ts +3 -4
- package/lib-esm/TabNav.js +3 -3
- package/lib-esm/TextInputWithTokens.d.ts +3 -3
- package/lib-esm/Timeline.d.ts +19 -393
- package/lib-esm/Timeline.js +12 -13
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/Tooltip.d.ts +1 -2
- package/lib-esm/Tooltip.js +2 -2
- package/lib-esm/Truncate.d.ts +1 -2
- package/lib-esm/Truncate.js +1 -2
- package/lib-esm/UnderlineNav.d.ts +2 -3
- package/lib-esm/UnderlineNav.js +3 -3
- package/lib-esm/__tests__/Breadcrumbs.test.js +4 -1
- package/lib-esm/__tests__/Breadcrumbs.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Breadcrumbs.types.test.js +12 -0
- package/lib-esm/__tests__/Button.test.js +6 -2
- package/lib-esm/__tests__/CircleBadge.types.test.d.ts +3 -0
- package/lib-esm/__tests__/CircleBadge.types.test.js +13 -0
- package/lib-esm/__tests__/CounterLabel.types.test.d.ts +3 -0
- package/lib-esm/__tests__/CounterLabel.types.test.js +13 -0
- package/lib-esm/__tests__/Dialog.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Dialog.types.test.js +13 -0
- package/lib-esm/__tests__/Dialog2.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Dialog2.types.test.js +16 -0
- package/lib-esm/__tests__/Dropdown.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Dropdown.types.test.js +17 -0
- package/lib-esm/__tests__/FilterList.types.test.d.ts +3 -0
- package/lib-esm/__tests__/FilterList.types.test.js +13 -0
- package/lib-esm/__tests__/FilteredSearch.types.test.d.ts +3 -0
- package/lib-esm/__tests__/FilteredSearch.types.test.js +13 -0
- package/lib-esm/__tests__/Flash.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Flash.types.test.js +13 -0
- package/lib-esm/__tests__/FormGroup.types.test.d.ts +3 -0
- package/lib-esm/__tests__/FormGroup.types.test.js +13 -0
- package/lib-esm/__tests__/Header.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Header.types.test.js +15 -0
- package/lib-esm/__tests__/Label.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Label.types.test.js +13 -0
- package/lib-esm/__tests__/LabelGroup.types.test.d.ts +3 -0
- package/lib-esm/__tests__/LabelGroup.types.test.js +13 -0
- package/lib-esm/__tests__/Link.test.js +11 -5
- package/lib-esm/__tests__/Link.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Link.types.test.js +13 -0
- package/lib-esm/__tests__/Overlay.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Overlay.types.test.js +20 -0
- package/lib-esm/__tests__/Pagehead.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Pagehead.types.test.js +13 -0
- package/lib-esm/__tests__/Pagination.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Pagination.types.test.js +18 -0
- package/lib-esm/__tests__/Popover.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Popover.types.test.js +13 -0
- package/lib-esm/__tests__/SelectMenu.types.test.d.ts +3 -0
- package/lib-esm/__tests__/SelectMenu.types.test.js +33 -0
- package/lib-esm/__tests__/SideNav.types.test.d.ts +3 -0
- package/lib-esm/__tests__/SideNav.types.test.js +13 -0
- package/lib-esm/__tests__/StateLabel.types.test.d.ts +3 -0
- package/lib-esm/__tests__/StateLabel.types.test.js +13 -0
- package/lib-esm/__tests__/StyledOcticon.types.test.d.ts +3 -0
- package/lib-esm/__tests__/StyledOcticon.types.test.js +16 -0
- package/lib-esm/__tests__/SubNav.types.test.d.ts +3 -0
- package/lib-esm/__tests__/SubNav.types.test.js +14 -0
- package/lib-esm/__tests__/TabNav.types.test.d.ts +3 -0
- package/lib-esm/__tests__/TabNav.types.test.js +12 -0
- package/lib-esm/__tests__/Timeline.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Timeline.types.test.js +18 -0
- package/lib-esm/__tests__/Tooltip.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Tooltip.types.test.js +13 -0
- package/lib-esm/__tests__/Truncate.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Truncate.types.test.js +16 -0
- package/lib-esm/__tests__/UnderlineNav.types.test.d.ts +3 -0
- package/lib-esm/__tests__/UnderlineNav.types.test.js +12 -0
- package/lib-esm/stories/ActionList2.stories.js +4 -3
- package/lib-esm/stories/ActionMenu.stories.js +1 -3
- package/lib-esm/stories/ConfirmationDialog.stories.js +16 -8
- package/lib-esm/stories/Dialog.stories.js +6 -2
- package/lib-esm/stories/useFocusTrap.stories.js +6 -2
- package/lib-esm/stories/useFocusZone.stories.js +13 -5
- package/lib-esm/theme-preval.js +446 -0
- package/lib-esm/utils/testing.d.ts +1 -1
- package/package-lock.json +16 -16
- package/package.json +3 -3
- package/src/ActionList2/Group.tsx +76 -7
- package/src/ActionList2/List.tsx +1 -1
- package/src/Breadcrumbs.tsx +11 -11
- package/src/Button/Button.tsx +2 -3
- package/src/Button/ButtonBase.tsx +2 -6
- package/src/Button/ButtonClose.tsx +2 -6
- package/src/Button/ButtonDanger.tsx +2 -3
- package/src/Button/ButtonInvisible.tsx +2 -3
- package/src/Button/ButtonOutline.tsx +2 -3
- package/src/Button/ButtonPrimary.tsx +2 -3
- package/src/Button/ButtonTableList.tsx +2 -15
- package/src/CircleBadge.tsx +2 -4
- package/src/CounterLabel.tsx +2 -4
- package/src/Dialog/Dialog.tsx +22 -11
- package/src/Dialog.tsx +2 -6
- package/src/Dropdown.tsx +3 -7
- package/src/DropdownMenu/DropdownButton.tsx +1 -1
- package/src/FilterList.tsx +5 -11
- package/src/FilteredSearch.tsx +2 -3
- package/src/Flash.tsx +2 -4
- package/src/FormGroup.tsx +3 -6
- package/src/Header.tsx +4 -14
- package/src/Label.tsx +2 -5
- package/src/LabelGroup.tsx +2 -3
- package/src/Link.tsx +2 -6
- package/src/NewButton/button.tsx +82 -78
- package/src/Overlay.tsx +13 -11
- package/src/Pagehead.tsx +2 -3
- package/src/Pagination/Pagination.tsx +3 -5
- package/src/Popover.tsx +3 -14
- package/src/SelectMenu/SelectMenu.tsx +1 -3
- package/src/SelectMenu/SelectMenuDivider.tsx +2 -3
- package/src/SelectMenu/SelectMenuFilter.tsx +2 -3
- package/src/SelectMenu/SelectMenuFooter.tsx +2 -3
- package/src/SelectMenu/SelectMenuHeader.tsx +2 -4
- package/src/SelectMenu/SelectMenuItem.tsx +2 -3
- package/src/SelectMenu/SelectMenuList.tsx +2 -3
- package/src/SelectMenu/SelectMenuLoadingAnimation.tsx +4 -3
- package/src/SelectMenu/SelectMenuModal.tsx +2 -4
- package/src/SelectMenu/SelectMenuTab.tsx +2 -3
- package/src/SelectMenu/SelectMenuTabPanel.tsx +2 -3
- package/src/SelectMenu/SelectMenuTabs.tsx +2 -3
- package/src/SideNav.tsx +11 -13
- package/src/StateLabel.tsx +3 -5
- package/src/StyledOcticon.tsx +1 -3
- package/src/SubNav.tsx +8 -13
- package/src/TabNav.tsx +3 -7
- package/src/Timeline.tsx +11 -12
- package/src/Tooltip.tsx +3 -3
- package/src/Truncate.tsx +0 -5
- package/src/UnderlineNav.tsx +3 -6
- package/src/__tests__/Breadcrumbs.test.tsx +1 -1
- package/src/__tests__/Breadcrumbs.types.test.tsx +22 -0
- package/src/__tests__/Button.test.tsx +2 -2
- package/src/__tests__/CircleBadge.types.test.tsx +11 -0
- package/src/__tests__/CounterLabel.types.test.tsx +11 -0
- package/src/__tests__/Dialog.types.test.tsx +11 -0
- package/src/__tests__/Dialog2.types.test.tsx +11 -0
- package/src/__tests__/Dropdown.types.test.tsx +21 -0
- package/src/__tests__/FilterList.types.test.tsx +17 -0
- package/src/__tests__/FilteredSearch.types.test.tsx +11 -0
- package/src/__tests__/Flash.types.test.tsx +11 -0
- package/src/__tests__/FormGroup.types.test.tsx +11 -0
- package/src/__tests__/Header.types.test.tsx +19 -0
- package/src/__tests__/Label.types.test.tsx +11 -0
- package/src/__tests__/LabelGroup.types.test.tsx +11 -0
- package/src/__tests__/Link.test.tsx +5 -5
- package/src/__tests__/Link.types.test.tsx +11 -0
- package/src/__tests__/Overlay.types.test.tsx +18 -0
- package/src/__tests__/Pagehead.types.test.tsx +11 -0
- package/src/__tests__/Pagination.types.test.tsx +11 -0
- package/src/__tests__/Popover.types.test.tsx +17 -0
- package/src/__tests__/SelectMenu.types.test.tsx +37 -0
- package/src/__tests__/SideNav.types.test.tsx +11 -0
- package/src/__tests__/StateLabel.types.test.tsx +11 -0
- package/src/__tests__/StyledOcticon.types.test.tsx +12 -0
- package/src/__tests__/SubNav.types.test.tsx +25 -0
- package/src/__tests__/TabNav.types.test.tsx +22 -0
- package/src/__tests__/Timeline.types.test.tsx +31 -0
- package/src/__tests__/Tooltip.types.test.tsx +11 -0
- package/src/__tests__/Truncate.types.test.tsx +11 -0
- package/src/__tests__/UnderlineNav.types.test.tsx +22 -0
- package/src/__tests__/__snapshots__/Label.test.tsx.snap +3 -4
- package/src/__tests__/__snapshots__/Link.test.tsx.snap +1 -2
- package/src/__tests__/__snapshots__/NewButton.test.tsx.snap +5 -0
- package/src/stories/ActionList2.stories.tsx +3 -3
- package/src/stories/ActionMenu.stories.tsx +1 -4
- package/src/stories/ConfirmationDialog.stories.tsx +4 -4
- package/src/stories/Dialog.stories.tsx +2 -2
- package/src/stories/useFocusTrap.stories.tsx +2 -2
- package/src/stories/useFocusZone.stories.tsx +4 -4
- package/stats.html +1 -1
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Link from '../Link'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <Link />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
// @ts-expect-error system props should not be accepted
|
10
|
+
return <Link backgroundColor="mistyrose" />
|
11
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Overlay from '../Overlay'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps(ref: React.RefObject<HTMLElement>) {
|
5
|
+
return <Overlay returnFocusRef={ref} onClickOutside={() => null} onEscape={() => null} />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps(ref: React.RefObject<HTMLElement>) {
|
9
|
+
return (
|
10
|
+
<Overlay
|
11
|
+
returnFocusRef={ref}
|
12
|
+
onClickOutside={() => null}
|
13
|
+
onEscape={() => null}
|
14
|
+
// @ts-expect-error system props should not be accepted
|
15
|
+
backgroundColor="olivedrab"
|
16
|
+
/>
|
17
|
+
)
|
18
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Pagehead from '../Pagehead'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <Pagehead />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
// @ts-expect-error system props should not be accepted
|
10
|
+
return <Pagehead backgroundColor="orchid" />
|
11
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Pagination from '../Pagination'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <Pagination currentPage={1} pageCount={2} />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
// @ts-expect-error system props should not be accepted
|
10
|
+
return <Pagination currentPage={1} pageCount={2} backgroundColor="palegoldenrod" />
|
11
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Popover from '../Popover'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <Popover />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
return (
|
10
|
+
<>
|
11
|
+
{/* @ts-expect-error system props should not be accepted */}
|
12
|
+
<Popover backgroundColor="palegreen" />
|
13
|
+
{/* @ts-expect-error system props should not be accepted */}
|
14
|
+
<Popover.Content backgroundColor="paleturquoise" />
|
15
|
+
</>
|
16
|
+
)
|
17
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import SelectMenu from '../SelectMenu'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <SelectMenu />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
return (
|
10
|
+
<>
|
11
|
+
{/* @ts-expect-error system props should not be accepted */}
|
12
|
+
<SelectMenu backgroundColor="lightgray" />
|
13
|
+
{/* @ts-expect-error system props should not be accepted */}
|
14
|
+
<SelectMenu.List backgroundColor="lightgreen" />
|
15
|
+
{/* @ts-expect-error system props should not be accepted */}
|
16
|
+
<SelectMenu.Divider backgroundColor="lightgrey" />
|
17
|
+
{/* This will not error for now, but once TextInputProps is fixed, a ts-expect-error can be added */}
|
18
|
+
<SelectMenu.Filter backgroundColor="lightpink" />
|
19
|
+
{/* @ts-expect-error system props should not be accepted */}
|
20
|
+
<SelectMenu.Footer backgroundColor="lightsalmon" />
|
21
|
+
{/* @ts-expect-error system props should not be accepted */}
|
22
|
+
<SelectMenu.Item backgroundColor="lightseagreen" />
|
23
|
+
{/* @ts-expect-error system props should not be accepted */}
|
24
|
+
<SelectMenu.Modal backgroundColor="lightskyblue" />
|
25
|
+
{/* @ts-expect-error system props should not be accepted */}
|
26
|
+
<SelectMenu.Tabs backgroundColor="lightslategray" />
|
27
|
+
{/* @ts-expect-error system props should not be accepted */}
|
28
|
+
<SelectMenu.Tab backgroundColor="lightslategrey" />
|
29
|
+
{/* @ts-expect-error system props should not be accepted */}
|
30
|
+
<SelectMenu.TabPanel backgroundColor="lightsteelblue" />
|
31
|
+
{/* @ts-expect-error system props should not be accepted */}
|
32
|
+
<SelectMenu.Header backgroundColor="lightyellow" />
|
33
|
+
{/* @ts-expect-error system props should not be accepted */}
|
34
|
+
<SelectMenu.LoadingAnimation backgroundColor="lightcyan" />
|
35
|
+
</>
|
36
|
+
)
|
37
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import SideNav from '../SideNav'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <SideNav />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
// @ts-expect-error system props should not be accepted
|
10
|
+
return <SideNav backgroundColor="aliceblue" />
|
11
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import StateLabel from '../StateLabel'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <StateLabel />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
// @ts-expect-error system props should not be accepted
|
10
|
+
return <StateLabel backgroundColor="bisque" />
|
11
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import {MoonIcon} from '@primer/octicons-react'
|
2
|
+
import React from 'react'
|
3
|
+
import StyledOcticon from '../StyledOcticon'
|
4
|
+
|
5
|
+
export function shouldAcceptCallWithNoProps() {
|
6
|
+
return <StyledOcticon icon={MoonIcon} />
|
7
|
+
}
|
8
|
+
|
9
|
+
export function shouldNotAcceptSystemProps() {
|
10
|
+
// @ts-expect-error system props should not be accepted
|
11
|
+
return <StyledOcticon backgroundColor="wheat" />
|
12
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import SubNav from '../SubNav'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return (
|
6
|
+
<>
|
7
|
+
<SubNav />
|
8
|
+
<SubNav.Link />
|
9
|
+
<SubNav.Links />
|
10
|
+
</>
|
11
|
+
)
|
12
|
+
}
|
13
|
+
|
14
|
+
export function shouldNotAcceptSystemProps() {
|
15
|
+
return (
|
16
|
+
<>
|
17
|
+
{/* @ts-expect-error system props should not be accepted */}
|
18
|
+
<SubNav backgroundColor="thistle" />
|
19
|
+
{/* @ts-expect-error system props should not be accepted */}
|
20
|
+
<SubNav.Link backgroundColor="thistle" />
|
21
|
+
{/* @ts-expect-error system props should not be accepted */}
|
22
|
+
<SubNav.Links backgroundColor="thistle" />
|
23
|
+
</>
|
24
|
+
)
|
25
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import TabNav from '../TabNav'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return (
|
6
|
+
<>
|
7
|
+
<TabNav />
|
8
|
+
<TabNav.Link />
|
9
|
+
</>
|
10
|
+
)
|
11
|
+
}
|
12
|
+
|
13
|
+
export function shouldNotAcceptSystemProps() {
|
14
|
+
return (
|
15
|
+
<>
|
16
|
+
{/* @ts-expect-error system props should not be accepted */}
|
17
|
+
<TabNav backgroundColor="maroon" />
|
18
|
+
{/* @ts-expect-error system props should not be accepted */}
|
19
|
+
<TabNav.Link backgroundColor="fuchsia" />
|
20
|
+
</>
|
21
|
+
)
|
22
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Timeline from '../Timeline'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return (
|
6
|
+
<>
|
7
|
+
<Timeline />
|
8
|
+
<Timeline.Item />
|
9
|
+
<Timeline.Badge />
|
10
|
+
<Timeline.Body />
|
11
|
+
<Timeline.Break />
|
12
|
+
</>
|
13
|
+
)
|
14
|
+
}
|
15
|
+
|
16
|
+
export function shouldNotAcceptSystemProps() {
|
17
|
+
return (
|
18
|
+
<>
|
19
|
+
{/* @ts-expect-error system props should not be accepted */}
|
20
|
+
<Timeline backgroundColor="red" />
|
21
|
+
{/* @ts-expect-error system props should not be accepted */}
|
22
|
+
<Timeline.Item backgroundColor="orange" />
|
23
|
+
{/* @ts-expect-error system props should not be accepted */}
|
24
|
+
<Timeline.Badge backgroundColor="yellow" />
|
25
|
+
{/* @ts-expect-error system props should not be accepted */}
|
26
|
+
<Timeline.Body backgroundColor="green" />
|
27
|
+
{/* @ts-expect-error system props should not be accepted */}
|
28
|
+
<Timeline.Break backgroundColor="blue" />
|
29
|
+
</>
|
30
|
+
)
|
31
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Tooltip from '../Tooltip'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <Tooltip />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
// @ts-expect-error system props should not be accepted
|
10
|
+
return <Tooltip backgroundColor="thistle" />
|
11
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Truncate from '../Truncate'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return <Truncate title="Hello" />
|
6
|
+
}
|
7
|
+
|
8
|
+
export function shouldNotAcceptSystemProps() {
|
9
|
+
// @ts-expect-error system props should not be accepted
|
10
|
+
return <Truncate title="Hello" backgroundColor="indigo" />
|
11
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import UnderlineNav from '../UnderlineNav'
|
3
|
+
|
4
|
+
export function shouldAcceptCallWithNoProps() {
|
5
|
+
return (
|
6
|
+
<>
|
7
|
+
<UnderlineNav />
|
8
|
+
<UnderlineNav.Link />
|
9
|
+
</>
|
10
|
+
)
|
11
|
+
}
|
12
|
+
|
13
|
+
export function shouldNotAcceptSystemProps() {
|
14
|
+
return (
|
15
|
+
<>
|
16
|
+
{/* @ts-expect-error system props should not be accepted */}
|
17
|
+
<UnderlineNav backgroundColor="snow" />
|
18
|
+
{/* @ts-expect-error system props should not be accepted */}
|
19
|
+
<UnderlineNav.Link backgroundColor="springgreen" />
|
20
|
+
</>
|
21
|
+
)
|
22
|
+
}
|
@@ -6,10 +6,10 @@ exports[`Label renders consistently 1`] = `
|
|
6
6
|
font-weight: 500;
|
7
7
|
color: #ffffff;
|
8
8
|
border-radius: 100px;
|
9
|
+
background-color: #6e7781;
|
9
10
|
font-size: 12px;
|
10
11
|
line-height: 20px;
|
11
12
|
padding: 0 8px;
|
12
|
-
background-color: #6e7781;
|
13
13
|
}
|
14
14
|
|
15
15
|
.c0:hover {
|
@@ -28,16 +28,15 @@ exports[`Label respects the "outline" prop 1`] = `
|
|
28
28
|
font-weight: 500;
|
29
29
|
color: #ffffff;
|
30
30
|
border-radius: 100px;
|
31
|
+
background-color: #6e7781;
|
31
32
|
font-size: 12px;
|
32
33
|
line-height: 20px;
|
33
34
|
padding: 0 8px;
|
34
|
-
background-color: #6e7781;
|
35
35
|
margin-top: -1px;
|
36
36
|
margin-bottom: -1px;
|
37
37
|
color: #57606a;
|
38
38
|
border: 1px solid #d0d7de;
|
39
39
|
box-shadow: none;
|
40
|
-
background-color: #6e7781;
|
41
40
|
background-color: transparent;
|
42
41
|
}
|
43
42
|
|
@@ -57,10 +56,10 @@ exports[`Label respects the "variant" prop 1`] = `
|
|
57
56
|
font-weight: 500;
|
58
57
|
color: #ffffff;
|
59
58
|
border-radius: 100px;
|
59
|
+
background-color: #6e7781;
|
60
60
|
font-size: 14px;
|
61
61
|
line-height: 16px;
|
62
62
|
padding: 8px 12px;
|
63
|
-
background-color: #6e7781;
|
64
63
|
}
|
65
64
|
|
66
65
|
.c0:hover {
|
@@ -103,7 +103,7 @@ exports[`Link renders consistently 1`] = `
|
|
103
103
|
/>
|
104
104
|
`;
|
105
105
|
|
106
|
-
exports[`Link respectes the
|
106
|
+
exports[`Link respectes the "sx" prop when "muted" prop is also passed 1`] = `
|
107
107
|
.c0 {
|
108
108
|
color: #57606a;
|
109
109
|
-webkit-text-decoration: none;
|
@@ -136,7 +136,6 @@ exports[`Link respectes the "color" prop when "muted" prop is also passed 1`] =
|
|
136
136
|
|
137
137
|
<a
|
138
138
|
className="c0"
|
139
|
-
color="fg.onEmphasis"
|
140
139
|
muted={true}
|
141
140
|
/>
|
142
141
|
`;
|
@@ -41,6 +41,7 @@ exports[`Button renders consistently 1`] = `
|
|
41
41
|
}
|
42
42
|
|
43
43
|
.c0:disabled {
|
44
|
+
cursor: default;
|
44
45
|
color: #8c959f;
|
45
46
|
background-color: btn.disabledBg;
|
46
47
|
}
|
@@ -83,6 +84,7 @@ exports[`Button renders consistently 1`] = `
|
|
83
84
|
>
|
84
85
|
<span
|
85
86
|
data-component="text"
|
87
|
+
hidden={false}
|
86
88
|
/>
|
87
89
|
</button>
|
88
90
|
`;
|
@@ -128,6 +130,7 @@ exports[`Button respects the "disabled" prop 1`] = `
|
|
128
130
|
}
|
129
131
|
|
130
132
|
.c0:disabled {
|
133
|
+
cursor: default;
|
131
134
|
color: #8c959f;
|
132
135
|
background-color: btn.disabledBg;
|
133
136
|
}
|
@@ -171,6 +174,7 @@ exports[`Button respects the "disabled" prop 1`] = `
|
|
171
174
|
>
|
172
175
|
<span
|
173
176
|
data-component="text"
|
177
|
+
hidden={false}
|
174
178
|
>
|
175
179
|
Disabled
|
176
180
|
</span>
|
@@ -222,6 +226,7 @@ exports[`Button styles icon only button to make it a square 1`] = `
|
|
222
226
|
}
|
223
227
|
|
224
228
|
.c0:disabled {
|
229
|
+
cursor: default;
|
225
230
|
color: #8c959f;
|
226
231
|
background-color: btn.disabledBg;
|
227
232
|
}
|
@@ -318,8 +318,8 @@ export function GroupsStory(): JSX.Element {
|
|
318
318
|
<>
|
319
319
|
<h1>Groups</h1>
|
320
320
|
<ErsatzOverlay>
|
321
|
-
<ActionList selectionVariant="multiple" showDividers
|
322
|
-
<ActionList.Group title="Suggestions" variant="filled">
|
321
|
+
<ActionList selectionVariant="multiple" showDividers aria-label="Select reviewers">
|
322
|
+
<ActionList.Group title="Suggestions" variant="filled" role="listbox">
|
323
323
|
{users.slice(0, 2).map(user => (
|
324
324
|
<ActionList.Item
|
325
325
|
key={user.login}
|
@@ -336,7 +336,7 @@ export function GroupsStory(): JSX.Element {
|
|
336
336
|
</ActionList.Item>
|
337
337
|
))}
|
338
338
|
</ActionList.Group>
|
339
|
-
<ActionList.Group title="Everyone" variant="filled">
|
339
|
+
<ActionList.Group title="Everyone" variant="filled" role="listbox">
|
340
340
|
{users.slice(2).map(user => (
|
341
341
|
<ActionList.Item
|
342
342
|
role="option"
|
@@ -98,10 +98,7 @@ export function SimpleListStory(): JSX.Element {
|
|
98
98
|
onAction={onAction}
|
99
99
|
anchorContent="Menu"
|
100
100
|
overlayProps={{
|
101
|
-
'data-test-id': 'some_test_id'
|
102
|
-
onMouseDown: (e: React.MouseEvent) =>
|
103
|
-
// eslint-disable-next-line no-console
|
104
|
-
console.log('onMouseDown in the internal Overlay can be useful for controlling event interactions', e)
|
101
|
+
'data-test-id': 'some_test_id'
|
105
102
|
}}
|
106
103
|
items={[
|
107
104
|
{text: 'New file', trailingText: '⌘O', disabled: true, leadingVisual: ProjectIcon},
|
@@ -64,16 +64,16 @@ export const ShorthandHook = () => {
|
|
64
64
|
)
|
65
65
|
return (
|
66
66
|
<Box display="flex" flexDirection="column" alignItems="flex-start">
|
67
|
-
<Button
|
67
|
+
<Button onClick={onButtonClick} sx={{mb: 2}}>
|
68
68
|
Turn me green!
|
69
69
|
</Button>
|
70
|
-
<Button
|
70
|
+
<Button onClick={onButtonClick} sx={{mb: 2}}>
|
71
71
|
Turn me green!
|
72
72
|
</Button>
|
73
|
-
<Button
|
73
|
+
<Button onClick={onButtonClick} sx={{mb: 2}}>
|
74
74
|
Turn me green!
|
75
75
|
</Button>
|
76
|
-
<Button
|
76
|
+
<Button onClick={onButtonClick} sx={{mb: 2}}>
|
77
77
|
Turn me green!
|
78
78
|
</Button>
|
79
79
|
</Box>
|
@@ -160,11 +160,11 @@ function CustomHeader({
|
|
160
160
|
return null
|
161
161
|
}
|
162
162
|
function CustomBody({children}: React.PropsWithChildren<DialogProps>) {
|
163
|
-
return <Dialog.Body bg
|
163
|
+
return <Dialog.Body sx={{bg: 'danger.subtle'}}>{children}</Dialog.Body>
|
164
164
|
}
|
165
165
|
function CustomFooter({footerButtons}: React.PropsWithChildren<DialogProps>) {
|
166
166
|
return (
|
167
|
-
<Dialog.Footer bg
|
167
|
+
<Dialog.Footer sx={{bg: 'attention.subtle'}}>
|
168
168
|
{footerButtons ? <Dialog.Buttons buttons={footerButtons} /> : null}
|
169
169
|
</Dialog.Footer>
|
170
170
|
)
|
@@ -165,7 +165,7 @@ export const CustomInitialFocus = () => {
|
|
165
165
|
<>
|
166
166
|
<HelperGlobalStyling />
|
167
167
|
<Box display="flex" flexDirection="column" alignItems="flex-start">
|
168
|
-
<Flash
|
168
|
+
<Flash sx={{mb: 3}}>
|
169
169
|
This story is the same as the `Focus Trap` story, except, when the trap zone is activated, the
|
170
170
|
“Elderberry” button will receive the initial focus (if the trap zone container does not already
|
171
171
|
have focus).
|
@@ -302,7 +302,7 @@ export const MultipleFocusTraps = () => {
|
|
302
302
|
<>
|
303
303
|
<HelperGlobalStyling />
|
304
304
|
<Box display="flex" flexDirection="column" alignItems="flex-start">
|
305
|
-
<Flash
|
305
|
+
<Flash sx={{mb: 3}}>
|
306
306
|
This story demonstrates the global nature of focus traps. When a focus trap is enabled, if there is already an
|
307
307
|
active focus trap, it becomes suspended and pushed onto a stack. Once the newly-active focus trap is disabled,
|
308
308
|
the most recently-suspended trap will reactivate. Suspended focus traps can be disabled, causing them to be
|
@@ -58,7 +58,7 @@ export const BasicFocusZone = () => {
|
|
58
58
|
<Box position="absolute" right={5} top={2}>
|
59
59
|
Last key pressed: {lastKey}
|
60
60
|
</Box>
|
61
|
-
<ToggleButton
|
61
|
+
<ToggleButton onClick={toggleFz} sx={{mb: 3}}>
|
62
62
|
{fzEnabled ? 'Disable' : 'Enable'} Focus Zone
|
63
63
|
</ToggleButton>
|
64
64
|
<MarginButton>Apple</MarginButton>
|
@@ -396,7 +396,7 @@ export const SpecialSituations = () => {
|
|
396
396
|
<>
|
397
397
|
<HelperGlobalStyling />
|
398
398
|
<Box display="flex" flexDirection="column" alignItems="flex-start" onKeyDownCapture={reportKey}>
|
399
|
-
<Flash
|
399
|
+
<Flash sx={{mb: 3}}>
|
400
400
|
This story is very esoteric! It only exists to show some of the nuance of the arrow key focus behavior in
|
401
401
|
different situations. Focus treatment within your component should be evaluated for your particular UX using
|
402
402
|
the <a href="https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard">ARIA guidelines</a>.
|
@@ -491,7 +491,7 @@ export const ChangingSubtree = () => {
|
|
491
491
|
<>
|
492
492
|
<HelperGlobalStyling />
|
493
493
|
<Box display="flex" flexDirection="column" alignItems="flex-start" onKeyDownCapture={reportKey}>
|
494
|
-
<Flash
|
494
|
+
<Flash sx={{mb: 3}}>
|
495
495
|
This story demonstrates that focusZone is consistent even when the container’s subtree changes.
|
496
496
|
</Flash>
|
497
497
|
<Box position="absolute" right={5} top={2}>
|
@@ -620,7 +620,7 @@ export const ActiveDescendant = () => {
|
|
620
620
|
<>
|
621
621
|
<HelperGlobalStyling />
|
622
622
|
<Box display="flex" flexDirection="column" alignItems="flex-start" onKeyDownCapture={reportKey}>
|
623
|
-
<Flash
|
623
|
+
<Flash sx={{mb: 3}}>
|
624
624
|
This story demonstrates using the `aria-activedescendant` pattern for managing both a focused element and an
|
625
625
|
active element. Below, you can focus the input box then use the up/down arrow keys to change the active
|
626
626
|
descendant (dark blue outline).
|