@oliasoft-open-source/react-ui-library 4.8.1 → 4.8.2

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 (53) hide show
  1. package/dist/index.js +1 -4
  2. package/dist/index.js.map +1 -1
  3. package/dist/storybook/assets/{Color-KGDBMAHA-2ftDGfRC.js → Color-KGDBMAHA-CLI1j7TM.js} +1 -1
  4. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-G3VSiFLs.js → DocsRenderer-PKQXORMH-C-VGLian.js} +1 -1
  5. package/dist/storybook/assets/{accordion.stories-B3eUVB9V.js → accordion.stories-CjdOndbq.js} +2 -2
  6. package/dist/storybook/assets/{afe.stories-CSYzQy-o.js → afe.stories-D-uQj_IO.js} +2 -2
  7. package/dist/storybook/assets/{buttons-and-links-DgWk5FQt.js → buttons-and-links-DLCyz4fu.js} +1 -1
  8. package/dist/storybook/assets/{casing-loads.stories-CTf1cpS3.js → casing-loads.stories-Cb2t61c-.js} +2 -2
  9. package/dist/storybook/assets/{cell.stories-DXApMBee.js → cell.stories-B6XrqnOz.js} +2 -2
  10. package/dist/storybook/assets/{chunk-HLWAVYOI-CGp4-QUE.js → chunk-HLWAVYOI-B-NqvPla.js} +1 -1
  11. package/dist/storybook/assets/{color-JX8P2xFz.js → color-DFh0-vFc.js} +1 -1
  12. package/dist/storybook/assets/enum-Bnn40S8Q.js +1 -0
  13. package/dist/storybook/assets/{footer.stories-BobRokDb.js → footer.stories-BxFhNGsz.js} +2 -2
  14. package/dist/storybook/assets/form.stories-C_zflIAj.js +49 -0
  15. package/dist/storybook/assets/{formation.stories-xm22XGgs.js → formation.stories-r9JrQX7d.js} +2 -2
  16. package/dist/storybook/assets/iframe-DOgYbEjR.js +2 -0
  17. package/dist/storybook/assets/{index-D-0J5wOk.js → index-BIH3zom3.js} +1 -1
  18. package/dist/storybook/assets/{index-Bh4hgpyc.js → index-MQZw3-wz.js} +4 -4
  19. package/dist/storybook/assets/{input-group.stories-M4a8AYtB.js → input-group.stories-dQnx3QX0.js} +2 -2
  20. package/dist/storybook/assets/{input-validation-CRY9hASh.js → input-validation-BhTmzA8C.js} +2 -2
  21. package/dist/storybook/assets/{inputs-PulLFmNE.js → inputs-BZwMYCXB.js} +2 -2
  22. package/dist/storybook/assets/layout-forms-j_hFXArR.js +16 -0
  23. package/dist/storybook/assets/{layout-general-BS3o8j_a.js → layout-general-hZ1fwnpl.js} +1 -1
  24. package/dist/storybook/assets/{modal.stories-PZXXHpu9.js → modal.stories-B-4WKtnM.js} +2 -2
  25. package/dist/storybook/assets/{number-input-CEoWDcRg.js → number-input-C8O0lnql.js} +2 -2
  26. package/dist/storybook/assets/number-input.stories-e-MRb-7_.js +124 -0
  27. package/dist/storybook/assets/{padding-and-spacing-B4zeG787.js → padding-and-spacing-DZHdCzCJ.js} +1 -1
  28. package/dist/storybook/assets/{pagination-T__Mixkr.js → pagination-bLx5-m9c.js} +1 -1
  29. package/dist/storybook/assets/{pagination.stories-C_oRnFX_.js → pagination.stories-BHPRfynZ.js} +2 -2
  30. package/dist/storybook/assets/popover.stories-DyTPnA5y.js +10 -0
  31. package/dist/storybook/assets/{preview-_xr6Jbjy.js → preview-_veCKVNG.js} +2 -2
  32. package/dist/storybook/assets/{preview-D_pdGeyT.js → preview-nWTzJqHS.js} +1 -1
  33. package/dist/storybook/assets/{reservoirs.stories-zzDr9Zir.js → reservoirs.stories-C98Z9kS0.js} +2 -2
  34. package/dist/storybook/assets/{rich-text-input.stories-be871WZn.js → rich-text-input.stories-B2p90wTh.js} +3 -3
  35. package/dist/storybook/assets/{row.stories-DmNKaTP6.js → row.stories-BRVnImTl.js} +2 -2
  36. package/dist/storybook/assets/select-BpALjE__.js +61 -0
  37. package/dist/storybook/assets/{select.stories-CtbKVF6A.js → select.stories-B0d_sE6g.js} +2 -2
  38. package/dist/storybook/assets/{table-C0QH08M6.js → table-DWBe_npR.js} +1 -1
  39. package/dist/storybook/assets/{table.stories-safUrF3C.js → table.stories-Cb7lE3nF.js} +2 -2
  40. package/dist/storybook/assets/{title.stories-By9nz9a2.js → title.stories-TUTSNdwJ.js} +2 -2
  41. package/dist/storybook/assets/{unit-input.stories-DTP4sTwo.js → unit-input.stories-CRAsgJro.js} +10 -10
  42. package/dist/storybook/assets/unit-table.stories-BdTJv4W-.js +152 -0
  43. package/dist/storybook/iframe.html +1 -1
  44. package/dist/storybook/index.json +1 -1
  45. package/dist/storybook/project.json +1 -1
  46. package/package.json +1 -1
  47. package/dist/storybook/assets/form.stories-BCg9rFVI.js +0 -49
  48. package/dist/storybook/assets/iframe-EHZbBy3L.js +0 -2
  49. package/dist/storybook/assets/layout-forms-Dhgne9wj.js +0 -16
  50. package/dist/storybook/assets/number-input.stories-DqfU8Xdg.js +0 -110
  51. package/dist/storybook/assets/popover.stories-B9slHpqQ.js +0 -10
  52. package/dist/storybook/assets/select-BW0IihoR.js +0 -61
  53. package/dist/storybook/assets/unit-table.stories-CnyzGe3D.js +0 -152
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{T as x}from"./common-types-Sih75Sav.js";import{I as t}from"./input-group-BaRSJAEN.js";import{I as h}from"./input-group-addon-D68iUKV2.js";import{I as M}from"./input-DTXbDJaL.js";import{B as C}from"./button-CzvLc2io.js";import{M as f}from"./actions-Tr0wIZve.js";import{S as I}from"./select-BW0IihoR.js";import{T as P}from"./tooltip-1V7clEnw.js";import{M as r}from"./types-BmbYqTX_.js";import"./index-DhsZuJvc.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.js";import"./lodash-c4VUpsOs.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./badge-CLQ59MDF.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./text-B3-TSWok.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./index-CUZDtIZe.js";const le={title:"Forms/InputGroup",component:t,args:{}},s=i=>e.jsxs(t,{...i,children:[e.jsx(h,{children:"$"}),e.jsx(M,{width:"100%",name:"example",value:"123",onChange:()=>{}}),e.jsx(I,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}],onChange:()=>{},value:{label:"Monkeys",value:"bananas"},width:"auto",native:!0}),e.jsx(f,{menu:{label:"E-06/degC",trigger:x.DROP_DOWN_BUTTON,small:i.small,sections:[{type:r.OPTION,label:"403.5433",description:"ft",inline:!0,onClick:()=>{}},{type:r.OPTION,label:"0.123",description:"km",inline:!0,onClick:()=>{}},{type:r.OPTION,label:"4842.4608",description:"in",inline:!0,onClick:()=>{}}]}}),e.jsx(C,{name:"example",label:"Confirm",colored:!0,onClick:()=>{}})]}),o=s.bind({}),a=s.bind({});a.args={width:"480px"};const l=s.bind({});l.args={small:!0};const n=()=>e.jsxs(t,{children:[e.jsx(I,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}],onChange:()=>{},value:{label:"Monkeys",value:"bananas"}}),e.jsx(P,{text:"This is a tooltip",children:e.jsx(C,{name:"example",label:"Confirm",colored:!0,onClick:()=>{},groupOrder:"last"})})]});n.__docgenInfo={description:"",methods:[],displayName:"SelectWithButton"};var p,u,m;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`args => {
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{T as x}from"./common-types-Sih75Sav.js";import{I as t}from"./input-group-BaRSJAEN.js";import{I as h}from"./input-group-addon-D68iUKV2.js";import{I as M}from"./input-DTXbDJaL.js";import{B as C}from"./button-CzvLc2io.js";import{M as f}from"./actions-Tr0wIZve.js";import{S as I}from"./select-BpALjE__.js";import{T as P}from"./tooltip-1V7clEnw.js";import{M as r}from"./types-BmbYqTX_.js";import"./index-DhsZuJvc.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.js";import"./lodash-c4VUpsOs.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./badge-CLQ59MDF.js";import"./enum-Bnn40S8Q.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./text-B3-TSWok.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./index-CUZDtIZe.js";const ne={title:"Forms/InputGroup",component:t,args:{}},s=i=>e.jsxs(t,{...i,children:[e.jsx(h,{children:"$"}),e.jsx(M,{width:"100%",name:"example",value:"123",onChange:()=>{}}),e.jsx(I,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}],onChange:()=>{},value:{label:"Monkeys",value:"bananas"},width:"auto",native:!0}),e.jsx(f,{menu:{label:"E-06/degC",trigger:x.DROP_DOWN_BUTTON,small:i.small,sections:[{type:r.OPTION,label:"403.5433",description:"ft",inline:!0,onClick:()=>{}},{type:r.OPTION,label:"0.123",description:"km",inline:!0,onClick:()=>{}},{type:r.OPTION,label:"4842.4608",description:"in",inline:!0,onClick:()=>{}}]}}),e.jsx(C,{name:"example",label:"Confirm",colored:!0,onClick:()=>{}})]}),o=s.bind({}),a=s.bind({});a.args={width:"480px"};const l=s.bind({});l.args={small:!0};const n=()=>e.jsxs(t,{children:[e.jsx(I,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}],onChange:()=>{},value:{label:"Monkeys",value:"bananas"}}),e.jsx(P,{text:"This is a tooltip",children:e.jsx(C,{name:"example",label:"Confirm",colored:!0,onClick:()=>{},groupOrder:"last"})})]});n.__docgenInfo={description:"",methods:[],displayName:"SelectWithButton"};var p,u,m;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`args => {
2
2
  return <InputGroup
3
3
  // eslint-disable-next-line react/jsx-props-no-spreading
4
4
  {...args}>
@@ -164,4 +164,4 @@ import{j as e}from"./jsx-runtime-eps93zm2.js";import{T as x}from"./common-types-
164
164
  <Button name="example" label="Confirm" colored onClick={() => {}} groupOrder="last" />
165
165
  </Tooltip>
166
166
  </InputGroup>;
167
- }`,...(O=(y=n.parameters)==null?void 0:y.docs)==null?void 0:O.source}}};const ne=["Default","FixedWidth","Small","SelectWithButton"];export{o as Default,a as FixedWidth,n as SelectWithButton,l as Small,ne as __namedExportsOrder,le as default};
167
+ }`,...(O=(y=n.parameters)==null?void 0:y.docs)==null?void 0:O.source}}};const oe=["Default","FixedWidth","Small","SelectWithButton"];export{o as Default,a as FixedWidth,n as SelectWithButton,l as Small,oe as __namedExportsOrder,ne as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as r}from"./index-BcNHZKhG.js";import{Z as s,$ as n}from"./index-Bh4hgpyc.js";import{NonExistentValue as a,Error as l}from"./select.stories-CtbKVF6A.js";import"./index-DhsZuJvc.js";import"./iframe-EHZbBy3L.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./select-BW0IihoR.js";import"./lodash-c4VUpsOs.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.js";import"./tooltip-1V7clEnw.js";import"./index-CEuq6vkz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./button-CzvLc2io.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./spacer-BWoNR27H.js";function o(t){const i={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",strong:"strong",...r(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Input Validation"}),`
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as r}from"./index-BcNHZKhG.js";import{Z as s,$ as n}from"./index-MQZw3-wz.js";import{NonExistentValue as a,Error as l}from"./select.stories-B0d_sE6g.js";import"./index-DhsZuJvc.js";import"./iframe-DOgYbEjR.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./select-BpALjE__.js";import"./lodash-c4VUpsOs.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.js";import"./tooltip-1V7clEnw.js";import"./enum-Bnn40S8Q.js";import"./index-CEuq6vkz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./button-CzvLc2io.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./spacer-BWoNR27H.js";function o(t){const i={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",strong:"strong",...r(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Input Validation"}),`
2
2
  `,e.jsx(i.h1,{id:"input-validation",children:"Input Validation"}),`
