@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.
Files changed (121) hide show
  1. package/README.md +8 -0
  2. package/dist/assets/Accordion.css +1 -1
  3. package/dist/assets/Badge.css +1 -1
  4. package/dist/assets/Button.css +1 -1
  5. package/dist/assets/CalloutBanner.css +1 -1
  6. package/dist/assets/DateField.css +1 -1
  7. package/dist/assets/Eyebrow.css +1 -1
  8. package/dist/components/Accordion/Accordion.js +15 -15
  9. package/dist/components/Accordion/index.d.ts +1 -0
  10. package/dist/components/AviosBadge/AviosBadge.d.ts +1 -1
  11. package/dist/components/AviosBadge/AviosBadge.js +2 -2
  12. package/dist/components/AviosBadge/index.d.ts +1 -0
  13. package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +1 -1
  14. package/dist/components/AviosCurrencySymbol/index.d.ts +1 -0
  15. package/dist/components/Badge/Badge.d.ts +17 -2
  16. package/dist/components/Badge/Badge.js +29 -19
  17. package/dist/components/Badge/Badge.js.map +1 -1
  18. package/dist/components/Badge/index.d.ts +1 -0
  19. package/dist/components/Box/Box.d.ts +26 -1
  20. package/dist/components/Box/Box.js +11 -1
  21. package/dist/components/Box/Box.js.map +1 -1
  22. package/dist/components/Box/index.d.ts +1 -0
  23. package/dist/components/Button/Button.d.ts +2 -2
  24. package/dist/components/Button/Button.js +34 -33
  25. package/dist/components/Button/Button.js.map +1 -1
  26. package/dist/components/Button/index.d.ts +1 -0
  27. package/dist/components/ButtonGroup/index.d.ts +1 -0
  28. package/dist/components/CalloutBanner/CalloutBanner.d.ts +1 -1
  29. package/dist/components/CalloutBanner/CalloutBanner.js +24 -19
  30. package/dist/components/CalloutBanner/CalloutBanner.js.map +1 -1
  31. package/dist/components/CalloutBanner/index.d.ts +1 -0
  32. package/dist/components/CardSection/index.d.ts +1 -0
  33. package/dist/components/Checkbox/index.d.ts +1 -1
  34. package/dist/components/CheckboxGroup/index.d.ts +1 -0
  35. package/dist/components/ClearFieldButton/ClearFieldButton.d.ts +0 -1
  36. package/dist/components/ClearFieldButton/index.d.ts +1 -0
  37. package/dist/components/ComboBox/ComboBox.d.ts +2 -2
  38. package/dist/components/CreditCardNumberField/CreditCardNumberField.d.ts +1 -1
  39. package/dist/components/CreditCardNumberField/CreditCardNumberField.js +1 -1
  40. package/dist/components/CreditCardNumberField/index.d.ts +1 -0
  41. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.d.ts +7 -2
  42. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js +3 -2
  43. package/dist/components/CreditCardSecurityCodeField/CreditCardSecurityCodeField.js.map +1 -1
  44. package/dist/components/CreditCardSecurityCodeField/index.d.ts +1 -0
  45. package/dist/components/DateField/DateField.js +3 -3
  46. package/dist/components/DateField/index.d.ts +1 -0
  47. package/dist/components/DestinationHeading/index.d.ts +1 -0
  48. package/dist/components/DetailsDisclosure/DetailsDisclosure.d.ts +1 -2
  49. package/dist/components/DetailsDisclosure/index.d.ts +1 -1
  50. package/dist/components/Dialog/Dialog.d.ts +29 -11
  51. package/dist/components/Dialog/index.d.ts +1 -0
  52. package/dist/components/ErrorSummary/index.d.ts +1 -0
  53. package/dist/components/Eyebrow/Eyebrow.d.ts +14 -0
  54. package/dist/components/Eyebrow/Eyebrow.js +5 -5
  55. package/dist/components/FieldDescription/index.d.ts +1 -0
  56. package/dist/components/FieldError/index.d.ts +1 -0
  57. package/dist/components/FieldLabel/index.d.ts +1 -0
  58. package/dist/components/FieldsetHeader/index.d.ts +1 -0
  59. package/dist/components/Form/index.d.ts +1 -0
  60. package/dist/components/Grid/Grid.d.ts +1 -1
  61. package/dist/components/Grid/index.d.ts +1 -0
  62. package/dist/components/Heading/Heading.d.ts +1 -0
  63. package/dist/components/Heading/Heading.js +1 -0
  64. package/dist/components/Heading/index.d.ts +1 -0
  65. package/dist/components/Icon/Icon.d.ts +1 -1
  66. package/dist/components/Icon/index.d.ts +1 -0
  67. package/dist/components/IconBackdrop/index.d.ts +1 -0
  68. package/dist/components/IconButton/index.d.ts +1 -0
  69. package/dist/components/Image/Image.d.ts +18 -6
  70. package/dist/components/Image/index.d.ts +1 -0
  71. package/dist/components/Label/index.d.ts +1 -0
  72. package/dist/components/Link/Link.js +17 -2
  73. package/dist/components/Link/Link.js.map +1 -1
  74. package/dist/components/Link/index.d.ts +1 -0
  75. package/dist/components/ListBoxItem/index.d.ts +1 -1
  76. package/dist/components/LoadingSpinner/index.d.ts +1 -0
  77. package/dist/components/Menu/index.d.ts +1 -0
  78. package/dist/components/NumberField/index.d.ts +1 -0
  79. package/dist/components/Paragraph/Paragraph.d.ts +4 -1
  80. package/dist/components/Paragraph/Paragraph.js +8 -3
  81. package/dist/components/Paragraph/Paragraph.js.map +1 -1
  82. package/dist/components/Paragraph/index.d.ts +1 -0
  83. package/dist/components/PasswordField/PasswordField.d.ts +1 -1
  84. package/dist/components/PasswordField/index.d.ts +1 -0
  85. package/dist/components/Popover/Popover.d.ts +2 -2
  86. package/dist/components/Popover/index.d.ts +1 -0
  87. package/dist/components/Radio/index.d.ts +1 -1
  88. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  89. package/dist/components/RadioGroup/index.d.ts +1 -0
  90. package/dist/components/SearchField/index.d.ts +1 -0
  91. package/dist/components/Section/Section.d.ts +2 -2
  92. package/dist/components/Section/index.d.ts +1 -0
  93. package/dist/components/SelectCard/SelectCard.d.ts +3 -2
  94. package/dist/components/SelectCard/SelectCard.js +1 -0
  95. package/dist/components/SelectCard/index.d.ts +1 -0
  96. package/dist/components/SelectNative/index.d.ts +1 -0
  97. package/dist/components/Slider/Slider.d.ts +16 -4
  98. package/dist/components/Slider/index.d.ts +1 -0
  99. package/dist/components/SubHeading/SubHeading.d.ts +3 -3
  100. package/dist/components/SubHeading/index.d.ts +1 -0
  101. package/dist/components/Switch/index.d.ts +1 -0
  102. package/dist/components/Tag/index.d.ts +1 -0
  103. package/dist/components/TagGroup/index.d.ts +1 -0
  104. package/dist/components/TextField/index.d.ts +1 -0
  105. package/dist/components/ToggleButton/index.d.ts +1 -0
  106. package/dist/components/ToggleIconButton/index.d.ts +1 -0
  107. package/dist/components/Tooltip/index.d.ts +1 -0
  108. package/dist/components/index.d.ts +62 -2
  109. package/dist/components/index.js +3 -4
  110. package/dist/index.js +3 -4
  111. package/dist/utils/breakpoint/hooks/useBreakpoint.d.ts +11 -0
  112. package/dist/utils/breakpoint/hooks/useBreakpoint.js +79 -0
  113. package/dist/utils/breakpoint/hooks/useBreakpoint.js.map +1 -0
  114. package/dist/utils/breakpoint/responsive.d.ts +18 -0
  115. package/dist/utils/breakpoint/responsive.js +22 -0
  116. package/dist/utils/breakpoint/responsive.js.map +1 -0
  117. package/dist/utils/breakpoint/theme/breakpoints.d.ts +13 -0
  118. package/dist/utils/breakpoint/theme/breakpoints.js +27 -0
  119. package/dist/utils/breakpoint/theme/breakpoints.js.map +1 -0
  120. package/dist/utils/position/position.js +10 -10
  121. 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 = "_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";
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-title": "_calloutBanner__meta-title_kvv8j_41",
19
- "calloutBanner__meta-description": "_calloutBanner__meta-description_kvv8j_45",
20
- "calloutBanner__meta-label": "_calloutBanner__meta-label_kvv8j_49",
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-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"
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
- 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: {
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__ */ jsx("div", { className: styles["calloutBanner__meta-title"], children: title }),
85
- description && /* @__PURE__ */ jsx("div", { className: styles["calloutBanner__meta-description"], children: description }),
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 +1,2 @@
1
1
  export { default } from './CalloutBanner';
2
+ export type { CalloutBannerProps } from './CalloutBanner';
@@ -1 +1,2 @@
1
1
  export { default } from './CardSection';
2
+ export type { CardSectionProps } from './CardSection';
@@ -1,2 +1,2 @@
1
- export type { CheckboxProps } from './Checkbox';
2
1
  export { default } from './Checkbox';
2
+ export type { CheckboxProps } from './Checkbox';
@@ -1 +1,2 @@
1
1
  export { default } from './CheckboxGroup';
2
+ export type { CheckboxGroupProps } from './CheckboxGroup';
@@ -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 +1,2 @@
1
1
  export { default } from './ClearFieldButton';
2
+ export type { ClearFieldButtonProps } from './ClearFieldButton';
@@ -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<ListBoxItemProps<T>>;
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
  };
