@oaknational/oak-components 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -2720,9 +2720,9 @@ type OakCATQuestionProps = {
2720
2720
  initialOpen?: boolean;
2721
2721
  questionTypeInput: ReactNode;
2722
2722
  questionStem: ReactNode;
2723
+ answersSection: ReactNode;
2723
2724
  hintInput: ReactElement;
2724
2725
  feedbackInput: ReactElement;
2725
- answersSection: ReactNode;
2726
2726
  hintInputId: string;
2727
2727
  feedbackInputId: string;
2728
2728
  };
@@ -5091,7 +5091,7 @@ type OakListItemProps = {
5091
5091
  title: string;
5092
5092
  isLegacy: boolean;
5093
5093
  firstItemRef?: React__default.MutableRefObject<HTMLDivElement | null> | null | undefined;
5094
- onClick?: (event: React__default.MouseEvent<HTMLDivElement, MouseEvent>) => void;
5094
+ onClick?: (event: React__default.MouseEvent<HTMLElement, MouseEvent>) => void;
5095
5095
  middleSlot?: React__default.ReactNode;
5096
5096
  endSlot?: React__default.ReactNode;
5097
5097
  hoverBgColour?: OakUiRoleToken;
@@ -5100,14 +5100,12 @@ type OakListItemProps = {
5100
5100
  indexLegacyBgColour?: OakUiRoleToken;
5101
5101
  expandedContent?: React__default.ReactNode;
5102
5102
  isExpanded?: boolean;
5103
- id?: string;
5104
- onCheckedChange?: (isChecked: boolean) => void;
5105
- checked?: boolean;
5106
- defaultChecked?: boolean;
5103
+ asRadio?: boolean;
5104
+ radioValue?: string;
5107
5105
  };
5108
5106
  /**
5109
- *
5110
- * OakListItem component used as links for unit cards
5107
+ * * OakListItem component used as links for unit cards
5108
+ * * adding asRadio and radioValue props to allow OakListItem to be used as radio buttons within OakUnitsContainer if the OakUnitsContainer is passed a radioGroupName prop. This allows for better accessibility when OakListItem is used in OakUnitsContainer, as the user can select a unit by clicking anywhere on the card, rather than having to click on a specific radio button.
5111
5109
  */
5112
5110
  declare const OakListItem: (props: OakListItemProps) => React__default.JSX.Element;
5113
5111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oaknational/oak-components",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "licence": "MIT",
5
5
  "description": "Shared components for Oak applications",
6
6
  "main": "dist/cjs/index.js",
@@ -99,7 +99,8 @@
99
99
  "storybook-react-context": "^0.6.0",
100
100
  "ts-jest": "^29.4.5",
101
101
  "tsx": "^4.20.5",
102
- "typescript": "^5.3.3"
102
+ "typescript": "^5.3.3",
103
+ "jest-util": "^30.2.0"
103
104
  },
104
105
  "directories": {
105
106
  "example": "examples"