@primer/components 0.0.0-2021983515 → 0.0.0-2022530194733
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/CHANGELOG.md +105 -492
- package/README.md +16 -16
- package/codemods/lib/modifyProps.js +7 -9
- package/codemods/lib/prettify.js +1 -1
- package/codemods/lib/replaceImportSource.js +5 -5
- package/dist/browser.esm.js +889 -1279
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +839 -1234
- package/dist/browser.umd.js.map +1 -1
- package/index.d.ts +940 -0
- package/lib/AvatarPair.js +5 -6
- package/lib/AvatarStack.js +10 -10
- package/lib/BaseStyles.js +19 -18
- package/lib/BorderBox.js +5 -4
- package/lib/Box.js +2 -2
- package/lib/BranchName.js +1 -1
- package/lib/{Breadcrumbs.js → Breadcrumb.js} +23 -33
- package/lib/Button/Button.js +3 -3
- package/lib/Button/ButtonClose.js +4 -4
- package/lib/Button/ButtonDanger.js +2 -2
- package/lib/Button/ButtonInvisible.js +3 -3
- package/lib/Button/ButtonOutline.js +2 -2
- package/lib/Button/ButtonPrimary.js +2 -2
- package/lib/Button/ButtonTableList.js +1 -1
- package/lib/CircleBadge.js +1 -1
- package/lib/CircleOcticon.js +7 -9
- package/lib/CounterLabel.js +2 -2
- package/lib/Dialog.js +14 -13
- package/lib/Dropdown.js +2 -2
- package/lib/DropdownStyles.js +6 -6
- package/lib/FilterList.js +1 -1
- package/lib/Flash.js +1 -1
- package/lib/Flex.js +0 -3
- package/lib/Grid.js +3 -4
- package/lib/Header.js +2 -3
- package/lib/Label.js +4 -4
- package/lib/Link.js +12 -1
- package/lib/Overlay.js +36 -126
- package/lib/Pagehead.js +1 -1
- package/lib/Pagination/Pagination.js +2 -3
- package/lib/Popover.js +3 -3
- package/lib/Portal/Portal.js +12 -20
- package/lib/Position.js +27 -46
- package/lib/ProgressBar.js +1 -1
- package/lib/SelectMenu/SelectMenu.js +4 -4
- package/lib/SelectMenu/SelectMenuContext.js +1 -1
- package/lib/SelectMenu/SelectMenuDivider.js +3 -3
- package/lib/SelectMenu/SelectMenuFilter.js +6 -6
- package/lib/SelectMenu/SelectMenuFooter.js +3 -3
- package/lib/SelectMenu/SelectMenuHeader.js +2 -2
- package/lib/SelectMenu/SelectMenuItem.js +4 -4
- package/lib/SelectMenu/SelectMenuList.js +3 -3
- package/lib/SelectMenu/SelectMenuLoadingAnimation.js +15 -4
- package/lib/SelectMenu/SelectMenuModal.js +7 -7
- package/lib/SelectMenu/SelectMenuTab.js +3 -3
- package/lib/SelectMenu/SelectMenuTabPanel.js +3 -3
- package/lib/SelectMenu/SelectMenuTabs.js +2 -2
- package/lib/SelectMenu/hooks/useKeyboardNav.js +0 -2
- package/lib/SideNav.js +12 -20
- package/lib/StateLabel.js +4 -4
- package/lib/SubNav.js +3 -5
- package/lib/TabNav.js +3 -3
- package/lib/TextInput.js +59 -22
- package/lib/ThemeProvider.js +15 -32
- package/lib/Timeline.js +29 -24
- package/lib/Tooltip.js +1 -2
- package/lib/UnderlineNav.js +2 -2
- package/lib/behaviors/anchoredPosition.js +9 -17
- package/lib/behaviors/focusTrap.js +14 -32
- package/lib/behaviors/focusZone.js +148 -218
- package/lib/constants.js +2 -3
- package/lib/hooks/index.js +1 -9
- package/lib/hooks/useAnchoredPosition.js +4 -11
- package/lib/hooks/useDialog.js +1 -1
- package/lib/hooks/useFocusTrap.js +8 -26
- package/lib/hooks/useFocusZone.js +7 -7
- package/lib/hooks/useMouseIntent.js +58 -0
- package/lib/hooks/useOnEscapePress.js +10 -53
- package/lib/hooks/useOnOutsideClick.js +35 -62
- package/lib/hooks/useOpenAndCloseFocus.js +3 -8
- package/lib/hooks/useOverlay.js +19 -9
- package/lib/hooks/useSafeTimeout.js +0 -1
- package/lib/index.js +12 -112
- package/lib/polyfills/eventListenerSignal.js +1 -6
- package/lib/stories/Button.stories.js +114 -0
- package/lib/stories/Overlay.stories.js +102 -0
- package/lib/stories/Portal.stories.js +108 -0
- package/lib/stories/ThemeProvider.stories.js +95 -0
- package/lib/stories/useAnchoredPosition.stories.js +349 -0
- package/lib/stories/useFocusTrap.stories.js +278 -0
- package/lib/stories/useFocusZone.stories.js +490 -0
- package/lib/theme-preval.js +2057 -5148
- package/lib/utils/deprecate.js +2 -3
- package/lib/utils/isNumeric.js +0 -1
- package/lib/utils/iterateFocusableElements.js +1 -1
- package/lib/utils/test-deprecations.js +0 -1
- package/lib/utils/test-matchers.js +12 -3
- package/lib/utils/testing.js +4 -4
- package/lib/utils/theme.js +1 -1
- package/lib/utils/{types/AriaRole.js → types.js} +0 -0
- package/lib/utils/uniqueId.js +0 -1
- package/lib-esm/AvatarPair.js +5 -6
- package/lib-esm/AvatarStack.js +11 -11
- package/lib-esm/BaseStyles.js +16 -16
- package/lib-esm/BorderBox.js +3 -5
- package/lib-esm/Box.js +2 -2
- package/lib-esm/BranchName.js +1 -1
- package/lib-esm/{Breadcrumbs.js → Breadcrumb.js} +22 -32
- package/lib-esm/Button/Button.js +1 -1
- package/lib-esm/Button/ButtonClose.js +2 -2
- package/lib-esm/Button/ButtonInvisible.js +1 -1
- package/lib-esm/Button/ButtonTableList.js +1 -1
- package/lib-esm/CircleBadge.js +1 -1
- package/lib-esm/CircleOcticon.js +6 -9
- package/lib-esm/CounterLabel.js +2 -2
- package/lib-esm/Dialog.js +12 -10
- package/lib-esm/Dropdown.js +2 -2
- package/lib-esm/DropdownStyles.js +6 -6
- package/lib-esm/FilterList.js +1 -1
- package/lib-esm/Flash.js +1 -1
- package/lib-esm/Flex.js +0 -4
- package/lib-esm/Grid.js +2 -5
- package/lib-esm/Header.js +0 -1
- package/lib-esm/Label.js +2 -2
- package/lib-esm/Link.js +12 -1
- package/lib-esm/Overlay.js +38 -119
- package/lib-esm/Pagehead.js +1 -1
- package/lib-esm/Pagination/Pagination.js +2 -3
- package/lib-esm/Popover.js +3 -3
- package/lib-esm/Portal/Portal.js +12 -19
- package/lib-esm/Portal/index.js +1 -1
- package/lib-esm/Position.js +20 -45
- package/lib-esm/ProgressBar.js +1 -1
- package/lib-esm/SelectMenu/SelectMenu.js +3 -3
- package/lib-esm/SelectMenu/SelectMenuContext.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuDivider.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuFilter.js +4 -4
- package/lib-esm/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuHeader.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuItem.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuList.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.js +10 -5
- package/lib-esm/SelectMenu/SelectMenuModal.js +5 -5
- package/lib-esm/SelectMenu/SelectMenuTab.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib-esm/SelectMenu/hooks/useKeyboardNav.js +0 -2
- package/lib-esm/SideNav.js +7 -16
- package/lib-esm/StateLabel.js +4 -4
- package/lib-esm/SubNav.js +4 -7
- package/lib-esm/TabNav.js +4 -5
- package/lib-esm/TextInput.js +49 -22
- package/lib-esm/ThemeProvider.js +16 -31
- package/lib-esm/Timeline.js +24 -19
- package/lib-esm/Tooltip.js +1 -2
- package/lib-esm/UnderlineNav.js +3 -4
- package/lib-esm/behaviors/anchoredPosition.js +9 -17
- package/lib-esm/behaviors/focusTrap.js +14 -32
- package/lib-esm/behaviors/focusZone.js +148 -213
- package/lib-esm/constants.js +1 -2
- package/lib-esm/hooks/index.js +1 -2
- package/lib-esm/hooks/useAnchoredPosition.js +5 -10
- package/lib-esm/hooks/useDialog.js +1 -1
- package/lib-esm/hooks/useFocusTrap.js +8 -25
- package/lib-esm/hooks/useFocusZone.js +5 -5
- package/lib-esm/hooks/useMouseIntent.js +50 -0
- package/lib-esm/hooks/useOnEscapePress.js +10 -53
- package/lib-esm/hooks/useOnOutsideClick.js +37 -62
- package/lib-esm/hooks/useOpenAndCloseFocus.js +3 -8
- package/lib-esm/hooks/useOverlay.js +18 -9
- package/lib-esm/hooks/useSafeTimeout.js +0 -1
- package/lib-esm/index.js +10 -22
- package/lib-esm/polyfills/eventListenerSignal.js +1 -6
- package/lib-esm/stories/Button.stories.js +79 -0
- package/lib-esm/stories/Overlay.stories.js +80 -0
- package/lib-esm/stories/Portal.stories.js +72 -0
- package/lib-esm/stories/ThemeProvider.stories.js +76 -0
- package/lib-esm/stories/useAnchoredPosition.stories.js +311 -0
- package/lib-esm/stories/useFocusTrap.stories.js +234 -0
- package/lib-esm/stories/useFocusZone.stories.js +445 -0
- package/lib-esm/theme-preval.js +2057 -5148
- package/lib-esm/utils/deprecate.js +2 -3
- package/lib-esm/utils/isNumeric.js +0 -1
- package/lib-esm/utils/iterateFocusableElements.js +1 -1
- package/lib-esm/utils/test-deprecations.js +1 -1
- package/lib-esm/utils/test-matchers.js +11 -3
- package/lib-esm/utils/testing.js +6 -6
- package/lib-esm/utils/theme.js +1 -1
- package/lib-esm/utils/{test-helpers.d.ts → types.js} +0 -0
- package/lib-esm/utils/uniqueId.js +0 -1
- package/package.json +95 -103
- package/codemods/__tests__/deprecateUtilityComponents.js +0 -200
- package/codemods/__tests__/removeSystemProps.js +0 -225
- package/codemods/deprecateUtilityComponents.js +0 -111
- package/codemods/removeSystemProps.js +0 -312
- package/lib/ActionList/Divider.d.ts +0 -9
- package/lib/ActionList/Divider.js +0 -40
- package/lib/ActionList/Group.d.ts +0 -28
- package/lib/ActionList/Group.js +0 -35
- package/lib/ActionList/Header.d.ts +0 -29
- package/lib/ActionList/Header.js +0 -51
- package/lib/ActionList/Item.d.ts +0 -92
- package/lib/ActionList/Item.js +0 -288
- package/lib/ActionList/List.d.ts +0 -88
- package/lib/ActionList/List.js +0 -199
- package/lib/ActionList/index.d.ts +0 -17
- package/lib/ActionList/index.js +0 -29
- package/lib/ActionMenu.d.ts +0 -40
- package/lib/ActionMenu.js +0 -103
- package/lib/AnchoredOverlay/AnchoredOverlay.d.ts +0 -62
- package/lib/AnchoredOverlay/AnchoredOverlay.js +0 -124
- package/lib/AnchoredOverlay/index.d.ts +0 -2
- package/lib/AnchoredOverlay/index.js +0 -13
- package/lib/Autocomplete/Autocomplete.d.ts +0 -40
- package/lib/Autocomplete/Autocomplete.js +0 -68
- package/lib/Autocomplete/AutocompleteContext.d.ts +0 -17
- package/lib/Autocomplete/AutocompleteContext.js +0 -11
- package/lib/Autocomplete/AutocompleteInput.d.ts +0 -9
- package/lib/Autocomplete/AutocompleteInput.js +0 -150
- package/lib/Autocomplete/AutocompleteMenu.d.ts +0 -71
- package/lib/Autocomplete/AutocompleteMenu.js +0 -223
- package/lib/Autocomplete/AutocompleteOverlay.d.ts +0 -17
- package/lib/Autocomplete/AutocompleteOverlay.js +0 -69
- package/lib/Autocomplete/index.d.ts +0 -2
- package/lib/Autocomplete/index.js +0 -15
- package/lib/Avatar.d.ts +0 -15
- package/lib/AvatarPair.d.ts +0 -8
- package/lib/AvatarStack.d.ts +0 -8
- package/lib/BaseStyles.d.ts +0 -14
- package/lib/BorderBox.d.ts +0 -7
- package/lib/Box.d.ts +0 -6
- package/lib/BranchName.d.ts +0 -6
- package/lib/Breadcrumbs.d.ts +0 -40
- package/lib/Button/Button.d.ts +0 -284
- package/lib/Button/ButtonBase.d.ts +0 -12
- package/lib/Button/ButtonClose.d.ts +0 -321
- package/lib/Button/ButtonDanger.d.ts +0 -284
- package/lib/Button/ButtonGroup.d.ts +0 -4
- package/lib/Button/ButtonInvisible.d.ts +0 -284
- package/lib/Button/ButtonOutline.d.ts +0 -284
- package/lib/Button/ButtonPrimary.d.ts +0 -284
- package/lib/Button/ButtonStyles.d.ts +0 -2
- package/lib/Button/ButtonTableList.d.ts +0 -6
- package/lib/Button/index.d.ts +0 -16
- package/lib/Caret.d.ts +0 -21
- package/lib/CircleBadge.d.ts +0 -25
- package/lib/CircleOcticon.d.ts +0 -391
- package/lib/CounterLabel.d.ts +0 -8
- package/lib/Details.d.ts +0 -6
- package/lib/Dialog/ConfirmationDialog.d.ts +0 -44
- package/lib/Dialog/ConfirmationDialog.js +0 -191
- package/lib/Dialog/Dialog.d.ts +0 -167
- package/lib/Dialog/Dialog.js +0 -304
- package/lib/Dialog.d.ts +0 -406
- package/lib/Dropdown.d.ts +0 -1262
- package/lib/DropdownMenu/DropdownButton.d.ts +0 -323
- package/lib/DropdownMenu/DropdownButton.js +0 -31
- package/lib/DropdownMenu/DropdownMenu.d.ts +0 -43
- package/lib/DropdownMenu/DropdownMenu.js +0 -94
- package/lib/DropdownMenu/index.d.ts +0 -4
- package/lib/DropdownMenu/index.js +0 -21
- package/lib/DropdownStyles.d.ts +0 -3
- package/lib/FilterList.d.ts +0 -321
- package/lib/FilteredActionList/FilteredActionList.d.ts +0 -16
- package/lib/FilteredActionList/FilteredActionList.js +0 -137
- package/lib/FilteredActionList/index.d.ts +0 -2
- package/lib/FilteredActionList/index.js +0 -13
- package/lib/FilteredSearch.d.ts +0 -6
- package/lib/Flash.d.ts +0 -9
- package/lib/Flex.d.ts +0 -7
- package/lib/FormGroup.d.ts +0 -12
- package/lib/Grid.d.ts +0 -7
- package/lib/Header.d.ts +0 -24
- package/lib/Heading.d.ts +0 -6
- package/lib/Label.d.ts +0 -11
- package/lib/LabelGroup.d.ts +0 -6
- package/lib/Link.d.ts +0 -10
- package/lib/Overlay.d.ts +0 -63
- package/lib/Pagehead.d.ts +0 -6
- package/lib/Pagination/Pagination.d.ts +0 -24
- package/lib/Pagination/index.d.ts +0 -3
- package/lib/Pagination/model.d.ts +0 -26
- package/lib/PointerBox.d.ts +0 -11
- package/lib/Popover.d.ts +0 -21
- package/lib/Portal/Portal.d.ts +0 -25
- package/lib/Portal/index.d.ts +0 -4
- package/lib/Position.d.ts +0 -34
- package/lib/ProgressBar.d.ts +0 -21
- package/lib/SelectMenu/SelectMenu.d.ts +0 -1832
- package/lib/SelectMenu/SelectMenuContext.d.ts +0 -8
- package/lib/SelectMenu/SelectMenuDivider.d.ts +0 -6
- package/lib/SelectMenu/SelectMenuFilter.d.ts +0 -9
- package/lib/SelectMenu/SelectMenuFooter.d.ts +0 -6
- package/lib/SelectMenu/SelectMenuHeader.d.ts +0 -11
- package/lib/SelectMenu/SelectMenuItem.d.ts +0 -15
- package/lib/SelectMenu/SelectMenuList.d.ts +0 -6
- package/lib/SelectMenu/SelectMenuLoadingAnimation.d.ts +0 -7
- package/lib/SelectMenu/SelectMenuModal.d.ts +0 -15
- package/lib/SelectMenu/SelectMenuTab.d.ts +0 -14
- package/lib/SelectMenu/SelectMenuTabPanel.d.ts +0 -13
- package/lib/SelectMenu/SelectMenuTabs.d.ts +0 -11
- package/lib/SelectMenu/hooks/useKeyboardNav.d.ts +0 -2
- package/lib/SelectMenu/index.d.ts +0 -2
- package/lib/SelectPanel/SelectPanel.d.ts +0 -25
- package/lib/SelectPanel/SelectPanel.js +0 -147
- package/lib/SelectPanel/index.d.ts +0 -2
- package/lib/SelectPanel/index.js +0 -13
- package/lib/SideNav.d.ts +0 -31
- package/lib/Spinner.d.ts +0 -17
- package/lib/Spinner.js +0 -60
- package/lib/StateLabel.d.ts +0 -16
- package/lib/StyledOcticon.d.ts +0 -12
- package/lib/SubNav.d.ts +0 -32
- package/lib/TabNav.d.ts +0 -20
- package/lib/Text.d.ts +0 -6
- package/lib/TextInput.d.ts +0 -14
- package/lib/TextInputWithTokens.d.ts +0 -323
- package/lib/TextInputWithTokens.js +0 -244
- package/lib/ThemeProvider.d.ts +0 -26
- package/lib/Timeline.d.ts +0 -407
- package/lib/Token/IssueLabelToken.d.ts +0 -14
- package/lib/Token/IssueLabelToken.js +0 -144
- package/lib/Token/ProfileToken.d.ts +0 -7
- package/lib/Token/ProfileToken.js +0 -53
- package/lib/Token/Token.d.ts +0 -15
- package/lib/Token/Token.js +0 -94
- package/lib/Token/TokenBase.d.ts +0 -17
- package/lib/Token/TokenBase.js +0 -108
- package/lib/Token/_RemoveTokenButton.d.ts +0 -12
- package/lib/Token/_RemoveTokenButton.js +0 -77
- package/lib/Token/_TokenTextContainer.d.ts +0 -3
- package/lib/Token/_TokenTextContainer.js +0 -28
- package/lib/Token/index.d.ts +0 -3
- package/lib/Token/index.js +0 -31
- package/lib/Tooltip.d.ts +0 -18
- package/lib/Truncate.d.ts +0 -11
- package/lib/UnderlineNav.d.ts +0 -25
- package/lib/_TextInputWrapper.d.ts +0 -10
- package/lib/_TextInputWrapper.js +0 -51
- package/lib/_UnstyledTextInput.d.ts +0 -2
- package/lib/_UnstyledTextInput.js +0 -20
- package/lib/behaviors/anchoredPosition.d.ts +0 -89
- package/lib/behaviors/focusTrap.d.ts +0 -12
- package/lib/behaviors/focusZone.d.ts +0 -137
- package/lib/constants.d.ts +0 -20
- package/lib/hooks/index.d.ts +0 -11
- package/lib/hooks/useAnchoredPosition.d.ts +0 -20
- package/lib/hooks/useCombinedRefs.d.ts +0 -10
- package/lib/hooks/useCombinedRefs.js +0 -49
- package/lib/hooks/useDetails.d.ts +0 -17
- package/lib/hooks/useDialog.d.ts +0 -16
- package/lib/hooks/useFocusTrap.d.ts +0 -32
- package/lib/hooks/useFocusZone.d.ts +0 -23
- package/lib/hooks/useOnEscapePress.d.ts +0 -23
- package/lib/hooks/useOnOutsideClick.d.ts +0 -8
- package/lib/hooks/useOpenAndCloseFocus.d.ts +0 -8
- package/lib/hooks/useOverlay.d.ts +0 -15
- package/lib/hooks/useProvidedRefOrCreate.d.ts +0 -10
- package/lib/hooks/useProvidedStateOrCreate.d.ts +0 -10
- package/lib/hooks/useProvidedStateOrCreate.js +0 -27
- package/lib/hooks/useRenderForcingRef.d.ts +0 -8
- package/lib/hooks/useRenderForcingRef.js +0 -25
- package/lib/hooks/useResizeObserver.d.ts +0 -1
- package/lib/hooks/useResizeObserver.js +0 -20
- package/lib/hooks/useSafeTimeout.d.ts +0 -12
- package/lib/hooks/useScrollFlash.d.ts +0 -6
- package/lib/hooks/useScrollFlash.js +0 -29
- package/lib/index.d.ts +0 -114
- package/lib/polyfills/eventListenerSignal.d.ts +0 -6
- package/lib/sx.d.ts +0 -6
- package/lib/theme-preval.d.ts +0 -49
- package/lib/theme.d.ts +0 -2
- package/lib/utils/deprecate.d.ts +0 -18
- package/lib/utils/isNumeric.d.ts +0 -1
- package/lib/utils/iterateFocusableElements.d.ts +0 -42
- package/lib/utils/scrollIntoViewingArea.d.ts +0 -1
- package/lib/utils/scrollIntoViewingArea.js +0 -39
- package/lib/utils/ssr.d.ts +0 -1
- package/lib/utils/ssr.js +0 -19
- package/lib/utils/test-deprecations.d.ts +0 -1
- package/lib/utils/test-helpers.d.ts +0 -0
- package/lib/utils/test-helpers.js +0 -9
- package/lib/utils/test-matchers.d.ts +0 -1
- package/lib/utils/testing.d.ts +0 -1028
- package/lib/utils/theme.d.ts +0 -9
- package/lib/utils/types/AriaRole.d.ts +0 -4
- package/lib/utils/types/ComponentProps.d.ts +0 -9
- package/lib/utils/types/ComponentProps.js +0 -1
- package/lib/utils/types/Flatten.d.ts +0 -4
- package/lib/utils/types/Flatten.js +0 -1
- package/lib/utils/types/Merge.d.ts +0 -19
- package/lib/utils/types/Merge.js +0 -1
- package/lib/utils/types/index.d.ts +0 -4
- package/lib/utils/types/index.js +0 -57
- package/lib/utils/uniqueId.d.ts +0 -1
- package/lib/utils/userAgent.d.ts +0 -1
- package/lib-esm/ActionList/Divider.d.ts +0 -9
- package/lib-esm/ActionList/Divider.js +0 -23
- package/lib-esm/ActionList/Group.d.ts +0 -28
- package/lib-esm/ActionList/Group.js +0 -24
- package/lib-esm/ActionList/Header.d.ts +0 -29
- package/lib-esm/ActionList/Header.js +0 -33
- package/lib-esm/ActionList/Item.d.ts +0 -92
- package/lib-esm/ActionList/Item.js +0 -253
- package/lib-esm/ActionList/List.d.ts +0 -88
- package/lib-esm/ActionList/List.js +0 -181
- package/lib-esm/ActionList/index.d.ts +0 -17
- package/lib-esm/ActionList/index.js +0 -18
- package/lib-esm/ActionMenu.d.ts +0 -40
- package/lib-esm/ActionMenu.js +0 -82
- package/lib-esm/AnchoredOverlay/AnchoredOverlay.d.ts +0 -62
- package/lib-esm/AnchoredOverlay/AnchoredOverlay.js +0 -104
- package/lib-esm/AnchoredOverlay/index.d.ts +0 -2
- package/lib-esm/AnchoredOverlay/index.js +0 -1
- package/lib-esm/Autocomplete/Autocomplete.d.ts +0 -40
- package/lib-esm/Autocomplete/Autocomplete.js +0 -47
- package/lib-esm/Autocomplete/AutocompleteContext.d.ts +0 -17
- package/lib-esm/Autocomplete/AutocompleteContext.js +0 -2
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +0 -9
- package/lib-esm/Autocomplete/AutocompleteInput.js +0 -131
- package/lib-esm/Autocomplete/AutocompleteMenu.d.ts +0 -71
- package/lib-esm/Autocomplete/AutocompleteMenu.js +0 -204
- package/lib-esm/Autocomplete/AutocompleteOverlay.d.ts +0 -17
- package/lib-esm/Autocomplete/AutocompleteOverlay.js +0 -51
- package/lib-esm/Autocomplete/index.d.ts +0 -2
- package/lib-esm/Autocomplete/index.js +0 -1
- package/lib-esm/Avatar.d.ts +0 -15
- package/lib-esm/AvatarPair.d.ts +0 -8
- package/lib-esm/AvatarStack.d.ts +0 -8
- package/lib-esm/BaseStyles.d.ts +0 -14
- package/lib-esm/BorderBox.d.ts +0 -7
- package/lib-esm/Box.d.ts +0 -6
- package/lib-esm/BranchName.d.ts +0 -6
- package/lib-esm/Breadcrumbs.d.ts +0 -40
- package/lib-esm/Button/Button.d.ts +0 -284
- package/lib-esm/Button/ButtonBase.d.ts +0 -12
- package/lib-esm/Button/ButtonClose.d.ts +0 -321
- package/lib-esm/Button/ButtonDanger.d.ts +0 -284
- package/lib-esm/Button/ButtonGroup.d.ts +0 -4
- package/lib-esm/Button/ButtonInvisible.d.ts +0 -284
- package/lib-esm/Button/ButtonOutline.d.ts +0 -284
- package/lib-esm/Button/ButtonPrimary.d.ts +0 -284
- package/lib-esm/Button/ButtonStyles.d.ts +0 -2
- package/lib-esm/Button/ButtonTableList.d.ts +0 -6
- package/lib-esm/Button/index.d.ts +0 -16
- package/lib-esm/Caret.d.ts +0 -21
- package/lib-esm/CircleBadge.d.ts +0 -25
- package/lib-esm/CircleOcticon.d.ts +0 -391
- package/lib-esm/CounterLabel.d.ts +0 -8
- package/lib-esm/Details.d.ts +0 -6
- package/lib-esm/Dialog/ConfirmationDialog.d.ts +0 -44
- package/lib-esm/Dialog/ConfirmationDialog.js +0 -169
- package/lib-esm/Dialog/Dialog.d.ts +0 -167
- package/lib-esm/Dialog/Dialog.js +0 -274
- package/lib-esm/Dialog.d.ts +0 -406
- package/lib-esm/Dropdown.d.ts +0 -1262
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +0 -323
- package/lib-esm/DropdownMenu/DropdownButton.js +0 -16
- package/lib-esm/DropdownMenu/DropdownMenu.d.ts +0 -43
- package/lib-esm/DropdownMenu/DropdownMenu.js +0 -77
- package/lib-esm/DropdownMenu/index.d.ts +0 -4
- package/lib-esm/DropdownMenu/index.js +0 -2
- package/lib-esm/DropdownStyles.d.ts +0 -3
- package/lib-esm/FilterList.d.ts +0 -321
- package/lib-esm/FilteredActionList/FilteredActionList.d.ts +0 -16
- package/lib-esm/FilteredActionList/FilteredActionList.js +0 -109
- package/lib-esm/FilteredActionList/index.d.ts +0 -2
- package/lib-esm/FilteredActionList/index.js +0 -1
- package/lib-esm/FilteredSearch.d.ts +0 -6
- package/lib-esm/Flash.d.ts +0 -9
- package/lib-esm/Flex.d.ts +0 -7
- package/lib-esm/FormGroup.d.ts +0 -12
- package/lib-esm/Grid.d.ts +0 -7
- package/lib-esm/Header.d.ts +0 -24
- package/lib-esm/Heading.d.ts +0 -6
- package/lib-esm/Label.d.ts +0 -11
- package/lib-esm/LabelGroup.d.ts +0 -6
- package/lib-esm/Link.d.ts +0 -10
- package/lib-esm/Overlay.d.ts +0 -63
- package/lib-esm/Pagehead.d.ts +0 -6
- package/lib-esm/Pagination/Pagination.d.ts +0 -24
- package/lib-esm/Pagination/index.d.ts +0 -3
- package/lib-esm/Pagination/model.d.ts +0 -26
- package/lib-esm/PointerBox.d.ts +0 -11
- package/lib-esm/Popover.d.ts +0 -21
- package/lib-esm/Portal/Portal.d.ts +0 -25
- package/lib-esm/Portal/index.d.ts +0 -4
- package/lib-esm/Position.d.ts +0 -34
- package/lib-esm/ProgressBar.d.ts +0 -21
- package/lib-esm/SelectMenu/SelectMenu.d.ts +0 -1832
- package/lib-esm/SelectMenu/SelectMenuContext.d.ts +0 -8
- package/lib-esm/SelectMenu/SelectMenuDivider.d.ts +0 -6
- package/lib-esm/SelectMenu/SelectMenuFilter.d.ts +0 -9
- package/lib-esm/SelectMenu/SelectMenuFooter.d.ts +0 -6
- package/lib-esm/SelectMenu/SelectMenuHeader.d.ts +0 -11
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +0 -15
- package/lib-esm/SelectMenu/SelectMenuList.d.ts +0 -6
- package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.d.ts +0 -7
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +0 -15
- package/lib-esm/SelectMenu/SelectMenuTab.d.ts +0 -14
- package/lib-esm/SelectMenu/SelectMenuTabPanel.d.ts +0 -13
- package/lib-esm/SelectMenu/SelectMenuTabs.d.ts +0 -11
- package/lib-esm/SelectMenu/hooks/useKeyboardNav.d.ts +0 -2
- package/lib-esm/SelectMenu/index.d.ts +0 -2
- package/lib-esm/SelectPanel/SelectPanel.d.ts +0 -25
- package/lib-esm/SelectPanel/SelectPanel.js +0 -127
- package/lib-esm/SelectPanel/index.d.ts +0 -2
- package/lib-esm/SelectPanel/index.js +0 -1
- package/lib-esm/SideNav.d.ts +0 -31
- package/lib-esm/Spinner.d.ts +0 -17
- package/lib-esm/Spinner.js +0 -46
- package/lib-esm/StateLabel.d.ts +0 -16
- package/lib-esm/StyledOcticon.d.ts +0 -12
- package/lib-esm/SubNav.d.ts +0 -32
- package/lib-esm/TabNav.d.ts +0 -20
- package/lib-esm/Text.d.ts +0 -6
- package/lib-esm/TextInput.d.ts +0 -14
- package/lib-esm/TextInputWithTokens.d.ts +0 -323
- package/lib-esm/TextInputWithTokens.js +0 -219
- package/lib-esm/ThemeProvider.d.ts +0 -26
- package/lib-esm/Timeline.d.ts +0 -407
- package/lib-esm/Token/IssueLabelToken.d.ts +0 -14
- package/lib-esm/Token/IssueLabelToken.js +0 -124
- package/lib-esm/Token/ProfileToken.d.ts +0 -7
- package/lib-esm/Token/ProfileToken.js +0 -33
- package/lib-esm/Token/Token.d.ts +0 -15
- package/lib-esm/Token/Token.js +0 -73
- package/lib-esm/Token/TokenBase.d.ts +0 -17
- package/lib-esm/Token/TokenBase.js +0 -87
- package/lib-esm/Token/_RemoveTokenButton.d.ts +0 -12
- package/lib-esm/Token/_RemoveTokenButton.js +0 -60
- package/lib-esm/Token/_TokenTextContainer.d.ts +0 -3
- package/lib-esm/Token/_TokenTextContainer.js +0 -15
- package/lib-esm/Token/index.d.ts +0 -3
- package/lib-esm/Token/index.js +0 -3
- package/lib-esm/Tooltip.d.ts +0 -18
- package/lib-esm/Truncate.d.ts +0 -11
- package/lib-esm/UnderlineNav.d.ts +0 -25
- package/lib-esm/_TextInputWrapper.d.ts +0 -10
- package/lib-esm/_TextInputWrapper.js +0 -31
- package/lib-esm/_UnstyledTextInput.d.ts +0 -2
- package/lib-esm/_UnstyledTextInput.js +0 -7
- package/lib-esm/behaviors/anchoredPosition.d.ts +0 -89
- package/lib-esm/behaviors/focusTrap.d.ts +0 -12
- package/lib-esm/behaviors/focusZone.d.ts +0 -137
- package/lib-esm/constants.d.ts +0 -20
- package/lib-esm/hooks/index.d.ts +0 -11
- package/lib-esm/hooks/useAnchoredPosition.d.ts +0 -20
- package/lib-esm/hooks/useCombinedRefs.d.ts +0 -10
- package/lib-esm/hooks/useCombinedRefs.js +0 -36
- package/lib-esm/hooks/useDetails.d.ts +0 -17
- package/lib-esm/hooks/useDialog.d.ts +0 -16
- package/lib-esm/hooks/useFocusTrap.d.ts +0 -32
- package/lib-esm/hooks/useFocusZone.d.ts +0 -23
- package/lib-esm/hooks/useOnEscapePress.d.ts +0 -23
- package/lib-esm/hooks/useOnOutsideClick.d.ts +0 -8
- package/lib-esm/hooks/useOpenAndCloseFocus.d.ts +0 -8
- package/lib-esm/hooks/useOverlay.d.ts +0 -15
- package/lib-esm/hooks/useProvidedRefOrCreate.d.ts +0 -10
- package/lib-esm/hooks/useProvidedStateOrCreate.d.ts +0 -10
- package/lib-esm/hooks/useProvidedStateOrCreate.js +0 -20
- package/lib-esm/hooks/useRenderForcingRef.d.ts +0 -8
- package/lib-esm/hooks/useRenderForcingRef.js +0 -18
- package/lib-esm/hooks/useResizeObserver.d.ts +0 -1
- package/lib-esm/hooks/useResizeObserver.js +0 -10
- package/lib-esm/hooks/useSafeTimeout.d.ts +0 -12
- package/lib-esm/hooks/useScrollFlash.d.ts +0 -6
- package/lib-esm/hooks/useScrollFlash.js +0 -22
- package/lib-esm/index.d.ts +0 -114
- package/lib-esm/polyfills/eventListenerSignal.d.ts +0 -6
- package/lib-esm/sx.d.ts +0 -6
- package/lib-esm/theme-preval.d.ts +0 -49
- package/lib-esm/theme.d.ts +0 -2
- package/lib-esm/utils/deprecate.d.ts +0 -18
- package/lib-esm/utils/isNumeric.d.ts +0 -1
- package/lib-esm/utils/iterateFocusableElements.d.ts +0 -42
- package/lib-esm/utils/scrollIntoViewingArea.d.ts +0 -1
- package/lib-esm/utils/scrollIntoViewingArea.js +0 -30
- package/lib-esm/utils/ssr.d.ts +0 -1
- package/lib-esm/utils/ssr.js +0 -1
- package/lib-esm/utils/test-deprecations.d.ts +0 -1
- package/lib-esm/utils/test-helpers.js +0 -7
- package/lib-esm/utils/test-matchers.d.ts +0 -1
- package/lib-esm/utils/testing.d.ts +0 -1028
- package/lib-esm/utils/theme.d.ts +0 -9
- package/lib-esm/utils/types/AriaRole.d.ts +0 -4
- package/lib-esm/utils/types/AriaRole.js +0 -1
- package/lib-esm/utils/types/ComponentProps.d.ts +0 -9
- package/lib-esm/utils/types/ComponentProps.js +0 -1
- package/lib-esm/utils/types/Flatten.d.ts +0 -4
- package/lib-esm/utils/types/Flatten.js +0 -1
- package/lib-esm/utils/types/Merge.d.ts +0 -19
- package/lib-esm/utils/types/Merge.js +0 -1
- package/lib-esm/utils/types/index.d.ts +0 -4
- package/lib-esm/utils/types/index.js +0 -4
- package/lib-esm/utils/uniqueId.d.ts +0 -1
- package/lib-esm/utils/userAgent.d.ts +0 -1
@@ -1,15 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { TouchOrMouseEvent } from './useOnOutsideClick';
|
3
|
-
export declare type UseOverlaySettings = {
|
4
|
-
ignoreClickRefs?: React.RefObject<HTMLElement>[];
|
5
|
-
initialFocusRef?: React.RefObject<HTMLElement>;
|
6
|
-
returnFocusRef: React.RefObject<HTMLElement>;
|
7
|
-
onEscape: (e: KeyboardEvent) => void;
|
8
|
-
onClickOutside: (e: TouchOrMouseEvent) => void;
|
9
|
-
overlayRef?: React.RefObject<HTMLDivElement>;
|
10
|
-
preventFocusOnOpen?: boolean;
|
11
|
-
};
|
12
|
-
export declare type OverlayReturnProps = {
|
13
|
-
ref: React.RefObject<HTMLDivElement>;
|
14
|
-
};
|
15
|
-
export declare const useOverlay: ({ overlayRef: _overlayRef, returnFocusRef, initialFocusRef, onEscape, ignoreClickRefs, onClickOutside, preventFocusOnOpen }: UseOverlaySettings) => OverlayReturnProps;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
/**
|
3
|
-
* There are some situations where we only want to create a new ref if one is not provided to a component
|
4
|
-
* or hook as a prop. However, due to the `rules-of-hooks`, we cannot conditionally make a call to `React.useRef`
|
5
|
-
* only in the situations where the ref is not provided as a prop.
|
6
|
-
* This hook aims to encapsulate that logic, so the consumer doesn't need to be concerned with violating `rules-of-hooks`.
|
7
|
-
* @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
|
8
|
-
* @type TRef The type of the RefObject which should be created.
|
9
|
-
*/
|
10
|
-
export declare function useProvidedRefOrCreate<TRef>(providedRef?: React.RefObject<TRef>): React.RefObject<TRef>;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* There are some situations where we want to give users the option to control state externally with their own state handlers
|
3
|
-
* or default to using internal state handlers. Because of the 'rules-of-hooks', we cannot conditionally make a call to `React.useState`
|
4
|
-
* only in the situations where the state is not provided as a prop.
|
5
|
-
* This hook aims to encapsulate that logic, so the consumer doesn't need to be concerned with violating `rules-of-hooks`.
|
6
|
-
* @param externalState The state to use - if undefined, will use the state from a call to React.useState
|
7
|
-
* @param setExternalState The setState to use - if undefined, will use the setState from a call to React.useState
|
8
|
-
* @param defaultState The defaultState to use, if using internal state.
|
9
|
-
*/
|
10
|
-
export declare function useProvidedStateOrCreate<T>(externalState: T | undefined, setExternalState: ((s: T) => void) | undefined, defaultState: T): readonly [T, (s: T) => void];
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useProvidedStateOrCreate = useProvidedStateOrCreate;
|
7
|
-
|
8
|
-
var _react = require("react");
|
9
|
-
|
10
|
-
/**
|
11
|
-
* There are some situations where we want to give users the option to control state externally with their own state handlers
|
12
|
-
* or default to using internal state handlers. Because of the 'rules-of-hooks', we cannot conditionally make a call to `React.useState`
|
13
|
-
* only in the situations where the state is not provided as a prop.
|
14
|
-
* This hook aims to encapsulate that logic, so the consumer doesn't need to be concerned with violating `rules-of-hooks`.
|
15
|
-
* @param externalState The state to use - if undefined, will use the state from a call to React.useState
|
16
|
-
* @param setExternalState The setState to use - if undefined, will use the setState from a call to React.useState
|
17
|
-
* @param defaultState The defaultState to use, if using internal state.
|
18
|
-
*/
|
19
|
-
function useProvidedStateOrCreate(externalState, setExternalState, defaultState) {
|
20
|
-
const [internalState, setInternalState] = (0, _react.useState)(defaultState);
|
21
|
-
const state = externalState !== null && externalState !== void 0 ? externalState : internalState;
|
22
|
-
const setState = (0, _react.useCallback)(s => {
|
23
|
-
setInternalState(s);
|
24
|
-
if (setExternalState) setExternalState(s);
|
25
|
-
}, [setExternalState]);
|
26
|
-
return [state, setState];
|
27
|
-
}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { RefObject } from 'react';
|
2
|
-
/**
|
3
|
-
* There are certain situations where a ref might be set after the current render cycle for a
|
4
|
-
* component has finished. e.g. a forward ref from a conditionally rendered child component.
|
5
|
-
* In these situations, we need to force a re-render, which is done here by the useState hook.
|
6
|
-
* @type TRef The type of the RefObject which should be created.
|
7
|
-
*/
|
8
|
-
export declare function useRenderForcingRef<TRef>(): readonly [RefObject<TRef>, (newRef: TRef | null) => void];
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useRenderForcingRef = useRenderForcingRef;
|
7
|
-
|
8
|
-
var _react = require("react");
|
9
|
-
|
10
|
-
/**
|
11
|
-
* There are certain situations where a ref might be set after the current render cycle for a
|
12
|
-
* component has finished. e.g. a forward ref from a conditionally rendered child component.
|
13
|
-
* In these situations, we need to force a re-render, which is done here by the useState hook.
|
14
|
-
* @type TRef The type of the RefObject which should be created.
|
15
|
-
*/
|
16
|
-
function useRenderForcingRef() {
|
17
|
-
const [refCurrent, setRefCurrent] = (0, _react.useState)(null);
|
18
|
-
const ref = (0, _react.useRef)(null);
|
19
|
-
ref.current = refCurrent;
|
20
|
-
const setRef = (0, _react.useCallback)(newRef => {
|
21
|
-
ref.current = newRef;
|
22
|
-
setRefCurrent(newRef);
|
23
|
-
}, [ref]);
|
24
|
-
return [ref, setRef];
|
25
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function useResizeObserver(callback: () => void): void;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useResizeObserver = useResizeObserver;
|
7
|
-
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
9
|
-
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
|
-
function useResizeObserver(callback) {
|
13
|
-
_react.default.useLayoutEffect(() => {
|
14
|
-
const observer = new window.ResizeObserver(() => callback());
|
15
|
-
observer.observe(document.documentElement);
|
16
|
-
return () => {
|
17
|
-
observer.disconnect();
|
18
|
-
};
|
19
|
-
}, [callback]);
|
20
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
declare type SetTimeout = (handler: TimerHandler, timeout?: number, ...args: unknown[]) => number;
|
2
|
-
declare type ClearTimeout = (id: number) => void;
|
3
|
-
/**
|
4
|
-
* Safely call `setTimeout` and `clearTimeout` within a component.
|
5
|
-
*
|
6
|
-
* This hook ensures that all timeouts are cleared when the component unmounts.
|
7
|
-
*/
|
8
|
-
export default function useSafeTimeout(): {
|
9
|
-
safeSetTimeout: SetTimeout;
|
10
|
-
safeClearTimeout: ClearTimeout;
|
11
|
-
};
|
12
|
-
export {};
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
/**
|
3
|
-
* This hook will flash the scrollbars for a ref of a container that has scrollable overflow
|
4
|
-
* @param scrollContainerRef The ref of the scrollable content
|
5
|
-
*/
|
6
|
-
export default function useScrollFlash(scrollContainerRef: React.RefObject<HTMLElement>): void;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.default = useScrollFlash;
|
7
|
-
|
8
|
-
var _react = require("react");
|
9
|
-
|
10
|
-
/**
|
11
|
-
* This hook will flash the scrollbars for a ref of a container that has scrollable overflow
|
12
|
-
* @param scrollContainerRef The ref of the scrollable content
|
13
|
-
*/
|
14
|
-
function useScrollFlash(scrollContainerRef) {
|
15
|
-
// https://adxlv.computer/projects/flash-scrollers/
|
16
|
-
(0, _react.useEffect)(() => {
|
17
|
-
const scrollContainer = scrollContainerRef.current;
|
18
|
-
|
19
|
-
if (!scrollContainer) {
|
20
|
-
return;
|
21
|
-
}
|
22
|
-
|
23
|
-
const currentScroll = scrollContainer.scrollTop;
|
24
|
-
const maxScroll = scrollContainer.scrollHeight;
|
25
|
-
const altScroll = currentScroll < Math.min(1, maxScroll) ? currentScroll + 1 : currentScroll - 1;
|
26
|
-
scrollContainer.scrollTop = altScroll;
|
27
|
-
scrollContainer.scrollTop = currentScroll;
|
28
|
-
}, [scrollContainerRef]);
|
29
|
-
}
|
package/lib/index.d.ts
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
export { default as theme } from './theme';
|
2
|
-
export { get as themeGet } from './constants';
|
3
|
-
export { default as BaseStyles } from './BaseStyles';
|
4
|
-
export type { BaseStylesProps } from './BaseStyles';
|
5
|
-
export { default as ThemeProvider, useTheme, useColorSchemeVar } from './ThemeProvider';
|
6
|
-
export type { ThemeProviderProps } from './ThemeProvider';
|
7
|
-
export { default as BorderBox } from './BorderBox';
|
8
|
-
export type { BorderBoxProps } from './BorderBox';
|
9
|
-
export { default as Box } from './Box';
|
10
|
-
export type { BoxProps } from './Box';
|
11
|
-
export { default as Flex } from './Flex';
|
12
|
-
export type { FlexProps } from './Flex';
|
13
|
-
export { default as Grid } from './Grid';
|
14
|
-
export type { GridProps } from './Grid';
|
15
|
-
export { default as Position, Absolute, Fixed, Relative, Sticky } from './Position';
|
16
|
-
export type { PositionProps, AbsoluteProps, FixedProps, RelativeProps, StickyProps } from './Position';
|
17
|
-
export { default as useDetails } from './hooks/useDetails';
|
18
|
-
export { default as useSafeTimeout } from './hooks/useSafeTimeout';
|
19
|
-
export { useOnOutsideClick } from './hooks/useOnOutsideClick';
|
20
|
-
export { useOpenAndCloseFocus } from './hooks/useOpenAndCloseFocus';
|
21
|
-
export { useOnEscapePress } from './hooks/useOnEscapePress';
|
22
|
-
export { useOverlay } from './hooks/useOverlay';
|
23
|
-
export { useConfirm } from './Dialog/ConfirmationDialog';
|
24
|
-
export { ActionList } from './ActionList';
|
25
|
-
export { ActionMenu } from './ActionMenu';
|
26
|
-
export type { ActionMenuProps } from './ActionMenu';
|
27
|
-
export { default as Autocomplete } from './Autocomplete';
|
28
|
-
export { default as Avatar } from './Avatar';
|
29
|
-
export type { AvatarProps } from './Avatar';
|
30
|
-
export { default as AvatarPair } from './AvatarPair';
|
31
|
-
export type { AvatarPairProps } from './AvatarPair';
|
32
|
-
export { default as AvatarStack } from './AvatarStack';
|
33
|
-
export type { AvatarStackProps } from './AvatarStack';
|
34
|
-
export { default as BranchName } from './BranchName';
|
35
|
-
export type { BranchNameProps } from './BranchName';
|
36
|
-
export { default as Breadcrumbs, Breadcrumb } from './Breadcrumbs';
|
37
|
-
export type { BreadcrumbsProps, BreadcrumbsItemProps, BreadcrumbProps, BreadcrumbItemProps } from './Breadcrumbs';
|
38
|
-
export { default as Button, ButtonDanger, ButtonOutline, ButtonPrimary, ButtonInvisible, ButtonTableList, ButtonClose, ButtonGroup } from './Button';
|
39
|
-
export type { ButtonProps, ButtonDangerProps, ButtonOutlineProps, ButtonPrimaryProps, ButtonInvisibleProps, ButtonTableListProps, ButtonCloseProps, ButtonGroupProps } from './Button';
|
40
|
-
export { default as Caret } from './Caret';
|
41
|
-
export type { CaretProps } from './Caret';
|
42
|
-
export { default as CircleBadge } from './CircleBadge';
|
43
|
-
export type { CircleBadgeProps, CircleBadgeIconProps } from './CircleBadge';
|
44
|
-
export { default as CircleOcticon } from './CircleOcticon';
|
45
|
-
export type { CircleOcticonProps } from './CircleOcticon';
|
46
|
-
export { default as CounterLabel } from './CounterLabel';
|
47
|
-
export type { CounterLabelProps } from './CounterLabel';
|
48
|
-
export { default as Details } from './Details';
|
49
|
-
export type { DetailsProps } from './Details';
|
50
|
-
export { default as Dialog } from './Dialog';
|
51
|
-
export type { DialogProps, DialogHeaderProps } from './Dialog';
|
52
|
-
export { ConfirmationDialog } from './Dialog/ConfirmationDialog';
|
53
|
-
export { default as Dropdown } from './Dropdown';
|
54
|
-
export type { DropdownProps, DropdownCaretProps, DropdownButtonProps, DropdownItemProps, DropdownMenuProps } from './Dropdown';
|
55
|
-
export { DropdownButton, DropdownMenu } from './DropdownMenu';
|
56
|
-
export { default as FilteredSearch } from './FilteredSearch';
|
57
|
-
export type { FilteredSearchProps } from './FilteredSearch';
|
58
|
-
export { default as FilterList } from './FilterList';
|
59
|
-
export type { FilterListProps, FilterListItemProps } from './FilterList';
|
60
|
-
export { default as Flash } from './Flash';
|
61
|
-
export type { FlashProps } from './Flash';
|
62
|
-
export { default as FormGroup } from './FormGroup';
|
63
|
-
export type { FormGroupProps, FormGroupLabelProps } from './FormGroup';
|
64
|
-
export { default as Header } from './Header';
|
65
|
-
export type { HeaderProps, HeaderItemProps, HeaderLinkProps } from './Header';
|
66
|
-
export { default as Heading } from './Heading';
|
67
|
-
export type { HeadingProps } from './Heading';
|
68
|
-
export { default as LabelGroup } from './LabelGroup';
|
69
|
-
export type { LabelGroupProps } from './LabelGroup';
|
70
|
-
export { default as Label } from './Label';
|
71
|
-
export type { LabelProps } from './Label';
|
72
|
-
export { default as Link } from './Link';
|
73
|
-
export type { LinkProps } from './Link';
|
74
|
-
export { default as Overlay } from './Overlay';
|
75
|
-
export type { OverlayProps } from './Overlay';
|
76
|
-
export { default as Pagehead } from './Pagehead';
|
77
|
-
export type { PageheadProps } from './Pagehead';
|
78
|
-
export { default as Pagination } from './Pagination';
|
79
|
-
export type { PaginationProps } from './Pagination';
|
80
|
-
export { default as PointerBox } from './PointerBox';
|
81
|
-
export type { PointerBoxProps } from './PointerBox';
|
82
|
-
export { default as Popover } from './Popover';
|
83
|
-
export type { PopoverProps, PopoverContentProps } from './Popover';
|
84
|
-
export { default as ProgressBar } from './ProgressBar';
|
85
|
-
export type { ProgressBarProps } from './ProgressBar';
|
86
|
-
export { default as SelectMenu } from './SelectMenu';
|
87
|
-
export type { SelectMenuProps, SelectMenuDividerProps, SelectMenuFilterProps, SelectMenuFooterProps, SelectMenuItemProps, SelectMenuListProps, SelectMenuModalProps, SelectMenuTabsProps, SelectMenuHeaderProps, SelectMenuTabProps, SelectMenuTabPanelProps, SelectMenuLoadingAnimationProps } from './SelectMenu';
|
88
|
-
export { default as SideNav } from './SideNav';
|
89
|
-
export type { SideNavProps, SideNavLinkProps } from './SideNav';
|
90
|
-
export { default as Spinner } from './Spinner';
|
91
|
-
export type { SpinnerProps } from './Spinner';
|
92
|
-
export { default as StateLabel } from './StateLabel';
|
93
|
-
export type { StateLabelProps } from './StateLabel';
|
94
|
-
export { default as StyledOcticon } from './StyledOcticon';
|
95
|
-
export type { StyledOcticonProps } from './StyledOcticon';
|
96
|
-
export { default as SubNav } from './SubNav';
|
97
|
-
export type { SubNavProps, SubNavLinkProps, SubNavLinksProps } from './SubNav';
|
98
|
-
export { default as TabNav } from './TabNav';
|
99
|
-
export type { TabNavProps, TabNavLinkProps } from './TabNav';
|
100
|
-
export { default as TextInput } from './TextInput';
|
101
|
-
export type { TextInputProps } from './TextInput';
|
102
|
-
export { default as TextInputWithTokens } from './TextInputWithTokens';
|
103
|
-
export { default as Text } from './Text';
|
104
|
-
export type { TextProps } from './Text';
|
105
|
-
export { default as Timeline } from './Timeline';
|
106
|
-
export type { TimelineProps, TimelineBadgeProps, TimelineBodyProps, TimelineBreakProps, TimelineItemsProps } from './Timeline';
|
107
|
-
export { default as Token, IssueLabelToken, ProfileToken } from './Token';
|
108
|
-
export { default as Tooltip } from './Tooltip';
|
109
|
-
export type { TooltipProps } from './Tooltip';
|
110
|
-
export { default as Truncate } from './Truncate';
|
111
|
-
export type { TruncateProps } from './Truncate';
|
112
|
-
export { default as UnderlineNav } from './UnderlineNav';
|
113
|
-
export type { UnderlineNavProps, UnderlineNavLinkProps } from './UnderlineNav';
|
114
|
-
export { SSRProvider, useSSRSafeId } from './utils/ssr';
|
package/lib/sx.d.ts
DELETED
package/lib/theme-preval.d.ts
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
export namespace theme {
|
2
|
-
export { animation };
|
3
|
-
export { borderWidths };
|
4
|
-
export { breakpoints };
|
5
|
-
export { fonts };
|
6
|
-
export { fontSizes };
|
7
|
-
export { fontWeights };
|
8
|
-
export { lineHeights };
|
9
|
-
export { radii };
|
10
|
-
export { sizes };
|
11
|
-
export { space };
|
12
|
-
export { colorSchemes };
|
13
|
-
}
|
14
|
-
declare namespace animation {
|
15
|
-
const easeOutCubic: string;
|
16
|
-
}
|
17
|
-
declare const borderWidths: (string | number)[];
|
18
|
-
declare const breakpoints: string[];
|
19
|
-
declare namespace fonts {
|
20
|
-
const normal: any;
|
21
|
-
const mono: any;
|
22
|
-
}
|
23
|
-
declare const fontSizes: string[];
|
24
|
-
declare namespace fontWeights {
|
25
|
-
export const light: number;
|
26
|
-
const normal_1: number;
|
27
|
-
export { normal_1 as normal };
|
28
|
-
export const semibold: number;
|
29
|
-
export const bold: number;
|
30
|
-
}
|
31
|
-
declare const lineHeights: {
|
32
|
-
condensedUltra: number;
|
33
|
-
condensed: number;
|
34
|
-
default: number;
|
35
|
-
};
|
36
|
-
declare const radii: string[];
|
37
|
-
declare namespace sizes {
|
38
|
-
const small: string;
|
39
|
-
const medium: string;
|
40
|
-
const large: string;
|
41
|
-
const xlarge: string;
|
42
|
-
}
|
43
|
-
declare const space: string[];
|
44
|
-
/**
|
45
|
-
* @type Record<keyof typeof primitives.colors, Record<'colors' | 'shadows', Partial<typeof primitives.colors.light>>
|
46
|
-
*/
|
47
|
-
declare const colorSchemes: Record<keyof typeof primitives.colors, Record<'colors' | 'shadows', Partial<typeof primitives.colors.light>>>;
|
48
|
-
import { default as primitives } from "@primer/primitives";
|
49
|
-
export {};
|
package/lib/theme.d.ts
DELETED
package/lib/utils/deprecate.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
declare type DeprecationType = {
|
2
|
-
name: string;
|
3
|
-
message: string;
|
4
|
-
version: string;
|
5
|
-
};
|
6
|
-
declare let deprecate: ({ name, message, version }: DeprecationType) => void | (() => void);
|
7
|
-
export { deprecate };
|
8
|
-
declare let useDeprecation: any;
|
9
|
-
export { useDeprecation };
|
10
|
-
export declare class Deprecations {
|
11
|
-
static instance: Deprecations | null;
|
12
|
-
deprecations: Array<DeprecationType>;
|
13
|
-
static get(): Deprecations;
|
14
|
-
constructor();
|
15
|
-
static deprecate({ name, message, version }: DeprecationType): void;
|
16
|
-
static getDeprecations(): DeprecationType[];
|
17
|
-
static clearDeprecations(): void;
|
18
|
-
}
|
package/lib/utils/isNumeric.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export default function isNumeric(n: any): boolean;
|
@@ -1,42 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Options to the focusable elements iterator
|
3
|
-
*/
|
4
|
-
export interface IterateFocusableElements {
|
5
|
-
/**
|
6
|
-
* (Default: false) Iterate through focusable elements in reverse-order
|
7
|
-
*/
|
8
|
-
reverse?: boolean;
|
9
|
-
/**
|
10
|
-
* (Default: false) Perform additional checks to determine tabbability
|
11
|
-
* which may adversely affect app performance.
|
12
|
-
*/
|
13
|
-
strict?: boolean;
|
14
|
-
/**
|
15
|
-
* (Default: false) Only iterate tabbable elements, which is the subset
|
16
|
-
* of focusable elements that are part of the page's tab sequence.
|
17
|
-
*/
|
18
|
-
onlyTabbable?: boolean;
|
19
|
-
}
|
20
|
-
/**
|
21
|
-
* Returns an iterator over all of the focusable elements within `container`.
|
22
|
-
* Note: If `container` is itself focusable it will be included in the results.
|
23
|
-
* @param container The container over which to find focusable elements.
|
24
|
-
* @param reverse If true, iterate backwards through focusable elements.
|
25
|
-
*/
|
26
|
-
export declare function iterateFocusableElements(container: HTMLElement, options?: IterateFocusableElements): Generator<HTMLElement, undefined, undefined>;
|
27
|
-
/**
|
28
|
-
* Determines whether the given element is focusable. If `strict` is true, we may
|
29
|
-
* perform additional checks that require a reflow (less performant).
|
30
|
-
* @param elem
|
31
|
-
* @param strict
|
32
|
-
*/
|
33
|
-
export declare function isFocusable(elem: HTMLElement, strict?: boolean): boolean;
|
34
|
-
/**
|
35
|
-
* Determines whether the given element is tabbable. If `strict` is true, we may
|
36
|
-
* perform additional checks that require a reflow (less performant). This check
|
37
|
-
* ensures that the element is focusable and that its tabindex is not explicitly
|
38
|
-
* set to "-1" (which makes it focusable, but removes it from the tab order).
|
39
|
-
* @param elem
|
40
|
-
* @param strict
|
41
|
-
*/
|
42
|
-
export declare function isTabbable(elem: HTMLElement, strict?: boolean): boolean;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const scrollIntoViewingArea: (child: HTMLElement, container: HTMLElement, direction?: 'horizontal' | 'vertical', startMargin?: number, endMargin?: number, behavior?: ScrollBehavior) => void;
|
@@ -1,39 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.scrollIntoViewingArea = void 0;
|
7
|
-
|
8
|
-
const scrollIntoViewingArea = (child, container, direction = 'vertical', startMargin = 8, endMargin = 0, behavior = 'smooth') => {
|
9
|
-
const startSide = direction === 'vertical' ? 'top' : 'left';
|
10
|
-
const endSide = direction === 'vertical' ? 'bottom' : 'right';
|
11
|
-
const scrollSide = direction === 'vertical' ? 'scrollTop' : 'scrollLeft';
|
12
|
-
const {
|
13
|
-
[startSide]: childStart,
|
14
|
-
[endSide]: childEnd
|
15
|
-
} = child.getBoundingClientRect();
|
16
|
-
const {
|
17
|
-
[startSide]: containerStart,
|
18
|
-
[endSide]: containerEnd
|
19
|
-
} = container.getBoundingClientRect();
|
20
|
-
const isChildStartAboveViewingArea = childStart < containerStart + endMargin;
|
21
|
-
const isChildBottomBelowViewingArea = childEnd > containerEnd - startMargin;
|
22
|
-
|
23
|
-
if (isChildStartAboveViewingArea) {
|
24
|
-
const scrollHeightToChildStart = childStart - containerStart + container[scrollSide];
|
25
|
-
container.scrollTo({
|
26
|
-
behavior,
|
27
|
-
[startSide]: scrollHeightToChildStart - endMargin
|
28
|
-
});
|
29
|
-
} else if (isChildBottomBelowViewingArea) {
|
30
|
-
const scrollHeightToChildBottom = childEnd - containerEnd + container[scrollSide];
|
31
|
-
container.scrollTo({
|
32
|
-
behavior,
|
33
|
-
[startSide]: scrollHeightToChildBottom + startMargin
|
34
|
-
});
|
35
|
-
} // either completely in view or outside viewing area on both ends, don't scroll
|
36
|
-
|
37
|
-
};
|
38
|
-
|
39
|
-
exports.scrollIntoViewingArea = scrollIntoViewingArea;
|
package/lib/utils/ssr.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export { SSRProvider, useSSRSafeId } from '@react-aria/ssr';
|
package/lib/utils/ssr.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "SSRProvider", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function () {
|
9
|
-
return _ssr.SSRProvider;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "useSSRSafeId", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _ssr.useSSRSafeId;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
|
19
|
-
var _ssr = require("@react-aria/ssr");
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
import 'jest-styled-components';
|