@alto-avios/alto-ui 3.0.0 → 3.2.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 (213) hide show
  1. package/dist/assets/Accordion.css +1 -0
  2. package/dist/assets/AviosBadge.css +1 -0
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/CalloutBanner.css +1 -0
  5. package/dist/assets/CreditCardNumberField.css +1 -0
  6. package/dist/assets/DetailsDisclosure.css +1 -0
  7. package/dist/assets/Dialog.css +1 -0
  8. package/dist/assets/ErrorSummary.css +1 -0
  9. package/dist/assets/FieldHeader.css +1 -1
  10. package/dist/assets/FieldLabel.css +1 -1
  11. package/dist/assets/FieldsetHeader.css +1 -1
  12. package/dist/assets/Icon.css +1 -0
  13. package/dist/assets/IconBackdrop.css +1 -0
  14. package/dist/assets/IconButton.css +1 -1
  15. package/dist/assets/Menu.css +1 -0
  16. package/dist/assets/PasswordField.css +1 -0
  17. package/dist/assets/PhoneNumberField.css +1 -0
  18. package/dist/assets/Popover.css +1 -0
  19. package/dist/assets/SelectCard.css +1 -0
  20. package/dist/assets/SelectNative.css +1 -0
  21. package/dist/assets/Slider.css +1 -0
  22. package/dist/assets/Switch.css +1 -0
  23. package/dist/assets/Tag.css +1 -1
  24. package/dist/assets/ToggleButton.css +1 -1
  25. package/dist/assets/ToggleIconButton.css +1 -1
  26. package/dist/assets/backgroundColor.css +1 -0
  27. package/dist/assets/flex.css +1 -1
  28. package/dist/assets/foregroundColor.css +1 -0
  29. package/dist/assets/position.css +1 -0
  30. package/dist/components/Accordion/Accordion.d.ts +35 -0
  31. package/dist/components/Accordion/Accordion.js +140 -0
  32. package/dist/components/Accordion/Accordion.js.map +1 -0
  33. package/dist/components/Accordion/index.d.ts +1 -0
  34. package/dist/components/Accordion/index.js +5 -0
  35. package/dist/components/Accordion/index.js.map +1 -0
  36. package/dist/components/AviosBadge/AviosBadge.d.ts +34 -0
  37. package/dist/components/AviosBadge/AviosBadge.js +58 -0
  38. package/dist/components/AviosBadge/AviosBadge.js.map +1 -0
  39. package/dist/components/AviosBadge/index.d.ts +1 -0
  40. package/dist/components/AviosBadge/index.js +5 -0
  41. package/dist/components/AviosBadge/index.js.map +1 -0
  42. package/dist/components/Badge/Badge.d.ts +7 -2
  43. package/dist/components/Badge/Badge.js +2 -1
  44. package/dist/components/Badge/Badge.js.map +1 -1
  45. package/dist/components/Box/Box.d.ts +9 -5
  46. package/dist/components/Box/Box.js +10 -1
  47. package/dist/components/Box/Box.js.map +1 -1
  48. package/dist/components/Button/Button.js +31 -31
  49. package/dist/components/CalloutBanner/CalloutBanner.d.ts +21 -0
  50. package/dist/components/CalloutBanner/CalloutBanner.js +96 -0
  51. package/dist/components/CalloutBanner/CalloutBanner.js.map +1 -0
  52. package/dist/components/CalloutBanner/index.d.ts +1 -0
  53. package/dist/components/CalloutBanner/index.js +5 -0
  54. package/dist/components/CalloutBanner/index.js.map +1 -0
  55. package/dist/components/Checkbox/index.d.ts +1 -0
  56. package/dist/components/CreditCardNumberField/CreditCardNumberField.d.ts +29 -0
  57. package/dist/components/CreditCardNumberField/CreditCardNumberField.js +46 -0
  58. package/dist/components/CreditCardNumberField/CreditCardNumberField.js.map +1 -0
  59. package/dist/components/CreditCardNumberField/index.d.ts +1 -0
  60. package/dist/components/CreditCardNumberField/index.js +5 -0
  61. package/dist/components/CreditCardNumberField/index.js.map +1 -0
  62. package/dist/components/DateField/DateField.d.ts +22 -3
  63. package/dist/components/DateField/DateField.js +856 -2
  64. package/dist/components/DateField/DateField.js.map +1 -1
  65. package/dist/components/DetailsDisclosure/DetailsDisclosure.d.ts +33 -0
  66. package/dist/components/DetailsDisclosure/DetailsDisclosure.js +39 -0
  67. package/dist/components/DetailsDisclosure/DetailsDisclosure.js.map +1 -0
  68. package/dist/components/DetailsDisclosure/index.d.ts +2 -0
  69. package/dist/components/DetailsDisclosure/index.js +5 -0
  70. package/dist/components/DetailsDisclosure/index.js.map +1 -0
  71. package/dist/components/Dialog/Dialog.d.ts +46 -0
  72. package/dist/components/Dialog/Dialog.js +117 -0
  73. package/dist/components/Dialog/Dialog.js.map +1 -0
  74. package/dist/components/Dialog/index.d.ts +1 -0
  75. package/dist/components/Dialog/index.js +5 -0
  76. package/dist/components/Dialog/index.js.map +1 -0
  77. package/dist/components/ErrorSummary/ErrorSummary.d.ts +7 -0
  78. package/dist/components/ErrorSummary/ErrorSummary.js +44 -0
  79. package/dist/components/ErrorSummary/ErrorSummary.js.map +1 -0
  80. package/dist/components/ErrorSummary/index.d.ts +1 -0
  81. package/dist/components/ErrorSummary/index.js +5 -0
  82. package/dist/components/ErrorSummary/index.js.map +1 -0
  83. package/dist/components/FieldError/FieldError.js +1 -1
  84. package/dist/components/FieldHeader/FieldHeader.js +6 -6
  85. package/dist/components/FieldLabel/FieldLabel.js +1 -1
  86. package/dist/components/FieldsetHeader/FieldsetHeader.js +3 -3
  87. package/dist/components/Heading/Heading.d.ts +25 -6
  88. package/dist/components/Heading/Heading.js +9 -4
  89. package/dist/components/Heading/Heading.js.map +1 -1
  90. package/dist/components/Icon/Icon.d.ts +31 -4
  91. package/dist/components/Icon/Icon.js +98 -5
  92. package/dist/components/Icon/Icon.js.map +1 -1
  93. package/dist/components/IconBackdrop/IconBackdrop.d.ts +24 -0
  94. package/dist/components/IconBackdrop/IconBackdrop.js +34 -0
  95. package/dist/components/IconBackdrop/IconBackdrop.js.map +1 -0
  96. package/dist/components/IconBackdrop/index.d.ts +1 -0
  97. package/dist/components/IconBackdrop/index.js +5 -0
  98. package/dist/components/IconBackdrop/index.js.map +1 -0
  99. package/dist/components/IconButton/IconButton.d.ts +1 -1
  100. package/dist/components/IconButton/IconButton.js +28 -28
  101. package/dist/components/Image/Image.d.ts +3 -2
  102. package/dist/components/Image/Image.js +7 -2
  103. package/dist/components/Image/Image.js.map +1 -1
  104. package/dist/components/Link/Link.d.ts +3 -3
  105. package/dist/components/Link/Link.js +2 -2
  106. package/dist/components/Menu/Menu.d.ts +75 -0
  107. package/dist/components/Menu/Menu.js +356 -0
  108. package/dist/components/Menu/Menu.js.map +1 -0
  109. package/dist/components/Menu/index.d.ts +1 -0
  110. package/dist/components/Menu/index.js +5 -0
  111. package/dist/components/Menu/index.js.map +1 -0
  112. package/dist/components/Paragraph/Paragraph.d.ts +9 -5
  113. package/dist/components/Paragraph/Paragraph.js +9 -4
  114. package/dist/components/Paragraph/Paragraph.js.map +1 -1
  115. package/dist/components/PasswordField/PasswordField.d.ts +30 -0
  116. package/dist/components/PasswordField/PasswordField.js +104 -0
  117. package/dist/components/PasswordField/PasswordField.js.map +1 -0
  118. package/dist/components/PasswordField/index.d.ts +1 -0
  119. package/dist/components/PasswordField/index.js +5 -0
  120. package/dist/components/PasswordField/index.js.map +1 -0
  121. package/dist/components/PhoneNumberField/PhoneNumberField.d.ts +53 -0
  122. package/dist/components/PhoneNumberField/PhoneNumberField.js +96 -0
  123. package/dist/components/PhoneNumberField/PhoneNumberField.js.map +1 -0
  124. package/dist/components/PhoneNumberField/index.d.ts +3 -0
  125. package/dist/components/PhoneNumberField/index.js +7 -0
  126. package/dist/components/PhoneNumberField/index.js.map +1 -0
  127. package/dist/components/Popover/Popover.d.ts +48 -0
  128. package/dist/components/Popover/Popover.js +65 -0
  129. package/dist/components/Popover/Popover.js.map +1 -0
  130. package/dist/components/Popover/index.d.ts +1 -0
  131. package/dist/components/Popover/index.js +5 -0
  132. package/dist/components/Popover/index.js.map +1 -0
  133. package/dist/components/Radio/index.d.ts +1 -0
  134. package/dist/components/Section/Section.d.ts +2 -1
  135. package/dist/components/Section/Section.js +7 -2
  136. package/dist/components/Section/Section.js.map +1 -1
  137. package/dist/components/SelectCard/SelectCard.d.ts +51 -0
  138. package/dist/components/SelectCard/SelectCard.js +85 -0
  139. package/dist/components/SelectCard/SelectCard.js.map +1 -0
  140. package/dist/components/SelectCard/index.d.ts +1 -0
  141. package/dist/components/SelectCard/index.js +5 -0
  142. package/dist/components/SelectCard/index.js.map +1 -0
  143. package/dist/components/SelectNative/SelectNative.d.ts +56 -0
  144. package/dist/components/SelectNative/SelectNative.js +40 -0
  145. package/dist/components/SelectNative/SelectNative.js.map +1 -0
  146. package/dist/components/SelectNative/index.d.ts +1 -0
  147. package/dist/components/SelectNative/index.js +5 -0
  148. package/dist/components/SelectNative/index.js.map +1 -0
  149. package/dist/components/Slider/Slider.d.ts +33 -0
  150. package/dist/components/Slider/Slider.js +113 -0
  151. package/dist/components/Slider/Slider.js.map +1 -0
  152. package/dist/components/Slider/index.d.ts +1 -0
  153. package/dist/components/Slider/index.js +5 -0
  154. package/dist/components/Slider/index.js.map +1 -0
  155. package/dist/components/SubHeading/SubHeading.d.ts +26 -5
  156. package/dist/components/SubHeading/SubHeading.js +9 -4
  157. package/dist/components/SubHeading/SubHeading.js.map +1 -1
  158. package/dist/components/Switch/Switch.d.ts +7 -0
  159. package/dist/components/Switch/Switch.js +18 -0
  160. package/dist/components/Switch/Switch.js.map +1 -0
  161. package/dist/components/Switch/index.d.ts +1 -0
  162. package/dist/components/Switch/index.js +5 -0
  163. package/dist/components/Switch/index.js.map +1 -0
  164. package/dist/components/Tag/Tag.js +4 -4
  165. package/dist/components/ToggleButton/ToggleButton.js +6 -6
  166. package/dist/components/ToggleIconButton/ToggleIconButton.js +6 -6
  167. package/dist/components/Tooltip/Tooltip.d.ts +5 -1
  168. package/dist/components/Tooltip/Tooltip.js +2 -1
  169. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  170. package/dist/components/_base/Field/Field.d.ts +2 -2
  171. package/dist/components/_base/Field/Field.js +2 -5
  172. package/dist/components/_base/Field/Field.js.map +1 -1
  173. package/dist/components/index.d.ts +16 -0
  174. package/dist/components/index.js +45 -14
  175. package/dist/components/index.js.map +1 -1
  176. package/dist/index.js +45 -14
  177. package/dist/index.js.map +1 -1
  178. package/dist/react-number-format.es-DMLgWFZX.js +760 -0
  179. package/dist/react-number-format.es-DMLgWFZX.js.map +1 -0
  180. package/dist/utils/backgroundColor/backgroundColor.d.ts +8 -0
  181. package/dist/utils/backgroundColor/backgroundColor.js +102 -0
  182. package/dist/utils/backgroundColor/backgroundColor.js.map +1 -0
  183. package/dist/utils/border/border.d.ts +3 -3
  184. package/dist/utils/creditCard/creditCard.d.ts +7 -0
  185. package/dist/utils/creditCard/creditCard.js +25 -0
  186. package/dist/utils/creditCard/creditCard.js.map +1 -0
  187. package/dist/utils/flex/flex.d.ts +11 -6
  188. package/dist/utils/flex/flex.js +390 -46
  189. package/dist/utils/flex/flex.js.map +1 -1
  190. package/dist/utils/flex/flex.test.d.ts +1 -0
  191. package/dist/utils/focus/focusStyles.d.ts +1 -1
  192. package/dist/utils/foregroundColour/foregroundColor.d.ts +8 -0
  193. package/dist/utils/foregroundColour/foregroundColor.js +125 -0
  194. package/dist/utils/foregroundColour/foregroundColor.js.map +1 -0
  195. package/dist/utils/padding/padding.d.ts +7 -7
  196. package/dist/utils/phoneNumber/phoneNumber.d.ts +24 -0
  197. package/dist/utils/phoneNumber/phoneNumber.js +566 -0
  198. package/dist/utils/phoneNumber/phoneNumber.js.map +1 -0
  199. package/dist/utils/position/position.d.ts +8 -0
  200. package/dist/utils/position/position.js +57 -0
  201. package/dist/utils/position/position.js.map +1 -0
  202. package/dist/utils/position/position.test.d.ts +1 -0
  203. package/dist/utils/stories/iconPropsArgTypes.js +49 -13
  204. package/dist/utils/stories/iconPropsArgTypes.js.map +1 -1
  205. package/package.json +2 -1
  206. package/dist/assets/backgroundColour.css +0 -1
  207. package/dist/assets/fgColor.css +0 -1
  208. package/dist/utils/backgroundColour/backgroundColour.d.ts +0 -8
  209. package/dist/utils/backgroundColour/backgroundColour.js +0 -102
  210. package/dist/utils/backgroundColour/backgroundColour.js.map +0 -1
  211. package/dist/utils/fgColour/fgColor.d.ts +0 -5
  212. package/dist/utils/fgColour/fgColor.js +0 -84
  213. package/dist/utils/fgColour/fgColor.js.map +0 -1
