laif-ds 1.1.2 → 1.1.4

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
@@ -310,7 +310,7 @@ export declare interface AppDialogProps extends Omit<DialogContentProps, "title"
310
310
  preventClose?: "overlay" | "all";
311
311
  }
312
312
 
313
- export declare function AppEditor({ defaultValue, onMarkdownEdit, onValueChange, plugins, toolbars, placeholder, onlyMarkdown, className, wrpClassName, mentions, mentionTrigger, }: AppEditorProps): JSX.Element;
313
+ export declare const AppEditor: ForwardRefExoticComponent<AppEditorProps & RefAttributes<AppEditorHandle>>;
314
314
 
315
315
  /** Metadata emitted alongside the markdown on every change. */
316
316
  export declare interface AppEditorChangeMeta {
@@ -318,6 +318,16 @@ export declare interface AppEditorChangeMeta {
318
318
  mentions: MentionItem[];
319
319
  }
320
320
 
321
+ /** Imperative API exposed through the `ref` of `AppEditor`. */
322
+ export declare interface AppEditorHandle {
323
+ /**
324
+ * Inserts a hyperlink at the caret (or at the end of the text when the editor
325
+ * has no selection) and leaves the caret right after it. Serializes to
326
+ * `[text](url)`; `text` defaults to the URL itself.
327
+ */
328
+ insertLink: (url: string, text?: string) => void;
329
+ }
330
+
321
331
  export declare type AppEditorPlugin = "clear" | "counter";
322
332
 
323
333
  export declare interface AppEditorProps {
@@ -352,7 +362,7 @@ export declare interface AppEditorProps {
352
362
  mentionTrigger?: string;
353
363
  }
354
364
 
355
- export declare type AppEditorToolbar = "block-format" | "font-format" | "history";
365
+ export declare type AppEditorToolbar = "block-format" | "font-format" | "history" | "link";
356
366
 
357
367
  export declare const AppForm: <TFormValues extends FieldValues = FieldValues, TAsyncOption = unknown>({ items, cols, form, submitText, onSubmit, isSubmitting, showSubmitButton, }: AppFormProps<TFormValues, TAsyncOption>) => JSX.Element;
358
368
 
@@ -613,9 +623,18 @@ export declare interface AppRadioGroupProps {
613
623
 
614
624
  export declare function AppSelect(props: AppSelectProps): JSX.Element;
615
625
 
626
+ /**
627
+ * Any other HTML attribute (aria-*, data-*, title, event handlers, style…) is
628
+ * forwarded to the trigger. Excluded: the component's own props, attributes
629
+ * the trigger needs to work as a combobox (role, tabIndex, the aria state Radix
630
+ * and the component manage), and div attributes that clash with the select API.
631
+ */
632
+ declare type AppSelectHTMLProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof OwnBaseProps | "children" | "dangerouslySetInnerHTML" | "contentEditable" | "defaultValue" | "defaultChecked" | "onChange" | "role" | "tabIndex" | "aria-expanded" | "aria-haspopup" | "aria-controls" | "aria-disabled" | "aria-required">;
633
+
616
634
  export declare interface AppSelectOption {
617
635
  value: string | number;
618
636
  label: string | React.ReactNode;
637
+ keywords?: string[];
619
638
  disabled?: boolean;
620
639
  group?: string;
621
640
  fixed?: boolean;
@@ -896,33 +915,7 @@ declare type BaseColumnFields = {
896
915
  headerClassName?: string;
897
916
  } & HeaderConfig;
898
917
 
899
- declare type BaseProps = {
900
- options: AppSelectOption[];
901
- placeholder?: string;
902
- searchPlaceholder?: string;
903
- emptyPlaceholder?: string;
904
- addItemPlaceholder?: string;
905
- noGroupLabel?: string;
906
- itemCountMessage?: (selected: number) => string;
907
- maxSelectedMessage?: (max: number) => string;
908
- label?: string | React.ReactNode;
909
- className?: string;
910
- labelClassName?: string;
911
- wrpClassName?: string;
912
- searchable?: boolean;
913
- creatable?: boolean;
914
- isSingleSelectClearable?: boolean;
915
- disabled?: boolean;
916
- maxSelected?: number;
917
- showChipsInsteadOfCount?: boolean;
918
- size?: SelectSizeType;
919
- onClear?: () => void;
920
- id?: string;
921
- "data-testid"?: string;
922
- "aria-label"?: string;
923
- "aria-labelledby"?: string;
924
- portalContainer?: HTMLElement | null;
925
- };
918
+ declare type BaseProps = OwnBaseProps & AppSelectHTMLProps;
926
919
 
927
920
  export declare interface BottomNavItem {
928
921
  /**
@@ -8491,6 +8484,36 @@ declare interface Option_3 {
8491
8484
  [key: string]: string | boolean | undefined;
8492
8485
  }
8493
8486
 
8487
+ declare type OwnBaseProps = {
8488
+ options: AppSelectOption[];
8489
+ placeholder?: string;
8490
+ searchPlaceholder?: string;
8491
+ emptyPlaceholder?: string;
8492
+ addItemPlaceholder?: string;
8493
+ noGroupLabel?: string;
8494
+ itemCountMessage?: (selected: number) => string;
8495
+ maxSelectedMessage?: (max: number) => string;
8496
+ label?: string | React.ReactNode;
8497
+ className?: string;
8498
+ labelClassName?: string;
8499
+ wrpClassName?: string;
8500
+ searchable?: boolean;
8501
+ creatable?: boolean;
8502
+ isSingleSelectClearable?: boolean;
8503
+ disabled?: boolean;
8504
+ maxSelected?: number;
8505
+ showChipsInsteadOfCount?: boolean;
8506
+ size?: SelectSizeType;
8507
+ onClear?: () => void;
8508
+ required?: boolean;
8509
+ "aria-invalid"?: boolean;
8510
+ id?: string;
8511
+ "data-testid"?: string;
8512
+ "aria-label"?: string;
8513
+ "aria-labelledby"?: string;
8514
+ portalContainer?: HTMLElement | null;
8515
+ };
8516
+
8494
8517
  export declare function Pagination({ className, ...props }: React_2.ComponentProps<"nav">): JSX.Element;
8495
8518
 
8496
8519
  export declare function PaginationContent({ className, ...props }: React_2.ComponentProps<"ul">): JSX.Element;