@rue-js/design 0.0.21

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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @rue-js/design v0.0.21
3
+ * (c) 2025-present Xiangmin Liu and Rue contributors
4
+ * @license MIT
5
+ **/var RueRuntimeDOM=function(e,l,t,s){"use strict";let a=Object.assign(({icon:e,force:t,use:s="radio",name:a,open:n,className:r,children:i,items:c})=>{if(c&&c.length)return l.jsx(l.Fragment,{children:c.map((n,i)=>{let c=n.icon??e,o=n.force??t,d=n.use??s,m="collapse";return("arrow"===c&&(m+=" collapse-arrow"),"plus"===c&&(m+=" collapse-plus"),"open"===o&&(m+=" collapse-open"),"close"===o&&(m+=" collapse-close"),r&&(m+=` ${r}`),n.className&&(m+=` ${n.className}`),"details"===d)?l.jsxs("details",{className:m,name:a,open:n.open,children:[l.jsx("summary",{className:n.titleClassName?`collapse-title ${n.titleClassName}`:"collapse-title",children:n.title}),l.jsx("div",{className:n.contentClassName?`collapse-content ${n.contentClassName}`:"collapse-content",children:n.content})]},i):l.jsxs("div",{className:m,children:[l.jsx("input",{type:"radio",name:a,checked:n.open}),l.jsx("div",{className:n.titleClassName?`collapse-title ${n.titleClassName}`:"collapse-title",children:n.title}),l.jsx("div",{className:n.contentClassName?`collapse-content ${n.contentClassName}`:"collapse-content",children:n.content})]},i)})});let o="collapse";return("arrow"===e&&(o+=" collapse-arrow"),"plus"===e&&(o+=" collapse-plus"),"open"===t&&(o+=" collapse-open"),"close"===t&&(o+=" collapse-close"),r&&(o+=` ${r}`),"details"===s)?l.jsx("details",{className:o,name:a,open:n,children:i}):l.jsxs("div",{className:o,children:[l.jsx("input",{type:"radio",name:a,checked:n}),i]})},{Title:({className:e,children:t,as:s="div"})=>{let a="collapse-title";return e&&(a+=` ${e}`),"summary"===s?l.jsx("summary",{className:a,children:t}):l.jsx("div",{className:a,children:t})},Content:({className:e,children:t})=>{let s="collapse-content";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})}}),n=Object.assign(({size:e,border:t,dash:s,side:a,imageFull:n,className:r,children:i})=>{let c="card";return e&&(c+=` card-${e}`),t&&(c+=" card-border"),s&&(c+=" card-dash"),a&&(c+=" card-side"),n&&(c+=" image-full"),r&&(c+=` ${r}`),l.jsx("div",{className:c,children:i})},{Body:({className:e,children:t})=>{let s="card-body";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},Title:({className:e,children:t})=>{let s="card-title";return e&&(s+=` ${e}`),l.jsx("h2",{className:s,children:t})},Actions:({className:e,children:t})=>{let s="card-actions";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},Figure:({className:e,children:t})=>{let s="figure";return e&&(s+=` ${e}`),l.jsx("figure",{className:s,children:t})}}),r=({status:e,className:t,children:s})=>{let a="avatar not-prose";return e&&(a+=` avatar-${e}`),t&&(a+=` ${t}`),l.jsx("div",{className:a,children:s})},i=Object.assign(r,{Group:({className:e,children:t,items:s})=>{let a="avatar-group";return(e&&(a+=` ${e}`),s&&s.length)?l.jsx("div",{className:a,children:s.map((e,t)=>l.jsx(r,{status:e.status,children:e.children},t))}):l.jsx("div",{className:a,children:t})}}),c=Object.assign(({className:e,tabIndex:t,children:s})=>{let a="diff";return e&&(a+=` ${e}`),l.jsx("figure",{className:a,tabIndex:t,children:s})},{Item1:({className:e,role:t,tabIndex:s,children:a})=>{let n="diff-item-1";return e&&(n+=` ${e}`),l.jsx("div",{className:n,role:t,tabIndex:s,children:a})},Item2:({className:e,role:t,tabIndex:s,children:a})=>{let n="diff-item-2";return e&&(n+=` ${e}`),l.jsx("div",{className:n,role:t,tabIndex:s,children:a})},Resizer:({className:e})=>{let t="diff-resizer";return e&&(t+=` ${e}`),l.jsx("div",{className:t})}}),o=()=>l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsx("div",{}),l.jsx("div",{}),l.jsx("div",{}),l.jsx("div",{}),l.jsx("div",{}),l.jsx("div",{}),l.jsx("div",{})]}),d=({box:e,className:t,children:s})=>{let a="timeline-start";return e&&(a+=" timeline-box"),t&&(a+=` ${t}`),l.jsx("div",{className:a,children:s})},m=({className:e,children:t})=>{let s="timeline-middle";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},u=({box:e,className:t,children:s})=>{let a="timeline-end";return e&&(a+=" timeline-box"),t&&(a+=` ${t}`),l.jsx("div",{className:a,children:s})},h=Object.assign(({direction:e,snapIcon:t,compact:s,className:a,children:n,items:r})=>{let i="timeline";return(e&&(i+=` timeline-${e}`),t&&(i+=" timeline-snap-icon"),s&&(i+=" timeline-compact"),a&&(i+=` ${a}`),r&&r.length)?l.jsx("ul",{className:i,children:r.map((e,t)=>l.jsxs("li",{className:e.liClassName,children:[e.beforeLine?l.jsx("hr",{}):null,e.start?l.jsx(d,{box:e.start.box,className:e.start.className,children:e.start.content}):null,e.middle?l.jsx(m,{className:e.middle.className,children:e.middle.content}):null,e.end?l.jsx(u,{box:e.end.box,className:e.end.className,children:e.end.content}):null,e.afterLine?l.jsx("hr",{}):null]},t))}):l.jsx("ul",{className:i,children:n})},{Start:d,Middle:m,End:u}),x=({center:e,className:t,children:s})=>{let a="stat";return e&&(a+=" place-items-center"),t&&(a+=` ${t}`),l.jsx("div",{className:a,children:s})},p=({className:e,children:t})=>{let s="stat-title";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},j=({className:e,children:t})=>{let s="stat-value";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},N=({className:e,children:t})=>{let s="stat-desc";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},f=({className:e,children:t})=>{let s="stat-figure";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},b=({className:e,children:t})=>{let s="stat-actions";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},v=Object.assign(({direction:e,className:t,children:s,items:a})=>{let n="stats";return(e&&(n+=` stats-${e}`),t&&(n+=` ${t}`),a&&a.length)?l.jsx("div",{className:n,children:a.map((e,t)=>{let s=e.className;return l.jsxs(x,{center:e.center,className:s,children:[e.figure?l.jsx(f,{className:e.figureClassName,children:e.figure}):null,e.title?l.jsx(p,{className:e.titleClassName,children:e.title}):null,e.value?l.jsx(j,{className:e.valueClassName,children:e.value}):null,e.desc?l.jsx(N,{className:e.descClassName,children:e.desc}):null,e.actions?l.jsx(b,{className:e.actionsClassName,children:e.actions}):null]},t)})}):l.jsx("div",{className:n,children:s})},{Item:x,Title:p,Value:j,Desc:N,Figure:f,Actions:b}),g=Object.assign(({align:e="start",direction:s="horizontal",auto:a=!1,interval:n=3e3,loop:r=!0,autoDirection:i="forward",activeIndex:c,onIndexChange:o,className:d,children:m,items:u})=>{let h=t.useRef(),x="carousel";"center"===e&&(x+=" carousel-center"),"end"===e&&(x+=" carousel-end"),"vertical"===s?x+=" carousel-vertical":x+=" carousel-horizontal",d&&(x+=` ${d}`);let p=()=>{let e=h.current;return e?Array.from(e.querySelectorAll(".carousel-item")):[]},j=null,N=e=>{let l=h.current;if(!l)return;let t="vertical"===s?l.clientHeight:l.clientWidth,a="vertical"===s?l.scrollTop:l.scrollLeft,n="vertical"===s?l.scrollHeight:l.scrollWidth;(e=>{let l=h.current;if(!l)return;let t="function"==typeof l.scrollTo;"vertical"===s?requestAnimationFrame(()=>{t?l.scrollTo({top:e,behavior:"smooth"}):l.scrollTop=e}):requestAnimationFrame(()=>{t?l.scrollTo({left:e,behavior:"smooth"}):l.scrollLeft=e})})("forward"===e?r?a-t>=0?a-t:Math.max(0,n-t):Math.max(a-t,0):r?a+t<=Math.max(0,n-t)?a+t:0:Math.min(a+t,Math.max(0,n-t)));let i=(()=>{let e=p(),l=h.current;if(!l||!e.length)return 0;let t="vertical"===s?l.scrollTop:l.scrollLeft,a=0;for(let l=0;l<e.length;l++)if(("vertical"===s?e[l].offsetTop:e[l].offsetLeft)<=t+1)a=l;else break;return a})();o&&o(i)},f=()=>{j&&(clearInterval(j),j=null)};return t.onMounted(()=>{let e=h.current;if(e&&r){let l="vertical"===s?e.clientHeight:e.clientWidth,t="vertical"===s?e.scrollHeight:e.scrollWidth;"forward"===i?"vertical"===s?e.scrollTop=Math.max(0,t-l):e.scrollLeft=Math.max(0,t-l):"vertical"===s?e.scrollTop=0:e.scrollLeft=0}a&&(f(),j=setInterval(()=>{"backward"===i?N("backward"):N("forward")},n))}),t.onUnmounted(()=>{f()}),t.watch(()=>c,e=>{"number"==typeof e&&(e=>{let l=p();if(!l.length)return;let t=Math.max(0,Math.min(e,l.length-1)),a=l[t],n=h.current;if(!n||!a)return;let r="function"==typeof n.scrollTo;"vertical"===s?r?n.scrollTo({top:a.offsetTop,behavior:"smooth"}):n.scrollTop=a.offsetTop:r?n.scrollTo({left:a.offsetLeft,behavior:"smooth"}):n.scrollLeft=a.offsetLeft,o&&o(t)})(e)},{immediate:!0}),l.jsx("div",{ref:h,className:x,children:u&&u.length?u.map((e,t)=>l.jsx("div",{className:`carousel-item${e.className?` ${e.className}`:""}`,children:e.content},t)):m})},{Item:({className:e,children:t})=>{let s="carousel-item";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})}}),y=({color:e,className:t,children:s})=>{let a="chat-bubble";return e&&(a+=` chat-bubble-${e}`),t&&(a+=` ${t}`),l.jsx("div",{className:a,children:s})},$=({className:e,children:t})=>{let s="chat-header";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},k=({className:e,children:t})=>{let s="chat-footer";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},C=({className:e,children:t})=>{let s="chat-image";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})},w=Object.assign(({placement:e,className:t,children:s,items:a})=>{if(a&&a.length)return l.jsx(l.Fragment,{children:a.map((e,s)=>{let a="chat";return a+=` chat-${e.placement}`,t&&(a+=` ${t}`),l.jsxs("div",{className:a,children:[e.imageSrc?l.jsx(C,{className:e.imageClassName,children:l.jsx("div",{className:"w-10 rounded-full",children:l.jsx("img",{alt:e.imageAlt??"chat image",src:e.imageSrc})})}):null,e.headerName||e.headerTime?l.jsxs($,{className:e.headerClassName,children:[e.headerName," ",e.headerTime?l.jsx("time",{className:"text-xs opacity-50",children:e.headerTime}):null]}):null,l.jsx(y,{color:e.color,children:e.text}),e.footer?l.jsx(k,{className:e.footerClassName,children:e.footer}):null]},s)})});let n="chat";return n+=` chat-${e}`,t&&(n+=` ${t}`),l.jsx("div",{className:n,children:s})},{Bubble:y,Header:$,Footer:k,Image:C}),A=Object.assign(({arrow:e,plus:t,open:s,close:a,tabIndex:n,tag:r="div",className:i,children:c})=>{let o="collapse";if(e&&(o+=" collapse-arrow"),t&&(o+=" collapse-plus"),s&&(o+=" collapse-open"),a&&(o+=" collapse-close"),i&&(o+=` ${i}`),"details"===r)return l.jsx("details",{className:o,children:c});let d={className:o};return"number"==typeof n&&(d.tabIndex=n),l.jsx("div",{...d,children:c})},{Title:({as:e="div",className:t,children:s})=>{let a="collapse-title";return(t&&(a+=` ${t}`),"summary"===e)?l.jsx("summary",{className:a,children:s}):l.jsx("div",{className:a,children:s})},Content:({className:e,children:t})=>{let s="collapse-content";return e&&(s+=` ${e}`),l.jsx("div",{className:s,children:t})}}),T=({value:e,digits:s,className:a,ariaLive:n="polite",ariaLabel:r,children:i})=>{let c=`--value:${e};${null!=s?` --digits:${s};`:""}`,o="";return a&&(o+=` ${a}`),l.jsx("span",{style:c,"aria-live":n,"aria-label":r??String(e),className:o.trim(),children:null!=i?i:t.h("div",null,String(e))})},S=Object.assign(({className:e,children:t,items:s})=>{let a="countdown";return(e&&(a+=` ${e}`),s&&s.length)?l.jsx("span",{className:a,children:s.map((e,t)=>{if("value"in e){let{value:s,digits:a,className:n,ariaLive:r,ariaLabel:i,children:c}=e;return l.jsx(T,{value:s,digits:a,className:n,ariaLive:r,ariaLabel:i,children:c},t)}return l.jsx("span",{className:e.className,children:e.content},t)})}):l.jsx("span",{className:a,children:t})},{Value:T}),R=({as:e="div",className:t,children:s})=>{let a="list-col-grow";return(t&&(a+=` ${t}`),"p"===e)?l.jsx("p",{className:a,children:s}):"span"===e?l.jsx("span",{className:a,children:s}):l.jsx("div",{className:a,children:s})},I=({as:e="div",className:t,children:s})=>{let a="list-col-wrap";return(t&&(a+=` ${t}`),"p"===e)?l.jsx("p",{className:a,children:s}):"span"===e?l.jsx("span",{className:a,children:s}):l.jsx("div",{className:a,children:s})},O=Object.assign(({className:e,children:t,items:s})=>{let a="list";return(e&&(a+=` ${e}`),s&&s.length)?l.jsx("ul",{className:a,children:s.map((e,t)=>{if("item"===(e.type??(e.cols?"row":"item"))){let s=e.className?`${e.className}`:"";return l.jsx("li",{className:s||void 0,children:e.content},t)}if(e.normal){let s=e.className?`${e.className}`:"";return l.jsxs("li",{className:s||void 0,children:[e.content,e.cols?.map((e,t)=>"grow"===e.type?l.jsx(R,{as:e.as,className:e.className,children:e.content},t):l.jsx(I,{as:e.as,className:e.className,children:e.content},t))]},t)}let s="list-row";return e.className&&(s+=` ${e.className}`),l.jsxs("li",{className:s,children:[e.content,e.cols?.map((e,t)=>"grow"===e.type?l.jsx(R,{as:e.as,className:e.className,children:e.content},t):l.jsx(I,{as:e.as,className:e.className,children:e.content},t))]},t)})}):l.jsx("ul",{className:a,children:t})},{Row:({normal:e,className:t,children:s})=>{if(e){let e=t?`${t}`:"";return l.jsx("li",{className:e||void 0,children:s})}let a="list-row";return t&&(a+=` ${t}`),l.jsx("li",{className:a,children:s})},ColGrow:R,ColWrap:I,Item:({className:e,children:t})=>{let s="";return e&&(s+=` ${e}`),l.jsx("li",{className:s.trim(),children:t})}}),M=(e,l)=>{if(l){if(Array.isArray(l)){let t=e;for(let e of l){if(null==t)return;t=t[e]}return t}return e?.[l]}},L=e=>"right"===e?"text-right":"center"===e?"text-center":"text-left",F=Object.assign(({size:e,zebra:t,pinRows:s,pinCols:a,className:n,children:r,dataSource:i,columns:c,rowKey:o="key",showHeader:d=!0,onRow:m,onHeaderRow:u,onChange:h,rowSelection:x,pagination:p,expandable:j,rowClassName:N,summary:f,emptyText:b,title:v,footer:g,rowHoverable:y=!1,rowHoverClass:$,tableLayout:k,scroll:C,height:w,onScroll:A})=>{let T="table";if(e&&(T+=` table-${e}`),t&&(T+=" table-zebra"),s&&(T+=" table-pin-rows"),a&&(T+=" table-pin-cols"),n&&(T+=` ${n}`),!(null==r||Array.isArray(r)&&0===r.length))return l.jsx("table",{className:T,children:r});if(Array.isArray(c)&&Array.isArray(i)){let e,t,s,n,r,S,R,I,O,F,H=Math.random().toString(36).slice(2),P=u&&u(c,0)||{},E=c.filter(e=>!e.hidden),W=null,D=null;E.forEach((e,l)=>{null!=e.sortOrder?(W=l,D=e.sortOrder):null==W&&e.defaultSortOrder&&(W=l,D=e.defaultSortOrder)});let z=i.slice(),B={},q=e=>"string"==typeof e.dataIndex?e.dataIndex:Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.key;if(E.forEach(e=>{let l=e.filteredValue??e.defaultFilteredValue;if(Array.isArray(l)&&l.length>0){let t=q(e);t&&(B[t]=l),z=z.filter(t=>{if(e.onFilter)return"and"===e.filterCombine?l.every(l=>e.onFilter(l,t)):l.some(l=>e.onFilter(l,t));let s=M(t,e.dataIndex);return l.includes(s)})}}),null!=W&&D&&E[W]){let e=E[W],l="function"==typeof e.sorter?e.sorter:(l,t)=>{let s=M(l,e.dataIndex),a=M(t,e.dataIndex);return null==s&&null==a?0:null==s?-1:null==a||s>a?1:s<a?-1:0};z.sort((e,t)=>"ascend"===D?l(e,t):-l(e,t))}let K=1,V=z.length;!1!==p&&null!=p&&(K=p.current||1,V=p.pageSize||10);let _=z.length,G=Math.ceil(_/V)||1,U=(K-1)*V,J=U+V,Q=z.slice(U,J),X=!!x,Y=!!j&&"function"==typeof j.expandedRowRender,Z=new Set(j?.expandedRowKeys||(j?.defaultExpandAllRows?z.map(e=>"function"==typeof o?o(e):e?.[o]):[])),ee=x?.selectedRowKeys??x?.defaultSelectedRowKeys??[],el=e=>Array.isArray(ee)&&ee.includes(e),et=e=>{let l=E[e];if(!l.sorter)return;let t="ascend";W===e&&"ascend"===D?t="descend":W===e&&"descend"===D&&(t=null),h&&h({current:K,pageSize:V},B,{column:l,order:t},{action:"sort",currentDataSource:Q})},es=e=>{!1!==p&&null!=p&&p.onChange&&p.onChange(e,V),h&&h({current:e,pageSize:V},B,{order:D,column:null!=W?E[W]:null},{action:"paginate",currentDataSource:Q})},ea=(e,l)=>{let t=E[e];t.sorter&&h&&h({current:K,pageSize:V},B,{column:t,order:l},{action:"sort",currentDataSource:Q})},en=(e,l)=>{let t=E[e],s=l||document.getElementById(`table-filter-menu-${e}`);if(!t||!s)return;let a=t.filterResetToDefaultFilteredValue?t.defaultFilteredValue??[]:[];s.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(e=>{let l=e.getAttribute("data-value")||e.value;"checkbox"===e.type?e.checked=a.includes(l):e.checked=a[0]===l})};(e=>{let l=globalThis,t=`__rue_table_outside_close_${e}`;if(l[t])return;let s=l=>{let t=l.target,s=t.closest(`[data-rue-table-id="${e}"] .rue-table-filter-icon`),a=t.closest(`[data-rue-table-id="${e}"] .rue-table-filter-menu`);if(!s&&!a){let l=document.querySelector(`table[data-rue-table-id="${e}"]`);if(!l)return;l.querySelectorAll(".rue-table-filter-menu").forEach(e=>e.style.display="none")}};l&&l.addEventListener&&l.addEventListener("pointerdown",s),l[t]=s})(H);let er=(e,l,t)=>{let s=null;if(t){let e=t.closest("th, td");s=e?e.querySelector(".rue-table-filter-menu"):null}if(s||(s=document.getElementById(`table-filter-menu-${e}`)),!s)return;let a="none"===s.style.display;if(!(null!=l?l:a)){s.style.display="none";return}s.style.position="fixed",s.style.visibility="hidden",s.style.display="";let n=(t||s).getBoundingClientRect(),r=s.offsetWidth||176,i=s.offsetHeight||160,c=window.innerWidth,o=window.innerHeight,d=n.bottom+8,m=n.left;o-n.bottom<i+8&&(d=Math.max(8,n.top-i-8)),c-n.left<r+8&&(m=Math.max(8,n.right-r)),s.style.visibility="",s.style.top=`${d}px`,s.style.left=`${m}px`,s.style.maxHeight="calc(100vh - 16px)",s.style.overflow="auto",s.style.zIndex="50"},ei=(e,l,t)=>{let s=E[e];if(!s||!Array.isArray(s.filters)||0===s.filters.length)return;let a=q(s),n=Array.isArray(l)?l:((e,l)=>{let t=l||document.getElementById(`table-filter-menu-${e}`);if(!t)return[];let s=t.querySelectorAll('input[type="checkbox"], input[type="radio"]'),a=[];return s.forEach(e=>{let l=e.getAttribute("data-value")||e.value;e.checked&&a.push(l)}),a})(e,t),r={...B};a&&(r[a]=n),h&&h({current:K,pageSize:V},r,{order:D,column:null!=W?E[W]:null},{action:"filter",currentDataSource:Q}),er(e,!1,t||void 0)},ec=(e,l,t)=>{let s=t?.currentTarget,a=s?s.closest("tr"):null,n=a?.nextElementSibling;if(n){let e="none"===n.style.display;n.style.display=e?"":"none",s&&(s.textContent=e?"-":"+")}let r=Z.has(e);j?.onExpand&&j.onExpand(!r,l)},eo=e=>{if(!x||"radio"===x.type)return;let l=e?Q.map(e=>"function"==typeof o?o(e):e?.[o]):[];if(x.onChange){let e=z.filter(e=>l.includes("function"==typeof o?o(e):e?.[o]));x.onChange(l,e,{type:"checkbox"})}if(x.onSelectAll){let t=z.filter(e=>l.includes("function"==typeof o?o(e):e?.[o]));x.onSelectAll(e,t)}},ed=Q.map(e=>"function"==typeof o?o(e):e?.[o]),em=ed.length>0&&ed.every(e=>el(e)),eu=ed.some(e=>el(e))&&!em,eh={},ex=E.some(e=>!!e.ellipsis);k?eh.tableLayout=k:ex&&(eh.tableLayout="fixed");let ep=!!(C?.x||C?.y||void 0!==w||A),ej={},eN=`${C?.x?"overflow-x-auto":""} ${C?.y||void 0!==w?"overflow-y-auto":""}`.trim()||void 0;return void 0!==C?.y&&(ej.maxHeight="number"==typeof C.y?`${C.y}px`:C.y),void 0!==w&&(ej.height="number"==typeof w?`${w}px`:w),ep?l.jsxs("div",{className:eN,style:ej,onScroll:A,children:["function"==typeof v?l.jsx("div",{className:"p-2",children:v(Q)}):null,l.jsxs("table",{className:T,style:eh,"data-rue-table-id":H,children:[d?l.jsx("thead",{...P,children:l.jsxs("tr",{children:[Y?l.jsx("th",{className:L("center")}):null,X?l.jsx("th",{style:x?.columnWidth?{width:x.columnWidth}:void 0,className:L("center"),children:x?.type!=="radio"?l.jsx("label",{children:l.jsx("input",{type:"checkbox",className:"checkbox",checked:em,"aria-checked":eu?"mixed":em?"true":"false",disabled:!!x?.disabled,onChange:e=>eo(e.target.checked)})}):null}):null,E.map((e,t)=>{let s=e.onHeaderCell&&e.onHeaderCell(e,t)||{},n=e.key??e.dataIndex??t,r=`${L(e.align)}${e.className?` ${e.className}`:""}${s.className?` ${s.className}`:""}`.trim()||void 0,i=e.width?{width:e.width}:s.style;return a&&!e.fixedCol?l.jsx("td",{className:r,style:i,onClick:()=>et(t),...s,children:e.title},n):l.jsx("th",{className:r,style:i,onClick:()=>et(t),...s,children:e.title},n)})]})}):null,l.jsxs("tbody",{children:[Q.map((e,t)=>{let s="function"==typeof o?o(e):e?.[o],n=m&&m(e,t)||{},r="function"==typeof N?N(e,t):"",i=y?$||"hover:bg-base-200":"",c=`${r}${i?` ${i}`:""}`.trim()||void 0,d=(E.length||0)+ +!!X+ +!!Y;return l.jsxs(l.Fragment,{children:[l.jsxs("tr",{...n,className:c||n.className,children:[Y?l.jsx("td",{className:L("center"),children:l.jsx("button",{className:"btn btn-ghost btn-xs",onClick:l=>ec(s,e,l),children:Z.has(s)?"-":"+"})}):null,X?l.jsx("td",{className:L("center"),style:x?.columnWidth?{width:x.columnWidth}:void 0,children:l.jsx("label",{children:x?.type==="radio"?l.jsx("input",{type:"radio",className:"radio",checked:!!el(s),onChange:()=>{let e=[s];if(x?.onChange){let l=z.filter(l=>e.includes("function"==typeof o?o(l):l?.[o]));x.onChange(e,l,{type:"radio"})}},...x?.getCheckboxProps?x.getCheckboxProps(e):{}}):l.jsx("input",{type:"checkbox",className:"checkbox",checked:!!el(s),onChange:e=>{let l=e.target.checked,t=new Set(x?.selectedRowKeys??x?.defaultSelectedRowKeys??[]);l?t.add(s):t.delete(s);let a=Array.from(t);if(x?.onChange){let e=z.filter(e=>a.includes("function"==typeof o?o(e):e?.[o]));x.onChange(a,e,{type:"checkbox"})}},...x?.getCheckboxProps?x.getCheckboxProps(e):{}})})}):null,E.map((s,n)=>{let r=M(e,s.dataIndex),i=s.render?s.render(r,e,t):r,c=`${L(s.align)}${s.className?` ${s.className}`:""}${s.ellipsis?" truncate":""}`,o=s.onCell&&s.onCell(e,t)||{},d=s.key??`${t}-${n}`,m=`${c}${o.className?` ${o.className}`:""}`.trim()||void 0,u=s.width?{width:s.width}:o.style;return a&&s.fixedCol?l.jsx("th",{className:m,style:u,...o,children:i},d):l.jsx("td",{className:m,style:u,...o,children:i},d)})]},s??t),Y&&j?.expandedRowRender?l.jsx("tr",{style:{display:Z.has(s)?"":"none"},children:l.jsx("td",{colSpan:d,children:j.expandedRowRender(e,t)})},`expanded-${s}`):null]})}),0===Q.length?l.jsx("tr",{children:l.jsx("td",{colSpan:(E.length||0)+ +!!X+ +!!Y,className:L("center"),children:void 0!==b?b:"No Data"})}):null]}),(e=(E.length||0)+ +!!X+ +!!Y,t={total:_,page:K,pageSize:V},(s=Q.slice()).total=_,n="function"==typeof f?f(s,t):null,r=!1!==p&&null!=p&&!(p.hideOnSinglePage&&G<=1),n||r?l.jsxs("tfoot",{children:[n?l.jsx("tr",{children:l.jsx("td",{colSpan:e,children:n})}):null,r?l.jsx("tr",{children:l.jsx("td",{colSpan:e,children:l.jsxs("div",{className:"flex items-center justify-end gap-2 p-2",children:[l.jsx("button",{className:"btn btn-ghost btn-xs",disabled:K<=1,onClick:()=>es(K-1),children:"Prev"}),Array.from({length:G}).map((e,t)=>l.jsx("button",{className:`btn btn-ghost btn-xs${K===t+1?" btn-active":""}`,onClick:()=>es(t+1),children:t+1},t)),l.jsx("button",{className:"btn btn-ghost btn-xs",disabled:K>=G,onClick:()=>es(K+1),children:"Next"})]})})}):null]}):null)]}),"function"==typeof g?l.jsx("div",{className:"p-2",children:g(Q)}):null]}):l.jsxs("table",{className:T,style:eh,"data-rue-table-id":H,children:[d?l.jsx("thead",{...P,children:l.jsxs("tr",{children:[Y?l.jsx("th",{className:L("center")}):null,X?l.jsx("th",{style:x?.columnWidth?{width:x.columnWidth}:void 0,className:L("center"),children:x?.type!=="radio"?l.jsx("label",{children:l.jsx("input",{type:"checkbox",className:"checkbox",checked:em,"aria-checked":eu?"mixed":em?"true":"false",disabled:!!x?.disabled,onChange:e=>eo(e.target.checked)})}):null}):null,E.map((e,t)=>{let s,n=e.onHeaderCell&&e.onHeaderCell(e,t)||{},r=e.key??e.dataIndex??t,i=`${L(e.align)}${e.className?` ${e.className}`:""}${n.className?` ${n.className}`:""}`.trim()||void 0,c=e.width?{width:e.width}:n.style;if(a&&!e.fixedCol){let s;return l.jsxs("td",{className:i,style:c,onClick:()=>et(t),...n,children:[l.jsxs("div",{className:"flex items-center relative",children:[l.jsx("span",{children:e.title}),e.sorter?l.jsxs("span",{className:"ml-1 inline-flex flex-col leading-none",children:[l.jsx("span",{className:`${W===t&&"ascend"===D?"text-base-content":"opacity-40"} cursor-pointer`,onClick:e=>{e.stopPropagation(),ea(t,"ascend")},children:"▲"}),l.jsx("span",{className:`${W===t&&"descend"===D?"text-base-content":"opacity-40"} cursor-pointer -mt-0.5`,onClick:e=>{e.stopPropagation(),ea(t,"descend")},children:"▼"})]}):null,Array.isArray(e.filters)&&e.filters.length>0?l.jsx("span",{className:`rue-table-filter-icon ml-2 cursor-pointer ${B[q(e)]?.length?"text-base-content":"opacity-40"}`,onClick:e=>{e.stopPropagation(),er(t,void 0,e.currentTarget)},children:"☰"}):null]}),Array.isArray(e.filters)&&e.filters.length>0?(s=`header-filter-${t}-${Math.random().toString(36).slice(2)}`,l.jsxs("div",{id:`table-filter-menu-${t}`,className:"rue-table-filter-menu fixed z-50 w-44 rounded-box border border-base-content/10 bg-base-100 p-2 shadow",style:{display:"none"},children:[l.jsx("div",{className:"space-y-1",children:e.filters.map(a=>l.jsxs("label",{className:"flex items-center gap-2",children:[l.jsx("input",{type:!1===e.filterMultiple?"radio":"checkbox",name:s,className:!1===e.filterMultiple?"radio radio-xs":"checkbox checkbox-xs",defaultChecked:(B[q(e)]??e.defaultFilteredValue??[]).includes(a.value),"data-value":String(a.value),onChange:l=>{e.filterOnClose||ei(t,void 0,l.currentTarget.closest(".rue-table-filter-menu")||void 0)}}),l.jsx("span",{className:"text-sm",children:a.text})]},a.value??String(a.text)))}),e.filterOnClose?l.jsxs("div",{className:"mt-2 flex justify-end gap-2",children:[l.jsx("button",{className:"btn btn-ghost btn-xs",onClick:e=>{en(t,e.currentTarget.closest(".rue-table-filter-menu")||void 0)},children:"重置"}),l.jsx("button",{className:"btn btn-primary btn-xs",onClick:e=>{ei(t,void 0,e.currentTarget.closest(".rue-table-filter-menu")||void 0)},children:"应用"})]}):null]})):null]},r)}return l.jsx("th",{className:i,style:c,onClick:()=>et(t),...n,children:l.jsxs("div",{className:"flex items-center relative",children:[l.jsx("span",{children:e.title}),e.sorter?l.jsxs("span",{className:"ml-1 inline-flex flex-col leading-none",children:[l.jsx("span",{className:`${W===t&&"ascend"===D?"text-base-content":"opacity-40"} cursor-pointer`,onClick:e=>{e.stopPropagation(),ea(t,"ascend")},children:"▲"}),l.jsx("span",{className:`${W===t&&"descend"===D?"text-base-content":"opacity-40"} cursor-pointer -mt-0.5`,onClick:e=>{e.stopPropagation(),ea(t,"descend")},children:"▼"})]}):null,Array.isArray(e.filters)&&e.filters.length>0?l.jsx("span",{className:`rue-table-filter-icon ml-2 cursor-pointer ${B[q(e)]?.length?"text-base-content":"opacity-40"}`,onClick:e=>{e.stopPropagation(),er(t,void 0,e.currentTarget)},children:"☰"}):null,Array.isArray(e.filters)&&e.filters.length>0?(s=`header-filter-${t}-${Math.random().toString(36).slice(2)}`,l.jsxs("div",{id:`table-filter-menu-${t}`,className:"rue-table-filter-menu fixed z-50 w-44 rounded-box border border-base-content/10 bg-base-100 p-2 shadow",style:{display:"none"},children:[l.jsx("div",{className:"space-y-1",children:e.filters.map(a=>l.jsxs("label",{className:"flex items-center gap-2",children:[l.jsx("input",{type:!1===e.filterMultiple?"radio":"checkbox",name:s,className:!1===e.filterMultiple?"radio radio-xs":"checkbox checkbox-xs",defaultChecked:(B[q(e)]??e.defaultFilteredValue??[]).includes(a.value),"data-value":String(a.value),onChange:l=>{e.filterOnClose||ei(t,void 0,l.currentTarget.closest(".rue-table-filter-menu")||void 0)}}),l.jsx("span",{className:"text-sm",children:a.text})]},a.value??String(a.text)))}),e.filterOnClose?l.jsxs("div",{className:"mt-2 flex justify-end gap-2",children:[l.jsx("button",{className:"btn btn-ghost btn-xs",onClick:e=>{en(t,e.currentTarget.closest(".rue-table-filter-menu")||void 0)},children:"重置"}),l.jsx("button",{className:"btn btn-primary btn-xs",onClick:e=>{ei(t,void 0,e.currentTarget.closest(".rue-table-filter-menu")||void 0)},children:"应用"})]}):null]})):null]})},r)})]})}):null,l.jsxs("tbody",{children:[Q.map((e,t)=>{let s,n="function"==typeof o?o(e):e?.[o],r=m&&m(e,t)||{},i="function"==typeof N?N(e,t):"",c=y?$||"hover:bg-base-200":"",d=`${i}${c?` ${c}`:""}`.trim()||void 0;return l.jsxs(l.Fragment,{children:[l.jsxs("tr",{...r,className:d||r.className,children:[Y?l.jsx("td",{className:L("center"),children:l.jsx("button",{className:"btn btn-ghost btn-xs",onClick:l=>ec(n,e,l),children:Z.has(n)?"-":"+"})}):null,X?l.jsx("td",{className:L("center"),style:x?.columnWidth?{width:x.columnWidth}:void 0,children:l.jsx("label",{children:(s=x?.getCheckboxProps?{...x.getCheckboxProps(e)}:{},(x?.disabled&&(s.disabled=!0),x?.type==="radio")?l.jsx("input",{type:"radio",className:"radio",checked:!!el(n),onChange:()=>{let e=[n];if(x?.onChange){let l=z.filter(l=>e.includes("function"==typeof o?o(l):l?.[o]));x.onChange(e,l,{type:"radio"})}},...s}):l.jsx("input",{type:"checkbox",className:"checkbox",checked:!!el(n),onChange:e=>{let l=e.target.checked,t=new Set(x?.selectedRowKeys??x?.defaultSelectedRowKeys??[]);l?t.add(n):t.delete(n);let s=Array.from(t);if(x?.onChange){let e=z.filter(e=>s.includes("function"==typeof o?o(e):e?.[o]));x.onChange(s,e,{type:"checkbox"})}},...s}))})}):null,E.map((s,n)=>{let r=M(e,s.dataIndex),i=s.render?s.render(r,e,t):r,c=`${L(s.align)}${s.className?` ${s.className}`:""}${s.ellipsis?" truncate":""}`,o=s.onCell&&s.onCell(e,t)||{},d=s.key??`${t}-${n}`,m=`${c}${o.className?` ${o.className}`:""}`.trim()||void 0,u=s.width?{width:s.width}:o.style;return a&&s.fixedCol?l.jsx("th",{className:m,style:u,...o,children:i},d):l.jsx("td",{className:m,style:u,...o,children:i},d)})]},n??t),Y&&j?.expandedRowRender?l.jsx("tr",{style:{display:Z.has(n)?"":"none"},children:l.jsx("td",{colSpan:(E.length||0)+ +!!X+ +!!Y,children:j.expandedRowRender(e,t)})},`expanded-${n}`):null]})}),0===Q.length?l.jsx("tr",{children:l.jsx("td",{colSpan:(E.length||0)+ +!!X+ +!!Y,className:L("center"),children:void 0!==b?b:"No Data"})}):null]}),(S=(E.length||0)+ +!!X+ +!!Y,R={total:_,page:K,pageSize:V},(I=Q.slice()).total=_,O="function"==typeof f?f(I,R):null,F=!1!==p&&null!=p&&!(p.hideOnSinglePage&&G<=1),O||F?l.jsxs("tfoot",{children:[O?l.jsx("tr",{children:l.jsx("td",{colSpan:S,children:O})}):null,F?l.jsx("tr",{children:l.jsx("td",{colSpan:S,children:l.jsxs("div",{className:"flex items-center justify-end gap-2 p-2",children:[l.jsx("button",{className:"btn btn-ghost btn-xs",disabled:K<=1,onClick:()=>es(K-1),children:"Prev"}),Array.from({length:G}).map((e,t)=>l.jsx("button",{className:`btn btn-ghost btn-xs${K===t+1?" btn-active":""}`,onClick:()=>es(t+1),children:t+1},t)),l.jsx("button",{className:"btn btn-ghost btn-xs",disabled:K>=G,onClick:()=>es(K+1),children:"Next"})]})})}):null]}):null)]})}return l.jsx("table",{className:T})},{Head:({className:e,children:t})=>l.jsx("thead",{className:e||void 0,children:t}),Body:({className:e,children:t})=>l.jsx("tbody",{className:e||void 0,children:t}),Foot:({className:e,children:t})=>l.jsx("tfoot",{className:e||void 0,children:t}),TR:({className:e,children:t})=>l.jsx("tr",{className:e||void 0,children:t}),TH:({className:e,children:t})=>{let s="";return e&&(s+=` ${e}`),l.jsx("th",{className:s.trim()||void 0,children:t})},TD:({className:e,children:t})=>{let s="";return e&&(s+=` ${e}`),l.jsx("td",{className:s.trim()||void 0,children:t})}}),H=Object.assign(({className:e,children:t,items:s})=>{let a="breadcrumbs";return(e&&(a+=` ${e}`),s&&s.length)?l.jsx("div",{className:a,children:l.jsx("ul",{children:s.map((e,t)=>l.jsx("li",{className:e.className??"",children:e.href?l.jsxs("a",{className:e.linkClassName??"",href:e.href,children:[e.icon??null,e.label]}):l.jsxs("span",{className:e.linkClassName??"",children:[e.icon??null,e.label]})},t))})}):l.jsx("div",{className:a,children:l.jsx("ul",{children:t})})},{Item:({className:e,children:t})=>{let s="";return e&&(s+=` ${e}`),l.jsx("li",{className:s.trim(),children:t})}}),P=({as:e="button",active:t,className:s,href:a,onClick:n,children:r})=>{let i="";t&&(i+=" dock-active"),s&&(i+=` ${s}`);let c=i.trim();return"a"===e?l.jsx("a",{href:a,className:c,onClick:n,children:r}):"div"===e?l.jsx("div",{className:c,onClick:n,children:r}):l.jsx("button",{className:c,onClick:n,children:r})},E=({className:e,children:t})=>{let s="dock-label";return e&&(s+=` ${e}`),l.jsx("span",{className:s,children:t})},W=Object.assign(({size:e,className:t,items:s,activeIndex:a,onChange:n,children:r})=>{let i="dock";return(e&&(i+=` dock-${e}`),t&&(i+=` ${t}`),s&&s.length)?l.jsx("div",{className:i,children:s.map((e,t)=>l.jsxs(P,{as:e.as,className:e.className,active:null!=a?a===t:!!e.active,href:e.href,onClick:()=>n&&n(t),children:[e.icon,null!=e.label?l.jsx(E,{children:e.label}):null]},t))}):l.jsx("div",{className:i,children:r})},{Item:P,Label:E}),D=(e,t)=>{if("title"===e.kind)return l.jsx(z,{as:e.as,className:e.className,children:e.children},t);let a=[e.disabled?"menu-disabled":"",e.active?"menu-active":"",e.focus?"menu-focus":"",e.className??""].filter(Boolean).join(" ").trim(),n=e.liClassName?e.liClassName:void 0;return l.jsxs("li",{className:n,children:["button"===e.as?l.jsx("button",{className:a||void 0,...e,children:e.children}):"span"===e.as?l.jsx("span",{className:a||void 0,...e,children:e.children}):e.to?l.jsx(s.RouterLink,{className:a||void 0,to:e.to,onClick:e.onClick,children:e.children}):e.href?l.jsx("a",{className:a||void 0,href:e.href,target:e.target,rel:e.rel,onClick:e.onClick,children:e.children}):l.jsx("a",{className:a||void 0,onClick:e.onClick,children:e.children}),e.dropdownToggle?l.jsx(q,{visible:e.dropdownToggle.visible,className:e.dropdownToggle.className,children:e.dropdownToggle.children}):null,e.dropdown?l.jsx(B,{visible:e.dropdown.visible,className:e.dropdown.className,children:e.dropdown.items?.map((e,l)=>D(e,l))}):null,e.submenu?l.jsx(K,{className:e.submenu.className,children:e.submenu.items?.map((e,l)=>D(e,l))}):null]},t)},z=({as:e="li",className:t,children:s})=>{let a="menu-title";return(t&&(a+=` ${t}`),"h2"===e)?l.jsx("h2",{className:a,children:s}):l.jsx("li",{className:a,children:s})},B=({visible:e,className:t,children:s})=>{let a="menu-dropdown";return e&&(a+=" menu-dropdown-visible"),t&&(a+=` ${t}`),l.jsx("ul",{className:a,children:s})},q=({visible:e,className:t,children:s})=>{let a="menu-dropdown-toggle";return e&&(a+=" menu-dropdown-visible"),t&&(a+=` ${t}`),l.jsx("span",{className:a,children:s})},K=({className:e,children:t})=>l.jsx("ul",{className:e||void 0,children:t}),V=Object.assign(({size:e,direction:t="vertical",className:s,children:a,items:n})=>{let r="menu";return("horizontal"===t?r+=" menu-horizontal":"vertical"===t&&(r+=" menu-vertical"),e&&(r+=` menu-${e}`),s&&(r+=` ${s}`),n&&n.length)?l.jsx("ul",{className:r,children:n.map((e,l)=>D(e,l))}):l.jsx("ul",{className:r,children:a})},{Item:({as:e="a",href:t,to:a,target:n,rel:r,onClick:i,disabled:c,active:o,focus:d,liClassName:m,className:u,children:h,...x})=>{let p=[c?"menu-disabled":"",o?"menu-active":"",d?"menu-focus":"",u??""].filter(Boolean).join(" ").trim();return l.jsx("li",{className:m||void 0,children:"button"===e?l.jsx("button",{className:p||void 0,onClick:i,...x,children:h}):"span"===e?l.jsx("span",{className:p||void 0,onClick:i,...x,children:h}):a?l.jsx(s.RouterLink,{className:p||void 0,to:a,onClick:i,children:h}):t?l.jsx("a",{className:p||void 0,href:t,target:n,rel:r,onClick:i,...x,children:h}):l.jsx("a",{className:p||void 0,onClick:i,...x,children:h})})},Title:z,Dropdown:B,DropdownToggle:q,Submenu:K});return e.Accordion=a,e.Alert=({variant:e,outline:t,dash:s,soft:a,direction:n,className:r,children:i})=>{let c="alert";return e&&(c+=` alert-${e}`),t&&(c+=" alert-outline"),s&&(c+=" alert-dash"),a&&(c+=" alert-soft"),n&&(c+=` alert-${n}`),r&&(c+=` ${r}`),l.jsx("div",{role:"alert",className:c,children:i})},e.Avatar=i,e.Badge=({variant:e,size:t,outline:s,dash:a,soft:n,ghost:r,className:i,children:c})=>{let o="badge";return e&&(o+=` badge-${e}`),t&&(o+=` badge-${t}`),s&&(o+=" badge-outline"),a&&(o+=" badge-dash"),n&&(o+=" badge-soft"),r&&(o+=" badge-ghost"),i&&(o+=` ${i}`),l.jsx("div",{className:o,children:c})},e.Breadcrumbs=H,e.Button=({variant:e,size:t,outline:s,dash:a,soft:n,ghost:r,link:i,active:c,block:o,wide:d,square:m,circle:u,disabled:h,disabledClass:x,loading:p,type:j,className:N,onClick:f,children:b})=>{let v="btn";return e&&(v+=` btn-${e}`),t&&(v+=` btn-${t}`),s&&(v+=" btn-outline"),a&&(v+=" btn-dash"),n&&(v+=" btn-soft"),r&&(v+=" btn-ghost"),i&&(v+=" btn-link"),c&&(v+=" btn-active"),o&&(v+=" btn-block"),d&&(v+=" btn-wide"),m&&(v+=" btn-square"),u&&(v+=" btn-circle"),x&&(v+=" btn-disabled"),N&&(v+=` ${N}`),l.jsx("button",{className:v,disabled:h||p,type:j,onClick:f,children:b})},e.Card=n,e.Carousel=g,e.Chat=w,e.Collapse=A,e.Countdown=S,e.Diff=c,e.Divider=({variant:e,direction:t,placement:s,className:a,children:n})=>{let r="divider";return t&&(r+=` divider-${t}`),e&&(r+=` divider-${e}`),s&&(r+=` divider-${s}`),a&&(r+=` ${a}`),l.jsx("div",{className:r,children:n})},e.Dock=W,e.Footer=({direction:e,center:t,className:s,children:a})=>{let n="footer";return e&&(n+=` footer-${e}`),t&&(n+=" footer-center"),s&&(n+=` ${s}`),l.jsx("footer",{className:n,children:a})},e.Hover3D=({as:e="div",href:t,className:s,overlays:a=!0,children:n})=>{let r=s?`hover-3d ${s}`:"hover-3d";return"a"===e?l.jsxs("a",{href:t,className:r,children:[n,a?l.jsx(o,{}):null]}):l.jsxs("div",{className:r,children:[n,a?l.jsx(o,{}):null]})},e.HoverGallery=({as:e="figure",className:t,children:s,items:a})=>{let n="hover-gallery";t&&(n+=` ${t}`);let r=a&&a.length?a.map((e,t)=>{if("string"==typeof e)return l.jsx("img",{src:e,alt:""},t);if(e&&"object"==typeof e){if(e.node)return e.node;if(e.src)return l.jsx("img",{src:e.src,alt:e.alt??"",className:e.className},t)}return e}):s;return"figure"===e?l.jsx("figure",{className:n,children:r}):l.jsx("div",{className:n,children:r})},e.Kbd=({size:e,className:t,children:s})=>{let a="kbd";return e&&(a+=` kbd-${e}`),t&&(a+=` ${t}`),l.jsx("kbd",{className:a,children:s})},e.Link=({href:e="#",target:t,rel:a,to:n,onClick:r,variant:i,hover:c,className:o,children:d})=>{let m="link";return i&&(m+=` link-${i}`),c&&(m+=" link-hover"),o&&(m+=` ${o}`),n?l.jsx(s.RouterLink,{className:m,to:n,onClick:r,children:d}):l.jsx("a",{className:m,href:e,target:t,rel:a,onClick:r,children:d})},e.List=O,e.Menu=V,e.Modal=({open:e,title:t,children:s,actions:a,className:n,onClose:r})=>e?l.jsx("div",{className:"modal modal-open",children:l.jsxs("div",{className:`modal-box ${n??""}`,children:[t?l.jsx("div",{className:"font-semibold mb-2",children:t}):null,s,l.jsxs("div",{className:"modal-action",children:[a,r?l.jsx("button",{className:"btn",onClick:r,children:"关闭"}):null]})]})}):null,e.Stat=v,e.Status=({as:e="span",ariaLabel:t,size:s,color:a,className:n,children:r})=>{let i="status";s&&(i+=` status-${s}`),a&&(i+=` status-${a}`),n&&(i+=` ${n}`);let c={className:i,"aria-label":t};return"div"===e?l.jsx("div",{...c,children:r}):l.jsx("span",{...c,children:r})},e.Table=F,e.Tabs=({items:e,activeKey:t,onChange:s,style:a,placement:n,size:r,className:i})=>{let c="tabs";return"box"===a&&(c+=" tabs-box"),"border"===a&&(c+=" tabs-border"),"lift"===a&&(c+=" tabs-lift"),"bottom"===n&&(c+=" tabs-bottom"),r&&(c+=` tabs-${r}`),i&&(c+=` ${i}`),l.jsx("div",{role:"tablist",className:c,children:e.map(e=>l.jsx("button",{role:"tab",className:`tab ${t===e.key?"tab-active":""} ${e.disabled?"tab-disabled":""} ${e.className??""}`,disabled:e.disabled,onClick:()=>!e.disabled&&s&&s(e.key),children:e.label},e.key))})},e.TextRotate=({className:e,children:t,items:s,innerClassName:a})=>{let n="text-rotate";return(e&&(n+=` ${e}`),s&&s.length)?l.jsx("span",{className:n,children:l.jsx("span",{className:a,children:s.map((e,t)=>l.jsx("span",{className:e.className,children:e.text},t))})}):l.jsx("span",{className:n,children:t})},e.Timeline=h,e}({},jsxRuntime,runtime,router);
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./dist/design.cjs.prod.js')
5
+ } else {
6
+ module.exports = require('./dist/design.cjs.js')
7
+ }
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@rue-js/design",
3
+ "version": "0.0.21",
4
+ "description": "@rue-js/design",
5
+ "keywords": [
6
+ "rue"
7
+ ],
8
+ "homepage": "https://github.com/hunzhiwange/ruejs/tree/main/packages/design#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/hunzhiwange/ruejs/issues"
11
+ },
12
+ "license": "MIT",
13
+ "author": "Xiangmin Liu",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/hunzhiwange/ruejs.git",
17
+ "directory": "src/packages/design"
18
+ },
19
+ "files": [
20
+ "index.js",
21
+ "dist"
22
+ ],
23
+ "sideEffects": false,
24
+ "main": "index.js",
25
+ "module": "dist/design.esm-bundler.js",
26
+ "types": "dist/design.d.ts",
27
+ "unpkg": "dist/design.global.js",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/design.d.ts",
31
+ "development": "./src/index.ts",
32
+ "node": {
33
+ "production": "./dist/design.cjs.prod.js",
34
+ "development": "./dist/design.cjs.js",
35
+ "default": "./index.js"
36
+ },
37
+ "module": "./dist/design.esm-bundler.js",
38
+ "import": "./dist/design.esm-bundler.js",
39
+ "require": "./index.js"
40
+ },
41
+ "./*": "./*"
42
+ },
43
+ "dependencies": {
44
+ "csstype": "^3.1.3",
45
+ "@rue-js/router": "0.0.21",
46
+ "@rue-js/rue": "0.0.21",
47
+ "@rue-js/shared": "0.0.21"
48
+ },
49
+ "devDependencies": {
50
+ "@types/trusted-types": "^2.0.7"
51
+ },
52
+ "buildOptions": {
53
+ "name": "RueRuntimeDOM",
54
+ "formats": [
55
+ "esm-bundler",
56
+ "esm-browser",
57
+ "cjs",
58
+ "global"
59
+ ]
60
+ }
61
+ }