@@ -1 +1,2 @@
1
1
  export { default } from './CreditCardNumberField';
2
+ export type { CreditCardNumberFieldProps, CreditCardNumberFieldBaseProps, } from './CreditCardNumberField';
@@ -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: "###", customInput: Input, placeholder: props == null ? void 0 : props.placeholder, defaultValue, value: valueDefinitive, onValueChange: (values) => {
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1,2 @@
1
1
  export { default } from './CreditCardSecurityCodeField';
2
+ export type { CreditCardSecurityCodeFieldProps, CreditCardSecurityCodeFieldBaseProps, } from './CreditCardSecurityCodeField';
@@ -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 = "_dateField_349vs_1";
6
- const dateInput = "_dateInput_349vs_5";
7
- const dateSegment = "_dateSegment_349vs_51";
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 +1,2 @@
1
1
  export { default } from './DateField';
2
+ export type { DateFieldProps } from './DateField';
@@ -1 +1,2 @@
1
1
  export { default } from './DestinationHeading';
2
+ export type { DestinationHeadingProps } from './DestinationHeading';
@@ -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,2 +1,2 @@
1
- export type { DetailsDisclosureProps } from './DetailsDisclosure';
2
1
  export { default } from './DetailsDisclosure';
2
+ export type { DetailsDisclosureProps } from './DetailsDisclosure';
@@ -1,25 +1,43 @@
1
1
  import { default as React } from 'react';
2
2
  import { AriaDialogProps } from 'react-aria';
3
- export type DialogSize = 'dialogSmall' | 'dialogMedium' | 'dialogLarge';
4
- export type DialogRole = 'alertdialog' | 'dialog';
3
+ type DialogSize = 'dialogSmall' | 'dialogMedium' | 'dialogLarge';
4
+ type DialogRole = 'alertdialog' | 'dialog';
5
5
  export interface DialogProps extends AriaDialogProps {
6
- /** Whether the dialog is currently visible */
6
+ /**
7
+ * Whether the dialog is currently visible
8
+ */
7
9
  isOpen?: boolean;
8
- /** Callback function when dialog is requested to close */
10
+ /**
11
+ * Callback function when dialog is requested to close
12
+ */
9
13
  onClose?: () => void;
10
- /** Width variant of the dialog - affects max-width */
14
+ /**
15
+ * Width variant of the dialog - affects max-width
16
+ */
11
17
  size?: DialogSize;
12
- /** Whether clicking outside or escape key should be blocked */
18
+ /**
19
+ * Whether clicking outside or escape key should be blocked
20
+ */
13
21
  modal?: boolean;
14
- /** Shows/hides the close (X) button in header */
22
+ /**
23
+ * Shows/hides the close (X) button in header
24
+ */
15
25
  hasDismissButton?: boolean;
16
- /** ARIA role - use 'alertdialog' for important messages */
26
+ /**
27
+ * ARIA role - use 'alertdialog' for important messages
28
+ */
17
29
  role?: DialogRole;
18
- /** Required unique ID for the dialog */
30
+ /**
31
+ * Required unique ID for the dialog
32
+ */
19
33
  id?: string;
20
- /** ID of element labeling the dialog (required for a11y) */
34
+ /**
35
+ * ID of element labeling the dialog (required for a11y)
36
+ */
21
37
  'aria-describedby'?: string;
22
- /** ID of element describing the dialog (optional but recommended) */
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 +1,2 @@
1
1
  export { default } from './Dialog';
2
+ export type { DialogProps, DialogComposition } from './Dialog';
@@ -1 +1,2 @@
1
1
  export { default } from './ErrorSummary';
2
+ export type { ErrorSummaryProps } from './ErrorSummary';
@@ -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 = "_eyebrow_rc11b_1";
4
- const inspiration = "_inspiration_rc11b_16";
5
- const collect = "_collect_rc11b_20";
6
- const spend = "_spend_rc11b_24";
7
- const activate = "_activate_rc11b_29";
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,
@@ -1 +1,2 @@
1
1
  export { default } from './FieldDescription';
2
+ export type { FieldDescriptionProps } from './FieldDescription';
@@ -1 +1,2 @@
1
1
  export { default } from './FieldError';
2
+ export type { FieldErrorProps } from './FieldError';
@@ -1 +1,2 @@
1
1
  export { default } from './FieldLabel';
2
+ export type { FieldLabelProps } from './FieldLabel';
@@ -1 +1,2 @@
1
1
  export { default } from './FieldsetHeader';
2
+ export type { FieldsetHeaderProps } from './FieldsetHeader';
@@ -1 +1,2 @@
1
1
  export { default } from './Form';
2
+ export type { FormProps } from './Form';
@@ -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 {
@@ -1 +1,2 @@
1
1
  export { default } from './Grid';
2
+ export type { PolymorphicProps, GridCellBaseProps, GridProps } from './Grid';
@@ -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
@@ -78,6 +78,7 @@ const Heading = ({
78
78
  })}`, ...props, children });
79
79
  };
80
80
  export {
81
+ DEFAULT_HEADING_SIZE_MAP,
81
82
  Heading,
82
83
  Heading as default
83
84
  };
@@ -1 +1,2 @@
1
1
  export { default } from './Heading';
2
+ export type { HeadingProps, DEFAULT_HEADING_SIZE_MAP } from './Heading';
@@ -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
- export type DeprecatedIconSize = 'lg' | 'sm' | 'xs' | '2xs' | 'xl' | '2xl';
8
+ type DeprecatedIconSize = 'lg' | 'sm' | 'xs' | '2xs' | 'xl' | '2xl';
9
9
  export interface IconProps {
10
10
  /**
11
11
  * What Icon to load from fontAwesome
@@ -1 +1,2 @@
1
1
  export { default } from './Icon';
2
+ export type { IconProps, IconSize } from './Icon';
@@ -1 +1,2 @@
1
1
  export { default } from './IconBackdrop';
2
+ export type { IconBackdropProps } from './IconBackdrop';
@@ -1 +1,2 @@
1
1
  export { default } from './IconButton';
2
+ export type { IconButtonProps } from './IconButton';
@@ -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
- /** Image url that will be used as a fallback in case `src` prop is not set or image cannot be loaded */
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
- /** Called when image fails to load */
13
+ /**
14
+ * Called when image fails to load
15
+ */
12
16
  onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
13
- /** Called when image is loaded */
17
+ /**
18
+ * Called when image is loaded
19
+ */
14
20
  onLoad?: React.ReactEventHandler<HTMLImageElement>;
15
- /** Polymorphism with children, the component will render the children instead of the image */
21
+ /**
22
+ * Polymorphism with children, the component will render the children instead of the image
23
+ */
16
24
  asChild?: boolean;
17
- /** To support polymorphism with children */
25
+ /**
26
+ * To support polymorphism with children
27
+ */
18
28
  children?: React.ReactNode;
19
- /** Aspect ratio of the image */
29
+ /**
30
+ * Aspect ratio of the image
31
+ */
20
32
  aspectRatio?: number;
21
33
  backgroundColour?: BackgroundVariants['backgroundColor'];
22
34
  }
@@ -1 +1,2 @@
1
1
  export { default } from './Image';
2
+ export type { ImageProps } from './Image';
@@ -1 +1,2 @@
1
1
  export { default } from './Label';
2
+ export type { LabelProps } from './Label';
@@ -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 +1,2 @@
1
1
  export { default } from './Link';
2
+ export type { LinkProps } from './Link';
@@ -1,2 +1,2 @@
1
- export type { ListBoxItemProps } from './ListBoxItem';
2
1
  export { default } from './ListBoxItem';
2
+ export type { ListBoxItemProps } from './ListBoxItem';
@@ -1 +1,2 @@
1
1
  export { default } from './LoadingSpinner';
2
+ export type { LoadingSpinnerProps } from './LoadingSpinner';
@@ -1 +1,2 @@
1
1
  export { default } from './Menu';
2
+ export type { MenuProps } from './Menu';
@@ -1 +1,2 @@
1
1
  export { default } from './NumberField';
2
+ export type { NumberFieldProps } from './NumberField';
@@ -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
- export interface ParagraphProps extends ParagraphVariants {
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1,2 @@
1
1
  export { default } from './Paragraph';
2
+ export type { ParagraphProps } from './Paragraph';