@oliasoft-open-source/react-ui-library 4.11.0-beta-3 → 4.11.0

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.
Files changed (91) hide show
  1. package/dist/404.html +1 -0
  2. package/dist/index.js +78 -58
  3. package/dist/index.js.map +1 -1
  4. package/dist/storybook/assets/{Color-KGDBMAHA-DeGjmgTY.js → Color-KGDBMAHA-C4DMqLTk.js} +1 -1
  5. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-DJIj_qEG.js → DocsRenderer-PKQXORMH-4sK5I5fh.js} +1 -1
  6. package/dist/storybook/assets/{accordion.stories-BTxV-ybU.js → accordion.stories-BSRBp5Mg.js} +2 -2
  7. package/dist/storybook/assets/{afe.stories-DFQsvqIV.js → afe.stories-DM18uTAa.js} +2 -2
  8. package/dist/storybook/assets/{buttons-and-links-BHGzZGPV.js → buttons-and-links-BAJT7RF7.js} +1 -1
  9. package/dist/storybook/assets/{casing-loads.stories-CJpnsmsZ.js → casing-loads.stories-CE6GJ021.js} +2 -2
  10. package/dist/storybook/assets/{cell.stories-Bpl0Squh.js → cell.stories-BkZwSf40.js} +2 -2
  11. package/dist/storybook/assets/check-box.stories-BJ0ShmeC.js +97 -0
  12. package/dist/storybook/assets/check-box.test-case.stories-CzuYZkUh.js +30 -0
  13. package/dist/storybook/assets/{chunk-HLWAVYOI-D2p4xoma.js → chunk-HLWAVYOI-wyESLsMA.js} +1 -1
  14. package/dist/storybook/assets/{color-D9KYOiNh.js → color-CXm-Xks7.js} +1 -1
  15. package/dist/storybook/assets/enum-Bnn40S8Q.js +1 -0
  16. package/dist/storybook/assets/footer.stories-C1SojIiD.js +3 -0
  17. package/dist/storybook/assets/form.stories-BLcmnfy8.js +49 -0
  18. package/dist/storybook/assets/{formation.stories-BT8VrcqV.js → formation.stories-DZ9-Ct5F.js} +2 -2
  19. package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
  20. package/dist/storybook/assets/iframe-DGCZgYKU.js +2 -0
  21. package/dist/storybook/assets/{index-C0Iaso0O.js → index-D-ApmKaY.js} +88 -88
  22. package/dist/storybook/assets/{index-CNkaN_wz.js → index-DHATsyTR.js} +1 -1
  23. package/dist/storybook/assets/{input-group.stories-CElwRt3p.js → input-group.stories-EhmORqH9.js} +3 -3
  24. package/dist/storybook/assets/{input-validation-Ccgprl1C.js → input-validation-BdnKKR1J.js} +2 -2
  25. package/dist/storybook/assets/{inputs-DtQ245kS.js → inputs-Cpi6xZLB.js} +2 -2
  26. package/dist/storybook/assets/{layout-forms-Bm7FYA3V.js → layout-forms-DxC0zO_Y.js} +5 -5
  27. package/dist/storybook/assets/{layout-general-V7ekuEG7.js → layout-general-Be4RMwPl.js} +1 -1
  28. package/dist/storybook/assets/menu.stories-DLJSzJa-.js +82 -0
  29. package/dist/storybook/assets/menu.test-case.stories-DyrNbGBs.js +3 -0
  30. package/dist/storybook/assets/modal.stories-DOgeTuHT.js +200 -0
  31. package/dist/storybook/assets/modal.test-case.stories-DQ1Izuq6.js +21 -0
  32. package/dist/storybook/assets/{number-input-Bpg4Yqmo.js → number-input-CJJvhIIv.js} +1 -1
  33. package/dist/storybook/assets/number-input.stories-CKVq60XH.js +89 -0
  34. package/dist/storybook/assets/number-input.test-case.stories-Dh1F7N8M.js +92 -0
  35. package/dist/storybook/assets/{padding-and-spacing-IKi7rvQ-.js → padding-and-spacing-BZdh5XRo.js} +1 -1
  36. package/dist/storybook/assets/{pagination-CLt-kUlx.js → pagination-DWc8zp3k.js} +1 -1
  37. package/dist/storybook/assets/{pagination.stories-CTRM0Xou.js → pagination.stories-B5cOvzik.js} +2 -2
  38. package/dist/storybook/assets/popover.stories-p9_-pH_Q.js +10 -0
  39. package/dist/storybook/assets/{preview-ZgLLfBPl.js → preview-B3bzTGOp.js} +2 -2
  40. package/dist/storybook/assets/{preview-CtQzjqBP.js → preview-NGnahGuq.js} +1 -1
  41. package/dist/storybook/assets/{projects.stories-BQswWVCx.js → projects.stories-Co_WnKSx.js} +2 -2
  42. package/dist/storybook/assets/{radio-button-DmDuw4DA.js → radio-button-C4ljBRED.js} +1 -1
  43. package/dist/storybook/assets/radio-button.stories-D1rWr6ms.js +61 -0
  44. package/dist/storybook/assets/radio-button.test-case.stories-DglmHlWs.js +11 -0
  45. package/dist/storybook/assets/{reservoirs.stories-B12tIrmZ.js → reservoirs.stories-UW_8sofe.js} +2 -2
  46. package/dist/storybook/assets/{rich-text-input.stories-DkaOBgbE.js → rich-text-input.stories-CK_OTGiV.js} +3 -3
  47. package/dist/storybook/assets/{row.stories-msEoNdGI.js → row.stories-D11wLSt6.js} +2 -2
  48. package/dist/storybook/assets/select-03uRbc4I.js +61 -0
  49. package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
  50. package/dist/storybook/assets/select.stories-Bpffz9TF.js +498 -0
  51. package/dist/storybook/assets/select.stories-data-DxgWKlU6.js +1 -0
  52. package/dist/storybook/assets/select.test-case.stories-DwDNDHax.js +82 -0
  53. package/dist/storybook/assets/{site.stories-umpPYjkq.js → site.stories-ZGohyW6Z.js} +2 -2
  54. package/dist/storybook/assets/{table-5Y5KPNSk.js → table-DyOsClUv.js} +1 -1
  55. package/dist/storybook/assets/{table.stories-Clltxls0.js → table.stories-C1GgZCCR.js} +2 -2
  56. package/dist/storybook/assets/{tabs-C3NG6m9W.js → tabs-BoToLVEP.js} +1 -1
  57. package/dist/storybook/assets/tabs.stories-B52iEaHf.js +30 -0
  58. package/dist/storybook/assets/{title.stories-CsrYTGde.js → title.stories-jatDyjoM.js} +3 -3
  59. package/dist/storybook/assets/toaster.stories-G6nKp3uV.js +84 -0
  60. package/dist/storybook/assets/toaster.test-case.stories-CCHTh_U1.js +6 -0
  61. package/dist/storybook/assets/toggle.stories-BAislK3I.js +106 -0
  62. package/dist/storybook/assets/toggle.test-case.stories-CeUwdhGD.js +36 -0
  63. package/dist/storybook/assets/{tooltip.test-case.stories-CHibN8rC.js → tooltip.test-case.stories-C0wxGvKJ.js} +1 -1
  64. package/dist/storybook/assets/unit-input-CooRJQnF.js +10 -0
  65. package/dist/storybook/assets/unit-input.stories-zmSrl6iW.js +198 -0
  66. package/dist/storybook/assets/unit-input.test-case.stories-C1xRJ1EZ.js +220 -0
  67. package/dist/storybook/assets/unit-table.stories-Bl2gHPKG.js +152 -0
  68. package/dist/storybook/assets/unit-table.test-case.stories-DpSewGv4.js +1 -0
  69. package/dist/storybook/assets/use-previous-D775JrO6.js +1 -0
  70. package/dist/storybook/iframe.html +1 -1
  71. package/dist/storybook/index.json +1 -1
  72. package/dist/storybook/project.json +1 -1
  73. package/package.json +1 -1
  74. package/dist/storybook/assets/check-box.stories-DfbWw6mD.js +0 -126
  75. package/dist/storybook/assets/footer.stories-DgjDE_JR.js +0 -3
  76. package/dist/storybook/assets/form.stories-BrUnmw7R.js +0 -49
  77. package/dist/storybook/assets/iframe-B8VgeFPT.js +0 -2
  78. package/dist/storybook/assets/initialize-context-DOqEe1Xq.js +0 -1
  79. package/dist/storybook/assets/menu.stories-xWX80Eh2.js +0 -84
  80. package/dist/storybook/assets/modal.stories-LhoWfDE6.js +0 -220
  81. package/dist/storybook/assets/number-input.stories-DhCjZ37u.js +0 -180
  82. package/dist/storybook/assets/popover.stories-CGm0M5fv.js +0 -10
  83. package/dist/storybook/assets/radio-button.stories-5gvV0LD0.js +0 -71
  84. package/dist/storybook/assets/select-DnRuRG_N.js +0 -61
  85. package/dist/storybook/assets/select.input-D0UkAPd9.js +0 -1
  86. package/dist/storybook/assets/select.stories-B9w9ONzj.js +0 -579
  87. package/dist/storybook/assets/tabs.stories-dsXjRHJy.js +0 -30
  88. package/dist/storybook/assets/toaster.stories-HO4VBTy-.js +0 -89
  89. package/dist/storybook/assets/toggle.stories-qTHFTXxI.js +0 -141
  90. package/dist/storybook/assets/unit-input.stories-QnEpR0rY.js +0 -426
  91. package/dist/storybook/assets/unit-table.stories-BZCc0yfc.js +0 -152
