@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.
- package/dist/style.css +2 -2
- package/es/assets/{ui-Dqfe-FBg.css → ui-U4G0iQfu.css} +107 -0
- package/es/chunks/{GenericUploadModal-Dhv5_mhq.js → GenericUploadModal-BNQ9cWDf.js} +48 -72
- package/es/chunks/{index.esm-Dr5ZHcf7.js → index.esm-AaUjBMaK.js} +58 -96
- package/es/chunks/{toArray-2LkvUaha.js → toArray-Czwb0MFW.js} +38 -27
- package/es/fields/PnkxField.js +1 -1
- package/es/fields/TinyMCE.js +1 -1
- package/es/index.js +2 -2
- package/es/ui/GenericUploadModal.js +2 -2
- package/es/ui/Layout.js +3 -3
- package/es/ui/SearchFilterForm.js +1 -1
- package/es/ui/Tabs.js +4 -4
- package/es/ui/UploadImage.js +1 -1
- package/es/ui/index.js +2145 -2098
- package/package.json +2 -2
- package/types/components/ui/Clock/index.d.ts +2 -0
- package/types/components/ui/CustomeBulkActions/BulkAction.d.ts +0 -0
- package/types/components/ui/CustomeBulkActions/ConvertData.d.ts +25 -0
- package/types/components/ui/CustomeBulkActions/DropListAction.d.ts +0 -0
- package/types/components/ui/CustomeBulkActions/index.d.ts +15 -0
- package/types/components/ui/TableCategory/index.d.ts +3 -1
- package/types/components/ui/index.d.ts +1 -0
- package/types/constants/bulkAction.d.ts +25 -0
package/es/ui/index.js
CHANGED
|
@@ -63,9 +63,9 @@ import { a as getAugmentedNamespace, g as getDefaultExportFromCjs } from '../chu
|
|
|
63
63
|
import { r as requireClassnames, c as classNames } from '../chunks/index-BLRvgOFN.js';
|
|
64
64
|
import { F as FastColor, m as blue, n as blueDark, o as cyan, q as cyanDark, s as geekblue, t as geekblueDark, i as generate, v as gold, x as goldDark, y as gray, z as green, A as greenDark, B as grey, C as greyDark, D as lime, E as limeDark, G as magenta, H as magentaDark, J as orange, K as orangeDark, L as presetDarkPalettes, j as presetPalettes, p as presetPrimaryColors, M as purple, N as purpleDark, O as red, P as redDark, Q as volcano, R as volcanoDark, S as yellow, T as yellowDark, c as _slicedToArray, b as _objectSpread2, w as warningOnce, a as _objectWithoutProperties, _ as _extends$1 } from '../chunks/AntdIcon-Bve8mGNz.js';
|
|
65
65
|
import { b as _defineProperty, _ as _typeof$1 } from '../chunks/defineProperty-CTLrw71t.js';
|
|
66
|
-
import { z as lintWarning, A as toStyleStr, B as ATTR_CACHE_MAP, E as serialize, F as extract, G as
|
|
67
|
-
import { K as Keyframe, C as CSSMotion, a as CSSMotionList, T as Tooltip, P as Popup, _ as _asyncToGenerator, b as _regeneratorRuntime, c as Color, u as useEvent$2, d as useMergedState$1,
|
|
68
|
-
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-
|
|
66
|
+
import { z as lintWarning, A as toStyleStr, B as ATTR_CACHE_MAP, E as serialize, F as extract, G as STYLE_PREFIX, H as extract$1, T as TOKEN_PREFIX, I as extract$2, J as CSS_VAR_PREFIX, K as unitlessKeys, M as supportWhere, N as supportLogicProps, O as StyleContext, P as StyleProvider, Q as Theme, R as createCache, U as createTheme, V as getComputedToken, W as token2CSSVar, u as unit$1, X as useCSSVarRegister, Y as useCacheToken, Z as useStyleRegister, $ as genCalc$1, a0 as genStyleUtils$1, m as merge, a1 as statistic, a2 as statisticToken, a3 as MotionProvider, _ as _toConsumableArray, a4 as merge$1, a5 as get$1, a6 as set$1, a7 as isEqual$1, t as toArray$3 } from '../chunks/toArray-Czwb0MFW.js';
|
|
67
|
+
import { K as Keyframe, C as CSSMotion, a as CSSMotionList, T as Tooltip, P as Popup, _ as _asyncToGenerator, b as _regeneratorRuntime, r as requireReactIs, c as Color, u as useEvent$2, d as useMergedState$1, p as pickAttrs } from '../chunks/GenericUploadModal-BNQ9cWDf.js';
|
|
68
|
+
export { G as GenericUploadModal } from '../chunks/GenericUploadModal-BNQ9cWDf.js';
|
|
69
69
|
import { _ as _createClass, a as _classCallCheck, b as _inherits, c as _createSuper, d as _assertThisInitialized, e as _isNativeReflectConstruct, f as _setPrototypeOf, g as _getPrototypeOf } from '../chunks/createSuper-C9_dQ5Zr.js';
|
|
70
70
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
71
71
|
import { isEmpty, isBoolean } from 'lodash';
|
|
@@ -83,7 +83,7 @@ export { useAppMessage } from './Message.js';
|
|
|
83
83
|
export { ViewPdf } from './ViewPdf.js';
|
|
84
84
|
export { SelectTable } from './SelectTable.js';
|
|
85
85
|
export { SelectSingleTable } from './SelectSingleTable.js';
|
|
86
|
-
import { u as useForm$1 } from '../chunks/index.esm-
|
|
86
|
+
import { u as useForm$1 } from '../chunks/index.esm-AaUjBMaK.js';
|
|
87
87
|
import { Checkbox } from '../fields/Checkbox.js';
|
|
88
88
|
import { PnkxField } from '../fields/PnkxField.js';
|
|
89
89
|
export { Descriptions } from './Descriptions.js';
|
|
@@ -828,7 +828,8 @@ var linter = function linter(key, value, info) {
|
|
|
828
828
|
}
|
|
829
829
|
};
|
|
830
830
|
|
|
831
|
-
var
|
|
831
|
+
var _ExtractStyleFns;
|
|
832
|
+
var ExtractStyleFns = (_ExtractStyleFns = {}, _defineProperty(_ExtractStyleFns, STYLE_PREFIX, extract), _defineProperty(_ExtractStyleFns, TOKEN_PREFIX, extract$1), _defineProperty(_ExtractStyleFns, CSS_VAR_PREFIX, extract$2), _ExtractStyleFns);
|
|
832
833
|
function isNotNull(value) {
|
|
833
834
|
return value !== null;
|
|
834
835
|
}
|
|
@@ -839,9 +840,7 @@ function extractStyle(cache, options) {
|
|
|
839
840
|
_ref$plain = _ref.plain,
|
|
840
841
|
plain = _ref$plain === void 0 ? false : _ref$plain,
|
|
841
842
|
_ref$types = _ref.types,
|
|
842
|
-
types = _ref$types === void 0 ? ['style', 'token', 'cssVar'] : _ref$types
|
|
843
|
-
_ref$once = _ref.once,
|
|
844
|
-
once = _ref$once === void 0 ? false : _ref$once;
|
|
843
|
+
types = _ref$types === void 0 ? ['style', 'token', 'cssVar'] : _ref$types;
|
|
845
844
|
var matchPrefixRegexp = new RegExp("^(".concat((typeof types === 'string' ? [types] : types).join('|'), ")%"));
|
|
846
845
|
|
|
847
846
|
// prefix with `style` is used for `useStyleRegister` to cache style context
|
|
@@ -856,9 +855,6 @@ function extractStyle(cache, options) {
|
|
|
856
855
|
var cachePathMap = {};
|
|
857
856
|
var styleText = '';
|
|
858
857
|
styleKeys.map(function (key) {
|
|
859
|
-
if (once && cache.extracted.has(key)) {
|
|
860
|
-
return null; // Skip if already extracted
|
|
861
|
-
}
|
|
862
858
|
var cachePath = key.replace(matchPrefixRegexp, '').replace(/%/g, '|');
|
|
863
859
|
var _key$split = key.split('%'),
|
|
864
860
|
_key$split2 = _slicedToArray(_key$split, 1),
|
|
@@ -877,9 +873,6 @@ function extractStyle(cache, options) {
|
|
|
877
873
|
if (key.startsWith('style')) {
|
|
878
874
|
cachePathMap[cachePath] = styleId;
|
|
879
875
|
}
|
|
880
|
-
|
|
881
|
-
// record that this style has been extracted
|
|
882
|
-
cache.extracted.add(key);
|
|
883
876
|
return [order, styleStr];
|
|
884
877
|
}).filter(isNotNull).sort(function (_ref2, _ref3) {
|
|
885
878
|
var _ref4 = _slicedToArray(_ref2, 1),
|
|
@@ -3532,24 +3525,23 @@ function requireWarning () {
|
|
|
3532
3525
|
warning$1.noop = noop;
|
|
3533
3526
|
warning$1.resetWarned = resetWarned;
|
|
3534
3527
|
var React = _interopRequireWildcard(React__default);
|
|
3535
|
-
var
|
|
3528
|
+
var _warning = _interopRequireWildcard(/*@__PURE__*/ requireWarning$1());
|
|
3536
3529
|
function noop() {}
|
|
3537
3530
|
let deprecatedWarnList = null;
|
|
3538
3531
|
function resetWarned() {
|
|
3539
3532
|
deprecatedWarnList = null;
|
|
3540
|
-
(0,
|
|
3533
|
+
(0, _warning.resetWarned)();
|
|
3541
3534
|
}
|
|
3542
|
-
let
|
|
3535
|
+
let warning = noop;
|
|
3543
3536
|
if (process.env.NODE_ENV !== 'production') {
|
|
3544
|
-
|
|
3545
|
-
(0,
|
|
3537
|
+
warning = (valid, component, message) => {
|
|
3538
|
+
(0, _warning.default)(valid, `[antd: ${component}] ${message}`);
|
|
3546
3539
|
// StrictMode will inject console which will not throw warning in React 17.
|
|
3547
3540
|
if (process.env.NODE_ENV === 'test') {
|
|
3548
3541
|
resetWarned();
|
|
3549
3542
|
}
|
|
3550
3543
|
};
|
|
3551
3544
|
}
|
|
3552
|
-
const warning = _warning;
|
|
3553
3545
|
const WarningContext = warning$1.WarningContext = /*#__PURE__*/React.createContext({});
|
|
3554
3546
|
/**
|
|
3555
3547
|
* This is a hook but we not named as `useWarning`
|
|
@@ -4654,6 +4646,7 @@ function require_default () {
|
|
|
4654
4646
|
return prev;
|
|
4655
4647
|
}, {});
|
|
4656
4648
|
}).reduce((prev, cur) => {
|
|
4649
|
+
// biome-ignore lint/style/noParameterAssign: it is a reduce
|
|
4657
4650
|
prev = Object.assign(Object.assign({}, prev), cur);
|
|
4658
4651
|
return prev;
|
|
4659
4652
|
}, {});
|
|
@@ -5027,7 +5020,7 @@ function requireVersion$1 () {
|
|
|
5027
5020
|
value: true
|
|
5028
5021
|
});
|
|
5029
5022
|
version.default = void 0;
|
|
5030
|
-
version.default = '5.
|
|
5023
|
+
version.default = '5.26.1';
|
|
5031
5024
|
return version;
|
|
5032
5025
|
}
|
|
5033
5026
|
|
|
@@ -5339,6 +5332,17 @@ function requireUseToken () {
|
|
|
5339
5332
|
opacityImage: true
|
|
5340
5333
|
};
|
|
5341
5334
|
const ignore = useToken.ignore = {
|
|
5335
|
+
size: true,
|
|
5336
|
+
sizeSM: true,
|
|
5337
|
+
sizeLG: true,
|
|
5338
|
+
sizeMD: true,
|
|
5339
|
+
sizeXS: true,
|
|
5340
|
+
sizeXXS: true,
|
|
5341
|
+
sizeMS: true,
|
|
5342
|
+
sizeXL: true,
|
|
5343
|
+
sizeXXL: true,
|
|
5344
|
+
sizeUnit: true,
|
|
5345
|
+
sizeStep: true,
|
|
5342
5346
|
motionBase: true,
|
|
5343
5347
|
motionUnit: true
|
|
5344
5348
|
};
|
|
@@ -5553,7 +5557,7 @@ function requireStyle$8 () {
|
|
|
5553
5557
|
});
|
|
5554
5558
|
style$8.genFocusOutline = genFocusOutline;
|
|
5555
5559
|
const genFocusStyle = (token, offset) => ({
|
|
5556
|
-
'&:focus-visible': genFocusOutline(token, offset)
|
|
5560
|
+
'&:focus-visible': Object.assign({}, genFocusOutline(token, offset))
|
|
5557
5561
|
});
|
|
5558
5562
|
style$8.genFocusStyle = genFocusStyle;
|
|
5559
5563
|
const genIconStyle = iconPrefixCls => ({
|
|
@@ -5710,7 +5714,7 @@ function requireUseResetIconStyle () {
|
|
|
5710
5714
|
layer: {
|
|
5711
5715
|
name: 'antd'
|
|
5712
5716
|
}
|
|
5713
|
-
}, () => (0, _style.genIconStyle)(iconPrefixCls));
|
|
5717
|
+
}, () => [(0, _style.genIconStyle)(iconPrefixCls)]);
|
|
5714
5718
|
};
|
|
5715
5719
|
useResetIconStyle.default = useResetIconStyle$1;
|
|
5716
5720
|
return useResetIconStyle;
|
|
@@ -6236,7 +6240,6 @@ function requireConfigProvider () {
|
|
|
6236
6240
|
tooltip,
|
|
6237
6241
|
popover,
|
|
6238
6242
|
popconfirm,
|
|
6239
|
-
floatButton,
|
|
6240
6243
|
floatButtonGroup,
|
|
6241
6244
|
variant,
|
|
6242
6245
|
inputNumber,
|
|
@@ -6332,7 +6335,6 @@ function requireConfigProvider () {
|
|
|
6332
6335
|
tooltip,
|
|
6333
6336
|
popover,
|
|
6334
6337
|
popconfirm,
|
|
6335
|
-
floatButton,
|
|
6336
6338
|
floatButtonGroup,
|
|
6337
6339
|
variant,
|
|
6338
6340
|
inputNumber,
|
|
@@ -10241,7 +10243,7 @@ function requireContext () {
|
|
|
10241
10243
|
var _omit = _interopRequireDefault(/*@__PURE__*/ requireOmit());
|
|
10242
10244
|
context.FormContext = /*#__PURE__*/React.createContext({
|
|
10243
10245
|
labelAlign: 'right',
|
|
10244
|
-
|
|
10246
|
+
vertical: false,
|
|
10245
10247
|
itemRef: () => {}
|
|
10246
10248
|
});
|
|
10247
10249
|
context.NoStyleItemContext = /*#__PURE__*/React.createContext(null);
|
|
@@ -11168,11 +11170,6 @@ function requirePlacements () {
|
|
|
11168
11170
|
} = config;
|
|
11169
11171
|
const halfArrowWidth = arrowWidth / 2;
|
|
11170
11172
|
const placementMap = {};
|
|
11171
|
-
// Dynamic offset
|
|
11172
|
-
const arrowOffset = (0, _placementArrow.getArrowOffsetToken)({
|
|
11173
|
-
contentRadius: borderRadius,
|
|
11174
|
-
limitVerticalRadius: true
|
|
11175
|
-
});
|
|
11176
11173
|
Object.keys(PlacementAlignMap).forEach(key => {
|
|
11177
11174
|
const template = arrowPointAtCenter && ArrowCenterPlacementAlignMap[key] || PlacementAlignMap[key];
|
|
11178
11175
|
const placementInfo = Object.assign(Object.assign({}, template), {
|
|
@@ -11207,6 +11204,11 @@ function requirePlacements () {
|
|
|
11207
11204
|
placementInfo.offset[0] = halfArrowWidth + offset;
|
|
11208
11205
|
break;
|
|
11209
11206
|
}
|
|
11207
|
+
// Dynamic offset
|
|
11208
|
+
const arrowOffset = (0, _placementArrow.getArrowOffsetToken)({
|
|
11209
|
+
contentRadius: borderRadius,
|
|
11210
|
+
limitVerticalRadius: true
|
|
11211
|
+
});
|
|
11210
11212
|
if (arrowPointAtCenter) {
|
|
11211
11213
|
switch (key) {
|
|
11212
11214
|
case 'topLeft':
|
|
@@ -12183,7 +12185,7 @@ function requireStyle$5 () {
|
|
|
12183
12185
|
minWidth: centerAlignMinWidth,
|
|
12184
12186
|
minHeight: controlHeight,
|
|
12185
12187
|
padding: `${(0, _cssinjs.unit)(token.calc(paddingSM).div(2).equal())} ${(0, _cssinjs.unit)(paddingXS)}`,
|
|
12186
|
-
color:
|
|
12188
|
+
color: tooltipColor,
|
|
12187
12189
|
textAlign: 'start',
|
|
12188
12190
|
textDecoration: 'none',
|
|
12189
12191
|
wordWrap: 'break-word',
|
|
@@ -12308,917 +12310,94 @@ function requireColors () {
|
|
|
12308
12310
|
return colors;
|
|
12309
12311
|
}
|
|
12310
12312
|
|
|
12311
|
-
var
|
|
12313
|
+
var hasRequiredUtil$2;
|
|
12312
12314
|
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
return color;
|
|
12317
|
-
}
|
|
12318
|
-
return new Color(color);
|
|
12319
|
-
};
|
|
12320
|
-
var defaultColor = generateColor('#1677ff');
|
|
12321
|
-
var calculateColor = function calculateColor(props) {
|
|
12322
|
-
var offset = props.offset,
|
|
12323
|
-
targetRef = props.targetRef,
|
|
12324
|
-
containerRef = props.containerRef,
|
|
12325
|
-
color = props.color,
|
|
12326
|
-
type = props.type;
|
|
12327
|
-
var _containerRef$current = containerRef.current.getBoundingClientRect(),
|
|
12328
|
-
width = _containerRef$current.width,
|
|
12329
|
-
height = _containerRef$current.height;
|
|
12330
|
-
var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
|
|
12331
|
-
targetWidth = _targetRef$current$ge.width,
|
|
12332
|
-
targetHeight = _targetRef$current$ge.height;
|
|
12333
|
-
var centerOffsetX = targetWidth / 2;
|
|
12334
|
-
var centerOffsetY = targetHeight / 2;
|
|
12335
|
-
var saturation = (offset.x + centerOffsetX) / width;
|
|
12336
|
-
var bright = 1 - (offset.y + centerOffsetY) / height;
|
|
12337
|
-
var hsb = color.toHsb();
|
|
12338
|
-
var alphaOffset = saturation;
|
|
12339
|
-
var hueOffset = (offset.x + centerOffsetX) / width * 360;
|
|
12340
|
-
if (type) {
|
|
12341
|
-
switch (type) {
|
|
12342
|
-
case 'hue':
|
|
12343
|
-
return generateColor(_objectSpread2(_objectSpread2({}, hsb), {}, {
|
|
12344
|
-
h: hueOffset <= 0 ? 0 : hueOffset
|
|
12345
|
-
}));
|
|
12346
|
-
case 'alpha':
|
|
12347
|
-
return generateColor(_objectSpread2(_objectSpread2({}, hsb), {}, {
|
|
12348
|
-
a: alphaOffset <= 0 ? 0 : alphaOffset
|
|
12349
|
-
}));
|
|
12350
|
-
}
|
|
12351
|
-
}
|
|
12352
|
-
return generateColor({
|
|
12353
|
-
h: hsb.h,
|
|
12354
|
-
s: saturation <= 0 ? 0 : saturation,
|
|
12355
|
-
b: bright >= 1 ? 1 : bright,
|
|
12356
|
-
a: hsb.a
|
|
12357
|
-
});
|
|
12358
|
-
};
|
|
12359
|
-
var calcOffset = function calcOffset(color, type) {
|
|
12360
|
-
var hsb = color.toHsb();
|
|
12361
|
-
switch (type) {
|
|
12362
|
-
case 'hue':
|
|
12363
|
-
return {
|
|
12364
|
-
x: hsb.h / 360 * 100,
|
|
12365
|
-
y: 50
|
|
12366
|
-
};
|
|
12367
|
-
case 'alpha':
|
|
12368
|
-
return {
|
|
12369
|
-
x: color.a * 100,
|
|
12370
|
-
y: 50
|
|
12371
|
-
};
|
|
12315
|
+
function requireUtil$2 () {
|
|
12316
|
+
if (hasRequiredUtil$2) return util$2;
|
|
12317
|
+
hasRequiredUtil$2 = 1;
|
|
12372
12318
|
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12319
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
12320
|
+
Object.defineProperty(util$2, "__esModule", {
|
|
12321
|
+
value: true
|
|
12322
|
+
});
|
|
12323
|
+
util$2.parseColor = parseColor;
|
|
12324
|
+
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
12325
|
+
var _colors = /*@__PURE__*/ requireColors();
|
|
12326
|
+
function parseColor(prefixCls, color) {
|
|
12327
|
+
const isInternalColor = (0, _colors.isPresetColor)(color);
|
|
12328
|
+
const className = (0, _classnames.default)({
|
|
12329
|
+
[`${prefixCls}-${color}`]: color && isInternalColor
|
|
12330
|
+
});
|
|
12331
|
+
const overlayStyle = {};
|
|
12332
|
+
const arrowStyle = {};
|
|
12333
|
+
if (color && !isInternalColor) {
|
|
12334
|
+
overlayStyle.background = color;
|
|
12335
|
+
// @ts-ignore
|
|
12336
|
+
arrowStyle['--antd-arrow-background-color'] = color;
|
|
12337
|
+
}
|
|
12338
|
+
return {
|
|
12339
|
+
className,
|
|
12340
|
+
overlayStyle,
|
|
12341
|
+
arrowStyle
|
|
12342
|
+
};
|
|
12343
|
+
}
|
|
12344
|
+
return util$2;
|
|
12345
|
+
}
|
|
12381
12346
|
|
|
12382
|
-
var
|
|
12383
|
-
var color = _ref.color,
|
|
12384
|
-
prefixCls = _ref.prefixCls,
|
|
12385
|
-
className = _ref.className,
|
|
12386
|
-
style = _ref.style,
|
|
12387
|
-
onClick = _ref.onClick;
|
|
12388
|
-
var colorBlockCls = "".concat(prefixCls, "-color-block");
|
|
12389
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12390
|
-
className: classNames(colorBlockCls, className),
|
|
12391
|
-
style: style,
|
|
12392
|
-
onClick: onClick
|
|
12393
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12394
|
-
className: "".concat(colorBlockCls, "-inner"),
|
|
12395
|
-
style: {
|
|
12396
|
-
background: color
|
|
12397
|
-
}
|
|
12398
|
-
}));
|
|
12399
|
-
};
|
|
12347
|
+
var hasRequiredPurePanel$2;
|
|
12400
12348
|
|
|
12401
|
-
function
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12349
|
+
function requirePurePanel$2 () {
|
|
12350
|
+
if (hasRequiredPurePanel$2) return PurePanel$2;
|
|
12351
|
+
hasRequiredPurePanel$2 = 1;
|
|
12352
|
+
|
|
12353
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
12354
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
12355
|
+
Object.defineProperty(PurePanel$2, "__esModule", {
|
|
12356
|
+
value: true
|
|
12357
|
+
});
|
|
12358
|
+
PurePanel$2.default = void 0;
|
|
12359
|
+
var React = _interopRequireWildcard(React__default);
|
|
12360
|
+
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
12361
|
+
var _rcTooltip = require$$4;
|
|
12362
|
+
var _configProvider = /*@__PURE__*/ requireConfigProvider();
|
|
12363
|
+
var _style = _interopRequireDefault(/*@__PURE__*/ requireStyle$5());
|
|
12364
|
+
var _util = /*@__PURE__*/ requireUtil$2();
|
|
12365
|
+
/** @private Internal Component. Do not use in your production. */
|
|
12366
|
+
const PurePanel = props => {
|
|
12367
|
+
const {
|
|
12368
|
+
prefixCls: customizePrefixCls,
|
|
12369
|
+
className,
|
|
12370
|
+
placement = 'top',
|
|
12371
|
+
title,
|
|
12372
|
+
color,
|
|
12373
|
+
overlayInnerStyle
|
|
12374
|
+
} = props;
|
|
12375
|
+
const {
|
|
12376
|
+
getPrefixCls
|
|
12377
|
+
} = React.useContext(_configProvider.ConfigContext);
|
|
12378
|
+
const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
|
|
12379
|
+
const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);
|
|
12380
|
+
// Color
|
|
12381
|
+
const colorInfo = (0, _util.parseColor)(prefixCls, color);
|
|
12382
|
+
const arrowContentStyle = colorInfo.arrowStyle;
|
|
12383
|
+
const formattedOverlayInnerStyle = Object.assign(Object.assign({}, overlayInnerStyle), colorInfo.overlayStyle);
|
|
12384
|
+
const cls = (0, _classnames.default)(hashId, cssVarCls, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className, colorInfo.className);
|
|
12385
|
+
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
12386
|
+
className: cls,
|
|
12387
|
+
style: arrowContentStyle
|
|
12388
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
12389
|
+
className: `${prefixCls}-arrow`
|
|
12390
|
+
}), /*#__PURE__*/React.createElement(_rcTooltip.Popup, Object.assign({}, props, {
|
|
12391
|
+
className: hashId,
|
|
12392
|
+
prefixCls: prefixCls,
|
|
12393
|
+
overlayInnerStyle: formattedOverlayInnerStyle
|
|
12394
|
+
}), title)));
|
|
12395
|
+
};
|
|
12396
|
+
PurePanel$2.default = PurePanel;
|
|
12397
|
+
return PurePanel$2;
|
|
12409
12398
|
}
|
|
12410
|
-
function useColorDrag(props) {
|
|
12411
|
-
var targetRef = props.targetRef,
|
|
12412
|
-
containerRef = props.containerRef,
|
|
12413
|
-
direction = props.direction,
|
|
12414
|
-
onDragChange = props.onDragChange,
|
|
12415
|
-
onDragChangeComplete = props.onDragChangeComplete,
|
|
12416
|
-
calculate = props.calculate,
|
|
12417
|
-
color = props.color,
|
|
12418
|
-
disabledDrag = props.disabledDrag;
|
|
12419
|
-
var _useState = useState$1({
|
|
12420
|
-
x: 0,
|
|
12421
|
-
y: 0
|
|
12422
|
-
}),
|
|
12423
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
12424
|
-
offsetValue = _useState2[0],
|
|
12425
|
-
setOffsetValue = _useState2[1];
|
|
12426
|
-
var mouseMoveRef = useRef(null);
|
|
12427
|
-
var mouseUpRef = useRef(null);
|
|
12428
12399
|
|
|
12429
|
-
|
|
12430
|
-
useEffect(function () {
|
|
12431
|
-
setOffsetValue(calculate());
|
|
12432
|
-
}, [color]);
|
|
12433
|
-
useEffect(function () {
|
|
12434
|
-
return function () {
|
|
12435
|
-
document.removeEventListener('mousemove', mouseMoveRef.current);
|
|
12436
|
-
document.removeEventListener('mouseup', mouseUpRef.current);
|
|
12437
|
-
document.removeEventListener('touchmove', mouseMoveRef.current);
|
|
12438
|
-
document.removeEventListener('touchend', mouseUpRef.current);
|
|
12439
|
-
mouseMoveRef.current = null;
|
|
12440
|
-
mouseUpRef.current = null;
|
|
12441
|
-
};
|
|
12442
|
-
}, []);
|
|
12443
|
-
var updateOffset = function updateOffset(e) {
|
|
12444
|
-
var _getPosition = getPosition(e),
|
|
12445
|
-
pageX = _getPosition.pageX,
|
|
12446
|
-
pageY = _getPosition.pageY;
|
|
12447
|
-
var _containerRef$current = containerRef.current.getBoundingClientRect(),
|
|
12448
|
-
rectX = _containerRef$current.x,
|
|
12449
|
-
rectY = _containerRef$current.y,
|
|
12450
|
-
width = _containerRef$current.width,
|
|
12451
|
-
height = _containerRef$current.height;
|
|
12452
|
-
var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
|
|
12453
|
-
targetWidth = _targetRef$current$ge.width,
|
|
12454
|
-
targetHeight = _targetRef$current$ge.height;
|
|
12455
|
-
var centerOffsetX = targetWidth / 2;
|
|
12456
|
-
var centerOffsetY = targetHeight / 2;
|
|
12457
|
-
var offsetX = Math.max(0, Math.min(pageX - rectX, width)) - centerOffsetX;
|
|
12458
|
-
var offsetY = Math.max(0, Math.min(pageY - rectY, height)) - centerOffsetY;
|
|
12459
|
-
var calcOffset = {
|
|
12460
|
-
x: offsetX,
|
|
12461
|
-
y: direction === 'x' ? offsetValue.y : offsetY
|
|
12462
|
-
};
|
|
12463
|
-
|
|
12464
|
-
// Exclusion of boundary cases
|
|
12465
|
-
if (targetWidth === 0 && targetHeight === 0 || targetWidth !== targetHeight) {
|
|
12466
|
-
return false;
|
|
12467
|
-
}
|
|
12468
|
-
onDragChange === null || onDragChange === void 0 || onDragChange(calcOffset);
|
|
12469
|
-
};
|
|
12470
|
-
var onDragMove = function onDragMove(e) {
|
|
12471
|
-
e.preventDefault();
|
|
12472
|
-
updateOffset(e);
|
|
12473
|
-
};
|
|
12474
|
-
var onDragStop = function onDragStop(e) {
|
|
12475
|
-
e.preventDefault();
|
|
12476
|
-
document.removeEventListener('mousemove', mouseMoveRef.current);
|
|
12477
|
-
document.removeEventListener('mouseup', mouseUpRef.current);
|
|
12478
|
-
document.removeEventListener('touchmove', mouseMoveRef.current);
|
|
12479
|
-
document.removeEventListener('touchend', mouseUpRef.current);
|
|
12480
|
-
mouseMoveRef.current = null;
|
|
12481
|
-
mouseUpRef.current = null;
|
|
12482
|
-
onDragChangeComplete === null || onDragChangeComplete === void 0 || onDragChangeComplete();
|
|
12483
|
-
};
|
|
12484
|
-
var onDragStart = function onDragStart(e) {
|
|
12485
|
-
// https://github.com/ant-design/ant-design/issues/43529
|
|
12486
|
-
document.removeEventListener('mousemove', mouseMoveRef.current);
|
|
12487
|
-
document.removeEventListener('mouseup', mouseUpRef.current);
|
|
12488
|
-
if (disabledDrag) {
|
|
12489
|
-
return;
|
|
12490
|
-
}
|
|
12491
|
-
updateOffset(e);
|
|
12492
|
-
document.addEventListener('mousemove', onDragMove);
|
|
12493
|
-
document.addEventListener('mouseup', onDragStop);
|
|
12494
|
-
document.addEventListener('touchmove', onDragMove);
|
|
12495
|
-
document.addEventListener('touchend', onDragStop);
|
|
12496
|
-
mouseMoveRef.current = onDragMove;
|
|
12497
|
-
mouseUpRef.current = onDragStop;
|
|
12498
|
-
};
|
|
12499
|
-
return [offsetValue, onDragStart];
|
|
12500
|
-
}
|
|
12501
|
-
|
|
12502
|
-
var Handler = function Handler(_ref) {
|
|
12503
|
-
var _ref$size = _ref.size,
|
|
12504
|
-
size = _ref$size === void 0 ? 'default' : _ref$size,
|
|
12505
|
-
color = _ref.color,
|
|
12506
|
-
prefixCls = _ref.prefixCls;
|
|
12507
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12508
|
-
className: classNames("".concat(prefixCls, "-handler"), _defineProperty({}, "".concat(prefixCls, "-handler-sm"), size === 'small')),
|
|
12509
|
-
style: {
|
|
12510
|
-
backgroundColor: color
|
|
12511
|
-
}
|
|
12512
|
-
});
|
|
12513
|
-
};
|
|
12514
|
-
|
|
12515
|
-
var Palette = function Palette(_ref) {
|
|
12516
|
-
var children = _ref.children,
|
|
12517
|
-
style = _ref.style,
|
|
12518
|
-
prefixCls = _ref.prefixCls;
|
|
12519
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12520
|
-
className: "".concat(prefixCls, "-palette"),
|
|
12521
|
-
style: _objectSpread2({
|
|
12522
|
-
position: 'relative'
|
|
12523
|
-
}, style)
|
|
12524
|
-
}, children);
|
|
12525
|
-
};
|
|
12526
|
-
|
|
12527
|
-
var Transform = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
12528
|
-
var children = props.children,
|
|
12529
|
-
x = props.x,
|
|
12530
|
-
y = props.y;
|
|
12531
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12532
|
-
ref: ref,
|
|
12533
|
-
style: {
|
|
12534
|
-
position: 'absolute',
|
|
12535
|
-
left: "".concat(x, "%"),
|
|
12536
|
-
top: "".concat(y, "%"),
|
|
12537
|
-
zIndex: 1,
|
|
12538
|
-
transform: 'translate(-50%, -50%)'
|
|
12539
|
-
}
|
|
12540
|
-
}, children);
|
|
12541
|
-
});
|
|
12542
|
-
|
|
12543
|
-
var Picker = function Picker(_ref) {
|
|
12544
|
-
var color = _ref.color,
|
|
12545
|
-
onChange = _ref.onChange,
|
|
12546
|
-
prefixCls = _ref.prefixCls,
|
|
12547
|
-
onChangeComplete = _ref.onChangeComplete,
|
|
12548
|
-
disabled = _ref.disabled;
|
|
12549
|
-
var pickerRef = useRef();
|
|
12550
|
-
var transformRef = useRef();
|
|
12551
|
-
var colorRef = useRef(color);
|
|
12552
|
-
var onDragChange = useEvent$2(function (offsetValue) {
|
|
12553
|
-
var calcColor = calculateColor({
|
|
12554
|
-
offset: offsetValue,
|
|
12555
|
-
targetRef: transformRef,
|
|
12556
|
-
containerRef: pickerRef,
|
|
12557
|
-
color: color
|
|
12558
|
-
});
|
|
12559
|
-
colorRef.current = calcColor;
|
|
12560
|
-
onChange(calcColor);
|
|
12561
|
-
});
|
|
12562
|
-
var _useColorDrag = useColorDrag({
|
|
12563
|
-
color: color,
|
|
12564
|
-
containerRef: pickerRef,
|
|
12565
|
-
targetRef: transformRef,
|
|
12566
|
-
calculate: function calculate() {
|
|
12567
|
-
return calcOffset(color);
|
|
12568
|
-
},
|
|
12569
|
-
onDragChange: onDragChange,
|
|
12570
|
-
onDragChangeComplete: function onDragChangeComplete() {
|
|
12571
|
-
return onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(colorRef.current);
|
|
12572
|
-
},
|
|
12573
|
-
disabledDrag: disabled
|
|
12574
|
-
}),
|
|
12575
|
-
_useColorDrag2 = _slicedToArray(_useColorDrag, 2),
|
|
12576
|
-
offset = _useColorDrag2[0],
|
|
12577
|
-
dragStartHandle = _useColorDrag2[1];
|
|
12578
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12579
|
-
ref: pickerRef,
|
|
12580
|
-
className: "".concat(prefixCls, "-select"),
|
|
12581
|
-
onMouseDown: dragStartHandle,
|
|
12582
|
-
onTouchStart: dragStartHandle
|
|
12583
|
-
}, /*#__PURE__*/React__default.createElement(Palette, {
|
|
12584
|
-
prefixCls: prefixCls
|
|
12585
|
-
}, /*#__PURE__*/React__default.createElement(Transform, {
|
|
12586
|
-
x: offset.x,
|
|
12587
|
-
y: offset.y,
|
|
12588
|
-
ref: transformRef
|
|
12589
|
-
}, /*#__PURE__*/React__default.createElement(Handler, {
|
|
12590
|
-
color: color.toRgbString(),
|
|
12591
|
-
prefixCls: prefixCls
|
|
12592
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12593
|
-
className: "".concat(prefixCls, "-saturation"),
|
|
12594
|
-
style: {
|
|
12595
|
-
backgroundColor: "hsl(".concat(color.toHsb().h, ",100%, 50%)"),
|
|
12596
|
-
backgroundImage: 'linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))'
|
|
12597
|
-
}
|
|
12598
|
-
})));
|
|
12599
|
-
};
|
|
12600
|
-
|
|
12601
|
-
var useColorState = function useColorState(defaultValue, value) {
|
|
12602
|
-
var _useMergedState = useMergedState$1(defaultValue, {
|
|
12603
|
-
value: value
|
|
12604
|
-
}),
|
|
12605
|
-
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
12606
|
-
mergedValue = _useMergedState2[0],
|
|
12607
|
-
setValue = _useMergedState2[1];
|
|
12608
|
-
var color = useMemo$1(function () {
|
|
12609
|
-
return generateColor(mergedValue);
|
|
12610
|
-
}, [mergedValue]);
|
|
12611
|
-
return [color, setValue];
|
|
12612
|
-
};
|
|
12613
|
-
|
|
12614
|
-
var Gradient = function Gradient(_ref) {
|
|
12615
|
-
var colors = _ref.colors,
|
|
12616
|
-
children = _ref.children,
|
|
12617
|
-
_ref$direction = _ref.direction,
|
|
12618
|
-
direction = _ref$direction === void 0 ? 'to right' : _ref$direction,
|
|
12619
|
-
type = _ref.type,
|
|
12620
|
-
prefixCls = _ref.prefixCls;
|
|
12621
|
-
var gradientColors = useMemo$1(function () {
|
|
12622
|
-
return colors.map(function (color, idx) {
|
|
12623
|
-
var result = generateColor(color);
|
|
12624
|
-
if (type === 'alpha' && idx === colors.length - 1) {
|
|
12625
|
-
result = new Color(result.setA(1));
|
|
12626
|
-
}
|
|
12627
|
-
return result.toRgbString();
|
|
12628
|
-
}).join(',');
|
|
12629
|
-
}, [colors, type]);
|
|
12630
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12631
|
-
className: "".concat(prefixCls, "-gradient"),
|
|
12632
|
-
style: {
|
|
12633
|
-
position: 'absolute',
|
|
12634
|
-
inset: 0,
|
|
12635
|
-
background: "linear-gradient(".concat(direction, ", ").concat(gradientColors, ")")
|
|
12636
|
-
}
|
|
12637
|
-
}, children);
|
|
12638
|
-
};
|
|
12639
|
-
|
|
12640
|
-
var Slider = function Slider(props) {
|
|
12641
|
-
var prefixCls = props.prefixCls,
|
|
12642
|
-
colors = props.colors,
|
|
12643
|
-
disabled = props.disabled,
|
|
12644
|
-
onChange = props.onChange,
|
|
12645
|
-
onChangeComplete = props.onChangeComplete,
|
|
12646
|
-
color = props.color,
|
|
12647
|
-
type = props.type;
|
|
12648
|
-
var sliderRef = useRef();
|
|
12649
|
-
var transformRef = useRef();
|
|
12650
|
-
var colorRef = useRef(color);
|
|
12651
|
-
var getValue = function getValue(c) {
|
|
12652
|
-
return type === 'hue' ? c.getHue() : c.a * 100;
|
|
12653
|
-
};
|
|
12654
|
-
var onDragChange = useEvent$2(function (offsetValue) {
|
|
12655
|
-
var calcColor = calculateColor({
|
|
12656
|
-
offset: offsetValue,
|
|
12657
|
-
targetRef: transformRef,
|
|
12658
|
-
containerRef: sliderRef,
|
|
12659
|
-
color: color,
|
|
12660
|
-
type: type
|
|
12661
|
-
});
|
|
12662
|
-
colorRef.current = calcColor;
|
|
12663
|
-
onChange(getValue(calcColor));
|
|
12664
|
-
});
|
|
12665
|
-
var _useColorDrag = useColorDrag({
|
|
12666
|
-
color: color,
|
|
12667
|
-
targetRef: transformRef,
|
|
12668
|
-
containerRef: sliderRef,
|
|
12669
|
-
calculate: function calculate() {
|
|
12670
|
-
return calcOffset(color, type);
|
|
12671
|
-
},
|
|
12672
|
-
onDragChange: onDragChange,
|
|
12673
|
-
onDragChangeComplete: function onDragChangeComplete() {
|
|
12674
|
-
onChangeComplete(getValue(colorRef.current));
|
|
12675
|
-
},
|
|
12676
|
-
direction: 'x',
|
|
12677
|
-
disabledDrag: disabled
|
|
12678
|
-
}),
|
|
12679
|
-
_useColorDrag2 = _slicedToArray(_useColorDrag, 2),
|
|
12680
|
-
offset = _useColorDrag2[0],
|
|
12681
|
-
dragStartHandle = _useColorDrag2[1];
|
|
12682
|
-
var handleColor = React__default.useMemo(function () {
|
|
12683
|
-
if (type === 'hue') {
|
|
12684
|
-
var hsb = color.toHsb();
|
|
12685
|
-
hsb.s = 1;
|
|
12686
|
-
hsb.b = 1;
|
|
12687
|
-
hsb.a = 1;
|
|
12688
|
-
var lightColor = new Color(hsb);
|
|
12689
|
-
return lightColor;
|
|
12690
|
-
}
|
|
12691
|
-
return color;
|
|
12692
|
-
}, [color, type]);
|
|
12693
|
-
|
|
12694
|
-
// ========================= Gradient =========================
|
|
12695
|
-
var gradientList = React__default.useMemo(function () {
|
|
12696
|
-
return colors.map(function (info) {
|
|
12697
|
-
return "".concat(info.color, " ").concat(info.percent, "%");
|
|
12698
|
-
});
|
|
12699
|
-
}, [colors]);
|
|
12700
|
-
|
|
12701
|
-
// ========================== Render ==========================
|
|
12702
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12703
|
-
ref: sliderRef,
|
|
12704
|
-
className: classNames("".concat(prefixCls, "-slider"), "".concat(prefixCls, "-slider-").concat(type)),
|
|
12705
|
-
onMouseDown: dragStartHandle,
|
|
12706
|
-
onTouchStart: dragStartHandle
|
|
12707
|
-
}, /*#__PURE__*/React__default.createElement(Palette, {
|
|
12708
|
-
prefixCls: prefixCls
|
|
12709
|
-
}, /*#__PURE__*/React__default.createElement(Transform, {
|
|
12710
|
-
x: offset.x,
|
|
12711
|
-
y: offset.y,
|
|
12712
|
-
ref: transformRef
|
|
12713
|
-
}, /*#__PURE__*/React__default.createElement(Handler, {
|
|
12714
|
-
size: "small",
|
|
12715
|
-
color: handleColor.toHexString(),
|
|
12716
|
-
prefixCls: prefixCls
|
|
12717
|
-
})), /*#__PURE__*/React__default.createElement(Gradient, {
|
|
12718
|
-
colors: gradientList,
|
|
12719
|
-
type: type,
|
|
12720
|
-
prefixCls: prefixCls
|
|
12721
|
-
})));
|
|
12722
|
-
};
|
|
12723
|
-
|
|
12724
|
-
function useComponent(components) {
|
|
12725
|
-
return React.useMemo(function () {
|
|
12726
|
-
var _ref = components || {},
|
|
12727
|
-
slider = _ref.slider;
|
|
12728
|
-
return [slider || Slider];
|
|
12729
|
-
}, [components]);
|
|
12730
|
-
}
|
|
12731
|
-
|
|
12732
|
-
var HUE_COLORS = [{
|
|
12733
|
-
color: 'rgb(255, 0, 0)',
|
|
12734
|
-
percent: 0
|
|
12735
|
-
}, {
|
|
12736
|
-
color: 'rgb(255, 255, 0)',
|
|
12737
|
-
percent: 17
|
|
12738
|
-
}, {
|
|
12739
|
-
color: 'rgb(0, 255, 0)',
|
|
12740
|
-
percent: 33
|
|
12741
|
-
}, {
|
|
12742
|
-
color: 'rgb(0, 255, 255)',
|
|
12743
|
-
percent: 50
|
|
12744
|
-
}, {
|
|
12745
|
-
color: 'rgb(0, 0, 255)',
|
|
12746
|
-
percent: 67
|
|
12747
|
-
}, {
|
|
12748
|
-
color: 'rgb(255, 0, 255)',
|
|
12749
|
-
percent: 83
|
|
12750
|
-
}, {
|
|
12751
|
-
color: 'rgb(255, 0, 0)',
|
|
12752
|
-
percent: 100
|
|
12753
|
-
}];
|
|
12754
|
-
var ColorPicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
12755
|
-
var value = props.value,
|
|
12756
|
-
defaultValue = props.defaultValue,
|
|
12757
|
-
_props$prefixCls = props.prefixCls,
|
|
12758
|
-
prefixCls = _props$prefixCls === void 0 ? ColorPickerPrefixCls : _props$prefixCls,
|
|
12759
|
-
onChange = props.onChange,
|
|
12760
|
-
onChangeComplete = props.onChangeComplete,
|
|
12761
|
-
className = props.className,
|
|
12762
|
-
style = props.style,
|
|
12763
|
-
panelRender = props.panelRender,
|
|
12764
|
-
_props$disabledAlpha = props.disabledAlpha,
|
|
12765
|
-
disabledAlpha = _props$disabledAlpha === void 0 ? false : _props$disabledAlpha,
|
|
12766
|
-
_props$disabled = props.disabled,
|
|
12767
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
12768
|
-
components = props.components;
|
|
12769
|
-
|
|
12770
|
-
// ========================== Components ==========================
|
|
12771
|
-
var _useComponent = useComponent(components),
|
|
12772
|
-
_useComponent2 = _slicedToArray(_useComponent, 1),
|
|
12773
|
-
Slider = _useComponent2[0];
|
|
12774
|
-
|
|
12775
|
-
// ============================ Color =============================
|
|
12776
|
-
var _useColorState = useColorState(defaultValue || defaultColor, value),
|
|
12777
|
-
_useColorState2 = _slicedToArray(_useColorState, 2),
|
|
12778
|
-
colorValue = _useColorState2[0],
|
|
12779
|
-
setColorValue = _useColorState2[1];
|
|
12780
|
-
var alphaColor = useMemo$1(function () {
|
|
12781
|
-
return colorValue.setA(1).toRgbString();
|
|
12782
|
-
}, [colorValue]);
|
|
12783
|
-
|
|
12784
|
-
// ============================ Events ============================
|
|
12785
|
-
var handleChange = function handleChange(data, type) {
|
|
12786
|
-
if (!value) {
|
|
12787
|
-
setColorValue(data);
|
|
12788
|
-
}
|
|
12789
|
-
onChange === null || onChange === void 0 || onChange(data, type);
|
|
12790
|
-
};
|
|
12791
|
-
|
|
12792
|
-
// Convert
|
|
12793
|
-
var getHueColor = function getHueColor(hue) {
|
|
12794
|
-
return new Color(colorValue.setHue(hue));
|
|
12795
|
-
};
|
|
12796
|
-
var getAlphaColor = function getAlphaColor(alpha) {
|
|
12797
|
-
return new Color(colorValue.setA(alpha / 100));
|
|
12798
|
-
};
|
|
12799
|
-
|
|
12800
|
-
// Slider change
|
|
12801
|
-
var onHueChange = function onHueChange(hue) {
|
|
12802
|
-
handleChange(getHueColor(hue), {
|
|
12803
|
-
type: 'hue',
|
|
12804
|
-
value: hue
|
|
12805
|
-
});
|
|
12806
|
-
};
|
|
12807
|
-
var onAlphaChange = function onAlphaChange(alpha) {
|
|
12808
|
-
handleChange(getAlphaColor(alpha), {
|
|
12809
|
-
type: 'alpha',
|
|
12810
|
-
value: alpha
|
|
12811
|
-
});
|
|
12812
|
-
};
|
|
12813
|
-
|
|
12814
|
-
// Complete
|
|
12815
|
-
var onHueChangeComplete = function onHueChangeComplete(hue) {
|
|
12816
|
-
if (onChangeComplete) {
|
|
12817
|
-
onChangeComplete(getHueColor(hue));
|
|
12818
|
-
}
|
|
12819
|
-
};
|
|
12820
|
-
var onAlphaChangeComplete = function onAlphaChangeComplete(alpha) {
|
|
12821
|
-
if (onChangeComplete) {
|
|
12822
|
-
onChangeComplete(getAlphaColor(alpha));
|
|
12823
|
-
}
|
|
12824
|
-
};
|
|
12825
|
-
|
|
12826
|
-
// ============================ Render ============================
|
|
12827
|
-
var mergeCls = classNames("".concat(prefixCls, "-panel"), className, _defineProperty({}, "".concat(prefixCls, "-panel-disabled"), disabled));
|
|
12828
|
-
var sharedSliderProps = {
|
|
12829
|
-
prefixCls: prefixCls,
|
|
12830
|
-
disabled: disabled,
|
|
12831
|
-
color: colorValue
|
|
12832
|
-
};
|
|
12833
|
-
var defaultPanel = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Picker, _extends$1({
|
|
12834
|
-
onChange: handleChange
|
|
12835
|
-
}, sharedSliderProps, {
|
|
12836
|
-
onChangeComplete: onChangeComplete
|
|
12837
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
12838
|
-
className: "".concat(prefixCls, "-slider-container")
|
|
12839
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12840
|
-
className: classNames("".concat(prefixCls, "-slider-group"), _defineProperty({}, "".concat(prefixCls, "-slider-group-disabled-alpha"), disabledAlpha))
|
|
12841
|
-
}, /*#__PURE__*/React__default.createElement(Slider, _extends$1({}, sharedSliderProps, {
|
|
12842
|
-
type: "hue",
|
|
12843
|
-
colors: HUE_COLORS,
|
|
12844
|
-
min: 0,
|
|
12845
|
-
max: 359,
|
|
12846
|
-
value: colorValue.getHue(),
|
|
12847
|
-
onChange: onHueChange,
|
|
12848
|
-
onChangeComplete: onHueChangeComplete
|
|
12849
|
-
})), !disabledAlpha && /*#__PURE__*/React__default.createElement(Slider, _extends$1({}, sharedSliderProps, {
|
|
12850
|
-
type: "alpha",
|
|
12851
|
-
colors: [{
|
|
12852
|
-
percent: 0,
|
|
12853
|
-
color: 'rgba(255, 0, 4, 0)'
|
|
12854
|
-
}, {
|
|
12855
|
-
percent: 100,
|
|
12856
|
-
color: alphaColor
|
|
12857
|
-
}],
|
|
12858
|
-
min: 0,
|
|
12859
|
-
max: 100,
|
|
12860
|
-
value: colorValue.a * 100,
|
|
12861
|
-
onChange: onAlphaChange,
|
|
12862
|
-
onChangeComplete: onAlphaChangeComplete
|
|
12863
|
-
}))), /*#__PURE__*/React__default.createElement(ColorBlock, {
|
|
12864
|
-
color: colorValue.toRgbString(),
|
|
12865
|
-
prefixCls: prefixCls
|
|
12866
|
-
})));
|
|
12867
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12868
|
-
className: mergeCls,
|
|
12869
|
-
style: style,
|
|
12870
|
-
ref: ref
|
|
12871
|
-
}, typeof panelRender === 'function' ? panelRender(defaultPanel) : defaultPanel);
|
|
12872
|
-
});
|
|
12873
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
12874
|
-
ColorPicker.displayName = 'ColorPicker';
|
|
12875
|
-
}
|
|
12876
|
-
|
|
12877
|
-
const es$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
12878
|
-
__proto__: null,
|
|
12879
|
-
Color,
|
|
12880
|
-
ColorBlock,
|
|
12881
|
-
default: ColorPicker
|
|
12882
|
-
}, Symbol.toStringTag, { value: 'Module' }));
|
|
12883
|
-
|
|
12884
|
-
const require$$3 = /*@__PURE__*/getAugmentedNamespace(es$1);
|
|
12885
|
-
|
|
12886
|
-
var color = {};
|
|
12887
|
-
|
|
12888
|
-
var classCallCheck = {exports: {}};
|
|
12889
|
-
|
|
12890
|
-
var hasRequiredClassCallCheck;
|
|
12891
|
-
|
|
12892
|
-
function requireClassCallCheck () {
|
|
12893
|
-
if (hasRequiredClassCallCheck) return classCallCheck.exports;
|
|
12894
|
-
hasRequiredClassCallCheck = 1;
|
|
12895
|
-
(function (module) {
|
|
12896
|
-
function _classCallCheck(a, n) {
|
|
12897
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
12898
|
-
}
|
|
12899
|
-
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12900
|
-
} (classCallCheck));
|
|
12901
|
-
return classCallCheck.exports;
|
|
12902
|
-
}
|
|
12903
|
-
|
|
12904
|
-
var createClass = {exports: {}};
|
|
12905
|
-
|
|
12906
|
-
var hasRequiredCreateClass;
|
|
12907
|
-
|
|
12908
|
-
function requireCreateClass () {
|
|
12909
|
-
if (hasRequiredCreateClass) return createClass.exports;
|
|
12910
|
-
hasRequiredCreateClass = 1;
|
|
12911
|
-
(function (module) {
|
|
12912
|
-
var toPropertyKey = /*@__PURE__*/ requireToPropertyKey();
|
|
12913
|
-
function _defineProperties(e, r) {
|
|
12914
|
-
for (var t = 0; t < r.length; t++) {
|
|
12915
|
-
var o = r[t];
|
|
12916
|
-
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
12917
|
-
}
|
|
12918
|
-
}
|
|
12919
|
-
function _createClass(e, r, t) {
|
|
12920
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
12921
|
-
writable: false
|
|
12922
|
-
}), e;
|
|
12923
|
-
}
|
|
12924
|
-
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
12925
|
-
} (createClass));
|
|
12926
|
-
return createClass.exports;
|
|
12927
|
-
}
|
|
12928
|
-
|
|
12929
|
-
var hasRequiredColor;
|
|
12930
|
-
|
|
12931
|
-
function requireColor () {
|
|
12932
|
-
if (hasRequiredColor) return color;
|
|
12933
|
-
hasRequiredColor = 1;
|
|
12934
|
-
|
|
12935
|
-
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
12936
|
-
Object.defineProperty(color, "__esModule", {
|
|
12937
|
-
value: true
|
|
12938
|
-
});
|
|
12939
|
-
color.toHexFormat = color.getHex = color.AggregationColor = void 0;
|
|
12940
|
-
var _classCallCheck2 = _interopRequireDefault(/*@__PURE__*/ requireClassCallCheck());
|
|
12941
|
-
var _createClass2 = _interopRequireDefault(/*@__PURE__*/ requireCreateClass());
|
|
12942
|
-
var _colorPicker = require$$3;
|
|
12943
|
-
const toHexFormat = (value, alpha) => (value === null || value === void 0 ? void 0 : value.replace(/[^\w/]/g, '').slice(0, alpha ? 8 : 6)) || '';
|
|
12944
|
-
color.toHexFormat = toHexFormat;
|
|
12945
|
-
const getHex = (value, alpha) => value ? toHexFormat(value, alpha) : '';
|
|
12946
|
-
color.getHex = getHex;
|
|
12947
|
-
color.AggregationColor = /*#__PURE__*/function () {
|
|
12948
|
-
function AggregationColor(color) {
|
|
12949
|
-
(0, _classCallCheck2.default)(this, AggregationColor);
|
|
12950
|
-
var _a;
|
|
12951
|
-
this.cleared = false;
|
|
12952
|
-
// Clone from another AggregationColor
|
|
12953
|
-
if (color instanceof AggregationColor) {
|
|
12954
|
-
this.metaColor = color.metaColor.clone();
|
|
12955
|
-
this.colors = (_a = color.colors) === null || _a === void 0 ? void 0 : _a.map(info => ({
|
|
12956
|
-
color: new AggregationColor(info.color),
|
|
12957
|
-
percent: info.percent
|
|
12958
|
-
}));
|
|
12959
|
-
this.cleared = color.cleared;
|
|
12960
|
-
return;
|
|
12961
|
-
}
|
|
12962
|
-
const isArray = Array.isArray(color);
|
|
12963
|
-
if (isArray && color.length) {
|
|
12964
|
-
this.colors = color.map(({
|
|
12965
|
-
color: c,
|
|
12966
|
-
percent
|
|
12967
|
-
}) => ({
|
|
12968
|
-
color: new AggregationColor(c),
|
|
12969
|
-
percent
|
|
12970
|
-
}));
|
|
12971
|
-
this.metaColor = new _colorPicker.Color(this.colors[0].color.metaColor);
|
|
12972
|
-
} else {
|
|
12973
|
-
this.metaColor = new _colorPicker.Color(isArray ? '' : color);
|
|
12974
|
-
}
|
|
12975
|
-
if (!color || isArray && !this.colors) {
|
|
12976
|
-
this.metaColor = this.metaColor.setA(0);
|
|
12977
|
-
this.cleared = true;
|
|
12978
|
-
}
|
|
12979
|
-
}
|
|
12980
|
-
return (0, _createClass2.default)(AggregationColor, [{
|
|
12981
|
-
key: "toHsb",
|
|
12982
|
-
value: function toHsb() {
|
|
12983
|
-
return this.metaColor.toHsb();
|
|
12984
|
-
}
|
|
12985
|
-
}, {
|
|
12986
|
-
key: "toHsbString",
|
|
12987
|
-
value: function toHsbString() {
|
|
12988
|
-
return this.metaColor.toHsbString();
|
|
12989
|
-
}
|
|
12990
|
-
}, {
|
|
12991
|
-
key: "toHex",
|
|
12992
|
-
value: function toHex() {
|
|
12993
|
-
return getHex(this.toHexString(), this.metaColor.a < 1);
|
|
12994
|
-
}
|
|
12995
|
-
}, {
|
|
12996
|
-
key: "toHexString",
|
|
12997
|
-
value: function toHexString() {
|
|
12998
|
-
return this.metaColor.toHexString();
|
|
12999
|
-
}
|
|
13000
|
-
}, {
|
|
13001
|
-
key: "toRgb",
|
|
13002
|
-
value: function toRgb() {
|
|
13003
|
-
return this.metaColor.toRgb();
|
|
13004
|
-
}
|
|
13005
|
-
}, {
|
|
13006
|
-
key: "toRgbString",
|
|
13007
|
-
value: function toRgbString() {
|
|
13008
|
-
return this.metaColor.toRgbString();
|
|
13009
|
-
}
|
|
13010
|
-
}, {
|
|
13011
|
-
key: "isGradient",
|
|
13012
|
-
value: function isGradient() {
|
|
13013
|
-
return !!this.colors && !this.cleared;
|
|
13014
|
-
}
|
|
13015
|
-
}, {
|
|
13016
|
-
key: "getColors",
|
|
13017
|
-
value: function getColors() {
|
|
13018
|
-
return this.colors || [{
|
|
13019
|
-
color: this,
|
|
13020
|
-
percent: 0
|
|
13021
|
-
}];
|
|
13022
|
-
}
|
|
13023
|
-
}, {
|
|
13024
|
-
key: "toCssString",
|
|
13025
|
-
value: function toCssString() {
|
|
13026
|
-
const {
|
|
13027
|
-
colors
|
|
13028
|
-
} = this;
|
|
13029
|
-
// CSS line-gradient
|
|
13030
|
-
if (colors) {
|
|
13031
|
-
const colorsStr = colors.map(c => `${c.color.toRgbString()} ${c.percent}%`).join(', ');
|
|
13032
|
-
return `linear-gradient(90deg, ${colorsStr})`;
|
|
13033
|
-
}
|
|
13034
|
-
return this.metaColor.toRgbString();
|
|
13035
|
-
}
|
|
13036
|
-
}, {
|
|
13037
|
-
key: "equals",
|
|
13038
|
-
value: function equals(color) {
|
|
13039
|
-
if (!color || this.isGradient() !== color.isGradient()) {
|
|
13040
|
-
return false;
|
|
13041
|
-
}
|
|
13042
|
-
if (!this.isGradient()) {
|
|
13043
|
-
return this.toHexString() === color.toHexString();
|
|
13044
|
-
}
|
|
13045
|
-
return this.colors.length === color.colors.length && this.colors.every((c, i) => {
|
|
13046
|
-
const target = color.colors[i];
|
|
13047
|
-
return c.percent === target.percent && c.color.equals(target.color);
|
|
13048
|
-
});
|
|
13049
|
-
}
|
|
13050
|
-
}]);
|
|
13051
|
-
}();
|
|
13052
|
-
return color;
|
|
13053
|
-
}
|
|
13054
|
-
|
|
13055
|
-
var hasRequiredUtil$2;
|
|
13056
|
-
|
|
13057
|
-
function requireUtil$2 () {
|
|
13058
|
-
if (hasRequiredUtil$2) return util$1;
|
|
13059
|
-
hasRequiredUtil$2 = 1;
|
|
13060
|
-
|
|
13061
|
-
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
13062
|
-
Object.defineProperty(util$1, "__esModule", {
|
|
13063
|
-
value: true
|
|
13064
|
-
});
|
|
13065
|
-
util$1.getRoundNumber = util$1.getGradientPercentColor = util$1.getColorAlpha = util$1.generateColor = util$1.genAlphaColor = void 0;
|
|
13066
|
-
var _toConsumableArray2 = _interopRequireDefault(/*@__PURE__*/ requireToConsumableArray());
|
|
13067
|
-
var _colorPicker = require$$3;
|
|
13068
|
-
var _color = /*@__PURE__*/ requireColor();
|
|
13069
|
-
const generateColor = color => {
|
|
13070
|
-
if (color instanceof _color.AggregationColor) {
|
|
13071
|
-
return color;
|
|
13072
|
-
}
|
|
13073
|
-
return new _color.AggregationColor(color);
|
|
13074
|
-
};
|
|
13075
|
-
util$1.generateColor = generateColor;
|
|
13076
|
-
const getRoundNumber = value => Math.round(Number(value || 0));
|
|
13077
|
-
util$1.getRoundNumber = getRoundNumber;
|
|
13078
|
-
const getColorAlpha = color => getRoundNumber(color.toHsb().a * 100);
|
|
13079
|
-
/** Return the color whose `alpha` is 1 */
|
|
13080
|
-
util$1.getColorAlpha = getColorAlpha;
|
|
13081
|
-
const genAlphaColor = (color, alpha) => {
|
|
13082
|
-
const rgba = color.toRgb();
|
|
13083
|
-
// Color from hsb input may get `rgb` is (0/0/0) when `hsb.b` is 0
|
|
13084
|
-
// So if rgb is empty, we should get from hsb
|
|
13085
|
-
if (!rgba.r && !rgba.g && !rgba.b) {
|
|
13086
|
-
const hsba = color.toHsb();
|
|
13087
|
-
hsba.a = alpha || 1;
|
|
13088
|
-
return generateColor(hsba);
|
|
13089
|
-
}
|
|
13090
|
-
rgba.a = alpha || 1;
|
|
13091
|
-
return generateColor(rgba);
|
|
13092
|
-
};
|
|
13093
|
-
/**
|
|
13094
|
-
* Get percent position color. e.g. [10%-#fff, 20%-#000], 15% => #888
|
|
13095
|
-
*/
|
|
13096
|
-
util$1.genAlphaColor = genAlphaColor;
|
|
13097
|
-
const getGradientPercentColor = (colors, percent) => {
|
|
13098
|
-
const filledColors = [{
|
|
13099
|
-
percent: 0,
|
|
13100
|
-
color: colors[0].color
|
|
13101
|
-
}].concat((0, _toConsumableArray2.default)(colors), [{
|
|
13102
|
-
percent: 100,
|
|
13103
|
-
color: colors[colors.length - 1].color
|
|
13104
|
-
}]);
|
|
13105
|
-
for (let i = 0; i < filledColors.length - 1; i += 1) {
|
|
13106
|
-
const startPtg = filledColors[i].percent;
|
|
13107
|
-
const endPtg = filledColors[i + 1].percent;
|
|
13108
|
-
const startColor = filledColors[i].color;
|
|
13109
|
-
const endColor = filledColors[i + 1].color;
|
|
13110
|
-
if (startPtg <= percent && percent <= endPtg) {
|
|
13111
|
-
const dist = endPtg - startPtg;
|
|
13112
|
-
if (dist === 0) {
|
|
13113
|
-
return startColor;
|
|
13114
|
-
}
|
|
13115
|
-
const ratio = (percent - startPtg) / dist * 100;
|
|
13116
|
-
const startRcColor = new _colorPicker.Color(startColor);
|
|
13117
|
-
const endRcColor = new _colorPicker.Color(endColor);
|
|
13118
|
-
return startRcColor.mix(endRcColor, ratio).toRgbString();
|
|
13119
|
-
}
|
|
13120
|
-
}
|
|
13121
|
-
// This will never reach
|
|
13122
|
-
/* istanbul ignore next */
|
|
13123
|
-
return '';
|
|
13124
|
-
};
|
|
13125
|
-
util$1.getGradientPercentColor = getGradientPercentColor;
|
|
13126
|
-
return util$1;
|
|
13127
|
-
}
|
|
13128
|
-
|
|
13129
|
-
var hasRequiredUtil$1;
|
|
13130
|
-
|
|
13131
|
-
function requireUtil$1 () {
|
|
13132
|
-
if (hasRequiredUtil$1) return util$2;
|
|
13133
|
-
hasRequiredUtil$1 = 1;
|
|
13134
|
-
|
|
13135
|
-
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
13136
|
-
Object.defineProperty(util$2, "__esModule", {
|
|
13137
|
-
value: true
|
|
13138
|
-
});
|
|
13139
|
-
util$2.parseColor = parseColor;
|
|
13140
|
-
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
13141
|
-
var _colors = /*@__PURE__*/ requireColors();
|
|
13142
|
-
var _util = /*@__PURE__*/ requireUtil$2();
|
|
13143
|
-
function parseColor(prefixCls, color) {
|
|
13144
|
-
const isInternalColor = (0, _colors.isPresetColor)(color);
|
|
13145
|
-
const className = (0, _classnames.default)({
|
|
13146
|
-
[`${prefixCls}-${color}`]: color && isInternalColor
|
|
13147
|
-
});
|
|
13148
|
-
const overlayStyle = {};
|
|
13149
|
-
const arrowStyle = {};
|
|
13150
|
-
const rgb = (0, _util.generateColor)(color).toRgb();
|
|
13151
|
-
const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;
|
|
13152
|
-
const textColor = luminance < 0.5 ? '#FFF' : '#000';
|
|
13153
|
-
if (color && !isInternalColor) {
|
|
13154
|
-
overlayStyle.background = color;
|
|
13155
|
-
overlayStyle['--ant-tooltip-color'] = textColor;
|
|
13156
|
-
// @ts-ignore
|
|
13157
|
-
arrowStyle['--antd-arrow-background-color'] = color;
|
|
13158
|
-
}
|
|
13159
|
-
return {
|
|
13160
|
-
className,
|
|
13161
|
-
overlayStyle,
|
|
13162
|
-
arrowStyle
|
|
13163
|
-
};
|
|
13164
|
-
}
|
|
13165
|
-
return util$2;
|
|
13166
|
-
}
|
|
13167
|
-
|
|
13168
|
-
var hasRequiredPurePanel$2;
|
|
13169
|
-
|
|
13170
|
-
function requirePurePanel$2 () {
|
|
13171
|
-
if (hasRequiredPurePanel$2) return PurePanel$2;
|
|
13172
|
-
hasRequiredPurePanel$2 = 1;
|
|
13173
|
-
|
|
13174
|
-
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
13175
|
-
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
13176
|
-
Object.defineProperty(PurePanel$2, "__esModule", {
|
|
13177
|
-
value: true
|
|
13178
|
-
});
|
|
13179
|
-
PurePanel$2.default = void 0;
|
|
13180
|
-
var React = _interopRequireWildcard(React__default);
|
|
13181
|
-
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
13182
|
-
var _rcTooltip = require$$4;
|
|
13183
|
-
var _configProvider = /*@__PURE__*/ requireConfigProvider();
|
|
13184
|
-
var _style = _interopRequireDefault(/*@__PURE__*/ requireStyle$5());
|
|
13185
|
-
var _util = /*@__PURE__*/ requireUtil$1();
|
|
13186
|
-
/** @private Internal Component. Do not use in your production. */
|
|
13187
|
-
const PurePanel = props => {
|
|
13188
|
-
const {
|
|
13189
|
-
prefixCls: customizePrefixCls,
|
|
13190
|
-
className,
|
|
13191
|
-
placement = 'top',
|
|
13192
|
-
title,
|
|
13193
|
-
color,
|
|
13194
|
-
overlayInnerStyle
|
|
13195
|
-
} = props;
|
|
13196
|
-
const {
|
|
13197
|
-
getPrefixCls
|
|
13198
|
-
} = React.useContext(_configProvider.ConfigContext);
|
|
13199
|
-
const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
|
|
13200
|
-
const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);
|
|
13201
|
-
// Color
|
|
13202
|
-
const colorInfo = (0, _util.parseColor)(prefixCls, color);
|
|
13203
|
-
const arrowContentStyle = colorInfo.arrowStyle;
|
|
13204
|
-
const formattedOverlayInnerStyle = Object.assign(Object.assign({}, overlayInnerStyle), colorInfo.overlayStyle);
|
|
13205
|
-
const cls = (0, _classnames.default)(hashId, cssVarCls, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className, colorInfo.className);
|
|
13206
|
-
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
13207
|
-
className: cls,
|
|
13208
|
-
style: arrowContentStyle
|
|
13209
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
13210
|
-
className: `${prefixCls}-arrow`
|
|
13211
|
-
}), /*#__PURE__*/React.createElement(_rcTooltip.Popup, Object.assign({}, props, {
|
|
13212
|
-
className: hashId,
|
|
13213
|
-
prefixCls: prefixCls,
|
|
13214
|
-
overlayInnerStyle: formattedOverlayInnerStyle
|
|
13215
|
-
}), title)));
|
|
13216
|
-
};
|
|
13217
|
-
PurePanel$2.default = PurePanel;
|
|
13218
|
-
return PurePanel$2;
|
|
13219
|
-
}
|
|
13220
|
-
|
|
13221
|
-
var hasRequiredTooltip;
|
|
12400
|
+
var hasRequiredTooltip;
|
|
13222
12401
|
|
|
13223
12402
|
function requireTooltip () {
|
|
13224
12403
|
if (hasRequiredTooltip) return tooltip;
|
|
@@ -13245,7 +12424,7 @@ function requireTooltip () {
|
|
|
13245
12424
|
var _internal = /*@__PURE__*/ requireInternal();
|
|
13246
12425
|
var _PurePanel = _interopRequireDefault(/*@__PURE__*/ requirePurePanel$2());
|
|
13247
12426
|
var _style = _interopRequireDefault(/*@__PURE__*/ requireStyle$5());
|
|
13248
|
-
var _util = /*@__PURE__*/ requireUtil$
|
|
12427
|
+
var _util = /*@__PURE__*/ requireUtil$2();
|
|
13249
12428
|
var __rest = function (s, e) {
|
|
13250
12429
|
var t = {};
|
|
13251
12430
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -13709,17 +12888,16 @@ function requirePopover () {
|
|
|
13709
12888
|
value: true
|
|
13710
12889
|
});
|
|
13711
12890
|
popover.default = void 0;
|
|
13712
|
-
var
|
|
13713
|
-
var React = _react;
|
|
12891
|
+
var React = _interopRequireWildcard(React__default);
|
|
13714
12892
|
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
13715
12893
|
var _useMergedState = _interopRequireDefault(/*@__PURE__*/ requireUseMergedState());
|
|
13716
12894
|
var _KeyCode = _interopRequireDefault(/*@__PURE__*/ requireKeyCode());
|
|
13717
12895
|
var _getRenderPropValue = /*@__PURE__*/ requireGetRenderPropValue();
|
|
13718
12896
|
var _motion = /*@__PURE__*/ requireMotion$2();
|
|
13719
12897
|
var _reactNode = /*@__PURE__*/ requireReactNode();
|
|
13720
|
-
var _context = /*@__PURE__*/ requireContext$3();
|
|
13721
12898
|
var _tooltip = _interopRequireDefault(/*@__PURE__*/ requireTooltip());
|
|
13722
12899
|
var _PurePanel = _interopRequireWildcard(/*@__PURE__*/ requirePurePanel$1());
|
|
12900
|
+
var _context = /*@__PURE__*/ requireContext$3();
|
|
13723
12901
|
var _style = _interopRequireDefault(/*@__PURE__*/ requireStyle$4());
|
|
13724
12902
|
var __rest = function (s, e) {
|
|
13725
12903
|
var t = {};
|
|
@@ -13808,7 +12986,7 @@ function requirePopover () {
|
|
|
13808
12986
|
}), (0, _reactNode.cloneElement)(children, {
|
|
13809
12987
|
onKeyDown: e => {
|
|
13810
12988
|
var _a, _b;
|
|
13811
|
-
if (/*#__PURE__*/
|
|
12989
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
13812
12990
|
(_b = children === null || children === void 0 ? void 0 : (_a = children.props).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
13813
12991
|
}
|
|
13814
12992
|
onKeyDown(e);
|
|
@@ -14021,7 +13199,7 @@ function requireStyle$3 () {
|
|
|
14021
13199
|
}
|
|
14022
13200
|
};
|
|
14023
13201
|
};
|
|
14024
|
-
style$3.default = (0, _internal.genComponentStyleHook)('Wave', genWaveStyle);
|
|
13202
|
+
style$3.default = (0, _internal.genComponentStyleHook)('Wave', token => [genWaveStyle(token)]);
|
|
14025
13203
|
return style$3;
|
|
14026
13204
|
}
|
|
14027
13205
|
|
|
@@ -14155,17 +13333,19 @@ function requireRegeneratorDefine () {
|
|
|
14155
13333
|
i = 0;
|
|
14156
13334
|
}
|
|
14157
13335
|
module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
|
|
14158
|
-
|
|
14159
|
-
_regeneratorDefine(e, r, function (e) {
|
|
14160
|
-
return this._invoke(r, n, e);
|
|
14161
|
-
});
|
|
14162
|
-
}
|
|
14163
|
-
r ? i ? i(e, r, {
|
|
13336
|
+
if (r) i ? i(e, r, {
|
|
14164
13337
|
value: n,
|
|
14165
13338
|
enumerable: !t,
|
|
14166
13339
|
configurable: !t,
|
|
14167
13340
|
writable: !t
|
|
14168
|
-
}) : e[r] = n
|
|
13341
|
+
}) : e[r] = n;else {
|
|
13342
|
+
var o = function o(r, n) {
|
|
13343
|
+
_regeneratorDefine(e, r, function (e) {
|
|
13344
|
+
return this._invoke(r, n, e);
|
|
13345
|
+
});
|
|
13346
|
+
};
|
|
13347
|
+
o("next", 0), o("throw", 1), o("return", 2);
|
|
13348
|
+
}
|
|
14169
13349
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
|
|
14170
13350
|
}
|
|
14171
13351
|
module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
@@ -14237,1224 +13417,1974 @@ function requireRegenerator () {
|
|
|
14237
13417
|
f = 1;
|
|
14238
13418
|
}
|
|
14239
13419
|
}
|
|
14240
|
-
return {
|
|
14241
|
-
value: t,
|
|
14242
|
-
done: y
|
|
14243
|
-
};
|
|
14244
|
-
};
|
|
14245
|
-
}(r, o, i), true), u;
|
|
14246
|
-
}
|
|
14247
|
-
var a = {};
|
|
14248
|
-
function Generator() {}
|
|
14249
|
-
function GeneratorFunction() {}
|
|
14250
|
-
function GeneratorFunctionPrototype() {}
|
|
14251
|
-
t = Object.getPrototypeOf;
|
|
14252
|
-
var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
|
|
14253
|
-
return this;
|
|
14254
|
-
}), t),
|
|
14255
|
-
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
14256
|
-
function f(e) {
|
|
14257
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
13420
|
+
return {
|
|
13421
|
+
value: t,
|
|
13422
|
+
done: y
|
|
13423
|
+
};
|
|
13424
|
+
};
|
|
13425
|
+
}(r, o, i), true), u;
|
|
13426
|
+
}
|
|
13427
|
+
var a = {};
|
|
13428
|
+
function Generator() {}
|
|
13429
|
+
function GeneratorFunction() {}
|
|
13430
|
+
function GeneratorFunctionPrototype() {}
|
|
13431
|
+
t = Object.getPrototypeOf;
|
|
13432
|
+
var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
|
|
13433
|
+
return this;
|
|
13434
|
+
}), t),
|
|
13435
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
13436
|
+
function f(e) {
|
|
13437
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
13438
|
+
}
|
|
13439
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () {
|
|
13440
|
+
return this;
|
|
13441
|
+
}), regeneratorDefine(u, "toString", function () {
|
|
13442
|
+
return "[object Generator]";
|
|
13443
|
+
}), (module.exports = _regenerator = function _regenerator() {
|
|
13444
|
+
return {
|
|
13445
|
+
w: i,
|
|
13446
|
+
m: f
|
|
13447
|
+
};
|
|
13448
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports)();
|
|
13449
|
+
}
|
|
13450
|
+
module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13451
|
+
} (regenerator));
|
|
13452
|
+
return regenerator.exports;
|
|
13453
|
+
}
|
|
13454
|
+
|
|
13455
|
+
var regeneratorAsync = {exports: {}};
|
|
13456
|
+
|
|
13457
|
+
var regeneratorAsyncGen = {exports: {}};
|
|
13458
|
+
|
|
13459
|
+
var regeneratorAsyncIterator = {exports: {}};
|
|
13460
|
+
|
|
13461
|
+
var hasRequiredRegeneratorAsyncIterator;
|
|
13462
|
+
|
|
13463
|
+
function requireRegeneratorAsyncIterator () {
|
|
13464
|
+
if (hasRequiredRegeneratorAsyncIterator) return regeneratorAsyncIterator.exports;
|
|
13465
|
+
hasRequiredRegeneratorAsyncIterator = 1;
|
|
13466
|
+
(function (module) {
|
|
13467
|
+
var OverloadYield = /*@__PURE__*/ requireOverloadYield();
|
|
13468
|
+
var regeneratorDefine = /*@__PURE__*/ requireRegeneratorDefine();
|
|
13469
|
+
function AsyncIterator(t, e) {
|
|
13470
|
+
function n(r, o, i, f) {
|
|
13471
|
+
try {
|
|
13472
|
+
var c = t[r](o),
|
|
13473
|
+
u = c.value;
|
|
13474
|
+
return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
|
|
13475
|
+
n("next", t, i, f);
|
|
13476
|
+
}, function (t) {
|
|
13477
|
+
n("throw", t, i, f);
|
|
13478
|
+
}) : e.resolve(u).then(function (t) {
|
|
13479
|
+
c.value = t, i(c);
|
|
13480
|
+
}, function (t) {
|
|
13481
|
+
return n("throw", t, i, f);
|
|
13482
|
+
});
|
|
13483
|
+
} catch (t) {
|
|
13484
|
+
f(t);
|
|
13485
|
+
}
|
|
13486
|
+
}
|
|
13487
|
+
var r;
|
|
13488
|
+
this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
|
|
13489
|
+
return this;
|
|
13490
|
+
})), regeneratorDefine(this, "_invoke", function (t, o, i) {
|
|
13491
|
+
function f() {
|
|
13492
|
+
return new e(function (e, r) {
|
|
13493
|
+
n(t, i, e, r);
|
|
13494
|
+
});
|
|
13495
|
+
}
|
|
13496
|
+
return r = r ? r.then(f, f) : f();
|
|
13497
|
+
}, true);
|
|
13498
|
+
}
|
|
13499
|
+
module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13500
|
+
} (regeneratorAsyncIterator));
|
|
13501
|
+
return regeneratorAsyncIterator.exports;
|
|
13502
|
+
}
|
|
13503
|
+
|
|
13504
|
+
var hasRequiredRegeneratorAsyncGen;
|
|
13505
|
+
|
|
13506
|
+
function requireRegeneratorAsyncGen () {
|
|
13507
|
+
if (hasRequiredRegeneratorAsyncGen) return regeneratorAsyncGen.exports;
|
|
13508
|
+
hasRequiredRegeneratorAsyncGen = 1;
|
|
13509
|
+
(function (module) {
|
|
13510
|
+
var regenerator = /*@__PURE__*/ requireRegenerator();
|
|
13511
|
+
var regeneratorAsyncIterator = /*@__PURE__*/ requireRegeneratorAsyncIterator();
|
|
13512
|
+
function _regeneratorAsyncGen(r, e, t, o, n) {
|
|
13513
|
+
return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
|
|
13514
|
+
}
|
|
13515
|
+
module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13516
|
+
} (regeneratorAsyncGen));
|
|
13517
|
+
return regeneratorAsyncGen.exports;
|
|
13518
|
+
}
|
|
13519
|
+
|
|
13520
|
+
var hasRequiredRegeneratorAsync;
|
|
13521
|
+
|
|
13522
|
+
function requireRegeneratorAsync () {
|
|
13523
|
+
if (hasRequiredRegeneratorAsync) return regeneratorAsync.exports;
|
|
13524
|
+
hasRequiredRegeneratorAsync = 1;
|
|
13525
|
+
(function (module) {
|
|
13526
|
+
var regeneratorAsyncGen = /*@__PURE__*/ requireRegeneratorAsyncGen();
|
|
13527
|
+
function _regeneratorAsync(n, e, r, t, o) {
|
|
13528
|
+
var a = regeneratorAsyncGen(n, e, r, t, o);
|
|
13529
|
+
return a.next().then(function (n) {
|
|
13530
|
+
return n.done ? n.value : a.next();
|
|
13531
|
+
});
|
|
13532
|
+
}
|
|
13533
|
+
module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13534
|
+
} (regeneratorAsync));
|
|
13535
|
+
return regeneratorAsync.exports;
|
|
13536
|
+
}
|
|
13537
|
+
|
|
13538
|
+
var regeneratorKeys = {exports: {}};
|
|
13539
|
+
|
|
13540
|
+
var hasRequiredRegeneratorKeys;
|
|
13541
|
+
|
|
13542
|
+
function requireRegeneratorKeys () {
|
|
13543
|
+
if (hasRequiredRegeneratorKeys) return regeneratorKeys.exports;
|
|
13544
|
+
hasRequiredRegeneratorKeys = 1;
|
|
13545
|
+
(function (module) {
|
|
13546
|
+
function _regeneratorKeys(e) {
|
|
13547
|
+
var n = Object(e),
|
|
13548
|
+
r = [];
|
|
13549
|
+
for (var t in n) r.unshift(t);
|
|
13550
|
+
return function e() {
|
|
13551
|
+
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = false, e;
|
|
13552
|
+
return e.done = true, e;
|
|
13553
|
+
};
|
|
13554
|
+
}
|
|
13555
|
+
module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13556
|
+
} (regeneratorKeys));
|
|
13557
|
+
return regeneratorKeys.exports;
|
|
13558
|
+
}
|
|
13559
|
+
|
|
13560
|
+
var regeneratorValues = {exports: {}};
|
|
13561
|
+
|
|
13562
|
+
var hasRequiredRegeneratorValues;
|
|
13563
|
+
|
|
13564
|
+
function requireRegeneratorValues () {
|
|
13565
|
+
if (hasRequiredRegeneratorValues) return regeneratorValues.exports;
|
|
13566
|
+
hasRequiredRegeneratorValues = 1;
|
|
13567
|
+
(function (module) {
|
|
13568
|
+
var _typeof = /*@__PURE__*/ require_typeof()["default"];
|
|
13569
|
+
function _regeneratorValues(e) {
|
|
13570
|
+
if (null != e) {
|
|
13571
|
+
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
|
|
13572
|
+
r = 0;
|
|
13573
|
+
if (t) return t.call(e);
|
|
13574
|
+
if ("function" == typeof e.next) return e;
|
|
13575
|
+
if (!isNaN(e.length)) return {
|
|
13576
|
+
next: function next() {
|
|
13577
|
+
return e && r >= e.length && (e = void 0), {
|
|
13578
|
+
value: e && e[r++],
|
|
13579
|
+
done: !e
|
|
13580
|
+
};
|
|
13581
|
+
}
|
|
13582
|
+
};
|
|
13583
|
+
}
|
|
13584
|
+
throw new TypeError(_typeof(e) + " is not iterable");
|
|
13585
|
+
}
|
|
13586
|
+
module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13587
|
+
} (regeneratorValues));
|
|
13588
|
+
return regeneratorValues.exports;
|
|
13589
|
+
}
|
|
13590
|
+
|
|
13591
|
+
var hasRequiredRegeneratorRuntime;
|
|
13592
|
+
|
|
13593
|
+
function requireRegeneratorRuntime () {
|
|
13594
|
+
if (hasRequiredRegeneratorRuntime) return regeneratorRuntime.exports;
|
|
13595
|
+
hasRequiredRegeneratorRuntime = 1;
|
|
13596
|
+
(function (module) {
|
|
13597
|
+
var OverloadYield = /*@__PURE__*/ requireOverloadYield();
|
|
13598
|
+
var regenerator = /*@__PURE__*/ requireRegenerator();
|
|
13599
|
+
var regeneratorAsync = /*@__PURE__*/ requireRegeneratorAsync();
|
|
13600
|
+
var regeneratorAsyncGen = /*@__PURE__*/ requireRegeneratorAsyncGen();
|
|
13601
|
+
var regeneratorAsyncIterator = /*@__PURE__*/ requireRegeneratorAsyncIterator();
|
|
13602
|
+
var regeneratorKeys = /*@__PURE__*/ requireRegeneratorKeys();
|
|
13603
|
+
var regeneratorValues = /*@__PURE__*/ requireRegeneratorValues();
|
|
13604
|
+
function _regeneratorRuntime() {
|
|
13605
|
+
|
|
13606
|
+
var r = regenerator(),
|
|
13607
|
+
e = r.m(_regeneratorRuntime),
|
|
13608
|
+
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
|
|
13609
|
+
function n(r) {
|
|
13610
|
+
var e = "function" == typeof r && r.constructor;
|
|
13611
|
+
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
|
|
13612
|
+
}
|
|
13613
|
+
var o = {
|
|
13614
|
+
"throw": 1,
|
|
13615
|
+
"return": 2,
|
|
13616
|
+
"break": 3,
|
|
13617
|
+
"continue": 3
|
|
13618
|
+
};
|
|
13619
|
+
function a(r) {
|
|
13620
|
+
var e, t;
|
|
13621
|
+
return function (n) {
|
|
13622
|
+
e || (e = {
|
|
13623
|
+
stop: function stop() {
|
|
13624
|
+
return t(n.a, 2);
|
|
13625
|
+
},
|
|
13626
|
+
"catch": function _catch() {
|
|
13627
|
+
return n.v;
|
|
13628
|
+
},
|
|
13629
|
+
abrupt: function abrupt(r, e) {
|
|
13630
|
+
return t(n.a, o[r], e);
|
|
13631
|
+
},
|
|
13632
|
+
delegateYield: function delegateYield(r, o, a) {
|
|
13633
|
+
return e.resultName = o, t(n.d, regeneratorValues(r), a);
|
|
13634
|
+
},
|
|
13635
|
+
finish: function finish(r) {
|
|
13636
|
+
return t(n.f, r);
|
|
13637
|
+
}
|
|
13638
|
+
}, t = function t(r, _t, o) {
|
|
13639
|
+
n.p = e.prev, n.n = e.next;
|
|
13640
|
+
try {
|
|
13641
|
+
return r(_t, o);
|
|
13642
|
+
} finally {
|
|
13643
|
+
e.next = n.n;
|
|
13644
|
+
}
|
|
13645
|
+
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
|
|
13646
|
+
try {
|
|
13647
|
+
return r.call(this, e);
|
|
13648
|
+
} finally {
|
|
13649
|
+
n.p = e.prev, n.n = e.next;
|
|
13650
|
+
}
|
|
13651
|
+
};
|
|
14258
13652
|
}
|
|
14259
|
-
return
|
|
14260
|
-
return this;
|
|
14261
|
-
}), regeneratorDefine(u, "toString", function () {
|
|
14262
|
-
return "[object Generator]";
|
|
14263
|
-
}), (module.exports = _regenerator = function _regenerator() {
|
|
13653
|
+
return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
14264
13654
|
return {
|
|
14265
|
-
|
|
14266
|
-
|
|
13655
|
+
wrap: function wrap(e, t, n, o) {
|
|
13656
|
+
return r.w(a(e), t, n, o && o.reverse());
|
|
13657
|
+
},
|
|
13658
|
+
isGeneratorFunction: n,
|
|
13659
|
+
mark: r.m,
|
|
13660
|
+
awrap: function awrap(r, e) {
|
|
13661
|
+
return new OverloadYield(r, e);
|
|
13662
|
+
},
|
|
13663
|
+
AsyncIterator: regeneratorAsyncIterator,
|
|
13664
|
+
async: function async(r, e, t, o, u) {
|
|
13665
|
+
return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
|
|
13666
|
+
},
|
|
13667
|
+
keys: regeneratorKeys,
|
|
13668
|
+
values: regeneratorValues
|
|
14267
13669
|
};
|
|
14268
13670
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports)();
|
|
14269
13671
|
}
|
|
14270
|
-
module.exports =
|
|
14271
|
-
} (
|
|
14272
|
-
return
|
|
13672
|
+
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13673
|
+
} (regeneratorRuntime));
|
|
13674
|
+
return regeneratorRuntime.exports;
|
|
14273
13675
|
}
|
|
14274
13676
|
|
|
14275
|
-
var
|
|
14276
|
-
|
|
14277
|
-
var regeneratorAsyncGen = {exports: {}};
|
|
14278
|
-
|
|
14279
|
-
var regeneratorAsyncIterator = {exports: {}};
|
|
13677
|
+
var asyncToGenerator = {exports: {}};
|
|
14280
13678
|
|
|
14281
|
-
var
|
|
13679
|
+
var hasRequiredAsyncToGenerator;
|
|
14282
13680
|
|
|
14283
|
-
function
|
|
14284
|
-
if (
|
|
14285
|
-
|
|
13681
|
+
function requireAsyncToGenerator () {
|
|
13682
|
+
if (hasRequiredAsyncToGenerator) return asyncToGenerator.exports;
|
|
13683
|
+
hasRequiredAsyncToGenerator = 1;
|
|
14286
13684
|
(function (module) {
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
u = c.value;
|
|
14294
|
-
return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {
|
|
14295
|
-
n("next", t, i, f);
|
|
14296
|
-
}, function (t) {
|
|
14297
|
-
n("throw", t, i, f);
|
|
14298
|
-
}) : e.resolve(u).then(function (t) {
|
|
14299
|
-
c.value = t, i(c);
|
|
14300
|
-
}, function (t) {
|
|
14301
|
-
return n("throw", t, i, f);
|
|
14302
|
-
});
|
|
14303
|
-
} catch (t) {
|
|
14304
|
-
f(t);
|
|
14305
|
-
}
|
|
13685
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
13686
|
+
try {
|
|
13687
|
+
var i = n[a](c),
|
|
13688
|
+
u = i.value;
|
|
13689
|
+
} catch (n) {
|
|
13690
|
+
return void e(n);
|
|
14306
13691
|
}
|
|
14307
|
-
|
|
14308
|
-
this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () {
|
|
14309
|
-
return this;
|
|
14310
|
-
})), regeneratorDefine(this, "_invoke", function (t, o, i) {
|
|
14311
|
-
function f() {
|
|
14312
|
-
return new e(function (e, r) {
|
|
14313
|
-
n(t, i, e, r);
|
|
14314
|
-
});
|
|
14315
|
-
}
|
|
14316
|
-
return r = r ? r.then(f, f) : f();
|
|
14317
|
-
}, true);
|
|
13692
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
14318
13693
|
}
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
13694
|
+
function _asyncToGenerator(n) {
|
|
13695
|
+
return function () {
|
|
13696
|
+
var t = this,
|
|
13697
|
+
e = arguments;
|
|
13698
|
+
return new Promise(function (r, o) {
|
|
13699
|
+
var a = n.apply(t, e);
|
|
13700
|
+
function _next(n) {
|
|
13701
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
13702
|
+
}
|
|
13703
|
+
function _throw(n) {
|
|
13704
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
13705
|
+
}
|
|
13706
|
+
_next(void 0);
|
|
13707
|
+
});
|
|
13708
|
+
};
|
|
13709
|
+
}
|
|
13710
|
+
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
13711
|
+
} (asyncToGenerator));
|
|
13712
|
+
return asyncToGenerator.exports;
|
|
13713
|
+
}
|
|
13714
|
+
|
|
13715
|
+
var hasRequiredRender;
|
|
13716
|
+
|
|
13717
|
+
function requireRender () {
|
|
13718
|
+
if (hasRequiredRender) return render;
|
|
13719
|
+
hasRequiredRender = 1;
|
|
13720
|
+
|
|
13721
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
13722
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
13723
|
+
Object.defineProperty(render, "__esModule", {
|
|
13724
|
+
value: true
|
|
13725
|
+
});
|
|
13726
|
+
render._r = _r;
|
|
13727
|
+
render._u = _u;
|
|
13728
|
+
render.render = render$1;
|
|
13729
|
+
render.unmount = unmount;
|
|
13730
|
+
var _regeneratorRuntime2 = _interopRequireDefault(/*@__PURE__*/ requireRegeneratorRuntime());
|
|
13731
|
+
var _asyncToGenerator2 = _interopRequireDefault(/*@__PURE__*/ requireAsyncToGenerator());
|
|
13732
|
+
var _typeof2 = _interopRequireDefault(/*@__PURE__*/ require_typeof());
|
|
13733
|
+
var _objectSpread2 = _interopRequireDefault(/*@__PURE__*/ requireObjectSpread2());
|
|
13734
|
+
var ReactDOM = _interopRequireWildcard(ReactDOM__default);
|
|
13735
|
+
// Let compiler not to search module usage
|
|
13736
|
+
var fullClone = (0, _objectSpread2.default)({}, ReactDOM);
|
|
13737
|
+
var version = fullClone.version,
|
|
13738
|
+
reactRender = fullClone.render,
|
|
13739
|
+
unmountComponentAtNode = fullClone.unmountComponentAtNode;
|
|
13740
|
+
var createRoot;
|
|
13741
|
+
try {
|
|
13742
|
+
var mainVersion = Number((version || '').split('.')[0]);
|
|
13743
|
+
if (mainVersion >= 18) {
|
|
13744
|
+
createRoot = fullClone.createRoot;
|
|
13745
|
+
}
|
|
13746
|
+
} catch (e) {
|
|
13747
|
+
// Do nothing;
|
|
13748
|
+
}
|
|
13749
|
+
function toggleWarning(skip) {
|
|
13750
|
+
var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
13751
|
+
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (0, _typeof2.default)(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
|
|
13752
|
+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
|
|
13753
|
+
}
|
|
13754
|
+
}
|
|
13755
|
+
var MARK = '__rc_react_root__';
|
|
13756
|
+
|
|
13757
|
+
// ========================== Render ==========================
|
|
13758
|
+
|
|
13759
|
+
function modernRender(node, container) {
|
|
13760
|
+
toggleWarning(true);
|
|
13761
|
+
var root = container[MARK] || createRoot(container);
|
|
13762
|
+
toggleWarning(false);
|
|
13763
|
+
root.render(node);
|
|
13764
|
+
container[MARK] = root;
|
|
13765
|
+
}
|
|
13766
|
+
function legacyRender(node, container) {
|
|
13767
|
+
reactRender === null || reactRender === void 0 || reactRender(node, container);
|
|
13768
|
+
}
|
|
13769
|
+
|
|
13770
|
+
/** @private Test usage. Not work in prod */
|
|
13771
|
+
function _r(node, container) {
|
|
13772
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13773
|
+
return legacyRender(node, container);
|
|
13774
|
+
}
|
|
13775
|
+
}
|
|
13776
|
+
function render$1(node, container) {
|
|
13777
|
+
if (createRoot) {
|
|
13778
|
+
modernRender(node, container);
|
|
13779
|
+
return;
|
|
13780
|
+
}
|
|
13781
|
+
legacyRender(node, container);
|
|
13782
|
+
}
|
|
13783
|
+
|
|
13784
|
+
// ========================= Unmount ==========================
|
|
13785
|
+
function modernUnmount(_x) {
|
|
13786
|
+
return _modernUnmount.apply(this, arguments);
|
|
13787
|
+
}
|
|
13788
|
+
function _modernUnmount() {
|
|
13789
|
+
_modernUnmount = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(container) {
|
|
13790
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
13791
|
+
while (1) switch (_context.prev = _context.next) {
|
|
13792
|
+
case 0:
|
|
13793
|
+
return _context.abrupt("return", Promise.resolve().then(function () {
|
|
13794
|
+
var _container$MARK;
|
|
13795
|
+
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 || _container$MARK.unmount();
|
|
13796
|
+
delete container[MARK];
|
|
13797
|
+
}));
|
|
13798
|
+
case 1:
|
|
13799
|
+
case "end":
|
|
13800
|
+
return _context.stop();
|
|
13801
|
+
}
|
|
13802
|
+
}, _callee);
|
|
13803
|
+
}));
|
|
13804
|
+
return _modernUnmount.apply(this, arguments);
|
|
13805
|
+
}
|
|
13806
|
+
function legacyUnmount(container) {
|
|
13807
|
+
unmountComponentAtNode(container);
|
|
13808
|
+
}
|
|
13809
|
+
|
|
13810
|
+
/** @private Test usage. Not work in prod */
|
|
13811
|
+
function _u(container) {
|
|
13812
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13813
|
+
return legacyUnmount(container);
|
|
13814
|
+
}
|
|
13815
|
+
}
|
|
13816
|
+
function unmount(_x2) {
|
|
13817
|
+
return _unmount.apply(this, arguments);
|
|
13818
|
+
}
|
|
13819
|
+
function _unmount() {
|
|
13820
|
+
_unmount = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(container) {
|
|
13821
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
13822
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
13823
|
+
case 0:
|
|
13824
|
+
if (!(createRoot !== undefined)) {
|
|
13825
|
+
_context2.next = 2;
|
|
13826
|
+
break;
|
|
13827
|
+
}
|
|
13828
|
+
return _context2.abrupt("return", modernUnmount(container));
|
|
13829
|
+
case 2:
|
|
13830
|
+
legacyUnmount(container);
|
|
13831
|
+
case 3:
|
|
13832
|
+
case "end":
|
|
13833
|
+
return _context2.stop();
|
|
13834
|
+
}
|
|
13835
|
+
}, _callee2);
|
|
13836
|
+
}));
|
|
13837
|
+
return _unmount.apply(this, arguments);
|
|
13838
|
+
}
|
|
13839
|
+
return render;
|
|
14322
13840
|
}
|
|
14323
13841
|
|
|
14324
|
-
var
|
|
14325
|
-
|
|
14326
|
-
function requireRegeneratorAsyncGen () {
|
|
14327
|
-
if (hasRequiredRegeneratorAsyncGen) return regeneratorAsyncGen.exports;
|
|
14328
|
-
hasRequiredRegeneratorAsyncGen = 1;
|
|
14329
|
-
(function (module) {
|
|
14330
|
-
var regenerator = /*@__PURE__*/ requireRegenerator();
|
|
14331
|
-
var regeneratorAsyncIterator = /*@__PURE__*/ requireRegeneratorAsyncIterator();
|
|
14332
|
-
function _regeneratorAsyncGen(r, e, t, o, n) {
|
|
14333
|
-
return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
|
|
14334
|
-
}
|
|
14335
|
-
module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
14336
|
-
} (regeneratorAsyncGen));
|
|
14337
|
-
return regeneratorAsyncGen.exports;
|
|
14338
|
-
}
|
|
13842
|
+
var hasRequiredUnstableContext;
|
|
14339
13843
|
|
|
14340
|
-
|
|
13844
|
+
function requireUnstableContext () {
|
|
13845
|
+
if (hasRequiredUnstableContext) return UnstableContext;
|
|
13846
|
+
hasRequiredUnstableContext = 1;
|
|
14341
13847
|
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14348
|
-
|
|
14349
|
-
|
|
14350
|
-
|
|
14351
|
-
|
|
14352
|
-
|
|
14353
|
-
|
|
14354
|
-
|
|
14355
|
-
|
|
13848
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
13849
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
13850
|
+
Object.defineProperty(UnstableContext, "__esModule", {
|
|
13851
|
+
value: true
|
|
13852
|
+
});
|
|
13853
|
+
UnstableContext.unstableSetRender = unstableSetRender;
|
|
13854
|
+
var React = _interopRequireWildcard(React__default);
|
|
13855
|
+
var ReactDOM = _interopRequireWildcard(ReactDOM__default);
|
|
13856
|
+
var _render = /*@__PURE__*/ requireRender();
|
|
13857
|
+
var _warning = _interopRequireDefault(/*@__PURE__*/ requireWarning());
|
|
13858
|
+
const defaultReactRender = (node, container) => {
|
|
13859
|
+
// TODO: Remove in v6
|
|
13860
|
+
// Warning for React 19
|
|
13861
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13862
|
+
const majorVersion = parseInt(React.version.split('.')[0], 10);
|
|
13863
|
+
const fullKeys = Object.keys(ReactDOM);
|
|
13864
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(majorVersion < 19 || fullKeys.includes('createRoot'), 'compatible', 'antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.') : void 0;
|
|
13865
|
+
}
|
|
13866
|
+
(0, _render.render)(node, container);
|
|
13867
|
+
return () => {
|
|
13868
|
+
return (0, _render.unmount)(container);
|
|
13869
|
+
};
|
|
13870
|
+
};
|
|
13871
|
+
let unstableRender = defaultReactRender;
|
|
13872
|
+
/**
|
|
13873
|
+
* @deprecated Set React render function for compatible usage.
|
|
13874
|
+
* This is internal usage only compatible with React 19.
|
|
13875
|
+
* And will be removed in next major version.
|
|
13876
|
+
*/
|
|
13877
|
+
function unstableSetRender(render) {
|
|
13878
|
+
if (render) {
|
|
13879
|
+
unstableRender = render;
|
|
13880
|
+
}
|
|
13881
|
+
return unstableRender;
|
|
13882
|
+
}
|
|
13883
|
+
return UnstableContext;
|
|
14356
13884
|
}
|
|
14357
13885
|
|
|
14358
|
-
var
|
|
13886
|
+
var util$1 = {};
|
|
14359
13887
|
|
|
14360
|
-
var
|
|
13888
|
+
var hasRequiredUtil$1;
|
|
14361
13889
|
|
|
14362
|
-
function
|
|
14363
|
-
if (
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14376
|
-
|
|
14377
|
-
|
|
13890
|
+
function requireUtil$1 () {
|
|
13891
|
+
if (hasRequiredUtil$1) return util$1;
|
|
13892
|
+
hasRequiredUtil$1 = 1;
|
|
13893
|
+
|
|
13894
|
+
Object.defineProperty(util$1, "__esModule", {
|
|
13895
|
+
value: true
|
|
13896
|
+
});
|
|
13897
|
+
util$1.getTargetWaveColor = getTargetWaveColor;
|
|
13898
|
+
util$1.isValidWaveColor = isValidWaveColor;
|
|
13899
|
+
function isValidWaveColor(color) {
|
|
13900
|
+
return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && !/rgba\((?:\d*, ){3}0\)/.test(color) &&
|
|
13901
|
+
// any transparent rgba color
|
|
13902
|
+
color !== 'transparent';
|
|
13903
|
+
}
|
|
13904
|
+
function getTargetWaveColor(node) {
|
|
13905
|
+
const {
|
|
13906
|
+
borderTopColor,
|
|
13907
|
+
borderColor,
|
|
13908
|
+
backgroundColor
|
|
13909
|
+
} = getComputedStyle(node);
|
|
13910
|
+
if (isValidWaveColor(borderTopColor)) {
|
|
13911
|
+
return borderTopColor;
|
|
13912
|
+
}
|
|
13913
|
+
if (isValidWaveColor(borderColor)) {
|
|
13914
|
+
return borderColor;
|
|
13915
|
+
}
|
|
13916
|
+
if (isValidWaveColor(backgroundColor)) {
|
|
13917
|
+
return backgroundColor;
|
|
13918
|
+
}
|
|
13919
|
+
return null;
|
|
13920
|
+
}
|
|
13921
|
+
return util$1;
|
|
14378
13922
|
}
|
|
14379
13923
|
|
|
14380
|
-
var
|
|
13924
|
+
var hasRequiredWaveEffect;
|
|
14381
13925
|
|
|
14382
|
-
|
|
13926
|
+
function requireWaveEffect () {
|
|
13927
|
+
if (hasRequiredWaveEffect) return WaveEffect;
|
|
13928
|
+
hasRequiredWaveEffect = 1;
|
|
14383
13929
|
|
|
14384
|
-
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
|
|
14390
|
-
|
|
14391
|
-
|
|
14392
|
-
|
|
14393
|
-
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
13930
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
13931
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
13932
|
+
Object.defineProperty(WaveEffect, "__esModule", {
|
|
13933
|
+
value: true
|
|
13934
|
+
});
|
|
13935
|
+
WaveEffect.default = void 0;
|
|
13936
|
+
var React = _interopRequireWildcard(React__default);
|
|
13937
|
+
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
13938
|
+
var _rcMotion = _interopRequireDefault(require$$5$1);
|
|
13939
|
+
var _raf = _interopRequireDefault(/*@__PURE__*/ requireRaf());
|
|
13940
|
+
var _ref = /*@__PURE__*/ requireRef();
|
|
13941
|
+
var _UnstableContext = /*@__PURE__*/ requireUnstableContext();
|
|
13942
|
+
var _interface = /*@__PURE__*/ require_interface();
|
|
13943
|
+
var _util = /*@__PURE__*/ requireUtil$1();
|
|
13944
|
+
function validateNum(value) {
|
|
13945
|
+
return Number.isNaN(value) ? 0 : value;
|
|
13946
|
+
}
|
|
13947
|
+
const WaveEffect$1 = props => {
|
|
13948
|
+
const {
|
|
13949
|
+
className,
|
|
13950
|
+
target,
|
|
13951
|
+
component,
|
|
13952
|
+
registerUnmount
|
|
13953
|
+
} = props;
|
|
13954
|
+
const divRef = React.useRef(null);
|
|
13955
|
+
// ====================== Refs ======================
|
|
13956
|
+
const unmountRef = React.useRef(null);
|
|
13957
|
+
React.useEffect(() => {
|
|
13958
|
+
unmountRef.current = registerUnmount();
|
|
13959
|
+
}, []);
|
|
13960
|
+
// ===================== Effect =====================
|
|
13961
|
+
const [color, setWaveColor] = React.useState(null);
|
|
13962
|
+
const [borderRadius, setBorderRadius] = React.useState([]);
|
|
13963
|
+
const [left, setLeft] = React.useState(0);
|
|
13964
|
+
const [top, setTop] = React.useState(0);
|
|
13965
|
+
const [width, setWidth] = React.useState(0);
|
|
13966
|
+
const [height, setHeight] = React.useState(0);
|
|
13967
|
+
const [enabled, setEnabled] = React.useState(false);
|
|
13968
|
+
const waveStyle = {
|
|
13969
|
+
left,
|
|
13970
|
+
top,
|
|
13971
|
+
width,
|
|
13972
|
+
height,
|
|
13973
|
+
borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')
|
|
13974
|
+
};
|
|
13975
|
+
if (color) {
|
|
13976
|
+
waveStyle['--wave-color'] = color;
|
|
13977
|
+
}
|
|
13978
|
+
function syncPos() {
|
|
13979
|
+
const nodeStyle = getComputedStyle(target);
|
|
13980
|
+
// Get wave color from target
|
|
13981
|
+
setWaveColor((0, _util.getTargetWaveColor)(target));
|
|
13982
|
+
const isStatic = nodeStyle.position === 'static';
|
|
13983
|
+
// Rect
|
|
13984
|
+
const {
|
|
13985
|
+
borderLeftWidth,
|
|
13986
|
+
borderTopWidth
|
|
13987
|
+
} = nodeStyle;
|
|
13988
|
+
setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));
|
|
13989
|
+
setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));
|
|
13990
|
+
setWidth(target.offsetWidth);
|
|
13991
|
+
setHeight(target.offsetHeight);
|
|
13992
|
+
// Get border radius
|
|
13993
|
+
const {
|
|
13994
|
+
borderTopLeftRadius,
|
|
13995
|
+
borderTopRightRadius,
|
|
13996
|
+
borderBottomLeftRadius,
|
|
13997
|
+
borderBottomRightRadius
|
|
13998
|
+
} = nodeStyle;
|
|
13999
|
+
setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));
|
|
14000
|
+
}
|
|
14001
|
+
React.useEffect(() => {
|
|
14002
|
+
if (target) {
|
|
14003
|
+
// We need delay to check position here
|
|
14004
|
+
// since UI may change after click
|
|
14005
|
+
const id = (0, _raf.default)(() => {
|
|
14006
|
+
syncPos();
|
|
14007
|
+
setEnabled(true);
|
|
14008
|
+
});
|
|
14009
|
+
// Add resize observer to follow size
|
|
14010
|
+
let resizeObserver;
|
|
14011
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
14012
|
+
resizeObserver = new ResizeObserver(syncPos);
|
|
14013
|
+
resizeObserver.observe(target);
|
|
14014
|
+
}
|
|
14015
|
+
return () => {
|
|
14016
|
+
_raf.default.cancel(id);
|
|
14017
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
14018
|
+
};
|
|
14019
|
+
}
|
|
14020
|
+
}, []);
|
|
14021
|
+
if (!enabled) {
|
|
14022
|
+
return null;
|
|
14023
|
+
}
|
|
14024
|
+
const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(_interface.TARGET_CLS));
|
|
14025
|
+
return /*#__PURE__*/React.createElement(_rcMotion.default, {
|
|
14026
|
+
visible: true,
|
|
14027
|
+
motionAppear: true,
|
|
14028
|
+
motionName: "wave-motion",
|
|
14029
|
+
motionDeadline: 5000,
|
|
14030
|
+
onAppearEnd: (_, event) => {
|
|
14031
|
+
var _a, _b;
|
|
14032
|
+
if (event.deadline || event.propertyName === 'opacity') {
|
|
14033
|
+
const holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
14034
|
+
(_b = unmountRef.current) === null || _b === void 0 ? void 0 : _b.call(unmountRef).then(() => {
|
|
14035
|
+
holder === null || holder === void 0 ? void 0 : holder.remove();
|
|
14036
|
+
});
|
|
14037
|
+
}
|
|
14038
|
+
return false;
|
|
14039
|
+
}
|
|
14040
|
+
}, ({
|
|
14041
|
+
className: motionClassName
|
|
14042
|
+
}, ref) => (/*#__PURE__*/React.createElement("div", {
|
|
14043
|
+
ref: (0, _ref.composeRef)(divRef, ref),
|
|
14044
|
+
className: (0, _classnames.default)(className, motionClassName, {
|
|
14045
|
+
'wave-quick': isSmallComponent
|
|
14046
|
+
}),
|
|
14047
|
+
style: waveStyle
|
|
14048
|
+
})));
|
|
14049
|
+
};
|
|
14050
|
+
const showWaveEffect = (target, info) => {
|
|
14051
|
+
var _a;
|
|
14052
|
+
const {
|
|
14053
|
+
component
|
|
14054
|
+
} = info;
|
|
14055
|
+
// Skip for unchecked checkbox
|
|
14056
|
+
if (component === 'Checkbox' && !((_a = target.querySelector('input')) === null || _a === void 0 ? void 0 : _a.checked)) {
|
|
14057
|
+
return;
|
|
14058
|
+
}
|
|
14059
|
+
// Create holder
|
|
14060
|
+
const holder = document.createElement('div');
|
|
14061
|
+
holder.style.position = 'absolute';
|
|
14062
|
+
holder.style.left = '0px';
|
|
14063
|
+
holder.style.top = '0px';
|
|
14064
|
+
target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);
|
|
14065
|
+
const reactRender = (0, _UnstableContext.unstableSetRender)();
|
|
14066
|
+
let unmountCallback = null;
|
|
14067
|
+
function registerUnmount() {
|
|
14068
|
+
return unmountCallback;
|
|
14069
|
+
}
|
|
14070
|
+
unmountCallback = reactRender(/*#__PURE__*/React.createElement(WaveEffect$1, Object.assign({}, info, {
|
|
14071
|
+
target: target,
|
|
14072
|
+
registerUnmount: registerUnmount
|
|
14073
|
+
})), holder);
|
|
14074
|
+
};
|
|
14075
|
+
WaveEffect.default = showWaveEffect;
|
|
14076
|
+
return WaveEffect;
|
|
14409
14077
|
}
|
|
14410
14078
|
|
|
14411
|
-
var
|
|
14079
|
+
var hasRequiredUseWave;
|
|
14412
14080
|
|
|
14413
|
-
function
|
|
14414
|
-
if (
|
|
14415
|
-
|
|
14416
|
-
(function (module) {
|
|
14417
|
-
var OverloadYield = /*@__PURE__*/ requireOverloadYield();
|
|
14418
|
-
var regenerator = /*@__PURE__*/ requireRegenerator();
|
|
14419
|
-
var regeneratorAsync = /*@__PURE__*/ requireRegeneratorAsync();
|
|
14420
|
-
var regeneratorAsyncGen = /*@__PURE__*/ requireRegeneratorAsyncGen();
|
|
14421
|
-
var regeneratorAsyncIterator = /*@__PURE__*/ requireRegeneratorAsyncIterator();
|
|
14422
|
-
var regeneratorKeys = /*@__PURE__*/ requireRegeneratorKeys();
|
|
14423
|
-
var regeneratorValues = /*@__PURE__*/ requireRegeneratorValues();
|
|
14424
|
-
function _regeneratorRuntime() {
|
|
14081
|
+
function requireUseWave () {
|
|
14082
|
+
if (hasRequiredUseWave) return useWave;
|
|
14083
|
+
hasRequiredUseWave = 1;
|
|
14425
14084
|
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
|
|
14450
|
-
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
return {
|
|
14475
|
-
wrap: function wrap(e, t, n, o) {
|
|
14476
|
-
return r.w(a(e), t, n, o && o.reverse());
|
|
14477
|
-
},
|
|
14478
|
-
isGeneratorFunction: n,
|
|
14479
|
-
mark: r.m,
|
|
14480
|
-
awrap: function awrap(r, e) {
|
|
14481
|
-
return new OverloadYield(r, e);
|
|
14482
|
-
},
|
|
14483
|
-
AsyncIterator: regeneratorAsyncIterator,
|
|
14484
|
-
async: function async(r, e, t, o, u) {
|
|
14485
|
-
return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
|
|
14486
|
-
},
|
|
14487
|
-
keys: regeneratorKeys,
|
|
14488
|
-
values: regeneratorValues
|
|
14489
|
-
};
|
|
14490
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports)();
|
|
14491
|
-
}
|
|
14492
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
14493
|
-
} (regeneratorRuntime));
|
|
14494
|
-
return regeneratorRuntime.exports;
|
|
14085
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14086
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14087
|
+
Object.defineProperty(useWave, "__esModule", {
|
|
14088
|
+
value: true
|
|
14089
|
+
});
|
|
14090
|
+
useWave.default = void 0;
|
|
14091
|
+
var React = _interopRequireWildcard(React__default);
|
|
14092
|
+
var _useEvent = _interopRequireDefault(/*@__PURE__*/ requireUseEvent());
|
|
14093
|
+
var _raf = _interopRequireDefault(/*@__PURE__*/ requireRaf());
|
|
14094
|
+
var _configProvider = /*@__PURE__*/ requireConfigProvider();
|
|
14095
|
+
var _useToken = _interopRequireDefault(/*@__PURE__*/ requireUseToken());
|
|
14096
|
+
var _interface = /*@__PURE__*/ require_interface();
|
|
14097
|
+
var _WaveEffect = _interopRequireDefault(/*@__PURE__*/ requireWaveEffect());
|
|
14098
|
+
const useWave$1 = (nodeRef, className, component) => {
|
|
14099
|
+
const {
|
|
14100
|
+
wave
|
|
14101
|
+
} = React.useContext(_configProvider.ConfigContext);
|
|
14102
|
+
const [, token, hashId] = (0, _useToken.default)();
|
|
14103
|
+
const showWave = (0, _useEvent.default)(event => {
|
|
14104
|
+
const node = nodeRef.current;
|
|
14105
|
+
if ((wave === null || wave === void 0 ? void 0 : wave.disabled) || !node) {
|
|
14106
|
+
return;
|
|
14107
|
+
}
|
|
14108
|
+
const targetNode = node.querySelector(`.${_interface.TARGET_CLS}`) || node;
|
|
14109
|
+
const {
|
|
14110
|
+
showEffect
|
|
14111
|
+
} = wave || {};
|
|
14112
|
+
// Customize wave effect
|
|
14113
|
+
(showEffect || _WaveEffect.default)(targetNode, {
|
|
14114
|
+
className,
|
|
14115
|
+
token,
|
|
14116
|
+
component,
|
|
14117
|
+
event,
|
|
14118
|
+
hashId
|
|
14119
|
+
});
|
|
14120
|
+
});
|
|
14121
|
+
const rafId = React.useRef(null);
|
|
14122
|
+
// Merge trigger event into one for each frame
|
|
14123
|
+
const showDebounceWave = event => {
|
|
14124
|
+
_raf.default.cancel(rafId.current);
|
|
14125
|
+
rafId.current = (0, _raf.default)(() => {
|
|
14126
|
+
showWave(event);
|
|
14127
|
+
});
|
|
14128
|
+
};
|
|
14129
|
+
return showDebounceWave;
|
|
14130
|
+
};
|
|
14131
|
+
useWave.default = useWave$1;
|
|
14132
|
+
return useWave;
|
|
14495
14133
|
}
|
|
14496
14134
|
|
|
14497
|
-
var
|
|
14135
|
+
var hasRequiredWave;
|
|
14498
14136
|
|
|
14499
|
-
|
|
14137
|
+
function requireWave () {
|
|
14138
|
+
if (hasRequiredWave) return wave;
|
|
14139
|
+
hasRequiredWave = 1;
|
|
14500
14140
|
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14141
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14142
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14143
|
+
Object.defineProperty(wave, "__esModule", {
|
|
14144
|
+
value: true
|
|
14145
|
+
});
|
|
14146
|
+
wave.default = void 0;
|
|
14147
|
+
var _react = _interopRequireWildcard(React__default);
|
|
14148
|
+
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
14149
|
+
var _isVisible = _interopRequireDefault(/*@__PURE__*/ requireIsVisible());
|
|
14150
|
+
var _ref = /*@__PURE__*/ requireRef();
|
|
14151
|
+
var _configProvider = /*@__PURE__*/ requireConfigProvider();
|
|
14152
|
+
var _reactNode = /*@__PURE__*/ requireReactNode();
|
|
14153
|
+
var _style = _interopRequireDefault(/*@__PURE__*/ requireStyle$3());
|
|
14154
|
+
var _useWave = _interopRequireDefault(/*@__PURE__*/ requireUseWave());
|
|
14155
|
+
const Wave = props => {
|
|
14156
|
+
const {
|
|
14157
|
+
children,
|
|
14158
|
+
disabled,
|
|
14159
|
+
component
|
|
14160
|
+
} = props;
|
|
14161
|
+
const {
|
|
14162
|
+
getPrefixCls
|
|
14163
|
+
} = (0, _react.useContext)(_configProvider.ConfigContext);
|
|
14164
|
+
const containerRef = (0, _react.useRef)(null);
|
|
14165
|
+
// ============================== Style ===============================
|
|
14166
|
+
const prefixCls = getPrefixCls('wave');
|
|
14167
|
+
const [, hashId] = (0, _style.default)(prefixCls);
|
|
14168
|
+
// =============================== Wave ===============================
|
|
14169
|
+
const showWave = (0, _useWave.default)(containerRef, (0, _classnames.default)(prefixCls, hashId), component);
|
|
14170
|
+
// ============================== Effect ==============================
|
|
14171
|
+
_react.default.useEffect(() => {
|
|
14172
|
+
const node = containerRef.current;
|
|
14173
|
+
if (!node || node.nodeType !== 1 || disabled) {
|
|
14174
|
+
return;
|
|
14175
|
+
}
|
|
14176
|
+
// Click handler
|
|
14177
|
+
const onClick = e => {
|
|
14178
|
+
// Fix radio button click twice
|
|
14179
|
+
if (!(0, _isVisible.default)(e.target) ||
|
|
14180
|
+
// No need wave
|
|
14181
|
+
!node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') || node.className.includes('-leave')) {
|
|
14182
|
+
return;
|
|
14183
|
+
}
|
|
14184
|
+
showWave(e);
|
|
14185
|
+
};
|
|
14186
|
+
// Bind events
|
|
14187
|
+
node.addEventListener('click', onClick, true);
|
|
14188
|
+
return () => {
|
|
14189
|
+
node.removeEventListener('click', onClick, true);
|
|
14190
|
+
};
|
|
14191
|
+
}, [disabled]);
|
|
14192
|
+
// ============================== Render ==============================
|
|
14193
|
+
if (! /*#__PURE__*/_react.default.isValidElement(children)) {
|
|
14194
|
+
return children !== null && children !== void 0 ? children : null;
|
|
14195
|
+
}
|
|
14196
|
+
const ref = (0, _ref.supportRef)(children) ? (0, _ref.composeRef)((0, _ref.getNodeRef)(children), containerRef) : containerRef;
|
|
14197
|
+
return (0, _reactNode.cloneElement)(children, {
|
|
14198
|
+
ref
|
|
14199
|
+
});
|
|
14200
|
+
};
|
|
14201
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14202
|
+
Wave.displayName = 'Wave';
|
|
14203
|
+
}
|
|
14204
|
+
wave.default = Wave;
|
|
14205
|
+
return wave;
|
|
14533
14206
|
}
|
|
14534
14207
|
|
|
14535
|
-
var
|
|
14208
|
+
var buttonGroup = {};
|
|
14536
14209
|
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
14210
|
+
var hasRequiredButtonGroup;
|
|
14211
|
+
|
|
14212
|
+
function requireButtonGroup () {
|
|
14213
|
+
if (hasRequiredButtonGroup) return buttonGroup;
|
|
14214
|
+
hasRequiredButtonGroup = 1;
|
|
14540
14215
|
|
|
14541
|
-
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14542
14216
|
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14543
|
-
|
|
14217
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14218
|
+
Object.defineProperty(buttonGroup, "__esModule", {
|
|
14544
14219
|
value: true
|
|
14545
14220
|
});
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
var
|
|
14551
|
-
var
|
|
14552
|
-
var
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
var version = fullClone.version,
|
|
14558
|
-
reactRender = fullClone.render,
|
|
14559
|
-
unmountComponentAtNode = fullClone.unmountComponentAtNode;
|
|
14560
|
-
var createRoot;
|
|
14561
|
-
try {
|
|
14562
|
-
var mainVersion = Number((version || '').split('.')[0]);
|
|
14563
|
-
if (mainVersion >= 18) {
|
|
14564
|
-
createRoot = fullClone.createRoot;
|
|
14565
|
-
}
|
|
14566
|
-
} catch (e) {
|
|
14567
|
-
// Do nothing;
|
|
14568
|
-
}
|
|
14569
|
-
function toggleWarning(skip) {
|
|
14570
|
-
var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
14571
|
-
if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (0, _typeof2.default)(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
|
|
14572
|
-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
|
|
14573
|
-
}
|
|
14574
|
-
}
|
|
14575
|
-
var MARK = '__rc_react_root__';
|
|
14576
|
-
|
|
14577
|
-
// ========================== Render ==========================
|
|
14578
|
-
|
|
14579
|
-
function modernRender(node, container) {
|
|
14580
|
-
toggleWarning(true);
|
|
14581
|
-
var root = container[MARK] || createRoot(container);
|
|
14582
|
-
toggleWarning(false);
|
|
14583
|
-
root.render(node);
|
|
14584
|
-
container[MARK] = root;
|
|
14585
|
-
}
|
|
14586
|
-
function legacyRender(node, container) {
|
|
14587
|
-
reactRender === null || reactRender === void 0 || reactRender(node, container);
|
|
14588
|
-
}
|
|
14589
|
-
|
|
14590
|
-
/** @private Test usage. Not work in prod */
|
|
14591
|
-
function _r(node, container) {
|
|
14592
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
14593
|
-
return legacyRender(node, container);
|
|
14594
|
-
}
|
|
14595
|
-
}
|
|
14596
|
-
function render$1(node, container) {
|
|
14597
|
-
if (createRoot) {
|
|
14598
|
-
modernRender(node, container);
|
|
14599
|
-
return;
|
|
14221
|
+
buttonGroup.default = buttonGroup.GroupSizeContext = void 0;
|
|
14222
|
+
var React = _interopRequireWildcard(React__default);
|
|
14223
|
+
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
14224
|
+
var _warning = /*@__PURE__*/ requireWarning();
|
|
14225
|
+
var _configProvider = /*@__PURE__*/ requireConfigProvider();
|
|
14226
|
+
var _internal = /*@__PURE__*/ requireInternal();
|
|
14227
|
+
var __rest = function (s, e) {
|
|
14228
|
+
var t = {};
|
|
14229
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
14230
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
14231
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
14600
14232
|
}
|
|
14601
|
-
|
|
14602
|
-
}
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
unmountComponentAtNode(container);
|
|
14628
|
-
}
|
|
14629
|
-
|
|
14630
|
-
/** @private Test usage. Not work in prod */
|
|
14631
|
-
function _u(container) {
|
|
14233
|
+
return t;
|
|
14234
|
+
};
|
|
14235
|
+
const GroupSizeContext = buttonGroup.GroupSizeContext = /*#__PURE__*/React.createContext(undefined);
|
|
14236
|
+
const ButtonGroup = props => {
|
|
14237
|
+
const {
|
|
14238
|
+
getPrefixCls,
|
|
14239
|
+
direction
|
|
14240
|
+
} = React.useContext(_configProvider.ConfigContext);
|
|
14241
|
+
const {
|
|
14242
|
+
prefixCls: customizePrefixCls,
|
|
14243
|
+
size,
|
|
14244
|
+
className
|
|
14245
|
+
} = props,
|
|
14246
|
+
others = __rest(props, ["prefixCls", "size", "className"]);
|
|
14247
|
+
const prefixCls = getPrefixCls('btn-group', customizePrefixCls);
|
|
14248
|
+
const [,, hashId] = (0, _internal.useToken)();
|
|
14249
|
+
const sizeCls = React.useMemo(() => {
|
|
14250
|
+
switch (size) {
|
|
14251
|
+
case 'large':
|
|
14252
|
+
return 'lg';
|
|
14253
|
+
case 'small':
|
|
14254
|
+
return 'sm';
|
|
14255
|
+
default:
|
|
14256
|
+
return '';
|
|
14257
|
+
}
|
|
14258
|
+
}, [size]);
|
|
14632
14259
|
if (process.env.NODE_ENV !== 'production') {
|
|
14633
|
-
|
|
14260
|
+
const warning = (0, _warning.devUseWarning)('Button.Group');
|
|
14261
|
+
warning.deprecated(false, 'Button.Group', 'Space.Compact');
|
|
14262
|
+
process.env.NODE_ENV !== "production" ? warning(!size || ['large', 'small', 'middle'].includes(size), 'usage', 'Invalid prop `size`.') : void 0;
|
|
14634
14263
|
}
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
}
|
|
14648
|
-
return _context2.abrupt("return", modernUnmount(container));
|
|
14649
|
-
case 2:
|
|
14650
|
-
legacyUnmount(container);
|
|
14651
|
-
case 3:
|
|
14652
|
-
case "end":
|
|
14653
|
-
return _context2.stop();
|
|
14654
|
-
}
|
|
14655
|
-
}, _callee2);
|
|
14656
|
-
}));
|
|
14657
|
-
return _unmount.apply(this, arguments);
|
|
14658
|
-
}
|
|
14659
|
-
return render;
|
|
14264
|
+
const classes = (0, _classnames.default)(prefixCls, {
|
|
14265
|
+
[`${prefixCls}-${sizeCls}`]: sizeCls,
|
|
14266
|
+
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
14267
|
+
}, className, hashId);
|
|
14268
|
+
return /*#__PURE__*/React.createElement(GroupSizeContext.Provider, {
|
|
14269
|
+
value: size
|
|
14270
|
+
}, /*#__PURE__*/React.createElement("div", Object.assign({}, others, {
|
|
14271
|
+
className: classes
|
|
14272
|
+
})));
|
|
14273
|
+
};
|
|
14274
|
+
buttonGroup.default = ButtonGroup;
|
|
14275
|
+
return buttonGroup;
|
|
14660
14276
|
}
|
|
14661
14277
|
|
|
14662
|
-
var
|
|
14278
|
+
var buttonHelpers = {};
|
|
14663
14279
|
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14280
|
+
var hasRequiredButtonHelpers;
|
|
14281
|
+
|
|
14282
|
+
function requireButtonHelpers () {
|
|
14283
|
+
if (hasRequiredButtonHelpers) return buttonHelpers;
|
|
14284
|
+
hasRequiredButtonHelpers = 1;
|
|
14667
14285
|
|
|
14668
14286
|
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14669
|
-
|
|
14670
|
-
Object.defineProperty(UnstableContext, "__esModule", {
|
|
14287
|
+
Object.defineProperty(buttonHelpers, "__esModule", {
|
|
14671
14288
|
value: true
|
|
14672
14289
|
});
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14290
|
+
buttonHelpers._ButtonVariantTypes = buttonHelpers._ButtonColorTypes = void 0;
|
|
14291
|
+
buttonHelpers.convertLegacyProps = convertLegacyProps;
|
|
14292
|
+
buttonHelpers.isString = isString;
|
|
14293
|
+
buttonHelpers.isTwoCNChar = void 0;
|
|
14294
|
+
buttonHelpers.isUnBorderedButtonVariant = isUnBorderedButtonVariant;
|
|
14295
|
+
buttonHelpers.spaceChildren = spaceChildren;
|
|
14296
|
+
var _toConsumableArray2 = _interopRequireDefault(/*@__PURE__*/ requireToConsumableArray());
|
|
14297
|
+
var _react = _interopRequireDefault(React__default);
|
|
14298
|
+
var _reactNode = /*@__PURE__*/ requireReactNode();
|
|
14299
|
+
var _interface = /*@__PURE__*/ require_interface$1();
|
|
14300
|
+
const rxTwoCNChar = /^[\u4E00-\u9FA5]{2}$/;
|
|
14301
|
+
const isTwoCNChar = buttonHelpers.isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
|
14302
|
+
function convertLegacyProps(type) {
|
|
14303
|
+
if (type === 'danger') {
|
|
14304
|
+
return {
|
|
14305
|
+
danger: true
|
|
14306
|
+
};
|
|
14307
|
+
}
|
|
14308
|
+
return {
|
|
14309
|
+
type
|
|
14310
|
+
};
|
|
14311
|
+
}
|
|
14312
|
+
function isString(str) {
|
|
14313
|
+
return typeof str === 'string';
|
|
14314
|
+
}
|
|
14315
|
+
function isUnBorderedButtonVariant(type) {
|
|
14316
|
+
return type === 'text' || type === 'link';
|
|
14317
|
+
}
|
|
14318
|
+
function splitCNCharsBySpace(child, needInserted) {
|
|
14319
|
+
if (child === null || child === undefined) {
|
|
14320
|
+
return;
|
|
14685
14321
|
}
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
return (0,
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
let unstableRender = defaultReactRender;
|
|
14692
|
-
/**
|
|
14693
|
-
* @deprecated Set React render function for compatible usage.
|
|
14694
|
-
* This is internal usage only compatible with React 19.
|
|
14695
|
-
* And will be removed in next major version.
|
|
14696
|
-
*/
|
|
14697
|
-
function unstableSetRender(render) {
|
|
14698
|
-
if (render) {
|
|
14699
|
-
unstableRender = render;
|
|
14322
|
+
const SPACE = needInserted ? ' ' : '';
|
|
14323
|
+
if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {
|
|
14324
|
+
return (0, _reactNode.cloneElement)(child, {
|
|
14325
|
+
children: child.props.children.split('').join(SPACE)
|
|
14326
|
+
});
|
|
14700
14327
|
}
|
|
14701
|
-
|
|
14328
|
+
if (isString(child)) {
|
|
14329
|
+
return isTwoCNChar(child) ? /*#__PURE__*/_react.default.createElement("span", null, child.split('').join(SPACE)) : /*#__PURE__*/_react.default.createElement("span", null, child);
|
|
14330
|
+
}
|
|
14331
|
+
if ((0, _reactNode.isFragment)(child)) {
|
|
14332
|
+
return /*#__PURE__*/_react.default.createElement("span", null, child);
|
|
14333
|
+
}
|
|
14334
|
+
return child;
|
|
14702
14335
|
}
|
|
14703
|
-
|
|
14336
|
+
function spaceChildren(children, needInserted) {
|
|
14337
|
+
let isPrevChildPure = false;
|
|
14338
|
+
const childList = [];
|
|
14339
|
+
_react.default.Children.forEach(children, child => {
|
|
14340
|
+
const type = typeof child;
|
|
14341
|
+
const isCurrentChildPure = type === 'string' || type === 'number';
|
|
14342
|
+
if (isPrevChildPure && isCurrentChildPure) {
|
|
14343
|
+
const lastIndex = childList.length - 1;
|
|
14344
|
+
const lastChild = childList[lastIndex];
|
|
14345
|
+
childList[lastIndex] = `${lastChild}${child}`;
|
|
14346
|
+
} else {
|
|
14347
|
+
childList.push(child);
|
|
14348
|
+
}
|
|
14349
|
+
isPrevChildPure = isCurrentChildPure;
|
|
14350
|
+
});
|
|
14351
|
+
return _react.default.Children.map(childList, child => splitCNCharsBySpace(child, needInserted));
|
|
14352
|
+
}
|
|
14353
|
+
buttonHelpers._ButtonVariantTypes = ['outlined', 'dashed', 'solid', 'filled', 'text', 'link'];
|
|
14354
|
+
buttonHelpers._ButtonColorTypes = ['default', 'primary', 'danger'].concat((0, _toConsumableArray2.default)(_interface.PresetColors));
|
|
14355
|
+
return buttonHelpers;
|
|
14704
14356
|
}
|
|
14705
14357
|
|
|
14706
|
-
var
|
|
14358
|
+
var DefaultLoadingIcon = {};
|
|
14707
14359
|
|
|
14708
|
-
var
|
|
14360
|
+
var LoadingOutlined$2 = {exports: {}};
|
|
14709
14361
|
|
|
14710
|
-
|
|
14711
|
-
if (hasRequiredUtil) return util;
|
|
14712
|
-
hasRequiredUtil = 1;
|
|
14362
|
+
var LoadingOutlined$1 = {};
|
|
14713
14363
|
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
}
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
const {
|
|
14727
|
-
borderTopColor,
|
|
14728
|
-
borderColor,
|
|
14729
|
-
backgroundColor
|
|
14730
|
-
} = getComputedStyle(node);
|
|
14731
|
-
return (_a = [borderTopColor, borderColor, backgroundColor].find(isValidWaveColor)) !== null && _a !== void 0 ? _a : null;
|
|
14732
|
-
}
|
|
14733
|
-
return util;
|
|
14364
|
+
var LoadingOutlined = {};
|
|
14365
|
+
|
|
14366
|
+
var hasRequiredLoadingOutlined$2;
|
|
14367
|
+
|
|
14368
|
+
function requireLoadingOutlined$2 () {
|
|
14369
|
+
if (hasRequiredLoadingOutlined$2) return LoadingOutlined;
|
|
14370
|
+
hasRequiredLoadingOutlined$2 = 1;
|
|
14371
|
+
// This icon file is generated automatically.
|
|
14372
|
+
Object.defineProperty(LoadingOutlined, "__esModule", { value: true });
|
|
14373
|
+
var LoadingOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
|
|
14374
|
+
LoadingOutlined.default = LoadingOutlined$1;
|
|
14375
|
+
return LoadingOutlined;
|
|
14734
14376
|
}
|
|
14735
14377
|
|
|
14736
|
-
var
|
|
14378
|
+
var hasRequiredLoadingOutlined$1;
|
|
14737
14379
|
|
|
14738
|
-
function
|
|
14739
|
-
if (
|
|
14740
|
-
|
|
14380
|
+
function requireLoadingOutlined$1 () {
|
|
14381
|
+
if (hasRequiredLoadingOutlined$1) return LoadingOutlined$1;
|
|
14382
|
+
hasRequiredLoadingOutlined$1 = 1;
|
|
14741
14383
|
|
|
14742
|
-
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14743
14384
|
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14744
|
-
|
|
14385
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14386
|
+
Object.defineProperty(LoadingOutlined$1, "__esModule", {
|
|
14745
14387
|
value: true
|
|
14746
14388
|
});
|
|
14747
|
-
|
|
14389
|
+
LoadingOutlined$1.default = void 0;
|
|
14390
|
+
var _extends2 = _interopRequireDefault(/*@__PURE__*/ require_extends());
|
|
14748
14391
|
var React = _interopRequireWildcard(React__default);
|
|
14749
|
-
var
|
|
14750
|
-
var
|
|
14751
|
-
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
var
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
const WaveEffect$1 = props => {
|
|
14760
|
-
const {
|
|
14761
|
-
className,
|
|
14762
|
-
target,
|
|
14763
|
-
component,
|
|
14764
|
-
registerUnmount
|
|
14765
|
-
} = props;
|
|
14766
|
-
const divRef = React.useRef(null);
|
|
14767
|
-
// ====================== Refs ======================
|
|
14768
|
-
const unmountRef = React.useRef(null);
|
|
14769
|
-
React.useEffect(() => {
|
|
14770
|
-
unmountRef.current = registerUnmount();
|
|
14771
|
-
}, []);
|
|
14772
|
-
// ===================== Effect =====================
|
|
14773
|
-
const [color, setWaveColor] = React.useState(null);
|
|
14774
|
-
const [borderRadius, setBorderRadius] = React.useState([]);
|
|
14775
|
-
const [left, setLeft] = React.useState(0);
|
|
14776
|
-
const [top, setTop] = React.useState(0);
|
|
14777
|
-
const [width, setWidth] = React.useState(0);
|
|
14778
|
-
const [height, setHeight] = React.useState(0);
|
|
14779
|
-
const [enabled, setEnabled] = React.useState(false);
|
|
14780
|
-
const waveStyle = {
|
|
14781
|
-
left,
|
|
14782
|
-
top,
|
|
14783
|
-
width,
|
|
14784
|
-
height,
|
|
14785
|
-
borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')
|
|
14786
|
-
};
|
|
14787
|
-
if (color) {
|
|
14788
|
-
waveStyle['--wave-color'] = color;
|
|
14789
|
-
}
|
|
14790
|
-
function syncPos() {
|
|
14791
|
-
const nodeStyle = getComputedStyle(target);
|
|
14792
|
-
// Get wave color from target
|
|
14793
|
-
setWaveColor((0, _util.getTargetWaveColor)(target));
|
|
14794
|
-
const isStatic = nodeStyle.position === 'static';
|
|
14795
|
-
// Rect
|
|
14796
|
-
const {
|
|
14797
|
-
borderLeftWidth,
|
|
14798
|
-
borderTopWidth
|
|
14799
|
-
} = nodeStyle;
|
|
14800
|
-
setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));
|
|
14801
|
-
setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));
|
|
14802
|
-
setWidth(target.offsetWidth);
|
|
14803
|
-
setHeight(target.offsetHeight);
|
|
14804
|
-
// Get border radius
|
|
14805
|
-
const {
|
|
14806
|
-
borderTopLeftRadius,
|
|
14807
|
-
borderTopRightRadius,
|
|
14808
|
-
borderBottomLeftRadius,
|
|
14809
|
-
borderBottomRightRadius
|
|
14810
|
-
} = nodeStyle;
|
|
14811
|
-
setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));
|
|
14812
|
-
}
|
|
14813
|
-
React.useEffect(() => {
|
|
14814
|
-
if (target) {
|
|
14815
|
-
// We need delay to check position here
|
|
14816
|
-
// since UI may change after click
|
|
14817
|
-
const id = (0, _raf.default)(() => {
|
|
14818
|
-
syncPos();
|
|
14819
|
-
setEnabled(true);
|
|
14820
|
-
});
|
|
14821
|
-
// Add resize observer to follow size
|
|
14822
|
-
let resizeObserver;
|
|
14823
|
-
if (typeof ResizeObserver !== 'undefined') {
|
|
14824
|
-
resizeObserver = new ResizeObserver(syncPos);
|
|
14825
|
-
resizeObserver.observe(target);
|
|
14826
|
-
}
|
|
14827
|
-
return () => {
|
|
14828
|
-
_raf.default.cancel(id);
|
|
14829
|
-
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
14830
|
-
};
|
|
14831
|
-
}
|
|
14832
|
-
}, []);
|
|
14833
|
-
if (!enabled) {
|
|
14834
|
-
return null;
|
|
14835
|
-
}
|
|
14836
|
-
const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(_interface.TARGET_CLS));
|
|
14837
|
-
return /*#__PURE__*/React.createElement(_rcMotion.default, {
|
|
14838
|
-
visible: true,
|
|
14839
|
-
motionAppear: true,
|
|
14840
|
-
motionName: "wave-motion",
|
|
14841
|
-
motionDeadline: 5000,
|
|
14842
|
-
onAppearEnd: (_, event) => {
|
|
14843
|
-
var _a, _b;
|
|
14844
|
-
if (event.deadline || event.propertyName === 'opacity') {
|
|
14845
|
-
const holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
14846
|
-
(_b = unmountRef.current) === null || _b === void 0 ? void 0 : _b.call(unmountRef).then(() => {
|
|
14847
|
-
holder === null || holder === void 0 ? void 0 : holder.remove();
|
|
14848
|
-
});
|
|
14849
|
-
}
|
|
14850
|
-
return false;
|
|
14851
|
-
}
|
|
14852
|
-
}, ({
|
|
14853
|
-
className: motionClassName
|
|
14854
|
-
}, ref) => (/*#__PURE__*/React.createElement("div", {
|
|
14855
|
-
ref: (0, _ref.composeRef)(divRef, ref),
|
|
14856
|
-
className: (0, _classnames.default)(className, motionClassName, {
|
|
14857
|
-
'wave-quick': isSmallComponent
|
|
14858
|
-
}),
|
|
14859
|
-
style: waveStyle
|
|
14860
|
-
})));
|
|
14392
|
+
var _LoadingOutlined = _interopRequireDefault(/*@__PURE__*/ requireLoadingOutlined$2());
|
|
14393
|
+
var _AntdIcon = _interopRequireDefault(/*@__PURE__*/ requireAntdIcon());
|
|
14394
|
+
// GENERATE BY ./scripts/generate.ts
|
|
14395
|
+
// DON NOT EDIT IT MANUALLY
|
|
14396
|
+
|
|
14397
|
+
var LoadingOutlined = function LoadingOutlined(props, ref) {
|
|
14398
|
+
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _extends2.default)({}, props, {
|
|
14399
|
+
ref: ref,
|
|
14400
|
+
icon: _LoadingOutlined.default
|
|
14401
|
+
}));
|
|
14861
14402
|
};
|
|
14862
|
-
|
|
14863
|
-
|
|
14403
|
+
|
|
14404
|
+
/** */
|
|
14405
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);
|
|
14406
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14407
|
+
RefIcon.displayName = 'LoadingOutlined';
|
|
14408
|
+
}
|
|
14409
|
+
LoadingOutlined$1.default = RefIcon;
|
|
14410
|
+
return LoadingOutlined$1;
|
|
14411
|
+
}
|
|
14412
|
+
|
|
14413
|
+
var hasRequiredLoadingOutlined;
|
|
14414
|
+
|
|
14415
|
+
function requireLoadingOutlined () {
|
|
14416
|
+
if (hasRequiredLoadingOutlined) return LoadingOutlined$2.exports;
|
|
14417
|
+
hasRequiredLoadingOutlined = 1;
|
|
14418
|
+
(function (module, exports) {
|
|
14419
|
+
Object.defineProperty(exports, "__esModule", {
|
|
14420
|
+
value: true
|
|
14421
|
+
});
|
|
14422
|
+
exports.default = void 0;
|
|
14423
|
+
|
|
14424
|
+
const _LoadingOutlined = _interopRequireDefault(/*@__PURE__*/ requireLoadingOutlined$1());
|
|
14425
|
+
|
|
14426
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
14427
|
+
|
|
14428
|
+
const _default = _LoadingOutlined;
|
|
14429
|
+
exports.default = _default;
|
|
14430
|
+
module.exports = _default;
|
|
14431
|
+
} (LoadingOutlined$2, LoadingOutlined$2.exports));
|
|
14432
|
+
return LoadingOutlined$2.exports;
|
|
14433
|
+
}
|
|
14434
|
+
|
|
14435
|
+
var IconWrapper = {};
|
|
14436
|
+
|
|
14437
|
+
var hasRequiredIconWrapper;
|
|
14438
|
+
|
|
14439
|
+
function requireIconWrapper () {
|
|
14440
|
+
if (hasRequiredIconWrapper) return IconWrapper;
|
|
14441
|
+
hasRequiredIconWrapper = 1;
|
|
14442
|
+
|
|
14443
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14444
|
+
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14445
|
+
Object.defineProperty(IconWrapper, "__esModule", {
|
|
14446
|
+
value: true
|
|
14447
|
+
});
|
|
14448
|
+
IconWrapper.default = void 0;
|
|
14449
|
+
var _react = _interopRequireWildcard(React__default);
|
|
14450
|
+
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
14451
|
+
const IconWrapper$1 = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14864
14452
|
const {
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
}
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
function registerUnmount() {
|
|
14880
|
-
return unmountCallback;
|
|
14881
|
-
}
|
|
14882
|
-
unmountCallback = reactRender(/*#__PURE__*/React.createElement(WaveEffect$1, Object.assign({}, info, {
|
|
14883
|
-
target: target,
|
|
14884
|
-
registerUnmount: registerUnmount
|
|
14885
|
-
})), holder);
|
|
14886
|
-
};
|
|
14887
|
-
WaveEffect.default = showWaveEffect;
|
|
14888
|
-
return WaveEffect;
|
|
14453
|
+
className,
|
|
14454
|
+
style,
|
|
14455
|
+
children,
|
|
14456
|
+
prefixCls
|
|
14457
|
+
} = props;
|
|
14458
|
+
const iconWrapperCls = (0, _classnames.default)(`${prefixCls}-icon`, className);
|
|
14459
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
14460
|
+
ref: ref,
|
|
14461
|
+
className: iconWrapperCls,
|
|
14462
|
+
style: style
|
|
14463
|
+
}, children);
|
|
14464
|
+
});
|
|
14465
|
+
IconWrapper.default = IconWrapper$1;
|
|
14466
|
+
return IconWrapper;
|
|
14889
14467
|
}
|
|
14890
14468
|
|
|
14891
|
-
var
|
|
14469
|
+
var hasRequiredDefaultLoadingIcon;
|
|
14892
14470
|
|
|
14893
|
-
function
|
|
14894
|
-
if (
|
|
14895
|
-
|
|
14471
|
+
function requireDefaultLoadingIcon () {
|
|
14472
|
+
if (hasRequiredDefaultLoadingIcon) return DefaultLoadingIcon;
|
|
14473
|
+
hasRequiredDefaultLoadingIcon = 1;
|
|
14896
14474
|
|
|
14897
14475
|
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
14898
14476
|
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14899
|
-
Object.defineProperty(
|
|
14477
|
+
Object.defineProperty(DefaultLoadingIcon, "__esModule", {
|
|
14900
14478
|
value: true
|
|
14901
14479
|
});
|
|
14902
|
-
|
|
14903
|
-
var
|
|
14904
|
-
var
|
|
14905
|
-
var
|
|
14906
|
-
var
|
|
14907
|
-
var
|
|
14908
|
-
|
|
14909
|
-
var _WaveEffect = _interopRequireDefault(/*@__PURE__*/ requireWaveEffect());
|
|
14910
|
-
const useWave$1 = (nodeRef, className, component) => {
|
|
14480
|
+
DefaultLoadingIcon.default = void 0;
|
|
14481
|
+
var _react = _interopRequireWildcard(React__default);
|
|
14482
|
+
var _LoadingOutlined = _interopRequireDefault(/*@__PURE__*/ requireLoadingOutlined());
|
|
14483
|
+
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
14484
|
+
var _rcMotion = _interopRequireDefault(require$$5$1);
|
|
14485
|
+
var _IconWrapper = _interopRequireDefault(/*@__PURE__*/ requireIconWrapper());
|
|
14486
|
+
const InnerLoadingIcon = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14911
14487
|
const {
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14488
|
+
prefixCls,
|
|
14489
|
+
className,
|
|
14490
|
+
style,
|
|
14491
|
+
iconClassName
|
|
14492
|
+
} = props;
|
|
14493
|
+
const mergedIconCls = (0, _classnames.default)(`${prefixCls}-loading-icon`, className);
|
|
14494
|
+
return /*#__PURE__*/_react.default.createElement(_IconWrapper.default, {
|
|
14495
|
+
prefixCls: prefixCls,
|
|
14496
|
+
className: mergedIconCls,
|
|
14497
|
+
style: style,
|
|
14498
|
+
ref: ref
|
|
14499
|
+
}, /*#__PURE__*/_react.default.createElement(_LoadingOutlined.default, {
|
|
14500
|
+
className: iconClassName
|
|
14501
|
+
}));
|
|
14502
|
+
});
|
|
14503
|
+
const getCollapsedWidth = () => ({
|
|
14504
|
+
width: 0,
|
|
14505
|
+
opacity: 0,
|
|
14506
|
+
transform: 'scale(0)'
|
|
14507
|
+
});
|
|
14508
|
+
const getRealWidth = node => ({
|
|
14509
|
+
width: node.scrollWidth,
|
|
14510
|
+
opacity: 1,
|
|
14511
|
+
transform: 'scale(1)'
|
|
14512
|
+
});
|
|
14513
|
+
const DefaultLoadingIcon$1 = props => {
|
|
14514
|
+
const {
|
|
14515
|
+
prefixCls,
|
|
14516
|
+
loading,
|
|
14517
|
+
existIcon,
|
|
14518
|
+
className,
|
|
14519
|
+
style,
|
|
14520
|
+
mount
|
|
14521
|
+
} = props;
|
|
14522
|
+
const visible = !!loading;
|
|
14523
|
+
if (existIcon) {
|
|
14524
|
+
return /*#__PURE__*/_react.default.createElement(InnerLoadingIcon, {
|
|
14525
|
+
prefixCls: prefixCls,
|
|
14526
|
+
className: className,
|
|
14527
|
+
style: style
|
|
14931
14528
|
});
|
|
14932
|
-
}
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14529
|
+
}
|
|
14530
|
+
return /*#__PURE__*/_react.default.createElement(_rcMotion.default, {
|
|
14531
|
+
visible: visible,
|
|
14532
|
+
// Used for minus flex gap style only
|
|
14533
|
+
motionName: `${prefixCls}-loading-icon-motion`,
|
|
14534
|
+
motionAppear: !mount,
|
|
14535
|
+
motionEnter: !mount,
|
|
14536
|
+
motionLeave: !mount,
|
|
14537
|
+
removeOnLeave: true,
|
|
14538
|
+
onAppearStart: getCollapsedWidth,
|
|
14539
|
+
onAppearActive: getRealWidth,
|
|
14540
|
+
onEnterStart: getCollapsedWidth,
|
|
14541
|
+
onEnterActive: getRealWidth,
|
|
14542
|
+
onLeaveStart: getRealWidth,
|
|
14543
|
+
onLeaveActive: getCollapsedWidth
|
|
14544
|
+
}, ({
|
|
14545
|
+
className: motionCls,
|
|
14546
|
+
style: motionStyle
|
|
14547
|
+
}, ref) => {
|
|
14548
|
+
const mergedStyle = Object.assign(Object.assign({}, style), motionStyle);
|
|
14549
|
+
return /*#__PURE__*/_react.default.createElement(InnerLoadingIcon, {
|
|
14550
|
+
prefixCls: prefixCls,
|
|
14551
|
+
className: (0, _classnames.default)(className, motionCls),
|
|
14552
|
+
style: mergedStyle,
|
|
14553
|
+
ref: ref
|
|
14939
14554
|
});
|
|
14555
|
+
});
|
|
14556
|
+
};
|
|
14557
|
+
DefaultLoadingIcon.default = DefaultLoadingIcon$1;
|
|
14558
|
+
return DefaultLoadingIcon;
|
|
14559
|
+
}
|
|
14560
|
+
|
|
14561
|
+
var style$2 = {};
|
|
14562
|
+
|
|
14563
|
+
var group = {};
|
|
14564
|
+
|
|
14565
|
+
var hasRequiredGroup;
|
|
14566
|
+
|
|
14567
|
+
function requireGroup () {
|
|
14568
|
+
if (hasRequiredGroup) return group;
|
|
14569
|
+
hasRequiredGroup = 1;
|
|
14570
|
+
|
|
14571
|
+
Object.defineProperty(group, "__esModule", {
|
|
14572
|
+
value: true
|
|
14573
|
+
});
|
|
14574
|
+
group.default = void 0;
|
|
14575
|
+
const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
|
|
14576
|
+
// Border
|
|
14577
|
+
[`> span, > ${buttonTypeCls}`]: {
|
|
14578
|
+
'&:not(:last-child)': {
|
|
14579
|
+
[`&, & > ${buttonTypeCls}`]: {
|
|
14580
|
+
'&:not(:disabled)': {
|
|
14581
|
+
borderInlineEndColor: borderColor
|
|
14582
|
+
}
|
|
14583
|
+
}
|
|
14584
|
+
},
|
|
14585
|
+
'&:not(:first-child)': {
|
|
14586
|
+
[`&, & > ${buttonTypeCls}`]: {
|
|
14587
|
+
'&:not(:disabled)': {
|
|
14588
|
+
borderInlineStartColor: borderColor
|
|
14589
|
+
}
|
|
14590
|
+
}
|
|
14591
|
+
}
|
|
14592
|
+
}
|
|
14593
|
+
});
|
|
14594
|
+
const genGroupStyle = token => {
|
|
14595
|
+
const {
|
|
14596
|
+
componentCls,
|
|
14597
|
+
fontSize,
|
|
14598
|
+
lineWidth,
|
|
14599
|
+
groupBorderColor,
|
|
14600
|
+
colorErrorHover
|
|
14601
|
+
} = token;
|
|
14602
|
+
return {
|
|
14603
|
+
[`${componentCls}-group`]: [{
|
|
14604
|
+
position: 'relative',
|
|
14605
|
+
display: 'inline-flex',
|
|
14606
|
+
// Border
|
|
14607
|
+
[`> span, > ${componentCls}`]: {
|
|
14608
|
+
'&:not(:last-child)': {
|
|
14609
|
+
[`&, & > ${componentCls}`]: {
|
|
14610
|
+
borderStartEndRadius: 0,
|
|
14611
|
+
borderEndEndRadius: 0
|
|
14612
|
+
}
|
|
14613
|
+
},
|
|
14614
|
+
'&:not(:first-child)': {
|
|
14615
|
+
marginInlineStart: token.calc(lineWidth).mul(-1).equal(),
|
|
14616
|
+
[`&, & > ${componentCls}`]: {
|
|
14617
|
+
borderStartStartRadius: 0,
|
|
14618
|
+
borderEndStartRadius: 0
|
|
14619
|
+
}
|
|
14620
|
+
}
|
|
14621
|
+
},
|
|
14622
|
+
[componentCls]: {
|
|
14623
|
+
position: 'relative',
|
|
14624
|
+
zIndex: 1,
|
|
14625
|
+
'&:hover, &:focus, &:active': {
|
|
14626
|
+
zIndex: 2
|
|
14627
|
+
},
|
|
14628
|
+
'&[disabled]': {
|
|
14629
|
+
zIndex: 0
|
|
14630
|
+
}
|
|
14631
|
+
},
|
|
14632
|
+
[`${componentCls}-icon-only`]: {
|
|
14633
|
+
fontSize
|
|
14634
|
+
}
|
|
14635
|
+
},
|
|
14636
|
+
// Border Color
|
|
14637
|
+
genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]
|
|
14940
14638
|
};
|
|
14941
|
-
return showDebounceWave;
|
|
14942
14639
|
};
|
|
14943
|
-
|
|
14944
|
-
return
|
|
14640
|
+
group.default = genGroupStyle;
|
|
14641
|
+
return group;
|
|
14945
14642
|
}
|
|
14946
14643
|
|
|
14947
|
-
var
|
|
14644
|
+
var token = {};
|
|
14948
14645
|
|
|
14949
|
-
|
|
14950
|
-
if (hasRequiredWave) return wave;
|
|
14951
|
-
hasRequiredWave = 1;
|
|
14646
|
+
var color = {};
|
|
14952
14647
|
|
|
14953
|
-
|
|
14954
|
-
var _interopRequireWildcard = /*@__PURE__*/ requireInteropRequireWildcard().default;
|
|
14955
|
-
Object.defineProperty(wave, "__esModule", {
|
|
14956
|
-
value: true
|
|
14957
|
-
});
|
|
14958
|
-
wave.default = void 0;
|
|
14959
|
-
var _react = _interopRequireWildcard(React__default);
|
|
14960
|
-
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
14961
|
-
var _isVisible = _interopRequireDefault(/*@__PURE__*/ requireIsVisible());
|
|
14962
|
-
var _ref = /*@__PURE__*/ requireRef();
|
|
14963
|
-
var _configProvider = /*@__PURE__*/ requireConfigProvider();
|
|
14964
|
-
var _reactNode = /*@__PURE__*/ requireReactNode();
|
|
14965
|
-
var _style = _interopRequireDefault(/*@__PURE__*/ requireStyle$3());
|
|
14966
|
-
var _useWave = _interopRequireDefault(/*@__PURE__*/ requireUseWave());
|
|
14967
|
-
const Wave = props => {
|
|
14968
|
-
const {
|
|
14969
|
-
children,
|
|
14970
|
-
disabled,
|
|
14971
|
-
component
|
|
14972
|
-
} = props;
|
|
14973
|
-
const {
|
|
14974
|
-
getPrefixCls
|
|
14975
|
-
} = (0, _react.useContext)(_configProvider.ConfigContext);
|
|
14976
|
-
const containerRef = (0, _react.useRef)(null);
|
|
14977
|
-
// ============================== Style ===============================
|
|
14978
|
-
const prefixCls = getPrefixCls('wave');
|
|
14979
|
-
const [, hashId] = (0, _style.default)(prefixCls);
|
|
14980
|
-
// =============================== Wave ===============================
|
|
14981
|
-
const showWave = (0, _useWave.default)(containerRef, (0, _classnames.default)(prefixCls, hashId), component);
|
|
14982
|
-
// ============================== Effect ==============================
|
|
14983
|
-
_react.default.useEffect(() => {
|
|
14984
|
-
const node = containerRef.current;
|
|
14985
|
-
if (!node || node.nodeType !== 1 || disabled) {
|
|
14986
|
-
return;
|
|
14987
|
-
}
|
|
14988
|
-
// Click handler
|
|
14989
|
-
const onClick = e => {
|
|
14990
|
-
// Fix radio button click twice
|
|
14991
|
-
if (!(0, _isVisible.default)(e.target) ||
|
|
14992
|
-
// No need wave
|
|
14993
|
-
!node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') || node.className.includes('-leave')) {
|
|
14994
|
-
return;
|
|
14995
|
-
}
|
|
14996
|
-
showWave(e);
|
|
14997
|
-
};
|
|
14998
|
-
// Bind events
|
|
14999
|
-
node.addEventListener('click', onClick, true);
|
|
15000
|
-
return () => {
|
|
15001
|
-
node.removeEventListener('click', onClick, true);
|
|
15002
|
-
};
|
|
15003
|
-
}, [disabled]);
|
|
15004
|
-
// ============================== Render ==============================
|
|
15005
|
-
if (! /*#__PURE__*/_react.default.isValidElement(children)) {
|
|
15006
|
-
return children !== null && children !== void 0 ? children : null;
|
|
15007
|
-
}
|
|
15008
|
-
const ref = (0, _ref.supportRef)(children) ? (0, _ref.composeRef)((0, _ref.getNodeRef)(children), containerRef) : containerRef;
|
|
15009
|
-
return (0, _reactNode.cloneElement)(children, {
|
|
15010
|
-
ref
|
|
15011
|
-
});
|
|
15012
|
-
};
|
|
15013
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
15014
|
-
Wave.displayName = 'Wave';
|
|
15015
|
-
}
|
|
15016
|
-
wave.default = Wave;
|
|
15017
|
-
return wave;
|
|
15018
|
-
}
|
|
14648
|
+
var classCallCheck = {exports: {}};
|
|
15019
14649
|
|
|
15020
|
-
var
|
|
14650
|
+
var hasRequiredClassCallCheck;
|
|
15021
14651
|
|
|
15022
|
-
|
|
14652
|
+
function requireClassCallCheck () {
|
|
14653
|
+
if (hasRequiredClassCallCheck) return classCallCheck.exports;
|
|
14654
|
+
hasRequiredClassCallCheck = 1;
|
|
14655
|
+
(function (module) {
|
|
14656
|
+
function _classCallCheck(a, n) {
|
|
14657
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
14658
|
+
}
|
|
14659
|
+
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
14660
|
+
} (classCallCheck));
|
|
14661
|
+
return classCallCheck.exports;
|
|
14662
|
+
}
|
|
15023
14663
|
|
|
15024
|
-
|
|
15025
|
-
if (hasRequiredButtonGroup) return buttonGroup;
|
|
15026
|
-
hasRequiredButtonGroup = 1;
|
|
14664
|
+
var createClass = {exports: {}};
|
|
15027
14665
|
|
|
15028
|
-
|
|
15029
|
-
|
|
15030
|
-
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
|
|
15034
|
-
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
|
|
15043
|
-
|
|
15044
|
-
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
const {
|
|
15050
|
-
getPrefixCls,
|
|
15051
|
-
direction
|
|
15052
|
-
} = React.useContext(_configProvider.ConfigContext);
|
|
15053
|
-
const {
|
|
15054
|
-
prefixCls: customizePrefixCls,
|
|
15055
|
-
size,
|
|
15056
|
-
className
|
|
15057
|
-
} = props,
|
|
15058
|
-
others = __rest(props, ["prefixCls", "size", "className"]);
|
|
15059
|
-
const prefixCls = getPrefixCls('btn-group', customizePrefixCls);
|
|
15060
|
-
const [,, hashId] = (0, _internal.useToken)();
|
|
15061
|
-
const sizeCls = React.useMemo(() => {
|
|
15062
|
-
switch (size) {
|
|
15063
|
-
case 'large':
|
|
15064
|
-
return 'lg';
|
|
15065
|
-
case 'small':
|
|
15066
|
-
return 'sm';
|
|
15067
|
-
default:
|
|
15068
|
-
return '';
|
|
15069
|
-
}
|
|
15070
|
-
}, [size]);
|
|
15071
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
15072
|
-
const warning = (0, _warning.devUseWarning)('Button.Group');
|
|
15073
|
-
warning.deprecated(false, 'Button.Group', 'Space.Compact');
|
|
15074
|
-
process.env.NODE_ENV !== "production" ? warning(!size || ['large', 'small', 'middle'].includes(size), 'usage', 'Invalid prop `size`.') : void 0;
|
|
15075
|
-
}
|
|
15076
|
-
const classes = (0, _classnames.default)(prefixCls, {
|
|
15077
|
-
[`${prefixCls}-${sizeCls}`]: sizeCls,
|
|
15078
|
-
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
15079
|
-
}, className, hashId);
|
|
15080
|
-
return /*#__PURE__*/React.createElement(GroupSizeContext.Provider, {
|
|
15081
|
-
value: size
|
|
15082
|
-
}, /*#__PURE__*/React.createElement("div", Object.assign({}, others, {
|
|
15083
|
-
className: classes
|
|
15084
|
-
})));
|
|
15085
|
-
};
|
|
15086
|
-
buttonGroup.default = ButtonGroup;
|
|
15087
|
-
return buttonGroup;
|
|
14666
|
+
var hasRequiredCreateClass;
|
|
14667
|
+
|
|
14668
|
+
function requireCreateClass () {
|
|
14669
|
+
if (hasRequiredCreateClass) return createClass.exports;
|
|
14670
|
+
hasRequiredCreateClass = 1;
|
|
14671
|
+
(function (module) {
|
|
14672
|
+
var toPropertyKey = /*@__PURE__*/ requireToPropertyKey();
|
|
14673
|
+
function _defineProperties(e, r) {
|
|
14674
|
+
for (var t = 0; t < r.length; t++) {
|
|
14675
|
+
var o = r[t];
|
|
14676
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
14677
|
+
}
|
|
14678
|
+
}
|
|
14679
|
+
function _createClass(e, r, t) {
|
|
14680
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
14681
|
+
writable: false
|
|
14682
|
+
}), e;
|
|
14683
|
+
}
|
|
14684
|
+
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
14685
|
+
} (createClass));
|
|
14686
|
+
return createClass.exports;
|
|
15088
14687
|
}
|
|
15089
14688
|
|
|
15090
|
-
var
|
|
14689
|
+
var ColorPickerPrefixCls = 'rc-color-picker';
|
|
14690
|
+
var generateColor = function generateColor(color) {
|
|
14691
|
+
if (color instanceof Color) {
|
|
14692
|
+
return color;
|
|
14693
|
+
}
|
|
14694
|
+
return new Color(color);
|
|
14695
|
+
};
|
|
14696
|
+
var defaultColor = generateColor('#1677ff');
|
|
14697
|
+
var calculateColor = function calculateColor(props) {
|
|
14698
|
+
var offset = props.offset,
|
|
14699
|
+
targetRef = props.targetRef,
|
|
14700
|
+
containerRef = props.containerRef,
|
|
14701
|
+
color = props.color,
|
|
14702
|
+
type = props.type;
|
|
14703
|
+
var _containerRef$current = containerRef.current.getBoundingClientRect(),
|
|
14704
|
+
width = _containerRef$current.width,
|
|
14705
|
+
height = _containerRef$current.height;
|
|
14706
|
+
var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
|
|
14707
|
+
targetWidth = _targetRef$current$ge.width,
|
|
14708
|
+
targetHeight = _targetRef$current$ge.height;
|
|
14709
|
+
var centerOffsetX = targetWidth / 2;
|
|
14710
|
+
var centerOffsetY = targetHeight / 2;
|
|
14711
|
+
var saturation = (offset.x + centerOffsetX) / width;
|
|
14712
|
+
var bright = 1 - (offset.y + centerOffsetY) / height;
|
|
14713
|
+
var hsb = color.toHsb();
|
|
14714
|
+
var alphaOffset = saturation;
|
|
14715
|
+
var hueOffset = (offset.x + centerOffsetX) / width * 360;
|
|
14716
|
+
if (type) {
|
|
14717
|
+
switch (type) {
|
|
14718
|
+
case 'hue':
|
|
14719
|
+
return generateColor(_objectSpread2(_objectSpread2({}, hsb), {}, {
|
|
14720
|
+
h: hueOffset <= 0 ? 0 : hueOffset
|
|
14721
|
+
}));
|
|
14722
|
+
case 'alpha':
|
|
14723
|
+
return generateColor(_objectSpread2(_objectSpread2({}, hsb), {}, {
|
|
14724
|
+
a: alphaOffset <= 0 ? 0 : alphaOffset
|
|
14725
|
+
}));
|
|
14726
|
+
}
|
|
14727
|
+
}
|
|
14728
|
+
return generateColor({
|
|
14729
|
+
h: hsb.h,
|
|
14730
|
+
s: saturation <= 0 ? 0 : saturation,
|
|
14731
|
+
b: bright >= 1 ? 1 : bright,
|
|
14732
|
+
a: hsb.a
|
|
14733
|
+
});
|
|
14734
|
+
};
|
|
14735
|
+
var calcOffset = function calcOffset(color, type) {
|
|
14736
|
+
var hsb = color.toHsb();
|
|
14737
|
+
switch (type) {
|
|
14738
|
+
case 'hue':
|
|
14739
|
+
return {
|
|
14740
|
+
x: hsb.h / 360 * 100,
|
|
14741
|
+
y: 50
|
|
14742
|
+
};
|
|
14743
|
+
case 'alpha':
|
|
14744
|
+
return {
|
|
14745
|
+
x: color.a * 100,
|
|
14746
|
+
y: 50
|
|
14747
|
+
};
|
|
14748
|
+
|
|
14749
|
+
// Picker panel
|
|
14750
|
+
default:
|
|
14751
|
+
return {
|
|
14752
|
+
x: hsb.s * 100,
|
|
14753
|
+
y: (1 - hsb.b) * 100
|
|
14754
|
+
};
|
|
14755
|
+
}
|
|
14756
|
+
};
|
|
14757
|
+
|
|
14758
|
+
var ColorBlock = function ColorBlock(_ref) {
|
|
14759
|
+
var color = _ref.color,
|
|
14760
|
+
prefixCls = _ref.prefixCls,
|
|
14761
|
+
className = _ref.className,
|
|
14762
|
+
style = _ref.style,
|
|
14763
|
+
onClick = _ref.onClick;
|
|
14764
|
+
var colorBlockCls = "".concat(prefixCls, "-color-block");
|
|
14765
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14766
|
+
className: classNames(colorBlockCls, className),
|
|
14767
|
+
style: style,
|
|
14768
|
+
onClick: onClick
|
|
14769
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
14770
|
+
className: "".concat(colorBlockCls, "-inner"),
|
|
14771
|
+
style: {
|
|
14772
|
+
background: color
|
|
14773
|
+
}
|
|
14774
|
+
}));
|
|
14775
|
+
};
|
|
15091
14776
|
|
|
15092
|
-
|
|
14777
|
+
function getPosition(e) {
|
|
14778
|
+
var obj = 'touches' in e ? e.touches[0] : e;
|
|
14779
|
+
var scrollXOffset = document.documentElement.scrollLeft || document.body.scrollLeft || window.pageXOffset;
|
|
14780
|
+
var scrollYOffset = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
|
|
14781
|
+
return {
|
|
14782
|
+
pageX: obj.pageX - scrollXOffset,
|
|
14783
|
+
pageY: obj.pageY - scrollYOffset
|
|
14784
|
+
};
|
|
14785
|
+
}
|
|
14786
|
+
function useColorDrag(props) {
|
|
14787
|
+
var targetRef = props.targetRef,
|
|
14788
|
+
containerRef = props.containerRef,
|
|
14789
|
+
direction = props.direction,
|
|
14790
|
+
onDragChange = props.onDragChange,
|
|
14791
|
+
onDragChangeComplete = props.onDragChangeComplete,
|
|
14792
|
+
calculate = props.calculate,
|
|
14793
|
+
color = props.color,
|
|
14794
|
+
disabledDrag = props.disabledDrag;
|
|
14795
|
+
var _useState = useState$1({
|
|
14796
|
+
x: 0,
|
|
14797
|
+
y: 0
|
|
14798
|
+
}),
|
|
14799
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14800
|
+
offsetValue = _useState2[0],
|
|
14801
|
+
setOffsetValue = _useState2[1];
|
|
14802
|
+
var mouseMoveRef = useRef(null);
|
|
14803
|
+
var mouseUpRef = useRef(null);
|
|
15093
14804
|
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
|
|
14805
|
+
// Always get position from `color`
|
|
14806
|
+
useEffect(function () {
|
|
14807
|
+
setOffsetValue(calculate());
|
|
14808
|
+
}, [color]);
|
|
14809
|
+
useEffect(function () {
|
|
14810
|
+
return function () {
|
|
14811
|
+
document.removeEventListener('mousemove', mouseMoveRef.current);
|
|
14812
|
+
document.removeEventListener('mouseup', mouseUpRef.current);
|
|
14813
|
+
document.removeEventListener('touchmove', mouseMoveRef.current);
|
|
14814
|
+
document.removeEventListener('touchend', mouseUpRef.current);
|
|
14815
|
+
mouseMoveRef.current = null;
|
|
14816
|
+
mouseUpRef.current = null;
|
|
14817
|
+
};
|
|
14818
|
+
}, []);
|
|
14819
|
+
var updateOffset = function updateOffset(e) {
|
|
14820
|
+
var _getPosition = getPosition(e),
|
|
14821
|
+
pageX = _getPosition.pageX,
|
|
14822
|
+
pageY = _getPosition.pageY;
|
|
14823
|
+
var _containerRef$current = containerRef.current.getBoundingClientRect(),
|
|
14824
|
+
rectX = _containerRef$current.x,
|
|
14825
|
+
rectY = _containerRef$current.y,
|
|
14826
|
+
width = _containerRef$current.width,
|
|
14827
|
+
height = _containerRef$current.height;
|
|
14828
|
+
var _targetRef$current$ge = targetRef.current.getBoundingClientRect(),
|
|
14829
|
+
targetWidth = _targetRef$current$ge.width,
|
|
14830
|
+
targetHeight = _targetRef$current$ge.height;
|
|
14831
|
+
var centerOffsetX = targetWidth / 2;
|
|
14832
|
+
var centerOffsetY = targetHeight / 2;
|
|
14833
|
+
var offsetX = Math.max(0, Math.min(pageX - rectX, width)) - centerOffsetX;
|
|
14834
|
+
var offsetY = Math.max(0, Math.min(pageY - rectY, height)) - centerOffsetY;
|
|
14835
|
+
var calcOffset = {
|
|
14836
|
+
x: offsetX,
|
|
14837
|
+
y: direction === 'x' ? offsetValue.y : offsetY
|
|
14838
|
+
};
|
|
15097
14839
|
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15109
|
-
|
|
15110
|
-
|
|
15111
|
-
|
|
15112
|
-
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
|
|
15117
|
-
|
|
15118
|
-
|
|
15119
|
-
|
|
15120
|
-
|
|
15121
|
-
|
|
15122
|
-
|
|
15123
|
-
|
|
15124
|
-
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15132
|
-
|
|
15133
|
-
|
|
15134
|
-
const SPACE = needInserted ? ' ' : '';
|
|
15135
|
-
if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {
|
|
15136
|
-
return (0, _reactNode.cloneElement)(child, {
|
|
15137
|
-
children: child.props.children.split('').join(SPACE)
|
|
15138
|
-
});
|
|
15139
|
-
}
|
|
15140
|
-
if (isString(child)) {
|
|
15141
|
-
return isTwoCNChar(child) ? /*#__PURE__*/_react.default.createElement("span", null, child.split('').join(SPACE)) : /*#__PURE__*/_react.default.createElement("span", null, child);
|
|
15142
|
-
}
|
|
15143
|
-
if ((0, _reactNode.isFragment)(child)) {
|
|
15144
|
-
return /*#__PURE__*/_react.default.createElement("span", null, child);
|
|
15145
|
-
}
|
|
15146
|
-
return child;
|
|
15147
|
-
}
|
|
15148
|
-
function spaceChildren(children, needInserted) {
|
|
15149
|
-
let isPrevChildPure = false;
|
|
15150
|
-
const childList = [];
|
|
15151
|
-
_react.default.Children.forEach(children, child => {
|
|
15152
|
-
const type = typeof child;
|
|
15153
|
-
const isCurrentChildPure = type === 'string' || type === 'number';
|
|
15154
|
-
if (isPrevChildPure && isCurrentChildPure) {
|
|
15155
|
-
const lastIndex = childList.length - 1;
|
|
15156
|
-
const lastChild = childList[lastIndex];
|
|
15157
|
-
childList[lastIndex] = `${lastChild}${child}`;
|
|
15158
|
-
} else {
|
|
15159
|
-
childList.push(child);
|
|
15160
|
-
}
|
|
15161
|
-
isPrevChildPure = isCurrentChildPure;
|
|
15162
|
-
});
|
|
15163
|
-
return _react.default.Children.map(childList, child => splitCNCharsBySpace(child, needInserted));
|
|
15164
|
-
}
|
|
15165
|
-
buttonHelpers._ButtonVariantTypes = ['outlined', 'dashed', 'solid', 'filled', 'text', 'link'];
|
|
15166
|
-
buttonHelpers._ButtonColorTypes = ['default', 'primary', 'danger'].concat((0, _toConsumableArray2.default)(_interface.PresetColors));
|
|
15167
|
-
return buttonHelpers;
|
|
14840
|
+
// Exclusion of boundary cases
|
|
14841
|
+
if (targetWidth === 0 && targetHeight === 0 || targetWidth !== targetHeight) {
|
|
14842
|
+
return false;
|
|
14843
|
+
}
|
|
14844
|
+
onDragChange === null || onDragChange === void 0 || onDragChange(calcOffset);
|
|
14845
|
+
};
|
|
14846
|
+
var onDragMove = function onDragMove(e) {
|
|
14847
|
+
e.preventDefault();
|
|
14848
|
+
updateOffset(e);
|
|
14849
|
+
};
|
|
14850
|
+
var onDragStop = function onDragStop(e) {
|
|
14851
|
+
e.preventDefault();
|
|
14852
|
+
document.removeEventListener('mousemove', mouseMoveRef.current);
|
|
14853
|
+
document.removeEventListener('mouseup', mouseUpRef.current);
|
|
14854
|
+
document.removeEventListener('touchmove', mouseMoveRef.current);
|
|
14855
|
+
document.removeEventListener('touchend', mouseUpRef.current);
|
|
14856
|
+
mouseMoveRef.current = null;
|
|
14857
|
+
mouseUpRef.current = null;
|
|
14858
|
+
onDragChangeComplete === null || onDragChangeComplete === void 0 || onDragChangeComplete();
|
|
14859
|
+
};
|
|
14860
|
+
var onDragStart = function onDragStart(e) {
|
|
14861
|
+
// https://github.com/ant-design/ant-design/issues/43529
|
|
14862
|
+
document.removeEventListener('mousemove', mouseMoveRef.current);
|
|
14863
|
+
document.removeEventListener('mouseup', mouseUpRef.current);
|
|
14864
|
+
if (disabledDrag) {
|
|
14865
|
+
return;
|
|
14866
|
+
}
|
|
14867
|
+
updateOffset(e);
|
|
14868
|
+
document.addEventListener('mousemove', onDragMove);
|
|
14869
|
+
document.addEventListener('mouseup', onDragStop);
|
|
14870
|
+
document.addEventListener('touchmove', onDragMove);
|
|
14871
|
+
document.addEventListener('touchend', onDragStop);
|
|
14872
|
+
mouseMoveRef.current = onDragMove;
|
|
14873
|
+
mouseUpRef.current = onDragStop;
|
|
14874
|
+
};
|
|
14875
|
+
return [offsetValue, onDragStart];
|
|
15168
14876
|
}
|
|
15169
14877
|
|
|
15170
|
-
var
|
|
15171
|
-
|
|
15172
|
-
|
|
14878
|
+
var Handler = function Handler(_ref) {
|
|
14879
|
+
var _ref$size = _ref.size,
|
|
14880
|
+
size = _ref$size === void 0 ? 'default' : _ref$size,
|
|
14881
|
+
color = _ref.color,
|
|
14882
|
+
prefixCls = _ref.prefixCls;
|
|
14883
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14884
|
+
className: classNames("".concat(prefixCls, "-handler"), _defineProperty({}, "".concat(prefixCls, "-handler-sm"), size === 'small')),
|
|
14885
|
+
style: {
|
|
14886
|
+
backgroundColor: color
|
|
14887
|
+
}
|
|
14888
|
+
});
|
|
14889
|
+
};
|
|
15173
14890
|
|
|
15174
|
-
var
|
|
14891
|
+
var Palette = function Palette(_ref) {
|
|
14892
|
+
var children = _ref.children,
|
|
14893
|
+
style = _ref.style,
|
|
14894
|
+
prefixCls = _ref.prefixCls;
|
|
14895
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14896
|
+
className: "".concat(prefixCls, "-palette"),
|
|
14897
|
+
style: _objectSpread2({
|
|
14898
|
+
position: 'relative'
|
|
14899
|
+
}, style)
|
|
14900
|
+
}, children);
|
|
14901
|
+
};
|
|
15175
14902
|
|
|
15176
|
-
var
|
|
14903
|
+
var Transform = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14904
|
+
var children = props.children,
|
|
14905
|
+
x = props.x,
|
|
14906
|
+
y = props.y;
|
|
14907
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14908
|
+
ref: ref,
|
|
14909
|
+
style: {
|
|
14910
|
+
position: 'absolute',
|
|
14911
|
+
left: "".concat(x, "%"),
|
|
14912
|
+
top: "".concat(y, "%"),
|
|
14913
|
+
zIndex: 1,
|
|
14914
|
+
transform: 'translate(-50%, -50%)'
|
|
14915
|
+
}
|
|
14916
|
+
}, children);
|
|
14917
|
+
});
|
|
15177
14918
|
|
|
15178
|
-
var
|
|
14919
|
+
var Picker = function Picker(_ref) {
|
|
14920
|
+
var color = _ref.color,
|
|
14921
|
+
onChange = _ref.onChange,
|
|
14922
|
+
prefixCls = _ref.prefixCls,
|
|
14923
|
+
onChangeComplete = _ref.onChangeComplete,
|
|
14924
|
+
disabled = _ref.disabled;
|
|
14925
|
+
var pickerRef = useRef();
|
|
14926
|
+
var transformRef = useRef();
|
|
14927
|
+
var colorRef = useRef(color);
|
|
14928
|
+
var onDragChange = useEvent$2(function (offsetValue) {
|
|
14929
|
+
var calcColor = calculateColor({
|
|
14930
|
+
offset: offsetValue,
|
|
14931
|
+
targetRef: transformRef,
|
|
14932
|
+
containerRef: pickerRef,
|
|
14933
|
+
color: color
|
|
14934
|
+
});
|
|
14935
|
+
colorRef.current = calcColor;
|
|
14936
|
+
onChange(calcColor);
|
|
14937
|
+
});
|
|
14938
|
+
var _useColorDrag = useColorDrag({
|
|
14939
|
+
color: color,
|
|
14940
|
+
containerRef: pickerRef,
|
|
14941
|
+
targetRef: transformRef,
|
|
14942
|
+
calculate: function calculate() {
|
|
14943
|
+
return calcOffset(color);
|
|
14944
|
+
},
|
|
14945
|
+
onDragChange: onDragChange,
|
|
14946
|
+
onDragChangeComplete: function onDragChangeComplete() {
|
|
14947
|
+
return onChangeComplete === null || onChangeComplete === void 0 ? void 0 : onChangeComplete(colorRef.current);
|
|
14948
|
+
},
|
|
14949
|
+
disabledDrag: disabled
|
|
14950
|
+
}),
|
|
14951
|
+
_useColorDrag2 = _slicedToArray(_useColorDrag, 2),
|
|
14952
|
+
offset = _useColorDrag2[0],
|
|
14953
|
+
dragStartHandle = _useColorDrag2[1];
|
|
14954
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
14955
|
+
ref: pickerRef,
|
|
14956
|
+
className: "".concat(prefixCls, "-select"),
|
|
14957
|
+
onMouseDown: dragStartHandle,
|
|
14958
|
+
onTouchStart: dragStartHandle
|
|
14959
|
+
}, /*#__PURE__*/React__default.createElement(Palette, {
|
|
14960
|
+
prefixCls: prefixCls
|
|
14961
|
+
}, /*#__PURE__*/React__default.createElement(Transform, {
|
|
14962
|
+
x: offset.x,
|
|
14963
|
+
y: offset.y,
|
|
14964
|
+
ref: transformRef
|
|
14965
|
+
}, /*#__PURE__*/React__default.createElement(Handler, {
|
|
14966
|
+
color: color.toRgbString(),
|
|
14967
|
+
prefixCls: prefixCls
|
|
14968
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
14969
|
+
className: "".concat(prefixCls, "-saturation"),
|
|
14970
|
+
style: {
|
|
14971
|
+
backgroundColor: "hsl(".concat(color.toHsb().h, ",100%, 50%)"),
|
|
14972
|
+
backgroundImage: 'linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))'
|
|
14973
|
+
}
|
|
14974
|
+
})));
|
|
14975
|
+
};
|
|
15179
14976
|
|
|
15180
|
-
function
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
|
|
15184
|
-
|
|
15185
|
-
|
|
15186
|
-
|
|
15187
|
-
|
|
15188
|
-
|
|
14977
|
+
var useColorState = function useColorState(defaultValue, value) {
|
|
14978
|
+
var _useMergedState = useMergedState$1(defaultValue, {
|
|
14979
|
+
value: value
|
|
14980
|
+
}),
|
|
14981
|
+
_useMergedState2 = _slicedToArray(_useMergedState, 2),
|
|
14982
|
+
mergedValue = _useMergedState2[0],
|
|
14983
|
+
setValue = _useMergedState2[1];
|
|
14984
|
+
var color = useMemo$1(function () {
|
|
14985
|
+
return generateColor(mergedValue);
|
|
14986
|
+
}, [mergedValue]);
|
|
14987
|
+
return [color, setValue];
|
|
14988
|
+
};
|
|
15189
14989
|
|
|
15190
|
-
var
|
|
14990
|
+
var Gradient = function Gradient(_ref) {
|
|
14991
|
+
var colors = _ref.colors,
|
|
14992
|
+
children = _ref.children,
|
|
14993
|
+
_ref$direction = _ref.direction,
|
|
14994
|
+
direction = _ref$direction === void 0 ? 'to right' : _ref$direction,
|
|
14995
|
+
type = _ref.type,
|
|
14996
|
+
prefixCls = _ref.prefixCls;
|
|
14997
|
+
var gradientColors = useMemo$1(function () {
|
|
14998
|
+
return colors.map(function (color, idx) {
|
|
14999
|
+
var result = generateColor(color);
|
|
15000
|
+
if (type === 'alpha' && idx === colors.length - 1) {
|
|
15001
|
+
result = new Color(result.setA(1));
|
|
15002
|
+
}
|
|
15003
|
+
return result.toRgbString();
|
|
15004
|
+
}).join(',');
|
|
15005
|
+
}, [colors, type]);
|
|
15006
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15007
|
+
className: "".concat(prefixCls, "-gradient"),
|
|
15008
|
+
style: {
|
|
15009
|
+
position: 'absolute',
|
|
15010
|
+
inset: 0,
|
|
15011
|
+
background: "linear-gradient(".concat(direction, ", ").concat(gradientColors, ")")
|
|
15012
|
+
}
|
|
15013
|
+
}, children);
|
|
15014
|
+
};
|
|
15191
15015
|
|
|
15192
|
-
function
|
|
15193
|
-
|
|
15194
|
-
|
|
15016
|
+
var Slider = function Slider(props) {
|
|
15017
|
+
var prefixCls = props.prefixCls,
|
|
15018
|
+
colors = props.colors,
|
|
15019
|
+
disabled = props.disabled,
|
|
15020
|
+
onChange = props.onChange,
|
|
15021
|
+
onChangeComplete = props.onChangeComplete,
|
|
15022
|
+
color = props.color,
|
|
15023
|
+
type = props.type;
|
|
15024
|
+
var sliderRef = useRef();
|
|
15025
|
+
var transformRef = useRef();
|
|
15026
|
+
var colorRef = useRef(color);
|
|
15027
|
+
var getValue = function getValue(c) {
|
|
15028
|
+
return type === 'hue' ? c.getHue() : c.a * 100;
|
|
15029
|
+
};
|
|
15030
|
+
var onDragChange = useEvent$2(function (offsetValue) {
|
|
15031
|
+
var calcColor = calculateColor({
|
|
15032
|
+
offset: offsetValue,
|
|
15033
|
+
targetRef: transformRef,
|
|
15034
|
+
containerRef: sliderRef,
|
|
15035
|
+
color: color,
|
|
15036
|
+
type: type
|
|
15037
|
+
});
|
|
15038
|
+
colorRef.current = calcColor;
|
|
15039
|
+
onChange(getValue(calcColor));
|
|
15040
|
+
});
|
|
15041
|
+
var _useColorDrag = useColorDrag({
|
|
15042
|
+
color: color,
|
|
15043
|
+
targetRef: transformRef,
|
|
15044
|
+
containerRef: sliderRef,
|
|
15045
|
+
calculate: function calculate() {
|
|
15046
|
+
return calcOffset(color, type);
|
|
15047
|
+
},
|
|
15048
|
+
onDragChange: onDragChange,
|
|
15049
|
+
onDragChangeComplete: function onDragChangeComplete() {
|
|
15050
|
+
onChangeComplete(getValue(colorRef.current));
|
|
15051
|
+
},
|
|
15052
|
+
direction: 'x',
|
|
15053
|
+
disabledDrag: disabled
|
|
15054
|
+
}),
|
|
15055
|
+
_useColorDrag2 = _slicedToArray(_useColorDrag, 2),
|
|
15056
|
+
offset = _useColorDrag2[0],
|
|
15057
|
+
dragStartHandle = _useColorDrag2[1];
|
|
15058
|
+
var handleColor = React__default.useMemo(function () {
|
|
15059
|
+
if (type === 'hue') {
|
|
15060
|
+
var hsb = color.toHsb();
|
|
15061
|
+
hsb.s = 1;
|
|
15062
|
+
hsb.b = 1;
|
|
15063
|
+
hsb.a = 1;
|
|
15064
|
+
var lightColor = new Color(hsb);
|
|
15065
|
+
return lightColor;
|
|
15066
|
+
}
|
|
15067
|
+
return color;
|
|
15068
|
+
}, [color, type]);
|
|
15195
15069
|
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15199
|
-
|
|
15200
|
-
|
|
15201
|
-
|
|
15202
|
-
var _extends2 = _interopRequireDefault(/*@__PURE__*/ require_extends());
|
|
15203
|
-
var React = _interopRequireWildcard(React__default);
|
|
15204
|
-
var _LoadingOutlined = _interopRequireDefault(/*@__PURE__*/ requireLoadingOutlined$2());
|
|
15205
|
-
var _AntdIcon = _interopRequireDefault(/*@__PURE__*/ requireAntdIcon());
|
|
15206
|
-
// GENERATE BY ./scripts/generate.ts
|
|
15207
|
-
// DON NOT EDIT IT MANUALLY
|
|
15070
|
+
// ========================= Gradient =========================
|
|
15071
|
+
var gradientList = React__default.useMemo(function () {
|
|
15072
|
+
return colors.map(function (info) {
|
|
15073
|
+
return "".concat(info.color, " ").concat(info.percent, "%");
|
|
15074
|
+
});
|
|
15075
|
+
}, [colors]);
|
|
15208
15076
|
|
|
15209
|
-
|
|
15210
|
-
|
|
15211
|
-
|
|
15212
|
-
|
|
15213
|
-
|
|
15214
|
-
|
|
15077
|
+
// ========================== Render ==========================
|
|
15078
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15079
|
+
ref: sliderRef,
|
|
15080
|
+
className: classNames("".concat(prefixCls, "-slider"), "".concat(prefixCls, "-slider-").concat(type)),
|
|
15081
|
+
onMouseDown: dragStartHandle,
|
|
15082
|
+
onTouchStart: dragStartHandle
|
|
15083
|
+
}, /*#__PURE__*/React__default.createElement(Palette, {
|
|
15084
|
+
prefixCls: prefixCls
|
|
15085
|
+
}, /*#__PURE__*/React__default.createElement(Transform, {
|
|
15086
|
+
x: offset.x,
|
|
15087
|
+
y: offset.y,
|
|
15088
|
+
ref: transformRef
|
|
15089
|
+
}, /*#__PURE__*/React__default.createElement(Handler, {
|
|
15090
|
+
size: "small",
|
|
15091
|
+
color: handleColor.toHexString(),
|
|
15092
|
+
prefixCls: prefixCls
|
|
15093
|
+
})), /*#__PURE__*/React__default.createElement(Gradient, {
|
|
15094
|
+
colors: gradientList,
|
|
15095
|
+
type: type,
|
|
15096
|
+
prefixCls: prefixCls
|
|
15097
|
+
})));
|
|
15098
|
+
};
|
|
15215
15099
|
|
|
15216
|
-
|
|
15217
|
-
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
|
|
15221
|
-
|
|
15222
|
-
return LoadingOutlined$1;
|
|
15100
|
+
function useComponent(components) {
|
|
15101
|
+
return React.useMemo(function () {
|
|
15102
|
+
var _ref = components || {},
|
|
15103
|
+
slider = _ref.slider;
|
|
15104
|
+
return [slider || Slider];
|
|
15105
|
+
}, [components]);
|
|
15223
15106
|
}
|
|
15224
15107
|
|
|
15225
|
-
var
|
|
15226
|
-
|
|
15227
|
-
|
|
15228
|
-
|
|
15229
|
-
|
|
15230
|
-
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
|
|
15234
|
-
|
|
15235
|
-
|
|
15236
|
-
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15108
|
+
var HUE_COLORS = [{
|
|
15109
|
+
color: 'rgb(255, 0, 0)',
|
|
15110
|
+
percent: 0
|
|
15111
|
+
}, {
|
|
15112
|
+
color: 'rgb(255, 255, 0)',
|
|
15113
|
+
percent: 17
|
|
15114
|
+
}, {
|
|
15115
|
+
color: 'rgb(0, 255, 0)',
|
|
15116
|
+
percent: 33
|
|
15117
|
+
}, {
|
|
15118
|
+
color: 'rgb(0, 255, 255)',
|
|
15119
|
+
percent: 50
|
|
15120
|
+
}, {
|
|
15121
|
+
color: 'rgb(0, 0, 255)',
|
|
15122
|
+
percent: 67
|
|
15123
|
+
}, {
|
|
15124
|
+
color: 'rgb(255, 0, 255)',
|
|
15125
|
+
percent: 83
|
|
15126
|
+
}, {
|
|
15127
|
+
color: 'rgb(255, 0, 0)',
|
|
15128
|
+
percent: 100
|
|
15129
|
+
}];
|
|
15130
|
+
var ColorPicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15131
|
+
var value = props.value,
|
|
15132
|
+
defaultValue = props.defaultValue,
|
|
15133
|
+
_props$prefixCls = props.prefixCls,
|
|
15134
|
+
prefixCls = _props$prefixCls === void 0 ? ColorPickerPrefixCls : _props$prefixCls,
|
|
15135
|
+
onChange = props.onChange,
|
|
15136
|
+
onChangeComplete = props.onChangeComplete,
|
|
15137
|
+
className = props.className,
|
|
15138
|
+
style = props.style,
|
|
15139
|
+
panelRender = props.panelRender,
|
|
15140
|
+
_props$disabledAlpha = props.disabledAlpha,
|
|
15141
|
+
disabledAlpha = _props$disabledAlpha === void 0 ? false : _props$disabledAlpha,
|
|
15142
|
+
_props$disabled = props.disabled,
|
|
15143
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
15144
|
+
components = props.components;
|
|
15246
15145
|
|
|
15247
|
-
|
|
15146
|
+
// ========================== Components ==========================
|
|
15147
|
+
var _useComponent = useComponent(components),
|
|
15148
|
+
_useComponent2 = _slicedToArray(_useComponent, 1),
|
|
15149
|
+
Slider = _useComponent2[0];
|
|
15248
15150
|
|
|
15249
|
-
|
|
15151
|
+
// ============================ Color =============================
|
|
15152
|
+
var _useColorState = useColorState(defaultValue || defaultColor, value),
|
|
15153
|
+
_useColorState2 = _slicedToArray(_useColorState, 2),
|
|
15154
|
+
colorValue = _useColorState2[0],
|
|
15155
|
+
setColorValue = _useColorState2[1];
|
|
15156
|
+
var alphaColor = useMemo$1(function () {
|
|
15157
|
+
return colorValue.setA(1).toRgbString();
|
|
15158
|
+
}, [colorValue]);
|
|
15250
15159
|
|
|
15251
|
-
|
|
15252
|
-
|
|
15253
|
-
|
|
15160
|
+
// ============================ Events ============================
|
|
15161
|
+
var handleChange = function handleChange(data, type) {
|
|
15162
|
+
if (!value) {
|
|
15163
|
+
setColorValue(data);
|
|
15164
|
+
}
|
|
15165
|
+
onChange === null || onChange === void 0 || onChange(data, type);
|
|
15166
|
+
};
|
|
15254
15167
|
|
|
15255
|
-
|
|
15256
|
-
|
|
15257
|
-
|
|
15258
|
-
|
|
15259
|
-
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
15263
|
-
const IconWrapper$1 = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
15264
|
-
const {
|
|
15265
|
-
className,
|
|
15266
|
-
style,
|
|
15267
|
-
children,
|
|
15268
|
-
prefixCls
|
|
15269
|
-
} = props;
|
|
15270
|
-
const iconWrapperCls = (0, _classnames.default)(`${prefixCls}-icon`, className);
|
|
15271
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
15272
|
-
ref: ref,
|
|
15273
|
-
className: iconWrapperCls,
|
|
15274
|
-
style: style
|
|
15275
|
-
}, children);
|
|
15276
|
-
});
|
|
15277
|
-
IconWrapper.default = IconWrapper$1;
|
|
15278
|
-
return IconWrapper;
|
|
15279
|
-
}
|
|
15168
|
+
// Convert
|
|
15169
|
+
var getHueColor = function getHueColor(hue) {
|
|
15170
|
+
return new Color(colorValue.setHue(hue));
|
|
15171
|
+
};
|
|
15172
|
+
var getAlphaColor = function getAlphaColor(alpha) {
|
|
15173
|
+
return new Color(colorValue.setA(alpha / 100));
|
|
15174
|
+
};
|
|
15280
15175
|
|
|
15281
|
-
|
|
15176
|
+
// Slider change
|
|
15177
|
+
var onHueChange = function onHueChange(hue) {
|
|
15178
|
+
handleChange(getHueColor(hue), {
|
|
15179
|
+
type: 'hue',
|
|
15180
|
+
value: hue
|
|
15181
|
+
});
|
|
15182
|
+
};
|
|
15183
|
+
var onAlphaChange = function onAlphaChange(alpha) {
|
|
15184
|
+
handleChange(getAlphaColor(alpha), {
|
|
15185
|
+
type: 'alpha',
|
|
15186
|
+
value: alpha
|
|
15187
|
+
});
|
|
15188
|
+
};
|
|
15282
15189
|
|
|
15283
|
-
|
|
15284
|
-
|
|
15285
|
-
|
|
15190
|
+
// Complete
|
|
15191
|
+
var onHueChangeComplete = function onHueChangeComplete(hue) {
|
|
15192
|
+
if (onChangeComplete) {
|
|
15193
|
+
onChangeComplete(getHueColor(hue));
|
|
15194
|
+
}
|
|
15195
|
+
};
|
|
15196
|
+
var onAlphaChangeComplete = function onAlphaChangeComplete(alpha) {
|
|
15197
|
+
if (onChangeComplete) {
|
|
15198
|
+
onChangeComplete(getAlphaColor(alpha));
|
|
15199
|
+
}
|
|
15200
|
+
};
|
|
15286
15201
|
|
|
15287
|
-
|
|
15288
|
-
|
|
15289
|
-
|
|
15290
|
-
|
|
15291
|
-
|
|
15292
|
-
|
|
15293
|
-
|
|
15294
|
-
|
|
15295
|
-
|
|
15296
|
-
|
|
15297
|
-
|
|
15298
|
-
|
|
15299
|
-
|
|
15300
|
-
|
|
15301
|
-
|
|
15302
|
-
|
|
15303
|
-
|
|
15304
|
-
|
|
15305
|
-
|
|
15306
|
-
|
|
15307
|
-
|
|
15308
|
-
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
|
|
15316
|
-
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
|
|
15320
|
-
|
|
15321
|
-
|
|
15322
|
-
|
|
15323
|
-
|
|
15324
|
-
|
|
15325
|
-
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
15336
|
-
return /*#__PURE__*/_react.default.createElement(InnerLoadingIcon, {
|
|
15337
|
-
prefixCls: prefixCls,
|
|
15338
|
-
className: className,
|
|
15339
|
-
style: style
|
|
15340
|
-
});
|
|
15341
|
-
}
|
|
15342
|
-
return /*#__PURE__*/_react.default.createElement(_rcMotion.default, {
|
|
15343
|
-
visible: visible,
|
|
15344
|
-
// Used for minus flex gap style only
|
|
15345
|
-
motionName: `${prefixCls}-loading-icon-motion`,
|
|
15346
|
-
motionAppear: !mount,
|
|
15347
|
-
motionEnter: !mount,
|
|
15348
|
-
motionLeave: !mount,
|
|
15349
|
-
removeOnLeave: true,
|
|
15350
|
-
onAppearStart: getCollapsedWidth,
|
|
15351
|
-
onAppearActive: getRealWidth,
|
|
15352
|
-
onEnterStart: getCollapsedWidth,
|
|
15353
|
-
onEnterActive: getRealWidth,
|
|
15354
|
-
onLeaveStart: getRealWidth,
|
|
15355
|
-
onLeaveActive: getCollapsedWidth
|
|
15356
|
-
}, ({
|
|
15357
|
-
className: motionCls,
|
|
15358
|
-
style: motionStyle
|
|
15359
|
-
}, ref) => {
|
|
15360
|
-
const mergedStyle = Object.assign(Object.assign({}, style), motionStyle);
|
|
15361
|
-
return /*#__PURE__*/_react.default.createElement(InnerLoadingIcon, {
|
|
15362
|
-
prefixCls: prefixCls,
|
|
15363
|
-
className: (0, _classnames.default)(className, motionCls),
|
|
15364
|
-
style: mergedStyle,
|
|
15365
|
-
ref: ref
|
|
15366
|
-
});
|
|
15367
|
-
});
|
|
15368
|
-
};
|
|
15369
|
-
DefaultLoadingIcon.default = DefaultLoadingIcon$1;
|
|
15370
|
-
return DefaultLoadingIcon;
|
|
15202
|
+
// ============================ Render ============================
|
|
15203
|
+
var mergeCls = classNames("".concat(prefixCls, "-panel"), className, _defineProperty({}, "".concat(prefixCls, "-panel-disabled"), disabled));
|
|
15204
|
+
var sharedSliderProps = {
|
|
15205
|
+
prefixCls: prefixCls,
|
|
15206
|
+
disabled: disabled,
|
|
15207
|
+
color: colorValue
|
|
15208
|
+
};
|
|
15209
|
+
var defaultPanel = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Picker, _extends$1({
|
|
15210
|
+
onChange: handleChange
|
|
15211
|
+
}, sharedSliderProps, {
|
|
15212
|
+
onChangeComplete: onChangeComplete
|
|
15213
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
15214
|
+
className: "".concat(prefixCls, "-slider-container")
|
|
15215
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
15216
|
+
className: classNames("".concat(prefixCls, "-slider-group"), _defineProperty({}, "".concat(prefixCls, "-slider-group-disabled-alpha"), disabledAlpha))
|
|
15217
|
+
}, /*#__PURE__*/React__default.createElement(Slider, _extends$1({}, sharedSliderProps, {
|
|
15218
|
+
type: "hue",
|
|
15219
|
+
colors: HUE_COLORS,
|
|
15220
|
+
min: 0,
|
|
15221
|
+
max: 359,
|
|
15222
|
+
value: colorValue.getHue(),
|
|
15223
|
+
onChange: onHueChange,
|
|
15224
|
+
onChangeComplete: onHueChangeComplete
|
|
15225
|
+
})), !disabledAlpha && /*#__PURE__*/React__default.createElement(Slider, _extends$1({}, sharedSliderProps, {
|
|
15226
|
+
type: "alpha",
|
|
15227
|
+
colors: [{
|
|
15228
|
+
percent: 0,
|
|
15229
|
+
color: 'rgba(255, 0, 4, 0)'
|
|
15230
|
+
}, {
|
|
15231
|
+
percent: 100,
|
|
15232
|
+
color: alphaColor
|
|
15233
|
+
}],
|
|
15234
|
+
min: 0,
|
|
15235
|
+
max: 100,
|
|
15236
|
+
value: colorValue.a * 100,
|
|
15237
|
+
onChange: onAlphaChange,
|
|
15238
|
+
onChangeComplete: onAlphaChangeComplete
|
|
15239
|
+
}))), /*#__PURE__*/React__default.createElement(ColorBlock, {
|
|
15240
|
+
color: colorValue.toRgbString(),
|
|
15241
|
+
prefixCls: prefixCls
|
|
15242
|
+
})));
|
|
15243
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
15244
|
+
className: mergeCls,
|
|
15245
|
+
style: style,
|
|
15246
|
+
ref: ref
|
|
15247
|
+
}, typeof panelRender === 'function' ? panelRender(defaultPanel) : defaultPanel);
|
|
15248
|
+
});
|
|
15249
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
15250
|
+
ColorPicker.displayName = 'ColorPicker';
|
|
15371
15251
|
}
|
|
15372
15252
|
|
|
15373
|
-
|
|
15253
|
+
const es$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
15254
|
+
__proto__: null,
|
|
15255
|
+
Color,
|
|
15256
|
+
ColorBlock,
|
|
15257
|
+
default: ColorPicker
|
|
15258
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
15374
15259
|
|
|
15375
|
-
|
|
15260
|
+
const require$$3 = /*@__PURE__*/getAugmentedNamespace(es$1);
|
|
15376
15261
|
|
|
15377
|
-
var
|
|
15262
|
+
var hasRequiredColor;
|
|
15378
15263
|
|
|
15379
|
-
function
|
|
15380
|
-
if (
|
|
15381
|
-
|
|
15264
|
+
function requireColor () {
|
|
15265
|
+
if (hasRequiredColor) return color;
|
|
15266
|
+
hasRequiredColor = 1;
|
|
15382
15267
|
|
|
15383
|
-
|
|
15268
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
15269
|
+
Object.defineProperty(color, "__esModule", {
|
|
15384
15270
|
value: true
|
|
15385
15271
|
});
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15272
|
+
color.toHexFormat = color.getHex = color.AggregationColor = void 0;
|
|
15273
|
+
var _classCallCheck2 = _interopRequireDefault(/*@__PURE__*/ requireClassCallCheck());
|
|
15274
|
+
var _createClass2 = _interopRequireDefault(/*@__PURE__*/ requireCreateClass());
|
|
15275
|
+
var _colorPicker = require$$3;
|
|
15276
|
+
const toHexFormat = (value, alpha) => (value === null || value === void 0 ? void 0 : value.replace(/[^\w/]/g, '').slice(0, alpha ? 8 : 6)) || '';
|
|
15277
|
+
color.toHexFormat = toHexFormat;
|
|
15278
|
+
const getHex = (value, alpha) => value ? toHexFormat(value, alpha) : '';
|
|
15279
|
+
color.getHex = getHex;
|
|
15280
|
+
color.AggregationColor = /*#__PURE__*/function () {
|
|
15281
|
+
function AggregationColor(color) {
|
|
15282
|
+
(0, _classCallCheck2.default)(this, AggregationColor);
|
|
15283
|
+
var _a;
|
|
15284
|
+
this.cleared = false;
|
|
15285
|
+
// Clone from another AggregationColor
|
|
15286
|
+
if (color instanceof AggregationColor) {
|
|
15287
|
+
this.metaColor = color.metaColor.clone();
|
|
15288
|
+
this.colors = (_a = color.colors) === null || _a === void 0 ? void 0 : _a.map(info => ({
|
|
15289
|
+
color: new AggregationColor(info.color),
|
|
15290
|
+
percent: info.percent
|
|
15291
|
+
}));
|
|
15292
|
+
this.cleared = color.cleared;
|
|
15293
|
+
return;
|
|
15294
|
+
}
|
|
15295
|
+
const isArray = Array.isArray(color);
|
|
15296
|
+
if (isArray && color.length) {
|
|
15297
|
+
this.colors = color.map(({
|
|
15298
|
+
color: c,
|
|
15299
|
+
percent
|
|
15300
|
+
}) => ({
|
|
15301
|
+
color: new AggregationColor(c),
|
|
15302
|
+
percent
|
|
15303
|
+
}));
|
|
15304
|
+
this.metaColor = new _colorPicker.Color(this.colors[0].color.metaColor);
|
|
15305
|
+
} else {
|
|
15306
|
+
this.metaColor = new _colorPicker.Color(isArray ? '' : color);
|
|
15307
|
+
}
|
|
15308
|
+
if (!color || isArray && !this.colors) {
|
|
15309
|
+
this.metaColor = this.metaColor.setA(0);
|
|
15310
|
+
this.cleared = true;
|
|
15403
15311
|
}
|
|
15404
15312
|
}
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15408
|
-
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15438
|
-
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15313
|
+
return (0, _createClass2.default)(AggregationColor, [{
|
|
15314
|
+
key: "toHsb",
|
|
15315
|
+
value: function toHsb() {
|
|
15316
|
+
return this.metaColor.toHsb();
|
|
15317
|
+
}
|
|
15318
|
+
}, {
|
|
15319
|
+
key: "toHsbString",
|
|
15320
|
+
value: function toHsbString() {
|
|
15321
|
+
return this.metaColor.toHsbString();
|
|
15322
|
+
}
|
|
15323
|
+
}, {
|
|
15324
|
+
key: "toHex",
|
|
15325
|
+
value: function toHex() {
|
|
15326
|
+
return getHex(this.toHexString(), this.metaColor.a < 1);
|
|
15327
|
+
}
|
|
15328
|
+
}, {
|
|
15329
|
+
key: "toHexString",
|
|
15330
|
+
value: function toHexString() {
|
|
15331
|
+
return this.metaColor.toHexString();
|
|
15332
|
+
}
|
|
15333
|
+
}, {
|
|
15334
|
+
key: "toRgb",
|
|
15335
|
+
value: function toRgb() {
|
|
15336
|
+
return this.metaColor.toRgb();
|
|
15337
|
+
}
|
|
15338
|
+
}, {
|
|
15339
|
+
key: "toRgbString",
|
|
15340
|
+
value: function toRgbString() {
|
|
15341
|
+
return this.metaColor.toRgbString();
|
|
15342
|
+
}
|
|
15343
|
+
}, {
|
|
15344
|
+
key: "isGradient",
|
|
15345
|
+
value: function isGradient() {
|
|
15346
|
+
return !!this.colors && !this.cleared;
|
|
15347
|
+
}
|
|
15348
|
+
}, {
|
|
15349
|
+
key: "getColors",
|
|
15350
|
+
value: function getColors() {
|
|
15351
|
+
return this.colors || [{
|
|
15352
|
+
color: this,
|
|
15353
|
+
percent: 0
|
|
15354
|
+
}];
|
|
15355
|
+
}
|
|
15356
|
+
}, {
|
|
15357
|
+
key: "toCssString",
|
|
15358
|
+
value: function toCssString() {
|
|
15359
|
+
const {
|
|
15360
|
+
colors
|
|
15361
|
+
} = this;
|
|
15362
|
+
// CSS line-gradient
|
|
15363
|
+
if (colors) {
|
|
15364
|
+
const colorsStr = colors.map(c => `${c.color.toRgbString()} ${c.percent}%`).join(', ');
|
|
15365
|
+
return `linear-gradient(90deg, ${colorsStr})`;
|
|
15446
15366
|
}
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
|
|
15450
|
-
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15367
|
+
return this.metaColor.toRgbString();
|
|
15368
|
+
}
|
|
15369
|
+
}, {
|
|
15370
|
+
key: "equals",
|
|
15371
|
+
value: function equals(color) {
|
|
15372
|
+
if (!color || this.isGradient() !== color.isGradient()) {
|
|
15373
|
+
return false;
|
|
15374
|
+
}
|
|
15375
|
+
if (!this.isGradient()) {
|
|
15376
|
+
return this.toHexString() === color.toHexString();
|
|
15377
|
+
}
|
|
15378
|
+
return this.colors.length === color.colors.length && this.colors.every((c, i) => {
|
|
15379
|
+
const target = color.colors[i];
|
|
15380
|
+
return c.percent === target.percent && c.color.equals(target.color);
|
|
15381
|
+
});
|
|
15382
|
+
}
|
|
15383
|
+
}]);
|
|
15384
|
+
}();
|
|
15385
|
+
return color;
|
|
15454
15386
|
}
|
|
15455
15387
|
|
|
15456
|
-
var token = {};
|
|
15457
|
-
|
|
15458
15388
|
var ColorPresets = {};
|
|
15459
15389
|
|
|
15460
15390
|
var collapse = {};
|
|
@@ -16042,9 +15972,6 @@ function requireStyle$2 () {
|
|
|
16042
15972
|
[`${componentCls}-header-text`]: {
|
|
16043
15973
|
flex: 'none',
|
|
16044
15974
|
cursor: 'pointer'
|
|
16045
|
-
},
|
|
16046
|
-
[`${componentCls}-expand-icon`]: {
|
|
16047
|
-
cursor: 'pointer'
|
|
16048
15975
|
}
|
|
16049
15976
|
},
|
|
16050
15977
|
[`${componentCls}-collapsible-icon`]: {
|
|
@@ -16295,37 +16222,37 @@ function requireCollapse$1 () {
|
|
|
16295
16222
|
return (0, _reactNode.cloneElement)(icon, () => {
|
|
16296
16223
|
var _a;
|
|
16297
16224
|
return {
|
|
16298
|
-
className: (0, _classnames.default)((_a = icon.props) === null || _a === void 0 ? void 0 : _a.className, `${prefixCls}-arrow`)
|
|
16225
|
+
className: (0, _classnames.default)((_a = icon === null || icon === void 0 ? void 0 : icon.props) === null || _a === void 0 ? void 0 : _a.className, `${prefixCls}-arrow`)
|
|
16299
16226
|
};
|
|
16300
16227
|
});
|
|
16301
|
-
}, [mergedExpandIcon, prefixCls
|
|
16228
|
+
}, [mergedExpandIcon, prefixCls]);
|
|
16302
16229
|
const collapseClassName = (0, _classnames.default)(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {
|
|
16303
16230
|
[`${prefixCls}-borderless`]: !bordered,
|
|
16304
16231
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
16305
16232
|
[`${prefixCls}-ghost`]: !!ghost,
|
|
16306
16233
|
[`${prefixCls}-${mergedSize}`]: mergedSize !== 'middle'
|
|
16307
16234
|
}, contextClassName, className, rootClassName, hashId, cssVarCls);
|
|
16308
|
-
const openMotion =
|
|
16235
|
+
const openMotion = Object.assign(Object.assign({}, (0, _motion.default)(rootPrefixCls)), {
|
|
16309
16236
|
motionAppear: false,
|
|
16310
16237
|
leavedClassName: `${prefixCls}-content-hidden`
|
|
16311
|
-
})
|
|
16238
|
+
});
|
|
16312
16239
|
const items = React.useMemo(() => {
|
|
16313
|
-
if (
|
|
16314
|
-
return
|
|
16240
|
+
if (children) {
|
|
16241
|
+
return (0, _toArray.default)(children).map((child, index) => {
|
|
16242
|
+
var _a, _b;
|
|
16243
|
+
const childProps = child.props;
|
|
16244
|
+
if (childProps === null || childProps === void 0 ? void 0 : childProps.disabled) {
|
|
16245
|
+
const key = (_a = child.key) !== null && _a !== void 0 ? _a : String(index);
|
|
16246
|
+
const mergedChildProps = Object.assign(Object.assign({}, (0, _omit.default)(child.props, ['disabled'])), {
|
|
16247
|
+
key,
|
|
16248
|
+
collapsible: (_b = childProps.collapsible) !== null && _b !== void 0 ? _b : 'disabled'
|
|
16249
|
+
});
|
|
16250
|
+
return (0, _reactNode.cloneElement)(child, mergedChildProps);
|
|
16251
|
+
}
|
|
16252
|
+
return child;
|
|
16253
|
+
});
|
|
16315
16254
|
}
|
|
16316
|
-
return
|
|
16317
|
-
var _a, _b;
|
|
16318
|
-
const childProps = child.props;
|
|
16319
|
-
if (childProps === null || childProps === void 0 ? void 0 : childProps.disabled) {
|
|
16320
|
-
const key = (_a = child.key) !== null && _a !== void 0 ? _a : String(index);
|
|
16321
|
-
const mergedChildProps = Object.assign(Object.assign({}, (0, _omit.default)(child.props, ['disabled'])), {
|
|
16322
|
-
key,
|
|
16323
|
-
collapsible: (_b = childProps.collapsible) !== null && _b !== void 0 ? _b : 'disabled'
|
|
16324
|
-
});
|
|
16325
|
-
return (0, _reactNode.cloneElement)(child, mergedChildProps);
|
|
16326
|
-
}
|
|
16327
|
-
return child;
|
|
16328
|
-
});
|
|
16255
|
+
return null;
|
|
16329
16256
|
}, [children]);
|
|
16330
16257
|
return wrapCSSVar(
|
|
16331
16258
|
/*#__PURE__*/
|
|
@@ -16367,6 +16294,82 @@ function requireCollapse () {
|
|
|
16367
16294
|
return collapse;
|
|
16368
16295
|
}
|
|
16369
16296
|
|
|
16297
|
+
var util = {};
|
|
16298
|
+
|
|
16299
|
+
var hasRequiredUtil;
|
|
16300
|
+
|
|
16301
|
+
function requireUtil () {
|
|
16302
|
+
if (hasRequiredUtil) return util;
|
|
16303
|
+
hasRequiredUtil = 1;
|
|
16304
|
+
|
|
16305
|
+
var _interopRequireDefault = /*@__PURE__*/ requireInteropRequireDefault().default;
|
|
16306
|
+
Object.defineProperty(util, "__esModule", {
|
|
16307
|
+
value: true
|
|
16308
|
+
});
|
|
16309
|
+
util.getRoundNumber = util.getGradientPercentColor = util.getColorAlpha = util.generateColor = util.genAlphaColor = void 0;
|
|
16310
|
+
var _toConsumableArray2 = _interopRequireDefault(/*@__PURE__*/ requireToConsumableArray());
|
|
16311
|
+
var _colorPicker = require$$3;
|
|
16312
|
+
var _color = /*@__PURE__*/ requireColor();
|
|
16313
|
+
const generateColor = color => {
|
|
16314
|
+
if (color instanceof _color.AggregationColor) {
|
|
16315
|
+
return color;
|
|
16316
|
+
}
|
|
16317
|
+
return new _color.AggregationColor(color);
|
|
16318
|
+
};
|
|
16319
|
+
util.generateColor = generateColor;
|
|
16320
|
+
const getRoundNumber = value => Math.round(Number(value || 0));
|
|
16321
|
+
util.getRoundNumber = getRoundNumber;
|
|
16322
|
+
const getColorAlpha = color => getRoundNumber(color.toHsb().a * 100);
|
|
16323
|
+
/** Return the color whose `alpha` is 1 */
|
|
16324
|
+
util.getColorAlpha = getColorAlpha;
|
|
16325
|
+
const genAlphaColor = (color, alpha) => {
|
|
16326
|
+
const rgba = color.toRgb();
|
|
16327
|
+
// Color from hsb input may get `rgb` is (0/0/0) when `hsb.b` is 0
|
|
16328
|
+
// So if rgb is empty, we should get from hsb
|
|
16329
|
+
if (!rgba.r && !rgba.g && !rgba.b) {
|
|
16330
|
+
const hsba = color.toHsb();
|
|
16331
|
+
hsba.a = alpha || 1;
|
|
16332
|
+
return generateColor(hsba);
|
|
16333
|
+
}
|
|
16334
|
+
rgba.a = alpha || 1;
|
|
16335
|
+
return generateColor(rgba);
|
|
16336
|
+
};
|
|
16337
|
+
/**
|
|
16338
|
+
* Get percent position color. e.g. [10%-#fff, 20%-#000], 15% => #888
|
|
16339
|
+
*/
|
|
16340
|
+
util.genAlphaColor = genAlphaColor;
|
|
16341
|
+
const getGradientPercentColor = (colors, percent) => {
|
|
16342
|
+
const filledColors = [{
|
|
16343
|
+
percent: 0,
|
|
16344
|
+
color: colors[0].color
|
|
16345
|
+
}].concat((0, _toConsumableArray2.default)(colors), [{
|
|
16346
|
+
percent: 100,
|
|
16347
|
+
color: colors[colors.length - 1].color
|
|
16348
|
+
}]);
|
|
16349
|
+
for (let i = 0; i < filledColors.length - 1; i += 1) {
|
|
16350
|
+
const startPtg = filledColors[i].percent;
|
|
16351
|
+
const endPtg = filledColors[i + 1].percent;
|
|
16352
|
+
const startColor = filledColors[i].color;
|
|
16353
|
+
const endColor = filledColors[i + 1].color;
|
|
16354
|
+
if (startPtg <= percent && percent <= endPtg) {
|
|
16355
|
+
const dist = endPtg - startPtg;
|
|
16356
|
+
if (dist === 0) {
|
|
16357
|
+
return startColor;
|
|
16358
|
+
}
|
|
16359
|
+
const ratio = (percent - startPtg) / dist * 100;
|
|
16360
|
+
const startRcColor = new _colorPicker.Color(startColor);
|
|
16361
|
+
const endRcColor = new _colorPicker.Color(endColor);
|
|
16362
|
+
return startRcColor.mix(endRcColor, ratio).toRgbString();
|
|
16363
|
+
}
|
|
16364
|
+
}
|
|
16365
|
+
// This will never reach
|
|
16366
|
+
/* istanbul ignore next */
|
|
16367
|
+
return '';
|
|
16368
|
+
};
|
|
16369
|
+
util.getGradientPercentColor = getGradientPercentColor;
|
|
16370
|
+
return util;
|
|
16371
|
+
}
|
|
16372
|
+
|
|
16370
16373
|
var hasRequiredColorPresets;
|
|
16371
16374
|
|
|
16372
16375
|
function requireColorPresets () {
|
|
@@ -16386,7 +16389,7 @@ function requireColorPresets () {
|
|
|
16386
16389
|
var _collapse = _interopRequireDefault(/*@__PURE__*/ requireCollapse());
|
|
16387
16390
|
var _locale = /*@__PURE__*/ requireLocale();
|
|
16388
16391
|
var _internal = /*@__PURE__*/ requireInternal();
|
|
16389
|
-
var _util = /*@__PURE__*/ requireUtil
|
|
16392
|
+
var _util = /*@__PURE__*/ requireUtil();
|
|
16390
16393
|
const genPresetColor = list => list.map(value => {
|
|
16391
16394
|
value.colors = value.colors.map(_util.generateColor);
|
|
16392
16395
|
return value;
|
|
@@ -16518,7 +16521,6 @@ function requireToken () {
|
|
|
16518
16521
|
}), {});
|
|
16519
16522
|
return Object.assign(Object.assign({}, shadowColorTokens), {
|
|
16520
16523
|
fontWeight: 400,
|
|
16521
|
-
iconGap: token.marginXS,
|
|
16522
16524
|
defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,
|
|
16523
16525
|
primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,
|
|
16524
16526
|
dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,
|
|
@@ -16592,7 +16594,7 @@ function requireStyle$1 () {
|
|
|
16592
16594
|
opacityLoading,
|
|
16593
16595
|
motionDurationSlow,
|
|
16594
16596
|
motionEaseInOut,
|
|
16595
|
-
|
|
16597
|
+
marginXS,
|
|
16596
16598
|
calc
|
|
16597
16599
|
} = token;
|
|
16598
16600
|
return {
|
|
@@ -16600,7 +16602,7 @@ function requireStyle$1 () {
|
|
|
16600
16602
|
outline: 'none',
|
|
16601
16603
|
position: 'relative',
|
|
16602
16604
|
display: 'inline-flex',
|
|
16603
|
-
gap:
|
|
16605
|
+
gap: token.marginXS,
|
|
16604
16606
|
alignItems: 'center',
|
|
16605
16607
|
justifyContent: 'center',
|
|
16606
16608
|
fontWeight,
|
|
@@ -16652,7 +16654,7 @@ function requireStyle$1 () {
|
|
|
16652
16654
|
[`&:not(${componentCls}-icon-end)`]: {
|
|
16653
16655
|
[`${componentCls}-loading-icon-motion`]: {
|
|
16654
16656
|
'&-appear-start, &-enter-start': {
|
|
16655
|
-
marginInlineEnd: calc(
|
|
16657
|
+
marginInlineEnd: calc(marginXS).mul(-1).equal()
|
|
16656
16658
|
},
|
|
16657
16659
|
'&-appear-active, &-enter-active': {
|
|
16658
16660
|
marginInlineEnd: 0
|
|
@@ -16661,7 +16663,7 @@ function requireStyle$1 () {
|
|
|
16661
16663
|
marginInlineEnd: 0
|
|
16662
16664
|
},
|
|
16663
16665
|
'&-leave-active': {
|
|
16664
|
-
marginInlineEnd: calc(
|
|
16666
|
+
marginInlineEnd: calc(marginXS).mul(-1).equal()
|
|
16665
16667
|
}
|
|
16666
16668
|
}
|
|
16667
16669
|
},
|
|
@@ -16669,7 +16671,7 @@ function requireStyle$1 () {
|
|
|
16669
16671
|
flexDirection: 'row-reverse',
|
|
16670
16672
|
[`${componentCls}-loading-icon-motion`]: {
|
|
16671
16673
|
'&-appear-start, &-enter-start': {
|
|
16672
|
-
marginInlineStart: calc(
|
|
16674
|
+
marginInlineStart: calc(marginXS).mul(-1).equal()
|
|
16673
16675
|
},
|
|
16674
16676
|
'&-appear-active, &-enter-active': {
|
|
16675
16677
|
marginInlineStart: 0
|
|
@@ -16678,7 +16680,7 @@ function requireStyle$1 () {
|
|
|
16678
16680
|
marginInlineStart: 0
|
|
16679
16681
|
},
|
|
16680
16682
|
'&-leave-active': {
|
|
16681
|
-
marginInlineStart: calc(
|
|
16683
|
+
marginInlineStart: calc(marginXS).mul(-1).equal()
|
|
16682
16684
|
}
|
|
16683
16685
|
}
|
|
16684
16686
|
}
|
|
@@ -16801,10 +16803,8 @@ function requireStyle$1 () {
|
|
|
16801
16803
|
borderColor: activeColor,
|
|
16802
16804
|
background: token.colorBgContainer
|
|
16803
16805
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, lightColor, {
|
|
16804
|
-
color: darkColor,
|
|
16805
16806
|
background: lightHoverColor
|
|
16806
16807
|
}, {
|
|
16807
|
-
color: darkColor,
|
|
16808
16808
|
background: lightBorderColor
|
|
16809
16809
|
})), genTextLinkButtonStyle(token, darkColor, 'link', {
|
|
16810
16810
|
color: hoverColor
|
|
@@ -16830,10 +16830,8 @@ function requireStyle$1 () {
|
|
|
16830
16830
|
color: token.solidTextColor,
|
|
16831
16831
|
background: token.colorBgSolidActive
|
|
16832
16832
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorFillTertiary, {
|
|
16833
|
-
color: token.defaultColor,
|
|
16834
16833
|
background: token.colorFillSecondary
|
|
16835
16834
|
}, {
|
|
16836
|
-
color: token.defaultColor,
|
|
16837
16835
|
background: token.colorFill
|
|
16838
16836
|
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), genTextLinkButtonStyle(token, token.textTextColor, 'link', {
|
|
16839
16837
|
color: token.colorLinkHover,
|
|
@@ -16853,10 +16851,8 @@ function requireStyle$1 () {
|
|
|
16853
16851
|
borderColor: token.colorPrimaryActive,
|
|
16854
16852
|
background: token.colorBgContainer
|
|
16855
16853
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorPrimaryBg, {
|
|
16856
|
-
color: token.colorPrimary,
|
|
16857
16854
|
background: token.colorPrimaryBgHover
|
|
16858
16855
|
}, {
|
|
16859
|
-
color: token.colorPrimary,
|
|
16860
16856
|
background: token.colorPrimaryBorder
|
|
16861
16857
|
})), genTextLinkButtonStyle(token, token.colorPrimaryText, 'text', {
|
|
16862
16858
|
color: token.colorPrimaryTextHover,
|
|
@@ -16890,10 +16886,8 @@ function requireStyle$1 () {
|
|
|
16890
16886
|
color: token.colorErrorActive,
|
|
16891
16887
|
borderColor: token.colorErrorActive
|
|
16892
16888
|
})), genDashedButtonStyle(token)), genFilledButtonStyle(token, token.colorErrorBg, {
|
|
16893
|
-
color: token.colorError,
|
|
16894
16889
|
background: token.colorErrorBgFilledHover
|
|
16895
16890
|
}, {
|
|
16896
|
-
color: token.colorError,
|
|
16897
16891
|
background: token.colorErrorBgActive
|
|
16898
16892
|
})), genTextLinkButtonStyle(token, token.colorError, 'text', {
|
|
16899
16893
|
color: token.colorErrorHover,
|
|
@@ -17077,7 +17071,7 @@ function requireCompactItem () {
|
|
|
17077
17071
|
});
|
|
17078
17072
|
compactItem.genCompactItemStyle = genCompactItemStyle;
|
|
17079
17073
|
// handle border collapse
|
|
17080
|
-
function compactItemBorder(token, parentCls, options
|
|
17074
|
+
function compactItemBorder(token, parentCls, options) {
|
|
17081
17075
|
const {
|
|
17082
17076
|
focusElCls,
|
|
17083
17077
|
focus,
|
|
@@ -17089,16 +17083,13 @@ function requireCompactItem () {
|
|
|
17089
17083
|
[`&-item:not(${parentCls}-last-item)`]: {
|
|
17090
17084
|
marginInlineEnd: token.calc(token.lineWidth).mul(-1).equal()
|
|
17091
17085
|
},
|
|
17092
|
-
[`&-item:not(${prefixCls}-status-success)`]: {
|
|
17093
|
-
zIndex: 2
|
|
17094
|
-
},
|
|
17095
17086
|
'&-item': Object.assign(Object.assign({
|
|
17096
17087
|
[hoverEffects]: {
|
|
17097
|
-
zIndex:
|
|
17088
|
+
zIndex: 2
|
|
17098
17089
|
}
|
|
17099
17090
|
}, focusElCls ? {
|
|
17100
17091
|
[`&${focusElCls}`]: {
|
|
17101
|
-
zIndex:
|
|
17092
|
+
zIndex: 2
|
|
17102
17093
|
}
|
|
17103
17094
|
} : {}), {
|
|
17104
17095
|
[`&[disabled] ${childCombinator}`]: {
|
|
@@ -17139,7 +17130,7 @@ function requireCompactItem () {
|
|
|
17139
17130
|
} = token;
|
|
17140
17131
|
const compactCls = `${componentCls}-compact`;
|
|
17141
17132
|
return {
|
|
17142
|
-
[compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options
|
|
17133
|
+
[compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))
|
|
17143
17134
|
};
|
|
17144
17135
|
}
|
|
17145
17136
|
return compactItem;
|
|
@@ -17157,18 +17148,15 @@ function requireCompactItemVertical () {
|
|
|
17157
17148
|
value: true
|
|
17158
17149
|
});
|
|
17159
17150
|
compactItemVertical.genCompactItemVerticalStyle = genCompactItemVerticalStyle;
|
|
17160
|
-
function compactItemVerticalBorder(token, parentCls
|
|
17151
|
+
function compactItemVerticalBorder(token, parentCls) {
|
|
17161
17152
|
return {
|
|
17162
17153
|
// border collapse
|
|
17163
17154
|
[`&-item:not(${parentCls}-last-item)`]: {
|
|
17164
17155
|
marginBottom: token.calc(token.lineWidth).mul(-1).equal()
|
|
17165
17156
|
},
|
|
17166
|
-
[`&-item:not(${prefixCls}-status-success)`]: {
|
|
17167
|
-
zIndex: 2
|
|
17168
|
-
},
|
|
17169
17157
|
'&-item': {
|
|
17170
17158
|
'&:hover,&:focus,&:active': {
|
|
17171
|
-
zIndex:
|
|
17159
|
+
zIndex: 2
|
|
17172
17160
|
},
|
|
17173
17161
|
'&[disabled]': {
|
|
17174
17162
|
zIndex: 0
|
|
@@ -17198,7 +17186,7 @@ function requireCompactItemVertical () {
|
|
|
17198
17186
|
function genCompactItemVerticalStyle(token) {
|
|
17199
17187
|
const compactCls = `${token.componentCls}-compact-vertical`;
|
|
17200
17188
|
return {
|
|
17201
|
-
[compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls
|
|
17189
|
+
[compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))
|
|
17202
17190
|
};
|
|
17203
17191
|
}
|
|
17204
17192
|
return compactItemVertical;
|
|
@@ -17269,7 +17257,6 @@ function requireButton$1 () {
|
|
|
17269
17257
|
var _classnames = _interopRequireDefault(/*@__PURE__*/ requireClassnames());
|
|
17270
17258
|
var _omit = _interopRequireDefault(/*@__PURE__*/ requireOmit());
|
|
17271
17259
|
var _ref = /*@__PURE__*/ requireRef();
|
|
17272
|
-
var _useLayoutEffect = _interopRequireDefault(/*@__PURE__*/ requireUseLayoutEffect());
|
|
17273
17260
|
var _warning = /*@__PURE__*/ requireWarning();
|
|
17274
17261
|
var _wave = _interopRequireDefault(/*@__PURE__*/ requireWave());
|
|
17275
17262
|
var _context = /*@__PURE__*/ requireContext$3();
|
|
@@ -17321,7 +17308,7 @@ function requireButton$1 () {
|
|
|
17321
17308
|
variant,
|
|
17322
17309
|
type,
|
|
17323
17310
|
danger = false,
|
|
17324
|
-
shape
|
|
17311
|
+
shape = 'default',
|
|
17325
17312
|
size: customizeSize,
|
|
17326
17313
|
styles,
|
|
17327
17314
|
disabled: customDisabled,
|
|
@@ -17346,7 +17333,6 @@ function requireButton$1 () {
|
|
|
17346
17333
|
const {
|
|
17347
17334
|
button
|
|
17348
17335
|
} = _react.default.useContext(_context.ConfigContext);
|
|
17349
|
-
const shape = customizeShape || (button === null || button === void 0 ? void 0 : button.shape) || 'default';
|
|
17350
17336
|
const [mergedColor, mergedVariant] = (0, _react.useMemo)(() => {
|
|
17351
17337
|
// >>>>> Local
|
|
17352
17338
|
// Color & Variant
|
|
@@ -17403,7 +17389,7 @@ function requireButton$1 () {
|
|
|
17403
17389
|
// ========================= Effect =========================
|
|
17404
17390
|
// Loading. Should use `useLayoutEffect` to avoid low perf multiple click issue.
|
|
17405
17391
|
// https://github.com/ant-design/ant-design/issues/51325
|
|
17406
|
-
(0,
|
|
17392
|
+
(0, _react.useLayoutEffect)(() => {
|
|
17407
17393
|
let delayTimer = null;
|
|
17408
17394
|
if (loadingOrDelay.delay > 0) {
|
|
17409
17395
|
delayTimer = setTimeout(() => {
|
|
@@ -23305,4 +23291,65 @@ const TableCategory = ({
|
|
|
23305
23291
|
return tableContent;
|
|
23306
23292
|
};
|
|
23307
23293
|
|
|
23308
|
-
|
|
23294
|
+
var dayjs_min$1 = {exports: {}};
|
|
23295
|
+
|
|
23296
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
23297
|
+
|
|
23298
|
+
var hasRequiredDayjs_min;
|
|
23299
|
+
|
|
23300
|
+
function requireDayjs_min () {
|
|
23301
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
23302
|
+
hasRequiredDayjs_min = 1;
|
|
23303
|
+
(function (module, exports) {
|
|
23304
|
+
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
23305
|
+
} (dayjs_min$1));
|
|
23306
|
+
return dayjs_min$1.exports;
|
|
23307
|
+
}
|
|
23308
|
+
|
|
23309
|
+
var dayjs_minExports = /*@__PURE__*/ requireDayjs_min();
|
|
23310
|
+
const dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
23311
|
+
|
|
23312
|
+
const Clock = (props) => {
|
|
23313
|
+
const { className } = props;
|
|
23314
|
+
useEffect(() => {
|
|
23315
|
+
const updateTime = () => {
|
|
23316
|
+
const now = dayjs();
|
|
23317
|
+
document.documentElement.style.setProperty(
|
|
23318
|
+
"--timer-day",
|
|
23319
|
+
`'${now.format("DD")}'`
|
|
23320
|
+
);
|
|
23321
|
+
document.documentElement.style.setProperty(
|
|
23322
|
+
"--timer-months",
|
|
23323
|
+
`'${now.format("MM")}'`
|
|
23324
|
+
);
|
|
23325
|
+
document.documentElement.style.setProperty(
|
|
23326
|
+
"--timer-year",
|
|
23327
|
+
`'${now.format("YYYY")}'`
|
|
23328
|
+
);
|
|
23329
|
+
document.documentElement.style.setProperty(
|
|
23330
|
+
"--timer-hours",
|
|
23331
|
+
`'${now.format("H")}'`
|
|
23332
|
+
);
|
|
23333
|
+
document.documentElement.style.setProperty(
|
|
23334
|
+
"--timer-minutes",
|
|
23335
|
+
`'${now.format("mm")}'`
|
|
23336
|
+
);
|
|
23337
|
+
document.documentElement.style.setProperty(
|
|
23338
|
+
"--timer-seconds",
|
|
23339
|
+
`'${now.format("ss")}'`
|
|
23340
|
+
);
|
|
23341
|
+
requestAnimationFrame(updateTime);
|
|
23342
|
+
};
|
|
23343
|
+
updateTime();
|
|
23344
|
+
}, []);
|
|
23345
|
+
return /* @__PURE__ */ jsxs("div", { className: twMerge("clock-container clock-container2", className), children: [
|
|
23346
|
+
/* @__PURE__ */ jsx("div", { className: "clock-col", children: /* @__PURE__ */ jsx("p", { className: "clock-day", children: /* @__PURE__ */ jsx("span", { children: "/" }) }) }),
|
|
23347
|
+
/* @__PURE__ */ jsx("div", { className: "clock-col", children: /* @__PURE__ */ jsx("p", { className: "clock-months", children: /* @__PURE__ */ jsx("span", { children: "/" }) }) }),
|
|
23348
|
+
/* @__PURE__ */ jsx("div", { className: "clock-col", children: /* @__PURE__ */ jsx("p", { className: "clock-year !w-[85px]", children: /* @__PURE__ */ jsx("span", { children: " -- " }) }) }),
|
|
23349
|
+
/* @__PURE__ */ jsx("div", { className: "clock-col", children: /* @__PURE__ */ jsx("p", { className: "clock-hours ", children: /* @__PURE__ */ jsx("span", { children: ":" }) }) }),
|
|
23350
|
+
/* @__PURE__ */ jsx("div", { className: "clock-col", children: /* @__PURE__ */ jsx("p", { className: "clock-minutes ", children: /* @__PURE__ */ jsx("span", { children: ":" }) }) }),
|
|
23351
|
+
/* @__PURE__ */ jsx("div", { className: "clock-col", children: /* @__PURE__ */ jsx("p", { className: "clock-seconds !w-[30px]" }) })
|
|
23352
|
+
] });
|
|
23353
|
+
};
|
|
23354
|
+
|
|
23355
|
+
export { ActionRowTable, Badge, BulkActions, Button, CATEGORY_LIST_ENUM, Clock, ConfirmModal, Heading, ID_TABLE_WRAPPER, ListStatusApproved, Modal, Popover, Table, TableCategory, Tooltip$1 as Tooltip, TypeActionRowTable, TypeBulkActions, TypeStatusTable, Typography };
|