@pnkx-lib/ui 1.9.433 → 1.9.436

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 (50) hide show
  1. package/dist/style.css +1 -1
  2. package/es/chunks/{AntdIcon-gUuMvf83.js → AntdIcon-D_ySRKRj.js} +3 -3
  3. package/es/chunks/{CloseOutlined-D9hb-IcI.js → CloseOutlined-B3y9Maz0.js} +1 -1
  4. package/es/chunks/{DownOutlined-CkHKgaSi.js → DownOutlined-BlKl-wuu.js} +1 -1
  5. package/es/chunks/{InboxOutlined-Kgn4qaDi.js → InboxOutlined-CLTSIXAX.js} +1 -1
  6. package/es/chunks/{index-D7kJLZIi.js → index-t0ynpS_n.js} +2 -2
  7. package/es/fields/DatePicker.js +2 -2
  8. package/es/fields/Input.js +45 -45
  9. package/es/fields/Select.js +24 -24
  10. package/es/fields/Upload.js +1 -1
  11. package/es/index.js +8 -5
  12. package/es/ui/BreadcrumbHeading.js +2 -2
  13. package/es/ui/ExportFile.js +1 -1
  14. package/es/ui/Heading.js +2 -2
  15. package/es/ui/ImportFile.js +2 -2
  16. package/es/ui/Layout.js +4927 -1
  17. package/es/ui/SearchFilterForm.js +1 -1
  18. package/es/{chunks/logo-header-DG8abRGF.js → ui/Sidebar/index.js} +504 -4
  19. package/es/ui/UploadComponent.js +1 -1
  20. package/es/ui/UploadMultiple.js +1 -1
  21. package/es/ui/index.js +69 -71
  22. package/package.json +1 -1
  23. package/types/components/hooks/useBreadcrumb.d.ts +2 -2
  24. package/types/components/ui/{SidebarV3 → Sidebar}/components/ContentArea.d.ts +1 -1
  25. package/types/components/ui/{SidebarV3 → Sidebar}/components/MainMenu/EachItem.d.ts +5 -5
  26. package/types/components/ui/{SidebarV3 → Sidebar}/components/MainMenu/index.d.ts +4 -4
  27. package/types/components/ui/{SidebarV3 → Sidebar}/components/MainSidebar.d.ts +3 -3
  28. package/types/components/ui/{SidebarV3/components/SidebarV3.d.ts → Sidebar/components/Sidebar.d.ts} +1 -1
  29. package/types/components/ui/{SidebarV3 → Sidebar}/hooks.d.ts +3 -3
  30. package/types/components/ui/Sidebar/index.d.ts +2 -0
  31. package/types/components/ui/{SidebarV3 → Sidebar}/types.d.ts +3 -3
  32. package/types/components/ui/Sidebar/utils.d.ts +2 -0
  33. package/types/components/ui/index.d.ts +1 -3
  34. package/types/components/utils/routeUtils.d.ts +10 -2
  35. package/types/ui/Sidebar/index.d.ts +2 -0
  36. package/es/chunks/BellIcon-Bv07EhTB.js +0 -45
  37. package/es/chunks/layout-C0dbwkpb.js +0 -4929
  38. package/es/ui/Sidebar.js +0 -412
  39. package/es/ui/SidebarV2.js +0 -303
  40. package/es/ui/SidebarV3/index.js +0 -465
  41. package/types/components/ui/Sidebar.d.ts +0 -23
  42. package/types/components/ui/SidebarV2.d.ts +0 -20
  43. package/types/components/ui/SidebarV3/index.d.ts +0 -2
  44. package/types/components/ui/SidebarV3/utils.d.ts +0 -2
  45. package/types/ui/Sidebar.d.ts +0 -2
  46. package/types/ui/SidebarV2.d.ts +0 -2
  47. package/types/ui/SidebarV3/index.d.ts +0 -2
  48. /package/types/components/ui/{SidebarV3 → Sidebar}/components/Header.d.ts +0 -0
  49. /package/types/components/ui/{SidebarV3 → Sidebar}/components/SearchHeader.d.ts +0 -0
  50. /package/types/components/ui/{SidebarV3 → Sidebar}/components/UserInfoSection.d.ts +0 -0
