@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.
- package/dist/IconButton.module-4obqG6tY.js +1050 -0
- package/dist/IconButton.module-4obqG6tY.js.map +1 -0
- package/dist/assets/AutoplayControl.css +1 -0
- package/dist/assets/AviosCurrency.css +1 -1
- package/dist/assets/AviosCurrencyBadge.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Carousel.css +1 -0
- package/dist/assets/CarouselButton.css +1 -0
- package/dist/assets/CarouselDots.css +1 -0
- package/dist/assets/ComboBox.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/MonthYearField.css +1 -0
- package/dist/assets/SearchField.css +1 -1
- package/dist/assets/SelectNative.css +1 -1
- package/dist/assets/SkeletonLoader.css +1 -0
- package/dist/assets/TextAreaField.css +1 -1
- package/dist/components/Accordion/Accordion.js +8 -8
- package/dist/components/AviosCurrency/AviosCurrency.d.ts +1 -2
- package/dist/components/AviosCurrency/AviosCurrency.js +40 -36
- package/dist/components/AviosCurrency/AviosCurrency.js.map +1 -1
- package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.d.ts +48 -0
- package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js +165 -0
- package/dist/components/AviosCurrencyBadge/AviosCurrencyBadge.js.map +1 -0
- package/dist/components/AviosCurrencyBadge/index.d.ts +1 -0
- package/dist/components/AviosCurrencyBadge/index.js +5 -0
- package/dist/components/AviosCurrencyBadge/index.js.map +1 -0
- package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +3 -3
- package/dist/components/Badge/Badge.d.ts +1 -16
- package/dist/components/Badge/Badge.js +3 -9
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Box/Box.d.ts +0 -4
- package/dist/components/Box/Box.js +1 -5
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Button/Button.d.ts +34 -64
- package/dist/components/Button/Button.js +61 -44
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/CalloutBanner/CalloutBanner.js +3 -3
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.d.ts +27 -0
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.js +115 -0
- package/dist/components/Carousel/AutoplayControl/AutoplayControl.js.map +1 -0
- package/dist/components/Carousel/Carousel.d.ts +171 -0
- package/dist/components/Carousel/Carousel.js +373 -0
- package/dist/components/Carousel/Carousel.js.map +1 -0
- package/dist/components/Carousel/CarouselButton/CarouselButton.d.ts +44 -0
- package/dist/components/Carousel/CarouselButton/CarouselButton.js +195 -0
- package/dist/components/Carousel/CarouselButton/CarouselButton.js.map +1 -0
- package/dist/components/Carousel/CarouselControls.d.ts +7 -0
- package/dist/components/Carousel/CarouselControls.js +305 -0
- package/dist/components/Carousel/CarouselControls.js.map +1 -0
- package/dist/components/Carousel/CarouselDots/CarouselDots.d.ts +16 -0
- package/dist/components/Carousel/CarouselDots/CarouselDots.js +150 -0
- package/dist/components/Carousel/CarouselDots/CarouselDots.js.map +1 -0
- package/dist/components/Carousel/index.d.ts +1 -0
- package/dist/components/Carousel/index.js +5 -0
- package/dist/components/Carousel/index.js.map +1 -0
- package/dist/components/ComboBox/ComboBox.js +10 -13
- package/dist/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js +5 -5
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +5 -5
- package/dist/components/Dialog/Dialog.js +4 -4
- package/dist/components/ErrorSummary/ErrorSummary.js +4 -4
- package/dist/components/FieldError/FieldError.d.ts +5 -1
- package/dist/components/FieldError/FieldError.js +8 -1
- package/dist/components/FieldError/FieldError.js.map +1 -1
- package/dist/components/FieldHeader/FieldHeader.js +1 -1
- package/dist/components/Grid/Grid.d.ts +6 -1
- package/dist/components/Grid/Grid.js +2 -0
- package/dist/components/Grid/Grid.js.map +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -6
- package/dist/components/Heading/Heading.js +1 -6
- package/dist/components/Heading/Heading.js.map +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -6
- package/dist/components/IconButton/IconButton.d.ts +3 -15
- package/dist/components/IconButton/IconButton.js +18 -128
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Image/Image.d.ts +0 -1
- package/dist/components/Image/Image.js +8 -13
- package/dist/components/Image/Image.js.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -16
- package/dist/components/Link/Link.js +4 -11
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/ListBoxItem/index.d.ts +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.js +6 -4
- package/dist/components/LoadingSpinner/LoadingSpinner.js.map +1 -1
- package/dist/components/MonthYearField/MonthYearField.d.ts +107 -0
- package/dist/components/MonthYearField/MonthYearField.js +332 -0
- package/dist/components/MonthYearField/MonthYearField.js.map +1 -0
- package/dist/components/MonthYearField/index.d.ts +2 -0
- package/dist/components/MonthYearField/index.js +5 -0
- package/dist/components/MonthYearField/index.js.map +1 -0
- package/dist/components/Paragraph/Paragraph.d.ts +1 -6
- package/dist/components/Paragraph/Paragraph.js +1 -6
- package/dist/components/Paragraph/Paragraph.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.js +3 -3
- package/dist/components/PhoneNumberField/PhoneNumberField.js +1 -1
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/SearchField/SearchField.js +9 -7
- package/dist/components/SearchField/SearchField.js.map +1 -1
- package/dist/components/Section/Section.d.ts +42 -1
- package/dist/components/Section/Section.js +8 -13
- package/dist/components/Section/Section.js.map +1 -1
- package/dist/components/SelectCard/SelectCard.js +2 -2
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +50 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.js +150 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.js.map +1 -0
- package/dist/components/SkeletonLoader/index.d.ts +1 -0
- package/dist/components/SkeletonLoader/index.js +5 -0
- package/dist/components/SkeletonLoader/index.js.map +1 -0
- package/dist/components/SubHeading/SubHeading.d.ts +1 -6
- package/dist/components/SubHeading/SubHeading.js +1 -6
- package/dist/components/SubHeading/SubHeading.js.map +1 -1
- package/dist/components/TextAreaField/TextAreaField.js +1 -1
- package/dist/components/_base/Field/Field.js +4 -4
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/{react-number-format.es-BjKL6crg.js → react-number-format.es-Dbc1db6s.js} +6 -6
- package/dist/{react-number-format.es-BjKL6crg.js.map → react-number-format.es-Dbc1db6s.js.map} +1 -1
- package/package.json +4 -2
|
@@ -1,141 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Button } from "react-aria-components";
|
|
5
|
-
import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Button } from "../Button/Button.js";
|
|
6
4
|
import { Icon } from "../Icon/Icon.js";
|
|
7
|
-
import
|
|
5
|
+
import { useObjectRef } from "@react-aria/utils";
|
|
8
6
|
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
9
|
-
|
|
10
|
-
const sm = "_sm_kb1oz_24";
|
|
11
|
-
const md = "_md_kb1oz_30";
|
|
12
|
-
const lg = "_lg_kb1oz_36";
|
|
13
|
-
const accentPrimary = "_accentPrimary_kb1oz_46";
|
|
14
|
-
const accentSecondary = "_accentSecondary_kb1oz_69";
|
|
15
|
-
const accentTertiary = "_accentTertiary_kb1oz_98";
|
|
16
|
-
const accentQuaternary = "_accentQuaternary_kb1oz_127";
|
|
17
|
-
const criticalPrimary = "_criticalPrimary_kb1oz_151";
|
|
18
|
-
const criticalSecondary = "_criticalSecondary_kb1oz_175";
|
|
19
|
-
const criticalTertiary = "_criticalTertiary_kb1oz_204";
|
|
20
|
-
const criticalQuaternary = "_criticalQuaternary_kb1oz_229";
|
|
21
|
-
const neutralPrimary = "_neutralPrimary_kb1oz_254";
|
|
22
|
-
const neutralSecondary = "_neutralSecondary_kb1oz_278";
|
|
23
|
-
const neutralTertiary = "_neutralTertiary_kb1oz_305";
|
|
24
|
-
const neutralQuaternary = "_neutralQuaternary_kb1oz_330";
|
|
25
|
-
const whitePrimary = "_whitePrimary_kb1oz_356";
|
|
26
|
-
const whiteSecondary = "_whiteSecondary_kb1oz_385";
|
|
27
|
-
const whiteTertiary = "_whiteTertiary_kb1oz_416";
|
|
28
|
-
const whiteQuaternary = "_whiteQuaternary_kb1oz_445";
|
|
29
|
-
const styles = {
|
|
30
|
-
iconButton: iconButton$1,
|
|
31
|
-
sm,
|
|
32
|
-
md,
|
|
33
|
-
lg,
|
|
34
|
-
accentPrimary,
|
|
35
|
-
accentSecondary,
|
|
36
|
-
accentTertiary,
|
|
37
|
-
accentQuaternary,
|
|
38
|
-
criticalPrimary,
|
|
39
|
-
criticalSecondary,
|
|
40
|
-
criticalTertiary,
|
|
41
|
-
criticalQuaternary,
|
|
42
|
-
neutralPrimary,
|
|
43
|
-
neutralSecondary,
|
|
44
|
-
neutralTertiary,
|
|
45
|
-
neutralQuaternary,
|
|
46
|
-
whitePrimary,
|
|
47
|
-
whiteSecondary,
|
|
48
|
-
whiteTertiary,
|
|
49
|
-
whiteQuaternary
|
|
50
|
-
};
|
|
51
|
-
const iconButton = cva(styles.iconButton, {
|
|
52
|
-
variants: {
|
|
53
|
-
size: {
|
|
54
|
-
sm: styles.sm,
|
|
55
|
-
md: styles.md,
|
|
56
|
-
lg: styles.lg
|
|
57
|
-
},
|
|
58
|
-
accent: {
|
|
59
|
-
primary: styles.accentPrimary,
|
|
60
|
-
secondary: styles.accentSecondary,
|
|
61
|
-
tertiary: styles.accentTertiary,
|
|
62
|
-
quaternary: styles.accentQuaternary
|
|
63
|
-
},
|
|
64
|
-
critical: {
|
|
65
|
-
primary: styles.criticalPrimary,
|
|
66
|
-
secondary: styles.criticalSecondary,
|
|
67
|
-
tertiary: styles.criticalTertiary,
|
|
68
|
-
quaternary: styles.criticalQuaternary
|
|
69
|
-
},
|
|
70
|
-
neutral: {
|
|
71
|
-
primary: styles.neutralPrimary,
|
|
72
|
-
secondary: styles.neutralSecondary,
|
|
73
|
-
tertiary: styles.neutralTertiary,
|
|
74
|
-
quaternary: styles.neutralQuaternary
|
|
75
|
-
},
|
|
76
|
-
white: {
|
|
77
|
-
primary: styles.whitePrimary,
|
|
78
|
-
secondary: styles.whiteSecondary,
|
|
79
|
-
tertiary: styles.whiteTertiary,
|
|
80
|
-
quaternary: styles.whiteQuaternary
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
defaultVariants: {
|
|
84
|
-
size: "md"
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
const IconButton = forwardRef(({
|
|
88
|
-
styleType,
|
|
89
|
-
styleVariant,
|
|
90
|
-
emphasis = "primary",
|
|
91
|
-
size = "md",
|
|
92
|
-
isLoading = false,
|
|
7
|
+
const IconButton = forwardRef(function IconButton2({
|
|
93
8
|
iconProps = {
|
|
94
9
|
iconName: "circle"
|
|
95
10
|
},
|
|
96
|
-
|
|
97
|
-
form,
|
|
98
|
-
formAction,
|
|
99
|
-
formEncType,
|
|
100
|
-
formMethod,
|
|
101
|
-
formNoValidate,
|
|
102
|
-
formTarget,
|
|
103
|
-
name,
|
|
104
|
-
value,
|
|
105
|
-
isDisabled,
|
|
106
|
-
autoFocus,
|
|
107
|
-
type,
|
|
108
|
-
focusStyle = "default",
|
|
109
|
-
slot,
|
|
110
|
-
tooltipLabel = "",
|
|
11
|
+
tooltipLabel,
|
|
111
12
|
tooltipPlacement = "top",
|
|
112
13
|
...props
|
|
113
|
-
},
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
size,
|
|
124
|
-
[resolvedStyleVariant]: emphasis
|
|
125
|
-
})} ${focusStyleVariants({
|
|
126
|
-
focusStyle
|
|
127
|
-
})}`, ref: ref || buttonRef, onPress: onClick, form, formAction, formEncType, formMethod, formNoValidate, formTarget, name, value, isDisabled, autoFocus, type, "aria-label": tooltipLabel ? void 0 : isLoading ? "Loading Spinner" : "Icon", style: {
|
|
128
|
-
width: isLoading && buttonWidth ? `${buttonWidth}px` : void 0
|
|
129
|
-
}, slot, ...props, children: [
|
|
130
|
-
isLoading && /* @__PURE__ */ jsx(LoadingSpinner, { size: "1x" }),
|
|
131
|
-
!isLoading && /* @__PURE__ */ jsx(Icon, { ...iconProps })
|
|
132
|
-
] });
|
|
14
|
+
}, forwardedRef) {
|
|
15
|
+
const ref = useObjectRef(forwardedRef);
|
|
16
|
+
const {
|
|
17
|
+
size
|
|
18
|
+
} = props;
|
|
19
|
+
const finalIconProps = {
|
|
20
|
+
...iconProps,
|
|
21
|
+
iconSize: size === "lg" ? "1.25x" : iconProps == null ? void 0 : iconProps.iconSize
|
|
22
|
+
};
|
|
23
|
+
const iconButtonComponent = /* @__PURE__ */ jsx(Button, { ref, ...props, iconButton: true, children: /* @__PURE__ */ jsx(Icon, { ...finalIconProps }) });
|
|
133
24
|
if (tooltipLabel) {
|
|
134
|
-
return /* @__PURE__ */ jsx(Tooltip, { label: tooltipLabel, placement: tooltipPlacement,
|
|
25
|
+
return /* @__PURE__ */ jsx(Tooltip, { label: tooltipLabel, placement: tooltipPlacement, children: iconButtonComponent });
|
|
135
26
|
}
|
|
136
|
-
return
|
|
27
|
+
return iconButtonComponent;
|
|
137
28
|
});
|
|
138
|
-
IconButton.displayName = "IconButton";
|
|
139
29
|
export {
|
|
140
30
|
IconButton,
|
|
141
31
|
IconButton as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -30,7 +30,6 @@ export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElemen
|
|
|
30
30
|
* Aspect ratio of the image
|
|
31
31
|
*/
|
|
32
32
|
aspectRatio?: number;
|
|
33
|
-
backgroundColour?: BackgroundVariants['backgroundColor'];
|
|
34
33
|
}
|
|
35
34
|
export declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
36
35
|
export default Image;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import React__default, { useState, useRef, useEffect } from "react";
|
|
3
3
|
import { c as cva } from "../../index-DdUYounA.js";
|
|
4
4
|
import { borderVariants } from "../../utils/border/border.js";
|
|
5
5
|
import { backgroundColorVariants } from "../../utils/backgroundColor/backgroundColor.js";
|
|
@@ -32,7 +32,7 @@ const imageVariants = cva(styles.image, {
|
|
|
32
32
|
const useImageLoaded = (onLoadProp) => {
|
|
33
33
|
const [loaded, setLoaded] = useState(false);
|
|
34
34
|
const ref = useRef(null);
|
|
35
|
-
const handleLoad =
|
|
35
|
+
const handleLoad = React__default.useCallback((event) => {
|
|
36
36
|
if (typeof onLoadProp === "function") {
|
|
37
37
|
onLoadProp(event);
|
|
38
38
|
}
|
|
@@ -50,7 +50,7 @@ const useImageLoaded = (onLoadProp) => {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
const useMergedRef = (internalRef, forwardedRef) => {
|
|
53
|
-
return
|
|
53
|
+
return React__default.useMemo(() => {
|
|
54
54
|
if (!forwardedRef) return internalRef;
|
|
55
55
|
return (node) => {
|
|
56
56
|
if (typeof forwardedRef === "function") {
|
|
@@ -62,7 +62,7 @@ const useMergedRef = (internalRef, forwardedRef) => {
|
|
|
62
62
|
};
|
|
63
63
|
}, [internalRef, forwardedRef]);
|
|
64
64
|
};
|
|
65
|
-
const Image =
|
|
65
|
+
const Image = React__default.forwardRef(({
|
|
66
66
|
src,
|
|
67
67
|
fallbackSrc,
|
|
68
68
|
onError: onErrorProp,
|
|
@@ -71,15 +71,10 @@ const Image = React.forwardRef(({
|
|
|
71
71
|
children,
|
|
72
72
|
borderRadius,
|
|
73
73
|
backgroundColor,
|
|
74
|
-
backgroundColour,
|
|
75
74
|
fit,
|
|
76
75
|
aspectRatio,
|
|
77
76
|
...props
|
|
78
77
|
}, forwardedRef) => {
|
|
79
|
-
if (backgroundColour && !backgroundColor) {
|
|
80
|
-
console.warn("Warning: `backgroundColour` is deprecated and will be removed in a future release. Please use `backgroundColor` instead.");
|
|
81
|
-
}
|
|
82
|
-
const resolvedBackgroundColor = backgroundColor ?? backgroundColour;
|
|
83
78
|
const {
|
|
84
79
|
ref: internalRef,
|
|
85
80
|
loaded,
|
|
@@ -90,7 +85,7 @@ const Image = React.forwardRef(({
|
|
|
90
85
|
if (asChild && !children) {
|
|
91
86
|
console.error("Image component: Children required when asChild is true");
|
|
92
87
|
}
|
|
93
|
-
const handleError =
|
|
88
|
+
const handleError = React__default.useCallback((e) => {
|
|
94
89
|
if (fallbackSrc) {
|
|
95
90
|
setError(true);
|
|
96
91
|
}
|
|
@@ -105,7 +100,7 @@ const Image = React.forwardRef(({
|
|
|
105
100
|
borderRadius
|
|
106
101
|
})}
|
|
107
102
|
${backgroundColorVariants({
|
|
108
|
-
backgroundColor
|
|
103
|
+
backgroundColor
|
|
109
104
|
})}
|
|
110
105
|
${imageVariants({
|
|
111
106
|
fit
|
|
@@ -119,8 +114,8 @@ const Image = React.forwardRef(({
|
|
|
119
114
|
},
|
|
120
115
|
...props
|
|
121
116
|
};
|
|
122
|
-
if (asChild &&
|
|
123
|
-
return
|
|
117
|
+
if (asChild && React__default.isValidElement(children)) {
|
|
118
|
+
return React__default.cloneElement(children, {
|
|
124
119
|
...imgProps,
|
|
125
120
|
...children.props
|
|
126
121
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Image.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -52,21 +52,6 @@ export interface LinkProps extends AriaLinkProps {
|
|
|
52
52
|
* The focus style of the button
|
|
53
53
|
*/
|
|
54
54
|
focusStyle?: 'default' | 'white';
|
|
55
|
-
/**
|
|
56
|
-
* Whether an icon should display at the End of the Link
|
|
57
|
-
* @deprecated Use iconEndProps instead
|
|
58
|
-
*/
|
|
59
|
-
iconEnd?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Whether an icon should display at the End of the Link
|
|
62
|
-
* @deprecated Use iconEndProps instead
|
|
63
|
-
*/
|
|
64
|
-
iconProps?: IconProps;
|
|
65
|
-
/**
|
|
66
|
-
* The text to display in the Link
|
|
67
|
-
* @deprecated Use children instead
|
|
68
|
-
*/
|
|
69
|
-
linkText?: string;
|
|
70
55
|
}
|
|
71
|
-
declare const Link: ({ size, underline, iconStartProps, iconEndProps,
|
|
56
|
+
declare const Link: ({ size, underline, iconStartProps, iconEndProps, href, target, focusStyle, children, ariaLabelExternal, foregroundColor, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
72
57
|
export default Link;
|
|
@@ -52,9 +52,6 @@ const Link = ({
|
|
|
52
52
|
iconEndProps = {
|
|
53
53
|
iconName: "arrow-right"
|
|
54
54
|
},
|
|
55
|
-
iconProps,
|
|
56
|
-
// deprecated
|
|
57
|
-
linkText,
|
|
58
55
|
href,
|
|
59
56
|
target = "_self",
|
|
60
57
|
focusStyle = "default",
|
|
@@ -63,10 +60,6 @@ const Link = ({
|
|
|
63
60
|
foregroundColor = "accentPrimary",
|
|
64
61
|
...props
|
|
65
62
|
}) => {
|
|
66
|
-
const finalIconEndProps = iconProps ?? // Use deprecated iconProps if provided
|
|
67
|
-
(iconEndProps === false ? void 0 : iconEndProps ?? {
|
|
68
|
-
iconName: "arrow-right"
|
|
69
|
-
});
|
|
70
63
|
const externalLinkProps = target === "_blank" ? {
|
|
71
64
|
rel: "noopener noreferrer",
|
|
72
65
|
"aria-label": ariaLabelExternal
|
|
@@ -96,10 +89,10 @@ const Link = ({
|
|
|
96
89
|
iconStartProps && /* @__PURE__ */ jsx(Icon, { className: link({
|
|
97
90
|
iconStart: !!iconStartProps
|
|
98
91
|
}), iconSize, ...iconStartProps }),
|
|
99
|
-
children
|
|
100
|
-
|
|
101
|
-
iconEnd: !!
|
|
102
|
-
}), iconSize, ...
|
|
92
|
+
children,
|
|
93
|
+
iconEndProps && /* @__PURE__ */ jsx(Icon, { className: link({
|
|
94
|
+
iconEnd: !!iconEndProps
|
|
95
|
+
}), iconSize, ...iconEndProps })
|
|
103
96
|
] });
|
|
104
97
|
};
|
|
105
98
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { IconSize } from '../Icon/Icon';
|
|
1
2
|
import { ForegroundVariants } from '../../utils/foregroundColour/foregroundColor';
|
|
2
3
|
export interface LoadingSpinnerProps {
|
|
3
4
|
/**
|
|
4
5
|
* What size loading spinner
|
|
5
6
|
*/
|
|
6
|
-
size?:
|
|
7
|
+
size?: IconSize;
|
|
7
8
|
/**
|
|
8
9
|
* What size loading spinner
|
|
9
10
|
*/
|
|
@@ -2,10 +2,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as cva } from "../../index-DdUYounA.js";
|
|
3
3
|
import { ProgressBar } from "react-aria-components";
|
|
4
4
|
import { Icon } from "../Icon/Icon.js";
|
|
5
|
-
import '../../assets/LoadingSpinner.css';const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
import '../../assets/LoadingSpinner.css';const loadingSpinner$1 = "_loadingSpinner_1kyw6_1";
|
|
6
|
+
const sm = "_sm_1kyw6_5";
|
|
7
|
+
const md = "_md_1kyw6_9";
|
|
8
|
+
const lg = "_lg_1kyw6_13";
|
|
8
9
|
const styles = {
|
|
10
|
+
loadingSpinner: loadingSpinner$1,
|
|
9
11
|
sm,
|
|
10
12
|
md,
|
|
11
13
|
lg
|
|
@@ -30,7 +32,7 @@ const LoadingSpinner = ({
|
|
|
30
32
|
}) => {
|
|
31
33
|
return /* @__PURE__ */ jsx(ProgressBar, { className: `${loadingSpinner({
|
|
32
34
|
buttonSize
|
|
33
|
-
})} ${className}`, "aria-label": "Loading", children: /* @__PURE__ */ jsx(Icon, { iconName: "spinner-third", iconPrefix: "fad", iconSize: size, color: styleVariant, spin: true, buttonsize: buttonSize }) });
|
|
35
|
+
})} ${className}`, "aria-label": "Loading", children: /* @__PURE__ */ jsx(Icon, { iconName: "spinner-third", iconPrefix: "fad", iconSize: size, color: styleVariant, spin: true, buttonsize: buttonSize, padding: "square" }) });
|
|
34
36
|
};
|
|
35
37
|
export {
|
|
36
38
|
LoadingSpinner as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { FieldProps } from '../_base/Field';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface MonthYearFieldProps extends Omit<FieldProps, 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* The current value of the month (1-12 or "01"-"12").
|
|
6
|
+
*/
|
|
7
|
+
monthValue?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The current value of the year (2 or 4 digits, e.g., "24" or "2024").
|
|
10
|
+
*/
|
|
11
|
+
yearValue?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Format for the year input - 2 digits or 4 digits.
|
|
14
|
+
* @default 2
|
|
15
|
+
*/
|
|
16
|
+
yearFormat?: 2 | 4;
|
|
17
|
+
/**
|
|
18
|
+
* Handler that is called when the value changes.
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (value: {
|
|
21
|
+
month: string;
|
|
22
|
+
year: string;
|
|
23
|
+
}) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Handler that is called when the field is focused.
|
|
26
|
+
*/
|
|
27
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Handler that is called when the field loses focus.
|
|
30
|
+
*/
|
|
31
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the field is disabled.
|
|
34
|
+
*/
|
|
35
|
+
isDisabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the field is read-only.
|
|
38
|
+
*/
|
|
39
|
+
isReadOnly?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the field is required.
|
|
42
|
+
*/
|
|
43
|
+
isRequired?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The autoComplete attribute for the month input.
|
|
46
|
+
*/
|
|
47
|
+
autoCompleteMonth?: React.HTMLInputAutoCompleteAttribute | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The autoComplete attribute for the year input.
|
|
50
|
+
*/
|
|
51
|
+
autoCompleteYear?: React.HTMLInputAutoCompleteAttribute | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The label for the month input.
|
|
54
|
+
* @default 'Month'
|
|
55
|
+
*/
|
|
56
|
+
labelMonth?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The label for the year input.
|
|
59
|
+
* @default 'Year'
|
|
60
|
+
*/
|
|
61
|
+
labelYear?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The placeholder for the month input.
|
|
64
|
+
* @default 'MM'
|
|
65
|
+
*/
|
|
66
|
+
placeholderMonth?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The placeholder for the year input.
|
|
69
|
+
* @default 'YY' for 2-digit format, 'YYYY' for 4-digit format
|
|
70
|
+
*/
|
|
71
|
+
placeholderYear?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Optional ID for the select element. If not provided, one will be generated.
|
|
74
|
+
*/
|
|
75
|
+
id?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The name attribute for form integration. A hidden input with this name
|
|
78
|
+
* will contain the combined month/year value (e.g., "MM/YY" or "MM/YYYY").
|
|
79
|
+
*/
|
|
80
|
+
name?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface MonthYearFieldRef {
|
|
83
|
+
/**
|
|
84
|
+
* Focus the month input.
|
|
85
|
+
*/
|
|
86
|
+
focusMonth: () => void;
|
|
87
|
+
/**
|
|
88
|
+
* Focus the year input.
|
|
89
|
+
*/
|
|
90
|
+
focusYear: () => void;
|
|
91
|
+
/**
|
|
92
|
+
* Get the current values.
|
|
93
|
+
*/
|
|
94
|
+
getValue: () => {
|
|
95
|
+
month: string;
|
|
96
|
+
year: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Set the values programmatically.
|
|
100
|
+
*/
|
|
101
|
+
setValue: (value: {
|
|
102
|
+
month: string;
|
|
103
|
+
year: string;
|
|
104
|
+
}) => void;
|
|
105
|
+
}
|
|
106
|
+
export declare const MonthYearField: React.ForwardRefExoticComponent<MonthYearFieldProps & React.RefAttributes<MonthYearFieldRef>>;
|
|
107
|
+
export default MonthYearField;
|