@aurodesignsystem-dev/auro-formkit 0.0.0-pr1503.4 → 0.0.0-pr1503.5

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.
Files changed (190) hide show
  1. package/components/bibtemplate/dist/index.js +1 -1
  2. package/components/bibtemplate/dist/registered.js +1 -1
  3. package/components/checkbox/demo/accessibility.md +1 -1
  4. package/components/checkbox/demo/customize.html +1 -2
  5. package/components/checkbox/demo/customize.min.js +23 -8
  6. package/components/checkbox/demo/getting-started.min.js +23 -8
  7. package/components/checkbox/demo/index.min.js +23 -8
  8. package/components/checkbox/dist/index.js +23 -8
  9. package/components/checkbox/dist/registered.js +23 -8
  10. package/components/combobox/README.md +1 -1
  11. package/components/combobox/demo/accessibility.md +1 -1
  12. package/components/combobox/demo/api.md +2 -2
  13. package/components/combobox/demo/customize.html +1 -2
  14. package/components/combobox/demo/customize.md +166 -142
  15. package/components/combobox/demo/customize.min.js +2515 -2316
  16. package/components/combobox/demo/getting-started.min.js +2515 -2312
  17. package/components/combobox/demo/index.md +2 -1
  18. package/components/combobox/demo/index.min.js +2515 -2312
  19. package/components/combobox/demo/keyboard-behavior.md +3 -146
  20. package/components/combobox/demo/readme.md +1 -1
  21. package/components/combobox/demo/why-combobox.md +2 -2
  22. package/components/combobox/dist/auro-combobox.d.ts +49 -15
  23. package/components/combobox/dist/index.js +1462 -753
  24. package/components/combobox/dist/registered.js +1462 -753
  25. package/components/counter/demo/customize.min.js +188 -244
  26. package/components/counter/demo/index.min.js +188 -244
  27. package/components/counter/dist/auro-counter.d.ts +0 -8
  28. package/components/counter/dist/index.js +188 -244
  29. package/components/counter/dist/registered.js +188 -244
  30. package/components/datepicker/demo/accessibility.md +20 -10
  31. package/components/datepicker/demo/api.md +65 -62
  32. package/components/datepicker/demo/customize.md +180 -40
  33. package/components/datepicker/demo/customize.min.js +1690 -777
  34. package/components/datepicker/demo/getting-started.md +118 -2
  35. package/components/datepicker/demo/index.min.js +1690 -759
  36. package/components/datepicker/demo/keyboard-behavior.md +3 -3
  37. package/components/datepicker/demo/voiceover.md +4 -4
  38. package/components/datepicker/demo/why-datepicker.md +2 -2
  39. package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +48 -3
  40. package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +188 -10
  41. package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +89 -6
  42. package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
  43. package/components/datepicker/dist/index.js +1690 -759
  44. package/components/datepicker/dist/registered.js +1690 -759
  45. package/components/dropdown/demo/customize.html +3 -0
  46. package/components/dropdown/demo/customize.min.js +142 -208
  47. package/components/dropdown/demo/getting-started.min.js +131 -207
  48. package/components/dropdown/demo/index.min.js +131 -207
  49. package/components/dropdown/dist/auro-dropdown.d.ts +17 -1
  50. package/components/dropdown/dist/index.js +131 -207
  51. package/components/dropdown/dist/registered.js +131 -207
  52. package/components/form/demo/api.md +3 -3
  53. package/components/form/demo/customize.html +6 -6
  54. package/components/form/demo/customize.md +535 -135
  55. package/components/form/demo/customize.min.js +6307 -4378
  56. package/components/form/demo/getting-started.md +344 -96
  57. package/components/form/demo/getting-started.min.js +6255 -4378
  58. package/components/form/demo/index.min.js +6206 -4378
  59. package/components/form/demo/registerDemoDeps.min.js +5827 -4333
  60. package/components/form/dist/auro-form.d.ts +128 -10
  61. package/components/form/dist/index.js +377 -43
  62. package/components/form/dist/registered.js +377 -43
  63. package/components/input/demo/accessibility.md +1 -1
  64. package/components/input/demo/api.md +58 -57
  65. package/components/input/demo/customize.html +1 -2
  66. package/components/input/demo/customize.md +62 -61
  67. package/components/input/demo/customize.min.js +396 -275
  68. package/components/input/demo/getting-started.min.js +396 -275
  69. package/components/input/demo/index.min.js +396 -275
  70. package/components/input/dist/auro-input.d.ts +1 -1
  71. package/components/input/dist/base-input.d.ts +60 -81
  72. package/components/input/dist/index.js +409 -276
  73. package/components/input/dist/registered.js +396 -275
  74. package/components/input/dist/utilities.d.ts +10 -1
  75. package/components/menu/demo/accessibility.md +9 -4
  76. package/components/menu/demo/api.md +48 -45
  77. package/components/menu/demo/css-only.md +26 -19
  78. package/components/menu/demo/customize.md +307 -75
  79. package/components/menu/demo/design.md +1 -1
  80. package/components/menu/demo/getting-started.md +144 -7
  81. package/components/menu/demo/index.min.js +961 -1341
  82. package/components/menu/demo/keyboard-behavior.md +83 -4
  83. package/components/menu/demo/voiceover.md +21 -14
  84. package/components/menu/demo/why-menu.md +8 -9
  85. package/components/menu/dist/auro-menu-utils.d.ts +19 -0
  86. package/components/menu/dist/auro-menu.d.ts +97 -116
  87. package/components/menu/dist/auro-menuoption.d.ts +39 -133
  88. package/components/menu/dist/index.js +823 -1309
  89. package/components/menu/dist/registered.js +835 -1309
  90. package/components/radio/demo/accessibility.md +1 -1
  91. package/components/radio/demo/customize.min.js +23 -8
  92. package/components/radio/demo/getting-started.min.js +23 -8
  93. package/components/radio/demo/index.min.js +23 -8
  94. package/components/radio/dist/index.js +23 -8
  95. package/components/radio/dist/registered.js +23 -8
  96. package/components/select/demo/accessibility.md +6 -1
  97. package/components/select/demo/api.md +3 -2
  98. package/components/select/demo/customize.html +1 -2
  99. package/components/select/demo/customize.md +210 -5
  100. package/components/select/demo/customize.min.js +1613 -1854
  101. package/components/select/demo/design.md +10 -10
  102. package/components/select/demo/getting-started.md +1 -1
  103. package/components/select/demo/getting-started.min.js +1617 -1903
  104. package/components/select/demo/index.md +2 -2
  105. package/components/select/demo/index.min.js +1613 -1854
  106. package/components/select/demo/keyboard-behavior.md +81 -54
  107. package/components/select/demo/voiceover.md +28 -15
  108. package/components/select/dist/auro-select.d.ts +70 -12
  109. package/components/select/dist/index.js +580 -315
  110. package/components/select/dist/registered.js +580 -315
  111. package/components/select/dist/selectUtils.d.ts +24 -0
  112. package/custom-elements.json +8071 -7919
  113. package/package.json +7 -3
  114. package/components/checkbox/demo/customize.js +0 -22
  115. package/components/checkbox/demo/demo-support.js +0 -1
  116. package/components/checkbox/demo/getting-started.js +0 -22
  117. package/components/checkbox/demo/index.js +0 -8
  118. package/components/checkbox/demo/styles.scss +0 -1
  119. package/components/combobox/demo/customize.js +0 -24
  120. package/components/combobox/demo/demo-support.js +0 -1
  121. package/components/combobox/demo/getting-started.js +0 -21
  122. package/components/combobox/demo/index.js +0 -23
  123. package/components/combobox/demo/styles.scss +0 -1
  124. package/components/counter/demo/customize.js +0 -21
  125. package/components/counter/demo/demo-support.js +0 -1
  126. package/components/counter/demo/index.js +0 -21
  127. package/components/counter/demo/styles.scss +0 -1
  128. package/components/datepicker/demo/customize.js +0 -19
  129. package/components/datepicker/demo/demo-support.js +0 -1
  130. package/components/datepicker/demo/index.js +0 -23
  131. package/components/datepicker/demo/styles.scss +0 -1
  132. package/components/dropdown/demo/customize.js +0 -9
  133. package/components/dropdown/demo/demo-support.js +0 -1
  134. package/components/dropdown/demo/getting-started.js +0 -9
  135. package/components/dropdown/demo/index.js +0 -16
  136. package/components/dropdown/demo/styles.scss +0 -1
  137. package/components/form/demo/customize.js +0 -9
  138. package/components/form/demo/demo-support.js +0 -1
  139. package/components/form/demo/getting-started.js +0 -9
  140. package/components/form/demo/index.js +0 -5
  141. package/components/form/demo/registerDemoDeps.js +0 -23
  142. package/components/form/demo/styles.scss +0 -1
  143. package/components/input/demo/customize.js +0 -25
  144. package/components/input/demo/demo-support.js +0 -1
  145. package/components/input/demo/getting-started.js +0 -8
  146. package/components/input/demo/index.js +0 -8
  147. package/components/input/demo/styles.css +0 -974
  148. package/components/input/demo/styles.scss +0 -1
  149. package/components/menu/demo/demo-support.js +0 -1
  150. package/components/menu/demo/index.js +0 -25
  151. package/components/menu/demo/styles.scss +0 -1
  152. package/components/menu/dist/auro-menu.context.d.ts +0 -238
  153. package/components/radio/demo/customize.js +0 -22
  154. package/components/radio/demo/demo-support.js +0 -1
  155. package/components/radio/demo/getting-started.js +0 -24
  156. package/components/radio/demo/index.js +0 -8
  157. package/components/radio/demo/styles.scss +0 -1
  158. package/components/select/demo/customize.js +0 -11
  159. package/components/select/demo/demo-support.js +0 -1
  160. package/components/select/demo/getting-started.js +0 -26
  161. package/components/select/demo/index.js +0 -11
  162. package/components/select/demo/styles.scss +0 -1
  163. /package/components/counter/dist/styles/{counter-wrapper-color-css.d.ts → counter-group-color-css.d.ts} +0 -0
  164. /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
  165. /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
  166. /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
  167. /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
  168. /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
  169. /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
  170. /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
  171. /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
  172. /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
  173. /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
  174. /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
  175. /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
  176. /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
  177. /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
  178. /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
  179. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
  180. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
  181. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
  182. /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
  183. /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
  184. /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
  185. /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
  186. /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
  187. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
  188. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
  189. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
  190. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
