@aic-kits/react 0.10.4 → 0.12.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.
@@ -465,7 +465,7 @@ declare const config: {
465
465
  readonly scale: "colors";
466
466
  };
467
467
  };
468
- export declare const cssPropsKey: readonly ["alignContent", "alignItems", "alignSelf", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "justifyContent", "position", "top", "right", "bottom", "left", "overflow", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "opacity", "cursor", "transition", "transform", "animation", "willChange", "pointerEvents", "userSelect", "resize", "boxShadow", "textShadow", "filter", "backdropFilter", "mixBlendMode", "isolation", "zIndex", "marginInline", "marginBlock", "paddingInline", "paddingBlock"];
468
+ export declare const cssPropsKey: readonly ["alignContent", "alignItems", "alignSelf", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "justifyContent", "position", "top", "right", "bottom", "left", "overflow", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "opacity", "cursor", "transition", "transform", "animation", "willChange", "pointerEvents", "userSelect", "resize", "boxShadow", "textShadow", "filter", "backdropFilter", "mixBlendMode", "isolation", "zIndex", "marginInline", "marginBlock", "paddingInline", "paddingBlock", "willChange"];
469
469
  export declare const customBoxPropsKey: readonly ["absoluteFill", "fullWidth", "fullHeight", "fw", "fh"];
470
470
  export type ColorPropsKeyType = keyof typeof colors;
471
471
  export type SpacePropsKeyType = keyof typeof spaces;
@@ -1,10 +1,13 @@
1
1
  import { default as React } from 'react';
2
+ import { Size } from '../../theme';
2
3
  import { CarouselRenderItemInfo } from './types';
3
4
  interface CarouselItemProps<T> {
4
5
  item: T;
5
6
  index: number;
6
7
  isFocused: boolean;
7
8
  renderItem: (info: CarouselRenderItemInfo<T>) => React.ReactNode;
9
+ itemsPerView: number;
10
+ itemWidth?: Size | string | number;
8
11
  }