@@ -1,11 +1,92 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { c as cva } from "../../index-Bi3v_EjJ.js";
2
3
  import { useState, useEffect } from "react";
4
+ import { foregroundColorVariants } from "../../utils/foregroundColour/foregroundColor.js";
5
+ import { backgroundColorVariants } from "../../utils/backgroundColor/backgroundColor.js";
6
+ import '../../assets/Icon.css';const iconSize0_5x = "_iconSize0_5x_h11q1_8";
7
+ const iconSize0_75x = "_iconSize0_75x_h11q1_12";
8
+ const iconSize1_25x = "_iconSize1_25x_h11q1_16";
9
+ const iconSize1_5x = "_iconSize1_5x_h11q1_20";
10
+ const iconSize2_5x = "_iconSize2_5x_h11q1_24";
11
+ const iconSize1x = "_iconSize1x_h11q1_39";
12
+ const iconSize2x = "_iconSize2x_h11q1_54";
13
+ const iconSize3x = "_iconSize3x_h11q1_64";
14
+ const iconSize4x = "_iconSize4x_h11q1_69";
15
+ const iconSize5x = "_iconSize5x_h11q1_74";
16
+ const iconSize6x = "_iconSize6x_h11q1_79";
17
+ const iconSize7x = "_iconSize7x_h11q1_84";
18
+ const iconSize8x = "_iconSize8x_h11q1_89";
19
+ const iconSize9x = "_iconSize9x_h11q1_94";
20
+ const iconSize10x = "_iconSize10x_h11q1_99";
21
+ const icon$1 = "_icon_h11q1_1";
22
+ const fixedWidth = "_fixedWidth_h11q1_105";
23
+ const square = "_square_h11q1_109";
24
+ const roomy = "_roomy_h11q1_113";
25
+ const styles = {
26
+ "icon-wrapper": "_icon-wrapper_h11q1_1",
27
+ iconSize0_5x,
28
+ iconSize0_75x,
29
+ iconSize1_25x,
30
+ iconSize1_5x,
31
+ iconSize2_5x,
32
+ iconSize1x,
33
+ iconSize2x,
34
+ iconSize3x,
35
+ iconSize4x,
36
+ iconSize5x,
37
+ iconSize6x,
38
+ iconSize7x,
39
+ iconSize8x,
40
+ iconSize9x,
41
+ iconSize10x,
42
+ icon: icon$1,
43
+ fixedWidth,
44
+ square,
45
+ roomy
46
+ };
47
+ const icon = cva(styles.icon, {
48
+ variants: {
49
+ padding: {
50
+ none: "",
51
+ fixedWidth: styles.fixedWidth,
52
+ square: styles.square,
53
+ roomy: styles.roomy
54
+ },
55
+ iconSize: {
56
+ default: styles.iconSize1x,
57
+ "0.5x": styles.iconSize0_5x,
58
+ "0.75x": styles.iconSize0_75x,
59
+ "1x": styles.iconSize1x,
60
+ "1.25x": styles.iconSize1_25x,
61
+ "1.5x": styles.iconSize1_5x,
62
+ "2x": styles.iconSize2x,
63
+ "2.5x": styles.iconSize2_5x,
64
+ "3x": styles.iconSize3x,
65
+ "4x": styles.iconSize4x,
66
+ "5x": styles.iconSize5x,
67
+ "6x": styles.iconSize6x,
68
+ "7x": styles.iconSize7x,
69
+ "8x": styles.iconSize8x,
70
+ "9x": styles.iconSize9x,
71
+ "10x": styles.iconSize10x,
72
+ lg: styles.iconSize1_25x,
73
+ sm: styles.iconSize1x,
74
+ xs: styles.iconSize1x,
75
+ "2xs": styles.iconSize0_75x,
76
+ xl: styles.iconSize2x,
77
+ "2xl": styles.iconSize3x
78
+ }
79
+ }
80
+ });
3
81
  const Icon = ({
4
82
  iconName,
5
83
  iconPrefix = "far",
6
- iconSize: size,
84
+ iconSize = "1x",
85
+ iconPack,
86
+ color,
87
+ padding = "none",
7
88
  flip,
8
- fixedWidth,
89
+ fixedWidth: fixedWidth2 = true,
9
90
  listItem,
10
91
  border,
11
92
  rotation,
@@ -14,19 +95,31 @@ const Icon = ({
14
95
  spin,
15
96
  className,
16
97
  ariaLabel,
98
+ privateBgColorVariant,
17
99
  ...props
18
100
  }) => {
19
101
  const [key, setKey] = useState(0);
20
102
  useEffect(() => {
21
103
  setKey((prevKey) => prevKey + 1);
22
- }, [iconName, iconPrefix, size, flip, fixedWidth, listItem, border, rotation, pull, spin, ariaLabel]);
104
+ }, [iconName, iconPrefix, iconSize, iconPack, color, padding, flip, fixedWidth2, listItem, border, rotation, pull, spin, ariaLabel, privateBgColorVariant]);
105
+ const fontAwesomeSize = ["2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"].includes(iconSize || "") ? `fa-${iconSize}` : "";
106
+ const formatSize = (iconSize2) => `iconSize${iconSize2.replace(".", "_")}`;
107
+ const customSizeClass = iconSize && styles[formatSize(iconSize)];
23
108
  const accessibilityProps = ariaLabel ? {
24
109
  "aria-label": ariaLabel
25
110
  } : {
26
111
  "aria-label": iconName
27
112
  };
28
- const classNames = [iconPrefix, `fa-${iconName}`, size ? `fa-${size}` : "", flip ? `fa-flip-${flip}` : "", fixedWidth ? "fa-fw" : "", listItem ? "fa-li" : "", border ? "fa-border" : "", rotation ? `fa-rotate-${rotation}` : "", pull ? `fa-pull-${pull}` : "", spin ? "fa-spin" : ""].filter(Boolean).join(" ");
29
- return /* @__PURE__ */ jsx("span", { className: `icon-wrapper ${className || ""}`, children: /* @__PURE__ */ jsx("i", { className: classNames, ...accessibilityProps, ...props, role: "img" }) }, key);
113
+ const classNames = [iconPrefix, `fa-${iconName}`, fontAwesomeSize, iconPack ? `fa-${iconPack}` : "", flip ? `fa-flip-${flip}` : "", fixedWidth2 ? "fa-fw" : "", listItem ? "fa-li" : "", border ? "fa-border" : "", rotation ? `fa-rotate-${rotation}` : "", pull ? `fa-pull-${pull}` : "", spin ? "fa-spin" : "", customSizeClass].filter(Boolean).join(" ");
114
+ return /* @__PURE__ */ jsx("span", { className: `icon-wrapper ${styles["icon-wrapper"]} ${className || ""} ${icon({
115
+ iconSize
116
+ })}`, children: /* @__PURE__ */ jsx("i", { className: `${classNames} ${icon({
117
+ padding
118
+ })} ${foregroundColorVariants({
119
+ foregroundColor: color
120
+ })} ${backgroundColorVariants({
121
+ backgroundColor: privateBgColorVariant ?? "transparent"
122
+ })}`, ...accessibilityProps, ...props, role: "img" }) }, key);
30
123
  };
