@harpercollins/harpercollins-design-system 1.16.2 → 1.16.6
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/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/overlay/Drawer/Drawer.d.ts +3 -4
- package/dist/cjs/types/src/hooks/index.d.ts +1 -0
- package/dist/cjs/types/src/hooks/useSentryFeedbackOpen.d.ts +6 -0
- package/dist/cjs/types/src/hooks/useSentryFeedbackOpen.stories.d.ts +16 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/overlay/Drawer/Drawer.d.ts +3 -4
- package/dist/esm/types/src/hooks/index.d.ts +1 -0
- package/dist/esm/types/src/hooks/useSentryFeedbackOpen.d.ts +6 -0
- package/dist/esm/types/src/hooks/useSentryFeedbackOpen.stories.d.ts +16 -0
- package/dist/index.d.ts +11 -6
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
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;
|
|
@@ -9,7 +10,5 @@ export interface ModalWindowProps {
|
|
|
9
10
|
closeBlocked?: boolean;
|
|
10
11
|
showCloseButton?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const Modal: React.ForwardRefExoticComponent<ModalWindowProps &
|
|
13
|
-
children?: React.ReactNode | undefined;
|
|
14
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const Modal: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<ModalWindowProps>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
14
|
export default Modal;
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
export declare function useSentryFeedbackOpen(): boolean;
|
|
@@ -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;
|
|
@@ -175,9 +175,7 @@ interface ModalWindowProps {
|
|
|
175
175
|
closeBlocked?: boolean;
|
|
176
176
|
showCloseButton?: boolean;
|
|
177
177
|
}
|
|
178
|
-
declare const Modal: React__default.ForwardRefExoticComponent<ModalWindowProps &
|
|
179
|
-
children?: React__default.ReactNode | undefined;
|
|
180
|
-
} & React__default.RefAttributes<HTMLDivElement>>;
|
|
178
|
+
declare const Modal: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<ModalWindowProps>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
181
179
|
|
|
182
180
|
declare function Dropdown(props: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
183
181
|
|
|
@@ -371,6 +369,13 @@ declare function useToggle(initialState: boolean | (() => boolean)): {
|
|
|
371
369
|
*/
|
|
372
370
|
declare function useLocalStorage<V>(key: string, initialValue: V): [V, (newValue: V) => void];
|
|
373
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Custom hook to determine if the Sentry feedback dialog is open.
|
|
374
|
+
* 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.
|
|
375
|
+
* @returns {boolean} - Returns true if the Sentry feedback dialog is open, false otherwise.
|
|
376
|
+
*/
|
|
377
|
+
declare function useSentryFeedbackOpen(): boolean;
|
|
378
|
+
|
|
374
379
|
/**
|
|
375
380
|
* Fetch data from a URL
|
|
376
381
|
* @param url - The URL to fetch data from
|
|
@@ -412,4 +417,4 @@ declare const formatText: (text: string | null | undefined) => string;
|
|
|
412
417
|
* */
|
|
413
418
|
declare const formatCurrency: (value: number | string | null | undefined, locale?: string | undefined, options?: Intl.NumberFormatOptions) => string;
|
|
414
419
|
|
|
415
|
-
export { Accordion$1 as Accordion, AccordionDetails, AccordionGroup, Accordion as AccordionLegacy, AccordionSummary, Alert, AppBar, AutoComplete as Autocomplete, AutocompleteSelectMultiple, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Chip, ChipIcon, Container, DateInput as DatePicker, DateTimeInput, Divider, Modal as Drawer, Dropdown, FormControl, FormLabel, FullPageErrorFallback, Grid, Heading, Icon, Input, Layout, List, LoadingSpinner, LogoSVG as Logo, LogoSVGMini as LogoMini, Menu, MenuHeading, StyledMenuItem as MenuItem, ProgressBar, ProgressCircle, Radio as RadioButton, ReadMore, RelativeTime, Slider, StatusIcon, Switch, Table, Tabs, TextBlock, Textarea, ThemeProvider, ToastMessages, Tooltip, Typography, formatCurrency, formatDate, formatNumber, formatText, useFetch, useLocalStorage, useToggle };
|
|
420
|
+
export { Accordion$1 as Accordion, AccordionDetails, AccordionGroup, Accordion as AccordionLegacy, AccordionSummary, Alert, AppBar, AutoComplete as Autocomplete, AutocompleteSelectMultiple, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Chip, ChipIcon, Container, DateInput as DatePicker, DateTimeInput, Divider, Modal as Drawer, Dropdown, FormControl, FormLabel, FullPageErrorFallback, Grid, Heading, Icon, Input, Layout, List, LoadingSpinner, LogoSVG as Logo, LogoSVGMini as LogoMini, Menu, MenuHeading, StyledMenuItem as MenuItem, ProgressBar, ProgressCircle, Radio as RadioButton, ReadMore, RelativeTime, Slider, StatusIcon, Switch, Table, Tabs, TextBlock, Textarea, ThemeProvider, ToastMessages, Tooltip, Typography, formatCurrency, formatDate, formatNumber, formatText, useFetch, useLocalStorage, useSentryFeedbackOpen, useToggle };
|