@pnkx-lib/ui 1.9.470 → 1.9.472

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,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import React__default from 'react';
3
2
 
4
3
  var isCheckBoxInput = (element) => element.type === 'checkbox';
@@ -39,12 +38,9 @@ function cloneObject(data) {
39
38
  if (data instanceof Date) {
40
39
  copy = new Date(data);
41
40
  }
42
- else if (data instanceof Set) {
43
- copy = new Set(data);
44
- }
45
41
  else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&
46
42
  (isArray || isObject(data))) {
47
- copy = isArray ? [] : {};
43
+ copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));
48
44
  if (!isArray && !isPlainObject(data)) {
49
45
  copy = data;
50
46
  }
@@ -184,7 +180,7 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
184
180
  return result;
185
181
  };
186
182
 
187
- const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
183
+ const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React__default.useLayoutEffect : React__default.useEffect;
188
184
 
189
185
  /**
190
186
  * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.
@@ -256,12 +252,51 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
256
252
  return get(formValues, names, defaultValue);
257
253
  }
258
254
  if (Array.isArray(names)) {
259
- return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));
255
+ return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName),
256
+ get(formValues, fieldName)));
260
257
  }
261
258
  isGlobal && (_names.watchAll = true);
262
259
  return formValues;
263
260
  };
264
261
 
262
+ var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
263
+
264
+ function deepEqual(object1, object2, _internal_visited = new WeakSet()) {
265
+ if (isPrimitive(object1) || isPrimitive(object2)) {
266
+ return object1 === object2;
267
+ }
268
+ if (isDateObject(object1) && isDateObject(object2)) {
269
+ return object1.getTime() === object2.getTime();
270
+ }
271
+ const keys1 = Object.keys(object1);
272
+ const keys2 = Object.keys(object2);
273
+ if (keys1.length !== keys2.length) {
274
+ return false;
275
+ }
276
+ if (_internal_visited.has(object1) || _internal_visited.has(object2)) {
277
+ return true;
278
+ }
279
+ _internal_visited.add(object1);
280
+ _internal_visited.add(object2);
281
+ for (const key of keys1) {
282
+ const val1 = object1[key];
283
+ if (!keys2.includes(key)) {
284
+ return false;
285
+ }
286
+ if (key !== 'ref') {
287
+ const val2 = object2[key];
288
+ if ((isDateObject(val1) && isDateObject(val2)) ||
289
+ (isObject(val1) && isObject(val2)) ||
290
+ (Array.isArray(val1) && Array.isArray(val2))
291
+ ? !deepEqual(val1, val2, _internal_visited)
292
+ : val1 !== val2) {
293
+ return false;
294
+ }
295
+ }
296
+ }
297
+ return true;
298
+ }
299
+
265
300
  /**
266
301
  * Custom hook to subscribe to field change and isolate re-rendering at the component level.
267
302
  *
@@ -280,18 +315,35 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
280
315
  */
281
316
  function useWatch(props) {
282
317
  const methods = useFormContext();
283
- const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};
318
+ const { control = methods.control, name, defaultValue, disabled, exact, compute, } = props || {};
284
319
  const _defaultValue = React__default.useRef(defaultValue);
285
- const [value, updateValue] = React__default.useState(control._getWatch(name, _defaultValue.current));
320
+ const _compute = React__default.useRef(compute);
321
+ const _computeFormValues = React__default.useRef(undefined);
322
+ _compute.current = compute;
323
+ const defaultValueMemo = React__default.useMemo(() => control._getWatch(name, _defaultValue.current), [control, name]);
324
+ const [value, updateValue] = React__default.useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo);
286
325
  useIsomorphicLayoutEffect(() => control._subscribe({
287
326
  name,
288
327
  formState: {
289
328
  values: true,
290
329
  },
291
330
  exact,
292
- callback: (formState) => !disabled &&
293
- updateValue(generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current)),
294
- }), [name, control, disabled, exact]);
331
+ callback: (formState) => {
332
+ if (!disabled) {
333
+ const formValues = generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current);
334
+ if (_compute.current) {
335
+ const computedFormValues = _compute.current(formValues);
336
+ if (!deepEqual(computedFormValues, _computeFormValues.current)) {
337
+ updateValue(computedFormValues);
338
+ _computeFormValues.current = computedFormValues;
339
+ }
340
+ }
341
+ else {
342
+ updateValue(formValues);
343
+ }
344
+ }
345
+ },
346
+ }), [control, disabled, name, exact]);
295
347
  React__default.useEffect(() => control._removeUnmounted());
