@primer/components 0.0.0-2021112193058 → 0.0.0-2021112212951

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.
Files changed (73) hide show
  1. package/dist/browser.esm.js +2 -2209
  2. package/dist/browser.esm.js.map +1 -1
  3. package/dist/browser.umd.js +2 -2209
  4. package/dist/browser.umd.js.map +1 -1
  5. package/lib/ActionList/Header.js +1 -1
  6. package/lib/ActionList/Item.js +10 -10
  7. package/lib/ActionList/List.js +1 -1
  8. package/lib/ActionList2/Item.js +1 -1
  9. package/lib/ActionList2/List.js +1 -1
  10. package/lib/BaseStyles.js +2 -20
  11. package/lib/BorderBox.js +1 -1
  12. package/lib/Box.js +1 -1
  13. package/lib/Breadcrumbs.js +3 -3
  14. package/lib/Button/Button.js +1 -1
  15. package/lib/Button/ButtonGroup.js +1 -1
  16. package/lib/Checkbox.js +1 -1
  17. package/lib/Details.js +1 -1
  18. package/lib/FilteredActionList/FilteredActionList.js +1 -1
  19. package/lib/Flex.js +1 -1
  20. package/lib/LabelGroup.js +1 -1
  21. package/lib/Overlay.js +1 -1
  22. package/lib/Pagination/Pagination.js +2 -2
  23. package/lib/Position.js +1 -1
  24. package/lib/SelectMenu/SelectMenu.js +1 -1
  25. package/lib/SelectMenu/SelectMenuFilter.js +1 -1
  26. package/lib/SelectMenu/SelectMenuFooter.js +1 -1
  27. package/lib/SelectMenu/SelectMenuItem.js +1 -1
  28. package/lib/SelectMenu/SelectMenuTab.js +1 -1
  29. package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
  30. package/lib/SelectMenu/SelectMenuTabs.js +1 -1
  31. package/lib/StateLabel.js +1 -1
  32. package/lib/StyledOcticon.js +1 -1
  33. package/lib/SubNav.js +3 -3
  34. package/lib/Timeline.js +4 -4
  35. package/lib/Token/AvatarToken.js +1 -1
  36. package/lib/Token/TokenBase.js +1 -1
  37. package/lib/Tooltip.js +1 -1
  38. package/lib/UnderlineNav.js +2 -2
  39. package/lib-esm/ActionList/Header.js +1 -1
  40. package/lib-esm/ActionList/Item.js +10 -10
  41. package/lib-esm/ActionList/List.js +1 -1
  42. package/lib-esm/ActionList2/Item.js +1 -1
  43. package/lib-esm/ActionList2/List.js +1 -1
  44. package/lib-esm/BaseStyles.js +2 -20
  45. package/lib-esm/BorderBox.js +1 -1
  46. package/lib-esm/Box.js +1 -1
  47. package/lib-esm/Breadcrumbs.js +3 -3
  48. package/lib-esm/Button/Button.js +1 -1
  49. package/lib-esm/Button/ButtonGroup.js +1 -1
  50. package/lib-esm/Checkbox.js +1 -1
  51. package/lib-esm/Details.js +1 -1
  52. package/lib-esm/FilteredActionList/FilteredActionList.js +1 -1
  53. package/lib-esm/Flex.js +1 -1
  54. package/lib-esm/LabelGroup.js +1 -1
  55. package/lib-esm/Overlay.js +1 -1
  56. package/lib-esm/Pagination/Pagination.js +2 -2
  57. package/lib-esm/Position.js +1 -1
  58. package/lib-esm/SelectMenu/SelectMenu.js +1 -1
  59. package/lib-esm/SelectMenu/SelectMenuFilter.js +1 -1
  60. package/lib-esm/SelectMenu/SelectMenuFooter.js +1 -1
  61. package/lib-esm/SelectMenu/SelectMenuItem.js +1 -1
  62. package/lib-esm/SelectMenu/SelectMenuTab.js +1 -1
  63. package/lib-esm/SelectMenu/SelectMenuTabPanel.js +1 -1
  64. package/lib-esm/SelectMenu/SelectMenuTabs.js +1 -1
  65. package/lib-esm/StateLabel.js +1 -1
  66. package/lib-esm/StyledOcticon.js +1 -1
  67. package/lib-esm/SubNav.js +3 -3
  68. package/lib-esm/Timeline.js +4 -4
  69. package/lib-esm/Token/AvatarToken.js +1 -1
  70. package/lib-esm/Token/TokenBase.js +1 -1
  71. package/lib-esm/Tooltip.js +1 -1
  72. package/lib-esm/UnderlineNav.js +2 -2
  73. package/package.json +5 -6
