@primer/components 0.0.0-2021103205051 → 0.0.0-2021103205322

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/Label.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { BorderColorProps } from 'styled-system';
2
+ import { SystemCommonProps } from './constants';
2
3
  import { SxProp } from './sx';
3
4
  import { ComponentProps } from './utils/types';
4
5
  declare const Label: import("styled-components").StyledComponent<"span", any, {
5
6
  variant?: "small" | "medium" | "large" | "xl" | undefined;
6
7
  dropshadow?: boolean | undefined;
7
8
  outline?: boolean | undefined;
8
- } & BorderColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & SxProp, never>;
9
+ } & BorderColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & SystemCommonProps & SxProp, never>;
9
10
  export declare type LabelProps = ComponentProps<typeof Label>;
10
11
  export default Label;
package/lib/Label.js CHANGED
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
19
19
 
20
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
21
 
22
- const outlineStyles = (0, _styledComponents.css)(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";background-color:transparent;"], (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.border.default'), _styledSystem.borderColor);
22
+ const outlineStyles = (0, _styledComponents.css)(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";", ";background-color:transparent;"], (0, _constants.get)('colors.fg.muted'), (0, _constants.get)('borderWidths.1'), (0, _constants.get)('colors.border.default'), _styledSystem.borderColor, _constants.COMMON);
23
23
  const sizeVariant = (0, _styledSystem.variant)({
24
24
  variants: {
25
25
  small: {
@@ -49,9 +49,10 @@ const sizeVariant = (0, _styledSystem.variant)({
49
49
  const Label = _styledComponents.default.span.withConfig({
50
50
  displayName: "Label",
51
51
  componentId: "sc-1t3ykp0-0"
52
- })(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";bg:", " &:hover{text-decoration:none;}", " ", " ", " ", ""], (0, _constants.get)('fontWeights.semibold'), (0, _constants.get)('colors.fg.onEmphasis'), (0, _constants.get)('radii.3'), (0, _constants.get)('colors.neutral.emphasis'), sizeVariant, props => props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '', props => props.outline ? outlineStyles : '', _sx.default);
52
+ })(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";&:hover{text-decoration:none;}", " ", " ", " ", " ", ""], (0, _constants.get)('fontWeights.semibold'), (0, _constants.get)('colors.fg.onEmphasis'), (0, _constants.get)('radii.3'), sizeVariant, _constants.COMMON, props => props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '', props => props.outline ? outlineStyles : '', _sx.default);
53
53
 
54
54
  Label.defaultProps = {
55
+ bg: 'neutral.emphasis',
55
56
  variant: 'medium'
56
57
  };
57
58
  var _default = Label;
@@ -1,6 +1,5 @@
1
- import { SystemCommonProps } from './constants';
2
1
  import { SxProp } from './sx';
3
2
  import { ComponentProps } from './utils/types';
4
- declare const LabelGroup: import("styled-components").StyledComponent<"span", any, SystemCommonProps & SxProp, never>;
3
+ declare const LabelGroup: import("styled-components").StyledComponent<"span", any, SxProp, never>;
5
4
  export declare type LabelGroupProps = ComponentProps<typeof LabelGroup>;
6
5
  export default LabelGroup;
package/lib/LabelGroup.js CHANGED
@@ -16,7 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
16
16
  const LabelGroup = _styledComponents.default.span.withConfig({
17
17
  displayName: "LabelGroup",
18
18
  componentId: "k6k3qa-0"
19
- })(["", " & *{margin-right:", ";}& *:last-child{margin-right:0;}", ";"], _constants.COMMON, (0, _constants.get)('space.1'), _sx.default);
19
+ })(["& *{margin-right:", ";}& *:last-child{margin-right:0;}", ";"], (0, _constants.get)('space.1'), _sx.default);
20
20
 
21
21
  var _default = LabelGroup;
22
22
  exports.default = _default;
