@aurodesignsystem-dev/auro-carousel 0.0.0-pr142.2 → 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 +1 -1
- package/custom-elements.json +396 -0
- package/demo/api.md +9 -9
- package/demo/api.min.js +5 -5
- package/demo/index.md +5 -5
- package/demo/index.min.js +5 -5
- package/demo/readme.md +1 -1
- package/dist/{auro-carousel-acFfUyJs.js → auro-carousel-OBRWwlpL.js} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ The following sections are editable by making changes to the following files:
|
|
|
34
34
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
35
|
Use `<auro-carousel>` when people need to:
|
|
36
36
|
|
|
37
|
-
* Scroll through flight date options
|
|
37
|
+
* Scroll through flight date options, such as dates just before and after a chosen date
|
|
38
38
|
* Scroll through images
|
|
39
39
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
40
|
|
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/auro-carousel.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.\n\n**Key capabilities:**\n- **Scroll buttons**: Shows left and right buttons on screens at least 576 pixels wide when the carousel can scroll that way, or at all times when you add `displayArrows`.\n- **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.\n- **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.\n- **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.",
|
|
12
|
+
"name": "AuroCarousel",
|
|
13
|
+
"cssProperties": [
|
|
14
|
+
{
|
|
15
|
+
"description": "Color at the outer edge of the fade shown beside each scroll button.",
|
|
16
|
+
"name": "--ds-auro-carousel-gradient-color-one"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Color at the inner edge of the fade shown beside each scroll button.",
|
|
20
|
+
"name": "--ds-auro-carousel-gradient-color-two"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"cssParts": [
|
|
24
|
+
{
|
|
25
|
+
"description": "The scrollable `<div>` that wraps the scroll buttons and the slotted elements.",
|
|
26
|
+
"name": "wrapper"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"slots": [
|
|
30
|
+
{
|
|
31
|
+
"description": "The elements to scroll through, such as `auro-pane` elements or images.",
|
|
32
|
+
"name": ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"description": "Text that screen readers announce as the carousel's name, for example \"Flight date options\". Required unless you set the `label` attribute. Takes priority over `label` when both are set.",
|
|
36
|
+
"name": "ariaLabel"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"description": "Text that screen readers announce for the left scroll button, for example \"Show earlier dates\". Defaults to \"Scroll left\".",
|
|
40
|
+
"name": "ariaLabel.scroll.left"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"description": "Text that screen readers announce for the right scroll button, for example \"Show later dates\". Defaults to \"Scroll right\".",
|
|
44
|
+
"name": "ariaLabel.scroll.right"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"members": [
|
|
48
|
+
{
|
|
49
|
+
"kind": "method",
|
|
50
|
+
"name": "_initializeDefaults",
|
|
51
|
+
"type": {
|
|
52
|
+
"text": "_initializeDefaults() => void"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"kind": "method",
|
|
57
|
+
"name": "actionOnChildrenReady",
|
|
58
|
+
"description": "Waits for the slotted elements to finish updating, then scrolls to the selected one.",
|
|
59
|
+
"privacy": "private",
|
|
60
|
+
"return": {
|
|
61
|
+
"type": {
|
|
62
|
+
"text": "void"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"kind": "method",
|
|
68
|
+
"name": "centerElement",
|
|
69
|
+
"parameters": [
|
|
70
|
+
{
|
|
71
|
+
"name": "el",
|
|
72
|
+
"description": "The element to center inside the carousel. Must be a descendant of the carousel.",
|
|
73
|
+
"type": {
|
|
74
|
+
"text": "Element"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"description": "Centers the given element inside the carousel.",
|
|
79
|
+
"return": {
|
|
80
|
+
"type": {
|
|
81
|
+
"text": "void"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"type": {
|
|
85
|
+
"text": "centerElement(el: Element) => void"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"kind": "field",
|
|
90
|
+
"name": "displayArrows",
|
|
91
|
+
"privacy": "public",
|
|
92
|
+
"type": {
|
|
93
|
+
"text": "boolean"
|
|
94
|
+
},
|
|
95
|
+
"description": "Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens.",
|
|
96
|
+
"attribute": "displayarrows"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "method",
|
|
100
|
+
"name": "handleClick",
|
|
101
|
+
"parameters": [
|
|
102
|
+
{
|
|
103
|
+
"name": "scrollRight",
|
|
104
|
+
"description": "If true, scrolls the carousel right. If false, scrolls it left.",
|
|
105
|
+
"type": {
|
|
106
|
+
"text": "boolean"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"description": "Scrolls the carousel by `scrollDistance` and dispatches a `scrollRight` or `scrollLeft` event.",
|
|
111
|
+
"privacy": "private",
|
|
112
|
+
"return": {
|
|
113
|
+
"type": {
|
|
114
|
+
"text": "void"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"kind": "method",
|
|
120
|
+
"name": "handleSlotChange",
|
|
121
|
+
"description": "Called when the slotted content changes. Updates the scroll flags and restarts observing the\nslotted elements.",
|
|
122
|
+
"privacy": "private",
|
|
123
|
+
"return": {
|
|
124
|
+
"type": {
|
|
125
|
+
"text": "void"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"kind": "method",
|
|
131
|
+
"name": "isSmallScreen",
|
|
132
|
+
"description": "Checks whether the screen is narrower than the `sm` breakpoint.",
|
|
133
|
+
"privacy": "private",
|
|
134
|
+
"return": {
|
|
135
|
+
"type": {
|
|
136
|
+
"text": "boolean"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"kind": "method",
|
|
142
|
+
"name": "observeChildren",
|
|
143
|
+
"description": "Starts observing each slotted element with the intersection observer.",
|
|
144
|
+
"privacy": "private",
|
|
145
|
+
"return": {
|
|
146
|
+
"type": {
|
|
147
|
+
"text": "void"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"kind": "method",
|
|
153
|
+
"name": "register",
|
|
154
|
+
"static": true,
|
|
155
|
+
"parameters": [
|
|
156
|
+
{
|
|
157
|
+
"name": "name",
|
|
158
|
+
"default": "\"auro-carousel\"",
|
|
159
|
+
"description": "The tag name to register the element under.",
|
|
160
|
+
"optional": true,
|
|
161
|
+
"type": {
|
|
162
|
+
"text": "string"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"description": "Registers the element with the browser under a tag name.",
|
|
167
|
+
"return": {
|
|
168
|
+
"type": {
|
|
169
|
+
"text": "void"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"type": {
|
|
173
|
+
"text": "register(name?: string = \"auro-carousel\") => void"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"kind": "method",
|
|
178
|
+
"name": "scrollCarousel",
|
|
179
|
+
"parameters": [
|
|
180
|
+
{
|
|
181
|
+
"name": "num",
|
|
182
|
+
"description": "The number of pixels to scroll the carousel by. Positive scrolls to the\nright, negative scrolls to the left.",
|
|
183
|
+
"type": {
|
|
184
|
+
"text": "number"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"description": "Scrolls the carousel by the given amount.",
|
|
189
|
+
"return": {
|
|
190
|
+
"type": {
|
|
191
|
+
"text": "void"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"type": {
|
|
195
|
+
"text": "scrollCarousel(num: number) => void"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "field",
|
|
200
|
+
"name": "scrollDistance",
|
|
201
|
+
"privacy": "public",
|
|
202
|
+
"type": {
|
|
203
|
+
"text": "number"
|
|
204
|
+
},
|
|
205
|
+
"description": "Sets how many pixels the carousel scrolls when someone selects the left or right button.",
|
|
206
|
+
"default": "300",
|
|
207
|
+
"attribute": "scrolldistance",
|
|
208
|
+
"reflects": true
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"kind": "method",
|
|
212
|
+
"name": "scrollToSelected",
|
|
213
|
+
"description": "Scrolls the first element that has the `selected` attribute to the center of the carousel.",
|
|
214
|
+
"return": {
|
|
215
|
+
"type": {
|
|
216
|
+
"text": "void"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"type": {
|
|
220
|
+
"text": "scrollToSelected() => void"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"kind": "method",
|
|
225
|
+
"name": "setScrollFlags",
|
|
226
|
+
"parameters": [
|
|
227
|
+
{
|
|
228
|
+
"name": "autofocus",
|
|
229
|
+
"description": "If true, focuses the first element when the carousel is scrolled to the\nstart, or the last element when it's scrolled to the end. If false, doesn't change focus.",
|
|
230
|
+
"type": {
|
|
231
|
+
"text": "boolean"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"description": "Sets whether the carousel is scrolled to the start or to the end.",
|
|
236
|
+
"privacy": "private",
|
|
237
|
+
"return": {
|
|
238
|
+
"type": {
|
|
239
|
+
"text": "void"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"kind": "method",
|
|
245
|
+
"name": "setUpIntersectionObserver",
|
|
246
|
+
"description": "Sets up the intersection observer. Elements scrolled out of view are removed from the tab order\nand hidden from screen readers, and elements scrolled into view are restored. On small screens,\nthe observer isn't set up.",
|
|
247
|
+
"privacy": "private",
|
|
248
|
+
"return": {
|
|
249
|
+
"type": {
|
|
250
|
+
"text": "void"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"kind": "method",
|
|
256
|
+
"name": "setUpResizeObserver",
|
|
257
|
+
"description": "Sets up the resize observer. When a slotted element is resized, updates the scroll flags\nso the buttons show or hide as needed.",
|
|
258
|
+
"privacy": "private",
|
|
259
|
+
"return": {
|
|
260
|
+
"type": {
|
|
261
|
+
"text": "void"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"kind": "field",
|
|
267
|
+
"name": "label",
|
|
268
|
+
"privacy": "public",
|
|
269
|
+
"type": {
|
|
270
|
+
"text": "string"
|
|
271
|
+
},
|
|
272
|
+
"description": "Deprecated: Use the `ariaLabel` slot instead.\nSets the text that screen readers announce as the carousel's name.",
|
|
273
|
+
"deprecated": "Use the `ariaLabel` slot instead.",
|
|
274
|
+
"attribute": "label"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"events": [
|
|
278
|
+
{
|
|
279
|
+
"description": "Dispatched when someone selects the left scroll button.",
|
|
280
|
+
"name": "scrollLeft"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"description": "Dispatched when someone selects the right scroll button.",
|
|
284
|
+
"name": "scrollRight"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"attributes": [
|
|
288
|
+
{
|
|
289
|
+
"type": {
|
|
290
|
+
"text": "boolean"
|
|
291
|
+
},
|
|
292
|
+
"description": "Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.",
|
|
293
|
+
"name": "centerselected"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "displayarrows",
|
|
297
|
+
"type": {
|
|
298
|
+
"text": "boolean"
|
|
299
|
+
},
|
|
300
|
+
"description": "Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens.",
|
|
301
|
+
"fieldName": "displayArrows"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "scrolldistance",
|
|
305
|
+
"type": {
|
|
306
|
+
"text": "number"
|
|
307
|
+
},
|
|
308
|
+
"description": "Sets how many pixels the carousel scrolls when someone selects the left or right button.",
|
|
309
|
+
"default": "300",
|
|
310
|
+
"fieldName": "scrollDistance"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "label",
|
|
314
|
+
"type": {
|
|
315
|
+
"text": "string"
|
|
316
|
+
},
|
|
317
|
+
"description": "Deprecated: Use the `ariaLabel` slot instead.\nSets the text that screen readers announce as the carousel's name.",
|
|
318
|
+
"deprecated": "Use the `ariaLabel` slot instead.",
|
|
319
|
+
"fieldName": "label"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"superclass": {
|
|
323
|
+
"name": "LitElement",
|
|
324
|
+
"package": "lit"
|
|
325
|
+
},
|
|
326
|
+
"tagName": "auro-carousel",
|
|
327
|
+
"customElement": true,
|
|
328
|
+
"summary": "A horizontally scrollable container with left and right scroll buttons and optional centering of a selected element.",
|
|
329
|
+
"modulePath": "src/auro-carousel.js"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"exports": [
|
|
333
|
+
{
|
|
334
|
+
"kind": "js",
|
|
335
|
+
"name": "AuroCarousel",
|
|
336
|
+
"declaration": {
|
|
337
|
+
"name": "AuroCarousel",
|
|
338
|
+
"module": "src/auro-carousel.js"
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"kind": "javascript-module",
|
|
345
|
+
"path": "src/buttonVersion.js",
|
|
346
|
+
"declarations": [],
|
|
347
|
+
"exports": [
|
|
348
|
+
{
|
|
349
|
+
"kind": "js",
|
|
350
|
+
"name": "default",
|
|
351
|
+
"declaration": {
|
|
352
|
+
"name": "13.0.3",
|
|
353
|
+
"module": "src/buttonVersion.js"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"kind": "javascript-module",
|
|
360
|
+
"path": "src/iconVersion.js",
|
|
361
|
+
"declarations": [],
|
|
362
|
+
"exports": [
|
|
363
|
+
{
|
|
364
|
+
"kind": "js",
|
|
365
|
+
"name": "default",
|
|
366
|
+
"declaration": {
|
|
367
|
+
"name": "9.2.1",
|
|
368
|
+
"module": "src/iconVersion.js"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"kind": "javascript-module",
|
|
375
|
+
"path": "src/index.js",
|
|
376
|
+
"declarations": [],
|
|
377
|
+
"exports": [
|
|
378
|
+
{
|
|
379
|
+
"kind": "js",
|
|
380
|
+
"name": "AuroCarousel",
|
|
381
|
+
"declaration": {
|
|
382
|
+
"name": "AuroCarousel",
|
|
383
|
+
"module": "src/index.js"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"kind": "javascript-module",
|
|
390
|
+
"path": "src/registered.js",
|
|
391
|
+
"declarations": [],
|
|
392
|
+
"exports": []
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"package": "@aurodesignsystem-dev/auro-carousel@0.0.0-pr144.0"
|
|
396
|
+
}
|
package/demo/api.md
CHANGED
|
@@ -38,12 +38,12 @@ Displays a group of elements, such as flight date options or images, in a horizo
|
|
|
38
38
|
|
|
39
39
|
### Slots
|
|
40
40
|
|
|
41
|
-
| Name | Description
|
|
42
|
-
| ---------------------- |
|
|
43
|
-
| (default) | The elements to scroll through, such as `auro-pane` elements or images.
|
|
44
|
-
| ariaLabel
|
|
45
|
-
| ariaLabel.scroll.
|
|
46
|
-
| ariaLabel
|
|
41
|
+
| Name | Description |
|
|
42
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
43
|
+
| (default) | The elements to scroll through, such as `auro-pane` elements or images. |
|
|
44
|
+
| ariaLabel | Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the `label` attribute. Takes priority over `label` when both are set. |
|
|
45
|
+
| ariaLabel.scroll.left | Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left". |
|
|
46
|
+
| ariaLabel.scroll.right | Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right". |
|
|
47
47
|
|
|
48
48
|
### CSS shadow parts
|
|
49
49
|
|
|
@@ -108,7 +108,7 @@ Displays a group of elements, such as flight date options or images, in a horizo
|
|
|
108
108
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
109
109
|
</auro-accordion>
|
|
110
110
|
|
|
111
|
-
## Property
|
|
111
|
+
## Property and attribute examples
|
|
112
112
|
|
|
113
113
|
#### Center selected
|
|
114
114
|
|
|
@@ -291,7 +291,7 @@ Use the `scrollDistance` attribute to set how many pixels the carousel scrolls w
|
|
|
291
291
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
292
292
|
</auro-accordion>
|
|
293
293
|
|
|
294
|
-
## Method
|
|
294
|
+
## Method examples
|
|
295
295
|
|
|
296
296
|
#### Center element
|
|
297
297
|
|
|
@@ -415,7 +415,7 @@ This example doesn't use `centerSelected`, so it doesn't center the selected pan
|
|
|
415
415
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
416
416
|
</auro-accordion>
|
|
417
417
|
|
|
418
|
-
## Slot
|
|
418
|
+
## Slot examples
|
|
419
419
|
|
|
420
420
|
### Aria label slots
|
|
421
421
|
|
package/demo/api.min.js
CHANGED
|
@@ -337,9 +337,9 @@ var tokensCss = i$5`:host{--ds-auro-carousel-gradient-color-one: var(--ds-basic-
|
|
|
337
337
|
* @attr {boolean} centerselected - Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
338
338
|
*
|
|
339
339
|
* @slot - The elements to scroll through, such as `auro-pane` elements or images.
|
|
340
|
-
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the
|
|
341
|
-
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll
|
|
342
|
-
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll
|
|
340
|
+
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the `label` attribute. Takes priority over `label` when both are set.
|
|
341
|
+
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
342
|
+
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
343
343
|
*
|
|
344
344
|
* @csspart wrapper - The scrollable `<div>` that wraps the scroll buttons and the slotted elements.
|
|
345
345
|
*
|
|
@@ -705,7 +705,7 @@ class AuroCarousel extends i$2 {
|
|
|
705
705
|
|
|
706
706
|
<!-- Left button -->
|
|
707
707
|
<${this.buttonTag}
|
|
708
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll
|
|
708
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll left')}"
|
|
709
709
|
shape="circle"
|
|
710
710
|
variant="secondary"
|
|
711
711
|
@click=${() => this.handleClick(false)}
|
|
@@ -721,7 +721,7 @@ class AuroCarousel extends i$2 {
|
|
|
721
721
|
|
|
722
722
|
<!-- Right button -->
|
|
723
723
|
<${this.buttonTag}
|
|
724
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll
|
|
724
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll right')}"
|
|
725
725
|
shape="circle"
|
|
726
726
|
variant="secondary"
|
|
727
727
|
@click=${() => this.handleClick(true)}
|
package/demo/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
THIS PAGE'S CONTENT SHOULD BE KEPT MINIMAL.
|
|
3
|
-
ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE
|
|
3
|
+
ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE. THE BASIC EXAMPLE IS USUALLY ENOUGH.
|
|
4
4
|
ALL OTHER EXAMPLES SHOULD GO IN THE API DOCUMENTATION.
|
|
5
5
|
-->
|
|
6
6
|
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
`<auro-carousel>` is an [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) that displays a group of elements in a scrollable container.
|
|
12
12
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
13
13
|
|
|
14
|
-
## Use
|
|
14
|
+
## Use cases
|
|
15
15
|
|
|
16
16
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/useCases.md) -->
|
|
17
17
|
<!-- The below content is automatically added from ./../docs/partials/useCases.md -->
|
|
18
18
|
Use `<auro-carousel>` when people need to:
|
|
19
19
|
|
|
20
|
-
* Scroll through flight date options
|
|
20
|
+
* Scroll through flight date options, such as dates just before and after a chosen date
|
|
21
21
|
* Scroll through images
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
23
23
|
|
|
24
|
-
##
|
|
25
|
-
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
26
|
### Basic
|
|
27
27
|
|
|
28
28
|
<div class="exampleWrapper">
|
package/demo/index.min.js
CHANGED
|
@@ -319,9 +319,9 @@ var tokensCss = i$5`:host{--ds-auro-carousel-gradient-color-one: var(--ds-basic-
|
|
|
319
319
|
* @attr {boolean} centerselected - Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
320
320
|
*
|
|
321
321
|
* @slot - The elements to scroll through, such as `auro-pane` elements or images.
|
|
322
|
-
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the
|
|
323
|
-
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll
|
|
324
|
-
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll
|
|
322
|
+
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the `label` attribute. Takes priority over `label` when both are set.
|
|
323
|
+
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
324
|
+
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
325
325
|
*
|
|
326
326
|
* @csspart wrapper - The scrollable `<div>` that wraps the scroll buttons and the slotted elements.
|
|
327
327
|
*
|
|
@@ -687,7 +687,7 @@ class AuroCarousel extends i$2 {
|
|
|
687
687
|
|
|
688
688
|
<!-- Left button -->
|
|
689
689
|
<${this.buttonTag}
|
|
690
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll
|
|
690
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll left')}"
|
|
691
691
|
shape="circle"
|
|
692
692
|
variant="secondary"
|
|
693
693
|
@click=${() => this.handleClick(false)}
|
|
@@ -703,7 +703,7 @@ class AuroCarousel extends i$2 {
|
|
|
703
703
|
|
|
704
704
|
<!-- Right button -->
|
|
705
705
|
<${this.buttonTag}
|
|
706
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll
|
|
706
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll right')}"
|
|
707
707
|
shape="circle"
|
|
708
708
|
variant="secondary"
|
|
709
709
|
@click=${() => this.handleClick(true)}
|
package/demo/readme.md
CHANGED
|
@@ -34,7 +34,7 @@ The following sections are editable by making changes to the following files:
|
|
|
34
34
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
35
|
Use `<auro-carousel>` when people need to:
|
|
36
36
|
|
|
37
|
-
* Scroll through flight date options
|
|
37
|
+
* Scroll through flight date options, such as dates just before and after a chosen date
|
|
38
38
|
* Scroll through images
|
|
39
39
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
40
|
|
|
@@ -117,7 +117,7 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as o,lit
|
|
|
117
117
|
|
|
118
118
|
<!-- Left button -->
|
|
119
119
|
<${this.buttonTag}
|
|
120
|
-
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.left")||"Scroll
|
|
120
|
+
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.left")||"Scroll left")}"
|
|
121
121
|
shape="circle"
|
|
122
122
|
variant="secondary"
|
|
123
123
|
@click=${()=>this.handleClick(!1)}
|
|
@@ -133,7 +133,7 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as o,lit
|
|
|
133
133
|
|
|
134
134
|
<!-- Right button -->
|
|
135
135
|
<${this.buttonTag}
|
|
136
|
-
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.right")||"Scroll
|
|
136
|
+
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.right")||"Scroll right")}"
|
|
137
137
|
shape="circle"
|
|
138
138
|
variant="secondary"
|
|
139
139
|
@click=${()=>this.handleClick(!0)}
|
package/dist/index.d.ts
CHANGED
|
@@ -158,9 +158,9 @@ export type CustomElements = {
|
|
|
158
158
|
* Areas where markup can be added to the component.
|
|
159
159
|
*
|
|
160
160
|
* - `(default)`: The elements to scroll through, such as `auro-pane` elements or images.
|
|
161
|
-
* - `ariaLabel
|
|
162
|
-
* - `ariaLabel.scroll.
|
|
163
|
-
* - `ariaLabel`: Text that screen readers announce
|
|
161
|
+
* - `ariaLabel`: Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the `label` attribute. Takes priority over `label` when both are set.
|
|
162
|
+
* - `ariaLabel.scroll.left`: Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
163
|
+
* - `ariaLabel.scroll.right`: Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
164
164
|
*
|
|
165
165
|
* ## Methods
|
|
166
166
|
*
|
|
@@ -222,9 +222,9 @@ export type CustomElementsSolidJs = {
|
|
|
222
222
|
* Areas where markup can be added to the component.
|
|
223
223
|
*
|
|
224
224
|
* - `(default)`: The elements to scroll through, such as `auro-pane` elements or images.
|
|
225
|
-
* - `ariaLabel
|
|
226
|
-
* - `ariaLabel.scroll.
|
|
227
|
-
* - `ariaLabel`: Text that screen readers announce
|
|
225
|
+
* - `ariaLabel`: Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the `label` attribute. Takes priority over `label` when both are set.
|
|
226
|
+
* - `ariaLabel.scroll.left`: Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
227
|
+
* - `ariaLabel.scroll.right`: Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
228
228
|
*
|
|
229
229
|
* ## Methods
|
|
230
230
|
*
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AuroCarousel}from"./auro-carousel-
|
|
1
|
+
export{A as AuroCarousel}from"./auro-carousel-OBRWwlpL.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
|
package/dist/registered.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as i}from"./auro-carousel-
|
|
1
|
+
import{A as i}from"./auro-carousel-OBRWwlpL.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-carousel",
|
|
10
|
-
"version": "0.0.0-
|
|
10
|
+
"version": "0.0.0-pr144.0",
|
|
11
11
|
"description": "auro-carousel HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@aurodesignsystem/auro-button": "^13.0.3",
|
|
28
|
-
"@aurodesignsystem/auro-cli": "^5.
|
|
28
|
+
"@aurodesignsystem/auro-cli": "^5.7.0",
|
|
29
29
|
"@aurodesignsystem/auro-config": "^1.3.2",
|
|
30
30
|
"@aurodesignsystem/auro-icon": "^9.2.1",
|
|
31
31
|
"@aurodesignsystem/auro-library": "^5.14.4",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"web components"
|
|
52
52
|
],
|
|
53
53
|
"scripts": {
|
|
54
|
-
"build": "auro build",
|
|
54
|
+
"build": "auro build && auro cem-check --strict",
|
|
55
55
|
"build:version": "node ./scripts/version.mjs",
|
|
56
56
|
"dev": "auro dev -w -s",
|
|
57
57
|
"dev:open": "auro dev -w -s --open",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"files": [
|
|
83
83
|
"dist/**/*",
|
|
84
84
|
"demo/**/*",
|
|
85
|
+
"custom-elements.json",
|
|
85
86
|
"CHANGELOG.md",
|
|
86
87
|
"README.md",
|
|
87
88
|
"LICENSE",
|