@alto-avios/alto-ui 3.1.0 → 3.2.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/dist/assets/Accordion.css +1 -0
- package/dist/assets/AviosBadge.css +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/CalloutBanner.css +1 -0
- package/dist/assets/CreditCardNumberField.css +1 -1
- package/dist/assets/CreditCardSecurityCodeField.css +1 -0
- package/dist/assets/ErrorSummary.css +1 -0
- package/dist/assets/FieldHeader.css +1 -1
- package/dist/assets/FieldLabel.css +1 -1
- package/dist/assets/Image.css +1 -1
- package/dist/assets/Menu.css +1 -0
- package/dist/assets/PhoneNumberField.css +1 -1
- package/dist/assets/Section.css +1 -1
- package/dist/assets/SelectCard.css +1 -0
- package/dist/assets/Tag.css +1 -1
- package/dist/assets/flex.css +1 -1
- package/dist/assets/position.css +1 -0
- package/dist/components/Accordion/Accordion.d.ts +35 -0
- package/dist/components/Accordion/Accordion.js +140 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +5 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/AviosBadge/AviosBadge.d.ts +34 -0
- package/dist/components/AviosBadge/AviosBadge.js +58 -0
- package/dist/components/AviosBadge/AviosBadge.js.map +1 -0
- package/dist/components/AviosBadge/index.d.ts +1 -0
- package/dist/components/AviosBadge/index.js +5 -0
- package/dist/components/AviosBadge/index.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +7 -2
- package/dist/components/Badge/Badge.js +2 -1
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Box/Box.d.ts +4 -4
- package/dist/components/Box/Box.js +6 -3
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Button/Button.js +31 -31
- package/dist/components/CalloutBanner/CalloutBanner.d.ts +21 -0
- package/dist/components/CalloutBanner/CalloutBanner.js +96 -0
- package/dist/components/CalloutBanner/CalloutBanner.js.map +1 -0
- package/dist/components/CalloutBanner/index.d.ts +1 -0
- package/dist/components/CalloutBanner/index.js +5 -0
- package/dist/components/CalloutBanner/index.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/CreditCardNumberField/CreditCardNumberField.d.ts +2 -2
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js +7 -6
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js.map +1 -1
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.d.ts +35 -0
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +65 -0
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js.map +1 -0
- package/dist/components/CreditCardSecurityCodeField/index.d.ts +1 -0
- package/dist/components/CreditCardSecurityCodeField/index.js +5 -0
- package/dist/components/CreditCardSecurityCodeField/index.js.map +1 -0
- package/dist/components/DateField/DateField.d.ts +22 -3
- package/dist/components/DateField/DateField.js +856 -2
- package/dist/components/DateField/DateField.js.map +1 -1
- package/dist/components/ErrorSummary/ErrorSummary.d.ts +7 -0
- package/dist/components/ErrorSummary/ErrorSummary.js +44 -0
- package/dist/components/ErrorSummary/ErrorSummary.js.map +1 -0
- package/dist/components/ErrorSummary/index.d.ts +1 -0
- package/dist/components/ErrorSummary/index.js +5 -0
- package/dist/components/ErrorSummary/index.js.map +1 -0
- package/dist/components/FieldHeader/FieldHeader.js +6 -6
- package/dist/components/FieldLabel/FieldLabel.js +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +1 -1
- package/dist/components/Image/Image.js +6 -6
- package/dist/components/Menu/Menu.d.ts +75 -0
- package/dist/components/Menu/Menu.js +356 -0
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Menu/index.js +5 -0
- package/dist/components/Menu/index.js.map +1 -0
- package/dist/components/Paragraph/Paragraph.d.ts +1 -1
- package/dist/components/PhoneNumberField/PhoneNumberField.d.ts +1 -1
- package/dist/components/PhoneNumberField/PhoneNumberField.js +13 -8
- package/dist/components/PhoneNumberField/PhoneNumberField.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +36 -4
- package/dist/components/Popover/Popover.js +21 -24
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Section/Section.d.ts +6 -2
- package/dist/components/Section/Section.js +42 -14
- package/dist/components/Section/Section.js.map +1 -1
- package/dist/components/SelectCard/SelectCard.d.ts +51 -0
- package/dist/components/SelectCard/SelectCard.js +85 -0
- package/dist/components/SelectCard/SelectCard.js.map +1 -0
- package/dist/components/SelectCard/index.d.ts +1 -0
- package/dist/components/SelectCard/index.js +5 -0
- package/dist/components/SelectCard/index.js.map +1 -0
- package/dist/components/SelectNative/SelectNative.d.ts +6 -1
- package/dist/components/SelectNative/SelectNative.js +7 -1
- package/dist/components/SelectNative/SelectNative.js.map +1 -1
- package/dist/components/SubHeading/SubHeading.d.ts +1 -1
- package/dist/components/Tag/Tag.js +4 -4
- package/dist/components/TagGroup/TagGroup.d.ts +21 -1
- package/dist/components/TagGroup/TagGroup.js +6 -2
- package/dist/components/TagGroup/TagGroup.js.map +1 -1
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +18 -4
- package/dist/components/index.js.map +1 -1
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/border/border.d.ts +2 -2
- package/dist/utils/flex/flex.d.ts +10 -5
- package/dist/utils/flex/flex.js +383 -51
- package/dist/utils/flex/flex.js.map +1 -1
- package/dist/utils/flex/flex.test.d.ts +1 -0
- package/dist/utils/focus/focusStyles.d.ts +1 -1
- package/dist/utils/foregroundColour/foregroundColor.d.ts +1 -1
- package/dist/utils/position/position.d.ts +8 -0
- package/dist/utils/position/position.js +57 -0
- package/dist/utils/position/position.js.map +1 -0
- package/dist/utils/position/position.test.d.ts +1 -0
- package/dist/utils/stories/iconPropsArgTypes.js +49 -49
- package/package.json +1 -1
|
@@ -3,22 +3,23 @@ import { backgroundColorVariants } from "../../utils/backgroundColor/backgroundC
|
|
|
3
3
|
import { flexVariants } from "../../utils/flex/flex.js";
|
|
4
4
|
import { borderVariants } from "../../utils/border/border.js";
|
|
5
5
|
import { paddingVariants } from "../../utils/padding/padding.js";
|
|
6
|
+
import { positionVariants } from "../../utils/position/position.js";
|
|
6
7
|
const Box = ({
|
|
7
8
|
children,
|
|
8
9
|
as: Component = "div",
|
|
9
|
-
backgroundColour,
|
|
10
10
|
width,
|
|
11
11
|
maxWidth,
|
|
12
12
|
minWidth,
|
|
13
13
|
height,
|
|
14
14
|
maxHeight,
|
|
15
15
|
minHeight,
|
|
16
|
+
position,
|
|
16
17
|
...props
|
|
17
18
|
}) => {
|
|
18
|
-
if (backgroundColour && !props.backgroundColor) {
|
|
19
|
+
if ((props == null ? void 0 : props.backgroundColour) && !(props == null ? void 0 : props.backgroundColor)) {
|
|
19
20
|
console.warn("Warning: `backgroundColour` is deprecated and will be removed in a future release. Please use `backgroundColor` instead.");
|
|
20
21
|
}
|
|
21
|
-
const resolvedBackgroundColor = props.backgroundColor ?? backgroundColour;
|
|
22
|
+
const resolvedBackgroundColor = props.backgroundColor ?? props.backgroundColour;
|
|
22
23
|
const borderWidth = !(props == null ? void 0 : props.borderWidth) && props.borderColour !== "none" ? "sm" : props.borderWidth;
|
|
23
24
|
const stylesProp = {
|
|
24
25
|
width: width === "full" ? "100%" : width,
|
|
@@ -38,6 +39,8 @@ const Box = ({
|
|
|
38
39
|
})} ${backgroundColorVariants({
|
|
39
40
|
backgroundColor: resolvedBackgroundColor,
|
|
40
41
|
...props
|
|
42
|
+
})} ${positionVariants({
|
|
43
|
+
position
|
|
41
44
|
})}`, style: stylesProp, children });
|
|
42
45
|
};
|
|
43
46
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Box.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,35 +8,35 @@ import { useFocusRing } from "@react-aria/focus";
|
|
|
8
8
|
import { Icon } from "../Icon/Icon.js";
|
|
9
9
|
import LoadingSpinner from "../LoadingSpinner/LoadingSpinner.js";
|
|
10
10
|
import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
|
|
11
|
-
import '../../assets/Button.css';const button$1 = "
|
|
12
|
-
const content = "
|
|
13
|
-
const isNotLoading = "
|
|
14
|
-
const loadingSpinner = "
|
|
15
|
-
const isLoading = "
|
|
16
|
-
const focusWhite = "
|
|
17
|
-
const sm = "
|
|
18
|
-
const md = "
|
|
19
|
-
const lg = "
|
|
20
|
-
const fullWidth = "
|
|
21
|
-
const textAlignLeft = "
|
|
22
|
-
const textAlignCenter = "
|
|
23
|
-
const textAlignRight = "
|
|
24
|
-
const accentPrimary = "
|
|
25
|
-
const accentSecondary = "
|
|
26
|
-
const accentTertiary = "
|
|
27
|
-
const accentQuaternary = "
|
|
28
|
-
const criticalPrimary = "
|
|
29
|
-
const criticalSecondary = "
|
|
30
|
-
const criticalTertiary = "
|
|
31
|
-
const criticalQuaternary = "
|
|
32
|
-
const neutralPrimary = "
|
|
33
|
-
const neutralSecondary = "
|
|
34
|
-
const neutralTertiary = "
|
|
35
|
-
const neutralQuaternary = "
|
|
36
|
-
const whitePrimary = "
|
|
37
|
-
const whiteSecondary = "
|
|
38
|
-
const whiteTertiary = "
|
|
39
|
-
const whiteQuaternary = "
|
|
11
|
+
import '../../assets/Button.css';const button$1 = "_button_etsb3_1";
|
|
12
|
+
const content = "_content_etsb3_19";
|
|
13
|
+
const isNotLoading = "_isNotLoading_etsb3_28";
|
|
14
|
+
const loadingSpinner = "_loadingSpinner_etsb3_28";
|
|
15
|
+
const isLoading = "_isLoading_etsb3_37";
|
|
16
|
+
const focusWhite = "_focusWhite_etsb3_49";
|
|
17
|
+
const sm = "_sm_etsb3_56";
|
|
18
|
+
const md = "_md_etsb3_64";
|
|
19
|
+
const lg = "_lg_etsb3_72";
|
|
20
|
+
const fullWidth = "_fullWidth_etsb3_80";
|
|
21
|
+
const textAlignLeft = "_textAlignLeft_etsb3_87";
|
|
22
|
+
const textAlignCenter = "_textAlignCenter_etsb3_91";
|
|
23
|
+
const textAlignRight = "_textAlignRight_etsb3_95";
|
|
24
|
+
const accentPrimary = "_accentPrimary_etsb3_103";
|
|
25
|
+
const accentSecondary = "_accentSecondary_etsb3_123";
|
|
26
|
+
const accentTertiary = "_accentTertiary_etsb3_153";
|
|
27
|
+
const accentQuaternary = "_accentQuaternary_etsb3_179";
|
|
28
|
+
const criticalPrimary = "_criticalPrimary_etsb3_205";
|
|
29
|
+
const criticalSecondary = "_criticalSecondary_etsb3_230";
|
|
30
|
+
const criticalTertiary = "_criticalTertiary_etsb3_260";
|
|
31
|
+
const criticalQuaternary = "_criticalQuaternary_etsb3_286";
|
|
32
|
+
const neutralPrimary = "_neutralPrimary_etsb3_313";
|
|
33
|
+
const neutralSecondary = "_neutralSecondary_etsb3_338";
|
|
34
|
+
const neutralTertiary = "_neutralTertiary_etsb3_367";
|
|
35
|
+
const neutralQuaternary = "_neutralQuaternary_etsb3_393";
|
|
36
|
+
const whitePrimary = "_whitePrimary_etsb3_420";
|
|
37
|
+
const whiteSecondary = "_whiteSecondary_etsb3_446";
|
|
38
|
+
const whiteTertiary = "_whiteTertiary_etsb3_479";
|
|
39
|
+
const whiteQuaternary = "_whiteQuaternary_etsb3_509";
|
|
40
40
|
const styles = {
|
|
41
41
|
button: button$1,
|
|
42
42
|
content,
|
|
@@ -67,8 +67,8 @@ const styles = {
|
|
|
67
67
|
whiteSecondary,
|
|
68
68
|
whiteTertiary,
|
|
69
69
|
whiteQuaternary,
|
|
70
|
-
"fa-spinner-third": "_fa-spinner-
|
|
71
|
-
"icon-wrapper": "_icon-
|
|
70
|
+
"fa-spinner-third": "_fa-spinner-third_etsb3_541",
|
|
71
|
+
"icon-wrapper": "_icon-wrapper_etsb3_546"
|
|
72
72
|
};
|
|
73
73
|
const button = cva(styles.button, {
|
|
74
74
|
variants: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const calloutBanner: (props?: ({
|
|
4
|
+
emphasis?: "secondary" | "primary" | "tertiary" | null | undefined;
|
|
5
|
+
styleVariant?: "neutral" | "critical" | "success" | "information" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export type CalloutBannerVariants = VariantProps<typeof calloutBanner>;
|
|
8
|
+
export interface CalloutBannerProps extends CalloutBannerVariants {
|
|
9
|
+
/** The main heading text of the banner */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Optional secondary text providing more details */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Optional button group to be rendered as a label */
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
/** Optional content to be rendered in the end section of the banner */
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/** Optional callback function triggered when the dismiss button is clicked */
|
|
18
|
+
onDismiss?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const CalloutBanner: ({ title, description, label, children, styleVariant, emphasis, onDismiss, }: CalloutBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default CalloutBanner;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Icon } from "../Icon/Icon.js";
|
|
4
|
+
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
5
|
+
import { IconButton } from "../IconButton/IconButton.js";
|
|
6
|
+
import '../../assets/CalloutBanner.css';const calloutBanner$1 = "_calloutBanner_kvv8j_1";
|
|
7
|
+
const calloutBanner__icon = "_calloutBanner__icon_kvv8j_11";
|
|
8
|
+
const calloutBanner__start = "_calloutBanner__start_kvv8j_15";
|
|
9
|
+
const calloutBanner__dismiss = "_calloutBanner__dismiss_kvv8j_23";
|
|
10
|
+
const calloutBanner__meta = "_calloutBanner__meta_kvv8j_29";
|
|
11
|
+
const calloutBanner__end = "_calloutBanner__end_kvv8j_58";
|
|
12
|
+
const styles = {
|
|
13
|
+
calloutBanner: calloutBanner$1,
|
|
14
|
+
calloutBanner__icon,
|
|
15
|
+
calloutBanner__start,
|
|
16
|
+
calloutBanner__dismiss,
|
|
17
|
+
calloutBanner__meta,
|
|
18
|
+
"calloutBanner__meta-title": "_calloutBanner__meta-title_kvv8j_41",
|
|
19
|
+
"calloutBanner__meta-description": "_calloutBanner__meta-description_kvv8j_45",
|
|
20
|
+
"calloutBanner__meta-label": "_calloutBanner__meta-label_kvv8j_49",
|
|
21
|
+
calloutBanner__end,
|
|
22
|
+
"calloutBanner-critical": "_calloutBanner-critical_kvv8j_66",
|
|
23
|
+
"calloutBanner-primary": "_calloutBanner-primary_kvv8j_70",
|
|
24
|
+
"calloutBanner-secondary": "_calloutBanner-secondary_kvv8j_74",
|
|
25
|
+
"calloutBanner-tertiary": "_calloutBanner-tertiary_kvv8j_83",
|
|
26
|
+
"calloutBanner-success": "_calloutBanner-success_kvv8j_92",
|
|
27
|
+
"calloutBanner-information": "_calloutBanner-information_kvv8j_118",
|
|
28
|
+
"calloutBanner-neutral": "_calloutBanner-neutral_kvv8j_144"
|
|
29
|
+
};
|
|
30
|
+
const calloutBanner = cva(styles.calloutBanner, {
|
|
31
|
+
variants: {
|
|
32
|
+
emphasis: {
|
|
33
|
+
primary: styles["calloutBanner-primary"],
|
|
34
|
+
secondary: styles["calloutBanner-secondary"],
|
|
35
|
+
tertiary: styles["calloutBanner-tertiary"]
|
|
36
|
+
},
|
|
37
|
+
styleVariant: {
|
|
38
|
+
critical: styles["calloutBanner-critical"],
|
|
39
|
+
success: styles["calloutBanner-success"],
|
|
40
|
+
information: styles["calloutBanner-information"],
|
|
41
|
+
neutral: styles["calloutBanner-neutral"]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
emphasis: "primary",
|
|
46
|
+
styleVariant: "critical"
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const CalloutBanner = ({
|
|
50
|
+
title,
|
|
51
|
+
description,
|
|
52
|
+
label,
|
|
53
|
+
children,
|
|
54
|
+
styleVariant = "critical",
|
|
55
|
+
emphasis = "primary",
|
|
56
|
+
onDismiss
|
|
57
|
+
}) => {
|
|
58
|
+
const iconName = React.useMemo(() => {
|
|
59
|
+
switch (styleVariant) {
|
|
60
|
+
case "critical":
|
|
61
|
+
return "circle-exclamation";
|
|
62
|
+
case "success":
|
|
63
|
+
return "check-circle";
|
|
64
|
+
case "information":
|
|
65
|
+
return "info-circle";
|
|
66
|
+
case "neutral":
|
|
67
|
+
return "check-circle";
|
|
68
|
+
default:
|
|
69
|
+
return "circle-exclamation";
|
|
70
|
+
}
|
|
71
|
+
}, [emphasis]);
|
|
72
|
+
return /* @__PURE__ */ jsxs("div", { className: calloutBanner({
|
|
73
|
+
emphasis,
|
|
74
|
+
styleVariant
|
|
75
|
+
}), children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { className: styles["calloutBanner__start"], children: [
|
|
77
|
+
/* @__PURE__ */ jsx(Icon, { iconName, iconPrefix: "fas", className: styles["calloutBanner__icon"], iconSize: "1.25x", padding: "roomy" }),
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { className: styles["calloutBanner__meta"], children: [
|
|
79
|
+
typeof onDismiss === "function" && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__dismiss"], children: /* @__PURE__ */ jsx(IconButton, { onClick: onDismiss, styleVariant: emphasis === "primary" ? "white" : "neutral", emphasis: "quaternary", size: "sm", iconProps: {
|
|
80
|
+
iconName: "close",
|
|
81
|
+
iconPrefix: "far",
|
|
82
|
+
iconSize: "1x"
|
|
83
|
+
}, tooltipLabel: "Dismiss banner", "aria-label": "Dismiss banner" }) }),
|
|
84
|
+
/* @__PURE__ */ jsx("div", { className: styles["calloutBanner__meta-title"], children: title }),
|
|
85
|
+
description && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__meta-description"], children: description }),
|
|
86
|
+
label && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__meta-label"], children: label })
|
|
87
|
+
] })
|
|
88
|
+
] }),
|
|
89
|
+
children && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__end"], children })
|
|
90
|
+
] });
|
|
91
|
+
};
|
|
92
|
+
export {
|
|
93
|
+
CalloutBanner,
|
|
94
|
+
CalloutBanner as default
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=CalloutBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutBanner.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CalloutBanner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -22,8 +22,8 @@ interface CreditCardNumberFieldBaseProps {
|
|
|
22
22
|
*/
|
|
23
23
|
defaultValue?: CreditCardNumberValue;
|
|
24
24
|
}
|
|
25
|
-
export interface CreditCardNumberFieldProps extends FieldProps<Omit<AriaTextFieldProps, 'defaultValue' | 'value' | 'onChange'>>, CreditCardNumberFieldBaseProps {
|
|
25
|
+
export interface CreditCardNumberFieldProps extends Omit<FieldProps<Omit<AriaTextFieldProps, 'defaultValue' | 'value' | 'onChange'>>, 'isRequired'>, CreditCardNumberFieldBaseProps {
|
|
26
26
|
placeholder?: string;
|
|
27
27
|
}
|
|
28
|
-
export declare const CreditCardNumberField: ({ cardIcon: cardIconProp, defaultValue, value: valueControlled, onChange: onChangeControlled, ...props }: CreditCardNumberFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const CreditCardNumberField: ({ cardIcon: cardIconProp, defaultValue, value: valueControlled, onChange: onChangeControlled, label, ...props }: CreditCardNumberFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export default CreditCardNumberField;
|
|
@@ -5,9 +5,9 @@ import { P as PatternFormat } from "../../react-number-format.es-DMLgWFZX.js";
|
|
|
5
5
|
import { Field } from "../_base/Field/Field.js";
|
|
6
6
|
import { Icon } from "../Icon/Icon.js";
|
|
7
7
|
import { getCardIcon } from "../../utils/creditCard/creditCard.js";
|
|
8
|
-
import '../../assets/CreditCardNumberField.css';const creditCardNumberField = "
|
|
9
|
-
const inputWrapper = "
|
|
10
|
-
const iconEnd = "
|
|
8
|
+
import '../../assets/CreditCardNumberField.css';const creditCardNumberField = "_creditCardNumberField_1wvso_1";
|
|
9
|
+
const inputWrapper = "_inputWrapper_1wvso_45";
|
|
10
|
+
const iconEnd = "_iconEnd_1wvso_51";
|
|
11
11
|
const styles = {
|
|
12
12
|
creditCardNumberField,
|
|
13
13
|
inputWrapper,
|
|
@@ -18,6 +18,7 @@ const CreditCardNumberField = ({
|
|
|
18
18
|
defaultValue,
|
|
19
19
|
value: valueControlled,
|
|
20
20
|
onChange: onChangeControlled,
|
|
21
|
+
label = "Credit card number",
|
|
21
22
|
...props
|
|
22
23
|
}) => {
|
|
23
24
|
const [value, setValue] = React.useState(defaultValue);
|
|
@@ -28,14 +29,14 @@ const CreditCardNumberField = ({
|
|
|
28
29
|
}
|
|
29
30
|
return cardIconProp || "credit-card";
|
|
30
31
|
}, [value, cardIconProp]);
|
|
31
|
-
return /* @__PURE__ */ jsx(Field, { className: styles.creditCardNumberField, as: TextField, ...props, children: /* @__PURE__ */ jsxs("div", { className: styles.inputWrapper, children: [
|
|
32
|
-
/* @__PURE__ */ jsx(PatternFormat, { type: "text", format: "#### #### #### ####", customInput: Input,
|
|
32
|
+
return /* @__PURE__ */ jsx(Field, { className: styles.creditCardNumberField, as: TextField, label, isRequired: true, ...props, children: /* @__PURE__ */ jsxs("div", { className: styles.inputWrapper, children: [
|
|
33
|
+
/* @__PURE__ */ jsx(PatternFormat, { type: "text", format: "#### #### #### ####", customInput: Input, placeholder: props == null ? void 0 : props.placeholder, defaultValue, value: valueDefinitive, onValueChange: (values) => {
|
|
33
34
|
if (typeof onChangeControlled === "function") {
|
|
34
35
|
onChangeControlled(values.value);
|
|
35
36
|
}
|
|
36
37
|
setValue(values.value);
|
|
37
38
|
} }),
|
|
38
|
-
/* @__PURE__ */ jsx(Icon, { iconName: cardIcon,
|
|
39
|
+
/* @__PURE__ */ jsx(Icon, { iconName: cardIcon, iconPrefix: cardIcon === "credit-card" ? "fas" : "fab", className: styles.iconEnd, iconSize: "1.25x", padding: "roomy" })
|
|
39
40
|
] }) });
|
|
40
41
|
};
|
|
41
42
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCardNumberField.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreditCardNumberField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
|
|
3
|
+
import { FieldProps } from '../_base/Field';
|
|
4
|
+
type CreditCardSecurityCodeValue = string | number | null | undefined;
|
|
5
|
+
interface CreditCardSecurityCodeFieldBaseProps {
|
|
6
|
+
/**
|
|
7
|
+
* The controlled value of the credit card number.
|
|
8
|
+
*/
|
|
9
|
+
value?: CreditCardSecurityCodeValue;
|
|
10
|
+
/**
|
|
11
|
+
* The controlled onChange handler for the credit card number.
|
|
12
|
+
*/
|
|
13
|
+
onChange?: (value?: CreditCardSecurityCodeValue) => void;
|
|
14
|
+
/**
|
|
15
|
+
* The default value of the credit card number.
|
|
16
|
+
*/
|
|
17
|
+
defaultValue?: CreditCardSecurityCodeValue;
|
|
18
|
+
/**
|
|
19
|
+
* The CSV pictogram icon to display.
|
|
20
|
+
* Expects 'back' or 'front' depending on card type.
|
|
21
|
+
*/
|
|
22
|
+
cardIcon?: 'front' | 'back';
|
|
23
|
+
}
|
|
24
|
+
export interface CreditCardSecurityCodeFieldProps extends Omit<FieldProps<Omit<AriaTextFieldProps, 'defaultValue' | 'value' | 'onChange'>>, 'isRequired'>, CreditCardSecurityCodeFieldBaseProps {
|
|
25
|
+
/**
|
|
26
|
+
* The placeholder text to display when the input is empty.
|
|
27
|
+
*/
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Expects a DetailsDisclosure component for further information.
|
|
31
|
+
*/
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export declare const CreditCardSecurityCodeField: ({ defaultValue, value: valueControlled, onChange: onChangeControlled, label, cardIcon, ...props }: CreditCardSecurityCodeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export default CreditCardSecurityCodeField;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { TextField, Input } from "react-aria-components";
|
|
4
|
+
import { P as PatternFormat } from "../../react-number-format.es-DMLgWFZX.js";
|
|
5
|
+
import { Field } from "../_base/Field/Field.js";
|
|
6
|
+
import '../../assets/CreditCardSecurityCodeField.css';const creditCardSecurityCodeField = "_creditCardSecurityCodeField_14mb2_1";
|
|
7
|
+
const inputWrapper = "_inputWrapper_14mb2_11";
|
|
8
|
+
const inputChildren = "_inputChildren_14mb2_54";
|
|
9
|
+
const styles = {
|
|
10
|
+
creditCardSecurityCodeField,
|
|
11
|
+
inputWrapper,
|
|
12
|
+
inputChildren
|
|
13
|
+
};
|
|
14
|
+
const CreditCardSecurityCodeField = ({
|
|
15
|
+
defaultValue,
|
|
16
|
+
value: valueControlled,
|
|
17
|
+
onChange: onChangeControlled,
|
|
18
|
+
label = "Card security code",
|
|
19
|
+
cardIcon = "back",
|
|
20
|
+
...props
|
|
21
|
+
}) => {
|
|
22
|
+
const [value, setValue] = React.useState(defaultValue);
|
|
23
|
+
const valueDefinitive = valueControlled ?? value;
|
|
24
|
+
return /* @__PURE__ */ jsxs(Field, { className: styles.creditCardSecurityCodeField, as: TextField, label, isRequired: true, ...props, children: [
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: styles.inputWrapper, children: [
|
|
26
|
+
/* @__PURE__ */ jsx(PatternFormat, { type: "text", format: "###", customInput: Input, placeholder: props == null ? void 0 : props.placeholder, defaultValue, value: valueDefinitive, onValueChange: (values) => {
|
|
27
|
+
if (typeof onChangeControlled === "function") {
|
|
28
|
+
onChangeControlled(values.value);
|
|
29
|
+
}
|
|
30
|
+
setValue(values.value);
|
|
31
|
+
} }),
|
|
32
|
+
/* @__PURE__ */ jsx(CreditCardSecurityCodeIcon, { cardIcon })
|
|
33
|
+
] }),
|
|
34
|
+
(props == null ? void 0 : props.children) && /* @__PURE__ */ jsx("div", { className: styles.inputChildren, children: props.children })
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
function CreditCardSecurityCodeIcon({
|
|
38
|
+
cardIcon = "back"
|
|
39
|
+
}) {
|
|
40
|
+
return cardIcon === "back" ? /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", fill: "none", viewBox: "0 0 48 48", children: [
|
|
41
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", d: "M30.528 29.287v-.514l1.202-1.113a5 5 0 0 0 .258-.267q.105-.12.16-.233a.6.6 0 0 0 .054-.249.44.44 0 0 0-.252-.422.6.6 0 0 0-.266-.06.56.56 0 0 0-.27.063.43.43 0 0 0-.178.18.6.6 0 0 0-.063.279h-.678q0-.331.15-.576t.42-.377a1.4 1.4 0 0 1 .624-.134q.363 0 .632.129.27.126.42.353.15.225.15.517a1 1 0 0 1-.076.378q-.075.186-.265.414a6 6 0 0 1-.54.542l-.492.483v.023h1.418v.584zm-.802-3.377v3.377h-.714v-2.7h-.02l-.773.486v-.634l.836-.529zm4.317 3.296q.29.127.658.127.38 0 .673-.128a1.1 1.1 0 0 0 .46-.353.82.82 0 0 0 .166-.513.73.73 0 0 0-.194-.524q-.195-.211-.567-.26v-.026a.8.8 0 0 0 .46-.24.66.66 0 0 0 .176-.474.82.82 0 0 0-.145-.481 1 1 0 0 0-.407-.343 1.4 1.4 0 0 0-.612-.127q-.346 0-.621.127-.274.126-.436.348a.9.9 0 0 0-.166.514h.684a.4.4 0 0 1 .077-.224.47.47 0 0 1 .193-.147.65.65 0 0 1 .516.002.4.4 0 0 1 .23.374q0 .134-.07.235a.46.46 0 0 1-.194.154.7.7 0 0 1-.285.056h-.315v.525h.315q.19 0 .33.06a.5.5 0 0 1 .214.164.4.4 0 0 1 .075.24.4.4 0 0 1-.07.235.5.5 0 0 1-.197.16.7.7 0 0 1-.288.058.7.7 0 0 1-.282-.052.5.5 0 0 1-.201-.143.38.38 0 0 1-.081-.218h-.719q.005.295.17.521.166.225.453.353" }),
|
|
42
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", fillRule: "evenodd", d: "M7.2 24v7.2h31.2V24zm30 1.2H8.4V30h28.8z", clipRule: "evenodd" }),
|
|
43
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", fillRule: "evenodd", d: "M4.8 14.4a4.8 4.8 0 0 1 4.8-4.8h28.8a4.8 4.8 0 0 1 4.8 4.8v19.2a4.8 4.8 0 0 1-4.8 4.8H9.6a4.8 4.8 0 0 1-4.8-4.8zm4.8-3.6h28.8a3.6 3.6 0 0 1 3.6 3.6H6a3.6 3.6 0 0 1 3.6-3.6M42 19.2v14.4a3.6 3.6 0 0 1-3.6 3.6H9.6A3.6 3.6 0 0 1 6 33.6V19.2z", clipRule: "evenodd" }),
|
|
44
|
+
/* @__PURE__ */ jsx("path", { fill: "#FEFEFE", fillRule: "evenodd", d: "M42 33.6V19.2H6v14.4a3.6 3.6 0 0 0 3.6 3.6h28.8a3.6 3.6 0 0 0 3.6-3.6M38.4 24H7.2v7.2h31.2z", clipRule: "evenodd" }),
|
|
45
|
+
/* @__PURE__ */ jsx("path", { fill: "#FEFEFE", d: "M38.4 10.8H9.6A3.6 3.6 0 0 0 6 14.4h36a3.6 3.6 0 0 0-3.6-3.6" }),
|
|
46
|
+
/* @__PURE__ */ jsx("path", { fill: "#FEFEFE", fillRule: "evenodd", d: "M8.4 25.2h28.8V30H8.4zm22.128 4.087v-.514l1.202-1.113a5 5 0 0 0 .258-.267q.105-.12.16-.233a.6.6 0 0 0 .054-.249.44.44 0 0 0-.252-.422.6.6 0 0 0-.266-.06.56.56 0 0 0-.27.063.43.43 0 0 0-.178.18.6.6 0 0 0-.063.279h-.678q0-.331.15-.576t.42-.377a1.4 1.4 0 0 1 .624-.134q.363 0 .632.129.27.126.42.353.15.225.15.517a1 1 0 0 1-.076.378q-.075.186-.265.414a6 6 0 0 1-.54.542l-.492.483v.023h1.418v.584zm-.802-3.377v3.377h-.714v-2.7h-.02l-.773.486v-.634l.836-.529zm4.317 3.296q.29.127.658.127.38 0 .673-.128a1.1 1.1 0 0 0 .46-.353.82.82 0 0 0 .166-.513.73.73 0 0 0-.194-.524q-.195-.211-.567-.26v-.026a.8.8 0 0 0 .46-.24.66.66 0 0 0 .176-.474.82.82 0 0 0-.145-.481 1 1 0 0 0-.407-.343 1.4 1.4 0 0 0-.612-.127q-.346 0-.621.127-.274.126-.436.348a.9.9 0 0 0-.166.514h.684a.4.4 0 0 1 .077-.224.47.47 0 0 1 .193-.147.65.65 0 0 1 .516.002.4.4 0 0 1 .23.374q0 .134-.07.235a.46.46 0 0 1-.194.154.7.7 0 0 1-.285.056h-.315v.525h.315q.19 0 .33.06a.5.5 0 0 1 .214.164.4.4 0 0 1 .075.24.4.4 0 0 1-.07.235.5.5 0 0 1-.197.16.7.7 0 0 1-.288.058.7.7 0 0 1-.282-.052.5.5 0 0 1-.201-.143.38.38 0 0 1-.081-.218h-.719q.005.295.17.521.166.225.453.353", clipRule: "evenodd" }),
|
|
47
|
+
/* @__PURE__ */ jsx("path", { fill: "#D32B1E", fillRule: "evenodd", d: "M37.641 30.866c1.298-.927 1.96-2.098 1.96-3.266s-.662-2.34-1.96-3.266c-1.295-.925-3.147-1.534-5.247-1.534s-3.952.61-5.248 1.534c-1.298.926-1.96 2.097-1.96 3.266 0 1.168.662 2.34 1.96 3.265 1.296.925 3.147 1.535 5.248 1.535 2.1 0 3.952-.61 5.247-1.534M32.394 33.6c4.643 0 8.407-2.687 8.407-6s-3.764-6-8.407-6-8.407 2.686-8.407 6 3.763 6 8.407 6", clipRule: "evenodd" })
|
|
48
|
+
] }) : /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "48", height: "48", fill: "none", viewBox: "0 0 48 48", children: [
|
|
49
|
+
/* @__PURE__ */ jsx("path", { fill: "#D32B1E", fillRule: "evenodd", d: "M37.336 31.19c1.627-1.044 2.418-2.343 2.418-3.592s-.791-2.548-2.418-3.593c-1.615-1.036-3.917-1.716-6.522-1.716s-4.908.68-6.522 1.716c-1.627 1.045-2.418 2.343-2.418 3.593s.79 2.548 2.418 3.592c1.614 1.036 3.916 1.716 6.522 1.716 2.605 0 4.907-.68 6.522-1.716m-6.522 2.916c5.6 0 10.14-2.914 10.14-6.508 0-3.595-4.54-6.509-10.14-6.509s-10.14 2.914-10.14 6.509c0 3.594 4.54 6.508 10.14 6.508", clipRule: "evenodd" }),
|
|
50
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", d: "M27.296 29.47v-.57l1.332-1.233q.17-.165.286-.296.117-.132.177-.258a.64.64 0 0 0 .06-.276.49.49 0 0 0-.28-.468.64.64 0 0 0-.294-.066.6.6 0 0 0-.3.07.5.5 0 0 0-.197.2.65.65 0 0 0-.07.308h-.75q0-.368.166-.638a1.1 1.1 0 0 1 .466-.418q.3-.149.69-.148.403 0 .7.142.3.14.467.391.166.25.166.574 0 .211-.084.419a1.8 1.8 0 0 1-.294.458 7 7 0 0 1-.598.602l-.546.535v.026h1.572v.647h-2.669Zm-.889-3.742v3.743h-.792v-2.992h-.022l-.857.537v-.702l.927-.586zm4.785 3.653q.32.14.73.14.42 0 .745-.142.326-.143.51-.39a.9.9 0 0 0 .184-.57.8.8 0 0 0-.215-.58q-.216-.234-.629-.287v-.03a.9.9 0 0 0 .51-.266.73.73 0 0 0 .196-.525.9.9 0 0 0-.161-.534 1.1 1.1 0 0 0-.452-.38 1.54 1.54 0 0 0-.678-.14q-.383 0-.689.14a1.2 1.2 0 0 0-.482.386.97.97 0 0 0-.185.57h.759a.43.43 0 0 1 .086-.248.5.5 0 0 1 .213-.163.73.73 0 0 1 .572.002.45.45 0 0 1 .255.415.45.45 0 0 1-.077.26.5.5 0 0 1-.216.17.8.8 0 0 1-.316.063h-.35v.581h.35q.212 0 .365.066a.54.54 0 0 1 .238.183.44.44 0 0 1 .084.265.45.45 0 0 1-.078.261.5.5 0 0 1-.218.177.8.8 0 0 1-.32.064.8.8 0 0 1-.312-.056.55.55 0 0 1-.223-.16.4.4 0 0 1-.09-.24h-.797q.006.327.189.577.184.249.502.391" }),
|
|
51
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", fillRule: "evenodd", d: "M33.874 28.813v-.623l1.562-2.462h.99v2.45h.465v.635h-.464v.658h-.757v-.658zm1.782-2.223h.029v1.588H34.67v-.029zM17.687 15.988q.227-.42.227-1.022 0-.6-.227-1.021a1.57 1.57 0 0 0-.617-.642 1.73 1.73 0 0 0-.875-.222q-.49 0-.878.222a1.57 1.57 0 0 0-.615.641q-.226.422-.226 1.022c0 .6.076.74.226 1.02q.226.42.615.644.39.222.878.222.486 0 .875-.22a1.6 1.6 0 0 0 .617-.644m-.676-1.678q.117.267.117.656 0 .39-.117.656a.9.9 0 0 1-.324.405.87.87 0 0 1-.492.138.87.87 0 0 1-.49-.138.9.9 0 0 1-.327-.405 1.7 1.7 0 0 1-.115-.656q0-.39.115-.656a.9.9 0 0 1 .326-.405.87.87 0 0 1 .491-.138q.282 0 .492.138a.9.9 0 0 1 .324.405", clipRule: "evenodd" }),
|
|
52
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", d: "M8.276 16.802V13.13h2.43v.64H9.053v.874h1.493v.64H9.052v1.517z" }),
|
|
53
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", fillRule: "evenodd", d: "M11.229 16.802V13.13h1.448q.416 0 .71.149.295.147.45.417t.156.633q0 .366-.158.629a1.02 1.02 0 0 1-.457.402l-.033.014.778 1.427h-.856L12.57 15.5h-.566v1.302zm1.303-1.925h-.527v-1.112h.523q.225 0 .371.067a.45.45 0 0 1 .22.19.6.6 0 0 1 .074.308q0 .18-.073.303a.44.44 0 0 1-.219.183 1 1 0 0 1-.37.06Z", clipRule: "evenodd" }),
|
|
54
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", d: "M21.56 16.802h-.67l-1.598-2.31h-.027v2.31h-.776V13.13h.681l1.585 2.308h.032V13.13h.773v3.67Zm.501-3.672v.64h1.124v3.032h.767V13.77h1.124v-.64z" }),
|
|
55
|
+
/* @__PURE__ */ jsx("path", { fill: "#4B4855", fillRule: "evenodd", d: "M9.6 9.6a4.8 4.8 0 0 0-4.8 4.8v19.2a4.8 4.8 0 0 0 4.8 4.8h28.8a4.8 4.8 0 0 0 4.8-4.8V14.4a4.8 4.8 0 0 0-4.8-4.8zm28.8 1.2H9.6A3.6 3.6 0 0 0 6 14.4v19.2a3.6 3.6 0 0 0 3.6 3.6h28.8a3.6 3.6 0 0 0 3.6-3.6V14.4a3.6 3.6 0 0 0-3.6-3.6", clipRule: "evenodd" }),
|
|
56
|
+
/* @__PURE__ */ jsx("path", { fill: "#FEFEFE", fillRule: "evenodd", d: "M9.6 10.8h28.8a3.6 3.6 0 0 1 3.6 3.6v19.2a3.6 3.6 0 0 1-3.6 3.6H9.6A3.6 3.6 0 0 1 6 33.6V14.4a3.6 3.6 0 0 1 3.6-3.6m17.696 18.67v-.57l1.332-1.233q.17-.165.286-.296.117-.132.177-.258a.64.64 0 0 0 .06-.276.49.49 0 0 0-.28-.468.64.64 0 0 0-.294-.066.6.6 0 0 0-.3.07.5.5 0 0 0-.197.2.65.65 0 0 0-.07.308h-.75q0-.368.166-.638a1.1 1.1 0 0 1 .466-.418q.3-.149.69-.148.403 0 .7.142.3.14.467.391.166.25.166.574 0 .211-.084.419a1.8 1.8 0 0 1-.294.458 7 7 0 0 1-.598.602l-.546.535v.026h1.572v.647h-2.669Zm-.89-3.742v3.743h-.79v-2.992h-.023l-.857.537v-.702l.927-.586h.744Zm4.786 3.653q.32.14.73.14.42 0 .745-.142.326-.143.51-.39a.9.9 0 0 0 .184-.57.8.8 0 0 0-.215-.58q-.216-.234-.629-.287v-.03a.9.9 0 0 0 .51-.266.73.73 0 0 0 .196-.525.9.9 0 0 0-.161-.534 1.1 1.1 0 0 0-.452-.38 1.54 1.54 0 0 0-.678-.14q-.383 0-.689.14a1.2 1.2 0 0 0-.482.386.97.97 0 0 0-.185.57h.759a.43.43 0 0 1 .086-.248.5.5 0 0 1 .213-.163.73.73 0 0 1 .572.002.45.45 0 0 1 .255.415.45.45 0 0 1-.077.26.5.5 0 0 1-.216.17.8.8 0 0 1-.316.063h-.35v.581h.35q.212 0 .365.066a.54.54 0 0 1 .238.183.44.44 0 0 1 .084.265.45.45 0 0 1-.078.261.5.5 0 0 1-.218.177.8.8 0 0 1-.32.064.8.8 0 0 1-.312-.056.55.55 0 0 1-.223-.16.4.4 0 0 1-.09-.24h-.797q.006.327.189.577.184.249.502.391m2.682-.568v-.623l1.562-2.462h.99v2.45h.465v.635h-.464v.658h-.757v-.658zM17.687 15.988q.227-.42.227-1.022 0-.6-.227-1.021a1.57 1.57 0 0 0-.617-.642 1.73 1.73 0 0 0-.875-.222q-.49 0-.878.222a1.57 1.57 0 0 0-.615.641q-.226.422-.226 1.022c0 .6.076.74.226 1.02q.226.42.615.644.39.222.878.222.486 0 .875-.22a1.6 1.6 0 0 0 .617-.644m-9.41.814V13.13h2.43v.64H9.052v.874h1.493v.64H9.052v1.517zm2.952 0V13.13h1.448q.416 0 .71.149.295.147.45.417t.156.633q0 .366-.158.629a1.02 1.02 0 0 1-.457.402l-.033.014.778 1.427h-.856L12.57 15.5h-.566v1.302zm10.33 0h-.67l-1.597-2.31h-.027v2.31h-.776V13.13h.681l1.585 2.308h.032V13.13h.773v3.67Zm.502-3.671v.64h1.124v3.03h.767v-3.03h1.124v-.64z", clipRule: "evenodd" }),
|
|
57
|
+
/* @__PURE__ */ jsx("path", { fill: "#FEFEFE", d: "M17.128 14.966q0-.39-.117-.656a.9.9 0 0 0-.324-.405.87.87 0 0 0-.492-.138.87.87 0 0 0-.49.138.9.9 0 0 0-.327.405 1.7 1.7 0 0 0-.115.656q0 .39.115.656a.9.9 0 0 0 .326.405q.21.138.491.138a.87.87 0 0 0 .492-.138.9.9 0 0 0 .324-.405 1.6 1.6 0 0 0 .117-.656m-5.123-.089h.527a1 1 0 0 0 .369-.061.44.44 0 0 0 .219-.183.6.6 0 0 0 .073-.303.6.6 0 0 0-.073-.308.45.45 0 0 0-.22-.19.9.9 0 0 0-.372-.067h-.523zm23.68 11.713h-.03l-.985 1.56v.029h1.015z" }),
|
|
58
|
+
/* @__PURE__ */ jsx("path", { fill: "#D32B1E", fillRule: "evenodd", d: "M36.062 30.866c1.297-.926 1.959-2.098 1.959-3.266s-.662-2.34-1.96-3.266c-1.295-.924-3.147-1.534-5.247-1.534s-3.952.61-5.248 1.534c-1.298.927-1.96 2.098-1.96 3.266s.662 2.34 1.96 3.266c1.296.925 3.147 1.534 5.248 1.534 2.1 0 3.952-.61 5.248-1.534M30.814 33.6c4.643 0 8.407-2.686 8.407-6s-3.764-6-8.407-6-8.407 2.686-8.407 6 3.764 6 8.407 6", clipRule: "evenodd" })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
CreditCardSecurityCodeField,
|
|
63
|
+
CreditCardSecurityCodeField as default
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=CreditCardSecurityCodeField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditCardSecurityCodeField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CreditCardSecurityCodeField';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
import { DateFieldProps as
|
|
1
|
+
import { DateFieldProps as AriaDateFieldBaseProps, DateValue } from 'react-aria-components';
|
|
2
2
|
import { FieldProps } from '../_base/Field/Field';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type AriaDateFieldProps = Omit<AriaDateFieldBaseProps<DateValue>, 'defaultValue' | 'value' | 'onChange' | 'minValue' | 'maxValue'>;
|
|
4
|
+
export type DateFieldProps = FieldProps<AriaDateFieldProps> & {
|
|
5
|
+
/**
|
|
6
|
+
* The default value of the date field.
|
|
7
|
+
*/
|
|
8
|
+
defaultValue?: string | DateValue;
|
|
9
|
+
/**
|
|
10
|
+
* The controlled value of the date field.
|
|
11
|
+
*/
|
|
12
|
+
value?: string | DateValue;
|
|
13
|
+
onChange?: (value: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* The minimum value of the date field.
|
|
16
|
+
*/
|
|
17
|
+
minValue?: string | DateValue;
|
|
18
|
+
/**
|
|
19
|
+
* The maximum value of the date field.
|
|
20
|
+
*/
|
|
21
|
+
maxValue?: string | DateValue;
|
|
22
|
+
};
|
|
23
|
+
export declare const DateField: ({ defaultValue: defaultPropValue, value: controlledValue, onChange: onChangeProp, minValue: minPropValue, maxValue: maxPropValue, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
24
|
export default DateField;
|