@@ -1,10 +1,11 @@
1
1
  import { BorderColorProps } from 'styled-system';
2
+ import { SystemCommonProps } from './constants';
2
3
  import { SxProp } from './sx';
3
4
  import { ComponentProps } from './utils/types';
4
5
  declare const Label: import("styled-components").StyledComponent<"span", any, {
5
6
  variant?: "small" | "medium" | "large" | "xl" | undefined;
6
7
  dropshadow?: boolean | undefined;
7
8
  outline?: boolean | undefined;
8
- } & BorderColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & SxProp, never>;
9
+ } & BorderColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & SystemCommonProps & SxProp, never>;
9
10
  export declare type LabelProps = ComponentProps<typeof Label>;
10
11
  export default Label;
package/lib-esm/Label.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import { borderColor, variant } from 'styled-system';
3
- import { get } from './constants';
3
+ import { COMMON, get } from './constants';
4
4
  import sx from './sx';
5
- const outlineStyles = css(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";background-color:transparent;"], get('colors.fg.muted'), get('borderWidths.1'), get('colors.border.default'), borderColor);
5
+ const outlineStyles = css(["margin-top:-1px;margin-bottom:-1px;color:", ";border:", " solid ", ";box-shadow:none;", ";", ";background-color:transparent;"], get('colors.fg.muted'), get('borderWidths.1'), get('colors.border.default'), borderColor, COMMON);
6
6
  const sizeVariant = variant({
7
7
  variants: {
8
8
  small: {
@@ -31,8 +31,9 @@ const sizeVariant = variant({
31
31
  const Label = styled.span.withConfig({
32
32
  displayName: "Label",
33
33
  componentId: "sc-1t3ykp0-0"
34
- })(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";bg:", " &:hover{text-decoration:none;}", " ", " ", " ", ""], get('fontWeights.semibold'), get('colors.fg.onEmphasis'), get('radii.3'), get('colors.neutral.emphasis'), sizeVariant, props => props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '', props => props.outline ? outlineStyles : '', sx);
34
+ })(["display:inline-block;font-weight:", ";color:", ";border-radius:", ";&:hover{text-decoration:none;}", " ", " ", " ", " ", ""], get('fontWeights.semibold'), get('colors.fg.onEmphasis'), get('radii.3'), sizeVariant, COMMON, props => props.dropshadow ? 'box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)' : '', props => props.outline ? outlineStyles : '', sx);
35
35
  Label.defaultProps = {
36
+ bg: 'neutral.emphasis',
36
37
  variant: 'medium'
37
38
  };
38
39
  export default Label;
@@ -1,6 +1,5 @@
1
- import { SystemCommonProps } from './constants';
2
1
  import { SxProp } from './sx';
3
2
  import { ComponentProps } from './utils/types';
4
- declare const LabelGroup: import("styled-components").StyledComponent<"span", any, SystemCommonProps & SxProp, never>;
3
+ declare const LabelGroup: import("styled-components").StyledComponent<"span", any, SxProp, never>;
5
4
  export declare type LabelGroupProps = ComponentProps<typeof LabelGroup>;
6
5
  export default LabelGroup;
@@ -1,8 +1,8 @@
1
1
  import styled from 'styled-components';
2
- import { COMMON, get } from './constants';
2
+ import { get } from './constants';
3
3
  import sx from './sx';
4
4
  const LabelGroup = styled.span.withConfig({
5
5
  displayName: "LabelGroup",
6
6
  componentId: "k6k3qa-0"
7
- })(["", " & *{margin-right:", ";}& *:last-child{margin-right:0;}", ";"], COMMON, get('space.1'), sx);
7
+ })(["& *{margin-right:", ";}& *:last-child{margin-right:0;}", ";"], get('space.1'), sx);
8
8
  export default LabelGroup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/components",
3
- "version": "0.0.0-2021103205051",
3
+ "version": "0.0.0-2021103205322",
4
4
  "description": "Primer react components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",