@aurodesignsystem-dev/auro-carousel 0.0.0-pr140.0 → 0.0.0-pr142.1
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 +79 -89
- package/demo/api.md +368 -367
- package/demo/api.min.js +717 -2
- package/demo/index.md +42 -42
- package/demo/index.min.js +716 -1
- package/demo/readme.md +164 -0
- package/dist/auro-carousel-acFfUyJs.js +144 -0
- package/dist/index.d.ts +207 -83
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +9 -9
- package/demo/auro-carousel.min.js +0 -677
- package/dist/auro-carousel-D1ntQpGY.js +0 -121
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import type { AuroCarousel } from "src/auro-carousel.js";
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -21,13 +20,14 @@ import type { AuroCarousel } from "src/auro-carousel.js";
|
|
|
21
20
|
*/
|
|
22
21
|
export type ScopedElements<
|
|
23
22
|
Prefix extends string = "",
|
|
24
|
-
Suffix extends string = ""
|
|
23
|
+
Suffix extends string = "",
|
|
25
24
|
> = {
|
|
26
|
-
[
|
|
25
|
+
[
|
|
26
|
+
Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`
|
|
27
|
+
]: CustomElements[Key];
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
type BaseProps<T extends HTMLElement> = {
|
|
30
|
-
|
|
31
31
|
/** Content added between the opening and closing tags of the element */
|
|
32
32
|
children?: any;
|
|
33
33
|
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
@@ -50,6 +50,8 @@ type BaseProps<T extends HTMLElement> = {
|
|
|
50
50
|
key?: string | number;
|
|
51
51
|
/** Specifies the language of the element. */
|
|
52
52
|
lang?: string;
|
|
53
|
+
/** Defines the element's semantic role for accessibility APIs. */
|
|
54
|
+
role?: string;
|
|
53
55
|
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
54
56
|
part?: string;
|
|
55
57
|
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
@@ -70,134 +72,256 @@ type BaseProps<T extends HTMLElement> = {
|
|
|
70
72
|
popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
|
|
71
73
|
/** Specifies the action to be performed on a popover element being controlled by a control element. */
|
|
72
74
|
popovertargetaction?: "show" | "hide" | "toggle";
|
|
75
|
+
};
|
|
73
76
|
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
type BaseEvents = {
|
|
77
|
+
type BaseEvents = {};
|
|
77
78
|
|
|
79
|
+
export type AuroCarouselProps = {
|
|
80
|
+
/** Centers the carousel on the first element that has the `selected` attribute when the carousel first renders. */
|
|
81
|
+
centerselected?: unknown;
|
|
82
|
+
/** Centers the carousel on the first element that has the `selected` attribute when the carousel first renders. */
|
|
83
|
+
undefined?: unknown;
|
|
84
|
+
/** Shows the left and right scroll buttons at all times, instead of only when there's more content to scroll to in that direction. The buttons stay hidden on small screens. */
|
|
85
|
+
displayarrows?: AuroCarousel["displayArrows"];
|
|
86
|
+
/** Shows the left and right scroll buttons at all times, instead of only when there's more content to scroll to in that direction. The buttons stay hidden on small screens. */
|
|
87
|
+
displayArrows?: AuroCarousel["displayArrows"];
|
|
88
|
+
/** Sets how many pixels the carousel scrolls when someone selects the left or right button. */
|
|
89
|
+
scrolldistance?: AuroCarousel["scrollDistance"];
|
|
90
|
+
/** Sets how many pixels the carousel scrolls when someone selects the left or right button. */
|
|
91
|
+
scrollDistance?: AuroCarousel["scrollDistance"];
|
|
92
|
+
/** @deprecated Use the `ariaLabel` slot instead. - Deprecated: Use the `ariaLabel` slot instead.
|
|
93
|
+
Sets the text that screen readers announce as the carousel's name. */
|
|
94
|
+
label?: AuroCarousel["label"];
|
|
78
95
|
|
|
96
|
+
/** Dispatched when someone selects the left scroll button. */
|
|
97
|
+
onscrollLeft?: (e: Event) => void;
|
|
98
|
+
/** Dispatched when someone selects the right scroll button. */
|
|
99
|
+
onscrollRight?: (e: Event) => void;
|
|
79
100
|
};
|
|
80
101
|
|
|
102
|
+
export type AuroCarouselSolidJsProps = {
|
|
103
|
+
/** Centers the carousel on the first element that has the `selected` attribute when the carousel first renders. */
|
|
104
|
+
"bool:centerselected"?: unknown;
|
|
105
|
+
/** Centers the carousel on the first element that has the `selected` attribute when the carousel first renders. */
|
|
106
|
+
"prop:undefined"?: unknown;
|
|
107
|
+
/** Shows the left and right scroll buttons at all times, instead of only when there's more content to scroll to in that direction. The buttons stay hidden on small screens. */
|
|
108
|
+
"bool:displayarrows"?: AuroCarousel["displayArrows"];
|
|
109
|
+
/** Shows the left and right scroll buttons at all times, instead of only when there's more content to scroll to in that direction. The buttons stay hidden on small screens. */
|
|
110
|
+
"prop:displayArrows"?: AuroCarousel["displayArrows"];
|
|
111
|
+
/** Sets how many pixels the carousel scrolls when someone selects the left or right button. */
|
|
112
|
+
"attr:scrolldistance"?: AuroCarousel["scrollDistance"];
|
|
113
|
+
/** Sets how many pixels the carousel scrolls when someone selects the left or right button. */
|
|
114
|
+
"prop:scrollDistance"?: AuroCarousel["scrollDistance"];
|
|
115
|
+
/** @deprecated Use the `ariaLabel` slot instead. - Deprecated: Use the `ariaLabel` slot instead.
|
|
116
|
+
Sets the text that screen readers announce as the carousel's name. */
|
|
117
|
+
"prop:label"?: AuroCarousel["label"];
|
|
118
|
+
/** Dispatched when someone selects the left scroll button. */
|
|
119
|
+
"on:scrollLeft"?: (e: Event) => void;
|
|
120
|
+
/** Dispatched when someone selects the right scroll button. */
|
|
121
|
+
"on:scrollRight"?: (e: Event) => void;
|
|
81
122
|
|
|
123
|
+
/** Set the innerHTML of the element */
|
|
124
|
+
innerHTML?: string;
|
|
125
|
+
/** Set the textContent of the element */
|
|
126
|
+
textContent?: string | number;
|
|
127
|
+
};
|
|
82
128
|
|
|
83
|
-
export type
|
|
84
|
-
/**
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
129
|
+
export type CustomElements = {
|
|
130
|
+
/**
|
|
131
|
+
* Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.
|
|
132
|
+
*
|
|
133
|
+
* **Key capabilities:**
|
|
134
|
+
* - **Scroll buttons**: Shows left and right buttons on medium and larger screens when there's more content to scroll to. Add `displayArrows` to always show them.
|
|
135
|
+
* - **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.
|
|
136
|
+
* - **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.
|
|
137
|
+
* - **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.
|
|
138
|
+
*
|
|
139
|
+
* ## Attributes & Properties
|
|
140
|
+
*
|
|
141
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
142
|
+
*
|
|
143
|
+
* - `centerselected`/`undefined`: Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
144
|
+
* - `displayarrows`/`displayArrows`: Shows the left and right scroll buttons at all times, instead of only when there's more content to scroll to in that direction. The buttons stay hidden on small screens.
|
|
145
|
+
* - `scrolldistance`/`scrollDistance`: Sets how many pixels the carousel scrolls when someone selects the left or right button.
|
|
146
|
+
* - `label`: Deprecated: Use the `ariaLabel` slot instead.
|
|
147
|
+
* Sets the text that screen readers announce as the carousel's name.
|
|
148
|
+
*
|
|
149
|
+
* ## Events
|
|
150
|
+
*
|
|
151
|
+
* Events that will be emitted by the component.
|
|
152
|
+
*
|
|
153
|
+
* - `scrollLeft`: Dispatched when someone selects the left scroll button.
|
|
154
|
+
* - `scrollRight`: Dispatched when someone selects the right scroll button.
|
|
155
|
+
*
|
|
156
|
+
* ## Slots
|
|
157
|
+
*
|
|
158
|
+
* Areas where markup can be added to the component.
|
|
159
|
+
*
|
|
160
|
+
* - `(default)`: The elements to scroll through, such as `auro-pane` elements or images.
|
|
161
|
+
* - `ariaLabel`: Text that screen readers announce as the carousel's name, for example "Flight date options". Takes priority over the `label` attribute.
|
|
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
|
+
*
|
|
165
|
+
* ## Methods
|
|
166
|
+
*
|
|
167
|
+
* Methods that can be called to access component functionality.
|
|
168
|
+
*
|
|
169
|
+
* - `_initializeDefaults() => void`: undefined
|
|
170
|
+
* - `centerElement(el: Element) => void`: Centers the given element inside the carousel.
|
|
171
|
+
* - `register(name?: string = "auro-carousel") => void`: Registers the element with the browser under a tag name.
|
|
172
|
+
* - `scrollCarousel(num: number) => void`: Scrolls the carousel by the given amount.
|
|
173
|
+
* - `scrollToSelected() => void`: Scrolls the first element that has the `selected` attribute to the center of the carousel.
|
|
174
|
+
*
|
|
175
|
+
* ## CSS Custom Properties
|
|
176
|
+
*
|
|
177
|
+
* CSS variables available for styling the component.
|
|
178
|
+
*
|
|
179
|
+
* - `--ds-auro-carousel-gradient-color-one`: Color at the outer edge of the fade shown beside each scroll button. (default: `undefined`)
|
|
180
|
+
* - `--ds-auro-carousel-gradient-color-two`: Color at the inner edge of the fade shown beside each scroll button. (default: `undefined`)
|
|
181
|
+
*
|
|
182
|
+
* ## CSS Parts
|
|
183
|
+
*
|
|
184
|
+
* Custom selectors for styling elements within the component.
|
|
185
|
+
*
|
|
186
|
+
* - `wrapper`: The scrollable `<div>` that wraps the scroll buttons and the slotted elements.
|
|
187
|
+
*/
|
|
188
|
+
"auro-carousel": Partial<
|
|
189
|
+
AuroCarouselProps & BaseProps<AuroCarousel> & BaseEvents
|
|
190
|
+
>;
|
|
191
|
+
};
|
|
101
192
|
|
|
193
|
+
export type CustomElementsSolidJs = {
|
|
102
194
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
195
|
+
* Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.
|
|
196
|
+
*
|
|
197
|
+
* **Key capabilities:**
|
|
198
|
+
* - **Scroll buttons**: Shows left and right buttons on medium and larger screens when there's more content to scroll to. Add `displayArrows` to always show them.
|
|
199
|
+
* - **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.
|
|
200
|
+
* - **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.
|
|
201
|
+
* - **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.
|
|
202
|
+
*
|
|
203
|
+
* ## Attributes & Properties
|
|
204
|
+
*
|
|
205
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
206
|
+
*
|
|
207
|
+
* - `centerselected`/`undefined`: Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
208
|
+
* - `displayarrows`/`displayArrows`: Shows the left and right scroll buttons at all times, instead of only when there's more content to scroll to in that direction. The buttons stay hidden on small screens.
|
|
209
|
+
* - `scrolldistance`/`scrollDistance`: Sets how many pixels the carousel scrolls when someone selects the left or right button.
|
|
210
|
+
* - `label`: Deprecated: Use the `ariaLabel` slot instead.
|
|
211
|
+
* Sets the text that screen readers announce as the carousel's name.
|
|
212
|
+
*
|
|
213
|
+
* ## Events
|
|
214
|
+
*
|
|
215
|
+
* Events that will be emitted by the component.
|
|
216
|
+
*
|
|
217
|
+
* - `scrollLeft`: Dispatched when someone selects the left scroll button.
|
|
218
|
+
* - `scrollRight`: Dispatched when someone selects the right scroll button.
|
|
219
|
+
*
|
|
220
|
+
* ## Slots
|
|
221
|
+
*
|
|
222
|
+
* Areas where markup can be added to the component.
|
|
223
|
+
*
|
|
224
|
+
* - `(default)`: The elements to scroll through, such as `auro-pane` elements or images.
|
|
225
|
+
* - `ariaLabel`: Text that screen readers announce as the carousel's name, for example "Flight date options". Takes priority over the `label` attribute.
|
|
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
|
+
*
|
|
229
|
+
* ## Methods
|
|
230
|
+
*
|
|
231
|
+
* Methods that can be called to access component functionality.
|
|
232
|
+
*
|
|
233
|
+
* - `_initializeDefaults() => void`: undefined
|
|
234
|
+
* - `centerElement(el: Element) => void`: Centers the given element inside the carousel.
|
|
235
|
+
* - `register(name?: string = "auro-carousel") => void`: Registers the element with the browser under a tag name.
|
|
236
|
+
* - `scrollCarousel(num: number) => void`: Scrolls the carousel by the given amount.
|
|
237
|
+
* - `scrollToSelected() => void`: Scrolls the first element that has the `selected` attribute to the center of the carousel.
|
|
238
|
+
*
|
|
239
|
+
* ## CSS Custom Properties
|
|
240
|
+
*
|
|
241
|
+
* CSS variables available for styling the component.
|
|
242
|
+
*
|
|
243
|
+
* - `--ds-auro-carousel-gradient-color-one`: Color at the outer edge of the fade shown beside each scroll button. (default: `undefined`)
|
|
244
|
+
* - `--ds-auro-carousel-gradient-color-two`: Color at the inner edge of the fade shown beside each scroll button. (default: `undefined`)
|
|
245
|
+
*
|
|
246
|
+
* ## CSS Parts
|
|
247
|
+
*
|
|
248
|
+
* Custom selectors for styling elements within the component.
|
|
249
|
+
*
|
|
250
|
+
* - `wrapper`: The scrollable `<div>` that wraps the scroll buttons and the slotted elements.
|
|
251
|
+
*/
|
|
252
|
+
"auro-carousel": Partial<
|
|
253
|
+
AuroCarouselProps &
|
|
254
|
+
AuroCarouselSolidJsProps &
|
|
255
|
+
BaseProps<AuroCarousel> &
|
|
256
|
+
BaseEvents
|
|
257
|
+
>;
|
|
258
|
+
};
|
|
148
259
|
|
|
149
260
|
export type CustomCssProperties = {
|
|
261
|
+
/** Color at the outer edge of the fade shown beside each scroll button. */
|
|
262
|
+
"--ds-auro-carousel-gradient-color-one"?: string;
|
|
263
|
+
/** Color at the inner edge of the fade shown beside each scroll button. */
|
|
264
|
+
"--ds-auro-carousel-gradient-color-two"?: string;
|
|
265
|
+
};
|
|
150
266
|
|
|
267
|
+
declare module "react" {
|
|
268
|
+
namespace JSX {
|
|
269
|
+
interface IntrinsicElements extends CustomElements {}
|
|
270
|
+
}
|
|
151
271
|
}
|
|
152
272
|
|
|
273
|
+
declare module "react/jsx-runtime" {
|
|
274
|
+
namespace JSX {
|
|
275
|
+
interface IntrinsicElements extends CustomElements {}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
153
278
|
|
|
154
|
-
declare module
|
|
279
|
+
declare module "react/jsx-dev-runtime" {
|
|
155
280
|
namespace JSX {
|
|
156
281
|
interface IntrinsicElements extends CustomElements {}
|
|
157
282
|
}
|
|
158
|
-
|
|
159
283
|
}
|
|
160
284
|
|
|
161
|
-
declare module
|
|
285
|
+
declare module "preact" {
|
|
162
286
|
namespace JSX {
|
|
163
287
|
interface IntrinsicElements extends CustomElements {}
|
|
164
288
|
}
|
|
165
|
-
|
|
166
289
|
}
|
|
167
290
|
|
|
168
|
-
declare module
|
|
291
|
+
declare module "@builder.io/qwik" {
|
|
169
292
|
namespace JSX {
|
|
170
293
|
interface IntrinsicElements extends CustomElements {}
|
|
171
294
|
}
|
|
172
|
-
|
|
173
295
|
}
|
|
174
296
|
|
|
175
|
-
declare module
|
|
297
|
+
declare module "@stencil/core" {
|
|
176
298
|
namespace JSX {
|
|
177
299
|
interface IntrinsicElements extends CustomElements {}
|
|
178
300
|
}
|
|
179
|
-
|
|
180
301
|
}
|
|
181
302
|
|
|
182
|
-
declare module
|
|
303
|
+
declare module "hono/jsx" {
|
|
183
304
|
namespace JSX {
|
|
184
305
|
interface IntrinsicElements extends CustomElements {}
|
|
185
306
|
}
|
|
186
|
-
|
|
187
307
|
}
|
|
188
308
|
|
|
189
|
-
declare module
|
|
309
|
+
declare module "react-native" {
|
|
190
310
|
namespace JSX {
|
|
191
311
|
interface IntrinsicElements extends CustomElements {}
|
|
192
312
|
}
|
|
193
|
-
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
declare module "solid-js" {
|
|
316
|
+
namespace JSX {
|
|
317
|
+
interface IntrinsicElements extends CustomElementsSolidJs {}
|
|
318
|
+
}
|
|
194
319
|
}
|
|
195
320
|
|
|
196
321
|
declare global {
|
|
197
322
|
namespace JSX {
|
|
198
323
|
interface IntrinsicElements extends CustomElements {}
|
|
199
324
|
}
|
|
200
|
-
|
|
201
325
|
}
|
|
202
326
|
declare global {
|
|
203
327
|
namespace svelteHTML {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AuroCarousel}from"./auro-carousel-
|
|
1
|
+
export{A as AuroCarousel}from"./auro-carousel-acFfUyJs.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-acFfUyJs.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-pr142.1",
|
|
11
11
|
"description": "auro-carousel HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"node": ">=20"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"lit": "^3.3.
|
|
24
|
+
"lit": "^3.3.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@aurodesignsystem/auro-button": "^
|
|
28
|
-
"@aurodesignsystem/auro-cli": "^
|
|
29
|
-
"@aurodesignsystem/auro-config": "^1.3.
|
|
30
|
-
"@aurodesignsystem/auro-icon": "^9.
|
|
31
|
-
"@aurodesignsystem/auro-library": "^5.
|
|
32
|
-
"@aurodesignsystem/design-tokens": "^
|
|
33
|
-
"@aurodesignsystem/webcorestylesheets": "^
|
|
27
|
+
"@aurodesignsystem/auro-button": "^13.0.3",
|
|
28
|
+
"@aurodesignsystem/auro-cli": "^5.6.0",
|
|
29
|
+
"@aurodesignsystem/auro-config": "^1.3.2",
|
|
30
|
+
"@aurodesignsystem/auro-icon": "^9.2.1",
|
|
31
|
+
"@aurodesignsystem/auro-library": "^5.14.4",
|
|
32
|
+
"@aurodesignsystem/design-tokens": "^9.4.2",
|
|
33
|
+
"@aurodesignsystem/webcorestylesheets": "^12.0.1",
|
|
34
34
|
"husky": "^9.1.7"
|
|
35
35
|
},
|
|
36
36
|
"browserslist": [
|