@oniratec/onira-react-ui 1.2.0 → 1.2.2
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.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -65
- package/dist/index.js +868 -1152
- package/dist/index.js.map +1 -1
- package/dist/styles.css +3 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -174,16 +174,12 @@ declare type CustomField<T extends FieldValues> = BaseFieldCommon<T> & {
|
|
|
174
174
|
}) => ReactNode;
|
|
175
175
|
};
|
|
176
176
|
|
|
177
|
-
export declare const darkTheme: Theme;
|
|
178
|
-
|
|
179
177
|
export declare function DataTable<T>({ columns, data, enableSorting, sortState, defaultSortState, onSortChange, unsortedIcon, sortMode, manualSorting, emptyContent, loadingContent, errorContent, isLoading, }: Props<T>): JSX.Element;
|
|
180
178
|
|
|
181
179
|
declare type DataTableProps<T> = Parameters<typeof DataTable<T>>[0];
|
|
182
180
|
|
|
183
181
|
declare type DataTableRenderProps<T> = Omit<DataTableProps<T>, 'columns' | 'data'>;
|
|
184
182
|
|
|
185
|
-
export declare const defaultTheme: Theme;
|
|
186
|
-
|
|
187
183
|
declare interface DefaultValuesContext<TEntity> {
|
|
188
184
|
entity?: TEntity;
|
|
189
185
|
}
|
|
@@ -244,7 +240,7 @@ declare interface FieldProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
|
244
240
|
|
|
245
241
|
export declare const FilePicker: typeof FileUpload;
|
|
246
242
|
|
|
247
|
-
export declare function FileUpload({ label, helperText, error, disabled, multiple, accept, files, defaultFiles, onFilesChange, id, name, allowDrop, placeholder, }: FileUploadProps): JSX.Element;
|
|
243
|
+
export declare function FileUpload({ label, helperText, error, disabled, multiple, accept, files, defaultFiles, onFilesChange, id, name, allowDrop, placeholder, showPreview, previewMode, maxPreviewItems, }: FileUploadProps): JSX.Element;
|
|
248
244
|
|
|
249
245
|
declare type FileUploadField<T extends FieldValues> = BaseFieldCommon<T> & {
|
|
250
246
|
kind: 'fileUpload';
|
|
@@ -269,6 +265,9 @@ export declare type FileUploadProps = {
|
|
|
269
265
|
name?: string;
|
|
270
266
|
allowDrop?: boolean;
|
|
271
267
|
placeholder?: string;
|
|
268
|
+
showPreview?: boolean;
|
|
269
|
+
previewMode?: 'auto' | 'image' | 'none';
|
|
270
|
+
maxPreviewItems?: number;
|
|
272
271
|
};
|
|
273
272
|
|
|
274
273
|
export declare type FilterDefinition<T = unknown> = TextFilter | SelectFilter | AsyncSelectFilter<T> | ToggleFilter;
|
|
@@ -309,10 +308,10 @@ export declare type FiltersModalProps = {
|
|
|
309
308
|
|
|
310
309
|
declare type FiltersModalProps_2 = Parameters<typeof FiltersModal>[0];
|
|
311
310
|
|
|
312
|
-
export declare function FiltersPanel({ filters, value, onChange, onReset, resetLabel, showReset, className, layout, actions, }: FiltersPanelProps): JSX.Element;
|
|
311
|
+
export declare function FiltersPanel<T>({ filters, value, onChange, onReset, resetLabel, showReset, className, layout, actions, }: FiltersPanelProps<T>): JSX.Element;
|
|
313
312
|
|
|
314
|
-
export declare type FiltersPanelProps = {
|
|
315
|
-
filters: FilterDefinition[];
|
|
313
|
+
export declare type FiltersPanelProps<T> = {
|
|
314
|
+
filters: FilterDefinition<T>[];
|
|
316
315
|
value: FiltersState;
|
|
317
316
|
onChange: (next: FiltersState) => void;
|
|
318
317
|
onReset?: () => void;
|
|
@@ -361,8 +360,6 @@ declare type Layout = {
|
|
|
361
360
|
gap?: string;
|
|
362
361
|
};
|
|
363
362
|
|
|
364
|
-
export declare const lightTheme: Theme;
|
|
365
|
-
|
|
366
363
|
export declare const Logo: ({ src, alt, width, height, className, ImageComponent, ...props }: LogoProps) => JSX.Element;
|
|
367
364
|
|
|
368
365
|
export declare type LogoProps = {
|
|
@@ -548,62 +545,13 @@ export declare type TextFilter = BaseFilter & {
|
|
|
548
545
|
value?: string;
|
|
549
546
|
};
|
|
550
547
|
|
|
551
|
-
export declare
|
|
552
|
-
mode: ColorMode;
|
|
553
|
-
colors: ThemeColors;
|
|
554
|
-
shadows: ThemeShadows;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
export declare interface ThemeColors {
|
|
558
|
-
brand: string;
|
|
559
|
-
fill: {
|
|
560
|
-
primary: string;
|
|
561
|
-
secondary: string;
|
|
562
|
-
disabled: string;
|
|
563
|
-
};
|
|
564
|
-
label: {
|
|
565
|
-
primary: string;
|
|
566
|
-
secondary: string;
|
|
567
|
-
disabled: string;
|
|
568
|
-
};
|
|
569
|
-
border: {
|
|
570
|
-
primary: string;
|
|
571
|
-
secondary: string;
|
|
572
|
-
disabled: string;
|
|
573
|
-
};
|
|
574
|
-
focus: string;
|
|
575
|
-
error: string;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
declare interface ThemeContextValue {
|
|
579
|
-
theme: Theme;
|
|
580
|
-
setMode: (mode: ColorMode) => void;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
export declare type ThemePreset = {
|
|
584
|
-
label: string;
|
|
585
|
-
light: Partial<Theme>;
|
|
586
|
-
dark: Partial<Theme>;
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
export declare const themePresets: Record<string, ThemePreset>;
|
|
590
|
-
|
|
591
|
-
export declare function ThemeProvider({ mode, children, customTheme }: ThemeProviderProps): JSX.Element;
|
|
548
|
+
export declare type ThemeName = 'onira' | 'mint' | 'forest' | 'ocean';
|
|
592
549
|
|
|
593
|
-
declare
|
|
550
|
+
export declare function ThemeProvider({ mode, theme, children, }: {
|
|
594
551
|
mode?: ColorMode;
|
|
595
|
-
|
|
552
|
+
theme?: ThemeName;
|
|
596
553
|
children: ReactNode;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
export declare interface ThemeShadows {
|
|
600
|
-
card: {
|
|
601
|
-
sm: string;
|
|
602
|
-
md: string;
|
|
603
|
-
lg: string;
|
|
604
|
-
xl: string;
|
|
605
|
-
};
|
|
606
|
-
}
|
|
554
|
+
}): ReactNode;
|
|
607
555
|
|
|
608
556
|
export declare const Toggle: ({ checked, defaultChecked, onChange, size, disabled, label, className, ariaLabel, }: ToggleProps) => JSX.Element;
|
|
609
557
|
|
|
@@ -641,6 +589,4 @@ export declare const TooltipTrigger: ComponentType<TooltipPrimitive.TooltipTrigg
|
|
|
641
589
|
|
|
642
590
|
export declare function useField(): FieldContextValue;
|
|
643
591
|
|
|
644
|
-
export declare function useTheme(): ThemeContextValue;
|
|
645
|
-
|
|
646
592
|
export { }
|