@cellarnode/ui 0.17.3 → 0.17.4
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/__tests__/countdown-pill.test.d.ts +2 -0
- package/dist/components/__tests__/countdown-pill.test.d.ts.map +1 -0
- package/dist/components/__tests__/countdown-pill.test.js +28 -0
- package/dist/components/__tests__/countdown-pill.test.js.map +1 -0
- package/dist/components/__tests__/country-flag.test.d.ts +2 -0
- package/dist/components/__tests__/country-flag.test.d.ts.map +1 -0
- package/dist/components/__tests__/country-flag.test.js +20 -0
- package/dist/components/__tests__/country-flag.test.js.map +1 -0
- package/dist/components/__tests__/status-pill.test.d.ts +2 -0
- package/dist/components/__tests__/status-pill.test.d.ts.map +1 -0
- package/dist/components/__tests__/status-pill.test.js +24 -0
- package/dist/components/__tests__/status-pill.test.js.map +1 -0
- package/dist/components/confirmation-dialog.stories.d.ts +26 -0
- package/dist/components/confirmation-dialog.stories.d.ts.map +1 -0
- package/dist/components/confirmation-dialog.stories.js +94 -0
- package/dist/components/confirmation-dialog.stories.js.map +1 -0
- package/dist/components/countdown-pill.d.ts +7 -0
- package/dist/components/countdown-pill.d.ts.map +1 -0
- package/dist/components/countdown-pill.js +27 -0
- package/dist/components/countdown-pill.js.map +1 -0
- package/dist/components/countdown-pill.stories.d.ts +15 -0
- package/dist/components/countdown-pill.stories.d.ts.map +1 -0
- package/dist/components/countdown-pill.stories.js +14 -0
- package/dist/components/countdown-pill.stories.js.map +1 -0
- package/dist/components/country-flag.d.ts +6 -0
- package/dist/components/country-flag.d.ts.map +1 -0
- package/dist/components/country-flag.js +31 -0
- package/dist/components/country-flag.js.map +1 -0
- package/dist/components/country-flag.stories.d.ts +14 -0
- package/dist/components/country-flag.stories.d.ts.map +1 -0
- package/dist/components/country-flag.stories.js +16 -0
- package/dist/components/country-flag.stories.js.map +1 -0
- package/dist/components/period-select.stories.d.ts +29 -0
- package/dist/components/period-select.stories.d.ts.map +1 -0
- package/dist/components/period-select.stories.js +65 -0
- package/dist/components/period-select.stories.js.map +1 -0
- package/dist/components/sidebar/context.d.ts +24 -0
- package/dist/components/sidebar/context.d.ts.map +1 -0
- package/dist/components/sidebar/context.js +73 -0
- package/dist/components/sidebar/context.js.map +1 -0
- package/dist/components/sidebar/index.d.ts +9 -0
- package/dist/components/sidebar/index.d.ts.map +1 -0
- package/dist/components/sidebar/index.js +9 -0
- package/dist/components/sidebar/index.js.map +1 -0
- package/dist/components/sidebar/sidebar-group.d.ts +10 -0
- package/dist/components/sidebar/sidebar-group.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-group.js +21 -0
- package/dist/components/sidebar/sidebar-group.js.map +1 -0
- package/dist/components/sidebar/sidebar-inset.d.ts +3 -0
- package/dist/components/sidebar/sidebar-inset.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-inset.js +7 -0
- package/dist/components/sidebar/sidebar-inset.js.map +1 -0
- package/dist/components/sidebar/sidebar-menu-sub.d.ts +9 -0
- package/dist/components/sidebar/sidebar-menu-sub.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-menu-sub.js +15 -0
- package/dist/components/sidebar/sidebar-menu-sub.js.map +1 -0
- package/dist/components/sidebar/sidebar-menu.d.ts +23 -0
- package/dist/components/sidebar/sidebar-menu.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-menu.js +63 -0
- package/dist/components/sidebar/sidebar-menu.js.map +1 -0
- package/dist/components/sidebar/sidebar-sections.d.ts +8 -0
- package/dist/components/sidebar/sidebar-sections.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-sections.js +20 -0
- package/dist/components/sidebar/sidebar-sections.js.map +1 -0
- package/dist/components/sidebar/sidebar-trigger.d.ts +4 -0
- package/dist/components/sidebar/sidebar-trigger.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar-trigger.js +17 -0
- package/dist/components/sidebar/sidebar-trigger.js.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +7 -0
- package/dist/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.js +26 -0
- package/dist/components/sidebar/sidebar.js.map +1 -0
- package/dist/components/status-pill.d.ts +7 -0
- package/dist/components/status-pill.d.ts.map +1 -0
- package/dist/components/status-pill.js +14 -0
- package/dist/components/status-pill.js.map +1 -0
- package/dist/components/status-pill.stories.d.ts +21 -0
- package/dist/components/status-pill.stories.d.ts.map +1 -0
- package/dist/components/status-pill.stories.js +18 -0
- package/dist/components/status-pill.stories.js.map +1 -0
- package/dist/components/toast.stories.d.ts +25 -0
- package/dist/components/toast.stories.d.ts.map +1 -0
- package/dist/components/toast.stories.js +38 -0
- package/dist/components/toast.stories.js.map +1 -0
- package/dist/components/toaster.stories.d.ts +19 -0
- package/dist/components/toaster.stories.d.ts.map +1 -0
- package/dist/components/toaster.stories.js +27 -0
- package/dist/components/toaster.stories.js.map +1 -0
- package/dist/globe/globe-scene-camera.d.ts +25 -0
- package/dist/globe/globe-scene-camera.d.ts.map +1 -0
- package/dist/globe/globe-scene-camera.js +59 -0
- package/dist/globe/globe-scene-camera.js.map +1 -0
- package/dist/globe/globe-scene-channel.d.ts +27 -0
- package/dist/globe/globe-scene-channel.d.ts.map +1 -0
- package/dist/globe/globe-scene-channel.js +60 -0
- package/dist/globe/globe-scene-channel.js.map +1 -0
- package/dist/globe/globe-scene-controls.d.ts +38 -0
- package/dist/globe/globe-scene-controls.d.ts.map +1 -0
- package/dist/globe/globe-scene-controls.js +62 -0
- package/dist/globe/globe-scene-controls.js.map +1 -0
- package/dist/globe/globe-scene-data.d.ts +16 -0
- package/dist/globe/globe-scene-data.d.ts.map +1 -0
- package/dist/globe/globe-scene-data.js +51 -0
- package/dist/globe/globe-scene-data.js.map +1 -0
- package/dist/globe/globe-scene-interactions.d.ts +11 -0
- package/dist/globe/globe-scene-interactions.d.ts.map +1 -0
- package/dist/globe/globe-scene-interactions.js +54 -0
- package/dist/globe/globe-scene-interactions.js.map +1 -0
- package/dist/globe/globe-scene-layers.d.ts +22 -0
- package/dist/globe/globe-scene-layers.d.ts.map +1 -0
- package/dist/globe/globe-scene-layers.js +170 -0
- package/dist/globe/globe-scene-layers.js.map +1 -0
- package/dist/globe/globe-scene-props.d.ts +32 -0
- package/dist/globe/globe-scene-props.d.ts.map +1 -0
- package/dist/globe/globe-scene-props.js +8 -0
- package/dist/globe/globe-scene-props.js.map +1 -0
- package/dist/globe/globe-scene-types.d.ts +34 -0
- package/dist/globe/globe-scene-types.d.ts.map +1 -0
- package/dist/globe/globe-scene-types.js +14 -0
- package/dist/globe/globe-scene-types.js.map +1 -0
- package/dist/globe/globe-scene.d.ts +10 -25
- package/dist/globe/globe-scene.d.ts.map +1 -1
- package/dist/globe/globe-scene.js +54 -349
- package/dist/globe/globe-scene.js.map +1 -1
- package/dist/hooks/__tests__/use-animated-number.test.d.ts +2 -0
- package/dist/hooks/__tests__/use-animated-number.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/use-animated-number.test.js +58 -0
- package/dist/hooks/__tests__/use-animated-number.test.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-animated-number.d.ts +6 -0
- package/dist/hooks/use-animated-number.d.ts.map +1 -0
- package/dist/hooks/use-animated-number.js +56 -0
- package/dist/hooks/use-animated-number.js.map +1 -0
- package/dist/notifications/notification-badge.stories.d.ts +42 -0
- package/dist/notifications/notification-badge.stories.d.ts.map +1 -0
- package/dist/notifications/notification-badge.stories.js +42 -0
- package/dist/notifications/notification-badge.stories.js.map +1 -0
- package/dist/notifications/notification-empty-state.stories.d.ts +16 -0
- package/dist/notifications/notification-empty-state.stories.d.ts.map +1 -0
- package/dist/notifications/notification-empty-state.stories.js +22 -0
- package/dist/notifications/notification-empty-state.stories.js.map +1 -0
- package/dist/notifications/notification-item.stories.d.ts +41 -0
- package/dist/notifications/notification-item.stories.d.ts.map +1 -0
- package/dist/notifications/notification-item.stories.js +110 -0
- package/dist/notifications/notification-item.stories.js.map +1 -0
- package/dist/notifications/notification-list.stories.d.ts +25 -0
- package/dist/notifications/notification-list.stories.d.ts.map +1 -0
- package/dist/notifications/notification-list.stories.js +148 -0
- package/dist/notifications/notification-list.stories.js.map +1 -0
- package/dist/notifications/notification-page.stories.d.ts +20 -0
- package/dist/notifications/notification-page.stories.d.ts.map +1 -0
- package/dist/notifications/notification-page.stories.js +140 -0
- package/dist/notifications/notification-page.stories.js.map +1 -0
- package/dist/notifications/notification-tray.stories.d.ts +21 -0
- package/dist/notifications/notification-tray.stories.d.ts.map +1 -0
- package/dist/notifications/notification-tray.stories.js +123 -0
- package/dist/notifications/notification-tray.stories.js.map +1 -0
- package/dist/notifications/push-prompt-banner.stories.d.ts +27 -0
- package/dist/notifications/push-prompt-banner.stories.d.ts.map +1 -0
- package/dist/notifications/push-prompt-banner.stories.js +33 -0
- package/dist/notifications/push-prompt-banner.stories.js.map +1 -0
- package/dist/offer/__tests__/opportunity-requirements.test.d.ts +2 -0
- package/dist/offer/__tests__/opportunity-requirements.test.d.ts.map +1 -0
- package/dist/offer/__tests__/opportunity-requirements.test.js +33 -0
- package/dist/offer/__tests__/opportunity-requirements.test.js.map +1 -0
- package/dist/offer/offer-detail-header.stories.d.ts +19 -0
- package/dist/offer/offer-detail-header.stories.d.ts.map +1 -0
- package/dist/offer/offer-detail-header.stories.js +59 -0
- package/dist/offer/offer-detail-header.stories.js.map +1 -0
- package/dist/offer/offer-detail-shell.stories.d.ts +17 -0
- package/dist/offer/offer-detail-shell.stories.d.ts.map +1 -0
- package/dist/offer/offer-detail-shell.stories.js +69 -0
- package/dist/offer/offer-detail-shell.stories.js.map +1 -0
- package/dist/offer/offer-detail-tabs.stories.d.ts +17 -0
- package/dist/offer/offer-detail-tabs.stories.d.ts.map +1 -0
- package/dist/offer/offer-detail-tabs.stories.js +66 -0
- package/dist/offer/offer-detail-tabs.stories.js.map +1 -0
- package/dist/offer/opportunity-requirements.d.ts.map +1 -1
- package/dist/offer/opportunity-requirements.js +4 -0
- package/dist/offer/opportunity-requirements.js.map +1 -1
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.js +23 -0
- package/dist/opportunities/__tests__/opportunity-channel-badge.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.js +50 -0
- package/dist/opportunities/__tests__/opportunity-detail-panel.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.js +19 -0
- package/dist/opportunities/__tests__/opportunity-empty-state.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.js +25 -0
- package/dist/opportunities/__tests__/opportunity-offers-count-chip.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.js +99 -0
- package/dist/opportunities/__tests__/opportunity-stacked-card.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.js +98 -0
- package/dist/opportunities/__tests__/opportunity-stacked-list.test.js.map +1 -0
- package/dist/opportunities/__tests__/section-field.test.d.ts +2 -0
- package/dist/opportunities/__tests__/section-field.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/section-field.test.js +28 -0
- package/dist/opportunities/__tests__/section-field.test.js.map +1 -0
- package/dist/opportunities/__tests__/two-column-section.test.d.ts +2 -0
- package/dist/opportunities/__tests__/two-column-section.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/two-column-section.test.js +25 -0
- package/dist/opportunities/__tests__/two-column-section.test.js.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.d.ts +7 -0
- package/dist/opportunities/opportunity-channel-badge.d.ts.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.js +13 -0
- package/dist/opportunities/opportunity-channel-badge.js.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.stories.d.ts +13 -0
- package/dist/opportunities/opportunity-channel-badge.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-channel-badge.stories.js +11 -0
- package/dist/opportunities/opportunity-channel-badge.stories.js.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.d.ts +13 -0
- package/dist/opportunities/opportunity-detail-panel.d.ts.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.js +19 -0
- package/dist/opportunities/opportunity-detail-panel.js.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.stories.d.ts +14 -0
- package/dist/opportunities/opportunity-detail-panel.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-detail-panel.stories.js +53 -0
- package/dist/opportunities/opportunity-detail-panel.stories.js.map +1 -0
- package/dist/opportunities/opportunity-empty-state.d.ts +10 -0
- package/dist/opportunities/opportunity-empty-state.d.ts.map +1 -0
- package/dist/opportunities/opportunity-empty-state.js +6 -0
- package/dist/opportunities/opportunity-empty-state.js.map +1 -0
- package/dist/opportunities/opportunity-empty-state.stories.d.ts +13 -0
- package/dist/opportunities/opportunity-empty-state.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-empty-state.stories.js +13 -0
- package/dist/opportunities/opportunity-empty-state.stories.js.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.d.ts +6 -0
- package/dist/opportunities/opportunity-offers-count-chip.d.ts.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.js +8 -0
- package/dist/opportunities/opportunity-offers-count-chip.js.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.d.ts +13 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.js +11 -0
- package/dist/opportunities/opportunity-offers-count-chip.stories.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.d.ts +20 -0
- package/dist/opportunities/opportunity-stacked-card.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.js +48 -0
- package/dist/opportunities/opportunity-stacked-card.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.stories.d.ts +23 -0
- package/dist/opportunities/opportunity-stacked-card.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-card.stories.js +143 -0
- package/dist/opportunities/opportunity-stacked-card.stories.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.d.ts +28 -0
- package/dist/opportunities/opportunity-stacked-list.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.js +49 -0
- package/dist/opportunities/opportunity-stacked-list.js.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.stories.d.ts +16 -0
- package/dist/opportunities/opportunity-stacked-list.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-stacked-list.stories.js +38 -0
- package/dist/opportunities/opportunity-stacked-list.stories.js.map +1 -0
- package/dist/opportunities/section-field.d.ts +8 -0
- package/dist/opportunities/section-field.d.ts.map +1 -0
- package/dist/opportunities/section-field.js +9 -0
- package/dist/opportunities/section-field.js.map +1 -0
- package/dist/opportunities/section-field.stories.d.ts +13 -0
- package/dist/opportunities/section-field.stories.d.ts.map +1 -0
- package/dist/opportunities/section-field.stories.js +15 -0
- package/dist/opportunities/section-field.stories.js.map +1 -0
- package/dist/opportunities/two-column-section.d.ts +10 -0
- package/dist/opportunities/two-column-section.d.ts.map +1 -0
- package/dist/opportunities/two-column-section.js +21 -0
- package/dist/opportunities/two-column-section.js.map +1 -0
- package/dist/opportunities/two-column-section.stories.d.ts +12 -0
- package/dist/opportunities/two-column-section.stories.d.ts.map +1 -0
- package/dist/opportunities/two-column-section.stories.js +26 -0
- package/dist/opportunities/two-column-section.stories.js.map +1 -0
- package/dist/opportunities/types.d.ts +76 -0
- package/dist/opportunities/types.d.ts.map +1 -0
- package/dist/opportunities/types.js +2 -0
- package/dist/opportunities/types.js.map +1 -0
- package/dist/org/invite-member-dialog.stories.d.ts +24 -0
- package/dist/org/invite-member-dialog.stories.d.ts.map +1 -0
- package/dist/org/invite-member-dialog.stories.js +34 -0
- package/dist/org/invite-member-dialog.stories.js.map +1 -0
- package/dist/org/team-hero-banner.stories.d.ts +25 -0
- package/dist/org/team-hero-banner.stories.d.ts.map +1 -0
- package/dist/org/team-hero-banner.stories.js +53 -0
- package/dist/org/team-hero-banner.stories.js.map +1 -0
- package/dist/org/team-member-menu.stories.d.ts +19 -0
- package/dist/org/team-member-menu.stories.d.ts.map +1 -0
- package/dist/org/team-member-menu.stories.js +27 -0
- package/dist/org/team-member-menu.stories.js.map +1 -0
- package/dist/org/team-member-row.stories.d.ts +26 -0
- package/dist/org/team-member-row.stories.d.ts.map +1 -0
- package/dist/org/team-member-row.stories.js +61 -0
- package/dist/org/team-member-row.stories.js.map +1 -0
- package/dist/org/team-pending-row.stories.d.ts +23 -0
- package/dist/org/team-pending-row.stories.d.ts.map +1 -0
- package/dist/org/team-pending-row.stories.js +45 -0
- package/dist/org/team-pending-row.stories.js.map +1 -0
- package/package.json +1 -1
- package/src/theme/tokens.css +78 -0
- package/dist/components/sidebar.d.ts +0 -68
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/sidebar.js +0 -208
- package/dist/components/sidebar.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-animated-number.d.ts","sourceRoot":"","sources":["../../src/hooks/use-animated-number.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAChC;AAWD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,wBAA6B,GAAG,MAAM,CA4ChG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
function easeOutCubic(t) {
|
|
3
|
+
return 1 - Math.pow(1 - t, 3);
|
|
4
|
+
}
|
|
5
|
+
function prefersReducedMotion() {
|
|
6
|
+
if (typeof window === "undefined" || !window.matchMedia)
|
|
7
|
+
return false;
|
|
8
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
9
|
+
}
|
|
10
|
+
export function useAnimatedNumber(target, options = {}) {
|
|
11
|
+
const { durationMs = 800, easing = easeOutCubic } = options;
|
|
12
|
+
const reducedMotion = prefersReducedMotion();
|
|
13
|
+
const [display, setDisplay] = React.useState(() => (reducedMotion ? target : 0));
|
|
14
|
+
const rafRef = React.useRef(null);
|
|
15
|
+
const startRef = React.useRef(null);
|
|
16
|
+
// Pin the latest easing + current display in refs so the animation effect can
|
|
17
|
+
// depend only on the "restart" inputs (target, durationMs) without stale closures
|
|
18
|
+
// or re-triggering the animation every frame.
|
|
19
|
+
const easingRef = React.useRef(easing);
|
|
20
|
+
const displayRef = React.useRef(display);
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
easingRef.current = easing;
|
|
23
|
+
}, [easing]);
|
|
24
|
+
React.useEffect(() => {
|
|
25
|
+
displayRef.current = display;
|
|
26
|
+
}, [display]);
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
if (reducedMotion)
|
|
29
|
+
return; // display is kept in sync via the derived return below
|
|
30
|
+
startRef.current = { from: displayRef.current, to: target, startedAt: performance.now() };
|
|
31
|
+
const tick = (now) => {
|
|
32
|
+
const start = startRef.current;
|
|
33
|
+
if (!start)
|
|
34
|
+
return;
|
|
35
|
+
const elapsed = now - start.startedAt;
|
|
36
|
+
const t = Math.min(1, elapsed / durationMs);
|
|
37
|
+
const eased = easingRef.current(t);
|
|
38
|
+
const next = Math.round(start.from + (start.to - start.from) * eased);
|
|
39
|
+
setDisplay(next);
|
|
40
|
+
if (t < 1) {
|
|
41
|
+
rafRef.current = requestAnimationFrame(tick);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
setDisplay(start.to);
|
|
45
|
+
rafRef.current = null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
rafRef.current = requestAnimationFrame(tick);
|
|
49
|
+
return () => {
|
|
50
|
+
if (rafRef.current !== null)
|
|
51
|
+
cancelAnimationFrame(rafRef.current);
|
|
52
|
+
};
|
|
53
|
+
}, [target, durationMs, reducedMotion]);
|
|
54
|
+
return reducedMotion ? target : display;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=use-animated-number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-animated-number.js","sourceRoot":"","sources":["../../src/hooks/use-animated-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,oBAAoB;IAC3B,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IACtE,OAAO,MAAM,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC,OAAO,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,UAAoC,EAAE;IACtF,MAAM,EAAE,UAAU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nB,MAAM,OAAO,GAAG,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;YACtC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;YAC5C,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACnC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;YACtE,UAAU,CAAC,IAAI,CAAC,CAAC;YACjB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACV,MAAM,CAAC,OAAO,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;YAC/C,CAAC;iBAAM,CAAC;gBACN,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACrB,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;YACxB,CAAC;QACH,CAAC,CAAC;QACF,MAAM,CAAC,OAAO,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC7C,OAAO,GAAG,EAAE;YACV,IAAI,MAAM,CAAC,OAAO,KAAK,IAAI;gBAAE,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;IAExC,OAAO,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { NotificationBadge } from "./notification-badge";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NotificationBadge;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
count: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "number";
|
|
14
|
+
min: number;
|
|
15
|
+
max: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
maxCount: {
|
|
19
|
+
control: {
|
|
20
|
+
type: "number";
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
27
|
+
count: number;
|
|
28
|
+
maxCount?: number | undefined;
|
|
29
|
+
className?: string | undefined;
|
|
30
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
31
|
+
args: {
|
|
32
|
+
count: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
export declare const Default: Story;
|
|
38
|
+
export declare const Zero: Story;
|
|
39
|
+
export declare const Single: Story;
|
|
40
|
+
export declare const OverMax: Story;
|
|
41
|
+
export declare const CustomMaxCount: Story;
|
|
42
|
+
//# sourceMappingURL=notification-badge.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-badge.stories.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-badge.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAK5B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { NotificationBadge } from "./notification-badge";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Notifications/NotificationBadge",
|
|
5
|
+
component: NotificationBadge,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
parameters: { layout: "centered" },
|
|
8
|
+
argTypes: {
|
|
9
|
+
count: { control: { type: "number", min: 0, max: 250 } },
|
|
10
|
+
maxCount: { control: { type: "number", min: 1, max: 999 } },
|
|
11
|
+
},
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (_jsxs("div", { className: "relative inline-flex size-9 items-center justify-center rounded-full bg-muted", children: [_jsx("span", { className: "text-xs text-muted-foreground", children: "Bell" }), _jsx(Story, {})] })),
|
|
14
|
+
],
|
|
15
|
+
args: {
|
|
16
|
+
count: 3,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
export const Default = {};
|
|
21
|
+
export const Zero = {
|
|
22
|
+
args: {
|
|
23
|
+
count: 0,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export const Single = {
|
|
27
|
+
args: {
|
|
28
|
+
count: 1,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export const OverMax = {
|
|
32
|
+
args: {
|
|
33
|
+
count: 128,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export const CustomMaxCount = {
|
|
37
|
+
args: {
|
|
38
|
+
count: 500,
|
|
39
|
+
maxCount: 9,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=notification-badge.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-badge.stories.js","sourceRoot":"","sources":["../../src/notifications/notification-badge.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;IAClC,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QACxD,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;KAC5D;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,eAAK,SAAS,EAAC,+EAA+E,aAC5F,eAAM,SAAS,EAAC,+BAA+B,qBAAY,EAC3D,KAAC,KAAK,KAAG,IACL,CACP;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;KACT;CACuC,CAAC;AAE3C,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;KACT;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;KACT;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;KACX;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { NotificationEmptyState } from "./notification-empty-state";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NotificationEmptyState;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const CustomCopy: Story;
|
|
15
|
+
export declare const FilteredUnread: Story;
|
|
16
|
+
//# sourceMappingURL=notification-empty-state.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-empty-state.stories.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-empty-state.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,QAAA,MAAM,IAAI;;;;;;;CAKqC,CAAC;AAEhD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAK5B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NotificationEmptyState } from "./notification-empty-state";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Notifications/NotificationEmptyState",
|
|
4
|
+
component: NotificationEmptyState,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: { layout: "padded" },
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const Default = {};
|
|
10
|
+
export const CustomCopy = {
|
|
11
|
+
args: {
|
|
12
|
+
title: "Nothing new right now",
|
|
13
|
+
description: "We'll ping you when something happens.",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export const FilteredUnread = {
|
|
17
|
+
args: {
|
|
18
|
+
title: "No unread notifications",
|
|
19
|
+
description: "Switch the filter to see your history.",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=notification-empty-state.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-empty-state.stories.js","sourceRoot":"","sources":["../../src/notifications/notification-empty-state.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,sCAAsC;IAC7C,SAAS,EAAE,sBAAsB;IACjC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACa,CAAC;AAEhD,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,wCAAwC;KACtD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,IAAI,EAAE;QACJ,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,wCAAwC;KACtD;CACF,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { NotificationItem } from "./notification-item";
|
|
3
|
+
import type { Notification } from "./types";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof NotificationItem;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
args: {
|
|
12
|
+
notification: Notification;
|
|
13
|
+
href: string;
|
|
14
|
+
onMarkRead: () => void;
|
|
15
|
+
onDismiss: () => void;
|
|
16
|
+
onNavigate: () => void;
|
|
17
|
+
};
|
|
18
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
19
|
+
notification: Notification;
|
|
20
|
+
onMarkRead?: ((id: string) => void) | undefined;
|
|
21
|
+
onDismiss?: ((id: string) => void) | undefined;
|
|
22
|
+
onNavigate?: ((href: string) => void) | undefined;
|
|
23
|
+
href?: string | undefined;
|
|
24
|
+
index?: number | undefined;
|
|
25
|
+
compact?: boolean | undefined;
|
|
26
|
+
ctaLabel?: string | undefined;
|
|
27
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
export declare const Default: Story;
|
|
32
|
+
export declare const Read: Story;
|
|
33
|
+
export declare const Compact: Story;
|
|
34
|
+
export declare const OfferStatusUpdate: Story;
|
|
35
|
+
export declare const PartnershipApproved: Story;
|
|
36
|
+
export declare const PartnershipDeclined: Story;
|
|
37
|
+
export declare const TenderClosingSoon: Story;
|
|
38
|
+
export declare const GlobalAnnouncement: Story;
|
|
39
|
+
export declare const WithoutDismissButton: Story;
|
|
40
|
+
export declare const NoCtaNoHref: Story;
|
|
41
|
+
//# sourceMappingURL=notification-item.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-item.stories.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-item.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAiB5C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;CAmB+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAYjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAUjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAU/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAUhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAIlC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NotificationItem } from "./notification-item";
|
|
3
|
+
// Five minutes ago — renders as relative time
|
|
4
|
+
const recent = () => new Date(Date.now() - 5 * 60 * 1000).toISOString();
|
|
5
|
+
const baseMatch = {
|
|
6
|
+
id: "n-match-1",
|
|
7
|
+
type: "match",
|
|
8
|
+
title: "New match found",
|
|
9
|
+
message: "Your 2021 Grenache is a 94% match for Nordic Wines & Spirits' Q3 tender.",
|
|
10
|
+
isRead: false,
|
|
11
|
+
isDismissed: false,
|
|
12
|
+
createdAt: recent(),
|
|
13
|
+
data: { matchId: "match-1" },
|
|
14
|
+
};
|
|
15
|
+
const meta = {
|
|
16
|
+
title: "Notifications/NotificationItem",
|
|
17
|
+
component: NotificationItem,
|
|
18
|
+
tags: ["autodocs"],
|
|
19
|
+
parameters: { layout: "padded" },
|
|
20
|
+
args: {
|
|
21
|
+
notification: baseMatch,
|
|
22
|
+
href: "/matches/match-1",
|
|
23
|
+
onMarkRead: () => { },
|
|
24
|
+
onDismiss: () => { },
|
|
25
|
+
onNavigate: () => { },
|
|
26
|
+
},
|
|
27
|
+
decorators: [
|
|
28
|
+
(Story) => (_jsx("div", { className: "max-w-md", children: _jsx(Story, {}) })),
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
export const Default = {};
|
|
33
|
+
export const Read = {
|
|
34
|
+
args: {
|
|
35
|
+
notification: { ...baseMatch, isRead: true },
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export const Compact = {
|
|
39
|
+
args: {
|
|
40
|
+
compact: true,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export const OfferStatusUpdate = {
|
|
44
|
+
args: {
|
|
45
|
+
notification: {
|
|
46
|
+
...baseMatch,
|
|
47
|
+
id: "n-offer-1",
|
|
48
|
+
type: "offer_status_update",
|
|
49
|
+
title: "Counter-offer received",
|
|
50
|
+
message: "Cantina Sant'Andrea proposed EUR 14.20 / bottle on tender T-4821.",
|
|
51
|
+
},
|
|
52
|
+
href: "/offers/offer-1",
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
export const PartnershipApproved = {
|
|
56
|
+
args: {
|
|
57
|
+
notification: {
|
|
58
|
+
...baseMatch,
|
|
59
|
+
id: "n-partner-1",
|
|
60
|
+
type: "partnership_approved",
|
|
61
|
+
title: "Partnership approved",
|
|
62
|
+
message: "Vinoteca Global is now your approved importer partner for Italy.",
|
|
63
|
+
},
|
|
64
|
+
href: "/organisation/partnerships",
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
export const PartnershipDeclined = {
|
|
68
|
+
args: {
|
|
69
|
+
notification: {
|
|
70
|
+
...baseMatch,
|
|
71
|
+
id: "n-partner-2",
|
|
72
|
+
type: "partnership_declined",
|
|
73
|
+
title: "Partnership declined",
|
|
74
|
+
message: "Your request to partner with Northern Cellars was declined.",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
export const TenderClosingSoon = {
|
|
79
|
+
args: {
|
|
80
|
+
notification: {
|
|
81
|
+
...baseMatch,
|
|
82
|
+
id: "n-tender-1",
|
|
83
|
+
type: "tender_close",
|
|
84
|
+
title: "Tender closing soon",
|
|
85
|
+
message: "Systembolaget Organic Red closes in 48 hours.",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
export const GlobalAnnouncement = {
|
|
90
|
+
args: {
|
|
91
|
+
notification: {
|
|
92
|
+
...baseMatch,
|
|
93
|
+
id: "n-news-1",
|
|
94
|
+
type: "global_announcement",
|
|
95
|
+
title: "Platform update",
|
|
96
|
+
message: "New AI matching engine rolled out to all producer accounts.",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
export const WithoutDismissButton = {
|
|
101
|
+
args: {
|
|
102
|
+
onDismiss: undefined,
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
export const NoCtaNoHref = {
|
|
106
|
+
args: {
|
|
107
|
+
href: undefined,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=notification-item.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-item.stories.js","sourceRoot":"","sources":["../../src/notifications/notification-item.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,8CAA8C;AAC9C,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAExE,MAAM,SAAS,GAAiB;IAC9B,EAAE,EAAE,WAAW;IACf,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,iBAAiB;IACxB,O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AAmB,GAAU;IACxC,IAAI,EAAE;QACJ,YAAY,EAAE;YACZ,GAAG,SAAS;YACZ,EAAE,EAAE,aAAa;YACjB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EACL,kEAAkE;SACrE;QACD,IAAI,EAAE,4BAA4B;KACnC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAU;IACxC,IAAI,EAAE;QACJ,YAAY,EAAE;YACZ,GAAG,SAAS;YACZ,EAAE,EAAE,aAAa;YACjB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,6DAA6D;SACvE;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAU;IACtC,IAAI,EAAE;QACJ,YAAY,EAAE;YACZ,GAAG,SAAS;YACZ,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EAAE,+CAA+C;SACzD;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAU;IACvC,IAAI,EAAE;QACJ,YAAY,EAAE;YACZ,GAAG,SAAS;YACZ,EAAE,EAAE,UAAU;YACd,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,iBAAiB;YACxB,OAAO,EAAE,6DAA6D;SACvE;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAU;IACzC,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;KAChB;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { NotificationList } from "./notification-list";
|
|
3
|
+
import type { Notification } from "./types";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof NotificationList;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
decorators: ((Story: React.ComponentType) => import("react/jsx-runtime").JSX.Element)[];
|
|
12
|
+
args: {
|
|
13
|
+
notifications: Notification[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Default: Story;
|
|
19
|
+
export declare const Empty: Story;
|
|
20
|
+
export declare const Loading: Story;
|
|
21
|
+
export declare const WithFilters: Story;
|
|
22
|
+
export declare const WithGroups: Story;
|
|
23
|
+
export declare const Compact: Story;
|
|
24
|
+
export declare const WithLoadMore: Story;
|
|
25
|
+
//# sourceMappingURL=notification-list.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-list.stories.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-list.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,SAAS,CAAC;AAgHhE,QAAA,MAAM,IAAI;;;;;;;yBAnBoB,KAAK,CAAC,aAAa;;;;CA4BR,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
3
|
+
import { NotificationList } from "./notification-list";
|
|
4
|
+
import { NotificationProvider } from "./notification-provider";
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Mock data
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
const hoursAgo = (h) => new Date(Date.now() - h * 60 * 60 * 1000).toISOString();
|
|
9
|
+
const daysAgo = (d) => new Date(Date.now() - d * 24 * 60 * 60 * 1000).toISOString();
|
|
10
|
+
const mockNotifications = [
|
|
11
|
+
{
|
|
12
|
+
id: "n1",
|
|
13
|
+
type: "match",
|
|
14
|
+
title: "New match: Grenache 2021",
|
|
15
|
+
message: "94% match on Systembolaget Q3 tender",
|
|
16
|
+
isRead: false,
|
|
17
|
+
isDismissed: false,
|
|
18
|
+
createdAt: hoursAgo(1),
|
|
19
|
+
data: { matchId: "match-1" },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "n2",
|
|
23
|
+
type: "offer_status_update",
|
|
24
|
+
title: "Counter-offer received",
|
|
25
|
+
message: "Cantina Sant'Andrea proposed EUR 14.20 / bottle",
|
|
26
|
+
isRead: false,
|
|
27
|
+
isDismissed: false,
|
|
28
|
+
createdAt: hoursAgo(3),
|
|
29
|
+
data: { offerId: "offer-1" },
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "n3",
|
|
33
|
+
type: "partnership_request",
|
|
34
|
+
title: "Partnership request",
|
|
35
|
+
message: "Vinoteca Global wants to partner with you",
|
|
36
|
+
isRead: true,
|
|
37
|
+
isDismissed: false,
|
|
38
|
+
createdAt: hoursAgo(8),
|
|
39
|
+
data: { partnershipId: "p-1" },
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "n4",
|
|
43
|
+
type: "tender_new",
|
|
44
|
+
title: "New tender published",
|
|
45
|
+
message: "Alko Finland - Organic Red Wines",
|
|
46
|
+
isRead: true,
|
|
47
|
+
isDismissed: false,
|
|
48
|
+
createdAt: daysAgo(2),
|
|
49
|
+
data: { tenderId: "tender-1" },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "n5",
|
|
53
|
+
type: "partnership_approved",
|
|
54
|
+
title: "Partnership approved",
|
|
55
|
+
message: "Northern Cellars is now your approved partner",
|
|
56
|
+
isRead: true,
|
|
57
|
+
isDismissed: false,
|
|
58
|
+
createdAt: daysAgo(3),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "n6",
|
|
62
|
+
type: "global_announcement",
|
|
63
|
+
title: "Platform update",
|
|
64
|
+
message: "New AI matching engine available",
|
|
65
|
+
isRead: true,
|
|
66
|
+
isDismissed: false,
|
|
67
|
+
createdAt: daysAgo(5),
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
// ---------------------------------------------------------------------------
|
|
71
|
+
// Provider setup
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
const mockConfig = {
|
|
74
|
+
api: {
|
|
75
|
+
list: async () => ({ notifications: [], hasMore: false }),
|
|
76
|
+
unreadCount: async () => ({ count: 0 }),
|
|
77
|
+
markRead: async () => { },
|
|
78
|
+
markAllRead: async () => { },
|
|
79
|
+
dismiss: async () => { },
|
|
80
|
+
},
|
|
81
|
+
resolveRoute: (type, data) => {
|
|
82
|
+
if (type === "match" && data?.matchId)
|
|
83
|
+
return `/matches/${data.matchId}`;
|
|
84
|
+
if (type === "offer_status_update" && data?.offerId)
|
|
85
|
+
return `/offers/${data.offerId}`;
|
|
86
|
+
if (type === "tender_new" && data?.tenderId)
|
|
87
|
+
return `/opportunities/${data.tenderId}`;
|
|
88
|
+
return "#";
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
const withProviders = (Story) => {
|
|
92
|
+
const qc = new QueryClient({
|
|
93
|
+
defaultOptions: { queries: { retry: false } },
|
|
94
|
+
});
|
|
95
|
+
return (_jsx(QueryClientProvider, { client: qc, children: _jsx(NotificationProvider, { config: mockConfig, children: _jsx("div", { className: "max-w-xl", children: _jsx(Story, {}) }) }) }));
|
|
96
|
+
};
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
// Meta
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
const meta = {
|
|
101
|
+
title: "Notifications/NotificationList",
|
|
102
|
+
component: NotificationList,
|
|
103
|
+
tags: ["autodocs"],
|
|
104
|
+
parameters: { layout: "padded" },
|
|
105
|
+
decorators: [withProviders],
|
|
106
|
+
args: {
|
|
107
|
+
notifications: mockNotifications,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
export default meta;
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
// Stories
|
|
113
|
+
// ---------------------------------------------------------------------------
|
|
114
|
+
export const Default = {};
|
|
115
|
+
export const Empty = {
|
|
116
|
+
args: {
|
|
117
|
+
notifications: [],
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
export const Loading = {
|
|
121
|
+
args: {
|
|
122
|
+
isLoading: true,
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
export const WithFilters = {
|
|
126
|
+
args: {
|
|
127
|
+
showFilters: true,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
export const WithGroups = {
|
|
131
|
+
args: {
|
|
132
|
+
showGroups: true,
|
|
133
|
+
showFilters: true,
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
export const Compact = {
|
|
137
|
+
args: {
|
|
138
|
+
compact: true,
|
|
139
|
+
maxItems: 5,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
export const WithLoadMore = {
|
|
143
|
+
args: {
|
|
144
|
+
hasMore: true,
|
|
145
|
+
onLoadMore: () => { },
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=notification-list.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-list.stories.js","sourceRoot":"","sources":["../../src/notifications/notification-list.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AACxF,MAAM,OAAO,GAAG,CAAC,CAAS,EAAE,EAAE,CAC5B,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAE/D,MAAM,iBAAiB,GAAmB;IACxC;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,0BAA0B;QACjC,OAAO,EAAE,sCAAsC;QAC/C,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;QACtB,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KAC7B;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,wBAAwB;QAC/B,OAAO,EAAE,iDAAiD;QAC1D,MAAM,EAAE,KAAK;QACb,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;QACtB,IAAI,EAAE,EAAE,OAAO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AAiB;KACjC;CACsC,CAAC;AAE1C,eAAe,IAAI,CAAC;AAGpB,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,aAAa,EAAE,EAAE;KAClB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,SAAS,EAAE,IAAI;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAChC,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;KAClB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE,IAAI;KAClB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;KACrB;CACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { NotificationPage } from "./notification-page";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NotificationPage;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
args: {
|
|
11
|
+
onNavigate: () => void;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
export declare const Default: Story;
|
|
17
|
+
export declare const Empty: Story;
|
|
18
|
+
export declare const AllRead: Story;
|
|
19
|
+
export declare const Loading: Story;
|
|
20
|
+
//# sourceMappingURL=notification-page.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-page.stories.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-page.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAoIvD,QAAA,MAAM,IAAI;;;;;;;;;;CAQ+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC"}
|