@fluityy/designsystem 0.2.20 → 0.2.22

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.
@@ -0,0 +1,25 @@
1
+ import { InputProps } from '../Input/Input';
2
+ import { AiActionItem } from './AiActionsMenu';
3
+ export type AiRefineInputVariant = "icon" | "label" | "menu";
4
+ export interface AiRefineInputProps extends Omit<InputProps, "onChange"> {
5
+ /**
6
+ * Variante de ação inline.
7
+ * - `icon`: apenas ícone sparkle (compacto)
8
+ * - `label`: botão "Refinar" com ícone + texto
9
+ * - `menu`: botão "Refinar" + menu de ações
10
+ */
11
+ variant?: AiRefineInputVariant;
12
+ /** Callback chamado ao clicar em Refinar. Retorne o texto refinado (ou Promise). */
13
+ onRefine?: (currentValue: string) => string | Promise<string>;
14
+ /** Callback de ação do menu (variante `menu`). Recebe o id da ação. */
15
+ onMenuAction?: (id: string) => void;
16
+ /** Itens customizados do menu (variante `menu`). */
17
+ menuItems?: AiActionItem[];
18
+ /** Label do botão/tooltip de refine. */
19
+ refineLabel?: string;
20
+ /** Callback nativo onChange — recebe a string do valor (não o evento). */
21
+ onChange?: (value: string) => void;
22
+ /** Callback nativo para compatibilidade com inputs controlados via evento. */
23
+ onChangeEvent?: React.ChangeEventHandler<HTMLInputElement>;
24
+ }
25
+ export declare const AiRefineInput: import('react').ForwardRefExoticComponent<AiRefineInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,26 @@
1
+ import { TextareaProps } from '../Textarea/Textarea';
2
+ import { AiActionItem } from './AiActionsMenu';
3
+ import { AiStatusVariant } from './AiStatus';
4
+ export interface AiRefineTextareaProps extends Omit<TextareaProps, "onChange"> {
5
+ /** Callback de refine — recebe o valor atual, deve retornar o texto refinado. */
6
+ onRefine?: (currentValue: string) => string | Promise<string>;
7
+ /** Callback de expand — recebe o valor atual, deve retornar o texto expandido. */
8
+ onExpand?: (currentValue: string) => string | Promise<string>;
9
+ /** Callback de ação do menu. Retorne o texto resultante ou undefined para não alterar. */
10
+ onMenuAction?: (id: string, currentValue: string) => string | Promise<string | undefined> | undefined;
11
+ /** Itens customizados do menu de ações. */
12
+ menuItems?: AiActionItem[];
13
+ /** Exibe o menu de ações. */
14
+ showMenu?: boolean;
15
+ /** Estado de status exibido na toolbar (controlado externamente, se necessário). */
16
+ status?: AiStatusVariant;
17
+ /** Mensagem de status customizada. */
18
+ statusMessage?: string;
19
+ /** Contagem de tokens exibida na toolbar. */
20
+ tokenCount?: number;
21
+ /** Callback de mudança — recebe a string do valor (não o evento). */
22
+ onChange?: (value: string) => void;
23
+ /** Callback nativo para compatibilidade com formulários controlados via evento. */
24
+ onChangeEvent?: React.ChangeEventHandler<HTMLTextAreaElement>;
25
+ }
26
+ export declare const AiRefineTextarea: import('react').ForwardRefExoticComponent<AiRefineTextareaProps & import('react').RefAttributes<HTMLTextAreaElement>>;
@@ -5,7 +5,9 @@ export * from './AiActionsMenu';
5
5
  export * from './AiStatus';
6
6
  export * from './AiSuggestionChip';
7
7
  export * from './AiInputActions';
8
+ export * from './AiRefineInput';
8
9
  export * from './AiTextareaToolbar';
10
+ export * from './AiRefineTextarea';
9
11
  export * from './PromptComposer';
10
12
  export * from './AiMessage';
11
13
  export * from './AiThinking';