@aurodesignsystem-dev/auro-formkit 0.0.0-pr1451.21 → 0.0.0-pr1451.23

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 (65) hide show
  1. package/components/checkbox/demo/api.min.js +1 -1
  2. package/components/checkbox/demo/getting-started.md +154 -0
  3. package/components/checkbox/demo/index.min.js +1 -1
  4. package/components/checkbox/dist/index.js +1 -1
  5. package/components/checkbox/dist/registered.js +1 -1
  6. package/components/combobox/demo/api.min.js +3 -3
  7. package/components/combobox/demo/customize.min.js +3 -3
  8. package/components/combobox/demo/getting-started.min.js +3 -3
  9. package/components/combobox/demo/index.min.js +3 -3
  10. package/components/combobox/dist/index.js +3 -3
  11. package/components/combobox/dist/registered.js +3 -3
  12. package/components/counter/demo/api.min.js +2 -2
  13. package/components/counter/demo/getting-started.md +150 -0
  14. package/components/counter/demo/index.min.js +2 -2
  15. package/components/counter/dist/index.js +2 -2
  16. package/components/counter/dist/registered.js +2 -2
  17. package/components/datepicker/demo/api.min.js +3 -3
  18. package/components/datepicker/demo/index.min.js +3 -3
  19. package/components/datepicker/dist/index.js +3 -3
  20. package/components/datepicker/dist/registered.js +3 -3
  21. package/components/dropdown/demo/api.min.js +1 -1
  22. package/components/dropdown/demo/getting-started.md +146 -0
  23. package/components/dropdown/demo/index.min.js +1 -1
  24. package/components/dropdown/dist/index.js +1 -1
  25. package/components/dropdown/dist/registered.js +1 -1
  26. package/components/form/demo/api.min.js +13 -13
  27. package/components/form/demo/getting-started.md +143 -0
  28. package/components/form/demo/index.min.js +13 -13
  29. package/components/input/demo/api.min.js +1 -1
  30. package/components/input/demo/customize.min.js +1 -1
  31. package/components/input/demo/getting-started.min.js +1 -1
  32. package/components/input/demo/index.min.js +1 -1
  33. package/components/input/dist/index.js +1 -1
  34. package/components/input/dist/registered.js +1 -1
  35. package/components/menu/README.md +8 -26
  36. package/components/menu/demo/accessibility.html +53 -0
  37. package/components/menu/demo/accessibility.md +34 -0
  38. package/components/menu/demo/api.html +11 -17
  39. package/components/menu/demo/api.md +0 -1059
  40. package/components/menu/demo/customize.html +54 -0
  41. package/components/menu/demo/customize.md +639 -0
  42. package/components/menu/demo/demo-support.js +60 -0
  43. package/components/menu/demo/design.html +53 -0
  44. package/components/menu/demo/design.md +81 -0
  45. package/components/menu/demo/getting-started.html +54 -0
  46. package/components/menu/demo/getting-started.md +322 -0
  47. package/components/menu/demo/index.html +14 -19
  48. package/components/menu/demo/index.md +26 -63
  49. package/components/menu/demo/keyboard-behavior.html +53 -0
  50. package/components/menu/demo/readme.html +11 -15
  51. package/components/menu/demo/readme.md +8 -26
  52. package/components/menu/demo/styles.css +974 -0
  53. package/components/menu/demo/voiceover.html +53 -0
  54. package/components/menu/demo/voiceover.md +33 -0
  55. package/components/radio/demo/api.min.js +1 -1
  56. package/components/radio/demo/getting-started.md +154 -0
  57. package/components/radio/demo/index.min.js +1 -1
  58. package/components/radio/dist/index.js +1 -1
  59. package/components/radio/dist/registered.js +1 -1
  60. package/components/select/demo/customize.min.js +2 -2
  61. package/components/select/demo/getting-started.min.js +2 -2
  62. package/components/select/demo/index.min.js +2 -2
  63. package/components/select/dist/index.js +2 -2
  64. package/components/select/dist/registered.js +2 -2
  65. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  See LICENSE in the project root for license information.
4
4
 
5
5
  HTML in this document is standardized and NOT to be edited.
6
- All demo code should be added/edited in ./demo/demo.md
6
+ All demo code should be added/edited in ./demo/index.md
7
7
 
