@pinnacle0/web-ui 0.6.1 → 0.6.3
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.
|
@@ -4,8 +4,8 @@ import "./index.less";
|
|
|
4
4
|
export class DarkOverlay extends React.PureComponent {
|
|
5
5
|
static displayName = "DarkOverlay";
|
|
6
6
|
render() {
|
|
7
|
-
const { children, className, style } = this.props;
|
|
8
|
-
return ReactDOM.createPortal(React.createElement("div", { className: `g-dark-overlay ${className || ""}`, style: style }, children), document.body);
|
|
7
|
+
const { children, className, style, onClick } = this.props;
|
|
8
|
+
return ReactDOM.createPortal(React.createElement("div", { className: `g-dark-overlay ${className || ""}`, style: style, onClick: e => e.target === e.currentTarget && onClick?.() }, children), document.body);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/DarkOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/DarkOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,cAAc,CAAC;AAStB,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,aAAoB;IACvD,MAAM,CAAC,WAAW,GAAG,aAAa,CAAC;IAEnC,MAAM;QACF,MAAM,EAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACzD,OAAO,QAAQ,CAAC,YAAY,CACxB,6BAAK,SAAS,EAAE,kBAAkB,SAAS,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,aAAa,IAAI,OAAO,EAAE,EAAE,IACvH,QAAQ,CACP,EACN,QAAQ,CAAC,IAAI,CAChB,CAAC;IACN,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { ControlledFormValue } from "../internal/type";
|
|
3
3
|
interface Props<Enum extends string | number> extends ControlledFormValue<Enum[]> {
|
|
4
4
|
list: Enum[];
|
|
5
|
+
maxShownTagCount?: number;
|
|
5
6
|
translator?: (enumValue: Enum) => string;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
style?: React.CSSProperties;
|
|
@@ -10,9 +10,9 @@ export class MultipleEnumSelect extends React.PureComponent {
|
|
|
10
10
|
}));
|
|
11
11
|
};
|
|
12
12
|
render() {
|
|
13
|
-
const { disabled, value, onChange, style } = this.props;
|
|
13
|
+
const { disabled, value, onChange, maxShownTagCount, style } = this.props;
|
|
14
14
|
// antd: using options prop will get better perf than jsx definition
|
|
15
|
-
return React.createElement(Select, { mode: "multiple", value: value, onChange: onChange, disabled: disabled, style: style, options: this.getSelectOptions(), optionFilterProp: "label" });
|
|
15
|
+
return React.createElement(Select, { mode: "multiple", value: value, maxTagCount: maxShownTagCount, onChange: onChange, disabled: disabled, style: style, options: this.getSelectOptions(), optionFilterProp: "label" });
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=MultipleEnumSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultipleEnumSelect.js","sourceRoot":"","sources":["../../src/core/MultipleEnumSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"MultipleEnumSelect.js","sourceRoot":"","sources":["../../src/core/MultipleEnumSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAWhC,MAAM,OAAO,kBAAiD,SAAQ,KAAK,CAAC,aAA0B;IAClG,MAAM,CAAC,WAAW,GAAG,oBAAoB,CAAC;IAE1C,gBAAgB,GAAG,GAAG,EAAE;QACpB,MAAM,EAAC,IAAI,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACtB,KAAK;YACL,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE;SAC3D,CAAC,CAAC,CAAC;IACR,CAAC,CAAC;IAEF,MAAM;QACF,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACxE,oEAAoE;QACpE,OAAO,oBAAC,MAAM,IAAC,IAAI,EAAC,UAAU,EAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAAE,gBAAgB,EAAC,OAAO,GAAG,CAAC;IACpM,CAAC"}
|