@automattic/vip-design-system 2.18.1 → 2.19.0

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 (47) hide show
  1. package/.storybook/preview-head.html +1 -0
  2. package/build/system/Badge/Badge.js +2 -1
  3. package/build/system/DescriptionList/DescriptionList.js +0 -1
  4. package/build/system/Form/Label.d.ts +1 -3
  5. package/build/system/Form/Label.js +1 -3
  6. package/build/system/Form/RadioBoxGroup.jsx +12 -1
  7. package/build/system/Form/RadioBoxGroup.stories.jsx +6 -1
  8. package/build/system/Heading/Heading.js +2 -3
  9. package/build/system/Heading/Heading.stories.js +15 -2
  10. package/build/system/Nav/styles/variants/menu.js +1 -2
  11. package/build/system/Notice/Notice.js +1 -1
  12. package/build/system/Pagination/styles.js +1 -4
  13. package/build/system/Table/TableCell.js +1 -1
  14. package/build/system/Text/Text.js +0 -1
  15. package/build/system/Text/Text.stories.js +16 -13
  16. package/build/system/Toolbar/Logo.js +22 -6
  17. package/build/system/Wizard/Wizard.stories.js +11 -11
  18. package/build/system/Wizard/WizardStep.js +0 -2
  19. package/build/system/theme/generated/valet-theme-dark.json +224 -227
  20. package/build/system/theme/generated/valet-theme-light.json +224 -227
  21. package/build/system/theme/getPropValue.js +3 -7
  22. package/build/system/theme/index.d.ts +20 -12
  23. package/build/system/theme/index.js +27 -20
  24. package/docs/SETUP.md +1 -1
  25. package/package.json +1 -1
  26. package/src/system/Badge/Badge.tsx +2 -1
  27. package/src/system/DescriptionList/DescriptionList.tsx +0 -1
  28. package/src/system/Form/Label.tsx +1 -3
  29. package/src/system/Form/RadioBoxGroup.jsx +12 -1
  30. package/src/system/Form/RadioBoxGroup.stories.jsx +6 -1
  31. package/src/system/Heading/Heading.stories.tsx +10 -1
  32. package/src/system/Heading/Heading.tsx +1 -2
  33. package/src/system/Nav/styles/variants/menu.ts +1 -2
  34. package/src/system/Notice/Notice.tsx +1 -1
  35. package/src/system/Pagination/styles.ts +1 -4
  36. package/src/system/Table/TableCell.tsx +1 -1
  37. package/src/system/Text/Text.stories.tsx +7 -4
  38. package/src/system/Text/Text.tsx +0 -1
  39. package/src/system/Toolbar/Logo.tsx +19 -2
  40. package/src/system/Wizard/Wizard.stories.tsx +11 -11
  41. package/src/system/Wizard/WizardStep.tsx +0 -2
  42. package/src/system/theme/generated/valet-theme-dark.json +224 -227
  43. package/src/system/theme/generated/valet-theme-light.json +224 -227
  44. package/src/system/theme/getPropValue.ts +1 -8
  45. package/src/system/theme/index.ts +33 -18
  46. package/tokens/valet-core/valet-core.json +39 -9
  47. package/tokens/valet-core/wpvip-product-core.json +88 -125
