@postnord/pn-marketweb-components 1.0.4 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/convert-57b3dd5e.js +1730 -0
- package/cjs/{index-0f43b450.js → index-b58d2618.js} +82 -0
- package/cjs/index-f472d191.js +181 -0
- package/cjs/loader.cjs.js +2 -2
- package/cjs/pn-choice-button_2.cjs.entry.js +78 -0
- package/cjs/pn-find-service-and-price-store-56d8b760.js +23 -0
- package/cjs/pn-find-service-and-price.cjs.entry.js +263 -0
- package/cjs/pn-language-selector_9.cjs.entry.js +646 -0
- package/cjs/pn-mainnav-link.cjs.entry.js +45 -0
- package/cjs/pn-mainnav-store-dda9827f.js +18 -0
- package/cjs/pn-market-web-components.cjs.js +2 -2
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +145 -0
- package/cjs/{pn-siteheader.cjs.entry.js → pn-marketweb-siteheader.cjs.entry.js} +8 -8
- package/cjs/pn-product-pricelist-result.cjs.entry.js +45 -0
- package/cjs/pn-product-pricelist-store-e4f8503b.js +20 -0
- package/cjs/pn-product-pricelist.cjs.entry.js +219 -0
- package/cjs/pn-product-tile_3.cjs.entry.js +49 -0
- package/cjs/pn-site-footer_2.cjs.entry.js +36 -0
- package/collection/collection-manifest.json +22 -3
- package/collection/components/input/pn-choice-button/choice-button.stories.js +34 -0
- package/collection/components/input/pn-choice-button/pn-choice-button.css +66 -0
- package/collection/components/input/pn-choice-button/pn-choice-button.js +170 -0
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter-types.js +10 -0
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.css +0 -0
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +166 -0
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.stories.js +54 -0
- package/collection/components/layout-components/{pn-siteheader → pn-marketweb-sitefooter}/translations.js +0 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.css +34 -0
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader-login.js → pn-marketweb-siteheader/pn-marketweb-siteheader-login.js} +6 -6
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader-loginmanager.js → pn-marketweb-siteheader/pn-marketweb-siteheader-loginmanager.js} +0 -0
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader-search.css → pn-marketweb-siteheader/pn-marketweb-siteheader-search.css} +0 -0
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader-search.js → pn-marketweb-siteheader/pn-marketweb-siteheader-search.js} +5 -6
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader-types.js → pn-marketweb-siteheader/pn-marketweb-siteheader-types.js} +0 -0
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader.css → pn-marketweb-siteheader/pn-marketweb-siteheader.css} +21 -21
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader.js → pn-marketweb-siteheader/pn-marketweb-siteheader.js} +7 -7
- package/collection/components/layout-components/{pn-siteheader/pn-siteheader.stories.js → pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js} +2 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/translations.js +47 -0
- package/collection/components/navigation/pn-language-selector/language-selector.stories.js +43 -0
- package/collection/components/navigation/pn-language-selector/pn-language-selector-option.css +74 -0
- package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +148 -0
- package/collection/components/navigation/pn-language-selector/pn-language-selector-types.js +1 -0
- package/collection/components/navigation/pn-language-selector/pn-language-selector.css +32 -0
- package/collection/components/navigation/pn-language-selector/pn-language-selector.js +92 -0
- package/collection/components/navigation/pn-language-selector/translations.js +17 -0
- package/collection/components/navigation/pn-mainnav/main-nav.stories.js +92 -0
- package/collection/components/navigation/pn-mainnav/pn-main-nav-mockdata.js +5851 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-level.css +139 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +93 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-link.css +221 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +126 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-list.css +51 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +46 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-store.js +14 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav.css +100 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav.js +200 -0
- package/collection/components/navigation/pn-mainnav/translations.js +32 -0
- package/collection/components/navigation/pn-mainnav/types.js +1 -0
- package/collection/components/navigation/pn-site-footer/pn-site-footer-col.css +20 -0
- package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +14 -0
- package/collection/components/navigation/pn-site-footer/pn-site-footer.css +72 -0
- package/collection/components/navigation/pn-site-footer/pn-site-footer.js +50 -0
- package/collection/components/navigation/pn-site-footer/site-footer.stories.js +87 -0
- package/collection/components/navigation/pn-site-selector/pn-site-selector-i18n.js +18 -0
- package/collection/components/navigation/pn-site-selector/pn-site-selector-item.css +62 -0
- package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +103 -0
- package/collection/components/navigation/pn-site-selector/pn-site-selector-types.js +1 -0
- package/collection/components/navigation/pn-site-selector/pn-site-selector.css +29 -0
- package/collection/components/navigation/pn-site-selector/pn-site-selector.js +96 -0
- package/collection/components/navigation/pn-site-selector/site-selector.stories.js +35 -0
- package/collection/components/widgets/pn-find-service-and-price/data.js +53 -0
- package/collection/components/widgets/pn-find-service-and-price/find-service-and-price.stories.js +27 -0
- package/collection/components/widgets/pn-find-service-and-price/libs/convertnode.js +58 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.css +0 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +101 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-store.js +20 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-translations.js +71 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-types.js +1 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.css +56 -0
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +236 -0
- package/collection/components/widgets/pn-find-service-and-price/runconvert.js +2 -0
- package/collection/components/widgets/pn-product-pricelist/data.js +53 -0
- package/collection/components/widgets/pn-product-pricelist/libs/convert.js +43 -0
- package/collection/components/widgets/pn-product-pricelist/libs/convertnode.js +58 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.css +0 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +101 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-store.js +17 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-translations.js +56 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-types.js +1 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.css +55 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +231 -0
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.stories.js +35 -0
- package/collection/components/widgets/pn-product-pricelist/runconvert.js +2 -0
- package/collection/components/widgets/pn-product-tile/pn-product-tile-info.css +3 -0
- package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +70 -0
- package/collection/components/widgets/pn-product-tile/pn-product-tile-price.css +23 -0
- package/collection/components/widgets/pn-product-tile/pn-product-tile-price.js +94 -0
- package/collection/components/widgets/pn-product-tile/pn-product-tile.css +48 -0
- package/collection/components/widgets/pn-product-tile/pn-product-tile.js +21 -0
- package/collection/components/widgets/pn-product-tile/product-tile.stories.js +50 -0
- package/collection/globals/shared/productprice/convert.js +43 -0
- package/collection/globals/shared/productprice/product-price-types.js +1 -0
- package/custom-elements/index.d.ts +126 -12
- package/custom-elements/index.js +3179 -24
- package/esm/convert-b49a0857.js +1728 -0
- package/esm/{index-1e3839a0.js → index-52dc19ca.js} +79 -1
- package/esm/index-7c277874.js +179 -0
- package/esm/loader.js +2 -2
- package/esm/pn-choice-button_2.entry.js +73 -0
- package/esm/pn-find-service-and-price-store-d02cbfe1.js +21 -0
- package/esm/pn-find-service-and-price.entry.js +259 -0
- package/esm/pn-language-selector_9.entry.js +634 -0
- package/esm/pn-mainnav-link.entry.js +41 -0
- package/esm/pn-mainnav-store-a0726338.js +15 -0
- package/esm/pn-market-web-components.js +2 -2
- package/esm/pn-marketweb-sitefooter.entry.js +141 -0
- package/esm/{pn-siteheader.entry.js → pn-marketweb-siteheader.entry.js} +8 -8
- package/esm/pn-product-pricelist-result.entry.js +41 -0
- package/esm/pn-product-pricelist-store-6259b354.js +18 -0
- package/esm/pn-product-pricelist.entry.js +215 -0
- package/esm/pn-product-tile_3.entry.js +43 -0
- package/esm/pn-site-footer_2.entry.js +31 -0
- package/esm-es5/convert-b49a0857.js +13 -0
- package/esm-es5/index-52dc19ca.js +1 -0
- package/esm-es5/index-7c277874.js +1 -0
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-choice-button_2.entry.js +1 -0
- package/esm-es5/pn-find-service-and-price-store-d02cbfe1.js +1 -0
- package/esm-es5/pn-find-service-and-price.entry.js +1 -0
- package/esm-es5/pn-language-selector_9.entry.js +1 -0
- package/esm-es5/pn-mainnav-link.entry.js +1 -0
- package/esm-es5/pn-mainnav-store-a0726338.js +1 -0
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -0
- package/esm-es5/pn-product-pricelist-result.entry.js +1 -0
- package/esm-es5/pn-product-pricelist-store-6259b354.js +1 -0
- package/esm-es5/pn-product-pricelist.entry.js +1 -0
- package/esm-es5/pn-product-tile_3.entry.js +1 -0
- package/esm-es5/pn-site-footer_2.entry.js +1 -0
- package/package.json +6 -3
- package/pn-market-web-components/p-05d06f7f.system.js +1 -0
- package/pn-market-web-components/p-0a756d7d.system.entry.js +1 -0
- package/pn-market-web-components/p-21e0e386.js +13 -0
- package/pn-market-web-components/p-27502f43.system.entry.js +1 -0
- package/pn-market-web-components/p-3ae134bf.system.entry.js +1 -0
- package/pn-market-web-components/p-3ae74105.system.entry.js +1 -0
- package/pn-market-web-components/p-43bb8707.system.js +1 -0
- package/pn-market-web-components/p-46018354.system.js +1 -0
- package/pn-market-web-components/p-4b4ee8d5.system.entry.js +1 -0
- package/pn-market-web-components/p-4bf9a9ff.js +1 -0
- package/pn-market-web-components/p-57a1db89.system.entry.js +1 -0
- package/pn-market-web-components/p-5f1ad0b7.entry.js +1 -0
- package/pn-market-web-components/p-62700d6e.system.js +1 -0
- package/pn-market-web-components/p-7331d3bb.system.js +1 -0
- package/pn-market-web-components/p-80fd4dd9.system.entry.js +1 -0
- package/pn-market-web-components/p-91624bd5.system.js +13 -0
- package/pn-market-web-components/p-926fc962.js +1 -0
- package/pn-market-web-components/p-986d3894.entry.js +1 -0
- package/pn-market-web-components/p-a04d0ba4.entry.js +1 -0
- package/pn-market-web-components/p-a5179982.system.entry.js +1 -0
- package/pn-market-web-components/p-af861bb5.js +1 -0
- package/pn-market-web-components/p-b129cc27.system.js +1 -0
- package/pn-market-web-components/p-b4904bdb.system.entry.js +1 -0
- package/pn-market-web-components/p-ba704cbf.entry.js +1 -0
- package/pn-market-web-components/p-ba8e9dfe.entry.js +1 -0
- package/pn-market-web-components/p-be245b29.entry.js +1 -0
- package/pn-market-web-components/p-bfc523fc.js +1 -0
- package/pn-market-web-components/p-ce136600.js +1 -0
- package/pn-market-web-components/p-d3590589.entry.js +1 -0
- package/pn-market-web-components/p-e367b055.system.entry.js +1 -0
- package/pn-market-web-components/p-e377410f.entry.js +1 -0
- package/pn-market-web-components/p-ec95bda3.entry.js +1 -0
- package/pn-market-web-components/p-fee1d1c9.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/pn-market-web-components/pn-market-web-components.js +1 -1
- package/types/components/input/pn-choice-button/pn-choice-button.d.ts +20 -0
- package/types/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter-types.d.ts +21 -0
- package/types/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.d.ts +23 -0
- package/types/components/layout-components/{pn-siteheader → pn-marketweb-sitefooter}/translations.d.ts +0 -0
- package/types/components/layout-components/{pn-siteheader/pn-siteheader-login.d.ts → pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts} +3 -3
- package/types/components/layout-components/{pn-siteheader/pn-siteheader-loginmanager.d.ts → pn-marketweb-siteheader/pn-marketweb-siteheader-loginmanager.d.ts} +0 -0
- package/types/components/layout-components/{pn-siteheader/pn-siteheader-search.d.ts → pn-marketweb-siteheader/pn-marketweb-siteheader-search.d.ts} +2 -2
- package/types/components/layout-components/{pn-siteheader/pn-siteheader-types.d.ts → pn-marketweb-siteheader/pn-marketweb-siteheader-types.d.ts} +0 -0
- package/types/components/layout-components/{pn-siteheader/pn-siteheader.d.ts → pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts} +2 -2
- package/types/components/layout-components/pn-marketweb-siteheader/translations.d.ts +47 -0
- package/types/components/navigation/pn-language-selector/pn-language-selector-option.d.ts +12 -0
- package/types/components/navigation/pn-language-selector/pn-language-selector-types.d.ts +9 -0
- package/types/components/navigation/pn-language-selector/pn-language-selector.d.ts +15 -0
- package/types/components/navigation/pn-language-selector/translations.d.ts +17 -0
- package/types/components/navigation/pn-mainnav/pn-mainnav-level.d.ts +15 -0
- package/types/components/navigation/pn-mainnav/pn-mainnav-link.d.ts +19 -0
- package/types/components/navigation/pn-mainnav/pn-mainnav-list.d.ts +7 -0
- package/types/components/navigation/pn-mainnav/pn-mainnav-store.d.ts +21 -0
- package/types/components/navigation/pn-mainnav/pn-mainnav.d.ts +24 -0
- package/types/components/navigation/pn-mainnav/translations.d.ts +32 -0
- package/types/components/navigation/pn-mainnav/types.d.ts +6 -0
- package/types/components/navigation/pn-site-footer/pn-site-footer-col.d.ts +3 -0
- package/types/components/navigation/pn-site-footer/pn-site-footer.d.ts +6 -0
- package/types/components/navigation/pn-site-selector/pn-site-selector-item.d.ts +7 -0
- package/types/components/navigation/pn-site-selector/pn-site-selector-types.d.ts +3 -0
- package/types/components/navigation/pn-site-selector/pn-site-selector.d.ts +12 -0
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.d.ts +9 -0
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-store.d.ts +33 -0
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-translations.d.ts +71 -0
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price-types.d.ts +29 -0
- package/types/components/widgets/pn-find-service-and-price/pn-find-service-and-price.d.ts +18 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-result.d.ts +9 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-store.d.ts +27 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-translations.d.ts +56 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist-types.d.ts +16 -0
- package/types/components/widgets/pn-product-pricelist/pn-product-pricelist.d.ts +20 -0
- package/types/components/widgets/pn-product-tile/pn-product-tile-info.d.ts +6 -0
- package/types/components/widgets/pn-product-tile/pn-product-tile-price.d.ts +7 -0
- package/types/components/widgets/pn-product-tile/pn-product-tile.d.ts +3 -0
- package/types/components.d.ts +486 -28
- package/types/globals/shared/productprice/product-price-types.d.ts +19 -0
- package/cjs/pn-siteheader-login_2.cjs.entry.js +0 -295
- package/collection/components/layout-components/pn-siteheader/pn-siteheader-login.css +0 -34
- package/esm/pn-siteheader-login_2.entry.js +0 -290
- package/esm-es5/index-1e3839a0.js +0 -1
- package/esm-es5/pn-siteheader-login_2.entry.js +0 -1
- package/esm-es5/pn-siteheader.entry.js +0 -1
- package/pn-market-web-components/p-0e743863.system.js +0 -1
- package/pn-market-web-components/p-1e159db8.js +0 -1
- package/pn-market-web-components/p-2e901469.system.entry.js +0 -1
- package/pn-market-web-components/p-4d08fcb9.entry.js +0 -1
- package/pn-market-web-components/p-530b52d0.system.js +0 -1
- package/pn-market-web-components/p-9a654a14.system.entry.js +0 -1
- package/pn-market-web-components/p-a1045531.entry.js +0 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
pn-mainnav-level {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
pn-mainnav-level[data-level="1"] {
|
|
5
|
+
width: 100%;
|
|
6
|
+
right: 0;
|
|
7
|
+
overflow-y: scroll;
|
|
8
|
+
overflow-x: hidden;
|
|
9
|
+
flex: 1;
|
|
10
|
+
}
|
|
11
|
+
@media screen and (min-width: 64em) {
|
|
12
|
+
pn-mainnav-level[data-level="1"] {
|
|
13
|
+
width: auto;
|
|
14
|
+
overflow: initial;
|
|
15
|
+
}
|
|
16
|
+
pn-mainnav-level[data-level="1"]::-webkit-scrollbar {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
pn-mainnav-level[data-level="2"] {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
width: 100vw;
|
|
26
|
+
padding: 0;
|
|
27
|
+
background-color: #FFFFFF;
|
|
28
|
+
z-index: 1;
|
|
29
|
+
transform: translateX(100vw);
|
|
30
|
+
transition: transform 0.2s 0s;
|
|
31
|
+
transition-property: transform, visibility;
|
|
32
|
+
overflow: scroll;
|
|
33
|
+
visibility: hidden;
|
|
34
|
+
}
|
|
35
|
+
@media screen and (min-width: 64em) {
|
|
36
|
+
pn-mainnav-level[data-level="2"] {
|
|
37
|
+
left: 0;
|
|
38
|
+
top: calc(100% + 1rem);
|
|
39
|
+
bottom: auto;
|
|
40
|
+
border-radius: 1.6rem;
|
|
41
|
+
width: auto;
|
|
42
|
+
padding: 1.6rem 1.6rem 0 1.6rem;
|
|
43
|
+
-webkit-box-shadow: 0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);
|
|
44
|
+
-moz-box-shadow: 0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);
|
|
45
|
+
box-shadow: 0 0.06rem 0.18rem rgba(0, 0, 0, 0.1), 0 0.32rem 0.72rem rgba(0, 0, 0, 0.13);
|
|
46
|
+
height: auto;
|
|
47
|
+
z-index: 3;
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
pn-mainnav-level[data-level="2"][data-menuitem-rightaligned=true] {
|
|
51
|
+
right: 0;
|
|
52
|
+
left: unset;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
@media screen and (max-height: 33.125em) {
|
|
56
|
+
pn-mainnav-level[data-level="2"] {
|
|
57
|
+
-ms-overflow-style: none;
|
|
58
|
+
scrollbar-width: none;
|
|
59
|
+
}
|
|
60
|
+
pn-mainnav-level[data-level="2"]::-webkit-scrollbar {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
pn-mainnav-level[data-level="2"][aria-hidden=false] {
|
|
65
|
+
transform: translateX(0);
|
|
66
|
+
visibility: visible;
|
|
67
|
+
}
|
|
68
|
+
@media screen and (min-width: 64em) {
|
|
69
|
+
pn-mainnav-level[data-level="2"][aria-hidden=false] {
|
|
70
|
+
display: block;
|
|
71
|
+
overflow: visible;
|
|
72
|
+
}
|
|
73
|
+
pn-mainnav-level[data-level="2"][aria-hidden=false]:not([data-level-listcount="1"]) {
|
|
74
|
+
display: grid;
|
|
75
|
+
grid-template-columns: minmax(12em, 20em) 1fr;
|
|
76
|
+
grid-template-rows: auto auto;
|
|
77
|
+
gap: 0px 1.6rem;
|
|
78
|
+
grid-template-areas: "top top" "left right";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
@media screen and (min-width: 64em) {
|
|
82
|
+
pn-mainnav-level[data-level="2"][data-level-alignment=left] {
|
|
83
|
+
right: 0;
|
|
84
|
+
left: unset;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
@media screen and (min-width: 64em) {
|
|
88
|
+
pn-mainnav-level[data-level="2"][data-level-alignment=center] {
|
|
89
|
+
left: 50%;
|
|
90
|
+
transform: translateX(-50%);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
pn-mainnav-level[data-level="2"] a {
|
|
94
|
+
color: #005D92;
|
|
95
|
+
text-decoration: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mainnav-level-header {
|
|
99
|
+
grid-area: top;
|
|
100
|
+
}
|
|
101
|
+
.mainnav-level-header > label {
|
|
102
|
+
position: absolute;
|
|
103
|
+
width: 0.1rem;
|
|
104
|
+
height: 0.1rem;
|
|
105
|
+
padding: 0;
|
|
106
|
+
margin: -0.1rem;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
clip: rect(0, 0, 0, 0);
|
|
109
|
+
border: 0;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
}
|
|
112
|
+
.mainnav-level-header > button {
|
|
113
|
+
display: block;
|
|
114
|
+
position: relative;
|
|
115
|
+
border: none;
|
|
116
|
+
background-color: transparent;
|
|
117
|
+
color: #005D92;
|
|
118
|
+
padding: 2.4rem 0 2.4rem 6.2rem;
|
|
119
|
+
width: 100%;
|
|
120
|
+
text-align: left;
|
|
121
|
+
}
|
|
122
|
+
@media screen and (min-width: 64em) {
|
|
123
|
+
.mainnav-level-header > button {
|
|
124
|
+
display: none;
|
|
125
|
+
speak: none;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
.mainnav-level-header > button > pn-icon {
|
|
129
|
+
speak: none;
|
|
130
|
+
position: absolute;
|
|
131
|
+
height: 2.4rem;
|
|
132
|
+
width: 2.4rem;
|
|
133
|
+
left: 3rem;
|
|
134
|
+
top: 50%;
|
|
135
|
+
transform: translateY(-50%);
|
|
136
|
+
}
|
|
137
|
+
[data-level="2"] .mainnav-level-header > pn-mainnav-link > a {
|
|
138
|
+
font-size: 2.4rem;
|
|
139
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Component, State, h, Host, Element, Watch } from "@stencil/core";
|
|
2
|
+
import { state, onChange } from "./pn-mainnav-store";
|
|
3
|
+
export class PnMainnavLevel {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.level = 1;
|
|
6
|
+
this.levelId = "";
|
|
7
|
+
this.isOpen = false;
|
|
8
|
+
this.parentName = "";
|
|
9
|
+
this.parentHref = "";
|
|
10
|
+
this.parentLinkId = "";
|
|
11
|
+
this.listCount = 0;
|
|
12
|
+
this.alignment = "right";
|
|
13
|
+
}
|
|
14
|
+
async componentWillLoad() {
|
|
15
|
+
this.listCount = this.hostElement.querySelectorAll(":scope > pn-mainnav-list").length;
|
|
16
|
+
if (this.hostElement.parentElement.tagName.toLowerCase() !== 'nav') {
|
|
17
|
+
this.level = 2;
|
|
18
|
+
}
|
|
19
|
+
if (this.hostElement.parentElement.tagName.toLowerCase() === 'pn-mainnav-link') {
|
|
20
|
+
this.parentName = this.hostElement.parentElement.getAttribute('name') + '';
|
|
21
|
+
this.parentHref = this.hostElement.parentElement.getAttribute('href') + '';
|
|
22
|
+
this.parentLinkId = this.hostElement.parentElement.getAttribute('linkid') + '';
|
|
23
|
+
const parentLinkName = this.parentName.toLowerCase().replace(/\W/gi, '_');
|
|
24
|
+
this.levelId = `mainnav-lvl${this.level}-${parentLinkName}`;
|
|
25
|
+
}
|
|
26
|
+
onChange("openLevel", () => {
|
|
27
|
+
this.onChangeOpenLevel();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
onOpen() {
|
|
31
|
+
if (this.level === 2) {
|
|
32
|
+
requestAnimationFrame(() => {
|
|
33
|
+
const levelClientRect = this.hostElement.getClientRects()[0];
|
|
34
|
+
if (!levelClientRect) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const navElm = this.hostElement.parentElement.parentElement.parentElement.parentElement;
|
|
38
|
+
if (navElm && navElm.tagName.toLowerCase() === "nav") {
|
|
39
|
+
const navClientRect = navElm.getClientRects()[0];
|
|
40
|
+
if (!navClientRect) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (levelClientRect.right > navClientRect.width) {
|
|
44
|
+
const levelParentRect = this.hostElement.parentElement.getClientRects()[0];
|
|
45
|
+
if ((levelParentRect.left - levelClientRect.width) < 0) {
|
|
46
|
+
this.alignment = "center";
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this.alignment = "left";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
onChangeOpenLevel() {
|
|
57
|
+
this.isOpen = state.openLevel === this.levelId;
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
return (h(Host, Object.assign({ role: "navigation" }, ((this.level > 1 && this.levelId) ? { 'aria-hidden': (!this.isOpen) + '' } : {}), { "data-level-listcount": this.listCount + '', "data-level-alignment": this.alignment, "data-level": this.level + '' }, (this.levelId ? { id: this.levelId } : {})),
|
|
61
|
+
(this.level > 1) ? (h("div", { class: "mainnav-level-header" },
|
|
62
|
+
h("label", { htmlFor: this.levelId }, state.i18n.menuGoBackButton),
|
|
63
|
+
h("button", { class: "secondlevel-backbtn", onClick: () => state.openLevel = '', "aria-expanded": (state.openLevel === this.levelId) + '' },
|
|
64
|
+
h("pn-icon", { symbol: "arrow-left", color: "blue700" }),
|
|
65
|
+
state.i18n.menuStartButton),
|
|
66
|
+
(this.parentHref && this.parentName) ? h("pn-mainnav-link", { href: this.parentHref, name: this.parentName, linkid: this.parentLinkId }) : null)) : null,
|
|
67
|
+
h("slot", null),
|
|
68
|
+
h("slot", { name: "additional" }),
|
|
69
|
+
h("slot", { name: "footer" })));
|
|
70
|
+
}
|
|
71
|
+
static get is() { return "pn-mainnav-level"; }
|
|
72
|
+
static get originalStyleUrls() { return {
|
|
73
|
+
"$": ["pn-mainnav-level.scss"]
|
|
74
|
+
}; }
|
|
75
|
+
static get styleUrls() { return {
|
|
76
|
+
"$": ["pn-mainnav-level.css"]
|
|
77
|
+
}; }
|
|
78
|
+
static get states() { return {
|
|
79
|
+
"level": {},
|
|
80
|
+
"levelId": {},
|
|
81
|
+
"isOpen": {},
|
|
82
|
+
"parentName": {},
|
|
83
|
+
"parentHref": {},
|
|
84
|
+
"parentLinkId": {},
|
|
85
|
+
"listCount": {},
|
|
86
|
+
"alignment": {}
|
|
87
|
+
}; }
|
|
88
|
+
static get elementRef() { return "hostElement"; }
|
|
89
|
+
static get watchers() { return [{
|
|
90
|
+
"propName": "isOpen",
|
|
91
|
+
"methodName": "onOpen"
|
|
92
|
+
}]; }
|
|
93
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
pn-mainnav-link {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
pn-mainnav-link button,
|
|
5
|
+
pn-mainnav-link a {
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
position: relative;
|
|
8
|
+
border: 0 none;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
color: #005D92;
|
|
13
|
+
}
|
|
14
|
+
pn-mainnav-link button:hover, pn-mainnav-link button:focus,
|
|
15
|
+
pn-mainnav-link a:hover,
|
|
16
|
+
pn-mainnav-link a:focus {
|
|
17
|
+
background-color: #FFFFFF;
|
|
18
|
+
color: #005D92;
|
|
19
|
+
outline: 0;
|
|
20
|
+
box-shadow: none;
|
|
21
|
+
}
|
|
22
|
+
pn-mainnav-link button:active,
|
|
23
|
+
pn-mainnav-link a:active {
|
|
24
|
+
background-color: #F3F2F2;
|
|
25
|
+
color: #00A0D6;
|
|
26
|
+
box-shadow: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media screen and (min-width: 64em) {
|
|
30
|
+
[data-level="1"] pn-mainnav-link {
|
|
31
|
+
height: 100%;
|
|
32
|
+
padding-left: 0;
|
|
33
|
+
position: relative;
|
|
34
|
+
scroll-snap-align: center;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
[data-level="1"] pn-mainnav-link:first-child {
|
|
38
|
+
border-top: 0.1rem solid #F3F2F2;
|
|
39
|
+
}
|
|
40
|
+
@media screen and (min-width: 64em) {
|
|
41
|
+
[data-level="1"] pn-mainnav-link:first-child {
|
|
42
|
+
border: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
[data-level="1"] pn-mainnav-link > button,
|
|
46
|
+
[data-level="1"] pn-mainnav-link > a {
|
|
47
|
+
font-size: 2rem;
|
|
48
|
+
width: 100%;
|
|
49
|
+
border-bottom: 0.1rem solid #F3F2F2;
|
|
50
|
+
height: auto;
|
|
51
|
+
padding: 1.9rem 0 1.9rem 3rem;
|
|
52
|
+
}
|
|
53
|
+
@media screen and (min-width: 64em) {
|
|
54
|
+
[data-level="1"] pn-mainnav-link > button,
|
|
55
|
+
[data-level="1"] pn-mainnav-link > a {
|
|
56
|
+
height: 100%;
|
|
57
|
+
border: 0;
|
|
58
|
+
font-size: 1.6rem;
|
|
59
|
+
font-weight: normal;
|
|
60
|
+
position: relative;
|
|
61
|
+
outline: 0;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
padding: 1.6rem 1.6rem;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
}
|
|
66
|
+
[data-level="1"] pn-mainnav-link > button::before,
|
|
67
|
+
[data-level="1"] pn-mainnav-link > a::before {
|
|
68
|
+
content: "";
|
|
69
|
+
background-color: #00A0D6;
|
|
70
|
+
position: absolute;
|
|
71
|
+
bottom: 0;
|
|
72
|
+
left: 0;
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 0.5em;
|
|
75
|
+
border-radius: 0.5em 0.5em 0 0;
|
|
76
|
+
transform: translateY(100%);
|
|
77
|
+
transition: transform 0.1s cubic-bezier(0.64, 0.01, 0.67, 0.92);
|
|
78
|
+
}
|
|
79
|
+
[data-level="1"] pn-mainnav-link > button:hover::before, [data-level="1"] pn-mainnav-link > button:focus::before,
|
|
80
|
+
[data-level="1"] pn-mainnav-link > a:hover::before,
|
|
81
|
+
[data-level="1"] pn-mainnav-link > a:focus::before {
|
|
82
|
+
transform: translateY(0);
|
|
83
|
+
}
|
|
84
|
+
[data-level="1"] pn-mainnav-link > button:active,
|
|
85
|
+
[data-level="1"] pn-mainnav-link > a:active {
|
|
86
|
+
outline: 0;
|
|
87
|
+
box-shadow: none;
|
|
88
|
+
color: #005D92;
|
|
89
|
+
}
|
|
90
|
+
[data-level="1"] pn-mainnav-link > button:active::before,
|
|
91
|
+
[data-level="1"] pn-mainnav-link > a:active::before {
|
|
92
|
+
background-color: #8EDDF9;
|
|
93
|
+
transform: translateY(0);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@media screen and (min-width: 64em) {
|
|
97
|
+
[data-level="1"] pn-mainnav-link > button:hover, [data-level="1"] pn-mainnav-link > button:focus,
|
|
98
|
+
[data-level="1"] pn-mainnav-link > a:hover,
|
|
99
|
+
[data-level="1"] pn-mainnav-link > a:focus {
|
|
100
|
+
text-decoration: none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
@media screen and (min-width: 64em) {
|
|
104
|
+
[data-level="1"] pn-mainnav-link > button[aria-expanded=true]::before,
|
|
105
|
+
[data-level="1"] pn-mainnav-link > a[aria-expanded=true]::before {
|
|
106
|
+
content: "";
|
|
107
|
+
background-color: #00A0D6;
|
|
108
|
+
position: absolute;
|
|
109
|
+
bottom: 0;
|
|
110
|
+
left: 0;
|
|
111
|
+
width: 100%;
|
|
112
|
+
height: 0.5em;
|
|
113
|
+
border-radius: 0.5em 0.5em 0 0;
|
|
114
|
+
transform: translateY(0);
|
|
115
|
+
transition: transform 0.1s cubic-bezier(0.64, 0.01, 0.67, 0.92);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
[data-level="1"] pn-mainnav-link [aria-expanded=true] .first-level_icon {
|
|
119
|
+
transform: rotateX(180deg);
|
|
120
|
+
}
|
|
121
|
+
[data-level="1"] pn-mainnav-link pn-icon.first-level_icon {
|
|
122
|
+
transition: 0.25s linear transform;
|
|
123
|
+
width: 1.92rem;
|
|
124
|
+
height: 1.92rem;
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
@media screen and (min-width: 64em) {
|
|
128
|
+
[data-level="1"] pn-mainnav-link pn-icon.first-level_icon {
|
|
129
|
+
display: block;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
[data-level="1"] pn-mainnav-link pn-icon.first-level_arrow {
|
|
133
|
+
display: block;
|
|
134
|
+
position: absolute;
|
|
135
|
+
height: 2.4rem;
|
|
136
|
+
width: 2.4rem;
|
|
137
|
+
right: 2.4rem;
|
|
138
|
+
top: 50%;
|
|
139
|
+
transform: translateY(-50%);
|
|
140
|
+
}
|
|
141
|
+
@media screen and (min-width: 64em) {
|
|
142
|
+
[data-level="1"] pn-mainnav-link pn-icon.first-level_arrow {
|
|
143
|
+
display: none;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
[data-level="1"] pn-mainnav-link pn-icon svg {
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
speak: none;
|
|
149
|
+
width: 100%;
|
|
150
|
+
height: 100%;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@media screen and (min-width: 64em) {
|
|
154
|
+
pn-mainnav-level[data-level="2"]:not([data-level-listcount="1"]) pn-mainnav-list:last-child pn-mainnav-link > a {
|
|
155
|
+
min-width: unset;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
[data-level="2"] pn-mainnav-link {
|
|
159
|
+
position: static;
|
|
160
|
+
display: inline-block;
|
|
161
|
+
width: 100%;
|
|
162
|
+
height: auto;
|
|
163
|
+
}
|
|
164
|
+
@media screen and (min-width: 64em) {
|
|
165
|
+
[data-level="2"] pn-mainnav-link {
|
|
166
|
+
padding-left: 0;
|
|
167
|
+
margin-bottom: 1.6rem;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
[data-level="2"] pn-mainnav-link > a {
|
|
171
|
+
font-size: 1.6rem;
|
|
172
|
+
border-bottom: 0.1rem solid #F3F2F2;
|
|
173
|
+
padding: 2.2rem 0 2.2rem 3rem;
|
|
174
|
+
white-space: normal;
|
|
175
|
+
}
|
|
176
|
+
@media screen and (min-width: 64em) {
|
|
177
|
+
[data-level="2"] pn-mainnav-link > a {
|
|
178
|
+
min-width: 16em;
|
|
179
|
+
border: 0;
|
|
180
|
+
border-radius: 1rem;
|
|
181
|
+
padding: 1.4rem 1.6rem;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
[data-level="2"] pn-mainnav-link > a:hover {
|
|
185
|
+
background-color: #FFFFFF;
|
|
186
|
+
color: #005D92;
|
|
187
|
+
}
|
|
188
|
+
[data-level="2"] pn-mainnav-link > a:hover, [data-level="2"] pn-mainnav-link > a:focus {
|
|
189
|
+
box-shadow: none;
|
|
190
|
+
}
|
|
191
|
+
@media screen and (min-width: 64em) {
|
|
192
|
+
[data-level="2"] pn-mainnav-link > a:hover, [data-level="2"] pn-mainnav-link > a:focus {
|
|
193
|
+
background-color: #F3F2F2;
|
|
194
|
+
color: #005D92;
|
|
195
|
+
text-decoration: underline;
|
|
196
|
+
outline: 0;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
[data-level="2"] pn-mainnav-link > a:hover::before, [data-level="2"] pn-mainnav-link > a:focus::before {
|
|
200
|
+
content: none;
|
|
201
|
+
}
|
|
202
|
+
[data-level="2"] pn-mainnav-link > a:active {
|
|
203
|
+
box-shadow: none;
|
|
204
|
+
}
|
|
205
|
+
@media screen and (min-width: 64em) {
|
|
206
|
+
[data-level="2"] pn-mainnav-link > a:active {
|
|
207
|
+
background-color: #F3F2F2;
|
|
208
|
+
color: #00A0D6;
|
|
209
|
+
outline: 0;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
[data-level="2"] pn-mainnav-link > a:active::before {
|
|
213
|
+
content: none;
|
|
214
|
+
}
|
|
215
|
+
[data-level="2"] pn-mainnav-link pn-icon {
|
|
216
|
+
display: inline-block;
|
|
217
|
+
margin-left: 0.2em;
|
|
218
|
+
min-width: 1.5rem;
|
|
219
|
+
width: 1.5rem;
|
|
220
|
+
height: 1.5rem;
|
|
221
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Component, Prop, h, State, Host, Element } from "@stencil/core";
|
|
2
|
+
import state from "./pn-mainnav-store";
|
|
3
|
+
export class PnMainnavLink {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** Name */
|
|
6
|
+
this.name = "";
|
|
7
|
+
/** Href */
|
|
8
|
+
this.href = "";
|
|
9
|
+
/** Target */
|
|
10
|
+
this.target = "";
|
|
11
|
+
/** Link id */
|
|
12
|
+
this.linkid = "";
|
|
13
|
+
/** Level ID that we control toggle on */
|
|
14
|
+
this.levelId = "";
|
|
15
|
+
/** Menu item is open */
|
|
16
|
+
this.open = false;
|
|
17
|
+
this.hasChildren = false;
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.hasChildren = this.hostElement.querySelectorAll("pn-mainnav-level").length > 0;
|
|
21
|
+
if (this.hasChildren && this.name) {
|
|
22
|
+
const safeLevelName = this.name.toLowerCase().replace(/\W/gi, '_');
|
|
23
|
+
this.levelId = `mainnav-lvl${2}-${safeLevelName}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
setOpenMenuLevel() {
|
|
27
|
+
state.openLevel = (state.openLevel + "" === this.levelId + "") ? '' : this.levelId;
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return (h(Host, { role: "listitem", name: this.name, href: this.href, linkid: this.linkid },
|
|
31
|
+
this.hasChildren ? (h("button", { onClick: this.setOpenMenuLevel.bind(this), "aria-controls": this.levelId, "aria-pressed": "", "aria-expanded": ((state.openLevel + "" === this.levelId + "")) + '' },
|
|
32
|
+
this.name,
|
|
33
|
+
h("pn-icon", { class: "first-level_icon", symbol: "angle-small-down", color: "blue700" }),
|
|
34
|
+
h("pn-icon", { class: "first-level_arrow", symbol: "arrow-right", color: "blue700" }))) : (h("a", Object.assign({ href: this.href }, (this.target ? { target: this.target } : {}), (this.linkid ? { id: this.linkid } : {})),
|
|
35
|
+
this.name,
|
|
36
|
+
this.target === "_blank" ? (h("pn-icon", { symbol: "open-in-new", color: "blue700" })) : null)),
|
|
37
|
+
h("slot", null)));
|
|
38
|
+
}
|
|
39
|
+
static get is() { return "pn-mainnav-link"; }
|
|
40
|
+
static get originalStyleUrls() { return {
|
|
41
|
+
"$": ["pn-mainnav-link.scss"]
|
|
42
|
+
}; }
|
|
43
|
+
static get styleUrls() { return {
|
|
44
|
+
"$": ["pn-mainnav-link.css"]
|
|
45
|
+
}; }
|
|
46
|
+
static get properties() { return {
|
|
47
|
+
"name": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "string",
|
|
52
|
+
"resolved": "string",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": "Name"
|
|
60
|
+
},
|
|
61
|
+
"attribute": "name",
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"defaultValue": "\"\""
|
|
64
|
+
},
|
|
65
|
+
"href": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "string",
|
|
70
|
+
"resolved": "string",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": "Href"
|
|
78
|
+
},
|
|
79
|
+
"attribute": "href",
|
|
80
|
+
"reflect": false,
|
|
81
|
+
"defaultValue": "\"\""
|
|
82
|
+
},
|
|
83
|
+
"target": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "string",
|
|
88
|
+
"resolved": "string",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": "Target"
|
|
96
|
+
},
|
|
97
|
+
"attribute": "target",
|
|
98
|
+
"reflect": false,
|
|
99
|
+
"defaultValue": "\"\""
|
|
100
|
+
},
|
|
101
|
+
"linkid": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"mutable": false,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "string",
|
|
106
|
+
"resolved": "string",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": false,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": "Link id"
|
|
114
|
+
},
|
|
115
|
+
"attribute": "linkid",
|
|
116
|
+
"reflect": false,
|
|
117
|
+
"defaultValue": "\"\""
|
|
118
|
+
}
|
|
119
|
+
}; }
|
|
120
|
+
static get states() { return {
|
|
121
|
+
"levelId": {},
|
|
122
|
+
"open": {},
|
|
123
|
+
"hasChildren": {}
|
|
124
|
+
}; }
|
|
125
|
+
static get elementRef() { return "hostElement"; }
|
|
126
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
pn-mainnav-list {
|
|
2
|
+
display: block;
|
|
3
|
+
overflow: visible;
|
|
4
|
+
list-style: none;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
grid-area: right;
|
|
8
|
+
}
|
|
9
|
+
@media screen and (min-width: 64em) {
|
|
10
|
+
pn-mainnav-list + pn-mainnav-list {
|
|
11
|
+
grid-area: left;
|
|
12
|
+
border-right: 0.1rem solid #D3CECB;
|
|
13
|
+
margin-bottom: 1.6rem;
|
|
14
|
+
margin-right: -0.7rem;
|
|
15
|
+
padding-right: 0.7rem;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
[data-level="1"] > pn-mainnav-list {
|
|
19
|
+
overflow: scroll;
|
|
20
|
+
-webkit-overflow-scrolling: touch;
|
|
21
|
+
}
|
|
22
|
+
@media screen and (min-width: 64em) {
|
|
23
|
+
[data-level="1"] > pn-mainnav-list {
|
|
24
|
+
height: 100%;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-flow: row;
|
|
27
|
+
overflow: visible;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
@media screen and (min-width: 64em) {
|
|
32
|
+
[data-level="2"] > pn-mainnav-list[data-navlist-showcolumns=true] {
|
|
33
|
+
column-count: 2;
|
|
34
|
+
column-gap: 1.6rem;
|
|
35
|
+
padding-bottom: 1.6rem;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.mainnav-list-heading {
|
|
40
|
+
display: none;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
column-span: all;
|
|
43
|
+
font-size: 1.8rem;
|
|
44
|
+
padding: 1.4rem 1.4rem 1.4rem 4.8rem;
|
|
45
|
+
}
|
|
46
|
+
@media screen and (min-width: 64em) {
|
|
47
|
+
.mainnav-list-heading {
|
|
48
|
+
display: block;
|
|
49
|
+
padding: 0 1.4rem 1.4rem 1.4rem;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Component, h, Host, State, Element, Prop } from "@stencil/core";
|
|
2
|
+
export class PnMainnavList {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.heading = "";
|
|
5
|
+
this.linkCount = 0;
|
|
6
|
+
}
|
|
7
|
+
componentWillLoad() {
|
|
8
|
+
this.linkCount = this.hostElement.querySelectorAll(":scope > pn-mainnav-link").length;
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h(Host, { class: "mainnav-list", role: "list", "data-navlist-itemcount": this.linkCount + '', "data-navlist-showcolumns": (this.linkCount >= 8) + '' },
|
|
12
|
+
(this.heading) ? h("div", { class: "mainnav-list-heading" }, this.heading) : null,
|
|
13
|
+
h("slot", null)));
|
|
14
|
+
}
|
|
15
|
+
static get is() { return "pn-mainnav-list"; }
|
|
16
|
+
static get originalStyleUrls() { return {
|
|
17
|
+
"$": ["pn-mainnav-list.scss"]
|
|
18
|
+
}; }
|
|
19
|
+
static get styleUrls() { return {
|
|
20
|
+
"$": ["pn-mainnav-list.css"]
|
|
21
|
+
}; }
|
|
22
|
+
static get properties() { return {
|
|
23
|
+
"heading": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"mutable": false,
|
|
26
|
+
"complexType": {
|
|
27
|
+
"original": "string",
|
|
28
|
+
"resolved": "string",
|
|
29
|
+
"references": {}
|
|
30
|
+
},
|
|
31
|
+
"required": false,
|
|
32
|
+
"optional": false,
|
|
33
|
+
"docs": {
|
|
34
|
+
"tags": [],
|
|
35
|
+
"text": ""
|
|
36
|
+
},
|
|
37
|
+
"attribute": "heading",
|
|
38
|
+
"reflect": false,
|
|
39
|
+
"defaultValue": "\"\""
|
|
40
|
+
}
|
|
41
|
+
}; }
|
|
42
|
+
static get states() { return {
|
|
43
|
+
"linkCount": {}
|
|
44
|
+
}; }
|
|
45
|
+
static get elementRef() { return "hostElement"; }
|
|
46
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createStore } from "@stencil/store";
|
|
2
|
+
// Read more about how stencil stores work here: https://stenciljs.com/docs/stencil-store
|
|
3
|
+
const { state, onChange } = createStore({
|
|
4
|
+
openLevel: '',
|
|
5
|
+
openMenu: false,
|
|
6
|
+
i18n: {
|
|
7
|
+
menuHomeButton: '',
|
|
8
|
+
menuGoBackButton: '',
|
|
9
|
+
mainMenuButton: '',
|
|
10
|
+
menuStartButton: ''
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export { state, onChange };
|
|
14
|
+
export default state;
|