@oliasoft-open-source/react-ui-library 4.7.4 → 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 +85 -38
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-KGDBMAHA-fBkbFrxl.js → Color-KGDBMAHA-C0EpwEFf.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-PKQXORMH-BCXpse5g.js → DocsRenderer-PKQXORMH-CWe5JIRI.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-MGPZF2zs.js → accordion.stories-YuQaNHcr.js} +1 -1
- package/dist/storybook/assets/{afe.stories-Zs5w8AL0.js → afe.stories-CT81gs6M.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-DGEwyzdQ.js → buttons-and-links-CtOaPZlv.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-BZZ4ps89.js → casing-loads.stories-DQy8gjj6.js} +1 -1
- package/dist/storybook/assets/{cell.stories-DtPT5vsK.js → cell.stories-ChfAWqCt.js} +1 -1
- package/dist/storybook/assets/check-box.stories-BAH78tMZ.js +126 -0
- package/dist/storybook/assets/{chunk-HLWAVYOI-B_e8hbrU.js → chunk-HLWAVYOI-CkQdzq8g.js} +1 -1
- package/dist/storybook/assets/{color-BWuYLPlh.js → color-eaylxLAo.js} +1 -1
- package/dist/storybook/assets/dialog-vClt2ahZ.js +1 -0
- package/dist/storybook/assets/{file-input.stories-BH_glmEk.js → file-input.stories-Br89AkVv.js} +1 -1
- package/dist/storybook/assets/{footer.stories-CsvsDr1-.js → footer.stories-BM5UBN62.js} +1 -1
- package/dist/storybook/assets/{form.stories-BwzDZgen.js → form.stories-CYcggA-f.js} +1 -1
- package/dist/storybook/assets/{formation.stories-2ZjWA25v.js → formation.stories-NDB_Sbor.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-BrCAgVdx.js → index-CXmS_Aty.js} +1 -1
- package/dist/storybook/assets/{index-tzHbUYOM.js → index-Cf2IDQZ4.js} +4 -4
- package/dist/storybook/assets/{input-group.stories-D1i3gaZ1.js → input-group.stories-BmeUtBOK.js} +1 -1
- package/dist/storybook/assets/{input-validation-BcgNUeij.js → input-validation-U3o9_8IY.js} +2 -2
- package/dist/storybook/assets/{inputs-gN3bum_f.js → inputs-gP7hGRtM.js} +2 -2
- package/dist/storybook/assets/{layout-forms-DXG6Da8u.js → layout-forms-r2wYyx-8.js} +1 -1
- package/dist/storybook/assets/{layout-general-CEpJsTnH.js → layout-general-Bw291PmI.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-o5jcKCK_.js → message.stories-Czui5Ym7.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/{padding-and-spacing-By28ROLj.js → padding-and-spacing-DLeCWmND.js} +1 -1
- package/dist/storybook/assets/{pagination-CqvxiZHR.js → pagination-BtguPxeR.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-BzMlcLsN.js → pagination.stories-CgG4wp8P.js} +1 -1
- package/dist/storybook/assets/{pop-confirm.stories-MFDc3UAq.js → pop-confirm.stories-CZpYmUBz.js} +1 -1
- package/dist/storybook/assets/{popover.stories-CPW_LGAh.js → popover.stories-CtaFGXR_.js} +1 -1
- package/dist/storybook/assets/{preview-eMMARKcW.js → preview-BjyexbB3.js} +2 -2
- package/dist/storybook/assets/preview-DLBQXbKW.js +1 -0
- package/dist/storybook/assets/{preview-CO5-Yrmk.js → preview-Dml2wSQG.js} +1 -1
- package/dist/storybook/assets/radio-button.stories-BNE-U9db.js +71 -0
- package/dist/storybook/assets/{reservoirs.stories-Cql_9W4F.js → reservoirs.stories-ux3hZbkX.js} +1 -1
- package/dist/storybook/assets/{rich-text-input.stories-BuDUgUsz.js → rich-text-input.stories-savcIJ5B.js} +1 -1
- package/dist/storybook/assets/{row.stories-C-bEP9pE.js → row.stories-CG6Eipay.js} +1 -1
- 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/{smart-upload-modal.stories-DGIErcSu.js → smart-upload-modal.stories-BrsVuS4a.js} +1 -1
- package/dist/storybook/assets/{table-CXUwJOBt.js → table-CaaSoHex.js} +1 -1
- package/dist/storybook/assets/{table.stories-Cp0UIPUQ.js → table.stories-BiBivAvh.js} +1 -1
- package/dist/storybook/assets/{title.stories-hn5F8-2J.js → title.stories-CfdJbgvT.js} +1 -1
- package/dist/storybook/assets/toaster-DJeREs3e.js +1 -0
- package/dist/storybook/assets/toaster.stories-QjvljKdT.js +89 -0
- package/dist/storybook/assets/toggle.stories-BYrikgrA.js +141 -0
- package/dist/storybook/assets/{unit-input.stories-DGvDLll8.js → unit-input.stories-BSWm9641.js} +1 -1
- package/dist/storybook/assets/{unit-table.stories-D0q58B-1.js → unit-table.stories-CgF-UOP3.js} +1 -1
- 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 +6 -2
- package/dist/storybook/assets/check-box.stories-J1keUUs0.js +0 -102
- package/dist/storybook/assets/dialog-lhPZkAI2.js +0 -1
- package/dist/storybook/assets/iframe-DLWAAiXM.js +0 -2
- package/dist/storybook/assets/menu.stories-BE0AzXUY.js +0 -82
- package/dist/storybook/assets/message-ttrR1AaP.js +0 -1
- package/dist/storybook/assets/modal.stories-Ns1ikKLR.js +0 -200
- package/dist/storybook/assets/number-input.stories-BfRW8wgL.js +0 -97
- package/dist/storybook/assets/radio-button.stories-D7uvMLbK.js +0 -61
- package/dist/storybook/assets/select-tIEV7vnw.js +0 -40
- package/dist/storybook/assets/select.stories-BuW6SmRZ.js +0 -914
- package/dist/storybook/assets/toaster-DPbde9Mi.js +0 -1
- package/dist/storybook/assets/toaster.stories-DtRx7MDa.js +0 -86
- package/dist/storybook/assets/toggle.stories-CBkCAQh6.js +0 -117
- /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-tIEV7vnw.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-1V7clEnw.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-CZK3mphC.js";import"./button-C1sV-0mR.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};
|