@@ -44,7 +44,7 @@ const {
44
44
  export { Slot };
45
45
  const LiBox = styled.li.withConfig({
46
46
  displayName: "Item__LiBox",
47
- componentId: "c3scat-0"
47
+ componentId: "sc-c3scat-0"
48
48
  })(sx);
49
49
  export const TEXT_ROW_HEIGHT = '20px'; // custom value off the scale
50
50
 
@@ -7,7 +7,7 @@ import { MenuContext } from './MenuContext';
7
7
  export const ListContext = /*#__PURE__*/React.createContext({});
8
8
  const ListBox = styled.ul.withConfig({
9
9
  displayName: "List__ListBox",
10
- componentId: "cvbq60-0"
10
+ componentId: "sc-cvbq60-0"
11
11
  })(sx);
12
12
  export const List = /*#__PURE__*/React.forwardRef(({
13
13
  variant = 'inset',
@@ -3,28 +3,10 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
3
3
  import React from 'react';
4
4
  import styled, { createGlobalStyle } from 'styled-components';
5
5
  import { COMMON, TYPOGRAPHY } from './constants';
6
- const GlobalStyle = createGlobalStyle`
7
- * { box-sizing: border-box; }
8
- body { margin: 0; }
9
- table { border-collapse: collapse; }
10
-
11
- [role="button"]:focus:not(:focus-visible):not(.focus-visible),
12
- [role="tabpanel"][tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),
13
- button:focus:not(:focus-visible):not(.focus-visible),
14
- summary:focus:not(:focus-visible):not(.focus-visible),
15
- a:focus:not(:focus-visible):not(.focus-visible) {
16
- outline: none;
17
- box-shadow: none;
18
- }
19
-
20
- [tabindex="0"]:focus:not(:focus-visible):not(.focus-visible),
21
- details-dialog:focus:not(:focus-visible):not(.focus-visible) {
22
- outline: none;
23
- }
24
- `;
6
+ const GlobalStyle = createGlobalStyle(["*{box-sizing:border-box;}body{margin:0;}table{border-collapse:collapse;}[role=\"button\"]:focus:not(:focus-visible):not(.focus-visible),[role=\"tabpanel\"][tabindex=\"0\"]:focus:not(:focus-visible):not(.focus-visible),button:focus:not(:focus-visible):not(.focus-visible),summary:focus:not(:focus-visible):not(.focus-visible),a:focus:not(:focus-visible):not(.focus-visible){outline:none;box-shadow:none;}[tabindex=\"0\"]:focus:not(:focus-visible):not(.focus-visible),details-dialog:focus:not(:focus-visible):not(.focus-visible){outline:none;}"]);
25
7
  const Base = styled.div.withConfig({
26
8
  displayName: "BaseStyles__Base",
27
- componentId: "qvuaww-0"
9
+ componentId: "sc-qvuaww-0"
28
10
  })(["", ";", ";"], TYPOGRAPHY, COMMON);
29
11
 
30
12
  function BaseStyles(props) {
@@ -6,7 +6,7 @@ import Box from './Box';
6
6
  */
7
7
  const BorderBox = styled(Box).withConfig({
8
8
  displayName: "BorderBox",
9
- componentId: "oreju5-0"
9
+ componentId: "sc-oreju5-0"
10
10
  })([""]);
11
11
  BorderBox.defaultProps = {
12
12
  borderWidth: '1px',
package/lib-esm/Box.js CHANGED
@@ -3,6 +3,6 @@ import { background, border, color, flexbox, grid, layout, position, shadow, spa
3
3
  import sx from './sx';
4
4
  const Box = styled.div.withConfig({
5
5
  displayName: "Box",
6
- componentId: "nv15kw-0"
6
+ componentId: "sc-nv15kw-0"
7
7
  })(space, color, typography, layout, flexbox, grid, background, border, position, shadow, sx);
8
8
  export default Box;
@@ -8,11 +8,11 @@ import sx from './sx';
8
8
  const SELECTED_CLASS = 'selected';
9
9
  const Wrapper = styled.li.withConfig({
10
10
  displayName: "Breadcrumbs__Wrapper",
11
- componentId: "hwwoo0-0"
11
+ componentId: "sc-hwwoo0-0"
12
12
  })(["display:inline-block;white-space:nowrap;list-style:none;&::after{padding-right:0.5em;padding-left:0.5em;color:", ";font-size:", ";content:'/';}&:first-child{margin-left:0;}&:last-child{&::after{content:none;}}"], get('colors.fg.muted'), get('fontSizes.1'));
13
13
  const BreadcrumbsBase = styled.nav.withConfig({
14
14
  displayName: "Breadcrumbs__BreadcrumbsBase",
15
- componentId: "hwwoo0-1"
15
+ componentId: "sc-hwwoo0-1"
16
16
  })(["display:flex;justify-content:space-between;", ";"], sx);
17
17
 
18
18
  function Breadcrumbs({
@@ -39,7 +39,7 @@ const BreadcrumbsItem = styled.a.attrs(props => ({
39
39
  'aria-current': props.selected ? 'page' : null
40
40
  })).withConfig({
41
41
  displayName: "Breadcrumbs__BreadcrumbsItem",
42
- componentId: "hwwoo0-2"
42
+ componentId: "sc-hwwoo0-2"
43
43
  })(["color:", ";display:inline-block;font-size:", ";text-decoration:none;&:hover{text-decoration:underline;}&.selected{color:", ";pointer-events:none;}", ";"], get('colors.accent.fg'), get('fontSizes.1'), get('colors.fg.default'), sx);
44
44
  Breadcrumbs.displayName = 'Breadcrumbs';
45
45
  BreadcrumbsItem.displayName = 'Breadcrumbs.Item';
@@ -4,6 +4,6 @@ import sx from '../sx';
4
4
  import ButtonBase from './ButtonBase';
5
5
  const Button = styled(ButtonBase).withConfig({
6
6
  displayName: "Button",
7
- componentId: "xjtz72-0"
7
+ componentId: "sc-xjtz72-0"
8
8
  })(["color:", ";background-color:", ";border:1px solid ", ";box-shadow:", ",", "};&:hover{background-color:", ";border-color:", ";}&:focus{border-color:", ";box-shadow:", ";}&:active{background-color:", ";box-shadow:", ";}&:disabled{color:", ";background-color:", ";border-color:", ";}", ";"], get('colors.btn.text'), get('colors.btn.bg'), get('colors.btn.border'), get('shadows.btn.shadow'), get('shadows.btn.insetShadow'), get('colors.btn.hoverBg'), get('colors.btn.hoverBorder'), get('colors.btn.focusBorder'), get('shadows.btn.focusShadow'), get('colors.btn.selectedBg'), get('shadows.btn.shadowActive'), get('colors.primer.fg.disabled'), get('colors.btn.bg'), get('colors.btn.border'), sx);
9
9
  export default Button;
@@ -4,7 +4,7 @@ import { get } from '../constants';
4
4
  import sx from '../sx';
5
5
  const ButtonGroup = styled(Box).withConfig({
6
6
  displayName: "ButtonGroup",
7
- componentId: "peei04-0"
7
+ componentId: "sc-peei04-0"
8
8
  })(["vertical-align:middle;&& > *{position:relative;border-right-width:0;border-radius:0;:first-child{border-top-left-radius:", ";border-bottom-left-radius:", ";margin-right:0;}:not(:first-child){margin-left:0;margin-right:0;}:last-child{border-right-width:1px;border-top-right-radius:", ";border-bottom-right-radius:", ";}:focus,:active,:hover{border-right-width:1px;+ *{border-left-width:0;}}:focus,:active{z-index:1;}}", ";"], get('radii.2'), get('radii.2'), get('radii.2'), get('radii.2'), sx);
9
9
  ButtonGroup.defaultProps = {
10
10
  display: 'inline-block'
@@ -6,7 +6,7 @@ import React, { useLayoutEffect } from 'react';
6
6
  import sx from './sx';
7
7
  const StyledCheckbox = styled.input.withConfig({
8
8
  displayName: "Checkbox__StyledCheckbox",
9
- componentId: "i51804-0"
9
+ componentId: "sc-i51804-0"
10
10
  })(["cursor:pointer;", " ", ""], props => props.disabled && `cursor: not-allowed;`, sx);
11
11
  /**
12
12
  * An accessible, native checkbox component
@@ -2,7 +2,7 @@ import styled from 'styled-components';
2
2
  import sx from './sx';
3
3
  const Details = styled.details.withConfig({
4
4
  displayName: "Details",
5
- componentId: "ssy9qz-0"
5
+ componentId: "sc-ssy9qz-0"
6
6
  })(["& > summary{list-style:none;}& > summary::-webkit-details-marker{display:none;}", ";"], sx);
7
7
  Details.displayName = 'Details';
8
8
  export default Details;
@@ -15,7 +15,7 @@ import useScrollFlash from '../hooks/useScrollFlash';
15
15
  import { scrollIntoViewingArea } from '../behaviors/scrollIntoViewingArea';
16
16
  const StyledHeader = styled.div.withConfig({
17
17
  displayName: "FilteredActionList__StyledHeader",
18
- componentId: "yg3jkv-0"
18
+ componentId: "sc-yg3jkv-0"
19
19
  })(["box-shadow:0 1px 0 ", ";z-index:1;"], get('colors.border.default'));
20
20
  export function FilteredActionList({
21
21
  loading = false,
package/lib-esm/Flex.js CHANGED
@@ -6,7 +6,7 @@ import Box from './Box';
6
6
  */
7
7
  const Flex = styled(Box).withConfig({
8
8
  displayName: "Flex",
9
- componentId: "arghxi-0"
9
+ componentId: "sc-arghxi-0"
10
10
  })([""]);
11
11
  Flex.defaultProps = {
12
12
  display: 'flex'
@@ -3,6 +3,6 @@ import { get } from './constants';
3
3
  import sx from './sx';
4
4
  const LabelGroup = styled.span.withConfig({
5
5
  displayName: "LabelGroup",
6
- componentId: "k6k3qa-0"
6
+ componentId: "sc-k6k3qa-0"
7
7
  })(["& *{margin-right:", ";}& *:last-child{margin-right:0;}", ";"], get('space.1'), sx);
8
8
  export default LabelGroup;
@@ -60,7 +60,7 @@ function getSlideAnimationStartingVector(anchorSide) {
60
60
 
61
61
  const StyledOverlay = styled.div.withConfig({
62
62
  displayName: "Overlay__StyledOverlay",
63
- componentId: "jhwkzw-0"
63
+ componentId: "sc-jhwkzw-0"
64
64
  })(["background-color:", ";box-shadow:", ";position:absolute;min-width:192px;max-width:640px;height:", ";max-height:", ";width:", ";border-radius:12px;overflow:hidden;animation:overlay-appear ", "ms ", ";@keyframes overlay-appear{0%{opacity:0;}100%{opacity:1;}}visibility:var(--styled-overlay-visibility);:focus{outline:none;}", ";"], get('colors.canvas.overlay'), get('shadows.overlay.shadow'), props => heightMap[props.height || 'auto'], props => props.maxHeight && heightMap[props.maxHeight], props => widthMap[props.width || 'auto'], animationDuration, get('animation.easeOutCubic'), sx);
65
65
 
66
66
  /**
@@ -8,7 +8,7 @@ import sx from '../sx';
8
8
  import { buildComponentData, buildPaginationModel } from './model';
9
9
  const Page = styled.a.withConfig({
10
10
  displayName: "Pagination__Page",
11
- componentId: "b80nss-0"
11
+ componentId: "sc-b80nss-0"
12
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.fg.default'), get('space.1'), get('borderWidths.1'), get('radii.2'), get('colors.border.default'), get('colors.border.muted'), get('colors.accent.fg'), get('colors.fg.onEmphasis'), get('colors.accent.emphasis'), get('colors.primer.fg.disabled'), get('space.1'), get('space.1'));
13
13
 
14
14
  function usePaginationPages({
@@ -43,7 +43,7 @@ function usePaginationPages({
43
43
 
44
44
  const PaginationContainer = styled.nav.withConfig({
45
45
  displayName: "Pagination__PaginationContainer",
46
- componentId: "b80nss-1"
46
+ componentId: "sc-b80nss-1"
47
47
  })(["margin-top:20px;margin-bottom:15px;text-align:center;", ";"], sx);
48
48
 
49
49
  function Pagination({
@@ -9,7 +9,7 @@ import Box from './Box';
9
9
  */
10
10
  const Position = styled(Box).withConfig({
11
11
  displayName: "Position",
12
- componentId: "fla1y3-0"
12
+ componentId: "sc-fla1y3-0"
13
13
  })([""]);
14
14
 
15
15
  /**
@@ -32,7 +32,7 @@ const wrapperStyles = `
32
32
  `;
33
33
  const StyledSelectMenu = styled.details.withConfig({
34
34
  displayName: "SelectMenu__StyledSelectMenu",
35
- componentId: "i7h45b-0"
35
+ componentId: "sc-i7h45b-0"
36
36
  })(["", " ", ";"], wrapperStyles, sx);
37
37
  // 'as' is spread out because we don't want users to be able to change the tag.
38
38
  const SelectMenu = /*#__PURE__*/React.forwardRef(({
@@ -8,7 +8,7 @@ import TextInput from '../TextInput';
8
8
  import { MenuContext } from './SelectMenuContext';
9
9
  const StyledForm = styled.form.withConfig({
10
10
  displayName: "SelectMenuFilter__StyledForm",
11
- componentId: "s7ktlh-0"
11
+ componentId: "sc-s7ktlh-0"
12
12
  })(["padding:", ";margin:0;border-bottom:", " solid ", ";background-color:", ";@media (min-width:", "){padding:", ";}", ";"], get('space.3'), get('borderWidths.1'), get('colors.border.muted'), get('colors.canvas.overlay'), get('breakpoints.0'), get('space.2'), sx);
13
13
  const SelectMenuFilter = /*#__PURE__*/forwardRef(({
14
14
  theme,
@@ -4,7 +4,7 @@ import sx from '../sx';
4
4
  const footerStyles = css(["margin-top:-1px;padding:", " ", ";font-size:", ";color:", ";text-align:center;border-top:", " solid ", ";@media (min-width:", "){padding:", " ", ";}"], get('space.2'), get('space.3'), get('fontSizes.0'), get('colors.fg.muted'), get('borderWidths.1'), get('colors.border.muted'), get('breakpoints.0'), get('space.1'), get('space.2'));
5
5
  const SelectMenuFooter = styled.footer.withConfig({
6
6
  displayName: "SelectMenuFooter",
7
- componentId: "rkvco1-0"
7
+ componentId: "sc-rkvco1-0"
8
8
  })(["", " ", ";"], footerStyles, sx);
9
9
  SelectMenuFooter.displayName = 'SelectMenu.Footer';
10
10
  export default SelectMenuFooter;
@@ -12,7 +12,7 @@ const StyledItem = styled.a.attrs(() => ({
12
12
  role: 'menuitemcheckbox'
13
13
  })).withConfig({
14
14
  displayName: "SelectMenuItem__StyledItem",
15
- componentId: "gjymba-0"
15
+ componentId: "sc-gjymba-0"
16
16
  })(["", " ", ";"], listItemStyles, sx);
17
17
  const SelectMenuItem = /*#__PURE__*/forwardRef(({
18
18
  children,
@@ -9,7 +9,7 @@ import { MenuContext } from './SelectMenuContext';
9
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
- componentId: "ga32sz-0"
12
+ componentId: "sc-ga32sz-0"
13
13
  })(["", " ", ";"], tabStyles, sx);
14
14
 
15
15
  const SelectMenuTab = ({
@@ -8,7 +8,7 @@ import { MenuContext } from './SelectMenuContext';
8
8
  import SelectMenuList from './SelectMenuList';
9
9
  const TabPanelBase = styled.div.withConfig({
10
10
  displayName: "SelectMenuTabPanel__TabPanelBase",
11
- componentId: "ck0ipe-0"
11
+ componentId: "sc-ck0ipe-0"
12
12
  })(["border-top:", " solid ", ";", ";"], get('borderWidths.1'), get('colors.border.muted'), sx);
13
13
 
14
14
  const TabPanel = ({
@@ -7,7 +7,7 @@ import sx from '../sx';
7
7
  const tabWrapperStyles = css(["display:flex;flex-shrink:0;margin-bottom:-1px;-webkit-overflow-scrolling:touch;overflow-x:auto;overflow-y:hidden;&::-webkit-scrollbar{display:none;}@media (min-width:", "){padding:0 ", ";margin-top:", ";}"], get('breakpoints.0'), get('space.2'), get('space.3'));
8
8
  const SelectMenuTabsBase = styled.div.withConfig({
9
9
  displayName: "SelectMenuTabs__SelectMenuTabsBase",
10
- componentId: "kgg21o-0"
10
+ componentId: "sc-kgg21o-0"
11
11
  })(["", " ", ";"], tabWrapperStyles, sx);
12
12
 
13
13
  const SelectMenuTabs = ({
@@ -66,7 +66,7 @@ const sizeVariants = variant({
66
66
  });
67
67
  const StateLabelBase = styled.span.withConfig({
68
68
  displayName: "StateLabel__StateLabelBase",
69
- componentId: "k4pd9e-0"
69
+ componentId: "sc-k4pd9e-0"
70
70
  })(["display:inline-flex;align-items:center;font-weight:", ";line-height:16px;color:", ";text-align:center;border-radius:", ";", ";", ";", ";"], get('fontWeights.bold'), get('colors.canvas.default'), get('radii.3'), colorVariants, sizeVariants, sx);
71
71
 
72
72
  function StateLabel({
@@ -12,7 +12,7 @@ function Octicon({
12
12
  Octicon.displayName = "Octicon";
13
13
  const StyledOcticon = styled(Octicon).withConfig({
14
14
  displayName: "StyledOcticon",
15
- componentId: "uhnt7w-0"
15
+ componentId: "sc-uhnt7w-0"
16
16
  })(["", ""], sx);
17
17
  StyledOcticon.defaultProps = {
18
18
  size: 16
package/lib-esm/SubNav.js CHANGED
@@ -10,7 +10,7 @@ const ITEM_CLASS = 'SubNav-item';
10
10
  const SELECTED_CLASS = 'selected';
11
11
  const SubNavBase = styled.nav.withConfig({
12
12
  displayName: "SubNav__SubNavBase",
13
- componentId: "f7w0xa-0"
13
+ componentId: "sc-f7w0xa-0"
14
14
  })(["display:flex;justify-content:space-between;.SubNav-body{display:flex;margin-bottom:-1px;> *{margin-left:", ";}> *:first-child{margin-left:0;}}.SubNav-actions{align-self:center;}", ";"], get('space.2'), sx);
15
15
 
16
16
  function SubNav({
@@ -34,14 +34,14 @@ function SubNav({
34
34
  SubNav.displayName = "SubNav";
35
35
  const SubNavLinks = styled.div.withConfig({
36
36
  displayName: "SubNav__SubNavLinks",
37
- componentId: "f7w0xa-1"
37
+ componentId: "sc-f7w0xa-1"
38
38
  })(["display:flex;", ";"], sx);
39
39
  const SubNavLink = styled.a.attrs(props => ({
40
40
  activeClassName: typeof props.to === 'string' ? 'selected' : '',
41
41
  className: classnames(ITEM_CLASS, props.selected && SELECTED_CLASS, props.className)
42
42
  })).withConfig({
43
43
  displayName: "SubNav__SubNavLink",
44
- componentId: "f7w0xa-2"
44
+ componentId: "sc-f7w0xa-2"
45
45
  })(["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'), sx);
46
46
  SubNavLink.displayName = 'SubNav.Link';
47
47
  SubNavLinks.displayName = 'SubNav.Links';
@@ -6,13 +6,13 @@ import { get } from './constants';
6
6
  import sx from './sx';
7
7
  const Timeline = styled.div.withConfig({
8
8
  displayName: "Timeline",
9
- componentId: "c4dq2e-0"
9
+ componentId: "sc-c4dq2e-0"
10
10
  })(["display:flex;flex-direction:column;", " ", ";"], props => props.clipSidebar && css([".Timeline-Item:first-child{padding-top:0;}.Timeline-Item:last-child{padding-bottom:0;}"]), sx);
11
11
  const TimelineItem = styled.div.attrs(props => ({
12
12
  className: classnames('Timeline-Item', props.className)
13
13
  })).withConfig({
14
14
  displayName: "Timeline__TimelineItem",
15
- componentId: "c4dq2e-1"
15
+ componentId: "sc-c4dq2e-1"
16
16
  })(["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')), sx);
17
17
 
18
18
  const TimelineBadge = props => {
@@ -43,11 +43,11 @@ const TimelineBadge = props => {
43
43
  TimelineBadge.displayName = "TimelineBadge";
44
44
  const TimelineBody = styled.div.withConfig({
45
45
  displayName: "Timeline__TimelineBody",
46
- componentId: "c4dq2e-2"
46
+ componentId: "sc-c4dq2e-2"
47
47
  })(["min-width:0;max-width:100%;margin-top:", ";color:", ";flex:auto;font-size:", ";", ";"], get('space.1'), get('colors.fg.muted'), get('fontSizes.1'), sx);
48
48
  const TimelineBreak = styled.div.withConfig({
49
49
  displayName: "Timeline__TimelineBreak",
50
- componentId: "c4dq2e-3"
50
+ componentId: "sc-c4dq2e-3"
51
51
  })(["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);
52
52
  TimelineItem.displayName = 'Timeline.Item';
53
53
  TimelineBadge.displayName = 'Timeline.Badge';
@@ -8,7 +8,7 @@ import Token from './Token';
8
8
  import { Avatar } from '..';
9
9
  const AvatarContainer = styled.span.withConfig({
10
10
  displayName: "AvatarToken__AvatarContainer",
11
- componentId: "ubyudc-0"
11
+ componentId: "sc-ubyudc-0"
12
12
  })(["--spacing:calc(", " * 2);display:block;height:", ";width:", ";"], get('space.1'), props => `calc(${tokenSizes[props.avatarSize]} - var(--spacing))`, props => `calc(${tokenSizes[props.avatarSize]} - var(--spacing))`);
13
13
  const AvatarToken = /*#__PURE__*/forwardRef(({
14
14
  avatarSrc,
@@ -74,7 +74,7 @@ const TokenBase = styled.span.attrs(({
74
74
  'aria-label': onRemove ? `${text}, press backspace or delete to remove` : undefined
75
75
  })).withConfig({
76
76
  displayName: "TokenBase",
77
- componentId: "opajvp-0"
77
+ componentId: "sc-opajvp-0"
78
78
  })(["align-items:center;border-radius:999px;cursor:", ";display:inline-flex;font-weight:", ";font-family:inherit;text-decoration:none;white-space:nowrap;", " ", ""], props => isTokenInteractive(props) ? 'pointer' : 'auto', get('fontWeights.bold'), variants, sx);
79
79
  TokenBase.defaultProps = {
80
80
  as: 'span',
@@ -7,7 +7,7 @@ import { get } from './constants';
7
7
  import sx from './sx';
8
8
  const TooltipBase = styled.span.withConfig({
9
9
  displayName: "Tooltip__TooltipBase",
10
- componentId: "kp39nc-0"
10
+ componentId: "sc-kp39nc-0"
11
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'), sx);
12
12
 
13
13
  function Tooltip({
@@ -10,7 +10,7 @@ const ITEM_CLASS = 'UnderlineNav-item';
10
10
  const SELECTED_CLASS = 'selected';
11
11
  const UnderlineNavBase = styled.nav.withConfig({
12
12
  displayName: "UnderlineNav__UnderlineNavBase",
13
- componentId: "zrnxqt-0"
13
+ componentId: "sc-zrnxqt-0"
14
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'), sx);
15
15
 
16
16
  function UnderlineNav({
@@ -41,7 +41,7 @@ const UnderlineNavLink = styled.a.attrs(props => ({
41
41
  className: classnames(ITEM_CLASS, props.selected && SELECTED_CLASS, props.className)
42
42
  })).withConfig({
43
43
  displayName: "UnderlineNav__UnderlineNavLink",
44
- componentId: "zrnxqt-1"
44
+ componentId: "sc-zrnxqt-1"
45
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'), sx);
46
46
  UnderlineNavLink.displayName = 'UnderlineNav.Link';
47
47
  export default Object.assign(UnderlineNav, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/components",
3
- "version": "0.0.0-2021112193058",
3
+ "version": "0.0.0-2021112212951",
4
4
  "description": "Primer react components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",
@@ -21,8 +21,7 @@
21
21
  "test": "jest",
22
22
  "test:update": "npm run test -- --updateSnapshot",
23
23
  "release": "npm run build && changeset publish",
24
- "size": "size-limit",
25
- "chromatic": "npx chromatic --project-token=91e12320417c"
24
+ "size": "size-limit"
26
25
  },
27
26
  "repository": "primer/react",
28
27
  "keywords": [
@@ -77,7 +76,7 @@
77
76
  "@github/prettier-config": "0.0.4",
78
77
  "@rollup/plugin-commonjs": "19.0.2",
79
78
  "@rollup/plugin-node-resolve": "13.0.5",
80
- "@size-limit/preset-big-lib": "5.0.2",
79
+ "@size-limit/preset-big-lib": "7.0.3",
81
80
  "@storybook/addon-a11y": "6.3.12",
82
81
  "@storybook/addon-actions": "^6.3.12",
83
82
  "@storybook/addon-essentials": "6.3.12",
@@ -102,7 +101,7 @@
102
101
  "babel-plugin-add-react-displayname": "0.0.5",
103
102
  "babel-plugin-macros": "3.1.0",
104
103
  "babel-plugin-preval": "5.0.0",
105
- "babel-plugin-styled-components": "1.12.0",
104
+ "babel-plugin-styled-components": "2.0.2",
106
105
  "babel-plugin-transform-replace-expressions": "0.2.0",
107
106
  "babel-polyfill": "6.26.0",
108
107
  "chroma-js": "2.1.2",
@@ -138,7 +137,7 @@
138
137
  "rollup-plugin-terser": "7.0.2",
139
138
  "rollup-plugin-visualizer": "5.5.0",
140
139
  "semver": "7.3.5",
141
- "size-limit": "5.0.2",
140
+ "size-limit": "7.0.3",
142
141
  "storybook-addon-performance": "0.16.1",
143
142
  "styled-components": "4.4.1",
144
143
  "ts-toolbelt": "9.6.0",