@delightui/components 0.1.163 → 0.1.165
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/components/atoms/ToastNotification/ToastNotification.types.d.ts +8 -0
- package/dist/cjs/components/molecules/DatePicker/DateInput/DateInput.types.d.ts +8 -0
- package/dist/cjs/components/molecules/ProgressBar/ProgressBar.types.d.ts +4 -0
- package/dist/cjs/library.css +1 -1
- package/dist/cjs/library.js +1 -1
- package/dist/cjs/library.js.map +1 -1
- package/dist/cjs/modules/notification/index.d.ts +2 -2
- package/dist/cjs/modules/notification/types.d.ts +13 -2
- package/dist/esm/components/atoms/ToastNotification/ToastNotification.types.d.ts +8 -0
- package/dist/esm/components/molecules/DatePicker/DateInput/DateInput.types.d.ts +8 -0
- package/dist/esm/components/molecules/ProgressBar/ProgressBar.types.d.ts +4 -0
- package/dist/esm/library.css +1 -1
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/esm/modules/notification/index.d.ts +2 -2
- package/dist/esm/modules/notification/types.d.ts +13 -2
- package/dist/index.d.ts +26 -3
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import NotificationContainer from './NotificationContainer';
|
|
2
|
-
import { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset } from './types';
|
|
2
|
+
import { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset, NotificationRenderContent } from './types';
|
|
3
3
|
export * from './NotificationContext';
|
|
4
|
-
export type { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset };
|
|
4
|
+
export type { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset, NotificationRenderContent };
|
|
5
5
|
export default NotificationContainer;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ToastNotificationStyleEnum } from '../../components/atoms/ToastNotification/ToastNotification.types';
|
|
3
|
+
/** Custom inner content; receives close (required) so your component can dismiss the toast. */
|
|
4
|
+
export type NotificationRenderContent = (helpers: {
|
|
5
|
+
closeToast: () => void;
|
|
6
|
+
}) => ReactNode;
|
|
3
7
|
/**
|
|
4
8
|
* Position options for notification container.
|
|
5
9
|
*/
|
|
@@ -16,7 +20,10 @@ export type NotificationOffset = {
|
|
|
16
20
|
*/
|
|
17
21
|
export type Notification = {
|
|
18
22
|
id?: number;
|
|
19
|
-
|
|
23
|
+
/** Shown inside default toast (ignored when renderContent is set). */
|
|
24
|
+
message?: ReactNode;
|
|
25
|
+
/** Custom inner content; receives removeToast so your component can close the toast. */
|
|
26
|
+
renderContent?: NotificationRenderContent;
|
|
20
27
|
duration?: number;
|
|
21
28
|
style?: ToastNotificationStyleEnum;
|
|
22
29
|
isDismissable?: boolean;
|
|
@@ -24,12 +31,14 @@ export type Notification = {
|
|
|
24
31
|
closeIcon?: ReactNode;
|
|
25
32
|
leadingIcon?: ReactNode;
|
|
26
33
|
trailingIcon?: ReactNode;
|
|
34
|
+
/** Position for this toast; defaults to provider position when not set. */
|
|
35
|
+
position?: NotificationPosition;
|
|
27
36
|
};
|
|
28
37
|
/**
|
|
29
38
|
* Payload for triggering a new notification.
|
|
30
39
|
*/
|
|
31
40
|
export type TriggerNotificationPayload = Notification & {
|
|
32
|
-
style
|
|
41
|
+
style?: ToastNotificationStyleEnum;
|
|
33
42
|
isDismissable?: boolean;
|
|
34
43
|
};
|
|
35
44
|
/**
|
|
@@ -49,6 +58,8 @@ export type NotificationContextValue = {
|
|
|
49
58
|
clear: VoidFunction;
|
|
50
59
|
removeNotification: (id: number) => void;
|
|
51
60
|
trigger: NotificationTrigger;
|
|
61
|
+
position: NotificationPosition;
|
|
62
|
+
offset: NotificationOffset;
|
|
52
63
|
};
|
|
53
64
|
/**
|
|
54
65
|
* Props for the NotificationProvider component.
|
package/dist/index.d.ts
CHANGED
|
@@ -1411,6 +1411,14 @@ type DateInputProps = DatePickerBaseSharedProps & {
|
|
|
1411
1411
|
* Icon to be displayed after the input.
|
|
1412
1412
|
*/
|
|
1413
1413
|
trailingIcon?: React.ReactNode;
|
|
1414
|
+
/**
|
|
1415
|
+
* Accessible label (used as base for input and child suffixes e.g. --open-calendar).
|
|
1416
|
+
*/
|
|
1417
|
+
ariaLabel?: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* ID(s) of element(s) that label this component (used as base for child suffixes).
|
|
1420
|
+
*/
|
|
1421
|
+
ariaLabelledBy?: string;
|
|
1414
1422
|
};
|
|
1415
1423
|
|
|
1416
1424
|
declare const DateInput: (props: DateInputProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1845,6 +1853,10 @@ type ProgressBarProps = {
|
|
|
1845
1853
|
* Additional class for styling
|
|
1846
1854
|
*/
|
|
1847
1855
|
className?: string;
|
|
1856
|
+
/**
|
|
1857
|
+
* Accessible label for the progress bar
|
|
1858
|
+
*/
|
|
1859
|
+
ariaLabel?: string;
|
|
1848
1860
|
};
|
|
1849
1861
|
|
|
1850
1862
|
declare const ProgressBar: React__default.FC<ProgressBarProps>;
|
|
@@ -2793,6 +2805,10 @@ declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
|
|
|
2793
2805
|
|
|
2794
2806
|
type ToastNotificationStyleEnum = 'Neutral' | 'Error' | 'Success';
|
|
2795
2807
|
|
|
2808
|
+
/** Custom inner content; receives close (required) so your component can dismiss the toast. */
|
|
2809
|
+
type NotificationRenderContent = (helpers: {
|
|
2810
|
+
closeToast: () => void;
|
|
2811
|
+
}) => ReactNode;
|
|
2796
2812
|
/**
|
|
2797
2813
|
* Position options for notification container.
|
|
2798
2814
|
*/
|
|
@@ -2809,7 +2825,10 @@ type NotificationOffset = {
|
|
|
2809
2825
|
*/
|
|
2810
2826
|
type Notification = {
|
|
2811
2827
|
id?: number;
|
|
2812
|
-
|
|
2828
|
+
/** Shown inside default toast (ignored when renderContent is set). */
|
|
2829
|
+
message?: ReactNode;
|
|
2830
|
+
/** Custom inner content; receives removeToast so your component can close the toast. */
|
|
2831
|
+
renderContent?: NotificationRenderContent;
|
|
2813
2832
|
duration?: number;
|
|
2814
2833
|
style?: ToastNotificationStyleEnum;
|
|
2815
2834
|
isDismissable?: boolean;
|
|
@@ -2817,12 +2836,14 @@ type Notification = {
|
|
|
2817
2836
|
closeIcon?: ReactNode;
|
|
2818
2837
|
leadingIcon?: ReactNode;
|
|
2819
2838
|
trailingIcon?: ReactNode;
|
|
2839
|
+
/** Position for this toast; defaults to provider position when not set. */
|
|
2840
|
+
position?: NotificationPosition;
|
|
2820
2841
|
};
|
|
2821
2842
|
/**
|
|
2822
2843
|
* Payload for triggering a new notification.
|
|
2823
2844
|
*/
|
|
2824
2845
|
type TriggerNotificationPayload = Notification & {
|
|
2825
|
-
style
|
|
2846
|
+
style?: ToastNotificationStyleEnum;
|
|
2826
2847
|
isDismissable?: boolean;
|
|
2827
2848
|
};
|
|
2828
2849
|
/**
|
|
@@ -2842,6 +2863,8 @@ type NotificationContextValue = {
|
|
|
2842
2863
|
clear: VoidFunction;
|
|
2843
2864
|
removeNotification: (id: number) => void;
|
|
2844
2865
|
trigger: NotificationTrigger;
|
|
2866
|
+
position: NotificationPosition;
|
|
2867
|
+
offset: NotificationOffset;
|
|
2845
2868
|
};
|
|
2846
2869
|
/**
|
|
2847
2870
|
* Props for the NotificationProvider component.
|
|
@@ -2856,4 +2879,4 @@ declare const NotificationContext: React__default.Context<NotificationContextVal
|
|
|
2856
2879
|
declare const NotificationProvider: React__default.FC<NotificationProviderProps>;
|
|
2857
2880
|
declare const useNotification: () => NotificationContextValue;
|
|
2858
2881
|
|
|
2859
|
-
export { type AccessibilityActions, type AccessibilityProps, Accordion, AccordionDetails, AccordionGroup, AccordionSummary, ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, Checkbox, CheckboxItem, type CheckboxItemProps, type CheckboxLabelAlignmentEnum, type CheckboxProps, type CheckboxSizeEnum, type CheckboxTypeEnum, Chip, ChipInput, type ChipInputProps, type ChipProps, ConditionalView, type ConditionalViewProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, CustomToggle, type CustomToggleProps, DateInput, type DateInputProps, DatePicker, type DatePickerProps, SortableItem as DraggableItem, SortableTrigger as DraggableItemTrigger, Dropzone, DropzoneClear, DropzoneContent, type DropzoneContentProps, type DropzoneContentTypeEnum, DropzoneFilename, DropzoneFilename as DropzonePreview, type DropzoneProps, DropzoneSupportedFormats as DropzoneReject, DropzoneTrigger as DropzoneRoot, DropzoneSupportedFormats, DropzoneTrigger, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Grid, GridItem, type GridItemProps, GridList, type GridListProps, type GridProps, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps$1 as ListItemProps, type ListProps, Modal, type ModalComponentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, ModalProvider, type ModalProviderProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, type Notification, type NotificationContainerProps, NotificationContext, type NotificationOffset, type NotificationPosition, NotificationProvider, type NotificationTrigger, Option, type OptionLike, type OptionLikeKey, type OptionProps, type OverlayDirectionEnum, Pagination, PaginationNumberField, type PaginationNumberFieldProps, type PaginationProps, Password, Popover, type PopoverHandle, type PopoverProps, ProgressBar, type ProgressBarProps, RadioButton, RadioButtonItem, type RadioButtonItemProps, type RadioButtonLabelAlignmentEnum, type RadioButtonProps, type RadioButtonSizeEnum, RadioGroup, type RadioGroupProps, RenderStateView, type RenderStateViewProps, RepeaterList, type RepeaterListProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Search, type SearchCallback, type SearchStyleEnum as SearchModeEnum, type SearchProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, SlideOutPanel, type SlideOutPanelDirectionEnum, type SlideOutPanelProps, type SlideOutPanelSizeEnum, Slider, type SliderProps, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, Toggle, ToggleButton, type ToggleButtonProps, type ToggleLabelAlignmentEnum, type ToggleProps, Tooltip, type TooltipProps, type TriggerNotificationPayload, type UploadedFileMetadata, type UseModalReturn, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, getClickAccessibilityProps, mergeRefs, useDebounce, useDropzoneContext, useForm, useFormTyped, useInflateView, useModal, useNotification, useSelectContext, useTab };
|
|
2882
|
+
export { type AccessibilityActions, type AccessibilityProps, Accordion, AccordionDetails, AccordionGroup, AccordionSummary, ActionCard, type ActionCardProps, ActionImage, type ActionImageProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Breakpoint, type BreakpointProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, Checkbox, CheckboxItem, type CheckboxItemProps, type CheckboxLabelAlignmentEnum, type CheckboxProps, type CheckboxSizeEnum, type CheckboxTypeEnum, Chip, ChipInput, type ChipInputProps, type ChipProps, ConditionalView, type ConditionalViewProps, ContextMenu, type ContextMenuProps, type CustomTimePickerConfig, CustomToggle, type CustomToggleProps, DateInput, type DateInputProps, DatePicker, type DatePickerProps, SortableItem as DraggableItem, SortableTrigger as DraggableItemTrigger, Dropzone, DropzoneClear, DropzoneContent, type DropzoneContentProps, type DropzoneContentTypeEnum, DropzoneFilename, DropzoneFilename as DropzonePreview, type DropzoneProps, DropzoneSupportedFormats as DropzoneReject, DropzoneTrigger as DropzoneRoot, DropzoneSupportedFormats, DropzoneTrigger, type FieldValidationFunction, type FieldValidators, type FieldValue, Form, type FormContextValues, type FormErrors, FormField, type FormFieldProps, type FormProps, type FormProviderProps, type FormState, type FormStateChangeHandler, type FormSubmitHandler, type FormValidator, Grid, GridItem, type GridItemProps, GridList, type GridListProps, type GridProps, Icon, IconButton, type IconButtonProps, type IconButtonStyleEnum, type IconProps, type IconSizeEnum, type IconStyleEnum, Image, type ImageFitEnum, type ImageProps, Input, type InputProps, type InputTypeEnum, List, ListItem, type ListItemProps$1 as ListItemProps, type ListProps, Modal, type ModalComponentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, ModalProvider, type ModalProviderProps, Nav, NavItem, type NavItemProps, NavLink, type NavLinkProps, type NavProps, type Notification, type NotificationContainerProps, NotificationContext, type NotificationOffset, type NotificationPosition, NotificationProvider, type NotificationRenderContent, type NotificationTrigger, Option, type OptionLike, type OptionLikeKey, type OptionProps, type OverlayDirectionEnum, Pagination, PaginationNumberField, type PaginationNumberFieldProps, type PaginationProps, Password, Popover, type PopoverHandle, type PopoverProps, ProgressBar, type ProgressBarProps, RadioButton, RadioButtonItem, type RadioButtonItemProps, type RadioButtonLabelAlignmentEnum, type RadioButtonProps, type RadioButtonSizeEnum, RadioGroup, type RadioGroupProps, RenderStateView, type RenderStateViewProps, RepeaterList, type RepeaterListProps, type RequiredFields, ResponsiveComponent, type ResponsiveComponentProps, Search, type SearchCallback, type SearchStyleEnum as SearchModeEnum, type SearchProps, Select, SelectListItem, type SelectListItemProps, type SelectProps, SelectProvider, SlideOutPanel, type SlideOutPanelDirectionEnum, type SlideOutPanelProps, type SlideOutPanelSizeEnum, Slider, type SliderProps, Spinner, type SpinnerProps, TabContent, type TabContentProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextDecorationEnum, type TextProps, type TextTypeEnum, type TextWeightEnum, ThemeContext, type ThemeContextType, ThemeProvider, type ThemeProviderProps, Toggle, ToggleButton, type ToggleButtonProps, type ToggleLabelAlignmentEnum, type ToggleProps, Tooltip, type TooltipProps, type TriggerNotificationPayload, type UploadedFileMetadata, type UseModalReturn, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, getClickAccessibilityProps, mergeRefs, useDebounce, useDropzoneContext, useForm, useFormTyped, useInflateView, useModal, useNotification, useSelectContext, useTab };
|