@alto-avios/alto-ui 3.8.0 → 4.0.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.
Files changed (123) hide show
  1. package/dist/IconButton.module-4obqG6tY.js +1050 -0
  2. package/dist/IconButton.module-4obqG6tY.js.map +1 -0
  3. package/dist/assets/AutoplayControl.css +1 -0
  4. package/dist/assets/AviosCurrency.css +1 -1
  5. package/dist/assets/AviosCurrencyBadge.css +1 -0
  6. package/dist/assets/Button.css +1 -1
  7. package/dist/assets/Carousel.css +1 -0
  8. package/dist/assets/CarouselButton.css +1 -0
  9. package/dist/assets/CarouselDots.css +1 -0
  10. package/dist/assets/ComboBox.css +1 -1
  11. package/dist/assets/LoadingSpinner.css +1 -1
  12. package/dist/assets/MonthYearField.css +1 -0
  13. package/dist/assets/SearchField.css +1 -1
  14. package/dist/assets/SelectNative.css +1 -1
  15. package/dist/assets/SkeletonLoader.css +1 -0
  16. package/dist/assets/TextAreaField.css +1 -1
  17. package/dist/components/Accordion/Accordion.js +8 -8
  18. package/dist/components/AviosCurrency/AviosCurrency.d.ts +1 -2
  19. package/dist/components/AviosCurrency/AviosCurrency.js +40 -36
  20. package/dist/components/AviosCurrency/AviosCurrency.js.map +1 -1
  21. package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.d.ts +48 -0
  22. package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js +165 -0
  23. package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js.map +1 -0
  24. package/dist/components/AviosCurrencyBadge/index.d.ts +1 -0
  25. package/dist/components/AviosCurrencyBadge/index.js +5 -0
  26. package/dist/components/AviosCurrencyBadge/index.js.map +1 -0
  27. package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +3 -3
  28. package/dist/components/Badge/Badge.d.ts +1 -16
  29. package/dist/components/Badge/Badge.js +3 -9
  30. package/dist/components/Badge/Badge.js.map +1 -1
  31. package/dist/components/Box/Box.d.ts +0 -4
  32. package/dist/components/Box/Box.js +1 -5
  33. package/dist/components/Box/Box.js.map +1 -1
  34. package/dist/components/Button/Button.d.ts +34 -64
  35. package/dist/components/Button/Button.js +61 -44
  36. package/dist/components/Button/Button.js.map +1 -1
  37. package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
  38. package/dist/components/CalloutBanner/CalloutBanner.js +3 -3
  39. package/dist/components/Carousel/AutoplayControl/AutoplayControl.d.ts +27 -0
  40. package/dist/components/Carousel/AutoplayControl/AutoplayControl.js +115 -0
  41. package/dist/components/Carousel/AutoplayControl/AutoplayControl.js.map +1 -0
  42. package/dist/components/Carousel/Carousel.d.ts +171 -0
  43. package/dist/components/Carousel/Carousel.js +373 -0
  44. package/dist/components/Carousel/Carousel.js.map +1 -0
  45. package/dist/components/Carousel/CarouselButton/CarouselButton.d.ts +44 -0
  46. package/dist/components/Carousel/CarouselButton/CarouselButton.js +195 -0
  47. package/dist/components/Carousel/CarouselButton/CarouselButton.js.map +1 -0
  48. package/dist/components/Carousel/CarouselControls.d.ts +7 -0
  49. package/dist/components/Carousel/CarouselControls.js +305 -0
  50. package/dist/components/Carousel/CarouselControls.js.map +1 -0
  51. package/dist/components/Carousel/CarouselDots/CarouselDots.d.ts +16 -0
  52. package/dist/components/Carousel/CarouselDots/CarouselDots.js +150 -0
  53. package/dist/components/Carousel/CarouselDots/CarouselDots.js.map +1 -0
  54. package/dist/components/Carousel/index.d.ts +1 -0
  55. package/dist/components/Carousel/index.js +5 -0
  56. package/dist/components/Carousel/index.js.map +1 -0
  57. package/dist/components/ComboBox/ComboBox.js +10 -13
  58. package/dist/components/ComboBox/ComboBox.js.map +1 -1
  59. package/dist/components/CreditCardNumberField/CreditCardNumberField.js +5 -5
  60. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +5 -5
  61. package/dist/components/Dialog/Dialog.js +4 -4
  62. package/dist/components/ErrorSummary/ErrorSummary.js +4 -4
  63. package/dist/components/FieldError/FieldError.d.ts +5 -1
  64. package/dist/components/FieldError/FieldError.js +8 -1
  65. package/dist/components/FieldError/FieldError.js.map +1 -1
  66. package/dist/components/FieldHeader/FieldHeader.js +1 -1
  67. package/dist/components/Grid/Grid.d.ts +6 -1
  68. package/dist/components/Grid/Grid.js +2 -0
  69. package/dist/components/Grid/Grid.js.map +1 -1
  70. package/dist/components/Heading/Heading.d.ts +1 -6
  71. package/dist/components/Heading/Heading.js +1 -6
  72. package/dist/components/Heading/Heading.js.map +1 -1
  73. package/dist/components/Icon/Icon.d.ts +1 -6
  74. package/dist/components/IconButton/IconButton.d.ts +3 -15
  75. package/dist/components/IconButton/IconButton.js +18 -128
  76. package/dist/components/IconButton/IconButton.js.map +1 -1
  77. package/dist/components/Image/Image.d.ts +0 -1
  78. package/dist/components/Image/Image.js +8 -13
  79. package/dist/components/Image/Image.js.map +1 -1
  80. package/dist/components/Link/Link.d.ts +1 -16
  81. package/dist/components/Link/Link.js +4 -11
  82. package/dist/components/Link/Link.js.map +1 -1
  83. package/dist/components/ListBoxItem/index.d.ts +1 -1
  84. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -1
  85. package/dist/components/LoadingSpinner/LoadingSpinner.js +6 -4
  86. package/dist/components/LoadingSpinner/LoadingSpinner.js.map +1 -1
  87. package/dist/components/MonthYearField/MonthYearField.d.ts +107 -0
  88. package/dist/components/MonthYearField/MonthYearField.js +332 -0
  89. package/dist/components/MonthYearField/MonthYearField.js.map +1 -0
  90. package/dist/components/MonthYearField/index.d.ts +2 -0
  91. package/dist/components/MonthYearField/index.js +5 -0
  92. package/dist/components/MonthYearField/index.js.map +1 -0
  93. package/dist/components/Paragraph/Paragraph.d.ts +1 -6
  94. package/dist/components/Paragraph/Paragraph.js +1 -6
  95. package/dist/components/Paragraph/Paragraph.js.map +1 -1
  96. package/dist/components/PasswordField/PasswordField.js +3 -3
  97. package/dist/components/PhoneNumberField/PhoneNumberField.js +1 -1
  98. package/dist/components/Popover/Popover.js +2 -2
  99. package/dist/components/SearchField/SearchField.js +9 -7
  100. package/dist/components/SearchField/SearchField.js.map +1 -1
  101. package/dist/components/Section/Section.d.ts +42 -1
  102. package/dist/components/Section/Section.js +8 -13
  103. package/dist/components/Section/Section.js.map +1 -1
  104. package/dist/components/SelectCard/SelectCard.js +2 -2
  105. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +50 -0
  106. package/dist/components/SkeletonLoader/SkeletonLoader.js +150 -0
  107. package/dist/components/SkeletonLoader/SkeletonLoader.js.map +1 -0
  108. package/dist/components/SkeletonLoader/index.d.ts +1 -0
  109. package/dist/components/SkeletonLoader/index.js +5 -0
  110. package/dist/components/SkeletonLoader/index.js.map +1 -0
  111. package/dist/components/SubHeading/SubHeading.d.ts +1 -6
  112. package/dist/components/SubHeading/SubHeading.js +1 -6
  113. package/dist/components/SubHeading/SubHeading.js.map +1 -1
  114. package/dist/components/TextAreaField/TextAreaField.js +1 -1
  115. package/dist/components/_base/Field/Field.js +4 -4
  116. package/dist/components/index.d.ts +8 -0
  117. package/dist/components/index.js +8 -0
  118. package/dist/components/index.js.map +1 -1
  119. package/dist/index.js +8 -0
  120. package/dist/index.js.map +1 -1
  121. package/dist/{react-number-format.es-BjKL6crg.js → react-number-format.es-Dbc1db6s.js} +6 -6
  122. package/dist/{react-number-format.es-BjKL6crg.js.map → react-number-format.es-Dbc1db6s.js.map} +1 -1
  123. package/package.json +4 -2
