@aic-kits/react 0.8.0 → 0.10.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,6 +1,8 @@
1
1
  import { Color } from '../../theme';
2
2
  import { BoxProps } from '../Box';
3
3
  import { HeaderProps } from '../Header/types';
4
+ /** Defines the layout mode for the content area on desktop screens. */
5
+ export type ContentLayoutMode = 'maxWidth' | 'padded';
4
6
  export interface BaseProps extends BoxProps {
5
7
  /**
6
8
  * The background color of the Base component
@@ -12,4 +14,12 @@ export interface BaseProps extends BoxProps {
12
14
  * Can provide a HeaderProps object to customize the header
13
15
  */
14
16
  header?: HeaderProps | false;
17
+ /**
18
+ * Defines how the main content area is laid out on desktop screens.
19
+ * - `'maxWidth'`: Content is centered with a maximum width defined in the theme.
20
+ * - `'padded'`: Content uses horizontal padding defined in the theme.
21
+ * On mobile screens, content always uses mobile padding defined in the theme.
22
+ * @default 'maxWidth' (behavior might depend on theme defaults)
23
+ */
24
+ contentLayoutMode?: ContentLayoutMode;
15
25
  }
@@ -0,0 +1,5 @@
1
+ import { BaseThemeConfig } from '../../theme';
2
+ import { BoxProps } from '../Box';
3
+ import { ContentLayoutMode } from './types';
4
+ export declare const getInnerBoxStyleProps: (isDesktop: boolean, contentLayoutMode: ContentLayoutMode, baseThemeConfig: BaseThemeConfig) => Pick<BoxProps, "px" | "maxWidth">;
5
+ export declare const getInnerBoxInlineStyle: (isDesktop: boolean, contentLayoutMode: ContentLayoutMode) => import('react').CSSProperties;
@@ -1,4 +1,5 @@
1
- import { BorderWidth, Color, Space } from '../../theme/common';
1
+ import { BorderWidth, Color, FontSize, Space, Size, FontWeight } from '../../theme/common';
2
+ import { ButtonSize } from '../../theme/components/button';
2
3
  type ButtonContainerProps = {
3
4
  $backgroundColor: Color | 'disabled';
4
5
  $borderRadius: string;
@@ -6,8 +7,9 @@ type ButtonContainerProps = {
6
7
  $disabled?: boolean;
7
8
  $variant: 'solid' | 'outlined' | 'text';
8
9
  $color: Color;
9
- $paddingHorizontal?: Space;
10
- $paddingVertical?: Space;
10
+ $paddingHorizontal: Space;
11
+ $paddingVertical: Space;
12
+ $size: ButtonSize;
11
13
  };
12
14
  declare const StyledButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
13
15
  ref?: import('react').ForwardedRef<HTMLDivElement>;
@@ -19,6 +21,8 @@ type ButtonTextProps = {
19
21
  $themeTextColor?: Color;
20
22
  $disabled?: boolean;
21
23
  $variant: 'solid' | 'outlined' | 'text';
24
+ $themeFontSize: FontSize;
25
+ $themeFontWeight: FontWeight;
22
26
  };
23
27
  declare const StyledButtonText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').TextProps & {
24
28
  useRichText?: boolean;
@@ -27,6 +31,7 @@ declare const StyledButtonText: import('styled-components/dist/types').IStyledCo
27
31
  }) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
28
32
  type ButtonIconWrapperProps = {
29
33
  $themePosition: 'left' | 'right';
34
+ $iconSpacing: Space;
30
35
  };
31
36
  declare const StyledButtonIconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
32
37
  ref?: import('react').ForwardedRef<HTMLDivElement>;
@@ -36,6 +41,9 @@ declare const StyledButtonIconWrapper: import('styled-components/dist/types').IS
36
41
  type ButtonIconProps = {
37
42
  $themeColor: Color;
38
43
  $themeTextColor?: Color;
44
+ $disabled?: boolean;
45
+ $variant: 'solid' | 'outlined' | 'text';
46
+ $iconSize: Size;
39
47
  };
