@c15t/react 0.0.1-rc.10
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/LICENSE.md +595 -0
- package/README.md +55 -0
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.cjs +223 -0
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.d.ts +2 -0
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.d.ts.map +1 -0
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.js +188 -0
- package/dist/components/consent-manager-dialog/__tests__/utils.cjs +68 -0
- package/dist/components/consent-manager-dialog/__tests__/utils.d.ts +13 -0
- package/dist/components/consent-manager-dialog/__tests__/utils.d.ts.map +1 -0
- package/dist/components/consent-manager-dialog/__tests__/utils.js +34 -0
- package/dist/components/consent-manager-dialog/atoms/dialog-card.cjs +154 -0
- package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts +90 -0
- package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts.map +1 -0
- package/dist/components/consent-manager-dialog/atoms/dialog-card.js +95 -0
- package/dist/components/consent-manager-dialog/atoms/overlay.cjs +86 -0
- package/dist/components/consent-manager-dialog/atoms/overlay.d.ts +71 -0
- package/dist/components/consent-manager-dialog/atoms/overlay.d.ts.map +1 -0
- package/dist/components/consent-manager-dialog/atoms/overlay.js +37 -0
- package/dist/components/consent-manager-dialog/consent-manager-dialog.cjs +148 -0
- package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts +40 -0
- package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts.map +1 -0
- package/dist/components/consent-manager-dialog/consent-manager-dialog.js +100 -0
- package/dist/components/consent-manager-dialog/consent-manager-dialog.module.cjs +50 -0
- package/dist/components/consent-manager-dialog/consent-manager-dialog.module.js +16 -0
- package/dist/components/consent-manager-dialog/consent-manager-dialog_module.css +202 -0
- package/dist/components/consent-manager-dialog/index.cjs +51 -0
- package/dist/components/consent-manager-dialog/index.d.ts +4 -0
- package/dist/components/consent-manager-dialog/index.d.ts.map +1 -0
- package/dist/components/consent-manager-dialog/index.js +18 -0
- package/dist/components/consent-manager-dialog/theme.cjs +19 -0
- package/dist/components/consent-manager-dialog/theme.d.ts +19 -0
- package/dist/components/consent-manager-dialog/theme.d.ts.map +1 -0
- package/dist/components/consent-manager-dialog/theme.js +0 -0
- package/dist/components/consent-manager-widget/__tests__/styles.spec.cjs +228 -0
- package/dist/components/consent-manager-widget/__tests__/styles.spec.d.ts +2 -0
- package/dist/components/consent-manager-widget/__tests__/styles.spec.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/__tests__/styles.spec.js +193 -0
- package/dist/components/consent-manager-widget/__tests__/utils.cjs +68 -0
- package/dist/components/consent-manager-widget/__tests__/utils.d.ts +13 -0
- package/dist/components/consent-manager-widget/__tests__/utils.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/__tests__/utils.js +34 -0
- package/dist/components/consent-manager-widget/atoms/accordion.cjs +169 -0
- package/dist/components/consent-manager-widget/atoms/accordion.d.ts +57 -0
- package/dist/components/consent-manager-widget/atoms/accordion.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/atoms/accordion.js +106 -0
- package/dist/components/consent-manager-widget/atoms/button.cjs +93 -0
- package/dist/components/consent-manager-widget/atoms/button.d.ts +27 -0
- package/dist/components/consent-manager-widget/atoms/button.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/atoms/button.js +52 -0
- package/dist/components/consent-manager-widget/atoms/footer.cjs +74 -0
- package/dist/components/consent-manager-widget/atoms/footer.d.ts +15 -0
- package/dist/components/consent-manager-widget/atoms/footer.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/atoms/footer.js +23 -0
- package/dist/components/consent-manager-widget/atoms/logo.cjs +101 -0
- package/dist/components/consent-manager-widget/atoms/logo.d.ts +8 -0
- package/dist/components/consent-manager-widget/atoms/logo.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/atoms/logo.js +67 -0
- package/dist/components/consent-manager-widget/atoms/root.cjs +60 -0
- package/dist/components/consent-manager-widget/atoms/root.d.ts +82 -0
- package/dist/components/consent-manager-widget/atoms/root.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/atoms/root.js +25 -0
- package/dist/components/consent-manager-widget/consent-manager-widget.cjs +96 -0
- package/dist/components/consent-manager-widget/consent-manager-widget.d.ts +44 -0
- package/dist/components/consent-manager-widget/consent-manager-widget.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/consent-manager-widget.js +62 -0
- package/dist/components/consent-manager-widget/consent-manager-widget.module.cjs +61 -0
- package/dist/components/consent-manager-widget/consent-manager-widget.module.js +27 -0
- package/dist/components/consent-manager-widget/consent-manager-widget_module.css +337 -0
- package/dist/components/consent-manager-widget/index.cjs +69 -0
- package/dist/components/consent-manager-widget/index.d.ts +11 -0
- package/dist/components/consent-manager-widget/index.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/index.js +36 -0
- package/dist/components/consent-manager-widget/theme.cjs +19 -0
- package/dist/components/consent-manager-widget/theme.d.ts +50 -0
- package/dist/components/consent-manager-widget/theme.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/theme.js +0 -0
- package/dist/components/consent-manager-widget/types.cjs +19 -0
- package/dist/components/consent-manager-widget/types.d.ts +18 -0
- package/dist/components/consent-manager-widget/types.d.ts.map +1 -0
- package/dist/components/consent-manager-widget/types.js +0 -0
- package/dist/components/cookie-banner/__tests__/styles.spec.cjs +241 -0
- package/dist/components/cookie-banner/__tests__/styles.spec.d.ts +2 -0
- package/dist/components/cookie-banner/__tests__/styles.spec.d.ts.map +1 -0
- package/dist/components/cookie-banner/__tests__/styles.spec.js +206 -0
- package/dist/components/cookie-banner/__tests__/utils.cjs +67 -0
- package/dist/components/cookie-banner/__tests__/utils.d.ts +13 -0
- package/dist/components/cookie-banner/__tests__/utils.d.ts.map +1 -0
- package/dist/components/cookie-banner/__tests__/utils.js +33 -0
- package/dist/components/cookie-banner/atoms/overlay.cjs +89 -0
- package/dist/components/cookie-banner/atoms/overlay.d.ts +46 -0
- package/dist/components/cookie-banner/atoms/overlay.d.ts.map +1 -0
- package/dist/components/cookie-banner/atoms/overlay.js +40 -0
- package/dist/components/cookie-banner/atoms/root.cjs +132 -0
- package/dist/components/cookie-banner/atoms/root.d.ts +93 -0
- package/dist/components/cookie-banner/atoms/root.d.ts.map +1 -0
- package/dist/components/cookie-banner/atoms/root.js +83 -0
- package/dist/components/cookie-banner/components.cjs +186 -0
- package/dist/components/cookie-banner/components.d.ts +136 -0
- package/dist/components/cookie-banner/components.d.ts.map +1 -0
- package/dist/components/cookie-banner/components.js +121 -0
- package/dist/components/cookie-banner/cookie-banner.cjs +100 -0
- package/dist/components/cookie-banner/cookie-banner.d.ts +144 -0
- package/dist/components/cookie-banner/cookie-banner.d.ts.map +1 -0
- package/dist/components/cookie-banner/cookie-banner.js +66 -0
- package/dist/components/cookie-banner/cookie-banner.module.cjs +55 -0
- package/dist/components/cookie-banner/cookie-banner.module.js +21 -0
- package/dist/components/cookie-banner/cookie-banner_module.css +224 -0
- package/dist/components/cookie-banner/error-boundary.cjs +68 -0
- package/dist/components/cookie-banner/error-boundary.d.ts +56 -0
- package/dist/components/cookie-banner/error-boundary.d.ts.map +1 -0
- package/dist/components/cookie-banner/error-boundary.js +34 -0
- package/dist/components/cookie-banner/index.cjs +59 -0
- package/dist/components/cookie-banner/index.d.ts +52 -0
- package/dist/components/cookie-banner/index.d.ts.map +1 -0
- package/dist/components/cookie-banner/index.js +26 -0
- package/dist/components/cookie-banner/theme.cjs +19 -0
- package/dist/components/cookie-banner/theme.d.ts +71 -0
- package/dist/components/cookie-banner/theme.d.ts.map +1 -0
- package/dist/components/cookie-banner/theme.js +0 -0
- package/dist/components/shared/libs/polymorphic.cjs +19 -0
- package/dist/components/shared/libs/polymorphic.d.ts +15 -0
- package/dist/components/shared/libs/polymorphic.d.ts.map +1 -0
- package/dist/components/shared/libs/polymorphic.js +0 -0
- package/dist/components/shared/libs/recursive-clone-children.cjs +49 -0
- package/dist/components/shared/libs/recursive-clone-children.d.ts +14 -0
- package/dist/components/shared/libs/recursive-clone-children.d.ts.map +1 -0
- package/dist/components/shared/libs/recursive-clone-children.js +15 -0
- package/dist/components/shared/primitives/box.cjs +54 -0
- package/dist/components/shared/primitives/box.d.ts +47 -0
- package/dist/components/shared/primitives/box.d.ts.map +1 -0
- package/dist/components/shared/primitives/box.js +20 -0
- package/dist/components/shared/primitives/button.cjs +96 -0
- package/dist/components/shared/primitives/button.d.ts +207 -0
- package/dist/components/shared/primitives/button.d.ts.map +1 -0
- package/dist/components/shared/primitives/button.js +62 -0
- package/dist/components/shared/primitives/button.types.cjs +19 -0
- package/dist/components/shared/primitives/button.types.d.ts +35 -0
- package/dist/components/shared/primitives/button.types.d.ts.map +1 -0
- package/dist/components/shared/primitives/button.types.js +0 -0
- package/dist/components/shared/ui/accordion/accordion.cjs +219 -0
- package/dist/components/shared/ui/accordion/accordion.d.ts +44 -0
- package/dist/components/shared/ui/accordion/accordion.d.ts.map +1 -0
- package/dist/components/shared/ui/accordion/accordion.js +165 -0
- package/dist/components/shared/ui/accordion/accordion.module.cjs +49 -0
- package/dist/components/shared/ui/accordion/accordion.module.js +15 -0
- package/dist/components/shared/ui/accordion/accordion.types.cjs +19 -0
- package/dist/components/shared/ui/accordion/accordion.types.d.ts +74 -0
- package/dist/components/shared/ui/accordion/accordion.types.d.ts.map +1 -0
- package/dist/components/shared/ui/accordion/accordion.types.js +0 -0
- package/dist/components/shared/ui/accordion/accordion_module.css +197 -0
- package/dist/components/shared/ui/accordion/index.cjs +76 -0
- package/dist/components/shared/ui/accordion/index.d.ts +3 -0
- package/dist/components/shared/ui/accordion/index.d.ts.map +1 -0
- package/dist/components/shared/ui/accordion/index.js +2 -0
- package/dist/components/shared/ui/button/button.cjs +199 -0
- package/dist/components/shared/ui/button/button.d.ts +444 -0
- package/dist/components/shared/ui/button/button.d.ts.map +1 -0
- package/dist/components/shared/ui/button/button.js +149 -0
- package/dist/components/shared/ui/button/button.module.cjs +65 -0
- package/dist/components/shared/ui/button/button.module.js +31 -0
- package/dist/components/shared/ui/button/button.types.cjs +19 -0
- package/dist/components/shared/ui/button/button.types.d.ts +45 -0
- package/dist/components/shared/ui/button/button.types.d.ts.map +1 -0
- package/dist/components/shared/ui/button/button.types.js +0 -0
- package/dist/components/shared/ui/button/button_module.css +247 -0
- package/dist/components/shared/ui/button/index.cjs +76 -0
- package/dist/components/shared/ui/button/index.d.ts +3 -0
- package/dist/components/shared/ui/button/index.d.ts.map +1 -0
- package/dist/components/shared/ui/button/index.js +2 -0
- package/dist/components/shared/ui/icon.cjs +57 -0
- package/dist/components/shared/ui/icon.d.ts +8 -0
- package/dist/components/shared/ui/icon.d.ts.map +1 -0
- package/dist/components/shared/ui/icon.js +23 -0
- package/dist/components/shared/ui/logo.cjs +101 -0
- package/dist/components/shared/ui/logo.d.ts +8 -0
- package/dist/components/shared/ui/logo.d.ts.map +1 -0
- package/dist/components/shared/ui/logo.js +67 -0
- package/dist/components/shared/ui/switch/index.cjs +76 -0
- package/dist/components/shared/ui/switch/index.d.ts +3 -0
- package/dist/components/shared/ui/switch/index.d.ts.map +1 -0
- package/dist/components/shared/ui/switch/index.js +2 -0
- package/dist/components/shared/ui/switch/switch.cjs +95 -0
- package/dist/components/shared/ui/switch/switch.d.ts +24 -0
- package/dist/components/shared/ui/switch/switch.d.ts.map +1 -0
- package/dist/components/shared/ui/switch/switch.js +47 -0
- package/dist/components/shared/ui/switch/switch.module.cjs +45 -0
- package/dist/components/shared/ui/switch/switch.module.js +11 -0
- package/dist/components/shared/ui/switch/switch.types.cjs +19 -0
- package/dist/components/shared/ui/switch/switch.types.d.ts +34 -0
- package/dist/components/shared/ui/switch/switch.types.d.ts.map +1 -0
- package/dist/components/shared/ui/switch/switch.types.js +0 -0
- package/dist/components/shared/ui/switch/switch_module.css +183 -0
- package/dist/context/consent-manager-context.cjs +38 -0
- package/dist/context/consent-manager-context.d.ts +13 -0
- package/dist/context/consent-manager-context.d.ts.map +1 -0
- package/dist/context/consent-manager-context.js +4 -0
- package/dist/context/theme-context.cjs +40 -0
- package/dist/context/theme-context.d.ts +102 -0
- package/dist/context/theme-context.d.ts.map +1 -0
- package/dist/context/theme-context.js +5 -0
- package/dist/hooks/index.cjs +94 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/use-consent-manager.cjs +45 -0
- package/dist/hooks/use-consent-manager.d.ts +61 -0
- package/dist/hooks/use-consent-manager.d.ts.map +1 -0
- package/dist/hooks/use-consent-manager.js +11 -0
- package/dist/hooks/use-focus-trap.cjs +76 -0
- package/dist/hooks/use-focus-trap.d.ts +15 -0
- package/dist/hooks/use-focus-trap.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap.js +42 -0
- package/dist/hooks/use-scroll-lock.cjs +55 -0
- package/dist/hooks/use-scroll-lock.d.ts +26 -0
- package/dist/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/hooks/use-scroll-lock.js +21 -0
- package/dist/hooks/use-theme.cjs +56 -0
- package/dist/hooks/use-theme.d.ts +2 -0
- package/dist/hooks/use-theme.d.ts.map +1 -0
- package/dist/hooks/use-theme.js +22 -0
- package/dist/hooks/use-translations.cjs +58 -0
- package/dist/hooks/use-translations.d.ts +29 -0
- package/dist/hooks/use-translations.d.ts.map +1 -0
- package/dist/hooks/use-translations.js +24 -0
- package/dist/index.cjs +101 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/providers/consent-manager-provider.cjs +110 -0
- package/dist/providers/consent-manager-provider.d.ts +16 -0
- package/dist/providers/consent-manager-provider.d.ts.map +1 -0
- package/dist/providers/consent-manager-provider.js +76 -0
- package/dist/types/consent-manager.cjs +19 -0
- package/dist/types/consent-manager.d.ts +120 -0
- package/dist/types/consent-manager.d.ts.map +1 -0
- package/dist/types/consent-manager.js +0 -0
- package/dist/types/theme/index.cjs +76 -0
- package/dist/types/theme/index.d.ts +3 -0
- package/dist/types/theme/index.d.ts.map +1 -0
- package/dist/types/theme/index.js +2 -0
- package/dist/types/theme/style-keys.cjs +19 -0
- package/dist/types/theme/style-keys.d.ts +14 -0
- package/dist/types/theme/style-keys.d.ts.map +1 -0
- package/dist/types/theme/style-keys.js +0 -0
- package/dist/types/theme/style-types.cjs +19 -0
- package/dist/types/theme/style-types.d.ts +34 -0
- package/dist/types/theme/style-types.d.ts.map +1 -0
- package/dist/types/theme/style-types.js +0 -0
- package/dist/utils/cn.cjs +55 -0
- package/dist/utils/cn.d.ts +11 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +6 -0
- package/dist/utils/merge-styles.cjs +62 -0
- package/dist/utils/merge-styles.d.ts +11 -0
- package/dist/utils/merge-styles.d.ts.map +1 -0
- package/dist/utils/merge-styles.js +28 -0
- package/dist/utils/translations.cjs +86 -0
- package/dist/utils/translations.d.ts +14 -0
- package/dist/utils/translations.d.ts.map +1 -0
- package/dist/utils/translations.js +50 -0
- package/dist/utils/use-styles.cjs +95 -0
- package/dist/utils/use-styles.d.ts +32 -0
- package/dist/utils/use-styles.d.ts.map +1 -0
- package/dist/utils/use-styles.js +61 -0
- package/package.json +90 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { AllConsentNames, ComplianceRegion, ComplianceSettings, NamespaceProps, PrivacyConsentState, TrackingBlockerConfig, TranslationConfig, createConsentManagerStore } from 'c15t';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { ConsentManagerDialogTheme } from '../components/consent-manager-dialog/theme';
|
|
4
|
+
import type { CookieBannerTheme } from '../components/cookie-banner/theme';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for the ConsentManagerProvider component.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* These props allow you to configure the initial state and behavior of the consent manager,
|
|
10
|
+
* including GDPR types, compliance settings, and namespace configuration.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export interface ConsentManagerProviderProps extends NamespaceProps {
|
|
15
|
+
/**
|
|
16
|
+
* @remarks
|
|
17
|
+
* React elements to be rendered within the consent manager context.
|
|
18
|
+
*/
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* @remarks
|
|
22
|
+
* Array of consent types to be pre-configured for GDPR compliance.
|
|
23
|
+
* These types define what kinds of cookies and tracking are initially allowed.
|
|
24
|
+
*/
|
|
25
|
+
initialGdprTypes?: AllConsentNames[];
|
|
26
|
+
/**
|
|
27
|
+
* @remarks
|
|
28
|
+
* Region-specific compliance settings that define how the consent manager
|
|
29
|
+
* should behave in different geographical regions.
|
|
30
|
+
*/
|
|
31
|
+
initialComplianceSettings?: Record<ComplianceRegion, ComplianceSettings>;
|
|
32
|
+
/**
|
|
33
|
+
* @remarks
|
|
34
|
+
* Whether to skip injecting default styles
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
noStyle?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @remarks
|
|
40
|
+
* Whether to disable animations
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
disableAnimation?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @remarks
|
|
46
|
+
* Theme configuration for the consent manager
|
|
47
|
+
*/
|
|
48
|
+
theme?: CookieBannerTheme & ConsentManagerDialogTheme;
|
|
49
|
+
/**
|
|
50
|
+
* @remarks
|
|
51
|
+
* The configuration allows you to:
|
|
52
|
+
* - Define translations for multiple languages through the translations object
|
|
53
|
+
* - Set a default language via defaultLanguage prop
|
|
54
|
+
* - Control automatic language switching based on browser settings with disableAutoLanguageSwitch
|
|
55
|
+
* - Override specific translation keys while keeping defaults for others
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <ConsentManagerProvider
|
|
60
|
+
* translationConfig={{
|
|
61
|
+
* translations: {
|
|
62
|
+
* de: {
|
|
63
|
+
* cookieBanner: {
|
|
64
|
+
* title: 'Cookie-Einstellungen',
|
|
65
|
+
* description: 'Wir verwenden Cookies...'
|
|
66
|
+
* }
|
|
67
|
+
* }
|
|
68
|
+
* },
|
|
69
|
+
* defaultLanguage: 'en',
|
|
70
|
+
* disableAutoLanguageSwitch: false
|
|
71
|
+
* }}
|
|
72
|
+
* >
|
|
73
|
+
* {children}
|
|
74
|
+
* </ConsentManagerProvider>
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
translationConfig?: Partial<TranslationConfig>;
|
|
78
|
+
/**
|
|
79
|
+
* @remarks
|
|
80
|
+
* The configuration allows you to:
|
|
81
|
+
* - Define translations for multiple languages through the translations object
|
|
82
|
+
* - Set a default language via defaultLanguage prop
|
|
83
|
+
* - Control automatic language switching based on browser settings with disableAutoLanguageSwitch
|
|
84
|
+
* - Override specific translation keys while keeping defaults for others
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <ConsentManagerProvider
|
|
89
|
+
* trackingBlockerConfig={{}}
|
|
90
|
+
* />
|
|
91
|
+
*/
|
|
92
|
+
trackingBlockerConfig?: TrackingBlockerConfig;
|
|
93
|
+
/**
|
|
94
|
+
* @remarks
|
|
95
|
+
* Whether to lock the scroll when a modal is open, scroll lock will show the overlay
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
scrollLock?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Whether to trap focus when a dialog is open
|
|
101
|
+
* @default true
|
|
102
|
+
*/
|
|
103
|
+
trapFocus?: boolean;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Internal context value interface for the consent manager.
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* Combines both the current state and store instance for complete
|
|
110
|
+
* consent management functionality.
|
|
111
|
+
*
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
export interface ConsentManagerContextValue {
|
|
115
|
+
/** Current privacy consent state */
|
|
116
|
+
state: PrivacyConsentState;
|
|
117
|
+
/** Store instance for managing consent state */
|
|
118
|
+
store: ReturnType<typeof createConsentManagerStore>;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=consent-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-manager.d.ts","sourceRoot":"","sources":["../../src/types/consent-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IAClE;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAErC;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IACzE;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,GAAG,yBAAyB,CAAC;IAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE/C;;;;;;;;;;;;;OAaG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAE9C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,0BAA0B;IAC1C,oCAAoC;IACpC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gDAAgD;IAChD,KAAK,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;CACpD"}
|
|
File without changes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./style-keys": function(module) {
|
|
4
|
+
module.exports = require("./style-keys.cjs");
|
|
5
|
+
},
|
|
6
|
+
"./style-types": function(module) {
|
|
7
|
+
module.exports = require("./style-types.cjs");
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var __webpack_module_cache__ = {};
|
|
11
|
+
function __webpack_require__(moduleId) {
|
|
12
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
13
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
14
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
15
|
+
exports: {}
|
|
16
|
+
};
|
|
17
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
18
|
+
return module.exports;
|
|
19
|
+
}
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.n = function(module) {
|
|
22
|
+
var getter = module && module.__esModule ? function() {
|
|
23
|
+
return module['default'];
|
|
24
|
+
} : function() {
|
|
25
|
+
return module;
|
|
26
|
+
};
|
|
27
|
+
__webpack_require__.d(getter, {
|
|
28
|
+
a: getter
|
|
29
|
+
});
|
|
30
|
+
return getter;
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
(()=>{
|
|
34
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
35
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: definition[key]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
(()=>{
|
|
42
|
+
__webpack_require__.o = function(obj, prop) {
|
|
43
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
(()=>{
|
|
47
|
+
__webpack_require__.r = function(exports1) {
|
|
48
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
49
|
+
value: 'Module'
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
52
|
+
value: true
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
var __webpack_exports__ = {};
|
|
57
|
+
(()=>{
|
|
58
|
+
__webpack_require__.r(__webpack_exports__);
|
|
59
|
+
var _style_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./style-keys");
|
|
60
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
61
|
+
for(var __WEBPACK_IMPORT_KEY__ in _style_keys__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
62
|
+
return _style_keys__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
63
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
64
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
65
|
+
var _style_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./style-types");
|
|
66
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
67
|
+
for(var __WEBPACK_IMPORT_KEY__ in _style_types__WEBPACK_IMPORTED_MODULE_1__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
68
|
+
return _style_types__WEBPACK_IMPORTED_MODULE_1__[key];
|
|
69
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
70
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
71
|
+
})();
|
|
72
|
+
var __webpack_export_target__ = exports;
|
|
73
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
74
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
75
|
+
value: true
|
|
76
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = function(exports1) {
|
|
5
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
var __webpack_export_target__ = exports;
|
|
16
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
17
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
18
|
+
value: true
|
|
19
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ConsentManagerDialogTheme } from '../../components/consent-manager-dialog/theme';
|
|
2
|
+
import type { ConsentManagerWidgetTheme } from '../../components/consent-manager-widget/theme';
|
|
3
|
+
import type { CookieBannerTheme } from '../../components/cookie-banner/theme';
|
|
4
|
+
import type { AccordionStylesKeys } from '../../components/shared/ui/accordion';
|
|
5
|
+
import type { SwitchStylesKeys } from '../../components/shared/ui/switch';
|
|
6
|
+
import type { ThemeValue } from './';
|
|
7
|
+
type NestedKeys<T> = {
|
|
8
|
+
[K in keyof T & (string | number)]: T[K] extends object ? `${K & string}` | `${K & string}.${NestedKeys<T[K]>}` : `${K & string}`;
|
|
9
|
+
}[keyof T & (string | number)];
|
|
10
|
+
export type AllThemeKeys = NestedKeys<CookieBannerTheme> | NestedKeys<ConsentManagerWidgetTheme> | NestedKeys<ConsentManagerDialogTheme> | NestedKeys<AccordionStylesKeys> | NestedKeys<SwitchStylesKeys> | NestedKeys<{
|
|
11
|
+
button: ThemeValue;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=style-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-keys.d.ts","sourceRoot":"","sources":["../../../src/types/theme/style-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,KAAK,UAAU,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACpD,GAAG,CAAC,GAAG,MAAM,EAAE,GAAG,GAAG,CAAC,GAAG,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GACrD,GAAG,CAAC,GAAG,MAAM,EAAE;CAClB,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;AAE/B,MAAM,MAAM,YAAY,GAErB,UAAU,CAAC,iBAAiB,CAAC,GAC7B,UAAU,CAAC,yBAAyB,CAAC,GACrC,UAAU,CAAC,yBAAyB,CAAC,GAErC,UAAU,CAAC,mBAAmB,CAAC,GAC/B,UAAU,CAAC,gBAAgB,CAAC,GAC5B,UAAU,CAAC;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.r = function(exports1) {
|
|
5
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
|
+
value: 'Module'
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
var __webpack_exports__ = {};
|
|
14
|
+
__webpack_require__.r(__webpack_exports__);
|
|
15
|
+
var __webpack_export_target__ = exports;
|
|
16
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
17
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
18
|
+
value: true
|
|
19
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ClassValue } from 'clsx';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
import type { AllThemeKeys } from './style-keys';
|
|
4
|
+
/**
|
|
5
|
+
* Represents CSS properties with optional CSS variables
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type CSSPropertiesWithVars<T = Record<string, string | number>> = CSSProperties & Partial<T>;
|
|
9
|
+
/**
|
|
10
|
+
* Represents a style configuration that can include both inline styles and class names.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type ClassNameStyle<T = Record<string, string | number>> = {
|
|
14
|
+
/** @remarks CSS properties to be applied inline to the component */
|
|
15
|
+
style?: CSSPropertiesWithVars<T>;
|
|
16
|
+
/** @remarks CSS class names to be applied to the component */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** @remarks The type of style to apply to the component */
|
|
19
|
+
noStyle?: boolean;
|
|
20
|
+
/** @internal used to pass default class names to the component */
|
|
21
|
+
baseClassName?: ClassValue;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Represents a style value that can be either a class name string or a {@link ClassNameStyle} object.
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export type ThemeValue<T = Record<string, string | number>> = string | ClassNameStyle<T>;
|
|
28
|
+
export interface ExtendThemeKeys<T = CSSVariables> extends ClassNameStyle<T> {
|
|
29
|
+
themeKey: AllThemeKeys;
|
|
30
|
+
}
|
|
31
|
+
export type CSSVariables = {
|
|
32
|
+
[key: string]: string | number;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=style-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-types.d.ts","sourceRoot":"","sources":["../../../src/types/theme/style-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,IACpE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI;IACjE,oEAAoE;IACpE,KAAK,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACjC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,aAAa,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,IACvD,MAAM,GACN,cAAc,CAAC,CAAC,CAAC,CAAC;AAErB,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,YAAY,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAC3E,QAAQ,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAC/B,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = function(module) {
|
|
5
|
+
var getter = module && module.__esModule ? function() {
|
|
6
|
+
return module['default'];
|
|
7
|
+
} : function() {
|
|
8
|
+
return module;
|
|
9
|
+
};
|
|
10
|
+
__webpack_require__.d(getter, {
|
|
11
|
+
a: getter
|
|
12
|
+
});
|
|
13
|
+
return getter;
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
18
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: definition[key]
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
(()=>{
|
|
25
|
+
__webpack_require__.o = function(obj, prop) {
|
|
26
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
(()=>{
|
|
30
|
+
__webpack_require__.r = function(exports1) {
|
|
31
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
32
|
+
value: 'Module'
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
35
|
+
value: true
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
var __webpack_exports__ = {};
|
|
40
|
+
__webpack_require__.r(__webpack_exports__);
|
|
41
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
+
cn: ()=>cn,
|
|
43
|
+
cnExt: ()=>cnExt
|
|
44
|
+
});
|
|
45
|
+
const external_clsx_namespaceObject = require("clsx");
|
|
46
|
+
var external_clsx_default = /*#__PURE__*/ __webpack_require__.n(external_clsx_namespaceObject);
|
|
47
|
+
function cnExt(...classes) {
|
|
48
|
+
return external_clsx_default()(...classes);
|
|
49
|
+
}
|
|
50
|
+
const cn = external_clsx_default();
|
|
51
|
+
var __webpack_export_target__ = exports;
|
|
52
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
53
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
54
|
+
value: true
|
|
55
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import clsx, { type ClassValue } from 'clsx';
|
|
2
|
+
export type { ClassValue } from 'clsx';
|
|
3
|
+
/**
|
|
4
|
+
* Utilizes `clsx` with `tailwind-merge`, use in cases of possible class conflicts.
|
|
5
|
+
*/
|
|
6
|
+
export declare function cnExt(...classes: ClassValue[]): string;
|
|
7
|
+
/**
|
|
8
|
+
* A direct export of `clsx` without `tailwind-merge`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const cn: typeof clsx;
|
|
11
|
+
//# sourceMappingURL=cn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7C,YAAY,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;GAEG;AACH,wBAAgB,KAAK,CAAC,GAAG,OAAO,EAAE,UAAU,EAAE,UAE7C;AAED;;GAEG;AACH,eAAO,MAAM,EAAE,aAAO,CAAC"}
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
mergeStyles: ()=>mergeStyles
|
|
30
|
+
});
|
|
31
|
+
const external_cn_cjs_namespaceObject = require("./cn.cjs");
|
|
32
|
+
function mergeStyles(style1, style2) {
|
|
33
|
+
const getThemeValue = (style)=>{
|
|
34
|
+
if ('string' == typeof style || void 0 === style) return style;
|
|
35
|
+
if ('className' in style || 'style' in style || 'noStyle' in style) return style;
|
|
36
|
+
};
|
|
37
|
+
const s1 = getThemeValue(Array.isArray(style1) ? style1[0] : style1);
|
|
38
|
+
const s2 = getThemeValue(style2);
|
|
39
|
+
if ('object' == typeof s1 && s1?.noStyle || 'object' == typeof s2 && s2?.noStyle) return {
|
|
40
|
+
className: void 0,
|
|
41
|
+
style: void 0
|
|
42
|
+
};
|
|
43
|
+
const className = (0, external_cn_cjs_namespaceObject.cnExt)([
|
|
44
|
+
'string' == typeof s1 ? s1 : s1?.className,
|
|
45
|
+
'string' == typeof s2 ? s2 : s2?.className,
|
|
46
|
+
'object' == typeof s1 && s1?.baseClassName,
|
|
47
|
+
'object' == typeof s2 && s2?.baseClassName
|
|
48
|
+
]);
|
|
49
|
+
const style = {
|
|
50
|
+
...'object' == typeof s1 && s1?.style,
|
|
51
|
+
...'object' == typeof s2 && s2?.style
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
className: className || void 0,
|
|
55
|
+
style: Object.keys(style).length > 0 ? style : void 0
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var __webpack_export_target__ = exports;
|
|
59
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
60
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
61
|
+
value: true
|
|
62
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ClassNameStyle, ThemeValue } from '../types/theme';
|
|
2
|
+
/**
|
|
3
|
+
* Merges two styles objects, handling theme values and style properties.
|
|
4
|
+
*
|
|
5
|
+
* @param style1 - The first style object to merge
|
|
6
|
+
* @param style2 - The second style object to merge (Takes precedence over style1)
|
|
7
|
+
*
|
|
8
|
+
* @returns The merged styles object
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergeStyles(style1: ThemeValue, style2?: ThemeValue): ClassNameStyle;
|
|
11
|
+
//# sourceMappingURL=merge-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-styles.d.ts","sourceRoot":"","sources":["../../src/utils/merge-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhE;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,UAAU,GACjB,cAAc,CA2ChB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__cn_js_6c2be559__ from "./cn.js";
|
|
2
|
+
function mergeStyles(style1, style2) {
|
|
3
|
+
const getThemeValue = (style)=>{
|
|
4
|
+
if ('string' == typeof style || void 0 === style) return style;
|
|
5
|
+
if ('className' in style || 'style' in style || 'noStyle' in style) return style;
|
|
6
|
+
};
|
|
7
|
+
const s1 = getThemeValue(Array.isArray(style1) ? style1[0] : style1);
|
|
8
|
+
const s2 = getThemeValue(style2);
|
|
9
|
+
if ('object' == typeof s1 && s1?.noStyle || 'object' == typeof s2 && s2?.noStyle) return {
|
|
10
|
+
className: void 0,
|
|
11
|
+
style: void 0
|
|
12
|
+
};
|
|
13
|
+
const className = (0, __WEBPACK_EXTERNAL_MODULE__cn_js_6c2be559__.cnExt)([
|
|
14
|
+
'string' == typeof s1 ? s1 : s1?.className,
|
|
15
|
+
'string' == typeof s2 ? s2 : s2?.className,
|
|
16
|
+
'object' == typeof s1 && s1?.baseClassName,
|
|
17
|
+
'object' == typeof s2 && s2?.baseClassName
|
|
18
|
+
]);
|
|
19
|
+
const style = {
|
|
20
|
+
...'object' == typeof s1 && s1?.style,
|
|
21
|
+
...'object' == typeof s2 && s2?.style
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
className: className || void 0,
|
|
25
|
+
style: Object.keys(style).length > 0 ? style : void 0
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export { mergeStyles };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = function(obj, prop) {
|
|
14
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
(()=>{
|
|
18
|
+
__webpack_require__.r = function(exports1) {
|
|
19
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
20
|
+
value: 'Module'
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
23
|
+
value: true
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
var __webpack_exports__ = {};
|
|
28
|
+
__webpack_require__.r(__webpack_exports__);
|
|
29
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
30
|
+
deepMergeTranslations: ()=>deepMergeTranslations,
|
|
31
|
+
detectBrowserLanguage: ()=>detectBrowserLanguage,
|
|
32
|
+
mergeTranslationConfigs: ()=>mergeTranslationConfigs
|
|
33
|
+
});
|
|
34
|
+
function deepMergeTranslations(base, override) {
|
|
35
|
+
const sections = [
|
|
36
|
+
'cookieBanner',
|
|
37
|
+
'consentManagerDialog',
|
|
38
|
+
'consentManagerWidget',
|
|
39
|
+
'consentTypes'
|
|
40
|
+
];
|
|
41
|
+
return sections.reduce((result, section)=>{
|
|
42
|
+
result[section] = {
|
|
43
|
+
...base[section],
|
|
44
|
+
...override[section] || {}
|
|
45
|
+
};
|
|
46
|
+
return result;
|
|
47
|
+
}, {});
|
|
48
|
+
}
|
|
49
|
+
function mergeTranslationConfigs(defaultConfig, customConfig) {
|
|
50
|
+
const mergedTranslations = {
|
|
51
|
+
...defaultConfig.translations
|
|
52
|
+
};
|
|
53
|
+
if (customConfig?.translations) {
|
|
54
|
+
if (customConfig.translations.en) mergedTranslations.en = deepMergeTranslations(defaultConfig.translations.en, customConfig.translations.en);
|
|
55
|
+
for (const [lang, translations] of Object.entries(customConfig.translations))if ('en' !== lang && translations) {
|
|
56
|
+
const baseTranslations = mergedTranslations.en;
|
|
57
|
+
mergedTranslations[lang] = deepMergeTranslations(baseTranslations, translations);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
...defaultConfig,
|
|
62
|
+
...customConfig,
|
|
63
|
+
translations: mergedTranslations
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function detectBrowserLanguage(translations, defaultLanguage, disableAutoSwitch = false) {
|
|
67
|
+
if (disableAutoSwitch) return defaultLanguage || 'en';
|
|
68
|
+
const availableLanguages = Object.keys(translations).map((lang)=>lang.toLowerCase());
|
|
69
|
+
const browserLanguages = 'undefined' != typeof window ? navigator?.languages || [
|
|
70
|
+
navigator?.language || 'en'
|
|
71
|
+
] : [
|
|
72
|
+
'en'
|
|
73
|
+
];
|
|
74
|
+
for (const lang of browserLanguages){
|
|
75
|
+
const normalizedLang = lang.toLowerCase();
|
|
76
|
+
if (availableLanguages.includes(normalizedLang)) return normalizedLang;
|
|
77
|
+
const primaryLang = normalizedLang.split('-')[0];
|
|
78
|
+
if (primaryLang && availableLanguages.includes(primaryLang)) return primaryLang;
|
|
79
|
+
}
|
|
80
|
+
return 'en';
|
|
81
|
+
}
|
|
82
|
+
var __webpack_export_target__ = exports;
|
|
83
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
84
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
85
|
+
value: true
|
|
86
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TranslationConfig, Translations } from 'c15t';
|
|
2
|
+
/**
|
|
3
|
+
* Deep merges translation objects
|
|
4
|
+
*/
|
|
5
|
+
export declare function deepMergeTranslations(base: Translations, override: Partial<Translations>): Translations;
|
|
6
|
+
/**
|
|
7
|
+
* Merges custom translations with defaults
|
|
8
|
+
*/
|
|
9
|
+
export declare function mergeTranslationConfigs(defaultConfig: TranslationConfig, customConfig?: Partial<TranslationConfig>): TranslationConfig;
|
|
10
|
+
/**
|
|
11
|
+
* Detects browser language and returns appropriate default language
|
|
12
|
+
*/
|
|
13
|
+
export declare function detectBrowserLanguage(translations: Record<string, unknown>, defaultLanguage: string | undefined, disableAutoSwitch?: boolean): string;
|
|
14
|
+
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/utils/translations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAQ5D;;GAEG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAC7B,YAAY,CAed;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACtC,aAAa,EAAE,iBAAiB,EAChC,YAAY,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACvC,iBAAiB,CA+BnB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACpC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,iBAAiB,UAAQ,GACvB,MAAM,CAgCR"}
|