@uninspired/cookie-banner 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/component.d.ts +65 -0
- package/dist/component.js +4 -0
- package/dist/index-BfHatbv4.js +3653 -0
- package/dist/script.d.ts +60 -0
- package/dist/script.js +16 -0
- package/dist/style.css +1 -0
- package/dist/theme.css +94 -0
- package/package.json +39 -0
package/README.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { JSX } from 'preact';
|
|
2
|
+
import * as z from 'zod/mini';
|
|
3
|
+
|
|
4
|
+
export declare const Banner: ({ localStorageKey, items, ...rest }: BannerProps) => JSX.Element;
|
|
5
|
+
|
|
6
|
+
declare type BannerItemOptions = BannerItemOptionsRequired | BannerItemOptionsOptional;
|
|
7
|
+
|
|
8
|
+
declare interface BannerItemOptionsBase {
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
defaultSelected?: boolean;
|
|
12
|
+
sublabel?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare interface BannerItemOptionsOptional extends BannerItemOptionsBase {
|
|
18
|
+
required: false;
|
|
19
|
+
script: ScriptDefinition;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare interface BannerItemOptionsRequired extends BannerItemOptionsBase {
|
|
23
|
+
required: true;
|
|
24
|
+
script: undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare interface BannerOptions {
|
|
28
|
+
localStorageKey?: string;
|
|
29
|
+
heading?: string;
|
|
30
|
+
subheading?: string;
|
|
31
|
+
selectLabel?: string;
|
|
32
|
+
hideLabel?: string;
|
|
33
|
+
saveLabel?: string;
|
|
34
|
+
declineLabel?: string;
|
|
35
|
+
defaultSettingsOpen?: boolean;
|
|
36
|
+
privacyPolicy?: {
|
|
37
|
+
label: string;
|
|
38
|
+
url: string;
|
|
39
|
+
};
|
|
40
|
+
items: BannerItemOptions[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare interface BannerProps extends BannerOptions {
|
|
44
|
+
noTarget?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare type ScriptDefinition = z.infer<typeof scriptDefinitionSchema>;
|
|
48
|
+
|
|
49
|
+
declare const scriptDefinitionSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
50
|
+
variant: z.ZodMiniLiteral<"remote">;
|
|
51
|
+
type: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
52
|
+
src: z.ZodMiniString<string>;
|
|
53
|
+
async: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
54
|
+
defer: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
55
|
+
crossorigin: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
56
|
+
integrity: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
57
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
58
|
+
variant: z.ZodMiniLiteral<"inline">;
|
|
59
|
+
type: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
60
|
+
async: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
61
|
+
defer: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
62
|
+
content: z.ZodMiniString<string>;
|
|
63
|
+
}, z.core.$strip>], "variant">;
|
|
64
|
+
|
|
65
|
+
export { }
|