@llmnative/react 1.29.0 → 1.31.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/dist/index.css +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1426 -1355
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/Theme.d.ts +4 -0
- package/dist/types/src/components/blocks/Dropdown.d.ts +12 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/ui/Identicon.d.ts +17 -0
- package/dist/types/src/components/widgets/Chatbot.d.ts +6 -0
- package/llms-full.txt +1297 -1271
- package/package.json +1 -1
- package/themes/cyber.ts +4 -0
- package/themes/default.ts +4 -0
- package/themes/flat.ts +4 -0
|
@@ -69,7 +69,18 @@ interface DropdownButtonProps extends Pick<MotionUIProps, 'motion'> {
|
|
|
69
69
|
menuId?: string;
|
|
70
70
|
buttonRef?: React.RefObject<HTMLButtonElement | null>;
|
|
71
71
|
}
|
|
72
|
+
/** A secondary action of a menu item: an icon at its end, shown on hover or focus (CR-107). */
|
|
73
|
+
export interface DropdownItemAction {
|
|
74
|
+
icon: string;
|
|
75
|
+
/** Accessible name and tooltip. */
|
|
76
|
+
label: string;
|
|
77
|
+
onClick: () => void;
|
|
78
|
+
/** Closes the menu after the action; by default it stays open. */
|
|
79
|
+
closeOnClick?: boolean;
|
|
80
|
+
}
|
|
72
81
|
interface DropdownItemProps {
|
|
82
|
+
/** Secondary actions, e.g. archive a row: icons shown on hover or focus (always on touch screens). */
|
|
83
|
+
actions?: DropdownItemAction[];
|
|
73
84
|
/** Link URL. When set, renders as `<a>`, otherwise as `<button>`. */
|
|
74
85
|
url?: string;
|
|
75
86
|
onClick?: React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;
|
|
@@ -92,7 +103,7 @@ export declare const Dropdown: ({ children, trigger, badge, header, footer, defa
|
|
|
92
103
|
*/
|
|
93
104
|
export declare function AsyncDropdown<TItem>({ loadItems, getItemId, renderItem, onSelect, selectedId, searchPlaceholder, emptyState, loadingState, errorState, debounceMs, closeOnSelect, inputClassName, selectedClassName, header, open: controlledOpen, defaultOpen, onOpenChange, footer, headerClassName, staticOpen, ...dropdownProps }: AsyncDropdownProps<TItem>): React.JSX.Element;
|
|
94
105
|
export declare const DropdownButton: ({ children, badge, display, className, badgeClassName, motion: motionConfig, title, onToggle, open, menuId, buttonRef }: DropdownButtonProps) => React.JSX.Element;
|
|
95
|
-
export declare const DropdownItem: ({ children, url, onClick, icon, className }: DropdownItemProps) => React.JSX.Element;
|
|
106
|
+
export declare const DropdownItem: ({ children, url, onClick, icon, className, actions }: DropdownItemProps) => React.JSX.Element;
|
|
96
107
|
export declare const DropdownHeader: ({ children, className }: DropdownHeaderProps) => React.JSX.Element;
|
|
97
108
|
export declare const DropdownDivider: ({ className }: DropdownDividerProps) => React.JSX.Element;
|
|
98
109
|
interface DropdownMenuProps {
|
|
@@ -30,6 +30,7 @@ export type { GallerySelectionChangeHandler, GallerySelectionState } from './ui/
|
|
|
30
30
|
export * from './ui/GridSystem';
|
|
31
31
|
export { default as Image } from './ui/Image';
|
|
32
32
|
export { default as ImageAvatar } from './ui/ImageAvatar';
|
|
33
|
+
export { default as Identicon, identiconPattern } from './ui/Identicon';
|
|
33
34
|
export { default as Loader } from './ui/Loader';
|
|
34
35
|
export { default as LocaleSwitcher } from './ui/LocaleSwitcher';
|
|
35
36
|
export type { LocaleSwitcherProps } from './ui/LocaleSwitcher';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { UIProps } from '../types';
|
|
3
|
+
interface IdenticonProps extends UIProps {
|
|
4
|
+
/** What the icon stands for: a repository, a tenant, a user name… */
|
|
5
|
+
value: string;
|
|
6
|
+
/** Width and height in pixels. */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** Accessible name. Without it the icon is decorative (`aria-hidden`). */
|
|
9
|
+
title?: string;
|
|
10
|
+
}
|
|
11
|
+
/** The filled cells (row, column) and the hue of a value. Exported for tests. */
|
|
12
|
+
export declare function identiconPattern(value: string): {
|
|
13
|
+
cells: Array<[number, number]>;
|
|
14
|
+
hue: number;
|
|
15
|
+
};
|
|
16
|
+
declare const Identicon: ({ value, size, title, before, after, wrapperClassName, className, }: IdenticonProps) => React.JSX.Element;
|
|
17
|
+
export default Identicon;
|
|
@@ -16,7 +16,13 @@ export type ChatbotAction = {
|
|
|
16
16
|
key: string;
|
|
17
17
|
icon: string;
|
|
18
18
|
label?: string;
|
|
19
|
+
/** A menu opened by the action; without it the action is a button (`onClick`). */
|
|
19
20
|
content?: React.ReactNode;
|
|
21
|
+
/** What a button action does (CR-107). */
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Shows `label` next to the icon: a command that has to be read, not guessed. */
|
|
25
|
+
showLabel?: boolean;
|
|
20
26
|
};
|
|
21
27
|
export interface ChatbotSubmitPayload {
|
|
22
28
|
text: string;
|