@primer/components 0.0.0-20219922627 → 0.0.0-2022530201059
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 +801 -1115
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +815 -1134
- 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 +35 -120
- 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 +19 -24
- 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 +1 -1
- package/lib/hooks/useOverlay.js +17 -5
- package/lib/hooks/useSafeTimeout.js +0 -1
- package/lib/index.js +12 -76
- 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/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 +37 -115
- 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 +17 -23
- 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 +1 -1
- package/lib-esm/hooks/useOverlay.js +16 -5
- package/lib-esm/hooks/useSafeTimeout.js +0 -1
- package/lib-esm/index.js +10 -19
- 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/types.js +0 -1
- 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 -87
- 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 -61
- package/lib/AnchoredOverlay/AnchoredOverlay.js +0 -116
- package/lib/AnchoredOverlay/index.d.ts +0 -2
- package/lib/AnchoredOverlay/index.js +0 -13
- 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/DatePicker/DatePicker.d.ts +0 -35
- package/lib/DatePicker/DatePicker.js +0 -37
- package/lib/DatePicker/DatePickerPanel.d.ts +0 -0
- package/lib/DatePicker/DatePickerPanel.js +0 -1
- package/lib/DatePicker/Day.d.ts +0 -12
- package/lib/DatePicker/Day.js +0 -44
- package/lib/DatePicker/Month.d.ts +0 -10
- package/lib/DatePicker/Month.js +0 -28
- package/lib/DatePicker/index.d.ts +0 -2
- package/lib/DatePicker/index.js +0 -13
- 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 -163
- 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 -62
- 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 -22
- package/lib/ThemeProvider.d.ts +0 -26
- package/lib/Timeline.d.ts +0 -407
- package/lib/Tooltip.d.ts +0 -18
- package/lib/Truncate.d.ts +0 -11
- package/lib/UnderlineNav.d.ts +0 -25
- 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 -7
- package/lib/hooks/useOverlay.d.ts +0 -14
- 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 -111
- 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/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.d.ts +0 -14
- 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 -87
- 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 -61
- package/lib-esm/AnchoredOverlay/AnchoredOverlay.js +0 -96
- package/lib-esm/AnchoredOverlay/index.d.ts +0 -2
- package/lib-esm/AnchoredOverlay/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/DatePicker/DatePicker.d.ts +0 -35
- package/lib-esm/DatePicker/DatePicker.js +0 -24
- package/lib-esm/DatePicker/DatePickerPanel.d.ts +0 -0
- package/lib-esm/DatePicker/DatePickerPanel.js +0 -0
- package/lib-esm/DatePicker/Day.d.ts +0 -12
- package/lib-esm/DatePicker/Day.js +0 -26
- package/lib-esm/DatePicker/Month.d.ts +0 -10
- package/lib-esm/DatePicker/Month.js +0 -13
- package/lib-esm/DatePicker/index.d.ts +0 -2
- package/lib-esm/DatePicker/index.js +0 -1
- 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 -137
- 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 -62
- 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 -22
- package/lib-esm/ThemeProvider.d.ts +0 -26
- package/lib-esm/Timeline.d.ts +0 -407
- 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/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 -7
- package/lib-esm/hooks/useOverlay.d.ts +0 -14
- 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 -111
- 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/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.d.ts +0 -0
- 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.d.ts +0 -14
- package/lib-esm/utils/uniqueId.d.ts +0 -1
- package/lib-esm/utils/userAgent.d.ts +0 -1
@@ -15,7 +15,7 @@ const getDirectionStyles = (theme, direction) => {
|
|
15
15
|
right: -16px;
|
16
16
|
left: auto;
|
17
17
|
border-color: transparent;
|
18
|
-
border-left-color: ${get('colors.border.
|
18
|
+
border-left-color: ${get('colors.border.overlay')(theme)};
|
19
19
|
}
|
20
20
|
|
21
21
|
&::after {
|
@@ -23,7 +23,7 @@ const getDirectionStyles = (theme, direction) => {
|
|
23
23
|
right: -14px;
|
24
24
|
left: auto;
|
25
25
|
border-color: transparent;
|
26
|
-
border-left-color: ${get('colors.border.
|
26
|
+
border-left-color: ${get('colors.border.overlay')(theme)};
|
27
27
|
}
|
28
28
|
`,
|
29
29
|
e: `
|
@@ -37,14 +37,14 @@ const getDirectionStyles = (theme, direction) => {
|
|
37
37
|
top: 10px;
|
38
38
|
left: -16px;
|
39
39
|
border-color: transparent;
|
40
|
-
border-right-color: ${get('colors.border.
|
40
|
+
border-right-color: ${get('colors.border.overlay')(theme)};
|
41
41
|
}
|
42
42
|
|
43
43
|
&::after {
|
44
44
|
top: 11px;
|
45
45
|
left: -14px;
|
46
46
|
border-color: transparent;
|
47
|
-
border-right-color: ${get('colors.border.
|
47
|
+
border-right-color: ${get('colors.border.overlay')(theme)};
|
48
48
|
}
|
49
49
|
`,
|
50
50
|
ne: `
|
@@ -62,7 +62,7 @@ const getDirectionStyles = (theme, direction) => {
|
|
62
62
|
&::before {
|
63
63
|
bottom: -8px;
|
64
64
|
left: 9px;
|
65
|
-
border-top: 8px solid ${get('colors.border.
|
65
|
+
border-top: 8px solid ${get('colors.border.overlay')(theme)};
|
66
66
|
border-bottom: 0;
|
67
67
|
border-left: 8px solid transparent;
|
68
68
|
}
|
@@ -70,7 +70,7 @@ const getDirectionStyles = (theme, direction) => {
|
|
70
70
|
&::after {
|
71
71
|
bottom: -7px;
|
72
72
|
left: 10px;
|
73
|
-
border-top: 7px solid ${get('colors.border.
|
73
|
+
border-top: 7px solid ${get('colors.border.overlay')(theme)};
|
74
74
|
border-right: 7px solid transparent;
|
75
75
|
border-bottom: 0;
|
76
76
|
border-left: 7px solid transparent;
|
package/lib-esm/FilterList.js
CHANGED
@@ -21,7 +21,7 @@ FilterList.displayName = "FilterList";
|
|
21
21
|
const FilterListItemBase = styled.a.withConfig({
|
22
22
|
displayName: "FilterList__FilterListItemBase",
|
23
23
|
componentId: "sc-1l4pxmz-1"
|
24
|
-
})(["position:relative;display:block;padding:", ";margin:", ";overflow:hidden;font-size:", ";color:", ";background-color:", "!important;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-radius:", ";&:hover{text-decoration:none;background-color:", ";}&:active{color:", ";background-color:", ";}.count{float:right;font-weight:", ";}", ";", ";"], props => props.small ? `${get('space.1')(props)} 10px` : `${get('space.2')(props)} 11px`, props => props.small ? '0 0 2px' : '0 0 5px 0', get('fontSizes.1'), props => props.selected ? get('colors.
|
24
|
+
})(["position:relative;display:block;padding:", ";margin:", ";overflow:hidden;font-size:", ";color:", ";background-color:", "!important;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-radius:", ";&:hover{text-decoration:none;background-color:", ";}&:active{color:", ";background-color:", ";}.count{float:right;font-weight:", ";}", ";", ";"], props => props.small ? `${get('space.1')(props)} 10px` : `${get('space.2')(props)} 11px`, props => props.small ? '0 0 2px' : '0 0 5px 0', get('fontSizes.1'), props => props.selected ? get('colors.state.selected.primaryText') : get('colors.text.secondary'), props => props.selected ? get('colors.state.selected.primaryBg') : '', get('radii.1'), get('colors.bg.tertiary'), get('colors.state.selected.primaryText'), get('colors.state.selected.primaryBg'), get('fontWeights.bold'), COMMON, sx);
|
25
25
|
|
26
26
|
function FilterListItem({
|
27
27
|
children,
|
package/lib-esm/Flash.js
CHANGED
@@ -41,7 +41,7 @@ const variants = variant({
|
|
41
41
|
const Flash = styled.div.withConfig({
|
42
42
|
displayName: "Flash",
|
43
43
|
componentId: "sc-4y90bn-0"
|
44
|
-
})(["position:relative;color:", ";padding:", ";border-style:solid;border-width:", ";border-radius:", ";margin-top:", ";p:last-child{margin-bottom:0;}svg{margin-right:", ";}", ";", ";", ";"], get('colors.
|
44
|
+
})(["position:relative;color:", ";padding:", ";border-style:solid;border-width:", ";border-radius:", ";margin-top:", ";p:last-child{margin-bottom:0;}svg{margin-right:", ";}", ";", ";", ";"], get('colors.text.primary'), get('space.3'), props => props.full ? '1px 0px' : '1px', props => props.full ? '0' : get('radii.2'), props => props.full ? '-1px' : '0', get('space.2'), COMMON, variants, sx);
|
45
45
|
Flash.defaultProps = {
|
46
46
|
variant: 'default'
|
47
47
|
};
|
package/lib-esm/Flex.js
CHANGED
package/lib-esm/Grid.js
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
2
|
import Box from './Box';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* @deprecated Use the Box component instead (i.e. <Grid> → <Box display="grid">)
|
6
|
-
*/
|
3
|
+
import { GRID } from './constants';
|
7
4
|
const Grid = styled(Box).withConfig({
|
8
5
|
displayName: "Grid",
|
9
6
|
componentId: "sc-1i6s5ye-0"
|
10
|
-
})([""]);
|
7
|
+
})(["", ";"], GRID);
|
11
8
|
Grid.defaultProps = {
|
12
9
|
display: 'grid'
|
13
10
|
};
|
package/lib-esm/Header.js
CHANGED
package/lib-esm/Label.js
CHANGED
@@ -2,7 +2,7 @@ import styled, { css } from 'styled-components';
|
|
2
2
|
import { borderColor, variant } from 'styled-system';
|
3
3
|
import { COMMON, get } from './constants';
|
4
4
|
import sx from './sx';
|
5
|
-
const outlineStyles = css(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";", ";background-color:transparent;"], get('colors.
|
5
|
+
const outlineStyles = css(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";", ";background-color:transparent;"], get('colors.label.secondary.text'), get('borderWidths.1'), get('colors.label.border'), borderColor, COMMON);
|
6
6
|
const sizeVariant = variant({
|
7
7
|
variants: {
|
8
8
|
small: {
|
@@ -31,7 +31,7 @@ const sizeVariant = variant({
|
|
31
31
|
const Label = styled.span.withConfig({
|
32
32
|
displayName: "Label",
|
33
33
|
componentId: "sc-1t3ykp0-0"
|
34
|
-
})(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";&:hover{text-decoration:none;}", " ", " ", " ", " ", ""], get('fontWeights.semibold'), get('colors.
|
34
|
+
})(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";&:hover{text-decoration:none;}", " ", " ", " ", " ", ""], get('fontWeights.semibold'), get('colors.text.inverse'), get('radii.3'), sizeVariant, COMMON, props => props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '', props => props.outline ? outlineStyles : '', sx);
|
35
35
|
Label.defaultProps = {
|
36
36
|
bg: 'label.primary.border',
|
37
37
|
variant: 'medium'
|
package/lib-esm/Link.js
CHANGED
@@ -2,6 +2,17 @@ import styled from 'styled-components';
|
|
2
2
|
import { system } from 'styled-system';
|
3
3
|
import { COMMON, get, TYPOGRAPHY } from './constants';
|
4
4
|
import sx from './sx';
|
5
|
+
const buttonStyles = `
|
6
|
+
display: inline-block;
|
7
|
+
padding: 0;
|
8
|
+
font-size: inherit;
|
9
|
+
white-space: nowrap;
|
10
|
+
cursor: pointer;
|
11
|
+
user-select: none;
|
12
|
+
background-color: transparent;
|
13
|
+
border: 0;
|
14
|
+
appearance: none;
|
15
|
+
`;
|
5
16
|
const hoverColor = system({
|
6
17
|
hoverColor: {
|
7
18
|
property: 'color',
|
@@ -11,5 +22,5 @@ const hoverColor = system({
|
|
11
22
|
const Link = styled.a.withConfig({
|
12
23
|
displayName: "Link",
|
13
24
|
componentId: "sc-1brdqhf-0"
|
14
|
-
})(["color:", ";text-decoration:", ";&:hover{text-decoration:", ";", ";}&:is(button){display:inline-block;padding:0;font-size:inherit;white-space:nowrap;cursor:pointer;user-select:none;background-color:transparent;border:0;appearance:none;}", ";", ";", ";"], props => props.muted ? get('colors.
|
25
|
+
})(["color:", ";text-decoration:", ";&:hover{text-decoration:", ";", ";}&:is(button){display:inline-block;padding:0;font-size:inherit;white-space:nowrap;cursor:pointer;user-select:none;background-color:transparent;border:0;appearance:none;}", ";", ";", ";"], props => props.muted ? get('colors.text.secondary')(props) : get('colors.text.link')(props), props => props.underline ? 'underline' : 'none', props => props.muted ? 'none' : 'underline', props => props.hoverColor ? hoverColor : props.muted ? `color: ${get('colors.text.link')(props)}` : '', TYPOGRAPHY, COMMON, sx);
|
15
26
|
export default Link;
|
package/lib-esm/Overlay.js
CHANGED
@@ -1,156 +1,78 @@
|
|
1
1
|
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); }
|
2
2
|
|
3
3
|
import styled from 'styled-components';
|
4
|
-
import React
|
5
|
-
import { get, COMMON } from './constants';
|
4
|
+
import React from 'react';
|
5
|
+
import { get, COMMON, POSITION } from './constants';
|
6
6
|
import { useOverlay } from './hooks';
|
7
7
|
import Portal from './Portal';
|
8
8
|
import sx from './sx';
|
9
|
-
import { useCombinedRefs } from './hooks/useCombinedRefs';
|
10
|
-
import { useTheme } from './ThemeProvider';
|
11
9
|
const heightMap = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
large: '432px',
|
16
|
-
xlarge: '600px',
|
17
|
-
auto: 'auto',
|
18
|
-
initial: 'auto' // Passing 'initial' initially applies 'auto'
|
19
|
-
|
10
|
+
sm: '480px',
|
11
|
+
md: '640px',
|
12
|
+
auto: 'auto'
|
20
13
|
};
|
21
14
|
const widthMap = {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
xxlarge: '960px',
|
15
|
+
sm: '256px',
|
16
|
+
md: '320px',
|
17
|
+
lg: '480px',
|
18
|
+
xl: '640px',
|
27
19
|
auto: 'auto'
|
28
20
|
};
|
29
|
-
|
30
|
-
|
31
|
-
function getSlideAnimationStartingVector(anchorSide) {
|
32
|
-
if (anchorSide !== null && anchorSide !== void 0 && anchorSide.endsWith('bottom')) {
|
33
|
-
return {
|
34
|
-
x: 0,
|
35
|
-
y: -1
|
36
|
-
};
|
37
|
-
} else if (anchorSide !== null && anchorSide !== void 0 && anchorSide.endsWith('top')) {
|
38
|
-
return {
|
39
|
-
x: 0,
|
40
|
-
y: 1
|
41
|
-
};
|
42
|
-
} else if (anchorSide !== null && anchorSide !== void 0 && anchorSide.endsWith('right')) {
|
43
|
-
return {
|
44
|
-
x: -1,
|
45
|
-
y: 0
|
46
|
-
};
|
47
|
-
} else if (anchorSide !== null && anchorSide !== void 0 && anchorSide.endsWith('left')) {
|
48
|
-
return {
|
49
|
-
x: 1,
|
50
|
-
y: 0
|
51
|
-
};
|
52
|
-
}
|
53
|
-
|
54
|
-
return {
|
55
|
-
x: 0,
|
56
|
-
y: 0
|
57
|
-
};
|
58
|
-
}
|
21
|
+
/*TODO replace with shadow functional color variable when it's shipped to primer/primitives*/
|
59
22
|
|
60
23
|
const StyledOverlay = styled.div.withConfig({
|
61
24
|
displayName: "Overlay__StyledOverlay",
|
62
25
|
componentId: "jhwkzw-0"
|
63
|
-
})(["background-color:", ";box-shadow:
|
26
|
+
})(["background-color:", ";box-shadow:0px 1px 3px rgba(0,0,0,0.12),0px 8px 24px rgba(149,157,165,0.2);position:absolute;min-width:192px;max-width:640px;height:", ";width:", ";border-radius:12px;overflow:hidden;animation:overlay-appear 200ms ", ";@keyframes overlay-appear{0%{opacity:0;transform:translateY(", ");}100%{opacity:1;}}visibility:", ";", ";", ";", ";"], get('colors.bg.overlay'), props => heightMap[props.height || 'auto'], props => widthMap[props.width || 'auto'], get('animation.easeOutCubic'), get('space.2'), props => props.visibility, COMMON, POSITION, sx);
|
64
27
|
|
65
28
|
/**
|
66
29
|
* An `Overlay` is a flexible floating surface, used to display transient content such as menus,
|
67
30
|
* selection options, dialogs, and more. Overlays use shadows to express elevation. The `Overlay`
|
68
31
|
* component handles all behaviors needed by overlay UIs as well as the common styles that all overlays * should have.
|
32
|
+
* @param positionSettings Settings for calculating the anchored position.
|
33
|
+
* @param positionDeps Dependencies to determine when to re-calculate the position of the overlay.
|
69
34
|
* @param ignoreClickRefs Optional. An array of ref objects to ignore clicks on in the `onOutsideClick` behavior. This is often used to ignore clicking on the element that toggles the open/closed state for the `Overlay` to prevent the `Overlay` from being toggled twice.
|
70
35
|
* @param initialFocusRef Optional. Ref for the element to focus when the `Overlay` is opened. If nothing is provided, the first focusable element in the `Overlay` body is focused.
|
36
|
+
* @param anchorRef Required. Element the `Overlay` should be anchored to.
|
71
37
|
* @param returnFocusRef Required. Ref for the element to focus when the `Overlay` is closed.
|
72
|
-
* @param onClickOutside Required. Function to call when clicking outside of the `Overlay`. Typically this function
|
73
|
-
* @param onEscape Required. Function to call when user presses `Escape`. Typically this function
|
74
|
-
* @param width Sets the width of the `Overlay`, pick from our set list of widths, or pass `auto` to automatically set the width based on the content of the `Overlay`. `
|
75
|
-
* @param height Sets the height of the `Overlay`, pick from our set list of heights, or pass `auto` to automatically set the height based on the content of the `Overlay
|
76
|
-
* @param maxHeight Sets the maximum height of the `Overlay`, pick from our set list of heights. `xsmall` corresponds to `192px`, `small` corresponds to `256px`, `medium` corresponds to `320px`, `large` corresponds to `432px`, `xlarge` corresponds to `600px`.
|
77
|
-
* @param anchorSide If provided, the Overlay will slide into position from the side of the anchor with a brief animation
|
78
|
-
* @param top Optional. Vertical position of the overlay, relative to its closest positioned ancestor (often its `Portal`).
|
79
|
-
* @param left Optional. Horizontal position of the overlay, relative to its closest positioned ancestor (often its `Portal`).
|
80
|
-
* @param portalContainerName Optional. The name of the portal container to render the Overlay into.
|
38
|
+
* @param onClickOutside Required. Function to call when clicking outside of the `Overlay`. Typically this function sets the `Overlay` visibility state to `false`.
|
39
|
+
* @param onEscape Required. Function to call when user presses `Escape`. Typically this function sets the `Overlay` visibility state to `false`.
|
40
|
+
* @param width Sets the width of the `Overlay`, pick from our set list of widths, or pass `auto` to automatically set the width based on the content of the `Overlay`. `sm` corresponds to `256px`, `md` corresponds to `320px`, `lg` corresponds to `480px`, and `xl` corresponds to `640px`.
|
41
|
+
* @param height Sets the height of the `Overlay`, pick from our set list of heights, or pass `auto` to automatically set the height based on the content of the `Overlay`. `sm` corresponds to `480px` and `md` corresponds to `640px`.
|
81
42
|
*/
|
82
|
-
const Overlay =
|
43
|
+
const Overlay = ({
|
83
44
|
onClickOutside,
|
84
|
-
role = '
|
45
|
+
role = 'dialog',
|
46
|
+
positionSettings,
|
47
|
+
positionDeps,
|
48
|
+
anchorRef,
|
85
49
|
initialFocusRef,
|
86
50
|
returnFocusRef,
|
87
51
|
ignoreClickRefs,
|
88
52
|
onEscape,
|
89
|
-
visibility = 'visible',
|
90
|
-
height,
|
91
|
-
top,
|
92
|
-
left,
|
93
|
-
anchorSide,
|
94
|
-
portalContainerName,
|
95
53
|
...rest
|
96
|
-
}
|
97
|
-
const overlayRef = useRef(null);
|
98
|
-
const combinedRef = useCombinedRefs(overlayRef, forwardedRef);
|
54
|
+
}) => {
|
99
55
|
const {
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
56
|
+
position,
|
57
|
+
...overlayRest
|
58
|
+
} = useOverlay({
|
59
|
+
anchorRef,
|
60
|
+
positionSettings,
|
61
|
+
positionDeps,
|
106
62
|
returnFocusRef,
|
107
63
|
onEscape,
|
108
64
|
ignoreClickRefs,
|
109
65
|
onClickOutside,
|
110
66
|
initialFocusRef
|
111
67
|
});
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
if (height === 'initial' && (_combinedRef$current = combinedRef.current) !== null && _combinedRef$current !== void 0 && _combinedRef$current.clientHeight) {
|
116
|
-
combinedRef.current.style.height = `${combinedRef.current.clientHeight}px`;
|
117
|
-
}
|
118
|
-
}, [height, combinedRef]);
|
119
|
-
useLayoutEffect(() => {
|
120
|
-
var _overlayRef$current;
|
121
|
-
|
122
|
-
const {
|
123
|
-
x,
|
124
|
-
y
|
125
|
-
} = getSlideAnimationStartingVector(anchorSide);
|
126
|
-
|
127
|
-
if (!x && !y || !((_overlayRef$current = overlayRef.current) !== null && _overlayRef$current !== void 0 && _overlayRef$current.animate) || visibility === 'hidden') {
|
128
|
-
return;
|
129
|
-
} // JS animation is required because Safari does not allow css animations to start paused and then run
|
130
|
-
|
131
|
-
|
132
|
-
overlayRef.current.animate({
|
133
|
-
transform: [`translate(${slideAnimationDistance * x}px, ${slideAnimationDistance * y}px)`, `translate(0, 0)`]
|
134
|
-
}, {
|
135
|
-
duration: animationDuration,
|
136
|
-
easing: slideAnimationEasing
|
137
|
-
});
|
138
|
-
}, [anchorSide, slideAnimationDistance, slideAnimationEasing, visibility]);
|
139
|
-
return /*#__PURE__*/React.createElement(Portal, {
|
140
|
-
containerName: portalContainerName
|
141
|
-
}, /*#__PURE__*/React.createElement(StyledOverlay, _extends({
|
142
|
-
height: height,
|
68
|
+
return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(StyledOverlay, _extends({}, overlayRest, position, {
|
69
|
+
visibility: position ? 'visible' : 'hidden',
|
70
|
+
"aria-modal": "true",
|
143
71
|
role: role
|
144
|
-
}, rest
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
left: `${left || 0}px`,
|
149
|
-
...rest.style,
|
150
|
-
'--styled-overlay-visibility': visibility
|
151
|
-
}
|
152
|
-
})));
|
153
|
-
});
|
72
|
+
}, rest)));
|
73
|
+
};
|
74
|
+
|
75
|
+
Overlay.displayName = "Overlay";
|
154
76
|
Overlay.defaultProps = {
|
155
77
|
height: 'auto',
|
156
78
|
width: 'auto'
|
package/lib-esm/Pagehead.js
CHANGED
@@ -4,5 +4,5 @@ import sx from './sx';
|
|
4
4
|
const Pagehead = styled.div.withConfig({
|
5
5
|
displayName: "Pagehead",
|
6
6
|
componentId: "sc-1ntn78e-0"
|
7
|
-
})(["position:relative;padding-top:", ";padding-bottom:", ";margin-bottom:", ";border-bottom:1px solid ", ";", ";", ";"], get('space.4'), get('space.4'), get('space.4'), get('colors.border.
|
7
|
+
})(["position:relative;padding-top:", ";padding-bottom:", ";margin-bottom:", ";border-bottom:1px solid ", ";", ";", ";"], get('space.4'), get('space.4'), get('space.4'), get('colors.border.primary'), COMMON, sx);
|
8
8
|
export default Pagehead;
|
@@ -9,7 +9,7 @@ import { buildComponentData, buildPaginationModel } from './model';
|
|
9
9
|
const Page = styled.a.withConfig({
|
10
10
|
displayName: "Pagination__Page",
|
11
11
|
componentId: "b80nss-0"
|
12
|
-
})(["display:inline-block;min-width:32px;padding:5px 10px;font-style:normal;line-height:20px;color:", ";text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;text-decoration:none;margin-right:", ";&:last-child{margin-right:0;}border:", " solid transparent;border-radius:", ";transition:border-color 0.2s cubic-bezier(0.3,0,0.5,1);&:hover,&:focus{text-decoration:none;border-color:", ";outline:0;transition-duration:0.1s;}&:active{border-color:", ";}&[rel='prev'],&[rel='next']{color:", ";}&[aria-current],&[aria-current]:hover{color:", ";background-color:", ";border-color:transparent;}&[aria-disabled],&[aria-disabled]:hover{color:", ";cursor:default;border-color:transparent;}@supports (clip-path:polygon(50% 0,100% 50%,50% 100%)){&[rel='prev']::before,&[rel='next']::after{display:inline-block;width:16px;height:16px;vertical-align:text-bottom;content:'';background-color:currentColor;}&[rel='prev']::before{margin-right:", ";clip-path:polygon( 9.8px 12.8px,8.7px 12.8px,4.5px 8.5px,4.5px 7.5px,8.7px 3.2px,9.8px 4.3px,6.1px 8px,9.8px 11.7px,9.8px 12.8px );}&[rel='next']::after{margin-left:", ";clip-path:polygon( 6.2px 3.2px,7.3px 3.2px,11.5px 7.5px,11.5px 8.5px,7.3px 12.8px,6.2px 11.7px,9.9px 8px,6.2px 4.3px,6.2px 3.2px );}}", ";"], get('colors.
|
12
|
+
})(["display:inline-block;min-width:32px;padding:5px 10px;font-style:normal;line-height:20px;color:", ";text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;text-decoration:none;margin-right:", ";&:last-child{margin-right:0;}border:", " solid transparent;border-radius:", ";transition:border-color 0.2s cubic-bezier(0.3,0,0.5,1);&:hover,&:focus{text-decoration:none;border-color:", ";outline:0;transition-duration:0.1s;}&:active{border-color:", ";}&[rel='prev'],&[rel='next']{color:", ";}&[aria-current],&[aria-current]:hover{color:", ";background-color:", ";border-color:transparent;}&[aria-disabled],&[aria-disabled]:hover{color:", ";cursor:default;border-color:transparent;}@supports (clip-path:polygon(50% 0,100% 50%,50% 100%)){&[rel='prev']::before,&[rel='next']::after{display:inline-block;width:16px;height:16px;vertical-align:text-bottom;content:'';background-color:currentColor;}&[rel='prev']::before{margin-right:", ";clip-path:polygon( 9.8px 12.8px,8.7px 12.8px,4.5px 8.5px,4.5px 7.5px,8.7px 3.2px,9.8px 4.3px,6.1px 8px,9.8px 11.7px,9.8px 12.8px );}&[rel='next']::after{margin-left:", ";clip-path:polygon( 6.2px 3.2px,7.3px 3.2px,11.5px 7.5px,11.5px 8.5px,7.3px 12.8px,6.2px 11.7px,9.9px 8px,6.2px 4.3px,6.2px 3.2px );}}", ";"], get('colors.text.primary'), get('space.1'), get('borderWidths.1'), get('radii.2'), get('colors.border.primary'), get('colors.border.secondary'), get('colors.text.link'), get('colors.state.selected.primaryText'), get('colors.state.selected.primaryBg'), get('colors.text.disabled'), get('space.1'), get('space.1'), COMMON);
|
13
13
|
|
14
14
|
function usePaginationPages({
|
15
15
|
theme,
|
@@ -81,8 +81,7 @@ Pagination.displayName = "Pagination";
|
|
81
81
|
|
82
82
|
function defaultHrefBuilder(pageNum) {
|
83
83
|
return `#${pageNum}`;
|
84
|
-
}
|
85
|
-
|
84
|
+
}
|
86
85
|
|
87
86
|
function noop() {}
|
88
87
|
|
package/lib-esm/Popover.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import classnames from 'classnames';
|
2
2
|
import styled from 'styled-components';
|
3
|
-
import
|
3
|
+
import BorderBox from './BorderBox';
|
4
4
|
import { COMMON, get, LAYOUT, POSITION } from './constants';
|
5
5
|
import sx from './sx';
|
6
6
|
const Popover = styled.div.attrs(({
|
@@ -14,10 +14,10 @@ const Popover = styled.div.attrs(({
|
|
14
14
|
displayName: "Popover",
|
15
15
|
componentId: "sc-1nxygy2-0"
|
16
16
|
})(["position:", ";z-index:100;display:", ";", ";", ";", ";", ";"], props => props.relative ? 'relative' : 'absolute', props => props.open ? 'block' : 'none', COMMON, LAYOUT, POSITION, sx);
|
17
|
-
const PopoverContent = styled(
|
17
|
+
const PopoverContent = styled(BorderBox).withConfig({
|
18
18
|
displayName: "Popover__PopoverContent",
|
19
19
|
componentId: "sc-1nxygy2-1"
|
20
|
-
})(["
|
20
|
+
})(["position:relative;width:232px;margin-right:auto;margin-left:auto;padding:", ";background-color:", ";", ";", ";&::before,&::after{position:absolute;left:50%;display:inline-block;content:'';}&::before{top:-", ";margin-left:-9px;border:", " solid transparent;border-bottom-color:", ";}&::after{top:-14px;margin-left:-", ";border:7px solid transparent;border-bottom-color:", ";}", ".caret-pos--bottom &,", ".caret-pos--bottom-right &,", ".caret-pos--bottom-left &{&::before,&::after{top:auto;border-bottom-color:transparent;}&::before{bottom:-", ";border-top-color:", ";}&::after{bottom:-14px;border-top-color:", ";}}", ".caret-pos--top-right &,", ".caret-pos--bottom-right &{right:-9px;margin-right:0;&::before,&::after{left:auto;margin-left:0;}&::before{right:20px;}&::after{right:21px;}}", ".caret-pos--top-left &,", ".caret-pos--bottom-left &{left:-9px;margin-left:0;&::before,&::after{left:", ";margin-left:0;}&::after{left:calc(", " + 1px);}}", ".caret-pos--right &,", ".caret-pos--right-top &,", ".caret-pos--right-bottom &,", ".caret-pos--left &,", ".caret-pos--left-top &,", ".caret-pos--left-bottom &{&::before,&::after{top:50%;left:auto;margin-left:0;border-bottom-color:transparent;}&::before{margin-top:calc((", " + 1px) * -1);}&::after{margin-top:-", ";}}", ".caret-pos--right &,", ".caret-pos--right-top &,", ".caret-pos--right-bottom &{&::before{right:-", ";border-left-color:", ";}&::after{right:-14px;border-left-color:", ";}}", ".caret-pos--left &,", ".caret-pos--left-top &,", ".caret-pos--left-bottom &{&::before{left:-", ";border-right-color:", ";}&::after{left:-14px;border-right-color:", ";}}", ".caret-pos--right-top &,", ".caret-pos--left-top &{&::before,&::after{top:", ";}}", ".caret-pos--right-bottom &,", ".caret-pos--left-bottom &{&::before,&::after{top:auto;}&::before{bottom:", ";}&::after{bottom:calc(", " + 1px);}}", ";"], get('space.4'), get('colors.bg.overlay'), COMMON, LAYOUT, get('space.3'), get('space.2'), get('colors.border.overlay'), get('space.2'), get('colors.bg.overlay'), Popover, Popover, Popover, get('space.3'), get('colors.border.overlay'), get('colors.bg.overlay'), Popover, Popover, Popover, Popover, get('space.4'), get('space.4'), Popover, Popover, Popover, Popover, Popover, Popover, get('space.2'), get('space.2'), Popover, Popover, Popover, get('space.3'), get('colors.border.overlay'), get('colors.bg.overlay'), Popover, Popover, Popover, get('space.3'), get('colors.border.overlay'), get('colors.bg.overlay'), Popover, Popover, get('space.4'), Popover, Popover, get('space.3'), get('space.3'), sx);
|
21
21
|
Popover.defaultProps = {
|
22
22
|
caret: 'top'
|
23
23
|
};
|
package/lib-esm/Portal/Portal.js
CHANGED
@@ -10,24 +10,23 @@ const portalRootRegistry = {};
|
|
10
10
|
* If name is not specified, registers the default portal root.
|
11
11
|
*/
|
12
12
|
|
13
|
-
export function registerPortalRoot(root, name
|
14
|
-
|
13
|
+
export function registerPortalRoot(root, name) {
|
14
|
+
if (root instanceof Element) {
|
15
|
+
portalRootRegistry[name !== null && name !== void 0 ? name : DEFAULT_PORTAL_CONTAINER_NAME] = root;
|
16
|
+
} else {
|
17
|
+
delete portalRootRegistry[name !== null && name !== void 0 ? name : DEFAULT_PORTAL_CONTAINER_NAME];
|
18
|
+
}
|
15
19
|
} // Ensures that a default portal root exists and is registered. If a DOM element exists
|
16
|
-
// with id __primerPortalRoot__, allow that element to serve as the default
|
20
|
+
// with id __primerPortalRoot__, allow that element to serve as the default portl root.
|
17
21
|
// Otherwise, create that element and attach it to the end of document.body.
|
18
22
|
|
19
23
|
function ensureDefaultPortal() {
|
20
|
-
|
21
|
-
|
22
|
-
if (!existingDefaultPortalContainer || !document.body.contains(existingDefaultPortalContainer)) {
|
24
|
+
if (!(DEFAULT_PORTAL_CONTAINER_NAME in portalRootRegistry)) {
|
23
25
|
let defaultPortalContainer = document.getElementById(PRIMER_PORTAL_ROOT_ID);
|
24
26
|
|
25
27
|
if (!(defaultPortalContainer instanceof Element)) {
|
26
28
|
defaultPortalContainer = document.createElement('div');
|
27
29
|
defaultPortalContainer.setAttribute('id', PRIMER_PORTAL_ROOT_ID);
|
28
|
-
defaultPortalContainer.style.position = 'absolute';
|
29
|
-
defaultPortalContainer.style.top = '0';
|
30
|
-
defaultPortalContainer.style.left = '0';
|
31
30
|
const suitablePortalRoot = document.querySelector('[data-portal-root]');
|
32
31
|
|
33
32
|
if (suitablePortalRoot) {
|
@@ -37,7 +36,7 @@ function ensureDefaultPortal() {
|
|
37
36
|
}
|
38
37
|
}
|
39
38
|
|
40
|
-
|
39
|
+
portalRootRegistry[DEFAULT_PORTAL_CONTAINER_NAME] = defaultPortalContainer;
|
41
40
|
}
|
42
41
|
}
|
43
42
|
|
@@ -50,17 +49,11 @@ export const Portal = ({
|
|
50
49
|
onMount,
|
51
50
|
containerName: _containerName
|
52
51
|
}) => {
|
53
|
-
const
|
54
|
-
// with each other in unexpected ways. One should never find themselves tempted
|
55
|
-
// to change the zIndex to a value other than "1".
|
56
|
-
|
57
|
-
hostElement.style.position = 'relative';
|
58
|
-
hostElement.style.zIndex = '1';
|
59
|
-
const elementRef = React.useRef(hostElement);
|
52
|
+
const elementRef = React.useRef(document.createElement('div'));
|
60
53
|
React.useLayoutEffect(() => {
|
61
54
|
let containerName = _containerName;
|
62
55
|
|
63
|
-
if (containerName
|
56
|
+
if (containerName == undefined) {
|
64
57
|
containerName = DEFAULT_PORTAL_CONTAINER_NAME;
|
65
58
|
ensureDefaultPortal();
|
66
59
|
}
|
@@ -78,5 +71,5 @@ export const Portal = ({
|
|
78
71
|
parentElement.removeChild(element);
|
79
72
|
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
80
73
|
}, [elementRef]);
|
81
|
-
return
|
74
|
+
return createPortal(children, elementRef.current);
|
82
75
|
};
|
package/lib-esm/Portal/index.js
CHANGED
package/lib-esm/Position.js
CHANGED
@@ -3,64 +3,39 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
3
3
|
import React from 'react';
|
4
4
|
import styled from 'styled-components';
|
5
5
|
import Box from './Box';
|
6
|
-
|
7
|
-
|
8
|
-
* @deprecated Use the Box component instead (i.e. <Position> → <Box>)
|
9
|
-
*/
|
6
|
+
import { POSITION } from './constants';
|
7
|
+
import sx from './sx';
|
10
8
|
const Position = styled(Box).withConfig({
|
11
9
|
displayName: "Position",
|
12
10
|
componentId: "fla1y3-0"
|
13
|
-
})([""]);
|
14
|
-
|
15
|
-
/**
|
16
|
-
* @deprecated Use the Box component instead (i.e. <Absolute> → <Box position="absolute">)
|
17
|
-
*/
|
11
|
+
})(["", ";", ";"], POSITION, sx);
|
18
12
|
export default Position; // Absolute
|
19
13
|
|
20
|
-
|
21
|
-
* @deprecated Use the Box component instead (i.e. <Absolute> → <Box position="absolute">)
|
22
|
-
*/
|
23
|
-
export const Absolute = /*#__PURE__*/React.forwardRef((props, ref) => {
|
14
|
+
export function Absolute(props) {
|
24
15
|
return /*#__PURE__*/React.createElement(Position, _extends({}, props, {
|
25
|
-
position: "absolute"
|
26
|
-
ref: ref
|
16
|
+
position: "absolute"
|
27
17
|
}));
|
28
|
-
}
|
29
|
-
Absolute.displayName =
|
30
|
-
|
31
|
-
/**
|
32
|
-
* @deprecated Use the Box component instead (i.e. <Fixed> → <Box position="fixed">)
|
33
|
-
*/
|
34
|
-
export const Fixed = /*#__PURE__*/React.forwardRef((props, ref) => {
|
18
|
+
}
|
19
|
+
Absolute.displayName = "Absolute";
|
20
|
+
export function Fixed(props) {
|
35
21
|
return /*#__PURE__*/React.createElement(Position, _extends({}, props, {
|
36
|
-
position: "fixed"
|
37
|
-
ref: ref
|
22
|
+
position: "fixed"
|
38
23
|
}));
|
39
|
-
}
|
40
|
-
Fixed.displayName =
|
41
|
-
|
42
|
-
/**
|
43
|
-
* @deprecated Use the Box component instead (i.e. <Relative> → <Box position="relative">)
|
44
|
-
*/
|
45
|
-
export const Relative = /*#__PURE__*/React.forwardRef((props, ref) => {
|
24
|
+
}
|
25
|
+
Fixed.displayName = "Fixed";
|
26
|
+
export function Relative(props) {
|
46
27
|
return /*#__PURE__*/React.createElement(Position, _extends({}, props, {
|
47
|
-
position: "relative"
|
48
|
-
ref: ref
|
28
|
+
position: "relative"
|
49
29
|
}));
|
50
|
-
}
|
51
|
-
Relative.displayName =
|
52
|
-
|
53
|
-
/**
|
54
|
-
* @deprecated Use the Box component instead (i.e. <Sticky> → <Box position="sticky">)
|
55
|
-
*/
|
56
|
-
export const Sticky = /*#__PURE__*/React.forwardRef((props, ref) => {
|
30
|
+
}
|
31
|
+
Relative.displayName = "Relative";
|
32
|
+
export function Sticky(props) {
|
57
33
|
return /*#__PURE__*/React.createElement(Position, _extends({}, props, {
|
58
|
-
position: "sticky"
|
59
|
-
ref: ref
|
34
|
+
position: "sticky"
|
60
35
|
}));
|
61
|
-
}
|
36
|
+
}
|
37
|
+
Sticky.displayName = "Sticky";
|
62
38
|
Sticky.defaultProps = {
|
63
39
|
top: 0,
|
64
40
|
zIndex: 1
|
65
|
-
};
|
66
|
-
Sticky.displayName = 'Sticky';
|
41
|
+
};
|
package/lib-esm/ProgressBar.js
CHANGED
@@ -17,7 +17,7 @@ const sizeMap = {
|
|
17
17
|
const ProgressContainer = styled.span.withConfig({
|
18
18
|
displayName: "ProgressBar__ProgressContainer",
|
19
19
|
componentId: "sc-1tiva13-1"
|
20
|
-
})(["display:", ";overflow:hidden;background-color:", ";border-radius:", ";height:", ";", " ", " ", ";"], props => props.inline ? 'inline-flex' : 'flex', get('colors.border.
|
20
|
+
})(["display:", ";overflow:hidden;background-color:", ";border-radius:", ";height:", ";", " ", " ", ";"], props => props.inline ? 'inline-flex' : 'flex', get('colors.border.primary'), get('radii.1'), props => sizeMap[props.barSize || 'default'], COMMON, width, sx);
|
21
21
|
|
22
22
|
function ProgressBar({
|
23
23
|
progress,
|
@@ -36,10 +36,10 @@ const StyledSelectMenu = styled.details.withConfig({
|
|
36
36
|
componentId: "i7h45b-0"
|
37
37
|
})(["", " ", " ", ";"], wrapperStyles, COMMON, sx);
|
38
38
|
// 'as' is spread out because we don't want users to be able to change the tag.
|
39
|
-
const SelectMenu =
|
39
|
+
const SelectMenu = React.forwardRef(({
|
40
40
|
children,
|
41
41
|
initialTab = '',
|
42
|
-
as
|
42
|
+
as,
|
43
43
|
...rest
|
44
44
|
}, forwardedRef) => {
|
45
45
|
const backupRef = useRef(null);
|
@@ -86,7 +86,7 @@ const SelectMenu = /*#__PURE__*/React.forwardRef(({
|
|
86
86
|
});
|
87
87
|
SelectMenu.displayName = 'SelectMenu';
|
88
88
|
export default Object.assign(SelectMenu, {
|
89
|
-
MenuContext,
|
89
|
+
MenuContext: MenuContext,
|
90
90
|
List: SelectMenuList,
|
91
91
|
Divider: SelectMenuDivider,
|
92
92
|
Filter: SelectMenuFilter,
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { createContext } from 'react';
|
2
|
-
export const MenuContext =
|
2
|
+
export const MenuContext = createContext({});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import styled, { css } from 'styled-components';
|
2
2
|
import { COMMON, get } from '../constants';
|
3
3
|
import sx from '../sx';
|
4
|
-
const dividerStyles = css(["padding:", " ", ";margin:0;font-size:", ";font-weight:", ";color:", ";background-color:", ";border-bottom:", " solid ", ";"], get('space.1'), get('space.3'), get('fontSizes.0'), get('fontWeights.bold'), get('colors.
|
4
|
+
const dividerStyles = css(["padding:", " ", ";margin:0;font-size:", ";font-weight:", ";color:", ";background-color:", ";border-bottom:", " solid ", ";"], get('space.1'), get('space.3'), get('fontSizes.0'), get('fontWeights.bold'), get('colors.text.tertiary'), get('colors.bg.tertiary'), get('borderWidths.1'), get('colors.selectMenu.borderSecondary'));
|
5
5
|
const SelectMenuDivider = styled.div.withConfig({
|
6
6
|
displayName: "SelectMenuDivider",
|
7
7
|
componentId: "sc-2p0bwt-0"
|