@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
|
@@ -0,0 +1,914 @@
|
|
|
1
|
+
import{j as n}from"./jsx-runtime-eps93zm2.js";import{r as P}from"./index-DhsZuJvc.js";import{S as d}from"./select-78sreKsp.js";import{S as p}from"./spacer-BWoNR27H.js";import{I as D}from"./common-types-Sih75Sav.js";import{I as L}from"./icon-BP4BO6-k.js";import{T as hn}from"./text-B3-TSWok.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"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-Cu_0szZ4.js";import"./button-_0DiND6h.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";const gn=[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Monkeys",value:"bananas",disabled:!0},{label:"Wombats",value:"bark"}],vn=[{label:"Kangaroos",value:"grass",details:"(grass)"},{label:"Monkeys",value:"bananas",details:"(bananas)"},{label:"Possums",value:"slugs",details:"(slugs)"}],mn=[{type:"Heading",label:"Large"},{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{type:"Heading",label:"Small"},{label:"Possums",value:"slugs"}],Sn=[{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4}],xn=[{label:"Yes",value:!0},{label:"No",value:!1}],Cn=[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"},{label:"Vampires",value:"blood",icon:n.jsx(L,{icon:D.WARNING,color:"var(--color-text-warning)"})},{label:"Zombies",value:"brains",icon:n.jsx(L,{icon:D.ERROR,color:"var(--color-text-error)"})}],u=[{label:"Delete",icon:"delete",onClick:()=>{}},{label:"Rename",icon:"rename",onClick:()=>{}}],bn=[{label:"Kangaroos",value:"grass",actions:u},{label:"Monkeys",value:"bananas",actions:u},{label:"Possums",value:"slugs",actions:u,details:"(some details)"}],Vn=[{label:"Kangaroos",value:"grass",actions:u,icon:n.jsx(L,{icon:D.WARNING,color:"var(--color-text-warning)"}),details:"(grass)"},{label:"Monkeys",value:"bananas",actions:u,icon:n.jsx(L,{icon:D.WARNING,color:"var(--color-text-warning)"}),details:"(bananas)"},{label:"Possums",value:"slugs",actions:u,icon:n.jsx(L,{icon:D.WARNING,color:"var(--color-text-warning)"}),details:"(slugs)"}],wn=[...Array(1e4).keys()].map((l,s)=>({label:Math.random().toString(36).substring(7),value:s})),jn=["Aardvarks","Kangaroos","Monkeys","Possums"],Jn={title:"Forms/Select",component:d,args:{options:gn,native:!1,multi:!1,disabled:!1,autoLayerWidth:!1,clearable:!1,searchable:!0,right:!1}},e=l=>{const{multi:s,value:H}=l,[r,R]=P.useState(H||(s?[]:void 0)),o=a=>{const{value:t}=a.target;R(s?t:{value:t})};return n.jsxs(n.Fragment,{children:[n.jsx(d,{value:r,onChange:o,placeholder:"Full width",...l}),n.jsx(p,{}),n.jsx(d,{value:r,onChange:o,width:"200px",placeholder:"Fixed width",...l}),n.jsx(p,{}),n.jsx(d,{value:r,onChange:o,width:"auto",placeholder:"Auto width",...l}),n.jsx(p,{}),n.jsx(d,{value:r,onChange:o,width:"auto",placeholder:"Small",small:!0,...l}),n.jsx(p,{}),n.jsx(hn,{small:!0,muted:!0,children:"Avoid auto width for very long lists."})]})},K=e.bind({}),h=e.bind({});h.args={native:!0};const g=e.bind({});g.args={multi:!0,clearable:!0};const v=e.bind({});v.args={options:[]};const m=e.bind({});m.args={clearable:!0};const S=e.bind({});S.args={value:{label:"Vampires",value:"blood"}};const x=e.bind({});x.args={placeholder:"Select the best animal..."};const C=e.bind({});C.args={options:mn};const b=e.bind({});b.args={options:vn};const V=e.bind({});V.args={options:Cn};const w=e.bind({});w.args={options:bn};const j=e.bind({});j.args={options:Vn};const y=e.bind({});y.args={searchable:!1};const f=e.bind({});f.args={right:!0};const i=e.bind({});i.parameters={docs:{description:{story:"Avoid autoLayerWidth for very long lists in custom selects (slow)"}}};i.args={width:"70px",autoLayerWidth:!0};const A=e.bind({});A.args={tooltip:"Some info"};const T=e.bind({});T.args={error:"Some info"};const F=e.bind({});F.args={warning:"Some info"};const W=e.bind({});W.args={disabled:!0};const O=e.bind({});O.args={options:Sn,placeholder:void 0};const N=e.bind({});N.args={options:xn};const k=e.bind({});k.args={options:jn};const c=e.bind({});c.parameters={docs:{description:{story:"Avoid `width: auto` and autoLayerWidth for very long lists in custom selects (slow). Consider checkNonExistentValues={false}."}}};c.args={options:wn};const E=e.bind({});E.args={deprecatedEventHandler:!0};const M=e.bind({});M.args={value:{label:"Vampires",value:"blood"},disabled:!0};const I=()=>{const[l,s]=P.useState([{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}]),[H,r]=P.useState(void 0),[R,o]=P.useState([]);return n.jsxs(n.Fragment,{children:[n.jsx(d,{name:"example",options:l,onChange:a=>r({value:a.target.value}),onCreate:a=>{const t={label:a,value:a};s([...l,t]),r(t)},value:H,clearable:!0}),n.jsx(p,{}),n.jsx(d,{name:"example",options:l,onChange:a=>o(a.target.value),onCreate:a=>{const t={label:a,value:a};s([...l,t]),console.log(a),o([...R,t])},value:R,multi:!0,clearable:!0})]})};I.__docgenInfo={description:"",methods:[],displayName:"OnCreate"};var _,G,B;K.parameters={...K.parameters,docs:{...(_=K.parameters)==null?void 0:_.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 <>
|
|
16
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
17
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
18
|
+
{...args} />
|
|
19
|
+
<Spacer />
|
|
20
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
21
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
22
|
+
{...args} />
|
|
23
|
+
<Spacer />
|
|
24
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
25
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
26
|
+
{...args} />
|
|
27
|
+
<Spacer />
|
|
28
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
29
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
30
|
+
{...args} />
|
|
31
|
+
<Spacer />
|
|
32
|
+
<Text small muted>
|
|
33
|
+
Avoid auto width for very long lists.
|
|
34
|
+
</Text>
|
|
35
|
+
</>;
|
|
36
|
+
}`,...(B=(G=K.parameters)==null?void 0:G.docs)==null?void 0:B.source}}};var Y,Z,q;h.parameters={...h.parameters,docs:{...(Y=h.parameters)==null?void 0:Y.docs,source:{originalSource:`(args: any) => {
|
|
37
|
+
const {
|
|
38
|
+
multi,
|
|
39
|
+
value
|
|
40
|
+
} = args;
|
|
41
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
42
|
+
const handleChange = (evt: any) => {
|
|
43
|
+
const {
|
|
44
|
+
value
|
|
45
|
+
} = evt.target;
|
|
46
|
+
setSelectedValue(multi ? value : {
|
|
47
|
+
value
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
return <>
|
|
51
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
52
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
53
|
+
{...args} />
|
|
54
|
+
<Spacer />
|
|
55
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
56
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
57
|
+
{...args} />
|
|
58
|
+
<Spacer />
|
|
59
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
60
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
61
|
+
{...args} />
|
|
62
|
+
<Spacer />
|
|
63
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
64
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
65
|
+
{...args} />
|
|
66
|
+
<Spacer />
|
|
67
|
+
<Text small muted>
|
|
68
|
+
Avoid auto width for very long lists.
|
|
69
|
+
</Text>
|
|
70
|
+
</>;
|
|
71
|
+
}`,...(q=(Z=h.parameters)==null?void 0:Z.docs)==null?void 0:q.source}}};var z,J,Q;g.parameters={...g.parameters,docs:{...(z=g.parameters)==null?void 0:z.docs,source:{originalSource:`(args: any) => {
|
|
72
|
+
const {
|
|
73
|
+
multi,
|
|
74
|
+
value
|
|
75
|
+
} = args;
|
|
76
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
77
|
+
const handleChange = (evt: any) => {
|
|
78
|
+
const {
|
|
79
|
+
value
|
|
80
|
+
} = evt.target;
|
|
81
|
+
setSelectedValue(multi ? value : {
|
|
82
|
+
value
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
return <>
|
|
86
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
87
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
88
|
+
{...args} />
|
|
89
|
+
<Spacer />
|
|
90
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
91
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
92
|
+
{...args} />
|
|
93
|
+
<Spacer />
|
|
94
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
95
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
96
|
+
{...args} />
|
|
97
|
+
<Spacer />
|
|
98
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
99
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
100
|
+
{...args} />
|
|
101
|
+
<Spacer />
|
|
102
|
+
<Text small muted>
|
|
103
|
+
Avoid auto width for very long lists.
|
|
104
|
+
</Text>
|
|
105
|
+
</>;
|
|
106
|
+
}`,...(Q=(J=g.parameters)==null?void 0:J.docs)==null?void 0:Q.source}}};var U,X,$;v.parameters={...v.parameters,docs:{...(U=v.parameters)==null?void 0:U.docs,source:{originalSource:`(args: any) => {
|
|
107
|
+
const {
|
|
108
|
+
multi,
|
|
109
|
+
value
|
|
110
|
+
} = args;
|
|
111
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
112
|
+
const handleChange = (evt: any) => {
|
|
113
|
+
const {
|
|
114
|
+
value
|
|
115
|
+
} = evt.target;
|
|
116
|
+
setSelectedValue(multi ? value : {
|
|
117
|
+
value
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
return <>
|
|
121
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
122
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
123
|
+
{...args} />
|
|
124
|
+
<Spacer />
|
|
125
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
126
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
127
|
+
{...args} />
|
|
128
|
+
<Spacer />
|
|
129
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
130
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
131
|
+
{...args} />
|
|
132
|
+
<Spacer />
|
|
133
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
134
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
135
|
+
{...args} />
|
|
136
|
+
<Spacer />
|
|
137
|
+
<Text small muted>
|
|
138
|
+
Avoid auto width for very long lists.
|
|
139
|
+
</Text>
|
|
140
|
+
</>;
|
|
141
|
+
}`,...($=(X=v.parameters)==null?void 0:X.docs)==null?void 0:$.source}}};var ee,ne,ae;m.parameters={...m.parameters,docs:{...(ee=m.parameters)==null?void 0:ee.docs,source:{originalSource:`(args: any) => {
|
|
142
|
+
const {
|
|
143
|
+
multi,
|
|
144
|
+
value
|
|
145
|
+
} = args;
|
|
146
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
147
|
+
const handleChange = (evt: any) => {
|
|
148
|
+
const {
|
|
149
|
+
value
|
|
150
|
+
} = evt.target;
|
|
151
|
+
setSelectedValue(multi ? value : {
|
|
152
|
+
value
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
return <>
|
|
156
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
157
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
158
|
+
{...args} />
|
|
159
|
+
<Spacer />
|
|
160
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
161
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
162
|
+
{...args} />
|
|
163
|
+
<Spacer />
|
|
164
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
165
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
166
|
+
{...args} />
|
|
167
|
+
<Spacer />
|
|
168
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
169
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
170
|
+
{...args} />
|
|
171
|
+
<Spacer />
|
|
172
|
+
<Text small muted>
|
|
173
|
+
Avoid auto width for very long lists.
|
|
174
|
+
</Text>
|
|
175
|
+
</>;
|
|
176
|
+
}`,...(ae=(ne=m.parameters)==null?void 0:ne.docs)==null?void 0:ae.source}}};var le,te,se;S.parameters={...S.parameters,docs:{...(le=S.parameters)==null?void 0:le.docs,source:{originalSource:`(args: any) => {
|
|
177
|
+
const {
|
|
178
|
+
multi,
|
|
179
|
+
value
|
|
180
|
+
} = args;
|
|
181
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
182
|
+
const handleChange = (evt: any) => {
|
|
183
|
+
const {
|
|
184
|
+
value
|
|
185
|
+
} = evt.target;
|
|
186
|
+
setSelectedValue(multi ? value : {
|
|
187
|
+
value
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
return <>
|
|
191
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
192
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
193
|
+
{...args} />
|
|
194
|
+
<Spacer />
|
|
195
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
196
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
197
|
+
{...args} />
|
|
198
|
+
<Spacer />
|
|
199
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
200
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
201
|
+
{...args} />
|
|
202
|
+
<Spacer />
|
|
203
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
204
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
205
|
+
{...args} />
|
|
206
|
+
<Spacer />
|
|
207
|
+
<Text small muted>
|
|
208
|
+
Avoid auto width for very long lists.
|
|
209
|
+
</Text>
|
|
210
|
+
</>;
|
|
211
|
+
}`,...(se=(te=S.parameters)==null?void 0:te.docs)==null?void 0:se.source}}};var re,oe,de;x.parameters={...x.parameters,docs:{...(re=x.parameters)==null?void 0:re.docs,source:{originalSource:`(args: any) => {
|
|
212
|
+
const {
|
|
213
|
+
multi,
|
|
214
|
+
value
|
|
215
|
+
} = args;
|
|
216
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
217
|
+
const handleChange = (evt: any) => {
|
|
218
|
+
const {
|
|
219
|
+
value
|
|
220
|
+
} = evt.target;
|
|
221
|
+
setSelectedValue(multi ? value : {
|
|
222
|
+
value
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
return <>
|
|
226
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
227
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
228
|
+
{...args} />
|
|
229
|
+
<Spacer />
|
|
230
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
231
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
232
|
+
{...args} />
|
|
233
|
+
<Spacer />
|
|
234
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
235
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
236
|
+
{...args} />
|
|
237
|
+
<Spacer />
|
|
238
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
239
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
240
|
+
{...args} />
|
|
241
|
+
<Spacer />
|
|
242
|
+
<Text small muted>
|
|
243
|
+
Avoid auto width for very long lists.
|
|
244
|
+
</Text>
|
|
245
|
+
</>;
|
|
246
|
+
}`,...(de=(oe=x.parameters)==null?void 0:oe.docs)==null?void 0:de.source}}};var ie,ce,ue;C.parameters={...C.parameters,docs:{...(ie=C.parameters)==null?void 0:ie.docs,source:{originalSource:`(args: any) => {
|
|
247
|
+
const {
|
|
248
|
+
multi,
|
|
249
|
+
value
|
|
250
|
+
} = args;
|
|
251
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
252
|
+
const handleChange = (evt: any) => {
|
|
253
|
+
const {
|
|
254
|
+
value
|
|
255
|
+
} = evt.target;
|
|
256
|
+
setSelectedValue(multi ? value : {
|
|
257
|
+
value
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
return <>
|
|
261
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
262
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
263
|
+
{...args} />
|
|
264
|
+
<Spacer />
|
|
265
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
266
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
267
|
+
{...args} />
|
|
268
|
+
<Spacer />
|
|
269
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
270
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
271
|
+
{...args} />
|
|
272
|
+
<Spacer />
|
|
273
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
274
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
275
|
+
{...args} />
|
|
276
|
+
<Spacer />
|
|
277
|
+
<Text small muted>
|
|
278
|
+
Avoid auto width for very long lists.
|
|
279
|
+
</Text>
|
|
280
|
+
</>;
|
|
281
|
+
}`,...(ue=(ce=C.parameters)==null?void 0:ce.docs)==null?void 0:ue.source}}};var pe,he,ge;b.parameters={...b.parameters,docs:{...(pe=b.parameters)==null?void 0:pe.docs,source:{originalSource:`(args: any) => {
|
|
282
|
+
const {
|
|
283
|
+
multi,
|
|
284
|
+
value
|
|
285
|
+
} = args;
|
|
286
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
287
|
+
const handleChange = (evt: any) => {
|
|
288
|
+
const {
|
|
289
|
+
value
|
|
290
|
+
} = evt.target;
|
|
291
|
+
setSelectedValue(multi ? value : {
|
|
292
|
+
value
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
return <>
|
|
296
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
297
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
298
|
+
{...args} />
|
|
299
|
+
<Spacer />
|
|
300
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
301
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
302
|
+
{...args} />
|
|
303
|
+
<Spacer />
|
|
304
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
305
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
306
|
+
{...args} />
|
|
307
|
+
<Spacer />
|
|
308
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
309
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
310
|
+
{...args} />
|
|
311
|
+
<Spacer />
|
|
312
|
+
<Text small muted>
|
|
313
|
+
Avoid auto width for very long lists.
|
|
314
|
+
</Text>
|
|
315
|
+
</>;
|
|
316
|
+
}`,...(ge=(he=b.parameters)==null?void 0:he.docs)==null?void 0:ge.source}}};var ve,me,Se;V.parameters={...V.parameters,docs:{...(ve=V.parameters)==null?void 0:ve.docs,source:{originalSource:`(args: any) => {
|
|
317
|
+
const {
|
|
318
|
+
multi,
|
|
319
|
+
value
|
|
320
|
+
} = args;
|
|
321
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
322
|
+
const handleChange = (evt: any) => {
|
|
323
|
+
const {
|
|
324
|
+
value
|
|
325
|
+
} = evt.target;
|
|
326
|
+
setSelectedValue(multi ? value : {
|
|
327
|
+
value
|
|
328
|
+
});
|
|
329
|
+
};
|
|
330
|
+
return <>
|
|
331
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
332
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
333
|
+
{...args} />
|
|
334
|
+
<Spacer />
|
|
335
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
336
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
337
|
+
{...args} />
|
|
338
|
+
<Spacer />
|
|
339
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
340
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
341
|
+
{...args} />
|
|
342
|
+
<Spacer />
|
|
343
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
344
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
345
|
+
{...args} />
|
|
346
|
+
<Spacer />
|
|
347
|
+
<Text small muted>
|
|
348
|
+
Avoid auto width for very long lists.
|
|
349
|
+
</Text>
|
|
350
|
+
</>;
|
|
351
|
+
}`,...(Se=(me=V.parameters)==null?void 0:me.docs)==null?void 0:Se.source}}};var xe,Ce,be;w.parameters={...w.parameters,docs:{...(xe=w.parameters)==null?void 0:xe.docs,source:{originalSource:`(args: any) => {
|
|
352
|
+
const {
|
|
353
|
+
multi,
|
|
354
|
+
value
|
|
355
|
+
} = args;
|
|
356
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
357
|
+
const handleChange = (evt: any) => {
|
|
358
|
+
const {
|
|
359
|
+
value
|
|
360
|
+
} = evt.target;
|
|
361
|
+
setSelectedValue(multi ? value : {
|
|
362
|
+
value
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
return <>
|
|
366
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
367
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
368
|
+
{...args} />
|
|
369
|
+
<Spacer />
|
|
370
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
371
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
372
|
+
{...args} />
|
|
373
|
+
<Spacer />
|
|
374
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
375
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
376
|
+
{...args} />
|
|
377
|
+
<Spacer />
|
|
378
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
379
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
380
|
+
{...args} />
|
|
381
|
+
<Spacer />
|
|
382
|
+
<Text small muted>
|
|
383
|
+
Avoid auto width for very long lists.
|
|
384
|
+
</Text>
|
|
385
|
+
</>;
|
|
386
|
+
}`,...(be=(Ce=w.parameters)==null?void 0:Ce.docs)==null?void 0:be.source}}};var Ve,we,je;j.parameters={...j.parameters,docs:{...(Ve=j.parameters)==null?void 0:Ve.docs,source:{originalSource:`(args: any) => {
|
|
387
|
+
const {
|
|
388
|
+
multi,
|
|
389
|
+
value
|
|
390
|
+
} = args;
|
|
391
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
392
|
+
const handleChange = (evt: any) => {
|
|
393
|
+
const {
|
|
394
|
+
value
|
|
395
|
+
} = evt.target;
|
|
396
|
+
setSelectedValue(multi ? value : {
|
|
397
|
+
value
|
|
398
|
+
});
|
|
399
|
+
};
|
|
400
|
+
return <>
|
|
401
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
402
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
403
|
+
{...args} />
|
|
404
|
+
<Spacer />
|
|
405
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
406
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
407
|
+
{...args} />
|
|
408
|
+
<Spacer />
|
|
409
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
410
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
411
|
+
{...args} />
|
|
412
|
+
<Spacer />
|
|
413
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
414
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
415
|
+
{...args} />
|
|
416
|
+
<Spacer />
|
|
417
|
+
<Text small muted>
|
|
418
|
+
Avoid auto width for very long lists.
|
|
419
|
+
</Text>
|
|
420
|
+
</>;
|
|
421
|
+
}`,...(je=(we=j.parameters)==null?void 0:we.docs)==null?void 0:je.source}}};var ye,fe,Ae;y.parameters={...y.parameters,docs:{...(ye=y.parameters)==null?void 0:ye.docs,source:{originalSource:`(args: any) => {
|
|
422
|
+
const {
|
|
423
|
+
multi,
|
|
424
|
+
value
|
|
425
|
+
} = args;
|
|
426
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
427
|
+
const handleChange = (evt: any) => {
|
|
428
|
+
const {
|
|
429
|
+
value
|
|
430
|
+
} = evt.target;
|
|
431
|
+
setSelectedValue(multi ? value : {
|
|
432
|
+
value
|
|
433
|
+
});
|
|
434
|
+
};
|
|
435
|
+
return <>
|
|
436
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
437
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
438
|
+
{...args} />
|
|
439
|
+
<Spacer />
|
|
440
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
441
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
442
|
+
{...args} />
|
|
443
|
+
<Spacer />
|
|
444
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
445
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
446
|
+
{...args} />
|
|
447
|
+
<Spacer />
|
|
448
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
449
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
450
|
+
{...args} />
|
|
451
|
+
<Spacer />
|
|
452
|
+
<Text small muted>
|
|
453
|
+
Avoid auto width for very long lists.
|
|
454
|
+
</Text>
|
|
455
|
+
</>;
|
|
456
|
+
}`,...(Ae=(fe=y.parameters)==null?void 0:fe.docs)==null?void 0:Ae.source}}};var Te,Fe,We;f.parameters={...f.parameters,docs:{...(Te=f.parameters)==null?void 0:Te.docs,source:{originalSource:`(args: any) => {
|
|
457
|
+
const {
|
|
458
|
+
multi,
|
|
459
|
+
value
|
|
460
|
+
} = args;
|
|
461
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
462
|
+
const handleChange = (evt: any) => {
|
|
463
|
+
const {
|
|
464
|
+
value
|
|
465
|
+
} = evt.target;
|
|
466
|
+
setSelectedValue(multi ? value : {
|
|
467
|
+
value
|
|
468
|
+
});
|
|
469
|
+
};
|
|
470
|
+
return <>
|
|
471
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
472
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
473
|
+
{...args} />
|
|
474
|
+
<Spacer />
|
|
475
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
476
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
477
|
+
{...args} />
|
|
478
|
+
<Spacer />
|
|
479
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
480
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
481
|
+
{...args} />
|
|
482
|
+
<Spacer />
|
|
483
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
484
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
485
|
+
{...args} />
|
|
486
|
+
<Spacer />
|
|
487
|
+
<Text small muted>
|
|
488
|
+
Avoid auto width for very long lists.
|
|
489
|
+
</Text>
|
|
490
|
+
</>;
|
|
491
|
+
}`,...(We=(Fe=f.parameters)==null?void 0:Fe.docs)==null?void 0:We.source}}};var Oe,Ne,ke;i.parameters={...i.parameters,docs:{...(Oe=i.parameters)==null?void 0:Oe.docs,source:{originalSource:`(args: any) => {
|
|
492
|
+
const {
|
|
493
|
+
multi,
|
|
494
|
+
value
|
|
495
|
+
} = args;
|
|
496
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
497
|
+
const handleChange = (evt: any) => {
|
|
498
|
+
const {
|
|
499
|
+
value
|
|
500
|
+
} = evt.target;
|
|
501
|
+
setSelectedValue(multi ? value : {
|
|
502
|
+
value
|
|
503
|
+
});
|
|
504
|
+
};
|
|
505
|
+
return <>
|
|
506
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
507
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
508
|
+
{...args} />
|
|
509
|
+
<Spacer />
|
|
510
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
511
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
512
|
+
{...args} />
|
|
513
|
+
<Spacer />
|
|
514
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
515
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
516
|
+
{...args} />
|
|
517
|
+
<Spacer />
|
|
518
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
519
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
520
|
+
{...args} />
|
|
521
|
+
<Spacer />
|
|
522
|
+
<Text small muted>
|
|
523
|
+
Avoid auto width for very long lists.
|
|
524
|
+
</Text>
|
|
525
|
+
</>;
|
|
526
|
+
}`,...(ke=(Ne=i.parameters)==null?void 0:Ne.docs)==null?void 0:ke.source}}};var Ee,Me,Ie;A.parameters={...A.parameters,docs:{...(Ee=A.parameters)==null?void 0:Ee.docs,source:{originalSource:`(args: any) => {
|
|
527
|
+
const {
|
|
528
|
+
multi,
|
|
529
|
+
value
|
|
530
|
+
} = args;
|
|
531
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
532
|
+
const handleChange = (evt: any) => {
|
|
533
|
+
const {
|
|
534
|
+
value
|
|
535
|
+
} = evt.target;
|
|
536
|
+
setSelectedValue(multi ? value : {
|
|
537
|
+
value
|
|
538
|
+
});
|
|
539
|
+
};
|
|
540
|
+
return <>
|
|
541
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
542
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
543
|
+
{...args} />
|
|
544
|
+
<Spacer />
|
|
545
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
546
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
547
|
+
{...args} />
|
|
548
|
+
<Spacer />
|
|
549
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
550
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
551
|
+
{...args} />
|
|
552
|
+
<Spacer />
|
|
553
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
554
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
555
|
+
{...args} />
|
|
556
|
+
<Spacer />
|
|
557
|
+
<Text small muted>
|
|
558
|
+
Avoid auto width for very long lists.
|
|
559
|
+
</Text>
|
|
560
|
+
</>;
|
|
561
|
+
}`,...(Ie=(Me=A.parameters)==null?void 0:Me.docs)==null?void 0:Ie.source}}};var De,Le,Re;T.parameters={...T.parameters,docs:{...(De=T.parameters)==null?void 0:De.docs,source:{originalSource:`(args: any) => {
|
|
562
|
+
const {
|
|
563
|
+
multi,
|
|
564
|
+
value
|
|
565
|
+
} = args;
|
|
566
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
567
|
+
const handleChange = (evt: any) => {
|
|
568
|
+
const {
|
|
569
|
+
value
|
|
570
|
+
} = evt.target;
|
|
571
|
+
setSelectedValue(multi ? value : {
|
|
572
|
+
value
|
|
573
|
+
});
|
|
574
|
+
};
|
|
575
|
+
return <>
|
|
576
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
577
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
578
|
+
{...args} />
|
|
579
|
+
<Spacer />
|
|
580
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
581
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
582
|
+
{...args} />
|
|
583
|
+
<Spacer />
|
|
584
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
585
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
586
|
+
{...args} />
|
|
587
|
+
<Spacer />
|
|
588
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
589
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
590
|
+
{...args} />
|
|
591
|
+
<Spacer />
|
|
592
|
+
<Text small muted>
|
|
593
|
+
Avoid auto width for very long lists.
|
|
594
|
+
</Text>
|
|
595
|
+
</>;
|
|
596
|
+
}`,...(Re=(Le=T.parameters)==null?void 0:Le.docs)==null?void 0:Re.source}}};var Ke,Pe,He;F.parameters={...F.parameters,docs:{...(Ke=F.parameters)==null?void 0:Ke.docs,source:{originalSource:`(args: any) => {
|
|
597
|
+
const {
|
|
598
|
+
multi,
|
|
599
|
+
value
|
|
600
|
+
} = args;
|
|
601
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
602
|
+
const handleChange = (evt: any) => {
|
|
603
|
+
const {
|
|
604
|
+
value
|
|
605
|
+
} = evt.target;
|
|
606
|
+
setSelectedValue(multi ? value : {
|
|
607
|
+
value
|
|
608
|
+
});
|
|
609
|
+
};
|
|
610
|
+
return <>
|
|
611
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
612
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
613
|
+
{...args} />
|
|
614
|
+
<Spacer />
|
|
615
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
616
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
617
|
+
{...args} />
|
|
618
|
+
<Spacer />
|
|
619
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
620
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
621
|
+
{...args} />
|
|
622
|
+
<Spacer />
|
|
623
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
624
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
625
|
+
{...args} />
|
|
626
|
+
<Spacer />
|
|
627
|
+
<Text small muted>
|
|
628
|
+
Avoid auto width for very long lists.
|
|
629
|
+
</Text>
|
|
630
|
+
</>;
|
|
631
|
+
}`,...(He=(Pe=F.parameters)==null?void 0:Pe.docs)==null?void 0:He.source}}};var _e,Ge,Be;W.parameters={...W.parameters,docs:{...(_e=W.parameters)==null?void 0:_e.docs,source:{originalSource:`(args: any) => {
|
|
632
|
+
const {
|
|
633
|
+
multi,
|
|
634
|
+
value
|
|
635
|
+
} = args;
|
|
636
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
637
|
+
const handleChange = (evt: any) => {
|
|
638
|
+
const {
|
|
639
|
+
value
|
|
640
|
+
} = evt.target;
|
|
641
|
+
setSelectedValue(multi ? value : {
|
|
642
|
+
value
|
|
643
|
+
});
|
|
644
|
+
};
|
|
645
|
+
return <>
|
|
646
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
647
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
648
|
+
{...args} />
|
|
649
|
+
<Spacer />
|
|
650
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
651
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
652
|
+
{...args} />
|
|
653
|
+
<Spacer />
|
|
654
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
655
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
656
|
+
{...args} />
|
|
657
|
+
<Spacer />
|
|
658
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
659
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
660
|
+
{...args} />
|
|
661
|
+
<Spacer />
|
|
662
|
+
<Text small muted>
|
|
663
|
+
Avoid auto width for very long lists.
|
|
664
|
+
</Text>
|
|
665
|
+
</>;
|
|
666
|
+
}`,...(Be=(Ge=W.parameters)==null?void 0:Ge.docs)==null?void 0:Be.source}}};var Ye,Ze,qe;O.parameters={...O.parameters,docs:{...(Ye=O.parameters)==null?void 0:Ye.docs,source:{originalSource:`(args: any) => {
|
|
667
|
+
const {
|
|
668
|
+
multi,
|
|
669
|
+
value
|
|
670
|
+
} = args;
|
|
671
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
672
|
+
const handleChange = (evt: any) => {
|
|
673
|
+
const {
|
|
674
|
+
value
|
|
675
|
+
} = evt.target;
|
|
676
|
+
setSelectedValue(multi ? value : {
|
|
677
|
+
value
|
|
678
|
+
});
|
|
679
|
+
};
|
|
680
|
+
return <>
|
|
681
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
682
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
683
|
+
{...args} />
|
|
684
|
+
<Spacer />
|
|
685
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
686
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
687
|
+
{...args} />
|
|
688
|
+
<Spacer />
|
|
689
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
690
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
691
|
+
{...args} />
|
|
692
|
+
<Spacer />
|
|
693
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
694
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
695
|
+
{...args} />
|
|
696
|
+
<Spacer />
|
|
697
|
+
<Text small muted>
|
|
698
|
+
Avoid auto width for very long lists.
|
|
699
|
+
</Text>
|
|
700
|
+
</>;
|
|
701
|
+
}`,...(qe=(Ze=O.parameters)==null?void 0:Ze.docs)==null?void 0:qe.source}}};var ze,Je,Qe;N.parameters={...N.parameters,docs:{...(ze=N.parameters)==null?void 0:ze.docs,source:{originalSource:`(args: any) => {
|
|
702
|
+
const {
|
|
703
|
+
multi,
|
|
704
|
+
value
|
|
705
|
+
} = args;
|
|
706
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
707
|
+
const handleChange = (evt: any) => {
|
|
708
|
+
const {
|
|
709
|
+
value
|
|
710
|
+
} = evt.target;
|
|
711
|
+
setSelectedValue(multi ? value : {
|
|
712
|
+
value
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
return <>
|
|
716
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
717
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
718
|
+
{...args} />
|
|
719
|
+
<Spacer />
|
|
720
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
721
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
722
|
+
{...args} />
|
|
723
|
+
<Spacer />
|
|
724
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
725
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
726
|
+
{...args} />
|
|
727
|
+
<Spacer />
|
|
728
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
729
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
730
|
+
{...args} />
|
|
731
|
+
<Spacer />
|
|
732
|
+
<Text small muted>
|
|
733
|
+
Avoid auto width for very long lists.
|
|
734
|
+
</Text>
|
|
735
|
+
</>;
|
|
736
|
+
}`,...(Qe=(Je=N.parameters)==null?void 0:Je.docs)==null?void 0:Qe.source}}};var Ue,Xe,$e;k.parameters={...k.parameters,docs:{...(Ue=k.parameters)==null?void 0:Ue.docs,source:{originalSource:`(args: any) => {
|
|
737
|
+
const {
|
|
738
|
+
multi,
|
|
739
|
+
value
|
|
740
|
+
} = args;
|
|
741
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
742
|
+
const handleChange = (evt: any) => {
|
|
743
|
+
const {
|
|
744
|
+
value
|
|
745
|
+
} = evt.target;
|
|
746
|
+
setSelectedValue(multi ? value : {
|
|
747
|
+
value
|
|
748
|
+
});
|
|
749
|
+
};
|
|
750
|
+
return <>
|
|
751
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
752
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
753
|
+
{...args} />
|
|
754
|
+
<Spacer />
|
|
755
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
756
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
757
|
+
{...args} />
|
|
758
|
+
<Spacer />
|
|
759
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
760
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
761
|
+
{...args} />
|
|
762
|
+
<Spacer />
|
|
763
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
764
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
765
|
+
{...args} />
|
|
766
|
+
<Spacer />
|
|
767
|
+
<Text small muted>
|
|
768
|
+
Avoid auto width for very long lists.
|
|
769
|
+
</Text>
|
|
770
|
+
</>;
|
|
771
|
+
}`,...($e=(Xe=k.parameters)==null?void 0:Xe.docs)==null?void 0:$e.source}}};var en,nn,an;c.parameters={...c.parameters,docs:{...(en=c.parameters)==null?void 0:en.docs,source:{originalSource:`(args: any) => {
|
|
772
|
+
const {
|
|
773
|
+
multi,
|
|
774
|
+
value
|
|
775
|
+
} = args;
|
|
776
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
777
|
+
const handleChange = (evt: any) => {
|
|
778
|
+
const {
|
|
779
|
+
value
|
|
780
|
+
} = evt.target;
|
|
781
|
+
setSelectedValue(multi ? value : {
|
|
782
|
+
value
|
|
783
|
+
});
|
|
784
|
+
};
|
|
785
|
+
return <>
|
|
786
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
787
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
788
|
+
{...args} />
|
|
789
|
+
<Spacer />
|
|
790
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
791
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
792
|
+
{...args} />
|
|
793
|
+
<Spacer />
|
|
794
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
795
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
796
|
+
{...args} />
|
|
797
|
+
<Spacer />
|
|
798
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
799
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
800
|
+
{...args} />
|
|
801
|
+
<Spacer />
|
|
802
|
+
<Text small muted>
|
|
803
|
+
Avoid auto width for very long lists.
|
|
804
|
+
</Text>
|
|
805
|
+
</>;
|
|
806
|
+
}`,...(an=(nn=c.parameters)==null?void 0:nn.docs)==null?void 0:an.source}}};var ln,tn,sn;E.parameters={...E.parameters,docs:{...(ln=E.parameters)==null?void 0:ln.docs,source:{originalSource:`(args: any) => {
|
|
807
|
+
const {
|
|
808
|
+
multi,
|
|
809
|
+
value
|
|
810
|
+
} = args;
|
|
811
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
812
|
+
const handleChange = (evt: any) => {
|
|
813
|
+
const {
|
|
814
|
+
value
|
|
815
|
+
} = evt.target;
|
|
816
|
+
setSelectedValue(multi ? value : {
|
|
817
|
+
value
|
|
818
|
+
});
|
|
819
|
+
};
|
|
820
|
+
return <>
|
|
821
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
822
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
823
|
+
{...args} />
|
|
824
|
+
<Spacer />
|
|
825
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
826
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
827
|
+
{...args} />
|
|
828
|
+
<Spacer />
|
|
829
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
830
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
831
|
+
{...args} />
|
|
832
|
+
<Spacer />
|
|
833
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
834
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
835
|
+
{...args} />
|
|
836
|
+
<Spacer />
|
|
837
|
+
<Text small muted>
|
|
838
|
+
Avoid auto width for very long lists.
|
|
839
|
+
</Text>
|
|
840
|
+
</>;
|
|
841
|
+
}`,...(sn=(tn=E.parameters)==null?void 0:tn.docs)==null?void 0:sn.source}}};var rn,on,dn;M.parameters={...M.parameters,docs:{...(rn=M.parameters)==null?void 0:rn.docs,source:{originalSource:`(args: any) => {
|
|
842
|
+
const {
|
|
843
|
+
multi,
|
|
844
|
+
value
|
|
845
|
+
} = args;
|
|
846
|
+
const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
|
|
847
|
+
const handleChange = (evt: any) => {
|
|
848
|
+
const {
|
|
849
|
+
value
|
|
850
|
+
} = evt.target;
|
|
851
|
+
setSelectedValue(multi ? value : {
|
|
852
|
+
value
|
|
853
|
+
});
|
|
854
|
+
};
|
|
855
|
+
return <>
|
|
856
|
+
<Select value={selectedValue} onChange={handleChange} placeholder="Full width"
|
|
857
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
858
|
+
{...args} />
|
|
859
|
+
<Spacer />
|
|
860
|
+
<Select value={selectedValue} onChange={handleChange} width="200px" placeholder="Fixed width"
|
|
861
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
862
|
+
{...args} />
|
|
863
|
+
<Spacer />
|
|
864
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Auto width"
|
|
865
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
866
|
+
{...args} />
|
|
867
|
+
<Spacer />
|
|
868
|
+
<Select value={selectedValue} onChange={handleChange} width="auto" placeholder="Small" small
|
|
869
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
870
|
+
{...args} />
|
|
871
|
+
<Spacer />
|
|
872
|
+
<Text small muted>
|
|
873
|
+
Avoid auto width for very long lists.
|
|
874
|
+
</Text>
|
|
875
|
+
</>;
|
|
876
|
+
}`,...(dn=(on=M.parameters)==null?void 0:on.docs)==null?void 0:dn.source}}};var cn,un,pn;I.parameters={...I.parameters,docs:{...(cn=I.parameters)==null?void 0:cn.docs,source:{originalSource:`() => {
|
|
877
|
+
const [options, setOptions] = useState([{
|
|
878
|
+
label: 'Aardvarks',
|
|
879
|
+
value: 'termites'
|
|
880
|
+
}, {
|
|
881
|
+
label: 'Kangaroos',
|
|
882
|
+
value: 'grass'
|
|
883
|
+
}, {
|
|
884
|
+
label: 'Monkeys',
|
|
885
|
+
value: 'bananas'
|
|
886
|
+
}, {
|
|
887
|
+
label: 'Possums',
|
|
888
|
+
value: 'slugs'
|
|
889
|
+
}]);
|
|
890
|
+
const [singleValue, setSingleValue] = useState<ISelectSelectedOption | undefined>(undefined);
|
|
891
|
+
const [multiValue, setMultiValue] = useState<ISelectSelectedOption[]>([]);
|
|
892
|
+
return <>
|
|
893
|
+
<Select name="example" options={options} onChange={evt => setSingleValue({
|
|
894
|
+
value: evt.target.value
|
|
895
|
+
})} onCreate={value => {
|
|
896
|
+
const newValue = {
|
|
897
|
+
label: value,
|
|
898
|
+
value
|
|
899
|
+
};
|
|
900
|
+
setOptions([...options, newValue]);
|
|
901
|
+
setSingleValue(newValue);
|
|
902
|
+
}} value={singleValue} clearable />
|
|
903
|
+
<Spacer />
|
|
904
|
+
<Select name="example" options={options} onChange={evt => setMultiValue(evt.target.value)} onCreate={value => {
|
|
905
|
+
const newValue = {
|
|
906
|
+
label: value,
|
|
907
|
+
value
|
|
908
|
+
};
|
|
909
|
+
setOptions([...options, newValue]);
|
|
910
|
+
console.log(value);
|
|
911
|
+
setMultiValue([...multiValue, newValue]);
|
|
912
|
+
}} value={multiValue} multi clearable />
|
|
913
|
+
</>;
|
|
914
|
+
}`,...(pn=(un=I.parameters)==null?void 0:un.docs)==null?void 0:pn.source}}};const Qn=["Default","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"];export{i as AutoLayerWidth,N as BooleanOptions,m as Clearable,x as CustomPlaceholder,K as Default,E as DeprecatedEventHandler,W as Disabled,v as Empty,T as Error,g as Multiselect,h as Native,S as NonExistentValue,y as NotSearchable,O as NumericOptions,I as OnCreate,w as OptionsWithActions,b as OptionsWithDetails,j as OptionsWithEverything,C as OptionsWithHeadings,V as OptionsWithIcons,f as RightAligned,k as SimpleOptions,M as TestDisabledNonExistentValue,A as Tooltip,c as VeryLongList,F as Warning,Qn as __namedExportsOrder,Jn as default};
|