@pnkx-lib/ui 1.9.41 → 1.9.42

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/types/ui.d.ts CHANGED
@@ -34,8 +34,8 @@ import { FlexProps as FlexProps_2 } from 'antd';
34
34
  import { FormEventHandler } from 'react';
35
35
  import { ForwardRefExoticComponent } from 'react';
36
36
  import { ImageProps } from 'antd';
37
- import { InitialFiltersSearch } from '../../../../../../../../../../../src/components/hooks';
38
- import { JSX } from 'react/jsx-runtime';
37
+ import { InitialFiltersSearch } from '../../../../../../../../../../src/components/hooks';
38
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
39
39
  import { MenuDividerProps } from 'antd/es/menu';
40
40
  import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
41
41
  import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
@@ -77,13 +77,13 @@ import { TitleProps } from 'antd/es/typography/Title';
77
77
  import { TooltipProps as TooltipProps_2 } from 'antd';
78
78
  import { TourProps as TourProps_2 } from 'antd';
79
79
  import { TreeProps as TreeProps_2 } from 'antd';
80
- import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../../src/constants/table';
80
+ import { TypeActionRowTable as TypeActionRowTable_2 } from '../../../../../../../../../../../src/constants/table';
81
81
  import { UseFormReset } from 'react-hook-form';
82
82
  import { UseFormReturn } from 'react-hook-form';
83
83
  import { UseFormSetValue } from 'react-hook-form';
84
84
  import { WatermarkProps } from 'antd';
85
85
 
86
- export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
86
+ export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX_2.Element;
87
87
 
