@aic-kits/react 0.7.1 → 0.8.0

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,3 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { EmojiArtProps } from './types';
3
- export declare const EmojiArt: ({ art, width, height, style, "data-testid": testId, ...rest }: EmojiArtProps) => React.ReactElement;
3
+ export declare const EmojiArt: ({ art, size, style, "data-testid": testId, ...rest }: EmojiArtProps) => React.ReactElement;
@@ -1,3 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { IconArtProps } from './types';
3
- export declare const IconArt: ({ art, width, height, color, style, "data-testid": testId, ...rest }: IconArtProps) => React.ReactElement;
3
+ /**
4
+ * Renders a Phosphor icon within a layout Box.
5
+ * The specific icon is determined by the `art` prop (kebab-case name).
6
+ */
7
+ export declare const IconArt: ({ art, size, color, weight, style, "data-testid": testId, ...rest }: IconArtProps) => React.ReactElement | null;
@@ -1,15 +1,24 @@
1
+ import { Icon, IconWeight } from '@phosphor-icons/react';
1
2
  import { default as React } from 'react';
2
- import { Size } from '../../theme/common';
3
+ import { Size, Color } from '../../theme/common';
3
4
  import { BoxProps } from '../Box';
4
- export interface BaseArtProps extends BoxProps {
5
+ export interface WidthHeightProps {
5
6
  /**
6
7
  * Width of the art
7
8
  */
8
- width?: string | number;
9
+ width?: Size | string | number;
9
10
  /**
10
11
  * Height of the art
11
12
  */
12
13
  height?: Size | string | number;
14
+ }
15
+ export interface SizeProps {
16
+ /**
17
+ * Size of the art
18
+ */
19
+ size?: Size | string | number;
20
+ }
21
+ export interface BaseArtProps extends Omit<BoxProps, 'width' | 'height'> {
13
22
  /**
14
23
  * Testing id of the component
15
24
  */
@@ -19,21 +28,28 @@ export interface BaseArtProps extends BoxProps {
19
28
  */
20
29
  style?: React.CSSProperties;
21
30
  }
22
- export interface IconArtProps extends BaseArtProps {
31
+ export interface IconArtProps extends BaseArtProps, SizeProps {
23
32
  /**
24
33
  * Type of the art
25
34
  */
26
35
  type?: 'icon';
27
36
  /**
28
- * Icon name
37
+ * Name of the Phosphor icon (e.g., 'house', 'heart', 'airplane-in-flight').
38
+ * Must be a valid key from the `phosphorIconMap`.
29
39
  */
30
- art: string;
40
+ art: Icon;
41
+ /**
42
+ * Color of the icon. Can be a theme color key or any valid CSS color string.
43
+ * @default 'currentColor'
44
+ */
45
+ color?: Color | string;
31
46
  /**
32
- * Color of the icon
47
+ * Icon weight (stroke style).
48
+ * @default 'regular'
33
49
  */
34
- color?: string;
50
+ weight?: IconWeight;
35
51
  }
36
- export interface EmojiArtProps extends BaseArtProps {
52
+ export interface EmojiArtProps extends BaseArtProps, SizeProps {
37
53
  /**
38
54
  * Type of the art
39
55
  */
@@ -43,7 +59,7 @@ export interface EmojiArtProps extends BaseArtProps {
43
59
  */
44
60
  art: string;
45
61
  }
46
- export interface SvgArtProps extends BaseArtProps {
62
+ export interface SvgArtProps extends BaseArtProps, WidthHeightProps {
47
63
  /**
48
64
  * Type of the art
49
65
  */
@@ -53,7 +69,7 @@ export interface SvgArtProps extends BaseArtProps {
53
69
  */
54
70
  art: React.FunctionComponent<React.SVGAttributes<SVGElement>> | string;
55
71
  }
56
- export interface ImageArtProps extends BaseArtProps {
72
+ export interface ImageArtProps extends BaseArtProps, WidthHeightProps {
57
73
  /**
58
74
  * Type of the art
59
75
  */
@@ -63,7 +79,7 @@ export interface ImageArtProps extends BaseArtProps {
63
79
  */
64
80
  art: string;
65
81
  }
66
- export interface BrandArtProps extends BaseArtProps {
82
+ export interface BrandArtProps extends BaseArtProps, WidthHeightProps {
67
83
  /**
68
84
  * Type of the art
69
85
  */
@@ -33,4 +33,9 @@ declare const StyledButtonIconWrapper: import('styled-components/dist/types').IS
33
33
  }, ButtonIconWrapperProps>> & string & Omit<(props: import('..').BoxProps & {
34
34
  ref?: import('react').ForwardedRef<HTMLDivElement>;
35
35
  }) => ReturnType<({ children, style, "data-testid": testId, ...otherProps }: import('..').BoxProps, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element>, keyof import('react').Component<any, {}, any>>;
36
- export { StyledButtonContainer, StyledButtonText, StyledButtonIconWrapper, };
36
+ type ButtonIconProps = {
37
+ $themeColor: Color;
38
+ $themeTextColor?: Color;
39
+ };
40
+ declare const StyledButtonIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').IconArtProps | import('..').EmojiArtProps | import('..').SvgArtProps | import('..').ImageArtProps | import('..').BrandArtProps, ButtonIconProps>> & string & Omit<(props: import('..').ArtProps) => React.ReactElement, keyof import('react').Component<any, {}, any>>;
41
+ export { StyledButtonContainer, StyledButtonText, StyledButtonIconWrapper, StyledButtonIcon, };
@@ -1,3 +1,4 @@
1
+ import { Icon } from '@phosphor-icons/react';
1
2
  import { Color } from '../../theme';
2
3
  export interface ButtonProps {
3
4
  /**
@@ -7,7 +8,7 @@ export interface ButtonProps {
7
8
  /**
8
9
  * Places an icon within the button, before the button's text
9
10
  */
10
- icon?: React.ReactNode;
11
+ icon?: Icon;
11
12
  /**
12
13
  * Visual color to apply to button.
13
14
  * For 'solid' variant, sets background color.
@@ -31,7 +32,7 @@ export interface ButtonProps {
31
32
  /**
32
33
  * Places an icon within the button, after the button's text
33
34
  */
34
- rightIcon?: React.ReactNode;
35
+ rightIcon?: Icon;
35
36
  /**
36
37
  * Corner style of button.
37
38
  */