@oliasoft-open-source/react-ui-library 4.10.0-beta-1 → 4.10.1-beta-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/index.js +117 -174
  2. package/dist/index.js.map +1 -1
  3. package/dist/storybook/assets/{Color-KGDBMAHA-Bn4yyV9u.js → Color-KGDBMAHA-DlQqI8Tk.js} +1 -1
  4. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-BUBqlKwY.js → DocsRenderer-PKQXORMH-C-eDrY_1.js} +1 -1
  5. package/dist/storybook/assets/{accordion.stories-kLk1OtZZ.js → accordion.stories-DYWwH-nb.js} +1 -1
  6. package/dist/storybook/assets/{buttons-and-links-a_IVrxwj.js → buttons-and-links-wb-Y9p6x.js} +1 -1
  7. package/dist/storybook/assets/{casing-loads.stories-B2lND_PU.js → casing-loads.stories-CS3UEFRb.js} +1 -1
  8. package/dist/storybook/assets/{cell.stories-BVDrv2SU.js → cell.stories-DC0iukzz.js} +1 -1
  9. package/dist/storybook/assets/{chunk-HLWAVYOI-kpZZkSeH.js → chunk-HLWAVYOI-Lxbmzwgp.js} +1 -1
  10. package/dist/storybook/assets/{color-Cbf9UrQO.js → color-I4_Y9LFJ.js} +1 -1
  11. package/dist/storybook/assets/{footer.stories-BVXSVjq1.js → footer.stories-BGebD8DA.js} +1 -1
  12. package/dist/storybook/assets/{formation.stories-DmecxRaM.js → formation.stories-CSRmoL6O.js} +1 -1
  13. package/dist/storybook/assets/{iframe-DO2I_nJe.js → iframe-DG9U1Bn6.js} +2 -2
  14. package/dist/storybook/assets/{index-Nykkb-Z-.js → index-CINwEN_P.js} +1 -1
  15. package/dist/storybook/assets/{index-CP-qN_yN.js → index-Cfibu2ua.js} +4 -4
  16. package/dist/storybook/assets/{input-validation-51gQ2ORg.js → input-validation-B5UoupeG.js} +1 -1
  17. package/dist/storybook/assets/{inputs-CPKM4uZ6.js → inputs-ChYYqRCq.js} +1 -1
  18. package/dist/storybook/assets/{layout-forms-C9pc1r5D.js → layout-forms-P7QfwIXF.js} +1 -1
  19. package/dist/storybook/assets/{layout-general-Dks_ONKw.js → layout-general-CiIRqFmO.js} +1 -1
  20. package/dist/storybook/assets/{number-input-DBZIl9dz.js → number-input-B25TXDQC.js} +2 -2
  21. package/dist/storybook/assets/{number-input.stories-CqTYNX8G.js → number-input.stories-rcGMdz-Y.js} +6 -6
  22. package/dist/storybook/assets/{padding-and-spacing-Bki_uuMD.js → padding-and-spacing-BxAEU1k1.js} +1 -1
  23. package/dist/storybook/assets/{preview-DGoeP-Zy.js → preview-AQiRsl0e.js} +2 -2
  24. package/dist/storybook/assets/{preview-yquX1adV.js → preview-DyPtloVR.js} +1 -1
  25. package/dist/storybook/assets/{rich-text-input.stories-hAHCnDHk.js → rich-text-input.stories-DkaOBgbE.js} +46 -46
  26. package/dist/storybook/assets/{row.stories-BO2s7oph.js → row.stories-C6aRnuL5.js} +1 -1
  27. package/dist/storybook/assets/{table-CB6btQu9.js → table-Dh7Es_V6.js} +1 -1
  28. package/dist/storybook/assets/{table.stories-CvHvaYMC.js → table.stories-BsPbkctl.js} +1 -1
  29. package/dist/storybook/assets/{title.stories-DYXG2_x-.js → title.stories-wr63QEGT.js} +1 -1
  30. package/dist/storybook/assets/unit-input.stories-Dq7teE0t.js +403 -0
  31. package/dist/storybook/assets/{unit-table.stories-DiER-CMn.js → unit-table.stories-CbAekNaE.js} +1 -1
  32. package/dist/storybook/iframe.html +1 -1
  33. package/dist/storybook/index.json +1 -1
  34. package/dist/storybook/project.json +1 -1
  35. package/dist/storybook/sb-manager/globals-runtime.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/storybook/assets/unit-input.stories-DRP-nDdh.js +0 -380
