diff --git a/sb8/develop/assets/AccountCircle-D0TUiLsW.js b/sb8/develop/assets/AccountCircle-D0TUiLsW.js new file mode 100644 index 0000000000..dd2254d0ac --- /dev/null +++ b/sb8/develop/assets/AccountCircle-D0TUiLsW.js @@ -0,0 +1 @@ +import{g as o}from"./index-P8U4y8pz.js";import{r as i}from"./styled-D3QUOaTt.js";import{r as a}from"./createSvgIcon-C4HEQ44R.js";import{r as n}from"./jsx-runtime-DKBipoO1.js";var r={},e;function s(){if(e)return r;e=1;var t=i();Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var u=t(a()),c=n();return r.default=(0,u.default)((0,c.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle"),r}var f=s();const d=o(f);export{d as A}; diff --git a/sb8/develop/assets/AccountCircle-sY1JjAku.js b/sb8/develop/assets/AccountCircle-sY1JjAku.js deleted file mode 100644 index d559677bcd..0000000000 --- a/sb8/develop/assets/AccountCircle-sY1JjAku.js +++ /dev/null @@ -1 +0,0 @@ -import{i as r}from"./styled-hJgfyZIG.js";import{r as t}from"./createSvgIcon-DE5yaevU.js";import{r as a}from"./jsx-runtime-nGUw9YhZ.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(t()),c=a();u=e.default=(0,i.default)((0,c.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle");export{u as d}; diff --git a/sb8/develop/assets/Add-DakDrsh-.js b/sb8/develop/assets/Add-DakDrsh-.js deleted file mode 100644 index d547daa429..0000000000 --- a/sb8/develop/assets/Add-DakDrsh-.js +++ /dev/null @@ -1 +0,0 @@ -import{i as r}from"./styled-hJgfyZIG.js";import{r as t}from"./createSvgIcon-DE5yaevU.js";import{r as a}from"./jsx-runtime-nGUw9YhZ.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(t()),d=a();u=e.default=(0,i.default)((0,d.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");export{u as d}; diff --git a/sb8/develop/assets/Add-lnUrTMVS.js b/sb8/develop/assets/Add-lnUrTMVS.js new file mode 100644 index 0000000000..f40cccff01 --- /dev/null +++ b/sb8/develop/assets/Add-lnUrTMVS.js @@ -0,0 +1 @@ +import{g as d}from"./index-P8U4y8pz.js";import{r as o}from"./styled-D3QUOaTt.js";import{r as i}from"./createSvgIcon-C4HEQ44R.js";import{r as n}from"./jsx-runtime-DKBipoO1.js";var r={},e;function f(){if(e)return r;e=1;var t=o();Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=t(i()),u=n();return r.default=(0,a.default)((0,u.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),r}var s=f();const c=d(s);export{c as A}; diff --git a/sb8/develop/assets/AddCircleOutline-B9nfZvDO.js b/sb8/develop/assets/AddCircleOutline-B9nfZvDO.js new file mode 100644 index 0000000000..d48b4fdc39 --- /dev/null +++ b/sb8/develop/assets/AddCircleOutline-B9nfZvDO.js @@ -0,0 +1 @@ +import{g as a}from"./index-P8U4y8pz.js";import{r as d}from"./styled-D3QUOaTt.js";import{r as n}from"./createSvgIcon-C4HEQ44R.js";import{r as o}from"./jsx-runtime-DKBipoO1.js";var e={},r;function l(){if(r)return e;r=1;var t=d();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=t(n()),u=o();return e.default=(0,i.default)((0,u.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),e}var s=l();const p=a(s);export{p as A}; diff --git a/sb8/develop/assets/AddCircleOutline-CXqn0GBH.js b/sb8/develop/assets/AddCircleOutline-CXqn0GBH.js deleted file mode 100644 index 5d0bfbde87..0000000000 --- a/sb8/develop/assets/AddCircleOutline-CXqn0GBH.js +++ /dev/null @@ -1 +0,0 @@ -import{i as r}from"./styled-hJgfyZIG.js";import{r as t}from"./createSvgIcon-DE5yaevU.js";import{r as a}from"./jsx-runtime-nGUw9YhZ.js";var e={},i=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,o=i(t()),v=a();u=e.default=(0,o.default)((0,v.jsx)("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline");export{u as d}; diff --git a/sb8/develop/assets/Address-DZpOdq1E.js b/sb8/develop/assets/Address-XylzLTEi.js similarity index 69% rename from sb8/develop/assets/Address-DZpOdq1E.js rename to sb8/develop/assets/Address-XylzLTEi.js index af3e60aa23..f9e6f5a0cc 100644 --- a/sb8/develop/assets/Address-DZpOdq1E.js +++ b/sb8/develop/assets/Address-XylzLTEi.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as n}from"./index-3-_tf5dF.js";import{M as s}from"./index-vCrdABUF.js";import{s as o}from"./Address.stories-iLj4QLHw.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./renderButtons-BmHfsf_z.js";import"./Form-DI4diVc8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./optionGetters-DXvNsMp-.js";function i(r){const t={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...n(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{of:o}),` +import{j as e}from"./jsx-runtime-DKBipoO1.js";import{useMDXComponents as n}from"./index-DIpYW6hh.js";import{M as s}from"./index-b_IcY7Xr.js";import{s as o}from"./Address.stories-Bha9MZBn.js";import"./index-P8U4y8pz.js";import"./iframe-k0_n0HJp.js";import"./index-DEBaATwO.js";import"./index-CFV30bQv.js";import"./index-Cu4lwwaE.js";import"./index-NOh9rqHv.js";import"./index-ogSvIofg.js";import"./renderButtons-BmHfsf_z.js";import"./Form-B7eOweAp.js";import"./theme-BWODkkBA.js";import"./SideNav-xke3DMVF.js";import"./containerQuery-DJgF-qoV.js";import"./useToggle-L-Qovzra.js";import"./ColorSelected-CjDfVzXw.js";import"./index-Codu9OSz.js";import"./debounce-Z6vH9m7G.js";import"./DataViewPrimaryFilter.styled-Er7etcVt.js";import"./generateUtilityClasses-1sHYEbWh.js";import"./createSvgIcon-DFewkeLR.js";import"./createSvgIcon-RC5eQ6Qp.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useIsFocusVisible-wVqIivVs.js";import"./useId-BCEQtGZU.js";import"./ownerWindow-DvT1GKkC.js";import"./useControlled-DD4Xjs9b.js";import"./Chip-BumaKDUo.js";import"./ButtonBase-BdV3oO8q.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-DYaYF2Hb.js";import"./FormFieldText.styled-Ds1XZvsQ.js";import"./Button-BBMCWwxG.js";import"./Popper-Cd5SEDCW.js";import"./useTheme-C71PTKbl.js";import"./formControlState-ESfXU8N_.js";import"./ButtonRow-BY0Hsyx3.js";import"./Spinner-C3Q2NvqZ.js";import"./Typography-CaRYQLjB.js";import"./SubtitleText-7Wc_VQnd.js";import"./CheckboxList-DWbGDBtu.js";import"./Checkbox-Ss222WpW.js";import"./FormControlLabel-Cz3gWlyw.js";import"./getThemeProps-Dw2gS1Bo.js";import"./TitleWrapper-DHX6T7Lf.js";import"./TitleText-DwGMspTF.js";import"./MoreVert-DYAEDIA7.js";import"./ChevronRight-CLpIxDpq.js";import"./PageHeader-6-4PqPeJ.js";import"./sizes-C6oSOElx.js";import"./RadioButton-JvG0jxKp.js";import"./StyledFormControl.styled-CutdFJBO.js";import"./Toggle-B1w3j-dj.js";import"./formats-sBod7wm8.js";import"./Dialog-COZnJfGx.js";import"./useMediaQuery-CFxK-hux.js";import"./Snackbar-fMG10-ub.js";import"./Close-Z8pEHv17.js";import"./ClickAwayListener-6W73t1nN.js";import"./TooltipIcon-Dfxq7uJG.js";import"./optionGetters-CNrUXz-e.js";function i(r){const t={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...n(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{of:o}),` `,e.jsx(t.h1,{id:"address",children:"Address"}),` `,e.jsxs(t.p,{children:["This field implements the ",e.jsx(t.a,{href:"#generic-field-props-fielddef",children:e.jsx(t.strong,{children:"FieldDef"})})," interface."]}),` `,e.jsxs(t.ul,{children:[` @@ -53,4 +53,4 @@ const fields = useMemo(\r ],\r []\r ); -`})})]})}function be(r={}){const{wrapper:t}={...n(),...r.components};return t?e.jsx(t,{...r,children:e.jsx(i,{...r})}):i(r)}export{be as default}; +`})})]})}function ue(r={}){const{wrapper:t}={...n(),...r.components};return t?e.jsx(t,{...r,children:e.jsx(i,{...r})}):i(r)}export{ue as default}; diff --git a/sb8/develop/assets/Address.stories-iLj4QLHw.js b/sb8/develop/assets/Address.stories-Bha9MZBn.js similarity index 84% rename from sb8/develop/assets/Address.stories-iLj4QLHw.js rename to sb8/develop/assets/Address.stories-Bha9MZBn.js index 7c464ab80a..2208c2deb2 100644 --- a/sb8/develop/assets/Address.stories-iLj4QLHw.js +++ b/sb8/develop/assets/Address.stories-Bha9MZBn.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as f}from"./index-BP8_t0zE.js";import{r as j}from"./renderButtons-BmHfsf_z.js";import{u as h,F}from"./Form-DI4diVc8.js";import{g as _,a as C}from"./optionGetters-DXvNsMp-.js";const I={title:"FormFields/FormFieldAddress"},y=["undefined",1,2,3,4,5,-1],r={getOptionsCountries:_,getOptionsStates:C},V="AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac",q=[{id:1,address1:"137 Teaticket Highway",address2:"",city:"Falmouth",state:{label:"Massachusetts",value:"MA"},postalCode:"02536",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]},{id:2,address1:"555 East Main Street",address2:"",city:"Norfolk",state:{label:"Virginia",value:"VA"},postalCode:"23510",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]}],s=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,amountPerType:a,amountShipping:o,amountPhysical:l,amountBilling:m,googleKey:c})=>{const g=h(),{state:S,handleSubmit:O}=g,B=f.useMemo(()=>u?async()=>({address:q}):void 0,[u]),E=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"address",inputSettings:{amountPerType:a==="undefined"?void 0:Number(a),amountShipping:o==="undefined"?void 0:Number(o),amountPhysical:l==="undefined"?void 0:Number(l),amountBilling:m==="undefined"?void 0:Number(m),googleMapsApiKey:c,...r}}],[i,n,d,a,o,l,m,c]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...g,buttons:j(O),title:"Address field",fields:E,skeleton:b,getFormValues:B}),e.jsx("pre",{children:JSON.stringify(S,null," ")})]})};s.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,amountPerType:"undefined",amountShipping:"undefined",amountPhysical:"undefined",amountBilling:"undefined",googleKey:V};s.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},amountPerType:{name:"Maximum of Each Type",control:{type:"select"},options:y},amountShipping:{name:"Shipping Maximum",control:{type:"select"},options:y},amountPhysical:{name:"Physical Maximum",control:{type:"select"},options:y},amountBilling:{name:"Billing Maximum",control:{type:"select"},options:y},googleKey:{name:"Google API Key"}};const t=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,subFields:a,googleKey:o})=>{const l=h(),{state:m,handleSubmit:c}=l,g=f.useMemo(()=>u?async()=>({address:q[0]}):void 0,[u]),S=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"addressSingle",inputSettings:{subFields:a,googleMapsApiKey:o,...r}}],[i,n,d,a,o]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...l,buttons:j(c),title:"Address Single field",fields:S,skeleton:b,getFormValues:g}),e.jsx("pre",{children:JSON.stringify(m,null," ")})]})};t.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,subFields:["address1","address2","address3","country","city","state","postalCode"],googleKey:V};t.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},subFields:{name:"Sub-Fields",control:{type:"object"}},googleKey:{name:"Google API Key"}};const R=[{label:"Provide a physical address",name:"physicalOnly",type:"address",inputSettings:{amountPhysical:1,...r}},{label:"Provide 1 physical address and 1 shipping address",name:"physicalAndShipping",type:"address",inputSettings:{amountPhysical:1,amountShipping:1,...r}},{label:"Provide any combination of addresses with a maximum of 1 each",name:"anyCombinationMax1",type:"address",inputSettings:{...r}},{label:"Provide any combination of addresses with no maximum",name:"anyCombinationNoMax",type:"address",inputSettings:{amountPerType:-1,...r}}],p=()=>{const n=h();return e.jsx(F,{...n,title:"Address Field",fields:R})};var P,M,x;s.parameters={...s.parameters,docs:{...(P=s.parameters)==null?void 0:P.docs,source:{originalSource:`({ +import{j as e}from"./jsx-runtime-DKBipoO1.js";import{r as f}from"./index-P8U4y8pz.js";import{r as V}from"./renderButtons-BmHfsf_z.js";import{u as h,F}from"./Form-B7eOweAp.js";import{g as _,a as C}from"./optionGetters-CNrUXz-e.js";const I={title:"FormFields/FormFieldAddress"},y=["undefined",1,2,3,4,5,-1],r={getOptionsCountries:_,getOptionsStates:C},q="AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac",v=[{id:1,address1:"137 Teaticket Highway",address2:"",city:"Falmouth",state:{label:"Massachusetts",value:"MA"},postalCode:"02536",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]},{id:2,address1:"555 East Main Street",address2:"",city:"Norfolk",state:{label:"Virginia",value:"VA"},postalCode:"23510",country:{label:"United States",value:"US"},types:[{label:"Physical",value:"physical"}]}],s=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,amountPerType:a,amountShipping:o,amountPhysical:l,amountBilling:m,googleKey:c})=>{const g=h(),{state:S,handleSubmit:O}=g,B=f.useMemo(()=>u?async()=>({address:v}):void 0,[u]),E=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"address",inputSettings:{amountPerType:a==="undefined"?void 0:Number(a),amountShipping:o==="undefined"?void 0:Number(o),amountPhysical:l==="undefined"?void 0:Number(l),amountBilling:m==="undefined"?void 0:Number(m),googleMapsApiKey:c,...r}}],[i,n,d,a,o,l,m,c]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...g,buttons:V(O),title:"Address field",fields:E,skeleton:b,getFormValues:B}),e.jsx("pre",{children:JSON.stringify(S,null," ")})]})};s.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,amountPerType:"undefined",amountShipping:"undefined",amountPhysical:"undefined",amountBilling:"undefined",googleKey:q};s.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},amountPerType:{name:"Maximum of Each Type",control:{type:"select"},options:y},amountShipping:{name:"Shipping Maximum",control:{type:"select"},options:y},amountPhysical:{name:"Physical Maximum",control:{type:"select"},options:y},amountBilling:{name:"Billing Maximum",control:{type:"select"},options:y},googleKey:{name:"Google API Key"}};const t=({label:n,disabled:i,required:d,skeleton:b,prepopulate:u,subFields:a,googleKey:o})=>{const l=h(),{state:m,handleSubmit:c}=l,g=f.useMemo(()=>u?async()=>({address:v[0]}):void 0,[u]),S=f.useMemo(()=>[{disabled:i,label:n,required:d,name:"address",type:"addressSingle",inputSettings:{subFields:a,googleMapsApiKey:o,...r}}],[i,n,d,a,o]);return e.jsxs(e.Fragment,{children:[e.jsx(F,{...l,buttons:V(c),title:"Address Single field",fields:S,skeleton:b,getFormValues:g}),e.jsx("pre",{children:JSON.stringify(m,null," ")})]})};t.args={label:"Label",disabled:!1,required:!1,skeleton:!1,prepopulate:!1,subFields:["address1","address2","address3","country","city","state","postalCode"],googleKey:q};t.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},prepopulate:{name:"Prepopulate"},subFields:{name:"Sub-Fields",control:{type:"object"}},googleKey:{name:"Google API Key"}};const R=[{label:"Provide a physical address",name:"physicalOnly",type:"address",inputSettings:{amountPhysical:1,...r}},{label:"Provide 1 physical address and 1 shipping address",name:"physicalAndShipping",type:"address",inputSettings:{amountPhysical:1,amountShipping:1,...r}},{label:"Provide any combination of addresses with a maximum of 1 each",name:"anyCombinationMax1",type:"address",inputSettings:{...r}},{label:"Provide any combination of addresses with no maximum",name:"anyCombinationNoMax",type:"address",inputSettings:{amountPerType:-1,...r}}],p=()=>{const n=h();return e.jsx(F,{...n,title:"Address Field",fields:R})};var P,M,x;s.parameters={...s.parameters,docs:{...(P=s.parameters)==null?void 0:P.docs,source:{originalSource:`({ label, disabled, required, @@ -39,7 +39,7 @@ import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as f}from"./index-BP8_t0z
{JSON.stringify(state, null, " ")}>; -}`,...(x=(M=s.parameters)==null?void 0:M.docs)==null?void 0:x.source}}};var A,K,v;t.parameters={...t.parameters,docs:{...(A=t.parameters)==null?void 0:A.docs,source:{originalSource:`({ +}`,...(x=(M=s.parameters)==null?void 0:M.docs)==null?void 0:x.source}}};var A,K,k;t.parameters={...t.parameters,docs:{...(A=t.parameters)==null?void 0:A.docs,source:{originalSource:`({ label, disabled, required, @@ -74,7 +74,7 @@ import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as f}from"./index-BP8_t0z
{JSON.stringify(state, null, " ")}>; -}`,...(v=(K=t.parameters)==null?void 0:K.docs)==null?void 0:v.source}}};var k,N,T;p.parameters={...p.parameters,docs:{...(k=p.parameters)==null?void 0:k.docs,source:{originalSource:`(): ReactElement => { +}`,...(k=(K=t.parameters)==null?void 0:K.docs)==null?void 0:k.source}}};var N,T,j;p.parameters={...p.parameters,docs:{...(N=p.parameters)==null?void 0:N.docs,source:{originalSource:`(): ReactElement => { const controller = useForm(); return ; -}`,...(T=(N=p.parameters)==null?void 0:N.docs)==null?void 0:T.source}}};const w=["Playground","Single","KitchenSink"],z=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:p,Playground:s,Single:t,__namedExportsOrder:w,default:I},Symbol.toStringTag,{value:"Module"}));export{z as s}; +}`,...(j=(T=p.parameters)==null?void 0:T.docs)==null?void 0:j.source}}};const w=["Playground","Single","KitchenSink"],z=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:p,Playground:s,Single:t,__namedExportsOrder:w,default:I},Symbol.toStringTag,{value:"Module"}));export{z as s}; diff --git a/sb8/develop/assets/AdvancedSelection-CqBYSply.js b/sb8/develop/assets/AdvancedSelection-BN2I_tix.js similarity index 63% rename from sb8/develop/assets/AdvancedSelection-CqBYSply.js rename to sb8/develop/assets/AdvancedSelection-BN2I_tix.js index dfbd359209..d5d7be2c57 100644 --- a/sb8/develop/assets/AdvancedSelection-CqBYSply.js +++ b/sb8/develop/assets/AdvancedSelection-BN2I_tix.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as o}from"./index-vCrdABUF.js";import{s}from"./AdvancedSelection.stories-FVRMi6fE.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./index.browser-vcSNLBTf.js";import"./Form-DI4diVc8.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./Button-DuMlbF8s.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./formControlState-DyMXFR7f.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./sizes-C6oSOElx.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./ColorSelected-DERcqfqY.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-gv79E1WA.js";import"./ChevronRight-bPXdPGpY.js";import"./PageHeader-DvUko4so.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./renderButtons-BmHfsf_z.js";import"./options-CJLEAYpf.js";import"./MultiSelectHelper-RF8UoF_G.js";function r(n){const e={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...i(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(o,{of:s}),` +import{j as t}from"./jsx-runtime-DKBipoO1.js";import{useMDXComponents as i}from"./index-DIpYW6hh.js";import{M as o}from"./index-b_IcY7Xr.js";import{s}from"./AdvancedSelection.stories-CPFXT8bB.js";import"./index-P8U4y8pz.js";import"./iframe-k0_n0HJp.js";import"./index-DEBaATwO.js";import"./index-CFV30bQv.js";import"./index-Cu4lwwaE.js";import"./index-NOh9rqHv.js";import"./index-ogSvIofg.js";import"./index.browser-vcSNLBTf.js";import"./Form-B7eOweAp.js";import"./theme-BWODkkBA.js";import"./SideNav-xke3DMVF.js";import"./containerQuery-DJgF-qoV.js";import"./useToggle-L-Qovzra.js";import"./ColorSelected-CjDfVzXw.js";import"./index-Codu9OSz.js";import"./debounce-Z6vH9m7G.js";import"./DataViewPrimaryFilter.styled-Er7etcVt.js";import"./generateUtilityClasses-1sHYEbWh.js";import"./createSvgIcon-DFewkeLR.js";import"./createSvgIcon-RC5eQ6Qp.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useIsFocusVisible-wVqIivVs.js";import"./useId-BCEQtGZU.js";import"./ownerWindow-DvT1GKkC.js";import"./useControlled-DD4Xjs9b.js";import"./Chip-BumaKDUo.js";import"./ButtonBase-BdV3oO8q.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-DYaYF2Hb.js";import"./FormFieldText.styled-Ds1XZvsQ.js";import"./Button-BBMCWwxG.js";import"./Popper-Cd5SEDCW.js";import"./useTheme-C71PTKbl.js";import"./formControlState-ESfXU8N_.js";import"./ButtonRow-BY0Hsyx3.js";import"./Spinner-C3Q2NvqZ.js";import"./Typography-CaRYQLjB.js";import"./SubtitleText-7Wc_VQnd.js";import"./CheckboxList-DWbGDBtu.js";import"./Checkbox-Ss222WpW.js";import"./FormControlLabel-Cz3gWlyw.js";import"./getThemeProps-Dw2gS1Bo.js";import"./TitleWrapper-DHX6T7Lf.js";import"./TitleText-DwGMspTF.js";import"./MoreVert-DYAEDIA7.js";import"./ChevronRight-CLpIxDpq.js";import"./PageHeader-6-4PqPeJ.js";import"./sizes-C6oSOElx.js";import"./RadioButton-JvG0jxKp.js";import"./StyledFormControl.styled-CutdFJBO.js";import"./Toggle-B1w3j-dj.js";import"./formats-sBod7wm8.js";import"./Dialog-COZnJfGx.js";import"./useMediaQuery-CFxK-hux.js";import"./Snackbar-fMG10-ub.js";import"./Close-Z8pEHv17.js";import"./ClickAwayListener-6W73t1nN.js";import"./TooltipIcon-Dfxq7uJG.js";import"./renderButtons-BmHfsf_z.js";import"./options-CJLEAYpf.js";import"./MultiSelectHelper-My_98miI.js";function r(n){const e={a:"a",code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...i(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(o,{of:s}),` `,t.jsx(e.h1,{id:"advanced-selection",children:"Advanced Selection"}),` `,t.jsxs(e.p,{children:["This field implements the ",t.jsx(e.a,{href:"#generic-field-props-fielddef",children:t.jsx(e.strong,{children:"FieldDef"})})," interface."]}),` `,t.jsxs(e.ul,{children:[` @@ -81,4 +81,4 @@ const fields = useMemo(\r ],\r []\r ); -`})})]})}function Ot(n={}){const{wrapper:e}={...i(),...n.components};return e?t.jsx(e,{...n,children:t.jsx(r,{...n})}):r(n)}export{Ot as default}; +`})})]})}function gt(n={}){const{wrapper:e}={...i(),...n.components};return e?t.jsx(e,{...n,children:t.jsx(r,{...n})}):r(n)}export{gt as default}; diff --git a/sb8/develop/assets/AdvancedSelection.stories-FVRMi6fE.js b/sb8/develop/assets/AdvancedSelection.stories-CPFXT8bB.js similarity index 57% rename from sb8/develop/assets/AdvancedSelection.stories-FVRMi6fE.js rename to sb8/develop/assets/AdvancedSelection.stories-CPFXT8bB.js index dad46630d3..f7b2216e8d 100644 --- a/sb8/develop/assets/AdvancedSelection.stories-FVRMi6fE.js +++ b/sb8/develop/assets/AdvancedSelection.stories-CPFXT8bB.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as _}from"./index-BP8_t0zE.js";import{n as T}from"./index.browser-vcSNLBTf.js";import{u as C,F as H}from"./Form-DI4diVc8.js";import{r as M}from"./renderButtons-BmHfsf_z.js";import{o as s}from"./options-CJLEAYpf.js";import{M as j,J as k,c as B}from"./MultiSelectHelper-RF8UoF_G.js";const E={title:"FormFields/FormFieldAdvancedSelection"},i=({label:r,required:g,skeleton:O,disabled:n,instructionText:o,helperText:l,optionsOrigin:a,getOptionsLimit:c,createNewOptionsKnob:p,selectLimit:d})=>{const e=C(),{state:S,handleSubmit:w}=e,v=s?s:[],b=new k(B),L=new j({api:b,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),J=async f=>{const D=T(),u={_id:D,tag:f,sort_tag:f,updated:new Date,created:new Date,id:D};s.push({label:u.tag,value:u.id});const q=[...await b.getData(),u];return await b.setData(q),{label:u.tag,value:u.id}},K=_.useMemo(()=>[{name:"advancedSelection",label:r,required:g,disabled:n,helperText:l,instructionText:o,type:"advancedSelection",inputSettings:{options:a==="Local"?v:void 0,getOptions:a==="DB"?L.getOptions.bind(L):void 0,getOptionsLimit:a==="DB"&&c?c:void 0,createNewOption:p?J:void 0,selectLimit:d}}],[r,g,n,l,o,c,v,a,p,d]);return t.jsxs(t.Fragment,{children:[t.jsx("pre",{children:JSON.stringify(S,null," ")}),t.jsx(H,{...e,buttons:M(w),title:"Advanced Selection Field",fields:K,skeleton:O})]})};i.args={label:"Label",disabled:!1,required:!1,skeleton:!1,instructionText:"Instruction text",helperText:"Helper text",optionsOrigin:"Local",getOptionsLimit:5,createNewOptionsKnob:!0,selectLimit:-1};i.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},instructionText:{name:"Instruction Text"},helperText:{name:"Helper Text"},optionsOrigin:{name:"Options Origin"},getOptionsLimit:{name:"Get Options Limit"},createNewOptionsKnob:{name:"Create New Option"},selectLimit:{name:"Select Limit"}};const m=()=>{const r=C(),{state:g,handleSubmit:O}=r,n=s?s:[],o=new k(B),l=new j({api:o,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),a=async p=>{const d=T(),e={_id:d,tag:p,sort_tag:p,updated:new Date,created:new Date,id:d};s.push({label:e.tag,value:e.id});const w=[...await o.getData(),e];return await o.setData(w),{label:e.tag,value:e.id}},c=_.useMemo(()=>[{name:"checkboxOptions",label:"Advanced selection with options prop",type:"advancedSelection",inputSettings:{options:n}},{name:"getOptions",label:"Advanced selection with getOptions prop",type:"advancedSelection",inputSettings:{getOptions:l.getOptions.bind(l),getOptionsLimit:5}},{name:"createNewOption",label:"Advanced selection with createNewOption prop",type:"advancedSelection",inputSettings:{options:n,getOptionsLimit:10,createNewOption:a}},{name:"selectLimitOfOptions",label:"Advanced selection with selectLimit prop (Max 2 options)",type:"advancedSelection",inputSettings:{options:n,getOptionsLimit:10,selectLimit:2}}],[n]);return t.jsxs(t.Fragment,{children:[t.jsx("pre",{children:JSON.stringify(g,null," ")}),t.jsx(H,{...r,buttons:M(O),title:"Form Title",description:"Description",fields:c})]})};var y,h,x;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`({ +import{j as n}from"./jsx-runtime-DKBipoO1.js";import{r as _}from"./index-P8U4y8pz.js";import{n as T}from"./index.browser-vcSNLBTf.js";import{u as C,F as H}from"./Form-B7eOweAp.js";import{r as M}from"./renderButtons-BmHfsf_z.js";import{o as g}from"./options-CJLEAYpf.js";import{M as j,J as k,c as B}from"./MultiSelectHelper-My_98miI.js";const E={title:"FormFields/FormFieldAdvancedSelection"},i=({label:s,required:m,skeleton:O,disabled:t,instructionText:o,helperText:r,optionsOrigin:a,getOptionsLimit:l,createNewOptionsKnob:c,selectLimit:p})=>{const e=C(),{state:S,handleSubmit:w}=e,v=g,b=new k(B),L=new j({api:b,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),J=async f=>{const D=T(),d={_id:D,tag:f,sort_tag:f,updated:new Date,created:new Date,id:D};g.push({label:d.tag,value:d.id});const q=[...await b.getData(),d];return await b.setData(q),{label:d.tag,value:d.id}},K=_.useMemo(()=>[{name:"advancedSelection",label:s,required:m,disabled:t,helperText:r,instructionText:o,type:"advancedSelection",inputSettings:{options:a==="Local"?v:void 0,getOptions:a==="DB"?L.getOptions.bind(L):void 0,getOptionsLimit:a==="DB"&&l?l:void 0,createNewOption:c?J:void 0,selectLimit:p}}],[s,m,t,r,o,l,v,a,c,p]);return n.jsxs(n.Fragment,{children:[n.jsx("pre",{children:JSON.stringify(S,null," ")}),n.jsx(H,{...e,buttons:M(w),title:"Advanced Selection Field",fields:K,skeleton:O})]})};i.args={label:"Label",disabled:!1,required:!1,skeleton:!1,instructionText:"Instruction text",helperText:"Helper text",optionsOrigin:"Local",getOptionsLimit:5,createNewOptionsKnob:!0,selectLimit:-1};i.argTypes={label:{name:"Label"},disabled:{name:"Disabled"},required:{name:"Required"},skeleton:{name:"Skeleton"},instructionText:{name:"Instruction Text"},helperText:{name:"Helper Text"},optionsOrigin:{name:"Options Origin"},getOptionsLimit:{name:"Get Options Limit"},createNewOptionsKnob:{name:"Create New Option"},selectLimit:{name:"Select Limit"}};const u=()=>{const s=C(),{state:m,handleSubmit:O}=s,t=g,o=new k(B),r=new j({api:o,labelColumn:"tag",valueColumn:"id",sortColumn:"sort_tag"}),a=async c=>{const p=T(),e={_id:p,tag:c,sort_tag:c,updated:new Date,created:new Date,id:p};g.push({label:e.tag,value:e.id});const w=[...await o.getData(),e];return await o.setData(w),{label:e.tag,value:e.id}},l=_.useMemo(()=>[{name:"checkboxOptions",label:"Advanced selection with options prop",type:"advancedSelection",inputSettings:{options:t}},{name:"getOptions",label:"Advanced selection with getOptions prop",type:"advancedSelection",inputSettings:{getOptions:r.getOptions.bind(r),getOptionsLimit:5}},{name:"createNewOption",label:"Advanced selection with createNewOption prop",type:"advancedSelection",inputSettings:{options:t,getOptionsLimit:10,createNewOption:a}},{name:"selectLimitOfOptions",label:"Advanced selection with selectLimit prop (Max 2 options)",type:"advancedSelection",inputSettings:{options:t,getOptionsLimit:10,selectLimit:2}}],[t]);return n.jsxs(n.Fragment,{children:[n.jsx("pre",{children:JSON.stringify(m,null," ")}),n.jsx(H,{...s,buttons:M(O),title:"Form Title",description:"Description",fields:l})]})};var y,h,x;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`({ label, required, skeleton, @@ -67,7 +67,7 @@ import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as _}from"./index-BP8_t0z
{JSON.stringify(state, null, " ")}>; -}`,...(x=(h=i.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var N,A,F;m.parameters={...m.parameters,docs:{...(N=m.parameters)==null?void 0:N.docs,source:{originalSource:`(): ReactElement => { +}`,...(x=(h=i.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var N,A,F;u.parameters={...u.parameters,docs:{...(N=u.parameters)==null?void 0:N.docs,source:{originalSource:`(): ReactElement => { const controller = useForm(); const { state, @@ -143,4 +143,4 @@ import{j as t}from"./jsx-runtime-nGUw9YhZ.js";import{r as _}from"./index-BP8_t0z
{JSON.stringify(state, null, " ")}>; -}`,...(F=(A=m.parameters)==null?void 0:A.docs)==null?void 0:F.source}}};const I=["Playground","KitchenSink"],X=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:m,Playground:i,__namedExportsOrder:I,default:E},Symbol.toStringTag,{value:"Module"}));export{X as s}; +}`,...(F=(A=u.parameters)==null?void 0:A.docs)==null?void 0:F.source}}};const I=["Playground","KitchenSink"],X=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:u,Playground:i,__namedExportsOrder:I,default:E},Symbol.toStringTag,{value:"Module"}));export{X as s}; diff --git a/sb8/develop/assets/Button-BBMCWwxG.js b/sb8/develop/assets/Button-BBMCWwxG.js new file mode 100644 index 0000000000..e727c4dabe --- /dev/null +++ b/sb8/develop/assets/Button-BBMCWwxG.js @@ -0,0 +1,229 @@ +import{j as u}from"./jsx-runtime-DKBipoO1.js";import{r as c}from"./index-P8U4y8pz.js";import{t as v,s as X}from"./theme-BWODkkBA.js";import{_ as H,d as g,a as Y,g as eo,s as V,u as to,e as q,f as no,o as $o,b as B,j as U,r as se}from"./generateUtilityClasses-1sHYEbWh.js";import{B as Co}from"./ButtonBase-BdV3oO8q.js";import{u as ae,T as le,r as ce,g as Lo,M as de,P as ue,b as co,i as pe,d as fe,c as ge,a as me}from"./Popper-Cd5SEDCW.js";import{d as be,u as po,b as Uo}from"./useIsFocusVisible-wVqIivVs.js";import{o as uo,a as jo,d as ve}from"./ownerWindow-DvT1GKkC.js";import{u as Po}from"./useToggle-L-Qovzra.js";const he=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function xo(o){return`scale(${o}, ${o**2})`}const xe={entering:{opacity:1,transform:xo(1)},entered:{opacity:1,transform:"none"}},go=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Ko=c.forwardRef(function(e,t){const{addEndListener:n,appear:i=!0,children:s,easing:a,in:d,onEnter:l,onEntered:p,onEntering:$,onExit:f,onExited:h,onExiting:M,style:R,timeout:C="auto",TransitionComponent:r=le}=e,x=H(e,he),T=be(),m=c.useRef(),y=ae(),I=c.useRef(null),w=po(I,s.ref,t),b=z=>O=>{if(z){const N=I.current;O===void 0?z(N):z(N,O)}},j=b($),W=b((z,O)=>{ce(z);const{duration:N,delay:k,easing:S}=Lo({style:R,timeout:C,easing:a},{mode:"enter"});let J;C==="auto"?(J=y.transitions.getAutoHeightDuration(z.clientHeight),m.current=J):J=N,z.style.transition=[y.transitions.create("opacity",{duration:J,delay:k}),y.transitions.create("transform",{duration:go?J:J*.666,delay:k,easing:S})].join(","),l&&l(z,O)}),_=b(p),ro=b(M),D=b(z=>{const{duration:O,delay:N,easing:k}=Lo({style:R,timeout:C,easing:a},{mode:"exit"});let S;C==="auto"?(S=y.transitions.getAutoHeightDuration(z.clientHeight),m.current=S):S=O,z.style.transition=[y.transitions.create("opacity",{duration:S,delay:N}),y.transitions.create("transform",{duration:go?S:S*.666,delay:go?N:N||S*.333,easing:k})].join(","),z.style.opacity=0,z.style.transform=xo(.75),f&&f(z)}),G=b(h),Q=z=>{C==="auto"&&T.start(m.current||0,z),n&&n(I.current,z)};return u.jsx(r,g({appear:i,in:d,nodeRef:I,onEnter:W,onEntered:_,onEntering:j,onExit:D,onExited:G,onExiting:ro,addEndListener:Q,timeout:C==="auto"?null:C},x,{children:(z,O)=>c.cloneElement(s,g({style:g({opacity:0,transform:xo(.75),visibility:z==="exited"&&!d?"hidden":void 0},xe[z],R,s.props.style),ref:w},O))}))});Ko.muiSupportAuto=!0;function ye(o){return eo("MuiPopover",o)}Y("MuiPopover",["root","paper"]);const $e=["onEntering"],Ce=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Pe=["slotProps"];function Oo(o,e){let t=0;return typeof e=="number"?t=e:e==="center"?t=o.height/2:e==="bottom"&&(t=o.height),t}function No(o,e){let t=0;return typeof e=="number"?t=e:e==="center"?t=o.width/2:e==="right"&&(t=o.width),t}function Fo(o){return[o.horizontal,o.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function mo(o){return typeof o=="function"?o():o}const Me=o=>{const{classes:e}=o;return no({root:["root"],paper:["paper"]},ye,e)},Ie=V(de,{name:"MuiPopover",slot:"Root",overridesResolver:(o,e)=>e.root})({}),qo=V(ue,{name:"MuiPopover",slot:"Paper",overridesResolver:(o,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Xo=c.forwardRef(function(e,t){var n,i,s;const a=to({props:e,name:"MuiPopover"}),{action:d,anchorEl:l,anchorOrigin:p={vertical:"top",horizontal:"left"},anchorPosition:$,anchorReference:f="anchorEl",children:h,className:M,container:R,elevation:C=8,marginThreshold:r=16,open:x,PaperProps:T={},slots:m,slotProps:y,transformOrigin:I={vertical:"top",horizontal:"left"},TransitionComponent:w=Ko,transitionDuration:b="auto",TransitionProps:{onEntering:j}={},disableScrollLock:W=!1}=a,_=H(a.TransitionProps,$e),ro=H(a,Ce),D=(n=y==null?void 0:y.paper)!=null?n:T,G=c.useRef(),Q=po(G,D.ref),z=g({},a,{anchorOrigin:p,anchorReference:f,elevation:C,marginThreshold:r,externalPaperSlotProps:D,transformOrigin:I,TransitionComponent:w,transitionDuration:b,TransitionProps:_}),O=Me(z),N=c.useCallback(()=>{if(f==="anchorPosition")return $;const E=mo(l),F=(E&&E.nodeType===1?E:uo(G.current).body).getBoundingClientRect();return{top:F.top+Oo(F,p.vertical),left:F.left+No(F,p.horizontal)}},[l,p.horizontal,p.vertical,$,f]),k=c.useCallback(E=>({vertical:Oo(E,I.vertical),horizontal:No(E,I.horizontal)}),[I.horizontal,I.vertical]),S=c.useCallback(E=>{const L={width:E.offsetWidth,height:E.offsetHeight},F=k(L);if(f==="none")return{top:null,left:null,transformOrigin:Fo(F)};const Eo=N();let Z=Eo.top-F.vertical,oo=Eo.left-F.horizontal;const Ro=Z+L.height,ko=oo+L.width,So=jo(mo(l)),Bo=So.innerHeight-r,To=So.innerWidth-r;if(r!==null&&Z
Popover Content
} popoverEvent={popoverEvent} menuItems={menuItems && dropdownWithIcons} />} ; -}`,...(L=(P=u.parameters)==null?void 0:P.docs)==null?void 0:L.source}}};var O,M,E;b.parameters={...b.parameters,docs:{...(O=b.parameters)==null?void 0:O.docs,source:{originalSource:`(): ReactElement => { +}`,...(q=(W=v.parameters)==null?void 0:W.docs)==null?void 0:q.source}}};var $,K,F;h.parameters={...h.parameters,docs:{...($=h.parameters)==null?void 0:$.docs,source:{originalSource:`(): ReactElement => { const [, setAnchorEl] = useState(null); function clickHandler() { alert("yes"); @@ -365,4 +365,4 @@ import{r as C,j as n}from"./jsx-runtime-nGUw9YhZ.js";import{r as Y}from"./index- ; -}`,...(E=(M=b.parameters)==null?void 0:M.docs)==null?void 0:E.source}}};const jn=["Playground","KitchenSink"],Ln=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:b,Playground:u,__namedExportsOrder:jn,default:pn},Symbol.toStringTag,{value:"Module"}));export{u as P,Ln as s}; +}`,...(F=(K=h.parameters)==null?void 0:K.docs)==null?void 0:F.source}}};const Bo=["Playground","KitchenSink"],Eo=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:h,Playground:v,__namedExportsOrder:Bo,default:jo},Symbol.toStringTag,{value:"Module"}));export{v as P,Eo as s}; diff --git a/sb8/develop/assets/ButtonBase-BP_P9WLq.js b/sb8/develop/assets/ButtonBase-BdV3oO8q.js similarity index 85% rename from sb8/develop/assets/ButtonBase-BP_P9WLq.js rename to sb8/develop/assets/ButtonBase-BdV3oO8q.js index 707bd1fcec..d72b63d010 100644 --- a/sb8/develop/assets/ButtonBase-BP_P9WLq.js +++ b/sb8/develop/assets/ButtonBase-BdV3oO8q.js @@ -1,4 +1,4 @@ -import{d as A,_ as ee,e as C,a as me,k as te,s as ne,u as be,g as Ie,f as Ue}from"./generateUtilityClasses-kMkq-zAT.js";import{r as a,a as W}from"./index-BP8_t0zE.js";import{j as N}from"./jsx-runtime-nGUw9YhZ.js";import{_ as _e,c as ze,T as ue,d as Oe,u as ce,e as Ke,a as H}from"./useIsFocusVisible-De2ftVE9.js";function oe(e,s){var r=function(t){return s&&a.isValidElement(t)?s(t):t},l=Object.create(null);return e&&a.Children.map(e,function(n){return n}).forEach(function(n){l[n.key]=r(n)}),l}function Ae(e,s){e=e||{},s=s||{};function r(f){return f in s?s[f]:e[f]}var l=Object.create(null),n=[];for(var t in e)t in s?n.length&&(l[t]=n,n=[]):n.push(t);var o,c={};for(var u in s){if(l[u])for(o=0;o{JSON.stringify(state, null, " ")}} +
{JSON.stringify(state, null, " ")}} -
{JSON.stringify(state, null, " ")}} -
{JSON.stringify(state, null, " ")}} +
{JSON.stringify(state, null, " ")}} +
{JSON.stringify(state, null, " ")}} -
{JSON.stringify(state, null, " ")}>; -}`,...(w=(F=o.parameters)==null?void 0:F.docs)==null?void 0:w.source}}};const C=["Playground","KitchenSink"],B=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:o,Playground:a,__namedExportsOrder:C,default:P},Symbol.toStringTag,{value:"Module"}));export{B as s}; +}`,...(w=(F=o.parameters)==null?void 0:F.docs)==null?void 0:w.source}}};const C=["Playground","KitchenSink"],B=Object.freeze(Object.defineProperty({__proto__:null,KitchenSink:o,Playground:a,__namedExportsOrder:C,default:R},Symbol.toStringTag,{value:"Module"}));export{B as s}; diff --git a/sb8/develop/assets/Delete-Bd9yuHmM.js b/sb8/develop/assets/Delete-Bd9yuHmM.js deleted file mode 100644 index e0d4fa225c..0000000000 --- a/sb8/develop/assets/Delete-Bd9yuHmM.js +++ /dev/null @@ -1 +0,0 @@ -import{i as r}from"./styled-hJgfyZIG.js";import{r as t}from"./createSvgIcon-DE5yaevU.js";import{r as a}from"./jsx-runtime-nGUw9YhZ.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(t()),l=a();u=e.default=(0,i.default)((0,l.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");export{u as d}; diff --git a/sb8/develop/assets/Delete-Cax0v_wN.js b/sb8/develop/assets/Delete-Cax0v_wN.js new file mode 100644 index 0000000000..a414401805 --- /dev/null +++ b/sb8/develop/assets/Delete-Cax0v_wN.js @@ -0,0 +1 @@ +import{g as o}from"./index-P8U4y8pz.js";import{r as i}from"./styled-D3QUOaTt.js";import{r as l}from"./createSvgIcon-C4HEQ44R.js";import{r as n}from"./jsx-runtime-DKBipoO1.js";var e={},r;function f(){if(r)return e;r=1;var t=i();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t(l()),u=n();return e.default=(0,a.default)((0,u.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),e}var s=f();const c=o(s);export{c as D}; diff --git a/sb8/develop/assets/Dialog-CLqCL8Td.js b/sb8/develop/assets/Dialog-CLqCL8Td.js deleted file mode 100644 index 889441b4b0..0000000000 --- a/sb8/develop/assets/Dialog-CLqCL8Td.js +++ /dev/null @@ -1,10 +0,0 @@ -import{j as o}from"./jsx-runtime-nGUw9YhZ.js";import{useMDXComponents as s}from"./index-3-_tf5dF.js";import{M as e,C as n}from"./index-vCrdABUF.js";import{s as a,P as p}from"./Dialog.stories-Dj32z5yF.js";import"./index-BP8_t0zE.js";import"./iframe-C5lwtss6.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";import"./Dialog-BI8WLJ8j.js";import"./Button-DuMlbF8s.js";import"./theme-DRtZtbPc.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./ButtonBase-BP_P9WLq.js";import"./useIsFocusVisible-De2ftVE9.js";import"./Popper-BWFpCfKc.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-Cud-ikZw.js";import"./useToggle-lipGlewK.js";import"./useId-DLncWxdO.js";function r(t){const i={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...s(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(e,{of:a}),` -`,o.jsx(i.h1,{id:"dialog",children:"Dialog"}),` -`,o.jsxs(i.p,{children:["The ",o.jsx(i.code,{children:"Dialog"})," component is built over a wrapper for ",o.jsx(i.a,{href:"https://mui.com/components/dialogs/",rel:"nofollow",children:"Material-UI Dialog"})," but with SimpleView brand colors."]}),` -`,o.jsx(i.p,{children:`A dialog is a type of modal window that appears in front of app content to provide critical information or ask for a decision.\r -Is a warning states: It’s possible to use modal windows when the user is about to take an action that has serious consequences and\r -is difficult or impossible to reverse.`}),` -`,o.jsx(i.h2,{id:"props",children:"Props"}),` -`,o.jsx(i.p,{children:o.jsx(i.a,{href:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/Dialog/DialogTypes.tsx",rel:"nofollow",children:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/Dialog/DialogTypes.tsx"})}),` -`,o.jsx(i.h2,{id:"dialog-example",children:"Dialog Example"}),` -`,o.jsx(n,{of:p})]})}function L(t={}){const{wrapper:i}={...s(),...t.components};return i?o.jsx(i,{...t,children:o.jsx(r,{...t})}):r(t)}export{L as default}; diff --git a/sb8/develop/assets/Dialog-BI8WLJ8j.js b/sb8/develop/assets/Dialog-COZnJfGx.js similarity index 93% rename from sb8/develop/assets/Dialog-BI8WLJ8j.js rename to sb8/develop/assets/Dialog-COZnJfGx.js index 915315b423..9c6236c5a7 100644 --- a/sb8/develop/assets/Dialog-BI8WLJ8j.js +++ b/sb8/develop/assets/Dialog-COZnJfGx.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-nGUw9YhZ.js";import{B as G}from"./Button-DuMlbF8s.js";import{s as T,t as h}from"./theme-DRtZtbPc.js";import{a as b,g as y,s as g,b as d,d as t,u as M,_ as $,e as m,f as S}from"./generateUtilityClasses-kMkq-zAT.js";import{r as u}from"./index-BP8_t0zE.js";import{B as J,M as Q,P as N,u as Z,F as oo}from"./Popper-BWFpCfKc.js";import{u as eo}from"./useId-DLncWxdO.js";function io(o){return y("MuiDialog",o)}const W=b("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),ao=u.createContext({}),to=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],so=g(J,{name:"MuiDialog",slot:"Backdrop",overrides:(o,e)=>e.backdrop})({zIndex:-1}),ro=o=>{const{classes:e,scroll:i,maxWidth:a,fullWidth:s,fullScreen:n}=o,l={root:["root"],container:["container",`scroll${d(i)}`],paper:["paper",`paperScroll${d(i)}`,`paperWidth${d(String(a))}`,s&&"paperFullWidth",n&&"paperFullScreen"]};return S(l,io,e)},no=g(Q,{name:"MuiDialog",slot:"Root",overridesResolver:(o,e)=>e.root})({"@media print":{position:"absolute !important"}}),lo=g("div",{name:"MuiDialog",slot:"Container",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.container,e[`scroll${d(i.scroll)}`]]}})(({ownerState:o})=>t({height:"100%","@media print":{height:"auto"},outline:0},o.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},o.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),co=g(N,{name:"MuiDialog",slot:"Paper",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.paper,e[`scrollPaper${d(i.scroll)}`],e[`paperWidth${d(String(i.maxWidth))}`],i.fullWidth&&e.paperFullWidth,i.fullScreen&&e.paperFullScreen]}})(({theme:o,ownerState:e})=>t({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:o.breakpoints.unit==="px"?Math.max(o.breakpoints.values.xs,444):`max(${o.breakpoints.values.xs}${o.breakpoints.unit}, 444px)`,[`&.${W.paperScrollBody}`]:{[o.breakpoints.down(Math.max(o.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${o.breakpoints.values[e.maxWidth]}${o.breakpoints.unit}`,[`&.${W.paperScrollBody}`]:{[o.breakpoints.down(o.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${W.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),po=u.forwardRef(function(e,i){const a=M({props:e,name:"MuiDialog"}),s=Z(),n={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{"aria-describedby":l,"aria-labelledby":c,BackdropComponent:x,BackdropProps:F,children:U,className:_,disableEscapeKeyDown:P=!1,fullScreen:I=!1,fullWidth:L=!1,maxWidth:z="sm",onBackdropClick:B,onClick:w,onClose:D,open:j,PaperComponent:E=N,PaperProps:R={},scroll:Y="paper",TransitionComponent:X=oo,transitionDuration:A=n,TransitionProps:H}=a,K=$(a,to),f=t({},a,{disableEscapeKeyDown:P,fullScreen:I,fullWidth:L,maxWidth:z,scroll:Y}),C=ro(f),v=u.useRef(),O=p=>{v.current=p.target===p.currentTarget},V=p=>{w&&w(p),v.current&&(v.current=null,B&&B(p),D&&D(p,"backdropClick"))},k=eo(c),q=u.useMemo(()=>({titleId:k}),[k]);return r.jsx(no,t({className:m(C.root,_),closeAfterTransition:!0,components:{Backdrop:so},componentsProps:{backdrop:t({transitionDuration:A,as:x},F)},disableEscapeKeyDown:P,onClose:D,open:j,ref:i,onClick:V,ownerState:f},K,{children:r.jsx(X,t({appear:!0,in:j,timeout:A,role:"presentation"},H,{children:r.jsx(lo,{className:m(C.container),onMouseDown:O,ownerState:f,children:r.jsx(co,t({as:E,elevation:24,role:"dialog","aria-describedby":l,"aria-labelledby":k},R,{className:m(C.paper,R.className),ownerState:f,children:r.jsx(ao.Provider,{value:q,children:U})}))})}))}))});function uo(o){return y("MuiDialogActions",o)}b("MuiDialogActions",["root","spacing"]);const go=["className","disableSpacing"],xo=o=>{const{classes:e,disableSpacing:i}=o;return S({root:["root",!i&&"spacing"]},uo,e)},mo=g("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.root,!i.disableSpacing&&e.spacing]}})(({ownerState:o})=>t({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!o.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),fo=u.forwardRef(function(e,i){const a=M({props:e,name:"MuiDialogActions"}),{className:s,disableSpacing:n=!1}=a,l=$(a,go),c=t({},a,{disableSpacing:n}),x=xo(c);return r.jsx(mo,t({className:m(x.root,s),ownerState:c,ref:i},l))});function ho(o){return y("MuiDialogContent",o)}b("MuiDialogContent",["root","dividers"]);const bo=b("MuiDialogTitle",["root"]),Do=["className","dividers"],Co=o=>{const{classes:e,dividers:i}=o;return S({root:["root",i&&"dividers"]},ho,e)},vo=g("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.root,i.dividers&&e.dividers]}})(({theme:o,ownerState:e})=>t({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(o.vars||o).palette.divider}`,borderBottom:`1px solid ${(o.vars||o).palette.divider}`}:{[`.${bo.root} + &`]:{paddingTop:0}})),ko=u.forwardRef(function(e,i){const a=M({props:e,name:"MuiDialogContent"}),{className:s,dividers:n=!1}=a,l=$(a,Do),c=t({},a,{dividers:n}),x=Co(c);return r.jsx(vo,t({className:m(x.root,s),ownerState:c,ref:i},l))}),Wo=T(po)` +import{j as r}from"./jsx-runtime-DKBipoO1.js";import{B as G}from"./Button-BBMCWwxG.js";import{s as T,t as h}from"./theme-BWODkkBA.js";import{a as b,g as y,s as g,b as d,d as t,u as M,_ as $,e as m,f as S}from"./generateUtilityClasses-1sHYEbWh.js";import{r as u}from"./index-P8U4y8pz.js";import{B as J,M as Q,P as N,u as Z,F as oo}from"./Popper-Cd5SEDCW.js";import{u as eo}from"./useId-BCEQtGZU.js";function io(o){return y("MuiDialog",o)}const W=b("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),ao=u.createContext({}),to=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],so=g(J,{name:"MuiDialog",slot:"Backdrop",overrides:(o,e)=>e.backdrop})({zIndex:-1}),ro=o=>{const{classes:e,scroll:i,maxWidth:a,fullWidth:s,fullScreen:n}=o,l={root:["root"],container:["container",`scroll${d(i)}`],paper:["paper",`paperScroll${d(i)}`,`paperWidth${d(String(a))}`,s&&"paperFullWidth",n&&"paperFullScreen"]};return S(l,io,e)},no=g(Q,{name:"MuiDialog",slot:"Root",overridesResolver:(o,e)=>e.root})({"@media print":{position:"absolute !important"}}),lo=g("div",{name:"MuiDialog",slot:"Container",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.container,e[`scroll${d(i.scroll)}`]]}})(({ownerState:o})=>t({height:"100%","@media print":{height:"auto"},outline:0},o.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},o.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),co=g(N,{name:"MuiDialog",slot:"Paper",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.paper,e[`scrollPaper${d(i.scroll)}`],e[`paperWidth${d(String(i.maxWidth))}`],i.fullWidth&&e.paperFullWidth,i.fullScreen&&e.paperFullScreen]}})(({theme:o,ownerState:e})=>t({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:o.breakpoints.unit==="px"?Math.max(o.breakpoints.values.xs,444):`max(${o.breakpoints.values.xs}${o.breakpoints.unit}, 444px)`,[`&.${W.paperScrollBody}`]:{[o.breakpoints.down(Math.max(o.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${o.breakpoints.values[e.maxWidth]}${o.breakpoints.unit}`,[`&.${W.paperScrollBody}`]:{[o.breakpoints.down(o.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${W.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),po=u.forwardRef(function(e,i){const a=M({props:e,name:"MuiDialog"}),s=Z(),n={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{"aria-describedby":l,"aria-labelledby":c,BackdropComponent:x,BackdropProps:F,children:U,className:_,disableEscapeKeyDown:P=!1,fullScreen:I=!1,fullWidth:L=!1,maxWidth:z="sm",onBackdropClick:B,onClick:w,onClose:D,open:j,PaperComponent:E=N,PaperProps:R={},scroll:Y="paper",TransitionComponent:X=oo,transitionDuration:A=n,TransitionProps:H}=a,K=$(a,to),f=t({},a,{disableEscapeKeyDown:P,fullScreen:I,fullWidth:L,maxWidth:z,scroll:Y}),C=ro(f),v=u.useRef(),O=p=>{v.current=p.target===p.currentTarget},V=p=>{w&&w(p),v.current&&(v.current=null,B&&B(p),D&&D(p,"backdropClick"))},k=eo(c),q=u.useMemo(()=>({titleId:k}),[k]);return r.jsx(no,t({className:m(C.root,_),closeAfterTransition:!0,components:{Backdrop:so},componentsProps:{backdrop:t({transitionDuration:A,as:x},F)},disableEscapeKeyDown:P,onClose:D,open:j,ref:i,onClick:V,ownerState:f},K,{children:r.jsx(X,t({appear:!0,in:j,timeout:A,role:"presentation"},H,{children:r.jsx(lo,{className:m(C.container),onMouseDown:O,ownerState:f,children:r.jsx(co,t({as:E,elevation:24,role:"dialog","aria-describedby":l,"aria-labelledby":k},R,{className:m(C.paper,R.className),ownerState:f,children:r.jsx(ao.Provider,{value:q,children:U})}))})}))}))});function uo(o){return y("MuiDialogActions",o)}b("MuiDialogActions",["root","spacing"]);const go=["className","disableSpacing"],xo=o=>{const{classes:e,disableSpacing:i}=o;return S({root:["root",!i&&"spacing"]},uo,e)},mo=g("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.root,!i.disableSpacing&&e.spacing]}})(({ownerState:o})=>t({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!o.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),fo=u.forwardRef(function(e,i){const a=M({props:e,name:"MuiDialogActions"}),{className:s,disableSpacing:n=!1}=a,l=$(a,go),c=t({},a,{disableSpacing:n}),x=xo(c);return r.jsx(mo,t({className:m(x.root,s),ownerState:c,ref:i},l))});function ho(o){return y("MuiDialogContent",o)}b("MuiDialogContent",["root","dividers"]);const bo=b("MuiDialogTitle",["root"]),Do=["className","dividers"],Co=o=>{const{classes:e,dividers:i}=o;return S({root:["root",i&&"dividers"]},ho,e)},vo=g("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:i}=o;return[e.root,i.dividers&&e.dividers]}})(({theme:o,ownerState:e})=>t({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(o.vars||o).palette.divider}`,borderBottom:`1px solid ${(o.vars||o).palette.divider}`}:{[`.${bo.root} + &`]:{paddingTop:0}})),ko=u.forwardRef(function(e,i){const a=M({props:e,name:"MuiDialogContent"}),{className:s,dividers:n=!1}=a,l=$(a,Do),c=t({},a,{dividers:n}),x=Co(c);return r.jsx(vo,t({className:m(x.root,s),ownerState:c,ref:i},l))}),Wo=T(po)` z-index: 99999 !important; font-family: ${h.fontFamily}; diff --git a/sb8/develop/assets/Dialog-Dy-YpYbg.js b/sb8/develop/assets/Dialog-Dy-YpYbg.js new file mode 100644 index 0000000000..32b5dbbf99 --- /dev/null +++ b/sb8/develop/assets/Dialog-Dy-YpYbg.js @@ -0,0 +1,10 @@ +import{j as o}from"./jsx-runtime-DKBipoO1.js";import{useMDXComponents as e}from"./index-DIpYW6hh.js";import{M as r,C as n}from"./index-b_IcY7Xr.js";import{s as a,P as p}from"./Dialog.stories-CtwhhUsS.js";import"./index-P8U4y8pz.js";import"./iframe-k0_n0HJp.js";import"./index-DEBaATwO.js";import"./index-CFV30bQv.js";import"./index-Cu4lwwaE.js";import"./index-NOh9rqHv.js";import"./index-ogSvIofg.js";import"./Dialog-COZnJfGx.js";import"./Button-BBMCWwxG.js";import"./theme-BWODkkBA.js";import"./generateUtilityClasses-1sHYEbWh.js";import"./ButtonBase-BdV3oO8q.js";import"./useIsFocusVisible-wVqIivVs.js";import"./Popper-Cd5SEDCW.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useTheme-C71PTKbl.js";import"./useToggle-L-Qovzra.js";import"./useId-BCEQtGZU.js";function s(t){const i={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",...e(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(r,{of:a}),` +`,o.jsx(i.h1,{id:"dialog",children:"Dialog"}),` +`,o.jsxs(i.p,{children:["The ",o.jsx(i.code,{children:"Dialog"})," component is built over a wrapper for ",o.jsx(i.a,{href:"https://mui.com/components/dialogs/",rel:"nofollow",children:"Material-UI Dialog"})," but with SimpleView brand colors."]}),` +`,o.jsx(i.p,{children:`A dialog is a type of modal window that appears in front of app content to provide critical information or ask for a decision.\r +Is a warning states: It’s possible to use modal windows when the user is about to take an action that has serious consequences and\r +is difficult or impossible to reverse.`}),` +`,o.jsx(i.h2,{id:"props",children:"Props"}),` +`,o.jsx(i.p,{children:o.jsx(i.a,{href:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/Dialog/DialogTypes.tsx",rel:"nofollow",children:"https://github.com/simpleviewinc/sv-mosaic/blob/develop/containers/mosaic/src/components/Dialog/DialogTypes.tsx"})}),` +`,o.jsx(i.h2,{id:"dialog-example",children:"Dialog Example"}),` +`,o.jsx(n,{of:p})]})}function _(t={}){const{wrapper:i}={...e(),...t.components};return i?o.jsx(i,{...t,children:o.jsx(s,{...t})}):s(t)}export{_ as default}; diff --git a/sb8/develop/assets/Dialog.stories-Dj32z5yF.js b/sb8/develop/assets/Dialog.stories-CtwhhUsS.js similarity index 92% rename from sb8/develop/assets/Dialog.stories-Dj32z5yF.js rename to sb8/develop/assets/Dialog.stories-CtwhhUsS.js index b9babfe200..2358f75d15 100644 --- a/sb8/develop/assets/Dialog.stories-Dj32z5yF.js +++ b/sb8/develop/assets/Dialog.stories-CtwhhUsS.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-nGUw9YhZ.js";import{r as m}from"./index-BP8_t0zE.js";import{D as g}from"./Dialog-BI8WLJ8j.js";import{B as y}from"./Button-DuMlbF8s.js";const b={title:"Components/Dialog"},e=({dialogContent:r,dialogTitle:i,primaryBtnLabel:s,secondaryBtnLabel:c})=>{const[p,t]=m.useState(!1),u=()=>{t(!0)},d=[{label:c,onClick:()=>{t(!1)},color:"gray",variant:"outlined"},{label:s,onClick:()=>{alert("The primary button was clicked"),t(!1)},color:"yellow",variant:"contained"}];return n.jsxs(n.Fragment,{children:[n.jsx(y,{color:"yellow",variant:"contained",onClick:u,label:"Open Dialog",muiAttrs:{disableRipple:!0}}),n.jsx(g,{dialogTitle:i,open:p,buttons:d,children:r})]})};e.args={dialogContent:`Assumenda maiores aut laudantium earum nesciunt. Nihil et deserunt in +import{j as n}from"./jsx-runtime-DKBipoO1.js";import{r as m}from"./index-P8U4y8pz.js";import{D as g}from"./Dialog-COZnJfGx.js";import{B as y}from"./Button-BBMCWwxG.js";const b={title:"Components/Dialog"},e=({dialogContent:r,dialogTitle:i,primaryBtnLabel:s,secondaryBtnLabel:c})=>{const[p,t]=m.useState(!1),u=()=>{t(!0)},d=[{label:c,onClick:()=>{t(!1)},color:"gray",variant:"outlined"},{label:s,onClick:()=>{alert("The primary button was clicked"),t(!1)},color:"yellow",variant:"contained"}];return n.jsxs(n.Fragment,{children:[n.jsx(y,{color:"yellow",variant:"contained",onClick:u,label:"Open Dialog",muiAttrs:{disableRipple:!0}}),n.jsx(g,{dialogTitle:i,open:p,buttons:d,children:r})]})};e.args={dialogContent:`Assumenda maiores aut laudantium earum nesciunt. Nihil et deserunt in sed numquam. Sed ut ex ex et eius sunt nisi eum adipisci. Animi quaerat expedita. Aut quis quas minus sed asperiores dolores asperiores excepturi. Non corporis qui doloremque ea voluptas voluptatem repellat. diff --git a/sb8/develop/assets/DocsRenderer-CFRXHY34-CQ2em5cs.js b/sb8/develop/assets/DocsRenderer-CFRXHY34-CQ2em5cs.js new file mode 100644 index 0000000000..af5da9dc67 --- /dev/null +++ b/sb8/develop/assets/DocsRenderer-CFRXHY34-CQ2em5cs.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DIpYW6hh.js","./index-P8U4y8pz.js"])))=>i.map(i=>d[i]); +import{_ as p}from"./iframe-k0_n0HJp.js";import{R as e,r as c}from"./index-P8U4y8pz.js";import{a as u,A as l,H as h,D as d}from"./index-b_IcY7Xr.js";import{renderElement as E,unmountElement as x}from"./react-18-M6YJI_d4.js";import"./jsx-runtime-DKBipoO1.js";import"./index-DEBaATwO.js";import"./index-CFV30bQv.js";import"./index-Cu4lwwaE.js";import"./index-NOh9rqHv.js";import"./index-ogSvIofg.js";var D={code:u,a:l,...h},_=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},H=class{constructor(){this.render=async(t,r,n)=>{let s={...D,...r==null?void 0:r.components},a=d;return new Promise((m,i)=>{p(async()=>{const{MDXProvider:o}=await import("./index-DIpYW6hh.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>E(e.createElement(_,{showException:i,key:Math.random()},e.createElement(o,{components:s},e.createElement(a,{context:t,docsParameter:r}))),n)).then(()=>m())})},this.unmount=t=>{x(t)}}};export{H as DocsRenderer,D as defaultComponents}; diff --git a/sb8/develop/assets/DocsRenderer-K4EAMTCU-BDAkdMYL.js b/sb8/develop/assets/DocsRenderer-K4EAMTCU-BDAkdMYL.js deleted file mode 100644 index c340b44067..0000000000 --- a/sb8/develop/assets/DocsRenderer-K4EAMTCU-BDAkdMYL.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-3-_tf5dF.js","./index-BP8_t0zE.js"])))=>i.map(i=>d[i]); -import{_ as p}from"./iframe-C5lwtss6.js";import{a as e,r as c}from"./index-BP8_t0zE.js";import{r as u,u as l}from"./react-18-DDrzupZ7.js";import{d as h,A as d,H as E,D as x}from"./index-vCrdABUF.js";import"../sb-preview/runtime.js";import"./index-BxmsGmlx.js";import"./extends-CF3RwP-h.js";import"./tslib.es6-CRos2fHm.js";import"./index-DXimoRZY.js";import"./inheritsLoose-CMy1E8oj.js";import"./toString-BjCnz-8e.js";import"./index-DJqTsaQd.js";import"./index-DrFu-skq.js";var D={code:h,a:d,...E},_=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},T=class{constructor(){this.render=async(t,r,n)=>{let s={...D,...r==null?void 0:r.components},m=x;return new Promise((i,a)=>{p(async()=>{const{MDXProvider:o}=await import("./index-3-_tf5dF.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>u(e.createElement(_,{showException:a,key:Math.random()},e.createElement(o,{components:s},e.createElement(m,{context:t,docsParameter:r}))),n)).then(()=>i())})},this.unmount=t=>{l(t)}}};export{T as DocsRenderer,D as defaultComponents}; diff --git a/sb8/develop/assets/DrawerForm.stories-XiMucFio.js b/sb8/develop/assets/DrawerForm.stories-lRUjxb1O.js similarity index 70% rename from sb8/develop/assets/DrawerForm.stories-XiMucFio.js rename to sb8/develop/assets/DrawerForm.stories-lRUjxb1O.js index ca5952205f..6c6e70e979 100644 --- a/sb8/develop/assets/DrawerForm.stories-XiMucFio.js +++ b/sb8/develop/assets/DrawerForm.stories-lRUjxb1O.js @@ -1,11 +1,11 @@ -import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as p}from"./index-BP8_t0zE.js";import{u as F,v as T,F as P}from"./Form-DI4diVc8.js";import{B as k}from"./Button-DuMlbF8s.js";import{D as A}from"./ColorSelected-DERcqfqY.js";import{t as l,B as t}from"./theme-DRtZtbPc.js";import{u as D}from"./uniqueId-BPI7foNJ.js";import{S as o}from"./sizes-C6oSOElx.js";import{g as M,a as N}from"./optionGetters-DXvNsMp-.js";import{s as z}from"./styled-components.browser.esm-8MQ3dTkk.js";import{d as H}from"./AddCircleOutline-CXqn0GBH.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./index-CV8e2Lol.js";import"./debounce-CHvAeqRr.js";import"./DataViewPrimaryFilter.styled-auwRvG8E.js";import"./generateUtilityClasses-kMkq-zAT.js";import"./createSvgIcon-Pzp5yWPs.js";import"./createSvgIcon-BcZTMgP9.js";import"./createChainedFunction-BO_9K8Jh.js";import"./ownerWindow-DvT1GKkC.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useId-DLncWxdO.js";import"./useControlled-im5M3O13.js";import"./Chip-CRqL1Gcl.js";import"./ButtonBase-BP_P9WLq.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-CZCb37QS.js";import"./FormFieldText.styled-Cq8lzkgl.js";import"./formControlState-DyMXFR7f.js";import"./Popper-BWFpCfKc.js";import"./useTheme-Cud-ikZw.js";import"./index-BxmsGmlx.js";import"./ButtonRow-CP4CrsnB.js";import"./Spinner-Dfqcw6pF.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./CheckboxList-DjNmes3Y.js";import"./Checkbox-D_4gEYtK.js";import"./FormControlLabel-f9znFBMA.js";import"./getThemeProps-BVsvmf2Q.js";import"./RadioButton-q7Nz9IFm.js";import"./StyledFormControl.styled-BDgwaEEo.js";import"./Toggle-aOIYV_sD.js";import"./formats-sBod7wm8.js";import"./Dialog-BI8WLJ8j.js";import"./useMediaQuery-Bupge7Mj.js";import"./TitleWrapper-CYciWRcJ.js";import"./TitleText-C9TlfF_O.js";import"./Snackbar-BF1WUGPv.js";import"./Close-CC6bEs2P.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-Bg8I7hop.js";import"./MoreVert-gv79E1WA.js";import"./PageHeader-DvUko4so.js";import"./ChevronRight-bPXdPGpY.js";import"./toString-BjCnz-8e.js";import"./tslib.es6-CRos2fHm.js";import"./emotion-unitless.esm-sScrWPmR.js";import"./styled-hJgfyZIG.js";import"./extends-CF3RwP-h.js";import"./createSvgIcon-DE5yaevU.js";const $e={title:"Components/Form"},n={type:"text",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",required:!0,inputSettings:{maxCharacters:20}},m={type:"address",required:!0,inputSettings:{getOptionsCountries:M,getOptionsStates:N,googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},a={type:"mapCoordinates",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},c=z.h2` - font-family: ${l.museoFont}; +import{j as e}from"./jsx-runtime-DKBipoO1.js";import{r as p}from"./index-P8U4y8pz.js";import{u as F,v as T,F as P}from"./Form-B7eOweAp.js";import{B as k}from"./Button-BBMCWwxG.js";import{D as A}from"./ColorSelected-CjDfVzXw.js";import{t as s,B as a}from"./theme-BWODkkBA.js";import{u as D}from"./uniqueId-BKof6R5-.js";import{S as o}from"./sizes-C6oSOElx.js";import{g as M,a as N}from"./optionGetters-CNrUXz-e.js";import{s as z}from"./styled-components.browser.esm-D5YpO4mE.js";import{A as H}from"./AddCircleOutline-B9nfZvDO.js";import"./SideNav-xke3DMVF.js";import"./containerQuery-DJgF-qoV.js";import"./useToggle-L-Qovzra.js";import"./FormFieldText.styled-Ds1XZvsQ.js";import"./testIds-DZf96GK8.js";import"./useMosaicTranslation-DYaYF2Hb.js";import"./useIsFocusVisible-wVqIivVs.js";import"./generateUtilityClasses-1sHYEbWh.js";import"./formControlState-ESfXU8N_.js";import"./createSvgIcon-DFewkeLR.js";import"./createSvgIcon-RC5eQ6Qp.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useId-BCEQtGZU.js";import"./ownerWindow-DvT1GKkC.js";import"./useControlled-DD4Xjs9b.js";import"./Popper-Cd5SEDCW.js";import"./useTheme-C71PTKbl.js";import"./index-DEBaATwO.js";import"./index-CFV30bQv.js";import"./ButtonRow-BY0Hsyx3.js";import"./CheckboxList-DWbGDBtu.js";import"./Checkbox-Ss222WpW.js";import"./FormControlLabel-Cz3gWlyw.js";import"./ButtonBase-BdV3oO8q.js";import"./getThemeProps-Dw2gS1Bo.js";import"./Chip-BumaKDUo.js";import"./DataViewPrimaryFilter.styled-Er7etcVt.js";import"./RadioButton-JvG0jxKp.js";import"./StyledFormControl.styled-CutdFJBO.js";import"./Toggle-B1w3j-dj.js";import"./debounce-Z6vH9m7G.js";import"./index-Codu9OSz.js";import"./Spinner-C3Q2NvqZ.js";import"./Typography-CaRYQLjB.js";import"./SubtitleText-7Wc_VQnd.js";import"./formats-sBod7wm8.js";import"./Dialog-COZnJfGx.js";import"./useMediaQuery-CFxK-hux.js";import"./TitleWrapper-DHX6T7Lf.js";import"./TitleText-DwGMspTF.js";import"./Snackbar-fMG10-ub.js";import"./Close-Z8pEHv17.js";import"./ClickAwayListener-6W73t1nN.js";import"./TooltipIcon-Dfxq7uJG.js";import"./MoreVert-DYAEDIA7.js";import"./PageHeader-6-4PqPeJ.js";import"./ChevronRight-CLpIxDpq.js";import"./styled-D3QUOaTt.js";import"./createSvgIcon-C4HEQ44R.js";const Ge={title:"Components/Form"},t={type:"text",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",required:!0,inputSettings:{maxCharacters:20}},m={type:"address",required:!0,inputSettings:{getOptionsCountries:M,getOptionsStates:N,googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},i={type:"mapCoordinates",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{googleMapsApiKey:"AIzaSyArV4f-KFF86Zn9VWAu9wS4hHlG1TXxqac"}},c=z.h2` + font-family: ${s.museoFont}; font-size: 26px; - font-weight: ${l.fontWeight.light}; + font-weight: ${s.fontWeight.light}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - color: ${l.colors.simplyGray}; + color: ${s.colors.simplyGray}; margin: 8px -12px 0; display: flex; align-items: center; @@ -13,11 +13,11 @@ import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as p}from"./index-BP8_t0z &::after{ content: " "; flex-grow: 1; - border-top: 1px solid ${l.newColors.grey2[100]}; + border-top: 1px solid ${s.newColors.grey2[100]}; margin-left: 16px; margin-top: 4px; } -`;async function W(){return{petsHeading:e.jsx(c,{children:"Pets"}),destinationsHeading:e.jsx(c,{children:"Destinations"}),novaScotia:{lat:44.64933472911243,lng:-63.615047475871876},eiffelTower:{lat:48.858348895100555,lng:2.294492026111051},lochNessMonster:{lat:57.27050873488408,lng:-4.493444954407284}}}const L=[{title:"Text field sizes",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",fields:[[["text-xs"]],[["text-sm"]],[["text-md"]],[["text-lg"]]]},{title:"Fields with grid layout",fields:[[["firstName"],["lastName"],["dob"]],[["profilePicture"],["biography"],[]],[["homeAddress"],["workAddress"],["altAddress"]],[["petsHeading"]],[["favouritePet","firstPet","desiredPet"]],[["destinationsHeading"]],[["whereToGo"]],[["availableStart"],["availableEnd"]],[["novaScotia"],["eiffelTower"],["lochNessMonster"]]]}],v={default:`${parseInt(t.sm,10)-160}px`,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl,"2xl":t["2xl"]},i=({showSections:x,drawWidth:w})=>{const d=F(),{handleSubmit:f}=d,S=p.useMemo(()=>[{...n,name:"text-xs",label:"Extra small text",size:o.xs},{...n,name:"text-sm",label:"Small text",size:o.sm},{...n,name:"text-md",label:"Medium text",size:o.md},{...n,name:"text-lg",label:"Email address",size:o.lg,validators:[T]},{...n,name:"firstName",label:"First Name"},{...n,name:"lastName",label:"Last Name"},{type:"date",name:"dob",label:"Date of Birth"},{name:"profilePicture",label:"Profile Picture",type:"upload",inputSettings:{onFileAdd:async({onUploadComplete:r})=>{r({name:"Test",fileUrl:"https://www.google.com",id:D(),size:1098})},onFileDelete:async()=>{}},required:!0},{...n,name:"biography",label:"Biography",size:o.lg,inputSettings:{multiline:!0,minRows:8}},{name:"petsHeading",type:"raw"},{label:"Favourite Pet",name:"favouritePet",required:!0,type:"dropdown",inputSettings:{options:[{value:"dog",label:"Dog"},{value:"cat",label:"Cat"},{value:"rabbit",label:"Rabbit"}]}},{label:"First Pet",name:"firstPet",required:!0,type:"dropdown",inputSettings:{options:[{value:"dog",label:"Dog"},{value:"cat",label:"Cat"},{value:"rabbit",label:"Rabbit"}]}},{label:"Desired Pet",name:"desiredPet",required:!0,type:"chip",inputSettings:{options:[{value:"kangaroo",label:"Kangaroo"},{value:"cow",label:"Cow"},{value:"duckbillPlatypus",label:"Duckbill Platypus"},{value:"raccoon",label:"Raccoon"},{value:"hog",label:"Hog"},{value:"madagascarHissingCockroach",label:"Madagascar Hissing Cockroach"},{value:"pronghorn",label:"Pronghorn"},{value:"alligator",label:"Alligator"}]}},{...m,name:"homeAddress",label:"Home address"},{...m,name:"workAddress",label:"Work address"},{...m,name:"altAddress",label:"Alternative address"},{name:"mostVisitedLocations",label:"Most visited locations",type:"advancedSelection"},{name:"booksRead",label:"Books read",type:"advancedSelection",inputSettings:{options:[{value:"the",label:"The Great Gatsby"},{value:"cow",label:"To Kill a Mockingbird"},{value:"duckbillPlatypus",label:"Pride and Prejudice"},{value:"raccoon",label:"The Book Thief"},{value:"hog",label:"Lord of the Flies"},{value:"madagascarHissingCockroach",label:"The Catcher in the Rye"}]}},{name:"destinationsHeading",type:"raw"},{name:"whereToGo",label:"Where do you want to go?",type:"matrix",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{dataView:{columns:[{name:"name",label:"Name"}],data:[{id:1,name:"Australia"},{id:2,name:"Japan"}]},buttons:[{label:"Add",onClick:()=>null,color:"teal",variant:"text",mIcon:H}]}},{name:"availableStart",label:"When are you available?",type:"date",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{showTime:!0}},{name:"availableEnd",label:" ",type:"date",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{showTime:!0}},{...a,name:"eiffelTower",label:"Where is the Eiffel tower?",inputSettings:{...a.inputSettings,initialCenter:{lat:57.27050873488408,lng:-4.493444954407284}}},{...a,name:"lochNessMonster",label:"Where's the Loch Ness monster?",inputSettings:{...a.inputSettings,initialCenter:{lat:48.858348895100555,lng:2.294492026111051}}},{...a,name:"novaScotia",label:"Where is Nova Scotia?",inputSettings:{...a.inputSettings,initialCenter:{lat:48.858348895100555,lng:2.294492026111051}}}],[]),[y,s]=p.useState(!1),u=()=>s(!1),C=[{label:"Save",onClick:f(r=>{s(!1),alert("Form submitted with the following data: "+JSON.stringify(r,null," "))}),color:"yellow",variant:"contained"}];return e.jsxs(e.Fragment,{children:[e.jsx(A,{open:y,onClose:u,PaperProps:{sx:{width:"90%"}},children:e.jsx("div",{style:{width:w,height:"100vh"},children:e.jsx(P,{...d,buttons:C,title:"Drawer form example",fields:S,onBack:u,sections:x?L:void 0,getFormValues:W})})}),e.jsx("div",{style:{margin:20},children:e.jsx(k,{onClick:()=>s(!0),label:"Open Drawer",color:"yellow",variant:"contained"})})]})};i.args={showSections:!1,drawWidth:v.default};i.argTypes={showSections:{name:"Show Sections"},drawWidth:{name:"Draw Width",control:{type:"select"},options:v}};var b,g,h;i.parameters={...i.parameters,docs:{...(b=i.parameters)==null?void 0:b.docs,source:{originalSource:`({ +`;async function W(){return{petsHeading:e.jsx(c,{children:"Pets"}),destinationsHeading:e.jsx(c,{children:"Destinations"}),novaScotia:{lat:44.64933472911243,lng:-63.615047475871876},eiffelTower:{lat:48.858348895100555,lng:2.294492026111051},lochNessMonster:{lat:57.27050873488408,lng:-4.493444954407284}}}const L=[{title:"Text field sizes",description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",fields:[[["text-xs"]],[["text-sm"]],[["text-md"]],[["text-lg"]]]},{title:"Fields with grid layout",fields:[[["firstName"],["lastName"],["dob"]],[["profilePicture"],["biography"],[]],[["homeAddress"],["workAddress"],["altAddress"]],[["petsHeading"]],[["favouritePet","firstPet","desiredPet"]],[["destinationsHeading"]],[["whereToGo"]],[["availableStart"],["availableEnd"]],[["novaScotia"],["eiffelTower"],["lochNessMonster"]]]}],v={default:`${parseInt(a.sm,10)-160}px`,sm:a.sm,md:a.md,lg:a.lg,xl:a.xl,"2xl":a["2xl"]},l=({showSections:x,drawWidth:w})=>{const d=F(),{handleSubmit:f}=d,S=p.useMemo(()=>[{...t,name:"text-xs",label:"Extra small text",size:o.xs},{...t,name:"text-sm",label:"Small text",size:o.sm},{...t,name:"text-md",label:"Medium text",size:o.md},{...t,name:"text-lg",label:"Email address",size:o.lg,validators:[T]},{...t,name:"firstName",label:"First Name"},{...t,name:"lastName",label:"Last Name"},{type:"date",name:"dob",label:"Date of Birth"},{name:"profilePicture",label:"Profile Picture",type:"upload",inputSettings:{onFileAdd:async({onUploadComplete:n})=>{n({name:"Test",fileUrl:"https://www.google.com",id:D(),size:1098})},onFileDelete:async()=>{}},required:!0},{...t,name:"biography",label:"Biography",size:o.lg,inputSettings:{multiline:!0,minRows:8}},{name:"petsHeading",type:"raw"},{label:"Favourite Pet",name:"favouritePet",required:!0,type:"dropdown",inputSettings:{options:[{value:"dog",label:"Dog"},{value:"cat",label:"Cat"},{value:"rabbit",label:"Rabbit"}]}},{label:"First Pet",name:"firstPet",required:!0,type:"dropdown",inputSettings:{options:[{value:"dog",label:"Dog"},{value:"cat",label:"Cat"},{value:"rabbit",label:"Rabbit"}]}},{label:"Desired Pet",name:"desiredPet",required:!0,type:"chip",inputSettings:{options:[{value:"kangaroo",label:"Kangaroo"},{value:"cow",label:"Cow"},{value:"duckbillPlatypus",label:"Duckbill Platypus"},{value:"raccoon",label:"Raccoon"},{value:"hog",label:"Hog"},{value:"madagascarHissingCockroach",label:"Madagascar Hissing Cockroach"},{value:"pronghorn",label:"Pronghorn"},{value:"alligator",label:"Alligator"}]}},{...m,name:"homeAddress",label:"Home address"},{...m,name:"workAddress",label:"Work address"},{...m,name:"altAddress",label:"Alternative address"},{name:"mostVisitedLocations",label:"Most visited locations",type:"advancedSelection"},{name:"booksRead",label:"Books read",type:"advancedSelection",inputSettings:{options:[{value:"the",label:"The Great Gatsby"},{value:"cow",label:"To Kill a Mockingbird"},{value:"duckbillPlatypus",label:"Pride and Prejudice"},{value:"raccoon",label:"The Book Thief"},{value:"hog",label:"Lord of the Flies"},{value:"madagascarHissingCockroach",label:"The Catcher in the Rye"}]}},{name:"destinationsHeading",type:"raw"},{name:"whereToGo",label:"Where do you want to go?",type:"matrix",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{dataView:{columns:[{name:"name",label:"Name"}],data:[{id:1,name:"Australia"},{id:2,name:"Japan"}]},buttons:[{label:"Add",onClick:()=>null,color:"teal",variant:"text",mIcon:H}]}},{name:"availableStart",label:"When are you available?",type:"date",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{showTime:!0}},{name:"availableEnd",label:" ",type:"date",instructionText:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras venenatis arcu sed rutrum maximus.",inputSettings:{showTime:!0}},{...i,name:"eiffelTower",label:"Where is the Eiffel tower?",inputSettings:{...i.inputSettings,initialCenter:{lat:57.27050873488408,lng:-4.493444954407284}}},{...i,name:"lochNessMonster",label:"Where's the Loch Ness monster?",inputSettings:{...i.inputSettings,initialCenter:{lat:48.858348895100555,lng:2.294492026111051}}},{...i,name:"novaScotia",label:"Where is Nova Scotia?",inputSettings:{...i.inputSettings,initialCenter:{lat:48.858348895100555,lng:2.294492026111051}}}],[]),[y,r]=p.useState(!1),u=()=>r(!1),C=[{label:"Save",onClick:f(n=>{r(!1),alert("Form submitted with the following data: "+JSON.stringify(n,null," "))}),color:"yellow",variant:"contained"}];return e.jsxs(e.Fragment,{children:[e.jsx(A,{open:y,onClose:u,PaperProps:{sx:{width:"90%"}},children:e.jsx("div",{style:{width:w,height:"100vh"},children:e.jsx(P,{...d,buttons:C,title:"Drawer form example",fields:S,onBack:u,sections:x?L:void 0,getFormValues:W})})}),e.jsx("div",{style:{margin:20},children:e.jsx(k,{onClick:()=>r(!0),label:"Open Drawer",color:"yellow",variant:"contained"})})]})};l.args={showSections:!1,drawWidth:v.default};l.argTypes={showSections:{name:"Show Sections"},drawWidth:{name:"Draw Width",control:{type:"select"},options:v}};var b,g,h;l.parameters={...l.parameters,docs:{...(b=l.parameters)==null?void 0:b.docs,source:{originalSource:`({ showSections, drawWidth }: typeof DrawerForm.args): ReactElement => { @@ -197,10 +197,10 @@ import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as p}from"./index-BP8_t0z label: "The Catcher in the Rye" }] } - }, ({ + }, { name: "destinationsHeading", type: "raw" - } as any), { + } as any, { name: "whereToGo", label: "Where do you want to go?", type: "matrix", @@ -308,4 +308,4 @@ import{j as e}from"./jsx-runtime-nGUw9YhZ.js";import{r as p}from"./index-BP8_t0z