@coopdigital/react 1.24.0 → 1.25.1

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.
@@ -10,7 +10,7 @@ export interface AlertBannerProps extends HTMLAttributes<HTMLDivElement> {
10
10
  /** Specify a custom React ref for this component. */
11
11
  ref?: Ref<HTMLDivElement>;
12
12
  /** Specify the component variant. */
13
- variant?: "black" | "default";
13
+ variant?: "black" | "grey" | "default";
14
14
  }
15
15
  interface AlertBannerHeadingProps extends HTMLAttributes<HTMLHeadingElement> {
16
16
  /** Content inside the component. */
@@ -1,4 +1,3 @@
1
- import { StandardSizes } from "../../types/index.js";
2
1
  import { ErrorProps } from "../FieldMarkers/Error.js";
3
2
  import { HintProps } from "../FieldMarkers/Hint.js";
4
3
  import { LegendProps } from "../FieldMarkers/Legend.js";
@@ -19,11 +18,9 @@ export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElemen
19
18
  hideErrorBar?: boolean;
20
19
  /** Specify a custom React ref for this component. */
21
20
  ref?: Ref<HTMLFieldSetElement>;
22
- /** Specify the size of the component. Applies to all descendants. */
23
- size?: StandardSizes;
24
21
  }
25
22
  declare const Fieldset: {
26
- ({ children, className, disabled, error, hideErrorBar, ref, size, ...props }: FieldsetProps): JSX.Element;
23
+ ({ children, className, disabled, error, hideErrorBar, ref, ...props }: FieldsetProps): JSX.Element;
27
24
  slot: {
28
25
  name: string;
29
26
  };
@@ -34,7 +31,7 @@ declare const Fieldset: {
34
31
  };
35
32
  };
36
33
  Fields: {
37
- ({ boxed, children, className, orientation, ...props }: FieldsetFieldsProps): JSX.Element;
34
+ ({ children, className, orientation, ...props }: FieldsetFieldsProps): JSX.Element;
38
35
  slot: {
39
36
  name: string;
40
37
  };
@@ -53,8 +50,6 @@ declare const Fieldset: {
53
50
  };
54
51
  };
