Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
owenallenaz committed Dec 17, 2024
1 parent 9f67afd commit 0db6d6a
Show file tree
Hide file tree
Showing 104 changed files with 176 additions and 172 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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-C2riHKHr.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-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-BwRej2O0.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:`({
label,
disabled,
required,
Expand Down
Original file line number Diff line number Diff line change
@@ -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-CNYk-NWo.js";import{s}from"./AdvancedSelection.stories-B0f3x_T9.js";import"./index-BP8_t0zE.js";import"./iframe-CMTjII-Q.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-C2riHKHr.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-DIJA1CoI.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-DXmlIxMz.js";import"./FormControlLabel-n1qioM9o.js";import"./generateUtilityClasses-DAcHHM0W.js";import"./formControlState-D52vkf9K.js";import"./ButtonBase-BZmvw3BH.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-Cs15h2IA.js";import"./useTheme-5hcycNQy.js";import"./createSvgIcon-CPgMIgId.js";import"./testIds-wFnuQL-c.js";import"./FormFieldText.styled-BceLEoIp.js";import"./Button-Do5OxnZO.js";import"./Popper-CPbWUqAP.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-CcHL1II5.js";import"./useId-DLncWxdO.js";import"./index-OJVcpMHx.js";import"./debounce-DO3dP4oK.js";import"./DataViewPrimaryFilter.styled-CylNlUs-.js";import"./Chip-B85GZ6Ow.js";import"./ButtonRow-CuiV6DQ9.js";import"./Spinner-DgupAfKo.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./sizes-C6oSOElx.js";import"./RadioButton-CO2cFro8.js";import"./StyledFormControl.styled-BHyCFBbY.js";import"./Toggle-BRgaiAVD.js";import"./ColorSelected-BvcxNARU.js";import"./TitleWrapper-D2l-_w9e.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-BbmWEP2K.js";import"./ChevronRight-CSz705Z0.js";import"./PageHeader-DvPTRq5b.js";import"./formats-sBod7wm8.js";import"./Dialog-DXK7hw4q.js";import"./useMediaQuery-CguehUMS.js";import"./Snackbar-J6gNQC5v.js";import"./Close-Dlpx7KpR.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-CO3K7ssQ.js";import"./renderButtons-BmHfsf_z.js";import"./options-CstHLxTf.js";import"./MultiSelectHelper-D07F4Tgg.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-nGUw9YhZ.js";import{useMDXComponents as i}from"./index-3-_tf5dF.js";import{M as o}from"./index-C9HXjlyM.js";import{s}from"./AdvancedSelection.stories-2uzHzMsK.js";import"./index-BP8_t0zE.js";import"./iframe-D7nd24S1.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-BwRej2O0.js";import"./theme-DRtZtbPc.js";import"./SideNav-D66jd1x5.js";import"./containerQuery-C0QVV4Kt.js";import"./useToggle-lipGlewK.js";import"./CheckboxList-DIJA1CoI.js";import"./isSymbol-CEVJpixJ.js";import"./Checkbox-DXmlIxMz.js";import"./FormControlLabel-n1qioM9o.js";import"./generateUtilityClasses-DAcHHM0W.js";import"./formControlState-D52vkf9K.js";import"./ButtonBase-BZmvw3BH.js";import"./useIsFocusVisible-De2ftVE9.js";import"./useControlled-im5M3O13.js";import"./getThemeProps-Cs15h2IA.js";import"./useTheme-5hcycNQy.js";import"./createSvgIcon-CPgMIgId.js";import"./testIds-wFnuQL-c.js";import"./FormFieldText.styled-BceLEoIp.js";import"./Button-Do5OxnZO.js";import"./Popper-CPbWUqAP.js";import"./ownerWindow-DvT1GKkC.js";import"./createChainedFunction-BO_9K8Jh.js";import"./useMosaicTranslation-CZCb37QS.js";import"./createSvgIcon-CcHL1II5.js";import"./useId-DLncWxdO.js";import"./index-OJVcpMHx.js";import"./debounce-DO3dP4oK.js";import"./DataViewPrimaryFilter.styled-CylNlUs-.js";import"./Chip-B85GZ6Ow.js";import"./ButtonRow-CuiV6DQ9.js";import"./Spinner-DgupAfKo.js";import"./Typography-Br_RMLnS.js";import"./SubtitleText-Vdwjg1jD.js";import"./sizes-C6oSOElx.js";import"./RadioButton-CO2cFro8.js";import"./StyledFormControl.styled-BHyCFBbY.js";import"./Toggle-BRgaiAVD.js";import"./ColorSelected-BvcxNARU.js";import"./TitleWrapper-D2l-_w9e.js";import"./TitleText-C9TlfF_O.js";import"./MoreVert-BbmWEP2K.js";import"./ChevronRight-CSz705Z0.js";import"./PageHeader-DvPTRq5b.js";import"./formats-sBod7wm8.js";import"./Dialog-DXK7hw4q.js";import"./useMediaQuery-CguehUMS.js";import"./Snackbar-J6gNQC5v.js";import"./Close-Dlpx7KpR.js";import"./ClickAwayListener-DnjBLK-5.js";import"./TooltipIcon-CO3K7ssQ.js";import"./renderButtons-BmHfsf_z.js";import"./options-CstHLxTf.js";import"./MultiSelectHelper-D07F4Tgg.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:[`
Expand Down
Loading

0 comments on commit 0db6d6a

Please sign in to comment.