@caratlogic/design-system 0.1.10 → 0.1.12
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/components/layouts/AppShell/AppShell.types.d.ts +14 -1
- package/dist/components/layouts/AppShell/AppShell.types.d.ts.map +1 -1
- package/dist/components/layouts/AppShell/DashboardShell.d.ts.map +1 -1
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.accessibility.d.ts +4 -0
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.accessibility.d.ts.map +1 -0
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.d.ts +8 -0
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.d.ts.map +1 -0
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.types.d.ts +22 -0
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.types.d.ts.map +1 -0
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.utils.d.ts +4 -0
- package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.utils.d.ts.map +1 -0
- package/dist/components/molecules/InAppNotificationCard/index.d.ts +4 -0
- package/dist/components/molecules/InAppNotificationCard/index.d.ts.map +1 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.accessibility.d.ts +9 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.accessibility.d.ts.map +1 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.d.ts +9 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.d.ts.map +1 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.hooks.d.ts +12 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.hooks.d.ts.map +1 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.types.d.ts +41 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.types.d.ts.map +1 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.utils.d.ts +4 -0
- package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.utils.d.ts.map +1 -0
- package/dist/components/organisms/InAppNotificationsPanel/index.d.ts +5 -0
- package/dist/components/organisms/InAppNotificationsPanel/index.d.ts.map +1 -0
- package/dist/components/organisms/MediaGallery/MediaGallery.d.ts +1 -1
- package/dist/components/organisms/MediaGallery/MediaGallery.d.ts.map +1 -1
- package/dist/components/organisms/MediaGallery/MediaGallery.utils.d.ts +6 -0
- package/dist/components/organisms/MediaGallery/MediaGallery.utils.d.ts.map +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
- package/dist/constants/filePatterns.d.ts +3 -0
- package/dist/constants/filePatterns.d.ts.map +1 -1
- package/dist/index.cjs.js +184 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +180 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/utils/relativeTime.d.ts +6 -0
- package/dist/utils/relativeTime.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -52,7 +52,12 @@ export interface AppShellMenuAction {
|
|
|
52
52
|
onClick: () => void;
|
|
53
53
|
destructive?: boolean;
|
|
54
54
|
}
|
|
55
|
-
export
|
|
55
|
+
export interface AppShellNotificationsBadge {
|
|
56
|
+
tone?: 'destructive' | 'success' | 'warning';
|
|
57
|
+
/** Renders a numeric badge on the bell instead of a plain dot. */
|
|
58
|
+
count?: ReactNode;
|
|
59
|
+
}
|
|
60
|
+
export type AppShellNotificationsIndicator = 'destructive' | 'success' | 'warning' | false | AppShellNotificationsBadge;
|
|
56
61
|
export interface DashboardShellProps {
|
|
57
62
|
brand: AppShellBrand;
|
|
58
63
|
/** Pre-gated, pre-grouped navigation. The app resolves `visible` + sections. */
|
|
@@ -74,6 +79,14 @@ export interface DashboardShellProps {
|
|
|
74
79
|
showNotifications?: boolean;
|
|
75
80
|
notificationsIndicator?: AppShellNotificationsIndicator;
|
|
76
81
|
onNotificationsClick?: () => void;
|
|
82
|
+
/**
|
|
83
|
+
* Rendered in a popover anchored to the bell. When provided, the bell becomes
|
|
84
|
+
* the popover trigger; without it the bell keeps its plain click behaviour.
|
|
85
|
+
*/
|
|
86
|
+
notificationsPanel?: ReactNode;
|
|
87
|
+
/** Controlled open state for `notificationsPanel`. */
|
|
88
|
+
notificationsOpen?: boolean;
|
|
89
|
+
onNotificationsOpenChange?: (open: boolean) => void;
|
|
77
90
|
/** App-specific header actions (e.g. a barcode scanner), rendered leftmost. */
|
|
78
91
|
headerActionsSlot?: ReactNode;
|
|
79
92
|
/** Sidebar width CSS value. @default '248px' */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.types.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/AppShell/AppShell.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;yDACyD;AACzD,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,IAAI,EAAE,SAAS,CAAC;IAChB,iEAAiE;IACjE,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,8BAA8B,GACtC,aAAa,GACb,SAAS,GACT,SAAS,GACT,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.types.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/AppShell/AppShell.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;yDACyD;AACzD,MAAM,WAAW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version":3,"file":"DashboardShell.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/AppShell/DashboardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardShell.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/AppShell/DashboardShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;AAqD/C,OAAO,KAAK,EAMV,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AA+Z1B,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA4DlD,CAAC"}
|
package/dist/components/molecules/InAppNotificationCard/InAppNotificationCard.accessibility.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationCard.accessibility.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/InAppNotificationCard/InAppNotificationCard.accessibility.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;CAE5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { InAppNotificationCardProps } from './InAppNotificationCard.types';
|
|
3
|
+
/**
|
|
4
|
+
* One row in a notification list. Unread state is signalled by a dot, a tinted
|
|
5
|
+
* surface and a heavier title, so it never relies on colour alone.
|
|
6
|
+
*/
|
|
7
|
+
export declare const InAppNotificationCard: FC<InAppNotificationCardProps>;
|
|
8
|
+
//# sourceMappingURL=InAppNotificationCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationCard.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/InAppNotificationCard/InAppNotificationCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAkBhC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAsDhE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** A single entry in a notification list. Transport-agnostic by design. */
|
|
3
|
+
export interface InAppNotificationItem {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
/** ISO timestamp or Date — rendered as a relative label. */
|
|
8
|
+
createdAt: string | Date;
|
|
9
|
+
isRead: boolean;
|
|
10
|
+
/** Optional secondary line, e.g. a company or contact name. */
|
|
11
|
+
subject?: string;
|
|
12
|
+
/** Overrides the default leading icon for this entry. */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export interface InAppNotificationCardProps {
|
|
16
|
+
notification: InAppNotificationItem;
|
|
17
|
+
onSelect: (notification: InAppNotificationItem) => void;
|
|
18
|
+
/** Leading icon used when the item does not supply its own. */
|
|
19
|
+
defaultIcon?: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=InAppNotificationCard.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationCard.types.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/InAppNotificationCard/InAppNotificationCard.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,2EAA2E;AAC3E,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,qBAAqB,CAAC;IACpC,QAAQ,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACxD,+DAA+D;IAC/D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Read entries sit flat on the surface; unread ones get a primary wash. */
|
|
2
|
+
export declare function getInAppNotificationCardClasses(isRead: boolean, className?: string): string;
|
|
3
|
+
export declare function getInAppNotificationIconClasses(isRead: boolean): string;
|
|
4
|
+
//# sourceMappingURL=InAppNotificationCard.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationCard.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/InAppNotificationCard/InAppNotificationCard.utils.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,OAAO,EACf,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CASR;AAED,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAKvE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { InAppNotificationCard } from './InAppNotificationCard';
|
|
2
|
+
export type { InAppNotificationCardProps, InAppNotificationItem, } from './InAppNotificationCard.types';
|
|
3
|
+
export { inAppNotificationCardA11y } from './InAppNotificationCard.accessibility';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/InAppNotificationCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EACV,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC"}
|
package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.accessibility.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const inAppNotificationsPanelA11y: {
|
|
2
|
+
readonly panelLabel: "Notifications";
|
|
3
|
+
readonly listLabel: "Notification list";
|
|
4
|
+
readonly markAllReadLabel: "Mark all notifications as read";
|
|
5
|
+
readonly retryLabel: "Retry loading notifications";
|
|
6
|
+
};
|
|
7
|
+
/** Non-modal dropdown, so `dialog` rather than `alertdialog`. */
|
|
8
|
+
export declare const IN_APP_NOTIFICATIONS_PANEL_ROLE: "dialog";
|
|
9
|
+
//# sourceMappingURL=InAppNotificationsPanel.accessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationsPanel.accessibility.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.accessibility.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B;;;;;CAK9B,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,+BAA+B,EAAG,QAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { InAppNotificationsPanelProps } from './InAppNotificationsPanel.types';
|
|
3
|
+
/**
|
|
4
|
+
* Notification list with header actions and loading / error / empty states.
|
|
5
|
+
* Positioning is the caller's concern — render it inside a popover anchored to
|
|
6
|
+
* whatever opens it (see `DashboardShell`'s `notificationsPanel` slot).
|
|
7
|
+
*/
|
|
8
|
+
export declare const InAppNotificationsPanel: FC<InAppNotificationsPanelProps>;
|
|
9
|
+
//# sourceMappingURL=InAppNotificationsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationsPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAuBhC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAgJpE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { InAppNotificationItem } from '@/components/molecules/InAppNotificationCard';
|
|
3
|
+
import type { InAppNotificationsPanelState } from './InAppNotificationsPanel.types';
|
|
4
|
+
/** Derived display state for the panel header and body. */
|
|
5
|
+
export declare function useInAppNotificationsPanel(notifications: InAppNotificationItem[], unreadCount?: number): InAppNotificationsPanelState;
|
|
6
|
+
/**
|
|
7
|
+
* Fires `onLoadMore` when the sentinel scrolls into view inside `rootRef`.
|
|
8
|
+
* No-ops where IntersectionObserver is unavailable (jsdom, older browsers), so
|
|
9
|
+
* the list simply stops auto-loading rather than breaking.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useInfiniteScrollSentinel(rootRef: RefObject<HTMLElement | null>, onLoadMore: (() => void) | undefined, enabled: boolean): RefObject<HTMLDivElement | null>;
|
|
12
|
+
//# sourceMappingURL=InAppNotificationsPanel.hooks.d.ts.map
|
package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.hooks.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationsPanel.hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.hooks.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAEpF,2DAA2D;AAC3D,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,qBAAqB,EAAE,EACtC,WAAW,CAAC,EAAE,MAAM,GACnB,4BAA4B,CAS9B;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACtC,UAAU,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,EACpC,OAAO,EAAE,OAAO,GACf,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAqBlC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { InAppNotificationItem } from '@/components/molecules/InAppNotificationCard';
|
|
3
|
+
export interface InAppNotificationsPanelProps {
|
|
4
|
+
/** Rendered in the order given — the caller owns sorting. */
|
|
5
|
+
notifications: InAppNotificationItem[];
|
|
6
|
+
onSelect: (notification: InAppNotificationItem) => void;
|
|
7
|
+
/** Total unread, which may exceed the fetched page. Defaults to counting `notifications`. */
|
|
8
|
+
unreadCount?: number;
|
|
9
|
+
/** Total notifications in the inbox — shown as the header count. */
|
|
10
|
+
totalCount?: number;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
/** More pages available — reveals the infinite-scroll sentinel. */
|
|
13
|
+
hasNextPage?: boolean;
|
|
14
|
+
/** True while the next page is in flight; shows an inline loader. */
|
|
15
|
+
isFetchingNextPage?: boolean;
|
|
16
|
+
/** Called once when the sentinel scrolls into view. */
|
|
17
|
+
onLoadMore?: () => void;
|
|
18
|
+
isError?: boolean;
|
|
19
|
+
onRetry?: () => void;
|
|
20
|
+
onMarkAllRead?: () => void;
|
|
21
|
+
isMarkingAllRead?: boolean;
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Empty-state heading. @default 'No notifications yet' */
|
|
24
|
+
emptyTitle?: string;
|
|
25
|
+
/** Optional second line explaining what will appear here. */
|
|
26
|
+
emptyDescription?: string;
|
|
27
|
+
/** Replaces the default bell glyph in the empty state. */
|
|
28
|
+
emptyIcon?: ReactNode;
|
|
29
|
+
/** Full escape hatch — replaces the whole empty state. */
|
|
30
|
+
emptyState?: ReactNode;
|
|
31
|
+
errorMessage?: string;
|
|
32
|
+
/** Leading icon for entries that do not supply their own. */
|
|
33
|
+
defaultIcon?: ReactNode;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface InAppNotificationsPanelState {
|
|
37
|
+
unreadCount: number;
|
|
38
|
+
hasUnread: boolean;
|
|
39
|
+
isEmpty: boolean;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=InAppNotificationsPanel.types.d.ts.map
|
package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.types.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationsPanel.types.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAE1F,MAAM,WAAW,4BAA4B;IAC3C,6DAA6D;IAC7D,aAAa,EAAE,qBAAqB,EAAE,CAAC;IACvC,QAAQ,EAAE,CAAC,YAAY,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACxD,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InAppNotificationItem } from '@/components/molecules/InAppNotificationCard';
|
|
2
|
+
/** Falls back to counting the current page when the caller has no total. */
|
|
3
|
+
export declare function resolveUnreadCount(notifications: InAppNotificationItem[], unreadCount?: number): number;
|
|
4
|
+
//# sourceMappingURL=InAppNotificationsPanel.utils.d.ts.map
|
package/dist/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.utils.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InAppNotificationsPanel.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/InAppNotificationsPanel/InAppNotificationsPanel.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAE1F,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,qBAAqB,EAAE,EACtC,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAGR"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { InAppNotificationsPanel } from './InAppNotificationsPanel';
|
|
2
|
+
export { useInAppNotificationsPanel } from './InAppNotificationsPanel.hooks';
|
|
3
|
+
export type { InAppNotificationsPanelProps, InAppNotificationsPanelState, } from './InAppNotificationsPanel.types';
|
|
4
|
+
export { inAppNotificationsPanelA11y } from './InAppNotificationsPanel.accessibility';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/InAppNotificationsPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EACV,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaGallery.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/MediaGallery/MediaGallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"MediaGallery.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/MediaGallery/MediaGallery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAY1C,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,sBAAsB,CAAC;AAwI9B,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+H9C,CAAC"}
|
|
@@ -2,6 +2,12 @@ import type { MediaItem, MediaKind } from './MediaGallery.types';
|
|
|
2
2
|
/** Seek to ~1st frame for static video thumbnails (HTML5 media fragment). */
|
|
3
3
|
export declare const videoThumbnailSrc: (src: string) => string;
|
|
4
4
|
export declare const createVideoMediaItem: (src: string, index: number, idPrefix?: string) => MediaItem;
|
|
5
|
+
/**
|
|
6
|
+
* True when a "video" is really an interactive viewer page. Supplier 360°
|
|
7
|
+
* spinners (Vision360, Varni) serve `text/html`, so `<video>` renders nothing
|
|
8
|
+
* and there is no frame to seek for a thumbnail — they need an iframe.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isEmbedMediaItem: (item: MediaItem) => boolean;
|
|
5
11
|
export declare const isPdfMediaItem: (item: MediaItem) => boolean;
|
|
6
12
|
export declare const MEDIA_KIND_ORDER: MediaKind[];
|
|
7
13
|
export declare const MEDIA_KIND_LABEL: Record<MediaKind, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaGallery.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/MediaGallery/MediaGallery.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjE,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,MAI/C,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,KAAK,MAAM,EACX,OAAO,MAAM,EACb,iBAAgB,KACf,SAKD,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,MAAM,SAAS,KAAG,OAGa,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,SAAS,EAAsC,CAAC;AAE/E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAItD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,SAAS,EAAE,KACjB,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,CAU/B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,EAAE,KAAG,SAAS,EACU,CAAC;AAExE,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM,KAAG,IASlE,CAAC"}
|
|
1
|
+
{"version":3,"file":"MediaGallery.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/MediaGallery/MediaGallery.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjE,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,MAI/C,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,KAAK,MAAM,EACX,OAAO,MAAM,EACb,iBAAgB,KACf,SAKD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,SAAS,KAAG,OACE,CAAC;AAEtD,eAAO,MAAM,cAAc,GAAI,MAAM,SAAS,KAAG,OAGa,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,SAAS,EAAsC,CAAC;AAE/E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAItD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,SAAS,EAAE,KACjB,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,CAU/B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,EAAE,KAAG,SAAS,EACU,CAAC;AAExE,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,EAAE,WAAW,MAAM,KAAG,IASlE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import type { NavbarActionsProps, NavbarAvatarProps, NavbarIconButtonProps, Navb
|
|
|
3
3
|
export declare const Navbar: import("react").ForwardRefExoticComponent<NavbarProps & import("react").RefAttributes<HTMLElement>>;
|
|
4
4
|
export declare const NavbarTitle: FC<NavbarTitleProps>;
|
|
5
5
|
export declare const NavbarActions: FC<NavbarActionsProps>;
|
|
6
|
-
export declare const NavbarIconButton:
|
|
6
|
+
export declare const NavbarIconButton: import("react").ForwardRefExoticComponent<NavbarIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
export declare const NavbarSearch: FC<NavbarSearchProps>;
|
|
8
8
|
export declare const NavbarAvatar: FC<NavbarAvatarProps>;
|
|
9
9
|
//# sourceMappingURL=Navbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navbar.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Navbar/Navbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAqB3C,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAEjB,qBAAqB,EAGrB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAwCxB,eAAO,MAAM,MAAM,qGAiBlB,CAAC;AAKF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAmE5C,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAShD,CAAC;AAIF,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Navbar.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/Navbar/Navbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAqB3C,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAEjB,qBAAqB,EAGrB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAwCxB,eAAO,MAAM,MAAM,qGAiBlB,CAAC;AAKF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAmE5C,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAShD,CAAC;AAIF,eAAO,MAAM,gBAAgB,qHAmD5B,CAAC;AAMF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA+C9C,CAAC;AAIF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA4B9C,CAAC"}
|
|
@@ -4,6 +4,8 @@ export declare const FILE_TYPE_PATTERNS: {
|
|
|
4
4
|
readonly DOCUMENT: RegExp;
|
|
5
5
|
readonly VIDEO: RegExp;
|
|
6
6
|
readonly AUDIO: RegExp;
|
|
7
|
+
/** Interactive viewer pages (supplier 360° spinners), not media files. */
|
|
8
|
+
readonly EMBED: RegExp;
|
|
7
9
|
};
|
|
8
10
|
export declare const isFileType: {
|
|
9
11
|
readonly pdf: (url: string) => boolean;
|
|
@@ -11,5 +13,6 @@ export declare const isFileType: {
|
|
|
11
13
|
readonly document: (url: string) => boolean;
|
|
12
14
|
readonly video: (url: string) => boolean;
|
|
13
15
|
readonly audio: (url: string) => boolean;
|
|
16
|
+
readonly embed: (url: string) => boolean;
|
|
14
17
|
};
|
|
15
18
|
//# sourceMappingURL=filePatterns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filePatterns.d.ts","sourceRoot":"","sources":["../../src/constants/filePatterns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;
|
|
1
|
+
{"version":3,"file":"filePatterns.d.ts","sourceRoot":"","sources":["../../src/constants/filePatterns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;IAM7B,0EAA0E;;CAElE,CAAC;AAEX,eAAO,MAAM,UAAU;wBACV,MAAM;0BACJ,MAAM;6BACH,MAAM;0BACT,MAAM;0BACN,MAAM;0BACN,MAAM;CACX,CAAC"}
|