@pnkx-lib/ui 1.9.536 → 1.9.537
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +2 -2
- package/es/chunks/{index.esm-Dr5ZHcf7.js → index.esm-AaUjBMaK.js} +58 -96
- package/es/chunks/{toArray-GtzhUyP3.js → toArray-DACIS0E1.js} +36 -26
- package/es/constants/index.js +51 -1
- package/es/fields/PnkxField.js +1 -1
- package/es/fields/TinyMCE.js +1 -1
- package/es/index.js +2 -8
- package/es/ui/GenericUploadModal.js +48 -72
- package/es/ui/Layout.js +3 -3
- package/es/ui/SearchFilterForm.js +1 -1
- package/es/ui/Tabs.js +2 -2
- package/es/ui/UploadImage.js +1 -1
- package/es/ui/index.js +6983 -145
- package/package.json +1 -1
- package/es/chunks/RefuseApprovalDropListIcon-DkyYANWt.js +0 -192
- package/es/chunks/table-Btvh90Co.js +0 -50
- package/es/ui/BulkActions/index.js +0 -314
- package/es/ui/Clock/index.js +0 -67
- package/es/ui/CustomeBulkActions/index.js +0 -928
- package/es/ui/Table/index.js +0 -404
- package/es/ui/TableCategory/index.js +0 -4784
- package/es/ui/TableForm/index.js +0 -213
- package/types/ui/BulkActions/index.d.ts +0 -2
- package/types/ui/Clock/index.d.ts +0 -2
- package/types/ui/CustomeBulkActions/index.d.ts +0 -6
- package/types/ui/Table/index.d.ts +0 -2
- package/types/ui/TableCategory/index.d.ts +0 -2
- package/types/ui/TableForm/index.d.ts +0 -2
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Modal, Spin } from 'antd';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { isValidElement, version as version$1, useRef, useLayoutEffect, useEffect, Component, useContext, forwardRef, useMemo as useMemo$1, useState, Children, useImperativeHandle } from 'react';
|
|
5
|
-
import { b as useMemo, i as isFragment$1, L as LocaleContext, l as localeValues, c as useLayoutUpdateEffect, d as Context, _ as _toConsumableArray, u as unit, e as clearFix, f as textEllipsis, g as genStyleHooks, m as merge, r as resetComponent, h as defaultPrefixCls, j as genComponentStyleHook, w as warning, C as ConfigContext, k as useToken, S as SizeContext, n as devUseWarning, p as getAlphaColor, q as getLineHeight, s as genFocusStyle, v as resetIcon, x as genSubStyleComponent, a as useComponentConfig, D as DisabledContext,
|
|
5
|
+
import { b as useMemo, i as isFragment$1, L as LocaleContext, l as localeValues, c as useLayoutUpdateEffect, d as Context, _ as _toConsumableArray, u as unit, e as clearFix, f as textEllipsis, g as genStyleHooks, m as merge, r as resetComponent, h as defaultPrefixCls, j as genComponentStyleHook, w as warning, C as ConfigContext, k as useToken, S as SizeContext, n as devUseWarning, p as getAlphaColor, q as getLineHeight, s as genFocusStyle, v as resetIcon, x as genSubStyleComponent, a as useComponentConfig, D as DisabledContext, o as omit, y as useLayoutEffect$1, t as toArray$2 } from '../chunks/toArray-DACIS0E1.js';
|
|
6
6
|
import * as ReactDOM from 'react-dom';
|
|
7
7
|
import ReactDOM__default, { createPortal, flushSync } from 'react-dom';
|
|
8
8
|
import { c as classNames } from '../chunks/index-xdC7i8zM.js';
|
|
@@ -12,7 +12,7 @@ import { _ as _typeof, b as _defineProperty } from '../chunks/defineProperty-CTL
|
|
|
12
12
|
import { R as RefIcon$7 } from '../chunks/LoadingOutlined-C5-PNVpb.js';
|
|
13
13
|
import { R as RefIcon$8, a as RefIcon$a } from '../chunks/CloseCircleFilled-4jnV3XJV.js';
|
|
14
14
|
import { R as RefIcon$9 } from '../chunks/CloseOutlined-DdLJZQvZ.js';
|
|
15
|
-
import { C as Controller } from '../chunks/index.esm-
|
|
15
|
+
import { C as Controller } from '../chunks/index.esm-AaUjBMaK.js';
|
|
16
16
|
import { toast } from '@pnkx-lib/core';
|
|
17
17
|
import { R as RefIcon$b } from '../chunks/InboxOutlined-W7xl_mLq.js';
|
|
18
18
|
|
|
@@ -1557,17 +1557,19 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
1557
1557
|
i = 0;
|
|
1558
1558
|
}
|
|
1559
1559
|
_regeneratorDefine = function regeneratorDefine(e, r, n, t) {
|
|
1560
|
-
|
|
1561
|
-
_regeneratorDefine(e, r, function (e) {
|
|
1562
|
-
return this._invoke(r, n, e);
|
|
1563
|
-
});
|
|
1564
|
-
}
|
|
1565
|
-
r ? i ? i(e, r, {
|
|
1560
|
+
if (r) i ? i(e, r, {
|
|
1566
1561
|
value: n,
|
|
1567
1562
|
enumerable: !t,
|
|
1568
1563
|
configurable: !t,
|
|
1569
1564
|
writable: !t
|
|
1570
|
-
}) : e[r] = n
|
|
1565
|
+
}) : e[r] = n;else {
|
|
1566
|
+
var o = function o(r, n) {
|
|
1567
|
+
_regeneratorDefine(e, r, function (e) {
|
|
1568
|
+
return this._invoke(r, n, e);
|
|
1569
|
+
});
|
|
1570
|
+
};
|
|
1571
|
+
o("next", 0), o("throw", 1), o("return", 2);
|
|
1572
|
+
}
|
|
1571
1573
|
}, _regeneratorDefine(e, r, n, t);
|
|
1572
1574
|
}
|
|
1573
1575
|
|
|
@@ -3574,7 +3576,7 @@ const genWaveStyle = token => {
|
|
|
3574
3576
|
}
|
|
3575
3577
|
};
|
|
3576
3578
|
};
|
|
3577
|
-
const useStyle$3 = genComponentStyleHook('Wave', genWaveStyle);
|
|
3579
|
+
const useStyle$3 = genComponentStyleHook('Wave', token => [genWaveStyle(token)]);
|
|
3578
3580
|
|
|
3579
3581
|
const TARGET_CLS = `${defaultPrefixCls}-wave-target`;
|
|
3580
3582
|
|
|
@@ -3695,16 +3697,24 @@ function unstableSetRender(render) {
|
|
|
3695
3697
|
function isValidWaveColor(color) {
|
|
3696
3698
|
return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && !/rgba\((?:\d*, ){3}0\)/.test(color) &&
|
|
3697
3699
|
// any transparent rgba color
|
|
3698
|
-
color !== 'transparent'
|
|
3700
|
+
color !== 'transparent';
|
|
3699
3701
|
}
|
|
3700
3702
|
function getTargetWaveColor(node) {
|
|
3701
|
-
var _a;
|
|
3702
3703
|
const {
|
|
3703
3704
|
borderTopColor,
|
|
3704
3705
|
borderColor,
|
|
3705
3706
|
backgroundColor
|
|
3706
3707
|
} = getComputedStyle(node);
|
|
3707
|
-
|
|
3708
|
+
if (isValidWaveColor(borderTopColor)) {
|
|
3709
|
+
return borderTopColor;
|
|
3710
|
+
}
|
|
3711
|
+
if (isValidWaveColor(borderColor)) {
|
|
3712
|
+
return borderColor;
|
|
3713
|
+
}
|
|
3714
|
+
if (isValidWaveColor(backgroundColor)) {
|
|
3715
|
+
return backgroundColor;
|
|
3716
|
+
}
|
|
3717
|
+
return null;
|
|
3708
3718
|
}
|
|
3709
3719
|
|
|
3710
3720
|
function validateNum(value) {
|
|
@@ -4384,13 +4394,6 @@ let AggregationColor = /*#__PURE__*/function () {
|
|
|
4384
4394
|
}]);
|
|
4385
4395
|
}();
|
|
4386
4396
|
|
|
4387
|
-
const generateColor = color => {
|
|
4388
|
-
if (color instanceof AggregationColor) {
|
|
4389
|
-
return color;
|
|
4390
|
-
}
|
|
4391
|
-
return new AggregationColor(color);
|
|
4392
|
-
};
|
|
4393
|
-
|
|
4394
4397
|
const isBright = (value, bgColorToken) => {
|
|
4395
4398
|
const {
|
|
4396
4399
|
r,
|
|
@@ -4432,7 +4435,6 @@ const prepareComponentToken$2 = token => {
|
|
|
4432
4435
|
}), {});
|
|
4433
4436
|
return Object.assign(Object.assign({}, shadowColorTokens), {
|
|
4434
4437
|
fontWeight: 400,
|
|
4435
|
-
iconGap: token.marginXS,
|
|
4436
4438
|
defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,
|
|
4437
4439
|
primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,
|
|
4438
4440
|
dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,
|
|
@@ -4486,7 +4488,7 @@ const genSharedButtonStyle = token => {
|
|
|
4486
4488
|
opacityLoading,
|
|
4487
4489
|
motionDurationSlow,
|
|
4488
4490
|
motionEaseInOut,
|
|
4489
|
-
|
|
4491
|
+
marginXS,
|
|
4490
4492
|
calc
|
|
4491
4493
|
} = token;
|
|
4492
4494
|
return {
|
|
@@ -4494,7 +4496,7 @@ const genSharedButtonStyle = token => {
|
|
|
4494
4496
|
outline: 'none',
|
|
4495
4497
|
position: 'relative',
|
|
4496
4498
|
display: 'inline-flex',
|
|
4497
|
-
gap:
|
|
4499
|
+
gap: token.marginXS,
|
|
4498
4500
|
alignItems: 'center',
|
|
4499
4501
|
justifyContent: 'center',
|
|
4500
4502
|
fontWeight,
|
|
@@ -4546,7 +4548,7 @@ const genSharedButtonStyle = token => {
|
|
|
4546
4548
|
[`&:not(${componentCls}-icon-end)`]: {
|
|
4547
4549
|
[`${componentCls}-loading-icon-motion`]: {
|
|
4548
4550
|
'&-appear-start, &-enter-start': {
|
|
4549
|
-
marginInlineEnd: calc(
|
|
4551
|
+
marginInlineEnd: calc(marginXS).mul(-1).equal()
|
|
4550
4552
|
},
|
|
4551
4553
|
'&-appear-active, &-enter-active': {
|
|
4552
4554
|
marginInlineEnd: 0
|
|
@@ -4555,7 +4557,7 @@ const genSharedButtonStyle = token => {
|
|
|
4555
4557
|
marginInlineEnd: 0
|
|
4556
4558
|
},
|
|
4557
4559
|
'&-leave-active': {
|
|
4558
|
-
marginInlineEnd: calc(
|
|
4560
|
+
marginInlineEnd: calc(marginXS).mul(-1).equal()
|
|
4559
4561
|
}
|
|
4560
4562
|
}
|
|
4561
4563
|
},
|
|
@@ -4563,7 +4565,7 @@ const genSharedButtonStyle = token => {
|
|
|
4563
4565
|
flexDirection: 'row-reverse',
|
|
4564
4566
|
[`${componentCls}-loading-icon-motion`]: {
|
|
4565
4567
|
'&-appear-start, &-enter-start': {
|
|
4566
|
-
marginInlineStart: calc(
|
|
4568
|
+
marginInlineStart: calc(marginXS).mul(-1).equal()
|
|
4567
4569
|
},
|
|
4568
4570
|
'&-appear-active, &-enter-active': {
|
|
4569
4571
|
marginInlineStart: 0
|
|
@@ -4572,7 +4574,7 @@ const genSharedButtonStyle = token => {
|
|
|
4572
4574
|
marginInlineStart: 0
|
|
4573
4575
|
},
|
|
4574
4576
|
'&-leave-active': {
|
|
4575
|
-
marginInlineStart: calc(
|
|
4577
|
+
marginInlineStart: calc(marginXS).mul(-1).equal()
|
|
4576
4578
|
}
|
|
4577
4579
|
}
|
|
4578
4580
|
}
|
|
@@ -4695,10 +4697,8 @@ const genPresetColorStyle = token => {
|
|
|
4695
4697
|
borderColor: activeColor,
|
|
4696
4698
|
background: token.colorBgContainer
|
|
4697
4699
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, lightColor, {
|
|
4698
|
-
color: darkColor,
|
|
4699
4700
|
background: lightHoverColor
|
|
4700
4701
|
}, {
|
|
4701
|
-
color: darkColor,
|
|
4702
4702
|
background: lightBorderColor
|
|
4703
4703
|
})), genTextLinkButtonStyle(token, darkColor, 'link', {
|
|
4704
4704
|
color: hoverColor
|
|
@@ -4724,10 +4724,8 @@ const genDefaultButtonStyle = token => Object.assign(Object.assign(Object.assign
|
|
|
4724
4724
|
color: token.solidTextColor,
|
|
4725
4725
|
background: token.colorBgSolidActive
|
|
4726
4726
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorFillTertiary, {
|
|
4727
|
-
color: token.defaultColor,
|
|
4728
4727
|
background: token.colorFillSecondary
|
|
4729
4728
|
}, {
|
|
4730
|
-
color: token.defaultColor,
|
|
4731
4729
|
background: token.colorFill
|
|
4732
4730
|
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), genTextLinkButtonStyle(token, token.textTextColor, 'link', {
|
|
4733
4731
|
color: token.colorLinkHover,
|
|
@@ -4747,10 +4745,8 @@ const genPrimaryButtonStyle = token => Object.assign(Object.assign(Object.assign
|
|
|
4747
4745
|
borderColor: token.colorPrimaryActive,
|
|
4748
4746
|
background: token.colorBgContainer
|
|
4749
4747
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorPrimaryBg, {
|
|
4750
|
-
color: token.colorPrimary,
|
|
4751
4748
|
background: token.colorPrimaryBgHover
|
|
4752
4749
|
}, {
|
|
4753
|
-
color: token.colorPrimary,
|
|
4754
4750
|
background: token.colorPrimaryBorder
|
|
4755
4751
|
})), genTextLinkButtonStyle(token, token.colorPrimaryText, 'text', {
|
|
4756
4752
|
color: token.colorPrimaryTextHover,
|
|
@@ -4784,10 +4780,8 @@ const genDangerousStyle = token => Object.assign(Object.assign(Object.assign(Obj
|
|
|
4784
4780
|
color: token.colorErrorActive,
|
|
4785
4781
|
borderColor: token.colorErrorActive
|
|
4786
4782
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorErrorBg, {
|
|
4787
|
-
color: token.colorError,
|
|
4788
4783
|
background: token.colorErrorBgFilledHover
|
|
4789
4784
|
}, {
|
|
4790
|
-
color: token.colorError,
|
|
4791
4785
|
background: token.colorErrorBgActive
|
|
4792
4786
|
})), genTextLinkButtonStyle(token, token.colorError, 'text', {
|
|
4793
4787
|
color: token.colorErrorHover,
|
|
@@ -4955,7 +4949,7 @@ const useStyle$2 = genStyleHooks('Button', token => {
|
|
|
4955
4949
|
});
|
|
4956
4950
|
|
|
4957
4951
|
// handle border collapse
|
|
4958
|
-
function compactItemBorder(token, parentCls, options
|
|
4952
|
+
function compactItemBorder(token, parentCls, options) {
|
|
4959
4953
|
const {
|
|
4960
4954
|
focusElCls,
|
|
4961
4955
|
focus,
|
|
@@ -4967,16 +4961,13 @@ function compactItemBorder(token, parentCls, options, prefixCls) {
|
|
|
4967
4961
|
[`&-item:not(${parentCls}-last-item)`]: {
|
|
4968
4962
|
marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal()
|
|
4969
4963
|
},
|
|
4970
|
-
[`&-item:not(${prefixCls}-status-success)`]: {
|
|
4971
|
-
zIndex: 2
|
|
4972
|
-
},
|
|
4973
4964
|
'&-item': Object.assign(Object.assign({
|
|
4974
4965
|
[hoverEffects]: {
|
|
4975
|
-
zIndex:
|
|
4966
|
+
zIndex: 2
|
|
4976
4967
|
}
|
|
4977
4968
|
}, focusElCls ? {
|
|
4978
4969
|
[`&${focusElCls}`]: {
|
|
4979
|
-
zIndex:
|
|
4970
|
+
zIndex: 2
|
|
4980
4971
|
}
|
|
4981
4972
|
} : {}), {
|
|
4982
4973
|
[`&[disabled] ${childCombinator}`]: {
|
|
@@ -5017,22 +5008,19 @@ function genCompactItemStyle(token, options = {
|
|
|
5017
5008
|
} = token;
|
|
5018
5009
|
const compactCls = `${componentCls}-compact`;
|
|
5019
5010
|
return {
|
|
5020
|
-
[compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options
|
|
5011
|
+
[compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))
|
|
5021
5012
|
};
|
|
5022
5013
|
}
|
|
5023
5014
|
|
|
5024
|
-
function compactItemVerticalBorder(token, parentCls
|
|
5015
|
+
function compactItemVerticalBorder(token, parentCls) {
|
|
5025
5016
|
return {
|
|
5026
5017
|
// border collapse
|
|
5027
5018
|
[`&-item:not(${parentCls}-last-item)`]: {
|
|
5028
5019
|
marginBottom: token.calc(token.lineWidth).mul(-1).equal()
|
|
5029
5020
|
},
|
|
5030
|
-
[`&-item:not(${prefixCls}-status-success)`]: {
|
|
5031
|
-
zIndex: 2
|
|
5032
|
-
},
|
|
5033
5021
|
'&-item': {
|
|
5034
5022
|
'&:hover,&:focus,&:active': {
|
|
5035
|
-
zIndex:
|
|
5023
|
+
zIndex: 2
|
|
5036
5024
|
},
|
|
5037
5025
|
'&[disabled]': {
|
|
5038
5026
|
zIndex: 0
|
|
@@ -5062,7 +5050,7 @@ function compactItemBorderVerticalRadius(prefixCls, parentCls) {
|
|
|
5062
5050
|
function genCompactItemVerticalStyle(token) {
|
|
5063
5051
|
const compactCls = `${token.componentCls}-compact-vertical`;
|
|
5064
5052
|
return {
|
|
5065
|
-
[compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls
|
|
5053
|
+
[compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))
|
|
5066
5054
|
};
|
|
5067
5055
|
}
|
|
5068
5056
|
|
|
@@ -5138,7 +5126,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
5138
5126
|
variant,
|
|
5139
5127
|
type,
|
|
5140
5128
|
danger = false,
|
|
5141
|
-
shape
|
|
5129
|
+
shape = 'default',
|
|
5142
5130
|
size: customizeSize,
|
|
5143
5131
|
styles,
|
|
5144
5132
|
disabled: customDisabled,
|
|
@@ -5163,7 +5151,6 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
5163
5151
|
const {
|
|
5164
5152
|
button
|
|
5165
5153
|
} = React__default.useContext(ConfigContext);
|
|
5166
|
-
const shape = customizeShape || (button === null || button === void 0 ? void 0 : button.shape) || 'default';
|
|
5167
5154
|
const [mergedColor, mergedVariant] = useMemo$1(() => {
|
|
5168
5155
|
// >>>>> Local
|
|
5169
5156
|
// Color & Variant
|
|
@@ -5220,7 +5207,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
5220
5207
|
// ========================= Effect =========================
|
|
5221
5208
|
// Loading. Should use `useLayoutEffect` to avoid low perf multiple click issue.
|
|
5222
5209
|
// https://github.com/ant-design/ant-design/issues/51325
|
|
5223
|
-
useLayoutEffect
|
|
5210
|
+
useLayoutEffect(() => {
|
|
5224
5211
|
let delayTimer = null;
|
|
5225
5212
|
if (loadingOrDelay.delay > 0) {
|
|
5226
5213
|
delayTimer = setTimeout(() => {
|
|
@@ -7833,6 +7820,8 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
7833
7820
|
var doc = popupElement.ownerDocument;
|
|
7834
7821
|
var win = getWin(popupElement);
|
|
7835
7822
|
var _win$getComputedStyle = win.getComputedStyle(popupElement),
|
|
7823
|
+
width = _win$getComputedStyle.width,
|
|
7824
|
+
height = _win$getComputedStyle.height,
|
|
7836
7825
|
popupPosition = _win$getComputedStyle.position;
|
|
7837
7826
|
var originLeft = popupElement.style.left;
|
|
7838
7827
|
var originTop = popupElement.style.top;
|
|
@@ -7881,9 +7870,6 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
7881
7870
|
};
|
|
7882
7871
|
}
|
|
7883
7872
|
var popupRect = popupElement.getBoundingClientRect();
|
|
7884
|
-
var _win$getComputedStyle2 = win.getComputedStyle(popupElement),
|
|
7885
|
-
height = _win$getComputedStyle2.height,
|
|
7886
|
-
width = _win$getComputedStyle2.width;
|
|
7887
7873
|
popupRect.x = (_popupRect$x = popupRect.x) !== null && _popupRect$x !== void 0 ? _popupRect$x : popupRect.left;
|
|
7888
7874
|
popupRect.y = (_popupRect$y = popupRect.y) !== null && _popupRect$y !== void 0 ? _popupRect$y : popupRect.top;
|
|
7889
7875
|
var _doc$documentElement = doc.documentElement,
|
|
@@ -8757,10 +8743,6 @@ function generateTrigger() {
|
|
|
8757
8743
|
cloneProps.className = classNames(originChildProps.className, className);
|
|
8758
8744
|
}
|
|
8759
8745
|
|
|
8760
|
-
// ============================ Perf ============================
|
|
8761
|
-
var renderedRef = React.useRef(false);
|
|
8762
|
-
renderedRef.current || (renderedRef.current = forceRender || mergedOpen || inMotion);
|
|
8763
|
-
|
|
8764
8746
|
// =========================== Render ===========================
|
|
8765
8747
|
var mergedChildrenProps = _objectSpread2(_objectSpread2({}, originChildProps), cloneProps);
|
|
8766
8748
|
|
|
@@ -8795,7 +8777,7 @@ function generateTrigger() {
|
|
|
8795
8777
|
onResize: onTargetResize
|
|
8796
8778
|
}, /*#__PURE__*/React.createElement(TriggerWrapper, {
|
|
8797
8779
|
getTriggerDOMNode: getTriggerDOMNode
|
|
8798
|
-
}, triggerNode)),
|
|
8780
|
+
}, triggerNode)), /*#__PURE__*/React.createElement(TriggerContext.Provider, {
|
|
8799
8781
|
value: context
|
|
8800
8782
|
}, /*#__PURE__*/React.createElement(Popup, {
|
|
8801
8783
|
portal: PortalComponent,
|
|
@@ -9481,11 +9463,6 @@ function getPlacements(config) {
|
|
|
9481
9463
|
borderRadius} = config;
|
|
9482
9464
|
const halfArrowWidth = arrowWidth / 2;
|
|
9483
9465
|
const placementMap = {};
|
|
9484
|
-
// Dynamic offset
|
|
9485
|
-
const arrowOffset = getArrowOffsetToken({
|
|
9486
|
-
contentRadius: borderRadius,
|
|
9487
|
-
limitVerticalRadius: true
|
|
9488
|
-
});
|
|
9489
9466
|
Object.keys(PlacementAlignMap).forEach(key => {
|
|
9490
9467
|
const template = arrowPointAtCenter && ArrowCenterPlacementAlignMap[key] || PlacementAlignMap[key];
|
|
9491
9468
|
const placementInfo = Object.assign(Object.assign({}, template), {
|
|
@@ -9520,6 +9497,11 @@ function getPlacements(config) {
|
|
|
9520
9497
|
placementInfo.offset[0] = halfArrowWidth + offset;
|
|
9521
9498
|
break;
|
|
9522
9499
|
}
|
|
9500
|
+
// Dynamic offset
|
|
9501
|
+
const arrowOffset = getArrowOffsetToken({
|
|
9502
|
+
contentRadius: borderRadius,
|
|
9503
|
+
limitVerticalRadius: true
|
|
9504
|
+
});
|
|
9523
9505
|
if (arrowPointAtCenter) {
|
|
9524
9506
|
switch (key) {
|
|
9525
9507
|
case 'topLeft':
|
|
@@ -9591,7 +9573,7 @@ const genTooltipStyle = token => {
|
|
|
9591
9573
|
minWidth: centerAlignMinWidth,
|
|
9592
9574
|
minHeight: controlHeight,
|
|
9593
9575
|
padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,
|
|
9594
|
-
color:
|
|
9576
|
+
color: tooltipColor,
|
|
9595
9577
|
textAlign: 'start',
|
|
9596
9578
|
textDecoration: 'none',
|
|
9597
9579
|
wordWrap: 'break-word',
|
|
@@ -9694,12 +9676,8 @@ function parseColor(prefixCls, color) {
|
|
|
9694
9676
|
});
|
|
9695
9677
|
const overlayStyle = {};
|
|
9696
9678
|
const arrowStyle = {};
|
|
9697
|
-
const rgb = generateColor(color).toRgb();
|
|
9698
|
-
const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;
|
|
9699
|
-
const textColor = luminance < 0.5 ? '#FFF' : '#000';
|
|
9700
9679
|
if (color && !isInternalColor) {
|
|
9701
9680
|
overlayStyle.background = color;
|
|
9702
|
-
overlayStyle['--ant-tooltip-color'] = textColor;
|
|
9703
9681
|
// @ts-ignore
|
|
9704
9682
|
arrowStyle['--antd-arrow-background-color'] = color;
|
|
9705
9683
|
}
|
|
@@ -11068,7 +11046,6 @@ var __awaiter = undefined && undefined.__awaiter || function (thisArg, _argument
|
|
|
11068
11046
|
};
|
|
11069
11047
|
const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;
|
|
11070
11048
|
const InternalUpload = (props, ref) => {
|
|
11071
|
-
const config = useComponentConfig('upload');
|
|
11072
11049
|
const {
|
|
11073
11050
|
fileList,
|
|
11074
11051
|
defaultFileList,
|
|
@@ -11103,7 +11080,6 @@ const InternalUpload = (props, ref) => {
|
|
|
11103
11080
|
// ===================== Disabled =====================
|
|
11104
11081
|
const disabled = React.useContext(DisabledContext);
|
|
11105
11082
|
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
11106
|
-
const customRequest = props.customRequest || config.customRequest;
|
|
11107
11083
|
const [mergedFileList, setMergedFileList] = useMergedState(defaultFileList || [], {
|
|
11108
11084
|
value: fileList,
|
|
11109
11085
|
postState: list => list !== null && list !== void 0 ? list : []
|
|
@@ -11233,6 +11209,7 @@ const InternalUpload = (props, ref) => {
|
|
|
11233
11209
|
const onSuccess = (response, file, xhr) => {
|
|
11234
11210
|
try {
|
|
11235
11211
|
if (typeof response === 'string') {
|
|
11212
|
+
// biome-ignore lint/style/noParameterAssign: we need to modify response
|
|
11236
11213
|
response = JSON.parse(response);
|
|
11237
11214
|
}
|
|
11238
11215
|
} catch (_a) {
|
|
@@ -11325,7 +11302,6 @@ const InternalUpload = (props, ref) => {
|
|
|
11325
11302
|
onProgress,
|
|
11326
11303
|
onSuccess
|
|
11327
11304
|
}, props), {
|
|
11328
|
-
customRequest,
|
|
11329
11305
|
data,
|
|
11330
11306
|
multiple,
|
|
11331
11307
|
action,
|
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-
|
|
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-DACIS0E1.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-xdC7i8zM.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-
|
|
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-KP2HuB_x.js';
|
|
5
5
|
import * as React from 'react';
|
package/es/ui/Tabs.js
CHANGED
|
@@ -29,8 +29,8 @@ const identity = (arg) => arg;
|
|
|
29
29
|
function useStore(api, selector = identity) {
|
|
30
30
|
const slice = React__default.useSyncExternalStore(
|
|
31
31
|
api.subscribe,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
() => selector(api.getState()),
|
|
33
|
+
() => selector(api.getInitialState())
|
|
34
34
|
);
|
|
35
35
|
React__default.useDebugValue(slice);
|
|
36
36
|
return slice;
|
package/es/ui/UploadImage.js
CHANGED