@oslokommune/punkt-react 17.1.1 → 17.1.2

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.
@@ -44,7 +44,7 @@ export declare const fromISOtoLocal: (date: string, dateformat: string) => strin
44
44
  * @param timeOfDay - 'start' to set time to 00:00:00, 'end' to set time to 23:59:59
45
45
  * @returns A Date object
46
46
  */
47
- export declare const newDate: (date?: string | Date, timeOfDay?: "start" | "end") => Date;
47
+ export declare const newDate: (date?: string | Date, timeOfDay?: 'start' | 'end') => Date;
48
48
  /**
49
49
  * Creates a new Date object based on the provided year, month, and day.
50
50
  * If the inputs are invalid, returns the current date.
@@ -118,21 +118,21 @@ export declare const sortDateStrings: (dates: string[]) => string[];
118
118
  */
119
119
  export declare const isValidDateRange: (startDate: string, endDate: string) => boolean;
120
120
  declare const _default: {
121
- todayInTz: (tz?: string) => Date;
121
+ todayInTz: typeof todayInTz;
122
122
  parseISODateString: typeof parseISODateString;
123
- formatISODate: (date: Date | TZDate) => string;
124
- fromISOToDate: (date: string | null) => Date | null;
125
- fromISOtoLocal: (date: string, dateformat: string) => string;
126
- newDate: (date?: string | Date, timeOfDay?: "start" | "end") => Date;
127
- newDateYMD: (year: number, month: number, day?: number) => Date;
128
- newDateFromDate: (date: Date | TZDate | number) => Date;
129
- formatReadableDate: (date: Date | TZDate) => string;
130
- isDateInRange: (date: Date, min?: string | null, max?: string | null) => boolean;
131
- isDateExcluded: (date: Date, excludedDates: string[]) => boolean;
132
- isWeekdayExcluded: (date: Date, excludedWeekdays: string[]) => boolean;
133
- isDateSelectable: (date: Date, min?: string | null, max?: string | null, excludedDates?: string[], excludedWeekdays?: string[]) => boolean;
134
- filterSelectableDates: (dates: string[], min?: string | null, max?: string | null, excludedDates?: string[], excludedWeekdays?: string[]) => string[];
135
- sortDateStrings: (dates: string[]) => string[];
136
- isValidDateRange: (startDate: string, endDate: string) => boolean;
123
+ formatISODate: typeof formatISODate;
124
+ fromISOToDate: typeof fromISOToDate;
125
+ fromISOtoLocal: typeof fromISOtoLocal;
126
+ newDate: typeof newDate;
127
+ newDateYMD: typeof newDateYMD;
128
+ newDateFromDate: typeof newDateFromDate;
129
+ formatReadableDate: typeof formatReadableDate;
130
+ isDateInRange: typeof isDateInRange;
131
+ isDateExcluded: typeof isDateExcluded;
132
+ isWeekdayExcluded: typeof isWeekdayExcluded;
133
+ isDateSelectable: typeof isDateSelectable;
134
+ filterSelectableDates: typeof filterSelectableDates;
135
+ sortDateStrings: typeof sortDateStrings;
136
+ isValidDateRange: typeof isValidDateRange;
137
137
  };
138
138
  export default _default;
