@nimbus-ds/patterns 1.20.1 → 1.21.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.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,83 @@ 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
+ contentProperties?: Omit<BoxProperties, "children" | "display" | "flexDirection" | "gap">;
1337
+ /**
1338
+ * The trigger element that opens the popover, usually an IconButton.
1339
+ * @TJS-type React.ReactNode
1340
+ */
1341
+ children: ReactNode;
1342
+ }
1343
+ export type ChatInputPopoverProps = ChatInputPopoverProperties & Omit<PopoverProperties, "content" | "children" | "arrow" | "position" | "padding" | "color">;
1344
+ export interface ChatInputPopoverButtonProperties {
1345
+ /**
1346
+ * Icon element to be displayed before the text.
1347
+ * @TJS-type React.ReactNode
1348
+ */
1349
+ icon?: ReactNode;
1350
+ /**
1351
+ * The text content of the button.
1352
+ */
1353
+ text: ReactNode;
1354
+ /**
1355
+ * Click handler for the button.
1356
+ */
1357
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
1358
+ }
1359
+ export type ChatInputPopoverButtonProps = ChatInputPopoverButtonProperties & Omit<BoxProperties, "children" | "as" | "type" | "cursor" | "borderWidth" | "color" | "display" | "alignItems" | "gap" | "p" | "borderRadius" | "onClick">;
1360
+ export interface ChatInputComponents {
1361
+ /**
1362
+ * ChatInput Actions is a container for the actions, like send button and recording button.
1363
+ */
1364
+ Actions: React.FC<ChatInputActionsProps>;
1365
+ /**
1366
+ * ChatInput Field textarea component.
1367
+ */
1368
+ Field: React.ForwardRefExoticComponent<ChatInputFieldBaseProps & React.RefAttributes<HTMLTextAreaElement>>;
1369
+ /**
1370
+ * ChatInput Popover provides pre-configured popover settings for upload actions.
1371
+ */
1372
+ Popover: React.FC<ChatInputPopoverProps>;
1373
+ /**
1374
+ * ChatInput PopoverButton is a pre-styled button for popover menu items.
1375
+ */
1376
+ PopoverButton: React.FC<ChatInputPopoverButtonProps>;
1377
+ }
1378
+ export interface ChatInputProperties {
1379
+ /**
1380
+ * Content to be rendered inside ChatInput, usually `ChatInput.Actions` and `ChatInput.Field`.
1381
+ * @TJS-type React.ReactNode
1382
+ */
1383
+ children: ReactNode;
1384
+ /**
1385
+ * Whether the ChatInput is focused for AI states.
1386
+ */
1387
+ aiFocused?: boolean;
1388
+ }
1389
+ export type ChatInputProps = ChatInputProperties & Omit<BoxProperties, "children" | "display"> & HTMLAttributes<HTMLElement>;
1390
+ export declare const ChatInput: React.FC<ChatInputProps> & ChatInputComponents;
1314
1391
  export interface MenuExpandContextValue {
1315
1392
  /** True when the menu is expanded; false when collapsed. */
1316
1393
  expanded: boolean;