@@ -7,6 +7,11 @@
7
7
  <auro-anchorlink fluid href="#layout">Layout</auro-anchorlink>
8
8
  <auro-anchorlink fluid href="#columnLayout" class="level2 body-xs">Column Layout</auro-anchorlink>
9
9
  <auro-anchorlink fluid href="#complexForm" class="level2 body-xs">Complex Form</auro-anchorlink>
10
+ <auro-anchorlink fluid href="#fieldState">Field State</auro-anchorlink>
11
+ <auro-anchorlink fluid href="#disabledFields" class="level2 body-xs">Disabled Fields</auro-anchorlink>
12
+ <auro-anchorlink fluid href="#disableAfterEdit" class="level2 body-xs">Disabling After User Edits</auro-anchorlink>
13
+ <auro-anchorlink fluid href="#behaviorChangesV6" class="level2 body-xs">Behavior Changes in v6</auro-anchorlink>
14
+ <auro-anchorlink fluid href="#runtimeMutations" class="level2 body-xs">Runtime DOM Mutations</auro-anchorlink>
10
15
  </auro-nav>
11
16
  </nav>
12
17
  <div class="mainContent">
@@ -24,16 +29,14 @@
24
29
  display: grid;
25
30
  grid-template-columns: 1fr 1fr;
26
31
  gap: 1rem;
32
+ align-items: start;
27
33
  }
28
34
 
