@aurodesignsystem-dev/auro-drawer 0.0.0-pr131.7 → 0.0.0-pr131.9

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/demo/index.html CHANGED
@@ -51,6 +51,7 @@
51
51
 
52
52
  <script type="module">
53
53
  import { initExamples } from './index.min.js';
54
+
54
55
  initExamples();
55
56
  </script>
56
57
 
package/demo/index.md CHANGED
@@ -27,17 +27,15 @@ The `auro-drawer` component should be used in situations where users may:
27
27
 
28
28
  Triggering the drawer relies on functions being installed. See the following example code that is installed into this demo.
29
29
 
30
- ```javascript
31
- function toggleDrawer(drawerID) {
30
+ <pre class="language-javascript"><code class="language-javascript">function toggleDrawer(drawerID) {
32
31
  const drawer = document.querySelector(drawerID);
33
-
32
+
34
33
  if (drawer.hasAttribute('open')) {
35
34
  drawer.removeAttribute('open');
36
35
  } else {
37
36
  drawer.setAttribute('open', true);
38
37
  }
39
- }
40
- ```
38
+ }</code></pre>
41
39
 
42
40
  Once the JavaScript is added to the scope of the experience, the next part is adding a trigger. In this example, the button component will toggle a drawer with the ID of `#demo1`.
43
41
 
@@ -50,15 +48,15 @@ Once the JavaScript is added to the scope of the experience, the next part is ad
50
48
  The structure of the drawer itself consists of three slots. The `header`, `content` and `footer` slots. See the scaffolding example below for adding content to the component.
51
49
 
52
50
  ``` html
53
- <auro-drawer id="[unique ID]">
54
- <span slot="header">[header content]</span>
55
- <span slot="content">
51
+ <auro-drawer id="[unique ID]">
52
+ <span slot="header">[header content]</span>
53
+ <span slot="content">
56
54
  [body content]
57
- </span>
58
- <span slot="footer">
55
+ </span>
56
+ <span slot="footer">
59
57
  [footer content]
60
- </span>
61
- </auro-drawer>
58
+ </span>
59
+ </auro-drawer>
62
60
  ```
63
61
 
64
62
  It should be noted that the footer slot is reserved for the placement of action buttons.
@@ -68,57 +66,55 @@ It should be noted that the footer slot is reserved for the placement of action
68
66
  ### Basic
69
67
 
70
68
  <div class="exampleWrapper">
71
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
72
- <!-- The below content is automatically added from ./../apiExamples/basic.html -->
73
- <div>
74
- <auro-button id="openBasic">Open default drawer</auro-button>
75
- </div>
76
- <auro-drawer id="defaultDrawer">
77
- <span slot="header">Default Drawer</span>
78
- <div slot="content">
79
- <p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
80
- <p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
81
- <auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
82
- <ul>
83
- <li>Caerphilly croque monsieur fondue</li>
84
- <li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
85
- <li>Cheddar cheese and biscuits chalk and cheese</li>
86
- <li>Camembert de normandie stinking bishop bavarian bergkase</li>
87
- </ul>
88
- </div>
89
- <div slot="footer">
90
- <auro-button secondary id="closeBasic">Close</auro-button>
91
- </div>
92
- </auro-drawer>
93
- <!-- AURO-GENERATED-CONTENT:END -->
69
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
70
+ <!-- The below content is automatically added from ./../apiExamples/basic.html -->
71
+ <div>
72
+ <auro-button id="openBasic">Open default drawer</auro-button>
73
+ </div>
74
+ <auro-drawer id="defaultDrawer">
75
+ <span slot="header">Default Drawer</span>
76
+ <div slot="content">
77
+ <p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
78
+ <p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
79
+ <auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
80
+ <ul>
81
+ <li>Caerphilly croque monsieur fondue</li>
82
+ <li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
83
+ <li>Cheddar cheese and biscuits chalk and cheese</li>
84
+ <li>Camembert de normandie stinking bishop bavarian bergkase</li>
85
+ </ul>
86
+ </div>
87
+ <div slot="footer">
88
+ <auro-button secondary id="closeBasic">Close</auro-button>
89
+ </div>
90
+ </auro-drawer>
91
+ <!-- AURO-GENERATED-CONTENT:END -->
94
92
  </div>
95
93
  <auro-accordion alignRight>
96
- <span slot="trigger">See code</span>
94
+ <span slot="trigger">See code</span>
97
95
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
98
96
  <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
99
97
 
100
- ```html
101
- <div>
102
- <auro-button id="openBasic">Open default drawer</auro-button>
103
- </div>
104
- <auro-drawer id="defaultDrawer">
105
- <span slot="header">Default Drawer</span>
106
- <div slot="content">
107
- <p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
108
- <p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
109
- <auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
110
- <ul>
111
- <li>Caerphilly croque monsieur fondue</li>
112
- <li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
113
- <li>Cheddar cheese and biscuits chalk and cheese</li>
114
- <li>Camembert de normandie stinking bishop bavarian bergkase</li>
115
- </ul>
116
- </div>
117
- <div slot="footer">
118
- <auro-button secondary id="closeBasic">Close</auro-button>
119
- </div>
120
- </auro-drawer>
121
- ```
98
+ <pre class="language-html"><code class="language-html">&lt;div&gt;
99
+ &lt;auro-button id="openBasic"&gt;Open default drawer&lt;/auro-button&gt;
100
+ &lt;/div&gt;
101
+ &lt;auro-drawer id="defaultDrawer"&gt;
102
+ &lt;span slot="header"&gt;Default Drawer&lt;/span&gt;
103
+ &lt;div slot="content"&gt;
104
+ &lt;p&gt;When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See &lt;auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank"&gt;alaskaair.com/bagrules&lt;/auro-hyperlink&gt; for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.&lt;/p&gt;
105
+ &lt;p&gt;Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.&lt;/p&gt;
106
+ &lt;auro-header level="3" display="500"&gt;Before checking your bags, remember to:&lt;/auro-header&gt;
107
+ &lt;ul&gt;
108
+ &lt;li&gt;Caerphilly croque monsieur fondue&lt;/li&gt;
109
+ &lt;li&gt;Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings&lt;/li&gt;
110
+ &lt;li&gt;Cheddar cheese and biscuits chalk and cheese&lt;/li&gt;
111
+ &lt;li&gt;Camembert de normandie stinking bishop bavarian bergkase&lt;/li&gt;
112
+ &lt;/ul&gt;
113
+ &lt;/div&gt;
114
+ &lt;div slot="footer"&gt;
115
+ &lt;auro-button secondary id="closeBasic"&gt;Close&lt;/auro-button&gt;
116
+ &lt;/div&gt;
117
+ &lt;/auro-drawer&gt;</code></pre>
122
118
  <!-- AURO-GENERATED-CONTENT:END -->
123
119
  </auro-accordion>
124
120