@ntbjs/react-components 0.0.1-beta.4 → 0.0.1-beta.42
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-10a681b9.js +43 -0
- package/AssetGallery-b52dbb14.js +1334 -0
- package/Button-6f6b4ed4.js +155 -0
- package/Checkbox-791a409f.js +130 -0
- package/Popover-0ff13419.js +97 -0
- package/Radio-9271a4b6.js +74 -0
- package/TextArea-70a74014.js +110 -0
- package/TextInput-1ed37e22.js +107 -0
- package/Tooltip-85e7d561.js +57 -0
- package/data/Popover/index.js +13 -0
- package/data/index.js +17 -5
- package/{defaultTheme-789305db.js → defaultTheme-18d7c1ee.js} +121 -141
- package/icons/bell.svg +3 -0
- package/icons/check.svg +3 -0
- package/icons/gear.svg +3 -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 +11 -0
- package/inputs/Radio/index.js +12 -0
- package/inputs/TextArea/index.js +12 -0
- package/inputs/TextInput/index.js +12 -0
- package/inputs/index.js +25 -4
- package/package.json +19 -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 +24 -9
- package/widgets/index.js +26 -9
- package/ActionButton-a63b155c.js +0 -31
- package/AssetGallery-2e86f16a.js +0 -969
- package/Tooltip-609bad98.js +0 -52
- package/styles/colors.scss +0 -15
- package/styles/theme.scss +0 -33
package/icons/bell.svg
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.69 24">
|
|
2
|
+
<path fill="currentColor" d="M9.85,24a2.47,2.47,0,0,0,2.46-2.46H7.38A2.47,2.47,0,0,0,9.85,24Zm7.38-7.38V10.46c0-3.78-2-6.94-5.54-7.78V1.85A1.85,1.85,0,1,0,8,1.85v.83c-3.52.84-5.54,4-5.54,7.78v6.16L0,19.08v1.23H19.69V19.08Zm-2.46,1.23H4.92V10.46c0-3.05,1.86-5.54,4.93-5.54s4.92,2.49,4.92,5.54Z"/>
|
|
3
|
+
</svg>
|
package/icons/check.svg
ADDED
package/icons/gear.svg
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24.67">
|
|
2
|
+
<path fill="currentColor" d="M21.17,13.55a9.57,9.57,0,0,0,.09-1.21,9.43,9.43,0,0,0-.09-1.21l2.6-2a.61.61,0,0,0,.15-.79L21.45,4a.62.62,0,0,0-.54-.3.71.71,0,0,0-.21,0L17.63,5a8.7,8.7,0,0,0-2.09-1.21L15.07.52a.59.59,0,0,0-.6-.52H9.54a.61.61,0,0,0-.61.52L8.46,3.79A9.58,9.58,0,0,0,6.38,5L3.31,3.76a.91.91,0,0,0-.23,0,.62.62,0,0,0-.53.3L.09,8.3a.61.61,0,0,0,.14.79l2.61,2a9.57,9.57,0,0,0-.09,1.21,9.85,9.85,0,0,0,.09,1.21l-2.61,2a.63.63,0,0,0-.14.79l2.46,4.27A.61.61,0,0,0,3.1,21a.52.52,0,0,0,.21,0l3.07-1.23a9.19,9.19,0,0,0,2.08,1.21l.47,3.27a.61.61,0,0,0,.61.51h4.93a.59.59,0,0,0,.6-.51l.47-3.27a9.42,9.42,0,0,0,2.09-1.21l3.07,1.23a.57.57,0,0,0,.22,0,.6.6,0,0,0,.53-.31l2.47-4.27a.62.62,0,0,0-.15-.79Zm-2.44-2.11a6.41,6.41,0,0,1,.06.9c0,.26,0,.53-.06.9l-.18,1.39,1.1.86,1.33,1L20.12,18l-1.57-.63-1.28-.51-1.11.84a7.57,7.57,0,0,1-1.54.9l-1.31.53-.2,1.39-.24,1.67H11.14l-.24-1.67-.19-1.39L9.4,18.62a7.57,7.57,0,0,1-1.52-.88l-1.12-.86-1.31.53L3.89,18,3,16.54l1.33-1,1.1-.87-.17-1.39a8.91,8.91,0,0,1-.06-.91,8.41,8.41,0,0,1,.06-.9L5.45,10l-1.1-.86L3,8.14l.87-1.49,1.56.63,1.28.52L7.85,7a6.9,6.9,0,0,1,1.54-.9l1.31-.53.19-1.4.25-1.66h1.71l.24,1.66.2,1.4,1.3.53a6.84,6.84,0,0,1,1.52.87l1.12.87,1.31-.53,1.57-.63L21,8.13l-1.32,1-1.1.86ZM12,7.4a4.94,4.94,0,1,0,4.94,4.94A4.94,4.94,0,0,0,12,7.4Zm0,7.4a2.47,2.47,0,1,1,2.47-2.46A2.47,2.47,0,0,1,12,14.8Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
+
<path fill="currentColor" d="M2.4,4.8H0V21.6A2.4071,2.4071,0,0,0,2.4,24H19.2V21.6H2.4ZM21.6,0H7.2A2.4071,2.4071,0,0,0,4.8,2.4V16.8a2.4071,2.4071,0,0,0,2.4,2.4H21.6A2.4071,2.4071,0,0,0,24,16.8V2.4A2.4071,2.4071,0,0,0,21.6,0Zm0,16.8H7.2V2.4H21.6Zm-8.4-2.4h2.4V10.8h3.6V8.4H15.6V4.8H13.2V8.4H9.6v2.4h3.6Z"/>
|
|
3
|
+
</svg>
|
package/icons/search.svg
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
+
<path fill="currentColor" d="M17.1527,15.0943H16.0686l-.3842-.37a8.933,8.933,0,1,0-.9606.9606l.37.3842v1.0841L21.9554,24,24,21.9554Zm-8.2333,0a6.175,6.175,0,1,1,6.1749-6.1749A6.1667,6.1667,0,0,1,8.9194,15.0943Z"/>
|
|
3
|
+
</svg>
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ActionButton = require('../../ActionButton-10a681b9.js');
|
|
4
|
+
require('../../defaultTheme-18d7c1ee.js');
|
|
5
|
+
require('styled-components');
|
|
6
|
+
require('react');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
module.exports = ActionButton.ActionButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var TextArea = require('../../TextArea-70a74014.js');
|
|
4
|
+
require('../../defaultTheme-18d7c1ee.js');
|
|
5
|
+
require('styled-components');
|
|
6
|
+
require('react');
|
|
7
|
+
require('nanoid');
|
|
8
|
+
require('lodash');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
module.exports = TextArea.TextArea;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var TextInput = require('../../TextInput-1ed37e22.js');
|
|
4
|
+
require('../../defaultTheme-18d7c1ee.js');
|
|
5
|
+
require('styled-components');
|
|
6
|
+
require('react');
|
|
7
|
+
require('nanoid');
|
|
8
|
+
require('lodash');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
module.exports = TextInput.TextInput;
|
package/inputs/index.js
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var ActionButton = require('../ActionButton-10a681b9.js');
|
|
6
|
+
var Button = require('../Button-6f6b4ed4.js');
|
|
7
|
+
var Checkbox = require('../Checkbox-791a409f.js');
|
|
8
|
+
var Radio = require('../Radio-9271a4b6.js');
|
|
9
|
+
var TextArea = require('../TextArea-70a74014.js');
|
|
10
|
+
var TextInput = require('../TextInput-1ed37e22.js');
|
|
11
|
+
require('../defaultTheme-18d7c1ee.js');
|
|
12
|
+
require('styled-components');
|
|
13
|
+
require('react');
|
|
14
|
+
require('nanoid');
|
|
15
|
+
require('polished');
|
|
16
|
+
require('lodash');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.ActionButton = ActionButton.ActionButton;
|
|
21
|
+
exports.Button = Button.Button;
|
|
22
|
+
exports.Checkbox = Checkbox.Checkbox;
|
|
23
|
+
exports.Radio = Radio.Radio;
|
|
24
|
+
exports.TextArea = TextArea.TextArea;
|
|
25
|
+
exports.TextInput = TextInput.TextInput;
|
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.42",
|
|
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.3.4",
|
|
39
|
+
"@storybook/addon-docs": "^6.3.4",
|
|
40
|
+
"@storybook/addon-essentials": "^6.3.4",
|
|
41
|
+
"@storybook/addon-links": "^6.3.4",
|
|
42
|
+
"@storybook/react": "^6.3.4",
|
|
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,34 @@
|
|
|
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": "^1.0.
|
|
70
|
+
"storybook-dark-mode": "^1.0.8",
|
|
71
71
|
"url-loader": "^4.1.1"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@restart/hooks": "^0.3.26",
|
|
75
75
|
"@tippyjs/react": "^4.2.5",
|
|
76
76
|
"lodash": "^4.17.21",
|
|
77
|
+
"nanoid": "^3.1.25",
|
|
78
|
+
"polished": "^4.1.3",
|
|
77
79
|
"react-lazy-load-image-component": "^1.5.1",
|
|
78
|
-
"
|
|
80
|
+
"resize-observer-polyfill": "^1.5.1",
|
|
81
|
+
"styled-components": "^5.3.1"
|
|
79
82
|
}
|
|
80
83
|
}
|
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,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var AssetGallery = require('../../AssetGallery-b52dbb14.js');
|
|
4
|
+
require('../../defaultTheme-18d7c1ee.js');
|
|
5
|
+
require('styled-components');
|
|
6
|
+
require('react');
|
|
7
|
+
require('lodash');
|
|
8
|
+
require('resize-observer-polyfill');
|
|
9
|
+
require('react-lazy-load-image-component');
|
|
10
|
+
require('../../ActionButton-10a681b9.js');
|
|
11
|
+
require('../../Button-6f6b4ed4.js');
|
|
12
|
+
require('../../Checkbox-791a409f.js');
|
|
13
|
+
require('nanoid');
|
|
14
|
+
require('../../Radio-9271a4b6.js');
|
|
15
|
+
require('polished');
|
|
16
|
+
require('../../TextArea-70a74014.js');
|
|
17
|
+
require('../../TextInput-1ed37e22.js');
|
|
18
|
+
require('../../Popover-0ff13419.js');
|
|
19
|
+
require('@tippyjs/react');
|
|
20
|
+
require('../../Tooltip-85e7d561.js');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
module.exports = AssetGallery.AssetGallery;
|
package/widgets/index.js
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
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-b52dbb14.js');
|
|
6
|
+
require('../defaultTheme-18d7c1ee.js');
|
|
7
|
+
require('styled-components');
|
|
8
|
+
require('react');
|
|
9
|
+
require('lodash');
|
|
10
|
+
require('resize-observer-polyfill');
|
|
11
|
+
require('react-lazy-load-image-component');
|
|
12
|
+
require('../ActionButton-10a681b9.js');
|
|
13
|
+
require('../Button-6f6b4ed4.js');
|
|
14
|
+
require('../Checkbox-791a409f.js');
|
|
15
|
+
require('nanoid');
|
|
16
|
+
require('../Radio-9271a4b6.js');
|
|
17
|
+
require('polished');
|
|
18
|
+
require('../TextArea-70a74014.js');
|
|
19
|
+
require('../TextInput-1ed37e22.js');
|
|
20
|
+
require('../Popover-0ff13419.js');
|
|
21
|
+
require('@tippyjs/react');
|
|
22
|
+
require('../Tooltip-85e7d561.js');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
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 };
|