@dargmuesli/nuxt-cookie-control 10.0.0-beta.1 → 10.0.0-beta.3

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/README.md CHANGED
@@ -105,6 +105,11 @@ if (cookieControl.cookiesEnabledIds.value.includes('google-analytics')) {
105
105
  // 'top-left', 'top-right', 'top-full', 'bottom-left', 'bottom-right', 'bottom-full'
106
106
  barPosition: 'bottom-full',
107
107
 
108
+ // Position of the cookie control button.
109
+ // 'top-left', 'top-right', 'bottom-left', 'bottom-right'
110
+ // @default 'bottom-right'
111
+ controlButtonPosition: 'bottom-right',
112
+
108
113
  // Switch to toggle if clicking the overlay outside the configuration modal closes the modal.
109
114
  closeModalOnClickOutside: true,
110
115
 
@@ -157,10 +162,10 @@ cookieNameCookiesEnabledIds: 'ncc_e',
157
162
  cookieOptions: {
158
163
  path: '/',
159
164
  sameSite: 'strict',
160
- }
165
+ },
161
166
 
162
167
  // Switch to toggle the "accept necessary" button.
163
- isAcceptNecessaryButtonEnabled: true
168
+ isAcceptNecessaryButtonEnabled: true,
164
169
 
165
170
  // Switch to toggle the button that opens the configuration modal.
166
171
  isControlButtonEnabled: true,
