@aurodesignsystem-dev/auro-formkit 0.0.0-pr1507.0 → 0.0.0-pr1508.1
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/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/customize.html +1 -2
- package/components/checkbox/demo/customize.min.js +8 -6
- package/components/checkbox/demo/getting-started.min.js +8 -6
- package/components/checkbox/demo/index.min.js +8 -6
- package/components/checkbox/dist/index.js +8 -6
- package/components/checkbox/dist/registered.js +8 -6
- package/components/combobox/demo/customize.html +1 -2
- package/components/combobox/demo/customize.md +105 -137
- package/components/combobox/demo/customize.min.js +506 -568
- package/components/combobox/demo/getting-started.min.js +506 -564
- package/components/combobox/demo/index.min.js +506 -564
- package/components/combobox/demo/keyboard-behavior.md +2 -142
- package/components/combobox/demo/why-combobox.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +30 -14
- package/components/combobox/dist/index.js +505 -563
- package/components/combobox/dist/registered.js +505 -563
- package/components/counter/demo/customize.min.js +26 -8
- package/components/counter/demo/index.min.js +26 -8
- package/components/counter/dist/index.js +26 -8
- package/components/counter/dist/registered.js +26 -8
- package/components/datepicker/demo/accessibility.md +2 -1
- package/components/datepicker/demo/api.md +65 -62
- package/components/datepicker/demo/customize.md +150 -39
- package/components/datepicker/demo/customize.min.js +988 -500
- package/components/datepicker/demo/index.min.js +988 -482
- package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +20 -3
- package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +121 -7
- package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +80 -5
- package/components/datepicker/dist/blackoutUtils.d.ts +43 -0
- package/components/datepicker/dist/index.js +988 -482
- package/components/datepicker/dist/registered.js +988 -482
- package/components/dropdown/demo/customize.min.js +10 -1
- package/components/dropdown/demo/getting-started.min.js +10 -1
- package/components/dropdown/demo/index.min.js +10 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +1 -0
- package/components/dropdown/dist/index.js +10 -1
- package/components/dropdown/dist/registered.js +10 -1
- package/components/form/demo/customize.html +6 -6
- package/components/form/demo/customize.md +203 -51
- package/components/form/demo/customize.min.js +2357 -1419
- package/components/form/demo/getting-started.min.js +2285 -1419
- package/components/form/demo/index.min.js +2285 -1419
- package/components/form/demo/registerDemoDeps.min.js +1922 -1382
- package/components/form/dist/auro-form.d.ts +122 -4
- package/components/form/dist/index.js +363 -37
- package/components/form/dist/registered.js +363 -37
- package/components/input/demo/api.md +5 -5
- package/components/input/demo/customize.html +1 -2
- package/components/input/demo/customize.md +62 -61
- package/components/input/demo/customize.min.js +177 -241
- package/components/input/demo/getting-started.min.js +177 -241
- package/components/input/demo/index.min.js +177 -241
- package/components/input/dist/base-input.d.ts +34 -93
- package/components/input/dist/index.js +190 -242
- package/components/input/dist/registered.js +177 -241
- package/components/radio/demo/customize.min.js +8 -6
- package/components/radio/demo/getting-started.min.js +8 -6
- package/components/radio/demo/index.min.js +8 -6
- package/components/radio/dist/index.js +8 -6
- package/components/radio/dist/registered.js +8 -6
- package/components/select/demo/customize.html +1 -2
- package/components/select/demo/customize.md +86 -0
- package/components/select/demo/customize.min.js +202 -68
- package/components/select/demo/getting-started.min.js +204 -115
- package/components/select/demo/index.min.js +202 -68
- package/components/select/demo/keyboard-behavior.md +18 -4
- package/components/select/dist/auro-select.d.ts +20 -8
- package/components/select/dist/index.js +202 -68
- package/components/select/dist/registered.js +202 -68
- package/custom-elements.json +1035 -604
- package/package.json +6 -2
- package/components/checkbox/demo/customize.js +0 -22
- package/components/checkbox/demo/demo-support.js +0 -1
- package/components/checkbox/demo/getting-started.js +0 -22
- package/components/checkbox/demo/index.js +0 -8
- package/components/checkbox/demo/styles.scss +0 -1
- package/components/combobox/demo/customize.js +0 -24
- package/components/combobox/demo/demo-support.js +0 -1
- package/components/combobox/demo/getting-started.js +0 -21
- package/components/combobox/demo/index.js +0 -23
- package/components/combobox/demo/styles.scss +0 -1
- package/components/counter/demo/customize.js +0 -21
- package/components/counter/demo/demo-support.js +0 -1
- package/components/counter/demo/index.js +0 -21
- package/components/counter/demo/styles.scss +0 -1
- package/components/datepicker/demo/customize.js +0 -19
- package/components/datepicker/demo/demo-support.js +0 -1
- package/components/datepicker/demo/index.js +0 -23
- package/components/datepicker/demo/styles.scss +0 -1
- package/components/dropdown/demo/customize.js +0 -9
- package/components/dropdown/demo/demo-support.js +0 -1
- package/components/dropdown/demo/getting-started.js +0 -9
- package/components/dropdown/demo/index.js +0 -16
- package/components/dropdown/demo/styles.scss +0 -1
- package/components/form/demo/customize.js +0 -9
- package/components/form/demo/demo-support.js +0 -1
- package/components/form/demo/getting-started.js +0 -9
- package/components/form/demo/index.js +0 -5
- package/components/form/demo/registerDemoDeps.js +0 -23
- package/components/form/demo/styles.scss +0 -1
- package/components/input/demo/customize.js +0 -25
- package/components/input/demo/demo-support.js +0 -1
- package/components/input/demo/getting-started.js +0 -8
- package/components/input/demo/index.js +0 -8
- package/components/input/demo/styles.css +0 -974
- package/components/input/demo/styles.scss +0 -1
- package/components/menu/demo/demo-support.js +0 -1
- package/components/menu/demo/index.js +0 -25
- package/components/menu/demo/styles.scss +0 -1
- package/components/radio/demo/customize.js +0 -22
- package/components/radio/demo/demo-support.js +0 -1
- package/components/radio/demo/getting-started.js +0 -24
- package/components/radio/demo/index.js +0 -8
- package/components/radio/demo/styles.scss +0 -1
- package/components/select/demo/customize.js +0 -11
- package/components/select/demo/demo-support.js +0 -1
- package/components/select/demo/getting-started.js +0 -26
- package/components/select/demo/index.js +0 -11
- package/components/select/demo/styles.scss +0 -1
- /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +0 -0
- /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
- /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +0 -0
|
@@ -3942,7 +3942,7 @@ class AuroHelpText extends i {
|
|
|
3942
3942
|
}
|
|
3943
3943
|
}
|
|
3944
3944
|
|
|
3945
|
-
var formkitVersion = '
|
|
3945
|
+
var formkitVersion = '202607010100';
|
|
3946
3946
|
|
|
3947
3947
|
class AuroElement extends i {
|
|
3948
3948
|
static get properties() {
|
|
@@ -4893,6 +4893,14 @@ class AuroDropdown extends AuroElement {
|
|
|
4893
4893
|
};
|
|
4894
4894
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
4895
4895
|
|
|
4896
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
4897
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
4898
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
4899
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
4900
|
+
// user can press Tab.
|
|
4901
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
4902
|
+
this.noHideOnThisFocusLoss = true;
|
|
4903
|
+
|
|
4896
4904
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
4897
4905
|
requestAnimationFrame(() => {
|
|
4898
4906
|
const focusables = getFocusableElements(this.bibContent);
|
|
@@ -5206,6 +5214,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5206
5214
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5207
5215
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5208
5216
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5217
|
+
aria-haspopup="${o(this.a11yRole === 'combobox' && !this.triggerContentFocusable ? 'listbox' : undefined)}"
|
|
5209
5218
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5210
5219
|
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
5211
5220
|
@focusin="${this.handleFocusin}"
|
|
@@ -3942,7 +3942,7 @@ class AuroHelpText extends i {
|
|
|
3942
3942
|
}
|
|
3943
3943
|
}
|
|
3944
3944
|
|
|
3945
|
-
var formkitVersion = '
|
|
3945
|
+
var formkitVersion = '202607010100';
|
|
3946
3946
|
|
|
3947
3947
|
class AuroElement extends i {
|
|
3948
3948
|
static get properties() {
|
|
@@ -4893,6 +4893,14 @@ class AuroDropdown extends AuroElement {
|
|
|
4893
4893
|
};
|
|
4894
4894
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
4895
4895
|
|
|
4896
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
4897
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
4898
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
4899
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
4900
|
+
// user can press Tab.
|
|
4901
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
4902
|
+
this.noHideOnThisFocusLoss = true;
|
|
4903
|
+
|
|
4896
4904
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
4897
4905
|
requestAnimationFrame(() => {
|
|
4898
4906
|
const focusables = getFocusableElements(this.bibContent);
|
|
@@ -5206,6 +5214,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5206
5214
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5207
5215
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5208
5216
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5217
|
+
aria-haspopup="${o(this.a11yRole === 'combobox' && !this.triggerContentFocusable ? 'listbox' : undefined)}"
|
|
5209
5218
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5210
5219
|
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
5211
5220
|
@focusin="${this.handleFocusin}"
|
|
@@ -3969,7 +3969,7 @@ class AuroHelpText extends i {
|
|
|
3969
3969
|
}
|
|
3970
3970
|
}
|
|
3971
3971
|
|
|
3972
|
-
var formkitVersion = '
|
|
3972
|
+
var formkitVersion = '202607010100';
|
|
3973
3973
|
|
|
3974
3974
|
class AuroElement extends i {
|
|
3975
3975
|
static get properties() {
|
|
@@ -4920,6 +4920,14 @@ class AuroDropdown extends AuroElement {
|
|
|
4920
4920
|
};
|
|
4921
4921
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
4922
4922
|
|
|
4923
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
4924
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
4925
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
4926
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
4927
|
+
// user can press Tab.
|
|
4928
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
4929
|
+
this.noHideOnThisFocusLoss = true;
|
|
4930
|
+
|
|
4923
4931
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
4924
4932
|
requestAnimationFrame(() => {
|
|
4925
4933
|
const focusables = getFocusableElements(this.bibContent);
|
|
@@ -5233,6 +5241,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5233
5241
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5234
5242
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5235
5243
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5244
|
+
aria-haspopup="${o(this.a11yRole === 'combobox' && !this.triggerContentFocusable ? 'listbox' : undefined)}"
|
|
5236
5245
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5237
5246
|
aria-disabled="${o(this.disabled ? 'true' : undefined)}"
|
|
5238
5247
|
@focusin="${this.handleFocusin}"
|
|
@@ -412,6 +412,7 @@ export class AuroDropdown extends AuroElement {
|
|
|
412
412
|
private updateFocusTrap;
|
|
413
413
|
_noHideOverridden: boolean | undefined;
|
|
414
414
|
_priorNoHide: any;
|
|
415
|
+
_priorNoHideOnFocusLoss: boolean | undefined;
|
|
415
416
|
/**
|
|
416
417
|
* Returns the chain of active (focused) elements through shadow roots.
|
|
417
418
|
* @private
|
|
@@ -3874,7 +3874,7 @@ class AuroHelpText extends LitElement {
|
|
|
3874
3874
|
}
|
|
3875
3875
|
}
|
|
3876
3876
|
|
|
3877
|
-
var formkitVersion = '
|
|
3877
|
+
var formkitVersion = '202607010100';
|
|
3878
3878
|
|
|
3879
3879
|
class AuroElement extends LitElement {
|
|
3880
3880
|
static get properties() {
|
|
@@ -4825,6 +4825,14 @@ class AuroDropdown extends AuroElement {
|
|
|
4825
4825
|
};
|
|
4826
4826
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
4827
4827
|
|
|
4828
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
4829
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
4830
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
4831
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
4832
|
+
// user can press Tab.
|
|
4833
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
4834
|
+
this.noHideOnThisFocusLoss = true;
|
|
4835
|
+
|
|
4828
4836
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
4829
4837
|
requestAnimationFrame(() => {
|
|
4830
4838
|
const focusables = getFocusableElements(this.bibContent);
|
|
@@ -5138,6 +5146,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5138
5146
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5139
5147
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5140
5148
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5149
|
+
aria-haspopup="${ifDefined(this.a11yRole === 'combobox' && !this.triggerContentFocusable ? 'listbox' : undefined)}"
|
|
5141
5150
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5142
5151
|
aria-disabled="${ifDefined(this.disabled ? 'true' : undefined)}"
|
|
5143
5152
|
@focusin="${this.handleFocusin}"
|
|
@@ -3874,7 +3874,7 @@ class AuroHelpText extends LitElement {
|
|
|
3874
3874
|
}
|
|
3875
3875
|
}
|
|
3876
3876
|
|
|
3877
|
-
var formkitVersion = '
|
|
3877
|
+
var formkitVersion = '202607010100';
|
|
3878
3878
|
|
|
3879
3879
|
class AuroElement extends LitElement {
|
|
3880
3880
|
static get properties() {
|
|
@@ -4825,6 +4825,14 @@ class AuroDropdown extends AuroElement {
|
|
|
4825
4825
|
};
|
|
4826
4826
|
this.addEventListener('keydown', this._bibTabHandler);
|
|
4827
4827
|
|
|
4828
|
+
// Suppress AuroFloatingUI's auto-hide-on-focus-loss while the
|
|
4829
|
+
// desktopModal trap owns focus management. Without this, the very
|
|
4830
|
+
// first focus move into the bib (from the RAF below) triggers
|
|
4831
|
+
// handleFocusLoss → hideBib, tearing down the trap before the
|
|
4832
|
+
// user can press Tab.
|
|
4833
|
+
this._priorNoHideOnFocusLoss = this.noHideOnThisFocusLoss;
|
|
4834
|
+
this.noHideOnThisFocusLoss = true;
|
|
4835
|
+
|
|
4828
4836
|
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
4829
4837
|
requestAnimationFrame(() => {
|
|
4830
4838
|
const focusables = getFocusableElements(this.bibContent);
|
|
@@ -5138,6 +5146,7 @@ class AuroDropdown extends AuroElement {
|
|
|
5138
5146
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5139
5147
|
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5140
5148
|
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5149
|
+
aria-haspopup="${ifDefined(this.a11yRole === 'combobox' && !this.triggerContentFocusable ? 'listbox' : undefined)}"
|
|
5141
5150
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5142
5151
|
aria-disabled="${ifDefined(this.disabled ? 'true' : undefined)}"
|
|
5143
5152
|
@focusin="${this.handleFocusin}"
|
|
@@ -36,11 +36,6 @@
|
|
|
36
36
|
<body class="auro-markdown">
|
|
37
37
|
<main></main>
|
|
38
38
|
|
|
39
|
-
<script type="module">
|
|
40
|
-
import { renderPage } from './demo-support.min.js';
|
|
41
|
-
await renderPage('./customize.md');
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
39
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
45
40
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
46
41
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-nav@latest/+esm" type="module"></script>
|
|
@@ -49,6 +44,11 @@
|
|
|
49
44
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/+esm" type="module"></script>
|
|
50
45
|
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
51
46
|
|
|
52
|
-
<script
|
|
47
|
+
<script type="module" data-demo-script="true">
|
|
48
|
+
import { renderPage } from './demo-support.min.js';
|
|
49
|
+
await renderPage('./customize.md');
|
|
50
|
+
import { initExamples } from "./customize.min.js";
|
|
51
|
+
initExamples();
|
|
52
|
+
</script>
|
|
53
53
|
</body>
|
|
54
54
|
</html>
|
|
@@ -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
|
|
30
|
-
|
|
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
|
-
<
|
|
45
|
-
<
|
|
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
|
-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
<span slot="
|
|
57
|
-
<span slot="
|
|
58
|
-
<span slot="bib.fullscreen.
|
|
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
|
|
82
|
-
|
|
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,28 +90,24 @@
|
|
|
93
90
|
</style>
|
|
94
91
|
<auro-form>
|
|
95
92
|
<div class="columned-form">
|
|
96
|
-
<
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<div class="controls">
|
|
115
|
-
<auro-button type="submit">Submit</auro-button>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
93
|
+
<auro-input id="cl-first-name" name="firstName" required>
|
|
94
|
+
<span slot="label">First Name</span>
|
|
95
|
+
</auro-input>
|
|
96
|
+
<auro-input id="cl-last-name" name="lastName" required>
|
|
97
|
+
<span slot="label">Last Name</span>
|
|
98
|
+
</auro-input>
|
|
99
|
+
<auro-input id="cl-email" name="email" type="email" class="span-2" required>
|
|
100
|
+
<span slot="label">Email</span>
|
|
101
|
+
</auro-input>
|
|
102
|
+
<auro-datepicker id="cl-date-range" name="dateRange" class="span-2" required range>
|
|
103
|
+
<span slot="fromLabel">Departure</span>
|
|
104
|
+
<span slot="toLabel">Return</span>
|
|
105
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
106
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
107
|
+
</auro-datepicker>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="columned-form-controls">
|
|
110
|
+
<auro-button type="submit">Submit</auro-button>
|
|
118
111
|
</div>
|
|
119
112
|
</auro-form></code></pre>
|
|
120
113
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -241,6 +234,165 @@
|
|
|
241
234
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
242
235
|
</auro-accordion>
|
|
243
236
|
</section>
|
|
237
|
+
<section>
|
|
238
|
+
<auro-header level="2" id="fieldState">Field State</auro-header>
|
|
239
|
+
<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>
|
|
240
|
+
<auro-header level="3" id="disabledFields">Disabled Fields</auro-header>
|
|
241
|
+
<p>When a child form element has the <code>disabled</code> attribute:</p>
|
|
242
|
+
<ul>
|
|
243
|
+
<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>
|
|
244
|
+
<li>It does not contribute to <code>validity</code> — a disabled <code>required</code> field will not block submission.</li>
|
|
245
|
+
<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>
|
|
246
|
+
</ul>
|
|
247
|
+
<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>
|
|
248
|
+
<div class="exampleWrapper">
|
|
249
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
|
|
250
|
+
<!-- The below content is automatically added from ./../apiExamples/disabled.html -->
|
|
251
|
+
<auro-form id="disabledExampleForm">
|
|
252
|
+
<auro-input id="first-name" name="firstName" required>
|
|
253
|
+
<span slot="label">First Name</span>
|
|
254
|
+
</auro-input>
|
|
255
|
+
<br />
|
|
256
|
+
<auro-input id="last-name" name="lastName" required>
|
|
257
|
+
<span slot="label">Last Name</span>
|
|
258
|
+
</auro-input>
|
|
259
|
+
<br />
|
|
260
|
+
<auro-input id="loyalty-number" name="loyaltyNumber" value="AS-123456" disabled>
|
|
261
|
+
<span slot="label">Mileage Plan number</span>
|
|
262
|
+
<span slot="helpText">Account number is read-only and is not submitted with the form.</span>
|
|
263
|
+
</auro-input>
|
|
264
|
+
<br />
|
|
265
|
+
<auro-button type="submit">Submit</auro-button>
|
|
266
|
+
</auro-form>
|
|
267
|
+
<output id="disabledExampleOutput" aria-live="polite">Submit the form to see what data gets stored.</output>
|
|
268
|
+
<style>
|
|
269
|
+
#disabledExampleOutput {
|
|
270
|
+
display: block;
|
|
271
|
+
margin-top: 2rem;
|
|
272
|
+
padding: 1rem 1.25rem;
|
|
273
|
+
border-left: 4px solid #2a2a2a;
|
|
274
|
+
border-radius: 0.25rem;
|
|
275
|
+
background: #f5f5f5;
|
|
276
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
277
|
+
font-size: 0.875rem;
|
|
278
|
+
white-space: pre-wrap;
|
|
279
|
+
}
|
|
280
|
+
</style>
|
|
281
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
282
|
+
</div>
|
|
283
|
+
<auro-accordion alignRight>
|
|
284
|
+
<span slot="trigger">See code</span>
|
|
285
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
|
|
286
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
|
|
287
|
+
<pre class="language-html"><code class="language-html"><auro-form id="disabledExampleForm">
|
|
288
|
+
<auro-input id="first-name" name="firstName" required>
|
|
289
|
+
<span slot="label">First Name</span>
|
|
290
|
+
</auro-input>
|
|
291
|
+
<br />
|
|
292
|
+
<auro-input id="last-name" name="lastName" required>
|
|
293
|
+
<span slot="label">Last Name</span>
|
|
294
|
+
</auro-input>
|
|
295
|
+
<br />
|
|
296
|
+
<auro-input id="loyalty-number" name="loyaltyNumber" value="AS-123456" disabled>
|
|
297
|
+
<span slot="label">Mileage Plan number</span>
|
|
298
|
+
<span slot="helpText">Account number is read-only and is not submitted with the form.</span>
|
|
299
|
+
</auro-input>
|
|
300
|
+
<br />
|
|
301
|
+
<auro-button type="submit">Submit</auro-button>
|
|
302
|
+
</auro-form>
|
|
303
|
+
<output id="disabledExampleOutput" aria-live="polite">Submit the form to see what data gets stored.</output>
|
|
304
|
+
<style>
|
|
305
|
+
#disabledExampleOutput {
|
|
306
|
+
display: block;
|
|
307
|
+
margin-top: 2rem;
|
|
308
|
+
padding: 1rem 1.25rem;
|
|
309
|
+
border-left: 4px solid #2a2a2a;
|
|
310
|
+
border-radius: 0.25rem;
|
|
311
|
+
background: #f5f5f5;
|
|
312
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
313
|
+
font-size: 0.875rem;
|
|
314
|
+
white-space: pre-wrap;
|
|
315
|
+
}
|
|
316
|
+
</style></code></pre>
|
|
317
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
318
|
+
</auro-accordion>
|
|
319
|
+
<auro-header level="3" id="disableAfterEdit">Disabling a field after user edits</auro-header>
|
|
320
|
+
<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>
|
|
321
|
+
<div class="exampleWrapper">
|
|
322
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled-after-edit.html) -->
|
|
323
|
+
<!-- The below content is automatically added from ./../apiExamples/disabled-after-edit.html -->
|
|
324
|
+
<auro-form id="disableAfterEditForm">
|
|
325
|
+
<auro-input id="dae-field" name="comment">
|
|
326
|
+
<span slot="label">Comment</span>
|
|
327
|
+
</auro-input>
|
|
328
|
+
<br />
|
|
329
|
+
<auro-button id="dae-toggle" type="button">Disable field</auro-button>
|
|
330
|
+
<auro-button type="submit">Submit</auro-button>
|
|
331
|
+
<auro-button type="reset">Reset</auro-button>
|
|
332
|
+
</auro-form>
|
|
333
|
+
<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>
|
|
334
|
+
<style>
|
|
335
|
+
#disableAfterEditOutput {
|
|
336
|
+
display: block;
|
|
337
|
+
margin-top: 2rem;
|
|
338
|
+
padding: 1rem 1.25rem;
|
|
339
|
+
border-left: 4px solid #2a2a2a;
|
|
340
|
+
border-radius: 0.25rem;
|
|
341
|
+
background: #f5f5f5;
|
|
342
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
343
|
+
font-size: 0.875rem;
|
|
344
|
+
white-space: pre-wrap;
|
|
345
|
+
}
|
|
346
|
+
</style>
|
|
347
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
348
|
+
</div>
|
|
349
|
+
<auro-accordion alignRight>
|
|
350
|
+
<span slot="trigger">See code</span>
|
|
351
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled-after-edit.html) -->
|
|
352
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/disabled-after-edit.html -->
|
|
353
|
+
<pre class="language-html"><code class="language-html"><auro-form id="disableAfterEditForm">
|
|
354
|
+
<auro-input id="dae-field" name="comment">
|
|
355
|
+
<span slot="label">Comment</span>
|
|
356
|
+
</auro-input>
|
|
357
|
+
<br />
|
|
358
|
+
<auro-button id="dae-toggle" type="button">Disable field</auro-button>
|
|
359
|
+
<auro-button type="submit">Submit</auro-button>
|
|
360
|
+
<auro-button type="reset">Reset</auro-button>
|
|
361
|
+
</auro-form>
|
|
362
|
+
<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>
|
|
363
|
+
<style>
|
|
364
|
+
#disableAfterEditOutput {
|
|
365
|
+
display: block;
|
|
366
|
+
margin-top: 2rem;
|
|
367
|
+
padding: 1rem 1.25rem;
|
|
368
|
+
border-left: 4px solid #2a2a2a;
|
|
369
|
+
border-radius: 0.25rem;
|
|
370
|
+
background: #f5f5f5;
|
|
371
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
372
|
+
font-size: 0.875rem;
|
|
373
|
+
white-space: pre-wrap;
|
|
374
|
+
}
|
|
375
|
+
</style></code></pre>
|
|
376
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
377
|
+
</auro-accordion>
|
|
378
|
+
<auro-header level="3" id="behaviorChangesV6">Behavior changes in v6</auro-header>
|
|
379
|
+
<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>
|
|
380
|
+
<ul>
|
|
381
|
+
<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><input type="hidden"></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>
|
|
382
|
+
<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>
|
|
383
|
+
<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>
|
|
384
|
+
<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>
|
|
385
|
+
<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>
|
|
386
|
+
</ul>
|
|
387
|
+
<auro-header level="3" id="runtimeMutations">Runtime DOM mutations</auro-header>
|
|
388
|
+
<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>
|
|
389
|
+
<ul>
|
|
390
|
+
<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>
|
|
391
|
+
<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>
|
|
392
|
+
<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>
|
|
393
|
+
<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>
|
|
394
|
+
</ul>
|
|
395
|
+
</section>
|
|
244
396
|
</div>
|
|
245
397
|
</div>
|
|
246
398
|
</div>
|