@ntbjs/react-components 1.3.0-rc.7 → 1.3.0-rc.70

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.
Files changed (76) hide show
  1. package/.eslintrc +7 -8
  2. package/{ActionButton-46735b89.js → ActionButton-5bc79370.js} +19 -16
  3. package/{Alert-13b75102.js → Alert-edd9f6a7.js} +20 -24
  4. package/{AssetGallery-de5aaeb9.js → AssetAction-29b9a203.js} +611 -654
  5. package/AssetPreviewTopBar-6eaa7df8.js +104 -0
  6. package/{Badge-757b0a39.js → Badge-00b2f311.js} +28 -49
  7. package/{Button-49f82b31.js → Button-82e91acb.js} +97 -88
  8. package/{Checkbox-68dc38a8.js → Checkbox-c441fdba.js} +32 -37
  9. package/{CompactAutocompleteSelect-26a9cd1a.js → CompactAutocompleteSelect-a8ccfcad.js} +95 -127
  10. package/{CompactStarRating-4ad1ccd5.js → CompactStarRating-3fa89ec7.js} +85 -98
  11. package/{CompactTextInput-c8bee455.js → CompactTextInput-67ce443e.js} +117 -111
  12. package/{ContextMenu-4ec3d9f3.js → ContextMenu-9645746f.js} +6 -6
  13. package/{ContextMenuItem-ba2b697e.js → ContextMenuItem-ae252503.js} +22 -26
  14. package/InfoCard-005063b4.js +86 -0
  15. package/{InputGroup-49fbc423.js → InputGroup-3598e37c.js} +6 -6
  16. package/{Instructions-6009d3e3.js → Instructions-46e49829.js} +99 -83
  17. package/{MultiLevelCheckboxSelect-be76fb10.js → MultiLevelCheckboxSelect-375c4785.js} +103 -165
  18. package/{MultiSelect-efd60232.js → MultiSelect-0bdad346.js} +78 -108
  19. package/{Popover-569cd272.js → Popover-f00121a3.js} +41 -40
  20. package/ProgressBar-7d31fd95.js +154 -0
  21. package/{Radio-32d0513a.js → Radio-758fd8f3.js} +21 -22
  22. package/{SectionSeparator-259a22ed.js → SectionSeparator-43e1647d.js} +6 -6
  23. package/{Switch-4a41585f.js → Switch-26547abb.js} +25 -27
  24. package/{Tab-f499ecbc.js → Tab-d3ee0a3b.js} +7 -7
  25. package/{Tabs-bfe19f77.js → Tabs-243c5e0b.js} +26 -46
  26. package/TextArea-b16e166b.js +364 -0
  27. package/{TextInput-0d109708.js → TextInput-70cb3df7.js} +55 -62
  28. package/{Tooltip-66daf6e3.js → Tooltip-7dc4676b.js} +13 -13
  29. package/{VerificationStatusIcon-d5bfb67a.js → VerificationStatusIcon-f3c44ef8.js} +20 -30
  30. package/arrow-forward-d7c77ae3.js +37 -0
  31. package/{close-ebf2f3cf.js → close-1751121a.js} +8 -12
  32. package/data/Alert/index.js +2 -2
  33. package/data/Badge/index.js +2 -2
  34. package/data/Popover/index.js +3 -3
  35. package/data/Tab/index.js +2 -2
  36. package/data/Tabs/index.js +3 -3
  37. package/data/Tooltip/index.js +3 -3
  38. package/data/index.js +9 -9
  39. package/{defaultTheme-ea44e34a.js → defaultTheme-24ea5c47.js} +213 -261
  40. package/edit-note-cefe2215.js +37 -0
  41. package/{expand-more-94585605.js → expand-more-d74e2bd2.js} +8 -12
  42. package/icons/arrow-forward.svg +3 -0
  43. package/icons/index.js +2 -0
  44. package/inputs/ActionButton/index.js +2 -2
  45. package/inputs/Button/index.js +6 -6
  46. package/inputs/Checkbox/index.js +2 -2
  47. package/inputs/CompactAutocompleteSelect/index.js +13 -13
  48. package/inputs/CompactStarRating/index.js +10 -10
  49. package/inputs/CompactTextInput/index.js +11 -11
  50. package/inputs/MultiSelect/index.js +4 -4
  51. package/inputs/Radio/index.js +2 -2
  52. package/inputs/Switch/index.js +2 -2
  53. package/inputs/TextArea/index.js +11 -11
  54. package/inputs/TextInput/index.js +3 -3
  55. package/inputs/index.js +28 -28
  56. package/layout/InputGroup/index.js +2 -2
  57. package/layout/SectionSeparator/index.js +2 -2
  58. package/layout/index.js +3 -3
  59. package/package.json +5 -3
  60. package/{react-select-creatable.esm-2f23d6c6.js → react-select-creatable.esm-09b1be95.js} +1421 -1287
  61. package/{shift-away-subtle-0bed9a3c.js → shift-away-subtle-dce50395.js} +1 -1
  62. package/ssr/index.js +1 -3
  63. package/styles/config.scss +3 -0
  64. package/widgets/AssetGallery/index.js +37 -32
  65. package/widgets/AssetPreview/AssetPreviewTopBar/index.js +3 -3
  66. package/widgets/ContextMenu/ContextMenuItem/index.js +2 -2
  67. package/widgets/ContextMenu/ContextMenuItemsGroup/index.js +6 -6
  68. package/widgets/ContextMenu/index.js +2 -2
  69. package/widgets/InfoCard/index.js +11 -0
  70. package/widgets/Instructions/index.js +16 -17
  71. package/widgets/ProgressBar/index.js +11 -0
  72. package/widgets/index.js +42 -35
  73. package/AssetPreviewTopBar-912c3469.js +0 -99
  74. package/TextArea-41089240.js +0 -375
  75. package/edit-note-c47d292e.js +0 -41
  76. package/warning-circle-24522402.js +0 -41
