@para-ui/core 2.1.9 → 2.1.10

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.
@@ -3,8 +3,28 @@
3
3
  * @date 2022/3/7 4:12 PM
4
4
  * @description 折叠面板
5
5
  */
6
- import { FunctionComponent } from 'react';
6
+ import React, { FunctionComponent } from 'react';
7
+ export declare type CollapsibleType = 'header' | 'disabled';
7
8
  export interface CollapsePanelProps {
9
+ /** className */
10
+ className?: string;
11
+ /** 样式 */
12
+ style?: React.CSSProperties;
13
+ /** 对应 activeKey */
14
+ key: string | number;
15
+ /** 面板头内容 */
16
+ header: React.ReactNode;
17
+ /** @deprecated Use `collapsible="disabled"` instead */
18
+ disabled?: boolean;
19
+ /** 是否展示当前面板上的箭头 */
20
+ showArrow?: boolean;
21
+ /** 被隐藏时是否渲染 DOM 结构 */
22
+ forceRender?: boolean;
23
+ id?: string;
24
+ /** 自定义渲染每个面板右上角的内容 */
25
+ extra?: React.ReactNode;
26
+ /** 是否可折叠或指定可折叠触发区域 */
27
+ collapsible?: CollapsibleType;
8
28
  }
9
29
  export declare const CollapsePanelProps: FunctionComponent<CollapsePanelProps>;
10
30
  export default CollapsePanelProps;
@@ -3,10 +3,54 @@
3
3
  * @date 2022/3/7 4:03 PM
4
4
  * @description 折叠面板
5
5
  */
6
- import { FunctionComponent } from 'react';
6
+ import React from 'react';
7
+ import CollapsePanel, { CollapsibleType } from './collapsePanel';
8
+ import './index.scss';
9
+ export declare type ExpandIconPosition = 'left' | 'right' | undefined;
7
10
  export interface CollapseProps {
11
+ /** className */
12
+ className?: string;
13
+ /** 样式 */
14
+ style?: React.CSSProperties;
15
+ /** 初始化选中面板的 key */
16
+ defaultActiveKey?: Array<string | number> | string | number;
17
+ /** 当前激活 tab 面板的 key */
18
+ activeKey?: Array<string | number> | string | number;
8
19
  /** 手风琴模式 */
9
20
  accordion?: boolean;
21
+ /** 所有子面板是否可折叠或指定可折叠触发区域 */
22
+ collapsible?: CollapsibleType;
23
+ /** 销毁折叠隐藏的面板 */
24
+ destroyInactivePanel?: boolean;
25
+ /** 自定义切换图标 */
26
+ expandIcon?: (panelProps: PanelProps) => React.ReactNode;
27
+ /** 设置图标位置 */
28
+ expandIconPosition?: ExpandIconPosition;
29
+ /** onChange */
30
+ onChange?: (key: string | string[]) => void;
10
31
  }
11
- export declare const Collapse: FunctionComponent<CollapseProps>;
32
+ interface PanelProps {
33
+ /** 是否展开 */
34
+ isActive?: boolean;
35
+ /** 面板头内容 */
36
+ header?: React.ReactNode;
37
+ /** className */
38
+ className?: string;
39
+ /** style */
40
+ style?: React.CSSProperties;
41
+ /** 是否展示当前面板上的箭头 */
42
+ showArrow?: boolean;
43
+ /** 被隐藏时是否渲染 DOM 结构 */
44
+ forceRender?: boolean;
45
+ /** @deprecated Use `collapsible="disabled"` instead */
46
+ disabled?: boolean;
47
+ /** 自定义渲染每个面板右上角的内容 */
48
+ extra?: React.ReactNode;
49
+ /** 是否可折叠或指定可折叠触发区域 */
50
+ collapsible?: CollapsibleType;
51
+ }
52
+ interface CollapseInterface extends React.FC<CollapseProps> {
53
+ Panel: typeof CollapsePanel;
54
+ }
55
+ export declare const Collapse: CollapseInterface;
12
56
  export default Collapse;
