@oslokommune/punkt-react 17.1.3 → 18.1.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 +35 -0
- package/dist/components/accordion/Accordion.d.ts +2 -12
- package/dist/components/accordion/AccordionItem.d.ts +2 -8
- package/dist/components/alert/Alert.d.ts +4 -3
- package/dist/components/backlink/BackLink.d.ts +3 -10
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +7 -13
- package/dist/components/calendar/types.d.ts +14 -12
- package/dist/components/checkbox/Checkbox.d.ts +5 -0
- package/dist/components/combobox/types.d.ts +5 -0
- package/dist/components/consent/strings.d.ts +1 -85
- package/dist/components/datepicker/DateTags.d.ts +2 -2
- package/dist/components/datepicker/types.d.ts +6 -3
- package/dist/components/fileupload/DropZone.d.ts +3 -0
- package/dist/components/fileupload/FileUpload.d.ts +9 -61
- package/dist/components/header/types.d.ts +5 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/inputwrapper/InputWrapper.d.ts +6 -0
- package/dist/components/link/Link.d.ts +2 -6
- package/dist/components/radio/RadioButton.d.ts +5 -0
- package/dist/components/searchinput/SearchInput.d.ts +4 -0
- package/dist/components/select/Select.d.ts +3 -0
- package/dist/components/strings/PktStringsProvider.d.ts +21 -0
- package/dist/components/strings/strings-override.test.d.ts +1 -0
- package/dist/components/tag/Tag.d.ts +3 -0
- package/dist/components/textarea/Textarea.d.ts +3 -0
- package/dist/components/textinput/Textinput.d.ts +3 -0
- package/dist/components/timepicker/types.d.ts +3 -2
- package/dist/components/timepicker/useTimepickerState.d.ts +9 -1
- package/dist/punkt-react.cjs +1 -1
- package/dist/punkt-react.js +2982 -2757
- package/dist/shared-strings/consent.d.ts +71 -0
- package/dist/shared-strings/format.d.ts +21 -0
- package/dist/shared-strings/index.d.ts +14 -0
- package/dist/shared-strings/nb.d.ts +121 -0
- package/dist/shared-strings/resolve.d.ts +12 -0
- package/dist/shared-strings/store.d.ts +27 -0
- package/dist/shared-strings/types.d.ts +40 -0
- package/dist/shared-types/accordion.d.ts +58 -0
- package/dist/shared-types/alert.d.ts +20 -0
- package/dist/shared-types/aria.d.ts +2 -1
- package/dist/shared-types/backlink.d.ts +23 -0
- package/dist/shared-types/breadcrumbs.d.ts +33 -0
- package/dist/shared-types/fileupload.d.ts +55 -28
- package/dist/shared-types/footer.d.ts +10 -0
- package/dist/shared-types/form-field.d.ts +45 -0
- package/dist/shared-types/header-footer.d.ts +2 -0
- package/dist/shared-types/index.d.ts +15 -6
- package/dist/shared-types/render-link.d.ts +22 -0
- package/dist/shared-types/skin.d.ts +2 -9
- package/dist/shared-utils/combobox/index.d.ts +1 -0
- package/dist/shared-utils/combobox/input-utils.d.ts +2 -1
- package/dist/shared-utils/combobox/messages.d.ts +7 -0
- package/dist/shared-utils/combobox/option-utils.d.ts +2 -1
- package/dist/shared-utils/combobox/selection-manager.d.ts +3 -2
- package/package.json +4 -4
- package/src/components/accordion/Accordion.tsx +2 -12
- package/src/components/accordion/AccordionItem.tsx +2 -8
- package/src/components/alert/Alert.tsx +12 -5
- package/src/components/backlink/BackLink.tsx +12 -12
- package/src/components/breadcrumbs/Breadcrumbs.tsx +19 -15
- package/src/components/calendar/Calendar.core.test.tsx +7 -5
- package/src/components/calendar/types.ts +14 -34
- package/src/components/calendar/useCalendarState.ts +16 -2
- package/src/components/checkbox/Checkbox.tsx +20 -4
- package/src/components/combobox/Combobox.tsx +1 -0
- package/src/components/combobox/Listbox.tsx +4 -2
- package/src/components/combobox/types.ts +6 -0
- package/src/components/combobox/useComboboxState.ts +15 -8
- package/src/components/consent/strings.ts +1 -125
- package/src/components/datepicker/DateTags.tsx +4 -3
- package/src/components/datepicker/Datepicker.accessibility.test.tsx +2 -2
- package/src/components/datepicker/Datepicker.tsx +1 -0
- package/src/components/datepicker/DatepickerInputs.tsx +6 -6
- package/src/components/datepicker/types.ts +6 -3
- package/src/components/datepicker/useDatepickerState.ts +4 -5
- package/src/components/fileupload/DropZone.tsx +20 -15
- package/src/components/fileupload/FileUpload.test.tsx +37 -0
- package/src/components/fileupload/FileUpload.tsx +63 -73
- package/src/components/header/HeaderGlobal.tsx +5 -2
- package/src/components/header/HeaderService.tsx +12 -7
- package/src/components/header/types.ts +6 -0
- package/src/components/index.ts +10 -0
- package/src/components/inputwrapper/InputWrapper.tsx +28 -6
- package/src/components/link/Link.tsx +2 -6
- package/src/components/radio/RadioButton.tsx +18 -2
- package/src/components/searchinput/SearchInput.tsx +13 -3
- package/src/components/select/Select.tsx +5 -0
- package/src/components/strings/PktStringsProvider.tsx +38 -0
- package/src/components/strings/strings-override.test.tsx +130 -0
- package/src/components/tag/Tag.tsx +13 -2
- package/src/components/textarea/Textarea.tsx +5 -0
- package/src/components/textinput/Textinput.tsx +5 -0
- package/src/components/timepicker/Timepicker.tsx +1 -0
- package/src/components/timepicker/types.ts +3 -2
- package/src/components/timepicker/useTimepickerState.ts +20 -22
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ChangeEventHandler, ReactNode, TextareaHTMLAttributes } from 'react';
|
|
2
2
|
import { TPktInputSize } from '../../shared-types/size';
|
|
3
|
+
import { TPktStringsOverride } from '../../shared-strings';
|
|
3
4
|
export interface IPktTextarea extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
5
|
+
/** Overstyrer tekster for denne komponenten. */
|
|
6
|
+
strings?: TPktStringsOverride;
|
|
4
7
|
id: string;
|
|
5
8
|
ariaDescribedby?: string;
|
|
6
9
|
ariaLabelledby?: string;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ChangeEventHandler, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { TPktStringsOverride } from '../../shared-strings';
|
|
2
3
|
export interface IPktTextinput extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
/** Overstyrer tekster for denne komponenten. */
|
|
5
|
+
strings?: TPktStringsOverride;
|
|
3
6
|
id: string;
|
|
4
7
|
ariaDescribedby?: string;
|
|
5
8
|
ariaLabelledby?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { TPktStringsOverride } from '../../shared-strings';
|
|
1
2
|
import { ChangeEvent, FocusEvent, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
3
|
import { TPktInputSize } from '../../shared-types/size';
|
|
3
|
-
import { ITimepickerStrings } from '../../shared-types/timepicker';
|
|
4
4
|
/**
|
|
5
5
|
* Props for {@link PktTimepicker}: a React time picker with `HH:MM`, aligned with Elements `pkt-timepicker`.
|
|
6
6
|
*
|
|
@@ -67,7 +67,8 @@ export interface IPktTimepicker extends Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
67
67
|
/** Passed through to InputWrapper as `aria-describedby`. */
|
|
68
68
|
ariaDescribedby?: string;
|
|
69
69
|
/** Copy for hours, minutes, buttons, and popup. */
|
|
70
|
-
|
|
70
|
+
/** Overstyrer tekster for denne komponenten. */
|
|
71
|
+
strings?: TPktStringsOverride;
|
|
71
72
|
/** Change event from the hidden input (`e.target.value` is `HH:MM`). In React, `onChange` already fires on input. */
|
|
72
73
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
73
74
|
/** Callback with the committed `HH:MM` string. */
|
|
@@ -6,7 +6,15 @@ export declare function useTimepickerState(props: IPktTimepicker, ref: React.For
|
|
|
6
6
|
containerRef: import('react').RefObject<HTMLDivElement | null>;
|
|
7
7
|
outerClasses: string;
|
|
8
8
|
inputSize: TPktInputSize;
|
|
9
|
-
strings:
|
|
9
|
+
strings: {
|
|
10
|
+
hours: string;
|
|
11
|
+
minutes: string;
|
|
12
|
+
openPicker: string;
|
|
13
|
+
prevTime: string;
|
|
14
|
+
nextTime: string;
|
|
15
|
+
selectTime: string;
|
|
16
|
+
};
|
|
17
|
+
stringsOverride: import('../../shared-strings').TPktStringsOverride | undefined;
|
|
10
18
|
label: string;
|
|
11
19
|
disabled: boolean;
|
|
12
20
|
required: boolean;
|