@jetbrains/ring-ui 4.1.22 → 4.1.23
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.
|
@@ -264,6 +264,7 @@ export default class Select extends Component {
|
|
|
264
264
|
disabled: PropTypes.bool,
|
|
265
265
|
hideSelected: PropTypes.bool,
|
|
266
266
|
label: PropTypes.string,
|
|
267
|
+
renderBottomToolbar: PropTypes.func,
|
|
267
268
|
selectedLabel: PropTypes.oneOfType([
|
|
268
269
|
PropTypes.string,
|
|
269
270
|
PropTypes.arrayOf(PropTypes.node),
|
|
@@ -667,9 +668,9 @@ export default class Select extends Component {
|
|
|
667
668
|
};
|
|
668
669
|
|
|
669
670
|
getToolbar() {
|
|
670
|
-
const {hint} = this.props;
|
|
671
|
+
const {hint, renderBottomToolbar} = this.props;
|
|
671
672
|
const {prefix, label, delayed} = this.state.addButton || {};
|
|
672
|
-
const isToolbarHasElements = this.state.addButton || hint;
|
|
673
|
+
const isToolbarHasElements = this.state.addButton || hint || renderBottomToolbar;
|
|
673
674
|
if (!isToolbarHasElements) {
|
|
674
675
|
return null;
|
|
675
676
|
}
|
|
@@ -677,10 +678,11 @@ export default class Select extends Component {
|
|
|
677
678
|
return (
|
|
678
679
|
<div
|
|
679
680
|
className={classNames({
|
|
680
|
-
[styles.toolbar]:
|
|
681
|
+
[styles.toolbar]: Boolean(this.state.addButton || renderBottomToolbar)
|
|
681
682
|
})}
|
|
682
683
|
data-test="ring-select-toolbar"
|
|
683
684
|
>
|
|
685
|
+
{renderBottomToolbar && renderBottomToolbar()}
|
|
684
686
|
{this.state.addButton && (
|
|
685
687
|
<Button
|
|
686
688
|
text
|
package/dist/select/select.js
CHANGED
|
@@ -899,14 +899,15 @@ class Select extends Component {
|
|
|
899
899
|
|
|
900
900
|
getToolbar() {
|
|
901
901
|
const {
|
|
902
|
-
hint
|
|
902
|
+
hint,
|
|
903
|
+
renderBottomToolbar
|
|
903
904
|
} = this.props;
|
|
904
905
|
const {
|
|
905
906
|
prefix,
|
|
906
907
|
label,
|
|
907
908
|
delayed
|
|
908
909
|
} = this.state.addButton || {};
|
|
909
|
-
const isToolbarHasElements = this.state.addButton || hint;
|
|
910
|
+
const isToolbarHasElements = this.state.addButton || hint || renderBottomToolbar;
|
|
910
911
|
|
|
911
912
|
if (!isToolbarHasElements) {
|
|
912
913
|
return null;
|
|
@@ -914,10 +915,10 @@ class Select extends Component {
|
|
|
914
915
|
|
|
915
916
|
return /*#__PURE__*/React.createElement("div", {
|
|
916
917
|
className: classNames({
|
|
917
|
-
[modules_9d0de074.toolbar]:
|
|
918
|
+
[modules_9d0de074.toolbar]: Boolean(this.state.addButton || renderBottomToolbar)
|
|
918
919
|
}),
|
|
919
920
|
"data-test": "ring-select-toolbar"
|
|
920
|
-
}, this.state.addButton && /*#__PURE__*/React.createElement(Button, {
|
|
921
|
+
}, renderBottomToolbar && renderBottomToolbar(), this.state.addButton && /*#__PURE__*/React.createElement(Button, {
|
|
921
922
|
text: true,
|
|
922
923
|
delayed: delayed,
|
|
923
924
|
className: classNames(modules_9d0de074.button, modules_9d0de074.buttonSpaced),
|
|
@@ -1261,6 +1262,7 @@ _defineProperty(Select, "propTypes", {
|
|
|
1261
1262
|
disabled: PropTypes.bool,
|
|
1262
1263
|
hideSelected: PropTypes.bool,
|
|
1263
1264
|
label: PropTypes.string,
|
|
1265
|
+
renderBottomToolbar: PropTypes.func,
|
|
1264
1266
|
selectedLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
1265
1267
|
inputPlaceholder: PropTypes.string,
|
|
1266
1268
|
clear: PropTypes.bool,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.23",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
},
|
|
68
68
|
"readmeFilename": "README.md",
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@babel/cli": "^7.17.
|
|
70
|
+
"@babel/cli": "^7.17.3",
|
|
71
71
|
"@babel/eslint-parser": "^7.17.0",
|
|
72
|
-
"@jetbrains/eslint-config": "^5.3.
|
|
73
|
-
"@jetbrains/generator-ring-ui": "^4.1.
|
|
72
|
+
"@jetbrains/eslint-config": "^5.3.2",
|
|
73
|
+
"@jetbrains/generator-ring-ui": "^4.1.7",
|
|
74
74
|
"@jetbrains/stylelint-config": "^3.0.2",
|
|
75
75
|
"@primer/octicons": "^16.3.1",
|
|
76
76
|
"@rollup/plugin-babel": "^5.3.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@storybook/builder-webpack5": "6.4.19",
|
|
86
86
|
"@storybook/client-api": "6.4.19",
|
|
87
87
|
"@storybook/core": "6.4.19",
|
|
88
|
-
"@storybook/html": "6.4.
|
|
88
|
+
"@storybook/html": "6.4.19",
|
|
89
89
|
"@storybook/manager-webpack5": "^6.4.19",
|
|
90
90
|
"@storybook/source-loader": "6.4.19",
|
|
91
91
|
"@storybook/theming": "6.4.19",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"lerna": "^4.0.0",
|
|
129
129
|
"lint-staged": "^12.3.4",
|
|
130
130
|
"merge-options": "^3.0.4",
|
|
131
|
-
"mocha": "^9.2.
|
|
131
|
+
"mocha": "^9.2.1",
|
|
132
132
|
"pinst": "^3.0.0",
|
|
133
133
|
"puppeteer": "^13.3.2",
|
|
134
134
|
"raw-loader": "^4.0.2",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"react-dom": "^17.0.2",
|
|
137
137
|
"react-test-renderer": "^17.0.2",
|
|
138
138
|
"regenerator-runtime": "^0.13.9",
|
|
139
|
-
"rollup": "^2.67.
|
|
139
|
+
"rollup": "^2.67.3",
|
|
140
140
|
"rollup-plugin-clear": "^2.0.7",
|
|
141
141
|
"rollup-plugin-styles": "^4.0.0",
|
|
142
142
|
"sinon": "^13.0.1",
|
|
@@ -221,5 +221,5 @@
|
|
|
221
221
|
"node": ">=7.4",
|
|
222
222
|
"npm": ">=6.0.0"
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "7c742f3de2e959496ce7b04eb61b6f4d99ffe450"
|
|
225
225
|
}
|