@tenancy.nz/icons 1.0.1 → 1.0.7
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.
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.cjs +21 -0
- package/dist/cjs/components/CircleCheckIcon.cjs +14 -3
- package/dist/cjs/components/CircleTimesIcon.cjs +14 -3
- package/dist/cjs/components/EnvelopeIcon.cjs +14 -3
- package/dist/cjs/components/Icon.cjs +12 -4
- package/dist/cjs/components/Icon.styled.cjs +11 -32
- package/dist/cjs/components/PhoneIcon.cjs +14 -3
- package/dist/cjs/components/SVGIcon.cjs +19 -23
- package/dist/cjs/components/UserIcon.cjs +14 -3
- package/dist/cjs/utils/getObjectProp.cjs +11 -2
- package/dist/cjs/utils/kebabToSnakeCase.cjs +3 -1
- package/dist/cjs/utils/map.cjs +1 -1
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +18 -0
- package/dist/esm/components/CircleCheckIcon.js +14 -3
- package/dist/esm/components/CircleTimesIcon.js +14 -3
- package/dist/esm/components/EnvelopeIcon.js +14 -3
- package/dist/esm/components/Icon.js +12 -4
- package/dist/esm/components/Icon.styled.js +11 -32
- package/dist/esm/components/PhoneIcon.js +14 -3
- package/dist/esm/components/SVGIcon.js +19 -23
- package/dist/esm/components/UserIcon.js +14 -3
- package/dist/esm/utils/getObjectProp.js +11 -2
- package/dist/esm/utils/kebabToSnakeCase.js +3 -1
- package/dist/esm/utils/map.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteral(e, t) {
|
|
4
|
+
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
5
|
+
raw: {
|
|
6
|
+
value: Object.freeze(t)
|
|
7
|
+
}
|
|
8
|
+
}));
|
|
9
|
+
}
|
|
10
|
+
function _typeof(o) {
|
|
11
|
+
"@babel/helpers - typeof";
|
|
12
|
+
|
|
13
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
14
|
+
return typeof o;
|
|
15
|
+
} : function (o) {
|
|
16
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
17
|
+
}, _typeof(o);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.taggedTemplateLiteral = _taggedTemplateLiteral;
|
|
21
|
+
exports.typeof = _typeof;
|
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var SVGIcon = require('./SVGIcon.cjs');
|
|
8
7
|
|
|
9
|
-
function CircleCheckIcon(
|
|
10
|
-
|
|
8
|
+
function CircleCheckIcon(_ref) {
|
|
9
|
+
var _ref$color = _ref.color,
|
|
10
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
11
|
+
_ref$size = _ref.size,
|
|
12
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
13
|
+
return /* @__PURE__ */React.createElement(SVGIcon.default, {
|
|
14
|
+
color: color,
|
|
15
|
+
size: size
|
|
16
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
viewBox: "0 0 640 640"
|
|
19
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
20
|
+
d: "M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM404.4 276.7C411.4 265.5 408 250.7 396.8 243.6C385.6 236.5 370.8 240 363.7 251.2L302.3 349.5L275.3 313.5C267.3 302.9 252.3 300.7 241.7 308.7C231.1 316.7 228.9 331.7 236.9 342.3L284.9 406.3C289.6 412.6 297.2 416.2 305.1 415.9C313 415.6 320.2 411.4 324.4 404.6L404.4 276.6z"
|
|
21
|
+
})));
|
|
11
22
|
}
|
|
12
23
|
|
|
13
24
|
exports.default = CircleCheckIcon;
|
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var SVGIcon = require('./SVGIcon.cjs');
|
|
8
7
|
|
|
9
|
-
function CircleTimesIcon(
|
|
10
|
-
|
|
8
|
+
function CircleTimesIcon(_ref) {
|
|
9
|
+
var _ref$color = _ref.color,
|
|
10
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
11
|
+
_ref$size = _ref.size,
|
|
12
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
13
|
+
return /* @__PURE__ */React.createElement(SVGIcon.default, {
|
|
14
|
+
color: color,
|
|
15
|
+
size: size
|
|
16
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
viewBox: "0 0 640 640"
|
|
19
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
20
|
+
d: "M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM231 231C221.6 240.4 221.6 255.6 231 264.9L286 319.9L231 374.9C221.6 384.3 221.6 399.5 231 408.8C240.4 418.1 255.6 418.2 264.9 408.8L319.9 353.8L374.9 408.8C384.3 418.2 399.5 418.2 408.8 408.8C418.1 399.4 418.2 384.2 408.8 374.9L353.8 319.9L408.8 264.9C418.2 255.5 418.2 240.3 408.8 231C399.4 221.7 384.2 221.6 374.9 231L319.9 286L264.9 231C255.5 221.6 240.3 221.6 231 231z"
|
|
21
|
+
})));
|
|
11
22
|
}
|
|
12
23
|
|
|
13
24
|
exports.default = CircleTimesIcon;
|
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var SVGIcon = require('./SVGIcon.cjs');
|
|
8
7
|
|
|
9
|
-
function EnvelopeIcon(
|
|
10
|
-
|
|
8
|
+
function EnvelopeIcon(_ref) {
|
|
9
|
+
var _ref$color = _ref.color,
|
|
10
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
11
|
+
_ref$size = _ref.size,
|
|
12
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
13
|
+
return /* @__PURE__ */React.createElement(SVGIcon.default, {
|
|
14
|
+
color: color,
|
|
15
|
+
size: size
|
|
16
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
viewBox: "0 0 640 640"
|
|
19
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
20
|
+
d: "M112 128C85.5 128 64 149.5 64 176C64 191.1 71.1 205.3 83.2 214.4L291.2 370.4C308.3 383.2 331.7 383.2 348.8 370.4L556.8 214.4C568.9 205.3 576 191.1 576 176C576 149.5 554.5 128 528 128L112 128zM64 260L64 448C64 483.3 92.7 512 128 512L512 512C547.3 512 576 483.3 576 448L576 260L377.6 408.8C343.5 434.4 296.5 434.4 262.4 408.8L64 260z"
|
|
21
|
+
})));
|
|
11
22
|
}
|
|
12
23
|
|
|
13
24
|
exports.default = EnvelopeIcon;
|
|
@@ -3,17 +3,25 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var Icon_styled = require('./Icon.styled.cjs');
|
|
8
7
|
var kebabToSnakeCase = require('../utils/kebabToSnakeCase.cjs');
|
|
9
8
|
var map = require('../utils/map.cjs');
|
|
10
9
|
|
|
11
|
-
function Icon(
|
|
12
|
-
|
|
10
|
+
function Icon(_ref) {
|
|
11
|
+
var _ref$color = _ref.color,
|
|
12
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
13
|
+
name = _ref.name,
|
|
14
|
+
_ref$size = _ref.size,
|
|
15
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
16
|
+
var code = map.default[kebabToSnakeCase.default(name)] || "";
|
|
13
17
|
if (!code) {
|
|
14
18
|
return null;
|
|
15
19
|
}
|
|
16
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */React.createElement(Icon_styled.default, {
|
|
21
|
+
code: code,
|
|
22
|
+
color: color,
|
|
23
|
+
size: size
|
|
24
|
+
});
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
exports.default = Icon;
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
6
7
|
var react = require('@emotion/react');
|
|
7
8
|
var styled = require('@emotion/styled');
|
|
8
9
|
var getObjectProp = require('../utils/getObjectProp.cjs');
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
12
|
+
var fontSize = function fontSize(size) {
|
|
11
13
|
if (size === "small") {
|
|
12
14
|
return "12px";
|
|
13
15
|
}
|
|
@@ -18,39 +20,16 @@ const fontSize = (size) => {
|
|
|
18
20
|
return "21px";
|
|
19
21
|
}
|
|
20
22
|
if (typeof size === "number") {
|
|
21
|
-
return
|
|
23
|
+
return "".concat(size, "px");
|
|
22
24
|
}
|
|
23
25
|
return size;
|
|
24
26
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
display: inline-block;
|
|
31
|
-
|
|
32
|
-
line-height: 1;
|
|
33
|
-
vertical-align: middle;
|
|
34
|
-
position: relative;
|
|
35
|
-
top: -1px;
|
|
36
|
-
font-style: normal;
|
|
37
|
-
font-variant: normal;
|
|
38
|
-
font-size: ${fontSize(size)};
|
|
39
|
-
|
|
40
|
-
${code && react.css`
|
|
41
|
-
&:before {
|
|
42
|
-
content: '${code}';
|
|
43
|
-
}
|
|
44
|
-
`}
|
|
45
|
-
|
|
46
|
-
${color === "inherit" && react.css`
|
|
47
|
-
color: inherit;
|
|
48
|
-
`}
|
|
49
|
-
|
|
50
|
-
${color !== "inherit" && react.css`
|
|
51
|
-
color: ${getObjectProp.default(theme, `vars.palette.${color}.main`, color)};
|
|
52
|
-
`}
|
|
53
|
-
`}
|
|
54
|
-
`;
|
|
27
|
+
var StyledIcon = styled.i(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
|
|
28
|
+
var color = _ref.color,
|
|
29
|
+
code = _ref.code,
|
|
30
|
+
size = _ref.size,
|
|
31
|
+
theme = _ref.theme;
|
|
32
|
+
return react.css(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n font-family: 'FontTenancyIcon';\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n display: inline-block;\n text-rendering: auto;\n line-height: 1;\n vertical-align: middle;\n position: relative;\n top: -1px;\n font-style: normal;\n font-variant: normal;\n font-size: ", ";\n\n ", "\n\n ", "\n\n ", "\n "])), fontSize(size), code && react.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n &:before {\n content: '", "';\n }\n "])), code), color === "inherit" && react.css(_templateObject4 || (_templateObject4 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n color: inherit;\n "]))), color !== "inherit" && react.css(_templateObject5 || (_templateObject5 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n color: ", ";\n "])), getObjectProp.default(theme, "vars.palette.".concat(color, ".main"), color)));
|
|
33
|
+
});
|
|
55
34
|
|
|
56
35
|
exports.default = StyledIcon;
|
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var SVGIcon = require('./SVGIcon.cjs');
|
|
8
7
|
|
|
9
|
-
function PhoneIcon(
|
|
10
|
-
|
|
8
|
+
function PhoneIcon(_ref) {
|
|
9
|
+
var _ref$color = _ref.color,
|
|
10
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
11
|
+
_ref$size = _ref.size,
|
|
12
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
13
|
+
return /* @__PURE__ */React.createElement(SVGIcon.default, {
|
|
14
|
+
color: color,
|
|
15
|
+
size: size
|
|
16
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
viewBox: "0 0 640 640"
|
|
19
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
20
|
+
d: "M224.2 89C216.3 70.1 195.7 60.1 176.1 65.4L170.6 66.9C106 84.5 50.8 147.1 66.9 223.3C104 398.3 241.7 536 416.7 573.1C493 589.3 555.5 534 573.1 469.4L574.6 463.9C580 444.2 569.9 423.6 551.1 415.8L453.8 375.3C437.3 368.4 418.2 373.2 406.8 387.1L368.2 434.3C297.9 399.4 241.3 341 208.8 269.3L253 233.3C266.9 222 271.6 202.9 264.8 186.3L224.2 89z"
|
|
21
|
+
})));
|
|
11
22
|
}
|
|
12
23
|
|
|
13
24
|
exports.default = PhoneIcon;
|
|
@@ -3,32 +3,28 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var ui = require('@tenancy.nz/ui');
|
|
8
7
|
|
|
9
|
-
function SVGIcon({
|
|
10
|
-
children,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
children
|
|
8
|
+
function SVGIcon(_ref) {
|
|
9
|
+
var children = _ref.children,
|
|
10
|
+
_ref$color = _ref.color,
|
|
11
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
12
|
+
_ref$size = _ref.size,
|
|
13
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
14
|
+
return /* @__PURE__ */React.createElement(ui.Box, {
|
|
15
|
+
color: color,
|
|
16
|
+
fontSize: size,
|
|
17
|
+
display: "inline-flex",
|
|
18
|
+
sx: {
|
|
19
|
+
"> svg": {
|
|
20
|
+
width: "1em",
|
|
21
|
+
height: "1em",
|
|
22
|
+
fill: "currentColor",
|
|
23
|
+
color: "currentColor",
|
|
24
|
+
fontSize: "inherit"
|
|
25
|
+
}
|
|
30
26
|
}
|
|
31
|
-
);
|
|
27
|
+
}, children);
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
exports.default = SVGIcon;
|
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var SVGIcon = require('./SVGIcon.cjs');
|
|
8
7
|
|
|
9
|
-
function UserIcon(
|
|
10
|
-
|
|
8
|
+
function UserIcon(_ref) {
|
|
9
|
+
var _ref$color = _ref.color,
|
|
10
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
11
|
+
_ref$size = _ref.size,
|
|
12
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
13
|
+
return /* @__PURE__ */React.createElement(SVGIcon.default, {
|
|
14
|
+
color: color,
|
|
15
|
+
size: size
|
|
16
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18
|
+
viewBox: "0 0 640 640"
|
|
19
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
20
|
+
d: "M320 312C386.3 312 440 258.3 440 192C440 125.7 386.3 72 320 72C253.7 72 200 125.7 200 192C200 258.3 253.7 312 320 312zM290.3 368C191.8 368 112 447.8 112 546.3C112 562.7 125.3 576 141.7 576L498.3 576C514.7 576 528 562.7 528 546.3C528 447.8 448.2 368 349.7 368L290.3 368z"
|
|
21
|
+
})));
|
|
11
22
|
}
|
|
12
23
|
|
|
13
24
|
exports.default = UserIcon;
|
|
@@ -3,8 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
|
|
7
|
+
|
|
8
|
+
var isObject = function isObject(object) {
|
|
9
|
+
return _rollupPluginBabelHelpers.typeof(object) === "object" && object instanceof Object && !Array.isArray(object);
|
|
10
|
+
};
|
|
11
|
+
var getObjectProp = function getObjectProp(obj, prop) {
|
|
12
|
+
var fallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
13
|
+
return prop.split(".").reduce(function (value, key) {
|
|
14
|
+
return isObject(value) && value[key] || fallback;
|
|
15
|
+
}, obj);
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
exports.default = getObjectProp;
|
|
10
19
|
exports.isObject = isObject;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
var kebabToSnakeCase = function kebabToSnakeCase(str) {
|
|
7
|
+
return String(str).replace(/-/g, "_");
|
|
8
|
+
};
|
|
7
9
|
|
|
8
10
|
exports.default = kebabToSnakeCase;
|
package/dist/cjs/utils/map.cjs
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function _taggedTemplateLiteral(e, t) {
|
|
2
|
+
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
|
|
3
|
+
raw: {
|
|
4
|
+
value: Object.freeze(t)
|
|
5
|
+
}
|
|
6
|
+
}));
|
|
7
|
+
}
|
|
8
|
+
function _typeof(o) {
|
|
9
|
+
"@babel/helpers - typeof";
|
|
10
|
+
|
|
11
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
12
|
+
return typeof o;
|
|
13
|
+
} : function (o) {
|
|
14
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
15
|
+
}, _typeof(o);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { _taggedTemplateLiteral as taggedTemplateLiteral, _typeof as typeof };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import SVGIcon from './SVGIcon.js';
|
|
4
3
|
|
|
5
|
-
function CircleCheckIcon(
|
|
6
|
-
|
|
4
|
+
function CircleCheckIcon(_ref) {
|
|
5
|
+
var _ref$color = _ref.color,
|
|
6
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
7
|
+
_ref$size = _ref.size,
|
|
8
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
9
|
+
return /* @__PURE__ */React.createElement(SVGIcon, {
|
|
10
|
+
color: color,
|
|
11
|
+
size: size
|
|
12
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 640 640"
|
|
15
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
16
|
+
d: "M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM404.4 276.7C411.4 265.5 408 250.7 396.8 243.6C385.6 236.5 370.8 240 363.7 251.2L302.3 349.5L275.3 313.5C267.3 302.9 252.3 300.7 241.7 308.7C231.1 316.7 228.9 331.7 236.9 342.3L284.9 406.3C289.6 412.6 297.2 416.2 305.1 415.9C313 415.6 320.2 411.4 324.4 404.6L404.4 276.6z"
|
|
17
|
+
})));
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
export { CircleCheckIcon as default };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import SVGIcon from './SVGIcon.js';
|
|
4
3
|
|
|
5
|
-
function CircleTimesIcon(
|
|
6
|
-
|
|
4
|
+
function CircleTimesIcon(_ref) {
|
|
5
|
+
var _ref$color = _ref.color,
|
|
6
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
7
|
+
_ref$size = _ref.size,
|
|
8
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
9
|
+
return /* @__PURE__ */React.createElement(SVGIcon, {
|
|
10
|
+
color: color,
|
|
11
|
+
size: size
|
|
12
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 640 640"
|
|
15
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
16
|
+
d: "M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM231 231C221.6 240.4 221.6 255.6 231 264.9L286 319.9L231 374.9C221.6 384.3 221.6 399.5 231 408.8C240.4 418.1 255.6 418.2 264.9 408.8L319.9 353.8L374.9 408.8C384.3 418.2 399.5 418.2 408.8 408.8C418.1 399.4 418.2 384.2 408.8 374.9L353.8 319.9L408.8 264.9C418.2 255.5 418.2 240.3 408.8 231C399.4 221.7 384.2 221.6 374.9 231L319.9 286L264.9 231C255.5 221.6 240.3 221.6 231 231z"
|
|
17
|
+
})));
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
export { CircleTimesIcon as default };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import SVGIcon from './SVGIcon.js';
|
|
4
3
|
|
|
5
|
-
function EnvelopeIcon(
|
|
6
|
-
|
|
4
|
+
function EnvelopeIcon(_ref) {
|
|
5
|
+
var _ref$color = _ref.color,
|
|
6
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
7
|
+
_ref$size = _ref.size,
|
|
8
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
9
|
+
return /* @__PURE__ */React.createElement(SVGIcon, {
|
|
10
|
+
color: color,
|
|
11
|
+
size: size
|
|
12
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 640 640"
|
|
15
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
16
|
+
d: "M112 128C85.5 128 64 149.5 64 176C64 191.1 71.1 205.3 83.2 214.4L291.2 370.4C308.3 383.2 331.7 383.2 348.8 370.4L556.8 214.4C568.9 205.3 576 191.1 576 176C576 149.5 554.5 128 528 128L112 128zM64 260L64 448C64 483.3 92.7 512 128 512L512 512C547.3 512 576 483.3 576 448L576 260L377.6 408.8C343.5 434.4 296.5 434.4 262.4 408.8L64 260z"
|
|
17
|
+
})));
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
export { EnvelopeIcon as default };
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import StyledIcon from './Icon.styled.js';
|
|
4
3
|
import kebabToSnakeCase from '../utils/kebabToSnakeCase.js';
|
|
5
4
|
import map from '../utils/map.js';
|
|
6
5
|
|
|
7
|
-
function Icon(
|
|
8
|
-
|
|
6
|
+
function Icon(_ref) {
|
|
7
|
+
var _ref$color = _ref.color,
|
|
8
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
9
|
+
name = _ref.name,
|
|
10
|
+
_ref$size = _ref.size,
|
|
11
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
12
|
+
var code = map[kebabToSnakeCase(name)] || "";
|
|
9
13
|
if (!code) {
|
|
10
14
|
return null;
|
|
11
15
|
}
|
|
12
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */React.createElement(StyledIcon, {
|
|
17
|
+
code: code,
|
|
18
|
+
color: color,
|
|
19
|
+
size: size
|
|
20
|
+
});
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
export { Icon as default };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
3
|
import { css } from '@emotion/react';
|
|
3
4
|
import styled from '@emotion/styled';
|
|
4
5
|
import getObjectProp from '../utils/getObjectProp.js';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
8
|
+
var fontSize = function fontSize(size) {
|
|
7
9
|
if (size === "small") {
|
|
8
10
|
return "12px";
|
|
9
11
|
}
|
|
@@ -14,39 +16,16 @@ const fontSize = (size) => {
|
|
|
14
16
|
return "21px";
|
|
15
17
|
}
|
|
16
18
|
if (typeof size === "number") {
|
|
17
|
-
return
|
|
19
|
+
return "".concat(size, "px");
|
|
18
20
|
}
|
|
19
21
|
return size;
|
|
20
22
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
display: inline-block;
|
|
27
|
-
|
|
28
|
-
line-height: 1;
|
|
29
|
-
vertical-align: middle;
|
|
30
|
-
position: relative;
|
|
31
|
-
top: -1px;
|
|
32
|
-
font-style: normal;
|
|
33
|
-
font-variant: normal;
|
|
34
|
-
font-size: ${fontSize(size)};
|
|
35
|
-
|
|
36
|
-
${code && css`
|
|
37
|
-
&:before {
|
|
38
|
-
content: '${code}';
|
|
39
|
-
}
|
|
40
|
-
`}
|
|
41
|
-
|
|
42
|
-
${color === "inherit" && css`
|
|
43
|
-
color: inherit;
|
|
44
|
-
`}
|
|
45
|
-
|
|
46
|
-
${color !== "inherit" && css`
|
|
47
|
-
color: ${getObjectProp(theme, `vars.palette.${color}.main`, color)};
|
|
48
|
-
`}
|
|
49
|
-
`}
|
|
50
|
-
`;
|
|
23
|
+
var StyledIcon = styled.i(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref) {
|
|
24
|
+
var color = _ref.color,
|
|
25
|
+
code = _ref.code,
|
|
26
|
+
size = _ref.size,
|
|
27
|
+
theme = _ref.theme;
|
|
28
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-family: 'FontTenancyIcon';\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n display: inline-block;\n text-rendering: auto;\n line-height: 1;\n vertical-align: middle;\n position: relative;\n top: -1px;\n font-style: normal;\n font-variant: normal;\n font-size: ", ";\n\n ", "\n\n ", "\n\n ", "\n "])), fontSize(size), code && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &:before {\n content: '", "';\n }\n "])), code), color === "inherit" && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: inherit;\n "]))), color !== "inherit" && css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n "])), getObjectProp(theme, "vars.palette.".concat(color, ".main"), color)));
|
|
29
|
+
});
|
|
51
30
|
|
|
52
31
|
export { StyledIcon as default };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import SVGIcon from './SVGIcon.js';
|
|
4
3
|
|
|
5
|
-
function PhoneIcon(
|
|
6
|
-
|
|
4
|
+
function PhoneIcon(_ref) {
|
|
5
|
+
var _ref$color = _ref.color,
|
|
6
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
7
|
+
_ref$size = _ref.size,
|
|
8
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
9
|
+
return /* @__PURE__ */React.createElement(SVGIcon, {
|
|
10
|
+
color: color,
|
|
11
|
+
size: size
|
|
12
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 640 640"
|
|
15
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
16
|
+
d: "M224.2 89C216.3 70.1 195.7 60.1 176.1 65.4L170.6 66.9C106 84.5 50.8 147.1 66.9 223.3C104 398.3 241.7 536 416.7 573.1C493 589.3 555.5 534 573.1 469.4L574.6 463.9C580 444.2 569.9 423.6 551.1 415.8L453.8 375.3C437.3 368.4 418.2 373.2 406.8 387.1L368.2 434.3C297.9 399.4 241.3 341 208.8 269.3L253 233.3C266.9 222 271.6 202.9 264.8 186.3L224.2 89z"
|
|
17
|
+
})));
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
export { PhoneIcon as default };
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { Box } from '@tenancy.nz/ui';
|
|
4
3
|
|
|
5
|
-
function SVGIcon({
|
|
6
|
-
children,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
children
|
|
4
|
+
function SVGIcon(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
_ref$color = _ref.color,
|
|
7
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
8
|
+
_ref$size = _ref.size,
|
|
9
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
10
|
+
return /* @__PURE__ */React.createElement(Box, {
|
|
11
|
+
color: color,
|
|
12
|
+
fontSize: size,
|
|
13
|
+
display: "inline-flex",
|
|
14
|
+
sx: {
|
|
15
|
+
"> svg": {
|
|
16
|
+
width: "1em",
|
|
17
|
+
height: "1em",
|
|
18
|
+
fill: "currentColor",
|
|
19
|
+
color: "currentColor",
|
|
20
|
+
fontSize: "inherit"
|
|
21
|
+
}
|
|
26
22
|
}
|
|
27
|
-
);
|
|
23
|
+
}, children);
|
|
28
24
|
}
|
|
29
25
|
|
|
30
26
|
export { SVGIcon as default };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import SVGIcon from './SVGIcon.js';
|
|
4
3
|
|
|
5
|
-
function UserIcon(
|
|
6
|
-
|
|
4
|
+
function UserIcon(_ref) {
|
|
5
|
+
var _ref$color = _ref.color,
|
|
6
|
+
color = _ref$color === void 0 ? "inherit" : _ref$color,
|
|
7
|
+
_ref$size = _ref.size,
|
|
8
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
|
9
|
+
return /* @__PURE__ */React.createElement(SVGIcon, {
|
|
10
|
+
color: color,
|
|
11
|
+
size: size
|
|
12
|
+
}, /* @__PURE__ */React.createElement("svg", {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 640 640"
|
|
15
|
+
}, /* @__PURE__ */React.createElement("path", {
|
|
16
|
+
d: "M320 312C386.3 312 440 258.3 440 192C440 125.7 386.3 72 320 72C253.7 72 200 125.7 200 192C200 258.3 253.7 312 320 312zM290.3 368C191.8 368 112 447.8 112 546.3C112 562.7 125.3 576 141.7 576L498.3 576C514.7 576 528 562.7 528 546.3C528 447.8 448.2 368 349.7 368L290.3 368z"
|
|
17
|
+
})));
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
export { UserIcon as default };
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { typeof as _typeof } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
|
|
4
|
+
var isObject = function isObject(object) {
|
|
5
|
+
return _typeof(object) === "object" && object instanceof Object && !Array.isArray(object);
|
|
6
|
+
};
|
|
7
|
+
var getObjectProp = function getObjectProp(obj, prop) {
|
|
8
|
+
var fallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
9
|
+
return prop.split(".").reduce(function (value, key) {
|
|
10
|
+
return isObject(value) && value[key] || fallback;
|
|
11
|
+
}, obj);
|
|
12
|
+
};
|
|
4
13
|
|
|
5
14
|
export { getObjectProp as default, isObject };
|
package/dist/esm/utils/map.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenancy.nz/icons",
|
|
3
3
|
"description": "Icon library for TPS UI.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.7",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/cjs/index.cjs",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"@emotion/styled": "^11.14.1",
|
|
16
16
|
"react": ">= 16.0.0 <= 18.3.1",
|
|
17
17
|
"react-dom": ">= 16.0.0 <= 18.3.1",
|
|
18
|
-
"@tenancy.nz/ui": "1.0.
|
|
18
|
+
"@tenancy.nz/ui": "1.0.7"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tenancy.nz/ui": "1.0.
|
|
21
|
+
"@tenancy.nz/ui": "1.0.7"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsx ../../scripts/build.js"
|