Skip to content

Commit c71477b

Browse files
Update custom elements definition
1 parent ae537c0 commit c71477b

1 file changed

Lines changed: 48 additions & 10 deletions

File tree

‎custom-elements.json‎

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,60 +14,98 @@
1414
{
1515
"kind": "field",
1616
"name": "retain",
17-
"privacy": "public"
17+
"type": { "text": "string | null" },
18+
"description": "Space-separated list of field names (or ids as fallback) to retain after a successful form submission.",
19+
"privacy": "public",
20+
"attribute": "retain"
1821
},
1922
{
2023
"kind": "field",
2124
"name": "retainChoice",
22-
"privacy": "public"
25+
"type": { "text": "boolean" },
26+
"description": "When present, injects an accessible opt-in retention checkbox into the form.",
27+
"privacy": "public",
28+
"attribute": "retain-choice"
2329
},
2430
{
2531
"kind": "field",
2632
"name": "retainChoiceLabel",
27-
"privacy": "public"
33+
"type": { "text": "string | null" },
34+
"description": "Plain-text label for the injected retention checkbox.",
35+
"privacy": "public",
36+
"attribute": "retain-choice-label"
2837
},
2938
{
3039
"kind": "field",
3140
"name": "retainChoiceContainer",
32-
"privacy": "public"
41+
"type": { "text": "string | null" },
42+
"description": "CSS selector for a container element into which the retention checkbox is appended.",
43+
"privacy": "public",
44+
"attribute": "retain-choice-container"
3345
},
3446
{
3547
"kind": "field",
3648
"name": "storageKey",
37-
"privacy": "public"
49+
"type": { "text": "string | null" },
50+
"description": "Optional explicit localStorage key override. When omitted the key is derived from the form's method and resolved action URL.",
51+
"privacy": "public",
52+
"attribute": "storage-key"
3853
},
3954
{
4055
"kind": "method",
4156
"name": "saveFormState",
57+
"description": "Serializes and persists the current form field values to localStorage.",
4258
"privacy": "public"
4359
},
4460
{
4561
"kind": "method",
4662
"name": "restoreFormState",
63+
"description": "Applies previously saved field values to the current form.",
4764
"privacy": "public"
4865
},
4966
{
5067
"kind": "method",
5168
"name": "clearSavedData",
69+
"description": "Removes the saved data for this form from localStorage.",
5270
"privacy": "public"
5371
}
5472
],
5573
"events": [],
5674
"attributes": [
5775
{
58-
"name": "retain"
76+
"name": "retain",
77+
"type": { "text": "string" },
78+
"default": "\"\"",
79+
"description": "Space-separated list of field names (or ids as fallback) to retain after a successful form submission.",
80+
"fieldName": "retain"
5981
},
6082
{
61-
"name": "retain-my-info"
83+
"name": "retain-choice",
84+
"type": { "text": "boolean" },
85+
"default": "false",
86+
"description": "When present, injects an accessible opt-in retention checkbox into the form.",
87+
"fieldName": "retainChoice"
6288
},
6389
{
64-
"name": "retain-my-info-label"
90+
"name": "retain-choice-label",
91+
"type": { "text": "string" },
92+
"default": "\"Store my contact information for later\"",
93+
"description": "Plain-text label for the injected retention checkbox.",
94+
"fieldName": "retainChoiceLabel"
6595
},
6696
{
67-
"name": "retain-my-info-selector"
97+
"name": "retain-choice-container",
98+
"type": { "text": "string" },
99+
"default": "\"\"",
100+
"description": "CSS selector for a container element into which the retention checkbox is appended. When omitted the checkbox is inserted before the first submit control.",
101+
"fieldName": "retainChoiceContainer"
68102
},
69103
{
70-
"name": "storage-key"
104+
"name": "storage-key",
105+
"type": { "text": "string" },
106+
"default": "\"form-saver:{method}:{resolvedActionUrl}\"",
107+
"description": "Optional explicit localStorage key override.",
108+
"fieldName": "storageKey"
71109
}
72110
],
73111
"superclass": {

0 commit comments

Comments
 (0)