@oliasoft-open-source/react-ui-library 4.5.2 → 4.5.3-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-AkeNwthw.css → index-2LJjuVRB.css} +145 -115
- package/dist/assets/{index-Sj2bW45b.js → index-RERH5Zwo.js} +63 -61
- package/dist/global.css +43 -43
- package/dist/index.html +1 -1
- package/dist/index.js +16 -16
- package/dist/storybook/assets/{Color-6VNJS4EI-qs5_n_eY.js → Color-6VNJS4EI-V6X7Ucgp.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-wErmA9og.js → DocsRenderer-NNNQARDV-zuhZg13E.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-4HIR6TLV-QS6Mj2Xl.js → WithTooltip-4HIR6TLV-M3-dMDCM.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-SpNX_U-2.js → accordion.stories-gYUPcGk5.js} +1 -1
- package/dist/storybook/assets/{actions-Z9jDWreP.js → actions-SGexXf58.js} +1 -1
- package/dist/storybook/assets/{actions.stories-Qrio9EMy.js → actions.stories-dDCC23QK.js} +1 -1
- package/dist/storybook/assets/{afe.stories-mangk6LB.js → afe.stories-xgu_fmH5.js} +1 -1
- package/dist/storybook/assets/{badge.stories-C0MXS15j.js → badge.stories-nzXJ1qip.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-i7Ii3760.js → blowout.stories-Zmg8LDUO.js} +1 -1
- package/dist/storybook/assets/{button-7V8oA22w.js → button-IoNblLER.js} +1 -1
- package/dist/storybook/assets/{button-group-q8QKkLVU.js → button-group-KeeGgC4K.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-tLZpLTfD.js → button-group.stories-DG3i2d7K.js} +1 -1
- package/dist/storybook/assets/{button.stories-PhWmZXOu.js → button.stories-R9_1tl9l.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-8jrNvUVe.js → buttons-and-links-0W-Lo4la.js} +1 -1
- package/dist/storybook/assets/{card.stories-HzHJW6ek.js → card.stories-OtRekExg.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-wK86cYgL.js → casing-loads.stories--f3o5XWs.js} +1 -1
- package/dist/storybook/assets/{cell.stories-gI5ZjW_3.js → cell.stories-P4syiRmw.js} +1 -1
- package/dist/storybook/assets/{check-box-LZdXXKhv.js → check-box-BX5dfQFk.js} +1 -1
- package/dist/storybook/assets/{check-box.stories-0XCykxnz.js → check-box.stories-FNs72smP.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-qJxOXP1m.js → chunk-HLWAVYOI-bCq-_q2u.js} +1 -1
- package/dist/storybook/assets/{color-UO83nrE-.js → color-r3R-hw1A.js} +1 -1
- package/dist/storybook/assets/{column.stories-6OLsjlcP.js → column.stories-5pd3N4bE.js} +1 -1
- package/dist/storybook/assets/{dialog-WKHRZcjc.js → dialog-dekS0lUR.js} +1 -1
- package/dist/storybook/assets/{drawer-WuErQ5Z8.js → drawer-TM-jK3WR.js} +1 -1
- package/dist/storybook/assets/{drawer.stories-RFRPs_pQ.js → drawer.stories-Rz_d8D90.js} +1 -1
- package/dist/storybook/assets/{empty.stories-lva3DbfI.js → empty.stories-KIByp315.js} +1 -1
- package/dist/storybook/assets/{field-eknsj_Ll.js → field-kOZPBHf6.js} +1 -1
- package/dist/storybook/assets/{field.stories-RmhJ16HT.js → field.stories-aEccauPi.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-LkafhuIt.js → file-input.stories-hWN8tShr.js} +1 -1
- package/dist/storybook/assets/{flex-RYZsoWEN.js → flex-ZVra76N-.js} +1 -1
- package/dist/storybook/assets/{flex.stories-lLz0Xrt_.js → flex.stories-kjbyZMWP.js} +1 -1
- package/dist/storybook/assets/{footer.stories-SNpr1wxu.js → footer.stories-Na2wdtCC.js} +1 -1
- package/dist/storybook/assets/{form.stories-tzZoKyyL.js → form.stories-sBK-yzVk.js} +1 -1
- package/dist/storybook/assets/{formation.stories-O-5GfuPp.js → formation.stories-gmJQMNJJ.js} +1 -1
- package/dist/storybook/assets/{formatter-SWP5E3XI-upDgC2hz.js → formatter-SWP5E3XI-_65Af7r6.js} +1 -1
- package/dist/storybook/assets/{heading-Bk0bpNfe.js → heading-cUVItwKq.js} +1 -1
- package/dist/storybook/assets/{heading.stories-HLMPkIPo.js → heading.stories-K-Z0sIoo.js} +1 -1
- package/dist/storybook/assets/{help-icon--rUDxLUD.js → help-icon-nI9A506M.js} +1 -1
- package/dist/storybook/assets/{help-icon.stories-vifwJgNA.js → help-icon.stories-Qz7MKCnQ.js} +1 -1
- package/dist/storybook/assets/{icon.stories-W-UgTWyK.js → icon.stories-icqUrCtQ.js} +1 -1
- package/dist/storybook/assets/{iframe-3oJ7qbsB.js → iframe-f7RfrxbO.js} +2 -2
- package/dist/storybook/assets/{index-4EAjrsuB.js → index-vyBfFCw4.js} +5 -5
- package/dist/storybook/assets/{input-group.stories-WljyIQ0a.js → input-group.stories-EouZEW-v.js} +1 -1
- package/dist/storybook/assets/{input-u1He-wWs.js → input-iDZqV-2m.js} +1 -1
- package/dist/storybook/assets/{input-validation-XK0UmqQS.js → input-validation-o44tAua7.js} +1 -1
- package/dist/storybook/assets/{input.stories-rLdDRxtU.js → input.stories-iopguZKB.js} +1 -1
- package/dist/storybook/assets/{inputs-Bl296I5Z.js → inputs-gBYKrg7p.js} +1 -1
- package/dist/storybook/assets/{label-0_Qf6I8t.js → label-RpB4JmHX.js} +1 -1
- package/dist/storybook/assets/{label.stories-aXdU5_Ql.js → label.stories-HcdQ1bEB.js} +1 -1
- package/dist/storybook/assets/{layout-forms-HUanZYMa.js → layout-forms-bVmbErTt.js} +1 -1
- package/dist/storybook/assets/{layout-general-cZuYwo9w.js → layout-general-FiPJen3N.js} +1 -1
- package/dist/storybook/assets/{list-8l-RGDgw.js → list-JNed2RtS.js} +1 -1
- package/dist/storybook/assets/list-heading-dR7AAq04.css +1 -0
- package/dist/storybook/assets/list-heading-vjZIRKZb.js +1 -0
- package/dist/storybook/assets/{list.stories-Vp0Dm7UU.js → list.stories-GrWiLEzS.js} +1 -1
- package/dist/storybook/assets/{list.stories-data-IcFu6vvd.js → list.stories-data-spFiMtCi.js} +1 -1
- package/dist/storybook/assets/{loader.stories-0OwmnNML.js → loader.stories-G8Q_Fm8u.js} +1 -1
- package/dist/storybook/assets/{menu.stories-data-hEz8P1yK.js → menu.stories-data-VCYkzuDD.js} +1 -1
- package/dist/storybook/assets/{menu.stories-VwRF_Pbx.js → menu.stories-sot2Whii.js} +1 -1
- package/dist/storybook/assets/{message.stories-CDgUaLZP.js → message.stories-BqM_-mrZ.js} +1 -1
- package/dist/storybook/assets/{modal.stories-15sY1c5H.js → modal.stories-K4XxeWTp.js} +1 -1
- package/dist/storybook/assets/{number-input-ToRtRoDB.js → number-input-wURqWy_O.js} +1 -1
- package/dist/storybook/assets/{number-input.stories-Gx_MOzG1.js → number-input.stories-BUeHRFyX.js} +1 -1
- package/dist/storybook/assets/{option-dropdown.stories-Q2zd2AcS.js → option-dropdown.stories-1Y5JDaBF.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-hiHf2mqm.js → padding-and-spacing-FOCT-4t0.js} +1 -1
- package/dist/storybook/assets/{page.stories-pa-9WU0e.js → page.stories-irwol-YJ.js} +1 -1
- package/dist/storybook/assets/{pagination-5n5spTRo.js → pagination-Eaj_UOBW.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-g4a-aSxq.js → pagination.stories-sl2a8BMq.js} +1 -1
- package/dist/storybook/assets/{pop-confirm.stories-_agvSFJd.js → pop-confirm.stories-94l3Xg8w.js} +1 -1
- package/dist/storybook/assets/{popover-Y3FpGdUS.js → popover-uAo1e4-D.js} +1 -1
- package/dist/storybook/assets/{popover.stories-b7Tt4S0j.js → popover.stories-XaqJOrng.js} +1 -1
- package/dist/storybook/assets/{preview-4kBDmfJF.js → preview-kbRvE0UL.js} +1 -1
- package/dist/storybook/assets/{preview-Bf8hRkSt.js → preview-wvr5MbaI.js} +2 -2
- package/dist/storybook/assets/{projects.stories-YPlCLdRE.js → projects.stories-KBQvcnvE.js} +1 -1
- package/dist/storybook/assets/{radio-button-jHcwHUA4.js → radio-button-QcS9mLYi.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-LkCJsp5P.js → radio-button.stories-KCS981-F.js} +1 -1
- package/dist/storybook/assets/{reservoirs.stories-hhPblhmv.js → reservoirs.stories-b-kYU38f.js} +1 -1
- package/dist/storybook/assets/{rich-text-input.stories-7UzvJ-A1.js → rich-text-input.stories-D55Op5Gf.js} +1 -1
- package/dist/storybook/assets/{row.stories-rwYo2HUE.js → row.stories-9WPK1-K-.js} +1 -1
- package/dist/storybook/assets/{select-JjEPivho.js → select-Z1HqJ5aU.js} +1 -1
- package/dist/storybook/assets/{select.stories-qFDyxRFm.js → select.stories-oUxeDUts.js} +1 -1
- package/dist/storybook/assets/{side-bar-Fjr2t9MT.js → side-bar-GJ2tcZYY.js} +1 -1
- package/dist/storybook/assets/{side-bar.stories-sxBJCVnV.js → side-bar.stories-q_bRwHV_.js} +1 -1
- package/dist/storybook/assets/{site.stories-QHCzFOnt.js → site.stories-ZUbDTfMw.js} +1 -1
- package/dist/storybook/assets/{slider-nl2rJ9LF.js → slider-_5NQKbM-.js} +1 -1
- package/dist/storybook/assets/{slider.stories--aZa8kf-.js → slider.stories-QyyBB_rz.js} +1 -1
- package/dist/storybook/assets/{spacer.stories-eCrKj4b3.js → spacer.stories-CWSQp7tw.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-NMPM6SWI-uwzTCXOG.js → syntaxhighlighter-NMPM6SWI-dazdF8tL.js} +1 -1
- package/dist/storybook/assets/{table-kE2ngWkK.js → table-KrWSzq7G.js} +1 -1
- package/dist/storybook/assets/{table.stories-data-4h6h0P0V.js → table.stories-data-2BZDVr2X.js} +1 -1
- package/dist/storybook/assets/{table.stories-Ucds7SzE.js → table.stories-q2RiUlvj.js} +1 -1
- package/dist/storybook/assets/{textarea-8bcldTyf.js → textarea-QFVBH_vb.js} +1 -1
- package/dist/storybook/assets/{textarea.stories-D9SctTMD.js → textarea.stories-HETiaNLn.js} +1 -1
- package/dist/storybook/assets/{title.stories-Av-27QAk.js → title.stories-wYK8FhNE.js} +1 -1
- package/dist/storybook/assets/{toaster.stories-S25S4g_F.js → toaster.stories-ft_M65x0.js} +1 -1
- package/dist/storybook/assets/{toggle-BPI2y-lU.js → toggle-wk0GbVB8.js} +1 -1
- package/dist/storybook/assets/{toggle.stories-aVmjpons.js → toggle.stories-LC6LSCD2.js} +1 -1
- package/dist/storybook/assets/{tooltip-HEHiU__l.js → tooltip-ZHdi6rl-.js} +1 -1
- package/dist/storybook/assets/{tooltip.stories-tiOgoWHH.js → tooltip.stories-gTfOeEzv.js} +1 -1
- package/dist/storybook/assets/{tooltip.test-case.stories-kIeZayHw.js → tooltip.test-case.stories-y-bQOM0s.js} +1 -1
- package/dist/storybook/assets/top-bar-K-LdFikH.css +1 -0
- package/dist/storybook/assets/{top-bar-9iOkm7Gq.js → top-bar-x_wXP6-y.js} +1 -1
- package/dist/storybook/assets/{top-bar.stories-5jcHi3Q_.js → top-bar.stories-BfrMcs-K.js} +1 -1
- package/dist/storybook/assets/{top-bar.testcase.stories-7acJvLc_.js → top-bar.testcase.stories-RCQQ5Dxl.js} +1 -1
- package/dist/storybook/assets/tree-U4LtpVm9.css +1 -0
- package/dist/storybook/assets/{tree.stories-vBp30uXo.js → tree.stories-lgED7Ld-.js} +17 -15
- package/dist/storybook/assets/{unit-input.stories-SBuO5rdv.js → unit-input.stories-JRJyUGWk.js} +1 -1
- package/dist/storybook/assets/{unit-table.stories-SngS0-ch.js → unit-table.stories-Q9-nAxW6.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/stories.json +1 -1
- package/package.json +1 -1
- package/dist/404.html +0 -1
- package/dist/storybook/assets/list-heading-Vd3hu5Pf.js +0 -1
- package/dist/storybook/assets/list-heading-Y8BAUuV6.css +0 -1
- package/dist/storybook/assets/top-bar-cBtxm6yr.css +0 -1
- package/dist/storybook/assets/tree-zmq4MRb6.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./jsx-runtime-FsUICBgo.js";import{r as x,R as ne}from"./index-RfLt4OUa.js";import{c as I}from"./index-VW3EWkuE.js";import{l as C}from"./lodash-Bmg8FrMx.js";import{T as N,I as R,C as _e}from"./common-types-U65vzrrz.js";import{D as j}from"./disabled-context-urNQThQz.js";import{B as Q}from"./button-7V8oA22w.js";import{T as be,u as te,i as ae,a as qe}from"./tooltip-HEHiU__l.js";import{I as H}from"./icon-y1a2N5SZ.js";import{M as v,a as D}from"./types-VB5zD18b.js";import{i as U}from"./types-5uVBABF4.js";import{B as Ve}from"./badge-23Ty_zBt.js";const xe="_actions_1nid8_1",he="_actionComponentContainer_1nid8_11",Ne="_active_1nid8_33",Ce={actions:xe,actionComponentContainer:he,active:Ne},Oe="_wrapper_uioq1_1",Ie="_layer_uioq1_5",Te="_layerContainer_uioq1_8",ve="_nested_uioq1_23",je="_fileInput_uioq1_35",Me="_trigger_uioq1_40",ke="_middleAlignedInline_uioq1_49",Ee="_heading_uioq1_55",Se="_headingIcon_uioq1_61",Re="_option_uioq1_73",He="_active_uioq1_92",De="_selected_uioq1_97",Pe="_optionContent_uioq1_103",we="_inline_uioq1_107",Le="_icon_uioq1_112",$e="_check_uioq1_113",Fe="_text_uioq1_135",Ue="_label_uioq1_140",We="_description_uioq1_151",Ae="_arrow_uioq1_155",Ge="_divider_uioq1_159",Xe="_deprecatedSemanticIcon_uioq1_163",ze="_disabled_uioq1_167",Je="_buttonLabel_uioq1_172",Ye="_buttonCaret_uioq1_178",Ke="_component_uioq1_182",Qe="_right_uioq1_188",Ze="_actions_uioq1_193",o={wrapper:Oe,layer:Ie,layerContainer:Te,nested:ve,fileInput:je,trigger:Me,middleAlignedInline:ke,heading:Ee,headingIcon:Se,option:Re,active:He,selected:De,optionContent:Pe,inline:we,icon:Le,check:$e,text:Fe,label:Ue,description:We,arrow:Ae,divider:Ge,deprecatedSemanticIcon:Xe,disabled:ze,buttonLabel:Je,buttonCaret:Ye,component:Ke,right:Qe,actions:Ze},W=({label:e,onClick:a,icon:i,testId:r})=>n.jsxs("div",{onClick:t=>t.stopPropagation(),className:o.heading,"data-testid":r,children:[e,n.jsx("span",{className:o.headingIcon,onClick:a,children:i})]});try{W.displayName="Heading",W.__docgenInfo={description:"",displayName:"Heading",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"((evt: MouseEvent<HTMLSpanElement, MouseEvent>) => void)"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"ReactNode"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const Be=()=>n.jsx("hr",{className:o.divider}),A=({actions:e,label:a,url:i,onClick:r,description:t,icon:s,selected:u,closeOnOptionClick:c,close:l,disabled:p,inline:f,title:g,upload:y,onChange:_,testId:b})=>{const V=m=>{if(m.stopPropagation(),p){m.preventDefault();return}y||(c&&(l==null||l()),r==null||r(m))};return n.jsxs("a",{href:i,className:I(o.option,p?o.disabled:"",f?o.inline:"",u?o.selected:""),onClick:V,"data-testid":b,children:[s?n.jsx("span",{className:o.icon,children:n.jsx(H,{icon:s})}):null,n.jsxs("div",{className:o.optionContent,children:[y&&n.jsx("input",{type:"file",className:o.fileInput,onChange:m=>{_==null||_(m.target.files),l==null||l()}}),n.jsx("span",{className:o.label,title:`${g||a}`,children:a}),n.jsxs("div",{className:o.right,children:[n.jsx("span",{className:o.description,children:t}),!!(e!=null&&e.length)&&n.jsx("div",{className:o.actions,children:n.jsx(K,{actions:e})})]})]})]})};try{A.displayName="Option",A.__docgenInfo={description:"",displayName:"Option",props:{actions:{defaultValue:null,description:"",name:"actions",required:!1,type:{name:"any[]"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"((evt: MouseEvent<HTMLAnchorElement, MouseEvent>) => void)"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"any"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean"}},closeOnOptionClick:{defaultValue:null,description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},close:{defaultValue:null,description:"",name:"close",required:!1,type:{name:"TEmpty"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},inline:{defaultValue:null,description:"",name:"inline",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},upload:{defaultValue:null,description:"",name:"upload",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((files: FileList | null) => void)"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const G=({section:e,closeOnOptionClick:a,close:i,tree:r,path:t,maxHeight:s})=>{const u=x.useContext(j);switch(e.type){case v.HEADING:return n.jsx(W,{label:(e==null?void 0:e.label)??"",onClick:e.onClick,icon:e.icon,testId:e.testId});case v.DIVIDER:return n.jsx(Be,{});case v.OPTION:return n.jsx(A,{actions:e.actions,label:(e==null?void 0:e.label)??"",url:e.url,onClick:e.onClick,description:e.description,icon:e.icon,selected:e.selected,closeOnOptionClick:a,close:i,disabled:e.disabled||u,inline:e.inline,title:e.title,upload:e.upload,onChange:e.onChange,testId:e.testId});case v.MENU:return n.jsx(L,{menu:e.menu,title:e.title,closeOnOptionClick:a,isNested:!0,closeParent:i,tree:r,path:t,maxHeight:s,testId:e.testId});default:return null}};try{G.displayName="Section",G.__docgenInfo={description:"",displayName:"Section",props:{section:{defaultValue:null,description:"",name:"section",required:!0,type:{name:"IMenuSection"}},closeOnOptionClick:{defaultValue:null,description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},close:{defaultValue:null,description:"",name:"close",required:!0,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!0,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!0,type:{name:"string"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}}}}}catch{}const en=e=>e.includes("[")?e.substr(0,e.lastIndexOf("[")):e,nn=(e,a)=>`${e}.sections[${a}]`.replace(/^\./,""),tn=e=>`${e}.close`.replace(/^\./,""),an=(e,a)=>C.get(e,en(a),[]),ln=(e,a,i)=>C.set(e,tn(a),i),P=({sections:e,isNested:a,width:i,closeOnOptionClick:r,close:t=()=>{},tree:s,path:u,maxHeight:c,showAllButton:l,testId:p})=>{var m;if(x.isValidElement(e))return n.jsx(n.Fragment,{children:e});const[f,g]=x.useState(!(l!=null&&l.visible)),y=e,_=((m=l==null?void 0:l.additionalSections)==null?void 0:m.map(d=>({...d,closeOnOptionClick:r,visible:!0})))??[],b=y.length>4?[{type:v.OPTION,label:f?(l==null?void 0:l.showLessTitle)||"Show less":(l==null?void 0:l.showAllTitle)||"Show all",onClick:()=>g(!f),visible:!0,closeOnOptionClick:!1}]:[],V=l!=null&&l.visible?y.map((d,q)=>f||q<=3?{...d,visible:!0,closeOnOptionClick:r}:d).concat(b,_).filter(d=>d==null?void 0:d.visible):y.map(d=>({...d,closeOnOptionClick:r}));return n.jsx("div",{className:I(o.layer,a?o.nested:null),style:{maxWidth:i,maxHeight:c},"data-testid":p,children:n.jsx("ul",{children:V.map((d,q)=>n.jsx("li",{children:n.jsx(G,{section:d,closeOnOptionClick:d.closeOnOptionClick,close:t,tree:s,path:nn(u,q),maxHeight:c})},q))})})};try{P.displayName="Layer",P.__docgenInfo={description:"",displayName:"Layer",props:{sections:{defaultValue:null,description:"",name:"sections",required:!0,type:{name:"ReactNode | IMenuSection[]"}},isNested:{defaultValue:null,description:"",name:"isNested",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},closeOnOptionClick:{defaultValue:null,description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},close:{defaultValue:{value:"() => {}"},description:"",name:"close",required:!1,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!1,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!1,type:{name:"any"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}},showAllButton:{defaultValue:null,description:"",name:"showAllButton",required:!1,type:{name:"IMenuShowAllButton"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const le=(e,a=!1)=>({auto:!0,preferX:"right",preferY:"bottom",placement:e||(a?"right-start":"bottom-start")}),X=({trigger:e,label:a,colored:i,small:r,width:t,disabled:s,groupOrder:u,loading:c,error:l,warning:p,active:f})=>{const g=x.useContext(j),y=e===N.BUTTON?a:e===N.DROP_DOWN_BUTTON?n.jsxs("span",{className:o.middleAlignedInline,children:[n.jsx("span",{className:o.buttonLabel,children:a}),n.jsx("span",{className:o.buttonCaret,children:n.jsx(H,{icon:R.CHEVRON_DOWN})})]}):null;return n.jsx("div",{className:I(o.trigger,s||g?o.disabled:null),style:{width:t},children:n.jsx(Q,{label:y,colored:i,small:r,width:t,groupOrder:u,onClick:()=>{},loading:c,disabled:s,error:l,warning:p,active:f})})};try{X.displayName="Button",X.__docgenInfo={description:"",displayName:"Button",props:{trigger:{defaultValue:null,description:"",name:"trigger",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},colored:{defaultValue:null,description:"",name:"colored",required:!1,type:{name:"string | boolean"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"string"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}}}}}catch{}const z=({label:e,title:a,carat:i,disabled:r,isOpen:t})=>{let s;return a?s=a:(typeof e=="string"||typeof e=="number")&&(s=String(e)),n.jsxs("div",{className:I(o.trigger,r?o.disabled:null,t?o.active:null),children:[n.jsx("span",{className:o.label,title:s,children:e}),i&&i===D.RIGHT?n.jsx("span",{className:o.arrow,children:n.jsx(H,{icon:R.CHEVRON_RIGHT})}):i&&i===D.DOWN?n.jsx("span",{className:o.arrow,children:n.jsx(H,{icon:R.CHEVRON_DOWN})}):null]})};try{z.displayName="Text",z.__docgenInfo={description:"",displayName:"Text",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},carat:{defaultValue:null,description:"",name:"carat",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!1,type:{name:"boolean"}}}}}catch{}const J=({component:e,disabled:a,testId:i})=>n.jsx("div",{className:I(o.component,a?o.disabled:null),"data-testid":i,children:e});try{J.displayName="Component",J.__docgenInfo={description:"",displayName:"Component",props:{component:{defaultValue:null,description:"",name:"component",required:!0,type:{name:"ReactNode"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const rn=({tooltip:e,error:a,warning:i,children:r})=>!U(e)&&!U(a)&&!U(i)?n.jsx(n.Fragment,{children:r}):n.jsx(be,{error:!!a,warning:!!i,text:e||a||i,display:"inline-block",children:r}),w=ne.forwardRef(({isDisabled:e,badgeTitle:a,badgeDot:i,loading:r,width:t,trigger:s,label:u,title:c,onClickTrigger:l,colored:p,small:f,isNested:g,contextMenu:y,component:_,groupOrder:b,fullHeight:V,isOpen:m,error:d,warning:q,tooltip:h,testId:O,...Z},$)=>{const M=s===N.BUTTON||s===N.DROP_DOWN_BUTTON?n.jsx(X,{trigger:s,label:u??"",colored:p,small:f,width:t,disabled:e,groupOrder:b,loading:r,error:d,warning:q,active:m}):s===N.TEXT?n.jsx(z,{label:u??"",title:c,disabled:e,carat:y?void 0:g?D.RIGHT:D.DOWN,isOpen:m}):s===N.COMPONENT?n.jsx(J,{component:_,disabled:e}):null,F=!g&&(a||i)?n.jsx(Ve,{title:a,dot:i,small:!i,children:M}):M;return n.jsx("div",{ref:$,className:o.wrapper,style:t?{width:t}:{...V&&{height:"100%",display:"flex"}},onClick:k=>{k.stopPropagation(),k.preventDefault(),l()},"data-testid":O,children:n.jsx(rn,{tooltip:h,error:d,warning:q,children:F})})});try{w.displayName="Trigger",w.__docgenInfo={description:"",displayName:"Trigger",props:{isDisabled:{defaultValue:null,description:"",name:"isDisabled",required:!1,type:{name:"boolean"}},badgeTitle:{defaultValue:null,description:"",name:"badgeTitle",required:!1,type:{name:"string"}},badgeDot:{defaultValue:null,description:"",name:"badgeDot",required:!1,type:{name:"boolean"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},trigger:{defaultValue:null,description:"",name:"trigger",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"ReactNode"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},onClickTrigger:{defaultValue:null,description:"",name:"onClickTrigger",required:!0,type:{name:"TEmpty"}},colored:{defaultValue:null,description:"",name:"colored",required:!1,type:{name:"string | boolean"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},isNested:{defaultValue:null,description:"",name:"isNested",required:!1,type:{name:"boolean"}},contextMenu:{defaultValue:null,description:"",name:"contextMenu",required:!1,type:{name:"boolean"}},component:{defaultValue:null,description:"",name:"component",required:!1,type:{name:"ReactNode"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},fullHeight:{defaultValue:null,description:"",name:"fullHeight",required:!1,type:{name:"boolean"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!1,type:{name:"boolean"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"string"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const ie=e=>{const{sections:a}=e;return!x.isValidElement(a)&&(!Array.isArray(a)||a.every(i=>C.isEmpty(i)))},sn=({sections:e,width:a,placement:i,possiblePlacements:r,closeOnOptionClick:t,closeParent:s,tree:u,path:c,groupOrder:l,overflowContainer:p,maxHeight:f,testId:g})=>{const{hasMousePosition:y,resetMousePosition:_,handleMouseEvent:b,trigger:V}=qe(),m=_,d=y,{layerProps:q,renderLayer:h}=te({isOpen:d,trigger:V,...le(i),possiblePlacements:r,ResizeObserver:ae,onOutsideClick:m,overflowContainer:p});return[d&&h(n.jsx("div",{...q,children:n.jsx(P,{isNested:!1,width:a,sections:e,closeOnOptionClick:t,close:s||m,tree:u,path:c,maxHeight:f,testId:g&&`${g}-layer`})})),b]},on=({menu:e,width:a,disabled:i=!1,closeOnOptionClick:r=!0,closeParent:t,tree:s,path:u,groupOrder:c,testId:l})=>{const p=x.useContext(j),{label:f,trigger:g,fullHeightTrigger:y,colored:_,small:b,component:V,placement:m,possiblePlacements:d=["bottom-start","top-start"]}=e,[q,h]=sn({sections:e.sections,width:a,placement:m,possiblePlacements:d,closeOnOptionClick:r,closeParent:t,tree:s,path:u,groupOrder:c,overflowContainer:!0,maxHeight:"40vh",testId:l}),O=i||ie(e)||p;return n.jsxs("div",{onContextMenu:h,"data-testid":l,children:[n.jsx(w,{width:a,fullHeight:y,isDisabled:O,trigger:g,label:f,onClickTrigger:()=>{},colored:_,small:b,isNested:!0,component:V,contextMenu:!0,groupOrder:c}),q]})},L=({menu:e,width:a,disabled:i=!1,badgeTitle:r,badgeDot:t=!1,loading:s=!1,isNested:u=!1,closeOnOptionClick:c=!0,closeParent:l,tree:p,path:f,groupOrder:g,overflowContainer:y=!0,maxHeight:_,testId:b,open:V,setOpen:m,tooltip:d,error:q,warning:h})=>{const O=x.useContext(j),{label:Z,title:$,trigger:M,fullHeightTrigger:F,colored:k,small:re,sections:se,component:oe,placement:de,showAllButton:ue,possiblePlacements:ce=["bottom-start","top-start"]}=e,[E,B]=C.isBoolean(V)&&C.isFunction(m)?[V,m]:x.useState(!1),T=()=>B(!1),pe=()=>B(!0),{triggerProps:me,layerProps:fe,renderLayer:ye}=te({isOpen:E,...le(de,u),possiblePlacements:ce,ResizeObserver:ae,onOutsideClick:T,overflowContainer:y,onParentClose:T}),ee=i||ie(e)||O;ln(p,f,T);const ge=()=>{if(!ee){if(E){T();return}an(p,f).forEach(S=>{S.close&&S.close()}),pe()}};return n.jsxs(n.Fragment,{children:[n.jsx(w,{ref:me.ref,isDisabled:ee,badgeTitle:r,badgeDot:t,loading:s,width:a,fullHeight:F,trigger:M,label:Z,title:$,onClickTrigger:ge,colored:k,small:re,isNested:u,component:oe,groupOrder:g,isOpen:E,tooltip:d,error:q,warning:h,testId:b}),E&&ye(n.jsx("div",{...fe,className:o.layerContainer,"data-testid":e.testId,onClick:S=>S.stopPropagation(),children:n.jsx(P,{sections:se,isNested:u,width:a,closeOnOptionClick:c,close:l||T,tree:p,path:f,maxHeight:_,showAllButton:ue,testId:b&&`${b}-layer`})}))]})},Y=e=>e.contextMenu?n.jsx(on,{...e,tree:{},path:"",testId:e.testId}):n.jsx(L,{...e,tree:{},path:"",testId:e.testId});try{L.displayName="DropDownMenu",L.__docgenInfo={description:"",displayName:"DropDownMenu",props:{menu:{defaultValue:null,description:"",name:"menu",required:!0,type:{name:"{ trigger: string; title?: string | undefined; colored?: string | boolean | undefined; small?: boolean | undefined; label?: ReactNode; component?: ReactNode; sections?: ReactNode | IMenuSection[]; ... 4 more ...; fullHeightTrigger?: boolean | undefined; }"}},contextMenu:{defaultValue:null,description:"",name:"contextMenu",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},badgeTitle:{defaultValue:null,description:"",name:"badgeTitle",required:!1,type:{name:"string"}},badgeDot:{defaultValue:{value:"false"},description:"",name:"badgeDot",required:!1,type:{name:"boolean"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}},fullHeightTrigger:{defaultValue:null,description:"",name:"fullHeightTrigger",required:!1,type:{name:"boolean"}},closeOnOptionClick:{defaultValue:{value:"true"},description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},overflowContainer:{defaultValue:{value:"true"},description:"",name:"overflowContainer",required:!1,type:{name:"boolean"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},setOpen:{defaultValue:null,description:"",name:"setOpen",required:!1,type:{name:"((state: boolean) => void)"}},closeParent:{defaultValue:null,description:"",name:"closeParent",required:!1,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!1,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!1,type:{name:"any"}},isNested:{defaultValue:{value:"false"},description:"",name:"isNested",required:!1,type:{name:"boolean"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"any"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"any"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"any"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}}}}}catch{}try{Y.displayName="Menu",Y.__docgenInfo={description:"",displayName:"Menu",props:{menu:{defaultValue:null,description:"",name:"menu",required:!0,type:{name:"{ trigger: string; title?: string | undefined; colored?: string | boolean | undefined; small?: boolean | undefined; label?: ReactNode; component?: ReactNode; sections?: ReactNode | IMenuSection[]; ... 4 more ...; fullHeightTrigger?: boolean | undefined; }"}},contextMenu:{defaultValue:null,description:"",name:"contextMenu",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},badgeTitle:{defaultValue:null,description:"",name:"badgeTitle",required:!1,type:{name:"string"}},badgeDot:{defaultValue:{value:"false"},description:"",name:"badgeDot",required:!1,type:{name:"boolean"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}},fullHeightTrigger:{defaultValue:null,description:"",name:"fullHeightTrigger",required:!1,type:{name:"boolean"}},closeOnOptionClick:{defaultValue:{value:"true"},description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},overflowContainer:{defaultValue:{value:"true"},description:"",name:"overflowContainer",required:!1,type:{name:"boolean"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},setOpen:{defaultValue:null,description:"",name:"setOpen",required:!1,type:{name:"((state: boolean) => void)"}},closeParent:{defaultValue:null,description:"",name:"closeParent",required:!1,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!1,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!1,type:{name:"any"}},isNested:{defaultValue:{value:"false"},description:"",name:"isNested",required:!1,type:{name:"boolean"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"any"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"any"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"any"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}}}}}catch{}const dn=e=>{const{subActions:a,subMenuIcon:i,primary:r,testId:t,tooltip:s}=e,u=n.jsx(Q,{colored:r?!0:_e.MUTED,basic:!r,round:!0,small:!0,icon:i||R.MENU,testId:t,tooltip:s});if(a.length){const c={trigger:N.COMPONENT,component:u,sections:a.map(l=>({type:l.type??"Option",label:l.label,icon:l.icon,testId:l.testId,disabled:l.disabled,menu:l.menu,onClick:p=>{p.stopPropagation(),p.preventDefault(),C.isFunction(l.onClick)&&l.onClick(p)}}))};return n.jsx(Y,{menu:c})}return null},K=e=>{const a=x.useContext(j),{actions:i=[],closeLayer:r}=e;return n.jsx("div",{className:I(Ce.actions),children:i.map((t,s)=>{if(!((t==null?void 0:t.hidden)||!t||!Object.keys(t).length))return t.childComponent&&ne.isValidElement(t.childComponent)?n.jsx("div",{"data-testid":t.testId,children:t.childComponent},s):t.subActions?n.jsx(dn,{subActions:t.subActions,primary:t.primary,subMenuIcon:t.icon,testId:t.testId,tooltip:t.tooltip},s):n.jsx(Q,{colored:t.primary?!0:"muted",round:!0,basic:!t.primary,disabled:t.disabled,small:!0,name:String(t.label),icon:t.icon?t.icon:null,onClick:c=>{r&&r(),c.stopPropagation(),c.preventDefault(),!(t.disabled||a)&&C.isFunction(t.onClick)&&t.onClick(c)},testId:t.testId,tooltip:t.tooltip},s)})})};try{K.displayName="Actions",K.__docgenInfo={description:"",displayName:"Actions",props:{actions:{defaultValue:null,description:"",name:"actions",required:!0,type:{name:"IAction[]"}},closeLayer:{defaultValue:null,description:"",name:"closeLayer",required:!1,type:{name:"TEmpty"}}}}}catch{}export{K as A,Y as M};
|
|
1
|
+
import{j as n}from"./jsx-runtime-FsUICBgo.js";import{r as x,R as ne}from"./index-RfLt4OUa.js";import{c as I}from"./index-VW3EWkuE.js";import{l as C}from"./lodash-Bmg8FrMx.js";import{T as N,I as R,C as _e}from"./common-types-U65vzrrz.js";import{D as j}from"./disabled-context-urNQThQz.js";import{B as Q}from"./button-IoNblLER.js";import{T as be,u as te,i as ae,a as qe}from"./tooltip-ZHdi6rl-.js";import{I as H}from"./icon-y1a2N5SZ.js";import{M as v,a as D}from"./types-VB5zD18b.js";import{i as U}from"./types-5uVBABF4.js";import{B as Ve}from"./badge-23Ty_zBt.js";const xe="_actions_1nid8_1",he="_actionComponentContainer_1nid8_11",Ne="_active_1nid8_33",Ce={actions:xe,actionComponentContainer:he,active:Ne},Oe="_wrapper_uioq1_1",Ie="_layer_uioq1_5",Te="_layerContainer_uioq1_8",ve="_nested_uioq1_23",je="_fileInput_uioq1_35",Me="_trigger_uioq1_40",ke="_middleAlignedInline_uioq1_49",Ee="_heading_uioq1_55",Se="_headingIcon_uioq1_61",Re="_option_uioq1_73",He="_active_uioq1_92",De="_selected_uioq1_97",Pe="_optionContent_uioq1_103",we="_inline_uioq1_107",Le="_icon_uioq1_112",$e="_check_uioq1_113",Fe="_text_uioq1_135",Ue="_label_uioq1_140",We="_description_uioq1_151",Ae="_arrow_uioq1_155",Ge="_divider_uioq1_159",Xe="_deprecatedSemanticIcon_uioq1_163",ze="_disabled_uioq1_167",Je="_buttonLabel_uioq1_172",Ye="_buttonCaret_uioq1_178",Ke="_component_uioq1_182",Qe="_right_uioq1_188",Ze="_actions_uioq1_193",o={wrapper:Oe,layer:Ie,layerContainer:Te,nested:ve,fileInput:je,trigger:Me,middleAlignedInline:ke,heading:Ee,headingIcon:Se,option:Re,active:He,selected:De,optionContent:Pe,inline:we,icon:Le,check:$e,text:Fe,label:Ue,description:We,arrow:Ae,divider:Ge,deprecatedSemanticIcon:Xe,disabled:ze,buttonLabel:Je,buttonCaret:Ye,component:Ke,right:Qe,actions:Ze},W=({label:e,onClick:a,icon:i,testId:r})=>n.jsxs("div",{onClick:t=>t.stopPropagation(),className:o.heading,"data-testid":r,children:[e,n.jsx("span",{className:o.headingIcon,onClick:a,children:i})]});try{W.displayName="Heading",W.__docgenInfo={description:"",displayName:"Heading",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"((evt: MouseEvent<HTMLSpanElement, MouseEvent>) => void)"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"ReactNode"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const Be=()=>n.jsx("hr",{className:o.divider}),A=({actions:e,label:a,url:i,onClick:r,description:t,icon:s,selected:u,closeOnOptionClick:c,close:l,disabled:p,inline:f,title:g,upload:y,onChange:_,testId:b})=>{const V=m=>{if(m.stopPropagation(),p){m.preventDefault();return}y||(c&&(l==null||l()),r==null||r(m))};return n.jsxs("a",{href:i,className:I(o.option,p?o.disabled:"",f?o.inline:"",u?o.selected:""),onClick:V,"data-testid":b,children:[s?n.jsx("span",{className:o.icon,children:n.jsx(H,{icon:s})}):null,n.jsxs("div",{className:o.optionContent,children:[y&&n.jsx("input",{type:"file",className:o.fileInput,onChange:m=>{_==null||_(m.target.files),l==null||l()}}),n.jsx("span",{className:o.label,title:`${g||a}`,children:a}),n.jsxs("div",{className:o.right,children:[n.jsx("span",{className:o.description,children:t}),!!(e!=null&&e.length)&&n.jsx("div",{className:o.actions,children:n.jsx(K,{actions:e})})]})]})]})};try{A.displayName="Option",A.__docgenInfo={description:"",displayName:"Option",props:{actions:{defaultValue:null,description:"",name:"actions",required:!1,type:{name:"any[]"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"((evt: MouseEvent<HTMLAnchorElement, MouseEvent>) => void)"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"any"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean"}},closeOnOptionClick:{defaultValue:null,description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},close:{defaultValue:null,description:"",name:"close",required:!1,type:{name:"TEmpty"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},inline:{defaultValue:null,description:"",name:"inline",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},upload:{defaultValue:null,description:"",name:"upload",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((files: FileList | null) => void)"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const G=({section:e,closeOnOptionClick:a,close:i,tree:r,path:t,maxHeight:s})=>{const u=x.useContext(j);switch(e.type){case v.HEADING:return n.jsx(W,{label:(e==null?void 0:e.label)??"",onClick:e.onClick,icon:e.icon,testId:e.testId});case v.DIVIDER:return n.jsx(Be,{});case v.OPTION:return n.jsx(A,{actions:e.actions,label:(e==null?void 0:e.label)??"",url:e.url,onClick:e.onClick,description:e.description,icon:e.icon,selected:e.selected,closeOnOptionClick:a,close:i,disabled:e.disabled||u,inline:e.inline,title:e.title,upload:e.upload,onChange:e.onChange,testId:e.testId});case v.MENU:return n.jsx(L,{menu:e.menu,title:e.title,closeOnOptionClick:a,isNested:!0,closeParent:i,tree:r,path:t,maxHeight:s,testId:e.testId});default:return null}};try{G.displayName="Section",G.__docgenInfo={description:"",displayName:"Section",props:{section:{defaultValue:null,description:"",name:"section",required:!0,type:{name:"IMenuSection"}},closeOnOptionClick:{defaultValue:null,description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},close:{defaultValue:null,description:"",name:"close",required:!0,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!0,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!0,type:{name:"string"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}}}}}catch{}const en=e=>e.includes("[")?e.substr(0,e.lastIndexOf("[")):e,nn=(e,a)=>`${e}.sections[${a}]`.replace(/^\./,""),tn=e=>`${e}.close`.replace(/^\./,""),an=(e,a)=>C.get(e,en(a),[]),ln=(e,a,i)=>C.set(e,tn(a),i),P=({sections:e,isNested:a,width:i,closeOnOptionClick:r,close:t=()=>{},tree:s,path:u,maxHeight:c,showAllButton:l,testId:p})=>{var m;if(x.isValidElement(e))return n.jsx(n.Fragment,{children:e});const[f,g]=x.useState(!(l!=null&&l.visible)),y=e,_=((m=l==null?void 0:l.additionalSections)==null?void 0:m.map(d=>({...d,closeOnOptionClick:r,visible:!0})))??[],b=y.length>4?[{type:v.OPTION,label:f?(l==null?void 0:l.showLessTitle)||"Show less":(l==null?void 0:l.showAllTitle)||"Show all",onClick:()=>g(!f),visible:!0,closeOnOptionClick:!1}]:[],V=l!=null&&l.visible?y.map((d,q)=>f||q<=3?{...d,visible:!0,closeOnOptionClick:r}:d).concat(b,_).filter(d=>d==null?void 0:d.visible):y.map(d=>({...d,closeOnOptionClick:r}));return n.jsx("div",{className:I(o.layer,a?o.nested:null),style:{maxWidth:i,maxHeight:c},"data-testid":p,children:n.jsx("ul",{children:V.map((d,q)=>n.jsx("li",{children:n.jsx(G,{section:d,closeOnOptionClick:d.closeOnOptionClick,close:t,tree:s,path:nn(u,q),maxHeight:c})},q))})})};try{P.displayName="Layer",P.__docgenInfo={description:"",displayName:"Layer",props:{sections:{defaultValue:null,description:"",name:"sections",required:!0,type:{name:"ReactNode | IMenuSection[]"}},isNested:{defaultValue:null,description:"",name:"isNested",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},closeOnOptionClick:{defaultValue:null,description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},close:{defaultValue:{value:"() => {}"},description:"",name:"close",required:!1,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!1,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!1,type:{name:"any"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}},showAllButton:{defaultValue:null,description:"",name:"showAllButton",required:!1,type:{name:"IMenuShowAllButton"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const le=(e,a=!1)=>({auto:!0,preferX:"right",preferY:"bottom",placement:e||(a?"right-start":"bottom-start")}),X=({trigger:e,label:a,colored:i,small:r,width:t,disabled:s,groupOrder:u,loading:c,error:l,warning:p,active:f})=>{const g=x.useContext(j),y=e===N.BUTTON?a:e===N.DROP_DOWN_BUTTON?n.jsxs("span",{className:o.middleAlignedInline,children:[n.jsx("span",{className:o.buttonLabel,children:a}),n.jsx("span",{className:o.buttonCaret,children:n.jsx(H,{icon:R.CHEVRON_DOWN})})]}):null;return n.jsx("div",{className:I(o.trigger,s||g?o.disabled:null),style:{width:t},children:n.jsx(Q,{label:y,colored:i,small:r,width:t,groupOrder:u,onClick:()=>{},loading:c,disabled:s,error:l,warning:p,active:f})})};try{X.displayName="Button",X.__docgenInfo={description:"",displayName:"Button",props:{trigger:{defaultValue:null,description:"",name:"trigger",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},colored:{defaultValue:null,description:"",name:"colored",required:!1,type:{name:"string | boolean"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"string"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}}}}}catch{}const z=({label:e,title:a,carat:i,disabled:r,isOpen:t})=>{let s;return a?s=a:(typeof e=="string"||typeof e=="number")&&(s=String(e)),n.jsxs("div",{className:I(o.trigger,r?o.disabled:null,t?o.active:null),children:[n.jsx("span",{className:o.label,title:s,children:e}),i&&i===D.RIGHT?n.jsx("span",{className:o.arrow,children:n.jsx(H,{icon:R.CHEVRON_RIGHT})}):i&&i===D.DOWN?n.jsx("span",{className:o.arrow,children:n.jsx(H,{icon:R.CHEVRON_DOWN})}):null]})};try{z.displayName="Text",z.__docgenInfo={description:"",displayName:"Text",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"ReactNode"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},carat:{defaultValue:null,description:"",name:"carat",required:!1,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!1,type:{name:"boolean"}}}}}catch{}const J=({component:e,disabled:a,testId:i})=>n.jsx("div",{className:I(o.component,a?o.disabled:null),"data-testid":i,children:e});try{J.displayName="Component",J.__docgenInfo={description:"",displayName:"Component",props:{component:{defaultValue:null,description:"",name:"component",required:!0,type:{name:"ReactNode"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const rn=({tooltip:e,error:a,warning:i,children:r})=>!U(e)&&!U(a)&&!U(i)?n.jsx(n.Fragment,{children:r}):n.jsx(be,{error:!!a,warning:!!i,text:e||a||i,display:"inline-block",children:r}),w=ne.forwardRef(({isDisabled:e,badgeTitle:a,badgeDot:i,loading:r,width:t,trigger:s,label:u,title:c,onClickTrigger:l,colored:p,small:f,isNested:g,contextMenu:y,component:_,groupOrder:b,fullHeight:V,isOpen:m,error:d,warning:q,tooltip:h,testId:O,...Z},$)=>{const M=s===N.BUTTON||s===N.DROP_DOWN_BUTTON?n.jsx(X,{trigger:s,label:u??"",colored:p,small:f,width:t,disabled:e,groupOrder:b,loading:r,error:d,warning:q,active:m}):s===N.TEXT?n.jsx(z,{label:u??"",title:c,disabled:e,carat:y?void 0:g?D.RIGHT:D.DOWN,isOpen:m}):s===N.COMPONENT?n.jsx(J,{component:_,disabled:e}):null,F=!g&&(a||i)?n.jsx(Ve,{title:a,dot:i,small:!i,children:M}):M;return n.jsx("div",{ref:$,className:o.wrapper,style:t?{width:t}:{...V&&{height:"100%",display:"flex"}},onClick:k=>{k.stopPropagation(),k.preventDefault(),l()},"data-testid":O,children:n.jsx(rn,{tooltip:h,error:d,warning:q,children:F})})});try{w.displayName="Trigger",w.__docgenInfo={description:"",displayName:"Trigger",props:{isDisabled:{defaultValue:null,description:"",name:"isDisabled",required:!1,type:{name:"boolean"}},badgeTitle:{defaultValue:null,description:"",name:"badgeTitle",required:!1,type:{name:"string"}},badgeDot:{defaultValue:null,description:"",name:"badgeDot",required:!1,type:{name:"boolean"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},trigger:{defaultValue:null,description:"",name:"trigger",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"ReactNode"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},onClickTrigger:{defaultValue:null,description:"",name:"onClickTrigger",required:!0,type:{name:"TEmpty"}},colored:{defaultValue:null,description:"",name:"colored",required:!1,type:{name:"string | boolean"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},isNested:{defaultValue:null,description:"",name:"isNested",required:!1,type:{name:"boolean"}},contextMenu:{defaultValue:null,description:"",name:"contextMenu",required:!1,type:{name:"boolean"}},component:{defaultValue:null,description:"",name:"component",required:!1,type:{name:"ReactNode"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},fullHeight:{defaultValue:null,description:"",name:"fullHeight",required:!1,type:{name:"boolean"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!1,type:{name:"boolean"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"string"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const ie=e=>{const{sections:a}=e;return!x.isValidElement(a)&&(!Array.isArray(a)||a.every(i=>C.isEmpty(i)))},sn=({sections:e,width:a,placement:i,possiblePlacements:r,closeOnOptionClick:t,closeParent:s,tree:u,path:c,groupOrder:l,overflowContainer:p,maxHeight:f,testId:g})=>{const{hasMousePosition:y,resetMousePosition:_,handleMouseEvent:b,trigger:V}=qe(),m=_,d=y,{layerProps:q,renderLayer:h}=te({isOpen:d,trigger:V,...le(i),possiblePlacements:r,ResizeObserver:ae,onOutsideClick:m,overflowContainer:p});return[d&&h(n.jsx("div",{...q,children:n.jsx(P,{isNested:!1,width:a,sections:e,closeOnOptionClick:t,close:s||m,tree:u,path:c,maxHeight:f,testId:g&&`${g}-layer`})})),b]},on=({menu:e,width:a,disabled:i=!1,closeOnOptionClick:r=!0,closeParent:t,tree:s,path:u,groupOrder:c,testId:l})=>{const p=x.useContext(j),{label:f,trigger:g,fullHeightTrigger:y,colored:_,small:b,component:V,placement:m,possiblePlacements:d=["bottom-start","top-start"]}=e,[q,h]=sn({sections:e.sections,width:a,placement:m,possiblePlacements:d,closeOnOptionClick:r,closeParent:t,tree:s,path:u,groupOrder:c,overflowContainer:!0,maxHeight:"40vh",testId:l}),O=i||ie(e)||p;return n.jsxs("div",{onContextMenu:h,"data-testid":l,children:[n.jsx(w,{width:a,fullHeight:y,isDisabled:O,trigger:g,label:f,onClickTrigger:()=>{},colored:_,small:b,isNested:!0,component:V,contextMenu:!0,groupOrder:c}),q]})},L=({menu:e,width:a,disabled:i=!1,badgeTitle:r,badgeDot:t=!1,loading:s=!1,isNested:u=!1,closeOnOptionClick:c=!0,closeParent:l,tree:p,path:f,groupOrder:g,overflowContainer:y=!0,maxHeight:_,testId:b,open:V,setOpen:m,tooltip:d,error:q,warning:h})=>{const O=x.useContext(j),{label:Z,title:$,trigger:M,fullHeightTrigger:F,colored:k,small:re,sections:se,component:oe,placement:de,showAllButton:ue,possiblePlacements:ce=["bottom-start","top-start"]}=e,[E,B]=C.isBoolean(V)&&C.isFunction(m)?[V,m]:x.useState(!1),T=()=>B(!1),pe=()=>B(!0),{triggerProps:me,layerProps:fe,renderLayer:ye}=te({isOpen:E,...le(de,u),possiblePlacements:ce,ResizeObserver:ae,onOutsideClick:T,overflowContainer:y,onParentClose:T}),ee=i||ie(e)||O;ln(p,f,T);const ge=()=>{if(!ee){if(E){T();return}an(p,f).forEach(S=>{S.close&&S.close()}),pe()}};return n.jsxs(n.Fragment,{children:[n.jsx(w,{ref:me.ref,isDisabled:ee,badgeTitle:r,badgeDot:t,loading:s,width:a,fullHeight:F,trigger:M,label:Z,title:$,onClickTrigger:ge,colored:k,small:re,isNested:u,component:oe,groupOrder:g,isOpen:E,tooltip:d,error:q,warning:h,testId:b}),E&&ye(n.jsx("div",{...fe,className:o.layerContainer,"data-testid":e.testId,onClick:S=>S.stopPropagation(),children:n.jsx(P,{sections:se,isNested:u,width:a,closeOnOptionClick:c,close:l||T,tree:p,path:f,maxHeight:_,showAllButton:ue,testId:b&&`${b}-layer`})}))]})},Y=e=>e.contextMenu?n.jsx(on,{...e,tree:{},path:"",testId:e.testId}):n.jsx(L,{...e,tree:{},path:"",testId:e.testId});try{L.displayName="DropDownMenu",L.__docgenInfo={description:"",displayName:"DropDownMenu",props:{menu:{defaultValue:null,description:"",name:"menu",required:!0,type:{name:"{ trigger: string; title?: string | undefined; colored?: string | boolean | undefined; small?: boolean | undefined; label?: ReactNode; component?: ReactNode; sections?: ReactNode | IMenuSection[]; ... 4 more ...; fullHeightTrigger?: boolean | undefined; }"}},contextMenu:{defaultValue:null,description:"",name:"contextMenu",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},badgeTitle:{defaultValue:null,description:"",name:"badgeTitle",required:!1,type:{name:"string"}},badgeDot:{defaultValue:{value:"false"},description:"",name:"badgeDot",required:!1,type:{name:"boolean"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}},fullHeightTrigger:{defaultValue:null,description:"",name:"fullHeightTrigger",required:!1,type:{name:"boolean"}},closeOnOptionClick:{defaultValue:{value:"true"},description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},overflowContainer:{defaultValue:{value:"true"},description:"",name:"overflowContainer",required:!1,type:{name:"boolean"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},setOpen:{defaultValue:null,description:"",name:"setOpen",required:!1,type:{name:"((state: boolean) => void)"}},closeParent:{defaultValue:null,description:"",name:"closeParent",required:!1,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!1,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!1,type:{name:"any"}},isNested:{defaultValue:{value:"false"},description:"",name:"isNested",required:!1,type:{name:"boolean"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"any"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"any"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"any"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}}}}}catch{}try{Y.displayName="Menu",Y.__docgenInfo={description:"",displayName:"Menu",props:{menu:{defaultValue:null,description:"",name:"menu",required:!0,type:{name:"{ trigger: string; title?: string | undefined; colored?: string | boolean | undefined; small?: boolean | undefined; label?: ReactNode; component?: ReactNode; sections?: ReactNode | IMenuSection[]; ... 4 more ...; fullHeightTrigger?: boolean | undefined; }"}},contextMenu:{defaultValue:null,description:"",name:"contextMenu",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},badgeTitle:{defaultValue:null,description:"",name:"badgeTitle",required:!1,type:{name:"string"}},badgeDot:{defaultValue:{value:"false"},description:"",name:"badgeDot",required:!1,type:{name:"boolean"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}},fullHeightTrigger:{defaultValue:null,description:"",name:"fullHeightTrigger",required:!1,type:{name:"boolean"}},closeOnOptionClick:{defaultValue:{value:"true"},description:"",name:"closeOnOptionClick",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},overflowContainer:{defaultValue:{value:"true"},description:"",name:"overflowContainer",required:!1,type:{name:"boolean"}},maxHeight:{defaultValue:null,description:"",name:"maxHeight",required:!1,type:{name:"TStringOrNumber"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},setOpen:{defaultValue:null,description:"",name:"setOpen",required:!1,type:{name:"((state: boolean) => void)"}},closeParent:{defaultValue:null,description:"",name:"closeParent",required:!1,type:{name:"TEmpty"}},tree:{defaultValue:null,description:"",name:"tree",required:!1,type:{name:"any"}},path:{defaultValue:null,description:"",name:"path",required:!1,type:{name:"any"}},isNested:{defaultValue:{value:"false"},description:"",name:"isNested",required:!1,type:{name:"boolean"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"any"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"any"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"any"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}}}}}catch{}const dn=e=>{const{subActions:a,subMenuIcon:i,primary:r,testId:t,tooltip:s}=e,u=n.jsx(Q,{colored:r?!0:_e.MUTED,basic:!r,round:!0,small:!0,icon:i||R.MENU,testId:t,tooltip:s});if(a.length){const c={trigger:N.COMPONENT,component:u,sections:a.map(l=>({type:l.type??"Option",label:l.label,icon:l.icon,testId:l.testId,disabled:l.disabled,menu:l.menu,onClick:p=>{p.stopPropagation(),p.preventDefault(),C.isFunction(l.onClick)&&l.onClick(p)}}))};return n.jsx(Y,{menu:c})}return null},K=e=>{const a=x.useContext(j),{actions:i=[],closeLayer:r}=e;return n.jsx("div",{className:I(Ce.actions),children:i.map((t,s)=>{if(!((t==null?void 0:t.hidden)||!t||!Object.keys(t).length))return t.childComponent&&ne.isValidElement(t.childComponent)?n.jsx("div",{"data-testid":t.testId,children:t.childComponent},s):t.subActions?n.jsx(dn,{subActions:t.subActions,primary:t.primary,subMenuIcon:t.icon,testId:t.testId,tooltip:t.tooltip},s):n.jsx(Q,{colored:t.primary?!0:"muted",round:!0,basic:!t.primary,disabled:t.disabled,small:!0,name:String(t.label),icon:t.icon?t.icon:null,onClick:c=>{r&&r(),c.stopPropagation(),c.preventDefault(),!(t.disabled||a)&&C.isFunction(t.onClick)&&t.onClick(c)},testId:t.testId,tooltip:t.tooltip},s)})})};try{K.displayName="Actions",K.__docgenInfo={description:"",displayName:"Actions",props:{actions:{defaultValue:null,description:"",name:"actions",required:!0,type:{name:"IAction[]"}},closeLayer:{defaultValue:null,description:"",name:"closeLayer",required:!1,type:{name:"TEmpty"}}}}}catch{}export{K as A,Y as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./jsx-runtime-FsUICBgo.js";import{A as c}from"./actions-
|
|
1
|
+
import{j as p}from"./jsx-runtime-FsUICBgo.js";import{A as c}from"./actions-SGexXf58.js";import"./index-RfLt4OUa.js";import"./index-VW3EWkuE.js";import"./lodash-Bmg8FrMx.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./button-IoNblLER.js";import"./spinner-R8Il4aRe.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";const d=[{label:"Download",icon:"download",onClick:()=>{},testId:"download"},{label:"Help",icon:"help",onClick:()=>{},disabled:!0,testId:"help"},{label:"More",testId:"more",subActions:[{label:"Move Up",icon:"up",disabled:!0,onClick:()=>{},testId:"move-up"},{label:"Move Down",icon:"down",onClick:()=>{},testId:"move-down"},{type:"Menu",menu:{trigger:"Text",label:"Even more",sections:[{type:"Option",label:"Nested option 1",onClick:()=>{}},{type:"Option",label:"Another nested option",onClick:()=>{}}]}}]},{primary:!0,label:"Add",icon:"add",onClick:()=>{},testId:"add"}],O={title:"Basic/Actions",component:c,args:{actions:d,right:!1},decorators:[o=>p.jsx("div",{style:{display:"inline-flex"},children:o()})],parameters:{docs:{source:{excludeDecorators:!0}}}},m=o=>p.jsx(c,{...o}),t=m.bind({}),e=m.bind({});e.args={actions:d.map(o=>({...o,tooltip:o.label}))};var r,s,i;t.parameters={...t.parameters,docs:{...(r=t.parameters)==null?void 0:r.docs,source:{originalSource:"args => <Actions {...args} />",...(i=(s=t.parameters)==null?void 0:s.docs)==null?void 0:i.source}}};var a,l,n;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:"args => <Actions {...args} />",...(n=(l=e.parameters)==null?void 0:l.docs)==null?void 0:n.source}}};const _=["Default","Tooltip"];export{t as Default,e as Tooltip,_ as __namedExportsOrder,O as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as l}from"./index-RfLt4OUa.js";import{I as F}from"./common-types-U65vzrrz.js";import{T as w}from"./top-bar-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as l}from"./index-RfLt4OUa.js";import{I as F}from"./common-types-U65vzrrz.js";import{T as w}from"./top-bar-x_wXP6-y.js";import{S as C}from"./side-bar-GJ2tcZYY.js";import{H as n}from"./heading-cUVItwKq.js";import{B as s}from"./button-IoNblLER.js";import{D as I}from"./drawer-TM-jK3WR.js";import{L as T}from"./list-JNed2RtS.js";import{F as i}from"./field-kOZPBHf6.js";import{I as d}from"./input-iDZqV-2m.js";import{A as E}from"./accordion-6_27SROY.js";import{C as a}from"./check-box-BX5dfQFk.js";import{F as p}from"./form-row-bwoDTUga.js";import{P as R}from"./page-9-f6BzS0.js";import{R as A,C as B}from"./row-vFUhHoz5.js";import{S as m}from"./select-Z1HqJ5aU.js";import{S as u}from"./spacer-Yji9g2AW.js";import{T as k}from"./tabs-fcLbHC1n.js";import{I as L}from"./input-group-R8LoqKRn.js";import{I as U}from"./input-group-addon-BHVsW9mL.js";import"./index-VW3EWkuE.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";import"./actions-SGexXf58.js";import"./lodash-Bmg8FrMx.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./index-ugi_ZH6T.js";import"./help-icon-nI9A506M.js";import"./spinner-R8Il4aRe.js";import"./index.es-JXn3JM7k.js";import"./extends-dGVwEr9R.js";import"./redux-F5dueAP3.js";import"./objectSpread2-93s0nBry.js";import"./memoize-one.esm-hqe5SRxC.js";import"./card-0r8RRVk-.js";import"./list-heading-vjZIRKZb.js";import"./loader-TGOJBZQG.js";import"./label-RpB4JmHX.js";import"./styled-components.browser.esm-qIipjd6c.js";import"./assertThisInitialized-4q6YPdh3.js";import"./text-6KQ6ntOV.js";import"./select.input-zP5tW20f.js";const c=[{label:"Settings",value:"settings"},{label:"Simulation Results",value:"results"}],H=["30, Conductor, Casing","20, Surface, Casing","13 3/8, Intermediate, Casing","11 3/4, Surface, Casing","9 5/8, Production, Casing"],ke={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},t=()=>{const[r,g]=l.useState(!0),[f,j]=l.useState(c[0]);return e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsx(C,{options:{title:"",sections:[]}}),e.jsx(R,{padding:!1,scroll:!1,children:e.jsxs(A,{spacing:0,height:"100%",children:[e.jsx(I,{button:e.jsx(s,{onClick:()=>g(!r),round:!0,icon:F.CHEVRON_LEFT}),open:r,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(T,{drawer:!0,narrow:!r,list:{name:"AFE Simulation",items:[{id:1,name:"Simulation name here",active:!0},{id:2,name:"Ipsum"}]}})}),e.jsxs(B,{scroll:!0,padding:!0,borderLeft:!0,children:[e.jsx(n,{top:!0,children:"Simulation name here"}),e.jsx(k,{options:c,value:f,onChange:o=>{const{value:v,label:S}=o.target;j({value:v,label:S})},margin:0}),e.jsx(u,{}),e.jsxs(p,{children:[e.jsx(i,{label:"Name",children:e.jsx(d,{value:"Simulation name here",width:"200px"})}),e.jsx(i,{label:"Initial condition",children:e.jsx(m,{options:[{label:"E3 - Circulation through drillpipe",value:"e3"}],value:{label:"E3 - Circulation through drillpipe",value:"e3"},native:!0})})]}),H.map(o=>e.jsxs("div",{children:[e.jsx(E,{heading:e.jsx(n,{children:o}),managed:!0,bordered:!0,children:e.jsxs(p,{children:[e.jsx(i,{label:"Leak off @TVD 425",children:e.jsx(a,{label:"Use formation data",checked:!0})}),e.jsx(i,{children:e.jsxs(L,{children:[e.jsx(d,{width:"200px",disabled:!0,value:"1.532142857142857"}),e.jsx(U,{children:"m"})]})}),e.jsx(i,{children:e.jsx(a,{label:"Gas cap"})}),e.jsx(i,{children:e.jsx(a,{label:"Max allowable pressure buildup"})})]})}),e.jsx(u,{})]},o)),e.jsx(i,{label:"Final condition",children:e.jsx(m,{options:[{label:"Undisturbed",value:"Undisturbed"}],value:{label:"Undisturbed",value:"Undisturbed"},native:!0,width:"auto"})}),e.jsx(s,{label:"Simulate",colored:!0})]})]})})]})};var h,b,x;t.parameters={...t.parameters,docs:{...(h=t.parameters)==null?void 0:h.docs,source:{originalSource:`() => {
|
|
2
2
|
const [open, setOpen] = useState(true);
|
|
3
3
|
const [selectedTab, setSelectedTab] = useState(options[0]);
|
|
4
4
|
return <>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./jsx-runtime-FsUICBgo.js";import{B as v}from"./badge-23Ty_zBt.js";import{B as k}from"./button-
|
|
1
|
+
import{j as h}from"./jsx-runtime-FsUICBgo.js";import{B as v}from"./badge-23Ty_zBt.js";import{B as k}from"./button-IoNblLER.js";import"./index-RfLt4OUa.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./spinner-R8Il4aRe.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";const L={title:"Basic/Badge",component:v,args:{title:"3",color:"",small:!1,children:h.jsx(k,{name:"example",label:"Button",onClick:()=>{}})}},r=E=>h.jsx(v,{...E}),m=r.bind({}),e=r.bind({});e.args={small:!0};const a=r.bind({});a.args={dot:!0,title:void 0};const s=r.bind({});s.args={children:void 0};const o=r.bind({});o.args={title:null};const t=r.bind({});t.args={small:!0,title:null};var c,i,l;m.parameters={...m.parameters,docs:{...(c=m.parameters)==null?void 0:c.docs,source:{originalSource:"args => <Badge {...args} />",...(l=(i=m.parameters)==null?void 0:i.docs)==null?void 0:l.source}}};var p,d,n;e.parameters={...e.parameters,docs:{...(p=e.parameters)==null?void 0:p.docs,source:{originalSource:"args => <Badge {...args} />",...(n=(d=e.parameters)==null?void 0:d.docs)==null?void 0:n.source}}};var g,u,B;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:"args => <Badge {...args} />",...(B=(u=a.parameters)==null?void 0:u.docs)==null?void 0:B.source}}};var S,T,b;s.parameters={...s.parameters,docs:{...(S=s.parameters)==null?void 0:S.docs,source:{originalSource:"args => <Badge {...args} />",...(b=(T=s.parameters)==null?void 0:T.docs)==null?void 0:b.source}}};var f,x,j;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:"args => <Badge {...args} />",...(j=(x=o.parameters)==null?void 0:x.docs)==null?void 0:j.source}}};var D,N,_;t.parameters={...t.parameters,docs:{...(D=t.parameters)==null?void 0:D.docs,source:{originalSource:"args => <Badge {...args} />",...(_=(N=t.parameters)==null?void 0:N.docs)==null?void 0:_.source}}};const M=["Default","Small","Dot","Standalone","TestNoTitle","TestSmallNoTitle"];export{m as Default,a as Dot,e as Small,s as Standalone,o as TestNoTitle,t as TestSmallNoTitle,M as __namedExportsOrder,L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import"./index-RfLt4OUa.js";import{I as u}from"./common-types-U65vzrrz.js";import{T as h}from"./top-bar-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import"./index-RfLt4OUa.js";import{I as u}from"./common-types-U65vzrrz.js";import{T as h}from"./top-bar-x_wXP6-y.js";import{S as g}from"./side-bar-GJ2tcZYY.js";import{H as o}from"./heading-cUVItwKq.js";import{B as a}from"./button-IoNblLER.js";import{C as i}from"./card-0r8RRVk-.js";import{P as x}from"./page-9-f6BzS0.js";import{R as s,C as n}from"./row-vFUhHoz5.js";import{S as r}from"./spacer-Yji9g2AW.js";import"./index-VW3EWkuE.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";import"./actions-SGexXf58.js";import"./lodash-Bmg8FrMx.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./index-ugi_ZH6T.js";import"./drawer-TM-jK3WR.js";import"./help-icon-nI9A506M.js";import"./spinner-R8Il4aRe.js";import"./styled-components.browser.esm-qIipjd6c.js";const C=({width:p,height:c})=>e.jsx("div",{style:{background:"#ddd",width:p,height:c}}),K={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},t=()=>e.jsxs(e.Fragment,{children:[e.jsx(h,{}),e.jsx(g,{options:{title:"",sections:[]}}),e.jsxs(x,{padding:"var(--padding)",children:[e.jsxs(s,{children:[e.jsx(n,{width:"80px",children:e.jsx(C,{width:60,height:80})}),e.jsxs(n,{children:[e.jsx(o,{top:!0,children:"Blowout Simulation"}),e.jsx(a,{colored:!0,label:"Save & run simulation"})]}),e.jsx(n,{flex:!1,children:e.jsx(a,{onClick:()=>{},round:!0,icon:u.HELP})})]}),e.jsx(r,{}),e.jsxs(s,{children:[e.jsxs(n,{children:[e.jsx(i,{heading:e.jsx(o,{children:"Reservoir Zones"}),children:"Content"}),e.jsx(r,{}),e.jsx(i,{heading:e.jsx(o,{children:"Simulation Models"}),children:"Content"}),e.jsx(r,{}),e.jsx(i,{heading:e.jsx(o,{children:"Simulation Options"}),children:"Content"})]}),e.jsxs(n,{children:[e.jsx(i,{heading:e.jsx(o,{children:"Drill String"}),children:"Content"}),e.jsx(r,{}),e.jsx(i,{heading:e.jsx(o,{children:"Surface Roughness"}),children:"Content"}),e.jsx(r,{}),e.jsx(i,{heading:e.jsx(o,{children:"Weighted Rates"}),children:"Content"})]})]})]})]});var d,l,m;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`() => {
|
|
2
2
|
return <>
|
|
3
3
|
<TopBar />
|
|
4
4
|
<SideBar options={{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./jsx-runtime-FsUICBgo.js";import{r as I}from"./index-RfLt4OUa.js";import{c as h}from"./index-VW3EWkuE.js";import{C as t,G as m}from"./common-types-U65vzrrz.js";import{D as M}from"./disabled-context-urNQThQz.js";import{S as j}from"./spinner-R8Il4aRe.js";import{I as w}from"./icon-y1a2N5SZ.js";import{T as C}from"./tooltip-
|
|
1
|
+
import{j as a}from"./jsx-runtime-FsUICBgo.js";import{r as I}from"./index-RfLt4OUa.js";import{c as h}from"./index-VW3EWkuE.js";import{C as t,G as m}from"./common-types-U65vzrrz.js";import{D as M}from"./disabled-context-urNQThQz.js";import{S as j}from"./spinner-R8Il4aRe.js";import{I as w}from"./icon-y1a2N5SZ.js";import{T as C}from"./tooltip-ZHdi6rl-.js";const F="_inputInTable_1rzkf_1",R="_inputHover_1rzkf_13",U="_inputFocus_1rzkf_18",D="_inputError_1rzkf_25",L="_inputWarning_1rzkf_26",G="_inputDisabled_1rzkf_61",H="_hideScrollbars_1rzkf_67",W="_button_1rzkf_100",A="_active_1rzkf_135",J="_green_1rzkf_135",K="_red_1rzkf_135",P="_orange_1rzkf_135",Q="_icon_1rzkf_147",X="_iconOnly_1rzkf_153",Y="_basic_1rzkf_163",Z="_muted_1rzkf_169",$="_disabled_1rzkf_188",ee="_small_1rzkf_198",re="_pill_1rzkf_203",ae="_round_1rzkf_204",ne="_error_1rzkf_276",te="_warning_1rzkf_293",le="_inverted_1rzkf_310",se="_groupOrderFirst_1rzkf_340",ie="_groupOrderMiddle_1rzkf_341",oe="_groupOrderLast_1rzkf_342",e={inputInTable:F,inputHover:R,inputFocus:U,inputError:D,inputWarning:L,inputDisabled:G,hideScrollbars:H,button:W,active:A,green:J,red:K,orange:P,icon:Q,iconOnly:X,basic:Y,muted:Z,disabled:$,small:ee,pill:re,round:ae,error:ne,warning:te,inverted:le,groupOrderFirst:se,groupOrderMiddle:ie,groupOrderLast:oe};var l=(r=>(r.SUBMIT="submit",r.BUTTON="button",r.RESET="reset",r))(l||{});const ue=({children:r,tooltip:n=null})=>n?a.jsx(C,{text:n,display:"inline-flex",children:r}):a.jsx(a.Fragment,{children:r}),g=({active:r=!1,basic:n=!1,colored:s=!1,disabled:u=!1,groupOrder:d=null,icon:i=null,label:c="",loading:p=!1,name:b,pill:v=!1,round:y=!1,small:o=!1,styles:k="",width:z="",title:f="",type:O=l.BUTTON,onClick:q=()=>{},error:T,warning:V,testId:x,tooltip:E,inverted:S=!1})=>{const _=I.useContext(M),N=(()=>{if(s)switch(s){case t.DANGER:case t.RED:return e.red;case t.SUCCESS:case t.GREEN:return e.green;case t.MUTED:return e.muted;default:return e.orange}return""})(),B=(()=>{if(d)switch(d){case m.FIRST:return e.groupOrderFirst;case m.LAST:return e.groupOrderLast;default:return e.groupOrderMiddle}return""})();return a.jsx(ue,{tooltip:E,children:a.jsxs("button",{type:O===l.SUBMIT?l.SUBMIT:l.BUTTON,className:h(e.button,r?e.active:"",n?e.basic:"",N,u||_?e.disabled:"",(i||p)&&!c?e.iconOnly:"",S?e.inverted:"",B,v?e.pill:"",y?e.round:"",o?e.small:"",T?e.error:V?e.warning:"",k),disabled:u||_,name:b??"",onClick:q,...f?{title:f}:{},style:{width:z},"data-testid":x,children:[i&&a.jsx("span",{className:e.icon,children:a.jsx(w,{icon:i})}),p&&a.jsx("span",{className:e.icon,children:a.jsx(j,{small:!o,tiny:o,dark:!s&&!n,colored:n})}),c]})})};try{g.displayName="Button",g.__docgenInfo={description:"",displayName:"Button",props:{active:{defaultValue:{value:"false"},description:"",name:"active",required:!1,type:{name:"boolean"}},basic:{defaultValue:{value:"false"},description:"",name:"basic",required:!1,type:{name:"boolean"}},colored:{defaultValue:{value:"false"},description:"",name:"colored",required:!1,type:{name:"string | boolean"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:{value:"null"},description:"",name:"groupOrder",required:!1,type:{name:"string | null"}},icon:{defaultValue:{value:"null"},description:"",name:"icon",required:!1,type:{name:"ReactNode"}},label:{defaultValue:{value:""},description:"",name:"label",required:!1,type:{name:"ReactNode"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"string | null"}},onClick:{defaultValue:{value:"() => {}"},description:"",name:"onClick",required:!1,type:{name:"((evt: MouseEvent<HTMLButtonElement, MouseEvent>) => void)"}},pill:{defaultValue:{value:"false"},description:"",name:"pill",required:!1,type:{name:"boolean"}},round:{defaultValue:{value:"false"},description:"",name:"round",required:!1,type:{name:"boolean"}},small:{defaultValue:{value:"false"},description:"",name:"small",required:!1,type:{name:"boolean"}},styles:{defaultValue:{value:""},description:"",name:"styles",required:!1,type:{name:"string"}},width:{defaultValue:{value:""},description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},title:{defaultValue:{value:""},description:"",name:"title",required:!1,type:{name:"string"}},type:{defaultValue:{value:"ButtonType.BUTTON"},description:"",name:"type",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"string"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},tooltip:{defaultValue:{value:"null"},description:"",name:"tooltip",required:!1,type:{name:"ReactNode"}},inverted:{defaultValue:{value:"false"},description:"",name:"inverted",required:!1,type:{name:"boolean"}}}}}catch{}export{g as B,l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./jsx-runtime-FsUICBgo.js";import{r as H}from"./index-RfLt4OUa.js";import{G as u}from"./common-types-U65vzrrz.js";import{D as P}from"./disabled-context-urNQThQz.js";import{i as c,g as R}from"./types-5uVBABF4.js";import{B as W}from"./button-
|
|
1
|
+
import{j as n}from"./jsx-runtime-FsUICBgo.js";import{r as H}from"./index-RfLt4OUa.js";import{G as u}from"./common-types-U65vzrrz.js";import{D as P}from"./disabled-context-urNQThQz.js";import{i as c,g as R}from"./types-5uVBABF4.js";import{B as W}from"./button-IoNblLER.js";import{T as K}from"./tooltip-ZHdi6rl-.js";const M="_label_iu2wi_1",z="_buttonGroup_iu2wi_11",x={label:M,buttonGroup:z},h=p=>{const{basic:j=!1,items:m=[],header:f="",onSelected:_=()=>{},small:B=!1,value:g="",testId:T=void 0,disabled:b}=p,v=H.useContext(P),I=(e,t,r,s,a)=>{e.preventDefault(),e.stopPropagation(),!(b||a||v)&&_(t,r,s)},V=(e,t)=>t==="string"?e:t==="object"?e.label:t==="array"?e[1]:null,G=(e,t)=>t==="string"?e:t==="object"?e.value??"":t==="array"?e[0]??"":"",S=(e,t,r)=>t==="object"&&"key"in e?e.key:r,q=(e,t)=>t==="object"?e.hidden:!1,F=(e,t)=>t==="object"?e.icon:void 0,N=(e,t,r)=>e==="object"?String(t)===String(g):r===g,k=()=>{if(f)return n.jsx("label",{className:x.label,children:f})},C=()=>m.map((e,t)=>{const r=R(e),s=t===0?u.FIRST:t===m.length-1?u.LAST:u.MIDDLE,a=V(e,r),i=G(e,r),y=S(e,r,i),D=q(e,r),L=F(e,r),w=N(r,y,i),{error:l,maxTooltipWidth:O,testId:E,tooltip:d,warning:o}=e;return D?null:n.jsx(K,{error:!!l,warning:!!o,text:d||l||o,maxWidth:O,display:"block",enabled:d&&c(d)||l&&c(l)||o&&c(o)||!1,placement:"bottom-center",children:n.jsx(W,{active:w,basic:j,disabled:b||e.disabled,groupOrder:s,icon:L,label:a,onClick:A=>{I(A,y,i,typeof a=="string"?a:"",e.disabled||!1)},small:B,testId:E})},t)});return n.jsx("div",{children:n.jsxs("div",{children:[k(),n.jsx("div",{className:x.buttonGroup,"data-testid":T,children:C()})]})})};try{h.displayName="ButtonGroup",h.__docgenInfo={description:"",displayName:"ButtonGroup",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},basic:{defaultValue:null,description:"",name:"basic",required:!1,type:{name:"boolean"}},items:{defaultValue:null,description:"",name:"items",required:!1,type:{name:"string[] | (string[] | IBtnGroupItemProps)[]"}},header:{defaultValue:null,description:"",name:"header",required:!1,type:{name:"string"}},onSelected:{defaultValue:null,description:"",name:"onSelected",required:!1,type:{name:"TFunction"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"TStringOrNumber"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}export{h as B};
|
package/dist/storybook/assets/{button-group.stories-tLZpLTfD.js → button-group.stories-DG3i2d7K.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as B}from"./jsx-runtime-FsUICBgo.js";import{B as G}from"./button-group-
|
|
1
|
+
import{j as B}from"./jsx-runtime-FsUICBgo.js";import{B as G}from"./button-group-KeeGgC4K.js";import"./index-RfLt4OUa.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./types-5uVBABF4.js";import"./lodash-Bmg8FrMx.js";import"./button-IoNblLER.js";import"./index-VW3EWkuE.js";import"./spinner-R8Il4aRe.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";const I=[{key:"0",label:"Aardvarks",value:"termites"},{key:"1",label:"Kangaroos",value:"grass"},{key:"2",label:"Monkeys",value:"bananas"},{key:"3",label:"Possums",value:"slugs",hidden:!0},{key:"4",label:"Pandas",value:"bamboo",disabled:!0}],K=[{key:"0",label:"Upload",value:"upload",icon:"upload"},{key:"1",label:"Delete",value:"delete",icon:"delete"},{key:"2",label:"Help",value:"help",icon:"help"}],M=["One","Two","Three"],P=[["first_item","One"],["second_item","Two"],["third_item","Three"]],F=[{key:"0",label:"Aardvarks",value:"termites",tooltip:"Eats 50k termites / night"},{key:"1",label:"Kangaroos",value:"grass",tooltip:B.jsx("span",{children:"Babies are called joeys"})},{key:"2",label:"Monkeys",value:"bananas",warning:"A bit cheeky"},{key:"3",label:"Pandas",value:"bamboo",disabled:!0,tooltip:"Extinct"}],{useArgs:R}=__STORYBOOK_MODULE_ADDONS__,ae={title:"Forms/ButtonGroup",component:G,args:{disabled:!1,items:I,value:"0",small:!1,testId:void 0,onSelected:()=>{}}},e=D=>{const[U,N]=R(),E=w=>{N({value:w})};return B.jsx(G,{...D,onSelected:E})},l=e.bind({}),n=e.bind({});n.args={items:K};const a=e.bind({});a.args={items:F};const t=e.bind({});t.args={disabled:!0};const o=e.bind({});o.args={small:!0};const r=e.bind({});r.args={items:M};r.parameters={docs:{description:{story:"For simple cases when button key, label and value are the same."}}};const s=e.bind({});s.args={items:P};s.parameters={docs:{description:{story:"Avoid this deprecated legacy usage (still supported, but may be removed in future)."}}};var i,u,d;l.parameters={...l.parameters,docs:{...(i=l.parameters)==null?void 0:i.docs,source:{originalSource:`args => {
|
|
2
2
|
const [_, updateArgs] = useArgs();
|
|
3
3
|
const handleChange = (evt: TStringOrNumber) => {
|
|
4
4
|
updateArgs({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{F as nr}from"./flex-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{F as nr}from"./flex-ZVra76N-.js";import{B as o,a as cr}from"./button-IoNblLER.js";import"./index-RfLt4OUa.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./spinner-R8Il4aRe.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";const hr={title:"Forms/Button",component:o,parameters:{canvas:{page:null}},argTypes:{colored:{control:{type:"inline-radio"},options:{off:!1,primary:"primary",success:"success",danger:"danger",muted:"muted"}},icon:{control:{type:"inline-radio"},options:{off:void 0,on:"delete"}}},args:{label:"Label"}},r=x=>e.jsxs(nr,{gap:"var(--padding-sm)",children:[e.jsx(o,{...x}),e.jsx(o,{colored:!0,...x}),e.jsx(o,{colored:"success",...x}),e.jsx(o,{colored:"danger",...x})]}),F=r.bind({}),s=r.bind({});s.args={small:!0};const a=r.bind({});a.args={basic:!0};const t=r.bind({});t.args={active:!0};const n=r.bind({});n.args={disabled:!0};const c=r.bind({});c.args={icon:"delete"};const d=r.bind({});d.args={round:!0,icon:"delete",label:void 0};const l=r.bind({});l.args={round:!0,icon:"delete",label:void 0,colored:"muted",basic:!0};const u=r.bind({});u.args={width:"100%"};const g=r.bind({});g.args={type:cr.SUBMIT};const p=r.bind({});p.args={label:"Lorem ipsum dolor est compendum",width:"100px",small:!0};const i=r.bind({});i.args={tooltip:"Tooltip goes here"};const m=r.bind({});m.args={label:"Long label goes here lorem ipsum dolor est lorem ipsum",width:"200px"};const B=r.bind({});B.args={label:"Long label goes here lorem ipsum dolor est lorem ipsum",width:"200px",small:!0};var b,S,v;F.parameters={...F.parameters,docs:{...(b=F.parameters)==null?void 0:b.docs,source:{originalSource:`args => <Flex gap="var(--padding-sm)">
|
|
2
2
|
<Button {...args} />
|
|
3
3
|
<Button colored {...args} />
|
|
4
4
|
<Button colored="success" {...args} />
|
package/dist/storybook/assets/{buttons-and-links-8jrNvUVe.js → buttons-and-links-0W-Lo4la.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-FsUICBgo.js";import{M as s,C as e}from"./index-
|
|
1
|
+
import{j as t}from"./jsx-runtime-FsUICBgo.js";import{M as s,C as e}from"./index-vyBfFCw4.js";import{Default as a,Basic as c}from"./button.stories-R9_1tl9l.js";import{Default as d}from"./text-link.stories-kjfUeFtk.js";import{useMDXComponents as r}from"./index-4YXVTraW.js";import"./index-RfLt4OUa.js";import"./iframe-f7RfrxbO.js";import"../sb-preview/runtime.js";import"./index-miLrID2P.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";import"./index-gM75B7fB.js";import"./flex-ZVra76N-.js";import"./button-IoNblLER.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./spinner-R8Il4aRe.js";import"./icon-y1a2N5SZ.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-ZHdi6rl-.js";import"./text-6KQ6ntOV.js";function i(n){const o=Object.assign({h1:"h1",h2:"h2",p:"p",code:"code"},r(),n.components);return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Buttons & Links"}),`
|
|
2
2
|
`,t.jsx(o.h1,{id:"buttons--links",children:"Buttons & Links"}),`
|
|
3
3
|
`,t.jsx(e,{of:a}),`
|
|
4
4
|
`,t.jsx(o.h2,{id:"a-single-primary-button",children:"A single primary button"}),`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./jsx-runtime-FsUICBgo.js";import{C as S}from"./card-0r8RRVk-.js";import{H as N}from"./heading-
|
|
1
|
+
import{j as d}from"./jsx-runtime-FsUICBgo.js";import{C as S}from"./card-0r8RRVk-.js";import{H as N}from"./heading-cUVItwKq.js";import"./index-RfLt4OUa.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./help-icon-nI9A506M.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";const z={title:"Layout/Card",component:S,args:{raised:!1,children:"Content goes here",padding:!0,bordered:!0}},o=W=>d.jsx(S,{...W}),t=o.bind({}),r=o.bind({});r.args={heading:d.jsx(N,{children:"Heading"})};const e=o.bind({});e.args={heading:d.jsx(N,{onClickHelp:()=>console.log("help!"),children:"Heading"})};const a=o.bind({});a.args={padding:!1};const s=o.bind({});s.args={bordered:!1};var i,c,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:"args => <Card {...args} />",...(p=(c=t.parameters)==null?void 0:c.docs)==null?void 0:p.source}}};var n,m,g;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:"args => <Card {...args} />",...(g=(m=r.parameters)==null?void 0:m.docs)==null?void 0:g.source}}};var l,u,h;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:"args => <Card {...args} />",...(h=(u=e.parameters)==null?void 0:u.docs)==null?void 0:h.source}}};var H,C,f;a.parameters={...a.parameters,docs:{...(H=a.parameters)==null?void 0:H.docs,source:{originalSource:"args => <Card {...args} />",...(f=(C=a.parameters)==null?void 0:C.docs)==null?void 0:f.source}}};var b,x,j;s.parameters={...s.parameters,docs:{...(b=s.parameters)==null?void 0:b.docs,source:{originalSource:"args => <Card {...args} />",...(j=(x=s.parameters)==null?void 0:x.docs)==null?void 0:j.source}}};const A=["Default","WithHeading","WithHelpHeading","NoPadding","NoBorder"];export{t as Default,s as NoBorder,a as NoPadding,r as WithHeading,e as WithHelpHeading,A as __namedExportsOrder,z as default};
|
package/dist/storybook/assets/{casing-loads.stories-wK86cYgL.js → casing-loads.stories--f3o5XWs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as u}from"./index-RfLt4OUa.js";import{I as f}from"./common-types-U65vzrrz.js";import{T}from"./top-bar-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as u}from"./index-RfLt4OUa.js";import{I as f}from"./common-types-U65vzrrz.js";import{T}from"./top-bar-x_wXP6-y.js";import{S as I}from"./side-bar-GJ2tcZYY.js";import{H as r}from"./heading-cUVItwKq.js";import{B as n}from"./button-IoNblLER.js";import{D as g}from"./drawer-TM-jK3WR.js";import{L as O}from"./list-JNed2RtS.js";import{F as a}from"./field-kOZPBHf6.js";import{I as o}from"./input-iDZqV-2m.js";import{M as D,D as E}from"./dialog-dekS0lUR.js";import{C as H}from"./check-box-BX5dfQFk.js";import{F as p}from"./form-row-bwoDTUga.js";import{P as k}from"./page-9-f6BzS0.js";import{R as y,C as R}from"./row-vFUhHoz5.js";import{S as d}from"./select-Z1HqJ5aU.js";import{S as l}from"./spacer-Yji9g2AW.js";import{T as B}from"./tabs-fcLbHC1n.js";import{T as M}from"./table-KrWSzq7G.js";import"./index-VW3EWkuE.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";import"./actions-SGexXf58.js";import"./lodash-Bmg8FrMx.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./index-ugi_ZH6T.js";import"./help-icon-nI9A506M.js";import"./spinner-R8Il4aRe.js";import"./index.es-JXn3JM7k.js";import"./extends-dGVwEr9R.js";import"./redux-F5dueAP3.js";import"./objectSpread2-93s0nBry.js";import"./memoize-one.esm-hqe5SRxC.js";import"./card-0r8RRVk-.js";import"./list-heading-vjZIRKZb.js";import"./loader-TGOJBZQG.js";import"./label-RpB4JmHX.js";import"./portal-zPiHHKoC.js";import"./styled-components.browser.esm-qIipjd6c.js";import"./assertThisInitialized-4q6YPdh3.js";import"./text-6KQ6ntOV.js";import"./select.input-zP5tW20f.js";import"./pagination-Eaj_UOBW.js";import"./input-group-R8LoqKRn.js";import"./input-group-addon-BHVsW9mL.js";import"./number-input-wURqWy_O.js";import"./index-qZmQ7nA9.js";import"./index-cCpkwrS5.js";import"./slider-_5NQKbM-.js";import"./popover-uAo1e4-D.js";const ze={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},s=()=>{const[v,i]=u.useState(!1),C=()=>e.jsx("div",{style:{color:"#aaa",display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",overflow:"hidden",top:0,left:0,right:0,bottom:0},children:"SCHEMATIC"}),m=[{label:"Casing Loads",value:"casingloads"},{label:"Plot Charts",value:"charts"}],j={name:"Casing Loads",items:[{id:1,name:"Sections",type:"Heading"},{id:2,name:'30" Conductor Casing',active:!0},{id:3,name:"Ipsum"},{id:4,name:"Dolor"}]},L={columnWidths:["auto","auto","auto","auto","1%"],headers:[{cells:[{value:"Load case name"},{value:"Internal profile"},{value:"External profile"},{value:"Temperature profile"},{value:""}]}],rows:[{cells:[{value:"Load case 1"},{value:"Profile 1"},{value:"Profile 2"},{value:"Profile 3"},{value:"Edit",type:"Link",onClick:()=>i(!0)}]},{cells:[{value:"Load case 2"},{value:"Profile 1"},{value:"Profile 2"},{value:"Profile 3"},{value:"Edit",type:"Link",onClick:()=>i(!0)}]}]},F=()=>e.jsxs(e.Fragment,{children:[e.jsx(a,{label:"Name",children:e.jsx(o,{value:"Load case 1"})}),e.jsx(l,{}),e.jsx(r,{children:"Internal Profile"}),e.jsx(l,{}),e.jsxs(p,{children:[e.jsx(a,{label:"Profile",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Profile 1",value:"1"},{label:"Profile 2",value:"2"}]})}),e.jsx(a,{label:"Influx depth",children:e.jsx(o,{})}),e.jsx(a,{label:"Gas gradient",children:e.jsx(o,{})}),e.jsx(a,{label:"Mud weight",children:e.jsx(o,{})}),e.jsx(a,{label:"Input n",children:e.jsx(o,{})}),e.jsx(a,{children:e.jsx(H,{label:"Limit gas at shoe"})})]}),e.jsx(l,{}),e.jsx(r,{children:"External Profile"}),e.jsx(l,{}),e.jsxs(p,{children:[e.jsx(a,{label:"Profile",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Profile 1",value:"1"},{label:"Profile 2",value:"2"}]})}),e.jsx(a,{label:"FG above TOC",children:e.jsx(o,{})}),e.jsx(a,{label:"FG below TOC",children:e.jsx(o,{})})]}),e.jsx(l,{}),e.jsx(r,{children:"Temperature Profile"}),e.jsx(l,{}),e.jsxs(p,{children:[e.jsx(a,{label:"Profile",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Profile 1",value:"1"},{label:"Profile 2",value:"2"}]})}),e.jsx(a,{label:"Custome table",children:e.jsx(d,{native:!0,width:"auto",options:[{label:"Custome table 1",value:"1"},{label:"Custome table 2",value:"2"}]})})]})]}),P=()=>{const[t,c]=u.useState(!0);return e.jsx(g,{button:e.jsx(n,{onClick:()=>c(!t),round:!0,icon:f.CHEVRON_LEFT}),open:t,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(O,{drawer:!0,narrow:!t,list:j})})},w=()=>{const[t,c]=u.useState(!0);return e.jsx(g,{right:!0,background:"white",button:e.jsx(n,{onClick:()=>c(!t),round:!0,icon:f.CHEVRON_RIGHT}),open:t,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(C,{})})},S=()=>e.jsx(D,{visible:v,children:e.jsx(E,{dialog:{heading:"Load case 1",content:e.jsx(F,{}),footer:e.jsxs(e.Fragment,{children:[e.jsx(n,{label:"Save",colored:!0,onClick:()=>i(!1)}),e.jsx(n,{label:"Cancel",onClick:()=>i(!1)})]}),onClose:()=>i(!1)}})});return e.jsxs(e.Fragment,{children:[e.jsx(T,{}),e.jsx(I,{options:{title:"",sections:[]}}),e.jsx(k,{padding:!1,scroll:!1,children:e.jsxs(y,{spacing:0,flex:!0,children:[e.jsx(P,{}),e.jsxs(R,{borderLeft:!0,borderRight:!0,padding:!0,scroll:!0,children:[e.jsx(r,{top:!0,marginBottom:0,children:'30" Conductor Casing'}),e.jsx(B,{margin:!1,options:m,value:m[0]}),e.jsx(l,{}),e.jsx(M,{table:L})]}),e.jsx(w,{})]})}),e.jsx(S,{})]})};var b,h,x;s.parameters={...s.parameters,docs:{...(b=s.parameters)==null?void 0:b.docs,source:{originalSource:`() => {
|
|
2
2
|
const [dialogOpen, setDialogOpen] = useState(false);
|
|
3
3
|
const SchematicPlaceholder = () => <div style={{
|
|
4
4
|
color: '#aaa',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as D}from"./index-RfLt4OUa.js";import{T as W}from"./table-
|
|
1
|
+
import{j as e}from"./jsx-runtime-FsUICBgo.js";import{r as D}from"./index-RfLt4OUa.js";import{T as W}from"./table-KrWSzq7G.js";import{F as ze}from"./field-kOZPBHf6.js";import{B as F}from"./button-IoNblLER.js";import{I as Xe}from"./input-iDZqV-2m.js";import{F as Ge}from"./flex-ZVra76N-.js";import{t as Ke,s as Ne,u as Qe,v as Ve,w as Ye,x as Ze,y as $e,z as er,A as rr,B as ar,C as sr,D as tr,E as qe,F as or,G as nr,H as lr,I as ir,J as pr}from"./table.stories-data-2BZDVr2X.js";import"./index-VW3EWkuE.js";import"./index.es-JXn3JM7k.js";import"./inheritsLoose-Y9jOMJLd.js";import"./extends-dGVwEr9R.js";import"./redux-F5dueAP3.js";import"./objectSpread2-93s0nBry.js";import"./index-miLrID2P.js";import"./memoize-one.esm-hqe5SRxC.js";import"./icon-y1a2N5SZ.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";import"./lodash-Bmg8FrMx.js";import"./actions-SGexXf58.js";import"./common-types-U65vzrrz.js";import"./tooltip-ZHdi6rl-.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./heading-cUVItwKq.js";import"./help-icon-nI9A506M.js";import"./pagination-Eaj_UOBW.js";import"./select-Z1HqJ5aU.js";import"./assertThisInitialized-4q6YPdh3.js";import"./text-6KQ6ntOV.js";import"./select.input-zP5tW20f.js";import"./input-group-R8LoqKRn.js";import"./input-group-addon-BHVsW9mL.js";import"./number-input-wURqWy_O.js";import"./index-qZmQ7nA9.js";import"./index-cCpkwrS5.js";import"./check-box-BX5dfQFk.js";import"./slider-_5NQKbM-.js";import"./index-ugi_ZH6T.js";import"./popover-uAo1e4-D.js";import"./label-RpB4JmHX.js";import"./spinner-R8Il4aRe.js";const ra={title:"Basic/Table/Cell",component:W,args:{table:{...Ke}}},r=t=>e.jsx(W,{...t}),d=r.bind({});d.args={table:Ne};const m=r.bind({});m.args={table:Qe};const u=r.bind({});u.args={table:Ve};const b=r.bind({});b.args={table:Ye};const g=r.bind({});g.args={table:Ze};const v=r.bind({});v.args={table:$e};const x=r.bind({});x.args={table:er};const C=r.bind({});C.args={table:rr};const h=r.bind({});h.args={table:ar};const S=r.bind({});S.args={table:sr};const f=r.bind({});f.args={table:tr};const j=r.bind({});j.args={table:qe};const y=r.bind({});y.args={table:or};const T=r.bind({});T.args={table:nr};const k=r.bind({});k.args={table:lr};const l=r.bind({});l.args={table:ir};l.parameters={docs:{description:{story:"Setting `breakWord: true` on a cell will allow very long text strings to break"}}};const w=()=>{const t=["Section","Width","Height"];let p=["","m","m"],A=[...Array(10).keys()].map((n,a)=>[a,a*2,a*2]);const B=()=>{const n=({close:s,value:P})=>e.jsxs(e.Fragment,{children:[e.jsx(ze,{label:"Input",children:e.jsx(Xe,{value:P,width:"100%"})}),e.jsxs(Ge,{gap:!0,children:[e.jsx(F,{colored:!0,label:"Save",onClick:()=>{}}),e.jsx(F,{label:"Cancel",onClick:s})]})]}),a={fixedWidth:"100%",headers:[{cells:t.map(s=>({value:s}))},{cells:[{},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[1],type:"Unit"},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[2],type:"Unit"}]}],rows:A.map((s,P)=>({cells:[...Array(3).keys()].map((o,c)=>({value:s[c],type:"Popover",content:e.jsx(n,{value:s[c]})}))}))};return e.jsx(W,{table:a})};return e.jsx(B,{})},I=()=>{const t=["Section","Width","Height"];let p=["","m","m"],A=[...Array(10).keys()].map((n,a)=>[a,a*2,a*2]);const B=()=>{const[n,a]=D.useState(!1),s=({close:o,value:c})=>{D.useEffect(()=>{n||a(!0)},[]);const E=()=>{a(!1),o()};return e.jsxs(e.Fragment,{children:[e.jsx(ze,{label:"Input",children:e.jsx(Xe,{value:c,width:"100%"})}),e.jsxs(Ge,{gap:!0,children:[e.jsx(F,{colored:!0,label:"Save",onClick:E}),e.jsx(F,{label:"Cancel",onClick:E})]})]})},P={headers:[{cells:t.map(o=>({value:o}))},{cells:[{},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[1],type:"Unit"},{menu:[{label:"m",value:"m"},{label:"ft",value:"ft"}],value:p[2],type:"Unit"}]}],rows:A.map((o,c)=>({cells:[...Array(3).keys()].map((E,U)=>({value:o[U],type:"Popover",disabled:n,closeOnOutsideClick:!1,content:e.jsx(s,{value:o[U]})}))}))};return e.jsx(W,{table:P})};return e.jsx(B,{})},O=r.bind({});O.args={table:pr};const i=r.bind({});i.args={table:{...qe,name:"Food"}};i.decorators=[t=>e.jsx("div",{style:{width:180,height:180,overflow:"hidden",resize:"both"},children:e.jsx(t,{})})];var L,R,H;d.parameters={...d.parameters,docs:{...(L=d.parameters)==null?void 0:L.docs,source:{originalSource:`args => {
|
|
2
2
|
return <Table
|
|
3
3
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4
4
|
{...args} />;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./jsx-runtime-FsUICBgo.js";import{r as k}from"./index-RfLt4OUa.js";import{c as g}from"./index-VW3EWkuE.js";import{I as v}from"./common-types-U65vzrrz.js";import{D as C}from"./disabled-context-urNQThQz.js";import{H as q}from"./help-icon
|
|
1
|
+
import{j as a}from"./jsx-runtime-FsUICBgo.js";import{r as k}from"./index-RfLt4OUa.js";import{c as g}from"./index-VW3EWkuE.js";import{I as v}from"./common-types-U65vzrrz.js";import{D as C}from"./disabled-context-urNQThQz.js";import{H as q}from"./help-icon-nI9A506M.js";import{I as V}from"./icon-y1a2N5SZ.js";const E="_checkbox_1ybyr_1",T="_noLabel_1ybyr_17",j="_small_1ybyr_20",M="_checkmark_1ybyr_43",H="_disabled_1ybyr_67",L="_noMargin_1ybyr_81",N="_isInTable_1ybyr_84",B="_helpIconEnabled_1ybyr_87",e={checkbox:E,noLabel:T,small:j,checkmark:M,disabled:H,noMargin:L,isInTable:N,helpIconEnabled:B},u=({noMargin:r=!1,dataix:m=0,isInTable:p=!1,tabIndex:b=0,checked:l=!1,name:n,label:i="",disabled:f=!1,small:y=!1,onChange:_,testId:x,value:D,helpText:o,onClickHelp:d})=>{const h=k.useContext(C),I=o||d,s=f||h;return a.jsxs("div",{className:g(e.checkbox,r&&e.noMargin,p&&e.isInTable,s&&e.disabled,y&&e.small,!i&&e.noLabel),"data-ix":m,onClick:c=>{if(!s){const t=c.target;t.name=n,t.value=!l,t.checked=!l,_(c)}},"data-testid":x,children:[a.jsx("input",{type:"checkbox",tabIndex:b,checked:l,name:n,onChange:()=>{},disabled:s}),a.jsxs("label",{htmlFor:n,children:[a.jsx("span",{className:e.checkmark,children:a.jsx(V,{icon:v.CHECK})}),i]}),I&&a.jsx("div",{className:e.helpIconEnabled,onClick:d,children:a.jsx(q,{text:o})})]})};try{u.displayName="CheckBox",u.__docgenInfo={description:"",displayName:"CheckBox",props:{checked:{defaultValue:{value:"false"},description:"",name:"checked",required:!1,type:{name:"boolean"}},isInTable:{defaultValue:{value:"false"},description:"",name:"isInTable",required:!1,type:{name:"boolean"}},label:{defaultValue:{value:""},description:"",name:"label",required:!1,type:{name:"string | null"}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"string"}},noMargin:{defaultValue:{value:"false"},description:"",name:"noMargin",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(evt: ChangeEvent<HTMLInputElement>) => void"}},tabIndex:{defaultValue:{value:"0"},description:"",name:"tabIndex",required:!1,type:{name:"number"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},small:{defaultValue:{value:"false"},description:"",name:"small",required:!1,type:{name:"boolean"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},dataix:{defaultValue:{value:"0"},description:"",name:"dataix",required:!1,type:{name:"number"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string"}},helpText:{defaultValue:null,description:"",name:"helpText",required:!1,type:{name:"string"}},onClickHelp:{defaultValue:null,description:"",name:"onClickHelp",required:!1,type:{name:"TEmpty"}}}}}catch{}export{u as C};
|
package/dist/storybook/assets/{check-box.stories-0XCykxnz.js → check-box.stories-FNs72smP.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Y}from"./jsx-runtime-FsUICBgo.js";import{R as w}from"./index-RfLt4OUa.js";import{C as u}from"./check-box-
|
|
1
|
+
import{j as Y}from"./jsx-runtime-FsUICBgo.js";import{R as w}from"./index-RfLt4OUa.js";import{C as u}from"./check-box-BX5dfQFk.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./help-icon-nI9A506M.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";const{useArgs:z}=__STORYBOOK_MODULE_ADDONS__,ce={title:"Forms/CheckBox",component:u,args:{disabled:!1,label:"Label"}},n=g=>{const[{checked:h},e]=z(),s=()=>{e({checked:!h})};return Y.jsx(u,{...g,onChange:s})},p=n.bind({}),r=n.bind({});r.args={small:!0};const a=n.bind({});a.args={disabled:!0};const c=n.bind({});c.args={checked:!0,disabled:!0};const t=n.bind({});t.args={label:null};const o=n.bind({});o.args={helpText:"Help text"};const d=n.bind({});d.args={onClickHelp:()=>console.log("Help clicked")};const l=n.bind({});l.args={helpText:"Help text",disabled:!0};const i=()=>{const[g,h]=w.useState([]);return["1","2","3","4"].map(e=>Y.jsx(u,{label:`Label ${e}`,checked:g.includes(e),onChange:()=>{h(s=>s.includes(e)?s.filter(q=>q!==e):[...s,e])}},e))};var m,k,C;p.parameters={...p.parameters,docs:{...(m=p.parameters)==null?void 0:m.docs,source:{originalSource:`args => {
|
|
2
2
|
const [{
|
|
3
3
|
checked
|
|
4
4
|
}, updateArgs] = useArgs();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i}from"./iframe-
|
|
1
|
+
import{_ as i}from"./iframe-f7RfrxbO.js";import{R as t,r as p}from"./index-RfLt4OUa.js";import{r as l,u}from"./react-16-hgR7FrAp.js";import{b as h,A as E,H as d,D as x}from"./index-vyBfFCw4.js";var D={code:h,a:E,...d},_=class extends p.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r){let{showException:e}=this.props;e(r)}render(){let{hasError:r}=this.state,{children:e}=this.props;return r?null:t.createElement(t.Fragment,null,e)}},R=class{constructor(){this.render=async(r,e,o)=>{let n={...D,...e==null?void 0:e.components},s=x;return new Promise((a,m)=>{i(()=>import("./index-4YXVTraW.js"),__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:c})=>l(t.createElement(_,{showException:m,key:Math.random()},t.createElement(c,{components:n},t.createElement(s,{context:r,docsParameter:e}))),o)).then(()=>a())})},this.unmount=r=>{u(r)}}};export{R as D,D as d};
|
|
2
2
|
function __vite__mapDeps(indexes) {
|
|
3
3
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
4
4
|
__vite__mapDeps.viteFileDeps = ["./index-4YXVTraW.js","./index-RfLt4OUa.js"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./jsx-runtime-FsUICBgo.js";import"./chunk-HLWAVYOI-
|
|
1
|
+
import{j as o}from"./jsx-runtime-FsUICBgo.js";import"./chunk-HLWAVYOI-bCq-_q2u.js";import{M as d}from"./index-vyBfFCw4.js";import{r as p}from"./index-RfLt4OUa.js";import{t as m,T as x}from"./toaster-eOozfa7U.js";import{useMDXComponents as i}from"./index-4YXVTraW.js";import"./iframe-f7RfrxbO.js";import"../sb-preview/runtime.js";import"./react-16-hgR7FrAp.js";import"./index-miLrID2P.js";import"./extends-dGVwEr9R.js";import"./assertThisInitialized-4q6YPdh3.js";import"./inheritsLoose-Y9jOMJLd.js";import"./index-gM75B7fB.js";import"./message-uMHaTEXV.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./icon-y1a2N5SZ.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";const h=["--color-text","--color-text-muted","--color-text-faint","--color-text-error","--color-text-warning","--color-text-success","--color-text-info","--color-text-primary","--color-text-primary-hover","--color-text-primary-active"],u=["--color-background","--color-background-raised","--color-background-primary","--color-background-info","--color-background-warning","--color-background-success","--color-background-error"],g=["--color-border","--color-border-error","--color-border-warning","--color-border-focus"],t=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],j=t.map(r=>`--color-neutral-${r}`),b=t.map(r=>`--color-primary-${r}`),f=t.map(r=>`--color-error-${r}`),y=t.map(r=>`--color-warning-${r}`),C=t.map(r=>`--color-success-${r}`),k=t.map(r=>`--color-info-${r}`),c=({colors:r})=>o.jsx("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr auto 1fr",gap:20,alignItems:"center"},children:r.map((n,a)=>{const e=`var(${n})`,s=()=>{navigator.clipboard.writeText(e),m({message:{type:"Success",content:"Copied to clipboard"}})};return o.jsxs(p.Fragment,{children:[o.jsx("div",{style:{padding:"var(--padding)",backgroundColor:e,border:"1px solid rgba(0,0,0,0.1)"},onClick:s}),o.jsx("code",{onClick:s,children:e})]},a)})});try{c.displayName="ColorPalette",c.__docgenInfo={description:"",displayName:"ColorPalette",props:{colors:{defaultValue:null,description:"",name:"colors",required:!0,type:{name:"string[]"}}}}}catch{}function l(r){const n=Object.assign({h1:"h1",p:"p",strong:"strong",h2:"h2",h3:"h3"},i(),r.components);return o.jsxs(o.Fragment,{children:[o.jsx(d,{title:"Colors"}),`
|
|
2
2
|
`,o.jsx(n.h1,{id:"colors",children:"Colors"}),`
|
|
3
3
|
`,o.jsx(n.p,{children:"When setting colors (either by component props or in custom styling), prefer named CSS variables to literal color values."}),`
|
|
4
4
|
`,o.jsx(n.p,{children:o.jsx(n.strong,{children:"Click on a color below to copy the variable name to the clipboard."})}),`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./jsx-runtime-FsUICBgo.js";import{C as p,R as W}from"./row-vFUhHoz5.js";import{H as m}from"./heading-
|
|
1
|
+
import{j as r}from"./jsx-runtime-FsUICBgo.js";import{C as p,R as W}from"./row-vFUhHoz5.js";import{H as m}from"./heading-cUVItwKq.js";import"./index-RfLt4OUa.js";import"./styled-components.browser.esm-qIipjd6c.js";import"./tslib.es6-OIsz3r9a.js";import"./index-VW3EWkuE.js";import"./common-types-U65vzrrz.js";import"./help-icon-nI9A506M.js";import"./tooltip-ZHdi6rl-.js";import"./index-miLrID2P.js";import"./icon-y1a2N5SZ.js";import"./inheritsLoose-Y9jOMJLd.js";import"./index-4QtD-hFu.js";import"./disabled-context-urNQThQz.js";const Z={title:"Layout/Columns & Rows",component:p,parameters:{layout:"fullscreen"},args:{width:"50%",padding:!0,borderRight:!0},argTypes:{width:{control:{type:"text"}},padding:{control:{type:"text"}},borderLeft:{control:{type:"boolean"}},borderRight:{control:{type:"boolean"}}}},e=_=>{const{height:D,wrap:F,...L}=_;return r.jsxs(W,{spacing:0,height:D,wrap:F,children:[r.jsxs(p,{...L,children:[r.jsx(m,{top:!0,children:"Column"}),"Example content goes here lorem ipsum. ".repeat(20)]}),r.jsx(p,{padding:!0,background:"var(--color-background)"})]})},c=e.bind({}),o=e.bind({});o.args={padding:!1};const a=e.bind({});a.args={width:"400px"};const n=e.bind({});n.args={scroll:!0,height:"200px"};const t=e.bind({});t.args={scroll:!0,showScrollbar:!1,height:"200px"};const s=e.bind({});s.args={wrap:!0,widthTablet:"50%",widthMobile:"100%",borderRight:!1};const i=()=>r.jsxs(W,{spacing:100,children:[r.jsxs(p,{children:[r.jsx(m,{top:!0,children:"Column"}),"Example content goes here lorem ipsum. ".repeat(20)]}),r.jsxs(p,{children:[r.jsx(m,{top:!0,children:"Column"}),"Example content goes here lorem ipsum. ".repeat(20)]})]});var g,l,u;c.parameters={...c.parameters,docs:{...(g=c.parameters)==null?void 0:g.docs,source:{originalSource:`args => {
|
|
2
2
|
const {
|
|
3
3
|
height,
|
|
4
4
|
wrap,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./jsx-runtime-FsUICBgo.js";import{r as l}from"./index-RfLt4OUa.js";import{c as m}from"./index-VW3EWkuE.js";import{P as x}from"./portal-zPiHHKoC.js";import{l as y}from"./lodash-Bmg8FrMx.js";import{I as j}from"./common-types-U65vzrrz.js";import{H as v}from"./heading-
|
|
1
|
+
import{j as t}from"./jsx-runtime-FsUICBgo.js";import{r as l}from"./index-RfLt4OUa.js";import{c as m}from"./index-VW3EWkuE.js";import{P as x}from"./portal-zPiHHKoC.js";import{l as y}from"./lodash-Bmg8FrMx.js";import{I as j}from"./common-types-U65vzrrz.js";import{H as v}from"./heading-cUVItwKq.js";import{B as w}from"./button-IoNblLER.js";const _=(n,e,r=[])=>{l.useEffect(()=>{const i=o=>{o.key===n&&e()};return window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i)}},r)},E="_wrapper_sb0hc_1",N="_contentContainer_sb0hc_15",b="_centered_sb0hc_24",k="_newLine_sb0hc_28",c={wrapper:E,contentContainer:N,centered:b,newLine:k},C=({children:n})=>{const e=l.useRef(null);return l.useEffect(()=>{if(e.current){const r=e.current.querySelector('[tabindex="0"]');r?r.focus():e.current.focus()}},[]),t.jsx("div",{ref:e,tabIndex:-1,className:m(c.wrapper),children:n})},I=({children:n,width:e,centered:r})=>t.jsx("div",{className:m(c.contentContainer,r?c.centered:""),style:{maxWidth:e},children:n}),f=({children:n,visible:e=!1,centered:r=!1,width:i="100%",onEnter:o,onEscape:d})=>(_("Enter",()=>{e&&o&&o()},[e,o]),_("Escape",()=>{e&&d&&d()},[e,d]),t.jsxs(t.Fragment,{children:[t.jsx(x,{id:"modalContainer",children:e?t.jsx(C,{children:t.jsx(I,{width:i,centered:r,children:n})}):null}),t.jsx("div",{id:"modalContainer"})]}));try{f.displayName="Modal",f.__docgenInfo={description:"",displayName:"Modal",props:{visible:{defaultValue:{value:"false"},description:"",name:"visible",required:!1,type:{name:"boolean"}},centered:{defaultValue:{value:"false"},description:"",name:"centered",required:!1,type:{name:"boolean"}},width:{defaultValue:{value:"100%"},description:"",name:"width",required:!1,type:{name:"TStringOrNumber"}},onEnter:{defaultValue:null,description:"",name:"onEnter",required:!1,type:{name:"(() => void)"}},onEscape:{defaultValue:null,description:"",name:"onEscape",required:!1,type:{name:"(() => void)"}}}}}catch{}const q="_dialog_18g0k_1",L="_inline_18g0k_18",V="_scroll_18g0k_21",D="_header_18g0k_24",M="_dismiss_18g0k_33",S="_content_18g0k_38",$="_footer_18g0k_47",a={dialog:q,inline:L,scroll:V,header:D,dismiss:M,content:S,footer:$},B=n=>y.isArray(n)?n.map((e,r)=>t.jsxs(l.Fragment,{children:[e," ",t.jsx("br",{})]},r)):n,g=({dialog:n})=>{const{heading:e,content:r,contentPadding:i="var(--padding)",footer:o,scroll:d,width:u,height:h,onClose:p,testId:s}=n;return t.jsxs("div",{className:m(a.dialog,u?a.inline:null,d?a.scroll:null),style:{width:u,height:h},"data-testid":s??null,children:[t.jsxs("div",{className:a.header,children:[t.jsx(v,{testId:s&&`${s}-heading`,top:!0,marginBottom:0,children:e}),p?t.jsx("div",{className:a.dismiss,children:t.jsx(w,{icon:j.CLOSE,round:!0,basic:!0,small:!0,colored:"muted",onClick:p})}):null]}),t.jsx("div",{"data-testid":s&&`${s}-content`,className:a.content,style:{padding:i},children:B(r)}),o&&t.jsx("div",{"data-testid":s&&`${s}-footer`,className:a.footer,children:o})]})};try{g.displayName="Dialog",g.__docgenInfo={description:"",displayName:"Dialog",props:{dialog:{defaultValue:null,description:"",name:"dialog",required:!0,type:{name:"IDialog"}}}}}catch{}export{g as D,f as M};
|