@oslokommune/punkt-react 19.3.1 → 19.5.0
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/CHANGELOG.md +10 -0
- package/dist/components/consent/Consent.d.ts +6 -38
- package/dist/components/icon/Icon.d.ts +4 -6
- package/dist/punkt-react.cjs +1 -1
- package/dist/punkt-react.js +1840 -1833
- package/dist/shared-types/consent.d.ts +69 -0
- package/dist/shared-types/icon.d.ts +39 -0
- package/dist/shared-types/index.d.ts +4 -0
- package/package.json +2 -2
- package/src/components/consent/Consent.test.tsx +6 -0
- package/src/components/consent/Consent.tsx +26 -54
- package/src/components/icon/Icon.tsx +7 -11
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [19.5.0](https://github.com/oslokommune/punkt/compare/19.4.0...19.5.0) (2026-09-30)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [19.4.0](https://github.com/oslokommune/punkt/compare/19.3.1...19.4.0) (2026-09-29)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
8
18
|
## [19.3.1](https://github.com/oslokommune/punkt/compare/19.3.0...19.3.1) (2026-09-29)
|
|
9
19
|
|
|
10
20
|
### Bug Fixes
|
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
consent: boolean;
|
|
5
|
-
}
|
|
6
|
-
interface ConsentValue {
|
|
7
|
-
items: ConsentItem[];
|
|
8
|
-
}
|
|
9
|
-
interface CookieConsentEvent {
|
|
10
|
-
value: string | ConsentValue;
|
|
11
|
-
}
|
|
12
|
-
type ConsentDetailsMap = Record<string, boolean>;
|
|
13
|
-
type CookieEventHandler = (consent: CookieConsentEvent) => void;
|
|
14
|
-
interface CookieEvents {
|
|
15
|
-
on(eventName: string, handler: CookieEventHandler): void;
|
|
16
|
-
off(eventName: string, handler: CookieEventHandler): void;
|
|
17
|
-
}
|
|
18
|
-
interface CookieBannerApi {
|
|
19
|
-
cookieConsent: {
|
|
20
|
-
validateConsentCookie(): Promise<boolean>;
|
|
21
|
-
getConsentCookie(): string | ConsentValue;
|
|
22
|
-
};
|
|
23
|
-
openCookieModal(): void;
|
|
24
|
-
}
|
|
2
|
+
import { ICookieBannerApi, ICookieEvents, IPktConsentBase, TConsentDetailsMap, TPktConsentTriggerType } from '../../shared-types';
|
|
3
|
+
export type { TPktConsentTriggerType };
|
|
25
4
|
declare global {
|
|
26
5
|
interface Window {
|
|
27
6
|
cookieBanner_devMode?: boolean;
|
|
@@ -30,22 +9,11 @@ declare global {
|
|
|
30
9
|
cookieBanner_cookieExpiryDays?: string | null;
|
|
31
10
|
cookieBanner_googleAnalyticsId?: string | null;
|
|
32
11
|
cookieBanner_hotjarId?: string | null;
|
|
33
|
-
cookieBanner?:
|
|
34
|
-
__cookieEvents?:
|
|
12
|
+
cookieBanner?: ICookieBannerApi;
|
|
13
|
+
__cookieEvents?: ICookieEvents;
|
|
35
14
|
}
|
|
36
15
|
}
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
devMode?: boolean;
|
|
40
|
-
cookieDomain?: string | null;
|
|
41
|
-
cookieSecure?: string | null;
|
|
42
|
-
cookieExpiryDays?: string | null;
|
|
43
|
-
hotjarId?: string | null;
|
|
44
|
-
googleAnalyticsId?: string | null;
|
|
45
|
-
i18nLanguage?: string;
|
|
46
|
-
triggerType?: TPktConsentTriggerType | null;
|
|
47
|
-
triggerText?: string | null;
|
|
48
|
-
onToggleConsent?: (e: CustomEvent<ConsentDetailsMap>) => void;
|
|
16
|
+
export interface IPktConsent extends IPktConsentBase, HTMLAttributes<HTMLElement> {
|
|
17
|
+
onToggleConsent?: (e: CustomEvent<TConsentDetailsMap>) => void;
|
|
49
18
|
}
|
|
50
19
|
export declare const PktConsent: import('react').ForwardRefExoticComponent<IPktConsent & import('react').RefAttributes<HTMLElement>>;
|
|
51
|
-
export {};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ariaHidden?: Booleanish;
|
|
7
|
-
ariaLabel?: string;
|
|
2
|
+
import { PktIconName } from '@oslokommune/punkt-assets/dist/icons/icon';
|
|
3
|
+
import { IPktIconBase } from '../../shared-types';
|
|
4
|
+
interface IPktIcon extends Omit<IPktIconBase, 'name'>, HTMLAttributes<HTMLElement> {
|
|
5
|
+
name?: PktIconName;
|
|
8
6
|
}
|
|
9
7
|
export declare const PktIcon: import('react').ForwardRefExoticComponent<IPktIcon & import('react').RefAttributes<HTMLSpanElement>>;
|
|
10
8
|
export {};
|