3
3
  `,e.jsx(i.h2,{id:"select",children:"Select"}),`
4
4
  `,e.jsx(i.h3,{id:"invalid-states",children:"Invalid states"}),`
@@ -23,4 +23,4 @@ application layer.`}),`
23
23
  `,e.jsxs(i.p,{children:[`For a 'hard invalid' state (where the value is unusable, but required), it is recommended for the business logic to not
24
24
  set a value (use `,e.jsx(i.code,{children:"null"})," or ",e.jsx(i.code,{children:"undefined"}),"), and to set the ",e.jsx(i.code,{children:"error"}),` prop with an appropriate message
25
25
  (e.g. "Value is required").`]}),`
26
- `,e.jsx(n,{of:l})]})}function $(t={}){const{wrapper:i}={...r(),...t.components};return i?e.jsx(i,{...t,children:e.jsx(o,{...t})}):o(t)}export{$ as default};
26
+ `,e.jsx(n,{of:l})]})}function z(t={}){const{wrapper:i}={...r(),...t.components};return i?e.jsx(i,{...t,children:e.jsx(o,{...t})}):o(t)}export{z as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as s}from"./index-BcNHZKhG.js";import{Z as r,$ as o}from"./index-Bh4hgpyc.js";import{Default as l}from"./button.stories-tM18j4A3.js";import{Default as a}from"./check-box.stories-Q_WICJ_2.js";import{Default as c}from"./file-input.stories-DTRWZyqS.js";import{Default as d,Date as p}from"./input.stories-FKl0qVhm.js";import{Default as h}from"./number-input.stories-DqfU8Xdg.js";import{Default as m}from"./option-dropdown.stories-ntKLWycS.js";import{Default as u}from"./radio-button.stories-CAHs1mr6.js";import{Native as f,Default as x}from"./select.stories-CtbKVF6A.js";import{Default as j}from"./slider.stories-7oMw2PCp.js";import{Default as b}from"./textarea.stories-CJ-Oqytp.js";import{Default as g}from"./toggle.stories-DOc7uN93.js";import"./index-DhsZuJvc.js";import"./iframe-EHZbBy3L.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";import"./react-router-dom-CMITYWBH.js";import"./index-CEuq6vkz.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./flex-EllkLxgO.js";import"./button-CzvLc2io.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./tooltip-1V7clEnw.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./check-box-wCvXxtCz.js";import"./help-icon-41R-Z9N1.js";import"./file-input-CMP44wlr.js";import"./lodash-c4VUpsOs.js";import"./input-group-BaRSJAEN.js";import"./input-DTXbDJaL.js";import"./types-Dx2TtIG9.js";import"./spacer-BWoNR27H.js";import"./message-DQ3q8XF9.js";import"./textarea-D6ltcKhz.js";import"./index-C0x1JmaP.js";import"./index-DRSy5Ssd.js";import"./number-input-CEoWDcRg.js";import"./input-group-addon-D68iUKV2.js";import"./select-BW0IihoR.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./divider-DY9nJ_7N.js";import"./radio-button-C3RuBqEf.js";import"./slider-CBE03NwD.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./toggle-C0zvrIOF.js";function i(n){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...s(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Inputs"}),`
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as s}from"./index-BcNHZKhG.js";import{Z as r,$ as o}from"./index-MQZw3-wz.js";import{Default as l}from"./button.stories-tM18j4A3.js";import{Default as a}from"./check-box.stories-Q_WICJ_2.js";import{Default as c}from"./file-input.stories-DTRWZyqS.js";import{Default as d,Date as p}from"./input.stories-FKl0qVhm.js";import{Default as h}from"./number-input.stories-e-MRb-7_.js";import{Default as m}from"./option-dropdown.stories-ntKLWycS.js";import{Default as u}from"./radio-button.stories-CAHs1mr6.js";import{Native as f,Default as x}from"./select.stories-B0d_sE6g.js";import{Default as j}from"./slider.stories-7oMw2PCp.js";import{Default as b}from"./textarea.stories-CJ-Oqytp.js";import{Default as g}from"./toggle.stories-DOc7uN93.js";import"./index-DhsZuJvc.js";import"./iframe-DOgYbEjR.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";import"./react-router-dom-CMITYWBH.js";import"./index-CEuq6vkz.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./flex-EllkLxgO.js";import"./button-CzvLc2io.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./tooltip-1V7clEnw.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./check-box-wCvXxtCz.js";import"./help-icon-41R-Z9N1.js";import"./file-input-CMP44wlr.js";import"./lodash-c4VUpsOs.js";import"./input-group-BaRSJAEN.js";import"./input-DTXbDJaL.js";import"./types-Dx2TtIG9.js";import"./spacer-BWoNR27H.js";import"./message-DQ3q8XF9.js";import"./textarea-D6ltcKhz.js";import"./index-C0x1JmaP.js";import"./index-DRSy5Ssd.js";import"./grid-DRkC-bt8.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./card-EcjmryU9.js";import"./heading-NkLgQYoP.js";import"./input-group-addon-D68iUKV2.js";import"./select-BpALjE__.js";import"./enum-Bnn40S8Q.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./number-input-C8O0lnql.js";import"./divider-DY9nJ_7N.js";import"./radio-button-C3RuBqEf.js";import"./slider-CBE03NwD.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./toggle-C0zvrIOF.js";function i(n){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...s(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Inputs"}),`
2
2
  `,e.jsx(t.h1,{id:"inputs",children:"Inputs"}),`
3
3
  `,e.jsx(t.p,{children:"React UI Library provides a comprehensive set of user input components."}),`
4
4
  `,e.jsx(t.h2,{id:"button",children:"Button"}),`
@@ -59,4 +59,4 @@ particularly on touch devices.`]}),`
59
59
  `,e.jsx(o,{of:j}),`
60
60
  `,e.jsx(t.h2,{id:"file-input",children:"File Input"}),`
61
61
  `,e.jsxs(t.p,{children:["Use a ",e.jsx(t.code,{children:"FileInput"})," when a user needs to upload a file. The ",e.jsx(t.code,{children:"accept"})," prop allows you to restrict the accepted file types."]}),`
62
- `,e.jsx(o,{of:c})]})}function Be(n={}){const{wrapper:t}={...s(),...n.components};return t?e.jsx(t,{...n,children:e.jsx(i,{...n})}):i(n)}export{Be as default};
62
+ `,e.jsx(o,{of:c})]})}function Le(n={}){const{wrapper:t}={...s(),...n.components};return t?e.jsx(t,{...n,children:e.jsx(i,{...n})}):i(n)}export{Le as default};
@@ -0,0 +1,16 @@
1
+ import{j as t}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as n}from"./index-BcNHZKhG.js";import{Z as s,$ as e}from"./index-MQZw3-wz.js";import{Default as p,LabelOnLeft as m}from"./field.stories-DhiTcelS.js";import{Default as l,LabelsOnLeft as a,Row as h}from"./form.stories-C_zflIAj.js";import"./index-DhsZuJvc.js";import"./iframe-DOgYbEjR.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";import"./field-C5_fLDpy.js";import"./index-Bk2sglWO.js";import"./label-hiSz3I8H.js";import"./common-types-Sih75Sav.js";import"./help-icon-41R-Z9N1.js";import"./tooltip-1V7clEnw.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./input-DTXbDJaL.js";import"./types-Dx2TtIG9.js";import"./lodash-c4VUpsOs.js";import"./text-B3-TSWok.js";import"./select-BpALjE__.js";import"./enum-Bnn40S8Q.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-Tr0wIZve.js";import"./button-CzvLc2io.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./check-box-wCvXxtCz.js";import"./button-group-C1PqMW-H.js";import"./toggle-C0zvrIOF.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./slider-CBE03NwD.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./textarea-D6ltcKhz.js";import"./radio-button-C3RuBqEf.js";import"./form-row-CM112EYF.js";function r(o){const i={code:"code",h1:"h1",h2:"h2",p:"p",...n(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Layout (Forms)"}),`
2
+ `,t.jsx(i.h1,{id:"layout-forms",children:"Layout (Forms)"}),`
3
+ `,t.jsx(i.h2,{id:"field",children:"Field"}),`
4
+ `,t.jsxs(i.p,{children:["This is a wrapper for any form element with default bottom margin, and props like ",t.jsx(i.code,{children:"label"})," for other default styling."]}),`
5
+ `,t.jsx(e,{of:p}),`
6
+ `,t.jsxs(i.p,{children:["For inline labels, use the ",t.jsx(i.code,{children:"labelLeft"})," prop (and the optional ",t.jsx(i.code,{children:"labelWidth"}),")."]}),`
7
+ `,t.jsx(e,{of:m}),`
8
+ `,t.jsx(i.h2,{id:"stacked",children:"Stacked"}),`
9
+ `,t.jsxs(i.p,{children:["This is the simplest form layout, and works well when horizontal space is limited, or inputs vary in height (e.g. ",t.jsx(i.code,{children:"TextArea"}),")."]}),`
10
+ `,t.jsx(e,{of:l}),`
11
+ `,t.jsx(i.h2,{id:"stacked-with-inline-labels",children:"Stacked with inline labels"}),`
12
+ `,t.jsxs(i.p,{children:["This has the same markup, but with ",t.jsx(i.code,{children:"labelLeft"})," and ",t.jsx(i.code,{children:"labelWidth"})," set on each field."]}),`
13
+ `,t.jsx(e,{of:a}),`
14
+ `,t.jsx(i.h2,{id:"row",children:"Row"}),`
15
+ `,t.jsxs(i.p,{children:["Wrapping a group of form controls in ",t.jsx(i.code,{children:"FormRow"})," arranges them horizontally, and applies default spacing between each item. This works well when vertical space is limited, because inputs will only wrap onto the next line when they need to."]}),`
16
+ `,t.jsx(e,{of:h})]})}function st(o={}){const{wrapper:i}={...n(),...o.components};return i?t.jsx(i,{...o,children:t.jsx(r,{...o})}):r(o)}export{st as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as s}from"./index-BcNHZKhG.js";import{Z as r,$ as n}from"./index-Bh4hgpyc.js";import{Center as d,SpaceBetween as l,JustifyEnd as a,Column as c}from"./flex.stories-DtDxXdHB.js";import{Default as h,CustomColumnWidth as p,DefaultGap as x,CustomGap as m,Responsive as u}from"./grid.stories-DqjhHHwX.js";import{Default as j,FixedWidth as f,NoPadding as w,ResponsiveWidth as g}from"./column.stories-DATtbLrP.js";import"./index-DhsZuJvc.js";import"./iframe-EHZbBy3L.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";import"./flex-EllkLxgO.js";import"./button-CzvLc2io.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./text-B3-TSWok.js";import"./grid-DRkC-bt8.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./card-EcjmryU9.js";import"./row-Bmiy2Lh0.js";import"./heading-NkLgQYoP.js";import"./help-icon-41R-Z9N1.js";function t(i){const o={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",...s(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Layout (General)"}),`
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as s}from"./index-BcNHZKhG.js";import{Z as r,$ as n}from"./index-MQZw3-wz.js";import{Center as d,SpaceBetween as l,JustifyEnd as a,Column as c}from"./flex.stories-DtDxXdHB.js";import{Default as h,CustomColumnWidth as p,DefaultGap as x,CustomGap as m,Responsive as u}from"./grid.stories-DqjhHHwX.js";import{Default as j,FixedWidth as f,NoPadding as w,ResponsiveWidth as g}from"./column.stories-DATtbLrP.js";import"./index-DhsZuJvc.js";import"./iframe-DOgYbEjR.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";import"./flex-EllkLxgO.js";import"./button-CzvLc2io.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./text-B3-TSWok.js";import"./grid-DRkC-bt8.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./card-EcjmryU9.js";import"./row-Bmiy2Lh0.js";import"./heading-NkLgQYoP.js";import"./help-icon-41R-Z9N1.js";function t(i){const o={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",...s(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Layout (General)"}),`
2
2
  `,e.jsx(o.h1,{id:"layout-general",children:"Layout (General)"}),`
3
3
  `,e.jsx(o.h2,{id:"flex",children:"Flex"}),`
4
4
  `,e.jsxs(o.p,{children:["The ",e.jsx(o.code,{children:"Flex"})," component is a basic flexbox wrapper with optional props for ",e.jsx(o.code,{children:"alignItems"}),", ",e.jsx(o.code,{children:"justifyContent"})," and ",e.jsx(o.code,{children:"flexDirection"}),". This is a conveninent way to center items vertically and/or horizontally, to align them to opposite edges, or align them to the far side."]}),`
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as k}from"./index-DhsZuJvc.js";import{w as le,e as j,u as f}from"./index-DMAnyMX5.js";import{T as se}from"./common-types-Sih75Sav.js";import{M as v,D as h}from"./dialog-B55T_62Q.js";import{B as l}from"./button-CzvLc2io.js";import{P as te}from"./popover-9ZnEm5Hy.js";import{I as ne}from"./input-DTXbDJaL.js";import{I as ae}from"./input-group-BaRSJAEN.js";import{F as S}from"./field-C5_fLDpy.js";import{M as re}from"./actions-Tr0wIZve.js";import{S as ie}from"./select-BW0IihoR.js";import{S as de}from"./spacer-BWoNR27H.js";import{T as ce}from"./tooltip-1V7clEnw.js";import{M as P}from"./types-BmbYqTX_.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./portal-GQ0_cLB6.js";import"./index-CUZDtIZe.js";import"./lodash-c4VUpsOs.js";import"./heading-NkLgQYoP.js";import"./help-icon-41R-Z9N1.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./types-Dx2TtIG9.js";import"./label-hiSz3I8H.js";import"./badge-CLQ59MDF.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./text-B3-TSWok.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";const{useArgs:ge}=__STORYBOOK_MODULE_PREVIEW_API__,Je={title:"Modals/Modal",component:v,args:{visible:!0,centered:!0,width:"300px",heading:"Are you sure?",content:e.jsx(e.Fragment,{children:"This will complete the transaction"}),footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Okay",colored:!0,onClick:()=>{}}),e.jsx(l,{label:"Cancel",onClick:()=>{}})]}),onClose:()=>{}},parameters:{docs:{story:{inline:!1,iframeHeight:400}}}},r=()=>{const[{visible:t,centered:a,...o},n]=ge(),s=()=>{n({visible:!t})};return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,centered:a,children:e.jsx(h,{dialog:{...o,onClose:s}})}),e.jsx(l,{label:"Open Modal",onClick:s})]})},C=r.bind({}),d=r.bind({});d.args={centered:!0};const c=r.bind({});c.args={content:["This is a","new line!"]};const g=r.bind({});g.args={scroll:!0,content:e.jsx("div",{children:"Example modal content goes here lorem ipsum. ".repeat(100)})};const p=r.bind({});p.args={width:"100%",content:e.jsx("div",{children:"Example modal content goes here lorem ipsum. ".repeat(100)})};const m=r.bind({});m.args={contentPadding:0};const u=r.bind({});u.args={content:e.jsxs(e.Fragment,{children:[e.jsx(ce,{text:"Tooltip text",children:"Hover for tooltip"}),e.jsx(de,{}),e.jsx(S,{label:"Custom Select",helpText:"Select an animal",children:e.jsx(ie,{name:"example",options:["Aardvarks","Kangaroos","Monkeys","Possums","Gorilla","Puma","Patagonian Mara","Tarsier","Koala","Panda","Red Panda","Impala","Tiger","Crocodile","Bat"],onChange:()=>{},value:"Monkeys",error:"Bad value"})}),e.jsx(S,{label:"Nested Menu",children:e.jsx(re,{maxHeight:"240px",menu:{label:"Menu",trigger:se.DROP_DOWN_BUTTON,sections:[{type:P.MENU,menu:{trigger:"Text",label:"Children",sections:[...Array(100).keys()].map(()=>({type:"Option",label:Math.random().toString(36).substring(7),onClick:()=>{}}))}},...[...Array(100).keys()].map(()=>({type:P.OPTION,label:Math.random().toString(36).substring(7),onClick:()=>{}}))]}})}),e.jsx(te,{content:e.jsxs(ae,{small:!0,children:[e.jsx(ne,{value:"Value",width:"150px",error:"Bad value"}),e.jsx(l,{colored:!0,label:"Save",onClick:()=>{}}),e.jsx(l,{label:"Cancel",onClick:()=>{}})]}),children:e.jsx(l,{colored:!0,label:"Toggle me",onClick:()=>{}})})]})};const b=()=>{const[t,a]=k.useState(!1),o=()=>{a(!0)},n=()=>{a(!1)},s=()=>{console.log("Submit action"),n()};return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,onEnter:()=>{console.log("Enter"),s()},onEscape:()=>{console.log("Escape"),n()},children:e.jsx(h,{dialog:{heading:"Test key handling",content:e.jsx(ne,{}),footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Done",colored:"red",onClick:s}),e.jsx(l,{label:"Cancel",onClick:n})]}),onClose:n}})}),e.jsx(l,{label:"Open Modal",onClick:o})]})},M=()=>{const[t,a]=k.useState(!1),o=()=>a(!t),[n,s]=k.useState(!1),x=()=>s(!n);return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,children:e.jsx(h,{dialog:{heading:"Modal 1",content:"Lorem ipsum dolor sit amet",footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Open modal 2",colored:!0,onClick:x}),e.jsx(v,{visible:n,children:e.jsx(h,{dialog:{heading:"Modal 2",content:"Lorem ipsum dolor sit amet",footer:e.jsx(l,{label:"Close",onClick:x}),onClose:x}})}),e.jsx(l,{label:"Close",onClick:o})]}),onClose:o}})}),e.jsx(l,{label:"Open modal 1",onClick:o})]})},i=r.bind({});i.args={testId:"testId"};i.play=async({canvasElement:t,step:a})=>{const o=t.parentElement?le(t.parentElement):null;await j(o).toBeTruthy(),o&&(await a("Modal should appear when triggered",async()=>{const n=o.getByText("Open Modal");await f.click(n);const s=o.getByTestId("testId");await j(s).toBeInTheDocument()}),await a("Modal should disappear when close button pressed",async()=>{const n=o.getByTestId("testId"),s=o.getByTestId("testId-dismiss");await f.click(s),await j(n).not.toBeInTheDocument()}))};b.__docgenInfo={description:"",methods:[],displayName:"KeyHandle"};M.__docgenInfo={description:"",methods:[],displayName:"MultipleModals"};var y,A,B;C.parameters={...C.parameters,docs:{...(y=C.parameters)==null?void 0:y.docs,source:{originalSource:`() => {
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as k}from"./index-DhsZuJvc.js";import{w as le,e as j,u as f}from"./index-DMAnyMX5.js";import{T as se}from"./common-types-Sih75Sav.js";import{M as v,D as h}from"./dialog-B55T_62Q.js";import{B as l}from"./button-CzvLc2io.js";import{P as te}from"./popover-9ZnEm5Hy.js";import{I as ne}from"./input-DTXbDJaL.js";import{I as ae}from"./input-group-BaRSJAEN.js";import{F as S}from"./field-C5_fLDpy.js";import{M as re}from"./actions-Tr0wIZve.js";import{S as ie}from"./select-BpALjE__.js";import{S as de}from"./spacer-BWoNR27H.js";import{T as ce}from"./tooltip-1V7clEnw.js";import{M as P}from"./types-BmbYqTX_.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./portal-GQ0_cLB6.js";import"./index-CUZDtIZe.js";import"./lodash-c4VUpsOs.js";import"./heading-NkLgQYoP.js";import"./help-icon-41R-Z9N1.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./types-Dx2TtIG9.js";import"./label-hiSz3I8H.js";import"./badge-CLQ59MDF.js";import"./enum-Bnn40S8Q.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./text-B3-TSWok.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";const{useArgs:ge}=__STORYBOOK_MODULE_PREVIEW_API__,Qe={title:"Modals/Modal",component:v,args:{visible:!0,centered:!0,width:"300px",heading:"Are you sure?",content:e.jsx(e.Fragment,{children:"This will complete the transaction"}),footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Okay",colored:!0,onClick:()=>{}}),e.jsx(l,{label:"Cancel",onClick:()=>{}})]}),onClose:()=>{}},parameters:{docs:{story:{inline:!1,iframeHeight:400}}}},r=()=>{const[{visible:t,centered:a,...o},n]=ge(),s=()=>{n({visible:!t})};return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,centered:a,children:e.jsx(h,{dialog:{...o,onClose:s}})}),e.jsx(l,{label:"Open Modal",onClick:s})]})},C=r.bind({}),d=r.bind({});d.args={centered:!0};const c=r.bind({});c.args={content:["This is a","new line!"]};const g=r.bind({});g.args={scroll:!0,content:e.jsx("div",{children:"Example modal content goes here lorem ipsum. ".repeat(100)})};const p=r.bind({});p.args={width:"100%",content:e.jsx("div",{children:"Example modal content goes here lorem ipsum. ".repeat(100)})};const m=r.bind({});m.args={contentPadding:0};const u=r.bind({});u.args={content:e.jsxs(e.Fragment,{children:[e.jsx(ce,{text:"Tooltip text",children:"Hover for tooltip"}),e.jsx(de,{}),e.jsx(S,{label:"Custom Select",helpText:"Select an animal",children:e.jsx(ie,{name:"example",options:["Aardvarks","Kangaroos","Monkeys","Possums","Gorilla","Puma","Patagonian Mara","Tarsier","Koala","Panda","Red Panda","Impala","Tiger","Crocodile","Bat"],onChange:()=>{},value:"Monkeys",error:"Bad value"})}),e.jsx(S,{label:"Nested Menu",children:e.jsx(re,{maxHeight:"240px",menu:{label:"Menu",trigger:se.DROP_DOWN_BUTTON,sections:[{type:P.MENU,menu:{trigger:"Text",label:"Children",sections:[...Array(100).keys()].map(()=>({type:"Option",label:Math.random().toString(36).substring(7),onClick:()=>{}}))}},...[...Array(100).keys()].map(()=>({type:P.OPTION,label:Math.random().toString(36).substring(7),onClick:()=>{}}))]}})}),e.jsx(te,{content:e.jsxs(ae,{small:!0,children:[e.jsx(ne,{value:"Value",width:"150px",error:"Bad value"}),e.jsx(l,{colored:!0,label:"Save",onClick:()=>{}}),e.jsx(l,{label:"Cancel",onClick:()=>{}})]}),children:e.jsx(l,{colored:!0,label:"Toggle me",onClick:()=>{}})})]})};const b=()=>{const[t,a]=k.useState(!1),o=()=>{a(!0)},n=()=>{a(!1)},s=()=>{console.log("Submit action"),n()};return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,onEnter:()=>{console.log("Enter"),s()},onEscape:()=>{console.log("Escape"),n()},children:e.jsx(h,{dialog:{heading:"Test key handling",content:e.jsx(ne,{}),footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Done",colored:"red",onClick:s}),e.jsx(l,{label:"Cancel",onClick:n})]}),onClose:n}})}),e.jsx(l,{label:"Open Modal",onClick:o})]})},M=()=>{const[t,a]=k.useState(!1),o=()=>a(!t),[n,s]=k.useState(!1),x=()=>s(!n);return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,children:e.jsx(h,{dialog:{heading:"Modal 1",content:"Lorem ipsum dolor sit amet",footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Open modal 2",colored:!0,onClick:x}),e.jsx(v,{visible:n,children:e.jsx(h,{dialog:{heading:"Modal 2",content:"Lorem ipsum dolor sit amet",footer:e.jsx(l,{label:"Close",onClick:x}),onClose:x}})}),e.jsx(l,{label:"Close",onClick:o})]}),onClose:o}})}),e.jsx(l,{label:"Open modal 1",onClick:o})]})},i=r.bind({});i.args={testId:"testId"};i.play=async({canvasElement:t,step:a})=>{const o=t.parentElement?le(t.parentElement):null;await j(o).toBeTruthy(),o&&(await a("Modal should appear when triggered",async()=>{const n=o.getByText("Open Modal");await f.click(n);const s=o.getByTestId("testId");await j(s).toBeInTheDocument()}),await a("Modal should disappear when close button pressed",async()=>{const n=o.getByTestId("testId"),s=o.getByTestId("testId-dismiss");await f.click(s),await j(n).not.toBeInTheDocument()}))};b.__docgenInfo={description:"",methods:[],displayName:"KeyHandle"};M.__docgenInfo={description:"",methods:[],displayName:"MultipleModals"};var y,A,B;C.parameters={...C.parameters,docs:{...(y=C.parameters)==null?void 0:y.docs,source:{originalSource:`() => {
2
2
  const [{
3
3
  visible,
4
4
  centered,
@@ -217,4 +217,4 @@ import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as k}from"./index-DhsZuJv
217
217
  </Modal>
218
218
  <Button label="Open Modal" onClick={toggleModal} />
219
219
  </>;
220
- }`,...(oe=(ee=i.parameters)==null?void 0:ee.docs)==null?void 0:oe.source}}};const Qe=["Default","Centered","LineBreak","Scroll","FullWidth","NoContentPadding","WithPopoverLayers","KeyHandle","MultipleModals","Test"];export{d as Centered,C as Default,p as FullWidth,b as KeyHandle,c as LineBreak,M as MultipleModals,m as NoContentPadding,g as Scroll,i as Test,u as WithPopoverLayers,Qe as __namedExportsOrder,Je as default};
220
+ }`,...(oe=(ee=i.parameters)==null?void 0:ee.docs)==null?void 0:oe.source}}};const Xe=["Default","Centered","LineBreak","Scroll","FullWidth","NoContentPadding","WithPopoverLayers","KeyHandle","MultipleModals","Test"];export{d as Centered,C as Default,p as FullWidth,b as KeyHandle,c as LineBreak,M as MultipleModals,m as NoContentPadding,g as Scroll,i as Test,u as WithPopoverLayers,Xe as __namedExportsOrder,Qe as default};
@@ -1,4 +1,4 @@
1
- import{j as z}from"./jsx-runtime-eps93zm2.js";import{r as s}from"./index-DhsZuJvc.js";import{d as y}from"./index-C0x1JmaP.js";import{l as G}from"./lodash-c4VUpsOs.js";import{I as J}from"./input-DTXbDJaL.js";const K=a=>a?typeof a=="string"?a:G.isArray(a)?a[0]:a.fieldName:"",Q=({name:a,placeholder:E="",disabled:V=!1,error:v=!1,left:N=!1,small:I=!1,width:F="100%",value:l="",onChange:h=()=>{},onFocus:L=()=>{},onBlur:S=()=>{},tabIndex:x=0,testId:k,tooltip:j=null,warning:M=!1,validationCallback:u=()=>{},allowEmpty:R=!1,isInTable:H,groupOrder:A,enableDisplayRounding:T=!1,roundDisplayValue:b,disableInternalErrorValidationMessages:U=!1})=>{const r=s.useRef(null),[i,f]=s.useState(l),[C,o]=s.useState(null),[g,w]=s.useState(!1),t=K(a),q=e=>{let n=y.validateNumber(e);return R&&e===""||n.valid?{...n,valid:!0,errors:void 0}:n};s.useEffect(()=>{const{valid:e,errors:n}=q(l);if(f(l),e)o(null),u(t,null);else{const m=n&&n.length?n[0]:null;o(m),u(t,m)}},[l,v]);const B=e=>{const n=e.target,{value:m}=n,d=y.cleanNumStr(m.replaceAll(" ","").replaceAll("|","")),{valid:_,errors:c}=q(d);if(_){const p={...e,target:{...e.target,value:d,name:t}};h(p),f(d),o(null),u(t,null)}else{f(d);const p=c&&c.length?c[0]:null;o(p),u(t,p)}};s.useEffect(()=>{if(r&&(r!=null&&r.current)&&T&&g){const e=r.current;e&&setTimeout(()=>{const{length:n}=String(i);e.setSelectionRange(n,n)},0)}},[g]);const D=e=>{w(!0),L(e)},O=e=>{w(!1),S(e)},P=!g&&T?b?b(i):y.roundToFixed(i,2):i;return z.jsx(J,{type:"text",name:t,testId:k,disabled:V,placeholder:E,value:P,onChange:B,onFocus:D,onBlur:O,error:v||C,warning:M,right:!N,small:I,width:F,isInTable:H,groupOrder:A,tabIndex:x,tooltip:j,ref:r},t)};Q.__docgenInfo={description:"",methods:[],displayName:"NumberInput",props:{name:{required:!1,tsType:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},description:""},placeholder:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"''",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}]},description:"",defaultValue:{value:"false",computed:!1}},left:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},width:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"'100%'",computed:!1}},value:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"''",computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
1
+ import{j as I}from"./jsx-runtime-eps93zm2.js";import{r as t}from"./index-DhsZuJvc.js";import{d as o}from"./index-C0x1JmaP.js";import{K as J,E as Q}from"./enum-Bnn40S8Q.js";import{l as U}from"./lodash-c4VUpsOs.js";import{I as X}from"./input-DTXbDJaL.js";const u=n=>String(o.toString(n)),Y=n=>n?typeof n=="string"?n:U.isArray(n)?n[0]:n.fieldName:"",$=({name:n,placeholder:F="",disabled:L=!1,error:g=!1,left:k=!1,small:S=!1,width:x="100%",value:m="",onChange:R=()=>{},onFocus:j=()=>{},onBlur:C=()=>{},tabIndex:H=0,testId:M,tooltip:K=null,warning:A=!1,validationCallback:y=()=>{},allowEmpty:O=!1,isInTable:B,groupOrder:D,enableDisplayRounding:d=!1,roundDisplayValue:v,disableInternalErrorValidationMessages:P=!1})=>{const r=t.useRef(null),[s,T]=t.useState(u(m)),[l,b]=t.useState(!1),[_,w]=t.useState(!0),i=Y(n),E=e=>{const a=o.validateNumber(e);return O&&e===""||a.valid?{...a,valid:!0,errors:void 0}:a},{valid:p,errors:f}=E(s),q=f&&f.length&&!P?f[0]:null;t.useEffect(()=>{T(u(m)),w(!0)},[m,d]),t.useEffect(()=>{!l&&!p?y(i,q):y(i,null)},[l,p,g]);const N=e=>{var V,h;const a=e instanceof KeyboardEvent?s:(V=e==null?void 0:e.target)==null?void 0:V.value;w(!1);const c=o.cleanNumStr(a.replaceAll(" ","").replaceAll("|",""));if(T(c),(h=E(c))!=null&&h.valid&&!_){const G={...e,target:{...e.target,value:o.stripLeadingZeros(u(c)),name:i}};R(G)}};t.useEffect(()=>{if(r&&(r!=null&&r.current)&&d&&l){const e=r.current;e&&setTimeout(()=>{const{length:a}=u(s);e.setSelectionRange(a,a)},0)}},[l]);const W=e=>{b(!0),j(e)},Z=e=>{b(!1),C(e)},z=d&&!l&&p?v?u(v(s)):o.roundToFixed(s,2):s;return I.jsx(J,{handleKeys:[Q.ENTER],onKeyEvent:(e,a)=>N(a),children:I.jsx(X,{type:"text",name:i,testId:M,disabled:L,placeholder:F,value:z,onChange:N,onFocus:W,onBlur:Z,error:q||g,warning:A,right:!k,small:S,width:x,isInTable:B,groupOrder:D,tabIndex:H,tooltip:K,ref:r},i)})};$.__docgenInfo={description:"",methods:[],displayName:"NumberInput",props:{name:{required:!1,tsType:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},description:""},placeholder:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"''",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}]},description:"",defaultValue:{value:"false",computed:!1}},left:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},width:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"'100%'",computed:!1}},value:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"''",computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
2
2
  event: TChangeEvent<T>,
