@aurodesignsystem/auro-formkit 2.0.0-beta.14 → 2.0.0-beta.16

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 (204) hide show
  1. package/.turbo/cache/000950e13093845f-meta.json +1 -0
  2. package/.turbo/cache/{d4b8a79a27266a26.tar.zst → 000950e13093845f.tar.zst} +0 -0
  3. package/.turbo/cache/02ee016619902665-meta.json +1 -0
  4. package/.turbo/cache/02ee016619902665.tar.zst +0 -0
  5. package/.turbo/cache/1b97859030a6d60b-meta.json +1 -0
  6. package/.turbo/cache/1e855b2163b7c980-meta.json +1 -0
  7. package/.turbo/cache/1e855b2163b7c980.tar.zst +0 -0
  8. package/.turbo/cache/1f6653e2ed4c0087-meta.json +1 -0
  9. package/.turbo/cache/1f6653e2ed4c0087.tar.zst +0 -0
  10. package/.turbo/cache/2059bc724ac24519-meta.json +1 -0
  11. package/.turbo/cache/2059bc724ac24519.tar.zst +0 -0
  12. package/.turbo/cache/23b3a2fea223679d-meta.json +1 -0
  13. package/.turbo/cache/23b3a2fea223679d.tar.zst +0 -0
  14. package/.turbo/cache/2c0d681132c153dd-meta.json +1 -1
  15. package/.turbo/cache/31bd5687f46c7eba-meta.json +1 -0
  16. package/.turbo/cache/3488cff10dd06acd-meta.json +1 -0
  17. package/.turbo/cache/{e89dfa7c665c8763.tar.zst → 3488cff10dd06acd.tar.zst} +0 -0
  18. package/.turbo/cache/3c8718d2ba6d3fe5-meta.json +1 -0
  19. package/.turbo/cache/3c8718d2ba6d3fe5.tar.zst +0 -0
  20. package/.turbo/cache/4006a206400d5c7b-meta.json +1 -1
  21. package/.turbo/cache/43693504bf6e7c4c-meta.json +1 -0
  22. package/.turbo/cache/45cd32cd38eacbcb-meta.json +1 -0
  23. package/.turbo/cache/45cd32cd38eacbcb.tar.zst +0 -0
  24. package/.turbo/cache/492dda333b8d15f1-meta.json +1 -1
  25. package/.turbo/cache/50cd7dcfc9f820c5-meta.json +1 -1
  26. package/.turbo/cache/51eaa58d5c167de8-meta.json +1 -1
  27. package/.turbo/cache/56f2745125fdd552-meta.json +1 -0
  28. package/.turbo/cache/{5ddbe69f2cb372c5.tar.zst → 56f2745125fdd552.tar.zst} +0 -0
  29. package/.turbo/cache/5f43911cbacf7df1-meta.json +1 -0
  30. package/.turbo/cache/{32545b759b9ce644.tar.zst → 5f43911cbacf7df1.tar.zst} +0 -0
  31. package/.turbo/cache/6081837e8943b62e-meta.json +1 -1
  32. package/.turbo/cache/60ad74320c682a2b-meta.json +1 -1
  33. package/.turbo/cache/61e218aba69cff58-meta.json +1 -1
  34. package/.turbo/cache/6951c2a52e5ab5f7-meta.json +1 -0
  35. package/.turbo/cache/{35b02758b1702fa7.tar.zst → 6951c2a52e5ab5f7.tar.zst} +0 -0
  36. package/.turbo/cache/77da375a012de9d0-meta.json +1 -1
  37. package/.turbo/cache/78418f9089673a21-meta.json +1 -0
  38. package/.turbo/cache/78418f9089673a21.tar.zst +0 -0
  39. package/.turbo/cache/7964d1656e9e702a-meta.json +1 -1
  40. package/.turbo/cache/7bf2b06a479d0b30-meta.json +1 -1
  41. package/.turbo/cache/7c9ca6163e61285c-meta.json +1 -1
  42. package/.turbo/cache/80410f4b5990ab83-meta.json +1 -0
  43. package/.turbo/cache/876b8fa390c8ec81-meta.json +1 -0
  44. package/.turbo/cache/8bb856bd31b5b479-meta.json +1 -1
  45. package/.turbo/cache/8f287fd5d33579ae-meta.json +1 -0
  46. package/.turbo/cache/{4302d0f3b7325335.tar.zst → 8f287fd5d33579ae.tar.zst} +0 -0
  47. package/.turbo/cache/8f5fef3e04a6fcfa-meta.json +1 -0
  48. package/.turbo/cache/8fcce3ba8357be57-meta.json +1 -0
  49. package/.turbo/cache/8fcce3ba8357be57.tar.zst +0 -0
  50. package/.turbo/cache/9b5868be65819fdf-meta.json +1 -0
  51. package/.turbo/cache/9b5868be65819fdf.tar.zst +0 -0
  52. package/.turbo/cache/b5e6dc7fb9ae1a2f-meta.json +1 -1
  53. package/.turbo/cache/b6a202cc85cb61a0-meta.json +1 -1
  54. package/.turbo/cache/ba270a0ef147f2e5-meta.json +1 -0
  55. package/.turbo/cache/be0b95293ea517cc-meta.json +1 -1
  56. package/.turbo/cache/c03a12ff38ba1e02-meta.json +1 -0
  57. package/.turbo/cache/c03a12ff38ba1e02.tar.zst +0 -0
  58. package/.turbo/cache/c1312c6f8c051461-meta.json +1 -0
  59. package/.turbo/cache/c1312c6f8c051461.tar.zst +0 -0
  60. package/.turbo/cache/c3b2cc1b044a4135-meta.json +1 -0
  61. package/.turbo/cache/c3b2cc1b044a4135.tar.zst +0 -0
  62. package/.turbo/cache/c6c6411199b68170-meta.json +1 -1
  63. package/.turbo/cache/c6dbc49c3038946d-meta.json +1 -0
  64. package/.turbo/cache/c6dbc49c3038946d.tar.zst +0 -0
  65. package/.turbo/cache/cae7586c45bed13e-meta.json +1 -0
  66. package/.turbo/cache/cae7586c45bed13e.tar.zst +0 -0
  67. package/.turbo/cache/cf143eb1a55684db-meta.json +1 -0
  68. package/.turbo/cache/cf143eb1a55684db.tar.zst +0 -0
  69. package/.turbo/cache/d5b85352bc667f19-meta.json +1 -0
  70. package/.turbo/cache/d5b85352bc667f19.tar.zst +0 -0
  71. package/.turbo/cache/d5db503b2eaf239c-meta.json +1 -1
  72. package/.turbo/cache/d775555355d6b8fc-meta.json +1 -1
  73. package/.turbo/cache/d7c3007be148d2a1-meta.json +1 -1
  74. package/.turbo/cache/dad3d78b33edd9e4-meta.json +1 -1
  75. package/.turbo/cache/db5e65d819bfe66b-meta.json +1 -0
  76. package/.turbo/cache/{0b22557b4944c6e3.tar.zst → db5e65d819bfe66b.tar.zst} +0 -0
  77. package/.turbo/cache/dc597b3ea4f61ec8-meta.json +1 -1
  78. package/.turbo/cache/e392fe0927e4af23-meta.json +1 -0
  79. package/.turbo/cache/e392fe0927e4af23.tar.zst +0 -0
  80. package/.turbo/cache/e62cfee068e3ef36-meta.json +1 -1
  81. package/.turbo/cache/e9e36823f6c98f07-meta.json +1 -1
  82. package/.turbo/cache/ea8dd91dba19ddee-meta.json +1 -0
  83. package/.turbo/cache/ea8dd91dba19ddee.tar.zst +0 -0
  84. package/.turbo/cache/f2913bf19939d840-meta.json +1 -0
  85. package/.turbo/cache/f2913bf19939d840.tar.zst +0 -0
  86. package/.turbo/cache/f86b28e5ea2c66fe-meta.json +1 -0
  87. package/CHANGELOG.md +23 -0
  88. package/components/checkbox/.turbo/turbo-build.log +3 -3
  89. package/components/checkbox/.turbo/turbo-bundler.log +3 -3
  90. package/components/checkbox/README.md +1 -1
  91. package/components/combobox/.turbo/turbo-build.log +3 -3
  92. package/components/combobox/README.md +4 -4
  93. package/components/combobox/demo/api.min.js +2 -4
  94. package/components/combobox/demo/index.min.js +2 -4
  95. package/components/combobox/dist/index.js +1 -2
  96. package/components/counter/.turbo/turbo-build.log +3 -3
  97. package/components/counter/.turbo/turbo-bundler.log +3 -3
  98. package/components/counter/README.md +1 -1
  99. package/components/datepicker/.turbo/turbo-build.log +2 -2
  100. package/components/datepicker/README.md +4 -4
  101. package/components/dropdown/.turbo/turbo-build.log +3 -3
  102. package/components/dropdown/.turbo/turbo-bundler.log +3 -3
  103. package/components/dropdown/README.md +1 -1
  104. package/components/form/.turbo/turbo-build.log +3 -3
  105. package/components/form/.turbo/turbo-bundler.log +3 -3
  106. package/components/form/README.md +11 -9
  107. package/components/form/demo/api.min.js +187 -22
  108. package/components/form/demo/index.min.js +187 -22
  109. package/components/form/demo/registerDemoDeps.js +5 -0
  110. package/components/form/demo/working.html +86 -0
  111. package/components/form/dist/auro-form.d.ts +83 -2
  112. package/components/form/dist/auro-form.d.ts.map +1 -1
  113. package/components/form/dist/index.js +187 -22
  114. package/components/form/package.json +3 -1
  115. package/components/form/src/auro-form.js +187 -25
  116. package/components/form/src/styles/style-css.js +1 -1
  117. package/components/form/src/styles/style.css +8 -0
  118. package/components/form/src/styles/style.scss +10 -0
  119. package/components/input/.turbo/turbo-build.log +3 -3
  120. package/components/input/.turbo/turbo-bundler.log +3 -3
  121. package/components/input/README.md +1 -1
  122. package/components/menu/.turbo/turbo-build.log +3 -3
  123. package/components/menu/.turbo/turbo-bundler.log +3 -3
  124. package/components/menu/README.md +1 -1
  125. package/components/menu/demo/api.min.js +1 -2
  126. package/components/menu/demo/index.min.js +1 -2
  127. package/components/menu/dist/auro-menu.d.ts.map +1 -1
  128. package/components/menu/dist/index.js +1 -2
  129. package/components/menu/src/auro-menu.js +0 -1
  130. package/components/menu/src/styles/color-menuoption-css.js +1 -1
  131. package/components/menu/src/styles/color-menuoption.css +3 -0
  132. package/components/menu/src/styles/color-menuoption.scss +4 -0
  133. package/components/radio/.turbo/turbo-build.log +3 -3
  134. package/components/radio/.turbo/turbo-bundler.log +3 -3
  135. package/components/radio/README.md +1 -1
  136. package/components/select/.turbo/turbo-build.log +3 -3
  137. package/components/select/README.md +3 -3
  138. package/components/select/demo/api.min.js +2 -4
  139. package/components/select/demo/index.min.js +2 -4
  140. package/components/select/dist/index.js +1 -2
  141. package/package.json +1 -1
  142. package/.turbo/cache/0b22557b4944c6e3-meta.json +0 -1
  143. package/.turbo/cache/0c8124a987c1cc05-meta.json +0 -1
  144. package/.turbo/cache/0c8124a987c1cc05.tar.zst +0 -0
  145. package/.turbo/cache/1502c5fc71126643-meta.json +0 -1
  146. package/.turbo/cache/1502c5fc71126643.tar.zst +0 -0
  147. package/.turbo/cache/18129dba20f51b6b-meta.json +0 -1
  148. package/.turbo/cache/18129dba20f51b6b.tar.zst +0 -0
  149. package/.turbo/cache/1d461617c524c257-meta.json +0 -1
  150. package/.turbo/cache/1d461617c524c257.tar.zst +0 -0
  151. package/.turbo/cache/1f8549ade1f226ed-meta.json +0 -1
  152. package/.turbo/cache/2787020e69f50af2-meta.json +0 -1
  153. package/.turbo/cache/2787020e69f50af2.tar.zst +0 -0
  154. package/.turbo/cache/32545b759b9ce644-meta.json +0 -1
  155. package/.turbo/cache/34e8aaa18849b071-meta.json +0 -1
  156. package/.turbo/cache/34e8aaa18849b071.tar.zst +0 -0
  157. package/.turbo/cache/35b02758b1702fa7-meta.json +0 -1
  158. package/.turbo/cache/4302d0f3b7325335-meta.json +0 -1
  159. package/.turbo/cache/4db3f888378e8c97-meta.json +0 -1
  160. package/.turbo/cache/50993de942ec15a9-meta.json +0 -1
  161. package/.turbo/cache/50993de942ec15a9.tar.zst +0 -0
  162. package/.turbo/cache/559969de09c2dc0b-meta.json +0 -1
  163. package/.turbo/cache/559969de09c2dc0b.tar.zst +0 -0
  164. package/.turbo/cache/584cc436c8078114-meta.json +0 -1
  165. package/.turbo/cache/584cc436c8078114.tar.zst +0 -0
  166. package/.turbo/cache/5c16e68b6c2fe505-meta.json +0 -1
  167. package/.turbo/cache/5c16e68b6c2fe505.tar.zst +0 -0
  168. package/.turbo/cache/5ddbe69f2cb372c5-meta.json +0 -1
  169. package/.turbo/cache/759b0d821dae60c9-meta.json +0 -1
  170. package/.turbo/cache/76a76201dfec8a47-meta.json +0 -1
  171. package/.turbo/cache/76a76201dfec8a47.tar.zst +0 -0
  172. package/.turbo/cache/79b7301ce5cb7388-meta.json +0 -1
  173. package/.turbo/cache/8a1d75ce1555da17-meta.json +0 -1
  174. package/.turbo/cache/8a1d75ce1555da17.tar.zst +0 -0
  175. package/.turbo/cache/8aa9a0ccdac4b3f6-meta.json +0 -1
  176. package/.turbo/cache/9ae99e8e7bd83d06-meta.json +0 -1
  177. package/.turbo/cache/9ae99e8e7bd83d06.tar.zst +0 -0
  178. package/.turbo/cache/a12b45bee8b447ec-meta.json +0 -1
  179. package/.turbo/cache/a12b45bee8b447ec.tar.zst +0 -0
  180. package/.turbo/cache/a2c5639ae99f332a-meta.json +0 -1
  181. package/.turbo/cache/a2c5639ae99f332a.tar.zst +0 -0
  182. package/.turbo/cache/ab77cb0b089f1928-meta.json +0 -1
  183. package/.turbo/cache/b30c78f2c15f720d-meta.json +0 -1
  184. package/.turbo/cache/b30c78f2c15f720d.tar.zst +0 -0
  185. package/.turbo/cache/ba69fd787d0ded42-meta.json +0 -1
  186. package/.turbo/cache/c44efc9e4ddd8a0e-meta.json +0 -1
  187. package/.turbo/cache/c44efc9e4ddd8a0e.tar.zst +0 -0
  188. package/.turbo/cache/d4b8a79a27266a26-meta.json +0 -1
  189. package/.turbo/cache/da4d6d64c2b8c14c-meta.json +0 -1
  190. package/.turbo/cache/da4d6d64c2b8c14c.tar.zst +0 -0
  191. package/.turbo/cache/e89dfa7c665c8763-meta.json +0 -1
  192. package/.turbo/cache/e9070f00d98f5229-meta.json +0 -1
  193. package/.turbo/cache/e9070f00d98f5229.tar.zst +0 -0
  194. package/.turbo/cache/eaaba23b39cfd96e-meta.json +0 -1
  195. package/.turbo/cache/eaaba23b39cfd96e.tar.zst +0 -0
  196. package/.turbo/cache/fb11be9bb5bed06e-meta.json +0 -1
  197. /package/.turbo/cache/{1f8549ade1f226ed.tar.zst → 1b97859030a6d60b.tar.zst} +0 -0
  198. /package/.turbo/cache/{ab77cb0b089f1928.tar.zst → 31bd5687f46c7eba.tar.zst} +0 -0
  199. /package/.turbo/cache/{8aa9a0ccdac4b3f6.tar.zst → 43693504bf6e7c4c.tar.zst} +0 -0
  200. /package/.turbo/cache/{4db3f888378e8c97.tar.zst → 80410f4b5990ab83.tar.zst} +0 -0
  201. /package/.turbo/cache/{79b7301ce5cb7388.tar.zst → 876b8fa390c8ec81.tar.zst} +0 -0
  202. /package/.turbo/cache/{fb11be9bb5bed06e.tar.zst → 8f5fef3e04a6fcfa.tar.zst} +0 -0
  203. /package/.turbo/cache/{759b0d821dae60c9.tar.zst → ba270a0ef147f2e5.tar.zst} +0 -0
  204. /package/.turbo/cache/{ba69fd787d0ded42.tar.zst → f86b28e5ea2c66fe.tar.zst} +0 -0
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-underscore-dangle */
2
+
1
3
  // Copyright (c) 2024 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2