31
124
  export {
32
125
  Icon,
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,24 @@
1
+ import { BackgroundVariants } from '../../utils/backgroundColor/backgroundColor';
2
+ import { IconProps } from '../Icon/Icon';
3
+ export interface IconBackdropProps {
4
+ /**
5
+ * The shape of the backdrop
6
+ * @default 'squircle'
7
+ */
8
+ backdropShape?: 'circle' | 'squircle';
9
+ /**
10
+ * The colour of the backdrop
11
+ * @default 'accentSubtle'
12
+ */
13
+ backdropColor?: BackgroundVariants['backgroundColor'];
14
+ /**
15
+ * The size of the backdrop
16
+ */
17
+ iconSize?: IconProps['iconSize'];
18
+ /**
19
+ * The icon properties
20
+ */
21
+ iconProps?: Omit<IconProps, 'iconSize' | 'padding'>;
22
+ }
23
+ export declare const IconBackdrop: ({ backdropShape, backdropColor, iconSize, iconProps, }: IconBackdropProps) => import("react/jsx-runtime").JSX.Element;
24
+ export default IconBackdrop;
@@ -0,0 +1,34 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { c as cva } from "../../index-Bi3v_EjJ.js";
3
+ import { Icon } from "../Icon/Icon.js";
4
+ import '../../assets/IconBackdrop.css';const iconBackdrop$1 = "_iconBackdrop_1e7m2_1";
5
+ const squircle = "_squircle_1e7m2_7";
6
+ const circle = "_circle_1e7m2_11";
7
+ const styles = {
8
+ iconBackdrop: iconBackdrop$1,
9
+ squircle,
10
+ circle
11
+ };
12
+ const iconBackdrop = cva(styles.iconBackdrop, {
13
+ variants: {
14
+ backdropShape: {
15
+ circle: styles.circle,
16
+ squircle: styles.squircle
17
+ }
18
+ }
19
+ });
20
+ const IconBackdrop = ({
21
+ backdropShape = "squircle",
22
+ backdropColor = "accentSubtle",
23
+ iconSize = "2x",
24
+ iconProps = {}
25
+ }) => {
26
+ return /* @__PURE__ */ jsx("span", { className: `${iconBackdrop({
27
+ backdropShape
28
+ })}`, children: /* @__PURE__ */ jsx(Icon, { padding: "roomy", iconName: iconProps.iconName ?? "plane-up", ...iconProps, iconSize, privateBgColorVariant: backdropColor }) });
29
+ };
30
+ export {
31
+ IconBackdrop,
32
+ IconBackdrop as default
33
+ };
34
+ //# sourceMappingURL=IconBackdrop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconBackdrop.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ export { default } from './IconBackdrop';
@@ -0,0 +1,5 @@
1
+ import { IconBackdrop } from "./IconBackdrop.js";
2
+ export {
3
+ IconBackdrop as default
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -28,5 +28,5 @@ export interface IconButtonProps extends Omit<ButtonProps<'button'>, 'onClick'>,
28
28
  */
29
29
  tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
30
30
  }
31
- export declare const IconButton: ({ styleType, styleVariant, emphasis, size, isLoading, iconProps, onClick, form, formAction, formEncType, formMethod, formNoValidate, formTarget, name, value, isDisabled, autoFocus, type, focusStyle, slot, tooltipLabel, tooltipPlacement, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
32
32
  export default IconButton;
@@ -1,31 +1,31 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as cva } from "../../index-Bi3v_EjJ.js";
3
- import { useRef, useState, useEffect } from "react";
3
+ import { forwardRef, useRef, useState, useEffect } from "react";
4
4
  import { Button } from "react-aria-components";
5
5
  import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
6
6
  import { Icon } from "../Icon/Icon.js";
7
7
  import LoadingSpinner from "../LoadingSpinner/LoadingSpinner.js";
8
8
  import { Tooltip } from "../Tooltip/Tooltip.js";
9
- import '../../assets/IconButton.css';const iconButton$1 = "_iconButton_by3pb_1";
10
- const sm = "_sm_by3pb_24";
11
- const md = "_md_by3pb_30";
12
- const lg = "_lg_by3pb_36";
13
- const accentPrimary = "_accentPrimary_by3pb_46";
14
- const accentSecondary = "_accentSecondary_by3pb_69";
15
- const accentTertiary = "_accentTertiary_by3pb_98";
16
- const accentQuaternary = "_accentQuaternary_by3pb_127";
17
- const criticalPrimary = "_criticalPrimary_by3pb_151";
18
- const criticalSecondary = "_criticalSecondary_by3pb_175";
19
- const criticalTertiary = "_criticalTertiary_by3pb_204";
20
- const criticalQuaternary = "_criticalQuaternary_by3pb_229";
21
- const neutralPrimary = "_neutralPrimary_by3pb_254";
22
- const neutralSecondary = "_neutralSecondary_by3pb_278";
23
- const neutralTertiary = "_neutralTertiary_by3pb_305";
24
- const neutralQuaternary = "_neutralQuaternary_by3pb_330";
25
- const whitePrimary = "_whitePrimary_by3pb_356";
26
- const whiteSecondary = "_whiteSecondary_by3pb_385";
27
- const whiteTertiary = "_whiteTertiary_by3pb_416";
28
- const whiteQuaternary = "_whiteQuaternary_by3pb_445";
9
+ import '../../assets/IconButton.css';const iconButton$1 = "_iconButton_kb1oz_1";
10
+ const sm = "_sm_kb1oz_24";
11
+ const md = "_md_kb1oz_30";
12
+ const lg = "_lg_kb1oz_36";
13
+ const accentPrimary = "_accentPrimary_kb1oz_46";
14
+ const accentSecondary = "_accentSecondary_kb1oz_69";
15
+ const accentTertiary = "_accentTertiary_kb1oz_98";
16
+ const accentQuaternary = "_accentQuaternary_kb1oz_127";
17
+ const criticalPrimary = "_criticalPrimary_kb1oz_151";
18
+ const criticalSecondary = "_criticalSecondary_kb1oz_175";
19
+ const criticalTertiary = "_criticalTertiary_kb1oz_204";
20
+ const criticalQuaternary = "_criticalQuaternary_kb1oz_229";
21
+ const neutralPrimary = "_neutralPrimary_kb1oz_254";
22
+ const neutralSecondary = "_neutralSecondary_kb1oz_278";
23
+ const neutralTertiary = "_neutralTertiary_kb1oz_305";
24
+ const neutralQuaternary = "_neutralQuaternary_kb1oz_330";
25
+ const whitePrimary = "_whitePrimary_kb1oz_356";
26
+ const whiteSecondary = "_whiteSecondary_kb1oz_385";
27
+ const whiteTertiary = "_whiteTertiary_kb1oz_416";
28
+ const whiteQuaternary = "_whiteQuaternary_kb1oz_445";
29
29
  const styles = {
30
30
  iconButton: iconButton$1,
31
31
  sm,
@@ -47,8 +47,8 @@ const styles = {
47
47
  whiteSecondary,
48
48
  whiteTertiary,
49
49
  whiteQuaternary,
50
- "fa-spinner-third": "_fa-spinner-third_by3pb_476",
51
- "icon-wrapper": "_icon-wrapper_by3pb_481"
50
+ "fa-spinner-third": "_fa-spinner-third_kb1oz_476",
51
+ "icon-wrapper": "_icon-wrapper_kb1oz_481"
52
52
  };
53
53
  const iconButton = cva(styles.iconButton, {
54
54
  variants: {
@@ -86,8 +86,7 @@ const iconButton = cva(styles.iconButton, {
86
86
  size: "md"
87
87
  }
88
88
  });
89
- const IconButton = ({
90
- //Button Props
89
+ const IconButton = forwardRef(({
91
90
  styleType,
92
91
  styleVariant,
93
92
  emphasis = "primary",
@@ -113,7 +112,7 @@ const IconButton = ({
113
112
  tooltipLabel = "",
114
113
  tooltipPlacement = "top",
115
114
  ...props
116
- }) => {
115
+ }, ref) => {
117
116
  const buttonRef = useRef(null);
118
117
  const [buttonWidth, setButtonWidth] = useState(null);
119
118
  useEffect(() => {
@@ -127,7 +126,7 @@ const IconButton = ({
127
126
  [resolvedStyleVariant]: emphasis
128
127
  })} ${focusStyleVariants({
129
128
  focusStyle
130
- })}`, ref: buttonRef, onPress: onClick, form, formAction, formEncType, formMethod, formNoValidate, formTarget, name, value, isDisabled, autoFocus, type, "aria-label": tooltipLabel ? void 0 : isLoading ? "Loading Spinner" : "Icon", style: {
129
+ })}`, ref: ref || buttonRef, onPress: onClick, form, formAction, formEncType, formMethod, formNoValidate, formTarget, name, value, isDisabled, autoFocus, type, "aria-label": tooltipLabel ? void 0 : isLoading ? "Loading Spinner" : "Icon", style: {
131
130
  width: isLoading && buttonWidth ? `${buttonWidth}px` : void 0
132
131
  }, slot, ...props, children: [
133
132
  isLoading && /* @__PURE__ */ jsx(LoadingSpinner, { size: "1x" }),
@@ -137,7 +136,8 @@ const IconButton = ({
137
136
  return /* @__PURE__ */ jsx(Tooltip, { label: tooltipLabel, placement: tooltipPlacement, isDisabled, children: buttonContent });
138
137
  }
139
138
  return buttonContent;
140
- };
139
+ });
140
+ IconButton.displayName = "IconButton";
141
141
  export {
142
142
  IconButton,
143
143
  IconButton as default
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { BorderVariants } from '../../utils/border/border';
4
- import { BackgroundVariants } from '../../utils/backgroundColour/backgroundColour';
4
+ import { BackgroundVariants } from '../../utils/backgroundColor/backgroundColor';
5
5
  declare const imageVariants: (props?: ({
6
- fit?: "fill" | "none" | "contain" | "cover" | "scale-down" | "scaleDown" | null | undefined;
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
  /** Image url that will be used as a fallback in case `src` prop is not set or image cannot be loaded */
@@ -18,6 +18,7 @@ export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElemen
18
18
  children?: React.ReactNode;
19
19
  /** Aspect ratio of the image */
20
20
  aspectRatio?: number;
21
+ backgroundColour?: BackgroundVariants['backgroundColor'];
21
22
  }
22
23
  export declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>;
23
24
  export default Image;
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import React, { useState, useRef, useEffect } from "react";
3
3
  import { c as cva } from "../../index-Bi3v_EjJ.js";
4
4
  import { borderVariants } from "../../utils/border/border.js";
5
- import { backgroundColorVariants } from "../../utils/backgroundColour/backgroundColour.js";
5
+ import { backgroundColorVariants } from "../../utils/backgroundColor/backgroundColor.js";
6
6
  import '../../assets/Image.css';const image = "_image_z82es_1";
7
7
  const fill = "_fill_z82es_10";
8
8
  const contain = "_contain_z82es_14";
@@ -70,11 +70,16 @@ const Image = React.forwardRef(({
70
70
  asChild,
71
71
  children,
72
72
  borderRadius,
73
+ backgroundColor,
73
74
  backgroundColour,
74
75
  fit,
75
76
  aspectRatio,
76
77
  ...props
77
78
  }, forwardedRef) => {
79
+ if (backgroundColour && !backgroundColor) {
80
+ console.warn("Warning: `backgroundColour` is deprecated and will be removed in a future release. Please use `backgroundColor` instead.");
81
+ }
82
+ const resolvedBackgroundColor = backgroundColor ?? backgroundColour;
78
83
  const {
79
84
  ref: internalRef,
80
85
  loaded,
@@ -100,7 +105,7 @@ const Image = React.forwardRef(({
100
105
  borderRadius
101
106
  })}
102
107
  ${backgroundColorVariants({
103
- backgroundColour
108
+ backgroundColor: resolvedBackgroundColor
104
109
  })}
105
110
  ${imageVariants({
106
111
  fit
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Image.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -39,10 +39,10 @@ export interface LinkProps extends AriaLinkProps {
39
39
  */
40
40
  target?: string;
41
41
  /**
42
- * The label for the external link
42
+ * Aria label applied when target="_blank"
43
43
  * @default "open in new tab"
44
44
  */
45
- labelExternal?: string;
45
+ ariaLabelExternal?: string;
46
46
  /**
47
47
  * The focus style of the button
48
48
  */
@@ -63,5 +63,5 @@ export interface LinkProps extends AriaLinkProps {
63
63
  */
64
64
  linkText?: string;
65
65
  }
66
- declare const Link: ({ size, underline, iconStartProps, iconEndProps, iconProps, linkText, href, target, focusStyle, children, labelExternal, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
66
+ declare const Link: ({ size, underline, iconStartProps, iconEndProps, iconProps, linkText, href, target, focusStyle, children, ariaLabelExternal, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
67
67
  export default Link;
@@ -57,7 +57,7 @@ const Link = ({
57
57
  target = "_self",
58
58
  focusStyle = "default",
59
59
  children,
60
- labelExternal = "open in new tab",
60
+ ariaLabelExternal = "open in new tab",
61
61
  ...props
62
62
  }) => {
63
63
  const finalIconEndProps = iconProps ?? // Use deprecated iconProps if provided
@@ -66,7 +66,7 @@ const Link = ({
66
66
  });
67
67
  const externalLinkProps = target === "_blank" ? {
68
68
  rel: "noopener noreferrer",
69
- "aria-label": labelExternal
69
+ "aria-label": ariaLabelExternal
70
70
  } : {};
71
71
  return /* @__PURE__ */ jsxs(Link$1, { className: `${link({
72
72
  size,
@@ -0,0 +1,75 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps } from '../Button/Button';
3
+ type PlacementType = 'top' | 'top start' | 'top end' | 'right' | 'right top' | 'right bottom' | 'bottom' | 'bottom start' | 'bottom end' | 'left' | 'left top' | 'left bottom';
4
+ export interface MenuProps {
5
+ /**
6
+ * The label text for the menu button
7
+ */
8
+ label: string;
9
+ /**
10
+ * Accessible label for the menu (for screen readers)
11
+ * Defaults to the button label if not provided
12
+ * @default props.label
13
+ */
14
+ 'aria-label'?: string;
15
+ /**
16
+ * Whether the menu is disabled
17
+ * @default false
18
+ */
19
+ isDisabled?: boolean;
20
+ /**
21
+ * The placement of the menu relative to the button
22
+ * @default 'bottom start'
23
+ */
24
+ placement?: PlacementType;
25
+ /**
26
+ * The button emphasis
27
+ * @default 'tertiary'
28
+ */
29
+ buttonEmphasis?: ButtonProps['emphasis'];
30
+ /**
31
+ * The button style variant
32
+ * @default 'neutral'
33
+ */
34
+ buttonStyleVariant?: ButtonProps['styleVariant'];
35
+ /**
36
+ * The button style variant when menu is open
37
+ * @default buttonStyleVariant value
38
+ */
39
+ buttonOpenVariant?: ButtonProps['styleVariant'];
40
+ /**
41
+ * ID of an element to position the menu against instead of the button
42
+ * When provided, the menu will be positioned relative to this element
43
+ */
44
+ alignToElementId?: string;
45
+ /**
46
+ * Whether the menu should flip to fit in the viewport
47
+ * @default false
48
+ */
49
+ shouldFlip?: boolean;
50
+ /**
51
+ * Whether the menu should open on hover and focus
52
+ * @default false
53
+ */
54
+ openOnHoverAndFocus?: boolean;
55
+ /**
56
+ * Whether to allow tabbing out of the menu
57
+ * @default true
58
+ */
59
+ allowTabOut?: boolean;
60
+ /**
61
+ * The content to display inside the menu (as JSX children)
62
+ * Can be custom HTML content
63
+ */
64
+ children: React.ReactNode;
65
+ /**
66
+ * Icon props for the start of the button
67
+ */
68
+ iconStartProps?: ButtonProps['iconStartProps'];
69
+ /**
70
+ * Icon props for the end of the button
71
+ */
72
+ iconEndProps?: ButtonProps['iconEndProps'];
73
+ }
74
+ export declare const Menu: ({ label, "aria-label": ariaLabel, isDisabled, placement, buttonEmphasis, buttonStyleVariant, buttonOpenVariant, alignToElementId, shouldFlip, openOnHoverAndFocus, allowTabOut, children, iconStartProps, iconEndProps, }: MenuProps) => import("react/jsx-runtime").JSX.Element;
75
+ export default Menu;