9
- export declare function CarouselItem<T>({ item, index, isFocused, renderItem, }: CarouselItemProps<T>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function CarouselItem<T>({ item, index, isFocused, renderItem, itemsPerView, itemWidth, }: CarouselItemProps<T>): import("react/jsx-runtime").JSX.Element;
10
13
  export {};
@@ -1,10 +1,11 @@
1
1
  import { Space } from '../../theme';
2
2
  import { CarouselProps } from './types';
3
3
  export declare const scrollAnimation: import('styled-components/dist/models/Keyframes').default;
4
- interface CarouselItemsProps<T> extends Pick<CarouselProps<T>, 'autoScroll' | 'itemSpacing' | 'items' | 'renderItem' | 'keyExtractor'> {
4
+ interface CarouselItemsProps<T> extends Pick<CarouselProps<T>, 'autoScroll' | 'itemSpacing' | 'items' | 'renderItem' | 'keyExtractor' | 'itemsPerView'> {
5
5
  itemSpacing: Space | undefined;
6
+ itemWidth: number | undefined;
6
7
  itemsWrapperRef: React.RefObject<HTMLDivElement | null>;
7
8
  activeIndex: number;
8
9
  }
9
- export declare function CarouselItems<T>({ itemSpacing, itemsWrapperRef, items, renderItem, keyExtractor, autoScroll, activeIndex, }: CarouselItemsProps<T>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function CarouselItems<T>({ itemSpacing, itemsWrapperRef, items, renderItem, keyExtractor, autoScroll, activeIndex, itemsPerView, itemWidth, }: CarouselItemsProps<T>): import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -1,2 +1,2 @@
1
1
  import { CarouselProps } from './types';
2
- export declare function Carousel<T>({ items, renderItem, showPagination, showNavigation, autoPlay, autoScroll, initialIndex, onIndexChange, keyExtractor, itemSpacing, ...rest }: CarouselProps<T>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Carousel<T>({ items, renderItem, showPagination, showNavigation, autoPlay, autoScroll, initialIndex, onIndexChange, keyExtractor, itemSpacing, itemsPerView, itemWidth, ...rest }: CarouselProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { Space } from '../../theme';
2
+ import { Size, Space } from '../../theme';
3
3
  import { BoxProps } from '../Box';
4
4
  export interface CarouselRenderItemInfo<T> {
5
5
  item: T;
@@ -59,4 +59,16 @@ export interface CarouselProps<T = any> extends BoxProps {
59
59
  * Optional item spacing.
60
60
  */
61
61
  itemSpacing?: Space;
62
+ /**
63
+ * Number of items to display per view.
64
+ * Has no effect when `autoScroll` is enabled.
65
+ * @default 1
66
+ */
67
+ itemsPerView?: number;
68
+ /**
69
+ * Fixed width in pixels (e.g. '100px') or Size for each carousel item.
70
+ * If not provided, items will stretch to fill the container width divided by `itemsPerView`.
71
+ * Has no effect when `autoScroll` is enabled.
72
+ */
73
+ itemWidth?: Size | string | number;
62
74
  }
@@ -0,0 +1,2 @@
1
+ import { Size, Theme } from '../../theme';
2
+ export declare const getItemWidthNumericValue: (theme: Theme, itemWidth: Size | string | number | undefined) => number | undefined;
@@ -0,0 +1,29 @@
1
+ import { Color, FontSize, Radius, Size, Space, TagSize, TagVariant, Theme } from '../../theme';
2
+ export declare const getTagTextColor: (theme: Theme, color: Color, textColor?: Color, variant?: TagVariant) => string;
3
+ export interface StyledTagProps {
4
+ $variant: TagVariant;
5
+ $color: Color;
6
+ $textColor?: Color;
7
+ $size: TagSize;
8
+ $radius: Radius | string;
9
+ $paddingVertical: Space;
10
+ $paddingHorizontal: Space;
11
+ $fontSize: FontSize;
12
+ $gap: Space;
13
+ $iconSize: Size;
14
+ }
15
+ export declare const StyledTagContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').BoxProps & {
16
+ ref?: import('react').ForwardedRef<HTMLDivElement>;
17
+ }, StyledTagProps>> & string & Omit<(props: import('..').BoxProps & {
18
+ ref?: import('react').ForwardedRef<HTMLDivElement>;
19
+ }) => 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>>;
20
+ export declare const StyledTagText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('..').TextProps & {
21
+ useRichText?: boolean;
22
+ }, {
23
+ $color: Color;
24
+ $textColor?: Color;
25
+ $variant: TagVariant;
26
+ $fontSize: FontSize;
27
+ }>> & string & Omit<(props: import('..').TextProps & {
28
+ useRichText?: boolean;
29
+ }) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { TagProps } from './types';
3
+ export declare const Tag: React.FC<TagProps>;
@@ -0,0 +1,55 @@
1
+ import { Icon } from '@phosphor-icons/react';
2
+ import { Color, Radius, TagSize, TagVariant } from '../../theme';
3
+ import { BoxProps } from '../Box';
4
+ export interface TagProps extends BoxProps {
5
+ /**
6
+ * The variant style of the tag.
7
+ * 'solid': Filled background.
8
+ * 'outlined': Transparent background with border.
9
+ * @default 'solid'
10
+ */
11
+ variant?: TagVariant;
12
+ /**
13
+ * The base color scheme of the tag. Affects background/border and potentially text color.
14
+ * @default 'primary'
15
+ */
16
+ color?: Color;
17
+ /**
18
+ * The explicit color for the tag text. Overrides default logic based on variant/color.
19
+ */
20
+ textColor?: Color;
21
+ /**
22
+ * The size of the tag, affecting padding and font size.
23
+ * @default 'md'
24
+ */
25
+ size?: TagSize;
26
+ /**
27
+ * The border radius of the tag. Can use theme keys or specific pixel values.
28
+ * @default 'full'
29
+ */
30
+ radius?: Radius;
31
+ /**
32
+ * Icon to display before the main children.
33
+ */
34
+ icon?: Icon;
35
+ /**
36
+ * Icon to display after the main children.
37
+ */
38
+ rightIcon?: Icon;
39
+ /**
40
+ * Optional content to display before the main children, like an icon.
41
+ */
42
+ leftElement?: React.ReactNode;
43
+ /**
44
+ * Optional content to display after the main children, like a close button.
45
+ */
46
+ rightElement?: React.ReactNode;
47
+ /**
48
+ * The main content of the tag.
49
+ */
50
+ children: React.ReactNode;
51
+ /**
52
+ * Testing ID
53
+ */
54
+ 'data-testid'?: string;
55
+ }
@@ -13,3 +13,4 @@ export * from './Touchable';
13
13
  export * from './Vimeo';
14
14
  export * from './Carousel';
15
15
  export * from './Accordion';
16
+ export * from './Tag';