4
  // See LICENSE in the project root for license information.
3
5
 
@@ -6,16 +8,23 @@
6
8
  // If using litElement base class
7
9
  import { LitElement, html } from "lit";
8
10
 
9
- // If using auroElement base class
10
- // See instructions for importing auroElement base class https://git.io/JULq4
11
- // import { LitElement, html } from "lit";
12
- // import AuroElement from '@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement';
13
-
14
- // Import touch detection lib
15
11
  import styleCss from "./styles/style-css.js";
16
12
 
17
13
  import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';
18
14
 
15
+ /**
16
+ * @typedef {Object} FormStateMember - The form state member.
17
+ * @property {string | number | boolean | string[] | null} value - The value of the form element.
18
+ * @property {ValidityState} validity - The validity state of the form element, stored when fired from the form element.
19
+ * @property {boolean} required - Whether the form element is required or not.
20
+ * @property {HTMLElement} element - Whether the form element is required or not.
21
+ */
22
+
23
+ /**
24
+ * @typedef {Object.<string, FormStateMember>} FormState - The form state.
25
+ */
26
+
27
+
19
28
  // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
20
29
  /**
21
30
  * The auro-form element provides users a way to ... (it would be great if you fill this out).
@@ -26,26 +35,138 @@ import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/util
26
35
 
27
36
  // build the component class
28
37
  export class AuroForm extends LitElement {
29
- // constructor() {
30
- // super();
31
- // }
32
-
33
- // This function is to define props used within the scope of this component
34
- // Be sure to review https://lit.dev/docs/components/properties/
35
- // to understand how to use reflected attributes with your property settings.
36
38
  static get properties() {
37
39
  return {
38
- // ...super.properties,
39
-
40
- // this property is DEMO ONLY! Please delete.
41
- cssClass: { type: String }
40
+ _formState: { attribute: false },
42
41
  };
43
42
  }
44
43
 
44
+ constructor() {
45
+ super();
46
+
47
+ /** @type {FormState} */
48
+ this._formState = {};
49
+ }
50
+
51
+ // Note: button is NOT considered a form element in this context
52
+ // as it does not have a .value property.
53
+ static get formElementTags() {
54
+ return [
55
+ 'auro-input',
56
+ 'auro-select',
57
+ 'auro-datepicker',
58
+ 'auro-checkbox-group',
59
+ ];
60
+ }
61
+
62
+ /**
63
+ * Shared code for determining if an element is something we care about (submit, form element, etc.).
64
+ * @param {string[]} collection - The array to use for tag name search.
65
+ * @param {HTMLElement} element - The element to compare against the master list.
66
+ * @returns boolean
67
+ * @private
68
+ */
69
+ _isInElementCollection(collection, element) {
70
+ return collection.some((elementTag) => element.tagName.toLowerCase() === elementTag || element.hasAttribute(elementTag.toLowerCase()));
71
+ }
72
+
73
+ /**
74
+ * Check if the tag name is a form element.
75
+ * @param {HTMLElement} element - The element to check (attr or tag name).
76
+ * @returns {boolean}
77
+ */
78
+ isFormElement(element) {
79
+ return this._isInElementCollection(AuroForm.formElementTags, element);
80
+ }
81
+
82
+ static get submitElementTags() {
83
+ return [
84
+ 'button',
85
+ 'auro-button',
86
+ ];
87
+ }
88
+
89
+ /**
90
+ * Check if the tag name is a submit element.
91
+ * @param {HTMLElement} element - The element to check.
92
+ * @returns {boolean}
93
+ */
94
+ isSubmitElement(element) {
95
+ return this._isInElementCollection(AuroForm.submitElementTags, element);
96
+ }
97
+
45
98
  static get styles() {
46
99
  return [styleCss];
47
100
  }
