@delightui/components 0.1.130 → 0.1.131

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,5 @@
1
1
  import NotificationContainer from './NotificationContainer';
2
- import { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger } from './types';
2
+ import { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset } from './types';
3
3
  export * from './NotificationContext';
4
- export type { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger };
4
+ export type { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset };
5
5
  export default NotificationContainer;
@@ -1,24 +1,40 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ToastNotificationStyleEnum } from '../../components/atoms/ToastNotification/ToastNotification.types';
3
+ /**
4
+ * Position options for notification container.
5
+ */
6
+ export type NotificationPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
7
+ /**
8
+ * Offset configuration for notification positioning.
9
+ */
10
+ export type NotificationOffset = {
11
+ x?: number;
12
+ y?: number;
13
+ };
3
14
  /**
4
15
  * Represents a single notification.
5
16
  */
6
17
  export type Notification = {
7
18
  id?: number;
8
- message?: ReactNode;
19
+ message: ReactNode;
9
20
  duration?: number;
21
+ style?: ToastNotificationStyleEnum;
22
+ isDismissable?: boolean;
10
23
  };
11
24
  /**
12
25
  * Payload for triggering a new notification.
13
26
  */
14
27
  export type TriggerNotificationPayload = Notification & {
15
- style?: ToastNotificationStyleEnum;
28
+ style: ToastNotificationStyleEnum;
29
+ isDismissable?: boolean;
16
30
  };
17
31
  /**
18
32
  * Props for the NotificationContainer component.
19
33
  */
20
34
  export type NotificationContainerProps = {
21
35
  className?: string;
36
+ position?: NotificationPosition;
37
+ offset?: NotificationOffset;
22
38
  };
23
39
  export type NotificationTrigger = (payload: TriggerNotificationPayload) => void;
24
40
  /**
@@ -35,4 +51,6 @@ export type NotificationContextValue = {
35
51
  */
36
52
  export type NotificationProviderProps = {
37
53
  children: ReactNode;
54
+ position?: NotificationPosition;
55
+ offset?: NotificationOffset;
38
56
  };
package/dist/index.d.ts CHANGED
@@ -2622,25 +2622,41 @@ declare const ThemeProvider: React__default.FC<ThemeProviderProps>;
2622
2622
 
2623
2623
  type ToastNotificationStyleEnum = 'Neutral' | 'Error' | 'Success';
2624
2624
 
2625
+ /**
2626
+ * Position options for notification container.
2627
+ */
2628
+ type NotificationPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
2629
+ /**
2630
+ * Offset configuration for notification positioning.
2631
+ */
2632
+ type NotificationOffset = {
2633
+ x?: number;
2634
+ y?: number;
2635
+ };
2625
2636
  /**
2626
2637
  * Represents a single notification.
2627
2638
  */
2628
2639
  type Notification = {
2629
2640
  id?: number;
2630
- message?: ReactNode;
2641
+ message: ReactNode;
2631
2642
  duration?: number;
2643
+ style?: ToastNotificationStyleEnum;
2644
+ isDismissable?: boolean;
2632
2645
  };
2633
2646
  /**
2634
2647
  * Payload for triggering a new notification.
2635
2648
  */
2636
2649
  type TriggerNotificationPayload = Notification & {
2637
- style?: ToastNotificationStyleEnum;
2650
+ style: ToastNotificationStyleEnum;
2651
+ isDismissable?: boolean;
2638
2652
  };
2639
2653
  /**
2640
2654
  * Props for the NotificationContainer component.
2641
2655
  */
2642
2656
  type NotificationContainerProps = {
2643
2657
  className?: string;
2658
+ position?: NotificationPosition;
2659
+ offset?: NotificationOffset;
2644
2660
  };
2645
2661
  type NotificationTrigger = (payload: TriggerNotificationPayload) => void;
2646
2662
  /**
@@ -2657,10 +2673,12 @@ type NotificationContextValue = {
2657
2673
  */
2658
2674
  type NotificationProviderProps = {
2659
2675
  children: ReactNode;
2676
+ position?: NotificationPosition;
2677
+ offset?: NotificationOffset;
2660
2678
  };
2661
2679
 
2662
2680
  declare const NotificationContext: React__default.Context<NotificationContextValue>;
2663
2681
  declare const NotificationProvider: React__default.FC<NotificationProviderProps>;
2664
2682
  declare const useNotification: () => NotificationContextValue;
2665
2683
 
2666
- 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, 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, 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 UseModalReturn, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, getClickAccessibilityProps, mergeRefs, useDebounce, useDropzoneContext, useInflateView, useModal, useNotification, useSelectContext, useTab };
2684
+ 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, 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 UseModalReturn, WrapTextNodes, type WrapTextNodesProps, applyPropsToChildren, getClickAccessibilityProps, mergeRefs, useDebounce, useDropzoneContext, useInflateView, useModal, useNotification, useSelectContext, useTab };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delightui/components",
3
- "version": "0.1.130",
3
+ "version": "0.1.131",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "vite",