@pnkx-lib/ui 1.9.119 → 1.9.121

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.
Files changed (140) hide show
  1. package/package.json +1 -1
  2. package/types/App.d.ts +2 -0
  3. package/types/DemoInput/DemoInput.d.ts +1 -0
  4. package/types/DemoTable/FiltersCategoryDemo/components/RenderFilterFields.d.ts +12 -0
  5. package/types/DemoTable/FiltersCategoryDemo/components/TagsFilter.d.ts +12 -0
  6. package/types/DemoTable/FiltersCategoryDemo/index.d.ts +8 -0
  7. package/types/DemoTable/apiUser.d.ts +30 -0
  8. package/types/DemoTable/hooks/useConvertGroupButton.d.ts +13 -0
  9. package/types/DemoTable/index.d.ts +2 -0
  10. package/types/DemoTable/tabDemo.d.ts +2 -0
  11. package/types/assets/svg/404.d.ts +2 -0
  12. package/types/assets/svg/Flag.d.ts +2 -0
  13. package/types/assets/svg/Logout.d.ts +2 -0
  14. package/types/assets/svg/Search.d.ts +2 -0
  15. package/types/assets/svg/Setting.d.ts +2 -0
  16. package/types/components/index.d.ts +3 -0
  17. package/types/constants/common.d.ts +1 -0
  18. package/types/constants/index.d.ts +2 -0
  19. package/types/constants/table.d.ts +32 -0
  20. package/types/fields.d.ts +1 -1
  21. package/types/helpers/common.d.ts +1 -0
  22. package/types/hooks.d.ts +1 -1
  23. package/types/index.d.ts +2 -3
  24. package/types/interface/common.d.ts +8 -0
  25. package/types/interface/tab.d.ts +5 -0
  26. package/types/main.d.ts +0 -0
  27. package/types/stores/tabStore.d.ts +6 -0
  28. package/types/stories/Input.stories.d.ts +6 -0
  29. package/types/ui.d.ts +1 -1
  30. package/types/utils/router.d.ts +35 -0
  31. package/types/utils/timer.d.ts +7 -0
  32. package/types/vite-env.d.ts +1 -0
  33. /package/types/{fields → components/fields}/CascaderField.d.ts +0 -0
  34. /package/types/{fields → components/fields}/Checkbox.d.ts +0 -0
  35. /package/types/{fields → components/fields}/DatePicker.d.ts +0 -0
  36. /package/types/{fields → components/fields}/DateRangePicker.d.ts +0 -0
  37. /package/types/{fields → components/fields}/Input.d.ts +0 -0
  38. /package/types/{fields → components/fields}/PnkxField.d.ts +0 -0
  39. /package/types/{fields → components/fields}/Radio.d.ts +0 -0
  40. /package/types/{fields → components/fields}/Select.d.ts +0 -0
  41. /package/types/{fields → components/fields}/Switch.d.ts +0 -0
  42. /package/types/{fields → components/fields}/Textarea.d.ts +0 -0
  43. /package/types/{fields → components/fields}/TinyMCE.d.ts +0 -0
  44. /package/types/{fields → components/fields}/Upload.d.ts +0 -0
  45. /package/types/{fields → components/fields}/index.d.ts +0 -0
  46. /package/types/{hooks → components/hooks}/index.d.ts +0 -0
  47. /package/types/{hooks → components/hooks}/useDebounce.d.ts +0 -0
  48. /package/types/{hooks → components/hooks}/useMessage.d.ts +0 -0
  49. /package/types/{hooks → components/hooks}/useToast.d.ts +0 -0
  50. /package/types/{icons → components/icons}/ActivateIcon.d.ts +0 -0
  51. /package/types/{icons → components/icons}/AllowClearIcon.d.ts +0 -0
  52. /package/types/{icons → components/icons}/ApprovalIcon.d.ts +0 -0
  53. /package/types/{icons → components/icons}/CancelApprovalIcon.d.ts +0 -0
  54. /package/types/{icons → components/icons}/CancelSendApprovalIcon.d.ts +0 -0
  55. /package/types/{icons → components/icons}/DeleteIcon.d.ts +0 -0
  56. /package/types/{icons → components/icons}/DragIcon.d.ts +0 -0
  57. /package/types/{icons → components/icons}/EditIcon.d.ts +0 -0
  58. /package/types/{icons → components/icons}/ErrorConfirmIcon.d.ts +0 -0
  59. /package/types/{icons → components/icons}/InActivateIcon.d.ts +0 -0
  60. /package/types/{icons → components/icons}/InfoConfirmIcon.d.ts +0 -0
  61. /package/types/{icons → components/icons}/MoreIcon.d.ts +0 -0
  62. /package/types/{icons → components/icons}/PlusIcon.d.ts +0 -0
  63. /package/types/{icons → components/icons}/RefuseApprovalIcon.d.ts +0 -0
  64. /package/types/{icons → components/icons}/RestoreIcon.d.ts +0 -0
  65. /package/types/{icons → components/icons}/SearchAdvanceIcon.d.ts +0 -0
  66. /package/types/{icons → components/icons}/SearchIcon.d.ts +0 -0
  67. /package/types/{icons → components/icons}/SendApprovalIcon.d.ts +0 -0
  68. /package/types/{icons → components/icons}/SettingIcon.d.ts +0 -0
  69. /package/types/{icons → components/icons}/SuccessIcon.d.ts +0 -0
  70. /package/types/{icons → components/icons}/TrashCanIcon.d.ts +0 -0
  71. /package/types/{icons → components/icons}/WaitingApprovalIcon.d.ts +0 -0
  72. /package/types/{icons → components/icons}/WarningConfirmIcon.d.ts +0 -0
  73. /package/types/{icons → components/icons}/index.d.ts +0 -0
  74. /package/types/{ui → components/ui}/Alert.d.ts +0 -0
  75. /package/types/{ui → components/ui}/Anchor.d.ts +0 -0
  76. /package/types/{ui → components/ui}/Appfix.d.ts +0 -0
  77. /package/types/{ui → components/ui}/AutoComplete.d.ts +0 -0
  78. /package/types/{ui → components/ui}/Badge.d.ts +0 -0
  79. /package/types/{ui → components/ui}/Breadcrumb.d.ts +0 -0
  80. /package/types/{ui → components/ui}/BreadcrumbHeading.d.ts +0 -0
  81. /package/types/{ui → components/ui}/BulkActions/BulkAction.d.ts +0 -0
  82. /package/types/{ui → components/ui}/BulkActions/DropListActions.d.ts +0 -0
  83. /package/types/{ui → components/ui}/BulkActions/index.d.ts +0 -0
  84. /package/types/{ui → components/ui}/Button.d.ts +0 -0
  85. /package/types/{ui → components/ui}/Card.d.ts +0 -0
  86. /package/types/{ui → components/ui}/Cascader.d.ts +0 -0
  87. /package/types/{ui → components/ui}/CategoryStatus.d.ts +0 -0
  88. /package/types/{ui → components/ui}/Col.d.ts +0 -0
  89. /package/types/{ui → components/ui}/Collapse.d.ts +0 -0
  90. /package/types/{ui → components/ui}/ColorPicker.d.ts +0 -0
  91. /package/types/{ui → components/ui}/ConfirmModal.d.ts +0 -0
  92. /package/types/{ui → components/ui}/Container.d.ts +0 -0
  93. /package/types/{ui → components/ui}/Divider.d.ts +0 -0
  94. /package/types/{ui → components/ui}/Drawer.d.ts +0 -0
  95. /package/types/{ui → components/ui}/Dropdown.d.ts +0 -0
  96. /package/types/{ui → components/ui}/Empty.d.ts +0 -0
  97. /package/types/{ui → components/ui}/ErrorBoundary.d.ts +0 -0
  98. /package/types/{ui → components/ui}/ErrorMessage.d.ts +0 -0
  99. /package/types/{ui → components/ui}/Flex.d.ts +0 -0
  100. /package/types/{ui → components/ui}/Footer.d.ts +0 -0
  101. /package/types/{ui → components/ui}/Heading.d.ts +0 -0
  102. /package/types/{ui → components/ui}/Image.d.ts +0 -0
  103. /package/types/{ui → components/ui}/Label.d.ts +0 -0
  104. /package/types/{ui → components/ui}/Layout.d.ts +0 -0
  105. /package/types/{ui → components/ui}/Menu.d.ts +0 -0
  106. /package/types/{ui → components/ui}/Modal.d.ts +0 -0
  107. /package/types/{ui → components/ui}/Page404.d.ts +0 -0
  108. /package/types/{ui → components/ui}/Pagination.d.ts +0 -0
  109. /package/types/{ui → components/ui}/Popconfirm.d.ts +0 -0
  110. /package/types/{ui → components/ui}/Popover.d.ts +0 -0
  111. /package/types/{ui → components/ui}/QRCode.d.ts +0 -0
  112. /package/types/{ui → components/ui}/Rate.d.ts +0 -0
  113. /package/types/{ui → components/ui}/Result.d.ts +0 -0
  114. /package/types/{ui → components/ui}/Row.d.ts +0 -0
  115. /package/types/{ui → components/ui}/SearchFilterForm.d.ts +0 -0
  116. /package/types/{ui → components/ui}/Segmented.d.ts +0 -0
  117. /package/types/{ui → components/ui}/Sidebar.d.ts +0 -0
  118. /package/types/{ui → components/ui}/Skeleton.d.ts +0 -0
  119. /package/types/{ui → components/ui}/Space.d.ts +0 -0
  120. /package/types/{ui → components/ui}/Spin.d.ts +0 -0
  121. /package/types/{ui → components/ui}/Splitter.d.ts +0 -0
  122. /package/types/{ui → components/ui}/Statistic.d.ts +0 -0
  123. /package/types/{ui → components/ui}/Steps.d.ts +0 -0
  124. /package/types/{ui → components/ui}/Table/ActionRowTable/index.d.ts +0 -0
  125. /package/types/{ui → components/ui}/Table/HeadingTable/components/GroupHeadingButton.d.ts +0 -0
  126. /package/types/{ui → components/ui}/Table/HeadingTable/index.d.ts +0 -0
  127. /package/types/{ui → components/ui}/Table/SettingTable/IconSettingTable.d.ts +0 -0
  128. /package/types/{ui → components/ui}/Table/SettingTable/SettingColumnItem.d.ts +0 -0
  129. /package/types/{ui → components/ui}/Table/SettingTable/SortableItem.d.ts +0 -0
  130. /package/types/{ui → components/ui}/Table/SettingTable/index.d.ts +0 -0
  131. /package/types/{ui → components/ui}/Table/index.d.ts +0 -0
  132. /package/types/{ui → components/ui}/Tabs.d.ts +0 -0
  133. /package/types/{ui → components/ui}/Tag.d.ts +0 -0
  134. /package/types/{ui → components/ui}/Timeline.d.ts +0 -0
  135. /package/types/{ui → components/ui}/Tooltip.d.ts +0 -0
  136. /package/types/{ui → components/ui}/Tour.d.ts +0 -0
  137. /package/types/{ui → components/ui}/Tree.d.ts +0 -0
  138. /package/types/{ui → components/ui}/Typography.d.ts +0 -0
  139. /package/types/{ui → components/ui}/Watermark.d.ts +0 -0
  140. /package/types/{ui → components/ui}/index.d.ts +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.119",
