@aurodesignsystem-dev/auro-table 0.0.0-pr144.0 → 0.0.0-pr145.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.
Files changed (2) hide show
  1. package/README.md +251 -24
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -15,44 +15,144 @@ The following sections are editable by making changes to the following files:
15
15
  | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
16
  | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
17
  | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
- -->
19
-
20
- # {{ capitalize name }}
18
+ -->
19
+
20
+ # Table
21
21
 
22
22
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
- <!-- AURO-GENERATED-CONTENT:END -->
24
-
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 -->
25
26
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
26
- <!-- AURO-GENERATED-CONTENT:END -->
27
-
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
+
28
31
  ## Use Cases
29
32
 
30
33
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
31
- <!-- AURO-GENERATED-CONTENT:END -->
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:
32
36
 
37
+ * Show static or dynamic tabular data or content
38
+ <!-- AURO-GENERATED-CONTENT:END -->
39
+
33
40
  ## Install
34
41
 
35
42
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
36
- <!-- AURO-GENERATED-CONTENT:END -->
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
+ ```shell
49
+ $ npm i @aurodesignsystem/auro-table
50
+ ```
37
51
 
52
+ <!-- AURO-GENERATED-CONTENT:END -->
53
+
38
54
  ### Define Dependency in Project
39
55
 
40
56
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
41
- <!-- AURO-GENERATED-CONTENT:END -->
57
+ Defining the dependency within each project that is using the `<auro-table>` component.
42
58
 
43
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
44
- <!-- AURO-GENERATED-CONTENT:END -->
59
+ <!-- AURO-GENERATED-CONTENT:END -->
60
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
61
+
62
+ ```js
63
+ import "@aurodesignsystem/auro-table";
64
+ ```
45
65
 
66
+ <!-- AURO-GENERATED-CONTENT:END -->
67
+
46
68
  ### Use CDN
47
69
 
48
70
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
49
- <!-- AURO-GENERATED-CONTENT:END -->
71
+ 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.
50
72
 
73
+ ```html
74
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-table@latest/+esm"></script>
75
+ ```
76
+
77
+ <!-- AURO-GENERATED-CONTENT:END -->
78
+
51
79
  ## Basic Example
52
80
 
53
81
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
54
- <!-- AURO-GENERATED-CONTENT:END -->
55
-
82
+ <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
83
+
84
+ ```html
85
+ <auro-table
86
+ columnHeaders='["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]'
87
+ componentData='[
88
+ {"": "Dance class", "Monday": "5:00pm","Wednesday": "5:00pm" },
89
+ {"": "Night classes", "Thursday": "7:00pm","Friday": "7:00pm" },
90
+ {"": "Team meeting", "Wednesday": "10:00am" },
91
+ {"": "Morning workout", "Monday": "8:00am", "Tuesday": "8:00am", "Wednesday": "8:00am", "Thursday": "8:00am", "Friday": "8:00am" }
92
+ ]'
93
+ >
94
+ </auro-table>
95
+ <auro-table>
96
+ <table>
97
+ <thead>
98
+ <tr>
99
+ <th></th>
100
+ <th>Monday</th>
101
+ <th>Tuesday</th>
102
+ <th>Wednesday</th>
103
+ <th>Thursday</th>
104
+ <th>Friday</th>
105
+ <th>Saturday</th>
106
+ <th>Sunday</th>
107
+ </tr>
108
+ </thead>
109
+ <tbody>
110
+ <tr>
111
+ <td>Dance class</td>
112
+ <td>5:00pm</td>
113
+ <td></td>
114
+ <td>5:00pm</td>
115
+ <td></td>
116
+ <td></td>
117
+ <td></td>
118
+ <td></td>
119
+ </tr>
120
+ <tr>
121
+ <td>Night classes</td>
122
+ <td></td>
123
+ <td></td>
124
+ <td></td>
125
+ <td>7:00pm</td>
126
+ <td>7:00pm</td>
127
+ <td></td>
128
+ <td></td>
129
+ </tr>
130
+ <tr>
131
+ <td>Team meeting</td>
132
+ <td></td>
133
+ <td></td>
134
+ <td>10:00am</td>
135
+ <td></td>
136
+ <td></td>
137
+ <td></td>
138
+ <td></td>
139
+ </tr>
140
+ <tr>
141
+ <td>Morning workout</td>
142
+ <td>8:00am</td>
143
+ <td>8:00am</td>
144
+ <td>8:00am</td>
145
+ <td>8:00am</td>
146
+ <td>8:00am</td>
147
+ <td></td>
148
+ <td></td>
149
+ </tr>
150
+ </tbody>
151
+ </table>
152
+ </auro-table>
153
+ ```
154
+ <!-- AURO-GENERATED-CONTENT:END -->
155
+
56
156
  ## Custom Component Registration for Version Management
57
157
 
58
158
  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.
@@ -65,18 +165,145 @@ However, if you need to load multiple versions of the same component on a single
65
165
  You can do this by importing only the component class and using the `register(name)` method with a unique name:
66
166
 
