@oslokommune/punkt-react 12.37.6 → 12.37.7
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/dist/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/accordion/Accordion.tsx +2 -0
- package/src/components/accordion/AccordionItem.tsx +2 -0
- package/src/components/alert/Alert.tsx +2 -0
- package/src/components/backlink/BackLink.tsx +2 -0
- package/src/components/breadcrumbs/Breadcrumbs.tsx +2 -0
- package/src/components/button/Button.tsx +2 -0
- package/src/components/card/Card.tsx +2 -0
- package/src/components/checkbox/Checkbox.tsx +2 -0
- package/src/components/combobox/Combobox.tsx +2 -0
- package/src/components/consent/Consent.tsx +2 -0
- package/src/components/datepicker/Datepicker.tsx +2 -0
- package/src/components/footer/Footer.tsx +2 -0
- package/src/components/footerSimple/FooterSimple.tsx +2 -0
- package/src/components/header/Header.tsx +2 -0
- package/src/components/heading/Heading.tsx +2 -0
- package/src/components/helptext/Helptext.tsx +2 -0
- package/src/components/icon/Icon.tsx +2 -0
- package/src/components/input/Input.tsx +2 -0
- package/src/components/inputwrapper/InputWrapper.tsx +3 -9
- package/src/components/link/Link.tsx +2 -0
- package/src/components/linkcard/LinkCard.tsx +2 -0
- package/src/components/loader/Loader.tsx +2 -0
- package/src/components/messagebox/Messagebox.tsx +2 -0
- package/src/components/modal/Modal.tsx +2 -0
- package/src/components/preview/Preview.tsx +2 -0
- package/src/components/preview/PreviewPropEditor.tsx +3 -1
- package/src/components/preview/PreviewSpecs.tsx +2 -0
- package/src/components/progressbar/Progressbar.tsx +2 -0
- package/src/components/radio/RadioButton.tsx +3 -1
- package/src/components/searchinput/SearchInput.tsx +4 -1
- package/src/components/select/Select.tsx +2 -0
- package/src/components/stepper/Step.tsx +2 -0
- package/src/components/stepper/Stepper.tsx +2 -0
- package/src/components/table/Table.tsx +2 -0
- package/src/components/table/TableBody.tsx +2 -0
- package/src/components/table/TableData.tsx +2 -0
- package/src/components/table/TableDataCell.tsx +2 -0
- package/src/components/table/TableHeader.tsx +2 -0
- package/src/components/table/TableHeaderCell.tsx +2 -0
- package/src/components/table/TableRow.tsx +2 -0
- package/src/components/tabs/Tabs.tsx +2 -0
- package/src/components/tag/Tag.tsx +2 -0
- package/src/components/textarea/Textarea.tsx +2 -0
- package/src/components/textinput/Textinput.tsx +2 -0
- package/src/components/childrenWrapper/childrenWrapper.tsx +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.37.7](https://github.com/oslokommune/punkt/compare/12.37.6...12.37.7) (2025-05-13)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Støtte nextjs med 'use client' på alle React-komponenter (#2537).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [12.37.0](https://github.com/oslokommune/punkt/compare/12.36.2...12.37.0) (2025-05-05)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -343,7 +343,7 @@ export declare interface IPktRadioButton extends InputHTMLAttributes<HTMLInputEl
|
|
|
343
343
|
defaultChecked?: boolean;
|
|
344
344
|
disabled?: boolean;
|
|
345
345
|
value?: string;
|
|
346
|
-
checkHelptext?: string |
|
|
346
|
+
checkHelptext?: string | ReactNode | ReactNode[];
|
|
347
347
|
ref?: ForwardedRef<HTMLInputElement>;
|
|
348
348
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
349
349
|
onInput?: ChangeEventHandler<HTMLInputElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "12.37.
|
|
3
|
+
"version": "12.37.7",
|
|
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",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
113
113
|
},
|
|
114
114
|
"license": "MIT",
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "5f647c136479cb172fa233080b8bef8c33f948e4"
|
|
116
116
|
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
forwardRef,
|
|
5
|
-
ForwardRefExoticComponent,
|
|
6
|
-
LegacyRef,
|
|
7
|
-
ReactElement,
|
|
8
|
-
ReactNode,
|
|
9
|
-
} from 'react'
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React, { FC, forwardRef, ForwardRefExoticComponent, LegacyRef, ReactElement, ReactNode } from 'react'
|
|
10
4
|
import { createComponent, EventName } from '@lit/react'
|
|
11
5
|
import { PktInputWrapper as PktEl } from '@oslokommune/punkt-elements'
|
|
12
6
|
import type { PktElType } from '@/interfaces/IPktElements'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
1
3
|
import React, {
|
|
2
4
|
ChangeEventHandler,
|
|
3
5
|
FocusEventHandler,
|
|
@@ -19,7 +21,7 @@ export interface IPktRadioButton extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
19
21
|
defaultChecked?: boolean
|
|
20
22
|
disabled?: boolean
|
|
21
23
|
value?: string
|
|
22
|
-
checkHelptext?: string |
|
|
24
|
+
checkHelptext?: string | ReactNode | ReactNode[]
|
|
23
25
|
|
|
24
26
|
ref?: ForwardedRef<HTMLInputElement>
|
|
25
27
|
onChange?: ChangeEventHandler<HTMLInputElement>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
1
3
|
import React, { ChangeEvent, forwardRef, HTMLProps, ReactNode } from 'react'
|
|
2
4
|
|
|
3
5
|
import { PktButton } from '../button/Button'
|
|
@@ -151,7 +153,8 @@ export const PktSearchInput = forwardRef<HTMLInputElement, ISearchInput | ISearc
|
|
|
151
153
|
}`,
|
|
152
154
|
type: suggestion.onClick ? 'button' : undefined,
|
|
153
155
|
onClick: () => handleSuggestionClick(suggestion.onClick, index),
|
|
154
|
-
onKeyUp: (event: { key: string }) =>
|
|
156
|
+
onKeyUp: (event: { key: string }) =>
|
|
157
|
+
event.key === 'Enter' && handleSuggestionClick(suggestion.onClick, index),
|
|
155
158
|
},
|
|
156
159
|
<>
|
|
157
160
|
{suggestion.title && <h3 className="pkt-searchinput__suggestion-title">{suggestion.title}</h3>}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
interface childrenWrapperProps {
|
|
4
|
-
wrapperType?: 'div' | 'span';
|
|
5
|
-
children?: React.ReactNode | React.ReactNode[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function childrenWrapper<P>(
|
|
9
|
-
Component: React.ComponentType<P>,
|
|
10
|
-
defaultWrapper: 'div' | 'span' = 'div'
|
|
11
|
-
): React.FC<P & childrenWrapperProps> { return ({ wrapperType = defaultWrapper, children, ...props }) => {
|
|
12
|
-
const Tag = wrapperType;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Component {...(props as P)}>
|
|
16
|
-
<Tag className="pkt-contents">{children}</Tag>
|
|
17
|
-
</Component>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
}
|