88
88
  export declare interface ActionRowTableProps {
89
89
  type: TypeActionRowTable_2;
@@ -103,7 +103,7 @@ export declare const Anchor: typeof Anchor_2 & {
103
103
 
104
104
  export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
105
105
 
106
- export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
106
+ export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX_2.Element;
107
107
 
108
108
  export declare interface AppfixProps extends AffixProps {
109
109
  children: default_2.ReactNode;
@@ -113,7 +113,7 @@ export declare const AutoComplete: React.FC<AutoCompleteProps>;
113
113
 
114
114
  export declare type AutoCompleteProps = AutoCompleteProps_2;
115
115
 
116
- export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX.Element;
116
+ export declare const Badge: ({ type, children, customColor, ...rest }: BadgeProps) => JSX_2.Element;
117
117
 
118
118
  export declare interface BadgeProps extends BadgeProps_2 {
119
119
  type?: "error" | "info" | "success" | "warning";
@@ -183,7 +183,7 @@ declare type BaseProps_9 = {
183
183
  spaceClassName?: string;
184
184
  };
185
185
 
186
- export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX.Element;
186
+ export declare const Breadcrumb: (props: BreadcrumbPropsUnion) => JSX_2.Element;
187
187
 
188
188
  export declare interface BreadcrumbItemType extends BreadcrumbItemType_2 {
189
189
  children?: Omit<BreadcrumbItemType, "children">[];
@@ -195,7 +195,7 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
195
195
 
196
196
  export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
197
197
 
198
- export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
198
+ export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX_2.Element;
199
199
 
200
200
  export declare interface BulkActionProps {
201
201
  quantity: number;
@@ -215,17 +215,17 @@ export declare const Button: default_2.FC<ButtonProps>;
215
215
 
216
216
  export declare type ButtonProps = ButtonProps_2;
217
217
 
218
- export declare const CascaderField: (props: CascaderFieldProps) => JSX.Element;
218
+ export declare const CascaderField: (props: CascaderFieldProps) => JSX_2.Element;
219
219
 
220
220
  export declare type CascaderFieldProps = BaseProps & (SingleCascaderProps | MultipleCascaderProps);
221
221
 
222
- export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX.Element;
222
+ export declare const CategoryStatus: ({ status }: CategoryStatusProps) => JSX_2.Element;
223
223
 
224
224
  export declare interface CategoryStatusProps {
225
225
  status: number;
226
226
  }
227
227
 
228
- export declare const Col: (props: ColPropsUnion) => JSX.Element;
228
+ export declare const Col: (props: ColPropsUnion) => JSX_2.Element;
229
229
 
230
230
  export declare interface ColProps extends ColProps_2, Partial<Record<Breakpoint, ColSpanType | ColSize>> {
231
231
  }
@@ -243,7 +243,7 @@ declare type CompoundedMenu = FC<MenuComponentProps> & {
243
243
  ItemGroup: typeof ItemGroup;
244
244
  };
245
245
 
246
- export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX.Element;
246
+ export declare const ConfirmModal: ({ title, content, typeIcon, titleCancelBtn, titleSubmitBtn, handleCancel, handleSubmit, ...restProps }: ConfirmModalProps) => JSX_2.Element;
247
247
 
248
248
  export declare interface ConfirmModalProps extends ModalProps {
249
249
  title: string;
@@ -265,7 +265,7 @@ export declare interface ContainerProps {
265
265
  className?: string;
266
266
  }
267
267
 
268
- export declare const Divider: ({ children, ...rest }: DividerProps) => JSX.Element;
268
+ export declare const Divider: ({ children, ...rest }: DividerProps) => JSX_2.Element;
269
269
 
270
270
  declare const Divider_2: FC<MenuDividerProps>;
271
271
 
@@ -273,14 +273,14 @@ export declare interface DividerProps extends DividerProps_2 {
273
273
  children?: ReactNode | string;
274
274
  }
275
275
 
276
- export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX.Element;
276
+ export declare const Drawer: ({ onSubmit, children, ...rest }: DrawerProps) => JSX_2.Element;
277
277
 
278
278
  export declare interface DrawerProps extends DrawerProps_2 {
279
279
  children?: ReactNode;
280
280
  onSubmit?: (values: any) => void;
281
281
  }
282
282
 
283
- export declare const Dropdown: (props: DropdownPropsUnion) => JSX.Element;
283
+ export declare const Dropdown: (props: DropdownPropsUnion) => JSX_2.Element;
284
284
 
285
285
  export declare type DropdownButtonProps = DropdownButtonProps_2;
286
286
 
@@ -314,7 +314,7 @@ export declare interface ErrorBoundaryState {
314
314
  errorInfo: ErrorInfo | null;
315
315
  }
316
316
 
317
- export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
317
+ export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX_2.Element | null>;
318
318
 
319
319
  export declare interface ErrorMessageProps {
320
320
  errorMessage?: string;
@@ -327,19 +327,13 @@ declare type ExtraProps = {
327
327
  menuClassName?: string;
328
328
  };
329
329
 
330
- export declare const Flex: (props: FlexPropsUnion) => JSX.Element;
330
+ export declare const Flex: (props: FlexPropsUnion) => JSX_2.Element;
331
331
 
332
332
  export declare type FlexProps = FlexProps_2;
333
333
 
334
334
  export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
335
335
 
336
- declare interface GroupHeadingButtonItem {
337
- label: string;
338
- value: number;
339
- keyActive: number;
340
- }
341
-
342
- export declare const Heading: (props: HeadingProps) => JSX.Element;
336
+ export declare const Heading: (props: HeadingProps) => JSX_2.Element;
343
337
 
344
338
  export declare interface HeadingProps {
345
339
  rightContent?: ReactNode;
@@ -365,7 +359,7 @@ declare type IValueSearch = {
365
359
  PageSize: number;
366
360
  };
367
361
 
368
- export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
362
+ export declare const Label: ({ label, required }: LabelProps) => JSX_2.Element;
369
363
 
370
364
  export declare interface LabelProps {
371
365
  label: string;
@@ -392,7 +386,7 @@ export declare type MenuItemProps = MenuItemProps_2;
392
386
 
393
387
  export declare type MenuProps = MenuProps_2;
394
388
 
395
- export declare const Modal: ({ children, ...rest }: ModalProps) => JSX.Element;
389
+ export declare const Modal: ({ children, ...rest }: ModalProps) => JSX_2.Element;
396
390
 
397
391
  export declare interface ModalProps extends ModalProps_2 {
398
392
  children?: ReactNode;
@@ -428,13 +422,13 @@ export declare interface PnkxSpinProps extends SpinProps {
428
422
  children?: ReactNode;
429
423
  }
430
424
 
431
- export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX.Element;
425
+ export declare const Popconfirm: ({ children, ...rest }: PopconfirmProps) => JSX_2.Element;
432
426
 
433
427
  export declare interface PopconfirmProps extends PopconfirmProps_2 {
434
428
  children?: ReactNode;
435
429
  }
436
430
 
437
- export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
431
+ export declare const Popover: (props: PopoverPropsUnion) => JSX_2.Element;
438
432
 
439
433
  export declare type PopoverProps = PopoverProps_2;
440
434
 
@@ -446,13 +440,13 @@ export declare type QRCodeProps = QRCodeProps_2;
446
440
 
447
441
  export declare const Rate: React.FC<RateProps>;
448
442
 
449
- export declare const Result: ({ children, ...rest }: ResultProps) => JSX.Element;
443
+ export declare const Result: ({ children, ...rest }: ResultProps) => JSX_2.Element;
450
444
 
451
445
  export declare interface ResultProps extends ResultProps_2 {
452
446
  children?: ReactNode | string;
453
447
  }
454
448
 
455
- export declare const Row: (props: RowPropsUnion) => JSX.Element;
449
+ export declare const Row: (props: RowPropsUnion) => JSX_2.Element;
456
450
 
457
451
  declare interface RowCommon {
458
452
  [x: string]: any;
@@ -460,7 +454,7 @@ declare interface RowCommon {
460
454
 
461
455
  export declare type RowPropsUnion = BaseProps_4 & RowProps;
462
456
 
463
- export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
457
+ export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX_2.Element;
464
458
 
465
459
  export declare interface SearchFiltersFormProps<T extends FieldValues> {
466
460
  renderFilterFields?: (options: {
@@ -482,7 +476,7 @@ export declare const Segmented: React.FC<SegmentedProps>;
482
476
 
483
477
  export declare type SegmentedProps = SegmentedProps_2;
484
478
 
485
- export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX.Element;
479
+ export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX_2.Element;
486
480
 
487
481
  export declare interface SidebarProps {
488
482
  children?: React.ReactNode;
@@ -503,7 +497,7 @@ declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
503
497
  multiple?: false;
504
498
  };
505
499
 
506
- export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX.Element;
500
+ export declare const Skeleton: ({ type, skeletonButtonCount }: SkeletonProps) => JSX_2.Element;
507
501
 
508
502
  export declare interface SkeletonProps extends SkeletonProps_2 {
509
503
  type?: "table" | "form";
@@ -518,7 +512,7 @@ export declare const Space: typeof Space_2;
518
512
 
519
513
  export declare type SpacePropsUnion = BaseProps_9 & SpaceProps;
520
514
 
521
- export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX.Element;
515
+ export declare const Spin: ({ children, ...rest }: PnkxSpinProps) => JSX_2.Element;
522
516
 
523
517
  export declare const Splitter: typeof Splitter_2;
524
518
 
@@ -553,7 +547,7 @@ declare type TabItem = {
553
547
  disabled?: boolean;
554
548
  };
555
549
 
556
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, resetToInitialFilters, handleSearch, groupHeadingButtonItems, tagSearchItems, setTagSearchItems, setKeyActive, keyActive, status, ...rest }: TableCommonProps<T>) => JSX.Element;
550
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, resetToInitialFilters, handleSearch, tagSearchItems, setTagSearchItems, renderHeadingSearch, rightHeadingContent, status, ...rest }: TableCommonProps<T>) => JSX_2.Element;
557
551
 
558
552
  export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
559
553
 
@@ -582,11 +576,10 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
582
576
  setColumns?: (newColumns: TableColumnsType<T>) => void;
583
577
  resetToInitialFilters: () => void;
584
578
  handleSearch: (nextFilters: InitialFiltersSearch<IValueSearch>) => void;
585
- groupHeadingButtonItems: GroupHeadingButtonItem[];
586
579
  tagSearchItems?: string[];
587
580
  setTagSearchItems?: (value: string[]) => void;
588
- setKeyActive: (value: string | number) => void;
589
- keyActive: string | number;
581
+ renderHeadingSearch: (filters: InitialFiltersSearch<IValueSearch>, handleSearch: (nextFilters: InitialFiltersSearch<IValueSearch>) => void, resetToInitialFilters: () => void) => JSX.Element;
582
+ rightHeadingContent: ReactNode;
590
583
  status?: number;
591
584
  }
592
585
 
@@ -640,11 +633,11 @@ export declare enum TypeActionRowTable {
640
633
  export declare const typeColorMap: Record<NonNullable<BadgeProps["type"]>, string>;
641
634
 
642
635
  export declare const Typography: {
643
- Title: (props: TitleProps) => JSX.Element;
644
- Paragraph: (props: ParagraphProps) => JSX.Element;
645
- Text: (props: TextProps) => JSX.Element;
636
+ Title: (props: TitleProps) => JSX_2.Element;
637
+ Paragraph: (props: ParagraphProps) => JSX_2.Element;
638
+ Text: (props: TextProps) => JSX_2.Element;
646
639
  };
647
640
 
648
- export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX.Element;
641
+ export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
649
642
 
650
643
  export { }
@@ -1,53 +0,0 @@
1
- import { g as get, j as jsxRuntimeExports, T as Typography, E as ErrorMessage } from './Switch-5fY0eC69.js';
2
- import { Radio } from 'antd';
3
-
4
- const RadioGroup = (props) => {
5
- //! State
6
- const {
7
- field,
8
- formState,
9
- customStyleRadio,
10
- customStyleWrap = "",
11
- afterOnChange,
12
- options,
13
- ...restProps
14
- } = props;
15
- const { name, value, onChange } = field || {};
16
- const { touchedFields, errors, isSubmitted } = formState || {};
17
- const isTouched = get(touchedFields, name);
18
- const errorMessage = get(errors, name)?.message;
19
- //! Function
20
- const handleChange = (e) => {
21
- onChange?.(e);
22
- afterOnChange?.(e?.target?.value);
23
- };
24
- const renderErrorMessage = () => {
25
- if (!errorMessage) return null;
26
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
27
- ErrorMessage,
28
- {
29
- errorMessage,
30
- isTouched,
31
- isSubmitted
32
- }
33
- );
34
- };
35
- //! Render
36
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleWrap, children: [
37
- /* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Group, { onChange: handleChange, value, ...restProps, children: options.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
38
- Radio,
39
- {
40
- value: item.value,
41
- className: customStyleRadio,
42
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
43
- " ",
44
- item.label
45
- ] })
46
- },
47
- `${name}-${item.value}`
48
- )) }),
49
- renderErrorMessage()
50
- ] });
51
- };
52
-
53
- export { RadioGroup as R };