@oslokommune/punkt-react 19.0.4 → 19.2.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 +13 -0
- package/CONTRIBUTING.md +0 -8
- package/dist/components/footerSimple/FooterSimple.d.ts +0 -12
- package/dist/punkt-react.cjs +1 -1
- package/dist/punkt-react.js +473 -473
- package/dist/shared-types/alert.d.ts +6 -0
- package/dist/shared-types/footer.d.ts +14 -2
- package/dist/shared-types/index.d.ts +1 -1
- package/dist/shared-utils/combobox/option-utils.d.ts +4 -4
- package/package.json +3 -3
- package/src/components/footerSimple/FooterSimple.tsx +0 -12
|
@@ -17,4 +17,10 @@ export type IAlertSpecProps = {
|
|
|
17
17
|
ariaLive?: TAriaLive;
|
|
18
18
|
size?: TAlertSize;
|
|
19
19
|
closeAlert?: boolean;
|
|
20
|
+
/** @deprecated Bruk `size` i stedet. Uten eksplisitt `size` gir compact størrelsen 'small'. */
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
};
|
|
23
|
+
/** Default for the deprecated `compact` prop — single source of truth for both frameworks. */
|
|
24
|
+
export declare const ALERT_DEFAULTS: {
|
|
25
|
+
readonly compact: false;
|
|
20
26
|
};
|
|
@@ -89,17 +89,29 @@ export interface IPktFooterProps<IconType = string> extends IPktFooterBase<IconT
|
|
|
89
89
|
export interface IPktFooterSimpleProps<IconType = string> extends IPktFooterBase<IconType> {
|
|
90
90
|
/** Custom links shown as a compact row in the secondary (grey) footer. */
|
|
91
91
|
links?: IPktFooterLink[];
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated The privacy link now comes from the global footer's payload.
|
|
94
|
+
* Only rendered (in the secondary footer) when explicitly set to a
|
|
95
|
+
* non-default value.
|
|
96
|
+
*/
|
|
97
|
+
personvernOgInfoLink?: string;
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated The accessibility link now comes from the global footer's
|
|
100
|
+
* payload. Only rendered (in the secondary footer) when explicitly set
|
|
101
|
+
* to a non-default value.
|
|
102
|
+
*/
|
|
103
|
+
tilgjengelighetLink?: string;
|
|
92
104
|
}
|
|
93
105
|
/**
|
|
94
106
|
* Documented FooterSimple props (subset of `IPktFooterSimpleProps`).
|
|
95
107
|
* Used for typed component specs in documentation.
|
|
96
108
|
*/
|
|
97
|
-
export type IFooterSimpleSpecProps = Pick<IPktFooterSimpleProps, 'links' | 'skipGlobal' | 'data' | 'dataUrl' | 'locale' | 'openLinksInNewTab' | 'includeConsent' | 'googleAnalyticsId' | 'hotjarId'>;
|
|
109
|
+
export type IFooterSimpleSpecProps = Pick<IPktFooterSimpleProps, 'links' | 'skipGlobal' | 'data' | 'dataUrl' | 'locale' | 'openLinksInNewTab' | 'includeConsent' | 'googleAnalyticsId' | 'hotjarId' | 'personvernOgInfoLink' | 'tilgjengelighetLink'>;
|
|
98
110
|
/**
|
|
99
111
|
* Documented Footer props (subset of `IPktFooterProps`).
|
|
100
112
|
* Used for typed component specs in documentation.
|
|
101
113
|
*/
|
|
102
|
-
export type IFooterSpecProps = Pick<IPktFooterProps, 'columns' | 'skipGlobal' | 'data' | 'dataUrl' | 'locale' | 'openLinksInNewTab' | 'includeConsent' | 'googleAnalyticsId' | 'hotjarId'>;
|
|
114
|
+
export type IFooterSpecProps = Pick<IPktFooterProps, 'columns' | 'skipGlobal' | 'data' | 'dataUrl' | 'locale' | 'openLinksInNewTab' | 'includeConsent' | 'googleAnalyticsId' | 'hotjarId' | 'columnOne' | 'columnTwo' | 'personvernOgInfoLink' | 'tilgjengelighetLink' | 'socialLinks'>;
|
|
103
115
|
/** Historical defaults for the deprecated link props — used to detect explicit overrides. */
|
|
104
116
|
export declare const DEFAULT_FOOTER_PERSONVERN_URL = "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/";
|
|
105
117
|
export declare const DEFAULT_FOOTER_TILGJENGELIGHET_URL = "https://www.oslo.kommune.no/tilgjengelighet/";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { Booleanish } from './booleanish';
|
|
2
2
|
export { booleanishConverter, nullableBooleanishConverter } from './booleanish';
|
|
3
3
|
export { ARIA_LIVE_VALUES, type TAriaBoolean, type TAriaBooleanMixed, type TAriaCurrent, type TAriaHasPopup, type TAriaInvalid, type TAriaLive, type TAriaRelevant, type TAriaSort, type TAriaAutoComplete, type TAriaOrientation, type IAriaAttributes, type TAlertRole, } from './aria';
|
|
4
|
-
export { ALERT_SKINS, ALERT_SIZES, type TAlertSkin, type TAlertSize, type IAlertSpecProps, } from './alert';
|
|
4
|
+
export { ALERT_SKINS, ALERT_SIZES, ALERT_DEFAULTS, type TAlertSkin, type TAlertSize, type IAlertSpecProps, } from './alert';
|
|
5
5
|
export type { THeadingLevel, THeadingSize, THeadingWeight } from './heading';
|
|
6
6
|
export type { User, Representing, UserMenuItem, InternalMenuItemBase, InternalMenuLink, InternalMenuButton, TInternalMenuItem, TSlotMenuVariant, THeaderMenu, TLogOutButtonPlacement, THeaderPosition, THeaderScrollBehavior, } from './header';
|
|
7
7
|
export { convertUserMenuItem } from './header';
|
|
@@ -14,14 +14,14 @@ export declare const findOptionByValue: (options: IPktComboboxOption[], value: s
|
|
|
14
14
|
* Finds the index of an option by its value, falling back to label match.
|
|
15
15
|
*/
|
|
16
16
|
export declare const findOptionIndex: (options: IPktComboboxOption[], value: string | null) => number;
|
|
17
|
-
/**
|
|
18
|
-
* Filters options by a search string, matching against fulltext.
|
|
19
|
-
*/
|
|
20
|
-
export declare const filterOptionsBySearch: (options: IPktComboboxOption[], search: string | null) => IPktComboboxOption[];
|
|
21
17
|
/**
|
|
22
18
|
* Builds the fulltext search string for an option.
|
|
23
19
|
*/
|
|
24
20
|
export declare const buildFulltext: (option: IPktComboboxOption) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Filters options by a search string, matching against fulltext.
|
|
23
|
+
*/
|
|
24
|
+
export declare const filterOptionsBySearch: (options: IPktComboboxOption[], search: string | null) => IPktComboboxOption[];
|
|
25
25
|
/**
|
|
26
26
|
* Checks if the maximum number of selections has been reached.
|
|
27
27
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "19.0
|
|
3
|
+
"version": "19.2.0",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, designsystem for Oslo kommune",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo kommune",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@eslint/eslintrc": "^3.3.5",
|
|
42
42
|
"@eslint/js": "^10.0.1",
|
|
43
43
|
"@oslokommune/punkt-assets": "^19.0.4",
|
|
44
|
-
"@oslokommune/punkt-css": "^19.0
|
|
44
|
+
"@oslokommune/punkt-css": "^19.1.0",
|
|
45
45
|
"@testing-library/jest-dom": "^6.9.1",
|
|
46
46
|
"@testing-library/react": "^16.3.2",
|
|
47
47
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
102
102
|
},
|
|
103
103
|
"license": "MIT",
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "9ffef14fdbc5993d24cba60a16324095834103f5"
|
|
105
105
|
}
|
|
@@ -16,18 +16,6 @@ import { FooterGlobal, useGlobalFooterData, type TFooterConsentConfig } from '..
|
|
|
16
16
|
export interface IPktFooterSimple
|
|
17
17
|
extends IPktFooterSimpleProps<string>, TFooterConsentConfig, Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
18
18
|
onDataError?: (error: Error) => void
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated The privacy link now comes from the global footer's payload.
|
|
21
|
-
* Only rendered (in the secondary footer) when explicitly set to a
|
|
22
|
-
* non-default value.
|
|
23
|
-
*/
|
|
24
|
-
personvernOgInfoLink?: string
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated The accessibility link now comes from the global footer's
|
|
27
|
-
* payload. Only rendered (in the secondary footer) when explicitly set
|
|
28
|
-
* to a non-default value.
|
|
29
|
-
*/
|
|
30
|
-
tilgjengelighetLink?: string
|
|
31
19
|
}
|
|
32
20
|
|
|
33
21
|
const SimpleLink: FC<{ link: IPktFooterLink; openLinksInNewTab: boolean }> = ({ link, openLinksInNewTab }) => {
|