@narmi/design_system 2.43.3 → 2.43.5-beta.1
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/icons/Icons.stories.jsx +74 -0
- package/dist/icons/fonts/icomoon.svg +340 -0
- package/dist/icons/fonts/icomoon.ttf +0 -0
- package/dist/icons/fonts/icomoon.woff +0 -0
- package/dist/icons/fonts/icomoon.woff2 +0 -0
- package/dist/icons/style.css +1031 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/style.css +7 -3
- package/dist/style.css.map +1 -1
- package/dist/tokens/css/rgbColors.css +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/js/colors.js +1 -1
- package/dist/tokens/js/manifest.js +137 -137
- package/dist/tokens/js/reactNativeWeb.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import {
|
|
4
|
+
Title,
|
|
5
|
+
Subtitle,
|
|
6
|
+
Primary,
|
|
7
|
+
Stories,
|
|
8
|
+
} from '@storybook/addon-docs';
|
|
9
|
+
import iconSelection from "dist/icons/selection.json";
|
|
10
|
+
import compatIcons from "./compat-icons";
|
|
11
|
+
|
|
12
|
+
const IconDocs = ({ iconNames }) => {
|
|
13
|
+
return (
|
|
14
|
+
<div className="nds-typography">
|
|
15
|
+
<div className="icon-demo">
|
|
16
|
+
{iconNames.map((name) => (
|
|
17
|
+
<div key={name} className="icon-demo-box">
|
|
18
|
+
<span className={`icon-demo-icon narmi-icon-${name}`}> </span>
|
|
19
|
+
<span className="icon-demo-title">{name}</span>
|
|
20
|
+
</div>
|
|
21
|
+
))}
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
IconDocs.propTypes = {
|
|
28
|
+
iconNames: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Main Icons story
|
|
32
|
+
export const Icons = () => {
|
|
33
|
+
const iconNames = [];
|
|
34
|
+
|
|
35
|
+
iconSelection.icons.forEach((iconData) => {
|
|
36
|
+
const namesAndAliases = iconData.properties.name.split(",");
|
|
37
|
+
namesAndAliases.forEach((name) => {
|
|
38
|
+
iconNames.push(name.trim());
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
return <IconDocs iconNames={iconNames} />;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Mobile-Compatible Icons story
|
|
45
|
+
export const MobileCompatibleIcons = () => (
|
|
46
|
+
<>
|
|
47
|
+
<IconDocs iconNames={compatIcons.icons} />
|
|
48
|
+
</>
|
|
49
|
+
);
|
|
50
|
+
MobileCompatibleIcons.parameters = {
|
|
51
|
+
docs: {
|
|
52
|
+
description: {
|
|
53
|
+
story: `This set of icons is safe to use in our mobile application.
|
|
54
|
+
These shapes are supported down to release \`v2022.7\` (NDS version \`v2.21.2\`)
|
|
55
|
+
to account for users on older versions of the mobile app.`,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default {
|
|
61
|
+
title: "Style/Icons",
|
|
62
|
+
parameters: {
|
|
63
|
+
docs: {
|
|
64
|
+
page: () => (
|
|
65
|
+
<>
|
|
66
|
+
<Title />
|
|
67
|
+
<Subtitle />
|
|
68
|
+
<Primary />
|
|
69
|
+
<Stories />
|
|
70
|
+
</>
|
|
71
|
+
),
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
};
|