@@ -0,0 +1,44 @@
1
+ export interface CarouselButtonProps {
2
+ /**
3
+ * Direction of the button (prev or next)
4
+ */
5
+ dir: 'prev' | 'next';
6
+ /**
7
+ * Button style variant
8
+ * @default 'neutral'
9
+ */
10
+ variant?: 'neutral' | 'white' | 'shapeFlat' | 'shapeElevated' | 'gradient';
11
+ /**
12
+ * Button size
13
+ * @default 'md'
14
+ */
15
+ size?: 'sm' | 'md' | 'lg';
16
+ /**
17
+ * Focus style
18
+ * @default 'default'
19
+ */
20
+ focusStyle?: 'default' | 'white';
21
+ /**
22
+ * Whether to hide the button when disabled
23
+ * @default false
24
+ */
25
+ hideDisabledArrow?: boolean;
26
+ /**
27
+ * Additional CSS class name for the button container
28
+ */
29
+ className?: string;
30
+ /**
31
+ * Additional CSS class name for the button content
32
+ */
33
+ buttonClassName?: string;
34
+ /**
35
+ * Custom click handler for implementing custom navigation behavior
36
+ */
37
+ onClick?: () => void;
38
+ /**
39
+ * @private
40
+ */
41
+ iconType?: 'chevron';
42
+ }
43
+ export declare const CarouselButton: ({ dir, variant, size, focusStyle, hideDisabledArrow, iconType, className, buttonClassName, onClick, }: CarouselButtonProps) => import("react/jsx-runtime").JSX.Element;
44
+ export default CarouselButton;
@@ -0,0 +1,195 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useState, useRef, useEffect } from "react";
3
+ import { e as CarouselButton$1, i as iconButtonStyles } from "../../../IconButton.module-4obqG6tY.js";
4
+ import { useFocusRing } from "@react-aria/focus";
5
+ import { focusStyleVariants } from "../../../utils/focus/focusStyles.js";
6
+ import { Icon } from "../../Icon/Icon.js";
7
+ import '../../../assets/CarouselButton.css';const arrowContainer = "_arrowContainer_f9nx_1";
8
+ const iconButton = "_iconButton_f9nx_20";
9
+ const hideDisabledArrow = "_hideDisabledArrow_f9nx_26";
10
+ const neutral = "_neutral_f9nx_32";
11
+ const white = "_white_f9nx_44";
12
+ const shapeFlat = "_shapeFlat_f9nx_62";
13
+ const shapeElevated = "_shapeElevated_f9nx_72";
14
+ const gradient = "_gradient_f9nx_93";
15
+ const next = "_next_f9nx_100";
16
+ const fullHeight = "_fullHeight_f9nx_137";
17
+ const prev = "_prev_f9nx_148";
18
+ const styles = {
19
+ arrowContainer,
20
+ iconButton,
21
+ hideDisabledArrow,
22
+ neutral,
23
+ white,
24
+ shapeFlat,
25
+ shapeElevated,
26
+ gradient,
27
+ next,
28
+ fullHeight,
29
+ prev
30
+ };
31
+ const CarouselButton = ({
32
+ dir,
33
+ variant = "neutral",
34
+ size = "md",
35
+ focusStyle = "default",
36
+ hideDisabledArrow: hideDisabledArrow2 = false,
37
+ iconType = "chevron",
38
+ className = "",
39
+ buttonClassName = "",
40
+ onClick
41
+ }) => {
42
+ const {
43
+ isFocusVisible,
44
+ focusProps,
45
+ isFocused
46
+ } = useFocusRing();
47
+ const directionClass = dir === "prev" ? styles.prev : styles.next;
48
+ const [isHovered, setIsHovered] = useState(false);
49
+ const [isPressed, setIsPressed] = useState(false);
50
+ const [isDisabled, setIsDisabled] = useState(false);
51
+ const [shouldShowFocusRing, setShouldShowFocusRing] = useState(false);
52
+ const variantStyleClass = variant ? styles[variant] : "";
53
+ const shouldBeFullHeight = variant === "gradient";
54
+ const buttonRef = useRef(null);
55
+ useEffect(() => {
56
+ const element = buttonRef.current;
57
+ if (!element) return;
58
+ setIsDisabled(element.getAttribute("aria-disabled") === "true");
59
+ const observer = new MutationObserver((mutations) => {
60
+ mutations.forEach((mutation) => {
61
+ if (mutation.type === "attributes" && mutation.attributeName === "aria-disabled") {
62
+ const isCurrentlyDisabled = element.getAttribute("aria-disabled") === "true";
63
+ setIsDisabled(isCurrentlyDisabled);
64
+ if (isCurrentlyDisabled) {
65
+ setIsHovered(false);
66
+ setIsPressed(false);
67
+ setShouldShowFocusRing(false);
68
+ }
69
+ }
70
+ });
71
+ });
72
+ observer.observe(element, {
73
+ attributes: true,
74
+ attributeFilter: ["aria-disabled"]
75
+ });
76
+ return () => {
77
+ observer.disconnect();
78
+ };
79
+ }, []);
80
+ useEffect(() => {
81
+ if (!buttonRef.current) return;
82
+ const element = buttonRef.current;
83
+ const handleFocus = (e) => {
84
+ if (e.target === element && isFocusVisible) {
85
+ setShouldShowFocusRing(true);
86
+ const carouselContainer = element.closest('[role="region"][aria-roledescription="carousel"], .carouselWrapper');
87
+ if (carouselContainer) {
88
+ const siblingButtons = carouselContainer.querySelectorAll('[dir="prev"], [dir="next"]');
89
+ siblingButtons.forEach((button) => {
90
+ if (button !== element && button instanceof HTMLElement) {
91
+ button.dispatchEvent(new CustomEvent("carousel:hideFocus"));
92
+ }
93
+ });
94
+ }
95
+ }
96
+ };
97
+ const handleBlur = () => {
98
+ setShouldShowFocusRing(false);
99
+ };
100
+ const handleHideFocus = () => {
101
+ setShouldShowFocusRing(false);
102
+ };
103
+ element.addEventListener("focus", handleFocus);
104
+ element.addEventListener("blur", handleBlur);
105
+ element.addEventListener("carousel:hideFocus", handleHideFocus);
106
+ return () => {
107
+ element.removeEventListener("focus", handleFocus);
108
+ element.removeEventListener("blur", handleBlur);
109
+ element.removeEventListener("carousel:hideFocus", handleHideFocus);
110
+ };
111
+ }, [isFocusVisible]);
112
+ useEffect(() => {
113
+ if (!isFocusVisible) {
114
+ setShouldShowFocusRing(false);
115
+ } else if (isFocused && isFocusVisible) {
116
+ setShouldShowFocusRing(true);
117
+ }
118
+ }, [isFocusVisible, isFocused]);
119
+ const getIconSize = () => {
120
+ if (size === "sm") return "0.75x";
121
+ if (size === "lg") return "2x";
122
+ if (size === "md") return "1.25x";
123
+ return "1x";
124
+ };
125
+ const getIconColor = () => {
126
+ switch (variant) {
127
+ case "white":
128
+ return "whitePrimary";
129
+ case "gradient":
130
+ return "accentPrimary";
131
+ default:
132
+ return "whiteOnVibrant";
133
+ }
134
+ };
135
+ const containerFocusClass = shouldBeFullHeight && shouldShowFocusRing ? focusStyleVariants({
136
+ focusStyle
137
+ }) : "";
138
+ const getButtonClasses = () => {
139
+ let styleVariant = "neutral";
140
+ let emphasis = "quaternary";
141
+ if (variant === "white") {
142
+ styleVariant = "white";
143
+ emphasis = "secondary";
144
+ }
145
+ const baseClass = iconButtonStyles.iconButton;
146
+ const sizeClass = iconButtonStyles[size] || "";
147
+ const emphasisClassKey = `${styleVariant}${emphasis.charAt(0).toUpperCase() + emphasis.slice(1)}`;
148
+ const emphasisClass = iconButtonStyles[emphasisClassKey] || "";
149
+ const focusClass = !shouldBeFullHeight && shouldShowFocusRing ? focusStyleVariants({
150
+ focusStyle
151
+ }) : "";
152
+ return `${baseClass} ${sizeClass} ${emphasisClass} ${focusClass} ${buttonClassName || ""}`;
153
+ };
154
+ const mouseEventHandlers = isDisabled ? {} : {
155
+ onMouseEnter: () => setIsHovered(true),
156
+ onMouseLeave: () => setIsHovered(false),
157
+ onMouseDown: () => setIsPressed(true),
158
+ onMouseUp: () => setIsPressed(false)
159
+ };
160
+ const handleClick = () => {
161
+ if (!isDisabled && onClick) {
162
+ onClick();
163
+ }
164
+ };
165
+ const handleKeyDown = (e) => {
166
+ if (e.key === " " || e.key === "Enter") {
167
+ e.preventDefault();
168
+ }
169
+ };
170
+ const handleKeyUp = (e) => {
171
+ if ((e.key === " " || e.key === "Enter") && !isDisabled) {
172
+ handleClick();
173
+ if (buttonRef.current) {
174
+ buttonRef.current.click();
175
+ }
176
+ }
177
+ };
178
+ const getTabIndex = () => {
179
+ if (isDisabled) {
180
+ return -1;
181
+ }
182
+ return 0;
183
+ };
184
+ const getAriaLabel = () => {
185
+ const action = dir === "prev" ? "Previous" : "Next";
186
+ const state = isDisabled ? ", unavailable" : "";
187
+ return `${action} slide${state}`;
188
+ };
189
+ return /* @__PURE__ */ jsx(CarouselButton$1, { dir, className: `${styles.arrowContainer} ${directionClass} ${hideDisabledArrow2 ? styles.hideDisabledArrow : ""} ${variantStyleClass || ""} ${shouldBeFullHeight ? styles.fullHeight : ""} ${containerFocusClass} ${className || ""}`, ...focusProps, ...mouseEventHandlers, "data-hovered": !isDisabled && isHovered ? true : void 0, "data-pressed": !isDisabled && isPressed ? true : void 0, "data-disabled": isDisabled ? true : void 0, "data-focused": !isDisabled && isFocused ? true : void 0, "data-focus-visible": shouldShowFocusRing ? true : void 0, ref: buttonRef, tabIndex: getTabIndex(), onClick: handleClick, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, "aria-label": getAriaLabel(), role: "button", children: /* @__PURE__ */ jsx("div", { className: `${getButtonClasses()} ${styles.iconButton}`, "data-focused": !shouldBeFullHeight && !isDisabled && isFocused && shouldShowFocusRing ? true : void 0, "data-focus-visible": !shouldBeFullHeight && !isDisabled && shouldShowFocusRing ? true : void 0, "data-parent-hovered": !isDisabled && isHovered ? true : void 0, "data-parent-pressed": !isDisabled && isPressed ? true : void 0, "data-parent-disabled": isDisabled ? true : void 0, "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, { iconName: `${iconType}-${dir === "prev" ? "left" : "right"}`, color: getIconColor(), iconSize: getIconSize(), "aria-hidden": "true" }) }) });
190
+ };
191
+ export {
192
+ CarouselButton,
193
+ CarouselButton as default
194
+ };
195
+ //# sourceMappingURL=CarouselButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarouselButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ import { ArgTypes } from '@storybook/react';
2
+ import { CarouselProps } from './Carousel';
3
+ /**
4
+ * Shared argTypes configuration for all Carousel stories
5
+ * This ensures consistent controls across all story files
6
+ */
7
+ export declare const carouselArgTypes: ArgTypes<CarouselProps>;
@@ -0,0 +1,305 @@
1
+ const carouselArgTypes = {
2
+ // Accessibility Controls
3
+ "aria-label": {
4
+ control: "text",
5
+ description: "Accessible name for the carousel - describes the purpose or content for screen readers",
6
+ table: {
7
+ category: "Accessibility",
8
+ type: { summary: "string" }
9
+ }
10
+ },
11
+ "aria-describedby": {
12
+ control: "text",
13
+ description: "ID of element that describes the carousel",
14
+ table: {
15
+ category: "Accessibility",
16
+ type: { summary: "string" }
17
+ }
18
+ },
19
+ // Core Configuration
20
+ looping: {
21
+ control: { type: "radio" },
22
+ options: ["off", "infinite", "backToStart"],
23
+ description: 'Looping behavior: "infinite" for continuous cycling, "backToStart" for jumping back to start, "off" to disable looping',
24
+ defaultValue: "off",
25
+ table: {
26
+ category: "Core Configuration",
27
+ type: { summary: '"infinite" | "backToStart" | "off"' },
28
+ defaultValue: { summary: '"off"' }
29
+ }
30
+ },
31
+ itemsPerPage: {
32
+ control: { type: "number", min: 1, max: 10, step: 0.25 },
33
+ description: "Number of items to display per page (minimum: 1). Decimal values (e.g., 2.25) can be used to show partial items for peek effects",
34
+ defaultValue: 1,
35
+ table: {
36
+ category: "Core Configuration",
37
+ type: { summary: "number | ResponsiveValue<number>" },
38
+ defaultValue: { summary: "1" }
39
+ }
40
+ },
41
+ spaceBetweenItems: {
42
+ control: { type: "number", min: 0, max: 100 },
43
+ description: "Space between carousel items in pixels. Works with both scroll padding and fractional items",
44
+ defaultValue: 0,
45
+ table: {
46
+ category: "Core Configuration",
47
+ type: { summary: "number | ResponsiveValue<number>" },
48
+ defaultValue: { summary: "0" }
49
+ }
50
+ },
51
+ scrollPadding: {
52
+ control: "text",
53
+ description: 'Amount of padding to add to create a "peek" effect. Accepts any valid CSS dimension (px, rem, em, %) - e.g., "15%", "20px", "2rem"',
54
+ table: {
55
+ category: "Core Configuration",
56
+ type: { summary: "string | ResponsiveValue<string>" },
57
+ defaultValue: { summary: "undefined" }
58
+ }
59
+ },
60
+ mouseDragging: {
61
+ control: "boolean",
62
+ description: "Whether to enable mouse dragging for the carousel",
63
+ defaultValue: true,
64
+ table: {
65
+ category: "Core Configuration",
66
+ type: { summary: "boolean" },
67
+ defaultValue: { summary: "true" }
68
+ }
69
+ },
70
+ // Button and Controls
71
+ iconType: {
72
+ table: {
73
+ disable: true
74
+ }
75
+ },
76
+ arrowStyleVariant: {
77
+ control: { type: "select" },
78
+ options: ["neutral", "white", "shapeFlat", "shapeElevated", "gradient"],
79
+ description: "Style variant for navigation arrow buttons",
80
+ defaultValue: "neutral",
81
+ table: {
82
+ category: "Button and Controls",
83
+ type: {
84
+ summary: '"neutral" | "white" | "shapeFlat" | "shapeElevated" | "gradient"'
85
+ },
86
+ defaultValue: { summary: '"neutral"' }
87
+ }
88
+ },
89
+ arrowSize: {
90
+ control: { type: "select" },
91
+ options: ["sm", "md", "lg"],
92
+ description: "Size of navigation buttons",
93
+ defaultValue: "md",
94
+ table: {
95
+ category: "Button and Controls",
96
+ type: {
97
+ summary: '"sm" | "md" | "lg" | ResponsiveValue<"sm" | "md" | "lg">'
98
+ },
99
+ defaultValue: { summary: '"md"' }
100
+ }
101
+ },
102
+ hideDisabledArrow: {
103
+ control: "boolean",
104
+ description: "Whether to hide navigation buttons when they are disabled (e.g., at first/last slide when looping is off)",
105
+ defaultValue: false,
106
+ table: {
107
+ category: "Button and Controls",
108
+ type: { summary: "boolean" },
109
+ defaultValue: { summary: "false" }
110
+ }
111
+ },
112
+ showArrowsOnHover: {
113
+ control: "boolean",
114
+ description: "Whether to show arrows only when hovering over the carousel or when it has focus",
115
+ defaultValue: false,
116
+ table: {
117
+ category: "Button and Controls",
118
+ type: { summary: "boolean | ResponsiveValue<boolean>" },
119
+ defaultValue: { summary: "false" }
120
+ }
121
+ },
122
+ focusStyle: {
123
+ control: { type: "radio" },
124
+ options: ["default", "white"],
125
+ description: 'Focus style for interactive elements - use "white" for dark backgrounds',
126
+ defaultValue: "default",
127
+ table: {
128
+ category: "Button and Controls",
129
+ type: { summary: '"default" | "white"' },
130
+ defaultValue: { summary: '"default"' }
131
+ }
132
+ },
133
+ // Dots/Pagination
134
+ hideDots: {
135
+ control: "boolean",
136
+ description: "Whether to hide pagination dots. Can be set responsively to show/hide dots at different breakpoints",
137
+ defaultValue: false,
138
+ table: {
139
+ category: "Dots/Pagination",
140
+ type: { summary: "boolean | ResponsiveValue<boolean>" },
141
+ defaultValue: { summary: "false" }
142
+ }
143
+ },
144
+ dotsSize: {
145
+ control: { type: "radio" },
146
+ options: ["md", "lg"],
147
+ description: "Size of pagination dots when visible",
148
+ defaultValue: "md",
149
+ table: {
150
+ category: "Dots/Pagination",
151
+ type: { summary: '"md" | "lg"' },
152
+ defaultValue: { summary: '"md"' }
153
+ }
154
+ },
155
+ dotsVariant: {
156
+ control: { type: "radio" },
157
+ options: ["standard", "transparent"],
158
+ description: "Visual style of pagination dots",
159
+ defaultValue: "standard",
160
+ table: {
161
+ category: "Dots/Pagination",
162
+ type: { summary: '"standard" | "transparent"' },
163
+ defaultValue: { summary: '"standard"' }
164
+ }
165
+ },
166
+ // Autoplay
167
+ autoPlay: {
168
+ control: "boolean",
169
+ description: "Whether the autoplay is enabled",
170
+ defaultValue: false,
171
+ table: {
172
+ category: "Autoplay",
173
+ type: { summary: "boolean" },
174
+ defaultValue: { summary: "false" }
175
+ }
176
+ },
177
+ autoPlayInterval: {
178
+ control: { type: "number", min: 1e3, max: 1e4, step: 500 },
179
+ description: "Interval in milliseconds between slides during autoplay",
180
+ defaultValue: 2e3,
181
+ table: {
182
+ category: "Autoplay",
183
+ type: { summary: "number" },
184
+ defaultValue: { summary: "2000" }
185
+ }
186
+ },
187
+ autoPlayStyleVariant: {
188
+ control: { type: "select" },
189
+ options: ["neutralVibrant", "neutralSubtle", "whiteVibrant", "whiteSubtle"],
190
+ description: "Style variant for autoplay control button",
191
+ defaultValue: "neutralVibrant",
192
+ table: {
193
+ category: "Autoplay",
194
+ type: {
195
+ summary: '"neutralVibrant" | "neutralSubtle" | "whiteVibrant" | "whiteSubtle"'
196
+ },
197
+ defaultValue: { summary: '"neutralVibrant"' }
198
+ }
199
+ },
200
+ autoPlayControlSize: {
201
+ control: { type: "radio" },
202
+ options: ["sm", "md"],
203
+ description: "Size of autoplay control button",
204
+ defaultValue: "md",
205
+ table: {
206
+ category: "Autoplay",
207
+ type: { summary: '"sm" | "md"' },
208
+ defaultValue: { summary: '"md"' }
209
+ }
210
+ },
211
+ // Custom Styling & Positioning
212
+ carouselWrapperClassName: {
213
+ control: "text",
214
+ description: 'Custom class name for the outermost wrapper to allow custom styles - use your preferred naming convention (helper: "defaultCarouselWrapper")',
215
+ table: {
216
+ category: "Custom Styling & Positioning",
217
+ type: { summary: "string" }
218
+ }
219
+ },
220
+ prevArrowClassName: {
221
+ control: "text",
222
+ description: 'Custom class name for the previous button to allow custom styles - use your preferred naming convention (helper: "defaultPrevButton")',
223
+ table: {
224
+ category: "Custom Styling & Positioning",
225
+ type: { summary: "string" }
226
+ }
227
+ },
228
+ nextArrowClassName: {
229
+ control: "text",
230
+ description: 'Custom class name for the next button to allow custom styles - use your preferred naming convention (helper: "defaultNextButton")',
231
+ table: {
232
+ category: "Custom Styling & Positioning",
233
+ type: { summary: "string" }
234
+ }
235
+ },
236
+ autoplayControlClassName: {
237
+ control: "text",
238
+ description: 'Custom class name for the autoplay control to allow custom styles - use your preferred naming convention (helper: "autoplayControl")',
239
+ table: {
240
+ category: "Custom Styling & Positioning",
241
+ type: { summary: "string" }
242
+ }
243
+ },
244
+ dotsContainerClassName: {
245
+ control: "text",
246
+ description: 'Custom class name for the dots container to allow custom styles - use your preferred naming convention (helper: "defaultDotsContainer")',
247
+ table: {
248
+ category: "Custom Styling & Positioning",
249
+ type: { summary: "string" }
250
+ }
251
+ },
252
+ dotsWrapperClassName: {
253
+ control: "text",
254
+ description: "Custom class name for the dots wrapper to allow custom styles - use your preferred naming convention",
255
+ table: {
256
+ category: "Custom Styling & Positioning",
257
+ type: { summary: "string" }
258
+ }
259
+ },
260
+ dotClassName: {
261
+ control: "text",
262
+ description: "Custom class name for individual dots to allow custom styles - use your preferred naming convention",
263
+ table: {
264
+ category: "Custom Styling & Positioning",
265
+ type: { summary: "string" }
266
+ }
267
+ },
268
+ activeDotClassName: {
269
+ control: "text",
270
+ description: "Custom class name for the active dot to allow custom styles - use your preferred naming convention",
271
+ table: {
272
+ category: "Custom Styling & Positioning",
273
+ type: { summary: "string" }
274
+ }
275
+ },
276
+ itemWrapperClassName: {
277
+ control: "text",
278
+ description: "Custom class name for individual carousel item wrappers to allow custom styles - use your preferred naming convention",
279
+ table: {
280
+ category: "Custom Styling & Positioning",
281
+ type: { summary: "string" }
282
+ }
283
+ },
284
+ activeItemClassName: {
285
+ control: "text",
286
+ description: "Custom class name for the currently active/visible carousel item to allow custom styles - use your preferred naming convention",
287
+ table: {
288
+ category: "Custom Styling & Positioning",
289
+ type: { summary: "string" }
290
+ }
291
+ },
292
+ // Content (disable control)
293
+ children: {
294
+ control: { type: "object" },
295
+ description: "Content to be displayed in the carousel",
296
+ table: {
297
+ category: "Content",
298
+ disable: true
299
+ }
300
+ }
301
+ };
302
+ export {
303
+ carouselArgTypes
304
+ };
305
+ //# sourceMappingURL=CarouselControls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CarouselControls.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ export interface CarouselDotsProps {
3
+ totalItems: number;
4
+ currentPage: number;
5
+ onDotClick: (index: number) => void;
6
+ dotsSize?: 'md' | 'lg';
7
+ variant?: 'standard' | 'transparent';
8
+ focusStyle?: 'default' | 'white';
9
+ className?: string;
10
+ dotsWrapperClassName?: string;
11
+ dotClassName?: string;
12
+ activeDotClassName?: string;
13
+ isTransitioning?: boolean;
14
+ }
15
+ export declare const CarouselDots: React.FC<CarouselDotsProps>;
16
+ export default CarouselDots;