UNPKG

lucid-ui

Version:

A UI component library from Xandr.

93 lines 5.33 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.GlobeIcon = exports.iconPropTypes = void 0; var lodash_1 = __importDefault(require("lodash")); var react_1 = __importDefault(require("react")); var prop_types_1 = __importDefault(require("prop-types")); var Icon_1 = __importDefault(require("../Icon")); var style_helpers_1 = require("../../../util/style-helpers"); var cx = style_helpers_1.lucidClassNames.bind('&-GlobeIcon'); exports.iconPropTypes = { /** Size variations of the icons. \`size\` directly effects height and width but the developer should also be conscious of the relationship with \`viewBox\`. */ size: prop_types_1.default.number, /** Size handles width and height, whereas \`width\` can manually override the width that would be set by size. */ width: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]), /** Size handles width and height, whereas \`height\` can manually override the height that would be set by size. */ height: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.string]), /** \`viewBox\` is very important for SVGs. You can think of \`viewBox\` as the "artboard" for our SVG while \`size\` is the presented height and width. */ viewBox: prop_types_1.default.string, /** Sets the color of the Icon. May not be applicable for icons that are tied to specific colors (e.g. DangerIcon). */ color: prop_types_1.default.oneOf([ 'neutral-dark', 'neutral-light', 'neutral-extra-light', 'primary', 'white', 'success', 'warning', 'secondary-one', 'secondary-two', 'secondary-three', 'secondary-five', ]), /** Any valid SVG aspect ratio. */ aspectRatio: prop_types_1.default.string, /** Adds styling that makes the icon appear clickable. */ isClickable: prop_types_1.default.bool, /** Adds styling that makes the icon appear disabled. Also forces isClickable to be false. */ isDisabled: prop_types_1.default.bool, /** Called when the user clicks the \`Icon\`. Signature: \`({event, props}) => {}\` */ onClick: prop_types_1.default.func, /** Called when the user clicks an active, clickable \`Icon\`. Signature: \`({event, props}) => {}\` */ onSelect: prop_types_1.default.func, /** Any valid React children. */ children: prop_types_1.default.element, /** Classes that are appended to the component defaults. This prop is run through the \`classnames\` library. */ className: prop_types_1.default.string, }; var GlobeIcon = function (_a) { var className = _a.className, passThroughs = __rest(_a, ["className"]); return (react_1.default.createElement(Icon_1.default, __assign({}, lodash_1.default.omit(passThroughs, ['initialState']), { className: cx('&', className) }), react_1.default.createElement("circle", { cx: '8', cy: '8', r: '7.8', fill: 'none', strokeWidth: '1.3', strokeLinecap: 'square', strokeMiterlimit: '10' }), react_1.default.createElement("path", { d: 'M9.397.631c-.212.759-.468 2.019.325 2.541.874.576 2.396-.221 3.073-.818M14.702 4.754l-2.335-.018c-.575-.004-1.047.338-1.287.85-.346.738-.251 1.421.477 1.834.854.483 1.819.961 1.479 2.119-.191.651-.273.577-.242 1.264.018.395.724 1.62 1.083 1.854M1.775 3.861c-.079.296-.107.827.432 1.342.808.772 1.382 1.131 1.508 1.275.126.143.655 1.393.622 1.847-.03.408.078.785.376 1.077.236.231.529.394.785.603.537.437.836 1.058.811 1.752-.036 1.023-.027 1.601.034 1.712.032.057.071.09.055-.015-.027-.173.043-.565.386-.937.233-.253.609-.303.841-.556.273-.296.309-.762.442-1.126.202-.555.59-1.028.79-1.587.285-.797-.193-1.165-.802-1.558-.757-.489-1.498-.747-2.411-.752-.464-.002-1.114.319-1.525.008-.976-.739-.551-2.377.53-2.418.522-.02 1.071-.064 1.436-.49.432-.504.921-.096.935-.088.177.14.008-.007.001-.024-.047-.098-.293-.67-.289-.93.013-.785-.172-1.563-.372-2.317' }))); }; exports.GlobeIcon = GlobeIcon; exports.GlobeIcon.displayName = 'GlobeIcon'; exports.GlobeIcon.propTypes = exports.iconPropTypes; exports.GlobeIcon.defaultProps = Icon_1.default.defaultProps; exports.default = exports.GlobeIcon; //# sourceMappingURL=GlobeIcon.js.map