@aurodesignsystem-dev/auro-carousel 0.0.0-pr139.0 → 0.0.0-pr142.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/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
- [Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
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 AuroCarouselProps = {
84
- /** Automatically centers the selected node on UI render */
85
- "centerSelected"?: AuroCarousel['centerSelected'];
86
- /** Always displays the left and right arrows, regardless of content width */
87
- "displayArrows"?: AuroCarousel['displayArrows'];
88
- /** DEPRECATED - Use `ariaLabel` slot instead. */
89
- "label"?: AuroCarousel['label'];
90
- /** The number of pixels to scroll the carousel when the left or right buttons are interacted with */
91
- "scrollDistance"?: AuroCarousel['scrollDistance'];
92
-
93
- /** Dispatched when the guest clicks the 'left' carousel button */
94
- "onscrollLeft"?: (e: CustomEvent<never>) => void;
95
- /** Dispatched when the guest clicks the 'right' carousel button */
96
- "onscrollRight"?: (e: CustomEvent<never>) => void;
97
- }
98
-
99
- export type CustomElements = {
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
- * The `auro-carousel` element displays a group of elements in a scrollable container.
104
- *
105
- * ## Attributes & Properties
106
- *
107
- * Component attributes and properties that can be applied to the element or by using JavaScript.
108
- *
109
- * - `centerSelected`: Automatically centers the selected node on UI render
110
- * - `displayArrows`: Always displays the left and right arrows, regardless of content width
111
- * - `label`: DEPRECATED - Use `ariaLabel` slot instead.
112
- * - `scrollDistance`: The number of pixels to scroll the carousel when the left or right buttons are interacted with
113
- *
114
- * ## Events
115
- *
116
- * Events that will be emitted by the component.
117
- *
118
- * - `scrollLeft`: Dispatched when the guest clicks the 'left' carousel button
119
- * - `scrollRight`: Dispatched when the guest clicks the 'right' carousel button
120
- *
121
- * ## Slots
122
- *
123
- * Areas where markup can be added to the component.
124
- *
125
- * - `(default)`: Default slot for the elements in the carousel
126
- * - `ariaLabel`: Text to give an accessible name to the carousel
127
- * - `ariaLabel.scroll.left`: Text to give an accessible name to the left scroll button
128
- * - `ariaLabel.scroll.right`: Text to give an accessible name to the right scroll button
129
- *
130
- * ## Methods
131
- *
132
- * Methods that can be called to access component functionality.
133
- *
134
- * - `_initializeDefaults() => void`: undefined
135
- * - `centerElement(el: Element) => void`: Centers the given element inside the carousel.
136
- * - `register(name?: string = "auro-carousel") => void`: This will register this element with the browser.
137
- * - `scrollCarousel(num: number) => void`: Scrolls the carousel by the given amount.
138
- * - `scrollToSelected() => void`: Scroll to the first child component that have 'selected' attribute.
139
- *
140
- * ## CSS Parts
141
- *
142
- * Custom selectors for styling elements within the component.
143
- *
144
- * - `wrapper`: The primary root HTML element of the component.
145
- */
146
- "auro-carousel": Partial<AuroCarouselProps & BaseProps<AuroCarousel> & BaseEvents>;
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 'react' {
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 'preact' {
285
+ declare module "preact" {
162
286
  namespace JSX {
163
287
  interface IntrinsicElements extends CustomElements {}
164
288
  }
165
-
166
289
  }
167
290
 
168
- declare module '@builder.io/qwik' {
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 '@stencil/core' {
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 'hono/jsx' {
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 'react-native' {
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-D1ntQpGY.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
1
+ export{A as AuroCarousel}from"./auro-carousel-nUna7XQs.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
@@ -1 +1 @@
1
- import{A as i}from"./auro-carousel-D1ntQpGY.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
1
+ import{A as i}from"./auro-carousel-nUna7XQs.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-pr139.0",
10
+ "version": "0.0.0-pr142.0",
11
11
  "description": "auro-carousel HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",
@@ -24,13 +24,13 @@
24
24
  "lit": "^3.3.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@aurodesignsystem/auro-button": "^12.3.0",
28
- "@aurodesignsystem/auro-cli": "^3.5.1",
29
- "@aurodesignsystem/auro-config": "^1.3.1",
30
- "@aurodesignsystem/auro-icon": "^9.1.1",
31
- "@aurodesignsystem/auro-library": "^5.5.4",
32
- "@aurodesignsystem/design-tokens": "^8.8.2",
33
- "@aurodesignsystem/webcorestylesheets": "^10.1.4",
27
+ "@aurodesignsystem/auro-button": "^13.0.1",
28
+ "@aurodesignsystem/auro-cli": "^5.1.0",
29
+ "@aurodesignsystem/auro-config": "^1.3.2",
30
+ "@aurodesignsystem/auro-icon": "^9.2.0",
31
+ "@aurodesignsystem/auro-library": "^5.14.4",
32
+ "@aurodesignsystem/design-tokens": "^9.4.1",
33
+ "@aurodesignsystem/webcorestylesheets": "^12.0.1",
34
34
  "husky": "^9.1.7"
35
35
  },
36
36
  "browserslist": [