package/dist/module.d.mts CHANGED
@@ -33,6 +33,12 @@ interface LocaleStrings {
33
33
  interface ModuleOptions {
34
34
  _isPrerendered: boolean | undefined;
35
35
  barPosition: 'top-left' | 'top-right' | 'top-full' | 'bottom-left' | 'bottom-right' | 'bottom-full';
36
+ /**
37
+ * Position of the control button.
38
+ * 'top-left', 'top-right', 'bottom-left', 'bottom-right', or undefined.
39
+ * @default 'bottom-right'
40
+ */
41
+ controlButtonPosition: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
36
42
  closeModalOnClickOutside: boolean;
37
43
  colors: false | Record<string, unknown>;
38
44
  cookieExpiryOffsetMs: number;
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "10.0.0-beta.1",
3
+ "version": "10.0.0-beta.3",
4
4
  "configKey": "cookieControl",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
package/dist/module.mjs CHANGED
@@ -49,6 +49,7 @@ const replaceCodePlugin = (config) => {
49
49
  const DEFAULTS = {
50
50
  _isPrerendered: void 0,
51
51
  barPosition: "bottom-full",
52
+ controlButtonPosition: "bottom-right",
52
53
  closeModalOnClickOutside: false,
53
54
  colors: {
54
55
  barBackground: "#000",
@@ -105,11 +106,11 @@ const DEFAULTS = {
105
106
  };
106
107
 
107
108
  const name = "@dargmuesli/nuxt-cookie-control";
108
- const version = "10.0.0-beta.1";
109
+ const version = "10.0.0-beta.3";
109
110
 
110
111
  const resolver = createResolver(import.meta.url);
111
112
  const runtimeDir = resolver.resolve("./runtime");
112
- const module = defineNuxtModule({
113
+ const module$1 = defineNuxtModule({
113
114
  meta: {
114
115
  name,
115
116
  version,
@@ -230,4 +231,4 @@ const pushCss = (moduleOptions, nuxt) => {
230
231
  nuxt.options.css.push(resolver.resolve(runtimeDir, "styles.css"));
231
232
  };
232
233
 
233
- export { module as default };
234
+ export { module$1 as default };
@@ -0,0 +1,15 @@
1
+ declare var __VLS_1: {}, __VLS_9: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ } & {
5
+ default?: (props: typeof __VLS_9) => any;
6
+ };
7
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -4,8 +4,9 @@ type __VLS_Slots = {} & {
4
4
  } & {
5
5
  default?: (props: typeof __VLS_9) => any;
6
6
  };
7
- declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
9
10
  export default _default;
10
11
  type __VLS_WithSlots<T, S> = T & {
11
12
  new (): {
@@ -0,0 +1,29 @@
1
+ import type { Locale } from '#cookie-control/types';
2
+ type __VLS_Props = {
3
+ locale?: Locale;
4
+ };
5
+ declare var __VLS_11: {}, __VLS_13: {}, __VLS_20: {}, __VLS_22: {
6
+ cookie: any;
7
+ };
8
+ type __VLS_Slots = {} & {
9
+ bar?: (props: typeof __VLS_11) => any;
10
+ } & {
11
+ controlButton?: (props: typeof __VLS_13) => any;
12
+ } & {
13
+ modal?: (props: typeof __VLS_20) => any;
14
+ } & {
15
+ cookie?: (props: typeof __VLS_22) => any;
16
+ };
17
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
18
+ accept: () => void;
19
+ acceptPartial: () => void;
20
+ decline: () => void;
21
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -37,7 +37,10 @@
37
37
  <button
38
38
  v-if="moduleOptions.isControlButtonEnabled && isConsentGiven"
39
39
  aria-label="Cookie control"
40
- class="cookieControl__ControlButton"
40
+ :class="[
41
+ 'cookieControl__ControlButton',
42
+ `cookieControl__ControlButton--${moduleOptions.controlButtonPosition}`
43
+ ]"
41
44
  data-testid="nuxt-cookie-control-control-button"
42
45
  type="button"
43
46
  @click="isModalActive = true"
@@ -51,154 +54,156 @@
51
54
  </svg>
52
55
  </slot>
53
56
  </button>
54
- <transition name="cookieControl__Modal">
55
- <div
56
- v-if="isModalActive"
57
- class="cookieControl__Modal"
58
- @click.self="onModalClick"
59
- >
60
- <p
61
- v-if="isSaved"
62
- class="cookieControl__ModalUnsaved"
63
- v-text="localeStrings?.settingsUnsaved"
64
- />
65
- <div class="cookieControl__ModalContent">
66
- <div class="cookieControl__ModalContentInner">
67
- <slot name="modal" />
68
- <button
69
- v-if="!moduleOptions.isModalForced"
70
- class="cookieControl__ModalClose"
71
- type="button"
72
- @click="isModalActive = false"
73
- v-text="localeStrings?.close"
74
- />
75
- <template v-for="cookieType in CookieType" :key="cookieType">
76
- <template v-if="moduleOptions.cookies[cookieType].length">
77
- <h2
78
- v-text="
57
+ <dialog ref="dialog" @close="isModalActive = false">
58
+ <transition name="cookieControl__Modal">
59
+ <div
60
+ v-if="isModalActive"
61
+ class="cookieControl__Modal"
62
+ @click.self="onModalClick"
63
+ >
64
+ <p
65
+ v-if="isSaved"
66
+ class="cookieControl__ModalUnsaved"
67
+ v-text="localeStrings?.settingsUnsaved"
68
+ />
69
+ <div class="cookieControl__ModalContent">
70
+ <div class="cookieControl__ModalContentInner">
71
+ <slot name="modal" />
72
+ <button
73
+ v-if="!moduleOptions.isModalForced"
74
+ class="cookieControl__ModalClose"
75
+ type="button"
76
+ @click="isModalActive = false"
77
+ v-text="localeStrings?.close"
78
+ />
79
+ <template v-for="cookieType in CookieType" :key="cookieType">
80
+ <template v-if="moduleOptions.cookies[cookieType].length">
81
+ <h2
82
+ v-text="
79
83
  localeStrings && (cookieType === CookieType.NECESSARY ? localeStrings.cookiesNecessary : localeStrings.cookiesOptional)
80
84
  "
81
- />
82
- <ul>
83
- <li
84
- v-for="cookie in moduleOptions.cookies[cookieType]"
85
- :key="cookie.id"
86
- >
87
- <slot name="cookie" v-bind="{ cookie }">
88
- <div class="cookieControl__ModalInputWrapper">
89
- <input
90
- v-if="
85
+ />
86
+ <ul>
87
+ <li
88
+ v-for="cookie in moduleOptions.cookies[cookieType]"
89
+ :key="cookie.id"
90
+ >
91
+ <slot name="cookie" v-bind="{ cookie }">
92
+ <div class="cookieControl__ModalInputWrapper">
93
+ <input
94
+ v-if="
91
95
  cookieType === CookieType.NECESSARY && cookie.name !== 'functional'
92
96
  "
93
- :id="resolveTranslatable(cookie.name, locale)"
94
- type="checkbox"
95
- disabled
96
- checked
97
- />
98
- <input
99
- v-else
100
- :id="resolveTranslatable(cookie.name, locale)"
101
- type="checkbox"
102
- :checked="
97
+ :id="resolveTranslatable(cookie.name, locale)"
98
+ type="checkbox"
99
+ disabled
100
+ checked
101
+ />
102
+ <input
103
+ v-else
104
+ :id="resolveTranslatable(cookie.name, locale)"
105
+ type="checkbox"
106
+ :checked="
103
107
  getCookieIds(localCookiesEnabled).includes(
104
108
  cookie.id
105
109
  )
106
110
  "
107
- @change="toggleCookie(cookie)"
108
- />
109
- <button type="button" @click="toggleButton($event)">
110
- {{ getName(cookie.name) }}
111
- </button>
112
- <label
113
- class="cookieControl__ModalCookieName"
114
- :for="resolveTranslatable(cookie.name, locale)"
115
- tabindex="0"
116
- @keydown="toggleLabel($event)"
117
- >
118
- {{ getName(cookie.name) }}
119
- <span v-if="cookie.description">
120
- {{ getDescription(cookie.description) }}
121
- </span>
122
- <span
123
- v-if="
124
- moduleOptions.isCookieIdVisible && cookie.targetCookieIds
125
- "
126
- >
127
- <br />
128
- {{
129
- "IDs: " + cookie.targetCookieIds.map((id) => `"${id}"`).join(", ")
130
- }}
131
- </span>
132
- <template
133
- v-if="Object.entries(cookie.links || {}).length"
111
+ @change="toggleCookie(cookie)"
112
+ />
113
+ <button type="button" @click="toggleButton($event)">
114
+ {{ getName(cookie.name) }}
115
+ </button>
116
+ <label
117
+ class="cookieControl__ModalCookieName"
118
+ :for="resolveTranslatable(cookie.name, locale)"
119
+ tabindex="0"
120
+ @keydown="toggleLabel($event)"
134
121
  >
122
+ {{ getName(cookie.name) }}
123
+ <span v-if="cookie.description">
124
+ {{ getDescription(cookie.description) }}
125
+ </span>
135
126
  <span
136
- v-for="entry in Object.entries(
137
- cookie.links || {}
138
- )"
139
- :key="entry[0]"
127
+ v-if="
128
+ moduleOptions.isCookieIdVisible && cookie.targetCookieIds
129
+ "
140
130
  >
141
131
  <br />
142
- <NuxtLink
143
- :to="entry[0]"
144
- @click="
132
+ {{
133
+ "IDs: " + cookie.targetCookieIds.map((id) => `"${id}"`).join(", ")
134
+ }}
135
+ </span>
136
+ <template
137
+ v-if="Object.entries(cookie.links || {}).length"
138
+ >
139
+ <span
140
+ v-for="entry in Object.entries(
141
+ cookie.links || {}
142
+ )"
143
+ :key="entry[0]"
144
+ >
145
+ <br />
146
+ <NuxtLink
147
+ :to="entry[0]"
148
+ @click="
145
149
  !entry[0].toLowerCase().startsWith('http') ? isModalActive = false : null
146
150
  "
147
- >
148
- {{ entry[1] || entry[0] }}
149
- </NuxtLink>
150
- </span>
151
- </template>
152
- </label>
153
- </div>
154
- </slot>
155
- </li>
156
- </ul>
151
+ >
152
+ {{ entry[1] || entry[0] }}
153
+ </NuxtLink>
154
+ </span>
155
+ </template>
156
+ </label>
157
+ </div>
158
+ </slot>
159
+ </li>
160
+ </ul>
161
+ </template>
157
162
  </template>
158
- </template>
159
- <div class="cookieControl__ModalButtons">
160
- <button
161
- type="button"
162
- @click="
163
+ <div class="cookieControl__ModalButtons">
164
+ <button
165
+ type="button"
166
+ @click="
163
167
  () => {
164
168
  acceptPartial();
165
169
  isModalActive = false;
166
170
  }
167
171
  "
168
- v-text="localeStrings?.save"
169
- />
170
- <button
171
- type="button"
172
- @click="
172
+ v-text="localeStrings?.save"
173
+ />
174
+ <button
175
+ type="button"
176
+ @click="
173
177
  () => {
174
178
  acceptAll();
175
179
  isModalActive = false;
176
180
  }
177
181
  "
178
- v-text="localeStrings?.acceptAll"
179
- />
180
- <button
181
- v-if="!moduleOptions.isModalForced"
182
- type="button"
183
- @click="
182
+ v-text="localeStrings?.acceptAll"
183
+ />
184
+ <button
185
+ v-if="!moduleOptions.isModalForced"
186
+ type="button"
187
+ @click="
184
188
  () => {
185
189
  moduleOptions.declineAllAcceptsNecessary ? acceptNecessary() : acceptNone();
186
190
  isModalActive = false;
187
191
  }
188
192
  "
189
- v-text="localeStrings?.declineAll"
190
- />
193
+ v-text="localeStrings?.declineAll"
194
+ />
195
+ </div>
191
196
  </div>
192
197
  </div>
193
198
  </div>
194
- </div>
195
- </transition>
199
+ </transition>
200
+ </dialog>
196
201
  </aside>
197
202
  </ClientOnlyPrerender>
198
203
  </template>
199
204
 
200
205
  <script setup>
201
- import { ref, computed, onBeforeMount, watch } from "vue";
206
+ import { ref, computed, onBeforeMount, watch, useTemplateRef } from "vue";
202
207
  import ClientOnlyPrerender from "#cookie-control/components/ClientOnlyPrerender.vue";
203
208
  import { COOKIE_ID_SEPARATOR } from "#cookie-control/constants";
204
209
  import {
@@ -370,6 +375,16 @@ watch(isConsentGiven, (current, _previous) => {
370
375
  cookieIsConsentGiven.value = current ? allCookieIdsString : "0";
371
376
  }
372
377
  });
378
+ const templateRefDialog = useTemplateRef("dialog");
379
+ watch(isModalActive, (current, previous) => {
380
+ if (!templateRefDialog.value) return;
381
+ if (!previous && current && !templateRefDialog.value.open) {
382
+ templateRefDialog.value.showModal();
383
+ }
384
+ if (previous && !current && templateRefDialog.value.open) {
385
+ templateRefDialog.value.close();
386
+ }
387
+ });
373
388
  watch(
374
389
  () => locale,
375
390
  (locale2) => {
@@ -14,12 +14,13 @@ type __VLS_Slots = {} & {
14
14
  } & {
15
15
  cookie?: (props: typeof __VLS_22) => any;
16
16
  };
17
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
17
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
18
18
  accept: () => void;
19
19
  acceptPartial: () => void;
20
20
  decline: () => void;
21
21
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
23
24
  export default _default;
24
25
  type __VLS_WithSlots<T, S> = T & {
25
26
  new (): {
@@ -0,0 +1,13 @@
1
+ declare var __VLS_6: {};
2
+ type __VLS_Slots = {} & {
3
+ iframe?: (props: typeof __VLS_6) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -2,8 +2,9 @@ declare var __VLS_6: {};
2
2
  type __VLS_Slots = {} & {
3
3
  iframe?: (props: typeof __VLS_6) => any;
4
4
  };
5
- declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
7
8
  export default _default;
8
9
  type __VLS_WithSlots<T, S> = T & {
9
10
  new (): {
@@ -1,5 +1,5 @@
1
1
  export default {
2
- accept: "Kabul etmek",
2
+ accept: "Kabul et",
3
3
  acceptAll: "T\xFCm\xFCn\xFC kabul et",
4
4
  bannerDescription: "Bu web sitesini do\u011Fru bir \u015Fekilde g\xF6r\xFCnt\xFCleyebilmek ve teklifimizi geli\u015Ftirmek i\xE7in bu web sitesinin nas\u0131l kullan\u0131ld\u0131\u011F\u0131n\u0131 daha iyi anlayabilmek i\xE7in kendi ve \xFC\xE7\xFCnc\xFC taraf \xE7erezlerimizi kullan\u0131yoruz. \xC7erez kullanma izni ile ilgili karar, bu banner \xFCzerinde bir se\xE7im yap\u0131ld\u0131ktan sonra g\xF6r\xFCnen \xE7erez d\xFC\u011Fmesi arac\u0131l\u0131\u011F\u0131yla herhangi bir zamanda de\u011Fi\u015Ftirilebilir.",
5
5
  bannerTitle: "\xC7erezler",
@@ -7,9 +7,9 @@ export default {
7
7
  cookiesFunctional: "\u0130\u015Flevsel \xE7erezler",
8
8
  cookiesNecessary: "Gerekli \xE7erezler",
9
9
  cookiesOptional: "\u0130ste\u011Fe ba\u011Fl\u0131 \xE7erezler",
10
- decline: "Reddetmek",
10
+ decline: "Reddet",
11
11
  declineAll: "T\xFCm\xFCn\xFC reddet",
12
- here: "here",
12
+ here: "Burada",
13
13
  iframeBlocked: "Bunu g\xF6rmek i\xE7in l\xFCtfen i\u015Flevsel \xE7erezleri etkinle\u015Ftirin",
14
14
  manageCookies: "\xC7erezleri y\xF6net",
15
15
  save: "Kaydet",
@@ -1 +1 @@
1
- .cookieControl__Modal-enter-active,.cookieControl__Modal-leave-active{transition:opacity .25s}.cookieControl__Modal-enter,.cookieControl__Modal-leave-to{opacity:0}.cookieControl__Bar--center{left:50%;top:50%;transform:translate(-50%,-50%)}.cookieControl__Bar--bottom-full-enter-active,.cookieControl__Bar--bottom-full-leave-active,.cookieControl__Bar--bottom-left-enter-active,.cookieControl__Bar--bottom-left-leave-active,.cookieControl__Bar--bottom-right-enter-active,.cookieControl__Bar--bottom-right-leave-active,.cookieControl__Bar--center-enter-active,.cookieControl__Bar--center-leave-active,.cookieControl__Bar--top-full-enter-active,.cookieControl__Bar--top-full-leave-active,.cookieControl__Bar--top-left-enter-active,.cookieControl__Bar--top-left-leave-active,.cookieControl__Bar--top-right-enter-active,.cookieControl__Bar--top-right-leave-active{transition:transform .25s}.cookieControl__Bar--top-full-enter,.cookieControl__Bar--top-full-leave-to,.cookieControl__Bar--top-left-enter,.cookieControl__Bar--top-left-leave-to,.cookieControl__Bar--top-right-enter,.cookieControl__Bar--top-right-leave-to{transform:translateY(-100%)}.cookieControl__Bar--bottom-full-enter,.cookieControl__Bar--bottom-full-leave-to,.cookieControl__Bar--bottom-left-enter,.cookieControl__Bar--bottom-left-leave-to,.cookieControl__Bar--bottom-right-enter,.cookieControl__Bar--bottom-right-leave-to{transform:translateY(100%)}.cookieControl__Bar--center-enter,.cookieControl__Bar--center-leave-to{transform:translate(-50%,-50%) scale(.95)}.cookieControl{position:relative;z-index:100000}.cookieControl button{backface-visibility:hidden;border:0;cursor:pointer;font-size:16px;outline:0;padding:12px 20px;transition:background-color .2s,color .2s}.cookieControl__Bar{background-color:var(--cookie-control-barBackground);font-family:Arial,Helvetica Neue,Helvetica,sans-serif;position:fixed}.cookieControl__Bar h2,.cookieControl__Bar p{color:var(--cookie-control-barTextColor);max-width:900px}.cookieControl__Bar h2{font-size:20px;margin:0}.cookieControl__Bar p{font-size:16px;margin:5px 0 0}.cookieControl__Bar button{background-color:var(--cookie-control-barButtonBackground);color:var(--cookie-control-barButtonColor)}.cookieControl__Bar button:hover{background-color:var(--cookie-control-barButtonHoverBackground);color:var(--cookie-control-barButtonHoverColor)}.cookieControl__Bar button:focus{box-shadow:0 0 0 3px var(--cookie-control-focusRingColor)}.cookieControl__Bar button+button{margin-left:10px}.cookieControl__BarContainer{align-items:flex-end;display:flex;justify-content:space-between;padding:20px}.cookieControl__Bar--bottom-full,.cookieControl__Bar--top-full{left:0;right:0}.cookieControl__Bar--top-full{top:0}.cookieControl__Bar--bottom-full{bottom:0}.cookieControl__Bar--bottom-left p,.cookieControl__Bar--bottom-right p,.cookieControl__Bar--center p,.cookieControl__Bar--top-left p,.cookieControl__Bar--top-right p{max-width:400px}.cookieControl__Bar--bottom-left .cookieControl__BarContainer,.cookieControl__Bar--bottom-right .cookieControl__BarContainer,.cookieControl__Bar--center .cookieControl__BarContainer,.cookieControl__Bar--top-left .cookieControl__BarContainer,.cookieControl__Bar--top-right .cookieControl__BarContainer{flex-direction:column}.cookieControl__Bar--bottom-left .cookieControl__BarButtons,.cookieControl__Bar--bottom-right .cookieControl__BarButtons,.cookieControl__Bar--center .cookieControl__BarButtons,.cookieControl__Bar--top-left .cookieControl__BarButtons,.cookieControl__Bar--top-right .cookieControl__BarButtons{margin-top:20px}.cookieControl__Bar--top-left,.cookieControl__Bar--top-right{top:20px}.cookieControl__Bar--bottom-left,.cookieControl__Bar--bottom-right{bottom:20px}.cookieControl__Bar--bottom-left,.cookieControl__Bar--top-left{left:20px}.cookieControl__Bar--bottom-right,.cookieControl__Bar--top-right{right:20px}.cookieControl__BarButtons{display:flex}.cookieControl__Modal{bottom:0;font-size:0;left:0;position:fixed;right:0;text-align:center;top:0;z-index:1}.cookieControl__Modal:before{content:"";display:inline-block;min-height:100vh;vertical-align:middle}.cookieControl__Modal:after{background-color:var(--cookie-control-modalOverlay);bottom:0;content:"";left:0;opacity:var(--cookie-control-modalOverlayOpacity);position:absolute;right:0;top:0;z-index:-1}.cookieControl__Modal>div{font-size:medium}.cookieControl__Modal button{background-color:var(--cookie-control-modalButtonBackground);color:var(--cookie-control-modalButtonColor)}.cookieControl__Modal button:hover{background-color:var(--cookie-control-modalButtonHoverBackground);color:var(--cookie-control-modalButtonHoverColor)}.cookieControl__Modal button:focus{box-shadow:0 0 0 3px var(--cookie-control-focusRingColor)}.cookieControl__ModalContent{background-color:var(--cookie-control-modalBackground);display:inline-block;max-height:80vh;max-width:550px;overflow-y:scroll;position:relative;text-align:left;vertical-align:middle;width:100%}.cookieControl__ModalContent,.cookieControl__ModalContent :not(button){color:var(--cookie-control-modalTextColor)}.cookieControl__ModalContent h2{font-size:24px;margin:15px 0}.cookieControl__ModalContent h2:first-of-type{margin-top:0}.cookieControl__ModalContent ul{font-size:16px;list-style-type:none;padding:0}.cookieControl__ModalContent ul ul{padding:5px 56px 0}.cookieControl__ModalContent ul ul li+li{margin-top:5px}.cookieControl__ModalContent li{align-items:center}.cookieControl__ModalContent li+li{margin-top:20px}.cookieControl__ModalContent input{display:none}.cookieControl__ModalContent input:checked+button{background-color:var(--cookie-control-checkboxActiveBackground)}.cookieControl__ModalContent input:checked+button:before{background-color:var(--cookie-control-checkboxActiveCircleBackground);transform:translate3d(100%,-50%,0)}.cookieControl__ModalContent input:checked:disabled+button{background-color:var(--cookie-control-checkboxDisabledBackground)}.cookieControl__ModalContent input:checked:disabled+button:before{background-color:var(--cookie-control-checkboxDisabledCircleBackground)}.cookieControl__ModalContent input+button{backface-visibility:hidden;background-color:var(--cookie-control-checkboxInactiveBackground);border-radius:20px;display:block;font-size:0;margin-right:20px;min-height:20px;min-width:36px;position:relative;transition:background-color .2s}.cookieControl__ModalContent input+button:before{background-color:var(--cookie-control-checkboxInactiveCircleBackground);border-radius:50%;content:"";height:15px;left:3px;position:absolute;top:50%;transform:translate3d(0,-50%,0);transition:transform .2s;width:15px}.cookieControl__ModalContentInner{display:flex;flex-direction:column;gap:10px;padding:40px}.cookieControl__ModalInputWrapper{align-items:flex-start;display:flex}.cookieControl__ModalCookieName{font-weight:700;text-transform:uppercase}.cookieControl__ModalCookieName span{font-weight:400;text-transform:none}.cookieControl__ModalClose{align-self:flex-end;right:20px;top:20px}.cookieControl__ModalButtons{align-items:stretch;display:flex;gap:20px;margin-top:40px}.cookieControl__ModalUnsaved{bottom:40px;color:var(--cookie-control-modalUnsavedColor);font-size:14px;left:50%;margin:0;position:absolute;transform:translateX(-50%)}.cookieControl__BlockedIframe{border:2px solid #ddd;padding:20px}.cookieControl__BlockedIframe a,.cookieControl__BlockedIframe p{font-family:Arial,Helvetica Neue,Helvetica,sans-serif}@media screen and (max-width:768px){.cookieControl__Bar{flex-direction:column;left:0;right:0}.cookieControl__Bar h2,.cookieControl__Bar p{max-width:100%}.cookieControl__Bar--top-full,.cookieControl__Bar--top-left,.cookieControl__Bar--top-right{top:0}.cookieControl__Bar--bottom-full,.cookieControl__Bar--bottom-left,.cookieControl__Bar--bottom-right{bottom:0}.cookieControl__ModalContent{bottom:0;left:0;max-height:100%;max-width:none;position:absolute;right:0;top:0}.cookieControl__ModalContentInner{padding:20px}.cookieControl__BarButtons{flex-direction:column;justify-content:center;margin-top:20px;width:100%}.cookieControl__BarButtons button{width:100%}.cookieControl__BarButtons button+button{margin:10px 0 0}.cookieControl__BarContainer,.cookieControl__ModalButtons{flex-direction:column;gap:10px}.cookieControl__ModalButtons button{width:100%}}.cookieControl__ControlButton{backface-visibility:hidden;background:var(--cookie-control-controlButtonBackground);border:0;border-radius:50%;bottom:20px;box-shadow:0 0 10px rgba(0,0,0,.3);cursor:pointer;height:40px;min-height:40px;min-width:40px;outline:0;position:fixed;right:20px;transition:background-color .2s;width:40px}.cookieControl__ControlButton svg{backface-visibility:hidden;color:var(--cookie-control-controlButtonIconColor);left:50%;max-height:24px;max-width:24px;min-height:24px;min-width:24px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:color .2s}.cookieControl__ControlButton:hover{background-color:var(--cookie-control-controlButtonHoverBackground)}.cookieControl__ControlButton:hover svg{color:var(--cookie-control-controlButtonIconHoverColor)}
1
+ .cookieControl__Modal-enter-active,.cookieControl__Modal-leave-active{transition:opacity .25s}.cookieControl__Modal-enter,.cookieControl__Modal-leave-to{opacity:0}.cookieControl__Bar--center{left:50%;top:50%;transform:translate(-50%,-50%)}.cookieControl__Bar--bottom-full-enter-active,.cookieControl__Bar--bottom-full-leave-active,.cookieControl__Bar--bottom-left-enter-active,.cookieControl__Bar--bottom-left-leave-active,.cookieControl__Bar--bottom-right-enter-active,.cookieControl__Bar--bottom-right-leave-active,.cookieControl__Bar--center-enter-active,.cookieControl__Bar--center-leave-active,.cookieControl__Bar--top-full-enter-active,.cookieControl__Bar--top-full-leave-active,.cookieControl__Bar--top-left-enter-active,.cookieControl__Bar--top-left-leave-active,.cookieControl__Bar--top-right-enter-active,.cookieControl__Bar--top-right-leave-active{transition:transform .25s}.cookieControl__Bar--top-full-enter,.cookieControl__Bar--top-full-leave-to,.cookieControl__Bar--top-left-enter,.cookieControl__Bar--top-left-leave-to,.cookieControl__Bar--top-right-enter,.cookieControl__Bar--top-right-leave-to{transform:translateY(-100%)}.cookieControl__Bar--bottom-full-enter,.cookieControl__Bar--bottom-full-leave-to,.cookieControl__Bar--bottom-left-enter,.cookieControl__Bar--bottom-left-leave-to,.cookieControl__Bar--bottom-right-enter,.cookieControl__Bar--bottom-right-leave-to{transform:translateY(100%)}.cookieControl__Bar--center-enter,.cookieControl__Bar--center-leave-to{transform:translate(-50%,-50%) scale(.95)}.cookieControl{position:relative;z-index:100000}.cookieControl button{backface-visibility:hidden;border:0;cursor:pointer;font-size:16px;outline:0;padding:12px 20px;transition:background-color .2s,color .2s}.cookieControl__Bar{background-color:var(--cookie-control-barBackground);font-family:Arial,Helvetica Neue,Helvetica,sans-serif;position:fixed}.cookieControl__Bar h2,.cookieControl__Bar p{color:var(--cookie-control-barTextColor);max-width:900px}.cookieControl__Bar h2{font-size:20px;margin:0}.cookieControl__Bar p{font-size:16px;margin:5px 0 0}.cookieControl__Bar button{background-color:var(--cookie-control-barButtonBackground);color:var(--cookie-control-barButtonColor)}.cookieControl__Bar button:hover{background-color:var(--cookie-control-barButtonHoverBackground);color:var(--cookie-control-barButtonHoverColor)}.cookieControl__Bar button:focus{box-shadow:0 0 0 3px var(--cookie-control-focusRingColor)}.cookieControl__Bar button+button{margin-left:10px}.cookieControl__BarContainer{align-items:flex-end;display:flex;justify-content:space-between;padding:20px}.cookieControl__Bar--bottom-full,.cookieControl__Bar--top-full{left:0;right:0}.cookieControl__Bar--top-full{top:0}.cookieControl__Bar--bottom-full{bottom:0}.cookieControl__Bar--bottom-left p,.cookieControl__Bar--bottom-right p,.cookieControl__Bar--center p,.cookieControl__Bar--top-left p,.cookieControl__Bar--top-right p{max-width:400px}.cookieControl__Bar--bottom-left .cookieControl__BarContainer,.cookieControl__Bar--bottom-right .cookieControl__BarContainer,.cookieControl__Bar--center .cookieControl__BarContainer,.cookieControl__Bar--top-left .cookieControl__BarContainer,.cookieControl__Bar--top-right .cookieControl__BarContainer{flex-direction:column}.cookieControl__Bar--bottom-left .cookieControl__BarButtons,.cookieControl__Bar--bottom-right .cookieControl__BarButtons,.cookieControl__Bar--center .cookieControl__BarButtons,.cookieControl__Bar--top-left .cookieControl__BarButtons,.cookieControl__Bar--top-right .cookieControl__BarButtons{margin-top:20px}.cookieControl__Bar--top-left,.cookieControl__Bar--top-right{top:20px}.cookieControl__Bar--bottom-left,.cookieControl__Bar--bottom-right{bottom:20px}.cookieControl__Bar--bottom-left,.cookieControl__Bar--top-left{left:20px}.cookieControl__Bar--bottom-right,.cookieControl__Bar--top-right{right:20px}.cookieControl__BarButtons{display:flex}.cookieControl__Modal{bottom:0;font-size:0;left:0;position:fixed;right:0;text-align:center;top:0;z-index:1}.cookieControl__Modal:before{content:"";display:inline-block;min-height:100vh;vertical-align:middle}.cookieControl__Modal:after{background-color:var(--cookie-control-modalOverlay);bottom:0;content:"";left:0;opacity:var(--cookie-control-modalOverlayOpacity);position:absolute;right:0;top:0;z-index:-1}.cookieControl__Modal>div{font-size:medium}.cookieControl__Modal button{background-color:var(--cookie-control-modalButtonBackground);color:var(--cookie-control-modalButtonColor)}.cookieControl__Modal button:hover{background-color:var(--cookie-control-modalButtonHoverBackground);color:var(--cookie-control-modalButtonHoverColor)}.cookieControl__Modal button:focus{box-shadow:0 0 0 3px var(--cookie-control-focusRingColor)}.cookieControl__ModalContent{background-color:var(--cookie-control-modalBackground);display:inline-block;max-height:80vh;max-width:550px;overflow-y:scroll;position:relative;text-align:left;vertical-align:middle;width:100%}.cookieControl__ModalContent,.cookieControl__ModalContent :not(button){color:var(--cookie-control-modalTextColor)}.cookieControl__ModalContent h2{font-size:24px;margin:15px 0}.cookieControl__ModalContent h2:first-of-type{margin-top:0}.cookieControl__ModalContent ul{font-size:16px;list-style-type:none;padding:0}.cookieControl__ModalContent ul ul{padding:5px 56px 0}.cookieControl__ModalContent ul ul li+li{margin-top:5px}.cookieControl__ModalContent li{align-items:center}.cookieControl__ModalContent li+li{margin-top:20px}.cookieControl__ModalContent input{display:none}.cookieControl__ModalContent input:checked+button{background-color:var(--cookie-control-checkboxActiveBackground)}.cookieControl__ModalContent input:checked+button:before{background-color:var(--cookie-control-checkboxActiveCircleBackground);transform:translate3d(100%,-50%,0)}.cookieControl__ModalContent input:checked:disabled+button{background-color:var(--cookie-control-checkboxDisabledBackground)}.cookieControl__ModalContent input:checked:disabled+button:before{background-color:var(--cookie-control-checkboxDisabledCircleBackground)}.cookieControl__ModalContent input+button{backface-visibility:hidden;background-color:var(--cookie-control-checkboxInactiveBackground);border-radius:20px;display:block;font-size:0;margin-right:20px;min-height:20px;min-width:36px;position:relative;transition:background-color .2s}.cookieControl__ModalContent input+button:before{background-color:var(--cookie-control-checkboxInactiveCircleBackground);border-radius:50%;content:"";height:15px;left:3px;position:absolute;top:50%;transform:translate3d(0,-50%,0);transition:transform .2s;width:15px}.cookieControl__ModalContentInner{display:flex;flex-direction:column;gap:10px;padding:40px}.cookieControl__ModalInputWrapper{align-items:flex-start;display:flex}.cookieControl__ModalCookieName{font-weight:700;text-transform:uppercase}.cookieControl__ModalCookieName span{font-weight:400;text-transform:none}.cookieControl__ModalClose{align-self:flex-end;right:20px;top:20px}.cookieControl__ModalButtons{align-items:stretch;display:flex;gap:20px;margin-top:40px}.cookieControl__ModalUnsaved{bottom:40px;color:var(--cookie-control-modalUnsavedColor);font-size:14px;left:50%;margin:0;position:absolute;transform:translateX(-50%)}.cookieControl__BlockedIframe{border:2px solid #ddd;padding:20px}.cookieControl__BlockedIframe a,.cookieControl__BlockedIframe p{font-family:Arial,Helvetica Neue,Helvetica,sans-serif}@media screen and (max-width:768px){.cookieControl__Bar{flex-direction:column;left:0;right:0}.cookieControl__Bar h2,.cookieControl__Bar p{max-width:100%}.cookieControl__Bar--top-full,.cookieControl__Bar--top-left,.cookieControl__Bar--top-right{top:0}.cookieControl__Bar--bottom-full,.cookieControl__Bar--bottom-left,.cookieControl__Bar--bottom-right{bottom:0}.cookieControl__ModalContent{bottom:0;left:0;max-height:100%;max-width:none;position:absolute;right:0;top:0}.cookieControl__ModalContentInner{padding:20px}.cookieControl__BarButtons{flex-direction:column;justify-content:center;margin-top:20px;width:100%}.cookieControl__BarButtons button{width:100%}.cookieControl__BarButtons button+button{margin:10px 0 0}.cookieControl__BarContainer,.cookieControl__ModalButtons{flex-direction:column;gap:10px}.cookieControl__ModalButtons button{width:100%}}.cookieControl__ControlButton{backface-visibility:hidden;background:var(--cookie-control-controlButtonBackground);border:0;border-radius:50%;box-shadow:0 0 10px rgba(0,0,0,.3);cursor:pointer;height:40px;min-height:40px;min-width:40px;outline:0;position:fixed;transition:background-color .2s;width:40px}.cookieControl__ControlButton--top-left{left:20px;top:20px}.cookieControl__ControlButton--top-right{right:20px;top:20px}.cookieControl__ControlButton--bottom-left{bottom:20px;left:20px}.cookieControl__ControlButton--bottom-right{bottom:20px;right:20px}.cookieControl__ControlButton svg{backface-visibility:hidden;color:var(--cookie-control-controlButtonIconColor);left:50%;max-height:24px;max-width:24px;min-height:24px;min-width:24px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:color .2s}.cookieControl__ControlButton:hover{background-color:var(--cookie-control-controlButtonHoverBackground)}.cookieControl__ControlButton:hover svg{color:var(--cookie-control-controlButtonIconHoverColor)}
@@ -35,6 +35,12 @@ export interface LocaleStrings {
35
35
  }
36
36
  export interface ModuleOptions {
37
37
  barPosition: 'top-left' | 'top-right' | 'top-full' | 'bottom-left' | 'bottom-right' | 'bottom-full';
38
+ /**
39
+ * Position of the control button.
40
+ * 'top-left', 'top-right', 'bottom-left' or 'bottom-right'.
41
+ * @default 'bottom-right'
42
+ */
43
+ controlButtonPosition: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
38
44
  closeModalOnClickOutside: boolean;
39
45
  colors: false | Record<string, unknown>;
40
46
  cookieExpiryOffsetMs: number;
@@ -6,6 +6,7 @@ export var CookieType = /* @__PURE__ */ ((CookieType2) => {
6
6
  })(CookieType || {});
7
7
  export const DEFAULTS = {
8
8
  barPosition: "bottom-full",
9
+ controlButtonPosition: "bottom-right",
9
10
  closeModalOnClickOutside: false,
10
11
  colors: {
11
12
  barBackground: "#000",
package/package.json CHANGED
@@ -11,30 +11,30 @@
11
11
  },
12
12
  "description": "Nuxt Cookie Control Module",
13
13
  "devDependencies": {
14
- "@commitlint/cli": "19.8.1",
15
- "@commitlint/config-conventional": "19.8.1",
14
+ "@commitlint/cli": "20.1.0",
15
+ "@commitlint/config-conventional": "20.0.0",
16
16
  "@dargmuesli/nuxt-cookie-control": "link:",
17
- "@nuxt/eslint-config": "1.9.0",
17
+ "@nuxt/eslint-config": "1.10.0",
18
18
  "@nuxt/module-builder": "1.0.2",
19
- "@nuxt/schema": "4.0.3",
19
+ "@nuxt/schema": "4.2.1",
20
20
  "@semantic-release/changelog": "6.0.3",
21
21
  "@semantic-release/commit-analyzer": "13.0.1",
22
22
  "@semantic-release/git": "10.0.1",
23
- "@semantic-release/github": "11.0.4",
24
- "@semantic-release/npm": "12.0.2",
25
- "@semantic-release/release-notes-generator": "14.0.3",
26
- "eslint": "9.33.0",
23
+ "@semantic-release/github": "12.0.2",
24
+ "@semantic-release/npm": "13.1.1",
25
+ "@semantic-release/release-notes-generator": "14.1.0",
26
+ "eslint": "9.39.1",
27
27
  "eslint-config-prettier": "10.1.8",
28
28
  "eslint-plugin-prettier": "5.5.4",
29
29
  "husky": "9.1.7",
30
- "lint-staged": "16.1.5",
31
- "nuxt": "4.0.3",
30
+ "lint-staged": "16.2.6",
31
+ "nuxt": "4.2.1",
32
32
  "prettier": "3.6.2",
33
- "semantic-release": "24.2.7",
34
- "vite": "7.1.3",
35
- "vue": "3.5.18",
36
- "vue-tsc": "3.0.5",
37
- "webpack": "5.101.3"
33
+ "semantic-release": "25.0.2",
34
+ "vite": "7.2.2",
35
+ "vue": "3.5.24",
36
+ "vue-tsc": "3.1.3",
37
+ "webpack": "5.102.1"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=16"
@@ -63,7 +63,7 @@
63
63
  "Jonas Thelemann"
64
64
  ],
65
65
  "name": "@dargmuesli/nuxt-cookie-control",
66
- "packageManager": "pnpm@10.15.0",
66
+ "packageManager": "pnpm@10.21.0",
67
67
  "pnpm": {
68
68
  "ignoredBuiltDependencies": [
69
69
  "@parcel/watcher",
@@ -71,7 +71,7 @@
71
71
  "unrs-resolver"
72
72
  ],
73
73
  "overrides": {
74
- "@types/eslint": "npm:eslint@9.33.0"
74
+ "@types/eslint": "npm:eslint@9.39.1"
75
75
  }
76
76
  },
77
77
  "publishConfig": {
@@ -99,5 +99,5 @@
99
99
  ]
100
100
  }
101
101
  },
102
- "version": "10.0.0-beta.1"
102
+ "version": "10.0.0-beta.3"
103
103
  }