@pnkx-lib/ui 1.9.178 → 1.9.180

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 (207) hide show
  1. package/dist/style.css +1 -1
  2. package/es/chunks/AntdIcon-B_SLhOJa.js +1211 -0
  3. package/es/chunks/_commonjsHelpers-BFTU3MAI.js +7 -0
  4. package/es/chunks/bundle-mjs-BME7zF0Z.js +2956 -0
  5. package/es/chunks/common-CocKiHtC.js +3 -0
  6. package/es/chunks/defineProperty-D53odpB3.js +50 -0
  7. package/es/chunks/get-C880miVG.js +1726 -0
  8. package/es/chunks/index-mzHK7Za8.js +90 -0
  9. package/es/chunks/index.esm-DPdCEbIy.js +2276 -0
  10. package/es/chunks/jsx-runtime-DFKOoQSG.js +430 -0
  11. package/es/chunks/layout-B04d5Lfr.js +6094 -0
  12. package/es/constants/index.js +38 -0
  13. package/es/fields/CascaderField.js +59 -0
  14. package/es/fields/Checkbox.js +56 -0
  15. package/es/fields/DatePicker.js +13030 -0
  16. package/es/fields/DateRangePicker.js +58 -0
  17. package/es/fields/Input.js +1379 -0
  18. package/es/fields/PnkxField.js +19 -0
  19. package/es/fields/Radio.js +56 -0
  20. package/es/fields/Select.js +61 -0
  21. package/es/fields/SliderRanger.js +58 -0
  22. package/es/fields/SliderSingle.js +58 -0
  23. package/es/fields/Switch.js +58 -0
  24. package/es/fields/Textarea.js +66 -0
  25. package/es/fields/TinyMCE.js +1969 -0
  26. package/es/fields/Upload.js +113 -0
  27. package/es/fields/index.js +13 -2
  28. package/es/hooks/index.js +2 -1
  29. package/es/hooks/useMessage.js +15 -0
  30. package/es/{chunks/useMessage-CUPcOtIS.js → hooks/useToast.js} +2 -14
  31. package/es/index.js +74 -4
  32. package/es/ui/Alert.js +8 -0
  33. package/es/ui/Anchor.js +9 -0
  34. package/es/ui/Appfix.js +8 -0
  35. package/es/ui/AutoComplete.js +8 -0
  36. package/es/ui/Badge.js +15 -0
  37. package/es/ui/BottomPagination.js +57 -0
  38. package/es/ui/Breadcrumb.js +9 -0
  39. package/es/ui/BreadcrumbHeading.js +54 -0
  40. package/es/ui/Button.js +8 -0
  41. package/es/ui/Card.js +8 -0
  42. package/es/ui/Cascader.js +21 -0
  43. package/es/ui/CategoryStatus.js +50 -0
  44. package/es/ui/Col.js +9 -0
  45. package/es/ui/Collapse.js +8 -0
  46. package/es/ui/ColorPicker.js +8 -0
  47. package/es/ui/ConfigProvider.js +11 -0
  48. package/es/ui/ConfirmModal.js +119 -0
  49. package/es/ui/Container.js +12 -0
  50. package/es/ui/Divider.js +8 -0
  51. package/es/ui/Drawer.js +19 -0
  52. package/es/ui/Dropdown.js +9 -0
  53. package/es/ui/Empty.js +8 -0
  54. package/es/ui/ErrorBoundary.js +81 -0
  55. package/es/ui/ErrorMessage.js +14 -0
  56. package/es/ui/Flex.js +9 -0
  57. package/es/ui/Footer.js +13 -0
  58. package/es/ui/Heading.js +67 -0
  59. package/es/ui/Image.js +8 -0
  60. package/es/ui/Label.js +14 -0
  61. package/es/ui/Layout.js +25 -0
  62. package/es/ui/Menu.js +24 -0
  63. package/es/ui/Modal.js +8 -0
  64. package/es/{chunks/PageNotFound-D6b4M484.js → ui/PageNotFound.js} +7 -1865
  65. package/es/ui/Pagination.js +10 -0
  66. package/es/ui/Popconfirm.js +8 -0
  67. package/es/ui/Popover.js +9 -0
  68. package/es/ui/QRCode.js +8 -0
  69. package/es/ui/Rate.js +8 -0
  70. package/es/ui/Result.js +8 -0
  71. package/es/ui/Row.js +9 -0
  72. package/es/ui/SearchFilterForm.js +87 -0
  73. package/es/ui/Segmented.js +8 -0
  74. package/es/ui/Sidebar.js +342 -0
  75. package/es/ui/Skeleton.js +34 -0
  76. package/es/ui/Space.js +11 -0
  77. package/es/ui/Spin.js +8 -0
  78. package/es/ui/Splitter.js +11 -0
  79. package/es/ui/Statistic.js +8 -0
  80. package/es/ui/Steps.js +11 -0
  81. package/es/ui/Tabs.js +78 -0
  82. package/es/ui/Tag.js +12 -0
  83. package/es/ui/Timeline.js +8 -0
  84. package/es/ui/Tooltip.js +8 -0
  85. package/es/ui/Tour.js +8 -0
  86. package/es/ui/Tree.js +8 -0
  87. package/es/ui/Typography.js +11 -0
  88. package/es/ui/UploadImage.js +116 -0
  89. package/es/ui/Watermark.js +28 -0
  90. package/es/ui/index.js +5235 -2
  91. package/package.json +31 -1
  92. package/types/components/ui/BulkActions/BulkAction.d.ts +1 -1
  93. package/types/components/ui/BulkActions/index.d.ts +1 -1
  94. package/types/components/ui/Table/ActionRowTable/index.d.ts +1 -1
  95. package/types/components/ui/Table/HeadingTable/components/GroupHeadingButton.d.ts +1 -1
  96. package/types/components/ui/Table/index.d.ts +1 -1
  97. package/types/fields/CascaderField.d.ts +2 -0
  98. package/types/fields/Checkbox.d.ts +2 -0
  99. package/types/fields/DatePicker.d.ts +2 -0
  100. package/types/fields/DateRangePicker.d.ts +2 -0
  101. package/types/fields/Input.d.ts +2 -0
  102. package/types/fields/PnkxField.d.ts +2 -0
  103. package/types/fields/Radio.d.ts +2 -0
  104. package/types/fields/Select.d.ts +2 -0
  105. package/types/fields/SliderRanger.d.ts +2 -0
  106. package/types/fields/SliderSingle.d.ts +2 -0
  107. package/types/fields/Switch.d.ts +2 -0
  108. package/types/fields/Textarea.d.ts +2 -0
  109. package/types/fields/TinyMCE.d.ts +2 -0
  110. package/types/fields/Upload.d.ts +2 -0
  111. package/types/fields/index.d.ts +2 -0
  112. package/types/hooks/index.d.ts +2 -0
  113. package/types/hooks/useMessage.d.ts +2 -0
  114. package/types/hooks/useToast.d.ts +2 -0
  115. package/types/ui/Alert.d.ts +2 -0
  116. package/types/ui/Anchor.d.ts +2 -0
  117. package/types/ui/Appfix.d.ts +2 -0
  118. package/types/ui/AutoComplete.d.ts +2 -0
  119. package/types/ui/Badge.d.ts +2 -0
  120. package/types/ui/BottomPagination.d.ts +2 -0
  121. package/types/ui/Breadcrumb.d.ts +2 -0
  122. package/types/ui/BreadcrumbHeading.d.ts +2 -0
  123. package/types/ui/Button.d.ts +2 -0
  124. package/types/ui/Card.d.ts +2 -0
  125. package/types/ui/Cascader.d.ts +2 -0
  126. package/types/ui/CategoryStatus.d.ts +2 -0
  127. package/types/ui/Col.d.ts +2 -0
  128. package/types/ui/Collapse.d.ts +2 -0
  129. package/types/ui/ColorPicker.d.ts +2 -0
  130. package/types/ui/ConfigProvider.d.ts +2 -0
  131. package/types/ui/ConfirmModal.d.ts +2 -0
  132. package/types/ui/Container.d.ts +2 -0
  133. package/types/ui/Divider.d.ts +2 -0
  134. package/types/ui/Drawer.d.ts +2 -0
  135. package/types/ui/Dropdown.d.ts +2 -0
  136. package/types/ui/Empty.d.ts +2 -0
  137. package/types/ui/ErrorBoundary.d.ts +2 -0
  138. package/types/ui/ErrorMessage.d.ts +2 -0
  139. package/types/ui/Flex.d.ts +2 -0
  140. package/types/ui/Footer.d.ts +4 -0
  141. package/types/ui/Heading.d.ts +2 -0
  142. package/types/ui/Image.d.ts +2 -0
  143. package/types/ui/Label.d.ts +2 -0
  144. package/types/ui/Layout.d.ts +2 -0
  145. package/types/ui/Menu.d.ts +2 -0
  146. package/types/ui/Modal.d.ts +2 -0
  147. package/types/ui/PageNotFound.d.ts +2 -0
  148. package/types/ui/Pagination.d.ts +2 -0
  149. package/types/ui/Popconfirm.d.ts +2 -0
  150. package/types/ui/Popover.d.ts +2 -0
  151. package/types/ui/QRCode.d.ts +2 -0
  152. package/types/ui/Rate.d.ts +2 -0
  153. package/types/ui/Result.d.ts +2 -0
  154. package/types/ui/Row.d.ts +2 -0
  155. package/types/ui/SearchFilterForm.d.ts +2 -0
  156. package/types/ui/Segmented.d.ts +2 -0
  157. package/types/ui/Sidebar.d.ts +2 -0
  158. package/types/ui/Skeleton.d.ts +2 -0
  159. package/types/ui/Space.d.ts +2 -0
  160. package/types/ui/Spin.d.ts +2 -0
  161. package/types/ui/Splitter.d.ts +2 -0
  162. package/types/ui/Statistic.d.ts +2 -0
  163. package/types/ui/Steps.d.ts +2 -0
  164. package/types/ui/Tabs.d.ts +2 -0
  165. package/types/ui/Tag.d.ts +2 -0
  166. package/types/ui/Timeline.d.ts +2 -0
  167. package/types/ui/Tooltip.d.ts +2 -0
  168. package/types/ui/Tour.d.ts +2 -0
  169. package/types/ui/Tree.d.ts +2 -0
  170. package/types/ui/Typography.d.ts +2 -0
  171. package/types/ui/UploadImage.d.ts +2 -0
  172. package/types/ui/Watermark.d.ts +2 -0
  173. package/types/ui/index.d.ts +2 -0
  174. package/es/chunks/SliderRanger-BXe2Nxdo.js +0 -361
  175. package/es/chunks/UploadImage-x6lE6WbO.js +0 -61133
  176. package/types/App.d.ts +0 -6
  177. package/types/DemoInput/DemoInput.d.ts +0 -1
  178. package/types/DemoTable/FiltersCategoryDemo/components/RenderFilterFields.d.ts +0 -12
  179. package/types/DemoTable/FiltersCategoryDemo/components/TagsFilter.d.ts +0 -12
  180. package/types/DemoTable/FiltersCategoryDemo/index.d.ts +0 -8
  181. package/types/DemoTable/apiUser.d.ts +0 -30
  182. package/types/DemoTable/hooks/useConvertGroupButton.d.ts +0 -13
  183. package/types/DemoTable/index.d.ts +0 -2
  184. package/types/DemoTable/tabDemo.d.ts +0 -2
  185. package/types/assets/svg/404.d.ts +0 -2
  186. package/types/assets/svg/Flag.d.ts +0 -2
  187. package/types/assets/svg/Logout.d.ts +0 -2
  188. package/types/assets/svg/PageNotFoundIcon.d.ts +0 -3
  189. package/types/assets/svg/Search.d.ts +0 -2
  190. package/types/assets/svg/Setting.d.ts +0 -2
  191. package/types/component-test/category-city.d.ts +0 -2
  192. package/types/component-test/category-manager.d.ts +0 -2
  193. package/types/component-test/default-layout.d.ts +0 -6
  194. package/types/component-test/detail-user.d.ts +0 -2
  195. package/types/component-test/permistion-user.d.ts +0 -2
  196. package/types/component-test/user-list.d.ts +0 -2
  197. package/types/fields.d.ts +0 -2
  198. package/types/hooks.d.ts +0 -2
  199. package/types/interface/common.d.ts +0 -14
  200. package/types/interface/tab.d.ts +0 -5
  201. package/types/main.d.ts +0 -0
  202. package/types/stores/tabStore.d.ts +0 -6
  203. package/types/stories/Input.stories.d.ts +0 -6
  204. package/types/ui.d.ts +0 -2
  205. package/types/utils/router.d.ts +0 -35
  206. package/types/utils/timer.d.ts +0 -7
  207. package/types/vite-env.d.ts +0 -1
