@homecode/ui 4.28.1 → 4.28.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.
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
var _path, _path2;
|
|
4
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
4
|
var SvgBrain = function SvgBrain(props) {
|
|
6
5
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
-
width: 604,
|
|
9
|
-
height: 618.667,
|
|
10
7
|
fill: "currentColor",
|
|
11
|
-
viewBox: "0 0
|
|
12
|
-
}, props),
|
|
13
|
-
d: "
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
viewBox: "0 0 24 24"
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
d: "M9.108.189c-.767.246-1.4.842-1.64 1.543l-.133.394-.336-.022c-1.155-.09-2.317.611-2.831 1.7-.187.402-.239.595-.254 1.124l-.03.641-.365.284c-.67.506-1.17 1.468-1.296 2.496-.082.678.171 1.617.633 2.362.09.142.082.18-.142.366-.931.775-1.497 1.982-1.497 3.16 0 1.304.775 2.734 1.863 3.427.365.239.372.246.372.626.008 1.245.813 2.527 1.945 3.078.261.127.537.254.604.276s.216.223.32.447a3.22 3.22 0 0 0 3.168 1.81c.886-.074 1.721-.506 2.183-1.132.127-.179.253-.328.276-.328.022-.007.112.112.201.254.238.365.842.82 1.341 1.006 1.58.596 3.421-.134 4.054-1.595.157-.365.217-.425.507-.53 1.312-.446 2.392-1.937 2.392-3.286v-.395l.41-.275a4.3 4.3 0 0 0 1.379-1.565c.79-1.603.484-3.428-.783-4.703-.484-.484-.521-.544-.424-.67.06-.075.208-.35.335-.611.179-.388.231-.597.26-1.156.06-1.252-.223-2.004-1.08-2.869l-.551-.551-.015-.604c-.022-.805-.306-1.416-.947-2.004-.566-.53-1.095-.738-1.892-.76l-.59-.015-.111-.328c-.224-.671-.7-1.178-1.416-1.506-.276-.126-.492-.156-1.02-.164-.62 0-.709.023-1.141.254-.253.141-.566.372-.693.514l-.231.26-.216-.267c-.12-.15-.44-.373-.708-.507-.582-.29-1.342-.358-1.9-.18m1.408.97c.35.149.589.372.782.745.135.253.164.462.187 1.356l.03 1.066h-.373c-.306 0-.388-.03-.425-.142-.074-.23-.596-.663-.931-.76-.246-.074-.38-.074-.656 0-.7.186-1.058.649-1.058 1.364 0 .797.588 1.364 1.393 1.356.47-.007.798-.193 1.103-.603.209-.291.253-.313.581-.313l.35-.008v2.46H8.7l-.231-.321c-.254-.358-.641-.574-1.126-.633-.313-.038-.328-.053-.656-.612-.178-.32-.387-.626-.454-.685-.067-.052-.388-.112-.76-.134l-.641-.038.015-.387c.03-.678.447-1.304 1.088-1.632.358-.186 1.013-.216 1.49-.067.462.141.7.082.753-.209.015-.09.067-.365.112-.61.149-.798.73-1.305 1.52-1.305.238 0 .551.052.708.112m4.173 0c.35.149.589.372.768.723.223.432.186.663-.142.886-.283.194-.76.828-.76.999 0 .052.067.179.157.29.238.299.454.254.827-.186.417-.499.842-.745 1.378-.79.56-.052.962.06 1.387.388.678.522.939 1.513.588 2.288-.134.313-.633.88-.767.88-.038 0-.12.081-.187.185-.104.157-.104.224-.03.41.202.485.709.343 1.35-.357.365-.395.372-.403.55-.284.277.18.679.843.828 1.342.209.745.052 1.624-.417 2.28-.127.186-.187.209-.298.15-.075-.045-.261-.075-.403-.075-.201 0-.298.044-.387.193-.216.328-.075.544.506.775.992.403 1.64 1.074 1.93 2.005.47 1.513-.245 3.145-1.684 3.853-.424.209-.491.216-1.46.216-1.11 0-1.26.045-1.26.41 0 .112.06.253.134.32.202.187.94.298 1.61.246l.589-.044-.045.365c-.082.685-.536 1.386-1.155 1.788-.551.35-1.237.5-1.856.395-.626-.104-.842-.007-.842.395 0 .313.194.462.686.53.194.03.358.074.358.104 0 .156-.671.79-1.006.939-.47.223-1.245.238-1.781.052-.5-.179-1.029-.67-1.245-1.155l-.179-.395-.022-3.69c-.023-4.023-.015-3.949-.447-3.949-.373 0-.462.179-.462.91v.655h-1.454l-.275-.484-.276-.492.142-.239c.283-.462.141-1.34-.269-1.699a1.47 1.47 0 0 0-.916-.365c-.291 0-.298 0-.671-.663-.209-.365-.432-.686-.5-.708-.066-.022-.849-.045-1.743-.045H3.907l-.187-.246c-.395-.521-.529-.931-.529-1.654 0-.559.038-.738.194-1.08.224-.485.566-.895.924-1.118.209-.127.35-.15.827-.135l.582.023.253.432.253.44-.156.357c-.194.447-.194.76-.015 1.155.462 1.029 1.81 1.133 2.437.187l.201-.298h2.81v.76c0 .596.022.782.126.894.15.164.455.171.634.007.126-.111.134-.335.134-3.912 0-2.489.03-3.905.082-4.114.104-.417.462-.85.842-1.02.373-.172.999-.18 1.371-.03M9.742 4.444c.067.06.12.209.12.328 0 .268-.18.447-.448.447a.48.48 0 0 1-.447-.447c0-.373.514-.589.775-.328M7.64 7.805c.291.26.082.768-.32.768-.26 0-.44-.18-.44-.425a.45.45 0 0 1 .76-.343m-.58 4.084.282.484-.156.32c-.432.888.119 1.894 1.08 1.976l.41.037.38.648c.224.38.455.693.56.738.096.045.558.082 1.028.082h.857v2.37c0 2.6-.038 2.884-.448 3.48-.588.857-1.78 1.2-2.742.782-.53-.23-1.066-.82-1.237-1.363-.075-.231-.171-.447-.224-.492s-.313-.15-.58-.231c-1.052-.32-1.782-1.222-1.864-2.28l-.022-.366 1.542-.022 1.543-.015.29.5.291.499-.126.223a1.43 1.43 0 0 0 .089 1.558c.328.462 1.185.648 1.751.38.537-.261.872-1.021.708-1.588-.179-.588-.767-1.043-1.356-1.05-.246 0-.276-.03-.67-.693l-.41-.686-2.05-.037c-2.355-.045-2.266-.015-3.003-.82-.38-.41-.619-.857-.768-1.453-.045-.187-.045-.187.447-.187.462 0 .492.008.596.217.254.477.917.82 1.409.708.857-.18 1.356-.895 1.177-1.677-.283-1.252-1.997-1.483-2.586-.358-.104.201-.134.216-.588.216-.269 0-.485-.03-.485-.06 0-.037.052-.23.112-.44.164-.558.656-1.244 1.14-1.586l.41-.299h2.929zm1.639 1.088c.23.186.253.455.044.663-.179.179-.357.186-.574.037-.29-.2-.253-.648.068-.782.238-.09.238-.09.462.082m-3.89.939c.283.253.081.767-.299.767a.451.451 0 0 1-.335-.76c.15-.164.455-.171.633-.007m4.643 5.73c.187.187.12.56-.126.701-.187.097-.231.097-.41 0a.435.435 0 0 1 .208-.82c.112 0 .261.053.328.12",
|
|
11
|
+
style: {
|
|
12
|
+
strokeWidth: 0.0518715
|
|
13
|
+
}
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M13.267 5.13c-.418.462.387 1.2 1.453 1.326.723.082 1.826-.372 1.997-.834.164-.433-.268-.775-.663-.53-.634.395-.775.44-1.207.41-.343-.022-.507-.082-.768-.268-.373-.268-.633-.305-.812-.104M16.5 9.057c-.12.104-.32.388-.432.619-.172.357-.209.521-.209 1.02 0 .5.037.664.209 1.022.223.454.574.804.805.804.2 0 .44-.26.44-.477 0-.104-.083-.283-.187-.402a1.34 1.34 0 0 1-.335-.946c0-.395.097-.656.335-.947.224-.268.239-.529.037-.73-.2-.201-.387-.186-.663.037m-4.874 2.63c-.164.18-.156.485.008.634.298.268.76.067.76-.335 0-.38-.514-.581-.768-.298m3.779 3.696c-.73.335-1.2 1.148-1.133 1.953.037.462.208.7.507.7.283 0 .462-.224.447-.574a5.45 5.45 0 0 1-.008-.484c.008-.231.388-.7.626-.775.239-.067.5-.328.5-.492s-.32-.507-.463-.507c-.052 0-.268.082-.476.18",
|
|
16
|
+
style: {
|
|
17
|
+
strokeWidth: 0.0518715
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
17
20
|
};
|
|
18
21
|
|
|
19
22
|
export { SvgBrain as default };
|
|
@@ -492,9 +492,9 @@ class Select extends Component {
|
|
|
492
492
|
return (jsxs("div", { children: [jsxs(Button, { className: classes, variant: "default", ...props, style: { clipPath: labelClipPath }, title: title?.join?.(', '), children: [jsx("div", { className: cn(S.triggerButtonLabel, hasSelected && S.hasSelected), children: displayLabel }), triggerArrow] }), jsx(Label, { size: size, isOnTop: hasSelected, isError: isError, onClipPathChange: this.onLabelClipPathChange, children: this.getFieldLabel(label) })] }));
|
|
493
493
|
}
|
|
494
494
|
renderTriggerArrow() {
|
|
495
|
-
const { size, inputProps } = this.props;
|
|
495
|
+
const { size, inputProps, disableTriggerArrow } = this.props;
|
|
496
496
|
const { isOpen, searchVal } = this.store;
|
|
497
|
-
if (inputProps?.hasClear && searchVal)
|
|
497
|
+
if (disableTriggerArrow && inputProps?.hasClear && searchVal)
|
|
498
498
|
return null;
|
|
499
499
|
return (jsx(Icon, { type: "chevronDown", className: cn(S.triggerArrow, isOpen && S.isOpen), size: size }));
|
|
500
500
|
}
|
|
@@ -17,7 +17,7 @@ import useEvent from '../../hooks/useEvent.js';
|
|
|
17
17
|
import S from './Select.styl.js';
|
|
18
18
|
|
|
19
19
|
function Select2(props) {
|
|
20
|
-
const { className, value, onChange, onSearchChange, inputProps, popupProps, size = 'm', round, optionClassName, additionalOptions = [], options, variant, label, error, blur, disabled, trigger, required, hideRequiredStar, isSearchable, presets = [], selectAllButton, clearButton, showSelectedCount, disableLabel, } = props;
|
|
20
|
+
const { className, value, onChange, onSearchChange, disableTriggerArrow, inputProps, popupProps, size = 'm', round, optionClassName, additionalOptions = [], options, variant, label, error, blur, disabled, trigger, required, hideRequiredStar, isSearchable, presets = [], selectAllButton, clearButton, showSelectedCount, disableLabel, } = props;
|
|
21
21
|
const isMultiple$1 = isMultiple(value);
|
|
22
22
|
const closeOnSelect = props.closeOnSelect ?? !isMultiple$1;
|
|
23
23
|
const contentRef = useRef(null);
|
|
@@ -174,7 +174,7 @@ function Select2(props) {
|
|
|
174
174
|
}, [isMultiple$1, value, ids]);
|
|
175
175
|
// console.log('selectedLabel::', selectedLabel);
|
|
176
176
|
const triggerArrow = useMemo(() => {
|
|
177
|
-
if (inputProps?.hasClear && searchVal)
|
|
177
|
+
if (disableTriggerArrow && inputProps?.hasClear && searchVal)
|
|
178
178
|
return null;
|
|
179
179
|
return (jsx(Icon, { type: "chevronDown", className: cn(S.triggerArrow, isOpen && S.isOpen), size: size }));
|
|
180
180
|
}, [isOpen, searchVal]);
|