@@ -1,579 +0,0 @@
1
- import{j as d}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{w as i,e as o,u as c}from"./index-DMAnyMX5.js";import{S as z}from"./select-DnRuRG_N.js";import{S as qa}from"./spacer-BWoNR27H.js";import{I as Z}from"./common-types-Sih75Sav.js";import{I as $}from"./icon-BSFY3vDO.js";import"./index-CF7H4eMJ.js";import"./lodash-c4VUpsOs.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.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"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";const _a=[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Monkeys",value:"bananas",disabled:!0},{label:"Wombats",value:"bark"}],Fa=[{label:"Kangaroos",value:"grass",details:"(grass)"},{label:"Monkeys",value:"bananas",details:"(bananas)"},{label:"Possums",value:"slugs",details:"(slugs)"}],Ga=[{type:"Heading",label:"Large"},{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{type:"Heading",label:"Small"},{label:"Possums",value:"slugs"}],Ya=[{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4}],Za=[{label:"Yes",value:!0},{label:"No",value:!1}],$a=[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"},{label:"Vampires",value:"blood",icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"})},{label:"Zombies",value:"brains",icon:d.jsx($,{icon:Z.ERROR,color:"var(--color-text-error)"})}],y=[{label:"Delete",icon:"delete",onClick:()=>{}},{label:"Rename",icon:"rename",onClick:()=>{}}],za=[{label:"Kangaroos",value:"grass",actions:y},{label:"Monkeys",value:"bananas",actions:y},{label:"Possums",value:"slugs",actions:y,details:"(some details)"}],Ja=[{label:"Kangaroos",value:"grass",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(grass)"},{label:"Monkeys",value:"bananas",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(bananas)"},{label:"Possums",value:"slugs",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(slugs)"}],Qa=[...Array(1e4).keys()].map((t,l)=>({label:Math.random().toString(36).substring(7),value:l})),Ua=["Aardvarks","Kangaroos","Monkeys","Possums"],Tn={title:"Forms/Select",component:z,args:{options:_a,native:!1,multi:!1,disabled:!1,autoLayerWidth:!1,clearable:!1,searchable:!0,right:!1}},a=t=>{const{multi:l,value:e}=t,[s,n]=b.useState(e||(l?[]:void 0)),u=r=>{const{value:g}=r.target;n(l?g:{value:g})};return d.jsx(z,{value:s,onChange:u,...t})},J=a.bind({}),C=a.bind({});C.args={small:!0};const x=a.bind({});x.args={width:"auto"};const I=a.bind({});I.args={width:"200px"};const w=a.bind({});w.args={native:!0};const f=a.bind({});f.args={multi:!0,clearable:!0};const T=a.bind({});T.args={options:[]};const B=a.bind({});B.args={clearable:!0};const j=a.bind({});j.args={value:{label:"Vampires",value:"blood"}};const k=a.bind({});k.args={placeholder:"Select the best animal..."};const W=a.bind({});W.args={options:Ga};const O=a.bind({});O.args={options:Fa};const D=a.bind({});D.args={options:$a};const N=a.bind({});N.args={options:za};const A=a.bind({});A.args={options:Ja};const E=a.bind({});E.args={searchable:!1};const M=a.bind({});M.args={right:!0};const v=a.bind({});v.parameters={docs:{description:{story:"Avoid autoLayerWidth for very long lists in custom selects (slow)"}}};v.args={width:"70px",autoLayerWidth:!0};const L=a.bind({});L.args={tooltip:"Some info"};const K=a.bind({});K.args={error:"Some info"};const R=a.bind({});R.args={warning:"Some info"};const P=a.bind({});P.args={disabled:!0};const H=a.bind({});H.args={options:Ya,placeholder:void 0};const _=a.bind({});_.args={options:Za};const q=a.bind({});q.args={options:Ua};const m=a.bind({});m.parameters={docs:{description:{story:"Avoid `width: auto` and autoLayerWidth for very long lists in custom selects (slow). Consider checkNonExistentValues={false}."}}};m.args={options:Qa};const F=a.bind({});F.args={deprecatedEventHandler:!0};const G=a.bind({});G.args={value:{label:"Vampires",value:"blood"},disabled:!0};const Y=()=>{const[t,l]=b.useState([{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}]),[e,s]=b.useState(void 0),[n,u]=b.useState([]);return d.jsxs(d.Fragment,{children:[d.jsx(z,{name:"example",options:t,onChange:r=>s({value:r.target.value}),onCreate:r=>{const g={label:r,value:r};l([...t,g]),s(g)},value:e,clearable:!0}),d.jsx(qa,{}),d.jsx(z,{name:"example",options:t,onChange:r=>u(r.target.value),onCreate:r=>{const g={label:r,value:r};l([...t,g]),console.log(r),u([...n,g])},value:n,multi:!0,clearable:!0})]})},h=a.bind({});h.args={testId:"testId",clearable:!0};h.play=async({canvasElement:t,step:l})=>{const e=t.parentElement?i(t.parentElement):null;await o(e).toBeTruthy(),e&&(await l("Select item with click",async()=>{const s=e.getByTestId("testId");await c.click(s);const n=e.getByTestId("testId-layer");await o(n).toBeInTheDocument();const u=i(n).getByText("Wombats");await c.click(u);const r=e.getByTestId("testId-value");await o(i(r).getByText("Wombats")).toBeInTheDocument()}),await l("Clear selected value",async()=>{const s=e.getByTestId("testId-clear");await c.click(s);const n=e.queryByTestId("testId-value");await o(n).not.toBeInTheDocument()}))};const S=a.bind({});S.args={testId:"testId",clearable:!0,multi:!0};S.play=async({canvasElement:t,step:l})=>{const e=t.parentElement?i(t.parentElement):null;await o(e).toBeTruthy(),e&&(await l("Select items with click",async()=>{const s=e.getByTestId("testId");await c.click(s);const n=e.getByTestId("testId-layer");await o(n).toBeInTheDocument();const u=i(n).getByText("Wombats");await c.click(u);const r=i(n).getByText("Kangaroos");await c.click(r),await c.click(t),await o(n).not.toBeInTheDocument();const g=e.getByTestId("testId-value");await o(i(g).getByText("Wombats")).toBeInTheDocument(),await o(i(g).getByText("Kangaroos")).toBeInTheDocument()}),await l("Deselect item with click",async()=>{const s=e.getByTestId("testId");await c.click(s);const n=e.getByTestId("testId-layer");await o(n).toBeInTheDocument();const u=i(n).getByText("Wombats");await c.click(u),await c.click(t),await o(n).not.toBeInTheDocument();const r=e.getByTestId("testId-value");await o(i(r).queryByText("Wombats")).not.toBeInTheDocument()}),await l("Clear selected values",async()=>{const s=e.getByTestId("testId-clear");await c.click(s);const n=e.queryByTestId("testId-value");await o(n).not.toBeInTheDocument()}))};const V=a.bind({});V.args={testId:"testId",disabled:!0};V.play=async({canvasElement:t,step:l})=>{const e=i(t);await l("Clicking disabled trigger should not show layer",async()=>{await e.getByTestId("testId").click();const n=e.queryByTestId("testId-layer");await o(n).toBeNull()})};const p=()=>{const[t,l]=b.useState(_a),[e,s]=b.useState(void 0);return d.jsx(z,{testId:"testId",name:"example",options:t,onChange:n=>s({value:n.target.value}),onCreate:n=>{const u={label:n,value:n};l([...t,u]),s(u)},value:e})};p.args={testId:"testId"};p.play=async({canvasElement:t,step:l})=>{const e=t.parentElement?i(t.parentElement):null;await o(e).toBeTruthy(),e&&await l("Create new item",async()=>{const s=e.getByTestId("testId-input");if(o(s).toBeInTheDocument(),!s)return;await c.type(s,"New value");const n=e.getByText('Create "New value"');await c.click(n);const u=e.getByTestId("testId-value");await o(i(u).getByText("New value")).toBeInTheDocument()})};Y.__docgenInfo={description:"",methods:[],displayName:"OnCreate"};p.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestCreate"};var Q,U,X;J.parameters={...J.parameters,docs:{...(Q=J.parameters)==null?void 0:Q.docs,source:{originalSource:`(args: any) => {
2
- const {
3
- multi,
4
- value
5
- } = args;
6
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
7
- const handleChange = (evt: any) => {
8
- const {
9
- value
10
- } = evt.target;
11
- setSelectedValue(multi ? value : {
12
- value
13
- });
14
- };
15
- return <Select value={selectedValue} onChange={handleChange}
16
- // eslint-disable-next-line react/jsx-props-no-spreading
17
- {...args} />;
18
- }`,...(X=(U=J.parameters)==null?void 0:U.docs)==null?void 0:X.source}}};var ee,ae,ne;C.parameters={...C.parameters,docs:{...(ee=C.parameters)==null?void 0:ee.docs,source:{originalSource:`(args: any) => {
19
- const {
20
- multi,
21
- value
22
- } = args;
23
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
24
- const handleChange = (evt: any) => {
25
- const {
26
- value
27
- } = evt.target;
28
- setSelectedValue(multi ? value : {
29
- value
30
- });
31
- };
32
- return <Select value={selectedValue} onChange={handleChange}
33
- // eslint-disable-next-line react/jsx-props-no-spreading
34
- {...args} />;
35
- }`,...(ne=(ae=C.parameters)==null?void 0:ae.docs)==null?void 0:ne.source}}};var te,se,le;x.parameters={...x.parameters,docs:{...(te=x.parameters)==null?void 0:te.docs,source:{originalSource:`(args: any) => {
36
- const {
37
- multi,
38
- value
39
- } = args;
40
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
41
- const handleChange = (evt: any) => {
42
- const {
43
- value
44
- } = evt.target;
45
- setSelectedValue(multi ? value : {
46
- value
47
- });
48
- };
49
- return <Select value={selectedValue} onChange={handleChange}
50
- // eslint-disable-next-line react/jsx-props-no-spreading
51
- {...args} />;
52
- }`,...(le=(se=x.parameters)==null?void 0:se.docs)==null?void 0:le.source}}};var re,oe,ue;I.parameters={...I.parameters,docs:{...(re=I.parameters)==null?void 0:re.docs,source:{originalSource:`(args: any) => {
53
- const {
54
- multi,
55
- value
56
- } = args;
57
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
58
- const handleChange = (evt: any) => {
59
- const {
60
- value
61
- } = evt.target;
62
- setSelectedValue(multi ? value : {
63
- value
64
- });
65
- };
66
- return <Select value={selectedValue} onChange={handleChange}
67
- // eslint-disable-next-line react/jsx-props-no-spreading
68
- {...args} />;
69
- }`,...(ue=(oe=I.parameters)==null?void 0:oe.docs)==null?void 0:ue.source}}};var ce,ie,de;w.parameters={...w.parameters,docs:{...(ce=w.parameters)==null?void 0:ce.docs,source:{originalSource:`(args: any) => {
70
- const {
71
- multi,
72
- value
73
- } = args;
74
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
75
- const handleChange = (evt: any) => {
76
- const {
77
- value
78
- } = evt.target;
79
- setSelectedValue(multi ? value : {
80
- value
81
- });
82
- };
83
- return <Select value={selectedValue} onChange={handleChange}
84
- // eslint-disable-next-line react/jsx-props-no-spreading
85
- {...args} />;
86
- }`,...(de=(ie=w.parameters)==null?void 0:ie.docs)==null?void 0:de.source}}};var ge,pe,ve;f.parameters={...f.parameters,docs:{...(ge=f.parameters)==null?void 0:ge.docs,source:{originalSource:`(args: any) => {
87
- const {
88
- multi,
89
- value
90
- } = args;
91
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
92
- const handleChange = (evt: any) => {
93
- const {
94
- value
95
- } = evt.target;
96
- setSelectedValue(multi ? value : {
97
- value
98
- });
99
- };
100
- return <Select value={selectedValue} onChange={handleChange}
101
- // eslint-disable-next-line react/jsx-props-no-spreading
102
- {...args} />;
103
- }`,...(ve=(pe=f.parameters)==null?void 0:pe.docs)==null?void 0:ve.source}}};var me,he,Se;T.parameters={...T.parameters,docs:{...(me=T.parameters)==null?void 0:me.docs,source:{originalSource:`(args: any) => {
104
- const {
105
- multi,
106
- value
107
- } = args;
108
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
109
- const handleChange = (evt: any) => {
110
- const {
111
- value
112
- } = evt.target;
113
- setSelectedValue(multi ? value : {
114
- value
115
- });
116
- };
117
- return <Select value={selectedValue} onChange={handleChange}
118
- // eslint-disable-next-line react/jsx-props-no-spreading
119
- {...args} />;
120
- }`,...(Se=(he=T.parameters)==null?void 0:he.docs)==null?void 0:Se.source}}};var Ve,be,ye;B.parameters={...B.parameters,docs:{...(Ve=B.parameters)==null?void 0:Ve.docs,source:{originalSource:`(args: any) => {
121
- const {
122
- multi,
123
- value
124
- } = args;
125
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
126
- const handleChange = (evt: any) => {
127
- const {
128
- value
129
- } = evt.target;
130
- setSelectedValue(multi ? value : {
131
- value
132
- });
133
- };
134
- return <Select value={selectedValue} onChange={handleChange}
135
- // eslint-disable-next-line react/jsx-props-no-spreading
136
- {...args} />;
137
- }`,...(ye=(be=B.parameters)==null?void 0:be.docs)==null?void 0:ye.source}}};var Ce,xe,Ie;j.parameters={...j.parameters,docs:{...(Ce=j.parameters)==null?void 0:Ce.docs,source:{originalSource:`(args: any) => {
138
- const {
139
- multi,
140
- value
141
- } = args;
142
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
143
- const handleChange = (evt: any) => {
144
- const {
145
- value
146
- } = evt.target;
147
- setSelectedValue(multi ? value : {
148
- value
149
- });
150
- };
151
- return <Select value={selectedValue} onChange={handleChange}
152
- // eslint-disable-next-line react/jsx-props-no-spreading
153
- {...args} />;
154
- }`,...(Ie=(xe=j.parameters)==null?void 0:xe.docs)==null?void 0:Ie.source}}};var we,fe,Te;k.parameters={...k.parameters,docs:{...(we=k.parameters)==null?void 0:we.docs,source:{originalSource:`(args: any) => {
155
- const {
156
- multi,
157
- value
158
- } = args;
159
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
160
- const handleChange = (evt: any) => {
161
- const {
162
- value
163
- } = evt.target;
164
- setSelectedValue(multi ? value : {
165
- value
166
- });
167
- };
168
- return <Select value={selectedValue} onChange={handleChange}
169
- // eslint-disable-next-line react/jsx-props-no-spreading
170
- {...args} />;
171
- }`,...(Te=(fe=k.parameters)==null?void 0:fe.docs)==null?void 0:Te.source}}};var Be,je,ke;W.parameters={...W.parameters,docs:{...(Be=W.parameters)==null?void 0:Be.docs,source:{originalSource:`(args: any) => {
172
- const {
173
- multi,
174
- value
175
- } = args;
176
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
177
- const handleChange = (evt: any) => {
178
- const {
179
- value
180
- } = evt.target;
181
- setSelectedValue(multi ? value : {
182
- value
183
- });
184
- };
185
- return <Select value={selectedValue} onChange={handleChange}
186
- // eslint-disable-next-line react/jsx-props-no-spreading
187
- {...args} />;
188
- }`,...(ke=(je=W.parameters)==null?void 0:je.docs)==null?void 0:ke.source}}};var We,Oe,De;O.parameters={...O.parameters,docs:{...(We=O.parameters)==null?void 0:We.docs,source:{originalSource:`(args: any) => {
189
- const {
190
- multi,
191
- value
192
- } = args;
193
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
194
- const handleChange = (evt: any) => {
195
- const {
196
- value
197
- } = evt.target;
198
- setSelectedValue(multi ? value : {
199
- value
200
- });
201
- };
202
- return <Select value={selectedValue} onChange={handleChange}
203
- // eslint-disable-next-line react/jsx-props-no-spreading
204
- {...args} />;
205
- }`,...(De=(Oe=O.parameters)==null?void 0:Oe.docs)==null?void 0:De.source}}};var Ne,Ae,Ee;D.parameters={...D.parameters,docs:{...(Ne=D.parameters)==null?void 0:Ne.docs,source:{originalSource:`(args: any) => {
206
- const {
207
- multi,
208
- value
209
- } = args;
210
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
211
- const handleChange = (evt: any) => {
212
- const {
213
- value
214
- } = evt.target;
215
- setSelectedValue(multi ? value : {
216
- value
217
- });
218
- };
219
- return <Select value={selectedValue} onChange={handleChange}
220
- // eslint-disable-next-line react/jsx-props-no-spreading
221
- {...args} />;
222
- }`,...(Ee=(Ae=D.parameters)==null?void 0:Ae.docs)==null?void 0:Ee.source}}};var Me,Le,Ke;N.parameters={...N.parameters,docs:{...(Me=N.parameters)==null?void 0:Me.docs,source:{originalSource:`(args: any) => {
223
- const {
224
- multi,
225
- value
226
- } = args;
227
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
228
- const handleChange = (evt: any) => {
229
- const {
230
- value
231
- } = evt.target;
232
- setSelectedValue(multi ? value : {
233
- value
234
- });
235
- };
236
- return <Select value={selectedValue} onChange={handleChange}
237
- // eslint-disable-next-line react/jsx-props-no-spreading
238
- {...args} />;
239
- }`,...(Ke=(Le=N.parameters)==null?void 0:Le.docs)==null?void 0:Ke.source}}};var Re,Pe,He;A.parameters={...A.parameters,docs:{...(Re=A.parameters)==null?void 0:Re.docs,source:{originalSource:`(args: any) => {
240
- const {
241
- multi,
242
- value
243
- } = args;
244
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
245
- const handleChange = (evt: any) => {
246
- const {
247
- value
248
- } = evt.target;
249
- setSelectedValue(multi ? value : {
250
- value
251
- });
252
- };
253
- return <Select value={selectedValue} onChange={handleChange}
254
- // eslint-disable-next-line react/jsx-props-no-spreading
255
- {...args} />;
256
- }`,...(He=(Pe=A.parameters)==null?void 0:Pe.docs)==null?void 0:He.source}}};var _e,qe,Fe;E.parameters={...E.parameters,docs:{...(_e=E.parameters)==null?void 0:_e.docs,source:{originalSource:`(args: any) => {
257
- const {
258
- multi,
259
- value
260
- } = args;
261
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
262
- const handleChange = (evt: any) => {
263
- const {
264
- value
265
- } = evt.target;
266
- setSelectedValue(multi ? value : {
267
- value
268
- });
269
- };
270
- return <Select value={selectedValue} onChange={handleChange}
271
- // eslint-disable-next-line react/jsx-props-no-spreading
272
- {...args} />;
273
- }`,...(Fe=(qe=E.parameters)==null?void 0:qe.docs)==null?void 0:Fe.source}}};var Ge,Ye,Ze;M.parameters={...M.parameters,docs:{...(Ge=M.parameters)==null?void 0:Ge.docs,source:{originalSource:`(args: any) => {
274
- const {
275
- multi,
276
- value
277
- } = args;
278
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
279
- const handleChange = (evt: any) => {
280
- const {
281
- value
282
- } = evt.target;
283
- setSelectedValue(multi ? value : {
284
- value
285
- });
286
- };
287
- return <Select value={selectedValue} onChange={handleChange}
288
- // eslint-disable-next-line react/jsx-props-no-spreading
289
- {...args} />;
290
- }`,...(Ze=(Ye=M.parameters)==null?void 0:Ye.docs)==null?void 0:Ze.source}}};var $e,ze,Je;v.parameters={...v.parameters,docs:{...($e=v.parameters)==null?void 0:$e.docs,source:{originalSource:`(args: any) => {
291
- const {
292
- multi,
293
- value
294
- } = args;
295
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
296
- const handleChange = (evt: any) => {
297
- const {
298
- value
299
- } = evt.target;
300
- setSelectedValue(multi ? value : {
301
- value
302
- });
303
- };
304
- return <Select value={selectedValue} onChange={handleChange}
305
- // eslint-disable-next-line react/jsx-props-no-spreading
306
- {...args} />;
307
- }`,...(Je=(ze=v.parameters)==null?void 0:ze.docs)==null?void 0:Je.source}}};var Qe,Ue,Xe;L.parameters={...L.parameters,docs:{...(Qe=L.parameters)==null?void 0:Qe.docs,source:{originalSource:`(args: any) => {
308
- const {
309
- multi,
310
- value
311
- } = args;
312
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
313
- const handleChange = (evt: any) => {
314
- const {
315
- value
316
- } = evt.target;
317
- setSelectedValue(multi ? value : {
318
- value
319
- });
320
- };
321
- return <Select value={selectedValue} onChange={handleChange}
322
- // eslint-disable-next-line react/jsx-props-no-spreading
323
- {...args} />;
324
- }`,...(Xe=(Ue=L.parameters)==null?void 0:Ue.docs)==null?void 0:Xe.source}}};var ea,aa,na;K.parameters={...K.parameters,docs:{...(ea=K.parameters)==null?void 0:ea.docs,source:{originalSource:`(args: any) => {
325
- const {
326
- multi,
327
- value
328
- } = args;
329
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
330
- const handleChange = (evt: any) => {
331
- const {
332
- value
333
- } = evt.target;
334
- setSelectedValue(multi ? value : {
335
- value
336
- });
337
- };
338
- return <Select value={selectedValue} onChange={handleChange}
339
- // eslint-disable-next-line react/jsx-props-no-spreading
340
- {...args} />;
341
- }`,...(na=(aa=K.parameters)==null?void 0:aa.docs)==null?void 0:na.source}}};var ta,sa,la;R.parameters={...R.parameters,docs:{...(ta=R.parameters)==null?void 0:ta.docs,source:{originalSource:`(args: any) => {
342
- const {
343
- multi,
344
- value
345
- } = args;
346
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
347
- const handleChange = (evt: any) => {
348
- const {
349
- value
350
- } = evt.target;
351
- setSelectedValue(multi ? value : {
352
- value
353
- });
354
- };
355
- return <Select value={selectedValue} onChange={handleChange}
356
- // eslint-disable-next-line react/jsx-props-no-spreading
357
- {...args} />;
358
- }`,...(la=(sa=R.parameters)==null?void 0:sa.docs)==null?void 0:la.source}}};var ra,oa,ua;P.parameters={...P.parameters,docs:{...(ra=P.parameters)==null?void 0:ra.docs,source:{originalSource:`(args: any) => {
359
- const {
360
- multi,
361
- value
362
- } = args;
363
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
364
- const handleChange = (evt: any) => {
365
- const {
366
- value
367
- } = evt.target;
368
- setSelectedValue(multi ? value : {
369
- value
370
- });
371
- };
372
- return <Select value={selectedValue} onChange={handleChange}
373
- // eslint-disable-next-line react/jsx-props-no-spreading
374
- {...args} />;
375
- }`,...(ua=(oa=P.parameters)==null?void 0:oa.docs)==null?void 0:ua.source}}};var ca,ia,da;H.parameters={...H.parameters,docs:{...(ca=H.parameters)==null?void 0:ca.docs,source:{originalSource:`(args: any) => {
376
- const {
377
- multi,
378
- value
379
- } = args;
380
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
381
- const handleChange = (evt: any) => {
382
- const {
383
- value
384
- } = evt.target;
385
- setSelectedValue(multi ? value : {
386
- value
387
- });
388
- };
389
- return <Select value={selectedValue} onChange={handleChange}
390
- // eslint-disable-next-line react/jsx-props-no-spreading
391
- {...args} />;
392
- }`,...(da=(ia=H.parameters)==null?void 0:ia.docs)==null?void 0:da.source}}};var ga,pa,va;_.parameters={..._.parameters,docs:{...(ga=_.parameters)==null?void 0:ga.docs,source:{originalSource:`(args: any) => {
393
- const {
394
- multi,
395
- value
396
- } = args;
397
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
398
- const handleChange = (evt: any) => {
399
- const {
400
- value
401
- } = evt.target;
402
- setSelectedValue(multi ? value : {
403
- value
404
- });
405
- };
406
- return <Select value={selectedValue} onChange={handleChange}
407
- // eslint-disable-next-line react/jsx-props-no-spreading
408
- {...args} />;
409
- }`,...(va=(pa=_.parameters)==null?void 0:pa.docs)==null?void 0:va.source}}};var ma,ha,Sa;q.parameters={...q.parameters,docs:{...(ma=q.parameters)==null?void 0:ma.docs,source:{originalSource:`(args: any) => {
410
- const {
411
- multi,
412
- value
413
- } = args;
414
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
415
- const handleChange = (evt: any) => {
416
- const {
417
- value
418
- } = evt.target;
419
- setSelectedValue(multi ? value : {
420
- value
421
- });
422
- };
423
- return <Select value={selectedValue} onChange={handleChange}
424
- // eslint-disable-next-line react/jsx-props-no-spreading
425
- {...args} />;
426
- }`,...(Sa=(ha=q.parameters)==null?void 0:ha.docs)==null?void 0:Sa.source}}};var Va,ba,ya;m.parameters={...m.parameters,docs:{...(Va=m.parameters)==null?void 0:Va.docs,source:{originalSource:`(args: any) => {
427
- const {
428
- multi,
429
- value
430
- } = args;
431
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
432
- const handleChange = (evt: any) => {
433
- const {
434
- value
435
- } = evt.target;
436
- setSelectedValue(multi ? value : {
437
- value
438
- });
439
- };
440
- return <Select value={selectedValue} onChange={handleChange}
441
- // eslint-disable-next-line react/jsx-props-no-spreading
442
- {...args} />;
443
- }`,...(ya=(ba=m.parameters)==null?void 0:ba.docs)==null?void 0:ya.source}}};var Ca,xa,Ia;F.parameters={...F.parameters,docs:{...(Ca=F.parameters)==null?void 0:Ca.docs,source:{originalSource:`(args: any) => {
444
- const {
445
- multi,
446
- value
447
- } = args;
448
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
449
- const handleChange = (evt: any) => {
450
- const {
451
- value
452
- } = evt.target;
453
- setSelectedValue(multi ? value : {
454
- value
455
- });
456
- };
457
- return <Select value={selectedValue} onChange={handleChange}
458
- // eslint-disable-next-line react/jsx-props-no-spreading
459
- {...args} />;
460
- }`,...(Ia=(xa=F.parameters)==null?void 0:xa.docs)==null?void 0:Ia.source}}};var wa,fa,Ta;G.parameters={...G.parameters,docs:{...(wa=G.parameters)==null?void 0:wa.docs,source:{originalSource:`(args: any) => {
461
- const {
462
- multi,
463
- value
464
- } = args;
465
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
466
- const handleChange = (evt: any) => {
467
- const {
468
- value
469
- } = evt.target;
470
- setSelectedValue(multi ? value : {
471
- value
472
- });
473
- };
474
- return <Select value={selectedValue} onChange={handleChange}
475
- // eslint-disable-next-line react/jsx-props-no-spreading
476
- {...args} />;
477
- }`,...(Ta=(fa=G.parameters)==null?void 0:fa.docs)==null?void 0:Ta.source}}};var Ba,ja,ka;Y.parameters={...Y.parameters,docs:{...(Ba=Y.parameters)==null?void 0:Ba.docs,source:{originalSource:`() => {
478
- const [options, setOptions] = useState([{
479
- label: 'Aardvarks',
480
- value: 'termites'
481
- }, {
482
- label: 'Kangaroos',
483
- value: 'grass'
484
- }, {
485
- label: 'Monkeys',
486
- value: 'bananas'
487
- }, {
488
- label: 'Possums',
489
- value: 'slugs'
490
- }]);
491
- const [singleValue, setSingleValue] = useState<ISelectSelectedOption | undefined>(undefined);
492
- const [multiValue, setMultiValue] = useState<ISelectSelectedOption[]>([]);
493
- return <>
494
- <Select name="example" options={options} onChange={evt => setSingleValue({
495
- value: evt.target.value
496
- })} onCreate={value => {
497
- const newValue = {
498
- label: value,
499
- value
500
- };
501
- setOptions([...options, newValue]);
502
- setSingleValue(newValue);
503
- }} value={singleValue} clearable />
504
- <Spacer />
505
- <Select name="example" options={options} onChange={evt => setMultiValue(evt.target.value)} onCreate={value => {
506
- const newValue = {
507
- label: value,
508
- value
509
- };
510
- setOptions([...options, newValue]);
511
- console.log(value);
512
- setMultiValue([...multiValue, newValue]);
513
- }} value={multiValue} multi clearable />
514
- </>;
515
- }`,...(ka=(ja=Y.parameters)==null?void 0:ja.docs)==null?void 0:ka.source}}};var Wa,Oa,Da;h.parameters={...h.parameters,docs:{...(Wa=h.parameters)==null?void 0:Wa.docs,source:{originalSource:`(args: any) => {
516
- const {
517
- multi,
518
- value
519
- } = args;
520
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
521
- const handleChange = (evt: any) => {
522
- const {
523
- value
524
- } = evt.target;
525
- setSelectedValue(multi ? value : {
526
- value
527
- });
528
- };
529
- return <Select value={selectedValue} onChange={handleChange}
530
- // eslint-disable-next-line react/jsx-props-no-spreading
531
- {...args} />;
532
- }`,...(Da=(Oa=h.parameters)==null?void 0:Oa.docs)==null?void 0:Da.source}}};var Na,Aa,Ea;S.parameters={...S.parameters,docs:{...(Na=S.parameters)==null?void 0:Na.docs,source:{originalSource:`(args: any) => {
533
- const {
534
- multi,
535
- value
536
- } = args;
537
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
538
- const handleChange = (evt: any) => {
539
- const {
540
- value
541
- } = evt.target;
542
- setSelectedValue(multi ? value : {
543
- value
544
- });
545
- };
546
- return <Select value={selectedValue} onChange={handleChange}
547
- // eslint-disable-next-line react/jsx-props-no-spreading
548
- {...args} />;
549
- }`,...(Ea=(Aa=S.parameters)==null?void 0:Aa.docs)==null?void 0:Ea.source}}};var Ma,La,Ka;V.parameters={...V.parameters,docs:{...(Ma=V.parameters)==null?void 0:Ma.docs,source:{originalSource:`(args: any) => {
550
- const {
551
- multi,
552
- value
553
- } = args;
554
- const [selectedValue, setSelectedValue] = useState(value || (multi ? [] : undefined));
555
- const handleChange = (evt: any) => {
556
- const {
557
- value
558
- } = evt.target;
559
- setSelectedValue(multi ? value : {
560
- value
561
- });
562
- };
563
- return <Select value={selectedValue} onChange={handleChange}
564
- // eslint-disable-next-line react/jsx-props-no-spreading
565
- {...args} />;
566
- }`,...(Ka=(La=V.parameters)==null?void 0:La.docs)==null?void 0:Ka.source}}};var Ra,Pa,Ha;p.parameters={...p.parameters,docs:{...(Ra=p.parameters)==null?void 0:Ra.docs,source:{originalSource:`() => {
567
- const [options, setOptions] = useState(storyData.options);
568
- const [singleValue, setSingleValue] = useState<ISelectSelectedOption | undefined>(undefined);
569
- return <Select testId="testId" name="example" options={options} onChange={evt => setSingleValue({
570
- value: evt.target.value
571
- })} onCreate={value => {
572
- const newValue = {
573
- label: value,
574
- value
575
- };
576
- setOptions([...options, newValue]);
577
- setSingleValue(newValue);
578
- }} value={singleValue} />;
579
- }`,...(Ha=(Pa=p.parameters)==null?void 0:Pa.docs)==null?void 0:Ha.source}}};const Bn=["Default","Small","AutoWidth","FixedWidth","Native","Multiselect","Empty","Clearable","NonExistentValue","CustomPlaceholder","OptionsWithHeadings","OptionsWithDetails","OptionsWithIcons","OptionsWithActions","OptionsWithEverything","NotSearchable","RightAligned","AutoLayerWidth","Tooltip","Error","Warning","Disabled","NumericOptions","BooleanOptions","SimpleOptions","VeryLongList","DeprecatedEventHandler","TestDisabledNonExistentValue","OnCreate","Test","TestMulti","TestDisabled","TestCreate"];export{v as AutoLayerWidth,x as AutoWidth,_ as BooleanOptions,B as Clearable,k as CustomPlaceholder,J as Default,F as DeprecatedEventHandler,P as Disabled,T as Empty,K as Error,I as FixedWidth,f as Multiselect,w as Native,j as NonExistentValue,E as NotSearchable,H as NumericOptions,Y as OnCreate,N as OptionsWithActions,O as OptionsWithDetails,A as OptionsWithEverything,W as OptionsWithHeadings,D as OptionsWithIcons,M as RightAligned,q as SimpleOptions,C as Small,h as Test,p as TestCreate,V as TestDisabled,G as TestDisabledNonExistentValue,S as TestMulti,L as Tooltip,m as VeryLongList,R as Warning,Bn as __namedExportsOrder,Tn as default};
@@ -1,30 +0,0 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as I}from"./index-DhsZuJvc.js";import{T as b}from"./tabs-C3NG6m9W.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./lodash-c4VUpsOs.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./types-BmbYqTX_.js";const Q={title:"Navigation/Tabs",component:b,args:{name:"example",options:[{label:"Tab",value:0},{label:"Tab",value:1},{label:"With Badge",value:2,badge:"3"},{label:"Invalid",value:3,invalid:!0},{label:"Disabled",value:4,disabled:!0},{label:"Hidden tab",value:5,hidden:!0}],value:0}},s=i=>e.jsx(b,{...i}),d=s.bind({}),r=s.bind({});r.args={children:[e.jsx("div",{label:"Tab 0",children:e.jsx("h3",{children:"Tab 0 Content"})}),e.jsx("div",{label:"Tab 1",hidden:!0,children:e.jsx("h3",{children:"Tab 1 Content"})}),e.jsx("div",{label:"Tab 2",disabled:!0,children:e.jsx("h3",{children:"Tab 2 Content"})}),e.jsx("div",{label:"Tab 3",children:e.jsx("h3",{children:"Tab 3 Content"})}),e.jsx("div",{label:"Tab 4",children:e.jsx("h3",{children:"Tab 4 Content"})})]};const l=s.bind({});l.args={margin:!1};const a=s.bind({});a.parameters={layout:"fullscreen",docs:{description:{story:"When you want the divider to fill the edges of its container."}}};a.args={padding:!0};const t=s.bind({});t.args={options:[{label:"Tab 0",value:0},{label:"Tab 1",value:1},{label:"Tab 2",value:2},{label:"Tab 3",value:3,right:!0},{label:"Tab 4",value:4,right:!0}]};const o=()=>{const i=[{label:"Strawberries",value:"strawberries"},{label:"Bananas",value:"bananas"},{label:"Apples",value:"apples",disabled:!0},{label:"Pomegranates",value:"pomegranates"}],[p,D]=I.useState(i[0]);return e.jsxs(e.Fragment,{children:[e.jsx(b,{name:"example",value:p,options:i,onChange:c=>{const{value:H,label:z}=(c==null?void 0:c.target)??{};D({value:H,label:z})}}),e.jsxs("span",{children:["Eating ",p.value,"..."]})]})},n=s.bind({});n.args={options:[{label:"Title Case Label",value:0},{label:"Mixed case label",value:1},{label:"lower case label",value:2}]};o.__docgenInfo={description:"",methods:[],displayName:"Managed"};var u,m,g;d.parameters={...d.parameters,docs:{...(u=d.parameters)==null?void 0:u.docs,source:{originalSource:"args => <Tabs {...args} />",...(g=(m=d.parameters)==null?void 0:m.docs)==null?void 0:g.source}}};var T,v,h;r.parameters={...r.parameters,docs:{...(T=r.parameters)==null?void 0:T.docs,source:{originalSource:"args => <Tabs {...args} />",...(h=(v=r.parameters)==null?void 0:v.docs)==null?void 0:h.source}}};var x,j,S;l.parameters={...l.parameters,docs:{...(x=l.parameters)==null?void 0:x.docs,source:{originalSource:"args => <Tabs {...args} />",...(S=(j=l.parameters)==null?void 0:j.docs)==null?void 0:S.source}}};var C,f,w;a.parameters={...a.parameters,docs:{...(C=a.parameters)==null?void 0:C.docs,source:{originalSource:"args => <Tabs {...args} />",...(w=(f=a.parameters)==null?void 0:f.docs)==null?void 0:w.source}}};var M,y,E;t.parameters={...t.parameters,docs:{...(M=t.parameters)==null?void 0:M.docs,source:{originalSource:"args => <Tabs {...args} />",...(E=(y=t.parameters)==null?void 0:y.docs)==null?void 0:E.source}}};var _,A,N;o.parameters={...o.parameters,docs:{...(_=o.parameters)==null?void 0:_.docs,source:{originalSource:`() => {
2
- const options = [{
3
- label: 'Strawberries',
4
- value: 'strawberries'
5
- }, {
6
- label: 'Bananas',
7
- value: 'bananas'
8
- }, {
9
- label: 'Apples',
10
- value: 'apples',
11
- disabled: true
12
- }, {
13
- label: 'Pomegranates',
14
- value: 'pomegranates'
15
- }];
16
- const [selectedTab, setSelectedTab] = useState(options[0]);
17
- return <>
18
- <Tabs name="example" value={selectedTab} options={options} onChange={evt => {
19
- const {
20
- value,
21
- label
22
- } = ((evt?.target ?? {}) as any);
23
- setSelectedTab({
24
- value,
25
- label
26
- });
27
- }} />
28
- <span>Eating {selectedTab.value}...</span>
29
- </>;
30
- }`,...(N=(A=o.parameters)==null?void 0:A.docs)==null?void 0:N.source}}};var P,W,B;n.parameters={...n.parameters,docs:{...(P=n.parameters)==null?void 0:P.docs,source:{originalSource:"args => <Tabs {...args} />",...(B=(W=n.parameters)==null?void 0:W.docs)==null?void 0:B.source}}};const U=["Default","WithChildren","NoMargin","HorizontalPadding","Alignment","Managed","TestTitleCase"];export{t as Alignment,d as Default,a as HorizontalPadding,o as Managed,l as NoMargin,n as TestTitleCase,r as WithChildren,U as __namedExportsOrder,Q as default};