@triptease/tt-navbar 0.0.47 → 0.0.48

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @triptease/tt-navbar v0.0.47
2
+ * @triptease/tt-navbar v0.0.48
3
3
  */
4
4
 
5
5
  // src/urlMappings.ts
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent tt-navbar following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "tt-navbar",
6
- "version": "0.0.47",
6
+ "version": "0.0.48",
7
7
  "type": "module",
8
8
  "main": "dist/src/index.js",
9
9
  "module": "dist/src/index.js",
package/src/TtNavbar.ts CHANGED
@@ -186,7 +186,11 @@ export class TtNavbar extends LitElement {
186
186
  NavbarStateCookieClosedValue,
187
187
  } = Config;
188
188
 
189
- document.cookie = `${NavbarStateCookieName}=${this.isOpen ? NavbarStateCookieOpenValue : NavbarStateCookieClosedValue}; path=/; max-age=31536000`;
189
+ const domain = window.location.hostname.endsWith('.triptease.io')
190
+ ? 'domain=.triptease.io'
191
+ : '';
192
+
193
+ document.cookie = `${NavbarStateCookieName}=${this.isOpen ? NavbarStateCookieOpenValue : NavbarStateCookieClosedValue}; path=/; max-age=31536000; ${domain}`;
190
194
  };
191
195
 
192
196
  private handleDetailsToggle = (e: ToggleEvent) => {