48
101
 
102
+ /**
103
+ * Reduce the form value into a key-value pair.
104
+ *
105
+ * NOTE: form keys use `name` first, and `id` second if `name` is not available.
106
+ * This follows standard HTML5 form behavior - submission uses `name` by default when creating
107
+ * the FormData object.
108
+ *
109
+ * @returns {Record<string, string | number | boolean | string[] | null>} The form value.
110
+ */
111
+ get value() {
112
+ return Object.keys(this._formState).reduce((acc, key) => {
113
+ acc[key] = this._formState[key].value;
114
+ return acc;
115
+ }, {});
116
+ }
117
+
118
+ get validity() {
119
+ // go through validity states and return the first invalid state (if any)
120
+ const invalidKey = Object.keys(this._formState).
121
+ find((key) => {
122
+ const formKey = this._formState[key];
123
+
124
+ // these are NOT extra :(
125
+ // eslint-disable-next-line no-extra-parens
126
+ return (formKey.validity !== 'valid' && formKey.required) || (formKey.validity !== 'valid' && formKey.value !== null);
127
+ });
128
+
129
+ return invalidKey ? 'invalid' : 'valid';
130
+ }
131
+
132
+ // Below is not implemented yet
133
+ get isInitialState() {
134
+ const anyTainted = Object.keys(this._formState).some((key) => this._formState[key].validity !== null);
135
+
136
+ return !anyTainted;
137
+ }
138
+
139
+ getSubmitFunction() {
140
+ // We return an arrow function here to ensure that the `this` context points at this same AuroForm context.
141
+ // Otherwise, submission tries to read `this.value` on the button element.
142
+ return (event) => {
143
+ event.preventDefault();
144
+
145
+ this.dispatchEvent(new CustomEvent('submit', {
146
+ detail: {
147
+ value: this.value
148
+ }
149
+ }));
150
+ };
151
+ }
152
+
153
+ /**
154
+ * Construct the query strings from elements, append them together, execute, and return the NodeList.
155
+ * @returns {NodeList}
156
+ */
157
+ queryAuroElements() {
158
+ const formElementQuery = AuroForm.formElementTags.map((tag) => `${tag}[name]`).join(',');
159
+ const submitterQuery = AuroForm.submitElementTags.map((tag) => `${tag}[type=submit]`).join(',');
160
+
161
+ // Alternatively, for renamed components...
162
+ const renamedFormElementQuery = AuroForm.formElementTags.map((tag) => `[${tag}][name]`).join(',');
163
+ const renamedSubmitterQuery = AuroForm.formElementTags.map((tag) => `[${tag}][type=submit]`).join(',');
164
+
165
+ const unifiedElementQuery = `${formElementQuery},${submitterQuery},${renamedFormElementQuery},${renamedSubmitterQuery}`;
166
+
167
+ return this.querySelectorAll(unifiedElementQuery);
168
+ }
169
+
49
170
  /**
50
171
  * This will register this element with the browser.
51
172
  * @param {string} [name="auro-form"] - The name of element that you want to register to.
@@ -58,17 +179,58 @@ export class AuroForm extends LitElement {
58
179
  AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroForm);
59
180
  }
60
181
 
61
- // When using auroElement, use the following attribute and function when hiding content from screen readers.
62
- // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
182
+ firstUpdated(_changedProperties) {
183
+ super.firstUpdated(_changedProperties);
184
+
185
+ const slot = this.shadowRoot.querySelector('slot');
186
+
187
+ // Update the form state when a form element is detected
188
+ slot.addEventListener('input', (event) => {
189
+
190
+ /** @type {HTMLInputElement} */
191
+ const eventTarget = event.target;
192
+ if (this.isFormElement(eventTarget)) {
193
+ this._formState[eventTarget.getAttribute("name")].value = eventTarget.value;
194
+ }
195
+ });
196
+
197
+ slot.addEventListener('auroFormElement-validated', (event) => {
198
+ const oldValue = this._formState;
199
+
200
+ this._formState[event.target.getAttribute("name")].validity = event.detail.validity;
201
+ this.requestUpdate('formState', oldValue);
202
+ });
203
+ }
204
+
205
+ onSlotChange() {
206
+ this._formState = {};
63
207
 
64
- // function that renders the HTML and CSS into the scope of the component
208
+ this.queryAuroElements().forEach((element) => {
209
+ if (this.isFormElement(element)) {
210
+ this._formState[element.getAttribute('name')] = {
211
+ value: element.getAttribute('value'),
212
+ validity: element.getAttribute('validity'),
213
+ required: element.hasAttribute('required'),
214
+ element
215
+ };
216
+ }
217
+
218
+ if (this.isSubmitElement(element) && element.getAttribute('type') === 'submit') {
219
+ element.removeEventListener('click', this.getSubmitFunction());
220
+ element.addEventListener('click', this.getSubmitFunction());
221
+ }
222
+ });
223
+ }
224
+
225
+ // function that renders the HTML and CSS into the scope of the component
65
226
  render() {
66
227
  return html`
67
-
68
- <!-- this is demo code, DO NOT USE IN YOUR ELEMENT -->
69
- <div class=${this.cssClass} tabindex="0">
70
- <slot></slot>
71
- </div>
228
+ <form>
229
+ <p>Value: ${JSON.stringify(this.value)}</p>
230
+ <p>Validity: ${this.validity}</p>
231
+ <h3>Auro form example</h3>
232
+ <slot @slotchange="${this.onSlotChange}"></slot>
233
+ </form>
72
234
  `;
73
235
  }
