@alto-avios/alto-ui 3.4.0 → 3.5.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/README.md +8 -0
- package/dist/assets/Accordion.css +1 -1
- package/dist/assets/Badge.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/CalloutBanner.css +1 -1
- package/dist/assets/DateField.css +1 -1
- package/dist/assets/Eyebrow.css +1 -1
- package/dist/components/Accordion/Accordion.js +15 -15
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/AviosBadge/AviosBadge.d.ts +1 -1
- package/dist/components/AviosBadge/AviosBadge.js +2 -2
- package/dist/components/AviosBadge/index.d.ts +1 -0
- package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +1 -1
- package/dist/components/AviosCurrencySymbol/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +17 -2
- package/dist/components/Badge/Badge.js +29 -19
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Box/Box.d.ts +26 -1
- package/dist/components/Box/Box.js +11 -1
- package/dist/components/Box/Box.js.map +1 -1
- package/dist/components/Box/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +34 -33
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/ButtonGroup/index.d.ts +1 -0
- package/dist/components/CalloutBanner/CalloutBanner.d.ts +1 -1
- package/dist/components/CalloutBanner/CalloutBanner.js +24 -19
- package/dist/components/CalloutBanner/CalloutBanner.js.map +1 -1
- package/dist/components/CalloutBanner/index.d.ts +1 -0
- package/dist/components/CardSection/index.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/ClearFieldButton/ClearFieldButton.d.ts +0 -1
- package/dist/components/ClearFieldButton/index.d.ts +1 -0
- package/dist/components/ComboBox/ComboBox.d.ts +2 -2
- package/dist/components/CreditCardNumberField/CreditCardNumberField.d.ts +1 -1
- package/dist/components/CreditCardNumberField/CreditCardNumberField.js +1 -1
- package/dist/components/CreditCardNumberField/index.d.ts +1 -0
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.d.ts +7 -2
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +3 -2
- package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js.map +1 -1
- package/dist/components/CreditCardSecurityCodeField/index.d.ts +1 -0
- package/dist/components/DateField/DateField.js +3 -3
- package/dist/components/DateField/index.d.ts +1 -0
- package/dist/components/DestinationHeading/index.d.ts +1 -0
- package/dist/components/DetailsDisclosure/DetailsDisclosure.d.ts +1 -2
- package/dist/components/DetailsDisclosure/index.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +29 -11
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/ErrorSummary/index.d.ts +1 -0
- package/dist/components/Eyebrow/Eyebrow.d.ts +14 -0
- package/dist/components/Eyebrow/Eyebrow.js +5 -5
- package/dist/components/FieldDescription/index.d.ts +1 -0
- package/dist/components/FieldError/index.d.ts +1 -0
- package/dist/components/FieldLabel/index.d.ts +1 -0
- package/dist/components/FieldsetHeader/index.d.ts +1 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Grid/Grid.d.ts +1 -1
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Heading/Heading.d.ts +1 -0
- package/dist/components/Heading/Heading.js +1 -0
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/IconBackdrop/index.d.ts +1 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +18 -6
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/Label/index.d.ts +1 -0
- package/dist/components/Link/Link.js +17 -2
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/ListBoxItem/index.d.ts +1 -1
- package/dist/components/LoadingSpinner/index.d.ts +1 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/NumberField/index.d.ts +1 -0
- package/dist/components/Paragraph/Paragraph.d.ts +4 -1
- package/dist/components/Paragraph/Paragraph.js +8 -3
- package/dist/components/Paragraph/Paragraph.js.map +1 -1
- package/dist/components/Paragraph/index.d.ts +1 -0
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PasswordField/index.d.ts +1 -0
- package/dist/components/Popover/Popover.d.ts +2 -2
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/SearchField/index.d.ts +1 -0
- package/dist/components/Section/Section.d.ts +2 -2
- package/dist/components/Section/index.d.ts +1 -0
- package/dist/components/SelectCard/SelectCard.d.ts +3 -2
- package/dist/components/SelectCard/SelectCard.js +1 -0
- package/dist/components/SelectCard/index.d.ts +1 -0
- package/dist/components/SelectNative/index.d.ts +1 -0
- package/dist/components/Slider/Slider.d.ts +16 -4
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/SubHeading/SubHeading.d.ts +3 -3
- package/dist/components/SubHeading/index.d.ts +1 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/TagGroup/index.d.ts +1 -0
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/ToggleButton/index.d.ts +1 -0
- package/dist/components/ToggleIconButton/index.d.ts +1 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/index.d.ts +62 -2
- package/dist/components/index.js +3 -4
- package/dist/index.js +3 -4
- package/dist/utils/breakpoint/hooks/useBreakpoint.d.ts +11 -0
- package/dist/utils/breakpoint/hooks/useBreakpoint.js +79 -0
- package/dist/utils/breakpoint/hooks/useBreakpoint.js.map +1 -0
- package/dist/utils/breakpoint/responsive.d.ts +18 -0
- package/dist/utils/breakpoint/responsive.js +22 -0
- package/dist/utils/breakpoint/responsive.js.map +1 -0
- package/dist/utils/breakpoint/theme/breakpoints.d.ts +13 -0
- package/dist/utils/breakpoint/theme/breakpoints.js +27 -0
- package/dist/utils/breakpoint/theme/breakpoints.js.map +1 -0
- package/dist/utils/position/position.js +10 -10
- package/package.json +5 -3
|
@@ -3,29 +3,31 @@ import React from "react";
|
|
|
3
3
|
import { Icon } from "../Icon/Icon.js";
|
|
4
4
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
5
5
|
import { IconButton } from "../IconButton/IconButton.js";
|
|
6
|
-
import '../../assets/CalloutBanner.css';const calloutBanner$1 = "
|
|
7
|
-
const calloutBanner__icon = "
|
|
8
|
-
const calloutBanner__start = "
|
|
9
|
-
const calloutBanner__dismiss = "
|
|
10
|
-
const calloutBanner__meta = "
|
|
11
|
-
const calloutBanner__end = "
|
|
6
|
+
import '../../assets/CalloutBanner.css';const calloutBanner$1 = "_calloutBanner_kxqgt_1";
|
|
7
|
+
const calloutBanner__icon = "_calloutBanner__icon_kxqgt_12";
|
|
8
|
+
const calloutBanner__start = "_calloutBanner__start_kxqgt_16";
|
|
9
|
+
const calloutBanner__dismiss = "_calloutBanner__dismiss_kxqgt_24";
|
|
10
|
+
const calloutBanner__meta = "_calloutBanner__meta_kxqgt_30";
|
|
11
|
+
const calloutBanner__end = "_calloutBanner__end_kxqgt_75";
|
|
12
12
|
const styles = {
|
|
13
13
|
calloutBanner: calloutBanner$1,
|
|
14
14
|
calloutBanner__icon,
|
|
15
15
|
calloutBanner__start,
|
|
16
16
|
calloutBanner__dismiss,
|
|
17
17
|
calloutBanner__meta,
|
|
18
|
-
"calloutBanner__meta-
|
|
19
|
-
"calloutBanner__meta-
|
|
20
|
-
"calloutBanner__meta-
|
|
18
|
+
"calloutBanner__meta-top": "_calloutBanner__meta-top_kxqgt_46",
|
|
19
|
+
"calloutBanner__meta-top-dismiss": "_calloutBanner__meta-top-dismiss_kxqgt_54",
|
|
20
|
+
"calloutBanner__meta-title": "_calloutBanner__meta-title_kxqgt_58",
|
|
21
|
+
"calloutBanner__meta-description": "_calloutBanner__meta-description_kxqgt_62",
|
|
22
|
+
"calloutBanner__meta-label": "_calloutBanner__meta-label_kxqgt_66",
|
|
21
23
|
calloutBanner__end,
|
|
22
|
-
"calloutBanner-critical": "_calloutBanner-
|
|
23
|
-
"calloutBanner-primary": "_calloutBanner-
|
|
24
|
-
"calloutBanner-secondary": "_calloutBanner-
|
|
25
|
-
"calloutBanner-tertiary": "_calloutBanner-
|
|
26
|
-
"calloutBanner-success": "_calloutBanner-
|
|
27
|
-
"calloutBanner-information": "_calloutBanner-
|
|
28
|
-
"calloutBanner-neutral": "_calloutBanner-
|
|
24
|
+
"calloutBanner-critical": "_calloutBanner-critical_kxqgt_83",
|
|
25
|
+
"calloutBanner-primary": "_calloutBanner-primary_kxqgt_87",
|
|
26
|
+
"calloutBanner-secondary": "_calloutBanner-secondary_kxqgt_91",
|
|
27
|
+
"calloutBanner-tertiary": "_calloutBanner-tertiary_kxqgt_100",
|
|
28
|
+
"calloutBanner-success": "_calloutBanner-success_kxqgt_109",
|
|
29
|
+
"calloutBanner-information": "_calloutBanner-information_kxqgt_135",
|
|
30
|
+
"calloutBanner-neutral": "_calloutBanner-neutral_kxqgt_161"
|
|
29
31
|
};
|
|
30
32
|
const calloutBanner = cva(styles.calloutBanner, {
|
|
31
33
|
variants: {
|
|
@@ -69,6 +71,7 @@ const CalloutBanner = ({
|
|
|
69
71
|
return "circle-exclamation";
|
|
70
72
|
}
|
|
71
73
|
}, [emphasis]);
|
|
74
|
+
const hasOnDismiss = typeof onDismiss === "function";
|
|
72
75
|
return /* @__PURE__ */ jsxs("div", { className: calloutBanner({
|
|
73
76
|
emphasis,
|
|
74
77
|
styleVariant
|
|
@@ -76,13 +79,15 @@ const CalloutBanner = ({
|
|
|
76
79
|
/* @__PURE__ */ jsxs("div", { className: styles["calloutBanner__start"], children: [
|
|
77
80
|
/* @__PURE__ */ jsx(Icon, { iconName, iconPrefix: "fas", className: styles["calloutBanner__icon"], iconSize: "1.25x", padding: "roomy" }),
|
|
78
81
|
/* @__PURE__ */ jsxs("div", { className: styles["calloutBanner__meta"], children: [
|
|
79
|
-
|
|
82
|
+
hasOnDismiss && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__dismiss"], children: /* @__PURE__ */ jsx(IconButton, { onClick: onDismiss, styleVariant: emphasis === "primary" ? "white" : "neutral", emphasis: "quaternary", size: "sm", iconProps: {
|
|
80
83
|
iconName: "close",
|
|
81
84
|
iconPrefix: "far",
|
|
82
85
|
iconSize: "1x"
|
|
83
86
|
}, tooltipLabel: "Dismiss banner", "aria-label": "Dismiss banner" }) }),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
87
|
+
/* @__PURE__ */ jsxs("div", { className: `${styles["calloutBanner__meta-top"]} ${hasOnDismiss ? styles["calloutBanner__meta-top-dismiss"] : ""}`, children: [
|
|
88
|
+
/* @__PURE__ */ jsx("div", { className: styles["calloutBanner__meta-title"], children: title }),
|
|
89
|
+
description && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__meta-description"], children: description })
|
|
90
|
+
] }),
|
|
86
91
|
label && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__meta-label"], children: label })
|
|
87
92
|
] })
|
|
88
93
|
] }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutBanner.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalloutBanner.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from '../Button/Button';
|
|
2
2
|
import { FormProps } from '../../utils/forms/formProps';
|
|
3
|
-
export type ClearFieldButtonButtonSize = 'lg' | 'md' | 'sm';
|
|
4
3
|
export interface ClearFieldButtonProps extends Omit<ButtonProps, '$styleText'>, FormProps {
|
|
5
4
|
slot?: string;
|
|
6
5
|
className?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ComboBoxProps as AriaComboBoxProps, ListBoxItemProps } from 'react-aria-components';
|
|
2
|
+
import { ComboBoxProps as AriaComboBoxProps, ListBoxItemProps as AriaListBoxItemProps } from 'react-aria-components';
|
|
3
3
|
import { FieldProps } from '../_base/Field';
|
|
4
4
|
export interface ComboBoxProps<T extends object> extends FieldProps<AriaComboBoxProps<T>> {
|
|
5
5
|
isLoading?: boolean;
|
|
6
|
-
children: React.ReactNode | React.ReactElement<
|
|
6
|
+
children: React.ReactNode | React.ReactElement<AriaListBoxItemProps<T>>;
|
|
7
7
|
}
|
|
8
8
|
export declare const ComboBox: <T extends object>({ children, isLoading, ...props }: ComboBoxProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default ComboBox;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
|
|
2
2
|
import { FieldProps } from '../_base/Field';
|
|
3
3
|
type CreditCardNumberValue = string | number | null | undefined;
|
|
4
|
-
interface CreditCardNumberFieldBaseProps {
|
|
4
|
+
export interface CreditCardNumberFieldBaseProps {
|
|
5
5
|
/**
|
|
6
6
|
* The icon to display.
|
|
7
7
|
* If a function is provided, it will be called with the current value of the input.
|
|
@@ -35,7 +35,7 @@ const CreditCardNumberField = ({
|
|
|
35
35
|
onChangeControlled(values.value);
|
|
36
36
|
}
|
|
37
37
|
setValue(values.value);
|
|
38
|
-
} }),
|
|
38
|
+
}, autoComplete: "cc-number" }),
|
|
39
39
|
/* @__PURE__ */ jsx(Icon, { iconName: cardIcon, iconPrefix: cardIcon === "credit-card" ? "fas" : "fab", className: styles.iconEnd, iconSize: "1.25x", padding: "roomy" })
|
|
40
40
|
] }) });
|
|
41
41
|
};
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
|
|
3
3
|
import { FieldProps } from '../_base/Field';
|
|
4
4
|
type CreditCardSecurityCodeValue = string | number | null | undefined;
|
|
5
|
-
interface CreditCardSecurityCodeFieldBaseProps {
|
|
5
|
+
export interface CreditCardSecurityCodeFieldBaseProps {
|
|
6
6
|
/**
|
|
7
7
|
* The controlled value of the credit card number.
|
|
8
8
|
*/
|
|
@@ -30,6 +30,11 @@ export interface CreditCardSecurityCodeFieldProps extends Omit<FieldProps<Omit<A
|
|
|
30
30
|
* Expects a DetailsDisclosure component for further information.
|
|
31
31
|
*/
|
|
32
32
|
children?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Digits allowed in the input
|
|
35
|
+
* @default 3
|
|
36
|
+
*/
|
|
37
|
+
digits?: number;
|
|
33
38
|
}
|
|
34
|
-
export declare const CreditCardSecurityCodeField: ({ defaultValue, value: valueControlled, onChange: onChangeControlled, label, cardIcon, ...props }: CreditCardSecurityCodeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const CreditCardSecurityCodeField: ({ defaultValue, value: valueControlled, onChange: onChangeControlled, label, cardIcon, digits, ...props }: CreditCardSecurityCodeFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
40
|
export default CreditCardSecurityCodeField;
|
|
@@ -17,18 +17,19 @@ const CreditCardSecurityCodeField = ({
|
|
|
17
17
|
onChange: onChangeControlled,
|
|
18
18
|
label = "Card security code",
|
|
19
19
|
cardIcon = "back",
|
|
20
|
+
digits = 3,
|
|
20
21
|
...props
|
|
21
22
|
}) => {
|
|
22
23
|
const [value, setValue] = React.useState(defaultValue);
|
|
23
24
|
const valueDefinitive = valueControlled ?? value;
|
|
24
25
|
return /* @__PURE__ */ jsxs(Field, { className: styles.creditCardSecurityCodeField, as: TextField, label, isRequired: true, ...props, children: [
|
|
25
26
|
/* @__PURE__ */ jsxs("div", { className: styles.inputWrapper, children: [
|
|
26
|
-
/* @__PURE__ */ jsx(PatternFormat, { type: "text", format: "
|
|
27
|
+
/* @__PURE__ */ jsx(PatternFormat, { type: "text", format: `${"#".repeat(digits)}`, customInput: Input, placeholder: props == null ? void 0 : props.placeholder, defaultValue, value: valueDefinitive, onValueChange: (values) => {
|
|
27
28
|
if (typeof onChangeControlled === "function") {
|
|
28
29
|
onChangeControlled(values.value);
|
|
29
30
|
}
|
|
30
31
|
setValue(values.value);
|
|
31
|
-
} }),
|
|
32
|
+
}, autoComplete: "cc-csc" }),
|
|
32
33
|
/* @__PURE__ */ jsx(CreditCardSecurityCodeIcon, { cardIcon })
|
|
33
34
|
] }),
|
|
34
35
|
(props == null ? void 0 : props.children) && /* @__PURE__ */ jsx("div", { className: styles.inputChildren, children: props.children })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCardSecurityCodeField.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreditCardSecurityCodeField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,9 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { DateField as DateField$1, DateInput, DateSegment } from "react-aria-components";
|
|
3
3
|
import { Field } from "../_base/Field/Field.js";
|
|
4
4
|
import { useMemo, useState } from "react";
|
|
5
|
-
import '../../assets/DateField.css';const dateField = "
|
|
6
|
-
const dateInput = "
|
|
7
|
-
const dateSegment = "
|
|
5
|
+
import '../../assets/DateField.css';const dateField = "_dateField_1fojc_1";
|
|
6
|
+
const dateInput = "_dateInput_1fojc_5";
|
|
7
|
+
const dateSegment = "_dateSegment_1fojc_50";
|
|
8
8
|
const styles = {
|
|
9
9
|
dateField,
|
|
10
10
|
dateInput,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DisclosureProps as AriaDisclosureProps, DisclosurePanelProps as AriaDisclosurePanelProps } from 'react-aria-components';
|
|
3
|
-
interface DetailsDisclosureProps extends AriaDisclosureProps {
|
|
3
|
+
export interface DetailsDisclosureProps extends AriaDisclosureProps {
|
|
4
4
|
/**
|
|
5
5
|
* Whether the disclosure is expanded by default.
|
|
6
6
|
*/
|
|
@@ -29,5 +29,4 @@ declare const DetailsDisclosure: {
|
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
export type { DetailsDisclosureProps };
|
|
33
32
|
export default DetailsDisclosure;
|
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AriaDialogProps } from 'react-aria';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type DialogSize = 'dialogSmall' | 'dialogMedium' | 'dialogLarge';
|
|
4
|
+
type DialogRole = 'alertdialog' | 'dialog';
|
|
5
5
|
export interface DialogProps extends AriaDialogProps {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Whether the dialog is currently visible
|
|
8
|
+
*/
|
|
7
9
|
isOpen?: boolean;
|
|
8
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Callback function when dialog is requested to close
|
|
12
|
+
*/
|
|
9
13
|
onClose?: () => void;
|
|
10
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Width variant of the dialog - affects max-width
|
|
16
|
+
*/
|
|
11
17
|
size?: DialogSize;
|
|
12
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Whether clicking outside or escape key should be blocked
|
|
20
|
+
*/
|
|
13
21
|
modal?: boolean;
|
|
14
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Shows/hides the close (X) button in header
|
|
24
|
+
*/
|
|
15
25
|
hasDismissButton?: boolean;
|
|
16
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* ARIA role - use 'alertdialog' for important messages
|
|
28
|
+
*/
|
|
17
29
|
role?: DialogRole;
|
|
18
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Required unique ID for the dialog
|
|
32
|
+
*/
|
|
19
33
|
id?: string;
|
|
20
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* ID of element labeling the dialog (required for a11y)
|
|
36
|
+
*/
|
|
21
37
|
'aria-describedby'?: string;
|
|
22
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* ID of element describing the dialog (optional but recommended)
|
|
40
|
+
*/
|
|
23
41
|
'aria-labelledby'?: string;
|
|
24
42
|
}
|
|
25
43
|
export interface DialogComposition {
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface EyebrowProps {
|
|
3
|
+
/**
|
|
4
|
+
* The text content of the Eyebrow component.
|
|
5
|
+
* This is the main content that will be displayed.
|
|
6
|
+
*/
|
|
3
7
|
children: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* As which HTML element to render the Eyebrow component.
|
|
10
|
+
* This allows for flexibility in the semantic structure of the document.
|
|
11
|
+
* @default 'span'
|
|
12
|
+
*/
|
|
4
13
|
as?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
14
|
+
/**
|
|
15
|
+
* Style variant of the Eyebrow component.
|
|
16
|
+
* This determines the visual style applied to the component.
|
|
17
|
+
* @default 'inspiration'
|
|
18
|
+
*/
|
|
5
19
|
styleVariant?: 'inspiration' | 'collect' | 'spend' | 'activate';
|
|
6
20
|
}
|
|
7
21
|
export declare const Eyebrow: ({ children, as: Component, styleVariant, ...props }: EyebrowProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
3
|
-
import '../../assets/Eyebrow.css';const eyebrow$1 = "
|
|
4
|
-
const inspiration = "
|
|
5
|
-
const collect = "
|
|
6
|
-
const spend = "
|
|
7
|
-
const activate = "
|
|
3
|
+
import '../../assets/Eyebrow.css';const eyebrow$1 = "_eyebrow_ie5k8_1";
|
|
4
|
+
const inspiration = "_inspiration_ie5k8_14";
|
|
5
|
+
const collect = "_collect_ie5k8_19";
|
|
6
|
+
const spend = "_spend_ie5k8_24";
|
|
7
|
+
const activate = "_activate_ie5k8_29";
|
|
8
8
|
const styles = {
|
|
9
9
|
eyebrow: eyebrow$1,
|
|
10
10
|
inspiration,
|
|
@@ -3,7 +3,7 @@ import { SpaceToken } from '../../utils/spaceToken/spaceToken';
|
|
|
3
3
|
type AutoFlowValue = 'row' | 'column' | 'dense' | 'row dense' | 'column dense';
|
|
4
4
|
type AlignContentValue = 'start' | 'end' | 'center' | 'stretch' | 'space-around' | 'space-between' | 'space-evenly';
|
|
5
5
|
type ValidElements = 'div' | 'span';
|
|
6
|
-
type PolymorphicProps<E extends ValidElements> = {
|
|
6
|
+
export type PolymorphicProps<E extends ValidElements> = {
|
|
7
7
|
as?: E;
|
|
8
8
|
} & Omit<React.ComponentPropsWithRef<E>, 'as'>;
|
|
9
9
|
export interface GridCellBaseProps {
|
|
@@ -8,6 +8,7 @@ declare const heading: (props?: ({
|
|
|
8
8
|
type HeadingVariants = VariantProps<typeof heading>;
|
|
9
9
|
type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'legend';
|
|
10
10
|
type HeadingSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
export declare const DEFAULT_HEADING_SIZE_MAP: Record<HeadingLevel, HeadingSize>;
|
|
11
12
|
export interface HeadingProps extends HeadingVariants {
|
|
12
13
|
/**
|
|
13
14
|
* children
|
|
@@ -5,7 +5,7 @@ export type IconSize = '0.5x' | '0.75x' | '1x' | '1.25x' | '1.5x' | '2x' | '2.5x
|
|
|
5
5
|
* @deprecated These sizes will be removed in the next major version. Use 1x instead.
|
|
6
6
|
* @ignore
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
type DeprecatedIconSize = 'lg' | 'sm' | 'xs' | '2xs' | 'xl' | '2xl';
|
|
9
9
|
export interface IconProps {
|
|
10
10
|
/**
|
|
11
11
|
* What Icon to load from fontAwesome
|
|
@@ -6,17 +6,29 @@ declare const imageVariants: (props?: ({
|
|
|
6
6
|
fit?: "none" | "fill" | "contain" | "cover" | "scale-down" | "scaleDown" | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'className' | 'style'>, Pick<BorderVariants, 'borderRadius'>, BackgroundVariants, VariantProps<typeof imageVariants> {
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Image url that will be used as a fallback in case `src` prop is not set or image cannot be loaded
|
|
11
|
+
*/
|
|
10
12
|
fallbackSrc?: string;
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Called when image fails to load
|
|
15
|
+
*/
|
|
12
16
|
onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Called when image is loaded
|
|
19
|
+
*/
|
|
14
20
|
onLoad?: React.ReactEventHandler<HTMLImageElement>;
|
|
15
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Polymorphism with children, the component will render the children instead of the image
|
|
23
|
+
*/
|
|
16
24
|
asChild?: boolean;
|
|
17
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* To support polymorphism with children
|
|
27
|
+
*/
|
|
18
28
|
children?: React.ReactNode;
|
|
19
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Aspect ratio of the image
|
|
31
|
+
*/
|
|
20
32
|
aspectRatio?: number;
|
|
21
33
|
backgroundColour?: BackgroundVariants['backgroundColor'];
|
|
22
34
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
2
3
|
import { Icon } from "../Icon/Icon.js";
|
|
3
4
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
4
5
|
import { Link as Link$1 } from "react-aria-components";
|
|
@@ -70,6 +71,20 @@ const Link = ({
|
|
|
70
71
|
rel: "noopener noreferrer",
|
|
71
72
|
"aria-label": ariaLabelExternal
|
|
72
73
|
} : {};
|
|
74
|
+
const iconSize = useMemo(() => {
|
|
75
|
+
switch (size) {
|
|
76
|
+
case "xs":
|
|
77
|
+
return "0.75x";
|
|
78
|
+
case "sm":
|
|
79
|
+
return "0.75x";
|
|
80
|
+
case "md":
|
|
81
|
+
return "1x";
|
|
82
|
+
case "lg":
|
|
83
|
+
return "1.25x";
|
|
84
|
+
default:
|
|
85
|
+
return "1x";
|
|
86
|
+
}
|
|
87
|
+
}, [size]);
|
|
73
88
|
return /* @__PURE__ */ jsxs(Link$1, { className: `${link({
|
|
74
89
|
size,
|
|
75
90
|
underline: underline2
|
|
@@ -80,11 +95,11 @@ const Link = ({
|
|
|
80
95
|
})}`, href, target, ...externalLinkProps, ...props, children: [
|
|
81
96
|
iconStartProps && /* @__PURE__ */ jsx(Icon, { className: link({
|
|
82
97
|
iconStart: !!iconStartProps
|
|
83
|
-
}), ...iconStartProps }),
|
|
98
|
+
}), iconSize, ...iconStartProps }),
|
|
84
99
|
children || linkText,
|
|
85
100
|
finalIconEndProps && /* @__PURE__ */ jsx(Icon, { className: link({
|
|
86
101
|
iconEnd: !!finalIconEndProps
|
|
87
|
-
}), ...finalIconEndProps })
|
|
102
|
+
}), iconSize, ...finalIconEndProps })
|
|
88
103
|
] });
|
|
89
104
|
};
|
|
90
105
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { ForegroundVariants } from '../../utils/foregroundColour/foregroundColor';
|
|
4
|
+
import { WithResponsive } from '../../utils/breakpoint/responsive';
|
|
4
5
|
declare const paragraph: (props?: ({
|
|
5
6
|
size?: "lg" | "sm" | "xs" | "md" | null | undefined;
|
|
6
7
|
textAlign?: "center" | "end" | "start" | null | undefined;
|
|
7
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
9
|
type ParagraphVariants = VariantProps<typeof paragraph>;
|
|
9
10
|
type ParagraphSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
10
|
-
|
|
11
|
+
interface BaseProps extends ParagraphVariants {
|
|
11
12
|
children: React.ReactNode;
|
|
12
13
|
/**
|
|
13
14
|
* The size of the paragraph
|
|
@@ -30,5 +31,7 @@ export interface ParagraphProps extends ParagraphVariants {
|
|
|
30
31
|
*/
|
|
31
32
|
textAlign?: 'start' | 'center' | 'end';
|
|
32
33
|
}
|
|
34
|
+
type ResponsiveKeys = 'size' | 'textAlign';
|
|
35
|
+
export type ParagraphProps = WithResponsive<BaseProps, ResponsiveKeys>;
|
|
33
36
|
export declare const Paragraph: ({ children, size, foregroundColor, fgColor, textAlign, ...props }: ParagraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
37
|
export default Paragraph;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as cva } from "../../index-Bi3v_EjJ.js";
|
|
3
3
|
import { foregroundColorVariants } from "../../utils/foregroundColour/foregroundColor.js";
|
|
4
|
+
import { resolveResponsiveProp } from "../../utils/breakpoint/responsive.js";
|
|
5
|
+
import { useBreakpoint } from "../../utils/breakpoint/hooks/useBreakpoint.js";
|
|
4
6
|
import '../../assets/Paragraph.css';const paragraph$1 = "_paragraph_rcir1_1";
|
|
5
7
|
const xs = "_xs_rcir1_13";
|
|
6
8
|
const sm = "_sm_rcir1_19";
|
|
@@ -46,13 +48,16 @@ const Paragraph = ({
|
|
|
46
48
|
textAlign = "start",
|
|
47
49
|
...props
|
|
48
50
|
}) => {
|
|
51
|
+
const breakpoint = useBreakpoint();
|
|
52
|
+
const finalSize = resolveResponsiveProp(size, breakpoint);
|
|
53
|
+
const finalTextAlign = resolveResponsiveProp(textAlign, breakpoint);
|
|
54
|
+
const resolvedFontColor = fgColor ?? foregroundColor ?? "secondary";
|
|
49
55
|
if (fgColor) {
|
|
50
56
|
console.warn("The `fgColor` prop has been deprecated. Please use `foregroundColor` instead.");
|
|
51
57
|
}
|
|
52
|
-
const resolvedFontColor = fgColor ?? foregroundColor ?? "secondary";
|
|
53
58
|
return /* @__PURE__ */ jsx("p", { className: `${paragraph({
|
|
54
|
-
size,
|
|
55
|
-
textAlign
|
|
59
|
+
size: finalSize,
|
|
60
|
+
textAlign: finalTextAlign
|
|
56
61
|
})} ${foregroundColorVariants({
|
|
57
62
|
foregroundColor: resolvedFontColor
|
|
58
63
|
})}`, ...props, children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paragraph.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paragraph.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|