@primer/components 0.0.0-202181722217 → 0.0.0-202181723821
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +23 -1
- package/dist/browser.esm.js +665 -619
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +432 -386
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Divider.js +1 -1
- package/lib/ActionList/Header.js +2 -2
- package/lib/ActionList/Item.js +13 -13
- package/lib/ActionList/List.js +1 -1
- package/lib/AnchoredOverlay/AnchoredOverlay.js +2 -2
- package/lib/Avatar.d.ts +4 -0
- package/lib/AvatarPair.js +1 -1
- package/lib/AvatarStack.js +1 -1
- package/lib/BranchName.js +1 -1
- package/lib/Breadcrumb.js +2 -2
- package/lib/Button/Button.js +1 -1
- package/lib/Button/ButtonClose.js +1 -1
- package/lib/Button/ButtonInvisible.js +1 -1
- package/lib/Button/ButtonTableList.js +1 -1
- package/lib/CircleBadge.js +1 -1
- package/lib/CircleOcticon.js +1 -1
- package/lib/CounterLabel.js +2 -2
- package/lib/Dialog/ConfirmationDialog.js +1 -1
- package/lib/Dialog/Dialog.js +9 -9
- package/lib/Dialog.js +4 -4
- package/lib/Dropdown.js +2 -2
- package/lib/DropdownStyles.js +6 -6
- package/lib/FilterList.js +1 -1
- package/lib/FilteredActionList/FilteredActionList.js +5 -5
- package/lib/Flash.js +1 -1
- package/lib/Label.js +2 -2
- package/lib/Link.js +1 -1
- package/lib/Overlay.d.ts +1 -2
- package/lib/Overlay.js +6 -11
- package/lib/Pagehead.js +1 -1
- package/lib/Pagination/Pagination.js +1 -1
- package/lib/Popover.js +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/SelectMenu/SelectMenu.d.ts +11 -327
- package/lib/SelectMenu/SelectMenuDivider.js +1 -1
- package/lib/SelectMenu/SelectMenuFilter.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib/SelectMenu/SelectMenuHeader.js +2 -2
- package/lib/SelectMenu/SelectMenuItem.js +1 -1
- package/lib/SelectMenu/SelectMenuList.js +1 -1
- package/lib/SelectMenu/SelectMenuLoadingAnimation.js +1 -1
- package/lib/SelectMenu/SelectMenuModal.js +2 -2
- package/lib/SelectMenu/SelectMenuTab.js +1 -1
- package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib/SideNav.js +5 -5
- package/lib/StateLabel.js +1 -1
- package/lib/SubNav.js +1 -1
- package/lib/TabNav.js +2 -2
- package/lib/TextInput.d.ts +6 -6
- package/lib/TextInput.js +21 -16
- package/lib/Timeline.js +16 -19
- package/lib/Tooltip.js +1 -1
- package/lib/UnderlineNav.js +2 -2
- package/lib/hooks/useOverlay.d.ts +1 -2
- package/lib/hooks/useOverlay.js +6 -11
- package/lib/index.d.ts +1 -0
- package/lib/index.js +14 -0
- package/lib/theme-preval.d.ts +12 -6
- package/lib/theme-preval.js +940 -0
- package/lib/utils/ssr.d.ts +1 -0
- package/lib/utils/ssr.js +19 -0
- package/lib/utils/testing.d.ts +1854 -0
- package/lib/utils/uniqueId.js +1 -0
- package/lib-esm/ActionList/Divider.js +1 -1
- package/lib-esm/ActionList/Header.js +2 -2
- package/lib-esm/ActionList/Item.js +14 -14
- package/lib-esm/ActionList/List.js +1 -1
- package/lib-esm/AnchoredOverlay/AnchoredOverlay.js +3 -3
- package/lib-esm/Avatar.d.ts +4 -0
- package/lib-esm/AvatarPair.js +1 -1
- package/lib-esm/AvatarStack.js +1 -1
- package/lib-esm/BranchName.js +1 -1
- package/lib-esm/Breadcrumb.js +2 -2
- package/lib-esm/Button/Button.js +1 -1
- package/lib-esm/Button/ButtonClose.js +1 -1
- 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 +1 -1
- package/lib-esm/CounterLabel.js +2 -2
- package/lib-esm/Dialog/ConfirmationDialog.js +1 -1
- package/lib-esm/Dialog/Dialog.js +8 -8
- package/lib-esm/Dialog.js +4 -4
- package/lib-esm/Dropdown.js +2 -2
- package/lib-esm/DropdownStyles.js +6 -6
- package/lib-esm/FilterList.js +1 -1
- package/lib-esm/FilteredActionList/FilteredActionList.js +5 -5
- package/lib-esm/Flash.js +1 -1
- package/lib-esm/Label.js +2 -2
- package/lib-esm/Link.js +1 -1
- package/lib-esm/Overlay.d.ts +1 -2
- package/lib-esm/Overlay.js +6 -9
- package/lib-esm/Pagehead.js +1 -1
- package/lib-esm/Pagination/Pagination.js +1 -1
- package/lib-esm/Popover.js +1 -1
- package/lib-esm/ProgressBar.js +1 -1
- package/lib-esm/SelectMenu/SelectMenu.d.ts +11 -327
- package/lib-esm/SelectMenu/SelectMenuDivider.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuFilter.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuFilter.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuFooter.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuHeader.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuItem.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuList.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.js +2 -2
- package/lib-esm/SelectMenu/SelectMenuTab.js +1 -1
- package/lib-esm/SelectMenu/SelectMenuTabPanel.js +1 -1
- package/lib-esm/SideNav.js +5 -5
- package/lib-esm/StateLabel.js +1 -1
- package/lib-esm/SubNav.js +1 -1
- package/lib-esm/TabNav.js +2 -2
- package/lib-esm/TextInput.d.ts +6 -6
- package/lib-esm/TextInput.js +22 -16
- package/lib-esm/Timeline.js +12 -17
- package/lib-esm/Tooltip.js +1 -1
- package/lib-esm/UnderlineNav.js +2 -2
- package/lib-esm/hooks/useOverlay.d.ts +1 -2
- package/lib-esm/hooks/useOverlay.js +6 -11
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.js +2 -1
- package/lib-esm/theme-preval.d.ts +12 -6
- package/lib-esm/theme-preval.js +940 -0
- package/lib-esm/utils/ssr.d.ts +1 -0
- package/lib-esm/utils/ssr.js +1 -0
- package/lib-esm/utils/testing.d.ts +1854 -0
- package/lib-esm/utils/uniqueId.js +1 -0
- package/package.json +5 -6
- package/lib/Autocomplete/Autocomplete.d.ts +0 -36
- package/lib/Autocomplete/Autocomplete.js +0 -55
- package/lib/Autocomplete/AutocompleteContext.d.ts +0 -13
- package/lib/Autocomplete/AutocompleteContext.js +0 -14
- package/lib/Autocomplete/AutocompleteInput.d.ts +0 -9
- package/lib/Autocomplete/AutocompleteInput.js +0 -123
- package/lib/Autocomplete/AutocompleteMenu.d.ts +0 -20
- package/lib/Autocomplete/AutocompleteMenu.js +0 -268
- package/lib/Autocomplete/index.d.ts +0 -2
- package/lib/Autocomplete/index.js +0 -15
- package/lib/Badge/Badge.d.ts +0 -8
- package/lib/Badge/Badge.js +0 -59
- package/lib/Badge/BadgeState.d.ts +0 -13
- package/lib/Badge/BadgeState.js +0 -51
- package/lib/Badge/_badgeStyleUtils.d.ts +0 -3
- package/lib/Badge/_badgeStyleUtils.js +0 -39
- package/lib/TextInputTokens.d.ts +0 -32
- package/lib/TextInputTokens.js +0 -241
- package/lib/TextInputWithTokens.d.ts +0 -41
- package/lib/TextInputWithTokens.js +0 -396
- package/lib/Token/Token.d.ts +0 -7
- package/lib/Token/Token.js +0 -66
- package/lib/Token/TokenBase.d.ts +0 -16
- package/lib/Token/TokenBase.js +0 -76
- package/lib/Token/TokenLabel.d.ts +0 -8
- package/lib/Token/TokenLabel.js +0 -116
- package/lib/Token/TokenProfile.d.ts +0 -7
- package/lib/Token/TokenProfile.js +0 -45
- package/lib/Token/_AddTokenButton.d.ts +0 -3
- package/lib/Token/_AddTokenButton.js +0 -42
- package/lib/Token/_RemoveTokenButton.d.ts +0 -3
- package/lib/Token/_RemoveTokenButton.js +0 -42
- package/lib/Token/_tokenButtonUtils.d.ts +0 -8
- package/lib/Token/_tokenButtonUtils.js +0 -42
- package/lib-esm/Autocomplete/Autocomplete.d.ts +0 -36
- package/lib-esm/Autocomplete/Autocomplete.js +0 -36
- package/lib-esm/Autocomplete/AutocompleteContext.d.ts +0 -13
- package/lib-esm/Autocomplete/AutocompleteContext.js +0 -5
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +0 -9
- package/lib-esm/Autocomplete/AutocompleteInput.js +0 -104
- package/lib-esm/Autocomplete/AutocompleteMenu.d.ts +0 -20
- package/lib-esm/Autocomplete/AutocompleteMenu.js +0 -244
- package/lib-esm/Autocomplete/index.d.ts +0 -2
- package/lib-esm/Autocomplete/index.js +0 -1
- package/lib-esm/Badge/Badge.d.ts +0 -8
- package/lib-esm/Badge/Badge.js +0 -44
- package/lib-esm/Badge/BadgeState.d.ts +0 -13
- package/lib-esm/Badge/BadgeState.js +0 -40
- package/lib-esm/Badge/_badgeStyleUtils.d.ts +0 -3
- package/lib-esm/Badge/_badgeStyleUtils.js +0 -29
- package/lib-esm/TextInputTokens.d.ts +0 -32
- package/lib-esm/TextInputTokens.js +0 -211
- package/lib-esm/TextInputWithTokens.d.ts +0 -41
- package/lib-esm/TextInputWithTokens.js +0 -361
- package/lib-esm/Token/Token.d.ts +0 -7
- package/lib-esm/Token/Token.js +0 -46
- package/lib-esm/Token/TokenBase.d.ts +0 -16
- package/lib-esm/Token/TokenBase.js +0 -56
- package/lib-esm/Token/TokenLabel.d.ts +0 -8
- package/lib-esm/Token/TokenLabel.js +0 -100
- package/lib-esm/Token/TokenProfile.d.ts +0 -7
- package/lib-esm/Token/TokenProfile.js +0 -28
- package/lib-esm/Token/_AddTokenButton.d.ts +0 -3
- package/lib-esm/Token/_AddTokenButton.js +0 -27
- package/lib-esm/Token/_RemoveTokenButton.d.ts +0 -3
- package/lib-esm/Token/_RemoveTokenButton.js +0 -27
- package/lib-esm/Token/_tokenButtonUtils.d.ts +0 -8
- package/lib-esm/Token/_tokenButtonUtils.js +0 -26
@@ -7,7 +7,7 @@ import { COMMON, get } from '../constants';
|
|
7
7
|
import StyledOcticon from '../StyledOcticon';
|
8
8
|
import sx from '../sx';
|
9
9
|
import { MenuContext } from './SelectMenuContext';
|
10
|
-
export const listItemStyles = 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){&:hover,&:active,&:focus{background-color:", ";}}@media (hover:none){&:focus,&:active{background-color:", ";}-webkit-tap-highlight-color:", ";}"], get('space.3'), get('colors.
|
10
|
+
export const listItemStyles = 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){&:hover,&:active,&:focus{background-color:", ";}}@media (hover:none){&:focus,&:active{background-color:", ";}-webkit-tap-highlight-color:", ";}"], get('space.3'), get('colors.canvas.overlay'), get('borderWidths.1'), get('colors.border.muted'), get('colors.fg.muted'), get('fontSizes.0'), get('breakpoints.0'), get('space.2'), get('space.2'), get('space.3'), get('space.2'), get('colors.fg.default'), get('colors.neutral.subtle'), get('colors.canvas.subtle'), get('colors.selectMenu.tapHighlight'));
|
11
11
|
const StyledItem = styled.a.attrs(() => ({
|
12
12
|
role: 'menuitemcheckbox'
|
13
13
|
})).withConfig({
|
@@ -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 listStyles = 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:", ";}}"], get('colors.
|
4
|
+
const listStyles = 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:", ";}}"], get('colors.canvas.overlay'), get('colors.selectMenu.tapFocusBg'), get('colors.fg.default'), get('colors.canvas.subtle'), get('colors.fg.default'), get('colors.canvas.subtle'));
|
5
5
|
const SelectMenuList = styled.div.withConfig({
|
6
6
|
displayName: "SelectMenuList",
|
7
7
|
componentId: "sc-1opbpf6-0"
|
@@ -5,7 +5,7 @@ import Spinner from '../Spinner';
|
|
5
5
|
const Animation = styled.div.withConfig({
|
6
6
|
displayName: "SelectMenuLoadingAnimation__Animation",
|
7
7
|
componentId: "sc-17k54td-0"
|
8
|
-
})(["padding:", " ", ";text-align:center;background-color:", ";", ""], get('space.6'), get('space.4'), get('colors.
|
8
|
+
})(["padding:", " ", ";text-align:center;background-color:", ";", ""], get('space.6'), get('space.4'), get('colors.canvas.overlay'), COMMON);
|
9
9
|
|
10
10
|
const SelectMenuLoadingAnimation = props => {
|
11
11
|
return /*#__PURE__*/React.createElement(Animation, props, /*#__PURE__*/React.createElement(Spinner, null));
|
@@ -6,8 +6,8 @@ import { width } from 'styled-system';
|
|
6
6
|
import { COMMON, get } from '../constants';
|
7
7
|
import sx from '../sx';
|
8
8
|
const animateModal = keyframes(["0%{opacity:0;transform:scale(0.9);}"]);
|
9
|
-
const modalStyles = 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' : '', get('colors.
|
10
|
-
const modalWrapperStyles = 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;}"], get('space.3'), get('colors.
|
9
|
+
const modalStyles = 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' : '', get('colors.canvas.overlay'), get('radii.2'), get('shadows.shadow.small'), animateModal, get('breakpoints.0'), get('space.1'), get('space.3'), get('fontSizes.0'), get('borderWidths.1'), get('colors.border.default'), get('radii.2'), get('shadows.shadow.small'));
|
10
|
+
const modalWrapperStyles = 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;}"], get('space.3'), get('colors.primer.canvas.backdrop'), get('breakpoints.0'), get('breakpoints.0'), props => props.align === 'right' ? '0' : 'auto');
|
11
11
|
const Modal = styled.div.withConfig({
|
12
12
|
displayName: "SelectMenuModal__Modal",
|
13
13
|
componentId: "sc-1m5qo55-0"
|
@@ -6,7 +6,7 @@ import styled, { css } from 'styled-components';
|
|
6
6
|
import { COMMON, get } from '../constants';
|
7
7
|
import sx from '../sx';
|
8
8
|
import { MenuContext } from './SelectMenuContext';
|
9
|
-
const tabStyles = 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:", ";}"], get('space.2'), get('space.3'), get('fontSizes.0'), get('colors.
|
9
|
+
const tabStyles = 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:", ";}"], get('space.2'), get('space.3'), get('fontSizes.0'), get('colors.fg.muted'), get('colors.border.muted'), get('breakpoints.0'), get('space.1'), get('space.3'), get('borderWidths.1'), get('radii.2'), get('radii.2'), get('colors.text-primary'), get('colors.canvas.overlay'), get('colors.border.muted'), get('breakpoints.0'), get('colors.border.muted'), get('colors.neutral.subtle'));
|
10
10
|
const StyledTab = styled.button.withConfig({
|
11
11
|
displayName: "SelectMenuTab__StyledTab",
|
12
12
|
componentId: "ga32sz-0"
|
@@ -9,7 +9,7 @@ import SelectMenuList from './SelectMenuList';
|
|
9
9
|
const TabPanelBase = styled.div.withConfig({
|
10
10
|
displayName: "SelectMenuTabPanel__TabPanelBase",
|
11
11
|
componentId: "ck0ipe-0"
|
12
|
-
})(["border-top:", " solid ", ";", " ", ";"], get('borderWidths.1'), get('colors.
|
12
|
+
})(["border-top:", " solid ", ";", " ", ";"], get('borderWidths.1'), get('colors.border.muted'), COMMON, sx);
|
13
13
|
|
14
14
|
const TabPanel = ({
|
15
15
|
tabName,
|
package/lib-esm/SideNav.js
CHANGED
@@ -28,7 +28,7 @@ function SideNavBase({
|
|
28
28
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
29
29
|
borderWidth: "1px",
|
30
30
|
borderStyle: "solid",
|
31
|
-
borderColor: "border.
|
31
|
+
borderColor: "border.default",
|
32
32
|
borderRadius: 2,
|
33
33
|
as: "nav",
|
34
34
|
className: newClassName
|
@@ -39,11 +39,11 @@ SideNavBase.displayName = "SideNavBase";
|
|
39
39
|
const SideNav = styled(SideNavBase).withConfig({
|
40
40
|
displayName: "SideNav",
|
41
41
|
componentId: "sc-15k667c-0"
|
42
|
-
})(["background-color:", ";", " ", ";", ";"], get('colors.
|
42
|
+
})(["background-color:", ";", " ", ";", ";"], get('colors.canvas.subtle'), props => props.bordered && css(["& > &{border-left:0;border-right:0;border-bottom:0;}"]), COMMON, sx);
|
43
43
|
// used for variant normal hover, focus pseudo selectors
|
44
|
-
const CommonAccessibilityVariantNormalStyles = css(["background-color:", ";outline:none;text-decoration:none;"], get('colors.
|
44
|
+
const CommonAccessibilityVariantNormalStyles = css(["background-color:", ";outline:none;text-decoration:none;"], get('colors.neutral.subtle')); // used for light weight hover, focus pseudo selectors
|
45
45
|
|
46
|
-
const CommonAccessibilityVariantLightWeightStyles = css(["color:", ";text-decoration:none;outline:none;"], get('colors.
|
46
|
+
const CommonAccessibilityVariantLightWeightStyles = css(["color:", ";text-decoration:none;outline:none;"], get('colors.fg.default'));
|
47
47
|
const SideNavLink = styled(Link).attrs(props => {
|
48
48
|
const isReactRouter = typeof props.to === 'string';
|
49
49
|
|
@@ -59,7 +59,7 @@ const SideNavLink = styled(Link).attrs(props => {
|
|
59
59
|
}).withConfig({
|
60
60
|
displayName: "SideNav__SideNavLink",
|
61
61
|
componentId: "sc-15k667c-1"
|
62
|
-
})(["position:relative;display:block;", " width:100%;text-align:left;font-size:", ";& > ", "{border-bottom:none;}", ".variant-normal > &{color:", ";padding:", ";border:0;border-top:", " solid ", ";&:first-child{border-top:0;border-top-right-radius:", ";border-top-left-radius:", ";}&:last-child{border-bottom-right-radius:", ";border-bottom-left-radius:", ";}&::before{position:absolute;top:0;bottom:0;left:0;z-index:1;width:3px;pointer-events:none;content:'';}&:hover{", "}&:focus{", " box-shadow:", ";z-index:1;}&[aria-current='page'],&[aria-selected='true']{background-color:", ";&::before{background-color:", ";}}}", ".variant-lightweight > &{padding:", " 0;color:", ";&:hover{", "}&:focus{", " box-shadow:", ";z-index:1;}&[aria-current='page'],&[aria-selected='true']{color:", ";font-weight:", ";}}", ";"], props => props.variant === 'full' && css(["display:flex;align-items:center;justify-content:space-between;"]), get('fontSizes.1'), SideNav, SideNav, get('colors.
|
62
|
+
})(["position:relative;display:block;", " width:100%;text-align:left;font-size:", ";& > ", "{border-bottom:none;}", ".variant-normal > &{color:", ";padding:", ";border:0;border-top:", " solid ", ";&:first-child{border-top:0;border-top-right-radius:", ";border-top-left-radius:", ";}&:last-child{border-bottom-right-radius:", ";border-bottom-left-radius:", ";}&::before{position:absolute;top:0;bottom:0;left:0;z-index:1;width:3px;pointer-events:none;content:'';}&:hover{", "}&:focus{", " box-shadow:", ";z-index:1;}&[aria-current='page'],&[aria-selected='true']{background-color:", ";&::before{background-color:", ";}}}", ".variant-lightweight > &{padding:", " 0;color:", ";&:hover{", "}&:focus{", " box-shadow:", ";z-index:1;}&[aria-current='page'],&[aria-selected='true']{color:", ";font-weight:", ";}}", ";"], props => props.variant === 'full' && css(["display:flex;align-items:center;justify-content:space-between;"]), get('fontSizes.1'), SideNav, SideNav, get('colors.fg.default'), get('space.3'), get('borderWidths.1'), get('colors.border.muted'), get('radii.2'), get('radii.2'), get('radii.2'), get('radii.2'), CommonAccessibilityVariantNormalStyles, CommonAccessibilityVariantNormalStyles, get('shadows.primer.shadow.focus'), get('colors.sidenav.selectedBg'), get('colors.primer.border.active'), SideNav, get('space.1'), get('colors.accent.fg'), CommonAccessibilityVariantLightWeightStyles, CommonAccessibilityVariantLightWeightStyles, get('shadows.primer.shadow.focus'), get('colors.fg.default'), get('fontWeights.semibold'), sx);
|
63
63
|
SideNav.defaultProps = {
|
64
64
|
variant: 'normal'
|
65
65
|
};
|
package/lib-esm/StateLabel.js
CHANGED
@@ -68,7 +68,7 @@ const sizeVariants = variant({
|
|
68
68
|
const StateLabelBase = styled.span.withConfig({
|
69
69
|
displayName: "StateLabel__StateLabelBase",
|
70
70
|
componentId: "k4pd9e-0"
|
71
|
-
})(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";border-width:1px;border-style:solid;", ";", ";", ";", ";"], get('fontWeights.bold'), get('colors.
|
71
|
+
})(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";border-width:1px;border-style:solid;", ";", ";", ";", ";"], get('fontWeights.bold'), get('colors.canvas.default'), get('radii.3'), colorVariants, sizeVariants, COMMON, sx);
|
72
72
|
|
73
73
|
function StateLabel({
|
74
74
|
children,
|
package/lib-esm/SubNav.js
CHANGED
@@ -47,7 +47,7 @@ const SubNavLink = styled.a.attrs(props => ({
|
|
47
47
|
})).withConfig({
|
48
48
|
displayName: "SubNav__SubNavLink",
|
49
49
|
componentId: "f7w0xa-1"
|
50
|
-
})(["padding-left:", ";padding-right:", ";font-weight:", ";font-size:", ";line-height:20px;min-height:34px;color:", ";text-align:center;text-decoration:none;border-top:1px solid ", ";border-bottom:1px solid ", ";border-right:1px solid ", ";display:flex;align-items:center;&:first-of-type{border-top-left-radius:", ";border-bottom-left-radius:", ";border-left:1px solid ", ";}&:last-of-type{border-top-right-radius:", ";border-bottom-right-radius:", ";}&:hover,&:focus{text-decoration:none;background-color:", ";transition:0.2s ease;.SubNav-octicon{color:", ";}}&.selected{color:", ";background-color:", ";border-color:", ";.SubNav-octicon{color:", ";}}", ";", ";"], get('space.3'), get('space.3'), get('fontWeights.semibold'), get('fontSizes.1'), get('colors.
|
50
|
+
})(["padding-left:", ";padding-right:", ";font-weight:", ";font-size:", ";line-height:20px;min-height:34px;color:", ";text-align:center;text-decoration:none;border-top:1px solid ", ";border-bottom:1px solid ", ";border-right:1px solid ", ";display:flex;align-items:center;&:first-of-type{border-top-left-radius:", ";border-bottom-left-radius:", ";border-left:1px solid ", ";}&:last-of-type{border-top-right-radius:", ";border-bottom-right-radius:", ";}&:hover,&:focus{text-decoration:none;background-color:", ";transition:0.2s ease;.SubNav-octicon{color:", ";}}&.selected{color:", ";background-color:", ";border-color:", ";.SubNav-octicon{color:", ";}}", ";", ";"], get('space.3'), get('space.3'), get('fontWeights.semibold'), get('fontSizes.1'), get('colors.fg.default'), get('colors.border.default'), get('colors.border.default'), get('colors.border.default'), get('radii.2'), get('radii.2'), get('colors.border.default'), get('radii.2'), get('radii.2'), get('colors.canvas.subtle'), get('colors.fg.muted'), get('colors.fg.onEmphasis'), get('colors.accent.emphasis'), get('colors.accent.emphasis'), get('colors.fg.onEmphasis'), COMMON, sx);
|
51
51
|
SubNavLink.displayName = 'SubNav.Link';
|
52
52
|
SubNavLinks.displayName = 'SubNav.Links';
|
53
53
|
export default Object.assign(SubNav, {
|
package/lib-esm/TabNav.js
CHANGED
@@ -9,7 +9,7 @@ const SELECTED_CLASS = 'selected';
|
|
9
9
|
const TabNavBase = styled.div.withConfig({
|
10
10
|
displayName: "TabNav__TabNavBase",
|
11
11
|
componentId: "sc-1xod0ow-0"
|
12
|
-
})(["margin-top:0;border-bottom:1px solid ", ";", " ", ""], get('colors.border.
|
12
|
+
})(["margin-top:0;border-bottom:1px solid ", ";", " ", ""], get('colors.border.default'), COMMON, sx);
|
13
13
|
const TabNavBody = styled.nav.withConfig({
|
14
14
|
displayName: "TabNav__TabNavBody",
|
15
15
|
componentId: "sc-1xod0ow-1"
|
@@ -32,7 +32,7 @@ const TabNavLink = styled.a.attrs(props => ({
|
|
32
32
|
})).withConfig({
|
33
33
|
displayName: "TabNav__TabNavLink",
|
34
34
|
componentId: "sc-1xod0ow-2"
|
35
|
-
})(["padding:8px 12px;font-size:", ";line-height:20px;color:", ";text-decoration:none;background-color:transparent;border:1px solid transparent;border-bottom:0;&:hover,&:focus{color:", ";text-decoration:none;}&.selected{color:", ";border-color:", ";border-top-right-radius:", ";border-top-left-radius:", ";background-color:", ";}", ";", ";"], get('fontSizes.1'), get('colors.
|
35
|
+
})(["padding:8px 12px;font-size:", ";line-height:20px;color:", ";text-decoration:none;background-color:transparent;border:1px solid transparent;border-bottom:0;&:hover,&:focus{color:", ";text-decoration:none;}&.selected{color:", ";border-color:", ";border-top-right-radius:", ";border-top-left-radius:", ";background-color:", ";}", ";", ";"], get('fontSizes.1'), get('colors.fg.default'), get('colors.fg.default'), get('colors.fg.default'), get('colors.border.default'), get('radii.2'), get('radii.2'), get('colors.canvas.default'), COMMON, sx);
|
36
36
|
TabNavLink.displayName = 'TabNav.Link';
|
37
37
|
export default Object.assign(TabNav, {
|
38
38
|
Link: TabNavLink
|
package/lib-esm/TextInput.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { MaxWidthProps, MinWidthProps, WidthProps } from 'styled-system';
|
3
|
-
import { SystemCommonProps } from './constants';
|
4
3
|
import { SxProp } from './sx';
|
5
4
|
import { ComponentProps } from './utils/types';
|
6
5
|
declare const Input: import("styled-components").StyledComponent<"input", any, {}, never>;
|
@@ -10,13 +9,14 @@ declare const Wrapper: import("styled-components").StyledComponent<"span", any,
|
|
10
9
|
block?: boolean | undefined;
|
11
10
|
contrast?: boolean | undefined;
|
12
11
|
variant?: "large" | "small" | undefined;
|
13
|
-
} &
|
14
|
-
declare type
|
15
|
-
|
12
|
+
} & WidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>> & MinWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>> & MaxWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>> & SxProp, never>;
|
13
|
+
declare type NonPassthroughProps = {
|
14
|
+
className?: string;
|
16
15
|
icon?: React.ComponentType<{
|
17
16
|
className?: string;
|
18
17
|
}>;
|
19
|
-
} & ComponentProps<typeof Wrapper
|
20
|
-
declare
|
18
|
+
} & Pick<ComponentProps<typeof Wrapper>, 'block' | 'contrast' | 'disabled' | 'sx' | 'theme' | 'width' | 'maxWidth' | 'minWidth' | 'variant'>;
|
19
|
+
declare type TextInputInternalProps = NonPassthroughProps & Omit<React.ComponentPropsWithoutRef<typeof Input>, keyof NonPassthroughProps>;
|
20
|
+
declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputInternalProps, string | number | symbol> & React.RefAttributes<HTMLInputElement>>;
|
21
21
|
export declare type TextInputProps = ComponentProps<typeof TextInput>;
|
22
22
|
export default TextInput;
|
package/lib-esm/TextInput.js
CHANGED
@@ -1,11 +1,10 @@
|
|
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
|
-
import { omit, pick } from '@styled-system/props';
|
4
3
|
import classnames from 'classnames';
|
5
4
|
import React from 'react';
|
6
5
|
import styled, { css } from 'styled-components';
|
7
6
|
import { maxWidth, minWidth, variant, width } from 'styled-system';
|
8
|
-
import {
|
7
|
+
import { get } from './constants';
|
9
8
|
import sx from './sx';
|
10
9
|
const sizeVariants = variant({
|
11
10
|
variants: {
|
@@ -30,37 +29,44 @@ const Input = styled.input.withConfig({
|
|
30
29
|
const Wrapper = styled.span.withConfig({
|
31
30
|
displayName: "TextInput__Wrapper",
|
32
31
|
componentId: "sc-1apmpmt-1"
|
33
|
-
})(["display:inline-flex;align-items:stretch;min-height:34px;font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-repeat:no-repeat;background-position:right 8px center;border:1px solid ", ";border-radius:", ";outline:none;box-shadow:", ";", " .TextInput-icon{align-self:center;color:", ";margin:0 ", ";flex-shrink:0;}&:focus-within{border-color:", ";box-shadow:", ";}", " ", " ", " @media (min-width:", "){font-size:", ";}", " ", " ", " ", " ", "
|
32
|
+
})(["display:inline-flex;align-items:stretch;min-height:34px;font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-repeat:no-repeat;background-position:right 8px center;border:1px solid ", ";border-radius:", ";outline:none;box-shadow:", ";", " .TextInput-icon{align-self:center;color:", ";margin:0 ", ";flex-shrink:0;}&:focus-within{border-color:", ";box-shadow:", ";}", " ", " ", " @media (min-width:", "){font-size:", ";}", " ", " ", " ", " ", ";"], get('fontSizes.1'), get('colors.fg.default'), get('colors.border.default'), get('radii.2'), get('shadows.primer.shadow.inset'), props => {
|
34
33
|
if (props.hasIcon) {
|
35
34
|
return css(["padding:0;"]);
|
36
35
|
} else {
|
37
36
|
return css(["padding:6px 12px;"]);
|
38
37
|
}
|
39
|
-
}, get('colors.
|
38
|
+
}, get('colors.fg.muted'), get('space.2'), get('colors.accent.emphasis'), get('shadows.primer.shadow.focus'), props => props.contrast && css(["background-color:", ";"], get('colors.canvas.inset')), props => props.disabled && css(["color:", ";background-color:", ";border-color:", ";"], get('colors.fg.muted'), get('colors.input.disabledBg'), get('colors.border.default')), props => props.block && css(["display:block;width:100%;"]), get('breakpoints.1'), get('fontSizes.1'), width, minWidth, maxWidth, sizeVariants, sx); // Props that are not passed through to Input:
|
39
|
+
|
40
40
|
// using forwardRef is important so that other components (ex. SelectMenu) can autofocus the input
|
41
41
|
const TextInput = /*#__PURE__*/React.forwardRef(({
|
42
42
|
icon: IconComponent,
|
43
|
-
contrast,
|
44
|
-
className,
|
45
43
|
block,
|
44
|
+
className,
|
45
|
+
contrast,
|
46
46
|
disabled,
|
47
|
-
theme,
|
48
47
|
sx: sxProp,
|
49
|
-
|
48
|
+
theme,
|
49
|
+
width: widthProp,
|
50
|
+
minWidth: minWidthProp,
|
51
|
+
maxWidth: maxWidthProp,
|
52
|
+
variant: variantProp,
|
53
|
+
...inputProps
|
50
54
|
}, ref) => {
|
51
55
|
// this class is necessary to style FilterSearch, plz no touchy!
|
52
56
|
const wrapperClasses = classnames(className, 'TextInput-wrapper');
|
53
|
-
|
54
|
-
|
55
|
-
return /*#__PURE__*/React.createElement(Wrapper, _extends({
|
57
|
+
return /*#__PURE__*/React.createElement(Wrapper, {
|
58
|
+
block: block,
|
56
59
|
className: wrapperClasses,
|
60
|
+
contrast: contrast,
|
61
|
+
disabled: disabled,
|
57
62
|
hasIcon: !!IconComponent,
|
58
|
-
|
63
|
+
sx: sxProp,
|
59
64
|
theme: theme,
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
65
|
+
width: widthProp,
|
66
|
+
minWidth: minWidthProp,
|
67
|
+
maxWidth: maxWidthProp,
|
68
|
+
variant: variantProp
|
69
|
+
}, IconComponent && /*#__PURE__*/React.createElement(IconComponent, {
|
64
70
|
className: "TextInput-icon"
|
65
71
|
}), /*#__PURE__*/React.createElement(Input, _extends({
|
66
72
|
ref: ref,
|
package/lib-esm/Timeline.js
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
import _styled from "styled-components";
|
2
|
-
|
3
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); }
|
4
2
|
|
5
3
|
import classnames from 'classnames';
|
@@ -17,23 +15,22 @@ const TimelineItem = styled(Box).attrs(props => ({
|
|
17
15
|
})).withConfig({
|
18
16
|
displayName: "Timeline__TimelineItem",
|
19
17
|
componentId: "c4dq2e-1"
|
20
|
-
})(["display:flex;position:relative;padding:", " 0;margin-left:", ";&::before{position:absolute;top:0;bottom:0;left:0;display:block;width:2px;content:'';background-color:", ";}", " ", ";", ";"], get('space.3'), get('space.3'), get('colors.border.
|
21
|
-
|
22
|
-
var _StyledBox = styled(Box).withConfig({
|
23
|
-
displayName: "Timeline___StyledBox",
|
24
|
-
componentId: "c4dq2e-2"
|
25
|
-
})(["border-radius:50%;border:2px solid ", ";"], p => p._css);
|
18
|
+
})(["display:flex;position:relative;padding:", " 0;margin-left:", ";&::before{position:absolute;top:0;bottom:0;left:0;display:block;width:2px;content:'';background-color:", ";}", " ", ";", ";"], get('space.3'), get('space.3'), get('colors.border.muted'), props => props.condensed && css(["padding-top:", ";padding-bottom:0;&:last-child{padding-bottom:", ";}.TimelineItem-Badge{height:16px;margin-top:", ";margin-bottom:", ";color:", ";background-color:", ";border:0;}"], get('space.1'), get('space.3'), get('space.2'), get('space.2'), get('colors.fg.muted'), get('colors.canvas.default')), COMMON, sx);
|
26
19
|
|
27
20
|
const TimelineBadge = props => {
|
28
21
|
return /*#__PURE__*/React.createElement(Box, {
|
29
22
|
position: "relative",
|
30
23
|
zIndex: 1
|
31
|
-
}, /*#__PURE__*/React.createElement(
|
24
|
+
}, /*#__PURE__*/React.createElement(Box, _extends({
|
32
25
|
display: "flex",
|
33
26
|
className: classnames(props.className, 'TimelineItem-Badge'),
|
34
27
|
flexShrink: 0,
|
28
|
+
borderRadius: "50%",
|
29
|
+
borderWidth: "2px",
|
30
|
+
borderStyle: "solid",
|
31
|
+
borderColor: "canvas.default",
|
35
32
|
overflow: "hidden",
|
36
|
-
color: "
|
33
|
+
color: "fg.muted",
|
37
34
|
bg: "timeline.badgeBg",
|
38
35
|
width: "32px",
|
39
36
|
height: "32px",
|
@@ -41,20 +38,18 @@ const TimelineBadge = props => {
|
|
41
38
|
ml: "-15px",
|
42
39
|
alignItems: "center",
|
43
40
|
justifyContent: "center"
|
44
|
-
}, props,
|
45
|
-
_css: get('colors.bg.canvas')
|
46
|
-
}), props.children));
|
41
|
+
}, props), props.children));
|
47
42
|
};
|
48
43
|
|
49
44
|
TimelineBadge.displayName = "TimelineBadge";
|
50
45
|
const TimelineBody = styled(Box).withConfig({
|
51
46
|
displayName: "Timeline__TimelineBody",
|
52
|
-
componentId: "c4dq2e-
|
53
|
-
})(["min-width:0;max-width:100%;margin-top:", ";color:", ";flex:auto;font-size:", ";", ";"], get('space.1'), get('colors.
|
47
|
+
componentId: "c4dq2e-2"
|
48
|
+
})(["min-width:0;max-width:100%;margin-top:", ";color:", ";flex:auto;font-size:", ";", ";"], get('space.1'), get('colors.fg.muted'), get('fontSizes.1'), sx);
|
54
49
|
const TimelineBreak = styled(Box).withConfig({
|
55
50
|
displayName: "Timeline__TimelineBreak",
|
56
|
-
componentId: "c4dq2e-
|
57
|
-
})(["position:relative z-index:1;height:24px;margin:0;margin-bottom:-", ";margin-left:0;background-color:", ";border:0;border-top:", " solid ", ";", ";"], get('space.3'), get('colors.
|
51
|
+
componentId: "c4dq2e-3"
|
52
|
+
})(["position:relative z-index:1;height:24px;margin:0;margin-bottom:-", ";margin-left:0;background-color:", ";border:0;border-top:", " solid ", ";", ";"], get('space.3'), get('colors.canvas.default'), get('space.1'), get('colors.border.default'), sx);
|
58
53
|
TimelineItem.displayName = 'Timeline.Item';
|
59
54
|
TimelineBadge.displayName = 'Timeline.Badge';
|
60
55
|
TimelineBody.displayName = 'Timeline.Body';
|
package/lib-esm/Tooltip.js
CHANGED
@@ -8,7 +8,7 @@ import sx from './sx';
|
|
8
8
|
const TooltipBase = styled.span.withConfig({
|
9
9
|
displayName: "Tooltip__TooltipBase",
|
10
10
|
componentId: "kp39nc-0"
|
11
|
-
})(["position:relative;&::before{position:absolute;z-index:1000001;display:none;width:0px;height:0px;color:", ";pointer-events:none;content:'';border:6px solid transparent;opacity:0;}&::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 ", ";-webkit-font-smoothing:subpixel-antialiased;color:", ";text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:", ";border-radius:", ";opacity:0;}@keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}&:hover,&:active,&:focus{&::before,&::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0.4s;}}&.tooltipped-no-delay:hover,&.tooltipped-no-delay:active,&.tooltipped-no-delay:focus{&::before,&::after{animation-delay:0s;}}&.tooltipped-multiline:hover,&.tooltipped-multiline:active,&.tooltipped-multiline:focus{&::after{display:table-cell;}}&.tooltipped-s,&.tooltipped-se,&.tooltipped-sw{&::after{top:100%;right:50%;margin-top:6px;}&::before{top:auto;right:50%;bottom:-7px;margin-right:-6px;border-bottom-color:", ";}}&.tooltipped-se{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-sw::after{margin-right:-", ";}&.tooltipped-n,&.tooltipped-ne,&.tooltipped-nw{&::after{right:50%;bottom:100%;margin-bottom:6px;}&::before{top:-7px;right:50%;bottom:auto;margin-right:-6px;border-top-color:", ";}}&.tooltipped-ne{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-nw::after{margin-right:-", ";}&.tooltipped-s::after,&.tooltipped-n::after{transform:translateX(50%);}&.tooltipped-w{&::after{right:100%;bottom:50%;margin-right:6px;transform:translateY(50%);}&::before{top:50%;bottom:50%;left:-7px;margin-top:-6px;border-left-color:", ";}}&.tooltipped-e{&::after{bottom:50%;left:100%;margin-left:6px;transform:translateY(50%);}&::before{top:50%;right:-7px;bottom:50%;margin-top:-6px;border-right-color:", ";}}&.tooltipped-multiline{&::after{width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}&.tooltipped-s::after,&.tooltipped-n::after{right:auto;left:50%;transform:translateX(-50%);}&.tooltipped-w::after,&.tooltipped-e::after{right:100%;}}&.tooltipped-align-right-2::after{right:0;margin-right:0;}&.tooltipped-align-right-2::before{right:15px;}&.tooltipped-align-left-2::after{left:0;margin-left:0;}&.tooltipped-align-left-2::before{left:10px;}", ";", ";"], get('colors.
|
11
|
+
})(["position:relative;&::before{position:absolute;z-index:1000001;display:none;width:0px;height:0px;color:", ";pointer-events:none;content:'';border:6px solid transparent;opacity:0;}&::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 ", ";-webkit-font-smoothing:subpixel-antialiased;color:", ";text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:", ";border-radius:", ";opacity:0;}@keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}&:hover,&:active,&:focus{&::before,&::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0.4s;}}&.tooltipped-no-delay:hover,&.tooltipped-no-delay:active,&.tooltipped-no-delay:focus{&::before,&::after{animation-delay:0s;}}&.tooltipped-multiline:hover,&.tooltipped-multiline:active,&.tooltipped-multiline:focus{&::after{display:table-cell;}}&.tooltipped-s,&.tooltipped-se,&.tooltipped-sw{&::after{top:100%;right:50%;margin-top:6px;}&::before{top:auto;right:50%;bottom:-7px;margin-right:-6px;border-bottom-color:", ";}}&.tooltipped-se{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-sw::after{margin-right:-", ";}&.tooltipped-n,&.tooltipped-ne,&.tooltipped-nw{&::after{right:50%;bottom:100%;margin-bottom:6px;}&::before{top:-7px;right:50%;bottom:auto;margin-right:-6px;border-top-color:", ";}}&.tooltipped-ne{&::after{right:auto;left:50%;margin-left:-", ";}}&.tooltipped-nw::after{margin-right:-", ";}&.tooltipped-s::after,&.tooltipped-n::after{transform:translateX(50%);}&.tooltipped-w{&::after{right:100%;bottom:50%;margin-right:6px;transform:translateY(50%);}&::before{top:50%;bottom:50%;left:-7px;margin-top:-6px;border-left-color:", ";}}&.tooltipped-e{&::after{bottom:50%;left:100%;margin-left:6px;transform:translateY(50%);}&::before{top:50%;right:-7px;bottom:50%;margin-top:-6px;border-right-color:", ";}}&.tooltipped-multiline{&::after{width:max-content;max-width:250px;word-wrap:break-word;white-space:pre-line;border-collapse:separate;}&.tooltipped-s::after,&.tooltipped-n::after{right:auto;left:50%;transform:translateX(-50%);}&.tooltipped-w::after,&.tooltipped-e::after{right:100%;}}&.tooltipped-align-right-2::after{right:0;margin-right:0;}&.tooltipped-align-right-2::before{right:15px;}&.tooltipped-align-left-2::after{left:0;margin-left:0;}&.tooltipped-align-left-2::before{left:10px;}", ";", ";"], get('colors.neutral.emphasisPlus'), get('fonts.normal'), get('colors.fg.onEmphasis'), get('colors.neutral.emphasisPlus'), get('radii.1'), get('colors.neutral.emphasisPlus'), get('space.3'), get('space.3'), get('colors.neutral.emphasisPlus'), get('space.3'), get('space.3'), get('colors.neutral.emphasisPlus'), get('colors.neutral.emphasisPlus'), COMMON, sx);
|
12
12
|
|
13
13
|
function Tooltip({
|
14
14
|
direction = 'n',
|
package/lib-esm/UnderlineNav.js
CHANGED
@@ -11,7 +11,7 @@ const SELECTED_CLASS = 'selected';
|
|
11
11
|
const UnderlineNavBase = styled.nav.withConfig({
|
12
12
|
displayName: "UnderlineNav__UnderlineNavBase",
|
13
13
|
componentId: "zrnxqt-0"
|
14
|
-
})(["display:flex;justify-content:space-between;border-bottom:1px solid ", ";&.UnderlineNav--right{justify-content:flex-end;.UnderlineNav-item{margin-right:0;margin-left:", ";}.UnderlineNav-actions{flex:1 1 auto;}}&.UnderlineNav--full{display:block;}.UnderlineNav-body{display:flex;margin-bottom:-1px;}.UnderlineNav-actions{align-self:center;}", ";", ";"], get('colors.border.
|
14
|
+
})(["display:flex;justify-content:space-between;border-bottom:1px solid ", ";&.UnderlineNav--right{justify-content:flex-end;.UnderlineNav-item{margin-right:0;margin-left:", ";}.UnderlineNav-actions{flex:1 1 auto;}}&.UnderlineNav--full{display:block;}.UnderlineNav-body{display:flex;margin-bottom:-1px;}.UnderlineNav-actions{align-self:center;}", ";", ";"], get('colors.border.muted'), get('space.3'), COMMON, sx);
|
15
15
|
|
16
16
|
function UnderlineNav({
|
17
17
|
actions,
|
@@ -42,7 +42,7 @@ const UnderlineNavLink = styled.a.attrs(props => ({
|
|
42
42
|
})).withConfig({
|
43
43
|
displayName: "UnderlineNav__UnderlineNavLink",
|
44
44
|
componentId: "zrnxqt-1"
|
45
|
-
})(["padding:", " ", ";margin-right:", ";font-size:", ";line-height:", ";color:", ";text-align:center;border-bottom:2px solid transparent;text-decoration:none;&:hover,&:focus{color:", ";text-decoration:none;border-bottom-color:", ";transition:0.2s ease;.UnderlineNav-octicon{color:", ";}}&.selected{color:", ";border-bottom-color:", ";.UnderlineNav-octicon{color:", ";}}", ";", ";"], get('space.3'), get('space.2'), get('space.3'), get('fontSizes.1'), get('lineHeights.default'), get('colors.
|
45
|
+
})(["padding:", " ", ";margin-right:", ";font-size:", ";line-height:", ";color:", ";text-align:center;border-bottom:2px solid transparent;text-decoration:none;&:hover,&:focus{color:", ";text-decoration:none;border-bottom-color:", ";transition:0.2s ease;.UnderlineNav-octicon{color:", ";}}&.selected{color:", ";border-bottom-color:", ";.UnderlineNav-octicon{color:", ";}}", ";", ";"], get('space.3'), get('space.2'), get('space.3'), get('fontSizes.1'), get('lineHeights.default'), get('colors.fg.default'), get('colors.fg.default'), get('colors.neutral.muted'), get('colors.fg.muted'), get('colors.fg.default'), get('colors.primer.border.active'), get('colors.fg.default'), COMMON, sx);
|
46
46
|
UnderlineNavLink.displayName = 'UnderlineNav.Link';
|
47
47
|
export default Object.assign(UnderlineNav, {
|
48
48
|
Link: UnderlineNavLink
|
@@ -7,9 +7,8 @@ export declare type UseOverlaySettings = {
|
|
7
7
|
onEscape: (e: KeyboardEvent) => void;
|
8
8
|
onClickOutside: (e: TouchOrMouseEvent) => void;
|
9
9
|
overlayRef?: React.RefObject<HTMLDivElement>;
|
10
|
-
preventFocusOnOpen?: boolean;
|
11
10
|
};
|
12
11
|
export declare type OverlayReturnProps = {
|
13
12
|
ref: React.RefObject<HTMLDivElement>;
|
14
13
|
};
|
15
|
-
export declare const useOverlay: ({ overlayRef: _overlayRef, returnFocusRef, initialFocusRef, onEscape, ignoreClickRefs, onClickOutside
|
14
|
+
export declare const useOverlay: ({ overlayRef: _overlayRef, returnFocusRef, initialFocusRef, onEscape, ignoreClickRefs, onClickOutside }: UseOverlaySettings) => OverlayReturnProps;
|
@@ -8,19 +8,14 @@ export const useOverlay = ({
|
|
8
8
|
initialFocusRef,
|
9
9
|
onEscape,
|
10
10
|
ignoreClickRefs,
|
11
|
-
onClickOutside
|
12
|
-
preventFocusOnOpen
|
11
|
+
onClickOutside
|
13
12
|
}) => {
|
14
13
|
const overlayRef = useProvidedRefOrCreate(_overlayRef);
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
initialFocusRef
|
21
|
-
});
|
22
|
-
}
|
23
|
-
|
14
|
+
useOpenAndCloseFocus({
|
15
|
+
containerRef: overlayRef,
|
16
|
+
returnFocusRef,
|
17
|
+
initialFocusRef
|
18
|
+
});
|
24
19
|
useOnOutsideClick({
|
25
20
|
containerRef: overlayRef,
|
26
21
|
ignoreClickRefs,
|
package/lib-esm/index.d.ts
CHANGED
@@ -108,3 +108,4 @@ export { default as Truncate } from './Truncate';
|
|
108
108
|
export type { TruncateProps } from './Truncate';
|
109
109
|
export { default as UnderlineNav } from './UnderlineNav';
|
110
110
|
export type { UnderlineNavProps, UnderlineNavLinkProps } from './UnderlineNav';
|
111
|
+
export { SSRProvider, useSSRSafeId } from './utils/ssr';
|
package/lib-esm/index.js
CHANGED
@@ -65,4 +65,5 @@ export { default as Text } from './Text';
|
|
65
65
|
export { default as Timeline } from './Timeline';
|
66
66
|
export { default as Tooltip } from './Tooltip';
|
67
67
|
export { default as Truncate } from './Truncate';
|
68
|
-
export { default as UnderlineNav } from './UnderlineNav';
|
68
|
+
export { default as UnderlineNav } from './UnderlineNav';
|
69
|
+
export { SSRProvider, useSSRSafeId } from './utils/ssr';
|
@@ -22,6 +22,10 @@ export namespace theme {
|
|
22
22
|
export { darkDimmedColors as colors };
|
23
23
|
export { darkDimmedShadows as shadows };
|
24
24
|
}
|
25
|
+
namespace dark_high_contrast {
|
26
|
+
export { darkHighContrastColors as colors };
|
27
|
+
export { darkHighContrastShadows as shadows };
|
28
|
+
}
|
25
29
|
}
|
26
30
|
}
|
27
31
|
declare namespace animation {
|
@@ -79,19 +83,21 @@ declare const darkDimmedColors: Partial<typeof primitives.colors.dark_dimmed>;
|
|
79
83
|
* @type Partial<typeof primitives.colors.dark_dimmed>
|
80
84
|
*/
|
81
85
|
declare const darkDimmedShadows: Partial<typeof primitives.colors.dark_dimmed>;
|
86
|
+
/**
|
87
|
+
* @type Partial<typeof primitives.colors.dark_dimmed>
|
88
|
+
*/
|
89
|
+
declare const darkHighContrastColors: Partial<typeof primitives.colors.dark_dimmed>;
|
90
|
+
/**
|
91
|
+
* @type Partial<typeof primitives.colors.dark_high_contrast>
|
92
|
+
*/
|
93
|
+
declare const darkHighContrastShadows: Partial<typeof primitives.colors.dark_high_contrast>;
|
82
94
|
import { default as primitives } from "@primer/primitives";
|
83
95
|
declare const light_2: {
|
84
96
|
colors: {};
|
85
|
-
/**
|
86
|
-
* @type Partial<typeof primitives.colors.light>
|
87
|
-
*/
|
88
97
|
shadows: {};
|
89
98
|
};
|
90
99
|
declare const dark_1: {
|
91
100
|
colors: {};
|
92
|
-
/**
|
93
|
-
* @type Partial<typeof primitives.colors.light>
|
94
|
-
*/
|
95
101
|
shadows: {};
|
96
102
|
};
|
97
103
|
export {};
|