@automattic/vip-design-system 0.26.3 → 0.26.4

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.
@@ -79,7 +79,6 @@ var Input = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
79
79
  ref: ref,
80
80
  id: forLabel,
81
81
  required: required,
82
- noValidate: true,
83
82
  "aria-describedby": hasError ? "describe-" + forLabel + "-validation" : undefined,
84
83
  sx: (0, _extends2["default"])({}, inputStyles, sx)
85
84
  }, props)), hasError && errorMessage && (0, _jsxRuntime.jsx)(_.Validation, {
@@ -42,6 +42,7 @@ var Validation = function Validation(_ref) {
42
42
  sx: {
43
43
  mr: 1
44
44
  },
45
+ role: "img",
45
46
  "aria-label": IconLabel
46
47
  }), children]
47
48
  }));
@@ -53,7 +53,7 @@ var StyledListItem = function StyledListItem(props) {
53
53
  sx: {
54
54
  py: 2,
55
55
  borderBottom: '1px solid',
56
- borderColor: 'border',
56
+ borderColor: 'borders.2',
57
57
  listStyleType: 'none',
58
58
  margin: 0,
59
59
  px: 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/vip-design-system",
3
- "version": "0.26.3",
3
+ "version": "0.26.4",
4
4
  "main": "build/system/index.js",
5
5
  "scripts": {
6
6
  "build-storybook": "build-storybook",
@@ -54,7 +54,6 @@ const Input = React.forwardRef(
54
54
  ref={ ref }
55
55
  id={ forLabel }
56
56
  required={ required }
57
- noValidate
58
57
  aria-describedby={ hasError ? `describe-${ forLabel }-validation` : undefined }
59
58
  sx={ { ...inputStyles, ...sx } }
60
59
  { ...props }
@@ -26,7 +26,7 @@ const Validation = ( { children, isValid, describedId = null, ...props } ) => {
26
26
  id={ describedId ? `describe-${ describedId }-validation` : undefined }
27
27
  { ...props }
28
28
  >
29
- <Icon sx={ { mr: 1 } } aria-label={ IconLabel } />
29
+ <Icon sx={ { mr: 1 } } role="img" aria-label={ IconLabel } />
30
30
  { children }
31
31
  </p>
32
32
  );
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.MultiSelect = void 0;
5
-
6
- var _reactSelect = _interopRequireDefault(require("react-select"));
7
-
8
- var _jsxRuntime = require("theme-ui/jsx-runtime");
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
-
14
- var vipGold = '#c29c69'; // hardcoding for now
15
-
16
- var vipGrey2 = '#d7dee2';
17
- var customStyles = {
18
- control: function control(styles) {
19
- return _extends({}, styles, {
20
- border: "1px solid " + vipGrey2,
21
- boxShadow: 'none',
22
- '&:hover': {
23
- border: "1px solid " + vipGold
24
- },
25
- '&:focus': {
26
- border: "1px solid " + vipGold
27
- }
28
- });
29
- }
30
- };
31
-
32
- var MultiSelect = function MultiSelect(props) {
33
- return (0, _jsxRuntime.jsx)(_reactSelect["default"], _extends({}, props, {
34
- styles: customStyles
35
- }));
36
- };
37
-
38
- exports.MultiSelect = MultiSelect;
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.UsageChart = void 0;
5
-
6
- var _framerMotion = require("framer-motion");
7
-
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
-
10
- var _jsxRuntime = require("theme-ui/jsx-runtime");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- /**
15
- * External dependencies
16
- */
17
- var UsageChart = function UsageChart(_ref) {
18
- var total = _ref.total,
19
- max = _ref.max,
20
- _ref$variant = _ref.variant,
21
- variant = _ref$variant === void 0 ? 'primary' : _ref$variant;
22
- var width = total / max * 100 + '%';
23
- var formattedTotal = total;
24
-
25
- if (total > 1000000) {
26
- formattedTotal = (total / 1000000).toFixed(2) + "M";
27
- } else if (total > 1000) {
28
- formattedTotal = (total / 1000).toFixed(2) + "K";
29
- }
30
-
31
- return (0, _jsxRuntime.jsx)("div", {
32
- sx: {
33
- height: variant === 'primary' ? 32 : 8,
34
- overflow: 'hidden',
35
- backgroundColor: variant === 'primary' ? 'border' : 'transparent'
36
- },
37
- children: (0, _jsxRuntime.jsx)(_framerMotion.motion.div, {
38
- initial: {
39
- width: 0
40
- },
41
- animate: {
42
- width: width
43
- },
44
- transition: {
45
- duration: 0.7
46
- },
47
- sx: {
48
- height: '100%',
49
- backgroundColor: variant === 'primary' ? 'primary' : 'grey.40'
50
- }
51
- })
52
- });
53
- };
54
-
55
- exports.UsageChart = UsageChart;
56
- UsageChart.propTypes = {
57
- total: _propTypes["default"].number,
58
- max: _propTypes["default"].number,
59
- variant: _propTypes["default"].string
60
- };
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
-
5
- var _UsageChart = require("./UsageChart");
6
-
7
- exports.UsageChart = _UsageChart.UsageChart;