@pnkx-lib/ui 1.9.113 → 1.9.119

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 (120) hide show
  1. package/dist/style.css +2 -2
  2. package/es/chunks/{AntdIcon-CtaI55qk.js → AntdIcon-BS99Z6_t.js} +7203 -460
  3. package/es/chunks/{BreadcrumbHeading-CSKdtCYe.js → Card-CCVU-3bH.js} +73 -59
  4. package/es/chunks/{Switch-CigYj8FF.js → Switch-vaUhKEAu.js} +1 -1
  5. package/es/fields/index.js +2 -2
  6. package/es/index.js +3 -3
  7. package/es/ui/index.js +2 -2
  8. package/package.json +3 -2
  9. package/types/fields/CascaderField.d.ts +13 -0
  10. package/types/fields/Checkbox.d.ts +12 -0
  11. package/types/fields/DatePicker.d.ts +22 -0
  12. package/types/fields/DateRangePicker.d.ts +13 -0
  13. package/types/fields/Input.d.ts +32 -0
  14. package/types/fields/PnkxField.d.ts +12 -0
  15. package/types/fields/Radio.d.ts +19 -0
  16. package/types/fields/Select.d.ts +13 -0
  17. package/types/fields/Switch.d.ts +12 -0
  18. package/types/fields/Textarea.d.ts +13 -0
  19. package/types/fields/TinyMCE.d.ts +16 -0
  20. package/types/fields/Upload.d.ts +15 -0
  21. package/types/fields/index.d.ts +11 -0
  22. package/types/fields.d.ts +2 -198
  23. package/types/hooks/index.d.ts +2 -0
  24. package/types/hooks/useDebounce.d.ts +1 -0
  25. package/types/hooks/useMessage.d.ts +5 -0
  26. package/types/hooks/useToast.d.ts +12 -0
  27. package/types/hooks.d.ts +2 -23
  28. package/types/icons/ActivateIcon.d.ts +6 -0
  29. package/types/icons/AllowClearIcon.d.ts +2 -0
  30. package/types/icons/ApprovalIcon.d.ts +6 -0
  31. package/types/icons/CancelApprovalIcon.d.ts +6 -0
  32. package/types/icons/CancelSendApprovalIcon.d.ts +6 -0
  33. package/types/icons/DeleteIcon.d.ts +6 -0
  34. package/types/icons/DragIcon.d.ts +6 -0
  35. package/types/icons/EditIcon.d.ts +6 -0
  36. package/types/icons/ErrorConfirmIcon.d.ts +3 -0
  37. package/types/icons/InActivateIcon.d.ts +6 -0
  38. package/types/icons/InfoConfirmIcon.d.ts +3 -0
  39. package/types/icons/MoreIcon.d.ts +6 -0
  40. package/types/icons/PlusIcon.d.ts +6 -0
  41. package/types/icons/RefuseApprovalIcon.d.ts +6 -0
  42. package/types/icons/RestoreIcon.d.ts +6 -0
  43. package/types/icons/SearchAdvanceIcon.d.ts +6 -0
  44. package/types/icons/SearchIcon.d.ts +2 -0
  45. package/types/icons/SendApprovalIcon.d.ts +6 -0
  46. package/types/icons/SettingIcon.d.ts +1 -0
  47. package/types/icons/SuccessIcon.d.ts +3 -0
  48. package/types/icons/TrashCanIcon.d.ts +2 -0
  49. package/types/icons/WaitingApprovalIcon.d.ts +6 -0
  50. package/types/icons/WarningConfirmIcon.d.ts +3 -0
  51. package/types/icons/index.d.ts +18 -0
  52. package/types/index.d.ts +3 -922
  53. package/types/ui/Alert.d.ts +3 -0
  54. package/types/ui/Anchor.d.ts +11 -0
  55. package/types/ui/Appfix.d.ts +6 -0
  56. package/types/ui/AutoComplete.d.ts +3 -0
  57. package/types/ui/Badge.d.ts +8 -0
  58. package/types/ui/Breadcrumb.d.ts +16 -0
  59. package/types/ui/BreadcrumbHeading.d.ts +5 -0
  60. package/types/ui/BulkActions/BulkAction.d.ts +11 -0
  61. package/types/ui/BulkActions/DropListActions.d.ts +9 -0
  62. package/types/ui/BulkActions/index.d.ts +31 -0
  63. package/types/ui/Button.d.ts +4 -0
  64. package/types/ui/Card.d.ts +3 -0
  65. package/types/ui/Cascader.d.ts +14 -0
  66. package/types/ui/CategoryStatus.d.ts +4 -0
  67. package/types/ui/Col.d.ts +11 -0
  68. package/types/ui/Collapse.d.ts +3 -0
  69. package/types/ui/ColorPicker.d.ts +2 -0
  70. package/types/ui/ConfirmModal.d.ts +12 -0
  71. package/types/ui/Container.d.ts +8 -0
  72. package/types/ui/Divider.d.ts +6 -0
  73. package/types/ui/Drawer.d.ts +7 -0
  74. package/types/ui/Dropdown.d.ts +12 -0
  75. package/types/ui/Empty.d.ts +3 -0
  76. package/types/ui/ErrorBoundary.d.ts +18 -0
  77. package/types/ui/ErrorMessage.d.ts +7 -0
  78. package/types/ui/Flex.d.ts +9 -0
  79. package/types/ui/Footer.d.ts +2 -0
  80. package/types/ui/Heading.d.ts +10 -0
  81. package/types/ui/Image.d.ts +2 -0
  82. package/types/ui/Label.d.ts +5 -0
  83. package/types/ui/Layout.d.ts +14 -0
  84. package/types/ui/Menu.d.ts +22 -0
  85. package/types/ui/Modal.d.ts +6 -0
  86. package/types/ui/Page404.d.ts +2 -0
  87. package/types/ui/Pagination.d.ts +12 -0
  88. package/types/ui/Popconfirm.d.ts +6 -0
  89. package/types/ui/Popover.d.ts +9 -0
  90. package/types/ui/QRCode.d.ts +3 -0
  91. package/types/ui/Rate.d.ts +2 -0
  92. package/types/ui/Result.d.ts +6 -0
  93. package/types/ui/Row.d.ts +7 -0
  94. package/types/ui/SearchFilterForm.d.ts +18 -0
  95. package/types/ui/Segmented.d.ts +3 -0
  96. package/types/ui/Sidebar.d.ts +36 -0
  97. package/types/ui/Skeleton.d.ts +6 -0
  98. package/types/ui/Space.d.ts +8 -0
  99. package/types/ui/Spin.d.ts +6 -0
  100. package/types/ui/Splitter.d.ts +8 -0
  101. package/types/ui/Statistic.d.ts +3 -0
  102. package/types/ui/Steps.d.ts +12 -0
  103. package/types/ui/Table/ActionRowTable/index.d.ts +10 -0
  104. package/types/ui/Table/HeadingTable/components/GroupHeadingButton.d.ts +13 -0
  105. package/types/ui/Table/HeadingTable/index.d.ts +16 -0
  106. package/types/ui/Table/SettingTable/IconSettingTable.d.ts +6 -0
  107. package/types/ui/Table/SettingTable/SettingColumnItem.d.ts +7 -0
  108. package/types/ui/Table/SettingTable/SortableItem.d.ts +6 -0
  109. package/types/ui/Table/SettingTable/index.d.ts +11 -0
  110. package/types/ui/Table/index.d.ts +42 -0
  111. package/types/ui/Tabs.d.ts +14 -0
  112. package/types/ui/Tag.d.ts +5 -0
  113. package/types/ui/Timeline.d.ts +3 -0
  114. package/types/ui/Tooltip.d.ts +4 -0
  115. package/types/ui/Tour.d.ts +3 -0
  116. package/types/ui/Tree.d.ts +3 -0
  117. package/types/ui/Typography.d.ts +8 -0
  118. package/types/ui/Watermark.d.ts +2 -0
  119. package/types/ui/index.d.ts +58 -0
  120. package/types/ui.d.ts +2 -709
