@harpercollins/harpercollins-design-system 1.16.0 → 1.16.5

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.
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
- export interface ModalWindowProps {
2
+ import { DrawerProps } from "@mui/joy";
3
+ export interface ModalWindowProps extends Omit<DrawerProps, "open" | "anchor"> {
3
4
  side: "left" | "right";
4
5
  size?: "sm" | "md" | "lg";
5
6
  open: boolean;
@@ -7,10 +8,7 @@ export interface ModalWindowProps {
7
8
  onCloseCompleted?: () => void;
8
9
  closeRequested?: boolean;
9
10
  closeBlocked?: boolean;
10
- disableGutters?: boolean;
11
11
  showCloseButton?: boolean;
12
12
  }
13
- declare const Modal: React.ForwardRefExoticComponent<ModalWindowProps & {
14
- children?: React.ReactNode | undefined;
15
- } & React.RefAttributes<HTMLDivElement>>;
13
+ declare const Modal: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<ModalWindowProps>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
14
  export default Modal;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Custom hook to determine if the Sentry feedback dialog is open.
3
+ * We are using MutationObserver to watch for changes in the shadow DOM of the Sentry feedback container because Sentry doesn't provide a direct API to check if the feedback dialog is open.
4
+ * @returns {boolean} - Returns true if the Sentry feedback dialog is open, false otherwise.
5
+ */
6
+ declare function useSentryFeedbackOpen(): boolean;
7
+ export default useSentryFeedbackOpen;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Example component to demonstrate useSentryFeedbackOpen hook.
3
+ */
4
+ export declare function Demo(): import("react/jsx-runtime").JSX.Element;
5
+ declare const _default: {
6
+ title: string;
7
+ component: typeof Demo;
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component: string;
12
+ };
13
+ };
14
+ };
15
+ };
16
+ export default _default;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _mui_joy from '@mui/joy';
3
- import { AccordionProps as AccordionProps$1, AccordionDetailsProps, AccordionSummaryProps, AccordionGroupProps, AlertProps, AutocompleteProps as AutocompleteProps$1, AvatarProps, BadgeProps, CardProps, CheckboxProps, ChipProps, ColorPaletteProp, ContainerProps, DividerProps, DropdownProps, FormControlProps, FormLabelProps, GridProps, InputProps, ListProps, MenuProps, ListItem, RadioProps, SliderProps, SwitchProps, TextareaProps, TooltipProps as TooltipProps$1, TypographyProps } from '@mui/joy';
3
+ import { AccordionProps as AccordionProps$1, AccordionDetailsProps, AccordionSummaryProps, AccordionGroupProps, AlertProps, AutocompleteProps as AutocompleteProps$1, AvatarProps, BadgeProps, CardProps, CheckboxProps, ChipProps, ColorPaletteProp, ContainerProps, DividerProps, DrawerProps, DropdownProps, FormControlProps, FormLabelProps, GridProps, InputProps, ListProps, MenuProps, ListItem, RadioProps, SliderProps, SwitchProps, TextareaProps, TooltipProps as TooltipProps$1, TypographyProps } from '@mui/joy';
4
4
  export { Box, CardActions, CardContent, CardCover, CardOverflow, IconButton, ListDivider, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListSubheader, MenuButton, RadioGroup, TextField } from '@mui/joy';
5
5
  import * as React$1 from 'react';
6
6
  import React__default, { ReactElement, PropsWithChildren } from 'react';
@@ -165,7 +165,7 @@ declare function DateTimeInput({ id, name, defaultValue, onChangeValue, showNowB
165
165
 
166
166
  declare function Divider(props: DividerProps): react_jsx_runtime.JSX.Element;
167
167
 
168
- interface ModalWindowProps {
168
+ interface ModalWindowProps extends Omit<DrawerProps, "open" | "anchor"> {
169
169
  side: "left" | "right";
170
170
  size?: "sm" | "md" | "lg";
171
171
  open: boolean;
@@ -173,12 +173,9 @@ interface ModalWindowProps {
173
173
  onCloseCompleted?: () => void;
174
174
  closeRequested?: boolean;
175
175
  closeBlocked?: boolean;
176
- disableGutters?: boolean;
177
176
  showCloseButton?: boolean;
178
177
  }
179
- declare const Modal: React__default.ForwardRefExoticComponent<ModalWindowProps & {
180
- children?: React__default.ReactNode | undefined;
181
- } & React__default.RefAttributes<HTMLDivElement>>;
178
+ declare const Modal: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<ModalWindowProps>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
182
179
 
183
180
  declare function Dropdown(props: DropdownProps): react_jsx_runtime.JSX.Element;
184
181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harpercollins/harpercollins-design-system",
3
- "version": "1.16.0",
3
+ "version": "1.16.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@ssh.dev.azure.com:v3/HarperCollinsUK/HCDesignSystem/HCDesignSystem"