id
stringlengths
12
53
messages
listlengths
3
3
code_mycheckout-sdk_d35e579a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/ButtonMessage/ButtonMessageContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { Fragment, useMemo } from 'react'\n\nimport ButtonMessage from './ButtonMessage'\nimport useButtonMessage from './useButtonMessage'\n\ninterface Props {\n isVisible: boolean\n}\n\nconst ButtonMessageContainer = (props: Props) => {\n const { isVisible } = props\n\n const { buttonMessage, isConfigured, message, styles } = useButtonMessage()\n const propsButton = { message, styles }\n\n return useMemo(() => {\n if (!isVisible || !isConfigured) return <Fragment />\n if (!message) return <Fragment />\n\n return <ButtonMessage {...propsButton} />\n }, [buttonMessage, isConfigured, isVisible, message])\n}\n\nexport default ButtonMessageContainer\n\n```" } ]
code_mycheckout-sdk_d2135e25
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/ButtonMessage/useButtonMessage.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useEffect, useMemo, useState } from 'react'\nimport { useSelector } from 'react-redux'\nimport { pathOr } from 'ramda'\n\nimport { selectSettings } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport { useValidateStyles } from '../../hooks/useValidateStyles'\n\nconst useButtonMessage = () => {\n const settings = useSelector(selectSettings)\n const [message, setMessage] = useState<string>()\n\n const styles = useValidateStyles()\n\n const buttonMessage = useMemo(\n () => pathOr('', ['buttonMessage'], settings),\n [settings]\n )\n\n const isConfigured = useMemo(\n () => pathOr(false, ['isConfigured'], settings),\n [settings]\n )\n\n useEffect(() => {\n if (buttonMessage) {\n setMessage(\n buttonMessage.replaceAll(/\\*[aA-zZÀ-ú | ]+\\*/g, (e) => {\n const element = e.replace(/\\*/g, '')\n\n return `<span>${element}</span>`\n })\n )\n }\n }, [buttonMessage])\n\n return {\n buttonMessage,\n isConfigured,\n message,\n styles,\n }\n}\n\nexport default useButtonMessage\n\n```" } ]
code_mycheckout-sdk_914a267a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/ButtonMessage/ButtonMessage.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport { Info } from '../Icons'\nimport { ToolTip } from '../shared'\n\ninterface Props {\n message: string\n styles?: any\n}\n\nconst ButtonMessage = (props: Props) => {\n const { message, styles } = props\n\n return (\n <div className={styles.CheckoutlessInfo}>\n <ToolTip\n tooltip={\n <div className={styles.CheckoutlessInfoMessage}>\n <div dangerouslySetInnerHTML={{ __html: message }}></div>\n </div>\n }\n >\n <Info />\n </ToolTip>\n </div>\n )\n}\n\nexport default ButtonMessage\n\n```" } ]
code_mycheckout-sdk_6494c156
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/RegisterForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport type { Dispatch, SetStateAction } from 'react'\nimport React, { useEffect, Fragment } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport { Loader } from '../shared'\nimport {\n selectUserRegistrationSections,\n setPaymentDataSection,\n} from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport LoadingProcessOrdeContainer from '../UserInfo/LoadingProcessOrder/LoadingProcessOrderContainer'\nimport PaymentForm from './PaymentForm'\nimport ProfileForm from './Profile/ProfileFormContainer'\nimport ShippingFormContainer from './Shipping/ShippingFormContainer'\nimport Summary from '../Summary'\nimport type { Item, Step } from '../../interfaces'\nimport UnavailableProductsContainer from '../UnavailableProducts/UnavailableProductsContainer'\nimport globalStyles from '../../myCheckout-styles.module.css'\nimport styles from './registerForm.css'\nimport type { ProfileMC } from '../../interfaces/orderForm'\nimport type {\n LogisticInfoSimulation,\n SimulationStatus,\n} from '../../interfaces/simulation'\nimport PackagesContainer from '../LogisticsInfo/Packages/PackagesContainer'\n\ninterface Props {\n gateway: string\n isPickupPoint: boolean\n items: Item[]\n loadingOrder: boolean\n loadPaymentForm: boolean\n showEditButtonAddress: boolean\n steps: Step\n validateTriggerPayment: boolean\n handleGetDocumentsClient: (email: string) => void\n setSteps: Dispatch<SetStateAction<Step>>\n profile: ProfileMC\n logisticsInfo: LogisticInfoSimulation[]\n simulationStatus?: SimulationStatus\n}\n\nconst RegisterForm = (props: Props) => {\n const {\n gateway,\n isPickupPoint,\n items,\n loadingOrder,\n loadPaymentForm,\n steps,\n handleGetDocumentsClient,\n // new Context\n profile,\n logisticsInfo,\n simulationStatus,\n } = props\n\n const userRegistrationSections = useSelector(selectUserRegistrationSections)\n const dispatchGlobal = useDispatch()\n\n useEffect(() => {\n if (!steps.payment) return\n const isPaymentList =\n (isPickupPoint && userRegistrationSections === 3) ||\n (!isPickupPoint && userRegistrationSections === 4)\n\n const isPaymentDetails =\n (isPickupPoint && userRegistrationSections === 4) ||\n (!isPickupPoint && userRegistrationSections === 5)\n\n dispatchGlobal(\n setPaymentDataSection(\n (isPaymentList && 'list') || (isPaymentDetails && 'details') || 'list'\n )\n )\n }, [userRegistrationSections, isPickupPoint, steps])\n\n return (\n <Fragment>\n {loadingOrder && <LoadingProcessOrdeContainer />}\n\n {profile.email ? (\n !loadingOrder && items.length ? (\n <div className={styles.resgisterFormContainer}>\n {steps.profile && !steps.shipping && <ProfileForm />}\n {steps.shipping && !steps.payment && (\n <ShippingFormContainer steps={steps} />\n )}\n {steps.logistic &&\n !steps.payment &&\n (simulationStatus !== 'loading' &&\n logisticsInfo &&\n logisticsInfo?.length > 0 ? (\n <PackagesContainer />\n ) : (\n <Loader text=\"store/checkoutless.loading.almostThere\" />\n ))}\n {steps.payment && (\n <Fragment>\n {loadPaymentForm ? (\n <Fragment>\n <PaymentForm\n gateway={gateway}\n handleGetDocumentsClient={handleGetDocumentsClient}\n />\n </Fragment>\n ) : (\n <Loader />\n )}\n </Fragment>\n )}\n <Summary\n isVisible={\n !(steps.logistic && !steps.payment && logisticsInfo?.length > 0)\n }\n className={globalStyles.inDesktop}\n />\n </div>\n ) : loadingOrder && items.length ? null : (\n <UnavailableProductsContainer />\n )\n ) : (\n <Loader />\n )}\n </Fragment>\n )\n}\n\nexport default RegisterForm\n\n```" } ]
code_mycheckout-sdk_a55b7b37
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/registerForm.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.resgisterFormContainer {\n display: flex;\n flex-direction: column;\n align-content: center;\n}\n\n@media screen and (min-width: 992px) {\n .resgisterFormContainer .summary {\n margin-bottom: 22%;\n }\n}\n\n```" } ]
code_mycheckout-sdk_51314ef1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/generic-styles.module.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container {\n width: 100%;\n}\n\n.containerDocument {\n display: flex;\n justify-content: space-between;\n}\n\n.containerDocumentType {\n width: 39%;\n}\n\n.containerDocumentNumber {\n width: 59%;\n}\n\n.containerTrigger {\n width: 100%;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.containerInfo {\n display: flex;\n align-items: center;\n}\n\n.containerText.containerText {\n margin-left: 10px;\n margin-right: 10px;\n display: flex;\n align-items: center;\n}\n\n.containerData {\n padding: 0px 32px;\n margin-bottom: 16px;\n}\n\n.radioHide {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.checkmark {\n position: absolute;\n top: 0;\n left: 0;\n height: 17px;\n width: 17px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 50%;\n box-sizing: border-box;\n}\n\n.paymentLabelContainer {\n display: block;\n position: relative;\n padding-left: 25px;\n margin: 8px;\n cursor: pointer;\n font-size: 22px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.paymentLabelContainer label {\n cursor: pointer;\n}\n\n/* When the radio button is checked, add a blue background */\n.checkmarkChecked {\n background-color: #fff;\n border: 1px solid #1b998b;\n}\n\n/* Create the indicator (the dot/circle - hidden when not checked) */\n.checkmarkNoChecked::after {\n content: '';\n position: absolute;\n display: none;\n}\n\n/* Show the indicator (dot/circle) when checked */\n.checkmarkChecked::after {\n display: block;\n}\n\n/* Style the indicator (dot/circle) */\n.checkmarkContainer {\n position: absolute;\n top: 3px;\n left: 3px;\n width: 9px;\n height: 9px;\n border-radius: 50%;\n background-color: #1b998b;\n}\n\n.paymentLabel {\n font-size: 16px;\n}\n\n.paymentMethodContainer {\n padding: 14px 0;\n}\n\n.paymentMethodPromissory {\n margin: 0px 15px;\n width: 90%;\n padding: 35px;\n box-shadow: 0px 3px 6px #00000029;\n margin-bottom: 15px;\n}\n\n.formGroup {\n display: flex;\n justify-content: space-between;\n}\n\n.inputGroup {\n width: 48%;\n}\n\n.labelError {\n color: #cb4242;\n}\n\n.containerLocation {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n\n.cityContainer {\n margin-top: 15px;\n}\n\n.cityContainer div {\n z-index: 101;\n}\n\n.marginTop {\n margin-top: 12px;\n}\n\n.habeasDataLink.habeasDataLink {\n text-decoration: underline;\n}\n\n.radioButtonContainer {\n display: flex;\n justify-content: space-around;\n}\n\n.cardsImgContainer {\n margin-left: 35px;\n margin-bottom: 10px;\n}\n\n.cardsImgContainer img {\n margin-right: 10px;\n height: 25px;\n}\n\n.textUnderline {\n text-decoration: underline;\n}\n\n.locationContainer {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.locationContainer p {\n font-weight: 600;\n font-size: 26px;\n text-align: center;\n margin-bottom: 8px;\n}\n\n.containerDuesExpiry {\n display: flex;\n}\n\n.containerDuesExpiry .dues {\n margin-right: 9px;\n background-color: white;\n}\n\n.containerDuesExpiry .expiryDate {\n width: 99% !important;\n}\n\n.secureField__input {\n display: inline-block;\n width: 100%;\n line-height: 1.3;\n cursor: text;\n height: 46px;\n border-radius: 8px;\n margin-bottom: 8px;\n padding: 0 17.3px;\n border: 1px solid #919191;\n color: white;\n background-color: #fff;\n}\n\n.secureFieldInvalid {\n border: 1px solid #bc4c47;\n}\n\n.secureFieldValid {\n border: 1px solid #1b998b;\n}\n\n.secureField__inputContainer {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n\n.secureField__actions {\n position: absolute;\n top: 0;\n left: 0;\n display: -ms-flexbox;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n width: 100%;\n height: 100%;\n padding-right: 16px;\n padding-left: 16px;\n pointer-events: none;\n -ms-flex-pack: end;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n justify-content: flex-end;\n align-items: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n}\n\n.secureField__action {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n width: 40px;\n height: 100%;\n padding: 12px 0 10px;\n pointer-events: auto;\n cursor: pointer;\n transition: color 200ms ease;\n align-items: center;\n -webkit-justify-content: center;\n -ms-flex-flow: row nowrap;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n -webkit-transition: color 200ms ease;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-flow: row nowrap;\n justify-content: center;\n flex-flow: row nowrap;\n -ms-flex-align: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n}\n\n.secureField__action.secureField__actionCardIcon {\n width: 40px;\n height: 100%;\n padding: 0;\n pointer-events: none;\n}\n\n.secureField__actionCardWrap {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.secureField__cardIcon {\n position: absolute;\n top: 43%;\n right: 0;\n display: block;\n max-width: 100%;\n transform: translate3d(0, -50%, 0);\n -webkit-transform: translate3d(0, -50%, 0);\n}\n\n.labelError.labelError {\n color: #cb4242;\n margin-top: -7px;\n margin-bottom: 10px;\n font-size: 14px;\n}\n\n.paymentCardContainer {\n margin-bottom: 10px;\n}\n\n.paymentPromissoryContainer {\n margin-bottom: 10px;\n}\n\n.paymentLabelContainer .paymentCustomCreditLabel {\n font-size: 14px !important;\n color: #284859;\n line-height: 24px;\n margin: 12px 0px;\n border-radius: 8px;\n box-shadow: 0px 3px 6px #0000000f;\n padding: 5px 28px;\n margin-bottom: 15px;\n cursor: initial;\n}\n\n.paymentLabelContainer .paymentCustomCreditLabel b {\n color: #1b998b;\n}\n\n.paymentCustomCreditLabelInfo {\n}\n\n.paymentCustomerCreditContainer {\n}\n\n.arrowUp,\n.cursorPointer {\n cursor: pointer;\n}\n\n.display {\n display: none;\n}\n\n.marginLeft.marginLeft {\n margin-left: 5px;\n}\n\n.marginBottom {\n margin-bottom: 12px;\n}\n\n.loadingContainer {\n position: relative;\n height: 150px;\n display: flex;\n justify-content: center;\n}\n\n@media (min-width: 992px) {\n .buyButtonContainer {\n position: fixed;\n padding: 14px;\n margin-top: 14px;\n box-shadow: inset 0px 3px 6px #0000000f;\n width: 30%;\n right: 0;\n bottom: 0;\n background: #ffffff 0% 0% no-repeat padding-box;\n z-index: 100;\n }\n}\n\n@media (min-width: 992px) {\n .container {\n margin-bottom: 35%;\n }\n}\n\n.summary {\n margin-bottom: 22%;\n}\n\n@media screen and (max-width: 792px) {\n .paymentMethodLiteContainer {\n padding-bottom: 70px;\n }\n}\n\n```" } ]
code_mycheckout-sdk_e612606c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/kuikpay-styles.module.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container {\n width: 100%;\n}\n\n.containerDocument {\n display: flex;\n justify-content: space-between;\n}\n\n.containerDocumentType {\n width: 39%;\n}\n\n.containerDocumentNumber {\n width: 59%;\n}\n\n.containerData {\n padding: 0px 32px;\n margin-bottom: 8px;\n}\n\n.radioHide {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.checkmark {\n position: absolute;\n top: 0;\n left: 0;\n height: 17px;\n width: 17px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 50%;\n box-sizing: border-box;\n}\n\n.paymentLabelContainer {\n display: block;\n position: relative;\n padding-left: 25px;\n margin: 8px;\n cursor: pointer;\n font-size: 22px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.paymentLabelContainer label {\n cursor: pointer;\n}\n\n/* When the radio button is checked, add a blue background */\n.checkmarkChecked {\n background-color: #fff;\n border: 1px solid #1b998b;\n}\n\n/* Create the indicator (the dot/circle - hidden when not checked) */\n.checkmarkNoChecked::after {\n content: '';\n position: absolute;\n display: none;\n}\n\n/* Show the indicator (dot/circle) when checked */\n.checkmarkChecked::after {\n display: block;\n}\n\n/* Style the indicator (dot/circle) */\n.checkmarkContainer {\n position: absolute;\n top: 3px;\n left: 3px;\n width: 9px;\n height: 9px;\n border-radius: 50%;\n background-color: #1b998b;\n}\n\n.paymentLabel {\n font-size: 16px;\n}\n\n.paymentMethodContainer {\n padding: 8px 0;\n}\n\n.paymentMethodContainer input,\n.paymentMethodContainer select {\n /* quitar cuando se solucione font-family de PCI */\n font-weight: 500;\n}\n\n.paymentMethodPromissory {\n margin: 0px 15px;\n width: 90%;\n padding: 35px;\n box-shadow: 0px 3px 6px #00000029;\n margin-bottom: 15px;\n}\n\n.formGroup {\n display: flex;\n justify-content: space-between;\n}\n\n.inputGroup {\n width: 48%;\n}\n\n.labelError {\n color: #cb4242;\n}\n\n.containerLocation {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n\n.cityContainer {\n margin-top: 15px;\n}\n\n.cityContainer div {\n z-index: 101;\n}\n\n.marginTop {\n margin-top: 12px;\n}\n\n.habeasDataLink.habeasDataLink {\n text-decoration: underline;\n}\n\n.radioButtonContainer {\n display: flex;\n justify-content: space-around;\n}\n\n.cardsImgContainer {\n margin-left: 35px;\n margin-bottom: 10px;\n}\n\n.cardsImgContainer img {\n margin-right: 10px;\n height: 25px;\n}\n\n.logisticsContainer {\n border-top: 1px solid #e0e2e7;\n padding-top: 12px;\n}\n\n.textUnderline {\n text-decoration: underline;\n}\n\n.locationContainer {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.locationContainer p {\n font-weight: 600;\n font-size: 26px;\n text-align: center;\n margin-bottom: 8px;\n}\n\n.containerDuesExpiry {\n display: flex;\n align-items: flex-end;\n}\n\n.containerDuesExpiry .dues {\n margin-right: 9px;\n}\n\n.containerDuesExpiry .dues select {\n background-color: #ffffff;\n}\n\n.containerDuesExpiry .expiryDate {\n width: 99% !important;\n}\n\n.containerFifty {\n width: 50%;\n}\n\n.secureField__input {\n display: inline-block;\n width: 100%;\n line-height: 1.3;\n cursor: text;\n height: 46px;\n border-radius: 8px;\n margin-bottom: 8px;\n padding: 0 17.3px;\n border: 1px solid #919191;\n color: white;\n background-color: #fff;\n}\n\n.secureFieldLite {\n height: 23px;\n padding: 0;\n border: none;\n border-bottom: 1px solid #707685;\n border-radius: 0;\n}\n\n.secureFieldInvalid {\n border: 1px solid #bc4c47;\n}\n\n.secureFieldInvalidLite {\n border-bottom: 1px solid #bc4c47;\n}\n\n.secureFieldValid {\n border: 1px solid #a1c10c;\n}\n\n.secureFieldValidLite {\n border-bottom: 1px solid #a1c10c;\n}\n\n.secureField__inputContainer {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n\n.secureField__actions {\n position: absolute;\n top: 0;\n left: 0;\n display: -ms-flexbox;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n width: 100%;\n height: 100%;\n padding-right: 16px;\n padding-left: 16px;\n pointer-events: none;\n -ms-flex-pack: end;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n justify-content: flex-end;\n align-items: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n}\n\n.secureField__action {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n width: 40px;\n height: 100%;\n padding: 12px 0 10px;\n pointer-events: auto;\n cursor: pointer;\n transition: color 200ms ease;\n align-items: center;\n -webkit-justify-content: center;\n -ms-flex-flow: row nowrap;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n -webkit-transition: color 200ms ease;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-flow: row nowrap;\n justify-content: center;\n flex-flow: row nowrap;\n -ms-flex-align: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n}\n\n.secureField__action.secureField__actionCardIcon {\n width: 40px;\n height: 100%;\n padding: 0;\n pointer-events: none;\n}\n\n.secureField__actionCardWrap {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.secureField__cardIcon {\n position: absolute;\n top: 43%;\n right: 0;\n display: block;\n max-width: 100%;\n transform: translate3d(0, -50%, 0);\n -webkit-transform: translate3d(0, -50%, 0);\n}\n\n.labelError.labelError {\n color: #cb4242;\n margin-top: -7px;\n margin-bottom: 10px;\n font-size: 14px;\n}\n\n.paymentCardContainer {\n margin-bottom: 10px;\n border-bottom: 1px solid #e0e2e7;\n padding-bottom: 10px;\n}\n\n.paymentPromissoryContainer {\n margin-bottom: 10px;\n padding-bottom: 10px;\n}\n\n.paymentLabelContainer .paymentCustomCreditLabel {\n font-size: 14px !important;\n color: #284859;\n line-height: 24px;\n margin: 12px 0px;\n border-radius: 8px;\n box-shadow: 0px 3px 6px #0000000f;\n padding: 5px 28px;\n margin-bottom: 15px;\n cursor: initial;\n}\n\n.paymentLabelContainer .paymentCustomCreditLabel b {\n color: #1b998b;\n}\n\n.paymentCustomCreditLabelInfo {\n font-weight: bold;\n color: #1b998b;\n}\n\n.paymentCustomerCreditContainer .checkmark {\n top: 1.5px;\n}\n\n.cursorPointer {\n cursor: pointer;\n}\n\n.display {\n display: none;\n}\n\n.marginLeft.marginLeft {\n margin-left: 5px;\n}\n\n.marginBottom {\n margin-bottom: 12px;\n}\n\n.loadingContainer {\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n@media (min-width: 992px) {\n .buyButtonContainer {\n position: fixed;\n padding: 14px;\n margin-top: 14px;\n box-shadow: inset 0px 3px 6px #0000000f;\n width: 30%;\n right: 0;\n bottom: 0;\n background: #ffffff 0% 0% no-repeat padding-box;\n z-index: 100;\n }\n}\n\n@media (min-width: 992px) {\n .container {\n margin-bottom: 35%;\n }\n}\n\n.summary {\n margin-bottom: 22%;\n}\n\n@media screen and (max-width: 792px) {\n .paymentMethodLiteContainer {\n padding-bottom: 70px;\n }\n}\n\n```" } ]
code_mycheckout-sdk_a20976d9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/PaymentsForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n/* eslint-disable vtex/prefer-early-return */\n/* eslint-disable prettier/prettier */\nimport React, { Fragment, useEffect, useState } from 'react'\nimport Payment from 'payment'\nimport { pathOr } from 'ramda'\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport { useInputValue } from '../../hooks/useInputValue'\nimport { formatter, regularExpressions } from '../../utils'\nimport { Alert, Button, Input } from '../shared'\nimport vtexStyles from './vtex-styles.module.css'\nimport kuikpayStyles from './kuikpay-styles.module.css'\nimport genericStyles from './generic-styles.module.css'\nimport useFormatMessage from '../../i18n/useFormatMessage'\nimport { useValidateStyles } from '../../hooks/useValidateStyles'\nimport InputCard from './InputCard'\nimport { useUnits } from '../../hooks/useUnits'\nimport { useActionsDispatch } from '../../contexts/ActionsProviderV2'\nimport { InputCVCSF } from '../UserInfo/InputCVC'\nimport {\n useUserData,\n useUserDataDispatch,\n} from '../../contexts/UserDataProvider'\nimport {\n clearNumber,\n formatExpiryDate,\n selectIdImgCard,\n} from '../../utils/payments'\nimport type {\n DataPCIChange,\n DataPCIGetCardInfo,\n DataPCISuccess,\n PaymentForm,\n SelectValue,\n} from '../../interfaces'\nimport {\n selectTheme,\n selectIsMobile,\n selectSettings,\n} from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport { selectItemData } from '../../contexts/global-context/reducers/cartSlice'\nimport { usePCIScript } from '../../hooks/usePCIScript'\nimport CouponContainer from '../Coupon/CouponContainer'\nimport {\n selectMainPayment,\n selectItems,\n setCardBin,\n setCardInfo,\n setPaymetId,\n} from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport type { InstallmentOptionsSimulation } from '../../interfaces/simulation'\nimport { useSelectValue } from '../../hooks/useSelectValue'\nimport { SelectDues } from '../UserInfo/SelectDues'\nimport { useFonts } from '../../hooks/useFonts'\nimport { selectTotalValue } from '../../contexts/global-context/reducers/simulationSlice'\n\nconst beforeOfChangeDocument = (val: string) => {\n return clearNumber(val)\n}\n\nconst beforeOfChangeExpiryDate = (val: string) => {\n return formatExpiryDate(val)\n}\n\nconst PaymentsForm = ({\n disabled,\n error,\n handlePayment,\n payments,\n selectedCard,\n setError,\n handledPaymentDisabled,\n setFranchiseImg,\n}: PaymentForm) => {\n const dispatchUserData = useUserDataDispatch()\n const [secureFields, setSecureFields] = useState(null)\n const [isValidCard, setIsValidCard] = useState(null)\n const [IsValidFranchise, setIsValidFranchise] = useState(true)\n const [isValidCVC, setIsValidCVC] = useState(null)\n const [imgCard, setImgCard] = useState(null)\n const [lastDigits, setLastDigits] = useState(null)\n const [installments, setInstallments] = useState<\n InstallmentOptionsSimulation[]\n >([])\n\n const { selectedItem } = useSelector(selectItemData)\n const selectedPayment = useSelector(selectMainPayment)\n const items = useSelector(selectItems)\n\n const { paymentData, totalOfferings } = useUserData()\n const value = useSelector(selectTotalValue)\n\n const dispatchGlobal = useDispatch()\n\n const dispatchActions = useActionsDispatch()\n const { merchantID } = usePCIScript()\n const theme = useSelector(selectTheme)\n const { isLiteVersion } = useSelector(selectSettings)\n const isMobile = useSelector(selectIsMobile)\n const name = useInputValue('')\n const identification = useInputValue('', beforeOfChangeDocument)\n const expiryDate = useInputValue('', beforeOfChangeExpiryDate)\n const dues: SelectValue = useSelectValue(null)\n const units = useUnits(items)\n const globalStyles = useValidateStyles(true)\n const { fonts } = useFonts()\n\n const isDisabled = !(\n name.isValid &&\n identification.isValid &&\n dues.isValid &&\n expiryDate.isValid &&\n isValidCard &&\n isValidCVC\n )\n\n let styles = kuikpayStyles\n\n if (theme === 'vtex') {\n styles = vtexStyles\n } else if (theme === 'generic') {\n styles = genericStyles\n }\n\n const onBlurExpiryDate = () => {\n const { value: expiryValue, setIsValid } = expiryDate\n\n if (\n expiryValue === '' ||\n expiryValue.length < 5 ||\n !Payment?.fns?.validateCardExpiry(expiryValue)\n ) {\n setIsValid(false)\n } else {\n setIsValid(true)\n }\n }\n\n const onChangeExpiryDate = (\n e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>\n ) => {\n const { setIsValid, onChange } = expiryDate\n\n if (e.target.value === '') {\n setIsValid(false)\n } else {\n setIsValid(true)\n }\n\n if (Payment?.fns?.validateCardExpiry(e.target.value)) {\n expiryDate?.setIsValid(true)\n }\n\n onChange(e)\n }\n\n const onPaymentDisabled = () => {\n if (handledPaymentDisabled) handledPaymentDisabled()\n if (name.isValid === null) name.setIsValid(false)\n if (identification.isValid === null) identification.setIsValid(false)\n if (dues.isValid === null) dues.setIsValid(false)\n if (expiryDate.isValid === null) expiryDate.setIsValid(false)\n if (isValidCVC === null) setIsValidCVC(false)\n if (isValidCard === null) setIsValidCard(false)\n }\n\n const successCallback = (transactionId: string, franchise: string) => {\n setError(null)\n const paymentSystem =\n pathOr('', ['paymentId'], selectedPayment) ||\n pathOr('', ['paymentSystem'], selectedCard)\n\n const dataCard = {\n additionalData: [\n {\n key: 'transactionId',\n value: transactionId,\n },\n {\n key: 'installments',\n value: dues?.value?.value,\n },\n {\n key: 'paymentSystem',\n value: paymentSystem,\n },\n ],\n expirationDate: expiryDate.value,\n holderName: name.value,\n holderDocument: identification.value,\n gateway: 'noop',\n bin: paymentData.bin,\n paymentMethod: 'tc',\n franchise,\n number: lastDigits,\n }\n\n handlePayment(dataCard)\n }\n\n const onChangeSecureField = (sf: any) => {\n sf.on('change', (data: DataPCIChange) => {\n const { event, fields } = data\n\n if (event.field === 'cardNumber') {\n if (fields.cardNumber?.paymentMethod) {\n const { paymentMethod } = fields.cardNumber\n const dataPaymentMethod = selectIdImgCard(paymentMethod)\n\n const { installmentsOptions: installmentsOpt, id } =\n payments.paymentMethods.find(\n (item) =>\n item.name\n .toLowerCase()\n .includes(dataPaymentMethod?.nameComplete?.toLowerCase()) ||\n payments.paymentMethods.length === 1\n ) || null\n\n if (id !== selectedPayment.paymentId) {\n dispatchGlobal(setPaymetId(id))\n }\n\n if (\n installmentsOpt.length > 0 &&\n payments.paymentMethods.find(\n (p) =>\n p.isCustom ||\n p.name.toLowerCase() === dataPaymentMethod?.nameComplete\n )\n ) {\n setFranchiseImg(dataPaymentMethod?.name)\n setImgCard(dataPaymentMethod?.id)\n setIsValidFranchise(true)\n setInstallments(installmentsOpt || [])\n } else {\n setInstallments([])\n dues.reset()\n if (fields.cardNumber.length >= 2) {\n setIsValidFranchise(false)\n setIsValidCard(false)\n\n return\n }\n }\n } else {\n setInstallments([])\n dues.reset()\n setImgCard(null)\n setFranchiseImg(null)\n }\n\n if (\n event.type === 'blur' &&\n (fields.cardNumber.length === 0 || !fields.cardNumber.valid)\n ) {\n setIsValidCard(false)\n }\n\n if (fields.cardNumber.valid) {\n sf.getCardInfo()\n setIsValidCard(true)\n }\n }\n\n if (event.field === 'cvv') {\n if (\n event.type === 'blur' &&\n (fields.cvv.length === 0 || !fields.cvv.valid)\n ) {\n setIsValidCVC(false)\n if (isLiteVersion && isMobile) sf.setStyle('cvv', 'color: #bc4c47')\n }\n\n if (fields.cvv.valid) {\n setIsValidCVC(true)\n }\n }\n })\n }\n\n const placeholder = {\n cardNumber: useFormatMessage('store/checkoutless.card.cardNumber'),\n cvv: useFormatMessage('store/checkoutless.card.securityCodeCVV'),\n }\n\n useEffect(() => {\n const sf = new SecureFields()\n\n dispatchActions({\n type: 'SET_IS_LOADING_CVV_FIELD',\n args: true,\n })\n\n sf?.initTokenize(\n merchantID,\n {\n cardNumber: {\n placeholderElementId: `card-number-placeholder${\n selectedItem?.itemId || 'not-id'\n }`,\n inputType: 'tel',\n },\n cvv: {\n placeholderElementId: `cvv-placeholder`,\n inputType: 'tel',\n },\n },\n {\n '*': `font-family: ${fonts}`,\n }\n )\n\n const sfStyles = {\n colorPlaceholder: 'color: #919191',\n color: 'color: #011d1a',\n fontSize: 'font-size: 16px',\n fontFamily: `font-family: ${fonts}`,\n paddingLeft: '5px',\n }\n\n sf.on('ready', () => {\n dispatchActions({\n type: 'SET_IS_LOADING_CVV_FIELD',\n args: false,\n })\n\n sf.setPlaceholder('cardNumber', placeholder.cardNumber)\n sf.setPlaceholder('cvv', placeholder.cvv)\n sf.setStyle('cvv', sfStyles.fontSize)\n sf.setStyle('cardNumber', sfStyles.fontSize)\n sf.setStyle('cvv', sfStyles.color)\n sf.setStyle('cardNumber', sfStyles.color)\n sf.setStyle('cvv', sfStyles.fontFamily)\n sf.setStyle('cardNumber', sfStyles.fontFamily)\n sf.setStyle('cvv', sfStyles.paddingLeft)\n sf.setStyle('cardNumber', sfStyles.paddingLeft)\n sf.setStyle('cvv:focus', 'outline: 0')\n sf.setStyle('cardNumber:focus', 'outline: 0')\n sf.setStyle('cvv::placeholder', sfStyles.colorPlaceholder)\n sf.setStyle('cardNumber::placeholder', sfStyles.colorPlaceholder)\n })\n\n const cardContainer = document.getElementById(\n `card-number-container${selectedItem?.itemId || 'not-id'}`\n )\n\n const cvvContainer = document.getElementById(`cvv-container-inside`)\n\n const setFocus = (input: string) => sf.focus(input)\n\n cardContainer.addEventListener('click', () => setFocus('cardNumber'))\n cvvContainer.addEventListener('click', () => setFocus('cvv'))\n\n sf.on('error', (data: { error: string; action: string }) => {\n const { action } = data\n\n if (action === 'submit') {\n setError('store/checkoutless.register.card.numberError')\n }\n })\n\n onChangeSecureField(sf)\n\n setSecureFields(sf)\n // Solo se establece cuando una vez haya hecho submit\n // sf.on('validate', (data: any) => {\n // console.log('data', data)\n // })\n\n return () => {\n sf?.destroy()\n cardContainer?.removeEventListener('click', () => setFocus('cardNumber'))\n cvvContainer?.removeEventListener('click', () => setFocus('cvv'))\n }\n }, [])\n\n useEffect(() => {\n if (secureFields) {\n secureFields.on('success', (data: DataPCISuccess) => {\n if (data.transactionId) {\n let franchise = data?.cardInfo?.brand?.toLowerCase()\n\n if (franchise?.includes('visa')) {\n franchise = 'visa'\n } else if (\n franchise?.includes('mci') ||\n franchise?.includes('mastercard')\n ) {\n franchise = 'master'\n } else if (franchise?.includes('diners')) {\n franchise = 'diner'\n } else if (franchise?.includes('american express')) {\n franchise = 'amex'\n }\n\n dispatchGlobal(setCardInfo({ franchise }))\n\n successCallback(data.transactionId, franchise)\n }\n })\n }\n }, [name, identification, expiryDate, dues, paymentData?.bin, lastDigits])\n\n useEffect(() => {\n if (secureFields) {\n onChangeSecureField(secureFields)\n\n secureFields.on('cardInfo', (data: DataPCIGetCardInfo) => {\n const dataDispatch: any = {\n type: 'SET_BIN',\n args: null,\n }\n\n if (data?.maskedCard) {\n dataDispatch.args = data?.maskedCard?.substr(0, 6)\n let limitDigits = 4\n\n if (data?.paymentMethod === 'AMX') {\n limitDigits = 3\n } else if (data?.paymentMethod === 'DIN') {\n limitDigits = 2\n }\n\n const number = data?.maskedCard?.substring(\n data?.maskedCard?.length,\n data?.maskedCard?.length - limitDigits\n )\n\n setLastDigits(number)\n }\n\n if (selectedPayment.bin !== dataDispatch.args) {\n dispatchGlobal(setCardBin(dataDispatch.args))\n }\n\n dispatchUserData(dataDispatch)\n })\n }\n }, [selectedPayment, secureFields])\n\n useEffect(() => {\n if (name.isValid && identification.isValid && expiryDate.isValid) {\n dispatchGlobal(\n setCardInfo({\n holderDocument: identification.value,\n holderName: name.value,\n expirationDate: expiryDate.value,\n })\n )\n }\n }, [name.value, identification.value, expiryDate.value])\n\n return (\n <Fragment>\n {error && (\n <Alert\n type=\"error\"\n text=\"store/checkoutless.register.card.numberError\"\n />\n )}\n <div className={globalStyles.gridFormTwoCols} data-more-left=\"true\">\n <div>\n <InputCard\n theme={theme}\n isValid={isValidCard}\n imgCard={imgCard}\n itemId={selectedItem?.itemId || 'not-id'}\n />\n {!isValidCard && isValidCard !== null && (\n <p className={styles.labelError}>\n {IsValidFranchise\n ? useFormatMessage(\n 'store/checkoutless.register.card.numberError'\n )\n : useFormatMessage(\n 'store/checkoutless.register.card.franchiseError'\n )}\n </p>\n )}\n </div>\n <div>\n <InputCVCSF\n isValid={isValidCVC}\n className={`${styles.secureField__input} ${\n isValidCVC === false ? styles.secureFieldInvalidLite : null\n } ${isValidCVC === true ? styles.secureFieldValidLite : null} ${\n styles.secureFieldLite\n }`}\n itemId={selectedItem?.itemId || 'not-id'}\n showError={false}\n />\n </div>\n\n <div className={styles.marginBottom}>\n <Input\n placeholder=\"store/checkoutless.register.card.name\"\n errorMessage=\"store/checkoutless.register.nameError\"\n regularExpression={regularExpressions.name}\n name=\"name\"\n maxLength={30}\n {...name}\n />\n </div>\n <div className={styles.marginBottom}>\n <Input\n type=\"tel\"\n placeholder=\"store/checkoutless.register.card.expiryDate\" // Cambiar a Fecha de vencimiento\n errorMessage=\"store/checkoutless.register.card.expiryDateError\"\n blurFunction={onBlurExpiryDate}\n name=\"expiryDate\"\n className={styles.expiryDate}\n {...expiryDate}\n onChange={onChangeExpiryDate}\n />\n </div>\n\n <div className={styles.marginBottom}>\n <Input\n placeholder=\"store/checkoutless.register.card.document\"\n errorMessage=\"store/checkoutless.register.documentError\"\n regularExpression={regularExpressions.document}\n name=\"identification\"\n {...identification}\n />\n </div>\n <div className={`${styles.marginBottom}`}>\n <SelectDues dues={dues} installments={installments} />\n </div>\n <div data-col=\"two-col\">\n <CouponContainer />\n </div>\n </div>\n\n <div\n className={`${globalStyles.buyButtonContainer} ${globalStyles.buyButtonContainerFixed}`}\n >\n <Button\n value={'store/checkoutless.register.pay'}\n onClick={() => secureFields?.submit()}\n onClickDisabled={onPaymentDisabled}\n customValue={`${formatter.format(value + totalOfferings)}`}\n disabled={isDisabled || disabled}\n units={units}\n id=\"kuikpay-purchase-button\"\n isFixed={true}\n isPaymentButton={true}\n />\n </div>\n </Fragment>\n )\n}\n\nexport default PaymentsForm\n\n```" } ]
code_mycheckout-sdk_3654035c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/PaymentezForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useState, useEffect, Fragment } from 'react'\nimport { useSelector } from 'react-redux'\nimport { pathOr } from 'ramda'\n\nimport { useInputValue } from '../../hooks/useInputValue'\nimport { useUserData } from '../../contexts/UserDataProvider'\nimport type {\n DataPCIPGetCardInfo,\n DataPCIPSuccess,\n SelectValue,\n} from '../../interfaces'\nimport { PaymentForm } from '../../interfaces'\nimport { formatter, regularExpressions } from '../../utils'\nimport { useValidateStyles } from '../../hooks/useValidateStyles'\nimport { Button, Input } from '../shared'\nimport kuikpayStyles from './kuikpay-styles.module.css'\nimport vtexStyles from './vtex-styles.module.css'\nimport { useActionsDispatch } from '../../contexts/ActionsProviderV2'\nimport { selectTheme } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport genericStyles from './generic-styles.module.css'\nimport {\n clearNumber,\n copyAttributes,\n formatExpiryDate,\n selectIdImgCard,\n} from '../../utils/payments'\nimport { useUnits } from '../../hooks/useUnits'\nimport { useSelectValue } from '../../hooks/useSelectValue'\nimport { SelectDues } from '../UserInfo/SelectDues'\nimport CouponContainer from '../Coupon/CouponContainer'\nimport { selectProfile } from '../../contexts/global-context/reducers/orderFormDataSlice'\n\nconst beforeOfChangeDocument = (val: string) => {\n return clearNumber(val)\n}\n\nconst beforeOfChangeExpiryDate = (val: string) => {\n return formatExpiryDate(val)\n}\n\nconst PaymentezForm = ({\n handlePayment,\n setError,\n disabled,\n setFranchiseImg,\n selectedCard,\n handledPaymentDisabled,\n payments,\n}: PaymentForm) => {\n const { value, items, paymentData, totalOfferings } = useUserData()\n\n const { email } = useSelector(selectProfile)\n\n const [IsValidFranchise, setIsValidFranchise] = useState(true)\n\n const [installments, setInstallments] = useState([])\n\n const dispatchActions = useActionsDispatch()\n\n const name = useInputValue('')\n const identification = useInputValue('', beforeOfChangeDocument)\n const cvv = useInputValue('')\n const expiryDate = useInputValue('', beforeOfChangeExpiryDate)\n const cardNumber = useInputValue('')\n const globalStyles = useValidateStyles(true)\n const theme = useSelector(selectTheme)\n const dues: SelectValue = useSelectValue(null)\n\n const units = useUnits(items)\n\n const styles = {\n kuikpay: kuikpayStyles,\n vtex: vtexStyles,\n generic: genericStyles,\n }[theme]\n\n const isDisabled = !(\n name.isValid &&\n identification.isValid &&\n dues.isValid &&\n expiryDate.isValid &&\n cardNumber.isValid &&\n cvv.isValid\n )\n\n const onBlurExpiryDate = () => {\n expiryDate.setIsValid(\n PaymentForm.isExpiryValid(\n PaymentForm.ctx.getExpiryMonth(),\n PaymentForm.ctx.getExpiryYear()\n )\n )\n }\n\n const onChangeExpiryDate = (\n e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>\n ) => {\n PaymentForm.ctx.expiryMonthYearInput.val(e.target.value.substring(0, 5))\n PaymentForm.ctx.expiryYearInput.val(e.target.value.substring(3, 5))\n PaymentForm.ctx.expiryMonthInput.val(PaymentForm.ctx.expiryMonth())\n\n if (PaymentForm.ctx.expiryMonthYearInput.val().length === 5) {\n expiryDate.setIsValid(\n PaymentForm.isExpiryValid(\n PaymentForm.ctx.getExpiryMonth(),\n PaymentForm.ctx.getExpiryYear()\n )\n )\n }\n\n expiryDate.onChange(e)\n }\n\n const onChangeCvv = (\n e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>\n ) => {\n PaymentForm.ctx.cvcInput.val(PaymentForm.numbersOnlyString(e.target.value))\n if (PaymentForm.ctx.cvcInput.val().length >= 3) {\n PaymentForm.ctx.cvcLenght = PaymentForm.ctx.cvcInput.val().length\n cvv.setIsValid(PaymentForm.ctx.isCvcValid())\n }\n\n cvv.onChange(e)\n }\n\n const onBlurCvv = () => {\n cvv.setIsValid(PaymentForm.ctx.isCvcValid())\n }\n\n const onKeyDownCardNumber = (\n e: React.KeyboardEvent<HTMLInputElement | HTMLSelectElement>\n ) => {\n PaymentForm.handleMaskedNumberInputKey(\n e,\n PaymentForm.ctx.creditCardNumberMask\n )\n PaymentForm.ctx.cardNumberInput.val($(e.target).val())\n cardNumber.setValue(PaymentForm.ctx.cardNumberInput.val())\n }\n\n const onBlurCardNumber = () => {\n cardNumber.setIsValid(PaymentForm.ctx.isCardNumberValid())\n }\n\n const refreshCardType = () => {\n const { setIsValid } = cardNumber\n\n const bin = PaymentForm.ctx.cardNumberInput\n .val()\n .replaceAll(' ', '')\n .substring(0, 6)\n\n if (bin.length >= 6 && !PaymentForm.ctx.cardType) {\n Payment.getBinInformation(\n bin,\n PaymentForm.ctx,\n (r: { brand_name: string; card_type: string; nip: string }) => {\n const paymentMethod = r.brand_name\n\n PaymentForm.ctx.cardType = r.card_type\n PaymentForm.ctx.nip = r.nip\n if (paymentMethod) {\n const dataPaymentMethod = selectIdImgCard(paymentMethod)\n\n const { installmentsOptions: installment } =\n payments.paymentMethods.find(\n (item) =>\n item.name\n .toLowerCase()\n .includes(dataPaymentMethod?.nameComplete?.toLowerCase()) ||\n payments.paymentMethods.length === 1\n ) || null\n\n if (\n installment &&\n installment.length > 0 &&\n payments.paymentMethods?.find(\n (p: { name: string }) =>\n p.name.toLowerCase() === dataPaymentMethod?.nameComplete\n )\n ) {\n PaymentForm.ctx.numberBin = bin\n setFranchiseImg(dataPaymentMethod?.name)\n setIsValidFranchise(true)\n setInstallments(installment || [])\n } else {\n setInstallments([])\n dues.reset()\n setIsValidFranchise(false)\n setIsValid(false)\n }\n }\n\n return paymentMethod\n },\n () => {\n setIsValidFranchise(false)\n }\n )\n } else if (bin.length < 6) {\n PaymentForm.ctx.cardType = ''\n setInstallments([])\n dues.reset()\n setFranchiseImg(null)\n }\n }\n\n const onPasteCardNumber = (\n e: React.ClipboardEvent<HTMLInputElement | HTMLSelectElement>\n ) => {\n const data = e.clipboardData.getData('Text')\n\n PaymentForm.ctx.cardType = ''\n PaymentForm.ctx.cardNumberInput.val(PaymentForm.numbersOnlyString(data))\n refreshCardType()\n PaymentForm.ctx.refreshCreditCardNumberFormat()\n cardNumber.setValue(PaymentForm.ctx.cardNumberInput.val())\n e.preventDefault()\n }\n\n useEffect(() => {\n dispatchActions({\n type: 'SET_IS_LOADING_CVV_FIELD',\n args: true,\n })\n\n const base = `.payment`\n\n PaymentForm.ctx = $(base).PaymentForm('init').data('paymentform')\n\n const cvcNode = $(`${base} .custom-cvc`)\n const cardNode = $(`${base} .custom-card-number`)\n const expiryMonthNode = $(`${base} .custom-expiry-month`)\n const expiryYearNode = $(`${base} .custom-expiry-year`)\n const expiryMonthYearNode = $(`${base} .custom-expiry`)\n\n copyAttributes(`${base} .cvc`, cvcNode, [\n 'class',\n 'placeholder',\n 'maxlength',\n ])\n copyAttributes(`${base} .card-number`, cardNode, ['class', 'placeholder'])\n copyAttributes(`${base} .expiry-year`, expiryYearNode, ['class'])\n copyAttributes(`${base} .expiry-month`, expiryMonthNode, ['class'])\n copyAttributes(`${base} .expiry`, expiryMonthYearNode, [\n 'class',\n 'placeholder',\n ])\n PaymentForm.ctx.cvcInput = cvcNode\n PaymentForm.ctx.cardNumberInput = cardNode\n PaymentForm.ctx.expiryYearInput = expiryYearNode\n PaymentForm.ctx.expiryMonthInput = expiryMonthNode\n PaymentForm.ctx.expiryMonthYearInput = expiryMonthYearNode\n\n $(`${base} .card-number-wrapper`).remove()\n $(`${base} .cvc-wrapper`).remove()\n $(`${base} .expiry-wrapper`).remove()\n\n dispatchActions({\n type: 'SET_IS_LOADING_CVV_FIELD',\n args: false,\n })\n }, [])\n\n const successCallback = (data: DataPCIPSuccess) => {\n setError(null)\n const { card } = data\n const type = PaymentForm.ctx.cardType.toLowerCase()\n const limitDigits = { [type]: 4, ax: 3, di: 2 }[type]\n const franchise = {\n [type]: type,\n vi: 'visa',\n mci: 'master',\n mc: 'master',\n di: 'diner',\n ax: 'amex',\n }[type]\n\n const number = card.number.substring(\n card.number.length,\n card.number.length - limitDigits\n )\n\n const paymentSystem =\n pathOr('', ['temporalPaymentSystem'], paymentData) ||\n pathOr('', ['paymentSystem'], selectedCard)\n\n const dataCard = {\n additionalData: [\n {\n key: 'installments',\n value: dues?.value?.value,\n },\n {\n key: 'paymentSystem',\n value: paymentSystem,\n },\n ],\n token: card.token,\n expirationDate: expiryDate.value,\n holderName: name.value,\n holderDocument: identification.value,\n gateway: 'noop',\n bin: card.bin,\n cvv: cvv.value,\n paymentMethod: 'tc',\n franchise,\n number,\n }\n\n handlePayment(dataCard)\n }\n\n const onPaymentDisabled = () => {\n if (handledPaymentDisabled) handledPaymentDisabled()\n if (name.isValid === null) name.setIsValid(false)\n if (identification.isValid === null) identification.setIsValid(false)\n if (dues.isValid === null) dues.setIsValid(false)\n if (expiryDate.isValid === null) expiryDate.setIsValid(false)\n if (cvv.isValid === null) cvv.setIsValid(false)\n if (cardNumber.isValid === null) cardNumber.setIsValid(false)\n }\n\n const handleClick = () => {\n const { card } = PaymentForm.ctx.getCard() as DataPCIPGetCardInfo\n\n try {\n card.holder_name = name.value\n Payment.addCard(\n email,\n email,\n { card },\n successCallback,\n (e: { error: { type: string } }) => {\n if (e.error.type.includes('Card already added')) {\n successCallback({\n card: {\n ...card,\n bin: PaymentForm.ctx.numberBin,\n expiry_month: card.expiry_month.toString(),\n expiry_year: card.expiry_year.toString(),\n token: e.error.type.split('Card already added: ')[1],\n message: e.error.type,\n },\n })\n } else {\n setError('store/checkoutless.register.creditCardError')\n }\n }\n )\n } catch {\n setError('store/checkoutless.register.creditCardError')\n }\n }\n\n return (\n <Fragment>\n <div\n className={`${globalStyles.gridFormTwoCols} ${'payment'}`}\n id=\"my-card\"\n data-more-left=\"true\"\n >\n <div className={styles.marginBottom}>\n <Input\n type=\"tel\"\n placeholder=\"store/checkoutless.card.cardNumber\"\n {...cardNumber}\n errorMessage={\n !IsValidFranchise && IsValidFranchise !== null\n ? 'store/checkoutless.register.card.franchiseError'\n : 'store/checkoutless.register.card.numberError'\n }\n className=\"custom-card-number\"\n name=\"card-number\"\n blurFunction={onBlurCardNumber}\n onKeyDown={onKeyDownCardNumber}\n onPaste={onPasteCardNumber}\n onCustomKeyUpEvent={refreshCardType}\n />\n </div>\n\n <div className={styles.marginBottom}>\n <Input\n type=\"tel\"\n placeholder=\"store/checkoutless.card.cvv\"\n errorMessage=\"store/checkoutless.card.invalidSecurityCodeError\"\n {...cvv}\n className={`custom-cvc`}\n name=\"cvc\"\n maxLength={4}\n onChange={onChangeCvv}\n blurFunction={onBlurCvv}\n showError={false}\n />\n </div>\n\n <div className={styles.marginBottom}>\n <Input\n placeholder=\"store/checkoutless.register.card.name\"\n errorMessage=\"store/checkoutless.register.nameError\"\n regularExpression={regularExpressions.name}\n name=\"name\"\n maxLength={30}\n {...name}\n />\n </div>\n\n <div className={styles.marginBottom}>\n <Input\n type=\"tel\"\n placeholder=\"store/checkoutless.register.card.expiryDate\"\n errorMessage=\"store/checkoutless.register.card.expiryDateError\"\n blurFunction={onBlurExpiryDate}\n name=\"expiry\"\n className={`custom-expiry ${styles.expiryDate}`}\n {...expiryDate}\n onChange={onChangeExpiryDate}\n />\n <input className=\"custom-expiry-month\" type=\"hidden\"></input>\n <input className=\"custom-expiry-year\" type=\"hidden\"></input>\n </div>\n\n <div className={styles.marginBottom}>\n <Input\n placeholder=\"store/checkoutless.register.card.document\"\n errorMessage=\"store/checkoutless.register.documentError\"\n regularExpression={regularExpressions.document}\n name=\"identification\"\n {...identification}\n />\n </div>\n\n <div className={`${styles.marginBottom}`}>\n <SelectDues dues={dues} installments={installments} />\n </div>\n <div data-col=\"two-col\">\n <CouponContainer />\n </div>\n </div>\n <div\n className={`${globalStyles.buyButtonContainer} ${globalStyles.buyButtonContainerFixed}`}\n >\n <Button\n value={'store/checkoutless.register.pay'}\n onClick={handleClick}\n onClickDisabled={onPaymentDisabled}\n customValue={`${formatter.format(value + totalOfferings)}`}\n disabled={isDisabled || disabled}\n units={units}\n id=\"kuikpay-purchase-button\"\n isFixed={false}\n isPaymentButton={true}\n />\n </div>\n </Fragment>\n )\n}\n\nexport default PaymentezForm\n\n```" } ]
code_mycheckout-sdk_282905b5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/MercadoPagoForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useEffect, useState } from 'react'\nimport { useIntl } from 'react-intl'\nimport { useSelector } from 'react-redux'\n\nimport constants from '../../utils/constants'\nimport { useUserData } from '../../contexts/UserDataProvider'\nimport type { PaymentForm } from '../../interfaces'\nimport { formatter } from '../../utils'\nimport { Button } from '../shared'\nimport vtexStyles from './vtex-styles.module.css'\nimport kuikpayStyles from './kuikpay-styles.module.css'\nimport genericStyles from './generic-styles.module.css'\nimport { useValidateStyles } from '../../hooks/useValidateStyles'\nimport { selectTheme } from '../../contexts/global-context/reducers/uiSettingsSlice'\n// import globalVtexStyles from '../../vtex-styles.module.css'\n// import globalKuikpayStyles from '../../kuikpay-styles.module.css'\n\ninterface Error {\n code: string\n message: string\n}\n\nconst MercadoPagoForm = ({ handlePayment, loading, disabled }: PaymentForm) => {\n const intl = useIntl()\n const { value, clientProfileData, totalOfferings } = useUserData()\n const theme = useSelector(selectTheme)\n const [errors, setErrors] = useState([])\n const [messages, setMessages] = useState<any>({})\n const mp = new MercadoPago(constants.mercadoPagoPublicKey)\n const global = useValidateStyles()\n\n let styles = kuikpayStyles\n\n if (theme === 'vtex') {\n styles = vtexStyles\n } else if (theme === 'generic') {\n styles = genericStyles\n }\n\n const loadCardForm = () => {\n const cardForm = mp.cardForm({\n amount: value.toString(),\n autoMount: true,\n form: {\n id: 'form-checkout',\n cardholderName: {\n id: 'form-checkout__cardholderName',\n placeholder: intl.formatMessage({\n id: 'store/checkoutless.register.creditCardName',\n }),\n },\n cardNumber: {\n id: 'form-checkout__cardNumber',\n placeholder: intl.formatMessage({\n id: 'store/checkoutless.register.creditCardNumber',\n }),\n },\n cardExpirationMonth: {\n id: 'form-checkout__cardExpirationMonth',\n placeholder: 'MM',\n },\n cardExpirationYear: {\n id: 'form-checkout__cardExpirationYear',\n placeholder: 'YY',\n },\n securityCode: {\n id: 'form-checkout__securityCode',\n placeholder: 'CVC',\n },\n installments: {\n id: 'form-checkout__installments',\n placeholder: 'Cuotas',\n },\n identificationType: {\n id: 'form-checkout__identificationType',\n placeholder: 'Tipo de documento',\n },\n identificationNumber: {\n id: 'form-checkout__identificationNumber',\n placeholder: 'Número de documento',\n },\n issuer: {\n id: 'form-checkout__issuer',\n placeholder: 'Banco emisor',\n },\n },\n callbacks: {\n onFormMounted: (error: string) => {\n if (error) return console.warn('Form Mounted handling error: ', error)\n },\n onCardTokenReceived: (error: any) => {\n if (error) return setErrors(error)\n },\n onSubmit: (event: any) => {\n event.preventDefault()\n\n setErrors([])\n\n const {\n paymentMethodId,\n // issuerId,\n // cardholderEmail: email,\n // amount,\n token,\n // installments,\n // identificationNumber,\n // identificationType,\n } = cardForm.getCardFormData()\n\n handlePayment({\n token,\n number: '1',\n gateway: 'Mercadopago',\n franchise: paymentMethodId,\n paymentMethod: 'tc',\n })\n },\n },\n })\n }\n\n useEffect(() => {\n setTimeout(() => {\n loadCardForm()\n }, 1000)\n }, [])\n\n useEffect(() => {\n if (!errors.length) {\n setMessages({})\n\n return\n }\n\n const formErrors = {}\n\n errors.forEach((error: Error) => {\n formErrors[error.code] = error.message\n })\n\n setMessages(formErrors)\n }, [errors])\n\n return (\n <form id=\"form-checkout\" className=\"payment-form\">\n <div>\n <input\n type=\"text\"\n name=\"cardNumber\"\n id=\"form-checkout__cardNumber\"\n maxLength={16}\n />\n {messages[205] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.cardNumberError',\n })}\n </p>\n )}\n\n {messages.E301 && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.invalidCardNumberError',\n })}\n </p>\n )}\n </div>\n\n <div className={styles.formGroup}>\n <div className={styles.inputGroup}>\n <input\n type=\"text\"\n name=\"cardExpirationMonth\"\n id=\"form-checkout__cardExpirationMonth\"\n maxLength={2}\n />\n {messages[208] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.cardExpirationMonthError',\n })}\n </p>\n )}\n {messages[325] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.invalidCardExpirationMonthError',\n })}\n </p>\n )}\n </div>\n <div className={styles.inputGroup}>\n <input\n type=\"text\"\n name=\"cardExpirationYear\"\n id=\"form-checkout__cardExpirationYear\"\n maxLength={2}\n />\n {messages[209] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.cardExpirationYearError',\n })}\n </p>\n )}\n {messages[326] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.invalidCardExpirationYearError',\n })}\n </p>\n )}\n </div>\n </div>\n\n <div>\n <input\n type=\"text\"\n name=\"cardholderName\"\n id=\"form-checkout__cardholderName\"\n />\n {messages[221] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.cardholderNameError',\n })}\n </p>\n )}\n {messages[316] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.invalidcardholderNameError',\n })}\n </p>\n )}\n </div>\n\n <div>\n <input\n type=\"text\"\n name=\"securityCode\"\n id=\"form-checkout__securityCode\"\n maxLength={4}\n />\n {messages[224] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.securityCodeError',\n })}\n </p>\n )}\n {messages.E302 && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.invalidSecurityCodeError',\n })}\n </p>\n )}\n </div>\n\n <div style={{ display: 'none' }}>\n <select name=\"issuer\" id=\"form-checkout__issuer\"></select>\n {messages[220] && (\n <p className={global.labelError}>\n {intl.formatMessage({ id: 'store/checkoutless.card.issuerError' })}\n </p>\n )}\n </div>\n\n <div style={{ display: 'none' }}>\n <select\n name=\"identificationType\"\n id=\"form-checkout__identificationType\"\n ></select>\n {messages[212] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.identificationTypeError',\n })}\n </p>\n )}\n {messages[322] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.invalidIdentificationTypeError',\n })}\n </p>\n )}\n </div>\n\n <div style={{ display: 'none' }}>\n <input\n type=\"text\"\n name=\"identificationNumber\"\n id=\"form-checkout__identificationNumber\"\n defaultValue={clientProfileData.document}\n />\n {messages[214] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.identificationNumberError',\n })}\n </p>\n )}\n {messages[324] && (\n <p className={global.labelError}>\n {intl.formatMessage({\n id: 'store/checkoutless.card.invalidIdentificationNumberError',\n })}\n </p>\n )}\n </div>\n <select name=\"installments\" id=\"form-checkout__installments\"></select>\n <div>\n <Button\n value={\n loading\n ? 'store/checkoutless.register.processingPayment'\n : 'store/checkoutless.register.pay'\n }\n disabled={disabled}\n customValue={`${formatter.format(value + totalOfferings)}`}\n type=\"submit\"\n id=\"form-checkout__submit\"\n isPaymentButton={true}\n />\n </div>\n </form>\n )\n}\n\nexport default MercadoPagoForm\n\n```" } ]
code_mycheckout-sdk_f76048d9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/vtex-styles.module.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.container {\n width: 100%;\n}\n\n.containerDocument {\n display: flex;\n justify-content: space-between;\n}\n\n.containerDocumentType {\n width: 39%;\n}\n\n.containerDocumentNumber {\n width: 59%;\n}\n\n.containerTrigger {\n width: 100%;\n height: 48px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.containerInfo {\n display: flex;\n align-items: center;\n}\n\n.containerText.containerText {\n margin-left: 10px;\n margin-right: 22px;\n}\n\n.containerData {\n padding: 0px 32px;\n margin-bottom: 8px;\n}\n\n.radioHide {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n}\n\n.checkmark {\n position: absolute;\n top: 0;\n left: 0;\n height: 17px;\n width: 17px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-radius: 50%;\n box-sizing: border-box;\n}\n\n.paymentLabelContainer {\n display: block;\n position: relative;\n padding-left: 25px;\n margin: 8px;\n cursor: pointer;\n font-size: 22px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.paymentLabelContainer label {\n cursor: pointer;\n}\n\n/* When the radio button is checked, add a blue background */\n.checkmarkChecked {\n background-color: #fff;\n border: 1px solid #f71963;\n}\n\n/* Create the indicator (the dot/circle - hidden when not checked) */\n.checkmarkNoChecked::after {\n content: '';\n position: absolute;\n display: none;\n}\n\n/* Show the indicator (dot/circle) when checked */\n.checkmarkChecked::after {\n display: block;\n}\n\n/* Style the indicator (dot/circle) */\n.checkmarkContainer {\n position: absolute;\n top: 3px;\n left: 3px;\n width: 9px;\n height: 9px;\n border-radius: 50%;\n background-color: #f71963;\n}\n\n.paymentLabel {\n font-size: 16px;\n}\n\n.paymentMethodContainer {\n padding: 8px 0;\n}\n\n.paymentMethodPromissory {\n margin: 0px 15px;\n width: 90%;\n padding: 35px;\n box-shadow: 0px 3px 6px #00000029;\n margin-bottom: 15px;\n}\n\n.formGroup {\n display: flex;\n justify-content: space-between;\n}\n\n.inputGroup {\n width: 48%;\n}\n\n.labelError {\n color: #cb4242;\n}\n\n.containerLocation {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n\n.cityContainer {\n margin-top: 15px;\n}\n\n.cityContainer div {\n z-index: 101;\n}\n\n.marginTop {\n margin-top: 12px;\n}\n\n.habeasDataLink.habeasDataLink {\n text-decoration: underline;\n}\n\n.radioButtonContainer {\n display: flex;\n justify-content: space-around;\n}\n\n.cardsImgContainer {\n margin-left: 35px;\n margin-bottom: 10px;\n}\n\n.cardsImgContainer img {\n margin-right: 10px;\n height: 25px;\n}\n\n.logisticsContainer {\n border-top: 1px solid #e0e2e7;\n padding-top: 12px;\n}\n\n.textUnderline {\n text-decoration: underline;\n}\n\n.locationContainer {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.locationContainer p {\n font-weight: 600;\n font-size: 26px;\n text-align: center;\n margin-bottom: 8px;\n}\n\n.containerDuesExpiry {\n display: flex;\n}\n\n.containerDuesExpiry .dues {\n margin-right: 9px;\n background-color: white;\n}\n\n.containerDuesExpiry .expiryDate {\n width: 99% !important;\n}\n\n.secureField__input {\n display: inline-block;\n width: 100%;\n line-height: 1.3;\n cursor: text;\n height: 46px;\n border-radius: 8px;\n margin-bottom: 8px;\n padding: 0 17.3px;\n border: 1px solid #c4c5ca;\n color: white;\n background-color: #fff;\n}\n\n.secureFieldInvalid {\n border: 1px solid #bc4c47;\n}\n\n.secureFieldValid {\n border: 1px solid #4b816b;\n}\n\n.secureField__inputContainer {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n\n.secureField__actions {\n position: absolute;\n top: 0;\n left: 0;\n display: -ms-flexbox;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n width: 100%;\n height: 100%;\n padding-right: 16px;\n padding-left: 16px;\n pointer-events: none;\n -ms-flex-pack: end;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n justify-content: flex-end;\n align-items: center;\n -ms-flex-align: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n}\n\n.secureField__action {\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n width: 40px;\n height: 100%;\n padding: 12px 0 10px;\n pointer-events: auto;\n cursor: pointer;\n transition: color 200ms ease;\n align-items: center;\n -webkit-justify-content: center;\n -ms-flex-flow: row nowrap;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n -webkit-transition: color 200ms ease;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-flow: row nowrap;\n justify-content: center;\n flex-flow: row nowrap;\n -ms-flex-align: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n}\n\n.secureField__action.secureField__actionCardIcon {\n width: 40px;\n height: 100%;\n padding: 0;\n pointer-events: none;\n}\n\n.secureField__actionCardWrap {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.secureField__cardIcon {\n position: absolute;\n top: 43%;\n right: 0;\n display: block;\n max-width: 100%;\n transform: translate3d(0, -50%, 0);\n -webkit-transform: translate3d(0, -50%, 0);\n}\n\n.labelError.labelError {\n color: #cb4242;\n margin-top: -7px;\n margin-bottom: 10px;\n font-size: 14px;\n}\n\n.paymentCardContainer {\n margin-bottom: 10px;\n}\n\n.paymentPromissoryContainer {\n margin-bottom: 10px;\n}\n\n.paymentLabelContainer .paymentCustomCreditLabel {\n font-size: 14px !important;\n color: #284859;\n line-height: 24px;\n margin: 12px 0px;\n border-radius: 8px;\n box-shadow: 0px 3px 6px #0000000f;\n padding: 5px 28px;\n margin-bottom: 15px;\n cursor: initial;\n}\n\n.paymentLabelContainer .paymentCustomCreditLabel b {\n color: #1b998b;\n}\n\n.paymentCustomCreditLabelInfo {\n}\n\n.paymentCustomerCreditContainer {\n}\n\n.cursorPointer {\n cursor: pointer;\n}\n\n.display {\n display: none;\n}\n\n.marginLeft.marginLeft {\n margin-left: 5px;\n}\n\n.marginBottom {\n margin-bottom: 12px;\n}\n\n.loadingContainer {\n position: relative;\n height: 150px;\n display: flex;\n justify-content: center;\n}\n\n@media (min-width: 992px) {\n .buyButtonContainer {\n position: fixed;\n padding: 14px;\n margin-top: 14px;\n box-shadow: inset 0px 3px 6px #0000000f;\n width: 30%;\n right: 0;\n bottom: 0;\n background: #ffffff 0% 0% no-repeat padding-box;\n z-index: 100;\n }\n}\n\n@media (min-width: 992px) {\n .container {\n margin-bottom: 35%;\n }\n}\n\n.summary {\n margin-bottom: 22%;\n}\n\n@media screen and (max-width: 792px) {\n .paymentMethodLiteContainer {\n padding-bottom: 70px;\n }\n}\n\n```" } ]
code_mycheckout-sdk_26165e80
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/RegisterFormContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport RegisterForm from './RegisterForm'\nimport useRegisterForm from './useRegisterForm'\n\nconst RegisterFormContainer = () => {\n const registerFormProps = useRegisterForm()\n\n return <RegisterForm {...registerFormProps} />\n}\n\nexport default RegisterFormContainer\n\n```" } ]
code_mycheckout-sdk_eed4e88e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/PaymentForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { Fragment, useEffect, useMemo, useState } from 'react'\nimport { useMutation } from '@apollo/client'\nimport { useIntl } from 'react-intl'\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport { BuyCompletedEvent, SelectedMethodPaymentEvent } from '../../events'\nimport { CREATE_ORDER } from '../../graphql/mutations'\nimport { CreditCard, MyOrder } from '../Icons'\nimport { Events } from '../../interfaces'\nimport { PaymentProvider } from '../../contexts/PaymentContext'\nimport { PaymentsList } from '../Payments/Models/payments'\nimport { useActionsDispatch } from '../../contexts/ActionsProviderV2'\nimport { useCustomerCredit } from '../../hooks/useCustomerCredit'\nimport { useEcommerce } from '../../hooks/useEcommerce'\nimport { useUnits } from '../../hooks/useUnits'\nimport {\n selectLoadingOrder,\n setErrorOrder,\n setLoadingOrder,\n setNextSection,\n setStep,\n} from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport {\n selectSettings,\n selectTheme,\n} from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport {\n useUserData,\n useUserDataDispatch,\n} from '../../contexts/UserDataProvider'\nimport constants from '../../utils/constants'\nimport InfoItem from '../shared/InfoItem'\nimport LoadingProcessOrder from '../UserInfo/LoadingProcessOrder/LoadingProcessOrderContainer'\nimport Payments from '../Payments'\nimport Title from '../shared/Title'\nimport type { BundleItem, BundleIteminput, Item } from '../../interfaces'\nimport genericStyles from './generic-styles.module.css'\nimport globalStyles from '../../myCheckout-styles.module.css'\nimport kuikpayStyles from './kuikpay-styles.module.css'\nimport vtexStyles from './vtex-styles.module.css'\nimport {\n selectAddressStore,\n selectDeliveryAddress,\n selectItems,\n selectLogisticsInfo,\n selectOrderForm,\n selectPickUpPointAddress,\n selectProfile,\n} from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport { Alert } from '../shared'\nimport { useFetchIpAddress } from '../../hooks/useFetchIpAddress'\nimport { selectTotalValue } from '../../contexts/global-context/reducers/simulationSlice'\n\ninterface Props {\n gateway?: string\n handleGetDocumentsClient?: (email: string) => void\n}\n\nconst PaymentForm = ({ gateway, handleGetDocumentsClient }: Props) => {\n const { marketingData, customData, totalOfferings, totalizers } =\n useUserData()\n\n const value = useSelector(selectTotalValue)\n const { hasGoogleAnalytics } = useSelector(selectSettings)\n const { ipAddress } = useFetchIpAddress()\n\n const theme = useSelector(selectTheme)\n const items = useSelector(selectItems)\n const { email } = useSelector(selectProfile)\n const addressAlternative = useSelector(selectPickUpPointAddress)\n const selectedAddress = useSelector(selectDeliveryAddress)\n const addressStore = useSelector(selectAddressStore)\n const { shipping } = useSelector(selectOrderForm)\n\n const intl = useIntl()\n const [paymentMethod, setPaymentMethod] = useState<string>(\n PaymentsList.CreditCard\n )\n\n const [paymentSystem, setPaymentSystem] = useState<string>('')\n const [error, setError] = useState(null)\n const [disabled, setDisabled] = useState(true)\n const [franchiseImg, setFranchiseImg] = useState(null)\n const [showAlert, setShowAlert] = useState(false)\n\n const { canPayWithCredit, onSimulationCredit, onChangePaymet } =\n useCustomerCredit()\n\n const logisticsInfo = useSelector(selectLogisticsInfo)\n const dispatchGlobal = useDispatch()\n const { handleEcommerce } = useEcommerce()\n const dispatchActions = useActionsDispatch()\n const dispatchUserData = useUserDataDispatch()\n let styles = kuikpayStyles\n\n const loadingOrder = useSelector(selectLoadingOrder)\n\n if (theme === 'vtex') {\n styles = vtexStyles\n } else if (theme === 'generic') {\n styles = genericStyles\n }\n\n const units = useUnits(items)\n\n const [createOrder] = useMutation(CREATE_ORDER, {\n onCompleted: (data) => {\n const url =\n data.createOrder?.transaction?.RedirectResponseCollection?.[0]\n ?.redirectUrl\n\n if (\n handleGetDocumentsClient &&\n handleGetDocumentsClient instanceof Function\n ) {\n handleGetDocumentsClient(email || '')\n }\n\n const products = items?.map((item: Item) => {\n const categories = Object.values(item.productCategories)\n\n return {\n sku: item.id,\n quantity: item.quantity,\n price: item.sellingPrice || item?.price,\n category: categories?.[0] || 'unnkown',\n subcategory: categories?.[1] || 'unnkown',\n }\n })\n\n handleEcommerce(Events.checkout, { products })\n\n dispatchGlobal(setStep(constants.lastStep))\n\n dispatchGlobal(setErrorOrder(false))\n dispatchUserData({\n type: 'SET_CHANGE_INFO',\n args: {\n isEdit: false,\n isNewInfo: false,\n userLocation: false,\n isChangeEmail: false,\n },\n })\n dispatchGlobal(setLoadingOrder(false))\n\n if (url) {\n dispatchActions({\n type: 'SET_REDIRECT_URL',\n args: url,\n })\n } else {\n BuyCompletedEvent({\n items,\n transactionId: data.createOrder?.id,\n totalizers,\n value,\n hasGoogleAnalytics,\n })\n }\n },\n onError: (err) => {\n console.error(`error`, err)\n dispatchGlobal(setLoadingOrder(false))\n dispatchGlobal(setErrorOrder(true))\n\n setTimeout(() => {\n dispatchGlobal(setErrorOrder(false))\n }, 3000)\n },\n })\n\n useEffect(() => {\n const itemsAvailability = items.filter(\n (item: Item) => item.availability !== 'available'\n )\n\n if (itemsAvailability.length === 0 && items.length) {\n setDisabled(false)\n } else {\n setDisabled(true)\n }\n }, [items])\n\n useEffect(() => {\n const payment = sessionStorage.getItem('force-payment')\n\n setPaymentMethod(payment || PaymentsList.CreditCard)\n\n SelectedMethodPaymentEvent({ option: paymentMethod, hasGoogleAnalytics })\n\n return () => {\n setPaymentMethod(PaymentsList.CreditCard)\n }\n }, [])\n\n useEffect(() => {\n if (paymentMethod === 'bnpl') {\n onSimulationCredit()\n }\n\n onChangePaymet()\n\n SelectedMethodPaymentEvent({ option: paymentMethod, change: true })\n }, [paymentMethod])\n\n const handleClick = (cardData: any) => {\n setError(null)\n dispatchGlobal(setLoadingOrder(true))\n dispatchGlobal(setErrorOrder(null))\n\n const bundleItems: BundleIteminput[] = []\n const gifts: any[] = []\n\n items.forEach((item: Item) =>\n item.bundleItems.forEach((bundleItem: BundleItem) =>\n bundleItems.push({\n id: bundleItem.id,\n parentItemId: item.id,\n })\n )\n )\n\n const orderItems = items?.map((item: Item) => {\n if (item.isGift) {\n gifts.push({\n id: item.id,\n seller: item.seller,\n quantity: item.quantity,\n })\n }\n\n return {\n id: item.id,\n seller: item.seller,\n quantity: item.quantity,\n }\n })\n\n const data: any = {\n items: orderItems,\n gifts,\n payment: cardData || {\n paymentMethod,\n gateway: 'promissory',\n },\n profile: {\n email,\n },\n shipping: {\n addressId: selectedAddress?.id,\n logisticsInfo: logisticsInfo?.map((logisticsInfoItem) => ({\n itemIndex: logisticsInfoItem?.itemIndex,\n selectedDeliveryChannel: logisticsInfoItem?.selectedDeliveryChannel,\n selectedSla: logisticsInfoItem?.selectedSla,\n ...(logisticsInfoItem?.deliveryWindow &&\n logisticsInfoItem?.deliveryWindow?.startDateUtc &&\n logisticsInfoItem?.deliveryWindow?.endDateUtc\n ? {\n deliveryWindow: {\n startDateUtc: logisticsInfoItem?.deliveryWindow?.startDateUtc,\n endDateUtc: logisticsInfoItem?.deliveryWindow?.endDateUtc,\n },\n }\n : {}),\n })),\n },\n account: {\n storePreferences: {\n currencyCode: constants.currencyCode,\n countryCode: constants.countryCode,\n salesChannel: constants.salesChannel,\n },\n },\n channel: 'kuikpay',\n customData: customData || null,\n offerings: bundleItems,\n marketingData: marketingData?.coupon ? marketingData : null,\n }\n\n if (!data.marketingData) delete data.marketingData\n\n if (\n (addressAlternative &&\n addressAlternative?.addressDeliveryType !== 'delivery' &&\n (!selectedAddress || !selectedAddress?.id)) ||\n (addressAlternative &&\n selectedAddress &&\n !logisticsInfo?.some(\n (item) => item.selectedDeliveryChannel === 'delivery'\n ))\n ) {\n delete data?.shipping?.addressId\n }\n\n if (\n addressAlternative &&\n addressAlternative?.addressDeliveryType !== 'delivery'\n ) {\n data.shipping.externalAddress = {\n addressId: addressAlternative?.id || '',\n postalCode: addressAlternative?.postalCode,\n country: addressAlternative?.country,\n state: addressAlternative?.state,\n city: addressAlternative?.city,\n street: addressAlternative?.street,\n number: addressAlternative?.number,\n geoCoordinates: addressAlternative?.geoCoordinates,\n neighborhood: addressAlternative?.neighborhood || '',\n addressType: addressAlternative?.addressDeliveryType,\n receiverName: addressAlternative?.receiverName?.trim() || '',\n reference: addressAlternative?.reference || '',\n }\n } else if (addressStore) {\n const { availableAddresses } = shipping\n\n if (\n availableAddresses.find((address) => address.id === addressStore.id)\n ) {\n return\n }\n\n data.shipping.externalAddress = {\n addressId: addressStore?.id || '',\n postalCode: addressStore?.postalCode,\n country: addressStore?.country,\n state: addressStore?.state,\n city: addressStore?.city,\n street: addressStore?.street,\n number: addressStore?.number || 0,\n geoCoordinates: addressStore?.geoCoordinates,\n neighborhood: addressStore?.neighborhood || '',\n addressType: addressStore?.addressDeliveryType,\n receiverName: addressStore?.receiverName?.trim() || '',\n reference: addressStore?.reference || '',\n }\n }\n\n data.ip = ipAddress\n\n createOrder({\n variables: {\n orderArgs: data,\n },\n })\n }\n\n const handledClickDisabled = () => setShowAlert(true)\n\n useEffect(() => {\n if (loadingOrder) {\n setDisabled(true)\n } else {\n setDisabled(false)\n }\n }, [loadingOrder])\n\n const onSelectedPayment = (type: string, paymentSystemArgs: string) => {\n setPaymentMethod(type)\n setPaymentSystem(paymentSystemArgs)\n }\n\n const context = useMemo(\n () => ({\n canPayWithCredit,\n disabled,\n error,\n franchiseImg,\n gateway,\n global: globalStyles,\n intl,\n loadingOrder,\n paymentMethod,\n paymentSystem,\n styles,\n value,\n handleClick,\n handledClickDisabled,\n onSelectedPayment,\n setError,\n setFranchiseImg,\n }),\n [\n canPayWithCredit,\n disabled,\n error,\n franchiseImg,\n gateway,\n loadingOrder,\n paymentMethod,\n paymentSystem,\n selectedAddress,\n value,\n ]\n )\n\n return (\n <PaymentProvider value={context}>\n <Fragment>\n {loadingOrder ? (\n <Fragment>\n loading\n <LoadingProcessOrder />\n </Fragment>\n ) : (\n <div style={{ display: loadingOrder ? 'none' : '' }}>\n <Alert\n enableAutoClose={true}\n isOpen={showAlert}\n text=\"store/checkoutless.register.card.enterAllFields\"\n type=\"warning\"\n handleClickClose={() => setShowAlert(false)}\n />\n <Title>\n <Title.Item title=\"store/checkoutless.register.payment\">\n <CreditCard fill={globalStyles.iconPrimary} />\n </Title.Item>\n\n <InfoItem\n className={globalStyles.inMobileFlex}\n firstAction={() => dispatchGlobal(setNextSection('summary'))}\n >\n <InfoItem.Icon>\n <MyOrder\n fill={globalStyles.iconAlternative}\n height={24}\n width={24}\n />\n </InfoItem.Icon>\n <InfoItem.Content text=\"store/checkoutless.summary.myOrder\" />\n </InfoItem>\n </Title>\n <Payments units={units} totalOfferings={totalOfferings} />\n </div>\n )}\n </Fragment>\n </PaymentProvider>\n )\n}\n\nexport default PaymentForm\n\n```" } ]
code_mycheckout-sdk_f61a75aa
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/InputCard.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport vtexStyles from './vtex-styles.module.css'\nimport kuikpayStyles from './kuikpay-styles.module.css'\nimport genericStyles from './generic-styles.module.css'\n\ninterface InputCardProps {\n theme: string\n isValid: boolean | null\n imgCard?: string | null\n itemId: string\n}\n\nconst InputCard = (props: InputCardProps) => {\n const {\n theme,\n isValid,\n itemId,\n // imgCard\n } = props\n\n let styles = kuikpayStyles\n\n if (theme === 'vtex') {\n styles = vtexStyles\n } else if (theme === 'generic') {\n styles = genericStyles\n }\n\n return (\n <div\n id={`card-number-container${itemId}`}\n className={styles.secureField__inputContainer}\n >\n <div\n id={`card-number-placeholder${itemId}`}\n className={`${styles.secureField__input} ${\n isValid === false ? styles.secureFieldInvalidLite : null\n } ${isValid === true ? styles.secureFieldValidLite : null} ${\n styles.secureFieldLite\n }`}\n ></div>\n </div>\n )\n}\n\nexport default InputCard\n\n```" } ]
code_mycheckout-sdk_cd753ab5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/useRegisterForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useEffect, useState } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport { useActions } from '../../contexts/ActionsProviderV2'\nimport {\n selectSettings,\n setIsFullscreen,\n} from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport { useCreateAddressExternal } from '../../hooks/useCreateAddressExternal'\nimport { usePCIScript } from '../../hooks/usePCIScript'\nimport { useScript } from '../../hooks/useScript'\nimport {\n selectLoadingOrder,\n selectUserRegistrationSections,\n} from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport constants from '../../utils/constants'\nimport {\n selectAddressStore,\n selectHasAddress,\n selectIsProfileComplete,\n selectItems,\n selectProfile,\n} from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport {\n selectSimulationLogistics,\n selectSimulationStatus,\n} from '../../contexts/global-context/reducers/simulationSlice'\n\nconst useRegisterForm = () => {\n const dispatchGlobal = useDispatch()\n const { handleGetDocumentsClient } = useActions()\n const loadingOrder = useSelector(selectLoadingOrder)\n const userRegistrationSections = useSelector(selectUserRegistrationSections)\n const simulationStatus = useSelector(selectSimulationStatus)\n const profile = useSelector(selectProfile)\n const profileComplete = useSelector(selectIsProfileComplete)\n const addressAlternative = useSelector(selectAddressStore)\n const items = useSelector(selectItems)\n const logisticsInfo = useSelector(selectSimulationLogistics)\n const hasAddress = useSelector(selectHasAddress)\n\n const { PCI_PROXY_SCRIPT } = usePCIScript()\n\n const { additionalData } = useSelector(selectSettings)\n\n const { sandbox } = useActions()\n const [isPickupPoint, setIsPickupPoint] = useState(false)\n\n const [steps, setSteps] = useState({\n profile: false,\n shipping: false,\n logistic: false,\n payment: false,\n })\n\n const [loadPaymentForm, setLoadPaymentForm] = useState(false)\n\n const { createAddressExternal, successAddressAlter, setSuccessAddressAlter } =\n useCreateAddressExternal()\n\n const gateway = localStorage.getItem('gateway')\n\n const isLogisticPickupPoint =\n logisticsInfo?.length > 0 &&\n logisticsInfo[0].selectedDeliveryChannel === 'pickup-in-point'\n\n const isAddressResidential =\n addressAlternative?.addressDeliveryType === 'delivery'\n\n const isAddressPickupPoint =\n addressAlternative?.addressDeliveryType === 'pickup'\n\n const showEditButtonAddress =\n !addressAlternative ||\n isAddressResidential ||\n (isAddressPickupPoint &&\n isLogisticPickupPoint &&\n logisticsInfo?.some(\n (item) => item.selectedDeliveryChannel === 'delivery'\n ))\n\n const validateAddressPickup = isAddressPickupPoint && isLogisticPickupPoint\n\n const validateTriggerPayment = isAddressPickupPoint\n ? !validateAddressPickup\n : !hasAddress\n\n useEffect(() => {\n setSteps({\n profile: userRegistrationSections === 1,\n shipping: isPickupPoint ? false : userRegistrationSections === 2,\n logistic: isPickupPoint\n ? userRegistrationSections === 2\n : userRegistrationSections === 3,\n payment: isPickupPoint\n ? userRegistrationSections >= 3\n : userRegistrationSections >= 4,\n })\n }, [userRegistrationSections, isPickupPoint])\n\n useEffect(() => {\n if (\n addressAlternative &&\n addressAlternative?.addressDeliveryType === 'pickup' &&\n logisticsInfo?.length > 0 &&\n !logisticsInfo?.find(\n (item) => item.selectedDeliveryChannel === 'delivery'\n ) &&\n profileComplete\n ) {\n if (steps.shipping) {\n setIsPickupPoint(true)\n setSteps({\n profile: false,\n shipping: false,\n logistic: true,\n payment: false,\n })\n }\n\n setSuccessAddressAlter(true)\n setTimeout(() => {\n setSuccessAddressAlter(false)\n }, 3000)\n }\n }, [logisticsInfo, profileComplete, addressAlternative, steps])\n\n useEffect(() => {\n const addressAlter = addressAlternative\n\n if (\n addressAlter &&\n addressAlter?.addressDeliveryType === 'delivery' &&\n (addressAlter?.id !== '' || addressAlter?.id) &&\n profileComplete\n ) {\n let dataForCreate: any = {\n addressId: addressAlter?.id,\n profileId: profile.id,\n }\n\n if (\n !addressAlter?.city?.includes('*') ||\n !addressAlter?.postalCode?.includes('*')\n ) {\n dataForCreate = {\n ...dataForCreate,\n country: addressAlter?.country,\n state: addressAlter?.state,\n city: addressAlter?.city,\n street: addressAlter?.street,\n number: addressAlter?.number,\n postalCode: addressAlter?.postalCode,\n receiverName: addressAlter?.receiverName || '',\n geoCoordinates: addressAlter?.geoCoordinates,\n neighborhood: addressAlter?.neighborhood || '',\n reference: addressAlter?.reference,\n }\n }\n\n createAddressExternal({\n variables: { args: dataForCreate },\n })\n }\n }, [profileComplete])\n\n useEffect(() => {\n dispatchGlobal(setIsFullscreen(true))\n\n return () => {\n dispatchGlobal(setIsFullscreen(false))\n }\n }, [])\n\n useEffect(() => {\n // TODO: eliminar PCI al terminar la transición\n if (additionalData?.paymentez === 'true') {\n if (gateway === 'noop' || gateway === null || gateway === 'creditpay') {\n if (!(window as any).PaymentezLoad) {\n useScript(\n constants.JQUERY_SCRIPT[0],\n constants.JQUERY_SCRIPT[1]\n ).then(() => {\n useScript(\n constants.PAYMENTEZ_SCRIPT[0],\n constants.PAYMENTEZ_SCRIPT[1]\n ).then(() => {\n // eslint-disable-next-line prettier/prettier\n ;(window as any).PaymentezLoad = true\n Payment.init(\n ...constants.PAYMENTEZ_CREDENTIALS[sandbox ? 'stg' : 'prod']\n )\n setLoadPaymentForm(true)\n })\n })\n }\n\n if ((window as any).PaymentezLoad && !loadPaymentForm) {\n setLoadPaymentForm(true)\n }\n }\n } else if (\n gateway === 'noop' ||\n gateway === null ||\n gateway === 'creditpay'\n ) {\n if (!(window as any).SecureFieldsLoad) {\n useScript(PCI_PROXY_SCRIPT[0], PCI_PROXY_SCRIPT[1])\n .then(() => {\n ;(window as any).SecureFieldsLoad = true\n setLoadPaymentForm(true)\n })\n .catch((err) => {\n console.error('ERROR', err)\n setLoadPaymentForm(true)\n })\n }\n\n if ((window as any).SecureFieldsLoad && !loadPaymentForm) {\n setLoadPaymentForm(true)\n }\n }\n }, [])\n\n useEffect(() => {\n dispatchGlobal(setIsFullscreen(!loadingOrder))\n }, [loadingOrder])\n\n useEffect(() => {\n dispatchGlobal(setIsFullscreen(items.length > 0))\n }, [items])\n\n return {\n gateway,\n isPickupPoint,\n items,\n loadingOrder,\n loadPaymentForm,\n showEditButtonAddress,\n steps,\n successAddressAlter,\n validateTriggerPayment,\n handleGetDocumentsClient,\n setSteps,\n profile,\n logisticsInfo,\n simulationStatus,\n }\n}\n\nexport default useRegisterForm\n\n```" } ]
code_mycheckout-sdk_3aaa505a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/RegisterForm/Form.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n// TODO: Este cambio es temporal, se debe eliminar payments form, luego de la transicion a paymentez\nimport React from 'react'\n\nimport PaymentsForm from './PaymentsForm'\nimport PaymentezForm from './PaymentezForm'\n\nconst Form = (props: any) => {\n if (props.id === 'noop') {\n if (props.gateway === 'paymentez') {\n return <PaymentezForm {...props} />\n }\n\n return <PaymentsForm {...props} />\n }\n\n return null\n}\n\nexport default Form\n\n```" } ]
code_mycheckout-sdk_193a227a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/ViewValidate/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { useSelector } from 'react-redux'\n\nimport Addresses from '../UserInfo/Addresses/AddressesContainer'\nimport PaymentMethods from '../UserInfo/PaymentMethods'\nimport { getCookie } from '../../utils/index'\nimport ProfileForm from '../RegisterForm/Profile/ProfileFormContainer'\nimport Packages from '../LogisticsInfo/Packages/PackagesContainer'\nimport { selectSection } from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport Cart from '../UserInfo/Cart'\nimport AccessKeyFormContainer from '../AccessKeyForm/AccessKeyFormContainer'\nimport RegisterFormContainer from '../RegisterForm/RegisterFormContainer'\n\nconst ViewValidate = () => {\n const section = useSelector(selectSection)\n const sessionCookie = getCookie('x-checkoutless-auth')\n const persistedData = JSON.parse(localStorage.getItem('checkoutless_data'))\n const authorizedUser = persistedData\n ? persistedData.email === persistedData.authorizedEmail\n : false\n\n // TODO: Revisar esta logica, no se deberia confiar en una autenticación sobre localStorage\n if (\n section !== 'logisticsInfo' &&\n section !== 'summary' &&\n (!sessionCookie || !authorizedUser)\n ) {\n return <AccessKeyFormContainer />\n }\n\n switch (section) {\n case 'clientProfileData':\n return <ProfileForm />\n\n case 'shippingData':\n return <Addresses />\n\n case 'paymentData':\n return <PaymentMethods />\n\n case 'logisticsInfo':\n return <Packages />\n\n case 'registerFormProfile':\n return <RegisterFormContainer />\n\n case 'registerFormShipping':\n return <RegisterFormContainer />\n\n case 'summary':\n return <Cart />\n\n default: {\n return null\n }\n }\n}\n\nexport default ViewValidate\n\n```" } ]
code_mycheckout-sdk_e3552f6a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Payments/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { Fragment, useMemo } from 'react'\nimport { pathOr } from 'ramda'\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport { Button, Loader } from '../shared'\nimport { selectSettings } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport { usePayment } from '../../contexts/PaymentContext'\nimport {\n selectPaymentDataSection,\n selectUserRegistrationSections,\n setNextUserRegistrationSections,\n setPaymentDataSection,\n} from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport CreditCart from './Components/CreditCart'\nimport CustomPayment from './Components/CustomPayment'\nimport Orion from './Components/Orion'\nimport PaymentOption from './Components/PaymentOption'\nimport { setPaymetId } from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport { selectGroupAvailablePaymentMethods } from '../../contexts/global-context/reducers/simulationSlice'\nimport { useActions } from '../../contexts/ActionsProviderV2'\n\ninterface PaymentsRenderProps {\n units: number\n paymentInfo?: any\n totalOfferings: number\n}\n\nconst PaymentsRender = ({ units, totalOfferings }: PaymentsRenderProps) => {\n const dispatchGlobal = useDispatch()\n const userRegistrationSections = useSelector(selectUserRegistrationSections)\n\n const { styles, paymentMethod: SelectPayment, paymentSystem } = usePayment()\n\n const { showPaymentMethods } = useActions()\n const paymentDataSection = useSelector(selectPaymentDataSection)\n\n const availablePaymentMethods = useSelector(\n selectGroupAvailablePaymentMethods\n )?.filter((availablePayment) => {\n const paymentId = availablePayment?.paymentMethods[0]?.id\n const foundPayment = showPaymentMethods?.find(\n (test) => test?.id === paymentId\n )\n\n return foundPayment?.id ? foundPayment?.show : true\n })\n\n const settings = useSelector(selectSettings)\n\n const orion = useMemo(() => pathOr(false, ['orion'], settings), [settings])\n\n return (\n <Fragment>\n <div className={styles.paymentMethodContainer} style={{ padding: 0 }}>\n {availablePaymentMethods.map((payment, index) => {\n if (payment.isCreditCard) {\n return (\n <PaymentOption\n key={payment.groupName}\n payments={payment}\n selected={SelectPayment === payment.groupName}\n paymentDataSection={paymentDataSection}\n >\n <CreditCart\n key={`credit-payment-${index}`}\n payments={payment}\n />\n </PaymentOption>\n )\n }\n\n return (\n <PaymentOption\n key={payment.groupName}\n payments={payment}\n selected={SelectPayment === payment.groupName}\n paymentDataSection={paymentDataSection}\n >\n <CustomPayment\n key={`custom-payment-${index}`}\n payments={payment}\n units={units}\n totalOfferings={totalOfferings}\n />\n </PaymentOption>\n )\n })}\n {orion && (\n <PaymentOption\n selected={\n paymentDataSection === 'details' && SelectPayment === 'creditpay'\n }\n paymentDataSection={paymentDataSection}\n payments={null}\n orion\n >\n <Orion units={units} totalOfferings={totalOfferings} />\n </PaymentOption>\n )}\n <PaymentOption\n customLabel=\"store/checkoutless.userInfo.otherPaymentMethod\"\n payments={{ groupName: 'otherPayments' }}\n selected={SelectPayment === 'otherPayments'}\n paymentDataSection={paymentDataSection}\n >\n <Loader text=\"store/checkoutless.loading.almostThere\" />\n </PaymentOption>\n {paymentDataSection === 'list' && (\n <Button\n value={'store/checkoutless.next'}\n disabled={!SelectPayment}\n onClick={() => {\n if (SelectPayment === 'otherPayments') {\n setTimeout(\n () => window.open('/checkout/#/profile', '_blank'),\n 1500\n )\n }\n\n dispatchGlobal(setPaymetId(paymentSystem))\n\n if (userRegistrationSections >= 3) {\n dispatchGlobal(setNextUserRegistrationSections())\n } else {\n dispatchGlobal(setPaymentDataSection('details'))\n }\n }}\n />\n )}\n </div>\n </Fragment>\n )\n}\n\nexport default PaymentsRender\n\n```" } ]
code_mycheckout-sdk_1309f2c0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/BuyButton/BuyButton.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useEffect } from 'react'\nimport { useDispatch } from 'react-redux'\n\nimport { Button } from '../shared'\nimport { formatter } from '../../utils'\nimport globalStyles from '../../myCheckout-styles.module.css'\nimport { setShowingBuyButton } from '../../contexts/global-context/reducers/uiSettingsSlice'\n\ninterface Props {\n canBuy: boolean\n className?: string\n classNameContainer?: string\n disabled: boolean\n forceDisabled: boolean\n loadingOrder: boolean\n isSimulationReady: boolean\n secondary?: boolean\n totalOfferings: number\n units: number\n value: number\n onClickDisabled?: () => void\n preHandleClick: () => void\n}\n\nexport const BuyButton = ({\n canBuy,\n className,\n classNameContainer,\n disabled,\n forceDisabled,\n loadingOrder,\n isSimulationReady,\n secondary,\n totalOfferings,\n units,\n value,\n onClickDisabled,\n preHandleClick,\n}: Props) => {\n const dispatchGlobal = useDispatch()\n\n useEffect(() => {\n dispatchGlobal(setShowingBuyButton(true))\n\n return () => {\n dispatchGlobal(setShowingBuyButton(false))\n }\n }, [])\n\n return (\n <div className={`${globalStyles.buyButtonContainer} ${classNameContainer}`}>\n <Button\n value={\n !isSimulationReady\n ? 'Calculando'\n : loadingOrder\n ? 'store/checkoutless.register.processingPayment'\n : 'store/checkoutless.register.pay'\n }\n onClick={preHandleClick}\n disabled={disabled || canBuy !== true || forceDisabled}\n customValue={`${formatter.format(value + totalOfferings)}`}\n units={units}\n className={className}\n secondary={secondary}\n onClickDisabled={onClickDisabled}\n />\n </div>\n )\n}\n\n```" } ]
code_mycheckout-sdk_b0b3095f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/BuyButton/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport { BuyButton } from './BuyButton'\nimport { useBuyButton } from './useBuyButton'\n\ninterface Props {\n canBuy?: boolean\n className?: string\n classNameContainer?: string\n cvv?: string\n dues?: string\n forceDisabled?: boolean\n handleSubmit?: any\n secondary?: boolean\n onClickDisabled?: () => void\n}\n\nconst BuyButtonContainer = ({\n canBuy = true,\n className,\n classNameContainer,\n cvv,\n dues,\n forceDisabled = false,\n handleSubmit,\n secondary = false,\n onClickDisabled,\n}: Props) => {\n const buyButton = useBuyButton(\n canBuy,\n className,\n classNameContainer,\n cvv,\n dues,\n forceDisabled,\n handleSubmit,\n secondary\n )\n\n return <BuyButton {...buyButton} onClickDisabled={onClickDisabled} />\n}\n\nexport default BuyButtonContainer\n\n```" } ]
code_mycheckout-sdk_420c9503
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/BuyButton/styles.module.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.habeasDataLink.habeasDataLink {\n text-decoration: underline;\n}\n\n.buyButtonContainer {\n position: sticky;\n bottom: 0px;\n width: 100%;\n background-color: #fff;\n z-index: 2;\n}\n\n@media (min-width: 992px) {\n .buyButtonContainer {\n position: fixed;\n padding: 14px;\n margin-top: 14px;\n box-shadow: inset 0px 3px 6px #0000000f;\n width: 30%;\n right: 0;\n background: #ffffff 0% 0% no-repeat padding-box;\n z-index: 100;\n }\n}\n\n```" } ]
code_mycheckout-sdk_5f42e538
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/BuyButton/useBuyButton.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n/* eslint-disable max-params */\nimport { useDispatch, useSelector } from 'react-redux'\nimport { useMutation } from '@apollo/client'\nimport { useEffect, useState } from 'react'\n\nimport {\n selectLoadingOrder,\n setErrorOrder,\n setLoadingOrder,\n setStep,\n} from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport { selectSettings } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport { useUserData } from '../../contexts/UserDataProvider'\nimport type { BundleItem, BundleIteminput, Item } from '../../interfaces'\nimport { Events } from '../../interfaces'\nimport constants from '../../utils/constants'\nimport { CREATE_ORDER } from '../../graphql/mutations'\nimport { useEcommerce } from '../../hooks/useEcommerce'\nimport { useActionsDispatch } from '../../contexts/ActionsProviderV2'\nimport { useUnits } from '../../hooks/useUnits'\nimport { useCustomerCredit } from '../../hooks/useCustomerCredit'\nimport { BuyCompletedEvent } from '../../events'\nimport { useFetchIpAddress } from '../../hooks/useFetchIpAddress'\nimport {\n selectAddressStore,\n selectDeliveryAddress,\n selectItems,\n selectLogisticsInfo,\n selectMainPayment,\n selectOrderForm,\n selectPickUpPointAddress,\n selectProfile,\n} from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport {\n selectSimulationStatus,\n selectTotalValue,\n} from '../../contexts/global-context/reducers/simulationSlice'\n\nexport const useBuyButton = (\n canBuy: boolean,\n className: string,\n classNameContainer: string,\n cvv: string,\n dues: string,\n forceDisabled: boolean,\n handleSubmit: any,\n secondary: boolean\n) => {\n const CONSTANTS = {\n delivery: 'delivery',\n creditCard: 'tc',\n store: 'store',\n promissory: 'promissory',\n }\n\n const [disabled, setDisabled] = useState(true)\n const { ipAddress } = useFetchIpAddress()\n\n const { hasGoogleAnalytics } = useSelector(selectSettings)\n const loadingOrder = useSelector(selectLoadingOrder)\n const dispatchGlobal = useDispatch()\n const { customData, marketingData, totalizers, totalOfferings } =\n useUserData()\n\n const value = useSelector(selectTotalValue)\n\n const { email, habeasData } = useSelector(selectProfile)\n const items = useSelector(selectItems)\n const addressAlternative = useSelector(selectPickUpPointAddress)\n const selectedAddress = useSelector(selectDeliveryAddress)\n const selectedPaymentMethod = useSelector(selectMainPayment)\n const simulationStatus = useSelector(selectSimulationStatus)\n\n const logisticsInfo = useSelector(selectLogisticsInfo)\n const { handleEcommerce } = useEcommerce()\n const dispatchActions = useActionsDispatch()\n const units = useUnits(items)\n const { onSimulationCredit } = useCustomerCredit()\n const addressStore = useSelector(selectAddressStore)\n const { shipping: shippingOrderForm } = useSelector(selectOrderForm)\n\n const [createOrder] = useMutation(CREATE_ORDER, {\n onCompleted: (data) => {\n const url =\n data.createOrder?.transaction?.RedirectResponseCollection?.[0]\n ?.redirectUrl\n\n dispatchGlobal(setStep(constants.lastStep))\n dispatchGlobal(setLoadingOrder(false))\n dispatchGlobal(setErrorOrder(null))\n\n const products = items?.map((item: Item) => {\n const categories = Object.values(item.productCategories)\n\n return {\n sku: item.id,\n quantity: item.quantity,\n price: item.sellingPrice || item?.price,\n category: categories?.[0] || 'unnkown',\n subcategory: categories?.[1] || 'unnkown',\n }\n })\n\n handleEcommerce(Events.checkout, { products })\n\n if (url) {\n dispatchActions({\n type: 'SET_REDIRECT_URL',\n args: url,\n })\n } else {\n BuyCompletedEvent({\n items,\n transactionId: data.createOrder?.id,\n totalizers,\n value,\n hasGoogleAnalytics,\n })\n }\n },\n onError: (error) => {\n console.error(`error`, error)\n dispatchGlobal(setErrorOrder(true))\n\n setTimeout(() => {\n dispatchGlobal(setErrorOrder(false))\n }, 3000)\n setDisabled(false)\n dispatchGlobal(setLoadingOrder(false))\n dispatchGlobal(setErrorOrder(error))\n },\n })\n\n const handleClick = (transactionId?: string) => {\n dispatchGlobal(setLoadingOrder(true))\n dispatchGlobal(setErrorOrder(null))\n\n const bundleItems: BundleIteminput[] = []\n const gifts: any[] = []\n\n items.forEach((item: Item) =>\n item.bundleItems.forEach((bundleItem: BundleItem) =>\n bundleItems.push({\n id: bundleItem.id,\n parentItemId: item.id,\n })\n )\n )\n\n const orderItems = items?.map((item: Item) => {\n if (item.isGift) {\n gifts.push({\n id: item.id,\n seller: item.seller,\n quantity: item.quantity,\n })\n }\n\n return {\n id: item.id,\n seller: item.seller,\n quantity: item.quantity,\n }\n })\n\n // deberia haber solo un Gateway que seria VTEX\n\n const gateway =\n selectedPaymentMethod?.paymentMethod === 'BNPL'\n ? 'creditpay'\n : selectedPaymentMethod?.paymentMethod === CONSTANTS.promissory\n ? CONSTANTS.promissory\n : selectedPaymentMethod?.paymentMethod === CONSTANTS.creditCard\n ? 'noop'\n : 'custom'\n\n const paymentMethod = selectedPaymentMethod?.cardId\n ? CONSTANTS.creditCard\n : selectedPaymentMethod?.paymentMethod\n\n const additionalData =\n selectedPaymentMethod?.origin === CONSTANTS.store &&\n selectedPaymentMethod?.paymentMethod === CONSTANTS.creditCard\n ? [{ key: 'accountId', value: selectedPaymentMethod?.cardId }]\n : []\n\n const franchise =\n selectedPaymentMethod?.origin === CONSTANTS.store &&\n selectedPaymentMethod?.paymentMethod === CONSTANTS.creditCard\n ? selectedPaymentMethod?.franchise\n : null\n\n const data: any = {\n items: orderItems,\n gifts,\n payment: {\n additionalData,\n ...(selectedPaymentMethod?.paymentMethod === CONSTANTS.creditCard && {\n cardId:\n selectedPaymentMethod?.paymentMethod === CONSTANTS.creditCard &&\n selectedPaymentMethod?.origin !== CONSTANTS.store\n ? selectedPaymentMethod?.cardId\n : null,\n }),\n paymentMethod,\n gateway, // 'paymentez'\n ...(franchise && {\n franchise,\n }),\n },\n profile: {\n email,\n habeasData,\n },\n shipping: {\n addressId: selectedAddress?.id,\n logisticsInfo: logisticsInfo?.map((logisticsInfoItem) => ({\n itemIndex: logisticsInfoItem?.itemIndex,\n selectedDeliveryChannel: logisticsInfoItem?.selectedDeliveryChannel,\n selectedSla: logisticsInfoItem?.selectedSla,\n ...(logisticsInfoItem?.deliveryWindow &&\n logisticsInfoItem?.deliveryWindow?.startDateUtc &&\n logisticsInfoItem?.deliveryWindow?.endDateUtc\n ? {\n deliveryWindow: {\n startDateUtc: logisticsInfoItem?.deliveryWindow?.startDateUtc,\n endDateUtc: logisticsInfoItem?.deliveryWindow?.endDateUtc,\n },\n }\n : {}),\n })),\n },\n account: {\n storePreferences: {\n currencyCode: constants.currencyCode,\n countryCode: constants.countryCode,\n salesChannel: constants.salesChannel,\n },\n },\n channel: 'kuikpay',\n customData: customData || null,\n offerings: bundleItems,\n marketingData: marketingData?.coupon ? marketingData : null,\n }\n\n if (selectedPaymentMethod?.paymentMethod === CONSTANTS.creditCard) {\n if (dues !== '') {\n data.payment.additionalData.push({\n key: 'installments',\n value: dues,\n })\n }\n\n if (cvv) {\n data.payment.cvv = cvv\n }\n\n if (transactionId) {\n data.payment.additionalData.push({\n key: 'transactionId',\n value: transactionId,\n })\n }\n }\n\n if (selectedPaymentMethod?.paymentId) {\n data.payment.additionalData.push({\n key: 'paymentSystem',\n value: selectedPaymentMethod?.paymentId,\n })\n }\n\n if (!data.marketingData) delete data.marketingData\n\n if (\n (addressAlternative &&\n addressAlternative?.addressDeliveryType !== CONSTANTS.delivery &&\n (!selectedAddress || !selectedAddress?.id)) ||\n (addressAlternative &&\n selectedAddress &&\n !logisticsInfo?.some(\n (item) => item.selectedDeliveryChannel === CONSTANTS.delivery\n ))\n ) {\n delete data?.shipping?.addressId\n }\n\n if (\n addressAlternative &&\n addressAlternative?.addressDeliveryType !== CONSTANTS.delivery\n ) {\n data.shipping.externalAddress = {\n addressId: addressAlternative?.id || '',\n postalCode: addressAlternative?.postalCode,\n country: addressAlternative?.country,\n state: addressAlternative?.state,\n city: addressAlternative?.city,\n street: addressAlternative?.street,\n number: addressAlternative?.number,\n geoCoordinates: addressAlternative?.geoCoordinates,\n neighborhood: addressAlternative?.neighborhood || '',\n addressType: addressAlternative?.addressDeliveryType,\n receiverName: addressAlternative?.receiverName?.trim() || '',\n reference: addressAlternative?.reference || '',\n }\n } else if (addressStore) {\n const { availableAddresses } = shippingOrderForm\n\n if (\n availableAddresses.find((address) => address.id === addressStore.id)\n ) {\n return\n }\n\n data.shipping.externalAddress = {\n addressId: addressStore?.id || '',\n postalCode: addressStore?.postalCode,\n country: addressStore?.country,\n state: addressStore?.state,\n city: addressStore?.city,\n street: addressStore?.street,\n number: addressStore?.number || 0,\n geoCoordinates: addressStore?.geoCoordinates,\n neighborhood: addressStore?.neighborhood || '',\n addressType: addressStore?.addressDeliveryType,\n receiverName: addressStore?.receiverName?.trim() || '',\n reference: addressStore?.reference || '',\n }\n }\n\n data.ip = ipAddress\n\n createOrder({\n variables: {\n orderArgs: data,\n },\n })\n }\n\n /**\n * Validation before sending data\n */\n const preHandleClick = () => {\n handleSubmit && handleSubmit instanceof Function\n if (handleSubmit && handleSubmit instanceof Function) {\n handleSubmit(handleClick)\n } else {\n handleClick()\n }\n }\n\n useEffect(() => {\n const itemsAvailability = items.filter(\n (item: Item) => item.availability !== 'available'\n )\n\n if (itemsAvailability.length === 0 && items.length) {\n setDisabled(false)\n } else {\n setDisabled(true)\n }\n }, [items])\n\n useEffect(() => {\n if (selectedPaymentMethod?.paymentMethod === 'BNPL' && totalizers.length) {\n const isShipping = !!totalizers.find((e) => e.id === 'Shipping')\n\n isShipping && onSimulationCredit()\n }\n }, [selectedPaymentMethod, value, totalizers])\n\n useEffect(() => {\n if (loadingOrder) {\n setDisabled(true)\n } else {\n setDisabled(false)\n }\n }, [loadingOrder])\n\n return {\n canBuy,\n className,\n classNameContainer,\n disabled,\n forceDisabled,\n loadingOrder,\n secondary,\n totalOfferings,\n units,\n value,\n preHandleClick,\n isSimulationReady: !(\n simulationStatus === 'preloading' || simulationStatus === 'idle'\n ),\n }\n}\n\n```" } ]
code_mycheckout-sdk_c05b777e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Portal/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nimport styles from '../../myCheckout-styles.module.css'\n\ninterface Props {\n children: JSX.Element | JSX.Element[]\n}\n\nconst Portal: (props: Props) => React.ReactPortal = ({ children }: Props) => {\n const handleClick = (e: any) => {\n e.stopPropagation()\n }\n\n const target = window?.document?.body\n\n return ReactDOM.createPortal(\n <div className={styles.Checkoutless} onClick={handleClick}>\n {children}\n </div>,\n target\n )\n}\n\nexport default Portal\n\n```" } ]
code_mycheckout-sdk_a9eed953
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformative/QuotaInformativeContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport type { ProductItem } from '../../interfaces'\nimport useQuotaInformative from './useQuotaInformative'\nimport QuotaInformative from './QuotaInformative'\n\ninterface QuotaInformativeProps {\n selectedItem: ProductItem | null\n}\n\nconst QuotaInformativeContainer = ({ selectedItem }: QuotaInformativeProps) => {\n const quotaInformativeProps = useQuotaInformative(selectedItem)\n\n return <QuotaInformative {...quotaInformativeProps} />\n}\n\nexport default QuotaInformativeContainer\n\n```" } ]
code_mycheckout-sdk_fc95055a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformative/useQuotaInformative.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useCallback, useMemo, useState } from 'react'\nimport { pathOr } from 'ramda'\n\nimport type { ProductItem } from '../../interfaces'\n\ninterface Quota {\n quotas: number\n value: number\n}\n\nconst useQuotaInformative = (selectedItem: ProductItem | null) => {\n const [open, setOpen] = useState(false)\n\n const priceProduct = useMemo(\n () => pathOr(0, ['sellers', 0, 'commertialOffer', 'Price'], selectedItem),\n [selectedItem]\n )\n\n const onCalculateQuota = useCallback(\n (quantity: number, price: number) => {\n return {\n quotas: quantity,\n value: price / quantity,\n }\n },\n [priceProduct]\n )\n\n const quota = useMemo<Quota>(() => {\n if (priceProduct < 100000) {\n return onCalculateQuota(3, priceProduct)\n }\n\n if (priceProduct > 100001 && priceProduct < 1000000) {\n return onCalculateQuota(6, priceProduct)\n }\n\n return onCalculateQuota(9, priceProduct)\n }, [priceProduct])\n\n const handleModal = () => setOpen(!open)\n\n return {\n handleModal,\n open,\n quota,\n }\n}\n\nexport default useQuotaInformative\n\n```" } ]
code_mycheckout-sdk_0f9485c5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformative/popup.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport Style from './quotaInformative.css'\nimport useFormatMessage from '../../i18n/useFormatMessage'\nimport {\n QuotaInformative,\n BagQuotaInformative,\n CardQuotaInformative,\n SelectQuotaInformative,\n Close,\n} from '../Icons'\n\ninterface PopupProps {\n open: boolean\n handleModal: () => void\n}\n\nconst Popup = ({ open, handleModal }: PopupProps) => {\n const stop = (e: any) => {\n e.stopPropagation()\n e.preventDefault()\n }\n\n return open ? (\n <div className={Style.quotaInformationOverlay} onClick={handleModal}>\n <div className={Style.quotaInformationModalContainer} onClick={stop}>\n <div className={Style.quotaInformationModalClose} onClick={handleModal}>\n <Close />\n </div>\n <div className={Style.quotaInformationModalTitle}>ORION</div>\n <div className={Style.quotaInformationModalDescription}>\n {useFormatMessage('store/quota.modal.quotainformation.description', {\n store: <span>ORION</span>,\n })}\n </div>\n <div className={Style.quotaInformationModalList}>\n <div className={Style.quotaInformationModalItem}>\n <div className={Style.quotaInformationModalItemIcon}>\n <BagQuotaInformative />\n </div>\n <div className={Style.quotaInformationModalItemDescription}>\n {useFormatMessage(\n 'store/quota.modal.quotainformation.instruction-1'\n )}\n </div>\n </div>\n <div className={Style.quotaInformationModalItem}>\n <div className={Style.quotaInformationModalItemIcon}>\n <SelectQuotaInformative />\n </div>\n <div className={Style.quotaInformationModalItemDescription}>\n {useFormatMessage(\n 'store/quota.modal.quotainformation.instruction-2'\n )}\n </div>\n </div>\n <div className={Style.quotaInformationModalItem}>\n <div className={Style.quotaInformationModalItemIcon}>\n <QuotaInformative />\n </div>\n <div className={Style.quotaInformationModalItemDescription}>\n {useFormatMessage(\n 'store/quota.modal.quotainformation.instruction-3'\n )}\n </div>\n </div>\n <div className={Style.quotaInformationModalItem}>\n <div className={Style.quotaInformationModalItemIcon}>\n <CardQuotaInformative />\n </div>\n <div className={Style.quotaInformationModalItemDescription}>\n {useFormatMessage(\n 'store/quota.modal.quotainformation.instruction-4'\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n ) : null\n}\n\nexport default Popup\n\n```" } ]
code_mycheckout-sdk_8c13e36b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformative/QuotaInformative.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport useFormatMessage from '../../i18n/useFormatMessage'\nimport { formatter } from '../../utils'\nimport Popup from './popup'\nimport style from './quotaInformative.css'\n\ninterface Quota {\n quotas: number\n value: number\n}\n\ninterface Props {\n handleModal: () => void\n open: boolean\n quota: Quota\n}\n\nconst QuotaInformative = (props: Props) => {\n const { handleModal, open, quota } = props\n\n return (\n <div className={style.quotaInformationContainer} onClick={handleModal}>\n {useFormatMessage('store/quota.productdetails.quotainformation', {\n store: <span className={style.quotaInformationStore}>ORION</span>,\n quotas: (\n <span className={style.quotaInformationQuantity}>\n {quota.quotas} cuotas\n </span>\n ),\n value: (\n <span className={style.quotaInformationValue}>\n {formatter.format(quota.value)} libres de interés.\n </span>\n ),\n })}\n <Popup open={open} handleModal={handleModal} />\n </div>\n )\n}\n\nexport default QuotaInformative\n\n```" } ]
code_mycheckout-sdk_ad213d0e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformative/quotaInformative.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.quotaInformationContainer {\n box-shadow: 0px 3px 6px #00000029;\n border-radius: 8px;\n padding: 10px;\n font-size: 14px;\n color: #284859;\n font-weight: 700 !important;\n margin: 10px 0;\n cursor: pointer;\n width: 100%;\n}\n.quotaInformationStore,\n.quotaInformationQuantity,\n.quotaInformationValue {\n color: #1b998b;\n}\n\n.quotaInformationOverlay {\n position: fixed;\n width: 100vw;\n height: 100vh;\n background: #23232587;\n z-index: 1000000;\n left: 0;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: initial;\n}\n.quotaInformationModalContainer {\n width: 415px;\n max-width: 100%;\n background: #fff;\n box-shadow: 0px 3px 6px #00000029;\n padding: 24px 26px;\n box-sizing: border-box;\n position: relative;\n cursor: initial;\n margin: 14px;\n}\n\n.quotaInformationModalContainer .quotaInformationModalTitle {\n font-size: 26px !important;\n font-weight: bold !important;\n color: #1b998b !important;\n text-align: center;\n border-bottom: 1px solid #707070;\n padding-bottom: 8.5px;\n}\n.quotaInformationModalList {\n margin-top: 25px;\n}\n.quotaInformationModalDescription {\n padding-top: 8.5px;\n font-size: 14px !important;\n color: #284859 !important;\n font-weight: bold !important;\n line-height: 16px !important;\n}\n\n.quotaInformationModalDescription span {\n color: #1b998b !important;\n}\n\n.quotaInformationModalItem {\n display: flex;\n align-items: center;\n margin-bottom: 30px;\n}\n.quotaInformationModalItemIcon {\n width: 58px;\n margin-right: 20px;\n}\n.quotaInformationModalList .quotaInformationModalItemDescription {\n font-size: 14px !important;\n line-height: 16px !important;\n width: calc(100% - 80px) !important;\n line-height: 16px;\n}\n\n.quotaButton {\n height: 46px;\n width: 100%;\n border-radius: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n background: #eb5b2b !important;\n cursor: pointer;\n}\n\n.quotaInformationModalClose {\n position: absolute;\n top: 10px;\n right: 10px;\n cursor: pointer;\n}\n\n```" } ]
code_mycheckout-sdk_312ea8d8
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/MyCheckoutButton/MyCheckoutButtonContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport type { ItemToAdd, Product, ProductItem } from '../../interfaces'\nimport { MyCheckoutButton } from './MyCheckoutButton'\nimport { useMyCheckoutButton } from './useMyCheckoutButton'\n\ninterface Props {\n addToCart: (item: ItemToAdd) => void\n itemToAdd?: ItemToAdd\n isVisible?: boolean\n disabled?: boolean\n validateBeforeOfAdd?: () => boolean | undefined\n multipleAvailableSKUs: boolean\n onClickBehavior?: 'ensure-sku-selection'\n product?: Product\n selectedItem?: ProductItem\n forceOpenModal?: boolean\n handleSelectedItem?: (item: ProductItem) => void\n styles?: any\n isPreview?: boolean\n text?: string\n}\n\nexport const MyCheckoutButtonContainer = (props: Props) => {\n const button = useMyCheckoutButton(\n props.itemToAdd,\n props.product,\n props.selectedItem,\n props.validateBeforeOfAdd,\n props.disabled,\n props.multipleAvailableSKUs,\n props.onClickBehavior,\n props.forceOpenModal,\n props.addToCart,\n props.handleSelectedItem,\n props.isVisible,\n props.isPreview,\n props.text\n )\n\n if (!button.show) return null\n\n return <MyCheckoutButton {...button} />\n}\n\n```" } ]
code_mycheckout-sdk_2f1c062a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/MyCheckoutButton/myCheckoutButton.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.myCheckoutButtonContainer {\n width: 100%;\n}\n\n.myCheckoutButtonContainer .myCheckoutButtonContent {\n width: 100%;\n height: 42px;\n align-items: center;\n justify-content: center;\n display: flex;\n cursor: pointer;\n border: 1px solid var(--primary-text-color);\n font-size: 16px;\n border-radius: 8px;\n font-weight: var(--text-medium);\n}\n\n.myCheckoutButtonContainer .myCheckoutButtonContent:hover {\n background-color: var(--primary-color-button);\n border-color: var(--primary-color-button);\n color: var(--white-color);\n}\n\n.myCheckoutButtonContainer .myCheckoutButtonDisabled {\n width: 100%;\n height: 42px;\n border: 1px solid var(--dark-gray-color);\n background-color: var(--white-color);\n color: var(--dark-gray-color);\n border-radius: 8px;\n align-items: center;\n justify-content: center;\n display: flex;\n}\n\n.myCheckoutButtonContainer .myCheckoutButtonText {\n display: flex;\n justify-content: center;\n}\n\n```" } ]
code_mycheckout-sdk_a873fdcf
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/MyCheckoutButton/useMyCheckoutButton.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useEffect, useMemo } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport {\n newItemSelection,\n selectVariationSelected,\n updateSelectedItem,\n} from '../../contexts/global-context/reducers/cartSlice'\nimport {\n setLoadingAction,\n setStep,\n} from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport { openModal } from '../../contexts/global-context/reducers/modalSlice'\nimport { selectOrderFormStatus } from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport { selectSettings } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport { AddToCartEvent } from '../../events'\nimport { useEcommerce } from '../../hooks/useEcommerce'\nimport type { ItemToAdd, Product, ProductItem } from '../../interfaces'\nimport { Events } from '../../interfaces'\n\nexport const useMyCheckoutButton = (\n itemToAdd: ItemToAdd,\n product: Product,\n selectedItem: ProductItem,\n validateBeforeOfAdd: () => boolean | undefined,\n disabled: boolean,\n multipleAvailableSKUs: boolean,\n onClickBehavior: 'ensure-sku-selection',\n forceOpenModal: boolean,\n addToCart: (item: ItemToAdd) => void,\n handleSelectedItem: (item: ProductItem) => void,\n isVisible: boolean,\n isPreview: boolean,\n text: string\n // eslint-disable-next-line max-params\n) => {\n const dispatchGlobal = useDispatch()\n const { handleEcommerce } = useEcommerce()\n const variationSelected = useSelector(selectVariationSelected)\n const { buttonText, isConfigured, hasGoogleAnalytics } =\n useSelector(selectSettings)\n\n const orderFormStatus = useSelector(selectOrderFormStatus)\n\n const handleClick = (e?: any) => {\n if (isPreview) return\n e?.preventDefault()\n e?.stopPropagation()\n\n dispatchGlobal(\n newItemSelection({\n itemToAdd,\n product,\n selectedItem,\n })\n )\n\n const isProcessClick =\n validateBeforeOfAdd && validateBeforeOfAdd instanceof Function\n ? validateBeforeOfAdd()\n : null\n\n if (\n (isProcessClick || isProcessClick === null) &&\n !disabled &&\n itemToAdd &&\n (!multipleAvailableSKUs || onClickBehavior !== 'ensure-sku-selection')\n ) {\n dispatchGlobal(setLoadingAction(true))\n addToCart({\n id: itemToAdd.id,\n quantity: itemToAdd.quantity,\n seller: itemToAdd.seller,\n })\n\n const categories = product?.categories\n ? product?.categories[0]?.split('/')?.filter((item) => item !== '')\n : 'unnkown'\n\n handleEcommerce(Events.click, {\n onCompleted: () => {\n handleEcommerce(Events.add, {\n products: [\n {\n sku: itemToAdd.id,\n quantity: itemToAdd.quantity,\n price: product?.priceRange?.listPrice?.lowPrice || 0,\n category: categories?.[1] || 'unnkown',\n subcategory: categories?.[1] || 'unnkown',\n },\n ],\n })\n },\n })\n } else {\n handleEcommerce(Events.click)\n }\n\n const shouldNavigateToSkuSelector =\n onClickBehavior === 'ensure-sku-selection' && multipleAvailableSKUs\n\n if (shouldNavigateToSkuSelector) {\n dispatchGlobal(setStep(0))\n } else {\n orderFormStatus === 'idle' && dispatchGlobal(setStep(1))\n AddToCartEvent({ selectedItem, product, itemToAdd, hasGoogleAnalytics })\n }\n\n if ((isProcessClick || isProcessClick === null) && !disabled) {\n localStorage.setItem('minimize_modal', 'false')\n dispatchGlobal(openModal())\n }\n }\n\n const processShowLogo = () => {\n if (isPreview && text) return text\n\n if (buttonText) return buttonText\n\n return 'Compra rápida'\n }\n\n useEffect(() => {\n if (!variationSelected || !handleSelectedItem || !product) return\n\n const { items } = product\n const selectedSku = items?.find((item: ProductItem) => {\n return item.itemId === variationSelected.itemId\n })\n\n if (selectedSku) {\n handleSelectedItem(variationSelected)\n }\n }, [variationSelected])\n\n useEffect(() => {\n updateSelectedItem({\n itemToAdd,\n product,\n selectedItem,\n })\n }, [itemToAdd])\n\n useEffect(() => {\n if (forceOpenModal) {\n handleClick()\n }\n }, [forceOpenModal])\n\n const show = useMemo(() => {\n return isPreview || (isVisible && isConfigured)\n }, [isVisible, isConfigured])\n\n return {\n disabled,\n show,\n handleClick,\n processShowLogo,\n }\n}\n\n```" } ]
code_mycheckout-sdk_4355989a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/MyCheckoutButton/MyCheckoutButton.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport style from './myCheckoutButton.css'\n\ninterface Props {\n disabled: boolean\n text?: string\n handleClick: () => void\n processShowLogo: () => string\n}\n\nexport const MyCheckoutButton = ({\n disabled,\n text,\n handleClick,\n processShowLogo,\n}: Props) => {\n return (\n <div className={style.myCheckoutButtonContainer}>\n <a onClick={handleClick}>\n <div\n className={\n disabled\n ? style.myCheckoutButtonDisabled\n : style.myCheckoutButtonContent\n }\n >\n <span className={style.myCheckoutButtonText}>\n {text || processShowLogo()}\n </span>\n </div>\n </a>\n </div>\n )\n}\n\n```" } ]
code_mycheckout-sdk_3ee53800
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/EmailForm/EmailForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { Fragment } from 'react'\n\nimport { Input, Button, Loader } from '../shared'\nimport { regularExpressions } from '../../utils'\nimport { MyProfile } from '../Icons'\nimport global from '../../myCheckout-styles.module.css'\nimport styles from './emailForm.css'\nimport Email from '../Icons/Email'\nimport { ErrorLoadingInformation } from './ErrorLoadingInformation'\n\ninterface Props {\n showErrorMessage: boolean\n setShowErrorMessage: React.Dispatch<React.SetStateAction<boolean>>\n handleKeyUpevent: (\n ev: React.KeyboardEvent<HTMLInputElement | HTMLSelectElement>\n ) => void\n loading: boolean\n email: any\n handleClick: () => void\n disabled: boolean\n}\n\nconst EmailForm = (props: Props) => {\n const {\n showErrorMessage,\n setShowErrorMessage,\n handleKeyUpevent,\n loading,\n email,\n handleClick,\n disabled,\n } = props\n\n return (\n <div className={styles.emailFormContainer}>\n {loading ? (\n <Loader />\n ) : (\n <div className={styles.emailFormContent}>\n {showErrorMessage ? (\n <ErrorLoadingInformation\n handleClick={() => setShowErrorMessage(false)}\n />\n ) : (\n <Fragment>\n <Input\n type=\"email\"\n placeholder=\"store/checkoutless.register.email\"\n errorMessage=\"store/checkoutless.register.emailError\"\n regularExpression={regularExpressions.email}\n name=\"email\"\n onCustomKeyUpEvent={handleKeyUpevent}\n {...email}\n icon={\n <Fragment>\n <MyProfile\n fill={global.iconAlternative}\n width={18}\n height={18}\n className={global.inMobile}\n />\n <Email\n className={global.inDesktop}\n fill={global.iconAlternative}\n />\n </Fragment>\n }\n showClearButton={true}\n maxLength={50}\n />\n <Button\n value={\n loading\n ? 'store/checkoutless.button.loading'\n : 'store/checkoutless.button.continue'\n }\n onClick={() => handleClick()}\n disabled={disabled}\n />\n </Fragment>\n )}\n </div>\n )}\n </div>\n )\n}\n\nexport default EmailForm\n\n```" } ]
code_mycheckout-sdk_f1f536b7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/EmailForm/emailForm.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.emailFormContainer {\n position: relative;\n}\n\n.emailFormContent {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n\n.errorLoadingInfoContainer {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n}\n\n.errorLoadinInfoTextContainer {\n width: 80%;\n}\n\n.errorLoadinInfoTextContainer h4 {\n font-size: 18px;\n margin: 10px 0 0 0;\n}\n\n.errorLoadinInfoTextContainer p {\n margin-top: 10px;\n font-size: 14px;\n color: var(--dark-gray-color);\n}\n\n@media screen and (min-width: 992px) {\n .emailFormContainer {\n position: absolute;\n top: 50px;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .emailFormContent {\n width: 100%;\n padding: 0 30px;\n }\n}\n\n```" } ]
code_mycheckout-sdk_710f0d8a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/EmailForm/ErrorLoadingInformation.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport { Button } from '../shared'\nimport styles from './emailForm.css'\nimport { ErrorLoading } from '../Icons/ErrorLoading'\nimport useFormatMessage from '../../i18n/useFormatMessage'\nimport globalStyles from '../../myCheckout-styles.module.css'\n\ninterface Props {\n handleClick: () => void\n}\n\nexport const ErrorLoadingInformation = ({ handleClick }: Props) => {\n return (\n <div className={styles.errorLoadingInfoContainer}>\n <ErrorLoading />\n\n <div className={styles.errorLoadinInfoTextContainer}>\n <h4>{useFormatMessage('store/checkoutless.user.sorry')}</h4>\n <p className={globalStyles.textBase}>\n {useFormatMessage('store/checkoutless.user.error')}\n </p>\n </div>\n\n <Button\n value=\"store/checkoutless.user.error.retry\"\n onClick={handleClick}\n />\n </div>\n )\n}\n\n```" } ]
code_mycheckout-sdk_de380db3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/EmailForm/useEmailForm.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport type React from 'react'\nimport { useEffect, useState } from 'react'\nimport { useLazyQuery } from '@apollo/client'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { pathOr } from 'ramda'\n\nimport {\n useActions,\n useActionsDispatch,\n} from '../../contexts/ActionsProviderV2'\nimport { useInputValue } from '../../hooks/useInputValue'\nimport { expireCookie } from '../../utils'\nimport { setShowLogo } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport { setNextStep } from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport { Events } from '../../interfaces'\nimport { useEcommerce } from '../../hooks/useEcommerce'\nimport { GET_USER } from '../../graphql/queries'\nimport { EnterEmailEvent } from '../../events'\nimport {\n selectAddressStore,\n selectOrderFormStatus,\n selectProfile,\n setEmail,\n setOrderformStatus,\n setUserInfo,\n} from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport { userInfoMapper } from '../../utils/dataMapper'\nimport { useCreateAddressExternal } from '../../hooks/useCreateAddressExternal'\n\nconst useEmailForm = () => {\n const [disabled, setDisabled] = useState(true)\n const dispatchGlobal = useDispatch()\n const [showErrorMessage, setShowErrorMessage] = useState(false)\n const {\n updateOrderFormProfile,\n handleGetDocumentsClient,\n isOpenModalViewUser,\n isMinimizeViewUser,\n } = useActions()\n\n const {\n secondAfterEmail: { intervalSetSecond: interval },\n } = useActions()\n\n const profile = useSelector(selectProfile)\n const orderFormStatus = useSelector(selectOrderFormStatus)\n\n const addressAlternative = useSelector(selectAddressStore)\n\n const { verifyAndCreateAlternativeAddress } = useCreateAddressExternal()\n\n const dispatchActions = useActionsDispatch()\n const { handleEcommerce } = useEcommerce()\n\n const email = useInputValue(profile.email || '')\n\n const [getUser, { loading }] = useLazyQuery(GET_USER, {\n fetchPolicy: 'cache-and-network',\n onCompleted: async ({ getUser: userData }) => {\n // TODO: Check for what is this logic\n if (\n handleGetDocumentsClient &&\n handleGetDocumentsClient instanceof Function\n ) {\n handleGetDocumentsClient(email?.value || userData?.email || '')\n }\n\n updateOrderFormProfile({\n email: email.value.toLowerCase(),\n })\n\n if (profile.email !== email.value) {\n handleEcommerce(Events.authentication)\n }\n\n let persistedData = JSON.parse(localStorage.getItem('checkoutless_data'))\n\n persistedData\n ? (persistedData.email = email.value)\n : (persistedData = { email: email.value })\n\n localStorage.setItem('checkoutless_data', JSON.stringify(persistedData))\n\n const addressAlternativeWhitPostalCode =\n await verifyAndCreateAlternativeAddress(userData, addressAlternative)\n\n dispatchGlobal(\n setUserInfo(userInfoMapper(userData, addressAlternativeWhitPostalCode))\n )\n\n dispatchGlobal(setNextStep())\n },\n onError: (error) => {\n const statusCode = pathOr(\n 'E_HTTP_500',\n ['graphQLErrors', 0, 'extensions', 'exception', 'code'],\n error\n )\n\n if (statusCode.includes('404')) {\n updateOrderFormProfile({\n email: email.value.toLowerCase(),\n })\n\n // New Context\n dispatchGlobal(setOrderformStatus('incomplete'))\n dispatchGlobal(setEmail(email.value.toLocaleLowerCase()))\n\n localStorage.setItem(\n 'checkoutless_data',\n JSON.stringify({ email: email.value })\n )\n\n dispatchGlobal(setNextStep())\n } else {\n setShowErrorMessage(true)\n }\n },\n })\n\n useEffect(() => {\n dispatchGlobal(setShowLogo(!loading))\n }, [loading])\n\n const handleClick = (newEmail?: string) => {\n const emailLogin = newEmail || email.value.toLowerCase()\n const lastNotify = JSON.parse(\n localStorage.getItem('checkoutless_last_notify')\n )\n\n // reset tries for auth\n if (lastNotify?.email !== emailLogin) {\n clearInterval(interval)\n dispatchActions({\n type: 'SET_SECOND_DIRECT',\n args: 60,\n })\n localStorage.setItem('checkoutless_attempts', '0')\n }\n\n getUser({\n variables: {\n email: emailLogin,\n },\n })\n\n // Google Analytics\n EnterEmailEvent({ option: emailLogin })\n }\n\n useEffect(() => {\n email?.setValue(profile?.email)\n if (profile.email && profile.email !== '') {\n email?.setIsValid(true)\n setDisabled(false)\n } else {\n setDisabled(true)\n }\n }, [profile.email])\n\n useEffect(() => {\n // eslint-disable-next-line vtex/prefer-early-return\n if (\n (isOpenModalViewUser || isMinimizeViewUser) &&\n profile.email &&\n profile.email !== ''\n ) {\n handleClick(profile.email)\n\n if (isOpenModalViewUser) {\n dispatchActions({\n type: 'SET_IS_OPEN_MODAL_VIEW_USER',\n args: false,\n })\n }\n\n if (isMinimizeViewUser) {\n dispatchActions({\n type: 'SET_IS_MINIMIZE_VIEW_USER',\n args: false,\n })\n }\n }\n }, [isOpenModalViewUser, profile.email, isMinimizeViewUser])\n\n useEffect(() => {\n if (email.value && orderFormStatus === 'idle') {\n handleClick()\n } else {\n expireCookie('x-ecommerce-session')\n expireCookie('x-checkoutless-auth')\n }\n }, [])\n\n useEffect(() => {\n if (email.isValid) {\n setDisabled(false)\n } else {\n setDisabled(true)\n }\n }, [email])\n\n const handleKeyUpevent = (\n ev: React.KeyboardEvent<HTMLInputElement | HTMLSelectElement>\n ) => {\n if (ev.key === 'Enter' && !disabled) {\n handleClick()\n }\n }\n\n return {\n showErrorMessage,\n setShowErrorMessage,\n handleKeyUpevent,\n loading,\n email,\n handleClick,\n disabled,\n }\n}\n\nexport default useEmailForm\n\n```" } ]
code_mycheckout-sdk_9399fcac
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/EmailForm/EmailFormContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { Fragment } from 'react'\n\nimport EmailForm from './EmailForm'\nimport useEmailForm from './useEmailForm'\n\nconst Email = () => {\n const emailForm = useEmailForm()\n\n return (\n <Fragment>\n <EmailForm {...emailForm} />\n </Fragment>\n )\n}\n\nexport default Email\n\n```" } ]
code_mycheckout-sdk_db89b8c5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/FloatingButton/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport { useDispatch } from 'react-redux'\n\nimport { maximizeModal } from '../../contexts/global-context/reducers/modalSlice'\nimport styles from './floatingButton.css'\n\nconst FloatingButton = () => {\n const dispatchGlobal = useDispatch()\n\n const onClick = () => {\n localStorage.setItem('minimize_modal', 'false')\n dispatchGlobal(maximizeModal())\n }\n\n return (\n <span className={styles.floatButton} onClick={onClick}>\n <img\n src=\"https://kuikpay.vteximg.com.br/arquivos/ids/155424\"\n alt=\"My-checkout-float-button\"\n />\n </span>\n )\n}\n\nexport default FloatingButton\n\n```" } ]
code_mycheckout-sdk_fca01ad3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/FloatingButton/floatingButton.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.floatButton {\n position: fixed;\n bottom: 0px;\n right: 0px;\n cursor: pointer;\n width: 100px;\n height: 100px;\n z-index: 1000000000000;\n}\n\n.floatButton img {\n content: '';\n background-size: 94px 94px;\n background-repeat: no-repeat;\n height: 94px;\n width: 94px;\n position: absolute;\n}\n\n```" } ]
code_mycheckout-sdk_a1237a8e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/UnavailableProducts/useUnavailableProducts.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useDispatch, useSelector } from 'react-redux'\n\nimport { closeModal } from '../../contexts/global-context/reducers/modalSlice'\nimport {\n resetFlow,\n selectLoadingAction,\n} from '../../contexts/global-context/reducers/checkoutFormSlice'\nimport { setNewOrderform } from '../../contexts/global-context/reducers/orderFormDataSlice'\nimport { resetSimulation } from '../../contexts/global-context/reducers/simulationSlice'\n\nexport const useUnavailableProducts = () => {\n const dispatchGlobal = useDispatch()\n const loadingAction = useSelector(selectLoadingAction)\n\n const handleClose = () => {\n dispatchGlobal(closeModal())\n dispatchGlobal(resetFlow())\n dispatchGlobal(setNewOrderform())\n dispatchGlobal(resetSimulation())\n }\n\n return {\n handleClose,\n loadingAction,\n }\n}\n\n```" } ]
code_mycheckout-sdk_ceed42b3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/UnavailableProducts/UnavailableProducts.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport { Button } from '../shared'\nimport { EmptyCart } from '../Icons'\nimport useFormatMessage from '../../i18n/useFormatMessage'\nimport globalStyles from '../../myCheckout-styles.module.css'\nimport styles from './unavailableProducts.modules.css'\n\ninterface Props {\n handleClose: () => void\n}\n\nconst UnavailableProducts = ({ handleClose }: Props) => {\n return (\n <div className={styles.unavailableProductsContainer}>\n <div className={styles.unavailableProductsContent}>\n <EmptyCart\n className={styles.unavailableProductsIcon}\n fill={globalStyles.iconPrimary}\n />\n <p\n className={`${styles.unavailableProductsTextEmptyOrder} ${globalStyles.inDesktop}`}\n >\n {useFormatMessage('store/checkoutless.emptyCart.emptyOrder')}\n </p>\n <p\n className={`${styles.unavailableProductsText} ${globalStyles.inMobile}`}\n >\n {useFormatMessage('store/checkoutless.emptyCart.message')}\n </p>\n <p\n className={`${styles.unavailableProductsText} ${globalStyles.inDesktop}`}\n >\n {useFormatMessage('store/checkoutless.emptyCart.messageDeskopt')}\n </p>\n <Button\n value={'store/checkoutless.button.continue'}\n onClick={handleClose}\n secondary\n />\n </div>\n </div>\n )\n}\n\nexport default UnavailableProducts\n\n```" } ]
code_mycheckout-sdk_5c5d27a6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/UnavailableProducts/unavailableProducts.modules.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.unavailableProductsContainer {\n margin-top: 54px;\n position: relative;\n width: 100%;\n}\n\n.unavailableProductsContainer .unavailableProductsContent {\n align-items: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.unavailableProductsContainer .unavailableProductsIcon {\n height: 68px;\n width: 68px;\n}\n\n.unavailableProductsContainer .unavailableProductsText {\n padding: 20px 22%;\n text-align: center;\n}\n\n@media screen and (min-width: 992px) {\n .unavailableProductsContainer {\n align-items: center;\n bottom: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n left: 0;\n margin: 0;\n padding: 0 30px;\n position: absolute;\n right: 0;\n top: 44px;\n width: 100%;\n }\n\n .unavailableProductsContainer .unavailableProductsContent {\n width: 100%;\n }\n\n .unavailableProductsContainer .unavailableProductsTextEmptyOrder {\n color: var(--primary-color-focus);\n font-size: 22px;\n font-weight: var(--text-bold);\n padding: 20px 22% 0 22%;\n text-align: center;\n }\n\n .unavailableProductsContainer .unavailableProductsIcon {\n height: 88px;\n width: 88px;\n }\n\n .unavailableProductsContainer .unavailableProductsText {\n padding: 20px 22% 40px 22%;\n }\n}\n\n```" } ]
code_mycheckout-sdk_2eabc5c6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/UnavailableProducts/UnavailableProductsContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport { Loader } from '../shared'\nimport UnavailableProducts from './UnavailableProducts'\nimport { useUnavailableProducts } from './useUnavailableProducts'\n\nconst UnavailableProductsContainer = () => {\n const unavailableProducts = useUnavailableProducts()\n\n if (unavailableProducts?.loadingAction) return <Loader />\n\n return <UnavailableProducts {...unavailableProducts} />\n}\n\nexport default UnavailableProductsContainer\n\n```" } ]
code_mycheckout-sdk_028e0f50
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformativeComponent/QuotaInformativeComponentContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport type { Product, ProductItem, Runtime } from '../../interfaces'\nimport QuotaInformativeComponent from './QuotaInformativeComponent'\nimport useQuotaInformativeComponent from './useQuotaInformativeComponent'\n\ninterface Props {\n sandbox?: boolean\n language?: string\n theme: string\n selectedItem?: ProductItem\n product?: Product\n runtime: Runtime\n}\n\nconst QuotaInformativeComponentContainer = (props: Props) => {\n const { hidde, initialStyle, orion, styles } = useQuotaInformativeComponent(\n props.product\n )\n\n const propsComponent = {\n initialStyle,\n language: props.language,\n selectedItem: props.selectedItem,\n styles,\n }\n\n if (!styles || !orion || hidde) return null\n\n return <QuotaInformativeComponent {...propsComponent} />\n}\n\nexport default QuotaInformativeComponentContainer\n\n```" } ]
code_mycheckout-sdk_01e83451
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformativeComponent/QuotaInformativeComponent.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport { I18nProvider } from '../../i18n'\nimport type { ProductItem } from '../../interfaces'\nimport QuotaInformativeContainer from '../QuotaInformative/QuotaInformativeContainer'\n\ninterface Props {\n initialStyle: { display: string }\n language: string\n selectedItem: ProductItem\n styles?: any\n}\n\nconst QuotaInformativeComponent = (props: Props) => {\n const { initialStyle, language, selectedItem, styles } = props\n\n return (\n <I18nProvider locale={language}>\n <div className={styles.Checkoutless} style={initialStyle}>\n <QuotaInformativeContainer selectedItem={selectedItem} />\n </div>\n </I18nProvider>\n )\n}\n\nexport default QuotaInformativeComponent\n\n```" } ]
code_mycheckout-sdk_75795b61
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/QuotaInformativeComponent/useQuotaInformativeComponent.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useMemo } from 'react'\nimport { pathOr } from 'ramda'\nimport { useSelector } from 'react-redux'\n\nimport { useHandleVisualization } from '../../hooks/useHandleVisualization'\nimport { useValidateStyles } from '../../hooks/useValidateStyles'\nimport { selectSettings } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport type { Product } from '../../interfaces'\n\nconst useQuotaInformativeComponent = (product?: Product) => {\n const settings = useSelector(selectSettings)\n const styles = useValidateStyles()\n const { hidde, initialStyle } = useHandleVisualization(product)\n\n const orion = useMemo(() => pathOr(false, ['orion'], settings), [settings])\n\n return {\n hidde,\n initialStyle,\n orion,\n styles,\n }\n}\n\nexport default useQuotaInformativeComponent\n\n```" } ]
code_mycheckout-sdk_866318b5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/shared/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport Alert from './Alert/Alert'\nimport Button from './Button/ButtonContainer'\nimport Checkbox from './Checkbox/Checkbox'\nimport HabeasData from './HabeasData'\nimport Input from './Input/InputContainer'\nimport Loader from './Loader/Loader'\nimport Select from './Select/SelectContainer'\nimport Spinner from './Spinner/Spinner'\nimport { Toast } from './Toast/Toast'\nimport { ToolTip } from './Tooltip/Tooltip'\n\nexport {\n Alert,\n Button,\n Checkbox,\n HabeasData,\n Input,\n Loader,\n Select,\n Spinner,\n Toast,\n ToolTip,\n}\n\n```" } ]
code_mycheckout-sdk_318fe462
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Coupon/coupon.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.couponContainer {\n display: flex;\n align-items: flex-end;\n height: auto;\n justify-content: space-between;\n width: 100%;\n padding: 2.5%;\n}\n\n.couponContainer .couponContentInput {\n flex: 0 1 calc(76% - 0.25rem);\n}\n\n.couponContainer .couponInput {\n width: 100%;\n}\n\n.couponContainer .couponInput::placeholder {\n color: var(--dark-gray-color) !important;\n font-size: 14px !important;\n}\n\n.couponContainer .couponContentButon {\n flex: 0 1 calc(24% - 0.25rem);\n}\n\n.couponContentButon [class*='buttonContainer'] {\n height: 25px;\n border-radius: 4px !important;\n font-size: 16px;\n}\n\n.couponContentButon [class*='buttonContent'] {\n margin: 0;\n}\n\n@media screen and (min-width: 568px) {\n .couponContainer {\n padding-bottom: 0;\n }\n}\n\n@media screen and (min-width: 992px) {\n .couponContainer {\n align-items: center;\n }\n}\n\n[class*='gridFormTwoCols'] .couponContainer {\n padding: 0;\n}\n\n[class*='gridFormTwoCols'] .couponContainer .couponContentInput {\n flex: 0 1 calc(76% - 0.25rem);\n}\n\n[class*='gridFormTwoCols'] .couponContainer .couponContentButon {\n flex: 0 1 calc(24% - 0.25rem);\n}\n\n.inputValid {\n border-bottom: 1px solid var(--valid-color);\n flex: 0 1 calc(76% - 0.25rem);\n}\n\n```" } ]
code_mycheckout-sdk_db52c5fc
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Coupon/CouponContainer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport Coupon from './Coupon'\nimport useCoupon from './useCoupon'\n\ninterface Props {\n borderBottom?: boolean\n}\n\nconst CouponContainer = ({ borderBottom }: Props) => {\n const couponProps = { ...useCoupon(), borderBottom }\n\n return <Coupon {...couponProps} />\n}\n\nexport default CouponContainer\n\n```" } ]
code_mycheckout-sdk_70590f4a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Coupon/Coupon.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport type { ChangeEvent, Dispatch, SetStateAction } from 'react'\nimport React from 'react'\nimport type { IntlShape } from 'react-intl'\n\nimport type { MarketingData, Message } from '../../interfaces'\nimport { LiteDelete, Offer } from '../Icons'\nimport { Button, Input } from '../shared'\nimport CouponInfo from './CouponInfo'\nimport global from '../../myCheckout-styles.module.css'\nimport styles from './coupon.css'\nimport InfoItem from '../shared/InfoItem'\nimport { Tag } from '../Icons/Tag'\n\ninterface CouponType {\n isValid: any\n value: string\n onChange: (e: ChangeEvent<HTMLInputElement | HTMLSelectElement>) => void\n reset: () => void\n setIsValid: Dispatch<any>\n setValue: Dispatch<SetStateAction<string>>\n}\n\ninterface Props {\n borderBottom: boolean\n coupon: CouponType\n disabled: boolean\n error: Message\n intl: IntlShape\n marketingData: MarketingData\n deleteCoupon: () => void\n handleClick: () => void\n onBlur: () => void\n}\n\nconst Coupon = (props: Props) => {\n const {\n borderBottom,\n coupon,\n disabled,\n intl,\n marketingData,\n deleteCoupon,\n handleClick,\n onBlur,\n } = props\n\n return (\n <div className={global.w100}>\n {marketingData?.coupon ? (\n <div className={`${styles.inputValid}`}>\n <InfoItem>\n <InfoItem.Icon>\n <Offer />\n </InfoItem.Icon>\n <InfoItem.Content>\n <CouponInfo\n global={global}\n intl={intl}\n marketingData={marketingData}\n />\n </InfoItem.Content>\n <InfoItem.Edit\n style={{ flex: 0, justifyContent: 'end' }}\n className={global.cursorPointer}\n icon={<LiteDelete fill={global.iconAlternative} />}\n onClick={deleteCoupon}\n />\n </InfoItem>\n </div>\n ) : (\n <div\n className={`${styles.couponContainer} ${\n borderBottom ? global.borderBottom : ''\n }`}\n >\n <div className={styles.couponContentInput}>\n <Input\n placeholder=\"store/checkoutless.coupon.textInput\"\n name=\"coupon\"\n className={styles.couponInput}\n {...coupon}\n errorMessage=\"store/checkoutless.coupon.error\"\n floatLabel={false}\n icon={<Tag width={18} height={18} />}\n showClearButton={true}\n blurFunction={onBlur}\n />\n </div>\n <div className={styles.couponContentButon}>\n {!disabled && (\n <Button\n onClick={handleClick}\n value={'store/checkoutless.coupon.action'}\n disabled={disabled}\n />\n )}\n </div>\n </div>\n )}\n </div>\n )\n}\n\nexport default Coupon\n\n```" } ]
code_mycheckout-sdk_7fcde29b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Coupon/CouponInfo.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport type { IntlShape } from 'react-intl'\n\nimport type { MarketingData } from '../../interfaces'\n\ninterface Props {\n global?: any\n intl: IntlShape\n marketingData: MarketingData\n}\n\nconst CouponInfo = (props: Props) => {\n const { global, intl, marketingData } = props\n\n return (\n <div>\n <p className={`${global.textSm} ${global.gray}`}>\n {intl.formatMessage({ id: 'store/checkoutless.coupon' })}\n </p>\n <p>{marketingData?.coupon}</p>\n </div>\n )\n}\n\nexport default CouponInfo\n\n```" } ]
code_mycheckout-sdk_0cf79ad2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Coupon/useCoupon.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useEffect, useState } from 'react'\nimport { useIntl } from 'react-intl'\nimport { useSelector } from 'react-redux'\n\nimport { useActions } from '../../contexts/ActionsProviderV2'\nimport { useUserData } from '../../contexts/UserDataProvider'\nimport { useInputValue } from '../../hooks/useInputValue'\nimport type { Message } from '../../interfaces'\nimport { EnterCouponEvent } from '../../events'\nimport { selectSettings } from '../../contexts/global-context/reducers/uiSettingsSlice'\n\nconst useCoupon = () => {\n const [error, setError] = useState(null)\n const [success, setSuccess] = useState(false)\n const [disabled, setDisabled] = useState(true)\n const { hasGoogleAnalytics } = useSelector(selectSettings)\n\n const coupon = useInputValue('')\n const intl = useIntl()\n const { insertCoupon } = useActions()\n const { messages, marketingData } = useUserData()\n\n const handleClick = () => {\n insertCoupon(coupon.value)\n }\n\n const deleteCoupon = () => {\n insertCoupon('')\n }\n\n const onBlur = () => {\n if (coupon.value.length === 0) coupon.setIsValid(null)\n }\n\n useEffect(() => {\n const err = messages?.find(\n (message: Message) =>\n message.code === 'couponNotFound' || message.code === 'couponExpired'\n )\n\n if (coupon.value && marketingData?.coupon === coupon.value) {\n setSuccess(true)\n coupon.setIsValid(true)\n } else {\n setSuccess(false)\n }\n\n if (!err) {\n setError(null)\n\n return\n }\n\n setError(err)\n\n if (err) {\n setTimeout(() => {\n setError(null)\n }, 3000)\n }\n\n if (err && coupon.value) coupon.setIsValid(false)\n }, [messages, marketingData])\n\n useEffect(() => {\n if (coupon.value.length > 0) {\n setDisabled(false)\n } else {\n setDisabled(true)\n }\n }, [coupon.value])\n\n useEffect(() => {\n if (success) EnterCouponEvent({ option: coupon.value, hasGoogleAnalytics })\n }, [success])\n\n return {\n coupon,\n disabled,\n error,\n intl,\n marketingData,\n success,\n deleteCoupon,\n handleClick,\n onBlur,\n }\n}\n\nexport default useCoupon\n\n```" } ]
code_mycheckout-sdk_74fe67f9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/UserValidate/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n/* eslint-disable no-else-return */\nimport React, { useEffect } from 'react'\nimport { pathOr } from 'ramda'\nimport { useSelector } from 'react-redux'\n\nimport { UserInfo } from '../UserInfo/UserInfo'\nimport { useUserDataDispatch } from '../../contexts/UserDataProvider'\nimport { useActions } from '../../contexts/ActionsProviderV2'\nimport ShippingFormContainer from '../RegisterForm/Shipping/ShippingFormContainer'\nimport RegisterFormContainer from '../RegisterForm/RegisterFormContainer'\nimport { MeasurePurchaseProcess } from '../../services/GoogleTagManager'\nimport { ENTER_EMAIL } from '../../utils/constants'\nimport { selectSettings } from '../../contexts/global-context/reducers/uiSettingsSlice'\nimport {\n selectHasAddress,\n selectIsNew,\n selectIsProfileComplete,\n selectItems,\n} from '../../contexts/global-context/reducers/orderFormDataSlice'\n\nconst UserValidate = () => {\n const items = useSelector(selectItems)\n const dispatchUserData = useUserDataDispatch()\n const { config } = useActions()\n\n const { hasGoogleAnalytics } = useSelector(selectSettings)\n const profileComplete = useSelector(selectIsProfileComplete)\n const hasAddresses = useSelector(selectHasAddress)\n const isNew = useSelector(selectIsNew)\n\n useEffect(() => {\n // eslint-disable-next-line vtex/prefer-early-return\n if (config) {\n const customSubTotalItems = pathOr([], ['customSubTotalItems'], config)\n\n dispatchUserData({\n type: 'SET_CUSTOM_SUBTOTAL_ITEMS',\n args: {\n customSubTotalItems,\n },\n })\n }\n }, [config])\n\n useEffect(() => {\n try {\n const persistedData = JSON.parse(\n localStorage.getItem('checkoutless_data')\n )\n\n MeasurePurchaseProcess({\n stepName: ENTER_EMAIL,\n items,\n option: persistedData?.email,\n hasGoogleAnalytics,\n })\n } catch (error) {\n console.error('Error ', error)\n }\n }, [])\n\n if (!isNew) {\n if (profileComplete) {\n return <UserInfo />\n } else if (!hasAddresses) {\n return <ShippingFormContainer />\n }\n }\n\n return <RegisterFormContainer />\n}\n\nexport default UserValidate\n\n```" } ]
code_mycheckout-sdk_47e7b259
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/CardEmpty.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst CardEmpty = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"45\"\n height=\"45\"\n viewBox=\"0 0 120 80\"\n >\n <g fill=\"none\" fillRule=\"evenodd\">\n <path\n fill=\"#E0E0E3\"\n d=\"M4 0h112a4 4 0 0 1 4 4v72a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z\"\n />\n <path\n fill=\"#C6C6CB\"\n d=\"M16 19h19a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H16a2 2 0 0 1-2-2V21a2 2 0 0 1 2-2z\"\n />\n <path\n fill=\"#FFF\"\n d=\"M94 0h22c2.213 0 4 1.788 4 3.995v72.01A3.993 3.993 0 0 1 116.003 80H27C79 53 88.999 3.864 88.999 3.864 89.582 1.737 91.79 0 93.999 0z\"\n opacity=\".2\"\n />\n <rect width=\"20\" height=\"7\" x=\"14\" y=\"56\" fill=\"#A1A1A6\" rx=\"3.5\" />\n <rect width=\"20\" height=\"7\" x=\"38\" y=\"56\" fill=\"#A1A1A6\" rx=\"3.5\" />\n <rect width=\"20\" height=\"7\" x=\"62\" y=\"56\" fill=\"#A1A1A6\" rx=\"3.5\" />\n <rect width=\"20\" height=\"7\" x=\"86\" y=\"56\" fill=\"#A1A1A6\" rx=\"3.5\" />\n </g>\n </svg>\n )\n}\n\nexport default CardEmpty\n\n```" } ]
code_mycheckout-sdk_1f8992db
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/index.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { Add } from './Add'\nimport { Alert } from './Alert'\nimport { ArrowBack } from './ArrowBack'\nimport { ArrowDown } from './ArrowDown'\nimport { ArrowUp } from './ArrowUp'\nimport { BellIcon } from './BellIcon'\nimport { BagQuotaInformative } from './BagQuotaInformative'\nimport { Calendar } from './Calendar'\nimport { CardQuotaInformative } from './CardQuotaInformative'\nimport { Check } from './Check'\nimport { CheckboxIcon } from './Checkbox'\nimport { Clock } from './Clock'\nimport { Close } from './Close'\nimport { CreditApproved } from './CreditApproved'\nimport { CreditCard } from './CreditCard'\nimport { CvcCard } from './CvcCard'\nimport { Danger } from './Danger'\nimport { Delete } from './Delete'\nimport { DenyCredit } from './DenyCredit'\nimport { Dropup } from './Dropup'\nimport { EmptyCart } from './emptyCart'\nimport { Error } from './Error'\nimport { Identity } from './Identity'\nimport { Info } from './info'\nimport { LiteAdd } from './LiteAdd'\nimport { LiteCheck } from './LiteCheck'\nimport { LiteClose } from './LiteClose'\nimport { LiteDelete } from './LiteDelete'\nimport { Dropdown } from './Dropdown'\nimport { LiteEdit } from './LiteEdit'\nimport { LiteLocation } from './LiteLocation'\nimport { LiteRadioButton } from './LiteRadioButton'\nimport { Loading } from './Loading'\nimport { LocationIcon } from './LocationIcon'\nimport { Lock } from './Lock'\nimport { Logo } from './Logo'\nimport { LogoGc } from './LogoGc'\nimport { LogoKp } from './LogoKp'\nimport { LogoVTEX } from './LogoVTEX'\nimport { MainLogo } from './MainLogo'\nimport { MinimizeButton } from './MinimizeButton'\nimport { MyData } from './MyData'\nimport { MyOrder } from './MyOrder'\nimport { MyProfile } from './MyProfile'\nimport { Offer } from './Offer'\nimport { Order } from './Order'\nimport { OutlineCancel } from './OutlineCancel'\nimport { OutlineCreate } from './OutlineCreate'\nimport { PaymentEdit } from './PaymentEdit'\nimport { Pickup } from './Pickup'\nimport { ProfileEdit } from './ProfileEdit'\nimport { QuotaInformative } from './QuotaInformation'\nimport { RadioButton } from './RadioButton'\nimport { SelectQuotaInformative } from './SelectQuotaInformative'\nimport { Shipping } from './Shipping'\nimport { Store } from './store'\nimport { UnfilledCheck } from './UnfilledCheck'\nimport { Verified } from './Verified'\nimport { VerifiedCredit } from './VerifiedCredit'\nimport { PaymentPending } from './PaymentPending'\n\nexport {\n Add,\n Alert,\n ArrowBack,\n ArrowDown,\n ArrowUp,\n BagQuotaInformative,\n BellIcon,\n Calendar,\n CardQuotaInformative,\n Check,\n CheckboxIcon,\n Clock,\n Close,\n CreditApproved,\n CreditCard,\n CvcCard,\n Danger,\n Delete,\n DenyCredit,\n Dropdown,\n Dropup,\n EmptyCart,\n Error,\n Identity,\n Info,\n LiteAdd,\n LiteCheck,\n LiteClose,\n LiteDelete,\n LiteEdit,\n LiteLocation,\n LiteRadioButton,\n Loading,\n LocationIcon,\n Lock,\n Logo,\n LogoGc,\n LogoKp,\n LogoVTEX,\n MainLogo,\n MinimizeButton,\n MyData,\n MyOrder,\n MyProfile,\n Offer,\n Order,\n OutlineCancel,\n OutlineCreate,\n PaymentEdit,\n Pickup,\n ProfileEdit,\n QuotaInformative,\n RadioButton,\n SelectQuotaInformative,\n Shipping,\n Store,\n UnfilledCheck,\n Verified,\n VerifiedCredit,\n PaymentPending,\n}\n\n```" } ]
code_mycheckout-sdk_5c4b2418
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LiteDelete.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n className?: string\n}\n\nexport const LiteDelete = (props: Props) => {\n const { fill, className } = props\n\n return (\n <svg\n id=\"Icon_borrar\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 20\"\n className={className}\n >\n <defs>\n <clipPath id=\"clip-path\">\n <rect\n id=\"Rectángulo_2116\"\n data-name=\"Rectángulo 2116\"\n width=\"13.567\"\n height=\"17.428\"\n fill=\"none\"\n />\n </clipPath>\n </defs>\n <rect\n id=\"Rectángulo_2117\"\n data-name=\"Rectángulo 2117\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n />\n <g id=\"Grupo_4728\" data-name=\"Grupo 4728\" transform=\"translate(5 3)\">\n <g\n id=\"Grupo_4727\"\n data-name=\"Grupo 4727\"\n transform=\"translate(0 0)\"\n clipPath=\"url(#clipPath)\"\n >\n <path\n id=\"Trazado_5986\"\n data-name=\"Trazado 5986\"\n d=\"M11.213,17.718H2.842a.248.248,0,0,1-.247-.227L1.358,2.547a.248.248,0,0,1,.065-.188.244.244,0,0,1,.182-.08H12.45a.244.244,0,0,1,.182.08.248.248,0,0,1,.065.188L11.46,17.491a.247.247,0,0,1-.247.227m-8.143-.5h7.915l1.2-14.448H1.874Z\"\n transform=\"translate(-0.172 -0.289)\"\n className={fill}\n />\n <path\n id=\"Trazado_5987\"\n data-name=\"Trazado 5987\"\n d=\"M13.32,2.774H.247a.248.248,0,0,1,0-.5H13.32a.248.248,0,0,1,0,.5\"\n transform=\"translate(0 -0.289)\"\n className={fill}\n />\n <path\n id=\"Trazado_5988\"\n data-name=\"Trazado 5988\"\n d=\"M7.816,16.622a.247.247,0,0,1-.247-.247V4.5a.247.247,0,1,1,.494,0V16.375a.247.247,0,0,1-.247.247\"\n transform=\"translate(-0.961 -0.539)\"\n className={fill}\n />\n <path\n id=\"Trazado_5989\"\n data-name=\"Trazado 5989\"\n d=\"M10.226,16.6H10.2a.247.247,0,0,1-.224-.268L11.016,4.5a.248.248,0,1,1,.493.043L10.472,16.377a.248.248,0,0,1-.246.226\"\n transform=\"translate(-1.267 -0.543)\"\n className={fill}\n />\n <path\n id=\"Trazado_5990\"\n data-name=\"Trazado 5990\"\n d=\"M5.255,16.6a.248.248,0,0,1-.246-.226L3.972,4.546A.248.248,0,0,1,4.2,4.278a.251.251,0,0,1,.268.225L5.5,16.334a.248.248,0,0,1-.225.268H5.255\"\n transform=\"translate(-0.504 -0.543)\"\n className={fill}\n />\n <path\n id=\"Trazado_5991\"\n data-name=\"Trazado 5991\"\n d=\"M9.679,2.485a.247.247,0,0,1-.247-.247V.673A.179.179,0,0,0,9.253.5h-3.7a.179.179,0,0,0-.178.178V2.238a.248.248,0,0,1-.5,0V.673A.674.674,0,0,1,5.552,0h3.7a.673.673,0,0,1,.673.673V2.238a.247.247,0,0,1-.247.247\"\n transform=\"translate(-0.619 0)\"\n className={fill}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_1371f5ff
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/ArrowRight.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n width?: number\n height?: number\n}\n\nexport function ArrowRight(props: Props) {\n const { fill, width = 16, height = 16 } = props\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 620 620\"\n >\n <g\n xmlns=\"http://www.w3.org/2000/svg\"\n transform=\"translate(0.000000,622.000000) scale(0.100000,-0.100000)\"\n className={fill}\n stroke=\"none\"\n >\n <path d=\"M1211 5927 c-53 -20 -111 -76 -137 -131 -43 -91 -27 -189 40 -262 25 -26 490 -344 1186 -810 1665 -1116 2243 -1505 2258 -1519 11 -10 -299 -246 -1630 -1244 -904 -677 -1655 -1241 -1670 -1253 -48 -41 -73 -105 -73 -183 1 -45 7 -81 17 -100 23 -42 83 -100 127 -121 53 -26 145 -25 201 3 39 20 3515 2626 3611 2708 51 43 75 83 89 146 17 78 -4 150 -62 212 -27 28 -425 302 -1053 724 -555 374 -1374 925 -1820 1225 -445 300 -834 560 -863 578 -44 27 -66 33 -120 36 -39 2 -81 -2 -101 -9z\" />\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_330f3fe2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LiteLocation.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n width?: number\n height?: number\n}\n\nexport const LiteLocation = (props: Props) => {\n const { fill, width = '24', height = '24' } = props\n\n return (\n <svg\n id=\"Icon_ubicación\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 16 16\"\n >\n <rect\n id=\"Rectángulo_2115\"\n data-name=\"Rectángulo 2115\"\n width=\"16\"\n height=\"16\"\n transform=\"translate(0 0)\"\n fill=\"none\"\n />\n <g id=\"Grupo_4698\" data-name=\"Grupo 4698\" transform=\"translate(3.333)\">\n <g id=\"Grupo_4697\" data-name=\"Grupo 4697\">\n <path\n id=\"Trazado_5971\"\n data-name=\"Trazado 5971\"\n d=\"M8.915,2.31A4.705,4.705,0,0,0,5.086.007C4.91,0,4.731,0,4.554.007A4.706,4.706,0,0,0,.726,2.31,4.967,4.967,0,0,0,.449,6.957L4.62,15.873a.221.221,0,0,0,.4,0L9.193,6.955A4.966,4.966,0,0,0,8.915,2.31M8.791,6.769,4.821,15.257.85,6.771A4.526,4.526,0,0,1,1.105,2.54,4.27,4.27,0,0,1,4.577.449c.08,0,.162-.006.244-.006s.163,0,.243.006A4.271,4.271,0,0,1,8.536,2.54a4.524,4.524,0,0,1,.256,4.229\"\n transform=\"translate(0 0)\"\n className={fill}\n />\n <path\n id=\"Trazado_5972\"\n data-name=\"Trazado 5972\"\n d=\"M5.428,2.813A2.645,2.645,0,1,0,8.073,5.458,2.648,2.648,0,0,0,5.428,2.813m0,4.847a2.2,2.2,0,1,1,2.2-2.2,2.2,2.2,0,0,1-2.2,2.2\"\n transform=\"translate(-0.608 -0.615)\"\n className={fill}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_a7dc70e5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Offer.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport const Offer = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={24} height={24} {...props}>\n <path data-name=\"Trazado 3270\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <g data-name=\"Grupo 322\" fill=\"#1b998b\" transform=\"translate(2 2)\">\n <path\n data-name=\"Trazado 3271\"\n d=\"M19.41 9.58l-9-9A1.987 1.987 0 009 0H2a2.006 2.006 0 00-2 2v7a2 2 0 00.59 1.42l9 9A1.987 1.987 0 0011 20a1.955 1.955 0 001.41-.59l7-7A1.955 1.955 0 0020 11a2.02 2.02 0 00-.59-1.42zM11 18.01L2 9V2h7v-.01l9 9z\"\n />\n <circle\n data-name=\"Elipse 123\"\n cx={1.5}\n cy={1.5}\n r={1.5}\n transform=\"translate(3 3)\"\n />\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_654bddff
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Lock.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function Lock() {\n return (\n <svg\n id=\"outline-lock-24px\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n viewBox=\"0 0 30 30\"\n >\n <g id=\"Bounding_Boxes\">\n <path\n id=\"Trazado_2370\"\n data-name=\"Trazado 2370\"\n d=\"M0,0H30V30H0Z\"\n fill=\"none\"\n />\n <path\n id=\"Trazado_2371\"\n data-name=\"Trazado 2371\"\n d=\"M0,0H30V30H0Z\"\n fill=\"none\"\n opacity=\"0.87\"\n />\n </g>\n <g id=\"Outline\" transform=\"translate(5 1.25)\">\n <path\n id=\"Trazado_2372\"\n data-name=\"Trazado 2372\"\n d=\"M21.5,9.75H20.25V7.25a6.25,6.25,0,0,0-12.5,0v2.5H6.5A2.507,2.507,0,0,0,4,12.25v12.5a2.507,2.507,0,0,0,2.5,2.5h15a2.507,2.507,0,0,0,2.5-2.5V12.25A2.507,2.507,0,0,0,21.5,9.75ZM10.25,7.25a3.75,3.75,0,0,1,7.5,0v2.5h-7.5ZM21.5,24.75H6.5V12.25h15ZM14,21a2.5,2.5,0,1,0-2.5-2.5A2.507,2.507,0,0,0,14,21Z\"\n transform=\"translate(-4 -1)\"\n fill=\"#707685\"\n />\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_1df36a88
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LogoGc.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function LogoGc(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg\n version=\"1.1\"\n id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n width={120}\n height={50}\n viewBox=\"0 -5 207.75 78.55\"\n // style=\"enable-background:new 0 0 207.75 78.55;\"\n // xmlXpace=\"preserve\"\n {...props}\n >\n <style type=\"text/css\">\n {`.st0{fill:#2A4959;stroke:#2A4959;stroke-width:1.3567;stroke-miterlimit:10;}\n\t.st1{fill:#2A4959;stroke:#2A4959;stroke-width:1.3567;stroke-miterlimit:10;}\n\t.st2{fill:#2A4959;}`}\n </style>\n <g>\n <path\n className=\"st0\"\n d=\"M48.44,51.84L32.32,35.68l-0.28,0.28v15.88h-1.92V18.39h1.92v14.85l14.94-14.85h2.72L33.68,34.37l17.43,17.47\n\t\tH48.44z\"\n />\n <path\n className=\"st0\"\n d=\"M67.31,50.15c-1.28,1.37-3.08,2.06-5.39,2.06c-2.28,0-4.04-0.67-5.29-2.01c-1.25-1.34-1.87-3.22-1.87-5.62\n\t\tV32.49h1.92v12.09c0,1.84,0.41,3.26,1.22,4.26c0.84,1,2.19,1.5,4.03,1.5c3.59,0,5.39-1.92,5.39-5.76V32.49h1.87v12.09\n\t\tC69.18,46.95,68.56,48.81,67.31,50.15z\"\n />\n <path\n className=\"st0\"\n d=\"M76.23,29.03c-0.34,0-0.7-0.14-1.08-0.42c-0.28-0.28-0.44-0.66-0.47-1.12c0-0.84,0.52-1.36,1.55-1.55\n\t\tc0.78,0,1.3,0.52,1.55,1.55C77.77,28.51,77.26,29.03,76.23,29.03z M75.24,51.84V32.49h1.92v19.35H75.24z\"\n />\n <path\n className=\"st0\"\n d=\"M97.1,51.84L86.98,41.77l-1.08,1.08v8.99h-1.92V17.17h1.92v22.91l8.39-8.34H97l-8.76,8.71l11.38,11.38H97.1z\"\n />\n <path\n className=\"st1\"\n d=\"M146.09,51.84v-3.33c-2.03,2.44-4.61,3.65-7.73,3.65c-2.81,0-5.17-0.95-7.07-2.86\n\t\tc-1.94-1.94-2.9-4.31-2.9-7.12c0-2.81,0.95-5.17,2.86-7.07c1.94-1.94,4.31-2.9,7.12-2.9c3.09,0,5.67,1.22,7.73,3.65v-3.37h1.92\n\t\tv19.35H146.09z M144.08,36.48c-1.59-1.59-3.5-2.39-5.72-2.39c-2.25,0-4.15,0.78-5.72,2.34c-1.59,1.59-2.39,3.51-2.39,5.76\n\t\tc0,2.22,0.8,4.12,2.39,5.72c1.59,1.59,3.5,2.39,5.72,2.39c2.25,0,4.15-0.78,5.72-2.34c1.59-1.59,2.39-3.51,2.39-5.76\n\t\tC146.47,39.97,145.67,38.07,144.08,36.48z\"\n />\n <path\n className=\"st1\"\n d=\"M164.5,41.58l-2.89,6.19l-7.21-15.27h-2.06l8.15,17.57l-5.01,10.87h2.15l8.93-19.22\n\t\tC165.88,41.69,165.19,41.65,164.5,41.58z\"\n />\n </g>\n <g>\n <g>\n <path\n className=\"st2\"\n d=\"M174.85,32.71c-2.81,0-5.63,0-8.44,0c-0.4,0-0.8,0-1.19,0c-0.81,0-0.81,1.26,0,1.26c2.81,0,5.63,0,8.44,0\n\t\t\tc0.4,0,0.8,0,1.19,0C175.66,33.98,175.66,32.71,174.85,32.71L174.85,32.71z\"\n />\n </g>\n </g>\n <g>\n <g>\n <path\n className=\"st2\"\n d=\"M179.49,35.73c-4.17,0-8.34,0-12.51,0c-0.59,0-1.18,0-1.77,0c-0.81,0-0.81,1.26,0,1.26c4.17,0,8.34,0,12.51,0\n\t\t\tc0.59,0,1.18,0,1.77,0C180.3,36.99,180.3,35.73,179.49,35.73L179.49,35.73z\"\n />\n </g>\n </g>\n <g>\n <g>\n <path\n className=\"st2\"\n d=\"M174.85,38.74c-2.81,0-5.63,0-8.44,0c-0.4,0-0.8,0-1.19,0c-0.81,0-0.81,1.26,0,1.26c2.81,0,5.63,0,8.44,0\n\t\t\tc0.4,0,0.8,0,1.19,0C175.66,40,175.66,38.74,174.85,38.74L174.85,38.74z\"\n />\n </g>\n </g>\n <path\n className=\"st1\"\n d=\"M121.37,47.7c-2.04,2.04-4.53,3.05-7.49,3.05c-3.38,0-6.17-1.38-8.37-4.14v13.35h-2.02v-29.9h2.02v3.84\n\tc2.1-2.76,4.89-4.14,8.37-4.14c2.96,0,5.43,1,7.44,3c2.04,2.04,3.05,4.53,3.05,7.49S123.38,45.7,121.37,47.7z M119.9,34.25\n\tc-1.67-1.67-3.68-2.51-6.01-2.51c-2.36,0-4.37,0.82-6.01,2.46c-1.68,1.67-2.51,3.69-2.51,6.06c0,2.33,0.84,4.33,2.51,6.01\n\tc1.67,1.67,3.68,2.51,6.01,2.51c2.36,0,4.37-0.82,6.01-2.46c1.67-1.67,2.51-3.69,2.51-6.06C122.41,37.93,121.57,35.93,119.9,34.25z\"\n />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_8f29c086
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Shipping.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n height?: number\n strokeWidth?: number\n width?: number\n}\n\nexport const Shipping = ({\n fill,\n height = 22,\n strokeWidth = 0.5,\n width = 22,\n}: Props) => {\n return (\n <svg\n id=\"Icon_envío\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 22 22\"\n >\n <rect\n id=\"Rectángulo_2112\"\n data-name=\"Rectángulo 2112\"\n width={width}\n height={height}\n fill=\"none\"\n />\n <g\n id=\"Grupo_4724\"\n data-name=\"Grupo 4724\"\n transform=\"translate(0.917 5.5)\"\n >\n <line\n id=\"Línea_346\"\n data-name=\"Línea 346\"\n x2=\"6.893\"\n transform=\"translate(7.676 8.064)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <line\n id=\"Línea_347\"\n data-name=\"Línea 347\"\n x2=\"1.664\"\n transform=\"translate(3.091 8.064)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <g id=\"Grupo_4723\" data-name=\"Grupo 4723\" transform=\"translate(0 0)\">\n <g id=\"Grupo_4722\" data-name=\"Grupo 4722\">\n <path\n id=\"Trazado_5981\"\n data-name=\"Trazado 5981\"\n d=\"M14.741,7.922V.371a.224.224,0,0,0-.224-.224H4.419\"\n transform=\"translate(-1.304 -0.044)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <path\n id=\"Trazado_5982\"\n data-name=\"Trazado 5982\"\n d=\"M23.729,10.232h2.215a.2.2,0,0,0,.2-.2V8.418A1.282,1.282,0,0,0,24.72,7.345H20.861\"\n transform=\"translate(-6.156 -2.168)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <path\n id=\"Trazado_5983\"\n data-name=\"Trazado 5983\"\n d=\"M19.282,1.512h1.683a2.1,2.1,0,0,1,1.967,1.135L24.21,5.624H19.963\"\n transform=\"translate(-5.69 -0.446)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <path\n id=\"Trazado_5984\"\n data-name=\"Trazado 5984\"\n d=\"M23.637,11.474a1.532,1.532,0,1,0-1.532,1.532A1.532,1.532,0,0,0,23.637,11.474Z\"\n transform=\"translate(-6.071 -2.934)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <path\n id=\"Trazado_5985\"\n data-name=\"Trazado 5985\"\n d=\"M9.607,11.474a1.532,1.532,0,1,0-1.532,1.532A1.532,1.532,0,0,0,9.607,11.474Z\"\n transform=\"translate(-1.931 -2.934)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <line\n id=\"Línea_348\"\n data-name=\"Línea 348\"\n x1=\"5.115\"\n transform=\"translate(2.846 2.639)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <line\n id=\"Línea_349\"\n data-name=\"Línea 349\"\n x1=\"1.583\"\n transform=\"translate(0 2.639)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <line\n id=\"Línea_350\"\n data-name=\"Línea 350\"\n x1=\"5.615\"\n transform=\"translate(4.707 5.177)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n <line\n id=\"Línea_351\"\n data-name=\"Línea 351\"\n x1=\"1.738\"\n transform=\"translate(1.583 5.177)\"\n fill=\"none\"\n className={fill}\n strokeWidth={strokeWidth}\n />\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_fc979293
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Order.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function Order(props: React.SVGProps<SVGSVGElement>) {\n const { fill } = props\n\n return (\n <svg\n id=\"outline-receipt-24px\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <g id=\"Bounding_Boxes\">\n <path\n id=\"Trazado_2420\"\n data-name=\"Trazado 2420\"\n d=\"M0,0H24V24H0Z\"\n fill=\"none\"\n />\n </g>\n <g id=\"Outline\">\n <g id=\"Grupo_80\" data-name=\"Grupo 80\">\n <path\n id=\"Trazado_2421\"\n data-name=\"Trazado 2421\"\n d=\"M19.5,3.5,18,2,16.5,3.5,15,2,13.5,3.5,12,2,10.5,3.5,9,2,7.5,3.5,6,2,4.5,3.5,3,2V22l1.5-1.5L6,22l1.5-1.5L9,22l1.5-1.5L12,22l1.5-1.5L15,22l1.5-1.5L18,22l1.5-1.5L21,22V2ZM19,19.09H5V4.91H19Z\"\n fill={fill}\n />\n <rect\n id=\"Rectángulo_45\"\n data-name=\"Rectángulo 45\"\n width=\"12\"\n height=\"2\"\n transform=\"translate(6 15)\"\n fill={fill}\n />\n <rect\n id=\"Rectángulo_46\"\n data-name=\"Rectángulo 46\"\n width=\"12\"\n height=\"2\"\n transform=\"translate(6 11)\"\n fill={fill}\n />\n <rect\n id=\"Rectángulo_47\"\n data-name=\"Rectángulo 47\"\n width=\"12\"\n height=\"2\"\n transform=\"translate(6 7)\"\n fill={fill}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_da0ebb96
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/store.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function Store(props: React.SVGProps<SVGSVGElement>) {\n const { fill, height = 24, width = 24 } = props\n\n return (\n <svg\n id=\"Icon_tienda\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n width={width}\n height={height}\n viewBox=\"0 0 84 84\"\n >\n <rect\n id=\"Rectángulo_2110\"\n data-name=\"Rectángulo 2110\"\n width=\"84\"\n height=\"84\"\n fill=\"none\"\n />\n <g\n id=\"Grupo_4721\"\n data-name=\"Grupo 4721\"\n transform=\"translate(5.001 5.999)\"\n >\n <g\n id=\"Grupo_4720\"\n data-name=\"Grupo 4720\"\n transform=\"translate(0 0)\"\n clip-path=\"url(#clip-path-store-icon)\"\n >\n <path\n id=\"Trazado_5979\"\n data-name=\"Trazado 5979\"\n d=\"M73.1,37.9a.974.974,0,0,1-.691-.286L37.041,2.345,1.669,37.616A.977.977,0,0,1,.287,36.234L36.347.274a1.013,1.013,0,0,1,1.385,0l36.06,35.96A.977.977,0,0,1,73.1,37.9\"\n transform=\"translate(-0.001 0.002)\"\n className={fill}\n />\n <path\n id=\"Trazado_5980\"\n data-name=\"Trazado 5980\"\n d=\"M56.532,52.1h-17.4a.978.978,0,0,1-.978-.975v-24.9H22.161v24.9a.978.978,0,0,1-.978.975H3.783a.975.975,0,0,1-.978-.975V8.85a.978.978,0,0,1,1.955,0V50.143H20.2V25.249a.979.979,0,0,1,.981-.978H39.127a.98.98,0,0,1,.985.978V50.143H55.551V8.85a.978.978,0,0,1,1.955,0V51.121a.972.972,0,0,1-.974.975\"\n transform=\"translate(6.885 19.256)\"\n className={fill}\n />\n <defs>\n <clipPath id=\"clip-path-store-icon\">\n <rect\n id=\"Rectángulo_2109\"\n data-name=\"Rectángulo 2109\"\n width=\"74.082\"\n height=\"71.351\"\n />\n </clipPath>\n </defs>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_98f72dd5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LiteEdit.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n className?: string\n fill: string\n onClick?: any\n}\n\nexport const LiteEdit = (props: Props) => {\n const { className, fill, onClick } = props\n\n return (\n <svg\n id=\"Icon_edit\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 20\"\n onClick={onClick}\n className={className}\n >\n <rect\n id=\"Rectángulo_2113\"\n data-name=\"Rectángulo 2113\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n />\n <g id=\"Grupo_4716\" data-name=\"Grupo 4716\" transform=\"translate(0.474 3)\">\n <g id=\"Grupo_4726\" data-name=\"Grupo 4726\" transform=\"translate(0 0)\">\n <path\n id=\"Trazado_5972\"\n data-name=\"Trazado 5972\"\n d=\"M5.571,17.756a.312.312,0,0,1-.31-.292l-.223-3.594a.311.311,0,0,1,.049-.189L13.863.143a.31.31,0,0,1,.43-.092l3.588,2.325a.3.3,0,0,1,.134.2.307.307,0,0,1-.043.234L9.2,16.344a.306.306,0,0,1-.151.122l-3.363,1.27a.323.323,0,0,1-.111.02m.093-3.822.191,3.072,2.875-1.085L17.283,2.727,14.217.742Zm3.271,2.241h0Z\"\n transform=\"translate(0.489 0)\"\n className={fill}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_5a001cc3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LogoMyCheckout.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.cls1 {\n stroke-width: 2.42px;\n}\n\n.cls1,\n.cls2,\n.cls3 {\n stroke-miterlimit: 10;\n}\n\n.cls1,\n.cls3 {\n fill: #2d2d2c;\n stroke: #2d2d2c;\n}\n\n.cls2 {\n fill: none;\n stroke: #0097c8;\n stroke-width: 3.3px;\n}\n\n.cls3 {\n stroke-width: 1.09px;\n}\n\n```" } ]
code_mycheckout-sdk_0a0fc67e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LiteCheck.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n stroke: string\n}\n\nexport const LiteCheck = (props: Props) => {\n const { fill, stroke } = props\n\n return (\n <svg\n id=\"Icon_check\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"46\"\n height=\"46\"\n viewBox=\"0 0 46 46\"\n >\n <g\n id=\"Elipse_194\"\n data-name=\"Elipse 194\"\n fill=\"none\"\n stroke=\"#009e4f\"\n strokeWidth=\"1\"\n >\n <circle cx=\"23\" cy=\"23\" r=\"23\" stroke=\"none\" />\n <circle cx=\"23\" cy=\"23\" r=\"22.5\" fill=\"none\" />\n </g>\n <path\n id=\"Trazado_5965\"\n data-name=\"Trazado 5965\"\n d=\"M10.1,24.9a.6.6,0,0,1-.408-.16L4.8,20.15a.6.6,0,1,1,.815-.869l4.479,4.191L27.525,6.149a.6.6,0,1,1,.84.846L10.524,24.724a.594.594,0,0,1-.421.173\"\n transform=\"translate(6.892 7.525)\"\n className={`${fill} ${stroke}`}\n strokeWidth=\"1\"\n />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_bb920e4f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Check.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n className?: string\n classNameCircule?: string\n fill: string\n height?: number\n width?: number\n}\n\nexport function Check({\n className,\n classNameCircule,\n fill,\n height,\n width,\n}: Props) {\n return (\n <svg\n id=\"Icon_check\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 46 46\"\n className={className}\n >\n <g\n id=\"Elipse_194\"\n data-name=\"Elipse 194\"\n fill=\"none\"\n stroke=\"#009e4f\"\n strokeWidth=\"1\"\n className={classNameCircule}\n >\n <circle cx=\"23\" cy=\"23\" r=\"23\" stroke=\"none\" />\n <circle cx=\"23\" cy=\"23\" r=\"22.5\" fill=\"none\" />\n </g>\n <path\n id=\"Trazado_5965\"\n data-name=\"Trazado 5965\"\n d=\"M10.1,24.9a.6.6,0,0,1-.408-.16L4.8,20.15a.6.6,0,1,1,.815-.869l4.479,4.191L27.525,6.149a.6.6,0,1,1,.84.846L10.524,24.724a.594.594,0,0,1-.421.173\"\n transform=\"translate(6.892 7.525)\"\n className={fill}\n strokeWidth=\"1\"\n />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_a7cf2938
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/BellIcon.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nexport const BellIcon = (props: React.SVGProps<SVGSVGElement>) => {\n const { width = 16, height = 16 } = props\n\n return (\n <svg width={width} height={height} viewBox=\"0 0 24 24\">\n <g>\n <g data-name=\"Grupo 4850\" id=\"Grupo_4850\">\n <g data-name=\"Grupo 4808\" id=\"Grupo_4808\">\n <path\n d=\"m11.84,21.32q-0.66,0 -1.3,-0.05l-5.73,-0.53l-3.37,0a1.25,1.29 0 0 1 -0.89,-0.41a1.23,1.26 0 0 1 -0.34,-0.92a1.25,1.29 0 0 1 1.28,-1.21l0.64,0a2.39,2.45 0 0 0 2.39,-2.45l0,-6.56a7.31,7.51 0 1 1 14.64,0l0,6.56a2.39,2.45 0 0 0 2.39,2.45l0.98,0a1.25,1.29 0 0 1 1.25,1.04a1.23,1.26 0 0 1 -1.21,1.51l-3.76,0l-5.71,0.53c-0.42,0.05 -0.86,0.05 -1.3,0.05m-10.36,-2.45a0.61,0.63 0 0 0 -0.64,0.58a0.59,0.61 0 0 0 0.59,0.63l3.42,0l5.76,0.53a13.75,14.14 0 0 0 2.48,0l5.71,-0.53l3.79,0a0.59,0.61 0 0 0 0.59,-0.73a0.61,0.63 0 0 0 -0.61,-0.49l-1.01,0a3.03,3.11 0 0 1 -3.03,-3.11l0,-6.56a6.67,6.85 0 0 0 -13.36,0l0,6.56a3.03,3.11 0 0 1 -3.03,3.11l-0.64,0l-0.02,0z\"\n data-name=\"Trazado 6033\"\n fill=\"#fb8500\"\n id=\"Trazado_6033\"\n />\n <path\n d=\"m11.81,23.73a2.58,2.67 0 0 1 -2.58,-2.65a0.32,0.34 0 0 1 0.64,0a1.94,2.02 0 1 0 3.89,0a0.32,0.34 0 0 1 0.64,0a2.58,2.67 0 0 1 -2.58,2.65\"\n data-name=\"Trazado 6034\"\n fill=\"#fb8500\"\n id=\"Trazado_6034\"\n />\n <path\n d=\"m11.81,4.89a0.32,0.34 0 0 1 -0.3,-0.32l0,-4.06a0.32,0.34 0 0 1 0.61,0l0,4.06a0.32,0.34 0 0 1 -0.32,0.32\"\n data-name=\"Trazado 6035\"\n fill=\"#fb8500\"\n id=\"Trazado_6035\"\n />\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_49be1197
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Email.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\ninterface Props {\n fill: string\n width?: string\n height?: string\n className?: string\n}\n\nexport default function Email(props: Props) {\n const { className, fill, width = '24', height = '24' } = props\n\n return (\n <svg\n width={width}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n viewBox=\"0 0 30 24\"\n >\n <g\n data-name=\"Grupo 4868\"\n id=\"svg_9\"\n transform=\"matrix(0.379712 0 0 0.3926 -1.02267 -4.55776)\"\n >\n <g data-name=\"Grupo 4866\" id=\"svg_10\">\n <path\n d=\"m70.67,70.29l8.52,0a1.04,1.04 0 0 0 1.04,-1.04l0,-54.21a1.04,1.04 0 0 0 -0.03,-0.15a0.96,0.96 0 0 0 -0.05,-0.23a0.89,0.89 0 0 0 -0.12,-0.2c-0.03,-0.04 -0.05,-0.09 -0.08,-0.13l-0.02,-0.01a1.06,1.06 0 0 0 -0.19,-0.14a1.47,1.47 0 0 0 -0.14,-0.09a0.99,0.99 0 0 0 -0.15,-0.04a1.13,1.13 0 0 0 -0.24,-0.05l-0.02,0l-74.15,0l-0.01,0a1.31,1.31 0 0 0 -0.25,0.05c-0.05,0.02 -0.11,0.02 -0.16,0.04a1.06,1.06 0 0 0 -0.13,0.09a1.11,1.11 0 0 0 -0.2,0.14l-0.01,0.01a0.66,0.66 0 0 0 -0.08,0.14a0.68,0.68 0 0 0 -0.12,0.2a0.81,0.81 0 0 0 -0.05,0.22a1.04,1.04 0 0 0 -0.03,0.15l0,54.2a1.04,1.04 0 0 0 1.04,1.05m71.49,-54.21l-34.42,31.8l-34.42,-31.8l68.84,0zm-35.41,52.13l-35.04,0l0,-50.8l35.33,32.64a1.03,1.03 0 0 0 0.7,0.28a1.05,1.05 0 0 0 0.7,-0.28l35.34,-32.64l0,50.8l-7.47,0\"\n data-name=\"Trazado 6070\"\n fill={fill}\n id=\"svg_12\"\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_61d428f5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LogoMyCheckoutSolo.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nimport style from './LogoMyCheckoutSolo.css'\n\nconst LogoMyCheckoutSolo = () => {\n return (\n <svg id=\"Capa_2\" viewBox=\"0 0 121.77 106.03\">\n <g id=\"Capa_1-2\">\n <g>\n <path\n className={style.cls1}\n d=\"M59.65,42.94c7.01,10.13,15.66,18.18,24.33,22.66,.05,.03,.1,.05,.16,.08L119.69,6.25c1.26-2.1-.36-4.75-2.8-4.59L46.76,6.18c-.46,10.14,4.06,24,12.89,36.76Z\"\n />\n <path\n className={style.cls1}\n d=\"M78.52,70.12c-8.77-5.13-17.31-13.35-24.29-23.43-9.62-13.9-14.42-28.51-14.07-40.08L4.5,8.91c-2.79,.18-3.88,3.7-1.68,5.43l39.53,30.94c2.33,1.82,3.91,4.42,4.47,7.32l9.46,49.3c.53,2.74,4.16,3.38,5.59,.99l18.87-31.55c-.74-.39-1.49-.79-2.23-1.23Z\"\n />\n </g>\n </g>\n </svg>\n )\n}\n\nexport default LogoMyCheckoutSolo\n\n```" } ]
code_mycheckout-sdk_de43da50
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Add.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function Add(props: React.SVGProps<SVGSVGElement>) {\n const { fill } = props\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z\" className={fill} />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_2e6c153b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/info.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function Info() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n width={30}\n height={30}\n >\n <image\n data-name=\"2560px-VTEX_Logo.svg\"\n width={30}\n height={30}\n xlinkHref=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAA+RJREFUaEPtWFFy0zAQlVzS8kc5AekJmp6g6QlIT0B6gpoPSmlgCEMDpfmIcwLaExBOQHoC0hOQnoDktzAWT5acWG4crRwD0xlrJpMZW1rte293tTJn93zwe+4/KwH8bwVLBUoFVmSgDKEVCVx5eWEK+H57k2882BWMN1jIq4yLesK7MRN8jKI94oINet2Tq5U91wZWBiAdZxuVHhOs6eDUBEDavW6r77Bm4dSVAPhHnTasHuK3mdORMfPCg+DszTDn+nwncTbr4hqOXDBPjJJORfMfrtWY8BpQqoE5T5IOQw0/rxrOCkTOrFe+wYFawokrMNmmMum/6DRB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"You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Pickup.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\ninterface Props {\n fill: string\n}\n\nexport const Pickup = (props: Props) => {\n const { fill } = props\n\n return (\n <svg\n id=\"Icon_tienda\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"24\"\n viewBox=\"0 -2 16 16\"\n >\n <rect\n id=\"Rectángulo_2110\"\n data-name=\"Rectángulo 2110\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n />\n <g id=\"Grupo_4721\" data-name=\"Grupo 4721\" transform=\"translate(1 2)\">\n <g id=\"Grupo_4720\" data-name=\"Grupo 4720\" transform=\"translate(0 0)\">\n <path\n id=\"Trazado_5979\"\n data-name=\"Trazado 5979\"\n d=\"M13.266,6.752A.179.179,0,0,1,13.14,6.7L6.722.418.3,6.7a.179.179,0,0,1-.251,0,.171.171,0,0,1,0-.246L6.6.049a.186.186,0,0,1,.251,0l6.544,6.406a.171.171,0,0,1,0,.246.179.179,0,0,1-.125.051\"\n transform=\"translate(0 0)\"\n className={fill}\n />\n <path\n id=\"Trazado_5980\"\n data-name=\"Trazado 5980\"\n d=\"M12.555,15.753H9.4a.176.176,0,0,1-.177-.174V11.144h-2.9v4.435a.176.176,0,0,1-.177.174H2.982a.175.175,0,0,1-.177-.174V8.049a.177.177,0,0,1,.355,0V15.4h2.8V10.97A.176.176,0,0,1,6.14,10.8H9.4a.176.176,0,0,1,.179.174V15.4h2.8V8.049a.177.177,0,0,1,.355,0v7.53a.175.175,0,0,1-.177.174\"\n transform=\"translate(-1.046 -3.042)\"\n className={fill}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_35e4349e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/ErrorLoading.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nexport const ErrorLoading = () => {\n return (\n <svg\n id=\"error\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n width=\"115\"\n height=\"95\"\n viewBox=\"0 0 115 95\"\n >\n <defs>\n <pattern\n id=\"pattern\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 588 487\"\n >\n <image\n width=\"588\"\n height=\"487\"\n xlinkHref=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkwAAAHnCAYAAABKVwJzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAQBpJREFUeNrs3Qt8FPW99/H/ZkO4hGCotipJZQFbqgJGD1huSqJQq7Zc9JTHo6ihPa1SeoG24nOO5VGPta9H2lNQi3jaYwlt5fFwqoAteEHLIhdRqeKFi6cCCyRYq0gMILdk95nfMBt2Z2d3Z2Zns5d83q/XGDLZzO7+s8l+/f9/8xulAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwUOn8DX5t68VIAECB/f1mCIAOC0tnaB/O1Lbj2tbCiABA4fAxBEDWg5LMKPXRtrKY3dtbp488zugAQIH8LWcIgKwFpZ7q5IxSucWXZR+BCQAITABBKcXNTtO2A4wWABCYAIJScuWMGAAUDmqYgI4NSrF2tk4feYgRBIAC+FvPEACug1JvIyiVuTyEFIMTmACAwAQUXUjyax/OMDZ/hodjWQ4ACgRLcoC9oCTLbr2NzUu0FwCAQngfYAiApCHJbwQkmU0qy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AAEBgAgAAIDABAACAwAQAAEBgAgAAIDABAAAQmAAAAAhMAAAA+a2UIYBNfQcEArU5eZGufLg/ww8UlvCHTQMZBRCY0BnVG1uHa92yjtEHAOQUS3IAAAAEJgAAAAITAAAAgQkAUFwiXbruYxRAYEIhCjIEADqKr/dZrzIKIDCh4OwIhSQwNTASALIelnr2fmrX9bOfYiRQSGgrgNjQNHVAILBG++cteZXqu/boyU8HKBKVZ/551833PcZAoOCCPkOAvE/18zcMYRQAOHC4dfrIHQwDPP2fd4YAAACAwAQAAEBgAgAAIDABAAAQmAAAAAhMAAAABCYAAAACEwAAAIEJAAAABCYAAAACEwAAAIEJAACgw5UyBCgAhxkCAA4cYQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABc+P8CDAD3LuAYV2vW5wAAAABJRU5ErkJggg==\"\n />\n </pattern>\n </defs>\n <rect\n id=\"error-2\"\n data-name=\"error\"\n width=\"115\"\n height=\"95\"\n fill=\"url(#pattern)\"\n />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_e8c3a453
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LogoKp.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ntype PropsLogo = {\n isMobile?: boolean\n} & React.SVGProps<SVGSVGElement>\n\nexport function LogoKp(props: PropsLogo) {\n const divProps = { ...props }\n\n delete divProps.isMobile\n\n const width = props.isMobile || props.isMobile === undefined ? 120 : 200\n const height = props.isMobile || props.isMobile === undefined ? 50 : 60\n\n return (\n <svg\n version=\"1.1\"\n id=\"Capa_1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n width={width}\n height={height}\n viewBox=\"0 -5 207.75 78.55\"\n // style=\"enable-background:new 0 0 207.75 78.55;\"\n // xmlXpace=\"preserve\"\n {...divProps}\n >\n <style type=\"text/css\">\n {`.st0{fill:#EB5C2D;stroke:#EB5C2D;stroke-width:1.3567;stroke-miterlimit:10;}\n\t.st1{fill:#2A4959;stroke:#2A4959;stroke-width:1.3567;stroke-miterlimit:10;}\n\t.st2{fill:#EB5C2D;}`}\n </style>\n <g>\n <path\n className=\"st0\"\n d=\"M48.44,51.84L32.32,35.68l-0.28,0.28v15.88h-1.92V18.39h1.92v14.85l14.94-14.85h2.72L33.68,34.37l17.43,17.47\n\t\tH48.44z\"\n />\n <path\n className=\"st0\"\n d=\"M67.31,50.15c-1.28,1.37-3.08,2.06-5.39,2.06c-2.28,0-4.04-0.67-5.29-2.01c-1.25-1.34-1.87-3.22-1.87-5.62\n\t\tV32.49h1.92v12.09c0,1.84,0.41,3.26,1.22,4.26c0.84,1,2.19,1.5,4.03,1.5c3.59,0,5.39-1.92,5.39-5.76V32.49h1.87v12.09\n\t\tC69.18,46.95,68.56,48.81,67.31,50.15z\"\n />\n <path\n className=\"st0\"\n d=\"M76.23,29.03c-0.34,0-0.7-0.14-1.08-0.42c-0.28-0.28-0.44-0.66-0.47-1.12c0-0.84,0.52-1.36,1.55-1.55\n\t\tc0.78,0,1.3,0.52,1.55,1.55C77.77,28.51,77.26,29.03,76.23,29.03z M75.24,51.84V32.49h1.92v19.35H75.24z\"\n />\n <path\n className=\"st0\"\n d=\"M97.1,51.84L86.98,41.77l-1.08,1.08v8.99h-1.92V17.17h1.92v22.91l8.39-8.34H97l-8.76,8.71l11.38,11.38H97.1z\"\n />\n <path\n className=\"st1\"\n d=\"M146.09,51.84v-3.33c-2.03,2.44-4.61,3.65-7.73,3.65c-2.81,0-5.17-0.95-7.07-2.86\n\t\tc-1.94-1.94-2.9-4.31-2.9-7.12c0-2.81,0.95-5.17,2.86-7.07c1.94-1.94,4.31-2.9,7.12-2.9c3.09,0,5.67,1.22,7.73,3.65v-3.37h1.92\n\t\tv19.35H146.09z M144.08,36.48c-1.59-1.59-3.5-2.39-5.72-2.39c-2.25,0-4.15,0.78-5.72,2.34c-1.59,1.59-2.39,3.51-2.39,5.76\n\t\tc0,2.22,0.8,4.12,2.39,5.72c1.59,1.59,3.5,2.39,5.72,2.39c2.25,0,4.15-0.78,5.72-2.34c1.59-1.59,2.39-3.51,2.39-5.76\n\t\tC146.47,39.97,145.67,38.07,144.08,36.48z\"\n />\n <path\n className=\"st1\"\n d=\"M164.5,41.58l-2.89,6.19l-7.21-15.27h-2.06l8.15,17.57l-5.01,10.87h2.15l8.93-19.22\n\t\tC165.88,41.69,165.19,41.65,164.5,41.58z\"\n />\n </g>\n <g>\n <g>\n <path\n className=\"st2\"\n d=\"M174.85,32.71c-2.81,0-5.63,0-8.44,0c-0.4,0-0.8,0-1.19,0c-0.81,0-0.81,1.26,0,1.26c2.81,0,5.63,0,8.44,0\n\t\t\tc0.4,0,0.8,0,1.19,0C175.66,33.98,175.66,32.71,174.85,32.71L174.85,32.71z\"\n />\n </g>\n </g>\n <g>\n <g>\n <path\n className=\"st2\"\n d=\"M179.49,35.73c-4.17,0-8.34,0-12.51,0c-0.59,0-1.18,0-1.77,0c-0.81,0-0.81,1.26,0,1.26c4.17,0,8.34,0,12.51,0\n\t\t\tc0.59,0,1.18,0,1.77,0C180.3,36.99,180.3,35.73,179.49,35.73L179.49,35.73z\"\n />\n </g>\n </g>\n <g>\n <g>\n <path\n className=\"st2\"\n d=\"M174.85,38.74c-2.81,0-5.63,0-8.44,0c-0.4,0-0.8,0-1.19,0c-0.81,0-0.81,1.26,0,1.26c2.81,0,5.63,0,8.44,0\n\t\t\tc0.4,0,0.8,0,1.19,0C175.66,40,175.66,38.74,174.85,38.74L174.85,38.74z\"\n />\n </g>\n </g>\n <path\n className=\"st1\"\n d=\"M121.37,47.7c-2.04,2.04-4.53,3.05-7.49,3.05c-3.38,0-6.17-1.38-8.37-4.14v13.35h-2.02v-29.9h2.02v3.84\n\tc2.1-2.76,4.89-4.14,8.37-4.14c2.96,0,5.43,1,7.44,3c2.04,2.04,3.05,4.53,3.05,7.49S123.38,45.7,121.37,47.7z M119.9,34.25\n\tc-1.67-1.67-3.68-2.51-6.01-2.51c-2.36,0-4.37,0.82-6.01,2.46c-1.68,1.67-2.51,3.69-2.51,6.06c0,2.33,0.84,4.33,2.51,6.01\n\tc1.67,1.67,3.68,2.51,6.01,2.51c2.36,0,4.37-0.82,6.01-2.46c1.67-1.67,2.51-3.69,2.51-6.06C122.41,37.93,121.57,35.93,119.9,34.25z\"\n />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_f8efb730
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/BagQuotaInformative.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function BagQuotaInformative() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"58\"\n height=\"58\"\n viewBox=\"0 0 58 58\"\n >\n <g\n id=\"Grupo_4740\"\n data-name=\"Grupo 4740\"\n transform=\"translate(-503 -312)\"\n >\n <g\n id=\"Grupo_4725\"\n data-name=\"Grupo 4725\"\n transform=\"translate(502.93 311.671)\"\n >\n <g\n id=\"Elipse_189\"\n data-name=\"Elipse 189\"\n transform=\"translate(0.07 0.329)\"\n fill=\"#fff\"\n stroke=\"#a1c10c\"\n strokeWidth=\"2\"\n >\n <circle cx=\"29\" cy=\"29\" r=\"29\" stroke=\"none\" />\n <circle cx=\"29\" cy=\"29\" r=\"28\" fill=\"none\" />\n </g>\n </g>\n <g\n id=\"Grupo_4721\"\n data-name=\"Grupo 4721\"\n transform=\"translate(506.93 315.687)\"\n >\n <circle\n id=\"Elipse_189-2\"\n data-name=\"Elipse 189\"\n cx=\"25\"\n cy=\"25\"\n r=\"25\"\n transform=\"translate(0.07 0.313)\"\n fill=\"#a1c10c\"\n />\n </g>\n <g id=\"outline-local_mall-24px\" transform=\"translate(513.333 322.333)\">\n <g id=\"Bounding_Boxes\">\n <path\n id=\"Trazado_3265\"\n data-name=\"Trazado 3265\"\n d=\"M0,0H37.333V37.333H0Z\"\n fill=\"none\"\n />\n </g>\n <g id=\"Outline\" transform=\"translate(4.667 1.556)\">\n <g id=\"Grupo_321\" data-name=\"Grupo 321\">\n <path\n id=\"Trazado_3266\"\n data-name=\"Trazado 3266\"\n d=\"M27.889,8.778H24.778a7.778,7.778,0,1,0-15.556,0H6.111A3.12,3.12,0,0,0,3,11.889V30.556a3.12,3.12,0,0,0,3.111,3.111H27.889A3.12,3.12,0,0,0,31,30.556V11.889A3.12,3.12,0,0,0,27.889,8.778ZM17,4.111a4.66,4.66,0,0,1,4.667,4.667H12.333A4.66,4.66,0,0,1,17,4.111ZM27.889,30.556H6.111V11.889H27.889Z\"\n transform=\"translate(-3 -1)\"\n fill=\"#284859\"\n />\n <path\n id=\"Trazado_3267\"\n data-name=\"Trazado 3267\"\n d=\"M14.778,13.667A4.66,4.66,0,0,1,10.111,9H7A7.778,7.778,0,1,0,22.556,9H19.444A4.66,4.66,0,0,1,14.778,13.667Z\"\n transform=\"translate(-0.778 3.444)\"\n fill=\"#284859\"\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_e37076cc
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/MyProfile.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n width?: number\n height?: number\n className?: string\n}\n\nexport const MyProfile = (props: Props) => {\n const { className, fill, width = 24, height = 24 } = props\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n className={className}\n >\n <g id=\"Grupo_4684\" data-name=\"Grupo 4684\" transform=\"translate(-61 -571)\">\n <rect\n id=\"Rectángulo_2093\"\n data-name=\"Rectángulo 2093\"\n width=\"24\"\n height=\"24\"\n transform=\"translate(61 571)\"\n fill=\"none\"\n />\n <g id=\"Grupo_4683\" data-name=\"Grupo 4683\" transform=\"translate(-23 1)\">\n <g\n id=\"Grupo_4679\"\n data-name=\"Grupo 4679\"\n transform=\"translate(90 572)\"\n >\n <g id=\"Grupo_4678\" data-name=\"Grupo 4678\">\n <path\n id=\"Trazado_5959\"\n data-name=\"Trazado 5959\"\n d=\"M6.441,8.967a4.484,4.484,0,1,1,4.483-4.484A4.488,4.488,0,0,1,6.441,8.967m0-8.46a3.977,3.977,0,1,0,3.977,3.976A3.981,3.981,0,0,0,6.441.507\"\n className={fill}\n />\n <path\n id=\"Trazado_5960\"\n data-name=\"Trazado 5960\"\n d=\"M12.6,20.444H.284A.284.284,0,0,1,0,20.16V15.906a6.44,6.44,0,0,1,12.881,0V20.16a.283.283,0,0,1-.283.284M.567,19.877H12.315V15.906a5.874,5.874,0,1,0-11.748,0Z\"\n className={fill}\n />\n </g>\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_a5467d22
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/ProfileEdit.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n}\n\nexport const ProfileEdit = (props: Props) => {\n const { fill } = props\n\n return (\n <svg\n data-name=\"Icono_datos+editar\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={31.978}\n height={28.955}\n {...props}\n >\n <path\n data-name=\"Trazado 381\"\n d=\"M14.478 7.453a2.418 2.418 0 1 1-2.418 2.418 2.418 2.418 0 0 1 2.418-2.418m0 10.365c3.42 0 7.025 1.681 7.025 2.418v1.267H7.453v-1.267c0-.737 3.6-2.418 7.025-2.418m0-12.553a4.606 4.606 0 1 0 4.606 4.606 4.605 4.605 0 0 0-4.606-4.606Zm0 10.365c-3.075 0-9.213 1.543-9.213 4.606v3.455h18.426v-3.455c0-3.063-6.138-4.606-9.213-4.606Z\"\n className={fill}\n />\n <path data-name=\"Trazado 382\" d=\"M0 0h28.955v28.955H0Z\" fill=\"none\" />\n <path data-name=\"Trazado 2781\" d=\"M11 5.478h15v15H11Z\" fill=\"none\" />\n <path\n data-name=\"Trazado 5937\"\n d=\"M17.412 24.105v-3.693l10.5-10.368 3.425 3.284-10.33 10.775Z\"\n fill=\"#fff\"\n />\n <g data-name=\"Grupo 197\" className={fill}>\n <path\n data-name=\"Trazado 2782\"\n d=\"M17.897 20.685v2.933h2.933l8.65-8.65-2.933-2.933Zm2.284 1.369h-.72v-.72l7.086-7.089.72.72Z\"\n />\n <path\n data-name=\"Trazado 2783\"\n d=\"m31.748 11.597-1.83-1.83a.784.784 0 0 0-1.1 0l-1.434 1.431 2.933 2.933 1.431-1.431a.779.779 0 0 0 0-1.103Z\"\n />\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_64be2a52
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LogoMyCheckoutSolo.css from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.cls1{\n fill:none;\n stroke:#0097c8;\n stroke-miterlimit:10;\n stroke-width:3.3px;\n}\n\n```" } ]
code_mycheckout-sdk_cc0bc7e9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/MyData.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n height?: number\n width?: number\n}\n\nexport const MyData = (props: Props) => {\n const { fill, height = 18, width = 18 } = props\n\n return (\n <svg\n id=\"Icon_misdatos\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 18 18\"\n >\n <rect\n id=\"Rectángulo_2145\"\n data-name=\"Rectángulo 2145\"\n width={width}\n height={height}\n fill=\"none\"\n />\n <g\n id=\"Grupo_4799\"\n data-name=\"Grupo 4799\"\n transform=\"translate(2.536 2.375)\"\n >\n <g id=\"Grupo_4798\" data-name=\"Grupo 4798\" transform=\"translate(0 0)\">\n <path\n id=\"Trazado_6022\"\n data-name=\"Trazado 6022\"\n d=\"M13.117,14.329H.181a.19.19,0,0,1-.181-.2V.2A.19.19,0,0,1,.181,0H13.117A.19.19,0,0,1,13.3.2V14.131a.189.189,0,0,1-.181.2m-12.754-.4H12.936V.4H.363Z\"\n transform=\"translate(0 0)\"\n className={fill}\n />\n <path\n id=\"Trazado_6023\"\n data-name=\"Trazado 6023\"\n d=\"M7.54,6.94H2.653a.181.181,0,0,1,0-.363H7.54a.181.181,0,0,1,0,.363\"\n transform=\"translate(-0.891 -2.371)\"\n className={fill}\n />\n <path\n id=\"Trazado_6024\"\n data-name=\"Trazado 6024\"\n d=\"M12.256,9.49h-9.6a.181.181,0,0,1,0-.363h9.6a.181.181,0,0,1,0,.363\"\n transform=\"translate(-0.891 -3.291)\"\n className={fill}\n />\n <path\n id=\"Trazado_6025\"\n data-name=\"Trazado 6025\"\n d=\"M7.54,12.041H2.653a.181.181,0,0,1,0-.363H7.54a.181.181,0,0,1,0,.363\"\n transform=\"translate(-0.891 -4.211)\"\n className={fill}\n />\n <path\n id=\"Trazado_6026\"\n data-name=\"Trazado 6026\"\n d=\"M7.54,17.142H2.653a.181.181,0,0,1,0-.363H7.54a.181.181,0,0,1,0,.363\"\n transform=\"translate(-0.891 -6.05)\"\n className={fill}\n />\n <path\n id=\"Trazado_6027\"\n data-name=\"Trazado 6027\"\n d=\"M12.256,14.591h-9.6a.181.181,0,0,1,0-.363h9.6a.181.181,0,0,1,0,.363\"\n transform=\"translate(-0.891 -5.13)\"\n className={fill}\n />\n <path\n id=\"Trazado_6028\"\n data-name=\"Trazado 6028\"\n d=\"M15.013,4.367a.829.829,0,1,1,.829-.829.829.829,0,0,1-.829.829m0-1.565a.736.736,0,1,0,.735.736.737.737,0,0,0-.735-.736\"\n transform=\"translate(-5.115 -0.976)\"\n className={fill}\n />\n <path\n id=\"Trazado_6029\"\n data-name=\"Trazado 6029\"\n d=\"M15.929,6.971H13.893a.047.047,0,0,1-.047-.047v-.7a1.065,1.065,0,0,1,2.13,0v.7a.047.047,0,0,1-.047.047M13.94,6.877h1.942V6.221a.971.971,0,0,0-1.942,0Z\"\n transform=\"translate(-4.993 -1.859)\"\n className={fill}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_b8101225
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/MinimizeButton.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function MinimizeButton() {\n return (\n <svg\n id=\"baseline-remove-24px\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <path\n id=\"Trazado_972\"\n data-name=\"Trazado 972\"\n d=\"M19,13H5V11H19Z\"\n transform=\"translate(-7 5)\"\n fill=\"#707685\"\n />\n <path\n id=\"Trazado_973\"\n data-name=\"Trazado 973\"\n d=\"M0,0H24V24H0Z\"\n fill=\"none\"\n />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_303ff0c0
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Verified.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport const Verified = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={24} height={24} {...props}>\n <path data-name=\"Trazado 2525\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <g data-name=\"Grupo 121\" fill=\"#284859\">\n <path\n data-name=\"Trazado 2526\"\n d=\"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm7 10a10.473 10.473 0 01-7 9.93A10.473 10.473 0 015 11V6.3l7-3.11 7 3.11z\"\n />\n <path\n data-name=\"Trazado 2527\"\n d=\"M7.41 11.59L6 13l4 4 8-8-1.41-1.42L10 14.17z\"\n />\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_ffe93880
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/MyOrder.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n height?: number\n width?: number\n}\n\nexport const MyOrder = ({ fill, height = 18, width = 18 }: Props) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n >\n <g id=\"Grupo_4685\" data-name=\"Grupo 4685\" transform=\"translate(-361 376)\">\n <rect\n id=\"Rectángulo_2094\"\n data-name=\"Rectángulo 2094\"\n width={width}\n height={height}\n transform=\"translate(361 -376)\"\n fill=\"none\"\n />\n <g\n id=\"Grupo_4676\"\n data-name=\"Grupo 4676\"\n transform=\"translate(366 -374.89)\"\n >\n <g id=\"Grupo_4675\" data-name=\"Grupo 4675\">\n <path\n id=\"Trazado_5954\"\n data-name=\"Trazado 5954\"\n d=\"M13.131,20.78H.284A.284.284,0,0,1,0,20.5V2.454A.284.284,0,0,1,.284,2.17H8.03a.284.284,0,0,1,0,.567H.567V20.213H12.848V2.737H10.486a.284.284,0,1,1,0-.567h2.645a.283.283,0,0,1,.283.284V20.5a.283.283,0,0,1-.283.283\"\n className={fill}\n />\n <path\n id=\"Trazado_5955\"\n data-name=\"Trazado 5955\"\n d=\"M10.486,5.193H8.03a.284.284,0,0,1-.284-.283V.284A.284.284,0,0,1,8.03,0h2.456a.284.284,0,0,1,.283.284V4.91a.283.283,0,0,1-.283.283M8.313,4.626H10.2V.567H8.313Z\"\n className={fill}\n />\n <path\n id=\"Trazado_5956\"\n data-name=\"Trazado 5956\"\n d=\"M10.486,8.2H2.878a.284.284,0,1,1,0-.567h7.608a.284.284,0,0,1,0,.567\"\n className={fill}\n />\n <path\n id=\"Trazado_5957\"\n data-name=\"Trazado 5957\"\n d=\"M10.486,13.089H2.878a.284.284,0,1,1,0-.567h7.608a.284.284,0,0,1,0,.567\"\n className={fill}\n />\n <path\n id=\"Trazado_5958\"\n data-name=\"Trazado 5958\"\n d=\"M10.486,18.261H2.878a.284.284,0,1,1,0-.567h7.608a.284.284,0,0,1,0,.567\"\n className={fill}\n />\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_f0a5c986
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/ArrowDown.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\ninterface Props {\n fill?: string\n width?: number\n height?: number\n}\n\nexport function ArrowDown({ fill, height = 24, width = 24 }: Props) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height={height}\n viewBox=\"0 0 24 24\"\n width={width}\n >\n <path\n d=\"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6z\"\n className={fill}\n />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_5dbd1380
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Alert.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n stroke?: string\n className?: string\n}\n\nexport const Alert = ({ className, fill, stroke }: Props) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"44\"\n height=\"44\"\n viewBox=\"0 0 44 44\"\n className={className}\n >\n <defs>\n <clipPath id=\"clip-path\">\n <rect\n id=\"Rectángulo_2170\"\n data-name=\"Rectángulo 2170\"\n width=\"26.124\"\n height=\"25.319\"\n className={fill}\n />\n </clipPath>\n </defs>\n <g\n id=\"Grupo_4847\"\n data-name=\"Grupo 4847\"\n transform=\"translate(-165 -464)\"\n >\n <g\n id=\"Grupo_4846\"\n data-name=\"Grupo 4846\"\n transform=\"translate(174 473)\"\n >\n <g\n id=\"Grupo_4845\"\n data-name=\"Grupo 4845\"\n transform=\"translate(0 0)\"\n clipPath=\"url(#clipPath)\"\n >\n <path\n id=\"Trazado_6054\"\n data-name=\"Trazado 6054\"\n d=\"M12.859,22.415q-.72,0-1.437-.066L5.09,21.777H1.358a1.364,1.364,0,0,1-.986-.424A1.347,1.347,0,0,1,0,20.347a1.389,1.389,0,0,1,1.414-1.286h.7a2.658,2.658,0,0,0,2.655-2.655V9.363a8.088,8.088,0,1,1,16.176,0v7.043A2.659,2.659,0,0,0,23.6,19.061h1.106A1.4,1.4,0,0,1,26.1,20.179a1.36,1.36,0,0,1-1.337,1.6H20.6l-6.3.571c-.476.043-.957.066-1.437.066M1.415,19.762a.7.7,0,0,0-.712.621.658.658,0,0,0,.655.694H5.121l6.364.575a15.22,15.22,0,0,0,2.748,0l6.332-.574h4.2a.657.657,0,0,0,.646-.778.7.7,0,0,0-.7-.537H23.6a3.359,3.359,0,0,1-3.356-3.356V9.363a7.387,7.387,0,0,0-14.775,0v7.043a3.36,3.36,0,0,1-3.356,3.356Z\"\n transform=\"translate(0 0.301)\"\n className={fill}\n />\n <path\n id=\"Trazado_6055\"\n data-name=\"Trazado 6055\"\n d=\"M10.946,21.087a2.862,2.862,0,0,1-2.858-2.858.351.351,0,0,1,.7,0,2.157,2.157,0,1,0,4.314,0,.351.351,0,0,1,.7,0,2.862,2.862,0,0,1-2.858,2.858\"\n transform=\"translate(1.914 4.231)\"\n className={fill}\n />\n <path\n id=\"Trazado_6056\"\n data-name=\"Trazado 6056\"\n d=\"M10.466,5.052a.35.35,0,0,1-.35-.35V.35a.35.35,0,1,1,.7,0V4.7a.35.35,0,0,1-.35.35\"\n transform=\"translate(2.394 -0.001)\"\n className={fill}\n />\n </g>\n </g>\n <g\n id=\"Elipse_195\"\n data-name=\"Elipse 195\"\n transform=\"translate(165 464)\"\n fill=\"none\"\n className={stroke}\n strokeWidth=\"1\"\n >\n <circle cx=\"22\" cy=\"22\" r=\"22\" stroke=\"none\" />\n <circle cx=\"22\" cy=\"22\" r=\"21.5\" fill=\"none\" />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_f2f0220e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/CreditCard.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n width?: number\n height?: number\n}\n\nexport const CreditCard = (props: Props) => {\n const { fill, width = '21.113', height = '13.826' } = props\n\n return (\n <svg width={width} height={height} viewBox=\"0 0 21.113 13.826\">\n <g>\n <title>Layer 1</title>\n <g data-name=\"Grupo 4710\" id=\"Grupo_4710\">\n <g data-name=\"Grupo 4695\" id=\"Grupo_4695\">\n <path\n className={fill}\n d=\"m18.99,1.25l-16.86,0a0.23,0.23 0 0 0 -0.23,0.23l0,10.84a0.23,0.23 0 0 0 0.23,0.24l16.86,0a0.23,0.23 0 0 0 0.23,-0.24l0,-10.84a0.23,0.23 0 0 0 -0.23,-0.23m-16.62,1.56l16.39,0l0,0.94l-16.39,0l0,-0.94zm16.39,-0.45l-16.39,0l0,-0.64l16.39,0l0,0.64zm-16.39,1.85l16.39,0l0,7.89l-16.39,0l0,-7.89z\"\n data-name=\"Trazado 5969\"\n id=\"Trazado_5969\"\n />\n <path\n className={fill}\n d=\"m10.15,10.14l-6.16,0a0.23,0.23 0 0 0 0,0.46l6.16,0a0.23,0.23 0 0 0 0,-0.46\"\n data-name=\"Trazado 5970\"\n id=\"Trazado_5970\"\n />\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_71b13d1c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/QuotaInformation.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function QuotaInformative() {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"58\"\n height=\"58\"\n viewBox=\"0 0 58 58\"\n >\n <g\n id=\"Grupo_4743\"\n data-name=\"Grupo 4743\"\n transform=\"translate(-503 -496)\"\n >\n <g id=\"Grupo_4729\" data-name=\"Grupo 4729\" transform=\"translate(0 184)\">\n <g\n id=\"Grupo_4725\"\n data-name=\"Grupo 4725\"\n transform=\"translate(502.93 311.671)\"\n >\n <g\n id=\"Elipse_189\"\n data-name=\"Elipse 189\"\n transform=\"translate(0.07 0.329)\"\n fill=\"#fff\"\n stroke=\"#a1c10c\"\n strokeWidth=\"2\"\n >\n <circle cx=\"29\" cy=\"29\" r=\"29\" stroke=\"none\" />\n <circle cx=\"29\" cy=\"29\" r=\"28\" fill=\"none\" />\n </g>\n </g>\n <g\n id=\"Grupo_4721\"\n data-name=\"Grupo 4721\"\n transform=\"translate(506.93 315.687)\"\n >\n <circle\n id=\"Elipse_189-2\"\n data-name=\"Elipse 189\"\n cx=\"25\"\n cy=\"25\"\n r=\"25\"\n transform=\"translate(0.07 0.313)\"\n fill=\"#a1c10c\"\n />\n </g>\n </g>\n <g id=\"outline-games-24px\" transform=\"translate(513.5 506.5)\">\n <g id=\"Bounding_Boxes\">\n <path\n id=\"Trazado_2615\"\n data-name=\"Trazado 2615\"\n d=\"M0,0H37V37H0Z\"\n fill=\"none\"\n />\n </g>\n <g id=\"Outline\" transform=\"translate(3.142 3.142)\">\n <path\n id=\"Trazado_2616\"\n data-name=\"Trazado 2616\"\n d=\"M18.894,5.072v4.1l-1.536,1.536L15.822,9.172v-4.1h3.072M29.645,15.822v3.072h-4.1l-1.536-1.536,1.536-1.536h4.1m-20.473,0,1.536,1.536L9.172,18.894h-4.1V15.822h4.1m8.186,8.186,1.536,1.536v4.1H15.822v-4.1l1.536-1.536M21.966,2H12.751v8.447l4.607,4.607,4.607-4.607V2ZM32.717,12.751H24.27l-4.607,4.607,4.607,4.607h8.447V12.751Zm-22.27,0H2v9.215h8.447l4.607-4.607-4.607-4.607Zm6.911,6.911L12.751,24.27v8.447h9.215V24.27l-4.607-4.607Z\"\n transform=\"translate(-2 -2)\"\n fill=\"#284859\"\n />\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_f497f320
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/LogoMycheckout.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nimport styles from './LogoMyCheckout.css'\n\ninterface Props {\n className?: string\n}\n\nexport function LogoMyCheckout(props: Props) {\n return (\n <svg {...props} viewBox=\"0 0 965.88 198.1\">\n <g id=\"Capa_1-2\">\n <g>\n <g>\n <path\n className={styles.cls1}\n d=\"M92.05,167.71h-6.27V61.05h5.18l.78,1.88,42.66,93.96,42.51-93.96,.78-1.88h5.18v3.14l.16,100.39v3.14h-6.27v-3.14l-.16-85.8-39.37,87.05-.78,1.88h-4.08l-.78-1.88-39.53-87.05v88.94Z\"\n />\n <path\n className={styles.cls1}\n d=\"M255.33,94.46l.78-2.04h6.74l-1.57,4.24-26.51,69.02c-4.18,11.08-8.26,18.98-12.23,23.68-4.29,5.02-10.14,7.53-17.57,7.53h-3.14v-6.27h3.14c4.08,0,7.53-1.05,10.35-3.14,4.08-3.14,8.42-10.77,13.02-22.9l-26.35-67.92-1.57-4.24h6.74l.78,2.04,23.84,61.33,23.53-61.33Z\"\n />\n <path\n className={styles.cls1}\n d=\"M336.11,152.97c-6.69,9.72-16.05,14.64-28.08,14.74-8.47,0-15.9-3.03-22.27-9.1-7.84-7.53-11.76-17.04-11.76-28.55,0-9.62,2.93-18.04,8.78-25.25,6.69-8.26,15.11-12.39,25.25-12.39,12.44,.11,21.85,4.71,28.23,13.8l-5.33,3.45c-4.81-7.21-12.45-10.87-22.9-10.98-6.59,0-12.45,2.3-17.57,6.9-6.8,6.27-10.2,14.43-10.2,24.47,0,7.53,2.09,14.22,6.27,20.08,5.54,7.53,12.71,11.29,21.49,11.29,9.51-.1,17.2-4.08,23.06-11.92l5.02,3.45Z\"\n />\n <path\n className={styles.cls1}\n d=\"M362.77,103.56c5.96-7.42,13.49-11.14,22.59-11.14,7,0,13.33,2.41,18.98,7.21,7.22,6.38,10.82,14.59,10.82,24.63v40.31l.16,3.29h-6.12l-.16-3.14-.16-40.47c0-5.75-1.62-10.93-4.86-15.53-4.71-6.69-10.93-10.04-18.67-10.04-5.23,0-9.99,1.73-14.27,5.18-6.17,5.12-9.25,11.92-9.25,20.39v43.45h-6.27V67.96h6.27v36.7c.21-.31,.52-.68,.94-1.1Z\"\n />\n <path\n className={styles.cls1}\n d=\"M498.3,152.66c-7.53,10.04-17.46,15.06-29.8,15.06-8.47,0-16-3.03-22.59-9.1-7.95-7.53-11.92-17.04-11.92-28.55,0-9.62,2.98-18.04,8.94-25.25,6.8-8.26,15.32-12.39,25.57-12.39,8.57,0,16.16,3.09,22.74,9.25,7.84,7.53,11.76,16.99,11.76,28.39v3.14h-62.58c.63,6.27,2.72,11.92,6.27,16.94,5.65,7.53,12.91,11.29,21.8,11.29,10.14,0,18.4-4.18,24.78-12.55l5.02,3.76Zm-1.57-25.72c0-6.27-2.2-12.13-6.59-17.57-5.86-7.11-13.07-10.67-21.65-10.67-5.86,0-11.24,1.83-16.16,5.49-7.11,5.54-11.08,13.12-11.92,22.74h56.31Z\"\n />\n <path\n className={styles.cls1}\n d=\"M577.66,152.97c-6.69,9.72-16.05,14.64-28.08,14.74-8.47,0-15.9-3.03-22.27-9.1-7.84-7.53-11.76-17.04-11.76-28.55,0-9.62,2.93-18.04,8.78-25.25,6.69-8.26,15.11-12.39,25.25-12.39,12.44,.11,21.85,4.71,28.23,13.8l-5.33,3.45c-4.81-7.21-12.45-10.87-22.9-10.98-6.59,0-12.45,2.3-17.57,6.9-6.8,6.27-10.2,14.43-10.2,24.47,0,7.53,2.09,14.22,6.27,20.08,5.54,7.53,12.71,11.29,21.49,11.29,9.51-.1,17.2-4.08,23.06-11.92l5.02,3.45Z\"\n />\n <path\n className={styles.cls1}\n d=\"M603.38,133.21v34.51h-6.27V57.92h6.27V126.93h8l36.86-33.72,.94-.78h9.25l-5.8,5.49-35.13,32.16,35.13,32.15,5.8,5.49h-9.25l-.94-.78-36.86-33.72h-8Z\"\n />\n <path\n className={styles.cls1}\n d=\"M675.22,104.5c6.9-8.05,15.37-12.08,25.41-12.08,8.57,0,16.16,3.09,22.74,9.25,7.84,7.53,11.76,16.99,11.76,28.39,0,9.72-3.03,18.25-9.1,25.57-6.9,8.05-15.37,12.08-25.41,12.08-8.58,0-16.16-3.08-22.74-9.25-7.84-7.53-11.76-16.99-11.76-28.39,0-9.73,3.03-18.25,9.1-25.57Zm3.76,45.8c5.65,7.43,12.86,11.14,21.65,11.14,6.69,0,12.65-2.35,17.88-7.06,6.9-6.27,10.35-14.38,10.35-24.31,0-7.53-2.2-14.27-6.59-20.23-5.65-7.42-12.86-11.14-21.65-11.14-6.69,0-12.65,2.35-17.88,7.06-6.9,6.27-10.35,14.38-10.35,24.31,0,7.53,2.2,14.27,6.59,20.23Z\"\n />\n <path\n className={styles.cls1}\n d=\"M750.98,92.58h6.43l-.16,3.14-.16,44.08c0,4.71,1.57,8.99,4.71,12.86,4.91,5.86,11.4,8.78,19.45,8.78,5.33,0,10.14-1.46,14.43-4.39,6.38-4.29,9.57-10.04,9.57-17.25v-44.23l.16-2.98h6.43l-.16,3.14-.16,44.08c0,6.48-2.2,12.29-6.59,17.41-6.07,7.01-13.96,10.51-23.69,10.51-7.43,0-14.01-2.25-19.76-6.75-7.11-5.65-10.67-12.71-10.67-21.17v-44.23l.16-2.98Z\"\n />\n <path\n className={styles.cls1}\n d=\"M843.05,147.17v1.41c.84,8.58,7.06,12.86,18.67,12.86h3.14v6.27h-3.14c-1.67,0-3.35-.1-5.02-.31-13.18-1.36-19.82-8.1-19.92-20.23v-48.47h-12.71v-6.27h12.71v-19.61h6.27v19.61h21.8v6.27h-21.8v48.47Z\"\n />\n </g>\n <g>\n <path\n className={styles.cls2}\n d=\"M903.75,42.94c7.01,10.13,15.66,18.18,24.33,22.66,.05,.03,.1,.05,.16,.08l35.56-59.43c1.26-2.1-.36-4.75-2.8-4.59l-70.13,4.53c-.46,10.14,4.06,24,12.89,36.76Z\"\n />\n <path\n className={styles.cls2}\n d=\"M922.62,70.12c-8.77-5.13-17.31-13.35-24.29-23.43-9.62-13.9-14.42-28.51-14.07-40.08l-35.66,2.3c-2.79,.18-3.88,3.7-1.68,5.43l39.53,30.94c2.33,1.82,3.91,4.42,4.47,7.32l9.46,49.3c.53,2.74,4.16,3.38,5.59,.99l18.87-31.55c-.74-.39-1.49-.79-2.23-1.23Z\"\n />\n </g>\n <g>\n <path\n className={styles.cls3}\n d=\"M.54,44.76v-.71H1.95v24.7c.66-1.55,1.55-3.01,2.68-4.38,3.06-3.67,6.87-5.5,11.43-5.5,3.81,0,7.2,1.37,10.16,4.09,3.57,3.39,5.36,7.67,5.36,12.84,0,4.33-1.34,8.12-4.02,11.36-3.06,3.72-6.89,5.58-11.5,5.58-1.93,0-3.81-.38-5.65-1.13-3.91-1.69-6.73-4.59-8.47-8.68v9.81H.54V44.76Zm5.01,41.35c2.78,3.48,6.28,5.22,10.52,5.22,3.43,0,6.47-1.22,9.1-3.67,3.34-3.11,5.01-7.06,5.01-11.86,0-3.86-1.15-7.27-3.46-10.23-2.78-3.53-6.33-5.29-10.66-5.29-3.39,0-6.4,1.2-9.03,3.6-3.39,3.15-5.08,7.15-5.08,12,0,3.86,1.2,7.27,3.6,10.23Z\"\n />\n <path\n className={styles.cls3}\n d=\"M61.31,59.29l.14-.42h1.55l-.42,.99-12.63,32.46-.14,.42h-.07c-1.74,4.19-3.43,7.2-5.08,9.03-1.98,2.26-4.68,3.39-8.12,3.39h-.71v-1.41h.71c2.21,0,4.05-.49,5.5-1.48,2.12-1.46,4.28-4.87,6.49-10.23l-12.63-32.18-.42-.99h1.55l.14,.42,12.14,30.84,12-30.84Z\"\n />\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_05c8f257
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Tag.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport const Tag = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 11.961 11.961\"\n {...props}\n >\n <g id=\"Grupo_4920\" data-name=\"Grupo 4920\" transform=\"translate(0 0)\">\n <g id=\"Grupo_4919\" data-name=\"Grupo 4919\" transform=\"translate(0 0)\">\n <path\n id=\"Trazado_6088\"\n data-name=\"Trazado 6088\"\n d=\"M5.981,1.135a.183.183,0,0,0-.1-.051L.218,0A.183.183,0,0,0,0,.221L1.215,5.975a.185.185,0,0,0,.049.092l5.8,5.84a.182.182,0,0,0,.13.054.186.186,0,0,0,.13-.054l4.586-4.586a.183.183,0,0,0,0-.259ZM7.192,11.518,1.563,5.847.42.415,5.761,1.435l5.757,5.757Z\"\n transform=\"translate(0 0)\"\n fill=\"#272525\"\n />\n <path\n id=\"Trazado_6089\"\n data-name=\"Trazado 6089\"\n d=\"M4.019,3.685a1.5,1.5,0,1,0,2.12,0,1.5,1.5,0,0,0-2.12,0m1.86,1.86a1.131,1.131,0,1,1,0-1.6,1.134,1.134,0,0,1,0,1.6\"\n transform=\"translate(-1.262 -1.144)\"\n fill=\"#272525\"\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_5827ea13
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/CreditApproved.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport const CreditApproved = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={56} height={51} {...props}>\n <g\n id=\"Grupo_4705\"\n data-name=\"Grupo 4705\"\n transform=\"translate(-158.267 -678)\"\n >\n <g id=\"outline-assignment_ind-24px\" transform=\"translate(158.267 678)\">\n <g id=\"Bounding_Boxes\">\n <path\n id=\"Trazado_2276\"\n data-name=\"Trazado 2276\"\n d=\"M0,0H51.933V51.933H0Z\"\n fill=\"none\"\n />\n </g>\n <g id=\"Outline\" transform=\"translate(1.133 -3.819)\">\n <g\n id=\"Grupo_34\"\n data-name=\"Grupo 34\"\n transform=\"translate(6.492 10.819)\"\n >\n <path\n id=\"Trazado_2278\"\n data-name=\"Trazado 2278\"\n d=\"M18.394,6a9.394,9.394,0,1,0,9.394,9.394A9.421,9.421,0,0,0,18.394,6Zm0,12.525a3.131,3.131,0,1,1,3.131-3.131A3.14,3.14,0,0,1,18.394,18.525Z\"\n transform=\"translate(0.394 -6)\"\n fill=\"#284859\"\n />\n <path\n id=\"Trazado_2279\"\n data-name=\"Trazado 2279\"\n d=\"M6,24.1v4.791H43.575V24.1c0-7.828-12.431-11.21-18.787-11.21S6,16.24,6,24.1Zm7.233-1.472c2.161-1.753,7.452-3.507,11.554-3.507s9.425,1.753,11.554,3.507Z\"\n transform=\"translate(-6 8.684)\"\n fill=\"#284859\"\n />\n </g>\n </g>\n </g>\n <g\n id=\"Grupo_4703\"\n data-name=\"Grupo 4703\"\n transform=\"translate(-4.267 56)\"\n >\n <g\n id=\"Elipse_186\"\n data-name=\"Elipse 186\"\n transform=\"translate(193 643)\"\n fill=\"#a1c10c\"\n stroke=\"#fff\"\n strokeWidth=\"2\"\n >\n <circle cx=\"13\" cy=\"13\" r=\"13\" stroke=\"none\" />\n <circle cx=\"13\" cy=\"13\" r=\"12\" fill=\"none\" />\n </g>\n <path\n id=\"Trazado_5951\"\n data-name=\"Trazado 5951\"\n d=\"M24.53,12.5l-7.475,7.533L14.04,17,12,19.057l5.056,5.1,9.514-9.6Z\"\n transform=\"translate(187 637.5)\"\n fill=\"#284859\"\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_ff23ccfb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Calendar.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n width?: string\n height?: string\n}\n\nexport const Calendar = (props: Props) => {\n const { fill, width = '20.797', height = '20.544' } = props\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={height}\n viewBox=\"0 0 20.797 20.544\"\n >\n <defs>\n <clipPath>\n <rect\n id=\"Rectángulo_2099\"\n data-name=\"Rectángulo 2099\"\n width=\"20.797\"\n height=\"20.544\"\n transform=\"translate(0 0)\"\n className={fill}\n />\n </clipPath>\n </defs>\n <g id=\"Grupo_4689\" data-name=\"Grupo 4689\" transform=\"translate(0 0)\">\n <g id=\"Grupo_4686\" data-name=\"Grupo 4686\">\n <path\n id=\"Trazado_5967\"\n data-name=\"Trazado 5967\"\n d=\"M4.847.284V2.161H.283A.284.284,0,0,0,0,2.445V20.261a.284.284,0,0,0,.283.284H20.514a.284.284,0,0,0,.283-.284V2.445a.284.284,0,0,0-.283-.284H15.805V.284a.284.284,0,1,0-.567,0V2.161H5.414V.284a.284.284,0,1,0-.567,0M20.23,19.978H.566V5.527H20.23ZM5.414,3.968V2.728h9.824v1.24a.284.284,0,0,0,.567,0V2.728H20.23V4.96H.567V2.728h4.28v1.24a.284.284,0,0,0,.567,0\"\n className={fill}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_323d94ba
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/ArrowUp.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\ninterface Props {\n fill?: string\n width?: number\n height?: number\n}\n\nexport function ArrowUp({ fill, height = 24, width = 24 }: Props) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height={height}\n viewBox=\"0 0 24 24\"\n width={width}\n >\n <path\n d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\"\n className={fill}\n />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_9425268e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/PaymentPending.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\nimport type { SVGProps } from 'react'\n\nexport const PaymentPending = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 68 68\"\n width={88}\n height={88}\n {...props}\n >\n <g data-name=\"Grupo 5025\">\n <g data-name=\"Grupo 5027\">\n <path\n data-name=\"Trazado 6973\"\n d=\"M50.132 21.435H13.685a.482.482 0 0 0-.5.46v21.491a.482.482 0 0 0 .5.458h36.447a.483.483 0 0 0 .5-.458V21.895a.483.483 0 0 0-.5-.46m-35.941 3.1H49.63v1.838H14.191Zm35.439-.918H14.191v-1.264H49.63Zm-35.439 3.674H49.63v15.635H14.191Z\"\n fill=\"#0096c7\"\n />\n <path\n data-name=\"Trazado 6974\"\n d=\"M31.584 39.026H16.749a.517.517 0 0 0-.559.46.517.517 0 0 0 .559.458h14.835a.518.518 0 0 0 .559-.458.518.518 0 0 0-.559-.46\"\n fill=\"#0096c7\"\n />\n <path\n data-name=\"Trazado 6975\"\n d=\"M56.519 39.886a6.243 6.243 0 0 1-6.085 6.395 6.244 6.244 0 0 1-6.085-6.391 6.244 6.244 0 0 1 6.085-6.395 6.243 6.243 0 0 1 6.083 6.391\"\n fill=\"#fff\"\n />\n <path\n data-name=\"Trazado 6976\"\n d=\"M50.41 46.308a6.406 6.406 0 1 1 6.407-6.405 6.413 6.413 0 0 1-6.407 6.405m0-12.465a6.059 6.059 0 1 0 6.06 6.06 6.066 6.066 0 0 0-6.06-6.06\"\n fill=\"#0096c7\"\n />\n <path\n data-name=\"Trazado 6977\"\n d=\"M48.526 46.684a8.291 8.291 0 1 1 8.292-8.289 8.3 8.3 0 0 1-8.292 8.289Zm0-16.131a7.841 7.841 0 1 0 7.842 7.842 7.85 7.85 0 0 0-7.842-7.842Z\"\n fill=\"none\"\n />\n <path\n data-name=\"Trazado 6978\"\n d=\"M52.096 36.529a.281.281 0 0 0 .041-.273l-.041-.109a.29.29 0 0 0-.377-.168l-.863.332a.346.346 0 0 0-.146.537l.535.668a.363.363 0 0 0 .51.055.337.337 0 0 0 .095-.391 2.889 2.889 0 0 1-.313 5.438.341.341 0 0 0-.237.391.351.351 0 0 0 .444.275 3.583 3.583 0 0 0 .35-6.755\"\n fill=\"#0096c7\"\n />\n <path\n data-name=\"Trazado 6979\"\n d=\"M49.622 42.269a.36.36 0 0 0-.51-.038.332.332 0 0 0-.109.292 2.934 2.934 0 0 1-1.394-1.179 2.887 2.887 0 0 1 1.643-4.268.368.368 0 0 0 .257-.417.336.336 0 0 0-.427-.261 3.585 3.585 0 0 0-1.874 5.594 3.6 3.6 0 0 0 1.666 1.228.285.285 0 0 0-.1.342l.045.107a.292.292 0 0 0 .383.154l.889-.379a.316.316 0 0 0 .115-.5Z\"\n fill=\"#0096c7\"\n />\n </g>\n </g>\n <g data-name=\"Trazado 6981\" fill=\"none\">\n <path d=\"M34 0A34 34 0 1 1 0 34 34 34 0 0 1 34 0Z\" />\n <path\n d=\"M34 1a32.891 32.891 0 0 0-23.335 9.665A32.891 32.891 0 0 0 1 34a32.891 32.891 0 0 0 9.665 23.335A32.891 32.891 0 0 0 34 67a32.891 32.891 0 0 0 23.335-9.665A32.891 32.891 0 0 0 67 34a32.891 32.891 0 0 0-9.665-23.335A32.891 32.891 0 0 0 34 1m0-1c18.778 0 34 15.222 34 34S52.778 68 34 68 0 52.778 0 34 15.222 0 34 0Z\"\n fill=\"#0096c7\"\n />\n </g>\n </svg>\n)\n\n```" } ]
code_mycheckout-sdk_5904e224
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/DenyCredit.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport const DenyCredit = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={56} height={51} {...props}>\n <g\n id=\"Grupo_4706\"\n data-name=\"Grupo 4706\"\n transform=\"translate(-160.267 -684)\"\n >\n <g id=\"outline-assignment_ind-24px\" transform=\"translate(160.267 684)\">\n <g id=\"Bounding_Boxes\">\n <path\n id=\"Trazado_2276\"\n data-name=\"Trazado 2276\"\n d=\"M0,0H51.933V51.933H0Z\"\n fill=\"none\"\n />\n </g>\n <g id=\"Outline\" transform=\"translate(1.133 -3.819)\">\n <g\n id=\"Grupo_34\"\n data-name=\"Grupo 34\"\n transform=\"translate(6.492 10.819)\"\n >\n <path\n id=\"Trazado_2278\"\n data-name=\"Trazado 2278\"\n d=\"M18.394,6a9.394,9.394,0,1,0,9.394,9.394A9.421,9.421,0,0,0,18.394,6Zm0,12.525a3.131,3.131,0,1,1,3.131-3.131A3.14,3.14,0,0,1,18.394,18.525Z\"\n transform=\"translate(0.394 -6)\"\n fill=\"#284859\"\n />\n <path\n id=\"Trazado_2279\"\n data-name=\"Trazado 2279\"\n d=\"M6,24.1v4.791H43.575V24.1c0-7.828-12.431-11.21-18.787-11.21S6,16.24,6,24.1Zm7.233-1.472c2.161-1.753,7.452-3.507,11.554-3.507s9.425,1.753,11.554,3.507Z\"\n transform=\"translate(-6 8.684)\"\n fill=\"#284859\"\n />\n </g>\n </g>\n </g>\n <g\n id=\"Grupo_4704\"\n data-name=\"Grupo 4704\"\n transform=\"translate(-2.267 62)\"\n >\n <g\n id=\"Trazado_5952\"\n data-name=\"Trazado 5952\"\n transform=\"translate(193 643)\"\n fill=\"#cb4242\"\n >\n <path\n d=\"M 13 25 C 9.794679641723633 25 6.781219959259033 23.75177955627441 4.51471996307373 21.48527908325195 C 2.248219966888428 19.21878051757812 1 16.20532035827637 1 13 C 1 9.794679641723633 2.248219966888428 6.781219959259033 4.51471996307373 4.51471996307373 C 6.781219959259033 2.248219966888428 9.794679641723633 1 13 1 C 16.20532035827637 1 19.21878051757812 2.248219966888428 21.48527908325195 4.51471996307373 C 23.75177955627441 6.781219959259033 25 9.794679641723633 25 13 C 25 16.20532035827637 23.75177955627441 19.21878051757812 21.48527908325195 21.48527908325195 C 19.21878051757812 23.75177955627441 16.20532035827637 25 13 25 Z\"\n stroke=\"none\"\n />\n <path\n d=\"M 13 2 C 10.06179046630859 2 7.299449920654297 3.144199371337891 5.221830368041992 5.221830368041992 C 3.144199371337891 7.299449920654297 2 10.06179046630859 2 13 C 2 15.93820953369141 3.144199371337891 18.7005500793457 5.221830368041992 20.77816963195801 C 7.299449920654297 22.85580062866211 10.06179046630859 24 13 24 C 15.93820953369141 24 18.7005500793457 22.85580062866211 20.77816963195801 20.77816963195801 C 22.85580062866211 18.7005500793457 24 15.93820953369141 24 13 C 24 10.06179046630859 22.85580062866211 7.299449920654297 20.77816963195801 5.221830368041992 C 18.7005500793457 3.144199371337891 15.93820953369141 2 13 2 M 13 0 C 20.1796989440918 0 26 5.82029914855957 26 13 C 26 20.1796989440918 20.1796989440918 26 13 26 C 5.82029914855957 26 0 20.1796989440918 0 13 C 0 5.82029914855957 5.82029914855957 0 13 0 Z\"\n stroke=\"none\"\n fill=\"#fff\"\n />\n </g>\n </g>\n <g\n id=\"icon_close\"\n data-name=\"icon / close\"\n transform=\"translate(189 704)\"\n >\n <rect\n id=\"Rectángulo_1736\"\n data-name=\"Rectángulo 1736\"\n width=\"27\"\n height=\"27\"\n fill=\"rgba(50,56,69,0)\"\n />\n <path\n id=\"close\"\n d=\"M5.655,4.713a.666.666,0,0,0-.942.942L8.558,9.5,4.713,13.345a.666.666,0,0,0,.942.942L9.5,10.442l3.845,3.845a.666.666,0,1,0,.942-.942L10.442,9.5l3.845-3.845a.666.666,0,0,0-.942-.942L9.5,8.558Z\"\n transform=\"translate(4.482 4.482)\"\n fill=\"#fff\"\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_6244f768
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Clock.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\nexport function Clock(props: React.SVGProps<SVGSVGElement>) {\n const { fill, width = '24', height = '24' } = props\n\n return (\n <svg width={width} height={height} viewBox=\"0 0 24 24\">\n <g>\n <g data-name=\"Grupo 4789\" id=\"Grupo_4789\">\n <g data-name=\"Grupo 4788\" id=\"Grupo_4788\">\n <path\n d=\"m12.01,23.58a11.83,11.58 0 1 1 11.82,-11.57a11.84,11.59 0 0 1 -11.82,11.57m0,-22.52a11.17,10.94 0 1 0 11.17,10.94a11.19,10.96 0 0 0 -11.17,-10.94\"\n data-name=\"Trazado 6012\"\n fill=\"#011d1a\"\n id=\"Trazado_6012\"\n className={fill}\n />\n <path\n d=\"m8.14,15.67a0.32,0.32 0 0 1 -0.22,-0.54l2.87,-2.65a0.32,0.32 0 1 1 0.44,0.45l-2.87,2.65a0.32,0.32 0 0 1 -0.22,0.09\"\n data-name=\"Trazado 6013\"\n fill=\"#011d1a\"\n id=\"Trazado_6013\"\n transform=\"matrix(1 0 0 1 0 0)\"\n className={fill}\n />\n <path\n d=\"m11.99,11.06a0.32,0.32 0 0 1 -0.31,-0.31l0,-7.23a0.32,0.32 0 1 1 0.64,0l0,7.23a0.32,0.32 0 0 1 -0.32,0.31\"\n data-name=\"Trazado 6014\"\n fill=\"#011d1a\"\n id=\"Trazado_6014\"\n className={fill}\n />\n <path\n d=\"m12,13.26a1.28,1.26 0 1 1 1.28,-1.26a1.28,1.26 0 0 1 -1.28,1.26m0,-1.88a0.64,0.62 0 1 0 0.64,0.62a0.64,0.62 0 0 0 -0.64,-0.62\"\n data-name=\"Trazado 6015\"\n fill=\"#011d1a\"\n id=\"Trazado_6015\"\n className={fill}\n />\n </g>\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_9ef64fd6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Delete.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n background: string\n backgroundSecondary: string\n}\n\nexport function Delete(props: Props) {\n const { fill, background, backgroundSecondary } = props\n\n return (\n <svg\n id=\"Element-eliminarx\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <defs>\n <style>{`.del{fill-rule:evenodd;}`}</style>\n </defs>\n <circle\n id=\"Elipse_173\"\n data-name=\"Elipse 173\"\n cx=\"12\"\n cy=\"12\"\n r=\"12\"\n className={backgroundSecondary}\n />\n <g id=\"icon_close-o\" data-name=\"icon / close-o\">\n <rect\n id=\"Rectángulo_1735\"\n data-name=\"Rectángulo 1735\"\n width=\"24\"\n height=\"24\"\n className={background}\n />\n <g\n id=\"Grupo_1275\"\n data-name=\"Grupo 1275\"\n transform=\"translate(3.75 3.75)\"\n >\n <path\n id=\"Trazado_291\"\n data-name=\"Trazado 291\"\n d=\"M14.09,8.827a.75.75,0,0,0-1.023-1.1L10.873,9.776,8.827,7.581A.75.75,0,0,0,7.73,8.6L9.776,10.8,7.581,12.844a.75.75,0,1,0,1.023,1.1L10.8,11.9l2.045,2.195a.75.75,0,1,0,1.1-1.023L11.9,10.873Z\"\n transform=\"translate(-2.586 -2.586)\"\n className={fill}\n />\n <path\n id=\"Trazado_292\"\n data-name=\"Trazado 292\"\n d=\"M1,9.25A8.25,8.25,0,1,1,9.25,17.5,8.25,8.25,0,0,1,1,9.25ZM9.25,16A6.75,6.75,0,1,1,16,9.25,6.75,6.75,0,0,1,9.25,16Z\"\n transform=\"translate(-1 -1)\"\n className={`del ${fill}`}\n />\n </g>\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_3b567872
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Identity.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n}\n\nexport function Identity(props: Props) {\n const { fill } = props\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={24}\n height={24}\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className={fill}\n d=\"M12 5.9A2.1 2.1 0 119.9 8 2.1 2.1 0 0112 5.9m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4a4 4 0 104 4 4 4 0 00-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z\"\n />\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_045b98bd
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/Dropdown.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n}\n\nexport const Dropdown = (props: Props) => {\n const { fill } = props\n\n return (\n <svg\n id=\"icon_down\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n >\n <rect\n id=\"Rectángulo_2122\"\n data-name=\"Rectángulo 2122\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n />\n <g\n id=\"icon_left\"\n data-name=\"icon / left\"\n transform=\"translate(4 20) rotate(-90)\"\n >\n <rect\n id=\"Rectángulo_47\"\n data-name=\"Rectángulo 47\"\n width=\"16\"\n height=\"16\"\n className={fill}\n opacity=\"0.001\"\n />\n <path\n id=\"Fill_1\"\n data-name=\"Fill 1\"\n d=\"M7.987,6.658a.285.285,0,0,0,0-.173A.46.46,0,0,0,7.965,6.4a.522.522,0,0,0-.05-.079.437.437,0,0,0-.037-.059c-.005-.006-.012-.008-.018-.013s-.008-.012-.014-.017L.8.119A.5.5,0,0,0,.126.15.443.443,0,0,0,.157.8L6.809,6.571.157,12.346a.443.443,0,0,0-.031.647.489.489,0,0,0,.355.15A.49.49,0,0,0,.8,13.024L7.846,6.91c.006-.006.008-.012.015-.018s.012-.007.017-.012a.437.437,0,0,0,.037-.059.522.522,0,0,0,.05-.079.46.46,0,0,0,.021-.084\"\n transform=\"translate(12.071 14.571) rotate(180)\"\n className={fill}\n />\n </g>\n </svg>\n )\n}\n\n```" } ]
code_mycheckout-sdk_5420dfb8
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of mycheckout-sdk/src/components/Icons/RadioButton.tsx from the mycheckout-sdk VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport * as React from 'react'\n\ninterface Props {\n fill: string\n border: string\n selected?: boolean\n onClick?: any\n width?: string\n heigth?: string\n}\n\nexport function RadioButton(props: Props) {\n const { fill, selected, border, onClick, width = '24', heigth = '17' } = props\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={width}\n height={heigth}\n viewBox=\"0 0 20 20\"\n onClick={onClick}\n >\n <defs>\n <style>{`.both{fill-rule:evenodd;}.empty{fill:none;}`}</style>\n </defs>\n <path\n className={`${selected ? fill : 'empty'}`}\n d=\"M12,16a4,4,0,1,0-4-4A4,4,0,0,0,12,16Z\"\n transform=\"translate(-2 -2)\"\n />\n <path\n className={`both ${selected ? fill : border}`}\n d=\"M22,12A10,10,0,1,1,12,2,10,10,0,0,1,22,12Zm-2,0a8,8,0,1,1-8-8A8,8,0,0,1,20,12Z\"\n transform=\"translate(-2 -2)\"\n />\n </svg>\n )\n}\n\n```" } ]