@primer/components 0.0.0-2021103224544 → 0.0.0-2021103224924

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/Truncate.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { MaxWidthProps } from 'styled-system';
2
+ import { SystemCommonProps, SystemTypographyProps } from './constants';
2
3
  import { SxProp } from './sx';
3
4
  import { ComponentProps } from './utils/types';
4
5
  declare const Truncate: import("styled-components").StyledComponent<"div", any, {
5
6
  title: string;
6
7
  inline?: boolean | undefined;
7
8
  expandable?: boolean | undefined;
8
- } & MaxWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>> & SxProp, never>;
9
+ } & MaxWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>> & SystemTypographyProps & SystemCommonProps & SxProp, never>;
9
10
  export declare type TruncateProps = ComponentProps<typeof Truncate>;
10
11
  export default Truncate;
package/lib/Truncate.js CHANGED
@@ -9,6 +9,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
10
  var _styledSystem = require("styled-system");
11
11
 
12
+ var _constants = require("./constants");
13
+
12
14
  var _sx = _interopRequireDefault(require("./sx"));
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -16,7 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
16
18
  const Truncate = _styledComponents.default.div.withConfig({
17
19
  displayName: "Truncate",
18
20
  componentId: "sc-1074h1l-0"
19
- })(["display:", ";overflow:hidden;text-overflow:ellipsis;vertical-align:", ";white-space:nowrap;", " ", " ", ";"], props => props.inline ? 'inline-block' : 'inherit', props => props.inline ? 'top' : 'initial', _styledSystem.maxWidth, props => props.expandable ? `&:hover { max-width: 10000px; }` : '', _sx.default);
21
+ })(["", " ", " display:", ";overflow:hidden;text-overflow:ellipsis;vertical-align:", ";white-space:nowrap;", " ", " ", ";"], _constants.TYPOGRAPHY, _constants.COMMON, props => props.inline ? 'inline-block' : 'inherit', props => props.inline ? 'top' : 'initial', _styledSystem.maxWidth, props => props.expandable ? `&:hover { max-width: 10000px; }` : '', _sx.default);
20
22
 
21
23
  Truncate.defaultProps = {
22
24
  expandable: false,
@@ -1,6 +1,5 @@
1
1
  import * as History from 'history';
2
2
  import React from 'react';
3
- import { SystemCommonProps } from './constants';
4
3
  import { SxProp } from './sx';
5
4
  import { ComponentProps } from './utils/types';
6
5
  declare const UnderlineNavBase: import("styled-components").StyledComponent<"nav", any, SxProp, never>;
@@ -14,12 +13,12 @@ declare function UnderlineNav({ actions, className, align, children, full, label
14
13
  declare const UnderlineNavLink: import("styled-components").StyledComponent<"a", any, {
15
14
  to?: History.LocationDescriptor<unknown> | undefined;
16
15
  selected?: boolean | undefined;
17
- } & SystemCommonProps & SxProp, never>;
16
+ } & SxProp, never>;
18
17
  export declare type UnderlineNavLinkProps = ComponentProps<typeof UnderlineNavLink>;
19
18
  declare const _default: typeof UnderlineNav & {
20
19
  Link: import("styled-components").StyledComponent<"a", any, {
21
20
  to?: History.LocationDescriptor<unknown> | undefined;
22
21
  selected?: boolean | undefined;
23
- } & SystemCommonProps & SxProp, never>;
22
+ } & SxProp, never>;
24
23
  };
25
24
  export default _default;
@@ -25,7 +25,7 @@ const SELECTED_CLASS = 'selected';
25
25
  const UnderlineNavBase = _styledComponents.default.nav.withConfig({
26
26
  displayName: "UnderlineNav__UnderlineNavBase",
27
27
  componentId: "zrnxqt-0"
28
- })(["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;}", ";", ";"], (0, _constants.get)('colors.border.muted'), (0, _constants.get)('space.3'), _constants.COMMON, _sx.default);
28
+ })(["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;}", ";"], (0, _constants.get)('colors.border.muted'), (0, _constants.get)('space.3'), _sx.default);
29
29
 
