@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.
- package/dist/style.css +1 -1
- package/es/chunks/AntdIcon-B_SLhOJa.js +1211 -0
- package/es/chunks/_commonjsHelpers-BFTU3MAI.js +7 -0
- package/es/chunks/bundle-mjs-BME7zF0Z.js +2956 -0
- package/es/chunks/common-CocKiHtC.js +3 -0
- package/es/chunks/defineProperty-D53odpB3.js +50 -0
- package/es/chunks/get-C880miVG.js +1726 -0
- package/es/chunks/index-mzHK7Za8.js +90 -0
- package/es/chunks/index.esm-DPdCEbIy.js +2276 -0
- package/es/chunks/jsx-runtime-DFKOoQSG.js +430 -0
- package/es/chunks/layout-B04d5Lfr.js +6094 -0
- package/es/constants/index.js +38 -0
- package/es/fields/CascaderField.js +59 -0
- package/es/fields/Checkbox.js +56 -0
- package/es/fields/DatePicker.js +13030 -0
- package/es/fields/DateRangePicker.js +58 -0
- package/es/fields/Input.js +1379 -0
- package/es/fields/PnkxField.js +19 -0
- package/es/fields/Radio.js +56 -0
- package/es/fields/Select.js +61 -0
- package/es/fields/SliderRanger.js +58 -0
- package/es/fields/SliderSingle.js +58 -0
- package/es/fields/Switch.js +58 -0
- package/es/fields/Textarea.js +66 -0
- package/es/fields/TinyMCE.js +1969 -0
- package/es/fields/Upload.js +113 -0
- package/es/fields/index.js +13 -2
- package/es/hooks/index.js +2 -1
- package/es/hooks/useMessage.js +15 -0
- package/es/{chunks/useMessage-CUPcOtIS.js → hooks/useToast.js} +2 -14
- package/es/index.js +74 -4
- package/es/ui/Alert.js +8 -0
- package/es/ui/Anchor.js +9 -0
- package/es/ui/Appfix.js +8 -0
- package/es/ui/AutoComplete.js +8 -0
- package/es/ui/Badge.js +15 -0
- package/es/ui/BottomPagination.js +57 -0
- package/es/ui/Breadcrumb.js +9 -0
- package/es/ui/BreadcrumbHeading.js +54 -0
- package/es/ui/Button.js +8 -0
- package/es/ui/Card.js +8 -0
- package/es/ui/Cascader.js +21 -0
- package/es/ui/CategoryStatus.js +50 -0
- package/es/ui/Col.js +9 -0
- package/es/ui/Collapse.js +8 -0
- package/es/ui/ColorPicker.js +8 -0
- package/es/ui/ConfigProvider.js +11 -0
- package/es/ui/ConfirmModal.js +119 -0
- package/es/ui/Container.js +12 -0
- package/es/ui/Divider.js +8 -0
- package/es/ui/Drawer.js +19 -0
- package/es/ui/Dropdown.js +9 -0
- package/es/ui/Empty.js +8 -0
- package/es/ui/ErrorBoundary.js +81 -0
- package/es/ui/ErrorMessage.js +14 -0
- package/es/ui/Flex.js +9 -0
- package/es/ui/Footer.js +13 -0
- package/es/ui/Heading.js +67 -0
- package/es/ui/Image.js +8 -0
- package/es/ui/Label.js +14 -0
- package/es/ui/Layout.js +25 -0
- package/es/ui/Menu.js +24 -0
- package/es/ui/Modal.js +8 -0
- package/es/{chunks/PageNotFound-D6b4M484.js → ui/PageNotFound.js} +7 -1865
- package/es/ui/Pagination.js +10 -0
- package/es/ui/Popconfirm.js +8 -0
- package/es/ui/Popover.js +9 -0
- package/es/ui/QRCode.js +8 -0
- package/es/ui/Rate.js +8 -0
- package/es/ui/Result.js +8 -0
- package/es/ui/Row.js +9 -0
- package/es/ui/SearchFilterForm.js +87 -0
- package/es/ui/Segmented.js +8 -0
- package/es/ui/Sidebar.js +342 -0
- package/es/ui/Skeleton.js +34 -0
- package/es/ui/Space.js +11 -0
- package/es/ui/Spin.js +8 -0
- package/es/ui/Splitter.js +11 -0
- package/es/ui/Statistic.js +8 -0
- package/es/ui/Steps.js +11 -0
- package/es/ui/Tabs.js +78 -0
- package/es/ui/Tag.js +12 -0
- package/es/ui/Timeline.js +8 -0
- package/es/ui/Tooltip.js +8 -0
- package/es/ui/Tour.js +8 -0
- package/es/ui/Tree.js +8 -0
- package/es/ui/Typography.js +11 -0
- package/es/ui/UploadImage.js +116 -0
- package/es/ui/Watermark.js +28 -0
- package/es/ui/index.js +5235 -2
- package/package.json +31 -1
- package/types/components/ui/BulkActions/BulkAction.d.ts +1 -1
- package/types/components/ui/BulkActions/index.d.ts +1 -1
- package/types/components/ui/Table/ActionRowTable/index.d.ts +1 -1
- package/types/components/ui/Table/HeadingTable/components/GroupHeadingButton.d.ts +1 -1
- package/types/components/ui/Table/index.d.ts +1 -1
- package/types/fields/CascaderField.d.ts +2 -0
- package/types/fields/Checkbox.d.ts +2 -0
- package/types/fields/DatePicker.d.ts +2 -0
- package/types/fields/DateRangePicker.d.ts +2 -0
- package/types/fields/Input.d.ts +2 -0
- package/types/fields/PnkxField.d.ts +2 -0
- package/types/fields/Radio.d.ts +2 -0
- package/types/fields/Select.d.ts +2 -0
- package/types/fields/SliderRanger.d.ts +2 -0
- package/types/fields/SliderSingle.d.ts +2 -0
- package/types/fields/Switch.d.ts +2 -0
- package/types/fields/Textarea.d.ts +2 -0
- package/types/fields/TinyMCE.d.ts +2 -0
- package/types/fields/Upload.d.ts +2 -0
- package/types/fields/index.d.ts +2 -0
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/useMessage.d.ts +2 -0
- package/types/hooks/useToast.d.ts +2 -0
- package/types/ui/Alert.d.ts +2 -0
- package/types/ui/Anchor.d.ts +2 -0
- package/types/ui/Appfix.d.ts +2 -0
- package/types/ui/AutoComplete.d.ts +2 -0
- package/types/ui/Badge.d.ts +2 -0
- package/types/ui/BottomPagination.d.ts +2 -0
- package/types/ui/Breadcrumb.d.ts +2 -0
- package/types/ui/BreadcrumbHeading.d.ts +2 -0
- package/types/ui/Button.d.ts +2 -0
- package/types/ui/Card.d.ts +2 -0
- package/types/ui/Cascader.d.ts +2 -0
- package/types/ui/CategoryStatus.d.ts +2 -0
- package/types/ui/Col.d.ts +2 -0
- package/types/ui/Collapse.d.ts +2 -0
- package/types/ui/ColorPicker.d.ts +2 -0
- package/types/ui/ConfigProvider.d.ts +2 -0
- package/types/ui/ConfirmModal.d.ts +2 -0
- package/types/ui/Container.d.ts +2 -0
- package/types/ui/Divider.d.ts +2 -0
- package/types/ui/Drawer.d.ts +2 -0
- package/types/ui/Dropdown.d.ts +2 -0
- package/types/ui/Empty.d.ts +2 -0
- package/types/ui/ErrorBoundary.d.ts +2 -0
- package/types/ui/ErrorMessage.d.ts +2 -0
- package/types/ui/Flex.d.ts +2 -0
- package/types/ui/Footer.d.ts +4 -0
- package/types/ui/Heading.d.ts +2 -0
- package/types/ui/Image.d.ts +2 -0
- package/types/ui/Label.d.ts +2 -0
- package/types/ui/Layout.d.ts +2 -0
- package/types/ui/Menu.d.ts +2 -0
- package/types/ui/Modal.d.ts +2 -0
- package/types/ui/PageNotFound.d.ts +2 -0
- package/types/ui/Pagination.d.ts +2 -0
- package/types/ui/Popconfirm.d.ts +2 -0
- package/types/ui/Popover.d.ts +2 -0
- package/types/ui/QRCode.d.ts +2 -0
- package/types/ui/Rate.d.ts +2 -0
- package/types/ui/Result.d.ts +2 -0
- package/types/ui/Row.d.ts +2 -0
- package/types/ui/SearchFilterForm.d.ts +2 -0
- package/types/ui/Segmented.d.ts +2 -0
- package/types/ui/Sidebar.d.ts +2 -0
- package/types/ui/Skeleton.d.ts +2 -0
- package/types/ui/Space.d.ts +2 -0
- package/types/ui/Spin.d.ts +2 -0
- package/types/ui/Splitter.d.ts +2 -0
- package/types/ui/Statistic.d.ts +2 -0
- package/types/ui/Steps.d.ts +2 -0
- package/types/ui/Tabs.d.ts +2 -0
- package/types/ui/Tag.d.ts +2 -0
- package/types/ui/Timeline.d.ts +2 -0
- package/types/ui/Tooltip.d.ts +2 -0
- package/types/ui/Tour.d.ts +2 -0
- package/types/ui/Tree.d.ts +2 -0
- package/types/ui/Typography.d.ts +2 -0
- package/types/ui/UploadImage.d.ts +2 -0
- package/types/ui/Watermark.d.ts +2 -0
- package/types/ui/index.d.ts +2 -0
- package/es/chunks/SliderRanger-BXe2Nxdo.js +0 -361
- package/es/chunks/UploadImage-x6lE6WbO.js +0 -61133
- package/types/App.d.ts +0 -6
- package/types/DemoInput/DemoInput.d.ts +0 -1
- package/types/DemoTable/FiltersCategoryDemo/components/RenderFilterFields.d.ts +0 -12
- package/types/DemoTable/FiltersCategoryDemo/components/TagsFilter.d.ts +0 -12
- package/types/DemoTable/FiltersCategoryDemo/index.d.ts +0 -8
- package/types/DemoTable/apiUser.d.ts +0 -30
- package/types/DemoTable/hooks/useConvertGroupButton.d.ts +0 -13
- package/types/DemoTable/index.d.ts +0 -2
- package/types/DemoTable/tabDemo.d.ts +0 -2
- package/types/assets/svg/404.d.ts +0 -2
- package/types/assets/svg/Flag.d.ts +0 -2
- package/types/assets/svg/Logout.d.ts +0 -2
- package/types/assets/svg/PageNotFoundIcon.d.ts +0 -3
- package/types/assets/svg/Search.d.ts +0 -2
- package/types/assets/svg/Setting.d.ts +0 -2
- package/types/component-test/category-city.d.ts +0 -2
- package/types/component-test/category-manager.d.ts +0 -2
- package/types/component-test/default-layout.d.ts +0 -6
- package/types/component-test/detail-user.d.ts +0 -2
- package/types/component-test/permistion-user.d.ts +0 -2
- package/types/component-test/user-list.d.ts +0 -2
- package/types/fields.d.ts +0 -2
- package/types/hooks.d.ts +0 -2
- package/types/interface/common.d.ts +0 -14
- package/types/interface/tab.d.ts +0 -5
- package/types/main.d.ts +0 -0
- package/types/stores/tabStore.d.ts +0 -6
- package/types/stories/Input.stories.d.ts +0 -6
- package/types/ui.d.ts +0 -2
- package/types/utils/router.d.ts +0 -35
- package/types/utils/timer.d.ts +0 -7
- 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 };
|