wini-web-components 1.7.5 → 1.7.7

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.
@@ -5,6 +5,7 @@ interface CheckboxProps {
5
5
  value?: boolean;
6
6
  checkColor?: string;
7
7
  disabled?: boolean;
8
+ className?: string;
8
9
  style?: CSSProperties;
9
10
  /** default 2.4rem **/
10
11
  size?: number | string;
@@ -50,7 +50,7 @@ var Checkbox = /** @class */ (function (_super) {
50
50
  };
51
51
  Checkbox.prototype.render = function () {
52
52
  var _this = this;
53
- var _a, _b, _c, _d;
53
+ var _a, _b, _c, _d, _e;
54
54
  var convertStyle = {
55
55
  width: (_a = this.props.size) !== null && _a !== void 0 ? _a : '2.4rem',
56
56
  height: (_b = this.props.size) !== null && _b !== void 0 ? _b : '2.4rem',
@@ -64,7 +64,7 @@ var Checkbox = /** @class */ (function (_super) {
64
64
  delete this.props.style.maxHeight;
65
65
  convertStyle = __assign(__assign({}, this.props.style), convertStyle);
66
66
  }
67
- return react_1.default.createElement("label", { id: this.props.id, className: "".concat(checkbox_module_css_1.default['checkbox-container'], " row"), style: convertStyle, "is-null-value": "".concat(this.state.value == undefined), onClick: this.props.onClick },
67
+ return react_1.default.createElement("label", { id: this.props.id, className: "".concat(checkbox_module_css_1.default['checkbox-container'], " row ").concat((_c = this.props.className) !== null && _c !== void 0 ? _c : ''), style: convertStyle, "is-null-value": "".concat(this.state.value == undefined), onClick: this.props.onClick },
68
68
  react_1.default.createElement("input", { type: "checkbox", checked: this.state.value, disabled: this.props.disabled, onChange: function (ev) {
69
69
  ev.stopPropagation();
70
70
  var newValue = !_this.state.value;
@@ -73,8 +73,8 @@ var Checkbox = /** @class */ (function (_super) {
73
73
  _this.props.onChange(newValue);
74
74
  } }),
75
75
  react_1.default.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, this.state.value == undefined ?
76
- react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.79199 9.95298C4.79199 9.69148 5.00398 9.47949 5.26548 9.47949H14.7352C14.9967 9.47949 15.2087 9.69148 15.2087 9.95298C15.2087 10.2145 14.9967 10.4265 14.7352 10.4265H5.26548C5.00398 10.4265 4.79199 10.2145 4.79199 9.95298Z", fill: (_c = this.props.checkColor) !== null && _c !== void 0 ? _c : '#ffffff' }) :
77
- react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.07 6.49317C15.2549 6.67808 15.2549 6.97787 15.07 7.16278L8.91467 13.3181C8.72977 13.503 8.42997 13.503 8.24507 13.3181L4.93067 10.0037C4.74577 9.81878 4.74577 9.51899 4.93067 9.33408C5.11558 9.14917 5.41537 9.14917 5.60028 9.33408L8.57987 12.3137L14.4004 6.49317C14.5853 6.30827 14.8851 6.30827 15.07 6.49317Z", fill: (_d = this.props.checkColor) !== null && _d !== void 0 ? _d : '#ffffff' })));
76
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.79199 9.95298C4.79199 9.69148 5.00398 9.47949 5.26548 9.47949H14.7352C14.9967 9.47949 15.2087 9.69148 15.2087 9.95298C15.2087 10.2145 14.9967 10.4265 14.7352 10.4265H5.26548C5.00398 10.4265 4.79199 10.2145 4.79199 9.95298Z", fill: (_d = this.props.checkColor) !== null && _d !== void 0 ? _d : '#ffffff' }) :
77
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.07 6.49317C15.2549 6.67808 15.2549 6.97787 15.07 7.16278L8.91467 13.3181C8.72977 13.503 8.42997 13.503 8.24507 13.3181L4.93067 10.0037C4.74577 9.81878 4.74577 9.51899 4.93067 9.33408C5.11558 9.14917 5.41537 9.14917 5.60028 9.33408L8.57987 12.3137L14.4004 6.49317C14.5853 6.30827 14.8851 6.30827 15.07 6.49317Z", fill: (_e = this.props.checkColor) !== null && _e !== void 0 ? _e : '#ffffff' })));
78
78
  };
79
79
  return Checkbox;
80
80
  }(react_1.default.Component));
@@ -20,6 +20,7 @@ interface Select1Props {
20
20
  handleSearch?: (e: string) => Promise<Array<OptionsItem>>;
21
21
  readOnly?: boolean;
22
22
  popupClassName?: string;
23
+ prefix?: ReactNode;
23
24
  }
24
25
  interface Select1State {
25
26
  value?: string | number;
@@ -286,6 +286,7 @@ var Select1 = /** @class */ (function (_super) {
286
286
  (_c = _this.inputRef.current) === null || _c === void 0 ? void 0 : _c.focus();
287
287
  }
288
288
  } },
289
+ this.props.prefix,
289
290
  (!_value || typeof _value.name === "string" || typeof _value.name === "number") ? react_1.default.createElement("input", { ref: this.inputRef, readOnly: this.props.readOnly, onChange: this.search, placeholder: this.props.placeholder, onKeyDown: this.onKeyDown, onBlur: function (ev) {
290
291
  if (_this.state.onSelect && !_this.props.readOnly)
291
292
  ev.target.focus();
@@ -293,7 +294,7 @@ var Select1 = /** @class */ (function (_super) {
293
294
  _this.setState(__assign(__assign({}, _this.state), { isOpen: false, onSelect: null }));
294
295
  } }) : _value.name,
295
296
  react_1.default.createElement("div", { ref: function (iconRef) {
296
- if ((iconRef === null || iconRef === void 0 ? void 0 : iconRef.parentElement) && iconRef.parentElement.getBoundingClientRect().width < 120)
297
+ if ((iconRef === null || iconRef === void 0 ? void 0 : iconRef.parentElement) && iconRef.parentElement.getBoundingClientRect().width < 100)
297
298
  iconRef.style.display = "none";
298
299
  }, className: 'row' },
299
300
  react_1.default.createElement(react_fontawesome_1.FontAwesomeIcon, { icon: this.state.isOpen ? free_solid_svg_icons_1.faChevronUp : free_solid_svg_icons_1.faChevronDown, style: { fontSize: '1.1rem', color: "var(--neutral-text-subtitle-color)" } })),
@@ -4,6 +4,7 @@ interface SwitchProps {
4
4
  onChange?: (value: boolean) => void;
5
5
  value?: boolean;
6
6
  disabled?: boolean;
7
+ className?: string;
7
8
  style?: CSSProperties;
8
9
  size?: number | string;
9
10
  dotColor?: string;
@@ -50,7 +50,7 @@ var Switch = /** @class */ (function (_super) {
50
50
  };
51
51
  Switch.prototype.render = function () {
52
52
  var _this = this;
53
- var _a, _b, _c, _d;
53
+ var _a, _b, _c, _d, _e;
54
54
  var propStyle = {
55
55
  '--off-bg': (_a = this.props.offBackground) !== null && _a !== void 0 ? _a : 'var(--neutral-main-background-color)',
56
56
  '--on-bg': (_b = this.props.onBackground) !== null && _b !== void 0 ? _b : 'var(--infor-main-color)',
@@ -67,7 +67,7 @@ var Switch = /** @class */ (function (_super) {
67
67
  delete this.props.style.maxHeight;
68
68
  convertStyle = __assign(__assign({}, this.props.style), convertStyle);
69
69
  }
70
- return react_1.default.createElement("label", { id: this.props.id, className: "".concat(switch_module_css_1.default['switch-container'], " row"), style: convertStyle },
70
+ return react_1.default.createElement("label", { id: this.props.id, className: "".concat(switch_module_css_1.default['switch-container'], " row ").concat((_e = this.props.className) !== null && _e !== void 0 ? _e : ''), style: convertStyle },
71
71
  react_1.default.createElement("input", { type: "checkbox", checked: this.state.value, name: this.props.name, disabled: this.props.disabled, onChange: function () {
72
72
  var newValue = !_this.state.value;
73
73
  _this.setState({ value: newValue });