@digdir/designsystemet-react 0.0.0-test-20250715124908 → 0.0.0-test-20250716071620
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.
|
@@ -5,7 +5,7 @@ import { SuggestionEmpty } from './suggestion-empty';
|
|
|
5
5
|
import { SuggestionInput } from './suggestion-input';
|
|
6
6
|
import { SuggestionList } from './suggestion-list';
|
|
7
7
|
import { SuggestionOption } from './suggestion-option';
|
|
8
|
-
type
|
|
8
|
+
type Suggestion = typeof SuggestionRoot & {
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Suggestion.Chips is deprecated, use `renderSelected` on `Suggestion` instead
|
|
11
11
|
*/
|
|
@@ -86,7 +86,7 @@ type SuggestionCompound = typeof SuggestionRoot & {
|
|
|
86
86
|
* </Suggestion.List>
|
|
87
87
|
* </Suggestion>
|
|
88
88
|
*/
|
|
89
|
-
declare const EXPERIMENTAL_Suggestion:
|
|
89
|
+
declare const EXPERIMENTAL_Suggestion: Suggestion;
|
|
90
90
|
export { EXPERIMENTAL_Suggestion, SuggestionChips as EXPERIMENTAL_SuggestionChips, SuggestionList as EXPERIMENTAL_SuggestionList, SuggestionInput as EXPERIMENTAL_SuggestionInput, SuggestionEmpty as EXPERIMENTAL_SuggestionEmpty, SuggestionOption as EXPERIMENTAL_SuggestionOption, SuggestionClear as EXPERIMENTAL_SuggestionClear, };
|
|
91
91
|
export type { SuggestionProps, SuggestionSelected, // Export SuggestionValues for easier useState
|
|
92
92
|
SuggestionSelected as SuggestionValues, } from './suggestion';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,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,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"}
|
|
@@ -43,11 +43,9 @@ type SuggestionContextType = {
|
|
|
43
43
|
export declare const SuggestionContext: React.Context<SuggestionContextType>;
|
|
44
44
|
export type SuggestionProps = {
|
|
45
45
|
/**
|
|
46
|
-
* Filter options
|
|
46
|
+
* Filter options; boolean or a custom callback.
|
|
47
47
|
*
|
|
48
|
-
*
|
|
49
|
-
* If false, the <datalist> will not handle filtering.
|
|
50
|
-
* If a custom callback, the callback will be used to filter the <option> elements.
|
|
48
|
+
* See {@link Filter} for the callback signature.
|
|
51
49
|
*
|
|
52
50
|
* @default true
|
|
53
51
|
*/
|
|
@@ -69,13 +67,13 @@ export type SuggestionProps = {
|
|
|
69
67
|
*
|
|
70
68
|
* If `label` and `value` is the same, you can use `string[]`.
|
|
71
69
|
*
|
|
72
|
-
* If `label` and `value` is different, use `
|
|
70
|
+
* If `label` and `value` is different, you must use `{ value: string; label: string}[]`.
|
|
73
71
|
*
|
|
74
|
-
* Using this makes the component controlled and it must be used in combination with {@
|
|
72
|
+
* Using this makes the component controlled and it must be used in combination with {@linkcode SuggestionProps.onSelectedChange|onSelectedChange}.
|
|
75
73
|
*/
|
|
76
74
|
selected?: SuggestionSelected;
|
|
77
75
|
/**
|
|
78
|
-
* @deprecated Use
|
|
76
|
+
* @deprecated Use {@linkcode SuggestionProps.selected|selected} instead
|
|
79
77
|
*/
|
|
80
78
|
value?: SuggestionSelected;
|
|
81
79
|
/**
|
|
@@ -83,7 +81,7 @@ export type SuggestionProps = {
|
|
|
83
81
|
*/
|
|
84
82
|
defaultSelected?: SuggestionSelected;
|
|
85
83
|
/**
|
|
86
|
-
* @deprecated Use `defaultSelected
|
|
84
|
+
* @deprecated Use `{@linkcode SuggestionProps.defaultSelected|defaultSelected} instead
|
|
87
85
|
*/
|
|
88
86
|
defaultValue?: SuggestionSelected;
|
|
89
87
|
/**
|
|
@@ -91,7 +89,7 @@ export type SuggestionProps = {
|
|
|
91
89
|
*/
|
|
92
90
|
onSelectedChange?: (value: Item[]) => void;
|
|
93
91
|
/**
|
|
94
|
-
* @deprecated Use
|
|
92
|
+
* @deprecated Use {@linkcode SuggestionProps.onSelectedChange|onSelectedChange} instead
|
|
95
93
|
*/
|
|
96
94
|
onValueChange?: (value: Item[]) => void;
|
|
97
95
|
/**
|
|
@@ -116,11 +114,9 @@ export type SuggestionProps = {
|
|
|
116
114
|
} & HTMLAttributes<UHTMLComboboxElement>;
|
|
117
115
|
export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
118
116
|
/**
|
|
119
|
-
* Filter options
|
|
117
|
+
* Filter options; boolean or a custom callback.
|
|
120
118
|
*
|
|
121
|
-
*
|
|
122
|
-
* If false, the <datalist> will not handle filtering.
|
|
123
|
-
* If a custom callback, the callback will be used to filter the <option> elements.
|
|
119
|
+
* See {@link Filter} for the callback signature.
|
|
124
120
|
*
|
|
125
121
|
* @default true
|
|
126
122
|
*/
|
|
@@ -142,13 +138,13 @@ export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
|
142
138
|
*
|
|
143
139
|
* If `label` and `value` is the same, you can use `string[]`.
|
|
144
140
|
*
|
|
145
|
-
* If `label` and `value` is different, use `
|
|
141
|
+
* If `label` and `value` is different, you must use `{ value: string; label: string}[]`.
|
|
146
142
|
*
|
|
147
|
-
* Using this makes the component controlled and it must be used in combination with {@
|
|
143
|
+
* Using this makes the component controlled and it must be used in combination with {@linkcode SuggestionProps.onSelectedChange|onSelectedChange}.
|
|
148
144
|
*/
|
|
149
145
|
selected?: SuggestionSelected;
|
|
150
146
|
/**
|
|
151
|
-
* @deprecated Use
|
|
147
|
+
* @deprecated Use {@linkcode SuggestionProps.selected|selected} instead
|
|
152
148
|
*/
|
|
153
149
|
value?: SuggestionSelected;
|
|
154
150
|
/**
|
|
@@ -156,7 +152,7 @@ export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
|
156
152
|
*/
|
|
157
153
|
defaultSelected?: SuggestionSelected;
|
|
158
154
|
/**
|
|
159
|
-
* @deprecated Use `defaultSelected
|
|
155
|
+
* @deprecated Use `{@linkcode SuggestionProps.defaultSelected|defaultSelected} instead
|
|
160
156
|
*/
|
|
161
157
|
defaultValue?: SuggestionSelected;
|
|
162
158
|
/**
|
|
@@ -164,7 +160,7 @@ export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
|
164
160
|
*/
|
|
165
161
|
onSelectedChange?: (value: Item[]) => void;
|
|
166
162
|
/**
|
|
167
|
-
* @deprecated Use
|
|
163
|
+
* @deprecated Use {@linkcode SuggestionProps.onSelectedChange|onSelectedChange} instead
|
|
168
164
|
*/
|
|
169
165
|
onValueChange?: (value: Item[]) => void;
|
|
170
166
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAO,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAKnE,MAAM,MAAM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
1
1
|
{
|
|
2
2
|
"name": "@digdir/designsystemet-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-test-
|
|
4
|
+
"version": "0.0.0-test-20250716071620",
|
|
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-20250716071620"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",
|