@narmi/design_system 4.46.0 → 4.46.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/index.js +102 -3
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -2132
- 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.esm.js +99 -0
- package/dist/tokens/js/colors.js +1 -1
- package/dist/tokens/js/manifest.esm.js +187 -0
- package/dist/tokens/js/manifest.js +148 -2664
- package/dist/tokens/js/reactNativeWeb.js +1 -1
- package/dist/types/Alert/index.d.ts +2 -2
- package/dist/types/AutocompleteModal/AutoComplete.d.ts +1 -1
- package/dist/types/AutocompleteModal/Item.d.ts +1 -1
- package/dist/types/AutocompleteModal/index.d.ts +4 -4
- package/dist/types/Button/index.d.ts +2 -2
- package/dist/types/Checkbox/index.d.ts +1 -1
- package/dist/types/Chip/index.d.ts +2 -2
- package/dist/types/ContentCard/index.d.ts +1 -1
- package/dist/types/ContextMenu/index.d.ts +1 -1
- package/dist/types/Dialog/index.d.ts +1 -1
- package/dist/types/DisabledShim/index.d.ts +2 -2
- package/dist/types/LoadingSkeleton/index.d.ts +1 -1
- package/dist/types/Radio/index.d.ts +1 -1
- package/dist/types/RadioButtons/index.d.ts +2 -2
- package/dist/types/Row/RowItem.d.ts +1 -1
- package/dist/types/Row/index.d.ts +2 -2
- package/dist/types/SeparatorList/index.d.ts +1 -1
- package/dist/types/Snackbar/index.d.ts +1 -1
- package/dist/types/SplitButton/SplitButtonMenu.d.ts +1 -1
- package/dist/types/SplitButton/SplitButtonPopover.d.ts +1 -1
- package/dist/types/SplitButton/index.d.ts +4 -4
- package/dist/types/Table/Body.d.ts +1 -1
- package/dist/types/Table/Cell.d.ts +1 -1
- package/dist/types/Table/Header.d.ts +1 -1
- package/dist/types/Table/HeaderCell.d.ts +1 -1
- package/dist/types/Table/Row.d.ts +1 -1
- package/dist/types/Table/index.d.ts +4 -4
- package/dist/types/Table/util/breakpoint.d.ts +1 -1
- package/dist/types/Table/util/colVisibilityContext.d.ts +2 -2
- package/dist/types/Table/util/grid.d.ts +1 -1
- package/dist/types/TableAutocomplete/Item.d.ts +1 -1
- package/dist/types/TableAutocomplete/index.d.ts +3 -3
- package/dist/types/TableInput/index.d.ts +1 -1
- package/dist/types/Tabs/TabsList.d.ts +1 -1
- package/dist/types/Tabs/TabsPanel.d.ts +1 -1
- package/dist/types/Tabs/context.d.ts +1 -1
- package/dist/types/Tabs/index.d.ts +4 -4
- package/dist/types/Tooltip/index.d.ts +1 -1
- package/dist/types/index.d.ts +30 -33
- package/package.json +14 -11
- package/dist/fonts/8b53d5067b416b155cc8.woff +0 -0
- package/dist/fonts/d819207ee2e092cc2735.woff2 +0 -0
- package/dist/icons/Icons.stories.jsx +0 -74
- package/dist/icons/README.md +0 -29
- package/dist/icons/fonts/icomoon.svg +0 -347
- package/dist/icons/fonts/icomoon.ttf +0 -0
- package/dist/icons/fonts/icomoon.woff +0 -0
- package/dist/index.js.LICENSE.txt +0 -35
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconName } from '../types/Icon.types';
|
|
3
3
|
interface AlertProps {
|
|
4
4
|
/** The alert is only visible when this prop is set to `true` */
|
|
5
5
|
isActive?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
export interface AutocompleteModalProps {
|
|
3
3
|
/** Input label */
|
|
4
4
|
inputLabel: string;
|
|
@@ -30,9 +30,9 @@ declare const AutocompleteModal: {
|
|
|
30
30
|
}): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
displayName: string;
|
|
32
32
|
propTypes: {
|
|
33
|
-
value: import(
|
|
34
|
-
searchValue: import(
|
|
35
|
-
children: import(
|
|
33
|
+
value: import('prop-types').Validator<string>;
|
|
34
|
+
searchValue: import('prop-types').Requireable<string>;
|
|
35
|
+
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconName } from '../types/Icon.types';
|
|
3
3
|
export declare const VALID_KINDS: readonly ["info", "success", "warn", "error", "primary", "secondary"];
|
|
4
4
|
interface ChipProps {
|
|
5
5
|
/** String to render within chip */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RadioKind } from '../Radio';
|
|
3
3
|
type RadioButtonsLayouts = "row" | "row-start";
|
|
4
4
|
type RadioButtonsKind = RadioKind | RadioButtonsLayouts;
|
|
5
5
|
interface RadioButtonsProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
export interface RowProps {
|
|
3
3
|
/**
|
|
4
4
|
* Adjusts size of gap between row items.
|
|
@@ -27,7 +27,7 @@ export interface RowProps {
|
|
|
27
27
|
*/
|
|
28
28
|
declare const Row: {
|
|
29
29
|
({ alignItems, justifyContent, gapSize, as, className, children, testId, }: RowProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
Item: ({ shrink, as, className, children, testId, }: import(
|
|
30
|
+
Item: ({ shrink, as, className, children, testId, }: import('./RowItem').RowItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
};
|
|
32
32
|
export default Row;
|
|
33
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ButtonProps } from
|
|
3
|
-
import { SplitButtonPopoverProps } from
|
|
4
|
-
import { SplitButtonMenuProps } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
import { SplitButtonPopoverProps } from './SplitButtonPopover';
|
|
4
|
+
import { SplitButtonMenuProps } from './SplitButtonMenu';
|
|
5
5
|
interface SplitButtonProps extends ButtonProps {
|
|
6
6
|
children: React.ReactElement<SplitButtonPopoverProps> | React.ReactElement<SplitButtonMenuProps>;
|
|
7
7
|
kind?: "primary" | "secondary" | "tonal";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
/** Minimum size at which to show a column. "*" means "all" */
|
|
3
3
|
export type ColMinBreakpoint = "*" | "s" | "m" | "l";
|
|
4
4
|
/** Subset of breakpoints that can be returned by `useBreakpoints` hook */
|
|
@@ -51,9 +51,9 @@ declare const Table: {
|
|
|
51
51
|
Body: ({ children }: {
|
|
52
52
|
children: React.ReactNode;
|
|
53
53
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
Row: ({ children, onRowClick }: import(
|
|
55
|
-
Cell: ({ children, textAlign, _colIndex }: import(
|
|
56
|
-
HeaderCell: ({ children, textAlign, onClick, _colIndex, }: import(
|
|
54
|
+
Row: ({ children, onRowClick }: import('./Row').TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
Cell: ({ children, textAlign, _colIndex }: import('./Cell').CellProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
HeaderCell: ({ children, textAlign, onClick, _colIndex, }: import('./HeaderCell').HeaderCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
57
|
};
|
|
58
58
|
export default Table;
|
|
59
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ColMinBreakpoint, ViewportBreakpoint } from '..';
|
|
2
2
|
/**
|
|
3
3
|
* Determines if a current viewport breakpoint satisfies a minimum required breakpoint.
|
|
4
4
|
* Uses "mobile-first" logic where a larger viewport satisfies smaller breakpoint requirements.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ColMinBreakpoint, ViewportBreakpoint } from '..';
|
|
2
2
|
interface ColVisibilityContextProps {
|
|
3
3
|
currentBreakpoint: ViewportBreakpoint;
|
|
4
4
|
colVisibility: ColMinBreakpoint[];
|
|
@@ -7,6 +7,6 @@ interface ColVisibilityContextProps {
|
|
|
7
7
|
* Takes layout options passed into the root `Table` component
|
|
8
8
|
* and makes them available via context to all subcomponents.
|
|
9
9
|
*/
|
|
10
|
-
declare const ColVisibilityContext: import(
|
|
10
|
+
declare const ColVisibilityContext: import('react').Context<ColVisibilityContextProps>;
|
|
11
11
|
export default ColVisibilityContext;
|
|
12
12
|
//# sourceMappingURL=colVisibilityContext.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
export type { TableAutocompleteItemProps } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type { TableAutocompleteItemProps } from './Item';
|
|
3
3
|
export type TableAutocompleteItem = React.ReactElement;
|
|
4
4
|
export interface TableAutocompleteProps {
|
|
5
5
|
/** Input label for accessibility */
|
|
@@ -37,7 +37,7 @@ export declare const filterItems: (items: TableAutocompleteItem[], inputValue: s
|
|
|
37
37
|
*/
|
|
38
38
|
declare const TableAutocomplete: {
|
|
39
39
|
({ label, children, onChange, onInputChange, filterItemsByInput, footerContent, placeholder, isDisabled, hasError, inputValue, }: TableAutocompleteProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
Item: React.FC<import(
|
|
40
|
+
Item: React.FC<import('./Item').TableAutocompleteItemProps>;
|
|
41
41
|
};
|
|
42
42
|
export default TableAutocomplete;
|
|
43
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -9,6 +9,6 @@ interface TabsContextProps {
|
|
|
9
9
|
isResponsive: boolean;
|
|
10
10
|
setIsResponsive: (isResponsive: boolean) => void;
|
|
11
11
|
}
|
|
12
|
-
declare const TabsContext: import(
|
|
12
|
+
declare const TabsContext: import('react').Context<TabsContextProps>;
|
|
13
13
|
export default TabsContext;
|
|
14
14
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
interface TabsProps {
|
|
3
3
|
/**
|
|
4
4
|
* Direct children of `Tabs` should be one of:
|
|
@@ -29,9 +29,9 @@ interface TabsProps {
|
|
|
29
29
|
*/
|
|
30
30
|
declare const Tabs: {
|
|
31
31
|
({ children, defaultSelectedIndex, selectedIndex, onTabChange, hasBorder, testId, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
List: ({ children, xPadding }: import(
|
|
33
|
-
Tab: ({ label, tabId, testId }: import(
|
|
34
|
-
Panel: ({ children, tabId, testId }: import(
|
|
32
|
+
List: ({ children, xPadding }: import('./TabsList').TabsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
Tab: ({ label, tabId, testId }: import('./TabsTab').TabsTabProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
Panel: ({ children, tabId, testId }: import('./TabsPanel').TabsPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
};
|
|
36
36
|
export default Tabs;
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import Tooltip from "./Tooltip";
|
|
31
|
-
import useSupportsAnchorPositioning from "./hooks/useSupportsAnchorPositioning";
|
|
32
|
-
import useBreakpoints from "./hooks/useBreakpoints";
|
|
1
|
+
import { default as Alert } from './Alert';
|
|
2
|
+
import { default as AutocompleteModal } from './AutocompleteModal';
|
|
3
|
+
import { default as Avatar } from './Avatar';
|
|
4
|
+
import { default as Button } from './Button';
|
|
5
|
+
import { default as ContentCard } from './ContentCard';
|
|
6
|
+
import { default as Checkbox } from './Checkbox';
|
|
7
|
+
import { default as Chip } from './Chip';
|
|
8
|
+
import { default as ContextMenu } from './ContextMenu';
|
|
9
|
+
import { default as Count } from './Count';
|
|
10
|
+
import { default as Dialog } from './Dialog';
|
|
11
|
+
import { default as DisabledShim } from './DisabledShim';
|
|
12
|
+
import { default as ProgressBar } from './ProgressBar';
|
|
13
|
+
import { default as Radio } from './Radio';
|
|
14
|
+
import { default as RadioButtons } from './RadioButtons';
|
|
15
|
+
import { default as Row } from './Row';
|
|
16
|
+
import { default as SeparatorList } from './SeparatorList';
|
|
17
|
+
import { default as Slider } from './Slider';
|
|
18
|
+
import { default as Snackbar } from './Snackbar';
|
|
19
|
+
import { default as Spinner } from './Spinner';
|
|
20
|
+
import { default as SplitButton } from './SplitButton';
|
|
21
|
+
import { default as LoadingSkeleton } from './LoadingSkeleton';
|
|
22
|
+
import { default as Table } from './Table';
|
|
23
|
+
import { default as TableAutocomplete } from './TableAutocomplete';
|
|
24
|
+
import { default as TableDateInput } from './TableDateInput';
|
|
25
|
+
import { default as TableInput } from './TableInput';
|
|
26
|
+
import { default as Tabs } from './Tabs';
|
|
27
|
+
import { default as Tooltip } from './Tooltip';
|
|
28
|
+
import { default as useSupportsAnchorPositioning } from './hooks/useSupportsAnchorPositioning';
|
|
29
|
+
import { default as useBreakpoints } from './hooks/useBreakpoints';
|
|
33
30
|
/**
|
|
34
31
|
* Untyped Components
|
|
35
32
|
*/
|
|
@@ -62,6 +59,6 @@ declare const TruncatedAccount: any;
|
|
|
62
59
|
declare const useLockBodyScroll: any;
|
|
63
60
|
declare const formatNumber: any;
|
|
64
61
|
declare const formatDate: any;
|
|
65
|
-
export * from
|
|
62
|
+
export * from './types/Icon.types';
|
|
66
63
|
export { AutocompleteModal, Avatar, Button, Checkbox, Chip, ContentCard, ContextMenu, Count, DisabledShim, Radio, RadioButtons, Row, SeparatorList, Slider, Snackbar, Alert, CollapsibleCard, Combobox, DateInput, Dialog, Drawer, Dropdown, DropdownTrigger, Error, FieldToken, FormSection, IconButton, Input, LoadingShim, LoadingSkeleton, MenuButton, MultiSelect, Pagination, PlainButton, ProgressBar, Popover, ResponsiveFlex, Select, Sidebar, Spinner, SplitButton, Table, TableAutocomplete, TableDateInput, TableInput, Tabs, Tag, TextInput, TimelineEvent, Toggle, TokenInput, Tooltip, TruncatedAccount, useBreakpoints, useLockBodyScroll, useSupportsAnchorPositioning, formatNumber, formatDate, };
|
|
67
64
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narmi/design_system",
|
|
3
|
-
"version": "4.46.
|
|
3
|
+
"version": "4.46.1",
|
|
4
4
|
"description": "⚡ A consistent look-and-feel and extensible interface for Narmi experiences 🔥",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"style": "dist/style.css",
|
|
6
7
|
"files": [
|
|
7
8
|
"dist/*"
|
|
8
9
|
],
|
|
@@ -12,13 +13,13 @@
|
|
|
12
13
|
"node": ">=22"
|
|
13
14
|
},
|
|
14
15
|
"scripts": {
|
|
15
|
-
"watch": "watch 'npm run build' src",
|
|
16
16
|
"build:types": "node ./scripts/buildTypes.mjs",
|
|
17
17
|
"build:jsdoc": "node ./scripts/jsDoc.mjs",
|
|
18
18
|
"build:classdoc": "node ./scripts/classManifest.mjs",
|
|
19
19
|
"build:tokens": "style-dictionary build --config=./tokens/config.js",
|
|
20
|
-
"build:
|
|
21
|
-
"build": "
|
|
20
|
+
"build:css": "sass src/index.scss dist/style.css --style=compressed --source-map",
|
|
21
|
+
"build:components": "vite build && node ./scripts/copyIcons.mjs",
|
|
22
|
+
"build": "npm run build:tokens && npx tsc && npm run build:css && npm run build:jsdoc && npm run build:components && npm run build:classdoc",
|
|
22
23
|
"build:clean": "rm -rf dist/ && npm run build",
|
|
23
24
|
"prepublish": "npm run build",
|
|
24
25
|
"test": "jest",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"chromatic": "npx chromatic --project-token $CHROMATIC_PROJECT_TOKEN --exit-zero-on-changes",
|
|
31
32
|
"stats:components": "node ./scripts/component-adoption.mjs",
|
|
32
33
|
"stats:classes": "node ./scripts/class-adoption.mjs",
|
|
33
|
-
"dev": "
|
|
34
|
+
"dev": "npm run storybook"
|
|
34
35
|
},
|
|
35
36
|
"peerDependencies": {
|
|
36
37
|
"react": "^16 || ^17 || ^18 || ^19",
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
"@babel/preset-env": "^7.15.6",
|
|
45
46
|
"@babel/preset-react": "^7.14.5",
|
|
46
47
|
"@babel/preset-typescript": "^7.23.2",
|
|
47
|
-
"@chromatic-com/storybook": "^4.1.1",
|
|
48
48
|
"@commitlint/cli": "^19",
|
|
49
49
|
"@commitlint/config-conventional": "^19.2.2",
|
|
50
50
|
"@mdx-js/mdx": "^3.1.0",
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"@semantic-release/changelog": "^6.0.0",
|
|
53
53
|
"@semantic-release/git": "^10.0.0",
|
|
54
54
|
"@storybook/addon-a11y": "^9.1.13",
|
|
55
|
-
"@storybook/addon-links": "^9.1.13",
|
|
56
55
|
"@storybook/addon-docs": "^9.1.13",
|
|
57
|
-
"@storybook/addon-
|
|
58
|
-
"@storybook/react-
|
|
56
|
+
"@storybook/addon-links": "^9.1.13",
|
|
57
|
+
"@storybook/react-vite": "^9.1.13",
|
|
59
58
|
"@testing-library/jest-dom": "^6.6.3",
|
|
60
59
|
"@testing-library/react": "^16.2.0",
|
|
61
60
|
"@testing-library/user-event": "^14.6.1",
|
|
62
|
-
"@types/jest": "^
|
|
61
|
+
"@types/jest": "^30.0.0",
|
|
63
62
|
"@types/react": "^18.2.31",
|
|
64
63
|
"@types/react-dom": "^18.2.14",
|
|
65
64
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
66
65
|
"@typescript-eslint/parser": "^6.12.0",
|
|
66
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
67
67
|
"babel-jest": "^30",
|
|
68
68
|
"babel-loader": "^8.2.2",
|
|
69
69
|
"chromatic": "^6",
|
|
@@ -102,7 +102,10 @@
|
|
|
102
102
|
"tinycolor2": "^1.4.2",
|
|
103
103
|
"typescript": "^5.2.2",
|
|
104
104
|
"use-clipboard-copy": "^0.2.0",
|
|
105
|
-
"
|
|
105
|
+
"vite": "^7.1.11",
|
|
106
|
+
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
107
|
+
"vite-plugin-dts": "^4.5.4",
|
|
108
|
+
"vite-plugin-libcss": "^1.1.2",
|
|
106
109
|
"webpack": "^5.50.0",
|
|
107
110
|
"webpack-cli": "^4.8.0",
|
|
108
111
|
"webpack-dev-server": "^5"
|
|
Binary file
|
|
Binary file
|
|
@@ -1,74 +0,0 @@
|
|
|
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/blocks";
|
|
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
|
-
};
|