@@ -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-CP-qN_yN.js";import{NonExistentValue as a,Error as l}from"./select.stories-B9w9ONzj.js";import"./index-DhsZuJvc.js";import"./iframe-DO2I_nJe.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-Cfibu2ua.js";import{NonExistentValue as a,Error as l}from"./select.stories-B9w9ONzj.js";import"./index-DhsZuJvc.js";import"./iframe-DG9U1Bn6.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"}),`
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"}),`
@@ -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-CP-qN_yN.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-CqTYNX8G.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-DO2I_nJe.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-DBZIl9dz.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-Cfibu2ua.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-rcGMdz-Y.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-DG9U1Bn6.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-B25TXDQC.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"}),`
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,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-CP-qN_yN.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-DO2I_nJe.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-Cfibu2ua.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-DG9U1Bn6.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)"}),`
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-CP-qN_yN.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-DO2I_nJe.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-Cfibu2ua.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-DG9U1Bn6.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 I}from"./jsx-runtime-eps93zm2.js";import{r as a}from"./index-DhsZuJvc.js";import{d as r}from"./index-C0x1JmaP.js";import{K as Q,E as X}from"./select-DnRuRG_N.js";import{l as Y}from"./lodash-c4VUpsOs.js";import{I as $}from"./input-DTXbDJaL.js";const ee=14,ne=n=>r.isScientificStringNum(n)?n:r.roundToPrecision(n,ee),d=n=>String(r.toString(n)),te=n=>n?typeof n=="string"?n:Y.isArray(n)?n[0]:n.fieldName:"",ae=({name:n,placeholder:g="",disabled:h=!1,error:y=!1,left:S=!1,small:F=!1,width:C="100%",value:p="",onChange:L=()=>{},onFocus:R=()=>{},onBlur:k=()=>{},tabIndex:x=0,testId:j,tooltip:M=null,warning:H=!1,validationCallback:v=()=>{},allowEmpty:O=!1,isInTable:_,groupOrder:A,enableCosmeticRounding:T=!0,enableDisplayRounding:f=!1,roundDisplayValue:b,disableInternalErrorValidationMessages:K=!1})=>{const s=a.useRef(null),[i,E]=a.useState(d(p)),[l,w]=a.useState(!1),[P,q]=a.useState(!0),o=te(n),B=e=>{const t=r.validateNumber(e);return O&&e===""||t.valid?{...t,valid:!0,errors:void 0}:t},{valid:m,errors:c}=B(i),N=c&&c.length&&!K?c[0]:null;a.useEffect(()=>{E(d(p)),q(!0)},[p,T,f]),a.useEffect(()=>{!l&&!m?v(o,N):v(o,null)},[l,m,y]);const V=e=>{if(m&&!P){const t={...e,target:{...e.target,value:r.stripLeadingZeros(d(i)),name:o}};L(t)}},D=e=>{const t=e.target,{value:z}=t,J=r.cleanNumStr(z.replaceAll(" ","").replaceAll("|",""));E(J),q(!1)};a.useEffect(()=>{if(s&&(s!=null&&s.current)&&f&&l){const e=s.current;e&&setTimeout(()=>{const{length:t}=d(i);e.setSelectionRange(t,t)},0)}},[l]);const U=e=>{w(!0),R(e)},W=e=>{w(!1),V(e),k(e)},u=f&&!l&&m?b?d(b(i)):r.roundToFixed(i,2):i,Z=!!(u!=null&&u.endsWith("0")),G=T&&u&&!Z&&m?ne(u):u;return I.jsx(Q,{handleKeys:[X.ENTER],onKeyEvent:(e,t)=>V(t),children:I.jsx($,{type:"text",name:o,testId:j,disabled:h,placeholder:g,value:G,onChange:D,onFocus:U,onBlur:W,error:!l&&(N||y),warning:H,right:!S,small:F,width:C,isInTable:_,groupOrder:A,tabIndex:x,tooltip:M,ref:s},o)})};ae.__docgenInfo={description:"",methods:[],displayName:"NumberInput",props:{name:{required:!1,tsType:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},description:""},placeholder:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"''",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}]},description:"",defaultValue:{value:"false",computed:!1}},left:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},width:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"'100%'",computed:!1}},value:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"''",computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
1
+ import{j as R}from"./jsx-runtime-eps93zm2.js";import{r as l}from"./index-DhsZuJvc.js";import{d as a}from"./index-C0x1JmaP.js";import{K as z,E as J}from"./select-DnRuRG_N.js";import{l as Q}from"./lodash-c4VUpsOs.js";import{I as X}from"./input-DTXbDJaL.js";const Y=14,r=n=>String(a.toString(n)),$=n=>a.isScientificStringNum(n)?n:r(a.roundToPrecision(a.toNum(n),Y)),ee=n=>n?typeof n=="string"?n:Q.isArray(n)?n[0]:n.fieldName:"",ne=({name:n,placeholder:b="",disabled:S=!1,error:E=!1,left:C=!1,small:L=!1,width:k="100%",value:f="",onChange:x=()=>{},onFocus:j=()=>{},onBlur:M=()=>{},tabIndex:H=0,testId:O,tooltip:K=null,warning:_=!1,validationCallback:w=()=>{},allowEmpty:A=!1,isInTable:D,groupOrder:P,enableCosmeticRounding:q=!0,enableDisplayRounding:c=!1,roundDisplayValue:N,disableInternalErrorValidationMessages:W=!1})=>{const g=e=>{const t=a.validateNumber(e);return A&&e===""||t.valid?{...t,valid:!0,errors:void 0}:t},V=e=>{var m;const t=!!(e!=null&&e.endsWith("0")),p=q&&e&&!t&&((m=g(e))==null?void 0:m.valid)?$(e):e;return r(p)},s=l.useRef(null),[i,h]=l.useState(V(r(f))),[u,I]=l.useState(!1),o=ee(n),{valid:y,errors:v}=g(i),F=v&&v.length&&!W?v[0]:null;l.useEffect(()=>{h(V(r(f)))},[f,q,c]),l.useEffect(()=>{!u&&!y?w(o,F):w(o,null)},[u,y,E]);const T=e=>{var p,m;const t=e instanceof KeyboardEvent?i:(p=e==null?void 0:e.target)==null?void 0:p.value,d=a.cleanNumStr(t.replaceAll(" ","").replaceAll("|",""));if(h(d),(m=g(d))!=null&&m.valid){const G={...e,target:{...e.target,value:a.stripLeadingZeros(r(d)),name:o}};x(G)}};l.useEffect(()=>{if(s&&(s!=null&&s.current)&&c&&u){const e=s.current;e&&setTimeout(()=>{const{length:t}=r(i);e.setSelectionRange(t,t)},0)}},[u]);const B=e=>{I(!0),j(e)},U=e=>{I(!1),T(e),M(e)},Z=c&&!u&&y?N?r(N(i)):a.roundToFixed(i,2):i;return R.jsx(z,{handleKeys:[J.ENTER],onKeyEvent:(e,t)=>T(t),children:R.jsx(X,{type:"text",name:o,testId:O,disabled:S,placeholder:b,value:Z,onChange:T,onFocus:B,onBlur:U,error:F||E,warning:_,right:!C,small:L,width:k,isInTable:D,groupOrder:P,tabIndex:H,tooltip:K,ref:s},o)})};ne.__docgenInfo={description:"",methods:[],displayName:"NumberInput",props:{name:{required:!1,tsType:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},description:""},placeholder:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"''",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}]},description:"",defaultValue:{value:"false",computed:!1}},left:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},width:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"'100%'",computed:!1}},value:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:"",defaultValue:{value:"''",computed:!1}},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
2
2
  event: TChangeEvent<T>,
3
3
  ...additionalProps: { [key: string]: any }[]
4
4
  ) => void`,signature:{arguments:[{type:{name:"intersection",raw:`ChangeEvent<T> & {
@@ -13,4 +13,4 @@ import{j as I}from"./jsx-runtime-eps93zm2.js";import{r as a}from"./index-DhsZuJv
13
13
  | { name: string; value: any; label?: string; files?: FileList | null }`,elements:[{name:"T"},{name:"signature",type:"object",raw:"{ name: string; value: any; label?: string; files?: FileList | null }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"value",value:{name:"any",required:!0}},{key:"label",value:{name:"string",required:!1}},{key:"files",value:{name:"union",raw:"FileList | null",elements:[{name:"FileList"},{name:"null"}],required:!1}}]}}],required:!0}}]}}]},name:"event"},{type:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ [key: string]: any }",signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}}],raw:"{ [key: string]: any }[]"},name:"additionalProps",rest:!0}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: FocusEvent<HTMLInputElement>) => void",signature:{arguments:[{type:{name:"FocusEvent",elements:[{name:"HTMLInputElement"}],raw:"FocusEvent<HTMLInputElement>"},name:"evt"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: FocusEvent<HTMLInputElement>) => void",signature:{arguments:[{type:{name:"FocusEvent",elements:[{name:"HTMLInputElement"}],raw:"FocusEvent<HTMLInputElement>"},name:"evt"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},tabIndex:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},testId:{required:!1,tsType:{name:"string"},description:""},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"}]},description:"",defaultValue:{value:"null",computed:!1}},warning:{required:!1,tsType:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}]},description:"",defaultValue:{value:"false",computed:!1}},validationCallback:{required:!1,tsType:{name:"signature",type:"function",raw:`(
14
14
  name: string | { fieldName: string },
15
15
  error: string | null,
16
- ) => void`,signature:{arguments:[{type:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},name:"name"},{type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},name:"error"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},allowEmpty:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},isInTable:{required:!1,tsType:{name:"boolean"},description:""},groupOrder:{required:!1,tsType:{name:"any"},description:""},enableCosmeticRounding:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},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{ae as N,ne as r};
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:""},enableCosmeticRounding:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},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{ne as N,$ as r};
@@ -1,4 +1,4 @@
1
- import{j as r}from"./jsx-runtime-eps93zm2.js";import{r as c}from"./index-DhsZuJvc.js";import{w as d,u as t,e as o,f as j,a as M}from"./index-DMAnyMX5.js";import{d as We}from"./index-C0x1JmaP.js";import{S as N}from"./spacer-BWoNR27H.js";import{G as He}from"./grid-DRkC-bt8.js";import{C as g}from"./card-EcjmryU9.js";import{B as Fe}from"./button-DHevvVBE.js";import{H as m}from"./heading-CRNoBc7q.js";import{I as Oe}from"./input-group-addon-D68iUKV2.js";import{S as Pe}from"./select-DnRuRG_N.js";import{I as Ue}from"./input-group-BaRSJAEN.js";import{F}from"./field-HrLaMLbx.js";import{T as L}from"./toggle-BbFVf61v.js";import{T as qe}from"./text-B3-TSWok.js";import{M as Ke}from"./message-Y48EomV-.js";import{N as i}from"./number-input-DBZIl9dz.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"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-D-uVCDzk.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./label-CqmyC9he.js";import"./input-DTXbDJaL.js";const{useArgs:Ye}=__STORYBOOK_MODULE_PREVIEW_API__,Ma={title:"Forms/NumberInput",component:i,parameters:{canvas:{page:null}},args:{label:"Label"}},l=n=>{const[s,a]=Ye(),u=e=>{a({value:e.target.value})};return r.jsx(i,{onChange:u,value:123,...n})},A=l.bind({}),b=l.bind({});b.args={small:!0};const C=l.bind({});C.args={width:"150px"};const w=l.bind({});w.args={left:!0};const T=l.bind({});T.args={disabled:!0};const f=l.bind({});f.args={allowEmpty:!0,value:""};const h=()=>{const[n,s]=c.useState("123|m");return r.jsx(i,{name:"example",onChange:a=>s(a.target.value),placeholder:"Type a value...",value:n,testId:"testId"})};h.play=async({canvasElement:n,step:s})=>{const a=d(n),u=d(n.ownerDocument.body);await s("Shows validation error for non-numeric input",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"123x45s6"),await t.click(n),await o(a.getByDisplayValue("123x45s6")).toBeInTheDocument(),await j.mouseOver(e),await M(()=>{o(u.getByText("Must be a numerical value")).toBeInTheDocument()})})};const x=l.bind({});x.args={warning:"This input number is almost 100!",value:"99"};const B=l.bind({});B.args={error:"This is a error message"};const D=l.bind({});D.args={value:"123test"};const S=l.bind({});S.args={value:"123.123456789",enableDisplayRounding:!0};const E=l.bind({});E.args={value:"123.123456789",enableDisplayRounding:!0,roundDisplayValue:n=>We.roundToFixed(n,4)};const V=()=>r.jsxs(Ue,{small:!0,children:[r.jsx(i,{value:123}),r.jsx(Oe,{children:"to"}),r.jsx(i,{value:123}),r.jsx(Pe,{options:[{value:"units",label:"units"}],width:"auto",value:"units"})]}),v=()=>{const[n,s]=c.useState("123");return r.jsx(i,{value:n,onChange:a=>{s(a.target.value)},testId:"testId",enableDisplayRounding:!0})};v.play=async({canvasElement:n,step:s})=>{const a=d(n);await s("Value should be rounded on blur",async()=>{const u=a.getByTestId("testId");await t.clear(u),await t.type(u,"123.123456789"),await t.click(n),await o(a.getByDisplayValue("123.12")).toBeInTheDocument()}),await s("Full value shown on focus",async()=>{const u=a.getByTestId("testId");await t.click(u),await o(a.getByDisplayValue("123.123456789")).toBeInTheDocument()})};const k=()=>{const[n,s]=c.useState("123");return r.jsxs(He,{columns:"1fr 1fr",gap:!0,children:[r.jsxs(g,{heading:r.jsx(m,{children:"Storage State (Redux)"}),children:[n,r.jsx(N,{}),r.jsx(Fe,{label:"Change value",onClick:()=>s(String(Math.floor(Math.random()*100)))})]}),r.jsx(g,{heading:r.jsx(m,{children:"NumberInput"}),children:r.jsx(i,{value:n,onChange:a=>{s(a.target.value)},error:Number(n)>=0?"":"Value must be positive"})})]})},y=()=>{const[n,s]=c.useState(!1),[a,u]=c.useState(!0),[e,_]=c.useState("0.6889763779527558"),[H,Le]=c.useState(""),Ge=Number(e)*.3048;return r.jsxs(He,{columns:"1fr 1fr",gap:!0,children:[r.jsxs(g,{heading:r.jsx(m,{children:"Settings"}),children:[r.jsx(F,{label:"Enable display rounding:",labelLeft:!0,labelWidth:200,children:r.jsx(L,{checked:n,onChange:p=>s(p.target.checked)})}),r.jsx(F,{label:"Enable cosmetic rounding:",labelLeft:!0,labelWidth:200,children:r.jsx(L,{checked:a,onChange:p=>u(p.target.checked)})})]}),r.jsxs(g,{heading:r.jsx(m,{children:"NumberInput (displayed in Meters)"}),children:[r.jsx(qe,{faint:!0,children:"Cosmetic Rounding Test Cases: type 0.21 then return (compare with enableCosmeticRounding on and off)"}),r.jsx(N,{}),r.jsx(i,{name:"Example",value:Ge,onChange:p=>{const R=String(Number(p.target.value)/.3048);_(R)},enableDisplayRounding:n,enableCosmeticRounding:a,error:Number(e)>=0?"":"Value must be positive",validationCallback:(p,R)=>{Le(R??"")},testId:"testId"})]}),r.jsxs(g,{heading:r.jsx(m,{children:"Storage State / Redux (stored in Feet)"}),children:[e,r.jsx(N,{}),r.jsx(Fe,{label:"Change value",onClick:()=>_(String(Math.floor(Math.random()*100)))})]}),r.jsx(g,{heading:r.jsx(m,{children:"Test Validation Callback"}),children:H&&r.jsx(Ke,{message:{content:H,icon:!0,type:"Error",visible:!0}})})]})};y.play=async({canvasElement:n,step:s})=>{const a=d(n),u=d(n.ownerDocument.body);await s("Can enter decimal values",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"123.123456789"),await t.click(n),await o(a.getByDisplayValue("123.123456789")).toBeInTheDocument()}),await s("Cannot enter scientific notation when storage unit is different (expected)",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"-1.12e3"),await t.click(n),await o(a.getByDisplayValue("-1120")).toBeInTheDocument()}),await s("Can enter comma decimals (converts to dot)",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"123,456"),await t.click(n),await o(a.getByDisplayValue("123.456")).toBeInTheDocument()}),await s("Can enter small numbers",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"0.0000000023"),await t.click(n),await o(a.getByDisplayValue("0.0000000023")).toBeInTheDocument()}),await s("Can enter large numbers",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"999999999999"),await t.click(n),await o(a.getByDisplayValue("999999999999")).toBeInTheDocument()}),await s("Shows validation error for non-numeric input",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"123x45s6"),await t.click(n),await o(a.getByDisplayValue("123x45s6")).toBeInTheDocument(),await j.mouseOver(e),await M(()=>{o(u.getAllByText("Must be a numerical value").length).toEqual(2)})})};const I=()=>{const[n,s]=c.useState("123");return r.jsx(i,{value:n,onChange:a=>{s(a.target.value)},testId:"testId"})};I.play=async({canvasElement:n,step:s})=>{const a=d(n),u=d(n.ownerDocument.body);await s("Can enter decimal values",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"123.123456789"),await t.click(n),await o(a.getByDisplayValue("123.123456789")).toBeInTheDocument()}),await s("Can enter scientific notation",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"-1.12e3"),await t.click(n),await o(a.getByDisplayValue("-1.12e3")).toBeInTheDocument()}),await s("Can enter comma decimals (converts to dot)",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"123,456"),await t.click(n),await o(a.getByDisplayValue("123.456")).toBeInTheDocument()}),await s("Can enter small numbers",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"0.0000000023"),await t.click(n),await o(a.getByDisplayValue("0.0000000023")).toBeInTheDocument()}),await s("Can enter large numbers",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"999999999999"),await t.click(n),await o(a.getByDisplayValue("999999999999")).toBeInTheDocument()}),await s("Shows validation error for non-numeric input",async()=>{const e=a.getByTestId("testId");await t.clear(e),await t.type(e,"123x45s6"),await t.click(n),await o(a.getByDisplayValue("123x45s6")).toBeInTheDocument(),await j.mouseOver(e),await M(()=>{o(u.getByText("Must be a numerical value")).toBeInTheDocument()})})};h.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"Placeholder"};V.__docgenInfo={description:"",methods:[],displayName:"TestInputGroup"};v.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestDisplayRounding"};k.__docgenInfo={description:"",methods:[],displayName:"ManagedTestCase"};y.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"DemoCosmeticRounding"};I.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestUserInput"};var G,W,O;A.parameters={...A.parameters,docs:{...(G=A.parameters)==null?void 0:G.docs,source:{originalSource:`args => {
1
+ import{j as t}from"./jsx-runtime-eps93zm2.js";import{r as c}from"./index-DhsZuJvc.js";import{w as d,u as n,e as o,f as M,a as _}from"./index-DMAnyMX5.js";import{d as We}from"./index-C0x1JmaP.js";import{S as j}from"./spacer-BWoNR27H.js";import{G as He}from"./grid-DRkC-bt8.js";import{C as g}from"./card-EcjmryU9.js";import{B as Fe}from"./button-DHevvVBE.js";import{H as m}from"./heading-CRNoBc7q.js";import{I as Oe}from"./input-group-addon-D68iUKV2.js";import{S as Pe}from"./select-DnRuRG_N.js";import{I as Ue}from"./input-group-BaRSJAEN.js";import{F}from"./field-HrLaMLbx.js";import{T as L}from"./toggle-BbFVf61v.js";import{T as qe}from"./text-B3-TSWok.js";import{M as Ke}from"./message-Y48EomV-.js";import{N as i}from"./number-input-B25TXDQC.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"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./actions-D-uVCDzk.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./label-CqmyC9he.js";import"./input-DTXbDJaL.js";const{useArgs:Ye}=__STORYBOOK_MODULE_PREVIEW_API__,_a={title:"Forms/NumberInput",component:i,parameters:{canvas:{page:null}},args:{label:"Label"}},l=r=>{const[s,a]=Ye(),u=e=>{a({value:e.target.value})};return t.jsx(i,{onChange:u,value:123,...r})},R=l.bind({}),b=l.bind({});b.args={small:!0};const C=l.bind({});C.args={width:"150px"};const w=l.bind({});w.args={left:!0};const T=l.bind({});T.args={disabled:!0};const f=l.bind({});f.args={allowEmpty:!0,value:""};const h=()=>{const[r,s]=c.useState("123|m");return t.jsx(i,{name:"example",onChange:a=>s(a.target.value),placeholder:"Type a value...",value:r,testId:"testId"})};h.play=async({canvasElement:r,step:s})=>{const a=d(r),u=d(r.ownerDocument.body);await s("Shows validation error for non-numeric input",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"123x45s6"),await o(a.getByDisplayValue("123x45s6")).toBeInTheDocument(),await M.mouseOver(e),await _(()=>{o(u.getByText("Must be a numerical value")).toBeInTheDocument()})})};const x=l.bind({});x.args={warning:"This input number is almost 100!",value:"99"};const B=l.bind({});B.args={error:"This is a error message"};const D=l.bind({});D.args={value:"123test"};const S=l.bind({});S.args={value:"123.123456789",enableDisplayRounding:!0};const E=l.bind({});E.args={value:"123.123456789",enableDisplayRounding:!0,roundDisplayValue:r=>We.roundToFixed(r,4)};const V=()=>t.jsxs(Ue,{small:!0,children:[t.jsx(i,{value:123}),t.jsx(Oe,{children:"to"}),t.jsx(i,{value:123}),t.jsx(Pe,{options:[{value:"units",label:"units"}],width:"auto",value:"units"})]}),v=()=>{const[r,s]=c.useState("123");return t.jsx(i,{value:r,onChange:a=>{s(a.target.value)},testId:"testId",enableDisplayRounding:!0})};v.play=async({canvasElement:r,step:s})=>{const a=d(r);await s("Value should be rounded on blur",async()=>{const u=a.getByTestId("testId");await n.clear(u),await n.type(u,"123.123456789"),await n.click(r),await o(a.getByDisplayValue("123.12")).toBeInTheDocument()}),await s("Full value shown on focus",async()=>{const u=a.getByTestId("testId");await n.click(u),await o(a.getByDisplayValue("123.123456789")).toBeInTheDocument()})};const A=()=>{const[r,s]=c.useState("123");return t.jsxs(He,{columns:"1fr 1fr",gap:!0,children:[t.jsxs(g,{heading:t.jsx(m,{children:"Storage State (Redux)"}),children:[r,t.jsx(j,{}),t.jsx(Fe,{label:"Change value",onClick:()=>s(String(Math.floor(Math.random()*100)))})]}),t.jsx(g,{heading:t.jsx(m,{children:"NumberInput"}),children:t.jsx(i,{value:r,onChange:a=>{s(a.target.value)},error:Number(r)>=0?"":"Value must be positive"})})]})},y=()=>{const[r,s]=c.useState(!1),[a,u]=c.useState(!0),[e,k]=c.useState("0.6889763779527558"),[H,Le]=c.useState(""),Ge=Number(e)*.3048;return t.jsxs(He,{columns:"1fr 1fr",gap:!0,children:[t.jsxs(g,{heading:t.jsx(m,{children:"Settings"}),children:[t.jsx(F,{label:"Enable display rounding:",labelLeft:!0,labelWidth:200,children:t.jsx(L,{checked:r,onChange:p=>s(p.target.checked)})}),t.jsx(F,{label:"Enable cosmetic rounding:",labelLeft:!0,labelWidth:200,children:t.jsx(L,{checked:a,onChange:p=>u(p.target.checked)})})]}),t.jsxs(g,{heading:t.jsx(m,{children:"NumberInput (displayed in Meters)"}),children:[t.jsx(qe,{faint:!0,children:"Cosmetic Rounding Test Cases: type 0.21 then return (compare with enableCosmeticRounding on and off)"}),t.jsx(j,{}),t.jsx(i,{name:"Example",value:Ge,onChange:p=>{const N=String(Number(p.target.value)/.3048);k(N)},enableDisplayRounding:r,enableCosmeticRounding:a,error:Number(e)>=0?"":"Value must be positive",validationCallback:(p,N)=>{Le(N??"")},testId:"testId"})]}),t.jsxs(g,{heading:t.jsx(m,{children:"Storage State / Redux (stored in Feet)"}),children:[e,t.jsx(j,{}),t.jsx(Fe,{label:"Change value",onClick:()=>k(String(Math.floor(Math.random()*100)))})]}),t.jsx(g,{heading:t.jsx(m,{children:"Test Validation Callback"}),children:H&&t.jsx(Ke,{message:{content:H,icon:!0,type:"Error",visible:!0}})})]})};y.play=async({canvasElement:r,step:s})=>{const a=d(r),u=d(r.ownerDocument.body);await s("Can enter decimal values",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"123.123456789"),await n.click(r),await o(a.getByDisplayValue("123.123456789")).toBeInTheDocument()}),await s("Cannot enter scientific notation when storage unit is different (expected)",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"-1.12e3"),await o(a.getByDisplayValue("-1120")).toBeInTheDocument()}),await s("Can enter comma decimals (converts to dot)",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"123,456"),await o(a.getByDisplayValue("123.456")).toBeInTheDocument()}),await s("Can enter small numbers",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"0.0000000023"),await o(a.getByDisplayValue("0.0000000023")).toBeInTheDocument()}),await s("Can enter large numbers",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"999999999999"),await o(a.getByDisplayValue("999999999999")).toBeInTheDocument()}),await s("Shows validation error for non-numeric input",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"123x45s6"),await n.click(r),await o(a.getByDisplayValue("123x45s6")).toBeInTheDocument(),await M.mouseOver(e),await _(()=>{o(u.getAllByText("Must be a numerical value").length).toEqual(2)})})};const I=()=>{const[r,s]=c.useState("123");return t.jsx(i,{value:r,onChange:a=>{s(a.target.value)},testId:"testId"})};I.play=async({canvasElement:r,step:s})=>{const a=d(r),u=d(r.ownerDocument.body);await s("Can enter decimal values",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"123.123456789"),await o(a.getByDisplayValue("123.123456789")).toBeInTheDocument()}),await s("Can enter scientific notation",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"-1.12e3"),await o(a.getByDisplayValue("-1.12e3")).toBeInTheDocument()}),await s("Can enter comma decimals (converts to dot)",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"123,456"),await o(a.getByDisplayValue("123.456")).toBeInTheDocument()}),await s("Can enter small numbers",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"0.0000000023"),await o(a.getByDisplayValue("0.0000000023")).toBeInTheDocument()}),await s("Can enter large numbers",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"999999999999"),await o(a.getByDisplayValue("999999999999")).toBeInTheDocument()}),await s("Shows validation error for non-numeric input",async()=>{const e=a.getByTestId("testId");await n.clear(e),await n.type(e,"123x45s6"),await o(a.getByDisplayValue("123x45s6")).toBeInTheDocument(),await M.mouseOver(e),await _(()=>{o(u.getByText("Must be a numerical value")).toBeInTheDocument()})})};h.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"Placeholder"};V.__docgenInfo={description:"",methods:[],displayName:"TestInputGroup"};v.__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"};y.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"DemoCosmeticRounding"};I.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestUserInput"};var G,W,O;R.parameters={...R.parameters,docs:{...(G=R.parameters)==null?void 0:G.docs,source:{originalSource:`args => {
2
2
  const [_, updateArgs] = useArgs();
3
3
  const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
4
4
  updateArgs({
@@ -6,7 +6,7 @@ import{j as r}from"./jsx-runtime-eps93zm2.js";import{r as c}from"./index-DhsZuJv
6
6
  });
7
7
  };
8
8
  return <NumberInput onChange={handleChange} value={123} {...args} />;
9
- }`,...(O=(W=A.parameters)==null?void 0:W.docs)==null?void 0:O.source}}};var P,U,q;b.parameters={...b.parameters,docs:{...(P=b.parameters)==null?void 0:P.docs,source:{originalSource:`args => {
9
+ }`,...(O=(W=R.parameters)==null?void 0:W.docs)==null?void 0:O.source}}};var P,U,q;b.parameters={...b.parameters,docs:{...(P=b.parameters)==null?void 0:P.docs,source:{originalSource:`args => {
10
10
  const [_, updateArgs] = useArgs();
11
11
  const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
12
12
  updateArgs({
@@ -102,7 +102,7 @@ import{j as r}from"./jsx-runtime-eps93zm2.js";import{r as c}from"./index-DhsZuJv
102
102
  return <NumberInput value={value} onChange={evt => {
103
103
  setValue(evt.target.value);
104
104
  }} testId="testId" enableDisplayRounding />;
105
- }`,...(Se=(De=v.parameters)==null?void 0:De.docs)==null?void 0:Se.source}}};var Ee,Ve,ke;k.parameters={...k.parameters,docs:{...(Ee=k.parameters)==null?void 0:Ee.docs,source:{originalSource:`() => {
105
+ }`,...(Se=(De=v.parameters)==null?void 0:De.docs)==null?void 0:Se.source}}};var Ee,Ve,Ae;A.parameters={...A.parameters,docs:{...(Ee=A.parameters)==null?void 0:Ee.docs,source:{originalSource:`() => {
106
106
  const [value, setValue] = useState('123');
107
107
  return <Grid columns="1fr 1fr" gap>
108
108
  <Card heading={<Heading>Storage State (Redux)</Heading>}>
@@ -116,7 +116,7 @@ import{j as r}from"./jsx-runtime-eps93zm2.js";import{r as c}from"./index-DhsZuJv
116
116
  }} error={Number(value) >= 0 ? '' : 'Value must be positive'} />
117
117
  </Card>
118
118
  </Grid>;
119
- }`,...(ke=(Ve=k.parameters)==null?void 0:Ve.docs)==null?void 0:ke.source}}};var Ae,Re,Ne;y.parameters={...y.parameters,docs:{...(Ae=y.parameters)==null?void 0:Ae.docs,source:{originalSource:`() => {
119
+ }`,...(Ae=(Ve=A.parameters)==null?void 0:Ve.docs)==null?void 0:Ae.source}}};var Re,Ne,je;y.parameters={...y.parameters,docs:{...(Re=y.parameters)==null?void 0:Re.docs,source:{originalSource:`() => {
120
120
  const [enableDisplayRounding, setEnableDisplayRounding] = useState(false);
121
121
  const [enableCosmeticRounding, setEnableCosmeticRounding] = useState(true);
122
122
  const [valueInFeet, setValueInFeet] = useState('0.6889763779527558');
@@ -158,9 +158,9 @@ import{j as r}from"./jsx-runtime-eps93zm2.js";import{r as c}from"./index-DhsZuJv
158
158
  }} />}