@@ -1,5 +1,5 @@
1
- import { j as jsxRuntimeExports, c as Icon, _ as _extends, e as _typeof, P as PnkxField, C as CheckboxField, t as twMerge, u as useForm, d as className, l as lodashExports, f as commonjsGlobal, h as _arrayLikeToArray, i as _unsupportedIterableToArray, w as warningOnce, k as _createClass, m as _classCallCheck, n as _defineProperty, o as _slicedToArray, p as warning$1, q as canUseDom, r as _objectSpread2, s as updateCSS, v as removeCSS, x as _arrayWithHoles, y as _nonIterableRest, z as resetWarned$1, F as FastColor, A as generate, B as presetPrimaryColors, G as presetPalettes, H as _inherits, J as _createSuper, K as _assertThisInitialized, M as _objectWithoutProperties, N as IconContext, I as Input } from './AntdIcon-CtaI55qk.js';
2
- import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Tooltip as Tooltip$1, Divider as Divider$2, Table as Table$1, Tabs as Tabs$1, Space as Space$1, Card, Skeleton as Skeleton$1, Popover as Popover$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Flex as Flex$1, Splitter as Splitter$1, Menu as Menu$1, Pagination as Pagination$1, Steps as Steps$1, Tag as Tag$1, Alert as Alert$1, Spin as Spin$1, Drawer as Drawer$1, Popconfirm as Popconfirm$1, QRCode as QRCode$1, Result as Result$1, Rate as Rate$1, Segmented as Segmented$1, Statistic as Statistic$1, Timeline as Timeline$1, Tour as Tour$1, Tree as Tree$1, Typography, Watermark as Watermark$1, Anchor as Anchor$1, Affix, AutoComplete as AutoComplete$1, Input as Input$1, Collapse, ColorPicker, Empty as Empty$2, Image as Image$1 } from 'antd';
1
+ import { j as jsxRuntimeExports, c as Icon, _ as _extends, e as _typeof, P as PnkxField, C as CheckboxField, t as twMerge, u as useForm, d as className, l as lodashExports, f as commonjsGlobal, h as _arrayLikeToArray, i as _unsupportedIterableToArray, w as warningOnce, k as _createClass, m as _classCallCheck, n as _defineProperty, o as _slicedToArray, p as warning$1, q as canUseDom, r as _objectSpread2, s as updateCSS, v as removeCSS, x as _arrayWithHoles, y as _nonIterableRest, z as resetWarned$1, F as FastColor, A as generate, B as presetPrimaryColors, G as presetPalettes, H as _inherits, J as _createSuper, K as _assertThisInitialized, M as _objectWithoutProperties, N as IconContext, I as Input } from './AntdIcon-BS99Z6_t.js';
2
+ import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Tooltip as Tooltip$1, Divider as Divider$2, Table as Table$1, Tabs as Tabs$1, Space as Space$1, Card as Card$1, Skeleton as Skeleton$1, Popover as Popover$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Flex as Flex$1, Splitter as Splitter$1, Menu as Menu$1, Pagination as Pagination$1, Steps as Steps$1, Tag as Tag$1, Alert as Alert$1, Spin as Spin$1, Drawer as Drawer$1, Popconfirm as Popconfirm$1, QRCode as QRCode$1, Result as Result$1, Rate as Rate$1, Segmented as Segmented$1, Statistic as Statistic$1, Timeline as Timeline$1, Tour as Tour$1, Tree as Tree$1, Typography, Watermark as Watermark$1, Anchor as Anchor$1, Affix, AutoComplete as AutoComplete$1, Input as Input$1, Collapse, ColorPicker, Empty as Empty$2, Image as Image$1 } from 'antd';
3
3
  import * as React from 'react';
