@zjpcy/simple-design 1.6.0 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +178 -26
- package/dist/cjs/components/Anchor/index.js +1 -0
- package/dist/cjs/components/Breadcrumb/index.js +1 -0
- package/dist/cjs/components/Button/Button.js +1 -0
- package/dist/cjs/components/Calendar/index.js +1 -0
- package/dist/cjs/components/Carousel/index.js +1 -0
- package/dist/cjs/components/Cascader/index.js +1 -0
- package/dist/cjs/components/Checkbox/index.js +1 -0
- package/dist/cjs/components/ColorPicker/ColorPickerPanel.js +1 -0
- package/dist/cjs/components/ColorPicker/index.js +1 -0
- package/dist/cjs/components/CopyToClipboard/index.js +1 -0
- package/dist/cjs/components/DatePicker/RangePicker.js +1 -0
- package/dist/cjs/components/DatePicker/index.js +1 -0
- package/dist/cjs/components/DatePicker/styles.js +1 -0
- package/dist/cjs/components/Divider/index.js +1 -0
- package/dist/cjs/components/Drawer/index.js +1 -0
- package/dist/cjs/components/Dropdown/index.js +1 -0
- package/dist/cjs/components/Empty/index.js +1 -0
- package/dist/cjs/components/Flex/index.js +1 -0
- package/dist/cjs/components/Form/index.js +1 -0
- package/dist/cjs/components/Form/styles.js +1 -0
- package/dist/cjs/components/Grid/index.js +1 -0
- package/dist/cjs/components/Grid/styles.js +1 -0
- package/dist/cjs/components/Hooks/useClickOutside.js +1 -0
- package/dist/cjs/components/Hooks/useCopy.js +1 -0
- package/dist/cjs/components/Icon/Icon.js +1 -0
- package/dist/cjs/components/Icon/index.js +1 -0
- package/dist/cjs/components/Icon/path.js +1 -0
- package/dist/cjs/components/Input/InputBase.js +1 -0
- package/dist/cjs/components/Input/Number.js +1 -0
- package/dist/cjs/components/Input/Password.js +1 -0
- package/dist/cjs/components/Input/Search.js +1 -0
- package/dist/cjs/components/Input/Textarea.js +1 -0
- package/dist/cjs/components/Input/index.js +1 -0
- package/dist/cjs/components/Label/index.js +1 -0
- package/dist/cjs/components/Label/styles.js +1 -0
- package/dist/cjs/components/Layout/LayoutContext.js +1 -0
- package/dist/cjs/components/Layout/index.js +1 -0
- package/dist/cjs/components/Layout/styles.js +1 -0
- package/dist/cjs/components/Marquee/index.js +1 -0
- package/dist/cjs/components/Masonry/index.js +1 -0
- package/dist/cjs/components/Menu/index.js +1 -0
- package/dist/cjs/components/Message/Message.js +1 -0
- package/dist/cjs/components/Message/index.js +1 -0
- package/dist/cjs/components/Modal/index.js +1 -0
- package/dist/cjs/components/Notification/Notification.js +1 -0
- package/dist/cjs/components/Pagination/index.js +1 -0
- package/dist/cjs/components/Popconfirm/index.js +1 -0
- package/dist/cjs/components/Progress/index.js +1 -0
- package/dist/cjs/components/Radio/index.js +1 -0
- package/dist/cjs/components/Rate/index.js +1 -0
- package/dist/cjs/components/Select/index.js +1 -0
- package/dist/cjs/components/Select/styles.js +1 -0
- package/dist/cjs/components/Slider/index.js +1 -0
- package/dist/cjs/components/Space/index.js +1 -0
- package/dist/cjs/components/Spin/index.js +1 -0
- package/dist/cjs/components/Splitter/index.js +1 -0
- package/dist/cjs/components/Splitter/styles.js +1 -0
- package/dist/cjs/components/Steps/index.js +1 -0
- package/dist/cjs/components/Switch/index.js +1 -0
- package/dist/cjs/components/Switch/styles.js +1 -0
- package/dist/cjs/components/Table/SortableRow.js +1 -0
- package/dist/cjs/components/Table/index.js +1 -0
- package/dist/cjs/components/Tabs/index.js +1 -0
- package/dist/cjs/components/Tag/index.js +1 -0
- package/dist/cjs/components/TimePicker/RangePicker.js +1 -0
- package/dist/cjs/components/TimePicker/TimePickerPanel.js +1 -0
- package/dist/cjs/components/TimePicker/index.js +1 -0
- package/dist/cjs/components/Tooltip/Tooltip.js +1 -0
- package/dist/cjs/components/Top/index.js +1 -0
- package/dist/cjs/components/Transfer/index.js +1 -0
- package/dist/cjs/components/Transfer/styles.js +1 -0
- package/dist/cjs/components/Tree/index.js +1 -0
- package/dist/cjs/components/TreeSelect/index.js +1 -0
- package/dist/cjs/components/TreeSelect/styles.js +1 -0
- package/dist/cjs/components/Typography/index.js +1 -0
- package/dist/cjs/components/Upload/index.js +1 -0
- package/dist/cjs/components/Upload/useChunkUpload.js +1 -0
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/i18n/I18nProvider.js +1 -0
- package/dist/cjs/i18n/index.js +1 -0
- package/dist/cjs/i18n/locales/en-US.json.js +1 -0
- package/dist/cjs/i18n/locales/zh-CN.json.js +1 -0
- package/dist/cjs/index.css +11725 -6076
- package/dist/es/components/Anchor/index.js +1 -0
- package/dist/es/components/Button/Button.js +1 -0
- package/dist/es/components/Calendar/index.js +1 -0
- package/dist/es/components/Carousel/index.js +1 -0
- package/dist/es/components/Cascader/index.js +1 -0
- package/dist/es/components/Checkbox/index.js +1 -0
- package/dist/es/components/ColorPicker/ColorPickerPanel.js +1 -0
- package/dist/es/components/ColorPicker/index.js +1 -0
- package/dist/es/components/CopyToClipboard/index.js +1 -0
- package/dist/es/components/DatePicker/RangePicker.js +1 -0
- package/dist/es/components/DatePicker/index.js +1 -0
- package/dist/es/components/DatePicker/styles.js +1 -0
- package/dist/es/components/Divider/index.js +1 -0
- package/dist/es/components/Drawer/index.js +1 -0
- package/dist/es/components/Flex/index.js +1 -0
- package/dist/es/components/Form/index.js +1 -0
- package/dist/es/components/Form/styles.js +1 -0
- package/dist/es/components/Grid/index.js +1 -0
- package/dist/es/components/Grid/styles.js +1 -0
- package/dist/es/components/Hooks/useCopy.js +1 -0
- package/dist/es/components/Icon/Icon.js +1 -0
- package/dist/es/components/Input/InputBase.js +1 -0
- package/dist/es/components/Input/Number.js +1 -0
- package/dist/es/components/Input/Password.js +1 -0
- package/dist/es/components/Input/Search.js +1 -0
- package/dist/es/components/Input/Textarea.js +1 -0
- package/dist/es/components/Label/index.js +1 -0
- package/dist/es/components/Label/styles.js +1 -0
- package/dist/es/components/Layout/index.js +1 -0
- package/dist/es/components/Layout/styles.js +1 -0
- package/dist/es/components/Marquee/index.js +1 -0
- package/dist/es/components/Masonry/index.js +1 -0
- package/dist/es/components/Menu/index.js +1 -0
- package/dist/es/components/Message/index.js +1 -0
- package/dist/es/components/Modal/index.js +1 -0
- package/dist/es/components/Notification/Notification.js +1 -0
- package/dist/es/components/Popconfirm/index.js +1 -0
- package/dist/es/components/Progress/index.js +1 -0
- package/dist/es/components/Radio/index.js +1 -0
- package/dist/es/components/Select/index.js +1 -0
- package/dist/es/components/Select/styles.js +1 -0
- package/dist/es/components/Slider/index.js +1 -0
- package/dist/es/components/Space/index.js +1 -0
- package/dist/es/components/Splitter/index.js +1 -0
- package/dist/es/components/Splitter/styles.js +1 -0
- package/dist/es/components/Switch/index.js +1 -0
- package/dist/es/components/Switch/styles.js +1 -0
- package/dist/es/components/Table/SortableRow.js +1 -0
- package/dist/es/components/Table/index.js +1 -0
- package/dist/es/components/Tabs/index.js +1 -0
- package/dist/es/components/Tag/index.js +1 -0
- package/dist/es/components/TimePicker/RangePicker.js +1 -0
- package/dist/es/components/TimePicker/TimePickerPanel.js +1 -0
- package/dist/es/components/TimePicker/index.js +1 -0
- package/dist/es/components/Tooltip/Tooltip.js +1 -0
- package/dist/es/components/Top/index.js +1 -0
- package/dist/es/components/Transfer/index.js +1 -0
- package/dist/es/components/Transfer/styles.js +1 -0
- package/dist/es/components/Tree/index.js +1 -0
- package/dist/es/components/TreeSelect/index.js +1 -0
- package/dist/es/components/TreeSelect/styles.js +1 -0
- package/dist/es/components/Typography/index.js +1 -0
- package/dist/es/components/Upload/index.js +1 -0
- package/dist/es/components/Upload/useChunkUpload.js +1 -0
- package/dist/es/components/index.js +1 -0
- package/dist/es/i18n/I18nProvider.js +1 -0
- package/dist/es/i18n/index.js +1 -0
- package/dist/es/i18n/locales/en-US.json.js +1 -0
- package/dist/es/i18n/locales/zh-CN.json.js +1 -0
- package/dist/es/index.css +11725 -6076
- package/dist/i18n/locales/en-US.json +2 -3
- package/dist/i18n/locales/zh-CN.json +1 -1
- package/dist/types/components/ColorPicker/ColorPickerPanel.d.ts +21 -0
- package/dist/types/components/DatePicker/styles.d.ts +118 -152
- package/dist/types/components/Form/styles.d.ts +84 -22
- package/dist/types/components/Grid/styles.d.ts +36 -6
- package/dist/types/components/Label/styles.d.ts +16 -1
- package/dist/types/components/Label/types.d.ts +1 -0
- package/dist/types/components/Layout/styles.d.ts +131 -41
- package/dist/types/components/Marquee/index.d.ts +1 -1
- package/dist/types/components/Message/index.d.ts +1 -1
- package/dist/types/components/Select/styles.d.ts +254 -44
- package/dist/types/components/Splitter/styles.d.ts +39 -2
- package/dist/types/components/Splitter/types.d.ts +12 -12
- package/dist/types/components/Switch/index.d.ts +1 -0
- package/dist/types/components/Switch/styles.d.ts +116 -35
- package/dist/types/components/Switch/types.d.ts +4 -0
- package/dist/types/components/TimePicker/styles.d.ts +153 -25
- package/dist/types/components/Top/index.d.ts +1 -1
- package/dist/types/components/Transfer/styles.d.ts +205 -66
- package/dist/types/components/TreeSelect/index.d.ts +1 -0
- package/dist/types/components/TreeSelect/styles.d.ts +295 -55
- package/dist/types/components/TreeSelect/types.d.ts +3 -1
- package/dist/types/components/Upload/index.d.ts +2 -2
- package/dist/types/components/Upload/styles.d.ts +150 -24
- package/dist/types/components/Upload/types.d.ts +279 -15
- package/dist/types/components/Upload/useChunkUpload.d.ts +27 -0
- package/dist/types/components/index.d.ts +4 -3
- package/dist/types/i18n/index.d.ts +1 -1
- package/dist/types/utils/dnd-kit-adapter.d.ts +2 -0
- package/dist/types/utils/i18n-adapter.d.ts +5 -0
- package/dist/types/utils/lunar-adapter.d.ts +2 -0
- package/package.json +29 -13
- package/dist/cjs/index.js +0 -1
- package/dist/es/Anchor/index.js +0 -1
- package/dist/es/Button/Button.js +0 -1
- package/dist/es/Calendar/index.js +0 -1
- package/dist/es/Carousel/index.js +0 -1
- package/dist/es/Cascader/index.js +0 -1
- package/dist/es/Checkbox/index.js +0 -1
- package/dist/es/ColorPicker/index.js +0 -1
- package/dist/es/CopyToClipboard/index.js +0 -1
- package/dist/es/DatePicker/RangePicker.js +0 -1
- package/dist/es/DatePicker/index.js +0 -1
- package/dist/es/DatePicker/styles.js +0 -1
- package/dist/es/Divider/index.js +0 -1
- package/dist/es/Drawer/index.js +0 -1
- package/dist/es/Flex/index.js +0 -1
- package/dist/es/Form/index.js +0 -1
- package/dist/es/Form/styles.js +0 -1
- package/dist/es/Grid/index.js +0 -1
- package/dist/es/Grid/styles.js +0 -1
- package/dist/es/Hooks/useCopy.js +0 -1
- package/dist/es/Icon/Icon.js +0 -1
- package/dist/es/Input/InputBase.js +0 -1
- package/dist/es/Input/Number.js +0 -1
- package/dist/es/Input/Password.js +0 -1
- package/dist/es/Input/Search.js +0 -1
- package/dist/es/Input/Textarea.js +0 -1
- package/dist/es/Label/index.js +0 -1
- package/dist/es/Label/styles.js +0 -1
- package/dist/es/Layout/index.js +0 -1
- package/dist/es/Layout/styles.js +0 -1
- package/dist/es/Marquee/index.js +0 -1
- package/dist/es/Masonry/index.js +0 -1
- package/dist/es/Menu/index.js +0 -1
- package/dist/es/Message/index.js +0 -1
- package/dist/es/Modal/index.js +0 -1
- package/dist/es/Notice/Notice.js +0 -1
- package/dist/es/Notification/Notification.js +0 -1
- package/dist/es/Popconfirm/index.js +0 -1
- package/dist/es/Progress/index.js +0 -1
- package/dist/es/Radio/index.js +0 -1
- package/dist/es/Select/index.js +0 -1
- package/dist/es/Select/styles.js +0 -1
- package/dist/es/Slider/index.js +0 -1
- package/dist/es/Space/index.js +0 -1
- package/dist/es/Splitter/index.js +0 -1
- package/dist/es/Splitter/styles.js +0 -1
- package/dist/es/Switch/index.js +0 -1
- package/dist/es/Switch/styles.js +0 -1
- package/dist/es/Table/SortableRow.js +0 -1
- package/dist/es/Table/index.js +0 -1
- package/dist/es/Tabs/index.js +0 -1
- package/dist/es/Tag/index.js +0 -1
- package/dist/es/TimePicker/RangePicker.js +0 -1
- package/dist/es/TimePicker/TimePickerPanel.js +0 -1
- package/dist/es/TimePicker/index.js +0 -1
- package/dist/es/Tooltip/Tooltip.js +0 -1
- package/dist/es/Top/index.js +0 -1
- package/dist/es/Transfer/index.js +0 -1
- package/dist/es/Transfer/styles.js +0 -1
- package/dist/es/Tree/index.js +0 -1
- package/dist/es/TreeSelect/index.js +0 -1
- package/dist/es/TreeSelect/styles.js +0 -1
- package/dist/es/Typography/index.js +0 -1
- package/dist/es/Upload/index.js +0 -1
- package/dist/es/_virtual/index.js +0 -1
- package/dist/es/_virtual/index2.js +0 -1
- package/dist/es/_virtual/use-sync-external-store-shim.development.js +0 -1
- package/dist/es/_virtual/use-sync-external-store-shim.production.js +0 -1
- package/dist/es/index.js +0 -1
- package/dist/es/node_modules/i18next/dist/esm/i18next.js +0 -1
- package/dist/es/node_modules/react-fast-marquee/dist/index.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/context.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/defaults.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/i18nInstance.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/initReactI18next.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/unescape.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/useTranslation.js +0 -1
- package/dist/es/node_modules/react-i18next/dist/es/utils.js +0 -1
- package/dist/es/node_modules/react-icons/fa/index.js +0 -1
- package/dist/es/node_modules/react-icons/io5/index.js +0 -1
- package/dist/es/node_modules/react-icons/lib/iconBase.js +0 -1
- package/dist/es/node_modules/react-icons/lib/iconContext.js +0 -1
- package/dist/es/node_modules/tslib/tslib.es6.js +0 -1
- package/dist/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -1
- package/dist/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -1
- package/dist/es/node_modules/use-sync-external-store/shim/index.js +0 -1
- package/dist/es/src/i18n/I18nProvider.js +0 -1
- package/dist/es/src/i18n/index.js +0 -1
- package/dist/es/src/i18n/locales/en-US.json.js +0 -1
- package/dist/es/src/i18n/locales/zh-CN.json.js +0 -1
- package/dist/types/components/Drawer/styles.d.ts +0 -0
- package/dist/types/components/Menu/styles.d.ts +0 -7
- package/dist/types/components/Notice/Notice.d.ts +0 -18
- package/dist/types/components/Progress/styles.d.ts +0 -0
- /package/dist/es/{Breadcrumb → components/Breadcrumb}/index.js +0 -0
- /package/dist/es/{Dropdown → components/Dropdown}/index.js +0 -0
- /package/dist/es/{Empty → components/Empty}/index.js +0 -0
- /package/dist/es/{Hooks → components/Hooks}/useClickOutside.js +0 -0
- /package/dist/es/{Icon → components/Icon}/index.js +0 -0
- /package/dist/es/{Icon → components/Icon}/path.js +0 -0
- /package/dist/es/{Input → components/Input}/index.js +0 -0
- /package/dist/es/{Layout → components/Layout}/LayoutContext.js +0 -0
- /package/dist/es/{Message → components/Message}/Message.js +0 -0
- /package/dist/es/{Pagination → components/Pagination}/index.js +0 -0
- /package/dist/es/{Rate → components/Rate}/index.js +0 -0
- /package/dist/es/{Spin → components/Spin}/index.js +0 -0
- /package/dist/es/{Steps → components/Steps}/index.js +0 -0
package/dist/es/Anchor/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as n,__spreadArray as r}from"../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import t,{useState as o,useRef as c,useEffect as i}from"react";var u=function(){return null},l=function(l){var a=l.className,f=l.style,s=l.children,d=l.offsetTop,p=void 0===d?0:d,m=l.affix,h=void 0===m||m,v=l.bounds,w=void 0===v?5:v,y=l.getContainer,g=void 0===y?function(){return window.document.documentElement}:y,E=l.onChange,b=o(""),T=b[0],j=b[1],z=o([]),C=z[0],k=z[1],B=c(null),L=c(null),N=c(""),R=c(!1),x=c("");i(function(){N.current=T},[T]);var A=function(){var r=g(),e=r===window.document.documentElement||r===document.body,t=!1,o=C.map(function(o){var c=document.querySelector(o.href);if(c){var i=c.getBoundingClientRect(),u=0;if(e)u=i.top+window.scrollY-p;else{var l=r.getBoundingClientRect();u=i.top-l.top+r.scrollTop-p}if(Math.abs(u-o.top)>1)return t=!0,n(n({},o),{top:u})}return o});t&&k(o)},Y=function(){if(!R.current&&0!==C.length){for(var n=g(),e=(n===window.document.documentElement||n===document.body?window.scrollY:n.scrollTop)+p+w,t="",o=r([],C,!0).sort(function(n,r){return n.top-r.top}),c=0;c<o.length&&e>=o[c].top;c+=1)t=o[c].href;if(x.current){var i=o.find(function(n){return n.href===x.current});if(i)return void(Math.abs(e-i.top)<50&&(x.current!==N.current&&(j(x.current),N.current=x.current,null==E||E(x.current)),x.current=""))}t!==N.current&&(j(t),N.current=t,null==E||E(t))}};i(function(){var n=function(n){var r=[],e=function(n){if(t.isValidElement(n)){var o=n;if(o.type===u&&o.props.href&&o.props.title&&r.push({href:o.props.href,title:o.props.title,top:0}),"children"in o.props&&o.props.children){var c=o.props.children;Array.isArray(c)?c.forEach(e):e(c)}}};return Array.isArray(n)?n.forEach(e):e(n),r}(s);k(n)},[s]),i(function(){A(),Y();var n=g();L.current=function(){Y()},n.addEventListener("scroll",L.current);var r=function(){A(),Y()};return window.addEventListener("resize",r),function(){L.current&&n.removeEventListener("scroll",L.current),window.removeEventListener("resize",r)}},[C,p,w,g,E]);var q="zjpcy-anchor ".concat(a||""," ").concat(h?"zjpcy-anchor-affix":"");return e("div",{ref:B,className:q,style:f,children:e("ul",{className:"zjpcy-anchor-list",children:C.map(function(n){return e("li",{className:"zjpcy-anchor-link ".concat(T===n.href?"zjpcy-anchor-link-active":""),children:e("a",{href:n.href,onClick:function(r){return function(n,r){n.preventDefault();var e=document.querySelector(r);if(e){var t=g();R.current=!0,x.current=r,j(r),N.current=r,E&&E(r),setTimeout(function(){if(t!==window.document.documentElement&&t!==document.body){var n=t.getBoundingClientRect(),r=(o=e.getBoundingClientRect()).top-n.top+t.scrollTop-p;t&&"function"==typeof t.scrollTo&&t.scrollTo({top:r,behavior:"smooth"})}else{var o=e.getBoundingClientRect(),c=window.pageYOffset||document.documentElement.scrollTop;r=o.top+c-p,window.scrollTo({top:r,behavior:"smooth"})}setTimeout(function(){R.current=!1},1500)},0)}}(r,n.href)},className:"zjpcy-anchor-link-a",children:n.title})},n.href)})})})};l.Link=u;var a=l;export{a as default};
|
package/dist/es/Button/Button.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as e,__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsxs as i,jsx as n}from"react/jsx-runtime";import l from"react";import r from"classnames";import a from"../Icon/Icon.js";var s=l.forwardRef(function(l,s){var o=l.children,c=l.variant,d=l.type,m=l.size,p=void 0===m?"medium":m,y=l.disabled,f=void 0!==y&&y,u=l.loading,g=void 0!==u&&u,h=l.onClick,b=l.className,v=l.style,j=l.icon,k=l.htmlType,x=void 0===k?"button":k,z=l.href,N=l.title,C=e(l,["children","variant","type","size","disabled","loading","onClick","className","style","icon","htmlType","href","title"]),R=null!=c?c:d&&["primary","secondary","danger","success","warning","link"].includes(d)?d:"secondary",I=r("zjpcy-btn","zjpcy-btn--".concat(R),"zjpcy-btn--".concat(p),{"zjpcy-btn--disabled":f||g},b),w=function(e){f||g?null==e||e.preventDefault():h&&h()},T=function(){return g?n(a,{type:"loading",style:{marginRight:o?"2px":0}}):j?"string"==typeof j?n(a,{type:j,style:{marginRight:o?"2px":0}}):n("span",{style:{marginRight:o?"8px":0,display:"inline-flex",alignItems:"center"},children:j}):null};return"link"===R&&z?i("a",t({ref:s,href:f?void 0:z,className:I,onClick:w,style:v,title:N},C,{children:[T(),o]})):i("button",t({ref:s,type:x,className:I,onClick:w,disabled:f,style:v,title:N},C,{children:[T(),o]}))});s.displayName="Button";var o=s;export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as a,__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as n,jsx as l,Fragment as c}from"react/jsx-runtime";import r,{useState as i,useMemo as d,useCallback as t}from"react";import s from"classnames";import{Solar as u}from"lunar-typescript";import o from"../Icon/Icon.js";import _ from"../Input/index.js";import p from"../Input/Textarea.js";import h from"../Modal/index.js";import m from"../Button/Button.js";import y from"../Tooltip/Tooltip.js";var z=function(a){var e=u.fromYmd(a.getFullYear(),a.getMonth()+1,a.getDate()),n=e.getLunar(),l=n.getJieQi(),c=[],r=n.getFestivals();r&&c.push.apply(c,r);var i=n.getOtherFestivals();i&&c.push.apply(c,i);var d=n.getDay(),t={0:"建",1:"除",2:"满",3:"平",4:"定",5:"执",6:"破",7:"危",8:"成",9:"收",10:"开",11:"闭"}[d%12],s={0:{name:"青龙",luck:"吉"},1:{name:"明堂",luck:"吉"},2:{name:"天刑",luck:"凶"},3:{name:"朱雀",luck:"凶"},4:{name:"金匮",luck:"吉"},5:{name:"天德",luck:"吉"},6:{name:"白虎",luck:"凶"},7:{name:"玉堂",luck:"吉"},8:{name:"天牢",luck:"凶"},9:{name:"玄武",luck:"凶"},10:{name:"司命",luck:"吉"},11:{name:"勾陈",luck:"凶"}}[d%12],o=n.getBaZi(),_=[],p=[];"开"!==t&&"成"!==t&&"满"!==t&&"定"!==t||_.push("天德","月德","三合","六合"),"除"!==t&&"执"!==t&&"收"!==t||_.push("天恩","母仓","不将"),l&&_.push("节气","天赦"),"破"!==t&&"危"!==t&&"闭"!==t||p.push("月破","大耗","四击"),"凶"===s.luck&&p.push(s.name);var h=n.getXiu(),m=n.getXiuLuck(),y=n.getXiuSong(),z=n.getDayInGanZhi().charAt(0);return{year:n.getYear(),month:n.getMonth(),day:n.getDay(),monthName:n.getMonthInChinese(),dayName:n.getDayInChinese(),yearName:n.getYearInChinese(),isLeap:!1,julianDay:e.getJulianDay(),week:n.getWeekInChinese(),zodiac:n.getYearShengXiao(),ganZhiYear:n.getYearInGanZhi(),ganZhiMonth:n.getMonthInGanZhi(),ganZhiDay:n.getDayInGanZhi(),term:l||void 0,festivals:c,isTermDay:!!l,pengZuDay:n.getPengZuGan()+" "+n.getPengZuZhi(),pengZuHour:"",yi:"破"===t||"危"===t?["祭祀","沐浴","扫舍"]:["祭祀","祈福","嫁娶","出行","开市"],ji:"破"===t||"危"===t?["嫁娶","安葬","开市"]:["动土","开仓","纳采"],jiShen:_,xiongSha:p,xiGod:{name:{"甲":"东北","乙":"东北","丙":"西南","丁":"西南","戊":"东南","己":"东南","庚":"西北","辛":"西北","壬":"正南","癸":"正南"}[z]||"正南",description:"喜神方位"},fuGod:{name:"正东",description:"福神方位"},caiGod:{name:n.getDayPositionCai(),description:"财神方位"},yangGuiGod:{name:n.getDayPositionYangGui(),description:"阳贵神方位"},yinGuiGod:{name:n.getDayPositionYinGui(),description:"阴贵神方位"},taiShen:n.getDayPositionTai(),chongSha:n.getDayChongDesc(),sha:n.getDaySha(),naYin:"",yearNaYin:n.getYearNaYin(),monthNaYin:n.getMonthNaYin(),dayNaYin:n.getDayNaYin(),xiu:h||"",xiuAnimal:n.getAnimal()||"",xiuLuck:m||"",xiuSong:y||"",baZiYear:o[0]||"",baZiMonth:o[1]||"",baZiDay:o[2]||"",baZiHour:o[3]||"",baZi:o.join(" ")||"",yearWuXing:"",monthWuXing:"",dayWuXing:"",hourWuXing:"",yearShiShen:"",monthShiShen:"",hourShiShen:"",zhiXing:t,zhiXingDesc:{"建":"宜:出行、上任、会友、上书、见工。忌:动土、开仓、婚嫁、纳采。","除":"宜:除服、疗病、出行、拆卸、入宅。忌:求官、上任、开张、搬家。","满":"宜:修造、嫁娶、移徙、开市、交易。忌:栽种、下葬、求医、赴任。","平":"宜:修饰垣墙、平治道涂。忌:诸事不宜。","定":"宜:嫁娶、纳采、祭祀、祈福、出行。忌:求医、诉讼、赴任、出行。","执":"宜:祭祀、祈福、纳表、进章、捕捉。忌:开市、交易、纳财、出行。","破":"宜:破屋、求医、治病、坏垣。忌:嫁娶、安葬、纳采、出行。","危":"宜:祭祀、祈福、斋醮、酬神。忌:嫁娶、开市、安葬。","成":"宜:嫁娶、纳采、祭祀、祈福、开市。忌:安葬、出行、赴任。","收":"宜:祭祀、祈福、纳采、嫁娶、出行。忌:开市、动土、安葬。","开":"宜:嫁娶、纳采、开市、出行、动土。忌:安葬、祭祀、入殓。","闭":"宜:安葬、祭祀、祈福、纳采、嫁娶。忌:出行、动土、开市。"}[t]||"",shiErShen:s.name,shiErShenLuck:s.luck,isHuangDao:"吉"===s.luck,huangDaoName:s.name}},j=function(a){if(a.term)return a.term;var e=a.dayName;return"初一"===e?a.isLeap?"闰".concat(a.monthName):a.monthName:e},N=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],v=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f=["日","一","二","三","四","五","六"],g={fields:[{name:"title",label:"标题",type:"text",placeholder:"请输入标题",required:!0},{name:"content",label:"内容",type:"textarea",placeholder:"请输入内容"}],submitText:"保存",cancelText:"取消"},b=function(a,e){return new Date(a,e+1,0).getDate()},k=function(a,e){return a.getFullYear()===e.getFullYear()&&a.getMonth()===e.getMonth()&&a.getDate()===e.getDate()},D=function(a,e){return e.some(function(e){return k(e,a)})},C=function(a){var e=a.getFullYear(),n=String(a.getMonth()+1).padStart(2,"0"),l=String(a.getDate()).padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(l)},S=function(a,e,n){for(var l=[],c=b(a,e),r=function(a,e){return new Date(a,e,1).getDay()}(a,e),i=r>=n?r-n:7-(n-r),d=0===e?11:e-1,t=0===e?a-1:a,s=b(t,d),u=i-1;u>=0;u--)l.push(new Date(t,d,s-u));for(u=1;u<=c;u++)l.push(new Date(a,e,u));var o=42-l.length,_=11===e?0:e+1,p=11===e?a+1:a;for(u=1;u<=o;u++)l.push(new Date(p,_,u));return l},x=function(u){var b=u.selectionMode,x=void 0===b?"single":b,Y=u.value,Z=u.defaultValue,w=u.onChange,M=u.dateCellRender,G=u.monthCellRender,A=u.disabledDate,L=u.headerRender,X=u.mode,I=u.onPanelChange,F=u.fullscreen,W=void 0===F||F,T=u.size,P=void 0===T?"default":T,E=u.layout,H=void 0===E?"horizontal":E,J=u.className,q=u.style,O=u.firstDayOfWeek,R=void 0===O?0:O,B=u.showWeekend,Q=void 0===B||B,V=u.editable,K=void 0!==V&&V,U=u.dateInfo,$=void 0===U?{}:U,aa=u.onDateInfoChange,ea=u.panelFormConfig,na=void 0===ea?g:ea,la=u.showLunar,ca=void 0!==la&&la,ra=u.lunarRender,ia=u.enableLunarDetail,da=void 0!==ia&&ia,ta=i(function(){return"multiple"===x?Z?Array.isArray(Z)?Z:[Z]:[]:Z||new Date}),sa=ta[0],ua=ta[1],oa=i("month"),_a=oa[0],pa=oa[1],ha=i(!1),ma=ha[0],ya=ha[1],za=i(null),ja=za[0],Na=za[1],va=i({}),fa=va[0],ga=va[1],ba=i(null),ka=ba[0],Da=ba[1],Ca=i(!1),Sa=Ca[0],xa=Ca[1],Ya=i(null),Za=Ya[0],wa=Ya[1],Ma=void 0!==Y?Y:sa,Ga=void 0!==X?X:_a,Aa=d(function(){return"multiple"===x?Array.isArray(Ma)&&Ma.length>0?Ma[0]:new Date:Ma},[x,Ma]),La=i(function(){return Aa}),Xa=La[0],Ia=La[1];r.useEffect(function(){Ia(function(a){return k(a,Aa)?a:Aa})},[Aa]);var Fa=Xa.getFullYear(),Wa=Xa.getMonth(),Ta=d(function(){return function(a){var n=f.map(function(a,e){return{label:a,index:e,isWeekend:0===e||6===e}});return 0===a?n:e(e([],n.slice(a),!0),n.slice(0,a),!0)}(R)},[R]),Pa=d(function(){return S(Fa,Wa,R)},[Fa,Wa,R]),Ea=t(function(a){var e=C(a);return $[e]||[]},[$]),Ha=t(function(a){if("multiple"===x){var e=Array.isArray(Ma)?Ma:[];return D(a,e)}return k(a,Ma)},[x,Ma]),Ja=t(function(a){if(!(null==A?void 0:A(a)))if("multiple"===x){var n=Array.isArray(Ma)?Ma:[],l=void 0;l=D(a,n)?function(a,e){return e.filter(function(e){return!k(e,a)})}(a,n):function(a,n){return D(a,n)?n:e(e([],n,!0),[a],!1)}(a,n),void 0===Y&&ua(l),null==w||w(l)}else void 0===Y&&ua(a),null==w||w(a),K&&(Na(a),Da(null),ga({}),ya(!0))},[A,w,Y,K,x,Ma]),qa=t(function(a){var e=new Date(Xa);e.setMonth(a),void 0===Y&&ua(e),null==w||w(e),Ia(e),pa("month")},[Xa,Y,w]),Oa=t(function(a){pa(a),null==I||I(Xa,a)},[Xa,I]),Ra=t(function(a){var e=new Date(Xa);e.setFullYear(e.getFullYear()+a),Ia(e),null==I||I(e,Ga)},[Xa,Ga,I]),Ba=t(function(a){var e=new Date(Xa);e.setMonth(e.getMonth()+a),Ia(e),null==I||I(e,Ga)},[Xa,Ga,I]),Qa=t(function(){ya(!1),Na(null),ga({}),Da(null)},[]),Va=t(function(a){wa(a),xa(!0)},[]),Ka=t(function(){xa(!1),wa(null)},[]),Ua=t(function(e,n){ga(function(l){var c;return a(a({},l),((c={})[e]=n,c))})},[]),$a=t(function(){var a;if(ja){for(var n=0,l=na.fields.filter(function(a){return a.required});n<l.length;n++){var c=l[n];if(!(null===(a=fa[c.name])||void 0===a?void 0:a.trim()))return}var r,i=C(ja),d=$[i]||[];null!==ka?(r=e([],d,!0))[ka]={title:fa.title||"",content:fa.content||"",color:fa.color||"#1890ff"}:r=e(e([],d,!0),[{title:fa.title||"",content:fa.content||"",color:fa.color||"#1890ff"}],!1),null==aa||aa(ja,r),Qa()}},[ja,fa,ka,$,aa,na.fields,Qa]),ae=t(function(a,e){Da(a),ga({title:e.title,content:e.content||"",color:e.color||"#1890ff"})},[]),ee=t(function(a){if(ja){var e=C(ja),n=($[e]||[]).filter(function(e,n){return n!==a});null==aa||aa(ja,n),ka===a&&(Da(null),ga({}))}},[ja,$,aa,ka]),ne=function(a,e){var c=e.slice(0,2),r=e.length-2;return n("div",{className:"zjpcy-calendar__date-info-list",children:[c.map(function(a,e){return n("div",{className:"zjpcy-calendar__date-info-item",style:{color:a.color||"#1890ff"},children:[l("span",{className:"zjpcy-calendar__date-info-dot",style:{backgroundColor:a.color||"#1890ff"}}),l("span",{className:"zjpcy-calendar__date-info-text",children:a.title})]},e)}),r>0&&n("div",{className:"zjpcy-calendar__date-info-more",children:["+",r," 更多"]})]})},le=function(a){return l("div",{className:"zjpcy-calendar__info-tooltip",children:a.map(function(a,e){return n("div",{className:"zjpcy-calendar__info-tooltip-item",children:[n("div",{className:"zjpcy-calendar__info-tooltip-title",style:{color:a.color||"#1890ff"},children:[l("span",{className:"zjpcy-calendar__info-tooltip-dot",style:{backgroundColor:a.color||"#1890ff"}}),a.title]}),a.content&&l("div",{className:"zjpcy-calendar__info-tooltip-content",children:a.content})]},e)})})},ce=s("zjpcy-calendar",{"zjpcy-calendar--fullscreen":W,"zjpcy-calendar--small":"small"===P,"zjpcy-calendar--layout-vertical":"vertical"===H,"zjpcy-calendar--small-vertical":"small"===P&&"vertical"===H},J);return n("div",{className:ce,style:q,children:[L?L({value:Xa,onChange:Ia,type:Ga,onTypeChange:Oa}):n("div",{className:"zjpcy-calendar__header",children:[n("div",{className:"zjpcy-calendar__header-left",children:[l(m,{className:"zjpcy-calendar__header-btn",onClick:function(){return Ra(-1)},title:"上一年",children:l(o,{type:"double-left",style:{fontSize:12}})}),"month"===Ga&&l(m,{className:"zjpcy-calendar__header-btn",onClick:function(){return Ba(-1)},title:"上个月",children:l(o,{type:"left",style:{fontSize:12}})})]}),n("div",{className:"zjpcy-calendar__header-title",children:[n(m,{className:"zjpcy-calendar__header-title-btn",onClick:function(){return Oa("year")},children:[Fa,"年"]}),"month"===Ga&&l(m,{className:"zjpcy-calendar__header-title-btn",onClick:function(){return Oa("year")},children:N[Wa]})]}),n("div",{className:"zjpcy-calendar__header-right",children:["month"===Ga&&l(m,{className:"zjpcy-calendar__header-btn",onClick:function(){return Ba(1)},title:"下个月",children:l(o,{type:"right",style:{fontSize:12}})}),l(m,{className:"zjpcy-calendar__header-btn",onClick:function(){return Ra(1)},title:"下一年",children:l(o,{type:"double-right",style:{fontSize:12}})})]})]}),l("div",{className:"zjpcy-calendar__body",children:"month"===Ga?n(c,{children:[l("div",{className:"zjpcy-calendar__weekday-header",children:Ta.map(function(a){var e=a.label,n=a.index,c=a.isWeekend;return l("div",{className:s("zjpcy-calendar__weekday-cell",{"zjpcy-calendar__weekday-cell--weekend":c}),children:e},n)})}),l("div",{className:"zjpcy-calendar__date-grid",children:Pa.map(function(a,e){var c=a.getMonth()===Wa,r=function(a){return k(a,new Date)}(a),i=Ha(a),d=(null==A?void 0:A(a))||!1,t=0===a.getDay()||6===a.getDay(),u=!Q&&t,o=Ea(a),_=o.length>0,p=ca?z(a):null,h=void 0!==(null==p?void 0:p.term)&&""!==p.term,m=n("div",{className:s("zjpcy-calendar__date-cell",{"zjpcy-calendar__date-cell--other-month":!c,"zjpcy-calendar__date-cell--today":r,"zjpcy-calendar__date-cell--selected":i,"zjpcy-calendar__date-cell--disabled":d,"zjpcy-calendar__date-cell--hidden":u,"zjpcy-calendar__date-cell--has-info":_,"zjpcy-calendar__date-cell--show-lunar":ca&&p}),onClick:function(){return Ja(a)},onDoubleClick:function(){return da&&ca&&p&&Va(a)},children:[n("div",{className:"zjpcy-calendar__date-cell-header",children:[l("span",{className:s("zjpcy-calendar__date-number",{"zjpcy-calendar__date-number--today":r}),children:a.getDate()}),ca&&p&&l("span",{className:s("zjpcy-calendar__lunar-text",{"zjpcy-calendar__lunar-text--term":h}),title:"".concat(p.ganZhiYear," ").concat(p.zodiac,"年 ").concat(p.monthName).concat(p.dayName),children:ra?ra(p):j(p)})]}),M&&l("div",{className:"zjpcy-calendar__date-content",children:M(a,p||void 0)}),_&&ne(0,o)]},e);return _&&o.length>2?l(y,{title:le(o),placement:"top",delay:200,children:m},e):m})})]}):l("div",{className:"zjpcy-calendar__month-grid",children:N.map(function(a,e){var r=new Date(Fa,e,1),i=function(){if("multiple"===x)return(Array.isArray(Ma)?Ma:[]).some(function(a){return a.getMonth()===e&&a.getFullYear()===Fa});var a=Ma;return a.getMonth()===e&&a.getFullYear()===Fa}();return l("div",{className:s("zjpcy-calendar__month-cell",{"zjpcy-calendar__month-cell--selected":i}),onClick:function(){return qa(e)},children:G?G(r):n(c,{children:[l("span",{className:"zjpcy-calendar__month-name",children:a}),l("span",{className:"zjpcy-calendar__month-subtitle",children:v[e]})]})},e)})})}),function(){if(!ma||!ja)return null;var a=C(ja),e=$[a]||[],r=na,i=n(c,{children:[null!==ka&&l(m,{className:"zjpcy-calendar__panel-btn is-secondary",onClick:function(){Da(null),ga({})},children:"取消编辑"}),l(m,{className:"zjpcy-calendar__panel-btn is-secondary",onClick:Qa,children:r.cancelText||"取消"}),l(m,{className:"zjpcy-calendar__panel-btn is-primary",onClick:$a,children:null!==ka?"保存修改":r.submitText||"保存"})]});return l(h,{visible:ma,title:"".concat(ja.toLocaleDateString("zh-CN")," 信息编辑"),width:480,onCancel:Qa,onOk:$a,footer:i,children:n("div",{className:"zjpcy-calendar__panel-body",children:[e.length>0&&n("div",{className:"zjpcy-calendar__panel-list",children:[l("h4",{className:"zjpcy-calendar__panel-section-title",children:"已有信息"}),e.map(function(a,e){return n("div",{className:s("zjpcy-calendar__panel-list-item",{"is-editing":ka===e}),children:[n("div",{className:"zjpcy-calendar__panel-list-content",children:[l("span",{className:"zjpcy-calendar__panel-list-dot",style:{backgroundColor:a.color||"#1890ff"}}),n("div",{className:"zjpcy-calendar__panel-list-text",children:[l("div",{className:"zjpcy-calendar__panel-list-title",children:a.title}),a.content&&l("div",{className:"zjpcy-calendar__panel-list-desc",children:a.content})]})]}),n("div",{className:"zjpcy-calendar__panel-list-actions",children:[l(m,{className:"zjpcy-calendar__panel-list-btn",onClick:function(){return ae(e,a)},children:"编辑"}),l(m,{className:"zjpcy-calendar__panel-list-btn is-danger",onClick:function(){return ee(e)},children:"删除"})]})]},e)})]}),n("div",{className:"zjpcy-calendar__panel-form",children:[l("h4",{className:"zjpcy-calendar__panel-section-title",children:null!==ka?"编辑信息":"添加新信息"}),r.fields.map(function(a){return n("div",{className:"zjpcy-calendar__panel-field",children:[n("label",{className:"zjpcy-calendar__panel-label",children:[a.label,a.required&&l("span",{className:"zjpcy-calendar__panel-required",children:"*"})]}),"textarea"===a.type?l(p,{className:"zjpcy-calendar__panel-textarea",value:fa[a.name]||"",onChange:function(e){return Ua(a.name,e.target.value)},placeholder:a.placeholder,rows:3}):l(_,{className:"zjpcy-calendar__panel-input",value:fa[a.name]||"",onChange:function(e){return Ua(a.name,e.target.value)},placeholder:a.placeholder})]},a.name)}),n("div",{className:"zjpcy-calendar__panel-color",children:[l("label",{className:"zjpcy-calendar__panel-label",children:"颜色标记"}),l("div",{className:"zjpcy-calendar__panel-color-picker",children:["#1890ff","#52c41a","#faad14","#f5222d","#722ed1","#13c2c2"].map(function(a){return l("button",{className:s("zjpcy-calendar__panel-color-option",{"is-active":fa.color===a||!fa.color&&"#1890ff"===a}),style:{backgroundColor:a},onClick:function(){return Ua("color",a)}},a)})})]})]})]})})}(),function(){if(!Sa||!Za)return null;var a=z(Za),e=Za.toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric",weekday:"long"});return l("div",{className:"zjpcy-calendar__lunar-overlay",onClick:Ka,children:n("div",{className:"zjpcy-calendar__lunar-panel",onClick:function(a){return a.stopPropagation()},children:[n("div",{className:"zjpcy-calendar__lunar-header",children:[n("h3",{className:"zjpcy-calendar__lunar-title",children:[l("span",{className:"zjpcy-calendar__lunar-date",children:e}),n("span",{className:"zjpcy-calendar__lunar-tag",children:[a.ganZhiYear," ",a.zodiac,"年"]})]}),l(m,{className:"zjpcy-calendar__lunar-close",onClick:Ka,children:l(o,{type:"close",size:16})})]}),n("div",{className:"zjpcy-calendar__lunar-body",children:[n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"农历信息"}),n("div",{className:"zjpcy-calendar__lunar-grid",children:[n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"农历日期"}),n("span",{className:"zjpcy-calendar__lunar-value",children:[a.yearName," ",a.monthName,a.dayName]})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"星期"}),n("span",{className:"zjpcy-calendar__lunar-value",children:["星期",a.week]})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"儒略日"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.julianDay})]}),a.term&&n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"节气"}),l("span",{className:"zjpcy-calendar__lunar-value zjpcy-calendar__lunar-value--highlight",children:a.term})]}),a.festivals.length>0&&n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"节日"}),l("span",{className:"zjpcy-calendar__lunar-value zjpcy-calendar__lunar-value--highlight",children:a.festivals.join("、")})]})]})]}),n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"八字信息"}),n("div",{className:"zjpcy-calendar__lunar-bazi",children:[n("div",{className:"zjpcy-calendar__lunar-bazi-item",children:[l("span",{className:"zjpcy-calendar__lunar-bazi-label",children:"年柱"}),l("span",{className:"zjpcy-calendar__lunar-bazi-value",children:a.baZiYear}),l("span",{className:"zjpcy-calendar__lunar-bazy-na",children:a.yearNaYin})]}),n("div",{className:"zjpcy-calendar__lunar-bazi-item",children:[l("span",{className:"zjpcy-calendar__lunar-bazi-label",children:"月柱"}),l("span",{className:"zjpcy-calendar__lunar-bazi-value",children:a.baZiMonth}),l("span",{className:"zjpcy-calendar__lunar-bazy-na",children:a.monthNaYin})]}),n("div",{className:"zjpcy-calendar__lunar-bazi-item",children:[l("span",{className:"zjpcy-calendar__lunar-bazi-label",children:"日柱"}),l("span",{className:"zjpcy-calendar__lunar-bazi-value",children:a.baZiDay}),l("span",{className:"zjpcy-calendar__lunar-bazy-na",children:a.dayNaYin})]}),n("div",{className:"zjpcy-calendar__lunar-bazi-item",children:[l("span",{className:"zjpcy-calendar__lunar-bazi-label",children:"时柱"}),l("span",{className:"zjpcy-calendar__lunar-bazi-value",children:a.baZiHour||"待定"}),l("span",{className:"zjpcy-calendar__lunar-bazy-na",children:"-"})]})]}),n("div",{className:"zjpcy-calendar__lunar-item",style:{marginTop:12},children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"完整八字"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.baZi||"待定"})]})]}),n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"二十八宿"}),n("div",{className:"zjpcy-calendar__lunar-grid",children:[n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"星宿"}),n("span",{className:"zjpcy-calendar__lunar-value",children:[a.xiu," ",a.xiuAnimal]})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"星宿吉凶"}),l("span",{className:s("zjpcy-calendar__lunar-value",{"zjpcy-calendar__lunar-value--good":"吉"===a.xiuLuck,"zjpcy-calendar__lunar-value--bad":"凶"===a.xiuLuck}),children:a.xiuLuck})]})]}),a.xiuSong&&l("div",{className:"zjpcy-calendar__lunar-song",children:a.xiuSong})]}),n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"黄道日"}),n("div",{className:"zjpcy-calendar__lunar-grid",children:[n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"十二值星"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.zhiXing})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"十二神"}),n("span",{className:s("zjpcy-calendar__lunar-value",{"zjpcy-calendar__lunar-value--good":"吉"===a.shiErShenLuck,"zjpcy-calendar__lunar-value--bad":"凶"===a.shiErShenLuck}),children:[a.shiErShen,"(",a.shiErShenLuck,")"]})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"黄道吉日"}),l("span",{className:s("zjpcy-calendar__lunar-value",{"zjpcy-calendar__lunar-value--good":a.isHuangDao,"zjpcy-calendar__lunar-value--bad":!a.isHuangDao}),children:a.isHuangDao?"是":"否"})]})]}),a.zhiXingDesc&&l("div",{className:"zjpcy-calendar__lunar-desc",children:a.zhiXingDesc})]}),n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"彭祖百忌"}),l("div",{className:"zjpcy-calendar__lunar-text-content",children:l("p",{children:a.pengZuDay})})]}),n("div",{className:"zjpcy-calendar__lunar-section zjpcy-calendar__lunar-section--yiji",children:[n("div",{className:"zjpcy-calendar__lunar-yi",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"宜"}),l("div",{className:"zjpcy-calendar__lunar-yiji-content",children:a.yi.length>0?a.yi.map(function(a,e){return l("span",{className:"zjpcy-calendar__lunar-yiji-item",children:a},e)}):l("span",{className:"zjpcy-calendar__lunar-yiji-empty",children:"诸事不宜"})})]}),n("div",{className:"zjpcy-calendar__lunar-ji",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"忌"}),l("div",{className:"zjpcy-calendar__lunar-yiji-content",children:a.ji.length>0?a.ji.map(function(a,e){return l("span",{className:"zjpcy-calendar__lunar-yiji-item",children:a},e)}):l("span",{className:"zjpcy-calendar__lunar-yiji-empty",children:"无"})})]})]}),(a.jiShen.length>0||a.xiongSha.length>0)&&n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"神煞"}),a.jiShen.length>0&&n("div",{className:"zjpcy-calendar__lunar-shensha",children:[l("span",{className:"zjpcy-calendar__lunar-shensha-label",children:"吉神:"}),l("span",{className:"zjpcy-calendar__lunar-shensha-value zjpcy-calendar__lunar-shensha-value--good",children:a.jiShen.join("、")})]}),a.xiongSha.length>0&&n("div",{className:"zjpcy-calendar__lunar-shensha",children:[l("span",{className:"zjpcy-calendar__lunar-shensha-label",children:"凶煞:"}),l("span",{className:"zjpcy-calendar__lunar-shensha-value zjpcy-calendar__lunar-shensha-value--bad",children:a.xiongSha.join("、")})]})]}),n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"方位"}),n("div",{className:"zjpcy-calendar__lunar-grid zjpcy-calendar__lunar-grid--4",children:[n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"喜神"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.xiGod.name})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"福神"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.fuGod.name})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"财神"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.caiGod.name})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"阳贵"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.yangGuiGod.name})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"阴贵"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.yinGuiGod.name})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"胎神"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.taiShen})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"冲煞"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.chongSha})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"煞方"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.sha})]})]})]}),n("div",{className:"zjpcy-calendar__lunar-section",children:[l("h4",{className:"zjpcy-calendar__lunar-section-title",children:"五行"}),n("div",{className:"zjpcy-calendar__lunar-grid",children:[n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"年五行"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.yearWuXing})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"月五行"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.monthWuXing})]}),n("div",{className:"zjpcy-calendar__lunar-item",children:[l("span",{className:"zjpcy-calendar__lunar-label",children:"日五行"}),l("span",{className:"zjpcy-calendar__lunar-value",children:a.dayWuXing})]})]})]})]}),l("div",{className:"zjpcy-calendar__lunar-footer",children:l(m,{className:"zjpcy-calendar__lunar-btn",onClick:Ka,children:"关闭"})})]})})}()]})};x.displayName="Calendar";var Y=x;export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as t,__spreadArray as a}from"../node_modules/tslib/tslib.es6.js";import{jsxs as r,jsx as e,Fragment as n}from"react/jsx-runtime";import{useState as c,useRef as o,useCallback as i,useEffect as s,useMemo as l}from"react";import u from"classnames";import d from"../Icon/Icon.js";var p=function(p){var f=p.items,m=p.currentIndex,y=p.defaultCurrentIndex,v=void 0===y?0:y,_=p.onChange,h=p.autoplay,z=void 0===h||h,j=p.interval,g=void 0===j?3e3:j,b=p.effect,x=void 0===b?"slide":b,w=p.direction,N=void 0===w?"horizontal":w,I=p.showIndicators,k=void 0===I||I,M=p.indicatorPosition,C=void 0===M?"bottom":M,X=p.showArrows,T=void 0===X||X,Y=p.loop,D=void 0===Y||Y,A=p.pauseOnHover,L=void 0===A||A,P=p.className,E=p.style,O=p.contentClassName,R=p.contentStyle,S=p.onItemClick,Z=p.duration,B=void 0===Z?500:Z,G=p.prevIcon,H=p.nextIcon,K=p.upIcon,U=p.downIcon,q=p.indicatorProgress,F=void 0!==q&&q,J=void 0!==m,Q=c(v),V=Q[0],W=Q[1],$=J?m:V,tt=c(!1),at=tt[0],rt=tt[1],et=c(!1),nt=et[0],ct=et[1],ot=c(!1),it=ot[0],st=ot[1],lt=c([]),ut=lt[0],dt=lt[1],pt=c([]),ft=pt[0],mt=pt[1],yt=o(null),vt=o(null),_t=o(null),ht=o(null),zt=f.length,jt="vertical"===N,gt="fade"===x,bt=["flip","cards","creative","coverflow","parallax","zoom","book","curtain","mosaic","rain"].includes(x),xt=i(function(t){if(D){if(t<0)return zt-1;if(t>=zt)return 0}else{if(t<0)return 0;if(t>=zt)return zt-1}return t},[D,zt]),wt=i(function(t,a){if(void 0===a&&(a=!1),!(nt||zt<=1)){var r=xt(t);if(r!==$){if("rain"===x&&a&&!it)return st(!0),dt(Xt()),void(yt.current=setTimeout(function(){ct(!0),J||W(r),null==_||_(r),setTimeout(function(){ct(!1),st(!1),dt([])},B)},1500));ct(!0),J||W(r),null==_||_(r),setTimeout(function(){ct(!1)},B)}}},[$,J,nt,_,xt,B,zt,x,it]),Nt=i(function(){wt($+1)},[$,wt]),It=i(function(){wt($-1)},[$,wt]);s(function(){if(z&&!(zt<=1)&&(!L||!at))return _t.current=setInterval(function(){Nt()},g),function(){_t.current&&clearInterval(_t.current)}},[z,g,at,L,Nt,zt]);var kt=l(function(){return gt||bt?0:100*-$},[$,gt,bt]),Mt=i(function(t,a,r){if(!D)return t-a;var e=t-a,n=e>0?e-r:e+r;return Math.abs(e)<=Math.abs(n)?e:n},[D]),Ct=function(t){if(!bt)return{};var a=t===$,r=Mt(t,$,zt);switch(x){case"flip":return{transform:"rotateY(".concat(c=180*r,"deg)"),opacity:Math.abs(r)<=1?a?1:.5:0,zIndex:a?10:1};case"cards":var e=a?0:-100,n=a?1:.9,c=5*r;return{transform:"translateX(".concat(l=30*r,"%) translateZ(").concat(e,"px) scale(").concat(n,") rotateY(").concat(c,"deg)"),opacity:a?1:Math.abs(r)<=2?.6-.2*Math.abs(r):0,zIndex:a?10:5-Math.abs(r)};case"coverflow":var o=Math.abs(r);c=-45*r,e=a?0:-200,n=a?1:.8;return{transform:"translateX(".concat(l=50*r,"%) translateZ(").concat(e,"px) rotateY(").concat(c,"deg) scale(").concat(n,")"),opacity:o<=2?1-.3*o:0,zIndex:a?10:5-o};case"parallax":n=a?1:.8;return{transform:"translateX(".concat(l=100*r,"%) scale(").concat(n,")"),opacity:Math.abs(r)<=1?1:0,zIndex:a?10:5};case"zoom":var i=a?1:0,s=a?0:10;return{transform:"scale(".concat(n=a?1:2,")"),opacity:i,filter:"blur(".concat(s,"px)"),zIndex:a?10:1};case"book":i=a?1:-1===r?.3:0;return{transform:"rotateY(".concat(c=r<0?-90:r>0?90:0,"deg)"),opacity:i,zIndex:a?10:5};case"mosaic":var l=20*r,u=5*r;return{transform:"scale(".concat(n=a?1:.8,") translateX(").concat(l,"%) rotate(").concat(u,"deg)"),opacity:a?1:0,filter:a?"blur(0)":"blur(5px)",zIndex:a?10:5};case"creative":default:return{};case"curtain":var d=a?1:0,p=r<0?"right":"left";return{transform:"translateX(".concat(l=a?0:r<0?-100:100,"%) scaleX(").concat(d,")"),opacity:a?1:0,zIndex:a?10:5,transformOrigin:p}}},Xt=i(function(){for(var t=[],a=0;a<80;a++){var r=Math.random()>.7;t.push({id:a,left:100*Math.random(),delay:1.5*Math.random(),duration:.4+.4*Math.random(),isLarge:r})}return t},[]),Tt=u("zjpcy-carousel","zjpcy-carousel--".concat(x),"zjpcy-carousel--".concat(N),{"zjpcy-carousel--hover":at,"zjpcy-carousel--raining":it},P),Yt=u("zjpcy-carousel__content",O),Dt=u("zjpcy-carousel__indicators","zjpcy-carousel__indicators--".concat(C));return 0===zt?null:r("div",{ref:vt,className:Tt,style:E,onMouseEnter:function(){return rt(!0)},onMouseLeave:function(){return rt(!1)},onTouchStart:function(t){var a=t.touches[0];ht.current={x:a.clientX,y:a.clientY}},onTouchEnd:function(t){if(ht.current){var a=t.changedTouches[0],r=a.clientX-ht.current.x,e=a.clientY-ht.current.y;jt?Math.abs(e)>50&&(e>0?It():Nt()):Math.abs(r)>50&&(r>0?It():Nt()),ht.current=null}},onKeyDown:function(t){"ArrowLeft"===t.key||"ArrowUp"===t.key?It():"ArrowRight"!==t.key&&"ArrowDown"!==t.key||Nt()},onClick:function(t){var r;if("rain"===x){var e=null===(r=vt.current)||void 0===r?void 0:r.getBoundingClientRect();if(e){var n=t.clientX-e.left,c=t.clientY-e.top,o={id:Date.now(),x:n,y:c};mt(function(t){return a(a([],t,!0),[o],!1)}),st(!0),dt(Xt()),setTimeout(function(){Nt(),st(!1),dt([])},1500),setTimeout(function(){mt(function(t){return t.filter(function(t){return t.id!==o.id})})},1e3)}}},tabIndex:0,role:"region","aria-roledescription":"carousel",children:[e("div",{className:Yt,style:t(t({},R),bt||gt?{}:{transform:jt?"translateY(".concat(kt,"%)"):"translateX(".concat(kt,"%)"),transitionDuration:"".concat(B,"ms")}),children:f.map(function(a,n){var c=n===$,o=n-$,i=u("zjpcy-carousel__item",{"zjpcy-carousel__item--active":c,"zjpcy-carousel__item--prev":-1===o,"zjpcy-carousel__item--next":1===o,"zjpcy-carousel__item--exit":"book"===x&&-1===o});return e("div",{className:i,style:t({},bt?Ct(n):gt?{opacity:c?1:0,zIndex:c?1:0,transitionDuration:"".concat(B,"ms")}:{}),role:"group","aria-roledescription":"slide","aria-label":"".concat(n+1," of ").concat(zt),"aria-hidden":!c,children:a.render?a.render():r("div",{className:"zjpcy-carousel__item-inner",onClick:function(){return function(t,a){t.link&&window.open(t.link,"_blank"),null==S||S(t,a)}(a,n)},style:{cursor:a.link||S?"pointer":"default"},children:[e("img",{src:a.image,alt:"string"==typeof a.title?a.title:"",className:"zjpcy-carousel__image",draggable:!1}),(a.title||a.description)&&r("div",{className:u("zjpcy-carousel__info","zjpcy-carousel__info--".concat(a.infoPosition||"bottom")),children:[a.title&&e("div",{className:"zjpcy-carousel__title",children:a.title}),a.description&&e("div",{className:"zjpcy-carousel__description",children:a.description})]})]})},a.key)})}),T&&zt>1&&r(n,{children:[e("button",{className:u("zjpcy-carousel__arrow","zjpcy-carousel__arrow--prev"),onClick:It,"aria-label":"Previous slide",type:"button",children:jt?null!=K?K:e(d,{type:"arrow-up",size:20}):null!=G?G:e(d,{type:"chevron-left",size:20})}),e("button",{className:u("zjpcy-carousel__arrow","zjpcy-carousel__arrow--next"),onClick:Nt,"aria-label":"Next slide",type:"button",children:jt?null!=U?U:e(d,{type:"arrow-down",size:20}):null!=H?H:e(d,{type:"chevron-right",size:20})})]}),k&&zt>1&&e("div",{className:Dt,role:"tablist",children:f.map(function(t,a){var r=a===$,n=F&&z&&r;return e("button",{className:u("zjpcy-carousel__indicator",{"zjpcy-carousel__indicator--active":r,"zjpcy-carousel__indicator--progress":n}),onClick:function(){return wt(a)},role:"tab","aria-selected":r,"aria-label":"Go to slide ".concat(a+1),type:"button",style:n?{"--progress-duration":"".concat(g,"ms")}:void 0,children:n&&e("span",{className:"zjpcy-carousel__indicator-progress-bar"},"progress-".concat($))},"".concat(t.key,"-").concat(n?"progress":"static"))})}),r("div",{className:"zjpcy-carousel__pagination",children:[e("span",{className:"zjpcy-carousel__pagination-current",children:$+1}),e("span",{className:"zjpcy-carousel__pagination-separator",children:"/"}),e("span",{className:"zjpcy-carousel__pagination-total",children:zt})]}),"rain"===x&&e("div",{className:"zjpcy-carousel__rain-overlay"}),"rain"===x&&ut.map(function(t){return e("span",{className:u("zjpcy-carousel__rain-drop",{"zjpcy-carousel__rain-drop--large":t.isLarge}),style:{left:"".concat(t.left,"%"),animationDelay:"".concat(t.delay,"s"),animationDuration:"".concat(t.duration,"s")}},t.id)}),"rain"===x&&ft.map(function(t){return e("span",{className:"zjpcy-carousel__ripple",style:{left:t.x-20,top:t.y-20,width:40,height:40}},t.id)})]})};export{p as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__spreadArray as n,__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as r,jsx as t}from"react/jsx-runtime";import{useState as a,useRef as c,useCallback as i,useEffect as o}from"react";import u from"../Icon/Icon.js";import l from"../Empty/index.js";var s=function(s){var f,d=s.value,v=s.defaultValue,h=s.onChange,p=s.options,m=void 0===p?[]:p,g=s.placeholder,y=void 0===g?"请选择":g,b=s.disabled,x=void 0!==b&&b,N=s.size,A=void 0===N?"middle":N,k=s.style,w=s.className,j=void 0===w?"":w,C=s.allowClear,I=void 0===C||C,z=s.expandTrigger,E=void 0===z?"click":z,W=s.changeOnSelect,L=void 0!==W&&W,P=s.fieldNames,R=void 0===P?{}:P,T=s.width,B=s.dropdownWidth,H=s.dropdownHeight,O=s.dropdownStyle,S=void 0===O?{}:O,D=s.dropdownClassName,M=void 0===D?"":D,V=s.placement,_=void 0===V?"bottomLeft":V,q=s.checkbox,F=void 0!==q&&q,G=s.autoWidth,J=void 0!==G&&G,K=a(!1),Q=K[0],U=K[1],X=a([]),Y=X[0],Z=X[1],$=a([]),nn=$[0],en=$[1],rn=c(null),tn=c(null),an=R.label,cn=void 0===an?"label":an,on=R.value,un=void 0===on?"value":on,ln=R.children,sn=void 0===ln?"children":ln,fn=i(function(n){return n[un]||n.value},[un]),dn=i(function(n){return n[cn]||n.label},[cn]),vn=i(function(n){return n[sn]||n.children},[sn]),hn=i(function(n){for(var e=[],r=m,t=function(n){var t=r.find(function(e){return fn(e)===n});if(!t)return{value:e};e.push(t),r=vn(t)||[]},a=0,c=n;a<c.length;a++){var i=t(c[a]);if("object"==typeof i)return i.value}return e},[m,fn,vn]),pn=i(function(n){for(var e=[],r=m,t=function(n){var t=r.find(function(e){return fn(e)===n});if(!t)return{value:e};e.push(t),r=vn(t)||[]},a=0,c=n;a<c.length;a++){var i=t(c[a]);if("object"==typeof i)return i.value}return e},[m,fn,vn]),mn=i(function(){var n=void 0!==d?d:v;return!n||Array.isArray(n)&&0===n.length?[]:F?Array.isArray(n)&&Array.isArray(n[0])?n:[n]:Array.isArray(n)&&!Array.isArray(n[0])?[n]:[]},[d,v,F]),gn=a(mn()),yn=gn[0],bn=gn[1];o(function(){var n=void 0!==d?d:v;if(!n)return bn([]),void Z([]);if(F){var e=void 0;e=Array.isArray(n)?0===n.length?[]:Array.isArray(n[0])?n:[n]:[],bn(e);var r=e.map(function(n){return pn(n)});Z(r.map(function(n){return n&&0!==n.length?n[n.length-1]:null}).filter(function(n){return null!==n}))}else{(e=Array.isArray(n)&&!Array.isArray(n[0])?n:n[0])&&e.length>0?bn([e]):bn([])}},[d,v,F,pn]);var xn=i(function(n){var e=[],r=function(n,t){for(var a=0,c=n;a<c.length;a++){var i=c[a];if(fn(i)===fn(t))return e.push(dn(i)),!0;var o=vn(i);if(o&&o.length>0&&r(o,t))return e.unshift(dn(i)),!0}return!1};return r(m,n),e},[m,fn,dn,vn]),Nn=i(function(){if(F){if(!Y||0===Y.length)return y;var n=Y.filter(function(n){var e=vn(n);return!e||0===e.length}).map(function(n){return xn(n).join("/")});return n.length>3?n.slice(0,3).join(", ")+" +".concat(n.length-3):n.join(", ")}return 0!==yn.length&&yn[0]&&0!==yn[0].length?hn(yn[0]).map(function(n){return dn(n)}).join(" / "):y},[yn,Y,F,hn,dn,y,xn,vn]),An=i(function(e){var r=[],t=function(e,a,c){for(var i=0,o=e;i<o.length;i++){var u=o[i],l=n(n([],c,!0),[fn(u)],!1);if(fn(u)===fn(a))return r.push.apply(r,l),!0;var s=vn(u);if(s&&s.length>0&&t(s,a,l))return!0}return!1};return t(m,e,[]),r},[m,fn,vn]),kn=i(function(n,e){var r=An(e),t=An(n);if(t.length<=r.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==t[a])return!1;return!0},[An]),wn=i(function(e){var r=[],t=function(e,a,c){for(var i=0,o=e;i<o.length;i++){var u=o[i];if(fn(u)===fn(a))return r.unshift(u),!0;var l=vn(u);if(l&&l.length>0&&t(l,a,n(n([],c,!0),[u],!1)))return r.unshift(u),!0}return!1};return t(m,e,[]),r},[m,fn,vn]),jn=i(function(e,r,t){if(e.stopPropagation(),F){var a=n([],Y,!0),c=a.findIndex(function(n){return fn(n)===fn(r)});if(c>-1){a.splice(c,1);var i=a.filter(function(n){return!kn(n,r)});a.splice.apply(a,n([0,a.length],i,!1))}else{wn(r).forEach(function(n){-1===a.findIndex(function(e){return fn(e)===fn(n)})&&a.push(n)})}Z(a);var o=a.map(function(n){return An(n)});null==h||h(o,a),void 0===d&&bn(o);var u=vn(r);if(u&&u.length>0){var l=n(n([],nn.slice(0,t),!0),[fn(r)],!1);en(l)}else{l=nn.slice(0,t+1);en(l)}}},[Y,F,fn,vn,An,wn,kn,h,d,nn]),Cn=i(function(e,r){if(F){var t=n([],Y,!0),a=t.findIndex(function(n){return fn(n)===fn(e)});if(a>-1){t.splice(a,1);var c=t.filter(function(n){return!kn(n,e)});t.splice.apply(t,n([0,t.length],c,!1))}else{wn(e).forEach(function(n){-1===t.findIndex(function(e){return fn(e)===fn(n)})&&t.push(n)})}Z(t);var i=t.map(function(n){return An(n)});if(null==h||h(i,t),void 0===d&&bn(i),(u=vn(e))&&u.length>0){var o=n(n([],nn.slice(0,r),!0),[fn(e)],!1);en(o)}else{o=nn.slice(0,r+1);en(o)}}else{var u;o=n(n([],nn.slice(0,r),!0),[fn(e)],!1);if(en(o),(u=vn(e))&&u.length>0){if(L){var l=hn(o);null==h||h(o,l),void 0===d&&bn([o])}}else{var s=hn(o);null==h||h(o,s),void 0===d&&bn([o]),U(!1),en([])}}},[nn,Y,F,fn,dn,vn,L,hn,An,wn,kn,h,d]),In=i(function(e,r){if("hover"===E){var t=n(n([],nn.slice(0,r),!0),[fn(e)],!1);en(t)}},[nn,E,fn]),zn=i(function(e,r,t){if(e.stopPropagation(),F){var a=vn(r);if(a&&a.length>0){var c=n(n([],nn.slice(0,t),!0),[fn(r)],!1);en(c)}}else Cn(r,t)},[F,nn,fn,vn,Cn]),En=i(function(n){n.stopPropagation(),F?(null==h||h([],[]),Z([]),void 0===d&&bn([])):(null==h||h([],[]),void 0===d&&bn([])),en([])},[h,d,F]),Wn=i(function(e,r){if(e.stopPropagation(),F){var t=n([],Y,!0),a=fn(r),c=t.findIndex(function(n){return fn(n)===a});if(c>-1){t.splice(c,1);var i=t.filter(function(n){return!kn(n,r)});t.splice.apply(t,n([0,t.length],i,!1));for(var o=wn(r),u=function(n){var e=o[n],r=fn(e);if(!t.some(function(n){return fn(n)!==r&&kn(n,e)})){var a=t.findIndex(function(n){return fn(n)===r});a>-1&&t.splice(a,1)}},l=o.length-2;l>=0;l--)u(l);Z(t);var s=t.map(function(n){return An(n)});null==h||h(s,t),void 0===d&&bn(s)}}},[Y,F,fn,An,wn,kn,h,d]),Ln=i(function(){x||U(!Q)},[Q,x]);o(function(){var n=function(n){rn.current&&!rn.current.contains(n.target)&&(U(!1),en([]))};return Q&&document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}},[Q]);var Pn=i(function(n){if(0===n)return m;for(var e=nn.slice(0,n),r=m,t=function(n){var e=r.find(function(e){return fn(e)===n});if(!e)return{value:[]};r=vn(e)||[]},a=0,c=e;a<c.length;a++){var i=t(c[a]);if("object"==typeof i)return i.value}return r},[m,nn,fn,vn]);o(function(){F||(Q&&yn.length>0&&yn[0]?en(yn[0]):Q||en([]))},[Q,yn,F]);var Rn=i(function(n){return!!F&&Y.some(function(e){return fn(e)===fn(n)})},[Y,F,fn]),Tn=i(function(n,e){return!F&&(!(e>=yn.length||!yn[0])&&yn[0][e]===fn(n))},[yn,F,fn]),Bn=i(function(n,e){return!(e>=nn.length)&&nn[e]===fn(n)},[nn,fn]),Hn=i(function(){if(0===nn.length)return 1;for(var n=nn.length,e=m,r=function(n){var r=e.find(function(e){return fn(e)===n});if(!r)return"break";e=vn(r)||[]},t=0,a=nn;t<a.length;t++){if("break"===r(a[t]))break}return e&&e.length>0&&n++,n},[nn,m,fn,vn]),On=i(function(){var n=e({},k);return T&&(n.width="number"==typeof T?"".concat(T,"px"):T),J||T?J&&!T?n.minWidth="180px":!J&&T&&(n.maxWidth="number"==typeof T?"".concat(T,"px"):T):(n.minWidth="180px",n.maxWidth="100%"),n},[T,k,J]),Sn=i(function(){var n=e({},S);switch(_){case"bottomLeft":n.top="100%",n.left="0",n.marginTop="4px";break;case"bottomRight":n.top="100%",n.right="0",n.marginTop="4px";break;case"topLeft":n.bottom="100%",n.left="0",n.marginBottom="4px";break;case"topRight":n.bottom="100%",n.right="0",n.marginBottom="4px"}return B&&(n.width="number"==typeof B?"".concat(B,"px"):B),H&&(n.maxHeight="number"==typeof H?"".concat(H,"px"):H),n},[B,H,S,_]),Dn=F?Y.filter(function(n){var e=vn(n);return!e||0===e.length}).length>0:yn.length>0&&(null===(f=yn[0])||void 0===f?void 0:f.length)>0;return r("div",{ref:rn,className:"cascader cascader-".concat(A," ").concat(j," ").concat(x?"cascader-disabled":""," ").concat(Q?"cascader-open":""," ").concat(Dn?"cascader-has-value":""),style:On(),children:[r("div",{className:"cascader-trigger",onClick:Ln,children:[t("span",{className:"cascader-selection-placeholder ".concat(Dn?"cascader-selection-hidden":""),children:y}),F?t("div",{className:"cascader-selection-value ".concat(Dn?"":"cascader-selection-hidden"),children:Y.filter(function(n){var e=vn(n);return!e||0===e.length}).map(function(n){var e=xn(n);return r("span",{className:"cascader-tag",children:[t("span",{className:"cascader-tag-content",children:e.join("/")}),t("span",{className:"cascader-tag-close",onClick:function(e){return!x&&Wn(e,n)},children:t(u,{type:"close",size:10})})]},fn(n))})}):t("span",{className:"cascader-selection-value ".concat(Dn?"":"cascader-selection-hidden"),children:Nn()}),t("span",{className:"cascader-arrow",children:t(u,{type:"arrowDown",size:12})}),I&&Dn&&!x&&t("span",{className:"cascader-clear",onClick:En,children:t(u,{type:"close",size:12})})]}),Q&&t("div",{className:"cascader-dropdown cascader-dropdown-".concat(_," ").concat(M),ref:tn,style:Sn(),children:t("div",{className:"cascader-menus",style:{width:B?void 0:"".concat(180*Hn(),"px")},children:Array.from({length:Hn()}).map(function(n,e){return function(n){var e=Pn(n);return e&&0!==e.length?t("ul",{className:"cascader-menu cascader-menu-".concat(n," ").concat(F?"cascader-menu-checkbox":""),children:e.map(function(e,a){var c=F?Rn(e):Tn(e,n),i=Bn(e,n),o=vn(e)&&vn(e).length>0,l=e.disabled;return r("li",{className:"cascader-menu-item ".concat(c?"cascader-menu-item-selected":""," ").concat(i?"cascader-menu-item-active":""," ").concat(c&&i?"cascader-menu-item-selected-active":""," ").concat(l?"cascader-menu-item-disabled":""),onClick:function(){return!l&&(F?void 0:Cn(e,n))},onMouseEnter:function(){return!l&&In(e,n)},children:[F&&t("span",{className:"cascader-menu-item-checkbox",onClick:function(r){return!l&&jn(r,e,n)},children:t("input",{type:"checkbox",checked:c,readOnly:!0})}),t("span",{className:"cascader-menu-item-content",onClick:function(r){return!l&&zn(r,e,n)},children:dn(e)}),o&&t("span",{className:"cascader-menu-item-expand-icon",children:t(u,{type:"arrowRight",size:12,color:"#bfbfbf"})})]},"".concat(fn(e),"-").concat(a))})}):t("div",{className:"cascader-menu cascader-menu-empty",children:t(l,{size:"small",description:"暂无数据"})})}(e)})})})]})};export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as e,__spreadArray as a}from"../node_modules/tslib/tslib.es6.js";import{jsx as l,jsxs as c}from"react/jsx-runtime";import{createContext as i,useContext as n,useState as d,useEffect as o}from"react";import r from"classnames";var t=i(void 0),s=function(i){var s,u=i.value,p=i.checked,v=i.defaultChecked,b=void 0!==v&&v,h=i.onChange,m=i.disabled,y=void 0!==m&&m,f=i.indeterminate,k=void 0!==f&&f,x=i.children,g=i.className,j=i.style,z=i.label,N=i.labelGap,C=void 0===N?8:N,_=i.labelClassName,G=void 0===_?"":_,I=i.labelStyle,w=n(t),P=!!w,R=d(b),S=R[0],V=R[1],q=P?null===(s=w.value)||void 0===s?void 0:s.includes(u):void 0!==p?p:S;o(function(){P||void 0===p||V(p)},[p,P]);var A=y||P&&w.disabled,B=r("zjpcy-checkbox",{"zjpcy-checkbox--checked":q,"zjpcy-checkbox--disabled":A,"zjpcy-checkbox--indeterminate":k,"zjpcy-checkbox--disabled-checked":A&&q,"zjpcy-checkbox--disabled-indeterminate":A&&k},g);return l("label",{className:B,style:j,children:c("div",{className:"zjpcy-checkbox-wrapper",style:{display:"flex",alignItems:"center"},children:[z&&l("div",{className:"zjpcy-checkbox-label ".concat(G),style:e({marginRight:"number"==typeof C?"".concat(C,"px"):C},I),children:z}),c("div",{style:{display:"flex",alignItems:"center",gap:6},children:[l("input",{type:"checkbox",className:"zjpcy-checkbox__input",checked:q,onChange:function(e){var l,c=e.target.checked;if(!(y||P&&w.disabled))if(P){var i=w.value||[],n=void 0;n=c?a(a([],i,!0),[u],!1):i.filter(function(e){return e!==u}),null===(l=w.onChange)||void 0===l||l.call(w,n)}else V(c),null==h||h(c,u)},disabled:y||P&&w.disabled,value:u,ref:function(e){e&&(e.indeterminate=k)}}),l("span",{className:"zjpcy-checkbox__inner"}),x&&l("span",{className:"zjpcy-checkbox__label",children:x})]})]})})};s.Group=function(a){var c=a.value,i=a.defaultValue,n=void 0===i?[]:i,u=a.onChange,p=a.disabled,v=void 0!==p&&p,b=a.options,h=a.children,m=a.className,y=a.style,f=a.layout,k=void 0===f?"vertical":f,x=a.gap,g=void 0===x?8:x,j=d(n||[]),z=j[0],N=j[1];o(function(){void 0!==c&&N(c)},[c]);var C=r("zjpcy-checkbox-group",{"zjpcy-checkbox-group--horizontal":"horizontal"===k},m),_=e(e({},y),{gap:"number"==typeof g?"".concat(g,"px"):g});return l(t.Provider,{value:{value:void 0!==c?c:z,onChange:function(e){N(e),null==u||u(e)},disabled:v},children:l("div",{className:C,style:_,children:b?b.map(function(e,a){var c;return l(s,{value:e.value,disabled:e.disabled||v,children:e.label},null!==(c=e.value)&&void 0!==c?c:a)}):h})})},s.displayName="Checkbox",s.Group.displayName="Checkbox.Group";var u=s;export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__spreadArray as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as c,jsx as r,Fragment as i}from"react/jsx-runtime";import{useState as n,useRef as o,useEffect as l}from"react";import a from"classnames";import{SketchPicker as t}from"react-color";import s from"../Button/Button.js";var d=function(d){var p=d.color,m=d.onChange,u=d.onColorChange,f=d.disabled,v=void 0!==f&&f,h=d.className,g=d.style,k=d.alpha,y=void 0!==k&&k,j=d.presetColors,z=void 0===j?[]:j,N=d.gradient,b=void 0!==N&&N,C=d.children,x=n(!1),A=x[0],w=x[1],B=n(p),E=B[0],F=B[1],I=n([p,"#ffffff"]),L=I[0],P=I[1],W=n(90),_=W[0],q=W[1],D=o(null),G=o(null),H=a("zjpcy-color-picker",{"zjpcy-color-picker--disabled":v,"zjpcy-color-picker--open":A},h),J=function(c,r){if(b&&void 0!==r){var i=e([],L,!0);i[r]=c.hex,P(i),K()}else F(c.hex),null==u||u(c.hex)},K=function(){var e="linear-gradient(".concat(_,"deg, ").concat(L[0],", ").concat(L[1],")");F(e),null==u||u(e)},M=function(e){e.stopPropagation(),v||w(!A)};return l(function(){var e=function(e){var c=D.current&&D.current.contains(e.target),r=G.current&&G.current.contains(e.target);c||r||w(!1)};return A&&document.addEventListener("click",e),function(){document.removeEventListener("click",e)}},[A]),l(function(){if(b&&p&&p.startsWith("linear-gradient")){var e=p.match(/linear-gradient\((\d+)deg,\s*(#[0-9a-fA-F]+),\s*(#[0-9a-fA-F]+)\)/);e&&(q(parseInt(e[1])),P([e[2],e[3]]))}},[p,b]),c("div",{className:H,style:g,children:[r("div",C?{ref:G,className:"zjpcy-color-picker-trigger-container",onClick:M,children:C}:{ref:G,className:"zjpcy-color-picker-default-trigger",style:{background:p},onClick:M}),A&&c("div",{className:"zjpcy-color-picker-popup",children:[c("div",{className:"zjpcy-color-picker-content",ref:D,children:[b?c(i,{children:[c("div",{className:"zjpcy-color-picker-gradient",children:[c("div",{className:"zjpcy-color-picker-gradient-item",children:[r("div",{className:"zjpcy-color-picker-gradient-label",children:"起始颜色"}),r(t,{color:L[0],onChange:function(e){J(e,0)},disableAlpha:!y})]}),c("div",{className:"zjpcy-color-picker-gradient-item",children:[r("div",{className:"zjpcy-color-picker-gradient-label",children:"结束颜色"}),r(t,{color:L[1],onChange:function(e){J(e,1)},disableAlpha:!y})]})]}),c("div",{className:"zjpcy-color-picker-gradient-direction",children:[c("div",{className:"zjpcy-color-picker-gradient-direction-label",children:["渐变方向: ",_,"°"]}),r("input",{type:"range",min:"0",max:"360",value:_,onChange:function(e){q(parseInt(e.target.value)),K()},className:"zjpcy-color-picker-gradient-range"})]})]}):r(t,{color:E,onChange:function(e){J(e)},disableAlpha:!y}),z.length>0&&c("div",{children:[r("div",{className:"zjpcy-color-picker-presets-label",children:"预设颜色"}),r("div",{className:"zjpcy-color-picker-presets",children:z.map(function(e,c){return r("div",{className:"zjpcy-color-picker-preset",style:{backgroundColor:e},onClick:function(){return J({hex:e})},title:e},c)})})]}),c("div",{className:"zjpcy-color-picker-actions",children:[r("div",{className:"zjpcy-color-picker-preview-label",children:"参考值:"}),r("div",{className:"zjpcy-color-picker-preview ".concat(b?"zjpcy-color-picker-gradient-preview":"zjpcy-color-picker-solid-preview"),style:{background:E}}),c("div",{className:"zjpcy-color-picker-button-group",children:[r(s,{size:"small",onClick:function(){F(p),b&&(P([p,"#ffffff"]),q(90)),w(!1)},children:"取消"}),r(s,{variant:"primary",size:"small",onClick:function(){m(E),w(!1)},children:"确认"})]})]})]}),r("div",{className:"zjpcy-color-picker-overlay",onClick:function(){return w(!1)}})]})]})};export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as r,__generator as n}from"../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import t from"../Hooks/useCopy.js";var s=function(s){var o=s.url,u=s.onCopyStatusChange,i=s.children,a=t();return e("span",{style:{margin:"0px",padding:"0px"},onClick:function(){return r(void 0,void 0,void 0,function(){return n(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,a(o)];case 1:return r.sent(),null==u||u("success"),[3,3];case 2:return r.sent(),null==u||u("error"),[3,3];case 3:return[2]}})})},children:i})},o=t;export{s as default,o as useOnCopy};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useState as n,useRef as a,useMemo as c,useEffect as i,useCallback as o}from"react";import l from"react-dom";import d from"classnames";import p from"../Icon/Icon.js";var s=function(e,t){if(!e)return"";var r=e.getFullYear(),n=(e.getMonth()+1).toString().padStart(2,"0"),a=e.getDate().toString().padStart(2,"0");switch(t){case"YYYY/MM/DD":return"".concat(r,"/").concat(n,"/").concat(a);case"DD-MM-YYYY":return"".concat(a,"-").concat(n,"-").concat(r);case"MM/DD/YYYY":return"".concat(n,"/").concat(a,"/").concat(r);default:return"".concat(r,"-").concat(n,"-").concat(a)}},u=function(e,t){var r,n,a,c,i,o,l;if(!e)return null;try{switch(t){case"YYYY/MM/DD":i=(r=e.split("/").map(Number))[0],o=r[1],l=r[2];break;case"DD-MM-YYYY":l=(n=e.split("-").map(Number))[0],o=n[1],i=n[2];break;case"MM/DD/YYYY":o=(a=e.split("/").map(Number))[0],l=a[1],i=a[2];break;default:i=(c=e.split("-").map(Number))[0],o=c[1],l=c[2]}if(isNaN(i)||isNaN(o)||isNaN(l))return null;var d=new Date(i,o-1,l);return d.getFullYear()!==i||d.getMonth()!==o-1||d.getDate()!==l?null:d}catch(e){return null}},g=function(e,t){return new Date(e,t+1,0).getDate()},h=function(e,t){return!(!e||!t)&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())},v=function(e,t){var r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return r.getTime()<n.getTime()},f=function(f){var m=f.size,k=void 0===m?"middle":m,y=f.value,w=f.defaultValue,z=f.onChange,j=f.placeholder,M=void 0===j?["开始日期","结束日期"]:j,N=f.disabled,D=void 0!==N&&N,b=f.readOnly,Y=void 0!==b&&b,C=f.className,x=void 0===C?"":C,F=f.style,L=f.width,P=void 0===L?"auto":L,E=f.format,S=void 0===E?"YYYY-MM-DD":E,I=f.allowClear,R=void 0===I||I,H=f.disabledDate,O=f.disabledDates,B=f.label,T=f.labelGap,W=void 0===T?8:T,q=f.labelClassName,A=void 0===q?"":q,G=f.labelStyle,V=f.onOpenChange,X=f.open,_=f.showOk,J=void 0===_||_,K=f.separator,Q=n(w),U=Q[0],Z=Q[1],$=n(!1),ee=$[0],te=$[1],re=n("start"),ne=re[0],ae=re[1],ce=n(!1),ie=ce[0],oe=ce[1],le=n({top:0,left:0,width:0}),de=le[0],pe=le[1],se=n(!1),ue=se[0],ge=se[1],he=a(null),ve=a(null),fe=void 0!==y,me=fe?y:U,ke=void 0!==X?X:ee,ye=(null==me?void 0:me[0])||"",we=(null==me?void 0:me[1])||"",ze=c(function(){return u(ye,S)},[ye,S]),je=c(function(){return u(we,S)},[we,S]),Me=n(ze||new Date),Ne=Me[0],De=Me[1],be=n(function(){if(je)return je;if(ze){var e=new Date(ze);return e.setMonth(e.getMonth()+1),e}var t=new Date;return t.setMonth(t.getMonth()+1),t}),Ye=be[0],Ce=be[1];i(function(){ze&&De(ze),je&&Ce(je)},[ze,je]);var xe=o(function(){if(he.current){var e=he.current.getBoundingClientRect(),t=Math.max(e.width,560),r=window.innerHeight-e.bottom,n=e.bottom+window.scrollY+4,a=e.left+window.scrollX;r<360&&e.top>360&&(n=e.top+window.scrollY-360-4);var c=window.innerWidth;a+t>c&&(a=c-t-16),pe({top:n,left:a,width:t})}},[]);i(function(){if(ke&&ve.current&&he.current){return ge(!1),requestAnimationFrame(function(){var t=he.current.getBoundingClientRect(),r=ve.current.offsetHeight;if(window.innerHeight-t.bottom<360&&t.top>360){var n=t.top+window.scrollY-r-4;pe(function(t){return e(e({},t),{top:n})})}ge(!0)}),function(){ge(!1)}}},[ke]),i(function(){var e=function(e){he.current&&!he.current.contains(e.target)&&ve.current&&!ve.current.contains(e.target)&&(void 0===X&&te(!1),null==V||V(!1),oe(!1))};return ke&&(document.addEventListener("mousedown",e),xe(),window.addEventListener("scroll",xe,!0),window.addEventListener("resize",xe)),function(){document.removeEventListener("mousedown",e),window.removeEventListener("scroll",xe,!0),window.removeEventListener("resize",xe)}},[ke,X,V,xe]);var Fe=o(function(e,t){var r=[0===e?t:(null==me?void 0:me[0])||"",1===e?t:(null==me?void 0:me[1])||""];fe||Z(r),null==z||z(r)},[fe,z,me]),Le=function(e){D||Y||(ae(e),void 0===X&&te(!0),null==V||V(!0),oe(!0))},Pe=function(){void 0===X&&te(!1),null==V||V(!1),oe(!1)},Ee=o(function(e){if(H&&H(e))return!0;if(O&&O.length>0){var t=s(e,S);return O.includes(t)}return!1},[H,O,S]),Se=function(e){for(var t=e.getFullYear(),r=e.getMonth(),n=g(t,r),a=function(e,t){return new Date(e,t,1).getDay()}(t,r),c=g(t,r-1),i=[],o=a-1;o>=0;o--)i.push({date:new Date(t,r-1,c-o),isCurrentMonth:!1});for(o=1;o<=n;o++)i.push({date:new Date(t,r,o),isCurrentMonth:!0});var l=42-i.length;for(o=1;o<=l;o++)i.push({date:new Date(t,r+1,o),isCurrentMonth:!1});return i},Ie=function(e){var n=e.viewDate,a=e.onPrevMonth,c=e.onNextMonth,i=e.label,o=n.getFullYear(),l=n.getMonth();return t("div",{className:"zjpcy-datepicker-range-calendar-header",children:[r("div",{className:"zjpcy-datepicker-range-header-left",children:r("button",{className:"zjpcy-datepicker-range-header-btn",onClick:a,title:"上个月",children:r(p,{type:"arrowLeft",size:14,color:"var(--zjpcy-text-color-secondary)"})})}),t("div",{className:"zjpcy-datepicker-range-header-center",children:[t("span",{children:[o,"年 ",["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"][l]]}),r("span",{className:"zjpcy-datepicker-range-header-label",children:i})]}),r("div",{className:"zjpcy-datepicker-range-header-right",children:r("button",{className:"zjpcy-datepicker-range-header-btn",onClick:c,title:"下个月",children:r(p,{type:"arrowRight",size:14,color:"var(--zjpcy-text-color-secondary)"})})})]})},Re=function(e){var n=e.viewDate,a=e.onPrevMonth,i=e.onNextMonth,o=e.label,l=c(function(){return Se(n)},[n]);return t("div",{className:"zjpcy-datepicker-range-calendar",children:[r(Ie,{viewDate:n,onPrevMonth:a,onNextMonth:i,label:o}),t("div",{className:"zjpcy-datepicker-range-calendar-body",children:[r("div",{className:"zjpcy-datepicker-range-week-header",children:["日","一","二","三","四","五","六"].map(function(e){return r("div",{className:"zjpcy-datepicker-range-week-day",children:e},e)})}),r("div",{className:"zjpcy-datepicker-range-date-grid",children:l.map(function(e,t){var n=e.date,a=e.isCurrentMonth,c=h(n,"start"===ne?ze:je),i=function(e){var t=new Date;return h(e,t)}(n),o=Ee(n),l=function(e){return!(!ze||!je)&&v(ze,e)&&v(e,je)}(n),p=function(e){return h(e,ze)}(n),u=function(e){return h(e,je)}(n);return r("div",{className:d("zjpcy-datepicker-range-date-cell",{"zjpcy-datepicker-range-date-cell--selected":c,"zjpcy-datepicker-range-date-cell--today":i&&!c,"zjpcy-datepicker-range-date-cell--disabled":o,"zjpcy-datepicker-range-date-cell--other-month":!a,"zjpcy-datepicker-range-date-cell--in-range":l&&!p&&!u,"zjpcy-datepicker-range-date-cell--range-start":p,"zjpcy-datepicker-range-date-cell--range-end":u}),onClick:function(){return function(e){if(!Ee(e)){var t=s(e,S);"start"===ne?(Fe(0,t),je&&v(je,e)&&Fe(1,""),ae("end")):(ze&&v(e,ze)?(Fe(0,t),Fe(1,ye)):Fe(1,t),J||Pe())}}(n)},children:n.getDate()},t)})})]})]})},He=e({width:"number"==typeof P?"".concat(P,"px"):P},F),Oe=e({marginRight:"number"==typeof W?"".concat(W,"px"):W},G),Be=ye||we,Te={"zjpcy-datepicker-range-picker-trigger--small":"small"===k,"zjpcy-datepicker-range-picker-trigger--middle":"middle"===k,"zjpcy-datepicker-range-picker-trigger--large":"large"===k};return t("div",{className:d("zjpcy-datepicker-range-picker",x,{"zjpcy-datepicker-range-picker-with-label":B}),style:He,children:[B&&r("span",{className:d("zjpcy-datepicker-range-picker-label",A),style:Oe,children:B}),t("div",{ref:he,className:d("zjpcy-datepicker-range-picker-trigger",Te,{"zjpcy-datepicker-range-picker-trigger--focused":ie,"zjpcy-datepicker-range-picker-trigger--disabled":D}),children:[r("div",{className:d("zjpcy-datepicker-range-picker-input",{"zjpcy-datepicker-range-picker-input--active":"start"===ne&&ke}),onClick:function(){return Le("start")},children:r("span",{className:d("zjpcy-datepicker-range-picker-value",{"zjpcy-datepicker-range-picker-value--placeholder":!ye}),children:ye||M[0]})}),r("span",{className:"zjpcy-datepicker-range-picker-separator",children:K||r(p,{type:"arrow-right",size:"small"})}),r("div",{className:d("zjpcy-datepicker-range-picker-input",{"zjpcy-datepicker-range-picker-input--active":"end"===ne&&ke}),onClick:function(){return Le("end")},children:r("span",{className:d("zjpcy-datepicker-range-picker-value",{"zjpcy-datepicker-range-picker-value--placeholder":!we}),children:we||M[1]})}),t("span",{className:"zjpcy-datepicker-range-picker-suffix",children:[R&&Be&&!D&&!Y&&r("span",{className:"zjpcy-datepicker-range-picker-clear",onClick:function(e){e.stopPropagation(),fe||Z(void 0),null==z||z(["",""])},children:r(p,{type:"close",size:"small"})}),r(p,{type:"calendar",size:"small",className:d("zjpcy-datepicker-range-picker-icon",{"zjpcy-datepicker-range-picker-icon--has-clear":R&&Be&&!D&&!Y})})]})]}),function(){if(!ke)return null;var e=t("div",{ref:ve,className:"zjpcy-datepicker-range-dropdown",style:{position:"fixed",top:de.top,left:de.left,minWidth:de.width||("number"==typeof P?P:parseInt(P,10)||280),zIndex:999,opacity:ue?1:0,transition:"opacity 0.15s ease"},children:[t("div",{className:"zjpcy-datepicker-range-panels",children:[r(Re,{viewDate:Ne,onPrevMonth:function(){var e=new Date(Ne);e.setMonth(e.getMonth()-1),De(e)},onNextMonth:function(){var e=new Date(Ne);e.setMonth(e.getMonth()+1),De(e)},label:"开始日期"}),r(Re,{viewDate:Ye,onPrevMonth:function(){var e=new Date(Ye);e.setMonth(e.getMonth()-1),Ce(e)},onNextMonth:function(){var e=new Date(Ye);e.setMonth(e.getMonth()+1),Ce(e)},label:"结束日期"})]}),J&&t("div",{className:"zjpcy-datepicker-range-footer",children:[r("div",{className:"zjpcy-datepicker-range-footer-spacer"}),r("div",{className:"zjpcy-datepicker-range-footer-actions",children:r("button",{className:"zjpcy-datepicker-range-btn zjpcy-datepicker-range-btn--primary",onClick:Pe,children:"确定"})})]})]});return l.createPortal(e,document.body)}()]})};export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__spreadArray as e,__assign as n}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as r,Fragment as i}from"react/jsx-runtime";import{useState as c,useRef as o,useMemo as a,useCallback as l,useEffect as u}from"react";import d from"./RangePicker.js";import s from"react-dom";import h from"classnames";import f from"../Icon/Icon.js";import p from"../Tag/index.js";import v from"../TimePicker/TimePickerPanel.js";import{LabelContainer as m,Label as g,DatePickerContainer as y,DatePickerTrigger as w,DatePickerValue as k,DatePickerSuffix as S,DatePickerClear as z,DatePickerIcon as Y,DatePickerDropdown as C,CalendarPanel as M,CalendarBody as j,WeekHeader as D,WeekDay as b,DateGrid as N,DateCell as x,CalendarFooter as P,FooterButton as F,CalendarFooterSpacer as I,CalendarFooterActions as T,MonthPickerPanel as L,CalendarHeader as Q,HeaderLeft as R,HeaderButton as H,HeaderCenter as O,HeaderRight as B,MonthGrid as E,MonthCell as W,QuarterPickerPanel as $,QuarterGrid as q,QuarterCell as V,YearPickerPanel as A,YearGrid as G,YearCell as X}from"./styles.js";var _=function(e,n){if(!e)return"";var t=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0");switch(n){case"YYYY/MM/DD":return"".concat(t,"/").concat(r,"/").concat(i);case"DD-MM-YYYY":return"".concat(i,"-").concat(r,"-").concat(t);case"MM/DD/YYYY":return"".concat(r,"/").concat(i,"/").concat(t);default:return"".concat(t,"-").concat(r,"-").concat(i)}},J=function(e,n){return new Date(e,n+1,0).getDate()},K=function(e,n){return!(!e||!n)&&(e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===n.getDate())},U=function(e){var n=e.currentYear,i=e.startYear,c=e.onYearSelect,o=e.onBack,l=e.onPrevPage,u=e.onNextPage,d=a(function(){for(var e=[],n=0;n<12;n++)e.push(i+n);return e},[i]),s=(new Date).getFullYear(),h=i+11;return t(A,{children:[t(Q,{children:[r(R,{children:r(H,{onClick:l,title:"上一页",children:r(f,{type:"arrowLeft",size:14,color:"var(--zjpcy-text-color-secondary)"})})}),r(O,{children:t("span",{style:{cursor:"pointer"},onClick:o,children:[i," - ",h]})}),r(B,{children:r(H,{onClick:u,title:"下一页",children:r(f,{type:"arrowRight",size:14,color:"var(--zjpcy-text-color-secondary)"})})})]}),r(G,{children:d.map(function(e){return r(X,{isSelected:e===n,isCurrentYear:e===s,onClick:function(){return c(e)},children:e},e)})})]})},Z=function(e){var n=e.currentMonth,i=e.onMonthSelect,c=e.onBack,o=a(function(){return["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},[]),l=(new Date).getMonth();return t(L,{children:[t(Q,{children:[r(R,{children:r(H,{onClick:c,title:"返回",children:r(f,{type:"arrowLeft",size:14,color:"var(--zjpcy-text-color-secondary)"})})}),r(O,{children:r("span",{style:{cursor:"pointer"},onClick:c,children:"选择月份"})}),r(B,{})]}),r(E,{children:o.map(function(e,t){return r(W,{isSelected:t===n,isCurrentMonth:t===l,onClick:function(){return i(t)},children:e},t)})})]})},ee=function(e){var n=e.currentMonth,i=e.onPrevMonth,c=e.onNextMonth,o=e.onYearClick,a=e.onMonthClick,l=n.getFullYear(),u=n.getMonth();return t(Q,{children:[r(R,{children:r(H,{onClick:i,title:"上个月",children:r(f,{type:"arrowLeft",size:14,color:"var(--zjpcy-text-color-secondary)"})})}),t(O,{children:[t("span",{style:{cursor:"pointer",fontWeight:500},onClick:o,children:[l,"年"]}),r("span",{style:{cursor:"pointer",fontWeight:500},onClick:a,children:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"][u]})]}),r(B,{children:r(H,{onClick:c,title:"下个月",children:r(f,{type:"arrowRight",size:14,color:"var(--zjpcy-text-color-secondary)"})})})]})},ne=function(e){var n=e.value,i=e.selectedValues,o=void 0===i?[]:i,d=e.onChange,s=e.format,f=e.disabledDate,p=e.disabledDates,m=e.showToday,g=void 0===m||m,y=e.showOk,w=void 0===y||y,k=e.onToday,S=e.onOk,z=e.showTime,Y=e.onHasSelectedDateChange,C=a(function(){return function(e,n){var t,r,i,c;if(!e)return null;var o,a,l,u=e.split(" ")[0];try{switch(n){case"YYYY/MM/DD":o=(t=u.split("/").map(Number))[0],a=t[1],l=t[2];break;case"DD-MM-YYYY":l=(r=u.split("-").map(Number))[0],a=r[1],o=r[2];break;case"MM/DD/YYYY":a=(i=u.split("/").map(Number))[0],l=i[1],o=i[2];break;default:o=(c=u.split("-").map(Number))[0],a=c[1],l=c[2]}if(isNaN(o)||isNaN(a)||isNaN(l))return null;var d=new Date(o,a-1,l);return d.getFullYear()!==o||d.getMonth()!==a-1||d.getDate()!==l?null:d}catch(e){return null}}(n,s)},[n,s]),L=a(function(){return new Set(o)},[o]),Q=c(C||new Date),R=Q[0],H=Q[1],O=c("calendar"),B=O[0],E=O[1],W=function(e){return 12*Math.floor(e/12)},$=c(W((C||new Date).getFullYear())),q=$[0],V=$[1];u(function(){C&&H(C)},[C]);var A=function(e){if(!e||!z)return{hour:0,minute:0,second:0};var n=e.split(" ");if(n.length>1){var t=n[1].split(":");return{hour:parseInt(t[0],10)||0,minute:parseInt(t[1],10)||0,second:parseInt(t[2],10)||0}}return{hour:0,minute:0,second:0}},G=A(n),X=c(G),ne=X[0],te=X[1];u(function(){te(A(n))},[n]);var re=a(function(){for(var e=R.getFullYear(),n=R.getMonth(),t=J(e,n),r=function(e,n){return new Date(e,n,1).getDay()}(e,n),i=J(e,n-1),c=[],o=r-1;o>=0;o--)c.push({date:new Date(e,n-1,i-o),isCurrentMonth:!1});for(o=1;o<=t;o++)c.push({date:new Date(e,n,o),isCurrentMonth:!0});var a=42-c.length;for(o=1;o<=a;o++)c.push({date:new Date(e,n+1,o),isCurrentMonth:!1});return c},[R]),ie=l(function(e){if(f&&f(e))return!0;if(p&&p.length>0){var n=_(e,s);return p.includes(n)}return!1},[f,p,s]),ce=!!C;u(function(){null==Y||Y(ce)},[ce,Y]);return"year"===B?r(U,{currentYear:R.getFullYear(),startYear:q,onYearSelect:function(e){var n=new Date(R);n.setFullYear(e),H(n),E("month")},onBack:function(){return E("calendar")},onPrevPage:function(){return V(function(e){return e-12})},onNextPage:function(){return V(function(e){return e+12})}}):"month"===B?r(Z,{currentMonth:R.getMonth(),onMonthSelect:function(e){var n=new Date(R);n.setMonth(e),H(n),E("calendar")},onBack:function(){return E("calendar")}}):t(M,{children:[t("div",{className:h("zjpcy-datepicker-content",{"zjpcy-datepicker-content-with-time":z&&ce}),children:[t("div",{className:"zjpcy-datepicker-calendar-section",children:[r(ee,{currentMonth:R,onPrevMonth:function(){var e=new Date(R);e.setMonth(e.getMonth()-1),H(e)},onNextMonth:function(){var e=new Date(R);e.setMonth(e.getMonth()+1),H(e)},onYearClick:function(){V(W(R.getFullYear())),E("year")},onMonthClick:function(){E("month")}}),t(j,{children:[r(D,{children:["日","一","二","三","四","五","六"].map(function(e){return r(b,{children:e},e)})}),r(N,{children:re.map(function(e,n){var t=e.date,i=e.isCurrentMonth,c=_(t,s),o=K(t,C),a=L.has(c),l=function(e){var n=new Date;return K(e,n)}(t),u=ie(t);return r(x,{isSelected:o,isInSelectedSet:a,isToday:l,disabled:u,isCurrentMonth:i,onClick:function(){return function(e){if(!ie(e)){var n=_(e,s);if(z){var t=ce?"".concat(String(ne.hour).padStart(2,"0"),":").concat(String(ne.minute).padStart(2,"0"),":").concat(String(ne.second).padStart(2,"0")):"00:00:00";null==d||d("".concat(n," ").concat(t))}else null==d||d(n)}}(t)},children:t.getDate()},n)})})]})]}),z&&ce&&t("div",{className:"zjpcy-datepicker-time-section",children:[t("div",{className:"zjpcy-datepicker-time-header",children:[String(ne.hour).padStart(2,"0"),":",String(ne.minute).padStart(2,"0"),":",String(ne.second).padStart(2,"0")]}),r(v,{value:"".concat(String(ne.hour).padStart(2,"0"),":").concat(String(ne.minute).padStart(2,"0"),":").concat(String(ne.second).padStart(2,"0")),onChange:function(e){if(C){var n=e.split(":").map(Number),t=n[0],r=n[1],i=n[2];te({hour:t,minute:r,second:i});var c=_(C,s);null==d||d("".concat(c," ").concat(e))}},format:"HH:mm:ss",hourStep:1,minuteStep:1,secondStep:1,showNow:!1,showOk:!1})]})]}),(g||w)&&t(P,{children:[g?r(F,{onClick:function(){var e=new Date;if(H(e),z){var n="".concat(String(e.getHours()).padStart(2,"0"),":").concat(String(e.getMinutes()).padStart(2,"0"),":").concat(String(e.getSeconds()).padStart(2,"0"));null==d||d("".concat(_(e,s)," ").concat(n))}else null==d||d(_(e,s));null==k||k()},children:"今天"}):r(I,{}),w&&r(T,{children:r(F,{variant:"primary",onClick:S,children:"确定"})})]})]})},te=function(d){var v=d.size,M=void 0===v?"middle":v,j=d.value,D=d.defaultValue,b=d.onChange,N=d.placeholder,x=void 0===N?"请选择日期":N,_=d.disabled,J=void 0!==_&&_,K=d.readOnly,U=void 0!==K&&K,Z=d.className,ee=void 0===Z?"":Z,te=d.style,re=d.width,ie=void 0===re?160:re,ce=d.format,oe=void 0===ce?"YYYY-MM-DD":ce,ae=d.allowClear,le=void 0===ae||ae,ue=d.disabledDate,de=d.disabledDates,se=d.label,he=d.labelGap,fe=void 0===he?8:he,pe=d.labelClassName,ve=void 0===pe?"":pe,me=d.labelStyle,ge=d.onOpenChange,ye=d.open,we=d.showToday,ke=void 0===we||we,Se=d.showOk,ze=void 0===Se||Se,Ye=d.picker,Ce=void 0===Ye?"date":Ye,Me=d.multiple,je=void 0!==Me&&Me,De=d.maxTagCount,be=d.maxTagDisplayCount,Ne=d.separator,xe=void 0===Ne?",":Ne,Pe=d.showTime,Fe=void 0!==Pe&&Pe,Ie=c(D),Te=Ie[0],Le=Ie[1],Qe=c(!1),Re=Qe[0],He=Qe[1],Oe=c(!1),Be=Oe[0],Ee=Oe[1],We=c({top:0,left:0,width:0}),$e=We[0],qe=We[1],Ve=c(!1),Ae=Ve[0],Ge=Ve[1],Xe=c(!1),_e=Xe[0],Je=Xe[1],Ke=o(null),Ue=o(null),Ze=void 0!==j,en=Ze?j:Te,nn=a(function(){return en?en.split(xe).filter(function(e){return e.trim()}):[]},[en,xe]),tn=l(function(e){return nn.includes(e)},[nn]),rn=l(function(n){return tn(n)?nn.filter(function(e){return e!==n}).join(xe):void 0!==De&&nn.length>=De?nn.join(xe):e(e([],nn,!0),[n],!1).join(xe)},[nn,tn,xe,De]),cn=void 0!==ye?ye:Re,on=l(function(){if(Ke.current){var e=Ke.current.getBoundingClientRect(),n=Fe&&_e?480:280,t=Math.max(e.width,n),r=window.innerHeight-e.bottom,i=e.bottom+window.scrollY+4,c=e.left+window.scrollX;r<360&&e.top>360&&(i=e.top+window.scrollY-360-4);var o=window.innerWidth;c+t>o&&(c=o-t-16),qe({top:i,left:c,width:t})}},[Fe,_e]);u(function(){if(cn&&Ue.current&&Ke.current){return Ge(!1),requestAnimationFrame(function(){var e=Ke.current.getBoundingClientRect(),t=Ue.current.offsetHeight;if(window.innerHeight-e.bottom<360&&e.top>360){var r=e.top+window.scrollY-t-4;qe(function(e){return n(n({},e),{top:r})})}Ge(!0)}),function(){Ge(!1)}}},[cn]),u(function(){var e=function(e){Ke.current&&!Ke.current.contains(e.target)&&Ue.current&&!Ue.current.contains(e.target)&&(void 0===ye&&He(!1),null==ge||ge(!1),Ee(!1))};return cn&&(document.addEventListener("mousedown",e),on(),window.addEventListener("scroll",on,!0),window.addEventListener("resize",on)),function(){document.removeEventListener("mousedown",e),window.removeEventListener("scroll",on,!0),window.removeEventListener("resize",on)}},[cn,ye,ge,on]);var an=function(){if(!J&&!U){var e=!cn;void 0===ye&&He(e),null==ge||ge(e),Ee(e)}},ln=function(e){var n;n=je?rn(e):e,Ze||Le(n),null==b||b(n),je||ze||(void 0===ye&&He(!1),null==ge||ge(!1),Ee(!1))},un=function(e){e.stopPropagation(),Ze||Le(void 0),null==b||b("")},dn=function(){void 0===ye&&He(!1),null==ge||ge(!1),Ee(!1)},sn=function(){var e,n,i=function(e){if(!e)return null;var n=e.match(/^(\d{4})-(\d{2})$/);return n?{year:parseInt(n[1],10),month:parseInt(n[2],10)-1}:null}(en),o=new Date,l=c(null!==(e=null==i?void 0:i.year)&&void 0!==e?e:o.getFullYear()),u=l[0],d=l[1],s=null!==(n=null==i?void 0:i.month)&&void 0!==n?n:null,h=a(function(){return["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},[]),p=o.getMonth(),v=o.getFullYear(),m=a(function(){return je?new Set(nn.filter(function(e){return e.match(/^\d{4}-\d{2}$/)})):new Set},[nn,je]),g=function(e){var n="".concat(u,"-").concat(String(e+1).padStart(2,"0"));return m.has(n)};return t(L,{children:[t(Q,{children:[r(R,{children:r(H,{onClick:function(){return d(function(e){return e-1})},title:"上一年",children:r(f,{type:"arrowLeft",size:14,color:"var(--zjpcy-text-color-secondary)"})})}),r(O,{children:t("span",{children:[u,"年"]})}),r(B,{children:r(H,{onClick:function(){return d(function(e){return e+1})},title:"下一年",children:r(f,{type:"arrowRight",size:14,color:"var(--zjpcy-text-color-secondary)"})})})]}),r(E,{children:h.map(function(e,n){var t=je?g(n):n===s&&u===(null==i?void 0:i.year),c=je&&g(n)&&!(n===s&&u===(null==i?void 0:i.year));return r(W,{isSelected:t,isInSelectedSet:c,isCurrentMonth:n===p&&u===v,onClick:function(){return function(e){var n="".concat(u,"-").concat(String(e+1).padStart(2,"0"));if(je){var t=rn(n);Ze||Le(t),null==b||b(t)}else Ze||Le(n),null==b||b(n),ze||dn()}(n)},children:e},n)})}),ze&&t(P,{children:[r(I,{}),r(T,{children:r(F,{variant:"primary",onClick:dn,children:"确定"})})]})]})},hn=function(){var e,n,i=function(e){if(!e)return null;var n=e.match(/^(\d{4})-Q(\d)$/);return n?{year:parseInt(n[1],10),quarter:parseInt(n[2],10)}:null}(en),o=new Date,l=c(null!==(e=null==i?void 0:i.year)&&void 0!==e?e:o.getFullYear()),u=l[0],d=l[1],s=null!==(n=null==i?void 0:i.quarter)&&void 0!==n?n:null,h=o.getMonth(),p=Math.floor(h/3)+1,v=o.getFullYear(),m=a(function(){return je?new Set(nn.filter(function(e){return e.match(/^\d{4}-Q\d$/)})):new Set},[nn,je]),g=function(e){var n="".concat(u,"-Q").concat(e);return m.has(n)};return t($,{children:[t(Q,{children:[r(R,{children:r(H,{onClick:function(){return d(function(e){return e-1})},title:"上一年",children:r(f,{type:"arrowLeft",size:14,color:"var(--zjpcy-text-color-secondary)"})})}),r(O,{children:t("span",{children:[u,"年"]})}),r(B,{children:r(H,{onClick:function(){return d(function(e){return e+1})},title:"下一年",children:r(f,{type:"arrowRight",size:14,color:"var(--zjpcy-text-color-secondary)"})})})]}),r(q,{children:["Q1","Q2","Q3","Q4"].map(function(e,n){var t=n+1,c=u===v&&t===p,o=je?g(t):t===s&&u===(null==i?void 0:i.year),a=je&&g(t)&&!(t===s&&u===(null==i?void 0:i.year));return r(V,{isSelected:o,isInSelectedSet:a,isCurrentQuarter:c,onClick:function(){return function(e,n){var t="".concat(e,"-Q").concat(n);if(je){var r=rn(t);Ze||Le(r),null==b||b(r)}else Ze||Le(t),null==b||b(t),ze||dn()}(u,t)},children:e},e)})}),ze&&t(P,{children:[r(I,{}),r(T,{children:r(F,{variant:"primary",onClick:dn,children:"确定"})})]})]})},fn=function(){var e,n=function(e){if(!e)return null;var n=e.match(/^(\d{4})$/);return n?parseInt(n[1],10):null}(en),i=(new Date).getFullYear(),o=c((e=null!=n?n:i,12*Math.floor(e/12))),l=o[0],u=o[1],d=a(function(){for(var e=[],n=0;n<12;n++)e.push(l+n);return e},[l]),s=a(function(){return je?new Set(nn.filter(function(e){return e.match(/^\d{4}$/)})):new Set},[nn,je]);return t(A,{children:[t(Q,{children:[r(R,{children:r(H,{onClick:function(){return u(function(e){return e-12})},title:"上一页",children:r(f,{type:"arrowLeft",size:14,color:"var(--zjpcy-text-color-secondary)"})})}),r(O,{children:t("span",{children:[l," - ",l+11]})}),r(B,{children:r(H,{onClick:function(){return u(function(e){return e+12})},title:"下一页",children:r(f,{type:"arrowRight",size:14,color:"var(--zjpcy-text-color-secondary)"})})})]}),r(G,{children:d.map(function(e){var t=je?s.has(String(e)):e===n,c=je&&s.has(String(e))&&e!==n;return r(X,{isSelected:t,isInSelectedSet:c,isCurrentYear:e===i,onClick:function(){return function(e){var n=String(e);if(je){var t=rn(n);Ze||Le(t),null==b||b(t)}else Ze||Le(n),null==b||b(n),ze||dn()}(e)},children:e},e)})}),ze&&t(P,{children:[r(I,{}),r(T,{children:r(F,{variant:"primary",onClick:dn,children:"确定"})})]})]})},pn=l(function(e){return function(n){n.stopPropagation();var t=nn.filter(function(n){return n!==e}).join(xe);Ze||Le(t||void 0),null==b||b(t)}},[nn,xe,Ze,b]),vn=function(){var e,n,c,o=a(function(){return en||""},[en]);return t(w,{ref:Ke,focused:Be,disabled:J,size:M,className:h("zjpcy-datepicker-trigger","zjpcy-datepicker-trigger--".concat(M),{"zjpcy-datepicker-trigger--disabled":J,"zjpcy-datepicker-trigger--focused":Be,"zjpcy-datepicker-trigger--multiple":je},ee),style:te,onClick:an,children:[je&&nn.length>0?r(k,{isPlaceholder:!1,disabled:J,className:h("zjpcy-datepicker-value","zjpcy-datepicker-value--tags",{"zjpcy-datepicker-value--disabled":J}),children:(e=void 0!==be&&be>0,n=e?nn.slice(0,be):nn,c=e?nn.length-be:0,t(i,{children:[n.map(function(e,n){return r(p,{size:"small",closable:!J,onClose:pn(e),className:"zjpcy-datepicker-tag",children:e},"".concat(e,"-").concat(n))}),c>0&&t(p,{size:"small",className:"zjpcy-datepicker-tag zjpcy-datepicker-tag--more",children:["...+",c]},"more")]}))}):r(k,{isPlaceholder:!en,disabled:J,className:h("zjpcy-datepicker-value",{"zjpcy-datepicker-value--placeholder":!en,"zjpcy-datepicker-value--disabled":J}),children:o||x}),t(S,{className:"zjpcy-datepicker-suffix",children:[le&&en&&!J&&r(z,{className:"zjpcy-datepicker-clear",onClick:un,children:r(f,{type:"close",style:{fontSize:10}})}),r(Y,{className:h("zjpcy-datepicker-icon",{"has-clear":le&&en&&!J}),children:r(f,{type:"calendar",style:{fontSize:14}})})]})]})},mn=function(){switch(Ce){case"month":return r(sn,{});case"quarter":return r(hn,{});case"year":return r(fn,{});default:return r(ne,{value:en,selectedValues:nn,onChange:ln,format:oe,disabledDate:ue,disabledDates:de,showToday:ke,showOk:ze,showTime:Fe,onToday:function(){ze||dn()},onOk:dn,onHasSelectedDateChange:Je})}},gn=function(){if(!cn)return null;var e=r(C,{ref:Ue,top:$e.top,left:$e.left,minWidth:$e.width||(Fe&&_e?480:280),className:"zjpcy-datepicker-dropdown",style:{opacity:Ae?1:0,transition:"opacity 0.15s ease"},children:mn()});return s.createPortal(e,document.body)},yn=je?"auto":ie;return se?t(m,{gap:fe,className:"zjpcy-datepicker-with-label",children:["string"==typeof se?r(g,{className:h("zjpcy-datepicker-label",ve),style:me,children:se}):se,t(y,{width:yn,minWidth:je?ie:void 0,className:"zjpcy-datepicker",children:[vn(),gn()]})]}):t(y,{width:yn,minWidth:je?ie:void 0,className:"zjpcy-datepicker",children:[vn(),gn()]})};te.RangePicker=d;var re=te;export{re as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import r from"styled-components";var i=r.div.withConfig({shouldForwardProp:function(n){return!["width","minWidth"].includes(n)}})(x||(x=n(["\n display: inline-block;\n position: relative;\n font-size: 14px;\n font-family: inherit;\n width: ",";\n min-width: ",";\n"],["\n display: inline-block;\n position: relative;\n font-size: 14px;\n font-family: inherit;\n width: ",";\n min-width: ",";\n"])),function(n){return"number"==typeof n.width?"".concat(n.width,"px"):n.width||"auto"},function(n){return n.minWidth?"number"==typeof n.minWidth?"".concat(n.minWidth,"px"):n.minWidth:"0px"}),o=r.div.withConfig({shouldForwardProp:function(n){return!["focused"].includes(n)}})(f||(f=n(["\n display: flex;\n align-items: center;\n width: 100%;\n min-height: ",";\n height: auto;\n padding: ",";\n border: 1px solid ",";\n border-radius: var(--zjpcy-border-radius-sm);\n background-color: ",";\n cursor: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n box-sizing: border-box;\n\n &:hover {\n border-color: ",";\n }\n\n &:focus-within {\n border-color: var(--zjpcy-primary-color);\n box-shadow: var(--zjpcy-input-box-shadow-focus);\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n min-height: ",";\n height: auto;\n padding: ",";\n border: 1px solid ",";\n border-radius: var(--zjpcy-border-radius-sm);\n background-color: ",";\n cursor: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n box-sizing: border-box;\n\n &:hover {\n border-color: ",";\n }\n\n &:focus-within {\n border-color: var(--zjpcy-primary-color);\n box-shadow: var(--zjpcy-input-box-shadow-focus);\n }\n"])),function(n){switch(n.size){case"small":return"24px";case"large":return"40px";default:return"34px"}},function(n){switch(n.size){case"small":return"1px 12px";case"large":return"3px 12px";default:return"2px 12px"}},function(n){return n.disabled?"var(--zjpcy-border-color-extra-light)":n.focused?"var(--zjpcy-primary-color)":"var(--zjpcy-border-color-extra-light)"},function(n){return n.disabled?"var(--zjpcy-bg-color-light)":"var(--zjpcy-bg-color-white)"},function(n){return n.disabled?"not-allowed":"pointer"},function(n){return n.disabled?"var(--zjpcy-border-color-extra-light)":"var(--zjpcy-primary-color)"}),t=r.span.withConfig({shouldForwardProp:function(n){return!["isPlaceholder"].includes(n)}})(v||(v=n(["\n flex: 1;\n color: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n\n /* 多选模式下的 tags 布局 */\n &.zjpcy-datepicker-value--tags {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n align-items: center;\n overflow: visible;\n white-space: normal;\n padding: 2px 0;\n }\n"],["\n flex: 1;\n color: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n\n /* 多选模式下的 tags 布局 */\n &.zjpcy-datepicker-value--tags {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n align-items: center;\n overflow: visible;\n white-space: normal;\n padding: 2px 0;\n }\n"])),function(n){return n.disabled?"var(--zjpcy-text-color-tertiary)":n.isPlaceholder?"var(--zjpcy-text-color-light)":"var(--zjpcy-text-color)"}),e=r.span(b||(b=n(["\n display: flex;\n align-items: center;\n margin-left: 8px;\n color: var(--zjpcy-text-color-light);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n position: relative;\n width: 16px;\n height: 16px;\n"],["\n display: flex;\n align-items: center;\n margin-left: 8px;\n color: var(--zjpcy-text-color-light);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n position: relative;\n width: 16px;\n height: 16px;\n"]))),a=r.span(h||(h=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--zjpcy-text-color-tertiary);\n cursor: pointer;\n border-radius: 50%;\n background-color: transparent;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 0;\n visibility: hidden;\n z-index: 2;\n\n &:hover {\n color: var(--zjpcy-text-color);\n background-color: var(--zjpcy-bg-color-light);\n }\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--zjpcy-text-color-tertiary);\n cursor: pointer;\n border-radius: 50%;\n background-color: transparent;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 0;\n visibility: hidden;\n z-index: 2;\n\n &:hover {\n color: var(--zjpcy-text-color);\n background-color: var(--zjpcy-bg-color-light);\n }\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"]))),c=r.span(z||(z=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 1;\n visibility: visible;\n z-index: 1;\n width: 16px;\n height: 16px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 1;\n visibility: visible;\n z-index: 1;\n width: 16px;\n height: 16px;\n"]))),l=r.div.withConfig({shouldForwardProp:function(n){return!["top","left","minWidth"].includes(n)}})(j||(j=n(["\n position: fixed;\n top: ","px;\n left: ","px;\n z-index: 999;\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n box-shadow: var(--zjpcy-shadow-lg);\n overflow: hidden;\n min-width: ",";\n"],["\n position: fixed;\n top: ","px;\n left: ","px;\n z-index: 999;\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n box-shadow: var(--zjpcy-shadow-lg);\n overflow: hidden;\n min-width: ",";\n"])),function(n){return n.top},function(n){return n.left},function(n){return n.minWidth?"".concat(n.minWidth,"px"):"280px"}),p=r.div(m||(m=n(["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n"],["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n"]))),d=r.div(w||(w=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n border-bottom: 1px solid var(--zjpcy-border-color-light);\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n border-bottom: 1px solid var(--zjpcy-border-color-light);\n"]))),s=r.div(S||(S=n(["\n display: flex;\n align-items: center;\n gap: 4px;\n"],["\n display: flex;\n align-items: center;\n gap: 4px;\n"]))),u=r.div(k||(k=n(["\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n font-weight: 500;\n color: var(--zjpcy-text-color);\n"],["\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n font-weight: 500;\n color: var(--zjpcy-text-color);\n"]))),y=r.div(C||(C=n(["\n display: flex;\n align-items: center;\n gap: 4px;\n"],["\n display: flex;\n align-items: center;\n gap: 4px;\n"]))),g=r.button(I||(I=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: var(--zjpcy-text-color-secondary);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not(:disabled) {\n background-color: var(--zjpcy-bg-color-light);\n color: var(--zjpcy-primary-color);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: var(--zjpcy-text-color-secondary);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not(:disabled) {\n background-color: var(--zjpcy-bg-color-light);\n color: var(--zjpcy-primary-color);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"])));r.select(P||(P=n(["\n border: none;\n background-color: transparent;\n font-size: 14px;\n font-weight: 500;\n color: var(--zjpcy-text-color);\n cursor: pointer;\n padding: 2px 4px;\n border-radius: var(--zjpcy-border-radius-sm);\n\n &:hover {\n background-color: var(--zjpcy-bg-color-light);\n }\n\n &:focus {\n outline: none;\n background-color: var(--zjpcy-bg-color-light);\n }\n"],["\n border: none;\n background-color: transparent;\n font-size: 14px;\n font-weight: 500;\n color: var(--zjpcy-text-color);\n cursor: pointer;\n padding: 2px 4px;\n border-radius: var(--zjpcy-border-radius-sm);\n\n &:hover {\n background-color: var(--zjpcy-bg-color-light);\n }\n\n &:focus {\n outline: none;\n background-color: var(--zjpcy-bg-color-light);\n }\n"])));var x,f,v,b,h,z,j,m,w,S,k,C,I,P,F,M,R,W,T,Q,Y,E,_,q,A,B,D,G,H,J,K,L,N,O,U,V,X,Z,$,nn,rn,on,tn,en,an,cn,ln,pn,dn,sn,un,yn,gn,xn,fn,vn,bn,hn,zn,jn,mn,wn,Sn=r.div(F||(F=n(["\n padding: 12px 16px;\n"],["\n padding: 12px 16px;\n"]))),kn=r.div(M||(M=n(["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0;\n margin-bottom: 8px;\n"],["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0;\n margin-bottom: 8px;\n"]))),Cn=r.div(R||(R=n(["\n text-align: center;\n font-size: 12px;\n color: var(--zjpcy-text-color-tertiary);\n padding: 8px 0;\n font-weight: 500;\n"],["\n text-align: center;\n font-size: 12px;\n color: var(--zjpcy-text-color-tertiary);\n padding: 8px 0;\n font-weight: 500;\n"]))),In=r.div(W||(W=n(["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n"],["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n"]))),Pn=r.div.withConfig({shouldForwardProp:function(n){return!["isSelected","isInSelectedSet","isToday","isCurrentMonth"].includes(n)}})(T||(T=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n font-size: 13px;\n cursor: ",";\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n font-size: 13px;\n cursor: ",";\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"])),function(n){return n.disabled?"not-allowed":"pointer"},function(n){return n.disabled?"var(--zjpcy-text-color-light)":n.isSelected?"#fff":n.isInSelectedSet||n.isToday?"var(--zjpcy-primary-color)":n.isCurrentMonth?"var(--zjpcy-text-color)":"var(--zjpcy-text-color-light)"},function(n){return n.isSelected?"var(--zjpcy-primary-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-color, rgba(24, 100, 240, 0.1))":"transparent"},function(n){return n.isToday||n.isSelected||n.isInSelectedSet?"500":"normal"},function(n){return n.isSelected?"var(--zjpcy-primary-hover-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-hover-color, rgba(24, 100, 240, 0.2))":"var(--zjpcy-bg-color-light)"},function(n){return n.isToday&&!n.isSelected&&"\n border: 1px solid var(--zjpcy-primary-color);\n "}),Fn=r.div(Q||(Q=n(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px;\n border-top: 1px solid var(--zjpcy-border-color-light);\n gap: 8px;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px;\n border-top: 1px solid var(--zjpcy-border-color-light);\n gap: 8px;\n"]))),Mn=r.div(Y||(Y=n(["\n flex: 1;\n"],["\n flex: 1;\n"]))),Rn=r.div(E||(E=n(["\n display: flex;\n align-items: center;\n gap: 8px;\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n"]))),Wn=r.button.withConfig({shouldForwardProp:function(n){return!["variant"].includes(n)}})(_||(_=n(["\n padding: 4px 12px;\n font-size: 13px;\n border-radius: var(--zjpcy-border-radius-sm);\n cursor: pointer;\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n border: 1px solid ",";\n background-color: ",";\n color: ",";\n\n &:hover:not(:disabled) {\n border-color: var(--zjpcy-primary-color);\n ","\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"],["\n padding: 4px 12px;\n font-size: 13px;\n border-radius: var(--zjpcy-border-radius-sm);\n cursor: pointer;\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n border: 1px solid ",";\n background-color: ",";\n color: ",";\n\n &:hover:not(:disabled) {\n border-color: var(--zjpcy-primary-color);\n ","\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"])),function(n){return"primary"===n.variant?"var(--zjpcy-primary-color)":"var(--zjpcy-border-color-extra-light)"},function(n){return"primary"===n.variant?"var(--zjpcy-primary-color)":"var(--zjpcy-bg-color-white)"},function(n){return"primary"===n.variant?"#fff":"var(--zjpcy-text-color)"},function(n){return"primary"===n.variant?"background-color: var(--zjpcy-primary-hover-color);":"color: var(--zjpcy-primary-color);"}),Tn=r.div.withConfig({shouldForwardProp:function(n){return!["gap"].includes(n)}})(q||(q=n(["\n display: flex;\n align-items: center;\n gap: ",";\n"],["\n display: flex;\n align-items: center;\n gap: ",";\n"])),function(n){return"number"==typeof n.gap?"".concat(n.gap,"px"):n.gap||"8px"}),Qn=r.label(A||(A=n(["\n font-size: 14px;\n color: var(--zjpcy-text-color);\n white-space: nowrap;\n user-select: none;\n"],["\n font-size: 14px;\n color: var(--zjpcy-text-color);\n white-space: nowrap;\n user-select: none;\n"]))),Yn=r.div(B||(B=n(["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n min-width: 280px;\n"],["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n min-width: 280px;\n"]))),En=r.div(D||(D=n(["\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding: 16px;\n"],["\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding: 16px;\n"]))),_n=r.div(G||(G=n(["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n min-width: 280px;\n"],["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n min-width: 280px;\n"]))),qn=r.div(H||(H=n(["\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding: 16px;\n"],["\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 8px;\n padding: 16px;\n"]))),An=r.div.withConfig({shouldForwardProp:function(n){return!["isSelected","isInSelectedSet","isCurrentMonth"].includes(n)}})(J||(J=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n font-size: 14px;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n font-size: 14px;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"])),function(n){return n.isSelected?"#fff":n.isInSelectedSet||n.isCurrentMonth?"var(--zjpcy-primary-color)":"var(--zjpcy-text-color)"},function(n){return n.isSelected?"var(--zjpcy-primary-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-color, rgba(24, 100, 240, 0.1))":"transparent"},function(n){return n.isCurrentMonth||n.isSelected||n.isInSelectedSet?"500":"normal"},function(n){return n.isSelected?"var(--zjpcy-primary-hover-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-hover-color, rgba(24, 100, 240, 0.2))":"var(--zjpcy-bg-color-light)"},function(n){return n.isCurrentMonth&&!n.isSelected&&!n.isInSelectedSet&&"\n border: 1px solid var(--zjpcy-primary-color);\n "}),Bn=r.div.withConfig({shouldForwardProp:function(n){return!["isSelected","isInSelectedSet","isCurrentYear"].includes(n)}})(K||(K=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n font-size: 14px;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40px;\n font-size: 14px;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"])),function(n){return n.isSelected?"#fff":n.isInSelectedSet||n.isCurrentYear?"var(--zjpcy-primary-color)":"var(--zjpcy-text-color)"},function(n){return n.isSelected?"var(--zjpcy-primary-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-color, rgba(24, 100, 240, 0.1))":"transparent"},function(n){return n.isCurrentYear||n.isSelected||n.isInSelectedSet?"500":"normal"},function(n){return n.isSelected?"var(--zjpcy-primary-hover-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-hover-color, rgba(24, 100, 240, 0.2))":"var(--zjpcy-bg-color-light)"},function(n){return n.isCurrentYear&&!n.isSelected&&!n.isInSelectedSet&&"\n border: 1px solid var(--zjpcy-primary-color);\n "}),Dn=r.div(L||(L=n(["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n min-width: 280px;\n"],["\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n min-width: 280px;\n"]))),Gn=r.div(N||(N=n(["\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n gap: 8px;\n padding: 16px;\n"],["\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n gap: 8px;\n padding: 16px;\n"]))),Hn=r.div.withConfig({shouldForwardProp:function(n){return!["isSelected","isInSelectedSet","isCurrentQuarter"].includes(n)}})(O||(O=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 48px;\n font-size: 14px;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 48px;\n font-size: 14px;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"])),function(n){return n.isSelected?"#fff":n.isInSelectedSet||n.isCurrentQuarter?"var(--zjpcy-primary-color)":"var(--zjpcy-text-color)"},function(n){return n.isSelected?"var(--zjpcy-primary-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-color, rgba(24, 100, 240, 0.1))":"transparent"},function(n){return n.isCurrentQuarter||n.isSelected||n.isInSelectedSet?"500":"normal"},function(n){return n.isSelected?"var(--zjpcy-primary-hover-color)":n.isInSelectedSet?"var(--zjpcy-primary-light-hover-color, rgba(24, 100, 240, 0.2))":"var(--zjpcy-bg-color-light)"},function(n){return n.isCurrentQuarter&&!n.isSelected&&!n.isInSelectedSet&&"\n border: 1px solid var(--zjpcy-primary-color);\n "});r.div(U||(U=n(["\n display: inline-block;\n position: relative;\n font-size: 14px;\n font-family: inherit;\n width: ",";\n"],["\n display: inline-block;\n position: relative;\n font-size: 14px;\n font-family: inherit;\n width: ",";\n"])),function(n){return"number"==typeof n.width?"".concat(n.width,"px"):n.width||"auto"}),r.div.withConfig({shouldForwardProp:function(n){return!["focused","size","disabled"].includes(n)}})(V||(V=n(["\n display: flex;\n align-items: center;\n width: 100%;\n min-height: ",";\n height: auto;\n padding: ",";\n border: 1px solid ",";\n border-radius: var(--zjpcy-border-radius-sm);\n background-color: ",";\n cursor: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n box-sizing: border-box;\n\n &:hover {\n border-color: ",";\n }\n\n &:focus-within {\n border-color: var(--zjpcy-primary-color);\n box-shadow: var(--zjpcy-input-box-shadow-focus);\n }\n"],["\n display: flex;\n align-items: center;\n width: 100%;\n min-height: ",";\n height: auto;\n padding: ",";\n border: 1px solid ",";\n border-radius: var(--zjpcy-border-radius-sm);\n background-color: ",";\n cursor: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n box-sizing: border-box;\n\n &:hover {\n border-color: ",";\n }\n\n &:focus-within {\n border-color: var(--zjpcy-primary-color);\n box-shadow: var(--zjpcy-input-box-shadow-focus);\n }\n"])),function(n){switch(n.size){case"small":return"24px";case"large":return"40px";default:return"32px"}},function(n){switch(n.size){case"small":return"1px 12px";case"large":return"3px 12px";default:return"2px 12px"}},function(n){return n.disabled?"var(--zjpcy-border-color-extra-light)":n.focused?"var(--zjpcy-primary-color)":"var(--zjpcy-border-color-extra-light)"},function(n){return n.disabled?"var(--zjpcy-bg-color-light)":"var(--zjpcy-bg-color-white)"},function(n){return n.disabled?"not-allowed":"pointer"},function(n){return n.disabled?"var(--zjpcy-border-color-extra-light)":"var(--zjpcy-primary-color)"}),r.div.withConfig({shouldForwardProp:function(n){return!["active"].includes(n)}})(X||(X=n(["\n flex: 1;\n padding: 4px 8px;\n text-align: center;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n ","\n\n &:hover {\n background-color: var(--zjpcy-bg-color-light);\n }\n"],["\n flex: 1;\n padding: 4px 8px;\n text-align: center;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n ","\n\n &:hover {\n background-color: var(--zjpcy-bg-color-light);\n }\n"])),function(n){return n.active&&"\n background-color: var(--zjpcy-primary-light-color, rgba(24, 100, 240, 0.1));\n "}),r.span.withConfig({shouldForwardProp:function(n){return!["isPlaceholder"].includes(n)}})(Z||(Z=n(["\n color: ",";\n font-size: 14px;\n"],["\n color: ",";\n font-size: 14px;\n"])),function(n){return n.isPlaceholder?"var(--zjpcy-text-color-light)":"var(--zjpcy-text-color)"}),r.span($||($=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n color: var(--zjpcy-text-color-light);\n font-size: 14px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n color: var(--zjpcy-text-color-light);\n font-size: 14px;\n"]))),r.span(nn||(nn=n(["\n display: flex;\n align-items: center;\n margin-left: 8px;\n color: var(--zjpcy-text-color-light);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n position: relative;\n width: 16px;\n height: 16px;\n"],["\n display: flex;\n align-items: center;\n margin-left: 8px;\n color: var(--zjpcy-text-color-light);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n position: relative;\n width: 16px;\n height: 16px;\n"]))),r.span(rn||(rn=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--zjpcy-text-color-tertiary);\n cursor: pointer;\n border-radius: 50%;\n background-color: transparent;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 0;\n visibility: hidden;\n z-index: 2;\n\n &:hover {\n color: var(--zjpcy-text-color);\n background-color: var(--zjpcy-bg-color-light);\n }\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 16px;\n height: 16px;\n color: var(--zjpcy-text-color-tertiary);\n cursor: pointer;\n border-radius: 50%;\n background-color: transparent;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 0;\n visibility: hidden;\n z-index: 2;\n\n &:hover {\n color: var(--zjpcy-text-color);\n background-color: var(--zjpcy-bg-color-light);\n }\n\n & > * {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"]))),r.span(on||(on=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 1;\n visibility: visible;\n z-index: 1;\n width: 16px;\n height: 16px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n opacity: 1;\n visibility: visible;\n z-index: 1;\n width: 16px;\n height: 16px;\n"]))),r.div.withConfig({shouldForwardProp:function(n){return!["top","left"].includes(n)}})(tn||(tn=n(["\n position: fixed;\n top: ","px;\n left: ","px;\n z-index: 999;\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n box-shadow: var(--zjpcy-shadow-lg);\n overflow: hidden;\n min-width: 560px;\n"],["\n position: fixed;\n top: ","px;\n left: ","px;\n z-index: 999;\n background-color: var(--zjpcy-bg-color-white);\n border-radius: var(--zjpcy-border-radius-md);\n box-shadow: var(--zjpcy-shadow-lg);\n overflow: hidden;\n min-width: 560px;\n"])),function(n){return n.top},function(n){return n.left}),r.div(en||(en=n(["\n display: flex;\n gap: 16px;\n padding: 16px;\n"],["\n display: flex;\n gap: 16px;\n padding: 16px;\n"]))),r.div(an||(an=n(["\n flex: 1;\n min-width: 252px;\n"],["\n flex: 1;\n min-width: 252px;\n"]))),r.div(cn||(cn=n(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 0;\n margin-bottom: 8px;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 0;\n margin-bottom: 8px;\n"]))),r.div(ln||(ln=n(["\n display: flex;\n align-items: center;\n gap: 4px;\n"],["\n display: flex;\n align-items: center;\n gap: 4px;\n"]))),r.div(pn||(pn=n(["\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n font-weight: 500;\n color: var(--zjpcy-text-color);\n"],["\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n font-weight: 500;\n color: var(--zjpcy-text-color);\n"]))),r.div(dn||(dn=n(["\n display: flex;\n align-items: center;\n gap: 4px;\n"],["\n display: flex;\n align-items: center;\n gap: 4px;\n"]))),r.button(sn||(sn=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: var(--zjpcy-text-color-secondary);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not(:disabled) {\n background-color: var(--zjpcy-bg-color-light);\n color: var(--zjpcy-primary-color);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n border-radius: var(--zjpcy-border-radius-sm);\n color: var(--zjpcy-text-color-secondary);\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not(:disabled) {\n background-color: var(--zjpcy-bg-color-light);\n color: var(--zjpcy-primary-color);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"]))),r.span(un||(un=n(["\n font-size: 12px;\n color: var(--zjpcy-text-color-tertiary);\n margin-left: 8px;\n"],["\n font-size: 12px;\n color: var(--zjpcy-text-color-tertiary);\n margin-left: 8px;\n"]))),r.div(yn||(yn=n(["\n padding: 8px 0;\n"],["\n padding: 8px 0;\n"]))),r.div(gn||(gn=n(["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0;\n margin-bottom: 4px;\n"],["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0;\n margin-bottom: 4px;\n"]))),r.div(xn||(xn=n(["\n text-align: center;\n font-size: 12px;\n color: var(--zjpcy-text-color-tertiary);\n padding: 4px 0;\n font-weight: 500;\n"],["\n text-align: center;\n font-size: 12px;\n color: var(--zjpcy-text-color-tertiary);\n padding: 4px 0;\n font-weight: 500;\n"]))),r.div(fn||(fn=n(["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n"],["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 4px;\n"]))),r.div.withConfig({shouldForwardProp:function(n){return!["isSelected","isToday","isCurrentMonth","isInRange","isRangeStart","isRangeEnd","disabled"].includes(n)}})(vn||(vn=n(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 28px;\n font-size: 13px;\n cursor: ",";\n border-radius: ",";\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 28px;\n font-size: 13px;\n cursor: ",";\n border-radius: ",";\n color: ",";\n background-color: ",";\n font-weight: ",";\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n\n &:hover:not([disabled]) {\n background-color: ",";\n }\n\n ","\n"])),function(n){return n.disabled?"not-allowed":"pointer"},function(n){return n.isRangeStart?"4px 0 0 4px":n.isRangeEnd?"0 4px 4px 0":n.isInRange?"0":"var(--zjpcy-border-radius-sm)"},function(n){return n.disabled?"var(--zjpcy-text-color-light)":n.isSelected?"#fff":n.isCurrentMonth?"var(--zjpcy-text-color)":"var(--zjpcy-text-color-light)"},function(n){return n.isSelected?"var(--zjpcy-primary-color)":n.isInRange?"var(--zjpcy-primary-light-color, rgba(24, 100, 240, 0.1))":"transparent"},function(n){return n.isToday||n.isSelected?"500":"normal"},function(n){return n.isSelected?"var(--zjpcy-primary-hover-color)":"var(--zjpcy-bg-color-light)"},function(n){return n.isToday&&!n.isSelected&&!n.isInRange&&"\n border: 1px solid var(--zjpcy-primary-color);\n "}),r.div(bn||(bn=n(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n border-top: 1px solid var(--zjpcy-border-color-light);\n gap: 8px;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n border-top: 1px solid var(--zjpcy-border-color-light);\n gap: 8px;\n"]))),r.div(hn||(hn=n(["\n flex: 1;\n"],["\n flex: 1;\n"]))),r.div(zn||(zn=n(["\n display: flex;\n align-items: center;\n gap: 8px;\n"],["\n display: flex;\n align-items: center;\n gap: 8px;\n"]))),r.button.withConfig({shouldForwardProp:function(n){return!["variant"].includes(n)}})(jn||(jn=n(["\n padding: 4px 12px;\n font-size: 13px;\n border-radius: var(--zjpcy-border-radius-sm);\n cursor: pointer;\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n border: 1px solid ",";\n background-color: ",";\n color: ",";\n\n &:hover:not(:disabled) {\n border-color: var(--zjpcy-primary-color);\n ","\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"],["\n padding: 4px 12px;\n font-size: 13px;\n border-radius: var(--zjpcy-border-radius-sm);\n cursor: pointer;\n transition: all var(--zjpcy-transition-duration) var(--zjpcy-transition-timing-function);\n border: 1px solid ",";\n background-color: ",";\n color: ",";\n\n &:hover:not(:disabled) {\n border-color: var(--zjpcy-primary-color);\n ","\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"])),function(n){return"primary"===n.variant?"var(--zjpcy-primary-color)":"var(--zjpcy-border-color-extra-light)"},function(n){return"primary"===n.variant?"var(--zjpcy-primary-color)":"var(--zjpcy-bg-color-white)"},function(n){return"primary"===n.variant?"#fff":"var(--zjpcy-text-color)"},function(n){return"primary"===n.variant?"background-color: var(--zjpcy-primary-hover-color);":"color: var(--zjpcy-primary-color);"}),r.div.withConfig({shouldForwardProp:function(n){return!["gap"].includes(n)}})(mn||(mn=n(["\n display: flex;\n align-items: center;\n gap: ",";\n"],["\n display: flex;\n align-items: center;\n gap: ",";\n"])),function(n){return"number"==typeof n.gap?"".concat(n.gap,"px"):n.gap||"8px"}),r.label(wn||(wn=n(["\n font-size: 14px;\n color: var(--zjpcy-text-color);\n white-space: nowrap;\n user-select: none;\n"],["\n font-size: 14px;\n color: var(--zjpcy-text-color);\n white-space: nowrap;\n user-select: none;\n"])));export{Sn as CalendarBody,Fn as CalendarFooter,Rn as CalendarFooterActions,Mn as CalendarFooterSpacer,d as CalendarHeader,p as CalendarPanel,Pn as DateCell,In as DateGrid,a as DatePickerClear,i as DatePickerContainer,l as DatePickerDropdown,c as DatePickerIcon,e as DatePickerSuffix,o as DatePickerTrigger,t as DatePickerValue,Wn as FooterButton,g as HeaderButton,u as HeaderCenter,s as HeaderLeft,y as HeaderRight,Qn as Label,Tn as LabelContainer,An as MonthCell,qn as MonthGrid,_n as MonthPickerPanel,Hn as QuarterCell,Gn as QuarterGrid,Dn as QuarterPickerPanel,Cn as WeekDay,kn as WeekHeader,Bn as YearCell,En as YearGrid,Yn as YearPickerPanel};
|
package/dist/es/Divider/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as i}from"../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import r from"classnames";var d=function(d){var t,a=d.orientation,e=void 0===a?"horizontal":a,s=d.type,c=void 0===s?"solid":s,l=d.color,m=void 0===l?"#339af0":l,n=d.className,v=void 0===n?"":n,f=d.style,p="#339af0"!==m&&void 0!==m,u=r("divider","divider-".concat(e),((t={})["divider-".concat(c,"-").concat(e)]="dashed"===c,t["divider-primary"]=p,t["divider-primary-with-text"]=p,t),v);return o("div",{className:u,style:i({backgroundColor:m},f)})};export{d as default};
|
package/dist/es/Drawer/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsx as t,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as i,useRef as c,useEffect as a,useCallback as o}from"react";import{createPortal as l}from"react-dom";import d from"classnames";import s from"../Icon/Icon.js";import h from"../Button/Button.js";var u=function(u){var m=u.open,p=u.title,y=u.width,w=void 0===y?460:y,f=u.height,v=void 0===f?300:f,g=u.placement,z=void 0===g?"right":g,j=u.maskClosable,b=void 0===j||j,x=u.mask,N=void 0===x||x,C=u.onClose,k=u.children,W=u.className,H=u.style,M=u.maskStyle,I=u.maskClassName,E=u.contentClassName,L=u.contentStyle,S=u.header,_=u.headerClassName,X=u.headerStyle,Y=u.footer,B=u.footerClassName,q=u.footerStyle,A=u.getContainer,D=void 0!==A&&A,F=u.destroyOnClose,P=void 0!==F&&F,T=u.closable,O=void 0===T||T,G=u.zIndex,J=void 0===G?1e3:G,K=u.loading,Q=void 0!==K&&K,R=u.loadingIcon,U=u.resizable,V=void 0!==U&&U,Z=u.resizeHandleSize,$=void 0===Z?8:Z,ee=u.minWidth,te=void 0===ee?460:ee,re=u.minHeight,ne=void 0===re?150:re,ie=u.onChange,ce=i(!1),ae=ce[0],oe=ce[1],le=i(!1),de=le[0],se=le[1],he=i(!1),ue=he[0],me=he[1],pe=window.innerWidth,ye=window.innerHeight,we=i("number"==typeof w?w:460),fe=we[0],ve=we[1],ge=i("number"==typeof v?v:300),ze=ge[0],je=ge[1],be=i(!1),xe=be[0],Ne=be[1],Ce=c(null),ke=c({x:0,y:0}),We=c({width:0,height:0}),He=c({width:fe,height:ze}),Me=c({placement:z,minWidth:te,maxWidth:pe,minHeight:ne,maxHeight:ye,onChange:ie});a(function(){He.current={width:fe,height:ze}},[fe,ze]),a(function(){Me.current={placement:z,minWidth:te,maxWidth:pe,minHeight:ne,maxHeight:ye,onChange:ie}},[z,te,pe,ne,ye,ie]),a(function(){"number"==typeof w&&ve(w)},[w]),a(function(){"number"==typeof v&&je(v)},[v]),a(function(){if(!m){se(!1),me(!0);var e=setTimeout(function(){oe(!1),me(!1)},300);return function(){return clearTimeout(e)}}return me(!1),oe(!0),document.body.style.overflow="hidden",requestAnimationFrame(function(){requestAnimationFrame(function(){se(!0)})}),function(){document.body.style.overflow=""}},[m,300]);var Ie=function(){b&&C()},Ee=function(){C()},Le=function(e){return"number"==typeof e?"".concat(e,"px"):e},Se=function(){var t=e(e({},H),{zIndex:J}),r=V?{width:fe,height:ze}:{width:w,height:v};switch(z){case"left":case"right":t.width=Le(r.width),t.height="100%";break;case"top":case"bottom":t.height=Le(r.height),t.width="100%"}return xe&&(t.transition="none"),t},_e=V&&ae,Xe=function(){switch(z){case"left":return"zjpcy-drawer-resize-handle--right";case"right":return"zjpcy-drawer-resize-handle--left";case"top":return"zjpcy-drawer-resize-handle--bottom";case"bottom":return"zjpcy-drawer-resize-handle--top";default:return""}},Ye=function(){switch(z){case"left":case"right":return"col-resize";case"top":case"bottom":return"row-resize";default:return"default"}},Be=o(function(e){e.preventDefault(),e.stopPropagation();var t=He.current.width,r=He.current.height;if(Ce.current){var n=Me.current;"left"===n.placement||"right"===n.placement?Ce.current.style.width="".concat(t,"px"):Ce.current.style.height="".concat(r,"px")}Ne(!0),ke.current={x:e.clientX,y:e.clientY},We.current={width:t,height:r}},[]),qe=o(function(e){var t,r=Me.current,n=e.clientX-ke.current.x,i=e.clientY-ke.current.y,c=We.current.width,a=We.current.height;if("left"===r.placement){var o=We.current.width+n;(c=Math.max(r.minWidth,Math.min(r.maxWidth,o)))!==o&&(ke.current.x=e.clientX,We.current.width=c)}else if("right"===r.placement){o=We.current.width-n;(c=Math.max(r.minWidth,Math.min(r.maxWidth,o)))!==o&&(ke.current.x=e.clientX,We.current.width=c)}else if("top"===r.placement){var l=We.current.height+i;(a=Math.max(r.minHeight,Math.min(r.maxHeight,l)))!==l&&(ke.current.y=e.clientY,We.current.height=a)}else if("bottom"===r.placement){l=We.current.height-i;(a=Math.max(r.minHeight,Math.min(r.maxHeight,l)))!==l&&(ke.current.y=e.clientY,We.current.height=a)}He.current={width:c,height:a},ve(c),je(a),null===(t=r.onChange)||void 0===t||t.call(r,{width:c,height:a})},[]),Ae=o(function(){Ne(!1)},[]);a(function(){return xe?(document.addEventListener("mousemove",qe),document.addEventListener("mouseup",Ae)):(document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ae)),function(){document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ae)}},[xe,qe,Ae]);var De=function(){return Q?t("div",R?{className:"zjpcy-drawer-loading",children:t("div",{className:"zjpcy-drawer-loading-content",children:R})}:{className:"zjpcy-drawer-loading",children:t("div",{className:"zjpcy-drawer-loading-content",children:t("div",{className:"zjpcy-drawer-loading-spinner",children:r("svg",{viewBox:"0 0 24 24",className:"zjpcy-drawer-loading-icon",children:[t("circle",{className:"zjpcy-drawer-loading-track",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"}),t("circle",{className:"zjpcy-drawer-loading-indicator",cx:"12",cy:"12",r:"10",fill:"none",strokeWidth:"2"})]})})})}):null},Fe=function(){return!1===S?null:S?t("div",{className:d("zjpcy-drawer-header",_),style:X,children:S}):p||O?r("div",{className:d("zjpcy-drawer-header",_),style:X,children:[t("div",{className:"zjpcy-drawer-header__title",children:p}),O&&t("button",{className:"zjpcy-drawer-header__close",onClick:Ee,type:"button","aria-label":"Close",children:t(s,{type:"close",size:20})})]}):null},Pe=function(){var e;return _e?t("div",{className:d("zjpcy-drawer-resize-handle",Xe()),style:(e={cursor:Ye()},e["left"===z||"right"===z?"width":"height"]=$,e),onMouseDown:Be}):null},Te=function(){if(!ae&&!ue)return null;var i=t("div",{className:d("zjpcy-drawer-overlay",{"zjpcy-drawer-overlay--visible":de&&!ue,"zjpcy-drawer-overlay--closing":ue,"zjpcy-drawer-overlay--resizing":xe},I),style:e({zIndex:J},M),onClick:Ie,children:r("div",{ref:Ce,className:d("zjpcy-drawer","zjpcy-drawer--".concat(z),{"zjpcy-drawer--visible":de&&!ue,"zjpcy-drawer--closing":ue,"zjpcy-drawer--no-mask":!N,"zjpcy-drawer--resizing":xe},W),style:Se(),onClick:function(e){return e.stopPropagation()},children:[De(),Fe(),t("div",{className:d("zjpcy-drawer-content",E),style:L,children:P&&ue?null:k}),!1!==Y&&t("div",{className:d("zjpcy-drawer-footer",B),style:q,children:Y||r(n,{children:[t(h,{onClick:Ee,type:"button",children:"取消"}),t(h,{variant:"primary",onClick:Ee,type:"button",children:"确认"})]})}),Pe()]})});return N?i:t("div",{className:d("zjpcy-drawer-wrapper",{"zjpcy-drawer-wrapper--visible":de&&!ue,"zjpcy-drawer-wrapper--closing":ue,"zjpcy-drawer-wrapper--no-mask":!N}),style:{zIndex:J},children:r("div",{ref:Ce,className:d("zjpcy-drawer","zjpcy-drawer--".concat(z),{"zjpcy-drawer--visible":de&&!ue,"zjpcy-drawer--closing":ue,"zjpcy-drawer--no-mask":!N,"zjpcy-drawer--resizing":xe},W),style:Se(),children:[De(),Fe(),t("div",{className:d("zjpcy-drawer-content",E),style:L,children:P&&ue?null:k}),!1!==Y&&t("div",{className:d("zjpcy-drawer-footer",B),style:q,children:Y||r(n,{children:[t("button",{onClick:Ee,type:"button",children:"取消"}),t("button",{onClick:Ee,type:"button",children:"确认"})]})}),Pe()]})})}();if(!Te)return null;if(!1===D)return Te;var Oe="function"==typeof D?D():D;return Oe?l(Te,Oe):Te};export{u as default};
|
package/dist/es/Flex/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";var e=function(e){var i=e.children,r=e.layout,l=void 0===r?"horizontal":r,n=e.direction,a=e.justify,s=void 0===a?"flex-start":a,c=e.align,d=void 0===c?"stretch":c,f=e.wrap,m=void 0===f?"nowrap":f,u=e.gap,p=e.style,v=void 0===p?{}:p,x=n||("column"===l?"column":"row");return o("div",{className:"flex",style:t({gap:"number"==typeof u?"".concat(u,"px"):u,justifyContent:s,alignItems:d,flexWrap:m,flexDirection:x},v),children:i})};export{e as default};
|
package/dist/es/Form/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as e,__awaiter as r,__generator as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as n,jsxs as a}from"react/jsx-runtime";import l,{createContext as i,useState as o,useRef as s,useCallback as u,useEffect as c,useContext as d}from"react";import{FormWrapper as v,FormItemWrapper as f,FormLabel as m,FormControl as p,FormError as h,FormHelp as b}from"./styles.js";var y=i(null),g=function(a){var i=a.children,d=a.className,f=void 0===d?"":d,m=a.style,p=a.layout,h=void 0===p?"horizontal":p,b=a.labelSpan,g=a.wrapperSpan,w=a.initialValues,V=void 0===w?{}:w,N=a.onFinish,k=a.onFinishFailed,E=a.colon,$=void 0===E||E,S=a.requiredMark,q=void 0===S||S,C=a.styles,j=a.formRef,x=a.form,z=o(V),A=z[0],I=z[1],M=o({}),L=M[0],P=M[1],D=s(null),O=s(new Map),R=s(null),_=u(function(r,t){I(function(n){var a;return e(e({},n),((a={})[r]=t,a))}),L[r]&&P(function(t){var n=e({},t);return delete n[r],n})},[L]),B=u(function(e){return A[e]},[A]),G=u(function(r){I(function(t){return e(e({},t),r)}),Object.keys(r).forEach(function(r){L[r]&&P(function(t){var n=e({},t);return delete n[r],n})})},[L]),H=u(function(n){return r(void 0,void 0,void 0,function(){var r,a,l,i,o,s,u,c;return t(this,function(d){switch(d.label){case 0:if(!(r=O.current.get(n)))return[2];if(a=r.rules,l=A[n],!a||0===a.length)return[2];i=function(r){var a,i,o,s,u,c,d,v,f;return t(this,function(t){switch(t.label){case 0:if(r.required&&(null==l||""===l))return a=r.message||"".concat(n," is required"),P(function(r){var t;return e(e({},r),((t={})[n]=a,t))}),[2,{value:a}];if(r.pattern&&!r.pattern.test(l))return i=r.message||"".concat(n," format is invalid"),P(function(r){var t;return e(e({},r),((t={})[n]=i,t))}),[2,{value:i}];if(r.type){switch(o=!0,r.type){case"email":o=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l);break;case"url":o=/^https?:\/\/.+$/.test(l);break;case"number":o=!isNaN(Number(l));break;case"integer":o=Number.isInteger(Number(l));break;case"float":o=!isNaN(parseFloat(l))&&isFinite(l);break;case"string":o="string"==typeof l;break;case"boolean":o="boolean"==typeof l;break;case"array":o=Array.isArray(l);break;case"object":o="object"==typeof l&&null!==l&&!Array.isArray(l)}if(!o)return s=r.message||"".concat(n," must be a ").concat(r.type),P(function(r){var t;return e(e({},r),((t={})[n]=s,t))}),[2,{value:s}]}if(void 0!==r.min&&l.length<r.min)return u=r.message||"".concat(n," must be at least ").concat(r.min," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=u,t))}),[2,{value:u}];if(void 0!==r.max&&l.length>r.max)return c=r.message||"".concat(n," must be at most ").concat(r.max," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=c,t))}),[2,{value:c}];if(void 0!==r.len&&l.length!==r.len)return d=r.message||"".concat(n," must be exactly ").concat(r.len," characters"),P(function(r){var t;return e(e({},r),((t={})[n]=d,t))}),[2,{value:d}];if(!r.validator)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,r.validator(r,l)];case 2:return t.sent(),[3,4];case 3:return v=t.sent(),f=v instanceof Error?v.message:r.message||"".concat(n," validation failed"),P(function(r){var t;return e(e({},r),((t={})[n]=f,t))}),[2,{value:f}];case 4:return[2]}})},o=0,s=a,d.label=1;case 1:return o<s.length?(u=s[o],[5,i(u)]):[3,4];case 2:if("object"==typeof(c=d.sent()))return[2,c.value];d.label=3;case 3:return o++,[3,1];case 4:return P(function(r){var t=e({},r);return delete t[n],t}),[2,null]}})})},[A]),J=u(function(e){return r(void 0,void 0,void 0,function(){var r,n;return t(this,function(t){switch(t.label){case 0:return r=e||Array.from(O.current.keys()),[4,Promise.all(r.map(function(e){return H(e)}))];case 1:if(n=t.sent(),n.some(function(e){return null!==e}))throw new Error("Validation failed");return[2,A]}})})},[H,A]),K=u(function(r){if(r){var t=e({},A);r.forEach(function(e){t[e]=V[e]||void 0}),I(t)}else I(V);P({})},[A,V]),Q={getFieldValue:B,getFieldsValue:function(e){if(!e)return A;var r={};return e.forEach(function(e){r[e]=A[e]}),r},setFieldValue:_,setFieldsValue:G,setFields:function(r){var t=e({},A),n=e({},L);r.forEach(function(e){void 0!==e.value&&(t[e.name]=e.value),e.errors&&e.errors.length>0?n[e.name]=e.errors[0]:delete n[e.name]}),I(t),P(n)},resetFields:K,validateFields:J,submit:function(){J().then(function(){var e=document.querySelector("form");e&&e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))})},destroy:function(){I({}),P({}),O.current.clear(),R.current=null}};c(function(){R.current=Q,j&&(j.current=Q),x&&(x.getFieldValue=Q.getFieldValue,x.getFieldsValue=Q.getFieldsValue,x.setFieldValue=Q.setFieldValue,x.setFieldsValue=Q.setFieldsValue,x.setFields=Q.setFields,x.resetFields=Q.resetFields,x.validateFields=Q.validateFields,x.submit=Q.submit,x.destroy=Q.destroy)},[Q,j,x]);var T=u(function(e,r){return O.current.set(e,r),function(){O.current.delete(e)}},[]),U={layout:h,labelSpan:b,wrapperSpan:g,colon:$,requiredMark:q,values:A,errors:L,setFieldValue:_,getFieldValue:B,setFieldValueList:G,validateField:H,validateFields:J,resetFields:K};return n(y.Provider,{value:U,children:n(v,{ref:D,className:"form-wrapper ".concat(f),style:m,$styles:null==C?void 0:C.wrapper,onSubmit:function(e){return r(void 0,void 0,void 0,function(){var r;return t(this,function(t){switch(t.label){case 0:e.preventDefault(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,J()];case 2:return t.sent(),null==N||N(A),[3,4];case 3:return r=t.sent(),null==k||k({error:r,values:A}),[3,4];case 4:return[2]}})})},children:l.Children.map(i,function(e){return l.isValidElement(e)&&e.type===F?l.cloneElement(e,{registerItem:T}):e})})})},F=function(r){var t=r.name,i=r.label,s=r.required,u=r.rules,v=void 0===u?[]:u,g=r.className,F=void 0===g?"":g,w=r.style,V=r.help,N=r.validateStatus,k=r.colon,E=r.labelSpan,$=r.wrapperSpan,S=r.hidden,q=void 0!==S&&S,C=r.extra,j=r.styles,x=r.registerItem,z=r.children,A=d(y),I=o(t&&(null==A?void 0:A.values[t])?A.values[t]:""),M=I[0],L=I[1];c(function(){if(x&&t)return x(t,{rules:v})},[x,t,v]),c(function(){A&&t&&L(A.values[t])},[A,t,null==A?void 0:A.values]);var P=s||v.some(function(e){return e.required}),D=A&&t?A.errors[t]:"",O=!!D||"error"===N,R=void 0!==E?E:null==A?void 0:A.labelSpan,_=void 0!==$?$:null==A?void 0:A.wrapperSpan,B=R?R/24*100:void 0,G=void 0;if(void 0!==R){var H=24-R,J=void 0!==_?_:H;J>H&&(J=H),J<1&&(J=1),G=J/24*100}return q?null:a(f,{className:"form-item ".concat(F),style:w,$layout:(null==A?void 0:A.layout)||"horizontal",$styles:null==j?void 0:j.wrapper,children:[i&&n(m,{className:"form-label",$required:P,$colon:void 0!==k?k:null==A?void 0:A.colon,$styles:e(e({},null==j?void 0:j.label),void 0!==B?{width:"".concat(B,"%")}:{}),children:i}),a(p,{className:"form-control",$styles:e(e({},null==j?void 0:j.input),void 0!==G?{width:"".concat(G,"%")}:{}),children:[l.Children.map(l.Children.toArray(z).filter(function(e){return l.isValidElement(e)}),function(e){var r=e.props,n=r.autoComplete||function(e){if(e)return{username:"username",email:"email",password:"current-password","new-password":"new-password","current-password":"current-password",name:"name","given-name":"given-name","family-name":"family-name",tel:"tel",phone:"tel",address:"street-address",city:"address-level2",country:"country-name",zipcode:"postal-code","postal-code":"postal-code",organization:"organization",company:"organization"}[e.toLowerCase()]}(t);return l.cloneElement(e,{value:M,onChange:function(e){var n,a;!function(e){L(e),t&&(null==A||A.setFieldValue(t,e))}(void 0!==(null===(n=null==e?void 0:e.target)||void 0===n?void 0:n.value)?e.target.value:e),null===(a=r.onChange)||void 0===a||a.call(r,e)},error:O||void 0,autoComplete:n})}),O&&n(h,{className:"form-error ".concat(O?"form-error-visible":""),$styles:null==j?void 0:j.error,children:D}),V&&!O&&n(b,{className:"form-help",$styles:null==j?void 0:j.help,children:V}),C&&!O&&n(b,{className:"form-help",$styles:null==j?void 0:j.help,children:C})]})]})};g.Item=F;var w=g;export{w as default};
|
package/dist/es/Form/styles.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import o,{keyframes as r}from"styled-components";var t,i,e,a,l,m,c,f=function(n,o){return"var(".concat(n,", ").concat(o,")")},p=r(t||(t=n(["\n from {\n opacity: 0;\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n to {\n opacity: 1;\n max-height: 100px;\n padding-bottom: 4px;\n }\n"],["\n from {\n opacity: 0;\n max-height: 0;\n padding-top: 0;\n padding-bottom: 0;\n }\n to {\n opacity: 1;\n max-height: 100px;\n padding-bottom: 4px;\n }\n"]))),s=o.form(i||(i=n(["\n width: 100%;\n\n &.form-wrapper {\n /* 外部可通过 .form-wrapper 选择器覆盖样式 */\n }\n\n ","\n"],["\n width: 100%;\n\n &.form-wrapper {\n /* 外部可通过 .form-wrapper 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){var o=n.$styles;return o&&Object.entries(o).map(function(n){var o=n[0],r=n[1];return"".concat(o,": ").concat(r,";")}).join("\n")}),b=o.div(e||(e=n(["\n margin-bottom: ",";\n\n &.form-item {\n /* 外部可通过 .form-item 选择器覆盖样式 */\n }\n\n ","\n\n ","\n\n ","\n"],["\n margin-bottom: ",";\n\n &.form-item {\n /* 外部可通过 .form-item 选择器覆盖样式 */\n }\n\n ","\n\n ","\n\n ","\n"])),f("--form-item-margin-bottom","24px"),function(n){return"horizontal"===n.$layout&&"\n display: flex;\n align-items: center;\n\n & .form-label {\n margin-bottom: 0;\n }\n "},function(n){return"inline"===n.$layout&&"\n display: inline-flex;\n align-items: center;\n margin-right: ".concat(f("--form-inline-item-margin-right","24px"),";\n margin-bottom: 0;\n\n & .form-label {\n margin-bottom: 0;\n }\n ")},function(n){var o=n.$styles;return o&&Object.entries(o).map(function(n){var o=n[0],r=n[1];return"".concat(o,": ").concat(r,";")}).join("\n")}),d=o.label(a||(a=n(["\n display: block;\n font-size: ",";\n color: ",";\n margin-bottom: ",";\n white-space: nowrap;\n text-align: ",";\n\n &.form-label {\n /* 外部可通过 .form-label 选择器覆盖样式 */\n }\n\n &::after {\n content: ",";\n margin: 0 8px 0 2px;\n }\n\n &::before {\n content: ",";\n color: ",";\n margin-right: 4px;\n display: inline-block;\n vertical-align: middle;\n }\n\n ","\n"],["\n display: block;\n font-size: ",";\n color: ",";\n margin-bottom: ",";\n white-space: nowrap;\n text-align: ",";\n\n &.form-label {\n /* 外部可通过 .form-label 选择器覆盖样式 */\n }\n\n &::after {\n content: ",";\n margin: 0 8px 0 2px;\n }\n\n &::before {\n content: ",";\n color: ",";\n margin-right: 4px;\n display: inline-block;\n vertical-align: middle;\n }\n\n ","\n"])),f("--form-label-font-size","14px"),f("--form-label-color","#333"),f("--form-label-margin-bottom","8px"),function(n){return n.$labelAlign||"end"},function(n){return n.$colon?'":"':""},function(n){return n.$required?'"*"':'""'},f("--form-label-required-color","#f5222d"),function(n){var o=n.$styles;return o&&Object.entries(o).map(function(n){var o=n[0],r=n[1];return"".concat(o,": ").concat(r,";")}).join("\n")}),u=o.div(l||(l=n(["\n width: 100%;\n position: relative;\n\n &.form-control {\n /* 外部可通过 .form-control 选择器覆盖样式 */\n }\n\n ","\n"],["\n width: 100%;\n position: relative;\n\n &.form-control {\n /* 外部可通过 .form-control 选择器覆盖样式 */\n }\n\n ","\n"])),function(n){var o=n.$styles;return o&&Object.entries(o).map(function(n){var o=n[0],r=n[1];return"".concat(o,": ").concat(r,";")}).join("\n")}),g=o.div(m||(m=n(["\n font-size: ",";\n color: ",";\n line-height: 1.5;\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n opacity: 0;\n max-height: 0;\n overflow: hidden;\n z-index: 10;\n\n &.form-error {\n /* 外部可通过 .form-error 选择器覆盖样式 */\n }\n\n &.form-error-visible {\n animation: "," 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;\n }\n\n ","\n"],["\n font-size: ",";\n color: ",";\n line-height: 1.5;\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n opacity: 0;\n max-height: 0;\n overflow: hidden;\n z-index: 10;\n\n &.form-error {\n /* 外部可通过 .form-error 选择器覆盖样式 */\n }\n\n &.form-error-visible {\n animation: "," 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;\n }\n\n ","\n"])),f("--form-error-font-size","12px"),f("--form-error-color","#f5222d"),p,function(n){var o=n.$styles;return o&&Object.entries(o).map(function(n){var o=n[0],r=n[1];return"".concat(o,": ").concat(r,";")}).join("\n")}),h=o.div(c||(c=n(["\n font-size: ",";\n color: ",";\n line-height: 1.5;\n position: absolute;\n\n &.form-help {\n /* 外部可通过 .form-help 选择器覆盖样式 */\n }\n\n ","\n"],["\n font-size: ",";\n color: ",";\n line-height: 1.5;\n position: absolute;\n\n &.form-help {\n /* 外部可通过 .form-help 选择器覆盖样式 */\n }\n\n ","\n"])),f("--form-help-font-size","12px"),f("--form-help-color","#00000073"),function(n){var o=n.$styles;return o&&Object.entries(o).map(function(n){var o=n[0],r=n[1];return"".concat(o,": ").concat(r,";")}).join("\n")});export{u as FormControl,g as FormError,h as FormHelp,b as FormItemWrapper,d as FormLabel,s as FormWrapper};
|
package/dist/es/Grid/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as r}from"react/jsx-runtime";import a,{createContext as e,useContext as i}from"react";import l from"classnames";import{ColWrapper as s,RowWrapper as o,GridWrapper as d}from"./styles.js";var n=e({}),p=e({}),t=a.forwardRef(function(a,e){var o=a.children,d=a.className,n=a.style,t=a.span,c=a.offset,f=a.push,g=a.pull,u=a.order,m=a.gap,h=i(p),v=null==h?void 0:h.gap,y=void 0!==m?m:v;return r(s,{ref:e,className:l("zjpcy-grid-col",d),style:n,span:t,offset:c,push:f,pull:g,order:u,gap:y,children:o})});t.displayName="Grid.Col";var c=a.forwardRef(function(a,e){var s=a.children,d=a.className,t=a.style,c=a.span,f=a.gap,g=a.rowGap,u=a.align,m=a.justify,h=a.wrap,v=void 0===h||h,y=i(n),w=null==y?void 0:y.gap,j=void 0!==f?f:w;return r(p.Provider,{value:{gap:j},children:r(o,{ref:e,className:l("zjpcy-grid-row",d),style:t,span:c,rowGap:g,align:u,justify:m,wrap:v,children:s})})});c.displayName="Grid.Row";var f=Object.assign(c,{Col:t}),g=a.forwardRef(function(a,e){var i=a.children,s=a.className,o=a.style,p=a.width,t=a.height,c=a.gap,f=a.padding,g=a.backgroundColor;return r(n.Provider,{value:{gap:c},children:r(d,{ref:e,className:l("zjpcy-grid",s),style:o,width:p,height:t,gap:c,padding:f,backgroundColor:g,children:i})})});g.displayName="Grid";var u=Object.assign(g,{Row:f,Col:t});export{t as Col,f as Row,u as default};
|
package/dist/es/Grid/styles.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import o from"styled-components";var t,r,i,a=o.div.withConfig({shouldForwardProp:function(n){return!["width","height","gap","padding","backgroundColor"].includes(n)}})(t||(t=n(["\n width: ",";\n height: ",";\n gap: ",";\n padding: ",";\n background-color: ",";\n box-sizing: border-box;\n"],["\n width: ",";\n height: ",";\n gap: ",";\n padding: ",";\n background-color: ",";\n box-sizing: border-box;\n"])),function(n){return void 0!==n.width?"number"==typeof n.width?"".concat(n.width,"px"):n.width:"100%"},function(n){return void 0!==n.height?"number"==typeof n.height?"".concat(n.height,"px"):n.height:"auto"},function(n){return void 0!==n.gap?"number"==typeof n.gap?"".concat(n.gap,"px"):n.gap:"0"},function(n){return void 0!==n.padding?"number"==typeof n.padding?"".concat(n.padding,"px"):n.padding:"0"},function(n){return n.backgroundColor||"transparent"}),e=o.div.withConfig({shouldForwardProp:function(n){return!["span","rowGap","align","justify","wrap"].includes(n)}})(r||(r=n(["\n display: flex;\n width: ",";\n row-gap: ",";\n align-items: ",";\n justify-content: ",";\n flex-wrap: ",";\n box-sizing: border-box;\n"],["\n display: flex;\n width: ",";\n row-gap: ",";\n align-items: ",";\n justify-content: ",";\n flex-wrap: ",";\n box-sizing: border-box;\n"])),function(n){return void 0!==n.span?"calc(".concat(n.span," / 24 * 100%)"):"100%"},function(n){return void 0!==n.rowGap?"number"==typeof n.rowGap?"".concat(n.rowGap,"px"):n.rowGap:"0"},function(n){return n.align||"stretch"},function(n){return n.justify||"flex-start"},function(n){return!1!==n.wrap?"wrap":"nowrap"}),c=o.div.withConfig({shouldForwardProp:function(n){return!["span","offset","push","pull","order","gap"].includes(n)}})(i||(i=n(["\n flex: ",";\n max-width: ",";\n margin-left: ",";\n margin-right: ",";\n order: ",";\n padding-left: ",";\n padding-right: ",";\n box-sizing: border-box;\n"],["\n flex: ",";\n max-width: ",";\n margin-left: ",";\n margin-right: ",";\n order: ",";\n padding-left: ",";\n padding-right: ",";\n box-sizing: border-box;\n"])),function(n){return void 0!==n.span?"0 0 calc(".concat(n.span," / 24 * 100%)"):"1"},function(n){return void 0!==n.span?"calc(".concat(n.span," / 24 * 100%)"):"100%"},function(n){return void 0!==n.pull?"calc(-".concat(n.pull," / 24 * 100%)"):void 0!==n.offset?"calc(".concat(n.offset," / 24 * 100%)"):"0"},function(n){return void 0!==n.push?"calc(".concat(n.push," / 24 * 100%)"):"0"},function(n){return void 0!==n.order?n.order:"0"},function(n){return void 0!==n.gap?"number"==typeof n.gap?"".concat(n.gap/2,"px"):"calc(".concat(n.gap," / 2)"):"0"},function(n){return void 0!==n.gap?"number"==typeof n.gap?"".concat(n.gap/2,"px"):"calc(".concat(n.gap," / 2)"):"0"});export{c as ColWrapper,a as GridWrapper,e as RowWrapper};
|
package/dist/es/Hooks/useCopy.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from"../node_modules/tslib/tslib.es6.js";import n from"react";var o=function(n){return e(void 0,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return navigator.clipboard&&window.isSecureContext?[4,navigator.clipboard.writeText(n)]:[3,2];case 1:return t.sent(),[3,3];case 2:(e=document.createElement("textarea")).style.position="fixed",e.style.top=e.style.left="-100vh",e.style.opacity="0",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),t.label=3;case 3:return[2]}})})};function r(){var r=this;return n.useCallback(function(n){return e(r,void 0,void 0,function(){return t(this,function(e){switch(e.label){case 0:return[4,o(n)];case 1:return[2,e.sent()]}})})},[])}export{r as default};
|
package/dist/es/Icon/Icon.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{__assign as r}from"../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import{useMemo as o}from"react";import{presetIcons as t,searchIcon as i,loadingIcon as n,userIcon as l,closeIcon as a,checkIcon as c,plusIcon as u,minusIcon as s,arrowLeftIcon as f,arrowRightIcon as d,arrowUpIcon as m,arrowDownIcon as v,leftIcon as h,rightIcon as p,doubleLeftIcon as g,doubleRightIcon as w}from"./path.js";var y={search:i,loading:n,user:l,close:a,check:c,plus:u,minus:s,arrowLeft:f,arrowRight:d,arrowUp:m,arrowDown:v,left:h,right:p,"double-left":g,"double-right":w},b=function(r){return y[r]?y[r]:t[r]},x={small:12,medium:16,large:24},j=function(t){var i=t.type,n=t.path,l=t.viewBox,a=void 0===l?"0 0 24 24":l,c=t.size,u=void 0===c?"medium":c,s=t.color,f=void 0===s?"#339af0":s,d=t.hoverColor,m=t.spin,v=void 0!==m&&m,h=t.rotate,p=t.align,g=void 0===p?"center":p,w=t.className,y=void 0===w?"":w,j=t.style,k=t.onClick,B=o(function(){return"number"==typeof u?u:x[u]||16},[u]),C=o(function(){if(n)return n;if(i){var r=b(i);return(null==r?void 0:r.path)||""}return""},[i,n]),N=o(function(){if("0 0 24 24"!==a)return a;if(i){var r=b(i);return(null==r?void 0:r.viewBox)||"0 0 24 24"}return"0 0 24 24"},[i,a]);if(!C)return null;var L=r({width:B,height:B,fill:f,transform:h?"rotate(".concat(h,"deg)"):void 0},j);return e("div",{className:"icon-container icon-align-".concat(g," ").concat(y),children:e("svg",{viewBox:N,className:"icon ".concat(v?"icon-spin":""),style:L,onMouseEnter:function(r){d&&(r.currentTarget.style.fill=d)},onMouseLeave:function(r){d&&(r.currentTarget.style.fill=f)},onClick:k,children:e("path",{d:C})})})};export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as e,__assign as l}from"../node_modules/tslib/tslib.es6.js";import{jsxs as a,jsx as n}from"react/jsx-runtime";import t from"react";import i from"../Icon/Icon.js";var o=function(o){var r=o.type,s=void 0===r?"text":r,u=o.placeholder,c=void 0===u?"":u,d=o.width,p=o.className,m=void 0===p?"":p,f=o.style,v=o.value,y=o.defaultValue,h=o.onChange,b=o.onBlur,x=o.onFocus,N=o.disabled,g=void 0!==N&&N,w=o.readOnly,C=void 0!==w&&w,S=o.onKeyDown,j=o.prefix,B=o.suffix,D=o.clear,F=void 0!==D&&D,I=o.extra,K=o.label,O=o.labelGap,z=void 0===O?8:O,G=o.labelClassName,V=void 0===G?"":G,k=o.labelStyle,R=o.autoComplete,_=e(o,["type","placeholder","width","className","style","value","defaultValue","onChange","onBlur","onFocus","disabled","readOnly","onKeyDown","prefix","suffix","clear","extra","label","labelGap","labelClassName","labelStyle","error","autoComplete"]),q=t.useState(y||""),A=q[0],E=q[1],H=t.useState(!1),J=H[0],L=H[1],M=function(e){return e?"string"==typeof e?n(i,{type:e,size:"medium",color:"#909399"}):e:null},P=void 0!==v?v:A,Q=F&&!g&&!C&&J&&null!=P&&P.toString().length>0;return a("div",{className:"input-base-container",children:[a("div",{className:"input-label-wrapper",style:{display:"flex",alignItems:"center"},children:[K&&n("div",{className:"input-label ".concat(V),style:l({marginRight:"number"==typeof z?"".concat(z,"px"):z},k),children:K}),a("div",{className:"input-wrapper ".concat(m," ").concat(g?"input-wrapper-disabled":""," ").concat(C?"input-wrapper-readonly":""),style:l({width:d},f),children:[j&&n("div",{className:"input-prefix",children:M(j)}),n("input",l({type:s,placeholder:c,className:"input-inner",value:null!=v?String(v):P,onChange:function(e){void 0===v&&E(e.target.value),null==h||h(e)},onBlur:function(e){L(!1),null==b||b(e)},onFocus:function(e){L(!0),null==x||x(e)},disabled:g,readOnly:C,onKeyDown:S,autoComplete:null!=R?R:"password"===s?"current-password":void 0},_)),a("div",{className:"input-suffix-group",children:[n("div",{className:"input-suffix-clear ".concat(Q?"visible":""),onClick:function(){g||C||(void 0!==v||E(""),h&&h({target:{value:""}}))},children:n(i,{type:"close",size:"medium",color:"#1890ff"})}),B&&n("div",{className:"input-suffix-content",children:M(B)})]})]})]}),I&&n("div",{className:"input-extra",children:I})]})};export{o as default};
|
package/dist/es/Input/Number.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as e,__assign as s}from"../node_modules/tslib/tslib.es6.js";import{jsxs as a,jsx as i}from"react/jsx-runtime";import t from"react";import r from"./InputBase.js";var n=function(n){var l=n.nType,d=n.errorMessage,m=n.extra,g=n.value,o=n.onChange,c=n.clear,u=void 0!==c&&c,v=e(n,["nType","errorMessage","extra","value","onChange","clear"]),p=function(e){if(!e)return{isValid:!0,message:""};var s=("string"==typeof e?e:String(e)).trim(),a=parseFloat(s);if(isNaN(a))return{isValid:!1,message:"请输入有效的数字"};switch(l){case"positive-float":return/^\d+(\.\d+)?$/.test(s)&&a>0?{isValid:!0,message:""}:{isValid:!1,message:"请输入正浮点数"};case"negative-float":return/^-\d+(\.\d+)?$/.test(s)&&a<0?{isValid:!0,message:""}:{isValid:!1,message:"请输入负浮点数"};case"positive-integer":return/^\d+$/.test(s)&&a>0?{isValid:!0,message:""}:{isValid:!1,message:"请输入正整数"};case"negative-integer":return/^-\d+$/.test(s)&&a<0?{isValid:!0,message:""}:{isValid:!1,message:"请输入负整数"};case"integer":return/^-?\d+$/.test(s)?{isValid:!0,message:""}:{isValid:!1,message:"请输入整数"};case"negative":return/^-\d+(\.\d+)?$/.test(s)&&a<0?{isValid:!0,message:""}:{isValid:!1,message:"请输入负数"};case"positive":return/^\d+(\.\d+)?$/.test(s)&&a>0?{isValid:!0,message:""}:{isValid:!1,message:"请输入正数"};default:return{isValid:!0,message:""}}},f=t.useState({isValid:!0,message:""}),V=f[0],h=f[1];t.useEffect(function(){if(l&&g){var e=p(g);h(e)}},[l,g]);var N=d||V.message,$=!!N,x=!$&&m;return a("div",{className:"number-input-wrapper",children:[i(r,s({type:"text",value:g,onChange:function(e){var s=e.target.value;if(null==o||o(e),l){var a=p(s);h(a)}},clear:u},v,{className:"".concat(v.className||""," ").concat($?"input-error":"")})),$&&i("div",{className:"input-error-message ".concat($?"visible":""),children:N}),x&&i("div",{className:"input-extra",children:m})]})};export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as e,__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import i from"react";import r from"./InputBase.js";import s from"../Icon/Icon.js";var n=function(n){var a=n.defaultVisible,l=void 0!==a&&a,u=n.onVisibleChange,m=n.autoComplete,f=void 0===m?"current-password":m,p=e(n,["defaultVisible","onVisibleChange","autoComplete"]),c=i.useState(l),d=c[0],b=c[1];return o(r,t({type:d?"text":"password",suffix:o("div",{className:"input-suffix-content",onClick:function(){var e=!d;b(e),null==u||u(e)},style:{cursor:"pointer"},children:o(s,{type:d?"eye":"eyeOff",size:"medium",color:"#909399"})}),autoComplete:f},p))};export{n as default};
|
package/dist/es/Input/Search.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__rest as e,__assign as o}from"../node_modules/tslib/tslib.es6.js";import{jsx as l,jsxs as r}from"react/jsx-runtime";import n from"./InputBase.js";import a from"../Icon/Icon.js";var i=function(i){var t=i.type,s=void 0===t?"text":t,c=i.placeholder,u=void 0===c?"搜索":c,d=i.width,p=i.className,h=void 0===p?"":p,f=i.style,y=i.value,m=i.onChange,v=i.onBlur,x=i.onFocus,C=i.disabled,g=void 0!==C&&C,w=i.readOnly,b=void 0!==w&&w,j=i.onSearch,k=i.onClear,B=i.clear,N=void 0!==B&&B,F=i.suffix,I=e(i,["type","placeholder","width","className","style","value","onChange","onBlur","onFocus","disabled","readOnly","onSearch","onClear","clear","suffix"]),O=function(){null==j||j()},S=N?l(a,{type:"search",onClick:O,style:{cursor:"pointer"}}):F;return r("div",{className:"search-input-wrapper ".concat(h),style:o({width:d},f),children:[l(n,o({type:s,placeholder:u,width:"100%",value:y,onChange:m,onBlur:v,onFocus:x,disabled:g,readOnly:b,onKeyDown:function(e){"Enter"===e.key&&(null==j||j())},clear:N,suffix:S},I)),!N&&r("div",{className:"search-input-suffix",children:[y&&l(a,{type:"clear",size:"small",onClick:function(){if(null==k||k(),!k&&m){m({target:{value:""}})}},style:{cursor:"pointer",marginRight:"8px"}}),l(a,{type:"search",onClick:O,style:{cursor:"pointer"}})]})]})};export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"../node_modules/tslib/tslib.es6.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";import i from"react";import r from"../Icon/Icon.js";var a=function(a){var o=a.placeholder,l=void 0===o?"":o,s=a.width,c=a.height,u=a.className,d=void 0===u?"":u,p=a.style,m=a.value,f=a.defaultValue,h=a.onChange,v=a.onBlur,x=a.onFocus,g=a.onKeyDown,y=a.disabled,b=void 0!==y&&y,w=a.readOnly,z=void 0!==w&&w,N=a.rows,S=void 0===N?4:N,I=a.cols,C=a.maxLength,E=a.showCount,L=void 0!==E&&E,R=a.clear,j=void 0!==R&&R,D=a.extra,M=a.label,B=a.labelGap,H=void 0===B?8:B,W=a.labelClassName,X=void 0===W?"":W,Y=a.labelStyle,F=a.resizable,K=void 0!==F&&F,O=a.resizeHandleSize,V=void 0===O?10:O,$=a.minWidth,k=void 0===$?200:$,G=a.maxWidth,P=void 0===G?2e3:G,T=a.minHeight,_=void 0===T?80:T,q=a.maxHeight,A=void 0===q?800:q,J=a.onResize,Q=i.useState(f||""),U=Q[0],Z=Q[1],ee=i.useState(!1),te=ee[0],ne=ee[1],ie=i.useState(!1),re=ie[0],ae=ie[1],oe=i.useRef(null),le=i.useRef(null),se=i.useRef(null),ce=function(e){if(void 0===e)return 0;if("number"==typeof e)return e;var t=String(e).match(/^(\d+)px$/);return t?parseInt(t[1],10):0},ue=function(e){if(void 0===e)return 0;if("number"==typeof e)return e;var t=String(e).match(/^(\d+)px$/);return t?parseInt(t[1],10):0},de=i.useState(ce(s)||0),pe=de[0],me=de[1],fe=i.useState(ue(c)||24*S||80),he=fe[0],ve=fe[1];i.useEffect(function(){if(le.current){var e=ce(s)||le.current.offsetWidth||0,t=ue(c)||24*S||80;me(e),ve(t)}},[]);var xe=void 0!==m,ge=xe?m:U,ye=(null==ge?void 0:ge.length)||0;i.useEffect(function(){var e=function(e){if(re&&se.current){var t=e.clientX-se.current.mouseX,n=e.clientY-se.current.mouseY,i=se.current.width+t,r=se.current.height+n;i=Math.max(k,Math.min(P,i)),r=Math.max(_,Math.min(A,r)),me(i),ve(r),null==J||J({width:i,height:r})}},t=function(){se.current=null,ae(!1)};return re&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[re,k,P,_,A,J]);var be={display:"inline-flex",flexDirection:"column",width:s?"number"==typeof s?"".concat(s,"px"):s:"100%"},we={position:"relative",display:"flex",alignItems:"flex-start",flex:1,width:K?"number"==typeof pe?"".concat(pe,"px"):pe:void 0},ze=e({width:"100%",height:c?"number"==typeof c?"".concat(c,"px"):c:void 0,resize:"none"},p),Ne=j&&ge&&!b&&!z,Se=K?e(e({},ze),{width:"100%",height:K?"number"==typeof he?"".concat(he,"px"):he:void 0}):ze;return t("div",{className:"textarea-wrapper ".concat(d),style:be,ref:le,children:[(M||L||Ne)&&t("div",{className:"textarea-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[M?n("label",{className:"input-label ".concat(X),style:e({marginRight:"number"==typeof H?"".concat(H,"px"):H},Y),children:M}):null,t("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[Ne&&n("span",{className:"textarea-clear",onClick:function(){if(!b&&!z){xe||Z(""),null==h||h({target:{value:""}})}},style:{cursor:"pointer"},children:n(r,{type:"close-circle",size:"small",color:"#909399"})}),L&&C&&t("span",{className:"textarea-count",style:{fontSize:"12px",color:"#909399"},children:[ye,"/",C]})]})]}),t("div",{className:"input-wrapper textarea-input-wrapper ".concat(te?"textarea-input-wrapper-focused":""," ").concat(b?"textarea-input-wrapper-disabled":""," ").concat(re?"textarea-input-wrapper-resizing":""),style:we,children:[n("textarea",{ref:oe,className:"input-base textarea-base",placeholder:l,value:ge,defaultValue:xe?void 0:f,onChange:function(e){var t=e.target.value;xe||Z(t),null==h||h(e)},onBlur:function(e){ne(!1),null==v||v(e)},onFocus:function(e){ne(!0),null==x||x(e)},onKeyDown:g,disabled:b,readOnly:z,rows:S,cols:I,maxLength:C,style:Se}),K&&n("div",{className:"textarea-resize-handle",onMouseDown:function(e){K&&!b&&!z&&le.current&&(e.preventDefault(),e.stopPropagation(),se.current={mouseX:e.clientX,mouseY:e.clientY,width:le.current.offsetWidth,height:le.current.offsetHeight},ae(!0))},style:{position:"absolute",bottom:"0",right:"0",width:"".concat(V,"px"),height:"".concat(V,"px"),cursor:"nwse-resize",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:n("div",{style:{width:"8px",height:"8px",borderRight:"2px solid #909399",borderBottom:"2px solid #909399"}})})]}),D&&n("div",{className:"input-extra",style:{marginTop:"4px"},children:D})]})};export{a as default};
|
package/dist/es/Label/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as i}from"../node_modules/tslib/tslib.es6.js";import{jsx as t}from"react/jsx-runtime";import{LabelWrapper as o}from"./styles.js";var r=function(r){var e=r.title,l=r.indicatorColor,a=void 0===l?"blue":l,d=r.indicatorWidth,n=void 0===d?"3px":d,c=r.indicatorHeight,s=void 0===c?"100%":c,p=r.paddingRight,m=void 0===p?"8px":p,u=r.style,b=function(i){return void 0===i?"":"number"==typeof i?"".concat(i,"px"):i},h={"--label-indicator-color":a,"--label-indicator-width":b(n),"--label-indicator-height":b(s),"--label-padding-right":b(m)},f=i(i({},h),u);return t(o,{className:"label-wrapper",style:f,children:e||null})};export{r as default};
|
package/dist/es/Label/styles.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from"../node_modules/tslib/tslib.es6.js";import a from"styled-components";var r,e=a.label(r||(r=n(["\n /* 基础样式 */\n background: linear-gradient(135deg, #fffdfd 0%, #f0f0f0 100%);\n padding: 6px 12px;\n padding-right: var(--label-padding-right, 12px);\n padding-left: 12px;\n border-radius: 0px;\n position: relative;\n display: inline-flex;\n align-items: center;\n font-weight: 600;\n font-size: 14px;\n color: #262626;\n letter-spacing: 0.3px;\n \n /* 阴影效果 */\n box-shadow: \n 0 2px 8px rgba(0, 0, 0, 0.06),\n 0 1px 2px rgba(0, 0, 0, 0.04);\n \n /* 平滑过渡 */\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n \n // /* 悬停效果 */\n // &:hover {\n // background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);\n // box-shadow: \n // 0 4px 16px rgba(0, 0, 0, 0.1),\n // 0 2px 4px rgba(0, 0, 0, 0.06);\n // // transform: translateY(-1px);\n // }\n \n /* 指示器样式 - 渐变条 */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n width: var(--label-indicator-width, 4px);\n height: var(--label-indicator-height, 70%);\n background: linear-gradient(\n 180deg,\n var(--label-indicator-color, #1890ff) 0%,\n rgba(24, 144, 255, 0.6) 100%\n );\n border-radius: 0 4px 4px 0;\n box-shadow: 2px 0 8px rgba(24, 144, 255, 0.3);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* 悬停时指示器效果 */\n // &:hover::before {\n // width: calc(var(--label-indicator-width, 4px) + 1px);\n // box-shadow: 3px 0 12px rgba(24, 144, 255, 0.4);\n // filter: brightness(1.1);\n // }\n \n /* 光晕装饰 */\n // &::after {\n // content: '';\n // position: absolute;\n // top: 0;\n // right: 0;\n // width: 60px;\n // height: 100%;\n // background: linear-gradient(\n // 90deg,\n // transparent 0%,\n // rgba(255, 255, 255, 0.4) 50%,\n // transparent 100%\n // );\n // border-radius: 0 8px 8px 0;\n // pointer-events: none;\n // opacity: 0;\n // transition: opacity 0.3s ease;\n // }\n \n &:hover::after {\n opacity: 1;\n }\n"],["\n /* 基础样式 */\n background: linear-gradient(135deg, #fffdfd 0%, #f0f0f0 100%);\n padding: 6px 12px;\n padding-right: var(--label-padding-right, 12px);\n padding-left: 12px;\n border-radius: 0px;\n position: relative;\n display: inline-flex;\n align-items: center;\n font-weight: 600;\n font-size: 14px;\n color: #262626;\n letter-spacing: 0.3px;\n \n /* 阴影效果 */\n box-shadow: \n 0 2px 8px rgba(0, 0, 0, 0.06),\n 0 1px 2px rgba(0, 0, 0, 0.04);\n \n /* 平滑过渡 */\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n \n // /* 悬停效果 */\n // &:hover {\n // background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);\n // box-shadow: \n // 0 4px 16px rgba(0, 0, 0, 0.1),\n // 0 2px 4px rgba(0, 0, 0, 0.06);\n // // transform: translateY(-1px);\n // }\n \n /* 指示器样式 - 渐变条 */\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n width: var(--label-indicator-width, 4px);\n height: var(--label-indicator-height, 70%);\n background: linear-gradient(\n 180deg,\n var(--label-indicator-color, #1890ff) 0%,\n rgba(24, 144, 255, 0.6) 100%\n );\n border-radius: 0 4px 4px 0;\n box-shadow: 2px 0 8px rgba(24, 144, 255, 0.3);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n \n /* 悬停时指示器效果 */\n // &:hover::before {\n // width: calc(var(--label-indicator-width, 4px) + 1px);\n // box-shadow: 3px 0 12px rgba(24, 144, 255, 0.4);\n // filter: brightness(1.1);\n // }\n \n /* 光晕装饰 */\n // &::after {\n // content: '';\n // position: absolute;\n // top: 0;\n // right: 0;\n // width: 60px;\n // height: 100%;\n // background: linear-gradient(\n // 90deg,\n // transparent 0%,\n // rgba(255, 255, 255, 0.4) 50%,\n // transparent 100%\n // );\n // border-radius: 0 8px 8px 0;\n // pointer-events: none;\n // opacity: 0;\n // transition: opacity 0.3s ease;\n // }\n \n &:hover::after {\n opacity: 1;\n }\n"])));export{e as LabelWrapper};
|
package/dist/es/Layout/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import i from"../Icon/Icon.js";import{LayoutWrapper as l,HeaderWrapper as d,SiderWrapper as r,SiderContentWrapper as a,SiderTrigger as n,ContentWrapper as c,ZeroWidthTriggerInContent as s,FooterWrapper as h}from"./styles.js";import{LayoutProvider as u,useLayoutContext as m}from"./LayoutContext.js";var f=o.createContext({isNested:!1}),v=function(t){var o=t.className,i=void 0===o?"":o,l=t.style,r=void 0===l?{}:l,a=t.children,n=t.height,c=t.fixed,s=void 0!==c&&c,h=t.theme,u=void 0===h?"light":h,m=null!=u?u:"light",f=(null==r?void 0:r.background)||"#3030302b";return e(d,{className:"layout-header layout-header-".concat(m," ").concat(i),style:r,$height:n,$fixed:s,$theme:m,$bgColor:f,"data-theme":m,children:a})},p=function(l){var d=l.className,c=void 0===d?"":d,s=l.style,h=void 0===s?{}:s,u=l.children,v=l.width,p=void 0===v?200:v,y=l.collapsedWidth,g=void 0===y?60:y,$=l.collapsible,N=void 0!==$&&$,x=l.collapsed,C=void 0!==x&&x,b=l.onCollapse,E=l.trigger,W=l.triggerPlacement,w=void 0===W?"bottom":W,z=l.zeroWidthMode,S=void 0!==z&&z,j=l.fixed,k=void 0!==j&&j,M=l.theme,L=void 0===M?"light":M,I=null!=L?L:"light",P=o.useContext(f).isNested,A=m(),F=A.setSiderCollapsed,H=A.setZeroWidthMode,O=A.setOnExpand;o.useEffect(function(){F(C),H(S)},[C,S,F,H]);var R=function(){null==b||b(!C)};o.useEffect(function(){O(function(){return R})},[C,b,O]);var V=S&&C?0:g;return t(r,{className:"layout-sider ".concat(C?"collapsed":""," ").concat(c),style:h,$width:p,$collapsedWidth:V,$collapsed:C,$fixed:k,$theme:I,$inNestedLayout:P,"data-theme":I,children:[e(a,{children:u}),N&&e(n,{className:"layout-sider-trigger",$collapsed:C,$placement:S?"top":w,onClick:R,$zeroWidthMode:S,$theme:I,children:E||e(i,{type:C?"arrowRight":"arrowLeft",size:20,color:"dark"===I?"#fff":"rgba(0, 0, 0, 0.65)"})})]})},y=function(o){var l=o.className,d=void 0===l?"":l,r=o.style,a=void 0===r?{}:r,n=o.children,h=o.theme,u=void 0===h?"light":h,f=null!=u?u:"light",v=m(),p=v.siderCollapsed,y=v.zeroWidthMode,g=v.onExpand;return t(c,{className:"layout-content ".concat(d),style:a,$theme:f,"data-theme":f,children:[y&&p&&e(s,{onClick:g,children:e(i,{type:"menu",size:24,color:"#fff"})}),n]})},g=function(t){var o=t.className,i=void 0===o?"":o,l=t.style,d=void 0===l?{}:l,r=t.children,a=t.height,n=t.fixed,c=void 0!==n&&n,s=t.theme,u=void 0===s?"light":s,m=null!=u?u:"light";return e(h,{className:"layout-footer ".concat(i),style:d,$height:a,$fixed:c,$theme:m,"data-theme":m,children:r})},$=function(t){var i=t.className,d=void 0===i?"":i,r=t.style,a=void 0===r?{}:r,n=t.children,c=t.hasSider,s=t.theme,h=void 0===s?"light":s,m=void 0!==c?c:function(e){return!!e&&o.Children.toArray(e).some(function(e){return o.isValidElement(e)&&e.type===p})}(n),v=o.useState(!1),y=v[0],g=v[1];return o.useEffect(function(){g(!0)},[]),e(u,{children:e(f.Provider,{value:{isNested:!0},children:e(l,{className:"layout-wrapper ".concat(d).concat(y?" layout-mounted":""),style:a,$hasSider:m,$theme:h,"data-theme":h,children:n})})})};$.Header=v,$.Sider=p,$.Content=y,$.Footer=g;var N=$;export{y as Content,g as Footer,v as Header,p as Sider,N as default};
|