@@ -0,0 +1,38 @@
1
+ export { T as TINY_API } from '../chunks/common-CocKiHtC.js';
2
+
3
+ const START_PAGE = 1;
4
+ const START_PAGE_SIZE = 10;
5
+ const PAGE_NUMBER = "page";
6
+ const PAGE_SIZE = "size";
7
+ const SORT = "sort";
8
+ var TypeActionRowTable = /* @__PURE__ */ ((TypeActionRowTable2) => {
9
+ TypeActionRowTable2["DELETE"] = "DELETE";
10
+ TypeActionRowTable2["EDIT"] = "EDIT";
11
+ TypeActionRowTable2["UNDO"] = "UNDO";
12
+ TypeActionRowTable2["CANCELUNDO"] = "CANCELUNDO";
13
+ TypeActionRowTable2["CHECKIN"] = "CHECKIN";
14
+ TypeActionRowTable2["PRINT"] = "PRINT";
15
+ TypeActionRowTable2["PAYMENT"] = "PAYMENT";
16
+ TypeActionRowTable2["PLAY"] = "PLAY";
17
+ TypeActionRowTable2["PAUSE"] = "PAUSE";
18
+ TypeActionRowTable2["DOWNLOAD"] = "DOWNLOAD";
19
+ TypeActionRowTable2["VIEW"] = "VIEW";
20
+ return TypeActionRowTable2;
21
+ })(TypeActionRowTable || {});
22
+ var TypeBulkActions = /* @__PURE__ */ ((TypeBulkActions2) => {
23
+ TypeBulkActions2["BULKACTION"] = "bulkaction";
24
+ TypeBulkActions2["DROPLIST"] = "droplist";
25
+ return TypeBulkActions2;
26
+ })(TypeBulkActions || {});
27
+ var TypeStatusTable = /* @__PURE__ */ ((TypeStatusTable2) => {
28
+ TypeStatusTable2["ALL"] = "ALL";
29
+ TypeStatusTable2[TypeStatusTable2["DRAFT"] = 0] = "DRAFT";
30
+ TypeStatusTable2[TypeStatusTable2["WAITING_APPROVAL"] = 1] = "WAITING_APPROVAL";
31
+ TypeStatusTable2[TypeStatusTable2["ACTIVE"] = 2] = "ACTIVE";
32
+ TypeStatusTable2[TypeStatusTable2["INACTIVE"] = 3] = "INACTIVE";
33
+ TypeStatusTable2[TypeStatusTable2["REJECTED"] = 4] = "REJECTED";
34
+ TypeStatusTable2[TypeStatusTable2["DELETED"] = 5] = "DELETED";
35
+ return TypeStatusTable2;
36
+ })(TypeStatusTable || {});
37
+
38
+ export { PAGE_NUMBER, PAGE_SIZE, SORT, START_PAGE, START_PAGE_SIZE, TypeActionRowTable, TypeBulkActions, TypeStatusTable };
@@ -0,0 +1,59 @@
1
+ import { j as jsxRuntimeExports } from '../chunks/jsx-runtime-DFKOoQSG.js';
2
+ import { Cascader as Cascader$1 } from 'antd';
3
+ import { g as get } from '../chunks/get-C880miVG.js';
4
+ import { ErrorMessage } from '../ui/ErrorMessage.js';
5
+ import { Label } from '../ui/Label.js';
6
+ import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
7
+
8
+ const Cascader = (props) => {
9
+ //! State
10
+ const {
11
+ field,
12
+ formState,
13
+ label,
14
+ required,
15
+ afterOnChange,
16
+ classNameContainer,
17
+ classNameCascader,
18
+ ...restProps
19
+ } = props;
20
+ const { name, value, onChange, onBlur } = field || {};
21
+ const { touchedFields, errors, isSubmitted } = formState || {};
22
+ const isTouched = get(touchedFields, name);
23
+ const errorMessage = get(errors, name)?.message;
24
+ //! Function
25
+ const handleChange = (val) => {
26
+ onChange?.(val);
27
+ afterOnChange?.(val);
28
+ };
29
+ const renderErrorMessage = () => {
30
+ if (!errorMessage) return null;
31
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
32
+ ErrorMessage,
33
+ {
34
+ errorMessage,
35
+ isTouched,
36
+ isSubmitted
37
+ }
38
+ );
39
+ };
40
+ //! Render
41
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNameContainer, children: [
42
+ label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
43
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
44
+ Cascader$1,
45
+ {
46
+ onChange: handleChange,
47
+ onBlur,
48
+ value,
49
+ maxTagCount: "responsive",
50
+ status: (isTouched || isSubmitted) && Boolean(errorMessage) ? "error" : void 0,
51
+ className: twMerge("w-full", classNameCascader),
52
+ ...restProps
53
+ }
54
+ ),
55
+ renderErrorMessage()
56
+ ] });
57
+ };
58
+
59
+ export { Cascader };
@@ -0,0 +1,56 @@
1
+ import { j as jsxRuntimeExports } from '../chunks/jsx-runtime-DFKOoQSG.js';
2
+ import { Checkbox as Checkbox$1 } from 'antd';
3
+ import { g as get } from '../chunks/get-C880miVG.js';
4
+ import { ErrorMessage } from '../ui/ErrorMessage.js';
5
+ import { Typography } from '../ui/Typography.js';
6
+
7
+ const Checkbox = (props) => {
8
+ //! State
9
+ const {
10
+ field,
11
+ formState,
12
+ label,
13
+ afterOnChange,
14
+ customStyleContainer,
15
+ customStyleCheckbox,
16
+ ...restProps
17
+ } = props;
18
+ const { name, value, onChange, onBlur } = field || {};
19
+ const { touchedFields, errors, isSubmitted } = formState || {};
20
+ const isTouched = get(touchedFields, name);
21
+ const errorMessage = get(errors, name)?.message;
22
+ //! Function
23
+ const handleChange = (e) => {
24
+ const checked = e.target.checked;
25
+ onChange?.(checked);
26
+ afterOnChange?.(checked);
27
+ };
28
+ const renderErrorMessage = () => {
29
+ if (!errorMessage) return null;
30
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
31
+ ErrorMessage,
32
+ {
33
+ errorMessage,
34
+ isTouched,
35
+ isSubmitted
36
+ }
37
+ );
38
+ };
39
+ //! Render
40
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
41
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
42
+ Checkbox$1,
43
+ {
44
+ onBlur,
45
+ checked: !!value,
46
+ onChange: handleChange,
47
+ className: customStyleCheckbox,
48
+ ...restProps,
49
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: label })
50
+ }
51
+ ),
52
+ renderErrorMessage()
53
+ ] });
54
+ };
55
+
56
+ export { Checkbox };