@indico-data/design-system 2.3.1 → 2.3.2

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.
@@ -1,4 +1,2 @@
1
- import React from 'react';
2
1
  import { IconProps } from './types';
3
- declare const Icon: React.FC<IconProps>;
4
- export default Icon;
2
+ export declare const Icon: ({ name, size, className, ariaLabel, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1 @@
1
- export { default as Icon } from './Icon';
1
+ export { Icon } from './Icon';
@@ -1,5 +1,5 @@
1
1
  import { MouseEventHandler } from 'react';
2
- import { IconName, PermafrostComponent } from '@/types';
2
+ import { PermafrostComponent, IconName } from '../../types';
3
3
  export type IconSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
4
  export type IconProps = PermafrostComponent & {
5
5
  name: IconName;
@@ -8,5 +8,5 @@ export type ButtonVariant = 'default' | 'primary' | 'destructive';
8
8
  export type ButtonSize = 'normal' | 'large';
9
9
  import { IconName } from '../build/generated/iconTypes';
10
10
  export type { IconName };
11
- import { IconSizes } from '@/components/icons/types';
11
+ import { IconSizes } from './components/icons/types';
12
12
  export type { IconSizes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indico-data/design-system",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -12,7 +12,7 @@ const kebabToCamel = (str?: string) => {
12
12
  return str.replace(/-./g, (match) => match.charAt(1).toUpperCase());
13
13
  };
14
14
 
15
- const Icon: React.FC<IconProps> = ({ name, size = 'md', className, ariaLabel, ...props }) => {
15
+ export const Icon = ({ name, size = 'md', className, ariaLabel, ...props }: IconProps) => {
16
16
  const camelCaseName = kebabToCamel(name);
17
17
  const faIcon = solidIcons[camelCaseName as keyof typeof solidIcons] as IconDefinition | undefined;
18
18
  const customIcon = indicons[name as keyof typeof indicons];
@@ -41,5 +41,3 @@ const Icon: React.FC<IconProps> = ({ name, size = 'md', className, ariaLabel, ..
41
41
  })
42
42
  );
43
43
  };
44
-
45
- export default Icon;
@@ -1,6 +1,6 @@
1
1
  import { render, screen } from '@testing-library/react';
2
2
  import userEvent from '@testing-library/user-event';
3
- import Icon from '../Icon';
3
+ import { Icon } from '@/components';
4
4
 
5
5
  describe('Icon Component', () => {
6
6
  describe('FontAwesome Icons', () => {
@@ -1 +1 @@
1
- export { default as Icon } from './Icon';
1
+ export { Icon } from './Icon';
@@ -1,5 +1,5 @@
1
1
  import { MouseEventHandler } from 'react';
2
- import { IconName, PermafrostComponent } from '@/types';
2
+ import { PermafrostComponent, IconName } from '../../types';
3
3
 
4
4
  export type IconSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
 
package/src/types.ts CHANGED
@@ -11,5 +11,5 @@ export type ButtonSize = 'normal' | 'large';
11
11
  import { IconName } from '../build/generated/iconTypes';
12
12
  export type { IconName };
13
13
 
14
- import { IconSizes } from '@/components/icons/types';
14
+ import { IconSizes } from './components/icons/types';
15
15
  export type { IconSizes };