@oliasoft-open-source/react-ui-library 4.7.5 → 4.7.6
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/index.d.ts +5 -0
- package/dist/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/Color-KGDBMAHA-C0EpwEFf.js +1 -0
- package/dist/storybook/assets/DocsRenderer-PKQXORMH-CWe5JIRI.js +1 -0
- package/dist/storybook/assets/{accordion-BiuI_LCA.js → accordion-6ouB0WTt.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-BWUwZ5cN.js → accordion.stories-YuQaNHcr.js} +2 -2
- package/dist/storybook/assets/{actions-CHgr8eL8.js → actions-CZK3mphC.js} +1 -1
- package/dist/storybook/assets/{actions.stories-CCDxFKFk.js → actions.stories-FOK1cLb3.js} +1 -1
- package/dist/storybook/assets/{afe.stories-CC785MgO.js → afe.stories-CT81gs6M.js} +2 -2
- package/dist/storybook/assets/{badge.stories-D5DA-vxC.js → badge.stories-D30jHm96.js} +1 -1
- package/dist/storybook/assets/{blowout.stories-ES-Fuaqn.js → blowout.stories-CJrNKpKP.js} +1 -1
- package/dist/storybook/assets/{button-VxhoNhrV.js → button-C1sV-0mR.js} +1 -1
- package/dist/storybook/assets/{button-group-CwJdFo2z.js → button-group-Ai4DXqNr.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-DU5k5qCY.js → button-group.stories-incmyYJ-.js} +1 -1
- package/dist/storybook/assets/{button.stories-DVtec2Eo.js → button.stories-Bcy7mnLs.js} +2 -2
- package/dist/storybook/assets/{buttons-and-links-CfkgVoVA.js → buttons-and-links-CtOaPZlv.js} +2 -2
- package/dist/storybook/assets/{card.stories-CsTB0DuM.js → card.stories-Bn6LpucB.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-BoG7UuIu.js → casing-loads.stories-DQy8gjj6.js} +2 -2
- package/dist/storybook/assets/{cell.stories-CfiPC1eE.js → cell.stories-ChfAWqCt.js} +2 -2
- package/dist/storybook/assets/{check-box-BtCGePRy.js → check-box-CaSrhzev.js} +1 -1
- package/dist/storybook/assets/check-box.stories-BAH78tMZ.js +126 -0
- package/dist/storybook/assets/{chunk-HLWAVYOI-CuMm7Qpv.js → chunk-HLWAVYOI-CkQdzq8g.js} +1 -1
- package/dist/storybook/assets/color-eaylxLAo.js +25 -0
- package/dist/storybook/assets/{column.stories-BxfR9Tla.js → column.stories-JMvj3_fr.js} +1 -1
- package/dist/storybook/assets/dialog-vClt2ahZ.js +1 -0
- package/dist/storybook/assets/{drawer-BhuWxI7V.js → drawer-DSS8yvvp.js} +1 -1
- package/dist/storybook/assets/drawer.stories-D6FBs1_r.js +113 -0
- package/dist/storybook/assets/{empty.stories-BVYXwvpa.js → empty.stories-G8jeIfLL.js} +1 -1
- package/dist/storybook/assets/extends-CF3RwP-h.js +1 -0
- package/dist/storybook/assets/{field-HrLaMLbx.js → field-C5_fLDpy.js} +1 -1
- package/dist/storybook/assets/{field.stories-B9p9nBgY.js → field.stories-D5Mej0Bt.js} +1 -1
- package/dist/storybook/assets/{file-button.stories-FOaiNPt-.js → file-button.stories-DePr8MKB.js} +1 -1
- package/dist/storybook/assets/{file-input-BpMtsZ2S.js → file-input-BZecnRBy.js} +1 -1
- package/dist/storybook/assets/{file-input.stories--ZoISXk0.js → file-input.stories-Br89AkVv.js} +1 -1
- package/dist/storybook/assets/{flex.stories-BEXf0VqI.js → flex.stories-sSdg0ChR.js} +1 -1
- package/dist/storybook/assets/footer.stories-BM5UBN62.js +3 -0
- package/dist/storybook/assets/form.stories-CYcggA-f.js +49 -0
- package/dist/storybook/assets/formation.stories-NDB_Sbor.js +74 -0
- package/dist/storybook/assets/{heading-CRNoBc7q.js → heading-NkLgQYoP.js} +1 -1
- package/dist/storybook/assets/{heading.stories-DahFxeiX.js → heading.stories-nI_cFnAN.js} +1 -1
- package/dist/storybook/assets/{help-icon-Buhx5nl6.js → help-icon-41R-Z9N1.js} +1 -1
- package/dist/storybook/assets/{help-icon.stories-DbmZ1fgP.js → help-icon.stories-DBYh0YX7.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-WLuE3PcW.js +2 -0
- package/dist/storybook/assets/index-Be0hXiyp.js +179 -0
- package/dist/storybook/assets/index-CF7H4eMJ.js +28 -0
- package/dist/storybook/assets/index-CXmS_Aty.js +1 -0
- package/dist/storybook/assets/{index-DCGYYCUT.js → index-Cf2IDQZ4.js} +8 -8
- 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-BiReS545.js → input-group.stories-BmeUtBOK.js} +2 -2
- package/dist/storybook/assets/{input-validation-Bd_JP2WL.js → input-validation-U3o9_8IY.js} +2 -2
- package/dist/storybook/assets/{inputs-BsGUQTI3.js → inputs-gP7hGRtM.js} +4 -4
- package/dist/storybook/assets/{label-CqmyC9he.js → label-hiSz3I8H.js} +1 -1
- package/dist/storybook/assets/{label.stories-C0AO5F1a.js → label.stories-Cyv5jBAO.js} +1 -1
- package/dist/storybook/assets/layout-forms-r2wYyx-8.js +16 -0
- package/dist/storybook/assets/{layout-general-jp5QULaU.js → layout-general-Bw291PmI.js} +2 -2
- package/dist/storybook/assets/{list-yVTOdmpX.js → list-DYNKqvUR.js} +1 -1
- package/dist/storybook/assets/{list.stories-ChqQXY5M.js → list.stories-BX67BegD.js} +2 -2
- package/dist/storybook/assets/{list.stories-data-Iq66w9oH.js → list.stories-data-D_ZfzaxE.js} +1 -1
- package/dist/storybook/assets/{loader.stories-DM7ZJBgz.js → loader.stories-DjrwwZ15.js} +1 -1
- package/dist/storybook/assets/menu.stories-QTzp0Z7C.js +84 -0
- package/dist/storybook/assets/message-B7G1ESkC.js +1 -0
- package/dist/storybook/assets/{message.stories-Dmk-t8hM.js → message.stories-Czui5Ym7.js} +1 -1
- package/dist/storybook/assets/{meta-content-cbHGvPJ7.js → meta-content-BE7pulye.js} +1 -1
- package/dist/storybook/assets/modal.stories-DAxDpo0A.js +220 -0
- package/dist/storybook/assets/number-input.stories-CFTNLnHw.js +105 -0
- package/dist/storybook/assets/{option-dropdown.stories-CoLsSS95.js → option-dropdown.stories-ByLG631x.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-D7O49YoW.js → padding-and-spacing-DLeCWmND.js} +2 -2
- package/dist/storybook/assets/{page.stories-Cse3cMsO.js → page.stories-br9ia4zp.js} +1 -1
- package/dist/storybook/assets/{pagination-DzpYFhAO.js → pagination-BtguPxeR.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-CJwR-XAD.js → pagination.stories-CgG4wp8P.js} +2 -2
- package/dist/storybook/assets/{pop-confirm.stories-Hox7vJnl.js → pop-confirm.stories-CZpYmUBz.js} +1 -1
- package/dist/storybook/assets/{popover-CzZdWNnB.js → popover-DgUpTRMk.js} +1 -1
- package/dist/storybook/assets/popover.stories-CtaFGXR_.js +10 -0
- package/dist/storybook/assets/preview-BjyexbB3.js +2 -0
- package/dist/storybook/assets/preview-DLBQXbKW.js +1 -0
- package/dist/storybook/assets/{preview-DOYx8RvS.js → preview-Dml2wSQG.js} +2 -2
- package/dist/storybook/assets/projects.stories-BSAMs8RG.js +47 -0
- package/dist/storybook/assets/{radio-button-YBwYcMaM.js → radio-button-C_cV5TWA.js} +1 -1
- package/dist/storybook/assets/radio-button.stories-BNE-U9db.js +71 -0
- package/dist/storybook/assets/react-router-dom-CMITYWBH.js +8 -0
- package/dist/storybook/assets/{reservoirs.stories-WKT7gCnp.js → reservoirs.stories-ux3hZbkX.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-RjuY6LDo.js → rich-text-input.stories-savcIJ5B.js} +3 -3
- package/dist/storybook/assets/{row.stories-B6IcyamO.js → row.stories-CG6Eipay.js} +2 -2
- package/dist/storybook/assets/select-Z-GCZ-pY.js +40 -0
- package/dist/storybook/assets/select.stories-CX_B6BvR.js +579 -0
- package/dist/storybook/assets/{side-bar-CKbHPgIV.js → side-bar-ChOjPNLR.js} +1 -1
- package/dist/storybook/assets/{side-bar.stories-MUj_dj1F.js → side-bar.stories-BupidZk5.js} +1 -1
- package/dist/storybook/assets/{site.stories-Ci4g5W2A.js → site.stories-C1GnbK5P.js} +2 -2
- package/dist/storybook/assets/{slider-DAramr8j.js → slider-gZmYlxxz.js} +4 -4
- package/dist/storybook/assets/{slider.stories-Cd0rLfHP.js → slider.stories-CY4GxD4Y.js} +2 -2
- package/dist/storybook/assets/{smart-upload-modal.stories-OBY4Jc5w.js → smart-upload-modal.stories-BrsVuS4a.js} +1 -1
- package/dist/storybook/assets/{spacer.stories-CHEZdgDM.js → spacer.stories-D7Q45uBk.js} +1 -1
- package/dist/storybook/assets/{table-BOVkj1wL.js → table-CaaSoHex.js} +1 -1
- package/dist/storybook/assets/{table.stories-CdFHs6Xl.js → table.stories-BiBivAvh.js} +2 -2
- package/dist/storybook/assets/{table.stories-data-CR9VpXHs.js → table.stories-data-DwfKQW7P.js} +1 -1
- package/dist/storybook/assets/text-link.stories-BsuVBOWo.js +14 -0
- package/dist/storybook/assets/{title.stories-DT3HSIHi.js → title.stories-CfdJbgvT.js} +2 -2
- package/dist/storybook/assets/toaster-DJeREs3e.js +1 -0
- package/dist/storybook/assets/toaster.stories-QjvljKdT.js +89 -0
- package/dist/storybook/assets/{toggle-CBpNgTrm.js → toggle-Bo-JPbUP.js} +1 -1
- package/dist/storybook/assets/toggle.stories-BYrikgrA.js +141 -0
- package/dist/storybook/assets/{tooltip.test-case.stories-i9YQqba1.js → tooltip.test-case.stories-C74mKGrI.js} +1 -1
- package/dist/storybook/assets/{top-bar-C_tn2Pc5.js → top-bar-DG4ok0uF.js} +1 -1
- package/dist/storybook/assets/top-bar.stories-BI4a_ekv.js +21 -0
- package/dist/storybook/assets/{top-bar.testcase.stories-DoPEAMYc.js → top-bar.testcase.stories-DzsYUZIx.js} +1 -1
- package/dist/storybook/assets/{tree.stories-6UHASEZu.js → tree.stories-RtuZpYXn.js} +1 -1
- package/dist/storybook/assets/{unit-input.stories-DyeptPz2.js → unit-input.stories-BSWm9641.js} +1 -1
- package/dist/storybook/assets/unit-table.stories-CgF-UOP3.js +150 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.html +6 -2
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/sb-addons/interactions-2/manager-bundle.js +233 -0
- package/dist/storybook/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js.LEGAL.txt +0 -0
- package/package.json +1 -1
- package/dist/storybook/assets/Color-KGDBMAHA-DHDKE9Re.js +0 -1
- package/dist/storybook/assets/DocsRenderer-PKQXORMH-BmaBzyAH.js +0 -1
- package/dist/storybook/assets/check-box.stories-L9T_i0RT.js +0 -102
- package/dist/storybook/assets/color-DJNturFf.js +0 -25
- package/dist/storybook/assets/dialog-IAPGkLet.js +0 -1
- package/dist/storybook/assets/drawer.stories-B-PsNJJ6.js +0 -113
- package/dist/storybook/assets/footer.stories-DdUzRiYm.js +0 -3
- package/dist/storybook/assets/form.stories-CDE7hTBL.js +0 -49
- package/dist/storybook/assets/formation.stories-vU3zoZ2c.js +0 -74
- package/dist/storybook/assets/icon-BSFY3vDO.js +0 -8
- package/dist/storybook/assets/iframe-CgUc-Ukp.js +0 -2
- package/dist/storybook/assets/index-CQKekHCo.js +0 -1
- package/dist/storybook/assets/inheritsLoose-DP0QEDDI.js +0 -1
- package/dist/storybook/assets/layout-forms-BH-i91Wg.js +0 -16
- package/dist/storybook/assets/menu.stories-CSSvL08X.js +0 -82
- package/dist/storybook/assets/message-ZenLdkrf.js +0 -1
- package/dist/storybook/assets/modal.stories-BVttWvlZ.js +0 -200
- package/dist/storybook/assets/number-input.stories-CVFfJvjY.js +0 -97
- package/dist/storybook/assets/popover.stories-L5z549ww.js +0 -10
- package/dist/storybook/assets/preview-Bq2bLcjv.js +0 -2
- package/dist/storybook/assets/projects.stories-DU-QlBa6.js +0 -47
- package/dist/storybook/assets/radio-button.stories-Bg5JVXpo.js +0 -61
- package/dist/storybook/assets/react-router-dom-Ck2Y_Fzc.js +0 -8
- package/dist/storybook/assets/select-D55JvDou.js +0 -40
- package/dist/storybook/assets/select.stories-2DiOP0OZ.js +0 -914
- package/dist/storybook/assets/text-link.stories-BQAkVO-W.js +0 -14
- package/dist/storybook/assets/toaster-B8A3xIYu.js +0 -1
- package/dist/storybook/assets/toaster.stories-B61l_zxQ.js +0 -86
- package/dist/storybook/assets/toggle.stories-D4c4fr5t.js +0 -117
- package/dist/storybook/assets/top-bar.stories-B2a-RgK-.js +0 -21
- package/dist/storybook/assets/unit-table.stories-BAVqAbfG.js +0 -150
- /package/dist/storybook/sb-addons/{storybook-dark-mode-esm-preset-2 → interactions-2}/manager-bundle.js.LEGAL.txt +0 -0
- /package/dist/storybook/sb-addons/{storybook-dark-mode-esm-preset-2 → storybook-dark-mode-esm-preset-3}/manager-bundle.js +0 -0
|
@@ -1,914 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./jsx-runtime-eps93zm2.js";import{r as P}from"./index-DhsZuJvc.js";import{S as d}from"./select-D55JvDou.js";import{S as p}from"./spacer-BWoNR27H.js";import{I as D}from"./common-types-Sih75Sav.js";import{I as L}from"./icon-BSFY3vDO.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-1V7clEnw.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"./actions-CHgr8eL8.js";import"./button-VxhoNhrV.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"],zn={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 Jn=["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,Jn as __namedExportsOrder,zn as default};
|