@pushwoosh/dumb-components 1.1.98 → 1.1.99

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,3 +1,3 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { NotificationBarProps } from './types';
3
- export declare function NotificationBar({ type, isOpened, read, count, onClick, className, }: NotificationBarProps): ReactElement;
3
+ export declare function NotificationBar({ type, isOpened, read, count, onClick, }: NotificationBarProps): ReactElement;
@@ -13,8 +13,7 @@ export function NotificationBar({
13
13
  isOpened = false,
14
14
  read = false,
15
15
  count = 0,
16
- onClick,
17
- className
16
+ onClick
18
17
  }) {
19
18
  const hasNotifications = count > 0 && type !== 'no-notifications';
20
19
  const shouldUseFilledIcon = !isOpened && (!read && type !== 'no-notifications' || read);
@@ -30,7 +29,6 @@ export function NotificationBar({
30
29
  return Color.CLEAR;
31
30
  };
32
31
  return React.createElement(NotificationBarButton, {
33
- className: className,
34
32
  "$type": type,
35
33
  "$isOpened": isOpened,
36
34
  "$read": read,
@@ -1,3 +1,3 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { NotificationBellProps } from './types';
3
- export declare function NotificationBell({ count, severity, isOpened, onClick, className, }: NotificationBellProps): ReactElement;
3
+ export declare function NotificationBell({ count, severity, isOpened, onClick, }: NotificationBellProps): ReactElement;
@@ -6,8 +6,7 @@ export function NotificationBell({
6
6
  count = 0,
7
7
  severity,
8
8
  isOpened = false,
9
- onClick,
10
- className
9
+ onClick
11
10
  }) {
12
11
  const hasNotifications = count > 0;
13
12
  const showBadge = hasNotifications || severity;
@@ -18,7 +17,6 @@ export function NotificationBell({
18
17
  return Color.PRIMARY;
19
18
  };
20
19
  return React.createElement(NotificationBellButton, {
21
- className: className,
22
20
  "$isOpened": isOpened,
23
21
  onClick: onClick,
24
22
  type: "button",
@@ -1,3 +1,3 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { NotificationInboxProps } from './types';
3
- export declare function NotificationInbox({ notifications, isLoading, hasMore, onLoadMore, onNotificationClick, onMarkAsRead, emptyStateTitle, emptyStateDescription, className, }: NotificationInboxProps): ReactElement;
3
+ export declare function NotificationInbox({ notifications, isLoading, hasMore, onLoadMore, onNotificationClick, onMarkAsRead, emptyStateTitle, emptyStateDescription, }: NotificationInboxProps): ReactElement;
@@ -17,8 +17,7 @@ export function NotificationInbox({
17
17
  onNotificationClick,
18
18
  onMarkAsRead,
19
19
  emptyStateTitle = 'No notifications yet',
20
- emptyStateDescription = 'You\'ll see updates and alerts here once something requires your attention.',
21
- className
20
+ emptyStateDescription = 'You\'ll see updates and alerts here once something requires your attention.'
22
21
  }) {
23
22
  const descriptionRefs = useRef({});
24
23
  const [expandedId, setExpandedId] = useState(null);
@@ -49,9 +48,7 @@ export function NotificationInbox({
49
48
  setShowExpandMap(newMap);
50
49
  }, [notifications]);
51
50
  if (notifications.length === 0 && !isLoading) {
52
- return React.createElement(NotificationInboxContainer, {
53
- className: className
54
- }, React.createElement(NotificationInboxHeader, null, React.createElement(NotificationInboxTitle, {
51
+ return React.createElement(NotificationInboxContainer, null, React.createElement(NotificationInboxHeader, null, React.createElement(NotificationInboxTitle, {
55
52
  "$variant": "h4",
56
53
  "$color": Color.MAIN
57
54
  }, "Notifications")), React.createElement(Vertical, {
@@ -76,9 +73,7 @@ export function NotificationInbox({
76
73
  "$color": Color.LOCKED
77
74
  }, emptyStateDescription))));
78
75
  }
79
- return React.createElement(NotificationInboxContainer, {
80
- className: className
81
- }, React.createElement(NotificationInboxHeader, null, React.createElement(NotificationInboxTitle, {
76
+ return React.createElement(NotificationInboxContainer, null, React.createElement(NotificationInboxHeader, null, React.createElement(NotificationInboxTitle, {
82
77
  "$variant": "h4",
83
78
  "$color": Color.MAIN
84
79
  }, React.createElement("span", null, "Notifications"), unreadCount > 0 && React.createElement(React.Fragment, null, ' ', React.createElement(Text, {
@@ -5,7 +5,7 @@ import { Text } from '@pushwoosh/kit-typography';
5
5
  export const NotificationInboxContainer = styled(Vertical).withConfig({
6
6
  displayName: "NotificationInboxContainer",
7
7
  componentId: "sc-1nrene1-0"
8
- })(["width:100%;min-width:360px;max-width:360px;max-height:600px;background:", ";border:1px solid ", ";border-radius:", ";box-shadow:", ";overflow:hidden;display:flex;flex-direction:column;"], Color.CLEAR, Color.FORM, ShapeRadius.DIALOG, Shadow.REGULAR);
8
+ })(["display:flex;flex-direction:column;width:100%;min-width:360px;max-width:360px;max-height:600px;background:", ";border:1px solid ", ";border-radius:", ";box-shadow:", ";overflow:scroll;"], Color.CLEAR, Color.FORM, ShapeRadius.DIALOG, Shadow.REGULAR);
9
9
  export const NotificationInboxHeader = styled(Horizontal).withConfig({
10
10
  displayName: "NotificationInboxHeader",
11
11
  componentId: "sc-1nrene1-1"
@@ -21,7 +21,6 @@ export interface NotificationInboxProps {
21
21
  readonly onMarkAsRead?: (notificationId: string) => void;
22
22
  readonly emptyStateTitle?: string;
23
23
  readonly emptyStateDescription?: string;
24
- readonly className?: string;
25
24
  }
26
25
  export type NotificationBarType = 'important' | 'warning' | 'notifications' | 'no-notifications';
27
26
  export interface NotificationBarProps {
@@ -30,12 +29,10 @@ export interface NotificationBarProps {
30
29
  readonly read?: boolean;
31
30
  readonly count?: number;
32
31
  readonly onClick?: () => void;
33
- readonly className?: string;
34
32
  }
35
33
  export interface NotificationBellProps {
36
34
  readonly count?: number;
37
35
  readonly severity?: NotificationSeverity;
38
36
  readonly isOpened?: boolean;
39
37
  readonly onClick?: () => void;
40
- readonly className?: string;
41
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.98",
3
+ "version": "1.1.99",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",