chesai-ui 0.9.0 → 0.9.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.
@@ -43,20 +43,11 @@ export interface AppBarProps extends Omit<React.HTMLAttributes<HTMLElement>, "ti
43
43
  routeKey?: string;
44
44
  topRowContent?: React.ReactNode;
45
45
  expandedContent?: React.ReactNode;
46
- /** Controls if the expandedContent should use the default fade/slide exit animation, or "none" for manual morphing */
47
46
  expandedAnimation?: "default" | "none";
48
- /**
49
- * If false, the expanded variants (medium, large) will not collapse to the small size on scroll.
50
- * @default true
51
- */
52
47
  collapsible?: boolean;
53
- /** Override the default collapsed height (default is 64px). */
54
48
  collapsedHeight?: number;
55
- /** Override the expanded area height (skips MD3 presets and automatic measurements). */
56
49
  expandedHeight?: number;
57
- /** Scroll distance in pixels required to trigger the scrolled color and shadow effects. (default 5px) */
58
50
  effectScrollThreshold?: number;
59
- /** Scroll distance in pixels required to fully collapse the App Bar. Defaults to the measured expanded area height. */
60
51
  collapseScrollDistance?: number;
61
52
  }
62
53
  export declare const AppBar: React.ForwardRefExoticComponent<AppBarProps & React.RefAttributes<HTMLElement>>;
@@ -6,7 +6,7 @@ export interface BreadcrumbItemType {
6
6
  icon?: React.ReactNode;
7
7
  isCurrent?: boolean;
8
8
  }
