@ntbjs/react-components 0.0.1-beta.5 → 0.0.1-beta.50
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/.eslintrc +2 -1
- package/ActionButton-90485300.js +43 -0
- package/AssetGallery-0141d8f4.js +1383 -0
- package/Button-0d728b52.js +156 -0
- package/Checkbox-bab7f4d1.js +136 -0
- package/Popover-d3e2f6c0.js +97 -0
- package/Radio-0b46b2a8.js +83 -0
- package/Switch-aa384260.js +104 -0
- package/TextArea-52cf4c0a.js +173 -0
- package/TextInput-a7c32f5f.js +250 -0
- package/Tooltip-f95a39f4.js +57 -0
- package/data/Popover/index.js +13 -0
- package/data/index.js +17 -5
- package/{defaultTheme-789305db.js → defaultTheme-870f7df1.js} +123 -141
- package/icons/audio.svg +3 -0
- package/icons/bell.svg +3 -0
- package/icons/check.svg +3 -0
- package/icons/gear.svg +3 -0
- package/icons/headset.svg +1 -0
- package/icons/library-add.svg +3 -0
- package/icons/search.svg +3 -0
- package/inputs/ActionButton/index.js +10 -4
- package/inputs/Button/index.js +10 -0
- package/inputs/Checkbox/index.js +12 -0
- package/inputs/Radio/index.js +12 -0
- package/inputs/Switch/index.js +12 -0
- package/inputs/TextArea/index.js +12 -0
- package/inputs/TextInput/index.js +12 -0
- package/inputs/index.js +27 -4
- package/package.json +21 -16
- package/ssr/index.js +14 -0
- package/styles/config.scss +1 -0
- package/styles/utils/colors.scss +1 -1
- package/widgets/AssetGallery/index.js +25 -9
- package/widgets/index.js +27 -9
- package/ActionButton-a63b155c.js +0 -31
- package/AssetGallery-9d1879a9.js +0 -969
- package/Tooltip-609bad98.js +0 -52
- package/styles/colors.scss +0 -15
- package/styles/theme.scss +0 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntbjs/react-components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.50",
|
|
4
4
|
"description": "NTBs common front-end design utilities and React components.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "cross-env NODE_ENV=production rollup -c",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
34
34
|
"@babel/preset-react": "^7.13.13",
|
|
35
35
|
"@rollup/plugin-babel": "^5.3.0",
|
|
36
|
-
"@rollup/plugin-commonjs": "^
|
|
37
|
-
"@rollup/plugin-node-resolve": "^
|
|
38
|
-
"@storybook/addon-actions": "^6.
|
|
39
|
-
"@storybook/addon-docs": "^6.
|
|
40
|
-
"@storybook/addon-essentials": "^6.
|
|
41
|
-
"@storybook/addon-links": "^6.
|
|
42
|
-
"@storybook/react": "^6.
|
|
36
|
+
"@rollup/plugin-commonjs": "^19.0.0",
|
|
37
|
+
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
38
|
+
"@storybook/addon-actions": "^6.5.14",
|
|
39
|
+
"@storybook/addon-docs": "^6.5.14",
|
|
40
|
+
"@storybook/addon-essentials": "^6.5.14",
|
|
41
|
+
"@storybook/addon-links": "^6.5.14",
|
|
42
|
+
"@storybook/react": "^6.5.14",
|
|
43
43
|
"@svgr/rollup": "^5.5.0",
|
|
44
44
|
"@svgr/webpack": "^5.5.0",
|
|
45
45
|
"@testing-library/jest-dom": "^5.12.0",
|
|
@@ -50,31 +50,36 @@
|
|
|
50
50
|
"colors": "^1.4.0",
|
|
51
51
|
"cross-env": "^7.0.3",
|
|
52
52
|
"eslint": "^7.24.0",
|
|
53
|
-
"eslint-plugin-react": "^7.
|
|
53
|
+
"eslint-plugin-react": "^7.24.0",
|
|
54
54
|
"identity-obj-proxy": "^3.0.0",
|
|
55
|
-
"jest": "^
|
|
56
|
-
"postcss": "^8.
|
|
55
|
+
"jest": "^27.0.4",
|
|
56
|
+
"postcss": "^8.3.0",
|
|
57
57
|
"prop-types": "^15.7.2",
|
|
58
58
|
"react": "^17.0.2",
|
|
59
59
|
"react-dom": "^17.0.2",
|
|
60
|
-
"rollup": "^2.
|
|
60
|
+
"rollup": "^2.50.6",
|
|
61
61
|
"rollup-plugin-copy": "^3.3.0",
|
|
62
62
|
"rollup-plugin-delete": "^2.0.0",
|
|
63
|
-
"rollup-plugin-multi-input": "^1.
|
|
63
|
+
"rollup-plugin-multi-input": "^1.3.1",
|
|
64
64
|
"rollup-plugin-peer-deps-external": "^2.2.0",
|
|
65
65
|
"rollup-plugin-postcss": "^4.0.0",
|
|
66
66
|
"rollup-plugin-scss": "^2.6.1",
|
|
67
67
|
"rollup-plugin-url": "^3.0.1",
|
|
68
|
-
"sass": "^1.
|
|
68
|
+
"sass": "^1.34.1",
|
|
69
69
|
"sass-loader": "^10.1.1",
|
|
70
|
-
"storybook-dark-mode": "^
|
|
70
|
+
"storybook-dark-mode": "^2.0.4",
|
|
71
71
|
"url-loader": "^4.1.1"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@restart/hooks": "^0.3.26",
|
|
75
|
+
"@storybook/addons": "^6.5.14",
|
|
76
|
+
"@storybook/theming": "^6.5.14",
|
|
75
77
|
"@tippyjs/react": "^4.2.5",
|
|
76
78
|
"lodash": "^4.17.21",
|
|
79
|
+
"nanoid": "^3.1.25",
|
|
80
|
+
"polished": "^4.1.3",
|
|
77
81
|
"react-lazy-load-image-component": "^1.5.1",
|
|
78
|
-
"
|
|
82
|
+
"resize-observer-polyfill": "^1.5.1",
|
|
83
|
+
"styled-components": "^5.3.5"
|
|
79
84
|
}
|
|
80
85
|
}
|
package/ssr/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'ServerStyleSheet', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return styled.ServerStyleSheet;
|
|
13
|
+
}
|
|
14
|
+
});
|
package/styles/config.scss
CHANGED
package/styles/utils/colors.scss
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var AssetGallery = require('../../AssetGallery-0141d8f4.js');
|
|
4
|
+
require('../../defaultTheme-870f7df1.js');
|
|
5
|
+
require('styled-components');
|
|
6
|
+
require('react');
|
|
7
|
+
require('lodash');
|
|
8
|
+
require('../../TextInput-a7c32f5f.js');
|
|
9
|
+
require('nanoid');
|
|
10
|
+
require('resize-observer-polyfill');
|
|
11
|
+
require('react-lazy-load-image-component');
|
|
12
|
+
require('../../ActionButton-90485300.js');
|
|
13
|
+
require('../../Button-0d728b52.js');
|
|
14
|
+
require('../../Checkbox-bab7f4d1.js');
|
|
15
|
+
require('../../Radio-0b46b2a8.js');
|
|
16
|
+
require('polished');
|
|
17
|
+
require('../../TextArea-52cf4c0a.js');
|
|
18
|
+
require('../../Switch-aa384260.js');
|
|
19
|
+
require('../../Popover-d3e2f6c0.js');
|
|
20
|
+
require('@tippyjs/react');
|
|
21
|
+
require('../../Tooltip-f95a39f4.js');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
module.exports = AssetGallery.AssetGallery;
|
package/widgets/index.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var AssetGallery = require('../AssetGallery-0141d8f4.js');
|
|
6
|
+
require('../defaultTheme-870f7df1.js');
|
|
7
|
+
require('styled-components');
|
|
8
|
+
require('react');
|
|
9
|
+
require('lodash');
|
|
10
|
+
require('../TextInput-a7c32f5f.js');
|
|
11
|
+
require('nanoid');
|
|
12
|
+
require('resize-observer-polyfill');
|
|
13
|
+
require('react-lazy-load-image-component');
|
|
14
|
+
require('../ActionButton-90485300.js');
|
|
15
|
+
require('../Button-0d728b52.js');
|
|
16
|
+
require('../Checkbox-bab7f4d1.js');
|
|
17
|
+
require('../Radio-0b46b2a8.js');
|
|
18
|
+
require('polished');
|
|
19
|
+
require('../TextArea-52cf4c0a.js');
|
|
20
|
+
require('../Switch-aa384260.js');
|
|
21
|
+
require('../Popover-d3e2f6c0.js');
|
|
22
|
+
require('@tippyjs/react');
|
|
23
|
+
require('../Tooltip-f95a39f4.js');
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
exports.AssetGallery = AssetGallery.AssetGallery;
|
package/ActionButton-a63b155c.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { a as applyDefaultTheme, _ as _taggedTemplateLiteral, b as _objectWithoutProperties, c as _extends, p as propTypes } from './defaultTheme-789305db.js';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
|
|
5
|
-
var _templateObject;
|
|
6
|
-
var ActionButton$1 = styled.button.attrs(applyDefaultTheme)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n height: 40px;\n width: 40px;\n border: 0;\n color: inherit;\n background-color: transparent;\n ", "\n background-position: center;\n background-repeat: no-repeat;\n background-size: 0 0;\n transition: background-size 250ms ease;\n cursor: pointer;\n\n :hover:not(:disabled) {\n background-size: 200% 200%;\n\n svg {\n ", ";\n }\n }\n\n &:disabled {\n opacity: 0.5;\n color: inherit;\n cursor: not-allowed;\n }\n\n svg {\n width: 100%;\n max-height: 20px;\n max-width: 20px;\n pointer-events: none;\n transition: color 250ms;\n }\n"])), function (props) {
|
|
7
|
-
return props.theme.themeProp('background-image', "radial-gradient(circle at center, ".concat(props.theme.getColor('gray-600'), " 50%, transparent 50%)"), "radial-gradient(circle at center, ".concat(props.theme.getColor('gray-200'), " 50%, transparent 50%)"));
|
|
8
|
-
}, function (props) {
|
|
9
|
-
return props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-700'));
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
var ActionButton = React__default.forwardRef(function ActionButton(_ref, forwardedRef) {
|
|
13
|
-
var icon = _ref.icon,
|
|
14
|
-
disabled = _ref.disabled,
|
|
15
|
-
onClick = _ref.onClick,
|
|
16
|
-
props = _objectWithoutProperties(_ref, ["icon", "disabled", "onClick"]);
|
|
17
|
-
|
|
18
|
-
return React__default.createElement(ActionButton$1, _extends({
|
|
19
|
-
ref: forwardedRef,
|
|
20
|
-
disabled: disabled,
|
|
21
|
-
onClick: onClick
|
|
22
|
-
}, props), icon);
|
|
23
|
-
});
|
|
24
|
-
ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
25
|
-
icon: propTypes.element.isRequired,
|
|
26
|
-
disabled: propTypes.bool,
|
|
27
|
-
onClick: propTypes.func.isRequired
|
|
28
|
-
} : {};
|
|
29
|
-
ActionButton.defaultProps = {};
|
|
30
|
-
|
|
31
|
-
export { ActionButton as A };
|