feat(menu): Adiciona categorias ao menu do header

This commit is contained in:
amanda almeida 2023-02-07 04:01:42 -03:00
parent 97a425e6b1
commit 895551b7e6
6 changed files with 99 additions and 288 deletions

View File

@ -1,3 +0,0 @@
import PlaceholderAdd from "./components/placeholder";
export default PlaceholderAdd;

4
react/typings/css.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare module "*.css" {
const css: any;
export default css;
}

View File

@ -4,108 +4,46 @@
"experimentalOptimizeRendering": true
},
"children": [
"menu-item#category-apparel",
"menu-item#category-home",
"menu-item#more"
"menu-item#novidades",
"menu-item#sapatos",
"menu-item#bolsas",
"menu-item#acessorios",
"menu-item#outlet",
"menu-item#lojas",
"menu-item#sejafranqueado"
]
},
"menu-item#category-apparel": {
"menu-item#novidades": {
"props": {
"id": "menu-item-category-apparel",
"id": "menu-item-novidades",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/apparel---accessories/",
"href": "#",
"noFollow": false,
"tagTitle": "Apparel & Accessories",
"text": "Apparel & Accessories"
"tagTitle": "novidades ",
"text": "NOVIDADES"
}
}
},
"blocks": [
"vtex.menu@2.x:submenu#category-apparel"
]
},
"vtex.menu@2.x:submenu#category-apparel": {
"menu-item#sapatos": {
"props": {
"width": "auto"
},
"children": [
"vtex.menu@2.x:menu#category-apparel"
]
},
"vtex.menu@2.x:menu#category-apparel": {
"props": {
"orientation": "vertical"
},
"children": [
"menu-item#category-apparel-clothing",
"menu-item#category-apparel-accessories",
"menu-item#category-apparel-eyeglasses"
]
},
"menu-item#category-apparel-clothing": {
"props": {
"id": "menu-item-category-apparel-clothing",
"id": "menu-item-sapatos",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/apparel---accessories/clothing/",
"href": "#",
"noFollow": false,
"tagTitle": "Clothing",
"text": "Clothing"
"tagTitle": "SAPATOS",
"text": "SAPATOS"
}
}
},
"menu-item#category-apparel-accessories": {
"props": {
"id": "menu-item-category-apparel-accessories",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/apparel---accessories/accessories/",
"noFollow": false,
"tagTitle": "Accessories",
"text": "Accessories"
}
}
},
"menu-item#category-apparel-eyeglasses": {
"props": {
"id": "menu-item-category-apparel-eyeglasses",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/apparel---accessories/eyeglasses/",
"noFollow": false,
"tagTitle": "Eyeglasses",
"text": "Eyeglasses"
}
}
},
"menu-item#category-home": {
"props": {
"id": "menu-item-category-home",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/home---decor/",
"noFollow": false,
"tagTitle": "Home & Decor",
"text": "Home & Decor"
}
}
},
"menu-item#more": {
"menu-item#bolsas": {
"props": {
"id": "menu-item-custom-sale",
"type": "custom",
@ -115,89 +53,68 @@
"type": "internal",
"href": "#",
"noFollow": true,
"tagTitle": "More",
"text": "More"
"tagTitle": "Bolsas",
"text": "Bolsas"
}
}
},
"blocks": [
"vtex.menu@2.x:submenu#more"
]
},
"vtex.menu@2.x:submenu#more": {
"menu-item#acessorios": {
"props": {
"width": "100%"
},
"children": [
"flex-layout.row#menu-more"
]
},
"flex-layout.row#menu-more": {
"children": [
"flex-layout.col#menu-more-1",
"flex-layout.col#menu-more-2"
]
},
"flex-layout.col#menu-more-1": {
"children": [
"vtex.menu@2.x:menu#more"
]
},
"flex-layout.col#menu-more-2": {
"children": [
"info-card#home"
]
},
"vtex.menu@2.x:menu#more": {
"props": {
"orientation": "vertical"
},
"children": [
"menu-item#about-us",
"menu-item#faq"
]
},
"menu-item#about-us": {
"props": {
"id": "menu-item-about-us",
"id": "menu-item-acessorios",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/about-us",
"href": "#",
"noFollow": true,
"tagTitle": "About us",
"text": "About us"
"tagTitle": "acessorios",
"text": "acessorios"
}
}
},
"menu-item#faq": {
"menu-item#outlet": {
"props": {
"id": "menu-item-faq",
"id": "menu-item-outlet",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/faq",
"href": "#",
"noFollow": true,
"tagTitle": "FAQ",
"text": "FAQ"
"tagTitle": "outlet",
"text": "outlet"
}
}
},
"menu-item#contact-us": {
"menu-item#lojas": {
"props": {
"id": "menu-item-contact-us",
"id": "menu-item-lojas",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "/contact-us",
"href": "#",
"noFollow": true,
"tagTitle": "Contact Us",
"text": "Contact Us"
"tagTitle": "lojas",
"text": "lojas"
}
}
},
"menu-item#sejafranqueado": {
"props": {
"id": "menu-item-sejafranqueado",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "#",
"noFollow": true,
"tagTitle": "Seja franqueado",
"text": "Seja franqueado"
}
}
}