4
4
  import React__default, { version as version$1, isValidElement, useLayoutEffect as useLayoutEffect$1, useEffect, useRef, useMemo as useMemo$1, useCallback, useState, createContext, memo, useReducer, useContext, Component } from 'react';
5
5
  import ReactDOM__default, { unstable_batchedUpdates, createPortal } from 'react-dom';
@@ -5952,11 +5952,11 @@ const Skeleton = ({ type, skeletonButtonCount }) => {
5952
5952
  children: skeletonButtonCount && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Space$1, { children: renderInputs(skeletonButtonCount) }) })
5953
5953
  }
5954
5954
  ),
5955
- /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Space$1, { direction: "vertical", size: "middle", style: { width: "100%" }, children: renderInputs(10) }) }),
5955
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Space$1, { direction: "vertical", size: "middle", style: { width: "100%" }, children: renderInputs(10) }) }),
5956
5956
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...styles$1.rightAlign, marginTop: 20 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton$1.Input, { size: "small", active: true }) })
5957
5957
  ] });
5958
5958
  }
5959
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "grid", rowGap: 8 }, children: renderInputs(3) }) });
5959
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "grid", rowGap: 8 }, children: renderInputs(3) }) });
5960
5960
  };
5961
5961
  const styles$1 = {
5962
5962
  rightAlign: {
@@ -8441,11 +8441,10 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
8441
8441
  motion: true
8442
8442
  });
8443
8443
 
