@primer/components 0.0.0-202110320457 → 0.0.0-2021103211532

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/lib/Header.d.ts CHANGED
@@ -1,23 +1,24 @@
1
1
  /// <reference types="hoist-non-react-statics" />
2
2
  import * as History from 'history';
3
+ import { SystemBorderProps, SystemCommonProps, SystemTypographyProps } from './constants';
3
4
  import { SxProp } from './sx';
4
5
  import { ComponentProps } from './utils/types';
5
- declare const Header: import("styled-components").StyledComponent<"div", any, SxProp, never>;
6
+ declare const Header: import("styled-components").StyledComponent<"div", any, SystemBorderProps & SystemCommonProps & SxProp, never>;
6
7
  declare const HeaderItem: import("styled-components").StyledComponent<"div", any, {
7
8
  full?: boolean | undefined;
8
- } & SxProp, never>;
9
+ } & SystemCommonProps & SxProp, never>;
9
10
  declare const HeaderLink: import("styled-components").StyledComponent<"a", any, {
10
11
  to?: History.LocationDescriptor<unknown> | undefined;
11
- } & SxProp, never>;
12
+ } & SystemCommonProps & SxProp & SystemTypographyProps & SystemBorderProps, never>;
12
13
  export declare type HeaderProps = ComponentProps<typeof Header>;
13
14
  export declare type HeaderLinkProps = ComponentProps<typeof HeaderLink>;
14
15
  export declare type HeaderItemProps = ComponentProps<typeof HeaderItem>;
15
- declare const _default: string & import("styled-components").StyledComponentBase<"div", any, SxProp, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
16
+ declare const _default: string & import("styled-components").StyledComponentBase<"div", any, SystemBorderProps & SystemCommonProps & SxProp, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
16
17
  Link: import("styled-components").StyledComponent<"a", any, {
17
18
  to?: History.LocationDescriptor<unknown> | undefined;
18
- } & SxProp, never>;
19
+ } & SystemCommonProps & SxProp & SystemTypographyProps & SystemBorderProps, never>;
19
20
  Item: import("styled-components").StyledComponent<"div", any, {
20
21
  full?: boolean | undefined;
21
- } & SxProp, never>;
22
+ } & SystemCommonProps & SxProp, never>;
22
23
  };
23
24
  export default _default;
package/lib/Header.js CHANGED
@@ -21,14 +21,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
21
  const Header = _styledComponents.default.div.withConfig({
22
22
  displayName: "Header",
23
23
  componentId: "sc-217i47-0"
24
- })(["z-index:32;display:flex;padding:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";align-items:center;flex-wrap:nowrap;", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('lineHeights.default'), (0, _constants.get)('colors.header.text'), (0, _constants.get)('colors.header.bg'), _sx.default);
24
+ })(["z-index:32;display:flex;padding:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";align-items:center;flex-wrap:nowrap;", " ", " ", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('lineHeights.default'), (0, _constants.get)('colors.header.text'), (0, _constants.get)('colors.header.bg'), _constants.COMMON, _constants.BORDER, _sx.default);
25
25
 
26
26
  const HeaderItem = _styledComponents.default.div.withConfig({
27
27
  displayName: "Header__HeaderItem",
28
28
  componentId: "sc-217i47-1"
29
- })(["display:flex;margin-right:", ";align-self:stretch;align-items:center;flex-wrap:nowrap;", ";", ";"], (0, _constants.get)('space.3'), ({
29
+ })(["display:flex;margin-right:", ";align-self:stretch;align-items:center;flex-wrap:nowrap;", ";", ";", ";", ";"], (0, _constants.get)('space.3'), ({
30
30
  full
31
- }) => full && (0, _styledComponents.css)(["flex:auto;"]), _sx.default);
31
+ }) => full && (0, _styledComponents.css)(["flex:auto;"]), _constants.COMMON, _constants.BORDER, _sx.default);
32
32
 
33
33
  HeaderItem.displayName = 'Header.Item';
34
34
 
