@alto-avios/alto-ui 2.3.2 → 2.4.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 (108) hide show
  1. package/README.md +20 -9
  2. package/dist/assets/Badge.css +1 -1
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/ButtonGroup.css +1 -1
  5. package/dist/assets/CardSection.css +1 -1
  6. package/dist/assets/Checkbox.css +1 -1
  7. package/dist/assets/CheckboxGroup.css +1 -1
  8. package/dist/assets/ClearFieldButton.css +1 -1
  9. package/dist/assets/DateField.css +1 -1
  10. package/dist/assets/Eyebrow.css +1 -1
  11. package/dist/assets/FieldDescription.css +1 -1
  12. package/dist/assets/FieldError.css +1 -1
  13. package/dist/assets/FieldHeader.css +1 -1
  14. package/dist/assets/FieldLabel.css +1 -1
  15. package/dist/assets/Grid.css +1 -1
  16. package/dist/assets/Heading.css +1 -1
  17. package/dist/assets/IconButton.css +1 -1
  18. package/dist/assets/Link.css +1 -1
  19. package/dist/assets/LoadingSpinner.css +1 -1
  20. package/dist/assets/NewButton.css +1 -1
  21. package/dist/assets/NumberField.css +1 -0
  22. package/dist/assets/Radio.css +1 -1
  23. package/dist/assets/RadioGroup.css +1 -1
  24. package/dist/assets/Section.css +1 -0
  25. package/dist/assets/SubHeading.css +1 -1
  26. package/dist/assets/Tag.css +1 -1
  27. package/dist/assets/TextAreaField.css +1 -1
  28. package/dist/assets/ToggleButton.css +1 -1
  29. package/dist/assets/ToggleIconButton.css +1 -1
  30. package/dist/assets/Tooltip.css +1 -1
  31. package/dist/assets/fgColor.css +1 -1
  32. package/dist/assets/focusStyles.css +1 -1
  33. package/dist/assets/padding.css +1 -1
  34. package/dist/components/Badge/Badge.js +11 -11
  35. package/dist/components/Box/Box.d.ts +2 -2
  36. package/dist/components/Button/Button.js +23 -23
  37. package/dist/components/ButtonGroup/ButtonGroup.js +8 -8
  38. package/dist/components/CardSection/CardSection.js +7 -7
  39. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  40. package/dist/components/Checkbox/Checkbox.js +11 -9
  41. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  42. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +12 -12
  43. package/dist/components/CheckboxGroup/CheckboxGroup.js +3 -3
  44. package/dist/components/ClearFieldButton/ClearFieldButton.d.ts +1 -1
  45. package/dist/components/ClearFieldButton/ClearFieldButton.js +4 -4
  46. package/dist/components/DateField/DateField.js +3 -3
  47. package/dist/components/DestinationHeading/DestinationHeading.d.ts +1 -1
  48. package/dist/components/Eyebrow/Eyebrow.js +5 -5
  49. package/dist/components/FieldDescription/FieldDescription.js +1 -1
  50. package/dist/components/FieldError/FieldError.js +1 -1
  51. package/dist/components/FieldHeader/FieldHeader.d.ts +2 -1
  52. package/dist/components/FieldHeader/FieldHeader.js +5 -4
  53. package/dist/components/FieldHeader/FieldHeader.js.map +1 -1
  54. package/dist/components/FieldLabel/FieldLabel.d.ts +1 -1
  55. package/dist/components/FieldLabel/FieldLabel.js +1 -2
  56. package/dist/components/FieldLabel/FieldLabel.js.map +1 -1
  57. package/dist/components/Grid/Grid.d.ts +35 -16
  58. package/dist/components/Grid/Grid.js +63 -30
  59. package/dist/components/Grid/Grid.js.map +1 -1
  60. package/dist/components/Heading/Heading.js +16 -16
  61. package/dist/components/Icon/Icon.d.ts +4 -4
  62. package/dist/components/Icon/Icon.js +1 -0
  63. package/dist/components/Icon/Icon.js.map +1 -1
  64. package/dist/components/IconButton/IconButton.js +22 -22
  65. package/dist/components/Link/Link.js +7 -7
  66. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -2
  67. package/dist/components/LoadingSpinner/LoadingSpinner.js +5 -5
  68. package/dist/components/NewButton/NewButton.js +28 -28
  69. package/dist/components/NumberField/NumberField.d.ts +55 -0
  70. package/dist/components/NumberField/NumberField.js +43 -0
  71. package/dist/components/NumberField/NumberField.js.map +1 -0
  72. package/dist/components/NumberField/index.d.ts +1 -0
  73. package/dist/components/NumberField/index.js +5 -0
  74. package/dist/components/NumberField/index.js.map +1 -0
  75. package/dist/components/Paragraph/Paragraph.d.ts +3 -3
  76. package/dist/components/Radio/Radio.js +3 -3
  77. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  78. package/dist/components/RadioGroup/RadioGroup.js +1 -2
  79. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  80. package/dist/components/Section/Section.d.ts +29 -0
  81. package/dist/components/Section/Section.js +103 -0
  82. package/dist/components/Section/Section.js.map +1 -0
  83. package/dist/components/Section/index.d.ts +1 -0
  84. package/dist/components/Section/index.js +5 -0
  85. package/dist/components/Section/index.js.map +1 -0
  86. package/dist/components/SubHeading/SubHeading.js +8 -8
  87. package/dist/components/Tag/Tag.d.ts +2 -2
  88. package/dist/components/Tag/Tag.js +4 -4
  89. package/dist/components/TagGroup/TagGroup.d.ts +2 -2
  90. package/dist/components/TextAreaField/TextAreaField.js +2 -2
  91. package/dist/components/ToggleButton/ToggleButton.js +6 -6
  92. package/dist/components/ToggleIconButton/ToggleIconButton.js +6 -6
  93. package/dist/components/Tooltip/Tooltip.js +2 -2
  94. package/dist/components/index.d.ts +3 -0
  95. package/dist/components/index.js +10 -4
  96. package/dist/components/index.js.map +1 -1
  97. package/dist/index.js +10 -4
  98. package/dist/index.js.map +1 -1
  99. package/dist/utils/backgroundColour/backgroundColour.d.ts +1 -1
  100. package/dist/utils/fgColour/fgColor.js +34 -34
  101. package/dist/utils/focus/focusStyles.js +2 -2
  102. package/dist/utils/padding/padding.d.ts +7 -7
  103. package/dist/utils/padding/padding.js +271 -46
  104. package/dist/utils/padding/padding.js.map +1 -1
  105. package/dist/utils/spaceToken/spaceToken.d.ts +3 -0
  106. package/dist/utils/spaceToken/spaceToken.js +25 -0
  107. package/dist/utils/spaceToken/spaceToken.js.map +1 -0
  108. package/package.json +43 -6
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Grid.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,16 +1,16 @@
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/Heading.css';const heading$1 = "_heading_12ps7_1";
5
- const xxs = "_xxs_12ps7_8";
6
- const xs = "_xs_12ps7_15";
7
- const sm = "_sm_12ps7_22";
8
- const md = "_md_12ps7_29";
9
- const lg = "_lg_12ps7_36";
10
- const xl = "_xl_12ps7_43";
11
- const start = "_start_12ps7_50";
12
- const center = "_center_12ps7_54";
13
- const end = "_end_12ps7_58";
4
+ import '../../assets/Heading.css';const heading$1 = "_heading_15puj_1";
5
+ const xxs = "_xxs_15puj_8";
6
+ const xs = "_xs_15puj_15";
7
+ const sm = "_sm_15puj_22";
8
+ const md = "_md_15puj_29";
9
+ const lg = "_lg_15puj_36";
10
+ const xl = "_xl_15puj_43";
11
+ const start = "_start_15puj_50";
12
+ const center = "_center_15puj_54";
13
+ const end = "_end_15puj_58";
14
14
  const styles = {
15
15
  heading: heading$1,
16
16
  xxs,
@@ -26,12 +26,12 @@ const styles = {
26
26
  const heading = cva(styles.heading, {
27
27
  variants: {
28
28
  size: {
29
- "xxs": styles.xxs,
30
- "xs": styles.xs,
31
- "sm": styles.sm,
32
- "md": styles.md,
33
- "lg": styles.lg,
34
- "xl": styles.xl
29
+ xxs: styles.xxs,
30
+ xs: styles.xs,
31
+ sm: styles.sm,
32
+ md: styles.md,
33
+ lg: styles.lg,
34
+ xl: styles.xl
35
35
  },
36
36
  textAlign: {
37
37
  start: styles.start,
@@ -16,7 +16,7 @@ export interface IconProps {
16
16
  /**
17
17
  * Flip the icon horizontally, vertically, or both.
18
18
  */
19
- flip?: "horizontal" | "vertical" | "both";
19
+ flip?: 'horizontal' | 'vertical' | 'both';
20
20
  /**
21
21
  * Whether the icon should be displayed with a fixed width.
22
22
  */
@@ -46,9 +46,9 @@ export interface IconProps {
46
46
  */
47
47
  className?: string;
48
48
  /**
49
- * Whether the icon is purely decorative and should be hidden from screen readers.
50
- * @default false
51
- */
49
+ * Whether the icon is purely decorative and should be hidden from screen readers.
50
+ * @default false
51
+ */
52
52
  isDecorative?: boolean;
53
53
  /**
54
54
  * Accessible text for the icon. If the icon is decorative, this can be omitted.
@@ -10,6 +10,7 @@ const Icon = ({
10
10
  border,
11
11
  rotation,
12
12
  pull,
13
+ // eslint-disable-next-line react/prop-types
13
14
  spin,
14
15
  className,
15
16
  ariaLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,26 +5,26 @@ 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
- import '../../assets/IconButton.css';const iconButton$1 = "_iconButton_104jb_1";
9
- const sm = "_sm_104jb_24";
10
- const md = "_md_104jb_30";
11
- const lg = "_lg_104jb_36";
12
- const accentPrimary = "_accentPrimary_104jb_46";
13
- const accentSecondary = "_accentSecondary_104jb_69";
14
- const accentTertiary = "_accentTertiary_104jb_96";
15
- const accentQuaternary = "_accentQuaternary_104jb_125";
16
- const criticalPrimary = "_criticalPrimary_104jb_149";
17
- const criticalSecondary = "_criticalSecondary_104jb_173";
18
- const criticalTertiary = "_criticalTertiary_104jb_200";
19
- const criticalQuaternary = "_criticalQuaternary_104jb_225";
20
- const neutralPrimary = "_neutralPrimary_104jb_250";
21
- const neutralSecondary = "_neutralSecondary_104jb_274";
22
- const neutralTertiary = "_neutralTertiary_104jb_299";
23
- const neutralQuaternary = "_neutralQuaternary_104jb_324";
24
- const whitePrimary = "_whitePrimary_104jb_350";
25
- const whiteSecondary = "_whiteSecondary_104jb_379";
26
- const whiteTertiary = "_whiteTertiary_104jb_409";
27
- const whiteQuaternary = "_whiteQuaternary_104jb_438";
8
+ import '../../assets/IconButton.css';const iconButton$1 = "_iconButton_by3pb_1";
9
+ const sm = "_sm_by3pb_24";
10
+ const md = "_md_by3pb_30";
11
+ const lg = "_lg_by3pb_36";
12
+ const accentPrimary = "_accentPrimary_by3pb_46";
13
+ const accentSecondary = "_accentSecondary_by3pb_69";
14
+ const accentTertiary = "_accentTertiary_by3pb_98";
15
+ const accentQuaternary = "_accentQuaternary_by3pb_127";
16
+ const criticalPrimary = "_criticalPrimary_by3pb_151";
17
+ const criticalSecondary = "_criticalSecondary_by3pb_175";
18
+ const criticalTertiary = "_criticalTertiary_by3pb_204";
19
+ const criticalQuaternary = "_criticalQuaternary_by3pb_229";
20
+ const neutralPrimary = "_neutralPrimary_by3pb_254";
21
+ const neutralSecondary = "_neutralSecondary_by3pb_278";
22
+ const neutralTertiary = "_neutralTertiary_by3pb_305";
23
+ const neutralQuaternary = "_neutralQuaternary_by3pb_330";
24
+ const whitePrimary = "_whitePrimary_by3pb_356";
25
+ const whiteSecondary = "_whiteSecondary_by3pb_385";
26
+ const whiteTertiary = "_whiteTertiary_by3pb_416";
27
+ const whiteQuaternary = "_whiteQuaternary_by3pb_445";
28
28
  const styles = {
29
29
  iconButton: iconButton$1,
30
30
  sm,
@@ -46,8 +46,8 @@ const styles = {
46
46
  whiteSecondary,
47
47
  whiteTertiary,
48
48
  whiteQuaternary,
49
- "fa-spinner-third": "_fa-spinner-third_104jb_469",
50
- "icon-wrapper": "_icon-wrapper_104jb_474"
49
+ "fa-spinner-third": "_fa-spinner-third_by3pb_476",
50
+ "icon-wrapper": "_icon-wrapper_by3pb_481"
51
51
  };
52
52
  const iconButton = cva(styles.iconButton, {
53
53
  variants: {
@@ -3,13 +3,13 @@ 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_4ndec_1";
7
+ const xs = "_xs_4ndec_9";
8
+ const sm = "_sm_4ndec_15";
9
+ const md = "_md_4ndec_21";
10
+ const lg = "_lg_4ndec_27";
11
+ const underline = "_underline_4ndec_58";
12
+ const iconEnd = "_iconEnd_4ndec_75";
13
13
  const styles = {
14
14
  link: link$1,
15
15
  xs,
@@ -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: {
@@ -5,32 +5,32 @@ import { useButton } from "@react-aria/button";
5
5
  import { Icon } from "../Icon/Icon.js";
6
6
  import LoadingSpinner from "../LoadingSpinner/LoadingSpinner.js";
7
7
  import { focusStyleVariants } from "../../utils/focus/focusStyles.js";
8
- import '../../assets/NewButton.css';const newButton$1 = "_newButton_1ajlh_1";
9
- const content = "_content_1ajlh_23";
10
- const isNotLoading = "_isNotLoading_1ajlh_31";
11
- const loadingSpinner = "_loadingSpinner_1ajlh_31";
12
- const isLoading = "_isLoading_1ajlh_40";
13
- const focusWhite = "_focusWhite_1ajlh_52";
14
- const sm = "_sm_1ajlh_59";
15
- const md = "_md_1ajlh_64";
16
- const lg = "_lg_1ajlh_69";
17
- const fullWidth = "_fullWidth_1ajlh_74";
18
- const accentPrimary = "_accentPrimary_1ajlh_82";
19
- const accentSecondary = "_accentSecondary_1ajlh_101";
20
- const accentTertiary = "_accentTertiary_1ajlh_128";
21
- const accentQuaternary = "_accentQuaternary_1ajlh_153";
22
- const criticalPrimary = "_criticalPrimary_1ajlh_177";
23
- const criticalSecondary = "_criticalSecondary_1ajlh_201";
24
- const criticalTertiary = "_criticalTertiary_1ajlh_228";
25
- const criticalQuaternary = "_criticalQuaternary_1ajlh_253";
26
- const neutralPrimary = "_neutralPrimary_1ajlh_278";
27
- const neutralSecondary = "_neutralSecondary_1ajlh_302";
28
- const neutralTertiary = "_neutralTertiary_1ajlh_327";
29
- const neutralQuaternary = "_neutralQuaternary_1ajlh_352";
30
- const whitePrimary = "_whitePrimary_1ajlh_378";
31
- const whiteSecondary = "_whiteSecondary_1ajlh_403";
32
- const whiteTertiary = "_whiteTertiary_1ajlh_433";
33
- const whiteQuaternary = "_whiteQuaternary_1ajlh_462";
8
+ import '../../assets/NewButton.css';const newButton$1 = "_newButton_jfgy8_1";
9
+ const content = "_content_jfgy8_23";
10
+ const isNotLoading = "_isNotLoading_jfgy8_31";
11
+ const loadingSpinner = "_loadingSpinner_jfgy8_31";
12
+ const isLoading = "_isLoading_jfgy8_40";
13
+ const focusWhite = "_focusWhite_jfgy8_52";
14
+ const sm = "_sm_jfgy8_59";
15
+ const md = "_md_jfgy8_64";
16
+ const lg = "_lg_jfgy8_69";
17
+ const fullWidth = "_fullWidth_jfgy8_74";
18
+ const accentPrimary = "_accentPrimary_jfgy8_82";
19
+ const accentSecondary = "_accentSecondary_jfgy8_102";
20
+ const accentTertiary = "_accentTertiary_jfgy8_132";
21
+ const accentQuaternary = "_accentQuaternary_jfgy8_158";
22
+ const criticalPrimary = "_criticalPrimary_jfgy8_183";
23
+ const criticalSecondary = "_criticalSecondary_jfgy8_208";
24
+ const criticalTertiary = "_criticalTertiary_jfgy8_238";
25
+ const criticalQuaternary = "_criticalQuaternary_jfgy8_264";
26
+ const neutralPrimary = "_neutralPrimary_jfgy8_291";
27
+ const neutralSecondary = "_neutralSecondary_jfgy8_316";
28
+ const neutralTertiary = "_neutralTertiary_jfgy8_345";
29
+ const neutralQuaternary = "_neutralQuaternary_jfgy8_371";
30
+ const whitePrimary = "_whitePrimary_jfgy8_398";
31
+ const whiteSecondary = "_whiteSecondary_jfgy8_424";
32
+ const whiteTertiary = "_whiteTertiary_jfgy8_457";
33
+ const whiteQuaternary = "_whiteQuaternary_jfgy8_487";
34
34
  const styles = {
35
35
  newButton: newButton$1,
36
36
  content,
@@ -58,8 +58,8 @@ const styles = {
58
58
  whiteSecondary,
59
59
  whiteTertiary,
60
60
  whiteQuaternary,
61
- "fa-spinner-third": "_fa-spinner-third_1ajlh_493",
62
- "icon-wrapper": "_icon-wrapper_1ajlh_498"
61
+ "fa-spinner-third": "_fa-spinner-third_jfgy8_519",
62
+ "icon-wrapper": "_icon-wrapper_jfgy8_524"
63
63
  };
64
64
  const newButton = cva(styles.newButton, {
65
65
  variants: {
@@ -0,0 +1,55 @@
1
+ import { ValidationResult, NumberFieldProps as AriaNumberFieldProps } from 'react-aria-components';
2
+ export interface NumberFieldProps extends AriaNumberFieldProps {
3
+ /**
4
+ * The label for the NumberField
5
+ */
6
+ label?: string;
7
+ /**
8
+ * The label for the increment button
9
+ * @default "Increase"
10
+ */
11
+ labelIncrement?: string;
12
+ /**
13
+ * The label for the decrement button
14
+ * @default "Decrease"
15
+ */
16
+ labelDecrement?: string;
17
+ /**
18
+ * The description for the NumberField
19
+ */
20
+ description?: string;
21
+ /**
22
+ * The minimum value for the NumberField
23
+ *
24
+ */
25
+ minValue?: number;
26
+ /**
27
+ * The maximum value for the NumberField
28
+ */
29
+ maxValue?: number;
30
+ /**
31
+ * Whether the NumberField is disabled
32
+ * @default false
33
+ */
34
+ isDisabled?: boolean;
35
+ /**
36
+ * The error message for the NumberField
37
+ */
38
+ errorMessage?: string | ((validation: ValidationResult) => string);
39
+ /**
40
+ * The default value for the NumberField
41
+ */
42
+ defaultValue?: number;
43
+ /**
44
+ * Whether the NumberField is invalid
45
+ * @default false
46
+ */
47
+ isInvalid?: boolean;
48
+ /**
49
+ * Whether the NumberField is required
50
+ * @default false
51
+ */
52
+ isRequired?: boolean;
53
+ }
54
+ export declare const NumberField: ({ label, labelIncrement, labelDecrement, description, defaultValue, minValue, maxValue, isInvalid, isDisabled, isRequired, errorMessage, ...props }: NumberFieldProps) => import("react/jsx-runtime").JSX.Element;
55
+ export default NumberField;
@@ -0,0 +1,43 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { NumberField as NumberField$1, Group, Button, Input } from "react-aria-components";
3
+ import { FieldHeader } from "../FieldHeader/FieldHeader.js";
4
+ import { Icon } from "../Icon/Icon.js";
5
+ import { Tooltip } from "../Tooltip/Tooltip.js";
6
+ import '../../assets/NumberField.css';const numberField = "_numberField_htvlg_1";
7
+ const numberFieldGroup = "_numberFieldGroup_htvlg_6";
8
+ const numberFieldInput = "_numberFieldInput_htvlg_59";
9
+ const numberFieldButton = "_numberFieldButton_htvlg_60";
10
+ const styles = {
11
+ numberField,
12
+ numberFieldGroup,
13
+ numberFieldInput,
14
+ numberFieldButton
15
+ };
16
+ const NumberField = ({
17
+ label,
18
+ labelIncrement = "Increase",
19
+ labelDecrement = "Decrease",
20
+ description,
21
+ defaultValue,
22
+ minValue,
23
+ maxValue,
24
+ isInvalid = false,
25
+ isDisabled = false,
26
+ isRequired = false,
27
+ errorMessage,
28
+ ...props
29
+ }) => {
30
+ return /* @__PURE__ */ jsxs(NumberField$1, { className: styles.numberField, defaultValue, minValue, maxValue, isInvalid, isDisabled, ...props, children: [
31
+ label ? /* @__PURE__ */ jsx(FieldHeader, { label, description, isInvalid, isRequired, errorMessage }) : null,
32
+ /* @__PURE__ */ jsxs(Group, { className: styles.numberFieldGroup, children: [
33
+ /* @__PURE__ */ jsx(Tooltip, { placement: "bottom", label: labelDecrement, children: /* @__PURE__ */ jsx(Button, { className: styles.numberFieldButton, slot: "decrement", children: /* @__PURE__ */ jsx(Icon, { iconName: "minus" }) }) }),
34
+ /* @__PURE__ */ jsx(Input, { className: styles.numberFieldInput }),
35
+ /* @__PURE__ */ jsx(Tooltip, { placement: "bottom", label: labelIncrement, children: /* @__PURE__ */ jsx(Button, { className: styles.numberFieldButton, slot: "increment", children: /* @__PURE__ */ jsx(Icon, { iconName: "plus" }) }) })
36
+ ] })
37
+ ] });
38
+ };
39
+ export {
40
+ NumberField,
41
+ NumberField as default
42
+ };
43
+ //# 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":";"}
@@ -7,7 +7,7 @@ declare const paragraph: (props?: ({
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_dk7qx_1";
7
+ const container = "_container_dk7qx_8";
8
+ const pageWidth = "_pageWidth_dk7qx_16";
9
+ const fullWidth = "_fullWidth_dk7qx_20";
10
+ const paddingTopDefault = "_paddingTopDefault_dk7qx_34";
11
+ const paddingRightDefault = "_paddingRightDefault_dk7qx_38";
12
+ const paddingBottomDefault = "_paddingBottomDefault_dk7qx_42";
13
+ const paddingLeftDefault = "_paddingLeftDefault_dk7qx_46";
14
+ const styles = {
15
+ section,
16
+ container,
17
+ pageWidth,
18
+ fullWidth,
19
+ "paddingX-default": "_paddingX-default_dk7qx_24",
20
+ "paddingY-default": "_paddingY-default_dk7qx_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 = "default",
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":";"}
@@ -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,