29
- .columned-form div {
30
- display: flex;
31
- flex-direction: column;
32
- padding: 1rem;
33
- gap: 1rem;
35
+ .columned-form .span-2 {
36
+ grid-column: span 2;
34
37
  }
35
38
 
36
- .controls {
39
+ .columned-form-controls {
37
40
  display: flex;
38
41
  justify-content: flex-end;
39
42
  margin-top: 1rem;
@@ -41,29 +44,25 @@
41
44
  </style>
42
45
  <auro-form>
43
46
  <div class="columned-form">
44
- <div>
45
- <auro-input id="search-box" name="searchBox" required>
46
- <span slot="label">Search flights</span>
47
+ <auro-input id="cl-first-name" name="firstName" required>
48
+ <span slot="label">First Name</span>
47
49
  </auro-input>
48
- <auro-input id="last-name" name="lastName" required>
50
+ <auro-input id="cl-last-name" name="lastName" required>
49
51
  <span slot="label">Last Name</span>
50
- </auro-input>
51
- </div>
52
- <div>
53
- <div class="datepickerBlock">
54
- <h4>Pick a date range</h4>
55
- <auro-datepicker id="date-range" name="dateRange" required range>
56
- <span slot="fromLabel">Start</span>
57
- <span slot="toLabel">End</span>
58
- <span slot="bib.fullscreen.fromLabel">Start</span>
59
- <span slot="bib.fullscreen.toLabel">End</span>
52
+ </auro-input>
53
+ <auro-input id="cl-email" name="email" type="email" class="span-2" required>
54
+ <span slot="label">Email</span>
55
+ </auro-input>
56
+ <auro-datepicker id="cl-date-range" name="dateRange" class="span-2" required range>
57
+ <span slot="fromLabel">Departure</span>
58
+ <span slot="toLabel">Return</span>
59
+ <span slot="bib.fullscreen.fromLabel">Departure</span>
60
+ <span slot="bib.fullscreen.toLabel">Return</span>
60
61
  </auro-datepicker>
61
62
  </div>
62
- <div class="controls">
63
+ <div class="columned-form-controls">
63
64
  <auro-button type="submit">Submit</auro-button>
64
65
  </div>
65
- </div>
66
- </div>
67
66
  </auro-form>
68
67
  <!-- AURO-GENERATED-CONTENT:END -->
69
68
  </div>
@@ -76,16 +75,14 @@
76
75
  display: grid;
77
76
  grid-template-columns: 1fr 1fr;
78
77
  gap: 1rem;
78
+ align-items: start;
79
79
  }
80
80
 
81
- .columned-form div {
82
- display: flex;
83
- flex-direction: column;
84
- padding: 1rem;
85
- gap: 1rem;
81
+ .columned-form .span-2 {
82
+ grid-column: span 2;
86
83
  }
87
84
 
88
- .controls {
85
+ .columned-form-controls {
89
86
  display: flex;
90
87
  justify-content: flex-end;
91
88
  margin-top: 1rem;
@@ -93,55 +90,413 @@
93
90
  &lt;/style&gt;
94
91
  &lt;auro-form&gt;
95
92
  &lt;div class="columned-form"&gt;
96
- &lt;div&gt;
97
- &lt;auro-input id="search-box" name="searchBox" required&gt;
98
- &lt;span slot="label"&gt;Search flights&lt;/span&gt;
99
- &lt;/auro-input&gt;
100
- &lt;auro-input id="last-name" name="lastName" required&gt;
101
- &lt;span slot="label"&gt;Last Name&lt;/span&gt;
102
- &lt;/auro-input&gt;
103
- &lt;/div&gt;
104
- &lt;div&gt;
105
- &lt;div class="datepickerBlock"&gt;
106
- &lt;h4&gt;Pick a date range&lt;/h4&gt;
107
- &lt;auro-datepicker id="date-range" name="dateRange" required range&gt;
108
- &lt;span slot="fromLabel"&gt;Start&lt;/span&gt;
109
- &lt;span slot="toLabel"&gt;End&lt;/span&gt;
110
- &lt;span slot="bib.fullscreen.fromLabel"&gt;Start&lt;/span&gt;
111
- &lt;span slot="bib.fullscreen.toLabel"&gt;End&lt;/span&gt;
112
- &lt;/auro-datepicker&gt;
113
- &lt;/div&gt;
114
- &lt;div class="controls"&gt;
115
- &lt;auro-button type="submit"&gt;Submit&lt;/auro-button&gt;
116
- &lt;/div&gt;
117
- &lt;/div&gt;
93
+ &lt;auro-input id="cl-first-name" name="firstName" required&gt;
94
+ &lt;span slot="label"&gt;First Name&lt;/span&gt;
95
+ &lt;/auro-input&gt;
96
+ &lt;auro-input id="cl-last-name" name="lastName" required&gt;
97
+ &lt;span slot="label"&gt;Last Name&lt;/span&gt;
98
+ &lt;/auro-input&gt;
99
+ &lt;auro-input id="cl-email" name="email" type="email" class="span-2" required&gt;
100
+ &lt;span slot="label"&gt;Email&lt;/span&gt;
101
+ &lt;/auro-input&gt;
102
+ &lt;auro-datepicker id="cl-date-range" name="dateRange" class="span-2" required range&gt;
103
+ &lt;span slot="fromLabel"&gt;Departure&lt;/span&gt;
104
+ &lt;span slot="toLabel"&gt;Return&lt;/span&gt;
105
+ &lt;span slot="bib.fullscreen.fromLabel"&gt;Departure&lt;/span&gt;
106
+ &lt;span slot="bib.fullscreen.toLabel"&gt;Return&lt;/span&gt;
107
+ &lt;/auro-datepicker&gt;
108
+ &lt;/div&gt;
109
+ &lt;div class="columned-form-controls"&gt;
110
+ &lt;auro-button type="submit"&gt;Submit&lt;/auro-button&gt;
118
111
  &lt;/div&gt;
119
112
  &lt;/auro-form&gt;</code></pre>
120
113
  <!-- AURO-GENERATED-CONTENT:END -->
121
114
  </auro-accordion>
122
115
  <auro-header level="3" id="complexForm">Complex Form</auro-header>
123
- <p>A more complex form layout with multiple element types, nested containers, and a submit/cancel button group.</p>
116
+ <p>A realistic booking form that exercises every form element <code>auro-form</code> manages — <code>auro-input</code>, <code>auro-select</code>, <code>auro-combobox</code>, a range <code>auro-datepicker</code>, <code>auro-counter-group</code>, <code>auro-radio-group</code>, and <code>auro-checkbox-group</code> — arranged with nested containers and a reset/submit button group.</p>
124
117
  <div class="exampleWrapper">
125
118
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/complex.html) -->
126
119
  <!-- The below content is automatically added from ./../apiExamples/complex.html -->
120
+ <auro-form id="bookingForm" class="trip-form">
121
+ <!-- Cabin — auro-radio-group -->
122
+ <div class="form-section">
123
+ <auro-radio-group required name="cabin">
124
+ <span slot="legend">Cabin</span>
125
+ <auro-radio id="cabin-main" name="cabinChoice" label="Main" value="main" checked></auro-radio>
126
+ <auro-radio id="cabin-premium" name="cabinChoice" label="Premium" value="premium"></auro-radio>
127
+ <auro-radio id="cabin-first" name="cabinChoice" label="First class" value="first"></auro-radio>
128
+ </auro-radio-group>
129
+ </div>
130
+ <!-- Route — auro-select (from) + auro-combobox (to) -->
131
+ <div class="form-section">
132
+ <h4 class="section-heading">Where are you going?</h4>
133
+ <div class="field-row">
134
+ <auro-select required name="departureAirport">
135
+ <span slot="label">From</span>
136
+ <span slot="bib.fullscreen.headline">Choose a departure city</span>
137
+ <auro-menu>
138
+ <auro-menuoption value="SEA">Seattle (SEA)</auro-menuoption>
139
+ <auro-menuoption value="PDX">Portland (PDX)</auro-menuoption>
140
+ <auro-menuoption value="SFO">San Francisco (SFO)</auro-menuoption>
141
+ <auro-menuoption value="LAX">Los Angeles (LAX)</auro-menuoption>
142
+ <auro-menuoption value="ANC">Anchorage (ANC)</auro-menuoption>
143
+ </auro-menu>
144
+ </auro-select>
145
+ <auro-combobox required name="destination">
146
+ <span slot="label">To</span>
147
+ <span slot="bib.fullscreen.headline">Search destinations</span>
148
+ <auro-menu>
149
+ <auro-menuoption value="HNL">Honolulu (HNL)</auro-menuoption>
150
+ <auro-menuoption value="OGG">Maui (OGG)</auro-menuoption>
151
+ <auro-menuoption value="JFK">New York (JFK)</auro-menuoption>
152
+ <auro-menuoption value="ORD">Chicago (ORD)</auro-menuoption>
153
+ <auro-menuoption value="DFW">Dallas–Fort Worth (DFW)</auro-menuoption>
154
+ <auro-menuoption static nomatch>No matching destinations</auro-menuoption>
155
+ </auro-menu>
156
+ </auro-combobox>
157
+ </div>
158
+ </div>
159
+ <!-- When & who — auro-datepicker (range) + auro-counter-group -->
160
+ <div class="form-section">
161
+ <h4 class="section-heading">When and who?</h4>
162
+ <div class="field-row">
163
+ <auro-datepicker required range name="travelDates">
164
+ <span slot="fromLabel">Departure</span>
165
+ <span slot="toLabel">Return</span>
166
+ <span slot="bib.fullscreen.fromLabel">Departure</span>
167
+ <span slot="bib.fullscreen.toLabel">Return</span>
168
+ </auro-datepicker>
169
+ <auro-counter-group isDropdown max="9" name="travelers">
170
+ <div slot="label">Travelers</div>
171
+ <span slot="bib.fullscreen.headline">Travelers</span>
172
+ <span slot="ariaLabel.bib.close">Close</span>
173
+ <auro-counter name="adults" min="1" max="9" value="1">
174
+ Adults
175
+ <span slot="description">Age 18+</span>
176
+ </auro-counter>
177
+ <auro-counter name="children" min="0" max="8" value="0">
178
+ Children
179
+ <span slot="description">Age 2–17</span>
180
+ </auro-counter>
181
+ <auro-counter name="infants" min="0" max="4" value="0">
182
+ Lap infants
183
+ <span slot="description">Under 2</span>
184
+ </auro-counter>
185
+ </auro-counter-group>
186
+ </div>
187
+ </div>
188
+ <!-- Lead traveler — auro-input -->
189
+ <div class="form-section">
190
+ <h4 class="section-heading">Lead traveler</h4>
191
+ <div class="field-row">
192
+ <auro-input id="first-name" name="firstName" required>
193
+ <span slot="label">First name</span>
194
+ </auro-input>
195
+ <auro-input id="last-name" name="lastName" required>
196
+ <span slot="label">Last name</span>
197
+ </auro-input>
198
+ <auro-input id="email" name="email" type="email" class="span-2" required>
199
+ <span slot="label">Email</span>
200
+ <span slot="helpText">We'll send your confirmation here.</span>
201
+ </auro-input>
202
+ </div>
203
+ </div>
204
+ <!-- Extras — auro-checkbox-group -->
205
+ <div class="form-section">
206
+ <auro-checkbox-group name="extras">
207
+ <span slot="legend">Add to your trip (optional)</span>
208
+ <auro-checkbox id="extra-bags" value="bags">First checked bag</auro-checkbox>
209
+ <auro-checkbox id="extra-insurance" value="insurance">Travel insurance</auro-checkbox>
210
+ <auro-checkbox id="extra-lounge" value="lounge">Alaska Lounge+ day pass</auro-checkbox>
211
+ </auro-checkbox-group>
212
+ </div>
213
+ <div class="form-actions">
214
+ <auro-button type="reset" variant="secondary">Reset</auro-button>
215
+ <auro-button type="submit">Search flights</auro-button>
216
+ </div>
217
+ </auro-form>
218
+ <output id="bookingFormOutput" aria-live="polite">Fill in the required fields and submit to see the collected form value. Notice the shapes each field contributes — <code>travelDates</code> as a two-item <code>[departure, return]</code> array, <code>travelers</code> as an object keyed by counter name, <code>extras</code> as an array, and <code>cabin</code> as the selected value.</output>
127
219
  <style>
128
- .submitBlock {
220
+ #bookingFormOutput {
221
+ display: block;
222
+ margin-top: 2rem;
223
+ padding: 1rem 1.25rem;
224
+ border-left: 4px solid #2a2a2a;
225
+ border-radius: 0.25rem;
226
+ background: #f5f5f5;
227
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
228
+ font-size: 0.875rem;
229
+ white-space: pre-wrap;
230
+ }
231
+
232
+ .trip-form {
233
+ display: block;
234
+ padding: 1.5rem;
235
+ border: 1px solid #2a2a2a;
236
+ border-radius: 1rem;
237
+ }
238
+
239
+ .trip-form .form-section {
240
+ margin-top: 1.5rem;
241
+ }
242
+
243
+ .trip-form .form-section:first-of-type {
244
+ margin-top: 0;
245
+ }
246
+
247
+ .trip-form .section-heading {
248
+ margin: 0 0 0.75rem;
249
+ }
250
+
251
+ .trip-form .field-row {
252
+ display: grid;
253
+ grid-template-columns: 1fr 1fr;
254
+ gap: 1rem;
255
+ align-items: start;
256
+ }
257
+
258
+ .trip-form .field-row + .field-row {
129
259
  margin-top: 1rem;
260
+ }
261
+
262
+ .trip-form .span-2 {
263
+ grid-column: span 2;
264
+ }
265
+
266
+ @media (max-width: 660px) {
267
+ .trip-form .field-row {
268
+ grid-template-columns: 1fr;
269
+ }
270
+
271
+ .trip-form .span-2 {
272
+ grid-column: span 1;
273
+ }
274
+ }
275
+
276
+ .trip-form .form-actions {
130
277
  display: flex;
131
278
  justify-content: flex-end;
132
279
  gap: 1rem;
280
+ margin-top: 2rem;
133
281
  }
134
- .datepickerBlock {
135
- margin-top: 1rem;
136
- }
137
- .complex-form {
138
- display: block;
139
- padding: 1rem;
140
- border: 1px solid #2a2a2a;
141
- border-radius: 1rem;
142
- }
143
- </style>
144
- <auro-form class="complex-form">
282
+ </style>
283
+ <!-- AURO-GENERATED-CONTENT:END -->
284
+ </div>
285
+ <auro-accordion alignRight>
286
+ <span slot="trigger">See code</span>
287
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/complex.html) -->
288
+ <!-- The below code snippet is automatically added from ./../apiExamples/complex.html -->
289
+ <pre class="language-html"><code class="language-html">&lt;auro-form id="bookingForm" class="trip-form"&gt;
290
+ &lt;!-- Cabin — auro-radio-group --&gt;
291
+ &lt;div class="form-section"&gt;
292
+ &lt;auro-radio-group required name="cabin"&gt;
293
+ &lt;span slot="legend"&gt;Cabin&lt;/span&gt;
294
+ &lt;auro-radio id="cabin-main" name="cabinChoice" label="Main" value="main" checked&gt;&lt;/auro-radio&gt;
295
+ &lt;auro-radio id="cabin-premium" name="cabinChoice" label="Premium" value="premium"&gt;&lt;/auro-radio&gt;
296
+ &lt;auro-radio id="cabin-first" name="cabinChoice" label="First class" value="first"&gt;&lt;/auro-radio&gt;
297
+ &lt;/auro-radio-group&gt;
298
+ &lt;/div&gt;
299
+ &lt;!-- Route — auro-select (from) + auro-combobox (to) --&gt;
300
+ &lt;div class="form-section"&gt;
301
+ &lt;h4 class="section-heading"&gt;Where are you going?&lt;/h4&gt;
302
+ &lt;div class="field-row"&gt;
303
+ &lt;auro-select required name="departureAirport"&gt;
304
+ &lt;span slot="label"&gt;From&lt;/span&gt;
305
+ &lt;span slot="bib.fullscreen.headline"&gt;Choose a departure city&lt;/span&gt;
306
+ &lt;auro-menu&gt;
307
+ &lt;auro-menuoption value="SEA"&gt;Seattle (SEA)&lt;/auro-menuoption&gt;
308
+ &lt;auro-menuoption value="PDX"&gt;Portland (PDX)&lt;/auro-menuoption&gt;
309
+ &lt;auro-menuoption value="SFO"&gt;San Francisco (SFO)&lt;/auro-menuoption&gt;
310
+ &lt;auro-menuoption value="LAX"&gt;Los Angeles (LAX)&lt;/auro-menuoption&gt;
311
+ &lt;auro-menuoption value="ANC"&gt;Anchorage (ANC)&lt;/auro-menuoption&gt;
312
+ &lt;/auro-menu&gt;
313
+ &lt;/auro-select&gt;
314
+ &lt;auro-combobox required name="destination"&gt;
315
+ &lt;span slot="label"&gt;To&lt;/span&gt;
316
+ &lt;span slot="bib.fullscreen.headline"&gt;Search destinations&lt;/span&gt;
317
+ &lt;auro-menu&gt;
318
+ &lt;auro-menuoption value="HNL"&gt;Honolulu (HNL)&lt;/auro-menuoption&gt;
319
+ &lt;auro-menuoption value="OGG"&gt;Maui (OGG)&lt;/auro-menuoption&gt;
320
+ &lt;auro-menuoption value="JFK"&gt;New York (JFK)&lt;/auro-menuoption&gt;
321
+ &lt;auro-menuoption value="ORD"&gt;Chicago (ORD)&lt;/auro-menuoption&gt;
322
+ &lt;auro-menuoption value="DFW"&gt;Dallas–Fort Worth (DFW)&lt;/auro-menuoption&gt;
323
+ &lt;auro-menuoption static nomatch&gt;No matching destinations&lt;/auro-menuoption&gt;
324
+ &lt;/auro-menu&gt;
325
+ &lt;/auro-combobox&gt;
326
+ &lt;/div&gt;
327
+ &lt;/div&gt;
328
+ &lt;!-- When &amp; who — auro-datepicker (range) + auro-counter-group --&gt;
329
+ &lt;div class="form-section"&gt;
330
+ &lt;h4 class="section-heading"&gt;When and who?&lt;/h4&gt;
331
+ &lt;div class="field-row"&gt;
332
+ &lt;auro-datepicker required range name="travelDates"&gt;
333
+ &lt;span slot="fromLabel"&gt;Departure&lt;/span&gt;
334
+ &lt;span slot="toLabel"&gt;Return&lt;/span&gt;
335
+ &lt;span slot="bib.fullscreen.fromLabel"&gt;Departure&lt;/span&gt;
336
+ &lt;span slot="bib.fullscreen.toLabel"&gt;Return&lt;/span&gt;
337
+ &lt;/auro-datepicker&gt;
338
+ &lt;auro-counter-group isDropdown max="9" name="travelers"&gt;
339
+ &lt;div slot="label"&gt;Travelers&lt;/div&gt;
340
+ &lt;span slot="bib.fullscreen.headline"&gt;Travelers&lt;/span&gt;
341
+ &lt;span slot="ariaLabel.bib.close"&gt;Close&lt;/span&gt;
342
+ &lt;auro-counter name="adults" min="1" max="9" value="1"&gt;
343
+ Adults
344
+ &lt;span slot="description"&gt;Age 18+&lt;/span&gt;
345
+ &lt;/auro-counter&gt;
346
+ &lt;auro-counter name="children" min="0" max="8" value="0"&gt;
347
+ Children
348
+ &lt;span slot="description"&gt;Age 2–17&lt;/span&gt;
349
+ &lt;/auro-counter&gt;
350
+ &lt;auro-counter name="infants" min="0" max="4" value="0"&gt;
351
+ Lap infants
352
+ &lt;span slot="description"&gt;Under 2&lt;/span&gt;
353
+ &lt;/auro-counter&gt;
354
+ &lt;/auro-counter-group&gt;
355
+ &lt;/div&gt;
356
+ &lt;/div&gt;
357
+ &lt;!-- Lead traveler — auro-input --&gt;
358
+ &lt;div class="form-section"&gt;
359
+ &lt;h4 class="section-heading"&gt;Lead traveler&lt;/h4&gt;
360
+ &lt;div class="field-row"&gt;
361
+ &lt;auro-input id="first-name" name="firstName" required&gt;
362
+ &lt;span slot="label"&gt;First name&lt;/span&gt;
363
+ &lt;/auro-input&gt;
364
+ &lt;auro-input id="last-name" name="lastName" required&gt;
365
+ &lt;span slot="label"&gt;Last name&lt;/span&gt;
366
+ &lt;/auro-input&gt;
367
+ &lt;auro-input id="email" name="email" type="email" class="span-2" required&gt;
368
+ &lt;span slot="label"&gt;Email&lt;/span&gt;
369
+ &lt;span slot="helpText"&gt;We'll send your confirmation here.&lt;/span&gt;
370
+ &lt;/auro-input&gt;
371
+ &lt;/div&gt;
372
+ &lt;/div&gt;
373
+ &lt;!-- Extras — auro-checkbox-group --&gt;
374
+ &lt;div class="form-section"&gt;
375
+ &lt;auro-checkbox-group name="extras"&gt;
376
+ &lt;span slot="legend"&gt;Add to your trip (optional)&lt;/span&gt;
377
+ &lt;auro-checkbox id="extra-bags" value="bags"&gt;First checked bag&lt;/auro-checkbox&gt;
378
+ &lt;auro-checkbox id="extra-insurance" value="insurance"&gt;Travel insurance&lt;/auro-checkbox&gt;
379
+ &lt;auro-checkbox id="extra-lounge" value="lounge"&gt;Alaska Lounge+ day pass&lt;/auro-checkbox&gt;
380
+ &lt;/auro-checkbox-group&gt;
381
+ &lt;/div&gt;
382
+ &lt;div class="form-actions"&gt;
383
+ &lt;auro-button type="reset" variant="secondary"&gt;Reset&lt;/auro-button&gt;
384
+ &lt;auro-button type="submit"&gt;Search flights&lt;/auro-button&gt;
385
+ &lt;/div&gt;
386
+ &lt;/auro-form&gt;
387
+ &lt;output id="bookingFormOutput" aria-live="polite"&gt;Fill in the required fields and submit to see the collected form value. Notice the shapes each field contributes — &lt;code&gt;travelDates&lt;/code&gt; as a two-item &lt;code&gt;[departure, return]&lt;/code&gt; array, &lt;code&gt;travelers&lt;/code&gt; as an object keyed by counter name, &lt;code&gt;extras&lt;/code&gt; as an array, and &lt;code&gt;cabin&lt;/code&gt; as the selected value.&lt;/output&gt;
388
+ &lt;style&gt;
389
+ #bookingFormOutput {
390
+ display: block;
391
+ margin-top: 2rem;
392
+ padding: 1rem 1.25rem;
393
+ border-left: 4px solid #2a2a2a;
394
+ border-radius: 0.25rem;
395
+ background: #f5f5f5;
396
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
397
+ font-size: 0.875rem;
398
+ white-space: pre-wrap;
399
+ }
400
+
401
+ .trip-form {
402
+ display: block;
403
+ padding: 1.5rem;
404
+ border: 1px solid #2a2a2a;
405
+ border-radius: 1rem;
406
+ }
407
+
408
+ .trip-form .form-section {
409
+ margin-top: 1.5rem;
410
+ }
411
+
412
+ .trip-form .form-section:first-of-type {
413
+ margin-top: 0;
414
+ }
415
+
416
+ .trip-form .section-heading {
417
+ margin: 0 0 0.75rem;
418
+ }
419
+
420
+ .trip-form .field-row {
421
+ display: grid;
422
+ grid-template-columns: 1fr 1fr;
423
+ gap: 1rem;
424
+ align-items: start;
425
+ }
426
+
427
+ .trip-form .field-row + .field-row {
428
+ margin-top: 1rem;
429
+ }
430
+
431
+ .trip-form .span-2 {
432
+ grid-column: span 2;
433
+ }
434
+
435
+ @media (max-width: 660px) {
436
+ .trip-form .field-row {
437
+ grid-template-columns: 1fr;
438
+ }
439
+
440
+ .trip-form .span-2 {
441
+ grid-column: span 1;
442
+ }
443
+ }
444
+
445
+ .trip-form .form-actions {
446
+ display: flex;
447
+ justify-content: flex-end;
448
+ gap: 1rem;
449
+ margin-top: 2rem;
450
+ }
451
+ &lt;/style&gt;</code></pre>
452
+ <!-- AURO-GENERATED-CONTENT:END -->
453
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/complex.js) -->
454
+ <!-- The below code snippet is automatically added from ./../apiExamples/complex.js -->
455
+ <pre class="language-js"><code class="language-js">/* eslint-disable jsdoc/require-jsdoc */
456
+
457
+ /**
458
+ * Displays the collected value of the complex booking form on submit, mirroring
459
+ * the Disabled Fields example. Every field in this form — including the cabin
460
+ * radio group — is collected into `form.value` automatically by `auro-form`; no
461
+ * per-field wiring is needed.
462
+ */
463
+ export async function complexExample() {
464
+ await customElements.whenDefined('auro-form');
465
+
466
+ const form = document.querySelector('#bookingForm');
467
+ if (!form) {
468
+ throw new Error('complexExample: #bookingForm not yet rendered');
469
+ }
470
+
471
+ const output = document.querySelector('#bookingFormOutput');
472
+ if (!output) {
473
+ throw new Error('complexExample: #bookingFormOutput not yet rendered');
474
+ }
475
+
476
+ await form.updateComplete;
477
+
478
+ form.addEventListener('submit', (event) =&gt; {
479
+ output.textContent = JSON.stringify(event.detail.value, null, 2);
480
+ });
481
+ }</code></pre>
482
+ <!-- AURO-GENERATED-CONTENT:END -->
483
+ </auro-accordion>
484
+ </section>
485
+ <section>
486
+ <auro-header level="2" id="fieldState">Field State</auro-header>
487
+ <p>Per the <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/disabled" target="_blank">HTML spec</auro-hyperlink>, form controls with the <code>disabled</code> attribute are excluded from form submission and are not validated. <code>auro-form</code> mirrors that behavior.</p>
488
+ <auro-header level="3" id="disabledFields">Disabled Fields</auro-header>
489
+ <p>When a child form element has the <code>disabled</code> attribute:</p>
490
+ <ul>
491
+ <li>Its <code>name</code> is omitted from <code>form.value</code> and from the <code>submit</code> event's <code>detail.value</code>, even if the element carries a value.</li>
492
+ <li>It does not contribute to <code>validity</code> — a disabled <code>required</code> field will not block submission.</li>
493
+ <li>A disabled field carrying its <strong>default</strong> (attribute-declared) value does not taint <code>isInitialState</code> — the form is still in its initial state. However, a field that the user has already edited and then becomes disabled <em>does</em> still count toward the form being non-initial. Disabling a field does not clear its dirty state, matching HTML's <code>dirtyValueFlag</code> semantics.</li>
494
+ </ul>
495
+ <p>In the example below the Mileage Plan number is preset and disabled. Fill in the remaining required fields and submit the form — the output region below the form will show the contents of the <code>submit</code> event's <code>detail.value</code>. Notice that only <code>firstName</code> and <code>lastName</code> appear; <code>loyaltyNumber</code> is omitted even though the field has a value. See the <auro-hyperlink href="#behaviorChangesV6">Behavior changes in v6</auro-hyperlink> section below for the full set of migration notes, including the recommended replacement for using <code>disabled</code> to carry values through to submission.</p>
496
+ <div class="exampleWrapper">
497
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
498
+ <!-- The below content is automatically added from ./../apiExamples/disabled.html -->
499
+ <auro-form id="disabledExampleForm">
145
500
  <auro-input id="first-name" name="firstName" required>
146
501
  <span slot="label">First Name</span>
147
502
  </auro-input>
@@ -150,58 +505,34 @@
150
505
  <span slot="label">Last Name</span>
151
506
  </auro-input>
152
507
  <br />
153
- <auro-input id="occupation" name="occupation" required>
154
- <span slot="label">Occupation</span>
508
+ <auro-input id="loyalty-number" name="loyaltyNumber" value="AS-123456" disabled>
509
+ <span slot="label">Mileage Plan number</span>
510
+ <span slot="helpText">Account number is read-only and is not submitted with the form.</span>
155
511
  </auro-input>
156
512
  <br />
157
- <auro-input-two id="cool-fact" name="coolFact" required>
158
- <span slot="label">Cool Fact</span>
159
- </auro-input-two>
160
- <div class="datepickerBlock">
161
- <h4>Pick a cool date</h4>
162
- <auro-datepicker id="date-example" name="dateExample" required>
163
- <span slot="fromLabel">Choose a date</span>
164
- <span slot="bib.fullscreen.fromLabel">Choose a date</span>
165
- </auro-datepicker>
166
- </div>
167
- <div class="datepickerBlock">
168
- <h4>Pick a date range</h4>
169
- <auro-datepicker id="date-range" name="dateRange" required range>
170
- <span slot="fromLabel">Start</span>
171
- <span slot="toLabel">End</span>
172
- <span slot="bib.fullscreen.fromLabel">Start</span>
173
- <span slot="bib.fullscreen.toLabel">End</span>
174
- </auro-datepicker>
175
- </div>
176
- <div class="submitBlock">
177
- <auro-button type="reset">Reset</auro-button>
178
513
  <auro-button type="submit">Submit</auro-button>
179
- </div>
180
- </auro-form>
514
+ </auro-form>
515
+ <output id="disabledExampleOutput" aria-live="polite">Submit the form to see what data gets stored.</output>
516
+ <style>
517
+ #disabledExampleOutput {
518
+ display: block;
519
+ margin-top: 2rem;
520
+ padding: 1rem 1.25rem;
521
+ border-left: 4px solid #2a2a2a;
522
+ border-radius: 0.25rem;
523
+ background: #f5f5f5;
524
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
525
+ font-size: 0.875rem;
526
+ white-space: pre-wrap;
527
+ }
528
+ </style>
181
529
  <!-- AURO-GENERATED-CONTENT:END -->