74
236
  }
@@ -1,2 +1,2 @@
1
1
  import { css } from 'lit';
2
- export default css`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.testClass{display:inline-block;padding:var(--auro-text-body-size-default);border:1px solid var(--auro-color-border-error-on-light);color:var(--auro-color-border-error-on-light)}:focus-visible{background-color:var(--auro-color-border-error-on-light);color:var(--auro-color-base-white)}`;
2
+ export default css`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.testClass{display:inline-block;padding:var(--auro-text-body-size-default);border:1px solid var(--auro-color-border-error-on-light);color:var(--auro-color-border-error-on-light)}:focus-visible{background-color:var(--auro-color-border-error-on-light);color:var(--auro-color-base-white)}:host form{display:block;width:100%;padding:1rem;border:1px solid #2a2a2a;border-radius:1rem}`;
@@ -34,3 +34,11 @@
34
34
  background-color: var(--auro-color-border-error-on-light);
35
35
  color: var(--auro-color-base-white);
36
36
  }
37
+
38
+ :host form {
39
+ display: block;
40
+ width: 100%;
41
+ padding: 1rem;
42
+ border: 1px solid #2a2a2a;
43
+ border-radius: 1rem;
44
+ }
@@ -35,3 +35,13 @@
35
35
  background-color: var(--auro-color-border-error-on-light);
