@tenancy.nz/icons 1.0.0 → 1.0.2

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.
@@ -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;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var SVGIcon = require('./SVGIcon.cjs');
7
+
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
+ })));
22
+ }
23
+
24
+ exports.default = CircleCheckIcon;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var SVGIcon = require('./SVGIcon.cjs');
7
+
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
+ })));
22
+ }
23
+
24
+ exports.default = CircleTimesIcon;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var SVGIcon = require('./SVGIcon.cjs');
7
+
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
+ })));
22
+ }
23
+
24
+ exports.default = EnvelopeIcon;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var Icon_styled = require('./Icon.styled.cjs');
7
+ var kebabToSnakeCase = require('../utils/kebabToSnakeCase.cjs');
8
+ var map = require('../utils/map.cjs');
9
+
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)] || "";
17
+ if (!code) {
18
+ return null;
19
+ }
20
+ return /* @__PURE__ */React.createElement(Icon_styled.default, {
21
+ code: code,
22
+ color: color,
23
+ size: size
24
+ });
25
+ }
26
+
27
+ exports.default = Icon;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.cjs');
7
+ var react = require('@emotion/react');
8
+ var styled = require('@emotion/styled');
9
+ var getObjectProp = require('../utils/getObjectProp.cjs');
10
+
11
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
12
+ var fontSize = function fontSize(size) {
13
+ if (size === "small") {
14
+ return "12px";
15
+ }
16
+ if (size === "medium") {
17
+ return "16px";
18
+ }
19
+ if (size === "large") {
20
+ return "21px";
21
+ }
22
+ if (typeof size === "number") {
23
+ return "".concat(size, "px");
24
+ }
25
+ return size;
26
+ };
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
+ });
34
+
35
+ exports.default = StyledIcon;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var SVGIcon = require('./SVGIcon.cjs');
7
+
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
+ })));
22
+ }
23
+
24
+ exports.default = PhoneIcon;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var ui = require('@tenancy.nz/ui');
7
+
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
+ }
26
+ }
27
+ }, children);
28
+ }
29
+
30
+ exports.default = SVGIcon;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var SVGIcon = require('./SVGIcon.cjs');
7
+
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
+ })));
22
+ }
23
+
24
+ exports.default = UserIcon;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var Icon = require('./components/Icon.cjs');
5
+ var CircleCheckIcon = require('./components/CircleCheckIcon.cjs');
6
+ var CircleTimesIcon = require('./components/CircleTimesIcon.cjs');
7
+ var EnvelopeIcon = require('./components/EnvelopeIcon.cjs');
8
+ var PhoneIcon = require('./components/PhoneIcon.cjs');
9
+ var UserIcon = require('./components/UserIcon.cjs');
10
+ var SVGIcon = require('./components/SVGIcon.cjs');
11
+
12
+
13
+
14
+ exports.Icon = Icon.default;
15
+ exports.CircleCheckIcon = CircleCheckIcon.default;
16
+ exports.CircleTimesIcon = CircleTimesIcon.default;
17
+ exports.EnvelopeIcon = EnvelopeIcon.default;
18
+ exports.PhoneIcon = PhoneIcon.default;
19
+ exports.UserIcon = UserIcon.default;
20
+ exports.SVGIcon = SVGIcon.default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
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
+ };
17
+
18
+ exports.default = getObjectProp;
19
+ exports.isObject = isObject;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var kebabToSnakeCase = function kebabToSnakeCase(str) {
7
+ return String(str).replace(/-/g, "_");
8
+ };
9
+
10
+ exports.default = kebabToSnakeCase;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var map = {
7
+ apple: "\\e000",
8
+ book_reader: "\\e003",
9
+ brand_bullhorn: "\\e02a",
10
+ brand_crown: "\\e02d",
11
+ brand_file_check: "\\e02b",
12
+ brand_graduation_cap: "\\e02c",
13
+ building: "\\e006",
14
+ buildings: "\\e005",
15
+ bullhorn: "\\e01b",
16
+ certificate: "\\e008",
17
+ chart_pie: "\\e020",
18
+ bolt_circle: "\\e023",
19
+ dollar_circle: "\\e009",
20
+ undo_circle: "\\e027",
21
+ cog: "\\e012",
22
+ comments: "\\e024",
23
+ contrast: "\\e025",
24
+ crown: "\\e00a",
25
+ desktop: "\\e01d",
26
+ envelope: "\\e014",
27
+ file_add: "\\E041",
28
+ file_acrobat: "\\E040",
29
+ file_check_alt: "\\e018",
30
+ file_check: "\\e019",
31
+ file_dollar: "\\e00d",
32
+ file_edit: "\\e01a",
33
+ file_upload: "\\e017",
34
+ file: "\\e00c",
35
+ files: "\\e016",
36
+ folder_check: "\\e013",
37
+ gem: "\\e00b",
38
+ graduation_cap: "\\e007",
39
+ home_check: "\\e010",
40
+ home: "\\e011",
41
+ map_marker: "\\e00f",
42
+ newspaper: "\\e026",
43
+ padlock: "\\e01e",
44
+ pencil: "\\e01f",
45
+ rocket: "\\e022",
46
+ search_dollar: "\\e01c",
47
+ search: "\\e00e",
48
+ signal: "\\e001",
49
+ suitcase: "\\e004",
50
+ training: "\\e021",
51
+ user_add: "\\e028",
52
+ users_add: "\\e002",
53
+ users: "\\e029",
54
+ archive: "\\E02E",
55
+ plus_minus: "\\E02F",
56
+ ticked: "\\E030",
57
+ times: "\\E031",
58
+ arrow_left: "\\E032",
59
+ paper_plane: "\\E033",
60
+ align_center: "\\E035",
61
+ align_justify: "\\E036",
62
+ align_start: "\\E037",
63
+ align_end: "\\E038",
64
+ back: "\\E039",
65
+ bold: "\\E03A",
66
+ calendar: "\\E03B",
67
+ clock: "\\E03C",
68
+ clock_back: "\\E03D",
69
+ delete_circle: "\\E03E",
70
+ delete_thin: "\\E03F",
71
+ link: "\\E042",
72
+ list_unordered: "\\E043",
73
+ list_ordered: "\\E044",
74
+ search_thin: "\\E045",
75
+ menu: "\\E046",
76
+ add_circle: "\\E047",
77
+ question_mark: "\\E048",
78
+ cut: "\\E049",
79
+ scissors: "\\E049",
80
+ slash: "\\E04A",
81
+ star_alt: "\\E04B",
82
+ star: "\\E04C",
83
+ text_zoom: "\\E04D",
84
+ underline: "\\E04E",
85
+ user_double: "\\E04F",
86
+ user_remove: "\\E050",
87
+ user_verify: "\\E051",
88
+ bath: "\\E052",
89
+ bed: "\\E053",
90
+ clock_add: "\\E055",
91
+ car: "\\E054",
92
+ shield_add: "\\E034",
93
+ grid: "\\E056",
94
+ arrow_circle: "\\E05d",
95
+ console: "\\E05e",
96
+ photo: "\\E05f",
97
+ property_file: "\\E060",
98
+ property_me: "\\E061",
99
+ property_tree: "\\E062",
100
+ mri_property_tree: "\\E06f",
101
+ palace: "\\E063",
102
+ mri_palace: "\\E06e",
103
+ fan: "\\E057",
104
+ giraffe: "\\E058",
105
+ gust: "\\E059",
106
+ heating: "\\E05a",
107
+ cloud_rain: "\\E05b",
108
+ smoke_alarm: "\\E05c",
109
+ monitor: "\\E01d",
110
+ allclear: "\\E064",
111
+ beer: "\\E065",
112
+ attachment: "\\E066",
113
+ dots_outline: "\\E067",
114
+ dots_solid: "\\E068",
115
+ download: "\\E069",
116
+ eye_off: "\\E06a",
117
+ eye_on: "\\E06b",
118
+ pizza: "\\E06c",
119
+ sats: "\\E06d",
120
+ play: "\\E070",
121
+ bulb: "\\E071",
122
+ console_alt: "\\E073",
123
+ id_card: "\\E05e",
124
+ notes: "\\E074",
125
+ id_check: "\\E072",
126
+ info: "\\E075",
127
+ trash: "\\E076",
128
+ arrow_right: "\\E077",
129
+ calendar_clock: "\\E078",
130
+ alarm_clock: "\\E079",
131
+ logout: "\\E07a",
132
+ integration: "\\E07b",
133
+ tenancy_services: "\\e07c",
134
+ menu_filled: "\\e07d",
135
+ plus_filled: "\\e07e",
136
+ bot: "\\e07f",
137
+ strike_through: "\\e080"
138
+ };
139
+
140
+ exports.default = map;
@@ -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 };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ import SVGIcon from './SVGIcon.js';
3
+
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
+ })));
18
+ }
19
+
20
+ export { CircleCheckIcon as default };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ import SVGIcon from './SVGIcon.js';
3
+
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
+ })));
18
+ }
19
+
20
+ export { CircleTimesIcon as default };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ import SVGIcon from './SVGIcon.js';
3
+
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
+ })));
18
+ }
19
+
20
+ export { EnvelopeIcon as default };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ import StyledIcon from './Icon.styled.js';
3
+ import kebabToSnakeCase from '../utils/kebabToSnakeCase.js';
4
+ import map from '../utils/map.js';
5
+
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)] || "";
13
+ if (!code) {
14
+ return null;
15
+ }
16
+ return /* @__PURE__ */React.createElement(StyledIcon, {
17
+ code: code,
18
+ color: color,
19
+ size: size
20
+ });
21
+ }
22
+
23
+ export { Icon as default };
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../_virtual/_rollupPluginBabelHelpers.js';
3
+ import { css } from '@emotion/react';
4
+ import styled from '@emotion/styled';
5
+ import getObjectProp from '../utils/getObjectProp.js';
6
+
7
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
8
+ var fontSize = function fontSize(size) {
9
+ if (size === "small") {
10
+ return "12px";
11
+ }
12
+ if (size === "medium") {
13
+ return "16px";
14
+ }
15
+ if (size === "large") {
16
+ return "21px";
17
+ }
18
+ if (typeof size === "number") {
19
+ return "".concat(size, "px");
20
+ }
21
+ return size;
22
+ };
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
+ });
30
+
31
+ export { StyledIcon as default };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ import SVGIcon from './SVGIcon.js';
3
+
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
+ })));
18
+ }
19
+
20
+ export { PhoneIcon as default };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ import { Box } from '@tenancy.nz/ui';
3
+
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
+ }
22
+ }
23
+ }, children);
24
+ }
25
+
26
+ export { SVGIcon as default };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ import SVGIcon from './SVGIcon.js';
3
+
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
+ })));
18
+ }
19
+
20
+ export { UserIcon as default };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ export { default as Icon } from './components/Icon.js';
3
+ export { default as CircleCheckIcon } from './components/CircleCheckIcon.js';
4
+ export { default as CircleTimesIcon } from './components/CircleTimesIcon.js';
5
+ export { default as EnvelopeIcon } from './components/EnvelopeIcon.js';
6
+ export { default as PhoneIcon } from './components/PhoneIcon.js';
7
+ export { default as UserIcon } from './components/UserIcon.js';
8
+ export { default as SVGIcon } from './components/SVGIcon.js';
@@ -0,0 +1,14 @@
1
+ "use strict";
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
+ };
13
+
14
+ export { getObjectProp as default, isObject };
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ var kebabToSnakeCase = function kebabToSnakeCase(str) {
3
+ return String(str).replace(/-/g, "_");
4
+ };
5
+
6
+ export { kebabToSnakeCase as default };
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ var map = {
3
+ apple: "\\e000",
4
+ book_reader: "\\e003",
5
+ brand_bullhorn: "\\e02a",
6
+ brand_crown: "\\e02d",
7
+ brand_file_check: "\\e02b",
8
+ brand_graduation_cap: "\\e02c",
9
+ building: "\\e006",
10
+ buildings: "\\e005",
11
+ bullhorn: "\\e01b",
12
+ certificate: "\\e008",
13
+ chart_pie: "\\e020",
14
+ bolt_circle: "\\e023",
15
+ dollar_circle: "\\e009",
16
+ undo_circle: "\\e027",
17
+ cog: "\\e012",
18
+ comments: "\\e024",
19
+ contrast: "\\e025",
20
+ crown: "\\e00a",
21
+ desktop: "\\e01d",
22
+ envelope: "\\e014",
23
+ file_add: "\\E041",
24
+ file_acrobat: "\\E040",
25
+ file_check_alt: "\\e018",
26
+ file_check: "\\e019",
27
+ file_dollar: "\\e00d",
28
+ file_edit: "\\e01a",
29
+ file_upload: "\\e017",
30
+ file: "\\e00c",
31
+ files: "\\e016",
32
+ folder_check: "\\e013",
33
+ gem: "\\e00b",
34
+ graduation_cap: "\\e007",
35
+ home_check: "\\e010",
36
+ home: "\\e011",
37
+ map_marker: "\\e00f",
38
+ newspaper: "\\e026",
39
+ padlock: "\\e01e",
40
+ pencil: "\\e01f",
41
+ rocket: "\\e022",
42
+ search_dollar: "\\e01c",
43
+ search: "\\e00e",
44
+ signal: "\\e001",
45
+ suitcase: "\\e004",
46
+ training: "\\e021",
47
+ user_add: "\\e028",
48
+ users_add: "\\e002",
49
+ users: "\\e029",
50
+ archive: "\\E02E",
51
+ plus_minus: "\\E02F",
52
+ ticked: "\\E030",
53
+ times: "\\E031",
54
+ arrow_left: "\\E032",
55
+ paper_plane: "\\E033",
56
+ align_center: "\\E035",
57
+ align_justify: "\\E036",
58
+ align_start: "\\E037",
59
+ align_end: "\\E038",
60
+ back: "\\E039",
61
+ bold: "\\E03A",
62
+ calendar: "\\E03B",
63
+ clock: "\\E03C",
64
+ clock_back: "\\E03D",
65
+ delete_circle: "\\E03E",
66
+ delete_thin: "\\E03F",
67
+ link: "\\E042",
68
+ list_unordered: "\\E043",
69
+ list_ordered: "\\E044",
70
+ search_thin: "\\E045",
71
+ menu: "\\E046",
72
+ add_circle: "\\E047",
73
+ question_mark: "\\E048",
74
+ cut: "\\E049",
75
+ scissors: "\\E049",
76
+ slash: "\\E04A",
77
+ star_alt: "\\E04B",
78
+ star: "\\E04C",
79
+ text_zoom: "\\E04D",
80
+ underline: "\\E04E",
81
+ user_double: "\\E04F",
82
+ user_remove: "\\E050",
83
+ user_verify: "\\E051",
84
+ bath: "\\E052",
85
+ bed: "\\E053",
86
+ clock_add: "\\E055",
87
+ car: "\\E054",
88
+ shield_add: "\\E034",
89
+ grid: "\\E056",
90
+ arrow_circle: "\\E05d",
91
+ console: "\\E05e",
92
+ photo: "\\E05f",
93
+ property_file: "\\E060",
94
+ property_me: "\\E061",
95
+ property_tree: "\\E062",
96
+ mri_property_tree: "\\E06f",
97
+ palace: "\\E063",
98
+ mri_palace: "\\E06e",
99
+ fan: "\\E057",
100
+ giraffe: "\\E058",
101
+ gust: "\\E059",
102
+ heating: "\\E05a",
103
+ cloud_rain: "\\E05b",
104
+ smoke_alarm: "\\E05c",
105
+ monitor: "\\E01d",
106
+ allclear: "\\E064",
107
+ beer: "\\E065",
108
+ attachment: "\\E066",
109
+ dots_outline: "\\E067",
110
+ dots_solid: "\\E068",
111
+ download: "\\E069",
112
+ eye_off: "\\E06a",
113
+ eye_on: "\\E06b",
114
+ pizza: "\\E06c",
115
+ sats: "\\E06d",
116
+ play: "\\E070",
117
+ bulb: "\\E071",
118
+ console_alt: "\\E073",
119
+ id_card: "\\E05e",
120
+ notes: "\\E074",
121
+ id_check: "\\E072",
122
+ info: "\\E075",
123
+ trash: "\\E076",
124
+ arrow_right: "\\E077",
125
+ calendar_clock: "\\E078",
126
+ alarm_clock: "\\E079",
127
+ logout: "\\E07a",
128
+ integration: "\\E07b",
129
+ tenancy_services: "\\e07c",
130
+ menu_filled: "\\e07d",
131
+ plus_filled: "\\e07e",
132
+ bot: "\\e07f",
133
+ strike_through: "\\e080"
134
+ };
135
+
136
+ export { map as default };
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.0",
4
+ "version": "1.0.2",
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.0"
18
+ "@tenancy.nz/ui": "1.0.5"
19
19
  },
20
20
  "devDependencies": {
21
- "@tenancy.nz/ui": "1.0.0"
21
+ "@tenancy.nz/ui": "1.0.5"
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tsx ../../scripts/build.js"