@alto-avios/alto-ui 2.3.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/README.md +33 -9
  2. package/dist/assets/AviosCurrencySymbol.css +1 -0
  3. package/dist/assets/Badge.css +1 -1
  4. package/dist/assets/Button.css +1 -1
  5. package/dist/assets/ButtonGroup.css +1 -1
  6. package/dist/assets/CardSection.css +1 -1
  7. package/dist/assets/Checkbox.css +1 -1
  8. package/dist/assets/CheckboxGroup.css +1 -1
  9. package/dist/assets/ClearFieldButton.css +1 -1
  10. package/dist/assets/DateField.css +1 -1
  11. package/dist/assets/Eyebrow.css +1 -1
  12. package/dist/assets/FieldDescription.css +1 -1
  13. package/dist/assets/FieldError.css +1 -1
  14. package/dist/assets/FieldHeader.css +1 -1
  15. package/dist/assets/FieldLabel.css +1 -1
  16. package/dist/assets/Fieldset.css +1 -0
  17. package/dist/assets/FieldsetHeader.css +1 -0
  18. package/dist/assets/Form.css +1 -0
  19. package/dist/assets/Grid.css +1 -1
  20. package/dist/assets/Heading.css +1 -1
  21. package/dist/assets/IconButton.css +1 -1
  22. package/dist/assets/Image.css +1 -0
  23. package/dist/assets/Link.css +1 -1
  24. package/dist/assets/LoadingSpinner.css +1 -1
  25. package/dist/assets/NumberField.css +1 -0
  26. package/dist/assets/Radio.css +1 -1
  27. package/dist/assets/RadioGroup.css +1 -1
  28. package/dist/assets/Section.css +1 -0
  29. package/dist/assets/SubHeading.css +1 -1
  30. package/dist/assets/Tag.css +1 -1
  31. package/dist/assets/TextAreaField.css +1 -1
  32. package/dist/assets/ToggleButton.css +1 -1
  33. package/dist/assets/ToggleIconButton.css +1 -1
  34. package/dist/assets/Tooltip.css +1 -1
  35. package/dist/assets/fgColor.css +1 -1
  36. package/dist/assets/focusStyles.css +1 -1
  37. package/dist/assets/global.css +1 -1
  38. package/dist/assets/padding.css +1 -1
  39. package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.d.ts +25 -0
  40. package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js +80 -0
  41. package/dist/components/AviosCurrencySymbol/AviosCurrencySymbol.js.map +1 -0
  42. package/dist/components/AviosCurrencySymbol/index.d.ts +1 -0
  43. package/dist/components/AviosCurrencySymbol/index.js +5 -0
  44. package/dist/components/Badge/Badge.js +11 -11
  45. package/dist/components/Box/Box.d.ts +18 -3
  46. package/dist/components/Box/Box.js +9 -3
  47. package/dist/components/Box/Box.js.map +1 -1
  48. package/dist/components/Button/Button.d.ts +128 -36
  49. package/dist/components/Button/Button.js +129 -66
  50. package/dist/components/Button/Button.js.map +1 -1
  51. package/dist/components/ButtonGroup/ButtonGroup.js +8 -8
  52. package/dist/components/CardSection/CardSection.d.ts +12 -6
  53. package/dist/components/CardSection/CardSection.js +9 -7
  54. package/dist/components/CardSection/CardSection.js.map +1 -1
  55. package/dist/components/Checkbox/Checkbox.d.ts +4 -2
  56. package/dist/components/Checkbox/Checkbox.js +12 -10
  57. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  58. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +12 -12
  59. package/dist/components/CheckboxGroup/CheckboxGroup.js +3 -3
  60. package/dist/components/ClearFieldButton/ClearFieldButton.d.ts +4 -6
  61. package/dist/components/ClearFieldButton/ClearFieldButton.js +4 -4
  62. package/dist/components/DateField/DateField.d.ts +4 -24
  63. package/dist/components/DateField/DateField.js +7 -19
  64. package/dist/components/DateField/DateField.js.map +1 -1
  65. package/dist/components/DestinationHeading/DestinationHeading.d.ts +1 -1
  66. package/dist/components/Eyebrow/Eyebrow.js +5 -5
  67. package/dist/components/FieldDescription/FieldDescription.js +1 -1
  68. package/dist/components/FieldError/FieldError.d.ts +1 -1
  69. package/dist/components/FieldError/FieldError.js +12 -9
  70. package/dist/components/FieldError/FieldError.js.map +1 -1
  71. package/dist/components/FieldHeader/FieldHeader.d.ts +2 -1
  72. package/dist/components/FieldHeader/FieldHeader.js +5 -4
  73. package/dist/components/FieldHeader/FieldHeader.js.map +1 -1
  74. package/dist/components/FieldHeader/index.d.ts +1 -0
  75. package/dist/components/FieldLabel/FieldLabel.d.ts +1 -1
  76. package/dist/components/FieldLabel/FieldLabel.js +1 -2
  77. package/dist/components/FieldLabel/FieldLabel.js.map +1 -1
  78. package/dist/components/Fieldset/Fieldset.d.ts +18 -0
  79. package/dist/components/Fieldset/Fieldset.js +24 -0
  80. package/dist/components/Fieldset/Fieldset.js.map +1 -0
  81. package/dist/components/Fieldset/index.d.ts +2 -0
  82. package/dist/components/Fieldset/index.js +5 -0
  83. package/dist/components/Fieldset/index.js.map +1 -0
  84. package/dist/components/FieldsetHeader/FieldsetHeader.d.ts +7 -0
  85. package/dist/components/FieldsetHeader/FieldsetHeader.js +21 -0
  86. package/dist/components/FieldsetHeader/FieldsetHeader.js.map +1 -0
  87. package/dist/components/FieldsetHeader/index.d.ts +1 -0
  88. package/dist/components/FieldsetHeader/index.js +5 -0
  89. package/dist/components/FieldsetHeader/index.js.map +1 -0
  90. package/dist/components/Form/Form.d.ts +7 -0
  91. package/dist/components/Form/Form.js +17 -0
  92. package/dist/components/Form/Form.js.map +1 -0
  93. package/dist/components/Form/index.d.ts +1 -0
  94. package/dist/components/Form/index.js +5 -0
  95. package/dist/components/Form/index.js.map +1 -0
  96. package/dist/components/Grid/Grid.d.ts +35 -16
  97. package/dist/components/Grid/Grid.js +63 -30
  98. package/dist/components/Grid/Grid.js.map +1 -1
  99. package/dist/components/Heading/Heading.d.ts +2 -2
  100. package/dist/components/Heading/Heading.js +19 -17
  101. package/dist/components/Heading/Heading.js.map +1 -1
  102. package/dist/components/Icon/Icon.d.ts +4 -4
  103. package/dist/components/Icon/Icon.js +1 -0
  104. package/dist/components/Icon/Icon.js.map +1 -1
  105. package/dist/components/IconButton/IconButton.d.ts +13 -4
  106. package/dist/components/IconButton/IconButton.js +35 -26
  107. package/dist/components/IconButton/IconButton.js.map +1 -1
  108. package/dist/components/Image/Image.d.ts +23 -0
  109. package/dist/components/Image/Image.js +130 -0
  110. package/dist/components/Image/Image.js.map +1 -0
  111. package/dist/components/Image/index.d.ts +1 -0
  112. package/dist/components/Image/index.js +5 -0
  113. package/dist/components/Image/index.js.map +1 -0
  114. package/dist/components/Link/Link.d.ts +32 -34
  115. package/dist/components/Link/Link.js +34 -22
  116. package/dist/components/Link/Link.js.map +1 -1
  117. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -2
  118. package/dist/components/LoadingSpinner/LoadingSpinner.js +5 -5
  119. package/dist/components/NumberField/NumberField.d.ts +25 -0
  120. package/dist/components/NumberField/NumberField.js +35 -0
  121. package/dist/components/NumberField/NumberField.js.map +1 -0
  122. package/dist/components/NumberField/index.d.ts +1 -0
  123. package/dist/components/NumberField/index.js +5 -0
  124. package/dist/components/NumberField/index.js.map +1 -0
  125. package/dist/components/Paragraph/Paragraph.d.ts +4 -4
  126. package/dist/components/Radio/Radio.js +3 -3
  127. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  128. package/dist/components/RadioGroup/RadioGroup.js +1 -2
  129. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  130. package/dist/components/Section/Section.d.ts +29 -0
  131. package/dist/components/Section/Section.js +103 -0
  132. package/dist/components/Section/Section.js.map +1 -0
  133. package/dist/components/Section/index.d.ts +1 -0
  134. package/dist/components/Section/index.js +5 -0
  135. package/dist/components/Section/index.js.map +1 -0
  136. package/dist/components/SubHeading/SubHeading.d.ts +1 -1
  137. package/dist/components/SubHeading/SubHeading.js +8 -8
  138. package/dist/components/Tag/Tag.d.ts +2 -2
  139. package/dist/components/Tag/Tag.js +4 -4
  140. package/dist/components/TagGroup/TagGroup.d.ts +2 -2
  141. package/dist/components/TagGroup/TagGroup.js +1 -1
  142. package/dist/components/TextAreaField/TextAreaField.d.ts +1 -1
  143. package/dist/components/TextAreaField/TextAreaField.js +6 -18
  144. package/dist/components/TextAreaField/TextAreaField.js.map +1 -1
  145. package/dist/components/TextField/TextField.d.ts +4 -31
  146. package/dist/components/TextField/TextField.js +7 -17
  147. package/dist/components/TextField/TextField.js.map +1 -1
  148. package/dist/components/ToggleButton/ToggleButton.js +6 -6
  149. package/dist/components/ToggleIconButton/ToggleIconButton.d.ts +9 -1
  150. package/dist/components/ToggleIconButton/ToggleIconButton.js +15 -8
  151. package/dist/components/ToggleIconButton/ToggleIconButton.js.map +1 -1
  152. package/dist/components/Tooltip/Tooltip.js +3 -3
  153. package/dist/components/_base/Field/Field.d.ts +16 -0
  154. package/dist/components/_base/Field/Field.js +32 -0
  155. package/dist/components/_base/Field/Field.js.map +1 -0
  156. package/dist/components/_base/Field/index.d.ts +2 -0
  157. package/dist/components/_base/Field/index.js +5 -0
  158. package/dist/components/_base/Field/index.js.map +1 -0
  159. package/dist/components/index.d.ts +7 -1
  160. package/dist/components/index.js +22 -10
  161. package/dist/components/index.js.map +1 -1
  162. package/dist/index.js +22 -10
  163. package/dist/index.js.map +1 -1
  164. package/dist/utils/backgroundColour/backgroundColour.d.ts +1 -1
  165. package/dist/utils/border/border.d.ts +3 -3
  166. package/dist/utils/fgColour/fgColor.d.ts +1 -1
  167. package/dist/utils/fgColour/fgColor.js +34 -34
  168. package/dist/utils/flex/flex.d.ts +2 -2
  169. package/dist/utils/flex/flex.js +3 -1
  170. package/dist/utils/flex/flex.js.map +1 -1
  171. package/dist/utils/focus/focusStyles.d.ts +1 -1
  172. package/dist/utils/focus/focusStyles.js +2 -2
  173. package/dist/utils/forms/formProps.d.ts +2 -0
  174. package/dist/utils/forms/formProps.js +2 -0
  175. package/dist/utils/forms/formProps.js.map +1 -0
  176. package/dist/utils/padding/padding.d.ts +7 -7
  177. package/dist/utils/padding/padding.js +271 -46
  178. package/dist/utils/padding/padding.js.map +1 -1
  179. package/dist/utils/spaceToken/spaceToken.d.ts +3 -0
  180. package/dist/utils/spaceToken/spaceToken.js +25 -0
  181. package/dist/utils/spaceToken/spaceToken.js.map +1 -0
  182. package/dist/utils/stories/iconPropsArgTypes.js +14 -13
  183. package/dist/utils/stories/iconPropsArgTypes.js.map +1 -1
  184. package/package.json +75 -19
  185. package/dist/assets/NewButton.css +0 -1
  186. package/dist/components/NewButton/NewButton.d.ts +0 -87
  187. package/dist/components/NewButton/NewButton.js +0 -189
  188. package/dist/components/NewButton/NewButton.js.map +0 -1
  189. package/dist/components/NewButton/index.d.ts +0 -1
  190. package/dist/components/NewButton/index.js +0 -5
  191. /package/dist/components/{NewButton → AviosCurrencySymbol}/index.js.map +0 -0