36
36
  color: var(--auro-color-base-white);
37
37
  }
38
+
39
+ :host {
40
+ form {
41
+ display: block;
42
+ width: 100%;
43
+ padding: 1rem;
44
+ border: 1px solid #2a2a2a;
45
+ border-radius: 1rem;
46
+ }
47
+ }
@@ -216,13 +216,13 @@ More info and automated migrator: https://sass-lang.com/d/import
216
216
 
217
217
  
218
218
  ./src/index.js → dist...
219
- created dist in 1.1s
219
+ created dist in 1.3s
220
220
  
221
221
  ./demo/index.js → ./demo/...
222
- created ./demo/ in 779ms
222
+ created ./demo/ in 698ms
223
223
  
224
224
  ./demo/api.js → ./demo/...
225
- created ./demo/ in 692ms
225
+ created ./demo/ in 910ms
226
226
 
227
227
  > @aurodesignsystem/auro-input@4.2.0 build:docs
228
228
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component input
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 1.6s
7
+ created dist in 1.3s
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 985ms
10
+ created ./demo/ in 616ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 697ms
13
+ created ./demo/ in 659ms
@@ -89,7 +89,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
89
89
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
90
90
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
91
91
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
92
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.13/dist/auro-input__bundled.js" type="module"></script>
92
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-input@2.0.0-beta.15/dist/auro-input__bundled.js" type="module"></script>
93
93
  <!-- AURO-GENERATED-CONTENT:END -->