8
8
  With the exception of adding custom elements if needed for the demo.
9
9
 
@@ -18,8 +18,8 @@
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
19
  <title>Auro Web Component Demo | auro-menu</title>
20
20
 
21
- <!-- Prism.js Stylesheet -->
22
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
21
+ <!-- highlight.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
23
23
 
24
24
  <!-- Legacy reference is still needed to support auro-menu's use of legacy token values at this time -->
25
25
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
@@ -32,28 +32,23 @@
32
32
 
33
33
  <!-- Demo Specific Styles -->
34
34
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
- </head>
35
+ <link rel="stylesheet" type="text/css" href="./styles.css" />
36
+ </head>
37
37
  <body class="auro-markdown">
38
38
  <main></main>
39
39
 
40
40
  <script type="module">
41
- import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
42
- import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
43
- fetch('./index.md')
44
- .then((response) => response.text())
45
- .then((text) => {
46
- const rawHtml = marked.parse(text);
47
- document.querySelector('main').innerHTML = rawHtml;
48
- Prism.highlightAll();
49
- });
41
+ import { renderPage } from './demo-support.js';
42
+ await renderPage('./index.md');
50
43
  </script>
51
44
 
45
+ <!-- If additional elements are needed for the demo, add them here. -->
52
46
  <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
53
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/+esm" type="module"></script>
54
- <script type="module" data-demo-script="true">
55
- import { initExamples } from "./index.min.js"
56
- initExamples();
57
- </script>
47
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-nav@latest/+esm" type="module"></script>
48
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
49
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
50
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
51
+
52
+ <script src="./index.min.js" data-demo-script="true" type="module"></script>
58
53
  </body>
59
54
  </html>
@@ -1,70 +1,33 @@
1
- <!--
2
- THIS PAGE'S CONTENT SHOULD BE KEPT MINIMAL.
3
- ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE — THE BASIC EXAMPLE IS USUALLY ENOUGH.
4
- ALL OTHER EXAMPLES SHOULD GO IN THE API DOCUMENTATION.
5
- -->
6
-
7
- # Menu
8
-
1
+ <auro-header level="1" id="overview">Menu</auro-header>
2
+ <div class="contentWrapper">
3
+ <nav>
4
+ <auro-nav anchorNavContent=".scrollWrapper">
5
+ <span slot="mobileToggleCollapsed">View More</span>
6
+ <span slot="mobileToggleExpanded">View Less</span>
7
+ <auro-anchorlink fluid href="#description">Description</auro-anchorlink>
8
+ <auro-anchorlink fluid href="#useCases">User Stories</auro-anchorlink>
9
+ </auro-nav>
10
+ </nav>
11
+ <div class="mainContent">
12
+ <div class="scrollWrapper">
13
+ <section>
14
+ <auro-header level="2" id="description">Description</auro-header>
9
15
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/description.md) -->
10
16
  <!-- The below content is automatically added from ./../docs/partials/description.md -->
11
- The `<auro-menu>` element provides a list of options for a user to select from.
12
-
13
- A list of options is created within the `<slot>` of the `<auro-menu>` element by using the `<auro-menuoption>` element to define options. Use a standard `<hr>` element to create dividers within the list of options.
14
-
15
- The `<auro-menu>` element is designed for contextual menus, e.g. a dropdown menus. They are not intended to be used for navigation menus which have a different semantic meaning. The `<auro-menu>` element does not support hide/show functionality within its scope. This functionality will be managed by a wrapping element such as a drop-down menu composite element.
16
- <!-- AURO-GENERATED-CONTENT:END -->
17
+ The <code>&lt;auro-menu&gt;</code> element provides a list of options for a user to select from.
17
18
 
18
- ## Use Cases
19
+ A list of options is created within the <code>&lt;slot&gt;</code> of the <code>&lt;auro-menu&gt;</code> element by using the <code>&lt;auro-menuoption&gt;</code> element to define options. Use a standard <code>&lt;hr&gt;</code> element to create dividers within the list of options.
19
20
 