296
348
  return value;
297
349
  }
@@ -322,12 +374,13 @@ function useWatch(props) {
322
374
  */
323
375
  function useController(props) {
324
376
  const methods = useFormContext();
325
- const { name, disabled, control = methods.control, shouldUnregister } = props;
377
+ const { name, disabled, control = methods.control, shouldUnregister, defaultValue, } = props;
326
378
  const isArrayField = isNameInFieldArray(control._names.array, name);
379
+ const defaultValueMemo = React__default.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
327
380
  const value = useWatch({
328
381
  control,
329
382
  name,
330
- defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),
383
+ defaultValue: defaultValueMemo,
331
384
  exact: true,
332
385
  });
333
386
  const formState = useFormState({
@@ -341,6 +394,7 @@ function useController(props) {
341
394
  value,
342
395
  ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),
343
396
  }));
397
+ _props.current = props;
344
398
  const fieldState = React__default.useMemo(() => Object.defineProperties({}, {
345
399
  invalid: {
346
400
  enumerable: true,
@@ -526,39 +580,6 @@ var createSubject = () => {
526
580
  };
527
581
  };
528
582
 
529
- var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
530
-
531
- function deepEqual(object1, object2) {
532
- if (isPrimitive(object1) || isPrimitive(object2)) {
533
- return object1 === object2;
534
- }
535
- if (isDateObject(object1) && isDateObject(object2)) {
536
- return object1.getTime() === object2.getTime();
537
- }
538
- const keys1 = Object.keys(object1);
539
- const keys2 = Object.keys(object2);
540
- if (keys1.length !== keys2.length) {
541
- return false;
542
- }
543
- for (const key of keys1) {
544
- const val1 = object1[key];
545
- if (!keys2.includes(key)) {
546
- return false;
547
- }
548
- if (key !== 'ref') {
549
- const val2 = object2[key];
550
- if ((isDateObject(val1) && isDateObject(val2)) ||
551
- (isObject(val1) && isObject(val2)) ||
552
- (Array.isArray(val1) && Array.isArray(val2))
553
- ? !deepEqual(val1, val2)
554
- : val1 !== val2) {
555
- return false;
556
- }
557
- }
558
- }
559
- return true;
560
- }
561
-
562
583
  var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
563
584
 
564
585
  var isFileInput = (element) => element.type === 'file';
@@ -1126,7 +1147,7 @@ function createFormControl(props = {}) {
1126
1147
  errors: _options.errors || {},
1127
1148
  disabled: _options.disabled || false,
1128
1149
  };
1129
- const _fields = {};
1150
+ let _fields = {};
1130
1151
  let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)
1131
1152
  ? cloneObject(_options.defaultValues || _options.values) || {}
1132
1153
  : {};
@@ -1510,7 +1531,7 @@ function createFormControl(props = {}) {
1510
1531
  ? setValues(name, cloneValue, options)
1511
1532
  : setFieldValue(name, cloneValue, options);
1512
1533
  }
1513
- isWatched(name, _names) && _subjects.state.next({ ..._formState });
1534
+ isWatched(name, _names) && _subjects.state.next({ ..._formState, name });
1514
1535
  _subjects.state.next({
1515
1536
  name: _state.mount ? name : undefined,
1516
1537
  values: cloneObject(_formValues),
@@ -1545,8 +1566,10 @@ function createFormControl(props = {}) {
1545
1566
  const watched = isWatched(name, _names, isBlurEvent);
1546
1567
  set(_formValues, name, fieldValue);
1547
1568
  if (isBlurEvent) {
1548
- field._f.onBlur && field._f.onBlur(event);
1549
- delayErrorCallback && delayErrorCallback(0);
1569
+ if (!target || !target.readOnly) {
1570
+ field._f.onBlur && field._f.onBlur(event);
1571
+ delayErrorCallback && delayErrorCallback(0);
1572
+ }
1550
1573
  }
1551
1574
  else if (field._f.onChange) {
1552
1575
  field._f.onChange(event);
@@ -1692,7 +1715,8 @@ function createFormControl(props = {}) {
1692
1715
  };
1693
1716
  const watch = (name, defaultValue) => isFunction(name)
1694
1717
  ? _subjects.state.subscribe({
1695
- next: (payload) => name(_getWatch(undefined, defaultValue), payload),
1718
+ next: (payload) => 'values' in payload &&
1719
+ name(_getWatch(undefined, defaultValue), payload),
1696
1720
  })
1697
1721
  : _getWatch(name, defaultValue, true);
1698
1722
  const _subscribe = (props) => _subjects.state.subscribe({
@@ -1703,6 +1727,7 @@ function createFormControl(props = {}) {
1703
1727
  values: { ..._formValues },
1704
1728
  ..._formState,
1705
1729
  ...formState,
1730
+ defaultValues: _defaultValues,
1706
1731
  });
1707
1732
  }
1708
1733
  },
@@ -1869,14 +1894,14 @@ function createFormControl(props = {}) {
1869
1894
  if (_options.resolver) {
1870
1895
  const { errors, values } = await _runSchema();
1871
1896
  _formState.errors = errors;
1872
- fieldValues = values;
1897
+ fieldValues = cloneObject(values);
1873
1898
  }
1874
1899
  else {
1875
1900
  await executeBuiltInValidation(_fields);
1876
1901
  }
1877
1902
  if (_names.disabled.size) {
1878
1903
  for (const name of _names.disabled) {
1879
- set(fieldValues, name, undefined);
1904
+ unset(fieldValues, name);
1880
1905
  }
1881
1906
  }
1882
1907
  unset(_formState.errors, 'root');
@@ -1972,11 +1997,20 @@ function createFormControl(props = {}) {
1972
1997
  }
1973
1998
  }
1974
1999
  }
1975
- for (const fieldName of _names.mount) {
1976
- setValue(fieldName, get(values, fieldName));
2000
+ if (keepStateOptions.keepFieldsRef) {
2001
+ for (const fieldName of _names.mount) {
2002
+ setValue(fieldName, get(values, fieldName));
2003
+ }
2004
+ }
2005
+ else {
2006
+ _fields = {};
1977
2007
  }
1978
2008
  }
1979
- _formValues = cloneObject(values);
2009
+ _formValues = _options.shouldUnregister
2010
+ ? keepStateOptions.keepDefaultValues
2011
+ ? cloneObject(_defaultValues)
2012
+ : {}
2013
+ : cloneObject(values);
1980
2014
  _subjects.array.next({
1981
2015
  values: { ...values },
1982
2016
  });
@@ -2030,6 +2064,7 @@ function createFormControl(props = {}) {
2030
2064
  ? _formState.isSubmitSuccessful
2031
2065
  : false,
2032
2066
  isSubmitting: false,
2067
+ defaultValues: _defaultValues,
2033
2068
  });
2034
2069
  };
2035
2070
  const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)
@@ -2258,7 +2293,10 @@ function useForm(props = {}) {
2258
2293
  }, [control, formState.isDirty]);
