diff --git a/.changeset/ninety-jeans-punch.md b/.changeset/ninety-jeans-punch.md new file mode 100644 index 0000000000..36fd8b1f5d --- /dev/null +++ b/.changeset/ninety-jeans-punch.md @@ -0,0 +1,5 @@ +--- +"@digdir/designsystemet-react": patch +--- + +React: Set `"type": "module"` in `package.json` diff --git a/.changeset/silver-penguins-occur.md b/.changeset/silver-penguins-occur.md new file mode 100644 index 0000000000..c86bc3f3d9 --- /dev/null +++ b/.changeset/silver-penguins-occur.md @@ -0,0 +1,6 @@ +--- +"@digdir/designsystemet-react": patch +"@digdir/designsystemet-css": patch +--- + +Rename `Accordion` to `Details` diff --git a/packages/react/package.json b/packages/react/package.json index c2a3a48920..f13abe14b1 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,5 +1,6 @@ { "name": "@digdir/designsystemet-react", + "type": "module", "version": "1.0.0-next.39", "description": "React components for Designsystemet", "author": "Designsystemet team", diff --git a/packages/react/src/components/Details/Details.mdx b/packages/react/src/components/Details/Details.mdx index 5b85b83d7d..dd7a08fe6d 100644 --- a/packages/react/src/components/Details/Details.mdx +++ b/packages/react/src/components/Details/Details.mdx @@ -25,12 +25,24 @@ Med `Details` kan du presentere mye innhold på liten plass i en eller flere rad ## Bruk ```tsx +/* Uten ramme */ import { Details } from '@digdir/designsystemet-react';
Details heading text Details content
+ +/* Med ramme */ + +import { Details, Card } from '@digdir/designsystemet-react'; + + +
+ Details heading text + Details content +
+
``` ## Eksempler diff --git a/packages/react/src/components/form/Fieldset/Fieldset.tsx b/packages/react/src/components/form/Fieldset/Fieldset.tsx index b0a07bca7b..690205a578 100644 --- a/packages/react/src/components/form/Fieldset/Fieldset.tsx +++ b/packages/react/src/components/form/Fieldset/Fieldset.tsx @@ -1,19 +1,11 @@ import cl from 'clsx/lite'; -import type { FieldsetHTMLAttributes, ReactNode } from 'react'; +import type { FieldsetHTMLAttributes } from 'react'; import { forwardRef } from 'react'; import type { DefaultProps } from '../../../types'; -import type { MergeRight } from '../../../utilities'; -export type FieldsetProps = MergeRight< - DefaultProps & FieldsetHTMLAttributes, - { - /** Toggle `disabled` all input fields within the fieldset. */ - disabled?: boolean; - /** If set, this will diplay an error message at the bottom of the fieldset. */ - error?: ReactNode; - } ->; +export type FieldsetProps = DefaultProps & + FieldsetHTMLAttributes; export const Fieldset = forwardRef( function Fieldset({ className, ...rest }, ref) {