@lumx/react 4.22.1-next.0 → 4.22.1-next.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/index.d.ts CHANGED
@@ -4910,7 +4910,7 @@ type SlideMode = ValueOf$1<typeof SlideMode>;
4910
4910
  /**
4911
4911
  * Defines the props of the component.
4912
4912
  */
4913
- interface SlideshowProps extends GenericProps$1, Pick<SlidesProps, 'autoPlay' | 'slidesId' | 'id' | 'theme' | 'fillHeight' | 'groupBy' | 'slideGroupLabel'> {
4913
+ interface SlideshowProps extends GenericProps$1, Pick<SlidesProps, 'autoPlay' | 'slidesId' | 'id' | 'theme' | 'fillHeight' | 'groupBy' | 'slideGroupLabel' | 'slideGroupRoleDescription'> {
4914
4914
  /** Whether to use CSS transform translate or native scroll snap. */
4915
4915
  slideMode?: SlideMode;
4916
4916
  /** current slide active */
@@ -5085,6 +5085,11 @@ interface SlidesProps extends GenericProps$1, HasTheme$1 {
5085
5085
  * Receives the group position starting from 1 and the total number of groups.
5086
5086
  * */
5087
5087
  slideGroupLabel?: (groupPosition: number, groupTotal: number) => string;
5088
+ /**
5089
+ * Accessible role description to set on every slide group (`aria-roledescription`).
5090
+ * Applies identically to every group.
5091
+ * */
5092
+ slideGroupRoleDescription?: string;
5088
5093
  /** Whether to use CSS transform translate or native scroll snap. */
5089
5094
  slideMode?: SlideMode;
5090
5095
  /** On slide change (only triggered on scroll when slideMode=scroll-snap) */
package/index.js CHANGED
@@ -20187,6 +20187,7 @@ const SlideshowItemGroup = forwardRef((props, ref) => {
20187
20187
  role = 'group',
20188
20188
  label,
20189
20189
  isDisplayed,
20190
+ 'aria-roledescription': ariaRoleDescription,
20190
20191
  ...forwardedProps
20191
20192
  } = props;
20192
20193
  const groupRef = React__default.useRef(null);
@@ -20198,7 +20199,7 @@ const SlideshowItemGroup = forwardRef((props, ref) => {
20198
20199
  ref: mergeRefs(groupRef, ref),
20199
20200
  role: role,
20200
20201
  className: classNames.join(className, CLASSNAME$g),
20201
- "aria-roledescription": "slide",
20202
+ "aria-roledescription": ariaRoleDescription ?? 'slide',
20202
20203
  "aria-label": label,
20203
20204
  ...forwardedProps,
20204
20205
  children: children
@@ -20238,6 +20239,7 @@ const Slideshow = forwardRef((props, ref) => {
20238
20239
  id,
20239
20240
  slidesId,
20240
20241
  slideGroupLabel,
20242
+ slideGroupRoleDescription,
20241
20243
  slideMode = DEFAULT_PROPS$h.slideMode,
20242
20244
  ...forwardedProps
20243
20245
  } = props;
@@ -20294,6 +20296,7 @@ const Slideshow = forwardRef((props, ref) => {
20294
20296
  ref: mergeRefs(ref, setSlideshow),
20295
20297
  hasControls: showControls,
20296
20298
  slideGroupLabel: slideGroupLabel,
20299
+ slideGroupRoleDescription: slideGroupRoleDescription,
20297
20300
  afterSlides: slideshowControlsProps && slidesCount > 1 ? /*#__PURE__*/jsx("div", {
20298
20301
  className: `${Slides.className}__controls`,
20299
20302
  children: /*#__PURE__*/jsx(SlideshowControls, {
@@ -20726,8 +20729,10 @@ const Slides = forwardRef((props, ref) => {
20726
20729
  afterSlides,
20727
20730
  hasControls,
20728
20731
  slideGroupLabel,
20732
+ slideGroupRoleDescription,
20729
20733
  slideMode = DEFAULT_PROPS$f.slideMode,
20730
20734
  onChange,
20735
+ 'aria-roledescription': ariaRoleDescription,
20731
20736
  ...forwardedProps
20732
20737
  } = props;
20733
20738
  const wrapperRef = React__default.useRef(null);
@@ -20769,7 +20774,7 @@ const Slides = forwardRef((props, ref) => {
20769
20774
  'fill-height': fillHeight,
20770
20775
  [`group-by-${groupBy}`]: Boolean(groupBy)
20771
20776
  })),
20772
- "aria-roledescription": "carousel",
20777
+ "aria-roledescription": ariaRoleDescription ?? 'carousel',
20773
20778
  children: [/*#__PURE__*/jsx("div", {
20774
20779
  id: slidesId,
20775
20780
  className: element$6('slides'),
@@ -20786,6 +20791,7 @@ const Slides = forwardRef((props, ref) => {
20786
20791
  id: slidesId && buildSlideShowGroupId(slidesId, index),
20787
20792
  role: hasControls ? 'tabpanel' : 'group',
20788
20793
  label: slideGroupLabel ? slideGroupLabel(index + 1, groups.length) : undefined,
20794
+ "aria-roledescription": slideGroupRoleDescription,
20789
20795
  isDisplayed: index >= startIndexVisible && index < endIndexVisible,
20790
20796
  children: group
20791
20797
  }, index))