You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1770 lines
67 KiB
1770 lines
67 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2236,36381],{
|
|
|
|
/***/ 12893:
|
|
/*!*************************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/MinusCircleOutlined.js + 1 modules ***!
|
|
\*************************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_MinusCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(14809);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/MinusCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var MinusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "minus-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_MinusCircleOutlined = (MinusCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(7657);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/MinusCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var MinusCircleOutlined_MinusCircleOutlined = function MinusCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_MinusCircleOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(MinusCircleOutlined_MinusCircleOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_MinusCircleOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 32134:
|
|
/*!************************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/PlusCircleOutlined.js + 1 modules ***!
|
|
\************************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_PlusCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(14809);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/PlusCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var PlusCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "plus-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_PlusCircleOutlined = (PlusCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(7657);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/PlusCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var PlusCircleOutlined_PlusCircleOutlined = function PlusCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_PlusCircleOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(PlusCircleOutlined_PlusCircleOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_PlusCircleOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 36381:
|
|
/*!************************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/collapse/index.js + 8 modules ***!
|
|
\************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ es_collapse; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/RightOutlined.js + 1 modules
|
|
var RightOutlined = __webpack_require__(38819);
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(14809);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
|
|
var toConsumableArray = __webpack_require__(95190);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
var slicedToArray = __webpack_require__(50298);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/typeof.js
|
|
var esm_typeof = __webpack_require__(93664);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/hooks/useMergedState.js
|
|
var useMergedState = __webpack_require__(18929);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/warning.js
|
|
var warning = __webpack_require__(48736);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(62646);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/Children/toArray.js
|
|
var toArray = __webpack_require__(11592);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__(4635);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-motion@2.9.5@rc-motion/es/index.js + 13 modules
|
|
var es = __webpack_require__(77900);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/KeyCode.js
|
|
var KeyCode = __webpack_require__(10228);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-collapse@3.7.3@rc-collapse/es/PanelContent.js
|
|
|
|
|
|
|
|
|
|
var PanelContent = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (props, ref) {
|
|
var prefixCls = props.prefixCls,
|
|
forceRender = props.forceRender,
|
|
className = props.className,
|
|
style = props.style,
|
|
children = props.children,
|
|
isActive = props.isActive,
|
|
role = props.role;
|
|
var _React$useState = _react_17_0_2_react.useState(isActive || forceRender),
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
rendered = _React$useState2[0],
|
|
setRendered = _React$useState2[1];
|
|
_react_17_0_2_react.useEffect(function () {
|
|
if (forceRender || isActive) {
|
|
setRendered(true);
|
|
}
|
|
}, [forceRender, isActive]);
|
|
if (!rendered) {
|
|
return null;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
ref: ref,
|
|
className: _classnames_2_5_1_classnames_default()("".concat(prefixCls, "-content"), (0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-content-active"), isActive), "".concat(prefixCls, "-content-inactive"), !isActive), className),
|
|
style: style,
|
|
role: role
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: "".concat(prefixCls, "-content-box")
|
|
}, children));
|
|
});
|
|
PanelContent.displayName = 'PanelContent';
|
|
/* harmony default export */ var es_PanelContent = (PanelContent);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-collapse@3.7.3@rc-collapse/es/Panel.js
|
|
|
|
|
|
|
|
var _excluded = ["showArrow", "headerClass", "isActive", "onItemClick", "forceRender", "className", "prefixCls", "collapsible", "accordion", "panelKey", "extra", "header", "expandIcon", "openMotion", "destroyInactivePanel", "children"];
|
|
|
|
|
|
|
|
|
|
|
|
var CollapsePanel = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (props, ref) {
|
|
var _props$showArrow = props.showArrow,
|
|
showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
|
|
headerClass = props.headerClass,
|
|
isActive = props.isActive,
|
|
onItemClick = props.onItemClick,
|
|
forceRender = props.forceRender,
|
|
className = props.className,
|
|
prefixCls = props.prefixCls,
|
|
collapsible = props.collapsible,
|
|
accordion = props.accordion,
|
|
panelKey = props.panelKey,
|
|
extra = props.extra,
|
|
header = props.header,
|
|
expandIcon = props.expandIcon,
|
|
openMotion = props.openMotion,
|
|
destroyInactivePanel = props.destroyInactivePanel,
|
|
children = props.children,
|
|
resetProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
|
|
var disabled = collapsible === 'disabled';
|
|
var collapsibleHeader = collapsible === 'header';
|
|
var collapsibleIcon = collapsible === 'icon';
|
|
var ifExtraExist = extra !== null && extra !== undefined && typeof extra !== 'boolean';
|
|
var handleItemClick = function handleItemClick() {
|
|
onItemClick === null || onItemClick === void 0 || onItemClick(panelKey);
|
|
};
|
|
var handleKeyDown = function handleKeyDown(e) {
|
|
if (e.key === 'Enter' || e.keyCode === KeyCode/* default */.Z.ENTER || e.which === KeyCode/* default */.Z.ENTER) {
|
|
handleItemClick();
|
|
}
|
|
};
|
|
|
|
// ======================== Icon ========================
|
|
var iconNode = typeof expandIcon === 'function' ? expandIcon(props) : /*#__PURE__*/_react_17_0_2_react.createElement("i", {
|
|
className: "arrow"
|
|
});
|
|
if (iconNode) {
|
|
iconNode = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: "".concat(prefixCls, "-expand-icon"),
|
|
onClick: ['header', 'icon'].includes(collapsible) ? handleItemClick : undefined
|
|
}, iconNode);
|
|
}
|
|
var collapsePanelClassNames = _classnames_2_5_1_classnames_default()((0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-item"), true), "".concat(prefixCls, "-item-active"), isActive), "".concat(prefixCls, "-item-disabled"), disabled), className);
|
|
var headerClassName = _classnames_2_5_1_classnames_default()(headerClass, (0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-header"), true), "".concat(prefixCls, "-header-collapsible-only"), collapsibleHeader), "".concat(prefixCls, "-icon-collapsible-only"), collapsibleIcon));
|
|
|
|
// ======================== HeaderProps ========================
|
|
var headerProps = {
|
|
className: headerClassName,
|
|
'aria-expanded': isActive,
|
|
'aria-disabled': disabled,
|
|
onKeyDown: handleKeyDown
|
|
};
|
|
if (!collapsibleHeader && !collapsibleIcon) {
|
|
headerProps.onClick = handleItemClick;
|
|
headerProps.role = accordion ? 'tab' : 'button';
|
|
headerProps.tabIndex = disabled ? -1 : 0;
|
|
}
|
|
|
|
// ======================== Render ========================
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", (0,esm_extends/* default */.Z)({}, resetProps, {
|
|
ref: ref,
|
|
className: collapsePanelClassNames
|
|
}), /*#__PURE__*/_react_17_0_2_react.createElement("div", headerProps, showArrow && iconNode, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: "".concat(prefixCls, "-header-text"),
|
|
onClick: collapsible === 'header' ? handleItemClick : undefined
|
|
}, header), ifExtraExist && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: "".concat(prefixCls, "-extra")
|
|
}, extra)), /*#__PURE__*/_react_17_0_2_react.createElement(es["default"], (0,esm_extends/* default */.Z)({
|
|
visible: isActive,
|
|
leavedClassName: "".concat(prefixCls, "-content-hidden")
|
|
}, openMotion, {
|
|
forceRender: forceRender,
|
|
removeOnLeave: destroyInactivePanel
|
|
}), function (_ref, motionRef) {
|
|
var motionClassName = _ref.className,
|
|
motionStyle = _ref.style;
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(es_PanelContent, {
|
|
ref: motionRef,
|
|
prefixCls: prefixCls,
|
|
className: motionClassName,
|
|
style: motionStyle,
|
|
isActive: isActive,
|
|
forceRender: forceRender,
|
|
role: accordion ? 'tabpanel' : void 0
|
|
}, children);
|
|
}));
|
|
});
|
|
/* harmony default export */ var Panel = (CollapsePanel);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-collapse@3.7.3@rc-collapse/es/hooks/useItems.js
|
|
|
|
|
|
var useItems_excluded = ["children", "label", "key", "collapsible", "onItemClick", "destroyInactivePanel"];
|
|
|
|
|
|
|
|
var convertItemsToNodes = function convertItemsToNodes(items, props) {
|
|
var prefixCls = props.prefixCls,
|
|
accordion = props.accordion,
|
|
collapsible = props.collapsible,
|
|
destroyInactivePanel = props.destroyInactivePanel,
|
|
onItemClick = props.onItemClick,
|
|
activeKey = props.activeKey,
|
|
openMotion = props.openMotion,
|
|
expandIcon = props.expandIcon;
|
|
return items.map(function (item, index) {
|
|
var children = item.children,
|
|
label = item.label,
|
|
rawKey = item.key,
|
|
rawCollapsible = item.collapsible,
|
|
rawOnItemClick = item.onItemClick,
|
|
rawDestroyInactivePanel = item.destroyInactivePanel,
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(item, useItems_excluded);
|
|
|
|
// You may be puzzled why you want to convert them all into strings, me too.
|
|
// Maybe: https://github.com/react-component/collapse/blob/aac303a8b6ff30e35060b4f8fecde6f4556fcbe2/src/Collapse.tsx#L15
|
|
var key = String(rawKey !== null && rawKey !== void 0 ? rawKey : index);
|
|
var mergeCollapsible = rawCollapsible !== null && rawCollapsible !== void 0 ? rawCollapsible : collapsible;
|
|
var mergeDestroyInactivePanel = rawDestroyInactivePanel !== null && rawDestroyInactivePanel !== void 0 ? rawDestroyInactivePanel : destroyInactivePanel;
|
|
var handleItemClick = function handleItemClick(value) {
|
|
if (mergeCollapsible === 'disabled') return;
|
|
onItemClick(value);
|
|
rawOnItemClick === null || rawOnItemClick === void 0 || rawOnItemClick(value);
|
|
};
|
|
var isActive = false;
|
|
if (accordion) {
|
|
isActive = activeKey[0] === key;
|
|
} else {
|
|
isActive = activeKey.indexOf(key) > -1;
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(Panel, (0,esm_extends/* default */.Z)({}, restProps, {
|
|
prefixCls: prefixCls,
|
|
key: key,
|
|
panelKey: key,
|
|
isActive: isActive,
|
|
accordion: accordion,
|
|
openMotion: openMotion,
|
|
expandIcon: expandIcon,
|
|
header: label,
|
|
collapsible: mergeCollapsible,
|
|
onItemClick: handleItemClick,
|
|
destroyInactivePanel: mergeDestroyInactivePanel
|
|
}), children);
|
|
});
|
|
};
|
|
|
|
/**
|
|
* @deprecated The next major version will be removed
|
|
*/
|
|
var getNewChild = function getNewChild(child, index, props) {
|
|
if (!child) return null;
|
|
var prefixCls = props.prefixCls,
|
|
accordion = props.accordion,
|
|
collapsible = props.collapsible,
|
|
destroyInactivePanel = props.destroyInactivePanel,
|
|
onItemClick = props.onItemClick,
|
|
activeKey = props.activeKey,
|
|
openMotion = props.openMotion,
|
|
expandIcon = props.expandIcon;
|
|
var key = child.key || String(index);
|
|
var _child$props = child.props,
|
|
header = _child$props.header,
|
|
headerClass = _child$props.headerClass,
|
|
childDestroyInactivePanel = _child$props.destroyInactivePanel,
|
|
childCollapsible = _child$props.collapsible,
|
|
childOnItemClick = _child$props.onItemClick;
|
|
var isActive = false;
|
|
if (accordion) {
|
|
isActive = activeKey[0] === key;
|
|
} else {
|
|
isActive = activeKey.indexOf(key) > -1;
|
|
}
|
|
var mergeCollapsible = childCollapsible !== null && childCollapsible !== void 0 ? childCollapsible : collapsible;
|
|
var handleItemClick = function handleItemClick(value) {
|
|
if (mergeCollapsible === 'disabled') return;
|
|
onItemClick(value);
|
|
childOnItemClick === null || childOnItemClick === void 0 || childOnItemClick(value);
|
|
};
|
|
var childProps = {
|
|
key: key,
|
|
panelKey: key,
|
|
header: header,
|
|
headerClass: headerClass,
|
|
isActive: isActive,
|
|
prefixCls: prefixCls,
|
|
destroyInactivePanel: childDestroyInactivePanel !== null && childDestroyInactivePanel !== void 0 ? childDestroyInactivePanel : destroyInactivePanel,
|
|
openMotion: openMotion,
|
|
accordion: accordion,
|
|
children: child.props.children,
|
|
onItemClick: handleItemClick,
|
|
expandIcon: expandIcon,
|
|
collapsible: mergeCollapsible
|
|
};
|
|
|
|
// https://github.com/ant-design/ant-design/issues/20479
|
|
if (typeof child.type === 'string') {
|
|
return child;
|
|
}
|
|
Object.keys(childProps).forEach(function (propName) {
|
|
if (typeof childProps[propName] === 'undefined') {
|
|
delete childProps[propName];
|
|
}
|
|
});
|
|
return /*#__PURE__*/_react_17_0_2_react.cloneElement(child, childProps);
|
|
};
|
|
function useItems(items, rawChildren, props) {
|
|
if (Array.isArray(items)) {
|
|
return convertItemsToNodes(items, props);
|
|
}
|
|
return (0,toArray/* default */.Z)(rawChildren).map(function (child, index) {
|
|
return getNewChild(child, index, props);
|
|
});
|
|
}
|
|
/* harmony default export */ var hooks_useItems = (useItems);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/pickAttrs.js
|
|
var pickAttrs = __webpack_require__(26112);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-collapse@3.7.3@rc-collapse/es/Collapse.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getActiveKeysArray(activeKey) {
|
|
var currentActiveKey = activeKey;
|
|
if (!Array.isArray(currentActiveKey)) {
|
|
var activeKeyType = (0,esm_typeof/* default */.Z)(currentActiveKey);
|
|
currentActiveKey = activeKeyType === 'number' || activeKeyType === 'string' ? [currentActiveKey] : [];
|
|
}
|
|
return currentActiveKey.map(function (key) {
|
|
return String(key);
|
|
});
|
|
}
|
|
var Collapse = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (props, ref) {
|
|
var _props$prefixCls = props.prefixCls,
|
|
prefixCls = _props$prefixCls === void 0 ? 'rc-collapse' : _props$prefixCls,
|
|
_props$destroyInactiv = props.destroyInactivePanel,
|
|
destroyInactivePanel = _props$destroyInactiv === void 0 ? false : _props$destroyInactiv,
|
|
style = props.style,
|
|
accordion = props.accordion,
|
|
className = props.className,
|
|
children = props.children,
|
|
collapsible = props.collapsible,
|
|
openMotion = props.openMotion,
|
|
expandIcon = props.expandIcon,
|
|
rawActiveKey = props.activeKey,
|
|
defaultActiveKey = props.defaultActiveKey,
|
|
_onChange = props.onChange,
|
|
items = props.items;
|
|
var collapseClassName = _classnames_2_5_1_classnames_default()(prefixCls, className);
|
|
var _useMergedState = (0,useMergedState/* default */.Z)([], {
|
|
value: rawActiveKey,
|
|
onChange: function onChange(v) {
|
|
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(v);
|
|
},
|
|
defaultValue: defaultActiveKey,
|
|
postState: getActiveKeysArray
|
|
}),
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
activeKey = _useMergedState2[0],
|
|
setActiveKey = _useMergedState2[1];
|
|
var onItemClick = function onItemClick(key) {
|
|
return setActiveKey(function () {
|
|
if (accordion) {
|
|
return activeKey[0] === key ? [] : [key];
|
|
}
|
|
var index = activeKey.indexOf(key);
|
|
var isActive = index > -1;
|
|
if (isActive) {
|
|
return activeKey.filter(function (item) {
|
|
return item !== key;
|
|
});
|
|
}
|
|
return [].concat((0,toConsumableArray/* default */.Z)(activeKey), [key]);
|
|
});
|
|
};
|
|
|
|
// ======================== Children ========================
|
|
(0,warning/* default */.ZP)(!children, '[rc-collapse] `children` will be removed in next major version. Please use `items` instead.');
|
|
var mergedChildren = hooks_useItems(items, children, {
|
|
prefixCls: prefixCls,
|
|
accordion: accordion,
|
|
openMotion: openMotion,
|
|
expandIcon: expandIcon,
|
|
collapsible: collapsible,
|
|
destroyInactivePanel: destroyInactivePanel,
|
|
onItemClick: onItemClick,
|
|
activeKey: activeKey
|
|
});
|
|
|
|
// ======================== Render ========================
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", (0,esm_extends/* default */.Z)({
|
|
ref: ref,
|
|
className: collapseClassName,
|
|
style: style,
|
|
role: accordion ? 'tablist' : undefined
|
|
}, (0,pickAttrs/* default */.Z)(props, {
|
|
aria: true,
|
|
data: true
|
|
})), mergedChildren);
|
|
});
|
|
/* harmony default export */ var es_Collapse = (Object.assign(Collapse, {
|
|
/**
|
|
* @deprecated use `items` instead, will be removed in `v4.0.0`
|
|
*/
|
|
Panel: Panel
|
|
}));
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-collapse@3.7.3@rc-collapse/es/index.js
|
|
|
|
/* harmony default export */ var _rc_collapse_3_7_3_rc_collapse_es = (es_Collapse);
|
|
|
|
/**
|
|
* @deprecated use `items` instead, will be removed in `v4.0.0`
|
|
*/
|
|
var es_Panel = es_Collapse.Panel;
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/omit.js
|
|
var omit = __webpack_require__(2738);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/motion.js
|
|
var motion = __webpack_require__(62892);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
|
|
var reactNode = __webpack_require__(92343);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
var useSize = __webpack_require__(19716);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/collapse/CollapsePanel.js
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const CollapsePanel_CollapsePanel = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
false ? 0 : void 0;
|
|
const {
|
|
getPrefixCls
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
className,
|
|
showArrow = true
|
|
} = props;
|
|
const prefixCls = getPrefixCls('collapse', customizePrefixCls);
|
|
const collapsePanelClassName = _classnames_2_5_1_classnames_default()({
|
|
[`${prefixCls}-no-arrow`]: !showArrow
|
|
}, className);
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(_rc_collapse_3_7_3_rc_collapse_es.Panel, Object.assign({
|
|
ref: ref
|
|
}, props, {
|
|
prefixCls: prefixCls,
|
|
className: collapsePanelClassName
|
|
}));
|
|
});
|
|
/* harmony default export */ var collapse_CollapsePanel = (CollapsePanel_CollapsePanel);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/motion/collapse.js
|
|
var collapse = __webpack_require__(8378);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/collapse/style/index.js
|
|
|
|
|
|
|
|
const genBaseStyle = token => {
|
|
const {
|
|
componentCls,
|
|
contentBg,
|
|
padding,
|
|
headerBg,
|
|
headerPadding,
|
|
collapseHeaderPaddingSM,
|
|
collapseHeaderPaddingLG,
|
|
collapsePanelBorderRadius,
|
|
lineWidth,
|
|
lineType,
|
|
colorBorder,
|
|
colorText,
|
|
colorTextHeading,
|
|
colorTextDisabled,
|
|
fontSize,
|
|
fontSizeLG,
|
|
lineHeight,
|
|
marginSM,
|
|
paddingSM,
|
|
paddingLG,
|
|
paddingXS,
|
|
motionDurationSlow,
|
|
fontSizeIcon,
|
|
contentPadding
|
|
} = token;
|
|
const borderBase = `${lineWidth}px ${lineType} ${colorBorder}`;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
backgroundColor: headerBg,
|
|
border: borderBase,
|
|
borderBottom: 0,
|
|
borderRadius: `${collapsePanelBorderRadius}px`,
|
|
[`&-rtl`]: {
|
|
direction: 'rtl'
|
|
},
|
|
[`& > ${componentCls}-item`]: {
|
|
borderBottom: borderBase,
|
|
[`&:last-child`]: {
|
|
[`
|
|
&,
|
|
& > ${componentCls}-header`]: {
|
|
borderRadius: `0 0 ${collapsePanelBorderRadius}px ${collapsePanelBorderRadius}px`
|
|
}
|
|
},
|
|
[`> ${componentCls}-header`]: {
|
|
position: 'relative',
|
|
display: 'flex',
|
|
flexWrap: 'nowrap',
|
|
alignItems: 'flex-start',
|
|
padding: headerPadding,
|
|
color: colorTextHeading,
|
|
lineHeight,
|
|
cursor: 'pointer',
|
|
transition: `all ${motionDurationSlow}, visibility 0s`,
|
|
[`> ${componentCls}-header-text`]: {
|
|
flex: 'auto'
|
|
},
|
|
'&:focus': {
|
|
outline: 'none'
|
|
},
|
|
// >>>>> Arrow
|
|
[`${componentCls}-expand-icon`]: {
|
|
height: fontSize * lineHeight,
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
paddingInlineEnd: marginSM
|
|
},
|
|
[`${componentCls}-arrow`]: Object.assign(Object.assign({}, (0,style/* resetIcon */.Ro)()), {
|
|
fontSize: fontSizeIcon,
|
|
svg: {
|
|
transition: `transform ${motionDurationSlow}`
|
|
}
|
|
}),
|
|
// >>>>> Text
|
|
[`${componentCls}-header-text`]: {
|
|
marginInlineEnd: 'auto'
|
|
}
|
|
},
|
|
[`${componentCls}-header-collapsible-only`]: {
|
|
cursor: 'default',
|
|
[`${componentCls}-header-text`]: {
|
|
flex: 'none',
|
|
cursor: 'pointer'
|
|
}
|
|
},
|
|
[`${componentCls}-icon-collapsible-only`]: {
|
|
cursor: 'default',
|
|
[`${componentCls}-expand-icon`]: {
|
|
cursor: 'pointer'
|
|
}
|
|
}
|
|
},
|
|
[`${componentCls}-content`]: {
|
|
color: colorText,
|
|
backgroundColor: contentBg,
|
|
borderTop: borderBase,
|
|
[`& > ${componentCls}-content-box`]: {
|
|
padding: contentPadding
|
|
},
|
|
[`&-hidden`]: {
|
|
display: 'none'
|
|
}
|
|
},
|
|
[`&-small`]: {
|
|
[`> ${componentCls}-item`]: {
|
|
[`> ${componentCls}-header`]: {
|
|
padding: collapseHeaderPaddingSM,
|
|
paddingInlineStart: paddingXS,
|
|
[`> ${componentCls}-expand-icon`]: {
|
|
// Arrow offset
|
|
marginInlineStart: paddingSM - paddingXS
|
|
}
|
|
},
|
|
[`> ${componentCls}-content > ${componentCls}-content-box`]: {
|
|
padding: paddingSM
|
|
}
|
|
}
|
|
},
|
|
[`&-large`]: {
|
|
[`> ${componentCls}-item`]: {
|
|
fontSize: fontSizeLG,
|
|
[`> ${componentCls}-header`]: {
|
|
padding: collapseHeaderPaddingLG,
|
|
paddingInlineStart: padding,
|
|
[`> ${componentCls}-expand-icon`]: {
|
|
height: fontSizeLG * lineHeight,
|
|
// Arrow offset
|
|
marginInlineStart: paddingLG - padding
|
|
}
|
|
},
|
|
[`> ${componentCls}-content > ${componentCls}-content-box`]: {
|
|
padding: paddingLG
|
|
}
|
|
}
|
|
},
|
|
[`${componentCls}-item:last-child`]: {
|
|
[`> ${componentCls}-content`]: {
|
|
borderRadius: `0 0 ${collapsePanelBorderRadius}px ${collapsePanelBorderRadius}px`
|
|
}
|
|
},
|
|
[`& ${componentCls}-item-disabled > ${componentCls}-header`]: {
|
|
[`
|
|
&,
|
|
& > .arrow
|
|
`]: {
|
|
color: colorTextDisabled,
|
|
cursor: 'not-allowed'
|
|
}
|
|
},
|
|
// ========================== Icon Position ==========================
|
|
[`&${componentCls}-icon-position-end`]: {
|
|
[`& > ${componentCls}-item`]: {
|
|
[`> ${componentCls}-header`]: {
|
|
[`${componentCls}-expand-icon`]: {
|
|
order: 1,
|
|
paddingInlineEnd: 0,
|
|
paddingInlineStart: marginSM
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
};
|
|
};
|
|
const genArrowStyle = token => {
|
|
const {
|
|
componentCls
|
|
} = token;
|
|
const fixedSelector = `> ${componentCls}-item > ${componentCls}-header ${componentCls}-arrow svg`;
|
|
return {
|
|
[`${componentCls}-rtl`]: {
|
|
[fixedSelector]: {
|
|
transform: `rotate(180deg)`
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genBorderlessStyle = token => {
|
|
const {
|
|
componentCls,
|
|
headerBg,
|
|
paddingXXS,
|
|
colorBorder
|
|
} = token;
|
|
return {
|
|
[`${componentCls}-borderless`]: {
|
|
backgroundColor: headerBg,
|
|
border: 0,
|
|
[`> ${componentCls}-item`]: {
|
|
borderBottom: `1px solid ${colorBorder}`
|
|
},
|
|
[`
|
|
> ${componentCls}-item:last-child,
|
|
> ${componentCls}-item:last-child ${componentCls}-header
|
|
`]: {
|
|
borderRadius: 0
|
|
},
|
|
[`> ${componentCls}-item:last-child`]: {
|
|
borderBottom: 0
|
|
},
|
|
[`> ${componentCls}-item > ${componentCls}-content`]: {
|
|
backgroundColor: 'transparent',
|
|
borderTop: 0
|
|
},
|
|
[`> ${componentCls}-item > ${componentCls}-content > ${componentCls}-content-box`]: {
|
|
paddingTop: paddingXXS
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genGhostStyle = token => {
|
|
const {
|
|
componentCls,
|
|
paddingSM
|
|
} = token;
|
|
return {
|
|
[`${componentCls}-ghost`]: {
|
|
backgroundColor: 'transparent',
|
|
border: 0,
|
|
[`> ${componentCls}-item`]: {
|
|
borderBottom: 0,
|
|
[`> ${componentCls}-content`]: {
|
|
backgroundColor: 'transparent',
|
|
border: 0,
|
|
[`> ${componentCls}-content-box`]: {
|
|
paddingBlock: paddingSM
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
/* harmony default export */ var collapse_style = ((0,genComponentStyleHook/* default */.Z)('Collapse', token => {
|
|
const collapseToken = (0,statistic/* merge */.TS)(token, {
|
|
collapseHeaderPaddingSM: `${token.paddingXS}px ${token.paddingSM}px`,
|
|
collapseHeaderPaddingLG: `${token.padding}px ${token.paddingLG}px`,
|
|
collapsePanelBorderRadius: token.borderRadiusLG
|
|
});
|
|
return [genBaseStyle(collapseToken), genBorderlessStyle(collapseToken), genGhostStyle(collapseToken), genArrowStyle(collapseToken), (0,collapse/* default */.Z)(collapseToken)];
|
|
}, token => ({
|
|
headerPadding: `${token.paddingSM}px ${token.padding}px`,
|
|
headerBg: token.colorFillAlter,
|
|
contentPadding: `${token.padding}px 16px`,
|
|
contentBg: token.colorBgContainer
|
|
})));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/collapse/Collapse.js
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Collapse_Collapse = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
collapse
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
className,
|
|
rootClassName,
|
|
style,
|
|
bordered = true,
|
|
ghost,
|
|
size: customizeSize,
|
|
expandIconPosition = 'start',
|
|
children,
|
|
expandIcon
|
|
} = props;
|
|
const mergedSize = (0,useSize/* default */.Z)(ctx => {
|
|
var _a;
|
|
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : ctx) !== null && _a !== void 0 ? _a : 'middle';
|
|
});
|
|
const prefixCls = getPrefixCls('collapse', customizePrefixCls);
|
|
const rootPrefixCls = getPrefixCls();
|
|
const [wrapSSR, hashId] = collapse_style(prefixCls);
|
|
// Warning if use legacy type `expandIconPosition`
|
|
false ? 0 : void 0;
|
|
// Align with logic position
|
|
const mergedExpandIconPosition = _react_17_0_2_react.useMemo(() => {
|
|
if (expandIconPosition === 'left') {
|
|
return 'start';
|
|
}
|
|
return expandIconPosition === 'right' ? 'end' : expandIconPosition;
|
|
}, [expandIconPosition]);
|
|
const renderExpandIcon = function () {
|
|
let panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
const icon = expandIcon ? expandIcon(panelProps) : /*#__PURE__*/_react_17_0_2_react.createElement(RightOutlined/* default */.Z, {
|
|
rotate: panelProps.isActive ? 90 : undefined
|
|
});
|
|
return (0,reactNode/* cloneElement */.Tm)(icon, () => ({
|
|
className: _classnames_2_5_1_classnames_default()(icon.props.className, `${prefixCls}-arrow`)
|
|
}));
|
|
};
|
|
const collapseClassName = _classnames_2_5_1_classnames_default()(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {
|
|
[`${prefixCls}-borderless`]: !bordered,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
[`${prefixCls}-ghost`]: !!ghost,
|
|
[`${prefixCls}-${mergedSize}`]: mergedSize !== 'middle'
|
|
}, collapse === null || collapse === void 0 ? void 0 : collapse.className, className, rootClassName, hashId);
|
|
const openMotion = Object.assign(Object.assign({}, (0,motion/* default */.Z)(rootPrefixCls)), {
|
|
motionAppear: false,
|
|
leavedClassName: `${prefixCls}-content-hidden`
|
|
});
|
|
const items = _react_17_0_2_react.useMemo(() => children ? (0,toArray/* default */.Z)(children).map((child, index) => {
|
|
var _a, _b;
|
|
if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.disabled) {
|
|
const key = (_b = child.key) !== null && _b !== void 0 ? _b : String(index);
|
|
const {
|
|
disabled,
|
|
collapsible
|
|
} = child.props;
|
|
const childProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(child.props, ['disabled'])), {
|
|
key,
|
|
collapsible: collapsible !== null && collapsible !== void 0 ? collapsible : disabled ? 'disabled' : undefined
|
|
});
|
|
return (0,reactNode/* cloneElement */.Tm)(child, childProps);
|
|
}
|
|
return child;
|
|
}) : null, [children]);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(_rc_collapse_3_7_3_rc_collapse_es, Object.assign({
|
|
ref: ref,
|
|
openMotion: openMotion
|
|
}, (0,omit/* default */.Z)(props, ['rootClassName']), {
|
|
expandIcon: renderExpandIcon,
|
|
prefixCls: prefixCls,
|
|
className: collapseClassName,
|
|
style: Object.assign(Object.assign({}, collapse === null || collapse === void 0 ? void 0 : collapse.style), style)
|
|
}), items));
|
|
});
|
|
if (false) {}
|
|
/* harmony default export */ var collapse_Collapse = (Object.assign(Collapse_Collapse, {
|
|
Panel: collapse_CollapsePanel
|
|
}));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/collapse/index.js
|
|
"use client";
|
|
|
|
|
|
/* harmony default export */ var es_collapse = (collapse_Collapse);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 78673:
|
|
/*!**********************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/switch/index.js + 2 modules ***!
|
|
\**********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ es_switch; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
var LoadingOutlined = __webpack_require__(58617);
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(14809);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__(4635);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
var slicedToArray = __webpack_require__(50298);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(62646);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/hooks/useMergedState.js
|
|
var useMergedState = __webpack_require__(18929);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/KeyCode.js
|
|
var KeyCode = __webpack_require__(10228);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-switch@4.1.0@rc-switch/es/index.js
|
|
|
|
|
|
|
|
|
|
var _excluded = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"];
|
|
|
|
|
|
|
|
|
|
var Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (_ref, ref) {
|
|
var _classNames;
|
|
var _ref$prefixCls = _ref.prefixCls,
|
|
prefixCls = _ref$prefixCls === void 0 ? 'rc-switch' : _ref$prefixCls,
|
|
className = _ref.className,
|
|
checked = _ref.checked,
|
|
defaultChecked = _ref.defaultChecked,
|
|
disabled = _ref.disabled,
|
|
loadingIcon = _ref.loadingIcon,
|
|
checkedChildren = _ref.checkedChildren,
|
|
unCheckedChildren = _ref.unCheckedChildren,
|
|
onClick = _ref.onClick,
|
|
onChange = _ref.onChange,
|
|
onKeyDown = _ref.onKeyDown,
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(_ref, _excluded);
|
|
var _useMergedState = (0,useMergedState/* default */.Z)(false, {
|
|
value: checked,
|
|
defaultValue: defaultChecked
|
|
}),
|
|
_useMergedState2 = (0,slicedToArray/* default */.Z)(_useMergedState, 2),
|
|
innerChecked = _useMergedState2[0],
|
|
setInnerChecked = _useMergedState2[1];
|
|
function triggerChange(newChecked, event) {
|
|
var mergedChecked = innerChecked;
|
|
if (!disabled) {
|
|
mergedChecked = newChecked;
|
|
setInnerChecked(mergedChecked);
|
|
onChange === null || onChange === void 0 ? void 0 : onChange(mergedChecked, event);
|
|
}
|
|
return mergedChecked;
|
|
}
|
|
function onInternalKeyDown(e) {
|
|
if (e.which === KeyCode/* default */.Z.LEFT) {
|
|
triggerChange(false, e);
|
|
} else if (e.which === KeyCode/* default */.Z.RIGHT) {
|
|
triggerChange(true, e);
|
|
}
|
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
}
|
|
function onInternalClick(e) {
|
|
var ret = triggerChange(!innerChecked, e);
|
|
// [Legacy] trigger onClick with value
|
|
onClick === null || onClick === void 0 ? void 0 : onClick(ret, e);
|
|
}
|
|
var switchClassName = _classnames_2_5_1_classnames_default()(prefixCls, className, (_classNames = {}, (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-checked"), innerChecked), (0,defineProperty/* default */.Z)(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("button", (0,esm_extends/* default */.Z)({}, restProps, {
|
|
type: "button",
|
|
role: "switch",
|
|
"aria-checked": innerChecked,
|
|
disabled: disabled,
|
|
className: switchClassName,
|
|
ref: ref,
|
|
onKeyDown: onInternalKeyDown,
|
|
onClick: onInternalClick
|
|
}), loadingIcon, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: "".concat(prefixCls, "-inner")
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: "".concat(prefixCls, "-inner-checked")
|
|
}, checkedChildren), /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: "".concat(prefixCls, "-inner-unchecked")
|
|
}, unCheckedChildren)));
|
|
});
|
|
Switch.displayName = 'Switch';
|
|
/* harmony default export */ var es = (Switch);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules
|
|
var wave = __webpack_require__(14088);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
|
|
var DisabledContext = __webpack_require__(1684);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
|
|
var useSize = __webpack_require__(19716);
|
|
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
|
|
var dist_module = __webpack_require__(64993);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/switch/style/index.js
|
|
|
|
|
|
|
|
const genSwitchSmallStyle = token => {
|
|
const {
|
|
componentCls,
|
|
trackHeightSM,
|
|
trackPadding,
|
|
trackMinWidthSM,
|
|
innerMinMarginSM,
|
|
innerMaxMarginSM,
|
|
handleSizeSM
|
|
} = token;
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
return {
|
|
[componentCls]: {
|
|
[`&${componentCls}-small`]: {
|
|
minWidth: trackMinWidthSM,
|
|
height: trackHeightSM,
|
|
lineHeight: `${trackHeightSM}px`,
|
|
[`${componentCls}-inner`]: {
|
|
paddingInlineStart: innerMaxMarginSM,
|
|
paddingInlineEnd: innerMinMarginSM,
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: `calc(-100% + ${handleSizeSM + trackPadding * 2}px - ${innerMaxMarginSM * 2}px)`,
|
|
marginInlineEnd: `calc(100% - ${handleSizeSM + trackPadding * 2}px + ${innerMaxMarginSM * 2}px)`
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginTop: -trackHeightSM,
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
}
|
|
},
|
|
[`${componentCls}-handle`]: {
|
|
width: handleSizeSM,
|
|
height: handleSizeSM
|
|
},
|
|
[`${componentCls}-loading-icon`]: {
|
|
top: (handleSizeSM - token.switchLoadingIconSize) / 2,
|
|
fontSize: token.switchLoadingIconSize
|
|
},
|
|
[`&${componentCls}-checked`]: {
|
|
[`${componentCls}-inner`]: {
|
|
paddingInlineStart: innerMinMarginSM,
|
|
paddingInlineEnd: innerMaxMarginSM,
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: `calc(100% - ${handleSizeSM + trackPadding * 2}px + ${innerMaxMarginSM * 2}px)`,
|
|
marginInlineEnd: `calc(-100% + ${handleSizeSM + trackPadding * 2}px - ${innerMaxMarginSM * 2}px)`
|
|
}
|
|
},
|
|
[`${componentCls}-handle`]: {
|
|
insetInlineStart: `calc(100% - ${handleSizeSM + trackPadding}px)`
|
|
}
|
|
},
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: token.marginXXS / 2,
|
|
marginInlineEnd: -token.marginXXS / 2
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: -token.marginXXS / 2,
|
|
marginInlineEnd: token.marginXXS / 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchLoadingStyle = token => {
|
|
const {
|
|
componentCls,
|
|
handleSize
|
|
} = token;
|
|
return {
|
|
[componentCls]: {
|
|
[`${componentCls}-loading-icon${token.iconCls}`]: {
|
|
position: 'relative',
|
|
top: (handleSize - token.fontSize) / 2,
|
|
color: token.switchLoadingIconColor,
|
|
verticalAlign: 'top'
|
|
},
|
|
[`&${componentCls}-checked ${componentCls}-loading-icon`]: {
|
|
color: token.switchColor
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchHandleStyle = token => {
|
|
const {
|
|
componentCls,
|
|
motion,
|
|
trackPadding,
|
|
handleBg,
|
|
handleShadow,
|
|
handleSize
|
|
} = token;
|
|
const switchHandleCls = `${componentCls}-handle`;
|
|
return {
|
|
[componentCls]: {
|
|
[switchHandleCls]: {
|
|
position: 'absolute',
|
|
top: trackPadding,
|
|
insetInlineStart: trackPadding,
|
|
width: handleSize,
|
|
height: handleSize,
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
'&::before': {
|
|
position: 'absolute',
|
|
top: 0,
|
|
insetInlineEnd: 0,
|
|
bottom: 0,
|
|
insetInlineStart: 0,
|
|
backgroundColor: handleBg,
|
|
borderRadius: handleSize / 2,
|
|
boxShadow: handleShadow,
|
|
transition: `all ${token.switchDuration} ease-in-out`,
|
|
content: '""'
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchHandleCls}`]: {
|
|
insetInlineStart: `calc(100% - ${handleSize + trackPadding}px)`
|
|
},
|
|
[`&:not(${componentCls}-disabled):active`]: motion ? {
|
|
[`${switchHandleCls}::before`]: {
|
|
insetInlineEnd: token.switchHandleActiveInset,
|
|
insetInlineStart: 0
|
|
},
|
|
[`&${componentCls}-checked ${switchHandleCls}::before`]: {
|
|
insetInlineEnd: 0,
|
|
insetInlineStart: token.switchHandleActiveInset
|
|
}
|
|
} : /* istanbul ignore next */
|
|
{}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchInnerStyle = token => {
|
|
const {
|
|
componentCls,
|
|
trackHeight,
|
|
trackPadding,
|
|
innerMinMargin,
|
|
innerMaxMargin,
|
|
handleSize
|
|
} = token;
|
|
const switchInnerCls = `${componentCls}-inner`;
|
|
return {
|
|
[componentCls]: {
|
|
[switchInnerCls]: {
|
|
display: 'block',
|
|
overflow: 'hidden',
|
|
borderRadius: 100,
|
|
height: '100%',
|
|
paddingInlineStart: innerMaxMargin,
|
|
paddingInlineEnd: innerMinMargin,
|
|
transition: `padding-inline-start ${token.switchDuration} ease-in-out, padding-inline-end ${token.switchDuration} ease-in-out`,
|
|
[`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
|
|
display: 'block',
|
|
color: token.colorTextLightSolid,
|
|
fontSize: token.fontSizeSM,
|
|
transition: `margin-inline-start ${token.switchDuration} ease-in-out, margin-inline-end ${token.switchDuration} ease-in-out`,
|
|
pointerEvents: 'none'
|
|
},
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: `calc(-100% + ${handleSize + trackPadding * 2}px - ${innerMaxMargin * 2}px)`,
|
|
marginInlineEnd: `calc(100% - ${handleSize + trackPadding * 2}px + ${innerMaxMargin * 2}px)`
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginTop: -trackHeight,
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
paddingInlineStart: innerMinMargin,
|
|
paddingInlineEnd: innerMaxMargin,
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: 0,
|
|
marginInlineEnd: 0
|
|
},
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: `calc(100% - ${handleSize + trackPadding * 2}px + ${innerMaxMargin * 2}px)`,
|
|
marginInlineEnd: `calc(-100% + ${handleSize + trackPadding * 2}px - ${innerMaxMargin * 2}px)`
|
|
}
|
|
},
|
|
[`&:not(${componentCls}-disabled):active`]: {
|
|
[`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-unchecked`]: {
|
|
marginInlineStart: trackPadding * 2,
|
|
marginInlineEnd: -trackPadding * 2
|
|
}
|
|
},
|
|
[`&${componentCls}-checked ${switchInnerCls}`]: {
|
|
[`${switchInnerCls}-checked`]: {
|
|
marginInlineStart: -trackPadding * 2,
|
|
marginInlineEnd: trackPadding * 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const genSwitchStyle = token => {
|
|
const {
|
|
componentCls,
|
|
trackHeight,
|
|
trackMinWidth
|
|
} = token;
|
|
return {
|
|
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
position: 'relative',
|
|
display: 'inline-block',
|
|
boxSizing: 'border-box',
|
|
minWidth: trackMinWidth,
|
|
height: trackHeight,
|
|
lineHeight: `${trackHeight}px`,
|
|
verticalAlign: 'middle',
|
|
background: token.colorTextQuaternary,
|
|
border: '0',
|
|
borderRadius: 100,
|
|
cursor: 'pointer',
|
|
transition: `all ${token.motionDurationMid}`,
|
|
userSelect: 'none',
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
background: token.colorTextTertiary
|
|
}
|
|
}), (0,style/* genFocusStyle */.Qy)(token)), {
|
|
[`&${componentCls}-checked`]: {
|
|
background: token.switchColor,
|
|
[`&:hover:not(${componentCls}-disabled)`]: {
|
|
background: token.colorPrimaryHover
|
|
}
|
|
},
|
|
[`&${componentCls}-loading, &${componentCls}-disabled`]: {
|
|
cursor: 'not-allowed',
|
|
opacity: token.switchDisabledOpacity,
|
|
'*': {
|
|
boxShadow: 'none',
|
|
cursor: 'not-allowed'
|
|
}
|
|
},
|
|
// rtl style
|
|
[`&${componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
}
|
|
})
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var switch_style = ((0,genComponentStyleHook/* default */.Z)('Switch', token => {
|
|
const switchToken = (0,statistic/* merge */.TS)(token, {
|
|
switchDuration: token.motionDurationMid,
|
|
switchColor: token.colorPrimary,
|
|
switchDisabledOpacity: token.opacityLoading,
|
|
switchLoadingIconSize: token.fontSizeIcon * 0.75,
|
|
switchLoadingIconColor: `rgba(0, 0, 0, ${token.opacityLoading})`,
|
|
switchHandleActiveInset: '-30%'
|
|
});
|
|
return [genSwitchStyle(switchToken),
|
|
// inner style
|
|
genSwitchInnerStyle(switchToken),
|
|
// handle style
|
|
genSwitchHandleStyle(switchToken),
|
|
// loading style
|
|
genSwitchLoadingStyle(switchToken),
|
|
// small style
|
|
genSwitchSmallStyle(switchToken)];
|
|
}, token => {
|
|
const {
|
|
fontSize,
|
|
lineHeight,
|
|
controlHeight,
|
|
colorWhite
|
|
} = token;
|
|
const height = fontSize * lineHeight;
|
|
const heightSM = controlHeight / 2;
|
|
const padding = 2; // Fixed value
|
|
const handleSize = height - padding * 2;
|
|
const handleSizeSM = heightSM - padding * 2;
|
|
return {
|
|
trackHeight: height,
|
|
trackHeightSM: heightSM,
|
|
trackMinWidth: handleSize * 2 + padding * 4,
|
|
trackMinWidthSM: handleSizeSM * 2 + padding * 2,
|
|
trackPadding: padding,
|
|
handleBg: colorWhite,
|
|
handleSize,
|
|
handleSizeSM,
|
|
handleShadow: `0 2px 4px 0 ${new dist_module/* TinyColor */.C('#00230b').setAlpha(0.2).toRgbString()}`,
|
|
innerMinMargin: handleSize / 2,
|
|
innerMaxMargin: handleSize + padding + padding * 2,
|
|
innerMinMarginSM: handleSizeSM / 2,
|
|
innerMaxMarginSM: handleSizeSM + padding + padding * 2
|
|
};
|
|
}));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/switch/index.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const switch_Switch = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
size: customizeSize,
|
|
disabled: customDisabled,
|
|
loading,
|
|
className,
|
|
rootClassName,
|
|
style
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style"]);
|
|
false ? 0 : void 0;
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
switch: SWITCH
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
// ===================== Disabled =====================
|
|
const disabled = _react_17_0_2_react.useContext(DisabledContext/* default */.Z);
|
|
const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;
|
|
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
|
const loadingIcon = /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
className: `${prefixCls}-handle`
|
|
}, loading && /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, {
|
|
className: `${prefixCls}-loading-icon`
|
|
}));
|
|
// Style
|
|
const [wrapSSR, hashId] = switch_style(prefixCls);
|
|
const mergedSize = (0,useSize/* default */.Z)(customizeSize);
|
|
const classes = _classnames_2_5_1_classnames_default()(SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.className, {
|
|
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
[`${prefixCls}-loading`]: loading,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, className, rootClassName, hashId);
|
|
const mergedStyle = Object.assign(Object.assign({}, SWITCH === null || SWITCH === void 0 ? void 0 : SWITCH.style), style);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, {
|
|
component: "Switch"
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(es, Object.assign({}, restProps, {
|
|
prefixCls: prefixCls,
|
|
className: classes,
|
|
style: mergedStyle,
|
|
disabled: mergedDisabled,
|
|
ref: ref,
|
|
loadingIcon: loadingIcon
|
|
}))));
|
|
});
|
|
switch_Switch.__ANT_SWITCH = true;
|
|
if (false) {}
|
|
/* harmony default export */ var es_switch = (switch_Switch);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 12563:
|
|
/*!*******************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/tag/index.js + 5 modules ***!
|
|
\*******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ tag; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
|
|
var CloseOutlined = __webpack_require__(99267);
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/colors.js
|
|
var colors = __webpack_require__(36785);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useClosable.js
|
|
var useClosable = __webpack_require__(47729);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules
|
|
var wave = __webpack_require__(14088);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
|
|
var context = __webpack_require__(36355);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
|
|
var style = __webpack_require__(17313);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
|
|
var statistic = __webpack_require__(37613);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
|
|
var genComponentStyleHook = __webpack_require__(83116);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tag/style/index.js
|
|
|
|
|
|
// ============================== Styles ==============================
|
|
const genBaseStyle = token => {
|
|
const {
|
|
paddingXXS,
|
|
lineWidth,
|
|
tagPaddingHorizontal,
|
|
componentCls
|
|
} = token;
|
|
const paddingInline = tagPaddingHorizontal - lineWidth;
|
|
const iconMarginInline = paddingXXS - lineWidth;
|
|
return {
|
|
// Result
|
|
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
|
|
display: 'inline-block',
|
|
height: 'auto',
|
|
marginInlineEnd: token.marginXS,
|
|
paddingInline,
|
|
fontSize: token.tagFontSize,
|
|
lineHeight: token.tagLineHeight,
|
|
whiteSpace: 'nowrap',
|
|
background: token.defaultBg,
|
|
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
|
|
borderRadius: token.borderRadiusSM,
|
|
opacity: 1,
|
|
transition: `all ${token.motionDurationMid}`,
|
|
textAlign: 'start',
|
|
position: 'relative',
|
|
// RTL
|
|
[`&${componentCls}-rtl`]: {
|
|
direction: 'rtl'
|
|
},
|
|
'&, a, a:hover': {
|
|
color: token.defaultColor
|
|
},
|
|
[`${componentCls}-close-icon`]: {
|
|
marginInlineStart: iconMarginInline,
|
|
color: token.colorTextDescription,
|
|
fontSize: token.tagIconSize,
|
|
cursor: 'pointer',
|
|
transition: `all ${token.motionDurationMid}`,
|
|
'&:hover': {
|
|
color: token.colorTextHeading
|
|
}
|
|
},
|
|
[`&${componentCls}-has-color`]: {
|
|
borderColor: 'transparent',
|
|
[`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {
|
|
color: token.colorTextLightSolid
|
|
}
|
|
},
|
|
[`&-checkable`]: {
|
|
backgroundColor: 'transparent',
|
|
borderColor: 'transparent',
|
|
cursor: 'pointer',
|
|
[`&:not(${componentCls}-checkable-checked):hover`]: {
|
|
color: token.colorPrimary,
|
|
backgroundColor: token.colorFillSecondary
|
|
},
|
|
'&:active, &-checked': {
|
|
color: token.colorTextLightSolid
|
|
},
|
|
'&-checked': {
|
|
backgroundColor: token.colorPrimary,
|
|
'&:hover': {
|
|
backgroundColor: token.colorPrimaryHover
|
|
}
|
|
},
|
|
'&:active': {
|
|
backgroundColor: token.colorPrimaryActive
|
|
}
|
|
},
|
|
[`&-hidden`]: {
|
|
display: 'none'
|
|
},
|
|
// To ensure that a space will be placed between character and `Icon`.
|
|
[`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {
|
|
marginInlineStart: paddingInline
|
|
}
|
|
}),
|
|
[`${componentCls}-borderless`]: {
|
|
borderColor: 'transparent',
|
|
background: token.tagBorderlessBg
|
|
}
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
const prepareToken = token => {
|
|
const {
|
|
lineWidth,
|
|
fontSizeIcon
|
|
} = token;
|
|
const tagFontSize = token.fontSizeSM;
|
|
const tagLineHeight = `${token.lineHeightSM * tagFontSize}px`;
|
|
const tagToken = (0,statistic/* merge */.TS)(token, {
|
|
tagFontSize,
|
|
tagLineHeight,
|
|
tagIconSize: fontSizeIcon - 2 * lineWidth,
|
|
tagPaddingHorizontal: 8,
|
|
tagBorderlessBg: token.colorFillTertiary
|
|
});
|
|
return tagToken;
|
|
};
|
|
const prepareCommonToken = token => ({
|
|
defaultBg: token.colorFillQuaternary,
|
|
defaultColor: token.colorText
|
|
});
|
|
/* harmony default export */ var tag_style = ((0,genComponentStyleHook/* default */.Z)('Tag', token => {
|
|
const tagToken = prepareToken(token);
|
|
return genBaseStyle(tagToken);
|
|
}, prepareCommonToken));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tag/CheckableTag.js
|
|
"use client";
|
|
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
const CheckableTag = props => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
style,
|
|
className,
|
|
checked,
|
|
onChange,
|
|
onClick
|
|
} = props,
|
|
restProps = __rest(props, ["prefixCls", "style", "className", "checked", "onChange", "onClick"]);
|
|
const {
|
|
getPrefixCls,
|
|
tag
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const handleClick = e => {
|
|
onChange === null || onChange === void 0 ? void 0 : onChange(!checked);
|
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
};
|
|
const prefixCls = getPrefixCls('tag', customizePrefixCls);
|
|
// Style
|
|
const [wrapSSR, hashId] = tag_style(prefixCls);
|
|
const cls = _classnames_2_5_1_classnames_default()(prefixCls, `${prefixCls}-checkable`, {
|
|
[`${prefixCls}-checkable-checked`]: checked
|
|
}, tag === null || tag === void 0 ? void 0 : tag.className, className, hashId);
|
|
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, restProps, {
|
|
style: Object.assign(Object.assign({}, style), tag === null || tag === void 0 ? void 0 : tag.style),
|
|
className: cls,
|
|
onClick: handleClick
|
|
})));
|
|
};
|
|
/* harmony default export */ var tag_CheckableTag = (CheckableTag);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genPresetColor.js
|
|
var genPresetColor = __webpack_require__(45157);
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tag/style/presetCmp.js
|
|
// Style as status component
|
|
|
|
|
|
// ============================== Preset ==============================
|
|
const genPresetStyle = token => (0,genPresetColor/* default */.Z)(token, (colorKey, _ref) => {
|
|
let {
|
|
textColor,
|
|
lightBorderColor,
|
|
lightColor,
|
|
darkColor
|
|
} = _ref;
|
|
return {
|
|
[`${token.componentCls}-${colorKey}`]: {
|
|
color: textColor,
|
|
background: lightColor,
|
|
borderColor: lightBorderColor,
|
|
// Inverse color
|
|
'&-inverse': {
|
|
color: token.colorTextLightSolid,
|
|
background: darkColor,
|
|
borderColor: darkColor
|
|
},
|
|
[`&${token.componentCls}-borderless`]: {
|
|
borderColor: 'transparent'
|
|
}
|
|
}
|
|
};
|
|
});
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var presetCmp = ((0,genComponentStyleHook/* genSubStyleComponent */.b)(['Tag', 'preset'], token => {
|
|
const tagToken = prepareToken(token);
|
|
return genPresetStyle(tagToken);
|
|
}, prepareCommonToken));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/capitalize.js
|
|
function capitalize(str) {
|
|
if (typeof str !== 'string') {
|
|
return str;
|
|
}
|
|
const ret = str.charAt(0).toUpperCase() + str.slice(1);
|
|
return ret;
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tag/style/statusCmp.js
|
|
|
|
|
|
|
|
const genTagStatusStyle = (token, status, cssVariableType) => {
|
|
const capitalizedCssVariableType = capitalize(cssVariableType);
|
|
return {
|
|
[`${token.componentCls}-${status}`]: {
|
|
color: token[`color${cssVariableType}`],
|
|
background: token[`color${capitalizedCssVariableType}Bg`],
|
|
borderColor: token[`color${capitalizedCssVariableType}Border`],
|
|
[`&${token.componentCls}-borderless`]: {
|
|
borderColor: 'transparent'
|
|
}
|
|
}
|
|
};
|
|
};
|
|
// ============================== Export ==============================
|
|
/* harmony default export */ var statusCmp = ((0,genComponentStyleHook/* genSubStyleComponent */.b)(['Tag', 'status'], token => {
|
|
const tagToken = prepareToken(token);
|
|
return [genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];
|
|
}, prepareCommonToken));
|
|
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/tag/index.js
|
|
"use client";
|
|
|
|
var tag_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const InternalTag = (tagProps, ref) => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
className,
|
|
rootClassName,
|
|
style,
|
|
children,
|
|
icon,
|
|
color,
|
|
onClose,
|
|
closeIcon,
|
|
closable,
|
|
bordered = true
|
|
} = tagProps,
|
|
props = tag_rest(tagProps, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "closeIcon", "closable", "bordered"]);
|
|
const {
|
|
getPrefixCls,
|
|
direction,
|
|
tag
|
|
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
|
|
const [visible, setVisible] = _react_17_0_2_react.useState(true);
|
|
// Warning for deprecated usage
|
|
if (false) {}
|
|
_react_17_0_2_react.useEffect(() => {
|
|
if ('visible' in props) {
|
|
setVisible(props.visible);
|
|
}
|
|
}, [props.visible]);
|
|
const isPreset = (0,colors/* isPresetColor */.o2)(color);
|
|
const isStatus = (0,colors/* isPresetStatusColor */.yT)(color);
|
|
const isInternalColor = isPreset || isStatus;
|
|
const tagStyle = Object.assign(Object.assign({
|
|
backgroundColor: color && !isInternalColor ? color : undefined
|
|
}, tag === null || tag === void 0 ? void 0 : tag.style), style);
|
|
const prefixCls = getPrefixCls('tag', customizePrefixCls);
|
|
// Style
|
|
const [wrapSSR, hashId] = tag_style(prefixCls);
|
|
const tagClassName = _classnames_2_5_1_classnames_default()(prefixCls, tag === null || tag === void 0 ? void 0 : tag.className, {
|
|
[`${prefixCls}-${color}`]: isInternalColor,
|
|
[`${prefixCls}-has-color`]: color && !isInternalColor,
|
|
[`${prefixCls}-hidden`]: !visible,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
[`${prefixCls}-borderless`]: !bordered
|
|
}, className, rootClassName, hashId);
|
|
const handleCloseClick = e => {
|
|
e.stopPropagation();
|
|
onClose === null || onClose === void 0 ? void 0 : onClose(e);
|
|
if (e.defaultPrevented) {
|
|
return;
|
|
}
|
|
setVisible(false);
|
|
};
|
|
const [, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, iconNode => iconNode === null ? /*#__PURE__*/_react_17_0_2_react.createElement(CloseOutlined/* default */.Z, {
|
|
className: `${prefixCls}-close-icon`,
|
|
onClick: handleCloseClick
|
|
}) : /*#__PURE__*/_react_17_0_2_react.createElement("span", {
|
|
className: `${prefixCls}-close-icon`,
|
|
onClick: handleCloseClick
|
|
}, iconNode), null, false);
|
|
const isNeedWave = typeof props.onClick === 'function' || children && children.type === 'a';
|
|
const iconNode = icon || null;
|
|
const kids = iconNode ? /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, iconNode, children && /*#__PURE__*/_react_17_0_2_react.createElement("span", null, children)) : children;
|
|
const tagNode = /*#__PURE__*/_react_17_0_2_react.createElement("span", Object.assign({}, props, {
|
|
ref: ref,
|
|
className: tagClassName,
|
|
style: tagStyle
|
|
}), kids, mergedCloseIcon, isPreset && /*#__PURE__*/_react_17_0_2_react.createElement(presetCmp, {
|
|
key: "preset",
|
|
prefixCls: prefixCls
|
|
}), isStatus && /*#__PURE__*/_react_17_0_2_react.createElement(statusCmp, {
|
|
key: "status",
|
|
prefixCls: prefixCls
|
|
}));
|
|
return wrapSSR(isNeedWave ? /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, {
|
|
component: "Tag"
|
|
}, tagNode) : tagNode);
|
|
};
|
|
const Tag = /*#__PURE__*/_react_17_0_2_react.forwardRef(InternalTag);
|
|
if (false) {}
|
|
Tag.CheckableTag = tag_CheckableTag;
|
|
/* harmony default export */ var tag = (Tag);
|
|
|
|
/***/ })
|
|
|
|
}]); |