aot-ui 0.2.5 → 0.2.6
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/README.md +54 -53
- package/dist-lib/aot-ui.css +1 -1
- package/dist-lib/aot-ui.js +1845 -1736
- package/dist-lib/modules/bottom-nav/components/BottomNav.d.ts +1 -1
- package/dist-lib/modules/bottom-nav/types.d.ts +11 -2
- package/dist-lib/modules/empty/components/Empty.d.ts +1 -1
- package/dist-lib/modules/empty/types.d.ts +4 -0
- package/dist-lib/modules/feed-skeleton/components/FeedSkeletonList.d.ts +1 -1
- package/dist-lib/modules/feed-skeleton/index.d.ts +1 -1
- package/dist-lib/modules/feed-skeleton/types.d.ts +16 -3
- package/dist-lib/modules/load-retry/components/LoadRetry.d.ts +1 -1
- package/dist-lib/modules/load-retry/index.d.ts +1 -1
- package/dist-lib/modules/load-retry/types.d.ts +18 -2
- package/dist-lib/modules/offline-banner/components/OfflineBanner.d.ts +1 -1
- package/dist-lib/modules/offline-banner/index.d.ts +1 -1
- package/dist-lib/modules/offline-banner/types.d.ts +13 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BottomNavProps } from '../types';
|
|
2
|
-
export declare function BottomNav({ items, index: indexProp, defaultIndex, onChange, className, "aria-label": ariaLabel, }: BottomNavProps): import('react').JSX.Element;
|
|
2
|
+
export declare function BottomNav({ items, index: indexProp, defaultIndex, onChange, className, "aria-label": ariaLabel, barOnly, }: BottomNavProps): import('react').JSX.Element;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type BottomNavItem = {
|
|
3
3
|
key: string;
|
|
4
|
-
label:
|
|
4
|
+
label: ReactNode;
|
|
5
5
|
icon: ReactNode;
|
|
6
|
-
|
|
6
|
+
/** Optional page panel; omit when using `barOnly` with an external router. */
|
|
7
|
+
content?: ReactNode;
|
|
8
|
+
/** Optional badge count on the tab */
|
|
9
|
+
badge?: number;
|
|
10
|
+
disabled?: boolean;
|
|
7
11
|
};
|
|
8
12
|
export type CapsuleBox = {
|
|
9
13
|
left: number;
|
|
@@ -20,4 +24,9 @@ export type BottomNavProps = {
|
|
|
20
24
|
onChange?: (index: number) => void;
|
|
21
25
|
className?: string;
|
|
22
26
|
"aria-label"?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Only render the tab bar (for app shells with external `Outlet`).
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
barOnly?: boolean;
|
|
23
32
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EmptyProps } from '../types';
|
|
2
|
-
export declare function Empty({ description, image, children, className, }: EmptyProps): import('react').JSX.Element;
|
|
2
|
+
export declare function Empty({ title, description, image, showImage, children, className, }: EmptyProps): import('react').JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type EmptyProps = {
|
|
3
|
+
/** Optional heading above description */
|
|
4
|
+
title?: ReactNode;
|
|
3
5
|
description?: ReactNode;
|
|
4
6
|
image?: ReactNode;
|
|
7
|
+
/** Hide default illustration when false @default true when image omitted */
|
|
8
|
+
showImage?: boolean;
|
|
5
9
|
children?: ReactNode;
|
|
6
10
|
className?: string;
|
|
7
11
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FeedSkeletonListProps } from '../types';
|
|
2
|
-
export declare function FeedSkeletonList({ items, loaded, className, children, }: FeedSkeletonListProps): import('react').JSX.Element;
|
|
2
|
+
export declare function FeedSkeletonList({ items, loaded, className, children, layout, count, }: FeedSkeletonListProps): import('react').JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { FeedSkeletonList } from './components/FeedSkeletonList';
|
|
2
2
|
export { FeedCard } from './components/FeedCard';
|
|
3
3
|
export { FEED_ITEMS } from './data';
|
|
4
|
-
export type { FeedItem, FeedSkeletonListProps } from './types';
|
|
4
|
+
export type { FeedItem, FeedSkeletonLayout, FeedSkeletonListProps, } from './types';
|
|
@@ -8,13 +8,26 @@ export type FeedItem = {
|
|
|
8
8
|
image: string;
|
|
9
9
|
imageAlt?: string;
|
|
10
10
|
};
|
|
11
|
+
export type FeedSkeletonLayout = "feed" | "grid";
|
|
11
12
|
export type FeedSkeletonListProps = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Feed cards to reveal when `loaded`.
|
|
15
|
+
* Optional when `layout="grid"` (placeholder bones only).
|
|
16
|
+
*/
|
|
17
|
+
items?: FeedItem[];
|
|
18
|
+
/** false = show skeleton; true = reveal content. @default false */
|
|
19
|
+
loaded?: boolean;
|
|
15
20
|
className?: string;
|
|
16
21
|
/** Optional empty / footer slot. */
|
|
17
22
|
children?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* `feed`:原社交信息流骨架。
|
|
25
|
+
* `grid`:目录卡片网格占位(业务软件/插件列表)。
|
|
26
|
+
* @default "feed"
|
|
27
|
+
*/
|
|
28
|
+
layout?: FeedSkeletonLayout;
|
|
29
|
+
/** grid 占位数量 @default 6 */
|
|
30
|
+
count?: number;
|
|
18
31
|
};
|
|
19
32
|
export type FeedCardProps = {
|
|
20
33
|
item: FeedItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LoadRetryProps } from '../types';
|
|
2
|
-
export declare function LoadRetry({ className, items: itemsProp, retryMs, onRetry, onLoaded, }: LoadRetryProps): import('react').JSX.Element;
|
|
2
|
+
export declare function LoadRetry({ className, items: itemsProp, retryMs, onRetry, onLoaded, status: statusProp, title, description, retryText, skeletonCount, children, }: LoadRetryProps): import('react').JSX.Element | null;
|
|
@@ -1,15 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export type LoadRetryItem = {
|
|
2
3
|
id: string;
|
|
3
4
|
title: string;
|
|
4
5
|
meta: string;
|
|
5
6
|
tag: string;
|
|
6
7
|
};
|
|
8
|
+
export type LoadPhase = "error" | "loading" | "ready";
|
|
7
9
|
export type LoadRetryProps = {
|
|
8
10
|
className?: string;
|
|
9
11
|
items?: LoadRetryItem[];
|
|
10
|
-
/**
|
|
12
|
+
/** Demo mode: retry resolves after this ms. Ignored when `status` is controlled. */
|
|
11
13
|
retryMs?: number;
|
|
12
14
|
onRetry?: () => void;
|
|
13
15
|
onLoaded?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Controlled phase for app shells.
|
|
18
|
+
* Omit to keep gallery demo (fail → retry → reveal).
|
|
19
|
+
*/
|
|
20
|
+
status?: LoadPhase;
|
|
21
|
+
/** error / loading title (controlled mode) */
|
|
22
|
+
title?: ReactNode;
|
|
23
|
+
/** error / loading subtitle (controlled mode) */
|
|
24
|
+
description?: ReactNode;
|
|
25
|
+
/** retry button label */
|
|
26
|
+
retryText?: ReactNode;
|
|
27
|
+
/** skeleton rows when status="loading" */
|
|
28
|
+
skeletonCount?: number;
|
|
29
|
+
/** rendered when status="ready" */
|
|
30
|
+
children?: ReactNode;
|
|
14
31
|
};
|
|
15
|
-
export type LoadPhase = "error" | "loading" | "ready";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { OfflineBannerProps } from '../types';
|
|
2
|
-
export declare function OfflineBanner({ className, offline: offlineProp, onOfflineChange, }: OfflineBannerProps): import('react').JSX.Element;
|
|
2
|
+
export declare function OfflineBanner({ className, variant, offline: offlineProp, onOfflineChange, offlineText, restoredText, }: OfflineBannerProps): import('react').JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { OfflineBanner } from './components/OfflineBanner';
|
|
2
|
-
export type { OfflineBannerProps } from './types';
|
|
2
|
+
export type { BannerPhase, OfflineBannerProps, OfflineBannerVariant, } from './types';
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type OfflineBannerVariant = "demo" | "strip";
|
|
1
3
|
export type OfflineBannerProps = {
|
|
2
4
|
className?: string;
|
|
3
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* `demo`:画廊完整演示(模拟开关 + 动态列表)。
|
|
7
|
+
* `strip`:仅状态条,供业务壳使用。
|
|
8
|
+
* @default "demo"
|
|
9
|
+
*/
|
|
10
|
+
variant?: OfflineBannerVariant;
|
|
11
|
+
/** Controlled offline switch; omit for internal toggle (demo). */
|
|
4
12
|
offline?: boolean;
|
|
5
13
|
onOfflineChange?: (offline: boolean) => void;
|
|
14
|
+
/** strip 离线文案 */
|
|
15
|
+
offlineText?: ReactNode;
|
|
16
|
+
/** strip 恢复文案 */
|
|
17
|
+
restoredText?: ReactNode;
|
|
6
18
|
};
|
|
7
19
|
export type BannerPhase = "hidden" | "offline" | "restored" | "leaving";
|