@oliasoft-open-source/react-ui-library 4.7.5 → 4.7.7

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 (84) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/{index-CbZ_B_tn.js → index-DCeIsyRy.js} +1 -0
  3. package/dist/global.css +576 -576
  4. package/dist/index.d.ts +5 -0
  5. package/dist/index.html +1 -1
  6. package/dist/index.js +1279 -1172
  7. package/dist/index.js.map +1 -1
  8. package/dist/storybook/assets/{Color-KGDBMAHA-DHDKE9Re.js → Color-KGDBMAHA-B09ajdpG.js} +1 -1
  9. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-BmaBzyAH.js → DocsRenderer-PKQXORMH-B1FePHEE.js} +1 -1
  10. package/dist/storybook/assets/{accordion.stories-BWUwZ5cN.js → accordion.stories-wRr6K6oi.js} +1 -1
  11. package/dist/storybook/assets/{afe.stories-CC785MgO.js → afe.stories-80-X2oCf.js} +1 -1
  12. package/dist/storybook/assets/{buttons-and-links-CfkgVoVA.js → buttons-and-links-DrDYbdOk.js} +1 -1
  13. package/dist/storybook/assets/{casing-loads.stories-BoG7UuIu.js → casing-loads.stories-BXcv0FiI.js} +1 -1
  14. package/dist/storybook/assets/{cell.stories-CfiPC1eE.js → cell.stories-MhANINNu.js} +1 -1
  15. package/dist/storybook/assets/check-box.stories-C_7Z7Ss6.js +126 -0
  16. package/dist/storybook/assets/{chunk-HLWAVYOI-CuMm7Qpv.js → chunk-HLWAVYOI-3IbBqp3W.js} +1 -1
  17. package/dist/storybook/assets/{color-DJNturFf.js → color-DqVXeBjc.js} +1 -1
  18. package/dist/storybook/assets/dialog-Di8hNunM.js +1 -0
  19. package/dist/storybook/assets/{file-input.stories--ZoISXk0.js → file-input.stories-Jrdw5k-s.js} +1 -1
  20. package/dist/storybook/assets/{footer.stories-DdUzRiYm.js → footer.stories-CGHFDUfT.js} +1 -1
  21. package/dist/storybook/assets/{form.stories-CDE7hTBL.js → form.stories-C1Qx3M_1.js} +1 -1
  22. package/dist/storybook/assets/{formation.stories-vU3zoZ2c.js → formation.stories-BEowxQZ-.js} +1 -1
  23. package/dist/storybook/assets/iframe-0oHxQxyh.js +2 -0
  24. package/dist/storybook/assets/index-CF7H4eMJ.js +28 -0
  25. package/dist/storybook/assets/index-DMAnyMX5.js +179 -0
  26. package/dist/storybook/assets/{index-DCGYYCUT.js → index-Dx_aqqZM.js} +4 -4
  27. package/dist/storybook/assets/{index-CQKekHCo.js → index-iPmJVpyV.js} +1 -1
  28. package/dist/storybook/assets/{input-group.stories-BiReS545.js → input-group.stories-44quIZTV.js} +1 -1
  29. package/dist/storybook/assets/{input-validation-Bd_JP2WL.js → input-validation-CregAhZZ.js} +2 -2
  30. package/dist/storybook/assets/{inputs-BsGUQTI3.js → inputs-DZn0C_9Y.js} +4 -4
  31. package/dist/storybook/assets/{layout-forms-BH-i91Wg.js → layout-forms-zjNDNCOQ.js} +1 -1
  32. package/dist/storybook/assets/{layout-general-jp5QULaU.js → layout-general-_85zGG_p.js} +1 -1
  33. package/dist/storybook/assets/menu.stories-mt3LwVCk.js +84 -0
  34. package/dist/storybook/assets/message-BYzRg8Ae.js +1 -0
  35. package/dist/storybook/assets/{message.stories-Dmk-t8hM.js → message.stories-K3bQ-5bJ.js} +1 -1
  36. package/dist/storybook/assets/modal.stories-Cct1SMOP.js +220 -0
  37. package/dist/storybook/assets/number-input.stories-C2QTTzzN.js +110 -0
  38. package/dist/storybook/assets/{padding-and-spacing-D7O49YoW.js → padding-and-spacing-CPgb4ZMT.js} +1 -1
  39. package/dist/storybook/assets/{pagination-DzpYFhAO.js → pagination-iSMIbR33.js} +1 -1
  40. package/dist/storybook/assets/{pagination.stories-CJwR-XAD.js → pagination.stories-BUPaZD5R.js} +1 -1
  41. package/dist/storybook/assets/{pop-confirm.stories-Hox7vJnl.js → pop-confirm.stories-Dhid1FK8.js} +1 -1
  42. package/dist/storybook/assets/{popover.stories-L5z549ww.js → popover.stories-Duemqiqp.js} +1 -1
  43. package/dist/storybook/assets/{preview-DOYx8RvS.js → preview-Bay6IiqP.js} +1 -1
  44. package/dist/storybook/assets/preview-DLBQXbKW.js +1 -0
  45. package/dist/storybook/assets/{preview-Bq2bLcjv.js → preview-DrVrew0c.js} +2 -2
  46. package/dist/storybook/assets/radio-button.stories-CGJnfCk-.js +71 -0
  47. package/dist/storybook/assets/{reservoirs.stories-WKT7gCnp.js → reservoirs.stories-aSZ9r1Pu.js} +1 -1
  48. package/dist/storybook/assets/{rich-text-input.stories-RjuY6LDo.js → rich-text-input.stories-CsFyrKRA.js} +1 -1
  49. package/dist/storybook/assets/{row.stories-B6IcyamO.js → row.stories-DL2h5FzP.js} +1 -1
  50. package/dist/storybook/assets/select-C8iu4-uz.js +40 -0
  51. package/dist/storybook/assets/select.stories-BZFdXGPs.js +579 -0
  52. package/dist/storybook/assets/{smart-upload-modal.stories-OBY4Jc5w.js → smart-upload-modal.stories-BmrhOtOG.js} +1 -1
  53. package/dist/storybook/assets/{table-BOVkj1wL.js → table-BNMxYhsu.js} +1 -1
  54. package/dist/storybook/assets/{table.stories-CdFHs6Xl.js → table.stories-YV04PKkU.js} +1 -1
  55. package/dist/storybook/assets/{title.stories-DT3HSIHi.js → title.stories-CuiMnOil.js} +1 -1
  56. package/dist/storybook/assets/toaster-BNO0suPv.js +1 -0
  57. package/dist/storybook/assets/toaster.stories-zcWIPp_X.js +89 -0
  58. package/dist/storybook/assets/toggle.stories-mjk0JIle.js +141 -0
  59. package/dist/storybook/assets/unit-input.stories-B3VwXCO8.js +295 -0
  60. package/dist/storybook/assets/unit-table.stories-DQrTQd6a.js +152 -0
  61. package/dist/storybook/iframe.html +1 -1
  62. package/dist/storybook/index.html +6 -2
  63. package/dist/storybook/index.json +1 -1
  64. package/dist/storybook/project.json +1 -1
  65. package/dist/storybook/sb-addons/interactions-2/manager-bundle.js +233 -0
  66. package/dist/storybook/sb-addons/storybook-dark-mode-esm-preset-3/manager-bundle.js.LEGAL.txt +0 -0
  67. package/package.json +1 -1
  68. package/dist/storybook/assets/check-box.stories-L9T_i0RT.js +0 -102
  69. package/dist/storybook/assets/dialog-IAPGkLet.js +0 -1
  70. package/dist/storybook/assets/iframe-CgUc-Ukp.js +0 -2
  71. package/dist/storybook/assets/menu.stories-CSSvL08X.js +0 -82
  72. package/dist/storybook/assets/message-ZenLdkrf.js +0 -1
  73. package/dist/storybook/assets/modal.stories-BVttWvlZ.js +0 -200
  74. package/dist/storybook/assets/number-input.stories-CVFfJvjY.js +0 -97
  75. package/dist/storybook/assets/radio-button.stories-Bg5JVXpo.js +0 -61
  76. package/dist/storybook/assets/select-D55JvDou.js +0 -40
  77. package/dist/storybook/assets/select.stories-2DiOP0OZ.js +0 -914
  78. package/dist/storybook/assets/toaster-B8A3xIYu.js +0 -1
  79. package/dist/storybook/assets/toaster.stories-B61l_zxQ.js +0 -86
  80. package/dist/storybook/assets/toggle.stories-D4c4fr5t.js +0 -117
  81. package/dist/storybook/assets/unit-input.stories-DyeptPz2.js +0 -290
  82. package/dist/storybook/assets/unit-table.stories-BAVqAbfG.js +0 -150
  83. /package/dist/storybook/sb-addons/{storybook-dark-mode-esm-preset-2 → interactions-2}/manager-bundle.js.LEGAL.txt +0 -0
  84. /package/dist/storybook/sb-addons/{storybook-dark-mode-esm-preset-2 → storybook-dark-mode-esm-preset-3}/manager-bundle.js +0 -0
