@aic-kits/react 0.11.0 → 0.12.1
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/dist/components/Box/config.d.ts +1 -1
- package/dist/components/Carousel/CarouselItem.d.ts +4 -1
- package/dist/components/Carousel/CarouselItems.d.ts +3 -2
- package/dist/components/Carousel/index.d.ts +1 -1
- package/dist/components/Carousel/types.d.ts +13 -1
- package/dist/components/Carousel/utils.d.ts +2 -0
- package/dist/components/Header/HeaderAuth.d.ts +2 -2
- package/dist/components/Header/ProfileDropdown.d.ts +15 -0
- package/dist/components/Header/types.d.ts +5 -1
- package/dist/index.cjs +64 -64
- package/dist/index.js +2995 -2876
- package/dist/theme/components/header.d.ts +18 -1
- package/package.json +2 -2
|
@@ -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
|
}
|
|
@@ -2,8 +2,8 @@ import { default as React, Dispatch, SetStateAction } from 'react';
|
|
|
2
2
|
import { HeaderProps } from './types';
|
|
3
3
|
interface HeaderAuthProps {
|
|
4
4
|
isSignedIn?: boolean;
|
|
5
|
-
isDropdownVisible
|
|
6
|
-
setIsDropdownVisible
|
|
5
|
+
isDropdownVisible: boolean;
|
|
6
|
+
setIsDropdownVisible: Dispatch<SetStateAction<boolean>>;
|
|
7
7
|
userProfile?: HeaderProps['userProfile'];
|
|
8
8
|
dropdownItems?: HeaderProps['profileDropdownItems'];
|
|
9
9
|
onProfileClick?: () => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ForwardedRef, ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { HeaderProps } from './types';
|
|
3
|
+
interface ProfileDropdownProps {
|
|
4
|
+
userProfile: HeaderProps['userProfile'];
|
|
5
|
+
dropdownItems: HeaderProps['profileDropdownItems'];
|
|
6
|
+
maxHeight?: HeaderProps['maxHeight'];
|
|
7
|
+
}
|
|
8
|
+
export interface ProfileDropdownHandle {
|
|
9
|
+
showDropdown: (callback?: () => void) => void;
|
|
10
|
+
hideDropdown: (callback?: () => void) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const ProfileDropdown: ForwardRefExoticComponent<ProfileDropdownProps & {
|
|
13
|
+
ref?: ForwardedRef<ProfileDropdownHandle>;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color } from '../../theme';
|
|
1
|
+
import { Color, Size } from '../../theme';
|
|
2
2
|
import { BoxProps } from '../Box';
|
|
3
3
|
export interface NavItemProps {
|
|
4
4
|
/**
|
|
@@ -59,6 +59,10 @@ export interface HeaderProps extends BoxProps {
|
|
|
59
59
|
* Profile dropdown items
|
|
60
60
|
*/
|
|
61
61
|
profileDropdownItems?: NavItemProps[];
|
|
62
|
+
/**
|
|
63
|
+
* Maximum height of the header
|
|
64
|
+
*/
|
|
65
|
+
maxHeight?: number | Size;
|
|
62
66
|
}
|
|
63
67
|
export interface HeaderHandle {
|
|
64
68
|
/**
|