30
30
  function UnderlineNav({
31
31
  actions,
@@ -57,7 +57,7 @@ const UnderlineNavLink = _styledComponents.default.a.attrs(props => ({
57
57
  })).withConfig({
58
58
  displayName: "UnderlineNav__UnderlineNavLink",
59
59
  componentId: "zrnxqt-1"
60
- })(["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:", ";}}", ";", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('lineHeights.default'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.neutral.muted'), (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.primer.border.active'), (0, _constants.get)('colors.fg.default'), _constants.COMMON, _sx.default);
60
+ })(["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:", ";}}", ";"], (0, _constants.get)('space.3'), (0, _constants.get)('space.2'), (0, _constants.get)('space.3'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('lineHeights.default'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.neutral.muted'), (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('colors.fg.default'), (0, _constants.get)('colors.primer.border.active'), (0, _constants.get)('colors.fg.default'), _sx.default);
61
61
 
62
62
  UnderlineNavLink.displayName = 'UnderlineNav.Link';
63
63
 
@@ -1,10 +1,11 @@
1
1
  import { MaxWidthProps } from 'styled-system';
2
+ import { SystemCommonProps, SystemTypographyProps } from './constants';
2
3
  import { SxProp } from './sx';
3
4
  import { ComponentProps } from './utils/types';
4
5
  declare const Truncate: import("styled-components").StyledComponent<"div", any, {
5
6
  title: string;
6
7
  inline?: boolean | undefined;
7
8
  expandable?: boolean | undefined;
8
- } & MaxWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>> & SxProp, never>;
9
+ } & MaxWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>> & SystemTypographyProps & SystemCommonProps & SxProp, never>;
9
10
  export declare type TruncateProps = ComponentProps<typeof Truncate>;
10
11
  export default Truncate;
@@ -1,10 +1,11 @@
1
1
  import styled from 'styled-components';
2
2
  import { maxWidth } from 'styled-system';
3
+ import { COMMON, TYPOGRAPHY } from './constants';
3
4
  import sx from './sx';
4
5
  const Truncate = styled.div.withConfig({
5
6
  displayName: "Truncate",
6
7
  componentId: "sc-1074h1l-0"
7
- })(["display:", ";overflow:hidden;text-overflow:ellipsis;vertical-align:", ";white-space:nowrap;", " ", " ", ";"], props => props.inline ? 'inline-block' : 'inherit', props => props.inline ? 'top' : 'initial', maxWidth, props => props.expandable ? `&:hover { max-width: 10000px; }` : '', sx);
8
+ })(["", " ", " display:", ";overflow:hidden;text-overflow:ellipsis;vertical-align:", ";white-space:nowrap;", " ", " ", ";"], TYPOGRAPHY, COMMON, props => props.inline ? 'inline-block' : 'inherit', props => props.inline ? 'top' : 'initial', maxWidth, props => props.expandable ? `&:hover { max-width: 10000px; }` : '', sx);
8
9
  Truncate.defaultProps = {
9
10
  expandable: false,
10
11
  inline: false,
@@ -1,6 +1,5 @@
1
1
  import * as History from 'history';
2
2
  import React from 'react';
3
- import { SystemCommonProps } from './constants';
4
3
  import { SxProp } from './sx';
5
4
  import { ComponentProps } from './utils/types';
6
5
  declare const UnderlineNavBase: import("styled-components").StyledComponent<"nav", any, SxProp, never>;
@@ -14,12 +13,12 @@ declare function UnderlineNav({ actions, className, align, children, full, label
14
13
  declare const UnderlineNavLink: import("styled-components").StyledComponent<"a", any, {
15
14
  to?: History.LocationDescriptor<unknown> | undefined;
16
15
  selected?: boolean | undefined;
17
- } & SystemCommonProps & SxProp, never>;
16
+ } & SxProp, never>;
18
17
  export declare type UnderlineNavLinkProps = ComponentProps<typeof UnderlineNavLink>;
19
18
  declare const _default: typeof UnderlineNav & {
20
19
  Link: import("styled-components").StyledComponent<"a", any, {
21
20
  to?: History.LocationDescriptor<unknown> | undefined;
22
21
  selected?: boolean | undefined;
23
- } & SystemCommonProps & SxProp, never>;
22
+ } & SxProp, never>;
24
23
  };
25
24
  export default _default;
@@ -4,14 +4,14 @@ import classnames from 'classnames'; // eslint-disable-next-line import/no-names
4
4
 
5
5
  import React from 'react';
6
6
  import styled from 'styled-components';
7
- import { COMMON, get } from './constants';
7
+ import { get } from './constants';
8
8
  import sx from './sx';
9
9
  const ITEM_CLASS = 'UnderlineNav-item';
10
10
  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.muted'), get('space.3'), COMMON, sx);
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({
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.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);
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, {
48
48
  Link: UnderlineNavLink
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/components",
3
- "version": "0.0.0-2021103224544",
3
+ "version": "0.0.0-2021103224924",
4
4
  "description": "Primer react components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",