@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.
Files changed (160) hide show
  1. package/.storybook/main.ts +23 -0
  2. package/.storybook/preview-head.html +15 -0
  3. package/.storybook/preview.ts +16 -0
  4. package/build.js +21 -0
  5. package/jest.config.ts +18 -0
  6. package/lib/Icons/Generics/ArrowDown.d.ts +15 -0
  7. package/lib/Icons/Generics/ArrowDown.js +23 -0
  8. package/lib/Icons/Generics/ArrowRight.d.ts +15 -0
  9. package/lib/Icons/Generics/ArrowRight.js +23 -0
  10. package/lib/Icons/Generics/Close.d.ts +15 -0
  11. package/lib/Icons/Generics/Close.js +23 -0
  12. package/lib/Icons/Generics/GenericIconMap.d.ts +10 -0
  13. package/lib/Icons/Generics/GenericIconMap.js +14 -0
  14. package/lib/Icons/Generics/ResourceSelect.d.ts +15 -0
  15. package/lib/Icons/Generics/ResourceSelect.js +28 -0
  16. package/lib/Icons/Generics/Root.d.ts +15 -0
  17. package/lib/Icons/Generics/Root.js +23 -0
  18. package/lib/Icons/Generics/Selected.d.ts +15 -0
  19. package/lib/Icons/Generics/Selected.js +23 -0
  20. package/lib/Icons/Generics/index.d.ts +6 -0
  21. package/lib/Icons/Generics/index.js +19 -0
  22. package/lib/Icons/Icon.d.ts +47 -0
  23. package/lib/Icons/Icon.js +44 -0
  24. package/lib/Icons/MatrixResources/Audio.d.ts +15 -0
  25. package/lib/Icons/MatrixResources/Audio.js +28 -0
  26. package/lib/Icons/MatrixResources/Excel.d.ts +15 -0
  27. package/lib/Icons/MatrixResources/Excel.js +27 -0
  28. package/lib/Icons/MatrixResources/Folder.d.ts +15 -0
  29. package/lib/Icons/MatrixResources/Folder.js +24 -0
  30. package/lib/Icons/MatrixResources/GenericFile.d.ts +15 -0
  31. package/lib/Icons/MatrixResources/GenericFile.js +28 -0
  32. package/lib/Icons/MatrixResources/Image.d.ts +15 -0
  33. package/lib/Icons/MatrixResources/Image.js +26 -0
  34. package/lib/Icons/MatrixResources/MatrixResourceMap.d.ts +15 -0
  35. package/lib/Icons/MatrixResources/MatrixResourceMap.js +19 -0
  36. package/lib/Icons/MatrixResources/Page.d.ts +15 -0
  37. package/lib/Icons/MatrixResources/Page.js +30 -0
  38. package/lib/Icons/MatrixResources/Pdf.d.ts +15 -0
  39. package/lib/Icons/MatrixResources/Pdf.js +31 -0
  40. package/lib/Icons/MatrixResources/Powerpoint.d.ts +15 -0
  41. package/lib/Icons/MatrixResources/Powerpoint.js +28 -0
  42. package/lib/Icons/MatrixResources/Site.d.ts +15 -0
  43. package/lib/Icons/MatrixResources/Site.js +30 -0
  44. package/lib/Icons/MatrixResources/Video.d.ts +15 -0
  45. package/lib/Icons/MatrixResources/Video.js +24 -0
  46. package/lib/Icons/MatrixResources/Word.d.ts +17 -0
  47. package/lib/Icons/MatrixResources/Word.js +28 -0
  48. package/lib/Icons/MatrixResources/index.d.ts +11 -0
  49. package/lib/Icons/MatrixResources/index.js +29 -0
  50. package/lib/Modal/Modal.d.ts +11 -0
  51. package/lib/Modal/Modal.js +46 -0
  52. package/lib/Modal/ModalOpeningButton.d.ts +10 -0
  53. package/lib/Modal/ModalOpeningButton.js +13 -0
  54. package/lib/Modal/ModalTrigger.d.ts +9 -0
  55. package/lib/Modal/ModalTrigger.js +24 -0
  56. package/lib/PreviewPanel/PreviewModal.d.ts +11 -0
  57. package/lib/PreviewPanel/PreviewModal.js +81 -0
  58. package/lib/PreviewPanel/PreviewPanel.d.ts +16 -0
  59. package/lib/PreviewPanel/PreviewPanel.js +87 -0
  60. package/lib/PreviewPanel/details/MatrixResource.d.ts +12 -0
  61. package/lib/PreviewPanel/details/MatrixResource.js +41 -0
  62. package/lib/ResourceBreadcrumb/ResourceBreadcrumb.d.ts +9 -0
  63. package/lib/ResourceBreadcrumb/ResourceBreadcrumb.js +20 -0
  64. package/lib/ResourceItem/ResourceItem.d.ts +19 -0
  65. package/lib/ResourceItem/ResourceItem.js +26 -0
  66. package/lib/ResourceList/ResourceList.d.ts +14 -0
  67. package/lib/ResourceList/ResourceList.js +51 -0
  68. package/lib/ResourcePickerContainer/ResourcePickerContainer.d.ts +15 -0
  69. package/lib/ResourcePickerContainer/ResourcePickerContainer.js +145 -0
  70. package/lib/Skeleton/List/SkeletonList.d.ts +6 -0
  71. package/lib/Skeleton/List/SkeletonList.js +13 -0
  72. package/lib/Skeleton/ListItem/SkeletonListItem.d.ts +2 -0
  73. package/lib/Skeleton/ListItem/SkeletonListItem.js +15 -0
  74. package/lib/SourceDropdown/SourceDropdown.d.ts +9 -0
  75. package/lib/SourceDropdown/SourceDropdown.js +106 -0
  76. package/lib/SourceList/SourceList.d.ts +14 -0
  77. package/lib/SourceList/SourceList.js +58 -0
  78. package/lib/Spinner/Spinner.d.ts +8 -0
  79. package/lib/Spinner/Spinner.js +12 -0
  80. package/lib/index.css +968 -0
  81. package/lib/index.d.ts +37 -0
  82. package/lib/index.js +15 -0
  83. package/lib/uuid.d.ts +1 -0
  84. package/lib/uuid.js +8 -0
  85. package/package.json +74 -0
  86. package/postcss.config.js +11 -0
  87. package/src/Icons/Generics/ArrowDown.tsx +27 -0
  88. package/src/Icons/Generics/ArrowRight.tsx +27 -0
  89. package/src/Icons/Generics/Close.tsx +26 -0
  90. package/src/Icons/Generics/GenericIconMap.ts +14 -0
  91. package/src/Icons/Generics/ResourceSelect.tsx +40 -0
  92. package/src/Icons/Generics/Root.tsx +24 -0
  93. package/src/Icons/Generics/Selected.tsx +27 -0
  94. package/src/Icons/Generics/index.tsx +7 -0
  95. package/src/Icons/Icon.spec.tsx +62 -0
  96. package/src/Icons/Icon.stories.tsx +105 -0
  97. package/src/Icons/Icon.tsx +61 -0
  98. package/src/Icons/MatrixResources/Audio.tsx +30 -0
  99. package/src/Icons/MatrixResources/Excel.tsx +29 -0
  100. package/src/Icons/MatrixResources/Folder.tsx +29 -0
  101. package/src/Icons/MatrixResources/GenericFile.tsx +34 -0
  102. package/src/Icons/MatrixResources/Image.tsx +36 -0
  103. package/src/Icons/MatrixResources/MatrixResourceMap.ts +19 -0
  104. package/src/Icons/MatrixResources/Page.tsx +33 -0
  105. package/src/Icons/MatrixResources/Pdf.tsx +34 -0
  106. package/src/Icons/MatrixResources/Powerpoint.tsx +34 -0
  107. package/src/Icons/MatrixResources/Site.tsx +37 -0
  108. package/src/Icons/MatrixResources/Video.tsx +27 -0
  109. package/src/Icons/MatrixResources/Word.tsx +30 -0
  110. package/src/Icons/MatrixResources/index.tsx +12 -0
  111. package/src/Modal/Modal.spec.tsx +244 -0
  112. package/src/Modal/Modal.tsx +58 -0
  113. package/src/Modal/ModalContainer.stories.tsx +33 -0
  114. package/src/Modal/ModalOpeningButton.tsx +20 -0
  115. package/src/Modal/ModalTrigger.tsx +45 -0
  116. package/src/PreviewPanel/PreviewModal.spec.tsx +164 -0
  117. package/src/PreviewPanel/PreviewModal.tsx +92 -0
  118. package/src/PreviewPanel/PreviewPanel.spec.tsx +197 -0
  119. package/src/PreviewPanel/PreviewPanel.stories.tsx +61 -0
  120. package/src/PreviewPanel/PreviewPanel.tsx +123 -0
  121. package/src/PreviewPanel/details/MatrixResource.tsx +59 -0
  122. package/src/ResourceBreadcrumb/ResourceBreadcrumb.spec.tsx +76 -0
  123. package/src/ResourceBreadcrumb/ResourceBreadcrumb.stories.tsx +24 -0
  124. package/src/ResourceBreadcrumb/ResourceBreadcrumb.tsx +39 -0
  125. package/src/ResourceBreadcrumb/sample-hierarchy.json +23 -0
  126. package/src/ResourceItem/ResourceItem.spec.tsx +69 -0
  127. package/src/ResourceItem/ResourceItem.tsx +82 -0
  128. package/src/ResourceList/ResourceList.spec.tsx +196 -0
  129. package/src/ResourceList/ResourceList.stories.tsx +40 -0
  130. package/src/ResourceList/ResourceList.tsx +74 -0
  131. package/src/ResourceList/sample-resources.json +75 -0
  132. package/src/ResourcePickerContainer/ResourcePickerContainer.spec.tsx +706 -0
  133. package/src/ResourcePickerContainer/ResourcePickerContainer.stories.tsx +56 -0
  134. package/src/ResourcePickerContainer/ResourcePickerContainer.tsx +224 -0
  135. package/src/Skeleton/List/SkeletonList.spec.tsx +18 -0
  136. package/src/Skeleton/List/SkeletonList.stories.tsx +15 -0
  137. package/src/Skeleton/List/SkeletonList.tsx +16 -0
  138. package/src/Skeleton/ListItem/SkeletonListItem.stories.tsx +15 -0
  139. package/src/Skeleton/ListItem/SkeletonListItem.tsx +14 -0
  140. package/src/SourceDropdown/SourceDropdown.spec.tsx +263 -0
  141. package/src/SourceDropdown/SourceDropdown.stories.tsx +36 -0
  142. package/src/SourceDropdown/SourceDropdown.tsx +175 -0
  143. package/src/SourceDropdown/sample-sources.json +110 -0
  144. package/src/SourceList/SourceList.spec.tsx +224 -0
  145. package/src/SourceList/SourceList.stories.tsx +40 -0
  146. package/src/SourceList/SourceList.tsx +93 -0
  147. package/src/SourceList/sample-sources.json +110 -0
  148. package/src/Spinner/Spinner.spec.tsx +18 -0
  149. package/src/Spinner/Spinner.stories.tsx +26 -0
  150. package/src/Spinner/Spinner.tsx +18 -0
  151. package/src/Spinner/_spinner.scss +11 -0
  152. package/src/__mocks__/JestHelpers.ts +65 -0
  153. package/src/__mocks__/jestHelpers.spec.ts +38 -0
  154. package/src/__mocks__/styleMock.ts +1 -0
  155. package/src/index.scss +7 -0
  156. package/src/index.stories.tsx +70 -0
  157. package/src/index.tsx +71 -0
  158. package/src/uuid.ts +7 -0
  159. package/tailwind.config.cjs +84 -0
  160. package/tsconfig.json +22 -0
