@indico-data/design-system 2.45.2 → 2.45.3
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/README.md +23 -4
- package/lib/components/forms/date/datePicker/contants.d.ts +1 -1
- package/lib/components/icons/Icon.stories.d.ts +1 -0
- package/lib/components/icons/indicons.d.ts +3 -1
- package/lib/components/icons/types.d.ts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.esm.js +208 -164
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +206 -162
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button/Button.stories.tsx +5 -0
- package/src/components/icons/Icon.mdx +26 -5
- package/src/components/icons/Icon.stories.tsx +21 -3
- package/src/components/icons/Icon.tsx +10 -14
- package/src/components/icons/__tests__/Icon.test.tsx +8 -8
- package/src/components/icons/indicons.tsx +296 -351
- package/src/components/icons/types.ts +2 -2
- package/src/setup/setupIcons.ts +5 -1
- package/src/storybook/iconNames.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MouseEventHandler } from 'react';
|
|
1
|
+
import { MouseEventHandler, CSSProperties } from 'react';
|
|
2
2
|
import { PermafrostComponent } from '../../types';
|
|
3
3
|
import { IconName as FAIconName } from '@fortawesome/fontawesome-svg-core';
|
|
4
4
|
import { indicons } from './indicons';
|
|
@@ -13,6 +13,6 @@ export type IconProps = PermafrostComponent & {
|
|
|
13
13
|
name: IconName;
|
|
14
14
|
ariaLabel?: string;
|
|
15
15
|
size?: IconSizes;
|
|
16
|
-
style?:
|
|
16
|
+
style?: CSSProperties;
|
|
17
17
|
onClick?: MouseEventHandler<SVGElement>;
|
|
18
18
|
};
|
package/src/setup/setupIcons.ts
CHANGED
|
@@ -23,8 +23,9 @@ import {
|
|
|
23
23
|
faQuestionCircle,
|
|
24
24
|
faCopy,
|
|
25
25
|
} from '@fortawesome/free-solid-svg-icons';
|
|
26
|
+
import { indiconDefinitions } from '@/components/icons/indicons';
|
|
26
27
|
|
|
27
|
-
// Utility for registering
|
|
28
|
+
// Utility for registering Font Awesome icons
|
|
28
29
|
export const registerFontAwesomeIcons = (...icons: IconDefinition[]) => {
|
|
29
30
|
library.add(...icons);
|
|
30
31
|
};
|
|
@@ -51,4 +52,7 @@ registerFontAwesomeIcons(
|
|
|
51
52
|
faFileDownload,
|
|
52
53
|
faQuestionCircle,
|
|
53
54
|
faCopy,
|
|
55
|
+
// backwards compat, don't require registration of custom indicons
|
|
56
|
+
// might want to consider doing so in the future
|
|
57
|
+
...indiconDefinitions,
|
|
54
58
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// NOTE: This file imports the full list of
|
|
1
|
+
// NOTE: This file imports the full list of Font Awesome icons, and is only intended for use in Storybook.
|
|
2
2
|
// Avoid importing this file into the design system code to keep bundle size at a minimum.
|
|
3
3
|
|
|
4
4
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|