package/.eslintrc CHANGED
@@ -8,13 +8,12 @@
8
8
  "parserOptions": {
9
9
  "sourceType": "module"
10
10
  },
11
- "ignorePatterns": [
12
- "build",
13
- "storybook-static"
14
- ],
11
+ "ignorePatterns": ["build", "storybook-static"],
15
12
  "parser": "@babel/eslint-parser",
16
- "extends": [
17
- "eslint:recommended",
18
- "plugin:react/recommended"
19
- ]
13
+ "extends": ["eslint:recommended", "plugin:react/recommended"],
14
+ "settings": {
15
+ "react": {
16
+ "version": "detect"
17
+ }
18
+ }
20
19
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var defaultTheme = require('./defaultTheme-ea44e34a.js');
3
+ var defaultTheme = require('./defaultTheme-24ea5c47.js');
4
4
  var React = require('react');
5
5
  var styled = require('styled-components');
6
6
  var polished = require('polished');
@@ -11,13 +11,12 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
11
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
12
12
 
13
13
  var _templateObject, _templateObject2;
14
- var ActionButton$1 = styled__default['default'].button.attrs(defaultTheme.applyDefaultTheme)(_templateObject || (_templateObject = defaultTheme._taggedTemplateLiteral(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: ", ";\n height: ", ";\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 ", "\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) {
15
- return "".concat(props.buttonWidthHeight[0], "px");
14
+ var ActionButton$1 = styled__default["default"].button.attrs(defaultTheme.applyDefaultTheme)(_templateObject || (_templateObject = defaultTheme._taggedTemplateLiteral(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: ", ";\n height: ", ";\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 ", "\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-width: ", ";\n max-height: ", ";\n\n pointer-events: none;\n transition: color 250ms;\n }\n"])), function (props) {
15
+ return "".concat(props.actionWidthHeight[0], "px");
16
16
  }, function (props) {
17
- return "".concat(props.buttonWidthHeight[1], "px");
17
+ return "".concat(props.actionWidthHeight[1], "px");
18
18
  }, function (props) {
19
19
  var _props$backgroundColo, _props$backgroundColo2, _props$backgroundColo3, _props$backgroundColo4;
20
-
21
20
  var darkThemeBgColor = (_props$backgroundColo = props === null || props === void 0 ? void 0 : (_props$backgroundColo2 = props.backgroundColors) === null || _props$backgroundColo2 === void 0 ? void 0 : _props$backgroundColo2[0]) !== null && _props$backgroundColo !== void 0 ? _props$backgroundColo : props.theme.getColor('gray-600');
22
21
  var lightThemeBgColor = (_props$backgroundColo3 = props === null || props === void 0 ? void 0 : (_props$backgroundColo4 = props.backgroundColors) === null || _props$backgroundColo4 === void 0 ? void 0 : _props$backgroundColo4[1]) !== null && _props$backgroundColo3 !== void 0 ? _props$backgroundColo3 : props.theme.getColor('gray-200');
23
22
  return props.theme.themeProp('background-image', "radial-gradient(circle at center, ".concat(darkThemeBgColor, " 50%, transparent 50%)"), "radial-gradient(circle at center, ".concat(lightThemeBgColor, " 50%, transparent 50%)"));
@@ -27,22 +26,26 @@ var ActionButton$1 = styled__default['default'].button.attrs(defaultTheme.applyD
27
26
  });
28
27
  }, function (props) {
29
28
  return props.useShadow ? props.theme.themeProp('box-shadow', "0px 3px 6px ".concat(polished.rgba(props.theme.getColor('black'), 0.7)), "0px 3px 6px ".concat(props.theme.getColor('black'))) : null;
29
+ }, function (props) {
30
+ return "".concat(props.actionWidthHeight[0] - 15, "px");
31
+ }, function (props) {
32
+ return "".concat(props.actionWidthHeight[1] - 15, "px");
30
33
  });
31
34
 
32
- var ActionButton = React__default['default'].forwardRef(function ActionButton(_ref, forwardedRef) {
35
+ var _excluded = ["icon", "disabled", "active", "onClick", "actionWidthHeight"];
36
+ var ActionButton = React__default["default"].forwardRef(function ActionButton(_ref, forwardedRef) {
33
37
  var icon = _ref.icon,
34
- disabled = _ref.disabled,
35
- active = _ref.active,
36
- onClick = _ref.onClick,
37
- buttonWidthHeight = _ref.buttonWidthHeight,
38
- props = defaultTheme._objectWithoutProperties(_ref, ["icon", "disabled", "active", "onClick", "buttonWidthHeight"]);
39
-
40
- return React__default['default'].createElement(ActionButton$1, defaultTheme._extends({
38
+ disabled = _ref.disabled,
39
+ active = _ref.active,
40
+ onClick = _ref.onClick,
41
+ actionWidthHeight = _ref.actionWidthHeight,
42
+ props = defaultTheme._objectWithoutProperties(_ref, _excluded);
43
+ return React__default["default"].createElement(ActionButton$1, defaultTheme._extends({
41
44
  ref: forwardedRef,
42
45
  disabled: disabled,
43
46
  active: active,
44
47
  onClick: onClick,
45
- buttonWidthHeight: buttonWidthHeight
48
+ actionWidthHeight: actionWidthHeight
46
49
  }, props), icon);
47
50
  });
48
51
  ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -51,11 +54,11 @@ ActionButton.propTypes = process.env.NODE_ENV !== "production" ? {
51
54
  active: defaultTheme.PropTypes.bool,
52
55
  onClick: defaultTheme.PropTypes.func,
53
56
  backgroundColors: defaultTheme.PropTypes.arrayOf(defaultTheme.PropTypes.string),
54
- buttonWidthHeight: defaultTheme.PropTypes.array
57
+ actionWidthHeight: defaultTheme.PropTypes.array
55
58
  } : {};
56
59
  ActionButton.defaultProps = {
57
60
  onClick: function onClick() {},
58
- buttonWidthHeight: [40, 40]
61
+ actionWidthHeight: [40, 40]
59
62
  };
60
63
 
61
64
  exports.ActionButton = ActionButton;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var defaultTheme = require('./defaultTheme-ea44e34a.js');
3
+ var defaultTheme = require('./defaultTheme-24ea5c47.js');
4
4
  var React = require('react');
5
5
  var styled = require('styled-components');
6
6
  var lodash = require('lodash');
@@ -11,9 +11,8 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
11
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
12
12
 
13
13
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
14
- var Alert$1 = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject || (_templateObject = defaultTheme._taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ", ";\n width: ", ";\n box-sizing: border-box;\n\n ", "\n\n ", "\n \n ", "\n \n text-align: ", ";\n"])), function (props) {
14
+ var Alert$1 = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject || (_templateObject = defaultTheme._taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ", ";\n width: ", ";\n box-sizing: border-box;\n\n ", "\n\n ", "\n \n ", "\n \n text-align: ", ";\n"])), function (props) {
15
15
  var _props$verticalPaddin, _props$horizontalPadd;
16
-
17
16
  var verticalPadding = (_props$verticalPaddin = props.verticalPadding) !== null && _props$verticalPaddin !== void 0 ? _props$verticalPaddin : 17;
18
17
  var horizontalPadding = (_props$horizontalPadd = props.horizontalPadding) !== null && _props$horizontalPadd !== void 0 ? _props$horizontalPadd : 30;
19
18
  return "".concat(verticalPadding, "px ").concat(horizontalPadding, "px");
@@ -28,7 +27,7 @@ var Alert$1 = styled__default['default'].div.attrs(defaultTheme.applyDefaultThem
28
27
  }, function (props) {
29
28
  return props.align === 'center' ? 'center' : 'left';
30
29
  });
31
- var AlertRender = styled__default['default'].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject5 || (_templateObject5 = defaultTheme._taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n word-break: break-word;\n ", "\n ", "\n ", ";\n\n svg {\n width: 12px;\n height: 12px;\n }\n\n span {\n flex: 1;\n padding-left: 5px;\n ", ";\n }\n"])), function (props) {
30
+ var AlertRender = styled__default["default"].div.attrs(defaultTheme.applyDefaultTheme)(_templateObject5 || (_templateObject5 = defaultTheme._taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n word-break: break-word;\n ", "\n ", "\n ", ";\n\n svg {\n width: 12px;\n height: 12px;\n }\n\n span {\n flex: 1;\n padding-left: 5px;\n ", ";\n }\n"])), function (props) {
32
31
  return props.lineHeight ? "line-height: ".concat(props.lineHeight, "px;") : null;
33
32
  }, function (props) {
34
33
  return props.fontSize ? "font-size: ".concat(props.fontSize, "px;") : null;
@@ -38,25 +37,24 @@ var AlertRender = styled__default['default'].div.attrs(defaultTheme.applyDefault
38
37
  return props.lineClamp ? styled.css(_templateObject6 || (_templateObject6 = defaultTheme._taggedTemplateLiteral(["\n display: -webkit-box;\n -webkit-line-clamp: ", ";\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n "])), props.lineClamp) : null;
39
38
  });
40
39
 
41
- var Alert = React__default['default'].forwardRef(function Alert(_ref, forwardedRef) {
40
+ var _excluded = ["warning", "error", "type", "alertMessage", "align", "icon", "fontSize", "lineHeight", "lineClamp", "verticalPadding", "horizontalPadding", "width"];
41
+ var Alert = React__default["default"].forwardRef(function Alert(_ref, forwardedRef) {
42
42
  var warning = _ref.warning,
43
- error = _ref.error,
44
- type = _ref.type,
45
- alertMessage = _ref.alertMessage,
46
- align = _ref.align,
47
- icon = _ref.icon,
48
- fontSize = _ref.fontSize,
49
- lineHeight = _ref.lineHeight,
50
- lineClamp = _ref.lineClamp,
51
- verticalPadding = _ref.verticalPadding,
52
- horizontalPadding = _ref.horizontalPadding,
53
- width = _ref.width,
54
- props = defaultTheme._objectWithoutProperties(_ref, ["warning", "error", "type", "alertMessage", "align", "icon", "fontSize", "lineHeight", "lineClamp", "verticalPadding", "horizontalPadding", "width"]);
55
-
43
+ error = _ref.error,
44
+ type = _ref.type,
45
+ alertMessage = _ref.alertMessage,
46
+ align = _ref.align,
47
+ icon = _ref.icon,
48
+ fontSize = _ref.fontSize,
49
+ lineHeight = _ref.lineHeight,
50
+ lineClamp = _ref.lineClamp,
51
+ verticalPadding = _ref.verticalPadding,
52
+ horizontalPadding = _ref.horizontalPadding,
53
+ width = _ref.width,
54
+ props = defaultTheme._objectWithoutProperties(_ref, _excluded);
56
55
  var isWarning = false;
57
56
  var isError = false;
58
57
  var isInfo = true;
59
-
60
58
  if (!lodash.isEmpty(type)) {
61
59
  if (type === 'warning') {
62
60
  isWarning = true;
@@ -68,13 +66,11 @@ var Alert = React__default['default'].forwardRef(function Alert(_ref, forwardedR
68
66
  } else {
69
67
  isWarning = warning;
70
68
  isError = error;
71
-
72
69
  if (isWarning || isError) {
73
70
  isInfo = false;
74
71
  }
75
72
  }
76
-
77
- return React__default['default'].createElement(Alert$1, defaultTheme._extends({
73
+ return React__default["default"].createElement(Alert$1, defaultTheme._extends({
78
74
  ref: forwardedRef,
79
75
  alertMessage: alertMessage,
80
76
  warning: isWarning,
@@ -84,11 +80,11 @@ var Alert = React__default['default'].forwardRef(function Alert(_ref, forwardedR
84
80
  verticalPadding: verticalPadding,
85
81
  horizontalPadding: horizontalPadding,
86
82
  width: width
87
- }, props), React__default['default'].createElement(AlertRender, {
83
+ }, props), React__default["default"].createElement(AlertRender, {
88
84
  fontSize: fontSize,
89
85
  lineHeight: lineHeight,
90
86
  lineClamp: lineClamp
91
- }, icon, " ", React__default['default'].createElement("span", null, alertMessage)));
87
+ }, icon, " ", React__default["default"].createElement("span", null, alertMessage)));
92
88
  });
93
89
  Alert.propTypes = process.env.NODE_ENV !== "production" ? {
94
90
  warning: defaultTheme.PropTypes.bool,