@@ -49,7 +49,7 @@ const HeaderLink = _styledComponents.default.a.attrs(({
49
49
  }).withConfig({
50
50
  displayName: "Header__HeaderLink",
51
51
  componentId: "sc-217i47-2"
52
- })(["font-weight:", ";color:", ";white-space:nowrap;cursor:pointer;text-decoration:none;display:flex;align-items:center;&:hover,&:focus{color:", ";}", ";"], (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('colors.header.logo'), (0, _constants.get)('colors.header.text'), _sx.default);
52
+ })(["font-weight:", ";color:", ";white-space:nowrap;cursor:pointer;text-decoration:none;display:flex;align-items:center;&:hover,&:focus{color:", ";}", ";", ";", ";", ";"], (0, _constants.get)('fontWeights.bold'), (0, _constants.get)('colors.header.logo'), (0, _constants.get)('colors.header.text'), _constants.COMMON, _constants.BORDER, _constants.TYPOGRAPHY, _sx.default);
53
53
 
54
54
  HeaderLink.displayName = 'Header.Link';
55
55
 
@@ -24,7 +24,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
24
24
  const Page = _styledComponents.default.a.withConfig({
25
25
  displayName: "Pagination__Page",
26
26
  componentId: "b80nss-0"
27
- })(["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 );}}", ";"], (0, _constants.get)('colors.fg.default'), (0, _constants.get)('space.1'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('radii.2'), (0, _constants.get)('colors.border.default'), (0, _constants.get)('colors.border.muted'), (0, _constants.get)('colors.accent.fg'), (0, _constants.get)('colors.fg.onEmphasis'), (0, _constants.get)('colors.accent.emphasis'), (0, _constants.get)('colors.primer.fg.disabled'), (0, _constants.get)('space.1'), (0, _constants.get)('space.1'), _constants.COMMON);
27
+ })(["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 );}}"], (0, _constants.get)('colors.fg.default'), (0, _constants.get)('space.1'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('radii.2'), (0, _constants.get)('colors.border.default'), (0, _constants.get)('colors.border.muted'), (0, _constants.get)('colors.accent.fg'), (0, _constants.get)('colors.fg.onEmphasis'), (0, _constants.get)('colors.accent.emphasis'), (0, _constants.get)('colors.primer.fg.disabled'), (0, _constants.get)('space.1'), (0, _constants.get)('space.1'));
28
28
 
29
29
  function usePaginationPages({
30
30
  theme,
@@ -1,23 +1,24 @@
1
1
  /// <reference types="hoist-non-react-statics" />
2
2
  import * as History from 'history';
3
+ import { SystemBorderProps, SystemCommonProps, SystemTypographyProps } from './constants';
3
4
  import { SxProp } from './sx';
4
5
  import { ComponentProps } from './utils/types';
5
- declare const Header: import("styled-components").StyledComponent<"div", any, SxProp, never>;
6
+ declare const Header: import("styled-components").StyledComponent<"div", any, SystemBorderProps & SystemCommonProps & SxProp, never>;
6
7
  declare const HeaderItem: import("styled-components").StyledComponent<"div", any, {
7
8
  full?: boolean | undefined;
8
- } & SxProp, never>;
9
+ } & SystemCommonProps & SxProp, never>;
9
10
  declare const HeaderLink: import("styled-components").StyledComponent<"a", any, {
10
11
  to?: History.LocationDescriptor<unknown> | undefined;
11
- } & SxProp, never>;
12
+ } & SystemCommonProps & SxProp & SystemTypographyProps & SystemBorderProps, never>;
12
13
  export declare type HeaderProps = ComponentProps<typeof Header>;
13
14
  export declare type HeaderLinkProps = ComponentProps<typeof HeaderLink>;
14
15
  export declare type HeaderItemProps = ComponentProps<typeof HeaderItem>;
15
- declare const _default: string & import("styled-components").StyledComponentBase<"div", any, SxProp, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
16
+ declare const _default: string & import("styled-components").StyledComponentBase<"div", any, SystemBorderProps & SystemCommonProps & SxProp, never> & import("hoist-non-react-statics").NonReactStatics<never, {}> & {
16
17
  Link: import("styled-components").StyledComponent<"a", any, {
17
18
  to?: History.LocationDescriptor<unknown> | undefined;
18
- } & SxProp, never>;
19
+ } & SystemCommonProps & SxProp & SystemTypographyProps & SystemBorderProps, never>;
19
20
  Item: import("styled-components").StyledComponent<"div", any, {
20
21
  full?: boolean | undefined;
21
- } & SxProp, never>;
22
+ } & SystemCommonProps & SxProp, never>;
22
23
  };
