react-frontend-common-components 0.0.4 → 0.0.9

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
@@ -1,9 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1, { ChangeEventHandler, MouseEventHandler, KeyboardEventHandler } from 'react';
3
- import { TabsProps, BadgeProps, AvatarProps } from 'antd';
3
+ import { TabsProps, BadgeProps, AvatarProps, SelectProps, ListProps, DividerProps, BreadcrumbProps, CarouselProps, TableProps, FloatButtonProps } from 'antd';
4
4
  import { ChartData, ChartOptions } from 'chart.js';
5
5
  import { CollapseProps, CollapsePanelProps } from 'antd/lib/collapse';
6
6
  import { PaginationProps } from 'antd/lib/pagination';
7
+ import { CardProps } from 'antd/lib/card';
8
+ import { ColumnsType } from 'antd/lib/table';
9
+ import { PopoverProps } from 'antd/lib/popover';
7
10
 
8
11
  interface AppInputProps {
9
12
  className?: string;
@@ -234,4 +237,185 @@ interface AppPasswordInputProps {
234
237
  }
235
238
  declare const AppPasswordInput: ({ label, name, value, dataTestId, id, disabled, handleChange, onClick, defaultValue, onPressEnter, className, errorMessage, isAutoFocus, autoComplete, }: AppPasswordInputProps) => react_jsx_runtime.JSX.Element;
236
239
 
237
- export { AppAvatar, AppBackArrow, AppBadge, AppButton, AppChart, AppCheckboxText, AppCollapse, AppCustomLoader, AppImageBox, AppInput, AppLocationMap, AppModal, AppOtpField, AppPagination, AppPasswordInput, Sidebar as AppSidebar, AppTab, AppTextarea, OverViewCard };
240
+ interface TitleProps {
241
+ mainText: string;
242
+ className?: string;
243
+ subText?: string;
244
+ level?: 1 | 2 | 3 | 4 | 5;
245
+ }
246
+ declare const AppTitle: ({ mainText, className, subText, level, }: TitleProps) => react_jsx_runtime.JSX.Element;
247
+
248
+ interface AppToggleButtonProps {
249
+ initialChecked?: boolean;
250
+ onChange?: (checked: boolean) => void;
251
+ checkedLabel?: string;
252
+ uncheckedLabel?: string;
253
+ className?: string;
254
+ }
255
+ declare const AppToggleButton: ({ initialChecked, onChange, checkedLabel, uncheckedLabel, className, }: AppToggleButtonProps) => react_jsx_runtime.JSX.Element;
256
+
257
+ interface AppUploadImageProps {
258
+ className?: string;
259
+ uploadIcon?: React$1.ReactNode;
260
+ value?: string;
261
+ text?: string;
262
+ onFileChange?: (file: File | null) => void;
263
+ alertMessages?: {
264
+ invalidType?: string;
265
+ sizeExceed?: string;
266
+ };
267
+ acceptedFormats?: string[];
268
+ maxSizeMb?: number;
269
+ altText?: string;
270
+ }
271
+ declare const AppUploadImage: ({ className, uploadIcon, value, text, onFileChange, alertMessages, acceptedFormats, maxSizeMb, altText, }: AppUploadImageProps) => react_jsx_runtime.JSX.Element;
272
+
273
+ interface Option {
274
+ value: number;
275
+ text: string;
276
+ }
277
+ interface AppRadioGroupProps {
278
+ options: Option[];
279
+ selectedValue: number | null;
280
+ onChange: (value: number) => void;
281
+ className?: string;
282
+ }
283
+ declare const AppRadioGroup: ({ options, selectedValue, onChange, className, }: AppRadioGroupProps) => react_jsx_runtime.JSX.Element;
284
+
285
+ interface AppSelectProps {
286
+ className?: string;
287
+ value?: string | null;
288
+ dataTestId?: string;
289
+ id?: string;
290
+ disabled?: boolean;
291
+ handleChange?: (value: string | string[]) => void;
292
+ onClick?: MouseEventHandler<HTMLElement>;
293
+ options?: Array<{
294
+ value: string;
295
+ label: string;
296
+ }>;
297
+ onSelectChange?: (value: string) => void;
298
+ required?: boolean;
299
+ placeholder?: string;
300
+ errorMessage?: string;
301
+ }
302
+ declare const AppSelect: ({ value, handleChange, options, disabled, placeholder, className, errorMessage, }: AppSelectProps) => react_jsx_runtime.JSX.Element;
303
+
304
+ interface AppSelectAddProps extends SelectProps {
305
+ options?: SelectProps["options"];
306
+ placeholder?: string;
307
+ onChange?: (value: string) => void;
308
+ className?: string;
309
+ }
310
+ declare const AppSelectAdd: ({ options, placeholder, onChange, className, ...rest }: AppSelectAddProps) => react_jsx_runtime.JSX.Element;
311
+
312
+ interface AppTagProps {
313
+ color?: string;
314
+ closable?: boolean;
315
+ onClick?: (e: React$1.MouseEvent<HTMLElement, MouseEvent>) => void;
316
+ style?: React$1.CSSProperties;
317
+ className?: string;
318
+ children: React$1.ReactNode;
319
+ closeIcon?: React$1.ReactNode;
320
+ }
321
+ declare const AppTag: ({ color, closable, onClick, style, className, children, closeIcon, }: AppTagProps) => react_jsx_runtime.JSX.Element | null;
322
+
323
+ interface AppListProps<T> extends ListProps<T> {
324
+ renderItem: (item: T, index: number) => React$1.ReactNode;
325
+ className?: string;
326
+ }
327
+ declare const AppList: <T extends unknown>({ renderItem, dataSource, className, ...props }: AppListProps<T>) => react_jsx_runtime.JSX.Element;
328
+
329
+ type LoaderType = "spinner" | "skeleton" | "custom";
330
+ interface AppLoaderProps {
331
+ type?: LoaderType;
332
+ customLoader?: React$1.ReactNode;
333
+ className?: string;
334
+ }
335
+ declare const AppLoader: ({ type, customLoader, className }: AppLoaderProps) => string | number | true | Iterable<React$1.ReactNode> | react_jsx_runtime.JSX.Element;
336
+
337
+ interface AppDividerProps extends DividerProps {
338
+ className?: string;
339
+ }
340
+ declare const AppDivider: ({ className, ...props }: AppDividerProps) => react_jsx_runtime.JSX.Element;
341
+
342
+ interface AppLabelProps {
343
+ text: string;
344
+ htmlFor?: string;
345
+ color?: string;
346
+ fontSize?: string;
347
+ className?: string;
348
+ }
349
+ declare const AppLabel: ({ text, htmlFor, color, fontSize, className, }: AppLabelProps) => react_jsx_runtime.JSX.Element;
350
+
351
+ interface AppBreadcrumbProps extends BreadcrumbProps {
352
+ className?: string;
353
+ }
354
+ declare const AppBreadcrumb: ({ className, ...props }: AppBreadcrumbProps) => react_jsx_runtime.JSX.Element;
355
+
356
+ interface AppCardProps extends CardProps {
357
+ title?: React$1.ReactNode;
358
+ extra?: React$1.ReactNode;
359
+ cover?: React$1.ReactNode;
360
+ hoverable?: boolean;
361
+ actions?: React$1.ReactNode[];
362
+ className?: string;
363
+ borderless?: boolean;
364
+ }
365
+ declare const AppCard: ({ title, extra, cover, hoverable, actions, className, borderless, ...cardProps }: AppCardProps) => react_jsx_runtime.JSX.Element;
366
+
367
+ interface AppCarouselProps extends CarouselProps {
368
+ items: React$1.ReactNode[];
369
+ className?: string;
370
+ nxtIcon?: React$1.ReactNode;
371
+ prevIcon?: React$1.ReactNode;
372
+ showIcon?: boolean;
373
+ showDots?: boolean;
374
+ showLines?: boolean;
375
+ autoplay?: boolean;
376
+ }
377
+ declare const AppCarousel: ({ items, className, nxtIcon, prevIcon, showIcon, showDots, autoplay, ...rest }: AppCarouselProps) => react_jsx_runtime.JSX.Element;
378
+
379
+ interface AppTableProps<T> extends TableProps<T> {
380
+ columns: ColumnsType<T>;
381
+ dataSource: T[];
382
+ rowKey?: string;
383
+ bordered?: boolean;
384
+ pagination?: TableProps<T>["pagination"];
385
+ size?: "small" | "middle" | "large";
386
+ scroll?: TableProps<T>["scroll"];
387
+ className?: string;
388
+ }
389
+ declare const AppTable: <T extends object>({ columns, dataSource, rowKey, bordered, pagination, size, scroll, className, ...tableProps }: AppTableProps<T>) => react_jsx_runtime.JSX.Element;
390
+
391
+ interface AppProgressProps {
392
+ percent: number;
393
+ type?: "line" | "circle" | "dashboard";
394
+ strokeColor?: string;
395
+ trailColor?: string;
396
+ size?: "default" | "small";
397
+ status?: "success" | "exception" | "normal" | "active";
398
+ showInfo?: boolean;
399
+ className?: string;
400
+ }
401
+ declare const AppProgress: ({ percent, type, strokeColor, trailColor, size, status, showInfo, className, }: AppProgressProps) => react_jsx_runtime.JSX.Element;
402
+
403
+ interface AppPopoverProps extends PopoverProps {
404
+ content: React.ReactNode;
405
+ title?: React.ReactNode;
406
+ children: React.ReactNode;
407
+ bgColor?: string;
408
+ triggerType?: "hover" | "click";
409
+ color?: string;
410
+ className?: string;
411
+ }
412
+ declare const AppPopover: ({ content, title, children, bgColor, color, triggerType, className, ...popoverProps }: AppPopoverProps) => react_jsx_runtime.JSX.Element;
413
+
414
+ interface AppFloatButtonProps extends FloatButtonProps {
415
+ className?: string;
416
+ onClick?: React$1.MouseEventHandler<HTMLButtonElement>;
417
+ onMouseEnter?: React$1.MouseEventHandler<HTMLButtonElement>;
418
+ }
419
+ declare const AppFloatButton: ({ className, onClick, onMouseEnter, ...props }: AppFloatButtonProps) => react_jsx_runtime.JSX.Element;
420
+
421
+ export { AppAvatar, AppBackArrow, AppBadge, AppBreadcrumb, AppButton, AppCard, AppCarousel, AppChart, AppCheckboxText, AppCollapse, AppCustomLoader, AppDivider, AppFloatButton, AppImageBox, AppInput, AppLabel, AppList, AppLoader, AppLocationMap, AppModal, AppOtpField, AppPagination, AppPasswordInput, AppPopover, AppProgress, AppRadioGroup, AppSelect, AppSelectAdd, Sidebar as AppSidebar, AppTab, AppTable, AppTag, AppTextarea, AppTitle, AppToggleButton, AppUploadImage, OverViewCard };