package/Collapse/index.js CHANGED
@@ -1,10 +1,22 @@
1
- !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.ParaUI=r(require("react")):e.ParaUI=r(e.react)}(self,(function(e){return function(){"use strict";var r={7418:function(e){
1
+ !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("rc-collapse")):"function"==typeof define&&define.amd?define(["react","rc-collapse"],r):"object"==typeof exports?exports.ParaUI=r(require("react"),require("rc-collapse")):e.ParaUI=r(e.react,e["rc-collapse"])}(self,(function(e,r){return function(){var t={4674:function(e,r,t){var n;self,e.exports=(n=t(8156),function(){var e={466:function(e,r,t){(r=t(3645)(!1)).push([e.id,".paraui-icon{width:1em;height:1em;fill:currentColor;display:inline-block;user-select:none;flex-shrink:0}.paraui-icon-primary{color:#3666d6}.paraui-icon-secondary{color:#3666d6}.paraui-icon-thirdary{color:#3666d6}.paraui-icon-small{font-size:16px}.paraui-icon-medium{font-size:18px}.paraui-icon-large{font-size:20px}\n",""]),e.exports=r},3645:function(e){"use strict";e.exports=function(e){var r=[];return r.toString=function(){return this.map((function(r){var t=function(e,r){var t,n,a,o=e[1]||"",i=e[3];if(!i)return o;if(r&&"function"==typeof btoa){var c=(t=i,n=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(a," */")),l=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[o].concat(l).concat([c]).join("\n")}return[o].join("\n")}(r,e);return r[2]?"@media ".concat(r[2]," {").concat(t,"}"):t})).join("")},r.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&a[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),r.push(l))}},r}},7418:function(e){"use strict";
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
5
5
  @license MIT
6
- */
7
- var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,f){for(var i,c,a=o(e),u=1;u<arguments.length;u++){for(var p in i=Object(arguments[u]))t.call(i,p)&&(a[p]=i[p]);if(r){c=r(i);for(var l=0;l<c.length;l++)n.call(i,c[l])&&(a[c[l]]=i[c[l]])}}return a}},5251:function(e,r,t){
6
+ */var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,c,l=a(e),s=1;s<arguments.length;s++){for(var u in i=Object(arguments[s]))t.call(i,u)&&(l[u]=i[u]);if(r){c=r(i);for(var p=0;p<c.length;p++)n.call(i,c[p])&&(l[c[p]]=i[c[p]])}}return l}},5251:function(e,r,t){"use strict";
7
+ /** @license React v17.0.2
8
+ * react-jsx-runtime.production.min.js
9
+ *
10
+ * Copyright (c) Facebook, Inc. and its affiliates.
11
+ *
12
+ * This source code is licensed under the MIT license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */t(7418);var n=t(8156),a=60103;if(r.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;a=o("react.element"),r.Fragment=o("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var n,o={},s=null,u=null;for(n in void 0!==t&&(s=""+t),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!l.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:a,type:e,key:s,ref:u,props:o,_owner:i.current}}r.jsx=s},5893:function(e,r,t){"use strict";e.exports=t(5251)},7856:function(e,r,t){var n=t(3379),a=t(466);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]),n(a,{insert:"head",singleton:!1}),e.exports=a.locals||{}},3379:function(e,r,t){"use strict";var n,a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),i=[];function c(e){for(var r=-1,t=0;t<i.length;t++)if(i[t].identifier===e){r=t;break}return r}function l(e,r){for(var t={},n=[],a=0;a<e.length;a++){var o=e[a],l=r.base?o[0]+r.base:o[0],s=t[l]||0,u="".concat(l," ").concat(s);t[l]=s+1;var p=c(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==p?(i[p].references++,i[p].updater(f)):i.push({identifier:u,updater:m(f,r),references:1}),n.push(u)}return n}function s(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var a=t.nc;a&&(n.nonce=a)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(r)}return r}var u,p=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var a=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=p(r,a);else{var o=document.createTextNode(a),i=e.childNodes;i[r]&&e.removeChild(i[r]),i.length?e.insertBefore(o,i[r]):e.appendChild(o)}}function d(e,r,t){var n=t.css,a=t.media,o=t.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,h=0;function m(e,r){var t,n,a;if(r.singleton){var o=h++;t=v||(v=s(r)),n=f.bind(null,t,o,!1),a=f.bind(null,t,o,!0)}else t=s(r),n=d.bind(null,t,r),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else a()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=a());var t=l(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var a=c(t[n]);i[a].references--}for(var o=l(e,r),s=0;s<t.length;s++){var u=c(t[s]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}t=o}}}},4939:function(e,r,t){"use strict";var n=t(5893),a=(t(7856),function(){return a=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},a.apply(this,arguments)}),o=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]])}return t};r.default=function(e){var r,t=e.path,i=e.className,c=e.color,l=void 0===c?"primary":c,s=e.size,u=void 0===s?"small":s,p=e.dataName,f=void 0===p?"":p,d=o(e,["path","className","color","size","dataName"]);return(0,n.jsx)("svg",a({className:(r="paraui-icon",r+=" svg-icon",i&&(r+=" "+i),l&&(r+=" paraui-icon-"+l),u&&(r+=" paraui-icon-"+u),r),viewBox:"0 0 1024 1024","data-name":f},d,{children:t}),void 0)}},8156:function(e){"use strict";e.exports=n}},r={};function t(n){var a=r[n];if(void 0!==a)return a.exports;var o=r[n]={id:n,exports:{}};return e[n](o,o.exports,t),o.exports}t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){"use strict";t.r(a),t.d(a,{Right:function(){return o}});var e=t(5893),r=t(4939),n=function(){return n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},n.apply(this,arguments)},o=function(t){return(0,e.jsx)(r.default,n({dataName:"Right",path:(0,e.jsx)(e.Fragment,{children:(0,e.jsx)("path",{d:"M318.506667 813.696a42.368 42.368 0 0 1 12.501333-30.165333l271.488-271.573334-271.488-271.488a42.666667 42.666667 0 1 1 60.330667-60.330666l301.653333 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.653333 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"},void 0)},void 0)},t),void 0)};a.default=o}(),a}())},8224:function(e,r,t){(r=t(3645)(!1)).push([e.id,".paraui-collapse{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;background-color:white;border-bottom:1px solid rgba(171,176,185,0.4)}.paraui-collapse .paraui-collapse-motion-collapse{overflow:hidden;transition:height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important}.paraui-collapse>.paraui-collapse-item{border-top:1px solid rgba(171,176,185,0.4)}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-header{display:flex;align-items:center;padding:16px;color:#2e3743;cursor:pointer;font-weight:700}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-header>.paraui-collapse-svg-box{line-height:0;margin-right:16px}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-header>.paraui-collapse-svg-box svg{color:#2e3743}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-header>.paraui-collapse-svg-box .paraui-collapse-expand-svg{transition:all 0.3s, visibility 0s;color:#2e3743}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-header>.paraui-collapse-extra{line-height:0;margin-left:auto}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-header>.paraui-collapse-extra svg{color:#2e3743}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-content.paraui-collapse-content-hidden{display:none}.paraui-collapse>.paraui-collapse-item>.paraui-collapse-content>.paraui-collapse-content-box{padding:0 16px 16px;color:#2e3743;font-size:14px}.paraui-collapse>.paraui-collapse-item.paraui-collapse-item-active>.paraui-collapse-header>.paraui-collapse-svg-box .paraui-collapse-expand-svg{transform:rotate(90deg)}.paraui-collapse.paraui-collapse-svg-right>.paraui-collapse-item>.paraui-collapse-header{padding-right:40px;position:relative}.paraui-collapse.paraui-collapse-svg-right>.paraui-collapse-item>.paraui-collapse-header>.paraui-collapse-svg-box{position:absolute;right:12px;top:17px;margin-right:0}.paraui-collapse>.paraui-collapse-item-disabled>.paraui-collapse-header{color:#2e3743;cursor:not-allowed;background-color:rgba(171,176,185,0.12)}.paraui-collapse>.paraui-collapse-item-disabled>.paraui-collapse-header>.paraui-collapse-svg-box svg{color:#2e3743}.paraui-collapse>.paraui-collapse-item-disabled>.paraui-collapse-header>.paraui-collapse-svg-box .paraui-collapse-expand-svg{color:#2e3743}.paraui-collapse>.paraui-collapse-item-disabled>.paraui-collapse-header>.paraui-collapse-extra svg{color:#2e3743}\n",""]),e.exports=r},3645:function(e){"use strict";e.exports=function(e){var r=[];return r.toString=function(){return this.map((function(r){var t=function(e,r){var t=e[1]||"",n=e[3];if(!n)return t;if(r&&"function"==typeof btoa){var a=(i=n,c=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(o).concat([a]).join("\n")}var i,c,l;return[t].join("\n")}(r,e);return r[2]?"@media ".concat(r[2]," {").concat(t,"}"):t})).join("")},r.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&a[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),r.push(l))}},r}},7418:function(e){"use strict";
15
+ /*
16
+ object-assign
17
+ (c) Sindre Sorhus
18
+ @license MIT
19
+ */var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,c,l=a(e),s=1;s<arguments.length;s++){for(var u in i=Object(arguments[s]))t.call(i,u)&&(l[u]=i[u]);if(r){c=r(i);for(var p=0;p<c.length;p++)n.call(i,c[p])&&(l[c[p]]=i[c[p]])}}return l}},5251:function(e,r,t){"use strict";
8
20
  /** @license React v17.0.2
9
21
  * react-jsx-runtime.production.min.js
10
22
  *
@@ -13,4 +25,4 @@ var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.pr
13
25
  * This source code is licensed under the MIT license found in the
14
26
  * LICENSE file in the root directory of this source tree.
15
27
  */
16
- t(7418);var n=t(8156),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),f("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,a={key:!0,ref:!0,__self:!0,__source:!0};function u(e,r,t){var n,f={},u=null,p=null;for(n in void 0!==t&&(u=""+t),void 0!==r.key&&(u=""+r.key),void 0!==r.ref&&(p=r.ref),r)c.call(r,n)&&!a.hasOwnProperty(n)&&(f[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===f[n]&&(f[n]=r[n]);return{$$typeof:o,type:e,key:u,ref:p,props:f,_owner:i.current}}r.jsx=u},5893:function(e,r,t){e.exports=t(5251)},8156:function(r){r.exports=e}},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var f=t[e]={exports:{}};return r[e](f,f.exports,n),f.exports}n.d=function(e,r){for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){n.r(o),n.d(o,{Collapse:function(){return r}});var e=n(5893),r=function(r){return(0,e.jsx)("div",{})};o.default=r}(),o}()}));
28
+ t(7418);var n=t(8156),a=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;a=o("react.element"),o("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,r,t){var n,o={},s=null,u=null;for(n in void 0!==t&&(s=""+t),void 0!==r.key&&(s=""+r.key),void 0!==r.ref&&(u=r.ref),r)c.call(r,n)&&!l.hasOwnProperty(n)&&(o[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===o[n]&&(o[n]=r[n]);return{$$typeof:a,type:e,key:s,ref:u,props:o,_owner:i.current}}r.jsx=s},5893:function(e,r,t){"use strict";e.exports=t(5251)},5543:function(e,r,t){var n=t(3379),a=t(8224);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var o={insert:("body","body"),singleton:!1};n(a,o);e.exports=a.locals||{}},3379:function(e,r,t){"use strict";var n,a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(r){if(void 0===e[r]){var t=document.querySelector(r);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[r]=t}return e[r]}}(),i=[];function c(e){for(var r=-1,t=0;t<i.length;t++)if(i[t].identifier===e){r=t;break}return r}function l(e,r){for(var t={},n=[],a=0;a<e.length;a++){var o=e[a],l=r.base?o[0]+r.base:o[0],s=t[l]||0,u="".concat(l," ").concat(s);t[l]=s+1;var p=c(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==p?(i[p].references++,i[p].updater(f)):i.push({identifier:u,updater:m(f,r),references:1}),n.push(u)}return n}function s(e){var r=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var a=t.nc;a&&(n.nonce=a)}if(Object.keys(n).forEach((function(e){r.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(r);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(r)}return r}var u,p=(u=[],function(e,r){return u[e]=r,u.filter(Boolean).join("\n")});function f(e,r,t,n){var a=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=p(r,a);else{var o=document.createTextNode(a),i=e.childNodes;i[r]&&e.removeChild(i[r]),i.length?e.insertBefore(o,i[r]):e.appendChild(o)}}function d(e,r,t){var n=t.css,a=t.media,o=t.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,h=0;function m(e,r){var t,n,a;if(r.singleton){var o=h++;t=v||(v=s(r)),n=f.bind(null,t,o,!1),a=f.bind(null,t,o,!0)}else t=s(r),n=d.bind(null,t,r),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;n(e=r)}else a()}}e.exports=function(e,r){(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=a());var t=l(e=e||[],r);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var a=c(t[n]);i[a].references--}for(var o=l(e,r),s=0;s<t.length;s++){var u=c(t[s]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}t=o}}}},3749:function(e){"use strict";e.exports=r},8156:function(r){"use strict";r.exports=e}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,exports:{}};return t[e](o,o.exports,a),o.exports}a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,{a:r}),r},a.d=function(e,r){for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){"use strict";a.r(o),a.d(o,{Collapse:function(){return y},default:function(){return g}});var e=a(5893),r=a(3749),t=a.n(r),n=function(){return n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},n.apply(this,arguments)},i=function(r){var a,o=r.className,i=void 0===o?"":o,c=r.showArrow,l=void 0===c||c;return(0,e.jsx)(t().Panel,n({},r,{className:(a="",i&&(a+=i),l||(a+=" paraui-collapse-panel-no-arrow"),a),prefixCls:"paraui-collapse"}))},c=a(8156),l=function(){return l=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},l.apply(this,arguments)},s=c.isValidElement;function u(e,r){return function(e,r,t){return s(e)?c.cloneElement(e,"function"==typeof t?t(e.props||{}):t):r}(e,e,r)}var p=a(4674),f=a.n(p),d=function(){return{height:0,opacity:0}},v=function(e){return{height:e.scrollHeight,opacity:1}},h=function(e,r){return!0===(null==r?void 0:r.deadline)||"height"===r.propertyName},m={motionName:"paraui-collapse-motion-collapse",onAppearStart:d,onEnterStart:d,onAppearActive:v,onEnterActive:v,onLeaveStart:function(e){return{height:e?e.offsetHeight:0}},onLeaveActive:d,onAppearEnd:h,onEnterEnd:h,onLeaveEnd:h,motionDeadline:500},b=(a(5543),function(){return b=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},b.apply(this,arguments)}),y=function(r){var n,a,o,i=r.className,c=void 0===i?"":i,s=r.expandIconPosition,p=void 0===s?"left":s,d=b(b({},m),{motionAppear:!1,leavedClassName:"paraui-collapse-content-hidden"});return(0,e.jsx)(t(),b({openMotion:d},r,{expandIcon:function(t){void 0===t&&(t={});var n=r.expandIcon,a=n?n(t):(0,e.jsx)(f(),{className:"paraui-collapse-expand-svg"});return(0,e.jsx)("div",b({className:"paraui-collapse-svg-box"},{children:a}))},prefixCls:"paraui-collapse",className:(o="",c&&(o+=c),p&&(o+=" paraui-collapse-svg-"+p),o)},{children:(a=r.children,(n=a,n?Array.isArray(n)?n:[n]:[]).map((function(e,r){var t,n,a,o;if(null===(t=e.props)||void 0===t?void 0:t.disabled){var i=e.key||String(r),c=e.props,s=c.disabled,p=c.collapsible;return u(e,b(b({},(n=e.props,a=["disabled"],o=l({},n),Array.isArray(a)&&a.forEach((function(e){delete o[e]})),o)),{key:i,collapsible:null!=p?p:s?"disabled":void 0}))}return e})))}))};y.Panel=i;var g=y}(),o}()}));
@@ -0,0 +1,5 @@
1
+ import { CSSMotionProps } from 'rc-motion';
2
+ declare const collapseMotion: CSSMotionProps;
3
+ declare const getTransitionName: (rootPrefixCls: string, motion: string, transitionName?: string | undefined) => string;
4
+ export { getTransitionName };
5
+ export default collapseMotion;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ export declare const isValidElement: typeof React.isValidElement;
3
+ declare type AnyObject = Record<any, any>;
4
+ declare type RenderProps = undefined | AnyObject | ((originProps: AnyObject) => AnyObject | undefined);
5
+ export declare function replaceElement(element: React.ReactNode, replacement: React.ReactNode, props: RenderProps): React.ReactNode;
6
+ export declare function cloneElement(element: React.ReactNode, props?: RenderProps): React.ReactElement;
7
+ /** toArray */
8
+ export declare function toArray<T>(list: T | T[]): T[];
9
+ /** omit */
10
+ export declare function omit<T extends object, K extends keyof T>(obj: T, fields: K[]): Omit<T, K>;
11
+ export {};