23
24
  export default _default;
package/lib-esm/Header.js CHANGED
@@ -1,17 +1,17 @@
1
1
  // eslint-disable-next-line import/no-namespace
2
2
  import styled, { css } from 'styled-components';
3
- import { get } from './constants';
3
+ import { BORDER, COMMON, get, TYPOGRAPHY } from './constants';
4
4
  import sx from './sx';
5
5
  const Header = styled.div.withConfig({
6
6
  displayName: "Header",
7
7
  componentId: "sc-217i47-0"
8
- })(["z-index:32;display:flex;padding:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";align-items:center;flex-wrap:nowrap;", ";"], get('space.3'), get('fontSizes.1'), get('lineHeights.default'), get('colors.header.text'), get('colors.header.bg'), sx);
8
+ })(["z-index:32;display:flex;padding:", ";font-size:", ";line-height:", ";color:", ";background-color:", ";align-items:center;flex-wrap:nowrap;", " ", " ", ";"], get('space.3'), get('fontSizes.1'), get('lineHeights.default'), get('colors.header.text'), get('colors.header.bg'), COMMON, BORDER, sx);
9
9
  const HeaderItem = styled.div.withConfig({
10
10
  displayName: "Header__HeaderItem",
11
11
  componentId: "sc-217i47-1"
12
- })(["display:flex;margin-right:", ";align-self:stretch;align-items:center;flex-wrap:nowrap;", ";", ";"], get('space.3'), ({
12
+ })(["display:flex;margin-right:", ";align-self:stretch;align-items:center;flex-wrap:nowrap;", ";", ";", ";", ";"], get('space.3'), ({
13
13
  full
14
- }) => full && css(["flex:auto;"]), sx);
14
+ }) => full && css(["flex:auto;"]), COMMON, BORDER, sx);
15
15
  HeaderItem.displayName = 'Header.Item';
16
16
  const HeaderLink = styled.a.attrs(({
17
17
  to
@@ -30,7 +30,7 @@ const HeaderLink = styled.a.attrs(({
30
30
  }).withConfig({
31
31
  displayName: "Header__HeaderLink",
32
32
  componentId: "sc-217i47-2"
33
- })(["font-weight:", ";color:", ";white-space:nowrap;cursor:pointer;text-decoration:none;display:flex;align-items:center;&:hover,&:focus{color:", ";}", ";"], get('fontWeights.bold'), get('colors.header.logo'), get('colors.header.text'), sx);
33
+ })(["font-weight:", ";color:", ";white-space:nowrap;cursor:pointer;text-decoration:none;display:flex;align-items:center;&:hover,&:focus{color:", ";}", ";", ";", ";", ";"], get('fontWeights.bold'), get('colors.header.logo'), get('colors.header.text'), COMMON, BORDER, TYPOGRAPHY, sx);
34
34
  HeaderLink.displayName = 'Header.Link';
35
35
  export default Object.assign(Header, {
36
36
  Link: HeaderLink,
@@ -3,13 +3,13 @@ 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
- import { COMMON, get } from '../constants';
6
+ import { get } from '../constants';
7
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
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.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'), COMMON);
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({
15
15
  theme,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/components",
3
- "version": "0.0.0-202110320457",
3
+ "version": "0.0.0-2021103211532",
4
4
  "description": "Primer react components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",