21
+ The <code>&lt;auro-menu&gt;</code> element is designed for contextual menus, e.g. a dropdown menus. They are not intended to be used for navigation menus which have a different semantic meaning. The <code>&lt;auro-menu&gt;</code> element does not support hide/show functionality within its scope. This functionality will be managed by a wrapping element such as a drop-down menu composite element.
22
+ <!-- AURO-GENERATED-CONTENT:END -->
23
+ </section>
24
+ <section>
25
+ <auro-header level="2" id="useCases">User Stories</auro-header>
20
26
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/useCases.md) -->
21
27
  <!-- The below content is automatically added from ./../docs/partials/useCases.md -->
22
- The <code>&lt;auro-menu&gt;</code> element should be used in situations where users may:
23
-
24
- * A user needs to select one option from a list of options.
25
- <!-- AURO-GENERATED-CONTENT:END -->
26
-
27
- ## Example(s)
28
-
29
- ### Basic
30
-
31
- <div class="exampleWrapper">
32
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/preselect.html) -->
33
- <!-- The below content is automatically added from ./../apiExamples/preselect.html -->
34
- <auro-menu>
35
- <auro-menuoption value="new tab">New tab</auro-menuoption>
36
- <auro-menuoption value="new window" selected>New window</auro-menuoption>
37
- <auro-menuoption value="open file">Open file</auro-menuoption>
38
- <auro-menuoption value="open location">Open location</auro-menuoption>
39
- <hr>
40
- <auro-menuoption value="close window">Close window</auro-menuoption>
41
- <auro-menuoption value="close tab" disabled>Close tab</auro-menuoption>
42
- <auro-menuoption value="save page as...">Save page as...</auro-menuoption>
43
- <hr>
44
- <auro-menuoption value="share" disabled>Share</auro-menuoption>
45
- <hr>
46
- <auro-menuoption value="print">Print</auro-menuoption>
47
- </auro-menu>
28
+ The <code>&lt;auro-menu&gt;</code> element is not intended for stand-alone use. It serves as the options list within <auro-hyperlink href="https://auro.alaskaair.com/components/auro/select" target="_blank">auro-select</auro-hyperlink> and <auro-hyperlink href="https://auro.alaskaair.com/components/auro/combobox" target="_blank">auro-combobox</auro-hyperlink>. Refer to those components for use cases and implementation guidance.
48
29
  <!-- AURO-GENERATED-CONTENT:END -->
49
- </div>
50
- <auro-accordion alignRight>
51
- <span slot="trigger">See code</span>
52
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/preselect.html) -->
53
- <!-- The below code snippet is automatically added from ./../apiExamples/preselect.html -->
54
-
55
- <pre class="language-html"><code class="language-html">&lt;auro-menu&gt;
56
- &lt;auro-menuoption value="new tab"&gt;New tab&lt;/auro-menuoption&gt;
57
- &lt;auro-menuoption value="new window" selected&gt;New window&lt;/auro-menuoption&gt;
58
- &lt;auro-menuoption value="open file"&gt;Open file&lt;/auro-menuoption&gt;
59
- &lt;auro-menuoption value="open location"&gt;Open location&lt;/auro-menuoption&gt;
60
- &lt;hr&gt;
61
- &lt;auro-menuoption value="close window"&gt;Close window&lt;/auro-menuoption&gt;
62
- &lt;auro-menuoption value="close tab" disabled&gt;Close tab&lt;/auro-menuoption&gt;
63
- &lt;auro-menuoption value="save page as..."&gt;Save page as...&lt;/auro-menuoption&gt;
64
- &lt;hr&gt;
65
- &lt;auro-menuoption value="share" disabled&gt;Share&lt;/auro-menuoption&gt;
66
- &lt;hr&gt;
67
- &lt;auro-menuoption value="print"&gt;Print&lt;/auro-menuoption&gt;
68
- &lt;/auro-menu&gt;</code></pre>
69
- <!-- AURO-GENERATED-CONTENT:END -->
70
- </auro-accordion>
30
+ </section>
31
+ </div>
32
+ </div>
33
+ </div>
@@ -0,0 +1,53 @@
1
+ <!--
2
+ Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3
+ See LICENSE in the project root for license information.
4
+
5
+ HTML in this document is standardized and NOT to be edited.
6
+ All demo code should be added/edited in ./demo/keyboardBehavior.md
7
+
8
+ With the exception of adding custom elements if needed for the demo.
9
+
10
+ ----------------------- DO NOT EDIT -----------------------------
11
+
12
+ -->
13
+
14
+ <!DOCTYPE html>
15
+ <html lang="en">
16
+ <head>
17
+ <meta charset="UTF-8" />
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
+ <title>Auro Web Component Demo | auro-menu | Keyboard Behavior</title>
20
+
21
+ <!-- highlight.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-menu's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+
30
+ <!-- Webcore Stylesheet Alaska Theme -->
31
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
+
33
+ <!-- Demo Specific Styles -->
34
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
+ <link rel="stylesheet" type="text/css" href="./styles.css" />
36
+ </head>
37
+ <body class="auro-markdown">
38
+ <main></main>
39
+
40
+ <script type="module">
41
+ import { renderPage } from './demo-support.js';
42
+ await renderPage('./keyboard-behavior.md');
43
+ </script>
44
+
45
+ <!-- If additional elements are needed for the demo, add them here. -->
46
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
47
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-nav@latest/+esm" type="module"></script>
48
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
49
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
50
+
51
+ <script src="./index.min.js" data-demo-script="true" type="module"></script>
52
+ </body>
53
+ </html>
@@ -3,7 +3,7 @@
3
3
  See LICENSE in the project root for license information.