2259
2294
  React__default.useEffect(() => {
2260
2295
  if (props.values && !deepEqual(props.values, _values.current)) {
2261
- control._reset(props.values, control._options.resetOptions);
2296
+ control._reset(props.values, {
2297
+ keepFieldsRef: true,
2298
+ ...control._options.resetOptions,
2299
+ });
2262
2300
  _values.current = props.values;
2263
2301
  updateFormState((state) => ({ ...state }));
2264
2302
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useContext, createContext } from 'react';
3
3
  import { a as _typeof, c as _arrayLikeToArray, _ as _unsupportedIterableToArray, b as _defineProperty } from './defineProperty-CnMPreZi.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--fhhlrN2.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--fhhlrN2.js';
5
5
  import { _ as _createClass, a as _classCallCheck, b as _inherits, c as _createSuper, d as _assertThisInitialized } from './createSuper-DsoUqJ1E.js';
6
6
 
7
7
  function useMemo(getValue, condition, shouldUpdate) {
@@ -177,6 +177,7 @@ 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());
180
181
  this.instanceId = instanceId;
181
182
  }
182
183
  _createClass(Entity, [{
@@ -435,7 +436,7 @@ var Theme = /*#__PURE__*/function () {
435
436
  this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
436
437
  this.id = uuid;
437
438
  if (derivatives.length === 0) {
438
- warning$2(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
439
+ warning$1(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');
439
440
  }
440
441
  uuid += 1;
441
442
  }
@@ -575,13 +576,12 @@ function unit$1(num) {
575
576
  return num;
576
577
  }
577
578
  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), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, ATTR_TOKEN, tokenKey), _defineProperty(_objectSpread2$1, ATTR_MARK, styleId), _objectSpread2$1));
584
+ var attrs = _objectSpread2(_objectSpread2({}, customizeAttrs), {}, _defineProperty(_defineProperty({}, ATTR_TOKEN, tokenKey), ATTR_MARK, styleId));
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$2(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');
696
+ warning$1(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,7 +786,6 @@ onCacheEffect) {
786
786
  }, /* eslint-disable react-hooks/exhaustive-deps */
787
787
  [fullPathStr]
788
788
  /* eslint-enable */);
789
-
790
789
  var cacheEntity = globalCache.opGet(fullPathStr);
791
790
 
792
791
  // HMR clean the cache but not trigger `useMemo` again
@@ -866,14 +865,13 @@ var TOKEN_THRESHOLD = 0;
866
865
  // Remove will check current keys first
867
866
  function cleanTokenStyle(tokenKey, instanceId) {
868
867
  tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
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;
868
+ var cleanableKeyList = new Set();
869
+ tokenKeys.forEach(function (value, key) {
870
+ if (value <= 0) cleanableKeyList.add(key);
873
871
  });
874
872
 
875
873
  // Should keep tokens under threshold for not to insert style too often
876
- if (tokenKeyList.length - cleanableKeyList.length > TOKEN_THRESHOLD) {
874
+ if (tokenKeys.size - cleanableKeyList.size > TOKEN_THRESHOLD) {
877
875
  cleanableKeyList.forEach(function (key) {
878
876
  removeStyleTags(key, instanceId);
879
877
  tokenKeys.delete(key);
@@ -1954,7 +1952,8 @@ function useStyleRegister(info, styleFn) {
1954
1952
  styleId = _ref3[2];
1955
1953
  if ((fromHMR || autoClear) && isClientSide) {
1956
1954
  removeCSS(styleId, {
1957
- mark: ATTR_MARK
1955
+ mark: ATTR_MARK,
1956
+ attachTo: container
1958
1957
  });
1959
1958
  }
1960
1959
  },
@@ -2027,8 +2026,7 @@ function useStyleRegister(info, styleFn) {
2027
2026
  if (!ssrInline || isMergedClientSide || !defaultCache) {
2028
2027
  styleNode = /*#__PURE__*/React.createElement(Empty, null);
2029
2028
  } else {
2030
- var _ref6;
2031
- styleNode = /*#__PURE__*/React.createElement("style", _extends({}, (_ref6 = {}, _defineProperty(_ref6, ATTR_TOKEN, cachedTokenKey), _defineProperty(_ref6, ATTR_MARK, cachedStyleId), _ref6), {
2029
+ styleNode = /*#__PURE__*/React.createElement("style", _extends({}, _defineProperty(_defineProperty({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {
2032
2030
  dangerouslySetInnerHTML: {
2033
2031
  __html: cachedStyleStr
2034
2032
  }
@@ -2115,7 +2113,8 @@ var useCSSVarRegister = function useCSSVarRegister(config, fn) {
2115
2113
  styleId = _ref2[2];
2116
2114
  if (isClientSide) {
2117
2115
  removeCSS(styleId, {
2118
- mark: ATTR_MARK
2116
+ mark: ATTR_MARK,
2117
+ attachTo: container
2119
2118
  });
2120
2119
  }
2121
2120
  }, function (_ref3) {
@@ -2259,9 +2258,9 @@ function resetWarned() {
2259
2258
  deprecatedWarnList = null;
2260
2259
  resetWarned$1();
2261
2260
  }
2262
- let warning = noop$1;
2261
+ let _warning = noop$1;
2263
2262
  if (process.env.NODE_ENV !== 'production') {
2264
- warning = (valid, component, message) => {
2263
+ _warning = (valid, component, message) => {
2265
2264
  warningOnce(valid, `[antd: ${component}] ${message}`);
2266
2265
  // StrictMode will inject console which will not throw warning in React 17.
2267
2266
  if (process.env.NODE_ENV === 'test') {
@@ -2269,6 +2268,7 @@ if (process.env.NODE_ENV !== 'production') {
2269
2268
  }
2270
2269
  };
2271
2270
  }
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,7 +2308,6 @@ 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;
2312
2311
 
2313
2312
  // ZombieJ: We export single file here since
2314
2313
  // ConfigProvider use this which will make loop deps
@@ -2946,7 +2945,6 @@ function derivative(token) {
2946
2945
  return prev;
2947
2946
  }, {});
2948
2947
  }).reduce((prev, cur) => {
2949
- // biome-ignore lint/style/noParameterAssign: it is a reduce
2950
2948
  prev = Object.assign(Object.assign({}, prev), cur);
2951
2949
  return prev;
2952
2950
  }, {});
@@ -3077,7 +3075,7 @@ function registerTheme(globalPrefixCls, theme) {
3077
3075
  if (canUseDom()) {
3078
3076
  updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);
3079
3077
  } else {
3080
- process.env.NODE_ENV !== "production" ? warning$1(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;
3078
+ process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;
3081
3079
  }
3082
3080
  }
3083
3081
 
@@ -3770,7 +3768,7 @@ function genStyleUtils(config) {
3770
3768
  };
3771
3769
  }
3772
3770
 
3773
- const version = '5.26.1';
3771
+ const version = '5.27.1';
3774
3772
 
3775
3773
  function isStableColor(color) {
3776
3774
  return color >= 0 && color <= 255;
@@ -4011,17 +4009,6 @@ const unitless = {
4011
4009
  opacityImage: true
4012
4010
  };
4013
4011
  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,
4025
4012
  motionBase: true,
4026
4013
  motionUnit: true
4027
4014
  };
@@ -4208,11 +4195,11 @@ const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont) => {
4208
4195
  };
4209
4196
  const genFocusOutline = (token, offset) => ({
4210
4197
  outline: `${unit$1(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
4211
- outlineOffset: offset !== null && offset !== void 0 ? offset : 1,
4198
+ outlineOffset: 1,
4212
4199
  transition: 'outline-offset 0s, outline 0s'
4213
4200
  });
4214
4201
  const genFocusStyle = (token, offset) => ({
4215
- '&:focus-visible': Object.assign({}, genFocusOutline(token, offset))
4202
+ '&:focus-visible': genFocusOutline(token)
4216
4203
  });
4217
4204
  const genIconStyle = iconPrefixCls => ({
4218
4205
  [`.${iconPrefixCls}`]: Object.assign(Object.assign({}, resetIcon()), {
@@ -4276,7 +4263,7 @@ const useResetIconStyle = (iconPrefixCls, csp) => {
4276
4263
  layer: {
4277
4264
  name: 'antd'
4278
4265
  }
4279
- }, () => [genIconStyle(iconPrefixCls)]);
4266
+ }, () => genIconStyle(iconPrefixCls));
4280
4267
  };
4281
4268
 
4282
4269
  const fullClone = Object.assign({}, React);
@@ -4405,7 +4392,7 @@ const setGlobalConfig = props => {
4405
4392
  }
4406
4393
  if (theme) {
4407
4394
  if (isLegacyTheme(theme)) {
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;
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;
4409
4396
  registerTheme(getGlobalPrefixCls(), theme);
4410
4397
  }
4411
4398
  }
@@ -4487,6 +4474,7 @@ const ProviderChildren = props => {
4487
4474
  tooltip,
4488
4475
  popover,
4489
4476
  popconfirm,
4477
+ floatButton,
4490
4478
  floatButtonGroup,
4491
4479
  variant,
4492
4480
  inputNumber,
@@ -4579,6 +4567,7 @@ const ProviderChildren = props => {
4579
4567
  tooltip,
4580
4568
  popover,
4581
4569
  popconfirm,
4570
+ floatButton,
4582
4571
  floatButtonGroup,
4583
4572
  variant,
4584
4573
  inputNumber,
@@ -4722,7 +4711,7 @@ ConfigProvider.config = setGlobalConfig;
4722
4711
  ConfigProvider.useConfig = useConfig;
4723
4712
  Object.defineProperty(ConfigProvider, 'SizeContext', {
4724
4713
  get: () => {
4725
- process.env.NODE_ENV !== "production" ? warning$1(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
4714
+ process.env.NODE_ENV !== "production" ? warning(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
4726
4715
  return SizeContext;
4727
4716
  }
4728
4717
  });
@@ -4748,4 +4737,4 @@ function toArray(children) {
4748
4737
  return ret;
4749
4738
  }
4750
4739
 
4751
- export { get 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, set as a0, genCalc as a1, genStyleUtils as a2, statistic as a3, statisticToken as a4, MotionProvider as a5, merge$1 as a6, isEqual as a7, _toArray as a8, 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 };
4740
+ export { get 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, set as a0, genCalc as a1, genStyleUtils as a2, statistic as a3, statisticToken as a4, MotionProvider as a5, merge$1 as a6, isEqual as a7, _toArray as a8, 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 };
@@ -48,8 +48,8 @@ const CalendarIcon = ({
48
48
  children: /* @__PURE__ */ jsx(
49
49
  "path",
50
50
  {
51
- "fill-rule": "evenodd",
52
- "clip-rule": "evenodd",
51
+ fillRule: "evenodd",
52
+ clipRule: "evenodd",
53
53
  d: "M1.5 1H3.5V0H4.5V1H8.5V0L9.5 0V1H11.5C12.0523 1 12.5 1.44772 12.5 2V11C12.5 11.5523 12.0523 12 11.5 12H1.5C0.947715 12 0.5 11.5523 0.5 11V2C0.5 1.44772 0.947715 1 1.5 1ZM1.5 2V4H11.5V2H9.5V3H8.5V2H4.5V3H3.5V2H1.5ZM1.5 5V11H11.5V5H1.5Z",
54
54
  fill: color || "#007BE5"
55
55
  }
@@ -1292,6 +1292,8 @@ const Input = (props) => {
1292
1292
  inputPassword,
1293
1293
  toUpperCaseValue,
1294
1294
  allowClear,
1295
+ subLabel,
1296
+ classNameSubLabel,
1295
1297
  ...restProps
1296
1298
  } = props;
1297
1299
  const { name, value, onChange, onBlur } = field || {};
@@ -1401,16 +1403,29 @@ const Input = (props) => {
1401
1403
  renderErrorMessage()
1402
1404
  ] });
1403
1405
  };
1406
+ const renderLabel = () => {
1407
+ if (label)
1408
+ return /* @__PURE__ */ jsx(
1409
+ Label,
1410
+ {
1411
+ label,
1412
+ required,
1413
+ classNameLabel
1414
+ }
1415
+ );
1416
+ return /* @__PURE__ */ jsx(Fragment, {});
1417
+ };
1418
+ const renderSubLabel = () => {
1419
+ if (label && subLabel)
1420
+ return /* @__PURE__ */ jsxs("div", { className: "label-input-container", children: [
1421
+ renderLabel(),
1422
+ /* @__PURE__ */ jsx(Label, { label: subLabel, classNameLabel: twMerge("default-class-name-subLabel", classNameSubLabel), isSubLabel: true })
1423
+ ] });
1424
+ return /* @__PURE__ */ jsx(Fragment, {});
1425
+ };
1404
1426
  //! Render
1405
1427
  return /* @__PURE__ */ jsxs("div", { children: [
1406
- label && /* @__PURE__ */ jsx(
1407
- Label,
1408
- {
1409
- label,
1410
- required,
1411
- classNameLabel
1412
- }
1413
- ),
1428
+ subLabel ? renderSubLabel() : renderLabel(),
1414
1429
  wrapWithTooltip(renderInput())
1415
1430
  ] });
1416
1431
  };
@@ -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-AaUjBMaK.js';
3
+ import { C as Controller } from '../chunks/index.esm-Dr5ZHcf7.js';
4
4
 
5
5
  class PnkxField extends React.PureComponent {
6
6
  render() {
@@ -1899,7 +1899,7 @@ var Editor = /** @class */ (function (_super) {
1899
1899
  };
1900
1900
  Editor.propTypes = EditorPropTypes;
1901
1901
  Editor.defaultProps = {
1902
- cloudChannel: '7',
1902
+ cloudChannel: '8',
1903
1903
  };
1904
1904
  return Editor;
1905
1905
  }(React.Component));
package/es/index.js CHANGED
@@ -9,7 +9,7 @@ export { Tabs } from './ui/Tabs.js';
9
9
  export { Label } from './ui/Label.js';
10
10
  export { Skeleton } from './ui/Skeleton.js';
11
11
  export { Popover } from './ui/Popover.js';
12
- export { S as SearchFiltersForm } from './chunks/SearchFilterForm-CM9k7uMH.js';
12
+ export { S as SearchFiltersForm } from './chunks/SearchFilterForm-dvW624w0.js';
13
13
  export { Container } from './ui/Container.js';
14
14
  export { Badge, typeColorMap } from './ui/Badge.js';
15
15
  export { Col } from './ui/Col.js';
@@ -17,7 +17,7 @@ export { Row } from './ui/Row.js';
17
17
  export { Dropdown } from './ui/Dropdown.js';
18
18
  export { Breadcrumb } from './ui/Breadcrumb.js';
19
19
  export { Flex } from './ui/Flex.js';
20
- export { L as Layout } from './chunks/Layout-CKB513d1.js';
20
+ export { L as Layout } from './chunks/Layout-CRPluSOs.js';
21
21
  export { Space } from './ui/Space.js';
22
22
  export { Splitter } from './ui/Splitter.js';
23
23
  export { Menu } from './ui/Menu.js';
@@ -62,10 +62,10 @@ export { E as ExportFile } from './chunks/ExportFile-HZ8zFqRV.js';
62
62
  export { UploadComponent } from './ui/UploadComponent.js';
63
63
  export { useAppMessage } from './ui/Message.js';
64
64
  export { ViewPdf } from './ui/ViewPdf.js';
65
- export { S as Sidebar } from './chunks/index-BibqnkND.js';
65
+ export { S as Sidebar } from './chunks/index-DU8HgOXv.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-Ztzn56i9.js';
68
+ export { G as GenericUploadModal } from './chunks/GenericUploadModal-ClzfSP57.js';
69
69
  export { Input } from './fields/Input.js';
70
70
  export { PnkxField } from './fields/PnkxField.js';
71
71
  export { Select } from './fields/Select.js';
@@ -1,7 +1,7 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'antd';
3
- export { G as GenericUploadModal } from '../chunks/GenericUploadModal-Ztzn56i9.js';
4
- import '../chunks/index.esm-AaUjBMaK.js';
3
+ export { G as GenericUploadModal } from '../chunks/GenericUploadModal-ClzfSP57.js';
4
+ import '../chunks/index.esm-Dr5ZHcf7.js';
5
5
  import 'react';
6
6
  import '@pnkx-lib/core';
7
7
  import '../chunks/InboxOutlined-BSPALM_S.js';
package/es/ui/Label.js CHANGED
@@ -2,12 +2,12 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { t as twMerge } from '../chunks/bundle-mjs-BME7zF0Z.js';
3
3
  import { Typography } from './Typography.js';
4
4
 
5
- const Label = ({ label, required, classNameLabel }) => {
5
+ const Label = ({ label, required, classNameLabel, isSubLabel }) => {
6
6
  //! State
7
7
  //! Function
8
8
  //! Render
9
9
  return /* @__PURE__ */ jsxs("div", { className: twMerge("flex gap-1 mb-2 items-baseline", classNameLabel), children: [
10
- /* @__PURE__ */ jsx(Typography.Text, { children: label }),
10
+ /* @__PURE__ */ jsx(Typography.Text, { className: twMerge(isSubLabel ? "!text-[#8C93A3]" : ""), children: label }),
11
11
  required && /* @__PURE__ */ jsx("span", { className: "text-red-600 h-0", children: "*" })
12
12
  ] });
13
13
  };
package/es/ui/Layout.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'react/jsx-runtime';
2
- export { L as Layout } from '../chunks/Layout-CKB513d1.js';
2
+ export { L as Layout } from '../chunks/Layout-CRPluSOs.js';