94
94
 
95
95
  ## auro-input use cases
@@ -101,13 +101,13 @@ More info and automated migrator: https://sass-lang.com/d/import
101
101
 
102
102
  
103
103
  ./src/index.js → dist...
104
- created dist in 1s
104
+ created dist in 751ms
105
105
  
106
106
  ./demo/index.js → ./demo/...
107
- created ./demo/ in 677ms
107
+ created ./demo/ in 786ms
108
108
  
109
109
  ./demo/api.js → ./demo/...
110
- created ./demo/ in 611ms
110
+ created ./demo/ in 626ms
111
111
 
112
112
  > @aurodesignsystem/auro-menu@4.1.4 build:docs
113
113
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component menu
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 831ms
7
+ created dist in 858ms
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 921ms
10
+ created ./demo/ in 715ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 671ms
13
+ created ./demo/ in 523ms
@@ -100,7 +100,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
100
100
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
101
101
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
102
102
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
103
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.13/dist/auro-menu__bundled.js" type="module"></script>
103
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.15/dist/auro-menu__bundled.js" type="module"></script>
104
104
  <!-- AURO-GENERATED-CONTENT:END -->
105
105
 
106
106
  ## auro-menu use cases
@@ -531,7 +531,6 @@ class AuroMenu extends r {
531
531
  // Update selection if option or value changed
532
532
  if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
533
533
  const isSelected = this.isOptionSelected(option);
534
- option.classList.toggle('active', isSelected);
535
534
  option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
536
535
 
537
536
  // Add/remove selected attribute based on state
@@ -993,7 +992,7 @@ const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litS
993
992
 
994
993
  var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
995
994
 
996
- var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
995
+ var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296)}`;
997
996
 
998
997
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
999
998
  // See LICENSE in the project root for license information.
@@ -491,7 +491,6 @@ class AuroMenu extends r {
491
491
  // Update selection if option or value changed
492
492
  if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
493
493
  const isSelected = this.isOptionSelected(option);
494
- option.classList.toggle('active', isSelected);
495
494
  option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
496
495
 
497
496
  // Add/remove selected attribute based on state
@@ -953,7 +952,7 @@ const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litS
953
952
 
954
953
  var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
955
954
 
956
- var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
955
+ var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296)}`;
957
956
 
