@dargmuesli/nuxt-cookie-control 5.0.0-beta.1 → 5.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
@@ -4,38 +4,49 @@
4
4
  ![Nuxt Cookie Control](https://drive.google.com/a/broj42.com/uc?id=1FGQVyj2s0OT-gpTYxH_FuQhe6oU9iejW)
5
5
 
6
6
 
7
- Continuing Dario Ferderber's work on [gitlab.com/broj42/nuxt-cookie-control](https://gitlab.com/broj42/nuxt-cookie-control).
7
+ Translated for: ar, az, cs, da, de, en, es, fr, hr, hu, it, ja, ko, lt, nl, no, pt, ru, sk, tr and uk
8
8
 
9
- 🚩 **Make sure to read the Migration instructions for all major version updates like [v2.0.0](https://github.com/dargmuesli/nuxt-cookie-control/releases/tag/2.0.0), [v3.0.0](https://github.com/dargmuesli/nuxt-cookie-control/releases/tag/3.0.0) and following!**
9
+ Vue 3 support
10
+
11
+ ✅ Components and composables are [auto-imported](https://nuxt.com/docs/guide/concepts/auto-imports)
12
+
13
+ 🚩 API changes since continuing Dario Ferderber's work on [gitlab.com/broj42/nuxt-cookie-control](https://gitlab.com/broj42/nuxt-cookie-control), make sure to read the README!
14
+
15
+
16
+ ## 🚀 Getting Started
10
17
 
11
18
  [![Stackblitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/dargmuesli/nuxt-cookie-control?file=playground%2Fapp.vue)
12
19
 
13
- ## 🚀 Usage
20
+ ### Installation
14
21
  ```bash
15
22
  npm i -D @dargmuesli/nuxt-cookie-control
16
23
  yarn add -D @dargmuesli/nuxt-cookie-control
17
24
  pnpm i -D @dargmuesli/nuxt-cookie-control
18
25
  ```
19
26
 
20
-
27
+ ### Configuration
21
28
  ```javascript
22
29
  // nuxt.config.js
23
30
 
24
31
  modules: [
25
32
  '@dargmuesli/nuxt-cookie-control'
26
- ]
33
+ ],
34
+ cookieControl: {
35
+ // typed module options
36
+ }
37
+
27
38
  // or
39
+
28
40
  modules: [
29
41
  ['@dargmuesli/nuxt-cookie-control', {
30
- // module options
42
+ // untyped module options
31
43
  }]
32
44
  ]
33
45
  ```
34
46
 
35
- Components and composables are [auto-imported](https://nuxt.com/docs/guide/concepts/auto-imports)!
36
-
47
+ ### Usage
37
48
  ```html
38
- <!-- component.vue -->
49
+ <!-- app.vue -->
39
50
 
40
51
  <template>
41
52
  <CookieControl locale="en" />
@@ -49,56 +60,39 @@ const {
49
60
  isModalActive,
50
61
  moduleOptions
51
62
  } = useCookieControl()
63
+
64
+ // example: react to a cookie being accepted
65
+ watch(
66
+ () => cookiesEnabledIds.value,
67
+ (current, previous) => {
68
+ if (
69
+ (!previous?.includes('google-analytics') &&
70
+ current?.includes('google-analytics'))
71
+ ) {
72
+ // cookie with id `google-analytics` got added
73
+ window.location.reload() // placeholder for your custom change handler
74
+ }
75
+ },
76
+ { deep: true }
77
+ )
52
78
  </script>
53
79
  ```
54
- ## Component Slots
55
- ### Bar
56
- ```html
57
- <CookieControl>
58
- <template #bar>
59
- <h3>Bar title</h3>
60
- <p>Bar description (you can use $cookies.text.barDescription)</p>
61
- <n-link>Go somewhere</n-link>
62
- </template>
63
- </CookieControl>
64
- ```
65
- ### Modal
66
- ```html
67
- <template #modal>
68
- <h3>Modal title</h3>
69
- <p>Modal description</p>
70
- </template>
71
- ```
72
- ### Cookie
73
- ```html
74
- <template #cookie="{config}">
75
- <span v-for="c in config" :key="c.id" v-text="c.cookies"/>
76
- </template>
77
- ```
78
80
 
79
- ## Props
80
- - locale: `['en']`
81
- ```html
82
- <CookieControl locale="de"/>
81
+ ```ts
82
+ // plugins/analytics.client.ts
83
+
84
+ // example: initialization based on enabled cookies
85
+ const cookieControl = useCookieControl()
86
+
87
+ if (cookieControl.cookiesEnabledIds.value.includes('google-analytics')) {
88
+ initGoogleAnalytics() // placeholder for your custom initialization
89
+ }
83
90
  ```
84
91
 
85
- Currently available:
86
- - ar
87
- - de
88
- - en
89
- - es
90
- - fr
91
- - hr
92
- - hu
93
- - it
94
- - ja
95
- - nl
96
- - no
97
- - pt
98
- - ru
99
- - uk
100
-
101
- ## Module Options
92
+
93
+ ## API
94
+
95
+ ### Module Options
102
96
 
103
97
  ```javascript
104
98
  // Position of cookie bar.
@@ -191,7 +185,7 @@ localeTexts: {
191
185
  }
192
186
  ```
193
187
 
194
- ### Cookies
188
+ #### Cookies
195
189
 
196
190
  Every property the includes a `{ en: ... }` value is a translatable property that could instead only specify a string (`'...'`) or other locales as well (`{ de: ..., uk: ... }`).
197
191
 
@@ -209,6 +203,40 @@ Every property the includes a `{ en: ... }` value is a translatable property tha
209
203
  }
210
204
  ```
211
205
 
206
+ ### Component Slots
207
+
208
+ #### Bar
209
+ ```html
210
+ <CookieControl>
211
+ <template #bar>
212
+ <h3>Bar title</h3>
213
+ <p>Bar description (you can use $cookies.text.barDescription)</p>
214
+ <n-link>Go somewhere</n-link>
215
+ </template>
216
+ </CookieControl>
217
+ ```
218
+
219
+ #### Modal
220
+ ```html
221
+ <template #modal>
222
+ <h3>Modal title</h3>
223
+ <p>Modal description</p>
224
+ </template>
225
+ ```
226
+
227
+ #### Cookie
228
+ ```html
229
+ <template #cookie="{config}">
230
+ <span v-for="c in config" :key="c.id" v-text="c.cookies"/>
231
+ </template>
232
+ ```
233
+
234
+ ### Props
235
+ - locale: `['en']`
236
+ ```html
237
+ <CookieControl locale="de"/>
238
+ ```
239
+
212
240
 
213
241
  <!-- Badges -->
214
242
  [npm-version-src]: https://badgen.net/npm/v/@dargmuesli/nuxt-cookie-control/latest
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "5.0.0-beta.1",
3
+ "version": "5.0.0-beta.3",
4
4
  "configKey": "cookieControl",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0"
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { resolve } from 'node:path';
2
2
  import { createResolver, defineNuxtModule, addPlugin, addImports, addTemplate, extendWebpackConfig, resolvePath } from '@nuxt/kit';
3
3
 
4
4
  const name = "@dargmuesli/nuxt-cookie-control";
5
- const version = "5.0.0-beta.1";
5
+ const version = "5.0.0-beta.3";
6
6
 
7
7
  const en = {
8
8
  accept: "Accept",
@@ -52,14 +52,14 @@
52
52
  v-text="localeStrings?.settingsUnsaved"
53
53
  />
54
54
  <div class="cookieControl__ModalContent">
55
- <div>
55
+ <div class="cookieControl__ModalContentInner">
56
56
  <slot name="modal" />
57
57
  <button
58
58
  class="cookieControl__ModalClose"
59
59
  @click="isModalActive = false"
60
60
  v-text="localeStrings?.close"
61
61
  />
62
- <div v-for="cookieType in CookieType" :key="cookieType">
62
+ <template v-for="cookieType in CookieType" :key="cookieType">
63
63
  <template v-if="moduleOptions.cookies[cookieType].length">
64
64
  <h3
65
65
  v-text="
@@ -80,14 +80,14 @@
80
80
  cookieType === CookieType.NECESSARY &&
81
81
  cookie.name !== 'functional'
82
82
  "
83
- :id="resolveTranslatable(cookie.name)"
83
+ :id="resolveTranslatable(cookie.name, props.locale)"
84
84
  type="checkbox"
85
85
  disabled
86
86
  checked
87
87
  />
88
88
  <input
89
89
  v-else
90
- :id="resolveTranslatable(cookie.name)"
90
+ :id="resolveTranslatable(cookie.name, props.locale)"
91
91
  type="checkbox"
92
92
  :checked="
93
93
  getCookieIds(localCookiesEnabled).includes(
@@ -102,7 +102,9 @@
102
102
  "
103
103
  @change="toogleCookie(cookie)"
104
104
  />
105
- <label :for="resolveTranslatable(cookie.name)">
105
+ <label
106
+ :for="resolveTranslatable(cookie.name, props.locale)"
107
+ >
106
108
  {{ getName(cookie.name) }}
107
109
  </label>
108
110
  <span class="cookieControl__ModalCookieName">
@@ -128,7 +130,7 @@
128
130
  </li>
129
131
  </ul>
130
132
  </template>
131
- </div>
133
+ </template>
132
134
  <div class="cookieControl__ModalButtons">
133
135
  <button
134
136
  @click="
@@ -176,7 +178,7 @@ import {
176
178
  getCookieIds,
177
179
  removeCookie,
178
180
  setCookie,
179
- useResolveTranslatable,
181
+ resolveTranslatable,
180
182
  } from '../methods'
181
183
 
182
184
  import { useCookieControl } from '#imports'
@@ -195,7 +197,6 @@ const {
195
197
  isModalActive,
196
198
  moduleOptions,
197
199
  } = useCookieControl()
198
- const resolveTranslatable = useResolveTranslatable(props.locale)
199
200
 
200
201
  // data
201
202
  const expires = new Date()
@@ -254,13 +255,11 @@ const toogleCookie = (cookie: Cookie) => {
254
255
  const getDescription = (description: Translatable) =>
255
256
  `${
256
257
  moduleOptions.isDashInDescriptionEnabled === false ? '' : '-'
257
- } ${resolveTranslatable(description)}`
258
+ } ${resolveTranslatable(description, props.locale)}`
258
259
  const getName = (name: Translatable) => {
259
260
  return name === 'functional'
260
261
  ? localeStrings.value?.cookiesFunctional
261
- : typeof name === 'string'
262
- ? name
263
- : name[props.locale]
262
+ : resolveTranslatable(name, props.locale)
264
263
  }
265
264
  const init = () => {
266
265
  expires.setTime(expires.getTime() + moduleOptions.cookieExpiryOffsetMs)
@@ -0,0 +1,3 @@
1
+ import { LocaleStrings } from '../types';
2
+ declare const _default: LocaleStrings;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ accept: "Q\u0259bul et",
3
+ acceptAll: "Ham\u0131s\u0131n\u0131 q\u0259bul et",
4
+ bannerDescription: "Biz \xF6z kukil\u0259rimizd\u0259n v\u0259 \xFC\xE7\xFCnc\xFC t\u0259r\u0259f kukil\u0259rind\u0259n istifad\u0259 edirik ki, biz bu veb-sayt\u0131 d\xFCzg\xFCn g\xF6st\u0259r\u0259 bil\u0259k v\u0259 t\u0259klif etdiyimiz xidm\u0259tl\u0259ri t\u0259kmill\u0259\u015Fdirm\u0259k m\u0259qs\u0259dil\u0259 bu veb-saytdan nec\u0259 istifad\u0259 olundu\u011Funu daha yax\u015F\u0131 ba\u015Fa d\xFC\u015F\u0259k. Kukid\u0259n istifad\u0259 icaz\u0259l\u0259ri il\u0259 ba\u011Fl\u0131 q\u0259rar bu bannerd\u0259 se\xE7im edildikd\u0259n sonra g\xF6r\xFCn\u0259c\u0259k kuki d\xFCym\u0259sind\u0259n istifad\u0259 etm\u0259kl\u0259 ist\u0259nil\u0259n vaxt d\u0259yi\u015Fdiril\u0259 bil\u0259r.",
5
+ bannerTitle: "Kukil\u0259r",
6
+ close: "Ba\u011Fla",
7
+ cookiesFunctional: "Funksional kukil\u0259r",
8
+ cookiesNecessary: "Z\u0259ruri kukil\u0259r",
9
+ cookiesOptional: "\u0130st\u0259y\u0259 ba\u011Fl\u0131 kukil\u0259r",
10
+ decline: "R\u0259dd et",
11
+ declineAll: "Ham\u0131s\u0131n\u0131 r\u0259dd et",
12
+ here: "burada",
13
+ iframeBlocked: "Bunu g\xF6rm\u0259k \xFC\xE7\xFCn funksional kukil\u0259ri aktiv edin",
14
+ manageCookies: "Kukil\u0259ri idar\u0259 et",
15
+ save: "Yadda saxla",
16
+ settingsUnsaved: "Yadda saxlanmam\u0131\u015F ayarlar\u0131n\u0131z var"
17
+ };
@@ -0,0 +1,3 @@
1
+ import { LocaleStrings } from '../types';
2
+ declare const _default: LocaleStrings;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ accept: "P\u0159ijmout",
3
+ acceptAll: "P\u0159ijmout v\u0161e",
4
+ bannerDescription: "Pou\u017E\xEDv\xE1me soubory cookie a cookie t\u0159et\xEDch stran, abychom mohli v\u0161e spr\xE1vn\u011B zobrazovat a l\xE9pe porozum\u011Bt tomu, jak tento web pou\u017E\xEDv\xE1te, s c\xEDlem zlep\u0161it nab\xEDzen\xE9 slu\u017Eby. Rozhodnut\xED lze kdykoli zm\u011Bnit pomoc\xED tla\u010D\xEDtka cookie, kter\xE9 se zobraz\xED po proveden\xED v\xFDb\u011Bru na tomto banneru.",
5
+ bannerTitle: "Cookies",
6
+ close: "Zav\u0159\xEDt",
7
+ cookiesFunctional: "Obslu\u017En\xE9 cookies",
8
+ cookiesNecessary: "Nezbytn\xE9 cookies",
9
+ cookiesOptional: "Voliteln\xE9 cookies",
10
+ decline: "Zam\xEDtnout",
11
+ declineAll: "Zam\xEDtnout v\u0161e",
12
+ here: "zde",
13
+ iframeBlocked: "Chcete-li ji zobrazit, povolte obslu\u017En\xE9 cookies",
14
+ manageCookies: "Dal\u0161\xED informace a p\u0159izp\u016Fsoben\xED",
15
+ save: "Ulo\u017Eit",
16
+ settingsUnsaved: "M\xE1te neulo\u017Een\xE1 nastaven\xED"
17
+ };
@@ -0,0 +1,3 @@
1
+ import { LocaleStrings } from '../types';
2
+ declare const _default: LocaleStrings;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ accept: "Accepter",
3
+ acceptAll: "Accepter alle",
4
+ bannerDescription: "Vi bruger vores egne cookies og tredjepartscookies, s\xE5 vi kan vise dig denne hjemmeside og bedre forst\xE5 hvordan du bruger den, med henblik p\xE5 at forbedre de tjenester som vi tilbyder. Du kan til enhver tid tr\xE6kke dit samtykke vedr. brug af cookies tilbage. Dette g\xF8res ved hj\xE6lp af cookie-knappen, der vises n\xE5r et valg er foretaget p\xE5 dette banner.",
5
+ bannerTitle: "Cookies",
6
+ close: "Luk",
7
+ cookiesFunctional: "Funktionelle cookies",
8
+ cookiesNecessary: "N\xF8dvendige cookies",
9
+ cookiesOptional: "Valgfrie cookies",
10
+ decline: "Afvis",
11
+ declineAll: "Afvis alle",
12
+ here: "Her",
13
+ iframeBlocked: "For at se dette skal du aktivere funktionelle cookies",
14
+ manageCookies: "L\xE6s mere og tilpas",
15
+ save: "Gem",
16
+ settingsUnsaved: "Du har indstillinger, der ikke er gemt"
17
+ };
@@ -0,0 +1,3 @@
1
+ import { LocaleStrings } from '../types';
2
+ declare const _default: LocaleStrings;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ accept: "\uD5C8\uC6A9\uD558\uAE30",
3
+ acceptAll: "\uBAA8\uB450 \uD5C8\uC6A9\uD558\uAE30",
4
+ bannerDescription: "\uB2F9\uC0AC\uAC00 \uC81C\uACF5\uD558\uB294 \uC11C\uBE44\uC2A4\uB97C \uAC1C\uC120\uD558\uAE30 \uC704\uD574 \uADC0\uD558\uC5D0\uAC8C \uC774 \uC6F9\uC0AC\uC774\uD2B8\uB97C \uBCF4\uC5EC\uC8FC\uACE0 \uADC0\uD558\uC758 \uC0AC\uC6A9 \uBC29\uBC95\uC744 \uB354 \uC798 \uC774\uD574\uD560 \uC218 \uC788\uB3C4\uB85D \uC790\uCCB4 \uCFE0\uD0A4 \uBC0F \uD0C0\uC0AC \uCFE0\uD0A4\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uD0D0\uC0C9\uC744 \uACC4\uC18D\uD55C\uB2E4\uBA74 \uCFE0\uD0A4\uB97C \uD5C8\uC6A9\uD55C \uAC83\uC73C\uB85C \uAC04\uC8FC\uB429\uB2C8\uB2E4.",
5
+ bannerTitle: "\uCFE0\uD0A4",
6
+ close: "\uB2EB\uAE30",
7
+ cookiesFunctional: "\uAE30\uB2A5\uC801 \uCFE0\uD0A4",
8
+ cookiesNecessary: "\uD544\uC218 \uCFE0\uD0A4\uD0A4",
9
+ cookiesOptional: "\uC120\uD0DD\uC801 \uCFE0\uD0A4",
10
+ decline: "\uAC70\uBD80\uD558\uAE30",
11
+ declineAll: "\uBAA8\uB450 \uAC70\uBD80\uD558\uAE30",
12
+ here: "\uC5EC\uAE30",
13
+ iframeBlocked: "\uC774 \uCF58\uD150\uCE20\uB97C \uBCFC \uC218 \uC788\uB3C4\uB85D \uAE30\uB2A5\uC801 \uCFE0\uD0A4\uB97C \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",
14
+ manageCookies: "\uCFE0\uD0A4 \uAD00\uB9AC",
15
+ save: "\uC800\uC7A5\uD558\uAE30",
16
+ settingsUnsaved: "\uBCC0\uACBD \uC0AC\uD56D\uC774 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."
17
+ };
@@ -0,0 +1,3 @@
1
+ import { LocaleStrings } from '../types';
2
+ declare const _default: LocaleStrings;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ accept: "Sutinku",
3
+ acceptAll: "Sutinku su visais",
4
+ bannerDescription: "Mes naudojame savo slapukus and tre\u010Di\u0173j\u0173 \u0161ali\u0173 slapukus tam, kad gal\u0117tume geriau suprasti kaip svetain\u0117 veikia ir yra naudojama bei tobulinti savo teikiamas paslaugas. J\u016Bs bet kuriuo metu galite pakeisti sutikim\u0105 d\u0117l slapuk\u0173 naudojimo paspaud\u0119 slapuk\u0173 mygtuk\u0105 kuris atsiras kai \u0161ioje reklamjuost\u0117je padarysite pasirinkim\u0105.",
5
+ bannerTitle: "Slapukai",
6
+ close: "U\u017Edaryti",
7
+ cookiesFunctional: "Funkciniai slapukai",
8
+ cookiesNecessary: "B\u016Btinieji slapukai",
9
+ cookiesOptional: "Pasirinktiniai slapukai",
10
+ decline: "At\u0161aukti",
11
+ declineAll: "At\u0161aukti visk\u0105",
12
+ here: "\u010Dia",
13
+ iframeBlocked: "Nor\u0117dami matyti, leiskite naudoti funkcinius slapukus",
14
+ manageCookies: "Su\u017Einoti daugiau ir pritaikyti",
15
+ save: "I\u0161saugoti",
16
+ settingsUnsaved: "J\u016Bs nei\u0161saugojote vis\u0173 nustatym\u0173"
17
+ };
@@ -0,0 +1,3 @@
1
+ import { LocaleStrings } from '../types';
2
+ declare const _default: LocaleStrings;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ accept: "Prija\u0165",
3
+ acceptAll: "Prija\u0165 v\u0161etko",
4
+ bannerDescription: "S\xFAbory cookie a s\xFAbory cookie tret\xEDch str\xE1n pou\u017E\xEDvame na to, aby sme mohli v\u0161etko spr\xE1vne zobrazi\u0165 a lep\u0161ie pochopi\u0165, ako pou\u017E\xEDvate t\xFAto webov\xFA lokalitu, aby sme mohli zlep\u0161i\u0165 pon\xFAkan\xE9 slu\u017Eby. Rozhodnutia m\xF4\u017Eete kedyko\u013Evek zmeni\u0165 pomocou tla\u010Didla cookie, ktor\xE9 sa zobraz\xED po vykonan\xED v\xFDberu na tomto banneri.",
5
+ bannerTitle: "Cookies",
6
+ close: "Zatvori\u0165",
7
+ cookiesFunctional: "Obslu\u017En\xE9 cookies",
8
+ cookiesNecessary: "Nevyhnutn\xE9 cookies",
9
+ cookiesOptional: "Volite\u013En\xE9 cookies",
10
+ decline: "Odmietnu\u0165",
11
+ declineAll: "Odmietnu\u0165 v\u0161etky",
12
+ here: "tu",
13
+ iframeBlocked: "Ak ho chcete zobrazi\u0165, povo\u013Ete obslu\u017En\xE9 cookies",
14
+ manageCookies: "\u010Eal\u0161ie inform\xE1cie a prisp\xF4sobenie",
15
+ save: "Ulo\u017Ei\u0165",
16
+ settingsUnsaved: "M\xE1te neulo\u017Een\xE9 nastavenia"
17
+ };
@@ -0,0 +1,3 @@
1
+ import { LocaleStrings } from '../types';
2
+ declare const _default: LocaleStrings;
3
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ accept: "Kabul etmek",
3
+ acceptAll: "T\xFCm\xFCn\xFC kabul et",
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
+ bannerTitle: "\xC7erezler",
6
+ close: "Kapat",
7
+ cookiesFunctional: "\u0130\u015Flevsel \xE7erezler",
8
+ cookiesNecessary: "Gerekli \xE7erezler",
9
+ cookiesOptional: "\u0130ste\u011Fe ba\u011Fl\u0131 \xE7erezler",
10
+ decline: "Reddetmek",
11
+ declineAll: "T\xFCm\xFCn\xFC reddet",
12
+ here: "here",
13
+ iframeBlocked: "Bunu g\xF6rmek i\xE7in l\xFCtfen i\u015Flevsel \xE7erezleri etkinle\u015Ftirin",
14
+ manageCookies: "\xC7erezleri y\xF6net",
15
+ save: "Kaydet",
16
+ settingsUnsaved: "Kaydedilmemi\u015F ayarlar mevcut"
17
+ };
@@ -1,7 +1,9 @@
1
- .cookieControl__Modal-enter-active, .cookieControl__Modal-leave-active {
1
+ .cookieControl__Modal-enter-active,
2
+ .cookieControl__Modal-leave-active {
2
3
  transition: opacity 0.25s;
3
4
  }
4
- .cookieControl__Modal-enter, .cookieControl__Modal-leave-to {
5
+ .cookieControl__Modal-enter,
6
+ .cookieControl__Modal-leave-to {
5
7
  opacity: 0;
6
8
  }
7
9
  .cookieControl__Bar--center {
@@ -9,16 +11,40 @@
9
11
  left: 50%;
10
12
  transform: translate(-50%, -50%);
11
13
  }
12
- .cookieControl__Bar--center-enter-active, .cookieControl__Bar--top-left-enter-active, .cookieControl__Bar--top-full-enter-active, .cookieControl__Bar--top-right-enter-active, .cookieControl__Bar--bottom-left-enter-active, .cookieControl__Bar--bottom-full-enter-active, .cookieControl__Bar--bottom-right-enter-active, .cookieControl__Bar--center-leave-active, .cookieControl__Bar--top-left-leave-active, .cookieControl__Bar--top-full-leave-active, .cookieControl__Bar--top-right-leave-active, .cookieControl__Bar--bottom-left-leave-active, .cookieControl__Bar--bottom-full-leave-active, .cookieControl__Bar--bottom-right-leave-active {
14
+ .cookieControl__Bar--center-enter-active,
15
+ .cookieControl__Bar--top-left-enter-active,
16
+ .cookieControl__Bar--top-full-enter-active,
17
+ .cookieControl__Bar--top-right-enter-active,
18
+ .cookieControl__Bar--bottom-left-enter-active,
19
+ .cookieControl__Bar--bottom-full-enter-active,
20
+ .cookieControl__Bar--bottom-right-enter-active,
21
+ .cookieControl__Bar--center-leave-active,
22
+ .cookieControl__Bar--top-left-leave-active,
23
+ .cookieControl__Bar--top-full-leave-active,
24
+ .cookieControl__Bar--top-right-leave-active,
25
+ .cookieControl__Bar--bottom-left-leave-active,
26
+ .cookieControl__Bar--bottom-full-leave-active,
27
+ .cookieControl__Bar--bottom-right-leave-active {
13
28
  transition: transform 0.25s;
14
29
  }
15
- .cookieControl__Bar--top-left-enter, .cookieControl__Bar--top-full-enter, .cookieControl__Bar--top-right-enter, .cookieControl__Bar--top-left-leave-to, .cookieControl__Bar--top-full-leave-to, .cookieControl__Bar--top-right-leave-to {
30
+ .cookieControl__Bar--top-left-enter,
31
+ .cookieControl__Bar--top-full-enter,
32
+ .cookieControl__Bar--top-right-enter,
33
+ .cookieControl__Bar--top-left-leave-to,
34
+ .cookieControl__Bar--top-full-leave-to,
35
+ .cookieControl__Bar--top-right-leave-to {
16
36
  transform: translateY(-100%);
17
37
  }
18
- .cookieControl__Bar--bottom-left-enter, .cookieControl__Bar--bottom-full-enter, .cookieControl__Bar--bottom-right-enter, .cookieControl__Bar--bottom-left-leave-to, .cookieControl__Bar--bottom-right-leave-to, .cookieControl__Bar--bottom-full-leave-to {
38
+ .cookieControl__Bar--bottom-left-enter,
39
+ .cookieControl__Bar--bottom-full-enter,
40
+ .cookieControl__Bar--bottom-right-enter,
41
+ .cookieControl__Bar--bottom-left-leave-to,
42
+ .cookieControl__Bar--bottom-right-leave-to,
43
+ .cookieControl__Bar--bottom-full-leave-to {
19
44
  transform: translateY(100%);
20
45
  }
21
- .cookieControl__Bar--center-enter, .cookieControl__Bar--center-leave-to {
46
+ .cookieControl__Bar--center-enter,
47
+ .cookieControl__Bar--center-leave-to {
22
48
  transform: translate(-50%, -50%) scale(0.95);
23
49
  }
24
50
  .cookieControl {
@@ -37,9 +63,10 @@
37
63
  .cookieControl__Bar {
38
64
  position: fixed;
39
65
  background-color: var(--cookie-control-barBackground);
40
- font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
66
+ font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
41
67
  }
42
- .cookieControl__Bar h3, .cookieControl__Bar p {
68
+ .cookieControl__Bar h3,
69
+ .cookieControl__Bar p {
43
70
  color: var(--cookie-control-barTextColor);
44
71
  max-width: 900px;
45
72
  }
@@ -68,7 +95,8 @@
68
95
  align-items: flex-end;
69
96
  justify-content: space-between;
70
97
  }
71
- .cookieControl__Bar--top-full, .cookieControl__Bar--bottom-full {
98
+ .cookieControl__Bar--top-full,
99
+ .cookieControl__Bar--bottom-full {
72
100
  left: 0;
73
101
  right: 0;
74
102
  }
@@ -78,25 +106,41 @@
78
106
  .cookieControl__Bar--bottom-full {
79
107
  bottom: 0;
80
108
  }
81
- .cookieControl__Bar--center p, .cookieControl__Bar--top-left p, .cookieControl__Bar--top-right p, .cookieControl__Bar--bottom-left p, .cookieControl__Bar--bottom-right p {
109
+ .cookieControl__Bar--center p,
110
+ .cookieControl__Bar--top-left p,
111
+ .cookieControl__Bar--top-right p,
112
+ .cookieControl__Bar--bottom-left p,
113
+ .cookieControl__Bar--bottom-right p {
82
114
  max-width: 400px;
83
115
  }
84
- .cookieControl__Bar--center .cookieControl__BarContainer, .cookieControl__Bar--top-left .cookieControl__BarContainer, .cookieControl__Bar--top-right .cookieControl__BarContainer, .cookieControl__Bar--bottom-left .cookieControl__BarContainer, .cookieControl__Bar--bottom-right .cookieControl__BarContainer {
116
+ .cookieControl__Bar--center .cookieControl__BarContainer,
117
+ .cookieControl__Bar--top-left .cookieControl__BarContainer,
118
+ .cookieControl__Bar--top-right .cookieControl__BarContainer,
119
+ .cookieControl__Bar--bottom-left .cookieControl__BarContainer,
120
+ .cookieControl__Bar--bottom-right .cookieControl__BarContainer {
85
121
  flex-direction: column;
86
122
  }
87
- .cookieControl__Bar--center .cookieControl__BarButtons, .cookieControl__Bar--top-left .cookieControl__BarButtons, .cookieControl__Bar--top-right .cookieControl__BarButtons, .cookieControl__Bar--bottom-left .cookieControl__BarButtons, .cookieControl__Bar--bottom-right .cookieControl__BarButtons {
123
+ .cookieControl__Bar--center .cookieControl__BarButtons,
124
+ .cookieControl__Bar--top-left .cookieControl__BarButtons,
125
+ .cookieControl__Bar--top-right .cookieControl__BarButtons,
126
+ .cookieControl__Bar--bottom-left .cookieControl__BarButtons,
127
+ .cookieControl__Bar--bottom-right .cookieControl__BarButtons {
88
128
  margin-top: 20px;
89
129
  }
90
- .cookieControl__Bar--top-left, .cookieControl__Bar--top-right {
130
+ .cookieControl__Bar--top-left,
131
+ .cookieControl__Bar--top-right {
91
132
  top: 20px;
92
133
  }
93
- .cookieControl__Bar--bottom-left, .cookieControl__Bar--bottom-right {
134
+ .cookieControl__Bar--bottom-left,
135
+ .cookieControl__Bar--bottom-right {
94
136
  bottom: 20px;
95
137
  }
96
- .cookieControl__Bar--top-left, .cookieControl__Bar--bottom-left {
138
+ .cookieControl__Bar--top-left,
139
+ .cookieControl__Bar--bottom-left {
97
140
  left: 20px;
98
141
  }
99
- .cookieControl__Bar--top-right, .cookieControl__Bar--bottom-right {
142
+ .cookieControl__Bar--top-right,
143
+ .cookieControl__Bar--bottom-right {
100
144
  right: 20px;
101
145
  }
102
146
  .cookieControl__BarButtons {
@@ -113,14 +157,14 @@
113
157
  text-align: center;
114
158
  }
115
159
  .cookieControl__Modal:before {
116
- content: "";
160
+ content: '';
117
161
  min-height: 100vh;
118
162
  display: inline-block;
119
163
  vertical-align: middle;
120
164
  }
121
165
  .cookieControl__Modal:after {
122
166
  position: absolute;
123
- content: "";
167
+ content: '';
124
168
  top: 0;
125
169
  left: 0;
126
170
  right: 0;
@@ -131,7 +175,6 @@
131
175
  }
132
176
  .cookieControl__Modal > div {
133
177
  font-size: initial;
134
- padding-top: 80px;
135
178
  }
136
179
  .cookieControl__Modal button {
137
180
  color: var(--cookie-control-modalButtonColor);
@@ -159,7 +202,7 @@
159
202
  }
160
203
  .cookieControl__ModalContent h3 {
161
204
  font-size: 24px;
162
- margin: 50px 0 25px;
205
+ margin: 15px 0px;
163
206
  }
164
207
  .cookieControl__ModalContent h3:first-of-type {
165
208
  margin-top: 0;
@@ -211,7 +254,7 @@
211
254
  }
212
255
  .cookieControl__ModalContent label:before {
213
256
  position: absolute;
214
- content: "";
257
+ content: '';
215
258
  top: 50%;
216
259
  left: 3px;
217
260
  width: 15px;
@@ -221,6 +264,11 @@
221
264
  transform: translate3d(0, -50%, 0);
222
265
  background-color: var(--cookie-control-checkboxInactiveCircleBackground);
223
266
  }
267
+ .cookieControl__ModalContentInner {
268
+ display: flex;
269
+ flex-direction: column;
270
+ gap: 10px;
271
+ }
224
272
  .cookieControl__ModalInputWrapper {
225
273
  display: flex;
226
274
  align-items: flex-start;
@@ -234,17 +282,15 @@
234
282
  text-transform: none;
235
283
  }
236
284
  .cookieControl__ModalClose {
237
- position: absolute;
285
+ align-self: flex-end;
238
286
  top: 20px;
239
287
  right: 20px;
240
288
  }
241
289
  .cookieControl__ModalButtons {
242
290
  display: flex;
243
- margin-top: 80px;
244
- align-items: flex-start;
245
- }
246
- .cookieControl__ModalButtons button + button {
247
- margin-left: 20px;
291
+ margin-top: 40px;
292
+ align-items: stretch;
293
+ gap: 20px;
248
294
  }
249
295
  .cookieControl__ModalUnsaved {
250
296
  position: absolute;
@@ -259,24 +305,30 @@
259
305
  padding: 20px;
260
306
  border: 2px solid #ddd;
261
307
  }
262
- .cookieControl__BlockedIframe p, .cookieControl__BlockedIframe a {
263
- font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
308
+ .cookieControl__BlockedIframe p,
309
+ .cookieControl__BlockedIframe a {
310
+ font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
264
311
  }
265
312
  @media screen and (max-width: 768px) {
266
313
  .cookieControl__Bar {
267
314
  flex-direction: column;
268
315
  left: 0;
269
316
  right: 0;
270
- }
271
- .cookieControl__Bar p, .cookieControl__Bar h3 {
317
+ }
318
+ .cookieControl__Bar p,
319
+ .cookieControl__Bar h3 {
272
320
  max-width: 100%;
273
- }
274
- .cookieControl__Bar--top-full, .cookieControl__Bar--top-left, .cookieControl__Bar--top-right {
321
+ }
322
+ .cookieControl__Bar--top-full,
323
+ .cookieControl__Bar--top-left,
324
+ .cookieControl__Bar--top-right {
275
325
  top: 0;
276
- }
277
- .cookieControl__Bar--bottom-full, .cookieControl__Bar--bottom-left, .cookieControl__Bar--bottom-right {
326
+ }
327
+ .cookieControl__Bar--bottom-full,
328
+ .cookieControl__Bar--bottom-left,
329
+ .cookieControl__Bar--bottom-right {
278
330
  bottom: 0;
279
- }
331
+ }
280
332
  .cookieControl__ModalContent {
281
333
  position: absolute;
282
334
  top: 0;
@@ -285,29 +337,28 @@
285
337
  bottom: 0;
286
338
  max-width: none;
287
339
  max-height: 100%;
288
- padding: 80px 20px 20px;
289
- }
340
+ padding: 20px;
341
+ }
290
342
  .cookieControl__BarButtons {
291
343
  width: 100%;
292
344
  margin-top: 20px;
293
345
  flex-direction: column;
294
346
  justify-content: center;
295
- }
347
+ }
296
348
  .cookieControl__BarButtons button {
297
349
  width: 100%;
298
- }
350
+ }
299
351
  .cookieControl__BarButtons button + button {
300
352
  margin: 10px 0 0;
301
- }
302
- .cookieControl__BarContainer, .cookieControl__ModalButtons {
353
+ }
354
+ .cookieControl__BarContainer,
355
+ .cookieControl__ModalButtons {
303
356
  flex-direction: column;
304
- }
357
+ gap: 0;
358
+ }
305
359
  .cookieControl__ModalButtons button {
306
360
  width: 100%;
307
- }
308
- .cookieControl__ModalButtons button + button {
309
- margin: 10px 0 0;
310
- }
361
+ }
311
362
  }
312
363
  .cookieControl__ControlButton {
313
364
  position: fixed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-cookie-control",
3
- "version": "5.0.0-beta.1",
3
+ "version": "5.0.0-beta.3",
4
4
  "description": "Nuxt Cookies Control Module",
5
5
  "author": "Dario Ferderber <dario.ferderber@broj42.com>",
6
6
  "maintainers": [
@@ -36,33 +36,31 @@
36
36
  "lint": "pnpm prepack && eslint --ext .js,.ts,.vue . && nuxi typecheck playground"
37
37
  },
38
38
  "dependencies": {
39
- "@nuxt/kit": "3.1.1",
40
- "@sindresorhus/slugify": "2.1.1",
39
+ "@nuxt/kit": "3.2.2",
40
+ "@sindresorhus/slugify": "2.2.0",
41
41
  "css-vars-ponyfill": "2.4.8",
42
42
  "js-cookie": "3.0.1",
43
43
  "string-replace-loader": "3.1.0"
44
44
  },
45
45
  "devDependencies": {
46
+ "@dargmuesli/nuxt-cookie-control": "link:.",
46
47
  "@nuxt/module-builder": "0.2.1",
47
48
  "@nuxtjs/eslint-config-typescript": "12.0.0",
48
- "@types/js-cookie": "3.0.2",
49
- "eslint": "8.33.0",
49
+ "@types/js-cookie": "3.0.3",
50
+ "eslint": "8.34.0",
50
51
  "eslint-config-prettier": "8.6.0",
51
52
  "eslint-plugin-prettier": "4.2.1",
52
53
  "husky": "8.0.3",
53
- "lint-staged": "13.1.0",
54
- "nuxt": "3.1.1",
55
- "prettier": "2.8.3",
56
- "typescript": "4.9.4",
57
- "vue": "3.2.45",
58
- "vue-tsc": "1.0.24",
54
+ "lint-staged": "13.1.2",
55
+ "nuxt": "3.2.2",
56
+ "prettier": "2.8.4",
57
+ "typescript": "4.9.5",
58
+ "vue": "3.2.47",
59
+ "vue-tsc": "1.1.7",
59
60
  "webpack": "5.75.0"
60
61
  },
61
- "resolutions": {
62
- "@dargmuesli/nuxt-cookie-control": "link:./"
63
- },
64
62
  "publishConfig": {
65
63
  "access": "public"
66
64
  },
67
- "scheduleVersion": "2.2.2"
65
+ "scheduleVersion": "4.4.1"
68
66
  }