@@ -0,0 +1,23 @@
1
+ import type { StorybookConfig } from '@storybook/react-vite';
2
+ const config: StorybookConfig = {
3
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
4
+ addons: [
5
+ '@storybook/addon-links',
6
+ '@storybook/addon-essentials',
7
+ '@storybook/addon-interactions',
8
+ {
9
+ name: '@storybook/addon-styling',
10
+ options: {
11
+ postCss: true,
12
+ },
13
+ },
14
+ ],
15
+ framework: {
16
+ name: '@storybook/react-vite',
17
+ options: {},
18
+ },
19
+ docs: {
20
+ autodocs: 'tag',
21
+ },
22
+ };
23
+ export default config;
@@ -0,0 +1,15 @@
1
+ <script>
2
+ window.global = window;
3
+ setTimeout(function () {
4
+ document.body.classList.add('squiz-rb-scope');
5
+ }, 0);
6
+ </script>
7
+
8
+ <style>
9
+ .sb-show-main.sb-main-padded {
10
+ padding: 0;
11
+ }
12
+ body {
13
+ font-family: 'Open Sans';
14
+ }
15
+ </style>
@@ -0,0 +1,16 @@
1
+ import type { Preview } from '@storybook/react';
2
+ import '../src/index.scss';
3
+
4
+ const preview: Preview = {
5
+ parameters: {
6
+ actions: { argTypesRegex: '^on[A-Z].*' },
7
+ controls: {
8
+ matchers: {
9
+ color: /(background|color)$/i,
10
+ date: /Date$/,
11
+ },
12
+ },
13
+ },
14
+ };
15
+
16
+ export default preview;
package/build.js ADDED
@@ -0,0 +1,21 @@
1
+ const esbuild = require('esbuild');
2
+ const { sassPlugin } = require('esbuild-sass-plugin');
3
+ const postcss = require('postcss');
4
+ const postcssConfig = require('./postcss.config').plugins;
5
+
6
+ esbuild
7
+ .build({
8
+ entryPoints: ['src/index.scss'],
9
+ bundle: true,
10
+ outdir: 'lib',
11
+ plugins: [
12
+ sassPlugin({
13
+ type: 'css',
14
+ transform: async (source) => {
15
+ const { css } = postcss(postcssConfig).process(source);
16
+ return css;
17
+ },
18
+ }),
19
+ ],
20
+ })
21
+ .catch(() => process.exit(1));
package/jest.config.ts ADDED
@@ -0,0 +1,18 @@
1
+ import type { Config } from 'jest';
2
+
3
+ // Sync object
4
+ const config: Config = {
5
+ preset: 'ts-jest',
6
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
7
+ testTimeout: 60_000,
8
+ testEnvironment: 'jsdom',
9
+ passWithNoTests: true,
10
+ testPathIgnorePatterns: ['/lib/', `/node_modules/`],
11
+ maxWorkers: 1,
12
+ moduleNameMapper: {
13
+ '^.+\\.(css|scss)$': '<rootDir>/src/__mocks__/styleMock.ts',
14
+ },
15
+ setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
16
+ };
17
+
18
+ export default config;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the ArrowDown icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the ArrowDown component
5
+ * @returns {JSX.Element} - The ArrowDown component
6
+ * @example
7
+ * <ArrowDown />
8
+ * @example
9
+ * <ArrowDown height={24} width={24} />
10
+ * @example
11
+ * <ArrowDown className="custom-class" />
12
+ */
13
+ export default function ArrowDown({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,23 @@
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
+ /**
8
+ * Renders the ArrowDown icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the ArrowDown component
10
+ * @returns {JSX.Element} - The ArrowDown component
11
+ * @example
12
+ * <ArrowDown />
13
+ * @example
14
+ * <ArrowDown height={24} width={24} />
15
+ * @example
16
+ * <ArrowDown className="custom-class" />
17
+ */
18
+ function ArrowDown({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("path", { 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", fill: "#707070" }),
21
+ !isDecorative && react_1.default.createElement("title", null, "arrow down icon")));
22
+ }
23
+ exports.default = ArrowDown;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the ArrowRight icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the ArrowRight component
5
+ * @returns {JSX.Element} - The ArrowRight component
6
+ * @example
7
+ * <ArrowRight />
8
+ * @example
9
+ * <ArrowRight height={24} width={24} />
10
+ * @example
11
+ * <ArrowRight className="custom-class" />
12
+ */
13
+ export default function ArrowRight({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,23 @@
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
+ /**
8
+ * Renders the ArrowRight icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the ArrowRight component
10
+ * @returns {JSX.Element} - The ArrowRight component
11
+ * @example
12
+ * <ArrowRight />
13
+ * @example
14
+ * <ArrowRight height={24} width={24} />
15
+ * @example
16
+ * <ArrowRight className="custom-class" />
17
+ */
18
+ function ArrowRight({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("path", { 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", fill: "#707070" }),
21
+ !isDecorative && react_1.default.createElement("title", null, "arrow right icon")));
22
+ }
23
+ exports.default = ArrowRight;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the Close icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Close component
5
+ * @returns {JSX.Element} - The Close component
6
+ * @example
7
+ * <Close />
8
+ * @example
9
+ * <Close height={24} width={24} />
10
+ * @example
11
+ * <Close className="custom-class" />
12
+ */
13
+ export default function Close({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,23 @@
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
+ /**
8
+ * Renders the Close icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Close component
10
+ * @returns {JSX.Element} - The Close component
11
+ * @example
12
+ * <Close />
13
+ * @example
14
+ * <Close height={24} width={24} />
15
+ * @example
16
+ * <Close className="custom-class" />
17
+ */
18
+ function Close({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", 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", fill: "#949494" }),
21
+ !isDecorative && react_1.default.createElement("title", null, "close icon")));
22
+ }
23
+ exports.default = Close;
@@ -0,0 +1,10 @@
1
+ import { ArrowRight, ArrowDown, Selected, Root, ResourceSelect, Close } from '.';
2
+ declare const GenericIconMap: {
3
+ 'arrow-right': typeof ArrowRight;
4
+ 'arrow-down': typeof ArrowDown;
5
+ 'resource-select': typeof ResourceSelect;
6
+ selected: typeof Selected;
7
+ root: typeof Root;
8
+ close: typeof Close;
9
+ };
10
+ export default GenericIconMap;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ // Define our map of matrix types to icons
5
+ const GenericIconMap = {
6
+ 'arrow-right': _1.ArrowRight,
7
+ 'arrow-down': _1.ArrowDown,
8
+ 'resource-select': _1.ResourceSelect,
9
+ selected: _1.Selected,
10
+ root: _1.Root,
11
+ close: _1.Close,
12
+ };
13
+ // Export our map
14
+ exports.default = GenericIconMap;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the ResourceSelected icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the ResourceSelected component
5
+ * @returns {JSX.Element} - The ResourceSelected component
6
+ * @example
7
+ * <ResourceSelected />
8
+ * @example
9
+ * <ResourceSelected height={24} width={24} />
10
+ * @example
11
+ * <ResourceSelected className="custom-class" />
12
+ */
13
+ export default function ResourceSelected({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,28 @@
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
+ /**
8
+ * Renders the ResourceSelected icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the ResourceSelected component
10
+ * @returns {JSX.Element} - The ResourceSelected component
11
+ * @example
12
+ * <ResourceSelected />
13
+ * @example
14
+ * <ResourceSelected height={24} width={24} />
15
+ * @example
16
+ * <ResourceSelected className="custom-class" />
17
+ */
18
+ function ResourceSelected({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { width: "72", height: "72", viewBox: "0 0 72 72", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("mask", { id: "mask0_1232_8208",
21
+ // style="mask-type:alpha"
22
+ maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "72", height: "72" },
23
+ react_1.default.createElement("rect", { width: "72", height: "72", fill: "#D9D9D9" })),
24
+ react_1.default.createElement("g", { mask: "url(#mask0_1232_8208)" },
25
+ react_1.default.createElement("path", { 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", fill: "#BABABA" })),
26
+ !isDecorative && react_1.default.createElement("title", null, "resource select icon")));
27
+ }
28
+ exports.default = ResourceSelected;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the Root icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Root component
5
+ * @returns {JSX.Element} - The Root component
6
+ * @example
7
+ * <Root />
8
+ * @example
9
+ * <Root height={24} width={24} />
10
+ * @example
11
+ * <Root className="custom-class" />
12
+ */
13
+ export default function Root({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,23 @@
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
+ /**
8
+ * Renders the Root icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Root component
10
+ * @returns {JSX.Element} - The Root component
11
+ * @example
12
+ * <Root />
13
+ * @example
14
+ * <Root height={24} width={24} />
15
+ * @example
16
+ * <Root className="custom-class" />
17
+ */
18
+ function Root({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("path", { 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", fill: "#707070" }),
21
+ !isDecorative && react_1.default.createElement("title", null, "root icon")));
22
+ }
23
+ exports.default = Root;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the Selected icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Selected component
5
+ * @returns {JSX.Element} - The Selected component
6
+ * @example
7
+ * <Selected />
8
+ * @example
9
+ * <Selected height={24} width={24} />
10
+ * @example
11
+ * <Selected className="custom-class" />
12
+ */
13
+ export default function Selected({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,23 @@
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
+ /**
8
+ * Renders the Selected icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Selected component
10
+ * @returns {JSX.Element} - The Selected component
11
+ * @example
12
+ * <Selected />
13
+ * @example
14
+ * <Selected height={24} width={24} />
15
+ * @example
16
+ * <Selected className="custom-class" />
17
+ */
18
+ function Selected({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("path", { 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", fill: "#044985" }),
21
+ !isDecorative && react_1.default.createElement("title", null, "selected icon")));
22
+ }
23
+ exports.default = Selected;
@@ -0,0 +1,6 @@
1
+ export { default as ArrowRight } from './ArrowRight';
2
+ export { default as ArrowDown } from './ArrowDown';
3
+ export { default as Selected } from './Selected';
4
+ export { default as Root } from './Root';
5
+ export { default as ResourceSelect } from './ResourceSelect';
6
+ export { default as Close } from './Close';
@@ -0,0 +1,19 @@
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
+ exports.Close = exports.ResourceSelect = exports.Root = exports.Selected = exports.ArrowDown = exports.ArrowRight = void 0;
7
+ // Exports all icons from the Generics folder
8
+ var ArrowRight_1 = require("./ArrowRight");
9
+ Object.defineProperty(exports, "ArrowRight", { enumerable: true, get: function () { return __importDefault(ArrowRight_1).default; } });
10
+ var ArrowDown_1 = require("./ArrowDown");
11
+ Object.defineProperty(exports, "ArrowDown", { enumerable: true, get: function () { return __importDefault(ArrowDown_1).default; } });
12
+ var Selected_1 = require("./Selected");
13
+ Object.defineProperty(exports, "Selected", { enumerable: true, get: function () { return __importDefault(Selected_1).default; } });
14
+ var Root_1 = require("./Root");
15
+ Object.defineProperty(exports, "Root", { enumerable: true, get: function () { return __importDefault(Root_1).default; } });
16
+ var ResourceSelect_1 = require("./ResourceSelect");
17
+ Object.defineProperty(exports, "ResourceSelect", { enumerable: true, get: function () { return __importDefault(ResourceSelect_1).default; } });
18
+ var Close_1 = require("./Close");
19
+ Object.defineProperty(exports, "Close", { enumerable: true, get: function () { return __importDefault(Close_1).default; } });
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ export declare const iconSources: {
3
+ generic: {
4
+ 'arrow-right': typeof import("./Generics").ArrowRight;
5
+ 'arrow-down': typeof import("./Generics").ArrowDown;
6
+ 'resource-select': typeof import("./Generics").ResourceSelect;
7
+ selected: typeof import("./Generics").Selected;
8
+ root: typeof import("./Generics").Root;
9
+ close: typeof import("./Generics").Close;
10
+ };
11
+ matrix: {
12
+ audio: typeof import("./MatrixResources").Audio;
13
+ excel: typeof import("./MatrixResources").Excel;
14
+ folder: typeof import("./MatrixResources").Folder;
15
+ generic_file: typeof import("./MatrixResources").GenericFile;
16
+ image: typeof import("./MatrixResources").Image;
17
+ page_standard: typeof import("./MatrixResources").Page;
18
+ pdf: typeof import("./MatrixResources").Pdf;
19
+ powerpoint: typeof import("./MatrixResources").Powerpoint;
20
+ site: typeof import("./MatrixResources").Site;
21
+ video: typeof import("./MatrixResources").Video;
22
+ word: typeof import("./MatrixResources").Word;
23
+ };
24
+ };
25
+ export type ResourceSources = keyof typeof iconSources;
26
+ export type IconOptions = keyof (typeof iconSources)[ResourceSources];
27
+ /**
28
+ * Renders an icon based on the resource source and the icon name
29
+ * @param {{resourceSource?: ResourceSources; icon?: IconOptions; props: React.HTMLAttributes<HTMLOrSVGElement>}} props - The props for the Icon component
30
+ * @returns {React.FunctionComponent} - The icon component
31
+ * @example
32
+ * <Icon />
33
+ * @example
34
+ * <Icon resourceSource="generic" icon="generic_file" />
35
+ * @example
36
+ * <Icon resourceSource="matrix" icon="page" />
37
+ * @example
38
+ * <Icon resourceSource="matrix" icon="page" height={24} width={24} />
39
+ * @example
40
+ * <Icon resourceSource="matrix" icon="page" className="custom-class" />
41
+ */
42
+ declare function Icon({ resourceSource, icon, isDecorative, ...props }: {
43
+ icon?: IconOptions;
44
+ resourceSource?: ResourceSources;
45
+ isDecorative?: boolean;
46
+ } & React.HTMLAttributes<HTMLElement> & React.SVGAttributes<SVGElement>): JSX.Element;
47
+ export default Icon;
@@ -0,0 +1,44 @@
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
+ exports.iconSources = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const GenericIconMap_1 = __importDefault(require("./Generics/GenericIconMap"));
9
+ const MatrixResourceMap_1 = __importDefault(require("./MatrixResources/MatrixResourceMap"));
10
+ exports.iconSources = {
11
+ generic: GenericIconMap_1.default,
12
+ matrix: MatrixResourceMap_1.default,
13
+ };
14
+ /**
15
+ * Renders an icon based on the resource source and the icon name
16
+ * @param {{resourceSource?: ResourceSources; icon?: IconOptions; props: React.HTMLAttributes<HTMLOrSVGElement>}} props - The props for the Icon component
17
+ * @returns {React.FunctionComponent} - The icon component
18
+ * @example
19
+ * <Icon />
20
+ * @example
21
+ * <Icon resourceSource="generic" icon="generic_file" />
22
+ * @example
23
+ * <Icon resourceSource="matrix" icon="page" />
24
+ * @example
25
+ * <Icon resourceSource="matrix" icon="page" height={24} width={24} />
26
+ * @example
27
+ * <Icon resourceSource="matrix" icon="page" className="custom-class" />
28
+ */
29
+ function Icon({ resourceSource = 'generic', icon, isDecorative = true, ...props }) {
30
+ // Loop through the resource sources
31
+ for (const source in exports.iconSources) {
32
+ // If the resource source is the current source and the icon is in the current source map, render the icon
33
+ if (resourceSource === source && icon && icon in exports.iconSources[source]) {
34
+ // Get the icon from the current source map
35
+ const Icon = exports.iconSources[source][icon];
36
+ // Render the icon
37
+ return react_1.default.createElement(Icon, { isDecorative: isDecorative, ...props });
38
+ }
39
+ }
40
+ // If the icon is not defined, render the default icon
41
+ const DefaultIcon = MatrixResourceMap_1.default['generic_file'];
42
+ return react_1.default.createElement(DefaultIcon, { isDecorative: isDecorative, ...props });
43
+ }
44
+ exports.default = Icon;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the Audio icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Audio component
5
+ * @returns {JSX.Element} - The Audio component
6
+ * @example
7
+ * <Audio />
8
+ * @example
9
+ * <Audio height={24} width={24} />
10
+ * @example
11
+ * <Audio className="custom-class" />
12
+ */
13
+ export default function Audio({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,28 @@
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
+ /**
8
+ * Renders the Audio icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Audio component
10
+ * @returns {JSX.Element} - The Audio component
11
+ * @example
12
+ * <Audio />
13
+ * @example
14
+ * <Audio height={24} width={24} />
15
+ * @example
16
+ * <Audio className="custom-class" />
17
+ */
18
+ function Audio({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { fill: "none", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("rect", { fill: "#cce9ed", height: "19", rx: "1.5", stroke: "#73c0cb", width: "19", x: "2.5", y: "2.5" }),
21
+ react_1.default.createElement("path", { 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", fill: "#73c0cb", stroke: "#057e91" }),
22
+ react_1.default.createElement("path", { d: "m9 8c0-.55228.44772-1 1-1v9.5c0 .2761-.22386.5-.5.5s-.5-.2239-.5-.5z", fill: "#057e91" }),
23
+ react_1.default.createElement("circle", { cx: "7.5", cy: "16.5", fill: "#73c0cb", r: "2", stroke: "#057e91" }),
24
+ react_1.default.createElement("path", { d: "m16 7 1 .32v7.18c0 .2761-.2239.5-.5.5s-.5-.2239-.5-.5z", fill: "#057e91" }),
25
+ react_1.default.createElement("circle", { cx: "14.5", cy: "14.5", fill: "#73c0cb", r: "2", stroke: "#057e91" }),
26
+ !isDecorative && react_1.default.createElement("title", null, "audio icon")));
27
+ }
28
+ exports.default = Audio;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the Excel icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Excel component
5
+ * @returns {JSX.Element} - The Excel component
6
+ * @example
7
+ * <Excel />
8
+ * @example
9
+ * <Excel height={24} width={24} />
10
+ * @example
11
+ * <Excel className="custom-class" />
12
+ */
13
+ export default function Excel({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,27 @@
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
+ /**
8
+ * Renders the Excel icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Excel component
10
+ * @returns {JSX.Element} - The Excel component
11
+ * @example
12
+ * <Excel />
13
+ * @example
14
+ * <Excel height={24} width={24} />
15
+ * @example
16
+ * <Excel className="custom-class" />
17
+ */
18
+ function Excel({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("path", { 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", fill: "#E7E7E7", stroke: "#BCBCBC" }),
21
+ react_1.default.createElement("path", { d: "M14.5 3V6.5C14.5 7.05228 14.9477 7.5 15.5 7.5H19", stroke: "#BCBCBC" }),
22
+ react_1.default.createElement("rect", { y: "8", width: "12", height: "12", rx: "2", fill: "#4FAD6F" }),
23
+ react_1.default.createElement("path", { d: "M3.5 11.5L8.5 16.5", stroke: "white", strokeLinecap: "round" }),
24
+ react_1.default.createElement("path", { d: "M8.5 11.5L3.5 16.5", stroke: "white", strokeLinecap: "round" }),
25
+ !isDecorative && react_1.default.createElement("title", null, "excel icon")));
26
+ }
27
+ exports.default = Excel;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ /**
3
+ * Renders the Folder icon
4
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Folder component
5
+ * @returns {JSX.Element} - The Folder component
6
+ * @example
7
+ * <Folder />
8
+ * @example
9
+ * <Folder height={24} width={24} />
10
+ * @example
11
+ * <Folder className="custom-class" />
12
+ */
13
+ export default function Folder({ isDecorative, ...props }: {
14
+ isDecorative: boolean;
15
+ } & React.SVGProps<SVGSVGElement>): JSX.Element;
@@ -0,0 +1,24 @@
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
+ /**
8
+ * Renders the Folder icon
9
+ * @param {React.SVGProps<SVGSVGElement>} props - The props for the Folder component
10
+ * @returns {JSX.Element} - The Folder component
11
+ * @example
12
+ * <Folder />
13
+ * @example
14
+ * <Folder height={24} width={24} />
15
+ * @example
16
+ * <Folder className="custom-class" />
17
+ */
18
+ function Folder({ isDecorative, ...props }) {
19
+ return (react_1.default.createElement("svg", { fill: "none", height: "24", viewBox: "0 0 24 24", width: "24", xmlns: "http://www.w3.org/2000/svg", ...props },
20
+ react_1.default.createElement("path", { d: "m1 5c0-1.10457.89543-2 2-2h8.1177c.6752 0 1.3049.34077 1.6743.9061l2.208 3.37961-14 3.71429z", fill: "#efb324" }),
21
+ react_1.default.createElement("path", { d: "m3 6.5c-.82843 0-1.5.67157-1.5 1.5v11.5c0 .5523.44771 1 1 1h18.5c.8284 0 1.5-.6716 1.5-1.5v-11c0-.82843-.6716-1.5-1.5-1.5h-7.5106-2.8369z", fill: "#fbefd2", stroke: "#f5d584" }),
22
+ !isDecorative && react_1.default.createElement("title", null, "folder icon")));
23
+ }
24
+ exports.default = Folder;