182
530
  </div>
183
531
  <auro-accordion alignRight>
184
532
  <span slot="trigger">See code</span>
185
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/complex.html) -->
186
- <!-- The below code snippet is automatically added from ./../apiExamples/complex.html -->
187
- <pre class="language-html"><code class="language-html">&lt;style&gt;
188
- .submitBlock {
189
- margin-top: 1rem;
190
- display: flex;
191
- justify-content: flex-end;
192
- gap: 1rem;
193
- }
194
- .datepickerBlock {
195
- margin-top: 1rem;
196
- }
197
- .complex-form {
198
- display: block;
199
- padding: 1rem;
200
- border: 1px solid #2a2a2a;
201
- border-radius: 1rem;
202
- }
203
- &lt;/style&gt;
204
- &lt;auro-form class="complex-form"&gt;
533
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
534
+ <!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
535
+ <pre class="language-html"><code class="language-html">&lt;auro-form id="disabledExampleForm"&gt;
205
536
  &lt;auro-input id="first-name" name="firstName" required&gt;
206
537
  &lt;span slot="label"&gt;First Name&lt;/span&gt;
207
538
  &lt;/auro-input&gt;
@@ -210,36 +541,105 @@
210
541
  &lt;span slot="label"&gt;Last Name&lt;/span&gt;
