@rcarls/rc-field 0.0.0 → 0.7.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 +139 -0
- package/README.md +116 -6
- package/dist/custom-elements.json +1099 -0
- package/dist/rc-field-T33bxLJH.js +375 -0
- package/dist/rc-field-T33bxLJH.js.map +1 -0
- package/dist/rc-field-define.js +6 -0
- package/dist/rc-field-define.js.map +1 -0
- package/dist/rc-field.js +5 -0
- package/dist/rc-field.js.map +1 -0
- package/dist/types/packages/rc-field/src/define.d.ts +1 -0
- package/dist/types/packages/rc-field/src/index.d.ts +1 -0
- package/dist/types/packages/rc-field/src/rc-field.d.ts +187 -0
- package/dist/types/packages/rc-field/src/rc-field.styles.d.ts +2 -0
- package/package.json +58 -7
|
@@ -0,0 +1,1099 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/define.ts",
|
|
8
|
+
"declarations": [],
|
|
9
|
+
"exports": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "custom-element-definition",
|
|
12
|
+
"name": "rc-field",
|
|
13
|
+
"declaration": {
|
|
14
|
+
"name": "RCField",
|
|
15
|
+
"module": "/src/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "js",
|
|
20
|
+
"name": "*",
|
|
21
|
+
"declaration": {
|
|
22
|
+
"name": "*",
|
|
23
|
+
"module": "src/index.js"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "javascript-module",
|
|
30
|
+
"path": "src/index.ts",
|
|
31
|
+
"declarations": [],
|
|
32
|
+
"exports": [
|
|
33
|
+
{
|
|
34
|
+
"kind": "js",
|
|
35
|
+
"name": "*",
|
|
36
|
+
"declaration": {
|
|
37
|
+
"name": "*",
|
|
38
|
+
"module": "src/rc-field.js"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "javascript-module",
|
|
45
|
+
"path": "src/rc-field.ts",
|
|
46
|
+
"declarations": [
|
|
47
|
+
{
|
|
48
|
+
"kind": "class",
|
|
49
|
+
"description": "Accessible field wrapper for a native input, textarea, or select with labels and supporting\ntext.\n\nThe native control remains connected in light DOM and owns its value, form association,\nautofill, constraint validation, and native events. `rc-field` derives visual state from that\ncontrol and wires a slotted label, hint, and error without replacing author-provided ARIA\nreferences. Programmatic native value writes are visible after calling `sync()`.\n\nDerived host attributes expose `data-focused`, `data-populated`, `data-disabled`,\n`data-readonly`, `data-required`, `data-invalid`, `data-multiline`, `data-has-label`, and\n`data-validation-attempted` for themes.\n\nA direct `<fieldset>` child groups several native controls into one field, such as an amount\nand its unit. Its `<legend>` names the group and shows as the field label, and each control\nkeeps its own accessible name. The first text-like input or textarea is the primary control,\nand the others attach before or after it in source order. Supporting text describes the\nfieldset.",
|
|
50
|
+
"name": "RCField",
|
|
51
|
+
"cssProperties": [
|
|
52
|
+
{
|
|
53
|
+
"description": "Minimum field surface block size",
|
|
54
|
+
"name": "--rc-field-min-block-size",
|
|
55
|
+
"default": "var(--rc-control-block-size, 2.5rem)"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"description": "Gap between leading, content, and trailing regions",
|
|
59
|
+
"name": "--rc-field-gap",
|
|
60
|
+
"default": "var(--rc-control-gap, 0.5rem)"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"description": "Field surface padding",
|
|
64
|
+
"name": "--rc-field-padding",
|
|
65
|
+
"default": "var(--rc-control-padding-block, 0.5rem) var(--rc-control-padding-inline, 0.75rem)"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"description": "Field surface border",
|
|
69
|
+
"name": "--rc-field-border",
|
|
70
|
+
"default": "var(--rc-border, 1px solid ButtonBorder)"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"description": "Field surface corner radius",
|
|
74
|
+
"name": "--rc-field-radius",
|
|
75
|
+
"default": "var(--rc-control-radius, 0.125rem)"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"description": "Field surface background",
|
|
79
|
+
"name": "--rc-field-background",
|
|
80
|
+
"default": "var(--rc-field, Field)"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"description": "Input and affix text color",
|
|
84
|
+
"name": "--rc-field-color",
|
|
85
|
+
"default": "var(--rc-field-text, FieldText)"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"description": "Label color",
|
|
89
|
+
"name": "--rc-field-label-color",
|
|
90
|
+
"default": "var(--rc-field-text, CanvasText)"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"description": "Gap between control and prefix or suffix",
|
|
94
|
+
"name": "--rc-field-control-gap",
|
|
95
|
+
"default": "var(--rc-control-gap, 0.25rem)"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"description": "Gap between supporting text and counter",
|
|
99
|
+
"name": "--rc-field-supporting-gap",
|
|
100
|
+
"default": "var(--rc-control-gap, 0.5rem)"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"description": "Supporting text top padding",
|
|
104
|
+
"name": "--rc-field-supporting-padding-block-start",
|
|
105
|
+
"default": "0.25rem"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"description": "Supporting text inline padding",
|
|
109
|
+
"name": "--rc-field-supporting-padding-inline",
|
|
110
|
+
"default": "var(--rc-control-padding-inline, 0.75rem)"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"description": "Hint and counter color",
|
|
114
|
+
"name": "--rc-field-supporting-color",
|
|
115
|
+
"default": "var(--rc-field-text, CanvasText)"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"description": "Hint, error, and counter font size",
|
|
119
|
+
"name": "--rc-field-supporting-font-size",
|
|
120
|
+
"default": "0.75rem"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"description": "Invalid outline, label, and error color",
|
|
124
|
+
"name": "--rc-field-error-color",
|
|
125
|
+
"default": "Mark"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"description": "Disabled field opacity",
|
|
129
|
+
"name": "--rc-field-disabled-opacity",
|
|
130
|
+
"default": "var(--rc-disabled-opacity, 0.6)"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"description": "Focus outline",
|
|
134
|
+
"name": "--rc-field-focus-outline",
|
|
135
|
+
"default": "var(--rc-focus-ring, 2px solid Highlight)"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"description": "Focus outline offset",
|
|
139
|
+
"name": "--rc-field-focus-outline-offset",
|
|
140
|
+
"default": "var(--rc-focus-ring-offset, 0)"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"cssParts": [
|
|
144
|
+
{
|
|
145
|
+
"description": "Field surface",
|
|
146
|
+
"name": "field"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"description": "Label and editable content column",
|
|
150
|
+
"name": "content"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"description": "Label container",
|
|
154
|
+
"name": "label"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"description": "Native control, prefix, and suffix row",
|
|
158
|
+
"name": "control"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"description": "Leading content container",
|
|
162
|
+
"name": "leading"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"description": "Trailing content container",
|
|
166
|
+
"name": "trailing"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"description": "Prefix content container",
|
|
170
|
+
"name": "prefix"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"description": "Suffix content container",
|
|
174
|
+
"name": "suffix"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"description": "Supporting text row",
|
|
178
|
+
"name": "supporting-text"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"description": "Hint container",
|
|
182
|
+
"name": "hint"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"description": "Error container",
|
|
186
|
+
"name": "error"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"description": "Character counter",
|
|
190
|
+
"name": "counter"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"slots": [
|
|
194
|
+
{
|
|
195
|
+
"description": "Required native `<input>`, `<textarea>`, or `<select>` control. An enhancing direct child marked `data-rc-field-control` may own the native control as its direct child. A `<fieldset>` with a `<legend>` instead groups several controls into one field.",
|
|
196
|
+
"name": ""
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"description": "Visible label; use a native `<label>` unless an ancestor label wraps the field",
|
|
200
|
+
"name": "label"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"description": "Leading icon or control outside the editable content",
|
|
204
|
+
"name": "leading"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"description": "Trailing icon or control outside the editable content",
|
|
208
|
+
"name": "trailing"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"description": "Text or content immediately before the native control",
|
|
212
|
+
"name": "prefix"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"description": "Text or content immediately after the native control",
|
|
216
|
+
"name": "suffix"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"description": "Supporting guidance associated with the native control",
|
|
220
|
+
"name": "hint"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"description": "Error text shown and associated after validation is attempted",
|
|
224
|
+
"name": "error"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"members": [
|
|
228
|
+
{
|
|
229
|
+
"kind": "field",
|
|
230
|
+
"name": "_styledRoots",
|
|
231
|
+
"privacy": "private",
|
|
232
|
+
"static": true,
|
|
233
|
+
"readonly": true,
|
|
234
|
+
"default": "new WeakSet<Document | ShadowRoot>()"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"kind": "method",
|
|
238
|
+
"name": "_ensureBaseStyles",
|
|
239
|
+
"privacy": "private",
|
|
240
|
+
"static": true,
|
|
241
|
+
"return": {
|
|
242
|
+
"type": {
|
|
243
|
+
"text": "void"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"parameters": [
|
|
247
|
+
{
|
|
248
|
+
"name": "root",
|
|
249
|
+
"type": {
|
|
250
|
+
"text": "Node"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"kind": "field",
|
|
257
|
+
"name": "counter",
|
|
258
|
+
"type": {
|
|
259
|
+
"text": "boolean"
|
|
260
|
+
},
|
|
261
|
+
"default": "false",
|
|
262
|
+
"description": "Shows the current native value length and `maxlength`, when present.",
|
|
263
|
+
"attribute": "counter",
|
|
264
|
+
"reflects": true
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"kind": "field",
|
|
268
|
+
"name": "invalid",
|
|
269
|
+
"type": {
|
|
270
|
+
"text": "boolean"
|
|
271
|
+
},
|
|
272
|
+
"default": "false",
|
|
273
|
+
"description": "Forces invalid presentation and supplies native `aria-invalid` when absent.",
|
|
274
|
+
"attribute": "invalid",
|
|
275
|
+
"reflects": true
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"kind": "field",
|
|
279
|
+
"name": "_hasControl",
|
|
280
|
+
"type": {
|
|
281
|
+
"text": "boolean"
|
|
282
|
+
},
|
|
283
|
+
"privacy": "private",
|
|
284
|
+
"default": "false"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"kind": "field",
|
|
288
|
+
"name": "_hasLabel",
|
|
289
|
+
"type": {
|
|
290
|
+
"text": "boolean"
|
|
291
|
+
},
|
|
292
|
+
"privacy": "private",
|
|
293
|
+
"default": "false"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"kind": "field",
|
|
297
|
+
"name": "_hasLeading",
|
|
298
|
+
"type": {
|
|
299
|
+
"text": "boolean"
|
|
300
|
+
},
|
|
301
|
+
"privacy": "private",
|
|
302
|
+
"default": "false"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"kind": "field",
|
|
306
|
+
"name": "_hasTrailing",
|
|
307
|
+
"type": {
|
|
308
|
+
"text": "boolean"
|
|
309
|
+
},
|
|
310
|
+
"privacy": "private",
|
|
311
|
+
"default": "false"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"kind": "field",
|
|
315
|
+
"name": "_hasPrefix",
|
|
316
|
+
"type": {
|
|
317
|
+
"text": "boolean"
|
|
318
|
+
},
|
|
319
|
+
"privacy": "private",
|
|
320
|
+
"default": "false"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"kind": "field",
|
|
324
|
+
"name": "_hasSuffix",
|
|
325
|
+
"type": {
|
|
326
|
+
"text": "boolean"
|
|
327
|
+
},
|
|
328
|
+
"privacy": "private",
|
|
329
|
+
"default": "false"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"kind": "field",
|
|
333
|
+
"name": "_hasHint",
|
|
334
|
+
"type": {
|
|
335
|
+
"text": "boolean"
|
|
336
|
+
},
|
|
337
|
+
"privacy": "private",
|
|
338
|
+
"default": "false"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"kind": "field",
|
|
342
|
+
"name": "_hasError",
|
|
343
|
+
"type": {
|
|
344
|
+
"text": "boolean"
|
|
345
|
+
},
|
|
346
|
+
"privacy": "private",
|
|
347
|
+
"default": "false"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"kind": "field",
|
|
351
|
+
"name": "_focused",
|
|
352
|
+
"type": {
|
|
353
|
+
"text": "boolean"
|
|
354
|
+
},
|
|
355
|
+
"privacy": "private",
|
|
356
|
+
"default": "false"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"kind": "field",
|
|
360
|
+
"name": "_populated",
|
|
361
|
+
"type": {
|
|
362
|
+
"text": "boolean"
|
|
363
|
+
},
|
|
364
|
+
"privacy": "private",
|
|
365
|
+
"default": "false"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"kind": "field",
|
|
369
|
+
"name": "_disabled",
|
|
370
|
+
"type": {
|
|
371
|
+
"text": "boolean"
|
|
372
|
+
},
|
|
373
|
+
"privacy": "private",
|
|
374
|
+
"default": "false"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"kind": "field",
|
|
378
|
+
"name": "_readOnly",
|
|
379
|
+
"type": {
|
|
380
|
+
"text": "boolean"
|
|
381
|
+
},
|
|
382
|
+
"privacy": "private",
|
|
383
|
+
"default": "false"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"kind": "field",
|
|
387
|
+
"name": "_required",
|
|
388
|
+
"type": {
|
|
389
|
+
"text": "boolean"
|
|
390
|
+
},
|
|
391
|
+
"privacy": "private",
|
|
392
|
+
"default": "false"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"kind": "field",
|
|
396
|
+
"name": "_multiline",
|
|
397
|
+
"type": {
|
|
398
|
+
"text": "boolean"
|
|
399
|
+
},
|
|
400
|
+
"privacy": "private",
|
|
401
|
+
"default": "false"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"kind": "field",
|
|
405
|
+
"name": "_grouped",
|
|
406
|
+
"type": {
|
|
407
|
+
"text": "boolean"
|
|
408
|
+
},
|
|
409
|
+
"privacy": "private",
|
|
410
|
+
"default": "false"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"kind": "field",
|
|
414
|
+
"name": "_validationAttempted",
|
|
415
|
+
"type": {
|
|
416
|
+
"text": "boolean"
|
|
417
|
+
},
|
|
418
|
+
"privacy": "private",
|
|
419
|
+
"default": "false"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"kind": "field",
|
|
423
|
+
"name": "_nativeInvalid",
|
|
424
|
+
"type": {
|
|
425
|
+
"text": "boolean"
|
|
426
|
+
},
|
|
427
|
+
"privacy": "private",
|
|
428
|
+
"default": "false"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"kind": "field",
|
|
432
|
+
"name": "_validationMessage",
|
|
433
|
+
"type": {
|
|
434
|
+
"text": "string"
|
|
435
|
+
},
|
|
436
|
+
"privacy": "private",
|
|
437
|
+
"default": "''"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"kind": "field",
|
|
441
|
+
"name": "_$controlRef",
|
|
442
|
+
"type": {
|
|
443
|
+
"text": "WeakRef<RCFieldControl> | null"
|
|
444
|
+
},
|
|
445
|
+
"privacy": "private",
|
|
446
|
+
"default": "null"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"kind": "field",
|
|
450
|
+
"name": "_$controlProviderRef",
|
|
451
|
+
"type": {
|
|
452
|
+
"text": "WeakRef<HTMLElement> | null"
|
|
453
|
+
},
|
|
454
|
+
"privacy": "private",
|
|
455
|
+
"default": "null"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"kind": "field",
|
|
459
|
+
"name": "_$groupRef",
|
|
460
|
+
"type": {
|
|
461
|
+
"text": "WeakRef<HTMLFieldSetElement> | null"
|
|
462
|
+
},
|
|
463
|
+
"privacy": "private",
|
|
464
|
+
"default": "null"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"kind": "field",
|
|
468
|
+
"name": "_groupObserver",
|
|
469
|
+
"type": {
|
|
470
|
+
"text": "MutationObserver | null"
|
|
471
|
+
},
|
|
472
|
+
"privacy": "private",
|
|
473
|
+
"default": "null"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"kind": "field",
|
|
477
|
+
"name": "_$formRef",
|
|
478
|
+
"type": {
|
|
479
|
+
"text": "WeakRef<HTMLFormElement> | null"
|
|
480
|
+
},
|
|
481
|
+
"privacy": "private",
|
|
482
|
+
"default": "null"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"kind": "field",
|
|
486
|
+
"name": "_controlObserver",
|
|
487
|
+
"type": {
|
|
488
|
+
"text": "MutationObserver | null"
|
|
489
|
+
},
|
|
490
|
+
"privacy": "private",
|
|
491
|
+
"default": "null"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"kind": "field",
|
|
495
|
+
"name": "_compositionObserver",
|
|
496
|
+
"type": {
|
|
497
|
+
"text": "MutationObserver | null"
|
|
498
|
+
},
|
|
499
|
+
"privacy": "private",
|
|
500
|
+
"default": "null"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"kind": "field",
|
|
504
|
+
"name": "_managedDescriptionIds",
|
|
505
|
+
"privacy": "private",
|
|
506
|
+
"default": "new Set<string>()"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"kind": "field",
|
|
510
|
+
"name": "_managedIds",
|
|
511
|
+
"type": {
|
|
512
|
+
"text": "Array<{ $element: HTMLElement; id: string }>"
|
|
513
|
+
},
|
|
514
|
+
"privacy": "private",
|
|
515
|
+
"default": "[]"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"kind": "field",
|
|
519
|
+
"name": "_managedLabel",
|
|
520
|
+
"type": {
|
|
521
|
+
"text": "{ $label: HTMLLabelElement; htmlFor: string } | null"
|
|
522
|
+
},
|
|
523
|
+
"privacy": "private",
|
|
524
|
+
"default": "null"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"kind": "field",
|
|
528
|
+
"name": "_managedControlId",
|
|
529
|
+
"type": {
|
|
530
|
+
"text": "string | null"
|
|
531
|
+
},
|
|
532
|
+
"privacy": "private",
|
|
533
|
+
"default": "null"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"kind": "field",
|
|
537
|
+
"name": "_managedAriaInvalid",
|
|
538
|
+
"privacy": "private",
|
|
539
|
+
"default": "new Set<RCFieldControl>()"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"kind": "field",
|
|
543
|
+
"name": "_controlController",
|
|
544
|
+
"privacy": "private",
|
|
545
|
+
"readonly": true,
|
|
546
|
+
"default": "new NativeChildController< RCFieldControl | HTMLFieldSetElement >(this, { selector: CONTROL_SELECTOR, observe: { childList: true, subtree: true }, onChange: ($root, $previousRoot) => this._setupRoot($root, $previousRoot), onMissing: () => { if (import.meta.env.DEV) { warnMissingDirectChild(this, { selector: CONTROL_SELECTOR, childDescription: 'native <input> or <textarea>, optionally inside a data-rc-field-control provider, ' + 'or a <fieldset> grouping several controls', }); } }, })"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"kind": "field",
|
|
550
|
+
"name": "control",
|
|
551
|
+
"type": {
|
|
552
|
+
"text": "RCFieldControl | null"
|
|
553
|
+
},
|
|
554
|
+
"description": "Returns the native control, or `null` when the field is incomplete. In a group, this is the\nprimary control: the first text-like input or textarea, or else the first control.",
|
|
555
|
+
"readonly": true
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"kind": "field",
|
|
559
|
+
"name": "group",
|
|
560
|
+
"type": {
|
|
561
|
+
"text": "HTMLFieldSetElement | null"
|
|
562
|
+
},
|
|
563
|
+
"description": "Returns the `<fieldset>` that groups the field's controls, or `null` for a single control.",
|
|
564
|
+
"readonly": true
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"kind": "field",
|
|
568
|
+
"name": "controls",
|
|
569
|
+
"type": {
|
|
570
|
+
"text": "RCFieldControl[]"
|
|
571
|
+
},
|
|
572
|
+
"description": "Returns every native control the field manages, in source order.",
|
|
573
|
+
"readonly": true
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"kind": "method",
|
|
577
|
+
"name": "focus",
|
|
578
|
+
"return": {
|
|
579
|
+
"type": {
|
|
580
|
+
"text": "void"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"parameters": [
|
|
584
|
+
{
|
|
585
|
+
"name": "options",
|
|
586
|
+
"optional": true,
|
|
587
|
+
"type": {
|
|
588
|
+
"text": "FocusOptions"
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
],
|
|
592
|
+
"description": "Focuses the native control."
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"kind": "method",
|
|
596
|
+
"name": "blur",
|
|
597
|
+
"return": {
|
|
598
|
+
"type": {
|
|
599
|
+
"text": "void"
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"description": "Removes focus from the native control."
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"kind": "method",
|
|
606
|
+
"name": "sync",
|
|
607
|
+
"privacy": "public",
|
|
608
|
+
"return": {
|
|
609
|
+
"type": {
|
|
610
|
+
"text": "void"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"description": "Re-reads native value, validity, attributes, slots, and accessible relationships."
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"kind": "method",
|
|
617
|
+
"name": "_setupRoot",
|
|
618
|
+
"privacy": "private",
|
|
619
|
+
"return": {
|
|
620
|
+
"type": {
|
|
621
|
+
"text": "void"
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"parameters": [
|
|
625
|
+
{
|
|
626
|
+
"name": "$root",
|
|
627
|
+
"type": {
|
|
628
|
+
"text": "RCFieldControl | HTMLFieldSetElement | null"
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"name": "$previousRoot",
|
|
633
|
+
"type": {
|
|
634
|
+
"text": "RCFieldControl | HTMLFieldSetElement | null"
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"kind": "method",
|
|
641
|
+
"name": "_setupGroup",
|
|
642
|
+
"privacy": "private",
|
|
643
|
+
"return": {
|
|
644
|
+
"type": {
|
|
645
|
+
"text": "void"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"parameters": [
|
|
649
|
+
{
|
|
650
|
+
"name": "$group",
|
|
651
|
+
"type": {
|
|
652
|
+
"text": "HTMLFieldSetElement"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
]
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"kind": "method",
|
|
659
|
+
"name": "_teardownGroup",
|
|
660
|
+
"privacy": "private",
|
|
661
|
+
"return": {
|
|
662
|
+
"type": {
|
|
663
|
+
"text": "void"
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"parameters": [
|
|
667
|
+
{
|
|
668
|
+
"name": "$group",
|
|
669
|
+
"type": {
|
|
670
|
+
"text": "HTMLFieldSetElement"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
]
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"kind": "method",
|
|
677
|
+
"name": "_syncGroupControl",
|
|
678
|
+
"privacy": "private",
|
|
679
|
+
"return": {
|
|
680
|
+
"type": {
|
|
681
|
+
"text": "void"
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"description": "Re-resolves a group's primary control after its contents change."
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"kind": "method",
|
|
688
|
+
"name": "_setupControl",
|
|
689
|
+
"privacy": "private",
|
|
690
|
+
"return": {
|
|
691
|
+
"type": {
|
|
692
|
+
"text": "void"
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
"parameters": [
|
|
696
|
+
{
|
|
697
|
+
"name": "$control",
|
|
698
|
+
"type": {
|
|
699
|
+
"text": "RCFieldControl | null"
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
]
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"kind": "method",
|
|
706
|
+
"name": "_teardownControl",
|
|
707
|
+
"privacy": "private",
|
|
708
|
+
"return": {
|
|
709
|
+
"type": {
|
|
710
|
+
"text": "void"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"parameters": [
|
|
714
|
+
{
|
|
715
|
+
"name": "$control",
|
|
716
|
+
"type": {
|
|
717
|
+
"text": "RCFieldControl | null"
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
]
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"kind": "method",
|
|
724
|
+
"name": "_syncForm",
|
|
725
|
+
"privacy": "private",
|
|
726
|
+
"return": {
|
|
727
|
+
"type": {
|
|
728
|
+
"text": "void"
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"kind": "method",
|
|
734
|
+
"name": "_queueSync",
|
|
735
|
+
"privacy": "private",
|
|
736
|
+
"return": {
|
|
737
|
+
"type": {
|
|
738
|
+
"text": "void"
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"kind": "field",
|
|
744
|
+
"name": "_onControlInput",
|
|
745
|
+
"privacy": "private",
|
|
746
|
+
"readonly": true
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"kind": "field",
|
|
750
|
+
"name": "_onControlChange",
|
|
751
|
+
"privacy": "private",
|
|
752
|
+
"readonly": true
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"kind": "field",
|
|
756
|
+
"name": "_onControlFocus",
|
|
757
|
+
"privacy": "private",
|
|
758
|
+
"readonly": true
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"kind": "field",
|
|
762
|
+
"name": "_onControlBlur",
|
|
763
|
+
"privacy": "private",
|
|
764
|
+
"readonly": true
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"kind": "field",
|
|
768
|
+
"name": "_onProviderFocusIn",
|
|
769
|
+
"privacy": "private",
|
|
770
|
+
"readonly": true
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"kind": "field",
|
|
774
|
+
"name": "_onProviderFocusOut",
|
|
775
|
+
"privacy": "private",
|
|
776
|
+
"readonly": true
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"kind": "field",
|
|
780
|
+
"name": "_onGroupFocusIn",
|
|
781
|
+
"privacy": "private",
|
|
782
|
+
"readonly": true
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"kind": "field",
|
|
786
|
+
"name": "_onGroupFocusOut",
|
|
787
|
+
"privacy": "private",
|
|
788
|
+
"readonly": true,
|
|
789
|
+
"description": "Moving focus between the group's own controls keeps the field focused."
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"kind": "field",
|
|
793
|
+
"name": "_onControlInvalid",
|
|
794
|
+
"privacy": "private",
|
|
795
|
+
"readonly": true
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"kind": "field",
|
|
799
|
+
"name": "_onCompositionEnd",
|
|
800
|
+
"privacy": "private",
|
|
801
|
+
"readonly": true
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"kind": "field",
|
|
805
|
+
"name": "_onFormReset",
|
|
806
|
+
"privacy": "private",
|
|
807
|
+
"readonly": true
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"kind": "method",
|
|
811
|
+
"name": "_syncState",
|
|
812
|
+
"privacy": "private",
|
|
813
|
+
"return": {
|
|
814
|
+
"type": {
|
|
815
|
+
"text": "void"
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"kind": "method",
|
|
821
|
+
"name": "_effectiveDisabled",
|
|
822
|
+
"privacy": "private",
|
|
823
|
+
"return": {
|
|
824
|
+
"type": {
|
|
825
|
+
"text": "boolean"
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
"parameters": [
|
|
829
|
+
{
|
|
830
|
+
"name": "$control",
|
|
831
|
+
"type": {
|
|
832
|
+
"text": "RCFieldControl | null"
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
],
|
|
836
|
+
"description": "A control provider may disable its native control for a reason unrelated to the field's\nown enabled/disabled intent (`rc-select`'s picker guard force-disables a `multiple` native\nselect to defeat a GeckoView label-activation bug, entirely independent of author intent).\nPrefer the provider's own `disabled` property, when it exposes one, over the raw control's\n— the same precedence `focus()`/`blur()` already give the provider over the control."
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"kind": "method",
|
|
840
|
+
"name": "_reflectStates",
|
|
841
|
+
"privacy": "private",
|
|
842
|
+
"return": {
|
|
843
|
+
"type": {
|
|
844
|
+
"text": "void"
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"kind": "method",
|
|
850
|
+
"name": "_effectiveInvalid",
|
|
851
|
+
"privacy": "private",
|
|
852
|
+
"return": {
|
|
853
|
+
"type": {
|
|
854
|
+
"text": "boolean"
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"kind": "method",
|
|
860
|
+
"name": "_syncSlots",
|
|
861
|
+
"privacy": "private",
|
|
862
|
+
"return": {
|
|
863
|
+
"type": {
|
|
864
|
+
"text": "void"
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"kind": "method",
|
|
870
|
+
"name": "_hasSlottedContent",
|
|
871
|
+
"privacy": "private",
|
|
872
|
+
"return": {
|
|
873
|
+
"type": {
|
|
874
|
+
"text": "boolean"
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
"parameters": [
|
|
878
|
+
{
|
|
879
|
+
"name": "slotName",
|
|
880
|
+
"type": {
|
|
881
|
+
"text": "string"
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
]
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"kind": "method",
|
|
888
|
+
"name": "_syncAssociations",
|
|
889
|
+
"privacy": "private",
|
|
890
|
+
"return": {
|
|
891
|
+
"type": {
|
|
892
|
+
"text": "void"
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"kind": "method",
|
|
898
|
+
"name": "_restoreAssociations",
|
|
899
|
+
"privacy": "private",
|
|
900
|
+
"return": {
|
|
901
|
+
"type": {
|
|
902
|
+
"text": "void"
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
"parameters": [
|
|
906
|
+
{
|
|
907
|
+
"name": "$described",
|
|
908
|
+
"type": {
|
|
909
|
+
"text": "HTMLElement"
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"name": "restoreIds",
|
|
914
|
+
"default": "true"
|
|
915
|
+
}
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"kind": "method",
|
|
920
|
+
"name": "_ensureId",
|
|
921
|
+
"privacy": "private",
|
|
922
|
+
"return": {
|
|
923
|
+
"type": {
|
|
924
|
+
"text": "string"
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
"parameters": [
|
|
928
|
+
{
|
|
929
|
+
"name": "$element",
|
|
930
|
+
"type": {
|
|
931
|
+
"text": "HTMLElement"
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "purpose",
|
|
936
|
+
"type": {
|
|
937
|
+
"text": "string"
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
]
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"kind": "method",
|
|
944
|
+
"name": "_warnGroupComposition",
|
|
945
|
+
"privacy": "private",
|
|
946
|
+
"return": {
|
|
947
|
+
"type": {
|
|
948
|
+
"text": "void"
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
"parameters": [
|
|
952
|
+
{
|
|
953
|
+
"name": "$group",
|
|
954
|
+
"type": {
|
|
955
|
+
"text": "HTMLFieldSetElement"
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
]
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"kind": "method",
|
|
962
|
+
"name": "_warnComposition",
|
|
963
|
+
"privacy": "private",
|
|
964
|
+
"return": {
|
|
965
|
+
"type": {
|
|
966
|
+
"text": "void"
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"parameters": [
|
|
970
|
+
{
|
|
971
|
+
"name": "$control",
|
|
972
|
+
"type": {
|
|
973
|
+
"text": "RCFieldControl"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
]
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"kind": "method",
|
|
980
|
+
"name": "_handleSurfaceClick",
|
|
981
|
+
"privacy": "private",
|
|
982
|
+
"return": {
|
|
983
|
+
"type": {
|
|
984
|
+
"text": "void"
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"parameters": [
|
|
988
|
+
{
|
|
989
|
+
"name": "event",
|
|
990
|
+
"type": {
|
|
991
|
+
"text": "MouseEvent"
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
]
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"kind": "method",
|
|
998
|
+
"name": "_slotClass",
|
|
999
|
+
"privacy": "private",
|
|
1000
|
+
"return": {
|
|
1001
|
+
"type": {
|
|
1002
|
+
"text": "string"
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
"parameters": [
|
|
1006
|
+
{
|
|
1007
|
+
"name": "hasContent",
|
|
1008
|
+
"type": {
|
|
1009
|
+
"text": "boolean"
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
]
|
|
1013
|
+
}
|
|
1014
|
+
],
|
|
1015
|
+
"attributes": [
|
|
1016
|
+
{
|
|
1017
|
+
"description": "Shows the current native value length and `maxlength`, when present.",
|
|
1018
|
+
"name": "counter",
|
|
1019
|
+
"type": {
|
|
1020
|
+
"text": "boolean"
|
|
1021
|
+
},
|
|
1022
|
+
"default": "false",
|
|
1023
|
+
"fieldName": "counter"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"description": "Forces invalid presentation and supplies native `aria-invalid` when absent.",
|
|
1027
|
+
"name": "invalid",
|
|
1028
|
+
"type": {
|
|
1029
|
+
"text": "boolean"
|
|
1030
|
+
},
|
|
1031
|
+
"default": "false",
|
|
1032
|
+
"fieldName": "invalid"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"description": "Present while the native control has focus",
|
|
1036
|
+
"name": "data-focused"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"description": "Present while the native control has a value, or a single select's selected option has visible label text",
|
|
1040
|
+
"name": "data-populated"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"description": "Mirrors the native control's disabled state",
|
|
1044
|
+
"name": "data-disabled"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"description": "Mirrors the native control's readonly state",
|
|
1048
|
+
"name": "data-readonly"
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"description": "Mirrors the native control's required state",
|
|
1052
|
+
"name": "data-required"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"description": "Present while an attempted or forced validation state is invalid",
|
|
1056
|
+
"name": "data-invalid"
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"description": "Present when the native control is a textarea",
|
|
1060
|
+
"name": "data-multiline"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"description": "Present when the field has content in its label slot",
|
|
1064
|
+
"name": "data-has-label"
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"description": "Present after the native control dispatches `invalid`",
|
|
1068
|
+
"name": "data-validation-attempted"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"description": "Present when an enhancing direct child owns the native control",
|
|
1072
|
+
"name": "data-control-provider"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"description": "Present when a `<fieldset>` groups several controls into the field",
|
|
1076
|
+
"name": "data-group"
|
|
1077
|
+
}
|
|
1078
|
+
],
|
|
1079
|
+
"superclass": {
|
|
1080
|
+
"name": "LitElement",
|
|
1081
|
+
"package": "lit"
|
|
1082
|
+
},
|
|
1083
|
+
"tagName": "rc-field",
|
|
1084
|
+
"customElement": true
|
|
1085
|
+
}
|
|
1086
|
+
],
|
|
1087
|
+
"exports": [
|
|
1088
|
+
{
|
|
1089
|
+
"kind": "js",
|
|
1090
|
+
"name": "RCField",
|
|
1091
|
+
"declaration": {
|
|
1092
|
+
"name": "RCField",
|
|
1093
|
+
"module": "src/rc-field.ts"
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
]
|
|
1097
|
+
}
|
|
1098
|
+
]
|
|
1099
|
+
}
|