@automattic/vip-design-system 0.9.6 → 0.10.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.
- package/README.md +4 -4
- package/build/system/Avatar/Avatar.js +9 -3
- package/build/system/Avatar/Avatar.stories.js +8 -23
- package/build/system/Badge/Badge.js +9 -3
- package/build/system/Badge/Badge.stories.js +8 -25
- package/build/system/BlankState/BlankState.js +8 -2
- package/build/system/BlankState/BlankState.stories.js +11 -27
- package/build/system/Box/Box.js +12 -2
- package/build/system/Box/Box.stories.js +8 -25
- package/build/system/Button/Button.js +6 -2
- package/build/system/Button/Button.stories.js +23 -36
- package/build/system/Card/Card.js +8 -3
- package/build/system/Card/Card.stories.js +8 -25
- package/build/system/Code/Code.js +8 -3
- package/build/system/Code/Code.stories.js +8 -25
- package/build/system/ConfirmationDialog/ConfirmationDialog.js +8 -2
- package/build/system/ConfirmationDialog/ConfirmationDialog.stories.js +22 -45
- package/build/system/Dialog/Dialog.js +1 -0
- package/build/system/Dialog/Dialog.stories.js +31 -71
- package/build/system/Flex/Flex.stories.js +8 -25
- package/build/system/Form/Input.stories.js +8 -23
- package/build/system/Form/Select.js +1 -0
- package/build/system/Form/Select.stories.js +78 -108
- package/build/system/Form/Toggle.js +8 -2
- package/build/system/Grid/Grid.stories.js +8 -25
- package/build/system/Heading/Heading.js +9 -3
- package/build/system/Heading/Heading.stories.js +20 -43
- package/build/system/Link/Link.stories.js +10 -26
- package/build/system/Notice/Notice.js +9 -3
- package/build/system/Notice/Notice.stories.js +81 -47
- package/build/system/Notification/Notification.js +1 -0
- package/build/system/Notification/Notification.stories.js +8 -23
- package/build/system/OptionRow/OptionRow.js +13 -3
- package/build/system/OptionRow/OptionRow.stories.js +20 -36
- package/build/system/OptionRow/OptionRow.test.js +46 -0
- package/build/system/Progress/Progress.js +9 -3
- package/build/system/Progress/Progress.stories.js +8 -23
- package/build/system/ResourceList/ResourceList.js +1 -0
- package/build/system/Spinner/Spinner.js +9 -3
- package/build/system/Spinner/Spinner.stories.js +8 -23
- package/build/system/Table/Table.stories.js +42 -64
- package/build/system/Tabs/TabItem.js +1 -0
- package/build/system/Tabs/Tabs.js +10 -4
- package/build/system/Tabs/Tabs.stories.js +10 -32
- package/build/system/Text/Text.js +9 -3
- package/build/system/Text/Text.stories.js +8 -25
- package/build/system/Time/index.js +9 -3
- package/build/system/Timeline/Timeline.js +10 -3
- package/build/system/Timeline/Timeline.stories.js +21 -44
- package/build/system/Tooltip/Tooltip.stories.js +19 -41
- package/build/system/UsageChart/UsageChart.stories.js +20 -0
- package/build/system/Wizard/Wizard.js +10 -2
- package/build/system/Wizard/Wizard.stories.js +37 -65
- package/build/system/Wizard/WizardStep.js +6 -2
- package/build/system/Wizard/WizardStepHorizontal.js +6 -2
- package/package.json +2 -1
- package/src/system/Avatar/Avatar.js +4 -0
- package/src/system/Badge/Badge.js +4 -1
- package/src/system/BlankState/BlankState.js +4 -1
- package/src/system/Box/Box.js +6 -1
- package/src/system/Button/Button.js +3 -0
- package/src/system/Card/Card.js +4 -1
- package/src/system/Code/Code.js +4 -1
- package/src/system/ConfirmationDialog/ConfirmationDialog.js +4 -2
- package/src/system/Dialog/Dialog.js +1 -1
- package/src/system/Form/Select.js +1 -1
- package/src/system/Form/Toggle.js +4 -2
- package/src/system/Heading/Heading.js +4 -1
- package/src/system/Notice/Notice.js +4 -1
- package/src/system/Notification/Notification.js +1 -0
- package/src/system/OptionRow/OptionRow.js +7 -0
- package/src/system/OptionRow/OptionRow.stories.js +1 -0
- package/src/system/OptionRow/OptionRow.test.js +27 -0
- package/src/system/Progress/Progress.js +4 -1
- package/src/system/ResourceList/ResourceList.js +1 -1
- package/src/system/Spinner/Spinner.js +4 -1
- package/src/system/Tabs/TabItem.js +1 -0
- package/src/system/Tabs/Tabs.js +5 -2
- package/src/system/Text/Text.js +4 -1
- package/src/system/Time/index.js +4 -1
- package/src/system/Timeline/Timeline.js +4 -2
- package/src/system/Wizard/Wizard.js +6 -2
- package/src/system/Wizard/Wizard.stories.js +1 -1
- package/src/system/Wizard/WizardStep.js +5 -2
- package/src/system/Wizard/WizardStepHorizontal.js +4 -1
package/README.md
CHANGED
|
@@ -43,10 +43,10 @@ Note: it's super useful to run `npm run watch` in another process, so any change
|
|
|
43
43
|
|
|
44
44
|
### Publish NPM Package Instructions
|
|
45
45
|
|
|
46
|
-
Once all the changes needed are merged to
|
|
46
|
+
Once all the changes needed are merged to trunk, and you are ready to release a new version, follow these steps:
|
|
47
47
|
|
|
48
48
|
1. Make sure you have NPM access to our @automattic organization. Ask for #vip-platform-pâtisserie help in case you need it.
|
|
49
|
-
2. Pull all the changes to your local
|
|
49
|
+
2. Pull all the changes to your local trunk. Make sure you have the latest trunk locally.
|
|
50
50
|
3. We follow the [https://semver.org/](https://semver.org/) versioning. You should run the specific version you are trying to publish:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
@@ -67,11 +67,11 @@ npm publish
|
|
|
67
67
|
|
|
68
68
|
Note: You need to have two-factor enabled in your npm account. The publish command will request a two-factor code to complete the publishing process.
|
|
69
69
|
|
|
70
|
-
7. Push the tags to the repository and
|
|
70
|
+
7. Push the tags to the repository and trunk updates.
|
|
71
71
|
|
|
72
72
|
```
|
|
73
73
|
git push --tags
|
|
74
|
-
git push origin
|
|
74
|
+
git push origin trunk
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
8. For major versions or breaking changes, it's recommended to [create a RELEASE](https://github.com/Automattic/vip-design-system/releases) with the published tag.
|
|
@@ -7,11 +7,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
7
7
|
|
|
8
8
|
var _themeUi = require("theme-ui");
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
var _ = require("..");
|
|
11
13
|
|
|
12
14
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
13
15
|
|
|
14
|
-
var _excluded = ["isVIP", "name", "size", "src"];
|
|
16
|
+
var _excluded = ["isVIP", "name", "size", "src", "className"];
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
@@ -28,6 +30,8 @@ var Avatar = function Avatar(_ref) {
|
|
|
28
30
|
size = _ref$size === void 0 ? 32 : _ref$size,
|
|
29
31
|
_ref$src = _ref.src,
|
|
30
32
|
src = _ref$src === void 0 ? null : _ref$src,
|
|
33
|
+
_ref$className = _ref.className,
|
|
34
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
31
35
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
32
36
|
|
|
33
37
|
return (0, _jsxRuntime.jsx)(_.Box, _extends({
|
|
@@ -47,7 +51,8 @@ var Avatar = function Avatar(_ref) {
|
|
|
47
51
|
color: 'white',
|
|
48
52
|
padding: '1px',
|
|
49
53
|
textAlign: 'center'
|
|
50
|
-
}
|
|
54
|
+
},
|
|
55
|
+
className: (0, _classnames["default"])('vip-avatar-component', className)
|
|
51
56
|
}, props, {
|
|
52
57
|
children: src ? (0, _jsxRuntime.jsx)(_themeUi.Image, {
|
|
53
58
|
src: src,
|
|
@@ -76,5 +81,6 @@ Avatar.propTypes = {
|
|
|
76
81
|
isVIP: _propTypes["default"].bool,
|
|
77
82
|
size: _propTypes["default"].number,
|
|
78
83
|
src: _propTypes["default"].string,
|
|
79
|
-
name: _propTypes["default"].string
|
|
84
|
+
name: _propTypes["default"].string,
|
|
85
|
+
className: _propTypes["default"].any
|
|
80
86
|
};
|
|
@@ -1,31 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Default = exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
|
-
var _ = require("..");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* External dependencies
|
|
16
3
|
*/
|
|
17
|
-
|
|
4
|
+
import React from 'react';
|
|
18
5
|
/**
|
|
19
6
|
* Internal dependencies
|
|
20
7
|
*/
|
|
21
|
-
var _default = {
|
|
22
|
-
title: 'Avatar',
|
|
23
|
-
component: _.Avatar
|
|
24
|
-
};
|
|
25
|
-
exports["default"] = _default;
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
import { Avatar } from '..';
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Avatar',
|
|
12
|
+
component: Avatar
|
|
29
13
|
};
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
export var Default = function Default() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Avatar, null);
|
|
16
|
+
};
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.Badge = void 0;
|
|
5
5
|
|
|
6
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
7
|
+
|
|
6
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
9
|
|
|
8
10
|
var _ = require("../");
|
|
9
11
|
|
|
10
12
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
13
|
|
|
12
|
-
var _excluded = ["variant", "sx"];
|
|
14
|
+
var _excluded = ["variant", "sx", "className"];
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
@@ -21,6 +23,8 @@ var Badge = function Badge(_ref) {
|
|
|
21
23
|
var _ref$variant = _ref.variant,
|
|
22
24
|
variant = _ref$variant === void 0 ? 'blue' : _ref$variant,
|
|
23
25
|
sx = _ref.sx,
|
|
26
|
+
_ref$className = _ref.className,
|
|
27
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
24
28
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
25
29
|
|
|
26
30
|
return (0, _jsxRuntime.jsx)(_.Text, _extends({
|
|
@@ -36,12 +40,14 @@ var Badge = function Badge(_ref) {
|
|
|
36
40
|
display: 'inline-block',
|
|
37
41
|
borderRadius: 1,
|
|
38
42
|
fontWeight: 'heading'
|
|
39
|
-
}, sx)
|
|
43
|
+
}, sx),
|
|
44
|
+
className: (0, _classnames["default"])('vip-badge-component', className)
|
|
40
45
|
}, props));
|
|
41
46
|
};
|
|
42
47
|
|
|
43
48
|
exports.Badge = Badge;
|
|
44
49
|
Badge.propTypes = {
|
|
45
50
|
variant: _propTypes["default"].string,
|
|
46
|
-
sx: _propTypes["default"].object
|
|
51
|
+
sx: _propTypes["default"].object,
|
|
52
|
+
className: _propTypes["default"].any
|
|
47
53
|
};
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Default = exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
|
-
var _ = require("..");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* External dependencies
|
|
16
3
|
*/
|
|
17
|
-
|
|
4
|
+
import React from 'react';
|
|
18
5
|
/**
|
|
19
6
|
* Internal dependencies
|
|
20
7
|
*/
|
|
21
|
-
var _default = {
|
|
22
|
-
title: 'Badge',
|
|
23
|
-
component: _.Badge
|
|
24
|
-
};
|
|
25
|
-
exports["default"] = _default;
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
import { Badge } from '..';
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Badge',
|
|
12
|
+
component: Badge
|
|
31
13
|
};
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
export var Default = function Default() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Badge, null, "Badge");
|
|
16
|
+
};
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.BlankState = void 0;
|
|
5
5
|
|
|
6
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
7
|
+
|
|
6
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
9
|
|
|
8
10
|
var _ = require("..");
|
|
@@ -27,12 +29,15 @@ var BlankState = function BlankState(_ref) {
|
|
|
27
29
|
image = _ref.image,
|
|
28
30
|
_ref$imageAlt = _ref.imageAlt,
|
|
29
31
|
imageAlt = _ref$imageAlt === void 0 ? 'Image representing the blank state' : _ref$imageAlt,
|
|
30
|
-
title = _ref.title
|
|
32
|
+
title = _ref.title,
|
|
33
|
+
_ref$className = _ref.className,
|
|
34
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
31
35
|
return (0, _jsxRuntime.jsxs)(_.Box, {
|
|
32
36
|
sx: {
|
|
33
37
|
textAlign: 'center',
|
|
34
38
|
padding: 5
|
|
35
39
|
},
|
|
40
|
+
className: (0, _classnames["default"])('vip-blank-state-component', className),
|
|
36
41
|
children: [icon ? icon : (0, _jsxRuntime.jsx)("img", {
|
|
37
42
|
src: image,
|
|
38
43
|
sx: {
|
|
@@ -60,5 +65,6 @@ BlankState.propTypes = {
|
|
|
60
65
|
icon: _propTypes["default"].node,
|
|
61
66
|
image: _propTypes["default"].oneOfType([_propTypes["default"].object, _propTypes["default"].string]),
|
|
62
67
|
imageAlt: _propTypes["default"].string,
|
|
63
|
-
title: _propTypes["default"].node
|
|
68
|
+
title: _propTypes["default"].node,
|
|
69
|
+
className: _propTypes["default"].any
|
|
64
70
|
};
|
|
@@ -1,41 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Default = exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
|
-
var _ = require("..");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* External dependencies
|
|
16
3
|
*/
|
|
17
|
-
|
|
4
|
+
import React from 'react';
|
|
18
5
|
/**
|
|
19
6
|
* Internal dependencies
|
|
20
7
|
*/
|
|
21
|
-
|
|
8
|
+
|
|
9
|
+
import { Link, BlankState } from '..';
|
|
10
|
+
export default {
|
|
22
11
|
title: 'BlankState',
|
|
23
|
-
component:
|
|
12
|
+
component: BlankState
|
|
24
13
|
}; // eslint-disable-next-line max-len
|
|
25
14
|
|
|
26
|
-
exports["default"] = _default;
|
|
27
15
|
var image2 = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='79' height='79' viewBox='0 0 79 79' fill='none'%3E%3Cpath d='M66.3001 15.9C66.3001 15.9 66.3 15.8 66.2 15.8C66.1 15.7 66 15.5 65.9001 15.4C65.9001 15.4 65.9001 15.4 65.9001 15.3L44.4001 0.2C44.3001 0.0999998 44.2 0.0999994 44.1 0.0999994C44 0.0999994 44.0001 0 43.9001 0H43.3C43.2 0 43.1 0.0999994 43.1 0.0999994C43 0.0999994 42.9 0.2 42.8 0.2L28.2001 10.3C28.1 10.4 28.0001 10.5 27.9001 10.6C27.9001 10.6 27.9001 10.6 27.9001 10.7C27.8001 10.8 27.7001 11 27.7001 11.2C27.7001 11.2 27.7001 11.2 27.7001 11.3V31.1L13.9 40.8L13.7001 41C13.6001 41.1 13.6 41.1 13.6 41.2L13.5 41.3C13.5 41.4 13.4 41.5 13.4 41.5V41.6C13.4 41.7 13.3 41.8 13.3 42V62.2C13.3 62.4 13.3 62.6 13.4 62.7V62.8C13.5 62.9 13.6001 63.1 13.7001 63.2C13.7001 63.2 13.7 63.2 13.8 63.3L13.9 63.4L35.3 78.6H35.4001C35.4001 78.6 35.5 78.6 35.5 78.7H35.6C35.8 78.8 36 78.8 36.2001 78.8C36.3001 78.8 36.5 78.8 36.6 78.7H36.7001C36.8001 78.7 36.8001 78.7 36.9001 78.6C36.9001 78.6 37 78.6 37 78.5H37.1L66 58.3C66.1 58.2 66.2001 58.1 66.3001 58V15.9ZM34.6 74.5L16.1 61.3V44.7L34.6 57.8V74.5ZM36 55.3L17.2001 41.9L29 33.5L47.9001 46.9L36 55.3ZM49 44.1L30.5 31V14.4L49 27.5V44.1ZM50.5 24.9L31.6 11.5L43.5 3.2L62.4001 16.6L50.5 24.9Z' fill='%23BD9D70'/%3E%3C/svg%3E";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (0, _jsxRuntime.jsx)(_.BlankState, {
|
|
16
|
+
export var Default = function Default() {
|
|
17
|
+
return /*#__PURE__*/React.createElement(BlankState, {
|
|
31
18
|
image: image2,
|
|
32
19
|
title: "Power up your application",
|
|
33
20
|
body: "Add-ons give you the ability to bolt on extra capabilities to\nyour application, including logging, analytics and performance\nmonitoring.",
|
|
34
|
-
cta:
|
|
35
|
-
as: "a"
|
|
36
|
-
|
|
37
|
-
})
|
|
21
|
+
cta: /*#__PURE__*/React.createElement(Link, {
|
|
22
|
+
as: "a"
|
|
23
|
+
}, "Explore add-ons \u2192")
|
|
38
24
|
});
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
exports.Default = Default;
|
|
25
|
+
};
|
package/build/system/Box/Box.js
CHANGED
|
@@ -3,18 +3,28 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.Box = void 0;
|
|
5
5
|
|
|
6
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
|
+
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
|
|
6
10
|
var _react = require("react");
|
|
7
11
|
|
|
8
12
|
var _themeUi = require("theme-ui");
|
|
9
13
|
|
|
10
14
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
15
|
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
12
18
|
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
19
|
|
|
14
20
|
var Box = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
15
21
|
return (0, _jsxRuntime.jsx)(_themeUi.Box, _extends({
|
|
16
|
-
ref: ref
|
|
22
|
+
ref: ref,
|
|
23
|
+
className: (0, _classnames["default"])('vip-box-component', props.className)
|
|
17
24
|
}, props));
|
|
18
25
|
});
|
|
19
26
|
exports.Box = Box;
|
|
20
|
-
Box.displayName = 'Box';
|
|
27
|
+
Box.displayName = 'Box';
|
|
28
|
+
Box.propTypes = {
|
|
29
|
+
className: _propTypes["default"].any
|
|
30
|
+
};
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Default = exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
|
-
var _ = require("..");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* External dependencies
|
|
16
3
|
*/
|
|
17
|
-
|
|
4
|
+
import React from 'react';
|
|
18
5
|
/**
|
|
19
6
|
* Internal dependencies
|
|
20
7
|
*/
|
|
21
|
-
var _default = {
|
|
22
|
-
title: 'Box',
|
|
23
|
-
component: _.Box
|
|
24
|
-
};
|
|
25
|
-
exports["default"] = _default;
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
import { Box } from '..';
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Box',
|
|
12
|
+
component: Box
|
|
31
13
|
};
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
export var Default = function Default() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Box, null, "Hello");
|
|
16
|
+
};
|
|
@@ -7,6 +7,8 @@ var _themeUi = require("theme-ui");
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
13
|
|
|
12
14
|
var _excluded = ["sx"];
|
|
@@ -34,11 +36,13 @@ var Button = function Button(_ref) {
|
|
|
34
36
|
cursor: 'not-allowed',
|
|
35
37
|
pointerEvents: 'all'
|
|
36
38
|
}
|
|
37
|
-
}, sx)
|
|
39
|
+
}, sx),
|
|
40
|
+
className: (0, _classnames["default"])('vip-button-component', props.className)
|
|
38
41
|
}, props));
|
|
39
42
|
};
|
|
40
43
|
|
|
41
44
|
exports.Button = Button;
|
|
42
45
|
Button.propTypes = {
|
|
43
|
-
sx: _propTypes["default"].object
|
|
46
|
+
sx: _propTypes["default"].object,
|
|
47
|
+
className: _propTypes["default"].any
|
|
44
48
|
};
|
|
@@ -1,44 +1,31 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Default = exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
|
-
var _ = require("..");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* External dependencies
|
|
16
3
|
*/
|
|
17
|
-
|
|
4
|
+
import React from 'react';
|
|
18
5
|
/**
|
|
19
6
|
* Internal dependencies
|
|
20
7
|
*/
|
|
21
|
-
var _default = {
|
|
22
|
-
title: 'Button',
|
|
23
|
-
component: _.Button
|
|
24
|
-
};
|
|
25
|
-
exports["default"] = _default;
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
mr: 2
|
|
32
|
-
},
|
|
33
|
-
children: "Primary"
|
|
34
|
-
}), (0, _jsxRuntime.jsx)(_.Button, {
|
|
35
|
-
variant: "secondary",
|
|
36
|
-
sx: {
|
|
37
|
-
ml: 2
|
|
38
|
-
},
|
|
39
|
-
children: "Secondary"
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
9
|
+
import { Button } from '..';
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Button',
|
|
12
|
+
component: Button
|
|
42
13
|
};
|
|
43
|
-
|
|
44
|
-
|
|
14
|
+
export var Default = function Default() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
16
|
+
sx: {
|
|
17
|
+
mr: 2
|
|
18
|
+
}
|
|
19
|
+
}, "Primary"), /*#__PURE__*/React.createElement(Button, {
|
|
20
|
+
variant: "secondary",
|
|
21
|
+
sx: {
|
|
22
|
+
ml: 2
|
|
23
|
+
}
|
|
24
|
+
}, "Secondary"), /*#__PURE__*/React.createElement(Button, {
|
|
25
|
+
variant: "secondary",
|
|
26
|
+
isLoading: true,
|
|
27
|
+
sx: {
|
|
28
|
+
ml: 2
|
|
29
|
+
}
|
|
30
|
+
}, "Secondary"));
|
|
31
|
+
};
|
|
@@ -9,9 +9,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
|
|
10
10
|
var _ = require("..");
|
|
11
11
|
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
12
14
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
13
15
|
|
|
14
|
-
var _excluded = ["variant", "sx"];
|
|
16
|
+
var _excluded = ["variant", "sx", "className"];
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
@@ -24,6 +26,7 @@ var Card = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
|
24
26
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
25
27
|
_ref$sx = _ref.sx,
|
|
26
28
|
sx = _ref$sx === void 0 ? {} : _ref$sx,
|
|
29
|
+
className = _ref.className,
|
|
27
30
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
28
31
|
|
|
29
32
|
return (0, _jsxRuntime.jsx)(_.Box, _extends({
|
|
@@ -32,13 +35,15 @@ var Card = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
|
32
35
|
// pass variant prop to sx
|
|
33
36
|
variant: "cards." + variant,
|
|
34
37
|
overflow: 'hidden'
|
|
35
|
-
}, sx)
|
|
38
|
+
}, sx),
|
|
39
|
+
className: (0, _classnames["default"])('vip-card-component', className)
|
|
36
40
|
}, props));
|
|
37
41
|
});
|
|
38
42
|
|
|
39
43
|
exports.Card = Card;
|
|
40
44
|
Card.propTypes = {
|
|
41
45
|
variant: _propTypes["default"].string,
|
|
42
|
-
sx: _propTypes["default"].object
|
|
46
|
+
sx: _propTypes["default"].object,
|
|
47
|
+
className: _propTypes["default"].any
|
|
43
48
|
};
|
|
44
49
|
Card.displayName = 'Card';
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Default = exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
|
-
var _ = require("..");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* External dependencies
|
|
16
3
|
*/
|
|
17
|
-
|
|
4
|
+
import React from 'react';
|
|
18
5
|
/**
|
|
19
6
|
* Internal dependencies
|
|
20
7
|
*/
|
|
21
|
-
var _default = {
|
|
22
|
-
title: 'Card',
|
|
23
|
-
component: _.Card
|
|
24
|
-
};
|
|
25
|
-
exports["default"] = _default;
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
import { Card } from '..';
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Card',
|
|
12
|
+
component: Card
|
|
31
13
|
};
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
export var Default = function Default() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Card, null, "Hello");
|
|
16
|
+
};
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.Code = void 0;
|
|
5
5
|
|
|
6
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
7
|
+
|
|
6
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
9
|
|
|
8
10
|
var _react = require("react");
|
|
@@ -11,7 +13,7 @@ var _md = require("react-icons/md");
|
|
|
11
13
|
|
|
12
14
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
13
15
|
|
|
14
|
-
var _excluded = ["prompt", "showCopy", "onCopy"];
|
|
16
|
+
var _excluded = ["prompt", "showCopy", "onCopy", "className"];
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
@@ -26,6 +28,7 @@ var Code = function Code(_ref) {
|
|
|
26
28
|
showCopy = _ref$showCopy === void 0 ? false : _ref$showCopy,
|
|
27
29
|
_ref$onCopy = _ref.onCopy,
|
|
28
30
|
onCopy = _ref$onCopy === void 0 ? null : _ref$onCopy,
|
|
31
|
+
className = _ref.className,
|
|
29
32
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
30
33
|
|
|
31
34
|
var ref = (0, _react.useRef)();
|
|
@@ -46,7 +49,8 @@ var Code = function Code(_ref) {
|
|
|
46
49
|
marginRight: 2,
|
|
47
50
|
userSelect: 'none'
|
|
48
51
|
}
|
|
49
|
-
}
|
|
52
|
+
},
|
|
53
|
+
className: (0, _classnames["default"])('vip-code-component', className)
|
|
50
54
|
}, props));
|
|
51
55
|
|
|
52
56
|
if (!showCopy) {
|
|
@@ -100,5 +104,6 @@ exports.Code = Code;
|
|
|
100
104
|
Code.propTypes = {
|
|
101
105
|
prompt: _propTypes["default"].bool,
|
|
102
106
|
showCopy: _propTypes["default"].bool,
|
|
103
|
-
onCopy: _propTypes["default"].func
|
|
107
|
+
onCopy: _propTypes["default"].func,
|
|
108
|
+
className: _propTypes["default"].any
|
|
104
109
|
};
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.Default = exports["default"] = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireDefault(require("react"));
|
|
7
|
-
|
|
8
|
-
var _ = require("..");
|
|
9
|
-
|
|
10
|
-
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
1
|
/**
|
|
15
2
|
* External dependencies
|
|
16
3
|
*/
|
|
17
|
-
|
|
4
|
+
import React from 'react';
|
|
18
5
|
/**
|
|
19
6
|
* Internal dependencies
|
|
20
7
|
*/
|
|
21
|
-
var _default = {
|
|
22
|
-
title: 'Code',
|
|
23
|
-
component: _.Code
|
|
24
|
-
};
|
|
25
|
-
exports["default"] = _default;
|
|
26
8
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
import { Code } from '..';
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Code',
|
|
12
|
+
component: Code
|
|
31
13
|
};
|
|
32
|
-
|
|
33
|
-
|
|
14
|
+
export var Default = function Default() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Code, null, "Code");
|
|
16
|
+
};
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.ConfirmationDialogContent = exports.ConfirmationDialog = void 0;
|
|
5
5
|
|
|
6
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
7
|
+
|
|
6
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
9
|
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -25,9 +27,12 @@ var ConfirmationDialogContent = function ConfirmationDialogContent(_ref) {
|
|
|
25
27
|
onClose = _ref.onClose,
|
|
26
28
|
_ref$label = _ref.label,
|
|
27
29
|
label = _ref$label === void 0 ? 'Confirm' : _ref$label,
|
|
28
|
-
onConfirm = _ref.onConfirm
|
|
30
|
+
onConfirm = _ref.onConfirm,
|
|
31
|
+
_ref$className = _ref.className,
|
|
32
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
29
33
|
return (0, _jsxRuntime.jsxs)(_.Box, {
|
|
30
34
|
p: 4,
|
|
35
|
+
className: (0, _classnames["default"])('vip-confirmation-dialog-component', className),
|
|
31
36
|
children: [(0, _jsxRuntime.jsx)(_.Heading, {
|
|
32
37
|
variant: "h3",
|
|
33
38
|
sx: {
|
|
@@ -66,7 +71,8 @@ ConfirmationDialogContent.propTypes = {
|
|
|
66
71
|
body: _propTypes["default"].node,
|
|
67
72
|
label: _propTypes["default"].string,
|
|
68
73
|
onClose: _propTypes["default"].func,
|
|
69
|
-
onConfirm: _propTypes["default"].func
|
|
74
|
+
onConfirm: _propTypes["default"].func,
|
|
75
|
+
className: _propTypes["default"].any
|
|
70
76
|
};
|
|
71
77
|
|
|
72
78
|
var ConfirmationDialog = function ConfirmationDialog(_ref2) {
|