@para-ui/core 2.1.6 → 2.1.9

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.
Files changed (125) hide show
  1. package/AutoBox/index.d.ts +2 -0
  2. package/AutoBox/index.js +4 -4
  3. package/AutoTips/index.js +2 -2
  4. package/Breadcrumbs/index.js +2 -2
  5. package/Button/index.js +4 -4
  6. package/ButtonGroup/index.js +4 -4
  7. package/Carousel/index.d.ts +30 -0
  8. package/Carousel/index.js +15 -0
  9. package/Cascader/index.js +3 -3
  10. package/Checkbox/index.js +2 -2
  11. package/CheckboxGroup/index.js +2 -2
  12. package/Collapse/collapsePanel.d.ts +10 -0
  13. package/Collapse/index.d.ts +12 -0
  14. package/Collapse/index.js +16 -0
  15. package/ComboSelect/index.js +51 -51
  16. package/ComboSelect/interface.d.ts +6 -3
  17. package/Container/index.js +2 -2
  18. package/DatePicker/generatePicker/index.d.ts +15 -7
  19. package/DatePicker/index.js +11 -11
  20. package/DatePicker/util.d.ts +1 -0
  21. package/Desktop/index.js +3 -3
  22. package/Form/index.js +15 -15
  23. package/FormItem/index.js +15 -15
  24. package/FunctionModal/index.js +9 -9
  25. package/Help/index.js +2 -2
  26. package/IconList/index.js +5 -5
  27. package/InputLang/index.js +7 -7
  28. package/InputNumber/index.d.ts +8 -8
  29. package/InputNumber/index.js +8 -8
  30. package/Loading/index.js +2 -2
  31. package/Menu/index.js +4 -4
  32. package/Message/index.js +5 -5
  33. package/Modal/index.js +9 -9
  34. package/MultiBox/index.d.ts +4 -2
  35. package/MultiBox/index.js +13 -13
  36. package/Notification/index.d.ts +1 -1
  37. package/Notification/index.js +5 -5
  38. package/PageHeader/index.js +11 -11
  39. package/PageHeader/interface.d.ts +3 -3
  40. package/Pagination/index.d.ts +11 -0
  41. package/Pagination/index.js +12 -12
  42. package/ParauiProvider/index.js +1 -1
  43. package/PopConfirm/index.js +8 -8
  44. package/Popover/index.js +1 -1
  45. package/Popper/index.js +1 -1
  46. package/README.md +39 -4
  47. package/Radio/index.js +2 -2
  48. package/RadioGroup/index.js +2 -2
  49. package/Search/index.js +16 -16
  50. package/Select/index.js +13 -13
  51. package/SingleBox/index.d.ts +3 -1
  52. package/SingleBox/index.js +12 -12
  53. package/Slider/index.js +2 -2
  54. package/Split/index.js +1 -1
  55. package/Stepper/index.js +11 -11
  56. package/Switch/index.js +2 -2
  57. package/Table/index.js +19 -19
  58. package/Table/interface.d.ts +10 -6
  59. package/Table/tableBodyInterface.d.ts +0 -2
  60. package/Table/tableHeadInterface.d.ts +0 -2
  61. package/Table/tablePaginationInterFace.d.ts +4 -0
  62. package/Tabs/index.js +2 -2
  63. package/Tag/index.js +3 -3
  64. package/TextField/index.js +8 -8
  65. package/TimePicker/index.js +11 -11
  66. package/Timeline/index.js +1 -1
  67. package/ToggleButton/index.js +8 -8
  68. package/Tooltip/index.js +2 -2
  69. package/Transfer/index.js +10 -10
  70. package/Tree/index.js +9 -9
  71. package/Tree/interface.d.ts +1 -1
  72. package/Upload/index.js +19 -19
  73. package/Upload/interface.d.ts +4 -2
  74. package/cdn/AutoBox/index.js +4 -4
  75. package/cdn/AutoTips/index.js +1 -1
  76. package/cdn/Breadcrumbs/index.js +1 -1
  77. package/cdn/Button/index.js +3 -3
  78. package/cdn/ButtonGroup/index.js +3 -3
  79. package/cdn/Carousel/index.js +6 -0
  80. package/cdn/Cascader/index.js +3 -3
  81. package/cdn/Checkbox/index.js +1 -1
  82. package/cdn/CheckboxGroup/index.js +1 -1
  83. package/cdn/Collapse/index.js +1 -0
  84. package/cdn/ComboSelect/index.js +29 -29
  85. package/cdn/Container/index.js +1 -1
  86. package/cdn/DatePicker/index.js +15 -15
  87. package/cdn/Drawer/index.js +1 -1
  88. package/cdn/Form/index.js +16 -16
  89. package/cdn/FormItem/index.js +16 -16
  90. package/cdn/FunctionModal/index.js +9 -9
  91. package/cdn/Help/index.js +1 -1
  92. package/cdn/IconList/index.js +4 -4
  93. package/cdn/InputLang/index.js +9 -9
  94. package/cdn/InputNumber/index.js +8 -8
  95. package/cdn/Loading/index.js +1 -1
  96. package/cdn/Menu/index.js +5 -5
  97. package/cdn/Message/index.js +4 -4
  98. package/cdn/Modal/index.js +9 -9
  99. package/cdn/MultiBox/index.js +6 -6
  100. package/cdn/Notification/index.js +6 -6
  101. package/cdn/PageHeader/index.js +5 -5
  102. package/cdn/Pagination/index.js +16 -16
  103. package/cdn/PopConfirm/index.js +7 -7
  104. package/cdn/Radio/index.js +1 -1
  105. package/cdn/RadioGroup/index.js +1 -1
  106. package/cdn/Search/index.js +10 -10
  107. package/cdn/Select/index.js +6 -6
  108. package/cdn/SingleBox/index.js +6 -6
  109. package/cdn/Slider/index.js +1 -1
  110. package/cdn/Stepper/index.js +10 -10
  111. package/cdn/Switch/index.js +4 -4
  112. package/cdn/Table/index.js +22 -22
  113. package/cdn/Tabs/index.js +1 -1
  114. package/cdn/Tag/index.js +2 -2
  115. package/cdn/TextField/index.js +4 -4
  116. package/cdn/TimePicker/index.js +15 -15
  117. package/cdn/ToggleButton/index.js +3 -3
  118. package/cdn/Tooltip/index.js +1 -1
  119. package/cdn/Transfer/index.js +10 -10
  120. package/cdn/Tree/index.js +10 -10
  121. package/cdn/Upload/index.js +10 -10
  122. package/index.d.ts +4 -0
  123. package/index.js +54 -54
  124. package/package.json +10 -7
  125. package/style.css +34 -32
