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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/404.html +1 -0
  2. package/dist/storybook/assets/{Color-KGDBMAHA-CHN1S2X8.js → Color-KGDBMAHA-BnHaqcsT.js} +1 -1
  3. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-DmD_BuR8.js → DocsRenderer-PKQXORMH-DcoD1y-5.js} +1 -1
  4. package/dist/storybook/assets/{accordion.stories-BtQXhKld.js → accordion.stories-D0wb2n-9.js} +2 -2
  5. package/dist/storybook/assets/{afe.stories-DFQsvqIV.js → afe.stories-DM18uTAa.js} +2 -2
  6. package/dist/storybook/assets/{buttons-and-links-CofJkf3B.js → buttons-and-links-jPZ2UUsp.js} +1 -1
  7. package/dist/storybook/assets/{casing-loads.stories-1KCWDoR3.js → casing-loads.stories-Dga1QkGC.js} +2 -2
  8. package/dist/storybook/assets/{cell.stories-CBq3IOiP.js → cell.stories-DfyQwzEH.js} +2 -2
  9. package/dist/storybook/assets/{chunk-HLWAVYOI-D6plKxhM.js → chunk-HLWAVYOI-D2AwGCE9.js} +1 -1
  10. package/dist/storybook/assets/{color-Cm8Vinoa.js → color-CLf9xt55.js} +1 -1
  11. package/dist/storybook/assets/enum-Bnn40S8Q.js +1 -0
  12. package/dist/storybook/assets/footer.stories-DYBxUtZh.js +3 -0
  13. package/dist/storybook/assets/form.stories-BLcmnfy8.js +49 -0
  14. package/dist/storybook/assets/{formation.stories-ByGQlyM6.js → formation.stories-CZGQhWyA.js} +2 -2
  15. package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
  16. package/dist/storybook/assets/iframe-BnDar59m.js +2 -0
  17. package/dist/storybook/assets/{index-BDuzEdVP.js → index-BQ_6rM6u.js} +1 -1
  18. package/dist/storybook/assets/{index-Cq__GtHn.js → index-Sr04i8ct.js} +88 -88
  19. package/dist/storybook/assets/{input-group.stories-CElwRt3p.js → input-group.stories-EhmORqH9.js} +3 -3
  20. package/dist/storybook/assets/{input-validation-ZIuVwPoa.js → input-validation-Tr-aD1VJ.js} +2 -2
  21. package/dist/storybook/assets/{inputs-CNXjhlBh.js → inputs-BGIgggtv.js} +1 -1
  22. package/dist/storybook/assets/{layout-forms-C-SoBg1o.js → layout-forms-n-mRkolR.js} +5 -5
  23. package/dist/storybook/assets/{layout-general-Clz5Yc1Q.js → layout-general-CNsKoPG6.js} +1 -1
  24. package/dist/storybook/assets/{modal.stories-LhoWfDE6.js → modal.stories-C6Bh0Oda.js} +2 -2
  25. package/dist/storybook/assets/number-input-DZ9ERbK_.js +16 -0
  26. package/dist/storybook/assets/number-input.stories-CmVUHT2d.js +124 -0
  27. package/dist/storybook/assets/{padding-and-spacing-BmsvMp30.js → padding-and-spacing-B10oZ-Ww.js} +1 -1
  28. package/dist/storybook/assets/{pagination-CLt-kUlx.js → pagination-DWc8zp3k.js} +1 -1
  29. package/dist/storybook/assets/{pagination.stories-CTRM0Xou.js → pagination.stories-B5cOvzik.js} +2 -2
  30. package/dist/storybook/assets/popover.stories-p9_-pH_Q.js +10 -0
  31. package/dist/storybook/assets/{preview-PrNfVOD8.js → preview-Cym3ID9p.js} +2 -2
  32. package/dist/storybook/assets/{preview-D7bLtJOF.js → preview-pQMX-q5x.js} +1 -1
  33. package/dist/storybook/assets/{projects.stories-BQswWVCx.js → projects.stories-Co_WnKSx.js} +2 -2
  34. package/dist/storybook/assets/{radio-button-DmDuw4DA.js → radio-button-C4ljBRED.js} +1 -1
  35. package/dist/storybook/assets/{radio-button.stories-5gvV0LD0.js → radio-button.stories-BzyW2CtK.js} +2 -2
  36. package/dist/storybook/assets/{reservoirs.stories-B12tIrmZ.js → reservoirs.stories-UW_8sofe.js} +2 -2
  37. package/dist/storybook/assets/{rich-text-input.stories-hAHCnDHk.js → rich-text-input.stories-0pm7-gTq.js} +3 -3
  38. package/dist/storybook/assets/{row.stories-ghcsAzwW.js → row.stories-B8OWE9yd.js} +2 -2
  39. package/dist/storybook/assets/select-03uRbc4I.js +61 -0
  40. package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
  41. package/dist/storybook/assets/{select.stories-B9w9ONzj.js → select.stories-B0KIHiMX.js} +2 -2
  42. package/dist/storybook/assets/{site.stories-umpPYjkq.js → site.stories-ZGohyW6Z.js} +2 -2
  43. package/dist/storybook/assets/{table-BCdvBxub.js → table-qmf29AIJ.js} +1 -1
  44. package/dist/storybook/assets/{table.stories-DkmbUVHr.js → table.stories-DzHGqXth.js} +2 -2
  45. package/dist/storybook/assets/{tabs-C3NG6m9W.js → tabs-BoToLVEP.js} +1 -1
  46. package/dist/storybook/assets/tabs.stories-B52iEaHf.js +30 -0
  47. package/dist/storybook/assets/{title.stories-DpFDK9o1.js → title.stories-B8l1sfdo.js} +3 -3
  48. package/dist/storybook/assets/unit-input.stories-BnLB_Avl.js +316 -0
  49. package/dist/storybook/assets/unit-table.stories-DquyyMbD.js +152 -0
  50. package/dist/storybook/iframe.html +1 -1
  51. package/dist/storybook/index.json +1 -1
  52. package/dist/storybook/project.json +1 -1
  53. package/package.json +1 -1
  54. package/dist/storybook/assets/footer.stories-D-rIL9Q8.js +0 -3
  55. package/dist/storybook/assets/form.stories-BrUnmw7R.js +0 -49
  56. package/dist/storybook/assets/iframe-Z2m5WTzB.js +0 -2
  57. package/dist/storybook/assets/number-input-F3bqJ0z5.js +0 -16
  58. package/dist/storybook/assets/number-input.stories-Dw2eW2Mc.js +0 -166
  59. package/dist/storybook/assets/popover.stories-CGm0M5fv.js +0 -10
  60. package/dist/storybook/assets/select-DnRuRG_N.js +0 -61
  61. package/dist/storybook/assets/select.input-D0UkAPd9.js +0 -1
  62. package/dist/storybook/assets/tabs.stories-dsXjRHJy.js +0 -30
  63. package/dist/storybook/assets/unit-input.stories-D7vlYO8f.js +0 -380
  64. package/dist/storybook/assets/unit-table.stories-u1PeEt0F.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-DHevvVBE.js";import{M as f}from"./actions-D-uVCDzk.js";import{S as I}from"./select-DnRuRG_N.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-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./badge-CLQ59MDF.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./text-B3-TSWok.js";import"./select.input-D0UkAPd9.js";import"./index-CUZDtIZe.js";const ee={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 u,p,m;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.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-DHevvVBE.js";import{M as f}from"./actions-D-uVCDzk.js";import{S as I}from"./select-03uRbc4I.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-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./badge-CLQ59MDF.js";import"./enum-Bnn40S8Q.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 => {
