@squiz/resource-browser 1.32.1-alpha.12
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/.storybook/main.ts +23 -0
- package/.storybook/preview-head.html +15 -0
- package/.storybook/preview.ts +16 -0
- package/build.js +21 -0
- package/jest.config.ts +18 -0
- package/lib/Icons/Generics/ArrowDown.d.ts +15 -0
- package/lib/Icons/Generics/ArrowDown.js +23 -0
- package/lib/Icons/Generics/ArrowRight.d.ts +15 -0
- package/lib/Icons/Generics/ArrowRight.js +23 -0
- package/lib/Icons/Generics/Close.d.ts +15 -0
- package/lib/Icons/Generics/Close.js +23 -0
- package/lib/Icons/Generics/GenericIconMap.d.ts +10 -0
- package/lib/Icons/Generics/GenericIconMap.js +14 -0
- package/lib/Icons/Generics/ResourceSelect.d.ts +15 -0
- package/lib/Icons/Generics/ResourceSelect.js +28 -0
- package/lib/Icons/Generics/Root.d.ts +15 -0
- package/lib/Icons/Generics/Root.js +23 -0
- package/lib/Icons/Generics/Selected.d.ts +15 -0
- package/lib/Icons/Generics/Selected.js +23 -0
- package/lib/Icons/Generics/index.d.ts +6 -0
- package/lib/Icons/Generics/index.js +19 -0
- package/lib/Icons/Icon.d.ts +47 -0
- package/lib/Icons/Icon.js +44 -0
- package/lib/Icons/MatrixResources/Audio.d.ts +15 -0
- package/lib/Icons/MatrixResources/Audio.js +28 -0
- package/lib/Icons/MatrixResources/Excel.d.ts +15 -0
- package/lib/Icons/MatrixResources/Excel.js +27 -0
- package/lib/Icons/MatrixResources/Folder.d.ts +15 -0
- package/lib/Icons/MatrixResources/Folder.js +24 -0
- package/lib/Icons/MatrixResources/GenericFile.d.ts +15 -0
- package/lib/Icons/MatrixResources/GenericFile.js +28 -0
- package/lib/Icons/MatrixResources/Image.d.ts +15 -0
- package/lib/Icons/MatrixResources/Image.js +26 -0
- package/lib/Icons/MatrixResources/MatrixResourceMap.d.ts +15 -0
- package/lib/Icons/MatrixResources/MatrixResourceMap.js +19 -0
- package/lib/Icons/MatrixResources/Page.d.ts +15 -0
- package/lib/Icons/MatrixResources/Page.js +30 -0
- package/lib/Icons/MatrixResources/Pdf.d.ts +15 -0
- package/lib/Icons/MatrixResources/Pdf.js +31 -0
- package/lib/Icons/MatrixResources/Powerpoint.d.ts +15 -0
- package/lib/Icons/MatrixResources/Powerpoint.js +28 -0
- package/lib/Icons/MatrixResources/Site.d.ts +15 -0
- package/lib/Icons/MatrixResources/Site.js +30 -0
- package/lib/Icons/MatrixResources/Video.d.ts +15 -0
- package/lib/Icons/MatrixResources/Video.js +24 -0
- package/lib/Icons/MatrixResources/Word.d.ts +17 -0
- package/lib/Icons/MatrixResources/Word.js +28 -0
- package/lib/Icons/MatrixResources/index.d.ts +11 -0
- package/lib/Icons/MatrixResources/index.js +29 -0
- package/lib/Modal/Modal.d.ts +11 -0
- package/lib/Modal/Modal.js +46 -0
- package/lib/Modal/ModalOpeningButton.d.ts +10 -0
- package/lib/Modal/ModalOpeningButton.js +13 -0
- package/lib/Modal/ModalTrigger.d.ts +9 -0
- package/lib/Modal/ModalTrigger.js +24 -0
- package/lib/PreviewPanel/PreviewModal.d.ts +11 -0
- package/lib/PreviewPanel/PreviewModal.js +81 -0
- package/lib/PreviewPanel/PreviewPanel.d.ts +16 -0
- package/lib/PreviewPanel/PreviewPanel.js +87 -0
- package/lib/PreviewPanel/details/MatrixResource.d.ts +12 -0
- package/lib/PreviewPanel/details/MatrixResource.js +41 -0
- package/lib/ResourceBreadcrumb/ResourceBreadcrumb.d.ts +9 -0
- package/lib/ResourceBreadcrumb/ResourceBreadcrumb.js +20 -0
- package/lib/ResourceItem/ResourceItem.d.ts +19 -0
- package/lib/ResourceItem/ResourceItem.js +26 -0
- package/lib/ResourceList/ResourceList.d.ts +14 -0
- package/lib/ResourceList/ResourceList.js +51 -0
- package/lib/ResourcePickerContainer/ResourcePickerContainer.d.ts +15 -0
- package/lib/ResourcePickerContainer/ResourcePickerContainer.js +145 -0
- package/lib/Skeleton/List/SkeletonList.d.ts +6 -0
- package/lib/Skeleton/List/SkeletonList.js +13 -0
- package/lib/Skeleton/ListItem/SkeletonListItem.d.ts +2 -0
- package/lib/Skeleton/ListItem/SkeletonListItem.js +15 -0
- package/lib/SourceDropdown/SourceDropdown.d.ts +9 -0
- package/lib/SourceDropdown/SourceDropdown.js +106 -0
- package/lib/SourceList/SourceList.d.ts +14 -0
- package/lib/SourceList/SourceList.js +58 -0
- package/lib/Spinner/Spinner.d.ts +8 -0
- package/lib/Spinner/Spinner.js +12 -0
- package/lib/index.css +968 -0
- package/lib/index.d.ts +37 -0
- package/lib/index.js +15 -0
- package/lib/uuid.d.ts +1 -0
- package/lib/uuid.js +8 -0
- package/package.json +74 -0
- package/postcss.config.js +11 -0
- package/src/Icons/Generics/ArrowDown.tsx +27 -0
- package/src/Icons/Generics/ArrowRight.tsx +27 -0
- package/src/Icons/Generics/Close.tsx +26 -0
- package/src/Icons/Generics/GenericIconMap.ts +14 -0
- package/src/Icons/Generics/ResourceSelect.tsx +40 -0
- package/src/Icons/Generics/Root.tsx +24 -0
- package/src/Icons/Generics/Selected.tsx +27 -0
- package/src/Icons/Generics/index.tsx +7 -0
- package/src/Icons/Icon.spec.tsx +62 -0
- package/src/Icons/Icon.stories.tsx +105 -0
- package/src/Icons/Icon.tsx +61 -0
- package/src/Icons/MatrixResources/Audio.tsx +30 -0
- package/src/Icons/MatrixResources/Excel.tsx +29 -0
- package/src/Icons/MatrixResources/Folder.tsx +29 -0
- package/src/Icons/MatrixResources/GenericFile.tsx +34 -0
- package/src/Icons/MatrixResources/Image.tsx +36 -0
- package/src/Icons/MatrixResources/MatrixResourceMap.ts +19 -0
- package/src/Icons/MatrixResources/Page.tsx +33 -0
- package/src/Icons/MatrixResources/Pdf.tsx +34 -0
- package/src/Icons/MatrixResources/Powerpoint.tsx +34 -0
- package/src/Icons/MatrixResources/Site.tsx +37 -0
- package/src/Icons/MatrixResources/Video.tsx +27 -0
- package/src/Icons/MatrixResources/Word.tsx +30 -0
- package/src/Icons/MatrixResources/index.tsx +12 -0
- package/src/Modal/Modal.spec.tsx +244 -0
- package/src/Modal/Modal.tsx +58 -0
- package/src/Modal/ModalContainer.stories.tsx +33 -0
- package/src/Modal/ModalOpeningButton.tsx +20 -0
- package/src/Modal/ModalTrigger.tsx +45 -0
- package/src/PreviewPanel/PreviewModal.spec.tsx +164 -0
- package/src/PreviewPanel/PreviewModal.tsx +92 -0
- package/src/PreviewPanel/PreviewPanel.spec.tsx +197 -0
- package/src/PreviewPanel/PreviewPanel.stories.tsx +61 -0
- package/src/PreviewPanel/PreviewPanel.tsx +123 -0
- package/src/PreviewPanel/details/MatrixResource.tsx +59 -0
- package/src/ResourceBreadcrumb/ResourceBreadcrumb.spec.tsx +76 -0
- package/src/ResourceBreadcrumb/ResourceBreadcrumb.stories.tsx +24 -0
- package/src/ResourceBreadcrumb/ResourceBreadcrumb.tsx +39 -0
- package/src/ResourceBreadcrumb/sample-hierarchy.json +23 -0
- package/src/ResourceItem/ResourceItem.spec.tsx +69 -0
- package/src/ResourceItem/ResourceItem.tsx +82 -0
- package/src/ResourceList/ResourceList.spec.tsx +196 -0
- package/src/ResourceList/ResourceList.stories.tsx +40 -0
- package/src/ResourceList/ResourceList.tsx +74 -0
- package/src/ResourceList/sample-resources.json +75 -0
- package/src/ResourcePickerContainer/ResourcePickerContainer.spec.tsx +706 -0
- package/src/ResourcePickerContainer/ResourcePickerContainer.stories.tsx +56 -0
- package/src/ResourcePickerContainer/ResourcePickerContainer.tsx +224 -0
- package/src/Skeleton/List/SkeletonList.spec.tsx +18 -0
- package/src/Skeleton/List/SkeletonList.stories.tsx +15 -0
- package/src/Skeleton/List/SkeletonList.tsx +16 -0
- package/src/Skeleton/ListItem/SkeletonListItem.stories.tsx +15 -0
- package/src/Skeleton/ListItem/SkeletonListItem.tsx +14 -0
- package/src/SourceDropdown/SourceDropdown.spec.tsx +263 -0
- package/src/SourceDropdown/SourceDropdown.stories.tsx +36 -0
- package/src/SourceDropdown/SourceDropdown.tsx +175 -0
- package/src/SourceDropdown/sample-sources.json +110 -0
- package/src/SourceList/SourceList.spec.tsx +224 -0
- package/src/SourceList/SourceList.stories.tsx +40 -0
- package/src/SourceList/SourceList.tsx +93 -0
- package/src/SourceList/sample-sources.json +110 -0
- package/src/Spinner/Spinner.spec.tsx +18 -0
- package/src/Spinner/Spinner.stories.tsx +26 -0
- package/src/Spinner/Spinner.tsx +18 -0
- package/src/Spinner/_spinner.scss +11 -0
- package/src/__mocks__/JestHelpers.ts +65 -0
- package/src/__mocks__/jestHelpers.spec.ts +38 -0
- package/src/__mocks__/styleMock.ts +1 -0
- package/src/index.scss +7 -0
- package/src/index.stories.tsx +70 -0
- package/src/index.tsx +71 -0
- package/src/uuid.ts +7 -0
- package/tailwind.config.cjs +84 -0
- package/tsconfig.json +22 -0
package/lib/index.d.ts
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export type NodeIdentifier = {
|
3
|
+
source: string | null;
|
4
|
+
id: string;
|
5
|
+
};
|
6
|
+
export type ResourceDetail = {
|
7
|
+
type: string;
|
8
|
+
name: string;
|
9
|
+
properties: Map<string, any>;
|
10
|
+
};
|
11
|
+
export type Resource = {
|
12
|
+
id: NodeIdentifier;
|
13
|
+
type: string;
|
14
|
+
selected: boolean;
|
15
|
+
label: string;
|
16
|
+
childCount: number;
|
17
|
+
};
|
18
|
+
export type Source = {
|
19
|
+
id: string;
|
20
|
+
name: string;
|
21
|
+
nodes: Array<Resource>;
|
22
|
+
};
|
23
|
+
export type Hierarchy = {
|
24
|
+
id: NodeIdentifier;
|
25
|
+
label: string;
|
26
|
+
};
|
27
|
+
export default function ComponentEditorContentBrowser({ showButtonLabel, buttonLabel, buttonIcon, modalTitle, allowedTypes, onRequestSources, onRequestChildren, onRequestResource, onChange, }: {
|
28
|
+
showButtonLabel?: boolean;
|
29
|
+
buttonLabel: string;
|
30
|
+
buttonIcon: React.ReactNode;
|
31
|
+
modalTitle: string;
|
32
|
+
allowedTypes: string[] | undefined;
|
33
|
+
onRequestSources: () => Promise<Source[]>;
|
34
|
+
onRequestChildren(id: NodeIdentifier): Promise<Resource[]>;
|
35
|
+
onRequestResource(id: NodeIdentifier): Promise<ResourceDetail | null>;
|
36
|
+
onChange(resource: NodeIdentifier | null): void;
|
37
|
+
}): JSX.Element;
|
package/lib/index.js
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const react_1 = __importDefault(require("react"));
|
7
|
+
// import { ResourceBrowserInternalContext } from './InternalContext/InternalContext';
|
8
|
+
const ModalTrigger_1 = __importDefault(require("./Modal/ModalTrigger"));
|
9
|
+
const ResourcePickerContainer_1 = __importDefault(require("./ResourcePickerContainer/ResourcePickerContainer"));
|
10
|
+
function ComponentEditorContentBrowser({ showButtonLabel, buttonLabel, buttonIcon, modalTitle, allowedTypes, onRequestSources, onRequestChildren, onRequestResource, onChange, }) {
|
11
|
+
const showLabel = showButtonLabel || false;
|
12
|
+
return (react_1.default.createElement("div", { className: "squiz-rb-scope" },
|
13
|
+
react_1.default.createElement(ModalTrigger_1.default, { showLabel: showLabel, label: buttonLabel, icon: buttonIcon }, (onClose, titleProps) => (react_1.default.createElement(ResourcePickerContainer_1.default, { title: modalTitle, titleAriaProps: titleProps, allowedTypes: allowedTypes, onClose: onClose, onRequestSources: onRequestSources, onRequestChildren: onRequestChildren, onRequestResource: onRequestResource, onChange: onChange })))));
|
14
|
+
}
|
15
|
+
exports.default = ComponentEditorContentBrowser;
|
package/lib/uuid.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export default function uuid(): string;
|
package/lib/uuid.js
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
4
|
+
// @ts-nocheck
|
5
|
+
function uuid() {
|
6
|
+
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) => (c ^ (window.crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16));
|
7
|
+
}
|
8
|
+
exports.default = uuid;
|
package/package.json
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
{
|
2
|
+
"name": "@squiz/resource-browser",
|
3
|
+
"version": "1.32.1-alpha.12",
|
4
|
+
"main": "lib/index.js",
|
5
|
+
"types": "lib/index.d.ts",
|
6
|
+
"scripts": {
|
7
|
+
"compile": "npm run clean && npm run compile:styles && npm run compile:code",
|
8
|
+
"compile:code": "tsc",
|
9
|
+
"compile:styles": "node build.js",
|
10
|
+
"dev": "vite compile",
|
11
|
+
"storybook": "storybook dev -p 6006",
|
12
|
+
"test": "jest",
|
13
|
+
"test:watch": "jest --watch",
|
14
|
+
"clean": "rimraf ./lib"
|
15
|
+
},
|
16
|
+
"dependencies": {
|
17
|
+
"react-aria": "3.23.1",
|
18
|
+
"react-responsive": "9.0.2",
|
19
|
+
"react-stately": "3.21.0"
|
20
|
+
},
|
21
|
+
"devDependencies": {
|
22
|
+
"@storybook/addon-essentials": "7.0.0-rc.4",
|
23
|
+
"@storybook/addon-interactions": "7.0.0-rc.4",
|
24
|
+
"@storybook/addon-links": "7.0.0-rc.4",
|
25
|
+
"@storybook/addon-styling": "1.0.1",
|
26
|
+
"@storybook/blocks": "7.0.0-rc.4",
|
27
|
+
"@storybook/react": "7.0.0-rc.4",
|
28
|
+
"@storybook/react-vite": "7.0.0-rc.4",
|
29
|
+
"@storybook/testing-library": "0.0.14-next.1",
|
30
|
+
"@testing-library/jest-dom": "5.16.5",
|
31
|
+
"@testing-library/react": "14.0.0",
|
32
|
+
"@testing-library/user-event": "14.4.3",
|
33
|
+
"@types/postcss-js": "4.0.0",
|
34
|
+
"@types/react": "18.0.26",
|
35
|
+
"@types/react-dom": "18.0.9",
|
36
|
+
"@vitejs/plugin-react-swc": "3.0.0",
|
37
|
+
"autoprefixer": "10.4.14",
|
38
|
+
"esbuild": "0.17.17",
|
39
|
+
"esbuild-sass-plugin": "2.8.0",
|
40
|
+
"jest": "29.4.1",
|
41
|
+
"jest-environment-jsdom": "29.4.1",
|
42
|
+
"postcss": "8.4.21",
|
43
|
+
"postcss-loader": "7.2.4",
|
44
|
+
"postcss-nested": "6.0.1",
|
45
|
+
"postcss-prefix-selector": "1.16.0",
|
46
|
+
"prop-types": "15.8.1",
|
47
|
+
"react": "18.2.0",
|
48
|
+
"react-dom": "18.2.0",
|
49
|
+
"rimraf": "4.1.2",
|
50
|
+
"storybook": "7.0.0-rc.4",
|
51
|
+
"tailwindcss": "3.3.1",
|
52
|
+
"ts-jest": "29.0.5",
|
53
|
+
"typescript": "4.9.3",
|
54
|
+
"vite": "4.2.0"
|
55
|
+
},
|
56
|
+
"peerDependencies": {
|
57
|
+
"@types/react": "^16.14.0 || ^17 || ^18",
|
58
|
+
"@types/react-dom": "^16.9.0 || ^17 || ^18",
|
59
|
+
"react": "^16.14.0 || ^17 || ^18",
|
60
|
+
"react-dom": "^16.14.0 || ^17 || ^18"
|
61
|
+
},
|
62
|
+
"peerDependenciesMeta": {
|
63
|
+
"@types/react": {
|
64
|
+
"optional": true
|
65
|
+
},
|
66
|
+
"@types/react-dom": {
|
67
|
+
"optional": true
|
68
|
+
}
|
69
|
+
},
|
70
|
+
"volta": {
|
71
|
+
"node": "18.15.0"
|
72
|
+
},
|
73
|
+
"gitHead": "57657552ede0a737aa1a6dc98641c4de71c1566c"
|
74
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the ArrowDown icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the ArrowDown component
|
6
|
+
* @returns {JSX.Element} - The ArrowDown component
|
7
|
+
* @example
|
8
|
+
* <ArrowDown />
|
9
|
+
* @example
|
10
|
+
* <ArrowDown height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <ArrowDown className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function ArrowDown({
|
15
|
+
isDecorative,
|
16
|
+
...props
|
17
|
+
}: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
18
|
+
return (
|
19
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
20
|
+
<path
|
21
|
+
d="M8.12508 8.99999L12.0051 12.88L15.8851 8.99999C16.2751 8.60999 16.9051 8.60999 17.2951 8.99999C17.6851 9.38999 17.6851 10.02 17.2951 10.41L12.7051 15C12.3151 15.39 11.6851 15.39 11.2951 15L6.70508 10.41C6.51783 10.2232 6.4126 9.96951 6.4126 9.70499C6.4126 9.44047 6.51783 9.18682 6.70508 8.99999C7.09508 8.61999 7.73508 8.60999 8.12508 8.99999Z"
|
22
|
+
fill="#707070"
|
23
|
+
/>
|
24
|
+
{!isDecorative && <title>arrow down icon</title>}
|
25
|
+
</svg>
|
26
|
+
);
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the ArrowRight icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the ArrowRight component
|
6
|
+
* @returns {JSX.Element} - The ArrowRight component
|
7
|
+
* @example
|
8
|
+
* <ArrowRight />
|
9
|
+
* @example
|
10
|
+
* <ArrowRight height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <ArrowRight className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function ArrowRight({
|
15
|
+
isDecorative,
|
16
|
+
...props
|
17
|
+
}: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
18
|
+
return (
|
19
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
20
|
+
<path
|
21
|
+
d="M9.00001 15.875L12.88 11.995L9.00001 8.11501C8.81275 7.92817 8.70752 7.67452 8.70752 7.41001C8.70752 7.14549 8.81275 6.89184 9.00001 6.70501C9.39001 6.31501 10.02 6.31501 10.41 6.70501L15 11.295C15.39 11.685 15.39 12.315 15 12.705L10.41 17.295C10.02 17.685 9.39001 17.685 9.00001 17.295C8.62001 16.905 8.61001 16.265 9.00001 15.875Z"
|
22
|
+
fill="#707070"
|
23
|
+
/>
|
24
|
+
{!isDecorative && <title>arrow right icon</title>}
|
25
|
+
</svg>
|
26
|
+
);
|
27
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the Close icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the Close component
|
6
|
+
* @returns {JSX.Element} - The Close component
|
7
|
+
* @example
|
8
|
+
* <Close />
|
9
|
+
* @example
|
10
|
+
* <Close height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <Close className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function Close({ isDecorative, ...props }: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
15
|
+
return (
|
16
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
17
|
+
<path
|
18
|
+
fillRule="evenodd"
|
19
|
+
clipRule="evenodd"
|
20
|
+
d="M2 12C2 6.47 6.47 2 12 2C17.53 2 22 6.47 22 12C22 17.53 17.53 22 12 22C6.47 22 2 17.53 2 12ZM14.89 16.3C15.28 16.69 15.91 16.69 16.3 16.3C16.68 15.91 16.68 15.27 16.3 14.89L13.41 12L16.3 9.11C16.69 8.72 16.69 8.09 16.3 7.7C15.91 7.31 15.28 7.31 14.89 7.7L12 10.59L9.11 7.7C8.72 7.31 8.09 7.31 7.7 7.7C7.51275 7.88683 7.40751 8.14048 7.40751 8.405C7.40751 8.66952 7.51275 8.92317 7.7 9.11L10.59 12L7.7 14.89C7.51275 15.0768 7.40751 15.3305 7.40751 15.595C7.40751 15.8595 7.51275 16.1132 7.7 16.3C8.09 16.69 8.72 16.69 9.11 16.3L12 13.41L14.89 16.3Z"
|
21
|
+
fill="#949494"
|
22
|
+
/>
|
23
|
+
{!isDecorative && <title>close icon</title>}
|
24
|
+
</svg>
|
25
|
+
);
|
26
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ArrowRight, ArrowDown, Selected, Root, ResourceSelect, Close } from '.';
|
2
|
+
|
3
|
+
// Define our map of matrix types to icons
|
4
|
+
const GenericIconMap = {
|
5
|
+
'arrow-right': ArrowRight,
|
6
|
+
'arrow-down': ArrowDown,
|
7
|
+
'resource-select': ResourceSelect,
|
8
|
+
selected: Selected,
|
9
|
+
root: Root,
|
10
|
+
close: Close,
|
11
|
+
};
|
12
|
+
|
13
|
+
// Export our map
|
14
|
+
export default GenericIconMap;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the ResourceSelected icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the ResourceSelected component
|
6
|
+
* @returns {JSX.Element} - The ResourceSelected component
|
7
|
+
* @example
|
8
|
+
* <ResourceSelected />
|
9
|
+
* @example
|
10
|
+
* <ResourceSelected height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <ResourceSelected className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function ResourceSelected({
|
15
|
+
isDecorative,
|
16
|
+
...props
|
17
|
+
}: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
18
|
+
return (
|
19
|
+
<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
20
|
+
<mask
|
21
|
+
id="mask0_1232_8208"
|
22
|
+
// style="mask-type:alpha"
|
23
|
+
maskUnits="userSpaceOnUse"
|
24
|
+
x="0"
|
25
|
+
y="0"
|
26
|
+
width="72"
|
27
|
+
height="72"
|
28
|
+
>
|
29
|
+
<rect width="72" height="72" fill="#D9D9D9" />
|
30
|
+
</mask>
|
31
|
+
<g mask="url(#mask0_1232_8208)">
|
32
|
+
<path
|
33
|
+
d="M35.1 53.9999C30.3 53.7499 26.25 51.8999 22.95 48.4499C19.65 44.9999 18 40.8499 18 35.9999C18 30.9999 19.75 26.7499 23.25 23.2499C26.75 19.7499 31 17.9999 36 17.9999C40.85 17.9999 45 19.6499 48.45 22.9499C51.9 26.2499 53.75 30.2999 54 35.0999L47.7 33.2249C47.05 30.5249 45.65 28.3124 43.5 26.5874C41.35 24.8624 38.85 23.9999 36 23.9999C32.7 23.9999 29.875 25.1749 27.525 27.5249C25.175 29.8749 24 32.6999 24 35.9999C24 38.8499 24.8625 41.3499 26.5875 43.4999C28.3125 45.6499 30.525 47.0499 33.225 47.6999L35.1 53.9999ZM36 65.9999C31.85 65.9999 27.95 65.2124 24.3 63.6374C20.65 62.0624 17.475 59.9249 14.775 57.2249C12.075 54.5249 9.9375 51.3499 8.3625 47.6999C6.7875 44.0499 6 40.1499 6 35.9999C6 31.8499 6.7875 27.9499 8.3625 24.2999C9.9375 20.6499 12.075 17.4749 14.775 14.7749C17.475 12.0749 20.65 9.93741 24.3 8.36241C27.95 6.78741 31.85 5.99991 36 5.99991C40.15 5.99991 44.05 6.78741 47.7 8.36241C51.35 9.93741 54.525 12.0749 57.225 14.7749C59.925 17.4749 62.0625 20.6499 63.6375 24.2999C65.2125 27.9499 66 31.8499 66 35.9999V37.3499C66 37.7999 65.95 38.2499 65.85 38.6999L60 36.8999V35.9999C60 29.2999 57.675 23.6249 53.025 18.9749C48.375 14.3249 42.7 11.9999 36 11.9999C29.3 11.9999 23.625 14.3249 18.975 18.9749C14.325 23.6249 12 29.2999 12 35.9999C12 42.6999 14.325 48.3749 18.975 53.0249C23.625 57.6749 29.3 59.9999 36 59.9999H36.9L38.7 65.8499C38.25 65.9499 37.8 65.9999 37.35 65.9999H36ZM60.525 66.4499L48.75 54.6749L46.5 61.4999C46.25 62.1999 45.775 62.5374 45.075 62.5124C44.375 62.4874 43.9 62.1249 43.65 61.4249L36.825 38.6999C36.625 38.1499 36.75 37.6499 37.2 37.1999C37.65 36.7499 38.15 36.6249 38.7 36.8249L61.425 43.6499C62.125 43.8999 62.4875 44.3749 62.5125 45.0749C62.5375 45.7749 62.2 46.2499 61.5 46.4999L54.675 48.7499L66.45 60.5249C66.75 60.8249 66.9 61.1749 66.9 61.5749C66.9 61.9749 66.75 62.3249 66.45 62.6249L62.625 66.4499C62.325 66.7499 61.975 66.8999 61.575 66.8999C61.175 66.8999 60.825 66.7499 60.525 66.4499Z"
|
34
|
+
fill="#BABABA"
|
35
|
+
/>
|
36
|
+
</g>
|
37
|
+
{!isDecorative && <title>resource select icon</title>}
|
38
|
+
</svg>
|
39
|
+
);
|
40
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the Root icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the Root component
|
6
|
+
* @returns {JSX.Element} - The Root component
|
7
|
+
* @example
|
8
|
+
* <Root />
|
9
|
+
* @example
|
10
|
+
* <Root height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <Root className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function Root({ isDecorative, ...props }: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
15
|
+
return (
|
16
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
17
|
+
<path
|
18
|
+
d="M4.20374 18H15.2037C15.7537 18 16.2037 17.55 16.2037 17C16.2037 16.45 15.7537 16 15.2037 16H4.20374C3.65374 16 3.20374 16.45 3.20374 17C3.20374 17.55 3.65374 18 4.20374 18ZM4.20374 13H12.2037C12.7537 13 13.2037 12.55 13.2037 12C13.2037 11.45 12.7537 11 12.2037 11H4.20374C3.65374 11 3.20374 11.45 3.20374 12C3.20374 12.55 3.65374 13 4.20374 13ZM3.20374 7C3.20374 7.55 3.65374 8 4.20374 8H15.2037C15.7537 8 16.2037 7.55 16.2037 7C16.2037 6.45 15.7537 6 15.2037 6H4.20374C3.65374 6 3.20374 6.45 3.20374 7ZM20.5037 14.88L17.6237 12L20.5037 9.12C20.8937 8.73 20.8937 8.1 20.5037 7.71C20.1137 7.32 19.4837 7.32 19.0937 7.71L15.5037 11.3C15.1137 11.69 15.1137 12.32 15.5037 12.71L19.0937 16.3C19.4837 16.69 20.1137 16.69 20.5037 16.3C20.8837 15.91 20.8937 15.27 20.5037 14.88Z"
|
19
|
+
fill="#707070"
|
20
|
+
/>
|
21
|
+
{!isDecorative && <title>root icon</title>}
|
22
|
+
</svg>
|
23
|
+
);
|
24
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the Selected icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the Selected component
|
6
|
+
* @returns {JSX.Element} - The Selected component
|
7
|
+
* @example
|
8
|
+
* <Selected />
|
9
|
+
* @example
|
10
|
+
* <Selected height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <Selected className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function Selected({
|
15
|
+
isDecorative,
|
16
|
+
...props
|
17
|
+
}: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
18
|
+
return (
|
19
|
+
<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
20
|
+
<path
|
21
|
+
d="M5.80004 10.78L2.30004 7.28002C1.91004 6.89002 1.29004 6.89002 0.900044 7.28002C0.510044 7.67002 0.510044 8.29002 0.900044 8.68002L5.09004 12.87C5.48004 13.26 6.11004 13.26 6.50004 12.87L17.1 2.28002C17.49 1.89002 17.49 1.27002 17.1 0.880024C16.71 0.490024 16.09 0.490024 15.7 0.880024L5.80004 10.78Z"
|
22
|
+
fill="#044985"
|
23
|
+
/>
|
24
|
+
{!isDecorative && <title>selected icon</title>}
|
25
|
+
</svg>
|
26
|
+
);
|
27
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
// Exports all icons from the Generics folder
|
2
|
+
export { default as ArrowRight } from './ArrowRight';
|
3
|
+
export { default as ArrowDown } from './ArrowDown';
|
4
|
+
export { default as Selected } from './Selected';
|
5
|
+
export { default as Root } from './Root';
|
6
|
+
export { default as ResourceSelect } from './ResourceSelect';
|
7
|
+
export { default as Close } from './Close';
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { screen, render, cleanup } from '@testing-library/react';
|
3
|
+
|
4
|
+
import Icon, { iconSources } from './Icon';
|
5
|
+
|
6
|
+
// before each test, clear the rendered icon
|
7
|
+
beforeEach(() => {
|
8
|
+
cleanup();
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Icon', () => {
|
12
|
+
// Icon should render a default icon when no icon is provided
|
13
|
+
it('should render a default icon when no icon is provided', async () => {
|
14
|
+
render(<Icon isDecorative={false} />);
|
15
|
+
|
16
|
+
// Expect that there is an svg on the page with the title "generic file icon" (the default icon)
|
17
|
+
expect(screen.getByTitle('generic file icon')).toBeInTheDocument();
|
18
|
+
});
|
19
|
+
|
20
|
+
// Icon should pass through props to the rendered icon
|
21
|
+
it('should pass through props to the rendered icon', async () => {
|
22
|
+
render(<Icon className="test-class" data-testid="test-icon" />);
|
23
|
+
|
24
|
+
// Expect that there is an svg on the page with the class "test-class"
|
25
|
+
expect(screen.getByTestId('test-icon')).toHaveClass('test-class');
|
26
|
+
});
|
27
|
+
|
28
|
+
// Icon should pass through svg props to the rendered icon
|
29
|
+
it('should pass through svg props to the rendered icon', async () => {
|
30
|
+
render(<Icon height={24} width={24} data-testid="test-icon" />);
|
31
|
+
|
32
|
+
// Expect that there is an svg on the page with the height and width of 24
|
33
|
+
expect(screen.getByTestId('test-icon')).toHaveAttribute('height', '24');
|
34
|
+
expect(screen.getByTestId('test-icon')).toHaveAttribute('width', '24');
|
35
|
+
});
|
36
|
+
|
37
|
+
// Icon should render the correct icon when a resource source and icon are provided
|
38
|
+
it('should render the correct icon when a resource source and icon are provided', async () => {
|
39
|
+
// Get the sources from the icon sources
|
40
|
+
const sources = Object.keys(iconSources) as (keyof typeof iconSources)[];
|
41
|
+
|
42
|
+
// Loop through the sources
|
43
|
+
for (const source of sources) {
|
44
|
+
// Get the icons from the current source
|
45
|
+
const icons = Object.keys(iconSources[source]);
|
46
|
+
|
47
|
+
// Loop through the icons
|
48
|
+
for (const icon of icons) {
|
49
|
+
const resourceSource = source as keyof typeof iconSources;
|
50
|
+
const iconOption = icon as keyof (typeof iconSources)[keyof typeof iconSources];
|
51
|
+
|
52
|
+
render(<Icon resourceSource={resourceSource} icon={iconOption} isDecorative={false} />);
|
53
|
+
|
54
|
+
// Expect that there is an svg on the page with the title of the current icon (converting _ or - to spaces and adding "icon" to the end)
|
55
|
+
expect(screen.getByTitle(`${icon.replace(/[_-]/g, ' ')} icon`)).toBeInTheDocument();
|
56
|
+
|
57
|
+
// Clear the rendered icon
|
58
|
+
cleanup();
|
59
|
+
}
|
60
|
+
}
|
61
|
+
});
|
62
|
+
});
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { StoryFn, Meta } from '@storybook/react';
|
3
|
+
|
4
|
+
import Icon from './Icon';
|
5
|
+
|
6
|
+
export default {
|
7
|
+
title: 'Icons/Icon',
|
8
|
+
component: Icon,
|
9
|
+
} as Meta<typeof Icon>;
|
10
|
+
|
11
|
+
const Template: StoryFn<typeof Icon> = (props) => <Icon {...props} />;
|
12
|
+
|
13
|
+
export const ArrowRight = Template.bind({});
|
14
|
+
ArrowRight.args = {
|
15
|
+
icon: 'arrow-right',
|
16
|
+
};
|
17
|
+
|
18
|
+
export const Selected = Template.bind({});
|
19
|
+
Selected.args = {
|
20
|
+
icon: 'selected',
|
21
|
+
};
|
22
|
+
|
23
|
+
export const Root = Template.bind({});
|
24
|
+
Root.args = {
|
25
|
+
icon: 'root',
|
26
|
+
};
|
27
|
+
|
28
|
+
export const Audio = Template.bind({});
|
29
|
+
Audio.args = {
|
30
|
+
icon: 'audio',
|
31
|
+
resourceSource: 'matrix',
|
32
|
+
};
|
33
|
+
|
34
|
+
export const Excel = Template.bind({});
|
35
|
+
Excel.args = {
|
36
|
+
icon: 'excel',
|
37
|
+
resourceSource: 'matrix',
|
38
|
+
};
|
39
|
+
|
40
|
+
export const Folder = Template.bind({});
|
41
|
+
Folder.args = {
|
42
|
+
icon: 'folder',
|
43
|
+
resourceSource: 'matrix',
|
44
|
+
};
|
45
|
+
|
46
|
+
export const GenericFile = Template.bind({});
|
47
|
+
GenericFile.args = {
|
48
|
+
icon: 'generic_file',
|
49
|
+
resourceSource: 'matrix',
|
50
|
+
};
|
51
|
+
|
52
|
+
export const Image = Template.bind({});
|
53
|
+
Image.args = {
|
54
|
+
icon: 'image',
|
55
|
+
resourceSource: 'matrix',
|
56
|
+
};
|
57
|
+
|
58
|
+
export const Page = Template.bind({});
|
59
|
+
Page.args = {
|
60
|
+
icon: 'page',
|
61
|
+
resourceSource: 'matrix',
|
62
|
+
};
|
63
|
+
|
64
|
+
export const Pdf = Template.bind({});
|
65
|
+
Pdf.args = {
|
66
|
+
icon: 'pdf',
|
67
|
+
resourceSource: 'matrix',
|
68
|
+
};
|
69
|
+
|
70
|
+
export const Powerpoint = Template.bind({});
|
71
|
+
Powerpoint.args = {
|
72
|
+
icon: 'powerpoint',
|
73
|
+
resourceSource: 'matrix',
|
74
|
+
};
|
75
|
+
|
76
|
+
export const Site = Template.bind({});
|
77
|
+
Site.args = {
|
78
|
+
icon: 'site',
|
79
|
+
resourceSource: 'matrix',
|
80
|
+
};
|
81
|
+
|
82
|
+
export const Video = Template.bind({});
|
83
|
+
Video.args = {
|
84
|
+
icon: 'video',
|
85
|
+
resourceSource: 'matrix',
|
86
|
+
};
|
87
|
+
|
88
|
+
export const Word = Template.bind({});
|
89
|
+
Word.args = {
|
90
|
+
icon: 'word',
|
91
|
+
resourceSource: 'matrix',
|
92
|
+
};
|
93
|
+
|
94
|
+
export const LargeIcon = Template.bind({});
|
95
|
+
LargeIcon.args = {
|
96
|
+
className: 'w-36 h-36',
|
97
|
+
};
|
98
|
+
|
99
|
+
export const SmallIcon = Template.bind({});
|
100
|
+
SmallIcon.args = {
|
101
|
+
className: 'w-4 h-4',
|
102
|
+
};
|
103
|
+
|
104
|
+
export const Default = Template.bind({});
|
105
|
+
Default.args = {};
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import GenericIconMap from './Generics/GenericIconMap';
|
3
|
+
import MatrixResourceMap from './MatrixResources/MatrixResourceMap';
|
4
|
+
|
5
|
+
export const iconSources = {
|
6
|
+
generic: GenericIconMap,
|
7
|
+
matrix: MatrixResourceMap,
|
8
|
+
};
|
9
|
+
|
10
|
+
// The resource sources options
|
11
|
+
export type ResourceSources = keyof typeof iconSources;
|
12
|
+
|
13
|
+
// Get the list of possible icons from the icon sources
|
14
|
+
export type IconOptions = keyof (typeof iconSources)[ResourceSources];
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Renders an icon based on the resource source and the icon name
|
18
|
+
* @param {{resourceSource?: ResourceSources; icon?: IconOptions; props: React.HTMLAttributes<HTMLOrSVGElement>}} props - The props for the Icon component
|
19
|
+
* @returns {React.FunctionComponent} - The icon component
|
20
|
+
* @example
|
21
|
+
* <Icon />
|
22
|
+
* @example
|
23
|
+
* <Icon resourceSource="generic" icon="generic_file" />
|
24
|
+
* @example
|
25
|
+
* <Icon resourceSource="matrix" icon="page" />
|
26
|
+
* @example
|
27
|
+
* <Icon resourceSource="matrix" icon="page" height={24} width={24} />
|
28
|
+
* @example
|
29
|
+
* <Icon resourceSource="matrix" icon="page" className="custom-class" />
|
30
|
+
*/
|
31
|
+
function Icon({
|
32
|
+
resourceSource = 'generic',
|
33
|
+
icon,
|
34
|
+
isDecorative = true,
|
35
|
+
...props
|
36
|
+
}: {
|
37
|
+
icon?: IconOptions;
|
38
|
+
resourceSource?: ResourceSources;
|
39
|
+
isDecorative?: boolean;
|
40
|
+
} & React.HTMLAttributes<HTMLElement> &
|
41
|
+
React.SVGAttributes<SVGElement>) {
|
42
|
+
// Loop through the resource sources
|
43
|
+
for (const source in iconSources) {
|
44
|
+
// If the resource source is the current source and the icon is in the current source map, render the icon
|
45
|
+
if (resourceSource === source && icon && icon in iconSources[source]) {
|
46
|
+
// Get the icon from the current source map
|
47
|
+
const Icon = iconSources[source][icon] as React.FunctionComponent<
|
48
|
+
{ isDecorative: boolean } & React.SVGProps<SVGSVGElement>
|
49
|
+
>;
|
50
|
+
|
51
|
+
// Render the icon
|
52
|
+
return <Icon isDecorative={isDecorative} {...props} />;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
// If the icon is not defined, render the default icon
|
57
|
+
const DefaultIcon = MatrixResourceMap['generic_file'];
|
58
|
+
return <DefaultIcon isDecorative={isDecorative} {...props} />;
|
59
|
+
}
|
60
|
+
|
61
|
+
export default Icon;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the Audio icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the Audio component
|
6
|
+
* @returns {JSX.Element} - The Audio component
|
7
|
+
* @example
|
8
|
+
* <Audio />
|
9
|
+
* @example
|
10
|
+
* <Audio height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <Audio className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function Audio({ isDecorative, ...props }: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
15
|
+
return (
|
16
|
+
<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" {...props}>
|
17
|
+
<rect fill="#cce9ed" height="19" rx="1.5" stroke="#73c0cb" width="19" x="2.5" y="2.5" />
|
18
|
+
<path
|
19
|
+
d="m9.5 7.4798c0-.23683.16616-.44118.39802-.48949l5.99998-1.25c.3105-.06468.602.17234.602.48949v1.2904c0 .23683-.1662.44118-.398.48949l-6 1.25c-.31051.06468-.602-.17234-.602-.48949z"
|
20
|
+
fill="#73c0cb"
|
21
|
+
stroke="#057e91"
|
22
|
+
/>
|
23
|
+
<path d="m9 8c0-.55228.44772-1 1-1v9.5c0 .2761-.22386.5-.5.5s-.5-.2239-.5-.5z" fill="#057e91" />
|
24
|
+
<circle cx="7.5" cy="16.5" fill="#73c0cb" r="2" stroke="#057e91" />
|
25
|
+
<path d="m16 7 1 .32v7.18c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5z" fill="#057e91" />
|
26
|
+
<circle cx="14.5" cy="14.5" fill="#73c0cb" r="2" stroke="#057e91" />
|
27
|
+
{!isDecorative && <title>audio icon</title>}
|
28
|
+
</svg>
|
29
|
+
);
|
30
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Renders the Excel icon
|
5
|
+
* @param {React.SVGProps<SVGSVGElement>} props - The props for the Excel component
|
6
|
+
* @returns {JSX.Element} - The Excel component
|
7
|
+
* @example
|
8
|
+
* <Excel />
|
9
|
+
* @example
|
10
|
+
* <Excel height={24} width={24} />
|
11
|
+
* @example
|
12
|
+
* <Excel className="custom-class" />
|
13
|
+
*/
|
14
|
+
export default function Excel({ isDecorative, ...props }: { isDecorative: boolean } & React.SVGProps<SVGSVGElement>) {
|
15
|
+
return (
|
16
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
17
|
+
<path
|
18
|
+
d="M14.1716 2.5H6C5.17157 2.5 4.5 3.17157 4.5 4V20C4.5 20.8284 5.17157 21.5 6 21.5H18C18.8284 21.5 19.5 20.8284 19.5 20V7.82843C19.5 7.16539 19.2366 6.5295 18.7678 6.06066L15.9393 3.23223C15.4705 2.76339 14.8346 2.5 14.1716 2.5Z"
|
19
|
+
fill="#E7E7E7"
|
20
|
+
stroke="#BCBCBC"
|
21
|
+
/>
|
22
|
+
<path d="M14.5 3V6.5C14.5 7.05228 14.9477 7.5 15.5 7.5H19" stroke="#BCBCBC" />
|
23
|
+
<rect y="8" width="12" height="12" rx="2" fill="#4FAD6F" />
|
24
|
+
<path d="M3.5 11.5L8.5 16.5" stroke="white" strokeLinecap="round" />
|
25
|
+
<path d="M8.5 11.5L3.5 16.5" stroke="white" strokeLinecap="round" />
|
26
|
+
{!isDecorative && <title>excel icon</title>}
|
27
|
+
</svg>
|
28
|
+
);
|
29
|
+
}
|