@naturalcycles/internal-web-lib 1.6.1 → 1.7.1
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/bundle/analyticsClient.js +137 -137
- package/bundle/analyticsClient.js.map +1 -1
- package/bundle/conversionClient.js +28 -28
- package/bundle/conversionClient.js.map +1 -1
- package/bundle/cookieMonster.js +86 -76
- package/bundle/cookieMonster.js.map +1 -1
- package/dist/cookie-monster/components/setting-dropdown/setting-dropdown.component.js +1 -1
- package/dist/cookie-monster/components/themed-button/themed-button.component.js +1 -1
- package/dist/cookie-monster/consent/consent.service.js +1 -1
- package/dist/cookie-monster/cookie-monster-element.d.ts +2 -2
- package/dist/cookie-monster/cookie-monster-element.js +9 -5
- package/dist/cookie-monster/cookieMonsterService.d.ts +3 -0
- package/dist/cookie-monster/cookieMonsterService.js +12 -4
- package/dist/cookie-monster/css/variants.js +3 -0
- package/dist/cookie-monster/index.js +2 -2
- package/dist/cookie-monster/types/CookieMonster.types.d.ts +5 -0
- package/dist/cookie-monster/types/CookieMonster.types.js +6 -1
- package/dist/cookie-monster/views/settings.view.js +1 -2
- package/dist/cookie-monster/views/views.js +1 -1
- package/package.json +1 -1
- package/dist/cookie-monster/icons/back.js +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// src/cookie-monster/components/setting-dropdown/setting-dropdown.component.css?inline
|
|
2
|
-
var setting_dropdown_component_default = ".CookieMonster__dropdown {\n padding: 16px 0;\n display: grid;\n grid-template-columns: max-content 1fr;\n align-items: center;\n border-bottom: 1px solid var(--color-ink-300);\n}\n\n:host(:last-of-type) .CookieMonster__dropdown {\n border-bottom: none;\n}\n\n.CookieMonster__icon {\n width: 24px;\n height: 24px;\n margin-right: 4px;\n}\n\n.CookieMonster__icon___expanded {\n transform: rotate(180deg);\n}\n\n.CookieMonster__dropdownHeading {\n color: var(--color-ink-1000);\n font-size: 16px;\n font-weight:
|
|
2
|
+
var setting_dropdown_component_default = ".CookieMonster__dropdown {\n padding: 16px 0;\n display: grid;\n grid-template-columns: max-content 1fr;\n align-items: center;\n border-bottom: 1px solid var(--color-ink-300);\n}\n\n:host(:last-of-type) .CookieMonster__dropdown {\n border-bottom: none;\n}\n\n.CookieMonster__icon {\n width: 24px;\n height: 24px;\n margin-right: 4px;\n transition: transform var(--cm-icon-transition-duration) ease;\n}\n\n.CookieMonster__icon___expanded {\n transform: rotate(180deg);\n}\n\n.CookieMonster__dropdownHeading {\n color: var(--color-ink-1000);\n font-size: 16px;\n font-weight: var(--cm-heading-weight);\n align-self: center;\n letter-spacing: var(--cm-heading-spacing);\n}\n\n.CookieMonster__dropdownContent {\n font-size: 14px;\n padding-top: 16px;\n grid-column: 1 / span 2;\n color: var(--color-ink-600);\n overflow-y: auto;\n}\n\n.CookieMonster__dropdownButton {\n background-color: transparent;\n border: none;\n display: flex;\n\n cursor: pointer;\n}\n\n.CookieMonster__dropdownLabel {\n font-size: 14px;\n color: var(--color-ink-600);\n justify-self: end;\n}\n\ninput[type='checkbox'] {\n appearance: none;\n -webkit-appearance: none;\n position: relative;\n width: 18px;\n height: 18px;\n justify-self: end;\n border: 2px solid var(--cm-accent);\n border-radius: 2px;\n cursor: pointer;\n transition:\n background-color var(--cm-checkbox-transition-duration) ease,\n border-color var(--cm-checkbox-transition-duration) ease;\n}\n\ninput[type='checkbox']::after {\n content: var(--cm-checkbox-mark);\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n font-size: 14px;\n background: var(--cm-checkbox-mark-image) center / contain no-repeat;\n opacity: 0;\n transition: opacity var(--cm-checkbox-transition-duration) ease;\n}\n\ninput[type='checkbox']:checked::after {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .CookieMonster__icon,\n input[type='checkbox'],\n input[type='checkbox']::after {\n transition: none;\n }\n}\n\ninput[type='checkbox']:checked:not(:disabled) {\n background-color: var(--cm-accent);\n border-color: var(--cm-accent);\n}\n\ninput[type='checkbox']:checked:disabled {\n background-color: var(--color-ink-400);\n border-color: var(--color-ink-400);\n}\n\n.CookieMonster__alwaysOnGroup {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n}\n\n::slotted(a) {\n color: var(--color-neue-blue-500);\n}\n";
|
|
3
3
|
export { setting_dropdown_component_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// src/cookie-monster/components/themed-button/themed-button.component.css?inline
|
|
2
|
-
var themed_button_component_default = ".CookieMonster__button {\n font-size: 14px;\n font-style: normal;\n line-height: 100%;\n background-color: transparent;\n border: none;\n border-radius: 28px;\n padding: 8px 16px;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n}\n\n.CookieMonster__button___primary {\n border: 1px solid var(--
|
|
2
|
+
var themed_button_component_default = ".CookieMonster__button {\n font-size: 14px;\n font-style: normal;\n line-height: 100%;\n background-color: transparent;\n border: none;\n border-radius: 28px;\n padding: 8px 16px;\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n}\n\n.CookieMonster__button___primary {\n border: 1px solid var(--cm-accent);\n background-color: var(--cm-accent);\n color: var(--color-white-1000);\n}\n\n.CookieMonster__button___secondary {\n border: 1px solid var(--cm-accent);\n color: var(--cm-accent);\n}\n";
|
|
3
3
|
export { themed_button_component_default as default };
|
|
@@ -22,7 +22,7 @@ var ConsentService = class {
|
|
|
22
22
|
this.domain = options?.domain;
|
|
23
23
|
if (this.isGpcActive()) this.persistConsent({ ...DEFAULT_OPT_OUT_CONSENT }, options?.domain, void 0);
|
|
24
24
|
globalThis.addEventListener(CookieMonsterEvent.cookieMonsterOnClose, this.handleClose);
|
|
25
|
-
if (!consentLogStorageService.readConsentCookie()) CookieMonsterElement.open({ language: options?.language });
|
|
25
|
+
if (!consentLogStorageService.readConsentCookie()) CookieMonsterElement.open({ language: options?.language }, options?.variant);
|
|
26
26
|
}
|
|
27
27
|
/** Undoes initConsent(). */
|
|
28
28
|
teardownConsent() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './views/main.view.js';
|
|
2
|
-
import { CookieMonsterView } from './types/CookieMonster.types.js';
|
|
2
|
+
import { CookieMonsterVariant, CookieMonsterView } from './types/CookieMonster.types.js';
|
|
3
3
|
export interface OpenCookieMonsterOptions {
|
|
4
4
|
/** Which view to show. Defaults to whatever view CookieMonster was last in. */
|
|
5
5
|
view?: CookieMonsterView;
|
|
@@ -15,7 +15,7 @@ export declare class CookieMonsterElement extends HTMLElement {
|
|
|
15
15
|
* Creates and appends the element if needed, then shows it. Static so consent.service.ts can
|
|
16
16
|
* also call it without a module cycle through cookieMonsterService.ts.
|
|
17
17
|
*/
|
|
18
|
-
static open(options?: OpenCookieMonsterOptions): void;
|
|
18
|
+
static open(options?: OpenCookieMonsterOptions, variant?: CookieMonsterVariant): void;
|
|
19
19
|
static close(): void;
|
|
20
20
|
private static getOrCreate;
|
|
21
21
|
constructor();
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { createStyles, generalSheet, paletteSheet } from "./css/shared-sheets.js";
|
|
2
|
-
import
|
|
2
|
+
import variants_default from "./css/variants.js";
|
|
3
|
+
import { CookieMonsterEvent, CookieMonsterVariant, CookieMonsterView } from "./types/CookieMonster.types.js";
|
|
3
4
|
import { getCookieMonsterEvent } from "./utils/getCookieMonsterEvent.js";
|
|
4
5
|
import { setLanguage } from "./utils/translationsService.js";
|
|
5
6
|
import views_default from "./views/views.js";
|
|
6
7
|
import { isServerSide } from "@naturalcycles/js-lib";
|
|
7
8
|
import { langService } from "@naturalcycles/shared";
|
|
8
9
|
// src/cookie-monster/cookie-monster-element.ts
|
|
10
|
+
var variantsStyleSheet = createStyles(variants_default);
|
|
9
11
|
var viewsStyleSheet = createStyles(views_default);
|
|
10
12
|
var CookieMonsterElement = class CookieMonsterElement extends HTMLElement {
|
|
11
13
|
root;
|
|
@@ -17,13 +19,13 @@ var CookieMonsterElement = class CookieMonsterElement extends HTMLElement {
|
|
|
17
19
|
* Creates and appends the element if needed, then shows it. Static so consent.service.ts can
|
|
18
20
|
* also call it without a module cycle through cookieMonsterService.ts.
|
|
19
21
|
*/
|
|
20
|
-
static open(options) {
|
|
22
|
+
static open(options, variant = CookieMonsterVariant.Default) {
|
|
21
23
|
if (isServerSide()) return;
|
|
22
24
|
if (document.readyState === "loading") {
|
|
23
|
-
document.addEventListener("DOMContentLoaded", () => CookieMonsterElement.open(options), { once: true });
|
|
25
|
+
document.addEventListener("DOMContentLoaded", () => CookieMonsterElement.open(options, variant), { once: true });
|
|
24
26
|
return;
|
|
25
27
|
}
|
|
26
|
-
const element = CookieMonsterElement.getOrCreate(options?.language);
|
|
28
|
+
const element = CookieMonsterElement.getOrCreate(options?.language, variant);
|
|
27
29
|
if (options?.view === CookieMonsterView.settings) element.showSettings();
|
|
28
30
|
else if (options?.view === CookieMonsterView.banner) element.showBanner();
|
|
29
31
|
element.setAttribute("display", "true");
|
|
@@ -32,9 +34,10 @@ var CookieMonsterElement = class CookieMonsterElement extends HTMLElement {
|
|
|
32
34
|
if (isServerSide()) return;
|
|
33
35
|
document.querySelector("cookie-monster")?.setAttribute("display", "false");
|
|
34
36
|
}
|
|
35
|
-
static getOrCreate(language) {
|
|
37
|
+
static getOrCreate(language, variant) {
|
|
36
38
|
let element = document.querySelector("cookie-monster");
|
|
37
39
|
element ||= document.createElement("cookie-monster");
|
|
40
|
+
element.setAttribute("variant", variant);
|
|
38
41
|
if (language) element.setAttribute("language", language);
|
|
39
42
|
if (!element.isConnected) document.body.append(element);
|
|
40
43
|
return element;
|
|
@@ -45,6 +48,7 @@ var CookieMonsterElement = class CookieMonsterElement extends HTMLElement {
|
|
|
45
48
|
this.root = this.attachShadow({ mode: "open" });
|
|
46
49
|
this.root.adoptedStyleSheets = [
|
|
47
50
|
paletteSheet,
|
|
51
|
+
variantsStyleSheet,
|
|
48
52
|
generalSheet,
|
|
49
53
|
viewsStyleSheet
|
|
50
54
|
];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { OpenCookieMonsterOptions } from './cookie-monster-element.js';
|
|
2
|
+
import { CookieMonsterVariant } from './types/CookieMonster.types.js';
|
|
2
3
|
import type { ConsentLogEntry, CookieMonsterConsent, RegisterCookieMonsterOptions } from './types/CookieMonster.types.js';
|
|
3
4
|
export type { OpenCookieMonsterOptions } from './cookie-monster-element.js';
|
|
4
5
|
declare class CookieMonsterService {
|
|
6
|
+
variant: CookieMonsterVariant;
|
|
5
7
|
register(options?: RegisterCookieMonsterOptions): void;
|
|
6
8
|
/**
|
|
7
9
|
* Undoes register. The custom elements stay defined, since the platform offers no way to
|
|
@@ -15,5 +17,6 @@ declare class CookieMonsterService {
|
|
|
15
17
|
getConsent(): CookieMonsterConsent | undefined;
|
|
16
18
|
getConsentLog(): ConsentLogEntry[] | undefined;
|
|
17
19
|
getCookieMonsterVersion(): string | undefined;
|
|
20
|
+
private toKnownVariant;
|
|
18
21
|
}
|
|
19
22
|
export declare const cookieMonsterService: CookieMonsterService;
|
|
@@ -2,19 +2,24 @@ import { SettingDropdown } from "./components/setting-dropdown/setting-dropdown2
|
|
|
2
2
|
import { ThemedButton } from "./components/themed-button/themed-button2.component.js";
|
|
3
3
|
import { consentService } from "./consent/consent.service.js";
|
|
4
4
|
import { CookieMonsterElement } from "./cookie-monster-element.js";
|
|
5
|
-
import { CookieMonsterView } from "./types/CookieMonster.types.js";
|
|
5
|
+
import { CookieMonsterVariant, CookieMonsterView } from "./types/CookieMonster.types.js";
|
|
6
6
|
import { MainViewElement } from "./views/main.view.js";
|
|
7
7
|
import { SettingsViewElement } from "./views/settings.view.js";
|
|
8
8
|
// src/cookie-monster/cookieMonsterService.ts
|
|
9
9
|
var CookieMonsterService = class {
|
|
10
|
+
variant = CookieMonsterVariant.Default;
|
|
10
11
|
register(options) {
|
|
12
|
+
this.variant = this.toKnownVariant(options?.variant);
|
|
11
13
|
defineElementOnce("cookie-monster", CookieMonsterElement);
|
|
12
14
|
defineElementOnce("main-view", MainViewElement);
|
|
13
15
|
defineElementOnce("settings-view", SettingsViewElement);
|
|
14
16
|
defineElementOnce("setting-dropdown", SettingDropdown);
|
|
15
17
|
defineElementOnce("themed-button", ThemedButton);
|
|
16
18
|
consentService.setVersionProvider(getCookieMonsterVersion);
|
|
17
|
-
consentService.initConsent(
|
|
19
|
+
consentService.initConsent({
|
|
20
|
+
...options,
|
|
21
|
+
variant: this.variant
|
|
22
|
+
});
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* Undoes register. The custom elements stay defined, since the platform offers no way to
|
|
@@ -24,11 +29,11 @@ var CookieMonsterService = class {
|
|
|
24
29
|
consentService.teardownConsent();
|
|
25
30
|
}
|
|
26
31
|
open(options) {
|
|
27
|
-
CookieMonsterElement.open(options);
|
|
32
|
+
CookieMonsterElement.open(options, this.variant);
|
|
28
33
|
}
|
|
29
34
|
/** Opens CookieMonster directly into the settings view for the Cookie Policy page. */
|
|
30
35
|
openSettings() {
|
|
31
|
-
CookieMonsterElement.open({ view: CookieMonsterView.settings });
|
|
36
|
+
CookieMonsterElement.open({ view: CookieMonsterView.settings }, this.variant);
|
|
32
37
|
}
|
|
33
38
|
close() {
|
|
34
39
|
CookieMonsterElement.close();
|
|
@@ -42,6 +47,9 @@ var CookieMonsterService = class {
|
|
|
42
47
|
getCookieMonsterVersion() {
|
|
43
48
|
return getCookieMonsterVersion();
|
|
44
49
|
}
|
|
50
|
+
toKnownVariant(variant) {
|
|
51
|
+
return variant && Object.values(CookieMonsterVariant).includes(variant) ? variant : CookieMonsterVariant.Default;
|
|
52
|
+
}
|
|
45
53
|
};
|
|
46
54
|
/**
|
|
47
55
|
* CookieMonster's own package version, used to tag consent log entries with the
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/cookie-monster/css/variants.css?inline
|
|
2
|
+
var variants_default = "/* Custom properties inherit through shadow roots, so the nested components read these too */\n\n:host {\n --cm-accent: var(--color-purple-500);\n --cm-heading-weight: 800;\n --cm-heading-spacing: normal;\n --cm-title-spacing: normal;\n --cm-checkbox-mark: '✓';\n --cm-checkbox-mark-image: none;\n --cm-back-icon: url(\"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.38381%208.25519C1.41634%208.33382%201.46457%208.40749%201.52849%208.4714L6.19515%2013.1381C6.4555%2013.3984%206.87761%2013.3984%207.13796%2013.1381C7.39831%2012.8777%207.39831%2012.4556%207.13796%2012.1953L3.60937%208.66666L13.9999%208.66667C14.3681%208.66667%2014.6666%208.36819%2014.6666%208C14.6666%207.63181%2014.3681%207.33333%2013.9999%207.33333L3.60937%207.33333L7.13796%203.80473C7.39831%203.54439%207.39831%203.12228%207.13796%202.86193C6.87761%202.60158%206.4555%202.60158%206.19515%202.86193L1.52849%207.52859C1.39988%207.6572%201.3348%207.82529%201.33325%207.99384'%20fill='%2372035D'/%3e%3cpath%20d='M1.38381%208.25519C1.35195%208.17837%201.33405%208.0943%201.33325%208.00615L1.38381%208.25519Z'%20fill='%2372035D'/%3e%3c/svg%3e\");\n --cm-icon-transition-duration: 0s;\n --cm-checkbox-transition-duration: 0s;\n}\n\n:host([variant='r1b2']) {\n --cm-accent: var(--color-purple-1000);\n --cm-heading-weight: 500;\n --cm-heading-spacing: -0.48px;\n --cm-title-spacing: -0.54px;\n --cm-checkbox-mark: '';\n --cm-checkbox-mark-image: url(\"data:image/svg+xml,%3csvg%20width='21'%20height='20'%20viewBox='0%200%2021%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.16683%2010.8334L8.00016%2015.8334L19.0098%204.16669'%20stroke='%23FFF'%20stroke-width='3'%20/%3e%3c/svg%3e\");\n --cm-back-icon: url(\"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.38381%208.25519C1.41634%208.33382%201.46457%208.40749%201.52849%208.4714L6.19515%2013.1381C6.4555%2013.3984%206.87761%2013.3984%207.13796%2013.1381C7.39831%2012.8777%207.39831%2012.4556%207.13796%2012.1953L3.60937%208.66666L13.9999%208.66667C14.3681%208.66667%2014.6666%208.36819%2014.6666%208C14.6666%207.63181%2014.3681%207.33333%2013.9999%207.33333L3.60937%207.33333L7.13796%203.80473C7.39831%203.54439%207.39831%203.12228%207.13796%202.86193C6.87761%202.60158%206.4555%202.60158%206.19515%202.86193L1.52849%207.52859C1.39988%207.6572%201.3348%207.82529%201.33325%207.99384'%20fill='%23310629'/%3e%3cpath%20d='M1.38381%208.25519C1.35195%208.17837%201.33405%208.0943%201.33325%208.00615L1.38381%208.25519Z'%20fill='%23310629'/%3e%3c/svg%3e\");\n --cm-icon-transition-duration: 150ms;\n --cm-checkbox-transition-duration: 200ms;\n}\n";
|
|
3
|
+
export { variants_default as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { cookieMonsterService } from "./cookieMonsterService.js";
|
|
2
|
-
import { ConsentSource, CookieMonsterDropdownDetail, CookieMonsterEvent, CookieMonsterEventReason, CookieMonsterView } from "./types/CookieMonster.types.js";
|
|
3
|
-
export { ConsentSource, CookieMonsterDropdownDetail, CookieMonsterEvent, CookieMonsterEventReason, CookieMonsterView, cookieMonsterService };
|
|
2
|
+
import { ConsentSource, CookieMonsterDropdownDetail, CookieMonsterEvent, CookieMonsterEventReason, CookieMonsterVariant, CookieMonsterView } from "./types/CookieMonster.types.js";
|
|
3
|
+
export { ConsentSource, CookieMonsterDropdownDetail, CookieMonsterEvent, CookieMonsterEventReason, CookieMonsterVariant, CookieMonsterView, cookieMonsterService };
|
|
@@ -37,6 +37,10 @@ export interface ConsentLogEntry {
|
|
|
37
37
|
version?: string;
|
|
38
38
|
text?: string;
|
|
39
39
|
}
|
|
40
|
+
export declare enum CookieMonsterVariant {
|
|
41
|
+
Default = "default",
|
|
42
|
+
R1B2 = "r1b2"
|
|
43
|
+
}
|
|
40
44
|
export interface RegisterCookieMonsterOptions {
|
|
41
45
|
/**
|
|
42
46
|
* `Domain` attribute for the `CookieConsent` cookie, e.g. `.naturalcycles.com` to share it
|
|
@@ -44,6 +48,7 @@ export interface RegisterCookieMonsterOptions {
|
|
|
44
48
|
*/
|
|
45
49
|
domain?: string;
|
|
46
50
|
language?: string;
|
|
51
|
+
variant?: CookieMonsterVariant;
|
|
47
52
|
}
|
|
48
53
|
export interface CookieMonsterReasonDetail {
|
|
49
54
|
reason: CookieMonsterEventReason;
|
|
@@ -30,4 +30,9 @@ var ConsentSource = /* @__PURE__ */ function(ConsentSource) {
|
|
|
30
30
|
ConsentSource["gpc"] = "gpc";
|
|
31
31
|
return ConsentSource;
|
|
32
32
|
}({});
|
|
33
|
-
|
|
33
|
+
var CookieMonsterVariant = /* @__PURE__ */ function(CookieMonsterVariant) {
|
|
34
|
+
CookieMonsterVariant["Default"] = "default";
|
|
35
|
+
CookieMonsterVariant["R1B2"] = "r1b2";
|
|
36
|
+
return CookieMonsterVariant;
|
|
37
|
+
}({});
|
|
38
|
+
export { ConsentSource, CookieMonsterDropdownDetail, CookieMonsterEvent, CookieMonsterEventReason, CookieMonsterVariant, CookieMonsterView };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createStyles, paletteSheet } from "../css/shared-sheets.js";
|
|
2
|
-
import back_default from "../icons/back.js";
|
|
3
2
|
import { ConsentSource, CookieMonsterDropdownDetail, CookieMonsterEvent, CookieMonsterEventReason } from "../types/CookieMonster.types.js";
|
|
4
3
|
import { getCookieMonsterEvent } from "../utils/getCookieMonsterEvent.js";
|
|
5
4
|
import { createRootClickHandler } from "../utils/handleRootClick.js";
|
|
@@ -36,7 +35,7 @@ var SettingsViewElement = class extends HTMLElement {
|
|
|
36
35
|
${tr("button-cookies-settings-save")}
|
|
37
36
|
</themed-button>
|
|
38
37
|
<themed-button uid="settings-back" data-action="back" theme="secondary">
|
|
39
|
-
<
|
|
38
|
+
<span class="CookieMonster__backIcon" aria-hidden="true"></span>${tr("button-back")}
|
|
40
39
|
</themed-button>
|
|
41
40
|
</div>
|
|
42
41
|
`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// src/cookie-monster/views/views.css?inline
|
|
2
|
-
var views_default = "/* ========== OVERLAY ========== */\n\n.CookieMonster__overlay {\n position: fixed;\n inset: 0;\n background-color: rgba(26, 26, 26, 0.8);\n z-index: 9999998;\n}\n\n/* ========== BANNER MAIN ========== */\n\n.CookieMonster__mainBanner {\n padding: 32px 16px 24px 16px;\n background-color: var(--color-white-1000);\n border-radius: 16px 16px 0 0;\n border: 1px solid var(--color-ink-300);\n box-shadow: 0px 10px 24px 0px rgba(26, 26, 26, 0.16);\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 9999999;\n overflow: hidden;\n\n @media only screen and (min-width: 768px) {\n border-radius: 16px;\n width: 375px;\n left: 50%;\n right: auto;\n top: 50%;\n bottom: auto;\n transform: translate(-50%, -50%);\n }\n}\n\n.CookieMonster__mainBanner[data-state='settings'] {\n max-height: 90vh; /*This is to allow the settings to expand vertically when cookie options are open*/\n height: auto;\n}\n\n/* ========== BANNER CONTENT ========== */\n\n.CookieMonster__bannerContent {\n display: grid;\n}\n\n.CookieMonster__mainBanner[data-state='settings'] .CookieMonster__bannerContent {\n display: none;\n}\n\n/* ========== SETTINGS ========== */\n\nsettings-view {\n display: none;\n}\n\n.CookieMonster__settingsContent {\n padding: 0 16px;\n margin-bottom: 24px;\n display: flex;\n flex-direction: column;\n background-color: var(--color-purple-200);\n border-radius: 8px;\n max-height: 228px;\n overflow-y: scroll;\n}\n\n.CookieMonster__settingsHeader {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n.CookieMonster__settingActions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.CookieMonster__settingActions themed-button {\n flex: 1;\n}\n\n.CookieMonster__mainBanner[data-state='settings'] settings-view {\n display: block;\n}\n\n/* ========== TEXT & COPY ========== */\n\n.CookieMonster__mainHeading {\n margin-bottom: 12px;\n color: var(--color-ink-1000);\n font-size: 20px;\n font-weight:
|
|
2
|
+
var views_default = "/* ========== OVERLAY ========== */\n\n.CookieMonster__overlay {\n position: fixed;\n inset: 0;\n background-color: rgba(26, 26, 26, 0.8);\n z-index: 9999998;\n}\n\n/* ========== BANNER MAIN ========== */\n\n.CookieMonster__mainBanner {\n padding: 32px 16px 24px 16px;\n background-color: var(--color-white-1000);\n border-radius: 16px 16px 0 0;\n border: 1px solid var(--color-ink-300);\n box-shadow: 0px 10px 24px 0px rgba(26, 26, 26, 0.16);\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 9999999;\n overflow: hidden;\n\n @media only screen and (min-width: 768px) {\n border-radius: 16px;\n width: 375px;\n left: 50%;\n right: auto;\n top: 50%;\n bottom: auto;\n transform: translate(-50%, -50%);\n }\n}\n\n.CookieMonster__mainBanner[data-state='settings'] {\n max-height: 90vh; /*This is to allow the settings to expand vertically when cookie options are open*/\n height: auto;\n}\n\n/* ========== BANNER CONTENT ========== */\n\n.CookieMonster__bannerContent {\n display: grid;\n}\n\n.CookieMonster__mainBanner[data-state='settings'] .CookieMonster__bannerContent {\n display: none;\n}\n\n/* ========== SETTINGS ========== */\n\nsettings-view {\n display: none;\n}\n\n.CookieMonster__settingsContent {\n padding: 0 16px;\n margin-bottom: 24px;\n display: flex;\n flex-direction: column;\n background-color: var(--color-purple-200);\n border-radius: 8px;\n max-height: 228px;\n overflow-y: scroll;\n}\n\n.CookieMonster__settingsHeader {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n\n.CookieMonster__settingActions {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.CookieMonster__settingActions themed-button {\n flex: 1;\n}\n\n.CookieMonster__mainBanner[data-state='settings'] settings-view {\n display: block;\n}\n\n/* ========== TEXT & COPY ========== */\n\n.CookieMonster__mainHeading {\n margin-bottom: 12px;\n color: var(--color-ink-1000);\n font-size: 20px;\n font-weight: var(--cm-heading-weight);\n letter-spacing: var(--cm-title-spacing);\n}\n\n.CookieMonster__backIcon {\n width: 16px;\n height: 16px;\n background: var(--cm-back-icon) center / contain no-repeat;\n}\n\n.CookieMonster__heading {\n margin: 0 0 24px 0;\n color: var(--color-ink-1000);\n font-size: 20px;\n font-weight: 800;\n}\n\n.CookieMonster__text {\n color: var(--color-ink-600);\n font-size: 14px;\n}\n\n/* ========== BUTTONS ========== */\n\n.CookieMonster__bannerButtons {\n margin: 16px 0 0 0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n}\n\n.CookieMonster__bannerButtons themed-button {\n flex: 1;\n width: 100%;\n}\n\n.CookieMonster__buttonLink {\n background-color: transparent;\n border: none;\n cursor: pointer;\n}\n\n.CookieMonster__buttonLink {\n color: var(--color-neue-blue-500);\n text-decoration: underline;\n font-size: 14px;\n}\n";
|
|
3
3
|
export { views_default as default };
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"version": "1.
|
|
46
|
+
"version": "1.7.1",
|
|
47
47
|
"description": "Internal web libraries for Natural Cycles, served via CDN and published from the NCBackend3 monorepo",
|
|
48
48
|
"author": "Natural Cycles Team",
|
|
49
49
|
"license": "UNLICENSED",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// src/cookie-monster/icons/back.svg
|
|
2
|
-
var back_default = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.38381%208.25519C1.41634%208.33382%201.46457%208.40749%201.52849%208.4714L6.19515%2013.1381C6.4555%2013.3984%206.87761%2013.3984%207.13796%2013.1381C7.39831%2012.8777%207.39831%2012.4556%207.13796%2012.1953L3.60937%208.66666L13.9999%208.66667C14.3681%208.66667%2014.6666%208.36819%2014.6666%208C14.6666%207.63181%2014.3681%207.33333%2013.9999%207.33333L3.60937%207.33333L7.13796%203.80473C7.39831%203.54439%207.39831%203.12228%207.13796%202.86193C6.87761%202.60158%206.4555%202.60158%206.19515%202.86193L1.52849%207.52859C1.39988%207.6572%201.3348%207.82529%201.33325%207.99384'%20fill='%2372035D'/%3e%3cpath%20d='M1.38381%208.25519C1.35195%208.17837%201.33405%208.0943%201.33325%208.00615L1.38381%208.25519Z'%20fill='%2372035D'/%3e%3c/svg%3e";
|
|
3
|
-
export { back_default as default };
|