2
2
  return <InputGroup
3
3
  // eslint-disable-next-line react/jsx-props-no-spreading
4
4
  {...args}>
@@ -46,7 +46,7 @@ import{j as e}from"./jsx-runtime-eps93zm2.js";import{T as x}from"./common-types-
46
46
  }} />
47
47
  <Button name="example" label="Confirm" colored onClick={() => {}} />
48
48
  </InputGroup>;
49
- }`,...(m=(p=o.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var c,d,b;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`args => {
49
+ }`,...(m=(u=o.parameters)==null?void 0:u.docs)==null?void 0:m.source}}};var c,d,b;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`args => {
50
50
  return <InputGroup
51
51
  // eslint-disable-next-line react/jsx-props-no-spreading
52
52
  {...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 ae=["Default","FixedWidth","Small","SelectWithButton"];export{o as Default,a as FixedWidth,n as SelectWithButton,l as Small,ae as __namedExportsOrder,ee as default};
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};
@@ -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-Cq__GtHn.js";import{NonExistentValue as a,Error as l}from"./select.stories-B9w9ONzj.js";import"./index-DhsZuJvc.js";import"./iframe-Z2m5WTzB.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./select-DnRuRG_N.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-D-uVCDzk.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.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-Sr04i8ct.js";import{NonExistentValue as a,Error as l}from"./select.stories-B0KIHiMX.js";import"./index-DhsZuJvc.js";import"./iframe-BnDar59m.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./select-03uRbc4I.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-D-uVCDzk.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.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 R(t={}){const{wrapper:i}={...r(),...t.components};return i?e.jsx(i,{...t,children:e.jsx(o,{...t})}):o(t)}export{R as default};
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};
@@ -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-Cq__GtHn.js";import{Default as l}from"./button.stories-DA9DGYD2.js";import{Default as a}from"./check-box.stories-DfbWw6mD.js";import{Default as c}from"./file-input.stories-CWD5XYE9.js";import{Default as d,Date as p}from"./input.stories-FKl0qVhm.js";import{Default as h}from"./number-input.stories-Dw2eW2Mc.js";import{Default as m}from"./option-dropdown.stories-CIvqMhQ3.js";import{Default as u}from"./radio-button.stories-5gvV0LD0.js";import{Native as f,Default as x}from"./select.stories-B9w9ONzj.js";import{Default as j}from"./slider.stories-BzBb3PkP.js";import{Default as b}from"./textarea.stories-CJ-Oqytp.js";import{Default as g}from"./toggle.stories-qTHFTXxI.js";import"./index-DhsZuJvc.js";import"./iframe-Z2m5WTzB.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./react-router-dom-Ck2Y_Fzc.js";import"./index-CEuq6vkz.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./flex-EllkLxgO.js";import"./button-DHevvVBE.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./tooltip-1V7clEnw.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./check-box-DPLaOkRR.js";import"./help-icon-Buhx5nl6.js";import"./file-input-X3BnZaHk.js";import"./lodash-c4VUpsOs.js";import"./input-group-BaRSJAEN.js";import"./input-DTXbDJaL.js";import"./types-Dx2TtIG9.js";import"./spacer-BWoNR27H.js";import"./message-Y48EomV-.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-CRNoBc7q.js";import"./input-group-addon-D68iUKV2.js";import"./select-DnRuRG_N.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./field-HrLaMLbx.js";import"./label-CqmyC9he.js";import"./toggle-BbFVf61v.js";import"./number-input-F3bqJ0z5.js";import"./divider-DY9nJ_7N.js";import"./radio-button-DmDuw4DA.js";import"./slider-C7vnj_3M.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.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-Sr04i8ct.js";import{Default as l}from"./button.stories-DA9DGYD2.js";import{Default as a}from"./check-box.stories-DfbWw6mD.js";import{Default as c}from"./file-input.stories-CWD5XYE9.js";import{Default as d,Date as p}from"./input.stories-FKl0qVhm.js";import{Default as h}from"./number-input.stories-CmVUHT2d.js";import{Default as m}from"./option-dropdown.stories-CIvqMhQ3.js";import{Default as u}from"./radio-button.stories-BzyW2CtK.js";import{Native as f,Default as x}from"./select.stories-B0KIHiMX.js";import{Default as j}from"./slider.stories-BzBb3PkP.js";import{Default as b}from"./textarea.stories-CJ-Oqytp.js";import{Default as g}from"./toggle.stories-qTHFTXxI.js";import"./index-DhsZuJvc.js";import"./iframe-BnDar59m.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./react-router-dom-Ck2Y_Fzc.js";import"./index-CEuq6vkz.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./flex-EllkLxgO.js";import"./button-DHevvVBE.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./tooltip-1V7clEnw.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./check-box-DPLaOkRR.js";import"./help-icon-Buhx5nl6.js";import"./file-input-X3BnZaHk.js";import"./lodash-c4VUpsOs.js";import"./input-group-BaRSJAEN.js";import"./input-DTXbDJaL.js";import"./types-Dx2TtIG9.js";import"./spacer-BWoNR27H.js";import"./message-Y48EomV-.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-CRNoBc7q.js";import"./input-group-addon-D68iUKV2.js";import"./select-03uRbc4I.js";import"./enum-Bnn40S8Q.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./number-input-DZ9ERbK_.js";import"./divider-DY9nJ_7N.js";import"./radio-button-C4ljBRED.js";import"./slider-C7vnj_3M.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./toggle-BbFVf61v.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"}),`
@@ -1,16 +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 o}from"./index-Cq__GtHn.js";import{Default as l,LabelOnLeft as p}from"./field.stories-DUGMwi1O.js";import{Default as m,LabelsOnLeft as a,Row as h}from"./form.stories-BrUnmw7R.js";import"./index-DhsZuJvc.js";import"./iframe-Z2m5WTzB.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./field-HrLaMLbx.js";import"./index-Bk2sglWO.js";import"./label-CqmyC9he.js";import"./common-types-Sih75Sav.js";import"./help-icon-Buhx5nl6.js";import"./tooltip-1V7clEnw.js";import"./icon-BSFY3vDO.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-DnRuRG_N.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-D-uVCDzk.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./check-box-DPLaOkRR.js";import"./button-group-1DEZPmxq.js";import"./toggle-BbFVf61v.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./slider-C7vnj_3M.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./textarea-D6ltcKhz.js";import"./radio-button-DmDuw4DA.js";import"./form-row-CM112EYF.js";function r(i){const e={code:"code",h1:"h1",h2:"h2",p:"p",...n(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Layout (Forms)"}),`
1
+ import{j as t}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as n}from"./index-BcNHZKhG.js";import{Z as s,$ as o}from"./index-Sr04i8ct.js";import{Default as p,LabelOnLeft as m}from"./field.stories-DUGMwi1O.js";import{Default as l,LabelsOnLeft as a,Row as h}from"./form.stories-BLcmnfy8.js";import"./index-DhsZuJvc.js";import"./iframe-BnDar59m.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./field-HrLaMLbx.js";import"./index-Bk2sglWO.js";import"./label-CqmyC9he.js";import"./common-types-Sih75Sav.js";import"./help-icon-Buhx5nl6.js";import"./tooltip-1V7clEnw.js";import"./icon-BSFY3vDO.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-03uRbc4I.js";import"./enum-Bnn40S8Q.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-D-uVCDzk.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./check-box-DPLaOkRR.js";import"./button-group-1DEZPmxq.js";import"./toggle-BbFVf61v.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./slider-C7vnj_3M.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./textarea-D6ltcKhz.js";import"./radio-button-C4ljBRED.js";import"./form-row-CM112EYF.js";function r(i){const e={code:"code",h1:"h1",h2:"h2",p:"p",...n(),...i.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Layout (Forms)"}),`
2
2
  `,t.jsx(e.h1,{id:"layout-forms",children:"Layout (Forms)"}),`
3
3
  `,t.jsx(e.h2,{id:"field",children:"Field"}),`
4
4
  `,t.jsxs(e.p,{children:["This is a wrapper for any form element with default bottom margin, and props like ",t.jsx(e.code,{children:"label"})," for other default styling."]}),`
5
- `,t.jsx(o,{of:l}),`
6
- `,t.jsxs(e.p,{children:["For inline labels, use the ",t.jsx(e.code,{children:"labelLeft"})," prop (and the optional ",t.jsx(e.code,{children:"labelWidth"}),")."]}),`
7
5
  `,t.jsx(o,{of:p}),`
6
+ `,t.jsxs(e.p,{children:["For inline labels, use the ",t.jsx(e.code,{children:"labelLeft"})," prop (and the optional ",t.jsx(e.code,{children:"labelWidth"}),")."]}),`
7
+ `,t.jsx(o,{of:m}),`
8
8
  `,t.jsx(e.h2,{id:"stacked",children:"Stacked"}),`
9
9
  `,t.jsxs(e.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(e.code,{children:"TextArea"}),")."]}),`
10
- `,t.jsx(o,{of:m}),`
10
+ `,t.jsx(o,{of:l}),`
11
11
  `,t.jsx(e.h2,{id:"stacked-with-inline-labels",children:"Stacked with inline labels"}),`
12
12
  `,t.jsxs(e.p,{children:["This has the same markup, but with ",t.jsx(e.code,{children:"labelLeft"})," and ",t.jsx(e.code,{children:"labelWidth"})," set on each field."]}),`
13
13
  `,t.jsx(o,{of:a}),`
14
14
  `,t.jsx(e.h2,{id:"row",children:"Row"}),`
15
15
  `,t.jsxs(e.p,{children:["Wrapping a group of form controls in ",t.jsx(e.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(o,{of:h})]})}function ot(i={}){const{wrapper:e}={...n(),...i.components};return e?t.jsx(e,{...i,children:t.jsx(r,{...i})}):r(i)}export{ot as default};
16
+ `,t.jsx(o,{of:h})]})}function nt(i={}){const{wrapper:e}={...n(),...i.components};return e?t.jsx(e,{...i,children:t.jsx(r,{...i})}):r(i)}export{nt 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-Cq__GtHn.js";import{Center as d,SpaceBetween as l,JustifyEnd as a,Column as c}from"./flex.stories-BhvJpHpN.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-DDTHFELF.js";import"./index-DhsZuJvc.js";import"./iframe-Z2m5WTzB.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./flex-EllkLxgO.js";import"./button-DHevvVBE.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.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-CRNoBc7q.js";import"./help-icon-Buhx5nl6.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-Sr04i8ct.js";import{Center as d,SpaceBetween as l,JustifyEnd as a,Column as c}from"./flex.stories-BhvJpHpN.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-DDTHFELF.js";import"./index-DhsZuJvc.js";import"./iframe-BnDar59m.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./flex-EllkLxgO.js";import"./button-DHevvVBE.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.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-CRNoBc7q.js";import"./help-icon-Buhx5nl6.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-BelCA1mt.js";import{B as l}from"./button-DHevvVBE.js";import{P as te}from"./popover-rq33c1W2.js";import{I as ne}from"./input-DTXbDJaL.js";import{I as ae}from"./input-group-BaRSJAEN.js";import{F as S}from"./field-HrLaMLbx.js";import{M as re}from"./actions-D-uVCDzk.js";import{S as ie}from"./select-DnRuRG_N.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-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./types-Dx2TtIG9.js";import"./label-CqmyC9he.js";import"./badge-CLQ59MDF.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./text-B3-TSWok.js";import"./select.input-D0UkAPd9.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:`() => {
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-BelCA1mt.js";import{B as l}from"./button-DHevvVBE.js";import{P as te}from"./popover-rq33c1W2.js";import{I as ne}from"./input-DTXbDJaL.js";import{I as ae}from"./input-group-BaRSJAEN.js";import{F as S}from"./field-HrLaMLbx.js";import{M as re}from"./actions-D-uVCDzk.js";import{S as ie}from"./select-03uRbc4I.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-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./types-Dx2TtIG9.js";import"./label-CqmyC9he.js";import"./badge-CLQ59MDF.js";import"./enum-Bnn40S8Q.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:`() => {
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 ze=["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,ze as __namedExportsOrder,qe as default};
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};
@@ -0,0 +1,16 @@
1
+ import{j as h}from"./jsx-runtime-eps93zm2.js";import{r as s}from"./index-DhsZuJvc.js";import{d as o}from"./index-C0x1JmaP.js";import{K as z,E as G}from"./enum-Bnn40S8Q.js";import{l as J}from"./lodash-c4VUpsOs.js";import{I as Q}from"./input-DTXbDJaL.js";const u=n=>String(o.toString(n)),U=n=>n?typeof n=="string"?n:J.isArray(n)?n[0]:n.fieldName:"",X=({name:n,placeholder:I="",disabled:F=!1,error:c=!1,left:L=!1,small:k=!1,width:x="100%",value:m="",onChange:R=()=>{},onFocus:S=()=>{},onBlur:j=()=>{},tabIndex:C=0,testId:H,tooltip:M=null,warning:K=!1,validationCallback:y=()=>{},allowEmpty:A=!1,isInTable:O,groupOrder:B,enableDisplayRounding:d=!1,roundDisplayValue:v,disableInternalErrorValidationMessages:D=!1})=>{const t=s.useRef(null),[r,T]=s.useState(u(m)),[l,b]=s.useState(!1),i=U(n),w=e=>{const a=o.validateNumber(e);return A&&e===""||a.valid?{...a,valid:!0,errors:void 0}:a},{valid:p,errors:f}=w(r),E=f&&f.length&&!D?f[0]:null;s.useEffect(()=>{T(u(m))},[m,d]),s.useEffect(()=>{!l&&!p?y(i,E):y(i,null)},[l,p,c]);const q=e=>{var N,V;const a=e instanceof KeyboardEvent?r:(N=e==null?void 0:e.target)==null?void 0:N.value,g=o.cleanNumStr(a.replaceAll(" ","").replaceAll("|",""));if(T(g),(V=w(g))!=null&&V.valid){const Z={...e,target:{...e.target,value:o.stripLeadingZeros(u(g)),name:i}};R(Z)}};s.useEffect(()=>{if(t&&(t!=null&&t.current)&&d&&l){const e=t.current;e&&setTimeout(()=>{const{length:a}=u(r);e.setSelectionRange(a,a)},0)}},[l]);const _=e=>{b(!0),S(e)},P=e=>{b(!1),j(e)},W=d&&!l&&p?v?u(v(r)):o.roundToFixed(r,2):r;return h.jsx(z,{handleKeys:[G.ENTER],onKeyEvent:(e,a)=>q(a),children:h.jsx(Q,{type:"text",name:i,testId:H,disabled:F,placeholder:I,value:W,onChange:q,onFocus:_,onBlur:P,error:E||c,warning:K,right:!L,small:k,width:x,isInTable:O,groupOrder:B,tabIndex:C,tooltip:M,ref:t},i)})};X.__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
+ event: TChangeEvent<T>,
3
+ ...additionalProps: { [key: string]: any }[]
4
+ ) => void`,signature:{arguments:[{type:{name:"intersection",raw:`ChangeEvent<T> & {
5
+ target:
6
+ | T
7
+ | { name: string; value: any; label?: string; files?: FileList | null };
8
+ }`,elements:[{name:"ChangeEvent",elements:[{name:"T"}],raw:"ChangeEvent<T>"},{name:"signature",type:"object",raw:`{
9
+ target:
10
+ | T
11
+ | { name: string; value: any; label?: string; files?: FileList | null };
12
+ }`,signature:{properties:[{key:"target",value:{name:"union",raw:`| T
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
+ name: string | { fieldName: string },
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: 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{X 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-DHevvVBE.js";import{H as _}from"./heading-CRNoBc7q.js";import{I as Ne}from"./input-group-addon-D68iUKV2.js";import{S as Ee}from"./select-03uRbc4I.js";import{I as Ve}from"./input-group-BaRSJAEN.js";import{N as i}from"./number-input-DZ9ERbK_.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-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./help-icon-Buhx5nl6.js";import"./lodash-c4VUpsOs.js";import"./types-Dx2TtIG9.js";import"./enum-Bnn40S8Q.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./input-DTXbDJaL.js";const{useArgs:Me}=__STORYBOOK_MODULE_PREVIEW_API__,Ca={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 ba=["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,ba as __namedExportsOrder,Ca 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-Cq__GtHn.js";import"./index-DhsZuJvc.js";import"./iframe-Z2m5WTzB.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.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-Sr04i8ct.js";import"./index-DhsZuJvc.js";import"./iframe-BnDar59m.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.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-DnRuRG_N.js";import{I}from"./input-DTXbDJaL.js";import{B as p}from"./button-DHevvVBE.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-03uRbc4I.js";import{I}from"./input-DTXbDJaL.js";import{B as p}from"./button-DHevvVBE.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-CLt-kUlx.js";import"./common-types-Sih75Sav.js";import"./select-DnRuRG_N.js";import"./lodash-c4VUpsOs.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./types-Dx2TtIG9.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./index-CEuq6vkz.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./input-DTXbDJaL.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";const h={rowCount:500,selectedPage:1,onSelectPage:()=>{}},V={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-DWc8zp3k.js";import"./common-types-Sih75Sav.js";import"./select-03uRbc4I.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"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.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:`() => {
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 W=["Default","RowsPerPage","Small"];export{n as Default,r as RowsPerPage,s as Small,W as __namedExportsOrder,V as default};
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};
@@ -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-rq33c1W2.js";import{I as c}from"./input-DTXbDJaL.js";import{B as i}from"./button-DHevvVBE.js";import{F as y}from"./flex-EllkLxgO.js";import{S as D}from"./select-03uRbc4I.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-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./enum-Bnn40S8Q.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./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})]}),nr={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 cr=["Default","InputTrigger","CloseButton","Disabled","ExternalControl"];export{s as CloseButton,p as Default,t as Disabled,a as ExternalControl,o as InputTrigger,cr as __namedExportsOrder,nr as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-PKQXORMH-DmD_BuR8.js","./chunk-HLWAVYOI-D6plKxhM.js","./iframe-Z2m5WTzB.js","./index-DhsZuJvc.js","./react-16-DXAfArL2.js","./index-CUZDtIZe.js","./index-Cq__GtHn.js","./inheritsLoose-DP0QEDDI.js","./assertThisInitialized-B9jnkVVz.js","./index-D6rZ4wEC.js"])))=>i.map(i=>d[i]);
2
- import{_ as a}from"./iframe-Z2m5WTzB.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-DmD_BuR8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),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-DcoD1y-5.js","./chunk-HLWAVYOI-D2AwGCE9.js","./iframe-BnDar59m.js","./index-DhsZuJvc.js","./react-16-DXAfArL2.js","./index-CUZDtIZe.js","./index-Sr04i8ct.js","./inheritsLoose-DP0QEDDI.js","./assertThisInitialized-B9jnkVVz.js","./index-D6rZ4wEC.js"])))=>i.map(i=>d[i]);
2
+ import{_ as a}from"./iframe-BnDar59m.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-DcoD1y-5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),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-Y48EomV-.js";import{a4 as d,a5 as M}from"./index-Cq__GtHn.js";import{e as _}from"./index-DRSy5Ssd.js";import"./chunk-HLWAVYOI-D6plKxhM.js";import"./index-CUZDtIZe.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./iframe-Z2m5WTzB.js";import"../sb-preview/runtime.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-Y48EomV-.js";import{a4 as d,a5 as M}from"./index-Sr04i8ct.js";import{e as _}from"./index-DRSy5Ssd.js";import"./chunk-HLWAVYOI-D2AwGCE9.js";import"./index-CUZDtIZe.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./iframe-BnDar59m.js";import"../sb-preview/runtime.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 Or=[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,{})}],Sr={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}},_r=["autodocs"];export{Or as decorators,Sr as parameters,_r as tags};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./jsx-runtime-eps93zm2.js";import"./index-DhsZuJvc.js";import{T as n}from"./top-bar-DkXSzzqt.js";import{L as r}from"./list-bKpz6I9Q.js";import{P as p}from"./page-7SSpdYhb.js";import{R as c,C as o}from"./row-Bmiy2Lh0.js";import{T as d}from"./tabs-C3NG6m9W.js";import{S as u}from"./spacer-BWoNR27H.js";import"./index-Bk2sglWO.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./common-types-Sih75Sav.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./actions-D-uVCDzk.js";import"./lodash-c4VUpsOs.js";import"./types-BmbYqTX_.js";import"./types-Dx2TtIG9.js";import"./badge-CLQ59MDF.js";import"./index.es-DazXb-ul.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./memoize-one.esm-CcMeOnPo.js";import"./card-EcjmryU9.js";import"./meta-content-DWZbURV2.js";import"./heading-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./loader-XHoVniao.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./select.input-D0UkAPd9.js";const t=[{label:"Browse",value:"Browse"},{label:"Recent",value:"Recent"},{label:"My Projects",value:"My Projects"}],s=[{id:1,name:"Lorem",active:!0},{id:2,name:"Ipsum"},{id:3,name:"Dolor"},{id:4,name:"Long name goes here lorem ipsum"},{id:5,name:"Lorem"},{id:6,name:"Ipsum"},{id:7,name:"Dolor"},{id:8,name:"Long name goes here lorem ipsum"},{id:9,name:"Lorem"},{id:10,name:"Ipsum"},{id:11,name:"Dolor"},{id:12,name:"Long name goes here lorem ipsum"},{id:13,name:"Lorem"},{id:14,name:"Ipsum"},{id:15,name:"Dolor"},{id:16,name:"Long name goes here lorem ipsum"}],X={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},l=()=>e.jsxs(e.Fragment,{children:[e.jsx(n,{}),e.jsxs(p,{padding:!1,left:0,scroll:!1,children:[e.jsx(u,{}),e.jsx(d,{margin:!1,padding:!0,options:t,value:t[0]}),e.jsxs(c,{spacing:0,flex:!0,height:"100%",children:[e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Country",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Field",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Site",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Well",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Wellbore",items:s}})}),e.jsx(o,{scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Design",items:s}})})]})]})]});l.__docgenInfo={description:"",methods:[],displayName:"Projects"};var i,m,a;l.parameters={...l.parameters,docs:{...(i=l.parameters)==null?void 0:i.docs,source:{originalSource:`() => {
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import"./index-DhsZuJvc.js";import{T as n}from"./top-bar-DkXSzzqt.js";import{L as r}from"./list-bKpz6I9Q.js";import{P as p}from"./page-7SSpdYhb.js";import{R as c,C as o}from"./row-Bmiy2Lh0.js";import{T as d}from"./tabs-BoToLVEP.js";import{S as u}from"./spacer-BWoNR27H.js";import"./index-Bk2sglWO.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./common-types-Sih75Sav.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./actions-D-uVCDzk.js";import"./lodash-c4VUpsOs.js";import"./types-BmbYqTX_.js";import"./types-Dx2TtIG9.js";import"./badge-CLQ59MDF.js";import"./index.es-DazXb-ul.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./memoize-one.esm-CcMeOnPo.js";import"./card-EcjmryU9.js";import"./meta-content-DWZbURV2.js";import"./heading-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./loader-XHoVniao.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";const t=[{label:"Browse",value:"Browse"},{label:"Recent",value:"Recent"},{label:"My Projects",value:"My Projects"}],s=[{id:1,name:"Lorem",active:!0},{id:2,name:"Ipsum"},{id:3,name:"Dolor"},{id:4,name:"Long name goes here lorem ipsum"},{id:5,name:"Lorem"},{id:6,name:"Ipsum"},{id:7,name:"Dolor"},{id:8,name:"Long name goes here lorem ipsum"},{id:9,name:"Lorem"},{id:10,name:"Ipsum"},{id:11,name:"Dolor"},{id:12,name:"Long name goes here lorem ipsum"},{id:13,name:"Lorem"},{id:14,name:"Ipsum"},{id:15,name:"Dolor"},{id:16,name:"Long name goes here lorem ipsum"}],Y={title:"Layout/Layout Examples",parameters:{layout:"fullscreen",docs:{story:{inline:!1,iframeHeight:400}}}},l=()=>e.jsxs(e.Fragment,{children:[e.jsx(n,{}),e.jsxs(p,{padding:!1,left:0,scroll:!1,children:[e.jsx(u,{}),e.jsx(d,{margin:!1,padding:!0,options:t,value:t[0]}),e.jsxs(c,{spacing:0,flex:!0,height:"100%",children:[e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Country",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Field",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Site",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Well",items:s}})}),e.jsx(o,{borderRight:!0,scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Wellbore",items:s}})}),e.jsx(o,{scroll:!0,showScrollbar:!1,children:e.jsx(r,{list:{name:"Design",items:s}})})]})]})]});l.__docgenInfo={description:"",methods:[],displayName:"Projects"};var i,m,a;l.parameters={...l.parameters,docs:{...(i=l.parameters)==null?void 0:i.docs,source:{originalSource:`() => {
2
2
  return <>
3
3
  <TopBar />
4
4
  <Page padding={false} left={0} scroll={false}>
@@ -44,4 +44,4 @@ import{j as e}from"./jsx-runtime-eps93zm2.js";import"./index-DhsZuJvc.js";import
44
44
  </Row>
45
45
  </Page>
46
46
  </>;
47
- }`,...(a=(m=l.parameters)==null?void 0:m.docs)==null?void 0:a.source}}};const Y=["Projects"];export{l as Projects,Y as __namedExportsOrder,X as default};
47
+ }`,...(a=(m=l.parameters)==null?void 0:m.docs)==null?void 0:a.source}}};const Z=["Projects"];export{l as Projects,Z as __namedExportsOrder,Y as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./jsx-runtime-eps93zm2.js";import{r as x}from"./index-DhsZuJvc.js";import{c as y}from"./index-Bk2sglWO.js";import{D as C}from"./disabled-context-rmpd7YJS.js";import{s as R}from"./select.input-D0UkAPd9.js";import{b as j}from"./common-types-Sih75Sav.js";import{H as L}from"./help-icon-Buhx5nl6.js";const V="_wrapper_1fbik_1",H="_inline_1fbik_1",O="_radio_1fbik_5",B="_labelMargin_1fbik_8",D="_small_1fbik_27",F="_noMargin_1fbik_32",N="_disabled_1fbik_90",A="_isInTable_1fbik_106",S="_helpIconEnabled_1fbik_111",n={wrapper:V,inline:H,radio:O,labelMargin:B,small:D,noMargin:F,disabled:N,isInTable:A,helpIconEnabled:S},T=({name:m,label:p,value:r,selected:c,disabled:t=!1,small:f=!1,onChange:g,noMargin:b=!1,testId:v,helpText:l,onClickHelp:s})=>{const u=l||s;return a.jsxs("div",{className:y(n.radio,t?n.disabled:null,f?n.small:null,b?n.noMargin:null),onClick:g,"data-testid":v,children:[a.jsx("input",{type:j.RADIO,value:r,checked:c,onChange:()=>{},disabled:t}),a.jsx("label",{"data-name":m,"data-value":r,children:p}),u&&a.jsx("div",{className:n.helpIconEnabled,onClick:s,children:a.jsx(L,{text:l})})]})};T.__docgenInfo={description:"",methods:[],displayName:"RadioInput",props:{name:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},label:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},value:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},selected:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLDivElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},noMargin:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},testId:{required:!1,tsType:{name:"string"},description:""},helpText:{required:!1,tsType:{name:"string"},description:""},onClickHelp:{required:!1,tsType:{name:"signature",type:"function",raw:"(event?: any) => void",signature:{arguments:[{type:{name:"any"},name:"event"}],return:{name:"void"}}},description:""}}};const P=({name:m,label:p,options:r,value:c,onChange:t,disabled:f=!1,small:g=!1,noMargin:b=!1,onClick:v=()=>{},inline:l=!1,mainLabel:s="",radioButtonsData:u,classForContainer:_="grouped fields"})=>{const q=x.useContext(C),o=u!==void 0,{simpleInputs:I,options:w,selectedOptions:d}=o?{simpleInputs:!1,options:u,selectedOptions:void 0}:R(r,c),k=o||d===void 0||d===null?void 0:I?d:d.value,h=o?s:p;return a.jsxs("div",{className:y(n.wrapper,l?n.inline:null,_==="inline fields"?n.inline:null),children:[s&&a.jsx("label",{className:y(l&&n.labelMargin),children:h}),w.map((e,E)=>{const M=e.checked||e.value===k||!1;return a.jsx(T,{name:e.name||e.value,label:e.label,value:e.value,selected:M,disabled:f||e.disabled||q,small:g,noMargin:b,onChange:e.disabled?void 0:i=>{o?v(i.target):(i.target.name=m,i.target.value=e.value.toString(),i.target.label=e.label.toString(),t&&t(i))},testId:e.testId,helpText:e.helpText,onClickHelp:e.onClickHelp},E)})]})};P.__docgenInfo={description:"",methods:[],displayName:"RadioButton",props:{name:{required:!1,tsType:{name:"string"},description:""},label:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},options:{required:!0,tsType:{name:"Array",elements:[{name:"IRadioButtonOption"}],raw:"IRadioButtonOption[]"},description:""},value:{required:!0,tsType:{name:"union",raw:"TStringOrNumber | IRadioButtonOption",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"IRadioButtonOption"}]},description:""},inline:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
1
+ import{j as a}from"./jsx-runtime-eps93zm2.js";import{r as x}from"./index-DhsZuJvc.js";import{c as y}from"./index-Bk2sglWO.js";import{D as C}from"./disabled-context-rmpd7YJS.js";import{s as R}from"./select.input-CJed_LLR.js";import{b as j}from"./common-types-Sih75Sav.js";import{H as L}from"./help-icon-Buhx5nl6.js";const V="_wrapper_1fbik_1",H="_inline_1fbik_1",O="_radio_1fbik_5",B="_labelMargin_1fbik_8",D="_small_1fbik_27",F="_noMargin_1fbik_32",N="_disabled_1fbik_90",A="_isInTable_1fbik_106",S="_helpIconEnabled_1fbik_111",n={wrapper:V,inline:H,radio:O,labelMargin:B,small:D,noMargin:F,disabled:N,isInTable:A,helpIconEnabled:S},T=({name:m,label:p,value:r,selected:c,disabled:t=!1,small:f=!1,onChange:g,noMargin:b=!1,testId:v,helpText:l,onClickHelp:s})=>{const u=l||s;return a.jsxs("div",{className:y(n.radio,t?n.disabled:null,f?n.small:null,b?n.noMargin:null),onClick:g,"data-testid":v,children:[a.jsx("input",{type:j.RADIO,value:r,checked:c,onChange:()=>{},disabled:t}),a.jsx("label",{"data-name":m,"data-value":r,children:p}),u&&a.jsx("div",{className:n.helpIconEnabled,onClick:s,children:a.jsx(L,{text:l})})]})};T.__docgenInfo={description:"",methods:[],displayName:"RadioInput",props:{name:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},label:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},value:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},selected:{required:!0,tsType:{name:"boolean"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLDivElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},noMargin:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},testId:{required:!1,tsType:{name:"string"},description:""},helpText:{required:!1,tsType:{name:"string"},description:""},onClickHelp:{required:!1,tsType:{name:"signature",type:"function",raw:"(event?: any) => void",signature:{arguments:[{type:{name:"any"},name:"event"}],return:{name:"void"}}},description:""}}};const P=({name:m,label:p,options:r,value:c,onChange:t,disabled:f=!1,small:g=!1,noMargin:b=!1,onClick:v=()=>{},inline:l=!1,mainLabel:s="",radioButtonsData:u,classForContainer:_="grouped fields"})=>{const q=x.useContext(C),o=u!==void 0,{simpleInputs:I,options:w,selectedOptions:d}=o?{simpleInputs:!1,options:u,selectedOptions:void 0}:R(r,c),k=o||d===void 0||d===null?void 0:I?d:d.value,h=o?s:p;return a.jsxs("div",{className:y(n.wrapper,l?n.inline:null,_==="inline fields"?n.inline:null),children:[s&&a.jsx("label",{className:y(l&&n.labelMargin),children:h}),w.map((e,E)=>{const M=e.checked||e.value===k||!1;return a.jsx(T,{name:e.name||e.value,label:e.label,value:e.value,selected:M,disabled:f||e.disabled||q,small:g,noMargin:b,onChange:e.disabled?void 0:i=>{o?v(i.target):(i.target.name=m,i.target.value=e.value.toString(),i.target.label=e.label.toString(),t&&t(i))},testId:e.testId,helpText:e.helpText,onClickHelp:e.onClickHelp},E)})]})};P.__docgenInfo={description:"",methods:[],displayName:"RadioButton",props:{name:{required:!1,tsType:{name:"string"},description:""},label:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},options:{required:!0,tsType:{name:"Array",elements:[{name:"IRadioButtonOption"}],raw:"IRadioButtonOption[]"},description:""},value:{required:!0,tsType:{name:"union",raw:"TStringOrNumber | IRadioButtonOption",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"IRadioButtonOption"}]},description:""},inline:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",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> & {
@@ -1,4 +1,4 @@
1
- import{j as A}from"./jsx-runtime-eps93zm2.js";import{r as F}from"./index-DhsZuJvc.js";import{w as K,u as q,e as m}from"./index-DMAnyMX5.js";import{R as j}from"./radio-button-DmDuw4DA.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./select.input-D0UkAPd9.js";import"./types-BmbYqTX_.js";import"./common-types-Sih75Sav.js";import"./help-icon-Buhx5nl6.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";const s=[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas",disabled:!0}],re={title:"Forms/RadioButton",component:j,args:{options:s,inline:!1,noMargin:!1,disabled:!1,small:!1}},a=t=>{const[e,u]=F.useState(s[0]),n=_=>{const $=_.target.value,g=s.find(W=>W.value===$);g&&u(g)};return A.jsx(j,{...t,value:e,onChange:n})},d=a.bind({}),o=a.bind({});o.args={small:!0};const l=a.bind({});l.args={options:s.map((t,e)=>({...t,helpText:`Help text #${e}`}))};const r=a.bind({});r.args={options:s.map((t,e)=>({...t,onClickHelp:()=>console.log(`Help #${e} clicked`)}))};const i=a.bind({});i.args={inline:!0};const c=a.bind({});c.args={options:s.map((t,e)=>({...t,helpText:`Help text #${e}`,disabled:!0}))};const p=a.bind({});p.play=async({canvasElement:t,step:e})=>{const u=K(t);await e("Clicking a radio should activate it",async()=>{const n=u.getByDisplayValue("grass");await q.click(n),await m(n).toBeChecked()}),await e("Clicking a disabled radio shouldn't activate it",async()=>{const n=u.getByDisplayValue("bananas");await n.click(),await m(n).not.toBeChecked()})};var v,h,C;d.parameters={...d.parameters,docs:{...(v=d.parameters)==null?void 0:v.docs,source:{originalSource:`args => {
1
+ import{j as A}from"./jsx-runtime-eps93zm2.js";import{r as F}from"./index-DhsZuJvc.js";import{w as K,u as q,e as m}from"./index-DMAnyMX5.js";import{R as j}from"./radio-button-C4ljBRED.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./types-BmbYqTX_.js";import"./common-types-Sih75Sav.js";import"./help-icon-Buhx5nl6.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";const s=[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas",disabled:!0}],ie={title:"Forms/RadioButton",component:j,args:{options:s,inline:!1,noMargin:!1,disabled:!1,small:!1}},a=t=>{const[e,u]=F.useState(s[0]),n=_=>{const $=_.target.value,g=s.find(W=>W.value===$);g&&u(g)};return A.jsx(j,{...t,value:e,onChange:n})},d=a.bind({}),o=a.bind({});o.args={small:!0};const l=a.bind({});l.args={options:s.map((t,e)=>({...t,helpText:`Help text #${e}`}))};const r=a.bind({});r.args={options:s.map((t,e)=>({...t,onClickHelp:()=>console.log(`Help #${e} clicked`)}))};const i=a.bind({});i.args={inline:!0};const c=a.bind({});c.args={options:s.map((t,e)=>({...t,helpText:`Help text #${e}`,disabled:!0}))};const p=a.bind({});p.play=async({canvasElement:t,step:e})=>{const u=K(t);await e("Clicking a radio should activate it",async()=>{const n=u.getByDisplayValue("grass");await q.click(n),await m(n).toBeChecked()}),await e("Clicking a disabled radio shouldn't activate it",async()=>{const n=u.getByDisplayValue("bananas");await n.click(),await m(n).not.toBeChecked()})};var v,h,C;d.parameters={...d.parameters,docs:{...(v=d.parameters)==null?void 0:v.docs,source:{originalSource:`args => {
2
2
  const [value, setValue] = useState<OptionType>(options[0]);
3
3
  const handleChange = (evt: React.ChangeEvent<HTMLInputElement>) => {
4
4
  const selectedValue = evt.target.value;
@@ -68,4 +68,4 @@ import{j as A}from"./jsx-runtime-eps93zm2.js";import{r as F}from"./index-DhsZuJv
68
68
  }
69
69
  };
70
70
  return <RadioButton {...args} value={value} onChange={handleChange} />;
71
- }`,...(D=(L=p.parameters)==null?void 0:L.docs)==null?void 0:D.source}}};const ie=["Default","Small","HelpText","OnClickHelp","Inline","DisabledWithHelpText","Test"];export{d as Default,c as DisabledWithHelpText,l as HelpText,i as Inline,r as OnClickHelp,o as Small,p as Test,ie as __namedExportsOrder,re as default};
71
+ }`,...(D=(L=p.parameters)==null?void 0:L.docs)==null?void 0:D.source}}};const ce=["Default","Small","HelpText","OnClickHelp","Inline","DisabledWithHelpText","Test"];export{d as Default,c as DisabledWithHelpText,l as HelpText,i as Inline,r as OnClickHelp,o as Small,p as Test,ce as __namedExportsOrder,ie as default};
@@ -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-DkXSzzqt.js";import{S as L}from"./side-bar-CSx5wI-k.js";import{H as t}from"./heading-CRNoBc7q.js";import{B as m}from"./button-DHevvVBE.js";import{D as v}from"./drawer-DOWJp9T4.js";import{L as C}from"./list-bKpz6I9Q.js";import{F as l}from"./field-HrLaMLbx.js";import{I as i}from"./input-DTXbDJaL.js";import{C as p}from"./check-box-DPLaOkRR.js";import{R as h}from"./radio-button-DmDuw4DA.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-DnRuRG_N.js";import{S as f}from"./spacer-BWoNR27H.js";import"./index-Bk2sglWO.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./actions-D-uVCDzk.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-Buhx5nl6.js";import"./spinner-AWUe4xwQ.js";import"./index.es-DazXb-ul.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./memoize-one.esm-CcMeOnPo.js";import"./meta-content-DWZbURV2.js";import"./loader-XHoVniao.js";import"./label-CqmyC9he.js";import"./select.input-D0UkAPd9.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}}),ve={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-DkXSzzqt.js";import{S as L}from"./side-bar-CSx5wI-k.js";import{H as t}from"./heading-CRNoBc7q.js";import{B as m}from"./button-DHevvVBE.js";import{D as v}from"./drawer-DOWJp9T4.js";import{L as C}from"./list-bKpz6I9Q.js";import{F as l}from"./field-HrLaMLbx.js";import{I as i}from"./input-DTXbDJaL.js";import{C as p}from"./check-box-DPLaOkRR.js";import{R as h}from"./radio-button-C4ljBRED.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-03uRbc4I.js";import{S as f}from"./spacer-BWoNR27H.js";import"./index-Bk2sglWO.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./disabled-context-rmpd7YJS.js";import"./actions-D-uVCDzk.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-Buhx5nl6.js";import"./spinner-AWUe4xwQ.js";import"./index.es-DazXb-ul.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./memoize-one.esm-CcMeOnPo.js";import"./meta-content-DWZbURV2.js";import"./loader-XHoVniao.js";import"./label-CqmyC9he.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}}),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:`() => {
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 Ce=["Reservoirs"];export{s as Reservoirs,Ce as __namedExportsOrder,ve as default};
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};