@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.
- package/CHANGELOG.md +18 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +1 -1
- package/dist/components/timepicker/useTimepickerState.d.ts +1 -1
- package/dist/punkt-react.cjs +1 -1
- package/dist/punkt-react.js +1052 -1034
- package/dist/shared-utils/date-utils.d.ts +16 -16
- package/dist/shared-utils/datepicker-utils.d.ts +11 -11
- package/dist/shared-utils/device-utils.d.ts +1 -1
- package/dist/shared-utils/utils.d.ts +2 -2
- package/dist/shared-utils/value-utils.d.ts +2 -2
- package/package.json +8 -7
- package/src/components/breadcrumbs/Breadcrumbs.test.tsx +1 -13
|
@@ -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?:
|
|
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:
|
|
121
|
+
todayInTz: typeof todayInTz;
|
|
122
122
|
parseISODateString: typeof parseISODateString;
|
|
123
|
-
formatISODate:
|
|
124
|
-
fromISOToDate:
|
|
125
|
-
fromISOtoLocal:
|
|
126
|
-
newDate:
|
|
127
|
-
newDateYMD:
|
|
128
|
-
newDateFromDate:
|
|
129
|
-
formatReadableDate:
|
|
130
|
-
isDateInRange:
|
|
131
|
-
isDateExcluded:
|
|
132
|
-
isWeekdayExcluded:
|
|
133
|
-
isDateSelectable:
|
|
134
|
-
filterSelectableDates:
|
|
135
|
-
sortDateStrings:
|
|
136
|
-
isValidDateRange:
|
|
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:
|
|
63
|
-
validateRangeOrder:
|
|
64
|
-
sortDates:
|
|
65
|
-
filterDates:
|
|
66
|
-
getDatepickerInputClasses:
|
|
67
|
-
getDatepickerButtonClasses:
|
|
68
|
-
getRangeLabelClasses:
|
|
69
|
-
processDateSelection:
|
|
70
|
-
handleCalendarPosition:
|
|
71
|
-
handleDatepickerKeydown:
|
|
72
|
-
handleDatepickerButtonKeydown:
|
|
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;
|
|
@@ -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:
|
|
14
|
-
uuidish:
|
|
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:
|
|
15
|
-
arrayToCsv:
|
|
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.
|
|
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.
|
|
48
|
-
"@oslokommune/punkt-css": "^17.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": "^
|
|
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": "
|
|
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": "
|
|
105
|
+
"gitHead": "51f7f8d53f738720e275a3d9492b26f7ff16b88a"
|
|
105
106
|
}
|
|
@@ -7,19 +7,7 @@ import { PktBreadcrumbs } from './Breadcrumbs'
|
|
|
7
7
|
|
|
8
8
|
expect.extend(toHaveNoViolations)
|
|
9
9
|
|
|
10
|
-
|
|
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 = [
|