@@ -1 +1 @@
1
- import{i as n,o as T,S as l,l as c,A as H,v as L,w as B,b,F as S,J as u,z as C,a as h,y as d,D as g,x as y,C as F,E as I,c as k,R as x,d as A,e as P,f as R,j as W,g as f,W as D,k as E,T as N,L as q,H as v,h as w,I as O,B as U,m as j,M as z,n as G,r as J,p as K,q as M,s as Q,t as V,u as X,_ as Y,G as Z,K as _,V as $,N as aa,O as sa,P as oa,Q as ta,U as ra,X as ea,Y as ia}from"./index-DCGYYCUT.js";import"./iframe-CgUc-Ukp.js";import"../sb-preview/runtime.js";import"./index-DhsZuJvc.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";export{n as A,T as ActionBar,l as Bar,c as Blockquote,H as Button,L as Code,B as DL,b as Div,S as EmptyTabContent,u as ErrorFormatter,C as FlexBar,h as Form,d as H1,g as H2,y as H3,F as H4,I as H5,k as H6,x as HR,A as IconButton,P as Img,R as LI,W as Link,f as ListItem,D as Loader,E as OL,N as P,q as Pre,v as ResetWrapper,w as ScrollArea,O as Separator,U as Span,j as SyntaxHighlighter,z as TT,G as TabBar,J as TabButton,K as Table,M as Tabs,Q as TabsState,V as TooltipLinkList,X as TooltipNote,Y as UL,Z as WithTooltip,_ as WithTooltipPure,$ as Zoom,aa as codeCommon,sa as components,oa as createCopyToClipboardFunction,ta as getStoryHref,ra as icons,ea as nameSpaceClassNames,ia as withReset};
1
+ import{i as n,o as T,S as l,l as c,A as H,v as L,w as B,b,F as S,J as u,z as C,a as h,y as d,D as g,x as y,C as F,E as I,c as k,R as x,d as A,e as P,f as R,j as W,g as f,W as D,k as E,T as N,L as q,H as v,h as w,I as O,B as U,m as j,M as z,n as G,r as J,p as K,q as M,s as Q,t as V,u as X,_ as Y,G as Z,K as _,V as $,N as aa,O as sa,P as oa,Q as ta,U as ra,X as ea,Y as ia}from"./index-Dx_aqqZM.js";import"./iframe-0oHxQxyh.js";import"../sb-preview/runtime.js";import"./index-DhsZuJvc.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";export{n as A,T as ActionBar,l as Bar,c as Blockquote,H as Button,L as Code,B as DL,b as Div,S as EmptyTabContent,u as ErrorFormatter,C as FlexBar,h as Form,d as H1,g as H2,y as H3,F as H4,I as H5,k as H6,x as HR,A as IconButton,P as Img,R as LI,W as Link,f as ListItem,D as Loader,E as OL,N as P,q as Pre,v as ResetWrapper,w as ScrollArea,O as Separator,U as Span,j as SyntaxHighlighter,z as TT,G as TabBar,J as TabButton,K as Table,M as Tabs,Q as TabsState,V as TooltipLinkList,X as TooltipNote,Y as UL,Z as WithTooltip,_ as WithTooltipPure,$ as Zoom,aa as codeCommon,sa as components,oa as createCopyToClipboardFunction,ta as getStoryHref,ra as icons,ea as nameSpaceClassNames,ia as withReset};
@@ -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-BW9trNAW.js";import{B as C}from"./button-VxhoNhrV.js";import{M as f}from"./actions-CHgr8eL8.js";import{S as I}from"./select-D55JvDou.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-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.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-DIKP56UZ.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-BW9trNAW.js";import{B as C}from"./button-VxhoNhrV.js";import{M as f}from"./actions-CHgr8eL8.js";import{S as I}from"./select-C8iu4-uz.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-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.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-DIKP56UZ.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 => {
2
2
  return <InputGroup
3
3
  // eslint-disable-next-line react/jsx-props-no-spreading
4
4
  {...args}>
@@ -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-DCGYYCUT.js";import{NonExistentValue as a,Error as l}from"./select.stories-2DiOP0OZ.js";import"./index-DhsZuJvc.js";import"./iframe-CgUc-Ukp.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./select-D55JvDou.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.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-CHgr8eL8.js";import"./button-VxhoNhrV.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.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-Dx_aqqZM.js";import{NonExistentValue as a,Error as l}from"./select.stories-BZFdXGPs.js";import"./index-DhsZuJvc.js";import"./iframe-0oHxQxyh.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-C8iu4-uz.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.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-CHgr8eL8.js";import"./button-VxhoNhrV.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.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 L(t={}){const{wrapper:i}={...r(),...t.components};return i?e.jsx(i,{...t,children:e.jsx(o,{...t})}):o(t)}export{L as default};
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};
@@ -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-DCGYYCUT.js";import{Default as l}from"./button.stories-DVtec2Eo.js";import{Default as a}from"./check-box.stories-L9T_i0RT.js";import{Default as c}from"./file-input.stories--ZoISXk0.js";import{Default as d,Date as p}from"./input.stories-BruLeJ44.js";import{Default as h}from"./number-input.stories-CVFfJvjY.js";import{Default as u}from"./option-dropdown.stories-CoLsSS95.js";import{Default as m}from"./radio-button.stories-Bg5JVXpo.js";import{Native as f,Default as x}from"./select.stories-2DiOP0OZ.js";import{Default as j}from"./slider.stories-Cd0rLfHP.js";import{Default as b}from"./textarea.stories-aRLEoDHg.js";import{Default as g}from"./toggle.stories-D4c4fr5t.js";import"./index-DhsZuJvc.js";import"./iframe-CgUc-Ukp.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-VxhoNhrV.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"./check-box-BtCGePRy.js";import"./help-icon-Buhx5nl6.js";import"./file-input-BpMtsZ2S.js";import"./input-group-BaRSJAEN.js";import"./input-BW9trNAW.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./spacer-BWoNR27H.js";import"./message-ZenLdkrf.js";import"./textarea-BV7xWEdt.js";import"./index-CWz-hU-f.js";import"./index-DRSy5Ssd.js";import"./number-input-uQOVHv2N.js";import"./input-group-addon-D68iUKV2.js";import"./select-D55JvDou.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-CHgr8eL8.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";import"./divider-DY9nJ_7N.js";import"./radio-button-YBwYcMaM.js";import"./slider-DAramr8j.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./toggle-CBpNgTrm.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-Dx_aqqZM.js";import{Default as l}from"./button.stories-DVtec2Eo.js";import{Default as a}from"./check-box.stories-C_7Z7Ss6.js";import{Default as c}from"./file-input.stories-Jrdw5k-s.js";import{Default as d,Date as p}from"./input.stories-BruLeJ44.js";import{Default as h}from"./number-input.stories-C2QTTzzN.js";import{Default as m}from"./option-dropdown.stories-CoLsSS95.js";import{Default as u}from"./radio-button.stories-CGJnfCk-.js";import{Native as f,Default as x}from"./select.stories-BZFdXGPs.js";import{Default as j}from"./slider.stories-Cd0rLfHP.js";import{Default as b}from"./textarea.stories-aRLEoDHg.js";import{Default as g}from"./toggle.stories-mjk0JIle.js";import"./index-DhsZuJvc.js";import"./iframe-0oHxQxyh.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-VxhoNhrV.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-BtCGePRy.js";import"./help-icon-Buhx5nl6.js";import"./file-input-BpMtsZ2S.js";import"./input-group-BaRSJAEN.js";import"./input-BW9trNAW.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./spacer-BWoNR27H.js";import"./message-BYzRg8Ae.js";import"./textarea-BV7xWEdt.js";import"./index-CWz-hU-f.js";import"./index-DRSy5Ssd.js";import"./number-input-uQOVHv2N.js";import"./input-group-addon-D68iUKV2.js";import"./select-C8iu4-uz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-CHgr8eL8.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";import"./divider-DY9nJ_7N.js";import"./radio-button-YBwYcMaM.js";import"./slider-DAramr8j.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./toggle-CBpNgTrm.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"}),`
@@ -38,7 +38,7 @@ custom `,e.jsx(t.code,{children:"Select"})," in GUI Library uses ",e.jsx(t.a,{hr
38
38
  `,e.jsx(t.h2,{id:"radiobutton",children:"RadioButton"}),`
39
39
  `,e.jsxs(t.p,{children:["Use a ",e.jsx(t.code,{children:"RadioButton"}),` group when users need to choose a single value from a short list of options (< 6 options). They are
40
40
  suitable for related but mutually exclusive choices.`]}),`
41
- `,e.jsx(o,{of:m}),`
41
+ `,e.jsx(o,{of:u}),`
42
42
  `,e.jsx(t.h2,{id:"checkbox",children:"CheckBox"}),`
43
43
  `,e.jsxs(t.p,{children:["Use a ",e.jsx(t.code,{children:"CheckBox"}),` when users need to select between opposite states (switching a binary value on or off). A CheckBox
44
44
  should have a label prop which makes the opposite states clear.`]}),`
@@ -48,7 +48,7 @@ should have a label prop which makes the opposite states clear.`]}),`
48
48
  `,e.jsx(t.h2,{id:"optiondropdown",children:"OptionDropdown"}),`
49
49
  `,e.jsxs(t.p,{children:["For a larger number of ",e.jsx(t.code,{children:"CheckBox"})," options and where space is limited, there's a convenience component called ",e.jsx(t.code,{children:"OptionDropdown"}),`,
50
50
  which allows selecting a multiple values, by presenting them in a dropdown, with an easy way to select all or clear.`]}),`
51
- `,e.jsx(o,{of:u}),`
51
+ `,e.jsx(o,{of:m}),`
52
52
  `,e.jsx(t.h2,{id:"toggle",children:"Toggle"}),`
53
53
  `,e.jsxs(t.p,{children:["A ",e.jsx(t.code,{children:"Toggle"})," is just an alternative variant to a ",e.jsx(t.code,{children:"CheckBox"})," and has the same use-case (switching a binary value on or off)."]}),`
54
54
  `,e.jsx(o,{of:g}),`
@@ -59,4 +59,4 @@ particularly on touch devices.`]}),`
59
59
  `,e.jsx(o,{of:j}),`
60
60
  `,e.jsx(t.h2,{id:"file-input",children:"File Input"}),`
61
61
  `,e.jsxs(t.p,{children:["Use a ",e.jsx(t.code,{children:"FileInput"})," when a user needs to upload a file. The ",e.jsx(t.code,{children:"accept"})," prop allows you to restrict the accepted file types."]}),`
62
- `,e.jsx(o,{of:c})]})}function Se(n={}){const{wrapper:t}={...s(),...n.components};return t?e.jsx(t,{...n,children:e.jsx(i,{...n})}):i(n)}export{Se as default};
62
+ `,e.jsx(o,{of:c})]})}function Ue(n={}){const{wrapper:t}={...s(),...n.components};return t?e.jsx(t,{...n,children:e.jsx(i,{...n})}):i(n)}export{Ue as default};
@@ -1,4 +1,4 @@
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-DCGYYCUT.js";import{Default as l,LabelOnLeft as p}from"./field.stories-B9p9nBgY.js";import{Default as m,LabelsOnLeft as a,Row as h}from"./form.stories-CDE7hTBL.js";import"./index-DhsZuJvc.js";import"./iframe-CgUc-Ukp.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-BW9trNAW.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./text-B3-TSWok.js";import"./select-D55JvDou.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-CHgr8eL8.js";import"./button-VxhoNhrV.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";import"./check-box-BtCGePRy.js";import"./button-group-CwJdFo2z.js";import"./toggle-CBpNgTrm.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./slider-DAramr8j.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./textarea-BV7xWEdt.js";import"./radio-button-YBwYcMaM.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-Dx_aqqZM.js";import{Default as l,LabelOnLeft as p}from"./field.stories-B9p9nBgY.js";import{Default as m,LabelsOnLeft as a,Row as h}from"./form.stories-C1Qx3M_1.js";import"./index-DhsZuJvc.js";import"./iframe-0oHxQxyh.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-BW9trNAW.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./text-B3-TSWok.js";import"./select-C8iu4-uz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-CHgr8eL8.js";import"./button-VxhoNhrV.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";import"./check-box-BtCGePRy.js";import"./button-group-CwJdFo2z.js";import"./toggle-CBpNgTrm.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./slider-DAramr8j.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";import"./textarea-BV7xWEdt.js";import"./radio-button-YBwYcMaM.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."]}),`
@@ -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-DCGYYCUT.js";import{Center as d,SpaceBetween as l,JustifyEnd as a,Column as c}from"./flex.stories-BEXf0VqI.js";import{Default as h,CustomColumnWidth as p,DefaultGap as x,CustomGap as m,Responsive as u}from"./grid.stories-BhjMGl59.js";import{Default as j,FixedWidth as f,NoPadding as w,ResponsiveWidth as g}from"./column.stories-BxfR9Tla.js";import"./index-DhsZuJvc.js";import"./iframe-CgUc-Ukp.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-VxhoNhrV.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-B6LFPf51.js";import"./styled-components.browser.esm-Bf0q9Yjk.js";import"./card-EcjmryU9.js";import"./row-4iAGREkV.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-Dx_aqqZM.js";import{Center as d,SpaceBetween as l,JustifyEnd as a,Column as c}from"./flex.stories-BEXf0VqI.js";import{Default as h,CustomColumnWidth as p,DefaultGap as x,CustomGap as m,Responsive as u}from"./grid.stories-BhjMGl59.js";import{Default as j,FixedWidth as f,NoPadding as w,ResponsiveWidth as g}from"./column.stories-BxfR9Tla.js";import"./index-DhsZuJvc.js";import"./iframe-0oHxQxyh.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-VxhoNhrV.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-B6LFPf51.js";import"./styled-components.browser.esm-Bf0q9Yjk.js";import"./card-EcjmryU9.js";import"./row-4iAGREkV.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."]}),`
@@ -0,0 +1,84 @@
1
+ import{j as r}from"./jsx-runtime-eps93zm2.js";import{r as Ir}from"./index-DhsZuJvc.js";import{H as Cr,L as J,S as Dr,R as U}from"./react-router-dom-Ck2Y_Fzc.js";import{T as A,I as fr}from"./common-types-Sih75Sav.js";import{w as kr,e as P,u as v}from"./index-DMAnyMX5.js";import{M as W}from"./actions-CHgr8eL8.js";import{B as X}from"./button-VxhoNhrV.js";import{F as Rr}from"./flex-EllkLxgO.js";import{m as s,a as wr,b as Br,c as Er,d as Nr,e as Fr,f as Lr,g as Pr,h as _r,i as Ar}from"./menu.stories-data-DeDnsKpk.js";import{M as H}from"./types-BmbYqTX_.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./lodash-BHd_uQHh.js";import"./disabled-context-rmpd7YJS.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./icon-BSFY3vDO.js";import"./types-UmZ4Y_CR.js";import"./badge-CLQ59MDF.js";import"./spinner-AWUe4xwQ.js";const ps={title:"Basic/Menu",component:W,args:{menu:s}},e=a=>r.jsx(W,{...a}),_=e.bind({}),c=e.bind({});c.args={menu:{...s,colored:!0}};const p=e.bind({});p.args={menu:{...s,label:"Delete",colored:"danger"}};const d=e.bind({});d.args={menu:{...s,trigger:A.TEXT}};const l=e.bind({});l.args={menu:{...s,trigger:A.COMPONENT,component:r.jsx(X,{small:!0,colored:!0,round:!0,icon:fr.SETTINGS})}};const m=e.bind({});m.args={menu:wr};const u=e.bind({});u.args={menu:Br};const g=e.bind({});g.args={menu:Er};const b=e.bind({});b.args={menu:Nr};const x=e.bind({});x.args={disabled:!0};const S=e.bind({});S.args={tooltip:"Tooltip goes here"};const h=e.bind({});h.args={error:"Error goes here"};const T=e.bind({});T.args={warning:"Warning goes here"};const j=e.bind({});j.args={loading:!0,disabled:!0};const M=e.bind({});M.args={badgeTitle:"3"};const y=e.bind({});y.args={badgeDot:!0};const O=e.bind({});O.args={menu:Fr};const I=e.bind({});I.args={menu:Lr};const C=e.bind({});C.args={closeOnOptionClick:!1};const D=e.bind({});D.args={contextMenu:!0,menu:{...s,trigger:A.TEXT,label:"Right-click me"}};const f=e.bind({});f.args={width:"100%"};const k=e.bind({});k.args={menu:{...s,small:!0}};const R=e.bind({});R.args={menu:Pr};const w=e.bind({});w.args={menu:{...s,sections:r.jsx("div",{children:"Testing"})}};const B=e.bind({});B.args={menu:_r};const E=e.bind({});E.args={menu:Ar};const N=()=>{const[a,t]=Ir.useState(!1);return r.jsxs(Rr,{gap:!0,children:[r.jsx(W,{menu:s,open:a,setOpen:t}),r.jsx(X,{label:"Open",onClick:()=>t(!0),disabled:a}),r.jsx(X,{label:"Close",onClick:()=>t(!1),disabled:!a})]})},F=()=>r.jsxs(Cr,{children:[r.jsx(W,{menu:{label:"Go to",trigger:A.DROP_DOWN_BUTTON,sections:[{type:H.OPTION,label:"Dashboard",url:"/dashboard",component:J},{type:H.OPTION,label:"Settings",url:"/settings",component:J}]}}),r.jsxs(Dr,{children:[r.jsx(U,{path:"/dashboard",children:"Dashboard"}),r.jsx(U,{path:"/settings",children:"Settings"})]})]}),o=e.bind({});o.args={testId:"testId"};o.play=async({canvasElement:a,step:t})=>{const n=a.parentElement?kr(a.parentElement):null;await P(n).toBeTruthy(),n&&(await t("Clicking trigger should open menu",async()=>{const L=n.getByTestId("testId");await v.click(L);const i=n.getByTestId("testId-layer");await P(i).toBeInTheDocument()}),await t("Clicking disabled item should do nothing",async()=>{await n.getByText("Knight").click();const i=n.getByTestId("testId-layer");await P(i).toBeInTheDocument()}),await t("Clicking item should close menu",async()=>{const L=n.getByText("King");await v.click(L);const i=n.queryByTestId("testId-layer");await P(i).not.toBeInTheDocument()}))};N.__docgenInfo={description:"",methods:[],displayName:"ControlOpenStateFromParent"};F.__docgenInfo={description:"",methods:[],displayName:"AsRouterLink"};var G,K,q;_.parameters={..._.parameters,docs:{...(G=_.parameters)==null?void 0:G.docs,source:{originalSource:`args => <Menu
2
+ // eslint-disable-next-line react/jsx-props-no-spreading
3
+ {...args} />`,...(q=(K=_.parameters)==null?void 0:K.docs)==null?void 0:q.source}}};var z,Q,V;c.parameters={...c.parameters,docs:{...(z=c.parameters)==null?void 0:z.docs,source:{originalSource:`args => <Menu
4
+ // eslint-disable-next-line react/jsx-props-no-spreading
5
+ {...args} />`,...(V=(Q=c.parameters)==null?void 0:Q.docs)==null?void 0:V.source}}};var Y,Z,$;p.parameters={...p.parameters,docs:{...(Y=p.parameters)==null?void 0:Y.docs,source:{originalSource:`args => <Menu
6
+ // eslint-disable-next-line react/jsx-props-no-spreading
7
+ {...args} />`,...($=(Z=p.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var ee,re,se;d.parameters={...d.parameters,docs:{...(ee=d.parameters)==null?void 0:ee.docs,source:{originalSource:`args => <Menu
8
+ // eslint-disable-next-line react/jsx-props-no-spreading
9
+ {...args} />`,...(se=(re=d.parameters)==null?void 0:re.docs)==null?void 0:se.source}}};var ae,ne,te;l.parameters={...l.parameters,docs:{...(ae=l.parameters)==null?void 0:ae.docs,source:{originalSource:`args => <Menu
10
+ // eslint-disable-next-line react/jsx-props-no-spreading
11
+ {...args} />`,...(te=(ne=l.parameters)==null?void 0:ne.docs)==null?void 0:te.source}}};var oe,ie,ce;m.parameters={...m.parameters,docs:{...(oe=m.parameters)==null?void 0:oe.docs,source:{originalSource:`args => <Menu
12
+ // eslint-disable-next-line react/jsx-props-no-spreading
13
+ {...args} />`,...(ce=(ie=m.parameters)==null?void 0:ie.docs)==null?void 0:ce.source}}};var pe,de,le;u.parameters={...u.parameters,docs:{...(pe=u.parameters)==null?void 0:pe.docs,source:{originalSource:`args => <Menu
14
+ // eslint-disable-next-line react/jsx-props-no-spreading
15
+ {...args} />`,...(le=(de=u.parameters)==null?void 0:de.docs)==null?void 0:le.source}}};var me,ue,ge;g.parameters={...g.parameters,docs:{...(me=g.parameters)==null?void 0:me.docs,source:{originalSource:`args => <Menu
16
+ // eslint-disable-next-line react/jsx-props-no-spreading
17
+ {...args} />`,...(ge=(ue=g.parameters)==null?void 0:ue.docs)==null?void 0:ge.source}}};var be,xe,Se;b.parameters={...b.parameters,docs:{...(be=b.parameters)==null?void 0:be.docs,source:{originalSource:`args => <Menu
18
+ // eslint-disable-next-line react/jsx-props-no-spreading
19
+ {...args} />`,...(Se=(xe=b.parameters)==null?void 0:xe.docs)==null?void 0:Se.source}}};var he,Te,je;x.parameters={...x.parameters,docs:{...(he=x.parameters)==null?void 0:he.docs,source:{originalSource:`args => <Menu
20
+ // eslint-disable-next-line react/jsx-props-no-spreading
21
+ {...args} />`,...(je=(Te=x.parameters)==null?void 0:Te.docs)==null?void 0:je.source}}};var Me,ye,Oe;S.parameters={...S.parameters,docs:{...(Me=S.parameters)==null?void 0:Me.docs,source:{originalSource:`args => <Menu
22
+ // eslint-disable-next-line react/jsx-props-no-spreading
23
+ {...args} />`,...(Oe=(ye=S.parameters)==null?void 0:ye.docs)==null?void 0:Oe.source}}};var Ie,Ce,De;h.parameters={...h.parameters,docs:{...(Ie=h.parameters)==null?void 0:Ie.docs,source:{originalSource:`args => <Menu
24
+ // eslint-disable-next-line react/jsx-props-no-spreading
25
+ {...args} />`,...(De=(Ce=h.parameters)==null?void 0:Ce.docs)==null?void 0:De.source}}};var fe,ke,Re;T.parameters={...T.parameters,docs:{...(fe=T.parameters)==null?void 0:fe.docs,source:{originalSource:`args => <Menu
26
+ // eslint-disable-next-line react/jsx-props-no-spreading
27
+ {...args} />`,...(Re=(ke=T.parameters)==null?void 0:ke.docs)==null?void 0:Re.source}}};var we,Be,Ee;j.parameters={...j.parameters,docs:{...(we=j.parameters)==null?void 0:we.docs,source:{originalSource:`args => <Menu
28
+ // eslint-disable-next-line react/jsx-props-no-spreading
29
+ {...args} />`,...(Ee=(Be=j.parameters)==null?void 0:Be.docs)==null?void 0:Ee.source}}};var Ne,Fe,Le;M.parameters={...M.parameters,docs:{...(Ne=M.parameters)==null?void 0:Ne.docs,source:{originalSource:`args => <Menu
30
+ // eslint-disable-next-line react/jsx-props-no-spreading
31
+ {...args} />`,...(Le=(Fe=M.parameters)==null?void 0:Fe.docs)==null?void 0:Le.source}}};var Pe,_e,Ae;y.parameters={...y.parameters,docs:{...(Pe=y.parameters)==null?void 0:Pe.docs,source:{originalSource:`args => <Menu
32
+ // eslint-disable-next-line react/jsx-props-no-spreading
33
+ {...args} />`,...(Ae=(_e=y.parameters)==null?void 0:_e.docs)==null?void 0:Ae.source}}};var We,Xe,Je;O.parameters={...O.parameters,docs:{...(We=O.parameters)==null?void 0:We.docs,source:{originalSource:`args => <Menu
34
+ // eslint-disable-next-line react/jsx-props-no-spreading
35
+ {...args} />`,...(Je=(Xe=O.parameters)==null?void 0:Xe.docs)==null?void 0:Je.source}}};var Ue,ve,He;I.parameters={...I.parameters,docs:{...(Ue=I.parameters)==null?void 0:Ue.docs,source:{originalSource:`args => <Menu
36
+ // eslint-disable-next-line react/jsx-props-no-spreading
37
+ {...args} />`,...(He=(ve=I.parameters)==null?void 0:ve.docs)==null?void 0:He.source}}};var Ge,Ke,qe;C.parameters={...C.parameters,docs:{...(Ge=C.parameters)==null?void 0:Ge.docs,source:{originalSource:`args => <Menu
38
+ // eslint-disable-next-line react/jsx-props-no-spreading
39
+ {...args} />`,...(qe=(Ke=C.parameters)==null?void 0:Ke.docs)==null?void 0:qe.source}}};var ze,Qe,Ve;D.parameters={...D.parameters,docs:{...(ze=D.parameters)==null?void 0:ze.docs,source:{originalSource:`args => <Menu
40
+ // eslint-disable-next-line react/jsx-props-no-spreading
41
+ {...args} />`,...(Ve=(Qe=D.parameters)==null?void 0:Qe.docs)==null?void 0:Ve.source}}};var Ye,Ze,$e;f.parameters={...f.parameters,docs:{...(Ye=f.parameters)==null?void 0:Ye.docs,source:{originalSource:`args => <Menu
42
+ // eslint-disable-next-line react/jsx-props-no-spreading
43
+ {...args} />`,...($e=(Ze=f.parameters)==null?void 0:Ze.docs)==null?void 0:$e.source}}};var er,rr,sr;k.parameters={...k.parameters,docs:{...(er=k.parameters)==null?void 0:er.docs,source:{originalSource:`args => <Menu
44
+ // eslint-disable-next-line react/jsx-props-no-spreading
45
+ {...args} />`,...(sr=(rr=k.parameters)==null?void 0:rr.docs)==null?void 0:sr.source}}};var ar,nr,tr;R.parameters={...R.parameters,docs:{...(ar=R.parameters)==null?void 0:ar.docs,source:{originalSource:`args => <Menu
46
+ // eslint-disable-next-line react/jsx-props-no-spreading
47
+ {...args} />`,...(tr=(nr=R.parameters)==null?void 0:nr.docs)==null?void 0:tr.source}}};var or,ir,cr;w.parameters={...w.parameters,docs:{...(or=w.parameters)==null?void 0:or.docs,source:{originalSource:`args => <Menu
48
+ // eslint-disable-next-line react/jsx-props-no-spreading
49
+ {...args} />`,...(cr=(ir=w.parameters)==null?void 0:ir.docs)==null?void 0:cr.source}}};var pr,dr,lr;B.parameters={...B.parameters,docs:{...(pr=B.parameters)==null?void 0:pr.docs,source:{originalSource:`args => <Menu
50
+ // eslint-disable-next-line react/jsx-props-no-spreading
51
+ {...args} />`,...(lr=(dr=B.parameters)==null?void 0:dr.docs)==null?void 0:lr.source}}};var mr,ur,gr;E.parameters={...E.parameters,docs:{...(mr=E.parameters)==null?void 0:mr.docs,source:{originalSource:`args => <Menu
52
+ // eslint-disable-next-line react/jsx-props-no-spreading
53
+ {...args} />`,...(gr=(ur=E.parameters)==null?void 0:ur.docs)==null?void 0:gr.source}}};var br,xr,Sr;N.parameters={...N.parameters,docs:{...(br=N.parameters)==null?void 0:br.docs,source:{originalSource:`() => {
54
+ const [open, setOpen] = useState(false);
55
+ return <Flex gap>
56
+ <Menu menu={storyData.menu} open={open} setOpen={setOpen} />
57
+ <Button label="Open" onClick={() => setOpen(true)} disabled={open} />
58
+ <Button label="Close" onClick={() => setOpen(false)} disabled={!open} />
59
+ </Flex>;
60
+ }`,...(Sr=(xr=N.parameters)==null?void 0:xr.docs)==null?void 0:Sr.source}}};var hr,Tr,jr;F.parameters={...F.parameters,docs:{...(hr=F.parameters)==null?void 0:hr.docs,source:{originalSource:`() => {
61
+ return <HashRouter>
62
+ <Menu menu={{
63
+ label: 'Go to',
64
+ trigger: TriggerType.DROP_DOWN_BUTTON,
65
+ sections: [{
66
+ type: MenuType.OPTION,
67
+ label: 'Dashboard',
68
+ url: '/dashboard',
69
+ component: Link
70
+ }, {
71
+ type: MenuType.OPTION,
72
+ label: 'Settings',
73
+ url: '/settings',
74
+ component: Link
75
+ }]
76
+ }} />
77
+ <Switch>
78
+ <Route path="/dashboard">Dashboard</Route>
79
+ <Route path="/settings">Settings</Route>
80
+ </Switch>
81
+ </HashRouter>;
82
+ }`,...(jr=(Tr=F.parameters)==null?void 0:Tr.docs)==null?void 0:jr.source}}};var Mr,yr,Or;o.parameters={...o.parameters,docs:{...(Mr=o.parameters)==null?void 0:Mr.docs,source:{originalSource:`args => <Menu
83
+ // eslint-disable-next-line react/jsx-props-no-spreading
84
+ {...args} />`,...(Or=(yr=o.parameters)==null?void 0:yr.docs)==null?void 0:Or.source}}};const ds=["Default","PrimaryTrigger","DestructiveTrigger","TextTrigger","CustomTrigger","FileUpload","DescriptionOnRight","Actions","Icons","Disabled","Tooltip","Error","Warning","Loading","Badge","Dot","Empty","Submenus","WithoutCloseOnOptionClick","RightClickContextMenu","FullWidth","Small","JSXItems","JSXContent","ShowAll","Long","ControlOpenStateFromParent","AsRouterLink","Test"];export{g as Actions,F as AsRouterLink,M as Badge,N as ControlOpenStateFromParent,l as CustomTrigger,_ as Default,u as DescriptionOnRight,p as DestructiveTrigger,x as Disabled,y as Dot,O as Empty,h as Error,m as FileUpload,f as FullWidth,b as Icons,w as JSXContent,R as JSXItems,j as Loading,E as Long,c as PrimaryTrigger,D as RightClickContextMenu,B as ShowAll,k as Small,I as Submenus,o as Test,d as TextTrigger,S as Tooltip,T as Warning,C as WithoutCloseOnOptionClick,ds as __namedExportsOrder,ps as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./jsx-runtime-eps93zm2.js";import{r as T}from"./index-DhsZuJvc.js";import{c as l}from"./index-Bk2sglWO.js";import{I as o}from"./common-types-Sih75Sav.js";import{I as a}from"./icon-BSFY3vDO.js";const N="_inputInTable_s49vk_1",b="_inputHover_s49vk_13",j="_inputFocus_s49vk_18",R="_inputError_s49vk_25",y="_inputWarning_s49vk_26",C="_inputDisabled_s49vk_61",w="_hideScrollbars_s49vk_67",O="_container_s49vk_83",D="_block_s49vk_101",G="_info_s49vk_104",W="_success_s49vk_108",A="_warning_s49vk_112",L="_error_s49vk_116",F="_content_s49vk_120",q="_heading_s49vk_124",z="_icon_s49vk_131",H="_dismiss_s49vk_139",U="_absolute_s49vk_143",V="_legendToggle_s49vk_155",M="_detailsText_s49vk_165",B="_footer_s49vk_169",n={inputInTable:N,inputHover:b,inputFocus:j,inputError:R,inputWarning:y,inputDisabled:C,hideScrollbars:w,container:O,block:D,info:G,success:W,warning:A,error:L,content:F,heading:q,icon:z,dismiss:H,absolute:U,legendToggle:V,detailsText:M,footer:B};var i=(s=>(s.INFO="Info",s.SUCCESS="Success",s.WARNING="Warning",s.ERROR="Error",s))(i||{}),d=(s=>(s.TOGGLE_DETAILS="TOGGLE_DETAILS",s))(d||{});const g=({type:s,onClose:t,isInToast:r,testId:c})=>e.jsx("div",{className:l(n.dismiss,r?n.absolute:"",s===i.INFO?n.info:s===i.SUCCESS?n.success:s===i.WARNING?n.warning:s===i.ERROR?n.error:null),children:e.jsx(a,{icon:o.CLOSE,onClick:t,testId:c})});g.__docgenInfo={description:"",methods:[],displayName:"Dismiss",props:{type:{required:!0,tsType:{name:"union",raw:"TMessageType | string",elements:[{name:"union",raw:"'Info' | 'Success' | 'Warning' | 'Error'",elements:[{name:"literal",value:"'Info'"},{name:"literal",value:"'Success'"},{name:"literal",value:"'Warning'"},{name:"literal",value:"'Error'"}]},{name:"string"}]},description:""},onClose:{required:!1,tsType:{name:"signature",type:"function",raw:"(...args: any[]) => any",signature:{arguments:[{type:{name:"Array",elements:[{name:"any"}],raw:"any[]"},name:"args",rest:!0}],return:{name:"any"}}},description:""},isInToast:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const J=(s,t)=>{switch(t.type){case d.TOGGLE_DETAILS:return{...s,detailsVisible:!s.detailsVisible};default:return s}},K=({details:s,visible:t,dispatch:r})=>e.jsxs("div",{children:[e.jsx("div",{className:l(n.legendToggle),onClick:r,children:t?"Hide details":"Show details"}),t?e.jsx("div",{className:n.detailsText,children:s}):null]}),P=({type:s})=>{switch(s){case i.SUCCESS:return e.jsx(a,{icon:o.SUCCESS,size:16});case i.WARNING:return e.jsx(a,{icon:o.WARNING,size:16});case i.ERROR:return e.jsx(a,{icon:o.ERROR,size:16});default:return e.jsx(a,{icon:o.INFO,size:16})}},Q=({message:s})=>{const{visible:t,type:r=i.INFO,icon:c,heading:u,content:v,details:_,detailsVisible:h=!1,footer:m,withDismiss:x,onClose:I,width:p,maxHeight:S}=s,f={detailsVisible:h},[k,E]=T.useReducer(J,f);return e.jsx(e.Fragment,{children:t?e.jsxs("div",{className:l(n.container,p?n.block:null,r===i.SUCCESS?n.success:r===i.WARNING?n.warning:r===i.ERROR?n.error:n.info),style:{width:p,maxHeight:S},children:[e.jsx("div",{children:c?e.jsx("div",{className:n.icon,children:e.jsx(P,{type:r})}):null}),e.jsxs("div",{className:n.content,children:[u?e.jsx("div",{className:n.heading,children:u}):null,e.jsx("div",{children:v}),_?e.jsx(K,{details:_,visible:k.detailsVisible,dispatch:()=>E({type:d.TOGGLE_DETAILS})}):null,!!m&&e.jsx("div",{className:n.footer,children:m})]}),x?e.jsx(g,{type:r,onClose:I}):null]}):null})};Q.__docgenInfo={description:"",methods:[],displayName:"Message",props:{message:{required:!0,tsType:{name:"IMessage"},description:""}}};export{g as D,Q as M,i as a};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./jsx-runtime-eps93zm2.js";import{M as a,a as n}from"./message-ZenLdkrf.js";import{B as M}from"./button-VxhoNhrV.js";import{G as z}from"./grid-B6LFPf51.js";import"./index-DhsZuJvc.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"./spinner-AWUe4xwQ.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./styled-components.browser.esm-Bf0q9Yjk.js";const{useArgs:J}=__STORYBOOK_MODULE_PREVIEW_API__,Q={visible:!0,heading:void 0,content:"Here is some info",withDismiss:!1,icon:!1,details:void 0,maxHeight:void 0,type:n.INFO},ce={title:"Basic/Message",component:a,args:{...Q},argTypes:{heading:{control:{type:"text"}},details:{control:{type:"text"}}}},e=u=>{const[X,y]=J(),c=()=>{y({visible:!1}),setTimeout(()=>{y({visible:!0})},1e3)};return s.jsxs(z,{gap:!0,children:[s.jsx(a,{message:{...u,onClose:c,type:n.INFO}}),s.jsx(a,{message:{...u,onClose:c,type:n.ERROR}}),s.jsx(a,{message:{...u,onClose:c,type:n.WARNING}}),s.jsx(a,{message:{...u,onClose:c,type:n.SUCCESS}})]})},C=e.bind({}),o=e.bind({});o.args={heading:"Message Heading"};const r=e.bind({});r.args={icon:!0};const t=e.bind({});t.args={details:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at mi ac quam condimentum blandit at sit amet lectus. Nullam volutpat erat maximus, venenatis nisl sed, aliquam libero."};const g=e.bind({});g.args={details:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at mi ac quam condimentum blandit at sit amet lectus. Nullam volutpat erat maximus, venenatis nisl sed, aliquam libero.",detailsVisible:!0};const l=e.bind({});l.args={type:n.ERROR,icon:!0,content:"Unable to sync because connection settings are not set.",footer:s.jsxs(s.Fragment,{children:[s.jsx(M,{small:!0,label:"Edit connection settings",colored:"primary"},"edit-settings"),s.jsx(M,{small:!0,label:"Cancel sync"},"cancel-sync"),","]})};const i=e.bind({});i.args={width:"100%"};const p=e.bind({});p.args={width:"300px"};const d=e.bind({});d.args={maxHeight:"100px",content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. ".repeat(20)};const m=e.bind({});m.args={withDismiss:!0,onClose:()=>{}};var h,T,A;C.parameters={...C.parameters,docs:{...(h=C.parameters)==null?void 0:h.docs,source:{originalSource:`args => {
1
+ import{j as s}from"./jsx-runtime-eps93zm2.js";import{M as a,a as n}from"./message-BYzRg8Ae.js";import{B as M}from"./button-VxhoNhrV.js";import{G as z}from"./grid-B6LFPf51.js";import"./index-DhsZuJvc.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"./spinner-AWUe4xwQ.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./styled-components.browser.esm-Bf0q9Yjk.js";const{useArgs:J}=__STORYBOOK_MODULE_PREVIEW_API__,Q={visible:!0,heading:void 0,content:"Here is some info",withDismiss:!1,icon:!1,details:void 0,maxHeight:void 0,type:n.INFO},ce={title:"Basic/Message",component:a,args:{...Q},argTypes:{heading:{control:{type:"text"}},details:{control:{type:"text"}}}},e=u=>{const[X,y]=J(),c=()=>{y({visible:!1}),setTimeout(()=>{y({visible:!0})},1e3)};return s.jsxs(z,{gap:!0,children:[s.jsx(a,{message:{...u,onClose:c,type:n.INFO}}),s.jsx(a,{message:{...u,onClose:c,type:n.ERROR}}),s.jsx(a,{message:{...u,onClose:c,type:n.WARNING}}),s.jsx(a,{message:{...u,onClose:c,type:n.SUCCESS}})]})},C=e.bind({}),o=e.bind({});o.args={heading:"Message Heading"};const r=e.bind({});r.args={icon:!0};const t=e.bind({});t.args={details:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at mi ac quam condimentum blandit at sit amet lectus. Nullam volutpat erat maximus, venenatis nisl sed, aliquam libero."};const g=e.bind({});g.args={details:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque at mi ac quam condimentum blandit at sit amet lectus. Nullam volutpat erat maximus, venenatis nisl sed, aliquam libero.",detailsVisible:!0};const l=e.bind({});l.args={type:n.ERROR,icon:!0,content:"Unable to sync because connection settings are not set.",footer:s.jsxs(s.Fragment,{children:[s.jsx(M,{small:!0,label:"Edit connection settings",colored:"primary"},"edit-settings"),s.jsx(M,{small:!0,label:"Cancel sync"},"cancel-sync"),","]})};const i=e.bind({});i.args={width:"100%"};const p=e.bind({});p.args={width:"300px"};const d=e.bind({});d.args={maxHeight:"100px",content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. ".repeat(20)};const m=e.bind({});m.args={withDismiss:!0,onClose:()=>{}};var h,T,A;C.parameters={...C.parameters,docs:{...(h=C.parameters)==null?void 0:h.docs,source:{originalSource:`args => {
2
2
  const [_, updateArgs] = useArgs();
3
3
  const handleClose = () => {
4
4
  updateArgs({
@@ -0,0 +1,220 @@
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-Di8hNunM.js";import{B as l}from"./button-VxhoNhrV.js";import{P as te}from"./popover-CzZdWNnB.js";import{I as ne}from"./input-BW9trNAW.js";import{I as ae}from"./input-group-BaRSJAEN.js";import{F as S}from"./field-HrLaMLbx.js";import{M as re}from"./actions-CHgr8eL8.js";import{S as ie}from"./select-C8iu4-uz.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-BHd_uQHh.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-UmZ4Y_CR.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-DIKP56UZ.js";const{useArgs:ge}=__STORYBOOK_MODULE_PREVIEW_API__,qe={title:"Modals/Modal",component:v,args:{visible:!0,centered:!0,width:"300px",heading:"Are you sure?",content:e.jsx(e.Fragment,{children:"This will complete the transaction"}),footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Okay",colored:!0,onClick:()=>{}}),e.jsx(l,{label:"Cancel",onClick:()=>{}})]}),onClose:()=>{}},parameters:{docs:{story:{inline:!1,iframeHeight:400}}}},r=()=>{const[{visible:t,centered:a,...o},n]=ge(),s=()=>{n({visible:!t})};return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,centered:a,children:e.jsx(h,{dialog:{...o,onClose:s}})}),e.jsx(l,{label:"Open Modal",onClick:s})]})},C=r.bind({}),d=r.bind({});d.args={centered:!0};const c=r.bind({});c.args={content:["This is a","new line!"]};const g=r.bind({});g.args={scroll:!0,content:e.jsx("div",{children:"Example modal content goes here lorem ipsum. ".repeat(100)})};const p=r.bind({});p.args={width:"100%",content:e.jsx("div",{children:"Example modal content goes here lorem ipsum. ".repeat(100)})};const m=r.bind({});m.args={contentPadding:0};const u=r.bind({});u.args={content:e.jsxs(e.Fragment,{children:[e.jsx(ce,{text:"Tooltip text",children:"Hover for tooltip"}),e.jsx(de,{}),e.jsx(S,{label:"Custom Select",helpText:"Select an animal",children:e.jsx(ie,{name:"example",options:["Aardvarks","Kangaroos","Monkeys","Possums","Gorilla","Puma","Patagonian Mara","Tarsier","Koala","Panda","Red Panda","Impala","Tiger","Crocodile","Bat"],onChange:()=>{},value:"Monkeys",error:"Bad value"})}),e.jsx(S,{label:"Nested Menu",children:e.jsx(re,{maxHeight:"240px",menu:{label:"Menu",trigger:se.DROP_DOWN_BUTTON,sections:[{type:P.MENU,menu:{trigger:"Text",label:"Children",sections:[...Array(100).keys()].map(()=>({type:"Option",label:Math.random().toString(36).substring(7),onClick:()=>{}}))}},...[...Array(100).keys()].map(()=>({type:P.OPTION,label:Math.random().toString(36).substring(7),onClick:()=>{}}))]}})}),e.jsx(te,{content:e.jsxs(ae,{small:!0,children:[e.jsx(ne,{value:"Value",width:"150px",error:"Bad value"}),e.jsx(l,{colored:!0,label:"Save",onClick:()=>{}}),e.jsx(l,{label:"Cancel",onClick:()=>{}})]}),children:e.jsx(l,{colored:!0,label:"Toggle me",onClick:()=>{}})})]})};const b=()=>{const[t,a]=k.useState(!1),o=()=>{a(!0)},n=()=>{a(!1)},s=()=>{console.log("Submit action"),n()};return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,onEnter:()=>{console.log("Enter"),s()},onEscape:()=>{console.log("Escape"),n()},children:e.jsx(h,{dialog:{heading:"Test key handling",content:e.jsx(ne,{}),footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Done",colored:"red",onClick:s}),e.jsx(l,{label:"Cancel",onClick:n})]}),onClose:n}})}),e.jsx(l,{label:"Open Modal",onClick:o})]})},M=()=>{const[t,a]=k.useState(!1),o=()=>a(!t),[n,s]=k.useState(!1),x=()=>s(!n);return e.jsxs(e.Fragment,{children:[e.jsx(v,{visible:t,children:e.jsx(h,{dialog:{heading:"Modal 1",content:"Lorem ipsum dolor sit amet",footer:e.jsxs(e.Fragment,{children:[e.jsx(l,{label:"Open modal 2",colored:!0,onClick:x}),e.jsx(v,{visible:n,children:e.jsx(h,{dialog:{heading:"Modal 2",content:"Lorem ipsum dolor sit amet",footer:e.jsx(l,{label:"Close",onClick:x}),onClose:x}})}),e.jsx(l,{label:"Close",onClick:o})]}),onClose:o}})}),e.jsx(l,{label:"Open modal 1",onClick:o})]})},i=r.bind({});i.args={testId:"testId"};i.play=async({canvasElement:t,step:a})=>{const o=t.parentElement?le(t.parentElement):null;await j(o).toBeTruthy(),o&&(await a("Modal should appear when triggered",async()=>{const n=o.getByText("Open Modal");await f.click(n);const s=o.getByTestId("testId");await j(s).toBeInTheDocument()}),await a("Modal should disappear when close button pressed",async()=>{const n=o.getByTestId("testId"),s=o.getByTestId("testId-dismiss");await f.click(s),await j(n).not.toBeInTheDocument()}))};b.__docgenInfo={description:"",methods:[],displayName:"KeyHandle"};M.__docgenInfo={description:"",methods:[],displayName:"MultipleModals"};var y,A,B;C.parameters={...C.parameters,docs:{...(y=C.parameters)==null?void 0:y.docs,source:{originalSource:`() => {
2
+ const [{
3
+ visible,
4
+ centered,
5
+ ...dialogProps
6
+ }, updateArgs] = useArgs();
7
+ const toggleModal = () => {
8
+ updateArgs({
9
+ visible: !visible
10
+ });
11
+ };
12
+ return <>
13
+ <Modal visible={visible} centered={centered}>
14
+ <Dialog dialog={{
15
+ ...dialogProps,
16
+ onClose: toggleModal
17
+ }} />
18
+ </Modal>
19
+ <Button label="Open Modal" onClick={toggleModal} />
20
+ </>;
21
+ }`,...(B=(A=C.parameters)==null?void 0:A.docs)==null?void 0:B.source}}};var T,O,D;d.parameters={...d.parameters,docs:{...(T=d.parameters)==null?void 0:T.docs,source:{originalSource:`() => {
22
+ const [{
23
+ visible,
24
+ centered,
25
+ ...dialogProps
26
+ }, updateArgs] = useArgs();
27
+ const toggleModal = () => {
28
+ updateArgs({
29
+ visible: !visible
30
+ });
31
+ };
32
+ return <>
33
+ <Modal visible={visible} centered={centered}>
34
+ <Dialog dialog={{
35
+ ...dialogProps,
36
+ onClose: toggleModal
37
+ }} />
38
+ </Modal>
39
+ <Button label="Open Modal" onClick={toggleModal} />
40
+ </>;
41
+ }`,...(D=(O=d.parameters)==null?void 0:O.docs)==null?void 0:D.source}}};var V,I,E;c.parameters={...c.parameters,docs:{...(V=c.parameters)==null?void 0:V.docs,source:{originalSource:`() => {
42
+ const [{
43
+ visible,
44
+ centered,
45
+ ...dialogProps
46
+ }, updateArgs] = useArgs();
47
+ const toggleModal = () => {
48
+ updateArgs({
49
+ visible: !visible
50
+ });
51
+ };
52
+ return <>
53
+ <Modal visible={visible} centered={centered}>
54
+ <Dialog dialog={{
55
+ ...dialogProps,
56
+ onClose: toggleModal
57
+ }} />
58
+ </Modal>
59
+ <Button label="Open Modal" onClick={toggleModal} />
60
+ </>;
61
+ }`,...(E=(I=c.parameters)==null?void 0:I.docs)==null?void 0:E.source}}};var w,_,F;g.parameters={...g.parameters,docs:{...(w=g.parameters)==null?void 0:w.docs,source:{originalSource:`() => {
62
+ const [{
63
+ visible,
64
+ centered,
65
+ ...dialogProps
66
+ }, updateArgs] = useArgs();
67
+ const toggleModal = () => {
68
+ updateArgs({
69
+ visible: !visible
70
+ });
71
+ };
72
+ return <>
73
+ <Modal visible={visible} centered={centered}>
74
+ <Dialog dialog={{
75
+ ...dialogProps,
76
+ onClose: toggleModal
77
+ }} />
78
+ </Modal>
79
+ <Button label="Open Modal" onClick={toggleModal} />
80
+ </>;
81
+ }`,...(F=(_=g.parameters)==null?void 0:_.docs)==null?void 0:F.source}}};var L,N,H;p.parameters={...p.parameters,docs:{...(L=p.parameters)==null?void 0:L.docs,source:{originalSource:`() => {
82
+ const [{
83
+ visible,
84
+ centered,
85
+ ...dialogProps
86
+ }, updateArgs] = useArgs();
87
+ const toggleModal = () => {
88
+ updateArgs({
89
+ visible: !visible
90
+ });
91
+ };
92
+ return <>
93
+ <Modal visible={visible} centered={centered}>
94
+ <Dialog dialog={{
95
+ ...dialogProps,
96
+ onClose: toggleModal
97
+ }} />
98
+ </Modal>
99
+ <Button label="Open Modal" onClick={toggleModal} />
100
+ </>;
101
+ }`,...(H=(N=p.parameters)==null?void 0:N.docs)==null?void 0:H.source}}};var K,W,R;m.parameters={...m.parameters,docs:{...(K=m.parameters)==null?void 0:K.docs,source:{originalSource:`() => {
102
+ const [{
103
+ visible,
104
+ centered,
105
+ ...dialogProps
106
+ }, updateArgs] = useArgs();
107
+ const toggleModal = () => {
108
+ updateArgs({
109
+ visible: !visible
110
+ });
111
+ };
112
+ return <>
113
+ <Modal visible={visible} centered={centered}>
114
+ <Dialog dialog={{
115
+ ...dialogProps,
116
+ onClose: toggleModal
117
+ }} />
118
+ </Modal>
119
+ <Button label="Open Modal" onClick={toggleModal} />
120
+ </>;
121
+ }`,...(R=(W=m.parameters)==null?void 0:W.docs)==null?void 0:R.source}}};var U,G,Y;u.parameters={...u.parameters,docs:{...(U=u.parameters)==null?void 0:U.docs,source:{originalSource:`() => {
122
+ const [{
123
+ visible,
124
+ centered,
125
+ ...dialogProps
126
+ }, updateArgs] = useArgs();
127
+ const toggleModal = () => {
128
+ updateArgs({
129
+ visible: !visible
130
+ });
131
+ };
132
+ return <>
133
+ <Modal visible={visible} centered={centered}>
134
+ <Dialog dialog={{
135
+ ...dialogProps,
136
+ onClose: toggleModal
137
+ }} />
138
+ </Modal>
139
+ <Button label="Open Modal" onClick={toggleModal} />
140
+ </>;
141
+ }`,...(Y=(G=u.parameters)==null?void 0:G.docs)==null?void 0:Y.source}}};var q,z,J;b.parameters={...b.parameters,docs:{...(q=b.parameters)==null?void 0:q.docs,source:{originalSource:`() => {
142
+ const [visible, setVisible] = useState(false);
143
+ const openModal = () => {
144
+ setVisible(true);
145
+ };
146
+ const closeModal = () => {
147
+ setVisible(false);
148
+ };
149
+ const handleSubmit = () => {
150
+ console.log('Submit action');
151
+ closeModal();
152
+ };
153
+ return <>
154
+ <Modal visible={visible} onEnter={() => {
155
+ console.log('Enter');
156
+ handleSubmit();
157
+ }} onEscape={() => {
158
+ console.log('Escape');
159
+ closeModal();
160
+ }}>
161
+ <Dialog dialog={{
162
+ heading: 'Test key handling',
163
+ content: <Input />,
164
+ footer: <>
165
+ <Button label="Done" colored="red" onClick={handleSubmit} />
166
+ <Button label="Cancel" onClick={closeModal} />
167
+ </>,
168
+ onClose: closeModal
169
+ }} />
170
+ </Modal>
171
+ <Button label="Open Modal" onClick={openModal} />
172
+ </>;
173
+ }`,...(J=(z=b.parameters)==null?void 0:z.docs)==null?void 0:J.source}}};var Q,X,Z;M.parameters={...M.parameters,docs:{...(Q=M.parameters)==null?void 0:Q.docs,source:{originalSource:`() => {
174
+ const [visible1, setVisible1] = useState(false);
175
+ const toggleVisible1 = () => setVisible1(!visible1);
176
+ const [visible2, setVisible2] = useState(false);
177
+ const toggleVisible2 = () => setVisible2(!visible2);
178
+ return <>
179
+ <Modal visible={visible1}>
180
+ <Dialog dialog={{
181
+ heading: 'Modal 1',
182
+ content: 'Lorem ipsum dolor sit amet',
183
+ footer: <>
184
+ <Button label="Open modal 2" colored onClick={toggleVisible2} />
185
+ <Modal visible={visible2}>
186
+ <Dialog dialog={{
187
+ heading: 'Modal 2',
188
+ content: 'Lorem ipsum dolor sit amet',
189
+ footer: <Button label="Close" onClick={toggleVisible2} />,
190
+ onClose: toggleVisible2
191
+ }} />
192
+ </Modal>
193
+ <Button label="Close" onClick={toggleVisible1} />
194
+ </>,
195
+ onClose: toggleVisible1
196
+ }} />
197
+ </Modal>
198
+ <Button label="Open modal 1" onClick={toggleVisible1} />
199
+ </>;
200
+ }`,...(Z=(X=M.parameters)==null?void 0:X.docs)==null?void 0:Z.source}}};var $,ee,oe;i.parameters={...i.parameters,docs:{...($=i.parameters)==null?void 0:$.docs,source:{originalSource:`() => {
201
+ const [{
202
+ visible,
203
+ centered,
204
+ ...dialogProps
205
+ }, updateArgs] = useArgs();
206
+ const toggleModal = () => {
207
+ updateArgs({
208
+ visible: !visible
209
+ });
210
+ };
211
+ return <>
212
+ <Modal visible={visible} centered={centered}>
213
+ <Dialog dialog={{
214
+ ...dialogProps,
215
+ onClose: toggleModal
216
+ }} />
217
+ </Modal>
218
+ <Button label="Open Modal" onClick={toggleModal} />
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};
@@ -0,0 +1,110 @@
1
+ import{j as p}from"./jsx-runtime-eps93zm2.js";import{r as de}from"./index-DhsZuJvc.js";import{w as D,u as e,e as u,f as me}from"./index-DMAnyMX5.js";import{d as he}from"./index-CWz-hU-f.js";import{N as A}from"./number-input-uQOVHv2N.js";import{I as ve}from"./input-group-BaRSJAEN.js";import{I as Ie}from"./input-group-addon-D68iUKV2.js";import{S as ye}from"./select-C8iu4-uz.js";import"./index-CF7H4eMJ.js";import"./index-DRSy5Ssd.js";import"./lodash-BHd_uQHh.js";import"./input-BW9trNAW.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./types-UmZ4Y_CR.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./common-types-Sih75Sav.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-CHgr8eL8.js";import"./button-VxhoNhrV.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./badge-CLQ59MDF.js";import"./select.input-DIKP56UZ.js";const{useArgs:Ce}=__STORYBOOK_MODULE_PREVIEW_API__,Xe={title:"Forms/NumberInput",component:A,parameters:{canvas:{page:null}},args:{label:"Label"}},s=n=>{const[r,a]=Ce(),o=t=>{a({value:t.target.value})};return p.jsx(A,{onChange:o,value:123,...n})},T=s.bind({}),c=s.bind({});c.args={small:!0};const g=s.bind({});g.args={width:"150px"};const d=s.bind({});d.args={left:!0};const m=s.bind({});m.args={disabled:!0};const h=s.bind({});h.args={allowEmpty:!0,value:""};const v=s.bind({});v.args={warning:"This input number is almost 100!",value:"99"};const I=s.bind({});I.args={error:"This is a error message"};const y=s.bind({});y.args={value:"123test"};const C=s.bind({});C.args={value:"123.123456789",enableDisplayRounding:!0};const w=s.bind({});w.args={value:"123.123456789",enableDisplayRounding:!0,roundDisplayValue:n=>he.roundToFixed(n,4)};const b=()=>p.jsxs(ve,{small:!0,children:[p.jsx(A,{value:123}),p.jsx(Ie,{children:"to"}),p.jsx(A,{value:123}),p.jsx(ye,{options:[{value:"units",label:"units"}],width:"auto",value:"units"})]}),l=s.bind({});l.args={testId:"testId",enableDisplayRounding:!0};l.play=async({canvasElement:n,step:r})=>{const a=D(n);await r("Value should be rounded on blur",async()=>{const o=a.getByTestId("testId");await e.clear(o),await e.type(o,"123.123456789"),await e.click(n),await u(a.getByDisplayValue("123.12")).toBeInTheDocument()}),await r("Full value shown on focus",async()=>{const o=a.getByTestId("testId");await e.click(o),await u(a.getByDisplayValue("123.123456789")).toBeInTheDocument()})};const i=()=>{const[n,r]=de.useState("123");return p.jsx(A,{value:n,onChange:a=>{r(a.target.value)},testId:"testId"})};i.play=async({canvasElement:n,step:r})=>{const a=D(n),o=D(n.ownerDocument.body);await r("Can enter decimal values",async()=>{const t=a.getByTestId("testId");await e.clear(t),await e.type(t,"123.123456789"),await e.click(n),await u(a.getByDisplayValue("123.123456789")).toBeInTheDocument()}),await r("Can enter scientific notation",async()=>{const t=a.getByTestId("testId");await e.clear(t),await e.type(t,"-1.12e3"),await e.click(n),await u(a.getByDisplayValue("-1.12e3")).toBeInTheDocument()}),await r("Can enter comma decimals (converts to dot)",async()=>{const t=a.getByTestId("testId");await e.clear(t),await e.type(t,"123,456"),await e.click(n),await u(a.getByDisplayValue("123.456")).toBeInTheDocument()}),await r("Can enter small numbers",async()=>{const t=a.getByTestId("testId");await e.clear(t),await e.type(t,"0.0000000023"),await e.click(n),await u(a.getByDisplayValue("0.0000000023")).toBeInTheDocument()}),await r("Can enter large numbers",async()=>{const t=a.getByTestId("testId");await e.clear(t),await e.type(t,"999999999999"),await e.click(n),await u(a.getByDisplayValue("999999999999")).toBeInTheDocument()}),await r("Shows validation error for non-numeric input",async()=>{const t=a.getByTestId("testId");await e.clear(t),await e.type(t,"123x45s6"),await e.click(n),await u(a.getByDisplayValue("123x45s6")).toBeInTheDocument(),await me.mouseOver(t),await u(o.getByText("Must be a numerical value")).toBeInTheDocument()})};b.__docgenInfo={description:"",methods:[],displayName:"TestInputGroup"};i.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestUserInput"};var E,B,_;T.parameters={...T.parameters,docs:{...(E=T.parameters)==null?void 0:E.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
+ }`,...(_=(B=T.parameters)==null?void 0:B.docs)==null?void 0:_.source}}};var f,S,N;c.parameters={...c.parameters,docs:{...(f=c.parameters)==null?void 0:f.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
+ }`,...(N=(S=c.parameters)==null?void 0:S.docs)==null?void 0:N.source}}};var x,L,M;g.parameters={...g.parameters,docs:{...(x=g.parameters)==null?void 0:x.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
+ }`,...(M=(L=g.parameters)==null?void 0:L.docs)==null?void 0:M.source}}};var V,H,R;d.parameters={...d.parameters,docs:{...(V=d.parameters)==null?void 0:V.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
+ }`,...(R=(H=d.parameters)==null?void 0:H.docs)==null?void 0:R.source}}};var j,k,G;m.parameters={...m.parameters,docs:{...(j=m.parameters)==null?void 0:j.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
+ }`,...(G=(k=m.parameters)==null?void 0:k.docs)==null?void 0:G.source}}};var W,O,U;h.parameters={...h.parameters,docs:{...(W=h.parameters)==null?void 0:W.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
+ }`,...(U=(O=h.parameters)==null?void 0:O.docs)==null?void 0:U.source}}};var F,P,K;v.parameters={...v.parameters,docs:{...(F=v.parameters)==null?void 0:F.docs,source:{originalSource:`args => {
50
+ const [_, updateArgs] = useArgs();
51
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
52
+ updateArgs({
53
+ value: evt.target.value
54
+ });
55
+ };
56
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
57
+ }`,...(K=(P=v.parameters)==null?void 0:P.docs)==null?void 0:K.source}}};var Y,q,z;I.parameters={...I.parameters,docs:{...(Y=I.parameters)==null?void 0:Y.docs,source:{originalSource:`args => {
58
+ const [_, updateArgs] = useArgs();
59
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
60
+ updateArgs({
61
+ value: evt.target.value
62
+ });
63
+ };
64
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
65
+ }`,...(z=(q=I.parameters)==null?void 0:q.docs)==null?void 0:z.source}}};var J,Q,X;y.parameters={...y.parameters,docs:{...(J=y.parameters)==null?void 0:J.docs,source:{originalSource:`args => {
66
+ const [_, updateArgs] = useArgs();
67
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
68
+ updateArgs({
69
+ value: evt.target.value
70
+ });
71
+ };
72
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
73
+ }`,...(X=(Q=y.parameters)==null?void 0:Q.docs)==null?void 0:X.source}}};var Z,$,ee;C.parameters={...C.parameters,docs:{...(Z=C.parameters)==null?void 0:Z.docs,source:{originalSource:`args => {
74
+ const [_, updateArgs] = useArgs();
75
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
76
+ updateArgs({
77
+ value: evt.target.value
78
+ });
79
+ };
80
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
81
+ }`,...(ee=($=C.parameters)==null?void 0:$.docs)==null?void 0:ee.source}}};var ae,te,ne;w.parameters={...w.parameters,docs:{...(ae=w.parameters)==null?void 0:ae.docs,source:{originalSource:`args => {
82
+ const [_, updateArgs] = useArgs();
83
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
84
+ updateArgs({
85
+ value: evt.target.value
86
+ });
87
+ };
88
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
89
+ }`,...(ne=(te=w.parameters)==null?void 0:te.docs)==null?void 0:ne.source}}};var re,se,ue;b.parameters={...b.parameters,docs:{...(re=b.parameters)==null?void 0:re.docs,source:{originalSource:`() => <InputGroup small>
90
+ <NumberInput value={123} />
91
+ <InputGroupAddon>to</InputGroupAddon>
92
+ <NumberInput value={123} />
93
+ <Select options={[{
94
+ value: 'units',
95
+ label: 'units'
96
+ }]} width="auto" value="units" />
97
+ </InputGroup>`,...(ue=(se=b.parameters)==null?void 0:se.docs)==null?void 0:ue.source}}};var oe,pe,le;l.parameters={...l.parameters,docs:{...(oe=l.parameters)==null?void 0:oe.docs,source:{originalSource:`args => {
98
+ const [_, updateArgs] = useArgs();
99
+ const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
100
+ updateArgs({
101
+ value: evt.target.value
102
+ });
103
+ };
104
+ return <NumberInput onChange={handleChange} value={123} {...args} />;
105
+ }`,...(le=(pe=l.parameters)==null?void 0:pe.docs)==null?void 0:le.source}}};var ie,ce,ge;i.parameters={...i.parameters,docs:{...(ie=i.parameters)==null?void 0:ie.docs,source:{originalSource:`() => {
106
+ const [value, setValue] = useState('123');
107
+ return <NumberInput value={value} onChange={evt => {
108
+ setValue(evt.target.value);
109
+ }} testId="testId" />;
110
+ }`,...(ge=(ce=i.parameters)==null?void 0:ce.docs)==null?void 0:ge.source}}};const Ze=["Default","Small","Width","Left","Disabled","AllowEmpty","Warning","Error","BadInput","WithDisplayRounding","WithCustomDisplayRounding","TestInputGroup","TestDisplayRounding","TestUserInput"];export{h as AllowEmpty,y as BadInput,T as Default,m as Disabled,I as Error,d as Left,c as Small,l as TestDisplayRounding,b as TestInputGroup,i as TestUserInput,v as Warning,g as Width,w as WithCustomDisplayRounding,C as WithDisplayRounding,Ze as __namedExportsOrder,Xe 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-DCGYYCUT.js";import"./index-DhsZuJvc.js";import"./iframe-CgUc-Ukp.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-Dx_aqqZM.js";import"./index-DhsZuJvc.js";import"./iframe-0oHxQxyh.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."}),`