4
+ "version": "1.9.121",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
package/types/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -0,0 +1 @@
1
+ export declare const DemoInput: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { Control, UseFormReset } from 'node_modules/react-hook-form/dist/types';
2
+ import { IValueSearch } from '../../../../../../../../../../../src/components/ui/Table/HeadingTable';
3
+ interface RenderFilterFieldsProps {
4
+ control: Control<IValueSearch>;
5
+ handleSubmit?: React.FormEventHandler<IValueSearch>;
6
+ resetToInitialFilters: () => void;
7
+ reset?: UseFormReset<IValueSearch>;
8
+ isHiddenRemove: boolean;
9
+ isNullFilter: boolean;
10
+ }
11
+ export declare const RenderFilterFields: (props: RenderFilterFieldsProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { UseFormReset } from 'node_modules/react-hook-form/dist/types';
2
+ import { IValueSearch } from '../../../../../../../../../../../src/components/ui/Table/HeadingTable';
3
+ import { InitialFiltersSearch } from '../../../../../../../../../../../src/components';
4
+ interface TagsFilterProps {
5
+ advanceSearch: any;
6
+ resetToInitialFilters: () => void;
7
+ reset?: UseFormReset<IValueSearch>;
8
+ isHiddenRemove: boolean;
9
+ handleSearch: (nextFilters: InitialFiltersSearch<IValueSearch>) => void;
10
+ }
11
+ export declare const TagsFilter: (props: TagsFilterProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ import { InitialFiltersSearch } from '../../../../../../../../../../src/components';
2
+ interface Props {
3
+ filters: InitialFiltersSearch<any>;
4
+ handleSearch: (nextFilters: InitialFiltersSearch<any>) => void;
5
+ resetToInitialFilters: () => void;
6
+ }
7
+ declare const Filters: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export default Filters;
@@ -0,0 +1,30 @@
1
+ export interface ReqResUser {
2
+ id: number;
3
+ title: string;
4
+ slug: string;
5
+ price: string;
6
+ }
7
+ export interface ReqResResponse {
8
+ data: ReqResUser[];
9
+ page: number;
10
+ per_page: number;
11
+ total: number;
12
+ }
13
+ export declare const fetchUsers: (page: number, perPage: number) => Promise<{
14
+ data: ReqResUser[];
15
+ pagination: {
16
+ total: number;
17
+ page: number;
18
+ limit: number;
19
+ totalPages: number;
20
+ };
21
+ }>;
22
+ export declare const fetchUsersNew: (page: number, perPage: number) => Promise<{
23
+ data: ReqResUser[];
24
+ pagination: {
25
+ total: number;
26
+ page: number;
27
+ limit: number;
28
+ totalPages: number;
29
+ };
30
+ }>;
@@ -0,0 +1,13 @@
1
+ import { GroupHeadingButtonItem } from '../../../../../../../../../../src/components/ui/Table/HeadingTable/components/GroupHeadingButton';
2
+ export interface LabelGroupHeadingButtonItem {
3
+ label: string;
4
+ is_status: number;
5
+ }
6
+ export interface QuantityGroupHeadingButtonItem {
7
+ quantity: number;
8
+ is_status: number;
9
+ }
10
+ declare const useConvertGroupButton: (labelGroupHeadingButtonItems: LabelGroupHeadingButtonItem[]) => {
11
+ data: GroupHeadingButtonItem[];
12
+ };
13
+ export default useConvertGroupButton;
@@ -0,0 +1,2 @@
1
+ declare const DemoTable: () => import("react/jsx-runtime").JSX.Element;
2
+ export default DemoTable;
@@ -0,0 +1,2 @@
1
+ declare const TabDemo: () => import("react/jsx-runtime").JSX.Element;
2
+ export default TabDemo;
@@ -0,0 +1,2 @@
1
+ declare const Svg404Notfound: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Svg404Notfound;
@@ -0,0 +1,2 @@
1
+ declare const SvgFlag: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SvgFlag;
@@ -0,0 +1,2 @@
1
+ declare const SvgLogout: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SvgLogout;
@@ -0,0 +1,2 @@
1
+ declare const SvgIconSearch: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SvgIconSearch;
@@ -0,0 +1,2 @@
1
+ declare const SvgSetting: () => import("react/jsx-runtime").JSX.Element;
2
+ export default SvgSetting;
@@ -0,0 +1,3 @@
1
+ export * from './ui';
2
+ export * from './fields';
3
+ export * from './hooks';
@@ -0,0 +1 @@
1
+ export declare const TINY_API = "miai0qn3c79adm555yoxd9kz6j6a323ek760nf7qd81nv1p5";
@@ -0,0 +1,2 @@
1
+ export * from './common';
2
+ export * from './table';
@@ -0,0 +1,32 @@
1
+ export declare const START_PAGE = 1;
2
+ export declare const START_PAGE_SIZE = 10;
3
+ export declare const PAGE_NUMBER = "page";
4
+ export declare const PAGE_SIZE = "size";
5
+ export declare const SORT_BY = "SortBy";
6
+ export declare const SORT_DESC = "SortDesc";
7
+ export declare enum TypeActionRowTable {
8
+ DELETE = "DELETE",
9
+ EDIT = "EDIT",
10
+ UNDO = "UNDO",
11
+ CANCELUNDO = "CANCELUNDO",
12
+ CHECKIN = "CHECKIN",
13
+ PRINT = "PRINT",
14
+ PAYMENT = "PAYMENT",
15
+ PLAY = "PLAY",
16
+ PAUSE = "PAUSE",
17
+ DOWNLOAD = "DOWNLOAD",
18
+ VIEW = "VIEW"
19
+ }
20
+ export declare enum TypeBulkActions {
21
+ BULKACTION = "bulkaction",
22
+ DROPLIST = "droplist"
23
+ }
24
+ export declare enum TypeStatusTable {
25
+ ALL = "ALL",// Tất cả
26
+ DRAFT = 0,// Tạo mới
27
+ WAITING_APPROVAL = 1,// Chờ duyệt
28
+ ACTIVE = 2,// Hoạt động
29
+ INACTIVE = 3,// Ngưng hoạt động
30
+ REJECTED = 4,// Từ chối duyệt
31
+ DELETED = 5
32
+ }
package/types/fields.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './fields/index'
1
+ export * from './components/fields/index'
2
2
  export {}
@@ -0,0 +1 @@
1
+ export declare function hasFalsyFieldsObject<T extends object>(obj: T): boolean;
package/types/hooks.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './hooks/index'
1
+ export * from './components/hooks/index'
2
2
  export {}
package/types/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export * from './ui';
2
- export * from './fields';
3
- export * from './hooks';
1
+ export * from './components/index'
2
+ export {}
@@ -0,0 +1,8 @@
1
+ export interface SelectOption {
2
+ label: string;
3
+ value: any;
4
+ }
5
+ export interface PaginationFilters {
6
+ size: number;
7
+ page: number;
8
+ }
@@ -0,0 +1,5 @@
1
+ export interface TabItem {
2
+ key: string;
3
+ label: string;
4
+ children: React.ReactNode;
5
+ }
File without changes
@@ -0,0 +1,6 @@
1
+ type TabState = {
2
+ activeTabKey?: string;
3
+ setActiveTabKey: (key: string) => void;
4
+ };
5
+ export declare const useTabStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TabState>>;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Input } from '../components/fields/Input';
3
+ declare const meta: Meta<typeof Input>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Input>;
6
+ export declare const Default: Story;
package/types/ui.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './ui/index'
1
+ export * from './components/ui/index'
2
2
  export {}
@@ -0,0 +1,35 @@
1
+ export declare const PUBLIC_ROUTER: {
2
+ HOME: string;
3
+ SIGN_IN: string;
4
+ PAGE_404: string;
5
+ CATEGORY_LIST: {
6
+ LIST: string;
7
+ };
8
+ CATEGORY_DEMO: {
9
+ LIST: string;
10
+ DETAIL: string;
11
+ };
12
+ CATEGORY_MEDICAL_RECORD: {
13
+ LIST: string;
14
+ };
15
+ CATEGORY_CITY: {
16
+ LIST: string;
17
+ DETAIL: string;
18
+ };
19
+ CATEGORY_NATION: {
20
+ LIST: string;
21
+ DETAIL: string;
22
+ };
23
+ CATEGORY_ETHNIC: {
24
+ LIST: string;
25
+ };
26
+ CATEGORY_RELATIONSHIP: {
27
+ LIST: string;
28
+ };
29
+ CATEGORY_ATTRIBUTE: {
30
+ LIST: string;
31
+ };
32
+ CATEGORY_LOCATION: {
33
+ LIST: string;
34
+ };
35
+ };
@@ -0,0 +1,7 @@
1
+ declare class Timer {
2
+ timer: ReturnType<typeof setTimeout> | number | null;
3
+ constructor();
4
+ debounce(func: (arg: any) => void, time: number): void;
5
+ }
6
+ export declare const delay: (ms: number) => Promise<unknown>;
7
+ export default Timer;
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes