@oliasoft-open-source/react-ui-library 4.10.0-beta-1 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404.html +1 -0
- package/dist/assets/{index-CnfDrmnZ.js → index-DoFa61ar.js} +79 -137
- package/dist/index.html +1 -1
- package/dist/index.js +117 -174
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-KGDBMAHA-Bn4yyV9u.js → Color-KGDBMAHA-BaE9XYqa.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-PKQXORMH-BUBqlKwY.js → DocsRenderer-PKQXORMH-C4AGRx7h.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-kLk1OtZZ.js → accordion.stories-BtQXhKld.js} +1 -1
- package/dist/storybook/assets/{buttons-and-links-a_IVrxwj.js → buttons-and-links-CT3uME8p.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-B2lND_PU.js → casing-loads.stories-1KCWDoR3.js} +1 -1
- package/dist/storybook/assets/{cell.stories-BVDrv2SU.js → cell.stories-CBq3IOiP.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-kpZZkSeH.js → chunk-HLWAVYOI-DU16cKyP.js} +1 -1
- package/dist/storybook/assets/{color-Cbf9UrQO.js → color-CHwfPS7Y.js} +1 -1
- package/dist/storybook/assets/{footer.stories-BVXSVjq1.js → footer.stories-D-rIL9Q8.js} +1 -1
- package/dist/storybook/assets/{formation.stories-DmecxRaM.js → formation.stories-ByGQlyM6.js} +1 -1
- package/dist/storybook/assets/{iframe-DO2I_nJe.js → iframe-BjMiZc8R.js} +2 -2
- package/dist/storybook/assets/{index-Nykkb-Z-.js → index-3PqFqMP3.js} +1 -1
- package/dist/storybook/assets/{index-CP-qN_yN.js → index-B50vPCIH.js} +88 -88
- package/dist/storybook/assets/{input-validation-51gQ2ORg.js → input-validation-I1yYbPtK.js} +1 -1
- package/dist/storybook/assets/{inputs-CPKM4uZ6.js → inputs-B6X_h0ac.js} +1 -1
- package/dist/storybook/assets/{layout-forms-C9pc1r5D.js → layout-forms-BHoZkwXg.js} +1 -1
- package/dist/storybook/assets/{layout-general-Dks_ONKw.js → layout-general-BA9lilWm.js} +1 -1
- package/dist/storybook/assets/number-input-F3bqJ0z5.js +16 -0
- package/dist/storybook/assets/{number-input.stories-CqTYNX8G.js → number-input.stories-Dw2eW2Mc.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-Bki_uuMD.js → padding-and-spacing-CURwwYca.js} +1 -1
- package/dist/storybook/assets/{preview-DGoeP-Zy.js → preview-DKYV1Qdr.js} +2 -2
- package/dist/storybook/assets/{preview-yquX1adV.js → preview-Dgjy7Hpm.js} +1 -1
- package/dist/storybook/assets/{rich-text-input.stories-hAHCnDHk.js → rich-text-input.stories-DkaOBgbE.js} +46 -46
- package/dist/storybook/assets/{row.stories-BO2s7oph.js → row.stories-ghcsAzwW.js} +1 -1
- package/dist/storybook/assets/{table-CB6btQu9.js → table-BCdvBxub.js} +1 -1
- package/dist/storybook/assets/{table.stories-CvHvaYMC.js → table.stories-DkmbUVHr.js} +1 -1
- package/dist/storybook/assets/{title.stories-DYXG2_x-.js → title.stories-DpFDK9o1.js} +1 -1
- package/dist/storybook/assets/unit-input.stories-C7gVMOCX.js +389 -0
- package/dist/storybook/assets/{unit-table.stories-DiER-CMn.js → unit-table.stories-u1PeEt0F.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/sb-manager/globals-runtime.js +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/number-input-DBZIl9dz.js +0 -16
- 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-
|
|
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-B50vPCIH.js";import{NonExistentValue as a,Error as l}from"./select.stories-B9w9ONzj.js";import"./index-DhsZuJvc.js";import"./iframe-BjMiZc8R.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-
|
|
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-B50vPCIH.js";import{Default as l}from"./button.stories-DA9DGYD2.js";import{Default as a}from"./check-box.stories-DfbWw6mD.js";import{Default as c}from"./file-input.stories-CWD5XYE9.js";import{Default as d,Date as p}from"./input.stories-FKl0qVhm.js";import{Default as h}from"./number-input.stories-Dw2eW2Mc.js";import{Default as m}from"./option-dropdown.stories-CIvqMhQ3.js";import{Default as u}from"./radio-button.stories-5gvV0LD0.js";import{Native as f,Default as x}from"./select.stories-B9w9ONzj.js";import{Default as j}from"./slider.stories-BzBb3PkP.js";import{Default as b}from"./textarea.stories-CJ-Oqytp.js";import{Default as g}from"./toggle.stories-qTHFTXxI.js";import"./index-DhsZuJvc.js";import"./iframe-BjMiZc8R.js";import"../sb-preview/runtime.js";import"./index-CUZDtIZe.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./index-D6rZ4wEC.js";import"./react-router-dom-Ck2Y_Fzc.js";import"./index-CEuq6vkz.js";import"./tiny-invariant-DqLgxztJ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./flex-EllkLxgO.js";import"./button-DHevvVBE.js";import"./index-Bk2sglWO.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./tooltip-1V7clEnw.js";import"./index-DMAnyMX5.js";import"./index-CF7H4eMJ.js";import"./check-box-DPLaOkRR.js";import"./help-icon-Buhx5nl6.js";import"./file-input-X3BnZaHk.js";import"./lodash-c4VUpsOs.js";import"./input-group-BaRSJAEN.js";import"./input-DTXbDJaL.js";import"./types-Dx2TtIG9.js";import"./spacer-BWoNR27H.js";import"./message-Y48EomV-.js";import"./textarea-D6ltcKhz.js";import"./index-C0x1JmaP.js";import"./index-DRSy5Ssd.js";import"./grid-DRkC-bt8.js";import"./styled-components.browser.esm-BQ9GQzDc.js";import"./card-EcjmryU9.js";import"./heading-CRNoBc7q.js";import"./input-group-addon-D68iUKV2.js";import"./select-DnRuRG_N.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./badge-CLQ59MDF.js";import"./select.input-D0UkAPd9.js";import"./field-HrLaMLbx.js";import"./label-CqmyC9he.js";import"./toggle-BbFVf61v.js";import"./number-input-F3bqJ0z5.js";import"./divider-DY9nJ_7N.js";import"./radio-button-DmDuw4DA.js";import"./slider-C7vnj_3M.js";import"./objectSpread2-DW4nTBoq.js";import"./index-BI4_Bp97.js";function i(n){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...s(),...n.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Inputs"}),`
|
|
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-
|
|
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-B50vPCIH.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-BjMiZc8R.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-
|
|
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-B50vPCIH.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-BjMiZc8R.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."]}),`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{j as S}from"./jsx-runtime-eps93zm2.js";import{r as i}from"./index-DhsZuJvc.js";import{d as t}from"./index-C0x1JmaP.js";import{K as J,E as Q}from"./select-DnRuRG_N.js";import{l as X}from"./lodash-c4VUpsOs.js";import{I as Y}from"./input-DTXbDJaL.js";const $=14,ee=n=>t.isScientificStringNum(n)?n:t.roundToPrecision(n,$),m=n=>String(t.toString(n)),ne=n=>n?typeof n=="string"?n:X.isArray(n)?n[0]:n.fieldName:"",ae=({name:n,placeholder:v="",disabled:C=!1,error:T=!1,left:L=!1,small:R=!1,width:k="100%",value:p="",onChange:x=()=>{},onFocus:j=()=>{},onBlur:M=()=>{},tabIndex:H=0,testId:O,tooltip:K=null,warning:_=!1,validationCallback:b=()=>{},allowEmpty:A=!1,isInTable:P,groupOrder:B,enableCosmeticRounding:E=!1,enableDisplayRounding:f=!1,roundDisplayValue:w,disableInternalErrorValidationMessages:D=!1})=>{const r=i.useRef(null),[s,q]=i.useState(m(p)),[u,N]=i.useState(!1),o=ne(n),V=e=>{const a=t.validateNumber(e);return A&&e===""||a.valid?{...a,valid:!0,errors:void 0}:a},{valid:d,errors:c}=V(s),I=c&&c.length&&!D?c[0]:null;i.useEffect(()=>{q(m(p))},[p,E,f]),i.useEffect(()=>{!u&&!d?b(o,I):b(o,null)},[u,d,T]);const g=e=>{var h,F;const a=e instanceof KeyboardEvent?s:(h=e==null?void 0:e.target)==null?void 0:h.value,y=t.cleanNumStr(a.replaceAll(" ","").replaceAll("|",""));if(q(y),(F=V(y))!=null&&F.valid){const z={...e,target:{...e.target,value:t.stripLeadingZeros(m(y)),name:o}};x(z)}};i.useEffect(()=>{if(r&&(r!=null&&r.current)&&f&&u){const e=r.current;e&&setTimeout(()=>{const{length:a}=m(s);e.setSelectionRange(a,a)},0)}},[u]);const U=e=>{N(!0),j(e)},W=e=>{N(!1),g(e),M(e)},l=f&&!u&&d?w?m(w(s)):t.roundToFixed(s,2):s,Z=!!(l!=null&&l.endsWith("0")),G=E&&l&&!Z&&d?ee(l):l;return S.jsx(J,{handleKeys:[Q.ENTER],onKeyEvent:(e,a)=>g(a),children:S.jsx(Y,{type:"text",name:o,testId:O,disabled:C,placeholder:v,value:G,onChange:g,onFocus:U,onBlur:W,error:I||T,warning:_,right:!L,small:R,width:k,isInTable:P,groupOrder:B,tabIndex:H,tooltip:K,ref:r},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:`(
|
|
2
|
+
event: TChangeEvent<T>,
|
|
3
|
+
...additionalProps: { [key: string]: any }[]
|
|
4
|
+
) => void`,signature:{arguments:[{type:{name:"intersection",raw:`ChangeEvent<T> & {
|
|
5
|
+
target:
|
|
6
|
+
| T
|
|
7
|
+
| { name: string; value: any; label?: string; files?: FileList | null };
|
|
8
|
+
}`,elements:[{name:"ChangeEvent",elements:[{name:"T"}],raw:"ChangeEvent<T>"},{name:"signature",type:"object",raw:`{
|
|
9
|
+
target:
|
|
10
|
+
| T
|
|
11
|
+
| { name: string; value: any; label?: string; files?: FileList | null };
|
|
12
|
+
}`,signature:{properties:[{key:"target",value:{name:"union",raw:`| T
|
|
13
|
+
| { name: string; value: any; label?: string; files?: FileList | null }`,elements:[{name:"T"},{name:"signature",type:"object",raw:"{ name: string; value: any; label?: string; files?: FileList | null }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"value",value:{name:"any",required:!0}},{key:"label",value:{name:"string",required:!1}},{key:"files",value:{name:"union",raw:"FileList | null",elements:[{name:"FileList"},{name:"null"}],required:!1}}]}}],required:!0}}]}}]},name:"event"},{type:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ [key: string]: any }",signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}}],raw:"{ [key: string]: any }[]"},name:"additionalProps",rest:!0}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: FocusEvent<HTMLInputElement>) => void",signature:{arguments:[{type:{name:"FocusEvent",elements:[{name:"HTMLInputElement"}],raw:"FocusEvent<HTMLInputElement>"},name:"evt"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: FocusEvent<HTMLInputElement>) => void",signature:{arguments:[{type:{name:"FocusEvent",elements:[{name:"HTMLInputElement"}],raw:"FocusEvent<HTMLInputElement>"},name:"evt"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},tabIndex:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},testId:{required:!1,tsType:{name:"string"},description:""},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"}]},description:"",defaultValue:{value:"null",computed:!1}},warning:{required:!1,tsType:{name:"union",raw:"string | boolean",elements:[{name:"string"},{name:"boolean"}]},description:"",defaultValue:{value:"false",computed:!1}},validationCallback:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
14
|
+
name: string | { fieldName: string },
|
|
15
|
+
error: string | null,
|
|
16
|
+
) => void`,signature:{arguments:[{type:{name:"union",raw:"string | { fieldName: string }",elements:[{name:"string"},{name:"signature",type:"object",raw:"{ fieldName: string }",signature:{properties:[{key:"fieldName",value:{name:"string",required:!0}}]}}]},name:"name"},{type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},name:"error"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},allowEmpty:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},isInTable:{required:!1,tsType:{name:"boolean"},description:""},groupOrder:{required:!1,tsType:{name:"any"},description:""},enableCosmeticRounding:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",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,ee as r};
|
package/dist/storybook/assets/{number-input.stories-CqTYNX8G.js → number-input.stories-Dw2eW2Mc.js}
RENAMED
|
@@ -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-
|
|
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-F3bqJ0z5.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 => {
|
|
2
2
|
const [_, updateArgs] = useArgs();
|
|
3
3
|
const handleChange = (evt: ChangeEvent<HTMLInputElement>) => {
|
|
4
4
|
updateArgs({
|
package/dist/storybook/assets/{padding-and-spacing-Bki_uuMD.js → padding-and-spacing-CURwwYca.js}
RENAMED
|
@@ -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-
|
|
1
|
+
import{j as e}from"./jsx-runtime-eps93zm2.js";import{useMDXComponents as r}from"./index-BcNHZKhG.js";import{Z as t}from"./index-B50vPCIH.js";import"./index-DhsZuJvc.js";import"./iframe-BjMiZc8R.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-
|
|
2
|
-
import{_ as a}from"./iframe-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-PKQXORMH-C4AGRx7h.js","./chunk-HLWAVYOI-DU16cKyP.js","./iframe-BjMiZc8R.js","./index-DhsZuJvc.js","./react-16-DXAfArL2.js","./index-CUZDtIZe.js","./index-B50vPCIH.js","./inheritsLoose-DP0QEDDI.js","./assertThisInitialized-B9jnkVVz.js","./index-D6rZ4wEC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a}from"./iframe-BjMiZc8R.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-C4AGRx7h.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-
|
|
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-B50vPCIH.js";import{e as _}from"./index-DRSy5Ssd.js";import"./chunk-HLWAVYOI-DU16cKyP.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-BjMiZc8R.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};
|