67
167
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
68
- <!-- AURO-GENERATED-CONTENT:END -->
168
+ <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
169
+
170
+ ```js
171
+ // Import the class only
172
+ import { AuroTable } from '@aurodesignsystem/auro-table/class';
69
173
 
174
+ // Register with a custom name if desired
175
+ AuroTable.register('custom-table');
176
+ ```
177
+
178
+ 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.
179
+ <!-- AURO-GENERATED-CONTENT:END -->
70
180
  <div class="exampleWrapper exampleWrapper--flex">
71
181
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
182
+ <!-- The below content is automatically added from ./apiExamples/custom.html -->
183
+ <custom-table>
184
+ <table>
185
+ <thead>
186
+ <tr>
187
+ <th></th>
188
+ <th>Monday</th>
189
+ <th>Tuesday</th>
190
+ <th>Wednesday</th>
191
+ <th>Thursday</th>
192
+ <th>Friday</th>
193
+ <th>Saturday</th>
194
+ <th>Sunday</th>
195
+ </tr>
196
+ </thead>
197
+ <tbody>
198
+ <tr>
199
+ <td>Dance class</td>
200
+ <td>5:00pm</td>
201
+ <td></td>
202
+ <td>5:00pm</td>
203
+ <td></td>
204
+ <td></td>
205
+ <td></td>
206
+ <td></td>
207
+ </tr>
208
+ <tr>
209
+ <td>Night classes</td>
210
+ <td></td>
211
+ <td></td>
212
+ <td></td>
213
+ <td>7:00pm</td>
214
+ <td>7:00pm</td>
215
+ <td></td>
216
+ <td></td>
217
+ </tr>
218
+ <tr>
219
+ <td>Team meeting</td>
220
+ <td></td>
221
+ <td></td>
222
+ <td>10:00am</td>
223
+ <td></td>
224
+ <td></td>
225
+ <td></td>
226
+ <td></td>
227
+ </tr>
228
+ <tr>
229
+ <td>Morning workout</td>
230
+ <td>8:00am</td>
231
+ <td>8:00am</td>
232
+ <td>8:00am</td>
233
+ <td>8:00am</td>
234
+ <td>8:00am</td>
235
+ <td></td>
236
+ <td></td>
237
+ </tr>
238
+ </tbody>
239
+ </table>
240
+ </custom-table>
72
241
  <!-- AURO-GENERATED-CONTENT:END -->
73
- </div>
74
-
242
+ </div>
75
243
  <auro-accordion alignRight>
76
- <span slot="trigger">See code</span>
77
-
244
+ <span slot="trigger">See code</span>
78
245
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
79
- <!-- AURO-GENERATED-CONTENT:END -->
80
-
81
- </auro-accordion>
82
-
246
+ <!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
247
+
248
+ ```html
249
+ <custom-table>
250
+ <table>
251
+ <thead>
252
+ <tr>
253
+ <th></th>
254
+ <th>Monday</th>
255
+ <th>Tuesday</th>
256
+ <th>Wednesday</th>
257
+ <th>Thursday</th>
258
+ <th>Friday</th>
259
+ <th>Saturday</th>
260
+ <th>Sunday</th>
261
+ </tr>
262
+ </thead>
263
+ <tbody>
264
+ <tr>
265
+ <td>Dance class</td>
266
+ <td>5:00pm</td>
267
+ <td></td>
268
+ <td>5:00pm</td>
269
+ <td></td>
270
+ <td></td>
271
+ <td></td>
272
+ <td></td>
273
+ </tr>
274
+ <tr>
275
+ <td>Night classes</td>
276
+ <td></td>
277
+ <td></td>
278
+ <td></td>
279
+ <td>7:00pm</td>
280
+ <td>7:00pm</td>
281
+ <td></td>
282
+ <td></td>
283
+ </tr>
284
+ <tr>
285
+ <td>Team meeting</td>
286
+ <td></td>
287
+ <td></td>
288
+ <td>10:00am</td>
289
+ <td></td>
290
+ <td></td>
291
+ <td></td>
292
+ <td></td>
293
+ </tr>
294
+ <tr>
295
+ <td>Morning workout</td>
296
+ <td>8:00am</td>
297
+ <td>8:00am</td>
298
+ <td>8:00am</td>
299
+ <td>8:00am</td>
300
+ <td>8:00am</td>
301
+ <td></td>
302
+ <td></td>
303
+ </tr>
304
+ </tbody>
305
+ </table>
306
+ </custom-table>
307
+ ```
308
+ <!-- AURO-GENERATED-CONTENT:END -->
309
+ </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-pr144.0",
10
+ "version": "0.0.0-pr145.0",
11
11
  "description": "auro-table HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "lit": "^3.3.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@aurodesignsystem/auro-cli": "^3.5.0",
27
+ "@aurodesignsystem/auro-cli": "^3.5.1",
28
28
  "@aurodesignsystem/auro-config": "^1.3.1",
29
29
  "@aurodesignsystem/auro-library": "^5.5.4",
30
30
  "@aurodesignsystem/design-tokens": "^8.7.0",