@@ -0,0 +1,5 @@
1
+ import { Image } from "./Image.js";
2
+ export {
3
+ Image as default
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,69 +1,67 @@
1
1
  import { LinkProps as AriaLinkProps } from 'react-aria-components';
2
2
  import { IconProps } from '../Icon/Icon';
3
3
  export interface LinkProps extends AriaLinkProps {
4
+ /**
5
+ * The children of the component. A function may be provided to alter the children based on component state.
6
+ */
7
+ children?: React.ReactNode | string;
4
8
  /**
5
9
  * What the size of the Link is
6
10
  * @default 'md'
7
11
  */
8
12
  size?: 'xs' | 'sm' | 'md' | 'lg';
9
- /**
10
- * Whether the icon should be at the end of the Link
11
- * @default true
12
- */
13
- iconEnd?: boolean;
14
- /**
15
- * The text to display in the Link
16
- */
17
- linkText?: string;
18
13
  /**
19
14
  * Whether the Link should be underlined
20
15
  * @default false
21
16
  */
22
17
  underline?: boolean;
23
18
  /**
24
- * The URL the Link will navigate to
19
+ * Whether the link is disabled.
20
+ * @default false
25
21
  */
26
- href?: string;
22
+ isDisabled?: boolean;
27
23
  /**
28
- * The target attribute for the Link
29
- * @default '_self'
24
+ * Whether an icon should display at the end of Link and icon properties
25
+ * @default { iconName: 'arrow-right' }
30
26
  */
31
- target?: string;
27
+ iconEndProps?: IconProps | false;
32
28
  /**
33
- * The relationship between the linked resource and the current page. See MDN.
29
+ * Whether an icon should display at the start of the Link and icon properties
34
30
  */
35
- rel?: string;
31
+ iconStartProps?: IconProps;
36
32
  /**
37
- * Causes the browser to download the linked URL. A string may be provided to suggest a file name. See MDN.
38
- * @default false
33
+ * The URL the Link will navigate to
39
34
  */
40
- download?: boolean | string;
35
+ href?: string;
41
36
  /**
42
- * Whether the link is disabled.
43
- * @default false
37
+ * The target attribute for the Link
38
+ * @default '_self'
44
39
  */
45
- isDisabled?: boolean;
40
+ target?: string;
46
41
  /**
47
- * Whether the element should receive focus on render.
48
- * @default false
42
+ * The label for the external link
43
+ * @default "open in new tab"
49
44
  */
50
- autoFocus?: boolean;
45
+ labelExternal?: string;
51
46
  /**
52
- * A space-separated list of URLs to ping when the link is followed. See MDN.
47
+ * The focus style of the button
53
48
  */
54
- ping?: string;
49
+ focusStyle?: 'default' | 'white';
55
50
  /**
56
- * The children of the component. A function may be provided to alter the children based on component state.
51
+ * Whether an icon should display at the End of the Link
52
+ * @deprecated Use iconEndProps instead
57
53
  */
58
- children?: React.ReactNode;
54
+ iconEnd?: boolean;
59
55
  /**
60
- * The focus style of the button
56
+ * Whether an icon should display at the End of the Link
57
+ * @deprecated Use iconEndProps instead
61
58
  */
62
- focusStyle?: 'default' | 'white';
59
+ iconProps?: IconProps;
63
60
  /**
64
- * Whether an icon should display at the start of the TextField
61
+ * The text to display in the Link
62
+ * @deprecated Use children instead
65
63
  */
66
- iconProps?: IconProps;
64
+ linkText?: string;
67
65
  }
68
- declare const Link: ({ size, iconEnd, underline, iconProps, linkText, href, target, rel, download, isDisabled, autoFocus, ping, focusStyle, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
66
+ declare const Link: ({ size, underline, iconStartProps, iconEndProps, iconProps, linkText, href, target, focusStyle, children, labelExternal, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
69
67
  export default Link;
@@ -3,21 +3,19 @@ import { Icon } from "../Icon/Icon.js";
3
3
  import { c as cva } from "../../index-Bi3v_EjJ.js";
4
4
  import { Link as Link$1 } from "react-aria-components";
5
5
  import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
6
- import '../../assets/Link.css';const link$1 = "_link_kftxp_1";
7
- const xs = "_xs_kftxp_9";
8
- const sm = "_sm_kftxp_15";
9
- const md = "_md_kftxp_21";
10
- const lg = "_lg_kftxp_27";
11
- const underline = "_underline_kftxp_58";
12
- const iconEnd = "_iconEnd_kftxp_75";
6
+ import '../../assets/Link.css';const link$1 = "_link_jskyb_1";
7
+ const xs = "_xs_jskyb_12";
8
+ const sm = "_sm_jskyb_18";
9
+ const md = "_md_jskyb_24";
10
+ const lg = "_lg_jskyb_30";
11
+ const underline = "_underline_jskyb_61";
13
12
  const styles = {
14
13
  link: link$1,
15
14
  xs,
16
15
  sm,
17
16
  md,
18
17
  lg,
19
- underline,
20
- iconEnd
18
+ underline
21
19
  };
22
20
  const link = cva(styles.link, {
23
21
  variants: {
@@ -34,41 +32,55 @@ const link = cva(styles.link, {
34
32
  iconEnd: {
35
33
  true: styles.iconEnd,
36
34
  false: ""
35
+ },
36
+ iconStart: {
37
+ true: styles.iconStart,
38
+ false: ""
37
39
  }
38
40
  },
39
41
  defaultVariants: {
40
42
  size: "md",
41
- underline: false,
42
- iconEnd: true
43
+ underline: false
43
44
  }
44
45
  });
45
46
  const Link = ({
46
47
  size = "md",
47
- iconEnd: iconEnd2 = true,
48
48
  underline: underline2 = true,
49
- iconProps = {
49
+ iconStartProps,
50
+ iconEndProps = {
50
51
  iconName: "arrow-right"
51
52
  },
53
+ iconProps,
54
+ // deprecated
52
55
  linkText,
53
56
  href,
54
57
  target = "_self",
55
- rel,
56
- download = false,
57
- isDisabled = false,
58
- autoFocus = false,
59
- ping,
60
58
  focusStyle = "default",
59
+ children,
60
+ labelExternal = "open in new tab",
61
61
  ...props
62
62
  }) => {
63
+ const finalIconEndProps = iconProps ?? // Use deprecated iconProps if provided
64
+ (iconEndProps === false ? void 0 : iconEndProps ?? {
65
+ iconName: "arrow-right"
66
+ });
67
+ const externalLinkProps = target === "_blank" ? {
68
+ rel: "noopener noreferrer",
69
+ "aria-label": labelExternal
70
+ } : {};
63
71
  return /* @__PURE__ */ jsxs(Link$1, { className: `${link({
64
72
  size,
65
- iconEnd: iconEnd2,
66
73
  underline: underline2
67
74
  })} ${focusStyleVariants({
68
75
  focusStyle
69
- })}`, href, target, rel, download, isDisabled, autoFocus, ping, ...props, children: [
70
- linkText,
71
- iconEnd2 && /* @__PURE__ */ jsx(Icon, { ...iconProps })
76
+ })}`, href, target, ...externalLinkProps, ...props, children: [
77
+ iconStartProps && /* @__PURE__ */ jsx(Icon, { className: link({
78
+ iconStart: !!iconStartProps
79
+ }), ...iconStartProps }),
80
+ children || linkText,
81
+ finalIconEndProps && /* @__PURE__ */ jsx(Icon, { className: link({
82
+ iconEnd: !!finalIconEndProps
83
+ }), ...finalIconEndProps })
72
84
  ] });
73
85
  };
74
86
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,11 +2,11 @@ export interface LoadingSpinnerProps {
2
2
  /**
3
3
  * What size loading spinner
4
4
  */
5
- size?: "xs" | "lg" | "sm" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x" | undefined;
5
+ size?: 'xs' | 'lg' | 'sm' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x' | undefined;
6
6
  /**
7
7
  * What size loading spinner
8
8
  */
9
- buttonSize?: "sm" | "md" | "lg" | undefined;
9
+ buttonSize?: 'sm' | 'md' | 'lg' | undefined;
10
10
  className?: string;
11
11
  }
12
12
  declare const LoadingSpinner: ({ size, buttonSize, className, }: LoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,15 +2,15 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { c as cva } from "../../index-Bi3v_EjJ.js";
3
3
  import { ProgressBar } from "react-aria-components";
4
4
  import { Icon } from "../Icon/Icon.js";
5
- import '../../assets/LoadingSpinner.css';const sm = "_sm_1643p_1";
6
- const md = "_md_1643p_5";
7
- const lg = "_lg_1643p_9";
5
+ import '../../assets/LoadingSpinner.css';const sm = "_sm_1tfp3_1";
6
+ const md = "_md_1tfp3_5";
7
+ const lg = "_lg_1tfp3_9";
8
8
  const styles = {
9
9
  sm,
10
10
  md,
11
11
  lg,
12
- "fa-spinner-third": "_fa-spinner-third_1643p_13",
13
- "icon-wrapper": "_icon-wrapper_1643p_18"
12
+ "fa-spinner-third": "_fa-spinner-third_1tfp3_13",
13
+ "icon-wrapper": "_icon-wrapper_1tfp3_18"
14
14
  };
15
15
  const loadingSpinner = cva(styles.loadingSpinner, {
16
16
  variants: {
@@ -0,0 +1,25 @@
1
+ import { NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
2
+ import { FieldProps } from '../_base/Field';
3
+ export interface NumberFieldProps extends FieldProps<AriaNumberFieldProps> {
4
+ /**
5
+ * The label for the increment button
6
+ * @default "Increase"
7
+ */
8
+ labelIncrement?: string;
9
+ /**
10
+ * The label for the decrement button
11
+ * @default "Decrease"
12
+ */
13
+ labelDecrement?: string;
14
+ /**
15
+ * The minimum value for the NumberField
16
+ *
17
+ */
18
+ minValue?: number;
19
+ /**
20
+ * The maximum value for the NumberField
21
+ */
22
+ maxValue?: number;
23
+ }
24
+ export declare const NumberField: ({ labelIncrement, labelDecrement, minValue, maxValue, isInvalid, isDisabled, ...props }: NumberFieldProps) => import("react/jsx-runtime").JSX.Element;
25
+ export default NumberField;
@@ -0,0 +1,35 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { NumberField as NumberField$1, Group, Button, Input } from "react-aria-components";
3
+ import { Icon } from "../Icon/Icon.js";
4
+ import { Tooltip } from "../Tooltip/Tooltip.js";
5
+ import { Field } from "../_base/Field/Field.js";
6
+ import '../../assets/NumberField.css';const numberField = "_numberField_1knmk_1";
7
+ const numberFieldGroup = "_numberFieldGroup_1knmk_6";
8
+ const numberFieldInput = "_numberFieldInput_1knmk_59";
9
+ const numberFieldButton = "_numberFieldButton_1knmk_60";
10
+ const styles = {
11
+ numberField,
12
+ numberFieldGroup,
13
+ numberFieldInput,
14
+ numberFieldButton
15
+ };
16
+ const NumberField = ({
17
+ labelIncrement = "Increase",
18
+ labelDecrement = "Decrease",
19
+ minValue,
20
+ maxValue,
21
+ isInvalid = false,
22
+ isDisabled = false,
23
+ ...props
24
+ }) => {
25
+ return /* @__PURE__ */ jsx(Field, { as: NumberField$1, className: styles.numberField, minValue, maxValue, isInvalid, isDisabled, ...props, children: /* @__PURE__ */ jsxs(Group, { className: styles.numberFieldGroup, children: [
26
+ /* @__PURE__ */ jsx(Tooltip, { placement: "bottom", label: labelDecrement, children: /* @__PURE__ */ jsx(Button, { className: styles.numberFieldButton, slot: "decrement", children: /* @__PURE__ */ jsx(Icon, { iconName: "minus" }) }) }),
27
+ /* @__PURE__ */ jsx(Input, { className: styles.numberFieldInput }),
28
+ /* @__PURE__ */ jsx(Tooltip, { placement: "bottom", label: labelIncrement, children: /* @__PURE__ */ jsx(Button, { className: styles.numberFieldButton, slot: "increment", children: /* @__PURE__ */ jsx(Icon, { iconName: "plus" }) }) })
29
+ ] }) });
30
+ };
31
+ export {
32
+ NumberField,
33
+ NumberField as default
34
+ };
35
+ //# sourceMappingURL=NumberField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberField.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ export { default } from './NumberField';
@@ -0,0 +1,5 @@
1
+ import { NumberField } from "./NumberField.js";
2
+ export {
3
+ NumberField as default
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -3,11 +3,11 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import { fgColorVariants } from '../../utils/fgColour/fgColor';
4
4
  declare const paragraph: (props?: ({
5
5
  size?: "lg" | "sm" | "xs" | "md" | null | undefined;
6
- textAlign?: "start" | "center" | "end" | null | undefined;
6
+ textAlign?: "end" | "start" | "center" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  type ParagraphVariants = VariantProps<typeof paragraph>;
9
9
  type FgColorVariants = VariantProps<typeof fgColorVariants>;
10
- type ParagraphSize = "xs" | "sm" | "md" | "lg";
10
+ type ParagraphSize = 'xs' | 'sm' | 'md' | 'lg';
11
11
  export interface ParagraphProps extends ParagraphVariants {
12
12
  children: React.ReactNode;
13
13
  /**
@@ -19,12 +19,12 @@ export interface ParagraphProps extends ParagraphVariants {
19
19
  * The foreground color of the paragraph
20
20
  * @default "secondary"
21
21
  */
22
- fgColor?: FgColorVariants["fgColor"];
22
+ fgColor?: FgColorVariants['fgColor'];
23
23
  /**
24
24
  * The text alignment of the paragraph
25
25
  * @default "start"
26
26
  */
27
- textAlign?: "start" | "center" | "end";
27
+ textAlign?: 'start' | 'center' | 'end';
28
28
  }
29
29
  export declare const Paragraph: ({ children, size, fgColor, textAlign, ...props }: ParagraphProps) => import("react/jsx-runtime").JSX.Element;
30
30
  export default Paragraph;
@@ -1,9 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Radio as Radio$1 } from "react-aria-components";
3
3
  import { c as cva } from "../../index-Bi3v_EjJ.js";
4
- import '../../assets/Radio.css';const radio$1 = "_radio_1qy5u_1";
5
- const defaultFocus = "_defaultFocus_1qy5u_41";
6
- const whiteFocus = "_whiteFocus_1qy5u_45";
4
+ import '../../assets/Radio.css';const radio$1 = "_radio_y39zj_1";
5
+ const defaultFocus = "_defaultFocus_y39zj_41";
6
+ const whiteFocus = "_whiteFocus_y39zj_45";
7
7
  const styles = {
8
8
  radio: radio$1,
9
9
  defaultFocus,
@@ -30,5 +30,5 @@ interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children'> {
30
30
  */
31
31
  isRequired?: boolean;
32
32
  }
33
- export declare const RadioGroup: ({ label, description, defaultValue, errorMessage, isDisabled, isInvalid, isRequired, children, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const RadioGroup: ({ label, description, errorMessage, isDisabled, isInvalid, isRequired, children, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
34
34
  export default RadioGroup;
@@ -1,14 +1,13 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { RadioGroup as RadioGroup$1 } from "react-aria-components";
3
3
  import { FieldHeader } from "../FieldHeader/FieldHeader.js";
4
- import '../../assets/RadioGroup.css';const radioGroup = "_radioGroup_18m1j_1";
4
+ import '../../assets/RadioGroup.css';const radioGroup = "_radioGroup_1yeix_1";
5
5
  const styles = {
6
6
  radioGroup
7
7
  };
8
8
  const RadioGroup = ({
9
9
  label,
10
10
  description,
11
- defaultValue,
12
11
  errorMessage,
13
12
  isDisabled,
14
13
  isInvalid,
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+ import { BackgroundVariants } from '../../utils/backgroundColour/backgroundColour';
3
+ import { PaddingVariants } from '../../utils/padding/padding';
4
+ type SectionPaddingValue = 'default' | PaddingVariants['paddingX'];
5
+ type SectionPadding = {
6
+ paddingX?: SectionPaddingValue;
7
+ paddingY?: SectionPaddingValue;
8
+ paddingTop?: SectionPaddingValue;
9
+ paddingRight?: SectionPaddingValue;
10
+ paddingBottom?: SectionPaddingValue;
11
+ paddingLeft?: SectionPaddingValue;
12
+ };
13
+ export interface SectionProps extends BackgroundVariants, SectionPadding {
14
+ children: React.ReactNode;
15
+ containerMaxWidth?: 'full-width' | 'page';
16
+ style?: React.CSSProperties;
17
+ className?: string;
18
+ }
19
+ interface ContainerProps {
20
+ children: React.ReactNode;
21
+ className?: string;
22
+ containerMaxWidth?: 'full-width' | 'page';
23
+ }
24
+ declare const Container: ({ children, className, containerMaxWidth, }: ContainerProps) => import("react/jsx-runtime").JSX.Element;
25
+ interface SectionComponent extends React.ForwardRefExoticComponent<SectionProps & React.RefAttributes<HTMLElement>> {
26
+ Container: typeof Container;
27
+ }
28
+ declare const Section: SectionComponent;
29
+ export default Section;
@@ -0,0 +1,103 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React, { forwardRef } from "react";
3
+ import { backgroundColorVariants } from "../../utils/backgroundColour/backgroundColour.js";
4
+ import { paddingVariants } from "../../utils/padding/padding.js";
5
+ import { c as cva } from "../../index-Bi3v_EjJ.js";
6
+ import '../../assets/Section.css';const section = "_section_1lo00_1";
7
+ const container = "_container_1lo00_8";
8
+ const pageWidth = "_pageWidth_1lo00_16";
9
+ const fullWidth = "_fullWidth_1lo00_20";
10
+ const paddingTopDefault = "_paddingTopDefault_1lo00_34";
11
+ const paddingRightDefault = "_paddingRightDefault_1lo00_38";
12
+ const paddingBottomDefault = "_paddingBottomDefault_1lo00_42";
13
+ const paddingLeftDefault = "_paddingLeftDefault_1lo00_46";
14
+ const styles = {
15
+ section,
16
+ container,
17
+ pageWidth,
18
+ fullWidth,
19
+ "paddingX-default": "_paddingX-default_1lo00_24",
20
+ "paddingY-default": "_paddingY-default_1lo00_29",
21
+ paddingTopDefault,
22
+ paddingRightDefault,
23
+ paddingBottomDefault,
24
+ paddingLeftDefault
25
+ };
26
+ const sectionPaddingVariants = cva("", {
27
+ variants: {
28
+ paddingX: {
29
+ default: styles["paddingX-default"]
30
+ },
31
+ paddingY: {
32
+ default: styles["paddingY-default"]
33
+ },
34
+ paddingTop: {
35
+ default: styles["paddingTopDefault"]
36
+ },
37
+ paddingRight: {
38
+ default: styles["paddingRightDefault"]
39
+ },
40
+ paddingBottom: {
41
+ default: styles["paddingBottomDefault"]
42
+ },
43
+ paddingLeft: {
44
+ default: styles["paddingLeftDefault"]
45
+ }
46
+ }
47
+ });
48
+ const Container = ({
49
+ children,
50
+ className,
51
+ containerMaxWidth = "page"
52
+ }) => /* @__PURE__ */ jsx("div", { className: `${styles.container} ${styles[`${containerMaxWidth}Width`]} ${className || ""}`, children });
53
+ const Section = forwardRef(({
54
+ children,
55
+ containerMaxWidth = "page",
56
+ backgroundColour,
57
+ paddingTop,
58
+ paddingBottom,
59
+ paddingLeft,
60
+ paddingRight,
61
+ paddingX,
62
+ paddingY = "default",
63
+ style,
64
+ className
65
+ }, ref) => {
66
+ return /* @__PURE__ */ jsx("section", { ref, className: `
67
+ ${styles.section}
68
+ ${paddingVariants({
69
+ paddingTop: paddingTop !== "default" ? paddingTop : void 0,
70
+ paddingBottom: paddingBottom !== "default" ? paddingBottom : void 0,
71
+ paddingLeft: paddingLeft !== "default" ? paddingLeft : void 0,
72
+ paddingRight: paddingRight !== "default" ? paddingRight : void 0,
73
+ paddingX: paddingX !== "default" ? paddingX : void 0,
74
+ paddingY: paddingY !== "default" ? paddingY : void 0
75
+ })}
76
+ ${sectionPaddingVariants({
77
+ paddingTop: paddingTop === "default" ? "default" : void 0,
78
+ paddingBottom: paddingBottom === "default" ? "default" : void 0,
79
+ paddingLeft: paddingLeft === "default" ? "default" : void 0,
80
+ paddingRight: paddingRight === "default" ? "default" : void 0,
81
+ paddingX: paddingX === "default" ? "default" : void 0,
82
+ paddingY: paddingY === "default" ? "default" : void 0
83
+ })}
84
+ ${backgroundColorVariants({
85
+ backgroundColour
86
+ })}
87
+ ${className || ""}
88
+ `.trim(), style, children: React.Children.map(children, (child) => {
89
+ if (React.isValidElement(child) && child.type === Container) {
90
+ return React.cloneElement(child, {
91
+ ...child.props,
92
+ containerMaxWidth
93
+ });
94
+ }
95
+ return child;
96
+ }) });
97
+ });
98
+ Section.displayName = "Section";
99
+ Section.Container = Container;
100
+ export {
101
+ Section as default
102
+ };
103
+ //# sourceMappingURL=Section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ export { default } from './Section';
@@ -0,0 +1,5 @@
1
+ import { default as default2 } from "./Section.js";
2
+ export {
3
+ default2 as default
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import { fgColorVariants } from '../../utils/fgColour/fgColor';
4
4
  declare const subHeading: (props?: ({
5
5
  size?: "sm" | "xs" | null | undefined;
6
- textAlign?: "start" | "center" | "end" | null | undefined;
6
+ textAlign?: "end" | "start" | "center" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  type HeadingVariants = VariantProps<typeof subHeading>;
9
9
  type FgColorVariants = VariantProps<typeof fgColorVariants>;
@@ -1,12 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c as cva } from "../../index-Bi3v_EjJ.js";
3
3
  import { fgColorVariants } from "../../utils/fgColour/fgColor.js";
4
- import '../../assets/SubHeading.css';const subHeading$1 = "_subHeading_qng6l_1";
5
- const xs = "_xs_qng6l_8";
6
- const sm = "_sm_qng6l_15";
7
- const start = "_start_qng6l_22";
8
- const center = "_center_qng6l_26";
9
- const end = "_end_qng6l_30";
4
+ import '../../assets/SubHeading.css';const subHeading$1 = "_subHeading_up5r4_1";
5
+ const xs = "_xs_up5r4_8";
6
+ const sm = "_sm_up5r4_15";
7
+ const start = "_start_up5r4_22";
8
+ const center = "_center_up5r4_26";
9
+ const end = "_end_up5r4_30";
10
10
  const styles = {
11
11
  subHeading: subHeading$1,
12
12
  xs,
@@ -18,8 +18,8 @@ const styles = {
18
18
  const subHeading = cva(styles.subHeading, {
19
19
  variants: {
20
20
  size: {
21
- "xs": styles.xs,
22
- "sm": styles.sm
21
+ xs: styles.xs,
22
+ sm: styles.sm
23
23
  },
24
24
  textAlign: {
25
25
  start: styles.start,
@@ -26,10 +26,10 @@ export interface TagProps extends AriaTagProps {
26
26
  /**
27
27
  * Whether the tag is removable
28
28
  */
29
- isRemovable?: boolean; /**
29
+ isRemovable?: boolean /**
30
30
  /**
31
31
  * The focus style of the button
32
- */
32
+ */;
33
33
  focusStyle?: 'default' | 'white';
34
34
  }
35
35
  export declare const Tag: ({ children, id, leadingIconProps, isDisabled, isRemovable, focusStyle, ...props }: TagProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,9 +3,9 @@ import { Tag as Tag$1 } from "react-aria-components";
3
3
  import { Icon } from "../Icon/Icon.js";
4
4
  import { IconButton } from "../IconButton/IconButton.js";
5
5
  import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
6
- import '../../assets/Tag.css';const tag = "_tag_15o1i_1";
7
- const isRemovable = "_isRemovable_15o1i_21";
8
- const iconWrapper = "_iconWrapper_15o1i_121";
6
+ import '../../assets/Tag.css';const tag = "_tag_ob7tq_1";
7
+ const isRemovable = "_isRemovable_ob7tq_21";
8
+ const iconWrapper = "_iconWrapper_ob7tq_123";
9
9
  const styles = {
10
10
  tag,
11
11
  isRemovable,
@@ -20,7 +20,7 @@ const Tag = ({
20
20
  focusStyle = "default",
21
21
  ...props
22
22
  }) => {
23
- let textValue = typeof children === "string" ? children : void 0;
23
+ const textValue = typeof children === "string" ? children : void 0;
24
24
  return /* @__PURE__ */ jsxs(Tag$1, { className: `${styles.tag} ${isRemovable2 ? styles.isRemovable : ""} ${focusStyleVariants({
25
25
  focusStyle
26
26
  })}`, isDisabled, id: id == null ? void 0 : id.toString(), textValue, ...props, children: [
@@ -1,8 +1,8 @@
1
1
  import { TagGroupProps as AriaTagGroupProps, PressEvent, TagListProps } from 'react-aria-components';
2
- export interface TagGroupProps<T> extends Omit<AriaTagGroupProps, "children">, Pick<TagListProps<T>, "items" | "children" | "renderEmptyState"> {
2
+ export interface TagGroupProps<T> extends Omit<AriaTagGroupProps, 'children'>, Pick<TagListProps<T>, 'items' | 'children' | 'renderEmptyState'> {
3
3
  label?: string;
4
4
  description?: string;
5
- selectionMode?: "single" | "multiple";
5
+ selectionMode?: 'single' | 'multiple';
6
6
  clearButton?: boolean;
7
7
  clearButtonOnClick?: (e: PressEvent) => void;
8
8
  }