@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 453 464"
12
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
13
- d: "M175.9 65.5c-10.3 3.3-18.8 11.3-22 20.7l-1.8 5.3-4.5-.3c-15.5-1.2-31.1 8.2-38 22.8-2.5 5.4-3.2 8-3.4 15.1l-.4 8.6-4.9 3.8c-9 6.8-15.7 19.7-17.4 33.5-1.1 9.1 2.3 21.7 8.5 31.7 1.2 1.9 1.1 2.4-1.9 4.9C77.6 222 70 238.2 70 254c0 17.5 10.4 36.7 25 46 4.9 3.2 5 3.3 5 8.4.1 16.7 10.9 33.9 26.1 41.3 3.5 1.7 7.2 3.4 8.1 3.7s2.9 3 4.3 6c7.6 16 24.7 25.8 42.5 24.3 11.9-1 23.1-6.8 29.3-15.2 1.7-2.4 3.4-4.4 3.7-4.4.3-.1 1.5 1.5 2.7 3.4 3.2 4.9 11.3 11 18 13.5 21.2 8 45.9-1.8 54.4-21.4 2.1-4.9 2.9-5.7 6.8-7.1 17.6-6 32.1-26 32.1-44.1v-5.3l5.5-3.7c7.3-4.8 14.6-13.1 18.5-21 10.6-21.5 6.5-46-10.5-63.1-6.5-6.5-7-7.3-5.7-9 .8-1 2.8-4.7 4.5-8.2 2.4-5.2 3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 10.3-3.5 0-5.9-2.4-5.9-5.7 0-5.5 6.2-8.3 10.2-4.6m-7.8 54.8 3.8 6.5-2.1 4.3c-5.8 11.9 1.6 25.4 14.5 26.5l5.5.5 5.1 8.7c3 5.1 6.1 9.3 7.5 9.9 1.3.6 7.5 1.1 13.8 1.1H208v31.8c0 34.9-.5 38.7-6 46.7-7.9 11.5-23.9 16.1-36.8 10.5-7.1-3.1-14.3-11-16.6-18.3-1-3.1-2.3-6-3-6.6s-4.2-2-7.8-3.1c-14.1-4.3-23.9-16.4-25-30.6l-.3-4.9 20.7-.3 20.7-.2 3.9 6.7 3.9 6.7-1.7 3c-3.8 6.5-3.3 14.6 1.2 20.9 4.4 6.2 15.9 8.7 23.5 5.1 7.2-3.5 11.7-13.7 9.5-21.3-2.4-7.9-10.3-14-18.2-14.1-3.3 0-3.7-.4-9-9.3l-5.5-9.2-27.5-.5c-31.6-.6-30.4-.2-40.3-11-5.1-5.5-8.3-11.5-10.3-19.5-.6-2.5-.6-2.5 6-2.5 6.2 0 6.6.1 8 2.9 3.4 6.4 12.3 11 18.9 9.5 11.5-2.4 18.2-12 15.8-22.5-3.8-16.8-26.8-19.9-34.7-4.8-1.4 2.7-1.8 2.9-7.9 2.9-3.6 0-6.5-.4-6.5-.8 0-.5.7-3.1 1.5-5.9 2.2-7.5 8.8-16.7 15.3-21.3l5.5-4h39.3zm22 14.6c3.1 2.5 3.4 6.1.6 8.9-2.4 2.4-4.8 2.5-7.7.5-3.9-2.7-3.4-8.7.9-10.5 3.2-1.2 3.2-1.2 6.2 1.1m-52.2 12.6c3.8 3.4 1.1 10.3-4 10.3-5.4 0-8.1-6.2-4.5-10.2 2-2.2 6.1-2.3 8.5-.1m62.3 76.9c2.5 2.5 1.6 7.5-1.7 9.4-2.5 1.3-3.1 1.3-5.5 0-5.4-3-3.4-11 2.8-11 1.5 0 3.5.7 4.4 1.6"
14
- })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
15
- d: "M231.7 131.8c-5.6 6.2 5.2 16.1 19.5 17.8 9.7 1.1 24.5-5 26.8-11.2 2.2-5.8-3.6-10.4-8.9-7.1-8.5 5.3-10.4 5.9-16.2 5.5-4.6-.3-6.8-1.1-10.3-3.6-5-3.6-8.5-4.1-10.9-1.4m43.4 52.7c-1.6 1.4-4.3 5.2-5.8 8.3-2.3 4.8-2.8 7-2.8 13.7s.5 8.9 2.8 13.7c3 6.1 7.7 10.8 10.8 10.8 2.7 0 5.9-3.5 5.9-6.4 0-1.4-1.1-3.8-2.5-5.4-3.2-3.9-4.5-7.4-4.5-12.7s1.3-8.8 4.5-12.7c3-3.6 3.2-7.1.5-9.8s-5.2-2.5-8.9.5m-65.4 35.3c-2.2 2.4-2.1 6.5.1 8.5 4 3.6 10.2.9 10.2-4.5 0-5.1-6.9-7.8-10.3-4m50.7 49.6c-9.8 4.5-16.1 15.4-15.2 26.2.5 6.2 2.8 9.4 6.8 9.4 3.8 0 6.2-3 6-7.7-.1-2.1-.2-5-.1-6.5.1-3.1 5.2-9.4 8.4-10.4 3.2-.9 6.7-4.4 6.7-6.6s-4.3-6.8-6.2-6.8c-.7 0-3.6 1.1-6.4 2.4"
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]);
@@ -56,6 +56,7 @@ export type Props = FormControl<Value> & InheritedInputProps & {
56
56
  round?: boolean;
57
57
  trigger?: ReactNode;
58
58
  triggerProps?: any;
59
+ disableTriggerArrow?: boolean;
59
60
  popupProps?: SelectPopupProps;
60
61
  hideRequiredStar?: boolean;
61
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.28.1",
3
+ "version": "4.28.3",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",