@canonical/react-components 0.34.0 → 0.35.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.
@@ -28,6 +28,10 @@ export declare type Props = {
28
28
  * Help text to show below the field.
29
29
  */
30
30
  help?: ReactNode;
31
+ /**
32
+ * Optional class(es) to pass to the help text element.
33
+ */
34
+ helpClassName?: ReactNode;
31
35
  /**
32
36
  * An id to give to the help element.
33
37
  */
@@ -36,6 +40,10 @@ export declare type Props = {
36
40
  * Whether the component is wrapping a select element.
37
41
  */
38
42
  isSelect?: boolean;
43
+ /**
44
+ * Whether the component is wrapping a checkbox or radio element.
45
+ */
46
+ isTickElement?: boolean;
39
47
  /**
40
48
  * The label for the field.
41
49
  */
@@ -65,5 +73,5 @@ export declare type Props = {
65
73
  */
66
74
  validationId?: string;
67
75
  };
68
- declare const Field: ({ caution, children, className, error, forId, help, helpId, isSelect, label, labelClassName, labelFirst, required, stacked, success, validationId, }: Props) => JSX.Element;
76
+ declare const Field: ({ caution, children, className, error, forId, help, helpClassName, helpId, isSelect, isTickElement, label, labelClassName, labelFirst, required, stacked, success, validationId, }: Props) => JSX.Element;
69
77
  export default Field;
@@ -15,11 +15,17 @@ var _Col = _interopRequireDefault(require("../Col"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- var generateHelp = function generateHelp(help, helpId) {
19
- return help && /*#__PURE__*/_react.default.createElement("p", {
20
- className: "p-form-help-text",
18
+ var generateHelpText = function generateHelpText(_ref) {
19
+ var help = _ref.help,
20
+ helpId = _ref.helpId,
21
+ helpClassName = _ref.helpClassName,
22
+ isTickElement = _ref.isTickElement;
23
+ return help ? /*#__PURE__*/_react.default.createElement("p", {
24
+ className: (0, _classnames.default)("p-form-help-text", helpClassName, {
25
+ "is-tick-element": isTickElement
26
+ }),
21
27
  id: helpId
22
- }, help);
28
+ }, help) : null;
23
29
  };
24
30
 
25
31
  var generateError = function generateError(error, caution, success, validationId) {
@@ -54,33 +60,65 @@ var generateLabel = function generateLabel(forId, required, label, labelClassNam
54
60
  return labelNode;
55
61
  };
56
62
 
57
- var generateContent = function generateContent(isSelect, children, labelFirst, labelNode, help, error, caution, success, validationId, helpId) {
63
+ var generateContent = function generateContent(_ref2) {
64
+ var isSelect = _ref2.isSelect,
65
+ children = _ref2.children,
66
+ labelFirst = _ref2.labelFirst,
67
+ labelNode = _ref2.labelNode,
68
+ help = _ref2.help,
69
+ helpClassName = _ref2.helpClassName,
70
+ error = _ref2.error,
71
+ caution = _ref2.caution,
72
+ success = _ref2.success,
73
+ validationId = _ref2.validationId,
74
+ helpId = _ref2.helpId,
75
+ isTickElement = _ref2.isTickElement;
58
76
  return /*#__PURE__*/_react.default.createElement("div", {
59
77
  className: "p-form__control u-clearfix"
60
78
  }, isSelect ? /*#__PURE__*/_react.default.createElement("div", {
61
79
  className: "p-form-validation__select-wrapper"
62
- }, children) : children, !labelFirst && labelNode, generateHelp(help, helpId), generateError(error, caution, success, validationId));
80
+ }, children) : children, !labelFirst && labelNode, generateHelpText({
81
+ helpId: helpId,
82
+ help: help,
83
+ helpClassName: helpClassName,
84
+ isTickElement: isTickElement
85
+ }), generateError(error, caution, success, validationId));
63
86
  };
64
87
 
65
- var Field = function Field(_ref) {
66
- var caution = _ref.caution,
67
- children = _ref.children,
68
- className = _ref.className,
69
- error = _ref.error,
70
- forId = _ref.forId,
71
- help = _ref.help,
72
- helpId = _ref.helpId,
73
- isSelect = _ref.isSelect,
74
- label = _ref.label,
75
- labelClassName = _ref.labelClassName,
76
- _ref$labelFirst = _ref.labelFirst,
77
- labelFirst = _ref$labelFirst === void 0 ? true : _ref$labelFirst,
78
- required = _ref.required,
79
- stacked = _ref.stacked,
80
- success = _ref.success,
81
- validationId = _ref.validationId;
88
+ var Field = function Field(_ref3) {
89
+ var caution = _ref3.caution,
90
+ children = _ref3.children,
91
+ className = _ref3.className,
92
+ error = _ref3.error,
93
+ forId = _ref3.forId,
94
+ help = _ref3.help,
95
+ helpClassName = _ref3.helpClassName,
96
+ helpId = _ref3.helpId,
97
+ isSelect = _ref3.isSelect,
98
+ isTickElement = _ref3.isTickElement,
99
+ label = _ref3.label,
100
+ labelClassName = _ref3.labelClassName,
101
+ _ref3$labelFirst = _ref3.labelFirst,
102
+ labelFirst = _ref3$labelFirst === void 0 ? true : _ref3$labelFirst,
103
+ required = _ref3.required,
104
+ stacked = _ref3.stacked,
105
+ success = _ref3.success,
106
+ validationId = _ref3.validationId;
82
107
  var labelNode = generateLabel(forId, required, label, labelClassName, stacked);
83
- var content = generateContent(isSelect, children, labelFirst, labelNode, help, error, caution, success, validationId, helpId);
108
+ var content = generateContent({
109
+ isSelect: isSelect,
110
+ isTickElement: isTickElement,
111
+ children: children,
112
+ labelFirst: labelFirst,
113
+ labelNode: labelNode,
114
+ help: help,
115
+ helpClassName: helpClassName,
116
+ error: error,
117
+ caution: caution,
118
+ success: success,
119
+ validationId: validationId,
120
+ helpId: helpId
121
+ });
84
122
  return /*#__PURE__*/_react.default.createElement("div", {
85
123
  className: (0, _classnames.default)("p-form__group", "p-form-validation", className, {
86
124
  "is-error": error,
@@ -20,6 +20,10 @@ export declare type Props = PropsWithSpread<{
20
20
  * Help text to show below the field.
21
21
  */
22
22
  help?: ReactNode;
23
+ /**
24
+ * Optional class(es) to pass to the help text element.
25
+ */
26
+ helpClassName?: ReactNode;
23
27
  /**
24
28
  * The id of the input.
25
29
  */
@@ -53,5 +57,5 @@ export declare type Props = PropsWithSpread<{
53
57
  */
54
58
  wrapperClassName?: string;
55
59
  }, InputHTMLAttributes<HTMLInputElement>>;
56
- declare const Input: ({ caution, className, error, help, id, label, labelClassName, required, stacked, success, takeFocus, type, wrapperClassName, ...inputProps }: Props) => JSX.Element;
60
+ declare const Input: ({ caution, className, error, help, helpClassName, id, label, labelClassName, required, stacked, success, takeFocus, type, wrapperClassName, ...inputProps }: Props) => JSX.Element;
57
61
  export default Input;
@@ -19,7 +19,7 @@ var _RadioInput = _interopRequireDefault(require("../RadioInput"));
19
19
 
20
20
  var _hooks = require("../../hooks");
21
21
 
22
- var _excluded = ["caution", "className", "error", "help", "id", "label", "labelClassName", "required", "stacked", "success", "takeFocus", "type", "wrapperClassName"];
22
+ var _excluded = ["caution", "className", "error", "help", "helpClassName", "id", "label", "labelClassName", "required", "stacked", "success", "takeFocus", "type", "wrapperClassName"];
23
23
 
24
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
 
@@ -44,6 +44,7 @@ var Input = function Input(_ref) {
44
44
  className = _ref.className,
45
45
  error = _ref.error,
46
46
  help = _ref.help,
47
+ helpClassName = _ref.helpClassName,
47
48
  id = _ref.id,
48
49
  label = _ref.label,
49
50
  labelClassName = _ref.labelClassName,
@@ -101,7 +102,9 @@ var Input = function Input(_ref) {
101
102
  error: error,
102
103
  forId: id,
103
104
  help: help,
105
+ helpClassName: helpClassName,
104
106
  helpId: helpId,
107
+ isTickElement: type === "checkbox" || type === "radio",
105
108
  label: fieldLabel,
106
109
  labelClassName: labelClassName,
107
110
  required: required,
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { WindowFitment } from "../../hooks";
3
- import type { ClassName } from "../../types";
3
+ import type { ClassName, ValueOf } from "../../types";
4
4
  export declare type CSSPosition = "static" | "absolute" | "fixed" | "relative" | "sticky" | "initial" | "inherit";
5
5
  export declare type PositionStyle = {
6
6
  left: number;
@@ -8,7 +8,17 @@ export declare type PositionStyle = {
8
8
  position: CSSPosition;
9
9
  top: number;
10
10
  };
11
- export declare type Position = "btm-center" | "btm-left" | "btm-right" | "left" | "right" | "top-center" | "top-left" | "top-right";
11
+ export declare const position: {
12
+ readonly btmCenter: "btm-center";
13
+ readonly btmLeft: "btm-left";
14
+ readonly btmRight: "btm-right";
15
+ readonly left: "left";
16
+ readonly right: "right";
17
+ readonly topCenter: "top-center";
18
+ readonly topLeft: "top-left";
19
+ readonly topRight: "top-right";
20
+ };
21
+ export declare type Position = ValueOf<typeof position>;
12
22
  export declare type Props = {
13
23
  /**
14
24
  * Whether the tooltip should adjust to fit in the screen.
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = exports.adjustForWindow = void 0;
8
+ exports.position = exports.default = exports.adjustForWindow = void 0;
9
9
 
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
@@ -33,6 +33,18 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
33
33
 
34
34
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
35
 
36
+ var position = {
37
+ btmCenter: "btm-center",
38
+ btmLeft: "btm-left",
39
+ btmRight: "btm-right",
40
+ left: "left",
41
+ right: "right",
42
+ topCenter: "top-center",
43
+ topLeft: "top-left",
44
+ topRight: "top-right"
45
+ };
46
+ exports.position = position;
47
+
36
48
  var getPositionStyle = function getPositionStyle(pos, wrapperNode) {
37
49
  if (!wrapperNode) {
38
50
  return null;
@@ -187,6 +199,7 @@ var Tooltip = function Tooltip(_ref) {
187
199
  isOpen = _usePortal.isOpen,
188
200
  Portal = _usePortal.Portal;
189
201
 
202
+ var tooltipId = (0, _hooks.useId)();
190
203
  (0, _react.useEffect)(function () {
191
204
  if (isOpen && !followMouse && wrapperRef.current) {
192
205
  // Position the tooltip when it becomes visible.
@@ -210,11 +223,49 @@ var Tooltip = function Tooltip(_ref) {
210
223
  (0, _hooks.useListener)(wrapperRef.current, mouseHandler, "mousemove", true, followMouse && isOpen); // Handle adjusting the position of the tooltip so that it remains on screen.
211
224
 
212
225
  (0, _hooks.useWindowFitment)(messageRef.current, wrapperRef.current, onUpdateWindowFitment, 20, isOpen, autoAdjust && followMouse);
226
+ var handleKeyPress = (0, _react.useCallback)(function (event) {
227
+ if (event.key === "Escape") {
228
+ closePortal();
229
+ }
230
+ }, [closePortal]);
231
+ (0, _react.useEffect)(function () {
232
+ window.addEventListener("keypress", handleKeyPress);
233
+ return function () {
234
+ window.removeEventListener("keypress", handleKeyPress);
235
+ };
236
+ }, [handleKeyPress]);
237
+
238
+ var handleBlur = function handleBlur(e) {
239
+ var _wrapperRef$current, _messageRef$current;
240
+
241
+ // do not close if the focus is within the tooltip wrapper
242
+ if (wrapperRef !== null && wrapperRef !== void 0 && (_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(document.activeElement)) {
243
+ return;
244
+ }
245
+
246
+ if (e.relatedTarget ? !((_messageRef$current = messageRef.current) !== null && _messageRef$current !== void 0 && _messageRef$current.contains(e.relatedTarget)) : e.target !== messageRef.current) {
247
+ closePortal();
248
+ }
249
+ };
250
+
251
+ var handleClick = function handleClick(e) {
252
+ var _messageRef$current2;
253
+
254
+ // ignore clicks within the tooltip message
255
+ if ((_messageRef$current2 = messageRef.current) !== null && _messageRef$current2 !== void 0 && _messageRef$current2.contains(e.target)) {
256
+ return;
257
+ }
258
+
259
+ e.target.focus();
260
+ openPortal();
261
+ };
262
+
213
263
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message ? /*#__PURE__*/_react.default.createElement("span", {
214
264
  className: className,
215
- onBlur: closePortal,
265
+ onBlur: handleBlur,
266
+ onClick: handleClick,
216
267
  onFocus: openPortal,
217
- onMouseOut: closePortal,
268
+ onMouseOut: handleBlur,
218
269
  onMouseOver: openPortal
219
270
  }, /*#__PURE__*/_react.default.createElement("span", {
220
271
  className: positionElementClassName,
@@ -222,13 +273,21 @@ var Tooltip = function Tooltip(_ref) {
222
273
  style: {
223
274
  display: "inline-block"
224
275
  }
225
- }, children), isOpen && /*#__PURE__*/_react.default.createElement(Portal, null, /*#__PURE__*/_react.default.createElement("span", {
226
- className: (0, _classnames.default)("p-tooltip--".concat(adjustedPosition), "is-detached", tooltipClassName),
276
+ }, _react.default.Children.map(children, function (child) {
277
+ return child && /*#__PURE__*/_react.default.isValidElement(child) ? /*#__PURE__*/_react.default.cloneElement(child, {
278
+ "aria-describedby": tooltipId
279
+ }) : child;
280
+ })), /*#__PURE__*/_react.default.createElement(Portal, null, /*#__PURE__*/_react.default.createElement("span", {
281
+ className: (0, _classnames.default)("p-tooltip--".concat(adjustedPosition), "is-detached", {
282
+ "u-off-screen": !isOpen
283
+ }, tooltipClassName),
227
284
  "data-testid": "tooltip-portal",
228
285
  style: positionStyle
229
286
  }, /*#__PURE__*/_react.default.createElement("span", {
287
+ role: "tooltip",
230
288
  className: "p-tooltip__message",
231
- ref: messageRef
289
+ ref: messageRef,
290
+ id: tooltipId
232
291
  }, message)))) : /*#__PURE__*/_react.default.createElement("span", {
233
292
  className: className
234
293
  }, children));
@@ -1,2 +1,2 @@
1
- export { default } from "./Tooltip";
1
+ export { default, position } from "./Tooltip";
2
2
  export type { Props as TooltipProps } from "./Tooltip";
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -9,7 +11,15 @@ Object.defineProperty(exports, "default", {
9
11
  return _Tooltip.default;
10
12
  }
11
13
  });
14
+ Object.defineProperty(exports, "position", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _Tooltip.position;
18
+ }
19
+ });
20
+
21
+ var _Tooltip = _interopRequireWildcard(require("./Tooltip"));
12
22
 
13
- var _Tooltip = _interopRequireDefault(require("./Tooltip"));
23
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
24
 
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+ 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; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "Huw Wilkins <huw.wilkins@canonical.com>",
@@ -25,35 +25,35 @@
25
25
  "@babel/cli": "7.17.6",
26
26
  "@babel/eslint-parser": "7.17.0",
27
27
  "@babel/preset-typescript": "7.16.7",
28
- "@percy/cli": "1.0.0-beta.76",
29
- "@percy/storybook": "4.1.0",
30
- "@storybook/addon-a11y": "6.4.19",
31
- "@storybook/addon-controls": "6.4.19",
32
- "@storybook/addon-docs": "6.4.19",
33
- "@storybook/addons": "6.4.19",
34
- "@storybook/react": "6.4.19",
35
- "@storybook/theming": "6.4.19",
28
+ "@percy/cli": "1.0.5",
29
+ "@percy/storybook": "4.2.0",
30
+ "@storybook/addon-a11y": "6.4.20",
31
+ "@storybook/addon-controls": "6.4.20",
32
+ "@storybook/addon-docs": "6.4.20",
33
+ "@storybook/addons": "6.4.20",
34
+ "@storybook/react": "6.4.20",
35
+ "@storybook/theming": "6.4.20",
36
36
  "@testing-library/cypress": "8.0.2",
37
- "@testing-library/dom": "8.11.3",
38
- "@testing-library/jest-dom": "5.16.2",
39
- "@testing-library/react": "12.1.3",
37
+ "@testing-library/dom": "8.12.0",
38
+ "@testing-library/jest-dom": "5.16.3",
39
+ "@testing-library/react": "12.1.4",
40
40
  "@testing-library/react-hooks": "7.0.2",
41
41
  "@testing-library/user-event": "13.5.0",
42
- "@typescript-eslint/eslint-plugin": "5.13.0",
43
- "@typescript-eslint/parser": "5.13.0",
44
- "@wojtekmaj/enzyme-adapter-react-17": "0.6.6",
42
+ "@typescript-eslint/eslint-plugin": "5.18.0",
43
+ "@typescript-eslint/parser": "5.18.0",
44
+ "@wojtekmaj/enzyme-adapter-react-17": "0.6.7",
45
45
  "babel-jest": "27.5.1",
46
- "babel-loader": "8.2.3",
46
+ "babel-loader": "8.2.4",
47
47
  "babel-plugin-module-resolver": "4.1.0",
48
48
  "babel-plugin-typescript-to-proptypes": "2.0.0",
49
- "concurrently": "7.0.0",
49
+ "concurrently": "7.1.0",
50
50
  "css-loader": "5.2.7",
51
- "cypress": "9.5.1",
51
+ "cypress": "9.5.3",
52
52
  "deepmerge": "4.2.2",
53
53
  "enzyme": "3.11.0",
54
54
  "enzyme-adapter-react-16": "1.15.6",
55
55
  "enzyme-to-json": "3.6.2",
56
- "eslint": "8.10.0",
56
+ "eslint": "8.12.0",
57
57
  "eslint-config-prettier": "8.5.0",
58
58
  "eslint-config-react-app": "7.0.0",
59
59
  "eslint-plugin-cypress": "2.12.1",
@@ -61,37 +61,37 @@
61
61
  "eslint-plugin-import": "2.25.4",
62
62
  "eslint-plugin-jsx-a11y": "6.5.1",
63
63
  "eslint-plugin-prettier": "4.0.0",
64
- "eslint-plugin-react": "7.29.2",
65
- "eslint-plugin-react-hooks": "4.3.0",
66
- "eslint-plugin-testing-library": "5.0.5",
64
+ "eslint-plugin-react": "7.29.4",
65
+ "eslint-plugin-react-hooks": "4.4.0",
66
+ "eslint-plugin-testing-library": "5.2.1",
67
67
  "jest": "27.5.1",
68
68
  "npm-package-json-lint": "5.4.2",
69
- "prettier": "2.5.1",
69
+ "prettier": "2.6.2",
70
70
  "react": "17.0.2",
71
71
  "react-docgen-typescript-loader": "3.7.2",
72
72
  "react-dom": "17.0.2",
73
- "sass": "1.49.9",
73
+ "sass": "1.49.11",
74
74
  "sass-loader": "10.2.1",
75
75
  "style-loader": "2.0.0",
76
- "stylelint": "14.5.3",
76
+ "stylelint": "14.6.1",
77
77
  "stylelint-config-prettier": "9.0.3",
78
78
  "stylelint-config-recommended-scss": "5.0.2",
79
79
  "stylelint-order": "5.0.0",
80
80
  "stylelint-prettier": "2.0.0",
81
- "ts-jest": "27.1.3",
82
- "tsc-alias": "1.6.3",
83
- "typescript": "4.6.2",
84
- "vanilla-framework": "3.1.1",
81
+ "ts-jest": "27.1.4",
82
+ "tsc-alias": "1.6.5",
83
+ "typescript": "4.6.3",
84
+ "vanilla-framework": "3.2.0",
85
85
  "wait-on": "5.3.0"
86
86
  },
87
87
  "dependencies": {
88
88
  "@types/jest": "27.4.1",
89
89
  "@types/node": "16.11.26",
90
- "@types/react": "17.0.39",
91
- "@types/react-dom": "17.0.13",
92
- "@types/react-table": "7.7.9",
90
+ "@types/react": "17.0.43",
91
+ "@types/react-dom": "17.0.14",
92
+ "@types/react-table": "7.7.10",
93
93
  "classnames": "2.3.1",
94
- "nanoid": "3.3.1",
94
+ "nanoid": "3.3.2",
95
95
  "prop-types": "15.8.1",
96
96
  "react-table": "7.7.0",
97
97
  "react-useportal": "1.0.16"
@@ -102,7 +102,7 @@
102
102
  "peerDependencies": {
103
103
  "react": "17.0.2",
104
104
  "react-dom": "17.0.2",
105
- "vanilla-framework": "3.1.1"
105
+ "vanilla-framework": "3.2.0"
106
106
  },
107
107
  "scripts": {
108
108
  "build": "rm -rf dist && yarn build-local; yarn build-declaration",
@@ -125,8 +125,8 @@
125
125
  "test-cypress": "concurrently 'yarn run docs' 'yarn run cypress:test' -k -s first",
126
126
  "unlink-packages": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink",
127
127
  "cypress:test": "wait-on http://localhost:${PORT:-9009} && cypress run --env port=${PORT:-9009}",
128
- "cypress:run": "cypress run",
129
- "cypress:open": "cypress open"
128
+ "cypress:run": "cypress run --env port=${PORT:-9009}",
129
+ "cypress:open": "cypress open --env port=${PORT:-9009}"
130
130
  },
131
131
  "eslintConfig": {
132
132
  "extends": "react-app"