@pnkx-lib/ui 1.9.504 → 1.9.505

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.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useContext, createContext } from 'react';
3
3
  import { _ as _typeof, c as _arrayLikeToArray, a as _unsupportedIterableToArray, b as _defineProperty } from './defineProperty-CTLrw71t.js';
4
- import { w as warningOnce, a as _objectWithoutProperties, b as _objectSpread2, c as _slicedToArray, d as warning$1, e as canUseDom, u as updateCSS, r as removeCSS, _ as _extends, f as _arrayWithHoles, g as _nonIterableRest, h as resetWarned$1, F as FastColor, i as generate, p as presetPrimaryColors, j as presetPalettes, k as IconContext } from './AntdIcon-Bve8mGNz.js';
4
+ import { w as warningOnce, a as _objectWithoutProperties, b as _objectSpread2, c as _slicedToArray, d as warning$2, e as canUseDom, u as updateCSS, r as removeCSS, _ as _extends, f as _arrayWithHoles, g as _nonIterableRest, h as resetWarned$1, F as FastColor, i as generate, p as presetPrimaryColors, j as presetPalettes, k as IconContext } from './AntdIcon-Bve8mGNz.js';
5
5
  import { _ as _createClass, a as _classCallCheck, b as _inherits, c as _createSuper, d as _assertThisInitialized } from './createSuper-C9_dQ5Zr.js';
6
6
 
