@alto-avios/alto-ui 3.4.0-alpha.3 → 3.4.0-alpha.4

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.
@@ -236,7 +236,7 @@ const Carousel = ({
236
236
  } else {
237
237
  navigateToSlide(index);
238
238
  }
239
- }, tabSize: dotSize, dotSize, variant: dotsVariant, className: `${dotsContainerClassName} ${enableTapCycling ? styles.tapEnabled : ""}`, dotsWrapperClassName, dotClassName, activeDotClassName })
239
+ }, focusStyle, dotSize, variant: dotsVariant, className: `${dotsContainerClassName} ${enableTapCycling ? styles.tapEnabled : ""}`, dotsWrapperClassName, dotClassName, activeDotClassName })
240
240
  ] }) });
241
241
  };
242
242
  export {
@@ -4,7 +4,7 @@ export interface CarouselDotsProps {
4
4
  currentPage: number;
5
5
  onDotClick: (index: number) => void;
6
6
  dotSize?: 'md' | 'lg';
7
- tabSize?: 'md' | 'lg';
7
+ focusStyle?: 'default' | 'white';
8
8
  variant?: 'standard' | 'transparent';
9
9
  className?: string;
10
10
  dotsWrapperClassName?: string;
@@ -2,6 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { useRef, useState, useEffect, useCallback } from "react";
3
3
  import { useFocusRing } from "@react-aria/focus";
4
4
  import { useHover } from "@react-aria/interactions";
5
+ import { focusStyleVariants } from "../../../utils/focus/focusStyles.js";
5
6
  import '../../../assets/CarouselDots.css';const tabsContainer = "_tabsContainer_1yet6_1";
6
7
  const tabs = "_tabs_1yet6_1";
7
8
  const transparent = "_transparent_1yet6_28";
@@ -29,9 +30,8 @@ const CarouselDots = ({
29
30
  currentPage,
30
31
  onDotClick,
31
32
  dotSize = "md",
32
- tabSize,
33
- // For backward compatibility
34
33
  variant = "standard",
34
+ focusStyle = "default",
35
35
  className = "",
36
36
  dotsWrapperClassName = "",
37
37
  dotClassName = "",
@@ -39,7 +39,7 @@ const CarouselDots = ({
39
39
  }) => {
40
40
  const tabsRef = useRef(null);
41
41
  const wrapperRef = useRef(null);
42
- const effectiveDotSize = dotSize || tabSize || "md";
42
+ const effectiveDotSize = dotSize || "md";
43
43
  const {
44
44
  isFocusVisible,
45
45
  focusProps
@@ -51,6 +51,9 @@ const CarouselDots = ({
51
51
  const [isAnimating, setIsAnimating] = useState(false);
52
52
  const [prevPage, setPrevPage] = useState(currentPage);
53
53
  const [offsetPercentage, setOffsetPercentage] = useState(0);
54
+ const focusClass = focusStyleVariants({
55
+ focusStyle
56
+ });
54
57
  const handleKeyDown = (e) => {
55
58
  if (e.key === "ArrowRight" || e.key === "ArrowDown") {
56
59
  e.preventDefault();
@@ -93,6 +96,7 @@ const CarouselDots = ({
93
96
  const getDotsWrapperClasses = () => {
94
97
  const classes = [styles.tabs];
95
98
  if (variant === "transparent") classes.push(styles.transparent);
99
+ classes.push(focusClass);
96
100
  if (dotsWrapperClassName) classes.push(dotsWrapperClassName);
97
101
  return classes.join(" ");
98
102
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselDots.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CarouselDots.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -48,6 +48,7 @@ export { default as Section } from './Section';
48
48
  export { default as Select } from './SelectNative';
49
49
  export { default as SelectCard } from './SelectCard';
50
50
  export { default as SelectNative } from './SelectNative';
51
+ export { default as Slider } from './Slider';
51
52
  export { default as SubHeading } from './SubHeading';
52
53
  export { default as Switch } from './Switch';
53
54
  export { default as Tag } from './Tag';
@@ -48,6 +48,7 @@ import { SearchField } from "./SearchField/SearchField.js";
48
48
  import { default as default8 } from "./Section/Section.js";
49
49
  import { SelectNative, SelectNative as SelectNative2 } from "./SelectNative/SelectNative.js";
50
50
  import { default as default9 } from "./SelectCard/SelectCard.js";
51
+ import { Slider } from "./Slider/Slider.js";
51
52
  import { SubHeading } from "./SubHeading/SubHeading.js";
52
53
  import { Switch } from "./Switch/Switch.js";
53
54
  import { Tag } from "./Tag/Tag.js";
@@ -108,6 +109,7 @@ export {
108
109
  SelectNative as Select,
109
110
  default9 as SelectCard,
110
111
  SelectNative2 as SelectNative,
112
+ Slider,
111
113
  SubHeading,
112
114
  Switch,
113
115
  Tag,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -48,6 +48,7 @@ import { SearchField } from "./components/SearchField/SearchField.js";
48
48
  import { default as default8 } from "./components/Section/Section.js";
49
49
  import { SelectNative, SelectNative as SelectNative2 } from "./components/SelectNative/SelectNative.js";
50
50
  import { default as default9 } from "./components/SelectCard/SelectCard.js";
51
+ import { Slider } from "./components/Slider/Slider.js";
51
52
  import { SubHeading } from "./components/SubHeading/SubHeading.js";
52
53
  import { Switch } from "./components/Switch/Switch.js";
53
54
  import { Tag } from "./components/Tag/Tag.js";
@@ -108,6 +109,7 @@ export {
108
109
  SelectNative as Select,
109
110
  default9 as SelectCard,
110
111
  SelectNative2 as SelectNative,
112
+ Slider,
111
113
  SubHeading,
112
114
  Switch,
113
115
  Tag,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alto-avios/alto-ui",
3
- "version": "3.4.0-alpha.3",
3
+ "version": "3.4.0-alpha.4",
4
4
  "description": "A react component library for Alto Design System",
5
5
  "author": {
6
6
  "name": "Ian Caldwell IAGL",