@oliasoft-open-source/react-ui-library 4.11.1 → 4.12.0-beta-2
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/dist/assets/{index-BpSdrNXy.css → index-BU9wzZv9.css} +336 -336
- package/dist/assets/{index-DoFa61ar.js → index-BVCFmQTa.js} +144 -164
- package/dist/index.d.ts +2 -6
- package/dist/index.html +1 -1
- package/dist/index.js +135 -132
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-KGDBMAHA-B3T0ILh4.js → Color-KGDBMAHA-BODMLRvZ.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-PKQXORMH-CJgueRY3.js → DocsRenderer-PKQXORMH-DEi7ICVq.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-Ctfewlsk.js → accordion.stories-C_Vx7GEC.js} +1 -1
- package/dist/storybook/assets/{actions-D-uVCDzk.js → actions-Bax0KeqM.js} +2 -2
- package/dist/storybook/assets/{actions.stories-gKfuiKQy.js → actions.stories-BnPZKqOJ.js} +1 -1
- package/dist/storybook/assets/{afe.stories-DM18uTAa.js → afe.stories-OEYJqexC.js} +1 -1
- package/dist/storybook/assets/{badge.stories-Dkq_XgEW.js → badge.stories-DA_eeQyi.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-DHdofVc-.js → blowout.stories-DH-sYHgB.js} +1 -1
- package/dist/storybook/assets/button-Cbv7WK6k.js +1 -0
- package/dist/storybook/assets/button-DtgxLQCF.css +1 -0
- package/dist/storybook/assets/{button-group-1DEZPmxq.js → button-group-D2fGP_bX.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-C4V1k0z_.js → button-group.stories-BETADGti.js} +1 -1
- package/dist/storybook/assets/{button.stories-DA9DGYD2.js → button.stories-C03VvX8K.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-BgjMT4gF.js → buttons-and-links-BHNS6Ebw.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-Cc2cl9m1.js → casing-loads.stories-BAdZ87Oc.js} +1 -1
- package/dist/storybook/assets/{cell.stories-D8aQP2lw.js → cell.stories-Bu5u9qEl.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-DW5riARI.js → chunk-HLWAVYOI-BbzmrmoZ.js} +1 -1
- package/dist/storybook/assets/{color-Cidw5dH_.js → color-oeF0-Pph.js} +1 -1
- package/dist/storybook/assets/{dialog-BelCA1mt.js → dialog-DkpQscuI.js} +1 -1
- package/dist/storybook/assets/drawer-BVc1xI9q.css +1 -0
- package/dist/storybook/assets/drawer-DaQ1xGjV.js +3 -0
- package/dist/storybook/assets/{drawer.stories-DcjyDHEs.js → drawer.stories-C08XBVTq.js} +1 -1
- package/dist/storybook/assets/{empty.stories-DcwF0pkK.js → empty.stories-L7LSMcLe.js} +1 -1
- package/dist/storybook/assets/{field.stories-DUGMwi1O.js → field.stories-CYpQ669-.js} +1 -1
- package/dist/storybook/assets/{file-button.stories-CU2pZcEO.js → file-button.stories-CRaTdLfv.js} +1 -1
- package/dist/storybook/assets/{file-input-B0-ERX66.js → file-input-yalPf7-m.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-Cpd1NHbq.js → file-input.stories-DMTQqAF8.js} +1 -1
- package/dist/storybook/assets/{flex.stories-BhvJpHpN.js → flex.stories-CLwPyEMp.js} +1 -1
- package/dist/storybook/assets/{footer.stories-DcDOHTpf.js → footer.stories-LUxEpSgD.js} +1 -1
- package/dist/storybook/assets/{form.stories-BLcmnfy8.js → form.stories-B7V77yuI.js} +1 -1
- package/dist/storybook/assets/{formation.stories-D9xC_fJP.js → formation.stories-D7MX0dSY.js} +1 -1
- package/dist/storybook/assets/{iframe-BOQa8dKi.js → iframe-nuCPRPrd.js} +2 -2
- package/dist/storybook/assets/{index-IzFttIXx.js → index-BFtO1KgR.js} +88 -88
- package/dist/storybook/assets/{index-CqF2VcgG.js → index-CN6H1a0D.js} +1 -1
- package/dist/storybook/assets/{initialize-context-BvejO8yS.js → initialize-context-rEvM6bdZ.js} +1 -1
- package/dist/storybook/assets/input-Db9WkmPP.js +1 -0
- package/dist/storybook/assets/input-Dz1ZZYN5.css +1 -0
- package/dist/storybook/assets/{input-group.stories-EhmORqH9.js → input-group.stories-BdQ1prY4.js} +1 -1
- package/dist/storybook/assets/{input-validation-Barn85e8.js → input-validation-Ccu8WMpy.js} +1 -1
- package/dist/storybook/assets/{input.stories-FKl0qVhm.js → input.stories-SJy3TKkD.js} +1 -1
- package/dist/storybook/assets/{inputs-DhSTn98J.js → inputs-C4fsY4Ua.js} +1 -1
- package/dist/storybook/assets/{layout-forms-B7tboerR.js → layout-forms-DOgsanng.js} +1 -1
- package/dist/storybook/assets/{layout-general-IRBlgjFP.js → layout-general-DtDx77FI.js} +1 -1
- package/dist/storybook/assets/{list-bKpz6I9Q.js → list-By3wp5Wa.js} +1 -1
- package/dist/storybook/assets/{list.stories-Cgmt29Wv.js → list.stories-BcDHHHYJ.js} +1 -1
- package/dist/storybook/assets/{list.stories-data-D_Aj3AN4.js → list.stories-data-Doo2Rqun.js} +1 -1
- package/dist/storybook/assets/{loader.stories-pS8zRM4u.js → loader.stories-Q0U2BqZX.js} +1 -1
- package/dist/storybook/assets/{menu.stories-DLJSzJa-.js → menu.stories-1I5AGGQx.js} +1 -1
- package/dist/storybook/assets/menu.test-case.stories-W-jG-Jk8.js +3 -0
- package/dist/storybook/assets/message-BRyKdRaX.js +1 -0
- package/dist/storybook/assets/message-C2ZCkHX6.css +1 -0
- package/dist/storybook/assets/{message.stories-r_UlbshI.js → message.stories-bCqCYIuN.js} +1 -1
- package/dist/storybook/assets/meta-content-ByVTG0hd.css +1 -0
- package/dist/storybook/assets/meta-content-DNgQbAW0.js +9 -0
- package/dist/storybook/assets/{modal.stories-DOgeTuHT.js → modal.stories-DUXRRhK-.js} +1 -1
- package/dist/storybook/assets/modal.test-case.stories-Ci1WRYdo.js +21 -0
- package/dist/storybook/assets/{number-input-Dq8zEk7X.js → number-input-CNnU6gOF.js} +1 -1
- package/dist/storybook/assets/{number-input.stories-DUvn4L-Z.js → number-input.stories-Bo26PJmJ.js} +1 -1
- package/dist/storybook/assets/number-input.test-case.stories-CHGSaGbj.js +92 -0
- package/dist/storybook/assets/{option-dropdown.stories-CIvqMhQ3.js → option-dropdown.stories-CznUbXVi.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-CZZN7tnu.js → padding-and-spacing-Mfm_1hn5.js} +1 -1
- package/dist/storybook/assets/{page.stories-DnCh8h8y.js → page.stories-DthnK8qb.js} +1 -1
- package/dist/storybook/assets/{pagination-DWc8zp3k.js → pagination-CoyQUC4R.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-B5cOvzik.js → pagination.stories-qfpnU8DC.js} +1 -1
- package/dist/storybook/assets/{pop-confirm.stories-DCpooB2O.js → pop-confirm.stories-CHa0qUBe.js} +1 -1
- package/dist/storybook/assets/{popover-rq33c1W2.js → popover-C_2P8LFJ.js} +1 -1
- package/dist/storybook/assets/{popover.stories-p9_-pH_Q.js → popover.stories-TwNkFkWa.js} +1 -1
- package/dist/storybook/assets/{preview-Bb6CWa9a.js → preview-BIv_KaBF.js} +2 -2
- package/dist/storybook/assets/{preview-u3mhrMoU.js → preview-DVjsIOwK.js} +1 -1
- package/dist/storybook/assets/{projects.stories-Co_WnKSx.js → projects.stories-BPm6ucAe.js} +1 -1
- package/dist/storybook/assets/{reservoirs.stories-UW_8sofe.js → reservoirs.stories-DE9FrS0f.js} +1 -1
- package/dist/storybook/assets/{rich-text-input-dDjxXFl-.css → rich-text-input-BJfL0Me_.css} +1 -1
- package/dist/storybook/assets/{rich-text-input.stories-CK_OTGiV.js → rich-text-input.stories-BNwcnp92.js} +4 -4
- package/dist/storybook/assets/{row.stories-D1iDHHxo.js → row.stories-D3Bnp8i4.js} +1 -1
- package/dist/storybook/assets/select-BQzJMnK1.js +61 -0
- package/dist/storybook/assets/select-BmYXTl_0.css +1 -0
- package/dist/storybook/assets/{select.stories-Bpffz9TF.js → select.stories-BRGk9iYK.js} +1 -1
- package/dist/storybook/assets/select.test-case.stories-BYMK9M8u.js +82 -0
- package/dist/storybook/assets/side-bar-fBbBqyAT.css +1 -0
- package/dist/storybook/assets/side-bar-wpFQ5NEE.js +24 -0
- package/dist/storybook/assets/{side-bar.stories-M6FsuCrQ.js → side-bar.stories-LjClxJcG.js} +1 -1
- package/dist/storybook/assets/{site.stories-ZGohyW6Z.js → site.stories-BnWmALGd.js} +1 -1
- package/dist/storybook/assets/{slider-C7vnj_3M.js → slider-CcpE4BLD.js} +1 -1
- package/dist/storybook/assets/{slider.stories-BzBb3PkP.js → slider.stories-BqlRLY_C.js} +1 -1
- package/dist/storybook/assets/{smart-upload-modal.stories-xqiXR6jV.js → smart-upload-modal.stories-BlTSF64K.js} +1 -1
- package/dist/storybook/assets/{spacer.stories-BBTt2LdE.js → spacer.stories-BT2S6B0R.js} +1 -1
- package/dist/storybook/assets/table-BtBtDwPu.css +1 -0
- package/dist/storybook/assets/table-DPbEkZqw.js +86 -0
- package/dist/storybook/assets/{table.stories-oLm8-Sg3.js → table.stories-BBzqpsyH.js} +1 -1
- package/dist/storybook/assets/{table.stories-data-C3vJedB1.js → table.stories-data-C7mC5R8Q.js} +1 -1
- package/dist/storybook/assets/{textarea-D6ltcKhz.js → textarea-DflOOrxV.js} +2 -2
- package/dist/storybook/assets/textarea-TqxidmV4.css +1 -0
- package/dist/storybook/assets/{textarea.stories-CJ-Oqytp.js → textarea.stories-CzsqRVpC.js} +1 -1
- package/dist/storybook/assets/{title.stories-iTXgnNqS.js → title.stories-B4PYbA22.js} +1 -1
- package/dist/storybook/assets/{toaster-BoBcvmf9.js → toaster-O8ftrUAJ.js} +1 -1
- package/dist/storybook/assets/{toaster.stories-G6nKp3uV.js → toaster.stories-CdpwLBSo.js} +1 -1
- package/dist/storybook/assets/toaster.test-case.stories-Cy3_Gvs_.js +6 -0
- package/dist/storybook/assets/{tooltip.test-case.stories-C0wxGvKJ.js → tooltip.test-case.stories-De9h8ThH.js} +1 -1
- package/dist/storybook/assets/{top-bar-DkXSzzqt.js → top-bar-Bjf6PQE1.js} +1 -1
- package/dist/storybook/assets/{top-bar.stories-HDmWT243.js → top-bar.stories-1hZmlzDT.js} +1 -1
- package/dist/storybook/assets/{top-bar.testcase.stories-DfmrkEpT.js → top-bar.testcase.stories-BsFYqaw6.js} +1 -1
- package/dist/storybook/assets/{tree.stories-feLUcTtm.js → tree.stories-NGZfmH_B.js} +1 -1
- package/dist/storybook/assets/{unit-input-DZs3wEdY.js → unit-input-Byipu-z0.js} +1 -1
- package/dist/storybook/assets/{unit-input.stories-BRl4TnIK.js → unit-input.stories-CChVbxmI.js} +1 -1
- package/dist/storybook/assets/{unit-input.test-case.stories-xWsKGi4p.js → unit-input.test-case.stories-BeFM9DuK.js} +3 -3
- package/dist/storybook/assets/{unit-table.stories-C4AcKcPO.js → unit-table.stories-9x5S71wv.js} +1 -1
- package/dist/storybook/assets/{unit-table.test-case.stories-Do8WFzxy.js → unit-table.test-case.stories-DZJ-hZ72.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/404.html +0 -1
- package/dist/storybook/assets/button-DHevvVBE.js +0 -1
- package/dist/storybook/assets/button-fAxt_G4d.css +0 -1
- package/dist/storybook/assets/drawer-DOWJp9T4.js +0 -3
- package/dist/storybook/assets/drawer-DhrjYsQu.css +0 -1
- package/dist/storybook/assets/input-DD7t4kHm.css +0 -1
- package/dist/storybook/assets/input-DTXbDJaL.js +0 -1
- package/dist/storybook/assets/menu.test-case.stories-DyrNbGBs.js +0 -3
- package/dist/storybook/assets/message-Cl3kn7ZD.css +0 -1
- package/dist/storybook/assets/message-Y48EomV-.js +0 -1
- package/dist/storybook/assets/meta-content-DWZbURV2.js +0 -9
- package/dist/storybook/assets/meta-content-DnZPPeTF.css +0 -1
- package/dist/storybook/assets/modal.test-case.stories-DQ1Izuq6.js +0 -21
- package/dist/storybook/assets/number-input.test-case.stories-C6CDA2a8.js +0 -92
- package/dist/storybook/assets/select-03uRbc4I.js +0 -61
- package/dist/storybook/assets/select-H-9tdhwc.css +0 -1
- package/dist/storybook/assets/select.test-case.stories-DwDNDHax.js +0 -82
- package/dist/storybook/assets/side-bar-CSx5wI-k.js +0 -24
- package/dist/storybook/assets/side-bar-auov230-.css +0 -1
- package/dist/storybook/assets/table-B8ojy8Nj.css +0 -1
- package/dist/storybook/assets/table-Cw1-vdpR.js +0 -86
- package/dist/storybook/assets/textarea-H-YTEwr8.css +0 -1
- package/dist/storybook/assets/toaster.test-case.stories-CCHTh_U1.js +0 -6
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./jsx-runtime-eps93zm2.js";import{r as S}from"./index-DhsZuJvc.js";import{c as _}from"./index-Bk2sglWO.js";import{I as Le,D as We,C as Fe,P as Pe}from"./index.es-DazXb-ul.js";import{l as De}from"./lodash-c4VUpsOs.js";import{A as ae}from"./actions-D-uVCDzk.js";import{H as Oe}from"./heading-CRNoBc7q.js";import{P as $e}from"./pagination-DWc8zp3k.js";import{A as f,I as B}from"./common-types-Sih75Sav.js";import{I as Be}from"./input-DTXbDJaL.js";import{N as Me}from"./number-input-Dq8zEk7X.js";import{S as Ge}from"./select-03uRbc4I.js";import{D as Ve}from"./disabled-context-rmpd7YJS.js";import{i as M}from"./types-Dx2TtIG9.js";import{T as oe}from"./tooltip-1V7clEnw.js";import{C as Ue}from"./check-box-DPLaOkRR.js";import{S as ze}from"./slider-C7vnj_3M.js";import{I as G}from"./icon-BSFY3vDO.js";import{P as Ke}from"./popover-rq33c1W2.js";import{H as fe}from"./help-icon-Buhx5nl6.js";import{T as Y}from"./text-B3-TSWok.js";const Xe="_inputInTable_k0mvt_1",Ye="_error_k0mvt_7",Je="_warning_k0mvt_7",Qe="_inputHover_k0mvt_13",Ze="_inputFocus_k0mvt_18",en="_inputError_k0mvt_25",nn="_inputWarning_k0mvt_26",tn="_inputDisabled_k0mvt_61",rn="_hideScrollbars_k0mvt_67",an="_wrapper_k0mvt_85",on="_bordered_k0mvt_93",sn="_scroll_k0mvt_98",ln="_table_k0mvt_108",un="_striped_k0mvt_188",L={inputInTable:Xe,error:Ye,warning:Je,inputHover:Qe,inputFocus:Ze,inputError:en,inputWarning:nn,inputDisabled:tn,hideScrollbars:rn,wrapper:an,bordered:on,scroll:sn,table:ln,striped:un},dn="_title_zn5s7_1",cn={title:dn},Q=({name:e=null,actions:t=null,actionsRight:r=!1,testId:o})=>{const a=e!==null,i=t!==null;if(!a&&!i)return null;const l=()=>{if(!i)return null;const c=n.jsx(ae,{actions:t});return r?c:n.jsx("div",{children:c})};return n.jsxs("div",{className:cn.title,children:[a?n.jsx(Oe,{children:n.jsx("span",{"data-testid":o,children:e})}):null,l()]})};Q.__docgenInfo={description:"",methods:[],displayName:"Title",props:{name:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:"",defaultValue:{value:"null",computed:!1}},actions:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:"null",computed:!1}},actionsRight:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},testId:{required:!1,tsType:{name:"string"},description:""}}};const pn="_footer_4sumy_1",mn="_section_4sumy_7",J={footer:pn,section:mn},Z=({colSpan:e,pagination:t,actions:r,content:o})=>{const a=r&&r.length,i=o!=null,l=()=>{var u,p;if(t){const{rowCount:d,rowsPerPage:I}=t,h=Number((p=(u=I==null?void 0:I.options)==null?void 0:u[0])==null?void 0:p.value);return d>h}return!1};return a||i||l()?n.jsxs("div",{className:J.footer,children:[i?n.jsx("div",{className:J.section,children:n.jsx("div",{children:o})}):null,a||l()?n.jsxs("div",{className:J.section,children:[l()?n.jsx($e,{pagination:t}):n.jsx("div",{}),a&&n.jsx("div",{children:n.jsx(ae,{actions:r})})]}):null]}):null};Z.__docgenInfo={description:"",methods:[],displayName:"Footer",props:{colSpan:{required:!1,tsType:{name:"number"},description:""},pagination:{required:!0,tsType:{name:"IPagination"},description:""},actions:{required:!1,tsType:{name:"Array",elements:[{name:"IAction"}],raw:"IAction[]"},description:""},content:{required:!1,tsType:{name:"ReactNode"},description:""}}};const ye=e=>{const t=Math.max(...e.reduce((r,o)=>{const a=o.cells.map(i=>i.colSpan?i.colSpan:1).reduce((i,l)=>i+l,0);return r.concat(a)},[]));return isNaN(t)?0:t},gn=(e,t)=>{const r=[ye(t),ye(e)];return Math.max(...r)},Ce=e=>e.reduce((t,r)=>r.actions&&r.actions.length>0?1:t,0),hn=(e,t)=>Ce(t)>0||Ce(e)>0,ee=({table:e,children:t})=>{const{rows:r,infiniteScroll:o}=e,a=Math.ceil(window.innerHeight/30),[i,l]=o?S.useState(a):[r.length,null],[c,u]=o?S.useState(i<r.length):[!1,null],p=()=>{if(i>=r.length&&u){u(!1);return}l&&l(i+a)};return n.jsx("div",{id:"scrollWrapper",className:L.scroll,children:o?n.jsx(Le,{dataLength:Math.min(r.length,i+a),next:p,hasMore:c,scrollableTarget:"scrollWrapper",style:{overflow:"initial"},loader:null,children:t({visibleRows:i})}):t({visibleRows:i})})};ee.__docgenInfo={description:"",methods:[],displayName:"TableScrollWrapper",props:{table:{required:!0,tsType:{name:"ITableProps"},description:""},children:{required:!0,tsType:{name:"signature",type:"function",raw:"(props: { visibleRows: number }) => ReactNode",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{ visibleRows: number }",signature:{properties:[{key:"visibleRows",value:{name:"number",required:!0}}]}},name:"props"}],return:{name:"ReactNode"}}},description:""}}};const In="_clickableRow_1ki29_1",yn="_hoverableRow_1ki29_4",Cn="_rowActive_1ki29_4",bn="_expandableRow_1ki29_8",fn="_flush_1ki29_8",_n="_errorRow_1ki29_12",wn="_warningRow_1ki29_15",vn="_dragIconCell_1ki29_34",xn="_dragIcon_1ki29_34",b={clickableRow:In,hoverableRow:yn,rowActive:Cn,expandableRow:bn,flush:fn,errorRow:_n,warningRow:wn,dragIconCell:vn,dragIcon:xn},ne=({colSpan:e,children:t,flush:r})=>n.jsx("tr",{children:n.jsx("td",{colSpan:e,className:_(b.expandableRow,r?b.flush:""),children:t})});ne.__docgenInfo={description:"",methods:[],displayName:"ExpandedContentRow",props:{colSpan:{required:!0,tsType:{name:"number"},description:""},children:{required:!0,tsType:{name:"ReactNode"},description:""},flush:{required:!1,tsType:{name:"boolean"},description:""}}};const be=(e,t={leftAligned:"",rightAligned:"",centerAligned:""},r=!1)=>{if(!e)return null;const{bodyAlignment:o,headerAlignment:a,isHeader:i}=e;switch(i&&a?a:o){case f.LEFT:return r?f.LEFT:t.leftAligned;case f.RIGHT:return r?f.RIGHT:t.rightAligned;case f.CENTER:return r?f.CENTER:t.centerAligned;default:return r?f.LEFT:t.leftAligned}},Tn=(e,t=!1,r=0)=>{if(!e||e.length===0)return[];const o=e.every(i=>Array.isArray(i)),a=e.every(i=>typeof i=="string");return o&&t?e[r]||[]:a?e:(console.warn("getHeaderAlignment: alignments array contains a mix of strings and arrays, returning an empty array."),[])},qn="_inputInTable_9hq13_1",kn="_error_9hq13_7",An="_warning_9hq13_7",Rn="_inputHover_9hq13_13",jn="_inputFocus_9hq13_18",Nn="_inputError_9hq13_25",Sn="_inputWarning_9hq13_26",En="_inputDisabled_9hq13_61",Hn="_hideScrollbars_9hq13_67",Ln="_cell_9hq13_77",Wn="_disabledLink_9hq13_87",Fn="_inputWrapper_9hq13_91",Pn="_numberInputWrapper_9hq13_106",Dn="_breakWord_9hq13_113",On="_inputCell_9hq13_116",$n="_sliderCell_9hq13_119",Bn="_staticCell_9hq13_123",Mn="_staticCellContent_9hq13_126",Gn="_unit_9hq13_148",Vn="_sortingCell_9hq13_151",Un="_sortingCellIcon_9hq13_162",zn="_icon_9hq13_173",Kn="_checkBoxCell_9hq13_177",Xn="_iconCellWrapper_9hq13_181",Yn="_actionsCell_9hq13_185",Jn="_rightAligned_9hq13_193",Qn="_centerAligned_9hq13_199",Zn="_leftAligned_9hq13_205",et="_popover_9hq13_208",nt="_disabledPointerEvents_9hq13_211",s={inputInTable:qn,error:kn,warning:An,inputHover:Rn,inputFocus:jn,inputError:Nn,inputWarning:Sn,inputDisabled:En,hideScrollbars:Hn,cell:Ln,disabledLink:Wn,inputWrapper:Fn,numberInputWrapper:Pn,breakWord:Dn,inputCell:On,sliderCell:$n,staticCell:Bn,staticCellContent:Mn,unit:Gn,sortingCell:Vn,sortingCellIcon:Un,icon:zn,checkBoxCell:Kn,iconCellWrapper:Xn,actionsCell:Yn,rightAligned:Jn,centerAligned:Qn,leftAligned:Zn,popover:et,disabledPointerEvents:nt},te=({cell:e,columnAlignment:t,testId:r,type:o})=>n.jsx(Be,{name:e.name,value:e.value,onChange:a=>{var i;return(i=e.onChange)==null?void 0:i.call(e,a)},onFocus:e.onFocus,onBlur:e.onBlur,onPaste:a=>{var i;return(i=e.onPaste)==null?void 0:i.call(e,a)},placeholder:e.placeholder,error:e.error,warning:e.warning,disabled:e.disabled,isInTable:!0,maxTooltipWidth:e.maxTooltipWidth,right:t===f.RIGHT,testId:r,tabIndex:e.disabled?-1:0,tooltip:e.tooltip,type:o});te.__docgenInfo={description:"",methods:[],displayName:"InputCell",props:{cell:{required:!0,tsType:{name:"IInputCell"},description:""},columnAlignment:{required:!1,tsType:{name:"union",raw:"Align.LEFT | Align.RIGHT | string",elements:[{name:"Align.LEFT"},{name:"Align.RIGHT"},{name:"string"}]},description:""},testId:{required:!1,tsType:{name:"string"},description:""},type:{required:!1,tsType:{name:"union",raw:"'text' | 'date'",elements:[{name:"literal",value:"'text'"},{name:"literal",value:"'date'"}]},description:""}}};const _e=({cell:e,testId:t})=>n.jsx(Me,{name:e.name,value:e.value,onChange:r=>{var o;return(o=e.onChange)==null?void 0:o.call(e,r)},onFocus:e.onFocus,onBlur:e.onBlur,placeholder:e.placeholder,error:e.error,warning:e.warning,disabled:e.disabled,isInTable:!0,left:e.left,tabIndex:e.disabled?-1:0,testId:t,tooltip:e.tooltip,validationCallback:e.validationCallback,allowEmpty:e.allowEmpty,enableCosmeticRounding:e.enableCosmeticRounding,enableDisplayRounding:e.enableDisplayRounding,roundDisplayValue:e.roundDisplayValue});_e.__docgenInfo={description:"",methods:[],displayName:"NumberInputCell",props:{cell:{required:!0,tsType:{name:"INumberInputCell"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const we=({cell:e,columnAlignment:t,testId:r})=>n.jsx(Ge,{name:e.name,borderRadius:0,options:e.options,onChange:o=>{var a;return(a=e.onChange)==null?void 0:a.call(e,o)},onCreate:e.onCreate?o=>e.onCreate&&e.onCreate(o):void 0,error:e.error,warning:e.warning,disabled:e.disabled,placeholder:e.placeholder,isInTable:!0,value:e.value,native:e.native,clearable:e.clearable,searchable:e.searchable,deprecatedEventHandler:e.deprecatedEventHandler,maxTooltipWidth:e.maxTooltipWidth,width:"100%",autoLayerWidth:e.autoLayerWidth,multi:e.multi,right:t===f.RIGHT,testId:r,tabIndex:e.disabled?-1:0});we.__docgenInfo={description:"",methods:[],displayName:"SelectCell",props:{cell:{required:!0,tsType:{name:"ISelectCell"},description:""},columnAlignment:{required:!1,tsType:{name:"union",raw:"Align.LEFT | Align.RIGHT | string",elements:[{name:"Align.LEFT"},{name:"Align.RIGHT"},{name:"string"}]},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const ve=({cell:e,columnAlignment:t,testId:r})=>n.jsx("div",{className:_(s.inputWrapper,e.type==="NumberInput"?s.numberInputWrapper:""),children:e.type==="Input"?n.jsx(te,{cell:e,columnAlignment:t,testId:r}):e.type==="NumberInput"?n.jsx(_e,{cell:e,testId:r}):e.type==="DateInput"?n.jsx(te,{cell:e,testId:r,type:"date"}):e.type==="Select"?n.jsx(we,{cell:e,columnAlignment:t,testId:r}):null});ve.__docgenInfo={description:"",methods:[],displayName:"InputCellWrapper",props:{cell:{required:!0,tsType:{name:"any"},description:""},columnAlignment:{required:!0,tsType:{name:"union",raw:"Align.LEFT | Align.RIGHT | string",elements:[{name:"Align.LEFT"},{name:"Align.RIGHT"},{name:"string"}]},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const xe=({cell:e,testId:t})=>{const r=S.useContext(Ve),{error:o,warning:a,tooltip:i,maxTooltipWidth:l}=e,c=u=>M(u);return n.jsx("div",{className:s.inputWrapper,children:n.jsx(oe,{error:!!o,warning:!!a,text:i||o||a,enabled:c(i)||c(o)||c(a)||!1,maxWidth:l,placement:"bottom-center",children:n.jsx("div",{className:_(s.staticCellContent,o?s.error:a?s.warning:""),children:n.jsx("a",{className:_((e.disabled||r)&&s.disabledLink),onClick:e.disabled||r?void 0:u=>{var p;u.stopPropagation(),(p=e.onClick)==null||p.call(e,u)},"data-testid":t,children:e.value})})})})};xe.__docgenInfo={description:"",methods:[],displayName:"LinkCell",props:{cell:{required:!0,tsType:{name:"ILinkCell"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const Te=({cell:e,testId:t})=>n.jsx(Ue,{label:e.label,checked:e.checked,isInTable:!0,disabled:e.disabled,onChange:r=>e.onChange(r),testId:t,tabIndex:e.disabled?-1:0});Te.__docgenInfo={description:"",methods:[],displayName:"CheckBoxCell",props:{cell:{required:!0,tsType:{name:"ICheckBoxCell"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const qe=({cell:e})=>n.jsx("div",{className:s.inputWrapper,children:n.jsx(ze,{label:e.label,value:e.value,min:e.min,max:e.max,step:e.step,marks:e.marks,onChange:t=>e.onChange(t),showArrows:e.showArrows,showTooltip:e.showTooltip,tooltipFormatter:e.tooltipFormatter,disabled:e.disabled})});qe.__docgenInfo={description:"",methods:[],displayName:"SliderCell",props:{cell:{required:!0,tsType:{name:"ISliderCell"},description:""}}};const ke=({cell:e})=>{const{tooltip:t,icon:r}=e;return n.jsx("div",{className:s.iconCellWrapper,children:n.jsx(oe,{text:t,enabled:!!t&&M(t),display:"flex",placement:"top-center",children:n.jsx(G,{icon:r})})})};ke.__docgenInfo={description:"",methods:[],displayName:"IconCell",props:{cell:{required:!0,tsType:{name:"IIconCell"},description:""}}};const Ae=({cell:e})=>n.jsx(ae,{actions:e.actions});Ae.__docgenInfo={description:"",methods:[],displayName:"ActionsCell",props:{cell:{required:!0,tsType:{name:"IActionCell"},description:""}}};const Re=({cell:e})=>{const{helpIcon:t}=e;return t?n.jsx("div",{className:s.icon,children:n.jsx(fe,{onClick:t.onClick,text:t.tooltip})}):null};Re.__docgenInfo={description:"",methods:[],displayName:"CellHelpIcon",props:{cell:{required:!0,tsType:{name:"IHelpIconCell"},description:""}}};const je=({cell:e})=>{const{libraryIcon:t}=e;return t?n.jsx("div",{className:s.icon,children:n.jsx(fe,{onClick:t.onClick,text:t.tooltip,icon:B.LIBRARY})}):null};je.__docgenInfo={description:"",methods:[],displayName:"CellLibraryIcon",props:{cell:{required:!0,tsType:{name:"ILibraryIconCell"},description:""}}};const Ne=({cell:e})=>{const{hasSort:t,sort:r,sortPriority:o}=e;return t?n.jsxs("span",{className:s.sortingCellIcon,children:[r==="down"?n.jsx(Y,{link:!0,children:n.jsx(G,{icon:B.SORT_ASCENDING})}):r==="up"?n.jsx(Y,{link:!0,children:n.jsx(G,{icon:B.SORT_DESCENDING})}):n.jsx(Y,{faint:!0,children:n.jsx(G,{icon:B.SORT_DESCENDING})}),o&&r?n.jsx("sup",{children:o}):null]}):null};Ne.__docgenInfo={description:"",methods:[],displayName:"Sort",props:{cell:{required:!0,tsType:{name:"ISortCell"},description:""}}};const ie=({cell:e,isHeader:t,testId:r})=>{const{error:o,warning:a,tooltip:i,maxTooltipWidth:l,hasSort:c,onSort:u,type:p}=e,d=n.jsxs("div",{className:_(s.staticCellContent,p==="Unit"?s.unit:"",o?s.error:a?s.warning:""),onClick:c?I=>u&&u(I):()=>{},"data-testid":r,children:[e.value,t?n.jsxs(n.Fragment,{children:[n.jsx(Re,{cell:e}),n.jsx(je,{cell:e}),n.jsx(Ne,{cell:e})]}):null]});return n.jsx("div",{className:s.inputWrapper,children:n.jsx(oe,{error:!!o,warning:!!a,text:i||o||a,enabled:i&&M(i)||o&&M(o)||a&&M(a)||!1,maxWidth:l,display:"block",placement:"bottom-center",children:d})})};ie.__docgenInfo={description:"",methods:[],displayName:"StaticCell",props:{cell:{required:!0,tsType:{name:"IStaticCell"},description:""},isHeader:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const Se=({cell:e,testId:t})=>{const{content:r,fullWidth:o,closeOnOutsideClick:a,disabled:i}=e;return n.jsx(Ke,{content:r,fullWidth:o,closeOnOutsideClick:a,disabled:i,children:n.jsx("div",{className:s.popover,children:n.jsx(ie,{cell:e,testId:t})})})};Se.__docgenInfo={description:"",methods:[],displayName:"PopoverCell",props:{cell:{required:!0,tsType:{name:"IPopoverCell"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const Ee=({cell:e,isHeader:t,columnAlignment:r,testId:o})=>{if(!e)return null;switch(e.type){case"Input":case"NumberInput":case"DateInput":case"Select":return n.jsx(ve,{cell:e,columnAlignment:r,testId:o});case"Link":return n.jsx(xe,{cell:e,testId:o});case"CheckBox":return n.jsx(Te,{cell:e,testId:o});case"Slider":return n.jsx(qe,{cell:e});case"Icon":return n.jsx(ke,{cell:e});case"Actions":return n.jsx(Ae,{cell:e});case"Popover":return n.jsx(Se,{cell:e});default:return n.jsx(ie,{cell:e,isHeader:t,testId:o})}};Ee.__docgenInfo={description:"",methods:[],displayName:"CellWrapper",props:{cell:{required:!0,tsType:{name:"any"},description:""},isHeader:{required:!0,tsType:{name:"boolean"},description:""},columnAlignment:{required:!0,tsType:{name:"union",raw:"Align.LEFT | Align.RIGHT | string",elements:[{name:"Align.LEFT"},{name:"Align.RIGHT"},{name:"string"}]},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};var A=(e=>(e.INPUT="Input",e.NUMBER_INPUT="NumberInput",e.SELECT="Select",e.POPOVER="Popover",e.SLIDER="Slider",e.CHECKBOX="CheckBox",e.ACTIONS="Actions",e.AUTO_UNIT="AutoUnit",e))(A||{});const re=({cell:e,isHeader:t,columnHeaderAlignment:r,columnAlignment:o=f.LEFT,width:a,snapshot:i,testId:l})=>{if(!e)return null;const{style:c,colSpan:u,rowSpan:p,width:d}=e,I=S.useRef(null),h={bodyAlignment:o,headerAlignment:r,isHeader:t},W=be(h,s),w=be(h,s,!0),F=e.type===A.INPUT||e.type===A.NUMBER_INPUT||e.type===A.SELECT||e.type===A.POPOVER?s.inputCell:e.type===A.SLIDER?s.sliderCell:e.type===A.CHECKBOX?s.checkBoxCell:e.type===A.ACTIONS?s.actionsCell:s.staticCell,q=_(s.cell,F,e.hasSort?s.sortingCell:null,W,e.breakWord?s.breakWord:""),E=d??a??((i==null?void 0:i.isDragging)&&I.current&&I.current.offsetWidth)??void 0,v={width:E,minWidth:E,...c},k=t?"th":"td";return n.jsx(k,{ref:I,className:q,style:v,colSpan:u,rowSpan:p,children:n.jsx(Ee,{cell:e,columnAlignment:w??f.RIGHT,isHeader:t,testId:l})})};re.__docgenInfo={description:"",methods:[],displayName:"Cell",props:{cell:{required:!1,tsType:{name:"union",raw:`| IPopoverCell
|
|
2
|
-
| IStaticCell
|
|
3
|
-
| ISelectCell
|
|
4
|
-
| IHelpIconCell
|
|
5
|
-
| ILibraryIconCell
|
|
6
|
-
| ICheckBoxCell
|
|
7
|
-
| IIconCell
|
|
8
|
-
| IInputCell
|
|
9
|
-
| ILinkCell
|
|
10
|
-
| INumberInputCell
|
|
11
|
-
| IActionCell
|
|
12
|
-
| ISortCell
|
|
13
|
-
| ISliderCell
|
|
14
|
-
| ISimpleCell`,elements:[{name:"IPopoverCell"},{name:"IStaticCell"},{name:"ISelectCell"},{name:"IHelpIconCell"},{name:"ILibraryIconCell"},{name:"ICheckBoxCell"},{name:"IIconCell"},{name:"IInputCell"},{name:"ILinkCell"},{name:"INumberInputCell"},{name:"IActionCell"},{name:"ISortCell"},{name:"ISliderCell"},{name:"ISimpleCell"}]},description:""},isHeader:{required:!0,tsType:{name:"boolean"},description:""},columnHeaderAlignment:{required:!1,tsType:{name:"string"},description:""},columnAlignment:{required:!1,tsType:{name:"union",raw:"Align.LEFT | Align.RIGHT | null",elements:[{name:"Align.LEFT"},{name:"Align.RIGHT"},{name:"null"}]},description:"",defaultValue:{value:"Align.LEFT",computed:!0}},width:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},snapshot:{required:!1,tsType:{name:"any"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const $=({row:e,rowIndex:t,isHeader:r=!1,columnCount:o,colSpan:a,columnHeaderAlignments:i=[],columnAlignment:l=[],hasRowActions:c,draggableTable:u=!1,snapshot:p=null,provided:d=null,width:I,columnWidths:h,testId:W})=>{const w=S.useRef(null),F=Tn(i,r,t),{onRowClick:q,onRowFocus:E,onRowMouseEnter:v,onRowMouseLeave:k,expandedContent:x,error:K,warning:P,active:H}=e,R=e.cells.map((C,N)=>{const O=`${r?0:1}_${t}_${N}`;return n.jsx(re,{cell:C,isHeader:r,columnAlignment:l[N],columnHeaderAlignment:F[N],width:h?h[N]:void 0,snapshot:p,testId:C.testId},O)}),j=c&&n.jsx(re,{cell:{type:A.ACTIONS,actions:e.actions},isHeader:r},o),X=(C,N)=>({minWidth:C&&`${I}px`,width:C&&"100%",display:C&&"table",background:C&&"var(--color-background-listitem-active)",border:C&&"var(--color-border)",borderTop:C&&0,opacity:C&&.1,...N}),V=()=>e.noDrag?n.jsx("td",{"aria-labelledby":"unique-label-id"}):n.jsx("td",{className:b.dragIconCell,children:n.jsx("div",{...d.dragHandleProps,className:b.dragIcon,children:n.jsx(G,{icon:B.DRAG})})});return r?n.jsxs(n.Fragment,{children:[n.jsxs("tr",{ref:w,onClick:q,onMouseEnter:v,onMouseLeave:k,onFocus:E,className:_(q?b.clickableRow:null,v?b.hoverableRow:null),children:[u?n.jsx("th",{}):null,R,j]},t),x&&x.content?n.jsx(ne,{colSpan:a,flush:x.flush===!0,children:x.content},`${t}_expanded_content`):null]}):n.jsxs(n.Fragment,{children:[n.jsxs("tr",{onClick:q,onMouseEnter:v,onMouseLeave:k,onFocus:E,className:_(q&&!q.noStyle?b.clickableRow:null,v&&!v.noStyle?b.hoverableRow:null,H?b.rowActive:null,K?b.errorRow:null,P?b.warningRow:null),ref:(d==null?void 0:d.innerRef)||null,...(d==null?void 0:d.draggableProps)||null,style:p&&d?X(p.isDragging,d.draggableProps.style):null,children:[u?V():null,R,j]},t),x&&x.content?n.jsx(ne,{colSpan:a,flush:x.flush===!0,children:x.content},`${t}_expanded_content`):null]})};$.__docgenInfo={description:"",methods:[],displayName:"Row",props:{row:{required:!0,tsType:{name:"signature",type:"object",raw:`{
|
|
15
|
-
active?: boolean;
|
|
16
|
-
error?: boolean;
|
|
17
|
-
warning?: boolean;
|
|
18
|
-
cells: TCellShape[];
|
|
19
|
-
noDrag?: boolean;
|
|
20
|
-
onRowClick?: IOnRowClickFunction;
|
|
21
|
-
onRowFocus?: IOnRowClickFunction;
|
|
22
|
-
onRowMouseEnter?: IOnRowClickFunction;
|
|
23
|
-
onRowMouseLeave?: IOnRowClickFunction;
|
|
24
|
-
expandedContent?: {
|
|
25
|
-
content: ReactNode;
|
|
26
|
-
flush?: boolean;
|
|
27
|
-
};
|
|
28
|
-
actions?: any[];
|
|
29
|
-
}`,signature:{properties:[{key:"active",value:{name:"boolean",required:!1}},{key:"error",value:{name:"boolean",required:!1}},{key:"warning",value:{name:"boolean",required:!1}},{key:"cells",value:{name:"Array",elements:[{name:"union",raw:`| IPopoverCell
|
|
30
|
-
| IStaticCell
|
|
31
|
-
| ISelectCell
|
|
32
|
-
| IHelpIconCell
|
|
33
|
-
| ILibraryIconCell
|
|
34
|
-
| ICheckBoxCell
|
|
35
|
-
| IIconCell
|
|
36
|
-
| IInputCell
|
|
37
|
-
| ILinkCell
|
|
38
|
-
| INumberInputCell
|
|
39
|
-
| IActionCell
|
|
40
|
-
| ISortCell
|
|
41
|
-
| ISliderCell
|
|
42
|
-
| ISimpleCell`,elements:[{name:"IPopoverCell"},{name:"IStaticCell"},{name:"ISelectCell"},{name:"IHelpIconCell"},{name:"ILibraryIconCell"},{name:"ICheckBoxCell"},{name:"IIconCell"},{name:"IInputCell"},{name:"ILinkCell"},{name:"INumberInputCell"},{name:"IActionCell"},{name:"ISortCell"},{name:"ISliderCell"},{name:"ISimpleCell"}]}],raw:"TCellShape[]",required:!0}},{key:"noDrag",value:{name:"boolean",required:!1}},{key:"onRowClick",value:{name:"IOnRowClickFunction",required:!1}},{key:"onRowFocus",value:{name:"IOnRowClickFunction",required:!1}},{key:"onRowMouseEnter",value:{name:"IOnRowClickFunction",required:!1}},{key:"onRowMouseLeave",value:{name:"IOnRowClickFunction",required:!1}},{key:"expandedContent",value:{name:"signature",type:"object",raw:`{
|
|
43
|
-
content: ReactNode;
|
|
44
|
-
flush?: boolean;
|
|
45
|
-
}`,signature:{properties:[{key:"content",value:{name:"ReactNode",required:!0}},{key:"flush",value:{name:"boolean",required:!1}}]},required:!1}},{key:"actions",value:{name:"Array",elements:[{name:"any"}],raw:"any[]",required:!1}}]}},description:""},rowIndex:{required:!0,tsType:{name:"number"},description:""},isHeader:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},columnCount:{required:!0,tsType:{name:"number"},description:""},colSpan:{required:!0,tsType:{name:"number"},description:""},columnHeaderAlignments:{required:!1,tsType:{name:"union",raw:"string[] | string[][]",elements:[{name:"Array",elements:[{name:"string"}],raw:"string[]"},{name:"Array",elements:[{name:"Array",elements:[{name:"string"}],raw:"string[]"}],raw:"string[][]"}]},description:"",defaultValue:{value:"[]",computed:!1}},columnAlignment:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:"",defaultValue:{value:"[]",computed:!1}},hasRowActions:{required:!0,tsType:{name:"boolean"},description:""},draggableTable:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},snapshot:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:"null",computed:!1}},provided:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:"null",computed:!1}},width:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},columnWidths:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const tt=e=>{var de,ce,pe,me,ge,he,Ie;const{onListReorder:t=()=>{},table:r}=e,{columnWidths:o,footer:a,name:i,rows:l=[],actions:c,actionsRight:u,columnHeaderAlignments:p,columnAlignment:d,striped:I=!0,testId:h,draggable:W,defaultEmptyRow:w=null,onAddRow:F=null,bordered:q=!0,maxHeight:E,fixedWidth:v}=r,k=S.useRef(null),[x,K]=S.useState({width:0,height:0});S.useEffect(()=>{k.current&&K({width:k.current.offsetWidth,height:k.current.offsetHeight})},[]);const P=De.get(e,"table.headers",[]),H=gn(l,P),R=hn(l,P),j=H+(R?1:0),X=a?((ce=(de=a==null?void 0:a.pagination)==null?void 0:de.rowsPerPage)==null?void 0:ce.value)===0||Number((pe=a==null?void 0:a.pagination)==null?void 0:pe.selectedPage)>=Number((me=a==null?void 0:a.pagination)==null?void 0:me.rowCount)/Number((he=(ge=a==null?void 0:a.pagination)==null?void 0:ge.rowsPerPage)==null?void 0:he.value):!0,V=((Ie=w==null?void 0:w.cells)==null?void 0:Ie.length)&&F&&X,N={cells:V?w.cells.map((m,T)=>(m==null?void 0:m.type)==="Input"?{...m,onChange:g=>{var U;const y=(U=g==null?void 0:g.target)==null?void 0:U.value,D={...w,cells:w.cells.map((z,He)=>({...z,value:He===T?y:z==null?void 0:z.value}))};F({newRow:D})}}:{...m,disabled:!0}):null,testId:h?`${h}-last-empty-row`:void 0},O=V?l.concat(N):l,se={...r,rows:O},le=_(L.wrapper,q?L.bordered:""),ue={maxHeight:E,width:v,display:v==="auto"?"inline-flex":"flex"};return W?n.jsxs("div",{ref:k,className:le,style:ue,children:[n.jsx(Q,{actions:c,actionsRight:u,name:i,testId:h&&`${h}-title`}),n.jsx(We,{onDragEnd:m=>{var y,D;const T=(y=m==null?void 0:m.source)==null?void 0:y.index,g=(D=m==null?void 0:m.destination)==null?void 0:D.index;typeof T=="number"&&typeof g=="number"&&t({from:T,to:g})},children:n.jsx(Fe,{droppableId:"droppable",children:m=>n.jsx(ee,{table:se,children:({visibleRows:T})=>n.jsxs("table",{className:_(L.table,I?L.striped:""),"data-testid":h,ref:m.innerRef,children:[n.jsx("thead",{children:P.map((g,y)=>n.jsx($,{rowIndex:y,isHeader:!0,row:g,columnCount:H,columnWidths:o,colSpan:j,hasRowActions:R,columnAlignment:d,columnHeaderAlignments:p,draggableTable:W},`0_${y}`))}),n.jsxs("tbody",{children:[O.slice(0,T).map((g,y)=>n.jsx(Pe,{draggableId:y+"",index:y,isDragDisabled:g.noDrag,children:(D,U)=>n.jsx($,{rowIndex:y,row:g,columnCount:H,columnWidths:o,colSpan:j,hasRowActions:R,columnAlignment:d,provided:D,snapshot:U,draggableTable:W,width:x.width},`1_${y}`)},`index_${y}`)),m.placeholder]})]})})})}),a&&n.jsx(Z,{pagination:a.pagination,actions:a.actions,content:a.content})]}):n.jsxs("div",{className:le,style:ue,children:[n.jsx(Q,{actions:c,actionsRight:u,name:i,testId:h&&`${h}-title`}),n.jsx(ee,{table:se,children:({visibleRows:m})=>n.jsxs("table",{className:_(L.table,I?L.striped:""),"data-testid":h,children:[n.jsx("thead",{children:P.map((T,g)=>n.jsx($,{rowIndex:g,isHeader:!0,row:T,columnCount:H,columnWidths:o,colSpan:j,hasRowActions:R,columnAlignment:d,columnHeaderAlignments:p},`0_${g}`))}),n.jsx("tbody",{children:O.slice(0,m).map((T,g)=>n.jsx($,{rowIndex:g,row:T,columnCount:H,columnWidths:o,colSpan:j,hasRowActions:R,columnAlignment:d},`1_${g}`))})]})}),a&&n.jsx(Z,{colSpan:j,pagination:a.pagination,actions:a.actions,content:a.content})]})};tt.__docgenInfo={description:"",methods:[],displayName:"Table",props:{onListReorder:{required:!1,tsType:{name:"signature",type:"function",raw:"(obj: { from: number; to: number }) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{ from: number; to: number }",signature:{properties:[{key:"from",value:{name:"number",required:!0}},{key:"to",value:{name:"number",required:!0}}]}},name:"obj"}],return:{name:"void"}}},description:""},table:{required:!0,tsType:{name:"signature",type:"object",raw:`{
|
|
46
|
-
name?: TStringOrNumber | ReactNode;
|
|
47
|
-
actionsRight?: boolean;
|
|
48
|
-
fixedWidth?: TStringOrNumber;
|
|
49
|
-
maxHeight?: TStringOrNumber;
|
|
50
|
-
columnWidths?: string[];
|
|
51
|
-
className?: string;
|
|
52
|
-
columnHeaderAlignments?: Array<TAlign | string>;
|
|
53
|
-
columnAlignment?: Array<TAlign | string>;
|
|
54
|
-
infiniteScroll?: boolean;
|
|
55
|
-
headers?: any[];
|
|
56
|
-
rows?: TRowsType;
|
|
57
|
-
footer?: IFooterProps;
|
|
58
|
-
draggable?: boolean;
|
|
59
|
-
bordered?: boolean;
|
|
60
|
-
striped?: boolean;
|
|
61
|
-
testId?: string;
|
|
62
|
-
onAddRow?: any;
|
|
63
|
-
defaultEmptyRow?: any;
|
|
64
|
-
stickyHeaders?: string | boolean;
|
|
65
|
-
actions?: any;
|
|
66
|
-
}`,signature:{properties:[{key:"name",value:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1},{name:"ReactNode"}],required:!1}},{key:"actionsRight",value:{name:"boolean",required:!1}},{key:"fixedWidth",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"maxHeight",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"columnWidths",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!1}},{key:"className",value:{name:"string",required:!1}},{key:"columnHeaderAlignments",value:{name:"Array",elements:[{name:"union",raw:"TAlign | string",elements:[{name:"union",raw:"'left' | 'right' | 'center'",elements:[{name:"literal",value:"'left'"},{name:"literal",value:"'right'"},{name:"literal",value:"'center'"}]},{name:"string"}]}],raw:"Array<TAlign | string>",required:!1}},{key:"columnAlignment",value:{name:"Array",elements:[{name:"union",raw:"TAlign | string",elements:[{name:"union",raw:"'left' | 'right' | 'center'",elements:[{name:"literal",value:"'left'"},{name:"literal",value:"'right'"},{name:"literal",value:"'center'"}]},{name:"string"}]}],raw:"Array<TAlign | string>",required:!1}},{key:"infiniteScroll",value:{name:"boolean",required:!1}},{key:"headers",value:{name:"Array",elements:[{name:"any"}],raw:"any[]",required:!1}},{key:"rows",value:{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
|
67
|
-
cells: TCellShape[];
|
|
68
|
-
actions?: any[];
|
|
69
|
-
testId?: string;
|
|
70
|
-
noDrag?: boolean;
|
|
71
|
-
onRowMouseEnter?: TEmpty;
|
|
72
|
-
onRowMouseLeave?: TEmpty;
|
|
73
|
-
}`,signature:{properties:[{key:"cells",value:{name:"Array",elements:[{name:"union",raw:`| IPopoverCell
|
|
74
|
-
| IStaticCell
|
|
75
|
-
| ISelectCell
|
|
76
|
-
| IHelpIconCell
|
|
77
|
-
| ILibraryIconCell
|
|
78
|
-
| ICheckBoxCell
|
|
79
|
-
| IIconCell
|
|
80
|
-
| IInputCell
|
|
81
|
-
| ILinkCell
|
|
82
|
-
| INumberInputCell
|
|
83
|
-
| IActionCell
|
|
84
|
-
| ISortCell
|
|
85
|
-
| ISliderCell
|
|
86
|
-
| ISimpleCell`,elements:[{name:"IPopoverCell"},{name:"IStaticCell"},{name:"ISelectCell"},{name:"IHelpIconCell"},{name:"ILibraryIconCell"},{name:"ICheckBoxCell"},{name:"IIconCell"},{name:"IInputCell"},{name:"ILinkCell"},{name:"INumberInputCell"},{name:"IActionCell"},{name:"ISortCell"},{name:"ISliderCell"},{name:"ISimpleCell"}]}],raw:"TCellShape[]",required:!0}},{key:"actions",value:{name:"Array",elements:[{name:"any"}],raw:"any[]",required:!1}},{key:"testId",value:{name:"string",required:!1}},{key:"noDrag",value:{name:"boolean",required:!1}},{key:"onRowMouseEnter",value:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}},required:!1}},{key:"onRowMouseLeave",value:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}},required:!1}}]}}],raw:"TRowType[]",required:!1}},{key:"footer",value:{name:"IFooterProps",required:!1}},{key:"draggable",value:{name:"boolean",required:!1}},{key:"bordered",value:{name:"boolean",required:!1}},{key:"striped",value:{name:"boolean",required:!1}},{key:"testId",value:{name:"string",required:!1}},{key:"onAddRow",value:{name:"any",required:!1}},{key:"defaultEmptyRow",value:{name:"any",required:!1}},{key:"stickyHeaders",value:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}],required:!1}},{key:"actions",value:{name:"any",required:!1}}]}},description:""}}};export{A as C,tt as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._inputInTable_9svgh_1{background-color:transparent;border-radius:inherit!important;height:var(--size);min-height:100%}._inputInTable_9svgh_1:not(:hover):not(._error_9svgh_7):not(._warning_9svgh_7){border-color:transparent}._inputInTable_9svgh_1:not(:focus){box-shadow:none}._inputHover_9svgh_13{position:relative;border-color:var(--color-border-hover);z-index:2}._inputFocus_9svgh_18{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputError_9svgh_25,._inputWarning_9svgh_26{position:relative}._inputError_9svgh_25{z-index:2;border-color:var(--color-border-error);color:var(--color-text-error)!important;background-color:var(--color-background-error-muted)}._inputError_9svgh_25:hover{border-color:var(--color-border-error-hover)!important}._inputError_9svgh_25:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputWarning_9svgh_26{z-index:1;border-color:var(--color-border-warning);color:var(--color-text-warning)!important;background-color:var(--color-background-warning-muted)}._inputWarning_9svgh_26:hover{border-color:var(--color-border-warning-hover)!important}._inputWarning_9svgh_26:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputDisabled_9svgh_61{pointer-events:none;background-color:var(--color-background-disabled);color:var(--color-text-muted);box-shadow:none}._hideScrollbars_9svgh_67{scrollbar-width:none;-ms-overflow-style:none}._hideScrollbars_9svgh_67::-webkit-scrollbar{display:none}._textarea_9svgh_77{margin:0;display:block;width:100%;max-width:100%;outline:0;text-align:left;font-family:var(--font-family);line-height:var(--line-height);padding:var(--padding-input);background:var(--color-background-input);border:1px solid var(--color-border);color:var(--color-text);border-radius:var(--border-radius);transition:box-shadow .1s ease,border-color .1s ease;box-shadow:none;min-height:var(--size)}._textarea_9svgh_77::placeholder{color:var(--color-text-placeholder)}._textarea_9svgh_77:hover{position:relative;border-color:var(--color-border-hover);z-index:2}._textarea_9svgh_77:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._textarea_9svgh_77[disabled]{pointer-events:none;background-color:var(--color-background-disabled);color:var(--color-text-muted);box-shadow:none}._textarea_9svgh_77._small_9svgh_116{font-size:var(--font-size-sm);min-height:var(--size-sm);padding:var(--padding-input-sm)}._textarea_9svgh_77._error_9svgh_7{position:relative;z-index:2;border-color:var(--color-border-error);color:var(--color-text-error)!important;background-color:var(--color-background-error-muted)}._textarea_9svgh_77._error_9svgh_7:hover{border-color:var(--color-border-error-hover)!important}._textarea_9svgh_77._error_9svgh_7:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._textarea_9svgh_77._warning_9svgh_7{position:relative;z-index:1;border-color:var(--color-border-warning);color:var(--color-text-warning)!important;background-color:var(--color-background-warning-muted)}._textarea_9svgh_77._warning_9svgh_7:hover{border-color:var(--color-border-warning-hover)!important}._textarea_9svgh_77._warning_9svgh_7:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._textarea_9svgh_77._monospace_9svgh_155{font-family:monospace}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./jsx-runtime-eps93zm2.js";import{w as d,e as a,u as n,a as c}from"./index-DMAnyMX5.js";import{t as g}from"./toaster-BoBcvmf9.js";import{B as w}from"./button-DHevvVBE.js";import{a as y}from"./message-Y48EomV-.js";import"./index-DhsZuJvc.js";import"./index-CF7H4eMJ.js";import"./toaster-7wnI6hqB.js";import"./index-CUZDtIZe.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";const h={type:y.INFO,icon:!0,heading:"Heading",content:"Long content lorem ipsum dolor est compendum lorem ipsum."},O={title:"Modals/Toaster/Test Cases",parameters:{docs:{story:{inline:!1,iframeHeight:400}}},source:{type:"code"},args:{id:void 0,message:h,autoClose:6e3,onClose:()=>{}},tags:["!autodocs"]},T=r=>u.jsx(w,{onClick:()=>g({...r,onClose:()=>console.log("toast closed")}),label:"Show toast"}),s=T.bind({});s.args={id:"testId",autoClose:50};s.play=async({canvasElement:r,step:i})=>{const t=r.parentElement?d(r.parentElement):null;await a(t).toBeTruthy(),t&&(await i("Toast should appear when triggered",async()=>{const o=t.getByText("Show toast");await n.click(o);const e=t.getByRole("alert");await a(e).toBeInTheDocument()}),await i("Duplicate toasts shouldn't be created",async()=>{const o=t.getByText("Show toast");await n.click(o);const e=t.queryAllByRole("alert");await a(e).toHaveLength(1)}),await i("Toast should disappear when close button pressed",async()=>{const o=t.getByRole("alert"),e=t.getByTestId("testId-dismiss");await n.click(e),await c(()=>a(o).not.toBeInTheDocument(),{timeout:2e3})}),await i("Toast should automatically close",async()=>{const o=t.getByText("Show toast");await n.click(o);const e=t.getByRole("alert");await c(()=>a(e).not.toBeInTheDocument(),{timeout:2e3})}))};var l,m,p;s.parameters={...s.parameters,docs:{...(l=s.parameters)==null?void 0:l.docs,source:{originalSource:`args => {
|
|
2
|
-
return <Button onClick={() => toast({
|
|
3
|
-
...args,
|
|
4
|
-
onClose: () => console.log('toast closed')
|
|
5
|
-
})} label="Show toast" />;
|
|
6
|
-
}`,...(p=(m=s.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const q=["Test"];export{s as Test,q as __namedExportsOrder,O as default};
|