@dhis2/ui-icons 7.2.8 → 7.3.0

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,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CompleteIconSet = exports.default = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var icons = _interopRequireWildcard(require("./react/index.js"));
11
+
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ const description = `
19
+ A suite of icons is provided by the UI library; a list is shown below with the
20
+ icon's component name and a demo of the icon. The number in the name refers to
21
+ the size of the icon in px.
22
+
23
+ Each icon accepts a \`color\` prop that will be applied to the underlying SVG
24
+ element.
25
+
26
+ **Example usage:**
27
+
28
+ \`\`\`jsx
29
+ import { IconAdd16, colors } from '@dhis2/ui'
30
+
31
+ const IconDemo = () => {
32
+ return <IconAdd16 color={colors.blue700} />
33
+ }
34
+ \`\`\`
35
+ `;
36
+ var _default = {
37
+ title: 'Icons/List',
38
+ component: icons.IconAdd16,
39
+ parameters: {
40
+ docs: {
41
+ description: {
42
+ component: description
43
+ }
44
+ }
45
+ }
46
+ };
47
+ exports.default = _default;
48
+
49
+ const CompleteIconSet = () => /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("h4", null, "Name")), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("h4", null, "Icon")))), /*#__PURE__*/_react.default.createElement("tbody", null, Object.keys(icons).map(key => {
50
+ // eslint-disable-next-line import/namespace
51
+ const Icon = icons[key];
52
+ return /*#__PURE__*/_react.default.createElement("tr", {
53
+ key: key
54
+ }, /*#__PURE__*/_react.default.createElement("td", null, key), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(Icon, null)));
55
+ })));
56
+
57
+ exports.CompleteIconSet = CompleteIconSet;
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import * as icons from './react/index.js';
3
+ const description = `
4
+ A suite of icons is provided by the UI library; a list is shown below with the
5
+ icon's component name and a demo of the icon. The number in the name refers to
6
+ the size of the icon in px.
7
+
8
+ Each icon accepts a \`color\` prop that will be applied to the underlying SVG
9
+ element.
10
+
11
+ **Example usage:**
12
+
13
+ \`\`\`jsx
14
+ import { IconAdd16, colors } from '@dhis2/ui'
15
+
16
+ const IconDemo = () => {
17
+ return <IconAdd16 color={colors.blue700} />
18
+ }
19
+ \`\`\`
20
+ `;
21
+ export default {
22
+ title: 'Icons/List',
23
+ component: icons.IconAdd16,
24
+ parameters: {
25
+ docs: {
26
+ description: {
27
+ component: description
28
+ }
29
+ }
30
+ }
31
+ };
32
+ export const CompleteIconSet = () => /*#__PURE__*/React.createElement("table", null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("h4", null, "Name")), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("h4", null, "Icon")))), /*#__PURE__*/React.createElement("tbody", null, Object.keys(icons).map(key => {
33
+ // eslint-disable-next-line import/namespace
34
+ const Icon = icons[key];
35
+ return /*#__PURE__*/React.createElement("tr", {
36
+ key: key
37
+ }, /*#__PURE__*/React.createElement("td", null, key), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement(Icon, null)));
38
+ })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/ui-icons",
3
- "version": "7.2.8",
3
+ "version": "7.3.0",
4
4
  "description": "Icons used in the UI libs",
5
5
  "main": "./build/cjs/react/index.js",
6
6
  "module": "./build/es/react/index.js",