@oliasoft-open-source/react-ui-library 4.7.3-beta-2 → 4.7.3-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{index-D5kcnHmD.js → index-7PLAdoQ9.js} +1 -0
- package/dist/index.html +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/Color-KGDBMAHA-Ck2diywb.js +1 -0
- package/dist/storybook/assets/DocsRenderer-PKQXORMH-CO2Q7pkj.js +1 -0
- package/dist/storybook/assets/{accordion-BiuI_LCA.js → accordion-6ouB0WTt.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-Beb4y7rL.js → accordion.stories-DlFZNmdv.js} +2 -2
- package/dist/storybook/assets/{actions-4w-EOz3m.js → actions-Cu_0szZ4.js} +1 -1
- package/dist/storybook/assets/{actions.stories-CtocfSW4.js → actions.stories-SCPuAp0T.js} +1 -1
- package/dist/storybook/assets/{afe.stories-WJoC6FVV.js → afe.stories-G3SzS3sg.js} +2 -2
- package/dist/storybook/assets/{badge.stories-CKnNQLZ5.js → badge.stories-DGYA6_1I.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-AxiXaQQ-.js → blowout.stories-P0LHuXSY.js} +1 -1
- package/dist/storybook/assets/{button-CdEIDAx8.js → button-_0DiND6h.js} +1 -1
- package/dist/storybook/assets/{button-group-BIUVa0X9.js → button-group-BYiHMljF.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-B0Gb9kNs.js → button-group.stories-Bz6NHaeB.js} +1 -1
- package/dist/storybook/assets/{button.stories-CHt71NKu.js → button.stories-vVBGddVf.js} +2 -2
- package/dist/storybook/assets/{buttons-and-links-GWWpybLw.js → buttons-and-links-DsIYBu4t.js} +2 -2
- package/dist/storybook/assets/{card.stories-Cddrprok.js → card.stories-DIlqxO94.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-DeIAdq5K.js → casing-loads.stories-0T--WlaD.js} +2 -2
- package/dist/storybook/assets/{cell.stories-DZKcKOIi.js → cell.stories-C5Tkxyfr.js} +2 -2
- package/dist/storybook/assets/{check-box-2fHPdAZG.js → check-box-DkdQxC5c.js} +1 -1
- package/dist/storybook/assets/check-box.stories-D8C12IQo.js +102 -0
- package/dist/storybook/assets/{chunk-HLWAVYOI-rY5YQOb2.js → chunk-HLWAVYOI-CtLnxQiQ.js} +1 -1
- package/dist/storybook/assets/color-Cm4zop4f.js +25 -0
- package/dist/storybook/assets/{column.stories-rKyxUTAG.js → column.stories-C1Sxwh4f.js} +1 -1
- package/dist/storybook/assets/dialog-CAWCUmp3.js +1 -0
- package/dist/storybook/assets/{drawer-BOl7GxGI.js → drawer-vbDFqa4U.js} +1 -1
- package/dist/storybook/assets/{drawer.stories-qH2nYW2a.js → drawer.stories-CmbGsKmS.js} +4 -4
- package/dist/storybook/assets/{empty.stories-BKEXzh9o.js → empty.stories-iHPKKy4z.js} +1 -1
- package/dist/storybook/assets/extends-CF3RwP-h.js +1 -0
- package/dist/storybook/assets/{field-nInV3MuR.js → field-DwLk_uWj.js} +1 -1
- package/dist/storybook/assets/{field.stories-eRSYmEtA.js → field.stories-s-0LQVbp.js} +1 -1
- package/dist/storybook/assets/{file-button.stories-CH6kxEKM.js → file-button.stories-C90kcfbw.js} +1 -1
- package/dist/storybook/assets/{file-input-Amcc9o5I.js → file-input-C_2w1dKj.js} +1 -1
- package/dist/storybook/assets/{file-input.stories-CJLU_nqW.js → file-input.stories-BEsZox6U.js} +1 -1
- package/dist/storybook/assets/{flex.stories-CT6o2gii.js → flex.stories-D-QN0gkk.js} +1 -1
- package/dist/storybook/assets/footer.stories-U_zMDmxF.js +3 -0
- package/dist/storybook/assets/form.stories-1L75MGpX.js +49 -0
- package/dist/storybook/assets/formation.stories-YHpXrXvC.js +74 -0
- package/dist/storybook/assets/{heading-EzI5s4VN.js → heading-DkSFysAb.js} +1 -1
- package/dist/storybook/assets/{heading.stories-D5x1-mKs.js → heading.stories-Dtq7LNlB.js} +1 -1
- package/dist/storybook/assets/{help-icon-CfV3_Ais.js → help-icon-LfPZiYla.js} +1 -1
- package/dist/storybook/assets/{help-icon.stories-D4KS1wlT.js → help-icon.stories-Dh2ylnGq.js} +1 -1
- package/dist/storybook/assets/icon-BP4BO6-k.js +8 -0
- package/dist/storybook/assets/{icon.stories-C1hZXIMX.js → icon.stories-B-tKaIKA.js} +1 -1
- package/dist/storybook/assets/iframe-BRbyeatW.js +2 -0
- package/dist/storybook/assets/{index-4gO9mIeA.js → index-BuBRmFoY.js} +8 -8
- package/dist/storybook/assets/index-DknIsB0y.js +1 -0
- package/dist/storybook/assets/{index.es-DazXb-ul.js → index.es-D2piFfFj.js} +4 -4
- package/dist/storybook/assets/inheritsLoose-DR8r8Ogv.js +1 -0
- package/dist/storybook/assets/{input-group.stories-Dtak6Me2.js → input-group.stories-BcoORZ9x.js} +2 -2
- package/dist/storybook/assets/{input-validation-wltu7rhx.js → input-validation-DHXUjjTW.js} +2 -2
- package/dist/storybook/assets/{inputs-Bsfja93s.js → inputs-DOBN-gBG.js} +2 -2
- package/dist/storybook/assets/{label-Cz6TT90s.js → label-tWjEmTQJ.js} +1 -1
- package/dist/storybook/assets/{label.stories-BzSzxxM-.js → label.stories-BTA8N7tD.js} +1 -1
- package/dist/storybook/assets/layout-forms-CWJU-MMJ.js +16 -0
- package/dist/storybook/assets/{layout-general-DJOJ7Xv5.js → layout-general-DIKhH47g.js} +2 -2
- package/dist/storybook/assets/{list-BtA0jYMp.js → list-BpVed6Pw.js} +1 -1
- package/dist/storybook/assets/{list.stories-CmJsmJZJ.js → list.stories-CiT9J_FH.js} +2 -2
- package/dist/storybook/assets/{list.stories-data-C_w1DX5i.js → list.stories-data-CnVYk3eo.js} +1 -1
- package/dist/storybook/assets/{loader.stories-CA2m3EFj.js → loader.stories-BKBFctQ1.js} +1 -1
- package/dist/storybook/assets/menu.stories-Bp8L83xx.js +82 -0
- package/dist/storybook/assets/message-ttrR1AaP.js +1 -0
- package/dist/storybook/assets/{message.stories-B02RIMXw.js → message.stories-C8YRT7nL.js} +1 -1
- package/dist/storybook/assets/{meta-content-BdypOdcN.js → meta-content-Djgg-tiF.js} +1 -1
- package/dist/storybook/assets/modal.stories-BoVj2EsX.js +200 -0
- package/dist/storybook/assets/number-input.stories-CcNTeD25.js +97 -0
- package/dist/storybook/assets/{option-dropdown.stories-DvgAgTHQ.js → option-dropdown.stories-COGmMWEl.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-BnOF4Ueu.js → padding-and-spacing-2bE7HUNT.js} +2 -2
- package/dist/storybook/assets/{page.stories-DdAfcsOc.js → page.stories-BB3g1zwB.js} +1 -1
- package/dist/storybook/assets/{pagination-DRdJ9LGH.js → pagination-DSQeMPG_.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-C_4kzgcf.js → pagination.stories-DjIohcDx.js} +2 -2
- package/dist/storybook/assets/{pop-confirm.stories-Dlm0BaMY.js → pop-confirm.stories-Cr_ZBbLn.js} +1 -1
- package/dist/storybook/assets/{popover-CvS_kBVF.js → popover-Dq3iC_lM.js} +1 -1
- package/dist/storybook/assets/popover.stories-CoWCb2Mn.js +10 -0
- package/dist/storybook/assets/{preview-DtaSOELl.js → preview-C7oeNNbC.js} +2 -2
- package/dist/storybook/assets/preview-DP1caVnC.js +2 -0
- package/dist/storybook/assets/projects.stories-BesbPJ8Z.js +47 -0
- package/dist/storybook/assets/{radio-button-J4oEQdxt.js → radio-button-BD7pi0ao.js} +1 -1
- package/dist/storybook/assets/radio-button.stories-B84Ip3NV.js +61 -0
- package/dist/storybook/assets/react-router-dom-CMITYWBH.js +8 -0
- package/dist/storybook/assets/{reservoirs.stories-BUs7WSxB.js → reservoirs.stories-kxVBoa7Y.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-BP79IJ53.js → rich-text-input.stories-C5pcIbSa.js} +3 -3
- package/dist/storybook/assets/{row.stories-CIJowbkv.js → row.stories-ATsrjumb.js} +2 -2
- package/dist/storybook/assets/select-78sreKsp.js +40 -0
- package/dist/storybook/assets/select.stories-CZwsHVDB.js +914 -0
- package/dist/storybook/assets/{side-bar-DAMfASqb.js → side-bar-WsK6pkmj.js} +1 -1
- package/dist/storybook/assets/{side-bar.stories-BlEIOckL.js → side-bar.stories-Bu2q_b_w.js} +1 -1
- package/dist/storybook/assets/{site.stories-Kk57nhAn.js → site.stories-Yh4uNi3Q.js} +2 -2
- package/dist/storybook/assets/{slider-BLU39INk.js → slider-CxVlS0fh.js} +4 -4
- package/dist/storybook/assets/{slider.stories-DdVxUAfH.js → slider.stories-_wS70xsm.js} +2 -2
- package/dist/storybook/assets/{smart-upload-modal.stories-PeStvjoa.js → smart-upload-modal.stories-DDlO9y2j.js} +1 -1
- package/dist/storybook/assets/{spacer.stories-Dd1QMhoc.js → spacer.stories-B3LrTr7b.js} +1 -1
- package/dist/storybook/assets/{table-B7Ro6zGB.js → table-DPvzYjoq.js} +1 -1
- package/dist/storybook/assets/{table.stories-1mHu1R2T.js → table.stories-BGQ1O9nw.js} +2 -2
- package/dist/storybook/assets/{table.stories-data-C6x-UHeN.js → table.stories-data-2STKbgzG.js} +1 -1
- package/dist/storybook/assets/text-link.stories-BsuVBOWo.js +14 -0
- package/dist/storybook/assets/{title.stories-CcK2ZS1r.js → title.stories-CVRTXggL.js} +2 -2
- package/dist/storybook/assets/toaster-DPbde9Mi.js +1 -0
- package/dist/storybook/assets/toaster.stories-DfbfDavp.js +86 -0
- package/dist/storybook/assets/{toggle-D0yzyALV.js → toggle-t1iTuSL7.js} +1 -1
- package/dist/storybook/assets/toggle.stories-D44S3Nix.js +117 -0
- package/dist/storybook/assets/{tooltip.test-case.stories-BWJhZQg8.js → tooltip.test-case.stories-BtrJUImB.js} +1 -1
- package/dist/storybook/assets/{top-bar-mKg-xcLh.js → top-bar-R-CjhJ21.js} +1 -1
- package/dist/storybook/assets/top-bar.stories-BYN9rcUw.js +21 -0
- package/dist/storybook/assets/{top-bar.testcase.stories-BlbsX9By.js → top-bar.testcase.stories-ZPaSRyIh.js} +1 -1
- package/dist/storybook/assets/{tree.stories-CkYwGe0X.js → tree.stories-Ghxps-dL.js} +1 -1
- package/dist/storybook/assets/unit-input.stories-BaU6h22E.js +290 -0
- package/dist/storybook/assets/unit-table.stories-DXies3fA.js +150 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.html +2 -6
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/Color-KGDBMAHA-BDaGFyls.js +0 -1
- package/dist/storybook/assets/DocsRenderer-PKQXORMH-DeAerz72.js +0 -1
- package/dist/storybook/assets/check-box.stories-Dqopb7XV.js +0 -126
- package/dist/storybook/assets/color-lBkUm7cb.js +0 -25
- package/dist/storybook/assets/dialog-dXhT3sJF.js +0 -1
- package/dist/storybook/assets/footer.stories-BlfgJYnF.js +0 -3
- package/dist/storybook/assets/form.stories-RD2lXS5Q.js +0 -49
- package/dist/storybook/assets/formation.stories-BC2p8tEp.js +0 -74
- package/dist/storybook/assets/icon-BSFY3vDO.js +0 -8
- package/dist/storybook/assets/iframe-D9Shj_Nm.js +0 -2
- package/dist/storybook/assets/index-Be0hXiyp.js +0 -179
- package/dist/storybook/assets/index-CF7H4eMJ.js +0 -28
- package/dist/storybook/assets/index-NK2Pj-Tv.js +0 -1
- package/dist/storybook/assets/inheritsLoose-DP0QEDDI.js +0 -1
- package/dist/storybook/assets/layout-forms-Bf7y_Hym.js +0 -16
- package/dist/storybook/assets/menu.stories-BD7P2iMQ.js +0 -84
- package/dist/storybook/assets/message-BYzRg8Ae.js +0 -1
- package/dist/storybook/assets/modal.stories-l76yG1FY.js +0 -228
- package/dist/storybook/assets/number-input.stories-CmgIvuEY.js +0 -105
- package/dist/storybook/assets/popover.stories-D6_Ulo0d.js +0 -10
- package/dist/storybook/assets/preview-DLBQXbKW.js +0 -1
- package/dist/storybook/assets/preview-Dyti8xUp.js +0 -2
- package/dist/storybook/assets/projects.stories-ApHyZURX.js +0 -47
- package/dist/storybook/assets/radio-button.stories-Ds-DfLlj.js +0 -71
- package/dist/storybook/assets/react-router-dom-Ck2Y_Fzc.js +0 -8
- package/dist/storybook/assets/select-BeEJzL_0.js +0 -40
- package/dist/storybook/assets/select.stories-DgC9Agq6.js +0 -579
- package/dist/storybook/assets/text-link.stories-BQAkVO-W.js +0 -14
- package/dist/storybook/assets/toaster-BNO0suPv.js +0 -1
- package/dist/storybook/assets/toaster.stories-DYw4Syxn.js +0 -89
- package/dist/storybook/assets/toggle.stories-DKENe2T9.js +0 -141
- package/dist/storybook/assets/top-bar.stories-CFZoJq-r.js +0 -21
- package/dist/storybook/assets/unit-input.stories-BdhJ50Pr.js +0 -290
- package/dist/storybook/assets/unit-table.stories-_Z6tTx-x.js +0 -150
- package/dist/storybook/sb-addons/interactions-2/manager-bundle.js +0 -233
- package/dist/storybook/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js.LEGAL.txt +0 -0
- /package/dist/storybook/sb-addons/{storybook-dark-mode-esm-preset-3 → storybook-dark-mode-esm-preset-2}/manager-bundle.js +0 -0
- /package/dist/storybook/sb-addons/{interactions-2 → storybook-dark-mode-esm-preset-2}/manager-bundle.js.LEGAL.txt +0 -0
|
@@ -1,579 +0,0 @@
|
|
|
1
|
-
import{j as d}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{w as i,u as c,e as u}from"./index-Be0hXiyp.js";import{S as z}from"./select-BeEJzL_0.js";import{S as qa}from"./spacer-BWoNR27H.js";import{I as Z}from"./common-types-Sih75Sav.js";import{I as $}from"./icon-BSFY3vDO.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./tooltip-C_E_6ym5.js";import"./index-CUZDtIZe.js";import"./index-CEuq6vkz.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-4w-EOz3m.js";import"./button-CdEIDAx8.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";const _a=[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Monkeys",value:"bananas",disabled:!0},{label:"Wombats",value:"bark"}],Fa=[{label:"Kangaroos",value:"grass",details:"(grass)"},{label:"Monkeys",value:"bananas",details:"(bananas)"},{label:"Possums",value:"slugs",details:"(slugs)"}],Ga=[{type:"Heading",label:"Large"},{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{type:"Heading",label:"Small"},{label:"Possums",value:"slugs"}],Ya=[{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4}],Za=[{label:"Yes",value:!0},{label:"No",value:!1}],$a=[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"},{label:"Vampires",value:"blood",icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"})},{label:"Zombies",value:"brains",icon:d.jsx($,{icon:Z.ERROR,color:"var(--color-text-error)"})}],y=[{label:"Delete",icon:"delete",onClick:()=>{}},{label:"Rename",icon:"rename",onClick:()=>{}}],za=[{label:"Kangaroos",value:"grass",actions:y},{label:"Monkeys",value:"bananas",actions:y},{label:"Possums",value:"slugs",actions:y,details:"(some details)"}],Ja=[{label:"Kangaroos",value:"grass",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(grass)"},{label:"Monkeys",value:"bananas",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(bananas)"},{label:"Possums",value:"slugs",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(slugs)"}],Qa=[...Array(1e4).keys()].map((t,l)=>({label:Math.random().toString(36).substring(7),value:l})),Ua=["Aardvarks","Kangaroos","Monkeys","Possums"],Tn={title:"Forms/Select",component:z,args:{options:_a,native:!1,multi:!1,disabled:!1,autoLayerWidth:!1,clearable:!1,searchable:!0,right:!1}},e=t=>{const{multi:l,value:a}=t,[s,n]=b.useState(a||(l?[]:void 0)),o=r=>{const{value:g}=r.target;n(l?g:{value:g})};return d.jsx(z,{value:s,onChange:o,...t})},J=e.bind({}),C=e.bind({});C.args={small:!0};const x=e.bind({});x.args={width:"auto"};const I=e.bind({});I.args={width:"200px"};const f=e.bind({});f.args={native:!0};const w=e.bind({});w.args={multi:!0,clearable:!0};const T=e.bind({});T.args={options:[]};const j=e.bind({});j.args={clearable:!0};const B=e.bind({});B.args={value:{label:"Vampires",value:"blood"}};const k=e.bind({});k.args={placeholder:"Select the best animal..."};const W=e.bind({});W.args={options:Ga};const O=e.bind({});O.args={options:Fa};const D=e.bind({});D.args={options:$a};const N=e.bind({});N.args={options:za};const A=e.bind({});A.args={options:Ja};const E=e.bind({});E.args={searchable:!1};const M=e.bind({});M.args={right:!0};const v=e.bind({});v.parameters={docs:{description:{story:"Avoid autoLayerWidth for very long lists in custom selects (slow)"}}};v.args={width:"70px",autoLayerWidth:!0};const L=e.bind({});L.args={tooltip:"Some info"};const K=e.bind({});K.args={error:"Some info"};const R=e.bind({});R.args={warning:"Some info"};const P=e.bind({});P.args={disabled:!0};const H=e.bind({});H.args={options:Ya,placeholder:void 0};const _=e.bind({});_.args={options:Za};const q=e.bind({});q.args={options:Ua};const m=e.bind({});m.parameters={docs:{description:{story:"Avoid `width: auto` and autoLayerWidth for very long lists in custom selects (slow). Consider checkNonExistentValues={false}."}}};m.args={options:Qa};const F=e.bind({});F.args={deprecatedEventHandler:!0};const G=e.bind({});G.args={value:{label:"Vampires",value:"blood"},disabled:!0};const Y=()=>{const[t,l]=b.useState([{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}]),[a,s]=b.useState(void 0),[n,o]=b.useState([]);return d.jsxs(d.Fragment,{children:[d.jsx(z,{name:"example",options:t,onChange:r=>s({value:r.target.value}),onCreate:r=>{const g={label:r,value:r};l([...t,g]),s(g)},value:a,clearable:!0}),d.jsx(qa,{}),d.jsx(z,{name:"example",options:t,onChange:r=>o(r.target.value),onCreate:r=>{const g={label:r,value:r};l([...t,g]),console.log(r),o([...n,g])},value:n,multi:!0,clearable:!0})]})},h=e.bind({});h.args={testId:"testId",clearable:!0};h.play=async({canvasElement:t,step:l})=>{const a=t.parentElement?i(t.parentElement):null;a&&(await l("Select item with click",async()=>{const s=a.getByTestId("testId");await c.click(s);const n=a.getByTestId("testId-layer");await u(n).toBeInTheDocument();const o=i(n).getByText("Wombats");await c.click(o);const r=a.getByTestId("testId-value");await u(i(r).getByText("Wombats")).toBeInTheDocument()}),await l("Clear selected value",async()=>{const s=a.getByTestId("testId-clear");await c.click(s);const n=a.queryByTestId("testId-value");await u(n).not.toBeInTheDocument()}))};const S=e.bind({});S.args={testId:"testId",clearable:!0,multi:!0};S.play=async({canvasElement:t,step:l})=>{const a=t.parentElement?i(t.parentElement):null;a&&(await l("Select items with click",async()=>{const s=a.getByTestId("testId");await c.click(s);const n=a.getByTestId("testId-layer");await u(n).toBeInTheDocument();const o=i(n).getByText("Wombats");await c.click(o);const r=i(n).getByText("Kangaroos");await c.click(r),await c.click(t),await u(n).not.toBeInTheDocument();const g=a.getByTestId("testId-value");await u(i(g).getByText("Wombats")).toBeInTheDocument(),await u(i(g).getByText("Kangaroos")).toBeInTheDocument()}),await l("Deselect item with click",async()=>{const s=a.getByTestId("testId");await c.click(s);const n=a.getByTestId("testId-layer");await u(n).toBeInTheDocument();const o=i(n).getByText("Wombats");await c.click(o),await c.click(t),await u(n).not.toBeInTheDocument();const r=a.getByTestId("testId-value");await u(i(r).queryByText("Wombats")).not.toBeInTheDocument()}),await l("Clear selected values",async()=>{const s=a.getByTestId("testId-clear");await c.click(s);const n=a.queryByTestId("testId-value");await u(n).not.toBeInTheDocument()}))};const V=e.bind({});V.args={testId:"testId",disabled:!0};V.play=async({canvasElement:t,step:l})=>{const a=i(t);await l("Clicking disabled trigger should not show layer",async()=>{await a.getByTestId("testId").click();const n=a.queryByTestId("testId-layer");await u(n).toBeNull()})};const p=()=>{const[t,l]=b.useState(_a),[a,s]=b.useState(void 0);return d.jsx(z,{testId:"testId",name:"example",options:t,onChange:n=>s({value:n.target.value}),onCreate:n=>{const o={label:n,value:n};l([...t,o]),s(o)},value:a})};p.args={testId:"testId"};p.play=async({canvasElement:t,step:l})=>{const a=t.parentElement?i(t.parentElement):null;a&&await l("Create new item",async()=>{const s=a.getByTestId("testId-input");if(u(s).toBeInTheDocument(),!s)return;await c.type(s,"New value");const n=a.getByText('Create "New value"');await c.click(n);const o=a.getByTestId("testId-value");await u(i(o).getByText("New value")).toBeInTheDocument()})};Y.__docgenInfo={description:"",methods:[],displayName:"OnCreate"};p.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestCreate"};var Q,U,X;J.parameters={...J.parameters,docs:{...(Q=J.parameters)==null?void 0:Q.docs,source:{originalSource:`(args: any) => {
|
|
2
|
-
const {
|
|
3
|
-
multi,
|
|
4
|
-
value
|
|
5
|
-
} = args;
|
|
6
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
7
|
-
const handleChange = (evt: any) => {
|
|
8
|
-
const {
|
|
9
|
-
value
|
|
10
|
-
} = evt.target;
|
|
11
|
-
setSelectedValue(multi ? value : {
|
|
12
|
-
value
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
16
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
|
-
{...args} />;
|
|
18
|
-
}`,...(X=(U=J.parameters)==null?void 0:U.docs)==null?void 0:X.source}}};var ee,ae,ne;C.parameters={...C.parameters,docs:{...(ee=C.parameters)==null?void 0:ee.docs,source:{originalSource:`(args: any) => {
|
|
19
|
-
const {
|
|
20
|
-
multi,
|
|
21
|
-
value
|
|
22
|
-
} = args;
|
|
23
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
24
|
-
const handleChange = (evt: any) => {
|
|
25
|
-
const {
|
|
26
|
-
value
|
|
27
|
-
} = evt.target;
|
|
28
|
-
setSelectedValue(multi ? value : {
|
|
29
|
-
value
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
33
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
34
|
-
{...args} />;
|
|
35
|
-
}`,...(ne=(ae=C.parameters)==null?void 0:ae.docs)==null?void 0:ne.source}}};var te,se,le;x.parameters={...x.parameters,docs:{...(te=x.parameters)==null?void 0:te.docs,source:{originalSource:`(args: any) => {
|
|
36
|
-
const {
|
|
37
|
-
multi,
|
|
38
|
-
value
|
|
39
|
-
} = args;
|
|
40
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
41
|
-
const handleChange = (evt: any) => {
|
|
42
|
-
const {
|
|
43
|
-
value
|
|
44
|
-
} = evt.target;
|
|
45
|
-
setSelectedValue(multi ? value : {
|
|
46
|
-
value
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
50
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
51
|
-
{...args} />;
|
|
52
|
-
}`,...(le=(se=x.parameters)==null?void 0:se.docs)==null?void 0:le.source}}};var re,oe,ue;I.parameters={...I.parameters,docs:{...(re=I.parameters)==null?void 0:re.docs,source:{originalSource:`(args: any) => {
|
|
53
|
-
const {
|
|
54
|
-
multi,
|
|
55
|
-
value
|
|
56
|
-
} = args;
|
|
57
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
58
|
-
const handleChange = (evt: any) => {
|
|
59
|
-
const {
|
|
60
|
-
value
|
|
61
|
-
} = evt.target;
|
|
62
|
-
setSelectedValue(multi ? value : {
|
|
63
|
-
value
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
67
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
68
|
-
{...args} />;
|
|
69
|
-
}`,...(ue=(oe=I.parameters)==null?void 0:oe.docs)==null?void 0:ue.source}}};var ce,ie,de;f.parameters={...f.parameters,docs:{...(ce=f.parameters)==null?void 0:ce.docs,source:{originalSource:`(args: any) => {
|
|
70
|
-
const {
|
|
71
|
-
multi,
|
|
72
|
-
value
|
|
73
|
-
} = args;
|
|
74
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
75
|
-
const handleChange = (evt: any) => {
|
|
76
|
-
const {
|
|
77
|
-
value
|
|
78
|
-
} = evt.target;
|
|
79
|
-
setSelectedValue(multi ? value : {
|
|
80
|
-
value
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
84
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
85
|
-
{...args} />;
|
|
86
|
-
}`,...(de=(ie=f.parameters)==null?void 0:ie.docs)==null?void 0:de.source}}};var ge,pe,ve;w.parameters={...w.parameters,docs:{...(ge=w.parameters)==null?void 0:ge.docs,source:{originalSource:`(args: any) => {
|
|
87
|
-
const {
|
|
88
|
-
multi,
|
|
89
|
-
value
|
|
90
|
-
} = args;
|
|
91
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
92
|
-
const handleChange = (evt: any) => {
|
|
93
|
-
const {
|
|
94
|
-
value
|
|
95
|
-
} = evt.target;
|
|
96
|
-
setSelectedValue(multi ? value : {
|
|
97
|
-
value
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
101
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
102
|
-
{...args} />;
|
|
103
|
-
}`,...(ve=(pe=w.parameters)==null?void 0:pe.docs)==null?void 0:ve.source}}};var me,he,Se;T.parameters={...T.parameters,docs:{...(me=T.parameters)==null?void 0:me.docs,source:{originalSource:`(args: any) => {
|
|
104
|
-
const {
|
|
105
|
-
multi,
|
|
106
|
-
value
|
|
107
|
-
} = args;
|
|
108
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
109
|
-
const handleChange = (evt: any) => {
|
|
110
|
-
const {
|
|
111
|
-
value
|
|
112
|
-
} = evt.target;
|
|
113
|
-
setSelectedValue(multi ? value : {
|
|
114
|
-
value
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
118
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
119
|
-
{...args} />;
|
|
120
|
-
}`,...(Se=(he=T.parameters)==null?void 0:he.docs)==null?void 0:Se.source}}};var Ve,be,ye;j.parameters={...j.parameters,docs:{...(Ve=j.parameters)==null?void 0:Ve.docs,source:{originalSource:`(args: any) => {
|
|
121
|
-
const {
|
|
122
|
-
multi,
|
|
123
|
-
value
|
|
124
|
-
} = args;
|
|
125
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
126
|
-
const handleChange = (evt: any) => {
|
|
127
|
-
const {
|
|
128
|
-
value
|
|
129
|
-
} = evt.target;
|
|
130
|
-
setSelectedValue(multi ? value : {
|
|
131
|
-
value
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
135
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
136
|
-
{...args} />;
|
|
137
|
-
}`,...(ye=(be=j.parameters)==null?void 0:be.docs)==null?void 0:ye.source}}};var Ce,xe,Ie;B.parameters={...B.parameters,docs:{...(Ce=B.parameters)==null?void 0:Ce.docs,source:{originalSource:`(args: any) => {
|
|
138
|
-
const {
|
|
139
|
-
multi,
|
|
140
|
-
value
|
|
141
|
-
} = args;
|
|
142
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
143
|
-
const handleChange = (evt: any) => {
|
|
144
|
-
const {
|
|
145
|
-
value
|
|
146
|
-
} = evt.target;
|
|
147
|
-
setSelectedValue(multi ? value : {
|
|
148
|
-
value
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
152
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
153
|
-
{...args} />;
|
|
154
|
-
}`,...(Ie=(xe=B.parameters)==null?void 0:xe.docs)==null?void 0:Ie.source}}};var fe,we,Te;k.parameters={...k.parameters,docs:{...(fe=k.parameters)==null?void 0:fe.docs,source:{originalSource:`(args: any) => {
|
|
155
|
-
const {
|
|
156
|
-
multi,
|
|
157
|
-
value
|
|
158
|
-
} = args;
|
|
159
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
160
|
-
const handleChange = (evt: any) => {
|
|
161
|
-
const {
|
|
162
|
-
value
|
|
163
|
-
} = evt.target;
|
|
164
|
-
setSelectedValue(multi ? value : {
|
|
165
|
-
value
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
169
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
170
|
-
{...args} />;
|
|
171
|
-
}`,...(Te=(we=k.parameters)==null?void 0:we.docs)==null?void 0:Te.source}}};var je,Be,ke;W.parameters={...W.parameters,docs:{...(je=W.parameters)==null?void 0:je.docs,source:{originalSource:`(args: any) => {
|
|
172
|
-
const {
|
|
173
|
-
multi,
|
|
174
|
-
value
|
|
175
|
-
} = args;
|
|
176
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
177
|
-
const handleChange = (evt: any) => {
|
|
178
|
-
const {
|
|
179
|
-
value
|
|
180
|
-
} = evt.target;
|
|
181
|
-
setSelectedValue(multi ? value : {
|
|
182
|
-
value
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
186
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
187
|
-
{...args} />;
|
|
188
|
-
}`,...(ke=(Be=W.parameters)==null?void 0:Be.docs)==null?void 0:ke.source}}};var We,Oe,De;O.parameters={...O.parameters,docs:{...(We=O.parameters)==null?void 0:We.docs,source:{originalSource:`(args: any) => {
|
|
189
|
-
const {
|
|
190
|
-
multi,
|
|
191
|
-
value
|
|
192
|
-
} = args;
|
|
193
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
194
|
-
const handleChange = (evt: any) => {
|
|
195
|
-
const {
|
|
196
|
-
value
|
|
197
|
-
} = evt.target;
|
|
198
|
-
setSelectedValue(multi ? value : {
|
|
199
|
-
value
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
203
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
204
|
-
{...args} />;
|
|
205
|
-
}`,...(De=(Oe=O.parameters)==null?void 0:Oe.docs)==null?void 0:De.source}}};var Ne,Ae,Ee;D.parameters={...D.parameters,docs:{...(Ne=D.parameters)==null?void 0:Ne.docs,source:{originalSource:`(args: any) => {
|
|
206
|
-
const {
|
|
207
|
-
multi,
|
|
208
|
-
value
|
|
209
|
-
} = args;
|
|
210
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
211
|
-
const handleChange = (evt: any) => {
|
|
212
|
-
const {
|
|
213
|
-
value
|
|
214
|
-
} = evt.target;
|
|
215
|
-
setSelectedValue(multi ? value : {
|
|
216
|
-
value
|
|
217
|
-
});
|
|
218
|
-
};
|
|
219
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
220
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
221
|
-
{...args} />;
|
|
222
|
-
}`,...(Ee=(Ae=D.parameters)==null?void 0:Ae.docs)==null?void 0:Ee.source}}};var Me,Le,Ke;N.parameters={...N.parameters,docs:{...(Me=N.parameters)==null?void 0:Me.docs,source:{originalSource:`(args: any) => {
|
|
223
|
-
const {
|
|
224
|
-
multi,
|
|
225
|
-
value
|
|
226
|
-
} = args;
|
|
227
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
228
|
-
const handleChange = (evt: any) => {
|
|
229
|
-
const {
|
|
230
|
-
value
|
|
231
|
-
} = evt.target;
|
|
232
|
-
setSelectedValue(multi ? value : {
|
|
233
|
-
value
|
|
234
|
-
});
|
|
235
|
-
};
|
|
236
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
237
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
238
|
-
{...args} />;
|
|
239
|
-
}`,...(Ke=(Le=N.parameters)==null?void 0:Le.docs)==null?void 0:Ke.source}}};var Re,Pe,He;A.parameters={...A.parameters,docs:{...(Re=A.parameters)==null?void 0:Re.docs,source:{originalSource:`(args: any) => {
|
|
240
|
-
const {
|
|
241
|
-
multi,
|
|
242
|
-
value
|
|
243
|
-
} = args;
|
|
244
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
245
|
-
const handleChange = (evt: any) => {
|
|
246
|
-
const {
|
|
247
|
-
value
|
|
248
|
-
} = evt.target;
|
|
249
|
-
setSelectedValue(multi ? value : {
|
|
250
|
-
value
|
|
251
|
-
});
|
|
252
|
-
};
|
|
253
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
254
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
255
|
-
{...args} />;
|
|
256
|
-
}`,...(He=(Pe=A.parameters)==null?void 0:Pe.docs)==null?void 0:He.source}}};var _e,qe,Fe;E.parameters={...E.parameters,docs:{...(_e=E.parameters)==null?void 0:_e.docs,source:{originalSource:`(args: any) => {
|
|
257
|
-
const {
|
|
258
|
-
multi,
|
|
259
|
-
value
|
|
260
|
-
} = args;
|
|
261
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
262
|
-
const handleChange = (evt: any) => {
|
|
263
|
-
const {
|
|
264
|
-
value
|
|
265
|
-
} = evt.target;
|
|
266
|
-
setSelectedValue(multi ? value : {
|
|
267
|
-
value
|
|
268
|
-
});
|
|
269
|
-
};
|
|
270
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
271
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
272
|
-
{...args} />;
|
|
273
|
-
}`,...(Fe=(qe=E.parameters)==null?void 0:qe.docs)==null?void 0:Fe.source}}};var Ge,Ye,Ze;M.parameters={...M.parameters,docs:{...(Ge=M.parameters)==null?void 0:Ge.docs,source:{originalSource:`(args: any) => {
|
|
274
|
-
const {
|
|
275
|
-
multi,
|
|
276
|
-
value
|
|
277
|
-
} = args;
|
|
278
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
279
|
-
const handleChange = (evt: any) => {
|
|
280
|
-
const {
|
|
281
|
-
value
|
|
282
|
-
} = evt.target;
|
|
283
|
-
setSelectedValue(multi ? value : {
|
|
284
|
-
value
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
288
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
289
|
-
{...args} />;
|
|
290
|
-
}`,...(Ze=(Ye=M.parameters)==null?void 0:Ye.docs)==null?void 0:Ze.source}}};var $e,ze,Je;v.parameters={...v.parameters,docs:{...($e=v.parameters)==null?void 0:$e.docs,source:{originalSource:`(args: any) => {
|
|
291
|
-
const {
|
|
292
|
-
multi,
|
|
293
|
-
value
|
|
294
|
-
} = args;
|
|
295
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
296
|
-
const handleChange = (evt: any) => {
|
|
297
|
-
const {
|
|
298
|
-
value
|
|
299
|
-
} = evt.target;
|
|
300
|
-
setSelectedValue(multi ? value : {
|
|
301
|
-
value
|
|
302
|
-
});
|
|
303
|
-
};
|
|
304
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
305
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
306
|
-
{...args} />;
|
|
307
|
-
}`,...(Je=(ze=v.parameters)==null?void 0:ze.docs)==null?void 0:Je.source}}};var Qe,Ue,Xe;L.parameters={...L.parameters,docs:{...(Qe=L.parameters)==null?void 0:Qe.docs,source:{originalSource:`(args: any) => {
|
|
308
|
-
const {
|
|
309
|
-
multi,
|
|
310
|
-
value
|
|
311
|
-
} = args;
|
|
312
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
313
|
-
const handleChange = (evt: any) => {
|
|
314
|
-
const {
|
|
315
|
-
value
|
|
316
|
-
} = evt.target;
|
|
317
|
-
setSelectedValue(multi ? value : {
|
|
318
|
-
value
|
|
319
|
-
});
|
|
320
|
-
};
|
|
321
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
322
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
323
|
-
{...args} />;
|
|
324
|
-
}`,...(Xe=(Ue=L.parameters)==null?void 0:Ue.docs)==null?void 0:Xe.source}}};var ea,aa,na;K.parameters={...K.parameters,docs:{...(ea=K.parameters)==null?void 0:ea.docs,source:{originalSource:`(args: any) => {
|
|
325
|
-
const {
|
|
326
|
-
multi,
|
|
327
|
-
value
|
|
328
|
-
} = args;
|
|
329
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
330
|
-
const handleChange = (evt: any) => {
|
|
331
|
-
const {
|
|
332
|
-
value
|
|
333
|
-
} = evt.target;
|
|
334
|
-
setSelectedValue(multi ? value : {
|
|
335
|
-
value
|
|
336
|
-
});
|
|
337
|
-
};
|
|
338
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
339
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
340
|
-
{...args} />;
|
|
341
|
-
}`,...(na=(aa=K.parameters)==null?void 0:aa.docs)==null?void 0:na.source}}};var ta,sa,la;R.parameters={...R.parameters,docs:{...(ta=R.parameters)==null?void 0:ta.docs,source:{originalSource:`(args: any) => {
|
|
342
|
-
const {
|
|
343
|
-
multi,
|
|
344
|
-
value
|
|
345
|
-
} = args;
|
|
346
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
347
|
-
const handleChange = (evt: any) => {
|
|
348
|
-
const {
|
|
349
|
-
value
|
|
350
|
-
} = evt.target;
|
|
351
|
-
setSelectedValue(multi ? value : {
|
|
352
|
-
value
|
|
353
|
-
});
|
|
354
|
-
};
|
|
355
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
356
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
357
|
-
{...args} />;
|
|
358
|
-
}`,...(la=(sa=R.parameters)==null?void 0:sa.docs)==null?void 0:la.source}}};var ra,oa,ua;P.parameters={...P.parameters,docs:{...(ra=P.parameters)==null?void 0:ra.docs,source:{originalSource:`(args: any) => {
|
|
359
|
-
const {
|
|
360
|
-
multi,
|
|
361
|
-
value
|
|
362
|
-
} = args;
|
|
363
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
364
|
-
const handleChange = (evt: any) => {
|
|
365
|
-
const {
|
|
366
|
-
value
|
|
367
|
-
} = evt.target;
|
|
368
|
-
setSelectedValue(multi ? value : {
|
|
369
|
-
value
|
|
370
|
-
});
|
|
371
|
-
};
|
|
372
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
373
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
374
|
-
{...args} />;
|
|
375
|
-
}`,...(ua=(oa=P.parameters)==null?void 0:oa.docs)==null?void 0:ua.source}}};var ca,ia,da;H.parameters={...H.parameters,docs:{...(ca=H.parameters)==null?void 0:ca.docs,source:{originalSource:`(args: any) => {
|
|
376
|
-
const {
|
|
377
|
-
multi,
|
|
378
|
-
value
|
|
379
|
-
} = args;
|
|
380
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
381
|
-
const handleChange = (evt: any) => {
|
|
382
|
-
const {
|
|
383
|
-
value
|
|
384
|
-
} = evt.target;
|
|
385
|
-
setSelectedValue(multi ? value : {
|
|
386
|
-
value
|
|
387
|
-
});
|
|
388
|
-
};
|
|
389
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
390
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
391
|
-
{...args} />;
|
|
392
|
-
}`,...(da=(ia=H.parameters)==null?void 0:ia.docs)==null?void 0:da.source}}};var ga,pa,va;_.parameters={..._.parameters,docs:{...(ga=_.parameters)==null?void 0:ga.docs,source:{originalSource:`(args: any) => {
|
|
393
|
-
const {
|
|
394
|
-
multi,
|
|
395
|
-
value
|
|
396
|
-
} = args;
|
|
397
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
398
|
-
const handleChange = (evt: any) => {
|
|
399
|
-
const {
|
|
400
|
-
value
|
|
401
|
-
} = evt.target;
|
|
402
|
-
setSelectedValue(multi ? value : {
|
|
403
|
-
value
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
407
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
408
|
-
{...args} />;
|
|
409
|
-
}`,...(va=(pa=_.parameters)==null?void 0:pa.docs)==null?void 0:va.source}}};var ma,ha,Sa;q.parameters={...q.parameters,docs:{...(ma=q.parameters)==null?void 0:ma.docs,source:{originalSource:`(args: any) => {
|
|
410
|
-
const {
|
|
411
|
-
multi,
|
|
412
|
-
value
|
|
413
|
-
} = args;
|
|
414
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
415
|
-
const handleChange = (evt: any) => {
|
|
416
|
-
const {
|
|
417
|
-
value
|
|
418
|
-
} = evt.target;
|
|
419
|
-
setSelectedValue(multi ? value : {
|
|
420
|
-
value
|
|
421
|
-
});
|
|
422
|
-
};
|
|
423
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
424
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
425
|
-
{...args} />;
|
|
426
|
-
}`,...(Sa=(ha=q.parameters)==null?void 0:ha.docs)==null?void 0:Sa.source}}};var Va,ba,ya;m.parameters={...m.parameters,docs:{...(Va=m.parameters)==null?void 0:Va.docs,source:{originalSource:`(args: any) => {
|
|
427
|
-
const {
|
|
428
|
-
multi,
|
|
429
|
-
value
|
|
430
|
-
} = args;
|
|
431
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
432
|
-
const handleChange = (evt: any) => {
|
|
433
|
-
const {
|
|
434
|
-
value
|
|
435
|
-
} = evt.target;
|
|
436
|
-
setSelectedValue(multi ? value : {
|
|
437
|
-
value
|
|
438
|
-
});
|
|
439
|
-
};
|
|
440
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
441
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
442
|
-
{...args} />;
|
|
443
|
-
}`,...(ya=(ba=m.parameters)==null?void 0:ba.docs)==null?void 0:ya.source}}};var Ca,xa,Ia;F.parameters={...F.parameters,docs:{...(Ca=F.parameters)==null?void 0:Ca.docs,source:{originalSource:`(args: any) => {
|
|
444
|
-
const {
|
|
445
|
-
multi,
|
|
446
|
-
value
|
|
447
|
-
} = args;
|
|
448
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
449
|
-
const handleChange = (evt: any) => {
|
|
450
|
-
const {
|
|
451
|
-
value
|
|
452
|
-
} = evt.target;
|
|
453
|
-
setSelectedValue(multi ? value : {
|
|
454
|
-
value
|
|
455
|
-
});
|
|
456
|
-
};
|
|
457
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
458
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
459
|
-
{...args} />;
|
|
460
|
-
}`,...(Ia=(xa=F.parameters)==null?void 0:xa.docs)==null?void 0:Ia.source}}};var fa,wa,Ta;G.parameters={...G.parameters,docs:{...(fa=G.parameters)==null?void 0:fa.docs,source:{originalSource:`(args: any) => {
|
|
461
|
-
const {
|
|
462
|
-
multi,
|
|
463
|
-
value
|
|
464
|
-
} = args;
|
|
465
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
466
|
-
const handleChange = (evt: any) => {
|
|
467
|
-
const {
|
|
468
|
-
value
|
|
469
|
-
} = evt.target;
|
|
470
|
-
setSelectedValue(multi ? value : {
|
|
471
|
-
value
|
|
472
|
-
});
|
|
473
|
-
};
|
|
474
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
475
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
476
|
-
{...args} />;
|
|
477
|
-
}`,...(Ta=(wa=G.parameters)==null?void 0:wa.docs)==null?void 0:Ta.source}}};var ja,Ba,ka;Y.parameters={...Y.parameters,docs:{...(ja=Y.parameters)==null?void 0:ja.docs,source:{originalSource:`() => {
|
|
478
|
-
const [options, setOptions] = useState([{
|
|
479
|
-
label: 'Aardvarks',
|
|
480
|
-
value: 'termites'
|
|
481
|
-
}, {
|
|
482
|
-
label: 'Kangaroos',
|
|
483
|
-
value: 'grass'
|
|
484
|
-
}, {
|
|
485
|
-
label: 'Monkeys',
|
|
486
|
-
value: 'bananas'
|
|
487
|
-
}, {
|
|
488
|
-
label: 'Possums',
|
|
489
|
-
value: 'slugs'
|
|
490
|
-
}]);
|
|
491
|
-
const [singleValue, setSingleValue] = useState<ISelectSelectedOption | undefined>(undefined);
|
|
492
|
-
const [multiValue, setMultiValue] = useState<ISelectSelectedOption[]>([]);
|
|
493
|
-
return <>
|
|
494
|
-
<Select name="example" options={options} onChange={evt => setSingleValue({
|
|
495
|
-
value: evt.target.value
|
|
496
|
-
})} onCreate={value => {
|
|
497
|
-
const newValue = {
|
|
498
|
-
label: value,
|
|
499
|
-
value
|
|
500
|
-
};
|
|
501
|
-
setOptions([...options, newValue]);
|
|
502
|
-
setSingleValue(newValue);
|
|
503
|
-
}} value={singleValue} clearable />
|
|
504
|
-
<Spacer />
|
|
505
|
-
<Select name="example" options={options} onChange={evt => setMultiValue(evt.target.value)} onCreate={value => {
|
|
506
|
-
const newValue = {
|
|
507
|
-
label: value,
|
|
508
|
-
value
|
|
509
|
-
};
|
|
510
|
-
setOptions([...options, newValue]);
|
|
511
|
-
console.log(value);
|
|
512
|
-
setMultiValue([...multiValue, newValue]);
|
|
513
|
-
}} value={multiValue} multi clearable />
|
|
514
|
-
</>;
|
|
515
|
-
}`,...(ka=(Ba=Y.parameters)==null?void 0:Ba.docs)==null?void 0:ka.source}}};var Wa,Oa,Da;h.parameters={...h.parameters,docs:{...(Wa=h.parameters)==null?void 0:Wa.docs,source:{originalSource:`(args: any) => {
|
|
516
|
-
const {
|
|
517
|
-
multi,
|
|
518
|
-
value
|
|
519
|
-
} = args;
|
|
520
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
521
|
-
const handleChange = (evt: any) => {
|
|
522
|
-
const {
|
|
523
|
-
value
|
|
524
|
-
} = evt.target;
|
|
525
|
-
setSelectedValue(multi ? value : {
|
|
526
|
-
value
|
|
527
|
-
});
|
|
528
|
-
};
|
|
529
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
530
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
531
|
-
{...args} />;
|
|
532
|
-
}`,...(Da=(Oa=h.parameters)==null?void 0:Oa.docs)==null?void 0:Da.source}}};var Na,Aa,Ea;S.parameters={...S.parameters,docs:{...(Na=S.parameters)==null?void 0:Na.docs,source:{originalSource:`(args: any) => {
|
|
533
|
-
const {
|
|
534
|
-
multi,
|
|
535
|
-
value
|
|
536
|
-
} = args;
|
|
537
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
538
|
-
const handleChange = (evt: any) => {
|
|
539
|
-
const {
|
|
540
|
-
value
|
|
541
|
-
} = evt.target;
|
|
542
|
-
setSelectedValue(multi ? value : {
|
|
543
|
-
value
|
|
544
|
-
});
|
|
545
|
-
};
|
|
546
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
547
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
548
|
-
{...args} />;
|
|
549
|
-
}`,...(Ea=(Aa=S.parameters)==null?void 0:Aa.docs)==null?void 0:Ea.source}}};var Ma,La,Ka;V.parameters={...V.parameters,docs:{...(Ma=V.parameters)==null?void 0:Ma.docs,source:{originalSource:`(args: any) => {
|
|
550
|
-
const {
|
|
551
|
-
multi,
|
|
552
|
-
value
|
|
553
|
-
} = args;
|
|
554
|
-
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
555
|
-
const handleChange = (evt: any) => {
|
|
556
|
-
const {
|
|
557
|
-
value
|
|
558
|
-
} = evt.target;
|
|
559
|
-
setSelectedValue(multi ? value : {
|
|
560
|
-
value
|
|
561
|
-
});
|
|
562
|
-
};
|
|
563
|
-
return <Select value={selectedValue} onChange={handleChange}
|
|
564
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
565
|
-
{...args} />;
|
|
566
|
-
}`,...(Ka=(La=V.parameters)==null?void 0:La.docs)==null?void 0:Ka.source}}};var Ra,Pa,Ha;p.parameters={...p.parameters,docs:{...(Ra=p.parameters)==null?void 0:Ra.docs,source:{originalSource:`() => {
|
|
567
|
-
const [options, setOptions] = useState(storyData.options);
|
|
568
|
-
const [singleValue, setSingleValue] = useState<ISelectSelectedOption | undefined>(undefined);
|
|
569
|
-
return <Select testId="testId" name="example" options={options} onChange={evt => setSingleValue({
|
|
570
|
-
value: evt.target.value
|
|
571
|
-
})} onCreate={value => {
|
|
572
|
-
const newValue = {
|
|
573
|
-
label: value,
|
|
574
|
-
value
|
|
575
|
-
};
|
|
576
|
-
setOptions([...options, newValue]);
|
|
577
|
-
setSingleValue(newValue);
|
|
578
|
-
}} value={singleValue} />;
|
|
579
|
-
}`,...(Ha=(Pa=p.parameters)==null?void 0:Pa.docs)==null?void 0:Ha.source}}};const jn=["Default","Small","AutoWidth","FixedWidth","Native","Multiselect","Empty","Clearable","NonExistentValue","CustomPlaceholder","OptionsWithHeadings","OptionsWithDetails","OptionsWithIcons","OptionsWithActions","OptionsWithEverything","NotSearchable","RightAligned","AutoLayerWidth","Tooltip","Error","Warning","Disabled","NumericOptions","BooleanOptions","SimpleOptions","VeryLongList","DeprecatedEventHandler","TestDisabledNonExistentValue","OnCreate","Test","TestMulti","TestDisabled","TestCreate"];export{v as AutoLayerWidth,x as AutoWidth,_ as BooleanOptions,j as Clearable,k as CustomPlaceholder,J as Default,F as DeprecatedEventHandler,P as Disabled,T as Empty,K as Error,I as FixedWidth,w as Multiselect,f as Native,B as NonExistentValue,E as NotSearchable,H as NumericOptions,Y as OnCreate,N as OptionsWithActions,O as OptionsWithDetails,A as OptionsWithEverything,W as OptionsWithHeadings,D as OptionsWithIcons,M as RightAligned,q as SimpleOptions,C as Small,h as Test,p as TestCreate,V as TestDisabled,G as TestDisabledNonExistentValue,S as TestMulti,L as Tooltip,m as VeryLongList,R as Warning,jn as __namedExportsOrder,Tn as default};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-eps93zm2.js";import{H as E,L as i,S as j,R as c}from"./react-router-dom-Ck2Y_Fzc.js";import{F as y}from"./flex-EllkLxgO.js";import{T as S}from"./text-B3-TSWok.js";import"./index-DhsZuJvc.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index-Bk2sglWO.js";const r=({children:a,href:o=void 0,target:T=void 0,testId:R,onClick:L,component:v="a"})=>e.jsx(v,{href:o,to:o,target:T,onClick:L,"data-testid":R,children:e.jsx(S,{link:!0,children:a})});r.__docgenInfo={description:"",methods:[],displayName:"TextLink",props:{href:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"undefined",computed:!0}},target:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"undefined",computed:!0}},testId:{required:!1,tsType:{name:"string"},description:""},onClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLAnchorElement, MouseEvent>",elements:[{name:"HTMLAnchorElement"},{name:"MouseEvent"}]},name:"e"}],return:{name:"void"}}},description:""},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},component:{required:!1,tsType:{name:"ReactElementType",raw:"React.ElementType"},description:"",defaultValue:{value:"'a'",computed:!1}}}};const N={title:"Basic/TextLink",component:r,args:{children:"Link text goes here",href:"http://oliasoft.com"}},k=a=>e.jsx(r,{...a}),n=k.bind({}),t=k.bind({});t.args={href:void 0,onClick:()=>console.log("Clicked!")};const s=()=>e.jsxs(E,{children:[e.jsxs(y,{gap:!0,children:[e.jsx(r,{component:i,href:"/dashboard",children:"Dashboard"}),e.jsx(r,{component:i,href:"/settings",children:"Settings"})]}),e.jsxs(j,{children:[e.jsx(c,{path:"/dashboard",children:"Dashboard"}),e.jsx(c,{path:"/settings",children:"Settings"})]})]});s.__docgenInfo={description:"",methods:[],displayName:"AsRouterLink"};var d,p,m;n.parameters={...n.parameters,docs:{...(d=n.parameters)==null?void 0:d.docs,source:{originalSource:"args => <TextLink {...args} />",...(m=(p=n.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var u,l,h;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:"args => <TextLink {...args} />",...(h=(l=t.parameters)==null?void 0:l.docs)==null?void 0:h.source}}};var g,f,x;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`() => <HashRouter>
|
|
2
|
-
<Flex gap>
|
|
3
|
-
<TextLink component={Link} href="/dashboard">
|
|
4
|
-
Dashboard
|
|
5
|
-
</TextLink>
|
|
6
|
-
<TextLink component={Link} href="/settings">
|
|
7
|
-
Settings
|
|
8
|
-
</TextLink>
|
|
9
|
-
</Flex>
|
|
10
|
-
<Switch>
|
|
11
|
-
<Route path="/dashboard">Dashboard</Route>
|
|
12
|
-
<Route path="/settings">Settings</Route>
|
|
13
|
-
</Switch>
|
|
14
|
-
</HashRouter>`,...(x=(f=s.parameters)==null?void 0:f.docs)==null?void 0:x.source}}};const I=["Default","OnClick","AsRouterLink"];export{s as AsRouterLink,n as Default,t as OnClick,I as __namedExportsOrder,N as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./jsx-runtime-eps93zm2.js";import{t as s,S as l}from"./toaster-7wnI6hqB.js";import{a as r,M as f,D as E}from"./message-BYzRg8Ae.js";const I=({id:t,message:e={type:r.INFO,content:""},autoClose:o=6e3,onClose:i})=>{const{type:p=r.INFO}=e??{},u=({closeToast:d})=>c.jsx(E,{type:p,onClose:d,isInToast:!0,testId:t!==void 0?t.toString()+"-dismiss":void 0}),n=c.jsx(f,{message:{...e,visible:!0,width:"100%",maxHeight:"500px",withDismiss:!1}}),a=(()=>{switch(e==null?void 0:e.type){case r.SUCCESS:return s.TYPE.SUCCESS;case r.WARNING:return s.TYPE.WARNING;case r.ERROR:return s.TYPE.ERROR;default:return s.TYPE.INFO}})();return t!==void 0&&s.isActive(t)?s.update(t,{render:n,autoClose:o,onClose:i,type:a}):s(n,{toastId:t,autoClose:o,onClose:i,hideProgressBar:o===!1,icon:!1,closeOnClick:!1,pauseOnHover:!0,draggable:!1,closeButton:u,transition:l,type:a})},T=t=>{s.dismiss(t)};export{T as d,I as t};
|