@nimbus-ds/patterns 1.20.1 → 1.21.0-rc.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/ChatInput/index.d.ts +88 -0
- package/dist/ChatInput/index.js +2 -0
- package/dist/FormField/index.d.ts +1 -1
- package/dist/components-props.json +1 -1
- package/dist/index.d.ts +78 -2
- package/dist/index.js +1 -1
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { BoxBaseProps, BoxProperties, BoxProps, ButtonProperties, ButtonProps, C
|
|
|
6
6
|
import { IconProps } from '@nimbus-ds/icons';
|
|
7
7
|
import { PolymorphicForwardRefComponent } from '@nimbus-ds/typings';
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { ButtonHTMLAttributes, CSSProperties, ComponentProps, ComponentPropsWithRef, FC, HTMLAttributes, MouseEventHandler, PropsWithChildren, ReactElement, ReactNode } from 'react';
|
|
9
|
+
import { ButtonHTMLAttributes, CSSProperties, ComponentProps, ComponentPropsWithRef, FC, HTMLAttributes, MouseEvent, MouseEventHandler, PropsWithChildren, ReactElement, ReactNode } from 'react';
|
|
10
10
|
import { DayPicker } from 'react-day-picker';
|
|
11
11
|
|
|
12
12
|
export interface AppShellHeaderProperties {
|
|
@@ -313,7 +313,7 @@ declare const FormFieldSelect: React.ForwardRefExoticComponent<Pick<FormFieldSel
|
|
|
313
313
|
export type FormFieldSelectProps = ComponentPropsWithRef<typeof FormField.Select>;
|
|
314
314
|
export type FormFieldTextareaProperties = Omit<FormFieldProperties, "children"> & Omit<TextareaProperties, "appearance">;
|
|
315
315
|
export type FormFieldTextareaBaseProps = FormFieldTextareaProperties & Omit<TextareaProps, "appearance"> & HTMLAttributes<HTMLElement>;
|
|
316
|
-
declare const FormFieldTextarea: React.ForwardRefExoticComponent<Pick<FormFieldTextareaBaseProps, keyof React.HTMLAttributes<HTMLElement> | "width" | "height" | "form" | "label" | "pattern" | "key" | "max" | "min" | "name" | "type" | "crossOrigin" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "enterKeyHint" | "list" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "cols" | "dirName" | "rows" | "wrap" | "appearance" | "helpText" | "helpIcon" | "showHelpText" | "lines"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
316
|
+
declare const FormFieldTextarea: React.ForwardRefExoticComponent<Pick<FormFieldTextareaBaseProps, keyof React.HTMLAttributes<HTMLElement> | "width" | "height" | "form" | "label" | "pattern" | "key" | "max" | "min" | "name" | "type" | "crossOrigin" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "enterKeyHint" | "list" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "cols" | "dirName" | "rows" | "wrap" | "appearance" | "helpText" | "helpIcon" | "showHelpText" | "lines" | "autoGrow" | "maxLines" | "minLines" | "resize"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
317
317
|
export type FormFieldTextareaProps = ComponentPropsWithRef<typeof FormField.Textarea>;
|
|
318
318
|
export type FormFieldInputProperties = Omit<FormFieldProperties, "children"> & Omit<InputProperties, "appearance"> & {
|
|
319
319
|
appearance?: FormFieldProperties["appearance"] | InputProperties["appearance"];
|
|
@@ -1311,6 +1311,82 @@ export interface ProductDataListComponents {
|
|
|
1311
1311
|
ItemDivider: typeof ProductDataListItemDivider;
|
|
1312
1312
|
}
|
|
1313
1313
|
export declare const ProductDataList: React.FC<ProductDataListProps> & ProductDataListComponents;
|
|
1314
|
+
export interface ChatInputActionsProperties {
|
|
1315
|
+
/**
|
|
1316
|
+
* Content to be rendered at both sides of the actions bar.
|
|
1317
|
+
* @TJS-type React.ReactNode
|
|
1318
|
+
*/
|
|
1319
|
+
children: ReactNode;
|
|
1320
|
+
}
|
|
1321
|
+
export type ChatInputActionsProps = ChatInputActionsProperties & Omit<BoxProperties, "children" | "display" | "justifyContent" | "alignItems"> & HTMLAttributes<HTMLElement>;
|
|
1322
|
+
export type ChatInputFieldProperties = Omit<TextareaProperties, "appearance"> & {
|
|
1323
|
+
/**
|
|
1324
|
+
* Predefined appearance values for AI states. When `"ai-generative"` is passed,
|
|
1325
|
+
* the field displays the Nimbus AI generative border and focus ring.
|
|
1326
|
+
*/
|
|
1327
|
+
appearance?: "none" | "danger" | "warning" | "success" | "ai-generative";
|
|
1328
|
+
};
|
|
1329
|
+
export type ChatInputFieldBaseProps = ChatInputFieldProperties & Omit<TextareaProps, "appearance"> & HTMLAttributes<HTMLElement>;
|
|
1330
|
+
export interface ChatInputPopoverProperties {
|
|
1331
|
+
/**
|
|
1332
|
+
* Content to be rendered inside the popover, usually ChatInput.PopoverButton components.
|
|
1333
|
+
* @TJS-type React.ReactNode
|
|
1334
|
+
*/
|
|
1335
|
+
content: ReactNode;
|
|
1336
|
+
/**
|
|
1337
|
+
* The trigger element that opens the popover, usually an IconButton.
|
|
1338
|
+
* @TJS-type React.ReactNode
|
|
1339
|
+
*/
|
|
1340
|
+
children: ReactNode;
|
|
1341
|
+
}
|
|
1342
|
+
export type ChatInputPopoverProps = ChatInputPopoverProperties & Omit<PopoverProperties, "content" | "children" | "arrow" | "position" | "padding" | "color">;
|
|
1343
|
+
export interface ChatInputPopoverButtonProperties {
|
|
1344
|
+
/**
|
|
1345
|
+
* Icon element to be displayed before the text.
|
|
1346
|
+
* @TJS-type React.ReactNode
|
|
1347
|
+
*/
|
|
1348
|
+
icon?: ReactNode;
|
|
1349
|
+
/**
|
|
1350
|
+
* The text content of the button.
|
|
1351
|
+
*/
|
|
1352
|
+
text: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* Click handler for the button.
|
|
1355
|
+
*/
|
|
1356
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
1357
|
+
}
|
|
1358
|
+
export type ChatInputPopoverButtonProps = ChatInputPopoverButtonProperties & Omit<BoxProperties, "children" | "as" | "type" | "cursor" | "borderWidth" | "color" | "display" | "alignItems" | "gap" | "p" | "borderRadius" | "onClick">;
|
|
1359
|
+
export interface ChatInputComponents {
|
|
1360
|
+
/**
|
|
1361
|
+
* ChatInput Actions is a container for the actions, like send button and recording button.
|
|
1362
|
+
*/
|
|
1363
|
+
Actions: React.FC<ChatInputActionsProps>;
|
|
1364
|
+
/**
|
|
1365
|
+
* ChatInput Field textarea component.
|
|
1366
|
+
*/
|
|
1367
|
+
Field: React.ForwardRefExoticComponent<ChatInputFieldBaseProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
1368
|
+
/**
|
|
1369
|
+
* ChatInput Popover provides pre-configured popover settings for upload actions.
|
|
1370
|
+
*/
|
|
1371
|
+
Popover: React.FC<ChatInputPopoverProps>;
|
|
1372
|
+
/**
|
|
1373
|
+
* ChatInput PopoverButton is a pre-styled button for popover menu items.
|
|
1374
|
+
*/
|
|
1375
|
+
PopoverButton: React.FC<ChatInputPopoverButtonProps>;
|
|
1376
|
+
}
|
|
1377
|
+
export interface ChatInputProperties {
|
|
1378
|
+
/**
|
|
1379
|
+
* Content to be rendered inside ChatInput, usually `ChatInput.Actions` and `ChatInput.Field`.
|
|
1380
|
+
* @TJS-type React.ReactNode
|
|
1381
|
+
*/
|
|
1382
|
+
children: ReactNode;
|
|
1383
|
+
/**
|
|
1384
|
+
* Whether the ChatInput is focused for AI states.
|
|
1385
|
+
*/
|
|
1386
|
+
aiFocused?: boolean;
|
|
1387
|
+
}
|
|
1388
|
+
export type ChatInputProps = ChatInputProperties & Omit<BoxProperties, "children" | "display"> & HTMLAttributes<HTMLElement>;
|
|
1389
|
+
export declare const ChatInput: React.FC<ChatInputProps> & ChatInputComponents;
|
|
1314
1390
|
export interface MenuExpandContextValue {
|
|
1315
1391
|
/** True when the menu is expanded; false when collapsed. */
|
|
1316
1392
|
expanded: boolean;
|