@@ -7,6 +7,51 @@ import { Label } from '../ui/Label.js';
7
7
  import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
8
8
  import { Tooltip } from '../ui/Tooltip.js';
9
9
 
10
+ const AllowClearIcon = ({
11
+ size = 6,
12
+ color = "currentColor",
13
+ className,
14
+ style,
15
+ onClick,
16
+ "aria-label": ariaLabel,
17
+ title,
18
+ ...props
19
+ }) => /* @__PURE__ */ jsx(
20
+ "div",
21
+ {
22
+ className,
23
+ style: {
24
+ width: size,
25
+ height: size,
26
+ cursor: onClick ? "pointer" : "default",
27
+ ...style
28
+ },
29
+ onClick,
30
+ role: onClick ? "button" : void 0,
31
+ "aria-label": ariaLabel,
32
+ title,
33
+ ...props,
34
+ children: /* @__PURE__ */ jsx(
35
+ "svg",
36
+ {
37
+ xmlns: "http://www.w3.org/2000/svg",
38
+ width: "100%",
39
+ height: "100%",
40
+ fill: "none",
41
+ children: /* @__PURE__ */ jsx(
42
+ "path",
43
+ {
44
+ fill: color || "#116DFF",
45
+ fillRule: "evenodd",
46
+ d: "M5.2 0 3 2.2.8 0 0 .8 2.2 3 0 5.3l.8.7L3 3.8 5.2 6l.8-.7L3.8 3 6 .8 5.2 0Z",
47
+ clipRule: "evenodd"
48
+ }
49
+ )
50
+ }
51
+ )
52
+ }
53
+ );
54
+
10
55
  /**
11
56
  * react-number-format - 5.4.3
12
57
  * Author : Sudhanshu Yadav
@@ -1228,51 +1273,6 @@ function NumericFormat(props) {
1228
1273
  return React__default.createElement(NumberFormatBase, Object.assign({}, numericFormatProps));
1229
1274
  }
1230
1275
 
1231
- const AllowClearIcon = ({
1232
- size = 6,
1233
- color = "currentColor",
1234
- className,
1235
- style,
1236
- onClick,
1237
- "aria-label": ariaLabel,
1238
- title,
1239
- ...props
1240
- }) => /* @__PURE__ */ jsx(
1241
- "div",
1242
- {
1243
- className,
1244
- style: {
1245
- width: size,
1246
- height: size,
1247
- cursor: onClick ? "pointer" : "default",
1248
- ...style
1249
- },
1250
- onClick,
1251
- role: onClick ? "button" : void 0,
1252
- "aria-label": ariaLabel,
1253
- title,
1254
- ...props,
1255
- children: /* @__PURE__ */ jsx(
1256
- "svg",
1257
- {
1258
- xmlns: "http://www.w3.org/2000/svg",
1259
- width: "100%",
1260
- height: "100%",
1261
- fill: "none",
1262
- children: /* @__PURE__ */ jsx(
1263
- "path",
1264
- {
1265
- fill: color || "#116DFF",
1266
- fillRule: "evenodd",
1267
- d: "M5.2 0 3 2.2.8 0 0 .8 2.2 3 0 5.3l.8.7L3 3.8 5.2 6l.8-.7L3.8 3 6 .8 5.2 0Z",
1268
- clipRule: "evenodd"
1269
- }
1270
- )
1271
- }
1272
- )
1273
- }
1274
- );
1275
-
1276
1276
  const Input = (props) => {
1277
1277
  //! State
1278
1278
  const {
@@ -1,36 +1,15 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Select as Select$1 } from 'antd';
3
3
  import { g as get } from '../chunks/get-DPccfEM4.js';
4
4
  import { ErrorMessage } from '../ui/ErrorMessage.js';
5
5
  import { Label } from '../ui/Label.js';
6
6
  import { t as twMerge } from '../chunks/bundle-mjs-BBFHkixS.js';
7
- import { R as RefIcon } from '../chunks/CloseOutlined-D9hb-IcI.js';
8
- import { R as RefIcon$1 } from '../chunks/DownOutlined-CkHKgaSi.js';
7
+ import { R as RefIcon } from '../chunks/CloseOutlined-B3y9Maz0.js';
8
+ import { R as RefIcon$1 } from '../chunks/DownOutlined-BlKl-wuu.js';
9
9
  import { useRef } from 'react';
10
10
  import { w as wrapWithTooltip } from '../chunks/wapper-Bk3PQCcg.js';
11
11
  import { M as MAX_TAG_TEXT_LENGTH, a as MAX_TAG_COUNT } from '../chunks/common-BcURBmQ-.js';
12
12
 
13
- const SelectClearIcon = ({
14
- hasValue,
15
- onClear,
16
- clearIconStyle = { fontSize: 12, color: "#999" },
17
- dropdownIconStyle
18
- }) => {
19
- if (hasValue) {
20
- return /* @__PURE__ */ jsx(
21
- RefIcon,
22
- {
23
- onClick: (e) => {
24
- e.stopPropagation();
25
- onClear(e);
26
- },
27
- style: clearIconStyle
28
- }
29
- );
30
- }
31
- return /* @__PURE__ */ jsx(RefIcon$1, { style: dropdownIconStyle });
32
- };
33
-
34
13
  const EmptySelectIcon = ({ stroke, fill }) => /* @__PURE__ */ jsxs(
35
14
  "svg",
36
15
  {
@@ -57,6 +36,27 @@ const EmptySelectIcon = ({ stroke, fill }) => /* @__PURE__ */ jsxs(
57
36
  }
58
37
  );
59
38
 
39
+ const SelectClearIcon = ({
40
+ hasValue,
41
+ onClear,
42
+ clearIconStyle = { fontSize: 12, color: "#999" },
43
+ dropdownIconStyle
44
+ }) => {
45
+ if (hasValue) {
46
+ return /* @__PURE__ */ jsx(
47
+ RefIcon,
48
+ {
49
+ onClick: (e) => {
50
+ e.stopPropagation();
51
+ onClear(e);
52
+ },
53
+ style: clearIconStyle
54
+ }
55
+ );
56
+ }
57
+ return /* @__PURE__ */ jsx(RefIcon$1, { style: dropdownIconStyle });
58
+ };
59
+
60
60
  const Select = (props) => {
61
61
  //! State
62
62
  const {
@@ -5,7 +5,7 @@ import { Upload, Image } from 'antd';
5
5
  import { g as get } from '../chunks/get-DPccfEM4.js';
6
6
  import { ErrorMessage } from '../ui/ErrorMessage.js';
7
7
  import { Label } from '../ui/Label.js';
8
- import { I as Icon, _ as _extends } from '../chunks/AntdIcon-gUuMvf83.js';
8
+ import { I as Icon, _ as _extends } from '../chunks/AntdIcon-D_ySRKRj.js';
9
9
 
10
10
  // This icon file is generated automatically.
11
11
  var PlusOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
package/es/index.js CHANGED
@@ -23,7 +23,6 @@ export { Splitter } from './ui/Splitter.js';
23
23
  export { Menu } from './ui/Menu.js';
24
24
  export { Pagination } from './ui/Pagination.js';
25
25
  export { Steps } from './ui/Steps.js';
26
- export { Sidebar } from './ui/Sidebar.js';
27
26
  export { Heading } from './ui/Heading.js';
28
27
  export { Tag } from './ui/Tag.js';
29
28
  export { Divider } from './ui/Divider.js';
@@ -63,8 +62,7 @@ export { ExportFile } from './ui/ExportFile.js';
63
62
  export { UploadComponent } from './ui/UploadComponent.js';
64
63
  export { useAppMessage } from './ui/Message.js';
65
64
  export { ViewPdf } from './ui/ViewPdf.js';
66
- export { SidebarV2 } from './ui/SidebarV2.js';
67
- export { SidebarV3 } from './ui/SidebarV3/index.js';
65
+ export { Sidebar } from './ui/Sidebar/index.js';
68
66
  export { SelectTable } from './ui/SelectTable.js';
69
67
  export { SelectSingleTable } from './ui/SelectSingleTable.js';
70
68
  export { Input } from './fields/Input.js';
@@ -86,6 +84,7 @@ export { Cascader } from './fields/CascaderField.js';
86
84
  export { InputRangePicker } from './fields/InputRangePicker.js';
87
85
  export { useToast } from './hooks/useToast.js';
88
86
  export { useMessage } from './hooks/useMessage.js';
87
+ import React__default from 'react';
89
88
 
90
89
  const extractRoutesFromMenu = (menuItems) => {
91
90
  const routes = [];
@@ -94,7 +93,8 @@ const extractRoutesFromMenu = (menuItems) => {
94
93
  if (item.path && item.component && typeof item.component !== "string") {
95
94
  routes.push({
96
95
  path: item.path,
97
- component: item.component
96
+ component: item.component,
97
+ componentProps: item.componentProps
98
98
  });
99
99
  }
100
100
  if (item.children && item.children.length > 0) {
@@ -105,10 +105,13 @@ const extractRoutesFromMenu = (menuItems) => {
105
105
  traverseMenu(menuItems);
106
106
  return routes;
107
107
  };
108
+ const createComponentWithProps = (Component, componentProps = {}) => {
109
+ return (props) => React__default.createElement(Component, { ...componentProps, ...props });
110
+ };
108
111
 
109
112
  const generateId = (name, path) => {
110
113
  const source = `${name}-${path || ""}`;
111
114
  return source.toLowerCase().replace(/[^a-z0-9]/g, "-").replace(/--+/g, "-").replace(/^-|-$/g, "");
112
115
  };
113
116
 
114
- export { extractRoutesFromMenu, generateId };
117
+ export { createComponentWithProps, extractRoutesFromMenu, generateId };
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { c as className } from '../chunks/index-D7kJLZIi.js';
2
+ import { r } from '../chunks/index-t0ynpS_n.js';
3
3
  import { Breadcrumb } from './Breadcrumb.js';
4
4
  import { u as useBreadcrumb } from '../chunks/useBreadcrumb-kD-i6Dch.js';
5
5
 
@@ -7,7 +7,7 @@ const BreadcrumbHeading = (props) => {
7
7
  const { menu, customBreadcum } = props;
8
8
  const mappingBreadcrumb = useBreadcrumb(menu, customBreadcum);
9
9
  //! Render
10
- return /* @__PURE__ */ jsx("div", { className: className("flex justify-between items-center"), children: /* @__PURE__ */ jsx(Breadcrumb, { items: mappingBreadcrumb }) });
10
+ return /* @__PURE__ */ jsx("div", { className: r("flex justify-between items-center"), children: /* @__PURE__ */ jsx(Breadcrumb, { items: mappingBreadcrumb }) });
11
11
  };
12
12
 
13
13
  export { BreadcrumbHeading };
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { Spin } from './Spin.js';
3
- import { I as Icon, _ as _extends } from '../chunks/AntdIcon-gUuMvf83.js';
3
+ import { I as Icon, _ as _extends } from '../chunks/AntdIcon-D_ySRKRj.js';
4
4
  import * as React from 'react';
5
5
  import { PnkxField } from '../fields/PnkxField.js';
6
6
  import { RadioGroup } from '../fields/Radio.js';
package/es/ui/Heading.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { c as className } from '../chunks/index-D7kJLZIi.js';
2
+ import { r } from '../chunks/index-t0ynpS_n.js';
3
3
  import { WrapperBreadcrumb } from './WrapperBreadcrumb.js';
4
4
 
5
5
  const Heading = (props) => {
@@ -11,7 +11,7 @@ const Heading = (props) => {
11
11
  /* @__PURE__ */ jsxs(
12
12
  "div",
13
13
  {
14
- className: className(
14
+ className: r(
15
15
  `flex ${noBreadcum ? "justify-end" : "justify-between"} items-end`,
16
16
  classNameWrapHeading
17
17
  ),
@@ -1,7 +1,7 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { Upload } from 'antd';
3
- import { R as RefIcon$2 } from '../chunks/InboxOutlined-Kgn4qaDi.js';
4
- import { I as Icon, _ as _extends } from '../chunks/AntdIcon-gUuMvf83.js';
3
+ import { R as RefIcon$2 } from '../chunks/InboxOutlined-CLTSIXAX.js';
4
+ import { I as Icon, _ as _extends } from '../chunks/AntdIcon-D_ySRKRj.js';
5
5
  import * as React from 'react';
6
6
 
7
7
  // This icon file is generated automatically.