@kaiheila/ui-components 0.1.18 → 0.1.20
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/dist/main.css +17 -2
- package/dist/ui-components.js +8 -10
- package/package.json +1 -1
package/dist/main.css
CHANGED
|
@@ -784,6 +784,18 @@ textarea {
|
|
|
784
784
|
.number-input {
|
|
785
785
|
display: flex;
|
|
786
786
|
}
|
|
787
|
+
.number-input.sm input {
|
|
788
|
+
height: 24px;
|
|
789
|
+
}
|
|
790
|
+
.number-input.sm .xy-iconfont {
|
|
791
|
+
width: 24px;
|
|
792
|
+
height: 24px;
|
|
793
|
+
border-radius: 6px;
|
|
794
|
+
}
|
|
795
|
+
.number-input.sm .xy-iconfont svg {
|
|
796
|
+
width: 12px;
|
|
797
|
+
height: 12px;
|
|
798
|
+
}
|
|
787
799
|
.number-input input {
|
|
788
800
|
color: var(--text-color);
|
|
789
801
|
border: none;
|
|
@@ -802,12 +814,15 @@ textarea {
|
|
|
802
814
|
width: 32px;
|
|
803
815
|
height: 32px;
|
|
804
816
|
border-radius: 8px;
|
|
805
|
-
|
|
806
|
-
border: 1px solid var(--text-tip-color);
|
|
817
|
+
border: 1px solid var(--color-controls);
|
|
807
818
|
align-items: center;
|
|
808
819
|
justify-content: center;
|
|
809
820
|
cursor: pointer;
|
|
810
821
|
}
|
|
822
|
+
.number-input .xy-iconfont svg {
|
|
823
|
+
width: 16px;
|
|
824
|
+
height: 16px;
|
|
825
|
+
}
|
|
811
826
|
.number-input .xy-iconfont:not(.disabled):hover {
|
|
812
827
|
background: var(--menu-hover);
|
|
813
828
|
}
|
package/dist/ui-components.js
CHANGED
|
@@ -2803,7 +2803,7 @@ module.exports = require("react-dom");
|
|
|
2803
2803
|
/* 6 */
|
|
2804
2804
|
/***/ (function(module) {
|
|
2805
2805
|
|
|
2806
|
-
module.exports = JSON.parse("{\"name\":\"@kaiheila/ui-components\",\"version\":\"0.1.
|
|
2806
|
+
module.exports = JSON.parse("{\"name\":\"@kaiheila/ui-components\",\"version\":\"0.1.20\",\"description\":\"开黑啦 UI Components\",\"main\":\"dist/ui-components.js\",\"scripts\":{\"build\":\"webpack\",\"demo\":\"webpack-dev-server --config webpack.config.demo.js\"},\"keywords\":[\"UI\",\"Components\"],\"author\":\"yangchuan\",\"license\":\"ISC\",\"files\":[\"dist\"],\"devDependencies\":{\"@babel/core\":\"^7.15.5\",\"@babel/preset-env\":\"^7.15.6\",\"@babel/preset-react\":\"^7.14.5\",\"@webpack-cli/serve\":\"^1.6.0\",\"babel-loader\":\"^8.2.2\",\"classnames\":\"^2.3.1\",\"css-loader\":\"^2.1.1\",\"html-webpack-plugin\":\"^4.5.2\",\"less\":\"^4.1.2\",\"less-loader\":\"^5.0.0\",\"mini-css-extract-plugin\":\"^0.8.0\",\"prop-types\":\"^15.7.2\",\"react\":\"^16.9.0\",\"react-dom\":\"^16.9.0\",\"react-tooltip\":\"^4.2.21\",\"style-loader\":\"^1.0.0\",\"url-loader\":\"^2.1.0\",\"webpack\":\"^4.40.2\",\"webpack-cli\":\"^3.3.1\",\"webpack-dev-server\":\"^3.2.1\"},\"peerDependencies\":{\"react\":\"^16.9.0\",\"react-dom\":\"^16.9.0\"},\"browserslist\":{\"production\":[\">0.2%\",\"not dead\",\"not op_mini all\"],\"development\":[\"last 1 chrome version\",\"last 1 firefox version\",\"last 1 safari version\"]}}");
|
|
2807
2807
|
|
|
2808
2808
|
/***/ }),
|
|
2809
2809
|
/* 7 */
|
|
@@ -4453,10 +4453,12 @@ var number_input_NumberInput = /*#__PURE__*/function (_Component) {
|
|
|
4453
4453
|
step = _this$props2$step === void 0 ? 1 : _this$props2$step,
|
|
4454
4454
|
min = _this$props2.min,
|
|
4455
4455
|
max = _this$props2.max,
|
|
4456
|
-
maxLength = _this$props2.maxLength
|
|
4456
|
+
maxLength = _this$props2.maxLength,
|
|
4457
|
+
_this$props2$size = _this$props2.size,
|
|
4458
|
+
size = _this$props2$size === void 0 ? '' : _this$props2$size;
|
|
4457
4459
|
console.log('console log to chrome min', min);
|
|
4458
4460
|
return /*#__PURE__*/external_react_default.a.createElement("div", {
|
|
4459
|
-
className: "number-input"
|
|
4461
|
+
className: external_classnames_default()("number-input", size)
|
|
4460
4462
|
}, /*#__PURE__*/external_react_default.a.createElement("span", {
|
|
4461
4463
|
className: external_classnames_default()('xy-iconfont', {
|
|
4462
4464
|
disabled: inputValue <= min
|
|
@@ -4465,8 +4467,6 @@ var number_input_NumberInput = /*#__PURE__*/function (_Component) {
|
|
|
4465
4467
|
return _this2.onConfirm(inputValue - step);
|
|
4466
4468
|
}
|
|
4467
4469
|
}, /*#__PURE__*/external_react_default.a.createElement("svg", {
|
|
4468
|
-
width: "16px",
|
|
4469
|
-
height: "16px",
|
|
4470
4470
|
viewBox: "0 0 16 16",
|
|
4471
4471
|
version: "1.1"
|
|
4472
4472
|
}, /*#__PURE__*/external_react_default.a.createElement("g", {
|
|
@@ -4522,8 +4522,6 @@ var number_input_NumberInput = /*#__PURE__*/function (_Component) {
|
|
|
4522
4522
|
return _this2.onConfirm(inputValue + step);
|
|
4523
4523
|
}
|
|
4524
4524
|
}, /*#__PURE__*/external_react_default.a.createElement("svg", {
|
|
4525
|
-
width: "16px",
|
|
4526
|
-
height: "16px",
|
|
4527
4525
|
viewBox: "0 0 16 16",
|
|
4528
4526
|
version: "1.1"
|
|
4529
4527
|
}, /*#__PURE__*/external_react_default.a.createElement("g", {
|
|
@@ -5670,7 +5668,7 @@ var selector_Selector = /*#__PURE__*/function (_Component) {
|
|
|
5670
5668
|
_this$props$defaultLa = _this$props.defaultLabel,
|
|
5671
5669
|
defaultLabel = _this$props$defaultLa === void 0 ? '请选择' : _this$props$defaultLa;
|
|
5672
5670
|
return (data.find(function (item) {
|
|
5673
|
-
if (item[valueKey]
|
|
5671
|
+
if (item[valueKey] == value) {
|
|
5674
5672
|
return item;
|
|
5675
5673
|
}
|
|
5676
5674
|
}) || {})[labelKey] || defaultLabel;
|
|
@@ -5795,13 +5793,13 @@ var selector_Selector = /*#__PURE__*/function (_Component) {
|
|
|
5795
5793
|
renderSelected = _this$props3.renderSelected;
|
|
5796
5794
|
var label = this.getLabel();
|
|
5797
5795
|
var selectItem = data.find(function (item) {
|
|
5798
|
-
return item[valueKey]
|
|
5796
|
+
return item[valueKey] == currentValue;
|
|
5799
5797
|
});
|
|
5800
5798
|
var list = data.map(function (item) {
|
|
5801
5799
|
var label = item[labelKey];
|
|
5802
5800
|
var value = item[valueKey];
|
|
5803
5801
|
return /*#__PURE__*/external_react_default.a.createElement("li", {
|
|
5804
|
-
className: "".concat(noTheme ? 'noTheme' : '', " selector-option-item").concat(currentValue
|
|
5802
|
+
className: "".concat(noTheme ? 'noTheme' : '', " selector-option-item").concat(currentValue == value ? ' selected' : ''),
|
|
5805
5803
|
onClick: function onClick() {
|
|
5806
5804
|
_this2.select(value);
|
|
5807
5805
|
},
|