211
542
  &lt;/auro-input&gt;
212
543
  &lt;br /&gt;
213
- &lt;auro-input id="occupation" name="occupation" required&gt;
214
- &lt;span slot="label"&gt;Occupation&lt;/span&gt;
544
+ &lt;auro-input id="loyalty-number" name="loyaltyNumber" value="AS-123456" disabled&gt;
545
+ &lt;span slot="label"&gt;Mileage Plan number&lt;/span&gt;
546
+ &lt;span slot="helpText"&gt;Account number is read-only and is not submitted with the form.&lt;/span&gt;
215
547
  &lt;/auro-input&gt;
216
548
  &lt;br /&gt;
217
- &lt;auro-input-two id="cool-fact" name="coolFact" required&gt;
218
- &lt;span slot="label"&gt;Cool Fact&lt;/span&gt;
219
- &lt;/auro-input-two&gt;
220
- &lt;div class="datepickerBlock"&gt;
221
- &lt;h4&gt;Pick a cool date&lt;/h4&gt;
222
- &lt;auro-datepicker id="date-example" name="dateExample" required&gt;
223
- &lt;span slot="fromLabel"&gt;Choose a date&lt;/span&gt;
224
- &lt;span slot="bib.fullscreen.fromLabel"&gt;Choose a date&lt;/span&gt;
225
- &lt;/auro-datepicker&gt;
226
- &lt;/div&gt;
227
- &lt;div class="datepickerBlock"&gt;
228
- &lt;h4&gt;Pick a date range&lt;/h4&gt;
229
- &lt;auro-datepicker id="date-range" name="dateRange" required range&gt;
230
- &lt;span slot="fromLabel"&gt;Start&lt;/span&gt;
231
- &lt;span slot="toLabel"&gt;End&lt;/span&gt;
232
- &lt;span slot="bib.fullscreen.fromLabel"&gt;Start&lt;/span&gt;
233
- &lt;span slot="bib.fullscreen.toLabel"&gt;End&lt;/span&gt;
234
- &lt;/auro-datepicker&gt;
235
- &lt;/div&gt;
236
- &lt;div class="submitBlock"&gt;
237
- &lt;auro-button type="reset"&gt;Reset&lt;/auro-button&gt;
238
- &lt;auro-button type="submit"&gt;Submit&lt;/auro-button&gt;
239
- &lt;/div&gt;
240
- &lt;/auro-form&gt;</code></pre>
549
+ &lt;auro-button type="submit"&gt;Submit&lt;/auro-button&gt;
550
+ &lt;/auro-form&gt;
551
+ &lt;output id="disabledExampleOutput" aria-live="polite"&gt;Submit the form to see what data gets stored.&lt;/output&gt;
552
+ &lt;style&gt;
553
+ #disabledExampleOutput {
554
+ display: block;
555
+ margin-top: 2rem;
556
+ padding: 1rem 1.25rem;
557
+ border-left: 4px solid #2a2a2a;
558
+ border-radius: 0.25rem;
559
+ background: #f5f5f5;
560
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
561
+ font-size: 0.875rem;
562
+ white-space: pre-wrap;
563
+ }
564
+ &lt;/style&gt;</code></pre>
565
+ <!-- AURO-GENERATED-CONTENT:END -->
566
+ </auro-accordion>
567
+ <auro-header level="3" id="disableAfterEdit">Disabling a field after user edits</auro-header>
568
+ <p>If a field is disabled <em>after</em> the user has edited it, the value is still excluded from <code>form.value</code>, validation, and the submit payload — but the form correctly reports as non-initial and Reset remains enabled. Type into the field below, then click "Disable field" to observe the behavior. Submit to see the form's current <code>value</code> and <code>isInitialState</code>.</p>
569
+ <div class="exampleWrapper">
570
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled-after-edit.html) -->
571
+ <!-- The below content is automatically added from ./../apiExamples/disabled-after-edit.html -->
572
+ <auro-form id="disableAfterEditForm">
573
+ <auro-input id="dae-field" name="comment">
574
+ <span slot="label">Comment</span>
575
+ </auro-input>
576
+ <br />
577
+ <auro-button id="dae-toggle" type="button">Disable field</auro-button>
578
+ <auro-button type="submit">Submit</auro-button>
579
+ <auro-button type="reset">Reset</auro-button>
580
+ </auro-form>
581
+ <output id="disableAfterEditOutput" aria-live="polite">Type something, then click "Disable field". The form correctly reports as non-initial, Reset stays enabled, and the field is excluded from the submit payload.</output>
582
+ <style>
583
+ #disableAfterEditOutput {
584
+ display: block;
585
+ margin-top: 2rem;
586
+ padding: 1rem 1.25rem;
587
+ border-left: 4px solid #2a2a2a;
588
+ border-radius: 0.25rem;
589
+ background: #f5f5f5;
590
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
591
+ font-size: 0.875rem;
592
+ white-space: pre-wrap;
593
+ }
594
+ </style>
595
+ <!-- AURO-GENERATED-CONTENT:END -->
596
+ </div>
597
+ <auro-accordion alignRight>
598
+ <span slot="trigger">See code</span>
599
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled-after-edit.html) -->
600
+ <!-- The below code snippet is automatically added from ./../apiExamples/disabled-after-edit.html -->
601
+ <pre class="language-html"><code class="language-html">&lt;auro-form id="disableAfterEditForm"&gt;
602
+ &lt;auro-input id="dae-field" name="comment"&gt;
603
+ &lt;span slot="label"&gt;Comment&lt;/span&gt;
604
+ &lt;/auro-input&gt;
605
+ &lt;br /&gt;
606
+ &lt;auro-button id="dae-toggle" type="button"&gt;Disable field&lt;/auro-button&gt;
607
+ &lt;auro-button type="submit"&gt;Submit&lt;/auro-button&gt;
608
+ &lt;auro-button type="reset"&gt;Reset&lt;/auro-button&gt;
609
+ &lt;/auro-form&gt;
610
+ &lt;output id="disableAfterEditOutput" aria-live="polite"&gt;Type something, then click "Disable field". The form correctly reports as non-initial, Reset stays enabled, and the field is excluded from the submit payload.&lt;/output&gt;
611
+ &lt;style&gt;
612
+ #disableAfterEditOutput {
613
+ display: block;
614
+ margin-top: 2rem;
615
+ padding: 1rem 1.25rem;
616
+ border-left: 4px solid #2a2a2a;
617
+ border-radius: 0.25rem;
618
+ background: #f5f5f5;
619
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
620
+ font-size: 0.875rem;
621
+ white-space: pre-wrap;
622
+ }
623
+ &lt;/style&gt;</code></pre>
241
624
  <!-- AURO-GENERATED-CONTENT:END -->