958
957
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
959
958
  // See LICENSE in the project root for license information.
@@ -1 +1 @@
1
- {"version":3,"file":"auro-menu.d.ts","sourceRoot":"","sources":["../src/auro-menu.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH;IA8DE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwCC;IAED,+CAMC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IAnHC,WAAsB;IAEtB,oBAA+B;IAE/B,eAA0B;IAE1B,qBAAwB;IAExB,sBAA6B;IAE7B,iBAAoB;IAEpB,qBAAwB;IA8Z1B;;;;OAIG;IACH,sBAeC;IAsDD;;;;OAIG;IACH,0BAUC;IAED;;;;OAIG;IACH,0BAIC;IAED;;;OAGG;IACH,yBAeC;IA1ZD,qBAKC;IAFC,kCAAuF;IAIzF,sCA+CC;IAzCK,WAAe;IA2CrB;;;;OAIG;IACH,yBAgEC;IAID;;;OAGG;IACH,uBAOC;IAED;;;OAGG;IACH,kBAUC;IATC,iBAAoF;IAatF;;;;OAIG;IACH,0BAwBC;IAED;;;;OAIG;IACH,4BAiCC;IAED;;;OAGG;IACH,uBAGC;IAED;;;;OAIG;IACH,qBAgBC;IAED;;;;OAIG;IACH,0BAiBC;IA0BD;;;OAGG;IACH,sBA6BC;IAED;;;;OAIG;IACH,qBAUC;IAoCG,kBAAqB;IAezB;;;;OAIG;IACH,wBA2CC;IAED;;;;OAIG;IACH,2BAUC;IAED;;;;OAIG;IACH,0BAIC;IAED;;;OAGG;IACH,8BAEC;IAED;;;;;OAKG;IACH,yBAMC;IAED;;;OAGG;IACH,6BAFa,OAAO,CAInB;IAED;;;OAGG;IACH,UAFa,OAAO,CAenB;CACF;2BAltBgC,KAAK;+BAY/B,sBAAsB;2CAAtB,sBAAsB"}
1
+ {"version":3,"file":"auro-menu.d.ts","sourceRoot":"","sources":["../src/auro-menu.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH;IA8DE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwCC;IAED,+CAMC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,QAQhB;IAnHC,WAAsB;IAEtB,oBAA+B;IAE/B,eAA0B;IAE1B,qBAAwB;IAExB,sBAA6B;IAE7B,iBAAoB;IAEpB,qBAAwB;IA6Z1B;;;;OAIG;IACH,sBAeC;IAsDD;;;;OAIG;IACH,0BAUC;IAED;;;;OAIG;IACH,0BAIC;IAED;;;OAGG;IACH,yBAeC;IAzZD,qBAKC;IAFC,kCAAuF;IAIzF,sCA+CC;IAzCK,WAAe;IA2CrB;;;;OAIG;IACH,yBA+DC;IAID;;;OAGG;IACH,uBAOC;IAED;;;OAGG;IACH,kBAUC;IATC,iBAAoF;IAatF;;;;OAIG;IACH,0BAwBC;IAED;;;;OAIG;IACH,4BAiCC;IAED;;;OAGG;IACH,uBAGC;IAED;;;;OAIG;IACH,qBAgBC;IAED;;;;OAIG;IACH,0BAiBC;IA0BD;;;OAGG;IACH,sBA6BC;IAED;;;;OAIG;IACH,qBAUC;IAoCG,kBAAqB;IAezB;;;;OAIG;IACH,wBA2CC;IAED;;;;OAIG;IACH,2BAUC;IAED;;;;OAIG;IACH,0BAIC;IAED;;;OAGG;IACH,8BAEC;IAED;;;;;OAKG;IACH,yBAMC;IAED;;;OAGG;IACH,6BAFa,OAAO,CAInB;IAED;;;OAGG;IACH,UAFa,OAAO,CAenB;CACF;2BAjtBgC,KAAK;+BAY/B,sBAAsB;2CAAtB,sBAAsB"}
@@ -491,7 +491,6 @@ class AuroMenu extends r {
491
491
  // Update selection if option or value changed
492
492
  if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
493
493
  const isSelected = this.isOptionSelected(option);
494
- option.classList.toggle('active', isSelected);
495
494
  option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
496
495
 
497
496
  // Add/remove selected attribute based on state
@@ -953,7 +952,7 @@ const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litS
953
952
 
954
953
  var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
955
954
 
956
- var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
955
+ var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296)}`;
957
956
 
958
957
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
959
958
  // See LICENSE in the project root for license information.
@@ -272,7 +272,6 @@ export class AuroMenu extends LitElement {
272
272
  // Update selection if option or value changed
273
273
  if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
274
274
  const isSelected = this.isOptionSelected(option);
275
- option.classList.toggle('active', isSelected);
276
275
  option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
277
276
 
278
277
  // Add/remove selected attribute based on state
@@ -1,2 +1,2 @@
1
1
  import { css } from 'lit';
2
- export default css`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
2
+ export default css`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296)}`;
@@ -21,3 +21,6 @@
21
21
  --ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);
22
22
  --ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff);
23
23
  }
24
+ :host([selected]):host(.active) {
25
+ --ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296);
26
+ }
@@ -29,5 +29,9 @@
29
29
  --ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #{$ds-color-container-ui-primary-default-default});
