iconsax-react
Version:
Iconsax icon pack for React
188 lines (170 loc) • 9.47 kB
JavaScript
import { _ as _objectWithoutProperties, a as _extends } from './_rollupPluginBabelHelpers-3bc641ae.js';
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
var _excluded = ["variant", "color", "size"];
var Bold = function Bold(_ref) {
var color = _ref.color;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
d: "m21.79 20.76-.72-.72a3.576 3.576 0 0 0-2.99-5.54c-1.98 0-3.58 1.6-3.58 3.58a3.576 3.576 0 0 0 5.54 2.99l.72.72a.728.728 0 0 0 1.03-1.03ZM2.032 14.629c0 .03-.02.07-.02.1a9.494 9.494 0 0 0 4.26 4.26c.03 0 .07-.02.1-.02-.34-1.16-.6-2.35-.79-3.54-1.2-.2-2.39-.46-3.55-.8ZM19.068 6.431a9.5 9.5 0 0 0-4.49-4.49c.36 1.19.66 2.41.86 3.63 1.22.2 2.44.49 3.63.86ZM1.93 6.43c1.2-.36 2.42-.66 3.64-.86.2-1.19.45-2.37.79-3.53-.03 0-.07-.02-.1-.02-1.88.93-3.41 2.5-4.33 4.41ZM13.82 5.36c-.24-1.3-.54-2.6-.97-3.86-.02-.07-.02-.13-.03-.21C12.08 1.11 11.3 1 10.5 1c-.81 0-1.58.11-2.33.3-.01.07 0 .13-.02.21-.42 1.26-.73 2.55-.97 3.85 2.21-.24 4.43-.24 6.64 0ZM5.36 7.18c-1.31.24-2.59.55-3.86.97-.07.02-.13.02-.2.03-.19.74-.3 1.52-.3 2.32 0 .81.11 1.58.3 2.33.07.01.13 0 .21.02 1.26.42 2.55.73 3.86.97-.25-2.21-.25-4.43-.01-6.64ZM19.699 8.18c-.07 0-.13-.01-.21-.03-1.26-.42-2.56-.73-3.86-.97.25 2.21.25 4.43 0 6.63 1.3-.24 2.6-.54 3.86-.97.07-.02.13-.01.21-.02.18-.75.3-1.52.3-2.33 0-.79-.11-1.56-.3-2.31ZM7.18 15.639c.24 1.31.54 2.6.97 3.86.02.07.01.13.02.21.75.18 1.52.29 2.33.29.8 0 1.58-.11 2.32-.3.01-.07.01-.13.03-.21.42-1.26.73-2.55.97-3.86-1.1.12-2.21.21-3.32.21-1.11 0-2.22-.08-3.32-.2ZM6.952 6.952c-.3 2.36-.3 4.74 0 7.11 2.36.3 4.74.3 7.11 0 .3-2.36.3-4.74 0-7.11-2.37-.3-4.75-.3-7.11 0Z",
fill: color
}));
};
var Broken = function Broken(_ref2) {
var color = _ref2.color;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
d: "M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10",
stroke: color,
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/React.createElement("path", {
d: "M8.002 3h1a28.424 28.424 0 0 0 0 18h-1M15 3c.97 2.92 1.46 5.96 1.46 9",
stroke: color,
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/React.createElement("path", {
d: "M3 16v-1c2.92.97 5.96 1.46 9 1.46M21 9c-2.92-.97-5.96-1.46-9-1.46M3 9c1.59-.53 3.21-.91 4.85-1.16M18.2 21.4a3.2 3.2 0 1 0 0-6.4 3.2 3.2 0 0 0 0 6.4ZM22 22l-1-1",
stroke: color,
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}));
};
var Bulk = function Bulk(_ref3) {
var color = _ref3.color;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
d: "m21.79 20.76-.72-.72a3.576 3.576 0 0 0-2.99-5.54c-1.98 0-3.58 1.6-3.58 3.58a3.576 3.576 0 0 0 5.54 2.99l.72.72a.728.728 0 0 0 1.03-1.03Z",
fill: color
}), /*#__PURE__*/React.createElement("path", {
opacity: ".4",
d: "M2.032 14.629c0 .03-.02.07-.02.1a9.494 9.494 0 0 0 4.26 4.26c.03 0 .07-.02.1-.02-.34-1.16-.6-2.35-.79-3.54-1.2-.2-2.39-.46-3.55-.8ZM19.068 6.431a9.5 9.5 0 0 0-4.49-4.49c.36 1.19.66 2.41.86 3.63 1.22.2 2.44.49 3.63.86ZM1.93 6.43c1.2-.36 2.42-.66 3.64-.86.2-1.19.45-2.37.79-3.53-.03 0-.07-.02-.1-.02-1.88.93-3.41 2.5-4.33 4.41ZM13.82 5.358c-.24-1.3-.54-2.6-.97-3.86-.02-.07-.02-.13-.03-.21a9.83 9.83 0 0 0-2.32-.3c-.81 0-1.58.11-2.33.3-.01.07 0 .13-.02.21-.42 1.26-.73 2.56-.97 3.86 2.21-.24 4.43-.24 6.64 0ZM5.358 7.18c-1.31.24-2.6.54-3.86.97-.07.02-.13.02-.21.03-.18.74-.3 1.52-.3 2.32 0 .81.11 1.58.3 2.33.07.01.13 0 .21.02 1.26.42 2.55.73 3.86.97-.24-2.21-.24-4.43 0-6.64ZM19.699 8.18c-.07 0-.13-.01-.21-.03-1.26-.42-2.56-.73-3.86-.97.25 2.21.25 4.43 0 6.63 1.3-.24 2.6-.54 3.86-.97.07-.02.13-.01.21-.02.18-.75.3-1.52.3-2.33 0-.79-.11-1.56-.3-2.31ZM7.18 15.64c.24 1.31.54 2.6.97 3.86.02.07.01.13.02.21.75.18 1.52.3 2.33.3.8 0 1.58-.11 2.32-.3.01-.07.01-.13.03-.21.42-1.26.73-2.55.97-3.86-1.1.12-2.21.21-3.32.21a33.43 33.43 0 0 1-3.32-.21ZM6.952 6.952c-.3 2.36-.3 4.74 0 7.11 2.36.3 4.74.3 7.11 0 .3-2.36.3-4.74 0-7.11-2.37-.3-4.75-.3-7.11 0Z",
fill: color
}));
};
var Linear = function Linear(_ref4) {
var color = _ref4.color;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
d: "M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10",
stroke: color,
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/React.createElement("path", {
d: "M8 3h1a28.424 28.424 0 0 0 0 18H8M15 3c.97 2.92 1.46 5.96 1.46 9",
stroke: color,
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), /*#__PURE__*/React.createElement("path", {
d: "M3 16v-1c2.92.97 5.96 1.46 9 1.46M3 9a28.424 28.424 0 0 1 18 0M18.2 21.4a3.2 3.2 0 1 0 0-6.4 3.2 3.2 0 0 0 0 6.4ZM22 22l-1-1",
stroke: color,
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}));
};
var Outline = function Outline(_ref5) {
var color = _ref5.color;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
d: "M12 22.75C6.07 22.75 1.25 17.93 1.25 12S6.07 1.25 12 1.25 22.75 6.07 22.75 12c0 .41-.34.75-.75.75s-.75-.34-.75-.75c0-5.1-4.15-9.25-9.25-9.25S2.75 6.9 2.75 12 6.9 21.25 12 21.25c.41 0 .75.34.75.75s-.34.75-.75.75Z",
fill: color
}), /*#__PURE__*/React.createElement("path", {
d: "M9.002 21.75h-1c-.41 0-.75-.34-.75-.75s.32-.74.73-.75a29.49 29.49 0 0 1 0-16.5.752.752 0 0 1-.73-.75c0-.41.34-.75.75-.75h1c.24 0 .47.12.61.31.14.2.18.45.1.68a27.948 27.948 0 0 0 0 17.53c.08.23.04.48-.1.68-.14.2-.37.3-.61.3ZM16.459 12.748c-.41 0-.75-.34-.75-.75 0-2.98-.48-5.93-1.42-8.76-.13-.39.08-.82.47-.95.39-.13.82.08.95.47.99 2.98 1.5 6.09 1.5 9.24 0 .41-.34.75-.75.75Z",
fill: color
}), /*#__PURE__*/React.createElement("path", {
d: "M12 17.21c-2.8 0-5.57-.4-8.25-1.19-.01.4-.34.73-.75.73s-.75-.34-.75-.75v-1c0-.24.12-.47.31-.61.2-.14.45-.18.68-.1 2.83.94 5.78 1.42 8.76 1.42.41 0 .75.34.75.75s-.34.75-.75.75ZM21 9.75c-.08 0-.16-.01-.24-.04a27.948 27.948 0 0 0-17.53 0 .753.753 0 0 1-.95-.47c-.13-.39.08-.82.47-.95a29.318 29.318 0 0 1 18.47 0c.39.13.6.56.47.95-.08.31-.38.51-.69.51ZM18.2 22.15c-2.18 0-3.95-1.77-3.95-3.95s1.77-3.95 3.95-3.95 3.95 1.77 3.95 3.95-1.77 3.95-3.95 3.95Zm0-6.4c-1.35 0-2.45 1.1-2.45 2.45s1.1 2.45 2.45 2.45 2.45-1.1 2.45-2.45-1.1-2.45-2.45-2.45Z",
fill: color
}), /*#__PURE__*/React.createElement("path", {
d: "M22.001 22.751c-.19 0-.38-.07-.53-.22l-1-1a.755.755 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l1 1c.29.29.29.77 0 1.06-.15.15-.34.22-.53.22Z",
fill: color
}));
};
var TwoTone = function TwoTone(_ref6) {
var color = _ref6.color;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
stroke: color,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
d: "M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10"
}), /*#__PURE__*/React.createElement("g", {
opacity: ".4"
}, /*#__PURE__*/React.createElement("path", {
stroke: color,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
d: "M8 3h1a28.424 28.424 0 000 18H8M15 3c.97 2.92 1.46 5.96 1.46 9"
}), /*#__PURE__*/React.createElement("path", {
stroke: color,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
d: "M3 16v-1c2.92.97 5.96 1.46 9 1.46M3 9a28.424 28.424 0 0118 0"
})), /*#__PURE__*/React.createElement("path", {
stroke: color,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
d: "M18.2 21.4a3.2 3.2 0 100-6.4 3.2 3.2 0 000 6.4zM22 22l-1-1"
}));
};
var chooseVariant = function chooseVariant(variant, color) {
switch (variant) {
case 'Bold':
return /*#__PURE__*/React.createElement(Bold, {
color: color
});
case 'Broken':
return /*#__PURE__*/React.createElement(Broken, {
color: color
});
case 'Bulk':
return /*#__PURE__*/React.createElement(Bulk, {
color: color
});
case 'Linear':
return /*#__PURE__*/React.createElement(Linear, {
color: color
});
case 'Outline':
return /*#__PURE__*/React.createElement(Outline, {
color: color
});
case 'TwoTone':
return /*#__PURE__*/React.createElement(TwoTone, {
color: color
});
default:
return /*#__PURE__*/React.createElement(Linear, {
color: color
});
}
};
var GlobalSearch = /*#__PURE__*/forwardRef(function (_ref7, ref) {
var variant = _ref7.variant,
color = _ref7.color,
size = _ref7.size,
rest = _objectWithoutProperties(_ref7, _excluded);
return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
xmlns: "http://www.w3.org/2000/svg",
ref: ref,
width: size,
height: size,
viewBox: "0 0 24 24",
fill: "none"
}), chooseVariant(variant, color));
});
GlobalSearch.propTypes = {
variant: PropTypes.oneOf(['Linear', 'Bold', 'Broken', 'Bulk', 'Outline', 'TwoTone']),
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
};
GlobalSearch.defaultProps = {
variant: 'Linear',
color: 'currentColor',
size: '24'
};
GlobalSearch.displayName = 'GlobalSearch';
export { GlobalSearch as default };