@primer/components 0.0.0-20219835928 → 0.0.0-2022530195733
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 -1
- 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/MandateProps.d.ts +0 -3
- package/lib/utils/types/MandateProps.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 -5
- package/lib/utils/types/index.js +0 -70
- 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 -1
- 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/MandateProps.d.ts +0 -3
- package/lib-esm/utils/types/MandateProps.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 -5
- package/lib-esm/utils/types/index.js +0 -5
- package/lib-esm/utils/uniqueId.d.ts +0 -1
- package/lib-esm/utils/userAgent.d.ts +0 -1
package/lib/Position.js
CHANGED
@@ -3,7 +3,11 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.Absolute = Absolute;
|
7
|
+
exports.Fixed = Fixed;
|
8
|
+
exports.Relative = Relative;
|
9
|
+
exports.Sticky = Sticky;
|
10
|
+
exports.default = void 0;
|
7
11
|
|
8
12
|
var _react = _interopRequireDefault(require("react"));
|
9
13
|
|
@@ -11,77 +15,54 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
15
|
|
12
16
|
var _Box = _interopRequireDefault(require("./Box"));
|
13
17
|
|
18
|
+
var _constants = require("./constants");
|
19
|
+
|
20
|
+
var _sx = _interopRequireDefault(require("./sx"));
|
21
|
+
|
14
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
23
|
|
16
24
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
17
25
|
|
18
|
-
/**
|
19
|
-
* @deprecated Use the Box component instead (i.e. <Position> → <Box>)
|
20
|
-
*/
|
21
26
|
const Position = (0, _styledComponents.default)(_Box.default).withConfig({
|
22
27
|
displayName: "Position",
|
23
28
|
componentId: "fla1y3-0"
|
24
|
-
})([""]);
|
25
|
-
|
26
|
-
/**
|
27
|
-
* @deprecated Use the Box component instead (i.e. <Absolute> → <Box position="absolute">)
|
28
|
-
*/
|
29
|
+
})(["", ";", ";"], _constants.POSITION, _sx.default);
|
29
30
|
var _default = Position; // Absolute
|
30
31
|
|
31
32
|
exports.default = _default;
|
32
33
|
|
33
|
-
|
34
|
-
* @deprecated Use the Box component instead (i.e. <Absolute> → <Box position="absolute">)
|
35
|
-
*/
|
36
|
-
const Absolute = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
34
|
+
function Absolute(props) {
|
37
35
|
return /*#__PURE__*/_react.default.createElement(Position, _extends({}, props, {
|
38
|
-
position: "absolute"
|
39
|
-
ref: ref
|
36
|
+
position: "absolute"
|
40
37
|
}));
|
41
|
-
}
|
38
|
+
}
|
42
39
|
|
43
|
-
|
44
|
-
Absolute.displayName = 'Absolute'; // Fixed
|
40
|
+
Absolute.displayName = "Absolute";
|
45
41
|
|
46
|
-
|
47
|
-
* @deprecated Use the Box component instead (i.e. <Fixed> → <Box position="fixed">)
|
48
|
-
*/
|
49
|
-
const Fixed = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
42
|
+
function Fixed(props) {
|
50
43
|
return /*#__PURE__*/_react.default.createElement(Position, _extends({}, props, {
|
51
|
-
position: "fixed"
|
52
|
-
ref: ref
|
44
|
+
position: "fixed"
|
53
45
|
}));
|
54
|
-
}
|
46
|
+
}
|
55
47
|
|
56
|
-
|
57
|
-
Fixed.displayName = 'Fixed'; // Relative
|
48
|
+
Fixed.displayName = "Fixed";
|
58
49
|
|
59
|
-
|
60
|
-
* @deprecated Use the Box component instead (i.e. <Relative> → <Box position="relative">)
|
61
|
-
*/
|
62
|
-
const Relative = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
50
|
+
function Relative(props) {
|
63
51
|
return /*#__PURE__*/_react.default.createElement(Position, _extends({}, props, {
|
64
|
-
position: "relative"
|
65
|
-
ref: ref
|
52
|
+
position: "relative"
|
66
53
|
}));
|
67
|
-
}
|
54
|
+
}
|
68
55
|
|
69
|
-
|
70
|
-
Relative.displayName = 'Relative'; // Sticky
|
56
|
+
Relative.displayName = "Relative";
|
71
57
|
|
72
|
-
|
73
|
-
* @deprecated Use the Box component instead (i.e. <Sticky> → <Box position="sticky">)
|
74
|
-
*/
|
75
|
-
const Sticky = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
58
|
+
function Sticky(props) {
|
76
59
|
return /*#__PURE__*/_react.default.createElement(Position, _extends({}, props, {
|
77
|
-
position: "sticky"
|
78
|
-
ref: ref
|
60
|
+
position: "sticky"
|
79
61
|
}));
|
80
|
-
}
|
62
|
+
}
|
81
63
|
|
82
|
-
|
64
|
+
Sticky.displayName = "Sticky";
|
83
65
|
Sticky.defaultProps = {
|
84
66
|
top: 0,
|
85
67
|
zIndex: 1
|
86
|
-
};
|
87
|
-
Sticky.displayName = 'Sticky';
|
68
|
+
};
|
package/lib/ProgressBar.js
CHANGED
@@ -33,7 +33,7 @@ const sizeMap = {
|
|
33
33
|
const ProgressContainer = _styledComponents.default.span.withConfig({
|
34
34
|
displayName: "ProgressBar__ProgressContainer",
|
35
35
|
componentId: "sc-1tiva13-1"
|
36
|
-
})(["display:", ";overflow:hidden;background-color:", ";border-radius:", ";height:", ";", " ", " ", ";"], props => props.inline ? 'inline-flex' : 'flex', (0, _constants.get)('colors.border.
|
36
|
+
})(["display:", ";overflow:hidden;background-color:", ";border-radius:", ";height:", ";", " ", " ", ";"], props => props.inline ? 'inline-flex' : 'flex', (0, _constants.get)('colors.border.primary'), (0, _constants.get)('radii.1'), props => sizeMap[props.barSize || 'default'], _constants.COMMON, _styledSystem.width, _sx.default);
|
37
37
|
|
38
38
|
function ProgressBar({
|
39
39
|
progress,
|
@@ -41,9 +41,9 @@ var _SelectMenuTabs = _interopRequireDefault(require("./SelectMenuTabs"));
|
|
41
41
|
|
42
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
43
43
|
|
44
|
-
function _getRequireWildcardCache(
|
44
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
45
45
|
|
46
|
-
function _interopRequireWildcard(obj
|
46
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
47
47
|
|
48
48
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
49
49
|
|
@@ -68,10 +68,10 @@ const StyledSelectMenu = _styledComponents.default.details.withConfig({
|
|
68
68
|
})(["", " ", " ", ";"], wrapperStyles, _constants.COMMON, _sx.default);
|
69
69
|
|
70
70
|
// 'as' is spread out because we don't want users to be able to change the tag.
|
71
|
-
const SelectMenu =
|
71
|
+
const SelectMenu = _react.default.forwardRef(({
|
72
72
|
children,
|
73
73
|
initialTab = '',
|
74
|
-
as
|
74
|
+
as,
|
75
75
|
...rest
|
76
76
|
}, forwardedRef) => {
|
77
77
|
const backupRef = (0, _react.useRef)(null);
|
@@ -13,11 +13,11 @@ var _sx = _interopRequireDefault(require("../sx"));
|
|
13
13
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
15
|
|
16
|
-
function _getRequireWildcardCache(
|
16
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
17
17
|
|
18
|
-
function _interopRequireWildcard(obj
|
18
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
19
19
|
|
20
|
-
const dividerStyles = (0, _styledComponents.css)(["padding:", " ", ";margin:0;font-size:", ";font-weight:", ";color:", ";background-color:", ";border-bottom:", " solid ", ";"], (0, _constants.get)('space.1'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('colors.
|
20
|
+
const dividerStyles = (0, _styledComponents.css)(["padding:", " ", ";margin:0;font-size:", ";font-weight:", ";color:", ";background-color:", ";border-bottom:", " solid ", ";"], (0, _constants.get)('space.1'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('colors.text.tertiary'), (0, _constants.get)('colors.bg.tertiary'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.selectMenu.borderSecondary'));
|
21
21
|
|
22
22
|
const SelectMenuDivider = _styledComponents.default.div.withConfig({
|
23
23
|
displayName: "SelectMenuDivider",
|
@@ -19,21 +19,21 @@ var _SelectMenuContext = require("./SelectMenuContext");
|
|
19
19
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
21
|
|
22
|
-
function _getRequireWildcardCache(
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
23
23
|
|
24
|
-
function _interopRequireWildcard(obj
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
25
|
|
26
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
27
27
|
|
28
28
|
const StyledForm = _styledComponents.default.form.withConfig({
|
29
29
|
displayName: "SelectMenuFilter__StyledForm",
|
30
30
|
componentId: "s7ktlh-0"
|
31
|
-
})(["padding:", ";margin:0;border-bottom:", " solid ", ";background-color:", ";", ";@media (min-width:", "){padding:", ";}", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.
|
31
|
+
})(["padding:", ";margin:0;border-bottom:", " solid ", ";background-color:", ";", ";@media (min-width:", "){padding:", ";}", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.selectMenu.borderSecondary'), (0, _constants.get)('colors.bg.overlay'), _constants.COMMON, (0, _constants.get)('breakpoints.0'), (0, _constants.get)('space.2'), _sx.default);
|
32
32
|
|
33
|
-
const SelectMenuFilter =
|
33
|
+
const SelectMenuFilter = (0, _react.forwardRef)(({
|
34
34
|
theme,
|
35
35
|
value,
|
36
|
-
sx
|
36
|
+
sx,
|
37
37
|
...rest
|
38
38
|
}, forwardedRef) => {
|
39
39
|
const inputRef = (0, _react.useRef)(null);
|
@@ -51,7 +51,7 @@ const SelectMenuFilter = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
51
51
|
}, [open]);
|
52
52
|
return /*#__PURE__*/_react.default.createElement(StyledForm, {
|
53
53
|
theme: theme,
|
54
|
-
sx:
|
54
|
+
sx: sx
|
55
55
|
}, /*#__PURE__*/_react.default.createElement(_TextInput.default, _extends({
|
56
56
|
theme: theme,
|
57
57
|
ref: ref,
|
@@ -13,11 +13,11 @@ var _sx = _interopRequireDefault(require("../sx"));
|
|
13
13
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
15
|
|
16
|
-
function _getRequireWildcardCache(
|
16
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
17
17
|
|
18
|
-
function _interopRequireWildcard(obj
|
18
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
19
19
|
|
20
|
-
const footerStyles = (0, _styledComponents.css)(["margin-top:-1px;padding:", " ", ";font-size:", ";color:", ";text-align:center;border-top:", " solid ", ";@media (min-width:", "){padding:", " ", ";}"], (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('colors.
|
20
|
+
const footerStyles = (0, _styledComponents.css)(["margin-top:-1px;padding:", " ", ";font-size:", ";color:", ";text-align:center;border-top:", " solid ", ";@media (min-width:", "){padding:", " ", ";}"], (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('colors.text.tertiary'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.selectMenu.borderSecondary'), (0, _constants.get)('breakpoints.0'), (0, _constants.get)('space.1'), (0, _constants.get)('space.2'));
|
21
21
|
|
22
22
|
const SelectMenuFooter = _styledComponents.default.footer.withConfig({
|
23
23
|
displayName: "SelectMenuFooter",
|
@@ -22,12 +22,12 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
22
22
|
const SelectMenuTitle = _styledComponents.default.h3.withConfig({
|
23
23
|
displayName: "SelectMenuHeader__SelectMenuTitle",
|
24
24
|
componentId: "sc-1pwppzc-0"
|
25
|
-
})(["color:", ";flex:auto;font-size:", ";font-weight:", ";margin:0;@media (min-width:", "){font-size:inherit;}"], (0, _constants.get)('colors.
|
25
|
+
})(["color:", ";flex:auto;font-size:", ";font-weight:", ";margin:0;@media (min-width:", "){font-size:inherit;}"], (0, _constants.get)('colors.text.primary'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('breakpoints.0'));
|
26
26
|
|
27
27
|
const StyledHeader = _styledComponents.default.header.withConfig({
|
28
28
|
displayName: "SelectMenuHeader__StyledHeader",
|
29
29
|
componentId: "sc-1pwppzc-1"
|
30
|
-
})(["display:flex;flex:none;padding:", ";border-bottom:", " solid ", ";", " ", " @media (min-width:", "){padding-top:", ";padding-bottom:", ";}", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('borderWidths'), (0, _constants.get)('colors.
|
30
|
+
})(["display:flex;flex:none;padding:", ";border-bottom:", " solid ", ";", " ", " @media (min-width:", "){padding-top:", ";padding-bottom:", ";}", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('borderWidths'), (0, _constants.get)('colors.selectMenu.borderSecondary'), _constants.COMMON, _constants.TYPOGRAPHY, (0, _constants.get)('breakpoints.0'), (0, _constants.get)('space.2'), (0, _constants.get)('space.2'), _sx.default);
|
31
31
|
|
32
32
|
const SelectMenuHeader = ({
|
33
33
|
children,
|
@@ -21,13 +21,13 @@ var _SelectMenuContext = require("./SelectMenuContext");
|
|
21
21
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
23
|
|
24
|
-
function _getRequireWildcardCache(
|
24
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
25
25
|
|
26
|
-
function _interopRequireWildcard(obj
|
26
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
27
27
|
|
28
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
29
29
|
|
30
|
-
const listItemStyles = (0, _styledComponents.css)(["display:flex;align-items:center;padding:", ";overflow:hidden;text-align:left;cursor:pointer;background-color:", ";border:0;border-bottom:", " solid ", ";color:", ";text-decoration:none;font-size:", ";font-family:inherit;width:100%;&:hover{text-decoration:none;}&:focus{outline:none;}&[hidden]{display:none !important;}@media (min-width:", "){padding-top:", ";padding-bottom:", ";}.SelectMenu-icon{width:", ";margin-right:", ";flex-shrink:0;}.SelectMenu-selected-icon{visibility:hidden;transition:transform 0.12s cubic-bezier(0.5,0.1,1,0.5),visibility 0s 0.12s linear;transform:scale(0);}&[aria-checked='true']{font-weight:500;color:", ";.SelectMenu-selected-icon{visibility:visible;transition:transform 0.12s cubic-bezier(0,0,0.2,1),visibility 0s linear;transform:scale(1);}}@media (hover:hover){
|
30
|
+
const listItemStyles = (0, _styledComponents.css)(["display:flex;align-items:center;padding:", ";overflow:hidden;text-align:left;cursor:pointer;background-color:", ";border:0;border-bottom:", " solid ", ";color:", ";text-decoration:none;font-size:", ";font-family:inherit;width:100%;&:hover{text-decoration:none;}&:focus{outline:none;}&[hidden]{display:none !important;}@media (min-width:", "){padding-top:", ";padding-bottom:", ";}.SelectMenu-icon{width:", ";margin-right:", ";flex-shrink:0;}.SelectMenu-selected-icon{visibility:hidden;transition:transform 0.12s cubic-bezier(0.5,0.1,1,0.5),visibility 0s 0.12s linear;transform:scale(0);}&[aria-checked='true']{font-weight:500;color:", ";.SelectMenu-selected-icon{visibility:visible;transition:transform 0.12s cubic-bezier(0,0,0.2,1),visibility 0s linear;transform:scale(1);}}@media (hover:hover){body:not(.intent-mouse) .SelectMenu-item:focus,&:hover,&:active,&:focus{background-color:", ";}}@media (hover:none){&:focus,&:active{background-color:", ";}-webkit-tap-highlight-color:", ";}"], (0, _constants.get)('space.3'), (0, _constants.get)('colors.bg.overlay'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.selectMenu.borderSecondary'), (0, _constants.get)('colors.text.secondary'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('breakpoints.0'), (0, _constants.get)('space.2'), (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('space.2'), (0, _constants.get)('colors.text.primary'), (0, _constants.get)('colors.state.hover.secondaryBg'), (0, _constants.get)('colors.bg.secondary'), (0, _constants.get)('colors.selectMenu.tapHighlight'));
|
31
31
|
exports.listItemStyles = listItemStyles;
|
32
32
|
|
33
33
|
const StyledItem = _styledComponents.default.a.attrs(() => ({
|
@@ -37,7 +37,7 @@ const StyledItem = _styledComponents.default.a.attrs(() => ({
|
|
37
37
|
componentId: "gjymba-0"
|
38
38
|
})(["", " ", " ", ";"], listItemStyles, _constants.COMMON, _sx.default);
|
39
39
|
|
40
|
-
const SelectMenuItem =
|
40
|
+
const SelectMenuItem = (0, _react.forwardRef)(({
|
41
41
|
children,
|
42
42
|
selected,
|
43
43
|
theme,
|
@@ -13,11 +13,11 @@ var _sx = _interopRequireDefault(require("../sx"));
|
|
13
13
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
15
|
|
16
|
-
function _getRequireWildcardCache(
|
16
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
17
17
|
|
18
|
-
function _interopRequireWildcard(obj
|
18
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
19
19
|
|
20
|
-
const listStyles = (0, _styledComponents.css)(["position:relative;padding:0;margin:0;flex:auto;overflow-x:hidden;overflow-y:auto;background-color:", ";-webkit-overflow-scrolling:touch;@media (hover:hover){.SelectMenuTab:focus{background-color:", ";}.SelectMenuTab:not([aria-checked='true']):hover{color:", ";background-color:", ";}.SelectMenuTab:not([aria-checked='true']):active{color:", ";background-color:", ";}}"], (0, _constants.get)('colors.
|
20
|
+
const listStyles = (0, _styledComponents.css)(["position:relative;padding:0;margin:0;flex:auto;overflow-x:hidden;overflow-y:auto;background-color:", ";-webkit-overflow-scrolling:touch;@media (hover:hover){.SelectMenuTab:focus{background-color:", ";}.SelectMenuTab:not([aria-checked='true']):hover{color:", ";background-color:", ";}.SelectMenuTab:not([aria-checked='true']):active{color:", ";background-color:", ";}}"], (0, _constants.get)('colors.bg.overlay'), (0, _constants.get)('colors.selectMenu.tapFocusBg'), (0, _constants.get)('colors.text.primary'), (0, _constants.get)('colors.bg.tertiary'), (0, _constants.get)('colors.text.primary'), (0, _constants.get)('colors.bg.tertiary'));
|
21
21
|
|
22
22
|
const SelectMenuList = _styledComponents.default.div.withConfig({
|
23
23
|
displayName: "SelectMenuList",
|
@@ -7,21 +7,32 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var _styledComponents =
|
10
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
11
|
+
|
12
|
+
var _StyledOcticon = _interopRequireDefault(require("../StyledOcticon"));
|
13
|
+
|
14
|
+
var _octiconsReact = require("@primer/octicons-react");
|
11
15
|
|
12
16
|
var _constants = require("../constants");
|
13
17
|
|
14
|
-
|
18
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
19
|
+
|
20
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
15
21
|
|
16
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
23
|
|
24
|
+
const pulseKeyframes = (0, _styledComponents.keyframes)(["0%{opacity:0.3;}10%{opacity:1;}100%{opacity:0.3;}"]);
|
25
|
+
|
18
26
|
const Animation = _styledComponents.default.div.withConfig({
|
19
27
|
displayName: "SelectMenuLoadingAnimation__Animation",
|
20
28
|
componentId: "sc-17k54td-0"
|
21
|
-
})(["padding:", " ", ";text-align:center;background-color:", ";", ""], (0, _constants.get)('space.6'), (0, _constants.get)('space.4'), (0, _constants.get)('colors.
|
29
|
+
})(["padding:", " ", ";text-align:center;background-color:", ";animation-name:", ";animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite;", ""], (0, _constants.get)('space.6'), (0, _constants.get)('space.4'), (0, _constants.get)('colors.bg.overlay'), pulseKeyframes, _constants.COMMON);
|
22
30
|
|
23
31
|
const SelectMenuLoadingAnimation = props => {
|
24
|
-
return /*#__PURE__*/_react.default.createElement(Animation, props, /*#__PURE__*/_react.default.createElement(
|
32
|
+
return /*#__PURE__*/_react.default.createElement(Animation, props, /*#__PURE__*/_react.default.createElement(_StyledOcticon.default, {
|
33
|
+
size: 32,
|
34
|
+
icon: _octiconsReact.OctofaceIcon
|
35
|
+
}));
|
25
36
|
};
|
26
37
|
|
27
38
|
SelectMenuLoadingAnimation.displayName = "SelectMenuLoadingAnimation";
|
@@ -15,17 +15,17 @@ var _constants = require("../constants");
|
|
15
15
|
|
16
16
|
var _sx = _interopRequireDefault(require("../sx"));
|
17
17
|
|
18
|
-
function _getRequireWildcardCache(
|
18
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
19
19
|
|
20
|
-
function _interopRequireWildcard(obj
|
20
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
21
21
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
23
|
|
24
24
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
25
25
|
|
26
26
|
const animateModal = (0, _styledComponents.keyframes)(["0%{opacity:0;transform:scale(0.9);}"]);
|
27
|
-
const modalStyles = (0, _styledComponents.css)(["position:relative;z-index:99;display:flex;", ";max-height:", ";margin:auto 0;", ";overflow:hidden;pointer-events:auto;flex-direction:column;background-color:", ";border-radius:", ";box-shadow:", ";animation:", " 0.12s cubic-bezier(0,0.1,0.1,1) backwards;@media (min-width:", "){height:auto;max-height:350px;margin:", " 0 ", " 0;font-size:", ";border:", " solid ", ";border-radius:", ";box-shadow:", ";}"], props => props.filter ? 'height: 80%' : '', props => props.filter ? 'none' : '66%', props => props.filter ? 'margin-top: 0' : '', (0, _constants.get)('colors.
|
28
|
-
const modalWrapperStyles = (0, _styledComponents.css)(["position:fixed;top:0;right:0;bottom:0;left:0;z-index:99;display:flex;padding:", ";pointer-events:none;flex-direction:column;&::before{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;content:'';background-color:", ";@media (min-width:", "){display:none;}}@media (min-width:", "){position:absolute;top:auto;right:", ";bottom:auto;left:auto;padding:0;}"], (0, _constants.get)('space.3'), (0, _constants.get)('colors.
|
27
|
+
const modalStyles = (0, _styledComponents.css)(["position:relative;z-index:99;display:flex;", ";max-height:", ";margin:auto 0;", ";overflow:hidden;pointer-events:auto;flex-direction:column;background-color:", ";border-radius:", ";box-shadow:", ";animation:", " 0.12s cubic-bezier(0,0.1,0.1,1) backwards;@media (min-width:", "){height:auto;max-height:350px;margin:", " 0 ", " 0;font-size:", ";border:", " solid ", ";border-radius:", ";box-shadow:", ";}"], props => props.filter ? 'height: 80%' : '', props => props.filter ? 'none' : '66%', props => props.filter ? 'margin-top: 0' : '', (0, _constants.get)('colors.bg.overlay'), (0, _constants.get)('radii.2'), (0, _constants.get)('shadows.shadow.small'), animateModal, (0, _constants.get)('breakpoints.0'), (0, _constants.get)('space.1'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.border.overlay'), (0, _constants.get)('radii.2'), (0, _constants.get)('shadows.shadow.small'));
|
28
|
+
const modalWrapperStyles = (0, _styledComponents.css)(["position:fixed;top:0;right:0;bottom:0;left:0;z-index:99;display:flex;padding:", ";pointer-events:none;flex-direction:column;&::before{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;content:'';background-color:", ";@media (min-width:", "){display:none;}}@media (min-width:", "){position:absolute;top:auto;right:", ";bottom:auto;left:auto;padding:0;}"], (0, _constants.get)('space.3'), (0, _constants.get)('colors.selectMenu.backdropBg'), (0, _constants.get)('breakpoints.0'), (0, _constants.get)('breakpoints.0'), props => props.align === 'right' ? '0' : 'auto');
|
29
29
|
|
30
30
|
const Modal = _styledComponents.default.div.withConfig({
|
31
31
|
displayName: "SelectMenuModal__Modal",
|
@@ -37,10 +37,10 @@ const ModalWrapper = _styledComponents.default.div.withConfig({
|
|
37
37
|
componentId: "sc-1m5qo55-1"
|
38
38
|
})(["", " ", " ", ";"], modalWrapperStyles, _constants.COMMON, _sx.default);
|
39
39
|
|
40
|
-
const SelectMenuModal =
|
40
|
+
const SelectMenuModal = _react.default.forwardRef(({
|
41
41
|
children,
|
42
42
|
theme,
|
43
|
-
width
|
43
|
+
width,
|
44
44
|
...rest
|
45
45
|
}, forwardedRef) => {
|
46
46
|
return /*#__PURE__*/_react.default.createElement(ModalWrapper, _extends({
|
@@ -50,7 +50,7 @@ const SelectMenuModal = /*#__PURE__*/_react.default.forwardRef(({
|
|
50
50
|
ref: forwardedRef
|
51
51
|
}), /*#__PURE__*/_react.default.createElement(Modal, {
|
52
52
|
theme: theme,
|
53
|
-
width:
|
53
|
+
width: width
|
54
54
|
}, children));
|
55
55
|
});
|
56
56
|
|
@@ -17,15 +17,15 @@ var _sx = _interopRequireDefault(require("../sx"));
|
|
17
17
|
|
18
18
|
var _SelectMenuContext = require("./SelectMenuContext");
|
19
19
|
|
20
|
-
function _getRequireWildcardCache(
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
21
21
|
|
22
|
-
function _interopRequireWildcard(obj
|
22
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
23
23
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
25
|
|
26
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
27
27
|
|
28
|
-
const tabStyles = (0, _styledComponents.css)(["flex:1;padding:", " ", ";font-size:", ";font-weight:500;color:", ";text-align:center;background-color:transparent;border:0;box-shadow:inset 0 -1px 0 ", ";@media (min-width:", "){flex:none;padding:", " ", ";border:", " solid transparent;border-bottom-width:0;border-top-left-radius:", ";border-top-right-radius:", ";}&[aria-selected='true']{z-index:1;color:", ";background-color:", ";box-shadow:0 0 0 1px ", ";@media (min-width:", "){border-color:", ";box-shadow:none;}}&:focus{background-color:", ";}"], (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('colors.
|
28
|
+
const tabStyles = (0, _styledComponents.css)(["flex:1;padding:", " ", ";font-size:", ";font-weight:500;color:", ";text-align:center;background-color:transparent;border:0;box-shadow:inset 0 -1px 0 ", ";@media (min-width:", "){flex:none;padding:", " ", ";border:", " solid transparent;border-bottom-width:0;border-top-left-radius:", ";border-top-right-radius:", ";}&[aria-selected='true']{z-index:1;color:", ";background-color:", ";box-shadow:0 0 0 1px ", ";@media (min-width:", "){border-color:", ";box-shadow:none;}}&:focus{background-color:", ";}"], (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.0'), (0, _constants.get)('colors.text.tertiary'), (0, _constants.get)('colors.selectMenu.borderSecondary'), (0, _constants.get)('breakpoints.0'), (0, _constants.get)('space.1'), (0, _constants.get)('space.3'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('radii.2'), (0, _constants.get)('radii.2'), (0, _constants.get)('colors.text-primary'), (0, _constants.get)('colors.bg.overlay'), (0, _constants.get)('colors.selectMenu.borderSecondary'), (0, _constants.get)('breakpoints.0'), (0, _constants.get)('colors.selectMenu.borderSecondary'), (0, _constants.get)('colors.state.hover.secondaryBg'));
|
29
29
|
|
30
30
|
const StyledTab = _styledComponents.default.button.withConfig({
|
31
31
|
displayName: "SelectMenuTab__StyledTab",
|
@@ -19,16 +19,16 @@ var _SelectMenuList = _interopRequireDefault(require("./SelectMenuList"));
|
|
19
19
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
21
|
|
22
|
-
function _getRequireWildcardCache(
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
23
23
|
|
24
|
-
function _interopRequireWildcard(obj
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
25
|
|
26
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
27
27
|
|
28
28
|
const TabPanelBase = _styledComponents.default.div.withConfig({
|
29
29
|
displayName: "SelectMenuTabPanel__TabPanelBase",
|
30
30
|
componentId: "ck0ipe-0"
|
31
|
-
})(["border-top:", " solid ", ";", " ", ";"], (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.
|
31
|
+
})(["border-top:", " solid ", ";", " ", ";"], (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.selectMenu.borderSecondary'), _constants.COMMON, _sx.default);
|
32
32
|
|
33
33
|
const TabPanel = ({
|
34
34
|
tabName,
|
@@ -13,9 +13,9 @@ var _constants = require("../constants");
|
|
13
13
|
|
14
14
|
var _sx = _interopRequireDefault(require("../sx"));
|
15
15
|
|
16
|
-
function _getRequireWildcardCache(
|
16
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
17
17
|
|
18
|
-
function _interopRequireWildcard(obj
|
18
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
19
19
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
21
21
|
|
package/lib/SideNav.js
CHANGED
@@ -5,25 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
9
9
|
|
10
|
-
var
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
11
11
|
|
12
|
-
var
|
12
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _BorderBox = _interopRequireDefault(require("./BorderBox"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _constants = require("./constants");
|
17
17
|
|
18
|
-
var
|
18
|
+
var _Link = _interopRequireDefault(require("./Link"));
|
19
19
|
|
20
20
|
var _sx = _interopRequireDefault(require("./sx"));
|
21
21
|
|
22
|
-
function
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
23
23
|
|
24
|
-
function
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
25
|
|
26
|
-
function
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
27
27
|
|
28
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
29
29
|
|
@@ -43,11 +43,7 @@ function SideNavBase({
|
|
43
43
|
};
|
44
44
|
}
|
45
45
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(
|
47
|
-
borderWidth: "1px",
|
48
|
-
borderStyle: "solid",
|
49
|
-
borderColor: "border.default",
|
50
|
-
borderRadius: 2,
|
46
|
+
return /*#__PURE__*/_react.default.createElement(_BorderBox.default, _extends({
|
51
47
|
as: "nav",
|
52
48
|
className: newClassName
|
53
49
|
}, props), children);
|
@@ -57,11 +53,7 @@ SideNavBase.displayName = "SideNavBase";
|
|
57
53
|
const SideNav = (0, _styledComponents.default)(SideNavBase).withConfig({
|
58
54
|
displayName: "SideNav",
|
59
55
|
componentId: "sc-15k667c-0"
|
60
|
-
})(["background-color:", ";", " ", ";", ";"], (0, _constants.get)('colors.
|
61
|
-
// used for variant normal hover, focus pseudo selectors
|
62
|
-
const CommonAccessibilityVariantNormalStyles = (0, _styledComponents.css)(["background-color:", ";outline:none;text-decoration:none;"], (0, _constants.get)('colors.neutral.subtle')); // used for light weight hover, focus pseudo selectors
|
63
|
-
|
64
|
-
const CommonAccessibilityVariantLightWeightStyles = (0, _styledComponents.css)(["color:", ";text-decoration:none;outline:none;"], (0, _constants.get)('colors.fg.default'));
|
56
|
+
})(["background-color:", ";", " ", ";", ";"], (0, _constants.get)('colors.bg.secondary'), props => props.bordered && (0, _styledComponents.css)(["& > &{border-left:0;border-right:0;border-bottom:0;}"]), _constants.COMMON, _sx.default);
|
65
57
|
const SideNavLink = (0, _styledComponents.default)(_Link.default).attrs(props => {
|
66
58
|
const isReactRouter = typeof props.to === 'string';
|
67
59
|
|
@@ -77,7 +69,7 @@ const SideNavLink = (0, _styledComponents.default)(_Link.default).attrs(props =>
|
|
77
69
|
}).withConfig({
|
78
70
|
displayName: "SideNav__SideNavLink",
|
79
71
|
componentId: "sc-15k667c-1"
|
80
|
-
})(["position:relative;display:block;", " width:100%;text-align:left;font-size:", ";& > ", "{border-bottom:none;}
|
72
|
+
})(["position:relative;display:block;", " width:100%;text-align:left;font-size:", ";& > ", "{border-bottom:none;}&:first-child{border-top-right-radius:", ";border-top-left-radius:", ";}&:last-child{border-bottom-right-radius:", ";border-bottom-left-radius:", ";}", ".variant-normal > &{color:", ";padding:", ";border:0;border-top:", " solid ", ";&:first-child{border-top:0;}&::before{position:absolute;top:0;bottom:0;left:0;z-index:1;width:3px;pointer-events:none;content:'';}&:hover,&:focus{text-decoration:none;background-color:", ";outline:none;}&[aria-current='page'],&[aria-selected='true']{background-color:", ";&::before{background-color:", ";}}}", ".variant-lightweight > &{padding:", " 0;color:", ";&:hover,&:focus{color:", ";text-decoration:none;outline:none;}&[aria-current='page'],&[aria-selected='true']{color:", ";font-weight:", ";}}", ";"], props => props.variant === 'full' && (0, _styledComponents.css)(["display:flex;align-items:center;justify-content:space-between;"]), (0, _constants.get)('fontSizes.1'), SideNav, (0, _constants.get)('radii.2'), (0, _constants.get)('radii.2'), (0, _constants.get)('radii.2'), (0, _constants.get)('radii.2'), SideNav, (0, _constants.get)('colors.text.primary'), (0, _constants.get)('space.3'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.border.secondary'), (0, _constants.get)('colors.state.hover.secondaryBg'), (0, _constants.get)('colors.sidenav.selectedBg'), (0, _constants.get)('colors.sidenav.borderActive'), SideNav, (0, _constants.get)('space.1'), (0, _constants.get)('colors.text.link'), (0, _constants.get)('colors.text.primary'), (0, _constants.get)('colors.text.primary'), (0, _constants.get)('fontWeights.semibold'), _sx.default);
|
81
73
|
SideNav.defaultProps = {
|
82
74
|
variant: 'normal'
|
83
75
|
};
|