@@ -16,6 +16,7 @@ declare type TableProps = ITableProps & {
16
16
  title?: string;
17
17
  };
18
18
  };
19
+ export type { TableProps, TreeProps };
19
20
  export declare type SelectOpt = {
20
21
  disabled?: boolean;
21
22
  closable?: boolean;
@@ -52,13 +53,13 @@ export interface ComboSelectProps {
52
53
  defaultOpen?: boolean;
53
54
  /**默认值 checkable为true SelectOpt[],为false SelectOpt */
54
55
  defaultValue?: SelectOpt[] | SelectOpt;
55
- /**替换显示字段*/
56
+ /**替换显示字段 {key: 'key', title: 'title', children: 'children'} */
56
57
  replaceFields?: {
57
58
  key?: string;
58
59
  title?: string;
59
60
  children?: string;
60
61
  };
61
- /**出参字段*/
62
+ /**出参字段 {outputKey: 'key', outputTitle: 'label'} */
62
63
  outputFields?: {
63
64
  outputKey?: string;
64
65
  outputTitle?: string;
@@ -100,7 +101,9 @@ export interface ComboSelectProps {
100
101
  /**辅助文本*/
101
102
  helperText?: string;
102
103
  /**参数处理回调*/
103
- paramsCallback?: (params: any) => any;
104
+ paramsCallback?: (params: {
105
+ [name: string]: any;
106
+ }) => any;
104
107
  /**路径字段*/
105
108
  fullPathKey?: string;
106
109
  /** 自定义路径节点 */
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ParaUI=t(require("react")):e.ParaUI=t(e.react)}(self,(function(e){return function(){var t={6461:function(e,t,r){(t=r(3645)(!1)).push([e.id,".para-container{width:100%;height:100%}.para-container .para-body{overflow:auto}.para-container.tlf .para-body{display:table}.para-container.tlf .para-body-right{display:table-cell;vertical-align:top}.para-container.tlf .para-container-left{display:table-cell;vertical-align:top}.para-container.tlrb .para-body{display:table}.para-container.tlrb .para-container-left{display:table-cell;vertical-align:top}.para-container.tlrb .para-container-right{display:table-cell;vertical-align:top}.para-container.ltrb{display:table}.para-container.ltrb .para-body{display:table-cell;vertical-align:top}.para-container.ltrb .para-container-left{display:table-cell;vertical-align:top}.para-container-right{overflow:auto}\n",""]),e.exports=t},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=(o=n,c=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(i).concat([a]).join("\n")}var o,c,l;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(a[o]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&a[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),t.push(l))}},t}},7418:function(e){"use strict";
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ParaUI=t(require("react")):e.ParaUI=t(e.react)}(self,(function(e){return function(){var t={6461:function(e,t,r){(t=r(3645)(!1)).push([e.id,".para-container{width:100%;height:100%}.para-container>.para-body{overflow:auto}.para-container.tlr>.para-body{display:table}.para-container.tlr>.para-body>.para-body-right{display:table-cell;vertical-align:top}.para-container.tlr>.para-body>.para-container-left{display:table-cell;vertical-align:top}.para-container.tlrb>.para-body{display:table}.para-container.tlrb>.para-body>.para-container-left{display:table-cell;vertical-align:top}.para-container.tlrb>.para-body>.para-container-right{display:table-cell;vertical-align:top}.para-container.ltrb{display:table}.para-container.ltrb>.para-body{display:table-cell;vertical-align:top}.para-container.ltrb>.para-container-left{display:table-cell;vertical-align:top}.para-container-right{overflow:auto}\n",""]),e.exports=t},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=(o=n,c=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(l," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(i).concat([a]).join("\n")}var o,c,l;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(a[o]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&a[l[0]]||(r&&(l[2]?l[2]="".concat(r," and ").concat(l[2]):l[2]=r),t.push(l))}},t}},7418:function(e){"use strict";
2
2
  /*
3
3
  object-assign
4
4
  (c) Sindre Sorhus
@@ -12,4 +12,4 @@ object-assign
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- r(7418);var n=r(8156),a=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;a=i("react.element"),i("react.fragment")}var o=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,t,r){var n,i={},s=null,d=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(d=t.ref),t)c.call(t,n)&&!l.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:a,type:e,key:s,ref:d,props:i,_owner:o.current}}t.jsx=s,t.jsxs=s},5893:function(e,t,r){"use strict";e.exports=r(5251)},462:function(e,t,r){var n=r(3379),a=r(6461);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var i={insert:("body","body"),singleton:!1};n(a,i);e.exports=a.locals||{}},3379:function(e,t,r){"use strict";var n,a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),o=[];function c(e){for(var t=-1,r=0;r<o.length;r++)if(o[r].identifier===e){t=r;break}return t}function l(e,t){for(var r={},n=[],a=0;a<e.length;a++){var i=e[a],l=t.base?i[0]+t.base:i[0],s=r[l]||0,d="".concat(l," ").concat(s);r[l]=s+1;var u=c(d),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(o[u].references++,o[u].updater(p)):o.push({identifier:d,updater:y(p,t),references:1}),n.push(d)}return n}function s(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var a=r.nc;a&&(n.nonce=a)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,r,n){var a=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}function f(e,t,r){var n=r.css,a=r.media,i=r.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var h=null,v=0;function y(e,t){var r,n,a;if(t.singleton){var i=v++;r=h||(h=s(t)),n=p.bind(null,r,i,!1),a=p.bind(null,r,i,!0)}else r=s(t),n=f.bind(null,r,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var r=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var a=c(r[n]);o[a].references--}for(var i=l(e,t),s=0;s<r.length;s++){var d=c(r[s]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}r=i}}}},8156:function(t){"use strict";t.exports=e}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={id:e,exports:{}};return t[e](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.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";n.r(a),n.d(a,{Container:function(){return o}});var e=n(5893),t=n(8156),r=n.n(t),i=(n(462),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},i.apply(this,arguments)}),o=function(t){void 0===t&&(t={});var n,a,o,c,l,s=t.className,d=void 0===s?"":s,u=t.top,p=t.topStyle,f=void 0===p?{}:p,h=t.left,v=t.leftStyle,y=void 0===v?{}:v,b=t.right,g=t.rightStyle,m=void 0===g?{}:g,j=t.bottom,x=t.bottomStyle,w=void 0===x?{}:x,N=t.type,O=void 0===N?"tlr":N;return r().useMemo((function(){switch(O){case"tlr":return n=i({height:u?"50px":"0",width:"100%"},f),a=i({height:"100%",width:"auto"},y),c=i({height:j?"20px":"0",width:"100%"},w),o=i({height:"calc(100% - ".concat(c.height,")"),width:"auto"},m),l={width:"100%",height:"calc(100% - ".concat(n.height,")")},(0,e.jsxs)("div",i({className:"para-container tlf "+d},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u}),void 0),(0,e.jsxs)("div",i({className:"para-body",style:l},{children:[(0,e.jsx)("div",i({className:"para-container-left",style:a},{children:h}),void 0),(0,e.jsxs)("div",i({className:"para-body-right",style:{width:"auto",height:"100%"}},{children:[(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b}),void 0),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}),void 0)]}),void 0)]}),void 0)]}),void 0);case"tlrb":return n=i({height:u?"50px":"0",width:"100%"},f),a=i({height:"100%",width:"auto"},y),o=i({height:"100%",width:"auto"},m),c=i({height:j?"20px":"0px",width:"100%"},w),l={width:"100%",height:"calc(100% - ".concat(n.height," - ").concat(c.height,")")},(0,e.jsxs)("div",i({className:"para-container tlrb "+d},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u}),void 0),(0,e.jsxs)("div",i({className:"para-body",style:l},{children:[(0,e.jsx)("div",i({className:"para-container-left",style:a},{children:h}),void 0),(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b}),void 0)]}),void 0),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}),void 0)]}),void 0);case"ltrb":return a=i({height:"100%",width:"auto"},y),n=i({height:u?"50px":"0",width:"100%"},f),c=i({height:j?"30px":"0px",width:"100%"},w),o=i({height:"calc(100% - ".concat(n.height,"px - ").concat(c.height,")"),width:"100%"},m),l={width:"auto",height:"100%"},(0,e.jsxs)("div",i({className:"para-container ltrb "+d},{children:[(0,e.jsx)("div",i({className:"para-container-left",style:a},{children:h}),void 0),(0,e.jsxs)("div",i({className:"para-body",style:l},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u}),void 0),(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b}),void 0),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}),void 0)]}),void 0)]}),void 0);case"trb":return n=i({height:u?"50px":"0",width:"100%"},f),c=i({height:j?"30px":"0px",width:"100%"},w),o=i({height:"calc(100% - ".concat(n.height,"px - ").concat(c.height,")"),width:"100%"},m),(0,e.jsxs)("div",i({className:"para-container trb "+d},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u}),void 0),(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b}),void 0),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}),void 0)]}),void 0)}return(0,e.jsx)("div",{children:"Error Position"},void 0)}),[O,d])};a.default=o}(),a}()}));
15
+ r(7418);var n=r(8156),a=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;a=i("react.element"),i("react.fragment")}var o=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,t,r){var n,i={},s=null,d=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(d=t.ref),t)c.call(t,n)&&!l.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:a,type:e,key:s,ref:d,props:i,_owner:o.current}}t.jsx=s,t.jsxs=s},5893:function(e,t,r){"use strict";e.exports=r(5251)},462:function(e,t,r){var n=r(3379),a=r(6461);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var i={insert:("body","body"),singleton:!1};n(a,i);e.exports=a.locals||{}},3379:function(e,t,r){"use strict";var n,a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),o=[];function c(e){for(var t=-1,r=0;r<o.length;r++)if(o[r].identifier===e){t=r;break}return t}function l(e,t){for(var r={},n=[],a=0;a<e.length;a++){var i=e[a],l=t.base?i[0]+t.base:i[0],s=r[l]||0,d="".concat(l," ").concat(s);r[l]=s+1;var u=c(d),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(o[u].references++,o[u].updater(p)):o.push({identifier:d,updater:y(p,t),references:1}),n.push(d)}return n}function s(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var a=r.nc;a&&(n.nonce=a)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,r,n){var a=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}function h(e,t,r){var n=r.css,a=r.media,i=r.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var f=null,v=0;function y(e,t){var r,n,a;if(t.singleton){var i=v++;r=f||(f=s(t)),n=p.bind(null,r,i,!1),a=p.bind(null,r,i,!0)}else r=s(t),n=h.bind(null,r,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var r=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var a=c(r[n]);o[a].references--}for(var i=l(e,t),s=0;s<r.length;s++){var d=c(r[s]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}r=i}}}},8156:function(t){"use strict";t.exports=e}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var i=r[e]={id:e,exports:{}};return t[e](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.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";n.r(a),n.d(a,{Container:function(){return o}});var e=n(5893),t=n(8156),r=n.n(t),i=(n(462),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},i.apply(this,arguments)}),o=function(t){void 0===t&&(t={});var n,a,o,c,l,s=t.className,d=void 0===s?"":s,u=t.top,p=t.topStyle,h=void 0===p?{}:p,f=t.left,v=t.leftStyle,y=void 0===v?{}:v,b=t.right,g=t.rightStyle,m=void 0===g?{}:g,j=t.bottom,x=t.bottomStyle,w=void 0===x?{}:x,N=t.type,O=void 0===N?"tlr":N;return r().useMemo((function(){switch(O){case"tlr":return n=i({height:u?"50px":"0",width:"100%"},h),a=i({height:"100%",width:"auto"},y),c=i({height:j?"20px":"0",width:"100%"},w),o=i({height:"calc(100% - ".concat(c.height,")"),width:"auto"},m),l={width:"100%",height:"calc(100% - ".concat(n.height,")")},(0,e.jsxs)("div",i({className:"para-container tlr "+d},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u})),(0,e.jsxs)("div",i({className:"para-body",style:l},{children:[(0,e.jsx)("div",i({className:"para-container-left",style:a},{children:f})),(0,e.jsxs)("div",i({className:"para-body-right",style:{width:"auto",height:"100%"}},{children:[(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b})),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}))]}))]}));case"tlrb":return n=i({height:u?"50px":"0",width:"100%"},h),a=i({height:"100%",width:"auto"},y),o=i({height:"100%",width:"auto"},m),c=i({height:j?"20px":"0px",width:"100%"},w),l={width:"100%",height:"calc(100% - ".concat(n.height," - ").concat(c.height,")")},(0,e.jsxs)("div",i({className:"para-container tlrb "+d},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u})),(0,e.jsxs)("div",i({className:"para-body",style:l},{children:[(0,e.jsx)("div",i({className:"para-container-left",style:a},{children:f})),(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b}))]})),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}));case"ltrb":return a=i({height:"100%",width:"auto"},y),n=i({height:u?"50px":"0",width:"100%"},h),c=i({height:j?"30px":"0px",width:"100%"},w),o=i({height:"calc(100% - ".concat(n.height,"px - ").concat(c.height,")"),width:"100%"},m),l={width:"auto",height:"100%"},(0,e.jsxs)("div",i({className:"para-container ltrb "+d},{children:[(0,e.jsx)("div",i({className:"para-container-left",style:a},{children:f})),(0,e.jsxs)("div",i({className:"para-body",style:l},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u})),(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b})),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}))]}));case"trb":return n=i({height:u?"50px":"0",width:"100%"},h),c=i({height:j?"30px":"0px",width:"100%"},w),o=i({height:"calc(100% - ".concat(n.height,"px - ").concat(c.height,")"),width:"100%"},m),(0,e.jsxs)("div",i({className:"para-container trb "+d},{children:[(0,e.jsx)("div",i({className:"para-container-top",style:n},{children:u})),(0,e.jsx)("div",i({className:"para-container-right",style:o},{children:b})),(0,e.jsx)("div",i({className:"para-container-bottom",style:c},{children:j}))]}))}return(0,e.jsx)("div",{children:"Error Position"})}),[O,d])};a.default=o}(),a}()}));
@@ -5,21 +5,29 @@ import { RangePickerBaseProps as RCRangePickerBaseProps, RangePickerDateProps as
5
5
  import { Locale as RcPickerLocale } from 'rc-picker/lib/interface';
6
6
  import PickerButton from '../PickerButton';
7
7
  import PickerTag from '../PickerTag';
8
+ import { Moment } from "moment";
8
9
  declare type SizeType = 'small' | 'medium' | 'large' | undefined;
9
10
  export interface TimePickerLocale {
10
11
  placeholder?: string;
11
12
  rangePlaceholder?: [string, string];
12
13
  }
14
+ export declare type NullableDateType<DateType> = DateType | null | undefined | string;
15
+ export declare type RangeValue<DateType> = [NullableDateType<DateType>, NullableDateType<DateType>] | null;
13
16
  export declare const Components: {
14
17
  button: typeof PickerButton;
15
18
  rangeItem: typeof PickerTag;
16
19
  };
17
- declare type InjectDefaultProps<Props> = Omit<Props, 'locale' | 'generateConfig' | 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon' | 'hideHeader' | 'components'> & {
20
+ declare type InjectDefaultProps<Props, Type> = Omit<Props, 'locale' | 'generateConfig' | 'prevIcon' | 'nextIcon' | 'superPrevIcon' | 'superNextIcon' | 'hideHeader' | 'components' | 'value' | 'defaultValue'> & {
18
21
  locale?: 'zh' | 'en';
19
22
  size?: SizeType;
20
23
  bordered?: boolean;
21
24
  error?: boolean;
22
25
  helperText?: React.ReactNode;
26
+ value?: Type extends 'range' ? RangeValue<Moment> : NullableDateType<Moment>;
27
+ defaultValue?: Type extends 'range' ? RangeValue<Moment> : NullableDateType<Moment>;
28
+ };
29
+ export declare const pickerFormatMap: {
30
+ [index: string]: string;
23
31
  };
24
32
  export declare const ELocale: {
25
33
  [index: string]: PickerLocale;
@@ -45,13 +53,13 @@ export declare type AdditionalPickerLocaleLangProps = {
45
53
  rangeWeekPlaceholder?: [string, string];
46
54
  rangePlaceholder?: [string, string];
47
55
  };
48
- export declare type PickerBaseProps<DateType> = InjectDefaultProps<RCPickerBaseProps<DateType>>;
49
- export declare type PickerDateProps<DateType> = InjectDefaultProps<RCPickerDateProps<DateType>>;
50
- export declare type PickerTimeProps<DateType> = InjectDefaultProps<RCPickerTimeProps<DateType>>;
56
+ export declare type PickerBaseProps<DateType> = InjectDefaultProps<RCPickerBaseProps<DateType>, ''>;
57
+ export declare type PickerDateProps<DateType> = InjectDefaultProps<RCPickerDateProps<DateType>, ''>;
58
+ export declare type PickerTimeProps<DateType> = InjectDefaultProps<RCPickerTimeProps<DateType>, ''>;
51
59
  export declare type PickerProps<DateType> = PickerBaseProps<DateType> | PickerDateProps<DateType> | PickerTimeProps<DateType>;
52
- export declare type RangePickerBaseProps<DateType> = InjectDefaultProps<RCRangePickerBaseProps<DateType>>;
53
- export declare type RangePickerDateProps<DateType> = InjectDefaultProps<RCRangePickerDateProps<DateType>>;
54
- export declare type RangePickerTimeProps<DateType> = InjectDefaultProps<RCRangePickerTimeProps<DateType>>;
60
+ export declare type RangePickerBaseProps<DateType> = InjectDefaultProps<RCRangePickerBaseProps<DateType>, 'range'>;
61
+ export declare type RangePickerDateProps<DateType> = InjectDefaultProps<RCRangePickerDateProps<DateType>, 'range'>;
62
+ export declare type RangePickerTimeProps<DateType> = InjectDefaultProps<RCRangePickerTimeProps<DateType>, 'range'>;
55
63
  export declare type RangePickerProps<DateType> = RangePickerBaseProps<DateType> | RangePickerDateProps<DateType> | RangePickerTimeProps<DateType>;
56
64
  declare function generatePicker<DateType>(generateConfig: GenerateConfig<DateType>): React.ComponentClass<PickerProps<DateType>, any> & {
57
65
  WeekPicker: React.ComponentClass<Omit<PickerDateProps<DateType>, "picker">, any>;