@owlmeans/web-consent 0.1.18-rc.23 → 0.1.18-rc.25
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 +1 -1
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/web-consent/SKILL.md +71 -8
- package/build/consent/component.d.ts +0 -8
- package/build/consent/component.d.ts.map +1 -1
- package/build/consent/component.js +17 -2
- package/build/consent/component.js.map +1 -1
- package/build/consent/toggle.d.ts +15 -0
- package/build/consent/toggle.d.ts.map +1 -1
- package/build/consent/toggle.js +22 -1
- package/build/consent/toggle.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/policy/component.d.ts +6 -0
- package/build/policy/component.d.ts.map +1 -1
- package/build/policy/component.js +23 -1
- package/build/policy/component.js.map +1 -1
- package/build/types.d.ts +8 -1
- package/build/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/consent/component.tsx +38 -17
- package/src/consent/toggle.tsx +59 -29
- package/src/index.ts +2 -2
- package/src/policy/component.tsx +80 -6
- package/src/types.ts +8 -1
- package/tests/a11y.spec.ts +117 -0
- package/tests/bundle.spec.ts +36 -0
- package/tests/consent.spec.ts +123 -0
- package/tests/harness/mount.tsx +25 -1
- package/tests/harness/styled.css +54 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
6
6
|
your project's skill store (`.agents/skills/`):
|
|
7
7
|
|
|
8
8
|
```sh
|
|
9
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
9
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.31
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/web-consent",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.25",
|
|
5
|
+
"generatedAt": "2026-09-21T22:31:59.029Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/web-consent
|
|
9
9
|
|
|
10
10
|
**Layer:** Web (React)
|
|
11
|
-
**Install:** `"@owlmeans/web-consent": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/web-consent": "^0.1.18-rc.25"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
The browser components of the consent set. The model — categories, storage, migration, the store,
|
|
14
14
|
Consent Mode signalling — is `@owlmeans/consent`, and this package re-exports a **named selection**
|
|
@@ -41,7 +41,7 @@ components — see below.
|
|
|
41
41
|
| `useConsent(opts?)` | This document's consent state and the actions over it (`UseConsentModel`) — **it also initialises the store on mount**, see below |
|
|
42
42
|
| `useConsentCategory(key)` | Whether one category is granted, for a component gating a single thing |
|
|
43
43
|
| `CookieConsentProps` / `CookiePolicyProps` / `ConsentLink` | The component props |
|
|
44
|
-
| Re-exports from `@owlmeans/consent` | The complete list: `consentStore`, `openConsent`, `isConsented`, `readConsent`, `writeConsent`, `clearConsent`, `migrateConsent`, `applyConsent`, `pushConsentDefaults`, `consentBootstrapScript`, `consentDefaults`, `consentUpdate`, `gtagConsent`, `DEFAULT_CONSENT_CATEGORIES`, `DEFAULT_CONSENT_MESSAGES`, `defaultConsentTranslate`, `interpolate`, `CONSENT_KEY`, `CONSENT_COOKIE_DAYS`, `CONSENT_SCHEMA_VERSION`, `CONSENT_LOCALES`, `CONSENT_ESSENTIAL` / `CONSENT_ANALYTICS` / `CONSENT_MARKETING`, and the types `ConsentCategory`, `ConsentOptions`, `ConsentReason`, `ConsentRecord`, `ConsentSignal`, `ConsentState`, `ConsentStore`, `ConsentLocale` |
|
|
44
|
+
| Re-exports from `@owlmeans/consent` | The complete list: `consentStore`, `openConsent`, `isConsented`, `readConsent`, `writeConsent`, `clearConsent`, `migrateConsent`, `applyConsent`, `pushConsentDefaults`, `consentBootstrapScript`, `consentDefaults`, `consentUpdate`, `gtagConsent`, `DEFAULT_CONSENT_CATEGORIES`, `DEFAULT_CONSENT_MESSAGES`, `defaultConsentTranslate`, `interpolate`, `CONSENT_KEY`, `CONSENT_COOKIE_DAYS`, `CONSENT_SCHEMA_VERSION`, `CONSENT_LOCALES`, `CONSENT_ESSENTIAL` / `CONSENT_ANALYTICS` / `CONSENT_MARKETING`, and the types `ConsentCategory`, `ConsentOptions`, `ConsentReason`, `ConsentRecord`, `ConsentService`, `ConsentSignal`, `ConsentState`, `ConsentStore`, `ConsentLocale` |
|
|
45
45
|
|
|
46
46
|
## Mounting the dialog
|
|
47
47
|
|
|
@@ -63,7 +63,7 @@ import { CookieConsent } from '@owlmeans/web-consent'
|
|
|
63
63
|
goes for `storageKey`, `cookieDays` and `cookieDomain`.
|
|
64
64
|
- `locale` picks the packaged language; leave it unset and English is used, so an app with a
|
|
65
65
|
language of its own passes it (or mounts `PanelCookieConsent`, which does). A region tag is
|
|
66
|
-
reduced to its base (`pl-PL` → `pl`), and anything outside
|
|
66
|
+
reduced to its base (`pl-PL` → `pl`), and anything outside `CONSENT_LOCALES` falls back to English.
|
|
67
67
|
- `policyHref` is a plain string, so an app-resolved path, a framework route and a raw href all
|
|
68
68
|
work — the component must not know how its host does routing.
|
|
69
69
|
- `noReopenButton` hides the floating button for an app that offers a footer link instead; that link
|
|
@@ -72,8 +72,42 @@ import { CookieConsent } from '@owlmeans/web-consent'
|
|
|
72
72
|
filled background, no border, no shadow, no hover-scale — `bg-transparent`, dimmed
|
|
73
73
|
(`opacity-70`) at rest and picked out on hover/focus — because it sits on every page of a site
|
|
74
74
|
for as long as a visitor stays and must read as a small fixture rather than compete with the
|
|
75
|
-
page's own controls. The pictogram
|
|
76
|
-
|
|
75
|
+
page's own controls. The pictogram is 20px (`h-5 w-5`) inside an invisible 44px hit area
|
|
76
|
+
(`h-11 w-11`). `[data-consent-reopen]` is what any test or CSS override keys on.
|
|
77
|
+
|
|
78
|
+
## The look — flat, from the host's tokens
|
|
79
|
+
|
|
80
|
+
The dialog is the first thing every new visitor of a generated app sees, so it follows the flat
|
|
81
|
+
rule those apps are held to: **no gradient, shadow, glow, glass or `backdrop-filter`** anywhere in
|
|
82
|
+
it. Everything is a theme token, so light and dark follow the host:
|
|
83
|
+
|
|
84
|
+
| Part | Classes |
|
|
85
|
+
|---|---|
|
|
86
|
+
| Overlay | `bg-black/70`, flat — no blur |
|
|
87
|
+
| Card | `rounded-3xl border border-border bg-background text-foreground`, no shadow or ring |
|
|
88
|
+
| Icon | `rounded-full bg-muted text-primary` |
|
|
89
|
+
| Category row | `rounded-2xl border border-border`; *Required* is plain uppercase muted text, never a badge |
|
|
90
|
+
| Switch | `bg-primary` on / `bg-muted-foreground/40` off, white knob; 44px hit area around the 24×44 track |
|
|
91
|
+
| Accept | the one accent pill — `rounded-full bg-primary text-primary-foreground min-h-11` |
|
|
92
|
+
| Save, policy *Manage preferences* | outlined pill — `rounded-full border-[1.5px] border-foreground bg-transparent`, `hover:bg-muted` |
|
|
93
|
+
| Links | muted, underlined at rest, `min-h-11` |
|
|
94
|
+
|
|
95
|
+
Every control shows a 3px `outline-ring` focus outline 3px off the element (`outline-3
|
|
96
|
+
outline-offset-3`; the switch draws it on its track through `peer-focus-visible`). An outline, not
|
|
97
|
+
a ring, so a host that zeroes shadows keeps it. Never reintroduce a decorative class here — the
|
|
98
|
+
package tests fail on `bg-gradient`, `backdrop-`, `blur`, `shadow` or `ring-primary` in the dialog.
|
|
99
|
+
|
|
100
|
+
**Each switch is named by reference.** The `<label>` around a switch's checkbox holds only the
|
|
101
|
+
drawn track, and the category's words sit in a sibling column it cannot reach, so the checkbox
|
|
102
|
+
carries `aria-labelledby="<id>-label"` (the category label) and `aria-describedby` pointing at
|
|
103
|
+
`<id>-required` and `<id>-desc`. Drop those and axe reports three unnamed checkboxes (`label`,
|
|
104
|
+
critical). A required category stays `disabled` and keeps its name.
|
|
105
|
+
|
|
106
|
+
`tests/a11y.spec.ts` runs axe-core (a dev dependency) against the open dialog in both schemes, the
|
|
107
|
+
re-open button, and the policy page with services, and fails on any serious or critical
|
|
108
|
+
violation. It loads the harness with `?styled=1` (plus `&theme=dark`), which compiles the package
|
|
109
|
+
sources with a generated app's neutral tokens — contrast cannot be judged on the unstyled harness
|
|
110
|
+
the other specs need.
|
|
77
111
|
- `silent` skips every `dataLayer` and global write. It is for tests and for an app that runs no
|
|
78
112
|
tags at all.
|
|
79
113
|
- The draft is **re-seeded from storage every time the dialog opens**, not from the last render — a
|
|
@@ -145,13 +179,35 @@ why it is generated rather than written: a hand-written policy drifts the first
|
|
|
145
179
|
changes, and nobody notices because nobody reads it until it matters.
|
|
146
180
|
|
|
147
181
|
```tsx
|
|
148
|
-
|
|
182
|
+
import { googleTagServices } from '@owlmeans/web-gtm'
|
|
183
|
+
|
|
184
|
+
<CookiePolicy
|
|
185
|
+
operator="Example Sp. z o.o." privacyHref="/legal/privacy" termsHref="/legal/terms"
|
|
186
|
+
services={googleTag !== '' ? googleTagServices(googleTag) : undefined}
|
|
187
|
+
/>
|
|
149
188
|
```
|
|
150
189
|
|
|
151
190
|
Everything OwlMeans cannot assert on the operator's behalf — who the controller is, the lawful
|
|
152
191
|
basis, how to exercise rights — is deferred to those two links. It also renders a *Manage
|
|
153
192
|
preferences* control, so the policy page is a way back into the decision.
|
|
154
193
|
|
|
194
|
+
**`services`** (`ConsentService[]`, see the `consent` skill) discloses WHO receives data: each
|
|
195
|
+
service is listed inside the item of the category whose `key` it names — name, provider, purpose,
|
|
196
|
+
cookie names in `<code>`, and a link to the provider's privacy policy (new tab). A service whose
|
|
197
|
+
category is not among `categories` goes into a trailing *Other services* item rather than being
|
|
198
|
+
dropped. Without `services` the page renders exactly as it always has.
|
|
199
|
+
|
|
200
|
+
The structure stays one `h1` and lists: categories are `li`s, a category's services are a nested
|
|
201
|
+
`ul` named by `aria-label` (*Services — ‹category label›*), each service a `li` holding a `dl`.
|
|
202
|
+
Never add headings for categories or services — they would skip a level under the `h1`. Test and
|
|
203
|
+
CSS hooks: `[data-cookie-policy-category="<key>"]`, `[data-cookie-policy-services]`,
|
|
204
|
+
`[data-cookie-policy-service]`, `[data-cookie-policy-other]`.
|
|
205
|
+
|
|
206
|
+
The service labels (`policyProvider`, `policyPurpose`, `policyCookies`, `policyServicesOf`,
|
|
207
|
+
`policyServicePrivacy`, `policyOtherServices`, `policyOtherServicesDesc`) go through `translate`
|
|
208
|
+
with English defaults and are in the packaged bundle for every locale; the service's own `name`,
|
|
209
|
+
`provider` and `purpose` are data and render as given.
|
|
210
|
+
|
|
155
211
|
## Tailwind — one `@source` line, pointing at `src`
|
|
156
212
|
|
|
157
213
|
The components emit Tailwind classes that exist nowhere in the consumer's own sources, and
|
|
@@ -188,7 +244,13 @@ Describe a glob in words, or keep it out of the comment.
|
|
|
188
244
|
## i18n
|
|
189
245
|
|
|
190
246
|
Given no `translate` prop, the components resolve every string through the packaged bundle for
|
|
191
|
-
`locale` —
|
|
247
|
+
`locale` — every language in `CONSENT_LOCALES` (the framework's seven plus French). The bundle
|
|
248
|
+
lives in `@owlmeans/consent` (`src/i18n/<locale>.json`); a new key goes into every one of them,
|
|
249
|
+
and that package's tests fail on a missing key or a dropped `{{placeholder}}` in any locale.
|
|
250
|
+
This package's `tests/bundle.spec.ts` reads every `t('…')` literal from the components, so a new
|
|
251
|
+
string without an English bundle entry fails there. A JSON-only edit is not re-emitted by an
|
|
252
|
+
incremental `tsc -b` — rebuild `@owlmeans/consent` with `tsc -b --force`, or consumers keep the old
|
|
253
|
+
bundle from `build/i18n`. **Once a `translate` prop is given,
|
|
192
254
|
the packaged bundle is not consulted at all**, so a wrapper that forwards a framework resolver alone
|
|
193
255
|
renders the English default for every key the application has not overridden, in every language. The
|
|
194
256
|
resolver must fall through to `defaultConsentTranslate(locale)` for the default — which is exactly
|
|
@@ -207,7 +269,8 @@ caller's, already resolved.
|
|
|
207
269
|
|
|
208
270
|
- `consent` — the model: categories, `globalVar`, storage and migration, Consent Mode v2, the
|
|
209
271
|
ordering rule. Read it before changing anything a category means
|
|
210
|
-
- `web-gtm` — the head snippet that carries a stored decision to
|
|
272
|
+
- `web-gtm` — the head snippet that carries a stored decision to a Google tag, and
|
|
273
|
+
`googleTagServices(id)` for this page's `services`
|
|
211
274
|
- `astro` — stamping that snippet from a static site's layout
|
|
212
275
|
- `login-methods` / `login-plugins` — the sign-in precondition that raises this dialog with
|
|
213
276
|
`reason: 'login'`
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { CookieConsentProps } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* The cookie preferences dialog, and the button that brings it back.
|
|
5
|
-
*
|
|
6
|
-
* Deliberately built from raw elements rather than shadcn primitives. One of the three surfaces
|
|
7
|
-
* this serves is an Astro island on a site that vendors its own component library, and requiring a
|
|
8
|
-
* consumer to install a UI family in order to render a consent notice would put the notice out of
|
|
9
|
-
* reach of the site that needs it most.
|
|
10
|
-
*/
|
|
11
3
|
export declare const CookieConsent: FC<CookieConsentProps>;
|
|
12
4
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/consent/component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAS/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/consent/component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAS/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAkCrD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA+HhD,CAAA"}
|
|
@@ -12,7 +12,22 @@ import { ConsentToggle } from './toggle.js';
|
|
|
12
12
|
* this serves is an Astro island on a site that vendors its own component library, and requiring a
|
|
13
13
|
* consumer to install a UI family in order to render a consent notice would put the notice out of
|
|
14
14
|
* reach of the site that needs it most.
|
|
15
|
+
*
|
|
16
|
+
* Flat by rule, because it is the first thing every new visitor of a generated app sees: the
|
|
17
|
+
* surface and every colour come from the host's theme tokens (ground, ink, muted, hairline, one
|
|
18
|
+
* accent), depth comes from a hairline border and the overlay alone, and nothing paints a
|
|
19
|
+
* gradient, a shadow, a glow or a `backdrop-filter`. The accept action is the one accent pill,
|
|
20
|
+
* the others are outlined pills; every control is at least 44px tall and shows a 3px focus ring.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* The focus ring every control here shows: 3px solid in the theme's ring colour, 3px off the
|
|
24
|
+
* element. An outline rather than a box-shadow ring, so it survives a host that zeroes shadows.
|
|
15
25
|
*/
|
|
26
|
+
const FOCUS = 'focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-ring';
|
|
27
|
+
/** A pill button: 44px tall at minimum, full width on a phone, sharing the row above that. */
|
|
28
|
+
const PILL = cn('inline-flex min-h-11 flex-1 items-center justify-center rounded-full px-6 py-2.5 text-[15px] transition-colors motion-safe:active:scale-[0.98]', FOCUS);
|
|
29
|
+
/** A text link: muted, underlined at rest (colour is never the only signal), 44px tall to tap. */
|
|
30
|
+
const LINK = cn('inline-flex min-h-11 items-center font-semibold underline decoration-1 underline-offset-4 transition-colors hover:text-foreground hover:decoration-2', FOCUS);
|
|
16
31
|
export const CookieConsent = props => {
|
|
17
32
|
const categories = props.categories ?? DEFAULT_CONSENT_CATEGORIES;
|
|
18
33
|
const t = props.translate ?? defaultConsentTranslate(props.locale);
|
|
@@ -49,8 +64,8 @@ export const CookieConsent = props => {
|
|
|
49
64
|
// today. Saying so, and relabelling the primary action, is what makes the interruption make
|
|
50
65
|
// sense rather than look like the page asking twice.
|
|
51
66
|
const gated = consent.reason === 'login';
|
|
52
|
-
return _jsxs(_Fragment, { children: [consent.open && _jsx("div", { className: "fixed inset-0 z-[999998] flex items-center justify-center overflow-y-auto bg-black/70 px-4 py-6
|
|
67
|
+
return _jsxs(_Fragment, { children: [consent.open && _jsx("div", { className: "fixed inset-0 z-[999998] flex items-center justify-center overflow-y-auto bg-black/70 px-4 py-6", "aria-modal": "true", role: "dialog", "aria-labelledby": "cc-title", "aria-describedby": "cc-desc", "data-consent-dialog": true, children: _jsxs("div", { className: cn('relative z-[999999] w-full max-w-lg rounded-3xl border border-border bg-background p-6 text-foreground sm:p-8', props.className), children: [_jsxs("div", { className: "mb-4 flex items-center gap-3", children: [_jsx("div", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted text-primary", children: _jsx(Cookie, { className: "h-5 w-5", "aria-hidden": "true" }) }), _jsx("h2", { id: "cc-title", className: "text-balance text-xl font-extrabold tracking-tight text-foreground sm:text-2xl", children: t('title', 'Cookie Preferences') })] }), _jsx("p", { id: "cc-desc", className: "mb-6 text-pretty text-sm leading-relaxed text-muted-foreground", children: t('description', 'We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic.') }), _jsx("div", { className: "space-y-3", children: categories.map(category => _jsx(ConsentToggle, { id: `cc-${category.key}`, label: t(category.labelKey, category.key), description: t(category.descriptionKey, ''), checked: draft[category.key] === true, ...(category.required === true ? { required: true } : {}), requiredLabel: t('required', 'Required'), onChange: value => setDraft(current => ({ ...current, [category.key]: value })) }, category.key)) }), gated && _jsx("p", { role: "status", "data-consent-reason": true, className: "mt-4 text-sm font-semibold text-foreground", children: t('loginReason', 'Signing in stores a session cookie. Accept essential cookies to continue.') }), _jsxs("div", { className: "mt-8 flex flex-col gap-3 sm:flex-row sm:gap-4", children: [_jsx("button", { type: "button", onClick: onSave, "data-consent-save": true, className: cn(PILL, 'border-[1.5px] border-foreground bg-transparent font-semibold text-foreground hover:bg-muted'), children: t('savePreferences', 'Save Preferences') }), _jsx("button", { type: "button", onClick: onAcceptAll, "data-consent-accept-all": true, className: cn(PILL, 'bg-primary font-bold text-primary-foreground hover:bg-primary/90'), children: gated
|
|
53
68
|
? t('acceptAndContinue', 'Accept & continue')
|
|
54
|
-
: t('acceptAll', 'Accept All') })] }), (props.policyHref != null || props.links != null) && _jsxs("div", { className: "mt-
|
|
69
|
+
: t('acceptAll', 'Accept All') })] }), (props.policyHref != null || props.links != null) && _jsxs("div", { className: "mt-3 flex flex-wrap justify-center gap-x-4 text-[13px] text-muted-foreground", children: [props.policyHref != null && _jsx("a", { href: props.policyHref, target: "_blank", rel: "noopener noreferrer", className: LINK, children: t('policyLink', 'Cookie Policy') }), props.links?.map(link => _jsx("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", className: LINK, children: t(link.labelKey, link.defaultLabel) }, link.href))] })] }) }), props.noReopenButton !== true && consent.record != null && !consent.open && _jsx("button", { type: "button", onClick: () => consent.openDialog('reopen'), "aria-label": t('openPreferences', 'Cookie preferences'), "data-consent-reopen": true, className: cn('fixed bottom-1 left-1 z-[999997] inline-flex h-11 w-11 items-center justify-center rounded border-0 bg-transparent p-0 text-muted-foreground opacity-70 transition-opacity hover:opacity-100 hover:text-primary focus-visible:opacity-100', FOCUS), children: _jsx(Cookie, { className: "h-5 w-5", "aria-hidden": "true" }) })] });
|
|
55
70
|
};
|
|
56
71
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/consent/component.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EACL,0BAA0B,EAAE,uBAAuB,EAAE,WAAW,GACjE,MAAM,mBAAmB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IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,iBAC3E,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAC7C,CAAC,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,+BAEtD,SAAS,EAAE,EAAE,CAAC,2OAA2O,EAAE,KAAK,CAAC,YAEjQ,KAAC,MAAM,IAAC,SAAS,EAAC,SAAS,iBAAa,MAAM,GAAG,GAC1C,IACR,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -9,5 +9,20 @@ export interface ConsentToggleProps {
|
|
|
9
9
|
requiredLabel: string;
|
|
10
10
|
onChange: (value: boolean) => void;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* One category row: a hairline card with the label, the description and a switch.
|
|
14
|
+
*
|
|
15
|
+
* Flat like the dialog it sits in — no tinted fill, no shadow, no badge. `Required` is plain muted
|
|
16
|
+
* text beside the label, because a required category is disclosure, not a status to decorate. The
|
|
17
|
+
* switch's hit area is 44px square around the visible 24×44 track, and it shows the dialog's 3px
|
|
18
|
+
* focus ring when reached from the keyboard (the real checkbox is visually hidden, so the ring is
|
|
19
|
+
* drawn on the track through `peer-focus-visible`).
|
|
20
|
+
*
|
|
21
|
+
* The checkbox takes its NAME from the category label and its description from the `Required`
|
|
22
|
+
* marker and the description text, by id. The `<label>` around it holds only the drawn track, so
|
|
23
|
+
* without those references a screen reader announces an unnamed checkbox three times over — the
|
|
24
|
+
* visible words sit in a sibling column the label cannot reach. A required category keeps its name
|
|
25
|
+
* while disabled: it is still disclosed, only not a choice.
|
|
26
|
+
*/
|
|
12
27
|
export declare const ConsentToggle: FC<ConsentToggleProps>;
|
|
13
28
|
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA+ChD,CAAA"}
|
package/build/consent/toggle.js
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../lib/utils.js';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* One category row: a hairline card with the label, the description and a switch.
|
|
5
|
+
*
|
|
6
|
+
* Flat like the dialog it sits in — no tinted fill, no shadow, no badge. `Required` is plain muted
|
|
7
|
+
* text beside the label, because a required category is disclosure, not a status to decorate. The
|
|
8
|
+
* switch's hit area is 44px square around the visible 24×44 track, and it shows the dialog's 3px
|
|
9
|
+
* focus ring when reached from the keyboard (the real checkbox is visually hidden, so the ring is
|
|
10
|
+
* drawn on the track through `peer-focus-visible`).
|
|
11
|
+
*
|
|
12
|
+
* The checkbox takes its NAME from the category label and its description from the `Required`
|
|
13
|
+
* marker and the description text, by id. The `<label>` around it holds only the drawn track, so
|
|
14
|
+
* without those references a screen reader announces an unnamed checkbox three times over — the
|
|
15
|
+
* visible words sit in a sibling column the label cannot reach. A required category keeps its name
|
|
16
|
+
* while disabled: it is still disclosed, only not a choice.
|
|
17
|
+
*/
|
|
18
|
+
export const ConsentToggle = ({ id, label, description, checked, required, requiredLabel, onChange }) => {
|
|
19
|
+
const described = [
|
|
20
|
+
...(required === true ? [`${id}-required`] : []),
|
|
21
|
+
...(description !== '' ? [`${id}-desc`] : []),
|
|
22
|
+
];
|
|
23
|
+
return (_jsxs("div", { className: "flex items-center justify-between gap-4 rounded-2xl border border-border p-4", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "mb-0.5 flex flex-wrap items-center gap-x-2 text-sm font-bold text-foreground", children: [_jsx("span", { id: `${id}-label`, children: label }), required === true && _jsx("span", { id: `${id}-required`, className: "text-xs font-bold uppercase tracking-wide text-muted-foreground", children: requiredLabel })] }), description !== '' && _jsx("p", { id: `${id}-desc`, className: "text-pretty text-xs leading-relaxed text-muted-foreground", children: description })] }), _jsxs("label", { className: cn('relative inline-flex h-11 w-14 flex-shrink-0 items-center justify-center', required === true ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'), children: [_jsx("input", { id: id, type: "checkbox", "aria-labelledby": `${id}-label`, ...(described.length > 0 ? { 'aria-describedby': described.join(' ') } : {}), className: "peer sr-only", checked: checked || required === true, disabled: required === true, onChange: event => onChange(event.target.checked) }), _jsx("span", { className: cn('relative h-6 w-11 rounded-full transition-colors duration-300 peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-ring', checked || required === true ? 'bg-primary' : 'bg-muted-foreground/40'), children: _jsx("span", { className: cn('absolute top-0.5 left-0 h-5 w-5 rounded-full bg-white transition-transform duration-300', checked || required === true ? 'translate-x-5' : 'translate-x-0.5') }) })] })] }));
|
|
24
|
+
};
|
|
4
25
|
//# sourceMappingURL=toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAapC,MAAM,CAAC,MAAM,aAAa,GAA2B,CACnD,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,EACtE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../src/consent/toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAapC;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,aAAa,GAA2B,CACnD,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,EACtE,EAAE;IACF,MAAM,SAAS,GAAG;QAChB,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAA;IAED,OAAO,CACL,eAAK,SAAS,EAAC,8EAA8E,aAC3F,eAAK,SAAS,EAAC,gBAAgB,aAC7B,eAAK,SAAS,EAAC,8EAA8E,aAC3F,eAAM,EAAE,EAAE,GAAG,EA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
5
|
export * from './consent/toggle.js';
|
|
6
6
|
export * from './policy/component.js';
|
|
7
7
|
export { consentStore, openConsent, isConsented, readConsent, writeConsent, clearConsent, migrateConsent, applyConsent, pushConsentDefaults, consentBootstrapScript, consentDefaults, consentUpdate, gtagConsent, DEFAULT_CONSENT_CATEGORIES, DEFAULT_CONSENT_MESSAGES, defaultConsentTranslate, interpolate, CONSENT_KEY, CONSENT_COOKIE_DAYS, CONSENT_SCHEMA_VERSION, CONSENT_LOCALES, CONSENT_ESSENTIAL, CONSENT_ANALYTICS, CONSENT_MARKETING, } from '@owlmeans/consent';
|
|
8
|
-
export type { ConsentCategory, ConsentOptions, ConsentReason, ConsentRecord, ConsentSignal, ConsentState, ConsentStore, ConsentLocale, } from '@owlmeans/consent';
|
|
8
|
+
export type { ConsentCategory, ConsentOptions, ConsentReason, ConsentRecord, ConsentService, ConsentSignal, ConsentState, ConsentStore, ConsentLocale, } from '@owlmeans/consent';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,OAAO,EACL,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAC/E,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EACzE,eAAe,EAAE,aAAa,EAAE,WAAW,EAC3C,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,WAAW,EAC1F,WAAW,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EACzE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,GACxD,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,OAAO,EACL,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAC/E,cAAc,EAAE,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EACzE,eAAe,EAAE,aAAa,EAAE,WAAW,EAC3C,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,WAAW,EAC1F,WAAW,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,eAAe,EACzE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,GACxD,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAC5F,YAAY,EAAE,YAAY,EAAE,aAAa,GAC1C,MAAM,mBAAmB,CAAA"}
|
|
@@ -11,6 +11,12 @@ import type { CookiePolicyProps } from '../types.js';
|
|
|
11
11
|
*
|
|
12
12
|
* Everything OwlMeans cannot assert on the operator's behalf — who the controller is, what the
|
|
13
13
|
* lawful basis is, how to exercise rights — is deferred to their own privacy policy and terms.
|
|
14
|
+
*
|
|
15
|
+
* `services` names WHO receives data under each category. It is the one input the widget cannot
|
|
16
|
+
* derive, so it comes from whatever added the tag (`googleTagServices(id)` for a Google tag), and
|
|
17
|
+
* a service is never dropped for want of a matching category: one whose category is not in force
|
|
18
|
+
* is listed in a trailing group, because a service the page runs and does not disclose is worse
|
|
19
|
+
* than one disclosed in the wrong place.
|
|
14
20
|
*/
|
|
15
21
|
export declare const CookiePolicy: FC<CookiePolicyProps>;
|
|
16
22
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAO/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAkDpD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAsE9C,CAAA"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CONSENT_COOKIE_DAYS, CONSENT_KEY, DEFAULT_CONSENT_CATEGORIES, defaultConsentTranslate, interpolate, openConsent, } from '@owlmeans/consent';
|
|
3
3
|
import { cn } from '../lib/utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* The services one category gates, as a nested list inside that category's item.
|
|
6
|
+
*
|
|
7
|
+
* A list and a description list rather than headings: the page's only heading is its `h1`, the
|
|
8
|
+
* categories are list items, and a service heading below them would either skip a level or
|
|
9
|
+
* promote a service above the category that governs it.
|
|
10
|
+
*/
|
|
11
|
+
const ServiceList = ({ services, label, category, t }) => _jsx("ul", { "aria-label": interpolate(t('policyServicesOf', 'Services — {{category}}'), { category: label }), "data-cookie-policy-services": category ?? '', children: services.map((service, index) => _jsxs("li", { "data-cookie-policy-service": true, children: [_jsx("strong", { children: service.name }), _jsxs("dl", { children: [_jsxs("div", { children: [_jsx("dt", { children: t('policyProvider', 'Provider') }), _jsx("dd", { children: service.provider })] }), service.purpose != null && service.purpose !== '' && _jsxs("div", { children: [_jsx("dt", { children: t('policyPurpose', 'Purpose') }), _jsx("dd", { children: service.purpose })] }), service.cookies != null && service.cookies.length > 0 && _jsxs("div", { children: [_jsx("dt", { children: t('policyCookies', 'Cookies') }), _jsx("dd", { children: service.cookies.map((cookie, at) => _jsxs("span", { children: [at > 0 && ', ', _jsx("code", { children: cookie })] }, `${cookie}-${at}`)) })] })] }), service.privacyHref != null && service.privacyHref !== '' && _jsx("a", { href: service.privacyHref, target: "_blank", rel: "noopener noreferrer", children: interpolate(t('policyServicePrivacy', '{{provider}} privacy policy'), { provider: service.provider }) })] }, `${service.name}-${index}`)) });
|
|
4
12
|
/**
|
|
5
13
|
* A cookie policy that states only what this application can actually assert.
|
|
6
14
|
*
|
|
@@ -12,12 +20,26 @@ import { cn } from '../lib/utils.js';
|
|
|
12
20
|
*
|
|
13
21
|
* Everything OwlMeans cannot assert on the operator's behalf — who the controller is, what the
|
|
14
22
|
* lawful basis is, how to exercise rights — is deferred to their own privacy policy and terms.
|
|
23
|
+
*
|
|
24
|
+
* `services` names WHO receives data under each category. It is the one input the widget cannot
|
|
25
|
+
* derive, so it comes from whatever added the tag (`googleTagServices(id)` for a Google tag), and
|
|
26
|
+
* a service is never dropped for want of a matching category: one whose category is not in force
|
|
27
|
+
* is listed in a trailing group, because a service the page runs and does not disclose is worse
|
|
28
|
+
* than one disclosed in the wrong place.
|
|
15
29
|
*/
|
|
16
30
|
export const CookiePolicy = props => {
|
|
17
31
|
const categories = props.categories ?? DEFAULT_CONSENT_CATEGORIES;
|
|
18
32
|
const t = props.translate ?? defaultConsentTranslate(props.locale);
|
|
19
33
|
const storageKey = props.storageKey ?? CONSENT_KEY;
|
|
20
34
|
const days = props.cookieDays ?? CONSENT_COOKIE_DAYS;
|
|
21
|
-
|
|
35
|
+
const services = props.services ?? [];
|
|
36
|
+
const keys = new Set(categories.map(category => category.key));
|
|
37
|
+
const other = services.filter(service => !keys.has(service.category));
|
|
38
|
+
const otherLabel = t('policyOtherServices', 'Other services');
|
|
39
|
+
return _jsxs("article", { className: cn('prose prose-sm max-w-2xl', props.className), "data-cookie-policy": true, children: [_jsx("h1", { children: t('policyTitle', 'Cookie Policy') }), _jsx("p", { children: t('policyIntro', 'This page describes the cookies and similar storage this application uses, and how you can control them.') }), _jsxs("ul", { children: [categories.map(category => {
|
|
40
|
+
const label = t(category.labelKey, category.key);
|
|
41
|
+
const gated = services.filter(service => service.category === category.key);
|
|
42
|
+
return _jsxs("li", { "data-cookie-policy-category": category.key, children: [_jsx("strong", { children: label }), category.required === true && _jsxs(_Fragment, { children: [" \u2014 ", t('required', 'Required')] }), _jsx("br", {}), t(category.descriptionKey, ''), gated.length > 0 && _jsx(ServiceList, { services: gated, label: label, category: category.key, t: t })] }, category.key);
|
|
43
|
+
}), other.length > 0 && _jsxs("li", { "data-cookie-policy-other": true, children: [_jsx("strong", { children: otherLabel }), _jsx("br", {}), t('policyOtherServicesDesc', 'Services this application runs outside the categories above.'), _jsx(ServiceList, { services: other, label: otherLabel, t: t })] }, " other")] }), _jsx("p", { children: interpolate(t('policyStorage', 'Your choice is stored in this browser under "{{key}}", both in local storage and as a cookie.'), { key: storageKey }) }), _jsx("p", { children: interpolate(t('policyRetention', 'The record is kept for {{days}} days, after which you will be asked again.'), { days }) }), props.operator != null && props.operator !== '' && _jsxs("p", { children: [interpolate(t('policyOperator', 'This application is operated by {{operator}}.'), { operator: props.operator }), ' ', t('policyContact', 'See their privacy policy and terms for how they handle your data.')] }), _jsxs("p", { children: [props.privacyHref != null && props.privacyHref !== '' && _jsx("a", { href: props.privacyHref, target: "_blank", rel: "noopener noreferrer", children: t('privacy', 'Privacy Policy') }), props.privacyHref != null && props.termsHref != null && ' · ', props.termsHref != null && props.termsHref !== '' && _jsx("a", { href: props.termsHref, target: "_blank", rel: "noopener noreferrer", children: t('terms', 'Terms & Conditions') })] }), _jsx("p", { children: _jsx("button", { type: "button", onClick: () => openConsent('reopen'), "data-cookie-policy-manage": true, className: "not-prose inline-flex min-h-11 items-center justify-center rounded-full border-[1.5px] border-foreground bg-transparent px-6 py-2.5 text-[15px] font-semibold text-foreground transition-colors hover:bg-muted focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-ring", children: t('manage', 'Manage preferences') }) })] });
|
|
22
44
|
};
|
|
23
45
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,mBAAmB,EAAE,WAAW,EAAE,0BAA0B,EAC5D,uBAAuB,EAAE,WAAW,EAAE,WAAW,GAClD,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/policy/component.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,mBAAmB,EAAE,WAAW,EAAE,0BAA0B,EAC5D,uBAAuB,EAAE,WAAW,EAAE,WAAW,GAClD,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAcpC;;;;;;GAMG;AACH,MAAM,WAAW,GAAyB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAC7E,2BACc,WAAW,CAAC,CAAC,CAAC,kBAAkB,EAAE,yBAAyB,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,iCACjE,QAAQ,IAAI,EAAE,YAE1C,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,6DAChC,2BAAS,OAAO,CAAC,IAAI,GAAU,EAC/B,yBACE,0BACE,uBAAK,CAAC,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAM,EAC1C,uBAAK,OAAO,CAAC,QAAQ,GAAM,IACvB,EACL,OAAO,CAAC,OAAO,IAAI,IAAI,IAAI,OAAO,CAAC,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,SAAS,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,YAChE,CAAC,CAAC,OAAO,EAAE,oBAAoB,CAAC,GAAK,IACrC,EAEJ,sBACE,iBACE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,qCAClD,SAAS,EAAC,kSAAkS,YAE3S,CAAC,CAAC,QAAQ,EAAE,oBAAoB,CAAC,GAC3B,GACP,IACI,CAAA;AACZ,CAAC,CAAA"}
|
package/build/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConsentCategory, ConsentReason, ConsentRecord } from '@owlmeans/consent';
|
|
1
|
+
import type { ConsentCategory, ConsentReason, ConsentRecord, ConsentService } from '@owlmeans/consent';
|
|
2
2
|
export interface ConsentLink {
|
|
3
3
|
href: string;
|
|
4
4
|
labelKey: string;
|
|
@@ -34,6 +34,13 @@ export interface CookiePolicyProps {
|
|
|
34
34
|
termsHref?: string;
|
|
35
35
|
storageKey?: string;
|
|
36
36
|
cookieDays?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The third-party services the site runs, each listed under the category that gates it —
|
|
39
|
+
* name, provider, purpose, cookie names and the provider's privacy policy. A service whose
|
|
40
|
+
* category is not among `categories` is listed in a trailing "Other services" group rather than
|
|
41
|
+
* dropped. `@owlmeans/web-gtm`'s `googleTagServices(id)` supplies the entries for a Google tag.
|
|
42
|
+
*/
|
|
43
|
+
services?: ConsentService[];
|
|
37
44
|
className?: string;
|
|
38
45
|
}
|
|
39
46
|
export interface ConsentMenuWidgetProps {
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAAE,aAAa,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.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AA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uFAAuF;IACvF,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,MAAM,CAAA;IACzD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;IACjC,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;IACrC,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,EAAE,CAAC,MAAM,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/web-consent",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@owlmeans/consent": "^0.1.18-rc.
|
|
25
|
+
"@owlmeans/consent": "^0.1.18-rc.5"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"clsx": "*",
|
|
@@ -33,12 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@owlmeans/dep-config": "workspace:*",
|
|
36
|
-
"@owlmeans/test-ui": "^0.1.18-rc.
|
|
36
|
+
"@owlmeans/test-ui": "^0.1.18-rc.32",
|
|
37
37
|
"@tailwindcss/vite": "^4.0.0",
|
|
38
38
|
"@types/bun": "^1.4.0",
|
|
39
39
|
"@types/react": "^19.2.17",
|
|
40
40
|
"@types/react-dom": "^19.2.3",
|
|
41
41
|
"@vitejs/plugin-react": "^6.0.3",
|
|
42
|
+
"axe-core": "^4.13.0",
|
|
42
43
|
"clsx": "^2.1.1",
|
|
43
44
|
"lucide-react": "^0.550.0",
|
|
44
45
|
"nodemon": "^3.1.14",
|