@llmnative/react 0.1.1 → 1.0.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.
- package/README.md +387 -364
- package/bin/cli.js +117 -98
- package/dist/index.css +1 -1
- package/dist/index.js +21 -823
- package/dist/index.mjs +14246 -9296
- package/dist/style.css +1 -0
- package/dist/types/src/App.d.ts +72 -14
- package/dist/types/src/Config.d.ts +28 -5
- package/dist/types/src/Global.d.ts +2 -2
- package/dist/types/src/I18n.d.ts +185 -0
- package/dist/types/src/Theme.d.ts +153 -81
- package/dist/types/src/auth.d.ts +13 -1
- package/dist/types/src/components/Component.d.ts +13 -27
- package/dist/types/src/components/ErrorBoundary.d.ts +30 -0
- package/dist/types/src/components/blocks/Brand.d.ts +4 -4
- package/dist/types/src/components/blocks/Breadcrumbs.d.ts +50 -4
- package/dist/types/src/components/blocks/Carousel.d.ts +5 -5
- package/dist/types/src/components/blocks/Dropdown.d.ts +26 -20
- package/dist/types/src/components/blocks/ListCard.d.ts +31 -0
- package/dist/types/src/components/blocks/Menu.d.ts +13 -16
- package/dist/types/src/components/blocks/Notifications.d.ts +8 -3
- package/dist/types/src/components/blocks/ProviderSwitcher.d.ts +63 -0
- package/dist/types/src/components/blocks/Search.d.ts +2 -2
- package/dist/types/src/components/blocks/SideNav.d.ts +45 -0
- package/dist/types/src/components/blocks/ThemeSwitcher.d.ts +24 -0
- package/dist/types/src/components/blocks/Toolbar.d.ts +19 -0
- package/dist/types/src/components/index.d.ts +27 -6
- package/dist/types/src/components/types.d.ts +10 -3
- package/dist/types/src/components/ui/Alert.d.ts +16 -4
- package/dist/types/src/components/ui/Badge.d.ts +6 -5
- package/dist/types/src/components/ui/Buttons.d.ts +13 -12
- package/dist/types/src/components/ui/Card.d.ts +8 -7
- package/dist/types/src/components/ui/Code.d.ts +1 -1
- package/dist/types/src/components/ui/Gallery.d.ts +13 -14
- package/dist/types/src/components/ui/GridSystem.d.ts +1 -1
- package/dist/types/src/components/ui/Icon.d.ts +3 -1
- package/dist/types/src/components/ui/Image.d.ts +1 -1
- package/dist/types/src/components/ui/ImageAvatar.d.ts +1 -1
- package/dist/types/src/components/ui/Loader.d.ts +1 -1
- package/dist/types/src/components/ui/LocaleSwitcher.d.ts +14 -0
- package/dist/types/src/components/ui/Modal.d.ts +42 -15
- package/dist/types/src/components/ui/Pagination.d.ts +14 -3
- package/dist/types/src/components/ui/Percentage.d.ts +5 -5
- package/dist/types/src/components/ui/Repeat.d.ts +15 -6
- package/dist/types/src/components/ui/Tab.d.ts +29 -2
- package/dist/types/src/components/ui/TabDynamic.d.ts +4 -3
- package/dist/types/src/components/ui/Table.d.ts +15 -14
- package/dist/types/src/components/ui/fields/CodeEditor.d.ts +43 -0
- package/dist/types/src/components/ui/fields/ContextMenu.d.ts +38 -0
- package/dist/types/src/components/ui/fields/Crop.d.ts +4 -2
- package/dist/types/src/components/ui/fields/ImageField.d.ts +31 -0
- package/dist/types/src/components/ui/fields/Input.d.ts +43 -14
- package/dist/types/src/components/ui/fields/Prompt.d.ts +2 -31
- package/dist/types/src/components/ui/fields/RichText.d.ts +86 -0
- package/dist/types/src/components/ui/fields/Select.d.ts +13 -10
- package/dist/types/src/components/ui/fields/Upload.d.ts +37 -2
- package/dist/types/src/components/ui/fields/UploadCSV.d.ts +2 -0
- package/dist/types/src/components/ui/useRecordSelection.d.ts +1 -2
- package/dist/types/src/components/widgets/Form.d.ts +80 -43
- package/dist/types/src/components/widgets/ImageEditor.d.ts +4 -5
- package/dist/types/src/components/widgets/MarkdownReader.d.ts +4 -4
- package/dist/types/src/components/widgets/Prompt.d.ts +71 -23
- package/dist/types/src/components/widgets/TabDynamic.d.ts +4 -3
- package/dist/types/src/components/widgets/form-controller.d.ts +42 -0
- package/dist/types/src/components/widgets/grid-core/GridCore.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/GridDB.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/GridGalleryView.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/GridTableView.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/types.d.ts +77 -27
- package/dist/types/src/components/widgets/grid-core/useGridActions.d.ts +4 -8
- package/dist/types/src/components/widgets/grid-core/useGridColumns.d.ts +2 -2
- package/dist/types/src/components/widgets/grid-core/useGridDBRecords.d.ts +1 -2
- package/dist/types/src/components/widgets/grid-core/useGridPreparedRecords.d.ts +2 -2
- package/dist/types/src/components/widgets/grid-core/useGridSelection.d.ts +4 -5
- package/dist/types/src/components/widgets/grid-core/utils.d.ts +11 -3
- package/dist/types/src/conf/Prompt.d.ts +1 -1
- package/dist/types/src/conf/i18n/ar.d.ts +2 -0
- package/dist/types/src/conf/i18n/de.d.ts +2 -0
- package/dist/types/src/conf/i18n/en.d.ts +2 -0
- package/dist/types/src/conf/i18n/index.d.ts +6 -0
- package/dist/types/src/conf/i18n/it.d.ts +2 -0
- package/dist/types/src/conf/i18n/ru.d.ts +2 -0
- package/dist/types/src/conf/i18n/zh.d.ts +2 -0
- package/dist/types/src/constant.d.ts +1 -1
- package/dist/types/src/index.d.ts +38 -13
- package/dist/types/src/libs/converter.d.ts +4 -4
- package/dist/types/src/libs/editorHeight.d.ts +12 -0
- package/dist/types/src/libs/fetch.d.ts +4 -4
- package/dist/types/src/libs/imageBuilder.d.ts +63 -14
- package/dist/types/src/libs/imageVariants.d.ts +35 -0
- package/dist/types/src/libs/index.d.ts +1 -4
- package/dist/types/src/libs/promptUtils.d.ts +24 -0
- package/dist/types/src/libs/sanitizer.d.ts +2 -2
- package/dist/types/src/libs/utils.d.ts +9 -10
- package/dist/types/src/pages/index.d.ts +0 -2
- package/dist/types/src/providers/ProviderConfiguration.d.ts +6 -0
- package/dist/types/src/providers/ProviderRegistryContext.d.ts +51 -0
- package/dist/types/src/providers/ProviderSession.d.ts +68 -0
- package/dist/types/src/providers/ai/AIProvider.d.ts +57 -0
- package/dist/types/src/providers/ai/AIProviderContext.d.ts +13 -0
- package/dist/types/src/providers/ai/anthropic.d.ts +2 -0
- package/dist/types/src/providers/ai/deepseek.d.ts +1 -0
- package/dist/types/src/providers/ai/gemini.d.ts +2 -0
- package/dist/types/src/providers/ai/glm.d.ts +1 -0
- package/dist/types/src/providers/ai/index.d.ts +9 -134
- package/dist/types/src/providers/ai/mistral.d.ts +1 -0
- package/dist/types/src/providers/ai/openai.d.ts +1 -0
- package/dist/types/src/providers/ai/openaiCompatible.d.ts +17 -0
- package/dist/types/src/providers/ai/opencode.d.ts +2 -0
- package/dist/types/src/providers/ai/openrouter.d.ts +1 -0
- package/dist/types/src/providers/ai/shared.d.ts +46 -0
- package/dist/types/src/providers/api/ApiProvider.d.ts +43 -0
- package/dist/types/src/providers/api/direct.d.ts +14 -0
- package/dist/types/src/providers/api/firebase.d.ts +14 -0
- package/dist/types/src/providers/api/mock.d.ts +7 -0
- package/dist/types/src/providers/api/supabase.d.ts +14 -0
- package/dist/types/src/providers/auth/AuthProvider.d.ts +2 -2
- package/dist/types/src/providers/auth/firebase/FirebaseAuthProvider.d.ts +26 -0
- package/dist/types/src/providers/auth/google/GoogleAuth.d.ts +2 -2
- package/dist/types/src/providers/auth/supabase/SupabaseAuthProvider.d.ts +48 -0
- package/dist/types/src/providers/credentials/CredentialsProvider.d.ts +3 -0
- package/dist/types/src/providers/credentials/CredentialsProviderContext.d.ts +12 -0
- package/dist/types/src/providers/credentials/google/GoogleServiceAccountProvider.d.ts +8 -0
- package/dist/types/src/providers/data/DataProvider.d.ts +27 -1
- package/dist/types/src/providers/data/firebase.d.ts +5 -4
- package/dist/types/src/providers/data/firestore.d.ts +38 -0
- package/dist/types/src/providers/data/mock.d.ts +8 -1
- package/dist/types/src/providers/data/supabase.d.ts +36 -10
- package/dist/types/src/providers/firebase-init.d.ts +15 -4
- package/dist/types/src/providers/icon/PhosphorIconProvider.d.ts +1 -1
- package/dist/types/src/providers/manifest.d.ts +20 -14
- package/dist/types/src/providers/proxy/index.d.ts +7 -0
- package/dist/types/src/providers/proxy/vite.d.ts +3 -0
- package/dist/types/src/providers/scrape/index.d.ts +2 -1
- package/dist/types/src/providers/seo/google/keyword.d.ts +6 -1
- package/dist/types/src/providers/storage/StorageProvider.d.ts +155 -4
- package/dist/types/src/providers/storage/dropbox.d.ts +3 -3
- package/dist/types/src/providers/storage/firebase.d.ts +38 -7
- package/dist/types/src/providers/storage/supabase.d.ts +47 -7
- package/dist/types/src/providers/supabase-init.d.ts +35 -0
- package/dist/types/src/types/FormFields.d.ts +4 -2
- package/dist/types/src/types/FormSchema.d.ts +29 -0
- package/dist/types/themes/tokyo-night-light.d.ts +3 -0
- package/dist/types/themes/tokyo-night.d.ts +3 -0
- package/dist/types/themes/vscode-dark-plus.d.ts +3 -0
- package/dist/types/themes/vscode-light-plus.d.ts +3 -0
- package/dist/vite.js +1 -0
- package/dist/vite.mjs +54 -0
- package/package.json +40 -9
- package/scripts/cli/proxy-templates/cloudflare.ts +34 -0
- package/scripts/cli/proxy-templates/express.ts +77 -0
- package/scripts/cli/proxy-templates/nextjs-app.ts +42 -0
- package/scripts/cli/proxy-templates/nextjs-pages.ts +41 -0
- package/scripts/cli/proxy-templates/scaffold.json +33 -0
- package/scripts/cli/setup-devtools.js +155 -85
- package/scripts/cli/setup-project.js +618 -484
- package/themes/cyber.ts +469 -405
- package/themes/default.ts +469 -405
- package/themes/flat.ts +469 -405
- package/themes/tokyo-night-light.ts +38 -0
- package/themes/tokyo-night.ts +38 -0
- package/themes/vscode-dark-plus.ts +29 -0
- package/themes/vscode-light-plus.ts +29 -0
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types/src/components/FormEnhancer.d.ts +0 -26
- package/dist/types/src/components/Template.d.ts +0 -18
- package/dist/types/src/components/ui/fields/AssistantAI.d.ts +0 -23
- package/dist/types/src/components/ui/fields/Command.d.ts +0 -15
- package/dist/types/src/components/ui/fields/ImageUrl.d.ts +0 -7
- package/dist/types/src/libs/cache.d.ts +0 -9
- package/dist/types/src/libs/database.d.ts +0 -3
- package/dist/types/src/libs/log.d.ts +0 -2
- package/dist/types/src/libs/seo.d.ts +0 -8
- package/dist/types/src/libs/storage.d.ts +0 -2
- package/dist/types/src/pages/Blog.d.ts +0 -3
- package/dist/types/src/pages/BlogPost.d.ts +0 -16
- package/dist/types/src/pages/Helper.d.ts +0 -8
- package/dist/types/src/providers/auth/google/apis/auth.d.ts +0 -4
- package/dist/types/src/types/Block.d.ts +0 -4
- package/dist/types/src/types/Section.d.ts +0 -4
|
@@ -1,8 +1,54 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* A single breadcrumb item.
|
|
4
|
+
* - Provide `href` to render as a clickable link.
|
|
5
|
+
* - Omit `href` on the last item to mark it as the current page (not a link).
|
|
6
|
+
*/
|
|
7
|
+
export type BreadcrumbItem = {
|
|
8
|
+
label: string;
|
|
9
|
+
href?: string;
|
|
10
|
+
node?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export type BreadcrumbsProps = {
|
|
13
|
+
/**
|
|
14
|
+
* The breadcrumb trail to render.
|
|
15
|
+
* - Pass a URL string to auto-parse into segments (e.g. "/products/shoes") - falls back to the current route when omitted.
|
|
16
|
+
* - Pass a BreadcrumbItem[] for explicit control over labels and links.
|
|
17
|
+
*/
|
|
18
|
+
trail?: string | BreadcrumbItem[];
|
|
19
|
+
/**
|
|
20
|
+
* Optional anchor item rendered before the trail (e.g. the site root).
|
|
21
|
+
* Pass a string for a plain label (e.g. "Home") or a BreadcrumbItem to also add a link (e.g. { label: "Home", href: "/" }).
|
|
22
|
+
*/
|
|
23
|
+
rootItem?: string | BreadcrumbItem;
|
|
24
|
+
/** Character or icon rendered between items. Use "chevron" for an SVG arrow. Default: "/" */
|
|
25
|
+
separator?: '/' | '>' | 'chevron' | string;
|
|
26
|
+
/** When true, renders a <script type="application/ld+json"> BreadcrumbList schema.org tag. Default: false */
|
|
27
|
+
jsonLd?: boolean;
|
|
28
|
+
/** Base URL prepended to item hrefs in the JSON-LD output only (e.g. "https://example.com"). Does not affect the visual links. Defaults to window.location.origin. */
|
|
29
|
+
baseUrl?: string;
|
|
5
30
|
className?: string;
|
|
6
31
|
};
|
|
7
|
-
|
|
32
|
+
/** Options for buildBreadcrumbSchema. */
|
|
33
|
+
export type BreadcrumbSchemaOptions = {
|
|
34
|
+
/** The breadcrumb item list. Items with `href` get an absolute URL in the schema; items without `href` (current page) do not. */
|
|
35
|
+
items: BreadcrumbItem[];
|
|
36
|
+
/** Optional anchor item prepended before the list (same shape as BreadcrumbItem - e.g. { label: "Home", href: "/" }). */
|
|
37
|
+
rootItem?: BreadcrumbItem;
|
|
38
|
+
/** Base URL prepended to all hrefs to produce the absolute URLs required by schema.org (e.g. "https://example.com"). */
|
|
39
|
+
baseUrl: string;
|
|
40
|
+
/** When true, returns a JSON string ready for `dangerouslySetInnerHTML` - no manual JSON.stringify needed. Default: false */
|
|
41
|
+
stringify?: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Builds a schema.org BreadcrumbList.
|
|
45
|
+
* Returns a plain object by default, or a ready-to-inject JSON string when `stringify: true`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function buildBreadcrumbSchema(options: BreadcrumbSchemaOptions & {
|
|
48
|
+
stringify: true;
|
|
49
|
+
}): string;
|
|
50
|
+
export declare function buildBreadcrumbSchema(options: BreadcrumbSchemaOptions & {
|
|
51
|
+
stringify?: false;
|
|
52
|
+
}): object;
|
|
53
|
+
export declare const Breadcrumbs: ({ trail, rootItem, separator, jsonLd, baseUrl, className, }: BreadcrumbsProps) => React.JSX.Element | null;
|
|
8
54
|
export default Breadcrumbs;
|
|
@@ -9,11 +9,11 @@ type CarouselProps = {
|
|
|
9
9
|
showIndicators?: boolean;
|
|
10
10
|
showControls?: boolean;
|
|
11
11
|
showCaption?: boolean;
|
|
12
|
-
|
|
12
|
+
dark?: boolean;
|
|
13
13
|
autoPlay?: AutoPlayOptions;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
initialSlide?: number;
|
|
15
|
+
renderCaption?: (image: React.ReactElement) => React.ReactElement;
|
|
16
|
+
onSlideClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
17
17
|
};
|
|
18
|
-
declare const Carousel: ({ children, showIndicators, showControls, showCaption,
|
|
18
|
+
declare const Carousel: ({ children, showIndicators, showControls, showCaption, dark, autoPlay, initialSlide, renderCaption, onSlideClick, }: CarouselProps) => React.JSX.Element | null;
|
|
19
19
|
export default Carousel;
|
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BadgeProps } from "../ui/Badge";
|
|
2
|
+
import { BadgeProps, BadgeType } from "../ui/Badge";
|
|
3
3
|
import type { MotionUIProps } from '../types';
|
|
4
4
|
interface DropdownTogglerProps {
|
|
5
5
|
icon?: string;
|
|
6
6
|
text?: string;
|
|
7
|
+
title?: string;
|
|
7
8
|
}
|
|
8
|
-
interface DropdownProps extends
|
|
9
|
+
interface DropdownProps extends MotionUIProps {
|
|
9
10
|
children: React.ReactNode;
|
|
10
|
-
|
|
11
|
+
trigger?: string | React.ReactNode | DropdownTogglerProps;
|
|
11
12
|
badge?: BadgeProps;
|
|
12
13
|
header?: React.ReactNode;
|
|
13
14
|
footer?: React.ReactNode;
|
|
14
15
|
defaultOpen?: boolean;
|
|
15
16
|
open?: boolean;
|
|
16
17
|
onOpenChange?: (open: boolean) => void;
|
|
17
|
-
|
|
18
|
+
staticOpen?: boolean;
|
|
18
19
|
position?: "start" | "end";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
placement?: "auto" | "top" | "bottom";
|
|
21
|
+
strategy?: "fixed" | "absolute";
|
|
22
|
+
triggerClassName?: string;
|
|
23
|
+
badgeClassName?: string;
|
|
24
|
+
menuClassName?: string;
|
|
25
|
+
headerClassName?: string;
|
|
26
|
+
footerClassName?: string;
|
|
26
27
|
}
|
|
27
28
|
interface DropdownButtonProps extends Pick<MotionUIProps, 'motion'> {
|
|
28
29
|
children: React.ReactNode;
|
|
29
30
|
badge?: BadgeProps;
|
|
30
31
|
display?: "static" | "dynamic";
|
|
31
32
|
className?: string;
|
|
32
|
-
|
|
33
|
+
badgeClassName?: string;
|
|
34
|
+
title?: string;
|
|
33
35
|
onToggle?: () => void;
|
|
34
36
|
open?: boolean;
|
|
35
37
|
menuId?: string;
|
|
38
|
+
buttonRef?: React.RefObject<HTMLButtonElement>;
|
|
36
39
|
}
|
|
37
40
|
interface DropdownItemProps {
|
|
38
41
|
url?: string;
|
|
@@ -48,17 +51,20 @@ interface DropdownHeaderProps {
|
|
|
48
51
|
interface DropdownDividerProps {
|
|
49
52
|
className?: string;
|
|
50
53
|
}
|
|
51
|
-
export declare const Dropdown: ({ children,
|
|
52
|
-
export declare const DropdownButton: ({ children, badge, display, className,
|
|
54
|
+
export declare const Dropdown: ({ children, trigger, badge, header, footer, defaultOpen, open: controlledOpen, onOpenChange, staticOpen, position, placement, strategy, wrapperClassName, className, before, after, triggerClassName, menuClassName, badgeClassName, headerClassName, footerClassName, motion: motionConfig, }: DropdownProps) => React.JSX.Element;
|
|
55
|
+
export declare const DropdownButton: ({ children, badge, display, className, badgeClassName, motion: motionConfig, title, onToggle, open, menuId, buttonRef }: DropdownButtonProps) => React.JSX.Element;
|
|
53
56
|
export declare const DropdownItem: ({ children, url, onClick, icon, className }: DropdownItemProps) => React.JSX.Element;
|
|
54
57
|
export declare const DropdownHeader: ({ children, className }: DropdownHeaderProps) => React.JSX.Element;
|
|
55
58
|
export declare const DropdownDivider: ({ className }: DropdownDividerProps) => React.JSX.Element;
|
|
56
59
|
interface DropdownMenuProps {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
badges?: Record<string,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
menuKey: string;
|
|
61
|
+
as?: 'ul' | 'ol';
|
|
62
|
+
badges?: Record<string, {
|
|
63
|
+
type?: BadgeType;
|
|
64
|
+
children: string;
|
|
65
|
+
}>;
|
|
66
|
+
before?: React.ReactNode;
|
|
67
|
+
after?: React.ReactNode;
|
|
62
68
|
}
|
|
63
|
-
export declare const DropdownMenu: ({
|
|
69
|
+
export declare const DropdownMenu: ({ menuKey, as, badges, before, after }: DropdownMenuProps) => React.JSX.Element;
|
|
64
70
|
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MotionUIProps } from '../types';
|
|
3
|
+
export interface ListCardProps extends MotionUIProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
meta?: React.ReactNode;
|
|
7
|
+
badge?: React.ReactNode;
|
|
8
|
+
icon?: string | React.ReactNode;
|
|
9
|
+
trailing?: React.ReactNode;
|
|
10
|
+
footer?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
href?: string;
|
|
13
|
+
external?: boolean;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
dashed?: boolean;
|
|
17
|
+
compact?: boolean;
|
|
18
|
+
align?: 'start' | 'center';
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
21
|
+
titleClassName?: string;
|
|
22
|
+
descriptionClassName?: string;
|
|
23
|
+
metaClassName?: string;
|
|
24
|
+
badgeClassName?: string;
|
|
25
|
+
leadingClassName?: string;
|
|
26
|
+
bodyClassName?: string;
|
|
27
|
+
headerClassName?: string;
|
|
28
|
+
trailingClassName?: string;
|
|
29
|
+
footerClassName?: string;
|
|
30
|
+
}
|
|
31
|
+
export default function ListCard({ title, description, meta, badge, icon, trailing, footer, children, href, external, active, disabled, dashed, compact, align, onClick, before, after, wrapperClassName, className, titleClassName, descriptionClassName, metaClassName, badgeClassName, leadingClassName, bodyClassName, headerClassName, trailingClassName, footerClassName, style, motion: motionConfig, }: ListCardProps): React.JSX.Element;
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BadgeType } from '../ui/Badge';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import type { UIProps } from '../types';
|
|
4
|
+
interface MenuProps extends UIProps {
|
|
5
|
+
menuKey: string;
|
|
6
|
+
as?: 'ul' | 'ol';
|
|
6
7
|
badges?: Record<string, {
|
|
7
8
|
type?: BadgeType;
|
|
8
9
|
children: string;
|
|
9
10
|
}>;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
textClass?: string;
|
|
19
|
-
badgeClass?: string;
|
|
20
|
-
arrowClass?: string;
|
|
21
|
-
submenuClass?: string;
|
|
11
|
+
headerClassName?: string;
|
|
12
|
+
itemClassName?: string;
|
|
13
|
+
linkClassName?: string;
|
|
14
|
+
iconClassName?: string;
|
|
15
|
+
textClassName?: string;
|
|
16
|
+
badgeClassName?: string;
|
|
17
|
+
arrowClassName?: string;
|
|
18
|
+
submenuClassName?: string;
|
|
22
19
|
}
|
|
23
|
-
declare const Menu: ({
|
|
20
|
+
declare const Menu: ({ menuKey, as, badges, before, after, wrapperClassName, className, headerClassName, itemClassName, linkClassName, iconClassName, textClassName, badgeClassName, arrowClassName, submenuClassName, }: MenuProps) => React.JSX.Element;
|
|
24
21
|
export default Menu;
|
|
@@ -5,11 +5,16 @@ interface NotificationItem {
|
|
|
5
5
|
url: string;
|
|
6
6
|
time: string;
|
|
7
7
|
icon: string;
|
|
8
|
+
read?: boolean;
|
|
8
9
|
}
|
|
9
10
|
interface NotificationsProps {
|
|
10
|
-
|
|
11
|
+
items?: NotificationItem[];
|
|
11
12
|
badge?: BadgeProps;
|
|
12
|
-
|
|
13
|
+
/** URL to a full notifications page — shown in the footer only when there are items */
|
|
14
|
+
seeAllUrl?: string;
|
|
15
|
+
/** Callback for "mark all as read" — shown in the header only when there are items */
|
|
16
|
+
onMarkAllRead?: () => void;
|
|
17
|
+
className?: string;
|
|
13
18
|
}
|
|
14
|
-
declare function Notifications({
|
|
19
|
+
declare function Notifications({ items, badge, seeAllUrl, onMarkAllRead, className, }: NotificationsProps): React.JSX.Element;
|
|
15
20
|
export default Notifications;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UIProps } from '../types';
|
|
3
|
+
import type { ProviderSessionResponse } from '../../providers/ProviderSession';
|
|
4
|
+
export interface ProviderSwitcherItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Rendered on the trailing side of the row, e.g. a role or a status. */
|
|
8
|
+
meta?: React.ReactNode;
|
|
9
|
+
/** Icon name (resolved via the icon provider) or a ready-made node. Falls back to the switcher's own `icon`. */
|
|
10
|
+
icon?: string | React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface ProviderSwitcherProps extends UIProps {
|
|
13
|
+
items: ProviderSwitcherItem[];
|
|
14
|
+
activeId?: string | null;
|
|
15
|
+
/** Fires once the switch has actually succeeded — never optimistically on click. */
|
|
16
|
+
onSelect?: (id: string) => void;
|
|
17
|
+
/** Fires when the endpoint call or the provider switch itself throws. */
|
|
18
|
+
onError?: (id: string, error: unknown) => void;
|
|
19
|
+
/** Inspect or transform the raw session response before it's applied — e.g. inject an extra category, filter one out, forward it to an audit log. */
|
|
20
|
+
onResponse?: (response: ProviderSessionResponse) => ProviderSessionResponse | Promise<ProviderSessionResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* URL of the session endpoint (POSTed with `requestBody(id)` on selection), or a
|
|
23
|
+
* resolver called directly with the picked id — e.g. a mock/dev session provider,
|
|
24
|
+
* or a Firebase Callable Function invocation. No fetch happens in the resolver case.
|
|
25
|
+
*/
|
|
26
|
+
endpoint: string | ((id: string) => Promise<ProviderSessionResponse>);
|
|
27
|
+
/**
|
|
28
|
+
* Overrides the credential sent with the request. By default, ProviderSwitcher calls
|
|
29
|
+
* getAccessToken() on the app's own registered auth provider — the identity the user
|
|
30
|
+
* already negotiated at login — so most apps never need to set this. A function is
|
|
31
|
+
* called fresh on every switch, which matters because tokens expire/rotate.
|
|
32
|
+
*/
|
|
33
|
+
authorization?: string | (() => string | Promise<string>);
|
|
34
|
+
/** Builds the POST body for a string `endpoint`. Defaults to `{ id }`. */
|
|
35
|
+
requestBody?: (id: string) => unknown;
|
|
36
|
+
/** HTTP method for a string `endpoint`. Default: 'POST'. */
|
|
37
|
+
method?: string;
|
|
38
|
+
/** Leading icon shown in the trigger and as the default per-item icon. Name resolved via the icon provider, or a ready-made node. */
|
|
39
|
+
icon?: string | React.ReactNode;
|
|
40
|
+
/** Small caption under the active item's label in the trigger (e.g. "Workspace"). Also used as the list header unless `listLabel` is set. */
|
|
41
|
+
caption?: React.ReactNode;
|
|
42
|
+
/** Header shown above the item list. Defaults to `caption`. */
|
|
43
|
+
listLabel?: React.ReactNode;
|
|
44
|
+
/** Shown in the trigger when `activeId` matches nothing in `items`. Defaults to the framework's generic "Select..." string. */
|
|
45
|
+
placeholder?: React.ReactNode;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
open?: boolean;
|
|
48
|
+
onOpenChange?: (open: boolean) => void;
|
|
49
|
+
/** Rendered below the item list, inside the dropdown — e.g. a "manage" action. Omit for a plain list. */
|
|
50
|
+
footer?: React.ReactNode;
|
|
51
|
+
triggerClassName?: string;
|
|
52
|
+
listClassName?: string;
|
|
53
|
+
itemClassName?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Generic named-item switcher — no domain vocabulary (tenant, workspace, session, ...).
|
|
57
|
+
* Given `items` and one `endpoint`, it performs the whole switch itself on selection:
|
|
58
|
+
* resolves a credential (the app's own auth provider by default), calls the endpoint
|
|
59
|
+
* for the picked id, and applies the response via useProviderSession().switchSession().
|
|
60
|
+
* The caller only finds out once it's actually done (`onSelect`) or failed (`onError`) —
|
|
61
|
+
* it never has to wire the request/loading/error plumbing itself.
|
|
62
|
+
*/
|
|
63
|
+
export default function ProviderSwitcher({ items, activeId, onSelect, onError, onResponse, endpoint, authorization, requestBody, method, icon, caption, listLabel, placeholder, disabled, open, onOpenChange, footer, before, after, wrapperClassName, className, triggerClassName, listClassName, itemClassName, }: ProviderSwitcherProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface SearchProps {
|
|
3
|
-
|
|
3
|
+
onQueryChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
4
4
|
}
|
|
5
5
|
export declare const SearchButton: () => React.JSX.Element;
|
|
6
|
-
declare function Search({
|
|
6
|
+
declare function Search({ onQueryChange }: SearchProps): React.JSX.Element;
|
|
7
7
|
export default Search;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SideNav — collapsible sidebar block.
|
|
3
|
+
*
|
|
4
|
+
* Accepts either `menuKey` (reads from App menuConfig via useMenu) or explicit `items`.
|
|
5
|
+
* Features: collapse to icon-only, hover-expand overlay, groups, active state, animated sub-menu, badges.
|
|
6
|
+
*
|
|
7
|
+
* Active state is computed manually via useLocation (not NavLink.isActive) to avoid
|
|
8
|
+
* React Router quirks with the "/" root path and the `end` flag.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export interface SideNavItemDef {
|
|
12
|
+
path: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
group?: string;
|
|
16
|
+
/** Match exact path only (needed for "/" to avoid matching everything). Default: false. */
|
|
17
|
+
end?: boolean;
|
|
18
|
+
/** Badge label shown next to the item title. Collapsed: dot indicator. */
|
|
19
|
+
badge?: string | number;
|
|
20
|
+
children?: SideNavItemDef[];
|
|
21
|
+
}
|
|
22
|
+
export interface SideNavProps {
|
|
23
|
+
/** Menu key registered in App menuConfig — calls useMenu() internally */
|
|
24
|
+
menuKey?: string;
|
|
25
|
+
/** Explicit items — alternative to menuKey */
|
|
26
|
+
items?: SideNavItemDef[];
|
|
27
|
+
defaultCollapsed?: boolean;
|
|
28
|
+
/** Show icon slot. Default true. */
|
|
29
|
+
showIcons?: boolean;
|
|
30
|
+
/** Show collapse/expand toggle button in the footer. Default true. */
|
|
31
|
+
showCollapseButton?: boolean;
|
|
32
|
+
/** Optional content rendered in the footer alongside the collapse button. */
|
|
33
|
+
footer?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Optional content rendered in a pinned header at the top of the sidebar.
|
|
36
|
+
* Hidden when empty (default).
|
|
37
|
+
*/
|
|
38
|
+
header?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Embedded mode — renders only the nav items without the sidebar shell
|
|
41
|
+
* (no sticky wrapper, no collapse button). Use inside drawers or panels.
|
|
42
|
+
*/
|
|
43
|
+
embedded?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export default function SideNav({ menuKey, items: itemsProp, defaultCollapsed, showIcons, showCollapseButton, footer, header, embedded, }: SideNavProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UIProps } from '../types';
|
|
3
|
+
export interface ThemeSwitcherThemeOption {
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ThemeSwitcherProps extends UIProps {
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
surface?: 'flat' | 'modal';
|
|
11
|
+
showHeader?: boolean;
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
subtitle?: React.ReactNode;
|
|
14
|
+
headerActions?: React.ReactNode;
|
|
15
|
+
themeOptions?: Record<string, ThemeSwitcherThemeOption>;
|
|
16
|
+
showModeSection?: boolean;
|
|
17
|
+
showPrimarySection?: boolean;
|
|
18
|
+
showRadiusSection?: boolean;
|
|
19
|
+
showFontSection?: boolean;
|
|
20
|
+
showStatusSection?: boolean;
|
|
21
|
+
showThemeSection?: boolean;
|
|
22
|
+
showIconLibrarySection?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export default function ThemeSwitcher({ open, onClose, surface, showHeader, title, subtitle, headerActions, themeOptions, showModeSection, showPrimarySection, showRadiusSection, showFontSection, showStatusSection, showThemeSection, showIconLibrarySection, className, wrapperClassName, }: ThemeSwitcherProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ScrollTarget = Window | HTMLElement | null | undefined | React.RefObject<HTMLElement | null>;
|
|
3
|
+
export interface ToolbarProps {
|
|
4
|
+
leading?: React.ReactNode;
|
|
5
|
+
center?: React.ReactNode;
|
|
6
|
+
trailing?: React.ReactNode;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
sticky?: boolean;
|
|
9
|
+
elevateOnScroll?: boolean;
|
|
10
|
+
scrollTarget?: ScrollTarget;
|
|
11
|
+
scrollThreshold?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
innerClassName?: string;
|
|
14
|
+
leadingClassName?: string;
|
|
15
|
+
centerClassName?: string;
|
|
16
|
+
trailingClassName?: string;
|
|
17
|
+
}
|
|
18
|
+
export default function Toolbar({ leading, center, trailing, children, sticky, elevateOnScroll, scrollTarget, scrollThreshold, className, innerClassName, leadingClassName, centerClassName, trailingClassName, }: ToolbarProps): React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
export type { MotionUIProps, UIProps } from './types';
|
|
2
2
|
export { default as Brand } from './blocks/Brand';
|
|
3
|
-
export { default as Breadcrumbs } from './blocks/Breadcrumbs';
|
|
3
|
+
export { default as Breadcrumbs, buildBreadcrumbSchema } from './blocks/Breadcrumbs';
|
|
4
|
+
export type { BreadcrumbItem, BreadcrumbsProps, BreadcrumbSchemaOptions } from './blocks/Breadcrumbs';
|
|
4
5
|
export { default as Carousel } from './blocks/Carousel';
|
|
5
6
|
export * from './blocks/Dropdown';
|
|
6
7
|
export { default as Notifications } from './blocks/Notifications';
|
|
7
8
|
export { default as Search } from './blocks/Search';
|
|
9
|
+
export { default as Toolbar } from './blocks/Toolbar';
|
|
10
|
+
export type { ToolbarProps } from './blocks/Toolbar';
|
|
11
|
+
export { default as ThemeSwitcher } from './blocks/ThemeSwitcher';
|
|
12
|
+
export type { ThemeSwitcherProps, ThemeSwitcherThemeOption } from './blocks/ThemeSwitcher';
|
|
13
|
+
export { default as ProviderSwitcher } from './blocks/ProviderSwitcher';
|
|
14
|
+
export type { ProviderSwitcherProps, ProviderSwitcherItem } from './blocks/ProviderSwitcher';
|
|
8
15
|
export { default as Alert } from './ui/Alert';
|
|
16
|
+
export type { AlertProps } from './ui/Alert';
|
|
9
17
|
export { default as Badge } from './ui/Badge';
|
|
10
18
|
export * from './ui/Badge';
|
|
11
19
|
export * from './ui/Buttons';
|
|
12
20
|
export { default as Card } from './ui/Card';
|
|
21
|
+
export type { CardProps } from './ui/Card';
|
|
13
22
|
export { default as Code } from './ui/Code';
|
|
14
23
|
export { default as Gallery } from './ui/Gallery';
|
|
15
24
|
export * from './ui/Gallery';
|
|
@@ -18,14 +27,17 @@ export * from './ui/GridSystem';
|
|
|
18
27
|
export { default as Image } from './ui/Image';
|
|
19
28
|
export { default as ImageAvatar } from './ui/ImageAvatar';
|
|
20
29
|
export { default as Loader } from './ui/Loader';
|
|
30
|
+
export { default as LocaleSwitcher } from './ui/LocaleSwitcher';
|
|
31
|
+
export type { LocaleSwitcherProps } from './ui/LocaleSwitcher';
|
|
21
32
|
export { default as Modal } from './ui/Modal';
|
|
22
33
|
export * from './ui/Modal';
|
|
34
|
+
export { default as Pagination } from './ui/Pagination';
|
|
23
35
|
export { default as Percentage } from './ui/Percentage';
|
|
24
36
|
export { default as Repeat } from './ui/Repeat';
|
|
25
37
|
export { default as Tab } from './ui/Tab';
|
|
26
38
|
export * from './ui/Tab';
|
|
27
39
|
export { default as Table } from './ui/Table';
|
|
28
|
-
export type { TableHeaderProp, TableReorderHandler, TableReorderMeta, TableSelectionChangeHandler, TableSelectionState } from './ui/Table';
|
|
40
|
+
export type { TableProps, TableHeaderProp, TableReorderHandler, TableReorderMeta, TableSelectionChangeHandler, TableSelectionState } from './ui/Table';
|
|
29
41
|
export { default as Icon } from './ui/Icon';
|
|
30
42
|
export { LayoutBuilder } from './ui/LayoutBuilder';
|
|
31
43
|
export * from './ui/fields/Input';
|
|
@@ -33,11 +45,19 @@ export * from './ui/fields/Select';
|
|
|
33
45
|
export * from './ui/fields/Upload';
|
|
34
46
|
export * from './ui/fields/Crop';
|
|
35
47
|
export * from './ui/fields/UploadCSV';
|
|
36
|
-
export * from './ui/fields/
|
|
37
|
-
export
|
|
48
|
+
export * from './ui/fields/ImageField';
|
|
49
|
+
export * from './ui/fields/RichText';
|
|
50
|
+
export * from './ui/fields/CodeEditor';
|
|
51
|
+
export * from './ui/fields/ContextMenu';
|
|
38
52
|
export { default as Menu } from './blocks/Menu';
|
|
53
|
+
export { default as ListCard } from './blocks/ListCard';
|
|
54
|
+
export type { ListCardProps } from './blocks/ListCard';
|
|
55
|
+
export { default as SideNav } from './blocks/SideNav';
|
|
56
|
+
export type { SideNavProps, SideNavItemDef } from './blocks/SideNav';
|
|
39
57
|
export { default as Form } from './widgets/Form';
|
|
40
|
-
export type { FormDeleteArgs, FormDeleteHandler, FormFinallyArgs, FormFinallyHandler, FormSaveArgs, FormSaveHandler
|
|
58
|
+
export type { FormProps, FormDeleteArgs, FormDeleteHandler, FormFinallyArgs, FormFinallyHandler, FormSaveArgs, FormSaveHandler } from './widgets/Form';
|
|
59
|
+
export { FormControllerContext, useFormActions, useFormController } from './widgets/form-controller';
|
|
60
|
+
export type { FormActionEvent, FormController, FormControllerActions, FormControllerState, FormDraftStatus } from './widgets/form-controller';
|
|
41
61
|
export { default as Grid } from './widgets/Grid';
|
|
42
62
|
export { GridArray, GridCore, GridDB, GridGalleryView, GridTableView } from './widgets/grid-core';
|
|
43
63
|
export type { GridAction, GridActions, GridAfterActionArgs, GridAfterActionHandler, GridArrayProps, GridColumn, GridCoreProps, GridDBQuery, GridDBProps, GridFooterContext, GridFormContext, GridGalleryViewProps, GridHeaderContext, GridLayout, GridMutationDeleteArgs, GridMutationDeleteHandler, GridMutationSaveArgs, GridMutationSaveHandler, GridReorderHandler, GridReorderMeta, GridRecordKey, GridProps, GridSelectionChangeHandler, GridSelectionMode, GridSelectionState, GridSticky, GridTableViewProps, } from './widgets/Grid';
|
|
@@ -48,5 +68,6 @@ export * from './widgets/Prompt';
|
|
|
48
68
|
export { default as TabDynamic } from './widgets/TabDynamic';
|
|
49
69
|
export { default as Component } from './Component';
|
|
50
70
|
export { ComponentBlock } from './Component';
|
|
51
|
-
export
|
|
71
|
+
export type { FieldAdapter, FieldFactory, ModelProps, FormTree } from './Component';
|
|
72
|
+
export type { ComponentFormSchemaMap } from '../types/FormSchema';
|
|
52
73
|
export type { ModalDeleteHandler, ModalSaveHandler } from './ui/Modal';
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { MotionReference } from '../motion';
|
|
3
|
+
/** Slot and class props shared by every UI component. */
|
|
3
4
|
export interface UIProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/** Content rendered immediately before the component's root element. */
|
|
6
|
+
before?: React.ReactNode;
|
|
7
|
+
/** Content rendered immediately after the component's root element. */
|
|
8
|
+
after?: React.ReactNode;
|
|
9
|
+
/** CSS classes applied to the outermost wrapper element. */
|
|
10
|
+
wrapperClassName?: string;
|
|
11
|
+
/** CSS classes applied to the component's primary element. */
|
|
7
12
|
className?: string;
|
|
8
13
|
}
|
|
14
|
+
/** UIProps extended with an optional motion animation reference. */
|
|
9
15
|
export interface MotionUIProps extends UIProps {
|
|
16
|
+
/** Named motion preset or inline MotionProps override. */
|
|
10
17
|
motion?: MotionReference;
|
|
11
18
|
}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UIProps } from '../..';
|
|
3
|
-
type AlertProps = {
|
|
3
|
+
export type AlertProps = {
|
|
4
4
|
children: string | React.ReactNode;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
variant?: "info" | "success" | "warning" | "danger" | "primary" | "secondary" | "light" | "dark";
|
|
6
|
+
/** Visual shell:
|
|
7
|
+
* - `"default"` - full alert box with background and border (default)
|
|
8
|
+
* - `"text"` - no background, no border, width fits content; ideal for inline status indicators
|
|
9
|
+
*/
|
|
10
|
+
appearance?: "default" | "text";
|
|
11
|
+
/** Rendering mode:
|
|
12
|
+
* - `"inline"` (default) - renders where declared, normal document flow
|
|
13
|
+
* - `"fixed"` - portal to document.body, viewport-fixed above all other content
|
|
14
|
+
* - `"sticky"` - portal prepended to `anchorRef`, sticky at the top of that container
|
|
15
|
+
*/
|
|
16
|
+
placement?: "inline" | "fixed" | "sticky";
|
|
17
|
+
/** Required when placement="sticky": the scrollable container to anchor to. */
|
|
18
|
+
anchorRef?: React.RefObject<HTMLElement>;
|
|
7
19
|
timeout?: number;
|
|
8
20
|
onClose?: () => void;
|
|
9
21
|
icon?: string | boolean;
|
|
10
22
|
className?: string;
|
|
11
23
|
} & UIProps;
|
|
12
|
-
declare const Alert: ({ children,
|
|
24
|
+
declare const Alert: ({ children, variant, appearance, placement, anchorRef, timeout, onClose, icon, before, after, wrapperClassName, className }: AlertProps) => React.JSX.Element | null;
|
|
13
25
|
export default Alert;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { UIProps } from '../types';
|
|
3
|
+
/** Semantic color variant for `<Badge>` and any component that accepts a badge. */
|
|
3
4
|
export type BadgeType = "info" | "success" | "warning" | "danger" | "primary" | "secondary" | "light" | "dark";
|
|
4
5
|
export type BadgeDescriptor = {
|
|
5
6
|
content: React.ReactNode;
|
|
6
|
-
|
|
7
|
+
variant?: BadgeType;
|
|
7
8
|
className?: string;
|
|
8
9
|
};
|
|
9
10
|
export type BadgeProps = React.ReactNode | BadgeDescriptor;
|
|
@@ -12,16 +13,16 @@ export declare function normalizeBadgeProps(value: BadgeProps | undefined, fallb
|
|
|
12
13
|
export type BadgeOverlayProps = {
|
|
13
14
|
badge?: BadgeProps;
|
|
14
15
|
content?: React.ReactNode;
|
|
15
|
-
|
|
16
|
+
variant?: BadgeType;
|
|
16
17
|
defaultType?: BadgeType;
|
|
17
18
|
className?: string;
|
|
18
19
|
descriptorOnly?: boolean;
|
|
19
20
|
children?: React.ReactNode;
|
|
20
21
|
};
|
|
21
|
-
export declare const BadgeOverlay: ({ badge, content,
|
|
22
|
+
export declare const BadgeOverlay: ({ badge, content, variant, defaultType, className, descriptorOnly, children }: BadgeOverlayProps) => React.ReactNode;
|
|
22
23
|
export type BadgeComponentProps = {
|
|
23
24
|
children: string | React.ReactNode;
|
|
24
|
-
|
|
25
|
+
variant?: BadgeType;
|
|
25
26
|
} & UIProps;
|
|
26
|
-
declare const Badge: ({ children,
|
|
27
|
+
declare const Badge: ({ children, variant, before, after, wrapperClassName, className }: BadgeComponentProps) => React.JSX.Element;
|
|
27
28
|
export default Badge;
|