@digdir/designsystemet-react 0.0.0-test-20250715110951 → 0.0.0-test-20250715113543
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.
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import { Suggestion } from './suggestion';
|
|
1
2
|
import { SuggestionChips } from './suggestion-chips';
|
|
2
3
|
import { SuggestionClear } from './suggestion-clear';
|
|
3
4
|
import { SuggestionEmpty } from './suggestion-empty';
|
|
4
5
|
import { SuggestionInput } from './suggestion-input';
|
|
5
6
|
import { SuggestionList } from './suggestion-list';
|
|
6
7
|
import { SuggestionOption } from './suggestion-option';
|
|
8
|
+
type SuggestionComponent = typeof Suggestion & {
|
|
9
|
+
Chips: typeof SuggestionChips;
|
|
10
|
+
List: typeof SuggestionList;
|
|
11
|
+
Input: typeof SuggestionInput;
|
|
12
|
+
Empty: typeof SuggestionEmpty;
|
|
13
|
+
Option: typeof SuggestionOption;
|
|
14
|
+
Clear: typeof SuggestionClear;
|
|
15
|
+
};
|
|
7
16
|
/**
|
|
8
17
|
* A component that provides a suggestion list for an input field.
|
|
9
18
|
*
|
|
@@ -18,62 +27,7 @@ import { SuggestionOption } from './suggestion-option';
|
|
|
18
27
|
* </Suggestion.List>
|
|
19
28
|
* </Suggestion>
|
|
20
29
|
*/
|
|
21
|
-
declare const EXPERIMENTAL_Suggestion:
|
|
22
|
-
filter?: boolean | ((args: {
|
|
23
|
-
index: number;
|
|
24
|
-
label: string;
|
|
25
|
-
text: string;
|
|
26
|
-
value: string;
|
|
27
|
-
optionElement: HTMLOptionElement;
|
|
28
|
-
input: HTMLInputElement;
|
|
29
|
-
}) => boolean);
|
|
30
|
-
creatable?: boolean;
|
|
31
|
-
multiple?: boolean;
|
|
32
|
-
selected?: import("./suggestion").SuggestionSelected;
|
|
33
|
-
value?: import("./suggestion").SuggestionSelected;
|
|
34
|
-
defaultSelected?: import("./suggestion").SuggestionSelected;
|
|
35
|
-
defaultValue?: import("./suggestion").SuggestionSelected;
|
|
36
|
-
onSelectedChange?: (value: {
|
|
37
|
-
label: string;
|
|
38
|
-
value: string;
|
|
39
|
-
}[]) => void;
|
|
40
|
-
onValueChange?: (value: {
|
|
41
|
-
label: string;
|
|
42
|
-
value: string;
|
|
43
|
-
}[]) => void;
|
|
44
|
-
onBeforeMatch?: (event: Omit<CustomEvent<HTMLOptionElement | undefined>, "currentTarget"> & {
|
|
45
|
-
currentTarget: import("@u-elements/u-combobox").UHTMLComboboxElement;
|
|
46
|
-
}) => void;
|
|
47
|
-
name?: string;
|
|
48
|
-
renderSelected?: (args: {
|
|
49
|
-
label: string;
|
|
50
|
-
value: string;
|
|
51
|
-
}) => React.ReactNode;
|
|
52
|
-
} & React.HTMLAttributes<import("@u-elements/u-combobox").UHTMLComboboxElement> & React.RefAttributes<import("@u-elements/u-combobox").UHTMLComboboxElement>> & {
|
|
53
|
-
/**
|
|
54
|
-
* @deprecated Suggestion.Chips is deprecated, use `renderSelected` on `Suggestion` instead
|
|
55
|
-
*/
|
|
56
|
-
Chips: {
|
|
57
|
-
(): null;
|
|
58
|
-
displayName: string;
|
|
59
|
-
};
|
|
60
|
-
List: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDataListElement>, "singular" | "plural"> & {
|
|
61
|
-
singular?: string;
|
|
62
|
-
plural?: string;
|
|
63
|
-
} & React.RefAttributes<HTMLDataListElement>>;
|
|
64
|
-
Input: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "type">, "type" | "disabled" | "readOnly" | "size" | "role"> & {
|
|
65
|
-
type?: "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "month" | "number" | "password" | "radio" | "search" | "tel" | "text" | "time" | "url" | "week";
|
|
66
|
-
size?: number;
|
|
67
|
-
disabled?: boolean;
|
|
68
|
-
readOnly?: boolean;
|
|
69
|
-
role?: React.AriaRole | undefined;
|
|
70
|
-
} & React.RefAttributes<HTMLInputElement>>;
|
|
71
|
-
Empty: React.ForwardRefExoticComponent<import("../../types").DefaultProps & React.OptionHTMLAttributes<HTMLOptionElement> & React.RefAttributes<HTMLOptionElement>>;
|
|
72
|
-
Option: React.ForwardRefExoticComponent<React.OptionHTMLAttributes<HTMLOptionElement> & import("../../types").DefaultProps & React.RefAttributes<HTMLOptionElement>>;
|
|
73
|
-
Clear: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps, "children" | "variant"> & {
|
|
74
|
-
'aria-label'?: string;
|
|
75
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
76
|
-
};
|
|
30
|
+
declare const EXPERIMENTAL_Suggestion: SuggestionComponent;
|
|
77
31
|
export { EXPERIMENTAL_Suggestion,
|
|
78
32
|
/**
|
|
79
33
|
* @deprecated Suggestion.Chips is deprecated, use `renderSelected` on `Suggestion` instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,KAAK,mBAAmB,GAAG,OAAO,UAAU,GAAG;IAC7C,KAAK,EAAE,OAAO,eAAe,CAAC;IAC9B,IAAI,EAAE,OAAO,cAAc,CAAC;IAC5B,KAAK,EAAE,OAAO,eAAe,CAAC;IAC9B,KAAK,EAAE,OAAO,eAAe,CAAC;IAC9B,MAAM,EAAE,OAAO,gBAAgB,CAAC;IAChC,KAAK,EAAE,OAAO,eAAe,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,uBAAuB,EAAE,mBAU7B,CAAC;AAUH,OAAO,EACL,uBAAuB;AACvB;;GAEG;AACH,eAAe,IAAI,4BAA4B,EAC/C,cAAc,IAAI,2BAA2B,EAC7C,eAAe,IAAI,4BAA4B,EAC/C,eAAe,IAAI,4BAA4B,EAC/C,gBAAgB,IAAI,6BAA6B,EACjD,eAAe,IAAI,4BAA4B,GAChD,CAAC;AACF,YAAY,EACV,eAAe,EACf,kBAAkB,EAAE,8CAA8C;AAClE,kBAAkB,IAAI,gBAAgB,GACvC,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digdir/designsystemet-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-test-
|
|
4
|
+
"version": "0.0.0-test-20250715113543",
|
|
5
5
|
"description": "React components for Designsystemet",
|
|
6
6
|
"author": "Designsystemet team",
|
|
7
7
|
"repository": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"storybook": "^9.0.15",
|
|
68
68
|
"tsx": "4.20.3",
|
|
69
69
|
"typescript": "^5.8.3",
|
|
70
|
-
"@digdir/designsystemet-css": "^0.0.0-test-
|
|
70
|
+
"@digdir/designsystemet-css": "^0.0.0-test-20250715113543"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",
|