4
4
 
5
5
  HTML in this document is standardized and NOT to be edited.
6
- All demo code should be added/edited in ./demo/index.md
6
+ All demo code should be added/edited in ./demo/readme.md
7
7
 
8
8
  With the exception of adding custom elements if needed for the demo.
9
9
 
@@ -18,8 +18,8 @@
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
19
  <title>Auro Web Component Demo | auro-menu</title>
20
20
 
21
- <!-- Prism.js Stylesheet -->
22
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
21
+ <!-- highlight.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
23
23
 
24
24
  <!-- Legacy reference is still needed to support auro-menu's use of legacy token values at this time -->
25
25
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
@@ -32,25 +32,21 @@
32
32
 
33
33
  <!-- Demo Specific Styles -->
34
34
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
- <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
- </head>
35
+ <link rel="stylesheet" type="text/css" href="./styles.css" />
36
+ </head>
37
37
  <body class="auro-markdown">
38
38
  <main></main>
39
39
 
40
40
  <script type="module">
41
- import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
42
- import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
43
- fetch('./readme.md')
44
- .then((response) => response.text())
45
- .then((text) => {
46
- const rawHtml = marked.parse(text);
47
- document.querySelector('main').innerHTML = rawHtml;
48
- Prism.highlightAll();
49
- })
41
+ import { renderPage } from './demo-support.js';
42
+ await renderPage('./readme.md');
50
43
  </script>
51
- <script src="./index.min.js" data-demo-script="true" type="module"></script>
52
44
 
53
45
  <!-- If additional elements are needed for the demo, add them here. -->
54
46
  <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
47
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
48
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
49
+
50
+ <script src="./index.min.js" data-demo-script="true" type="module"></script>
55
51
  </body>
56
52
  </html>
@@ -21,11 +21,11 @@ The following sections are editable by making changes to the following files:
21
21
 
22
22
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
23
  <!-- The below content is automatically added from ./docs/partials/description.md -->
24
- The `<auro-menu>` element provides a list of options for a user to select from.
24
+ The <code>&lt;auro-menu&gt;</code> element provides a list of options for a user to select from.
25
25
 
26
- A list of options is created within the `<slot>` of the `<auro-menu>` element by using the `<auro-menuoption>` element to define options. Use a standard `<hr>` element to create dividers within the list of options.
26
+ A list of options is created within the <code>&lt;slot&gt;</code> of the <code>&lt;auro-menu&gt;</code> element by using the <code>&lt;auro-menuoption&gt;</code> element to define options. Use a standard <code>&lt;hr&gt;</code> element to create dividers within the list of options.
27
27
 
28
- The `<auro-menu>` element is designed for contextual menus, e.g. a dropdown menus. They are not intended to be used for navigation menus which have a different semantic meaning. The `<auro-menu>` element does not support hide/show functionality within its scope. This functionality will be managed by a wrapping element such as a drop-down menu composite element.
28
+ The <code>&lt;auro-menu&gt;</code> element is designed for contextual menus, e.g. a dropdown menus. They are not intended to be used for navigation menus which have a different semantic meaning. The <code>&lt;auro-menu&gt;</code> element does not support hide/show functionality within its scope. This functionality will be managed by a wrapping element such as a drop-down menu composite element.
29
29
  <!-- AURO-GENERATED-CONTENT:END -->
