@asante-org/atlascopco-vt-litesitegenerator 3.0.19 → 3.0.21
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/dist/index.esm.js +187 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.scss +476 -80
- package/dist/index.js +190 -47
- package/dist/index.js.map +1 -1
- package/dist/index.scss +476 -80
- package/dist/lsg-clientlib.css +2106 -0
- package/dist/lsg-clientlib.css.map +1 -0
- package/dist/lsg-clientlib.js +524 -0
- package/dist/lsg-clientlib.js.map +1 -0
- package/dist/src/components/lsg/LsgBanner/LsgBanner.d.ts +30 -2
- package/dist/src/components/lsg/LsgBanner/LsgBanner.stories.d.ts +9 -2
- package/dist/src/components/lsg/LsgBanner/index.d.ts +1 -1
- package/dist/src/components/lsg/LsgBreadcrumb/LsgBreadcrumb.d.ts +20 -0
- package/dist/src/components/lsg/LsgBreadcrumb/LsgBreadcrumb.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgBreadcrumb/index.d.ts +2 -0
- package/dist/src/components/lsg/index.d.ts +3 -1
- package/dist/src/index.d.ts +5 -5
- package/dist/src/themes/createThemeComponents.d.ts +1 -0
- package/dist/src/themes/theme-1/components.d.ts +2 -1
- package/dist/src/themes/theme-2/components.d.ts +2 -1
- package/dist/src/themes/theme-3/components.d.ts +2 -1
- package/dist/themes/theme-1.css +570 -40
- package/dist/themes/theme-1.css.map +1 -1
- package/dist/themes/theme-2.css +645 -40
- package/dist/themes/theme-2.css.map +1 -1
- package/dist/themes/theme-3.css +679 -40
- package/dist/themes/theme-3.css.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/utils/styles/base.scss","../src/components/lsg/lsg-tokens.scss","../src/components/lsg/LsgButton/LsgButton.scss","../src/components/lsg/LsgBanner/LsgBanner.scss","../src/components/lsg/LsgCard/LsgCard.scss","../src/components/lsg/LsgLogo/LsgLogo.scss","../src/components/lsg/LsgNavigation/LsgNavigation.scss","../src/components/lsg/LsgLanguageSwitcher/LsgLanguageSwitcher.scss","../src/components/lsg/LsgSearchTrigger/LsgSearchTrigger.scss","../src/components/lsg/LsgSearchOverlay/LsgSearchOverlay.scss","../src/components/lsg/LsgHeader/LsgHeader.scss","../src/components/lsg/LsgQuickLinks/LsgQuickLinks.scss","../src/components/lsg/LsgSocialMediaIcons/LsgSocialMediaIcons.scss","../src/components/lsg/LsgFooter/LsgFooter.scss","../src/components/lsg/LsgContainerPolicies/LsgContainerPolicies.scss","../src/components/lsg/LsgAiBanner/LsgAiBanner.scss","../src/components/lsg/LsgAccordion/LsgAccordion.scss","../src/components/lsg/lsg.scss"],"names":[],"mappings":"AA2HA;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;;;ACjMF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EAIA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EAGA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACxJF;EACE;EACA;EACA;EACA,KFmEW;EElEX;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;EACA;;AAKF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAkBJ;EAEE;EACA;EACA;;;AChEJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AC7DJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA,SJ4CS;EI3CT,KJyCS;;AItCX;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA,aJoBS;EInBT;;;AAKJ;EACE;EACA;EACA,KJaW;EIZX;EACA;EACA;;;AChEF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AClBJ;EACE;EACA;EACA;AAAA;AAAA;AAAA;AAAA;;AAMA;EAEE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EAEE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAKF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAGE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;;AAKN;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAKN;EACE;IACE;;;ACjMJ;EACE;EACA;;AAEA;EACE;EACA;EACA,KPgES;EO/DT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAOF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;;AAGF;EACE;EACA;;;AC5FN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;;AC3BJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA,STiDS;EShDT;;AAGF;EACE;EACA;EACA,KTwCS;ESvCT;EACA,gBTsCS;;ASnCX;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,STSS;;ASPT;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;ACtGN;EACE;IACE;IACA;;EAGF;IACE;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EAIA;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAGF;EAIE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;;AAGF;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKN;EACE;;AAEA;EAGE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAIF;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;;AAKA;EACE;;AAKF;EACE;;;AAKN;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;IACE;IACA;IACA;;EAEA;IACE;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;IACA;;EAEA;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAIJ;IAIE;;EAGF;IACE;;EAGF;IACE;IACA;;EAGF;IACE;IACA;;EAGF;IACE;;EAGF;IACE;IACA;;EAGF;IACE;IACA;;EAGF;IACE;IACA;;EAGF;IACE;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAIA;IACE;;EAEA;IAEE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;IAGE;IACA;;EAIJ;IACE;IACA;;EAEA;IACE;IACA;;EAKF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;IAEE;;EAIJ;IACE;;EAKN;IACE;IACA;IACA;IACA;IACA;;EAGF;AAAA;IAEE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAEA;IACE;IACA;;EAKN;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;IACE;IACA;IACA;;EAIJ;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;IACE;IACA;;EAIJ;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;;EAGF;IACE;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAGF;IAME;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;IACE;IACA;IACA;;EAGF;IAEE;IACA;IACA;;EAIJ;IACE;IACA;IACA;;EAIJ;IACE;;EAEA;IACE;IACA;IACA;;;ACnpBJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA,KXuDS;;AWhDX;EACE;EACA;EACA;EACA;;AAEA;EAEE;EACA;;AAGF;EACE;;;ACpCN;EACE;EACA;EACA,KZqEW;EYpEX;EACA;EACA;;AAMA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;;ACvCN;EACE;EACA;EACA;EACA;;AAGE;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,Kb0DO;;AaxDP;EAVF;IAWI;IACA;IACA;IACA;IACA;;;AAIJ;EACE;EACA;EACA;;AAEA;EALF;IAMI;IACA;IACA;IACA,ebuCK;;;AanCT;EACE;EACA;EACA;EACA;;AAEA;EANF;IAOI;;;AAIJ;EACE;;AAEA;EAHF;IAII;IACA;IACA;IACA;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EAdF;IAeI;IACA;IACA;;;AAMJ;EACE;EACA;EACA,SbXQ;EaYR;EACA;EACA,KbdQ;;AagBR;EARF;IASI;IACA,KbpBK;IaqBL;;;AAIJ;EACE;EACA;EACA,abjCQ;;AamCR;EACE;EACA;;AAGF;EACE;;AAGF;EAdF;IAeI;;;AAIJ;EACE;EACA;EACA,Kb7CQ;;Aa+CR;EALF;IAMI;IACA,KbnDK;;EaoDL;IAA8B;;EAC9B;IAA8B;;;AAIlC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA,KbzEO;Ea0EP;EACA,eb1EO;;Aa4EP;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA,KbrGO;;AawGT;EACE;EACA;EACA,Kb3GO;Ea4GP;EACA;EACA;;AAEA;EACE;EACA;;AAGF;AAAA;EAEE;EACA;EACA;;AAGF;EACE;;AAIJ;EACE;EACA;EACA;;AAIA;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAEA;EALF;IAMI,SbrKK;;;Aa0KX;EACE;EACA;EACA;EACA;;;AChOJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAMA;EACE;EACA;;;AAMF;EACE;EACA;EACA,gBdwBS;;;AcnBX;EACE;EACA;EACA,gBdgBS;;;AcTX;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAMxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAGxE;EAAwE;;;AAMxE;EACE;EACA;EACA;;;AAKF;EACE;EACA;EACA;;;AAUF;EACE;EACA;;;AAKF;EACE;EACA;;;AAKF;EACE;EACA;;;AAKF;EACE;EACA;;;AAKF;EACE;EACA;;;AAKF;EACE;EACA;;;AAKF;EACE;EACA;;;AC3LJ;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;;ACnDN;EACE;EACA;EACA;;AAGA;EACE;EACA;EACA;;AAGA;EACE;;AAKJ;EACE;;AAEA;EACE;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA,KhBqCS;EgBpCT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAGA;EAAI;;AAAyB;EAAe;;AAC5C;EAAS;EAAqC;;AAC9C;EAAI;;AACJ;EAAM;EAAiB;;AAKvB;EACE;;AAEF;EACE;;AhBjBJ;EgBuBE;IACE;;EAGF;IACE;;;;AC/GN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAuCF;AAAA;EAjCE,aAkBE;EAjBF,WAmCE;EAlCF,aAeE;EAdF,aAmCE;;AjB0BF;EiB/BF;AAAA;IA3BI,WA+BA;IA9BA,aAgCA;;;;AAIJ;AAAA;EA3CE,aAkBE;EAjBF,WA6CE;EA5CF,aAeE;EAdF,aA6CE;;AjBgBF;EiBrBF;AAAA;IArCI,WAyCA;IAxCA,aA0CA;;;;AAIJ;AAAA;EArDE,aAkBE;EAjBF,WAuDE;EAtDF,aAeE;EAdF,aAuDE;;AjBMF;EiBXF;AAAA;IA/CI,WAmDA;IAlDA,aAoDA;;;;AAIJ;AAAA;EA/DE,aAkBE;EAjBF,WAiEE;EAhEF,aAeE;EAdF,aAiEE;;AjBJF;EiBDF;AAAA;IAzDI,WA6DA;IA5DA,aA8DA;;;;AAIJ;AAAA;EAzEE,aAkBE;EAjBF,WA2EE;EA1EF,aAeE;EAdF,aA2EE;;AjBdF;EiBSF;AAAA;IAnEI,WAuEA;IAtEA,aAwEA;;;;AAIJ;AAAA;EAnFE,aAkBE;EAjBF,WAqFE;EApFF,aAeE;EAdF,aAqFE;;AjBxBF;EiBmBF;AAAA;IA7EI,WAiFA;IAhFA,aAkFA;;;;AAIJ;EA7FE,aA6BE;EA5BF,WA8FE;EA7FF,aAiGE;EAhGF,aA8FE;;AjBjCF;EiB6BF;IAvFI,WA0FA;IAzFA,aA2FA;;;;AAKJ;AAAA;AAAA;AAAA;EAvGE,aA6BE;EA5BF,WA2GE;EA1GF,aAoBqG;EAnBrG,aA2GE;;AjB9CF;EiBuCF;AAAA;AAAA;AAAA;IAjGI,WAuGA;IAtGA,aAwGA;;;;AAIJ;EAnHE,aAkBE;EAjBF,WAoHE;EAnHF,aAeE;EAdF,aAoHE;;AjBvDF;EiBmDF;IA7GI,WAgHA;IA/GA,aAiHA;;;;AAIJ;EA5HE,aAkBE;EAjBF,WA6HE;EA5HF,aAeE;EAdF,aA6HE;;AjBhEF;EiB4DF;IAtHI,WAyHA;IAxHA,aA0HA;;;;AAIJ;EArIE,aAkBE;EAjBF,WAsIE;EArIF,aAeE;EAdF,aAsIE;;AjBzEF;EiBqEF;IA/HI,WAkIA;IAjIA,aAmIA;;;;AAIJ;EA9IE,aAkBE;EAjBF,WA+IE;EA9IF,aAeE;EAdF,aA+IE;;AjBlFF;EiB8EF;IAxII,WA2IA;IA1IA,aA4IA;;;;AAKF;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;;;AAKF;AAAA;AAAA;EAGE;;AAGF;AAAA;AAAA;AAAA;AAAA;EAKE","file":"lsg-clientlib.css"}
|
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/******************************************************************************
|
|
5
|
+
Copyright (c) Microsoft Corporation.
|
|
6
|
+
|
|
7
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
+
purpose with or without fee is hereby granted.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
12
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
14
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
16
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
+
***************************************************************************** */
|
|
18
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
function __spreadArray(to, from, pack) {
|
|
22
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
23
|
+
if (ar || !(i in from)) {
|
|
24
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
25
|
+
ar[i] = from[i];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
32
|
+
var e = new Error(message);
|
|
33
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var LSG_ICON_PATHS = {
|
|
37
|
+
bars: "M96 160C96 142.3 110.3 128 128 128L512 128C529.7 128 544 142.3 544 160C544 177.7 529.7 192 512 192L128 192C110.3 192 96 177.7 96 160zM96 320C96 302.3 110.3 288 128 288L512 288C529.7 288 544 302.3 544 320C544 337.7 529.7 352 512 352L128 352C110.3 352 96 337.7 96 320zM544 480C544 497.7 529.7 512 512 512L128 512C110.3 512 96 497.7 96 480C96 462.3 110.3 448 128 448L512 448C529.7 448 544 462.3 544 480z",
|
|
38
|
+
chevronLeft: "M169.4 297.4C156.9 309.9 156.9 330.2 169.4 342.7L361.4 534.7C373.9 547.2 394.2 547.2 406.7 534.7C419.2 522.2 419.2 501.9 406.7 489.4L237.3 320L406.6 150.6C419.1 138.1 419.1 117.8 406.6 105.3C394.1 92.8 373.8 92.8 361.3 105.3L169.3 297.3z",
|
|
39
|
+
chevronRight: "M471.1 297.4C483.6 309.9 483.6 330.2 471.1 342.7L279.1 534.7C266.6 547.2 246.3 547.2 233.8 534.7C221.3 522.2 221.3 501.9 233.8 489.4L403.2 320L233.9 150.6C221.4 138.1 221.4 117.8 233.9 105.3C246.4 92.8 266.7 92.8 279.2 105.3L471.2 297.3z",
|
|
40
|
+
close: "M504.6 148.5C515.9 134.9 514.1 114.7 500.5 103.4C486.9 92.1 466.7 93.9 455.4 107.5L320 270L184.6 107.5C173.3 93.9 153.1 92.1 139.5 103.4C125.9 114.7 124.1 134.9 135.4 148.5L278.3 320L135.4 491.5C124.1 505.1 125.9 525.3 139.5 536.6C153.1 547.9 173.3 546.1 184.6 532.5L320 370L455.4 532.5C466.7 546.1 486.9 547.9 500.5 536.6C514.1 525.3 515.9 505.1 504.6 491.5L361.7 320L504.6 148.5z",
|
|
41
|
+
globe: "M367.2 477C345.7 520.7 325.8 528 320 528C314.2 528 294.3 520.7 272.8 477C255.8 442.5 243.6 395.4 240.7 344L399.3 344C396.3 395.5 384.1 442.6 367.2 477zM399.3 296L240.7 296C243.7 244.5 255.9 197.4 272.8 163C294.3 119.3 314.2 112 320 112C325.8 112 345.7 119.3 367.2 163C384.2 197.5 396.4 244.6 399.3 296zM447.4 344L526.6 344C518 418.6 469.9 481.3 403.8 510.4C427.8 467.6 444.1 408 447.4 344zM526.6 296L447.4 296C444.1 232 427.8 172.4 403.8 129.6C469.9 158.8 518 221.4 526.6 296zM192.6 296L113.4 296C122 221.4 170.1 158.7 236.2 129.6C212.2 172.4 195.9 232 192.6 296zM113.4 344L192.6 344C195.9 408 212.2 467.6 236.2 510.4C170.1 481.2 122 418.6 113.4 344zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576z",
|
|
42
|
+
home: "M96 320L320 128L544 320H480V528H352V384H288V528H160V320H96z",
|
|
43
|
+
search: "M480 272C480 317.9 465.1 360.3 440 394.7L566.6 521.4C579.1 533.9 579.1 554.2 566.6 566.7C554.1 579.2 533.8 579.2 521.3 566.7L394.7 440C360.3 465.1 317.9 480 272 480C157.1 480 64 386.9 64 272C64 157.1 157.1 64 272 64C386.9 64 480 157.1 480 272zM272 416C351.5 416 416 351.5 416 272C416 192.5 351.5 128 272 128C192.5 128 128 192.5 128 272C128 351.5 192.5 416 272 416z",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var LANGUAGE_SWITCHER_SELECTOR = "[data-lsg-lang-switcher]";
|
|
47
|
+
var SEARCH_TRIGGER_SELECTOR = "[data-lsg-search-trigger]";
|
|
48
|
+
var SEARCH_OVERLAY_SELECTOR = "[data-lsg-search-overlay]";
|
|
49
|
+
var MENU_TRIGGER_SELECTOR = "[data-lsg-menu-trigger], .lsg-header__menu-trigger";
|
|
50
|
+
var MOBILE_MEDIA_QUERY = "(max-width: 767px)";
|
|
51
|
+
var createIconSvg = function (name, className) {
|
|
52
|
+
return "<svg class=\"".concat(className, "\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 640\" aria-hidden=\"true\" focusable=\"false\"><path d=\"").concat(LSG_ICON_PATHS[name], "\" /></svg>");
|
|
53
|
+
};
|
|
54
|
+
var hasSvgIcon = function (element) { return Boolean(element === null || element === void 0 ? void 0 : element.querySelector("svg")); };
|
|
55
|
+
function buildNavTree(header) {
|
|
56
|
+
var megaPanel = header.querySelector(".lsg-header__mega-panel");
|
|
57
|
+
if (megaPanel) {
|
|
58
|
+
var topCol = megaPanel.querySelector(".lsg-header__mega-inner > ul.lsg-header__mega-column");
|
|
59
|
+
if (topCol)
|
|
60
|
+
return parseMegaColumn(topCol);
|
|
61
|
+
}
|
|
62
|
+
var navList = header.querySelector(".lsg-header__nav .lsg-nav__list");
|
|
63
|
+
if (navList)
|
|
64
|
+
return parseNavList(navList);
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
function parseMegaColumn(ul) {
|
|
68
|
+
return Array.from(ul.children).map(function (li) {
|
|
69
|
+
var _a, _b, _c;
|
|
70
|
+
var link = li.querySelector(":scope > a.lsg-header__mega-link");
|
|
71
|
+
var childUl = li.querySelector(":scope > ul.lsg-header__mega-column");
|
|
72
|
+
var label = "";
|
|
73
|
+
if (link) {
|
|
74
|
+
var textSpan = link.querySelector('span:not([class*="lsg-header__icon"])');
|
|
75
|
+
label = (_b = (_a = (textSpan !== null && textSpan !== void 0 ? textSpan : link).textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : "";
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
label: label,
|
|
79
|
+
href: (_c = link === null || link === void 0 ? void 0 : link.getAttribute("href")) !== null && _c !== void 0 ? _c : "#",
|
|
80
|
+
current: li.classList.contains("lsg-header__mega-item--active"),
|
|
81
|
+
children: childUl ? parseMegaColumn(childUl) : [],
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function parseNavList(ul) {
|
|
86
|
+
return Array.from(ul.children).map(function (li) {
|
|
87
|
+
var _a, _b, _c, _d;
|
|
88
|
+
var link = li.querySelector(":scope > a.lsg-nav__link");
|
|
89
|
+
var dropdown = li.querySelector(":scope > ul.lsg-nav__dropdown");
|
|
90
|
+
var p = link === null || link === void 0 ? void 0 : link.querySelector("p");
|
|
91
|
+
return {
|
|
92
|
+
label: (_c = (_b = (_a = (p !== null && p !== void 0 ? p : link)) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : "",
|
|
93
|
+
href: (_d = link === null || link === void 0 ? void 0 : link.getAttribute("href")) !== null && _d !== void 0 ? _d : "#",
|
|
94
|
+
current: li.classList.contains("lsg-nav__item--current"),
|
|
95
|
+
children: dropdown ? parseNavList(dropdown) : [],
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function renderMobilePanel(panel, nodes, path, onDrill) {
|
|
100
|
+
panel.innerHTML = "";
|
|
101
|
+
if (path.length > 0) {
|
|
102
|
+
panel.appendChild(renderMobileBreadcrumb(path, onDrill));
|
|
103
|
+
}
|
|
104
|
+
panel.appendChild(renderMobileList(nodes, path, onDrill));
|
|
105
|
+
}
|
|
106
|
+
function renderMobileBreadcrumb(path, onDrill) {
|
|
107
|
+
var nav = document.createElement("nav");
|
|
108
|
+
nav.className = "lsg-header__breadcrumb";
|
|
109
|
+
nav.setAttribute("aria-label", "Breadcrumb");
|
|
110
|
+
var homeBtn = document.createElement("button");
|
|
111
|
+
homeBtn.type = "button";
|
|
112
|
+
homeBtn.className = "lsg-header__breadcrumb-home";
|
|
113
|
+
homeBtn.setAttribute("aria-label", "Back to top-level menu");
|
|
114
|
+
homeBtn.innerHTML = createIconSvg("home", "lsg-header__icon lsg-header__icon--home");
|
|
115
|
+
homeBtn.addEventListener("click", function () { return onDrill([]); });
|
|
116
|
+
nav.appendChild(homeBtn);
|
|
117
|
+
path.forEach(function (node, index) {
|
|
118
|
+
var sep = document.createElement("span");
|
|
119
|
+
sep.setAttribute("aria-hidden", "true");
|
|
120
|
+
sep.innerHTML = createIconSvg("chevronRight", "lsg-header__icon lsg-header__icon--chevronRight");
|
|
121
|
+
nav.appendChild(sep);
|
|
122
|
+
var isCurrent = index === path.length - 1;
|
|
123
|
+
var isMiddle = index > 0 && !isCurrent;
|
|
124
|
+
var btn = document.createElement("button");
|
|
125
|
+
btn.type = "button";
|
|
126
|
+
btn.className = isCurrent
|
|
127
|
+
? "lsg-header__breadcrumb-current"
|
|
128
|
+
: [
|
|
129
|
+
"lsg-header__breadcrumb-ancestor",
|
|
130
|
+
isMiddle ? "lsg-header__breadcrumb-ancestor--ellipsis" : "",
|
|
131
|
+
]
|
|
132
|
+
.filter(Boolean)
|
|
133
|
+
.join(" ");
|
|
134
|
+
if (isMiddle) {
|
|
135
|
+
btn.textContent = "\u2026";
|
|
136
|
+
btn.setAttribute("aria-label", node.label);
|
|
137
|
+
btn.setAttribute("title", node.label);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
btn.textContent = node.label;
|
|
141
|
+
}
|
|
142
|
+
if (!isCurrent) {
|
|
143
|
+
var depth_1 = index + 1;
|
|
144
|
+
btn.addEventListener("click", function () { return onDrill(path.slice(0, depth_1)); });
|
|
145
|
+
}
|
|
146
|
+
nav.appendChild(btn);
|
|
147
|
+
});
|
|
148
|
+
return nav;
|
|
149
|
+
}
|
|
150
|
+
function renderMobileList(nodes, path, onDrill) {
|
|
151
|
+
var ul = document.createElement("ul");
|
|
152
|
+
ul.className = "lsg-header__mobile-list";
|
|
153
|
+
ul.setAttribute("role", "list");
|
|
154
|
+
nodes.forEach(function (node) {
|
|
155
|
+
var hasChildren = node.children.length > 0;
|
|
156
|
+
var li = document.createElement("li");
|
|
157
|
+
li.className = [
|
|
158
|
+
"lsg-header__mobile-item",
|
|
159
|
+
hasChildren ? "lsg-header__mobile-item--has-children" : "",
|
|
160
|
+
node.current ? "lsg-header__mobile-item--active" : "",
|
|
161
|
+
]
|
|
162
|
+
.filter(Boolean)
|
|
163
|
+
.join(" ");
|
|
164
|
+
var a = document.createElement("a");
|
|
165
|
+
a.className = "lsg-header__mobile-link";
|
|
166
|
+
a.href = node.href;
|
|
167
|
+
a.innerHTML =
|
|
168
|
+
"<span>".concat(escHtml(node.label), "</span>") +
|
|
169
|
+
(hasChildren
|
|
170
|
+
? createIconSvg("chevronRight", "lsg-header__icon lsg-header__icon--chevronRight")
|
|
171
|
+
: "");
|
|
172
|
+
if (hasChildren) {
|
|
173
|
+
a.addEventListener("click", function (event) {
|
|
174
|
+
event.preventDefault();
|
|
175
|
+
onDrill(__spreadArray(__spreadArray([], path, true), [node], false));
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
li.appendChild(a);
|
|
179
|
+
ul.appendChild(li);
|
|
180
|
+
});
|
|
181
|
+
return ul;
|
|
182
|
+
}
|
|
183
|
+
function escHtml(str) {
|
|
184
|
+
return str
|
|
185
|
+
.replace(/&/g, "&")
|
|
186
|
+
.replace(/</g, "<")
|
|
187
|
+
.replace(/>/g, ">")
|
|
188
|
+
.replace(/"/g, """);
|
|
189
|
+
}
|
|
190
|
+
function hydrateStaticIcons(root) {
|
|
191
|
+
root.document.querySelectorAll(".lsg-nav__chevron").forEach(function (chevron) {
|
|
192
|
+
if (!hasSvgIcon(chevron)) {
|
|
193
|
+
chevron.innerHTML = createIconSvg("chevronRight", "lsg-nav__chevron-svg");
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
root.document
|
|
197
|
+
.querySelectorAll(".lsg-lang-switcher__trigger")
|
|
198
|
+
.forEach(function (trigger) {
|
|
199
|
+
if (!trigger.querySelector(".lsg-lang-switcher__globe")) {
|
|
200
|
+
trigger.insertAdjacentHTML("afterbegin", createIconSvg("globe", "lsg-lang-switcher__globe"));
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
function initLangSwitchers(root) {
|
|
205
|
+
var switchers = root.document.querySelectorAll(LANGUAGE_SWITCHER_SELECTOR);
|
|
206
|
+
switchers.forEach(function (switcher) {
|
|
207
|
+
var trigger = switcher.querySelector(".lsg-lang-switcher__trigger");
|
|
208
|
+
var dropdown = switcher.querySelector(".lsg-lang-switcher__dropdown");
|
|
209
|
+
if (!trigger || !dropdown) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
var open = function () {
|
|
213
|
+
trigger.setAttribute("aria-expanded", "true");
|
|
214
|
+
dropdown.removeAttribute("hidden");
|
|
215
|
+
};
|
|
216
|
+
var close = function () {
|
|
217
|
+
trigger.setAttribute("aria-expanded", "false");
|
|
218
|
+
dropdown.setAttribute("hidden", "");
|
|
219
|
+
};
|
|
220
|
+
close();
|
|
221
|
+
trigger.addEventListener("click", function () {
|
|
222
|
+
var expanded = trigger.getAttribute("aria-expanded") === "true";
|
|
223
|
+
if (expanded) {
|
|
224
|
+
close();
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
open();
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
root.document.addEventListener("click", function (event) {
|
|
231
|
+
if (!switcher.contains(event.target)) {
|
|
232
|
+
close();
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
root.document.addEventListener("keydown", function (event) {
|
|
236
|
+
if (event.key === "Escape") {
|
|
237
|
+
close();
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
function initSearchOverlay(root) {
|
|
243
|
+
var triggers = root.document.querySelectorAll(SEARCH_TRIGGER_SELECTOR);
|
|
244
|
+
var overlays = root.document.querySelectorAll(SEARCH_OVERLAY_SELECTOR);
|
|
245
|
+
if (!triggers.length || !overlays.length) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
var openOverlay = function (overlay) {
|
|
249
|
+
overlay.classList.add("lsg-search-overlay--open");
|
|
250
|
+
var input = overlay.querySelector(".lsg-search-overlay__input");
|
|
251
|
+
input === null || input === void 0 ? void 0 : input.focus();
|
|
252
|
+
};
|
|
253
|
+
var closeOverlay = function (overlay) {
|
|
254
|
+
overlay.classList.remove("lsg-search-overlay--open");
|
|
255
|
+
};
|
|
256
|
+
triggers.forEach(function (trigger) {
|
|
257
|
+
trigger.addEventListener("click", function () {
|
|
258
|
+
var targetId = trigger.getAttribute("aria-controls");
|
|
259
|
+
var target = targetId
|
|
260
|
+
? root.document.getElementById(targetId)
|
|
261
|
+
: overlays[0];
|
|
262
|
+
if (target) {
|
|
263
|
+
openOverlay(target);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
overlays.forEach(function (overlay) {
|
|
268
|
+
var closeBtn = overlay.querySelector(".lsg-search-overlay__close");
|
|
269
|
+
closeBtn === null || closeBtn === void 0 ? void 0 : closeBtn.addEventListener("click", function () { return closeOverlay(overlay); });
|
|
270
|
+
var backdrop = overlay.querySelector(".lsg-search-overlay__backdrop");
|
|
271
|
+
backdrop === null || backdrop === void 0 ? void 0 : backdrop.addEventListener("click", function () { return closeOverlay(overlay); });
|
|
272
|
+
});
|
|
273
|
+
root.document.addEventListener("mousedown", function (event) {
|
|
274
|
+
overlays.forEach(function (overlay) {
|
|
275
|
+
if (!overlay.classList.contains("lsg-search-overlay--open")) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
var panel = overlay.querySelector(".lsg-search-overlay__panel");
|
|
279
|
+
var clickedTrigger = Array.from(triggers).some(function (trigger) {
|
|
280
|
+
return trigger.contains(event.target);
|
|
281
|
+
});
|
|
282
|
+
if (!clickedTrigger && panel && !panel.contains(event.target)) {
|
|
283
|
+
closeOverlay(overlay);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
root.document.addEventListener("keydown", function (event) {
|
|
288
|
+
if (event.key === "Escape") {
|
|
289
|
+
overlays.forEach(function (overlay) { return closeOverlay(overlay); });
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function setMenuTriggerIcon(trigger, open) {
|
|
294
|
+
var icon = trigger.querySelector(".lsg-header__icon");
|
|
295
|
+
var path = icon === null || icon === void 0 ? void 0 : icon.querySelector("path");
|
|
296
|
+
if (path) {
|
|
297
|
+
path.setAttribute("d", open ? LSG_ICON_PATHS.close : LSG_ICON_PATHS.bars);
|
|
298
|
+
}
|
|
299
|
+
else if (icon) {
|
|
300
|
+
icon.innerHTML = createIconSvg(open ? "close" : "bars", "lsg-header__icon-svg");
|
|
301
|
+
}
|
|
302
|
+
var label = Array.from(trigger.children).find(function (child) { return !child.classList.contains("lsg-header__icon"); });
|
|
303
|
+
if (label) {
|
|
304
|
+
label.textContent = open ? "CLOSE" : "MENU";
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function clearMegaMenuBranch(scope) {
|
|
308
|
+
if (scope instanceof HTMLElement) {
|
|
309
|
+
scope.classList.remove("lsg-header__mega-item--open");
|
|
310
|
+
scope.classList.remove("lsg-header__mega-column--open");
|
|
311
|
+
}
|
|
312
|
+
scope.querySelectorAll(".lsg-header__mega-item--open").forEach(function (item) {
|
|
313
|
+
item.classList.remove("lsg-header__mega-item--open");
|
|
314
|
+
});
|
|
315
|
+
scope.querySelectorAll(".lsg-header__mega-column--open").forEach(function (column) {
|
|
316
|
+
column.classList.remove("lsg-header__mega-column--open");
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
function activateMegaMenuItem(item) {
|
|
320
|
+
var _a;
|
|
321
|
+
var parentColumn = item.parentElement;
|
|
322
|
+
if (parentColumn) {
|
|
323
|
+
Array.from(parentColumn.children).forEach(function (openItem) {
|
|
324
|
+
if (openItem !== item) {
|
|
325
|
+
clearMegaMenuBranch(openItem);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
item.classList.add("lsg-header__mega-item--open");
|
|
330
|
+
(_a = item
|
|
331
|
+
.querySelector(":scope > .lsg-header__mega-column")) === null || _a === void 0 ? void 0 : _a.classList.add("lsg-header__mega-column--open");
|
|
332
|
+
}
|
|
333
|
+
function initHeaders(root) {
|
|
334
|
+
var isMobile = function () { return root.matchMedia(MOBILE_MEDIA_QUERY).matches; };
|
|
335
|
+
root.document.querySelectorAll(".lsg-header").forEach(function (header) {
|
|
336
|
+
var explicitMenuTriggers = header.querySelectorAll(MENU_TRIGGER_SELECTOR);
|
|
337
|
+
var inferredMobileMenuTriggers = header.querySelectorAll(".lsg-header__mobile-actions .lsg-header__icon-button[aria-expanded]");
|
|
338
|
+
var menuTriggers = Array.from(new Set(__spreadArray(__spreadArray([], Array.from(explicitMenuTriggers), true), Array.from(inferredMobileMenuTriggers), true)));
|
|
339
|
+
var mobilePanel = header.querySelector("#lsg-mobile-panel, .lsg-header__mobile-panel");
|
|
340
|
+
var navTree = mobilePanel ? buildNavTree(header) : [];
|
|
341
|
+
var setMobileLevel = function (n) {
|
|
342
|
+
header.className =
|
|
343
|
+
header.className.replace(/lsg-header--mobile-level-\d+/g, "").trim() +
|
|
344
|
+
" lsg-header--mobile-level-".concat(n);
|
|
345
|
+
};
|
|
346
|
+
var drillTo = function (newPath) {
|
|
347
|
+
var nodes = newPath.length === 0 ? navTree : newPath[newPath.length - 1].children;
|
|
348
|
+
renderMobilePanel(mobilePanel, nodes, newPath, drillTo);
|
|
349
|
+
setMobileLevel(newPath.length + 1);
|
|
350
|
+
};
|
|
351
|
+
var setMenuOpen = function (open) {
|
|
352
|
+
header.classList.toggle("lsg-header--menu-open", open);
|
|
353
|
+
if (open) {
|
|
354
|
+
if (mobilePanel) {
|
|
355
|
+
drillTo([]);
|
|
356
|
+
mobilePanel.removeAttribute("hidden");
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
clearMegaMenuBranch(header);
|
|
361
|
+
if (mobilePanel) {
|
|
362
|
+
mobilePanel.setAttribute("hidden", "");
|
|
363
|
+
setMobileLevel(0);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
menuTriggers.forEach(function (trigger) {
|
|
367
|
+
trigger.setAttribute("aria-expanded", String(open));
|
|
368
|
+
trigger.setAttribute("aria-label", open ? "Close menu" : "Open menu");
|
|
369
|
+
setMenuTriggerIcon(trigger, open);
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
var closeDropdownItems = function (scope) {
|
|
373
|
+
if (scope === void 0) { scope = header; }
|
|
374
|
+
scope.querySelectorAll(".lsg-nav__item--open").forEach(function (openItem) {
|
|
375
|
+
var _a;
|
|
376
|
+
openItem.classList.remove("lsg-nav__item--open");
|
|
377
|
+
(_a = openItem
|
|
378
|
+
.querySelector(":scope > .lsg-nav__link")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-expanded", "false");
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
setMenuOpen(false);
|
|
382
|
+
menuTriggers.forEach(function (trigger) {
|
|
383
|
+
trigger.addEventListener("click", function () {
|
|
384
|
+
setMenuOpen(!header.classList.contains("lsg-header--menu-open"));
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
header.querySelectorAll(".lsg-header__mega-item--has-children").forEach(function (item) {
|
|
388
|
+
item.addEventListener("mouseenter", function () {
|
|
389
|
+
if (!isMobile()) {
|
|
390
|
+
activateMegaMenuItem(item);
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
item.addEventListener("focusin", function () {
|
|
394
|
+
if (!isMobile()) {
|
|
395
|
+
activateMegaMenuItem(item);
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
header
|
|
400
|
+
.querySelectorAll(".lsg-nav--dropdown .lsg-nav__item--has-children")
|
|
401
|
+
.forEach(function (item) {
|
|
402
|
+
var link = item.querySelector(":scope > .lsg-nav__link");
|
|
403
|
+
if (!link) {
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
var setItemOpen = function (open) {
|
|
407
|
+
var _a;
|
|
408
|
+
(_a = item.parentElement) === null || _a === void 0 ? void 0 : _a.querySelectorAll(":scope > .lsg-nav__item--open").forEach(function (openItem) {
|
|
409
|
+
var _a;
|
|
410
|
+
if (openItem !== item) {
|
|
411
|
+
openItem.classList.remove("lsg-nav__item--open");
|
|
412
|
+
(_a = openItem
|
|
413
|
+
.querySelector(":scope > .lsg-nav__link")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-expanded", "false");
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
item.classList.toggle("lsg-nav__item--open", open);
|
|
417
|
+
link.setAttribute("aria-expanded", String(open));
|
|
418
|
+
};
|
|
419
|
+
item.addEventListener("mouseenter", function () {
|
|
420
|
+
if (!isMobile()) {
|
|
421
|
+
setItemOpen(true);
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
item.addEventListener("mouseleave", function () {
|
|
425
|
+
if (!isMobile()) {
|
|
426
|
+
setItemOpen(false);
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
link.addEventListener("click", function (event) {
|
|
430
|
+
var isMobilePanelLink = Boolean(link.closest(".lsg-header__mobile-panel"));
|
|
431
|
+
if (!isMobile() && !isMobilePanelLink) {
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
event.preventDefault();
|
|
435
|
+
setItemOpen(!item.classList.contains("lsg-nav__item--open"));
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
root.document.addEventListener("mousedown", function (event) {
|
|
439
|
+
if (!header.contains(event.target)) {
|
|
440
|
+
setMenuOpen(false);
|
|
441
|
+
closeDropdownItems();
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
function bootLsgAccordion(root) {
|
|
447
|
+
if (root === void 0) { root = window; }
|
|
448
|
+
root.document.querySelectorAll("[data-lsg-accordion]").forEach(function (accordion) {
|
|
449
|
+
var allowMultiple = accordion.hasAttribute("data-lsg-accordion-multi");
|
|
450
|
+
accordion.querySelectorAll("[data-lsg-accordion-header]").forEach(function (header) {
|
|
451
|
+
header.addEventListener("click", function () {
|
|
452
|
+
var _a, _b;
|
|
453
|
+
var item = header.closest("[data-lsg-accordion-item]");
|
|
454
|
+
if (!item)
|
|
455
|
+
return;
|
|
456
|
+
var panelId = header.getAttribute("aria-controls");
|
|
457
|
+
var panel = panelId ? root.document.getElementById(panelId) : null;
|
|
458
|
+
if (!panel)
|
|
459
|
+
return;
|
|
460
|
+
var isOpen = item.classList.contains("lsg-accordion__item--open");
|
|
461
|
+
if (!allowMultiple) {
|
|
462
|
+
accordion.querySelectorAll("[data-lsg-accordion-item]").forEach(function (otherItem) {
|
|
463
|
+
var _a;
|
|
464
|
+
if (otherItem === item)
|
|
465
|
+
return;
|
|
466
|
+
var otherHeader = otherItem.querySelector("[data-lsg-accordion-header]");
|
|
467
|
+
var otherPanelId = otherHeader === null || otherHeader === void 0 ? void 0 : otherHeader.getAttribute("aria-controls");
|
|
468
|
+
var otherPanel = otherPanelId ? root.document.getElementById(otherPanelId) : null;
|
|
469
|
+
otherItem.classList.remove("lsg-accordion__item--open");
|
|
470
|
+
otherPanel === null || otherPanel === void 0 ? void 0 : otherPanel.classList.remove("lsg-accordion__panel--open");
|
|
471
|
+
otherHeader === null || otherHeader === void 0 ? void 0 : otherHeader.setAttribute("aria-expanded", "false");
|
|
472
|
+
(_a = otherHeader === null || otherHeader === void 0 ? void 0 : otherHeader.querySelector("[data-lsg-accordion-icon]")) === null || _a === void 0 ? void 0 : _a.classList.remove("lsg-accordion__icon--open");
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
if (!isOpen) {
|
|
476
|
+
item.classList.add("lsg-accordion__item--open");
|
|
477
|
+
panel.classList.add("lsg-accordion__panel--open");
|
|
478
|
+
header.setAttribute("aria-expanded", "true");
|
|
479
|
+
(_a = header.querySelector("[data-lsg-accordion-icon]")) === null || _a === void 0 ? void 0 : _a.classList.add("lsg-accordion__icon--open");
|
|
480
|
+
}
|
|
481
|
+
else if (allowMultiple) {
|
|
482
|
+
item.classList.remove("lsg-accordion__item--open");
|
|
483
|
+
panel.classList.remove("lsg-accordion__panel--open");
|
|
484
|
+
header.setAttribute("aria-expanded", "false");
|
|
485
|
+
(_b = header.querySelector("[data-lsg-accordion-icon]")) === null || _b === void 0 ? void 0 : _b.classList.remove("lsg-accordion__icon--open");
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
function bootLsgClientlib(themeName, root) {
|
|
492
|
+
if (root === void 0) { root = window; }
|
|
493
|
+
var init = function () {
|
|
494
|
+
root.document.documentElement.dataset.lsgTheme = themeName;
|
|
495
|
+
hydrateStaticIcons(root);
|
|
496
|
+
initHeaders(root);
|
|
497
|
+
initLangSwitchers(root);
|
|
498
|
+
initSearchOverlay(root);
|
|
499
|
+
bootLsgAccordion(root);
|
|
500
|
+
};
|
|
501
|
+
if (root.document.readyState === "loading") {
|
|
502
|
+
root.document.addEventListener("DOMContentLoaded", init, { once: true });
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
init();
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* lsg-clientlib.ts — Lite Site Generator clientlib JS
|
|
510
|
+
*
|
|
511
|
+
* Minimal vanilla JS for components that require interactivity when used in
|
|
512
|
+
* AEM clientlib-only mode (i.e. AEM renders the HTML, React is NOT hydrating).
|
|
513
|
+
*
|
|
514
|
+
* For hydrated usage these behaviours are handled by React component state.
|
|
515
|
+
*
|
|
516
|
+
* AEM setup:
|
|
517
|
+
* 1. Build: `npm run build:lsg-clientlib-js`
|
|
518
|
+
* 2. Copy dist/lsg-clientlib.js to your AEM clientlib folder.
|
|
519
|
+
* 3. Add to your clientlib `js.txt`.
|
|
520
|
+
*/
|
|
521
|
+
bootLsgClientlib("theme-1");
|
|
522
|
+
|
|
523
|
+
})();
|
|
524
|
+
//# sourceMappingURL=lsg-clientlib.js.map
|