@aurodesignsystem-dev/auro-table 0.0.0-pr142.1 → 0.0.0-pr144.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/README.md +37 -229
- package/custom-elements.json +14 -430
- package/demo/api.html +1 -1
- package/demo/api.md +32 -32
- package/demo/auro-table.min.js +25 -5
- package/demo/index.html +1 -1
- package/demo/index.md +25 -119
- package/dist/auro-table-C52RNUva.js +12 -0
- package/dist/index.d.ts +185 -18
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +10 -6
- package/dist/auro-table-Dx0M-P1P.js +0 -12
package/README.md
CHANGED
|
@@ -15,260 +15,68 @@ 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
|
-
#
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
# {{ capitalize name }}
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
|
-
<!--
|
|
24
|
-
|
|
25
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
23
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
24
|
+
|
|
26
25
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
27
|
-
<!--
|
|
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
|
-
## UI development browser support
|
|
26
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
## Use Cases
|
|
29
|
+
|
|
30
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
31
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
35
32
|
|
|
36
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
37
|
-
|
|
38
33
|
## Install
|
|
39
34
|
|
|
40
35
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
|
|
41
|
-
|
|
42
|
-
[](https://www.npmjs.com/package/@aurodesignsystem/auro-table)
|
|
43
|
-
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
44
|
-

|
|
45
|
-
|
|
46
|
-
```shell
|
|
47
|
-
$ npm i @aurodesignsystem/auro-table
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
51
|
-
|
|
52
|
-
### Design Token CSS Custom Property dependency
|
|
53
|
-
|
|
54
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
|
|
55
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
36
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
56
37
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### Define dependency in project component
|
|
38
|
+
### Define Dependency in Project
|
|
60
39
|
|
|
61
40
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
62
|
-
|
|
41
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
63
42
|
|
|
64
|
-
<!-- AURO-GENERATED-CONTENT:
|
|
65
|
-
<!-- AURO-GENERATED-CONTENT:
|
|
66
|
-
|
|
67
|
-
```js
|
|
68
|
-
import "@aurodesignsystem/auro-table";
|
|
69
|
-
```
|
|
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 -->
|
|
70
45
|
|
|
71
|
-
|
|
72
|
-
**Reference component in HTML**
|
|
73
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
74
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
75
|
-
|
|
76
|
-
```html
|
|
77
|
-
<auro-table
|
|
78
|
-
columnHeaders='["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]'
|
|
79
|
-
componentData='[
|
|
80
|
-
{"": "Dance class", "Monday": "5:00pm","Wednesday": "5:00pm" },
|
|
81
|
-
{"": "Night classes", "Thursday": "7:00pm","Friday": "7:00pm" },
|
|
82
|
-
{"": "Team meeting", "Wednesday": "10:00am" },
|
|
83
|
-
{"": "Morning workout", "Monday": "8:00am", "Tuesday": "8:00am", "Wednesday": "8:00am", "Thursday": "8:00am", "Friday": "8:00am" }
|
|
84
|
-
]'
|
|
85
|
-
>
|
|
86
|
-
</auro-table>
|
|
87
|
-
<auro-table>
|
|
88
|
-
<table>
|
|
89
|
-
<thead>
|
|
90
|
-
<tr>
|
|
91
|
-
<th></th>
|
|
92
|
-
<th>Monday</th>
|
|
93
|
-
<th>Tuesday</th>
|
|
94
|
-
<th>Wednesday</th>
|
|
95
|
-
<th>Thursday</th>
|
|
96
|
-
<th>Friday</th>
|
|
97
|
-
<th>Saturday</th>
|
|
98
|
-
<th>Sunday</th>
|
|
99
|
-
</tr>
|
|
100
|
-
</thead>
|
|
101
|
-
<tbody>
|
|
102
|
-
<tr>
|
|
103
|
-
<td>Dance class</td>
|
|
104
|
-
<td>5:00pm</td>
|
|
105
|
-
<td></td>
|
|
106
|
-
<td>5:00pm</td>
|
|
107
|
-
<td></td>
|
|
108
|
-
<td></td>
|
|
109
|
-
<td></td>
|
|
110
|
-
<td></td>
|
|
111
|
-
</tr>
|
|
112
|
-
<tr>
|
|
113
|
-
<td>Night classes</td>
|
|
114
|
-
<td></td>
|
|
115
|
-
<td></td>
|
|
116
|
-
<td></td>
|
|
117
|
-
<td>7:00pm</td>
|
|
118
|
-
<td>7:00pm</td>
|
|
119
|
-
<td></td>
|
|
120
|
-
<td></td>
|
|
121
|
-
</tr>
|
|
122
|
-
<tr>
|
|
123
|
-
<td>Team meeting</td>
|
|
124
|
-
<td></td>
|
|
125
|
-
<td></td>
|
|
126
|
-
<td>10:00am</td>
|
|
127
|
-
<td></td>
|
|
128
|
-
<td></td>
|
|
129
|
-
<td></td>
|
|
130
|
-
<td></td>
|
|
131
|
-
</tr>
|
|
132
|
-
<tr>
|
|
133
|
-
<td>Morning workout</td>
|
|
134
|
-
<td>8:00am</td>
|
|
135
|
-
<td>8:00am</td>
|
|
136
|
-
<td>8:00am</td>
|
|
137
|
-
<td>8:00am</td>
|
|
138
|
-
<td>8:00am</td>
|
|
139
|
-
<td></td>
|
|
140
|
-
<td></td>
|
|
141
|
-
</tr>
|
|
142
|
-
</tbody>
|
|
143
|
-
</table>
|
|
144
|
-
</auro-table>
|
|
145
|
-
```
|
|
146
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
147
|
-
|
|
148
|
-
## Use CDN
|
|
46
|
+
### Use CDN
|
|
149
47
|
|
|
150
48
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
151
|
-
|
|
49
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
152
50
|
|
|
153
|
-
|
|
154
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-table@latest/+esm"></script>
|
|
155
|
-
```
|
|
51
|
+
## Basic Example
|
|
156
52
|
|
|
157
|
-
<!-- AURO-GENERATED-CONTENT:
|
|
158
|
-
|
|
159
|
-
## auro-table use cases
|
|
53
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
54
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
160
55
|
|
|
161
|
-
|
|
162
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
163
|
-
The `<auro-table>` element should be used in situations where users may:
|
|
56
|
+
## Custom Component Registration for Version Management
|
|
164
57
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
## API Code Examples
|
|
169
|
-
|
|
170
|
-
### Default auro-table
|
|
58
|
+
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.
|
|
59
|
+
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
171
60
|
|
|
172
|
-
|
|
173
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
174
|
-
|
|
175
|
-
```html
|
|
176
|
-
<auro-table
|
|
177
|
-
columnHeaders='["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]'
|
|
178
|
-
componentData='[
|
|
179
|
-
{"": "Dance class", "Monday": "5:00pm","Wednesday": "5:00pm" },
|
|
180
|
-
{"": "Night classes", "Thursday": "7:00pm","Friday": "7:00pm" },
|
|
181
|
-
{"": "Team meeting", "Wednesday": "10:00am" },
|
|
182
|
-
{"": "Morning workout", "Monday": "8:00am", "Tuesday": "8:00am", "Wednesday": "8:00am", "Thursday": "8:00am", "Friday": "8:00am" }
|
|
183
|
-
]'
|
|
184
|
-
>
|
|
185
|
-
</auro-table>
|
|
186
|
-
<auro-table>
|
|
187
|
-
<table>
|
|
188
|
-
<thead>
|
|
189
|
-
<tr>
|
|
190
|
-
<th></th>
|
|
191
|
-
<th>Monday</th>
|
|
192
|
-
<th>Tuesday</th>
|
|
193
|
-
<th>Wednesday</th>
|
|
194
|
-
<th>Thursday</th>
|
|
195
|
-
<th>Friday</th>
|
|
196
|
-
<th>Saturday</th>
|
|
197
|
-
<th>Sunday</th>
|
|
198
|
-
</tr>
|
|
199
|
-
</thead>
|
|
200
|
-
<tbody>
|
|
201
|
-
<tr>
|
|
202
|
-
<td>Dance class</td>
|
|
203
|
-
<td>5:00pm</td>
|
|
204
|
-
<td></td>
|
|
205
|
-
<td>5:00pm</td>
|
|
206
|
-
<td></td>
|
|
207
|
-
<td></td>
|
|
208
|
-
<td></td>
|
|
209
|
-
<td></td>
|
|
210
|
-
</tr>
|
|
211
|
-
<tr>
|
|
212
|
-
<td>Night classes</td>
|
|
213
|
-
<td></td>
|
|
214
|
-
<td></td>
|
|
215
|
-
<td></td>
|
|
216
|
-
<td>7:00pm</td>
|
|
217
|
-
<td>7:00pm</td>
|
|
218
|
-
<td></td>
|
|
219
|
-
<td></td>
|
|
220
|
-
</tr>
|
|
221
|
-
<tr>
|
|
222
|
-
<td>Team meeting</td>
|
|
223
|
-
<td></td>
|
|
224
|
-
<td></td>
|
|
225
|
-
<td>10:00am</td>
|
|
226
|
-
<td></td>
|
|
227
|
-
<td></td>
|
|
228
|
-
<td></td>
|
|
229
|
-
<td></td>
|
|
230
|
-
</tr>
|
|
231
|
-
<tr>
|
|
232
|
-
<td>Morning workout</td>
|
|
233
|
-
<td>8:00am</td>
|
|
234
|
-
<td>8:00am</td>
|
|
235
|
-
<td>8:00am</td>
|
|
236
|
-
<td>8:00am</td>
|
|
237
|
-
<td>8:00am</td>
|
|
238
|
-
<td></td>
|
|
239
|
-
<td></td>
|
|
240
|
-
</tr>
|
|
241
|
-
</tbody>
|
|
242
|
-
</table>
|
|
243
|
-
</auro-table>
|
|
244
|
-
```
|
|
245
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
246
|
-
|
|
247
|
-
## Development
|
|
61
|
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
248
62
|
|
|
249
|
-
|
|
250
|
-
In order to develop against this project, if you are not part of the core team, you will be required to fork the project prior to submitting a pull request.
|
|
63
|
+
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.
|
|
251
64
|
|
|
252
|
-
|
|
65
|
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
253
66
|
|
|
254
|
-
<!-- AURO-GENERATED-CONTENT:
|
|
255
|
-
|
|
256
|
-
### Start development environment
|
|
67
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
68
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
257
69
|
|
|
258
|
-
|
|
259
|
-
|
|
70
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
71
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
72
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
73
|
+
</div>
|
|
260
74
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
```
|
|
75
|
+
<auro-accordion alignRight>
|
|
76
|
+
<span slot="trigger">See code</span>
|
|
264
77
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
268
|
-
|
|
269
|
-
### Testing
|
|
78
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
|
|
79
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
270
80
|
|
|
271
|
-
|
|
272
|
-
Automated tests are required for every Auro component. See `.\test\auro-table.test.js` for the tests for this component. Run `npm run test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
|
|
81
|
+
</auro-accordion>
|
|
273
82
|
|
|
274
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|