242
625
  </auro-accordion>
626
+ <auro-header level="3" id="behaviorChangesV6">Behavior changes in v6</auro-header>
627
+ <p>This release brings <code>auro-form</code> closer to native HTML form semantics. The following are consumer-visible behavior changes from previous versions:</p>
628
+ <ul>
629
+ <li><strong><code>form.value</code> omits disabled fields.</strong> Any control with the <code>disabled</code> attribute is excluded from <code>form.value</code> and from the <code>submit</code> event's <code>detail.value</code>. <em>Migration:</em> if you were using <code>disabled</code> on a populated field to carry a value through to submission (for example, a read-only account number or a preset reference id), switch that field to <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/hidden"><code>&lt;input type="hidden"&gt;</code></a> — hidden inputs are submitted with the form even though they are not interactive, which is the native pattern for "include this value, but don't show or validate it."</li>
630
+ <li><strong>Disabled required fields no longer block submission.</strong> A form whose only invalid field is a <code>disabled</code> + <code>required</code> field is now submittable. Per the HTML spec, disabled controls do not participate in constraint validation.</li>
631
+ <li><strong><code>isInitialState</code> uses a dirty-value-flag model.</strong> A field taints the form only when its current value diverges from its captured initial value (or enters an error validity state). A pre-filled form whose user has not yet edited anything reports <code>isInitialState === true</code>; previously, any non-null value would mark the form as non-initial. Disabling a previously-edited field does <em>not</em> clear the dirty flag — the form correctly remains non-initial. <em>Migration:</em> if you were using <code>isInitialState === false</code> as a proxy for "user has interacted with the form," use a per-field <code>touched</code> signal on each <code>auro-input</code> instead.</li>
632
+ <li><strong>Submit availability depends on validity alone.</strong> The Submit button is enabled when no enabled field has an unmet constraint, regardless of <code>isInitialState</code>. Pre-filled valid forms (for example, forms pre-populated from a logged-in user's profile) can be submitted on first render without a prior user edit. Empty forms with only optional fields also have Submit enabled at first render. Previously both cases would have been blocked.</li>
633
+ <li><strong>Focus/blur on an optional field no longer taints the form.</strong> Tabbing through an optional field that the user did not edit no longer flips <code>isInitialState</code> to <code>false</code>. Required fields are unaffected — focusing then blurring an empty required field still taints, because the resulting <code>'valueMissing'</code> validity is an error state. <em>Migration:</em> if you needed "user has engaged with the form" as a signal, use per-field <code>touched</code> state on each <code>auro-input</code>.</li>
634
+ </ul>
635
+ <auro-header level="3" id="runtimeMutations">Runtime DOM mutations</auro-header>
636
+ <p><code>auro-form</code> tracks its child form elements through a subtree <code>MutationObserver</code> on <code>name</code> and <code>disabled</code> attributes, plus a slot-change listener. The following runtime patterns are supported without any consumer-side reinitialization:</p>
637
+ <ul>
638
+ <li><strong>Runtime renames.</strong> Changing the <code>name</code> attribute on a tracked field re-keys <code>formState</code> and migrates the captured initial value to the new key, preserving <code>isInitialState</code> semantics across the rename. <code>form.value</code> reflects the new key on the next render. Removing the <code>name</code> attribute drops the field from <code>formState</code> and prunes its captured initial.</li>
639
+ <li><strong>Late name attachment.</strong> An element that initially renders without a <code>name</code> is invisible to <code>auro-form</code> (it queries via <code>form</code>). When the consumer adds a <code>name</code> attribute later, the field is picked up automatically — both <code>formState</code> registration and the <code>input</code>/<code>auroFormElement-validated</code>/<code>keydown</code> listeners are wired up via the same attribute observer.</li>
640
+ <li><strong>Reset gating.</strong> The Reset button is enabled whenever the form is dirty (<code>isInitialState === false</code>), or any non-disabled field carries a current or default value. A disabled field carrying only its captured initial value does <em>not</em> enable Reset; a previously-edited field that has since been disabled <em>does</em> (the dirty flag persists across disabling, so the user always has a UI path back to the initial state).</li>
641
+ <li><strong>Enter-to-submit on disabled fields.</strong> Pressing Enter inside a disabled form field never submits the form, matching native HTML behavior. Disabled controls do not dispatch the implicit submit, so the user must move focus to an enabled field (or click Submit) to trigger submission.</li>
642
+ </ul>
243
643
  </section>
244
644
  </div>
245
645
  </div>