9
- interface BreadcrumbContextType {
9
+ export interface BreadcrumbContextType {
10
10
  items: BreadcrumbItemType[];
11
11
  setItems: (items: BreadcrumbItemType[]) => void;
12
12
  addItem: (item: Omit<BreadcrumbItemType, "id">) => void;
@@ -19,4 +19,3 @@ export declare const BreadcrumbProvider: ({ children, defaultItems, }: {
19
19
  children: React.ReactNode;
20
20
  defaultItems?: BreadcrumbItemType[];
21
21
  }) => import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -0,0 +1,52 @@
1
+ import { default as React } from 'react';
2
+ declare const BreadcrumbRoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
3
+ separator?: React.ReactNode;
4
+ } & React.RefAttributes<HTMLElement>>;
5
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<Omit<import('framer-motion').HTMLMotionProps<"ol">, "ref"> & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<Omit<import('framer-motion').HTMLMotionProps<"li">, "ref"> & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
7
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & {
8
+ asChild?: boolean;
9
+ } & React.RefAttributes<HTMLAnchorElement>>;
10
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
11
+ declare const BreadcrumbSeparator: {
12
+ ({ children, className, ...props }: React.HTMLAttributes<HTMLLIElement>): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const BreadcrumbEllipsis: {
16
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ export interface DynamicBreadcrumbProps {
20
+ separator?: React.ReactNode;
21
+ /** Maximum number of items to display before collapsing into an ellipsis */
22
+ maxItems?: number;
23
+ /** Number of items to show before the ellipsis (Default: 1) */
24
+ itemsBeforeCollapse?: number;
25
+ /** Number of items to show after the ellipsis (Default: 2) */
26
+ itemsAfterCollapse?: number;
27
+ }
28
+ export declare const Breadcrumb: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
29
+ separator?: React.ReactNode;
30
+ } & React.RefAttributes<HTMLElement>> & {
31
+ Provider: ({ children, defaultItems, }: {
32
+ children: React.ReactNode;
33
+ defaultItems?: import('./breadcrumb-context').BreadcrumbItemType[];
34
+ }) => import("react/jsx-runtime").JSX.Element;
35
+ Dynamic: ({ separator, maxItems, itemsBeforeCollapse, itemsAfterCollapse, }: DynamicBreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
36
+ List: React.ForwardRefExoticComponent<Omit<Omit<import('framer-motion').HTMLMotionProps<"ol">, "ref"> & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
37
+ Item: React.ForwardRefExoticComponent<Omit<Omit<import('framer-motion').HTMLMotionProps<"li">, "ref"> & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
38
+ Link: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & {
39
+ asChild?: boolean;
40
+ } & React.RefAttributes<HTMLAnchorElement>>;
41
+ Page: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
42
+ Separator: {
43
+ ({ children, className, ...props }: React.HTMLAttributes<HTMLLIElement>): import("react/jsx-runtime").JSX.Element;
44
+ displayName: string;
45
+ };
46
+ Ellipsis: {
47
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
48
+ displayName: string;
49
+ };
50
+ useBreadcrumbs: () => import('./breadcrumb-context').BreadcrumbContextType;
51
+ };
52
+ export { BreadcrumbRoot, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -3,9 +3,10 @@ export interface ChartProps {
3
3
  categories: string[];
4
4
  index: string;
5
5
  variant?: "primary" | "secondary" | "ghost";
6
+ shape?: "full" | "minimal" | "sharp";
6
7
  colors?: string[];
7
8
  height?: number | string;
8
9
  className?: string;
9
10
  valueFormatter?: (value: number) => string;
10
11
  }
11
- export declare const AreaChart: ({ data, categories, index, variant, colors, height, className, valueFormatter, }: ChartProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const AreaChart: ({ data, categories, index, variant, shape, colors, height, className, valueFormatter, }: ChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ChartProps } from './area-chart';
2
- export declare const BarChart: ({ data, categories, index, variant, colors, height, className, valueFormatter, }: ChartProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const BarChart: ({ data, categories, index, variant, shape, colors, height, className, valueFormatter, }: ChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,10 +3,11 @@ interface PieChartProps {
3
3
  category: string;
4
4
  index: string;
5
5
  variant?: "primary" | "secondary" | "ghost";
6
+ shape?: "full" | "minimal" | "sharp";
6
7
  colors?: string[];
7
8
  height?: number | string;
8
9
  className?: string;
9
10
  donut?: boolean;
10
11
  }
11
- export declare const PieChart: ({ data, category, index, variant, colors, height, className, donut, }: PieChartProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const PieChart: ({ data, category, index, variant, shape, colors, height, className, donut, }: PieChartProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -4,9 +4,7 @@ export type DatePickerInputVariant = "filled" | "filled-inverted" | "outlined" |
4
4
  export interface DatePickerProps {
5
5
  value?: Date;
6
6
  onChange?: (date: Date | undefined) => void;
7
- /** Controls the display mode of the picker (popover vs dialog) */
8
7
  variant?: DatePickerVariant;
9
- /** Controls the visual style of the input trigger */
10
8
  inputVariant?: DatePickerInputVariant;
11
9
  label?: string;
12
10
  placeholder?: string;
@@ -85,4 +85,5 @@ export * from './toolbar';
85
85
  export * from './tooltip';
86
86
  export * from './typography';
87
87
  export * from './video-player';
88
+ export * from './virtual-list';
88
89
  export * from './window-controls';
@@ -1,6 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
- export * from './virtual-item-list';
4
3
  declare const itemVariants: (props?: ({
5
4
  variant?: "primary" | "secondary" | "tertiary" | "ghost" | "high-contrast" | "surface" | "surface-container-lowest" | "surface-container-low" | "surface-container" | "surface-container-high" | "surface-container-highest" | null | undefined;
6
5
  bordered?: boolean | null | undefined;
@@ -10,7 +9,15 @@ declare const itemVariants: (props?: ({
10
9
  shape?: "full" | "minimal" | "sharp" | null | undefined;
11
10
  direction?: "horizontal" | "vertical" | null | undefined;
12
11
  } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
13
- declare const ItemGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
12
+ export type ItemGroupShape = "full" | "minimal" | "sharp";
13
+ export type ItemGroupDirection = "horizontal" | "vertical";
14
+ export type ItemGroupGap = "none" | "xs" | "sm" | "md" | "lg";
15
+ export interface ItemGroupProps extends React.HTMLAttributes<HTMLDivElement> {
16
+ shape?: ItemGroupShape;
17
+ direction?: ItemGroupDirection;
18
+ gap?: ItemGroupGap;
19
+ }
20
+ declare const ItemGroup: React.ForwardRefExoticComponent<ItemGroupProps & React.RefAttributes<HTMLDivElement>>;
14
21
  declare const ItemSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
22
  export interface ItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof itemVariants> {
16
23
  asChild?: boolean;
@@ -26,6 +26,8 @@ interface NavigatorProps extends React.HTMLAttributes<HTMLElement> {
26
26
  forceExpanded?: boolean;
27
27
  /** Allow the rail to expand on hover (Desktop only). Defaults to false. */
28
28
  expandOnHover?: boolean;
29
+ /** Forces the rail to act as an overlay (drawer) on desktop viewports. */
30
+ overlay?: boolean;
29
31
  }
30
32
  export declare const NavigationRail: {
31
33
  Navigator: React.FC<NavigatorProps>;
@@ -9,15 +9,7 @@ interface StackNavigatorProps<T extends Record<string, object | undefined>> {
9
9
  route: RouteProp<T, keyof T>;
10
10
  navigation: NavigationProp<T>;
11
11
  }) => StackScreenOptions);
12
- /**
13
- * 'memory': Routes are stored in memory/history state. The URL bar does not change path (default).
14
- * 'path': Routes update the browser URL path.
15
- */
16
12
  mode?: "memory" | "path";
17
- /**
18
- * The base URL path for 'path' mode.
19
- * e.g., "/app" if your router is mounted at mydomain.com/app
20
- */
21
13
  basePath?: string;
22
14
  }
23
15
  export declare function createStackNavigator<T extends Record<string, object | undefined>>(): {
@@ -1,5 +1,4 @@
1
1
  import { Transition, Variants } from 'framer-motion';
2
- import { ForwardedRef } from 'react';
3
2
  import { AppBarColor, AppBarProps } from '../appbar';
4
3
  export interface StackScreenOptions {
5
4
  title?: string;
@@ -11,6 +10,15 @@ export interface StackScreenOptions {
11
10
  headerRight?: (props: {
12
11
  canGoBack: boolean;
13
12
  }) => React.ReactNode;
13
+ headerBottom?: (props: {
14
+ canGoBack: boolean;
15
+ }) => React.ReactNode;
16
+ headerTopRow?: (props: {
17
+ canGoBack: boolean;
18
+ }) => React.ReactNode;
19
+ headerExpanded?: (props: {
20
+ canGoBack: boolean;
21
+ }) => React.ReactNode;
14
22
  headerStyle?: {
15
23
  backgroundColor?: AppBarColor | 'card' | 'background';
16
24
  };
@@ -59,7 +67,7 @@ export interface NavigationProp<T extends Record<string, object | undefined>> {
59
67
  canGoBack: () => boolean;
60
68
  addListener: (event: NavigationEvent, callback: NavigationEventCallback) => () => void;
61
69
  removeListener: (event: NavigationEvent, callback: NavigationEventCallback) => void;
62
- scrollContainerRef: ForwardedRef<any | null>;
70
+ scrollContainerRef: React.RefCallback<HTMLElement | null> | React.MutableRefObject<HTMLElement | null>;
63
71
  }
64
72
  export interface StackAnimation {
65
73
  transition?: Transition;
@@ -0,0 +1,48 @@
1
+ import { VirtualizerOptions, Virtualizer } from '@tanstack/react-virtual';
2
+ import { default as React } from 'react';
3
+ export interface VirtualListProps<T> {
4
+ /** The data to render */
5
+ data: T[];
6
+ /** The render function for each item */
7
+ renderItem: (item: T, index: number) => React.ReactNode;
8
+ /** Scroll direction of the virtual list. @default "vertical" */
9
+ direction?: "vertical" | "horizontal";
10
+ /**
11
+ * The component used as the outer scrollable container viewport.
12
+ * Useful for passing ElasticScrollArea or customizing tags.
13
+ * @default "div"
14
+ */
15
+ as?: React.ElementType;
16
+ /**
17
+ * The component used as the sizer (defines total scroll width/height).
18
+ * @default "div"
19
+ */
20
+ contentAs?: React.ElementType;
21
+ /**
22
+ * An optional wrapper component directly around the array of absolute items.
23
+ * Extremely useful if you need to wrap the items in a <ul/>, <ol/>, or an <AnimatePresence/>.
24
+ */
25
+ itemsWrapper?: React.ElementType | React.FC<any>;
26
+ /** Spacing between items in pixels. @default 8 */
27
+ gap?: number;
28
+ /** Initial estimated size of items. @default 72 */
29
+ estimateSize?: number;
30
+ /** Items to render outside the visible viewport. @default 5 */
31
+ overscan?: number;
32
+ /** Props passed to the outer scrollable container */
33
+ containerProps?: any;
34
+ /** Props passed to the inner sizer div */
35
+ contentProps?: React.HTMLAttributes<HTMLDivElement> & Record<string, any>;
36
+ /**
37
+ * Access to the raw TanStack Virtual options for advanced logic
38
+ * (e.g., initialOffset, scrollMargin, etc.)
39
+ */
40
+ virtualOptions?: Partial<VirtualizerOptions<any, any>>;
41
+ /** Ref to access the virtualizer instance from parent (for scroll controls) */
42
+ virtualizerRef?: React.Ref<Virtualizer<any, any>>;
43
+ }
44
+ declare function VirtualListInner<T>({ data, renderItem, direction, as: Component, contentAs: ContentComponent, itemsWrapper: ItemsWrapper, gap, estimateSize, overscan, containerProps, contentProps, virtualOptions, virtualizerRef, }: VirtualListProps<T>, ref: React.ForwardedRef<HTMLElement>): import("react/jsx-runtime").JSX.Element;
45
+ export declare const VirtualList: <T>(props: VirtualListProps<T> & {
46
+ ref?: React.ForwardedRef<HTMLElement>;
47
+ }) => ReturnType<typeof VirtualListInner>;
48
+ export {};