30
30
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
31
31
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
@@ -36,9 +36,7 @@ The `<auro-menu>` element is designed for contextual menus, e.g. a dropdown menu
36
36
 
37
37
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
38
38
  <!-- The below content is automatically added from ./docs/partials/useCases.md -->
39
- The <code>&lt;auro-menu&gt;</code> element should be used in situations where users may:
40
-
41
- * A user needs to select one option from a list of options.
39
+ The <code>&lt;auro-menu&gt;</code> element is not intended for stand-alone use. It serves as the options list within <auro-hyperlink href="https://auro.alaskaair.com/components/auro/select" target="_blank">auro-select</auro-hyperlink> and <auro-hyperlink href="https://auro.alaskaair.com/components/auro/combobox" target="_blank">auro-combobox</auro-hyperlink>. Refer to those components for use cases and implementation guidance.
42
40
  <!-- AURO-GENERATED-CONTENT:END -->
43
41
 
44
42
  ## Getting Started
@@ -87,11 +85,8 @@ To only develop a single component, use the `--filter` flag:
87
85
  <pre class="language-shell"><code class="language-shell">npx turbo dev --filter=@aurodesignsystem/auro-input</code></pre>
88
86
  <!-- AURO-GENERATED-CONTENT:END -->
89
87
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
90
- <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
91
-
92
- ## Custom Component Registration for Version Management
93
-
94
- There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
88
+ <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
89
+ There are two key parts to every Auro component: the <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes" target="_blank">class</auro-hyperlink> and the custom element definition. The class defines the component's behavior, while the custom element registers it under a specific name so it can be used in HTML.
95
90
 
96
91
  You can do this by importing only the component class and using the `register(name)` method with a unique name:
97
92
 
@@ -99,23 +94,11 @@ You can do this by importing only the component class and using the `register(na
99
94
  import { AuroMenu, AuroMenuOption } from '@aurodesignsystem/auro-formkit/auro-menu/class';
100
95
 
101
96
  // Register with a custom name if desired
102
- AuroMenu.register('custom-menu');
103
- AuroMenuOption.register('custom-menu-option');</code></pre>
97
+ AuroMenu.register('[custom]-menu');
98
+ AuroMenuOption.register('[custom]-menu-option');</code></pre>
104
99
 
105
100
  This will create a new custom element `<custom-menu>` and `<custom-menu-option>` that behaves exactly like `<auro-menu>` and `<auro-menu-option>`, allowing both to coexist on the same page without interfering with each other.
106
101
 
107
- <div class="exampleWrapper exampleWrapper--flex">
108
- <custom-menu>
109
- <custom-menuoption value="stops">Stops</custom-menuoption>
110
- <custom-menuoption value="price">Price</custom-menuoption>
111
- <custom-menuoption value="duration">Duration</custom-menuoption>
112
- <custom-menuoption value="departure">Departure</custom-menuoption>
113
- <custom-menuoption value="arrival">Arrival</custom-menuoption>
114
- </custom-menu>
115
- </div>
116
- <auro-accordion alignRight>
117
- <span slot="trigger">See code</span>
118
-
119
102
  <pre class="language-html"><code class="language-html">&lt;custom-menu&gt;
120
103
  &lt;custom-menuoption value="stops"&gt;Stops&lt;/custom-menuoption&gt;
121
104
  &lt;custom-menuoption value="price"&gt;Price&lt;/custom-menuoption&gt;
@@ -123,5 +106,4 @@ This will create a new custom element `<custom-menu>` and `<custom-menu-option>`
123
106
  &lt;custom-menuoption value="departure"&gt;Departure&lt;/custom-menuoption&gt;
124
107
  &lt;custom-menuoption value="arrival"&gt;Arrival&lt;/custom-menuoption&gt;
125
108
  &lt;/custom-menu&gt;</code></pre>
126
- </auro-accordion>
127
109
  <!-- AURO-GENERATED-CONTENT:END -->