@@ -0,0 +1 @@
1
+ <link rel="stylesheet" href="https://use.typekit.net/yym8qzc.css" />
@@ -25,6 +25,7 @@ export var Badge = /*#__PURE__*/forwardRef(function (_ref, ref) {
25
25
  as: "span",
26
26
  sx: _extends({
27
27
  fontSize: 0,
28
+ letterSpacing: '0.01em',
28
29
  padding: 0,
29
30
  // do we need padding declared twice here?
30
31
  bg: "tag." + variant + ".background",
@@ -34,7 +35,7 @@ export var Badge = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
35
  px: 2,
35
36
  display: 'inline-block',
36
37
  borderRadius: 1,
37
- fontWeight: 'heading',
38
+ fontWeight: 'medium',
38
39
  a: {
39
40
  color: "tag." + variant + ".text",
40
41
  '&:hover, &:focus, &:active': {
@@ -21,7 +21,6 @@ var TableComponent = function TableComponent(_ref) {
21
21
  minWidth: 'auto',
22
22
  '> tbody > tr': {
23
23
  '> td, > th': {
24
- fontWeight: 'heading',
25
24
  border: 'none',
26
25
  pl: 0,
27
26
  '&:first-of-type': {
@@ -6,9 +6,7 @@ import React from 'react';
6
6
  import { BoxProps } from 'theme-ui';
7
7
  export declare const baseLabelColor = "input.label.default";
8
8
  export declare const baseLabelStyle: {
9
- fontWeight: string;
10
- fontSize: number;
11
- lineHeight: number;
9
+ variant: string;
12
10
  color: string;
13
11
  };
14
12
  export interface LabelProps extends BoxProps {
@@ -16,9 +16,7 @@ import { RequiredLabel } from './RequiredLabel';
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
17
17
  export var baseLabelColor = 'input.label.default';
18
18
  export var baseLabelStyle = {
19
- fontWeight: 'heading',
20
- fontSize: 2,
21
- lineHeight: 1.5,
19
+ variant: 'forms.label',
22
20
  color: baseLabelColor
23
21
  };
24
22
  /**
@@ -72,7 +72,14 @@ const RadioOption = ( {
72
72
  { ...restOption }
73
73
  />
74
74
  <div
75
- sx={ { mb: 0, color: 'input.radio-box.label.primary.default', p: 3, pr: 0, flex: 'auto' } }
75
+ sx={ {
76
+ mb: 0,
77
+ color: 'input.radio-box.label.primary.default',
78
+ fontWeight: 'semibold',
79
+ p: 3,
80
+ pr: 0,
81
+ flex: 'auto',
82
+ } }
76
83
  >
77
84
  <label htmlFor={ forLabel } { ...labelProps }>
78
85
  { label }
@@ -82,7 +89,11 @@ const RadioOption = ( {
82
89
  sx={ {
83
90
  color: 'input.radio-box.label.secondary.default',
84
91
  mb: 0,
92
+ mt: 1,
85
93
  fontSize: 1,
94
+ fontWeight: 'regular',
95
+ letterSpacing: '0.01em',
96
+ lineHeight: '140%',
86
97
  display: 'block',
87
98
  } }
88
99
  id={ describedById }
@@ -60,7 +60,12 @@ export const Primary = {
60
60
  args: {
61
61
  defaultValue: 'one',
62
62
  options: [
63
- { label: 'One', value: 'one', description: 'This is a description' },
63
+ {
64
+ label: 'One',
65
+ value: 'one',
66
+ description:
67
+ 'This is a longer description that allows us to see the text wrap and determine if the line height is correct',
68
+ },
64
69
  { label: 'Two', value: 'two', description: 'This is a description' },
65
70
  { label: 'Three', value: 'three', description: 'This is a description' },
66
71
  ],
@@ -19,10 +19,9 @@ export var Heading = /*#__PURE__*/forwardRef(function (_ref, ref) {
19
19
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
20
20
  return _jsx(ThemeHeading, _extends({
21
21
  as: variant,
22
+ variant: variant,
22
23
  sx: _extends({
23
- color: 'heading',
24
- // pass variant prop to sx
25
- variant: "text." + variant.toString()
24
+ color: 'heading'
26
25
  }, sx),
27
26
  className: classNames('vip-heading-component', className),
28
27
  ref: ref
@@ -32,8 +32,21 @@ export var Default = {
32
32
  variant: "h5",
33
33
  children: "Heading Five"
34
34
  }), _jsx(Heading, {
35
- variant: "h6",
36
- children: "Heading Six"
35
+ variant: "h3",
36
+ as: "h1",
37
+ children: "Heading One with Heading Three Styles"
38
+ }), _jsx(Heading, {
39
+ as: "p",
40
+ sx: {
41
+ variant: 'text.caps'
42
+ },
43
+ children: "Paragraph with Caps Styles"
44
+ }), _jsx(Heading, {
45
+ as: "h3",
46
+ sx: {
47
+ variant: 'text.caps'
48
+ },
49
+ children: "Heading Three with Caps Styles"
37
50
  })]
38
51
  });
39
52
  }
@@ -45,8 +45,7 @@ export var menuItemLinkStyles = (_menuItemLinkStyles = {
45
45
  borderRadius: 1,
46
46
  color: 'text',
47
47
  display: 'inline-flex',
48
- fontSize: '0.875rem',
49
- fontWeight: 'body',
48
+ variant: 'text.default',
50
49
  height: 38,
51
50
  mx: 0,
52
51
  mb: 0,
@@ -236,7 +236,7 @@ export var Notice = /*#__PURE__*/React.forwardRef(function (_ref2, forwardRef) {
236
236
  as: headingVariant,
237
237
  sx: {
238
238
  color: textColor,
239
- mb: 0,
239
+ mb: 1,
240
240
  fontSize: 2,
241
241
  fontWeight: 'bold'
242
242
  },
@@ -23,8 +23,7 @@ export var pageButtonStyles = {
23
23
  bg: 'transparent',
24
24
  color: 'heading',
25
25
  cursor: 'pointer',
26
- fontSize: 2,
27
- fontFamily: 'body',
26
+ variant: 'text.default',
28
27
  px: 2,
29
28
  borderBottom: '3px solid',
30
29
  borderColor: 'transparent',
@@ -79,8 +78,6 @@ export var compactTriggerStyles = {
79
78
  bg: 'transparent',
80
79
  color: 'heading',
81
80
  cursor: 'pointer',
82
- fontSize: 2,
83
- fontFamily: 'body',
84
81
  fontWeight: 'bold',
85
82
  px: 2,
86
83
  borderRadius: 1,
@@ -27,7 +27,7 @@ export var TableCell = function TableCell(_ref) {
27
27
  borderTop: head ? '1px solid' : 'none',
28
28
  // borderColor should come after borderTop so it can override it
29
29
  borderColor: 'table.border',
30
- fontWeight: 'body',
30
+ variant: 'text.default',
31
31
  px: 3,
32
32
  py: 2,
33
33
  textAlign: 'left'
@@ -19,7 +19,6 @@ export var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
19
19
  return _jsx(ThemeText, _extends({
20
20
  as: "p",
21
21
  sx: _extends({
22
- lineHeight: 'body',
23
22
  marginBottom: 2,
24
23
  color: 'text'
25
24
  }, sx),
@@ -20,6 +20,21 @@ export var Default = {
20
20
  return _jsxs(_Fragment, {
21
21
  children: [_jsxs(Text, {
22
22
  children: ["Apparently we had reached a great height in the atmosphere, for the sky was a dead black, and the stars had ceased to twinkle. By the same illusion which lifts the horizon of the sea to the level of the spectator on a hillside, the sable cloud beneath was dished out, and the car seemed to float in the middle of an immense dark sphere, whose upper half was strewn with silver.", ' ']
23
+ }), _jsx(Text, {
24
+ variant: "default",
25
+ children: "Body Default"
26
+ }), _jsx(Text, {
27
+ variant: "small",
28
+ children: "Body Small"
29
+ }), _jsx(Text, {
30
+ variant: "large",
31
+ children: "Body Large"
32
+ }), _jsx(Text, {
33
+ variant: "mono",
34
+ children: "Body Mono"
35
+ }), _jsx(Text, {
36
+ variant: "mono-bold",
37
+ children: "Body Mono Bold"
23
38
  }), _jsx(Text, {
24
39
  sx: {
25
40
  color: 'texts.accent'
@@ -33,13 +48,7 @@ export var Default = {
33
48
  }), _jsx(Text, {
34
49
  sx: {
35
50
  color: 'texts.helper',
36
- fontWeight: 'body'
37
- },
38
- children: "Text Helper"
39
- }), _jsx(Text, {
40
- sx: {
41
- color: 'texts.helper',
42
- fontWeight: 'heading'
51
+ fontWeight: 'light'
43
52
  },
44
53
  children: "Text Helper"
45
54
  }), _jsx(Text, {
@@ -60,12 +69,6 @@ export var Default = {
60
69
  fontWeight: 'bold'
61
70
  },
62
71
  children: "Text Helper"
63
- }), _jsx(Text, {
64
- sx: {
65
- color: 'texts.helper',
66
- fontWeight: 'light'
67
- },
68
- children: "Text Helper"
69
72
  }), _jsx(Text, {
70
73
  sx: {
71
74
  color: 'texts.secondary'
@@ -10,7 +10,7 @@ import { Link } from 'theme-ui';
10
10
  /**
11
11
  * Internal dependencies
12
12
  */
13
- import { jsx as _jsx } from "theme-ui/jsx-runtime";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
14
14
  var VIP_LOGO = 'vip-logo-component';
15
15
  /**
16
16
  * The WordPress VIP logo rendered as an SVG inside a themed link.
@@ -29,15 +29,31 @@ export var Logo = function Logo(_ref) {
29
29
  },
30
30
  href: href,
31
31
  as: as,
32
- children: _jsx("svg", {
32
+ children: _jsxs("svg", {
33
33
  className: classNames(VIP_LOGO, className),
34
34
  xmlns: "http://www.w3.org/2000/svg",
35
- viewBox: "0 0 55 24",
35
+ viewBox: "0 0 393.6 176.6",
36
36
  role: "img",
37
37
  "aria-label": "WordPress VIP Logo",
38
- children: _jsx("path", {
39
- d: "m12.014 0c-6.6103 0-12.014 5.3911-12.014 11.986 0 6.6226 5.4034 12.014 12.014 12.014 6.6377 0 12.041-5.3911 12.041-12.014 0-6.5952-5.4035-11.986-12.041-11.986zm-10.807 11.986c0-1.5598 0.32914-3.0376 0.93257-4.3786l5.1566 14.094c-3.5931-1.7515-6.0891-5.4459-6.0891-9.715zm10.807 10.782c-1.0697 0-2.0846-0.1642-3.0446-0.4378l3.2366-9.4139 3.3189 9.0855c0.0274 0.0547 0.0548 0.1094 0.0823 0.1368-1.1246 0.4105-2.3315 0.6294-3.5932 0.6294zm1.5086-15.818c0.6583-0.02737 1.2343-0.10946 1.2343-0.10946 0.576-0.0821 0.5211-0.93045-0.0823-0.87572 0 0-1.7554 0.13683-2.88 0.13683-1.0697 0-2.8526-0.13683-2.8526-0.13683-0.576-0.02736-0.65828 0.84835-0.05485 0.87572 0 0 0.54857 0.05473 1.1245 0.10946l1.6732 4.5975-2.3589 7.0604-3.9223-11.658c0.65828-0.02737 1.2343-0.10946 1.2343-0.10946 0.576-0.0821 0.52115-0.93045-0.08228-0.87572 0 0-1.7554 0.13683-2.88 0.13683h-0.68572c1.9474-2.9555 5.2663-4.8985 9.024-4.8985 2.8252 0 5.376 1.0673 7.296 2.8187h-0.1371c-1.0697 0-1.8103 0.93044-1.8103 1.9156 0 0.87571 0.5211 1.642 1.0697 2.5177 0.4114 0.71152 0.8777 1.642 0.8777 2.9829 0 0.9304-0.2743 2.0798-0.8228 3.4755l-1.0698 3.5849-3.8948-11.548zm3.9223 14.367l3.2914-9.5233c0.6034-1.5325 0.8229-2.764 0.8229-3.8586 0-0.41049-0.0275-0.76625-0.0823-1.122 0.8503 1.5325 1.3165 3.3113 1.3165 5.1722 0.0275 3.9955-2.112 7.4709-5.3485 9.3318zm17.472-14.86l-2.4412 7.1425c-0.2468 0.8757-0.4663 1.6967-0.5485 2.463h-0.0549c-0.0549-0.7663-0.2743-1.6146-0.5486-2.463l-2.4411-7.1425h-3.2092l4.608 12.068h3.2915l4.608-12.068h-3.264zm4.8548 0l-0.9051 2.3808v9.6602h3.2366v-12.041h-2.3315zm13.879 1.423c-0.7954-1.0946-1.92-1.642-3.3463-1.642-1.5086 0-2.5509 0.60206-3.3189 1.7788h-0.1645l-0.4663-1.5599h-2.6332v17.542h3.2366v-5.0627c0-0.1642-0.0548-0.7389-0.1646-1.7514h0.1646c0.7954 1.0399 1.8103 1.5325 3.2366 1.5325 0.9326 0 1.7554-0.2463 2.4686-0.7389 0.6857-0.4926 1.2342-1.2315 1.6182-2.1619 0.384-0.9579 0.576-2.0799 0.576-3.3661 0-1.9429-0.4114-3.4754-1.2068-4.5701zm-4.2514 8.1825c-0.8229 0-1.4538-0.2737-1.8378-0.8484-0.384-0.5473-0.576-1.4778-0.576-2.7913v-0.3558c0.0275-1.1494 0.2195-1.9703 0.576-2.4629 0.384-0.49259 0.96-0.73888 1.7829-0.73888 0.768 0 1.344 0.30103 1.7006 0.90308 0.3565 0.60203 0.5485 1.4777 0.5485 2.6818 0.0275 2.3809-0.7131 3.6124-2.1942 3.6124z"
40
- })
38
+ sx: {
39
+ display: 'block',
40
+ width: '100%',
41
+ height: 'auto'
42
+ },
43
+ children: [_jsx("path", {
44
+ fill: "currentColor",
45
+ d: "m88.3,0C39.6,0,0,39.6,0,88.3s39.6,88.3,88.3,88.3,88.3-39.5,88.3-88.3S137.1,0,88.3,0ZM8.8,88.3c0-11.5,2.5-22.5,6.8-32.4l37.8,103.8c-26-13-44.6-39.9-44.6-71.4Zm79.5,79.5c-7.7,0-15.3-1.1-22.5-3.2l23.7-69.2,24.4,66.9c.2.4.4.7.5,1.1-8.1,2.8-16.7,4.4-26.1,4.4Zm11-116.8c4.8-.4,9-.7,9-.7,4.1-.5,3.8-6.8-.5-6.5,0,0-13,.9-21.2.9-7.7,0-20.9-.9-20.9-.9-4.1-.4-4.8,6.3-.5,6.5,0,0,4.1.5,8.3.7l12.2,34-17.2,52-28.6-86c4.8-.4,9-.7,9-.7,4.1-.5,3.8-6.8-.5-6.5,0,0-13,.9-21.2.9-1.6,0-3.2,0-5.2-.2C36.1,23,60.5,8.8,88.2,8.8c20.7,0,39.5,7.9,53.6,20.9h-1.1c-7.7,0-13.3,6.8-13.3,14.2,0,6.5,3.8,12.2,7.7,18.7,2.9,5.2,6.5,12.2,6.5,21.9,0,6.8-2,15.5-6.1,25.7l-7.9,26.3-28.3-85.5Zm29.2,106l24.3-70.1c4.5-11.3,6.1-20.3,6.1-28.4,0-2.9-.2-5.5-.5-8.1,6.3,11.3,9.7,24.3,9.7,38.1-.3,29.1-16.3,54.8-39.6,68.5Z"
46
+ }), _jsx("path", {
47
+ fill: "currentColor",
48
+ d: "m323.7,39.2h33.4c7.2,0,13.1.9,17.8,2.5,4.7,1.6,8.5,3.8,11.1,6.5,2.9,2.7,4.7,5.8,5.8,9.3,1.1,3.4,1.8,7.2,1.8,11,0,4.1-.5,8.1-1.8,11.9-1.1,3.8-3.1,7-5.8,10.1-2.7,2.9-6.5,5.1-11,6.6-4.5,1.6-10.4,2.5-17.5,2.5h-14.7v33.4h-19.2V39.2h.1Zm33.3,44.1c3.4,0,6.3-.4,8.5-1.1,2.4-.7,4.1-1.6,5.4-2.9,1.3-1.3,2.1-2.7,2.7-4.5.5-1.8.7-3.8.7-5.9s-.2-4.1-.7-5.8c-.5-1.6-1.4-3.1-2.7-4.1-1.3-1.1-3.1-2-5.4-2.7-2.1-.5-5.1-.9-8.5-.9h-14v27.8h14v.1Z"
49
+ }), _jsx("path", {
50
+ fill: "currentColor",
51
+ d: "m197.5,39.2h21.9l22.8,66.3,23.4-66.3h21l-35.3,93.9h-18.5l-35.3-93.9Z"
52
+ }), _jsx("path", {
53
+ fill: "currentColor",
54
+ fillRule: "evenodd",
55
+ d: "m311,39.2h-13.3l-6.3,16.9v76.9h19.6V39.2Z"
56
+ })]
41
57
  })
42
58
  });
43
59
  };
@@ -24,16 +24,16 @@ export var Primary = {
24
24
  summaryAs: 'dl',
25
25
  steps: [{
26
26
  title: 'Step One',
27
- titleVariant: 'h2',
27
+ titleVariant: 'h3',
28
28
  subTitle: 'First step description.',
29
29
  children: 'Step one content'
30
30
  }, {
31
31
  title: 'Step Two',
32
- titleVariant: 'h2',
32
+ titleVariant: 'h3',
33
33
  subTitle: 'Second step description.'
34
34
  }, {
35
35
  title: 'Step Three',
36
- titleVariant: 'h2'
36
+ titleVariant: 'h3'
37
37
  }]
38
38
  }
39
39
  };
@@ -41,7 +41,7 @@ export var Default = {
41
41
  render: function render() {
42
42
  var steps = [{
43
43
  title: 'Choose Domain',
44
- titleVariant: 'h2',
44
+ titleVariant: 'h3',
45
45
  subTitle: 'You can bring a domain name you already own, or buy a new one.',
46
46
  children: _jsxs(Box, {
47
47
  children: [_jsx(Label, {
@@ -57,14 +57,14 @@ export var Default = {
57
57
  })
58
58
  }, {
59
59
  title: 'Configure DNS',
60
- titleVariant: 'h2',
60
+ titleVariant: 'h3',
61
61
  summaryTitle: 'Summary of Configure DNS'
62
62
  }, {
63
63
  title: 'Configure Certificate',
64
- titleVariant: 'h2'
64
+ titleVariant: 'h3'
65
65
  }, {
66
66
  title: 'Verify Domain',
67
- titleVariant: 'h2'
67
+ titleVariant: 'h3'
68
68
  }];
69
69
  return _jsx(React.Fragment, {
70
70
  children: _jsx(Box, {
@@ -90,7 +90,7 @@ export var WithTitleAutoFocus = {
90
90
  setAutoFocus = _React$useState2[1];
91
91
  var steps = [{
92
92
  title: 'Choose Domain',
93
- titleVariant: 'h2',
93
+ titleVariant: 'h3',
94
94
  summary: [{
95
95
  label: 'Demo Label',
96
96
  value: 'Demo value'
@@ -115,7 +115,7 @@ export var WithTitleAutoFocus = {
115
115
  })
116
116
  }, {
117
117
  title: 'Configure DNS',
118
- titleVariant: 'h2',
118
+ titleVariant: 'h3',
119
119
  onChange: function onChange() {
120
120
  return setActiveStep(1);
121
121
  },
@@ -137,7 +137,7 @@ export var WithTitleAutoFocus = {
137
137
  })
138
138
  }, {
139
139
  title: 'Certificate',
140
- titleVariant: 'h2',
140
+ titleVariant: 'h3',
141
141
  summary: [{
142
142
  label: 'Certificate status',
143
143
  value: 'Not found'
@@ -202,7 +202,7 @@ export var HideStepText = {
202
202
  setActiveStep = _React$useState3[1];
203
203
  var steps = [{
204
204
  title: 'Included Logs',
205
- titleVariant: 'h2',
205
+ titleVariant: 'h3',
206
206
  subTitle: '',
207
207
  children: _jsx(Text, {
208
208
  sx: {
@@ -104,8 +104,6 @@ export var WizardStep = /*#__PURE__*/React.forwardRef(function (_ref, forwardRef
104
104
  sx: {
105
105
  mb: 0,
106
106
  color: headingColor,
107
- fontSize: 2,
108
- fontWeight: 'heading',
109
107
  flexGrow: 1
110
108
  },
111
109
  ref: titleRef,