@nar-bus/lena-ui-shared 1.0.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
@@ -114,12 +114,14 @@ export declare interface ApiResponse<T> {
114
114
  meta: MetaInfo;
115
115
  }
116
116
 
117
- export declare function AppHeader({ breadcrumbs, theme, onThemeChange, user, isAuthenticated, onLogout, onLogin, homeHref, className, }: AppHeaderProps): JSX.Element;
117
+ export declare function AppHeader({ breadcrumbs, theme, onThemeChange, locale, onLocaleChange, user, isAuthenticated, onLogout, onLogin, homeHref, className, }: AppHeaderProps): JSX.Element;
118
118
 
119
119
  export declare interface AppHeaderProps {
120
120
  breadcrumbs: BreadcrumbItem[];
121
121
  theme: 'light' | 'dark' | 'system';
122
122
  onThemeChange: (theme: 'light' | 'dark' | 'system') => void;
123
+ locale?: string;
124
+ onLocaleChange?: (locale: string) => void;
123
125
  user?: AppHeaderUser | null;
124
126
  isAuthenticated?: boolean;
125
127
  onLogout: () => void;
@@ -499,6 +501,39 @@ declare interface CopyButtonProps {
499
501
  value: string;
500
502
  }
501
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
+
502
537
  export declare function createDataTableStore(options?: CreateDataTableStoreOptions): UseBoundStore<Omit<StoreApi<DataTableStore>, "setState"> & {
503
538
  setState(nextStateOrUpdater: DataTableStore | Partial<DataTableStore> | ((state: {
504
539
  generalSearch: string;