Skip to content

Commit b1fc5cb

Browse files
authored
revert: "chore: upgrade u-combobox and u-datalist" (#4814)
1 parent 2e60ff3 commit b1fc5cb

8 files changed

Lines changed: 32 additions & 54 deletions

File tree

.changeset/angry-rabbits-shout.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/khaki-bobcats-love.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/yellow-bars-wait.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/css/src/suggestion.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@
158158
}
159159
}
160160

161-
&[data-activedescendant] {
162-
@composes ds-focus--visible--inset from './base.css';
163-
}
161+
@composes ds-focus--inset from './base.css';
164162

165163
@media (hover: hover) and (pointer: fine) {
166164
&:not([data-empty]):hover {

packages/react/src/components/error-summary/error-summary.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { DSErrorSummaryElement } from '@digdir/designsystemet-web';
21
import type { Meta, StoryFn } from '@storybook/react-vite';
32
import { useEffect, useRef, useState } from 'react';
43
import { expect, userEvent, within } from 'storybook/test';
@@ -86,7 +85,7 @@ WithForm.decorators = [
8685

8786
export const ShowHideReact: Story = () => {
8887
const [show, setShow] = useState(false);
89-
const summaryRef = useRef<DSErrorSummaryElement>(null);
88+
const summaryRef = useRef<HTMLDivElement>(null);
9089
useEffect(() => {
9190
if (show) {
9291
summaryRef.current?.focus();
Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { DSErrorSummaryElement } from '@digdir/designsystemet-web';
21
import { Slot } from '@radix-ui/react-slot';
32
import cl from 'clsx/lite';
43
import type { HTMLAttributes, ReactNode } from 'react';
@@ -10,7 +9,7 @@ export type ErrorSummaryProps = {
109
* @deprecated This is not supported anymore, as the element needs to be `ds-error-summary`
1110
*/
1211
asChild?: ReactNode;
13-
} & Omit<HTMLAttributes<DSErrorSummaryElement> & DefaultProps, 'data-color'>;
12+
} & Omit<HTMLAttributes<HTMLDivElement> & DefaultProps, 'data-color'>;
1413

1514
/**
1615
* ErrorSummary component, used to display a list of errors.
@@ -28,20 +27,19 @@ export type ErrorSummaryProps = {
2827
* </ErrorSummary.List>
2928
* </ErrorSummary>
3029
*/
31-
export const ErrorSummary = forwardRef<
32-
DSErrorSummaryElement,
33-
ErrorSummaryProps
34-
>(function ErrorSummary({ asChild, className, ...rest }, ref) {
35-
const Component = asChild ? Slot : 'ds-error-summary';
30+
export const ErrorSummary = forwardRef<HTMLDivElement, ErrorSummaryProps>(
31+
function ErrorSummary({ asChild, className, ...rest }, ref) {
32+
const Component = asChild ? Slot : 'ds-error-summary';
3633

37-
return (
38-
<Component
39-
{...(asChild
40-
? { className: cl('ds-error-summary', className) }
41-
: { class: cl('ds-error-summary', className) })}
42-
ref={ref}
43-
suppressHydrationWarning
44-
{...rest}
45-
/>
46-
);
47-
});
34+
return (
35+
<Component
36+
{...(asChild
37+
? { className: cl('ds-error-summary', className) }
38+
: { class: cl('ds-error-summary', className) })}
39+
ref={ref}
40+
suppressHydrationWarning
41+
{...rest}
42+
/>
43+
);
44+
},
45+
);

packages/web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@
101101
},
102102
"dependencies": {
103103
"@floating-ui/dom": "^1.7.6",
104-
"@u-elements/u-combobox": "^2.0.3",
105-
"@u-elements/u-datalist": "^2.0.1",
104+
"@u-elements/u-combobox": "^1.0.7",
105+
"@u-elements/u-datalist": "^1.1.0",
106106
"@u-elements/u-details": "^1.0.0",
107107
"@u-elements/u-tabs": "^1.0.1"
108108
},

pnpm-lock.yaml

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)