nav-frontend-ikoner-assets
Advanced tools
Comparing version 2.0.7 to 2.0.8
642
lib/index.js
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _extends = Object.assign || 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; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require("prop-types"); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable */ | ||
/* eslint-disable */ | ||
// Generated by gulp svg-icon - do not modify manually | ||
var iconList = ["advarsel-sirkel-fyll", "feil-sirkel-fyll", "hamburger", "help-circle", "help-circle_hover", "info-sirkel-fyll", "ok-sirkel-fyll", "søk", "spinner-negativ", "spinner-transparent", "systemer", "x"]; | ||
var Icon = function (_Component) { | ||
_inherits(Icon, _Component); | ||
function Icon() { | ||
_classCallCheck(this, Icon); | ||
return _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).apply(this, arguments)); | ||
} | ||
_createClass(Icon, [{ | ||
key: "render", | ||
value: function render() { | ||
var _props = this.props, | ||
kind = _props.kind, | ||
preview = _props.preview; | ||
return preview ? this.renderPreview() : this.renderIcon(kind); | ||
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; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const React = require("react"); | ||
const PropTypes = require("prop-types"); | ||
const iconList = [ | ||
"advarsel-sirkel-fyll", | ||
"feil-sirkel-fyll", | ||
"hamburger", | ||
"help-circle", | ||
"help-circle_hover", | ||
"info-sirkel-fyll", | ||
"ok-sirkel-fyll", | ||
"søk", | ||
"spinner-negativ", | ||
"spinner-transparent", | ||
"systemer", | ||
"x", | ||
]; | ||
class Icon extends React.Component { | ||
render() { | ||
const { kind, preview } = this.props; | ||
return preview ? this.renderPreview() : this.renderIcon(kind); | ||
} | ||
}, { | ||
key: "renderPreview", | ||
value: function renderPreview() { | ||
var _this2 = this; | ||
return _react2.default.createElement( | ||
"div", | ||
null, | ||
iconList.map(function (kind) { | ||
return _this2.renderPreviewKind(kind); | ||
}) | ||
); | ||
renderPreview() { | ||
return React.createElement("div", null, iconList.map((kind) => this.renderPreviewKind(kind))); | ||
} | ||
}, { | ||
key: "renderIcon", | ||
value: function renderIcon(kind) { | ||
var wrapperStyle = this.props.wrapperStyle; | ||
if (wrapperStyle) return _react2.default.createElement( | ||
"div", | ||
{ style: wrapperStyle }, | ||
this.getIcon(kind) | ||
); | ||
return this.getIcon(kind); | ||
renderIcon(kind) { | ||
const { wrapperStyle } = this.props; | ||
if (wrapperStyle) | ||
return React.createElement("div", { style: wrapperStyle }, this.getIcon(kind)); | ||
return this.getIcon(kind); | ||
} | ||
}, { | ||
key: "renderPreviewKind", | ||
value: function renderPreviewKind(kind) { | ||
return _react2.default.createElement( | ||
"div", | ||
{ key: kind }, | ||
_react2.default.createElement( | ||
"h3", | ||
null, | ||
"<Icon kind=\"", | ||
kind, | ||
"\" />" | ||
), | ||
this.renderIcon(kind) | ||
); | ||
renderPreviewKind(kind) { | ||
return (React.createElement("div", { key: kind }, | ||
React.createElement("h3", null, | ||
"<Icon kind=\"", | ||
kind, | ||
"\" />"), | ||
this.renderIcon(kind))); | ||
} | ||
}, { | ||
key: "getIcon", | ||
value: function getIcon(kind) { | ||
var _props2 = this.props, | ||
height = _props2.height, | ||
onClick = _props2.onClick, | ||
size = _props2.size, | ||
style = _props2.style, | ||
width = _props2.width, | ||
props = _objectWithoutProperties(_props2, ["height", "onClick", "size", "style", "width"]); | ||
switch (kind) { | ||
default: | ||
return null; | ||
case "advarsel-sirkel-fyll": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 24 24" | ||
}), | ||
_react2.default.createElement( | ||
"g", | ||
{ fill: "none", fillRule: "evenodd" }, | ||
_react2.default.createElement("path", { | ||
d: "M12.205-.004l-.214.002a12.225 12.225 0 0 0-8.517 3.659C1.179 5.977-.053 9.013.002 12.208c.115 6.613 5.296 11.793 11.795 11.793l.212-.002c6.726-.116 12.105-5.595 11.99-12.21C23.883 5.178 18.702-.003 12.204-.003z", | ||
fill: "#FFA733", | ||
fillRule: "nonzero" | ||
}), | ||
_react2.default.createElement("path", { | ||
d: "M12.027 19H12A1.499 1.499 0 0 1 11.973 16L12 16a1.501 1.501 0 0 1 .027 3z", | ||
fill: "#3E3832" | ||
}), | ||
_react2.default.createElement("path", { | ||
d: "M12 5a1 1 0 0 1 1 1v7a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1z", | ||
fill: "#3E3832", | ||
fillRule: "nonzero" | ||
}) | ||
) | ||
); | ||
case "feil-sirkel-fyll": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 24 24" | ||
}), | ||
_react2.default.createElement( | ||
"g", | ||
{ fill: "none", fillRule: "evenodd" }, | ||
_react2.default.createElement("path", { | ||
d: "M11.999 0C5.395 0 .013 5.372 0 11.976a11.923 11.923 0 0 0 3.498 8.493A11.925 11.925 0 0 0 11.977 24H12c6.603 0 11.986-5.373 12-11.978C24.013 5.406 18.64.012 11.999 0z", | ||
fillRule: "nonzero", | ||
fill: "#A13A28" | ||
}), | ||
_react2.default.createElement("path", { | ||
d: "M12 10.651l3.372-3.372a.954.954 0 1 1 1.349 1.35L13.349 12l3.372 3.372a.954.954 0 1 1-1.35 1.349L12 13.349 8.628 16.72a.954.954 0 1 1-1.349-1.35L10.651 12 7.28 8.628A.954.954 0 1 1 8.63 7.28L12 10.651z", | ||
fill: "#FFF", | ||
fillRule: "nonzero" | ||
}) | ||
) | ||
); | ||
case "help-circle": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 18.2 18.2" | ||
}), | ||
_react2.default.createElement("path", { d: "M9.1 0C4.1 0 0 4.1 0 9.1s4.1 9.1 9.1 9.1 9.1-4.1 9.1-9.1S14.1 0 9.1 0zm0 17.2C4.6 17.2 1 13.6 1 9.1S4.6 1 9.1 1s8.1 3.6 8.1 8.1-3.6 8.1-8.1 8.1z" }), | ||
_react2.default.createElement("circle", { cx: "9.1", cy: "13.8", r: ".9" }), | ||
_react2.default.createElement("path", { d: "M9.1 11.5c-.3 0-.5-.2-.5-.5V8.6c0-.3.2-.5.5-.5 1 0 1.9-.8 1.9-1.9s-.8-1.9-1.9-1.9c-1 0-1.9.8-1.9 1.9 0 .3-.2.5-.5.5s-.5-.2-.5-.4c0-1.6 1.3-2.9 2.9-2.9S12 4.7 12 6.3c0 1.4-1 2.6-2.4 2.8V11c0 .3-.2.5-.5.5z" }) | ||
); | ||
case "hamburger": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 200 160" | ||
}), | ||
_react2.default.createElement("path", { d: "M0 0h200v32H0zm0 64h200v32H0zm0 64h200v32H0z" }) | ||
); | ||
case "help-circle_hover": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 18.22 18.22" | ||
}), | ||
_react2.default.createElement( | ||
"title", | ||
null, | ||
"Hjelp" | ||
), | ||
_react2.default.createElement("path", { | ||
fill: "#2868B3", | ||
d: "M9.1 0C4.1 0 0 4.1 0 9.1s4.1 9.1 9.1 9.1 9.1-4.1 9.1-9.1S14.1 0 9.1 0zm0 14.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9.9.4.9.9-.4.9-.9.9zM9.6 9v1.9c0 .3-.2.5-.5.5s-.5-.2-.5-.5V8.5c0-.3.2-.5.5-.5 1 0 1.9-.8 1.9-1.8s-.8-1.9-1.9-1.9-1.8.8-1.8 1.8c0 .3-.2.5-.5.5s-.5-.2-.5-.5c0-1.6 1.3-2.9 2.8-2.9 1.4 0 2.5 1 2.8 2.4.3 1.6-.7 3.1-2.3 3.4z" | ||
}) | ||
); | ||
case "info-sirkel-fyll": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 24 24" | ||
}), | ||
_react2.default.createElement( | ||
"g", | ||
{ fill: "none" }, | ||
_react2.default.createElement("path", { | ||
d: "M12 0C5.382 0 0 5.382 0 12s5.382 12 12 12c6.617 0 12-5.382 12-12S18.617 0 12 0z", | ||
fill: "#337C9B" | ||
}), | ||
_react2.default.createElement("path", { | ||
d: "M12 5a1.566 1.566 0 1 1 .11 3.13A1.566 1.566 0 0 1 12 5zm2.976 12.01c.563 0 1.043.431 1.043.991s-.48.992-1.043.992H9.39c-.564 0-1.043-.431-1.043-.992 0-.56.479-.99 1.043-.99h1.6v-5.016h-.986c-.565 0-1.044-.43-1.044-.991 0-.56.48-.991 1.044-.991h2.03c.563 0 1.043.43 1.043.99v6.007h1.899z", | ||
fill: "#FFF" | ||
}) | ||
) | ||
); | ||
case "ok-sirkel-fyll": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 24 24" | ||
}), | ||
_react2.default.createElement( | ||
"g", | ||
{ fillRule: "nonzero", fill: "none" }, | ||
_react2.default.createElement("path", { | ||
d: "M12 0C5.383 0 0 5.384 0 12s5.383 12 12 12c6.616 0 12-5.384 12-12S18.616 0 12 0z", | ||
fill: "#1C6937" | ||
}), | ||
_react2.default.createElement("path", { | ||
d: "M9.64 14.441l6.46-5.839a.997.997 0 0 1 1.376.044.923.923 0 0 1-.046 1.334l-7.15 6.464a.993.993 0 0 1-.662.252.992.992 0 0 1-.69-.276l-2.382-2.308a.923.923 0 0 1 0-1.334.997.997 0 0 1 1.377 0l1.717 1.663z", | ||
fill: "#FFF" | ||
}) | ||
) | ||
); | ||
case "søk": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 24 24" | ||
}), | ||
_react2.default.createElement("path", { d: "M9 18c2.131 0 4.09-.75 5.633-1.992l7.658 7.697c.389.393 1.021.395 1.414.004s.393-1.023.004-1.414l-7.668-7.707A8.941 8.941 0 0 0 18 9c0-4.963-4.037-9-9-9S0 4.037 0 9s4.037 9 9 9zM9 2c3.859 0 7 3.139 7 7 0 3.859-3.141 7-7 7-3.861 0-7-3.141-7-7 0-3.861 3.139-7 7-7z" }) | ||
); | ||
case "spinner-negativ": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 50 50", | ||
preserveAspectRatio: "xMidYMid" | ||
}), | ||
_react2.default.createElement( | ||
"title", | ||
null, | ||
"Venter..." | ||
), | ||
_react2.default.createElement("circle", { | ||
xmlns: "http://www.w3.org/2000/svg", | ||
cx: "25", | ||
cy: "25", | ||
r: "20", | ||
stroke: "#eee", | ||
fill: "none", | ||
strokeWidth: "5" | ||
}), | ||
_react2.default.createElement("circle", { | ||
cx: "25", | ||
cy: "25", | ||
r: "20", | ||
stroke: "#888", | ||
fill: "none", | ||
strokeWidth: "5", | ||
strokeDasharray: "50 155", | ||
strokeLinecap: "round" | ||
}) | ||
); | ||
case "spinner-transparent": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 50 50", | ||
preserveAspectRatio: "xMidYMid" | ||
}), | ||
_react2.default.createElement( | ||
"title", | ||
null, | ||
"Venter..." | ||
), | ||
_react2.default.createElement("circle", { | ||
xmlns: "http://www.w3.org/2000/svg", | ||
cx: "25", | ||
cy: "25", | ||
r: "20", | ||
stroke: "transparent", | ||
fill: "none", | ||
strokeWidth: "5" | ||
}), | ||
_react2.default.createElement("circle", { | ||
cx: "25", | ||
cy: "25", | ||
r: "20", | ||
stroke: "#7f756c", | ||
fill: "none", | ||
strokeWidth: "5", | ||
strokeDasharray: "50 155", | ||
strokeLinecap: "round" | ||
}) | ||
); | ||
case "systemer": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 128 128" | ||
}), | ||
_react2.default.createElement("path", { d: "M0 0h32v32H0zm48 0h32v32H48zm48 0h32v32H96zM0 48h32v32H0zm48 0h32v32H48zm48 0h32v32H96zM0 96h32v32H0zm48 0h32v32H48zm48 0h32v32H96z" }) | ||
); | ||
case "x": | ||
return _react2.default.createElement( | ||
"svg", | ||
_extends({}, props, { | ||
focusable: "false", | ||
height: height || size, | ||
width: width || size, | ||
onClick: onClick, | ||
style: style, | ||
viewBox: "0 0 65.1 65.1" | ||
}), | ||
_react2.default.createElement("path", { d: "M8.486-.038L65.053 56.53l-8.485 8.485L0 8.447z" }), | ||
_react2.default.createElement("path", { d: "M65.092 8.486L8.524 65.053.039 56.569 56.607 0z" }) | ||
); | ||
} | ||
getIcon(kind) { | ||
const _a = this.props, { height, onClick, size, style, width } = _a, props = __rest(_a, ["height", "onClick", "size", "style", "width"]); | ||
switch (kind) { | ||
default: | ||
return null; | ||
case "advarsel-sirkel-fyll": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 24 24" }), | ||
React.createElement("g", { fill: "none", fillRule: "evenodd" }, | ||
React.createElement("path", { d: "M12.205-.004l-.214.002a12.225 12.225 0 0 0-8.517 3.659C1.179 5.977-.053 9.013.002 12.208c.115 6.613 5.296 11.793 11.795 11.793l.212-.002c6.726-.116 12.105-5.595 11.99-12.21C23.883 5.178 18.702-.003 12.204-.003z", fill: "#FFA733", fillRule: "nonzero" }), | ||
React.createElement("path", { d: "M12.027 19H12A1.499 1.499 0 0 1 11.973 16L12 16a1.501 1.501 0 0 1 .027 3z", fill: "#3E3832" }), | ||
React.createElement("path", { d: "M12 5a1 1 0 0 1 1 1v7a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1z", fill: "#3E3832", fillRule: "nonzero" })))); | ||
case "feil-sirkel-fyll": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 24 24" }), | ||
React.createElement("g", { fill: "none", fillRule: "evenodd" }, | ||
React.createElement("path", { d: "M11.999 0C5.395 0 .013 5.372 0 11.976a11.923 11.923 0 0 0 3.498 8.493A11.925 11.925 0 0 0 11.977 24H12c6.603 0 11.986-5.373 12-11.978C24.013 5.406 18.64.012 11.999 0z", fillRule: "nonzero", fill: "#A13A28" }), | ||
React.createElement("path", { d: "M12 10.651l3.372-3.372a.954.954 0 1 1 1.349 1.35L13.349 12l3.372 3.372a.954.954 0 1 1-1.35 1.349L12 13.349 8.628 16.72a.954.954 0 1 1-1.349-1.35L10.651 12 7.28 8.628A.954.954 0 1 1 8.63 7.28L12 10.651z", fill: "#FFF", fillRule: "nonzero" })))); | ||
case "help-circle": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 18.2 18.2" }), | ||
React.createElement("path", { d: "M9.1 0C4.1 0 0 4.1 0 9.1s4.1 9.1 9.1 9.1 9.1-4.1 9.1-9.1S14.1 0 9.1 0zm0 17.2C4.6 17.2 1 13.6 1 9.1S4.6 1 9.1 1s8.1 3.6 8.1 8.1-3.6 8.1-8.1 8.1z" }), | ||
React.createElement("circle", { cx: "9.1", cy: "13.8", r: ".9" }), | ||
React.createElement("path", { d: "M9.1 11.5c-.3 0-.5-.2-.5-.5V8.6c0-.3.2-.5.5-.5 1 0 1.9-.8 1.9-1.9s-.8-1.9-1.9-1.9c-1 0-1.9.8-1.9 1.9 0 .3-.2.5-.5.5s-.5-.2-.5-.4c0-1.6 1.3-2.9 2.9-2.9S12 4.7 12 6.3c0 1.4-1 2.6-2.4 2.8V11c0 .3-.2.5-.5.5z" }))); | ||
case "hamburger": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 200 160" }), | ||
React.createElement("path", { d: "M0 0h200v32H0zm0 64h200v32H0zm0 64h200v32H0z" }))); | ||
case "help-circle_hover": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 18.22 18.22" }), | ||
React.createElement("title", null, "Hjelp"), | ||
React.createElement("path", { fill: "#2868B3", d: "M9.1 0C4.1 0 0 4.1 0 9.1s4.1 9.1 9.1 9.1 9.1-4.1 9.1-9.1S14.1 0 9.1 0zm0 14.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9.9.4.9.9-.4.9-.9.9zM9.6 9v1.9c0 .3-.2.5-.5.5s-.5-.2-.5-.5V8.5c0-.3.2-.5.5-.5 1 0 1.9-.8 1.9-1.8s-.8-1.9-1.9-1.9-1.8.8-1.8 1.8c0 .3-.2.5-.5.5s-.5-.2-.5-.5c0-1.6 1.3-2.9 2.8-2.9 1.4 0 2.5 1 2.8 2.4.3 1.6-.7 3.1-2.3 3.4z" }))); | ||
case "info-sirkel-fyll": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 24 24" }), | ||
React.createElement("g", { fill: "none" }, | ||
React.createElement("path", { d: "M12 0C5.382 0 0 5.382 0 12s5.382 12 12 12c6.617 0 12-5.382 12-12S18.617 0 12 0z", fill: "#337C9B" }), | ||
React.createElement("path", { d: "M12 5a1.566 1.566 0 1 1 .11 3.13A1.566 1.566 0 0 1 12 5zm2.976 12.01c.563 0 1.043.431 1.043.991s-.48.992-1.043.992H9.39c-.564 0-1.043-.431-1.043-.992 0-.56.479-.99 1.043-.99h1.6v-5.016h-.986c-.565 0-1.044-.43-1.044-.991 0-.56.48-.991 1.044-.991h2.03c.563 0 1.043.43 1.043.99v6.007h1.899z", fill: "#FFF" })))); | ||
case "ok-sirkel-fyll": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 24 24" }), | ||
React.createElement("g", { fillRule: "nonzero", fill: "none" }, | ||
React.createElement("path", { d: "M12 0C5.383 0 0 5.384 0 12s5.383 12 12 12c6.616 0 12-5.384 12-12S18.616 0 12 0z", fill: "#1C6937" }), | ||
React.createElement("path", { d: "M9.64 14.441l6.46-5.839a.997.997 0 0 1 1.376.044.923.923 0 0 1-.046 1.334l-7.15 6.464a.993.993 0 0 1-.662.252.992.992 0 0 1-.69-.276l-2.382-2.308a.923.923 0 0 1 0-1.334.997.997 0 0 1 1.377 0l1.717 1.663z", fill: "#FFF" })))); | ||
case "søk": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 24 24" }), | ||
React.createElement("path", { d: "M9 18c2.131 0 4.09-.75 5.633-1.992l7.658 7.697c.389.393 1.021.395 1.414.004s.393-1.023.004-1.414l-7.668-7.707A8.941 8.941 0 0 0 18 9c0-4.963-4.037-9-9-9S0 4.037 0 9s4.037 9 9 9zM9 2c3.859 0 7 3.139 7 7 0 3.859-3.141 7-7 7-3.861 0-7-3.141-7-7 0-3.861 3.139-7 7-7z" }))); | ||
case "spinner-negativ": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 50 50", preserveAspectRatio: "xMidYMid" }), | ||
React.createElement("title", null, "Venter..."), | ||
React.createElement("circle", { xmlns: "http://www.w3.org/2000/svg", cx: "25", cy: "25", r: "20", stroke: "#eee", fill: "none", strokeWidth: "5" }), | ||
React.createElement("circle", { cx: "25", cy: "25", r: "20", stroke: "#888", fill: "none", strokeWidth: "5", strokeDasharray: "50 155", strokeLinecap: "round" }))); | ||
case "spinner-transparent": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 50 50", preserveAspectRatio: "xMidYMid" }), | ||
React.createElement("title", null, "Venter..."), | ||
React.createElement("circle", { xmlns: "http://www.w3.org/2000/svg", cx: "25", cy: "25", r: "20", stroke: "transparent", fill: "none", strokeWidth: "5" }), | ||
React.createElement("circle", { cx: "25", cy: "25", r: "20", stroke: "#7f756c", fill: "none", strokeWidth: "5", strokeDasharray: "50 155", strokeLinecap: "round" }))); | ||
case "systemer": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 128 128" }), | ||
React.createElement("path", { d: "M0 0h32v32H0zm48 0h32v32H48zm48 0h32v32H96zM0 48h32v32H0zm48 0h32v32H48zm48 0h32v32H96zM0 96h32v32H0zm48 0h32v32H48zm48 0h32v32H96z" }))); | ||
case "x": | ||
return (React.createElement("svg", Object.assign({}, props, { focusable: "false", height: height || size, width: width || size, onClick: onClick, style: style, viewBox: "0 0 65.1 65.1" }), | ||
React.createElement("path", { d: "M8.486-.038L65.053 56.53l-8.485 8.485L0 8.447z" }), | ||
React.createElement("path", { d: "M65.092 8.486L8.524 65.053.039 56.569 56.607 0z" }))); | ||
} | ||
} | ||
}]); | ||
return Icon; | ||
}(_react.Component); | ||
} | ||
exports.default = Icon; | ||
Icon.propTypes = { | ||
height: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), | ||
width: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), | ||
kind: _propTypes2.default.oneOf(["advarsel-sirkel-fyll", "feil-sirkel-fyll", "hamburger", "help-circle", "help-circle_hover", "info-sirkel-fyll", "ok-sirkel-fyll", "søk", "spinner-negativ", "spinner-transparent", "systemer", "x"]).isRequired, | ||
onClick: _propTypes2.default.func, | ||
preview: _propTypes2.default.bool, | ||
size: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]), | ||
style: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.object]), | ||
wrapperStyle: _propTypes2.default.oneOfType([_propTypes2.default.array, _propTypes2.default.object]) | ||
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), | ||
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), | ||
kind: PropTypes.oneOf([ | ||
"advarsel-sirkel-fyll", | ||
"feil-sirkel-fyll", | ||
"hamburger", | ||
"help-circle", | ||
"help-circle_hover", | ||
"info-sirkel-fyll", | ||
"ok-sirkel-fyll", | ||
"søk", | ||
"spinner-negativ", | ||
"spinner-transparent", | ||
"systemer", | ||
"x", | ||
]).isRequired, | ||
onClick: PropTypes.func, | ||
preview: PropTypes.bool, | ||
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), | ||
style: PropTypes.oneOfType([PropTypes.array, PropTypes.object]), | ||
wrapperStyle: PropTypes.oneOfType([PropTypes.array, PropTypes.object]), | ||
}; | ||
Icon.defaultProps = { | ||
size: 32 | ||
size: 32, | ||
}; | ||
exports.default = Icon; | ||
Icon.__docgenInfo = { | ||
"description": "", | ||
"displayName": "Icon", | ||
"props": { | ||
"height": { | ||
"type": { | ||
"name": "union", | ||
"value": [{ | ||
"name": "number" | ||
}, { | ||
"name": "string" | ||
}] | ||
}, | ||
"required": false, | ||
"description": "" | ||
}, | ||
"width": { | ||
"type": { | ||
"name": "union", | ||
"value": [{ | ||
"name": "number" | ||
}, { | ||
"name": "string" | ||
}] | ||
}, | ||
"required": false, | ||
"description": "" | ||
}, | ||
"kind": { | ||
"type": { | ||
"name": "enum", | ||
"value": [{ | ||
"value": "\"advarsel-sirkel-fyll\"", | ||
"computed": false | ||
}, { | ||
"value": "\"feil-sirkel-fyll\"", | ||
"computed": false | ||
}, { | ||
"value": "\"hamburger\"", | ||
"computed": false | ||
}, { | ||
"value": "\"help-circle\"", | ||
"computed": false | ||
}, { | ||
"value": "\"help-circle_hover\"", | ||
"computed": false | ||
}, { | ||
"value": "\"info-sirkel-fyll\"", | ||
"computed": false | ||
}, { | ||
"value": "\"ok-sirkel-fyll\"", | ||
"computed": false | ||
}, { | ||
"value": "\"s\xF8k\"", | ||
"computed": false | ||
}, { | ||
"value": "\"spinner-negativ\"", | ||
"computed": false | ||
}, { | ||
"value": "\"spinner-transparent\"", | ||
"computed": false | ||
}, { | ||
"value": "\"systemer\"", | ||
"computed": false | ||
}, { | ||
"value": "\"x\"", | ||
"computed": false | ||
}] | ||
}, | ||
"required": true, | ||
"description": "" | ||
}, | ||
"onClick": { | ||
"type": { | ||
"name": "func" | ||
}, | ||
"required": false, | ||
"description": "" | ||
}, | ||
"preview": { | ||
"type": { | ||
"name": "bool" | ||
}, | ||
"required": false, | ||
"description": "" | ||
}, | ||
"size": { | ||
"type": { | ||
"name": "union", | ||
"value": [{ | ||
"name": "number" | ||
}, { | ||
"name": "string" | ||
}] | ||
}, | ||
"required": false, | ||
"description": "", | ||
"defaultValue": { | ||
"value": "32", | ||
"computed": false | ||
} | ||
}, | ||
"style": { | ||
"type": { | ||
"name": "union", | ||
"value": [{ | ||
"name": "array" | ||
}, { | ||
"name": "object" | ||
}] | ||
}, | ||
"required": false, | ||
"description": "" | ||
}, | ||
"wrapperStyle": { | ||
"type": { | ||
"name": "union", | ||
"value": [{ | ||
"name": "array" | ||
}, { | ||
"name": "object" | ||
}] | ||
}, | ||
"required": false, | ||
"description": "" | ||
} | ||
} | ||
}; |
{ | ||
"name": "nav-frontend-ikoner-assets", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"license": "SEE LICENSE IN LICENSE", | ||
@@ -12,2 +12,6 @@ "files": [ | ||
"types": "src/index.d.ts", | ||
"scripts": { | ||
"build": "tsc -p tsconfig.json", | ||
"watch": "tsc --watch -p tsconfig.json" | ||
}, | ||
"repository": { | ||
@@ -20,3 +24,3 @@ "type": "git", | ||
}, | ||
"gitHead": "a4b834f2464c43ae1144dc812ac901abf0214b64" | ||
"gitHead": "2d232f5da47c5fe4d08faa0cf3f0a43d99268a49" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21
34706
503
1