3
3
  ...additionalProps: { [key: string]: any }[]
4
4
  ) => void`,signature:{arguments:[{type:{name:"intersection",raw:`ChangeEvent<T> & {
@@ -13,4 +13,4 @@ import{j as z}from"./jsx-runtime-eps93zm2.js";import{r as s}from"./index-DhsZuJv
13
13
  | { name: string; value: any; label?: string; files?: FileList | null }`,elements:[{name:"T"},{name:"signature",type:"object",raw:"{ name: string; value: any; label?: string; files?: FileList | null }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"value",value:{name:"any",required:!0}},{key:"label",value:{name:"string",required:!1}},{key:"files",value:{name:"union",raw:"FileList | null",elements:[{name:"FileList"},{name:"null"}],required:!1}}]}}],required:!0}}]}}]},name:"event"},{type:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ [key: string]: any }",signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}}],raw:"{ [key: string]: any }[]"},name:"additionalProps",rest:!0}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: FocusEvent<HTMLInputElement>) => void",signature:{arguments:[{type:{name:"FocusEvent",elements:[{name:"HTMLInputElement"}],raw:"FocusEvent<HTMLInputElement>"},name:"evt"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: FocusEvent<HTMLInputElement>) => void",signature:{arguments:[{type:{name:"FocusEvent",elements:[{name:"HTMLInputElement"}],raw:"FocusEvent<HTMLInputElement>"},name:"evt"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},tabIndex:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},testId:{required:!1,tsType:{name:"string"},description:""},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"}]},description:"",defaultValue:{value:"null",computed:!1}},warning:{required:!1,tsType:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}]},description:"",defaultValue:{value:"false",computed:!1}},validationCallback:{required:!1,tsType:{name:"signature",type:"function",raw:`(
14
14
  name: string | { fieldName: string },
15
15
  error: string | null,
16
- ) => void`,signature:{arguments:[{type:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},name:"name"},{type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},name:"error"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},allowEmpty:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},isInTable:{required:!1,tsType:{name:"boolean"},description:""},groupOrder:{required:!1,tsType:{name:"any"},description:""},enableDisplayRounding:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},roundDisplayValue:{required:!1,tsType:{name:"signature",type:"function",raw:"(args: TStringNumberNull) => TStringNumberNull",signature:{arguments:[{type:{name:"union",raw:"string | number | null",elements:[{name:"string"},{name:"number"},{name:"null"}]},name:"args"}],return:{name:"union",raw:"string | number | null",elements:[{name:"string"},{name:"number"},{name:"null"}]}}},description:""},disableInternalErrorValidationMessages:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}}}};export{Q as N};
16
+ ) => void`,signature:{arguments:[{type:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},name:"name"},{type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},name:"error"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},allowEmpty:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},isInTable:{required:!1,tsType:{name:"boolean"},description:""},groupOrder:{required:!1,tsType:{name:"any"},description:""},enableDisplayRounding:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},roundDisplayValue:{required:!1,tsType:{name:"signature",type:"function",raw:"(args: TStringOrNumber) => TStringOrNumber",signature:{arguments:[{type:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},name:"args"}],return:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]}}},description:""},disableInternalErrorValidationMessages:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}}}};export{$ as N};
@@ -0,0 +1,124 @@
1
+ import{j as s}from"./jsx-runtime-eps93zm2.js";import{r as B}from"./index-DhsZuJvc.js";import{w as S,u as t,e as o,f as Ae,a as Se}from"./index-DMAnyMX5.js";import{d as De}from"./index-C0x1JmaP.js";import{S as Be}from"./spacer-BWoNR27H.js";import{G as xe}from"./grid-DRkC-bt8.js";import{C as x}from"./card-EcjmryU9.js";import{B as _e}from"./button-CzvLc2io.js";import{H as _}from"./heading-NkLgQYoP.js";import{I as Ne}from"./input-group-addon-D68iUKV2.js";import{S as Ee}from"./select-BpALjE__.js";import{I as Ve}from"./input-group-BaRSJAEN.js";import{N as i}from"./number-input-C8O0lnql.js";import"./index-CF7H4eMJ.js";import"./index-DRSy5Ssd.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./help-icon-41R-Z9N1.js";import"./lodash-c4VUpsOs.js";import"./types-Dx2TtIG9.js";import"./enum-Bnn40S8Q.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./input-DTXbDJaL.js";const{useArgs:Me}=__STORYBOOK_MODULE_PREVIEW_API__,ba={title:"Forms/NumberInput",component:i,parameters:{canvas:{page:null}},args:{label:"Label"}},u=a=>{const[r,e]=Me(),l=n=>{e({value:n.target.value})};return s.jsx(i,{onChange:l,value:123,...a})},D=u.bind({}),m=u.bind({});m.args={small:!0};const g=u.bind({});g.args={width:"150px"};const h=u.bind({});h.args={left:!0};const v=u.bind({});v.args={disabled:!0};const I=u.bind({});I.args={allowEmpty:!0,value:""};const p=()=>{const[a,r]=B.useState("123|m");return s.jsx(i,{name:"example",onChange:e=>r(e.target.value),placeholder:"Type a value...",value:a,testId:"testId"})};p.play=async({canvasElement:a,step:r})=>{const e=S(a),l=S(a.ownerDocument.body);await r("Shows validation error for non-numeric input",async()=>{const n=e.getByTestId("testId");await t.clear(n),await t.type(n,"123x45s6"),await t.click(a),await o(e.getByDisplayValue("123x45s6")).toBeInTheDocument(),await Ae.mouseOver(n),await Se(()=>{o(l.getByText("Must be a numerical value")).toBeInTheDocument()})})};const y=u.bind({});y.args={warning:"This input number is almost 100!",value:"99"};const C=u.bind({});C.args={error:"This is a error message"};const b=u.bind({});b.args={value:"123test"};const w=u.bind({});w.args={value:"123.123456789",enableDisplayRounding:!0};const T=u.bind({});T.args={value:"123.123456789",enableDisplayRounding:!0,roundDisplayValue:a=>De.roundToFixed(a,4)};const f=()=>s.jsxs(Ve,{small:!0,children:[s.jsx(i,{value:123}),s.jsx(Ne,{children:"to"}),s.jsx(i,{value:123}),s.jsx(Ee,{options:[{value:"units",label:"units"}],width:"auto",value:"units"})]}),c=()=>{const[a,r]=B.useState("123");return s.jsx(i,{value:a,onChange:e=>{r(e.target.value)},testId:"testId",enableDisplayRounding:!0})};c.play=async({canvasElement:a,step:r})=>{const e=S(a);await r("Value should be rounded on blur",async()=>{const l=e.getByTestId("testId");await t.clear(l),await t.type(l,"123.123456789"),await t.click(a),await o(e.getByDisplayValue("123.12")).toBeInTheDocument()}),await r("Full value shown on focus",async()=>{const l=e.getByTestId("testId");await t.click(l),await o(e.getByDisplayValue("123.123456789")).toBeInTheDocument()})};const A=()=>{const[a,r]=B.useState("123");return s.jsxs(xe,{columns:"1fr 1fr",gap:!0,children:[s.jsxs(x,{heading:s.jsx(_,{children:"Storage State (Redux)"}),children:[a,s.jsx(Be,{}),s.jsx(_e,{label:"Change value",onClick:()=>r(String(Math.floor(Math.random()*100)))})]}),s.jsx(x,{heading:s.jsx(_,{children:"NumberInput"}),children:s.jsx(i,{value:a,onChange:e=>{r(e.target.value)},error:Number(a)>=0?"":"Value must be positive"})})]})},d=()=>{const[a,r]=B.useState("123");return s.jsx(i,{value:a,onChange:e=>{r(e.target.value)},testId:"testId"})};d.play=async({canvasElement:a,step:r})=>{const e=S(a),l=S(a.ownerDocument.body);await r("Can enter decimal values",async()=>{const n=e.getByTestId("testId");await t.clear(n),await t.type(n,"123.123456789"),await t.click(a),await o(e.getByDisplayValue("123.123456789")).toBeInTheDocument()}),await r("Can enter scientific notation",async()=>{const n=e.getByTestId("testId");await t.clear(n),await t.type(n,"-1.12e3"),await t.click(a),await o(e.getByDisplayValue("-1.12e3")).toBeInTheDocument()}),await r("Can enter comma decimals (converts to dot)",async()=>{const n=e.getByTestId("testId");await t.clear(n),await t.type(n,"123,456"),await t.click(a),await o(e.getByDisplayValue("123.456")).toBeInTheDocument()}),await r("Can enter small numbers",async()=>{const n=e.getByTestId("testId");await t.clear(n),await t.type(n,"0.0000000023"),await t.click(a),await o(e.getByDisplayValue("0.0000000023")).toBeInTheDocument()}),await r("Can enter large numbers",async()=>{const n=e.getByTestId("testId");await t.clear(n),await t.type(n,"999999999999"),await t.click(a),await o(e.getByDisplayValue("999999999999")).toBeInTheDocument()}),await r("Shows validation error for non-numeric input",async()=>{const n=e.getByTestId("testId");await t.clear(n),await t.type(n,"123x45s6"),await t.click(a),await o(e.getByDisplayValue("123x45s6")).toBeInTheDocument(),await Ae.mouseOver(n),await Se(()=>{o(l.getByText("Must be a numerical value")).toBeInTheDocument()})})};p.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"Placeholder"};f.__docgenInfo={description:"",methods:[],displayName:"TestInputGroup"};c.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestDisplayRounding"};A.__docgenInfo={description:"",methods:[],displayName:"ManagedTestCase"};d.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestUserInput"};var N,E,V;D.parameters={...D.parameters,docs:{...(N=D.parameters)==null?void 0:N.docs,source:{originalSource:`args => {
2
+ const [_, updateArgs] = useArgs();
3
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
4
+ updateArgs({
5
+ value: evt.target.value
6
+ });
7
+ };
8
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
9
+ }`,...(V=(E=D.parameters)==null?void 0:E.docs)==null?void 0:V.source}}};var M,j,H;m.parameters={...m.parameters,docs:{...(M=m.parameters)==null?void 0:M.docs,source:{originalSource:`args => {
10
+ const [_, updateArgs] = useArgs();
11
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
12
+ updateArgs({
13
+ value: evt.target.value
14
+ });
15
+ };
16
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
17
+ }`,...(H=(j=m.parameters)==null?void 0:j.docs)==null?void 0:H.source}}};var R,L,k;g.parameters={...g.parameters,docs:{...(R=g.parameters)==null?void 0:R.docs,source:{originalSource:`args => {
18
+ const [_, updateArgs] = useArgs();
19
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
20
+ updateArgs({
21
+ value: evt.target.value
22
+ });
23
+ };
24
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
25
+ }`,...(k=(L=g.parameters)==null?void 0:L.docs)==null?void 0:k.source}}};var G,W,O;h.parameters={...h.parameters,docs:{...(G=h.parameters)==null?void 0:G.docs,source:{originalSource:`args => {
26
+ const [_, updateArgs] = useArgs();
27
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
28
+ updateArgs({
29
+ value: evt.target.value
30
+ });
31
+ };
32
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
33
+ }`,...(O=(W=h.parameters)==null?void 0:W.docs)==null?void 0:O.source}}};var P,F,U;v.parameters={...v.parameters,docs:{...(P=v.parameters)==null?void 0:P.docs,source:{originalSource:`args => {
34
+ const [_, updateArgs] = useArgs();
35
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
36
+ updateArgs({
37
+ value: evt.target.value
38
+ });
39
+ };
40
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
41
+ }`,...(U=(F=v.parameters)==null?void 0:F.docs)==null?void 0:U.source}}};var K,Y,q;I.parameters={...I.parameters,docs:{...(K=I.parameters)==null?void 0:K.docs,source:{originalSource:`args => {
42
+ const [_, updateArgs] = useArgs();
43
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
44
+ updateArgs({
45
+ value: evt.target.value
46
+ });
47
+ };
48
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
49
+ }`,...(q=(Y=I.parameters)==null?void 0:Y.docs)==null?void 0:q.source}}};var z,J,Q;p.parameters={...p.parameters,docs:{...(z=p.parameters)==null?void 0:z.docs,source:{originalSource:`() => {
50
+ const [value, setValue] = useState('123|m');
51
+ return <NumberInput name="example" onChange={evt => setValue(evt.target.value)} placeholder="Type a value..." value={value} testId="testId" />;
52
+ }`,...(Q=(J=p.parameters)==null?void 0:J.docs)==null?void 0:Q.source}}};var X,Z,$;y.parameters={...y.parameters,docs:{...(X=y.parameters)==null?void 0:X.docs,source:{originalSource:`args => {
53
+ const [_, updateArgs] = useArgs();
54
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
55
+ updateArgs({
56
+ value: evt.target.value
57
+ });
58
+ };
59
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
60
+ }`,...($=(Z=y.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var ee,ae,te;C.parameters={...C.parameters,docs:{...(ee=C.parameters)==null?void 0:ee.docs,source:{originalSource:`args => {
61
+ const [_, updateArgs] = useArgs();
62
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
63
+ updateArgs({
64
+ value: evt.target.value
65
+ });
66
+ };
67
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
68
+ }`,...(te=(ae=C.parameters)==null?void 0:ae.docs)==null?void 0:te.source}}};var ne,re,se;b.parameters={...b.parameters,docs:{...(ne=b.parameters)==null?void 0:ne.docs,source:{originalSource:`args => {
69
+ const [_, updateArgs] = useArgs();
70
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
71
+ updateArgs({
72
+ value: evt.target.value
73
+ });
74
+ };
75
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
76
+ }`,...(se=(re=b.parameters)==null?void 0:re.docs)==null?void 0:se.source}}};var oe,ue,le;w.parameters={...w.parameters,docs:{...(oe=w.parameters)==null?void 0:oe.docs,source:{originalSource:`args => {
77
+ const [_, updateArgs] = useArgs();
78
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
79
+ updateArgs({
80
+ value: evt.target.value
81
+ });
82
+ };
83
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
84
+ }`,...(le=(ue=w.parameters)==null?void 0:ue.docs)==null?void 0:le.source}}};var ie,pe,ce;T.parameters={...T.parameters,docs:{...(ie=T.parameters)==null?void 0:ie.docs,source:{originalSource:`args => {
85
+ const [_, updateArgs] = useArgs();
86
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
87
+ updateArgs({
88
+ value: evt.target.value
89
+ });
90
+ };
91
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
92
+ }`,...(ce=(pe=T.parameters)==null?void 0:pe.docs)==null?void 0:ce.source}}};var de,me,ge;f.parameters={...f.parameters,docs:{...(de=f.parameters)==null?void 0:de.docs,source:{originalSource:`() => <InputGroup small>
93
+ <NumberInput value={123} />
94
+ <InputGroupAddon>to</InputGroupAddon>
95
+ <NumberInput value={123} />
96
+ <Select options={[{
97
+ value: 'units',
98
+ label: 'units'
99
+ }]} width="auto" value="units" />
100
+ </InputGroup>`,...(ge=(me=f.parameters)==null?void 0:me.docs)==null?void 0:ge.source}}};var he,ve,Ie;c.parameters={...c.parameters,docs:{...(he=c.parameters)==null?void 0:he.docs,source:{originalSource:`() => {
101
+ const [value, setValue] = useState('123');
102
+ return <NumberInput value={value} onChange={evt => {
103
+ setValue(evt.target.value);
104
+ }} testId="testId" enableDisplayRounding />;
105
+ }`,...(Ie=(ve=c.parameters)==null?void 0:ve.docs)==null?void 0:Ie.source}}};var ye,Ce,be;A.parameters={...A.parameters,docs:{...(ye=A.parameters)==null?void 0:ye.docs,source:{originalSource:`() => {
106
+ const [value, setValue] = useState('123');
107
+ return <Grid columns="1fr 1fr" gap>
108
+ <Card heading={<Heading>Storage State (Redux)</Heading>}>
109
+ {value}
110
+ <Spacer />
111
+ <Button label="Change value" onClick={() => setValue(String(Math.floor(Math.random() * 100)))} />
112
+ </Card>
113
+ <Card heading={<Heading>NumberInput</Heading>}>
114
+ <NumberInput value={value} onChange={evt => {
115
+ setValue(evt.target.value);
116
+ }} error={Number(value) >= 0 ? '' : 'Value must be positive'} />
117
+ </Card>
118
+ </Grid>;
119
+ }`,...(be=(Ce=A.parameters)==null?void 0:Ce.docs)==null?void 0:be.source}}};var we,Te,fe;d.parameters={...d.parameters,docs:{...(we=d.parameters)==null?void 0:we.docs,source:{originalSource:`() => {
120
+ const [value, setValue] = useState('123');
121
+ return <NumberInput value={value} onChange={evt => {
122
+ setValue(evt.target.value);
123
+ }} testId="testId" />;
124
+ }`,...(fe=(Te=d.parameters)==null?void 0:Te.docs)==null?void 0:fe.source}}};const wa=["Default","Small","Width","Left","Disabled","AllowEmpty","Placeholder","Warning","Error","BadInput","WithDisplayRounding","WithCustomDisplayRounding","TestInputGroup","TestDisplayRounding","ManagedTestCase","TestUserInput"];export{I as AllowEmpty,b as BadInput,D as Default,v as Disabled,C as Error,h as Left,A as ManagedTestCase,p as Placeholder,m as Small,c as TestDisplayRounding,f as TestInputGroup,d as TestUserInput,y as Warning,g as Width,T as WithCustomDisplayRounding,w as WithDisplayRounding,wa as __namedExportsOrder,ba as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as r}from"./index-BcNHZKhG.js";import{Z as t}from"./index-Bh4hgpyc.js";import"./index-DhsZuJvc.js";import"./iframe-EHZbBy3L.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";function i(s){const n={code:"code",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...r(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Padding, Margin & Size"}),`
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as r}from"./index-BcNHZKhG.js";import{Z as t}from"./index-MQZw3-wz.js";import"./index-DhsZuJvc.js";import"./iframe-DOgYbEjR.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-D6rZ4wEC.js";function i(s){const n={code:"code",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...r(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Padding, Margin & Size"}),`
2
2
  `,e.jsx(n.h1,{id:"padding-margin--size",children:"Padding, Margin & Size"}),`
3
3
  `,e.jsx(n.h2,{id:"padding--margin",children:"Padding & Margin"}),`
4
4
  `,e.jsx(n.p,{children:"There are standard CSS spacing variables for padding and margin."}),`
@@ -1 +1 @@
1
- import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{I as l}from"./common-types-Sih75Sav.js";import{S as C}from"./select-BW0IihoR.js";import{I}from"./input-DTXbDJaL.js";import{B as p}from"./button-CzvLc2io.js";import{I as N}from"./input-group-BaRSJAEN.js";import{I as j}from"./input-group-addon-D68iUKV2.js";const E=(n,i)=>i||n&&n.reduce((e,t)=>t.selected?Number(t.value):e,10)||10,_=(n,i)=>{if(!i||!n)return 10;const{options:e,value:t}=i,a=Number(t);return a===0?1:Math.ceil(n/E(e,a))},S=(n,i,e="Selected page must be a positive whole number between 1 and")=>{const t=`${e} ${i}`,a={valid:!0,error:null};return n===""?a:!n.match(/^\d+$/g)||parseInt(n)<=0||parseInt(n)>i?{valid:!1,error:t}:a},P="_paginationContainer_1tmz4_1",R={paginationContainer:P},T=({pagination:n})=>{const{rowCount:i,selectedPage:e,small:t,onSelectPage:a,rowsPerPage:r,errorMessageTemplate:g,testIds:m}=n,d=Number(r==null?void 0:r.value)===0,u=_(i,r),[f,h]=b.useState(String(e));b.useEffect(()=>{h(String(e))},[e]);const{error:v}=S(f,u,g),c=s=>{const{valid:x}=S(s,u,g);h(s),x&&s!==""&&a&&a(Number(s))};return o.jsxs("div",{className:R.paginationContainer,children:[r&&o.jsx("div",{style:{flexShrink:0},children:o.jsx(C,{onChange:s=>{r.onChange&&r.onChange(s),c(String(1))},options:r.options,native:!!r.options,small:t,width:"auto",value:r.value})}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_DOUBLE_LEFT,onClick:()=>c(String(1)),disabled:d||e===1}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_LEFT,onClick:()=>c(String(Number(e)-1)),disabled:d||e===1}),o.jsxs(N,{small:t,width:"auto",children:[o.jsx(I,{right:!0,value:f,placeholder:String(e),onChange:s=>c(s.target.value),width:"50px",disabled:d||u<=1,error:v}),o.jsxs(j,{children:["of ",u]})]}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_RIGHT,onClick:()=>c(String(Number(e)+1)),disabled:d||e===u}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_DOUBLE_RIGHT,onClick:()=>c(String(u)),disabled:d||e===u,testId:m==null?void 0:m.doubleRightBtn})]})};T.__docgenInfo={description:"",methods:[],displayName:"Pagination",props:{pagination:{required:!0,tsType:{name:"IPagination"},description:""}}};export{T as P};
1
+ import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{I as l}from"./common-types-Sih75Sav.js";import{S as C}from"./select-BpALjE__.js";import{I}from"./input-DTXbDJaL.js";import{B as p}from"./button-CzvLc2io.js";import{I as N}from"./input-group-BaRSJAEN.js";import{I as j}from"./input-group-addon-D68iUKV2.js";const E=(n,i)=>i||n&&n.reduce((e,t)=>t.selected?Number(t.value):e,10)||10,_=(n,i)=>{if(!i||!n)return 10;const{options:e,value:t}=i,a=Number(t);return a===0?1:Math.ceil(n/E(e,a))},S=(n,i,e="Selected page must be a positive whole number between 1 and")=>{const t=`${e} ${i}`,a={valid:!0,error:null};return n===""?a:!n.match(/^\d+$/g)||parseInt(n)<=0||parseInt(n)>i?{valid:!1,error:t}:a},P="_paginationContainer_1tmz4_1",R={paginationContainer:P},T=({pagination:n})=>{const{rowCount:i,selectedPage:e,small:t,onSelectPage:a,rowsPerPage:r,errorMessageTemplate:g,testIds:m}=n,d=Number(r==null?void 0:r.value)===0,u=_(i,r),[f,h]=b.useState(String(e));b.useEffect(()=>{h(String(e))},[e]);const{error:v}=S(f,u,g),c=s=>{const{valid:x}=S(s,u,g);h(s),x&&s!==""&&a&&a(Number(s))};return o.jsxs("div",{className:R.paginationContainer,children:[r&&o.jsx("div",{style:{flexShrink:0},children:o.jsx(C,{onChange:s=>{r.onChange&&r.onChange(s),c(String(1))},options:r.options,native:!!r.options,small:t,width:"auto",value:r.value})}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_DOUBLE_LEFT,onClick:()=>c(String(1)),disabled:d||e===1}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_LEFT,onClick:()=>c(String(Number(e)-1)),disabled:d||e===1}),o.jsxs(N,{small:t,width:"auto",children:[o.jsx(I,{right:!0,value:f,placeholder:String(e),onChange:s=>c(s.target.value),width:"50px",disabled:d||u<=1,error:v}),o.jsxs(j,{children:["of ",u]})]}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_RIGHT,onClick:()=>c(String(Number(e)+1)),disabled:d||e===u}),o.jsx(p,{small:t,round:!0,basic:!0,icon:l.CHEVRON_DOUBLE_RIGHT,onClick:()=>c(String(u)),disabled:d||e===u,testId:m==null?void 0:m.doubleRightBtn})]})};T.__docgenInfo={description:"",methods:[],displayName:"Pagination",props:{pagination:{required:!0,tsType:{name:"IPagination"},description:""}}};export{T as P};
@@ -1,4 +1,4 @@
1
- import{j as p}from"./jsx-runtime-eps93zm2.js";import{r as l}from"./index-DhsZuJvc.js";import{P as g}from"./pagination-T__Mixkr.js";import"./common-types-Sih75Sav.js";import"./select-BW0IihoR.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"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./inheritsLoose-DR8r8Ogv.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./button-CzvLc2io.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./input-DTXbDJaL.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";const h={rowCount:500,selectedPage:1,onSelectPage:()=>{}},X={title:"Basic/Pagination",component:g,args:{pagination:h}},n=()=>{const[a,t]=l.useState(1);return p.jsx(g,{pagination:{rowCount:500,selectedPage:a,onSelectPage:o=>t(o)}})},r=()=>{const[a,t]=l.useState(1),[o,i]=l.useState(20);return p.jsx(g,{pagination:{rowCount:500,selectedPage:a,rowsPerPage:{onChange:e=>i(Number(e.target.value)),options:[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"Show all",value:0}],value:o},onSelectPage:e=>t(e)}})},s=()=>{const[a,t]=l.useState(1),[o,i]=l.useState(20);return p.jsx(g,{pagination:{small:!0,rowCount:500,selectedPage:a,rowsPerPage:{onChange:e=>i(Number(e.target.value)),options:[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"Show all",value:0}],value:o},onSelectPage:e=>t(e)}})};n.__docgenInfo={description:"",methods:[],displayName:"Default"};r.__docgenInfo={description:"",methods:[],displayName:"RowsPerPage"};s.__docgenInfo={description:"",methods:[],displayName:"Small"};var P,c,u;n.parameters={...n.parameters,docs:{...(P=n.parameters)==null?void 0:P.docs,source:{originalSource:`() => {
1
+ import{j as p}from"./jsx-runtime-eps93zm2.js";import{r as l}from"./index-DhsZuJvc.js";import{P as g}from"./pagination-bLx5-m9c.js";import"./common-types-Sih75Sav.js";import"./select-BpALjE__.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"./enum-Bnn40S8Q.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"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./button-CzvLc2io.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./input-DTXbDJaL.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";const h={rowCount:500,selectedPage:1,onSelectPage:()=>{}},Y={title:"Basic/Pagination",component:g,args:{pagination:h}},n=()=>{const[a,t]=l.useState(1);return p.jsx(g,{pagination:{rowCount:500,selectedPage:a,onSelectPage:o=>t(o)}})},r=()=>{const[a,t]=l.useState(1),[o,i]=l.useState(20);return p.jsx(g,{pagination:{rowCount:500,selectedPage:a,rowsPerPage:{onChange:e=>i(Number(e.target.value)),options:[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"Show all",value:0}],value:o},onSelectPage:e=>t(e)}})},s=()=>{const[a,t]=l.useState(1),[o,i]=l.useState(20);return p.jsx(g,{pagination:{small:!0,rowCount:500,selectedPage:a,rowsPerPage:{onChange:e=>i(Number(e.target.value)),options:[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"Show all",value:0}],value:o},onSelectPage:e=>t(e)}})};n.__docgenInfo={description:"",methods:[],displayName:"Default"};r.__docgenInfo={description:"",methods:[],displayName:"RowsPerPage"};s.__docgenInfo={description:"",methods:[],displayName:"Small"};var P,c,u;n.parameters={...n.parameters,docs:{...(P=n.parameters)==null?void 0:P.docs,source:{originalSource:`() => {
2
2
  const [selectedPage, setSelectedPage] = useState(1);
3
3
  return <Pagination pagination={{
4
4
  rowCount: 500,
@@ -56,4 +56,4 @@ import{j as p}from"./jsx-runtime-eps93zm2.js";import{r as l}from"./index-DhsZuJv
56
56
  },
57
57
  onSelectPage: evt => setSelectedPage(evt)
58
58
  }} />;
59
- }`,...(b=(w=s.parameters)==null?void 0:w.docs)==null?void 0:b.source}}};const Y=["Default","RowsPerPage","Small"];export{n as Default,r as RowsPerPage,s as Small,Y as __namedExportsOrder,X as default};
59
+ }`,...(b=(w=s.parameters)==null?void 0:w.docs)==null?void 0:b.source}}};const Z=["Default","RowsPerPage","Small"];export{n as Default,r as RowsPerPage,s as Small,Z as __namedExportsOrder,Y as default};
@@ -0,0 +1,10 @@
1
+ import{j as r}from"./jsx-runtime-eps93zm2.js";import{r as k}from"./index-DhsZuJvc.js";import{S as w}from"./spacer-BWoNR27H.js";import{P as n}from"./popover-9ZnEm5Hy.js";import{I as c}from"./input-DTXbDJaL.js";import{B as i}from"./button-CzvLc2io.js";import{F as y}from"./flex-EllkLxgO.js";import{S as D}from"./select-BpALjE__.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.js";import"./lodash-c4VUpsOs.js";import"./spinner-AWUe4xwQ.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./enum-Bnn40S8Q.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Tr0wIZve.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";const u=[{label:"Option 1",value:"1"},{label:"Option 2",value:"2"}],_=({close:e})=>r.jsxs(y,{gap:"var(--padding-xs)",children:[r.jsx(c,{value:"Value",width:"150px",small:!0}),r.jsx(D,{options:u,value:u[0],width:"auto",small:!0}),r.jsx(i,{colored:!0,label:"Save",onClick:()=>{},small:!0}),r.jsx(i,{label:"Cancel",onClick:e,small:!0})]}),cr={title:"Basic/Popover",component:n,args:{overflowContainer:!0,content:r.jsx(_,{}),children:r.jsx(i,{label:"Toggle me"})},decorators:[e=>r.jsx("div",{style:{display:"flex"},children:e()})],parameters:{docs:{source:{excludeDecorators:!0}}}},l=e=>r.jsx(n,{...e}),p=l.bind({}),o=l.bind({});o.args={children:r.jsx(c,{value:"Value",width:"100%"})};const s=l.bind({});s.args={closeOnOutsideClick:!1,showCloseButton:!0};const t=l.bind({});t.args={disabled:!0};const a=e=>{const[m,T]=k.useState(!1);return r.jsxs("div",{children:[r.jsx(i,{onClick:()=>T(!m),label:"Toggle Popover Externally"}),r.jsx(w,{}),r.jsx(n,{...e,isOpen:m,children:r.jsx(c,{})})]})};a.__docgenInfo={description:"",methods:[],displayName:"ExternalControl"};var d,g,x;p.parameters={...p.parameters,docs:{...(d=p.parameters)==null?void 0:d.docs,source:{originalSource:"args => <Popover {...args} />",...(x=(g=p.parameters)==null?void 0:g.docs)==null?void 0:x.source}}};var v,f,j;o.parameters={...o.parameters,docs:{...(v=o.parameters)==null?void 0:v.docs,source:{originalSource:"args => <Popover {...args} />",...(j=(f=o.parameters)==null?void 0:f.docs)==null?void 0:j.source}}};var b,S,C;s.parameters={...s.parameters,docs:{...(b=s.parameters)==null?void 0:b.docs,source:{originalSource:"args => <Popover {...args} />",...(C=(S=s.parameters)==null?void 0:S.docs)==null?void 0:C.source}}};var O,h,P;t.parameters={...t.parameters,docs:{...(O=t.parameters)==null?void 0:O.docs,source:{originalSource:"args => <Popover {...args} />",...(P=(h=t.parameters)==null?void 0:h.docs)==null?void 0:P.source}}};var I,E,B;a.parameters={...a.parameters,docs:{...(I=a.parameters)==null?void 0:I.docs,source:{originalSource:`args => {
2
+ const [isOpen, setIsOpen] = useState(false);
3
+ return <div>
4
+ <Button onClick={() => setIsOpen(!isOpen)} label="Toggle Popover Externally" />
5
+ <Spacer />
6
+ <Popover {...args} isOpen={isOpen}>
7
+ <Input />
8
+ </Popover>
9
+ </div>;
10
+ }`,...(B=(E=a.parameters)==null?void 0:E.docs)==null?void 0:B.source}}};const mr=["Default","InputTrigger","CloseButton","Disabled","ExternalControl"];export{s as CloseButton,p as Default,t as Disabled,a as ExternalControl,o as InputTrigger,mr as __namedExportsOrder,cr as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-PKQXORMH-G3VSiFLs.js","./chunk-HLWAVYOI-CGp4-QUE.js","./iframe-EHZbBy3L.js","./index-DhsZuJvc.js","./react-16-DXAfArL2.js","./index-CUZDtIZe.js","./index-Bh4hgpyc.js","./extends-CF3RwP-h.js","./assertThisInitialized-B9jnkVVz.js","./inheritsLoose-DR8r8Ogv.js","./index-D6rZ4wEC.js"])))=>i.map(i=>d[i]);
2
- import{_ as a}from"./iframe-EHZbBy3L.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-PKQXORMH-G3VSiFLs.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-PKQXORMH-C-VGLian.js","./chunk-HLWAVYOI-B-NqvPla.js","./iframe-DOgYbEjR.js","./index-DhsZuJvc.js","./react-16-DXAfArL2.js","./index-CUZDtIZe.js","./index-MQZw3-wz.js","./extends-CF3RwP-h.js","./assertThisInitialized-B9jnkVVz.js","./inheritsLoose-DR8r8Ogv.js","./index-D6rZ4wEC.js"])))=>i.map(i=>d[i]);
2
+ import{_ as a}from"./iframe-DOgYbEjR.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-PKQXORMH-C-VGLian.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters};
@@ -1,3 +1,3 @@
1
- import{j as s}from"./jsx-runtime-eps93zm2.js";import{r as P,R as C}from"./index-DhsZuJvc.js";import{T as I}from"./toaster-7wnI6hqB.js";import"./message-DQ3q8XF9.js";import{a4 as d,a5 as M}from"./index-Bh4hgpyc.js";import{e as _}from"./index-DRSy5Ssd.js";import"./chunk-HLWAVYOI-CGp4-QUE.js";import"./index-CUZDtIZe.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./iframe-EHZbBy3L.js";import"../sb-preview/runtime.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./react-16-DXAfArL2.js";var v="DARK_MODE";function f(r){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(r)}var b;function A(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),e.push.apply(e,n)}return e}function k(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?A(Object(e),!0).forEach(function(n){R(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):A(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function R(r,t,e){return t=x(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function x(r){var t=K(r,"string");return f(t)==="symbol"?t:String(t)}function K(r,t){if(f(r)!=="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(f(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function p(r){return B(r)||U(r)||L(r)||N()}function N(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1
+ import{j as s}from"./jsx-runtime-eps93zm2.js";import{r as P,R as C}from"./index-DhsZuJvc.js";import{T as I}from"./toaster-7wnI6hqB.js";import"./message-DQ3q8XF9.js";import{a4 as d,a5 as M}from"./index-MQZw3-wz.js";import{e as _}from"./index-DRSy5Ssd.js";import"./chunk-HLWAVYOI-B-NqvPla.js";import"./index-CUZDtIZe.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./iframe-DOgYbEjR.js";import"../sb-preview/runtime.js";import"./extends-CF3RwP-h.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./react-16-DXAfArL2.js";var v="DARK_MODE";function f(r){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(r)}var b;function A(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),e.push.apply(e,n)}return e}function k(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?A(Object(e),!0).forEach(function(n){R(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):A(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function R(r,t,e){return t=x(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function x(r){var t=K(r,"string");return f(t)==="symbol"?t:String(t)}function K(r,t){if(f(r)!=="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(f(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function p(r){return B(r)||U(r)||L(r)||N()}function N(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L(r,t){if(r){if(typeof r=="string")return h(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return h(r,t)}}function U(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function B(r){if(Array.isArray(r))return h(r)}function h(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}const{global:Y}=__STORYBOOK_MODULE_GLOBAL__;__STORYBOOK_MODULE_CORE_EVENTS__;var T=Y,$=T.document,g=T.window,j="sb-addon-themes-3";(b=g.matchMedia)===null||b===void 0||b.call(g,"(prefers-color-scheme: dark)");var O={classTarget:"body",dark:d.dark,darkClass:["dark"],light:d.light,lightClass:["light"],stylePreview:!1,userHasExplicitlySetTheTheme:!1},E=function(t){g.localStorage.setItem(j,JSON.stringify(t))},H=function(t,e){var n=e.current,a=e.darkClass,l=a===void 0?O.darkClass:a,o=e.lightClass,i=o===void 0?O.lightClass:o;if(n==="dark"){var u,c;(u=t.classList).remove.apply(u,p(y(i))),(c=t.classList).add.apply(c,p(y(l)))}else{var m,S;(m=t.classList).remove.apply(m,p(y(l))),(S=t.classList).add.apply(S,p(y(i)))}},y=function(t){var e=[];return e.concat(t).map(function(n){return n})},V=function(t){var e=$.querySelector(t.classTarget);e&&H(e,t)},D=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=g.localStorage.getItem(j);if(typeof e=="string"){var n=JSON.parse(e);return t&&(t.dark&&!_(n.dark,t.dark)&&(n.dark=t.dark,E(n)),t.light&&!_(n.light,t.light)&&(n.light=t.light,E(n))),n}return k(k({},O),t)};V(D());function W(r,t){return F(r)||J(r,t)||G(r,t)||q()}function q(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G(r,t){if(r){if(typeof r=="string")return w(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return w(r,t)}}function w(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function J(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,a,l,o,i=[],u=!0,c=!1;try{if(l=(e=e.call(r)).next,t!==0)for(;!(u=(n=l.call(e)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(m){c=!0,a=m}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(c)throw a}}return i}}function F(r){if(Array.isArray(r))return r}const{addons:z,useState:Q,useEffect:X}=__STORYBOOK_MODULE_PREVIEW_API__;function Z(){var r=Q(D().current==="dark"),t=W(r,2),e=t[0],n=t[1];return X(function(){var a=z.getChannel();return a.on(v,n),function(){return a.off(v,n)}},[]),e}const Sr=[r=>s.jsxs(s.Fragment,{children:[s.jsx(r,{}),s.jsx(I,{})]}),r=>{const t=Z();return P.useEffect(()=>document.documentElement.dataset.theme=t?"dark":"default",[t]),s.jsx(r,{})}],_r={docs:{container:r=>{const[t,e]=C.useState(!1);r.context.channel.on(v,a=>e(a));const n={...r};return n.theme=t?d.dark:d.light,s.jsx(M,{...n})}},darkMode:{current:"light",stylePreview:!0}},Ar=["autodocs"];export{Sr as decorators,_r as parameters,Ar as tags};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{I as j}from"./common-types-Sih75Sav.js";import{T as w}from"./top-bar-BQzmL0IU.js";import{S as L}from"./side-bar-BApSkmiM.js";import{H as t}from"./heading-NkLgQYoP.js";import{B as m}from"./button-CzvLc2io.js";import{D as v}from"./drawer-CNKfMbq9.js";import{L as C}from"./list-DhjHm8bz.js";import{F as l}from"./field-C5_fLDpy.js";import{I as i}from"./input-DTXbDJaL.js";import{C as p}from"./check-box-wCvXxtCz.js";import{R as h}from"./radio-button-C3RuBqEf.js";import{C as d}from"./card-EcjmryU9.js";import{F}from"./form-row-CM112EYF.js";import{P as g}from"./page-7SSpdYhb.js";import{R as a,C as r}from"./row-Bmiy2Lh0.js";import{S as R}from"./select-BW0IihoR.js";import{S as f}from"./spacer-BWoNR27H.js";import"./index-Bk2sglWO.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./actions-Tr0wIZve.js";import"./lodash-c4VUpsOs.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./types-BmbYqTX_.js";import"./types-Dx2TtIG9.js";import"./badge-CLQ59MDF.js";import"./index-BI4_Bp97.js";import"./help-icon-41R-Z9N1.js";import"./spinner-AWUe4xwQ.js";import"./index.es-D2piFfFj.js";import"./extends-CF3RwP-h.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./memoize-one.esm-CcMeOnPo.js";import"./meta-content-DCllGQX6.js";import"./loader-XHoVniao.js";import"./label-hiSz3I8H.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./assertThisInitialized-B9jnkVVz.js";import"./text-B3-TSWok.js";const k=({width:o,height:n})=>e.jsx("div",{style:{background:"#ddd",width:o,height:n}}),Fe={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},s=()=>{const[o,n]=b.useState(!0);return e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsx(L,{options:{title:"",sections:[]}}),e.jsx(g,{padding:!1,scroll:!1,children:e.jsxs(a,{spacing:0,height:"100%",children:[e.jsx(v,{button:e.jsx(m,{onClick:()=>n(!o),round:!0,icon:j.CHEVRON_LEFT}),open:o,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(C,{drawer:!0,narrow:!o,list:{name:"Reservoirs",items:[{id:1,name:"Lorem",active:!0},{id:2,name:"Ipsum"}]}})}),e.jsxs(r,{scroll:!0,padding:!0,borderLeft:!0,children:[e.jsxs(a,{children:[e.jsxs(r,{children:[e.jsx(t,{top:!0,children:"Reservoir name here"}),e.jsxs(F,{children:[e.jsx(l,{label:"Name",children:e.jsx(i,{value:"Reservoir name here",width:"200px"})}),e.jsx(l,{label:"Lorem",children:e.jsx(h,{name:"example",options:[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"}],value:{label:"Monkeys",value:"bananas"},inline:!0})}),e.jsx(l,{label:"Ipsum",children:e.jsx(R,{name:"example",options:[{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}],value:{label:"Monkeys",value:"bananas"},native:!0})}),e.jsx(l,{children:e.jsx(p,{label:"Dolor"})})]})]}),e.jsx(r,{flex:!1,children:e.jsx(m,{onClick:()=>{},round:!0,icon:"question"})})]}),e.jsxs(a,{children:[e.jsx(r,{width:"50%",children:e.jsx(d,{heading:e.jsx(t,{onClickHelp:()=>console.log("help!"),children:"Reservoir Zone"}),children:e.jsxs(a,{children:[e.jsxs(r,{width:"50%",children:[e.jsxs(l,{label:"Label",helpText:"Lorem ipsum",children:[e.jsx(h,{options:[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"}],value:{label:"Monkeys",value:"bananas"},inline:!0}),e.jsx(i,{width:"100%"})]}),e.jsxs(l,{label:"Label",helpText:"Lorem ipsum",children:[e.jsx(p,{label:"Lorem ipsum"}),e.jsx(i,{width:"100%",disabled:!0})]}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})})]}),e.jsxs(r,{width:"50%",children:[e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})})]})]})})}),e.jsxs(r,{width:"50%",children:[e.jsx(d,{heading:e.jsx(t,{children:"Reservoir Size"}),children:e.jsxs(a,{children:[e.jsxs(r,{width:"160px",children:[e.jsx(l,{label:"Length",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Width",children:e.jsx(i,{width:"100%"})})]}),e.jsx(r,{children:e.jsx(k,{width:"100%",height:"100%"})})]})}),e.jsx(f,{}),e.jsx(d,{heading:e.jsx(t,{children:"Reservoir Properties"}),children:e.jsxs(a,{children:[e.jsx(r,{children:e.jsx(l,{label:"Label",children:e.jsx(i,{width:"100%"})})}),e.jsx(r,{children:e.jsx(l,{label:"Label",children:e.jsx(i,{width:"100%"})})}),e.jsx(r,{children:e.jsx(l,{label:"Label",children:e.jsx(i,{width:"100%"})})})]})})]})]})]})]})})]})};s.__docgenInfo={description:"",methods:[],displayName:"Reservoirs"};var u,x,c;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`() => {
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{I as j}from"./common-types-Sih75Sav.js";import{T as w}from"./top-bar-BQzmL0IU.js";import{S as L}from"./side-bar-BApSkmiM.js";import{H as t}from"./heading-NkLgQYoP.js";import{B as m}from"./button-CzvLc2io.js";import{D as v}from"./drawer-CNKfMbq9.js";import{L as C}from"./list-DhjHm8bz.js";import{F as l}from"./field-C5_fLDpy.js";import{I as i}from"./input-DTXbDJaL.js";import{C as p}from"./check-box-wCvXxtCz.js";import{R as h}from"./radio-button-C3RuBqEf.js";import{C as d}from"./card-EcjmryU9.js";import{F}from"./form-row-CM112EYF.js";import{P as g}from"./page-7SSpdYhb.js";import{R as a,C as r}from"./row-Bmiy2Lh0.js";import{S as R}from"./select-BpALjE__.js";import{S as f}from"./spacer-BWoNR27H.js";import"./index-Bk2sglWO.js";import"./icon-BP4BO6-k.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DR8r8Ogv.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./actions-Tr0wIZve.js";import"./lodash-c4VUpsOs.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./types-BmbYqTX_.js";import"./types-Dx2TtIG9.js";import"./badge-CLQ59MDF.js";import"./index-BI4_Bp97.js";import"./help-icon-41R-Z9N1.js";import"./spinner-AWUe4xwQ.js";import"./index.es-D2piFfFj.js";import"./extends-CF3RwP-h.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./memoize-one.esm-CcMeOnPo.js";import"./meta-content-DCllGQX6.js";import"./loader-XHoVniao.js";import"./label-hiSz3I8H.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./enum-Bnn40S8Q.js";import"./assertThisInitialized-B9jnkVVz.js";import"./text-B3-TSWok.js";const k=({width:o,height:n})=>e.jsx("div",{style:{background:"#ddd",width:o,height:n}}),ge={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},s=()=>{const[o,n]=b.useState(!0);return e.jsxs(e.Fragment,{children:[e.jsx(w,{}),e.jsx(L,{options:{title:"",sections:[]}}),e.jsx(g,{padding:!1,scroll:!1,children:e.jsxs(a,{spacing:0,height:"100%",children:[e.jsx(v,{button:e.jsx(m,{onClick:()=>n(!o),round:!0,icon:j.CHEVRON_LEFT}),open:o,width:300,closedWidth:"var(--size-sidebar)",children:e.jsx(C,{drawer:!0,narrow:!o,list:{name:"Reservoirs",items:[{id:1,name:"Lorem",active:!0},{id:2,name:"Ipsum"}]}})}),e.jsxs(r,{scroll:!0,padding:!0,borderLeft:!0,children:[e.jsxs(a,{children:[e.jsxs(r,{children:[e.jsx(t,{top:!0,children:"Reservoir name here"}),e.jsxs(F,{children:[e.jsx(l,{label:"Name",children:e.jsx(i,{value:"Reservoir name here",width:"200px"})}),e.jsx(l,{label:"Lorem",children:e.jsx(h,{name:"example",options:[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"}],value:{label:"Monkeys",value:"bananas"},inline:!0})}),e.jsx(l,{label:"Ipsum",children:e.jsx(R,{name:"example",options:[{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}],value:{label:"Monkeys",value:"bananas"},native:!0})}),e.jsx(l,{children:e.jsx(p,{label:"Dolor"})})]})]}),e.jsx(r,{flex:!1,children:e.jsx(m,{onClick:()=>{},round:!0,icon:"question"})})]}),e.jsxs(a,{children:[e.jsx(r,{width:"50%",children:e.jsx(d,{heading:e.jsx(t,{onClickHelp:()=>console.log("help!"),children:"Reservoir Zone"}),children:e.jsxs(a,{children:[e.jsxs(r,{width:"50%",children:[e.jsxs(l,{label:"Label",helpText:"Lorem ipsum",children:[e.jsx(h,{options:[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"}],value:{label:"Monkeys",value:"bananas"},inline:!0}),e.jsx(i,{width:"100%"})]}),e.jsxs(l,{label:"Label",helpText:"Lorem ipsum",children:[e.jsx(p,{label:"Lorem ipsum"}),e.jsx(i,{width:"100%",disabled:!0})]}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})})]}),e.jsxs(r,{width:"50%",children:[e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Label",helpText:"Lorem ipsum",children:e.jsx(i,{width:"100%"})})]})]})})}),e.jsxs(r,{width:"50%",children:[e.jsx(d,{heading:e.jsx(t,{children:"Reservoir Size"}),children:e.jsxs(a,{children:[e.jsxs(r,{width:"160px",children:[e.jsx(l,{label:"Length",children:e.jsx(i,{width:"100%"})}),e.jsx(l,{label:"Width",children:e.jsx(i,{width:"100%"})})]}),e.jsx(r,{children:e.jsx(k,{width:"100%",height:"100%"})})]})}),e.jsx(f,{}),e.jsx(d,{heading:e.jsx(t,{children:"Reservoir Properties"}),children:e.jsxs(a,{children:[e.jsx(r,{children:e.jsx(l,{label:"Label",children:e.jsx(i,{width:"100%"})})}),e.jsx(r,{children:e.jsx(l,{label:"Label",children:e.jsx(i,{width:"100%"})})}),e.jsx(r,{children:e.jsx(l,{label:"Label",children:e.jsx(i,{width:"100%"})})})]})})]})]})]})]})})]})};s.__docgenInfo={description:"",methods:[],displayName:"Reservoirs"};var u,x,c;s.parameters={...s.parameters,docs:{...(u=s.parameters)==null?void 0:u.docs,source:{originalSource:`() => {
2
2
  const [open, setOpen] = useState(true);
3
3
  return <>
4
4
  <TopBar />
@@ -153,4 +153,4 @@ import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJv
153
153
  </Row>
154
154
  </Page>
155
155
  </>;
156
- }`,...(c=(x=s.parameters)==null?void 0:x.docs)==null?void 0:c.source}}};const ge=["Reservoirs"];export{s as Reservoirs,ge as __namedExportsOrder,Fe as default};
156
+ }`,...(c=(x=s.parameters)==null?void 0:x.docs)==null?void 0:c.source}}};const Re=["Reservoirs"];export{s as Reservoirs,Re as __namedExportsOrder,ge as default};