@aurodesignsystem-dev/auro-table 0.0.0-pr161.0 → 0.0.0-pr162.0

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/readme.md ADDED
@@ -0,0 +1,297 @@
1
+ <!--
2
+ The README.md file is a compiled document. No edits should be made directly to this file.
3
+
4
+ README.md is created by running `npm run build:docs`.
5
+
6
+ This file is generated based on a template fetched from
7
+ `https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/README.md`
8
+ and copied to `./componentDocs/README.md` each time the docs are compiled.
9
+
10
+ The following sections are editable by making changes to the following files:
11
+
12
+ | SECTION | DESCRIPTION | FILE LOCATION |
13
+ |------------------------|---------------------------------------------------|-------------------------------------|
14
+ | Description | Description of the component | `./docs/partials/description.md` |
15
+ | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
+ | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
+ | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
+ -->
19
+
20
+ # Table
21
+
22
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
+ <!-- The below content is automatically added from ./docs/partials/description.md -->
24
+ Use the `auro-table` custom element to illustrate tabular data or content. The auro-table element is responsive, with a flexible layout and an easy-to-use JSON API. Alternatively, an HTML5 `<table>` may be used inside of the tag to create more dynamic tabular data.
25
+ <!-- AURO-GENERATED-CONTENT:END -->
26
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
27
+ <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
28
+ <!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
29
+ <!-- AURO-GENERATED-CONTENT:END -->
30
+
31
+ ## Use Cases
32
+
33
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
34
+ <!-- The below content is automatically added from ./docs/partials/useCases.md -->
35
+ The `<auro-table>` element should be used in situations where users may:
36
+
37
+ * Show static or dynamic tabular data or content
38
+ <!-- AURO-GENERATED-CONTENT:END -->
39
+
40
+ ## Install
41
+
42
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
43
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-table/release.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-table/actions/workflows/release.yml)
44
+ [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-table?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-table)
45
+ [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-table?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
46
+ ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
47
+
48
+ <pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-table</code></pre>
49
+
50
+ <!-- AURO-GENERATED-CONTENT:END -->
51
+
52
+ ### Define Dependency in Project
53
+
54
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
55
+ Defining the dependency within each project that is using the `<auro-table>` component.
56
+
57
+ <!-- AURO-GENERATED-CONTENT:END -->
58
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
59
+
60
+ <pre class="language-js"><code class="language-js">import "@aurodesignsystem/auro-table";</code></pre>
61
+
62
+ <!-- AURO-GENERATED-CONTENT:END -->
63
+
64
+ ### Use CDN
65
+
66
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
67
+ In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
68
+
69
+ <pre class="language-html"><code class="language-html">&lt;script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-table@latest/+esm"&gt;&lt;/script&gt;</code></pre>
70
+
71
+ <!-- AURO-GENERATED-CONTENT:END -->
72
+
73
+ ## Basic Example
74
+
75
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
76
+ <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
77
+
78
+ <pre class="language-html"><code class="language-html">&lt;auro-table
79
+ columnHeaders='["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]'
80
+ componentData='[
81
+ {"": "Dance class", "Monday": "5:00pm","Wednesday": "5:00pm" },
82
+ {"": "Night classes", "Thursday": "7:00pm","Friday": "7:00pm" },
83
+ {"": "Team meeting", "Wednesday": "10:00am" },
84
+ {"": "Morning workout", "Monday": "8:00am", "Tuesday": "8:00am", "Wednesday": "8:00am", "Thursday": "8:00am", "Friday": "8:00am" }
85
+ ]'
86
+ &gt;
87
+ &lt;/auro-table&gt;
88
+ &lt;auro-table&gt;
89
+ &lt;table&gt;
90
+ &lt;thead&gt;
91
+ &lt;tr&gt;
92
+ &lt;th&gt;&lt;/th&gt;
93
+ &lt;th&gt;Monday&lt;/th&gt;
94
+ &lt;th&gt;Tuesday&lt;/th&gt;
95
+ &lt;th&gt;Wednesday&lt;/th&gt;
96
+ &lt;th&gt;Thursday&lt;/th&gt;
97
+ &lt;th&gt;Friday&lt;/th&gt;
98
+ &lt;th&gt;Saturday&lt;/th&gt;
99
+ &lt;th&gt;Sunday&lt;/th&gt;
100
+ &lt;/tr&gt;
101
+ &lt;/thead&gt;
102
+ &lt;tbody&gt;
103
+ &lt;tr&gt;
104
+ &lt;td&gt;Dance class&lt;/td&gt;
105
+ &lt;td&gt;5:00pm&lt;/td&gt;
106
+ &lt;td&gt;&lt;/td&gt;
107
+ &lt;td&gt;5:00pm&lt;/td&gt;
108
+ &lt;td&gt;&lt;/td&gt;
109
+ &lt;td&gt;&lt;/td&gt;
110
+ &lt;td&gt;&lt;/td&gt;
111
+ &lt;td&gt;&lt;/td&gt;
112
+ &lt;/tr&gt;
113
+ &lt;tr&gt;
114
+ &lt;td&gt;Night classes&lt;/td&gt;
115
+ &lt;td&gt;&lt;/td&gt;
116
+ &lt;td&gt;&lt;/td&gt;
117
+ &lt;td&gt;&lt;/td&gt;
118
+ &lt;td&gt;7:00pm&lt;/td&gt;
119
+ &lt;td&gt;7:00pm&lt;/td&gt;
120
+ &lt;td&gt;&lt;/td&gt;
121
+ &lt;td&gt;&lt;/td&gt;
122
+ &lt;/tr&gt;
123
+ &lt;tr&gt;
124
+ &lt;td&gt;Team meeting&lt;/td&gt;
125
+ &lt;td&gt;&lt;/td&gt;
126
+ &lt;td&gt;&lt;/td&gt;
127
+ &lt;td&gt;10:00am&lt;/td&gt;
128
+ &lt;td&gt;&lt;/td&gt;
129
+ &lt;td&gt;&lt;/td&gt;
130
+ &lt;td&gt;&lt;/td&gt;
131
+ &lt;td&gt;&lt;/td&gt;
132
+ &lt;/tr&gt;
133
+ &lt;tr&gt;
134
+ &lt;td&gt;Morning workout&lt;/td&gt;
135
+ &lt;td&gt;8:00am&lt;/td&gt;
136
+ &lt;td&gt;8:00am&lt;/td&gt;
137
+ &lt;td&gt;8:00am&lt;/td&gt;
138
+ &lt;td&gt;8:00am&lt;/td&gt;
139
+ &lt;td&gt;8:00am&lt;/td&gt;
140
+ &lt;td&gt;&lt;/td&gt;
141
+ &lt;td&gt;&lt;/td&gt;
142
+ &lt;/tr&gt;
143
+ &lt;/tbody&gt;
144
+ &lt;/table&gt;
145
+ &lt;/auro-table&gt;</code></pre>
146
+ <!-- AURO-GENERATED-CONTENT:END -->
147
+
148
+ ## Custom Component Registration for Version Management
149
+
150
+ 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.
151
+ The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
152
+
153
+ When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
154
+
155
+ However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
156
+
157
+ You can do this by importing only the component class and using the `register(name)` method with a unique name:
158
+
159
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
160
+ <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
161
+
162
+ <pre class="language-js"><code class="language-js">// Import the class only
163
+ import { AuroTable } from '@aurodesignsystem/auro-table/class';
164
+ ​
165
+ // Register with a custom name if desired
166
+ AuroTable.register('custom-table');</code></pre>
167
+
168
+ This will create a new custom element `<custom-table>` that behaves exactly like `<auro-table>`, allowing both to coexist on the same page without interfering with each other.
169
+ <!-- AURO-GENERATED-CONTENT:END -->
170
+ <div class="exampleWrapper exampleWrapper--flex">
171
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
172
+ <!-- The below content is automatically added from ./apiExamples/custom.html -->
173
+ <custom-table>
174
+ <table>
175
+ <thead>
176
+ <tr>
177
+ <th></th>
178
+ <th>Monday</th>
179
+ <th>Tuesday</th>
180
+ <th>Wednesday</th>
181
+ <th>Thursday</th>
182
+ <th>Friday</th>
183
+ <th>Saturday</th>
184
+ <th>Sunday</th>
185
+ </tr>
186
+ </thead>
187
+ <tbody>
188
+ <tr>
189
+ <td>Dance class</td>
190
+ <td>5:00pm</td>
191
+ <td></td>
192
+ <td>5:00pm</td>
193
+ <td></td>
194
+ <td></td>
195
+ <td></td>
196
+ <td></td>
197
+ </tr>
198
+ <tr>
199
+ <td>Night classes</td>
200
+ <td></td>
201
+ <td></td>
202
+ <td></td>
203
+ <td>7:00pm</td>
204
+ <td>7:00pm</td>
205
+ <td></td>
206
+ <td></td>
207
+ </tr>
208
+ <tr>
209
+ <td>Team meeting</td>
210
+ <td></td>
211
+ <td></td>
212
+ <td>10:00am</td>
213
+ <td></td>
214
+ <td></td>
215
+ <td></td>
216
+ <td></td>
217
+ </tr>
218
+ <tr>
219
+ <td>Morning workout</td>
220
+ <td>8:00am</td>
221
+ <td>8:00am</td>
222
+ <td>8:00am</td>
223
+ <td>8:00am</td>
224
+ <td>8:00am</td>
225
+ <td></td>
226
+ <td></td>
227
+ </tr>
228
+ </tbody>
229
+ </table>
230
+ </custom-table>
231
+ <!-- AURO-GENERATED-CONTENT:END -->
232
+ </div>
233
+ <auro-accordion alignRight>
234
+ <span slot="trigger">See code</span>
235
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
236
+ <!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
237
+
238
+ <pre class="language-html"><code class="language-html">&lt;custom-table&gt;
239
+ &lt;table&gt;
240
+ &lt;thead&gt;
241
+ &lt;tr&gt;
242
+ &lt;th&gt;&lt;/th&gt;
243
+ &lt;th&gt;Monday&lt;/th&gt;
244
+ &lt;th&gt;Tuesday&lt;/th&gt;
245
+ &lt;th&gt;Wednesday&lt;/th&gt;
246
+ &lt;th&gt;Thursday&lt;/th&gt;
247
+ &lt;th&gt;Friday&lt;/th&gt;
248
+ &lt;th&gt;Saturday&lt;/th&gt;
249
+ &lt;th&gt;Sunday&lt;/th&gt;
250
+ &lt;/tr&gt;
251
+ &lt;/thead&gt;
252
+ &lt;tbody&gt;
253
+ &lt;tr&gt;
254
+ &lt;td&gt;Dance class&lt;/td&gt;
255
+ &lt;td&gt;5:00pm&lt;/td&gt;
256
+ &lt;td&gt;&lt;/td&gt;
257
+ &lt;td&gt;5:00pm&lt;/td&gt;
258
+ &lt;td&gt;&lt;/td&gt;
259
+ &lt;td&gt;&lt;/td&gt;
260
+ &lt;td&gt;&lt;/td&gt;
261
+ &lt;td&gt;&lt;/td&gt;
262
+ &lt;/tr&gt;
263
+ &lt;tr&gt;
264
+ &lt;td&gt;Night classes&lt;/td&gt;
265
+ &lt;td&gt;&lt;/td&gt;
266
+ &lt;td&gt;&lt;/td&gt;
267
+ &lt;td&gt;&lt;/td&gt;
268
+ &lt;td&gt;7:00pm&lt;/td&gt;
269
+ &lt;td&gt;7:00pm&lt;/td&gt;
270
+ &lt;td&gt;&lt;/td&gt;
271
+ &lt;td&gt;&lt;/td&gt;
272
+ &lt;/tr&gt;
273
+ &lt;tr&gt;
274
+ &lt;td&gt;Team meeting&lt;/td&gt;
275
+ &lt;td&gt;&lt;/td&gt;
276
+ &lt;td&gt;&lt;/td&gt;
277
+ &lt;td&gt;10:00am&lt;/td&gt;
278
+ &lt;td&gt;&lt;/td&gt;
279
+ &lt;td&gt;&lt;/td&gt;
280
+ &lt;td&gt;&lt;/td&gt;
281
+ &lt;td&gt;&lt;/td&gt;
282
+ &lt;/tr&gt;
283
+ &lt;tr&gt;
284
+ &lt;td&gt;Morning workout&lt;/td&gt;
285
+ &lt;td&gt;8:00am&lt;/td&gt;
286
+ &lt;td&gt;8:00am&lt;/td&gt;
287
+ &lt;td&gt;8:00am&lt;/td&gt;
288
+ &lt;td&gt;8:00am&lt;/td&gt;
289
+ &lt;td&gt;8:00am&lt;/td&gt;
290
+ &lt;td&gt;&lt;/td&gt;
291
+ &lt;td&gt;&lt;/td&gt;
292
+ &lt;/tr&gt;
293
+ &lt;/tbody&gt;
294
+ &lt;/table&gt;
295
+ &lt;/custom-table&gt;</code></pre>
296
+ <!-- AURO-GENERATED-CONTENT:END -->
297
+ </auro-accordion>
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "================================================================================"
8
8
  ],
9
9
  "name": "@aurodesignsystem-dev/auro-table",
10
- "version": "0.0.0-pr161.0",
10
+ "version": "0.0.0-pr162.0",
11
11
  "description": "auro-table HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",