40
48
  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
49
  export { StyledButtonContainer, StyledButtonText, StyledButtonIconWrapper, StyledButtonIcon, };
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { ButtonProps } from './types';
3
- export declare const Button: ({ disabled, icon, color, textColor, loading, onClick, rightIcon, corner, variant, style, "data-testid": testId, text, ...rest }: ButtonProps) => React.ReactElement;
3
+ export declare const Button: ({ disabled, icon, color, textColor, loading, onClick, rightIcon, corner, variant, size, style, "data-testid": testId, text, ...rest }: ButtonProps) => React.ReactElement;
4
4
  export * from './utils';
@@ -42,6 +42,11 @@ export interface ButtonProps {
42
42
  * @default 'solid'
43
43
  */
44
44
  variant?: 'solid' | 'outlined' | 'text';
45
+ /**
46
+ * Button size.
47
+ * @default 'md'
48
+ */
49
+ size?: 'sm' | 'md' | 'lg';
45
50
  /**
46
51
  * Additional style.
47
52
  */
@@ -3,9 +3,10 @@ import { HeaderProps } from './types';
3
3
  interface HeaderAuthProps {
4
4
  isSignedIn?: boolean;
5
5
  userProfile?: HeaderProps['userProfile'];
6
+ dropdownItems?: HeaderProps['profileDropdownItems'];
7
+ onProfileClick?: () => void;
6
8
  onSignInClick?: () => void;
7
9
  onRegisterClick?: () => void;
8
- onProfileClick?: () => void;
9
10
  }
10
11
  export declare const HeaderAuth: React.FC<HeaderAuthProps>;
11
12
  export {};
@@ -1,3 +1,4 @@
1
- import { default as React } from 'react';
2
1
  import { NavItemProps } from './types';
3
- export declare const NavItem: React.FC<NavItemProps>;
2
+ export declare const NavItem: ({ label, isActive, onClick, size, }: NavItemProps & {
3
+ size?: "large" | "medium";
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -33,6 +33,7 @@ export interface HeaderProps extends BoxProps {
33
33
  userProfile?: {
34
34
  name?: string;
35
35
  avatar?: string;
36
+ email?: string;
36
37
  };
37
38
  /**
38
39
  * Called when the logo is clicked
@@ -54,4 +55,8 @@ export interface HeaderProps extends BoxProps {
54
55
  * Called when the profile button is clicked
55
56
  */
56
57
  onProfileClick?: () => void;
58
+ /**
59
+ * Profile dropdown items
60
+ */
61
+ profileDropdownItems?: NavItemProps[];
57
62
  }
@@ -8,5 +8,7 @@ interface StyledTextProps {
8
8
  $textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
9
9
  $textDecoration?: 'none' | 'underline' | 'line-through' | 'underline line-through';
10
10
  }
11
- declare const StyledText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, StyledTextProps>> & string;
11
+ declare const StyledText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>, {
12
+ as?: "p" | "span";
13
+ }>, StyledTextProps>> & string;
12
14
  export { StyledText };
@@ -42,6 +42,10 @@ export interface TextProps extends HTMLAttributes<HTMLParagraphElement> {
42
42
  * Whether to render the text with rich text formatting.
43
43
  */
44
44
  useRichText?: boolean;
45
+ /**
46
+ * The tag to render the text in.
47
+ */
48
+ as?: 'p' | 'span';
45
49
  }
46
50
  export interface TagStyle {
47
51
  pattern: RegExp;
@@ -0,0 +1 @@
1
+ export * from './useMediaQuery';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * React hook that tracks state of a CSS media query.
3
+ *
4
+ * @param query - The media query string to watch (e.g., '(min-width: 768px)').
5
+ * @returns `true` if the media query matches, `false` otherwise.
6
+ */
7
+ export declare function useMediaQuery(query: string): boolean;