30
30
  --ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #{$ds-color-text-primary-inverse});
31
31
  --ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #{$ds-color-icon-emphasis-inverse});
32
+
33
+ &:host(.active) {
34
+ --ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #{$ds-color-container-ui-primary-active-default});
35
+ }
32
36
  }
33
37
 
@@ -138,13 +138,13 @@ Run in verbose mode to see all warnings.
138
138
 
139
139
  
140
140
  ./src/index.js → dist...
141
- created dist in 832ms
141
+ created dist in 812ms
142
142
  
143
143
  ./demo/index.js → ./demo/...
144
- created ./demo/ in 561ms
144
+ created ./demo/ in 498ms
145
145
  
146
146
  ./demo/api.js → ./demo/...
147
- created ./demo/ in 622ms
147
+ created ./demo/ in 486ms
148
148
 
149
149
  > @aurodesignsystem/auro-radio@4.1.1 build:docs
150
150
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component radio
@@ -4,10 +4,10 @@
4
4
 
5
5
  
6
6
  ./src/index.js → dist...
7
- created dist in 1.1s
7
+ created dist in 846ms
8
8
  
9
9
  ./demo/index.js → ./demo/...
10
- created ./demo/ in 648ms
10
+ created ./demo/ in 476ms
11
11
  
12
12
  ./demo/api.js → ./demo/...
13
- created ./demo/ in 647ms
13
+ created ./demo/ in 462ms
@@ -90,7 +90,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
90
90
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
91
91
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.9.2/dist/tokens/CSSCustomProperties.css" />
92
92
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
93
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-radio@2.0.0-beta.13/dist/auro-radio__bundled.js" type="module"></script>
93
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-radio@2.0.0-beta.15/dist/auro-radio__bundled.js" type="module"></script>
94
94
  <!-- AURO-GENERATED-CONTENT:END -->
95
95
 
96
96
  ## auro-radio use cases
@@ -137,13 +137,13 @@ More info and automated migrator: https://sass-lang.com/d/import
137
137
 
138
138
  
139
139
  ./src/index.js → dist...
140
- created dist in 1s
140
+ created dist in 657ms
141
141
  
142
142
  ./demo/index.js → ./demo/...
143
- created ./demo/ in 640ms
143
+ created ./demo/ in 631ms
144
144
  
145
145
  ./demo/api.js → ./demo/...
146
- created ./demo/ in 535ms
146
+ created ./demo/ in 467ms
147
147
 
148
148
  > @aurodesignsystem/auro-select@3.3.0 build:docs
149
149
  > wca analyze 'scripts/wca/*.js' --outFiles docs/api.md; node ../../packages/build-tools/src/docProcessor.mjs --component select
@@ -99,9 +99,9 @@ In cases where the project is not able to process JS assets, there are pre-proce
99
99
  <!-- The below content is automatically added from ../../docs/templates/componentBundleUseModBrowsers.md -->
100
100
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.12.1/dist/tokens/CSSCustomProperties.css" />
101
101
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.1.2/dist/bundled/essentials.css" />
102
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.13/dist/auro-dropdown__bundled.js" type="module"></script>
103
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.13/dist/auro-menu__bundled.js" type="module"></script>
104
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-select@2.0.0-beta.13/dist/auro-select__bundled.js" type="module"></script>
102
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-dropdown@2.0.0-beta.15/dist/auro-dropdown__bundled.js" type="module"></script>
103
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-menu@2.0.0-beta.15/dist/auro-menu__bundled.js" type="module"></script>
104
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit/auro-select@2.0.0-beta.15/dist/auro-select__bundled.js" type="module"></script>
105
105
  <!-- AURO-GENERATED-CONTENT:END -->
106
106
 
107
107
  ## auro-select use cases
@@ -4032,7 +4032,6 @@ let AuroMenu$1 = class AuroMenu extends r {
4032
4032
  // Update selection if option or value changed
4033
4033
  if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
4034
4034
  const isSelected = this.isOptionSelected(option);
4035
- option.classList.toggle('active', isSelected);
4036
4035
  option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
4037
4036
 
4038
4037
  // Add/remove selected attribute based on state
@@ -4494,7 +4493,7 @@ const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litS
4494
4493
 
4495
4494
  var styleCss$1$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
4496
4495
 
4497
- var colorCss$1$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
4496
+ var colorCss$1$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296)}`;
4498
4497
 
4499
4498
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
4500
4499
  // See LICENSE in the project root for license information.
@@ -6018,7 +6017,6 @@ class AuroMenu extends r$5 {
6018
6017
  // Update selection if option or value changed
6019
6018
  if (changedProperties.has('optionSelected') || changedProperties.has('value')) {
6020
6019
  const isSelected = this.isOptionSelected(option);
6021
- option.classList.toggle('active', isSelected);
6022
6020
  option.setAttribute('aria-selected', isSelected ? 'true' : 'false');
6023
6021
 
6024
6022
  // Add/remove selected attribute based on state
@@ -6473,7 +6471,7 @@ class AuroMenu extends r$5 {
6473
6471
 
6474
6472
  var styleCss$1 = i$c`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
6475
6473
 
6476
- var colorCss$1 = i$c`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
6474
+ var colorCss$1 = i$c`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-active-default, #225296)}`;
6477
6475
 
6478
6476
  /**
6479
6477
  * @license