7
7
  function useMemo(getValue, condition, shouldUpdate) {
@@ -177,7 +177,6 @@ var Entity = /*#__PURE__*/function () {
177
177
  _defineProperty(this, "instanceId", void 0);
178
178
  /** @private Internal cache map. Do not access this directly */
179
179
  _defineProperty(this, "cache", new Map());
180
- _defineProperty(this, "extracted", new Set());
181
180
  this.instanceId = instanceId;
182
181
  }
183
182
  _createClass(Entity, [{
@@ -436,7 +435,7 @@ var Theme = /*#__PURE__*/function () {
436
435
  this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
437
436
  this.id = uuid;
438
437
  if (derivatives.length === 0) {
439
- warning$1(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
438
+ warning$2(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
440
439
  }
441
440
  uuid += 1;
442
441
  }
@@ -576,12 +575,13 @@ function unit$1(num) {
576
575
  return num;
577
576
  }
578
577
  function toStyleStr(style, tokenKey, styleId) {
578
+ var _objectSpread2$1;
579
579
  var customizeAttrs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
580
580
  var plain = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
581
581
  if (plain) {
582
582
  return style;
583
583
  }
584
- var attrs = _objectSpread2(_objectSpread2({}, customizeAttrs), {}, _defineProperty(_defineProperty({}, ATTR_TOKEN, tokenKey), ATTR_MARK, styleId));
584
+ var attrs = _objectSpread2(_objectSpread2({}, customizeAttrs), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, ATTR_TOKEN, tokenKey), _defineProperty(_objectSpread2$1, ATTR_MARK, styleId), _objectSpread2$1));
585
585
  var attrStr = Object.keys(attrs).map(function (attr) {
586
586
  var val = attrs[attr];
587
587
  return val ? "".concat(attr, "=\"").concat(val, "\"") : null;
@@ -693,7 +693,7 @@ var useCleanupRegister = function useCleanupRegister(deps) {
693
693
  function register(fn) {
694
694
  if (cleanupFlag) {
695
695
  if (process.env.NODE_ENV !== 'production') {
696
- warning$1(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
696
+ warning$2(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
697
697
  }
698
698
  return;
699
699
  }
@@ -786,6 +786,7 @@ onCacheEffect) {
786
786
  }, /* eslint-disable react-hooks/exhaustive-deps */
787
787
  [fullPathStr]
788
788
  /* eslint-enable */);
789
+
789
790
  var cacheEntity = globalCache.opGet(fullPathStr);
790
791
 
791
792
  // HMR clean the cache but not trigger `useMemo` again
@@ -865,13 +866,14 @@ var TOKEN_THRESHOLD = 0;
865
866
  // Remove will check current keys first
866
867
  function cleanTokenStyle(tokenKey, instanceId) {
867
868
  tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
868
- var cleanableKeyList = new Set();
869
- tokenKeys.forEach(function (value, key) {
870
- if (value <= 0) cleanableKeyList.add(key);
869
+ var tokenKeyList = Array.from(tokenKeys.keys());
870
+ var cleanableKeyList = tokenKeyList.filter(function (key) {
871
+ var count = tokenKeys.get(key) || 0;
872
+ return count <= 0;
871
873
  });
872
874
 
873
875
  // Should keep tokens under threshold for not to insert style too often
874
- if (tokenKeys.size - cleanableKeyList.size > TOKEN_THRESHOLD) {
876
+ if (tokenKeyList.length - cleanableKeyList.length > TOKEN_THRESHOLD) {
875
877
  cleanableKeyList.forEach(function (key) {
876
878
  removeStyleTags(key, instanceId);
877
879
  tokenKeys.delete(key);
@@ -1952,8 +1954,7 @@ function useStyleRegister(info, styleFn) {
1952
1954
  styleId = _ref3[2];
1953
1955
  if ((fromHMR || autoClear) && isClientSide) {
1954
1956
  removeCSS(styleId, {
1955
- mark: ATTR_MARK,
1956
- attachTo: container
1957
+ mark: ATTR_MARK
1957
1958
  });
1958
1959
  }
1959
1960
  },
@@ -2026,7 +2027,8 @@ function useStyleRegister(info, styleFn) {
2026
2027
  if (!ssrInline || isMergedClientSide || !defaultCache) {
2027
2028
  styleNode = /*#__PURE__*/React.createElement(Empty, null);
2028
2029
  } else {
2029
- styleNode = /*#__PURE__*/React.createElement("style", _extends({}, _defineProperty(_defineProperty({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {
2030
+ var _ref6;
2031
+ styleNode = /*#__PURE__*/React.createElement("style", _extends({}, (_ref6 = {}, _defineProperty(_ref6, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref6, ATTR_MARK, cachedStyleId), _ref6), {
2030
2032
  dangerouslySetInnerHTML: {
2031
2033
  __html: cachedStyleStr
2032
2034
  }
@@ -2113,8 +2115,7 @@ var useCSSVarRegister = function useCSSVarRegister(config, fn) {
2113
2115
  styleId = _ref2[2];
2114
2116
  if (isClientSide) {
2115
2117
  removeCSS(styleId, {
2116
- mark: ATTR_MARK,
2117
- attachTo: container
2118
+ mark: ATTR_MARK
2118
2119
  });
2119
2120
  }
2120
2121
  }, function (_ref3) {
@@ -2258,9 +2259,9 @@ function resetWarned() {
2258
2259
  deprecatedWarnList = null;
2259
2260
  resetWarned$1();
2260
2261
  }
2261
- let _warning = noop$1;
2262
+ let warning = noop$1;
2262
2263
  if (process.env.NODE_ENV !== 'production') {
2263
- _warning = (valid, component, message) => {
2264
+ warning = (valid, component, message) => {
2264
2265
  warningOnce(valid, `[antd: ${component}] ${message}`);
2265
2266
  // StrictMode will inject console which will not throw warning in React 17.
2266
2267
  if (process.env.NODE_ENV === 'test') {
@@ -2268,7 +2269,6 @@ if (process.env.NODE_ENV !== 'production') {
2268
2269
  }
2269
2270
  };
2270
2271
  }
2271
- const warning = _warning;
2272
2272
  const WarningContext = /*#__PURE__*/React.createContext({});
2273
2273
  /**
2274
2274
  * This is a hook but we not named as `useWarning`
@@ -2308,6 +2308,7 @@ const devUseWarning = process.env.NODE_ENV !== 'production' ? component => {
2308
2308
  noopWarning.deprecated = noop$1;
2309
2309
  return noopWarning;
2310
2310
  };
2311
+ const warning$1 = warning;
2311
2312
 
2312
2313
  // ZombieJ: We export single file here since
2313
2314
  // ConfigProvider use this which will make loop deps
@@ -2945,6 +2946,7 @@ function derivative(token) {
2945
2946
  return prev;
2946
2947
  }, {});
2947
2948
  }).reduce((prev, cur) => {
2949
+ // biome-ignore lint/style/noParameterAssign: it is a reduce
2948
2950
  prev = Object.assign(Object.assign({}, prev), cur);
2949
2951
  return prev;
2950
2952
  }, {});
@@ -3075,7 +3077,7 @@ function registerTheme(globalPrefixCls, theme) {
3075
3077
  if (canUseDom()) {
3076
3078
  updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);
3077
3079
  } else {
3078
- process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;
3080
+ process.env.NODE_ENV !== "production" ? warning$1(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;
3079
3081
  }
3080
3082
  }
3081
3083
 
@@ -3768,7 +3770,7 @@ function genStyleUtils(config) {
3768
3770
  };
3769
3771
  }
3770
3772
 
3771
- const version = '5.27.1';
3773
+ const version = '5.26.1';
3772
3774
 
3773
3775
  function isStableColor(color) {
3774
3776
  return color >= 0 && color <= 255;
@@ -4009,6 +4011,17 @@ const unitless = {
4009
4011
  opacityImage: true
4010
4012
  };
4011
4013
  const ignore = {
4014
+ size: true,
4015
+ sizeSM: true,
4016
+ sizeLG: true,
4017
+ sizeMD: true,
4018
+ sizeXS: true,
4019
+ sizeXXS: true,
4020
+ sizeMS: true,
4021
+ sizeXL: true,
4022
+ sizeXXL: true,
4023
+ sizeUnit: true,
4024
+ sizeStep: true,
4012
4025
  motionBase: true,
4013
4026
  motionUnit: true
4014
4027
  };
@@ -4195,11 +4208,11 @@ const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => {
4195
4208
  };
4196
4209
  const genFocusOutline = (token, offset) => ({
4197
4210
  outline: `${unit$1(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
4198
- outlineOffset: 1,
4211
+ outlineOffset: offset !== null && offset !== void 0 ? offset : 1,
4199
4212
  transition: 'outline-offset 0s, outline 0s'
4200
4213
  });
4201
4214
  const genFocusStyle = (token, offset) => ({
4202
- '&:focus-visible': genFocusOutline(token)
4215
+ '&:focus-visible': Object.assign({}, genFocusOutline(token, offset))
4203
4216
  });
4204
4217
  const genIconStyle = iconPrefixCls => ({
4205
4218
  [`.${iconPrefixCls}`]: Object.assign(Object.assign({}, resetIcon()), {
@@ -4263,7 +4276,7 @@ const useResetIconStyle = (iconPrefixCls, csp) => {
4263
4276
  layer: {
4264
4277
  name: 'antd'
4265
4278
  }
4266
- }, () => genIconStyle(iconPrefixCls));
4279
+ }, () => [genIconStyle(iconPrefixCls)]);
4267
4280
  };
4268
4281
 
4269
4282
  const fullClone = Object.assign({}, React);
@@ -4392,7 +4405,7 @@ const setGlobalConfig = props => {
4392
4405
  }
4393
4406
  if (theme) {
4394
4407
  if (isLegacyTheme(theme)) {
4395
- process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') : void 0;
4408
+ process.env.NODE_ENV !== "production" ? warning$1(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') : void 0;
4396
4409
  registerTheme(getGlobalPrefixCls(), theme);
4397
4410
  }
4398
4411
  }
@@ -4474,7 +4487,6 @@ const ProviderChildren = props => {
4474
4487
  tooltip,
4475
4488
  popover,
4476
4489
  popconfirm,
4477
- floatButton,
4478
4490
  floatButtonGroup,
4479
4491
  variant,
4480
4492
  inputNumber,
@@ -4567,7 +4579,6 @@ const ProviderChildren = props => {
4567
4579
  tooltip,
4568
4580
  popover,
4569
4581
  popconfirm,
4570
- floatButton,
4571
4582
  floatButtonGroup,
4572
4583
  variant,
4573
4584
  inputNumber,
@@ -4711,7 +4722,7 @@ ConfigProvider.config = setGlobalConfig;
4711
4722
  ConfigProvider.useConfig = useConfig;
4712
4723
  Object.defineProperty(ConfigProvider, 'SizeContext', {
4713
4724
  get: () => {
4714
- process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
4725
+ process.env.NODE_ENV !== "production" ? warning$1(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
4715
4726
  return SizeContext;
4716
4727
  }
4717
4728
  });
@@ -4737,4 +4748,4 @@ function toArray(children) {
4737
4748
  return ret;
4738
4749
  }
4739
4750
 
4740
- export { genCalc as $, toStyleStr as A, ATTR_CACHE_MAP as B, ConfigContext as C, DisabledContext as D, serialize as E, extract as F, CSS_VAR_PREFIX as G, STYLE_PREFIX as H, extract$1 as I, extract$2 as J, unitlessKeys as K, LocaleContext as L, supportWhere as M, supportLogicProps as N, StyleContext as O, StyleProvider as P, Theme as Q, createCache as R, SizeContext as S, TOKEN_PREFIX as T, createTheme as U, getComputedToken$1 as V, token2CSSVar as W, useCSSVarRegister as X, useCacheToken as Y, useStyleRegister as Z, _toConsumableArray as _, useComponentConfig as a, genStyleUtils as a0, statistic as a1, statisticToken as a2, MotionProvider as a3, merge$1 as a4, get as a5, set as a6, isEqual as a7, useMemo as b, useLayoutUpdateEffect as c, Context as d, useLayoutEffect as e, clearFix as f, genStyleHooks as g, textEllipsis as h, isFragment as i, defaultPrefixCls as j, genComponentStyleHook as k, localeValues as l, merge as m, useToken as n, omit as o, devUseWarning as p, getAlphaColor as q, resetComponent as r, getLineHeight as s, toArray as t, unit$1 as u, genFocusStyle as v, warning as w, resetIcon as x, genSubStyleComponent as y, lintWarning as z };
4751
+ export { genCalc as $, toStyleStr as A, ATTR_CACHE_MAP as B, ConfigContext as C, DisabledContext as D, serialize as E, extract$1 as F, STYLE_PREFIX as G, extract$2 as H, extract as I, CSS_VAR_PREFIX as J, unitlessKeys as K, LocaleContext as L, supportWhere as M, supportLogicProps as N, StyleContext as O, StyleProvider as P, Theme as Q, createCache as R, SizeContext as S, TOKEN_PREFIX as T, createTheme as U, getComputedToken$1 as V, token2CSSVar as W, useCSSVarRegister as X, useCacheToken as Y, useStyleRegister as Z, _toConsumableArray as _, useComponentConfig as a, genStyleUtils as a0, statistic as a1, statisticToken as a2, MotionProvider as a3, merge$1 as a4, get as a5, set as a6, isEqual as a7, useMemo as b, useLayoutUpdateEffect as c, Context as d, useLayoutEffect as e, clearFix as f, genStyleHooks as g, textEllipsis as h, isFragment as i, defaultPrefixCls as j, genComponentStyleHook as k, localeValues as l, merge as m, useToken as n, omit as o, devUseWarning as p, getAlphaColor as q, resetComponent as r, getLineHeight as s, toArray as t, unit$1 as u, genFocusStyle as v, warning$1 as w, resetIcon as x, genSubStyleComponent as y, lintWarning as z };
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { C as Controller } from '../chunks/index.esm-Dr5ZHcf7.js';
3
+ import { C as Controller } from '../chunks/index.esm-AaUjBMaK.js';
4
4
 
5
5
  class PnkxField extends React.PureComponent {
6
6
  render() {
@@ -1898,7 +1898,7 @@ var Editor = /** @class */ (function (_super) {
1898
1898
  };
1899
1899
  Editor.propTypes = EditorPropTypes;
1900
1900
  Editor.defaultProps = {
1901
- cloudChannel: '8',
1901
+ cloudChannel: '7',
1902
1902
  };
1903
1903
  return Editor;
1904
1904
  }(React.Component));
package/es/index.js CHANGED
@@ -2,7 +2,7 @@ export { Button } from './ui/Button.js';
2
2
  export { CascaderField } from './ui/Cascader.js';
3
3
  export { ErrorMessage } from './ui/ErrorMessage.js';
4
4
  export { Typography } from './ui/Typography.js';
5
- export { ActionRowTable, BulkActions, Table, TableCategory } from './ui/index.js';
5
+ export { ActionRowTable, BulkActions, Clock, Table, TableCategory } from './ui/index.js';
6
6
  export { Modal } from './ui/Modal.js';
7
7
  export { Tooltip } from './ui/Tooltip.js';
8
8
  export { Tabs } from './ui/Tabs.js';
@@ -65,7 +65,7 @@ export { ViewPdf } from './ui/ViewPdf.js';
65
65
  export { Sidebar } from './ui/Sidebar/index.js';
66
66
  export { SelectTable } from './ui/SelectTable.js';
67
67
  export { SelectSingleTable } from './ui/SelectSingleTable.js';
68
- export { G as GenericUploadModal } from './chunks/GenericUploadModal-Dhv5_mhq.js';
68
+ export { G as GenericUploadModal } from './chunks/GenericUploadModal-BNQ9cWDf.js';
69
69
  export { Descriptions } from './ui/Descriptions.js';
70
70
  export { Input } from './fields/Input.js';
71
71
  export { PnkxField } from './fields/PnkxField.js';
@@ -1,7 +1,7 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'antd';
3
- export { G as GenericUploadModal } from '../chunks/GenericUploadModal-Dhv5_mhq.js';
4
- import '../chunks/index.esm-Dr5ZHcf7.js';
3
+ export { G as GenericUploadModal } from '../chunks/GenericUploadModal-BNQ9cWDf.js';
4
+ import '../chunks/index.esm-AaUjBMaK.js';
5
5
  import 'react';
6
6
  import '@pnkx-lib/core';
7
7
  import '../chunks/InboxOutlined-BBuIJe6u.js';
package/es/ui/Layout.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { g as genStyleHooks, u as unit, C as ConfigContext, o as omit, t as toArray, a as useComponentConfig, _ as _toConsumableArray } from '../chunks/toArray-2LkvUaha.js';
2
+ import { g as genStyleHooks, u as unit, C as ConfigContext, o as omit, t as toArray, a as useComponentConfig, _ as _toConsumableArray } from '../chunks/toArray-Czwb0MFW.js';
3
3
  import * as React from 'react';
4
4
  import { useContext, useState, useEffect, useRef } from 'react';
5
5
  import { c as classNames } from '../chunks/index-BLRvgOFN.js';
@@ -185,7 +185,7 @@ const prepareComponentToken = token => {
185
185
  };
186
186
  // ============================== Export ==============================
187
187
  const DEPRECATED_TOKENS = [['colorBgBody', 'bodyBg'], ['colorBgHeader', 'headerBg'], ['colorBgTrigger', 'triggerBg']];
188
- const useStyle$1 = genStyleHooks('Layout', genLayoutStyle, prepareComponentToken, {
188
+ const useStyle$1 = genStyleHooks('Layout', token => [genLayoutStyle(token)], prepareComponentToken, {
189
189
  deprecatedTokens: DEPRECATED_TOKENS
190
190
  });
191
191
 
@@ -296,7 +296,7 @@ const genSiderStyle = token => {
296
296
  }
297
297
  };
298
298
  };
299
- const useStyle = genStyleHooks(['Layout', 'Sider'], genSiderStyle, prepareComponentToken, {
299
+ const useStyle = genStyleHooks(['Layout', 'Sider'], token => [genSiderStyle(token)], prepareComponentToken, {
300
300
  deprecatedTokens: DEPRECATED_TOKENS
301
301
  });
302
302
 
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { u as useForm } from '../chunks/index.esm-Dr5ZHcf7.js';
2
+ import { u as useForm } from '../chunks/index.esm-AaUjBMaK.js';
3
3
  import { Button } from './Button.js';
4
4
  import { I as Icon, _ as _extends } from '../chunks/AntdIcon-Bve8mGNz.js';
5
5
  import * as React from 'react';
package/es/ui/Tabs.js CHANGED
@@ -23,14 +23,14 @@ const createStoreImpl = (createState) => {
23
23
  const initialState = state = createState(setState, getState, api);
24
24
  return api;
25
25
  };
26
- const createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
26
+ const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
27
27
 
28
28
  const identity = (arg) => arg;
29
29
  function useStore(api, selector = identity) {
30
30
  const slice = React__default.useSyncExternalStore(
31
31
  api.subscribe,
32
- React__default.useCallback(() => selector(api.getState()), [api, selector]),
33
- React__default.useCallback(() => selector(api.getInitialState()), [api, selector])
32
+ () => selector(api.getState()),
33
+ () => selector(api.getInitialState())
34
34
  );
35
35
  React__default.useDebugValue(slice);
36
36
  return slice;
@@ -41,7 +41,7 @@ const createImpl = (createState) => {
41
41
  Object.assign(useBoundStore, api);
42
42
  return useBoundStore;
43
43
  };
44
- const create = ((createState) => createState ? createImpl(createState) : createImpl);
44
+ const create = (createState) => createState ? createImpl(createState) : createImpl;
45
45
 
46
46
  const useTabStore = create((set) => ({
47
47
  activeTabKey: void 0,
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { C as Controller } from '../chunks/index.esm-Dr5ZHcf7.js';
2
+ import { C as Controller } from '../chunks/index.esm-AaUjBMaK.js';
3
3
  import { UploadComponent } from './UploadComponent.js';
4
4
 
5
5
  const UploadImage = ({