@grampro/kit 2.4.4 → 2.6.0
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 +257 -0
- package/README.md +25 -5
- package/index.cjs +70 -4
- package/package.json +1 -1
- package/source/components/accordion/passport.json +11 -7
- package/source/components/accordion/react/Accordion.tsx +5 -0
- package/source/components/alert/passport.json +3 -3
- package/source/components/avatar/passport.json +8 -6
- package/source/components/avatar/react/Avatar.tsx +4 -0
- package/source/components/badge/passport.json +8 -6
- package/source/components/badge/react/Badge.tsx +1 -0
- package/source/components/badge/react/Tag.tsx +1 -0
- package/source/components/breadcrumb/passport.json +8 -6
- package/source/components/breadcrumb/react/Breadcrumb.tsx +1 -0
- package/source/components/button/passport.json +8 -6
- package/source/components/button/react/Button.tsx +1 -0
- package/source/components/card/passport.json +17 -9
- package/source/components/card/react/Card.tsx +5 -0
- package/source/components/card/react/Stat.tsx +5 -0
- package/source/components/checkbox/passport.json +32 -14
- package/source/components/checkbox/react/Checkbox.tsx +17 -0
- package/source/components/checkbox/react/CheckboxGroup.tsx +6 -0
- package/source/components/combobox/passport.json +36 -16
- package/source/components/combobox/react/Select.tsx +6 -1
- package/source/components/combobox/react/props.ts +23 -0
- package/source/components/data-grid/core/types.ts +53 -0
- package/source/components/data-grid/passport.json +82 -30
- package/source/components/data-grid/react/AskGrid.tsx +10 -0
- package/source/components/data-grid/react/DataGrid.tsx +16 -0
- package/source/components/date-picker/passport.json +30 -14
- package/source/components/date-picker/react/DatePicker.tsx +5 -0
- package/source/components/date-picker/react/props.ts +13 -1
- package/source/components/dialog/core/types.ts +14 -0
- package/source/components/dialog/passport.json +26 -12
- package/source/components/dialog/react/Dialog.tsx +4 -0
- package/source/components/file-uploader/passport.json +44 -18
- package/source/components/file-uploader/react/FileUploader.tsx +39 -0
- package/source/components/input/passport.json +14 -8
- package/source/components/input/react/Input.tsx +3 -0
- package/source/components/menu/passport.json +29 -13
- package/source/components/menu/react/Menu.tsx +7 -0
- package/source/components/menu/react/items.tsx +4 -0
- package/source/components/modal/passport.json +14 -8
- package/source/components/modal/react/Modal.tsx +6 -0
- package/source/components/number-input/passport.json +23 -11
- package/source/components/number-input/react/NumberInput.tsx +13 -0
- package/source/components/popover/passport.json +17 -9
- package/source/components/popover/react/Popover.tsx +7 -0
- package/source/components/progress/passport.json +3 -3
- package/source/components/radio-group/passport.json +32 -14
- package/source/components/radio-group/react/Radio.tsx +17 -0
- package/source/components/radio-group/react/RadioGroup.tsx +13 -0
- package/source/components/skeleton/passport.json +8 -6
- package/source/components/skeleton/react/Skeleton.tsx +5 -0
- package/source/components/spinner/passport.json +3 -3
- package/source/components/switch/passport.json +23 -11
- package/source/components/switch/react/Switch.tsx +14 -0
- package/source/components/tabs/passport.json +11 -7
- package/source/components/tabs/react/Tabs.tsx +2 -0
- package/source/components/textarea/passport.json +14 -8
- package/source/components/textarea/react/Textarea.tsx +3 -0
- package/source/components/toaster/passport.json +8 -6
- package/source/components/toaster/react/Toaster.tsx +4 -0
- package/source/components/tooltip/passport.json +3 -3
- package/tools/mcp/README.md +163 -36
- package/tools/mcp/design.cjs +154 -0
- package/tools/mcp/figma.cjs +136 -29
- package/tools/mcp/install.cjs +270 -0
- package/tools/mcp/secret-cli.cjs +174 -0
- package/tools/mcp/secret.cjs +289 -0
- package/tools/mcp/server.cjs +60 -16
- package/tools/passport/cli.cjs +8 -1
- package/tools/passport/extract.cjs +7 -3
- package/tools/passport/merge.cjs +24 -4
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
]
|
|
10
10
|
},
|
|
11
11
|
"source": {
|
|
12
|
-
"libraryVersion": "2.
|
|
12
|
+
"libraryVersion": "2.6.0",
|
|
13
13
|
"files": [
|
|
14
14
|
"core/api.ts",
|
|
15
15
|
"core/dialog.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react/locale.ts",
|
|
24
24
|
"react/props.ts"
|
|
25
25
|
],
|
|
26
|
-
"sourceHash": "sha256:
|
|
26
|
+
"sourceHash": "sha256:f0b7d7683418b4981af453e5bf4dc08034a6d854dbca6e192283a555e77fdd0d"
|
|
27
27
|
},
|
|
28
28
|
"props": [
|
|
29
29
|
{
|
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
"type": "other",
|
|
32
32
|
"typeText": "ReactNode",
|
|
33
33
|
"required": false,
|
|
34
|
-
"origin": "derived"
|
|
34
|
+
"origin": "derived",
|
|
35
|
+
"description": "The dismissing button's text. Defaults to Cancel.",
|
|
36
|
+
"descriptionOrigin": "jsdoc"
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
"name": "className",
|
|
@@ -52,7 +54,9 @@
|
|
|
52
54
|
"type": "other",
|
|
53
55
|
"typeText": "ReactNode",
|
|
54
56
|
"required": false,
|
|
55
|
-
"origin": "derived"
|
|
57
|
+
"origin": "derived",
|
|
58
|
+
"description": "The confirming button's text. Defaults to OK for an alert and Confirm\notherwise; naming the action (\"Delete project\") reads better than\neither.",
|
|
59
|
+
"descriptionOrigin": "jsdoc"
|
|
56
60
|
},
|
|
57
61
|
{
|
|
58
62
|
"name": "defaultValue",
|
|
@@ -67,7 +71,9 @@
|
|
|
67
71
|
"type": "other",
|
|
68
72
|
"typeText": "ReactNode",
|
|
69
73
|
"required": false,
|
|
70
|
-
"origin": "derived"
|
|
74
|
+
"origin": "derived",
|
|
75
|
+
"description": "The detail under the title - what is about to happen, and to what.",
|
|
76
|
+
"descriptionOrigin": "jsdoc"
|
|
71
77
|
},
|
|
72
78
|
{
|
|
73
79
|
"name": "dismissible",
|
|
@@ -100,7 +106,9 @@
|
|
|
100
106
|
"type": "other",
|
|
101
107
|
"typeText": "ReactNode",
|
|
102
108
|
"required": false,
|
|
103
|
-
"origin": "derived"
|
|
109
|
+
"origin": "derived",
|
|
110
|
+
"description": "Names the text field. Without it the field is named by the title.",
|
|
111
|
+
"descriptionOrigin": "jsdoc"
|
|
104
112
|
},
|
|
105
113
|
{
|
|
106
114
|
"name": "inputType",
|
|
@@ -116,7 +124,9 @@
|
|
|
116
124
|
"typeText": "'number' | 'email' | 'tel' | 'text' | 'url' | 'password' | undefined",
|
|
117
125
|
"required": false,
|
|
118
126
|
"default": "text",
|
|
119
|
-
"origin": "derived"
|
|
127
|
+
"origin": "derived",
|
|
128
|
+
"description": "The field's input type, which picks the on-screen keyboard on a phone.\nDefault `text`. The value still arrives as a string.",
|
|
129
|
+
"descriptionOrigin": "jsdoc"
|
|
120
130
|
},
|
|
121
131
|
{
|
|
122
132
|
"name": "intent",
|
|
@@ -189,7 +199,9 @@
|
|
|
189
199
|
"type": "boolean",
|
|
190
200
|
"typeText": "boolean",
|
|
191
201
|
"required": true,
|
|
192
|
-
"origin": "derived"
|
|
202
|
+
"origin": "derived",
|
|
203
|
+
"description": "Whether the dialog is on screen. Required: this component is always\ncontrolled, so set it to false in `onClose`.",
|
|
204
|
+
"descriptionOrigin": "jsdoc"
|
|
193
205
|
},
|
|
194
206
|
{
|
|
195
207
|
"name": "placeholder",
|
|
@@ -216,7 +228,9 @@
|
|
|
216
228
|
"typeText": "DialogSize | undefined",
|
|
217
229
|
"required": false,
|
|
218
230
|
"default": "sm",
|
|
219
|
-
"origin": "derived"
|
|
231
|
+
"origin": "derived",
|
|
232
|
+
"description": "Default `md`.",
|
|
233
|
+
"descriptionOrigin": "jsdoc"
|
|
220
234
|
},
|
|
221
235
|
{
|
|
222
236
|
"name": "store",
|
|
@@ -334,9 +348,9 @@
|
|
|
334
348
|
"safeMutations": {},
|
|
335
349
|
"examples": [],
|
|
336
350
|
"coverage": {
|
|
337
|
-
"propsTotal":
|
|
338
|
-
"propsDescribed":
|
|
339
|
-
"describedPct":
|
|
351
|
+
"propsTotal": 21,
|
|
352
|
+
"propsDescribed": 16,
|
|
353
|
+
"describedPct": 76,
|
|
340
354
|
"authoredSections": [
|
|
341
355
|
"accessibility"
|
|
342
356
|
]
|
|
@@ -35,6 +35,10 @@ const INTENT_ICONS: Record<DialogIntent, ReactNode> = {
|
|
|
35
35
|
export type DialogAction = "confirm" | "cancel";
|
|
36
36
|
|
|
37
37
|
export interface DialogProps extends Omit<PromptOptions, "onConfirm"> {
|
|
38
|
+
/**
|
|
39
|
+
* Whether the dialog is on screen. Required: this component is always
|
|
40
|
+
* controlled, so set it to false in `onClose`.
|
|
41
|
+
*/
|
|
38
42
|
open: boolean;
|
|
39
43
|
/** `alert` has one button, `confirm` two, `prompt` adds a text field. Default `confirm`. */
|
|
40
44
|
kind?: DialogKind;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"source": {
|
|
16
|
-
"libraryVersion": "2.
|
|
16
|
+
"libraryVersion": "2.6.0",
|
|
17
17
|
"files": [
|
|
18
18
|
"core/format.ts",
|
|
19
19
|
"core/index.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react/props.ts",
|
|
30
30
|
"react/useFileUploader.ts"
|
|
31
31
|
],
|
|
32
|
-
"sourceHash": "sha256:
|
|
32
|
+
"sourceHash": "sha256:f77a12b14c2d24bc55a922a38f2f85dca85eafe89f63ffb28932e0dc4639d965"
|
|
33
33
|
},
|
|
34
34
|
"props": [
|
|
35
35
|
{
|
|
@@ -46,7 +46,9 @@
|
|
|
46
46
|
"type": "boolean",
|
|
47
47
|
"typeText": "boolean | undefined",
|
|
48
48
|
"required": false,
|
|
49
|
-
"origin": "derived"
|
|
49
|
+
"origin": "derived",
|
|
50
|
+
"description": "Accept the same file twice. Default false, where a file matching one\r\nalready selected by name, size and last-modified time is rejected.",
|
|
51
|
+
"descriptionOrigin": "jsdoc"
|
|
50
52
|
},
|
|
51
53
|
{
|
|
52
54
|
"name": "autoUpload",
|
|
@@ -95,7 +97,9 @@
|
|
|
95
97
|
"type": "other",
|
|
96
98
|
"typeText": "ReactNode",
|
|
97
99
|
"required": false,
|
|
98
|
-
"origin": "derived"
|
|
100
|
+
"origin": "derived",
|
|
101
|
+
"description": "A hint under the label, linked as the field's description. The place\r\nto say what is accepted and how large it may be.",
|
|
102
|
+
"descriptionOrigin": "jsdoc"
|
|
99
103
|
},
|
|
100
104
|
{
|
|
101
105
|
"name": "disabled",
|
|
@@ -137,7 +141,9 @@
|
|
|
137
141
|
"type": "other",
|
|
138
142
|
"typeText": "Partial<import(\"..\").ChunkFieldNames> | undefined",
|
|
139
143
|
"required": false,
|
|
140
|
-
"origin": "derived"
|
|
144
|
+
"origin": "derived",
|
|
145
|
+
"description": "Rename the form fields each chunk is sent under, for a server whose\r\ncontract you do not control.",
|
|
146
|
+
"descriptionOrigin": "jsdoc"
|
|
141
147
|
},
|
|
142
148
|
{
|
|
143
149
|
"name": "getFileId",
|
|
@@ -153,7 +159,9 @@
|
|
|
153
159
|
"type": "other",
|
|
154
160
|
"typeText": "Record<string, string> | ((request: import(\"..\").ChunkRequest) => Record<string, string> | Promise<Record<string, string>>) | undefined",
|
|
155
161
|
"required": false,
|
|
156
|
-
"origin": "derived"
|
|
162
|
+
"origin": "derived",
|
|
163
|
+
"description": "Static headers, or a function - async allowed - called per chunk, which\r\nis what to use for a token that expires mid-upload.",
|
|
164
|
+
"descriptionOrigin": "jsdoc"
|
|
157
165
|
},
|
|
158
166
|
{
|
|
159
167
|
"name": "id",
|
|
@@ -167,7 +175,9 @@
|
|
|
167
175
|
"type": "other",
|
|
168
176
|
"typeText": "ReactNode",
|
|
169
177
|
"required": false,
|
|
170
|
-
"origin": "derived"
|
|
178
|
+
"origin": "derived",
|
|
179
|
+
"description": "The field's name, shown above the drop zone and linked to it.",
|
|
180
|
+
"descriptionOrigin": "jsdoc"
|
|
171
181
|
},
|
|
172
182
|
{
|
|
173
183
|
"name": "locale",
|
|
@@ -213,7 +223,9 @@
|
|
|
213
223
|
],
|
|
214
224
|
"typeText": "'POST' | 'PUT' | 'PATCH' | undefined",
|
|
215
225
|
"required": false,
|
|
216
|
-
"origin": "derived"
|
|
226
|
+
"origin": "derived",
|
|
227
|
+
"description": "HTTP method for each chunk. Default `POST`.",
|
|
228
|
+
"descriptionOrigin": "jsdoc"
|
|
217
229
|
},
|
|
218
230
|
{
|
|
219
231
|
"name": "minSize",
|
|
@@ -257,28 +269,36 @@
|
|
|
257
269
|
"type": "function",
|
|
258
270
|
"signature": "((item: UploadItem, error: unknown) => void) | undefined",
|
|
259
271
|
"required": false,
|
|
260
|
-
"origin": "derived"
|
|
272
|
+
"origin": "derived",
|
|
273
|
+
"description": "One file failed, after its retries were used up. `error` is an\r\n`UploadHttpError` carrying `status` and the parsed `body` when the\r\nserver answered, and whatever was thrown otherwise.",
|
|
274
|
+
"descriptionOrigin": "jsdoc"
|
|
261
275
|
},
|
|
262
276
|
{
|
|
263
277
|
"name": "onFileSuccess",
|
|
264
278
|
"type": "function",
|
|
265
279
|
"signature": "((item: UploadItem) => void) | undefined",
|
|
266
280
|
"required": false,
|
|
267
|
-
"origin": "derived"
|
|
281
|
+
"origin": "derived",
|
|
282
|
+
"description": "One file finished uploading. Fires per file, not once at the end.",
|
|
283
|
+
"descriptionOrigin": "jsdoc"
|
|
268
284
|
},
|
|
269
285
|
{
|
|
270
286
|
"name": "onRejected",
|
|
271
287
|
"type": "function",
|
|
272
288
|
"signature": "((rejections: FileRejection[]) => void) | undefined",
|
|
273
289
|
"required": false,
|
|
274
|
-
"origin": "derived"
|
|
290
|
+
"origin": "derived",
|
|
291
|
+
"description": "Files that never made it in - wrong type, too large, a duplicate, or\r\nrefused by `validate`. Each rejection carries the file and the reason,\r\nso this is the hook for reporting why.",
|
|
292
|
+
"descriptionOrigin": "jsdoc"
|
|
275
293
|
},
|
|
276
294
|
{
|
|
277
295
|
"name": "onRemoveExisting",
|
|
278
296
|
"type": "function",
|
|
279
297
|
"signature": "((file: ExistingFile) => void) | undefined",
|
|
280
298
|
"required": false,
|
|
281
|
-
"origin": "derived"
|
|
299
|
+
"origin": "derived",
|
|
300
|
+
"description": "Someone removed one of the already-stored files. Removing it for real\r\nis yours to do; the component only reports it.",
|
|
301
|
+
"descriptionOrigin": "jsdoc"
|
|
282
302
|
},
|
|
283
303
|
{
|
|
284
304
|
"name": "onUploadComplete",
|
|
@@ -303,7 +323,9 @@
|
|
|
303
323
|
"type": "function",
|
|
304
324
|
"signature": "((body: string, xhr: XMLHttpRequest) => unknown) | undefined",
|
|
305
325
|
"required": false,
|
|
306
|
-
"origin": "derived"
|
|
326
|
+
"origin": "derived",
|
|
327
|
+
"description": "Turn the response body into the value stored on the item, which is\r\nwhere `getFileId` then looks. Default: JSON, falling back to text.",
|
|
328
|
+
"descriptionOrigin": "jsdoc"
|
|
307
329
|
},
|
|
308
330
|
{
|
|
309
331
|
"name": "preview",
|
|
@@ -369,7 +391,9 @@
|
|
|
369
391
|
"typeText": "UploaderSize | undefined",
|
|
370
392
|
"required": false,
|
|
371
393
|
"default": "md",
|
|
372
|
-
"origin": "derived"
|
|
394
|
+
"origin": "derived",
|
|
395
|
+
"description": "Default `md`.",
|
|
396
|
+
"descriptionOrigin": "jsdoc"
|
|
373
397
|
},
|
|
374
398
|
{
|
|
375
399
|
"name": "style",
|
|
@@ -401,7 +425,9 @@
|
|
|
401
425
|
"type": "boolean",
|
|
402
426
|
"typeText": "boolean | undefined",
|
|
403
427
|
"required": false,
|
|
404
|
-
"origin": "derived"
|
|
428
|
+
"origin": "derived",
|
|
429
|
+
"description": "Send cookies on cross-origin requests. Default false.",
|
|
430
|
+
"descriptionOrigin": "jsdoc"
|
|
405
431
|
}
|
|
406
432
|
],
|
|
407
433
|
"events": [
|
|
@@ -508,9 +534,9 @@
|
|
|
508
534
|
"safeMutations": {},
|
|
509
535
|
"examples": [],
|
|
510
536
|
"coverage": {
|
|
511
|
-
"propsTotal":
|
|
512
|
-
"propsDescribed":
|
|
513
|
-
"describedPct":
|
|
537
|
+
"propsTotal": 39,
|
|
538
|
+
"propsDescribed": 36,
|
|
539
|
+
"describedPct": 92,
|
|
514
540
|
"authoredSections": [
|
|
515
541
|
"accessibility"
|
|
516
542
|
]
|
|
@@ -45,17 +45,35 @@ export interface FileUploaderProps {
|
|
|
45
45
|
minSize?: number;
|
|
46
46
|
/** Return a message to reject a file. */
|
|
47
47
|
validate?(file: File): string | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Accept the same file twice. Default false, where a file matching one
|
|
50
|
+
* already selected by name, size and last-modified time is rejected.
|
|
51
|
+
*/
|
|
48
52
|
allowDuplicates?: boolean;
|
|
49
53
|
|
|
50
54
|
/* ------------------------------------------------------------- upload */
|
|
51
55
|
/** Where chunks are POSTed. Without `endpoint` or `transport`, files are only selected. */
|
|
52
56
|
endpoint?: HttpTransportOptions["endpoint"];
|
|
57
|
+
/** HTTP method for each chunk. Default `POST`. */
|
|
53
58
|
method?: HttpTransportOptions["method"];
|
|
59
|
+
/**
|
|
60
|
+
* Static headers, or a function - async allowed - called per chunk, which
|
|
61
|
+
* is what to use for a token that expires mid-upload.
|
|
62
|
+
*/
|
|
54
63
|
headers?: HttpTransportOptions["headers"];
|
|
64
|
+
/** Send cookies on cross-origin requests. Default false. */
|
|
55
65
|
withCredentials?: boolean;
|
|
56
66
|
/** Extra data sent as JSON with every chunk. */
|
|
57
67
|
params?: HttpTransportOptions["params"];
|
|
68
|
+
/**
|
|
69
|
+
* Rename the form fields each chunk is sent under, for a server whose
|
|
70
|
+
* contract you do not control.
|
|
71
|
+
*/
|
|
58
72
|
fieldNames?: HttpTransportOptions["fieldNames"];
|
|
73
|
+
/**
|
|
74
|
+
* Turn the response body into the value stored on the item, which is
|
|
75
|
+
* where `getFileId` then looks. Default: JSON, falling back to text.
|
|
76
|
+
*/
|
|
59
77
|
parseResponse?: HttpTransportOptions["parseResponse"];
|
|
60
78
|
/** Replaces the built-in HTTP transport, e.g. for presigned URLs or an SDK. */
|
|
61
79
|
transport?: Transport;
|
|
@@ -77,15 +95,25 @@ export interface FileUploaderProps {
|
|
|
77
95
|
preview?: boolean;
|
|
78
96
|
/** Files already stored, shown above new ones. */
|
|
79
97
|
existingFiles?: readonly ExistingFile[];
|
|
98
|
+
/**
|
|
99
|
+
* Someone removed one of the already-stored files. Removing it for real
|
|
100
|
+
* is yours to do; the component only reports it.
|
|
101
|
+
*/
|
|
80
102
|
onRemoveExisting?(file: ExistingFile): void;
|
|
81
103
|
/** Show remove buttons. Default true. */
|
|
82
104
|
removable?: boolean;
|
|
105
|
+
/** The field's name, shown above the drop zone and linked to it. */
|
|
83
106
|
label?: ReactNode;
|
|
107
|
+
/**
|
|
108
|
+
* A hint under the label, linked as the field's description. The place
|
|
109
|
+
* to say what is accepted and how large it may be.
|
|
110
|
+
*/
|
|
84
111
|
description?: ReactNode;
|
|
85
112
|
/** Message below the drop zone; also marks it invalid. */
|
|
86
113
|
error?: ReactNode;
|
|
87
114
|
required?: boolean;
|
|
88
115
|
disabled?: boolean;
|
|
116
|
+
/** Default `md`. */
|
|
89
117
|
size?: UploaderSize;
|
|
90
118
|
/**
|
|
91
119
|
* Form field name. With an endpoint, the stored file ids are posted; without
|
|
@@ -103,8 +131,19 @@ export interface FileUploaderProps {
|
|
|
103
131
|
/* ------------------------------------------------------------- events */
|
|
104
132
|
/** Selected files changed. */
|
|
105
133
|
onChange?(files: File[]): void;
|
|
134
|
+
/**
|
|
135
|
+
* Files that never made it in - wrong type, too large, a duplicate, or
|
|
136
|
+
* refused by `validate`. Each rejection carries the file and the reason,
|
|
137
|
+
* so this is the hook for reporting why.
|
|
138
|
+
*/
|
|
106
139
|
onRejected?(rejections: FileRejection[]): void;
|
|
140
|
+
/** One file finished uploading. Fires per file, not once at the end. */
|
|
107
141
|
onFileSuccess?(item: UploadItem): void;
|
|
142
|
+
/**
|
|
143
|
+
* One file failed, after its retries were used up. `error` is an
|
|
144
|
+
* `UploadHttpError` carrying `status` and the parsed `body` when the
|
|
145
|
+
* server answered, and whatever was thrown otherwise.
|
|
146
|
+
*/
|
|
108
147
|
onFileError?(item: UploadItem, error: unknown): void;
|
|
109
148
|
/** Every file in an upload run has stopped (uploaded, failed, paused or canceled). */
|
|
110
149
|
onUploadComplete?(items: UploadItem[]): void;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
]
|
|
10
10
|
},
|
|
11
11
|
"source": {
|
|
12
|
-
"libraryVersion": "2.
|
|
12
|
+
"libraryVersion": "2.6.0",
|
|
13
13
|
"files": [
|
|
14
14
|
"core/count.ts",
|
|
15
15
|
"core/index.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react/locale.ts",
|
|
24
24
|
"react/props.ts"
|
|
25
25
|
],
|
|
26
|
-
"sourceHash": "sha256:
|
|
26
|
+
"sourceHash": "sha256:50ff11f4a9255189704b330123d35d4f4e3550bd4cf2eed2d0735c92ba876b03"
|
|
27
27
|
},
|
|
28
28
|
"props": [
|
|
29
29
|
{
|
|
@@ -112,7 +112,9 @@
|
|
|
112
112
|
"type": "other",
|
|
113
113
|
"typeText": "ReactNode",
|
|
114
114
|
"required": false,
|
|
115
|
-
"origin": "derived"
|
|
115
|
+
"origin": "derived",
|
|
116
|
+
"description": "A hint under the label, linked as the field's description.",
|
|
117
|
+
"descriptionOrigin": "jsdoc"
|
|
116
118
|
},
|
|
117
119
|
{
|
|
118
120
|
"name": "disabled",
|
|
@@ -182,7 +184,9 @@
|
|
|
182
184
|
"type": "other",
|
|
183
185
|
"typeText": "ReactNode",
|
|
184
186
|
"required": false,
|
|
185
|
-
"origin": "derived"
|
|
187
|
+
"origin": "derived",
|
|
188
|
+
"description": "The field's name, shown above it and linked to it.",
|
|
189
|
+
"descriptionOrigin": "jsdoc"
|
|
186
190
|
},
|
|
187
191
|
{
|
|
188
192
|
"name": "leading",
|
|
@@ -363,7 +367,9 @@
|
|
|
363
367
|
"typeText": "FieldSize | undefined",
|
|
364
368
|
"required": false,
|
|
365
369
|
"default": "md",
|
|
366
|
-
"origin": "derived"
|
|
370
|
+
"origin": "derived",
|
|
371
|
+
"description": "Default `md`.",
|
|
372
|
+
"descriptionOrigin": "jsdoc"
|
|
367
373
|
},
|
|
368
374
|
{
|
|
369
375
|
"name": "step",
|
|
@@ -526,9 +532,9 @@
|
|
|
526
532
|
"safeMutations": {},
|
|
527
533
|
"examples": [],
|
|
528
534
|
"coverage": {
|
|
529
|
-
"propsTotal":
|
|
530
|
-
"propsDescribed":
|
|
531
|
-
"describedPct":
|
|
535
|
+
"propsTotal": 18,
|
|
536
|
+
"propsDescribed": 16,
|
|
537
|
+
"describedPct": 89,
|
|
532
538
|
"authoredSections": [
|
|
533
539
|
"accessibility"
|
|
534
540
|
]
|
|
@@ -26,10 +26,13 @@ export interface InputProps
|
|
|
26
26
|
defaultValue?: string;
|
|
27
27
|
/** The new text on every change. The native `onChange` fires as well. */
|
|
28
28
|
onValueChange?(value: string): void;
|
|
29
|
+
/** The field's name, shown above it and linked to it. */
|
|
29
30
|
label?: ReactNode;
|
|
31
|
+
/** A hint under the label, linked as the field's description. */
|
|
30
32
|
description?: ReactNode;
|
|
31
33
|
/** Message below the field; also marks it invalid. */
|
|
32
34
|
error?: ReactNode;
|
|
35
|
+
/** Default `md`. */
|
|
33
36
|
size?: FieldSize;
|
|
34
37
|
/** Content before the text, e.g. an icon or "https://". */
|
|
35
38
|
leading?: ReactNode;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"source": {
|
|
19
|
-
"libraryVersion": "2.
|
|
19
|
+
"libraryVersion": "2.6.0",
|
|
20
20
|
"files": [
|
|
21
21
|
"core/index.ts",
|
|
22
22
|
"core/navigation.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react/props.ts",
|
|
30
30
|
"react/useMenuKeys.ts"
|
|
31
31
|
],
|
|
32
|
-
"sourceHash": "sha256:
|
|
32
|
+
"sourceHash": "sha256:9a6248a4986051f6506746c084b9e89728fecd0a0b430d1962f5f3ed544ce1e5"
|
|
33
33
|
},
|
|
34
34
|
"props": [
|
|
35
35
|
{
|
|
@@ -52,7 +52,9 @@
|
|
|
52
52
|
"typeText": "boolean | undefined",
|
|
53
53
|
"required": false,
|
|
54
54
|
"default": false,
|
|
55
|
-
"origin": "derived"
|
|
55
|
+
"origin": "derived",
|
|
56
|
+
"description": "Ticked (controlled).",
|
|
57
|
+
"descriptionOrigin": "jsdoc"
|
|
56
58
|
},
|
|
57
59
|
{
|
|
58
60
|
"name": "children",
|
|
@@ -91,7 +93,9 @@
|
|
|
91
93
|
"typeText": "boolean | undefined",
|
|
92
94
|
"required": false,
|
|
93
95
|
"default": false,
|
|
94
|
-
"origin": "derived"
|
|
96
|
+
"origin": "derived",
|
|
97
|
+
"description": "Open to begin with, when you are not controlling `open`.",
|
|
98
|
+
"descriptionOrigin": "jsdoc"
|
|
95
99
|
},
|
|
96
100
|
{
|
|
97
101
|
"name": "destructive",
|
|
@@ -126,7 +130,9 @@
|
|
|
126
130
|
"type": "other",
|
|
127
131
|
"typeText": "ReactNode",
|
|
128
132
|
"required": false,
|
|
129
|
-
"origin": "derived"
|
|
133
|
+
"origin": "derived",
|
|
134
|
+
"description": "Drawn before the submenu's label, at the size of the text.",
|
|
135
|
+
"descriptionOrigin": "jsdoc"
|
|
130
136
|
},
|
|
131
137
|
{
|
|
132
138
|
"name": "id",
|
|
@@ -156,14 +162,18 @@
|
|
|
156
162
|
"type": "function",
|
|
157
163
|
"signature": "((checked: boolean) => void) | undefined",
|
|
158
164
|
"required": false,
|
|
159
|
-
"origin": "derived"
|
|
165
|
+
"origin": "derived",
|
|
166
|
+
"description": "The state after a toggle, as a plain boolean.",
|
|
167
|
+
"descriptionOrigin": "jsdoc"
|
|
160
168
|
},
|
|
161
169
|
{
|
|
162
170
|
"name": "onOpenChange",
|
|
163
171
|
"type": "function",
|
|
164
172
|
"signature": "((open: boolean, reason?: MenuCloseReason) => void) | undefined",
|
|
165
173
|
"required": false,
|
|
166
|
-
"origin": "derived"
|
|
174
|
+
"origin": "derived",
|
|
175
|
+
"description": "`reason` says what closed it - `escape`, `outside`, `trigger`,\r\n`select` or `api` - and is undefined when opening.",
|
|
176
|
+
"descriptionOrigin": "jsdoc"
|
|
167
177
|
},
|
|
168
178
|
{
|
|
169
179
|
"name": "onSelect",
|
|
@@ -179,14 +189,18 @@
|
|
|
179
189
|
"type": "function",
|
|
180
190
|
"signature": "((value: string) => void) | undefined",
|
|
181
191
|
"required": false,
|
|
182
|
-
"origin": "derived"
|
|
192
|
+
"origin": "derived",
|
|
193
|
+
"description": "The newly chosen value.",
|
|
194
|
+
"descriptionOrigin": "jsdoc"
|
|
183
195
|
},
|
|
184
196
|
{
|
|
185
197
|
"name": "open",
|
|
186
198
|
"type": "boolean",
|
|
187
199
|
"typeText": "boolean | undefined",
|
|
188
200
|
"required": false,
|
|
189
|
-
"origin": "derived"
|
|
201
|
+
"origin": "derived",
|
|
202
|
+
"description": "Controlled open state.",
|
|
203
|
+
"descriptionOrigin": "jsdoc"
|
|
190
204
|
},
|
|
191
205
|
{
|
|
192
206
|
"name": "ref",
|
|
@@ -241,7 +255,9 @@
|
|
|
241
255
|
"type": "string",
|
|
242
256
|
"typeText": "string | undefined",
|
|
243
257
|
"required": false,
|
|
244
|
-
"origin": "derived"
|
|
258
|
+
"origin": "derived",
|
|
259
|
+
"description": "The chosen value (controlled).",
|
|
260
|
+
"descriptionOrigin": "jsdoc"
|
|
245
261
|
}
|
|
246
262
|
],
|
|
247
263
|
"events": [
|
|
@@ -312,9 +328,9 @@
|
|
|
312
328
|
"safeMutations": {},
|
|
313
329
|
"examples": [],
|
|
314
330
|
"coverage": {
|
|
315
|
-
"propsTotal":
|
|
316
|
-
"propsDescribed":
|
|
317
|
-
"describedPct":
|
|
331
|
+
"propsTotal": 20,
|
|
332
|
+
"propsDescribed": 17,
|
|
333
|
+
"describedPct": 85,
|
|
318
334
|
"authoredSections": [
|
|
319
335
|
"accessibility"
|
|
320
336
|
]
|
|
@@ -46,8 +46,14 @@ export interface MenuProps {
|
|
|
46
46
|
*/
|
|
47
47
|
trigger: ReactElement<{ [attribute: string]: unknown }>;
|
|
48
48
|
children: ReactNode;
|
|
49
|
+
/** Controlled open state. */
|
|
49
50
|
open?: boolean;
|
|
51
|
+
/** Open to begin with, when you are not controlling `open`. */
|
|
50
52
|
defaultOpen?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* `reason` says what closed it - `escape`, `outside`, `trigger`,
|
|
55
|
+
* `select` or `api` - and is undefined when opening.
|
|
56
|
+
*/
|
|
51
57
|
onOpenChange?(open: boolean, reason?: MenuCloseReason): void;
|
|
52
58
|
/** Names the menu for screen readers. Defaults to the locale text. */
|
|
53
59
|
label?: string;
|
|
@@ -257,6 +263,7 @@ export interface MenuSubProps {
|
|
|
257
263
|
/** The label of the item that opens the submenu. */
|
|
258
264
|
label: ReactNode;
|
|
259
265
|
children: ReactNode;
|
|
266
|
+
/** Drawn before the submenu's label, at the size of the text. */
|
|
260
267
|
icon?: ReactNode;
|
|
261
268
|
disabled?: boolean;
|
|
262
269
|
className?: string;
|
|
@@ -96,7 +96,9 @@ export function MenuItem(props: MenuItemProps) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
export interface MenuCheckboxItemProps extends BaseItemProps {
|
|
99
|
+
/** Ticked (controlled). */
|
|
99
100
|
checked?: boolean;
|
|
101
|
+
/** The state after a toggle, as a plain boolean. */
|
|
100
102
|
onCheckedChange?(checked: boolean): void;
|
|
101
103
|
/** Default false: toggling several options in a row is the usual case. */
|
|
102
104
|
closeOnSelect?: boolean;
|
|
@@ -147,7 +149,9 @@ export function MenuCheckboxItem(props: MenuCheckboxItemProps) {
|
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
export interface MenuRadioGroupProps {
|
|
152
|
+
/** The chosen value (controlled). */
|
|
150
153
|
value?: string;
|
|
154
|
+
/** The newly chosen value. */
|
|
151
155
|
onValueChange?(value: string): void;
|
|
152
156
|
/** Names the group, and is shown above it when it is a string. */
|
|
153
157
|
label?: ReactNode;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
10
|
"source": {
|
|
11
|
-
"libraryVersion": "2.
|
|
11
|
+
"libraryVersion": "2.6.0",
|
|
12
12
|
"files": [
|
|
13
13
|
"core/dismiss.ts",
|
|
14
14
|
"core/index.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"react/locale.ts",
|
|
20
20
|
"react/props.ts"
|
|
21
21
|
],
|
|
22
|
-
"sourceHash": "sha256:
|
|
22
|
+
"sourceHash": "sha256:078ceea5f6cf953d95a999fd958a6b2ed8a61e3c9060665eeca4efd53fb70413"
|
|
23
23
|
},
|
|
24
24
|
"props": [
|
|
25
25
|
{
|
|
@@ -88,21 +88,27 @@
|
|
|
88
88
|
"typeText": "boolean | undefined",
|
|
89
89
|
"required": false,
|
|
90
90
|
"default": false,
|
|
91
|
-
"origin": "derived"
|
|
91
|
+
"origin": "derived",
|
|
92
|
+
"description": "Open to begin with, when you are not controlling `open`.",
|
|
93
|
+
"descriptionOrigin": "jsdoc"
|
|
92
94
|
},
|
|
93
95
|
{
|
|
94
96
|
"name": "description",
|
|
95
97
|
"type": "other",
|
|
96
98
|
"typeText": "ReactNode",
|
|
97
99
|
"required": false,
|
|
98
|
-
"origin": "derived"
|
|
100
|
+
"origin": "derived",
|
|
101
|
+
"description": "A line under the title, linked as the dialog's description.",
|
|
102
|
+
"descriptionOrigin": "jsdoc"
|
|
99
103
|
},
|
|
100
104
|
{
|
|
101
105
|
"name": "footer",
|
|
102
106
|
"type": "other",
|
|
103
107
|
"typeText": "Renderable",
|
|
104
108
|
"required": false,
|
|
105
|
-
"origin": "derived"
|
|
109
|
+
"origin": "derived",
|
|
110
|
+
"description": "The actions row, pinned below the scrolling content so it stays\r\nreachable however long the body is.",
|
|
111
|
+
"descriptionOrigin": "jsdoc"
|
|
106
112
|
},
|
|
107
113
|
{
|
|
108
114
|
"name": "id",
|
|
@@ -279,9 +285,9 @@
|
|
|
279
285
|
"safeMutations": {},
|
|
280
286
|
"examples": [],
|
|
281
287
|
"coverage": {
|
|
282
|
-
"propsTotal":
|
|
283
|
-
"propsDescribed":
|
|
284
|
-
"describedPct":
|
|
288
|
+
"propsTotal": 17,
|
|
289
|
+
"propsDescribed": 14,
|
|
290
|
+
"describedPct": 82,
|
|
285
291
|
"authoredSections": [
|
|
286
292
|
"accessibility"
|
|
287
293
|
]
|