@oliasoft-open-source/react-ui-library 4.11.0-beta-3 → 4.12.0-beta-1
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 +190 -181
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-KGDBMAHA-DeGjmgTY.js → Color-KGDBMAHA-CK3d59Om.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-PKQXORMH-DJIj_qEG.js → DocsRenderer-PKQXORMH-C_QE44cn.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-BTxV-ybU.js → accordion.stories-C3VY77Jy.js} +2 -2
- 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-DFQsvqIV.js → afe.stories-C9XjJj62.js} +2 -2
- 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-BHGzZGPV.js → buttons-and-links-FQEbqz9H.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-CJpnsmsZ.js → casing-loads.stories-B7JIoJVk.js} +2 -2
- package/dist/storybook/assets/{cell.stories-Bpl0Squh.js → cell.stories-xZiHEc0P.js} +2 -2
- package/dist/storybook/assets/check-box.stories-BJ0ShmeC.js +97 -0
- package/dist/storybook/assets/check-box.test-case.stories-CzuYZkUh.js +30 -0
- package/dist/storybook/assets/{chunk-HLWAVYOI-D2p4xoma.js → chunk-HLWAVYOI-EhWEisNT.js} +1 -1
- package/dist/storybook/assets/{color-D9KYOiNh.js → color-B3dajHjs.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/enum-Bnn40S8Q.js +1 -0
- 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-BxzKeFAK.js +3 -0
- package/dist/storybook/assets/form.stories-BNORsn6Z.js +49 -0
- package/dist/storybook/assets/formation.stories-C5Hkb3iK.js +74 -0
- package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
- package/dist/storybook/assets/iframe-DOUoMheZ.js +2 -0
- package/dist/storybook/assets/{index-C0Iaso0O.js → index-AKsHS-dO.js} +4 -4
- package/dist/storybook/assets/{index-CNkaN_wz.js → index-KVAIZqzA.js} +1 -1
- package/dist/storybook/assets/initialize-context-rEvM6bdZ.js +1 -0
- 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-CElwRt3p.js → input-group.stories-BCajsqAk.js} +3 -3
- package/dist/storybook/assets/{input-validation-Ccgprl1C.js → input-validation-BNoUk3q6.js} +2 -2
- package/dist/storybook/assets/{input.stories-FKl0qVhm.js → input.stories-SJy3TKkD.js} +1 -1
- package/dist/storybook/assets/{inputs-DtQ245kS.js → inputs-Dql6Fq32.js} +2 -2
- package/dist/storybook/assets/{layout-forms-Bm7FYA3V.js → layout-forms-DuFo_rwV.js} +5 -5
- package/dist/storybook/assets/{layout-general-V7ekuEG7.js → layout-general-C-UddRr1.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-1I5AGGQx.js +82 -0
- package/dist/storybook/assets/menu.test-case.stories-BFYhvtSH.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-C2d-Em5V.js +200 -0
- package/dist/storybook/assets/modal.test-case.stories-H8AYyvAl.js +21 -0
- package/dist/storybook/assets/{number-input-Bpg4Yqmo.js → number-input-CNnU6gOF.js} +2 -2
- package/dist/storybook/assets/number-input.stories-Bo26PJmJ.js +89 -0
- package/dist/storybook/assets/number-input.test-case.stories-BBKpBWfA.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-IKi7rvQ-.js → padding-and-spacing-B9ObVTUS.js} +1 -1
- package/dist/storybook/assets/{page.stories-DnCh8h8y.js → page.stories-DthnK8qb.js} +1 -1
- package/dist/storybook/assets/{pagination-CLt-kUlx.js → pagination-CR1nxnnq.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-CTRM0Xou.js → pagination.stories-qXmBYwYc.js} +2 -2
- 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-DZTfimDf.js +10 -0
- package/dist/storybook/assets/{preview-ZgLLfBPl.js → preview-_21fnvwa.js} +2 -2
- package/dist/storybook/assets/{preview-CtQzjqBP.js → preview-dBqj-M8_.js} +1 -1
- package/dist/storybook/assets/projects.stories-BPm6ucAe.js +47 -0
- package/dist/storybook/assets/{radio-button-DmDuw4DA.js → radio-button-C4ljBRED.js} +1 -1
- package/dist/storybook/assets/radio-button.stories-D1rWr6ms.js +61 -0
- package/dist/storybook/assets/radio-button.test-case.stories-DglmHlWs.js +11 -0
- package/dist/storybook/assets/{reservoirs.stories-B12tIrmZ.js → reservoirs.stories-r1Ip90kJ.js} +2 -2
- package/dist/storybook/assets/{rich-text-input-dDjxXFl-.css → rich-text-input-BJfL0Me_.css} +1 -1
- package/dist/storybook/assets/{rich-text-input.stories-DkaOBgbE.js → rich-text-input.stories-DwaseXZv.js} +3 -3
- package/dist/storybook/assets/{row.stories-msEoNdGI.js → row.stories-BrPMTnKK.js} +2 -2
- package/dist/storybook/assets/select-BmYXTl_0.css +1 -0
- package/dist/storybook/assets/select-Cwks-WA0.js +61 -0
- package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
- package/dist/storybook/assets/select.stories-DjGSNDXK.js +498 -0
- package/dist/storybook/assets/select.stories-data-DxgWKlU6.js +1 -0
- package/dist/storybook/assets/select.test-case.stories-B6On-PjA.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-umpPYjkq.js → site.stories-BnWmALGd.js} +2 -2
- 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-iVsvoMpy.js +86 -0
- package/dist/storybook/assets/{table.stories-Clltxls0.js → table.stories-DmGMjcFw.js} +2 -2
- package/dist/storybook/assets/{table.stories-data-C3vJedB1.js → table.stories-data-C7mC5R8Q.js} +1 -1
- package/dist/storybook/assets/{tabs-C3NG6m9W.js → tabs-BoToLVEP.js} +1 -1
- package/dist/storybook/assets/tabs.stories-B52iEaHf.js +30 -0
- 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-CsrYTGde.js → title.stories-D2LDNgbT.js} +3 -3
- package/dist/storybook/assets/{toaster-BoBcvmf9.js → toaster-O8ftrUAJ.js} +1 -1
- package/dist/storybook/assets/toaster.stories-CdpwLBSo.js +84 -0
- package/dist/storybook/assets/toaster.test-case.stories-BhWnh4Cd.js +6 -0
- package/dist/storybook/assets/toggle.stories-BAislK3I.js +106 -0
- package/dist/storybook/assets/toggle.test-case.stories-CeUwdhGD.js +36 -0
- package/dist/storybook/assets/{tooltip.test-case.stories-CHibN8rC.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-Byipu-z0.js +10 -0
- package/dist/storybook/assets/unit-input.stories-CChVbxmI.js +198 -0
- package/dist/storybook/assets/unit-input.test-case.stories-BwKiucyc.js +220 -0
- package/dist/storybook/assets/unit-table.stories-B7rN0MF0.js +152 -0
- package/dist/storybook/assets/unit-table.test-case.stories-BIMbgiTz.js +1 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/button-DHevvVBE.js +0 -1
- package/dist/storybook/assets/button-fAxt_G4d.css +0 -1
- package/dist/storybook/assets/check-box.stories-DfbWw6mD.js +0 -126
- package/dist/storybook/assets/drawer-DOWJp9T4.js +0 -3
- package/dist/storybook/assets/drawer-DhrjYsQu.css +0 -1
- package/dist/storybook/assets/footer.stories-DgjDE_JR.js +0 -3
- package/dist/storybook/assets/form.stories-BrUnmw7R.js +0 -49
- package/dist/storybook/assets/formation.stories-BT8VrcqV.js +0 -74
- package/dist/storybook/assets/iframe-B8VgeFPT.js +0 -2
- package/dist/storybook/assets/initialize-context-DOqEe1Xq.js +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.stories-xWX80Eh2.js +0 -84
- 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.stories-LhoWfDE6.js +0 -220
- package/dist/storybook/assets/number-input.stories-DhCjZ37u.js +0 -180
- package/dist/storybook/assets/popover.stories-CGm0M5fv.js +0 -10
- package/dist/storybook/assets/projects.stories-BQswWVCx.js +0 -47
- package/dist/storybook/assets/radio-button.stories-5gvV0LD0.js +0 -71
- package/dist/storybook/assets/select-DnRuRG_N.js +0 -61
- package/dist/storybook/assets/select-H-9tdhwc.css +0 -1
- package/dist/storybook/assets/select.input-D0UkAPd9.js +0 -1
- package/dist/storybook/assets/select.stories-B9w9ONzj.js +0 -579
- 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-5Y5KPNSk.js +0 -86
- package/dist/storybook/assets/table-B8ojy8Nj.css +0 -1
- package/dist/storybook/assets/tabs.stories-dsXjRHJy.js +0 -30
- package/dist/storybook/assets/textarea-H-YTEwr8.css +0 -1
- package/dist/storybook/assets/toaster.stories-HO4VBTy-.js +0 -89
- package/dist/storybook/assets/toggle.stories-qTHFTXxI.js +0 -141
- package/dist/storybook/assets/unit-input.stories-QnEpR0rY.js +0 -426
- package/dist/storybook/assets/unit-table.stories-BZCc0yfc.js +0 -152
|
@@ -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-CLt-kUlx.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-Bpg4Yqmo.js";import{S as Ge}from"./select-DnRuRG_N.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_k0mvt_1{background-color:transparent;border-radius:inherit!important;height:var(--size);min-height:100%}._inputInTable_k0mvt_1:not(:hover):not(._error_k0mvt_7):not(._warning_k0mvt_7){border-color:transparent}._inputInTable_k0mvt_1:not(:focus){box-shadow:none}._inputHover_k0mvt_13{position:relative;border-color:var(--color-border-hover);z-index:2}._inputFocus_k0mvt_18{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputError_k0mvt_25,._inputWarning_k0mvt_26{position:relative}._inputError_k0mvt_25{z-index:2;border-color:var(--color-border-error);color:var(--color-text-error)!important;background-color:var(--color-background-error-muted)}._inputError_k0mvt_25:hover{border-color:var(--color-border-error-hover)!important}._inputError_k0mvt_25:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputWarning_k0mvt_26{z-index:1;border-color:var(--color-border-warning);color:var(--color-text-warning)!important;background-color:var(--color-background-warning-muted)}._inputWarning_k0mvt_26:hover{border-color:var(--color-border-warning-hover)!important}._inputWarning_k0mvt_26:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputDisabled_k0mvt_61{pointer-events:none;background-color:var(--color-background-disabled);color:var(--color-text-muted);box-shadow:none}._hideScrollbars_k0mvt_67{scrollbar-width:none;-ms-overflow-style:none}._hideScrollbars_k0mvt_67::-webkit-scrollbar{display:none}:root{--color-background-table-header: var(--color-neutral-150);--color-background-table-row-tinted: var(--color-neutral-50)}html[data-theme=dark]{--color-background-table-header: var(--color-neutral-800);--color-background-table-row-tinted: var(--color-neutral-800)}._wrapper_k0mvt_85{border-radius:inherit;max-height:100%;max-width:100%;display:flex;flex-direction:column;overflow:hidden}._wrapper_k0mvt_85._bordered_k0mvt_93{border-radius:var(--border-radius);border:1px solid var(--color-border);box-shadow:var(--shadow-card)}._scroll_k0mvt_98{overflow-y:auto;border-radius:inherit;flex:1;min-height:0}._scroll_k0mvt_98:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}._table_k0mvt_108{background:var(--color-background-raised);color:var(--color-text);border-collapse:separate;border-spacing:0;border-radius:inherit;width:100%;font-variant-numeric:tabular-nums}._table_k0mvt_108>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}._table_k0mvt_108>:first-child>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}._table_k0mvt_108>:first-child>:first-child>:first-child{border-top-left-radius:inherit}._table_k0mvt_108>:first-child>:first-child>:last-child{border-top-right-radius:inherit}._table_k0mvt_108>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}._table_k0mvt_108>:last-child>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}._table_k0mvt_108>:last-child>:last-child>:first-child{border-bottom-left-radius:inherit}._table_k0mvt_108>:last-child>:last-child>:last-child{border-bottom-right-radius:inherit}th,td{padding:var(--padding-input)!important;height:var(--size);background:inherit;border-color:var(--color-border);border-style:solid;border-width:0}th:not(:first-child),td:not(:first-child){border-left-width:1px}._table_k0mvt_108>*:not(:last-child)>tr th,._table_k0mvt_108>*:not(:last-child)>tr td,._table_k0mvt_108>*:last-child>tr:not(:last-child) th,._table_k0mvt_108>*:last-child>tr:not(:last-child) td{border-bottom-width:1px}@-moz-document url-prefix(){tr{height:var(--size)}td,th{height:100%}}thead{position:sticky;top:0;overflow:hidden;z-index:5}thead tr{background-color:var(--color-background-table-header)}tbody{overflow:hidden}tbody tr{background-color:var(--color-background-raised)}._striped_k0mvt_188 tbody tr:nth-child(2n){background-color:var(--color-background-table-row-tinted)}._title_zn5s7_1{background-color:var(--color-background-cardheader);border-bottom:1px solid var(--color-border);padding:var(--padding-xxs) var(--padding-sm);display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;border-top-left-radius:inherit;border-top-right-radius:inherit;flex-shrink:0}._footer_4sumy_1{background-color:var(--color-background-table-header);z-index:4;overflow:hidden;flex-shrink:0}._section_4sumy_7{padding:var(--padding-input);display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--color-border)}._clickableRow_1ki29_1{cursor:pointer}._hoverableRow_1ki29_4:not(._rowActive_1ki29_4):hover,._clickableRow_1ki29_1:not(._rowActive_1ki29_4):hover{background-color:var(--color-background-listitem-hover)!important}._expandableRow_1ki29_8._flush_1ki29_8{padding:0!important;height:auto!important}._errorRow_1ki29_12{background-color:var(--color-background-error-muted)!important}._warningRow_1ki29_15{background-color:var(--color-background-warning-muted)!important}._rowActive_1ki29_4{position:relative;background-color:var(--color-background-listitem-active)!important}._rowActive_1ki29_4:after{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;border-top-left-radius:inherit;border-bottom-left-radius:inherit;transition:background .3s;background:var(--color-background-primary)}._dragIconCell_1ki29_34{width:var(--size);min-width:var(--size);position:relative}._dragIcon_1ki29_34{display:flex;align-items:center;justify-content:center;position:absolute;top:0;right:0;bottom:0;left:0;color:var(--color-text-faint)}._dragIcon_1ki29_34:hover{color:var(--color-text-primary-hover)}._dragIcon_1ki29_34:active{color:var(--color-text-primary-active)}._inputInTable_9hq13_1{background-color:transparent;border-radius:inherit!important;height:var(--size);min-height:100%}._inputInTable_9hq13_1:not(:hover):not(._error_9hq13_7):not(._warning_9hq13_7){border-color:transparent}._inputInTable_9hq13_1:not(:focus){box-shadow:none}._inputHover_9hq13_13{position:relative;border-color:var(--color-border-hover);z-index:2}._inputFocus_9hq13_18{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputError_9hq13_25,._inputWarning_9hq13_26{position:relative}._inputError_9hq13_25{z-index:2;border-color:var(--color-border-error);color:var(--color-text-error)!important;background-color:var(--color-background-error-muted)}._inputError_9hq13_25:hover{border-color:var(--color-border-error-hover)!important}._inputError_9hq13_25:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputWarning_9hq13_26{z-index:1;border-color:var(--color-border-warning);color:var(--color-text-warning)!important;background-color:var(--color-background-warning-muted)}._inputWarning_9hq13_26:hover{border-color:var(--color-border-warning-hover)!important}._inputWarning_9hq13_26:focus{position:relative;outline:none!important;border-color:var(--color-border-focus)!important;box-shadow:var(--shadow-focus);z-index:3}._inputDisabled_9hq13_61{pointer-events:none;background-color:var(--color-background-disabled);color:var(--color-text-muted);box-shadow:none}._hideScrollbars_9hq13_67{scrollbar-width:none;-ms-overflow-style:none}._hideScrollbars_9hq13_67::-webkit-scrollbar{display:none}._cell_9hq13_77 a{cursor:pointer;color:var(--color-text-primary)}._cell_9hq13_77 a:hover{color:var(--color-text-primary-hover)}._cell_9hq13_77 a:active{color:var(--color-text-primary-active)}._cell_9hq13_77 a._disabledLink_9hq13_87{color:var(--color-text-faint)!important;cursor:default!important}._inputWrapper_9hq13_91{height:100%;border-radius:inherit}._inputWrapper_9hq13_91>span,._inputWrapper_9hq13_91>span>span,._inputWrapper_9hq13_91>span>span>div{height:100%;border-radius:inherit}._inputWrapper_9hq13_91>div,._inputWrapper_9hq13_91>div>span{height:100%;border-radius:inherit}._numberInputWrapper_9hq13_106>span,._numberInputWrapper_9hq13_106>span>div,._numberInputWrapper_9hq13_106>span>div>span{display:block;height:100%;border-radius:inherit}._breakWord_9hq13_113{word-break:break-word}._inputCell_9hq13_116{padding:0!important}._sliderCell_9hq13_119{padding-top:0!important;padding-bottom:0!important}._staticCell_9hq13_123{padding:0!important}._staticCell_9hq13_123 ._staticCellContent_9hq13_126{line-height:1.25;min-height:100%;padding:var(--padding-input);position:relative;border-radius:inherit;display:flex;align-items:center}tbody ._staticCell_9hq13_123 ._staticCellContent_9hq13_126{color:var(--color-text-muted)}._staticCell_9hq13_123 ._staticCellContent_9hq13_126._error_9hq13_7,._staticCell_9hq13_123 ._staticCellContent_9hq13_126._warning_9hq13_7{border:1px solid transparent}._staticCell_9hq13_123 ._staticCellContent_9hq13_126._error_9hq13_7{background-color:var(--color-background-error-muted)}._staticCell_9hq13_123 ._staticCellContent_9hq13_126._warning_9hq13_7{background-color:var(--color-background-warning-muted)}._staticCell_9hq13_123 ._staticCellContent_9hq13_126._unit_9hq13_148{font-weight:400}._sortingCell_9hq13_151 ._staticCellContent_9hq13_126{position:relative;padding-right:calc(var(--size) + var(--padding-xxs))!important;cursor:pointer!important}._sortingCell_9hq13_151 ._staticCellContent_9hq13_126:hover{background-color:#0000000d!important}[data-theme=dark] ._sortingCell_9hq13_151 ._staticCellContent_9hq13_126:hover{background-color:#ffffff1a!important}._sortingCell_9hq13_151 ._sortingCellIcon_9hq13_162{font-size:var(--size-xs);position:absolute;right:var(--padding-input-x);top:50%;transform:translateY(-50%);display:flex}._sortingCell_9hq13_151 ._sortingCellIcon_9hq13_162>*{display:flex}._icon_9hq13_173{display:inline-flex;margin-left:var(--padding-xxs)}._checkBoxCell_9hq13_177{padding-block:0!important;width:var(--size)}._iconCellWrapper_9hq13_181{display:flex;justify-content:center}._actionsCell_9hq13_185{width:var(--size-sm);padding:0 calc((var(--size) - var(--size-sm)) / 2)!important;position:sticky;right:0;background:inherit;z-index:4}._rightAligned_9hq13_193{text-align:right!important}._rightAligned_9hq13_193 ._staticCellContent_9hq13_126{justify-content:flex-end}._centerAligned_9hq13_199{text-align:center!important}._centerAligned_9hq13_199 ._staticCellContent_9hq13_126{justify-content:center}._leftAligned_9hq13_205{text-align:left!important}._popover_9hq13_208{padding:var(--padding-input)}._disabledPointerEvents_9hq13_211{pointer-events:none}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as I}from"./index-DhsZuJvc.js";import{T as b}from"./tabs-C3NG6m9W.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./lodash-c4VUpsOs.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./types-BmbYqTX_.js";const Q={title:"Navigation/Tabs",component:b,args:{name:"example",options:[{label:"Tab",value:0},{label:"Tab",value:1},{label:"With Badge",value:2,badge:"3"},{label:"Invalid",value:3,invalid:!0},{label:"Disabled",value:4,disabled:!0},{label:"Hidden tab",value:5,hidden:!0}],value:0}},s=i=>e.jsx(b,{...i}),d=s.bind({}),r=s.bind({});r.args={children:[e.jsx("div",{label:"Tab 0",children:e.jsx("h3",{children:"Tab 0 Content"})}),e.jsx("div",{label:"Tab 1",hidden:!0,children:e.jsx("h3",{children:"Tab 1 Content"})}),e.jsx("div",{label:"Tab 2",disabled:!0,children:e.jsx("h3",{children:"Tab 2 Content"})}),e.jsx("div",{label:"Tab 3",children:e.jsx("h3",{children:"Tab 3 Content"})}),e.jsx("div",{label:"Tab 4",children:e.jsx("h3",{children:"Tab 4 Content"})})]};const l=s.bind({});l.args={margin:!1};const a=s.bind({});a.parameters={layout:"fullscreen",docs:{description:{story:"When you want the divider to fill the edges of its container."}}};a.args={padding:!0};const t=s.bind({});t.args={options:[{label:"Tab 0",value:0},{label:"Tab 1",value:1},{label:"Tab 2",value:2},{label:"Tab 3",value:3,right:!0},{label:"Tab 4",value:4,right:!0}]};const o=()=>{const i=[{label:"Strawberries",value:"strawberries"},{label:"Bananas",value:"bananas"},{label:"Apples",value:"apples",disabled:!0},{label:"Pomegranates",value:"pomegranates"}],[p,D]=I.useState(i[0]);return e.jsxs(e.Fragment,{children:[e.jsx(b,{name:"example",value:p,options:i,onChange:c=>{const{value:H,label:z}=(c==null?void 0:c.target)??{};D({value:H,label:z})}}),e.jsxs("span",{children:["Eating ",p.value,"..."]})]})},n=s.bind({});n.args={options:[{label:"Title Case Label",value:0},{label:"Mixed case label",value:1},{label:"lower case label",value:2}]};o.__docgenInfo={description:"",methods:[],displayName:"Managed"};var u,m,g;d.parameters={...d.parameters,docs:{...(u=d.parameters)==null?void 0:u.docs,source:{originalSource:"args => <Tabs {...args} />",...(g=(m=d.parameters)==null?void 0:m.docs)==null?void 0:g.source}}};var T,v,h;r.parameters={...r.parameters,docs:{...(T=r.parameters)==null?void 0:T.docs,source:{originalSource:"args => <Tabs {...args} />",...(h=(v=r.parameters)==null?void 0:v.docs)==null?void 0:h.source}}};var x,j,S;l.parameters={...l.parameters,docs:{...(x=l.parameters)==null?void 0:x.docs,source:{originalSource:"args => <Tabs {...args} />",...(S=(j=l.parameters)==null?void 0:j.docs)==null?void 0:S.source}}};var C,f,w;a.parameters={...a.parameters,docs:{...(C=a.parameters)==null?void 0:C.docs,source:{originalSource:"args => <Tabs {...args} />",...(w=(f=a.parameters)==null?void 0:f.docs)==null?void 0:w.source}}};var M,y,E;t.parameters={...t.parameters,docs:{...(M=t.parameters)==null?void 0:M.docs,source:{originalSource:"args => <Tabs {...args} />",...(E=(y=t.parameters)==null?void 0:y.docs)==null?void 0:E.source}}};var _,A,N;o.parameters={...o.parameters,docs:{...(_=o.parameters)==null?void 0:_.docs,source:{originalSource:`() => {
|
|
2
|
-
const options = [{
|
|
3
|
-
label: 'Strawberries',
|
|
4
|
-
value: 'strawberries'
|
|
5
|
-
}, {
|
|
6
|
-
label: 'Bananas',
|
|
7
|
-
value: 'bananas'
|
|
8
|
-
}, {
|
|
9
|
-
label: 'Apples',
|
|
10
|
-
value: 'apples',
|
|
11
|
-
disabled: true
|
|
12
|
-
}, {
|
|
13
|
-
label: 'Pomegranates',
|
|
14
|
-
value: 'pomegranates'
|
|
15
|
-
}];
|
|
16
|
-
const [selectedTab, setSelectedTab] = useState(options[0]);
|
|
17
|
-
return <>
|
|
18
|
-
<Tabs name="example" value={selectedTab} options={options} onChange={evt => {
|
|
19
|
-
const {
|
|
20
|
-
value,
|
|
21
|
-
label
|
|
22
|
-
} = ((evt?.target ?? {}) as any);
|
|
23
|
-
setSelectedTab({
|
|
24
|
-
value,
|
|
25
|
-
label
|
|
26
|
-
});
|
|
27
|
-
}} />
|
|
28
|
-
<span>Eating {selectedTab.value}...</span>
|
|
29
|
-
</>;
|
|
30
|
-
}`,...(N=(A=o.parameters)==null?void 0:A.docs)==null?void 0:N.source}}};var P,W,B;n.parameters={...n.parameters,docs:{...(P=n.parameters)==null?void 0:P.docs,source:{originalSource:"args => <Tabs {...args} />",...(B=(W=n.parameters)==null?void 0:W.docs)==null?void 0:B.source}}};const U=["Default","WithChildren","NoMargin","HorizontalPadding","Alignment","Managed","TestTitleCase"];export{t as Alignment,d as Default,a as HorizontalPadding,o as Managed,l as NoMargin,n as TestTitleCase,r as WithChildren,U as __namedExportsOrder,Q as default};
|
|
@@ -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,89 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./jsx-runtime-eps93zm2.js";import{w as ss,e as l,u as y,a as E}from"./index-DMAnyMX5.js";import{G as X}from"./grid-DRkC-bt8.js";import{T as w}from"./text-B3-TSWok.js";import{F as Z}from"./flex-EllkLxgO.js";import{t as S,d as b}from"./toaster-BoBcvmf9.js";import{B as t}from"./button-DHevvVBE.js";import{S as $}from"./spacer-BWoNR27H.js";import{a as C}from"./message-Y48EomV-.js";import"./index-DhsZuJvc.js";import"./index-CF7H4eMJ.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./index-Bk2sglWO.js";import"./toaster-7wnI6hqB.js";import"./index-CUZDtIZe.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 es={type:C.SUCCESS,icon:!0,heading:"Heading",content:"Great results"},os={type:C.ERROR,icon:!0,heading:"Heading",content:"An error has happened",details:"Bad input data lorem ipsum dolor est compendum lorem ipsum."},ts={type:C.WARNING,icon:!0,heading:"Heading",content:"Warning message"},as={type:C.INFO,icon:!0,heading:"Heading",content:"Long content lorem ipsum dolor est compendum lorem ipsum."},Ds={title:"Modals/Toaster",parameters:{docs:{story:{inline:!1,iframeHeight:400}}},source:{type:"code"},args:{id:void 0,message:as,autoClose:6e3,onClose:()=>{}}},h=e=>s.jsx(t,{onClick:()=>S({...e,onClose:()=>console.log("toast closed")}),label:"Show toast"}),T=h.bind({}),u=h.bind({});u.args={message:es};const d=h.bind({});d.args={message:ts};const m=h.bind({});m.args={message:os};const i=()=>s.jsx(t,{label:"Show Toast",onClick:()=>{const e=Math.random()>=.5;S({message:{type:e?"Success":"Error",icon:!0,content:e?"Success":"Error"},onClose:()=>console.log("toast closed"),id:"uniqueId"})}});i.parameters={docs:{iframeHeight:200,description:{story:"Pass a unique `id` in the `toast` object to prevent duplicates. Successive toasts with the same ID will update the existing toast."}}};const p=()=>{const e="sessionExpiring",a={type:"Info",content:s.jsxs(X,{children:[s.jsx(w,{bold:!0,children:"You will be signed out soon"}),s.jsx(w,{children:"For your security, you will be automatically signed out in 30 minutes unless you extend your session."}),s.jsx($,{height:"var(--padding-xxs)"}),s.jsxs(Z,{gap:"var(--padding-xs)",children:[s.jsx(t,{label:"Extend session",small:!0,colored:"success",onClick:()=>b(e)}),s.jsx(t,{label:"Dismiss",small:!0,onClick:()=>b(e)})]})]})};return s.jsx(t,{label:"Show Toast",onClick:()=>S({message:a,autoClose:!1,id:e})})},g=()=>{const e="sessionExpiringSoon",a={type:"Error",content:s.jsxs(X,{children:[s.jsx(w,{bold:!0,children:"You will be signed out very soon"}),s.jsx(w,{children:"For your security, you will be automatically signed out in 30 minutes unless you extend your session."}),s.jsx($,{height:"var(--padding-xxs)"}),s.jsxs(Z,{gap:"var(--padding-xs)",children:[s.jsx(t,{label:"Extend session",small:!0,colored:"success",onClick:()=>b(e)}),s.jsx(t,{label:"Dismiss",small:!0,onClick:()=>b(e)})]})]})};return s.jsx(t,{label:"Show Toast",onClick:()=>S({message:a,autoClose:!1,id:e})})},x=()=>{const e={type:"Success",content:"Your session has been extended for 1 hour"};return s.jsx(t,{label:"Show Toast",onClick:()=>S({message:e})})},c=h.bind({});c.args={id:"testId",autoClose:50};c.play=async({canvasElement:e,step:a})=>{const o=e.parentElement?ss(e.parentElement):null;await l(o).toBeTruthy(),o&&(await a("Toast should appear when triggered",async()=>{const r=o.getByText("Show toast");await y.click(r);const n=o.getByRole("alert");await l(n).toBeInTheDocument()}),await a("Duplicate toasts shouldn't be created",async()=>{const r=o.getByText("Show toast");await y.click(r);const n=o.queryAllByRole("alert");await l(n).toHaveLength(1)}),await a("Toast should disappear when close button pressed",async()=>{const r=o.getByRole("alert"),n=o.getByTestId("testId-dismiss");await y.click(n),await E(()=>l(r).not.toBeInTheDocument(),{timeout:2e3})}),await a("Toast should automatically close",async()=>{const r=o.getByText("Show toast");await y.click(r);const n=o.getByRole("alert");await E(()=>l(n).not.toBeInTheDocument(),{timeout:2e3})}))};i.__docgenInfo={description:"",methods:[],displayName:"PreventDuplicates"};p.__docgenInfo={description:"",methods:[],displayName:"SessionExpiring"};g.__docgenInfo={description:"",methods:[],displayName:"SessionExpiringSoon"};x.__docgenInfo={description:"",methods:[],displayName:"SessionExtended"};var I,f,B;T.parameters={...T.parameters,docs:{...(I=T.parameters)==null?void 0:I.docs,source:{originalSource:`args => {
|
|
2
|
-
return <Button onClick={() => toast({
|
|
3
|
-
...args,
|
|
4
|
-
onClose: () => console.log('toast closed')
|
|
5
|
-
})} label="Show toast" />;
|
|
6
|
-
}`,...(B=(f=T.parameters)==null?void 0:f.docs)==null?void 0:B.source}}};var k,D,j;u.parameters={...u.parameters,docs:{...(k=u.parameters)==null?void 0:k.docs,source:{originalSource:`args => {
|
|
7
|
-
return <Button onClick={() => toast({
|
|
8
|
-
...args,
|
|
9
|
-
onClose: () => console.log('toast closed')
|
|
10
|
-
})} label="Show toast" />;
|
|
11
|
-
}`,...(j=(D=u.parameters)==null?void 0:D.docs)==null?void 0:j.source}}};var _,v,A;d.parameters={...d.parameters,docs:{...(_=d.parameters)==null?void 0:_.docs,source:{originalSource:`args => {
|
|
12
|
-
return <Button onClick={() => toast({
|
|
13
|
-
...args,
|
|
14
|
-
onClose: () => console.log('toast closed')
|
|
15
|
-
})} label="Show toast" />;
|
|
16
|
-
}`,...(A=(v=d.parameters)==null?void 0:v.docs)==null?void 0:A.source}}};var O,F,R;m.parameters={...m.parameters,docs:{...(O=m.parameters)==null?void 0:O.docs,source:{originalSource:`args => {
|
|
17
|
-
return <Button onClick={() => toast({
|
|
18
|
-
...args,
|
|
19
|
-
onClose: () => console.log('toast closed')
|
|
20
|
-
})} label="Show toast" />;
|
|
21
|
-
}`,...(R=(F=m.parameters)==null?void 0:F.docs)==null?void 0:R.source}}};var G,M,H;i.parameters={...i.parameters,docs:{...(G=i.parameters)==null?void 0:G.docs,source:{originalSource:`() => <Button label="Show Toast" onClick={() => {
|
|
22
|
-
const isSuccess = Math.random() >= 0.5;
|
|
23
|
-
toast({
|
|
24
|
-
message: ({
|
|
25
|
-
type: isSuccess ? 'Success' : 'Error',
|
|
26
|
-
icon: true,
|
|
27
|
-
content: isSuccess ? 'Success' : 'Error'
|
|
28
|
-
} as IMessageType),
|
|
29
|
-
onClose: () => console.log('toast closed'),
|
|
30
|
-
id: 'uniqueId'
|
|
31
|
-
});
|
|
32
|
-
}} />`,...(H=(M=i.parameters)==null?void 0:M.docs)==null?void 0:H.source}}};var N,Y,W;p.parameters={...p.parameters,docs:{...(N=p.parameters)==null?void 0:N.docs,source:{originalSource:`() => {
|
|
33
|
-
const TOAST_ID = 'sessionExpiring';
|
|
34
|
-
const message = ({
|
|
35
|
-
type: 'Info',
|
|
36
|
-
content: <Grid>
|
|
37
|
-
<Text bold>You will be signed out soon</Text>
|
|
38
|
-
<Text>
|
|
39
|
-
For your security, you will be automatically signed out in 30 minutes
|
|
40
|
-
unless you extend your session.
|
|
41
|
-
</Text>
|
|
42
|
-
<Spacer height="var(--padding-xxs)" />
|
|
43
|
-
<Flex gap="var(--padding-xs)">
|
|
44
|
-
<Button label="Extend session" small colored="success" onClick={() => dismissToast(TOAST_ID)} />
|
|
45
|
-
<Button label="Dismiss" small onClick={() => dismissToast(TOAST_ID)} />
|
|
46
|
-
</Flex>
|
|
47
|
-
</Grid>
|
|
48
|
-
} as IMessageType);
|
|
49
|
-
return <Button label="Show Toast" onClick={() => toast({
|
|
50
|
-
message,
|
|
51
|
-
autoClose: false,
|
|
52
|
-
id: TOAST_ID
|
|
53
|
-
})} />;
|
|
54
|
-
}`,...(W=(Y=p.parameters)==null?void 0:Y.docs)==null?void 0:W.source}}};var q,P,L;g.parameters={...g.parameters,docs:{...(q=g.parameters)==null?void 0:q.docs,source:{originalSource:`() => {
|
|
55
|
-
const TOAST_ID = 'sessionExpiringSoon';
|
|
56
|
-
const message = ({
|
|
57
|
-
type: 'Error',
|
|
58
|
-
content: <Grid>
|
|
59
|
-
<Text bold>You will be signed out very soon</Text>
|
|
60
|
-
<Text>
|
|
61
|
-
For your security, you will be automatically signed out in 30 minutes
|
|
62
|
-
unless you extend your session.
|
|
63
|
-
</Text>
|
|
64
|
-
<Spacer height="var(--padding-xxs)" />
|
|
65
|
-
<Flex gap="var(--padding-xs)">
|
|
66
|
-
<Button label="Extend session" small colored="success" onClick={() => dismissToast(TOAST_ID)} />
|
|
67
|
-
<Button label="Dismiss" small onClick={() => dismissToast(TOAST_ID)} />
|
|
68
|
-
</Flex>
|
|
69
|
-
</Grid>
|
|
70
|
-
} as IMessageType);
|
|
71
|
-
return <Button label="Show Toast" onClick={() => toast({
|
|
72
|
-
message,
|
|
73
|
-
autoClose: false,
|
|
74
|
-
id: TOAST_ID
|
|
75
|
-
})} />;
|
|
76
|
-
}`,...(L=(P=g.parameters)==null?void 0:P.docs)==null?void 0:L.source}}};var U,z,J;x.parameters={...x.parameters,docs:{...(U=x.parameters)==null?void 0:U.docs,source:{originalSource:`() => {
|
|
77
|
-
const message = ({
|
|
78
|
-
type: 'Success',
|
|
79
|
-
content: 'Your session has been extended for 1 hour'
|
|
80
|
-
} as IMessageType);
|
|
81
|
-
return <Button label="Show Toast" onClick={() => toast({
|
|
82
|
-
message
|
|
83
|
-
})} />;
|
|
84
|
-
}`,...(J=(z=x.parameters)==null?void 0:z.docs)==null?void 0:J.source}}};var K,Q,V;c.parameters={...c.parameters,docs:{...(K=c.parameters)==null?void 0:K.docs,source:{originalSource:`args => {
|
|
85
|
-
return <Button onClick={() => toast({
|
|
86
|
-
...args,
|
|
87
|
-
onClose: () => console.log('toast closed')
|
|
88
|
-
})} label="Show toast" />;
|
|
89
|
-
}`,...(V=(Q=c.parameters)==null?void 0:Q.docs)==null?void 0:V.source}}};const js=["Default","Success","Warning","Error","PreventDuplicates","SessionExpiring","SessionExpiringSoon","SessionExtended","Test"];export{T as Default,m as Error,i as PreventDuplicates,p as SessionExpiring,g as SessionExpiringSoon,x as SessionExtended,u as Success,c as Test,d as Warning,js as __namedExportsOrder,Ds as default};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as de}from"./index-DhsZuJvc.js";import{w as oe,u as j,e as A}from"./index-DMAnyMX5.js";import{F as f}from"./flex-EllkLxgO.js";import{T as C}from"./text-B3-TSWok.js";import{T as x}from"./toggle-BbFVf61v.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./help-icon-Buhx5nl6.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";const{useArgs:le}=__STORYBOOK_MODULE_PREVIEW_API__,De={title:"Forms/Toggle",component:x,args:{label:"Label"}},s=a=>{const[{checked:r},t]=le(),n=()=>{t({checked:!r})};return e.jsx(x,{...a,onChange:n})},T=s.bind({}),d=s.bind({});d.args={disabled:!0};const l=s.bind({});l.args={checked:!0,disabled:!0};const g=s.bind({});g.args={small:!0};const p=s.bind({});p.args={label:null};const i=s.bind({});i.args={helpText:"Help text"};const h=s.bind({});h.args={onClickHelp:()=>console.log("Help clicked")};const u=()=>e.jsxs(e.Fragment,{children:[e.jsx(x,{display:"block",label:e.jsxs(f,{justifyContent:"space-between",wrap:!1,gap:!0,children:[e.jsx(C,{bold:!0,children:"Label"}),e.jsx(C,{success:!0,children:"Released yesterday"})]}),onChange:()=>{}}),e.jsx(x,{label:e.jsxs(f,{justifyContent:"space-between",wrap:!1,gap:!0,children:[e.jsx(C,{bold:!0,children:"Label"}),e.jsx(C,{success:!0,children:"Released yesterday"})]}),onChange:()=>{}})]}),m=()=>{const[a,r]=de.useState(!1);return e.jsx(x,{name:"name",label:"Label",checked:a,onChange:t=>{const{name:n,value:b,checked:y}=t.target;r(y),console.log(n,b,y)}})},k=s.bind({});k.args={helpText:"Help text",disabled:!0};const c=s.bind({});c.args={testId:"testId"};c.play=async({canvasElement:a,step:r})=>{const t=oe(a);await r("Clicking checkbox should toggle it",async()=>{const n=t.getByTestId("testId"),b=n.querySelector("input");await j.click(n),await A(b).toBeChecked(),await j.click(n),await A(b).not.toBeChecked()})};const o=s.bind({});o.args={testId:"testId",disabled:!0};o.play=async({canvasElement:a,step:r})=>{const t=oe(a);await r("Clicking disabled checkbox shouldn't toggle it",async()=>{const n=t.getByTestId("testId");await n.click(),await A(n.querySelector("input")).not.toBeChecked()})};u.__docgenInfo={description:"",methods:[],displayName:"Display"};m.__docgenInfo={description:"",methods:[],displayName:"TestClickevt"};var S,w,D;T.parameters={...T.parameters,docs:{...(S=T.parameters)==null?void 0:S.docs,source:{originalSource:`args => {
|
|
2
|
-
const [{
|
|
3
|
-
checked
|
|
4
|
-
}, updateArgs] = useArgs();
|
|
5
|
-
const handleChange = () => {
|
|
6
|
-
updateArgs({
|
|
7
|
-
checked: !checked
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
return <Toggle
|
|
11
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
12
|
-
{...args} onChange={handleChange} />;
|
|
13
|
-
}`,...(D=(w=T.parameters)==null?void 0:w.docs)==null?void 0:D.source}}};var _,I,v;d.parameters={...d.parameters,docs:{...(_=d.parameters)==null?void 0:_.docs,source:{originalSource:`args => {
|
|
14
|
-
const [{
|
|
15
|
-
checked
|
|
16
|
-
}, updateArgs] = useArgs();
|
|
17
|
-
const handleChange = () => {
|
|
18
|
-
updateArgs({
|
|
19
|
-
checked: !checked
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
return <Toggle
|
|
23
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
24
|
-
{...args} onChange={handleChange} />;
|
|
25
|
-
}`,...(v=(I=d.parameters)==null?void 0:I.docs)==null?void 0:v.source}}};var H,F,L;l.parameters={...l.parameters,docs:{...(H=l.parameters)==null?void 0:H.docs,source:{originalSource:`args => {
|
|
26
|
-
const [{
|
|
27
|
-
checked
|
|
28
|
-
}, updateArgs] = useArgs();
|
|
29
|
-
const handleChange = () => {
|
|
30
|
-
updateArgs({
|
|
31
|
-
checked: !checked
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
return <Toggle
|
|
35
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
|
-
{...args} onChange={handleChange} />;
|
|
37
|
-
}`,...(L=(F=l.parameters)==null?void 0:F.docs)==null?void 0:L.source}}};var E,O,R;g.parameters={...g.parameters,docs:{...(E=g.parameters)==null?void 0:E.docs,source:{originalSource:`args => {
|
|
38
|
-
const [{
|
|
39
|
-
checked
|
|
40
|
-
}, updateArgs] = useArgs();
|
|
41
|
-
const handleChange = () => {
|
|
42
|
-
updateArgs({
|
|
43
|
-
checked: !checked
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
return <Toggle
|
|
47
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
48
|
-
{...args} onChange={handleChange} />;
|
|
49
|
-
}`,...(R=(O=g.parameters)==null?void 0:O.docs)==null?void 0:R.source}}};var B,W,q;p.parameters={...p.parameters,docs:{...(B=p.parameters)==null?void 0:B.docs,source:{originalSource:`args => {
|
|
50
|
-
const [{
|
|
51
|
-
checked
|
|
52
|
-
}, updateArgs] = useArgs();
|
|
53
|
-
const handleChange = () => {
|
|
54
|
-
updateArgs({
|
|
55
|
-
checked: !checked
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
return <Toggle
|
|
59
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
60
|
-
{...args} onChange={handleChange} />;
|
|
61
|
-
}`,...(q=(W=p.parameters)==null?void 0:W.docs)==null?void 0:q.source}}};var N,P,K;i.parameters={...i.parameters,docs:{...(N=i.parameters)==null?void 0:N.docs,source:{originalSource:`args => {
|
|
62
|
-
const [{
|
|
63
|
-
checked
|
|
64
|
-
}, updateArgs] = useArgs();
|
|
65
|
-
const handleChange = () => {
|
|
66
|
-
updateArgs({
|
|
67
|
-
checked: !checked
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
return <Toggle
|
|
71
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
72
|
-
{...args} onChange={handleChange} />;
|
|
73
|
-
}`,...(K=(P=i.parameters)==null?void 0:P.docs)==null?void 0:K.source}}};var M,U,V;h.parameters={...h.parameters,docs:{...(M=h.parameters)==null?void 0:M.docs,source:{originalSource:`args => {
|
|
74
|
-
const [{
|
|
75
|
-
checked
|
|
76
|
-
}, updateArgs] = useArgs();
|
|
77
|
-
const handleChange = () => {
|
|
78
|
-
updateArgs({
|
|
79
|
-
checked: !checked
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
return <Toggle
|
|
83
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
84
|
-
{...args} onChange={handleChange} />;
|
|
85
|
-
}`,...(V=(U=h.parameters)==null?void 0:U.docs)==null?void 0:V.source}}};var Y,z,G;u.parameters={...u.parameters,docs:{...(Y=u.parameters)==null?void 0:Y.docs,source:{originalSource:`() => <>
|
|
86
|
-
<Toggle display="block" label={<Flex justifyContent="space-between" wrap={false} gap>
|
|
87
|
-
<Text bold>Label</Text>
|
|
88
|
-
<Text success>Released yesterday</Text>
|
|
89
|
-
</Flex>} onChange={() => {}} />
|
|
90
|
-
<Toggle label={<Flex justifyContent="space-between" wrap={false} gap>
|
|
91
|
-
<Text bold>Label</Text>
|
|
92
|
-
<Text success>Released yesterday</Text>
|
|
93
|
-
</Flex>} onChange={() => {}} />
|
|
94
|
-
</>`,...(G=(z=u.parameters)==null?void 0:z.docs)==null?void 0:G.source}}};var J,Q,X;m.parameters={...m.parameters,docs:{...(J=m.parameters)==null?void 0:J.docs,source:{originalSource:`() => {
|
|
95
|
-
const [checked, setChecked] = useState(false);
|
|
96
|
-
return <Toggle name="name" label="Label" checked={checked} onChange={evt => {
|
|
97
|
-
const {
|
|
98
|
-
name,
|
|
99
|
-
value,
|
|
100
|
-
checked
|
|
101
|
-
} = evt.target;
|
|
102
|
-
setChecked(checked);
|
|
103
|
-
console.log(name, value, checked);
|
|
104
|
-
}} />;
|
|
105
|
-
}`,...(X=(Q=m.parameters)==null?void 0:Q.docs)==null?void 0:X.source}}};var Z,$,ee;k.parameters={...k.parameters,docs:{...(Z=k.parameters)==null?void 0:Z.docs,source:{originalSource:`args => {
|
|
106
|
-
const [{
|
|
107
|
-
checked
|
|
108
|
-
}, updateArgs] = useArgs();
|
|
109
|
-
const handleChange = () => {
|
|
110
|
-
updateArgs({
|
|
111
|
-
checked: !checked
|
|
112
|
-
});
|
|
113
|
-
};
|
|
114
|
-
return <Toggle
|
|
115
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
116
|
-
{...args} onChange={handleChange} />;
|
|
117
|
-
}`,...(ee=($=k.parameters)==null?void 0:$.docs)==null?void 0:ee.source}}};var ne,se,ae;c.parameters={...c.parameters,docs:{...(ne=c.parameters)==null?void 0:ne.docs,source:{originalSource:`args => {
|
|
118
|
-
const [{
|
|
119
|
-
checked
|
|
120
|
-
}, updateArgs] = useArgs();
|
|
121
|
-
const handleChange = () => {
|
|
122
|
-
updateArgs({
|
|
123
|
-
checked: !checked
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
return <Toggle
|
|
127
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
128
|
-
{...args} onChange={handleChange} />;
|
|
129
|
-
}`,...(ae=(se=c.parameters)==null?void 0:se.docs)==null?void 0:ae.source}}};var re,te,ce;o.parameters={...o.parameters,docs:{...(re=o.parameters)==null?void 0:re.docs,source:{originalSource:`args => {
|
|
130
|
-
const [{
|
|
131
|
-
checked
|
|
132
|
-
}, updateArgs] = useArgs();
|
|
133
|
-
const handleChange = () => {
|
|
134
|
-
updateArgs({
|
|
135
|
-
checked: !checked
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
return <Toggle
|
|
139
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
140
|
-
{...args} onChange={handleChange} />;
|
|
141
|
-
}`,...(ce=(te=o.parameters)==null?void 0:te.docs)==null?void 0:ce.source}}};const _e=["Default","Disabled","DisabledChecked","Small","Standalone","HelpText","OnClickHelp","Display","TestClickevt","DisabledWithHelpText","Test","TestDisabled"];export{T as Default,d as Disabled,l as DisabledChecked,k as DisabledWithHelpText,u as Display,i as HelpText,h as OnClickHelp,g as Small,p as Standalone,c as Test,m as TestClickevt,o as TestDisabled,_e as __namedExportsOrder,De as default};
|