159
159
  </Card>
160
160
  </Grid>;
161
- }`,...(Ne=(Re=y.parameters)==null?void 0:Re.docs)==null?void 0:Ne.source}}};var je,Me,_e;I.parameters={...I.parameters,docs:{...(je=I.parameters)==null?void 0:je.docs,source:{originalSource:`() => {
161
+ }`,...(je=(Ne=y.parameters)==null?void 0:Ne.docs)==null?void 0:je.source}}};var Me,_e,ke;I.parameters={...I.parameters,docs:{...(Me=I.parameters)==null?void 0:Me.docs,source:{originalSource:`() => {
162
162
  const [value, setValue] = useState('123');
163
163
  return <NumberInput value={value} onChange={evt => {
164
164
  setValue(evt.target.value);
165
165
  }} testId="testId" />;
166
- }`,...(_e=(Me=I.parameters)==null?void 0:Me.docs)==null?void 0:_e.source}}};const _a=["Default","Small","Width","Left","Disabled","AllowEmpty","Placeholder","Warning","Error","BadInput","WithDisplayRounding","WithCustomDisplayRounding","TestInputGroup","TestDisplayRounding","ManagedTestCase","DemoCosmeticRounding","TestUserInput"];export{f as AllowEmpty,D as BadInput,A as Default,y as DemoCosmeticRounding,T as Disabled,B as Error,w as Left,k as ManagedTestCase,h as Placeholder,b as Small,v as TestDisplayRounding,V as TestInputGroup,I as TestUserInput,x as Warning,C as Width,E as WithCustomDisplayRounding,S as WithDisplayRounding,_a as __namedExportsOrder,Ma as default};
166
+ }`,...(ke=(_e=I.parameters)==null?void 0:_e.docs)==null?void 0:ke.source}}};const ka=["Default","Small","Width","Left","Disabled","AllowEmpty","Placeholder","Warning","Error","BadInput","WithDisplayRounding","WithCustomDisplayRounding","TestInputGroup","TestDisplayRounding","ManagedTestCase","DemoCosmeticRounding","TestUserInput"];export{f as AllowEmpty,D as BadInput,R as Default,y as DemoCosmeticRounding,T as Disabled,B as Error,w as Left,A as ManagedTestCase,h as Placeholder,b as Small,v as TestDisplayRounding,V as TestInputGroup,I as TestUserInput,x as Warning,C as Width,E as WithCustomDisplayRounding,S as WithDisplayRounding,ka as __namedExportsOrder,_a 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-CP-qN_yN.js";import"./index-DhsZuJvc.js";import"./iframe-DO2I_nJe.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-Cfibu2ua.js";import"./index-DhsZuJvc.js";import"./iframe-DG9U1Bn6.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,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-PKQXORMH-BUBqlKwY.js","./chunk-HLWAVYOI-kpZZkSeH.js","./iframe-DO2I_nJe.js","./index-DhsZuJvc.js","./react-16-DXAfArL2.js","./index-CUZDtIZe.js","./index-CP-qN_yN.js","./inheritsLoose-DP0QEDDI.js","./assertThisInitialized-B9jnkVVz.js","./index-D6rZ4wEC.js"])))=>i.map(i=>d[i]);
2
- import{_ as a}from"./iframe-DO2I_nJe.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-BUBqlKwY.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-C-eDrY_1.js","./chunk-HLWAVYOI-Lxbmzwgp.js","./iframe-DG9U1Bn6.js","./index-DhsZuJvc.js","./react-16-DXAfArL2.js","./index-CUZDtIZe.js","./index-Cfibu2ua.js","./inheritsLoose-DP0QEDDI.js","./assertThisInitialized-B9jnkVVz.js","./index-D6rZ4wEC.js"])))=>i.map(i=>d[i]);
2
+ import{_ as a}from"./iframe-DG9U1Bn6.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-PKQXORMH-C-eDrY_1.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-CP-qN_yN.js";import{e as _}from"./index-DRSy5Ssd.js";import"./chunk-HLWAVYOI-kpZZkSeH.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-DO2I_nJe.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-Cfibu2ua.js";import{e as _}from"./index-DRSy5Ssd.js";import"./chunk-HLWAVYOI-Lxbmzwgp.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-DG9U1Bn6.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};