55
52
  interface FieldsetFieldsProps extends HTMLAttributes<HTMLDivElement> {
56
- /** Specify whether all descendant Fields should render inside a box. */
57
- boxed?: boolean;
58
53
  /** Content inside the component. */
59
54
  children?: React.ReactNode;
60
55
  /** Specify additional CSS classes. */
@@ -63,7 +58,7 @@ interface FieldsetFieldsProps extends HTMLAttributes<HTMLDivElement> {
63
58
  orientation?: "horizontal" | "vertical";
64
59
  }
65
60
  declare const FieldsetFields: {
66
- ({ boxed, children, className, orientation, ...props }: FieldsetFieldsProps): JSX.Element;
61
+ ({ children, className, orientation, ...props }: FieldsetFieldsProps): JSX.Element;
67
62
  slot: {
68
63
  name: string;
69
64
  };
@@ -4,13 +4,12 @@ import { Legend } from "../FieldMarkers/Legend.js";
4
4
  import clsx from "clsx";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/Fieldset/Fieldset.tsx
7
- const Fieldset = ({ children, className, disabled, error = false, hideErrorBar = false, ref, size, ...props }) => {
7
+ const Fieldset = ({ children, className, disabled, error = false, hideErrorBar = false, ref, ...props }) => {
8
8
  const componentProps = {
9
9
  "aria-disabled": disabled,
10
10
  className: clsx("coop-fieldset", className),
11
11
  "data-error": error || void 0,
12
12
  "data-hide-error": hideErrorBar || void 0,
13
- "data-size": size ?? void 0,
14
13
  disabled,
15
14
  ...props
16
15
  };
@@ -20,10 +19,9 @@ const Fieldset = ({ children, className, disabled, error = false, hideErrorBar =
20
19
  children
21
20
  });
22
21
  };
23
- const FieldsetFields = ({ boxed = false, children, className, orientation = "vertical", ...props }) => {
22
+ const FieldsetFields = ({ children, className, orientation = "vertical", ...props }) => {
24
23
  const componentProps = {
25
24
  className: clsx("coop-fieldset-fields", className),
26
- "data-boxed": boxed || void 0,
27
25
  "data-orientation": orientation !== "vertical" ? orientation : void 0,
28
26
  ...props
29
27
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coopdigital/react",
3
3
  "type": "module",
4
- "version": "1.24.0",
4
+ "version": "1.25.1",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -71,6 +71,7 @@
71
71
  "@playwright/test": "^1.63.0",
72
72
  "@storybook/addon-a11y": "^10.6.0",
73
73
  "@storybook/addon-docs": "^10.6.0",
74
+ "@storybook/addon-links": "^10.6.0",
74
75
  "@storybook/addon-onboarding": "^10.6.0",
75
76
  "@storybook/react-vite": "^10.6.0",
76
77
  "@testing-library/jest-dom": "^7.0.1",
@@ -106,7 +107,7 @@
106
107
  "storybook": "$storybook"
107
108
  },
108
109
  "dependencies": {
109
- "@coopdigital/styles": "^1.17.0",
110
+ "@coopdigital/styles": "^1.18.0",
110
111
  "@radix-ui/react-popover": "^1.1.23",
111
112
  "clsx": "^2.1.1",
112
113
  "date-fns": "^4.4.0",
@@ -115,5 +116,5 @@
115
116
  "merge-refs": "^2.0.0",
116
117
  "react-day-picker": "^10.0.1"
117
118
  },
118
- "gitHead": "74c62ece6c7a4f0770bf52b466ccd98b36550233"
119
+ "gitHead": "cd6a31d17eff8e2b96dfba2eee5363c0d96aa80c"
119
120
  }
@@ -12,7 +12,7 @@ export interface AlertBannerProps extends HTMLAttributes<HTMLDivElement> {
12
12
  /** Specify a custom React ref for this component. */
13
13
  ref?: Ref<HTMLDivElement>
14
14
  /** Specify the component variant. */
15
- variant?: "black" | "default"
15
+ variant?: "black" | "grey" | "default"
16
16
  }
17
17
 
18
18
  interface AlertBannerHeadingProps extends HTMLAttributes<HTMLHeadingElement> {
@@ -4,7 +4,6 @@ import { type FieldsetHTMLAttributes, HTMLAttributes, type JSX, Ref } from "reac
4
4
  import { Error as BaseError, type ErrorProps } from "@/components/FieldMarkers/Error"
5
5
  import { Hint as BaseHint, type HintProps } from "@/components/FieldMarkers/Hint"
6
6
  import { Legend as BaseLegend, type LegendProps } from "@/components/FieldMarkers/Legend"
7
- import { StandardSizes } from "@/types"
8
7
 
9
8
  export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
10
9
  /** Content inside the component.
@@ -21,8 +20,6 @@ export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElemen
21
20
  hideErrorBar?: boolean
22
21
  /** Specify a custom React ref for this component. */
23
22
  ref?: Ref<HTMLFieldSetElement>
24
- /** Specify the size of the component. Applies to all descendants. */
25
- size?: StandardSizes
26
23
  }
27
24
  const Fieldset = ({
28
25
  children,
@@ -31,7 +28,6 @@ const Fieldset = ({
31
28
  error = false,
32
29
  hideErrorBar = false,
33
30
  ref,
34
- size,
35
31
  ...props
36
32
  }: FieldsetProps): JSX.Element => {
37
33
  const componentProps = {
@@ -39,7 +35,6 @@ const Fieldset = ({
39
35
  className: clsx("coop-fieldset", className),
40
36
  "data-error": error || undefined,
41
37
  "data-hide-error": hideErrorBar || undefined,
42
- "data-size": size ?? undefined,
43
38
  disabled,
44
39
  ...props,
45
40
  }
@@ -52,8 +47,6 @@ const Fieldset = ({
52
47
  }
53
48
 
54
49
  interface FieldsetFieldsProps extends HTMLAttributes<HTMLDivElement> {
55
- /** Specify whether all descendant Fields should render inside a box. */
56
- boxed?: boolean
57
50
  /** Content inside the component. */
58
51
  children?: React.ReactNode
59
52
  /** Specify additional CSS classes. */
@@ -63,7 +56,6 @@ interface FieldsetFieldsProps extends HTMLAttributes<HTMLDivElement> {
63
56
  }
64
57
 
65
58
  const FieldsetFields = ({
66
- boxed = false,
67
59
  children,
68
60
  className,
69
61
  orientation = "vertical",
@@ -71,7 +63,6 @@ const FieldsetFields = ({
71
63
  }: FieldsetFieldsProps): JSX.Element => {
72
64
  const componentProps = {
73
65
  className: clsx("coop-fieldset-fields", className),
74
- "data-boxed": boxed || undefined,
75
66
  "data-orientation": orientation !== "vertical" ? orientation : undefined,
76
67
  ...props,
77
68
  }