View File

@ -6,46 +6,31 @@
"blocks": ["header-layout.desktop", "header-layout.mobile"]
},
"header-layout.desktop": {
"children": [
"flex-layout.row#1-desktop",
"flex-layout.row#3-desktop",
"sticky-layout#4-desktop"
]
},
"flex-layout.row#1-desktop": {
"children": ["telemarketing"],
"props": {
"fullWidth": true
}
},
"flex-layout.row#3-desktop": {
"props": {
"blockClass": "menu-link",
"horizontalAlign": "center",
"preventHorizontalStretch": true,
"preventVerticalStretch": true,
"fullWidth": true
},
"children": [
"vtex.menu@2.x:menu#websites",
"flex-layout.col#spacer",
"vtex.menu@2.x:menu#institutional"
]
"children": ["header-row#1", "sticky-layout#2-desktop"]
},
"flex-layout.col#spacer": {
"props": {
"width": "grow"
}
},
"sticky-layout#4-desktop": {
"header-row#1": {
"children": ["header-border", "notification.bar#home"],
"props": {
"fullWidth": "true"
}
},
"notification.bar#home": {
"props": {
"content": "Desconto na primeira compra"
}
},
"sticky-layout#2-desktop": {
"props": {
"blockClass": "sticky-header"
},
"children": ["flex-layout.row#4-desktop"]
"children": ["flex-layout.row#2-desktop"]
},
"flex-layout.row#4-desktop": {
"flex-layout.row#2-desktop": {
"props": {
"blockClass": "main-header",
"horizontalAlign": "center",
@ -59,7 +44,6 @@
"flex-layout.col#category-menu",
"flex-layout.col#spacer",
"search-bar",
"locale-switcher",
"login",
"minicart.v2"
]
@ -80,17 +64,22 @@
"props": {
"title": "Logo",
"href": "/",
"url": "https://storecomponents.vteximg.com.br/arquivos/store-theme-logo.png",
"width": "180",
"height": "12"
"url": "https://agenciamagma.vtexassets.com/assets/vtex.file-manager-graphql/images/d3007954-7fdd-4d38-956c-58286fa1a732___b77dbe0e7dea0eadd46b6ce55b80b74b.svg",
"width": "140",
"height": "33"
}
},
"header-layout.mobile": {
"children": ["sticky-layout#1-mobile"]
},
"sticky-layout#1-mobile": {
"children": ["flex-layout.row#1-mobile"]
"children": ["html#mobile"]
},
"html#mobile": {
"children": ["header-row#1", "flex-layout.row#1-mobile", "search-bar"]
},
"flex-layout.row#1-mobile": {
"children": [
"drawer",
@ -112,9 +101,13 @@
"menu#drawer": {
"children": [
"menu-item#category-apparel",
"menu-item#category-home",
"menu-item#more"
"menu-item#novidades",
"menu-item#sapatos",
"menu-item#bolsas",
"menu-item#acessorios",
"menu-item#outlet",
"menu-item#lojas",
"menu-item#sejafranqueado"
],
"props": {
"orientation": "vertical"
@ -125,9 +118,9 @@
"props": {
"title": "Logo",
"href": "/",
"url": "https://storecomponents.vteximg.com.br/arquivos/store-theme-logo-mobile.png",
"width": "77.5",
"height": "27.5"
"url": "https://agenciamagma.vtexassets.com/assets/vtex.file-manager-graphql/images/d3007954-7fdd-4d38-956c-58286fa1a732___b77dbe0e7dea0eadd46b6ce55b80b74b.svg",
"width": "140",
"height": "33"
}
}
}

View File

@ -1,43 +0,0 @@
{
"vtex.menu@2.x:menu#websites": {
"children": [
"menu-item#shop",
"menu-item#about-us"
]
},
"menu-item#shop": {
"props": {
"id": "menu-item-shop",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "internal",
"href": "#",
"noFollow": false,
"tagTitle": "Shop",
"text": "Shop"
}
}
},
"vtex.menu@2.x:menu#institutional": {
"children": [
"menu-item#vtex-website"
]
},
"menu-item#vtex-website": {
"props": {
"id": "menu-item-vtex-website",
"type": "custom",
"iconId": null,
"highlight": false,
"itemProps": {
"type": "external",
"href": "http://vtex.com",
"noFollow": false,
"tagTitle": "visit vtex.com",
"text": "visit vtex.com"
}
}
}
}

View File

@ -524,11 +524,6 @@ async-settle@^1.0.0:
dependencies:
async-done "^1.2.2"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
atob@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
@ -544,15 +539,6 @@ axe-core@^4.6.2:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.6.2.tgz#6e566ab2a3d29e415f5115bc0fd2597a5eb3e5e3"
integrity sha512-b1WlTV8+XKLj9gZy2DZXgQiyDp9xkkoe2a6U6UbYccScq2wgH/YwCeI2/Jq2mgo0HzQxqJOjWZBLeA/mqsk5Mg==
axios@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.3.1.tgz#80bf6c8dbb46e6db1fa8fe9ab114c1ca7405c2ee"
integrity sha512-78pWJsQTceInlyaeBQeYZ/QgZeWS8hGeKiIJiDKQe3hEyBb7sEMq0K4gjx+Va6WHTYO4zI/RRl8qGRzn0YMadA==
dependencies:
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"
axobject-query@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.1.1.tgz#3b6e5c6d4e43ca7ba51c5babf99d22a9c68485e1"
@ -872,13 +858,6 @@ color-support@^1.1.3:
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
combined-stream@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
dependencies:
delayed-stream "~1.0.0"
commander@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
@ -1102,11 +1081,6 @@ define-property@^2.0.2:
is-descriptor "^1.0.2"
isobject "^3.0.1"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
detect-file@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
@ -1848,11 +1822,6 @@ flush-write-stream@^1.0.2:
inherits "^2.0.3"
readable-stream "^2.3.6"
follow-redirects@^1.15.0:
version "1.15.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==
for-each@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
@ -1872,15 +1841,6 @@ for-own@^1.0.0:
dependencies:
for-in "^1.0.1"
form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
fragment-cache@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
@ -3087,18 +3047,6 @@ micromatch@^4.0.2, micromatch@^4.0.4:
braces "^3.0.2"
picomatch "^2.3.1"
mime-db@1.52.0:
version "1.52.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
mime-types@^2.1.12:
version "2.1.35"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
dependencies:
mime-db "1.52.0"
mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
@ -3587,11 +3535,6 @@ prop-types@^15.8.1:
object-assign "^4.1.1"
react-is "^16.13.1"
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
pump@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909"