8444
- function genColorMapToken(seed, _ref) {
8445
- let {
8446
- generateColorPalettes,
8447
- generateNeutralColorPalettes
8448
- } = _ref;
8444
+ function genColorMapToken(seed, {
8445
+ generateColorPalettes,
8446
+ generateNeutralColorPalettes
8447
+ }) {
8449
8448
  const {
8450
8449
  colorSuccess: colorSuccessBase,
8451
8450
  colorWarning: colorWarningBase,
@@ -8885,11 +8884,10 @@ function registerTheme(globalPrefixCls, theme) {
8885
8884
  }
8886
8885
 
8887
8886
  const DisabledContext = /*#__PURE__*/React.createContext(false);
8888
- const DisabledContextProvider = _ref => {
8889
- let {
8890
- children,
8891
- disabled
8892
- } = _ref;
8887
+ const DisabledContextProvider = ({
8888
+ children,
8889
+ disabled
8890
+ }) => {
8893
8891
  const originDisabled = React.useContext(DisabledContext);
8894
8892
  return /*#__PURE__*/React.createElement(DisabledContext.Provider, {
8895
8893
  value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
@@ -8897,11 +8895,10 @@ const DisabledContextProvider = _ref => {
8897
8895
  };
8898
8896
 
8899
8897
  const SizeContext = /*#__PURE__*/React.createContext(undefined);
8900
- const SizeContextProvider = _ref => {
8901
- let {
8902
- children,
8903
- size
8904
- } = _ref;
8898
+ const SizeContextProvider = ({
8899
+ children,
8900
+ size
8901
+ }) => {
8905
8902
  const originSize = React.useContext(SizeContext);
8906
8903
  return /*#__PURE__*/React.createElement(SizeContext.Provider, {
8907
8904
  value: size || originSize
@@ -9614,7 +9611,7 @@ function genStyleUtils(config) {
9614
9611
  };
9615
9612
  }
9616
9613
 
9617
- const version = '5.24.7';
9614
+ const version = '5.25.3';
9618
9615
 
9619
9616
  function isStableColor(color) {
9620
9617
  return color >= 0 && color <= 255;
@@ -9901,8 +9898,7 @@ const getComputedToken = (originToken, overrideToken, theme) => {
9901
9898
  // Format if needed
9902
9899
  mergedDerivativeToken = formatToken(mergedDerivativeToken);
9903
9900
  if (components) {
9904
- Object.entries(components).forEach(_ref => {
9905
- let [key, value] = _ref;
9901
+ Object.entries(components).forEach(([key, value]) => {
9906
9902
  const {
9907
9903
  theme: componentTheme
9908
9904
  } = value,
@@ -11075,10 +11071,9 @@ function MotionWrapper(props) {
11075
11071
  * Warning for ConfigProviderProps.
11076
11072
  * This will be empty function in production.
11077
11073
  */
11078
- const PropWarning = /*#__PURE__*/React.memo(_ref => {
11079
- let {
11080
- dropdownMatchSelectWidth
11081
- } = _ref;
11074
+ const PropWarning = /*#__PURE__*/React.memo(({
11075
+ dropdownMatchSelectWidth
11076
+ }) => {
11082
11077
  const warning = devUseWarning('ConfigProvider');
11083
11078
  warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
11084
11079
  return null;
@@ -11388,8 +11383,7 @@ const ProviderChildren = props => {
11388
11383
  rest = __rest$2(_a, ["algorithm", "token", "components", "cssVar"]);
11389
11384
  const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
11390
11385
  const parsedComponents = {};
11391
- Object.entries(components || {}).forEach(_ref => {
11392
- let [componentName, componentToken] = _ref;
11386
+ Object.entries(components || {}).forEach(([componentName, componentToken]) => {
11393
11387
  const parsedToken = Object.assign({}, componentToken);
11394
11388
  if ('algorithm' in parsedToken) {
11395
11389
  if (parsedToken.algorithm === true) {
@@ -11480,6 +11474,23 @@ function toArray(children) {
11480
11474
  return ret;
11481
11475
  }
11482
11476
 
11477
+ const addMediaQueryListener = (mql, handler) => {
11478
+ // Don't delete here, please keep the code compatible
11479
+ if (typeof (mql === null || mql === void 0 ? void 0 : mql.addEventListener) !== 'undefined') {
11480
+ mql.addEventListener('change', handler);
11481
+ } else if (typeof (mql === null || mql === void 0 ? void 0 : mql.addListener) !== 'undefined') {
11482
+ mql.addListener(handler);
11483
+ }
11484
+ };
11485
+ const removeMediaQueryListener = (mql, handler) => {
11486
+ // Don't delete here, please keep the code compatible
11487
+ if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeEventListener) !== 'undefined') {
11488
+ mql.removeEventListener('change', handler);
11489
+ } else if (typeof (mql === null || mql === void 0 ? void 0 : mql.removeListener) !== 'undefined') {
11490
+ mql.removeListener(handler);
11491
+ }
11492
+ };
11493
+
11483
11494
  const genLayoutStyle = token => {
11484
11495
  const {
11485
11496
  antCls,
@@ -11723,8 +11734,7 @@ const isNumeric = value => !Number.isNaN(Number.parseFloat(value)) && isFinite(v
11723
11734
  const SiderContext = /*#__PURE__*/React.createContext({});
11724
11735
  const generateId = (() => {
11725
11736
  let i = 0;
11726
- return function () {
11727
- let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
11737
+ return (prefix = '') => {
11728
11738
  i += 1;
11729
11739
  return `${prefix}${i}`;
11730
11740
  };
@@ -11782,29 +11792,17 @@ const Sider = /*#__PURE__*/React.forwardRef((props, ref) => {
11782
11792
  };
11783
11793
  useEffect(() => {
11784
11794
  function responsiveHandler(mql) {
11785
- return responsiveHandlerRef.current(mql);
11795
+ var _a;
11796
+ return (_a = responsiveHandlerRef.current) === null || _a === void 0 ? void 0 : _a.call(responsiveHandlerRef, mql);
11786
11797
  }
11787
11798
  let mql;
11788
- if (typeof window !== 'undefined') {
11789
- const {
11790
- matchMedia
11791
- } = window;
11792
- if (matchMedia && breakpoint && breakpoint in dimensionMaxMap) {
11793
- mql = matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
11794
- try {
11795
- mql.addEventListener('change', responsiveHandler);
11796
- } catch (_a) {
11797
- mql.addListener(responsiveHandler);
11798
- }
11799
- responsiveHandler(mql);
11800
- }
11799
+ if (typeof (window === null || window === void 0 ? void 0 : window.matchMedia) !== 'undefined' && breakpoint && breakpoint in dimensionMaxMap) {
11800
+ mql = window.matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
11801
+ addMediaQueryListener(mql, responsiveHandler);
11802
+ responsiveHandler(mql);
11801
11803
  }
11802
11804
  return () => {
11803
- try {
11804
- mql === null || mql === void 0 ? void 0 : mql.removeEventListener('change', responsiveHandler);
11805
- } catch (_a) {
11806
- mql === null || mql === void 0 ? void 0 : mql.removeListener(responsiveHandler);
11807
- }
11805
+ removeMediaQueryListener(mql, responsiveHandler);
11808
11806
  };
11809
11807
  }, [breakpoint]); // in order to accept dynamic 'breakpoint' property, we need to add 'breakpoint' into dependency array.
11810
11808
  useEffect(() => {
@@ -11888,12 +11886,11 @@ var __rest = undefined && undefined.__rest || function (s, e) {
11888
11886
  }
11889
11887
  return t;
11890
11888
  };
11891
- function generator(_ref) {
11892
- let {
11893
- suffixCls,
11894
- tagName,
11895
- displayName
11896
- } = _ref;
11889
+ function generator({
11890
+ suffixCls,
11891
+ tagName,
11892
+ displayName
11893
+ }) {
11897
11894
  return BasicComponent => {
11898
11895
  const Adapter = /*#__PURE__*/React.forwardRef((props, ref) => (/*#__PURE__*/React.createElement(BasicComponent, Object.assign({
11899
11896
  ref: ref,
@@ -12601,10 +12598,23 @@ const AnchorLink = props => {
12601
12598
  href
12602
12599
  });
12603
12600
  scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
12604
- if (replace) {
12605
- e.preventDefault();
12606
- window.location.replace(href);
12601
+ // Support clicking on an anchor does not record history.
12602
+ if (e.defaultPrevented) {
12603
+ return;
12607
12604
  }
12605
+ const isExternalLink = href.startsWith('http://') || href.startsWith('https://');
12606
+ // Support external link
12607
+ if (isExternalLink) {
12608
+ if (replace) {
12609
+ e.preventDefault();
12610
+ window.location.replace(href);
12611
+ }
12612
+ return;
12613
+ }
12614
+ // Handling internal anchor link
12615
+ e.preventDefault();
12616
+ const historyMethod = replace ? 'replaceState' : 'pushState';
12617
+ window.history[historyMethod](null, '', href);
12608
12618
  };
12609
12619
  // =================== Warning =====================
12610
12620
  if (process.env.NODE_ENV !== 'production') {
@@ -12867,4 +12877,8 @@ const BreadcrumbHeading = (props) => {
12867
12877
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: className("flex justify-between items-end"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { items: breadcrumbs }) });
12868
12878
  };
12869
12879
 
12870
- export { PAGE_NUMBER as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Anchor as E, Flex as F, Appfix as G, Heading as H, AutoComplete as I, PnkxCollapse as J, PnkxColorPicker as K, Layout as L, Modal as M, Empty as N, Image as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, ConfirmModal as U, ErrorBoundary as V, Watermark as W, CategoryStatus as X, ActionRowTable as Y, START_PAGE as Z, START_PAGE_SIZE as _, Tooltip as a, PAGE_SIZE as a0, SORT_BY as a1, SORT_DESC as a2, TypeActionRowTable as a3, TypeBulkActions as a4, TypeStatusTable as a5, BulkActions as a6, BreadcrumbHeading as a7, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider$1 as o, Spin as p, Drawer as q, Popconfirm as r, Result as s, typeColorMap as t, Rate as u, Segmented as v, Statistic as w, Timeline as x, Tour as y, Tree as z };
12880
+ const Card = ({ children, ...rest }) => {
12881
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Card$1, { ...rest, children });
12882
+ };
12883
+
12884
+ export { PAGE_NUMBER as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Anchor as E, Flex as F, Appfix as G, Heading as H, AutoComplete as I, PnkxCollapse as J, PnkxColorPicker as K, Layout as L, Modal as M, Empty as N, Image as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, ConfirmModal as U, ErrorBoundary as V, Watermark as W, CategoryStatus as X, ActionRowTable as Y, START_PAGE as Z, START_PAGE_SIZE as _, Tooltip as a, PAGE_SIZE as a0, SORT_BY as a1, SORT_DESC as a2, TypeActionRowTable as a3, TypeBulkActions as a4, TypeStatusTable as a5, BulkActions as a6, BreadcrumbHeading as a7, Card as a8, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider$1 as o, Spin as p, Drawer as q, Popconfirm as r, Result as s, typeColorMap as t, Rate as u, Segmented as v, Statistic as w, Timeline as x, Tour as y, Tree as z };
@@ -1,4 +1,4 @@
1
- import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, c as Icon, _ as _extends, d as className } from './AntdIcon-CtaI55qk.js';
1
+ import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, c as Icon, _ as _extends, d as className } from './AntdIcon-BS99Z6_t.js';
2
2
  import { Select as Select$1, Radio, Upload, Image, Switch as Switch$1 } from 'antd';
3
3
  import * as React from 'react';
4
4
  import { useState } from 'react';
@@ -1,2 +1,2 @@
1
- export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/AntdIcon-CtaI55qk.js';
2
- export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-CigYj8FF.js';
1
+ export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/AntdIcon-BS99Z6_t.js';
2
+ export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-vaUhKEAu.js';
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, C as CascaderField, X as CategoryStatus, f as Col, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from './chunks/BreadcrumbHeading-CSKdtCYe.js';
2
- export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/AntdIcon-CtaI55qk.js';
1
+ export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, a8 as Card, C as CascaderField, X as CategoryStatus, f as Col, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from './chunks/Card-CCVU-3bH.js';
2
+ export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/AntdIcon-BS99Z6_t.js';
3
3
  import 'react-router';
4
- export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-CigYj8FF.js';
4
+ export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-vaUhKEAu.js';
5
5
  export { u as useToast } from './chunks/useToast-DL7nQTK1.js';
6
6
  export { u as useMessage } from './chunks/useMessage-CADDGtSx.js';
package/es/ui/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, C as CascaderField, X as CategoryStatus, f as Col, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from '../chunks/BreadcrumbHeading-CSKdtCYe.js';
2
- export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-CtaI55qk.js';
1
+ export { Y as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, a7 as BreadcrumbHeading, a6 as BulkActions, B as Button, a8 as Card, C as CascaderField, X as CategoryStatus, f as Col, U as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, V as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, $ as PAGE_NUMBER, a0 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a1 as SORT_BY, a2 as SORT_DESC, Z as START_PAGE, _ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a3 as TypeActionRowTable, a4 as TypeBulkActions, a5 as TypeStatusTable, W as Watermark, t as typeColorMap } from '../chunks/Card-CCVU-3bH.js';
2
+ export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-BS99Z6_t.js';
3
3
  import 'react-router';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.113",
4
+ "version": "1.9.119",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -105,8 +105,9 @@
105
105
  "@hookform/resolvers": "^5.0.1",
106
106
  "@pnkx-lib/core": "^1.1.8",
107
107
  "@tailwindcss/cli": "^4.1.6",
108
+ "@tinymce/miniature": "^6.0.0",
108
109
  "@tinymce/tinymce-react": "^6.0.0",
109
- "@vitejs/plugin-react-swc": "^3.9.0",
110
+ "@vitejs/plugin-react-swc": "^3.10.0",
110
111
  "classnames": "^2.5.1",
111
112
  "date-fns": "^4.1.0",
112
113
  "lodash": "^4.17.21",
@@ -0,0 +1,13 @@
1
+ import { ControllerRenderProps, UseFormSetValue, UseFormStateReturn } from 'react-hook-form';
2
+ interface CascaderFieldProps {
3
+ field?: ControllerRenderProps<any, any>;
4
+ formState?: UseFormStateReturn<any>;
5
+ setValue?: UseFormSetValue<any>;
6
+ label?: string;
7
+ required?: boolean;
8
+ afterOnChange?: (value: any) => void;
9
+ classNameContainer?: string;
10
+ classNameSelect?: string;
11
+ }
12
+ export declare const CascaderField: (props: CascaderFieldProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CheckboxProps } from 'antd';
2
+ import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
3
+ export interface CheckboxFieldProps extends Omit<CheckboxProps, "onChange" | "checked"> {
4
+ field?: ControllerRenderProps<any, any>;
5
+ formState?: UseFormStateReturn<any>;
6
+ label?: string;
7
+ required?: boolean;
8
+ afterOnChange?: (checked: boolean) => void;
9
+ customStyleContainer?: string;
10
+ customStyleCheckbox?: string;
11
+ }
12
+ export declare const CheckboxField: (props: CheckboxFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { ReactDatePickerProps } from 'react-datepicker';
3
+ import { ControllerRenderProps, UseFormSetValue, UseFormStateReturn } from 'react-hook-form';
4
+ type TSize = "small" | "medium" | "large";
5
+ export interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
6
+ field?: ControllerRenderProps<any, any>;
7
+ formState?: UseFormStateReturn<any>;
8
+ setValue?: UseFormSetValue<any>;
9
+ customStyleDatepicker?: string;
10
+ disabledInputChange?: boolean;
11
+ required?: boolean;
12
+ dateFormat?: string | string[];
13
+ placeholder?: string;
14
+ label?: string;
15
+ maxDate?: Date;
16
+ showTimeSelect?: boolean;
17
+ customOnChange?: (date: any, event: React.SyntheticEvent<any>) => void;
18
+ customValue?: Date | null;
19
+ size?: TSize;
20
+ }
21
+ export declare const DatePickerField: (props: DatePickerDMYProps) => import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -0,0 +1,13 @@
1
+ import { RangePickerProps } from 'antd/es/date-picker';
2
+ import { Dayjs } from 'dayjs';
3
+ import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
4
+ export interface RangePickerFieldProps extends Omit<RangePickerProps, "value" | "onChange"> {
5
+ field?: ControllerRenderProps<any, any>;
6
+ formState?: UseFormStateReturn<any>;
7
+ label?: string;
8
+ required?: boolean;
9
+ afterOnChange?: (dates: [Dayjs | null, Dayjs | null] | null, dateStrings: [string, string]) => void;
10
+ customStyleContainer?: string;
11
+ customStyleDatePicker?: string;
12
+ }
13
+ export declare const RangePickerField: (props: RangePickerFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { default as React, JSX } from 'react';
2
+ import { InputProps as InputPropsAntd } from 'antd';
3
+ import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
4
+ type CustomInputTypeAttribute = React.HTMLInputTypeAttribute | "money";
5
+ type TInputNumberType = "number" | "money";
6
+ export interface InputProps extends InputPropsAntd {
7
+ field?: ControllerRenderProps<any, any>;
8
+ formState?: UseFormStateReturn<any>;
9
+ label?: string;
10
+ customStyleInput?: string;
11
+ type?: CustomInputTypeAttribute;
12
+ afterOnChange?: (value: number | string | null) => void;
13
+ iconStartInput?: React.ReactNode;
14
+ iconEndInput?: React.ReactNode;
15
+ allowNegative?: boolean;
16
+ decimalScale?: number;
17
+ prefix?: string;
18
+ suffix?: string;
19
+ }
20
+ export declare const Input: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
21
+ export interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
22
+ onChange?: (event: any) => void;
23
+ afterOnChange?: (value: string | number) => void;
24
+ value?: string;
25
+ name?: string;
26
+ ref: any;
27
+ type?: TInputNumberType;
28
+ prefix?: string;
29
+ suffix?: string;
30
+ helperText?: () => JSX.Element | null;
31
+ }
32
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Control } from 'react-hook-form';
2
+ import * as React from "react";
3
+ type ComponentPropsType<TComponent> = TComponent extends React.ComponentType<infer P> ? P : never;
4
+ export type PnkxFieldProps<TComponent extends React.ComponentType<any>> = {
5
+ control: Control<any, any>;
6
+ name: string;
7
+ component: TComponent;
8
+ } & Omit<ComponentPropsType<TComponent>, "control" | "name" | "formState" | "field" | "fieldState">;
9
+ export declare class PnkxField<TComponent extends React.ComponentType<any>> extends React.PureComponent<PnkxFieldProps<TComponent>> {
10
+ render(): import("react/jsx-runtime").JSX.Element;
11
+ }
12
+ export {};
@@ -0,0 +1,19 @@
1
+ import { RadioGroupProps } from 'antd';
2
+ import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
3
+ type TOptionGRadio = {
4
+ label: string;
5
+ value: string | number;
6
+ };
7
+ type TPositionRadio = "before" | "after";
8
+ export interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
9
+ field?: ControllerRenderProps<any, any>;
10
+ formState?: UseFormStateReturn<any>;
11
+ customStyleRadioGroup?: string;
12
+ customStyleRadio?: string;
13
+ customStyleWrap?: string;
14
+ afterOnChange?: (value: any) => void;
15
+ options: TOptionGRadio[];
16
+ position?: TPositionRadio;
17
+ }
18
+ export declare const RadioGroup: (props: RadioProps) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,13 @@
1
+ import { SelectProps } from 'antd';
2
+ import { ControllerRenderProps, UseFormSetValue, UseFormStateReturn } from 'react-hook-form';
3
+ export interface SelectFieldProps extends SelectProps {
4
+ field?: ControllerRenderProps<any, any>;
5
+ formState?: UseFormStateReturn<any>;
6
+ setValue?: UseFormSetValue<any>;
7
+ label?: string;
8
+ required?: boolean;
9
+ afterOnChange?: (value: any) => void;
10
+ classNameContainer?: string;
11
+ classNameSelect?: string;
12
+ }
13
+ export declare const Select: (props: SelectFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { SwitchProps as SwitchAntdProps } from 'antd';
2
+ import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
3
+ export interface SwitchProps extends Omit<SwitchAntdProps, "onChange"> {
4
+ field?: ControllerRenderProps<any, any>;
5
+ formState?: UseFormStateReturn<any>;
6
+ label?: string;
7
+ required?: boolean;
8
+ afterOnChange?: (checked: boolean) => void;
9
+ customStyleContainer?: string;
10
+ customStyleSwitch?: string;
11
+ }
12
+ export declare const Switch: (props: SwitchProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
3
+ import { TextAreaProps as TextAreaPropsAntd } from 'antd/es/input';
4
+ export interface TextAreaProps extends TextAreaPropsAntd {
5
+ field?: ControllerRenderProps<any, any>;
6
+ formState?: UseFormStateReturn<any>;
7
+ label?: string;
8
+ customStyleTextarea?: string;
9
+ afterOnChange?: (value: string) => void;
10
+ required?: boolean;
11
+ }
12
+ declare const _default: React.NamedExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
13
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { IAllProps } from '@tinymce/tinymce-react';
2
+ import { ControllerRenderProps, UseFormStateReturn } from 'react-hook-form';
3
+ export interface TinyProps extends IAllProps {
4
+ height?: number | string;
5
+ openHidenMenubar?: boolean;
6
+ required?: boolean;
7
+ field?: ControllerRenderProps<any, any>;
8
+ formState?: UseFormStateReturn<any>;
9
+ label?: string;
10
+ customStyleLabel?: string;
11
+ text_patterns?: any;
12
+ }
13
+ export declare const TinyMCE: {
14
+ (props: TinyProps): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
@@ -0,0 +1,15 @@
1
+ import { UploadProps, UploadFile } from 'antd';
2
+ import { ControllerRenderProps, UseFormStateReturn, ControllerFieldState } from 'react-hook-form';
3
+ export interface UploadFieldProps extends Omit<UploadProps, "value" | "onChange" | "fileList"> {
4
+ field?: ControllerRenderProps<any, any>;
5
+ formState?: UseFormStateReturn<any>;
6
+ fieldState?: ControllerFieldState;
7
+ label?: string;
8
+ required?: boolean;
9
+ maxFiles?: number;
10
+ uploadButtonText?: string;
11
+ customStyleContainer?: string;
12
+ customStyleUpload?: string;
13
+ afterOnChange?: (fileList: UploadFile[]) => void;
14
+ }
15
+ export declare const UploadField: (props: UploadFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export * from './Input';
2
+ export * from './PnkxField';
3
+ export * from './Select';
4
+ export * from './TinyMCE';
5
+ export * from './Textarea';
6
+ export * from './Radio';
7
+ export * from './Checkbox';
8
+ export * from './DatePicker';
9
+ export * from './DateRangePicker';
10
+ export * from './Upload';
11
+ export * from './Switch';