@@ -59,16 +59,16 @@ export declare const handleDatepickerKeydown: (event: KeyboardEvent, toggleCalen
59
59
  */
60
60
  export declare const handleDatepickerButtonKeydown: (event: KeyboardEvent, toggleCalendar: (e: Event) => void) => void;
61
61
  declare const _default: {
62
- getDatepickerInputType: () => string;
63
- validateRangeOrder: (values: string[]) => boolean;
64
- sortDates: (dates: string[]) => string[];
65
- filterDates: (dates: string[], min?: string | null, max?: string | null, excludedDates?: string[], excludedWeekdays?: string[]) => string[];
66
- getDatepickerInputClasses: (fullwidth: boolean, showRangeLabels: boolean, multiple: boolean, range: boolean, readonly?: boolean, inputType?: string, inputSize?: TPktInputSize) => Record<string, boolean>;
67
- getDatepickerButtonClasses: (inputSize?: TPktInputSize) => Record<string, boolean>;
68
- getRangeLabelClasses: (showRangeLabels: boolean) => Record<string, boolean>;
69
- processDateSelection: (detail: string | string[], multiple: boolean, range: boolean) => string;
70
- handleCalendarPosition: (popup: HTMLElement | null, input: HTMLElement | null, hasCounter?: boolean) => void;
71
- handleDatepickerKeydown: (event: KeyboardEvent, toggleCalendar: (e: Event) => void, submitForm?: () => void, focusNextInput?: () => void, blurInput?: () => void, commaHandler?: (e: KeyboardEvent) => void) => void;
72
- handleDatepickerButtonKeydown: (event: KeyboardEvent, toggleCalendar: (e: Event) => void) => void;
62
+ getDatepickerInputType: typeof getDatepickerInputType;
63
+ validateRangeOrder: typeof validateRangeOrder;
64
+ sortDates: typeof sortDates;
65
+ filterDates: typeof filterDates;
66
+ getDatepickerInputClasses: typeof getDatepickerInputClasses;
67
+ getDatepickerButtonClasses: typeof getDatepickerButtonClasses;
68
+ getRangeLabelClasses: typeof getRangeLabelClasses;
69
+ processDateSelection: typeof processDateSelection;
70
+ handleCalendarPosition: typeof handleCalendarPosition;
71
+ handleDatepickerKeydown: typeof handleDatepickerKeydown;
72
+ handleDatepickerButtonKeydown: typeof handleDatepickerButtonKeydown;
73
73
  };
74
74
  export default _default;
@@ -5,6 +5,6 @@
5
5
  */
6
6
  export declare const isIOS: () => boolean;
7
7
  declare const _default: {
8
- isIOS: () => boolean;
8
+ isIOS: typeof isIOS;
9
9
  };
10
10
  export default _default;
@@ -10,7 +10,7 @@ export declare const sleep: (ms: number) => Promise<void>;
10
10
  */
11
11
  export declare const uuidish: () => string;
12
12
  declare const _default: {
13
- sleep: (ms: number) => Promise<void>;
14
- uuidish: () => string;
13
+ sleep: typeof sleep;
14
+ uuidish: typeof uuidish;
15
15
  };
16
16
  export default _default;
@@ -11,7 +11,7 @@ export declare const valueToArray: (value: string | string[] | null | undefined)
11
11
  */
12
12
  export declare const arrayToCsv: (array: string[]) => string;
13
13
  declare const _default: {
14
- valueToArray: (value: string | string[] | null | undefined) => string[];
15
- arrayToCsv: (array: string[]) => string;
14
+ valueToArray: typeof valueToArray;
15
+ arrayToCsv: typeof arrayToCsv;
16
16
  };
17
17
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "17.1.1",
3
+ "version": "17.1.2",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -44,8 +44,8 @@
44
44
  "@eslint/compat": "^2.1.0",
45
45
  "@eslint/eslintrc": "^3.3.5",
46
46
  "@eslint/js": "^10.0.1",
47
- "@oslokommune/punkt-assets": "^17.0.3",
48
- "@oslokommune/punkt-css": "^17.1.1",
47
+ "@oslokommune/punkt-assets": "^17.1.2",
48
+ "@oslokommune/punkt-css": "^17.1.2",
49
49
  "@testing-library/jest-dom": "^6.9.1",
50
50
  "@testing-library/react": "^16.3.2",
51
51
  "@testing-library/user-event": "^14.6.1",
@@ -62,8 +62,9 @@
62
62
  "globals": "^17.6.0",
63
63
  "jest-axe": "^10.0.0",
64
64
  "jsdom": "^29.1.1",
65
+ "react-router-dom": "^6.30.6",
65
66
  "sass": "^1.101.0",
66
- "typescript": "^6.0.3",
67
+ "typescript": "^7.0.2",
67
68
  "typescript-eslint": "^8.61.1",
68
69
  "vite": "^8.0.16",
69
70
  "vite-plugin-dts": "^5.0.2",
@@ -74,10 +75,10 @@
74
75
  "@oslokommune/punkt-css": "*",
75
76
  "react": ">=18.3.1 <20.0.0",
76
77
  "react-dom": ">=18.3.1 <20.0.0",
77
- "react-router-dom": "^6.26.2"
78
+ "react-router-dom": "^6.26.2 || ^7.0.0"
78
79
  },
79
80
  "engines": {
80
- "node": ">=22.12.0"
81
+ "node": "^22.19.0 || ^24.0.0 || ^26.0.0"
81
82
  },
82
83
  "private": false,
83
84
  "publishConfig": {
@@ -101,5 +102,5 @@
101
102
  "url": "https://github.com/oslokommune/punkt/issues"
102
103
  },
103
104
  "license": "MIT",
104
- "gitHead": "0e600db899cfda4ac87979c94724908424ba56c8"
105
+ "gitHead": "51f7f8d53f738720e275a3d9492b26f7ff16b88a"
105
106
  }
@@ -7,19 +7,7 @@ import { PktBreadcrumbs } from './Breadcrumbs'
7
7
 
8
8
  expect.extend(toHaveNoViolations)
9
9
 
10
- // Create a Router with future flags to suppress warnings
11
- const TestRouter = ({ children }: { children: ReactNode }) => (
12
- <Router
13
- future={{
14
- // eslint-disable-next-line camelcase
15
- v7_startTransition: true,
16
- // eslint-disable-next-line camelcase
17
- v7_relativeSplatPath: true,
18
- }}
19
- >
20
- {children}
21
- </Router>
22
- )
10
+ const TestRouter = ({ children }: { children: ReactNode }) => <Router>{children}</Router>
23
11
 
24
12
  describe('PktBreadcrumbs Component', () => {
25
13
  const breadcrumbs = [