@nar-bus/lena-ui-shared 1.1.0 → 1.1.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/index.d.ts CHANGED
@@ -501,6 +501,39 @@ declare interface CopyButtonProps {
501
501
  value: string;
502
502
  }
503
503
 
504
+ export declare function CreatableComboboxField<TFieldValues extends FieldValues>({ name, control, label, description, required, placeholder, disabled, className, cols, errorHint, options, loading, emptyText, createLabel, }: CreatableComboboxFieldProps<TFieldValues>): JSX.Element;
505
+
506
+ declare interface CreatableComboboxFieldProps<TFieldValues extends FieldValues> {
507
+ name: FieldPath<TFieldValues>;
508
+ control: Control<TFieldValues>;
509
+ label?: string;
510
+ description?: string;
511
+ required?: boolean;
512
+ placeholder?: string;
513
+ disabled?: boolean;
514
+ className?: string;
515
+ cols?: 1 | 2 | 3 | 4 | 6 | 12;
516
+ errorHint?: string;
517
+ /** The list of existing suggestions (strings or {value, label} objects) */
518
+ options: CreatableOption[];
519
+ /** Whether options are currently loading */
520
+ loading?: boolean;
521
+ /** Text shown when no matching options and nothing typed */
522
+ emptyText?: string;
523
+ /**
524
+ * Label template for the "create new" option.
525
+ * Use `{value}` as a placeholder for the typed text.
526
+ * @default '"{value}" ekle'
527
+ */
528
+ createLabel?: string;
529
+ }
530
+
531
+ /** Accepts both plain strings and {value, label} objects */
532
+ declare type CreatableOption = string | {
533
+ value: string | number;
534
+ label: string;
535
+ };
536
+
504
537
  export declare function createDataTableStore(options?: CreateDataTableStoreOptions): UseBoundStore<Omit<StoreApi<DataTableStore>, "setState"> & {
505
538
  setState(nextStateOrUpdater: DataTableStore | Partial<DataTableStore> | ((state: {
506
539
  generalSearch: string;